@sapui5/sap.fe.templates 1.138.0 → 1.140.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.
Files changed (85) hide show
  1. package/package.json +1 -1
  2. package/src/sap/fe/templates/.library +1 -1
  3. package/src/sap/fe/templates/AnalyticalListPage/manifest.json +1 -1
  4. package/src/sap/fe/templates/ListComponent.js +4 -1
  5. package/src/sap/fe/templates/ListComponent.ts +4 -0
  6. package/src/sap/fe/templates/ListReport/ListReport.view.xml +93 -62
  7. package/src/sap/fe/templates/ListReport/ListReportController.controller.js +57 -5
  8. package/src/sap/fe/templates/ListReport/ListReportController.controller.ts +58 -4
  9. package/src/sap/fe/templates/ListReport/controls/MultipleModeControl.js +36 -8
  10. package/src/sap/fe/templates/ListReport/controls/MultipleModeControl.ts +25 -11
  11. package/src/sap/fe/templates/ListReport/designtime/ListReport.designtime.js +3 -1
  12. package/src/sap/fe/templates/ListReport/designtime/ListReport.designtime.ts +2 -0
  13. package/src/sap/fe/templates/ListReport/manifest.json +1 -1
  14. package/src/sap/fe/templates/ObjectPage/Component.js +17 -22
  15. package/src/sap/fe/templates/ObjectPage/Component.ts +9 -9
  16. package/src/sap/fe/templates/ObjectPage/ObjectPage.view.xml +4 -5
  17. package/src/sap/fe/templates/ObjectPage/ObjectPageController.controller.js +11 -54
  18. package/src/sap/fe/templates/ObjectPage/ObjectPageController.controller.ts +13 -56
  19. package/src/sap/fe/templates/ObjectPage/ObjectPageTemplating.js +21 -17
  20. package/src/sap/fe/templates/ObjectPage/ObjectPageTemplating.ts +19 -14
  21. package/src/sap/fe/templates/ObjectPage/card/BaseCardContentProvider.js +1 -2
  22. package/src/sap/fe/templates/ObjectPage/card/BaseCardContentProvider.ts +0 -1
  23. package/src/sap/fe/templates/ObjectPage/card/Generator.js +1 -2
  24. package/src/sap/fe/templates/ObjectPage/card/Generator.ts +0 -1
  25. package/src/sap/fe/templates/ObjectPage/card/facets/HeaderContent.js +1 -2
  26. package/src/sap/fe/templates/ObjectPage/card/facets/HeaderContent.ts +0 -1
  27. package/src/sap/fe/templates/ObjectPage/card/facets/HeaderTitle.js +1 -2
  28. package/src/sap/fe/templates/ObjectPage/card/facets/HeaderTitle.ts +0 -1
  29. package/src/sap/fe/templates/ObjectPage/components/CollaborationDraft.js +16 -6
  30. package/src/sap/fe/templates/ObjectPage/components/CollaborationDraft.tsx +15 -5
  31. package/src/sap/fe/templates/ObjectPage/components/DraftToggle.js +30 -15
  32. package/src/sap/fe/templates/ObjectPage/components/DraftToggle.tsx +14 -4
  33. package/src/sap/fe/templates/ObjectPage/designtime/ObjectPage.designtime.js +3 -1
  34. package/src/sap/fe/templates/ObjectPage/designtime/ObjectPage.designtime.ts +2 -0
  35. package/src/sap/fe/templates/ObjectPage/manifest.json +1 -1
  36. package/src/sap/fe/templates/ObjectPage/overrides/MessageHandler.js +15 -1
  37. package/src/sap/fe/templates/ObjectPage/overrides/MessageHandler.ts +16 -0
  38. package/src/sap/fe/templates/ObjectPage/view/fragments/Actions.fragment.xml +25 -6
  39. package/src/sap/fe/templates/ObjectPage/view/fragments/Heading.fragment.xml +2 -2
  40. package/src/sap/fe/templates/ObjectPage/view/fragments/ObjectPageHeaderForm.fragment.xml +7 -2
  41. package/src/sap/fe/templates/library.js +1 -1
  42. package/src/sap/fe/templates/messagebundle.properties +5 -6
  43. package/src/sap/fe/templates/messagebundle_ar.properties +2 -2
  44. package/src/sap/fe/templates/messagebundle_bg.properties +2 -2
  45. package/src/sap/fe/templates/messagebundle_ca.properties +1 -1
  46. package/src/sap/fe/templates/messagebundle_cnr.properties +2 -2
  47. package/src/sap/fe/templates/messagebundle_cs.properties +1 -1
  48. package/src/sap/fe/templates/messagebundle_da.properties +2 -2
  49. package/src/sap/fe/templates/messagebundle_de.properties +1 -1
  50. package/src/sap/fe/templates/messagebundle_en.properties +2 -2
  51. package/src/sap/fe/templates/messagebundle_en_GB.properties +2 -2
  52. package/src/sap/fe/templates/messagebundle_en_US_saprigi.properties +2 -4
  53. package/src/sap/fe/templates/messagebundle_es.properties +2 -2
  54. package/src/sap/fe/templates/messagebundle_es_MX.properties +1 -1
  55. package/src/sap/fe/templates/messagebundle_et.properties +1 -1
  56. package/src/sap/fe/templates/messagebundle_fi.properties +2 -2
  57. package/src/sap/fe/templates/messagebundle_fr.properties +1 -1
  58. package/src/sap/fe/templates/messagebundle_fr_CA.properties +3 -3
  59. package/src/sap/fe/templates/messagebundle_hi.properties +1 -1
  60. package/src/sap/fe/templates/messagebundle_hr.properties +2 -2
  61. package/src/sap/fe/templates/messagebundle_hu.properties +2 -2
  62. package/src/sap/fe/templates/messagebundle_id.properties +1 -1
  63. package/src/sap/fe/templates/messagebundle_it.properties +2 -2
  64. package/src/sap/fe/templates/messagebundle_ja.properties +1 -1
  65. package/src/sap/fe/templates/messagebundle_kk.properties +1 -1
  66. package/src/sap/fe/templates/messagebundle_ko.properties +1 -1
  67. package/src/sap/fe/templates/messagebundle_lt.properties +1 -1
  68. package/src/sap/fe/templates/messagebundle_lv.properties +2 -2
  69. package/src/sap/fe/templates/messagebundle_mk.properties +1 -1
  70. package/src/sap/fe/templates/messagebundle_no.properties +1 -1
  71. package/src/sap/fe/templates/messagebundle_pl.properties +1 -1
  72. package/src/sap/fe/templates/messagebundle_pt.properties +1 -1
  73. package/src/sap/fe/templates/messagebundle_pt_PT.properties +1 -1
  74. package/src/sap/fe/templates/messagebundle_ro.properties +1 -1
  75. package/src/sap/fe/templates/messagebundle_sh.properties +2 -2
  76. package/src/sap/fe/templates/messagebundle_sk.properties +2 -2
  77. package/src/sap/fe/templates/messagebundle_sl.properties +1 -1
  78. package/src/sap/fe/templates/messagebundle_sr.properties +2 -2
  79. package/src/sap/fe/templates/messagebundle_sv.properties +1 -1
  80. package/src/sap/fe/templates/messagebundle_th.properties +2 -2
  81. package/src/sap/fe/templates/messagebundle_tr.properties +1 -1
  82. package/src/sap/fe/templates/messagebundle_uk.properties +1 -1
  83. package/src/sap/fe/templates/messagebundle_vi.properties +1 -1
  84. package/src/sap/fe/templates/messagebundle_zh_CN.properties +1 -1
  85. 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,15 +50,14 @@ 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";
60
57
  import type ToolbarSpacer from "sap/m/ToolbarSpacer";
61
58
  import Device from "sap/ui/Device";
62
59
  import type UI5Event from "sap/ui/base/Event";
60
+ import type { CommandExecution$ExecuteEvent } from "sap/ui/core/CommandExecution";
63
61
  import type Control from "sap/ui/core/Control";
64
62
  import UI5Element from "sap/ui/core/Element";
65
63
  import type InvisibleText from "sap/ui/core/InvisibleText";
@@ -82,7 +80,6 @@ import type ODataV4Context from "sap/ui/model/odata/v4/Context";
82
80
  import type ODataContextBinding from "sap/ui/model/odata/v4/ODataContextBinding";
83
81
  import type ODataListBinding from "sap/ui/model/odata/v4/ODataListBinding";
84
82
  import type ODataModel from "sap/ui/model/odata/v4/ODataModel";
85
- import type BreadCrumbs from "sap/uxap/BreadCrumbs";
86
83
  import type ObjectPageDynamicHeaderTitle from "sap/uxap/ObjectPageDynamicHeaderTitle";
87
84
  import type ObjectPageLayout from "sap/uxap/ObjectPageLayout";
88
85
  import type ObjectPageSection from "sap/uxap/ObjectPageSection";
@@ -106,6 +103,7 @@ export type BindingParams = {
106
103
  };
107
104
 
108
105
  const ProgrammingModel = FELibrary.ProgrammingModel;
106
+
109
107
  @defineUI5Class("sap.fe.templates.ObjectPage.ObjectPageController")
110
108
  class ObjectPageController extends PageController {
111
109
  oView!: FEView;
@@ -254,6 +252,11 @@ class ObjectPageController extends PageController {
254
252
  *
255
253
  */
256
254
  _fnShowOPMessage(): void {
255
+ if (this.getAppComponent().isSuspended()) {
256
+ // If the app is suspended, we do not show the messages (the MessageModel contains messages from the active app).
257
+ return;
258
+ }
259
+
257
260
  const extensionAPI = this.getExtensionAPI();
258
261
  const view = this.getView();
259
262
  const messages = Messaging?.getMessageModel()
@@ -1210,6 +1213,9 @@ class ObjectPageController extends PageController {
1210
1213
  );
1211
1214
  }
1212
1215
  });
1216
+ const isSkipBindingToView = skipBindingToView as unknown as CommandExecution$ExecuteEvent;
1217
+ const isStandardSave =
1218
+ isSkipBindingToView && typeof isSkipBindingToView == "object" && isSkipBindingToView.getSource().getCommand() === "Save";
1213
1219
 
1214
1220
  const bindings = await Promise.all(awaitCreateDocuments);
1215
1221
  // We need to either reject or resolve a promise here and return it since this save
@@ -1222,7 +1228,8 @@ class ObjectPageController extends PageController {
1222
1228
  bExecuteSideEffectsOnError: executeSideEffectsOnError,
1223
1229
  bindings: bindings as unknown as ODataListBinding[],
1224
1230
  mergePatchDraft: this.mergePatchDraft,
1225
- skipBindingToView
1231
+ skipBindingToView,
1232
+ isStandardSave
1226
1233
  });
1227
1234
  } catch (error: unknown) {
1228
1235
  // If the saveDocument in editFlow returns errors we need
@@ -1527,55 +1534,6 @@ class ObjectPageController extends PageController {
1527
1534
  }
1528
1535
  }
1529
1536
 
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
1537
  _checkDataPointTitleForExternalNavigation(): void {
1580
1538
  const oView = this.getView();
1581
1539
  const oInternalModelContext = oView.getBindingContext("internal") as InternalModelContext;
@@ -1936,8 +1894,7 @@ class ObjectPageController extends PageController {
1936
1894
  },
1937
1895
 
1938
1896
  closeCollaborationStrip: function (this: ObjectPageController): void {
1939
- (this.getView().byId("fe::ObjectPageDynamicHeaderTitle::SnappedCollaborationStrip") as MessageStrip)?.setVisible(false);
1940
- (this.getView().byId("fe::ObjectPageDynamicHeaderTitle::ExpandedCollaborationStrip") as MessageStrip)?.setVisible(false);
1897
+ this.getView().getModel("ui").setProperty("/showCollaborationStrip", false);
1941
1898
  },
1942
1899
 
1943
1900
  closeOPMessageStrip: function (this: ObjectPageController): void {