@sapui5/sap.suite.ui.generic.template 1.138.1 → 1.139.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 +2 -3
- package/src/sap/suite/ui/generic/template/.library +1 -1
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/Component.js +0 -7
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/control/visualfilterbar/SmartVisualFilterBar.js +5 -2
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/control/visualfilterbar/VisualFilterProvider.js +5 -6
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/controller/ControllerImplementation.js +2 -13
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/controller/DropDownController.js +3 -1
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n.properties +0 -3
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/manifest.json +1 -1
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/util/AnnotationHelper.js +0 -9
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/view/fragments/ContentContainer.fragment.xml +0 -7
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/view/fragments/ContentViewButtons.fragment.xml +0 -6
- package/src/sap/suite/ui/generic/template/Canvas/manifest.json +1 -1
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_en_US_saprigi.properties +2 -0
- package/src/sap/suite/ui/generic/template/ListReport/manifest.json +1 -1
- package/src/sap/suite/ui/generic/template/ObjectPage/controller/ControllerImplementation.js +5 -3
- package/src/sap/suite/ui/generic/template/ObjectPage/controller/MessageSortingHandler.js +51 -49
- package/src/sap/suite/ui/generic/template/ObjectPage/controller/MultipleViewsHandler.js +1 -1
- package/src/sap/suite/ui/generic/template/ObjectPage/controller/SectionTitleHandler.js +17 -13
- package/src/sap/suite/ui/generic/template/ObjectPage/manifest.json +1 -1
- package/src/sap/suite/ui/generic/template/ObjectPage/view/fragments/Actions.fragment.xml +2 -1
- package/src/sap/suite/ui/generic/template/ObjectPage/view/fragments/SmartForm.fragment.xml +2 -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/genericUtilities/controlHelper.js +4 -2
- package/src/sap/suite/ui/generic/template/genericUtilities/controlStateWrapperFactory/SmartTableChartCommon.js +4 -1
- package/src/sap/suite/ui/generic/template/js/AnnotationHelper.js +106 -15
- package/src/sap/suite/ui/generic/template/lib/AdaptiveCardHelper.js +2 -2
- package/src/sap/suite/ui/generic/template/lib/AppComponent.js +1 -1
- package/src/sap/suite/ui/generic/template/lib/Application.js +2 -2
- package/src/sap/suite/ui/generic/template/lib/CRUDManager.js +1 -1
- package/src/sap/suite/ui/generic/template/lib/CommonEventHandlers.js +16 -12
- package/src/sap/suite/ui/generic/template/lib/CommonUtils.js +1 -2
- package/src/sap/suite/ui/generic/template/lib/ContactCardDetailHelper.js +1 -1
- package/src/sap/suite/ui/generic/template/lib/ContextBookkeeping.js +3 -6
- package/src/sap/suite/ui/generic/template/lib/ContextMenuHandler.js +16 -2
- package/src/sap/suite/ui/generic/template/lib/FlexibleColumnLayoutHandler.js +3 -1
- package/src/sap/suite/ui/generic/template/lib/SideEffectUtil.js +3 -4
- package/src/sap/suite/ui/generic/template/lib/StatePreserver.js +1 -1
- package/src/sap/suite/ui/generic/template/lib/ViewDependencyHelper.js +7 -2
- package/src/sap/suite/ui/generic/template/lib/ai/EasyFilterBarHandler.js +48 -193
- package/src/sap/suite/ui/generic/template/lib/ai/EasyFilterDataFetcherHelper.js +334 -0
- package/src/sap/suite/ui/generic/template/lib/filterHelper.js +5 -7
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_en_US_saprigi.properties +108 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_id.properties +1 -1
- package/src/sap/suite/ui/generic/template/lib/insights/InsightsHandler.js +1 -2
- package/src/sap/suite/ui/generic/template/lib/navigation/NavigationController.js +26 -19
- package/src/sap/suite/ui/generic/template/lib/presentationControl/SmartTableHandler.js +5 -3
- package/src/sap/suite/ui/generic/template/library.js +1 -1
- package/src/sap/suite/ui/generic/template/listTemplates/controller/DetailController.js +6 -2
- package/src/sap/suite/ui/generic/template/listTemplates/controller/IappStateHandler.js +1 -1
- package/src/sap/suite/ui/generic/template/listTemplates/controller/ToolbarController.js +2 -10
- package/src/sap/suite/ui/generic/template/listTemplates/semanticDateRangeTypeHelper.js +1 -1
- package/src/sap/suite/ui/generic/template/themes/base/ALPConstants.less +14 -14
- package/src/sap/suite/ui/generic/template/themes/sap_belize_base/ALPConstants.less +14 -14
- package/src/sap/suite/ui/generic/template/themes/sap_bluecrystal_base/ALPConstants.less +14 -14
- package/src/sap/suite/ui/generic/template/themes/sap_hcb/ALPConstants.less +14 -14
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/controller/AnalyticGridController.js +0 -38
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/style/alr_readme.txt +0 -23
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/style/crosstab_library.css +0 -20
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/style/img/readme.txt +0 -4
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/style/img/sort_asc.gif +0 -0
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/style/img/sort_desc.gif +0 -0
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/style/img/sort_none.gif +0 -0
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/style/img/treenode_collapse.gif +0 -0
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/style/img/treenode_expand.gif +0 -0
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/view/fragments/AnalyticGrid.fragment.xml +0 -21
- package/src/sap/suite/ui/generic/template/themes/base/alr_zen.css +0 -127
- package/src/sap/suite/ui/generic/template/themes/base/crosstab_library.css +0 -20
- package/src/sap/suite/ui/generic/template/themes/base/img/readme.txt +0 -4
- package/src/sap/suite/ui/generic/template/themes/base/img/sort_asc.gif +0 -0
- package/src/sap/suite/ui/generic/template/themes/base/img/sort_desc.gif +0 -0
- package/src/sap/suite/ui/generic/template/themes/base/img/sort_none.gif +0 -0
- package/src/sap/suite/ui/generic/template/themes/base/img/treenode_collapse.gif +0 -0
- package/src/sap/suite/ui/generic/template/themes/base/img/treenode_expand.gif +0 -0
- package/src/sap/suite/ui/generic/template/themes/sap_belize_base/alr_zen.css +0 -136
- package/src/sap/suite/ui/generic/template/themes/sap_belize_base/crosstab_library.css +0 -20
- package/src/sap/suite/ui/generic/template/themes/sap_belize_base/img/readme.txt +0 -4
- package/src/sap/suite/ui/generic/template/themes/sap_belize_base/img/sort_asc.gif +0 -0
- package/src/sap/suite/ui/generic/template/themes/sap_belize_base/img/sort_desc.gif +0 -0
- package/src/sap/suite/ui/generic/template/themes/sap_belize_base/img/sort_none.gif +0 -0
- package/src/sap/suite/ui/generic/template/themes/sap_belize_base/img/treenode_collapse.gif +0 -0
- package/src/sap/suite/ui/generic/template/themes/sap_belize_base/img/treenode_expand.gif +0 -0
- package/src/sap/suite/ui/generic/template/themes/sap_bluecrystal_base/alr_zen.css +0 -136
- package/src/sap/suite/ui/generic/template/themes/sap_bluecrystal_base/crosstab_library.css +0 -20
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
sap.ui.define(["sap/ui/base/Object", "sap/base/util/extend", "sap/suite/ui/generic/template/genericUtilities/controlHelper", "sap/ui/core/library",
|
|
2
|
-
"sap/suite/ui/generic/template/genericUtilities/FeLogger"
|
|
3
|
-
], function(BaseObject, extend, controlHelper, SapCoreLibrary, FeLogger) {
|
|
2
|
+
"sap/suite/ui/generic/template/genericUtilities/FeLogger", "sap/ui/core/Element", "sap/ui/core/InvisibleText"
|
|
3
|
+
], function(BaseObject, extend, controlHelper, SapCoreLibrary, FeLogger, Element, InvisibleText) {
|
|
4
4
|
"use strict";
|
|
5
5
|
|
|
6
6
|
var STYLE_CLASS_FOR_ADJUSTMENT = "sapUiTableOnObjectPageAdjustmentsForSection";
|
|
@@ -174,9 +174,8 @@ sap.ui.define(["sap/ui/base/Object", "sap/base/util/extend", "sap/suite/ui/gener
|
|
|
174
174
|
oSmartForm.addAriaLabelledBy(sAnchorBarSectionHeaderId);
|
|
175
175
|
}
|
|
176
176
|
|
|
177
|
-
function
|
|
178
|
-
var oSubSectionInfoObject = oTemplateUtils.oInfoObjectHandler.getControlInformation(oFirstSubSection.getId())
|
|
179
|
-
oSection = oFirstSubSection.getParent();
|
|
177
|
+
function fnSetHeaderSmartFormAriaLabelBy(oFirstSubSection) {
|
|
178
|
+
var oSubSectionInfoObject = oTemplateUtils.oInfoObjectHandler.getControlInformation(oFirstSubSection.getId());
|
|
180
179
|
oFirstSubSection.getBlocks().concat(oFirstSubSection.getMoreBlocks())
|
|
181
180
|
.reduce(function(accBlock, currentBlock) {
|
|
182
181
|
if (!currentBlock.getContent || !currentBlock.getContent() || !currentBlock.getContent().length) {
|
|
@@ -191,14 +190,19 @@ sap.ui.define(["sap/ui/base/Object", "sap/base/util/extend", "sap/suite/ui/gener
|
|
|
191
190
|
return accBlock;
|
|
192
191
|
}, [])
|
|
193
192
|
.forEach(function(entry) {
|
|
194
|
-
if (!oSubSectionInfoObject) {
|
|
193
|
+
if (!oSubSectionInfoObject || (entry.getGroups().length === 1 && entry.getGroups()[0].getTitle && !entry.getGroups()[0].getTitle())) {
|
|
195
194
|
// Case: header is editable. manifest.json, editableHeaderContent=true
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
195
|
+
var sInvisibleTextID = `${entry.getId()}-ariaLabelBy-InvisibleText`,
|
|
196
|
+
oInvisibleText = Element.getElementById(sInvisibleTextID);
|
|
197
|
+
if (!oInvisibleText) {
|
|
198
|
+
var customData = !entry.getCustomData() ? [] : entry.getCustomData().filter(function(entry) {return entry.getKey() === "smartFormAriaLabel";});
|
|
199
|
+
if (customData.length && customData[0].getValue()) {
|
|
200
|
+
oInvisibleText = new InvisibleText({id : sInvisibleTextID, text: customData[0].getValue()}).toStatic();
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
if (oInvisibleText) {
|
|
204
|
+
entry._suggestTitleId(oInvisibleText.getId()); // set Section title id that will be used for aria
|
|
205
|
+
}
|
|
202
206
|
return;
|
|
203
207
|
}
|
|
204
208
|
});
|
|
@@ -209,7 +213,7 @@ sap.ui.define(["sap/ui/base/Object", "sap/base/util/extend", "sap/suite/ui/gener
|
|
|
209
213
|
setAsTitleOwner: fnSetAsTitleOwner,
|
|
210
214
|
adjustSubSectionTitle: fnAdjustSubSectionTitle,
|
|
211
215
|
addAccessibleName: fnAddAccessibleName,
|
|
212
|
-
|
|
216
|
+
setHeaderSmartFormAriaLabelBy: fnSetHeaderSmartFormAriaLabelBy
|
|
213
217
|
};
|
|
214
218
|
}
|
|
215
219
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<core:FragmentDefinition xmlns="sap.m" xmlns:core="sap.ui.core" xmlns:uxap="sap.uxap"
|
|
1
|
+
<core:FragmentDefinition xmlns="sap.m" xmlns:core="sap.ui.core" xmlns:uxap="sap.uxap" xmlns:dt="sap.ui.dt"
|
|
2
2
|
xmlns:fesr="http://schemas.sap.com/sapui5/extension/sap.ui.core.FESR/1"
|
|
3
3
|
xmlns:template="http://schemas.sap.com/sapui5/extension/sap.ui.core.template/1"
|
|
4
4
|
template:require="{
|
|
@@ -130,6 +130,7 @@
|
|
|
130
130
|
ariaHasPopup="Dialog"
|
|
131
131
|
fesr:press="fe:sum:summarize"
|
|
132
132
|
type="Ghost"
|
|
133
|
+
dt:designtime="not-adaptable"
|
|
133
134
|
visible="{_templPrivGlobal>/generic/fioriAI/isSummarizationEnabled}" />
|
|
134
135
|
|
|
135
136
|
<template:if test="{parameter>/settings/showRelatedApps}">
|
|
@@ -21,12 +21,13 @@
|
|
|
21
21
|
<core:CustomData key="defaultDropDownDisplayBehaviour" value="descriptionOnly" />
|
|
22
22
|
<core:CustomData key="defaultTextInEditModeSource" value="ValueListNoValidation" />
|
|
23
23
|
<core:CustomData key="dateFormatSettings" value='\{"UTC":true,"style":"medium"\}' />
|
|
24
|
+
<core:CustomData key="smartFormAriaLabel" value="{parts: [{path: 'facet>'}, {path: 'entitySet>name'}, {path: 'block>'}, {path: 'subSectionData>'}], formatter: 'AH.getSmartFormTitle'}" />
|
|
24
25
|
</sfo:customData>
|
|
25
26
|
<sfo:layout>
|
|
26
27
|
<template:if test="{= ${appSettings>/useColumnLayoutForSmartForm} !== false}">
|
|
27
28
|
<template:then>
|
|
28
29
|
<sfo:ColumnLayout columnsM="3" columnsL="4" columnsXL="{= ${appSettings>/objectPageColumns/screenSizeXL} === 4 ? '4' : '6'}" labelCellsLarge="12" />
|
|
29
|
-
|
|
30
|
+
</template:then>
|
|
30
31
|
<template:else>
|
|
31
32
|
<sfo:Layout columnsM="3" columnsL="4" columnsXL="{= ${appSettings>/objectPageColumns/screenSizeXL} === 4 ? '4' : '6'}" labelSpanS="12" labelSpanM="12" labelSpanL="12" labelSpanXL="12" singleGroupFullSize="false" />
|
|
32
33
|
</template:else>
|
|
@@ -44,8 +44,10 @@ sap.ui.define([
|
|
|
44
44
|
oCurrentFocus = getControlWithFocus();
|
|
45
45
|
var oTest = oCurrentFocus;
|
|
46
46
|
var bIsTargetSmartField = oControlHelper.isSmartField(oControl);
|
|
47
|
-
|
|
48
|
-
oTest
|
|
47
|
+
if (bIsTargetSmartField) {
|
|
48
|
+
while (oTest && oTest !== oControl && !oControlHelper.isSmartField(oTest)) {
|
|
49
|
+
oTest = oTest.getParent();
|
|
50
|
+
}
|
|
49
51
|
}
|
|
50
52
|
if (oTest !== oControl){
|
|
51
53
|
oLogger.warning(oCurrentFocus ? ("Focus is now on control with id " + oCurrentFocus.getId()) : "There is no focus now");
|
|
@@ -54,7 +54,10 @@ sap.ui.define([
|
|
|
54
54
|
// don't create UiState (managed object) from scratch, but fetch it from control and only apply known properties from state - thus, if any other properties would be added, we don't
|
|
55
55
|
// interfere with them
|
|
56
56
|
var oUiState = oControl.getUiState();
|
|
57
|
-
if (
|
|
57
|
+
if (
|
|
58
|
+
oUiState.getProperty("variantName") === "" ||
|
|
59
|
+
oControl.getVariantManagement().getModified() && oControl.getVariantManagement().getStandardVariantKey() === oUiState.getProperty("variantName")
|
|
60
|
+
){
|
|
58
61
|
oUiState.setPresentationVariant(oState.oUiState.oPresentationVariant);
|
|
59
62
|
oUiState.setSelectionVariant(oState.oUiState.oSelectionVariant);
|
|
60
63
|
oUiState.setTableSettings(oState.oUiState.oTableSettings);
|
|
@@ -478,9 +478,9 @@ sap.ui.define(["sap/ui/model/odata/AnnotationHelper",
|
|
|
478
478
|
var oModel = oInterface.getInterface(1).getModel();
|
|
479
479
|
// p13nData for Semantically Connected Columns
|
|
480
480
|
var sLeadingPropertyForSCColumn = "";
|
|
481
|
-
var
|
|
482
|
-
var
|
|
483
|
-
var
|
|
481
|
+
var oNavigationPropertiesSet = new Set();
|
|
482
|
+
var oAdditionalPropertiesSet = new Set();
|
|
483
|
+
var oAdditionalSortPropertiesSet = new Set();
|
|
484
484
|
var sActionButton = "false";
|
|
485
485
|
oConnectedDataFields = oConnectedDataFields && oConnectedDataFields.Data;
|
|
486
486
|
for (var i = 0; i < oConnectedDataFields.length; i++) {
|
|
@@ -533,16 +533,26 @@ sap.ui.define(["sap/ui/model/odata/AnnotationHelper",
|
|
|
533
533
|
if (!sLeadingPropertyForSCColumn && oP13N.leadingProperty) {
|
|
534
534
|
sLeadingPropertyForSCColumn = oP13N.leadingProperty;
|
|
535
535
|
} else {
|
|
536
|
-
|
|
537
|
-
|
|
536
|
+
if (oP13N.leadingProperty) {
|
|
537
|
+
oAdditionalPropertiesSet.add(oP13N.leadingProperty);
|
|
538
|
+
oAdditionalSortPropertiesSet.add(oP13N.leadingProperty);
|
|
539
|
+
}
|
|
538
540
|
}
|
|
539
541
|
|
|
540
|
-
|
|
542
|
+
if (oP13N.navigationProperty) {
|
|
543
|
+
oNavigationPropertiesSet.add(oP13N.navigationProperty);
|
|
544
|
+
}
|
|
541
545
|
// Add "additionalProperty" of current data field to the "additionalProperty" of current column's p13n
|
|
542
|
-
|
|
546
|
+
if (oP13N.additionalProperty) {
|
|
547
|
+
oAdditionalPropertiesSet.add(oP13N.additionalProperty);
|
|
548
|
+
}
|
|
543
549
|
// Add "description" & "unit" of current data field to the "additionalSortProperty" of current column's p13n
|
|
544
|
-
|
|
545
|
-
|
|
550
|
+
if (oP13N.description) {
|
|
551
|
+
oAdditionalSortPropertiesSet.add(oP13N.description);
|
|
552
|
+
}
|
|
553
|
+
if (oP13N.unit) {
|
|
554
|
+
oAdditionalSortPropertiesSet.add(oP13N.unit);
|
|
555
|
+
}
|
|
546
556
|
if (sActionButton === "false") {
|
|
547
557
|
sActionButton = oP13N.actionButton;
|
|
548
558
|
}
|
|
@@ -565,14 +575,14 @@ sap.ui.define(["sap/ui/model/odata/AnnotationHelper",
|
|
|
565
575
|
sP13N += '", "sortProperty":"' + sLeadingPropertyForSCColumn;
|
|
566
576
|
}
|
|
567
577
|
|
|
568
|
-
if (
|
|
569
|
-
sP13N += '", "navigationProperty":"' +
|
|
578
|
+
if (oNavigationPropertiesSet.size > 0) {
|
|
579
|
+
sP13N += '", "navigationProperty":"' + Array.from(oNavigationPropertiesSet).join();
|
|
570
580
|
}
|
|
571
|
-
if (
|
|
572
|
-
sP13N += '", "additionalProperty":"' +
|
|
581
|
+
if (oAdditionalPropertiesSet.size > 0) {
|
|
582
|
+
sP13N += '", "additionalProperty":"' + Array.from(oAdditionalPropertiesSet).join();
|
|
573
583
|
}
|
|
574
|
-
if (
|
|
575
|
-
sP13N += '", "additionalSortProperty":"' +
|
|
584
|
+
if (oAdditionalSortPropertiesSet.size > 0) {
|
|
585
|
+
sP13N += '", "additionalSortProperty":"' + Array.from(oAdditionalSortPropertiesSet).join();
|
|
576
586
|
}
|
|
577
587
|
|
|
578
588
|
sP13N += '", "actionButton":"' + sActionButton + '"';
|
|
@@ -4513,6 +4523,86 @@ sap.ui.define(["sap/ui/model/odata/AnnotationHelper",
|
|
|
4513
4523
|
break;
|
|
4514
4524
|
}
|
|
4515
4525
|
return sPriority;
|
|
4526
|
+
},
|
|
4527
|
+
|
|
4528
|
+
getModelData: function(oInterface, sBaseAnnotationPath, sEntitySetName) {
|
|
4529
|
+
var oModel = oInterface.getModel() ? oInterface.getModel() : oInterface.getInterface(0).getModel(),
|
|
4530
|
+
oBaseEntityType = oModel.getODataEntityType(oModel.getODataEntitySet(sEntitySetName).entityType);
|
|
4531
|
+
|
|
4532
|
+
if (sBaseAnnotationPath.indexOf("/") > -1) {
|
|
4533
|
+
var oRelevantData = oAnnotationHelper.getRelevantDataForAnnotationRecord(oModel, sBaseAnnotationPath, oBaseEntityType);
|
|
4534
|
+
return {
|
|
4535
|
+
sAnnotationPath: oRelevantData.dataFieldValuePath[0] === '@' ? oRelevantData.dataFieldValuePath.substring(1) : oRelevantData.dataFieldValuePath,
|
|
4536
|
+
oEntityType: oRelevantData.entityType
|
|
4537
|
+
};
|
|
4538
|
+
}
|
|
4539
|
+
return {
|
|
4540
|
+
sAnnotationPath: sBaseAnnotationPath[0] === '@' ? sBaseAnnotationPath.substring(1) : sBaseAnnotationPath,
|
|
4541
|
+
oEntityType: oBaseEntityType
|
|
4542
|
+
};
|
|
4543
|
+
},
|
|
4544
|
+
|
|
4545
|
+
getSmartFormTitle: function(oInterface, oFacet, sEntitySetName, oBlock, oSubSectionData) {
|
|
4546
|
+
if (!oFacet) {
|
|
4547
|
+
return oAnnotationHelper.getTitleForSectionsForms(oBlock, oSubSectionData);
|
|
4548
|
+
}
|
|
4549
|
+
return oAnnotationHelper.getTitleForHeaderForm(oInterface, oFacet, sEntitySetName);
|
|
4550
|
+
},
|
|
4551
|
+
|
|
4552
|
+
getTitleForSectionsForms: function(oBlock, oSubSectionData) {
|
|
4553
|
+
if (oSubSectionData?.annotations?.Facet?.annotation?.Facets?.length > 1
|
|
4554
|
+
|| oSubSectionData?.annotations?.Facet?.annotation?.Label?.String !== oBlock?.aggregations?.groups[0]?.annotations?.Facet?.annotation?.Label?.String
|
|
4555
|
+
) {
|
|
4556
|
+
// In case Section -> SubSection have more than one form, SmartForm will have it's titles visible
|
|
4557
|
+
// or
|
|
4558
|
+
// SubSectin title !== SmartForm title, SmartForm title will also be visible
|
|
4559
|
+
return;
|
|
4560
|
+
}
|
|
4561
|
+
if (oBlock?.aggregations?.groups[0]?.annotations?.Facet?.annotation?.Label?.String !== oBlock?.aggregations?.groups[0]?.targetAnnotation?.Label?.String) {
|
|
4562
|
+
// Compare SmartForm title !== FiledGroup title
|
|
4563
|
+
// if they differs -> use FiledGoup title
|
|
4564
|
+
return oBlock?.aggregations?.groups[0]?.targetAnnotation?.Label?.String;
|
|
4565
|
+
}
|
|
4566
|
+
return;
|
|
4567
|
+
},
|
|
4568
|
+
|
|
4569
|
+
getTitleForHeaderForm: function(oInterface, oFacet, sEntitySetName) {
|
|
4570
|
+
if (oFacet.Target && oFacet.Target.AnnotationPath && oFacet.Target.AnnotationPath.indexOf("com.sap.vocabularies.UI.v1.DataPoint") > -1) {
|
|
4571
|
+
// Process DataPoint case
|
|
4572
|
+
var { sAnnotationPath, oEntityType } = oAnnotationHelper.getModelData(oInterface, oFacet.Target.AnnotationPath, sEntitySetName);
|
|
4573
|
+
if (oEntityType[sAnnotationPath] && oEntityType[sAnnotationPath].Title && oEntityType[sAnnotationPath].Title.String) {
|
|
4574
|
+
return oEntityType[sAnnotationPath].Title.String;
|
|
4575
|
+
}
|
|
4576
|
+
// As DataPoint don't have title -> try to get property name as SmartForm title
|
|
4577
|
+
if (!oEntityType[sAnnotationPath] || !oEntityType[sAnnotationPath].Value || !oEntityType[sAnnotationPath].Value.Path || !oEntityType.property) {
|
|
4578
|
+
return;
|
|
4579
|
+
}
|
|
4580
|
+
var aProperty = oEntityType.property.filter(function(entry) {
|
|
4581
|
+
return entry.name === oEntityType[sAnnotationPath].Value.Path;
|
|
4582
|
+
});
|
|
4583
|
+
if (aProperty.length && aProperty[0]['sap:label']) {
|
|
4584
|
+
// Property name found
|
|
4585
|
+
return aProperty[0]['sap:label'];
|
|
4586
|
+
}
|
|
4587
|
+
return;
|
|
4588
|
+
}
|
|
4589
|
+
// It's Identification or FieldGroup case
|
|
4590
|
+
if (oFacet.Label && oFacet.Label.String) {
|
|
4591
|
+
return oFacet.Label.String;
|
|
4592
|
+
}
|
|
4593
|
+
if (!oFacet.Target || !oFacet.Target.AnnotationPath) {
|
|
4594
|
+
return;
|
|
4595
|
+
}
|
|
4596
|
+
if (oFacet.Target.AnnotationPath.indexOf("com.sap.vocabularies.UI.v1.Identification") > -1) {
|
|
4597
|
+
// Identification entry don't have any data which we can use as SmartForm title.
|
|
4598
|
+
return;
|
|
4599
|
+
}
|
|
4600
|
+
var { sAnnotationPath, oEntityType } = oAnnotationHelper.getModelData(oInterface, oFacet.Target.AnnotationPath, sEntitySetName);
|
|
4601
|
+
if (oEntityType[sAnnotationPath] && oEntityType[sAnnotationPath].Label && oEntityType[sAnnotationPath].Label.String) {
|
|
4602
|
+
// Use FieldGroup.Label.String as SmartForm title
|
|
4603
|
+
return oEntityType[sAnnotationPath].Label.String;
|
|
4604
|
+
}
|
|
4605
|
+
return;
|
|
4516
4606
|
}
|
|
4517
4607
|
};
|
|
4518
4608
|
oAnnotationHelper.getBlockForEditableHeaderFacet.requiresIContext = true;
|
|
@@ -4583,6 +4673,7 @@ sap.ui.define(["sap/ui/model/odata/AnnotationHelper",
|
|
|
4583
4673
|
oAnnotationHelper.getTextArrangementPath.requiresIContext = true;
|
|
4584
4674
|
oAnnotationHelper.isValueHelpTableAvailable.requiresIContext = true;
|
|
4585
4675
|
oAnnotationHelper.getTextArrangementFinalString.requiresIContext = true;
|
|
4676
|
+
oAnnotationHelper.getSmartFormTitle.requiresIContext = true;
|
|
4586
4677
|
|
|
4587
4678
|
return oAnnotationHelper;
|
|
4588
4679
|
}, /* bExport= */ true);
|
|
@@ -511,7 +511,7 @@ sap.ui.define([
|
|
|
511
511
|
}
|
|
512
512
|
}
|
|
513
513
|
],
|
|
514
|
-
"$schema": "
|
|
514
|
+
"$schema": "https://adaptivecards.io/schemas/adaptive-card.json"
|
|
515
515
|
}
|
|
516
516
|
};
|
|
517
517
|
|
|
@@ -574,7 +574,7 @@ sap.ui.define([
|
|
|
574
574
|
]
|
|
575
575
|
}
|
|
576
576
|
],
|
|
577
|
-
"$schema": "
|
|
577
|
+
"$schema": "https://adaptivecards.io/schemas/adaptive-card.json",
|
|
578
578
|
"version": "1.4"
|
|
579
579
|
};
|
|
580
580
|
|
|
@@ -944,7 +944,7 @@ sap.ui.define([
|
|
|
944
944
|
* @public
|
|
945
945
|
* @extends sap.ui.core.UIComponent
|
|
946
946
|
* @author SAP SE
|
|
947
|
-
* @version 1.
|
|
947
|
+
* @version 1.139.1
|
|
948
948
|
* @name sap.suite.ui.generic.template.lib.AppComponent
|
|
949
949
|
*/
|
|
950
950
|
var oAppComponent = UIComponent.extend("sap.suite.ui.generic.template.lib.AppComponent", {
|
|
@@ -856,7 +856,7 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
856
856
|
oLogger.info("Show message toast");
|
|
857
857
|
MessageToast.show.apply(MessageToast, myArguments);
|
|
858
858
|
};
|
|
859
|
-
Promise.all([getOperationEndedPromise(
|
|
859
|
+
Promise.all([getOperationEndedPromise(), oTemplateContract.oBusyHelper.getUnbusy()]).then(fnMessageToast);
|
|
860
860
|
},
|
|
861
861
|
showMessageBox: function() {
|
|
862
862
|
var myArguments = arguments;
|
|
@@ -864,7 +864,7 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
864
864
|
oLogger.info("Show message box");
|
|
865
865
|
MessageBox.show.apply(MessageBox, myArguments);
|
|
866
866
|
};
|
|
867
|
-
Promise.all([getOperationEndedPromise(
|
|
867
|
+
Promise.all([getOperationEndedPromise(), oTemplateContract.oBusyHelper.getUnbusy()]).then(fnMessageBox);
|
|
868
868
|
},
|
|
869
869
|
registerStateChanger: fnRegisterStateChanger,
|
|
870
870
|
createDraftSiblingPromise: oContextBookkeeping.createDraftSiblingPromise,
|
|
@@ -400,7 +400,7 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
400
400
|
oServices.oPresentationControlHandlerFactory.getPresentationControlHandler(oSettings.smartTable).refresh("Changes");
|
|
401
401
|
}
|
|
402
402
|
var fnHandleResponse = function(aDeleteResults){
|
|
403
|
-
var oParsedDeleteResult = fnParseResponse(aPath, aDeleteResults, bWithWarningDialog
|
|
403
|
+
var oParsedDeleteResult = fnParseResponse(aPath, aDeleteResults, bWithWarningDialog);
|
|
404
404
|
mFailed = extend(mFailed, oParsedDeleteResult.mFailed);
|
|
405
405
|
mSuccess = extend(mSuccess, oParsedDeleteResult.mSuccess);
|
|
406
406
|
mWarning = oParsedDeleteResult.mWarning;
|
|
@@ -28,7 +28,8 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
28
28
|
"sap/ui/core/CustomData",
|
|
29
29
|
"sap/m/VBox",
|
|
30
30
|
"sap/suite/ui/generic/template/genericUtilities/utils",
|
|
31
|
-
"sap/ui/core/Element"
|
|
31
|
+
"sap/ui/core/Element",
|
|
32
|
+
"sap/ui/generic/app/util/ModelUtil"
|
|
32
33
|
], function(
|
|
33
34
|
BaseObject,
|
|
34
35
|
Event,
|
|
@@ -60,7 +61,8 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
60
61
|
CustomData,
|
|
61
62
|
VBox,
|
|
62
63
|
genericUtils,
|
|
63
|
-
Element
|
|
64
|
+
Element,
|
|
65
|
+
ModelUtil
|
|
64
66
|
) {
|
|
65
67
|
"use strict";
|
|
66
68
|
|
|
@@ -1094,7 +1096,11 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
1094
1096
|
// and text, using the formatutil and the textarrangement, title should
|
|
1095
1097
|
// be passed on the smartlink
|
|
1096
1098
|
if (oControl.getFieldName) {
|
|
1097
|
-
|
|
1099
|
+
// The value "sEntitySet" holds the entity set of an object page or a table.
|
|
1100
|
+
//
|
|
1101
|
+
// Sometimes, the SmartLink is located on a field group which belongs to the child entity set of object page.
|
|
1102
|
+
// So, we have to always derive the entity type from the smart link's binding context.
|
|
1103
|
+
var oEntityType = ModelUtil.getEntityTypeFromContext(oControl.getBindingContext());
|
|
1098
1104
|
var oField = oEntityType.property.find(function (oProperty) { return oProperty.name === sSourceClickedField; });
|
|
1099
1105
|
var sTextArrangement = "descriptionAndId";
|
|
1100
1106
|
if (oField) { // TODO: Need to provide the correct field Object using the entityType and corresponding association (should be handled by a BLI)
|
|
@@ -1103,7 +1109,7 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
1103
1109
|
var vValue = oControl.getBinding("text").getValue(); // could be array or string
|
|
1104
1110
|
if (Array.isArray(vValue)){
|
|
1105
1111
|
var oTexts = FormatUtil.getTextsFromDisplayBehaviour(sTextArrangement, vValue[0], vValue[1]);
|
|
1106
|
-
if (oMainNavigation) {
|
|
1112
|
+
if (!oField["sap:unit"] && oMainNavigation) {
|
|
1107
1113
|
oMainNavigation.setDescription(oTexts.secondText);
|
|
1108
1114
|
}
|
|
1109
1115
|
sTitle = oTexts.firstText;
|
|
@@ -1662,7 +1668,7 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
1662
1668
|
var sTableEntitySet = oTable.getEntitySet();
|
|
1663
1669
|
oCommonUtils.setExternalChevronRefreshBehaviour(sTableEntitySet);
|
|
1664
1670
|
|
|
1665
|
-
fnNavigateIntentManifest(oEventSource, oBindingContext, oState.oSmartFilterbar,
|
|
1671
|
+
fnNavigateIntentManifest(oEventSource, oBindingContext, oState.oSmartFilterbar, true);
|
|
1666
1672
|
return;
|
|
1667
1673
|
}
|
|
1668
1674
|
|
|
@@ -2346,7 +2352,7 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
2346
2352
|
if (oEventSource.data("CrossNavigation")) {
|
|
2347
2353
|
oServices.oViewDependencyHelper.setMeToDirty(oComponent, sEntitySet, true);
|
|
2348
2354
|
|
|
2349
|
-
fnNavigateIntentManifest(oEventSource, oEventSource.getBindingContext(), oSmartFilterBar,
|
|
2355
|
+
fnNavigateIntentManifest(oEventSource, oEventSource.getBindingContext(), oSmartFilterBar, true);
|
|
2350
2356
|
return Promise.resolve();
|
|
2351
2357
|
}
|
|
2352
2358
|
var oNonDraftCreatePromise = oComponentUtils.getNonDraftCreatePromise(sEntitySet, oPredefinedValues);
|
|
@@ -2562,12 +2568,10 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
2562
2568
|
var sPath = oContext.getPath();
|
|
2563
2569
|
var oContactData = oModel.getContext(sPath);
|
|
2564
2570
|
var oContactAnnotation = JSON.parse(oSourceControl.data("contactDetails"));
|
|
2565
|
-
var
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
sEmail = (oContactAnnotation.email[0].address && oContactAnnotation.email[0].address.String);
|
|
2570
|
-
}
|
|
2571
|
+
var emailObj = oContactAnnotation?.email?.[0]?.address;
|
|
2572
|
+
var sEmail = emailObj?.Path
|
|
2573
|
+
? oContactData.getProperty(emailObj.Path)
|
|
2574
|
+
: emailObj?.String;
|
|
2571
2575
|
|
|
2572
2576
|
|
|
2573
2577
|
fnFetchContactStatus(sEmail).then(function (oContactStatus) {
|
|
@@ -1354,8 +1354,7 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
1354
1354
|
return fnExecute2();
|
|
1355
1355
|
});
|
|
1356
1356
|
} else {
|
|
1357
|
-
oRet = (mParameters.dataloss.popup ? fnProcessDataLossOrDraftDiscardConfirmation(fnExecute2, fnReject,
|
|
1358
|
-
null, (mParameters.dataloss.navigation ? "LeavePage" : "Proceed"), true) : fnExecute2());
|
|
1357
|
+
oRet = (mParameters.dataloss.popup ? fnProcessDataLossOrDraftDiscardConfirmation(fnExecute2, fnReject, (mParameters.dataloss.navigation ? "LeavePage" : "Proceed"), true) : fnExecute2());
|
|
1359
1358
|
}
|
|
1360
1359
|
|
|
1361
1360
|
if (oRet instanceof Promise) {
|
|
@@ -34,7 +34,7 @@ sap.ui.define([
|
|
|
34
34
|
var renderContactDetailsFragment = function() {
|
|
35
35
|
oCommonUtils.getDialogFragmentAsync("sap.suite.ui.generic.template.fragments.ContactDetails", {
|
|
36
36
|
formatUri: function (sValue) {
|
|
37
|
-
var mailregex =
|
|
37
|
+
var mailregex = /^[a-zA-Z0-9._%+-]+@([a-zA-Z0-9]+(-[a-zA-Z0-9]+)*\.)+[a-zA-Z]{2,}$/;
|
|
38
38
|
if (mailregex.test(sValue)) {
|
|
39
39
|
return "mailto:" + sValue;
|
|
40
40
|
} else {
|
|
@@ -753,12 +753,9 @@ sap.ui.define(["sap/ui/base/Object", "sap/base/util/each", "sap/base/util/extend
|
|
|
753
753
|
|
|
754
754
|
//swap, if oContextData1 either doesn't hold a value or doesn't have oContext and oContextData2 is available and is an active object
|
|
755
755
|
if ((!oContextData1 || !oContextData1.oContext) && (oContextData2 && !oContextData2.oContextInfo.bIsDraft)) {
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
oContextData1 = fnSwap(oContextData2, oContextData2 = oContextData1);
|
|
760
|
-
sCanonicalPath1 = fnSwap(sCanonicalPath2, sCanonicalPath2 = sCanonicalPath1);
|
|
761
|
-
oHistoricIdentity = fnSwap(oNewIdentity, oNewIdentity = oHistoricIdentity);
|
|
756
|
+
[oContextData1, oContextData2] = [oContextData2, oContextData1];
|
|
757
|
+
[sCanonicalPath1, sCanonicalPath2] = [sCanonicalPath2, sCanonicalPath1];
|
|
758
|
+
[oHistoricIdentity, oNewIdentity] = [oNewIdentity, oHistoricIdentity];
|
|
762
759
|
}
|
|
763
760
|
function fnTestEquivalence (oContextData1, oContextData2) {
|
|
764
761
|
if (!oContextData1 || !oContextData2) {
|
|
@@ -245,7 +245,17 @@ sap.ui.define([
|
|
|
245
245
|
return false;
|
|
246
246
|
}
|
|
247
247
|
|
|
248
|
-
|
|
248
|
+
/**
|
|
249
|
+
*
|
|
250
|
+
* Evaluates the menu items in a menu button and adds them to the context menu based on the following rules:
|
|
251
|
+
*
|
|
252
|
+
* 1. If multiple menu items are eligible for the context menu,
|
|
253
|
+
* - A main menu entry is added to the context menu with the same text as menu button.
|
|
254
|
+
* - The eligible menu items are added as sub-menu entries under this main entry.
|
|
255
|
+
*
|
|
256
|
+
* 2. If only one menu item is eligible,
|
|
257
|
+
* - It's directly added as a top-level entry in the context menu
|
|
258
|
+
*/
|
|
249
259
|
function fnAddMenuButtonToContextMenu(sPathToItems, oFocusInfo, oToolbarControlsData, aItems, oMenuButton, bStartsNewSection) {
|
|
250
260
|
var aMenuItems = oMenuButton.getMenu().getItems();
|
|
251
261
|
|
|
@@ -255,7 +265,11 @@ sap.ui.define([
|
|
|
255
265
|
fnAddToolbarButtonToContextMenu(sItemsPath, oFocusInfo, oToolbarControlsData, aChildContextMenuEntries, oMenuItem, bStartsSectionOnSubMenu);
|
|
256
266
|
});
|
|
257
267
|
|
|
258
|
-
if (aChildContextMenuEntries.length
|
|
268
|
+
if (aChildContextMenuEntries.length === 1) {
|
|
269
|
+
var oChildContextMenuEntry = aChildContextMenuEntries[0];
|
|
270
|
+
fnAddMenuItem(sPathToItems, aItems, oChildContextMenuEntry.text, oChildContextMenuEntry.icon, oChildContextMenuEntry.startsSection, oChildContextMenuEntry.handlerPromise);
|
|
271
|
+
return true;
|
|
272
|
+
} else if (aChildContextMenuEntries.length > 1) {
|
|
259
273
|
fnAddMenuItem(sPathToItems, aItems, oMenuButton.getText(), oMenuButton.getIcon(), bStartsNewSection, null, aChildContextMenuEntries);
|
|
260
274
|
return true;
|
|
261
275
|
}
|
|
@@ -163,7 +163,8 @@ sap.ui.define([
|
|
|
163
163
|
}
|
|
164
164
|
var oRet = {};
|
|
165
165
|
var bPerformAnalysis = true;
|
|
166
|
-
|
|
166
|
+
var oTreeNode = oCurrentIdentity.treeNode;
|
|
167
|
+
while (bPerformAnalysis) {
|
|
167
168
|
var iFCLLevel = oTreeNode.fCLLevel;
|
|
168
169
|
var sPar = getColumnForFCLLevel(iFCLLevel);
|
|
169
170
|
oRet[sPar] = {
|
|
@@ -173,6 +174,7 @@ sap.ui.define([
|
|
|
173
174
|
};
|
|
174
175
|
bPerformAnalysis = iFCLLevel === 1 || iFCLLevel === 2;
|
|
175
176
|
bIsNonDraftCreate = false; // only last column can be the create column
|
|
177
|
+
oTreeNode = oTemplateContract.mRoutingTree[oTreeNode.parentRoute];
|
|
176
178
|
}
|
|
177
179
|
return oRet;
|
|
178
180
|
}
|
|
@@ -34,14 +34,13 @@ sap.ui.define(["sap/suite/ui/generic/template/js/AnnotationHelper",
|
|
|
34
34
|
return oSmartField._calculateFieldGroupIDs(oClonedMetaData);
|
|
35
35
|
}
|
|
36
36
|
function fnComputeFieldGroupAndTriggerSideEffect(oSmartField, sSideEffectSourcePropertyType) {
|
|
37
|
-
var aFieldGroupIds
|
|
38
|
-
var fnTriggerValidateFieldGroupEvent = function() {
|
|
37
|
+
var fnTriggerValidateFieldGroupEvent = function(aFieldGroupIds) {
|
|
39
38
|
if (aFieldGroupIds) {
|
|
40
39
|
oSmartField.triggerValidateFieldGroup(aFieldGroupIds);
|
|
41
40
|
}
|
|
42
41
|
};
|
|
43
|
-
var fnCallTriggerValidateFieldGroup = function(sSideEffectSourcePropertyType, oComputedMetaData) {
|
|
44
|
-
|
|
42
|
+
var fnCallTriggerValidateFieldGroup = function(sSideEffectSourcePropertyType, oComputedMetaData) {
|
|
43
|
+
var aFieldGroupIds;
|
|
45
44
|
switch (sSideEffectSourcePropertyType) {
|
|
46
45
|
case SideEffectSourcePropertyType.SINGLE_SOURCE_ONLY:
|
|
47
46
|
var aInnerControls = oSmartField.getInnerControls();
|
|
@@ -446,7 +446,7 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
446
446
|
function isStateChange(mAppStates){
|
|
447
447
|
sAppStateKeyInUrl = mAppStates[oSettings.appStateName] || "";
|
|
448
448
|
if (Array.isArray(sAppStateKeyInUrl)){
|
|
449
|
-
sAppStateKeyInUrl = sAppStateKeyInUrl.sort()[0] || "";
|
|
449
|
+
sAppStateKeyInUrl = sAppStateKeyInUrl.sort((a, b) => a.localeCompare(b))[0] || "";
|
|
450
450
|
}
|
|
451
451
|
if (oStoringInformation){
|
|
452
452
|
if (oStoringInformation.appStateKey !== sAppStateKeyInUrl){
|
|
@@ -25,13 +25,18 @@ sap.ui.define(["sap/ui/base/Object", "sap/suite/ui/generic/template/js/Annotatio
|
|
|
25
25
|
var sMyId = oComponent.getId();
|
|
26
26
|
var oComponentRegistryEntry = oTemplateContract.componentRegistry[sMyId];
|
|
27
27
|
var oTreeNode = oTemplateContract.mRoutingTree[oComponentRegistryEntry.route];
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
var i = 0;
|
|
29
|
+
while (oTreeNode.level > 0) {
|
|
30
|
+
if (iLevel && i >= iLevel) {
|
|
31
|
+
break;
|
|
32
|
+
}
|
|
33
|
+
var oParentNode = oTemplateContract.mRoutingTree[oTreeNode.parentRoute];
|
|
30
34
|
if (oParentNode.componentId){
|
|
31
35
|
var oParentComponent = oTemplateContract.componentRegistry[oParentNode.componentId].oComponent;
|
|
32
36
|
setMeToDirty(oParentComponent, sEntitySet);
|
|
33
37
|
}
|
|
34
38
|
oTreeNode = oParentNode;
|
|
39
|
+
i++;
|
|
35
40
|
}
|
|
36
41
|
}
|
|
37
42
|
|