@sapui5/sap.suite.ui.generic.template 1.130.9 → 1.130.10
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 +2 -2
- 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/manifest.json +1 -1
- package/src/sap/suite/ui/generic/template/ListReport/manifest.json +1 -1
- package/src/sap/suite/ui/generic/template/ObjectPage/controller/ControllerImplementation.js +49 -7
- package/src/sap/suite/ui/generic/template/ObjectPage/controllerFrameworkExtensions.js +21 -4
- 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/fragments/HeaderFormDataField.fragment.xml +10 -4
- package/src/sap/suite/ui/generic/template/genericUtilities/controlHelper.js +10 -9
- package/src/sap/suite/ui/generic/template/lib/AppComponent.js +1 -1
- package/src/sap/suite/ui/generic/template/lib/navigation/NavigationController.js +1 -1
- package/src/sap/suite/ui/generic/template/library.js +1 -1
- package/src/sap/suite/ui/generic/template/themes/base/ObjectPage.less +0 -4
- package/src/sap/suite/ui/generic/template/themes/sap_belize_base/ObjectPage.less +0 -4
- package/src/sap/suite/ui/generic/template/themes/sap_bluecrystal_base/ObjectPage.less +0 -4
- package/src/sap/suite/ui/generic/template/themes/sap_hcb/base_ObjectPage.less +0 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sapui5/sap.suite.ui.generic.template",
|
|
3
|
-
"version": "1.130.
|
|
3
|
+
"version": "1.130.10",
|
|
4
4
|
"description": "SAPUI5 Library sap.suite.ui.generic.template",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"sapui5",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"testsuite-qunit" : "ui5 serve --config ./ui5-local.yaml --open \"/test-resources/sap/suite/ui/generic/template/qunit/testsuite.qunit.html\""
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"sonarqube-scanner": "
|
|
19
|
+
"sonarqube-scanner": "3.5.0",
|
|
20
20
|
"@sap/ux-ui5-tooling": "latest"
|
|
21
21
|
}
|
|
22
22
|
}
|
|
@@ -45,7 +45,10 @@ sap.ui.define([
|
|
|
45
45
|
) {
|
|
46
46
|
"use strict";
|
|
47
47
|
var sClassName = "ObjectPage.controller.ControllerImplementation";
|
|
48
|
-
var
|
|
48
|
+
var oFeLogger = new FeLogger(sClassName);
|
|
49
|
+
var oLogger = oFeLogger.getLogger();
|
|
50
|
+
var oLevel = oFeLogger.Level;
|
|
51
|
+
oLogger.setLevel(oLevel.ALL);
|
|
49
52
|
var DEFAULT_GROWING_THRESHOLD = 20;
|
|
50
53
|
|
|
51
54
|
// Scroll the specified object page to top
|
|
@@ -1450,15 +1453,54 @@ sap.ui.define([
|
|
|
1450
1453
|
}); // Normalize the return value such that it always is a Promise
|
|
1451
1454
|
}
|
|
1452
1455
|
|
|
1453
|
-
function fnFocusForEdit(bFocusAtTop){
|
|
1454
|
-
setTimeout(function(){
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1456
|
+
function fnFocusForEdit(bFocusAtTop) {
|
|
1457
|
+
setTimeout(function () {
|
|
1458
|
+
// check if extension is found
|
|
1459
|
+
var bhasExtensionFound = oController.hasOwnProperty("focusOnEditExtension");
|
|
1460
|
+
var oFocusControl;
|
|
1461
|
+
if (bhasExtensionFound) {
|
|
1462
|
+
var sSelectedSection = oObjectPage.getSelectedSection();
|
|
1463
|
+
// call the extension method and get the control passed by application
|
|
1464
|
+
oFocusControl = oController.focusOnEditExtension(sSelectedSection);
|
|
1465
|
+
}
|
|
1466
|
+
|
|
1467
|
+
// Check if the passed control is defined, focusable, and visible within the viewport.
|
|
1468
|
+
if (oFocusControl && oFocusControl.focus && oFocusControl.getDomRef()) {
|
|
1469
|
+
//set the focus on the control passed by application
|
|
1470
|
+
if (controlHelper.isSmartField(oFocusControl)) {
|
|
1471
|
+
// check whether the SmartField is the correct target for focussing
|
|
1472
|
+
controlHelper.getSmartFieldIsFocussableForInputPromise(oFocusControl).then(function (bIsFocusable) {
|
|
1473
|
+
if (bIsFocusable) {
|
|
1474
|
+
controlHelper.focusUI5Control(oFocusControl);
|
|
1475
|
+
} else {
|
|
1476
|
+
oLogger.info("Provided control is not focusable or visible in the viewport, hence fall back to the standard focus handling");
|
|
1477
|
+
fnStandardFocusHandlingOnEdit(bFocusAtTop);
|
|
1478
|
+
}
|
|
1479
|
+
});
|
|
1480
|
+
} else {
|
|
1481
|
+
//if the passed control is not a smart field, check and set the focus on
|
|
1482
|
+
controlHelper.focusUI5Control(oFocusControl);
|
|
1483
|
+
}
|
|
1484
|
+
} else {
|
|
1485
|
+
// If no extension is defined, proceed with the standard execution flow.
|
|
1486
|
+
// If the control passed via the extension does not meet the required conditions,
|
|
1487
|
+
// fall back to the standard focus handling mechanism.
|
|
1488
|
+
if (bhasExtensionFound) {
|
|
1489
|
+
oLogger.info("Provided control is not focusable or visible in the viewport, hence fall back to the standard focus handling");
|
|
1490
|
+
}
|
|
1491
|
+
fnStandardFocusHandlingOnEdit(bFocusAtTop);
|
|
1492
|
+
}
|
|
1459
1493
|
}, 0);
|
|
1460
1494
|
}
|
|
1461
1495
|
|
|
1496
|
+
function fnStandardFocusHandlingOnEdit(bFocusAtTop) {
|
|
1497
|
+
var oFocusControlPromise = getFocusForEditPromise(bFocusAtTop);
|
|
1498
|
+
oFocusControlPromise.then(function (oFocusControl) {
|
|
1499
|
+
controlHelper.focusUI5Control(oFocusControl);
|
|
1500
|
+
});
|
|
1501
|
+
}
|
|
1502
|
+
|
|
1503
|
+
|
|
1462
1504
|
/* Begin: Functions dealing with the search field on tables */
|
|
1463
1505
|
|
|
1464
1506
|
// a search field in one of the tables is used to trigger a search.
|
|
@@ -28,7 +28,8 @@ sap.ui.define([
|
|
|
28
28
|
onChildOpenedExtension: { "public": true, "final": false, overrideExecution: OverrideExecution.After},
|
|
29
29
|
onSubSectionEnteredExtension: { "public": true, "final": false, overrideExecution: OverrideExecution.After},
|
|
30
30
|
beforeSmartLinkPopoverOpensExtension: { "public": true, "final": false, overrideExecution: OverrideExecution.After},
|
|
31
|
-
onBeforeExportTableExtension: { "public": true, "final": false, overrideExecution: OverrideExecution.After}
|
|
31
|
+
onBeforeExportTableExtension: { "public": true, "final": false, overrideExecution: OverrideExecution.After},
|
|
32
|
+
focusOnEditExtension:{ "public": true, "final": false, overrideExecution: OverrideExecution.After}
|
|
32
33
|
}
|
|
33
34
|
},
|
|
34
35
|
|
|
@@ -262,6 +263,22 @@ sap.ui.define([
|
|
|
262
263
|
*/
|
|
263
264
|
getContext: function(oContext) {
|
|
264
265
|
return oContext;
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
|
|
266
|
+
},
|
|
267
|
+
|
|
268
|
+
/**
|
|
269
|
+
* Extension point for the application to specify the control to focus on in the object page upon edit.
|
|
270
|
+
*
|
|
271
|
+
* @param {String} sSelectedSection - The ID of the selected section.
|
|
272
|
+
* @returns {sap.ui.core.Control} - The control that needs to be focused.
|
|
273
|
+
*
|
|
274
|
+
* The returned control must meet the following criteria:
|
|
275
|
+
* - Be focusable and have a "focus" property.
|
|
276
|
+
* - Be visible within the viewport.
|
|
277
|
+
*
|
|
278
|
+
* If the returned control does not satisfy these conditions, the standard focus handling logic is executed.
|
|
279
|
+
*/
|
|
280
|
+
focusOnEditExtension: function (sSelectedSection) {
|
|
281
|
+
return {};
|
|
282
|
+
}
|
|
283
|
+
};
|
|
284
|
+
});
|
|
@@ -17,7 +17,9 @@
|
|
|
17
17
|
<Label id="header::{path: 'headerFacet>', formatter: 'AH.getStableIdPartFromFacet'}::{path: 'dataField>', formatter: 'AH.getStableIdPartFromDataField'}::Label"
|
|
18
18
|
labelFor="header::{path: 'headerFacet>', formatter: 'AH.getStableIdPartFromFacet'}::{path: 'dataField>', formatter: 'AH.getStableIdPartFromDataField'}::Field"
|
|
19
19
|
text="{path: 'dataField>Label', formatter: 'AHModel.format'}"
|
|
20
|
-
class="sapSmartTemplatesObjectPageHeaderFormLabel sapUiTinyMarginEnd"
|
|
20
|
+
class="sapSmartTemplatesObjectPageHeaderFormLabel sapUiTinyMarginEnd"
|
|
21
|
+
showColon="true"
|
|
22
|
+
/>
|
|
21
23
|
<fe:Link id="header::{path: 'headerFacet>', formatter: 'AH.getStableIdPartFromFacet'}::{path: 'dataField>', formatter: 'AH.getStableIdPartFromDataField'}::Field"
|
|
22
24
|
press="._templateEventHandlers.onContactDetails"
|
|
23
25
|
ariaLabelledBy="{:= ${parameter>/stableId}.getStableId({type: 'ObjectPageHeader', subType: 'HeaderTitle', sFacet: ${facetId>id}})} header::{path: 'headerFacet>', formatter: 'AH.getStableIdPartFromFacet'}::{path: 'dataField>', formatter: 'AH.getStableIdPartFromDataField'}::Label"
|
|
@@ -37,9 +39,11 @@
|
|
|
37
39
|
<HBox binding="{parts: [{path: 'headerFacet>Target'}, {path: 'entitySet>'}], formatter: 'AH.getNavigationPathWithExpand'}"
|
|
38
40
|
visible="{path: 'dataField>', formatter: 'AH.getBindingForHiddenPath'}">
|
|
39
41
|
<Label
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
42
|
+
id="header::{path: 'headerFacet>', formatter: 'AH.getStableIdPartFromFacet'}::{path: 'dataField>', formatter: 'AH.getStableIdPartFromDataField'}::Label"
|
|
43
|
+
text="{parts: [{path: 'dataField>'}, {path: 'entitySet>'}], formatter: 'AH.getLabelForDFwithIBN'}"
|
|
44
|
+
class="sapSmartTemplatesObjectPageHeaderFormLabel sapUiTinyMarginEnd"
|
|
45
|
+
showColon="true"
|
|
46
|
+
/>
|
|
43
47
|
<fe:Link
|
|
44
48
|
id="header::{path: 'headerFacet>', formatter: 'AH.getStableIdPartFromFacet'}::{path: 'dataField>', formatter: 'AH.getStableIdPartFromDataField'}::Field"
|
|
45
49
|
text="{parts: [{path: 'dataField>'}, {path: 'entitySet>'}], formatter: 'AH.getLinkTextForDFwithIBN'}"
|
|
@@ -61,6 +65,7 @@
|
|
|
61
65
|
binding="{parts: [{path: 'headerFacet>Target'}, {path: 'entitySet>'}], formatter: 'AH.getNavigationPathWithExpand'}"
|
|
62
66
|
visible="{path: 'dataField>', formatter: 'AH.getBindingForHiddenPath'}" >
|
|
63
67
|
<sfi:SmartLabel
|
|
68
|
+
showColon="true"
|
|
64
69
|
labelFor="header::{path: 'headerFacet>', formatter: 'AH.getStableIdPartFromFacet'}::{path: 'dataField>', formatter: 'AH.getStableIdPartFromDataField'}::Field"
|
|
65
70
|
class="sapSmartTemplatesObjectPageHeaderFormLabel sapUiTinyMarginEnd" />
|
|
66
71
|
|
|
@@ -88,6 +93,7 @@
|
|
|
88
93
|
<sfi:SmartLabel
|
|
89
94
|
id="header::{path: 'headerFacet>', formatter: 'AH.getStableIdPartFromFacet'}::{path: 'dataField>', formatter: 'AH.getStableIdPartFromDataField'}::Label"
|
|
90
95
|
labelFor="header::{path: 'headerFacet>', formatter: 'AH.getStableIdPartFromFacet'}::{path: 'dataField>', formatter: 'AH.getStableIdPartFromDataField'}::Field"
|
|
96
|
+
showColon="true"
|
|
91
97
|
class="{= ${dataField>Criticality} ? 'sapSmartTemplatesObjectPageHeaderFormLabel': 'sapSmartTemplatesObjectPageHeaderFormLabelNCriticcal' } sapUiTinyMarginEnd"/>
|
|
92
98
|
<!-- TODO: Should also work with ...format -->
|
|
93
99
|
<template:with path="headerFacet>Target" helper="AHModel.gotoEntitySet" var="annotation">
|
|
@@ -64,16 +64,17 @@ sap.ui.define([
|
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
// returns a Promise that resolves to the boolean information whether the SmartField is a possible focus target for input.
|
|
67
|
-
function getSmartFieldIsFocussableForInputPromise(oSmartField){
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
67
|
+
function getSmartFieldIsFocussableForInputPromise(oSmartField) {
|
|
68
|
+
return oSmartField._getComputedMetadata().then(function () {
|
|
69
|
+
return (oSmartField.getMode() === "edit") && (oSmartField._getICRenderedPromise() || Promise.resolve());
|
|
70
|
+
}).then(function () {
|
|
71
|
+
var oFirstFocusableInput = !oSmartField._bEdmBoolDetected && getFirstEditableInput(oSmartField.getDomRef());
|
|
72
|
+
return !(!oFirstFocusableInput || oFirstFocusableInput.type === "checkbox");
|
|
73
|
+
}).catch(function () {
|
|
74
|
+
return false;
|
|
74
75
|
});
|
|
75
|
-
}
|
|
76
|
-
|
|
76
|
+
}
|
|
77
|
+
|
|
77
78
|
// returns the UI5 control which currently has the focus, if there is one. Otherwise returns a faulty value.
|
|
78
79
|
// Implementation as recommended by UI5 until the provide an own abstraction.
|
|
79
80
|
function getControlWithFocus(){
|
|
@@ -938,7 +938,7 @@ sap.ui.define([
|
|
|
938
938
|
* @public
|
|
939
939
|
* @extends sap.ui.core.UIComponent
|
|
940
940
|
* @author SAP SE
|
|
941
|
-
* @version 1.130.
|
|
941
|
+
* @version 1.130.10
|
|
942
942
|
* @name sap.suite.ui.generic.template.lib.AppComponent
|
|
943
943
|
*/
|
|
944
944
|
var oAppComponent = UIComponent.extend("sap.suite.ui.generic.template.lib.AppComponent", {
|
|
@@ -3181,7 +3181,7 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
3181
3181
|
* @param {sap.suite.ui.generic.template.lib.AppComponent} oAppComponent The AppComponent instance
|
|
3182
3182
|
* @public
|
|
3183
3183
|
* @extends sap.ui.base.Object
|
|
3184
|
-
* @version 1.130.
|
|
3184
|
+
* @version 1.130.10
|
|
3185
3185
|
* @since 1.30.0
|
|
3186
3186
|
* @alias sap.suite.ui.generic.template.lib.NavigationController
|
|
3187
3187
|
*/
|
|
@@ -217,10 +217,6 @@ html[dir="rtl"] .sapSmartTemplatesObjectPage .sapUxAPObjectPageHeaderContent .sa
|
|
|
217
217
|
float: right;
|
|
218
218
|
}
|
|
219
219
|
|
|
220
|
-
.sapSmartTemplatesObjectPage .sapSmartTemplatesObjectPageHeaderForm.sapMLabel:after, .sapSmartTemplatesObjectPageHeaderFormLabelNCriticcal.sapMLabel:after, .sapSmartTemplatesObjectPageHeaderFormLabel.sapMLabel:after, .sapSmartTemplatesObjectPageDataPointLabel.sapMLabel:after {
|
|
221
|
-
content: ":";
|
|
222
|
-
}
|
|
223
|
-
|
|
224
220
|
.sapSmartTemplatesObjectPage .sapSmartTemplatesObjectPageHeaderForm .sapSmartTemplatesObjectPageHeaderFormField .sapMText,
|
|
225
221
|
.sapSmartTemplatesObjectPage .sapSmartTemplatesObjectPageHeaderForm .sapSmartTemplatesObjectPageHeaderFormField .sapMLnk,
|
|
226
222
|
.sapSmartTemplatesObjectPage .sapSmartTemplatesObjectPageHeaderForm .sapSmartTemplatesObjectPageHeaderFormField.sapMLnk,
|
|
@@ -217,10 +217,6 @@ html[dir="rtl"] .sapSmartTemplatesObjectPage .sapUxAPObjectPageHeaderContent .sa
|
|
|
217
217
|
float: right;
|
|
218
218
|
}
|
|
219
219
|
|
|
220
|
-
.sapSmartTemplatesObjectPage .sapSmartTemplatesObjectPageHeaderForm.sapMLabel:after, .sapSmartTemplatesObjectPageHeaderFormLabelNCriticcal.sapMLabel:after, .sapSmartTemplatesObjectPageHeaderFormLabel.sapMLabel:after, .sapSmartTemplatesObjectPageDataPointLabel.sapMLabel:after {
|
|
221
|
-
content: ":";
|
|
222
|
-
}
|
|
223
|
-
|
|
224
220
|
.sapSmartTemplatesObjectPage .sapSmartTemplatesObjectPageHeaderForm .sapSmartTemplatesObjectPageHeaderFormField .sapMText,
|
|
225
221
|
.sapSmartTemplatesObjectPage .sapSmartTemplatesObjectPageHeaderForm .sapSmartTemplatesObjectPageHeaderFormField .sapMLnk,
|
|
226
222
|
.sapSmartTemplatesObjectPage .sapSmartTemplatesObjectPageHeaderForm .sapSmartTemplatesObjectPageHeaderFormField.sapMLnk,
|
|
@@ -217,10 +217,6 @@ html[dir="rtl"] .sapSmartTemplatesObjectPage .sapUxAPObjectPageHeaderContent .sa
|
|
|
217
217
|
float: right;
|
|
218
218
|
}
|
|
219
219
|
|
|
220
|
-
.sapSmartTemplatesObjectPage .sapSmartTemplatesObjectPageHeaderForm.sapMLabel:after, .sapSmartTemplatesObjectPageHeaderFormLabelNCriticcal.sapMLabel:after, .sapSmartTemplatesObjectPageHeaderFormLabel.sapMLabel:after, .sapSmartTemplatesObjectPageDataPointLabel.sapMLabel:after {
|
|
221
|
-
content: ":";
|
|
222
|
-
}
|
|
223
|
-
|
|
224
220
|
.sapSmartTemplatesObjectPage .sapSmartTemplatesObjectPageHeaderForm .sapSmartTemplatesObjectPageHeaderFormField .sapMText,
|
|
225
221
|
.sapSmartTemplatesObjectPage .sapSmartTemplatesObjectPageHeaderForm .sapSmartTemplatesObjectPageHeaderFormField .sapMLnk,
|
|
226
222
|
.sapSmartTemplatesObjectPage .sapSmartTemplatesObjectPageHeaderForm .sapSmartTemplatesObjectPageHeaderFormField.sapMLnk,
|
|
@@ -217,10 +217,6 @@ html[dir="rtl"] .sapSmartTemplatesObjectPage .sapUxAPObjectPageHeaderContent .sa
|
|
|
217
217
|
float: right;
|
|
218
218
|
}
|
|
219
219
|
|
|
220
|
-
.sapSmartTemplatesObjectPage .sapSmartTemplatesObjectPageHeaderForm.sapMLabel:after, .sapSmartTemplatesObjectPageHeaderFormLabelNCriticcal.sapMLabel:after, .sapSmartTemplatesObjectPageHeaderFormLabel.sapMLabel:after, .sapSmartTemplatesObjectPageDataPointLabel.sapMLabel:after {
|
|
221
|
-
content: ":";
|
|
222
|
-
}
|
|
223
|
-
|
|
224
220
|
.sapSmartTemplatesObjectPage .sapSmartTemplatesObjectPageHeaderForm .sapSmartTemplatesObjectPageHeaderFormField .sapMText,
|
|
225
221
|
.sapSmartTemplatesObjectPage .sapSmartTemplatesObjectPageHeaderForm .sapSmartTemplatesObjectPageHeaderFormField .sapMLnk,
|
|
226
222
|
.sapSmartTemplatesObjectPage .sapSmartTemplatesObjectPageHeaderForm .sapSmartTemplatesObjectPageHeaderFormField.sapMLnk,
|