@sapui5/sap.fe.core 1.95.0 → 1.98.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 (207) hide show
  1. package/package.json +5 -5
  2. package/src/sap/fe/core/.library +1 -1
  3. package/src/sap/fe/core/AnnotationHelper.js +3 -3
  4. package/src/sap/fe/core/AppComponent.js +9 -44
  5. package/src/sap/fe/core/AppStateHandler.js +2 -2
  6. package/src/sap/fe/core/BaseController.js +1 -1
  7. package/src/sap/fe/core/BusyLocker.js +13 -1
  8. package/src/sap/fe/core/CommonUtils.js +129 -219
  9. package/src/sap/fe/core/ExtensionAPI.js +14 -6
  10. package/src/sap/fe/core/PageController.js +9 -35
  11. package/src/sap/fe/core/RouterProxy.js +79 -75
  12. package/src/sap/fe/core/Synchronization.js +1 -1
  13. package/src/sap/fe/core/TemplateComponent.js +16 -7
  14. package/src/sap/fe/core/TemplateModel.js +1 -1
  15. package/src/sap/fe/core/TransactionHelper.js +183 -65
  16. package/src/sap/fe/core/actions/draft.js +50 -23
  17. package/src/sap/fe/core/actions/messageHandling.js +86 -7
  18. package/src/sap/fe/core/actions/nonDraft.js +1 -1
  19. package/src/sap/fe/core/actions/operations.js +75 -33
  20. package/src/sap/fe/core/actions/sticky.js +1 -1
  21. package/src/sap/fe/core/controllerextensions/ControllerExtensionMetadata.js +1 -1
  22. package/src/sap/fe/core/controllerextensions/EditFlow.js +276 -122
  23. package/src/sap/fe/core/controllerextensions/IntentBasedNavigation.js +1 -1
  24. package/src/sap/fe/core/controllerextensions/InternalEditFlow.js +14 -6
  25. package/src/sap/fe/core/controllerextensions/InternalIntentBasedNavigation.js +90 -46
  26. package/src/sap/fe/core/controllerextensions/InternalRouting.js +234 -232
  27. package/src/sap/fe/core/controllerextensions/KPIManagement.js +539 -209
  28. package/src/sap/fe/core/controllerextensions/KPIManagement.ts +550 -213
  29. package/src/sap/fe/core/controllerextensions/MassEdit.js +79 -0
  30. package/src/sap/fe/core/controllerextensions/MessageHandler.js +227 -103
  31. package/src/sap/fe/core/controllerextensions/PageReady.js +2 -2
  32. package/src/sap/fe/core/controllerextensions/PageReady.ts +3 -7
  33. package/src/sap/fe/core/controllerextensions/Paginator.js +38 -12
  34. package/src/sap/fe/core/controllerextensions/Placeholder.js +16 -19
  35. package/src/sap/fe/core/controllerextensions/Routing.js +17 -2
  36. package/src/sap/fe/core/controllerextensions/RoutingListener.js +1 -1
  37. package/src/sap/fe/core/controllerextensions/Share.js +20 -7
  38. package/src/sap/fe/core/controllerextensions/SideEffects.js +8 -9
  39. package/src/sap/fe/core/controllerextensions/SideEffects.ts +19 -17
  40. package/src/sap/fe/core/controllerextensions/ViewState.js +54 -9
  41. package/src/sap/fe/core/controls/ActionParameterDialog.fragment.xml +40 -34
  42. package/src/sap/fe/core/controls/ActionParameterDialogValueHelp.fragment.xml +35 -0
  43. package/src/sap/fe/core/controls/CommandExecution.js +1 -1
  44. package/src/sap/fe/core/controls/ConditionalWrapper.js +1 -1
  45. package/src/sap/fe/core/controls/CustomQuickViewPage.js +110 -109
  46. package/src/sap/fe/core/controls/DataLossOrDraftDiscard/DataLossOrDraftDiscardHandler.js +7 -4
  47. package/src/sap/fe/core/controls/FieldWrapper.js +10 -4
  48. package/src/sap/fe/core/controls/FilterBar.js +1 -1
  49. package/src/sap/fe/core/controls/FormElementWrapper.js +1 -6
  50. package/src/sap/fe/core/controls/MultiValueParameterDelegate.js +45 -0
  51. package/src/sap/fe/core/controls/NonComputedVisibleKeyFieldsDialog.fragment.xml +1 -1
  52. package/src/sap/fe/core/controls/filterbar/FilterContainer.js +1 -1
  53. package/src/sap/fe/core/controls/filterbar/VisualFilter.js +1 -1
  54. package/src/sap/fe/core/controls/filterbar/VisualFilterContainer.js +1 -1
  55. package/src/sap/fe/core/controls/filterbar/utils/VisualFilterUtils.js +1 -1
  56. package/src/sap/fe/core/controls/massEdit/MassEditDialog.fragment.xml +106 -0
  57. package/src/sap/fe/core/controls/massEdit/MassEditHandlers.js +78 -0
  58. package/src/sap/fe/core/converters/ConverterContext.js +13 -1
  59. package/src/sap/fe/core/converters/ConverterContext.ts +10 -0
  60. package/src/sap/fe/core/converters/ManifestSettings.js +2 -1
  61. package/src/sap/fe/core/converters/ManifestSettings.ts +7 -1
  62. package/src/sap/fe/core/converters/ManifestWrapper.js +18 -7
  63. package/src/sap/fe/core/converters/ManifestWrapper.ts +15 -6
  64. package/src/sap/fe/core/converters/MetaModelConverter.js +920 -882
  65. package/src/sap/fe/core/converters/MetaModelConverter.ts +829 -853
  66. package/src/sap/fe/core/converters/annotations/DataField.js +54 -4
  67. package/src/sap/fe/core/converters/annotations/DataField.ts +53 -3
  68. package/src/sap/fe/core/converters/common/AnnotationConverter.js +83 -48
  69. package/src/sap/fe/core/converters/controls/Common/Action.js +15 -3
  70. package/src/sap/fe/core/converters/controls/Common/Action.ts +12 -3
  71. package/src/sap/fe/core/converters/controls/Common/Chart.js +1 -3
  72. package/src/sap/fe/core/converters/controls/Common/Chart.ts +0 -2
  73. package/src/sap/fe/core/converters/controls/Common/Form.js +68 -21
  74. package/src/sap/fe/core/converters/controls/Common/Form.ts +60 -16
  75. package/src/sap/fe/core/converters/controls/Common/KPI.js +331 -248
  76. package/src/sap/fe/core/converters/controls/Common/KPI.ts +355 -287
  77. package/src/sap/fe/core/converters/controls/Common/Table.js +426 -332
  78. package/src/sap/fe/core/converters/controls/Common/Table.ts +516 -383
  79. package/src/sap/fe/core/converters/controls/Common/table/StandardActions.js +468 -0
  80. package/src/sap/fe/core/converters/controls/Common/table/StandardActions.ts +609 -0
  81. package/src/sap/fe/core/converters/controls/ListReport/FilterBar.js +30 -13
  82. package/src/sap/fe/core/converters/controls/ListReport/FilterBar.ts +31 -12
  83. package/src/sap/fe/core/converters/controls/ListReport/VisualFilters.js +2 -2
  84. package/src/sap/fe/core/converters/controls/ListReport/VisualFilters.ts +1 -1
  85. package/src/sap/fe/core/converters/controls/ObjectPage/SubSection.js +15 -7
  86. package/src/sap/fe/core/converters/controls/ObjectPage/SubSection.ts +27 -6
  87. package/src/sap/fe/core/converters/helpers/Aggregation.js +8 -1
  88. package/src/sap/fe/core/converters/helpers/Aggregation.ts +9 -1
  89. package/src/sap/fe/core/converters/helpers/BindingHelper.js +3 -2
  90. package/src/sap/fe/core/converters/helpers/BindingHelper.ts +2 -2
  91. package/src/sap/fe/core/converters/helpers/ID.js +9 -1
  92. package/src/sap/fe/core/converters/helpers/ID.ts +6 -2
  93. package/src/sap/fe/core/converters/helpers/IssueManager.js +7 -5
  94. package/src/sap/fe/core/converters/helpers/IssueManager.ts +6 -4
  95. package/src/sap/fe/core/converters/objectPage/HeaderAndFooterAction.js +2 -2
  96. package/src/sap/fe/core/converters/objectPage/HeaderAndFooterAction.ts +1 -1
  97. package/src/sap/fe/core/converters/templates/ListReportConverter.js +34 -4
  98. package/src/sap/fe/core/converters/templates/ListReportConverter.ts +36 -7
  99. package/src/sap/fe/core/converters/templates/ObjectPageConverter.js +2 -5
  100. package/src/sap/fe/core/converters/templates/ObjectPageConverter.ts +1 -2
  101. package/src/sap/fe/core/designtime/AppComponent.designtime.js +11 -2
  102. package/src/sap/fe/core/formatters/FPMFormatter.js +1 -1
  103. package/src/sap/fe/core/formatters/FPMFormatter.ts +8 -3
  104. package/src/sap/fe/core/formatters/TableFormatter.js +27 -4
  105. package/src/sap/fe/core/formatters/TableFormatter.ts +20 -3
  106. package/src/sap/fe/core/formatters/ValueFormatter.js +30 -5
  107. package/src/sap/fe/core/formatters/ValueFormatter.ts +25 -3
  108. package/src/sap/fe/core/fpm/Component.js +2 -2
  109. package/src/sap/fe/core/helpers/AppStartupHelper.js +359 -0
  110. package/src/sap/fe/core/helpers/AppStartupHelper.ts +388 -0
  111. package/src/sap/fe/core/helpers/BindingExpression.js +199 -111
  112. package/src/sap/fe/core/helpers/BindingExpression.ts +193 -102
  113. package/src/sap/fe/core/helpers/DynamicAnnotationPathHelper.js +1 -1
  114. package/src/sap/fe/core/helpers/EditState.js +1 -1
  115. package/src/sap/fe/core/helpers/ExcelFormatHelper.js +1 -3
  116. package/src/sap/fe/core/helpers/FPMHelper.js +1 -1
  117. package/src/sap/fe/core/helpers/KeepAliveHelper.js +211 -0
  118. package/src/sap/fe/core/helpers/KeepAliveHelper.ts +202 -0
  119. package/src/sap/fe/core/helpers/KeepAliveRefreshTypes.js +32 -0
  120. package/src/sap/fe/core/helpers/KeepAliveRefreshTypes.ts +36 -0
  121. package/src/sap/fe/core/helpers/MassEditHelper.js +678 -0
  122. package/src/sap/fe/core/helpers/ModelHelper.js +64 -1
  123. package/src/sap/fe/core/helpers/PasteHelper.js +7 -1
  124. package/src/sap/fe/core/helpers/SemanticDateOperators.js +1 -1
  125. package/src/sap/fe/core/helpers/SemanticKeyHelper.js +1 -1
  126. package/src/sap/fe/core/helpers/StableIdHelper.js +2 -2
  127. package/src/sap/fe/core/helpers/StableIdHelper.ts +1 -1
  128. package/src/sap/fe/core/library.js +28 -2
  129. package/src/sap/fe/core/library.support.js +10 -4
  130. package/src/sap/fe/core/manifestMerger/ChangePageConfiguration.js +62 -0
  131. package/src/sap/fe/core/manifestMerger/ChangePageConfiguration.ts +66 -0
  132. package/src/sap/fe/core/messagebundle.properties +67 -3
  133. package/src/sap/fe/core/messagebundle_ar.properties +40 -3
  134. package/src/sap/fe/core/messagebundle_bg.properties +40 -3
  135. package/src/sap/fe/core/messagebundle_ca.properties +41 -4
  136. package/src/sap/fe/core/messagebundle_cs.properties +41 -4
  137. package/src/sap/fe/core/messagebundle_cy.properties +40 -3
  138. package/src/sap/fe/core/messagebundle_da.properties +40 -3
  139. package/src/sap/fe/core/messagebundle_de.properties +40 -3
  140. package/src/sap/fe/core/messagebundle_el.properties +40 -3
  141. package/src/sap/fe/core/messagebundle_en.properties +37 -0
  142. package/src/sap/fe/core/messagebundle_en_GB.properties +37 -0
  143. package/src/sap/fe/core/messagebundle_en_US_sappsd.properties +37 -0
  144. package/src/sap/fe/core/messagebundle_en_US_saprigi.properties +46 -2
  145. package/src/sap/fe/core/messagebundle_en_US_saptrc.properties +44 -0
  146. package/src/sap/fe/core/messagebundle_es.properties +40 -3
  147. package/src/sap/fe/core/messagebundle_es_MX.properties +41 -4
  148. package/src/sap/fe/core/messagebundle_et.properties +40 -3
  149. package/src/sap/fe/core/messagebundle_fi.properties +40 -3
  150. package/src/sap/fe/core/messagebundle_fr.properties +41 -4
  151. package/src/sap/fe/core/messagebundle_fr_CA.properties +40 -3
  152. package/src/sap/fe/core/messagebundle_hi.properties +40 -3
  153. package/src/sap/fe/core/messagebundle_hr.properties +40 -3
  154. package/src/sap/fe/core/messagebundle_hu.properties +41 -4
  155. package/src/sap/fe/core/messagebundle_id.properties +42 -5
  156. package/src/sap/fe/core/messagebundle_it.properties +40 -3
  157. package/src/sap/fe/core/messagebundle_iw.properties +40 -3
  158. package/src/sap/fe/core/messagebundle_ja.properties +49 -12
  159. package/src/sap/fe/core/messagebundle_kk.properties +40 -3
  160. package/src/sap/fe/core/messagebundle_ko.properties +40 -3
  161. package/src/sap/fe/core/messagebundle_lt.properties +40 -3
  162. package/src/sap/fe/core/messagebundle_lv.properties +40 -3
  163. package/src/sap/fe/core/messagebundle_ms.properties +40 -3
  164. package/src/sap/fe/core/messagebundle_nl.properties +40 -3
  165. package/src/sap/fe/core/messagebundle_no.properties +40 -3
  166. package/src/sap/fe/core/messagebundle_pl.properties +40 -3
  167. package/src/sap/fe/core/messagebundle_pt.properties +42 -5
  168. package/src/sap/fe/core/messagebundle_pt_PT.properties +40 -3
  169. package/src/sap/fe/core/messagebundle_ro.properties +40 -3
  170. package/src/sap/fe/core/messagebundle_ru.properties +40 -3
  171. package/src/sap/fe/core/messagebundle_sh.properties +40 -3
  172. package/src/sap/fe/core/messagebundle_sk.properties +40 -3
  173. package/src/sap/fe/core/messagebundle_sl.properties +40 -3
  174. package/src/sap/fe/core/messagebundle_sv.properties +41 -4
  175. package/src/sap/fe/core/messagebundle_th.properties +40 -3
  176. package/src/sap/fe/core/messagebundle_tr.properties +40 -3
  177. package/src/sap/fe/core/messagebundle_uk.properties +40 -3
  178. package/src/sap/fe/core/messagebundle_vi.properties +40 -3
  179. package/src/sap/fe/core/messagebundle_zh_CN.properties +40 -3
  180. package/src/sap/fe/core/messagebundle_zh_TW.properties +40 -3
  181. package/src/sap/fe/core/services/AsyncComponentServiceFactory.js +1 -1
  182. package/src/sap/fe/core/services/CacheHandlerServiceFactory.js +1 -1
  183. package/src/sap/fe/core/services/EnvironmentServiceFactory.js +4 -3
  184. package/src/sap/fe/core/services/EnvironmentServiceFactory.ts +3 -0
  185. package/src/sap/fe/core/services/NavigationServiceFactory.js +1 -1
  186. package/src/sap/fe/core/services/ResourceModelServiceFactory.js +1 -1
  187. package/src/sap/fe/core/services/RoutingServiceFactory.js +98 -328
  188. package/src/sap/fe/core/services/ShellServicesFactory.js +31 -2
  189. package/src/sap/fe/core/services/ShellServicesFactory.ts +30 -1
  190. package/src/sap/fe/core/services/SideEffectsServiceFactory.js +8 -5
  191. package/src/sap/fe/core/services/SideEffectsServiceFactory.ts +11 -6
  192. package/src/sap/fe/core/services/TemplatedViewServiceFactory.js +14 -5
  193. package/src/sap/fe/core/services/view/TemplatingErrorPage.controller.js +1 -1
  194. package/src/sap/fe/core/support/InvalidAnnotationColumnKey.support.js +38 -0
  195. package/src/sap/fe/core/support/InvalidAnnotationColumnKey.support.ts +18 -0
  196. package/src/sap/fe/core/templating/DataModelPathHelper.js +8 -37
  197. package/src/sap/fe/core/templating/DataModelPathHelper.ts +13 -33
  198. package/src/sap/fe/core/templating/DisplayModeFormatter.js +114 -0
  199. package/src/sap/fe/core/templating/DisplayModeFormatter.ts +86 -0
  200. package/src/sap/fe/core/templating/EntitySetHelper.js +86 -3
  201. package/src/sap/fe/core/templating/EntitySetHelper.ts +44 -0
  202. package/src/sap/fe/core/templating/FilterHelper.js +10 -7
  203. package/src/sap/fe/core/templating/FilterHelper.ts +8 -6
  204. package/src/sap/fe/core/templating/PropertyHelper.js +2 -2
  205. package/src/sap/fe/core/templating/PropertyHelper.ts +1 -1
  206. package/src/sap/fe/core/templating/UIFormatters.js +47 -107
  207. package/src/sap/fe/core/templating/UIFormatters.ts +76 -72
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
3
+ * (c) Copyright 2009-2022 SAP SE. All rights reserved.
4
4
  */
5
5
  sap.ui.define(["sap/ui/core/mvc/ControllerExtension", "sap/ui/core/mvc/OverrideExecution"], function(
6
6
  ControllerExtension,
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
3
+ * (c) Copyright 2009-2022 SAP SE. All rights reserved.
4
4
  */
5
5
  sap.ui.define(
6
6
  [
@@ -29,7 +29,8 @@ sap.ui.define(
29
29
 
30
30
  var ProgrammingModel = FELibrary.ProgrammingModel,
31
31
  DraftStatus = FELibrary.DraftStatus,
32
- EditMode = FELibrary.EditMode;
32
+ EditMode = FELibrary.EditMode,
33
+ CreationMode = FELibrary.CreationMode;
33
34
 
34
35
  var Extension = ControllerExtension.extend("sap.fe.core.controllerextensions.InternalEditFlow", {
35
36
  metadata: {
@@ -94,7 +95,7 @@ sap.ui.define(
94
95
 
95
96
  mParameters.keepTransientContextOnFailed = false; // currently not fully supported
96
97
  mParameters.busyMode = "None";
97
- mParameters.creationMode = "CreationRow";
98
+ mParameters.creationMode = CreationMode.CreationRow;
98
99
  mParameters.parentControl = that.getView();
99
100
  mParameters.createAtEnd = bCreateAtEnd;
100
101
 
@@ -200,6 +201,9 @@ sap.ui.define(
200
201
 
201
202
  return oResult;
202
203
  })
204
+ .catch(function(oError) {
205
+ Log.error("Error while deleting the document(s)", oError);
206
+ })
203
207
  .finally(function() {
204
208
  BusyLocker.unlock(oLockObject);
205
209
  });
@@ -344,9 +348,10 @@ sap.ui.define(
344
348
 
345
349
  // TODO: this setting and removing of contexts shouldn't be in the transaction helper at all
346
350
  // for the time being I kept it and provide the internal model context to not break something
347
- mParameters.internalModelContext = mParameters.id
348
- ? this.getView()
349
- .byId(mParameters.id)
351
+ mParameters.internalModelContext = mParameters.controlId
352
+ ? sap.ui
353
+ .getCore()
354
+ .byId(mParameters.controlId)
350
355
  .getBindingContext("internal")
351
356
  : null;
352
357
 
@@ -362,6 +367,9 @@ sap.ui.define(
362
367
  )
363
368
  .then(function() {
364
369
  that.getInternalModel().setProperty("/sessionOn", false);
370
+ })
371
+ .catch(function(oError) {
372
+ return Promise.reject(oError);
365
373
  });
366
374
  },
367
375
 
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
3
+ * (c) Copyright 2009-2022 SAP SE. All rights reserved.
4
4
  */
5
5
  sap.ui.define(
6
6
  [
@@ -14,6 +14,7 @@ sap.ui.define(
14
14
  "sap/ui/model/json/JSONModel",
15
15
  "sap/base/Log",
16
16
  "sap/fe/core/CommonUtils",
17
+ "sap/fe/core/helpers/KeepAliveHelper",
17
18
  "sap/base/util/merge"
18
19
  ],
19
20
  function(
@@ -27,6 +28,7 @@ sap.ui.define(
27
28
  JSONModel,
28
29
  Log,
29
30
  CommonUtils,
31
+ KeepAliveHelper,
30
32
  mergeObjects
31
33
  ) {
32
34
  "use strict";
@@ -75,20 +77,27 @@ sap.ui.define(
75
77
  prepareFiltersForExternalNavigation: {
76
78
  "final": true,
77
79
  "public": true
80
+ },
81
+ getOutboundParams: {
82
+ "final": true,
83
+ "public": true
78
84
  }
79
85
  }
80
86
  },
81
87
  /**
82
- * Allows for Navigation to a given Intent(SemanticObject-Action) with the provided context.
83
- * If Semantic Object mapping is provided that is also applied to the Selection Variant after adaptation by a consumer.
88
+ * Enables intent-based navigation (SemanticObject-Action) with the provided context.
89
+ * If semantic object mapping is provided, this is also applied to the selection variant after the adaptation by a consumer.
84
90
  * This takes care of removing any technical parameters and determines if an explace or inplace navigation should take place.
85
91
  *
86
- * @param {string} sSemanticObject Semantic Object for the target app
92
+ * @param {string} sSemanticObject Semantic object for the target app
87
93
  * @param {string} sAction Action for the target app
88
94
  * @param {object} [mNavigationParameters] Optional parameters to be passed to the external navigation
89
- * @param {Array|object} [mNavigationParameters.navigationContexts] Single instance or multiple instances of {@link sap.ui.model.odata.v4.Context} or alternatively an object or array of objects to be passed to intent.
90
- * if an array of contexts is passed the context is used to determine the meta path and accordingly remove the sensitive data
91
- * if an array of objects is passed the following format is expected :
95
+ * @param {Array|object} [mNavigationParameters.navigationContexts] Uses one of the following to be passed to the intent:
96
+ * a single instance of {@link sap.ui.model.odata.v4.Context}
97
+ * multiple instances of {@link sap.ui.model.odata.v4.Context}
98
+ * an object or an array of objects
99
+ * If an array of objects is passed, the context is used to determine the metaPath and to remove any sensitive data
100
+ * If an array of objects is passed, the following format ix expected:
92
101
  * {
93
102
  * data: {
94
103
  * ProductID: 7634,
@@ -96,9 +105,9 @@ sap.ui.define(
96
105
  * },
97
106
  * metaPath: "/SalesOrderManage"
98
107
  * }
99
- * The metaPath is used to remove any sensitive data.
100
108
  * @param {string | object} [mNavigationParameters.semanticObjectMapping] String representation of the SemanticObjectMapping or SemanticObjectMapping that applies to this navigation
101
- * @param {object} [mNavigationParameters.defaultRefreshStrategy] Default refresh strategy to be used in case not specified for the View.
109
+ * @param {object} [mNavigationParameters.defaultRefreshStrategy] Default refresh strategy to be used in case no refresh strategy is specified for the intent in the view.
110
+ * @param {object} [mNavigationParameters.additionalNavigationParameters] Additional navigation parameters configured in the crossAppNavigation outbound parameters.
102
111
  **/
103
112
  navigate: function(sSemanticObject, sAction, mNavigationParameters) {
104
113
  var that = this;
@@ -107,6 +116,7 @@ sap.ui.define(
107
116
  aNavigationContexts =
108
117
  vNavigationContexts && !Array.isArray(vNavigationContexts) ? [vNavigationContexts] : vNavigationContexts,
109
118
  vSemanticObjectMapping = mNavigationParameters && mNavigationParameters.semanticObjectMapping,
119
+ vOutboundParams = mNavigationParameters && mNavigationParameters.additionalNavigationParameters,
110
120
  oTargetInfo = {
111
121
  semanticObject: sSemanticObject,
112
122
  action: sAction
@@ -166,6 +176,11 @@ sap.ui.define(
166
176
  oSelectionVariant.setFilterContextUrl(sContextUrl);
167
177
  }
168
178
 
179
+ // Apply Outbound Parameters to the SV
180
+ if (vOutboundParams) {
181
+ that._applyOutboundParams(oSelectionVariant, vOutboundParams);
182
+ }
183
+
169
184
  // 4. give an opportunity for the application to influence the SelectionVariant
170
185
  oController.intentBasedNavigation.adaptNavigationContext(oSelectionVariant, oTargetInfo);
171
186
 
@@ -174,7 +189,7 @@ sap.ui.define(
174
189
  that._applySemanticObjectMappings(oSelectionVariant, vSemanticObjectMapping);
175
190
  }
176
191
 
177
- // 6. remove tehnical parameters from Selection Variant
192
+ // 6. remove technical parameters from Selection Variant
178
193
  that._removeTechnicalParameters(oSelectionVariant);
179
194
 
180
195
  // 7. check if programming model is sticky and page is editable
@@ -188,10 +203,11 @@ sap.ui.define(
188
203
  var mViewRefreshStrategies = oView.getViewData().refreshStrategyOnAppRestore || {};
189
204
  mergeObjects(mRefreshStrategies, mViewRefreshStrategies);
190
205
  }
191
- var mRefreshStrategy =
192
- mRefreshStrategies[sSemanticObject + "-" + sAction] ||
193
- mRefreshStrategies[sSemanticObject] ||
194
- mRefreshStrategies["default"];
206
+ var mRefreshStrategy = KeepAliveHelper.getRefreshStrategyForIntent(
207
+ mRefreshStrategies,
208
+ sSemanticObject,
209
+ sAction
210
+ );
195
211
  if (mRefreshStrategy) {
196
212
  oInternalModel.setProperty("/refreshStrategyOnAppRestore", mRefreshStrategy);
197
213
  }
@@ -244,6 +260,14 @@ sap.ui.define(
244
260
  * @returns {object} Object of prepared attributes for external navigation and no conflict properties.
245
261
  */
246
262
  prepareContextForExternalNavigation: function(oSemanticAttributes, oContext) {
263
+ // 1. Find all distinct keys in the object SemanticAttributes
264
+ // Store meta path for each occurence of the key
265
+ var oDistinctKeys = {},
266
+ sContextPath = oContext.getPath(),
267
+ oMetaModel = oContext.getModel().getMetaModel(),
268
+ sMetaPath = oMetaModel.getMetaPath(sContextPath),
269
+ aMetaPathParts = sMetaPath.split("/").filter(Boolean);
270
+
247
271
  function _findDistinctKeysInObject(LookUpObject, sLookUpObjectMetaPath) {
248
272
  for (var sKey in LookUpObject) {
249
273
  // null case??
@@ -261,13 +285,7 @@ sap.ui.define(
261
285
  }
262
286
  }
263
287
  }
264
- // 1. Find all distinct keys in the object SemanticAttributes
265
- // Store meta path for each occurence of the key
266
- var oDistinctKeys = {},
267
- sContextPath = oContext.getPath(),
268
- oMetaModel = oContext.getModel().getMetaModel(),
269
- sMetaPath = oMetaModel.getMetaPath(sContextPath),
270
- aMetaPathParts = sMetaPath.split("/").filter(Boolean);
288
+
271
289
  _findDistinctKeysInObject(oSemanticAttributes, sMetaPath);
272
290
 
273
291
  // 2. Determine distinct key value and add conflicted paths to semantic attributes
@@ -355,6 +373,7 @@ sap.ui.define(
355
373
  * @returns {object} Object of prepared filter conditions for external navigation and no conflict filters.
356
374
  */
357
375
  prepareFiltersForExternalNavigation: function(oFilterBarConditions, sRootPath, aParameters) {
376
+ var oDistinctKeys = {};
358
377
  function _findDistinctKeysInObject(LookUpObject, sLookUpObjectMetaPath) {
359
378
  for (var sKey in LookUpObject) {
360
379
  if (LookUpObject[sKey]) {
@@ -375,7 +394,6 @@ sap.ui.define(
375
394
  }
376
395
  }
377
396
  }
378
- var oDistinctKeys = {};
379
397
 
380
398
  _findDistinctKeysInObject(oFilterBarConditions, sRootPath);
381
399
  var oFilterConditionsWithoutConflict = {};
@@ -441,21 +459,21 @@ sap.ui.define(
441
459
  * @returns {string}
442
460
  */
443
461
  getNavigationMode: function() {
444
- return "inplace";
462
+ return undefined;
445
463
  },
446
464
  /**
447
- * Allows for Navigation to a given Intent(SemanticObject-Action) with the provided context with a dialog showing the contexts which cannot be passed
448
- * If Semantic Object mapping is provided that is also applied to the Selection Variant after adaptation by a consumer.
449
- * This takes care of removing any technical parameters and determines if an explace or inplace navigation should take place.
465
+ * Allows for navigation to a given intent (SemanticObject-Action) with the provided context, using a dialog that shows the contexts which cannot be passed
466
+ * If semantic object mapping is provided, this setting is also applied to the selection variant after adaptation by a consumer.
467
+ * This setting also removes any technical parameters and determines if an inplace or explace navigation should take place.
450
468
  *
451
- * @param {string} sSemanticObject Semantic Object for the target app
469
+ * @param {string} sSemanticObject Semantic object for the target app
452
470
  * @param {string} sAction Action for the target app
453
471
  * @param {object} [mNavigationParameters] Optional parameters to be passed to the external navigation
454
- * @param {Array|object} [mNavigationParameters.navigationContexts] Single instance or multiple instances of {@link sap.ui.model.odata.v4.Context} or alternatively an object or array of objects to be passed to intent.
455
- * @param {Array|object} [mNavigationParameters.applicableContexts] Single instance or multiple instances of {@link sap.ui.model.odata.v4.Context} or alternatively an object or array of objects to be passed to intent and for which the IBN button is enabled
456
- * @param {Array|object} [mNavigationParameters.notApplicableContexts] Single instance or multiple instances of {@link sap.ui.model.odata.v4.Context} or alternatively an object or array of objects which cannot be passed to the intent.
472
+ * @param {Array|object} [mNavigationParameters.navigationContexts] Single instance or multiple instances of {@link sap.ui.model.odata.v4.Context}, or alternatively an object or array of objects, to be passed to the intent.
473
+ * @param {Array|object} [mNavigationParameters.applicableContexts] Single instance or multiple instances of {@link sap.ui.model.odata.v4.Context}, or alternatively an object or array of objects, to be passed to the intent and for which the IBN button is enabled
474
+ * @param {Array|object} [mNavigationParameters.notApplicableContexts] Single instance or multiple instances of {@link sap.ui.model.odata.v4.Context}, or alternatively an object or array of objects, which cannot be passed to the intent.
457
475
  * if an array of contexts is passed the context is used to determine the meta path and accordingly remove the sensitive data
458
- * if an array of objects is passed the following format is expected :
476
+ * If an array of objects is passed, the following format is expected:
459
477
  * {
460
478
  * data: {
461
479
  * ProductID: 7634,
@@ -656,7 +674,7 @@ sap.ui.define(
656
674
  }
657
675
  var sSemanticObject = oOutbound.semanticObject,
658
676
  sAction = oOutbound.action,
659
- outboundParams = oOutbound.parameters && this._getOutboundParams(oOutbound.parameters);
677
+ outboundParams = oOutbound.parameters && this.getOutboundParams(oOutbound.parameters);
660
678
 
661
679
  if (mNavigationParameters) {
662
680
  var aNavParams = [];
@@ -686,13 +704,29 @@ sap.ui.define(
686
704
  },
687
705
 
688
706
  /**
689
- * Gets parameters in app descriptor outbounds.
707
+ * Method to apply outbound parameters defined in the manifest.
708
+ * @param {object} oSelectionVariant SelectionVariant consisting of a filter bar, a table, and a page context
709
+ * @param {object} vOutboundParams Outbound Properties defined in the manifest
710
+ * @returns {object} - The modified SelectionVariant with outbound parameters.
711
+ */
712
+ _applyOutboundParams: function(oSelectionVariant, vOutboundParams) {
713
+ var aParameters = Object.keys(vOutboundParams);
714
+ var aSelectProperties = oSelectionVariant.getSelectOptionsPropertyNames();
715
+ aParameters.forEach(function(key) {
716
+ if (!aSelectProperties.includes(key)) {
717
+ oSelectionVariant.addSelectOption(key, "I", "EQ", vOutboundParams[key]);
718
+ }
719
+ });
720
+ return oSelectionVariant;
721
+ },
722
+ /**
723
+ * Method to get the outbound parameters defined in the manifest.
690
724
  *
691
725
  * @function
692
726
  * @param {object} [oOutboundParams] Parameters defined in the outbounds. Only "plain" is supported
693
727
  * @returns {Array} Parameters with the key-Value pair
694
728
  **/
695
- _getOutboundParams: function(oOutboundParams) {
729
+ getOutboundParams: function(oOutboundParams) {
696
730
  var oParamsMapping = {};
697
731
  if (oOutboundParams) {
698
732
  var aParameters = Object.keys(oOutboundParams) || [];
@@ -711,13 +745,13 @@ sap.ui.define(
711
745
  },
712
746
 
713
747
  /**
714
- * Triggers an outbound navigation on Chevron Press.
748
+ * Triggers an outbound navigation when a user chooses the chevron.
715
749
  *
716
750
  * @param {object} oController
717
751
  * @param {string} sOutboundTarget Name of the outbound target (needs to be defined in the manifest)
718
- * @param {sap.ui.model.odata.v4.Context} oContext The context that contain the data for the target app
719
- * @param {string} sCreatePath Create path in case of chevron create.
720
- * @returns {Promise} Promise which is resolved once the navigation is triggered (??? maybe only once finished?)
752
+ * @param {sap.ui.model.odata.v4.Context} oContext The context that contains the data for the target app
753
+ * @param {string} sCreatePath Create path when the chevron is created.
754
+ * @returns {Promise} Promise which is resolved once the navigation is triggered
721
755
  */
722
756
 
723
757
  onChevronPressNavigateOutBound: function(oController, sOutboundTarget, oContext, sCreatePath) {
@@ -725,32 +759,42 @@ sap.ui.define(
725
759
  .getAppComponent()
726
760
  .getRoutingService()
727
761
  .getOutbounds(),
728
- oDisplayOutbound = oOutbounds[sOutboundTarget];
762
+ oDisplayOutbound = oOutbounds[sOutboundTarget],
763
+ additionalNavigationParameters;
729
764
  if (oDisplayOutbound && oDisplayOutbound.semanticObject && oDisplayOutbound.action) {
730
- var oRefreshStrategies = {},
765
+ var oRefreshStrategies = {
766
+ intents: {}
767
+ },
731
768
  oDefaultRefreshStrategy = {},
732
769
  sMetaPath;
733
770
 
734
771
  if (oContext) {
735
772
  if (oContext.isA && oContext.isA("sap.ui.model.odata.v4.Context")) {
736
- sMetaPath = CommonUtils.getMetaPathForContext(oContext);
773
+ sMetaPath = ModelHelper.getMetaPathForContext(oContext);
737
774
  oContext = [oContext];
738
775
  } else {
739
- sMetaPath = CommonUtils.getMetaPathForContext(oContext[0]);
776
+ sMetaPath = ModelHelper.getMetaPathForContext(oContext[0]);
740
777
  }
741
778
  oDefaultRefreshStrategy[sMetaPath] = "self";
742
- oRefreshStrategies["default"] = oDefaultRefreshStrategy;
779
+ oRefreshStrategies["_feDefault"] = oDefaultRefreshStrategy;
743
780
  }
744
781
 
745
782
  if (sCreatePath) {
746
783
  var sKey = oDisplayOutbound.semanticObject + "-" + oDisplayOutbound.action;
747
- oRefreshStrategies[sKey] = {};
748
- oRefreshStrategies[sKey][sCreatePath] = "self";
784
+ oRefreshStrategies.intents[sKey] = {};
785
+ oRefreshStrategies.intents[sKey][sCreatePath] = "self";
786
+ }
787
+ if (oDisplayOutbound && oDisplayOutbound.parameters) {
788
+ var oParams = oDisplayOutbound.parameters && this.getOutboundParams(oDisplayOutbound.parameters);
789
+ if (Object.keys(oParams).length > 0) {
790
+ additionalNavigationParameters = oParams;
791
+ }
749
792
  }
750
793
 
751
794
  oController._intentBasedNavigation.navigate(oDisplayOutbound.semanticObject, oDisplayOutbound.action, {
752
795
  navigationContexts: oContext,
753
- refreshStrategies: oRefreshStrategies
796
+ refreshStrategies: oRefreshStrategies,
797
+ additionalNavigationParameters: additionalNavigationParameters
754
798
  });
755
799
 
756
800
  //TODO: check why returning a promise is required