@sapui5/sap.suite.ui.generic.template 1.136.3 → 1.136.5
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/controller/ControllerImplementation.js +7 -9
- 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 +1 -2
- package/src/sap/suite/ui/generic/template/ObjectPage/controller/MessageSortingHandler.js +3 -1
- package/src/sap/suite/ui/generic/template/ObjectPage/controller/SectionTitleHandler.js +16 -12
- package/src/sap/suite/ui/generic/template/ObjectPage/manifest.json +1 -1
- package/src/sap/suite/ui/generic/template/ObjectPage/view/Details.view.xml +2 -3
- package/src/sap/suite/ui/generic/template/ObjectPage/view/fragments/SmartForm.fragment.xml +1 -0
- 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/js/AnnotationHelper.js +60 -0
- package/src/sap/suite/ui/generic/template/lib/AppComponent.js +1 -1
- package/src/sap/suite/ui/generic/template/lib/CommonEventHandlers.js +13 -9
- package/src/sap/suite/ui/generic/template/lib/ai/EasyFilterBarHandler.js +32 -6
- 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/package.json
CHANGED
package/src/sap/suite/ui/generic/template/AnalyticalListPage/controller/ControllerImplementation.js
CHANGED
|
@@ -153,17 +153,15 @@ sap.ui.define(["sap/fe/navigation/SelectionVariant",
|
|
|
153
153
|
oController.templateBaseExtension.onInitSmartFilterBar(oEvent);
|
|
154
154
|
}
|
|
155
155
|
function onSmartFilterBarInitialized(){
|
|
156
|
+
var manifestSetting = oState.oController.getOwnerComponent();
|
|
157
|
+
if (oState.hideVisualFilter || (manifestSetting.getDefaultFilterMode() == "visual" && manifestSetting.getModel().mMetadataUrlParams && manifestSetting.getModel().mMetadataUrlParams["sap-value-list"] === "none" )) {
|
|
158
|
+
if (oState.alr_visualFilterBar && !oState.alr_visualFilterBar.getAssociateValueListsCalled()) {
|
|
159
|
+
oState.alr_visualFilterBar.setAssociateValueListsCalled(true);
|
|
160
|
+
}
|
|
161
|
+
oState.oSmartFilterbar.associateValueLists();
|
|
162
|
+
}
|
|
156
163
|
var oAppStatePromise = oState.oIappStateHandler.onSmartFilterBarInitialized();
|
|
157
164
|
oAppStatePromise.then(function(){
|
|
158
|
-
//execute oSmartFilterbar.associateValueLists after the oSmartFilterbar.setUiState is called
|
|
159
|
-
//to restore the selection options from the URL parameters
|
|
160
|
-
var manifestSetting = oState.oController.getOwnerComponent();
|
|
161
|
-
if (oState.hideVisualFilter || (manifestSetting.getDefaultFilterMode() == "visual" && manifestSetting.getModel().mMetadataUrlParams && manifestSetting.getModel().mMetadataUrlParams["sap-value-list"] === "none" )) {
|
|
162
|
-
if (oState.alr_visualFilterBar && !oState.alr_visualFilterBar.getAssociateValueListsCalled()) {
|
|
163
|
-
oState.alr_visualFilterBar.setAssociateValueListsCalled(true);
|
|
164
|
-
}
|
|
165
|
-
oState.oSmartFilterbar.associateValueLists();
|
|
166
|
-
}
|
|
167
165
|
oState._bIsStartingUp = false;
|
|
168
166
|
//visual filter config and bindings must be updated after vf has been initialised
|
|
169
167
|
if (oState.bVisualFilterInitialised) {
|
|
@@ -1936,7 +1936,7 @@ sap.ui.define([
|
|
|
1936
1936
|
oState.oSectionTitleHandler.adjustSubSectionTitle(oSubSection);
|
|
1937
1937
|
// Add accessible name to the SmartForm in the first subsection if all titles are hidden, because accessible name will not propogate to the form control
|
|
1938
1938
|
oState.oSectionTitleHandler.addAccessibleName(oSubSection);
|
|
1939
|
-
oState.oSectionTitleHandler.
|
|
1939
|
+
oState.oSectionTitleHandler.setHeaderSmartFormAriaLabelBy(oSubSection);
|
|
1940
1940
|
}
|
|
1941
1941
|
}
|
|
1942
1942
|
|
|
@@ -2362,7 +2362,6 @@ sap.ui.define([
|
|
|
2362
2362
|
oState.oMessageStripHelper = new MessageStripHelper(oMultipleViewsHandler, oController, oTemplateUtils, oBase.state.messageButtonHelper);
|
|
2363
2363
|
oState.oInlineCreationRowsHelper = new InlineCreationRowsHelper(oObjectPage, oTemplateUtils, fnGetSmartTableCreationMode, oController, oState.oMessageStripHelper);
|
|
2364
2364
|
oState.oSectionTitleHandler = new SectionTitleHandler(oController, oObjectPage, oTemplateUtils);
|
|
2365
|
-
|
|
2366
2365
|
var oTemplatePrivateModel = oTemplateUtils.oComponentUtils.getTemplatePrivateModel();
|
|
2367
2366
|
|
|
2368
2367
|
|
|
@@ -491,7 +491,8 @@ sap.ui.define([
|
|
|
491
491
|
oMessage.aFullTargets.some(function(sFullPath){
|
|
492
492
|
if (sFullPath.startsWith(sBindingPathPrefix)){ // This full target points to a place on the current object page
|
|
493
493
|
oTemplateUtils.oInfoObjectHandler.executeForAllInformationObjects("smartTable", function(oInfoObject){ // Check for all tables whether it even points to the table
|
|
494
|
-
|
|
494
|
+
const bControlExists = !!controlHelper.byId(oInfoObject.getId());
|
|
495
|
+
if (!bFound && bControlExists){ // If a suitable table has already been identified skip all other tables
|
|
495
496
|
var sStart = sBindingPathPrefix + oInfoObject.getNavigationProperty();
|
|
496
497
|
if (sFullPath === sStart || sFullPath.startsWith(sStart + "(")){ // If the full target really identifies the table or an entry within the table
|
|
497
498
|
bFound = true;
|
|
@@ -807,6 +808,7 @@ sap.ui.define([
|
|
|
807
808
|
return sTableText + sRowHeaderText + sRowText + sErrorColumnText;
|
|
808
809
|
}
|
|
809
810
|
testableHelper.testableStatic(getSubtitleForRow, "filterHelper_getSubtitleForRow");
|
|
811
|
+
testableHelper.testableStatic(fnFindTableForMessage, "messageSortingHandler_fnFindTableForMessage");
|
|
810
812
|
// public instance methods
|
|
811
813
|
return {
|
|
812
814
|
getPrepareMessageDisplayPromise: getPrepareMessageDisplayPromise
|
|
@@ -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) {
|
|
@@ -193,12 +192,17 @@ sap.ui.define(["sap/ui/base/Object", "sap/base/util/extend", "sap/suite/ui/gener
|
|
|
193
192
|
.forEach(function(entry) {
|
|
194
193
|
if (!oSubSectionInfoObject) {
|
|
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
|
|
|
@@ -170,9 +170,8 @@
|
|
|
170
170
|
<uxap:landmarkInfo>
|
|
171
171
|
<uxap:ObjectPageAccessibleLandmarkInfo
|
|
172
172
|
rootRole="None"
|
|
173
|
-
rootLabel=""
|
|
174
|
-
footerRole="ContentInfo"
|
|
175
|
-
footerLabel="{i18n>FOOTER_REGION_LABEL_ARIA}"/>
|
|
173
|
+
rootLabel=" "
|
|
174
|
+
footerRole="ContentInfo"/>
|
|
176
175
|
</uxap:landmarkInfo>
|
|
177
176
|
</uxap:ObjectPageLayout>
|
|
178
177
|
|
|
@@ -21,6 +21,7 @@
|
|
|
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'}], formatter: 'AH.getSmartFormTitle'}" />
|
|
24
25
|
</sfo:customData>
|
|
25
26
|
<sfo:layout>
|
|
26
27
|
<template:if test="{= ${appSettings>/useColumnLayoutForSmartForm} !== false}">
|
|
@@ -4505,6 +4505,65 @@ sap.ui.define(["sap/ui/model/odata/AnnotationHelper",
|
|
|
4505
4505
|
break;
|
|
4506
4506
|
}
|
|
4507
4507
|
return sPriority;
|
|
4508
|
+
},
|
|
4509
|
+
|
|
4510
|
+
getModelData: function(oInterface, sBaseAnnotationPath, sEntitySetName) {
|
|
4511
|
+
var oModel = oInterface.getModel() ? oInterface.getModel() : oInterface.getInterface(0).getModel(),
|
|
4512
|
+
oBaseEntityType = oModel.getODataEntityType(oModel.getODataEntitySet(sEntitySetName).entityType);
|
|
4513
|
+
|
|
4514
|
+
if (sBaseAnnotationPath.indexOf("/") > -1) {
|
|
4515
|
+
var oRelevantData = oAnnotationHelper.getRelevantDataForAnnotationRecord(oModel, sBaseAnnotationPath, oBaseEntityType);
|
|
4516
|
+
return {
|
|
4517
|
+
sAnnotationPath: oRelevantData.dataFieldValuePath[0] === '@' ? oRelevantData.dataFieldValuePath.substring(1) : oRelevantData.dataFieldValuePath,
|
|
4518
|
+
oEntityType: oRelevantData.entityType
|
|
4519
|
+
};
|
|
4520
|
+
}
|
|
4521
|
+
return {
|
|
4522
|
+
sAnnotationPath: sBaseAnnotationPath[0] === '@' ? sBaseAnnotationPath.substring(1) : sBaseAnnotationPath,
|
|
4523
|
+
oEntityType: oBaseEntityType
|
|
4524
|
+
};
|
|
4525
|
+
},
|
|
4526
|
+
|
|
4527
|
+
getSmartFormTitle: function(oInterface, oFacet, sEntitySetName) {
|
|
4528
|
+
if (!oFacet) {
|
|
4529
|
+
return;
|
|
4530
|
+
}
|
|
4531
|
+
if (oFacet.Target && oFacet.Target.AnnotationPath && oFacet.Target.AnnotationPath.indexOf("com.sap.vocabularies.UI.v1.DataPoint") > -1) {
|
|
4532
|
+
// Process DataPoint case
|
|
4533
|
+
var { sAnnotationPath, oEntityType } = oAnnotationHelper.getModelData(oInterface, oFacet.Target.AnnotationPath, sEntitySetName);
|
|
4534
|
+
if (oEntityType[sAnnotationPath] && oEntityType[sAnnotationPath].Title && oEntityType[sAnnotationPath].Title.String) {
|
|
4535
|
+
return oEntityType[sAnnotationPath].Title.String;
|
|
4536
|
+
}
|
|
4537
|
+
// As DataPoint don't have title -> try to get property name as SmartForm title
|
|
4538
|
+
if (!oEntityType[sAnnotationPath] || !oEntityType[sAnnotationPath].Value || !oEntityType[sAnnotationPath].Value.Path || !oEntityType.property) {
|
|
4539
|
+
return;
|
|
4540
|
+
}
|
|
4541
|
+
var aProperty = oEntityType.property.filter(function(entry) {
|
|
4542
|
+
return entry.name === oEntityType[sAnnotationPath].Value.Path;
|
|
4543
|
+
});
|
|
4544
|
+
if (aProperty.length && aProperty[0]['sap:label']) {
|
|
4545
|
+
// Property name found
|
|
4546
|
+
return aProperty[0]['sap:label'];
|
|
4547
|
+
}
|
|
4548
|
+
return;
|
|
4549
|
+
}
|
|
4550
|
+
// It's Identification or FieldGroup case
|
|
4551
|
+
if (oFacet.Label && oFacet.Label.String) {
|
|
4552
|
+
return oFacet.Label.String;
|
|
4553
|
+
}
|
|
4554
|
+
if (!oFacet.Target || !oFacet.Target.AnnotationPath) {
|
|
4555
|
+
return;
|
|
4556
|
+
}
|
|
4557
|
+
if (oFacet.Target.AnnotationPath.indexOf("com.sap.vocabularies.UI.v1.Identification") > -1) {
|
|
4558
|
+
// Identification entry don't have any data which we can use as SmartForm title.
|
|
4559
|
+
return;
|
|
4560
|
+
}
|
|
4561
|
+
var { sAnnotationPath, oEntityType } = oAnnotationHelper.getModelData(oInterface, oFacet.Target.AnnotationPath, sEntitySetName);
|
|
4562
|
+
if (oEntityType[sAnnotationPath] && oEntityType[sAnnotationPath].Label && oEntityType[sAnnotationPath].Label.String) {
|
|
4563
|
+
// Use FieldGroup.Label.String as SmartForm title
|
|
4564
|
+
return oEntityType[sAnnotationPath].Label.String;
|
|
4565
|
+
}
|
|
4566
|
+
return;
|
|
4508
4567
|
}
|
|
4509
4568
|
};
|
|
4510
4569
|
oAnnotationHelper.getBlockForEditableHeaderFacet.requiresIContext = true;
|
|
@@ -4575,6 +4634,7 @@ sap.ui.define(["sap/ui/model/odata/AnnotationHelper",
|
|
|
4575
4634
|
oAnnotationHelper.getTextArrangementPath.requiresIContext = true;
|
|
4576
4635
|
oAnnotationHelper.isValueHelpTableAvailable.requiresIContext = true;
|
|
4577
4636
|
oAnnotationHelper.getTextArrangementFinalString.requiresIContext = true;
|
|
4637
|
+
oAnnotationHelper.getSmartFormTitle.requiresIContext = true;
|
|
4578
4638
|
|
|
4579
4639
|
return oAnnotationHelper;
|
|
4580
4640
|
}, /* bExport= */ true);
|
|
@@ -950,7 +950,7 @@ sap.ui.define([
|
|
|
950
950
|
* @public
|
|
951
951
|
* @extends sap.ui.core.UIComponent
|
|
952
952
|
* @author SAP SE
|
|
953
|
-
* @version 1.136.
|
|
953
|
+
* @version 1.136.5
|
|
954
954
|
* @name sap.suite.ui.generic.template.lib.AppComponent
|
|
955
955
|
*/
|
|
956
956
|
var oAppComponent = UIComponent.extend("sap.suite.ui.generic.template.lib.AppComponent", {
|
|
@@ -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)
|
|
@@ -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) {
|
|
@@ -400,6 +400,15 @@ sap.ui.define([
|
|
|
400
400
|
oSmartFilterBarVariant.customFilters.editState = oVariantDataFromAI.oEditStateFilter;
|
|
401
401
|
}
|
|
402
402
|
|
|
403
|
+
if (oSmartFilterBarVariant.semanticDates) {
|
|
404
|
+
var { Low: value1, High: value2 } = oVariantDataFromAI.aSelectOptions[0].Ranges[0];
|
|
405
|
+
var dateData = oSmartFilterBarVariant.semanticDates.Dates[0].Data;
|
|
406
|
+
|
|
407
|
+
dateData.operation = "DATERANGE";
|
|
408
|
+
dateData.value1 = value1;
|
|
409
|
+
dateData.value2 = value2 || value1;
|
|
410
|
+
}
|
|
411
|
+
|
|
403
412
|
oSmartFilterBarWrapper.setState(oSmartFilterBarVariant);
|
|
404
413
|
oSmartFilterbar.getSmartVariant() && oSmartFilterbar.getSmartVariant().currentVariantSetModified(true);
|
|
405
414
|
oSmartFilterbar.search();
|
|
@@ -413,17 +422,20 @@ sap.ui.define([
|
|
|
413
422
|
*/
|
|
414
423
|
function fnShowValueHelp(oEvent) {
|
|
415
424
|
var oSmartFilterbar = oState.oSmartFilterbar;
|
|
425
|
+
var sKey = oEvent.getParameter("key");
|
|
416
426
|
fnValueHelpPromiseResolve = oEvent.getParameter("resolve");
|
|
417
427
|
oSmartFilterbar.associateValueLists();
|
|
418
428
|
try {
|
|
419
|
-
oSmartFilterbar.
|
|
429
|
+
oSmartFilterbar.ensureLoadedValueHelp(sKey);
|
|
430
|
+
oSmartFilterbar.openValueHelpRequestForFilterItem(sKey);
|
|
420
431
|
} catch (error) {
|
|
421
|
-
oLogger.error("Value help cannot be triggered for the field " +
|
|
432
|
+
oLogger.error("Value help cannot be triggered for the field " + sKey);
|
|
422
433
|
}
|
|
423
434
|
}
|
|
424
435
|
|
|
425
436
|
function fnQueryChanged() {
|
|
426
|
-
|
|
437
|
+
var oSmartFilterbar = oState.oSmartFilterbar;
|
|
438
|
+
oSmartFilterbar.fireFilterChange();
|
|
427
439
|
}
|
|
428
440
|
// function fnUpdateEasyFilterBarTokens() {
|
|
429
441
|
// // todo : update the easy filter bar tokens with new values from the SFB VHD
|
|
@@ -432,11 +444,18 @@ sap.ui.define([
|
|
|
432
444
|
// afterFilterDataUpdate
|
|
433
445
|
var mChangeParameters = oEvent.getParameters("mParameters");
|
|
434
446
|
var aEasyFilterTokens = [];
|
|
435
|
-
var sFilterChangeProperty;
|
|
447
|
+
var sFilterChangeProperty,filterData,filterDataMap,aItems;
|
|
436
448
|
// filter change will be triggered for each filter change even if the value help is opened from SFB
|
|
437
449
|
// fnValueHelpPromiseResolve will be set only if the valeu help is opened from EasyFilter
|
|
438
450
|
if (mChangeParameters.sId === "change" && fnValueHelpPromiseResolve) {
|
|
439
451
|
sFilterChangeProperty = mChangeParameters.getParameter("filterChangeReason");
|
|
452
|
+
filterData = oEvent.getSource().getFilterData();
|
|
453
|
+
filterDataMap = new Map();
|
|
454
|
+
aItems = filterData[sFilterChangeProperty]?.items || [];
|
|
455
|
+
|
|
456
|
+
aItems.forEach(function(item) {
|
|
457
|
+
filterDataMap.set(item.key, item.text);
|
|
458
|
+
});
|
|
440
459
|
// find an efficient way to get the filters from SFB to update the EasyFilter token
|
|
441
460
|
oEvent.getSource().getFilters().forEach(function(aFilters) {
|
|
442
461
|
aFilters.aFilters && aFilters.aFilters.forEach(function(oPropertyFilterItem) {
|
|
@@ -457,7 +476,7 @@ sap.ui.define([
|
|
|
457
476
|
if (oToken.operator === oFilterItem.sOperator) {
|
|
458
477
|
oToken.selectedValues.push({
|
|
459
478
|
value: oFilterItem.oValue1,
|
|
460
|
-
description: oFilterItem.oValue1
|
|
479
|
+
description: filterDataMap.get(oFilterItem.oValue1) || oFilterItem.oValue1
|
|
461
480
|
});
|
|
462
481
|
}
|
|
463
482
|
});
|
|
@@ -465,7 +484,7 @@ sap.ui.define([
|
|
|
465
484
|
oPropertyToken.operator = oFilterItem.sOperator;
|
|
466
485
|
oPropertyToken.selectedValues.push({
|
|
467
486
|
value: oFilterItem.oValue1,
|
|
468
|
-
description: oFilterItem.oValue1
|
|
487
|
+
description: filterDataMap.get(oFilterItem.oValue1) || oFilterItem.oValue1
|
|
469
488
|
});
|
|
470
489
|
aEasyFilterTokens.push(oPropertyToken);
|
|
471
490
|
}
|
|
@@ -524,6 +543,7 @@ sap.ui.define([
|
|
|
524
543
|
|
|
525
544
|
var aFinalResponse = [];
|
|
526
545
|
var oOwnerFilterControl = oState.oSmartFilterbar;
|
|
546
|
+
var sKey = key;
|
|
527
547
|
var sEntitySet = oController.getOwnerComponent().getEntitySet();
|
|
528
548
|
var oEntityType = oTemplateUtils.oCommonUtils.getMetaModelEntityType(sEntitySet);
|
|
529
549
|
var oSFBModel = oOwnerFilterControl.getModel();
|
|
@@ -628,6 +648,12 @@ sap.ui.define([
|
|
|
628
648
|
oVHPromise.then((oValueList)=>{
|
|
629
649
|
var oValueListDefaultBinding = oValueList[""];
|
|
630
650
|
var sValueListEntity = oValueListDefaultBinding.CollectionPath.String;
|
|
651
|
+
if (Array.isArray(oValueListDefaultBinding.Parameters)) {
|
|
652
|
+
var oParameter = oValueListDefaultBinding.Parameters.find(oParam => (oParam.RecordType === "com.sap.vocabularies.Common.v1.ValueListParameterInOut" && oParam.LocalDataProperty.PropertyPath === sKey));
|
|
653
|
+
if (oParameter) {
|
|
654
|
+
key = oParameter.ValueListProperty.String;
|
|
655
|
+
}
|
|
656
|
+
}
|
|
631
657
|
//Get All Records using $search
|
|
632
658
|
aFilters.forEach((oFilter)=>{
|
|
633
659
|
oSFBModel.read("/" + sValueListEntity, {
|
|
@@ -3216,7 +3216,7 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
3216
3216
|
* @param {sap.suite.ui.generic.template.lib.AppComponent} oAppComponent The AppComponent instance
|
|
3217
3217
|
* @public
|
|
3218
3218
|
* @extends sap.ui.base.Object
|
|
3219
|
-
* @version 1.136.
|
|
3219
|
+
* @version 1.136.5
|
|
3220
3220
|
* @since 1.30.0
|
|
3221
3221
|
* @alias sap.suite.ui.generic.template.lib.NavigationController
|
|
3222
3222
|
*/
|