@sapui5/sap.fe.templates 1.144.0 → 1.146.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/fe/templates/.library +2 -2
- package/src/sap/fe/templates/AnalyticalListPage/Component.js +1 -1
- package/src/sap/fe/templates/AnalyticalListPage/chart/FEChartDelegate.js +1 -1
- package/src/sap/fe/templates/AnalyticalListPage/manifest.json +1 -1
- package/src/sap/fe/templates/ListComponent.js +1 -1
- package/src/sap/fe/templates/ListReport/Component.js +1 -1
- package/src/sap/fe/templates/ListReport/ExtendPageDefinition.js +1 -1
- package/src/sap/fe/templates/ListReport/ExtensionAPI.js +1 -1
- package/src/sap/fe/templates/ListReport/LRMessageStrip.js +1 -1
- package/src/sap/fe/templates/ListReport/ListReport.view.xml +8 -0
- package/src/sap/fe/templates/ListReport/ListReportController.controller.js +48 -41
- package/src/sap/fe/templates/ListReport/ListReportController.controller.ts +51 -39
- package/src/sap/fe/templates/ListReport/ListReportTemplating.js +1 -1
- package/src/sap/fe/templates/ListReport/controls/MultipleModeControl.js +23 -20
- package/src/sap/fe/templates/ListReport/controls/MultipleModeControl.ts +23 -20
- package/src/sap/fe/templates/ListReport/designtime/ListReport.designtime.helper.js +1 -1
- package/src/sap/fe/templates/ListReport/designtime/ListReport.designtime.js +1 -1
- package/src/sap/fe/templates/ListReport/manifest.json +1 -1
- package/src/sap/fe/templates/ListReport/overrides/IntentBasedNavigation.js +1 -1
- package/src/sap/fe/templates/ListReport/overrides/MessageHandler.js +1 -1
- package/src/sap/fe/templates/ListReport/overrides/Share.js +1 -1
- package/src/sap/fe/templates/ListReport/overrides/SideEffects.js +1 -1
- package/src/sap/fe/templates/ListReport/overrides/ViewState.js +3 -4
- package/src/sap/fe/templates/ListReport/overrides/ViewState.ts +1 -2
- package/src/sap/fe/templates/ListReport/view/fragments/CollectionVisualization.fragment.xml +32 -0
- package/src/sap/fe/templates/ListReport/view/fragments/MacroChart.fragment.xml +1 -0
- package/src/sap/fe/templates/ListReport/view/fragments/MultipleMode.block.js +1 -1
- package/src/sap/fe/templates/ListReport/view/fragments/Table.fragment.xml +3 -1
- package/src/sap/fe/templates/ObjectPage/Component.js +1 -1
- package/src/sap/fe/templates/ObjectPage/ExtendPageDefinition.js +1 -1
- package/src/sap/fe/templates/ObjectPage/ExtensionAPI.js +74 -3
- package/src/sap/fe/templates/ObjectPage/ExtensionAPI.ts +80 -0
- package/src/sap/fe/templates/ObjectPage/ObjectPage.view.xml +6 -1
- package/src/sap/fe/templates/ObjectPage/ObjectPageController.controller.js +50 -41
- package/src/sap/fe/templates/ObjectPage/ObjectPageController.controller.ts +61 -50
- package/src/sap/fe/templates/ObjectPage/ObjectPageTemplating.js +3 -72
- package/src/sap/fe/templates/ObjectPage/ObjectPageTemplating.ts +0 -74
- package/src/sap/fe/templates/ObjectPage/card/AdaptiveCardContent.js +1 -1
- package/src/sap/fe/templates/ObjectPage/card/BaseCardContentProvider.js +1 -1
- package/src/sap/fe/templates/ObjectPage/card/Generator.js +1 -1
- package/src/sap/fe/templates/ObjectPage/card/actions/HeaderActions.js +7 -8
- package/src/sap/fe/templates/ObjectPage/card/actions/HeaderActions.ts +5 -6
- package/src/sap/fe/templates/ObjectPage/card/facets/HeaderContent.js +1 -1
- package/src/sap/fe/templates/ObjectPage/card/facets/HeaderTitle.js +1 -1
- package/src/sap/fe/templates/ObjectPage/components/CollaborationDiscardDialog.js +1 -1
- package/src/sap/fe/templates/ObjectPage/components/CollaborationDraft.js +1 -1
- package/src/sap/fe/templates/ObjectPage/components/DraftToggle.js +76 -9
- package/src/sap/fe/templates/ObjectPage/components/DraftToggle.tsx +83 -13
- package/src/sap/fe/templates/ObjectPage/controls/StashableHBox.js +1 -1
- package/src/sap/fe/templates/ObjectPage/controls/StashableVBox.js +1 -1
- package/src/sap/fe/templates/ObjectPage/controls/SubSectionBlock.js +1 -1
- package/src/sap/fe/templates/ObjectPage/designtime/FlexBox.designtime.js +1 -1
- package/src/sap/fe/templates/ObjectPage/designtime/ObjectPage.designtime.helper.js +23 -4
- package/src/sap/fe/templates/ObjectPage/designtime/ObjectPage.designtime.helper.ts +30 -1
- package/src/sap/fe/templates/ObjectPage/designtime/ObjectPage.designtime.js +6 -3
- package/src/sap/fe/templates/ObjectPage/designtime/ObjectPage.designtime.ts +7 -0
- package/src/sap/fe/templates/ObjectPage/designtime/StashableHBox.designtime.js +1 -1
- package/src/sap/fe/templates/ObjectPage/designtime/StashableVBox.designtime.js +1 -1
- package/src/sap/fe/templates/ObjectPage/flexibility/ScrollableHeaderContainer.flexibility.js +1 -1
- package/src/sap/fe/templates/ObjectPage/flexibility/StashControlAndDisconnect.js +1 -1
- package/src/sap/fe/templates/ObjectPage/flexibility/StashableHBox.flexibility.js +1 -1
- package/src/sap/fe/templates/ObjectPage/flexibility/StashableVBox.flexibility.js +1 -1
- package/src/sap/fe/templates/ObjectPage/flexibility/UnstashControlAndConnect.js +1 -1
- package/src/sap/fe/templates/ObjectPage/manifest.json +5 -5
- package/src/sap/fe/templates/ObjectPage/overrides/CollaborationManager.js +3 -2
- package/src/sap/fe/templates/ObjectPage/overrides/CollaborationManager.ts +1 -0
- package/src/sap/fe/templates/ObjectPage/overrides/IntentBasedNavigation.js +1 -1
- package/src/sap/fe/templates/ObjectPage/overrides/InternalRouting.js +1 -1
- package/src/sap/fe/templates/ObjectPage/overrides/MessageHandler.js +7 -3
- package/src/sap/fe/templates/ObjectPage/overrides/MessageHandler.ts +6 -1
- package/src/sap/fe/templates/ObjectPage/overrides/Paginator.js +1 -1
- package/src/sap/fe/templates/ObjectPage/overrides/Share.js +1 -1
- package/src/sap/fe/templates/ObjectPage/overrides/ViewState.js +1 -1
- package/src/sap/fe/templates/ObjectPage/view/fragments/ExpandedHeading.fragment.xml +45 -7
- package/src/sap/fe/templates/ObjectPage/view/fragments/HeaderContent.fragment.xml +8 -13
- package/src/sap/fe/templates/ObjectPage/view/fragments/Heading.fragment.xml +36 -6
- package/src/sap/fe/templates/ObjectPage/view/fragments/ObjectPageHeaderAddress.fragment.xml +1 -1
- package/src/sap/fe/templates/ObjectPage/view/fragments/ObjectPageHeaderContact.fragment.xml +1 -1
- package/src/sap/fe/templates/ObjectPage/view/fragments/ObjectPageHeaderForm.fragment.xml +0 -1
- package/src/sap/fe/templates/ObjectPage/view/fragments/SectionContent.fragment.xml +82 -39
- package/src/sap/fe/templates/ObjectPage/view/fragments/SectionCustomSection.fragment.xml +6 -1
- package/src/sap/fe/templates/ObjectPage/view/fragments/Table.fragment.xml +3 -1
- package/src/sap/fe/templates/ObjectPage/view/fragments/TransportSelection.js +1 -1
- package/src/sap/fe/templates/TableScroller.js +1 -1
- package/src/sap/fe/templates/library.js +2 -2
- package/src/sap/fe/templates/messagebundle.properties +18 -6
- package/src/sap/fe/templates/messagebundle_ar.properties +14 -0
- package/src/sap/fe/templates/messagebundle_bg.properties +14 -0
- package/src/sap/fe/templates/messagebundle_ca.properties +14 -0
- package/src/sap/fe/templates/messagebundle_cnr.properties +15 -1
- package/src/sap/fe/templates/messagebundle_cs.properties +14 -0
- package/src/sap/fe/templates/messagebundle_cy.properties +14 -0
- package/src/sap/fe/templates/messagebundle_da.properties +14 -0
- package/src/sap/fe/templates/messagebundle_de.properties +14 -0
- package/src/sap/fe/templates/messagebundle_el.properties +14 -0
- package/src/sap/fe/templates/messagebundle_en.properties +14 -0
- package/src/sap/fe/templates/messagebundle_en_GB.properties +14 -0
- package/src/sap/fe/templates/messagebundle_en_US_saprigi.properties +11 -3
- package/src/sap/fe/templates/messagebundle_es.properties +16 -2
- package/src/sap/fe/templates/messagebundle_es_MX.properties +14 -0
- package/src/sap/fe/templates/messagebundle_et.properties +14 -0
- package/src/sap/fe/templates/messagebundle_fi.properties +14 -0
- package/src/sap/fe/templates/messagebundle_fr.properties +14 -0
- package/src/sap/fe/templates/messagebundle_fr_CA.properties +14 -0
- package/src/sap/fe/templates/messagebundle_hi.properties +14 -0
- package/src/sap/fe/templates/messagebundle_hr.properties +14 -0
- package/src/sap/fe/templates/messagebundle_hu.properties +14 -0
- package/src/sap/fe/templates/messagebundle_id.properties +14 -0
- package/src/sap/fe/templates/messagebundle_it.properties +14 -0
- package/src/sap/fe/templates/messagebundle_iw.properties +15 -1
- package/src/sap/fe/templates/messagebundle_ja.properties +15 -1
- package/src/sap/fe/templates/messagebundle_kk.properties +14 -0
- package/src/sap/fe/templates/messagebundle_ko.properties +14 -0
- package/src/sap/fe/templates/messagebundle_lt.properties +16 -2
- package/src/sap/fe/templates/messagebundle_lv.properties +14 -0
- package/src/sap/fe/templates/messagebundle_mk.properties +14 -0
- package/src/sap/fe/templates/messagebundle_ms.properties +14 -0
- package/src/sap/fe/templates/messagebundle_nl.properties +14 -0
- package/src/sap/fe/templates/messagebundle_no.properties +14 -0
- package/src/sap/fe/templates/messagebundle_pl.properties +14 -0
- package/src/sap/fe/templates/messagebundle_pt.properties +14 -0
- package/src/sap/fe/templates/messagebundle_pt_PT.properties +14 -0
- package/src/sap/fe/templates/messagebundle_ro.properties +14 -0
- package/src/sap/fe/templates/messagebundle_ru.properties +14 -0
- package/src/sap/fe/templates/messagebundle_sh.properties +15 -1
- package/src/sap/fe/templates/messagebundle_sk.properties +14 -0
- package/src/sap/fe/templates/messagebundle_sl.properties +17 -3
- package/src/sap/fe/templates/messagebundle_sr.properties +15 -1
- package/src/sap/fe/templates/messagebundle_sv.properties +14 -0
- package/src/sap/fe/templates/messagebundle_th.properties +14 -0
- package/src/sap/fe/templates/messagebundle_tr.properties +14 -0
- package/src/sap/fe/templates/messagebundle_uk.properties +14 -0
- package/src/sap/fe/templates/messagebundle_vi.properties +16 -2
- package/src/sap/fe/templates/messagebundle_zh_CN.properties +14 -0
- package/src/sap/fe/templates/messagebundle_zh_TW.properties +14 -0
- package/src/sap/fe/templates/types/sap.fe.templates-auto-ext.d.js +1 -1
|
@@ -27,7 +27,6 @@ import { RecommendationDialogDecision } from "sap/fe/core/controls/Recommendatio
|
|
|
27
27
|
import type { HiddenDraft, MicroChartManifestConfiguration } from "sap/fe/core/converters/ManifestSettings";
|
|
28
28
|
import type { InternalModelContext } from "sap/fe/core/helpers/ModelHelper";
|
|
29
29
|
import ModelHelper from "sap/fe/core/helpers/ModelHelper";
|
|
30
|
-
import { getResourceModel } from "sap/fe/core/helpers/ResourceModelHelper";
|
|
31
30
|
import FELibrary from "sap/fe/core/library";
|
|
32
31
|
import { type WrappedCard } from "sap/fe/core/services/CollaborationManagerServiceFactory";
|
|
33
32
|
import type ChartBlock from "sap/fe/macros/Chart";
|
|
@@ -53,7 +52,6 @@ import TableScroller from "sap/fe/templates/TableScroller";
|
|
|
53
52
|
import type Button from "sap/m/Button";
|
|
54
53
|
import type InputBase from "sap/m/InputBase";
|
|
55
54
|
import InstanceManager from "sap/m/InstanceManager";
|
|
56
|
-
import MessageBox from "sap/m/MessageBox";
|
|
57
55
|
import type NavContainer from "sap/m/NavContainer";
|
|
58
56
|
import type Popover from "sap/m/Popover";
|
|
59
57
|
import type ToolbarSpacer from "sap/m/ToolbarSpacer";
|
|
@@ -186,6 +184,8 @@ class ObjectPageController extends PageController {
|
|
|
186
184
|
|
|
187
185
|
private subSections?: { fe: SubSection[]; others: ObjectPageSubSection[] };
|
|
188
186
|
|
|
187
|
+
private previousBindingContextPath?: string;
|
|
188
|
+
|
|
189
189
|
@publicExtension()
|
|
190
190
|
@finalExtension()
|
|
191
191
|
getExtensionAPI(sId?: string): ExtensionAPI {
|
|
@@ -397,6 +397,7 @@ class ObjectPageController extends PageController {
|
|
|
397
397
|
|
|
398
398
|
_onBeforeBinding(oContext: ODataV4Context, mParameters: BindingParams = {}): void {
|
|
399
399
|
// TODO: we should check how this comes together with the transaction helper, same to the change in the afterBinding
|
|
400
|
+
this.previousBindingContextPath = this.getView().getBindingContext()?.getPath();
|
|
400
401
|
const aTables = this._findTables(),
|
|
401
402
|
oObjectPage = this._getObjectPageLayoutControl(),
|
|
402
403
|
oInternalModelContext = this.getView().getBindingContext("internal") as InternalModelContext,
|
|
@@ -553,21 +554,26 @@ class ObjectPageController extends PageController {
|
|
|
553
554
|
const aSubSections = oSection.getSubSections();
|
|
554
555
|
for (let iSubSection = 0; iSubSection < aSubSections.length; iSubSection++, iSkip--) {
|
|
555
556
|
// In IconTabBar mode keep the second section bound if there is an editable header and we are switching to display mode
|
|
556
|
-
|
|
557
|
+
const oSubSection = aSubSections[iSubSection];
|
|
557
558
|
const disableBindingContextCondition =
|
|
558
559
|
(this.getDisableObjectPageRequestOptimization() &&
|
|
559
560
|
(iSkip < 1 || (bUseIconTabBar && (iSection > 1 || (iSection === 1 && !bEditableHeader && !bIsInEditMode))))) ||
|
|
560
561
|
(!this.getDisableObjectPageRequestOptimization() &&
|
|
561
|
-
((!bUseIconTabBar &&
|
|
562
|
+
((!bUseIconTabBar && (iSkip < 1 || oSubSection.getBinding("visible"))) || //if we are not in IconTabBar mode, all section with index >=3 or with visibility binding should be disconnected
|
|
562
563
|
(!bUseIconTabBar && !firstVisibilityBinding && iSkip < 1) || // if no subsection has visibility binding and we are not in IconTabBar mode
|
|
563
564
|
(bUseIconTabBar && (iSection > 1 || (iSection === 1 && !bEditableHeader && !bIsInEditMode)))));
|
|
564
565
|
if (disableBindingContextCondition) {
|
|
565
|
-
const oSubSection = aSubSections[iSubSection];
|
|
566
566
|
// SubSection's binding is enabled.
|
|
567
567
|
oSubSection.setBindingContext(undefined);
|
|
568
|
-
const blocks = oSubSection.getBlocks()
|
|
568
|
+
const blocks = oSubSection.getBlocks();
|
|
569
569
|
// SubSection's contents binding is disabled.
|
|
570
|
-
blocks.forEach((block) =>
|
|
570
|
+
blocks.forEach((block) => {
|
|
571
|
+
if (block.isA<SubSectionBlock>("sap.fe.templates.ObjectPage.controls.SubSectionBlock")) {
|
|
572
|
+
block.content.setBindingContext?.(null);
|
|
573
|
+
} else {
|
|
574
|
+
block.setBindingContext(null);
|
|
575
|
+
}
|
|
576
|
+
});
|
|
571
577
|
oSubSection.getMoreBlocks().forEach((subBlock) => subBlock.setBindingContext(null));
|
|
572
578
|
oSubSection.getActions().forEach((actions) => actions.setBindingContext(null));
|
|
573
579
|
}
|
|
@@ -712,8 +718,14 @@ class ObjectPageController extends PageController {
|
|
|
712
718
|
if (oSubSection.isA<SubSection>("sap.fe.macros.controls.section.SubSection")) {
|
|
713
719
|
oSubSection.handleSubSectionCreated(this.getView());
|
|
714
720
|
}
|
|
715
|
-
const blocks = oSubSection.getBlocks()
|
|
716
|
-
blocks.forEach((block) =>
|
|
721
|
+
const blocks = oSubSection.getBlocks();
|
|
722
|
+
blocks.forEach((block) => {
|
|
723
|
+
if (block.isA<SubSectionBlock>("sap.fe.templates.ObjectPage.controls.SubSectionBlock")) {
|
|
724
|
+
block.content.setBindingContext?.(undefined);
|
|
725
|
+
} else {
|
|
726
|
+
block.setBindingContext(undefined);
|
|
727
|
+
}
|
|
728
|
+
});
|
|
717
729
|
oSubSection.getMoreBlocks().forEach((subBlock) => subBlock.setBindingContext(undefined));
|
|
718
730
|
oSubSection.getActions().forEach((actions) => actions.setBindingContext(undefined));
|
|
719
731
|
}
|
|
@@ -921,7 +933,12 @@ class ObjectPageController extends PageController {
|
|
|
921
933
|
const applyAppState = this.getAppComponent().getAppStateHandler().applyAppState(view);
|
|
922
934
|
this.pageReady.waitFor(applyAppState);
|
|
923
935
|
|
|
924
|
-
this.reconnectSubSectionVisibilityObservers(
|
|
936
|
+
this.reconnectSubSectionVisibilityObservers(
|
|
937
|
+
this.subSections,
|
|
938
|
+
oObjectPage,
|
|
939
|
+
applyAppState,
|
|
940
|
+
this.previousBindingContextPath !== this.getView().getBindingContext()?.getPath()
|
|
941
|
+
);
|
|
925
942
|
}
|
|
926
943
|
|
|
927
944
|
/**
|
|
@@ -930,15 +947,17 @@ class ObjectPageController extends PageController {
|
|
|
930
947
|
* @param subSectionInfo Subsections information retrieved during disconnection
|
|
931
948
|
* @param objectPageLayout Object Page Layout control
|
|
932
949
|
* @param waitForApplyAppstate Promise that resolves when the app state is applied
|
|
950
|
+
* @param waitForVisibilityBindings Boolean indicating whether to wait for visibility bindings to be resolved before reconnecting observers
|
|
933
951
|
* @returns A promise that resolves to true if the observers were reconnected, false otherwise
|
|
934
952
|
*/
|
|
935
953
|
async reconnectSubSectionVisibilityObservers(
|
|
936
954
|
subSectionInfo: { fe: SubSection[]; others: ObjectPageSubSection[] } | undefined,
|
|
937
955
|
objectPageLayout: ObjectPageLayout,
|
|
938
|
-
waitForApplyAppstate: Promise<unknown
|
|
956
|
+
waitForApplyAppstate: Promise<unknown>,
|
|
957
|
+
waitForVisibilityBindings = true
|
|
939
958
|
): Promise<boolean> {
|
|
940
959
|
if (!this.getDisableObjectPageRequestOptimization() && subSectionInfo) {
|
|
941
|
-
await Promise.all(this.waitForVisibilityBindings)
|
|
960
|
+
await Promise.all(waitForVisibilityBindings ? this.waitForVisibilityBindings : [])
|
|
942
961
|
.then(async () => {
|
|
943
962
|
objectPageLayout.setVisible(true);
|
|
944
963
|
try {
|
|
@@ -1170,7 +1189,9 @@ class ObjectPageController extends PageController {
|
|
|
1170
1189
|
if (!oObjectPageContext || pathsToResolve.length === 0) {
|
|
1171
1190
|
return Promise.resolve(build());
|
|
1172
1191
|
}
|
|
1173
|
-
await Promise.all(
|
|
1192
|
+
await Promise.all(
|
|
1193
|
+
pathsToResolve.map(async (p) => (oObjectPageContext as ODataV4Context).requestProperty(p).catch(() => undefined))
|
|
1194
|
+
);
|
|
1174
1195
|
return build();
|
|
1175
1196
|
}
|
|
1176
1197
|
|
|
@@ -1217,10 +1238,7 @@ class ObjectPageController extends PageController {
|
|
|
1217
1238
|
});
|
|
1218
1239
|
}
|
|
1219
1240
|
|
|
1220
|
-
_showMessagePopover(
|
|
1221
|
-
if (err) {
|
|
1222
|
-
Log.error(err);
|
|
1223
|
-
}
|
|
1241
|
+
_showMessagePopover(): void {
|
|
1224
1242
|
const isEditMode = CommonUtils.getIsEditable(this.getView());
|
|
1225
1243
|
const rootViewController = this.getAppComponent().getRootViewController();
|
|
1226
1244
|
const currentPageView = rootViewController.isFclEnabled()
|
|
@@ -1239,7 +1257,6 @@ class ObjectPageController extends PageController {
|
|
|
1239
1257
|
}, 0);
|
|
1240
1258
|
}
|
|
1241
1259
|
}
|
|
1242
|
-
return oRet;
|
|
1243
1260
|
}
|
|
1244
1261
|
|
|
1245
1262
|
async _editDocument(): Promise<void | Context> {
|
|
@@ -1425,14 +1442,16 @@ class ObjectPageController extends PageController {
|
|
|
1425
1442
|
if (error !== RecommendationDialogDecision.Continue) {
|
|
1426
1443
|
messagePopoverErr = (error as string) ?? "";
|
|
1427
1444
|
}
|
|
1428
|
-
throw error;
|
|
1429
1445
|
}
|
|
1430
1446
|
} finally {
|
|
1431
1447
|
if (BusyLocker.isLocked(model)) {
|
|
1432
1448
|
BusyLocker.unlock(model);
|
|
1433
1449
|
}
|
|
1434
1450
|
if (messagePopoverErr !== undefined) {
|
|
1435
|
-
|
|
1451
|
+
if (messagePopoverErr.length) {
|
|
1452
|
+
Log.error(messagePopoverErr);
|
|
1453
|
+
}
|
|
1454
|
+
this._showMessagePopover();
|
|
1436
1455
|
}
|
|
1437
1456
|
}
|
|
1438
1457
|
}
|
|
@@ -2005,6 +2024,10 @@ class ObjectPageController extends PageController {
|
|
|
2005
2024
|
this.messageButton.fireModelContextChange();
|
|
2006
2025
|
},
|
|
2007
2026
|
|
|
2027
|
+
onTableBindingUpdated(this: ObjectPageController): void {
|
|
2028
|
+
this.messageButton.fireModelContextChange();
|
|
2029
|
+
},
|
|
2030
|
+
|
|
2008
2031
|
async onCallAction(
|
|
2009
2032
|
oView: FEView,
|
|
2010
2033
|
sActionName: string,
|
|
@@ -2035,8 +2058,13 @@ class ObjectPageController extends PageController {
|
|
|
2035
2058
|
|
|
2036
2059
|
return oController.editFlow
|
|
2037
2060
|
.invokeAction(sActionName, mParameters)
|
|
2038
|
-
.then(
|
|
2039
|
-
|
|
2061
|
+
.then((res) => {
|
|
2062
|
+
oController._showMessagePopover();
|
|
2063
|
+
return res;
|
|
2064
|
+
})
|
|
2065
|
+
.catch(() => {
|
|
2066
|
+
oController._showMessagePopover();
|
|
2067
|
+
});
|
|
2040
2068
|
},
|
|
2041
2069
|
onDataPointTitlePressed(
|
|
2042
2070
|
oController: ObjectPageController,
|
|
@@ -2132,35 +2160,18 @@ class ObjectPageController extends PageController {
|
|
|
2132
2160
|
},
|
|
2133
2161
|
navigateToSubSection: function (oController: ObjectPageController, vDetailConfig: string | object): void {
|
|
2134
2162
|
const oDetailConfig = typeof vDetailConfig === "string" ? JSON.parse(vDetailConfig) : vDetailConfig;
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
let
|
|
2138
|
-
if (oDetailConfig
|
|
2139
|
-
|
|
2140
|
-
oSubSection = (
|
|
2141
|
-
oDetailConfig.subSectionId
|
|
2142
|
-
? oController.getView().byId(oDetailConfig.subSectionId)
|
|
2143
|
-
: oSection && oSection.getSubSections() && oSection.getSubSections()[0]
|
|
2144
|
-
) as ObjectPageSubSection;
|
|
2145
|
-
} else if (oDetailConfig.subSectionId) {
|
|
2146
|
-
oSubSection = oController.getView().byId(oDetailConfig.subSectionId) as ObjectPageSubSection;
|
|
2147
|
-
oSection = oSubSection && (oSubSection.getParent() as ObjectPageSection);
|
|
2148
|
-
}
|
|
2149
|
-
if (!oSection || !oSubSection || !oSection.getVisible() || !oSubSection.getVisible()) {
|
|
2150
|
-
const sTitle = getResourceModel(oController).getText(
|
|
2151
|
-
"C_ROUTING_NAVIGATION_DISABLED_TITLE",
|
|
2152
|
-
undefined,
|
|
2153
|
-
oController.getView().getViewData().entitySet
|
|
2154
|
-
);
|
|
2155
|
-
Log.error(sTitle);
|
|
2156
|
-
MessageBox.error(sTitle);
|
|
2163
|
+
|
|
2164
|
+
// Determine the target ID based on input type
|
|
2165
|
+
let targetId: string | undefined;
|
|
2166
|
+
if (typeof oDetailConfig === "string") {
|
|
2167
|
+
targetId = oDetailConfig;
|
|
2157
2168
|
} else {
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2169
|
+
// Priority: subSectionId > sectionId
|
|
2170
|
+
targetId = oDetailConfig.subSectionId ?? oDetailConfig.sectionId;
|
|
2171
|
+
}
|
|
2172
|
+
|
|
2173
|
+
if (targetId) {
|
|
2174
|
+
oController.getExtensionAPI().navigateToSubSection(targetId);
|
|
2164
2175
|
}
|
|
2165
2176
|
},
|
|
2166
2177
|
|