@sapui5/sap.suite.ui.generic.template 1.147.1 → 1.148.0

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.
Files changed (43) hide show
  1. package/package.json +1 -1
  2. package/src/sap/suite/ui/generic/template/.library +1 -1
  3. package/src/sap/suite/ui/generic/template/AnalyticalListPage/controller/ControllerImplementation.js +5 -3
  4. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_bg.properties +3 -3
  5. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_da.properties +3 -3
  6. package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_id.properties +2 -2
  7. package/src/sap/suite/ui/generic/template/AnalyticalListPage/manifest.json +1 -1
  8. package/src/sap/suite/ui/generic/template/Canvas/manifest.json +1 -1
  9. package/src/sap/suite/ui/generic/template/ListReport/controller/ControllerImplementation.js +32 -3
  10. package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_id.properties +1 -1
  11. package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_uk.properties +1 -1
  12. package/src/sap/suite/ui/generic/template/ListReport/manifest.json +1 -1
  13. package/src/sap/suite/ui/generic/template/ObjectPage/Component.js +4 -0
  14. package/src/sap/suite/ui/generic/template/ObjectPage/controller/ControllerImplementation.js +57 -25
  15. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n.properties +6 -0
  16. package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_en_US_saprigi.properties +4 -0
  17. package/src/sap/suite/ui/generic/template/ObjectPage/manifest.json +6 -1
  18. package/src/sap/suite/ui/generic/template/ObjectPage/templateSpecificPreparationHelper.js +35 -19
  19. package/src/sap/suite/ui/generic/template/ObjectPage/view/fragments/Footer.fragment.xml +103 -42
  20. package/src/sap/suite/ui/generic/template/QuickCreate/manifest.json +1 -1
  21. package/src/sap/suite/ui/generic/template/QuickView/manifest.json +1 -1
  22. package/src/sap/suite/ui/generic/template/fragments/EasyFilter.fragment.xml +3 -0
  23. package/src/sap/suite/ui/generic/template/genericUtilities/controlHelper.js +30 -29
  24. package/src/sap/suite/ui/generic/template/genericUtilities/controlStateWrapperFactory/SmartFilterBarWrapper.js +15 -0
  25. package/src/sap/suite/ui/generic/template/lib/AppComponent.js +1 -1
  26. package/src/sap/suite/ui/generic/template/lib/CRUDHelper.js +93 -55
  27. package/src/sap/suite/ui/generic/template/lib/CRUDManager.js +7 -0
  28. package/src/sap/suite/ui/generic/template/lib/CommonEventHandlers.js +19 -13
  29. package/src/sap/suite/ui/generic/template/lib/CommonUtils.js +4 -1
  30. package/src/sap/suite/ui/generic/template/lib/ComponentUtils.js +17 -7
  31. package/src/sap/suite/ui/generic/template/lib/StableIdDefinition.js +35 -34
  32. package/src/sap/suite/ui/generic/template/lib/ai/EasyFill/EasyFillHandler.js +853 -130
  33. package/src/sap/suite/ui/generic/template/lib/ai/EasyFill/ObjectPageSectionHandler.js +282 -0
  34. package/src/sap/suite/ui/generic/template/lib/ai/EasyFill/fragments/EasyFillDialog.fragment.xml +138 -72
  35. package/src/sap/suite/ui/generic/template/lib/ai/EasyFilterBarHandler.js +409 -22
  36. package/src/sap/suite/ui/generic/template/lib/i18n/i18n.properties +21 -0
  37. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ja.properties +6 -6
  38. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_uk.properties +3 -3
  39. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_zh_CN.properties +6 -6
  40. package/src/sap/suite/ui/generic/template/lib/i18n/i18n_zh_TW.properties +6 -6
  41. package/src/sap/suite/ui/generic/template/lib/navigation/NavigationController.js +1 -1
  42. package/src/sap/suite/ui/generic/template/library.js +25 -2
  43. package/src/sap/suite/ui/generic/template/themes/base/ObjectPage.less +14 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sapui5/sap.suite.ui.generic.template",
3
- "version": "1.147.1",
3
+ "version": "1.148.0",
4
4
  "description": "SAPUI5 Library sap.suite.ui.generic.template",
5
5
  "keywords": [
6
6
  "sapui5",
@@ -7,7 +7,7 @@
7
7
 
8
8
  (c) Copyright 2009-2015 SAP SE. All rights reserved
9
9
  </copyright>
10
- <version>1.147.1</version>
10
+ <version>1.148.0</version>
11
11
 
12
12
  <documentation>Library with generic Suite UI templates.</documentation>
13
13
 
@@ -1146,11 +1146,13 @@ sap.ui.define(["sap/fe/navigation/SelectionVariant",
1146
1146
  var iToolbarContentLength = oToolbar.getContent().length,
1147
1147
  oSegmentButton = oToolbar.getContent()[iToolbarContentLength - 1 ];
1148
1148
  if (oSegmentButton) {
1149
- oSegmentButton.addEventDelegate({
1150
- onAfterRendering : function(oEvent) {
1149
+ var oFocusDelegate = {
1150
+ onAfterRendering: function(oEvent) {
1151
1151
  oEvent.srcControl.focus();
1152
+ oEvent.srcControl.removeEventDelegate(oFocusDelegate);
1152
1153
  }
1153
- });
1154
+ };
1155
+ oSegmentButton.addEventDelegate(oFocusDelegate);
1154
1156
  }
1155
1157
  }
1156
1158
  },
@@ -104,11 +104,11 @@ CONTACT_FAX=\u0424\u0430\u043A\u0441
104
104
 
105
105
 
106
106
 
107
- CONTAINER_VIEW_TABLE=\u041A\u0430\u0442\u043E \u0442\u0430\u0431\u043B\u0438\u0446\u0430
107
+ CONTAINER_VIEW_TABLE=\u0422\u0430\u0431\u043B\u0438\u0447\u0435\u043D \u0438\u0437\u0433\u043B\u0435\u0434
108
108
 
109
- CONTAINER_VIEW_CHART=\u041A\u0430\u0442\u043E \u0434\u0438\u0430\u0433\u0440\u0430\u043C\u0430
109
+ CONTAINER_VIEW_CHART=\u0414\u0438\u0430\u0433\u0440\u0430\u043C\u0435\u043D \u0438\u0437\u0433\u043B\u0435\u0434
110
110
 
111
- CONTAINER_VIEW_CHARTTABLE=\u041A\u0430\u0442\u043E \u0434\u0438\u0430\u0433\u0440\u0430\u043C\u0430 \u0438 \u0442\u0430\u0431\u043B\u0438\u0446\u0430
111
+ CONTAINER_VIEW_CHARTTABLE=\u0418\u0437\u0433\u043B\u0435\u0434 \u043D\u0430 \u0434\u0438\u0430\u0433\u0440\u0430\u043C\u0430 \u0438 \u0442\u0430\u0431\u043B\u0438\u0446\u0430
112
112
 
113
113
  FILTER_VISUAL=\u0412\u0438\u0437\u0443\u0430\u043B\u0435\u043D \u0444\u0438\u043B\u0442\u044A\u0440
114
114
 
@@ -104,11 +104,11 @@ CONTACT_FAX=Fax
104
104
 
105
105
 
106
106
 
107
- CONTAINER_VIEW_TABLE=Tabelview
107
+ CONTAINER_VIEW_TABLE=Tabelvisning
108
108
 
109
- CONTAINER_VIEW_CHART=Diagramview
109
+ CONTAINER_VIEW_CHART=Diagramvisning
110
110
 
111
- CONTAINER_VIEW_CHARTTABLE=Diagram- og tabelview
111
+ CONTAINER_VIEW_CHARTTABLE=Diagram- og tabelvisning
112
112
 
113
113
  FILTER_VISUAL=Visuelt filter
114
114
 
@@ -63,9 +63,9 @@ VISUAL_FILTER_CHART_TYPE_Donut=Bagan Donat
63
63
 
64
64
  VISUAL_FILTER_SORTING=Pengurutan
65
65
 
66
- VISUAL_FILTER_SORTING_ASCENDING=Naik
66
+ VISUAL_FILTER_SORTING_ASCENDING=Menaik
67
67
 
68
- VISUAL_FILTER_SORTING_DESCENDING=Turun
68
+ VISUAL_FILTER_SORTING_DESCENDING=Menurun
69
69
 
70
70
  VISUAL_FILTER_LINE_CHART_TIME_LINE=Tampilkan
71
71
 
@@ -8,7 +8,7 @@
8
8
  "i18n": "i18n/i18n.properties",
9
9
  "applicationVersion": {
10
10
  "__comment": "applicationVersion oder componentversion??",
11
- "version": "1.147.1"
11
+ "version": "1.148.0"
12
12
  },
13
13
  "title": "{{TITLE}}",
14
14
  "description": "{{DESCRIPTION}}",
@@ -8,7 +8,7 @@
8
8
  "i18n": "i18n/i18n.properties",
9
9
  "applicationVersion": {
10
10
  "__comment": "applicationVersion oder componentversion??",
11
- "version": "1.147.1"
11
+ "version": "1.148.0"
12
12
  },
13
13
  "title": "Canvas",
14
14
  "description": "Canvas Page",
@@ -841,6 +841,12 @@ sap.ui.define([
841
841
  });
842
842
  },
843
843
 
844
+ onExit: function () {
845
+ if (oState?.oEasyFilterBarHandler) {
846
+ oState.oEasyFilterBarHandler.detachSmartTableStateChangeHandler();
847
+ }
848
+ },
849
+
844
850
  handlers: {
845
851
  onAfterVariantInitialise: function(oEvent) {
846
852
  oTemplateUtils.oCommonUtils.getControlStateWrapper(oEvent.getSource()).onAfterVariantInitialise();
@@ -879,6 +885,7 @@ sap.ui.define([
879
885
  oState.oIappStateHandler.onFEStartupInitialized().then(function() {
880
886
  oState.oEasyFilterBarHandler = new EasyFilterBarHandler(oState, oController, oTemplateUtils);
881
887
  oState.oEasyFilterBarHandler.initialiseEasyFilterBar();
888
+ oState.oEasyFilterBarHandler.attachSmartTableStateChangeHandler();
882
889
  oState.oSmartFilterbar.attachFilterChange(function(oEvent) {
883
890
  oState.oEasyFilterBarHandler.onFilterChange(oEvent);
884
891
  });
@@ -909,6 +916,15 @@ sap.ui.define([
909
916
  onEasyFilterTokensChanged: function(oEvent) {
910
917
  oState.oEasyFilterBarHandler.onTokensChanged(oEvent);
911
918
  },
919
+ onEasyFilterTokensChangedByUser: function(oEvent) {
920
+ oState.oEasyFilterBarHandler.onTokensChangedByUser(oEvent);
921
+ },
922
+ onEasyFilterSortersChanged: function(oEvent) {
923
+ oState.oEasyFilterBarHandler.onSortersChanged(oEvent);
924
+ },
925
+ onEasyFilterGroupLevelsChanged: function(oEvent) {
926
+ oState.oEasyFilterBarHandler.onGroupLevelsChanged(oEvent);
927
+ },
912
928
  onEasyFilterQueryChanged: function(oEvent) {
913
929
  oState.oEasyFilterBarHandler.onQueryChanged(oEvent);
914
930
  },
@@ -921,17 +937,30 @@ sap.ui.define([
921
937
  onFilterSwitch : function() {
922
938
  var oSmartFilterbar = oState.oSmartFilterbar;
923
939
  var oTempModel = oTemplateUtils.oComponentUtils.getTemplatePrivateModel();
924
- var oSmartVariant = oController.byId("template::PageVariant");
925
940
  if (oTempModel.getProperty("/listReport/filterMode") === "easyFilter") {
926
941
  oSmartFilterbar.setVisible(false);
927
- oSmartVariant.setVisible(false);
928
942
  var oTemplatePrivateModel = oTemplateUtils.oComponentUtils.getTemplatePrivateModel();
929
943
  oTemplatePrivateModel.setProperty("/listReport/firstSelection", true);
930
944
  oTemplatePrivateModel.setProperty("/generic/bDataAreShownInTable", false);
931
945
  } else {
932
946
  PXFeedback.triggerPXIntegration("toggleSwitchV2");
933
947
  oSmartFilterbar.setVisible(true);
934
- oSmartVariant.setVisible(true);
948
+ }
949
+ // Mark variant dirty if filterMode differs from what was saved in the variant.
950
+ // "Once dirty, always dirty" — we only set dirty, never unset it here.
951
+ // Unsetting is left to the standard SFB/SVM mechanisms (save, reload, etc.).
952
+ // Use the cached loaded-variant filterMode instead of getCustomFilterData(),
953
+ // which can be overwritten by intermediate beforeVariantFetch calls during
954
+ // the async Go press flow.
955
+ if (oState.oEasyFilterBarHandler) {
956
+ var sSavedMode = oState.oEasyFilterBarHandler.getLoadedVariantFilterMode();
957
+ var sCurrentMode = oTempModel.getProperty("/listReport/filterMode");
958
+ if (sCurrentMode !== sSavedMode) {
959
+ var oSmartVariant = oSmartFilterbar.getSmartVariant();
960
+ if (oSmartVariant) {
961
+ oSmartVariant.currentVariantSetModified(true);
962
+ }
963
+ }
935
964
  }
936
965
  },
937
966
  onBeforeRebindTable: function (oEvent) {
@@ -99,7 +99,7 @@ LOCKED_OBJECT_FILTER=Dikunci oleh Pengguna Lain
99
99
 
100
100
  UNSAVED_CHANGES=Perubahan Belum Disimpan
101
101
 
102
- UNSAVED_CHANGES_FILTER=Perubahan oleh Pengguna Lain yang Belum Disimpan
102
+ UNSAVED_CHANGES_FILTER=Perubahan yang Belum Disimpan oleh Pengguna Lain
103
103
 
104
104
  SHARE=Bagikan
105
105
 
@@ -64,7 +64,7 @@ OBJECT_NOT_EDITABLE=\u0426\u0435\u0439 \u043E\u0431'\u0454\u043A\u0442 \u043D\u0
64
64
  NODATA_SMARTTABLE_LR=\u0429\u043E\u0431 \u0440\u043E\u0437\u043F\u043E\u0447\u0430\u0442\u0438, \u0432\u0441\u0442\u0430\u043D\u043E\u0432\u0456\u0442\u044C \u0440\u0435\u043B\u0435\u0432\u0430\u043D\u0442.\u0444\u0456\u043B\u044C\u0442\u0440\u0438 \u0439 \u043E\u0431\u0435\u0440\u0456\u0442\u044C"\u041F\u0443\u0441\u043A".
65
65
 
66
66
  NODATA_SMARTTABLE_LR_ILLUSTRATION_TITLE=\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043E\u0442\u0440\u0438\u043C\u0430\u0454\u043C\u043E \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u0438
67
- NODATA_SMARTTABLE_LR_ILLUSTRATION_DESCRIPTION=\u0420\u043E\u0437\u043F\u043E\u0447\u043D\u0456\u0442\u044C \u0437 \u043D\u0430\u0434\u0430\u043D\u043D\u044F \u0441\u0432\u043E\u0457\u0445 \u043A\u0440\u0438\u0442\u0435\u0440\u0456\u0457\u0432 \u043F\u043E\u0448\u0443\u043A\u0443 \u0430\u0431\u043E \u0444\u0456\u043B\u044C\u0442\u0440\u0430\u0446\u0456\u0457.
67
+ NODATA_SMARTTABLE_LR_ILLUSTRATION_DESCRIPTION=\u0420\u043E\u0437\u043F\u043E\u0447\u043D\u0456\u0442\u044C \u0456\u0437 \u0437\u0430\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0441\u0432\u043E\u0457\u0445 \u043A\u0440\u0438\u0442\u0435\u0440\u0456\u0457\u0432 \u043F\u043E\u0448\u0443\u043A\u0443 \u0430\u0431\u043E \u0444\u0456\u043B\u044C\u0442\u0440\u0430\u0446\u0456\u0457.
68
68
 
69
69
  SEARCH_FILTERS_KEYBOARD_SHORTCUT_DESC=\u041F\u0443\u0441\u043A
70
70
 
@@ -8,7 +8,7 @@
8
8
  "i18n": "i18n/i18n.properties",
9
9
  "applicationVersion": {
10
10
  "__comment": "applicationVersion oder componentversion??",
11
- "version": "1.147.1"
11
+ "version": "1.148.0"
12
12
  },
13
13
  "title": "{{TITLE}}",
14
14
  "description": "{{DESCRIPTION}}",
@@ -206,6 +206,10 @@ sap.ui.define(["sap/suite/ui/generic/template/lib/TemplateAssembler",
206
206
  // If EditFlow is direct, the save and cancel moves to LR after action, unless this property is set to false
207
207
  // The default value of this property is undefined.
208
208
  "navToListOnSave": "boolean",
209
+ "legacyNavToListOnSaveBehavior": {
210
+ "type": "boolean",
211
+ "defaultValue": false
212
+ },
209
213
  "relatedAppsSettings": "object",
210
214
  createWithParameterDialog: {
211
215
  type: "object",
@@ -204,7 +204,7 @@ sap.ui.define([
204
204
  }
205
205
 
206
206
  // Implementation of Save for the draft case
207
- function onActivateImpl(bEditNextObject) {
207
+ function onActivateImpl(bEditNextObject, bNavToListOnSave) {
208
208
  oLogger.info("Activate object");
209
209
  var oActivationPromise = oTemplateUtils.oServices.oCRUDManager.activateDraftEntity();
210
210
  var oUIModel = oObjectPage.getModel("ui");
@@ -220,14 +220,12 @@ sap.ui.define([
220
220
  oTemplateUtils.oServices.oViewDependencyHelper.unbindChildren(oComponent);
221
221
  // Draft activation is a kind of cross navigation -> invalidate paginator info
222
222
 
223
- var bNavToListOnSave = oComponent.getNavToListOnSave();
224
223
  var sEditFlow = oTemplateUtils.oServices.oApplication.getEditFlowOfRoot();
225
224
  if (sEditFlow === "direct" && bEditNextObject) {
226
225
  oBase.utils.switchToNextObject();
227
226
  } else if (sEditFlow === "direct" && bNavToListOnSave !== false ) {
228
227
  oTemplateUtils.oServices.oApplication.invalidatePaginatorInfo();
229
228
  oTemplateUtils.oServices.oApplication.navigateAfterActivation(false);
230
-
231
229
  } else {
232
230
  oTemplateUtils.oServices.oApplication.invalidatePaginatorInfo();
233
231
  var oActiveContext = !bNavToListOnSave && oResponse.context;
@@ -282,7 +280,7 @@ sap.ui.define([
282
280
  }
283
281
 
284
282
  // Implementation of save for the non-draft case
285
- function onSaveImpl(bStayInEdit, bEditNextObject) {
283
+ function onSaveImpl(bStayInEdit, bEditNextObject, bNavToListOnSave) {
286
284
  var oView = oController.getView();
287
285
  var oModel = oView.getModel();
288
286
  var bIsComponentDirty = oTemplateUtils.oComponentUtils.isComponentDirty();
@@ -310,7 +308,7 @@ sap.ui.define([
310
308
  fnReturnToDisplayNonDraft();
311
309
  oViewProxy.setEditable(false);
312
310
  }
313
- performAfterSaveOperations(oContext, oView, bIsComponentDirty, mPendingChangesToContextInfo, bStayInEdit, bEditNextObject, fnSideEffectsExecuted, fnSideEffectsRejected);
311
+ performAfterSaveOperations(oContext, oView, bIsComponentDirty, mPendingChangesToContextInfo, bStayInEdit, bEditNextObject, bNavToListOnSave, fnSideEffectsExecuted, fnSideEffectsRejected);
314
312
  bSuccess = true;
315
313
  }, function(){
316
314
  oTemplateUtils.oInfoObjectHandler.executeForAllInformationObjects("smartTable", function(oInfoObject){
@@ -334,13 +332,12 @@ sap.ui.define([
334
332
  }
335
333
 
336
334
  //common flow for Save and Save-continue Edit (Non draft)
337
- function performAfterSaveOperations(oContext, oView, bSomethingWasChanged, mPendingChangesToContextInfo, bStayInEdit, bEditNextObject, fnSideEffectsExecuted, fnSideEffectsRejected) {
335
+ function performAfterSaveOperations(oContext, oView, bSomethingWasChanged, mPendingChangesToContextInfo, bStayInEdit, bEditNextObject, bNavToListOnSave, fnSideEffectsExecuted, fnSideEffectsRejected) {
338
336
  var oUIModel = oObjectPage.getModel("ui");
339
337
  var bCreateMode = oUIModel.getProperty("/createMode");
340
338
  var oComponent = oController.getOwnerComponent();
341
339
  oTemplateUtils.oServices.oViewDependencyHelper.setParentToDirty(oComponent, oComponent.getEntitySet(), 1);
342
340
  oTemplateUtils.oServices.oViewDependencyHelper.unbindChildren(oComponent);
343
- var bNavToListOnSave = oComponent.getNavToListOnSave();
344
341
  var sEditFlow = oTemplateUtils.oServices.oApplication.getEditFlowOfRoot();
345
342
  var bStayOnPage;
346
343
  if (sEditFlow === "direct"){
@@ -397,6 +394,14 @@ sap.ui.define([
397
394
  onSave("SaveAndEditNext", sButtonId);
398
395
  }
399
396
 
397
+ function onSaveAndBack(oEvent) {
398
+ var oSourceElement = oEvent.getSource();
399
+ var sButtonId = controlHelper.isMenuItem(oSourceElement)
400
+ ? StableIdHelper.getStableId({type: "ObjectPageAction", subType: "ActivateAndBackMenu"})
401
+ : StableIdHelper.getStableId({type: "ObjectPageAction", subType: "CommonAction", sAction: "saveAndBack"});
402
+ onSave("SaveAndBack", sButtonId);
403
+ }
404
+
400
405
  // Save of draft and non-draft case. Forwards either to onActivateImpl (draft) or onSaveImpl (non-draft) or onSaveAndContinueEditImpl (non draft, save and continue edit)
401
406
  // sSaveCase could either be an event object or a string.
402
407
  function onSave(vSaveCase, sBtnId) {
@@ -404,35 +409,61 @@ sap.ui.define([
404
409
  var iScenario;
405
410
  var fnImpl;
406
411
  var sButtonId;
412
+ var oComponent = oController.getOwnerComponent();
407
413
  if (oTemplateUtils.oComponentUtils.isDraftEnabled()) {
408
414
  iScenario = 1;
409
415
  if (vSaveCase === "SaveAndEditNext") {
410
- fnImpl = onActivateImpl.bind(null, true);
416
+ fnImpl = onActivateImpl.bind(null, true, oComponent.getNavToListOnSave());
411
417
  sButtonId = sBtnId;
412
418
  } else {
413
- fnImpl = onActivateImpl.bind(null, false);
414
- var oSourceElement = vSaveCase.getSource();
415
- sButtonId = controlHelper.isMenuButton(oSourceElement) ?
416
- StableIdHelper.getStableId({
417
- type: "ObjectPageAction",
418
- subType: "ActivateMenu"}) :
419
- StableIdHelper.getStableId({
420
- type: "ObjectPageAction",
421
- subType: "CommonAction",
422
- sAction: "activate"
423
- });
419
+ if (vSaveCase === "SaveAndBack") {
420
+ fnImpl = onActivateImpl.bind(null, false, true);
421
+ sButtonId = sBtnId;
422
+ } else {
423
+ var bNavToListOnSave = false;
424
+ if (oComponent.getLegacyNavToListOnSaveBehavior() || oTemplateUtils.oServices.oApplication.getEditFlowOfRoot() === "direct") {
425
+ bNavToListOnSave = oComponent.getNavToListOnSave();
426
+ }
427
+ fnImpl = onActivateImpl.bind(null, false, bNavToListOnSave);
428
+ var oSourceElement = vSaveCase && typeof vSaveCase.getSource === "function" && vSaveCase.getSource();
429
+ sButtonId = controlHelper.isMenuButton(oSourceElement) ?
430
+ StableIdHelper.getStableId({
431
+ type: "ObjectPageAction",
432
+ subType: "ActivateMenu"}) :
433
+ StableIdHelper.getStableId({
434
+ type: "ObjectPageAction",
435
+ subType: "CommonAction",
436
+ sAction: "activate"
437
+ });
438
+ }
424
439
  }
425
440
  } else {
426
441
  iScenario = 3;
427
442
  if (vSaveCase === "SaveAndContEdit") {
428
- fnImpl = onSaveImpl.bind(null, true, false);
443
+ fnImpl = onSaveImpl.bind(null, true, false, oComponent.getNavToListOnSave());
429
444
  sButtonId = sBtnId;
430
445
  } else if (vSaveCase === "SaveAndEditNext") {
431
- fnImpl = onSaveImpl.bind(null, true, true);
446
+ fnImpl = onSaveImpl.bind(null, true, true, oComponent.getNavToListOnSave());
447
+ sButtonId = sBtnId;
448
+ } else if (vSaveCase === "SaveAndBack") {
449
+ fnImpl = onSaveImpl.bind(null, false, false, true);
432
450
  sButtonId = sBtnId;
433
451
  } else {
434
- fnImpl = onSaveImpl.bind(null, false, false);
435
- sButtonId = "save";
452
+ var bNavToListOnSave = false;
453
+ if (oComponent.getLegacyNavToListOnSaveBehavior() || oTemplateUtils.oServices.oApplication.getEditFlowOfRoot() === "direct") {
454
+ bNavToListOnSave = oComponent.getNavToListOnSave();
455
+ }
456
+ fnImpl = onSaveImpl.bind(null, false, false, bNavToListOnSave);
457
+ var oSourceElement = vSaveCase && typeof vSaveCase.getSource === "function" && vSaveCase.getSource();
458
+ sButtonId = controlHelper.isMenuButton(oSourceElement) ?
459
+ StableIdHelper.getStableId({
460
+ type: "ObjectPageAction",
461
+ subType: "ActivateMenu"}) :
462
+ StableIdHelper.getStableId({
463
+ type: "ObjectPageAction",
464
+ subType: "CommonAction",
465
+ sAction: "save"
466
+ });
436
467
  }
437
468
  }
438
469
  oTemplateUtils.oCommonUtils.executeIfControlReady(function(){ // Make sure that the action is only performed if it is allowed
@@ -1493,7 +1524,7 @@ sap.ui.define([
1493
1524
  return null;
1494
1525
  }
1495
1526
  if (controlHelper.isSmartField(oControl)){ // check whether the SmartField is the correct target for focussing
1496
- return controlHelper.getSmartFieldIsFocussableForInputPromise(oControl).then(function(bIsFocussable){
1527
+ return controlHelper.getSmartFieldIsFocussableForInputPromise(oControl, true).then(function(bIsFocussable){
1497
1528
  return bIsFocussable && oControl; // If the SmartField has turned out to be focussable take it. Otherwise no need to investigate the subtree below it.
1498
1529
  });
1499
1530
  }
@@ -1553,7 +1584,7 @@ sap.ui.define([
1553
1584
  //set the focus on the control passed by application
1554
1585
  if (controlHelper.isSmartField(oFocusControl)) {
1555
1586
  // check whether the SmartField is the correct target for focussing
1556
- controlHelper.getSmartFieldIsFocussableForInputPromise(oFocusControl).then(function (bIsFocusable) {
1587
+ controlHelper.getSmartFieldIsFocussableForInputPromise(oFocusControl, true).then(function (bIsFocusable) {
1557
1588
  if (bIsFocusable) {
1558
1589
  controlHelper.focusUI5Control(oFocusControl);
1559
1590
  } else {
@@ -2701,6 +2732,7 @@ sap.ui.define([
2701
2732
  onSave: onSave,
2702
2733
  onSaveAndContinueEdit: onSaveAndContinueEdit,
2703
2734
  onSaveAndEditNext: onSaveAndEditNext,
2735
+ onSaveAndBack: onSaveAndBack,
2704
2736
  onBreadCrumbUrlPressed: onBreadCrumbUrlPressed,
2705
2737
  onDelete: onDelete,
2706
2738
  onCallActionFromToolBar: function (oEvent) {
@@ -28,6 +28,9 @@ DRAFT_VERSION=Draft
28
28
  # XBUT,30
29
29
  SAVE=Save
30
30
 
31
+ # XBUT
32
+ SAVE_AND_BACK=Save and Back
33
+
31
34
  # XBUT
32
35
  SAVE_AND_EDIT=Save and Edit
33
36
 
@@ -40,6 +43,9 @@ VALIDATE_DRAFT=Validate
40
43
  # XBUT,30
41
44
  CREATE=Create
42
45
 
46
+ # XBUT,30
47
+ CREATE_AND_BACK=Create and Back
48
+
43
49
  # XBUT, 30
44
50
  CLOSE=Close
45
51
 
@@ -17,6 +17,8 @@ DRAFT_VERSION=\u206A\u206A\u206A\u200D\u200C\u200B\u200D\u200D\u200C\u200B\u200C
17
17
 
18
18
  SAVE=\u206A\u206A\u206A\u200D\u200C\u200C\u200C\u200C\u200B\u200D\u200D\u200D\u200B\u200D\u200D\u200B\u200D\u200B\u200B\u200B\u200D\u200B\u200D\u200D\u200B\u200B\u200D\u200B\u200C\u200C\u200B\u200C\u200B\u200C\u200C\u200D\u200D\u200C\u200C\u200D\u200C\u200C\u206ASave\u206A\u206A
19
19
 
20
+ SAVE_AND_BACK=\u206A\u206A\u206A\u200D\u200D\u200B\u200C\u200B\u200D\u200B\u200C\u200C\u200C\u200D\u200D\u200C\u200C\u200D\u200B\u200C\u200B\u200B\u200B\u200B\u200C\u200B\u200D\u200C\u200B\u200C\u200C\u200C\u200D\u200D\u200B\u200B\u200B\u200C\u200C\u200B\u200B\u200B\u200D\u206ASave and Back\u206A\u206A
21
+
20
22
  SAVE_AND_EDIT=\u206A\u206A\u206A\u200D\u200D\u200D\u200B\u200C\u200C\u200D\u200C\u200D\u200C\u200C\u200B\u200D\u200D\u200B\u200D\u200D\u200B\u200C\u200B\u200C\u200C\u200C\u200C\u200B\u200C\u200B\u200C\u200D\u200D\u200D\u200D\u200B\u200D\u200D\u200C\u200C\u200D\u200D\u200D\u206ASave and Edit\u206A\u206A
21
23
 
22
24
  SAVE_AND_NEXT=\u206A\u206A\u206A\u200C\u200B\u200D\u200C\u200B\u200D\u200B\u200C\u200B\u200B\u200C\u200D\u200D\u200B\u200B\u200C\u200C\u200C\u200B\u200D\u200B\u200D\u200B\u200D\u200B\u200D\u200D\u200C\u200B\u200B\u200D\u200B\u200C\u200D\u200D\u206ASave and Next\u206A\u206A
@@ -25,6 +27,8 @@ VALIDATE_DRAFT=\u206A\u206A\u206A\u200C\u200C\u200D\u200B\u200B\u200B\u200D\u200
25
27
 
26
28
  CREATE=\u206A\u206A\u206A\u200C\u200C\u200C\u200B\u200B\u200D\u200C\u200B\u200D\u200D\u200B\u200B\u200B\u200C\u200C\u200C\u200B\u200B\u200B\u200D\u200D\u200C\u200C\u200D\u200B\u200D\u200D\u200D\u200C\u200D\u200D\u200B\u200D\u200B\u200C\u200D\u200C\u200C\u200C\u206ACreate\u206A\u206A
27
29
 
30
+ CREATE_AND_BACK=\u206A\u206A\u206A\u200C\u200D\u200D\u200D\u200B\u200C\u200D\u200D\u200D\u200C\u200C\u200C\u200B\u200B\u200D\u200D\u200D\u200B\u200C\u200C\u200C\u200B\u200D\u200C\u200D\u200C\u200D\u200B\u200C\u200B\u200B\u200D\u200C\u200C\u200C\u200B\u200D\u200B\u200B\u200C\u206ACreate and Back\u206A\u206A
31
+
28
32
  CLOSE=\u206A\u206A\u206A\u200C\u200C\u200B\u200D\u200D\u200D\u200B\u200C\u200C\u200B\u200C\u200B\u200B\u200D\u200B\u200B\u200C\u200D\u200B\u200C\u200B\u200B\u200B\u200B\u200B\u200C\u200C\u200D\u200C\u200D\u200C\u200C\u200D\u200B\u200D\u200C\u200C\u200B\u200D\u200D\u200D\u206AClose\u206A\u206A
29
33
 
30
34
  OK=\u206A\u206A\u206A\u200C\u200B\u200D\u200B\u200C\u200B\u200C\u200C\u200B\u200B\u200D\u200B\u200C\u200B\u200D\u200C\u200C\u200B\u200D\u200D\u200B\u200B\u200D\u200B\u200C\u200B\u200C\u200B\u200D\u200D\u200B\u200C\u200C\u200C\u200B\u200D\u200D\u200C\u200C\u200C\u200B\u206AOK\u206A\u206A
@@ -6,7 +6,7 @@
6
6
  "type": "component",
7
7
  "i18n": "i18n/i18n.properties",
8
8
  "applicationVersion": {
9
- "version": "1.147.1"
9
+ "version": "1.148.0"
10
10
  },
11
11
  "title": "{{TITLE}}",
12
12
  "description": "{{DESCRIPTION}}",
@@ -97,6 +97,11 @@
97
97
  "Share": {
98
98
  "ref": "sap:share"
99
99
  },
100
+ "SaveAndBack": {
101
+ "name": "SaveAndBack",
102
+ "shortcut": "Ctrl+F3",
103
+ "description": "{{SAVE_AND_BACK}}"
104
+ },
100
105
  "TableEntryAdd": {
101
106
  "name": "TableEntryAdd",
102
107
  "shortcut": "Ctrl+Enter",
@@ -1427,7 +1427,7 @@ sap.ui.define([
1427
1427
  var oEntityType = oMetaModel.getODataEntityType(oMetaModel.getODataEntitySet(sLeadingEntitySet).entityType),
1428
1428
  sSaveAndEditButtonTypeExpression = AnnotationHelper.buildEmphasizedButtonExpression(oEntityType["com.sap.vocabularies.UI.v1.Identification"]);
1429
1429
 
1430
- function fnGetPageLevelStandardActions() {
1430
+ function fnGetPageLevelStandardActions(oOpSettings) {
1431
1431
  /* Collection of standard actions available on OP at page level. Maps the logical action name to an object containing the relevant properties i.e.
1432
1432
  action => action name corresponding to the standard action
1433
1433
  callbackName => standard button's press event handler used in the command execution
@@ -1508,26 +1508,42 @@ sap.ui.define([
1508
1508
  }
1509
1509
  };
1510
1510
 
1511
- // For mobile and tablet devices, a menu button containing Save and Validate button is rendered instead of the below standard Save button. Logic WRT visibility of
1512
- // said menu button is present in the footer fragment.
1513
- if (oDevice.system.desktop || !oComponentUtils.isDraftEnabled()) {
1514
- oStandardActions.Save = {
1515
- action: "Save",
1516
- callbackName: "._templateEventHandlers.onSave",
1517
- id: StableIdHelper.getStableId({
1518
- type: "ObjectPageAction",
1519
- subType: "CommonAction",
1520
- sAction: oComponentUtils.isDraftEnabled() ? "activate" : "save"
1521
- }),
1522
- text: "{= ${ui>/createMode} ? ${i18n>CREATE} : ${i18n>SAVE}}",
1523
- type: sSaveAndEditButtonTypeExpression,
1524
- press: "cmd:Save",
1511
+ var sEditFlow = oInternalManifest
1512
+ && oInternalManifest["sap.ui.generic.app"]
1513
+ && oInternalManifest["sap.ui.generic.app"].pages
1514
+ && oInternalManifest["sap.ui.generic.app"].pages.length
1515
+ && oInternalManifest["sap.ui.generic.app"].pages[0].component.settings
1516
+ && oInternalManifest["sap.ui.generic.app"].pages[0].component.settings.editFlow;
1517
+ if (oOpSettings && oOpSettings.navToListOnSave && (sEditFlow !== "direct") && !oOpSettings.legacyNavToListOnSaveBehavior) {
1518
+ oStandardActions.SaveAndBack = {
1519
+ action: "SaveAndBack",
1520
+ callbackName: "._templateEventHandlers.onSaveAndBack",
1521
+ id: StableIdHelper.getStableId({ type: "ObjectPageAction", subType: "CommonAction", sAction: "saveAndBack" }),
1522
+ text: "{= ${ui>/createMode} ? ${i18n>CREATE_AND_BACK} : ${i18n>SAVE_AND_BACK}}",
1525
1523
  visible: "{ui>/editable}",
1526
- isStandardAction: true,
1527
- determining: true
1524
+ determining: true,
1525
+ press: "cmd:SaveAndBack"
1528
1526
  };
1529
1527
  }
1530
1528
 
1529
+ oStandardActions.Save = {
1530
+ action: "Save",
1531
+ callbackName: "._templateEventHandlers.onSave",
1532
+ id: StableIdHelper.getStableId({
1533
+ type: "ObjectPageAction",
1534
+ subType: "CommonAction",
1535
+ sAction: oComponentUtils.isDraftEnabled() ? "activate" : "save"
1536
+ }),
1537
+ text: ((sEditFlow === "direct") && (oOpSettings.navToListOnSave !== false) && !oOpSettings.legacyNavToListOnSaveBehavior)
1538
+ ? "{= ${ui>/createMode} ? ${i18n>CREATE_AND_BACK} : ${i18n>SAVE_AND_BACK}}"
1539
+ : "{= ${ui>/createMode} ? ${i18n>CREATE} : ${i18n>SAVE}}",
1540
+ type: sSaveAndEditButtonTypeExpression,
1541
+ press: "cmd:Save",
1542
+ visible: "{ui>/editable}",
1543
+ isStandardAction: true,
1544
+ determining: true
1545
+ };
1546
+
1531
1547
  return oStandardActions;
1532
1548
  }
1533
1549
 
@@ -1589,7 +1605,8 @@ sap.ui.define([
1589
1605
  return Object.create(null);
1590
1606
  }
1591
1607
 
1592
- var oPageLevelStandardActions = fnGetPageLevelStandardActions();
1608
+ var oOpSettings = oComponentUtils.getSettings();
1609
+ var oPageLevelStandardActions = fnGetPageLevelStandardActions(oOpSettings);
1593
1610
  var oControllerExtensions = oComponentUtils.getControllerExtensions();
1594
1611
  var aExtensionActionsWithoutLogicalAction = [],
1595
1612
  mCustomActionsWithCommand = Object.create(null),
@@ -1618,7 +1635,6 @@ sap.ui.define([
1618
1635
  });
1619
1636
 
1620
1637
  // handle keyboard shortcut related manifest settings for actions defined via annotations e.g. DataFieldForAction and DataFieldForIBN
1621
- var oOpSettings = oComponentUtils.getSettings();
1622
1638
  (oEntityType["com.sap.vocabularies.UI.v1.Identification"] || []).forEach(function (oDataField) {
1623
1639
  switch (oDataField.RecordType) {
1624
1640
  case "com.sap.vocabularies.UI.v1.DataFieldForAction":