@sapui5/sap.fe.templates 1.101.0 → 1.102.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/ListReport/ExtensionAPI.js +8 -5
- package/src/sap/fe/templates/ListReport/ExtensionAPI.ts +11 -5
- package/src/sap/fe/templates/ListReport/ListReport.view.xml +104 -57
- package/src/sap/fe/templates/ListReport/ListReportController.controller.js +104 -19
- package/src/sap/fe/templates/ListReport/ListReportController.controller.ts +98 -19
- package/src/sap/fe/templates/ListReport/ListReportTemplating.js +45 -0
- package/src/sap/fe/templates/ListReport/ListReportTemplating.ts +30 -0
- package/src/sap/fe/templates/ListReport/overrides/Share.js +7 -4
- package/src/sap/fe/templates/ListReport/overrides/Share.ts +4 -3
- package/src/sap/fe/templates/ListReport/overrides/ViewState.js +10 -2
- package/src/sap/fe/templates/ListReport/overrides/ViewState.ts +7 -1
- package/src/sap/fe/templates/ObjectPage/ObjectPage.view.xml +164 -18
- package/src/sap/fe/templates/ObjectPage/ObjectPageController.controller.js +51 -47
- package/src/sap/fe/templates/ObjectPage/ObjectPageController.controller.ts +52 -40
- package/src/sap/fe/templates/ObjectPage/ObjectPageTemplating.js +872 -0
- package/src/sap/fe/templates/ObjectPage/ObjectPageTemplating.ts +837 -0
- package/src/sap/fe/templates/ObjectPage/overrides/Share.js +3 -3
- package/src/sap/fe/templates/ObjectPage/overrides/Share.ts +2 -2
- package/src/sap/fe/templates/ObjectPage/view/fragments/Actions.fragment.xml +9 -10
- package/src/sap/fe/templates/ObjectPage/view/fragments/CollaborationDraft.fragment.xml +1 -2
- package/src/sap/fe/templates/ObjectPage/view/fragments/EditableHeaderFacet.fragment.xml +15 -15
- package/src/sap/fe/templates/ObjectPage/view/fragments/FooterContent.fragment.xml +28 -24
- package/src/sap/fe/templates/ObjectPage/view/fragments/FormActionButtons.fragment.xml +15 -16
- package/src/sap/fe/templates/ObjectPage/view/fragments/FormActions.fragment.xml +1 -5
- package/src/sap/fe/templates/ObjectPage/view/fragments/HeaderDataPoint.fragment.xml +1 -2
- package/src/sap/fe/templates/ObjectPage/view/fragments/HeaderDataPointTitle.fragment.xml +1 -3
- package/src/sap/fe/templates/ObjectPage/view/fragments/HeaderFacet.fragment.xml +3 -4
- package/src/sap/fe/templates/ObjectPage/view/fragments/Heading.fragment.xml +16 -17
- package/src/sap/fe/templates/ObjectPage/view/fragments/HeadingTitle.fragment.xml +3 -3
- package/src/sap/fe/templates/ObjectPage/view/fragments/ObjectPageHeaderForm.fragment.xml +3 -3
- package/src/sap/fe/templates/ObjectPage/view/fragments/RelatedApps.fragment.xml +7 -4
- package/src/sap/fe/templates/ObjectPage/view/fragments/Section.fragment.xml +71 -6
- package/src/sap/fe/templates/ObjectPage/view/fragments/SectionContent.fragment.xml +114 -94
- package/src/sap/fe/templates/ObjectPage/view/fragments/SectionContentLazyLoader.fragment.xml +127 -107
- package/src/sap/fe/templates/RootContainer/controller/Fcl.controller.js +81 -33
- package/src/sap/fe/templates/RootContainer/controller/Fcl.controller.ts +71 -33
- package/src/sap/fe/templates/controls/MacroChart.fragment.xml +1 -0
- package/src/sap/fe/templates/controls/Table.fragment.xml +3 -4
- package/src/sap/fe/templates/library.js +1 -1
- package/src/sap/fe/templates/messagebundle_ar.properties +10 -6
- package/src/sap/fe/templates/messagebundle_bg.properties +6 -2
- package/src/sap/fe/templates/messagebundle_ca.properties +10 -6
- package/src/sap/fe/templates/messagebundle_cs.properties +6 -2
- package/src/sap/fe/templates/messagebundle_cy.properties +10 -6
- package/src/sap/fe/templates/messagebundle_da.properties +10 -6
- package/src/sap/fe/templates/messagebundle_de.properties +10 -6
- package/src/sap/fe/templates/messagebundle_el.properties +10 -6
- package/src/sap/fe/templates/messagebundle_en.properties +6 -2
- package/src/sap/fe/templates/messagebundle_en_GB.properties +8 -4
- package/src/sap/fe/templates/messagebundle_en_US_sappsd.properties +13 -5
- package/src/sap/fe/templates/messagebundle_en_US_saprigi.properties +7 -3
- package/src/sap/fe/templates/messagebundle_en_US_saptrc.properties +7 -3
- package/src/sap/fe/templates/messagebundle_es.properties +6 -2
- package/src/sap/fe/templates/messagebundle_es_MX.properties +10 -6
- package/src/sap/fe/templates/messagebundle_et.properties +6 -2
- package/src/sap/fe/templates/messagebundle_fi.properties +10 -6
- package/src/sap/fe/templates/messagebundle_fr.properties +6 -2
- package/src/sap/fe/templates/messagebundle_fr_CA.properties +10 -6
- package/src/sap/fe/templates/messagebundle_hi.properties +10 -6
- package/src/sap/fe/templates/messagebundle_hr.properties +10 -6
- package/src/sap/fe/templates/messagebundle_hu.properties +6 -2
- package/src/sap/fe/templates/messagebundle_id.properties +6 -2
- package/src/sap/fe/templates/messagebundle_it.properties +10 -6
- package/src/sap/fe/templates/messagebundle_iw.properties +10 -6
- package/src/sap/fe/templates/messagebundle_ja.properties +6 -2
- package/src/sap/fe/templates/messagebundle_kk.properties +10 -6
- package/src/sap/fe/templates/messagebundle_ko.properties +6 -2
- package/src/sap/fe/templates/messagebundle_lt.properties +6 -2
- package/src/sap/fe/templates/messagebundle_lv.properties +6 -2
- package/src/sap/fe/templates/messagebundle_ms.properties +10 -6
- package/src/sap/fe/templates/messagebundle_nl.properties +6 -2
- package/src/sap/fe/templates/messagebundle_no.properties +10 -6
- package/src/sap/fe/templates/messagebundle_pl.properties +10 -6
- package/src/sap/fe/templates/messagebundle_pt.properties +7 -3
- package/src/sap/fe/templates/messagebundle_pt_PT.properties +6 -2
- package/src/sap/fe/templates/messagebundle_ro.properties +10 -6
- package/src/sap/fe/templates/messagebundle_ru.properties +10 -6
- package/src/sap/fe/templates/messagebundle_sh.properties +6 -2
- package/src/sap/fe/templates/messagebundle_sk.properties +6 -2
- package/src/sap/fe/templates/messagebundle_sl.properties +10 -6
- package/src/sap/fe/templates/messagebundle_sv.properties +6 -2
- package/src/sap/fe/templates/messagebundle_th.properties +10 -6
- package/src/sap/fe/templates/messagebundle_tr.properties +6 -2
- package/src/sap/fe/templates/messagebundle_uk.properties +6 -2
- package/src/sap/fe/templates/messagebundle_vi.properties +10 -6
- package/src/sap/fe/templates/messagebundle_zh_CN.properties +10 -6
- package/src/sap/fe/templates/messagebundle_zh_TW.properties +10 -6
- package/src/sap/fe/templates/ObjectPage/AnnotationHelper.js +0 -482
- package/src/sap/fe/templates/ObjectPage/AnnotationHelper.ts +0 -511
- package/src/sap/fe/templates/ObjectPage/templating/ObjectPageTemplating.js +0 -120
- package/src/sap/fe/templates/ObjectPage/templating/ObjectPageTemplating.ts +0 -138
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import ResourceBundle from "sap/base/i18n/ResourceBundle";
|
|
2
2
|
import Log from "sap/base/Log";
|
|
3
3
|
import merge from "sap/base/util/merge";
|
|
4
|
-
import { connect } from "sap/fe/core/actions/collaboration/ActivitySync";
|
|
5
|
-
import { openManageDialog, showUserDetails } from "sap/fe/core/actions/collaboration/Manage";
|
|
6
|
-
import BusyLocker from "sap/fe/core/BusyLocker";
|
|
7
4
|
import CommonUtils from "sap/fe/core/CommonUtils";
|
|
5
|
+
import BusyLocker from "sap/fe/core/controllerextensions/BusyLocker";
|
|
6
|
+
import { connect } from "sap/fe/core/controllerextensions/collaboration/ActivitySync";
|
|
7
|
+
import { openManageDialog, showUserDetails } from "sap/fe/core/controllerextensions/collaboration/Manage";
|
|
8
8
|
import EditFlow from "sap/fe/core/controllerextensions/EditFlow";
|
|
9
|
+
import draft from "sap/fe/core/controllerextensions/editFlow/draft";
|
|
9
10
|
import IntentBasedNavigation from "sap/fe/core/controllerextensions/IntentBasedNavigation";
|
|
10
11
|
import InternalEditFlow from "sap/fe/core/controllerextensions/InternalEditFlow";
|
|
11
12
|
import InternalIntentBasedNavigation from "sap/fe/core/controllerextensions/InternalIntentBasedNavigation";
|
|
@@ -36,11 +37,13 @@ import Popover from "sap/m/Popover";
|
|
|
36
37
|
import SelectList from "sap/m/SelectList";
|
|
37
38
|
import Event from "sap/ui/base/Event";
|
|
38
39
|
import Control from "sap/ui/core/Control";
|
|
40
|
+
import Core from "sap/ui/core/Core";
|
|
39
41
|
import Fragment from "sap/ui/core/Fragment";
|
|
40
42
|
import Item from "sap/ui/core/Item";
|
|
41
43
|
import OverrideExecution from "sap/ui/core/mvc/OverrideExecution";
|
|
42
44
|
import XMLPreprocessor from "sap/ui/core/util/XMLPreprocessor";
|
|
43
45
|
import XMLTemplateProcessor from "sap/ui/core/XMLTemplateProcessor";
|
|
46
|
+
import Binding from "sap/ui/model/Binding";
|
|
44
47
|
import JSONModel from "sap/ui/model/json/JSONModel";
|
|
45
48
|
import Context from "sap/ui/model/odata/v4/Context";
|
|
46
49
|
import ODataListBinding from "sap/ui/model/odata/v4/ODataListBinding";
|
|
@@ -60,6 +63,7 @@ import ViewStateOverrides from "./overrides/ViewState";
|
|
|
60
63
|
|
|
61
64
|
@defineUI5Class("sap.fe.templates.ObjectPage.ObjectPageController")
|
|
62
65
|
class ObjectPageController extends PageController {
|
|
66
|
+
oView!: any;
|
|
63
67
|
@usingExtension(Placeholder)
|
|
64
68
|
placeholder!: Placeholder;
|
|
65
69
|
@usingExtension(EditFlow)
|
|
@@ -104,6 +108,7 @@ class ObjectPageController extends PageController {
|
|
|
104
108
|
private oResourceBundle?: ResourceBundle;
|
|
105
109
|
private bSectionNavigated?: boolean;
|
|
106
110
|
private switchDraftAndActivePopOver?: Popover;
|
|
111
|
+
private currentBinding?: Binding;
|
|
107
112
|
|
|
108
113
|
@publicExtension()
|
|
109
114
|
@finalExtension()
|
|
@@ -158,6 +163,11 @@ class ObjectPageController extends PageController {
|
|
|
158
163
|
if (oMessagePopover && oMessagePopover.isOpen()) {
|
|
159
164
|
oMessagePopover.close();
|
|
160
165
|
}
|
|
166
|
+
//when exiting we set keepAlive context to false
|
|
167
|
+
const oContext = this.getView().getBindingContext() as Context;
|
|
168
|
+
if (oContext && oContext.isKeepAlive()) {
|
|
169
|
+
oContext.setKeepAlive(false);
|
|
170
|
+
}
|
|
161
171
|
}
|
|
162
172
|
|
|
163
173
|
_getTableBinding(oTable: any) {
|
|
@@ -166,6 +176,10 @@ class ObjectPageController extends PageController {
|
|
|
166
176
|
|
|
167
177
|
onBeforeRendering() {
|
|
168
178
|
PageController.prototype.onBeforeRendering.apply(this);
|
|
179
|
+
// In the retrieveTextFromValueList scenario we need to ensure in case of reload/refresh that the meta model in the methode retrieveTextFromValueList of the FieldRuntime is available
|
|
180
|
+
if (this.oView.oViewData.retrieveTextFromValueList && CommonHelper.getMetaModel() === undefined) {
|
|
181
|
+
CommonHelper.setMetaModel(this.getAppComponent().getMetaModel());
|
|
182
|
+
}
|
|
169
183
|
}
|
|
170
184
|
|
|
171
185
|
onAfterRendering() {
|
|
@@ -376,14 +390,15 @@ class ObjectPageController extends PageController {
|
|
|
376
390
|
// Back nav will keep the same context --> no need to display the dialog
|
|
377
391
|
history.back();
|
|
378
392
|
} else {
|
|
379
|
-
|
|
393
|
+
draft.processDataLossOrDraftDiscardConfirmation(
|
|
380
394
|
function () {
|
|
381
395
|
history.back();
|
|
382
396
|
},
|
|
383
397
|
Function.prototype,
|
|
384
398
|
oContext,
|
|
385
399
|
this,
|
|
386
|
-
false
|
|
400
|
+
false,
|
|
401
|
+
draft.NavigationType.BackNavigation
|
|
387
402
|
);
|
|
388
403
|
}
|
|
389
404
|
}
|
|
@@ -553,7 +568,12 @@ class ObjectPageController extends PageController {
|
|
|
553
568
|
|
|
554
569
|
//Attach the patch sent and patch completed event to the object page binding so that we can react
|
|
555
570
|
const oBinding = (oBindingContext.getBinding && oBindingContext.getBinding()) || oBindingContext;
|
|
556
|
-
|
|
571
|
+
|
|
572
|
+
// Attach the event handler only once to the same binding
|
|
573
|
+
if (this.currentBinding !== oBinding) {
|
|
574
|
+
oBinding.attachEvent("patchSent", this.editFlow.handlePatchSent, this);
|
|
575
|
+
this.currentBinding = oBinding;
|
|
576
|
+
}
|
|
557
577
|
|
|
558
578
|
aTables.forEach(function (oTable: any) {
|
|
559
579
|
// access binding only after table is bound
|
|
@@ -574,6 +594,21 @@ class ObjectPageController extends PageController {
|
|
|
574
594
|
@publicExtension()
|
|
575
595
|
@extensible(OverrideExecution.After)
|
|
576
596
|
onPageReady(mParameters: any) {
|
|
597
|
+
const setFocus = () => {
|
|
598
|
+
// Set the focus to the first action button, or to the first editable input if in editable mode
|
|
599
|
+
const oObjectPage = this._getObjectPageLayoutControl();
|
|
600
|
+
const isInDisplayMode = !oObjectPage.getModel("ui").getProperty("/isEditable");
|
|
601
|
+
|
|
602
|
+
if (isInDisplayMode) {
|
|
603
|
+
const oFirstClickableElement = this._getFirstClickableElement(oObjectPage);
|
|
604
|
+
if (oFirstClickableElement) {
|
|
605
|
+
oFirstClickableElement.focus();
|
|
606
|
+
}
|
|
607
|
+
} else {
|
|
608
|
+
const oSelectedSection: any = Core.byId(oObjectPage.getSelectedSection());
|
|
609
|
+
this._updateFocusInEditMode(oSelectedSection.getSubSections());
|
|
610
|
+
}
|
|
611
|
+
};
|
|
577
612
|
// Apply app state only after the page is ready with the first section selected
|
|
578
613
|
const oView = this.getView();
|
|
579
614
|
const oInternalModelContext = oView.getBindingContext("internal") as InternalModelContext;
|
|
@@ -586,39 +621,17 @@ class ObjectPageController extends PageController {
|
|
|
586
621
|
oAppComponent.getShellServices().setBackNavigation(() => this._onBackNavigationInDraft(oBindingContext));
|
|
587
622
|
}
|
|
588
623
|
}
|
|
589
|
-
this.getAppComponent()
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
const aVisibleSections = oObjectPage.getSections().filter(function (oSection) {
|
|
596
|
-
return oSection.getVisible() === true;
|
|
597
|
-
});
|
|
598
|
-
// Select the first visible section
|
|
599
|
-
oObjectPage.setSelectedSection(aVisibleSections[0].getId());
|
|
600
|
-
|
|
601
|
-
if (isInDisplayMode) {
|
|
602
|
-
const oFirstClickableElement = this._getFirstClickableElement(oObjectPage);
|
|
603
|
-
if (oFirstClickableElement) {
|
|
604
|
-
oFirstClickableElement.focus();
|
|
624
|
+
this.getAppComponent()
|
|
625
|
+
.getAppStateHandler()
|
|
626
|
+
.applyAppState()
|
|
627
|
+
.then(() => {
|
|
628
|
+
if (mParameters.forceFocus) {
|
|
629
|
+
setFocus();
|
|
605
630
|
}
|
|
606
|
-
}
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
aVisibleSubSections = aVisibleSections[0].getSubSections();
|
|
611
|
-
} else {
|
|
612
|
-
// In a paged layout, all subsections of the visible sections are visible on the screen
|
|
613
|
-
aVisibleSubSections = (
|
|
614
|
-
aVisibleSections.map(function (oSection: any) {
|
|
615
|
-
return oSection.getSubSections();
|
|
616
|
-
}) as any
|
|
617
|
-
).flat();
|
|
618
|
-
}
|
|
619
|
-
this._updateFocusInEditMode(aVisibleSubSections);
|
|
620
|
-
}
|
|
621
|
-
}
|
|
631
|
+
})
|
|
632
|
+
.catch(function (Error) {
|
|
633
|
+
Log.error("Error while setting the focus", Error);
|
|
634
|
+
});
|
|
622
635
|
|
|
623
636
|
oInternalModelContext.setProperty("errorNavigationSectionFlag", false);
|
|
624
637
|
this._checkDataPointTitleForExternalNavigation();
|
|
@@ -835,7 +848,7 @@ class ObjectPageController extends PageController {
|
|
|
835
848
|
.then((popover: any) => {
|
|
836
849
|
view.addDependent(popover);
|
|
837
850
|
popover.setModel(view.getModel("sap.fe.i18n"), "i18n");
|
|
838
|
-
popover.setPlacement("Bottom");
|
|
851
|
+
popover.setPlacement("Bottom");
|
|
839
852
|
this.switchDraftAndActivePopOver = popover;
|
|
840
853
|
popover.attachAfterOpen(() => {
|
|
841
854
|
// While the list entry corresponding to the currently displayed document version is emphasized with a blue
|
|
@@ -945,7 +958,6 @@ class ObjectPageController extends PageController {
|
|
|
945
958
|
return aBlocks;
|
|
946
959
|
}
|
|
947
960
|
|
|
948
|
-
//TODO: This is needed for two workarounds - to be removed again
|
|
949
961
|
_findTables() {
|
|
950
962
|
const aSubSections = this._getAllSubSections();
|
|
951
963
|
const aTables: any[] = [];
|