@sapui5/sap.fe.templates 1.138.0 → 1.139.1
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/fe/templates/.library +1 -1
- package/src/sap/fe/templates/AnalyticalListPage/manifest.json +1 -1
- package/src/sap/fe/templates/ListReport/ExtensionAPI.js +1 -1
- package/src/sap/fe/templates/ListReport/ExtensionAPI.ts +1 -1
- package/src/sap/fe/templates/ListReport/ListReport.view.xml +92 -61
- package/src/sap/fe/templates/ListReport/ListReportController.controller.js +18 -10
- package/src/sap/fe/templates/ListReport/ListReportController.controller.ts +19 -9
- package/src/sap/fe/templates/ListReport/controls/MultipleModeControl.js +36 -8
- package/src/sap/fe/templates/ListReport/controls/MultipleModeControl.ts +25 -11
- package/src/sap/fe/templates/ListReport/designtime/ListReport.designtime.js +3 -1
- package/src/sap/fe/templates/ListReport/designtime/ListReport.designtime.ts +2 -0
- package/src/sap/fe/templates/ListReport/manifest.json +1 -1
- package/src/sap/fe/templates/ObjectPage/Component.js +14 -22
- package/src/sap/fe/templates/ObjectPage/Component.ts +5 -9
- package/src/sap/fe/templates/ObjectPage/ObjectPage.view.xml +3 -4
- package/src/sap/fe/templates/ObjectPage/ObjectPageController.controller.js +32 -63
- package/src/sap/fe/templates/ObjectPage/ObjectPageController.controller.ts +40 -67
- package/src/sap/fe/templates/ObjectPage/ObjectPageTemplating.js +21 -17
- package/src/sap/fe/templates/ObjectPage/ObjectPageTemplating.ts +19 -14
- package/src/sap/fe/templates/ObjectPage/components/CollaborationDraft.js +16 -6
- package/src/sap/fe/templates/ObjectPage/components/CollaborationDraft.tsx +15 -5
- package/src/sap/fe/templates/ObjectPage/components/DraftToggle.js +30 -15
- package/src/sap/fe/templates/ObjectPage/components/DraftToggle.tsx +14 -4
- package/src/sap/fe/templates/ObjectPage/designtime/ObjectPage.designtime.js +3 -1
- package/src/sap/fe/templates/ObjectPage/designtime/ObjectPage.designtime.ts +2 -0
- package/src/sap/fe/templates/ObjectPage/manifest.json +1 -1
- package/src/sap/fe/templates/ObjectPage/overrides/CollaborationManager.js +4 -3
- package/src/sap/fe/templates/ObjectPage/overrides/CollaborationManager.ts +32 -29
- package/src/sap/fe/templates/ObjectPage/overrides/Share.js +2 -2
- package/src/sap/fe/templates/ObjectPage/overrides/Share.ts +1 -1
- package/src/sap/fe/templates/ObjectPage/view/fragments/Actions.fragment.xml +25 -6
- package/src/sap/fe/templates/ObjectPage/view/fragments/Heading.fragment.xml +2 -2
- package/src/sap/fe/templates/ObjectPage/view/fragments/ObjectPageHeaderForm.fragment.xml +7 -2
- package/src/sap/fe/templates/library.js +1 -1
- package/src/sap/fe/templates/messagebundle.properties +5 -6
- package/src/sap/fe/templates/messagebundle_ar.properties +2 -2
- package/src/sap/fe/templates/messagebundle_bg.properties +2 -2
- package/src/sap/fe/templates/messagebundle_ca.properties +1 -1
- package/src/sap/fe/templates/messagebundle_cnr.properties +2 -2
- package/src/sap/fe/templates/messagebundle_cs.properties +1 -1
- package/src/sap/fe/templates/messagebundle_da.properties +2 -2
- package/src/sap/fe/templates/messagebundle_de.properties +2 -2
- package/src/sap/fe/templates/messagebundle_en.properties +2 -2
- package/src/sap/fe/templates/messagebundle_en_GB.properties +2 -2
- package/src/sap/fe/templates/messagebundle_en_US_saprigi.properties +2 -4
- package/src/sap/fe/templates/messagebundle_es.properties +1 -1
- package/src/sap/fe/templates/messagebundle_es_MX.properties +1 -1
- package/src/sap/fe/templates/messagebundle_et.properties +1 -1
- package/src/sap/fe/templates/messagebundle_fi.properties +2 -2
- package/src/sap/fe/templates/messagebundle_fr.properties +1 -1
- package/src/sap/fe/templates/messagebundle_fr_CA.properties +3 -3
- package/src/sap/fe/templates/messagebundle_hi.properties +1 -1
- package/src/sap/fe/templates/messagebundle_hr.properties +2 -2
- package/src/sap/fe/templates/messagebundle_hu.properties +2 -2
- package/src/sap/fe/templates/messagebundle_id.properties +1 -1
- package/src/sap/fe/templates/messagebundle_it.properties +2 -2
- package/src/sap/fe/templates/messagebundle_ja.properties +1 -1
- package/src/sap/fe/templates/messagebundle_kk.properties +1 -1
- package/src/sap/fe/templates/messagebundle_ko.properties +1 -1
- package/src/sap/fe/templates/messagebundle_lt.properties +1 -1
- package/src/sap/fe/templates/messagebundle_lv.properties +2 -2
- package/src/sap/fe/templates/messagebundle_mk.properties +1 -1
- package/src/sap/fe/templates/messagebundle_no.properties +1 -1
- package/src/sap/fe/templates/messagebundle_pl.properties +1 -1
- package/src/sap/fe/templates/messagebundle_pt.properties +1 -1
- package/src/sap/fe/templates/messagebundle_pt_PT.properties +1 -1
- package/src/sap/fe/templates/messagebundle_ro.properties +1 -1
- package/src/sap/fe/templates/messagebundle_sh.properties +2 -2
- package/src/sap/fe/templates/messagebundle_sk.properties +2 -2
- package/src/sap/fe/templates/messagebundle_sl.properties +1 -1
- package/src/sap/fe/templates/messagebundle_sr.properties +2 -2
- package/src/sap/fe/templates/messagebundle_sv.properties +1 -1
- package/src/sap/fe/templates/messagebundle_th.properties +2 -2
- package/src/sap/fe/templates/messagebundle_tr.properties +1 -1
- package/src/sap/fe/templates/messagebundle_uk.properties +1 -1
- package/src/sap/fe/templates/messagebundle_vi.properties +1 -1
- package/src/sap/fe/templates/messagebundle_zh_CN.properties +1 -1
- package/src/sap/fe/templates/messagebundle_zh_TW.properties +1 -1
|
@@ -28,7 +28,6 @@ import type { InternalModelContext } from "sap/fe/core/helpers/ModelHelper";
|
|
|
28
28
|
import ModelHelper from "sap/fe/core/helpers/ModelHelper";
|
|
29
29
|
import { getResourceModel } from "sap/fe/core/helpers/ResourceModelHelper";
|
|
30
30
|
import FELibrary from "sap/fe/core/library";
|
|
31
|
-
import type { TitleInformation } from "sap/fe/core/rootView/RootViewBaseController";
|
|
32
31
|
import { type WrappedCard } from "sap/fe/core/services/CollaborationManagerServiceFactory";
|
|
33
32
|
import type ChartBlock from "sap/fe/macros/Chart";
|
|
34
33
|
import CommonHelper from "sap/fe/macros/CommonHelper";
|
|
@@ -51,9 +50,7 @@ import TableScroller from "sap/fe/templates/TableScroller";
|
|
|
51
50
|
import type Button from "sap/m/Button";
|
|
52
51
|
import type InputBase from "sap/m/InputBase";
|
|
53
52
|
import InstanceManager from "sap/m/InstanceManager";
|
|
54
|
-
import Link from "sap/m/Link";
|
|
55
53
|
import MessageBox from "sap/m/MessageBox";
|
|
56
|
-
import type MessageStrip from "sap/m/MessageStrip";
|
|
57
54
|
import type NavContainer from "sap/m/NavContainer";
|
|
58
55
|
import type OverflowToolbar from "sap/m/OverflowToolbar";
|
|
59
56
|
import type Popover from "sap/m/Popover";
|
|
@@ -82,7 +79,6 @@ import type ODataV4Context from "sap/ui/model/odata/v4/Context";
|
|
|
82
79
|
import type ODataContextBinding from "sap/ui/model/odata/v4/ODataContextBinding";
|
|
83
80
|
import type ODataListBinding from "sap/ui/model/odata/v4/ODataListBinding";
|
|
84
81
|
import type ODataModel from "sap/ui/model/odata/v4/ODataModel";
|
|
85
|
-
import type BreadCrumbs from "sap/uxap/BreadCrumbs";
|
|
86
82
|
import type ObjectPageDynamicHeaderTitle from "sap/uxap/ObjectPageDynamicHeaderTitle";
|
|
87
83
|
import type ObjectPageLayout from "sap/uxap/ObjectPageLayout";
|
|
88
84
|
import type ObjectPageSection from "sap/uxap/ObjectPageSection";
|
|
@@ -254,6 +250,11 @@ class ObjectPageController extends PageController {
|
|
|
254
250
|
*
|
|
255
251
|
*/
|
|
256
252
|
_fnShowOPMessage(): void {
|
|
253
|
+
if (this.getAppComponent().isSuspended()) {
|
|
254
|
+
// If the app is suspended, we do not show the messages (the MessageModel contains messages from the active app).
|
|
255
|
+
return;
|
|
256
|
+
}
|
|
257
|
+
|
|
257
258
|
const extensionAPI = this.getExtensionAPI();
|
|
258
259
|
const view = this.getView();
|
|
259
260
|
const messages = Messaging?.getMessageModel()
|
|
@@ -441,14 +442,15 @@ class ObjectPageController extends PageController {
|
|
|
441
442
|
// Due to the left alignment of the Draft switch and the collaborative draft avatar controls
|
|
442
443
|
// there is a ToolbarSpacer in the actions aggregation which we need to exclude here!
|
|
443
444
|
// Due to the ACC report, we also need not to check for the InvisibleText elements
|
|
444
|
-
if (
|
|
445
|
-
action.
|
|
446
|
-
|
|
445
|
+
if (action.isA<SummarizationButton>("sap.fe.macros.ai.SummarizationButton")) {
|
|
446
|
+
return action.getContent()?.getVisible() ?? false;
|
|
447
|
+
} else if (
|
|
448
|
+
action.isA<ShareAPI>("sap.fe.macros.Share") ||
|
|
447
449
|
action.isA<EasyFillButton>("sap.fe.macros.ai.EasyFillButton") ||
|
|
448
450
|
action.isA<CollaborationDraft>("sap.fe.templates.ObjectPage.components.CollaborationDraft")
|
|
449
451
|
) {
|
|
450
|
-
// since
|
|
451
|
-
// hence there is no need to check if it is
|
|
452
|
+
// since Share and CollaborationDraft does not have a disable property
|
|
453
|
+
// hence there is no need to check if it is disabled or not
|
|
452
454
|
return action.getVisible();
|
|
453
455
|
} else if (!action.isA<InvisibleText>("sap.ui.core.InvisibleText") && !action.isA<ToolbarSpacer>("sap.m.ToolbarSpacer")) {
|
|
454
456
|
return action.getVisible() && (action as Button).getEnabled();
|
|
@@ -781,7 +783,7 @@ class ObjectPageController extends PageController {
|
|
|
781
783
|
this.displayCollaborationMessage(mParameters?.redirectedToNonDraft);
|
|
782
784
|
this._setOPMessageStripInternalContext();
|
|
783
785
|
|
|
784
|
-
const applyAppState = this.getAppComponent().getAppStateHandler().applyAppState(view
|
|
786
|
+
const applyAppState = this.getAppComponent().getAppStateHandler().applyAppState(view);
|
|
785
787
|
this.pageReady.waitFor(applyAppState);
|
|
786
788
|
}
|
|
787
789
|
|
|
@@ -948,12 +950,26 @@ class ObjectPageController extends PageController {
|
|
|
948
950
|
return this.byId("fe::ObjectPage") as ObjectPageLayout;
|
|
949
951
|
}
|
|
950
952
|
|
|
951
|
-
_getPageTitleInformation(): { title: string; subtitle: string; intent: string; icon: string; description: string } {
|
|
953
|
+
async _getPageTitleInformation(): Promise<{ title: string; subtitle: string; intent: string; icon: string; description: string }> {
|
|
952
954
|
const oObjectPage = this._getObjectPageLayoutControl();
|
|
953
955
|
const oObjectPageSubtitle = oObjectPage.getCustomData().find(function (oCustomData) {
|
|
954
956
|
return oCustomData.getKey() === "ObjectPageSubtitle";
|
|
955
957
|
});
|
|
956
|
-
const
|
|
958
|
+
const oObjectPageDescription = oObjectPage.getCustomData().find(function (oCustomData) {
|
|
959
|
+
return oCustomData.getKey() === "ObjectPageDescription";
|
|
960
|
+
});
|
|
961
|
+
const extractPaths = (bindingInfo?: { parts?: { path?: string; model?: string }[] }): string[] =>
|
|
962
|
+
Array.from(
|
|
963
|
+
new Set(
|
|
964
|
+
(bindingInfo?.parts || [])
|
|
965
|
+
.filter((part) => !part.model)
|
|
966
|
+
.map((part) => part.path || "")
|
|
967
|
+
.filter(Boolean)
|
|
968
|
+
)
|
|
969
|
+
);
|
|
970
|
+
const subtitlePaths = extractPaths(oObjectPageSubtitle?.getBindingInfo("value"));
|
|
971
|
+
const descriptionPaths = extractPaths(oObjectPageDescription?.getBindingInfo("value"));
|
|
972
|
+
const pathsToResolve = [...subtitlePaths, ...descriptionPaths];
|
|
957
973
|
const appComponent = this.getAppComponent();
|
|
958
974
|
const rootViewController = appComponent.getRootViewController();
|
|
959
975
|
const fnClearCacheTitle = (): void => {
|
|
@@ -963,13 +979,20 @@ class ObjectPageController extends PageController {
|
|
|
963
979
|
oObjectPageSubtitle.getBinding("value")?.attachChange(fnClearCacheTitle, this);
|
|
964
980
|
this.clearTitleHierarchyCacheSetUp = true;
|
|
965
981
|
}
|
|
966
|
-
|
|
982
|
+
const oObjectPageContext = oObjectPage.getBindingContext();
|
|
983
|
+
const build = (): { title: string; subtitle: string; intent: string; icon: string; description: string } => ({
|
|
967
984
|
title: oObjectPage.data("ObjectPageTitle") || "",
|
|
968
|
-
subtitle: oObjectPageSubtitle
|
|
985
|
+
subtitle: oObjectPageSubtitle?.getValue() || "",
|
|
969
986
|
intent: "",
|
|
970
987
|
icon: "",
|
|
971
|
-
description:
|
|
972
|
-
};
|
|
988
|
+
description: oObjectPageDescription?.getValue() || ""
|
|
989
|
+
});
|
|
990
|
+
//if no context or nothing to resolve, direct return
|
|
991
|
+
if (!oObjectPageContext || pathsToResolve.length === 0) {
|
|
992
|
+
return Promise.resolve(build());
|
|
993
|
+
}
|
|
994
|
+
await Promise.all(pathsToResolve.map(async (p) => (oObjectPageContext as ODataV4Context).requestObject(p).catch(() => undefined)));
|
|
995
|
+
return build();
|
|
973
996
|
}
|
|
974
997
|
|
|
975
998
|
_executeHeaderShortcut(sId: string): void {
|
|
@@ -1527,55 +1550,6 @@ class ObjectPageController extends PageController {
|
|
|
1527
1550
|
}
|
|
1528
1551
|
}
|
|
1529
1552
|
|
|
1530
|
-
/**
|
|
1531
|
-
* Method to update the Breadcrumbs' links and the corresponding href when the context changes.
|
|
1532
|
-
* @param source Breadcrumbs control
|
|
1533
|
-
* @returns A Promise that is resolved when the Breadcrumbs content is filled properly
|
|
1534
|
-
* @private
|
|
1535
|
-
*/
|
|
1536
|
-
async setBreadcrumbLinks(source: BreadCrumbs): Promise<void> {
|
|
1537
|
-
const context = source.getBindingContext(),
|
|
1538
|
-
appComponent = this.getAppComponent(),
|
|
1539
|
-
promises: Promise<TitleInformation>[] = [],
|
|
1540
|
-
newPath = context?.getPath(),
|
|
1541
|
-
pathParts = newPath?.split("/") ?? [],
|
|
1542
|
-
metaModel = appComponent && appComponent.getMetaModel();
|
|
1543
|
-
let path = "";
|
|
1544
|
-
try {
|
|
1545
|
-
pathParts.shift();
|
|
1546
|
-
pathParts.splice(-1, 1);
|
|
1547
|
-
pathParts.forEach(function (pathPart: string) {
|
|
1548
|
-
path += `/${pathPart}`;
|
|
1549
|
-
if (!appComponent.getRouter().getRouteInfoByHash(path)) {
|
|
1550
|
-
return;
|
|
1551
|
-
}
|
|
1552
|
-
const rootViewController = appComponent.getRootViewController();
|
|
1553
|
-
const parameterPath = metaModel.getMetaPath(path);
|
|
1554
|
-
const resultContext = metaModel.getObject(`${parameterPath}/@com.sap.vocabularies.Common.v1.ResultContext`);
|
|
1555
|
-
if (resultContext) {
|
|
1556
|
-
// We dont need to create a breadcrumb for Parameter path
|
|
1557
|
-
return;
|
|
1558
|
-
}
|
|
1559
|
-
promises.push(rootViewController.getTitleInfoFromPath(path));
|
|
1560
|
-
});
|
|
1561
|
-
const titleHierarchyInfos: TitleInformation[] = await Promise.all(promises);
|
|
1562
|
-
let hierarchyPosition, link;
|
|
1563
|
-
for (const titleHierarchyInfo of titleHierarchyInfos) {
|
|
1564
|
-
hierarchyPosition = titleHierarchyInfos.indexOf(titleHierarchyInfo);
|
|
1565
|
-
link = source.getLinks()[hierarchyPosition] ? source.getLinks()[hierarchyPosition] : new Link();
|
|
1566
|
-
//sCurrentEntity is a fallback value in case of empty title
|
|
1567
|
-
link.setText(titleHierarchyInfo.subtitle || titleHierarchyInfo.title);
|
|
1568
|
-
//We apply an additional encodeURI in case of special characters (ie "/") used in the url through the semantic keys
|
|
1569
|
-
link.setHref(encodeURI(titleHierarchyInfo.intent!));
|
|
1570
|
-
if (!source.getLinks()[hierarchyPosition]) {
|
|
1571
|
-
source.addLink(link);
|
|
1572
|
-
}
|
|
1573
|
-
}
|
|
1574
|
-
} catch (error: unknown) {
|
|
1575
|
-
Log.error("Error while setting the breadcrumb links:" + error);
|
|
1576
|
-
}
|
|
1577
|
-
}
|
|
1578
|
-
|
|
1579
1553
|
_checkDataPointTitleForExternalNavigation(): void {
|
|
1580
1554
|
const oView = this.getView();
|
|
1581
1555
|
const oInternalModelContext = oView.getBindingContext("internal") as InternalModelContext;
|
|
@@ -1936,8 +1910,7 @@ class ObjectPageController extends PageController {
|
|
|
1936
1910
|
},
|
|
1937
1911
|
|
|
1938
1912
|
closeCollaborationStrip: function (this: ObjectPageController): void {
|
|
1939
|
-
|
|
1940
|
-
(this.getView().byId("fe::ObjectPageDynamicHeaderTitle::ExpandedCollaborationStrip") as MessageStrip)?.setVisible(false);
|
|
1913
|
+
this.getView().getModel("ui").setProperty("/showCollaborationStrip", false);
|
|
1941
1914
|
},
|
|
1942
1915
|
|
|
1943
1916
|
closeOPMessageStrip: function (this: ObjectPageController): void {
|