@sapui5/sap.cux.home 1.140.0 → 1.142.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/sap/cux/home/.library +1 -1
- package/src/sap/cux/home/AdvancedSettingsPanel.d.ts.map +1 -1
- package/src/sap/cux/home/AdvancedSettingsPanel.js +3 -1
- package/src/sap/cux/home/AdvancedSettingsPanel.js.map +1 -1
- package/src/sap/cux/home/AdvancedSettingsPanel.ts +3 -1
- package/src/sap/cux/home/App.d.ts.map +1 -1
- package/src/sap/cux/home/App.js +6 -1
- package/src/sap/cux/home/App.js.map +1 -1
- package/src/sap/cux/home/App.ts +7 -1
- package/src/sap/cux/home/AppsAdditionPanel.d.ts +1 -0
- package/src/sap/cux/home/AppsAdditionPanel.d.ts.map +1 -1
- package/src/sap/cux/home/AppsAdditionPanel.js +64 -59
- package/src/sap/cux/home/AppsAdditionPanel.js.map +1 -1
- package/src/sap/cux/home/AppsAdditionPanel.ts +44 -34
- package/src/sap/cux/home/AppsContainer.d.ts +5 -1
- package/src/sap/cux/home/AppsContainer.d.ts.map +1 -1
- package/src/sap/cux/home/AppsContainer.js +44 -37
- package/src/sap/cux/home/AppsContainer.js.map +1 -1
- package/src/sap/cux/home/AppsContainer.ts +43 -33
- package/src/sap/cux/home/BaseAppPanel.d.ts +2 -1
- package/src/sap/cux/home/BaseAppPanel.d.ts.map +1 -1
- package/src/sap/cux/home/BaseAppPanel.js +3 -1
- package/src/sap/cux/home/BaseAppPanel.js.map +1 -1
- package/src/sap/cux/home/BaseAppPanel.ts +5 -2
- package/src/sap/cux/home/BaseContainer.d.ts +8 -0
- package/src/sap/cux/home/BaseContainer.d.ts.map +1 -1
- package/src/sap/cux/home/BaseContainer.js +26 -4
- package/src/sap/cux/home/BaseContainer.js.map +1 -1
- package/src/sap/cux/home/BaseContainer.ts +26 -3
- package/src/sap/cux/home/BaseContainerRenderer.d.ts.map +1 -1
- package/src/sap/cux/home/BaseContainerRenderer.js.map +1 -1
- package/src/sap/cux/home/BaseContainerRenderer.ts +1 -1
- package/src/sap/cux/home/BaseNewsPanel.js +1 -1
- package/src/sap/cux/home/BaseNewsPanel.js.map +1 -1
- package/src/sap/cux/home/BaseNewsPanel.ts +2 -2
- package/src/sap/cux/home/BasePanel.d.ts +7 -0
- package/src/sap/cux/home/BasePanel.d.ts.map +1 -1
- package/src/sap/cux/home/BasePanel.js +20 -0
- package/src/sap/cux/home/BasePanel.js.map +1 -1
- package/src/sap/cux/home/BasePanel.ts +16 -0
- package/src/sap/cux/home/BaseSettingsPanel.d.ts +9 -0
- package/src/sap/cux/home/BaseSettingsPanel.d.ts.map +1 -1
- package/src/sap/cux/home/BaseSettingsPanel.js +13 -0
- package/src/sap/cux/home/BaseSettingsPanel.js.map +1 -1
- package/src/sap/cux/home/BaseSettingsPanel.ts +15 -0
- package/src/sap/cux/home/CardsPanel.d.ts +7 -0
- package/src/sap/cux/home/CardsPanel.d.ts.map +1 -1
- package/src/sap/cux/home/CardsPanel.js +132 -113
- package/src/sap/cux/home/CardsPanel.js.map +1 -1
- package/src/sap/cux/home/CardsPanel.ts +19 -8
- package/src/sap/cux/home/ContentAdditionDialog.d.ts.map +1 -1
- package/src/sap/cux/home/ContentAdditionDialog.js +6 -2
- package/src/sap/cux/home/ContentAdditionDialog.js.map +1 -1
- package/src/sap/cux/home/ContentAdditionDialog.ts +5 -1
- package/src/sap/cux/home/ErrorPanel.js +2 -2
- package/src/sap/cux/home/ErrorPanel.js.map +1 -1
- package/src/sap/cux/home/ErrorPanel.ts +2 -2
- package/src/sap/cux/home/FavAppPanel.d.ts +4 -10
- package/src/sap/cux/home/FavAppPanel.d.ts.map +1 -1
- package/src/sap/cux/home/FavAppPanel.js +432 -446
- package/src/sap/cux/home/FavAppPanel.js.map +1 -1
- package/src/sap/cux/home/FavAppPanel.ts +56 -84
- package/src/sap/cux/home/FrequentAppPanel.d.ts.map +1 -1
- package/src/sap/cux/home/FrequentAppPanel.js +5 -1
- package/src/sap/cux/home/FrequentAppPanel.js.map +1 -1
- package/src/sap/cux/home/FrequentAppPanel.ts +4 -0
- package/src/sap/cux/home/InsightsAdditionPanel.d.ts.map +1 -1
- package/src/sap/cux/home/InsightsAdditionPanel.js +3 -1
- package/src/sap/cux/home/InsightsAdditionPanel.js.map +1 -1
- package/src/sap/cux/home/InsightsAdditionPanel.ts +2 -0
- package/src/sap/cux/home/InsightsContainer.d.ts.map +1 -1
- package/src/sap/cux/home/InsightsContainer.js +2 -2
- package/src/sap/cux/home/InsightsContainer.js.map +1 -1
- package/src/sap/cux/home/InsightsContainer.ts +1 -1
- package/src/sap/cux/home/NewsAndPagesContainer.d.ts +0 -4
- package/src/sap/cux/home/NewsAndPagesContainer.d.ts.map +1 -1
- package/src/sap/cux/home/NewsAndPagesContainer.js +2 -2
- package/src/sap/cux/home/NewsAndPagesContainer.js.map +1 -1
- package/src/sap/cux/home/NewsAndPagesContainer.ts +4 -4
- package/src/sap/cux/home/NewsPanel.d.ts +17 -0
- package/src/sap/cux/home/NewsPanel.d.ts.map +1 -1
- package/src/sap/cux/home/NewsPanel.js +100 -68
- package/src/sap/cux/home/NewsPanel.js.map +1 -1
- package/src/sap/cux/home/NewsPanel.ts +60 -33
- package/src/sap/cux/home/NewsSettingsPanel.d.ts +42 -6
- package/src/sap/cux/home/NewsSettingsPanel.d.ts.map +1 -1
- package/src/sap/cux/home/NewsSettingsPanel.js +219 -81
- package/src/sap/cux/home/NewsSettingsPanel.js.map +1 -1
- package/src/sap/cux/home/NewsSettingsPanel.ts +215 -80
- package/src/sap/cux/home/Page.d.ts.map +1 -1
- package/src/sap/cux/home/Page.js +4 -1
- package/src/sap/cux/home/Page.js.map +1 -1
- package/src/sap/cux/home/Page.ts +2 -0
- package/src/sap/cux/home/PagePanel.d.ts.map +1 -1
- package/src/sap/cux/home/PagePanel.js +5 -2
- package/src/sap/cux/home/PagePanel.js.map +1 -1
- package/src/sap/cux/home/PagePanel.ts +8 -8
- package/src/sap/cux/home/PageSettingsPanel.d.ts.map +1 -1
- package/src/sap/cux/home/PageSettingsPanel.js +6 -3
- package/src/sap/cux/home/PageSettingsPanel.js.map +1 -1
- package/src/sap/cux/home/PageSettingsPanel.ts +2 -2
- package/src/sap/cux/home/RecentAppPanel.d.ts.map +1 -1
- package/src/sap/cux/home/RecentAppPanel.js +6 -0
- package/src/sap/cux/home/RecentAppPanel.js.map +1 -1
- package/src/sap/cux/home/RecentAppPanel.ts +5 -1
- package/src/sap/cux/home/RecommendedAppPanel.d.ts.map +1 -1
- package/src/sap/cux/home/RecommendedAppPanel.js +7 -0
- package/src/sap/cux/home/RecommendedAppPanel.js.map +1 -1
- package/src/sap/cux/home/RecommendedAppPanel.ts +6 -1
- package/src/sap/cux/home/SettingsDialog.d.ts +1 -0
- package/src/sap/cux/home/SettingsDialog.d.ts.map +1 -1
- package/src/sap/cux/home/SettingsDialog.js +13 -6
- package/src/sap/cux/home/SettingsDialog.js.map +1 -1
- package/src/sap/cux/home/SettingsDialog.ts +14 -6
- package/src/sap/cux/home/SideBySideIconTabFilter.d.ts +10 -0
- package/src/sap/cux/home/SideBySideIconTabFilter.d.ts.map +1 -1
- package/src/sap/cux/home/SideBySideIconTabFilter.js +12 -1
- package/src/sap/cux/home/SideBySideIconTabFilter.js.map +1 -1
- package/src/sap/cux/home/SideBySideIconTabFilter.ts +13 -1
- package/src/sap/cux/home/SituationPanel.d.ts.map +1 -1
- package/src/sap/cux/home/SituationPanel.js +7 -2
- package/src/sap/cux/home/SituationPanel.js.map +1 -1
- package/src/sap/cux/home/SituationPanel.ts +2 -0
- package/src/sap/cux/home/SpaceInsightsPanel.js +1 -1
- package/src/sap/cux/home/SpaceInsightsPanel.js.map +1 -1
- package/src/sap/cux/home/SpaceInsightsPanel.ts +1 -1
- package/src/sap/cux/home/TaskPanel.d.ts.map +1 -1
- package/src/sap/cux/home/TaskPanel.js +3 -0
- package/src/sap/cux/home/TaskPanel.js.map +1 -1
- package/src/sap/cux/home/TaskPanel.ts +2 -1
- package/src/sap/cux/home/TilesPanel.d.ts.map +1 -1
- package/src/sap/cux/home/TilesPanel.js +10 -3
- package/src/sap/cux/home/TilesPanel.js.map +1 -1
- package/src/sap/cux/home/TilesPanel.ts +7 -3
- package/src/sap/cux/home/ToDoPanel.d.ts.map +1 -1
- package/src/sap/cux/home/ToDoPanel.js +29 -8
- package/src/sap/cux/home/ToDoPanel.js.map +1 -1
- package/src/sap/cux/home/ToDoPanel.ts +19 -8
- package/src/sap/cux/home/ToDosContainer.js +3 -3
- package/src/sap/cux/home/ToDosContainer.js.map +1 -1
- package/src/sap/cux/home/ToDosContainer.ts +1 -1
- package/src/sap/cux/home/i18n/messagebundle.properties +13 -7
- package/src/sap/cux/home/i18n/messagebundle_ar.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_bg.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_ca.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_cnr.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_cs.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_cy.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_da.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_de.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_el.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_en.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_en_GB.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_en_US_sappsd.properties +1 -3
- package/src/sap/cux/home/i18n/messagebundle_en_US_saprigi.properties +1 -3
- package/src/sap/cux/home/i18n/messagebundle_en_US_saptrc.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_es.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_es_MX.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_et.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_fi.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_fr.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_fr_CA.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_hi.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_hr.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_hu.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_id.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_it.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_iw.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_ja.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_kk.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_ko.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_lt.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_lv.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_mk.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_ms.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_nl.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_no.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_pl.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_pt.properties +1 -3
- package/src/sap/cux/home/i18n/messagebundle_pt_PT.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_ro.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_ru.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_sh.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_sk.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_sl.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_sr.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_sv.properties +1 -3
- package/src/sap/cux/home/i18n/messagebundle_th.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_tr.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_uk.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_vi.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_zh_CN.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_zh_TW.properties +0 -2
- package/src/sap/cux/home/interface/AppsInterface.d.ts +5 -0
- package/src/sap/cux/home/interface/AppsInterface.d.ts.map +1 -1
- package/src/sap/cux/home/interface/AppsInterface.js.map +1 -1
- package/src/sap/cux/home/interface/AppsInterface.ts +6 -0
- package/src/sap/cux/home/library.d.ts.map +1 -1
- package/src/sap/cux/home/library.js +1 -0
- package/src/sap/cux/home/library.js.map +1 -1
- package/src/sap/cux/home/library.ts +1 -0
- package/src/sap/cux/home/themes/base/AppsContainer.less +12 -1
- package/src/sap/cux/home/themes/base/BaseLayout.less +11 -0
- package/src/sap/cux/home/themes/base/InsightsContainer.less +4 -0
- package/src/sap/cux/home/themes/base/ToDosContainer.less +4 -0
- package/src/sap/cux/home/utils/AppManager.d.ts +7 -6
- package/src/sap/cux/home/utils/AppManager.d.ts.map +1 -1
- package/src/sap/cux/home/utils/AppManager.js +1 -1
- package/src/sap/cux/home/utils/AppManager.js.map +1 -1
- package/src/sap/cux/home/utils/AppManager.ts +9 -10
- package/src/sap/cux/home/utils/BatchHelper.d.ts.map +1 -1
- package/src/sap/cux/home/utils/BatchHelper.js +1 -1
- package/src/sap/cux/home/utils/BatchHelper.js.map +1 -1
- package/src/sap/cux/home/utils/BatchHelper.ts +4 -1
- package/src/sap/cux/home/utils/FESRUtil.d.ts +30 -0
- package/src/sap/cux/home/utils/FESRUtil.d.ts.map +1 -1
- package/src/sap/cux/home/utils/FESRUtil.js +36 -1
- package/src/sap/cux/home/utils/FESRUtil.js.map +1 -1
- package/src/sap/cux/home/utils/FESRUtil.ts +36 -0
- package/src/sap/cux/home/utils/PXFeedback.d.ts +4 -0
- package/src/sap/cux/home/utils/PXFeedback.d.ts.map +1 -0
- package/src/sap/cux/home/utils/PXFeedback.js +28 -0
- package/src/sap/cux/home/utils/PXFeedback.js.map +1 -0
- package/src/sap/cux/home/utils/PXFeedback.ts +19 -0
- package/src/sap/cux/home/utils/PageManager.d.ts +0 -4
- package/src/sap/cux/home/utils/PageManager.d.ts.map +1 -1
- package/src/sap/cux/home/utils/PageManager.js +6 -6
- package/src/sap/cux/home/utils/PageManager.js.map +1 -1
- package/src/sap/cux/home/utils/PageManager.ts +6 -5
- package/src/sap/cux/home/utils/UshellPersonalizer.js +1 -1
- package/src/sap/cux/home/utils/UshellPersonalizer.js.map +1 -1
- package/src/sap/cux/home/utils/UshellPersonalizer.ts +1 -1
- package/src/sap/cux/home/utils/fragment/appsAdditionContent.fragment.xml +1 -1
|
@@ -980,6 +980,8 @@ export default class AdvancedSettingsPanel extends BaseSettingsPanel {
|
|
|
980
980
|
oImportedSection.visualizations = aDelta;
|
|
981
981
|
}
|
|
982
982
|
});
|
|
983
|
+
// Remove Sections with no visualizations
|
|
984
|
+
aImportedSections = aImportedSections.filter((oSection) => oSection.visualizations && oSection.visualizations.length > 0);
|
|
983
985
|
return aImportedSections;
|
|
984
986
|
} catch (error) {
|
|
985
987
|
Log.error("Error occurred while fetching delta section visualizations:" + String(error));
|
|
@@ -1027,6 +1029,7 @@ export default class AdvancedSettingsPanel extends BaseSettingsPanel {
|
|
|
1027
1029
|
if (oSectionViz) {
|
|
1028
1030
|
oSectionViz.displayFormatHint =
|
|
1029
1031
|
oViz.displayFormatHint !== "standard" ? String(oViz.displayFormatHint) : String(oSectionViz.displayFormatHint);
|
|
1032
|
+
oSectionViz.id = String(oViz.id ?? oSectionViz.id);
|
|
1030
1033
|
aSectionViz.push(oViz.isBookmark ? oViz : oSectionViz);
|
|
1031
1034
|
break;
|
|
1032
1035
|
}
|
|
@@ -1600,7 +1603,6 @@ export default class AdvancedSettingsPanel extends BaseSettingsPanel {
|
|
|
1600
1603
|
|
|
1601
1604
|
private onResetImportApps(): void {
|
|
1602
1605
|
this.oEventBus.publish("importChannel", "resetImported");
|
|
1603
|
-
MessageToast.show(this._i18nBundle.getText("importAppsNowBtnEnabled") as string);
|
|
1604
1606
|
}
|
|
1605
1607
|
|
|
1606
1608
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"App.d.ts","sourceRoot":"../../../../..","sources":["src/sap/cux/home/App.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,kBAAkB,CAAC;IAOlC,OAAoB,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;IAGxE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;IAG3D,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;IAChD,OAAO,OAAO,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"App.d.ts","sourceRoot":"../../../../..","sources":["src/sap/cux/home/App.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,kBAAkB,CAAC;IAOlC,OAAoB,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;IAGxE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;IAG3D,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;IAChD,OAAO,OAAO,MAAM,sBAAsB,CAAC;IAK3C;;;;;;;;;;;;;;OAcG;IACH,MAAM,CAAC,OAAO,OAAO,GAAI,SAAQ,OAAO;oBAC3B,YAAY,CAAC,EAAE,MAAM,GAAG,YAAY;oBACpC,EAAE,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,YAAY;QAUhD,OAAO,CAAC,kBAAkB,CAAc;QACxC,MAAM,CAAC,QAAQ,CAAC,QAAQ,EAAE,eAAe,CAYvC;QAEF,OAAO,CAAC,kBAAkB;QAS1B,OAAO,CAAC,oBAAoB;QAuB5B;;;WAGG;gBACW,UAAU;QAwBxB;;;WAGG;QACU,YAAY,CAAC,KAAK,EAAE,sBAAsB;KASvD;CAEA"}
|
package/src/sap/cux/home/App.js
CHANGED
|
@@ -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/m/GenericTile", "sap/m/library", "sap/ushell/Container", "./BaseApp", "./utils/AppManager"], function (Log, GenericTile, mobileLibrary, Container, __BaseApp, __AppManager) {
|
|
5
|
+
sap.ui.define(["sap/base/Log", "sap/m/GenericTile", "sap/m/library", "sap/ushell/Container", "./BaseApp", "./utils/AppManager", "./utils/FESRUtil"], function (Log, GenericTile, mobileLibrary, Container, __BaseApp, __AppManager, ___utils_FESRUtil) {
|
|
6
6
|
"use strict";
|
|
7
7
|
|
|
8
8
|
function _interopRequireDefault(obj) {
|
|
@@ -10,6 +10,7 @@ sap.ui.define(["sap/base/Log", "sap/m/GenericTile", "sap/m/library", "sap/ushell
|
|
|
10
10
|
}
|
|
11
11
|
const BaseApp = _interopRequireDefault(__BaseApp);
|
|
12
12
|
const AppManager = _interopRequireDefault(__AppManager);
|
|
13
|
+
const addFESRNavigationSource = ___utils_FESRUtil["addFESRNavigationSource"];
|
|
13
14
|
/**
|
|
14
15
|
*
|
|
15
16
|
* App class for managing and storing Apps.
|
|
@@ -123,6 +124,10 @@ sap.ui.define(["sap/base/Log", "sap/m/GenericTile", "sap/m/library", "sap/ushell
|
|
|
123
124
|
const _this2 = this;
|
|
124
125
|
const _temp = function () {
|
|
125
126
|
if (_this2.getUrl()) {
|
|
127
|
+
const navInfo = _this2.data("additionalInfo");
|
|
128
|
+
if (navInfo?.fesrSource) {
|
|
129
|
+
addFESRNavigationSource(navInfo.fesrSource);
|
|
130
|
+
}
|
|
126
131
|
return Promise.resolve(_this2._launchApp(event)).then(function () {});
|
|
127
132
|
}
|
|
128
133
|
}();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"App.js","names":["sap","ui","define","Log","GenericTile","mobileLibrary","Container","__BaseApp","__AppManager","_interopRequireDefault","obj","__esModule","default","BaseApp","AppManager","App","extend","metadata","library","properties","url","type","group","defaultValue","vizId","constructor","_constructor","id","settings","BaseApp.prototype.constructor.call","_getSSBRootControl","oSmartBusinessAppViz","getContent","getComponentInstance","getRootControl","oError","error","Error","message","String","_getInnerGenericTile","oControl","oControlMetadata","getMetadata","oDefaultAggregationDefinition","getDefaultAggregation","sDefaultAggregationName","name","aAggregationData","getAggregation","oAggregationValue","Array","isArray","getState","LoadState","Loaded","_launchApp","event","_this","appManagerInstance","getInstance","tile","getSource","Promise","resolve","fetchFavVizs","then","favoriteApps","selectedApp","find","app","appUrl","getUrl","includes","smartBusinessAppViz","vizInstance","isSmartBusinessTile","ssbRootControl","ssbGenericTile","firePress","getServiceAsync","spaceContentService","launchTileTarget","getTitle","e","reject","_handlePress","_this2","_temp"],"sources":["App.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 GenericTile, { GenericTile$PressEvent } from \"sap/m/GenericTile\";\nimport mobileLibrary from \"sap/m/library\";\nimport Control from \"sap/ui/core/Control\";\nimport type { MetadataOptions } from \"sap/ui/core/Element\";\nimport Container from \"sap/ushell/Container\";\nimport SpaceContent from \"sap/ushell/services/SpaceContent\";\nimport { $AppSettings } from \"./App\";\nimport BaseApp from \"./BaseApp\";\nimport { ICustomVizInstance, ISectionAndVisualization } from \"./interface/AppsInterface\";\nimport AppManager from \"./utils/AppManager\";\n\n/**\n *\n * App class for managing and storing Apps.\n *\n * @extends sap.cux.home.BaseApp\n *\n * @author SAP SE\n * @version 0.0.1\n * @since 1.121.0\n *\n * @private\n * @ui5-restricted ux.eng.s4producthomes1\n *\n * @alias sap.cux.home.App\n */\nexport default class App extends BaseApp {\n\tconstructor(idOrSettings?: string | $AppSettings);\n\tconstructor(id?: string, settings?: $AppSettings);\n\t/**\n\t * Constructor for a new App.\n\t *\n\t * @param {string} [id] ID for the new app, generated automatically if an ID is not provided\n\t * @param {object} [settings] Initial settings for the new app\n\t */\n\tpublic constructor(id?: string, settings?: $AppSettings) {\n\t\tsuper(id, settings);\n\t}\n\tprivate appManagerInstance!: AppManager;\n\tstatic readonly metadata: MetadataOptions = {\n\t\tlibrary: \"sap.cux.home\",\n\t\tproperties: {\n\t\t\t/**\n\t\t\t * Url of the app where the user navigates to on click\n\t\t\t */\n\t\t\turl: { type: \"string\", group: \"Misc\", defaultValue: \"\" },\n\t\t\t/**\n\t\t\t * VizId of the app. Used for enabling addition of apps to FavoriteApp panel\n\t\t\t */\n\t\t\tvizId: { type: \"string\", group: \"Misc\", defaultValue: \"\" }\n\t\t}\n\t};\n\tprivate _getSSBRootControl(oSmartBusinessAppViz: ICustomVizInstance): Control | null {\n\t\ttry {\n\t\t\treturn oSmartBusinessAppViz.getContent().getComponentInstance().getRootControl() as Control | null;\n\t\t} catch (oError) {\n\t\t\tLog.error(oError instanceof Error ? oError.message : String(oError));\n\t\t\treturn null;\n\t\t}\n\t}\n\n\tprivate _getInnerGenericTile(oControl: Control | null): GenericTile | null {\n\t\tif (!oControl) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst oControlMetadata = oControl.getMetadata();\n\t\tconst oDefaultAggregationDefinition = oControlMetadata.getDefaultAggregation() as { name?: string } | null;\n\t\tconst sDefaultAggregationName = oDefaultAggregationDefinition ? oDefaultAggregationDefinition?.name : \"content\";\n\n\t\tconst aAggregationData = sDefaultAggregationName ? oControl.getAggregation(sDefaultAggregationName) : null;\n\t\tconst oAggregationValue = Array.isArray(aAggregationData) ? aAggregationData[0] : aAggregationData;\n\n\t\tif (!oAggregationValue) {\n\t\t\treturn null;\n\t\t}\n\n\t\tif (oAggregationValue instanceof GenericTile && oAggregationValue.getState() === mobileLibrary.LoadState.Loaded) {\n\t\t\treturn oAggregationValue;\n\t\t}\n\n\t\treturn this._getInnerGenericTile(oAggregationValue as Control);\n\t}\n\n\t/**\n\t * Navigates to the clicked app\n\t * @private\n\t */\n\tprivate async _launchApp(event: GenericTile$PressEvent): Promise<void> {\n\t\tthis.appManagerInstance = this.appManagerInstance || AppManager.getInstance();\n\t\tconst tile = event.getSource();\n\t\tconst favoriteApps: ISectionAndVisualization[] = await this.appManagerInstance.fetchFavVizs(false, true);\n\t\tconst selectedApp = favoriteApps.find((app) => {\n\t\t\tconst appUrl = app.url || \"\";\n\t\t\treturn tile.getUrl().includes(appUrl);\n\t\t});\n\t\tconst smartBusinessAppViz = selectedApp?.vizInstance;\n\t\tconst isSmartBusinessTile = selectedApp?.isSmartBusinessTile;\n\t\tif (smartBusinessAppViz) {\n\t\t\tconst ssbRootControl = this._getSSBRootControl(smartBusinessAppViz);\n\t\t\tconst ssbGenericTile = isSmartBusinessTile && this._getInnerGenericTile(ssbRootControl);\n\n\t\t\tif (ssbGenericTile) {\n\t\t\t\tssbGenericTile.firePress();\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t// Fallback in case smartBusinessAppViz is undefined or ssbGenericTile is not present\n\t\tconst spaceContentService = await Container.getServiceAsync<SpaceContent>(\"SpaceContent\");\n\t\tawait spaceContentService.launchTileTarget(this.getUrl(), this.getTitle());\n\t}\n\n\t/**\n\t * App Press Handler\n\t * @private\n\t */\n\tpublic async _handlePress(event: GenericTile$PressEvent) {\n\t\tif (this.getUrl()) {\n\t\t\tawait this._launchApp(event);\n\t\t}\n\t}\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AAHAA,GAAA,CAAAC,EAAA,CAAAC,MAAA,
|
|
1
|
+
{"version":3,"file":"App.js","names":["sap","ui","define","Log","GenericTile","mobileLibrary","Container","__BaseApp","__AppManager","___utils_FESRUtil","_interopRequireDefault","obj","__esModule","default","BaseApp","AppManager","addFESRNavigationSource","App","extend","metadata","library","properties","url","type","group","defaultValue","vizId","constructor","_constructor","id","settings","BaseApp.prototype.constructor.call","_getSSBRootControl","oSmartBusinessAppViz","getContent","getComponentInstance","getRootControl","oError","error","Error","message","String","_getInnerGenericTile","oControl","oControlMetadata","getMetadata","oDefaultAggregationDefinition","getDefaultAggregation","sDefaultAggregationName","name","aAggregationData","getAggregation","oAggregationValue","Array","isArray","getState","LoadState","Loaded","_launchApp","event","_this","appManagerInstance","getInstance","tile","getSource","Promise","resolve","fetchFavVizs","then","favoriteApps","selectedApp","find","app","appUrl","getUrl","includes","smartBusinessAppViz","vizInstance","isSmartBusinessTile","ssbRootControl","ssbGenericTile","firePress","getServiceAsync","spaceContentService","launchTileTarget","getTitle","e","reject","_handlePress","_this2","_temp","navInfo","data","fesrSource"],"sources":["App.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 GenericTile, { GenericTile$PressEvent } from \"sap/m/GenericTile\";\nimport mobileLibrary from \"sap/m/library\";\nimport Control from \"sap/ui/core/Control\";\nimport type { MetadataOptions } from \"sap/ui/core/Element\";\nimport Container from \"sap/ushell/Container\";\nimport SpaceContent from \"sap/ushell/services/SpaceContent\";\nimport { $AppSettings } from \"./App\";\nimport BaseApp from \"./BaseApp\";\nimport { IAdditionalInfo, ICustomVizInstance, ISectionAndVisualization } from \"./interface/AppsInterface\";\nimport AppManager from \"./utils/AppManager\";\nimport { addFESRNavigationSource } from \"./utils/FESRUtil\";\n\n/**\n *\n * App class for managing and storing Apps.\n *\n * @extends sap.cux.home.BaseApp\n *\n * @author SAP SE\n * @version 0.0.1\n * @since 1.121.0\n *\n * @private\n * @ui5-restricted ux.eng.s4producthomes1\n *\n * @alias sap.cux.home.App\n */\nexport default class App extends BaseApp {\n\tconstructor(idOrSettings?: string | $AppSettings);\n\tconstructor(id?: string, settings?: $AppSettings);\n\t/**\n\t * Constructor for a new App.\n\t *\n\t * @param {string} [id] ID for the new app, generated automatically if an ID is not provided\n\t * @param {object} [settings] Initial settings for the new app\n\t */\n\tpublic constructor(id?: string, settings?: $AppSettings) {\n\t\tsuper(id, settings);\n\t}\n\tprivate appManagerInstance!: AppManager;\n\tstatic readonly metadata: MetadataOptions = {\n\t\tlibrary: \"sap.cux.home\",\n\t\tproperties: {\n\t\t\t/**\n\t\t\t * Url of the app where the user navigates to on click\n\t\t\t */\n\t\t\turl: { type: \"string\", group: \"Misc\", defaultValue: \"\" },\n\t\t\t/**\n\t\t\t * VizId of the app. Used for enabling addition of apps to FavoriteApp panel\n\t\t\t */\n\t\t\tvizId: { type: \"string\", group: \"Misc\", defaultValue: \"\" }\n\t\t}\n\t};\n\n\tprivate _getSSBRootControl(oSmartBusinessAppViz: ICustomVizInstance): Control | null {\n\t\ttry {\n\t\t\treturn oSmartBusinessAppViz.getContent().getComponentInstance().getRootControl() as Control | null;\n\t\t} catch (oError) {\n\t\t\tLog.error(oError instanceof Error ? oError.message : String(oError));\n\t\t\treturn null;\n\t\t}\n\t}\n\n\tprivate _getInnerGenericTile(oControl: Control | null): GenericTile | null {\n\t\tif (!oControl) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst oControlMetadata = oControl.getMetadata();\n\t\tconst oDefaultAggregationDefinition = oControlMetadata.getDefaultAggregation() as { name?: string } | null;\n\t\tconst sDefaultAggregationName = oDefaultAggregationDefinition ? oDefaultAggregationDefinition?.name : \"content\";\n\n\t\tconst aAggregationData = sDefaultAggregationName ? oControl.getAggregation(sDefaultAggregationName) : null;\n\t\tconst oAggregationValue = Array.isArray(aAggregationData) ? aAggregationData[0] : aAggregationData;\n\n\t\tif (!oAggregationValue) {\n\t\t\treturn null;\n\t\t}\n\n\t\tif (oAggregationValue instanceof GenericTile && oAggregationValue.getState() === mobileLibrary.LoadState.Loaded) {\n\t\t\treturn oAggregationValue;\n\t\t}\n\n\t\treturn this._getInnerGenericTile(oAggregationValue as Control);\n\t}\n\n\t/**\n\t * Navigates to the clicked app\n\t * @private\n\t */\n\tprivate async _launchApp(event: GenericTile$PressEvent): Promise<void> {\n\t\tthis.appManagerInstance = this.appManagerInstance || AppManager.getInstance();\n\t\tconst tile = event.getSource();\n\t\tconst favoriteApps: ISectionAndVisualization[] = await this.appManagerInstance.fetchFavVizs(false, true);\n\t\tconst selectedApp = favoriteApps.find((app) => {\n\t\t\tconst appUrl = app.url || \"\";\n\t\t\treturn tile.getUrl().includes(appUrl);\n\t\t});\n\t\tconst smartBusinessAppViz = selectedApp?.vizInstance;\n\t\tconst isSmartBusinessTile = selectedApp?.isSmartBusinessTile;\n\t\tif (smartBusinessAppViz) {\n\t\t\tconst ssbRootControl = this._getSSBRootControl(smartBusinessAppViz);\n\t\t\tconst ssbGenericTile = isSmartBusinessTile && this._getInnerGenericTile(ssbRootControl);\n\n\t\t\tif (ssbGenericTile) {\n\t\t\t\tssbGenericTile.firePress();\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t// Fallback in case smartBusinessAppViz is undefined or ssbGenericTile is not present\n\t\tconst spaceContentService = await Container.getServiceAsync<SpaceContent>(\"SpaceContent\");\n\t\tawait spaceContentService.launchTileTarget(this.getUrl(), this.getTitle());\n\t}\n\n\t/**\n\t * App Press Handler\n\t * @private\n\t */\n\tpublic async _handlePress(event: GenericTile$PressEvent) {\n\t\tif (this.getUrl()) {\n\t\t\tconst navInfo = this.data(\"additionalInfo\") as IAdditionalInfo;\n\t\t\tif (navInfo?.fesrSource) {\n\t\t\t\taddFESRNavigationSource(navInfo.fesrSource);\n\t\t\t}\n\t\t\tawait this._launchApp(event);\n\t\t}\n\t}\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AAHAA,GAAA,CAAAC,EAAA,CAAAC,MAAA,kJAAAC,GAAA,EAAAC,WAAA,EAAAC,aAAA,EAAAC,SAAA,EAAAC,SAAA,EAAAC,YAAA,EAAAC,iBAAA;EAAA;;EAAA,SAAAC,uBAAAC,GAAA;IAAA,OAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,CAAAE,OAAA,mBAAAF,GAAA,CAAAE,OAAA,GAAAF,GAAA;EAAA;EAAA,MAaOG,OAAO,GAAAJ,sBAAA,CAAAH,SAAA;EAAA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,CAAA;QAAA,OAAArB,OAAA,CAAAsB,MAAA,CAAAD,CAAA;MAAA;IAAA;EAAA;EAAA,OAnGmBrE,GAAG;AAAA","ignoreList":[]}
|
package/src/sap/cux/home/App.ts
CHANGED
|
@@ -12,8 +12,9 @@ import Container from "sap/ushell/Container";
|
|
|
12
12
|
import SpaceContent from "sap/ushell/services/SpaceContent";
|
|
13
13
|
import { $AppSettings } from "./App";
|
|
14
14
|
import BaseApp from "./BaseApp";
|
|
15
|
-
import { ICustomVizInstance, ISectionAndVisualization } from "./interface/AppsInterface";
|
|
15
|
+
import { IAdditionalInfo, ICustomVizInstance, ISectionAndVisualization } from "./interface/AppsInterface";
|
|
16
16
|
import AppManager from "./utils/AppManager";
|
|
17
|
+
import { addFESRNavigationSource } from "./utils/FESRUtil";
|
|
17
18
|
|
|
18
19
|
/**
|
|
19
20
|
*
|
|
@@ -56,6 +57,7 @@ export default class App extends BaseApp {
|
|
|
56
57
|
vizId: { type: "string", group: "Misc", defaultValue: "" }
|
|
57
58
|
}
|
|
58
59
|
};
|
|
60
|
+
|
|
59
61
|
private _getSSBRootControl(oSmartBusinessAppViz: ICustomVizInstance): Control | null {
|
|
60
62
|
try {
|
|
61
63
|
return oSmartBusinessAppViz.getContent().getComponentInstance().getRootControl() as Control | null;
|
|
@@ -122,6 +124,10 @@ export default class App extends BaseApp {
|
|
|
122
124
|
*/
|
|
123
125
|
public async _handlePress(event: GenericTile$PressEvent) {
|
|
124
126
|
if (this.getUrl()) {
|
|
127
|
+
const navInfo = this.data("additionalInfo") as IAdditionalInfo;
|
|
128
|
+
if (navInfo?.fesrSource) {
|
|
129
|
+
addFESRNavigationSource(navInfo.fesrSource);
|
|
130
|
+
}
|
|
125
131
|
await this._launchApp(event);
|
|
126
132
|
}
|
|
127
133
|
}
|
|
@@ -123,6 +123,7 @@ declare module "sap/cux/home/AppsAdditionPanel" {
|
|
|
123
123
|
* @private
|
|
124
124
|
* @param {string} id - The unique ID for the container.
|
|
125
125
|
* @param {Context} context - The binding context for the app.
|
|
126
|
+
* @param {boolean} isEnglishLanguage - Flag indicating if the language is english.
|
|
126
127
|
* @returns {VBox} The app details container.
|
|
127
128
|
*/
|
|
128
129
|
private _getAppDetailsContainer;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppsAdditionPanel.d.ts","sourceRoot":"../../../../..","sources":["src/sap/cux/home/AppsAdditionPanel.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"AppsAdditionPanel.d.ts","sourceRoot":"../../../../..","sources":["src/sap/cux/home/AppsAdditionPanel.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,gCAAgC,CAAC;IAiBhD,OAAO,EAAE,6BAA6B,EAAE,MAAM,gBAAgB,CAAC;IAG/D,OAAiB,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;IAgBpE,OAAO,iBAAiB,MAAM,gCAAgC,CAAC;IAI/D,OAAO,EAA4C,cAAc,EAAE,MAAM,sCAAsC,CAAC;IAgBhH,MAAM,SAAS;;;;KAId,CAAC;IAEF,KAAK,YAAY;QAChB,IAAI,SAAS;QACb,SAAS,cAAc;QACvB,QAAQ,aAAa;KACrB;IAED,KAAK,SAAS;QACb,cAAc,mBAAmB;QACjC,YAAY,iBAAiB;KAC7B;IAED,KAAK,QAAQ;QACZ,MAAM,WAAW;KACjB;IAED,UAAU,UAAU;QACnB,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,EAAE,MAAM,CAAC;QACjB,cAAc,EAAE,MAAM,CAAC;QACvB,MAAM,EAAE,MAAM,CAAC;QACf,QAAQ,EAAE,QAAQ,CAAC;QACnB,OAAO,EAAE,MAAM,CAAC;QAChB,aAAa,EAAE,MAAM,CAAC;KACtB;IACD,UAAU,YAAY;QACrB,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,EAAE,MAAM,CAAC;QACf,MAAM,EAAE,M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3
3
|
* * (c) Copyright 2009-2025 SAP SE. All rights reserved
|
|
4
4
|
*/
|
|
5
|
-
sap.ui.define(["sap/base/Log", "sap/m/Button", "sap/m/CustomListItem", "sap/m/ExpandableText", "sap/m/FlexBox", "sap/m/GenericTile", "sap/m/HBox", "sap/m/Label", "sap/m/library", "sap/m/MessageToast", "sap/m/Text", "sap/m/VBox", "sap/ui/core/Fragment", "sap/ui/core/library", "sap/ui/model/ChangeReason", "sap/ui/model/json/JSONModel", "sap/ui/model/resource/ResourceModel", "sap/ui/model/Sorter", "sap/ushell/Container", "./AppsContainer", "./BaseSettingsPanel", "./FavAppPanel", "./InsightsContainer", "./utils/AppManager", "./utils/Constants", "./utils/DataFormatUtils", "./utils/FeatureUtils", "./utils/FESRUtil"], function (Log, Button, CustomListItem, ExpandableText, FlexBox, GenericTile, HBox, Label, sap_m_library, MessageToast, Text, VBox, Fragment, sap_ui_core_library, ChangeReason, JSONModel, ResourceModel, Sorter, Container, __AppsContainer, __BaseSettingsPanel, __FavAppPanel, __InsightsContainer, __AppManager, ___utils_Constants, ___utils_DataFormatUtils, ___utils_FeatureUtils, ___utils_FESRUtil) {
|
|
5
|
+
sap.ui.define(["sap/base/i18n/Localization", "sap/base/Log", "sap/m/Button", "sap/m/CustomListItem", "sap/m/ExpandableText", "sap/m/FlexBox", "sap/m/GenericTile", "sap/m/HBox", "sap/m/Label", "sap/m/library", "sap/m/MessageToast", "sap/m/Text", "sap/m/VBox", "sap/ui/core/Fragment", "sap/ui/core/library", "sap/ui/model/ChangeReason", "sap/ui/model/json/JSONModel", "sap/ui/model/resource/ResourceModel", "sap/ui/model/Sorter", "sap/ushell/Container", "./AppsContainer", "./BaseSettingsPanel", "./FavAppPanel", "./InsightsContainer", "./utils/AppManager", "./utils/Constants", "./utils/DataFormatUtils", "./utils/FeatureUtils", "./utils/FESRUtil", "./utils/PXFeedback"], function (Localization, Log, Button, CustomListItem, ExpandableText, FlexBox, GenericTile, HBox, Label, sap_m_library, MessageToast, Text, VBox, Fragment, sap_ui_core_library, ChangeReason, JSONModel, ResourceModel, Sorter, Container, __AppsContainer, __BaseSettingsPanel, __FavAppPanel, __InsightsContainer, __AppManager, ___utils_Constants, ___utils_DataFormatUtils, ___utils_FeatureUtils, ___utils_FESRUtil, ___utils_PXFeedback) {
|
|
6
6
|
"use strict";
|
|
7
7
|
|
|
8
8
|
function _interopRequireDefault(obj) {
|
|
@@ -203,10 +203,11 @@ sap.ui.define(["sap/base/Log", "sap/m/Button", "sap/m/CustomListItem", "sap/m/Ex
|
|
|
203
203
|
const isNavigationSupportedForFeature = ___utils_FeatureUtils["isNavigationSupportedForFeature"];
|
|
204
204
|
const addFESRSemanticStepName = ___utils_FESRUtil["addFESRSemanticStepName"];
|
|
205
205
|
const FESR_EVENTS = ___utils_FESRUtil["FESR_EVENTS"];
|
|
206
|
+
const triggerPXIntegration = ___utils_PXFeedback["triggerPXIntegration"];
|
|
206
207
|
const Constants = {
|
|
207
208
|
DeprecatedInfoText: "deprecated",
|
|
208
209
|
MinQueryLength: 2,
|
|
209
|
-
MaxDescriptionLength:
|
|
210
|
+
MaxDescriptionLength: 2000
|
|
210
211
|
};
|
|
211
212
|
var SearchStatus = /*#__PURE__*/function (SearchStatus) {
|
|
212
213
|
SearchStatus["Idle"] = "idle";
|
|
@@ -278,7 +279,11 @@ sap.ui.define(["sap/base/Log", "sap/m/Button", "sap/m/CustomListItem", "sap/m/Ex
|
|
|
278
279
|
void this._setupContent();
|
|
279
280
|
|
|
280
281
|
//setup events
|
|
281
|
-
this.attachEvent("onDialogClose",
|
|
282
|
+
this.attachEvent("onDialogClose", () => {
|
|
283
|
+
if (!this._isDialogPersisted(this.getParent())) {
|
|
284
|
+
this.resetPanel();
|
|
285
|
+
}
|
|
286
|
+
});
|
|
282
287
|
},
|
|
283
288
|
/**
|
|
284
289
|
* Sets up the actions for the Apps Addition Panel.
|
|
@@ -404,13 +409,17 @@ sap.ui.define(["sap/base/Log", "sap/m/Button", "sap/m/CustomListItem", "sap/m/Ex
|
|
|
404
409
|
* @returns {CustomListItem} The generated list item control.
|
|
405
410
|
*/
|
|
406
411
|
_generateListItem: function _generateListItem(id, context) {
|
|
412
|
+
const isStaticApp = context.getProperty("isStaticApp");
|
|
413
|
+
const langTag = Localization.getLanguageTag();
|
|
414
|
+
const currentLanguage = langTag.language.toLowerCase();
|
|
415
|
+
const isEnglishLanguage = currentLanguage.startsWith("en");
|
|
407
416
|
const listItem = new CustomListItem(id, {
|
|
408
417
|
selected: context.getProperty("addedToHomePage"),
|
|
409
418
|
content: [new FlexBox(recycleId(`${id}-result-container`), {
|
|
410
419
|
renderType: "Bare",
|
|
411
|
-
direction:
|
|
412
|
-
alignItems:
|
|
413
|
-
items: [this._getAppPreviewContainer(id, context), this._getAppDetailsContainer(id, context)]
|
|
420
|
+
direction: isEnglishLanguage && isStaticApp ? "Column" : "Row",
|
|
421
|
+
alignItems: isEnglishLanguage && isStaticApp ? "Start" : "Center",
|
|
422
|
+
items: [this._getAppPreviewContainer(id, context), this._getAppDetailsContainer(id, context, isEnglishLanguage)]
|
|
414
423
|
}).addStyleClass("sapUiSmallMargin")]
|
|
415
424
|
});
|
|
416
425
|
|
|
@@ -462,14 +471,16 @@ sap.ui.define(["sap/base/Log", "sap/m/Button", "sap/m/CustomListItem", "sap/m/Ex
|
|
|
462
471
|
* @private
|
|
463
472
|
* @param {string} id - The unique ID for the container.
|
|
464
473
|
* @param {Context} context - The binding context for the app.
|
|
474
|
+
* @param {boolean} isEnglishLanguage - Flag indicating if the language is english.
|
|
465
475
|
* @returns {VBox} The app details container.
|
|
466
476
|
*/
|
|
467
|
-
_getAppDetailsContainer: function _getAppDetailsContainer(id, context) {
|
|
477
|
+
_getAppDetailsContainer: function _getAppDetailsContainer(id, context, isEnglishLanguage) {
|
|
478
|
+
let description = isEnglishLanguage ? context.getProperty("description") : this._i18nBundle.getText("NoDescriptionAvailable");
|
|
468
479
|
return new VBox(recycleId(`${id}-app-details-container`), {
|
|
469
480
|
renderType: "Bare",
|
|
470
481
|
gap: "0.5rem",
|
|
471
482
|
items: [new ExpandableText(recycleId(`${id}-description`), {
|
|
472
|
-
text:
|
|
483
|
+
text: description,
|
|
473
484
|
maxCharacters: Constants.MaxDescriptionLength
|
|
474
485
|
}), new HBox(recycleId(`${id}-app-status-container`), {
|
|
475
486
|
renderType: "Bare",
|
|
@@ -482,7 +493,7 @@ sap.ui.define(["sap/base/Log", "sap/m/Button", "sap/m/CustomListItem", "sap/m/Ex
|
|
|
482
493
|
items: this._generateStatusTexts(id, context.getProperty("status"))
|
|
483
494
|
}).addStyleClass("sapUiTinyMarginBegin statusTextsContainer")]
|
|
484
495
|
})]
|
|
485
|
-
}).addStyleClass(context.getProperty("isStaticApp") ? "sapUiSmallMarginTop" : "sapUiSmallMarginBegin");
|
|
496
|
+
}).addStyleClass(isEnglishLanguage && context.getProperty("isStaticApp") ? "sapUiSmallMarginTop" : "sapUiSmallMarginBegin");
|
|
486
497
|
},
|
|
487
498
|
/**
|
|
488
499
|
* Checks if the Apps Addition Panel is supported. Internally, it checks if the
|
|
@@ -640,8 +651,9 @@ sap.ui.define(["sap/base/Log", "sap/m/Button", "sap/m/CustomListItem", "sap/m/Ex
|
|
|
640
651
|
if (_temp4 && _temp4.then) return _temp4.then(function () {});
|
|
641
652
|
}); // suggest apps if there are results and search is not cancelled
|
|
642
653
|
}, function (err) {
|
|
643
|
-
|
|
644
|
-
|
|
654
|
+
const message = err.message || "";
|
|
655
|
+
Log.error(message);
|
|
656
|
+
_this3._handleError(message);
|
|
645
657
|
});
|
|
646
658
|
}, function (_wasThrown, _result) {
|
|
647
659
|
// update search status only if search is not cancelled
|
|
@@ -782,48 +794,39 @@ sap.ui.define(["sap/base/Log", "sap/m/Button", "sap/m/CustomListItem", "sap/m/Ex
|
|
|
782
794
|
fetchAppsFromSearch: function _fetchAppsFromSearch(query) {
|
|
783
795
|
try {
|
|
784
796
|
const _this5 = this;
|
|
785
|
-
return Promise.resolve(
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
function
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
797
|
+
return Promise.resolve(_this5._fetchCSRFToken()).then(function (token) {
|
|
798
|
+
const headers = {
|
|
799
|
+
"Content-Type": "application/json",
|
|
800
|
+
...(token && {
|
|
801
|
+
"X-CSRF-Token": token
|
|
802
|
+
})
|
|
803
|
+
};
|
|
804
|
+
return Promise.resolve(fetch(AI_APP_FINDER_API, {
|
|
805
|
+
method: "POST",
|
|
806
|
+
headers,
|
|
807
|
+
body: JSON.stringify({
|
|
808
|
+
UserInput: query
|
|
809
|
+
})
|
|
810
|
+
})).then(function (response) {
|
|
811
|
+
let _exit = false;
|
|
812
|
+
function _temp9(_result2) {
|
|
813
|
+
return _exit ? _result2 : Promise.resolve(response.json()).then(function (_response$json2) {
|
|
814
|
+
const queryResult = _response$json2;
|
|
815
|
+
return queryResult.value || [];
|
|
816
|
+
});
|
|
817
|
+
}
|
|
818
|
+
const _temp8 = function () {
|
|
819
|
+
if (!response.ok) {
|
|
820
|
+
return Promise.resolve(response.json()).then(function (_response$json) {
|
|
821
|
+
const errorResponse = _response$json;
|
|
822
|
+
throw new Error(errorResponse.error?.message || "");
|
|
805
823
|
});
|
|
806
824
|
}
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
const errorResponse = _response$json;
|
|
811
|
-
_this5._handleError(errorResponse.error?.message || "");
|
|
812
|
-
const _temp8 = [];
|
|
813
|
-
_exit = true;
|
|
814
|
-
return _temp8;
|
|
815
|
-
});
|
|
816
|
-
}
|
|
817
|
-
}();
|
|
818
|
-
// handle error responses
|
|
819
|
-
return _temp9 && _temp9.then ? _temp9.then(_temp0) : _temp0(_temp9);
|
|
820
|
-
});
|
|
825
|
+
}();
|
|
826
|
+
// handle error responses
|
|
827
|
+
return _temp8 && _temp8.then ? _temp8.then(_temp9) : _temp9(_temp8);
|
|
821
828
|
});
|
|
822
|
-
}
|
|
823
|
-
Log.error(error.message);
|
|
824
|
-
_this5._handleError();
|
|
825
|
-
return [];
|
|
826
|
-
}));
|
|
829
|
+
});
|
|
827
830
|
} catch (e) {
|
|
828
831
|
return Promise.reject(e);
|
|
829
832
|
}
|
|
@@ -895,9 +898,9 @@ sap.ui.define(["sap/base/Log", "sap/m/Button", "sap/m/CustomListItem", "sap/m/Ex
|
|
|
895
898
|
onPressAddApps: function _onPressAddApps() {
|
|
896
899
|
try {
|
|
897
900
|
const _this6 = this;
|
|
898
|
-
function
|
|
899
|
-
function
|
|
900
|
-
function
|
|
901
|
+
function _temp13() {
|
|
902
|
+
function _temp11() {
|
|
903
|
+
function _temp1() {
|
|
901
904
|
_this6.getParent()?.close();
|
|
902
905
|
if (userSelectedApps.length > 1) {
|
|
903
906
|
MessageToast.show(_this6._i18nBundle.getText("contentAddedToMyhome"));
|
|
@@ -909,30 +912,31 @@ sap.ui.define(["sap/base/Log", "sap/m/Button", "sap/m/CustomListItem", "sap/m/Ex
|
|
|
909
912
|
}
|
|
910
913
|
_this6.resetPanel();
|
|
911
914
|
}
|
|
912
|
-
const
|
|
915
|
+
const _temp0 = function () {
|
|
913
916
|
if (dynamicAppsPresent) {
|
|
914
917
|
return Promise.resolve(_this6.refreshInsightsApps()).then(function () {});
|
|
915
918
|
}
|
|
916
919
|
}();
|
|
917
|
-
return
|
|
920
|
+
return _temp0 && _temp0.then ? _temp0.then(_temp1) : _temp1(_temp0);
|
|
918
921
|
}
|
|
919
|
-
const
|
|
922
|
+
const _temp10 = function () {
|
|
920
923
|
if (staticAppsPresent) {
|
|
921
924
|
return Promise.resolve(_this6.refreshFavoriteApps()).then(function () {});
|
|
922
925
|
}
|
|
923
926
|
}();
|
|
924
|
-
return
|
|
927
|
+
return _temp10 && _temp10.then ? _temp10.then(_temp11) : _temp11(_temp10);
|
|
925
928
|
}
|
|
929
|
+
triggerPXIntegration("addAppsButton");
|
|
926
930
|
const userSelectedApps = _this6.model.getProperty("/userSelectedApps");
|
|
927
931
|
let staticAppsPresent = false;
|
|
928
932
|
let dynamicAppsPresent = false;
|
|
929
|
-
const
|
|
933
|
+
const _temp12 = _forOf(userSelectedApps, function (app) {
|
|
930
934
|
const isStaticApp = app.getBindingContext()?.getProperty("isStaticApp");
|
|
931
935
|
if (isStaticApp) staticAppsPresent = true;else dynamicAppsPresent = true;
|
|
932
936
|
const vizId = app.getBindingContext()?.getProperty("chipID");
|
|
933
937
|
return Promise.resolve(_this6.appManagerInstance.addVisualization(vizId, isStaticApp ? undefined : MYINSIGHT_SECTION_ID)).then(function () {});
|
|
934
938
|
});
|
|
935
|
-
return Promise.resolve(
|
|
939
|
+
return Promise.resolve(_temp12 && _temp12.then ? _temp12.then(_temp13) : _temp13(_temp12));
|
|
936
940
|
} catch (e) {
|
|
937
941
|
return Promise.reject(e);
|
|
938
942
|
}
|
|
@@ -1096,6 +1100,7 @@ sap.ui.define(["sap/base/Log", "sap/m/Button", "sap/m/CustomListItem", "sap/m/Ex
|
|
|
1096
1100
|
sendFeedback: function _sendFeedback(feedbackType) {
|
|
1097
1101
|
this.resetFeedback();
|
|
1098
1102
|
this.model.setProperty(`/feedback/${feedbackType}`, true);
|
|
1103
|
+
triggerPXIntegration(feedbackType);
|
|
1099
1104
|
MessageToast.show(this._i18nBundle.getText("feedBackSent"), {
|
|
1100
1105
|
width: "20em"
|
|
1101
1106
|
});
|