@sapui5/sap.suite.ui.generic.template 1.140.0 → 1.141.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/extensionAPI/ExtensionAPI.js +4 -1
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/manifest.json +1 -1
- package/src/sap/suite/ui/generic/template/Canvas/extensionAPI/ExtensionAPI.js +4 -1
- package/src/sap/suite/ui/generic/template/Canvas/manifest.json +1 -1
- package/src/sap/suite/ui/generic/template/ListReport/extensionAPI/ExtensionAPI.js +4 -1
- package/src/sap/suite/ui/generic/template/ListReport/manifest.json +1 -1
- package/src/sap/suite/ui/generic/template/ObjectPage/annotationHelpers/AnnotationHelperActionButtons.js +24 -4
- package/src/sap/suite/ui/generic/template/ObjectPage/annotationHelpers/AnnotationHelperActionButtons.qunit.js +27 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/controller/RelatedAppsHandler.js +2 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/controller/SectionTitleHandler.js +1 -1
- package/src/sap/suite/ui/generic/template/ObjectPage/controllerFrameworkExtensions.js +285 -270
- package/src/sap/suite/ui/generic/template/ObjectPage/extensionAPI/ExtensionAPI.js +4 -1
- package/src/sap/suite/ui/generic/template/ObjectPage/manifest.json +1 -1
- package/src/sap/suite/ui/generic/template/ObjectPage/view/fragments/CRUDActionButtons.fragment.xml +31 -24
- package/src/sap/suite/ui/generic/template/ObjectPage/view/fragments/SmartForm.fragment.xml +1 -1
- package/src/sap/suite/ui/generic/template/QuickCreate/manifest.json +1 -1
- package/src/sap/suite/ui/generic/template/QuickView/manifest.json +1 -1
- package/src/sap/suite/ui/generic/template/fragments/ToolbarButton.fragment.xml +1 -0
- package/src/sap/suite/ui/generic/template/js/AnnotationHelper.js +60 -1
- package/src/sap/suite/ui/generic/template/lib/AppComponent.js +1 -1
- package/src/sap/suite/ui/generic/template/lib/CRUDManager.js +97 -14
- package/src/sap/suite/ui/generic/template/lib/CommonEventHandlers.js +4 -2
- package/src/sap/suite/ui/generic/template/lib/CommonUtils.js +21 -12
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n.properties +5 -5
- package/src/sap/suite/ui/generic/template/lib/navigation/NavigationController.js +1 -1
- package/src/sap/suite/ui/generic/template/lib/presentationControl/SmartTableHandler.js +1 -1
- package/src/sap/suite/ui/generic/template/library.js +1 -1
- package/src/sap/suite/ui/generic/template/listTemplates/controller/SmartChartController.js +5 -3
package/src/sap/suite/ui/generic/template/ObjectPage/view/fragments/CRUDActionButtons.fragment.xml
CHANGED
|
@@ -28,30 +28,37 @@
|
|
|
28
28
|
<core:CustomData key="deleteButtonId" value="{deleteAction>id}"/>
|
|
29
29
|
</customData>
|
|
30
30
|
</template:if>
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
31
|
+
<Button id="{deleteAction>id}"
|
|
32
|
+
text="{deleteAction>text}"
|
|
33
|
+
press="{deleteAction>press}"
|
|
34
|
+
fesr:press="fe:deleteItem"
|
|
35
|
+
type="Transparent"
|
|
36
|
+
ariaHasPopup="{deleteAction>ariaHasPopup}"
|
|
37
|
+
enabled="{deleteAction>enabled}"
|
|
38
|
+
visible="{parts: [
|
|
39
|
+
{path: 'listEntitySet>'},
|
|
40
|
+
{path: 'entitySet>'},
|
|
41
|
+
{path: 'objectPageTableSettings>value/inlineDelete'},
|
|
42
|
+
{path:'parameter>/isDraftEnabled'}
|
|
43
|
+
], formatter: 'AH.checkForDeleteRetriction'}">
|
|
44
|
+
<template:if test="${deleteAction>isStandardAction}">
|
|
45
|
+
<template:then>
|
|
46
|
+
<customData>
|
|
47
|
+
<core:CustomData key="Type" value="CRUDActionDelete"/>
|
|
48
|
+
</customData>
|
|
49
|
+
</template:then>
|
|
50
|
+
<template:else>
|
|
51
|
+
<template:if test="!${deleteAction>enabled}">
|
|
52
|
+
<core:CustomData key="Type" value="CRUDActionDelete"/>
|
|
53
|
+
</template:if>
|
|
54
|
+
<layoutData>
|
|
55
|
+
<OverflowToolbarLayoutData priority="{path: 'deleteAction>importance', formatter: 'AH.getToolbarButtonPriorityFromImportance'}"/>
|
|
56
|
+
</layoutData>
|
|
57
|
+
</template:else>
|
|
58
|
+
</template:if>
|
|
59
|
+
</Button>
|
|
55
60
|
</template:with>
|
|
56
61
|
</template:if>
|
|
57
62
|
</core:FragmentDefinition>
|
|
63
|
+
|
|
64
|
+
<!-- visible="{= ${path: 'objectPageTableSettings>value/inlineDelete'} ? 'false' : ${parameter>/isDraftEnabled} ? '{= ${ui>/editable} }' : '{= !${ui>/editable} }'}" -->
|
|
@@ -21,7 +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
|
+
<core:CustomData key="smartFormAriaLabel" value="{parts: [{path: 'facet>'}, {path: 'entitySet>name'}, {path: 'block>'}, {path: 'subSectionData>'}], formatter: 'AH.getSmartFormTitle'}" />
|
|
25
25
|
</sfo:customData>
|
|
26
26
|
<sfo:layout>
|
|
27
27
|
<template:if test="{= ${appSettings>/useColumnLayoutForSmartForm} !== false}">
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
<core:CustomData key="InvocationGrouping" value="{= ${dataField>InvocationGrouping/EnumMember}}"/>
|
|
23
23
|
<template:with path="dataField>Action" helper="AHModel.gotoFunctionImport" var="action">
|
|
24
24
|
<core:CustomData key="ActionFor" value="{action>sap:action-for}" />
|
|
25
|
+
<core:CustomData key="IsNavigateToInstance" value="{parts: [{path: 'parameter>/settings/sections/'}, {path: 'dataField>'}], formatter: 'AH.getNavigateToInstanceForDataFieldForAction'}" />
|
|
25
26
|
</template:with>
|
|
26
27
|
</customData>
|
|
27
28
|
</Button>
|
|
@@ -2862,6 +2862,25 @@ sap.ui.define(["sap/ui/model/odata/AnnotationHelper",
|
|
|
2862
2862
|
return sNavigationPropertyPath;
|
|
2863
2863
|
},
|
|
2864
2864
|
|
|
2865
|
+
checkForDeleteRetriction: function(oInterface, oRelatedEntitySet, oSourceEntitySet, isInline, isDraftEnabled) {
|
|
2866
|
+
var oModel = oInterface.getInterface(0).getModel();
|
|
2867
|
+
// The delete button in the table header is not required, as deletions will be handled via the inline delete button.
|
|
2868
|
+
if (isInline) {
|
|
2869
|
+
return false;
|
|
2870
|
+
}
|
|
2871
|
+
var sPath = isDraftEnabled ? "{= ${ui>/editable}" : "{= !${ui>/editable}";
|
|
2872
|
+
var oRestrictionSetViaNavRestrictions = oAnnotationHelper.handleNavigationRestrictions(oModel, oSourceEntitySet, oRelatedEntitySet, "Deletable");
|
|
2873
|
+
if (oRestrictionSetViaNavRestrictions?.Deletable) {
|
|
2874
|
+
if (oRestrictionSetViaNavRestrictions?.Deletable?.Bool === "false") {
|
|
2875
|
+
return false;
|
|
2876
|
+
}
|
|
2877
|
+
if (oRestrictionSetViaNavRestrictions?.Deletable?.Path) {
|
|
2878
|
+
sPath = sPath + " && ${" + oRestrictionSetViaNavRestrictions?.Deletable?.Path + "}";
|
|
2879
|
+
}
|
|
2880
|
+
}
|
|
2881
|
+
return sPath + "}";
|
|
2882
|
+
},
|
|
2883
|
+
|
|
2865
2884
|
areBooleanRestrictionsValidAndPossible: function (oInterface, mRestrictions, oRelatedEntitySet, sRestrictionType, sSourceEntitySet, bOnlyValidityCheck) {
|
|
2866
2885
|
var oSourceEntitySet;
|
|
2867
2886
|
var oModel = oInterface.getInterface(0).getModel();
|
|
@@ -4415,6 +4434,24 @@ sap.ui.define(["sap/ui/model/odata/AnnotationHelper",
|
|
|
4415
4434
|
return sActionPress;
|
|
4416
4435
|
},
|
|
4417
4436
|
|
|
4437
|
+
getNavigateToInstanceForDataFieldForAction: function (oSections, oDataField) {
|
|
4438
|
+
if (!oSections || !oDataField || !oDataField.Action || !oDataField.Action.String) {
|
|
4439
|
+
return undefined;
|
|
4440
|
+
}
|
|
4441
|
+
var actionKey = oDataField.Action.String.split("/")[1];
|
|
4442
|
+
for (var sectionKey in oSections) {
|
|
4443
|
+
var actions = oSections[sectionKey]?.annotatedActions;
|
|
4444
|
+
if (!actions) {
|
|
4445
|
+
continue;
|
|
4446
|
+
}
|
|
4447
|
+
var action = actions[actionKey];
|
|
4448
|
+
if (action && action.afterExecution && typeof action.afterExecution.navigateToInstance !== "undefined") {
|
|
4449
|
+
return action.afterExecution.navigateToInstance;
|
|
4450
|
+
}
|
|
4451
|
+
}
|
|
4452
|
+
return undefined;
|
|
4453
|
+
},
|
|
4454
|
+
|
|
4418
4455
|
/**
|
|
4419
4456
|
* A side effect should get triggered directly if a value is selected for a field like value help/combo box, checkbox, date picker, datetime picker
|
|
4420
4457
|
* provided a side effect is defined on this field. However this should be only done if the side effect has only one source property (the source property must
|
|
@@ -4543,10 +4580,31 @@ sap.ui.define(["sap/ui/model/odata/AnnotationHelper",
|
|
|
4543
4580
|
};
|
|
4544
4581
|
},
|
|
4545
4582
|
|
|
4546
|
-
getSmartFormTitle: function(oInterface, oFacet, sEntitySetName) {
|
|
4583
|
+
getSmartFormTitle: function(oInterface, oFacet, sEntitySetName, oBlock, oSubSectionData) {
|
|
4547
4584
|
if (!oFacet) {
|
|
4585
|
+
return oAnnotationHelper.getTitleForSectionsForms(oBlock, oSubSectionData);
|
|
4586
|
+
}
|
|
4587
|
+
return oAnnotationHelper.getTitleForHeaderForm(oInterface, oFacet, sEntitySetName);
|
|
4588
|
+
},
|
|
4589
|
+
|
|
4590
|
+
getTitleForSectionsForms: function(oBlock, oSubSectionData) {
|
|
4591
|
+
if (oSubSectionData?.annotations?.Facet?.annotation?.Facets?.length > 1
|
|
4592
|
+
|| oSubSectionData?.annotations?.Facet?.annotation?.Label?.String !== oBlock?.aggregations?.groups[0]?.annotations?.Facet?.annotation?.Label?.String
|
|
4593
|
+
) {
|
|
4594
|
+
// In case Section -> SubSection have more than one form, SmartForm will have it's titles visible
|
|
4595
|
+
// or
|
|
4596
|
+
// SubSectin title !== SmartForm title, SmartForm title will also be visible
|
|
4548
4597
|
return;
|
|
4549
4598
|
}
|
|
4599
|
+
if (oBlock?.aggregations?.groups[0]?.annotations?.Facet?.annotation?.Label?.String !== oBlock?.aggregations?.groups[0]?.targetAnnotation?.Label?.String) {
|
|
4600
|
+
// Compare SmartForm title !== FiledGroup title
|
|
4601
|
+
// if they differs -> use FiledGoup title
|
|
4602
|
+
return oBlock?.aggregations?.groups[0]?.targetAnnotation?.Label?.String;
|
|
4603
|
+
}
|
|
4604
|
+
return;
|
|
4605
|
+
},
|
|
4606
|
+
|
|
4607
|
+
getTitleForHeaderForm: function(oInterface, oFacet, sEntitySetName) {
|
|
4550
4608
|
if (oFacet.Target && oFacet.Target.AnnotationPath && oFacet.Target.AnnotationPath.indexOf("com.sap.vocabularies.UI.v1.DataPoint") > -1) {
|
|
4551
4609
|
// Process DataPoint case
|
|
4552
4610
|
var { sAnnotationPath, oEntityType } = oAnnotationHelper.getModelData(oInterface, oFacet.Target.AnnotationPath, sEntitySetName);
|
|
@@ -4612,6 +4670,7 @@ sap.ui.define(["sap/ui/model/odata/AnnotationHelper",
|
|
|
4612
4670
|
oAnnotationHelper.getProgressIndicatorTooltip.requiresIContext = true;
|
|
4613
4671
|
oAnnotationHelper.buildExpressionForProgressIndicatorCriticality.requiresIContext = true;
|
|
4614
4672
|
oAnnotationHelper.areBooleanRestrictionsValidAndPossible.requiresIContext = true;
|
|
4673
|
+
oAnnotationHelper.checkForDeleteRetriction.requiresIContext = true;
|
|
4615
4674
|
oAnnotationHelper.isRelatedEntityCreatable.requiresIContext = true;
|
|
4616
4675
|
oAnnotationHelper.isCreationAllowedByBoolAndPathRestrictions.requiresIContext = true;
|
|
4617
4676
|
oAnnotationHelper.buildBreadCrumbExpression.requiresIContext = true;
|
|
@@ -945,7 +945,7 @@ sap.ui.define([
|
|
|
945
945
|
* @public
|
|
946
946
|
* @extends sap.ui.core.UIComponent
|
|
947
947
|
* @author SAP SE
|
|
948
|
-
* @version 1.
|
|
948
|
+
* @version 1.141.1
|
|
949
949
|
* @name sap.suite.ui.generic.template.lib.AppComponent
|
|
950
950
|
*/
|
|
951
951
|
var oAppComponent = UIComponent.extend("sap.suite.ui.generic.template.lib.AppComponent", {
|
|
@@ -643,8 +643,10 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
643
643
|
}
|
|
644
644
|
}
|
|
645
645
|
|
|
646
|
-
function callActionImpl(mParameters, oState, fnResolve, fnReject){
|
|
647
|
-
|
|
646
|
+
async function callActionImpl(mParameters, oState, fnResolve, fnReject){
|
|
647
|
+
// Standardize the extension API flag access
|
|
648
|
+
const bInvokedByExtensionApi = mParameters.bInvokedByExtensionApi || false;
|
|
649
|
+
if (oBusyHelper.isBusy() && !bInvokedByExtensionApi) {
|
|
648
650
|
fnReject();
|
|
649
651
|
return;
|
|
650
652
|
}
|
|
@@ -656,6 +658,7 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
656
658
|
var aWarningIndex = [];
|
|
657
659
|
var aCurrentContexts = mParameters.contexts || [];
|
|
658
660
|
var oSourceControlHandler = mParameters.sourceControlHandler;
|
|
661
|
+
let bCallerSuppliedContexts = aCurrentContexts.length > 0;
|
|
659
662
|
// Code to support context Independent actions with parameter
|
|
660
663
|
// If the context is not present then a new context will be created.
|
|
661
664
|
if (aCurrentContexts.length === 0 && oSourceControlHandler) {
|
|
@@ -670,10 +673,12 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
670
673
|
var fnCleanUpContext = function(){
|
|
671
674
|
// remove pending request from the last change of the model
|
|
672
675
|
// actually, this should rather be done by ActionUtil itself
|
|
673
|
-
if (
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
oModel.
|
|
676
|
+
if (!bInvokedByExtensionApi){
|
|
677
|
+
if (aCurrentContexts[0]){
|
|
678
|
+
var oModel = aCurrentContexts[0].oModel;
|
|
679
|
+
if (oModel && oModel.hasPendingChanges()){
|
|
680
|
+
oModel.resetChanges();
|
|
681
|
+
}
|
|
677
682
|
}
|
|
678
683
|
}
|
|
679
684
|
};
|
|
@@ -730,14 +735,32 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
730
735
|
operationGrouping: sOperationGrouping,
|
|
731
736
|
handleFocus: oServices.controllerServices && oServices.controllerServices.getRestoreFocusHelper
|
|
732
737
|
? oServices.controllerServices.getRestoreFocusHelper().rememberFocus
|
|
733
|
-
: null
|
|
738
|
+
: null,
|
|
739
|
+
actionParameters: mParameters.urlParameters,
|
|
740
|
+
invokedByExtensionApi: bInvokedByExtensionApi
|
|
734
741
|
});
|
|
735
742
|
oActionProcessor.call(bIsStrict).then(function(oResult){
|
|
736
743
|
var oSessionParams = {};
|
|
737
744
|
oSessionParams.actionLabel = sFunctionImportLabel;
|
|
738
745
|
oServices.oApplication.setNextFocus(Function.prototype);
|
|
739
|
-
|
|
740
|
-
|
|
746
|
+
// Skip busy state management for extension API-invoked actions.
|
|
747
|
+
// This allows extension consumers to handle their own loading states and transient message processing,
|
|
748
|
+
// preventing conflicts with the framework's automatic message handling.
|
|
749
|
+
const bShouldManageBusyState = !bInvokedByExtensionApi;
|
|
750
|
+
if (bShouldManageBusyState) {
|
|
751
|
+
oBusyHelper.setBusy(oResult.executionPromise, null, oSessionParams);
|
|
752
|
+
}
|
|
753
|
+
// Handle the result of the action execution promise:
|
|
754
|
+
// On success, process the response with fnHandleResponse.
|
|
755
|
+
// On error, also process the response, then reject the outer promise if the UI is still busy (prevents unresolved busy states).
|
|
756
|
+
oResult.executionPromise.then((vResponse) => {
|
|
757
|
+
fnHandleResponse(vResponse);
|
|
758
|
+
}).catch((vResponse) => {
|
|
759
|
+
fnHandleResponse(vResponse);
|
|
760
|
+
if (oBusyHelper.isBusy() && bInvokedByExtensionApi) {
|
|
761
|
+
fnReject();
|
|
762
|
+
}
|
|
763
|
+
});
|
|
741
764
|
}, fnActionPopUpReject);
|
|
742
765
|
|
|
743
766
|
var fnHandleResponse = function(vResponse) {
|
|
@@ -767,11 +790,59 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
767
790
|
// Cache the error message to avoid duplicate display later
|
|
768
791
|
MessageUtils.cacheWarningMessage(oErrorReponse.error);
|
|
769
792
|
}
|
|
770
|
-
});
|
|
793
|
+
});
|
|
771
794
|
fnShowWarningPopupIfRequired(oParsedResult.aMessagesForUserDecision, fnDone.bind(null, aResponse));
|
|
772
795
|
};
|
|
773
796
|
var fnDone = function(aResponses){
|
|
774
797
|
var aTotalResp = aFailed.concat(aSuccess.concat(aWarning));
|
|
798
|
+
if (bInvokedByExtensionApi) {
|
|
799
|
+
// If the action is triggered via the extension API, format the response(s) in a way expected by extension consumers.
|
|
800
|
+
// Helper to build the response object for each action result.
|
|
801
|
+
const buildResponse = (oResponse) => {
|
|
802
|
+
// Check if the action was executed successfully using the action processor's status
|
|
803
|
+
if (oActionProcessor.getExecutedSuccessfully()) {
|
|
804
|
+
// Create a standardized success response object containing the essential data
|
|
805
|
+
const oBaseResponse = {
|
|
806
|
+
context: oResponse.context,
|
|
807
|
+
response: oResponse.response,
|
|
808
|
+
data: oResponse.data
|
|
809
|
+
};
|
|
810
|
+
// If the caller provided specific contexts, include the actionContext in the response.
|
|
811
|
+
if (bCallerSuppliedContexts) {
|
|
812
|
+
return {
|
|
813
|
+
actionContext: oResponse.actionContext,
|
|
814
|
+
response: oBaseResponse
|
|
815
|
+
};
|
|
816
|
+
}
|
|
817
|
+
return { response: oBaseResponse };
|
|
818
|
+
} else {
|
|
819
|
+
// Handle error scenarios, create error response structure
|
|
820
|
+
const oErrorResponse = {
|
|
821
|
+
error: {
|
|
822
|
+
response: oResponse.response
|
|
823
|
+
}
|
|
824
|
+
};
|
|
825
|
+
// If the caller provided specific contexts, include the actionContext in the response.
|
|
826
|
+
if (bCallerSuppliedContexts) {
|
|
827
|
+
return {
|
|
828
|
+
actionContext: oResponse.actionContext,
|
|
829
|
+
...oErrorResponse
|
|
830
|
+
};
|
|
831
|
+
}
|
|
832
|
+
return oErrorResponse;
|
|
833
|
+
}
|
|
834
|
+
};
|
|
835
|
+
let aFinalResponses = aTotalResp.map(buildResponse);
|
|
836
|
+
oServices.oApplication.setNextFocus(() => {
|
|
837
|
+
MessageUtils.clearWarningCache();
|
|
838
|
+
});
|
|
839
|
+
if (oActionProcessor.getExecutedSuccessfully()) {
|
|
840
|
+
fnResolve(aFinalResponses);
|
|
841
|
+
} else {
|
|
842
|
+
fnReject(aFinalResponses);
|
|
843
|
+
}
|
|
844
|
+
return;
|
|
845
|
+
}
|
|
775
846
|
if (aTotalResp.length > 1){
|
|
776
847
|
// case for multiple selection. Some of them may fail or throw warning, so show a hint if any warning occurs.
|
|
777
848
|
var bWarningOccured = aWarning.length > 0;
|
|
@@ -817,7 +888,7 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
817
888
|
oContextInfo = oServices.oApplication.registerContext(oResponseContext);
|
|
818
889
|
}
|
|
819
890
|
|
|
820
|
-
if (oResponseContext && oResponseContext !== oActionContext && oResponseContext.getPath() !== "/undefined"){
|
|
891
|
+
if (oResponseContext && oResponseContext !== oActionContext && oResponseContext.getPath() !== "/undefined" && mParameters.navigateToInstance !== "false"){
|
|
821
892
|
oServices.oApplication.setNextFocus(function(oBeforeData, fnFallback){
|
|
822
893
|
// Clear any cached error messages since the action has completed
|
|
823
894
|
MessageUtils.clearWarningCache();
|
|
@@ -825,7 +896,8 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
825
896
|
ignorePersistence: true
|
|
826
897
|
});
|
|
827
898
|
});
|
|
828
|
-
|
|
899
|
+
var bIsDeterminingAction = mParameters.actionType === "determining";
|
|
900
|
+
oServices.oApplication.navigateToDetailContextIfPossible(oResponseContext, bIsDeterminingAction, oContextInfo.bIsDraft ? 2 * (1 + oContextInfo.bIsCreate) : 1, oContextInfo);
|
|
829
901
|
} else {
|
|
830
902
|
// Restore focus, because we don't navigate out
|
|
831
903
|
oServices.oApplication.setNextFocus(function(oBeforeData, fnFallback){
|
|
@@ -852,7 +924,15 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
852
924
|
}
|
|
853
925
|
};
|
|
854
926
|
};
|
|
855
|
-
|
|
927
|
+
// Determine whether to invoke the action with strict handling (412 support)
|
|
928
|
+
// If `mParameters.bStrict` is `undefined`, assume it's an annotation-based action and enable strict mode by default (`true`). This ensures standard behaviour.
|
|
929
|
+
// If `mParameters.bStrict` is explicitly defined (e.g., via extension API or other sources),
|
|
930
|
+
// use its value to determine whether strict mode (and thus 412 support) should be enabled.
|
|
931
|
+
if (mParameters.bStrict === undefined){
|
|
932
|
+
fnInvokeAction(true, bWithWarningDialog, aCurrentContexts);
|
|
933
|
+
} else {
|
|
934
|
+
fnInvokeAction(mParameters.bStrict, bWithWarningDialog, aCurrentContexts);
|
|
935
|
+
}
|
|
856
936
|
}
|
|
857
937
|
|
|
858
938
|
/*
|
|
@@ -871,7 +951,7 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
871
951
|
* @public
|
|
872
952
|
*/
|
|
873
953
|
function callAction(mParameters, oState) {
|
|
874
|
-
var oModel = oController.getView().getModel();
|
|
954
|
+
var oModel = oController.getView().getModel() || mParameters.oModelFromExtensionApi;
|
|
875
955
|
var oMetaModel = oModel.getMetaModel();
|
|
876
956
|
var oComponent = oController.getOwnerComponent();
|
|
877
957
|
var sEntitySet = oComponent.getEntitySet();
|
|
@@ -882,6 +962,9 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
882
962
|
var oEntityType = oMetaModel.getODataEntityType(sEntityType);
|
|
883
963
|
mParameters.functionImport = oFunctionImport;
|
|
884
964
|
mParameters.entityType = oEntityType;
|
|
965
|
+
if (!mParameters?.label && oFunctionImport?.["name"]) {
|
|
966
|
+
mParameters.label = oFunctionImport["name"];
|
|
967
|
+
}
|
|
885
968
|
if (sFunctionImportReturnType === sEntityType) {
|
|
886
969
|
var oAppComponent = oComponent.getAppComponent();
|
|
887
970
|
var oOPComponentUtils = oServices.oApplication.getComponentUtilsIfLoaded(sEntitySet); // oOPComponentUtils would differ from oComponentUtils if this instance belongs to the root page
|
|
@@ -2177,7 +2177,8 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
2177
2177
|
sourceControl: oSourceControl,
|
|
2178
2178
|
label: oCustomData.Label,
|
|
2179
2179
|
operationGrouping: oCustomData.InvocationGrouping,
|
|
2180
|
-
skipProperties: oSkipProperties
|
|
2180
|
+
skipProperties: oSkipProperties,
|
|
2181
|
+
navigateToInstance: oCustomData.IsNavigateToInstance
|
|
2181
2182
|
}, oState, sEntitySet);
|
|
2182
2183
|
}
|
|
2183
2184
|
}
|
|
@@ -2303,7 +2304,8 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
2303
2304
|
sourceControlHandler: oServices.oPresentationControlHandlerFactory.getPresentationControlHandler(oCommonUtils.getOwnerPresentationControl(oControl)),
|
|
2304
2305
|
label: mParams.label,
|
|
2305
2306
|
operationGrouping: mParams.operationGrouping,
|
|
2306
|
-
skipProperties: mParams.skipProperties
|
|
2307
|
+
skipProperties: mParams.skipProperties,
|
|
2308
|
+
navigateToInstance: mParams.navigateToInstance
|
|
2307
2309
|
}, oState).then(function(aResponses) {
|
|
2308
2310
|
if (aResponses) {
|
|
2309
2311
|
aResponses.some(function(oResponse){
|
|
@@ -1511,13 +1511,19 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
1511
1511
|
* @param {map} [mUrlParameters] The URL parameters (name-value pairs) for the function or action. This is not in oSettings for backward compatibility
|
|
1512
1512
|
* @param {object} oSettings Parameters that are set for invoking Application controller's invokeActions method
|
|
1513
1513
|
* @param {boolean} oSettings.bInvocationGroupingChangeSet Determines whether the common or unique changeset gets sent in batch
|
|
1514
|
+
* @param {string} [oSettings.sLabel=""] Optional label for the Function Import.
|
|
1515
|
+
* * This label is only used when action is invoked in strict mode and HTTP 412 (Precondition Failed) handling is required.
|
|
1516
|
+
* * If not provided, the Function Import name is used as the default label.
|
|
1517
|
+
* @param {boolean} [oSettings.bStrict=false] Optional flag to indicate whether the action should be invoked in strict mode. Defaults to <code>false</code>.
|
|
1514
1518
|
* @returns {Promise} A <code>Promise</code> for asynchronous execution of the action, resolving to the same result as the <code>Promise</code>
|
|
1515
|
-
* returned from {@link sap.ui.generic.app.ApplicationController}
|
|
1516
1519
|
* @throws {Error} Throws an error if the OData function import does not exist or the action input parameters are invalid
|
|
1517
1520
|
* @public
|
|
1518
1521
|
*/
|
|
1519
1522
|
function fnInvokeActionsForExtensionAPI (sFunctionName, vContext, mUrlParameters, oSettings, oState) {
|
|
1520
|
-
var aContext
|
|
1523
|
+
var aContext;
|
|
1524
|
+
let sOperationGrouping = oSettings?.bInvocationGroupingChangeSet ? "com.sap.vocabularies.UI.v1.OperationGroupingType/ChangeSet" : "";
|
|
1525
|
+
let sLabel = oSettings?.sLabel ?? "";
|
|
1526
|
+
let bStrict = oSettings?.bStrict ?? false;
|
|
1521
1527
|
if (!vContext) {
|
|
1522
1528
|
aContext = [];
|
|
1523
1529
|
} else if (Array.isArray(vContext)) {
|
|
@@ -1525,17 +1531,19 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
1525
1531
|
} else {
|
|
1526
1532
|
aContext = [ vContext ];
|
|
1527
1533
|
}
|
|
1528
|
-
if (mUrlParameters) {
|
|
1529
|
-
mParameters.urlParameters = mUrlParameters;
|
|
1530
|
-
}
|
|
1531
|
-
if (oSettings && oSettings.bInvocationGroupingChangeSet) {
|
|
1532
|
-
mParameters.operationGrouping = "com.sap.vocabularies.UI.v1.OperationGroupingType/ChangeSet";
|
|
1533
|
-
}
|
|
1534
|
-
mParameters.triggerChanges = oComponentUtils.isDraftEnabled();
|
|
1535
1534
|
//Execute floorplan specific logic before invokeaction is executed
|
|
1536
1535
|
oComponentUtils.executeBeforeInvokeActionFromExtensionAPI(oState);
|
|
1537
|
-
|
|
1538
|
-
|
|
1536
|
+
const oPromise = oServices.oCRUDManager.callAction({
|
|
1537
|
+
"contexts": aContext,
|
|
1538
|
+
"functionImportPath": sFunctionName,
|
|
1539
|
+
"label": sLabel,
|
|
1540
|
+
"operationGrouping": sOperationGrouping,
|
|
1541
|
+
"skipProperties": {},
|
|
1542
|
+
"urlParameters": mUrlParameters,
|
|
1543
|
+
"bStrict": bStrict,
|
|
1544
|
+
"bInvokedByExtensionApi": true,
|
|
1545
|
+
"oModelFromExtensionApi": oController.getOwnerComponent()?.getModel()
|
|
1546
|
+
}, oState);
|
|
1539
1547
|
if (oSettings && oSettings.bSetBusy) {
|
|
1540
1548
|
oComponentUtils.getBusyHelper().setBusy(oPromise);
|
|
1541
1549
|
}
|
|
@@ -1999,7 +2007,8 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
1999
2007
|
contexts: aContexts,
|
|
2000
2008
|
sourceControlHandler: oPresentationControlHandler,
|
|
2001
2009
|
label: oCustomData.Label,
|
|
2002
|
-
operationGrouping: ""
|
|
2010
|
+
operationGrouping: "",
|
|
2011
|
+
actionType: oCustomData.ActionType
|
|
2003
2012
|
}).then(function(aResponses) {
|
|
2004
2013
|
if (aResponses && aResponses.length > 0) {
|
|
2005
2014
|
var oResponse = aResponses[0];
|
|
@@ -713,7 +713,7 @@ EASY_FILL_SECOND_LABEL_TEXT = Use data sources like spreadsheets, notes, and ema
|
|
|
713
713
|
EASY_FILL_TEXTAREA_PLACEHOLDER = Provide the required information using data sources or by typing
|
|
714
714
|
|
|
715
715
|
# XTXT: EasyFill initial Illustration title
|
|
716
|
-
EASY_FILL_ILLUSTRATION_TITLE_INITIAL = Let
|
|
716
|
+
EASY_FILL_ILLUSTRATION_TITLE_INITIAL = Let\u2019s fill in some fields
|
|
717
717
|
|
|
718
718
|
# XTXT: EasyFill initial Illustration description
|
|
719
719
|
EASY_FILL_ILLUSTRATION_DESCRIPTION_INITIAL = Start by providing the required information to see the proposed results.
|
|
@@ -722,13 +722,13 @@ EASY_FILL_ILLUSTRATION_DESCRIPTION_INITIAL = Start by providing the required inf
|
|
|
722
722
|
EASY_FILL_ILLUSTRATION_TITLE_NO_ENTRIES = No fields filled in
|
|
723
723
|
|
|
724
724
|
# XTXT: EasyFill no entries Illustration description
|
|
725
|
-
EASY_FILL_ILLUSTRATION_DESCRIPTION_NO_ENTRIES = We couldn
|
|
725
|
+
EASY_FILL_ILLUSTRATION_DESCRIPTION_NO_ENTRIES = We couldn\u2019t match your query to any of the existing fields.
|
|
726
726
|
|
|
727
727
|
# XTXT: EasyFill error Illustration title
|
|
728
728
|
EASY_FILL_ILLUSTRATION_TITLE_ERROR = Unable to fill in the fields
|
|
729
729
|
|
|
730
730
|
# XTXT: EasyFill error Illustration description
|
|
731
|
-
EASY_FILL_ILLUSTRATION_DESCRIPTION_ERROR =It looks like an error occurred. Try again and if that doesn
|
|
731
|
+
EASY_FILL_ILLUSTRATION_DESCRIPTION_ERROR =It looks like an error occurred. Try again and if that doesn\u2019t help, check with your administrator.
|
|
732
732
|
|
|
733
733
|
# XTXT: EasyFill save
|
|
734
734
|
EASY_FILL_SAVE = Save
|
|
@@ -746,7 +746,7 @@ EASY_FILL_FILLED_FIELDS = Filled Fields
|
|
|
746
746
|
EASY_FILL_UNABLE_FILL = Unable to Fill
|
|
747
747
|
|
|
748
748
|
# XTXT: EasyFill warning message
|
|
749
|
-
EASY_FILL_WARNING_MESSAGE = The fields couldn
|
|
749
|
+
EASY_FILL_WARNING_MESSAGE = The fields couldn\u2019t be filled in, for example because they are read-only fields or because you\u2019re not authorized to change them.
|
|
750
750
|
|
|
751
751
|
# XTXT: EasyFill proposed values
|
|
752
752
|
EASY_FILL_PROPOSED_VALUES = Proposed Values
|
|
@@ -758,7 +758,7 @@ EASY_FILL_PREVIOUS_VALUES = Previous Values
|
|
|
758
758
|
EASY_FILL_POPOVER_AI_TEXT_1=The content was partially or fully generated by artificial intelligence(AI) technologies.
|
|
759
759
|
|
|
760
760
|
# XTXT: EasyFill AINotice link popover text
|
|
761
|
-
EASY_FILL_POPOVER_AI_TEXT_2=The AI-generated content may contain inaccuracies due to using multiple information sources.Verify results before use.
|
|
761
|
+
EASY_FILL_POPOVER_AI_TEXT_2=The AI-generated content may contain inaccuracies due to using multiple information sources. Verify results before use.
|
|
762
762
|
|
|
763
763
|
# XTXT: EasyFill Popover title
|
|
764
764
|
EASY_FILL_POPOVER_AI_TITLE=Created with AI
|
|
@@ -3223,7 +3223,7 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
3223
3223
|
* @param {sap.suite.ui.generic.template.lib.AppComponent} oAppComponent The AppComponent instance
|
|
3224
3224
|
* @public
|
|
3225
3225
|
* @extends sap.ui.base.Object
|
|
3226
|
-
* @version 1.
|
|
3226
|
+
* @version 1.141.1
|
|
3227
3227
|
* @since 1.30.0
|
|
3228
3228
|
* @alias sap.suite.ui.generic.template.lib.NavigationController
|
|
3229
3229
|
*/
|
|
@@ -582,7 +582,7 @@ sap.ui.define([
|
|
|
582
582
|
const getFieldProps = function (sField) {
|
|
583
583
|
return {
|
|
584
584
|
"sProperty": sField,
|
|
585
|
-
"sLabel": mPropertyByFieldName[sField]["sap:label"],
|
|
585
|
+
"sLabel": (mPropertyByFieldName[sField]["com.sap.vocabularies.Common.v1.Label"] || "").String || mPropertyByFieldName[sField]["sap:label"] || "",
|
|
586
586
|
"sValue": oItemContext.getProperty(sField),
|
|
587
587
|
"bHidden": !aVisibleColumns.has(sField)
|
|
588
588
|
};
|
|
@@ -3,8 +3,9 @@ sap.ui.define(["sap/ui/core/mvc/Controller",
|
|
|
3
3
|
"sap/suite/ui/generic/template/genericUtilities/FeLogger",
|
|
4
4
|
"sap/base/util/merge",
|
|
5
5
|
"sap/base/util/deepExtend",
|
|
6
|
-
"sap/ui/Device"
|
|
7
|
-
|
|
6
|
+
"sap/ui/Device",
|
|
7
|
+
"sap/ui/core/theming/Parameters"
|
|
8
|
+
], function(Controller, listUtils, FeLogger, merge, deepExtend, Device, ThemingParameters) {
|
|
8
9
|
"use strict";
|
|
9
10
|
var oLogger = new FeLogger("listTemplates.controller.SmartChartController").getLogger();
|
|
10
11
|
var oVizProperties = {};
|
|
@@ -99,6 +100,7 @@ sap.ui.define(["sap/ui/core/mvc/Controller",
|
|
|
99
100
|
var oComponent = this.oState.oController.getOwnerComponent();
|
|
100
101
|
var bShowDatalabel = oComponent && oComponent.getChartSettings() && oComponent.getChartSettings().showDataLabel;
|
|
101
102
|
bEnableStableColors = oComponent && oComponent.getChartSettings() && oComponent.getChartSettings().enableStableColors;
|
|
103
|
+
var sColor = ThemingParameters.get("sapTextColor");
|
|
102
104
|
oVizProperties = {
|
|
103
105
|
"legendGroup":{
|
|
104
106
|
"layout":{
|
|
@@ -111,7 +113,7 @@ sap.ui.define(["sap/ui/core/mvc/Controller",
|
|
|
111
113
|
},
|
|
112
114
|
"title": {
|
|
113
115
|
"style": {
|
|
114
|
-
"color":
|
|
116
|
+
"color": sColor
|
|
115
117
|
}
|
|
116
118
|
}
|
|
117
119
|
}
|