@sapui5/sap.suite.ui.generic.template 1.144.0 → 1.145.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/suite/ui/generic/template/.library +1 -1
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/manifest.json +1 -1
- package/src/sap/suite/ui/generic/template/Canvas/behaviour.js +11 -0
- package/src/sap/suite/ui/generic/template/Canvas/manifest.json +1 -1
- package/src/sap/suite/ui/generic/template/ListReport/manifest.json +1 -1
- package/src/sap/suite/ui/generic/template/ObjectPage/extensionAPI/ExtensionAPI.js +2 -2
- package/src/sap/suite/ui/generic/template/ObjectPage/manifest.json +1 -1
- package/src/sap/suite/ui/generic/template/QuickCreate/manifest.json +1 -1
- package/src/sap/suite/ui/generic/template/QuickView/manifest.json +1 -1
- package/src/sap/suite/ui/generic/template/designtime/floorplans/ObjectPage.designtime.js +6 -1
- package/src/sap/suite/ui/generic/template/designtime/utils/designtimeUtils.js +10 -3
- package/src/sap/suite/ui/generic/template/fragments/QuickViewSmartForm.fragment.xml +4 -3
- package/src/sap/suite/ui/generic/template/lib/AppComponent.js +1 -1
- package/src/sap/suite/ui/generic/template/lib/PageLeaveHandler.js +36 -8
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n.properties +3 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_en_US_saprigi.properties +2 -0
- package/src/sap/suite/ui/generic/template/lib/navigation/NavigationController.js +10 -25
- package/src/sap/suite/ui/generic/template/lib/presentationControl/SmartTableHandler.js +1 -1
- package/src/sap/suite/ui/generic/template/library.js +1 -1
package/package.json
CHANGED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// This class contains behaviour information about the Canvas floorplan which can be used by the framework even before an instance of the Canvas has been created
|
|
2
|
+
// Canvas does not have a specific placeholder pattern like LR/OP, so we display the standard placeholder.
|
|
3
|
+
// The routing helper calls the Fiori-defined placeholder for all floor plans; therefore, we introduce the code below with an empty object
|
|
4
|
+
// to prevent a 404 error.
|
|
5
|
+
// In the future, if we introduce an extension to display a placeholder, this code can be reused for that purpose.
|
|
6
|
+
|
|
7
|
+
sap.ui.define(["sap/ui/core/mvc/XMLView"], function(XMLView){
|
|
8
|
+
"use strict";
|
|
9
|
+
|
|
10
|
+
return {};
|
|
11
|
+
});
|
|
@@ -305,7 +305,7 @@ sap.ui.define(
|
|
|
305
305
|
* @param {String} sEntitySet - The entity set to which the custom field belongs.
|
|
306
306
|
* @returns {function} returns a call back function, And qualifier of the side effect should be passed.
|
|
307
307
|
* Call back function need to be called from controls event-handler.
|
|
308
|
-
* @
|
|
308
|
+
* @public
|
|
309
309
|
*/
|
|
310
310
|
registerCustomFieldForSideEffect: function (oControl, sProperty, sEntitySet) {
|
|
311
311
|
SideEffectUtil.registerCustomFieldForSideEffect(oControl, sProperty, sEntitySet, oController);
|
|
@@ -323,7 +323,7 @@ sap.ui.define(
|
|
|
323
323
|
* @param {String} sEntitySet - The entity set to which the custom column belongs.
|
|
324
324
|
* @returns {function} returns a call back function, And qualifier of the side effect should be passed.
|
|
325
325
|
* Call back function need to be called from controls(Custom control which inside the custom column) event-handler.
|
|
326
|
-
* @
|
|
326
|
+
* @public
|
|
327
327
|
*/
|
|
328
328
|
registerCustomColumnForSideEffect: function (oTable, sProperty, sEntitySet) {
|
|
329
329
|
SideEffectUtil.registerCustomColumnForSideEffect(oTable, sProperty, sEntitySet, oController);
|
|
@@ -214,7 +214,12 @@ sap.ui.define([
|
|
|
214
214
|
}
|
|
215
215
|
},
|
|
216
216
|
"sap.uxap.ObjectPageSubSection": {
|
|
217
|
-
actions: ["rename", "remove", "reveal"]
|
|
217
|
+
actions: ["rename", "remove", "reveal"],
|
|
218
|
+
aggregations: {
|
|
219
|
+
actions: {
|
|
220
|
+
actions: ["remove"]
|
|
221
|
+
}
|
|
222
|
+
}
|
|
218
223
|
},
|
|
219
224
|
"sap.ui.comp.smartform.SmartForm": { // not documented in allow list, but checked by RTA OPA test
|
|
220
225
|
actions: ["localReset", "annotation"],
|
|
@@ -299,13 +299,20 @@ sap.ui.define([
|
|
|
299
299
|
return new Promise(function (resolve, reject) {
|
|
300
300
|
sap.ui.require([
|
|
301
301
|
"sap/m/Dialog",
|
|
302
|
-
"sap/m/Button"
|
|
303
|
-
|
|
302
|
+
"sap/m/Button",
|
|
303
|
+
"sap/m/MessageStrip"
|
|
304
|
+
], function (Dialog, Button, MessageStrip) {
|
|
305
|
+
const warningText = new MessageStrip({
|
|
306
|
+
type: MessageType.Information,
|
|
307
|
+
showIcon: true,
|
|
308
|
+
text: "{i18n>RTA_CONFIGURATION_INFO_MESSAGE}"
|
|
309
|
+
});
|
|
310
|
+
warningText.addStyleClass("sapUiSmallMarginBottom");
|
|
304
311
|
const dialog = new Dialog({
|
|
305
312
|
title: title,
|
|
306
313
|
contentWidth: size ? size.width : "550px",
|
|
307
314
|
contentHeight: size ? size.height : "300px",
|
|
308
|
-
content: [list],
|
|
315
|
+
content: [warningText, list],
|
|
309
316
|
resizable: true,
|
|
310
317
|
buttons: [
|
|
311
318
|
new Button({
|
|
@@ -36,7 +36,8 @@
|
|
|
36
36
|
text="{parts: [{path: 'quickView>/sourceEntityType'}, {path: 'quickView>/sourceClickedField'}, {path: 'quickView>/navigationPath'} ], formatter: 'AH.getTitle'}"
|
|
37
37
|
target="{path: 'quickView>mainNavigation/Target'}"
|
|
38
38
|
press="._templateEventHandlers.onSemanticObjectLinkNavigationPressed"
|
|
39
|
-
wrapping="false"
|
|
39
|
+
wrapping="false"
|
|
40
|
+
accessibleRole="Button">
|
|
40
41
|
<fe:customData>
|
|
41
42
|
<core:CustomData key="SemanticObject" value="{path: 'quickView>/mainNavigation/SemanticObject'}"/>
|
|
42
43
|
<core:CustomData key="Action" value="{path: 'quickView>/mainNavigation/Action'}"/>
|
|
@@ -86,7 +87,7 @@
|
|
|
86
87
|
<template:if test="{= ${path: 'isFirstEmail>', formatter: 'AH.fnCheckFirstEmail'} && ${dataFieldValue>com.sap.vocabularies.Communication.v1.IsEmailAddress}.Bool === 'true' && ${parameter>/templateSpecific/teamsCollabOptions} !== undefined && ${parameter>/templateSpecific/teamsCollabOptions}.length > 0}">
|
|
87
88
|
<VBox visible="{path: 'dataField>Value', formatter: 'AHModel.format'}" class="sapUiTinyMarginTop">
|
|
88
89
|
<Toolbar>
|
|
89
|
-
<Title text="{i18n>CONTACT_OPTION}" level="H5" class="sapUiTinyMarginBegin"/>
|
|
90
|
+
<Title text="{i18n>CONTACT_OPTION}" level="H5" class="sapUiTinyMarginBegin"/>
|
|
90
91
|
<ToolbarSpacer/>
|
|
91
92
|
<template:repeat list="{parameter>/templateSpecific/teamsCollabOptions}" var="teamsCollabOption">
|
|
92
93
|
<Button
|
|
@@ -145,7 +146,7 @@
|
|
|
145
146
|
</template:else>
|
|
146
147
|
</template:if>
|
|
147
148
|
</template:with>
|
|
148
|
-
</template:with>
|
|
149
|
+
</template:with>
|
|
149
150
|
</template:repeat>
|
|
150
151
|
</template:if>
|
|
151
152
|
</template:if>
|
|
@@ -959,7 +959,7 @@ sap.ui.define([
|
|
|
959
959
|
* @public
|
|
960
960
|
* @extends sap.ui.core.UIComponent
|
|
961
961
|
* @author SAP SE
|
|
962
|
-
* @version 1.
|
|
962
|
+
* @version 1.145.0
|
|
963
963
|
* @name sap.suite.ui.generic.template.lib.AppComponent
|
|
964
964
|
*/
|
|
965
965
|
var oAppComponent = UIComponent.extend("sap.suite.ui.generic.template.lib.AppComponent", {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
sap.ui.define(["sap/ui/base/Object",
|
|
2
|
-
"sap/base/util/extend",
|
|
1
|
+
sap.ui.define(["sap/ui/base/Object",
|
|
2
|
+
"sap/base/util/extend",
|
|
3
3
|
"sap/suite/ui/generic/template/lib/CRUDHelper",
|
|
4
4
|
"sap/suite/ui/generic/template/lib/MessageUtils"
|
|
5
5
|
], function (BaseObject, extend, CRUDHelper, MessageUtils) {
|
|
@@ -7,7 +7,7 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
7
7
|
|
|
8
8
|
function getMethods(oTemplateContract) {
|
|
9
9
|
|
|
10
|
-
var fnOnDiscardOrKeepDraftConfirmed,
|
|
10
|
+
var fnOnDiscardOrKeepDraftConfirmed,
|
|
11
11
|
fnOnDiscardOrKeepDraftCancel;
|
|
12
12
|
|
|
13
13
|
function getSelectedKey(oKeepDiscardPopup) {
|
|
@@ -22,6 +22,22 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
22
22
|
firstListItemOption.focus();
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
+
function checkIfNavigationIsExplace() {
|
|
26
|
+
var UShellContainer = sap.ui.require("sap/ushell/Container");
|
|
27
|
+
if (!UShellContainer) {
|
|
28
|
+
return Promise.resolve(false); // No UShell container, assume inplace navigation
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
return UShellContainer.getServiceAsync("FioriElements").then(function(oFioriElementsService) {
|
|
32
|
+
if (oFioriElementsService && typeof oFioriElementsService.isExplaceNavigation === "function") {
|
|
33
|
+
return oFioriElementsService.isExplaceNavigation();
|
|
34
|
+
}
|
|
35
|
+
return false; // API not available, default to inplace behavior
|
|
36
|
+
}).catch(function() {
|
|
37
|
+
return false; // Service not available or error, default to inplace behavior
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
|
|
25
41
|
/*
|
|
26
42
|
ShowDiscardDraftPopUp
|
|
27
43
|
*/
|
|
@@ -29,7 +45,7 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
29
45
|
fnOnDiscardOrKeepDraftConfirmed = onDiscardOrKeepDraftConfirmed;
|
|
30
46
|
fnOnDiscardOrKeepDraftCancel = onDiscardOrKeepDraftCancel;
|
|
31
47
|
|
|
32
|
-
var oDraftPopup,
|
|
48
|
+
var oDraftPopup,
|
|
33
49
|
oComponent = getComponent(),
|
|
34
50
|
oController = oComponent.oController;
|
|
35
51
|
var sFragmentname = "sap.suite.ui.generic.template.ObjectPage.view.fragments.DraftConfirmationPopup";
|
|
@@ -134,13 +150,25 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
134
150
|
function fnPerformAfterDiscardOrKeepDraftImpl(fnPositive, fnNegative, sMode, bIsTechnical) {
|
|
135
151
|
var sEnableDiscardDraftConfirmation = oTemplateContract.oNavigationControllerProxy.isDiscardDraftConfirmationNeeded();
|
|
136
152
|
var bNeedsPopup = ((sEnableDiscardDraftConfirmation === "always" && sMode.startsWith("Leave")) || (sEnableDiscardDraftConfirmation === "restricted" && sMode === "LeavePage")) && isObjectEditable();
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
} else {
|
|
153
|
+
|
|
154
|
+
if (!bNeedsPopup) {
|
|
140
155
|
fnPositive();
|
|
156
|
+
return;
|
|
141
157
|
}
|
|
158
|
+
|
|
159
|
+
// Check if navigation will be explace and skip popup if so
|
|
160
|
+
checkIfNavigationIsExplace().then(function(bIsExplace) {
|
|
161
|
+
if (bIsExplace) {
|
|
162
|
+
fnPositive(); // Skip popup for explace navigation
|
|
163
|
+
} else {
|
|
164
|
+
fnDiscardOrKeepDraftConfirmation(fnPositive, fnNegative, sMode);
|
|
165
|
+
}
|
|
166
|
+
}).catch(function() {
|
|
167
|
+
// Fallback: show popup as before if API check fails
|
|
168
|
+
fnDiscardOrKeepDraftConfirmation(fnPositive, fnNegative, sMode);
|
|
169
|
+
});
|
|
142
170
|
}
|
|
143
|
-
|
|
171
|
+
|
|
144
172
|
function getComponent() {
|
|
145
173
|
var oComponent;
|
|
146
174
|
var oCurrentIdentity = oTemplateContract.oNavigationControllerProxy.getCurrentIdentity();
|
|
@@ -565,6 +565,9 @@ RTA_CONFIGURATION_TITLE_FILTER_BAR=Configure Filter Bar
|
|
|
565
565
|
# XTIT: Title text on Configurations dialog for Object Page
|
|
566
566
|
RTA_CONFIGURATION_TITLE_OBJECT_PAGE=Configure Object Page
|
|
567
567
|
|
|
568
|
+
# XMSG: Information message text in Configurations dialog
|
|
569
|
+
RTA_CONFIGURATION_INFO_MESSAGE=Changes will only be visible after the application reloads.
|
|
570
|
+
|
|
568
571
|
# XBUT: Button text for Cancel on Configurations dialog
|
|
569
572
|
RTA_CONFIGURATION_CANCEL=Cancel
|
|
570
573
|
|
|
@@ -368,6 +368,8 @@ RTA_CONFIGURATION_TITLE_FILTER_BAR=\u206A\u206A\u206A\u200C\u200C\u200B\u200B\u2
|
|
|
368
368
|
|
|
369
369
|
RTA_CONFIGURATION_TITLE_OBJECT_PAGE=\u206A\u206A\u206A\u200C\u200D\u200C\u200D\u200D\u200D\u200D\u200D\u200B\u200D\u200C\u200D\u200B\u200C\u200C\u200C\u200D\u200C\u200B\u200D\u200B\u200C\u200D\u200D\u200D\u200D\u200D\u200C\u200C\u200C\u200B\u200C\u200B\u200B\u200C\u200B\u200C\u200C\u200B\u206AConfigure Object Page\u206A\u206A
|
|
370
370
|
|
|
371
|
+
RTA_CONFIGURATION_INFO_MESSAGE=\u206A\u206A\u206A\u200C\u200D\u200D\u200C\u200D\u200B\u200C\u200D\u200C\u200D\u200C\u200D\u200C\u200C\u200C\u200D\u200D\u200D\u200C\u200D\u200D\u200D\u200B\u200D\u200D\u200D\u200D\u200C\u200D\u200B\u200C\u200C\u200C\u200C\u200B\u200C\u200D\u200C\u200C\u200C\u206AChanges will only be visible after the application reloads.\u206A\u206A
|
|
372
|
+
|
|
371
373
|
RTA_CONFIGURATION_CANCEL=\u206A\u206A\u206A\u200C\u200B\u200B\u200D\u200B\u200C\u200C\u200D\u200B\u200B\u200D\u200C\u200C\u200B\u200B\u200B\u200C\u200D\u200B\u200B\u200C\u200D\u200D\u200C\u200B\u200D\u200B\u200D\u200B\u200D\u200B\u200D\u200C\u200C\u200C\u200C\u200D\u200C\u206ACancel\u206A\u206A
|
|
372
374
|
|
|
373
375
|
RTA_CONFIGURATION_APPLY=\u206A\u206A\u206A\u200C\u200C\u200B\u200B\u200B\u200D\u200C\u200D\u200C\u200C\u200C\u200B\u200C\u200B\u200B\u200D\u200B\u200D\u200C\u200B\u200B\u200D\u200D\u200D\u200D\u200C\u200D\u200D\u200C\u200D\u200D\u200B\u200C\u200D\u200B\u200C\u200D\u200C\u200C\u200D\u200B\u206AApply\u206A\u206A
|
|
@@ -2219,25 +2219,6 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
2219
2219
|
}) : Promise.reject();
|
|
2220
2220
|
}
|
|
2221
2221
|
|
|
2222
|
-
/**
|
|
2223
|
-
* Calls state changer per each (template) component on url change.
|
|
2224
|
-
* @param {Array<sap.suite.ui.generic.template.lib.StatePreserver>} aStateChangers array of StatePreserver instances
|
|
2225
|
-
* @param {map} appStates map of appStates
|
|
2226
|
-
* @param {boolean} bIsFCLMode optional, defined only in FLC
|
|
2227
|
-
* @returns {boolean} returns true if url change can be handled by state changer,
|
|
2228
|
-
* returns false in FCL, so the route-matched logic will continue as normal.
|
|
2229
|
-
*/
|
|
2230
|
-
function fnGetIsStateChange(aStateChangers, appStates, bIsFCLMode) {
|
|
2231
|
-
var bIsStateChangeResult = false;
|
|
2232
|
-
for (var i = 0; i < aStateChangers.length; i++){
|
|
2233
|
-
var oStateChanger = aStateChangers[i];
|
|
2234
|
-
if (oStateChanger.isStateChange(appStates)){
|
|
2235
|
-
bIsStateChangeResult = bIsFCLMode ? false : true;
|
|
2236
|
-
}
|
|
2237
|
-
}
|
|
2238
|
-
return bIsStateChangeResult;
|
|
2239
|
-
}
|
|
2240
|
-
|
|
2241
2222
|
// Start: Handling url-changes
|
|
2242
2223
|
/*
|
|
2243
2224
|
* calls onActivate on the specified view, if it exists
|
|
@@ -2541,11 +2522,16 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
2541
2522
|
fnNavigate(sTargetHash, true);
|
|
2542
2523
|
return; // fnHandleRouteMatched will be called with the new url, so leave further processing to that call
|
|
2543
2524
|
}
|
|
2544
|
-
// State changers can interfere in FCL, for example between LR and OP when the search query is updated. In particular, it is necessary to skip the early return in FCL and display an error in case of 404.
|
|
2545
|
-
// The last parameter will still trigger state changers (with possible side effects), but will never return true as a result.
|
|
2546
|
-
var bIsStateChange = fnGetIsStateChange(oTemplateContract.aStateChangers, oCurrentIdentity.appStates, !!oTemplateContract.oFlexibleColumnLayoutHandler);
|
|
2547
2525
|
// State changers may identify the hash change as something which can be handled by them internally. In this case we do not need to run the whole mechanism.
|
|
2548
2526
|
// Since isStateChange is allowed to have side-effects we call all StateChangers.
|
|
2527
|
+
var bIsStateChange = false;
|
|
2528
|
+
for (var i = 0; i < oTemplateContract.aStateChangers.length; i++){
|
|
2529
|
+
var oStateChanger = oTemplateContract.aStateChangers[i];
|
|
2530
|
+
if (oStateChanger.isStateChange(oCurrentIdentity.appStates)){
|
|
2531
|
+
bIsStateChange = true;
|
|
2532
|
+
}
|
|
2533
|
+
}
|
|
2534
|
+
|
|
2549
2535
|
if (bIsStateChange){
|
|
2550
2536
|
oRoutingOptions = null;
|
|
2551
2537
|
oCurrentHash.hash = sHash;
|
|
@@ -3130,8 +3116,7 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
3130
3116
|
var fnPrepareHostView = testableHelper.testable(fnPrepareHostView, "prepareHostView");
|
|
3131
3117
|
var fnPreloadComponent = testableHelper.testable(fnPreloadComponent, "preloadComponent");
|
|
3132
3118
|
var fnGetRouteInfoByHash = testableHelper.testable(fnGetRouteInfoByHash, "getRouteInfoByHash");
|
|
3133
|
-
|
|
3134
|
-
|
|
3119
|
+
|
|
3135
3120
|
// Note: Function createHostView will be added by routingHelper.
|
|
3136
3121
|
// Allow to mock this by unit tests
|
|
3137
3122
|
testableHelper.testable(function(fnCreateHostView){
|
|
@@ -3228,7 +3213,7 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
3228
3213
|
* @param {sap.suite.ui.generic.template.lib.AppComponent} oAppComponent The AppComponent instance
|
|
3229
3214
|
* @public
|
|
3230
3215
|
* @extends sap.ui.base.Object
|
|
3231
|
-
* @version 1.
|
|
3216
|
+
* @version 1.145.0
|
|
3232
3217
|
* @since 1.30.0
|
|
3233
3218
|
* @alias sap.suite.ui.generic.template.lib.NavigationController
|
|
3234
3219
|
*/
|
|
@@ -586,7 +586,7 @@ sap.ui.define([
|
|
|
586
586
|
const getFieldProps = function (sField) {
|
|
587
587
|
return {
|
|
588
588
|
"sProperty": sField,
|
|
589
|
-
"sLabel": (
|
|
589
|
+
"sLabel": getColumnLabel(sField),
|
|
590
590
|
"sValue": oItemContext.getProperty(sField),
|
|
591
591
|
"bHidden": !aVisibleColumns.has(sField)
|
|
592
592
|
};
|