@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
|
@@ -120,6 +120,7 @@ sap.ui.define(["sap/base/Log", "sap/m/GenericTile", "sap/m/Panel", "sap/m/librar
|
|
|
120
120
|
this.addStyleClass("sapCuxAppsContainer");
|
|
121
121
|
this.addCustomSetting("text", this._i18nBundle.getText("myAppMsg"));
|
|
122
122
|
this._attachRouteChangeEvent();
|
|
123
|
+
this._currentDeviceType = this.getDeviceType();
|
|
123
124
|
},
|
|
124
125
|
/**
|
|
125
126
|
* Attaches an event handler to monitor route changes and manage application state accordingly.
|
|
@@ -283,13 +284,6 @@ sap.ui.define(["sap/base/Log", "sap/m/GenericTile", "sap/m/Panel", "sap/m/librar
|
|
|
283
284
|
// don't wait for personalization to complete
|
|
284
285
|
void panel.applyPersonalization(true);
|
|
285
286
|
}
|
|
286
|
-
let tiles = [];
|
|
287
|
-
let apps = panel.getApps();
|
|
288
|
-
tiles = panel.fetchTileVisualization(tiles);
|
|
289
|
-
_this4.fireEvent("appsLoaded", {
|
|
290
|
-
apps,
|
|
291
|
-
tiles
|
|
292
|
-
});
|
|
293
287
|
});
|
|
294
288
|
}
|
|
295
289
|
}();
|
|
@@ -322,6 +316,14 @@ sap.ui.define(["sap/base/Log", "sap/m/GenericTile", "sap/m/Panel", "sap/m/librar
|
|
|
322
316
|
let items = isPhone ? this._generateMobileCards([...groups, ...apps], panel.getId()) : this._generateTiles([...groups, ...apps]);
|
|
323
317
|
this._addWrapperContent(wrapper, items, aggregationName);
|
|
324
318
|
this._updatePanelContentVisibility(panel);
|
|
319
|
+
if (panel.isLoaded()) {
|
|
320
|
+
let tiles = [];
|
|
321
|
+
tiles = panel.fetchTileVisualization(tiles);
|
|
322
|
+
this.fireEvent("appsLoaded", {
|
|
323
|
+
apps,
|
|
324
|
+
tiles
|
|
325
|
+
});
|
|
326
|
+
}
|
|
325
327
|
},
|
|
326
328
|
/**
|
|
327
329
|
* Updates the visibility of the panel's content based on the current state and device type.
|
|
@@ -349,9 +351,10 @@ sap.ui.define(["sap/base/Log", "sap/m/GenericTile", "sap/m/Panel", "sap/m/librar
|
|
|
349
351
|
* Generates generic tile based on app.
|
|
350
352
|
* @private
|
|
351
353
|
* @param {sap.cux.home.App} app - App.
|
|
354
|
+
* @param {string} [width="100%"] - Tile width (default "100%", pass "15rem" for fixed mobile layout).
|
|
352
355
|
* @returns {sap.m.GenericTile}.
|
|
353
356
|
*/
|
|
354
|
-
_getAppTile: function _getAppTile(app) {
|
|
357
|
+
_getAppTile: function _getAppTile(app, width = "100%") {
|
|
355
358
|
const isPhone = this.getDeviceType() === DeviceType.Mobile;
|
|
356
359
|
const actions = app.getAggregation("menuItems") || [];
|
|
357
360
|
const tileId = isPhone ? `${app.getId()}-mobile-tile` : `${app.getId()}-tile`;
|
|
@@ -369,16 +372,17 @@ sap.ui.define(["sap/base/Log", "sap/m/GenericTile", "sap/m/Panel", "sap/m/librar
|
|
|
369
372
|
dropAreaOffset: 4,
|
|
370
373
|
subheader: app.getSubTitle(),
|
|
371
374
|
press: e => app._onPress(e),
|
|
372
|
-
width
|
|
375
|
+
width
|
|
373
376
|
}).addStyleClass("tileLayout sapMGTTwoByHalf");
|
|
374
377
|
},
|
|
375
378
|
/**
|
|
376
379
|
* Generates generic tile based on group.
|
|
377
380
|
* @private
|
|
378
381
|
* @param {sap.cux.home.Group} group - Group.
|
|
382
|
+
* @param {string} [width="100%"] - Tile width (default "100%", pass "15rem" for fixed mobile layout).
|
|
379
383
|
* @returns {sap.m.GenericTile}.
|
|
380
384
|
*/
|
|
381
|
-
_getGroupTile: function _getGroupTile(group) {
|
|
385
|
+
_getGroupTile: function _getGroupTile(group, width = "100%") {
|
|
382
386
|
const isPhone = this.getDeviceType() === DeviceType.Mobile;
|
|
383
387
|
const actions = group.getAggregation("menuItems") || [];
|
|
384
388
|
const tileId = isPhone ? `${group.getId()}-mobile-tile` : `${group.getId()}-tile`;
|
|
@@ -395,7 +399,7 @@ sap.ui.define(["sap/base/Log", "sap/m/GenericTile", "sap/m/Panel", "sap/m/librar
|
|
|
395
399
|
dropAreaOffset: 4,
|
|
396
400
|
tileBadge: group.getNumber(),
|
|
397
401
|
press: e => group._onPress(e),
|
|
398
|
-
width
|
|
402
|
+
width
|
|
399
403
|
}).addStyleClass("tileLayout sapMGTTwoByHalf").data("groupId", group.getGroupId());
|
|
400
404
|
},
|
|
401
405
|
/**
|
|
@@ -566,9 +570,16 @@ sap.ui.define(["sap/base/Log", "sap/m/GenericTile", "sap/m/Panel", "sap/m/librar
|
|
|
566
570
|
*/
|
|
567
571
|
adjustLayout: function _adjustLayout() {
|
|
568
572
|
const isPhone = this.getDeviceType() === DeviceType.Mobile;
|
|
573
|
+
const currentIsPhone = this._currentDeviceType === DeviceType.Mobile;
|
|
569
574
|
const selectedPanel = this._getSelectedPanel();
|
|
570
575
|
this.setTileWidth(selectedPanel);
|
|
571
576
|
|
|
577
|
+
// Only proceed if device type changed between mobile and non-mobile
|
|
578
|
+
if (isPhone === currentIsPhone) {
|
|
579
|
+
return;
|
|
580
|
+
}
|
|
581
|
+
this._currentDeviceType = this.getDeviceType();
|
|
582
|
+
|
|
572
583
|
//hide actions if the device is a phone
|
|
573
584
|
this.toggleActionButtons(!isPhone);
|
|
574
585
|
const panels = this.getContent();
|
|
@@ -601,14 +612,16 @@ sap.ui.define(["sap/base/Log", "sap/m/GenericTile", "sap/m/Panel", "sap/m/librar
|
|
|
601
612
|
*/
|
|
602
613
|
_generateMobileCards: function _generateMobileCards(items, currentPanelId) {
|
|
603
614
|
const panels = [];
|
|
615
|
+
const isSinglePanel = items.length <= 7;
|
|
616
|
+
const tileWidth = isSinglePanel ? "100%" : "15rem";
|
|
604
617
|
for (let i = 0; i < items.length; i += 7) {
|
|
605
618
|
const panelItems = items.slice(i, i + 7);
|
|
606
619
|
const panel = new Panel(`${currentPanelId}--${i}`, {
|
|
607
620
|
backgroundDesign: BackgroundDesign.Solid,
|
|
608
621
|
height: "23.5rem",
|
|
609
|
-
width: "17rem",
|
|
610
|
-
content: this._generateTiles(panelItems)
|
|
611
|
-
}).addStyleClass(
|
|
622
|
+
width: isSinglePanel ? "100%" : "17rem",
|
|
623
|
+
content: this._generateTiles(panelItems, tileWidth)
|
|
624
|
+
}).addStyleClass(`sapUiMobileAppsCard appPanelBorder myAppMFBContent ${isSinglePanel ? "mobileAdaptiveWidth" : ""}`);
|
|
612
625
|
panels.push(panel);
|
|
613
626
|
}
|
|
614
627
|
return panels;
|
|
@@ -618,10 +631,11 @@ sap.ui.define(["sap/base/Log", "sap/m/GenericTile", "sap/m/Panel", "sap/m/librar
|
|
|
618
631
|
*
|
|
619
632
|
* @private
|
|
620
633
|
* @param {BaseApp[]} items - Apps/Groups for which tiles has to be generated.
|
|
634
|
+
* @param {string} [width="100%"] - Width of each generated tile.
|
|
621
635
|
* @returns {sap.m.GenericTile[]} The generated tiles.
|
|
622
636
|
*/
|
|
623
|
-
_generateTiles: function _generateTiles(items) {
|
|
624
|
-
return items.map(item => item instanceof Group ? this._getGroupTile(item) : this._getAppTile(item));
|
|
637
|
+
_generateTiles: function _generateTiles(items, width = "100%") {
|
|
638
|
+
return items.map(item => item instanceof Group ? this._getGroupTile(item, width) : this._getAppTile(item, width));
|
|
625
639
|
},
|
|
626
640
|
/**
|
|
627
641
|
* Adds given items into the wrapper.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppsContainer.js","names":["sap","ui","define","Log","GenericTile","Panel","sap_m_library","EventBus","Parameters","S4MyHome","__BaseAppPersPanel","__BaseContainer","__Group","__RecommendedAppPanel","___utils_DataFormatUtils","___utils_Device","___utils_placeholder_AppsPlaceholder","_interopRequireDefault","obj","__esModule","default","_catch","body","recover","result","e","then","BackgroundDesign","FrameType","GenericTileMode","GenericTileScope","TileSizeBehavior","BaseAppPersPanel","BaseContainer","Group","RecommendedAppPanel","getLeanURL","calculateCardWidth","DeviceType","fetchElementProperties","getAppsPlaceholder","getDefaultAppColor","sLegendName","key","value","get","name","assigned","CONSTANTS","PLACEHOLDER_ITEMS_COUNT","MIN_TILE_WIDTH","MAX_TILE_WIDTH","AppsContainer","extend","metadata","events","appsLoaded","parameters","apps","type","tiles","renderer","apiVersion","constructor","_constructor","id","settings","BaseContainer.prototype.constructor.call","_isInitialRender","init","_init","BaseContainer.prototype.init.call","setProperty","_i18nBundle","getText","eventBus","getInstance","subscribe","channelId","eventId","data","showRecommendation","firstAppsPanel","getContent","getProperty","addStyleClass","addCustomSetting","_attachRouteChangeEvent","_this","handleRouteChange","event","show","getParameter","_temp2","_temp","_appSwitched","showPersistedDialog","Promise","resolve","load","_setPanelsDirty","reject","attachRouteMatched","error","warning","Error","message","String","onBeforeRendering","_onBeforeRendering","_attachPanelSupportedEvent","adjustLayout","BaseContainer.prototype.onBeforeRendering.call","_removeUnsupportedPanels","onAfterRendering","_onAfterRendering","_this2","BaseContainer.prototype.onAfterRendering.call","_activateRecommendationTabPanel","_load","_this3","selectedPanels","getPanels","all","map","selectedPanel","_setApps","_getPanels","isPhone","getDeviceType","Mobile","_getSelectedPanel","_showPersistedDialog","firePersistDialog","panels","panel","setDesktopViewDirty","setMobileViewDirty","_generatePlaceholder","isLoaded","destroyAggregation","placeholderApps","generateApps","Array","fill","status","setApps","_updatePanelContent","_this4","_temp5","_temp4","fireEvent","_temp3","isDirty","isMobileDirty","loadApps","setLoaded","applyPersonalization","getApps","fetchTileVisualization","showErrorCard","getTitle","groups","getAggregation","wrapper","_generateMobileAppsWrapper","_generateAppsWrapper","aggregationName","items","_generateMobileCards","getId","_generateTiles","_addWrapperContent","_updatePanelContentVisibility","appsWrapper","_generateDesktopAppsWrapper","mobileAppsWrapper","errorCard","_generateErrorMessage","hasApps","length","setVisible","getParent","setWidth","_getAppTile","app","actions","tileId","scope","ActionMore","Display","state","getStatus","mode","IconMode","sizeBehavior","Small","header","backgroundColor","getBgColor","tileIcon","getIcon","url","getUrl","frameType","TwoByHalf","renderOnThemeChange","dropAreaOffset","subheader","getSubTitle","press","_onPress","width","_getGroupTile","group","tileBadge","getNumber","getGroupId","_onPanelSelect","_this5","BaseContainer.prototype._onPanelSelect.call","_refreshAllPanels","_this6","refreshPanel","_refreshPanel","_this7","_toggleTabView","supportedPanels","filter","isSupported","iconTabBarControl","_getInnerControl","toggleStyleClass","_onPanelSupported","currentPanel","setSupported","_togglePanelVisibility","isVisible","iconTabBar","tabs","getItems","selectedTab","find","tab","getKey","unSupportedPanels","hasListeners","attachSupported","bind","_this8","recommendedPanel","_temp6","_enableRecommendationTab","setTileWidth","_setTileWidth","minWidth","maxWidth","getDomRef","domProperties","availableWidth","Object","values","slice","reduce","propertyValue","tileCount","cardLayoutConfig","containerWidth","totalCards","gap","skipDeviceCheck","clampedWidth","getLayout","_adjustLayout","toggleActionButtons","forEach","currentPanelId","i","panelItems","backgroundDesign","Solid","height","content","push","item","addAggregation","_showErrorCard","getGenericPlaceholderContent","_getGenericPlaceholderContent"],"sources":["AppsContainer.ts"],"sourcesContent":["/*!\n * SAP UI development toolkit for HTML5 (SAPUI5)\n * * (c) Copyright 2009-2025 SAP SE. All rights reserved\n */\n\nimport Log from \"sap/base/Log\";\nimport GridContainer from \"sap/f/GridContainer\";\nimport GenericTile from \"sap/m/GenericTile\";\nimport HeaderContainer from \"sap/m/HeaderContainer\";\nimport IconTabBar, { IconTabBar$SelectEvent } from \"sap/m/IconTabBar\";\nimport IconTabFilter from \"sap/m/IconTabFilter\";\nimport Panel from \"sap/m/Panel\";\nimport VBox from \"sap/m/VBox\";\nimport { BackgroundDesign, FrameType, GenericTileMode, GenericTileScope, LoadState, TileSizeBehavior } from \"sap/m/library\";\nimport Event from \"sap/ui/base/Event\";\nimport type { MetadataOptions } from \"sap/ui/core/Element\";\nimport EventBus from \"sap/ui/core/EventBus\";\nimport Parameters from \"sap/ui/core/theming/Parameters\";\nimport S4MyHome from \"sap/ushell/api/S4MyHome\";\nimport App from \"./App\";\nimport { $AppsContainerSettings } from \"./AppsContainer\";\nimport BaseApp from \"./BaseApp\";\nimport BaseAppPanel, { BaseAppPanel$SupportedEvent } from \"./BaseAppPanel\";\nimport BaseAppPersPanel from \"./BaseAppPersPanel\";\nimport BaseContainer from \"./BaseContainer\";\nimport Group from \"./Group\";\nimport MenuItem from \"./MenuItem\";\nimport RecommendedAppPanel from \"./RecommendedAppPanel\";\nimport { ICustomVisualization } from \"./interface/AppsInterface\";\nimport { getLeanURL } from \"./utils/DataFormatUtils\";\nimport { calculateCardWidth, DeviceType, fetchElementProperties } from \"./utils/Device\";\nimport { getAppsPlaceholder } from \"./utils/placeholder/AppsPlaceholder\";\n\nconst getDefaultAppColor = () => {\n\tconst sLegendName = \"sapLegendColor9\";\n\treturn {\n\t\tkey: sLegendName,\n\t\tvalue: Parameters.get({\n\t\t\tname: sLegendName\n\t\t}),\n\t\tassigned: false\n\t};\n};\n\nconst CONSTANTS = {\n\tPLACEHOLDER_ITEMS_COUNT: 5,\n\tMIN_TILE_WIDTH: 304,\n\tMAX_TILE_WIDTH: 456\n};\n\n/**\n *\n * Container class for managing and storing apps.\n *\n * @extends BaseContainer\n *\n * @author SAP SE\n * @version 0.0.1\n * @since 1.121\n *\n * @private\n * @ui5-restricted ux.eng.s4producthomes1\n *\n * @alias sap.cux.home.AppsContainer\n */\nexport default class AppsContainer extends BaseContainer {\n\tprivate _isInitialRender = true;\n\tprivate _appSwitched!: boolean;\n\tstatic readonly renderer = {\n\t\t...BaseContainer.renderer,\n\t\tapiVersion: 2\n\t};\n\tstatic readonly metadata: MetadataOptions = {\n\t\tevents: {\n\t\t\t/**\n\t\t\t * Event is fired when apps are loaded.\n\t\t\t */\n\t\t\tappsLoaded: {\n\t\t\t\tparameters: {\n\t\t\t\t\tapps: { type: \"sap.cux.home.App[]\" },\n\t\t\t\t\ttiles: { type: \"sap.m.GenericTile[]\" }\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n\n\tconstructor(idOrSettings?: string | $AppsContainerSettings);\n\tconstructor(id?: string, settings?: $AppsContainerSettings);\n\t/**\n\t * Constructor for a new app container.\n\t *\n\t * @param {string} [id] ID for the new control, generated automatically if an ID is not provided\n\t * @param {object} [settings] Initial settings for the new control\n\t */\n\tpublic constructor(id?: string, settings?: $AppsContainerSettings) {\n\t\tsuper(id, settings);\n\t}\n\n\t/**\n\t * Init lifecycle method\n\t *\n\t * @private\n\t * @override\n\t */\n\tpublic init(): void {\n\t\tsuper.init();\n\t\tthis.setProperty(\"title\", this._i18nBundle?.getText(\"appsTitle\"));\n\t\t// Subscribe to recommendation setting change event\n\t\tconst eventBus = EventBus.getInstance();\n\t\teventBus.subscribe(\"importChannel\", \"recommendationSettingChanged\", (channelId?: string, eventId?: string, data?: object) => {\n\t\t\tconst showRecommendation = (data as { showRecommendation: boolean }).showRecommendation;\n\t\t\tif (!showRecommendation) {\n\t\t\t\tconst firstAppsPanel = this.getContent()?.[0];\n\t\t\t\tthis.setProperty(\"selectedKey\", firstAppsPanel?.getProperty(\"key\"));\n\t\t\t}\n\t\t});\n\n\t\t// disable lazy load for apps container as it's the hero element\n\t\tthis.setProperty(\"enableLazyLoad\", false);\n\t\tthis.addStyleClass(\"sapCuxAppsContainer\");\n\t\tthis.addCustomSetting(\"text\", this._i18nBundle.getText(\"myAppMsg\") as string);\n\t\tthis._attachRouteChangeEvent();\n\t}\n\n\t/**\n\t * Attaches an event handler to monitor route changes and manage application state accordingly.\n\t * @private\n\t *\n\t * @returns {void}\n\t */\n\n\tprivate _attachRouteChangeEvent(): void {\n\t\tconst handleRouteChange = async (event: Event<{ isMyHomeRoute: boolean }>) => {\n\t\t\tconst show = event.getParameter(\"isMyHomeRoute\");\n\t\t\tif (show) {\n\t\t\t\tif (this._appSwitched) {\n\t\t\t\t\tthis._appSwitched = false;\n\t\t\t\t\tthis.showPersistedDialog();\n\t\t\t\t\tawait this.load();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthis._setPanelsDirty();\n\t\t\t\tthis._appSwitched = true;\n\t\t\t}\n\t\t};\n\n\t\ttry {\n\t\t\tS4MyHome.attachRouteMatched({}, handleRouteChange, this);\n\t\t} catch (error) {\n\t\t\tLog.warning(\"Unable to attach route change handler\", error instanceof Error ? error.message : String(error));\n\t\t}\n\t}\n\n\t/**\n\t * onBeforeRendering lifecycle method\n\t *\n\t * @private\n\t * @override\n\t */\n\tpublic onBeforeRendering() {\n\t\tif (this._isInitialRender) {\n\t\t\tthis._isInitialRender = false;\n\t\t\tthis._attachPanelSupportedEvent();\n\t\t}\n\n\t\tthis.adjustLayout();\n\t\tsuper.onBeforeRendering();\n\t\tthis._removeUnsupportedPanels();\n\t}\n\n\t/**\n\t * onAfterRendering lifecycle method\n\t *\n\t * @private\n\t * @override\n\t */\n\tpublic async onAfterRendering() {\n\t\tsuper.onAfterRendering();\n\t\t// activating the recommendation tab from appsContainer as personalization data in not available on init of panel.\n\t\tawait this._activateRecommendationTabPanel();\n\t}\n\n\t/**\n\t * Loads the AppsContainer section.\n\t * Overrides the load method of the BaseContainer.\n\t *\n\t * @private\n\t * @async\n\t * @override\n\t */\n\tpublic async load(): Promise<void> {\n\t\tconst selectedPanels = this.getPanels();\n\t\tawait Promise.all(selectedPanels.map((selectedPanel) => this._setApps(selectedPanel)));\n\t}\n\n\t/**\n\t * Retrieves the relevant panels based on the device type.\n\t *\n\t * @private\n\t * @returns {BaseAppPanel[]} An array of panels based on the device type.\n\t */\n\tprivate getPanels(): BaseAppPanel[] {\n\t\tconst isPhone = this.getDeviceType() === DeviceType.Mobile;\n\t\treturn (isPhone ? this.getContent() : [this._getSelectedPanel()]) as BaseAppPanel[];\n\t}\n\n\t/**\n\t * Triggers navigation actions for the currently relevant panels.\n\t *\n\t * @private\n\t * @returns {void}\n\t */\n\n\tprivate showPersistedDialog(): void {\n\t\tconst selectedPanels = this.getPanels();\n\t\tfor (const selectedPanel of selectedPanels) {\n\t\t\tselectedPanel.firePersistDialog();\n\t\t}\n\t}\n\n\t/**\n\t * Set all panels dirty state to true, to refresh all panels\n\t * @private\n\t */\n\tprivate _setPanelsDirty(): void {\n\t\tconst panels = this.getContent() as BaseAppPanel[];\n\t\tfor (const panel of panels) {\n\t\t\tpanel.setDesktopViewDirty(true);\n\t\t\tpanel.setMobileViewDirty(true);\n\t\t}\n\t}\n\n\t/**\n\t * Generate placeholer for the panel.\n\t * @private\n\t * @param {BaseAppPanel} panel - Panel for which placeholders has to be generated.\n\t */\n\tprivate _generatePlaceholder(panel: BaseAppPanel): void {\n\t\tif (!panel.isLoaded()) {\n\t\t\tpanel.destroyAggregation(\"apps\", true);\n\t\t\tconst placeholderApps = panel.generateApps(\n\t\t\t\tnew Array(CONSTANTS.PLACEHOLDER_ITEMS_COUNT).fill({ status: \"Loading\" }) as ICustomVisualization[]\n\t\t\t);\n\t\t\tpanel.setApps(placeholderApps);\n\t\t\tthis._updatePanelContent(panel);\n\t\t}\n\t}\n\n\t/**\n\t * Loads and sets the apps.\n\t * @private\n\t * @param {BaseAppPanel} panel - Panel for which apps has to be loaded.\n\t * @returns {Promise<void>} resolves when apps are loaded.\n\t */\n\tprivate async _setApps(panel: BaseAppPanel): Promise<void> {\n\t\ttry {\n\t\t\t// only load the apps if panel is in dirty state\n\t\t\tif (panel.isDirty() && panel.isMobileDirty()) {\n\t\t\t\tthis._generatePlaceholder(panel);\n\t\t\t\tawait panel.loadApps?.();\n\t\t\t\tif (this.getDeviceType() === DeviceType.Mobile) {\n\t\t\t\t\tpanel.setMobileViewDirty(false);\n\t\t\t\t} else {\n\t\t\t\t\tpanel.setDesktopViewDirty(false);\n\t\t\t\t}\n\t\t\t\tpanel.setLoaded(true);\n\t\t\t\tthis._updatePanelContent(panel);\n\n\t\t\t\tif (panel instanceof BaseAppPersPanel) {\n\t\t\t\t\t// don't wait for personalization to complete\n\t\t\t\t\tvoid panel.applyPersonalization(true);\n\t\t\t\t}\n\t\t\t\tlet tiles: GenericTile[] = [];\n\t\t\t\tlet apps = panel.getApps();\n\t\t\t\ttiles = panel.fetchTileVisualization(tiles);\n\t\t\t\tthis.fireEvent(\"appsLoaded\", { apps, tiles });\n\t\t\t}\n\n\t\t\t// fire panel loaded event\n\t\t\tpanel.fireEvent(\"loaded\");\n\t\t} catch (error: unknown) {\n\t\t\tthis.showErrorCard(panel);\n\t\t\tLog.error(`Error setting apps for panel: ${panel.getTitle()}`, error instanceof Error ? error.message : String(error));\n\t\t}\n\t}\n\n\t/**\n\t * Updates the content of the panel by replacing existing items with new apps and groups.\n\t * This method selects the appropriate wrapper based on the device type, and add apps/group or mobile cards to the wrapper.\n\t *\n\t * @param {BaseAppPanel} panel - The panel whose content needs to be updated.\n\t * @returns {void}\n\t * @private\n\t */\n\tprivate _updatePanelContent(panel: BaseAppPanel): void {\n\t\tconst apps = panel.getApps() || [];\n\t\tconst groups = (panel.getAggregation(\"groups\") || []) as Group[];\n\t\tconst isPhone = this.getDeviceType() === DeviceType.Mobile;\n\t\tconst wrapper = isPhone ? panel._generateMobileAppsWrapper() : panel._generateAppsWrapper();\n\t\tconst aggregationName = isPhone ? \"content\" : \"items\";\n\t\twrapper.destroyAggregation(aggregationName);\n\t\tlet items = isPhone ? this._generateMobileCards([...groups, ...apps], panel.getId()) : this._generateTiles([...groups, ...apps]);\n\t\tthis._addWrapperContent(wrapper, items, aggregationName);\n\t\tthis._updatePanelContentVisibility(panel);\n\t}\n\n\t/**\n\t * Updates the visibility of the panel's content based on the current state and device type.\n\t * This method determines whether to display the apps or an error message based on the presence of apps and groups.\n\t * It also adjusts the visibility of different containers depending on whether the device is a phone or not.\n\t *\n\t * @param {BaseAppPanel} panel - The panel whose content visibility needs to be updated.\n\t * @returns {void}\n\t * @private\n\t */\n\tprivate _updatePanelContentVisibility(panel: BaseAppPanel): void {\n\t\tconst apps = panel.getApps() || [];\n\t\tconst groups = (panel.getAggregation(\"groups\") || []) as Group[];\n\t\tconst isPhone = this.getDeviceType() === DeviceType.Mobile;\n\t\tconst appsWrapper = panel._generateDesktopAppsWrapper();\n\t\tconst mobileAppsWrapper = panel._generateMobileAppsWrapper();\n\t\tconst errorCard = panel._generateErrorMessage();\n\t\tconst hasApps = [...apps, ...groups].length !== 0;\n\t\tappsWrapper.setVisible(hasApps && !isPhone);\n\t\tmobileAppsWrapper.setVisible(hasApps && isPhone);\n\t\t(mobileAppsWrapper.getParent() as VBox).setWidth(isPhone && hasApps ? \"100%\" : \"auto\");\n\t\terrorCard.setVisible(!hasApps);\n\t}\n\n\t/**\n\t * Generates generic tile based on app.\n\t * @private\n\t * @param {sap.cux.home.App} app - App.\n\t * @returns {sap.m.GenericTile}.\n\t */\n\tpublic _getAppTile(app: App): GenericTile {\n\t\tconst isPhone = this.getDeviceType() === DeviceType.Mobile;\n\t\tconst actions = (app.getAggregation(\"menuItems\") || []) as MenuItem[];\n\t\tconst tileId = isPhone ? `${app.getId()}-mobile-tile` : `${app.getId()}-tile`;\n\t\treturn new GenericTile(tileId, {\n\t\t\tscope: actions.length && !isPhone ? GenericTileScope.ActionMore : GenericTileScope.Display,\n\t\t\tstate: app.getStatus() as LoadState,\n\t\t\tmode: GenericTileMode.IconMode,\n\t\t\tsizeBehavior: TileSizeBehavior.Small,\n\t\t\theader: app.getTitle(),\n\t\t\tbackgroundColor: app.getBgColor() || getDefaultAppColor()?.key,\n\t\t\ttileIcon: app.getIcon(),\n\t\t\turl: getLeanURL(app.getUrl()),\n\t\t\tframeType: FrameType.TwoByHalf,\n\t\t\trenderOnThemeChange: true,\n\t\t\tdropAreaOffset: 4,\n\t\t\tsubheader: app.getSubTitle(),\n\t\t\tpress: (e) => app._onPress(e),\n\t\t\twidth: isPhone ? \"15rem\" : \"100%\"\n\t\t}).addStyleClass(\"tileLayout sapMGTTwoByHalf\");\n\t}\n\n\t/**\n\t * Generates generic tile based on group.\n\t * @private\n\t * @param {sap.cux.home.Group} group - Group.\n\t * @returns {sap.m.GenericTile}.\n\t */\n\tprivate _getGroupTile(group: Group): GenericTile {\n\t\tconst isPhone = this.getDeviceType() === DeviceType.Mobile;\n\t\tconst actions = (group.getAggregation(\"menuItems\") || []) as MenuItem[];\n\t\tconst tileId = isPhone ? `${group.getId()}-mobile-tile` : `${group.getId()}-tile`;\n\t\treturn new GenericTile(tileId, {\n\t\t\tscope: actions.length && !isPhone ? GenericTileScope.ActionMore : GenericTileScope.Display,\n\t\t\tstate: group.getStatus() as LoadState,\n\t\t\tmode: GenericTileMode.IconMode,\n\t\t\tsizeBehavior: TileSizeBehavior.Small,\n\t\t\theader: group.getTitle(),\n\t\t\tbackgroundColor: group.getBgColor() || getDefaultAppColor()?.key,\n\t\t\ttileIcon: group.getIcon(),\n\t\t\tframeType: FrameType.TwoByHalf,\n\t\t\trenderOnThemeChange: true,\n\t\t\tdropAreaOffset: 4,\n\t\t\ttileBadge: group.getNumber(),\n\t\t\tpress: (e) => group._onPress(e),\n\t\t\twidth: isPhone ? \"15rem\" : \"100%\"\n\t\t})\n\t\t\t.addStyleClass(\"tileLayout sapMGTTwoByHalf\")\n\t\t\t.data(\"groupId\", group.getGroupId()) as GenericTile;\n\t}\n\n\t/**\n\t * Overridden method for selection of panel in the IconTabBar.\n\t * Loads the apps in selected panel\n\t * @private\n\t * @returns {Promise<void>} resolves when apps are loaded on panel selection.\n\t */\n\tprotected async _onPanelSelect(event: IconTabBar$SelectEvent) {\n\t\tsuper._onPanelSelect(event);\n\t\tconst selectedPanel = this._getSelectedPanel() as BaseAppPanel;\n\t\tawait this._setApps(selectedPanel);\n\t}\n\n\t/**\n\t * Refresh apps for all the panels.\n\t * @private\n\t * @returns {Promise<void>} resolves when all panels are set to dirty and apps for current panel are refreshed.\n\t */\n\tpublic async _refreshAllPanels(): Promise<void> {\n\t\t//set all panels to dirty\n\t\tthis._setPanelsDirty();\n\t\t//set apps for current section\n\t\tawait this._setApps(this._getSelectedPanel() as BaseAppPanel);\n\t}\n\n\t/**\n\t * Refresh apps for selected panel.\n\t * @private\n\t * @param {BaseAppPanel} panel - Panel that has be refreshed.\n\t * @returns {Promise<void>} resolves when apps are refreshed.\n\t */\n\tpublic async refreshPanel(panel: BaseAppPanel): Promise<void> {\n\t\tpanel.setMobileViewDirty(true);\n\t\tpanel.setDesktopViewDirty(true);\n\t\tawait this._setApps(panel);\n\t}\n\n\t/**\n\t * Toggles the visibility of the tab view based on the supported panels.\n\t * @private\n\t */\n\tprivate _toggleTabView() {\n\t\tif (this.getDeviceType() !== DeviceType.Mobile) {\n\t\t\tconst panels = this.getContent() as BaseAppPanel[];\n\t\t\tconst supportedPanels = panels.filter((panel) => panel.isSupported());\n\t\t\tconst iconTabBarControl = this._getInnerControl() as IconTabBar;\n\t\t\ticonTabBarControl?.toggleStyleClass(\"sapUiITBHide\", supportedPanels.length === 1);\n\t\t}\n\t}\n\n\t/**\n\t * Handles the supported state of the current panel.\n\t * If the panel is supported, it adds the panel to the content.\n\t * If the panel is not supported, it removes the panel from the content.\n\t * @param {BaseAppPanel} currentPanel - The panel to handle the supported state for.\n\t * @private\n\t */\n\tprivate _onPanelSupported(currentPanel: BaseAppPanel, event: BaseAppPanel$SupportedEvent) {\n\t\tconst isSupported = event.getParameter(\"isSupported\") as boolean;\n\t\tcurrentPanel.setSupported(isSupported);\n\t\tthis._togglePanelVisibility(currentPanel, isSupported);\n\t\tthis._toggleTabView();\n\t}\n\n\t/**\n\t * Toggles the visibility of the panel.\n\t * @param {BaseAppPanel} panel - The panel to toggle the visibility for.\n\t * @param {boolean} isVisible - The visibility state of the panel.\n\t * @private\n\t */\n\tprivate _togglePanelVisibility(panel: BaseAppPanel, isVisible: boolean) {\n\t\tconst iconTabBar = this._getInnerControl() as IconTabBar;\n\t\tconst tabs = (iconTabBar?.getItems() as IconTabFilter[]) || [];\n\t\tconst selectedTab = tabs.find((tab) => tab.getKey() === panel.getKey());\n\t\tselectedTab?.setVisible(isVisible);\n\t}\n\n\t/**\n\t * Removes unsupported panels from the container.\n\t * @private\n\t */\n\tprivate _removeUnsupportedPanels() {\n\t\tconst panels = this.getContent() as BaseAppPanel[];\n\t\tconst unSupportedPanels = panels.filter((panel) => !panel.isSupported());\n\t\tfor (const panel of unSupportedPanels) {\n\t\t\tthis._togglePanelVisibility(panel, false);\n\t\t}\n\t\tthis._toggleTabView();\n\t}\n\n\t/**\n\t * Attaches an event handler to the \"supported\" event for each panel in the container.\n\t * @private\n\t */\n\tprivate _attachPanelSupportedEvent() {\n\t\tconst panels = this.getContent() as BaseAppPanel[];\n\t\tfor (const panel of panels) {\n\t\t\tif (!panel.hasListeners(\"supported\")) {\n\t\t\t\tpanel.attachSupported(this._onPanelSupported.bind(this, panel));\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Calls the enable function to activate the recommendation tab for `RecommendedAppPanel`, unless the device is a mobile phone.\n\t *\n\t * @private\n\t */\n\tprivate async _activateRecommendationTabPanel(): Promise<void> {\n\t\tconst panels = this.getContent() as BaseAppPanel[];\n\t\tconst isPhone = this.getDeviceType() === DeviceType.Mobile;\n\t\tconst recommendedPanel = panels ? panels.find((panel) => panel instanceof RecommendedAppPanel) : null;\n\t\tif (recommendedPanel instanceof RecommendedAppPanel && !isPhone) {\n\t\t\tawait recommendedPanel._enableRecommendationTab();\n\t\t} else {\n\t\t\trecommendedPanel?.setSupported(false);\n\t\t}\n\t}\n\n\tpublic setTileWidth(panel: BaseAppPanel): void {\n\t\tconst minWidth = CONSTANTS.MIN_TILE_WIDTH; // in px\n\t\tconst maxWidth = CONSTANTS.MAX_TILE_WIDTH; // in px\n\n\t\tconst wrapper = panel._generateAppsWrapper()?.getDomRef() as Element;\n\t\tif (!wrapper) return;\n\n\t\tconst domProperties = fetchElementProperties(wrapper, [\"width\", \"padding-left\", \"padding-right\", \"margin-left\", \"margin-right\"]);\n\t\tconst availableWidth = Object.values(domProperties)\n\t\t\t.slice(1)\n\t\t\t.reduce((width, propertyValue) => width - propertyValue, domProperties[\"width\"]);\n\n\t\tconst apps = panel.getApps() || [];\n\t\tconst groups = (panel.getAggregation(\"groups\") || []) as Group[];\n\t\tconst tileCount = apps.length + groups.length;\n\n\t\tif (tileCount === 0 || availableWidth <= 0) return;\n\n\t\tconst cardLayoutConfig = {\n\t\t\tcontainerWidth: availableWidth,\n\t\t\ttotalCards: tileCount,\n\t\t\tminWidth: minWidth,\n\t\t\tmaxWidth: maxWidth,\n\t\t\tgap: 8,\n\t\t\tskipDeviceCheck: true\n\t\t};\n\n\t\tconst clampedWidth = calculateCardWidth(cardLayoutConfig);\n\n\t\tpanel.setProperty(\"tileWidth\", clampedWidth);\n\t\tpanel\n\t\t\t._generateAppsWrapper()\n\t\t\t.getLayout()\n\t\t\t.setProperty(\"columnSize\", `${clampedWidth / 16}rem`);\n\t}\n\n\t/**\n\t * Adjusts the layout and visibility based on the device type.\n\t *\n\t * This method adjusts the layout type and visibility of containers based on whether the device is a phone\n\t * or not. It sets the container's layout property, toggles visibility of panels and their containers, and\n\t * adjusts background design accordingly.\n\t *\n\t * @private\n\t * @returns {void}\n\t */\n\tpublic adjustLayout(): void {\n\t\tconst isPhone = this.getDeviceType() === DeviceType.Mobile;\n\t\tconst selectedPanel = this._getSelectedPanel() as BaseAppPanel;\n\t\tthis.setTileWidth(selectedPanel);\n\n\t\t//hide actions if the device is a phone\n\t\tthis.toggleActionButtons(!isPhone);\n\n\t\tconst panels = this.getContent() as BaseAppPanel[];\n\t\tpanels.forEach((panel) => {\n\t\t\t//if both the panels are dirty, then updated data will be loaded from onBeforeRendering, as layout change will trigger re-rendering\n\t\t\t//if both the panels are not dirty, i.e. doen't have any changes, then just toggle the visibility\n\t\t\tif (!panel.isDirty() && !panel.isMobileDirty()) {\n\t\t\t\tthis._updatePanelContentVisibility(panel);\n\t\t\t} else if (panel.isDirty() !== panel.isMobileDirty()) {\n\t\t\t\t//if one of the panels is dirty i.e. have updated data and other is not, then re-create the inner controls\n\t\t\t\tif (isPhone) {\n\t\t\t\t\tpanel.setMobileViewDirty(false);\n\t\t\t\t} else {\n\t\t\t\t\tpanel.setDesktopViewDirty(false);\n\t\t\t\t}\n\t\t\t\tthis._updatePanelContent(panel);\n\t\t\t}\n\t\t});\n\n\t\t//this is to handle scenario when unsupported propert is changed and then layout is changed.\n\t\tthis._removeUnsupportedPanels();\n\t}\n\n\t/**\n\t * Generates mobile card panel and add given apps/groups in the panel.\n\t *\n\t * @private\n\t * @param {BaseApp[]} items - Apps/Groups for which card panels has to be generated.\n\t * @param {string} currentPanelId - ID of the current panel.\n\t * @returns {sap.m.Panel} The newly created mobile card panel.\n\t */\n\tprivate _generateMobileCards(items: BaseApp[], currentPanelId?: string): Panel[] {\n\t\tconst panels: Panel[] = [];\n\t\tfor (let i = 0; i < items.length; i += 7) {\n\t\t\tconst panelItems = items.slice(i, i + 7);\n\t\t\tconst panel = new Panel(`${currentPanelId}--${i}`, {\n\t\t\t\tbackgroundDesign: BackgroundDesign.Solid,\n\t\t\t\theight: \"23.5rem\",\n\t\t\t\twidth: \"17rem\",\n\t\t\t\tcontent: this._generateTiles(panelItems)\n\t\t\t}).addStyleClass(\"sapUiMobileAppsCard appPanelBorder myAppMFBContent\");\n\t\t\tpanels.push(panel);\n\t\t}\n\t\treturn panels;\n\t}\n\n\t/**\n\t * Generates group/app generic tiles for given apps/groups.\n\t *\n\t * @private\n\t * @param {BaseApp[]} items - Apps/Groups for which tiles has to be generated.\n\t * @returns {sap.m.GenericTile[]} The generated tiles.\n\t */\n\tprivate _generateTiles(items: BaseApp[]): GenericTile[] {\n\t\treturn items.map((item) => (item instanceof Group ? this._getGroupTile(item) : this._getAppTile(item as App)));\n\t}\n\n\t/**\n\t * Adds given items into the wrapper.\n\t * @param {HeaderContainer | GridContainer} wrapper - wrapper for which items has to be added.\n\t * @param {Panel[] | GenericTile[]} items - items to be added.\n\t * @param {string} aggregationName - aggregation name to which items has to be added.\n\t * @private\n\t */\n\tprivate _addWrapperContent(wrapper: HeaderContainer | GridContainer, items: Panel[] | GenericTile[], aggregationName: string) {\n\t\twrapper.destroyAggregation(aggregationName);\n\t\titems.forEach((item) => {\n\t\t\twrapper.addAggregation(aggregationName, item);\n\t\t});\n\t}\n\n\t/**\n\t * Displays an error card in the provided panel.\n\t *\n\t * @param panel - The panel in which the error card should be displayed.\n\t */\n\tprivate showErrorCard(panel: BaseAppPanel): void {\n\t\tconst errorCard = panel._generateErrorMessage();\n\t\tconst appsWrapper = panel._generateDesktopAppsWrapper();\n\t\tconst mobileAppsWrapper = panel._generateMobileAppsWrapper();\n\t\tappsWrapper?.setVisible(false);\n\t\tmobileAppsWrapper?.setVisible(false);\n\t\terrorCard?.setVisible(true);\n\t}\n\n\t/**\n\t * Retrieves the generic placeholder content for the Apps container.\n\t *\n\t * @returns {string} The HTML string representing the Apps container's placeholder content.\n\t */\n\tprotected getGenericPlaceholderContent(): string {\n\t\treturn getAppsPlaceholder();\n\t}\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AAHAA,GAAA,CAAAC,EAAA,CAAAC,MAAA,wUAAAC,GAAA,EAAAC,WAAA,EAAAC,KAAA,EAAAC,aAAA,EAAAC,QAAA,EAAAC,UAAA,EAAAC,QAAA,EAAAC,kBAAA,EAAAC,eAAA,EAAAC,OAAA,EAAAC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,WAAAA,mBAACR,OAAwC,EAAEI,KAA8B,EAAED,eAAuB,EAAE;MAC7HH,OAAO,CAACxB,kBAAkB,CAAC2B,eAAe,CAAC;MAC3CC,KAAK,CAAC2G,OAAO,CAAES,IAAI,IAAK;QACvBxH,OAAO,CAACyH,cAAc,CAACtH,eAAe,EAAEqH,IAAI,CAAC;MAC9C,CAAC,CAAC;IACH,CAAC;IAED;AACD;AACA;AACA;AACA;IACS5H,aAAa,WAAA8H,eAACvJ,KAAmB,EAAQ;MAChD,MAAM0C,SAAS,GAAG1C,KAAK,CAAC2C,qBAAqB,CAAC,CAAC;MAC/C,MAAMJ,WAAW,GAAGvC,KAAK,CAACwC,2BAA2B,CAAC,CAAC;MACvD,MAAMC,iBAAiB,GAAGzC,KAAK,CAAC8B,0BAA0B,CAAC,CAAC;MAC5DS,WAAW,EAAEO,UAAU,CAAC,KAAK,CAAC;MAC9BL,iBAAiB,EAAEK,UAAU,CAAC,KAAK,CAAC;MACpCJ,SAAS,EAAEI,UAAU,CAAC,IAAI,CAAC;IAC5B,CAAC;IAED;AACD;AACA;AACA;AACA;IACW0G,4BAA4B,WAAAC,8BAAA,EAAW;MAChD,OAAOxP,kBAAkB,CAAC,CAAC;IAC5B;EAAC;EAAA,OAvkBmBY,aAAa;AAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"AppsContainer.js","names":["sap","ui","define","Log","GenericTile","Panel","sap_m_library","EventBus","Parameters","S4MyHome","__BaseAppPersPanel","__BaseContainer","__Group","__RecommendedAppPanel","___utils_DataFormatUtils","___utils_Device","___utils_placeholder_AppsPlaceholder","_interopRequireDefault","obj","__esModule","default","_catch","body","recover","result","e","then","BackgroundDesign","FrameType","GenericTileMode","GenericTileScope","TileSizeBehavior","BaseAppPersPanel","BaseContainer","Group","RecommendedAppPanel","getLeanURL","calculateCardWidth","DeviceType","fetchElementProperties","getAppsPlaceholder","getDefaultAppColor","sLegendName","key","value","get","name","assigned","CONSTANTS","PLACEHOLDER_ITEMS_COUNT","MIN_TILE_WIDTH","MAX_TILE_WIDTH","AppsContainer","extend","metadata","events","appsLoaded","parameters","apps","type","tiles","renderer","apiVersion","constructor","_constructor","id","settings","BaseContainer.prototype.constructor.call","_isInitialRender","init","_init","BaseContainer.prototype.init.call","setProperty","_i18nBundle","getText","eventBus","getInstance","subscribe","channelId","eventId","data","showRecommendation","firstAppsPanel","getContent","getProperty","addStyleClass","addCustomSetting","_attachRouteChangeEvent","_currentDeviceType","getDeviceType","_this","handleRouteChange","event","show","getParameter","_temp2","_temp","_appSwitched","showPersistedDialog","Promise","resolve","load","_setPanelsDirty","reject","attachRouteMatched","error","warning","Error","message","String","onBeforeRendering","_onBeforeRendering","_attachPanelSupportedEvent","adjustLayout","BaseContainer.prototype.onBeforeRendering.call","_removeUnsupportedPanels","onAfterRendering","_onAfterRendering","_this2","BaseContainer.prototype.onAfterRendering.call","_activateRecommendationTabPanel","_load","_this3","selectedPanels","getPanels","all","map","selectedPanel","_setApps","_getPanels","isPhone","Mobile","_getSelectedPanel","_showPersistedDialog","firePersistDialog","panels","panel","setDesktopViewDirty","setMobileViewDirty","_generatePlaceholder","isLoaded","destroyAggregation","placeholderApps","generateApps","Array","fill","status","setApps","_updatePanelContent","_this4","_temp5","_temp4","fireEvent","_temp3","isDirty","isMobileDirty","loadApps","setLoaded","applyPersonalization","showErrorCard","getTitle","getApps","groups","getAggregation","wrapper","_generateMobileAppsWrapper","_generateAppsWrapper","aggregationName","items","_generateMobileCards","getId","_generateTiles","_addWrapperContent","_updatePanelContentVisibility","fetchTileVisualization","appsWrapper","_generateDesktopAppsWrapper","mobileAppsWrapper","errorCard","_generateErrorMessage","hasApps","length","setVisible","getParent","setWidth","_getAppTile","app","width","actions","tileId","scope","ActionMore","Display","state","getStatus","mode","IconMode","sizeBehavior","Small","header","backgroundColor","getBgColor","tileIcon","getIcon","url","getUrl","frameType","TwoByHalf","renderOnThemeChange","dropAreaOffset","subheader","getSubTitle","press","_onPress","_getGroupTile","group","tileBadge","getNumber","getGroupId","_onPanelSelect","_this5","BaseContainer.prototype._onPanelSelect.call","_refreshAllPanels","_this6","refreshPanel","_refreshPanel","_this7","_toggleTabView","supportedPanels","filter","isSupported","iconTabBarControl","_getInnerControl","toggleStyleClass","_onPanelSupported","currentPanel","setSupported","_togglePanelVisibility","isVisible","iconTabBar","tabs","getItems","selectedTab","find","tab","getKey","unSupportedPanels","hasListeners","attachSupported","bind","_this8","recommendedPanel","_temp6","_enableRecommendationTab","setTileWidth","_setTileWidth","minWidth","maxWidth","getDomRef","domProperties","availableWidth","Object","values","slice","reduce","propertyValue","tileCount","cardLayoutConfig","containerWidth","totalCards","gap","skipDeviceCheck","clampedWidth","getLayout","_adjustLayout","currentIsPhone","toggleActionButtons","forEach","currentPanelId","isSinglePanel","tileWidth","i","panelItems","backgroundDesign","Solid","height","content","push","item","addAggregation","_showErrorCard","getGenericPlaceholderContent","_getGenericPlaceholderContent"],"sources":["AppsContainer.ts"],"sourcesContent":["/*!\n * SAP UI development toolkit for HTML5 (SAPUI5)\n * * (c) Copyright 2009-2025 SAP SE. All rights reserved\n */\n\nimport Log from \"sap/base/Log\";\nimport GridContainer from \"sap/f/GridContainer\";\nimport GenericTile from \"sap/m/GenericTile\";\nimport HeaderContainer from \"sap/m/HeaderContainer\";\nimport IconTabBar, { IconTabBar$SelectEvent } from \"sap/m/IconTabBar\";\nimport IconTabFilter from \"sap/m/IconTabFilter\";\nimport Panel from \"sap/m/Panel\";\nimport VBox from \"sap/m/VBox\";\nimport { BackgroundDesign, FrameType, GenericTileMode, GenericTileScope, LoadState, TileSizeBehavior } from \"sap/m/library\";\nimport Event from \"sap/ui/base/Event\";\nimport type { MetadataOptions } from \"sap/ui/core/Element\";\nimport EventBus from \"sap/ui/core/EventBus\";\nimport Parameters from \"sap/ui/core/theming/Parameters\";\nimport S4MyHome from \"sap/ushell/api/S4MyHome\";\nimport App from \"./App\";\nimport { $AppsContainerSettings } from \"./AppsContainer\";\nimport BaseApp from \"./BaseApp\";\nimport BaseAppPanel, { BaseAppPanel$SupportedEvent } from \"./BaseAppPanel\";\nimport BaseAppPersPanel from \"./BaseAppPersPanel\";\nimport BaseContainer from \"./BaseContainer\";\nimport Group from \"./Group\";\nimport MenuItem from \"./MenuItem\";\nimport RecommendedAppPanel from \"./RecommendedAppPanel\";\nimport { ICustomVisualization } from \"./interface/AppsInterface\";\nimport { getLeanURL } from \"./utils/DataFormatUtils\";\nimport { calculateCardWidth, DeviceType, fetchElementProperties } from \"./utils/Device\";\nimport { getAppsPlaceholder } from \"./utils/placeholder/AppsPlaceholder\";\n\nconst getDefaultAppColor = () => {\n\tconst sLegendName = \"sapLegendColor9\";\n\treturn {\n\t\tkey: sLegendName,\n\t\tvalue: Parameters.get({\n\t\t\tname: sLegendName\n\t\t}),\n\t\tassigned: false\n\t};\n};\n\nconst CONSTANTS = {\n\tPLACEHOLDER_ITEMS_COUNT: 5,\n\tMIN_TILE_WIDTH: 304,\n\tMAX_TILE_WIDTH: 456\n};\n\n/**\n *\n * Container class for managing and storing apps.\n *\n * @extends BaseContainer\n *\n * @author SAP SE\n * @version 0.0.1\n * @since 1.121\n *\n * @private\n * @ui5-restricted ux.eng.s4producthomes1\n *\n * @alias sap.cux.home.AppsContainer\n */\nexport default class AppsContainer extends BaseContainer {\n\tprivate _isInitialRender = true;\n\tprivate _appSwitched!: boolean;\n\tprivate _currentDeviceType?: DeviceType;\n\tstatic readonly renderer = {\n\t\t...BaseContainer.renderer,\n\t\tapiVersion: 2\n\t};\n\tstatic readonly metadata: MetadataOptions = {\n\t\tevents: {\n\t\t\t/**\n\t\t\t * Event is fired when apps are loaded.\n\t\t\t */\n\t\t\tappsLoaded: {\n\t\t\t\tparameters: {\n\t\t\t\t\tapps: { type: \"sap.cux.home.App[]\" },\n\t\t\t\t\ttiles: { type: \"sap.m.GenericTile[]\" }\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n\n\tconstructor(idOrSettings?: string | $AppsContainerSettings);\n\tconstructor(id?: string, settings?: $AppsContainerSettings);\n\t/**\n\t * Constructor for a new app container.\n\t *\n\t * @param {string} [id] ID for the new control, generated automatically if an ID is not provided\n\t * @param {object} [settings] Initial settings for the new control\n\t */\n\tpublic constructor(id?: string, settings?: $AppsContainerSettings) {\n\t\tsuper(id, settings);\n\t}\n\n\t/**\n\t * Init lifecycle method\n\t *\n\t * @private\n\t * @override\n\t */\n\tpublic init(): void {\n\t\tsuper.init();\n\t\tthis.setProperty(\"title\", this._i18nBundle?.getText(\"appsTitle\"));\n\t\t// Subscribe to recommendation setting change event\n\t\tconst eventBus = EventBus.getInstance();\n\t\teventBus.subscribe(\"importChannel\", \"recommendationSettingChanged\", (channelId?: string, eventId?: string, data?: object) => {\n\t\t\tconst showRecommendation = (data as { showRecommendation: boolean }).showRecommendation;\n\t\t\tif (!showRecommendation) {\n\t\t\t\tconst firstAppsPanel = this.getContent()?.[0];\n\t\t\t\tthis.setProperty(\"selectedKey\", firstAppsPanel?.getProperty(\"key\"));\n\t\t\t}\n\t\t});\n\n\t\t// disable lazy load for apps container as it's the hero element\n\t\tthis.setProperty(\"enableLazyLoad\", false);\n\t\tthis.addStyleClass(\"sapCuxAppsContainer\");\n\t\tthis.addCustomSetting(\"text\", this._i18nBundle.getText(\"myAppMsg\") as string);\n\t\tthis._attachRouteChangeEvent();\n\t\tthis._currentDeviceType = this.getDeviceType();\n\t}\n\n\t/**\n\t * Attaches an event handler to monitor route changes and manage application state accordingly.\n\t * @private\n\t *\n\t * @returns {void}\n\t */\n\n\tprivate _attachRouteChangeEvent(): void {\n\t\tconst handleRouteChange = async (event: Event<{ isMyHomeRoute: boolean }>) => {\n\t\t\tconst show = event.getParameter(\"isMyHomeRoute\");\n\t\t\tif (show) {\n\t\t\t\tif (this._appSwitched) {\n\t\t\t\t\tthis._appSwitched = false;\n\t\t\t\t\tthis.showPersistedDialog();\n\t\t\t\t\tawait this.load();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthis._setPanelsDirty();\n\t\t\t\tthis._appSwitched = true;\n\t\t\t}\n\t\t};\n\n\t\ttry {\n\t\t\tS4MyHome.attachRouteMatched({}, handleRouteChange, this);\n\t\t} catch (error) {\n\t\t\tLog.warning(\"Unable to attach route change handler\", error instanceof Error ? error.message : String(error));\n\t\t}\n\t}\n\n\t/**\n\t * onBeforeRendering lifecycle method\n\t *\n\t * @private\n\t * @override\n\t */\n\tpublic onBeforeRendering() {\n\t\tif (this._isInitialRender) {\n\t\t\tthis._isInitialRender = false;\n\t\t\tthis._attachPanelSupportedEvent();\n\t\t}\n\n\t\tthis.adjustLayout();\n\t\tsuper.onBeforeRendering();\n\t\tthis._removeUnsupportedPanels();\n\t}\n\n\t/**\n\t * onAfterRendering lifecycle method\n\t *\n\t * @private\n\t * @override\n\t */\n\tpublic async onAfterRendering() {\n\t\tsuper.onAfterRendering();\n\t\t// activating the recommendation tab from appsContainer as personalization data in not available on init of panel.\n\t\tawait this._activateRecommendationTabPanel();\n\t}\n\n\t/**\n\t * Loads the AppsContainer section.\n\t * Overrides the load method of the BaseContainer.\n\t *\n\t * @private\n\t * @async\n\t * @override\n\t */\n\tpublic async load(): Promise<void> {\n\t\tconst selectedPanels = this.getPanels();\n\t\tawait Promise.all(selectedPanels.map((selectedPanel) => this._setApps(selectedPanel)));\n\t}\n\n\t/**\n\t * Retrieves the relevant panels based on the device type.\n\t *\n\t * @private\n\t * @returns {BaseAppPanel[]} An array of panels based on the device type.\n\t */\n\tprivate getPanels(): BaseAppPanel[] {\n\t\tconst isPhone = this.getDeviceType() === DeviceType.Mobile;\n\t\treturn (isPhone ? this.getContent() : [this._getSelectedPanel()]) as BaseAppPanel[];\n\t}\n\n\t/**\n\t * Triggers navigation actions for the currently relevant panels.\n\t *\n\t * @private\n\t * @returns {void}\n\t */\n\n\tprivate showPersistedDialog(): void {\n\t\tconst selectedPanels = this.getPanels();\n\t\tfor (const selectedPanel of selectedPanels) {\n\t\t\tselectedPanel.firePersistDialog();\n\t\t}\n\t}\n\n\t/**\n\t * Set all panels dirty state to true, to refresh all panels\n\t * @private\n\t */\n\tprivate _setPanelsDirty(): void {\n\t\tconst panels = this.getContent() as BaseAppPanel[];\n\t\tfor (const panel of panels) {\n\t\t\tpanel.setDesktopViewDirty(true);\n\t\t\tpanel.setMobileViewDirty(true);\n\t\t}\n\t}\n\n\t/**\n\t * Generate placeholer for the panel.\n\t * @private\n\t * @param {BaseAppPanel} panel - Panel for which placeholders has to be generated.\n\t */\n\tprivate _generatePlaceholder(panel: BaseAppPanel): void {\n\t\tif (!panel.isLoaded()) {\n\t\t\tpanel.destroyAggregation(\"apps\", true);\n\t\t\tconst placeholderApps = panel.generateApps(\n\t\t\t\tnew Array(CONSTANTS.PLACEHOLDER_ITEMS_COUNT).fill({ status: \"Loading\" }) as ICustomVisualization[]\n\t\t\t);\n\t\t\tpanel.setApps(placeholderApps);\n\t\t\tthis._updatePanelContent(panel);\n\t\t}\n\t}\n\n\t/**\n\t * Loads and sets the apps.\n\t * @private\n\t * @param {BaseAppPanel} panel - Panel for which apps has to be loaded.\n\t * @returns {Promise<void>} resolves when apps are loaded.\n\t */\n\tprivate async _setApps(panel: BaseAppPanel): Promise<void> {\n\t\ttry {\n\t\t\t// only load the apps if panel is in dirty state\n\t\t\tif (panel.isDirty() && panel.isMobileDirty()) {\n\t\t\t\tthis._generatePlaceholder(panel);\n\t\t\t\tawait panel.loadApps?.();\n\t\t\t\tif (this.getDeviceType() === DeviceType.Mobile) {\n\t\t\t\t\tpanel.setMobileViewDirty(false);\n\t\t\t\t} else {\n\t\t\t\t\tpanel.setDesktopViewDirty(false);\n\t\t\t\t}\n\t\t\t\tpanel.setLoaded(true);\n\t\t\t\tthis._updatePanelContent(panel);\n\n\t\t\t\tif (panel instanceof BaseAppPersPanel) {\n\t\t\t\t\t// don't wait for personalization to complete\n\t\t\t\t\tvoid panel.applyPersonalization(true);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// fire panel loaded event\n\t\t\tpanel.fireEvent(\"loaded\");\n\t\t} catch (error: unknown) {\n\t\t\tthis.showErrorCard(panel);\n\t\t\tLog.error(`Error setting apps for panel: ${panel.getTitle()}`, error instanceof Error ? error.message : String(error));\n\t\t}\n\t}\n\n\t/**\n\t * Updates the content of the panel by replacing existing items with new apps and groups.\n\t * This method selects the appropriate wrapper based on the device type, and add apps/group or mobile cards to the wrapper.\n\t *\n\t * @param {BaseAppPanel} panel - The panel whose content needs to be updated.\n\t * @returns {void}\n\t * @private\n\t */\n\tprivate _updatePanelContent(panel: BaseAppPanel): void {\n\t\tconst apps = panel.getApps() || [];\n\t\tconst groups = (panel.getAggregation(\"groups\") || []) as Group[];\n\t\tconst isPhone = this.getDeviceType() === DeviceType.Mobile;\n\t\tconst wrapper = isPhone ? panel._generateMobileAppsWrapper() : panel._generateAppsWrapper();\n\t\tconst aggregationName = isPhone ? \"content\" : \"items\";\n\t\twrapper.destroyAggregation(aggregationName);\n\t\tlet items = isPhone ? this._generateMobileCards([...groups, ...apps], panel.getId()) : this._generateTiles([...groups, ...apps]);\n\t\tthis._addWrapperContent(wrapper, items, aggregationName);\n\t\tthis._updatePanelContentVisibility(panel);\n\t\tif (panel.isLoaded()) {\n\t\t\tlet tiles: GenericTile[] = [];\n\t\t\ttiles = panel.fetchTileVisualization(tiles);\n\t\t\tthis.fireEvent(\"appsLoaded\", { apps, tiles });\n\t\t}\n\t}\n\n\t/**\n\t * Updates the visibility of the panel's content based on the current state and device type.\n\t * This method determines whether to display the apps or an error message based on the presence of apps and groups.\n\t * It also adjusts the visibility of different containers depending on whether the device is a phone or not.\n\t *\n\t * @param {BaseAppPanel} panel - The panel whose content visibility needs to be updated.\n\t * @returns {void}\n\t * @private\n\t */\n\tprivate _updatePanelContentVisibility(panel: BaseAppPanel): void {\n\t\tconst apps = panel.getApps() || [];\n\t\tconst groups = (panel.getAggregation(\"groups\") || []) as Group[];\n\t\tconst isPhone = this.getDeviceType() === DeviceType.Mobile;\n\t\tconst appsWrapper = panel._generateDesktopAppsWrapper();\n\t\tconst mobileAppsWrapper = panel._generateMobileAppsWrapper();\n\t\tconst errorCard = panel._generateErrorMessage();\n\t\tconst hasApps = [...apps, ...groups].length !== 0;\n\t\tappsWrapper.setVisible(hasApps && !isPhone);\n\t\tmobileAppsWrapper.setVisible(hasApps && isPhone);\n\t\t(mobileAppsWrapper.getParent() as VBox).setWidth(isPhone && hasApps ? \"100%\" : \"auto\");\n\t\terrorCard.setVisible(!hasApps);\n\t}\n\n\t/**\n\t * Generates generic tile based on app.\n\t * @private\n\t * @param {sap.cux.home.App} app - App.\n\t * @param {string} [width=\"100%\"] - Tile width (default \"100%\", pass \"15rem\" for fixed mobile layout).\n\t * @returns {sap.m.GenericTile}.\n\t */\n\tpublic _getAppTile(app: App, width: string = \"100%\"): GenericTile {\n\t\tconst isPhone = this.getDeviceType() === DeviceType.Mobile;\n\t\tconst actions = (app.getAggregation(\"menuItems\") || []) as MenuItem[];\n\t\tconst tileId = isPhone ? `${app.getId()}-mobile-tile` : `${app.getId()}-tile`;\n\t\treturn new GenericTile(tileId, {\n\t\t\tscope: actions.length && !isPhone ? GenericTileScope.ActionMore : GenericTileScope.Display,\n\t\t\tstate: app.getStatus() as LoadState,\n\t\t\tmode: GenericTileMode.IconMode,\n\t\t\tsizeBehavior: TileSizeBehavior.Small,\n\t\t\theader: app.getTitle(),\n\t\t\tbackgroundColor: app.getBgColor() || getDefaultAppColor()?.key,\n\t\t\ttileIcon: app.getIcon(),\n\t\t\turl: getLeanURL(app.getUrl()),\n\t\t\tframeType: FrameType.TwoByHalf,\n\t\t\trenderOnThemeChange: true,\n\t\t\tdropAreaOffset: 4,\n\t\t\tsubheader: app.getSubTitle(),\n\t\t\tpress: (e) => app._onPress(e),\n\t\t\twidth\n\t\t}).addStyleClass(\"tileLayout sapMGTTwoByHalf\");\n\t}\n\n\t/**\n\t * Generates generic tile based on group.\n\t * @private\n\t * @param {sap.cux.home.Group} group - Group.\n\t * @param {string} [width=\"100%\"] - Tile width (default \"100%\", pass \"15rem\" for fixed mobile layout).\n\t * @returns {sap.m.GenericTile}.\n\t */\n\tprivate _getGroupTile(group: Group, width: string = \"100%\"): GenericTile {\n\t\tconst isPhone = this.getDeviceType() === DeviceType.Mobile;\n\t\tconst actions = (group.getAggregation(\"menuItems\") || []) as MenuItem[];\n\t\tconst tileId = isPhone ? `${group.getId()}-mobile-tile` : `${group.getId()}-tile`;\n\t\treturn new GenericTile(tileId, {\n\t\t\tscope: actions.length && !isPhone ? GenericTileScope.ActionMore : GenericTileScope.Display,\n\t\t\tstate: group.getStatus() as LoadState,\n\t\t\tmode: GenericTileMode.IconMode,\n\t\t\tsizeBehavior: TileSizeBehavior.Small,\n\t\t\theader: group.getTitle(),\n\t\t\tbackgroundColor: group.getBgColor() || getDefaultAppColor()?.key,\n\t\t\ttileIcon: group.getIcon(),\n\t\t\tframeType: FrameType.TwoByHalf,\n\t\t\trenderOnThemeChange: true,\n\t\t\tdropAreaOffset: 4,\n\t\t\ttileBadge: group.getNumber(),\n\t\t\tpress: (e) => group._onPress(e),\n\t\t\twidth\n\t\t})\n\t\t\t.addStyleClass(\"tileLayout sapMGTTwoByHalf\")\n\t\t\t.data(\"groupId\", group.getGroupId()) as GenericTile;\n\t}\n\n\t/**\n\t * Overridden method for selection of panel in the IconTabBar.\n\t * Loads the apps in selected panel\n\t * @private\n\t * @returns {Promise<void>} resolves when apps are loaded on panel selection.\n\t */\n\tprotected async _onPanelSelect(event: IconTabBar$SelectEvent) {\n\t\tsuper._onPanelSelect(event);\n\t\tconst selectedPanel = this._getSelectedPanel() as BaseAppPanel;\n\t\tawait this._setApps(selectedPanel);\n\t}\n\n\t/**\n\t * Refresh apps for all the panels.\n\t * @private\n\t * @returns {Promise<void>} resolves when all panels are set to dirty and apps for current panel are refreshed.\n\t */\n\tpublic async _refreshAllPanels(): Promise<void> {\n\t\t//set all panels to dirty\n\t\tthis._setPanelsDirty();\n\t\t//set apps for current section\n\t\tawait this._setApps(this._getSelectedPanel() as BaseAppPanel);\n\t}\n\n\t/**\n\t * Refresh apps for selected panel.\n\t * @private\n\t * @param {BaseAppPanel} panel - Panel that has be refreshed.\n\t * @returns {Promise<void>} resolves when apps are refreshed.\n\t */\n\tpublic async refreshPanel(panel: BaseAppPanel): Promise<void> {\n\t\tpanel.setMobileViewDirty(true);\n\t\tpanel.setDesktopViewDirty(true);\n\t\tawait this._setApps(panel);\n\t}\n\n\t/**\n\t * Toggles the visibility of the tab view based on the supported panels.\n\t * @private\n\t */\n\tprivate _toggleTabView() {\n\t\tif (this.getDeviceType() !== DeviceType.Mobile) {\n\t\t\tconst panels = this.getContent() as BaseAppPanel[];\n\t\t\tconst supportedPanels = panels.filter((panel) => panel.isSupported());\n\t\t\tconst iconTabBarControl = this._getInnerControl() as IconTabBar;\n\t\t\ticonTabBarControl?.toggleStyleClass(\"sapUiITBHide\", supportedPanels.length === 1);\n\t\t}\n\t}\n\n\t/**\n\t * Handles the supported state of the current panel.\n\t * If the panel is supported, it adds the panel to the content.\n\t * If the panel is not supported, it removes the panel from the content.\n\t * @param {BaseAppPanel} currentPanel - The panel to handle the supported state for.\n\t * @private\n\t */\n\tprivate _onPanelSupported(currentPanel: BaseAppPanel, event: BaseAppPanel$SupportedEvent) {\n\t\tconst isSupported = event.getParameter(\"isSupported\") as boolean;\n\t\tcurrentPanel.setSupported(isSupported);\n\t\tthis._togglePanelVisibility(currentPanel, isSupported);\n\t\tthis._toggleTabView();\n\t}\n\n\t/**\n\t * Toggles the visibility of the panel.\n\t * @param {BaseAppPanel} panel - The panel to toggle the visibility for.\n\t * @param {boolean} isVisible - The visibility state of the panel.\n\t * @private\n\t */\n\tprivate _togglePanelVisibility(panel: BaseAppPanel, isVisible: boolean) {\n\t\tconst iconTabBar = this._getInnerControl() as IconTabBar;\n\t\tconst tabs = (iconTabBar?.getItems() as IconTabFilter[]) || [];\n\t\tconst selectedTab = tabs.find((tab) => tab.getKey() === panel.getKey());\n\t\tselectedTab?.setVisible(isVisible);\n\t}\n\n\t/**\n\t * Removes unsupported panels from the container.\n\t * @private\n\t */\n\tprivate _removeUnsupportedPanels() {\n\t\tconst panels = this.getContent() as BaseAppPanel[];\n\t\tconst unSupportedPanels = panels.filter((panel) => !panel.isSupported());\n\t\tfor (const panel of unSupportedPanels) {\n\t\t\tthis._togglePanelVisibility(panel, false);\n\t\t}\n\t\tthis._toggleTabView();\n\t}\n\n\t/**\n\t * Attaches an event handler to the \"supported\" event for each panel in the container.\n\t * @private\n\t */\n\tprivate _attachPanelSupportedEvent() {\n\t\tconst panels = this.getContent() as BaseAppPanel[];\n\t\tfor (const panel of panels) {\n\t\t\tif (!panel.hasListeners(\"supported\")) {\n\t\t\t\tpanel.attachSupported(this._onPanelSupported.bind(this, panel));\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Calls the enable function to activate the recommendation tab for `RecommendedAppPanel`, unless the device is a mobile phone.\n\t *\n\t * @private\n\t */\n\tprivate async _activateRecommendationTabPanel(): Promise<void> {\n\t\tconst panels = this.getContent() as BaseAppPanel[];\n\t\tconst isPhone = this.getDeviceType() === DeviceType.Mobile;\n\t\tconst recommendedPanel = panels ? panels.find((panel) => panel instanceof RecommendedAppPanel) : null;\n\t\tif (recommendedPanel instanceof RecommendedAppPanel && !isPhone) {\n\t\t\tawait recommendedPanel._enableRecommendationTab();\n\t\t} else {\n\t\t\trecommendedPanel?.setSupported(false);\n\t\t}\n\t}\n\n\tpublic setTileWidth(panel: BaseAppPanel): void {\n\t\tconst minWidth = CONSTANTS.MIN_TILE_WIDTH; // in px\n\t\tconst maxWidth = CONSTANTS.MAX_TILE_WIDTH; // in px\n\n\t\tconst wrapper = panel._generateAppsWrapper()?.getDomRef() as Element;\n\t\tif (!wrapper) return;\n\n\t\tconst domProperties = fetchElementProperties(wrapper, [\"width\", \"padding-left\", \"padding-right\", \"margin-left\", \"margin-right\"]);\n\t\tconst availableWidth = Object.values(domProperties)\n\t\t\t.slice(1)\n\t\t\t.reduce((width, propertyValue) => width - propertyValue, domProperties[\"width\"]);\n\n\t\tconst apps = panel.getApps() || [];\n\t\tconst groups = (panel.getAggregation(\"groups\") || []) as Group[];\n\t\tconst tileCount = apps.length + groups.length;\n\n\t\tif (tileCount === 0 || availableWidth <= 0) return;\n\n\t\tconst cardLayoutConfig = {\n\t\t\tcontainerWidth: availableWidth,\n\t\t\ttotalCards: tileCount,\n\t\t\tminWidth: minWidth,\n\t\t\tmaxWidth: maxWidth,\n\t\t\tgap: 8,\n\t\t\tskipDeviceCheck: true\n\t\t};\n\n\t\tconst clampedWidth = calculateCardWidth(cardLayoutConfig);\n\n\t\tpanel.setProperty(\"tileWidth\", clampedWidth);\n\t\tpanel\n\t\t\t._generateAppsWrapper()\n\t\t\t.getLayout()\n\t\t\t.setProperty(\"columnSize\", `${clampedWidth / 16}rem`);\n\t}\n\n\t/**\n\t * Adjusts the layout and visibility based on the device type.\n\t *\n\t * This method adjusts the layout type and visibility of containers based on whether the device is a phone\n\t * or not. It sets the container's layout property, toggles visibility of panels and their containers, and\n\t * adjusts background design accordingly.\n\t *\n\t * @private\n\t * @returns {void}\n\t */\n\tpublic adjustLayout(): void {\n\t\tconst isPhone = this.getDeviceType() === DeviceType.Mobile;\n\t\tconst currentIsPhone = this._currentDeviceType === DeviceType.Mobile;\n\t\tconst selectedPanel = this._getSelectedPanel() as BaseAppPanel;\n\t\tthis.setTileWidth(selectedPanel);\n\n\t\t// Only proceed if device type changed between mobile and non-mobile\n\t\tif (isPhone === currentIsPhone) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._currentDeviceType = this.getDeviceType();\n\n\t\t//hide actions if the device is a phone\n\t\tthis.toggleActionButtons(!isPhone);\n\n\t\tconst panels = this.getContent() as BaseAppPanel[];\n\t\tpanels.forEach((panel) => {\n\t\t\t//if both the panels are dirty, then updated data will be loaded from onBeforeRendering, as layout change will trigger re-rendering\n\t\t\t//if both the panels are not dirty, i.e. doen't have any changes, then just toggle the visibility\n\t\t\tif (!panel.isDirty() && !panel.isMobileDirty()) {\n\t\t\t\tthis._updatePanelContentVisibility(panel);\n\t\t\t} else if (panel.isDirty() !== panel.isMobileDirty()) {\n\t\t\t\t//if one of the panels is dirty i.e. have updated data and other is not, then re-create the inner controls\n\t\t\t\tif (isPhone) {\n\t\t\t\t\tpanel.setMobileViewDirty(false);\n\t\t\t\t} else {\n\t\t\t\t\tpanel.setDesktopViewDirty(false);\n\t\t\t\t}\n\t\t\t\tthis._updatePanelContent(panel);\n\t\t\t}\n\t\t});\n\n\t\t//this is to handle scenario when unsupported propert is changed and then layout is changed.\n\t\tthis._removeUnsupportedPanels();\n\t}\n\n\t/**\n\t * Generates mobile card panel and add given apps/groups in the panel.\n\t *\n\t * @private\n\t * @param {BaseApp[]} items - Apps/Groups for which card panels has to be generated.\n\t * @param {string} currentPanelId - ID of the current panel.\n\t * @returns {sap.m.Panel} The newly created mobile card panel.\n\t */\n\tprivate _generateMobileCards(items: BaseApp[], currentPanelId?: string): Panel[] {\n\t\tconst panels: Panel[] = [];\n\t\tconst isSinglePanel = items.length <= 7;\n\t\tconst tileWidth = isSinglePanel ? \"100%\" : \"15rem\";\n\t\tfor (let i = 0; i < items.length; i += 7) {\n\t\t\tconst panelItems = items.slice(i, i + 7);\n\t\t\tconst panel = new Panel(`${currentPanelId}--${i}`, {\n\t\t\t\tbackgroundDesign: BackgroundDesign.Solid,\n\t\t\t\theight: \"23.5rem\",\n\t\t\t\twidth: isSinglePanel ? \"100%\" : \"17rem\",\n\t\t\t\tcontent: this._generateTiles(panelItems, tileWidth)\n\t\t\t}).addStyleClass(`sapUiMobileAppsCard appPanelBorder myAppMFBContent ${isSinglePanel ? \"mobileAdaptiveWidth\" : \"\"}`);\n\t\t\tpanels.push(panel);\n\t\t}\n\t\treturn panels;\n\t}\n\n\t/**\n\t * Generates group/app generic tiles for given apps/groups.\n\t *\n\t * @private\n\t * @param {BaseApp[]} items - Apps/Groups for which tiles has to be generated.\n\t * @param {string} [width=\"100%\"] - Width of each generated tile.\n\t * @returns {sap.m.GenericTile[]} The generated tiles.\n\t */\n\tprivate _generateTiles(items: BaseApp[], width: string = \"100%\"): GenericTile[] {\n\t\treturn items.map((item) => (item instanceof Group ? this._getGroupTile(item, width) : this._getAppTile(item as App, width)));\n\t}\n\n\t/**\n\t * Adds given items into the wrapper.\n\t * @param {HeaderContainer | GridContainer} wrapper - wrapper for which items has to be added.\n\t * @param {Panel[] | GenericTile[]} items - items to be added.\n\t * @param {string} aggregationName - aggregation name to which items has to be added.\n\t * @private\n\t */\n\tprivate _addWrapperContent(wrapper: HeaderContainer | GridContainer, items: Panel[] | GenericTile[], aggregationName: string) {\n\t\twrapper.destroyAggregation(aggregationName);\n\t\titems.forEach((item) => {\n\t\t\twrapper.addAggregation(aggregationName, item);\n\t\t});\n\t}\n\n\t/**\n\t * Displays an error card in the provided panel.\n\t *\n\t * @param panel - The panel in which the error card should be displayed.\n\t */\n\tprivate showErrorCard(panel: BaseAppPanel): void {\n\t\tconst errorCard = panel._generateErrorMessage();\n\t\tconst appsWrapper = panel._generateDesktopAppsWrapper();\n\t\tconst mobileAppsWrapper = panel._generateMobileAppsWrapper();\n\t\tappsWrapper?.setVisible(false);\n\t\tmobileAppsWrapper?.setVisible(false);\n\t\terrorCard?.setVisible(true);\n\t}\n\n\t/**\n\t * Retrieves the generic placeholder content for the Apps container.\n\t *\n\t * @returns {string} The HTML string representing the Apps container's placeholder content.\n\t */\n\tprotected getGenericPlaceholderContent(): string {\n\t\treturn getAppsPlaceholder();\n\t}\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AAHAA,GAAA,CAAAC,EAAA,CAAAC,MAAA,wUAAAC,GAAA,EAAAC,WAAA,EAAAC,KAAA,EAAAC,aAAA,EAAAC,QAAA,EAAAC,UAAA,EAAAC,QAAA,EAAAC,kBAAA,EAAAC,eAAA,EAAAC,OAAA,EAAAC,qBAAA,EAAAC,wBAAA,EAAAC,eAAA,EAAAC,oCAAA;EAAA;;EAAA,SAAAC,uBAAAC,GAAA;IAAA,OAAAA,GAAA,IAAAA,G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|
66
66
|
export default class AppsContainer extends BaseContainer {
|
|
67
67
|
private _isInitialRender = true;
|
|
68
68
|
private _appSwitched!: boolean;
|
|
69
|
+
private _currentDeviceType?: DeviceType;
|
|
69
70
|
static readonly renderer = {
|
|
70
71
|
...BaseContainer.renderer,
|
|
71
72
|
apiVersion: 2
|
|
@@ -120,6 +121,7 @@ export default class AppsContainer extends BaseContainer {
|
|
|
120
121
|
this.addStyleClass("sapCuxAppsContainer");
|
|
121
122
|
this.addCustomSetting("text", this._i18nBundle.getText("myAppMsg") as string);
|
|
122
123
|
this._attachRouteChangeEvent();
|
|
124
|
+
this._currentDeviceType = this.getDeviceType();
|
|
123
125
|
}
|
|
124
126
|
|
|
125
127
|
/**
|
|
@@ -270,10 +272,6 @@ export default class AppsContainer extends BaseContainer {
|
|
|
270
272
|
// don't wait for personalization to complete
|
|
271
273
|
void panel.applyPersonalization(true);
|
|
272
274
|
}
|
|
273
|
-
let tiles: GenericTile[] = [];
|
|
274
|
-
let apps = panel.getApps();
|
|
275
|
-
tiles = panel.fetchTileVisualization(tiles);
|
|
276
|
-
this.fireEvent("appsLoaded", { apps, tiles });
|
|
277
275
|
}
|
|
278
276
|
|
|
279
277
|
// fire panel loaded event
|
|
@@ -302,6 +300,11 @@ export default class AppsContainer extends BaseContainer {
|
|
|
302
300
|
let items = isPhone ? this._generateMobileCards([...groups, ...apps], panel.getId()) : this._generateTiles([...groups, ...apps]);
|
|
303
301
|
this._addWrapperContent(wrapper, items, aggregationName);
|
|
304
302
|
this._updatePanelContentVisibility(panel);
|
|
303
|
+
if (panel.isLoaded()) {
|
|
304
|
+
let tiles: GenericTile[] = [];
|
|
305
|
+
tiles = panel.fetchTileVisualization(tiles);
|
|
306
|
+
this.fireEvent("appsLoaded", { apps, tiles });
|
|
307
|
+
}
|
|
305
308
|
}
|
|
306
309
|
|
|
307
310
|
/**
|
|
@@ -331,9 +334,10 @@ export default class AppsContainer extends BaseContainer {
|
|
|
331
334
|
* Generates generic tile based on app.
|
|
332
335
|
* @private
|
|
333
336
|
* @param {sap.cux.home.App} app - App.
|
|
337
|
+
* @param {string} [width="100%"] - Tile width (default "100%", pass "15rem" for fixed mobile layout).
|
|
334
338
|
* @returns {sap.m.GenericTile}.
|
|
335
339
|
*/
|
|
336
|
-
public _getAppTile(app: App): GenericTile {
|
|
340
|
+
public _getAppTile(app: App, width: string = "100%"): GenericTile {
|
|
337
341
|
const isPhone = this.getDeviceType() === DeviceType.Mobile;
|
|
338
342
|
const actions = (app.getAggregation("menuItems") || []) as MenuItem[];
|
|
339
343
|
const tileId = isPhone ? `${app.getId()}-mobile-tile` : `${app.getId()}-tile`;
|
|
@@ -351,7 +355,7 @@ export default class AppsContainer extends BaseContainer {
|
|
|
351
355
|
dropAreaOffset: 4,
|
|
352
356
|
subheader: app.getSubTitle(),
|
|
353
357
|
press: (e) => app._onPress(e),
|
|
354
|
-
width
|
|
358
|
+
width
|
|
355
359
|
}).addStyleClass("tileLayout sapMGTTwoByHalf");
|
|
356
360
|
}
|
|
357
361
|
|
|
@@ -359,9 +363,10 @@ export default class AppsContainer extends BaseContainer {
|
|
|
359
363
|
* Generates generic tile based on group.
|
|
360
364
|
* @private
|
|
361
365
|
* @param {sap.cux.home.Group} group - Group.
|
|
366
|
+
* @param {string} [width="100%"] - Tile width (default "100%", pass "15rem" for fixed mobile layout).
|
|
362
367
|
* @returns {sap.m.GenericTile}.
|
|
363
368
|
*/
|
|
364
|
-
private _getGroupTile(group: Group): GenericTile {
|
|
369
|
+
private _getGroupTile(group: Group, width: string = "100%"): GenericTile {
|
|
365
370
|
const isPhone = this.getDeviceType() === DeviceType.Mobile;
|
|
366
371
|
const actions = (group.getAggregation("menuItems") || []) as MenuItem[];
|
|
367
372
|
const tileId = isPhone ? `${group.getId()}-mobile-tile` : `${group.getId()}-tile`;
|
|
@@ -378,7 +383,7 @@ export default class AppsContainer extends BaseContainer {
|
|
|
378
383
|
dropAreaOffset: 4,
|
|
379
384
|
tileBadge: group.getNumber(),
|
|
380
385
|
press: (e) => group._onPress(e),
|
|
381
|
-
width
|
|
386
|
+
width
|
|
382
387
|
})
|
|
383
388
|
.addStyleClass("tileLayout sapMGTTwoByHalf")
|
|
384
389
|
.data("groupId", group.getGroupId()) as GenericTile;
|
|
@@ -550,9 +555,17 @@ export default class AppsContainer extends BaseContainer {
|
|
|
550
555
|
*/
|
|
551
556
|
public adjustLayout(): void {
|
|
552
557
|
const isPhone = this.getDeviceType() === DeviceType.Mobile;
|
|
558
|
+
const currentIsPhone = this._currentDeviceType === DeviceType.Mobile;
|
|
553
559
|
const selectedPanel = this._getSelectedPanel() as BaseAppPanel;
|
|
554
560
|
this.setTileWidth(selectedPanel);
|
|
555
561
|
|
|
562
|
+
// Only proceed if device type changed between mobile and non-mobile
|
|
563
|
+
if (isPhone === currentIsPhone) {
|
|
564
|
+
return;
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
this._currentDeviceType = this.getDeviceType();
|
|
568
|
+
|
|
556
569
|
//hide actions if the device is a phone
|
|
557
570
|
this.toggleActionButtons(!isPhone);
|
|
558
571
|
|
|
@@ -587,14 +600,16 @@ export default class AppsContainer extends BaseContainer {
|
|
|
587
600
|
*/
|
|
588
601
|
private _generateMobileCards(items: BaseApp[], currentPanelId?: string): Panel[] {
|
|
589
602
|
const panels: Panel[] = [];
|
|
603
|
+
const isSinglePanel = items.length <= 7;
|
|
604
|
+
const tileWidth = isSinglePanel ? "100%" : "15rem";
|
|
590
605
|
for (let i = 0; i < items.length; i += 7) {
|
|
591
606
|
const panelItems = items.slice(i, i + 7);
|
|
592
607
|
const panel = new Panel(`${currentPanelId}--${i}`, {
|
|
593
608
|
backgroundDesign: BackgroundDesign.Solid,
|
|
594
609
|
height: "23.5rem",
|
|
595
|
-
width: "17rem",
|
|
596
|
-
content: this._generateTiles(panelItems)
|
|
597
|
-
}).addStyleClass(
|
|
610
|
+
width: isSinglePanel ? "100%" : "17rem",
|
|
611
|
+
content: this._generateTiles(panelItems, tileWidth)
|
|
612
|
+
}).addStyleClass(`sapUiMobileAppsCard appPanelBorder myAppMFBContent ${isSinglePanel ? "mobileAdaptiveWidth" : ""}`);
|
|
598
613
|
panels.push(panel);
|
|
599
614
|
}
|
|
600
615
|
return panels;
|
|
@@ -605,10 +620,11 @@ export default class AppsContainer extends BaseContainer {
|
|
|
605
620
|
*
|
|
606
621
|
* @private
|
|
607
622
|
* @param {BaseApp[]} items - Apps/Groups for which tiles has to be generated.
|
|
623
|
+
* @param {string} [width="100%"] - Width of each generated tile.
|
|
608
624
|
* @returns {sap.m.GenericTile[]} The generated tiles.
|
|
609
625
|
*/
|
|
610
|
-
private _generateTiles(items: BaseApp[]): GenericTile[] {
|
|
611
|
-
return items.map((item) => (item instanceof Group ? this._getGroupTile(item) : this._getAppTile(item as App)));
|
|
626
|
+
private _generateTiles(items: BaseApp[], width: string = "100%"): GenericTile[] {
|
|
627
|
+
return items.map((item) => (item instanceof Group ? this._getGroupTile(item, width) : this._getAppTile(item as App, width)));
|
|
612
628
|
}
|
|
613
629
|
|
|
614
630
|
/**
|
|
@@ -14,7 +14,7 @@ declare module "sap/cux/home/BaseAppPanel" {
|
|
|
14
14
|
import BasePanel from "sap/cux/home/BasePanel";
|
|
15
15
|
import Group from "sap/cux/home/Group";
|
|
16
16
|
import MenuItem from "sap/cux/home/MenuItem";
|
|
17
|
-
import { IActivity, ICustomVisualization } from "sap/cux/home/interface/AppsInterface";
|
|
17
|
+
import { IActivity, IAdditionalInfo, ICustomVisualization } from "sap/cux/home/interface/AppsInterface";
|
|
18
18
|
import AppManager from "sap/cux/home/utils/AppManager";
|
|
19
19
|
/**
|
|
20
20
|
*
|
|
@@ -47,6 +47,7 @@ declare module "sap/cux/home/BaseAppPanel" {
|
|
|
47
47
|
protected _menuItems: MenuItem[];
|
|
48
48
|
protected _actionButtons: Button[];
|
|
49
49
|
protected _controlMap: Map<string, Control | UI5Element>;
|
|
50
|
+
protected additionalInfo: IAdditionalInfo;
|
|
50
51
|
constructor(idOrSettings?: string | $BaseAppPanelSettings);
|
|
51
52
|
constructor(id?: string, settings?: $BaseAppPanelSettings);
|
|
52
53
|
static readonly metadata: MetadataOptions;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseAppPanel.d.ts","sourceRoot":"../../../../..","sources":["src/sap/cux/home/BaseAppPanel.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,2BAA2B,CAAC;IAO3C,OAAO,aAAa,MAAM,qBAAqB,CAAC;IAEhD,OAAO,MAAM,MAAM,cAAc,CAAC;IAClC,OAAO,WAAW,MAAM,mBAAmB,CAAC;IAC5C,OAAO,eAAe,MAAM,uBAAuB,CAAC;IACpD,OAAO,kBAAkB,MAAM,0BAA0B,CAAC;IAI1D,OAAO,IAAI,MAAM,YAAY,CAAC;IAE9B,OAAO,KAAK,MAAM,mBAAmB,CAAC;IACtC,OAAO,OAAO,MAAM,qBAAqB,CAAC;IAC1C,OAAO,KAAK,UAAU,MAAM,qBAAqB,CAAC;IAClD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;IAI3D,OAAO,GAAG,MAAM,kBAAkB,CAAC;IAEnC,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;IAClE,OAAO,SAAS,MAAM,wBAAwB,CAAC;IAC/C,OAAO,KAAK,MAAM,oBAAoB,CAAC;IACvC,OAAO,QAAQ,MAAM,uBAAuB,CAAC;IAC7C,OAAO,EAAE,SAAS,EAAE,oBAAoB,EAAkB,MAAM,sCAAsC,CAAC;
|
|
1
|
+
{"version":3,"file":"BaseAppPanel.d.ts","sourceRoot":"../../../../..","sources":["src/sap/cux/home/BaseAppPanel.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,2BAA2B,CAAC;IAO3C,OAAO,aAAa,MAAM,qBAAqB,CAAC;IAEhD,OAAO,MAAM,MAAM,cAAc,CAAC;IAClC,OAAO,WAAW,MAAM,mBAAmB,CAAC;IAC5C,OAAO,eAAe,MAAM,uB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OG;QACH,OAAO,CAAC,uBAAuB;QAkB/B;;;;WAIG;kBACa,kBAAkB,CAAC,KAAK,EAAE,KAAK;QAoB/C;;;;WAIG;QACI,QAAQ,IAAI,OAAO;QAI1B;;;;WAIG;QACI,SAAS,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI;QAIpC;;;;WAIG;QACI,OAAO,IAAI,OAAO;QAIzB;;;;WAIG;QACI,mBAAmB,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI;QAI9C;;;;WAIG;QACI,aAAa,IAAI,OAAO;QAI/B;;;;WAIG;QACI,kBAAkB,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI;QAI7C;;;;;;WAMG;QACI,eAAe,GAAa,SAAS,OAAO,GAAG,KAAK,EAAE,QAAO,OAAO,EAAE,GAAG,GAAG,EAAO,EAAE,wBAAyB,UAInH;QAEF;;;;WAIG;QACH,SAAS,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO;QAKjC;;;;;WAKG;QACH,SAAS,CAAC,SAAS,CAAC,OAAO,EAAE,MAAM;QAKnC;;;;WAIG;QACI,WAAW;QAIlB;;;;WAIG;QACI,YAAY,CAAC,WAAW,EAAE,OAAO;QAIxC;;;;;WAKG;QACH,SAAS,CAAC,2BAA2B;QASrC;;;WAGG;kBACa,OAAO;QAIvB;;;;WAIG;QACH,SAAS,CAAC,0BAA0B;QAWpC;;;;;WAKG;QACH,SAAS,CAAC,wBAAwB,CAAC,IAAI,EAAE,GAAG,GAAG,KAAK,EAAE,KAAK,EAAE,MAAM;QASnE;;;;;WAKG;QACI,IAAI;KAKX;CAEA"}
|
|
@@ -198,7 +198,7 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
198
198
|
height: "23.5rem",
|
|
199
199
|
content: [],
|
|
200
200
|
visible: this.getDeviceType() === DeviceType.Mobile
|
|
201
|
-
}).addStyleClass("sapUiMargin-26Bottom");
|
|
201
|
+
}).addStyleClass("sapUiMargin-26Bottom sapCuxAppsMobileCardsContainer");
|
|
202
202
|
}
|
|
203
203
|
return this._mobileAppsWrapper;
|
|
204
204
|
},
|
|
@@ -242,6 +242,7 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
|
|
|
242
242
|
if (visualizationData.oldAppId) {
|
|
243
243
|
app.data("oldAppId", visualizationData.oldAppId);
|
|
244
244
|
}
|
|
245
|
+
app.data("additionalInfo", this.additionalInfo);
|
|
245
246
|
visualizationData.menuItems?.forEach(menuItem => {
|
|
246
247
|
app.addAggregation("menuItems", menuItem, true);
|
|
247
248
|
});
|