@sapui5/sap.suite.ui.generic.template 1.133.0 → 1.134.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/suite/ui/generic/template/.library +1 -1
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n.properties +7 -7
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/manifest.json +1 -1
- package/src/sap/suite/ui/generic/template/Canvas/extensionAPI/ExtensionAPI.js +11 -3
- package/src/sap/suite/ui/generic/template/Canvas/manifest.json +1 -1
- package/src/sap/suite/ui/generic/template/ListReport/extensionAPI/ExtensionAPI.js +11 -9
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n.properties +3 -3
- package/src/sap/suite/ui/generic/template/ListReport/manifest.json +1 -1
- package/src/sap/suite/ui/generic/template/ListReport/view/ListReport.view.xml +1 -1
- package/src/sap/suite/ui/generic/template/ListReport/view/fragments/SmartFilterBar.fragment.xml +1 -1
- package/src/sap/suite/ui/generic/template/ObjectPage/controller/MessageSortingHandler.js +22 -5
- package/src/sap/suite/ui/generic/template/ObjectPage/extensionAPI/DraftTransactionController.js +8 -10
- package/src/sap/suite/ui/generic/template/ObjectPage/extensionAPI/ExtensionAPI.js +34 -14
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n.properties +22 -4
- package/src/sap/suite/ui/generic/template/ObjectPage/manifest.json +1 -1
- package/src/sap/suite/ui/generic/template/ObjectPage/templateSpecificPreparationHelper.js +233 -125
- package/src/sap/suite/ui/generic/template/ObjectPage/view/fragments/Facet.fragment.xml +32 -27
- package/src/sap/suite/ui/generic/template/ObjectPage/view/fragments/SmartTable.fragment.xml +7 -11
- 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/controls/ObjectPageLayout.designtime.js +29 -12
- package/src/sap/suite/ui/generic/template/designtime/controls/SmartTable.designtime.js +29 -28
- package/src/sap/suite/ui/generic/template/designtime/floorplans/AnalyticalListPage.designtime.js +3 -1
- package/src/sap/suite/ui/generic/template/designtime/floorplans/ListReport.designtime.js +3 -1
- package/src/sap/suite/ui/generic/template/designtime/floorplans/ObjectPage.designtime.js +4 -1
- package/src/sap/suite/ui/generic/template/detailTemplates/DiscardEditHandler.js +13 -0
- package/src/sap/suite/ui/generic/template/fragments/DraftAdminDataPopover.fragment.xml +1 -0
- package/src/sap/suite/ui/generic/template/fragments/MessagePopover.fragment.xml +2 -2
- package/src/sap/suite/ui/generic/template/fragments/SmartControlContextMenu.fragment.xml +1 -1
- package/src/sap/suite/ui/generic/template/genericUtilities/filterHelper.js +3 -1
- package/src/sap/suite/ui/generic/template/js/AnnotationHelper.js +65 -8
- package/src/sap/suite/ui/generic/template/js/AnnotationHelperStreamSupport.js +1 -1
- package/src/sap/suite/ui/generic/template/lib/AppComponent.js +1 -2
- package/src/sap/suite/ui/generic/template/lib/Application.js +2 -0
- package/src/sap/suite/ui/generic/template/lib/ComponentUtils.js +13 -2
- package/src/sap/suite/ui/generic/template/lib/ContextBookkeeping.js +1 -0
- package/src/sap/suite/ui/generic/template/lib/ContextMenuHandler.js +124 -2
- package/src/sap/suite/ui/generic/template/lib/SideEffectUtil.js +39 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n.properties +17 -11
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ar.properties +2 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_bg.properties +4 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ca.properties +4 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_cnr.properties +3 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_cs.properties +3 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_cy.properties +2 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_da.properties +3 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_de.properties +4 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_el.properties +4 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_en.properties +4 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_en_GB.properties +4 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_es.properties +4 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_es_MX.properties +2 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_et.properties +4 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_fi.properties +3 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_fr.properties +4 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_fr_CA.properties +4 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_hi.properties +2 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_hr.properties +3 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_hu.properties +6 -4
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_id.properties +3 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_it.properties +4 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_iw.properties +2 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ja.properties +3 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_kk.properties +3 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ko.properties +3 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_lt.properties +4 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_lv.properties +4 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_mk.properties +4 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ms.properties +3 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_nl.properties +5 -3
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_no.properties +4 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_pl.properties +2 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_pt.properties +4 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_pt_PT.properties +4 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ro.properties +4 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ru.properties +4 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_sh.properties +3 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_sk.properties +2 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_sl.properties +4 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_sr.properties +3 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_sv.properties +4 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_th.properties +3 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_tr.properties +3 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_uk.properties +4 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_vi.properties +4 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_zh_CN.properties +3 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_zh_TW.properties +4 -2
- package/src/sap/suite/ui/generic/template/lib/navigation/NavigationController.js +32 -20
- package/src/sap/suite/ui/generic/template/lib/presentationControl/SmartTableHandler.js +4 -5
- package/src/sap/suite/ui/generic/template/library.js +1 -1
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
<core:FragmentDefinition xmlns:core="sap.ui.core" xmlns:layout="sap.ui.layout"
|
|
2
|
-
xmlns:template="http://schemas.sap.com/sapui5/extension/sap.ui.core.template/1"
|
|
1
|
+
<core:FragmentDefinition xmlns:core="sap.ui.core" xmlns:layout="sap.ui.layout" xmlns:template="http://schemas.sap.com/sapui5/extension/sap.ui.core.template/1"
|
|
3
2
|
template:require="{AH: 'sap/suite/ui/generic/template/js/AnnotationHelper', AHModel: 'sap/ui/model/odata/AnnotationHelper', StableIdHelper: 'sap/suite/ui/generic/template/js/StableIdHelper'}">
|
|
4
3
|
|
|
5
4
|
<!-- @classdesc @name: Name: sap.suite.ui.generic.template.ObjectPage.view.fragments.Facet.fragment.xml
|
|
6
5
|
@param {UI.Facet} [facet] @param {edm.EntitySet} [entitySet] @param {edm.EntityType}
|
|
7
6
|
[entityType] -->
|
|
8
7
|
<template:with path="parameter>/variables" helper="AH.getNewVariable" var="objectPageTableSettings">
|
|
9
|
-
<template:if test="{:= ${objectPageTableSettings>}.set(${block>tableSettings})}"/>
|
|
8
|
+
<template:if test="{:= ${objectPageTableSettings>}.set(${block>tableSettings})}" />
|
|
10
9
|
<template:if test="{= ${objectPageTableSettings>value/type} !== 'TreeTable' || !${device>/system/phone}}">
|
|
11
10
|
<layout:Grid defaultSpan="XL12 L12 M12 S12" hSpacing="0" vSpacing="0" class="sapSmartTemplatesObjectPageSubSectionGrid">
|
|
12
11
|
<!--
|
|
@@ -16,42 +15,48 @@
|
|
|
16
15
|
-->
|
|
17
16
|
<template:if test="{path: 'facet>Target', formatter: 'AHModel.isMultiple'}">
|
|
18
17
|
<template:then>
|
|
19
|
-
<template:
|
|
20
|
-
<template:
|
|
21
|
-
<
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
18
|
+
<template:with path="facet>Target" helper="AHModel.gotoEntitySet" var="listEntitySet">
|
|
19
|
+
<template:with path="listEntitySet>entityType" helper="AHModel.gotoEntityType" var="listEntityType">
|
|
20
|
+
<template:if test="{parts:[{path: 'facet>Target/AnnotationPath'}, {path: 'listEntityType>'}], formatter: 'AH.checkFacetHasLineItemAnnotations'}">
|
|
21
|
+
<template:then>
|
|
22
|
+
<core:Fragment fragmentName="sap.suite.ui.generic.template.ObjectPage.view.fragments.SmartTable" type="XML" />
|
|
23
|
+
</template:then>
|
|
24
|
+
<template:elseif test="{=${facet>Target/AnnotationPath}.indexOf('com.sap.vocabularies.Communication.v1.Contact') > -1}">
|
|
25
|
+
<core:Fragment fragmentName="sap.suite.ui.generic.template.fragments.Contacts" type="XML" />
|
|
26
|
+
</template:elseif>
|
|
27
|
+
<template:elseif test="{=${facet>Target/AnnotationPath}.indexOf('com.sap.vocabularies.UI.v1.Chart') > -1}">
|
|
28
|
+
<core:Fragment fragmentName="sap.suite.ui.generic.template.ObjectPage.view.fragments.SmartChart" type="XML" />
|
|
29
|
+
</template:elseif>
|
|
30
|
+
</template:if>
|
|
31
|
+
</template:with>
|
|
32
|
+
</template:with>
|
|
30
33
|
</template:then>
|
|
31
|
-
<template:elseif test="{= ${facet>RecordType}.indexOf('com.sap.vocabularies.UI.v1.CollectionFacet') > -1
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
<core:Fragment fragmentName="sap.suite.ui.generic.template.ObjectPage.view.fragments.SmartForm" type="XML"/>
|
|
34
|
+
<template:elseif test="{= ${facet>RecordType}.indexOf('com.sap.vocabularies.UI.v1.CollectionFacet') > -1
|
|
35
|
+
|| (${facet>Target/AnnotationPath}.indexOf('com.sap.vocabularies.UI.v1.FieldGroup') > -1
|
|
36
|
+
|| ${facet>Target/AnnotationPath}.indexOf('com.sap.vocabularies.UI.v1.Identification') > -1) }">
|
|
37
|
+
<core:Fragment fragmentName="sap.suite.ui.generic.template.ObjectPage.view.fragments.SmartForm" type="XML" />
|
|
35
38
|
</template:elseif>
|
|
36
39
|
<template:elseif test="{= ${facet>Target/AnnotationPath}.indexOf('com.sap.vocabularies.UI.v1.DataPoint') > -1 }">
|
|
37
40
|
<template:with path="facet>Target" helper="AHModel.resolvePath" var="dataPoint">
|
|
38
|
-
<template:if test="{= ${dataPoint>Visualization/EnumMember}.indexOf('com.sap.vocabularies.UI.v1.VisualizationType/Rating')
|
|
41
|
+
<template:if test="{= ${dataPoint>Visualization/EnumMember}.indexOf('com.sap.vocabularies.UI.v1.VisualizationType/Rating') === -1 }">
|
|
39
42
|
<template:then>
|
|
40
|
-
<core:Fragment fragmentName="sap.suite.ui.generic.template.ObjectPage.view.fragments.SmartForm" type="XML"/>
|
|
43
|
+
<core:Fragment fragmentName="sap.suite.ui.generic.template.ObjectPage.view.fragments.SmartForm" type="XML" />
|
|
41
44
|
</template:then>
|
|
42
45
|
</template:if>
|
|
43
46
|
</template:with>
|
|
44
47
|
</template:elseif>
|
|
45
48
|
<template:elseif test="{= ${facet>Target/AnnotationPath}.indexOf('com.sap.vocabularies.Communication.v1.Address') > -1 }">
|
|
46
49
|
<!-- Be aware: variable facet is not always provided (in case of SmartForm it is not meaningful, as the SmartForm actually shows multiple facets).
|
|
47
|
-
Thus, it does not make sense to create facetId globally (for this fragment). In fact, doing this would lead to console errors for not provided mandatory
|
|
48
|
-
|
|
50
|
+
Thus, it does not make sense to create facetId globally (for this fragment). In fact, doing this would lead to console errors for not provided mandatory
|
|
51
|
+
parameter
|
|
52
|
+
sRecordType when trying to build the id.
|
|
49
53
|
AddressFacet is the only case, where facetId is used, so we create it only here. In this case, facet obviously is provided.
|
|
50
54
|
-->
|
|
51
55
|
<template:with path="parameter>/" helper="StableIdHelper.preparePathForStableId" var="facetId">
|
|
52
|
-
<template:if
|
|
56
|
+
<template:if
|
|
57
|
+
test="{= ${facetId>}.buildStableId({ type:'ObjectPage', subType:'StandardFacet', sRecordType: ${facet>RecordType}, sAnnotationPath: ${facet>Target/AnnotationPath} , sAnnotationId: ${facet>ID/String} }) }" />
|
|
53
58
|
<template:with path="facet>Target" helper="AHModel.resolvePath" var="address">
|
|
54
|
-
<core:Fragment fragmentName="sap.suite.ui.generic.template.fragments.AddressFacet" type="XML"/>
|
|
59
|
+
<core:Fragment fragmentName="sap.suite.ui.generic.template.fragments.AddressFacet" type="XML" />
|
|
55
60
|
</template:with>
|
|
56
61
|
</template:with>
|
|
57
62
|
</template:elseif>
|
|
@@ -59,12 +64,12 @@
|
|
|
59
64
|
<!-- better: check for <template:elseif test="{= ${block>additionalData/type} === 'SmartForm'}">
|
|
60
65
|
but currently this is not (yet) supplied in case of mixed reference facets on 3rd level -->
|
|
61
66
|
<template:else>
|
|
62
|
-
<core:Fragment fragmentName="sap.suite.ui.generic.template.ObjectPage.view.fragments.SmartForm" type="XML"/>
|
|
63
|
-
<core:Fragment fragmentName="sap.suite.ui.generic.template.ObjectPage.view.fragments.StreamSupport" type="XML"/>
|
|
67
|
+
<core:Fragment fragmentName="sap.suite.ui.generic.template.ObjectPage.view.fragments.SmartForm" type="XML" />
|
|
68
|
+
<core:Fragment fragmentName="sap.suite.ui.generic.template.ObjectPage.view.fragments.StreamSupport" type="XML" />
|
|
64
69
|
</template:else>
|
|
65
70
|
</template:if>
|
|
66
71
|
|
|
67
72
|
</layout:Grid>
|
|
68
73
|
</template:if>
|
|
69
74
|
</template:with>
|
|
70
|
-
</core:FragmentDefinition>
|
|
75
|
+
</core:FragmentDefinition>
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<template:with path="facet>Target" var="target">
|
|
9
9
|
<template:with path="target>" helper="AHModel.gotoEntitySet" var="listEntitySet">
|
|
10
10
|
<template:with path="listEntitySet>entityType" helper="AHModel.gotoEntityType" var="listEntityType">
|
|
11
|
-
<template:with path="target>" helper="
|
|
11
|
+
<template:with path="target>" helper="AH.getListItemCollection" var="collection">
|
|
12
12
|
<template:with path="listEntityType>com.sap.vocabularies.UI.v1.HeaderInfo" var="header">
|
|
13
13
|
<template:with path="parameter>/" helper="StableIdHelper.preparePathForStableId" var="smartControlId">
|
|
14
14
|
<template:with path="parameter>/" helper="StableIdHelper.preparePathForStableId" var="facetId">
|
|
@@ -62,18 +62,14 @@
|
|
|
62
62
|
<core:CustomData key="dateFormatSettings"
|
|
63
63
|
value='\{"UTC":true,"style":"medium"\}' />
|
|
64
64
|
<core:CustomData key="useUTCDateTime" value="true" />
|
|
65
|
-
<template:if test="{= ${
|
|
65
|
+
<template:if test="{= ${objectPageTableSettings>value/lineItemQualifier}}">
|
|
66
66
|
<core:CustomData key="lineItemQualifier"
|
|
67
|
-
value="{= ${
|
|
67
|
+
value="{= ${objectPageTableSettings>value/lineItemQualifier}}" />
|
|
68
|
+
</template:if>
|
|
69
|
+
<template:if test="{= ${objectPageTableSettings>value/lineItemSortOrder}}">
|
|
70
|
+
<core:CustomData key="TemplateSortOrder"
|
|
71
|
+
value="{= ${objectPageTableSettings>value/lineItemSortOrder}}" />
|
|
68
72
|
</template:if>
|
|
69
|
-
<template:with
|
|
70
|
-
path="listEntityType>com.sap.vocabularies.UI.v1.PresentationVariant"
|
|
71
|
-
var="variant">
|
|
72
|
-
<template:if test="{= ${variant>SortOrder}}">
|
|
73
|
-
<core:CustomData key="TemplateSortOrder"
|
|
74
|
-
value="{path: 'variant>SortOrder', formatter: 'AH.getSortOrder'}" />
|
|
75
|
-
</template:if>
|
|
76
|
-
</template:with>
|
|
77
73
|
</st:customData>
|
|
78
74
|
<st:semanticObjectController>
|
|
79
75
|
<!-- Fragment SemanticObjectControllerForDataField uses variable 'entitySet to address the entoty set. Currently entitySet points to the entity set of whole OP. Reset pointer to the entity set of the table.-->
|
package/src/sap/suite/ui/generic/template/designtime/controls/ObjectPageLayout.designtime.js
CHANGED
|
@@ -57,7 +57,7 @@ sap.ui.define([
|
|
|
57
57
|
* @param {Object} mSettings - The global manifest settings object.
|
|
58
58
|
* @returns {Object} - The object containing the runtime adaptation properties.
|
|
59
59
|
*/
|
|
60
|
-
function
|
|
60
|
+
function getRuntimeAdaptationProperties(aAllowedDesigntimeSettings, mSettings) {
|
|
61
61
|
const mPropertyValues = {};
|
|
62
62
|
|
|
63
63
|
aAllowedDesigntimeSettings.forEach(oSetting => {
|
|
@@ -66,7 +66,10 @@ sap.ui.define([
|
|
|
66
66
|
case "editableHeaderContent":
|
|
67
67
|
mPropertyValues[sProperty] = mSettings[sProperty] ?? oSetting.value;
|
|
68
68
|
break;
|
|
69
|
-
case "
|
|
69
|
+
case "tableVariantManagement":
|
|
70
|
+
mPropertyValues[sProperty] = mSettings[sProperty] ?? oSetting.value;
|
|
71
|
+
break;
|
|
72
|
+
case "chartVariantManagement":
|
|
70
73
|
mPropertyValues[sProperty] = mSettings[sProperty] ?? oSetting.value;
|
|
71
74
|
break;
|
|
72
75
|
case "showRelatedApps":
|
|
@@ -101,15 +104,27 @@ sap.ui.define([
|
|
|
101
104
|
/**
|
|
102
105
|
* @type {DesigntimeSetting}
|
|
103
106
|
*/
|
|
104
|
-
const
|
|
105
|
-
id: "
|
|
107
|
+
const tableVariantManagement = {
|
|
108
|
+
id: "tableVariantManagement",
|
|
106
109
|
name: "Table Variant Management",
|
|
107
|
-
description: "Decide whether
|
|
108
|
-
value:
|
|
110
|
+
description: "Decide whether the variant management is enabled for tables",
|
|
111
|
+
value: true, // The default value is true
|
|
109
112
|
getPath: () => 'component/settings/tableSettings/variantManagement',
|
|
110
113
|
type: "boolean",
|
|
111
114
|
keyUser: true
|
|
112
115
|
};
|
|
116
|
+
/**
|
|
117
|
+
* @type {DesigntimeSetting}
|
|
118
|
+
*/
|
|
119
|
+
const chartVariantManagement = {
|
|
120
|
+
id: "chartVariantManagement",
|
|
121
|
+
name: "Chart Variant Management",
|
|
122
|
+
description: "Decide whether the variant management is enabled for charts",
|
|
123
|
+
value: true, // The default value is true
|
|
124
|
+
getPath: () => 'component/settings/chartSettings/variantManagement',
|
|
125
|
+
type: "boolean",
|
|
126
|
+
keyUser: true
|
|
127
|
+
};
|
|
113
128
|
|
|
114
129
|
/**
|
|
115
130
|
* @type {DesigntimeSetting}
|
|
@@ -126,7 +141,8 @@ sap.ui.define([
|
|
|
126
141
|
|
|
127
142
|
return [
|
|
128
143
|
editableHeaderContent,
|
|
129
|
-
|
|
144
|
+
tableVariantManagement,
|
|
145
|
+
chartVariantManagement,
|
|
130
146
|
showRelatedApps
|
|
131
147
|
];
|
|
132
148
|
|
|
@@ -137,7 +153,8 @@ sap.ui.define([
|
|
|
137
153
|
function getObjectPageSettings(oComponent) {
|
|
138
154
|
return {
|
|
139
155
|
editableHeaderContent: JSON.parse(oComponent.getEditableHeaderContent()),
|
|
140
|
-
|
|
156
|
+
tableVariantManagement: ObjectPath.get(["variantManagement"], oComponent.getTableSettings()),
|
|
157
|
+
chartVariantManagement: ObjectPath.get(["variantManagement"], oComponent.getChartSettings()),
|
|
141
158
|
showRelatedApps: JSON.parse(oComponent.getShowRelatedApps())
|
|
142
159
|
};
|
|
143
160
|
}
|
|
@@ -151,7 +168,7 @@ sap.ui.define([
|
|
|
151
168
|
* @param {object} mPropertyBag - The property bag.
|
|
152
169
|
* @returns {Promise<ControlChangeParams[]>} - The changes.
|
|
153
170
|
*/
|
|
154
|
-
async function
|
|
171
|
+
async function fnOpenObjectPageConfigurationDialog(oControl, mPropertyBag) {
|
|
155
172
|
const oResourceModel = oControl.getModel("i18n");
|
|
156
173
|
const oComponent = designtimeUtils.getOwnerComponentFor(oControl);
|
|
157
174
|
|
|
@@ -170,7 +187,7 @@ sap.ui.define([
|
|
|
170
187
|
|
|
171
188
|
|
|
172
189
|
// Get the current values of the properties
|
|
173
|
-
const mRuntimeAdaptationPropertyValues =
|
|
190
|
+
const mRuntimeAdaptationPropertyValues = getRuntimeAdaptationProperties(aAllowedDesigntimeSettings, mObjectPageSettings);
|
|
174
191
|
// Save the unchanged data to compare later
|
|
175
192
|
const mUnchangedData = deepClone(mRuntimeAdaptationPropertyValues);
|
|
176
193
|
// Get the settings of the dialog from the designtime settings using which the dialog will be created
|
|
@@ -192,7 +209,7 @@ sap.ui.define([
|
|
|
192
209
|
}
|
|
193
210
|
|
|
194
211
|
// Expose the functions for QUnit tests
|
|
195
|
-
testableHelper.testableStatic(
|
|
212
|
+
testableHelper.testableStatic(fnOpenObjectPageConfigurationDialog, "fnOpenObjectPageConfigurationDialog");
|
|
196
213
|
|
|
197
214
|
|
|
198
215
|
const oHelper = {
|
|
@@ -203,7 +220,7 @@ sap.ui.define([
|
|
|
203
220
|
fe: {
|
|
204
221
|
name: "Configuration",
|
|
205
222
|
icon: "sap-icon://developer-settings",
|
|
206
|
-
handler:
|
|
223
|
+
handler: fnOpenObjectPageConfigurationDialog
|
|
207
224
|
}
|
|
208
225
|
}
|
|
209
226
|
}
|
|
@@ -93,7 +93,9 @@ sap.ui.define([
|
|
|
93
93
|
const oSections = oComponent.getSections();
|
|
94
94
|
const sSectionKey = getSectionKey(oSmartTable);
|
|
95
95
|
const oSectionTableSettings = oSections?.[sSectionKey]?.tableSettings || {};
|
|
96
|
-
|
|
96
|
+
// Fetch the create mode from smart table's custom data
|
|
97
|
+
const oCreateMode = {"createMode": oSmartTable.data("creationMode")};
|
|
98
|
+
oEffectiveTableSettings = merge(oSupportedGlobalTableSettings, oSectionTableSettings, oCreateMode);
|
|
97
99
|
} else {
|
|
98
100
|
const oComponentTableSettings = oComponent.getTableSettings() || {};
|
|
99
101
|
let oSelectedVariantTableSettings = {};
|
|
@@ -123,7 +125,7 @@ sap.ui.define([
|
|
|
123
125
|
* @param {object} oTableSettings - The table settings from the manifest.
|
|
124
126
|
* @returns {Object} - The adaptation properties for the SmartTable.
|
|
125
127
|
*/
|
|
126
|
-
function
|
|
128
|
+
function getRuntimeAdaptationProperties(aDesigntimeSettings, oTableSettings) {
|
|
127
129
|
const mPropertyValues = {};
|
|
128
130
|
// Handle the multiple ways of defining the table type?
|
|
129
131
|
aDesigntimeSettings.forEach(oSetting => {
|
|
@@ -195,7 +197,7 @@ sap.ui.define([
|
|
|
195
197
|
const mTableSettings = getManifestTableSettings(oSmartTable);
|
|
196
198
|
|
|
197
199
|
// Get the current values of the properties
|
|
198
|
-
const mRuntimeAdaptationPropertyValues =
|
|
200
|
+
const mRuntimeAdaptationPropertyValues = getRuntimeAdaptationProperties(aAllowedDesigntimeSettings, Object.assign(mOtherTableSettings, mTableSettings));
|
|
199
201
|
|
|
200
202
|
// Save the unchanged data to compare later
|
|
201
203
|
const mUnchangedData = deepClone(mRuntimeAdaptationPropertyValues);
|
|
@@ -331,7 +333,7 @@ sap.ui.define([
|
|
|
331
333
|
{ id: "AnalyticalTable", name: "Analytical Table" }
|
|
332
334
|
],
|
|
333
335
|
bSupportsGlobalScope: false,
|
|
334
|
-
keyUser:
|
|
336
|
+
keyUser: false
|
|
335
337
|
};
|
|
336
338
|
|
|
337
339
|
/**
|
|
@@ -367,24 +369,26 @@ sap.ui.define([
|
|
|
367
369
|
keyUser: true
|
|
368
370
|
};
|
|
369
371
|
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
372
|
+
/**
|
|
373
|
+
* @type {DesigntimeSetting}
|
|
374
|
+
*/
|
|
375
|
+
const createMode = {
|
|
376
|
+
id: "createMode",
|
|
377
|
+
name: "Create Mode",
|
|
378
|
+
description: "Define the create mode",
|
|
379
|
+
value: "creationRows",
|
|
380
|
+
type: "string",
|
|
381
|
+
getPath: (mSmartTableInfo) => `component/settings/sections/${mSmartTableInfo.sSectionKey}/createMode`,
|
|
382
|
+
enums: [
|
|
383
|
+
{ id: "newPage", name: "New Page" },
|
|
384
|
+
{ id: "inline", name: "Inline" },
|
|
385
|
+
{ id: "creationRows", name: "Inline Creation Rows" },
|
|
386
|
+
{ id: "creationRowsHiddenInEditMode", name: "Inline Creation Rows (Hidden in edit page)" }
|
|
387
|
+
],
|
|
388
|
+
bSupportsGlobalScope: true,
|
|
389
|
+
restrictedTo: [sObjectPageComponentName],
|
|
390
|
+
keyUser: true
|
|
391
|
+
};
|
|
388
392
|
|
|
389
393
|
/**
|
|
390
394
|
* @type {DesigntimeSetting}
|
|
@@ -411,7 +415,6 @@ sap.ui.define([
|
|
|
411
415
|
type: "boolean",
|
|
412
416
|
getPath: getPathForTableSettings("widthIncludingColumnHeader"),
|
|
413
417
|
bSupportsGlobalScope: true,
|
|
414
|
-
restrictedTo: [sListReportComponentName],
|
|
415
418
|
bGlobalSettingsOnly: true,
|
|
416
419
|
keyUser: true
|
|
417
420
|
};
|
|
@@ -421,7 +424,7 @@ sap.ui.define([
|
|
|
421
424
|
*/
|
|
422
425
|
const addCardtoInsightsHidden = {
|
|
423
426
|
id: "addCardtoInsightsHidden",
|
|
424
|
-
name: "
|
|
427
|
+
name: "Hide \"Add Card to Insights\"",
|
|
425
428
|
description: "Define if the table should have a insights button",
|
|
426
429
|
value: false,
|
|
427
430
|
type: "boolean",
|
|
@@ -443,15 +446,13 @@ sap.ui.define([
|
|
|
443
446
|
keyUser: true
|
|
444
447
|
};
|
|
445
448
|
|
|
446
|
-
|
|
447
|
-
|
|
448
449
|
const designtimeSettings = [
|
|
449
450
|
tableType,
|
|
450
451
|
condensedTableLayout,
|
|
451
452
|
widthIncludingColumnHeader,
|
|
452
453
|
selectionMode,
|
|
453
454
|
selectAll,
|
|
454
|
-
|
|
455
|
+
createMode,
|
|
455
456
|
selectionLimit,
|
|
456
457
|
addCardtoInsightsHidden
|
|
457
458
|
];
|
|
@@ -465,7 +466,7 @@ sap.ui.define([
|
|
|
465
466
|
// Expose the functions for QUnit tests
|
|
466
467
|
getAllDesigntimeSettings = testableHelper.testableStatic(getAllDesigntimeSettings, "getAllDesigntimeSettings");
|
|
467
468
|
getPathForTableSettings = testableHelper.testableStatic(getPathForTableSettings, "getPathForTableSettings");
|
|
468
|
-
testableHelper.testableStatic(
|
|
469
|
+
testableHelper.testableStatic(getRuntimeAdaptationProperties, "getRuntimeAdaptationProperties");
|
|
469
470
|
testableHelper.testableStatic(getManifestTableSettings, "getManifestTableSettings");
|
|
470
471
|
testableHelper.testableStatic(getSelectedTabKey, "getSelectedTabKey");
|
|
471
472
|
testableHelper.testableStatic(getVariantInfo, "getVariantInfo");
|
package/src/sap/suite/ui/generic/template/designtime/floorplans/AnalyticalListPage.designtime.js
CHANGED
|
@@ -92,7 +92,9 @@ sap.ui.define([
|
|
|
92
92
|
actions: ["compVariant"] // allows to adapt filters (same as adapt filters for end user)
|
|
93
93
|
},
|
|
94
94
|
"sap.suite.ui.generic.template.AnalyticalListPage.control.SmartFilterBarExt": {
|
|
95
|
-
|
|
95
|
+
// compVariant - allows to adapt filters (same as adapt filters for end user)
|
|
96
|
+
// annotation - allows to change text arrangement
|
|
97
|
+
actions: ["compVariant", "annotation"]
|
|
96
98
|
},
|
|
97
99
|
"sap.ui.comp.smarttable.SmartTable": {
|
|
98
100
|
actions: ["compVariant"] // allows table personalization (same as for end user)
|
|
@@ -157,7 +157,9 @@ sap.ui.define([
|
|
|
157
157
|
actions: ["compVariant"] // allows to adapt filters (same as adapt filters for end user)
|
|
158
158
|
},
|
|
159
159
|
"sap.ui.comp.smartfilterbar.SmartFilterBar": {
|
|
160
|
-
|
|
160
|
+
// compVariant - allows to adapt filters (same as adapt filters for end user)
|
|
161
|
+
// annotation - allows to change text arrangement
|
|
162
|
+
actions: ["compVariant", "annotation"]
|
|
161
163
|
},
|
|
162
164
|
"sap.ui.comp.smarttable.SmartTable": {
|
|
163
165
|
actions: ["compVariant"] // allows table personalization (same as for end user)
|
|
@@ -226,7 +226,7 @@ sap.ui.define([
|
|
|
226
226
|
actions: ["rename", "remove", "reveal"]
|
|
227
227
|
},
|
|
228
228
|
"sap.ui.comp.smartform.SmartForm": { // not documented in allow list, but checked by RTA OPA test
|
|
229
|
-
actions: ["localReset"],
|
|
229
|
+
actions: ["localReset", "annotation"],
|
|
230
230
|
aggregations: {
|
|
231
231
|
groups: {
|
|
232
232
|
actions: ["move", "createContainer", "remove"] // actually, only move seems to be checked, but createContainer is needed to achieve the correct index in context menu
|
|
@@ -255,6 +255,9 @@ sap.ui.define([
|
|
|
255
255
|
},
|
|
256
256
|
"sap.m.Title": {
|
|
257
257
|
actions: ["rename"]
|
|
258
|
+
},
|
|
259
|
+
"sap.ui.comp.smartfield.SmartField": {
|
|
260
|
+
actions: ["annotation"] // Allows to change text arrangement
|
|
258
261
|
}
|
|
259
262
|
};
|
|
260
263
|
|
|
@@ -171,6 +171,7 @@ sap.ui.define(["sap/ui/base/Object", "sap/base/util/extend", "sap/suite/ui/gener
|
|
|
171
171
|
var fnSuccess = function(){ // what to do if cancellation was successfull
|
|
172
172
|
fnCancellationResult = fnResolve; // now the end of the process is considered as a resolve
|
|
173
173
|
fnAfterCancellation(); // perform the after cancel navigation
|
|
174
|
+
fnDisplayDiscardMessage();//display a discard draft message
|
|
174
175
|
fnCleanUpAfterCancellation(); // clean up the state of this class
|
|
175
176
|
if (fnSetFocus){
|
|
176
177
|
oTemplateUtils.oServices.oApplication.setNextFocus(fnSetFocus);
|
|
@@ -188,6 +189,18 @@ sap.ui.define(["sap/ui/base/Object", "sap/base/util/extend", "sap/suite/ui/gener
|
|
|
188
189
|
});
|
|
189
190
|
oBusyHelper.setBusy(oCancellationPromise);
|
|
190
191
|
};
|
|
192
|
+
//This function is responsible for showing the "Draft Discarded" or "Changes Discarded" confirmation text
|
|
193
|
+
function fnDisplayDiscardMessage() {
|
|
194
|
+
fnNeedsConfirmation().then(function (bNeedsConfirmation) { //checks if changes are made in the draft
|
|
195
|
+
if (bNeedsConfirmation) { // Ensure this is a boolean check
|
|
196
|
+
if (oUiModel.getProperty("/createMode")) { //if it is a "Create Draft"
|
|
197
|
+
oTemplateUtils.oServices.oApplication.showMessageToast(oTemplateUtils.oCommonUtils.getText("ST_GENERIC_DRAFT_WITHOUT_ACTIVE_DOCUMENT_DELETED"));
|
|
198
|
+
} else {
|
|
199
|
+
oTemplateUtils.oServices.oApplication.showMessageToast(oTemplateUtils.oCommonUtils.getText("ST_GENERIC_DRAFT_WITH_ACTIVE_DOCUMENT_DELETED"));//if it is an "Edit Draft"
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
});
|
|
203
|
+
}
|
|
191
204
|
fnNeedsConfirmation().then(function (bNeedsConfirmation) {
|
|
192
205
|
if (oCancelButton && bNeedsConfirmation){
|
|
193
206
|
fnCancellationConfirmed = fnExecuteCancellation;
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
ariaLabelledBy="objectNoDataText unsavedPopoverText lockedPopoverText objectChangedText"
|
|
5
5
|
contentWidth="15.625rem"
|
|
6
6
|
verticalScrolling="false"
|
|
7
|
+
placement="Auto"
|
|
7
8
|
class="sapSmartTemplatesListReportPopover sapUiContentPadding">
|
|
8
9
|
<endButton>
|
|
9
10
|
<Button icon="sap-icon://decline" tooltip="{i18n>CLOSE}" press="closeDraftAdminPopover" />
|
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
subtitle="{parts:[{path: 'msg>id'}, {path: 'msg>controlIds'}, {path: 'msg>additionalText'}, {path: 'helper>/isPopoverOpen'}, {path: 'helper>/heartBeat'}], formatter: '.getSubtitle'}"
|
|
7
7
|
description="{parts:[{path: 'msg>id'}, {path: 'msg>controlIds'}, {path: 'msg>description'}, {path: 'helper>/isPopoverOpen'}, {path: 'helper>/heartBeat'}], formatter: '.getDescription'}"
|
|
8
8
|
longtextUrl="{msg>descriptionUrl}"
|
|
9
|
-
markupDescription="{helper>/isAIErrorExplanationEnabled}"
|
|
9
|
+
markupDescription="{= ${helper>/isAIErrorExplanationEnabled} }"
|
|
10
10
|
activeTitle="{parts:[{path: 'msg>id'}, {path: 'msg>controlIds'}, {path: 'helper>/isPopoverOpen'}], formatter: '.isPositionable'}"
|
|
11
11
|
groupName="{= ${helper>/messageToGroupName}[${msg>id}] }">
|
|
12
12
|
<Link
|
|
13
13
|
text="{i18n>ST_AI_EE_BUTTON_LABEL}"
|
|
14
14
|
icon="sap-icon://ai"
|
|
15
|
-
visible="{helper>/isAIErrorExplanationEnabled}"
|
|
15
|
+
visible="{= ${helper>/isAIErrorExplanationEnabled} }"
|
|
16
16
|
press="generateErrorExplanation">
|
|
17
17
|
<customData>
|
|
18
18
|
<core:CustomData key="message" value="{msg>message}" />
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<core:FragmentDefinition xmlns="sap.m" xmlns:core="sap.ui.core"
|
|
2
2
|
xmlns:template="http://schemas.sap.com/sapui5/extension/sap.ui.core.template/1"
|
|
3
|
-
template:require="{StableIdHelper: 'sap/suite/ui/generic/template/js/StableIdHelper'}">
|
|
3
|
+
template:require="{StableIdHelper: 'sap/suite/ui/generic/template/js/StableIdHelper', AH: 'sap/suite/ui/generic/template/js/AnnotationHelper'}">
|
|
4
4
|
|
|
5
5
|
<template:with path="parameter>/" helper="StableIdHelper.preparePathForStableId" var="contextMenuId">
|
|
6
6
|
<template:if test="{= ${contextMenuId>}.buildStableId({type: 'SmartControl', subType: 'ContextMenu', sSmartTableId: ${smartControlId>id}})}" />
|
|
@@ -204,10 +204,12 @@ sap.ui.define([
|
|
|
204
204
|
}
|
|
205
205
|
var sRet = aFiltersForProperty.map(function (oFilter) {
|
|
206
206
|
var bCaseSensitive = true;
|
|
207
|
+
// Define the date range operations that need date formatting
|
|
208
|
+
var dateRangeOperations = ["DATE", "DATERANGE", "DATETIMERANGE", "FROM", "TO"];
|
|
207
209
|
if (oFilter.bCaseSensitive === undefined) {
|
|
208
210
|
bCaseSensitive = true;
|
|
209
211
|
}
|
|
210
|
-
if ((oProperty.type === "Edm.DateTime" || oProperty.type === "Edm.DateTimeOffset") && oParams.oFilterData[sPropertyForFilterData].conditionTypeInfo && oParams.oFilterData[sPropertyForFilterData].conditionTypeInfo.data.operation
|
|
212
|
+
if ((oProperty.type === "Edm.DateTime" || oProperty.type === "Edm.DateTimeOffset") && oParams.oFilterData[sPropertyForFilterData].conditionTypeInfo && !dateRangeOperations.includes(oParams.oFilterData[sPropertyForFilterData].conditionTypeInfo.data.operation)) {
|
|
211
213
|
if (!DynamicDateUtil.getAllOptionKeys().includes(oParams.oFilterData[sPropertyForFilterData].conditionTypeInfo.data.operation)) {
|
|
212
214
|
oParams.bIsStatic = true;
|
|
213
215
|
return;
|