@sapui5/sap.fe.templates 1.111.1 → 1.112.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 (129) 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-dbg.js +1 -1
  5. package/src/sap/fe/templates/ListComponent.ts +2 -0
  6. package/src/sap/fe/templates/ListReport/Component-dbg.js +1 -1
  7. package/src/sap/fe/templates/ListReport/Component.ts +2 -0
  8. package/src/sap/fe/templates/ListReport/ExtensionAPI-dbg.js +2 -1
  9. package/src/sap/fe/templates/ListReport/ExtensionAPI.js.map +1 -1
  10. package/src/sap/fe/templates/ListReport/ExtensionAPI.ts +3 -0
  11. package/src/sap/fe/templates/ListReport/LRMessageStrip-dbg.js +1 -1
  12. package/src/sap/fe/templates/ListReport/LRMessageStrip.ts +4 -0
  13. package/src/sap/fe/templates/ListReport/ListReportController-dbg.controller.js +37 -32
  14. package/src/sap/fe/templates/ListReport/ListReportController.controller.js +1 -1
  15. package/src/sap/fe/templates/ListReport/ListReportController.controller.js.map +1 -1
  16. package/src/sap/fe/templates/ListReport/ListReportController.controller.ts +58 -52
  17. package/src/sap/fe/templates/ListReport/controls/MultipleModeControl-dbg.js +32 -8
  18. package/src/sap/fe/templates/ListReport/controls/MultipleModeControl.js +1 -1
  19. package/src/sap/fe/templates/ListReport/controls/MultipleModeControl.js.map +1 -1
  20. package/src/sap/fe/templates/ListReport/controls/MultipleModeControl.ts +38 -7
  21. package/src/sap/fe/templates/ListReport/manifest.json +1 -1
  22. package/src/sap/fe/templates/ListReport/overrides/ViewState-dbg.js +47 -7
  23. package/src/sap/fe/templates/ListReport/overrides/ViewState.js +1 -1
  24. package/src/sap/fe/templates/ListReport/overrides/ViewState.js.map +1 -1
  25. package/src/sap/fe/templates/ListReport/overrides/ViewState.ts +49 -6
  26. package/src/sap/fe/templates/ListReport/view/fragments/MacroChart.fragment.xml +1 -1
  27. package/src/sap/fe/templates/ListReport/view/fragments/MultipleMode.block-dbg.js +122 -0
  28. package/src/sap/fe/templates/ListReport/view/fragments/{MultipleMode.fragment.js → MultipleMode.block.js} +3 -3
  29. package/src/sap/fe/templates/ListReport/view/fragments/MultipleMode.block.js.map +1 -0
  30. package/src/sap/fe/templates/ListReport/view/fragments/{MultipleMode.fragment.ts → MultipleMode.block.ts} +14 -15
  31. package/src/sap/fe/templates/ObjectPage/Component-dbg.js +11 -2
  32. package/src/sap/fe/templates/ObjectPage/Component.js +1 -1
  33. package/src/sap/fe/templates/ObjectPage/Component.js.map +1 -1
  34. package/src/sap/fe/templates/ObjectPage/Component.ts +12 -0
  35. package/src/sap/fe/templates/ObjectPage/ExtensionAPI-dbg.js +8 -12
  36. package/src/sap/fe/templates/ObjectPage/ExtensionAPI.js +1 -1
  37. package/src/sap/fe/templates/ObjectPage/ExtensionAPI.js.map +1 -1
  38. package/src/sap/fe/templates/ObjectPage/ExtensionAPI.ts +9 -12
  39. package/src/sap/fe/templates/ObjectPage/ObjectPage.view.xml +3 -2
  40. package/src/sap/fe/templates/ObjectPage/ObjectPageController-dbg.controller.js +38 -90
  41. package/src/sap/fe/templates/ObjectPage/ObjectPageController.controller.js +1 -1
  42. package/src/sap/fe/templates/ObjectPage/ObjectPageController.controller.js.map +1 -1
  43. package/src/sap/fe/templates/ObjectPage/ObjectPageController.controller.ts +65 -104
  44. package/src/sap/fe/templates/ObjectPage/ObjectPageTemplating-dbg.js +44 -146
  45. package/src/sap/fe/templates/ObjectPage/ObjectPageTemplating.js +1 -1
  46. package/src/sap/fe/templates/ObjectPage/ObjectPageTemplating.js.map +1 -1
  47. package/src/sap/fe/templates/ObjectPage/ObjectPageTemplating.ts +60 -185
  48. package/src/sap/fe/templates/ObjectPage/components/DraftHandlerButton.block-dbg.js +145 -0
  49. package/src/sap/fe/templates/ObjectPage/components/DraftHandlerButton.block.js +6 -0
  50. package/src/sap/fe/templates/ObjectPage/components/DraftHandlerButton.block.js.map +1 -0
  51. package/src/sap/fe/templates/ObjectPage/components/{DraftHandlerButton.tsx → DraftHandlerButton.block.tsx} +15 -12
  52. package/src/sap/fe/templates/ObjectPage/controls/StashableHBox-dbg.js +1 -1
  53. package/src/sap/fe/templates/ObjectPage/controls/StashableHBox.ts +1 -0
  54. package/src/sap/fe/templates/ObjectPage/controls/SubSectionBlock-dbg.js +2 -1
  55. package/src/sap/fe/templates/ObjectPage/controls/SubSectionBlock.js.map +1 -1
  56. package/src/sap/fe/templates/ObjectPage/controls/SubSectionBlock.ts +5 -0
  57. package/src/sap/fe/templates/ObjectPage/manifest.json +1 -1
  58. package/src/sap/fe/templates/ObjectPage/overrides/Share.js.map +1 -1
  59. package/src/sap/fe/templates/ObjectPage/view/fragments/Actions.fragment.xml +4 -3
  60. package/src/sap/fe/templates/ObjectPage/view/fragments/FooterContent.block-dbg.js +257 -0
  61. package/src/sap/fe/templates/ObjectPage/view/fragments/FooterContent.block.js +6 -0
  62. package/src/sap/fe/templates/ObjectPage/view/fragments/FooterContent.block.js.map +1 -0
  63. package/src/sap/fe/templates/ObjectPage/view/fragments/FooterContent.block.tsx +280 -0
  64. package/src/sap/fe/templates/ObjectPage/view/fragments/Section.fragment.xml +8 -33
  65. package/src/sap/fe/templates/ObjectPage/view/fragments/SectionContent.fragment.xml +144 -112
  66. package/src/sap/fe/templates/ObjectPage/view/fragments/SectionEmbeddedComponent.fragment.xml +24 -0
  67. package/src/sap/fe/templates/library-dbg.js +6 -5
  68. package/src/sap/fe/templates/library-preload.js +26 -22
  69. package/src/sap/fe/templates/library-preload.js.map +1 -1
  70. package/src/sap/fe/templates/library.js +1 -1
  71. package/src/sap/fe/templates/library.js.map +1 -1
  72. package/src/sap/fe/templates/library.ts +6 -4
  73. package/src/sap/fe/templates/manifest.json +1 -1
  74. package/src/sap/fe/templates/messagebundle.properties +5 -0
  75. package/src/sap/fe/templates/messagebundle_ar.properties +3 -0
  76. package/src/sap/fe/templates/messagebundle_bg.properties +3 -0
  77. package/src/sap/fe/templates/messagebundle_ca.properties +3 -0
  78. package/src/sap/fe/templates/messagebundle_cs.properties +3 -0
  79. package/src/sap/fe/templates/messagebundle_cy.properties +3 -0
  80. package/src/sap/fe/templates/messagebundle_da.properties +3 -0
  81. package/src/sap/fe/templates/messagebundle_de.properties +3 -0
  82. package/src/sap/fe/templates/messagebundle_el.properties +3 -0
  83. package/src/sap/fe/templates/messagebundle_en.properties +5 -0
  84. package/src/sap/fe/templates/messagebundle_en_GB.properties +3 -0
  85. package/src/sap/fe/templates/messagebundle_en_US_sappsd.properties +3 -0
  86. package/src/sap/fe/templates/messagebundle_en_US_saprigi.properties +3 -0
  87. package/src/sap/fe/templates/messagebundle_en_US_saptrc.properties +3 -0
  88. package/src/sap/fe/templates/messagebundle_es.properties +5 -2
  89. package/src/sap/fe/templates/messagebundle_es_MX.properties +3 -0
  90. package/src/sap/fe/templates/messagebundle_et.properties +5 -2
  91. package/src/sap/fe/templates/messagebundle_fi.properties +3 -0
  92. package/src/sap/fe/templates/messagebundle_fr.properties +3 -0
  93. package/src/sap/fe/templates/messagebundle_fr_CA.properties +3 -0
  94. package/src/sap/fe/templates/messagebundle_hi.properties +3 -0
  95. package/src/sap/fe/templates/messagebundle_hr.properties +3 -0
  96. package/src/sap/fe/templates/messagebundle_hu.properties +3 -0
  97. package/src/sap/fe/templates/messagebundle_id.properties +3 -0
  98. package/src/sap/fe/templates/messagebundle_it.properties +3 -0
  99. package/src/sap/fe/templates/messagebundle_iw.properties +3 -0
  100. package/src/sap/fe/templates/messagebundle_ja.properties +3 -0
  101. package/src/sap/fe/templates/messagebundle_kk.properties +3 -0
  102. package/src/sap/fe/templates/messagebundle_ko.properties +3 -0
  103. package/src/sap/fe/templates/messagebundle_lt.properties +3 -0
  104. package/src/sap/fe/templates/messagebundle_lv.properties +3 -0
  105. package/src/sap/fe/templates/messagebundle_ms.properties +3 -0
  106. package/src/sap/fe/templates/messagebundle_nl.properties +3 -0
  107. package/src/sap/fe/templates/messagebundle_no.properties +3 -0
  108. package/src/sap/fe/templates/messagebundle_pl.properties +3 -0
  109. package/src/sap/fe/templates/messagebundle_pt.properties +3 -0
  110. package/src/sap/fe/templates/messagebundle_pt_PT.properties +3 -0
  111. package/src/sap/fe/templates/messagebundle_ro.properties +5 -2
  112. package/src/sap/fe/templates/messagebundle_ru.properties +3 -0
  113. package/src/sap/fe/templates/messagebundle_sh.properties +5 -2
  114. package/src/sap/fe/templates/messagebundle_sk.properties +3 -0
  115. package/src/sap/fe/templates/messagebundle_sl.properties +3 -0
  116. package/src/sap/fe/templates/messagebundle_sv.properties +3 -0
  117. package/src/sap/fe/templates/messagebundle_th.properties +5 -2
  118. package/src/sap/fe/templates/messagebundle_tr.properties +3 -0
  119. package/src/sap/fe/templates/messagebundle_uk.properties +3 -0
  120. package/src/sap/fe/templates/messagebundle_vi.properties +5 -2
  121. package/src/sap/fe/templates/messagebundle_zh_CN.properties +5 -2
  122. package/src/sap/fe/templates/messagebundle_zh_TW.properties +3 -0
  123. package/src/sap/fe/templates/ListReport/view/fragments/MultipleMode-dbg.fragment.js +0 -123
  124. package/src/sap/fe/templates/ListReport/view/fragments/MultipleMode.fragment.js.map +0 -1
  125. package/src/sap/fe/templates/ObjectPage/components/DraftHandlerButton-dbg.js +0 -147
  126. package/src/sap/fe/templates/ObjectPage/components/DraftHandlerButton.js +0 -6
  127. package/src/sap/fe/templates/ObjectPage/components/DraftHandlerButton.js.map +0 -1
  128. package/src/sap/fe/templates/ObjectPage/view/fragments/FooterContent.fragment.xml +0 -125
  129. package/src/sap/fe/templates/ObjectPage/view/fragments/SectionContentLazyLoader.fragment.xml +0 -199
@@ -1,4 +1,3 @@
1
- import type ResourceBundle from "sap/base/i18n/ResourceBundle";
2
1
  import Log from "sap/base/Log";
3
2
  import merge from "sap/base/util/merge";
4
3
  import ActionRuntime from "sap/fe/core/ActionRuntime";
@@ -20,9 +19,11 @@ import ViewState from "sap/fe/core/controllerextensions/ViewState";
20
19
  import { defineUI5Class, extensible, finalExtension, publicExtension, usingExtension } from "sap/fe/core/helpers/ClassSupport";
21
20
  import type { InternalModelContext } from "sap/fe/core/helpers/ModelHelper";
22
21
  import ModelHelper from "sap/fe/core/helpers/ModelHelper";
22
+ import { getResourceModel } from "sap/fe/core/helpers/ResourceModelHelper";
23
23
  import PageController from "sap/fe/core/PageController";
24
24
  import CommonHelper from "sap/fe/macros/CommonHelper";
25
25
  import DelegateUtil from "sap/fe/macros/DelegateUtil";
26
+ import TableHelper from "sap/fe/macros/table/TableHelper";
26
27
  import TableUtils from "sap/fe/macros/table/Utils";
27
28
  import SelectionVariant from "sap/fe/navigation/SelectionVariant";
28
29
  import type { default as ObjectPageExtensionAPI } from "sap/fe/templates/ObjectPage/ExtensionAPI";
@@ -42,7 +43,6 @@ import type Context from "sap/ui/model/odata/v4/Context";
42
43
  import ODataContextBinding from "sap/ui/model/odata/v4/ODataContextBinding";
43
44
  import ODataListBinding from "sap/ui/model/odata/v4/ODataListBinding";
44
45
  import type ODataModel from "sap/ui/model/odata/v4/ODataModel";
45
- import type ResourceModel from "sap/ui/model/resource/ResourceModel";
46
46
  import type BreadCrumbs from "sap/uxap/BreadCrumbs";
47
47
  import type ObjectPageDynamicHeaderTitle from "sap/uxap/ObjectPageDynamicHeaderTitle";
48
48
  import type ObjectPageLayout from "sap/uxap/ObjectPageLayout";
@@ -58,18 +58,25 @@ import ViewStateOverrides from "./overrides/ViewState";
58
58
  @defineUI5Class("sap.fe.templates.ObjectPage.ObjectPageController")
59
59
  class ObjectPageController extends PageController {
60
60
  oView!: any;
61
+
61
62
  @usingExtension(Placeholder)
62
63
  placeholder!: Placeholder;
64
+
63
65
  @usingExtension(Share.override(ShareOverrides))
64
66
  share!: Share;
67
+
65
68
  @usingExtension(InternalRouting.override(InternalRoutingOverride))
66
69
  _routing!: InternalRouting;
70
+
67
71
  @usingExtension(Paginator.override(PaginatorOverride))
68
72
  paginator!: Paginator;
73
+
69
74
  @usingExtension(MessageHandler.override(MessageHandlerOverride))
70
75
  messageHandler!: MessageHandler;
76
+
71
77
  @usingExtension(IntentBasedNavigation.override(IntentBasedNavigationOverride))
72
78
  intentBasedNavigation!: IntentBasedNavigation;
79
+
73
80
  @usingExtension(
74
81
  InternalIntentBasedNavigation.override({
75
82
  getNavigationMode: function (this: InternalIntentBasedNavigation) {
@@ -81,8 +88,10 @@ class ObjectPageController extends PageController {
81
88
  })
82
89
  )
83
90
  _intentBasedNavigation!: InternalIntentBasedNavigation;
91
+
84
92
  @usingExtension(ViewState.override(ViewStateOverrides))
85
93
  viewState!: ViewState;
94
+
86
95
  @usingExtension(
87
96
  PageReady.override({
88
97
  isContextExpected: function () {
@@ -91,14 +100,20 @@ class ObjectPageController extends PageController {
91
100
  })
92
101
  )
93
102
  pageReady!: PageReady;
103
+
94
104
  @usingExtension(MassEdit)
95
105
  massEdit!: MassEdit;
106
+
96
107
  private mCustomSectionExtensionAPIs?: Record<string, ObjectPageExtensionAPI>;
108
+
97
109
  protected extensionAPI?: ObjectPageExtensionAPI;
98
- private oResourceBundle?: ResourceBundle;
110
+
99
111
  private bSectionNavigated?: boolean;
112
+
100
113
  private switchDraftAndActivePopOver?: Popover;
114
+
101
115
  private currentBinding?: Binding;
116
+
102
117
  private messageButton: any;
103
118
 
104
119
  @publicExtension()
@@ -133,7 +148,7 @@ class ObjectPageController extends PageController {
133
148
  });
134
149
  oInternalModelContext?.setProperty("batchGroups", this._getBatchGroupsForView());
135
150
  oInternalModelContext?.setProperty("errorNavigationSectionFlag", false);
136
- if (!(this.getView().getViewData() as any).useNewLazyLoading && (oObjectPage as any).getEnableLazyLoading()) {
151
+ if (oObjectPage.getEnableLazyLoading()) {
137
152
  //Attaching the event to make the subsection context binding active when it is visible.
138
153
  oObjectPage.attachEvent("subSectionEnteredViewPort", this._handleSubSectionEnteredViewPort.bind(this));
139
154
  }
@@ -203,16 +218,6 @@ class ObjectPageController extends PageController {
203
218
  }
204
219
  }
205
220
 
206
- onAfterRendering() {
207
- ((this.getView().getModel("sap.fe.i18n") as ResourceModel).getResourceBundle() as Promise<ResourceBundle>)
208
- .then((response: any) => {
209
- this.oResourceBundle = response;
210
- })
211
- .catch(function (oError: any) {
212
- Log.error("Error while retrieving the resource bundle", oError);
213
- });
214
- }
215
-
216
221
  _onBeforeBinding(oContext: any, mParameters: any) {
217
222
  // TODO: we should check how this comes together with the transaction helper, same to the change in the afterBinding
218
223
  const aTables = this._findTables(),
@@ -233,8 +238,8 @@ class ObjectPageController extends PageController {
233
238
  !aBatchGroups.some(opContext.getModel().hasPendingChanges.bind(opContext.getModel()))
234
239
  ) {
235
240
  /* In case there are pending changes for the creation row and no others we need to reset the changes
236
- TODO: this is just a quick solution, this needs to be reworked
237
- */
241
+ TODO: this is just a quick solution, this needs to be reworked
242
+ */
238
243
 
239
244
  opContext.getBinding().resetChanges();
240
245
  }
@@ -281,9 +286,9 @@ class ObjectPageController extends PageController {
281
286
  // if the binding type is not ODataListBinding because of a deeplink navigation or a refresh of the page
282
287
  // we need to create it
283
288
  const sBindingPath = oBinding.getPath();
284
- if (/\([^\)]*\)$/.test(sBindingPath)) {
289
+ if (/\([^)]*\)$/.test(sBindingPath)) {
285
290
  // The current binding path ends with (xxx), so we create the listBinding by removing (xxx)
286
- const sListBindingPath = sBindingPath.replace(/\([^\)]*\)$/, "");
291
+ const sListBindingPath = sBindingPath.replace(/\([^)]*\)$/, "");
287
292
  oBinding = new (ODataListBinding as any)(oBinding.oModel, sListBindingPath);
288
293
  const _setListBindingAsync = () => {
289
294
  if (oBinding.getContexts().length > 0) {
@@ -301,7 +306,8 @@ class ObjectPageController extends PageController {
301
306
  }
302
307
  }
303
308
  }
304
- if (!(this.getView().getViewData() as any).useNewLazyLoading && oObjectPage.getEnableLazyLoading()) {
309
+
310
+ if (oObjectPage.getEnableLazyLoading()) {
305
311
  const aSections = oObjectPage.getSections();
306
312
  const bUseIconTabBar = oObjectPage.getUseIconTabBar();
307
313
  let iSkip = 2;
@@ -339,7 +345,7 @@ class ObjectPageController extends PageController {
339
345
  // Due to the left alignment of the Draft switch and the collaborative draft avatar controls
340
346
  // there is a ToolbarSpacer in the actions aggregation which we need to exclude here!
341
347
  // Due to the ACC report, we also need not to check for the InvisibleText elements
342
- if (oAction.isA("sap.fe.macros.ShareAPI")) {
348
+ if (oAction.isA("sap.fe.macros.share.ShareAPI")) {
343
349
  // since ShareAPI does not have a disable property
344
350
  // hence there is no need to check if it is disbaled or not
345
351
  return oAction.getVisible();
@@ -504,44 +510,6 @@ class ObjectPageController extends PageController {
504
510
 
505
511
  let oModel: any, oFinalUIState: any;
506
512
 
507
- // TODO: this should be moved into an init event of the MDC tables (not yet existing) and should be part
508
- // of any controller extension
509
- /**
510
- * @param oTable
511
- * @param oListBinding
512
- */
513
- async function enableFastCreationRow(oTable: any, oListBinding: any) {
514
- const oFastCreationRow = oTable.getCreationRow();
515
- let oFastCreationListBinding, oFastCreationContext;
516
-
517
- if (oFastCreationRow) {
518
- try {
519
- await oFinalUIState;
520
- if (oFastCreationRow.getModel("ui").getProperty("/isEditable")) {
521
- oFastCreationListBinding = oModel.bindList(oListBinding.getPath(), oListBinding.getContext(), [], [], {
522
- $$updateGroupId: "doNotSubmit",
523
- $$groupId: "doNotSubmit"
524
- });
525
- // Workaround suggested by OData model v4 colleagues
526
- oFastCreationListBinding.refreshInternal = function () {
527
- /* do nothing */
528
- };
529
- oFastCreationContext = oFastCreationListBinding.create();
530
- oFastCreationRow.setBindingContext(oFastCreationContext);
531
-
532
- // this is needed to avoid console error
533
- try {
534
- await oFastCreationContext.created();
535
- } catch (e) {
536
- Log.trace("transient fast creation context deleted");
537
- }
538
- }
539
- } catch (oError: any) {
540
- Log.error("Error while computing the final UI state", oError);
541
- }
542
- }
543
- }
544
-
545
513
  // this should not be needed at the all
546
514
  /**
547
515
  * @param oTable
@@ -549,7 +517,13 @@ class ObjectPageController extends PageController {
549
517
  const handleTableModifications = (oTable: any) => {
550
518
  const oBinding = this._getTableBinding(oTable),
551
519
  fnHandleTablePatchEvents = function () {
552
- enableFastCreationRow(oTable, oBinding);
520
+ TableHelper.enableFastCreationRow(
521
+ oTable.getCreationRow(),
522
+ oBinding.getPath(),
523
+ oBinding.getContext(),
524
+ oModel,
525
+ oFinalUIState
526
+ );
553
527
  };
554
528
 
555
529
  if (!oBinding) {
@@ -574,7 +548,7 @@ class ObjectPageController extends PageController {
574
548
  oModel = oBindingContext.getModel();
575
549
 
576
550
  // Compute Edit Mode
577
- oFinalUIState = this._editFlow.computeEditMode(oBindingContext);
551
+ oFinalUIState = this.editFlow.computeEditMode(oBindingContext);
578
552
 
579
553
  if (ModelHelper.isCollaborationDraftSupported(oModel.getMetaModel())) {
580
554
  oFinalUIState
@@ -589,17 +563,8 @@ class ObjectPageController extends PageController {
589
563
  Log.error("Error while waiting for the final UI State", oError);
590
564
  });
591
565
  }
592
- // update related apps once Data is received in case of binding cache is not available
593
- // TODO: this is only a temp solution since we need to call _updateRelatedApps method only after data for Object Page is received (if there is no binding)
594
- if (oBindingContext.getBinding().oCache) {
595
- this._updateRelatedApps();
596
- } else {
597
- const fnUpdateRelatedApps = () => {
598
- this._updateRelatedApps();
599
- oBindingContext.getBinding().detachDataReceived(fnUpdateRelatedApps);
600
- };
601
- oBindingContext.getBinding().attachDataReceived(fnUpdateRelatedApps);
602
- }
566
+ // update related apps
567
+ this._updateRelatedApps();
603
568
 
604
569
  //Attach the patch sent and patch completed event to the object page binding so that we can react
605
570
  const oBinding = (oBindingContext.getBinding && oBindingContext.getBinding()) || oBindingContext;
@@ -619,10 +584,8 @@ class ObjectPageController extends PageController {
619
584
  });
620
585
  });
621
586
 
622
- if (!(this.getView().getViewData() as any).useNewLazyLoading) {
623
- // should be called only after binding is ready hence calling it in onAfterBinding
624
- (oObjectPage as any)._triggerVisibleSubSectionsEvents();
625
- }
587
+ // should be called only after binding is ready hence calling it in onAfterBinding
588
+ (oObjectPage as any)._triggerVisibleSubSectionsEvents();
626
589
 
627
590
  //To Compute the Edit Binding of the subObject page using root object page, create a context for draft root and update the edit button in sub OP using the context
628
591
  ActionRuntime.updateEditButtonVisibilityAndEnablement(this.getView());
@@ -848,24 +811,23 @@ class ObjectPageController extends PageController {
848
811
  }
849
812
 
850
813
  async _validateDocument(): Promise<void | any[] | ODataContextBinding> {
814
+ const appComponent = this.getAppComponent();
851
815
  const control = Core.byId(Core.getCurrentFocusedControlId());
852
- const context = control?.getBindingContext() as Context;
816
+ const context = control?.getBindingContext() as Context | undefined;
853
817
  if (context && !context.isTransient()) {
854
- // Wait for the pending changes before starting this validation
855
- await this._editFlow.syncTask();
856
- const appComponent = this.getAppComponent();
857
818
  const sideEffectsService = appComponent.getSideEffectsService();
858
819
  const entityType = sideEffectsService.getEntityTypeFromContext(context);
859
820
  const globalSideEffects = entityType ? sideEffectsService.getGlobalODataEntitySideEffects(entityType) : [];
860
821
  // If there is at least one global SideEffects for the related entity, execute it/them
861
822
  if (globalSideEffects.length) {
823
+ await this.editFlow.syncTask();
862
824
  return Promise.all(globalSideEffects.map((sideEffects) => this._sideEffects.requestSideEffects(sideEffects, context)));
863
- } else {
864
- const draftRootContext = await this.getDraftRootContext();
865
- //Execute the draftValidation if there is no globalSideEffects (ignore ETags in collaboration draft)
866
- if (draftRootContext) {
867
- return draft.executeDraftValidation(draftRootContext, appComponent, isConnected(this.getView()));
868
- }
825
+ }
826
+ const draftRootContext = await this.getDraftRootContext();
827
+ //Execute the draftValidation if there is no globalSideEffects (ignore ETags in collaboration draft)
828
+ if (draftRootContext) {
829
+ await this.editFlow.syncTask();
830
+ return draft.executeDraftValidation(draftRootContext, appComponent, isConnected(this.getView()));
869
831
  }
870
832
  }
871
833
  return undefined;
@@ -949,7 +911,8 @@ class ObjectPageController extends PageController {
949
911
  _updateRelatedApps() {
950
912
  const oObjectPage = this._getObjectPageLayoutControl();
951
913
  if (CommonUtils.resolveStringtoBoolean(oObjectPage.data("showRelatedApps"))) {
952
- CommonUtils.updateRelatedAppsDetails(oObjectPage);
914
+ const appComponent = CommonUtils.getAppComponent(this.getView());
915
+ CommonUtils.updateRelatedAppsDetails(oObjectPage, appComponent);
953
916
  }
954
917
  }
955
918
 
@@ -973,6 +936,11 @@ class ObjectPageController extends PageController {
973
936
  oElement = oElement[0];
974
937
  }
975
938
  }
939
+ // The table may currently be shown in a full screen dialog, we can then get the reference to the TableAPI
940
+ // control from the custom data of the place holder panel
941
+ if (oElement && oElement.isA && oElement.isA("sap.m.Panel") && oElement.data("FullScreenTablePlaceHolder")) {
942
+ oElement = oElement.data("tableAPIreference");
943
+ }
976
944
  if (oElement && oElement.isA && oElement.isA("sap.fe.macros.table.TableAPI")) {
977
945
  oElement = oElement.getContent instanceof Function && oElement.getContent();
978
946
  if (oElement && oElement.length > 0) {
@@ -986,7 +954,6 @@ class ObjectPageController extends PageController {
986
954
  gridTable: oElement.getType().isA("sap.ui.mdc.table.GridTableType")
987
955
  });
988
956
  }
989
-
990
957
  if (oElement && oElement.isA && oElement.isA("sap.fe.macros.chart.ChartAPI")) {
991
958
  oElement = oElement.getContent instanceof Function && oElement.getContent();
992
959
  if (oElement && oElement.length > 0) {
@@ -997,6 +964,7 @@ class ObjectPageController extends PageController {
997
964
  aControls.push(oElement);
998
965
  }
999
966
  }
967
+
1000
968
  if (
1001
969
  aSubSectionTables.length === 1 &&
1002
970
  aParentElement.length === 1 &&
@@ -1384,7 +1352,7 @@ class ObjectPageController extends PageController {
1384
1352
  return false;
1385
1353
  });
1386
1354
 
1387
- const oCurrentActionPromise = this._editFlow.getCurrentActionPromise();
1355
+ const oCurrentActionPromise = this.editFlow.getCurrentActionPromise();
1388
1356
  if (oCurrentActionPromise) {
1389
1357
  let aTableContexts: any;
1390
1358
  if (oTable.getType().getMetadata().isA("sap.ui.mdc.table.GridTableType")) {
@@ -1427,7 +1395,7 @@ class ObjectPageController extends PageController {
1427
1395
  } else {
1428
1396
  oTable.focusRow(iNewItemp, true);
1429
1397
  }
1430
- this._editFlow.deleteCurrentActionPromise();
1398
+ this.editFlow.deleteCurrentActionPromise();
1431
1399
  }
1432
1400
  })
1433
1401
  .catch(function (err: any) {
@@ -1527,7 +1495,7 @@ class ObjectPageController extends PageController {
1527
1495
  //TODO: Should remove this setTimeOut once Variant Management provides an api to fetch the current variant key on save
1528
1496
  setTimeout(() => {
1529
1497
  this.getExtensionAPI().updateAppState();
1530
- }, 500);
1498
+ }, 2000);
1531
1499
  },
1532
1500
  navigateToSubSection: function (oController: ObjectPageController, vDetailConfig: any) {
1533
1501
  const oDetailConfig = typeof vDetailConfig === "string" ? JSON.parse(vDetailConfig) : vDetailConfig;
@@ -1546,20 +1514,13 @@ class ObjectPageController extends PageController {
1546
1514
  oSection = oSubSection && (oSubSection.getParent() as ObjectPageSection);
1547
1515
  }
1548
1516
  if (!oSection || !oSubSection || !oSection.getVisible() || !oSubSection.getVisible()) {
1549
- ((oController.getView().getModel("sap.fe.i18n") as ResourceModel).getResourceBundle() as Promise<ResourceBundle>)
1550
- .then(function (oResourceBundle) {
1551
- const sTitle = CommonUtils.getTranslatedText(
1552
- "C_ROUTING_NAVIGATION_DISABLED_TITLE",
1553
- oResourceBundle,
1554
- undefined,
1555
- (oController.getView().getViewData() as any).entitySet
1556
- );
1557
- Log.error(sTitle);
1558
- MessageBox.error(sTitle);
1559
- })
1560
- .catch(function (error) {
1561
- Log.error(error);
1562
- });
1517
+ const sTitle = getResourceModel(oController).getText(
1518
+ "C_ROUTING_NAVIGATION_DISABLED_TITLE",
1519
+ undefined,
1520
+ (oController.getView().getViewData() as any).entitySet
1521
+ );
1522
+ Log.error(sTitle);
1523
+ MessageBox.error(sTitle);
1563
1524
  } else {
1564
1525
  oObjectPage.scrollToSection(oSubSection.getId());
1565
1526
  // trigger iapp state change