@sapui5/sap.fe.templates 1.97.0 → 1.98.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 +4 -4
- package/src/sap/fe/templates/.library +1 -1
- package/src/sap/fe/templates/AnalyticalListPage/Component.js +1 -1
- package/src/sap/fe/templates/AnalyticalListPage/chart/FEChartDelegate.js +3 -3
- 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/ExtensionAPI.js +2 -2
- package/src/sap/fe/templates/ListReport/ListReport.view.xml +2 -1
- package/src/sap/fe/templates/ListReport/ListReportController.controller.js +86 -86
- package/src/sap/fe/templates/ListReport/overrides/IntentBasedNavigation.js +7 -3
- package/src/sap/fe/templates/ListReport/overrides/MassEdit.js +95 -0
- package/src/sap/fe/templates/ListReport/overrides/Share.js +37 -22
- package/src/sap/fe/templates/ListReport/overrides/ViewState.js +54 -32
- package/src/sap/fe/templates/ObjectPage/AnnotationHelper.js +21 -1
- package/src/sap/fe/templates/ObjectPage/Component.js +17 -15
- package/src/sap/fe/templates/ObjectPage/ExtensionAPI.js +16 -1
- package/src/sap/fe/templates/ObjectPage/ObjectPage.view.xml +103 -88
- package/src/sap/fe/templates/ObjectPage/ObjectPageController.controller.js +100 -73
- 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/StashableHBox.designtime.js +1 -1
- package/src/sap/fe/templates/ObjectPage/designtime/StashableVBox.designtime.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/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 +1 -1
- package/src/sap/fe/templates/ObjectPage/overrides/Paginator.js +13 -1
- package/src/sap/fe/templates/ObjectPage/overrides/Share.js +48 -44
- package/src/sap/fe/templates/ObjectPage/overrides/ViewState.js +1 -21
- package/src/sap/fe/templates/ObjectPage/view/fragments/Actions.fragment.xml +1 -1
- package/src/sap/fe/templates/ObjectPage/view/fragments/Section.fragment.xml +24 -5
- package/src/sap/fe/templates/ObjectPage/view/fragments/SectionContent.fragment.xml +1 -4
- package/src/sap/fe/templates/ObjectPage/view/fragments/SectionContentLazyLoader.fragment.xml +181 -0
- package/src/sap/fe/templates/ObjectPage/view/fragments/SectionFormContent.fragment.xml +1 -0
- package/src/sap/fe/templates/ObjectPage/view/fragments/SectionMoreFormContent.fragment.xml +1 -0
- package/src/sap/fe/templates/RootContainer/controller/Fcl.controller.js +1 -1
- package/src/sap/fe/templates/RootContainer/controller/NavContainer.controller.js +1 -1
- package/src/sap/fe/templates/RootContainer/controller/RootContainerBaseController.js +134 -124
- package/src/sap/fe/templates/RootContainer/overrides/EditFlow.js +1 -1
- package/src/sap/fe/templates/TableScroller.js +1 -1
- package/src/sap/fe/templates/controls/Table.fragment.xml +1 -1
- package/src/sap/fe/templates/library.js +2 -2
- package/src/sap/fe/templates/messagebundle.properties +24 -1
- package/src/sap/fe/templates/messagebundle_en_US_sappsd.properties +1 -1
- package/src/sap/fe/templates/messagebundle_en_US_saprigi.properties +1 -1
- package/src/sap/fe/templates/messagebundle_en_US_saptrc.properties +1 -1
- package/src/sap/fe/templates/messagebundle_es.properties +8 -8
- package/src/sap/fe/templates/messagebundle_fr.properties +1 -1
- package/src/sap/fe/templates/messagebundle_ja.properties +1 -1
- package/src/sap/fe/templates/messagebundle_tr.properties +1 -1
- package/src/sap/fe/templates/ObjectPage/view/fragments/HeaderImage.fragment.xml +0 -24
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* SAPUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2022 SAP SE. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
sap.ui.define(
|
|
6
6
|
[
|
|
7
7
|
"sap/fe/core/PageController",
|
|
8
8
|
"sap/fe/core/controllerextensions/InternalRouting",
|
|
9
9
|
"./overrides/InternalRouting",
|
|
10
|
-
"sap/fe/core/controllerextensions/SideEffects",
|
|
11
10
|
"sap/fe/core/controllerextensions/EditFlow",
|
|
12
11
|
"sap/fe/core/controllerextensions/InternalEditFlow",
|
|
13
12
|
"sap/fe/core/controllerextensions/PageReady",
|
|
@@ -41,13 +40,14 @@ sap.ui.define(
|
|
|
41
40
|
"sap/ui/model/json/JSONModel",
|
|
42
41
|
"sap/fe/core/controllerextensions/Paginator",
|
|
43
42
|
"./overrides/Paginator",
|
|
44
|
-
"sap/fe/core/controllerextensions/Placeholder"
|
|
43
|
+
"sap/fe/core/controllerextensions/Placeholder",
|
|
44
|
+
"sap/base/util/UriParameters",
|
|
45
|
+
"sap/fe/core/controllerextensions/MassEdit"
|
|
45
46
|
],
|
|
46
47
|
function(
|
|
47
48
|
PageController,
|
|
48
49
|
InternalRouting,
|
|
49
50
|
InternalRoutingOverride,
|
|
50
|
-
SideEffects,
|
|
51
51
|
EditFlow,
|
|
52
52
|
InternalEditFlow,
|
|
53
53
|
PageReady,
|
|
@@ -81,7 +81,9 @@ sap.ui.define(
|
|
|
81
81
|
JSONModel,
|
|
82
82
|
Paginator,
|
|
83
83
|
PaginatorOverride,
|
|
84
|
-
Placeholder
|
|
84
|
+
Placeholder,
|
|
85
|
+
UriParameters,
|
|
86
|
+
MassEdit
|
|
85
87
|
) {
|
|
86
88
|
"use strict";
|
|
87
89
|
|
|
@@ -100,7 +102,6 @@ sap.ui.define(
|
|
|
100
102
|
}
|
|
101
103
|
},
|
|
102
104
|
placeholder: Placeholder,
|
|
103
|
-
sideEffects: SideEffects,
|
|
104
105
|
editFlow: EditFlow,
|
|
105
106
|
share: Share.override(ShareOverrides),
|
|
106
107
|
_editFlow: InternalEditFlow.override(EditFlowOverrides),
|
|
@@ -112,7 +113,7 @@ sap.ui.define(
|
|
|
112
113
|
getNavigationMode: function() {
|
|
113
114
|
var bIsStickyEditMode =
|
|
114
115
|
this._oView.getController().getStickyEditMode && this._oView.getController().getStickyEditMode();
|
|
115
|
-
return bIsStickyEditMode ? "explace" :
|
|
116
|
+
return bIsStickyEditMode ? "explace" : undefined;
|
|
116
117
|
}
|
|
117
118
|
}),
|
|
118
119
|
viewState: ViewState.override(ViewStateOverrides),
|
|
@@ -121,6 +122,7 @@ sap.ui.define(
|
|
|
121
122
|
return true;
|
|
122
123
|
}
|
|
123
124
|
}),
|
|
125
|
+
massEdit: MassEdit,
|
|
124
126
|
|
|
125
127
|
getExtensionAPI: function(sId) {
|
|
126
128
|
if (sId) {
|
|
@@ -152,7 +154,7 @@ sap.ui.define(
|
|
|
152
154
|
});
|
|
153
155
|
oInternalModelContext.setProperty("batchGroups", this._getBatchGroupsForView());
|
|
154
156
|
oInternalModelContext.setProperty("errorNavigationSectionFlag", false);
|
|
155
|
-
if (oObjectPage.getEnableLazyLoading()) {
|
|
157
|
+
if (!this.getView().getViewData().useNewLazyLoading && oObjectPage.getEnableLazyLoading()) {
|
|
156
158
|
//Attaching the event to make the subsection context binding active when it is visible.
|
|
157
159
|
oObjectPage.attachEvent("subSectionEnteredViewPort", this._handleSubSectionEnteredViewPort.bind(this));
|
|
158
160
|
}
|
|
@@ -203,8 +205,8 @@ sap.ui.define(
|
|
|
203
205
|
aTables = this._findTables(),
|
|
204
206
|
oFastCreationRow,
|
|
205
207
|
oObjectPage = this.byId("fe::ObjectPage"),
|
|
206
|
-
oBinding = mParameters.listBinding,
|
|
207
208
|
oInternalModelContext = that.getView().getBindingContext("internal"),
|
|
209
|
+
oInternalModel = that.getView().getModel("internal"),
|
|
208
210
|
aBatchGroups = oInternalModelContext.getProperty("batchGroups"),
|
|
209
211
|
iViewLevel = this.getView().getViewData().viewLevel;
|
|
210
212
|
|
|
@@ -260,29 +262,37 @@ sap.ui.define(
|
|
|
260
262
|
});
|
|
261
263
|
|
|
262
264
|
//Set the Binding for Paginators using ListBinding ID
|
|
263
|
-
if (
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
oBinding.
|
|
281
|
-
|
|
282
|
-
|
|
265
|
+
if (iViewLevel > 1) {
|
|
266
|
+
var oBinding = mParameters && mParameters.listBinding,
|
|
267
|
+
oPaginatorCurrentContext = oInternalModel.getProperty("/paginatorCurrentContext");
|
|
268
|
+
if (oPaginatorCurrentContext) {
|
|
269
|
+
var oBindingToUse = oPaginatorCurrentContext.getBinding();
|
|
270
|
+
this.paginator.initialize(oBindingToUse, oPaginatorCurrentContext);
|
|
271
|
+
oInternalModel.setProperty("/paginatorCurrentContext", null);
|
|
272
|
+
} else if (oBinding) {
|
|
273
|
+
if (oBinding.isA("sap.ui.model.odata.v4.ODataListBinding")) {
|
|
274
|
+
this.paginator.initialize(oBinding, oContext);
|
|
275
|
+
} else {
|
|
276
|
+
//if the binding type is not ODataListBinding because of a deeplink navigation or a refresh of the page
|
|
277
|
+
// we need to create it
|
|
278
|
+
var sContextPath = oBinding.getPath().replace(/\([^\)]*\)*$/, ""); //removing the last tuple
|
|
279
|
+
oBinding = new sap.ui.model.odata.v4.ODataListBinding(
|
|
280
|
+
oBinding.oModel,
|
|
281
|
+
"",
|
|
282
|
+
oBinding.oModel.createBindingContext(sContextPath)
|
|
283
|
+
);
|
|
284
|
+
|
|
285
|
+
oBinding.getContexts(0);
|
|
286
|
+
oBinding.attachEvent("change", function _setListBindingAsync() {
|
|
287
|
+
if (oBinding.getContexts().length > 0) {
|
|
288
|
+
that.paginator.initialize(oBinding, oContext);
|
|
289
|
+
oBinding.detachEvent("change", _setListBindingAsync);
|
|
290
|
+
}
|
|
291
|
+
});
|
|
292
|
+
}
|
|
283
293
|
}
|
|
284
294
|
}
|
|
285
|
-
if (oObjectPage.getEnableLazyLoading()) {
|
|
295
|
+
if (!this.getView().getViewData().useNewLazyLoading && oObjectPage.getEnableLazyLoading()) {
|
|
286
296
|
var aSections = oObjectPage.getSections(),
|
|
287
297
|
bUseIconTabBar = oObjectPage.getUseIconTabBar(),
|
|
288
298
|
iSkip = 2,
|
|
@@ -295,7 +305,9 @@ sap.ui.define(
|
|
|
295
305
|
// In IconTabBar mode keep the second section bound if there is an editable header and we are switching to display mode
|
|
296
306
|
if (iSkip < 1 || (bUseIconTabBar && (iSection > 1 || (iSection === 1 && !bEditableHeader && !bIsInEditMode)))) {
|
|
297
307
|
var oSubSection = aSubSections[iSubSection];
|
|
298
|
-
oSubSection.
|
|
308
|
+
if (oSubSection.data().isVisibilityDynamic !== "true") {
|
|
309
|
+
oSubSection.setBindingContext(null);
|
|
310
|
+
}
|
|
299
311
|
}
|
|
300
312
|
}
|
|
301
313
|
}
|
|
@@ -322,30 +334,37 @@ sap.ui.define(
|
|
|
322
334
|
},
|
|
323
335
|
|
|
324
336
|
_getFirstEmptyMandatoryFieldFromSubSection: function(aSubSections) {
|
|
325
|
-
|
|
326
|
-
var
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
var aFormElements = aFormContainers[formContainer].getFormElements();
|
|
343
|
-
|
|
344
|
-
for (var formElement = 0; aFormElements && formElement < aFormElements.length; formElement++) {
|
|
345
|
-
var aFields = aFormElements[formElement].getFields();
|
|
337
|
+
if (aSubSections) {
|
|
338
|
+
for (var subSection = 0; subSection < aSubSections.length; subSection++) {
|
|
339
|
+
var aBlocks = aSubSections[subSection].getBlocks();
|
|
340
|
+
|
|
341
|
+
if (aBlocks) {
|
|
342
|
+
for (var block = 0; block < aBlocks.length; block++) {
|
|
343
|
+
var aFormContainers;
|
|
344
|
+
|
|
345
|
+
if (aBlocks[block].isA("sap.ui.layout.form.Form")) {
|
|
346
|
+
aFormContainers = aBlocks[block].getFormContainers();
|
|
347
|
+
} else if (
|
|
348
|
+
aBlocks[block].getContent &&
|
|
349
|
+
aBlocks[block].getContent() &&
|
|
350
|
+
aBlocks[block].getContent().isA("sap.ui.layout.form.Form")
|
|
351
|
+
) {
|
|
352
|
+
aFormContainers = aBlocks[block].getContent().getFormContainers();
|
|
353
|
+
}
|
|
346
354
|
|
|
347
|
-
if (
|
|
348
|
-
|
|
355
|
+
if (aFormContainers) {
|
|
356
|
+
for (var formContainer = 0; formContainer < aFormContainers.length; formContainer++) {
|
|
357
|
+
var aFormElements = aFormContainers[formContainer].getFormElements();
|
|
358
|
+
if (aFormElements) {
|
|
359
|
+
for (var formElement = 0; formElement < aFormElements.length; formElement++) {
|
|
360
|
+
var aFields = aFormElements[formElement].getFields();
|
|
361
|
+
|
|
362
|
+
if (aFields[0].getRequired() && !aFields[0].getValue()) {
|
|
363
|
+
return aFields[0];
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
}
|
|
349
368
|
}
|
|
350
369
|
}
|
|
351
370
|
}
|
|
@@ -379,15 +398,24 @@ sap.ui.define(
|
|
|
379
398
|
},
|
|
380
399
|
|
|
381
400
|
_onBackNavigationInDraft: function(oContext) {
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
401
|
+
if (
|
|
402
|
+
this.getAppComponent()
|
|
403
|
+
.getRouterProxy()
|
|
404
|
+
.checkIfBackHasSameContext()
|
|
405
|
+
) {
|
|
406
|
+
// Back nav will keep the same context --> no need to display the dialog
|
|
407
|
+
history.back();
|
|
408
|
+
} else {
|
|
409
|
+
CommonUtils.fnProcessDataLossOrDraftDiscardConfirmation(
|
|
410
|
+
function() {
|
|
411
|
+
history.back();
|
|
412
|
+
},
|
|
413
|
+
Function.prototype,
|
|
414
|
+
oContext,
|
|
415
|
+
this,
|
|
416
|
+
false
|
|
417
|
+
);
|
|
418
|
+
}
|
|
391
419
|
},
|
|
392
420
|
|
|
393
421
|
_onAfterBinding: function(oBindingContext, mParameters) {
|
|
@@ -396,7 +424,7 @@ sap.ui.define(
|
|
|
396
424
|
aTables = this._findTables(),
|
|
397
425
|
aFormContainers = this._findFormContainers();
|
|
398
426
|
|
|
399
|
-
this.
|
|
427
|
+
this._sideEffects.clearPropertiesStatus();
|
|
400
428
|
|
|
401
429
|
// TODO: this is only a temp solution as long as the model fix the cache issue and we use this additional
|
|
402
430
|
// binding with ownRequest
|
|
@@ -574,8 +602,10 @@ sap.ui.define(
|
|
|
574
602
|
});
|
|
575
603
|
});
|
|
576
604
|
|
|
577
|
-
|
|
578
|
-
|
|
605
|
+
if (!this.getView().getViewData().useNewLazyLoading) {
|
|
606
|
+
// should be called only after binding is ready hence calling it in onAfterBinding
|
|
607
|
+
oObjectPage._triggerVisibleSubSectionsEvents();
|
|
608
|
+
}
|
|
579
609
|
}
|
|
580
610
|
},
|
|
581
611
|
onPageReady: function(mParameters) {
|
|
@@ -666,7 +696,7 @@ sap.ui.define(
|
|
|
666
696
|
icon: ""
|
|
667
697
|
};
|
|
668
698
|
|
|
669
|
-
return
|
|
699
|
+
return oTitleInfo;
|
|
670
700
|
},
|
|
671
701
|
|
|
672
702
|
_executeHeaderShortcut: function(sId) {
|
|
@@ -1088,7 +1118,6 @@ sap.ui.define(
|
|
|
1088
1118
|
aPathParts.forEach(function(sPathPart, i) {
|
|
1089
1119
|
sPath += "/" + sPathPart;
|
|
1090
1120
|
var oRootViewController = oAppComponent.getRootViewController();
|
|
1091
|
-
var oTitleHierarchyCache = oRootViewController.getTitleHierarchyCache();
|
|
1092
1121
|
var pWaitForTitleHiearchyInfo;
|
|
1093
1122
|
var sParameterPath = oMetaModel.getMetaPath(sPath);
|
|
1094
1123
|
var bResultContext = oMetaModel.getObject(sParameterPath + "/@com.sap.vocabularies.Common.v1.ResultContext");
|
|
@@ -1097,11 +1126,9 @@ sap.ui.define(
|
|
|
1097
1126
|
iSkipParameterized = 1;
|
|
1098
1127
|
return;
|
|
1099
1128
|
}
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
pWaitForTitleHiearchyInfo = Promise.resolve(oTitleHierarchyCache[sPath]);
|
|
1104
|
-
}
|
|
1129
|
+
|
|
1130
|
+
pWaitForTitleHiearchyInfo = oRootViewController.getTitleInfoFromPath(sPath);
|
|
1131
|
+
|
|
1105
1132
|
pWaitForTitleHiearchyInfo
|
|
1106
1133
|
.then(function(oTitleHiearchyInfo) {
|
|
1107
1134
|
var idx = i - iSkipParameterized,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* SAPUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2022 SAP SE. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
sap.ui.define(["sap/fe/core/CommonUtils", "sap/fe/navigation/SelectionVariant"], function(CommonUtils, SelectionVariant) {
|
|
6
6
|
"use strict";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* SAPUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2022 SAP SE. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
sap.ui.define(["sap/fe/core/CommonUtils", "sap/fe/navigation/SelectionVariant"], function(CommonUtils, SelectionVariant) {
|
|
6
6
|
"use strict";
|
|
@@ -1,10 +1,22 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* SAPUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2022 SAP SE. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
sap.ui.define([], function() {
|
|
6
6
|
"use strict";
|
|
7
7
|
return {
|
|
8
|
+
onBeforeContextUpdate: function(oListBinding, iCurrentContextIndex, iIndexUpdate) {
|
|
9
|
+
var oCurrentView = this.getView(),
|
|
10
|
+
oControlContext = oCurrentView && oCurrentView.getBindingContext(),
|
|
11
|
+
aCurrentContexts = oListBinding && oListBinding.getCurrentContexts(),
|
|
12
|
+
oPaginatorCurrentContext = aCurrentContexts[iCurrentContextIndex];
|
|
13
|
+
|
|
14
|
+
if (oPaginatorCurrentContext && oControlContext && oPaginatorCurrentContext.getPath() !== oControlContext.getPath()) {
|
|
15
|
+
// Prevent default update of context index in Object Page Paginator when view context is different from the paginator context.
|
|
16
|
+
return true;
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
|
|
8
20
|
onContextUpdate: function(oContext) {
|
|
9
21
|
var that = this;
|
|
10
22
|
that.base._routing.navigateToContext(oContext, { callExtension: true });
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* SAPUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2022 SAP SE. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
sap.ui.define(
|
|
6
6
|
[
|
|
@@ -229,25 +229,29 @@ sap.ui.define(
|
|
|
229
229
|
}
|
|
230
230
|
}
|
|
231
231
|
|
|
232
|
-
/**
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
function getShareUrl(
|
|
242
|
-
var
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
232
|
+
// /**
|
|
233
|
+
// * Get share URL.
|
|
234
|
+
// * @param sEditMode
|
|
235
|
+
// * @param bIsStickySupported
|
|
236
|
+
// * @param aActiveContextPaths
|
|
237
|
+
// * @returns {string} The share URL
|
|
238
|
+
// * @protected
|
|
239
|
+
// * @static
|
|
240
|
+
// */
|
|
241
|
+
function getShareUrl() {
|
|
242
|
+
var oUShellContainer = sap.ushell && sap.ushell.Container;
|
|
243
|
+
if (oUShellContainer) {
|
|
244
|
+
return oUShellContainer
|
|
245
|
+
.getFLPUrlAsync(true)
|
|
246
|
+
.then(function(sFLPUrl) {
|
|
247
|
+
return sFLPUrl;
|
|
248
|
+
})
|
|
249
|
+
.catch(function(sError) {
|
|
250
|
+
Log.error("Could not retrieve cFLP URL for the sharing dialog (dialog will not be opened)", sError);
|
|
251
|
+
});
|
|
247
252
|
} else {
|
|
248
|
-
|
|
253
|
+
return Promise.resolve(document.URL);
|
|
249
254
|
}
|
|
250
|
-
return sShareUrl;
|
|
251
255
|
}
|
|
252
256
|
|
|
253
257
|
function getJamUrl(sEditMode, bIsStickySupported, aActiveContextPaths) {
|
|
@@ -282,32 +286,32 @@ sap.ui.define(
|
|
|
282
286
|
oUIModel = this.base.getView().getModel("ui");
|
|
283
287
|
sEditMode = oUIModel.getProperty("/editMode");
|
|
284
288
|
return fetchActiveContextPaths(oContext, that.base.getView().getController()).then(function(aActiveContextPaths) {
|
|
285
|
-
var
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
title
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
289
|
+
var oPageTitleInfo = that.base
|
|
290
|
+
.getView()
|
|
291
|
+
.getController()
|
|
292
|
+
._getPageTitleInformation();
|
|
293
|
+
|
|
294
|
+
return Promise.all([getJamUrl(sEditMode, bIsStickySupported, aActiveContextPaths), getShareUrl()])
|
|
295
|
+
.then(function(oData) {
|
|
296
|
+
var sTitle = oPageTitleInfo.title;
|
|
297
|
+
var sObjectSubtitle = oPageTitleInfo.subtitle.toString();
|
|
298
|
+
if (sObjectSubtitle) {
|
|
299
|
+
sTitle = sTitle + " - " + sObjectSubtitle;
|
|
300
|
+
}
|
|
301
|
+
oShareMetadata.tile = {
|
|
302
|
+
title: oPageTitleInfo.title,
|
|
303
|
+
subtitle: oPageTitleInfo.subtitle.toString()
|
|
304
|
+
};
|
|
305
|
+
oShareMetadata.email.title = sTitle;
|
|
306
|
+
oShareMetadata.title = sTitle;
|
|
307
|
+
oShareMetadata.jam.url = oData[0];
|
|
308
|
+
oShareMetadata.url = oData[1];
|
|
309
|
+
|
|
310
|
+
return oShareMetadata;
|
|
311
|
+
})
|
|
312
|
+
.catch(function(error) {
|
|
313
|
+
Log.error(error);
|
|
314
|
+
});
|
|
311
315
|
});
|
|
312
316
|
}
|
|
313
317
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* SAPUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2022 SAP SE. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
sap.ui.define(["sap/fe/core/library", "sap/fe/core/helpers/KeepAliveHelper"], function(CoreLibrary, KeepAliveHelper) {
|
|
6
6
|
"use strict";
|
|
@@ -40,26 +40,6 @@ sap.ui.define(["sap/fe/core/library", "sap/fe/core/helpers/KeepAliveHelper"], fu
|
|
|
40
40
|
|
|
41
41
|
aStateControls.push(oView.byId("fe::ObjectPage"));
|
|
42
42
|
},
|
|
43
|
-
adaptControlStateHandler: function(oControl, aControlHandler) {
|
|
44
|
-
if (oControl.isA("sap.ui.fl.variants.VariantManagement")) {
|
|
45
|
-
aControlHandler.push({
|
|
46
|
-
retrieve: function(oVM) {
|
|
47
|
-
return {
|
|
48
|
-
"variantId": oVM.getCurrentVariantKey()
|
|
49
|
-
};
|
|
50
|
-
},
|
|
51
|
-
apply: function(oVM, oControlState) {
|
|
52
|
-
if (
|
|
53
|
-
oControlState &&
|
|
54
|
-
oControlState.variantId !== undefined &&
|
|
55
|
-
!(oControlState.variantId === oVM.getId() && oVM.getModified() === false)
|
|
56
|
-
) {
|
|
57
|
-
oVM.setModified(true);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
},
|
|
63
43
|
adaptBindingRefreshControls: function(aControls) {
|
|
64
44
|
var oView = this.getView(),
|
|
65
45
|
sRefreshStrategy = KeepAliveHelper.getViewRefreshInfo(oView),
|
|
@@ -179,5 +179,5 @@
|
|
|
179
179
|
</template:repeat>
|
|
180
180
|
</template:if>
|
|
181
181
|
<core:Fragment fragmentName="sap.fe.templates.ObjectPage.view.fragments.RelatedApps" type="XML" />
|
|
182
|
-
<macro:Share id="fe::Share"
|
|
182
|
+
<macro:Share id="fe::Share" visible="{= OP.getShareButtonVisibility(${viewData>/}) }" />
|
|
183
183
|
</core:FragmentDefinition>
|
|
@@ -55,17 +55,36 @@
|
|
|
55
55
|
showTitle="{subSection>showTitle}"
|
|
56
56
|
visible="{subSection>visible}"
|
|
57
57
|
>
|
|
58
|
-
|
|
58
|
+
<!--uxap:customData>
|
|
59
59
|
<core:CustomData key="strategyForVisibilityChange" value="lazyLoading" />
|
|
60
|
+
</uxap:customData-->
|
|
61
|
+
<uxap:customData>
|
|
62
|
+
<core:CustomData key="isVisibilityDynamic" value="{subSection>isVisibilityDynamic}" />
|
|
60
63
|
</uxap:customData>
|
|
61
64
|
<template:if test="{= ${subSection>type} === 'Mixed'}">
|
|
62
65
|
<template:then>
|
|
63
|
-
<template:
|
|
64
|
-
<
|
|
65
|
-
|
|
66
|
+
<template:if test="{viewData>/useNewLazyLoading}">
|
|
67
|
+
<template:then>
|
|
68
|
+
<template:repeat list="{subSection>content}" var="subSection">
|
|
69
|
+
<core:Fragment fragmentName="sap.fe.templates.ObjectPage.view.fragments.SectionContentLazyLoader" type="XML" />
|
|
70
|
+
</template:repeat>
|
|
71
|
+
</template:then>
|
|
72
|
+
<template:else>
|
|
73
|
+
<template:repeat list="{subSection>content}" var="subSection">
|
|
74
|
+
<core:Fragment fragmentName="sap.fe.templates.ObjectPage.view.fragments.SectionContent" type="XML" />
|
|
75
|
+
</template:repeat>
|
|
76
|
+
</template:else>
|
|
77
|
+
</template:if>
|
|
66
78
|
</template:then>
|
|
67
79
|
<template:else>
|
|
68
|
-
<
|
|
80
|
+
<template:if test="{viewData>/useNewLazyLoading}">
|
|
81
|
+
<template:then>
|
|
82
|
+
<core:Fragment fragmentName="sap.fe.templates.ObjectPage.view.fragments.SectionContentLazyLoader" type="XML" />
|
|
83
|
+
</template:then>
|
|
84
|
+
<template:else>
|
|
85
|
+
<core:Fragment fragmentName="sap.fe.templates.ObjectPage.view.fragments.SectionContent" type="XML" />
|
|
86
|
+
</template:else>
|
|
87
|
+
</template:if>
|
|
69
88
|
</template:else>
|
|
70
89
|
</template:if>
|
|
71
90
|
</uxap:ObjectPageSubSection>
|
|
@@ -131,10 +131,7 @@
|
|
|
131
131
|
<template:elseif test="{= ${subSection>type} === 'DataVisualization'}">
|
|
132
132
|
<uxap:blocks>
|
|
133
133
|
<template:if test="{= ${subSection>level} === 2}">
|
|
134
|
-
<Title
|
|
135
|
-
text="{subSection>title}"
|
|
136
|
-
visible="{= ${subSection>visible} && ${subSection>title} !=='undefined' && ${subSection>showTitle} ? true : false}"
|
|
137
|
-
/>
|
|
134
|
+
<Title text="{subSection>title}" visible="{subSection>titleVisible}" />
|
|
138
135
|
</template:if>
|
|
139
136
|
<opcontrol:SubSectionBlock visible="{subSection>visible}">
|
|
140
137
|
<opcontrol:content>
|