@sapui5/sap.fe.core 1.97.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 (186) hide show
  1. package/package.json +4 -4
  2. package/src/sap/fe/core/.library +1 -1
  3. package/src/sap/fe/core/AnnotationHelper.js +1 -1
  4. package/src/sap/fe/core/AppComponent.js +4 -2
  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 +1 -1
  8. package/src/sap/fe/core/CommonUtils.js +36 -16
  9. package/src/sap/fe/core/ExtensionAPI.js +14 -6
  10. package/src/sap/fe/core/PageController.js +9 -3
  11. package/src/sap/fe/core/RouterProxy.js +27 -11
  12. package/src/sap/fe/core/Synchronization.js +1 -1
  13. package/src/sap/fe/core/TemplateComponent.js +14 -5
  14. package/src/sap/fe/core/TemplateModel.js +1 -1
  15. package/src/sap/fe/core/TransactionHelper.js +125 -40
  16. package/src/sap/fe/core/actions/draft.js +50 -23
  17. package/src/sap/fe/core/actions/messageHandling.js +12 -9
  18. package/src/sap/fe/core/actions/nonDraft.js +1 -1
  19. package/src/sap/fe/core/actions/operations.js +13 -9
  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 +197 -71
  23. package/src/sap/fe/core/controllerextensions/IntentBasedNavigation.js +1 -1
  24. package/src/sap/fe/core/controllerextensions/InternalEditFlow.js +10 -3
  25. package/src/sap/fe/core/controllerextensions/InternalIntentBasedNavigation.js +20 -18
  26. package/src/sap/fe/core/controllerextensions/InternalRouting.js +40 -9
  27. package/src/sap/fe/core/controllerextensions/KPIManagement.js +114 -25
  28. package/src/sap/fe/core/controllerextensions/KPIManagement.ts +112 -24
  29. package/src/sap/fe/core/controllerextensions/MassEdit.js +79 -0
  30. package/src/sap/fe/core/controllerextensions/MessageHandler.js +6 -2
  31. package/src/sap/fe/core/controllerextensions/PageReady.js +1 -1
  32. package/src/sap/fe/core/controllerextensions/Paginator.js +35 -8
  33. package/src/sap/fe/core/controllerextensions/Placeholder.js +6 -3
  34. package/src/sap/fe/core/controllerextensions/Routing.js +17 -2
  35. package/src/sap/fe/core/controllerextensions/RoutingListener.js +1 -1
  36. package/src/sap/fe/core/controllerextensions/Share.js +20 -7
  37. package/src/sap/fe/core/controllerextensions/SideEffects.js +7 -7
  38. package/src/sap/fe/core/controllerextensions/SideEffects.ts +6 -5
  39. package/src/sap/fe/core/controllerextensions/ViewState.js +1 -1
  40. package/src/sap/fe/core/controls/ActionParameterDialog.fragment.xml +2 -1
  41. package/src/sap/fe/core/controls/CommandExecution.js +1 -1
  42. package/src/sap/fe/core/controls/ConditionalWrapper.js +1 -1
  43. package/src/sap/fe/core/controls/CustomQuickViewPage.js +1 -1
  44. package/src/sap/fe/core/controls/DataLossOrDraftDiscard/DataLossOrDraftDiscardHandler.js +7 -4
  45. package/src/sap/fe/core/controls/FieldWrapper.js +10 -4
  46. package/src/sap/fe/core/controls/FilterBar.js +1 -1
  47. package/src/sap/fe/core/controls/FormElementWrapper.js +1 -6
  48. package/src/sap/fe/core/controls/MultiValueParameterDelegate.js +1 -1
  49. package/src/sap/fe/core/controls/NonComputedVisibleKeyFieldsDialog.fragment.xml +1 -1
  50. package/src/sap/fe/core/controls/filterbar/FilterContainer.js +1 -1
  51. package/src/sap/fe/core/controls/filterbar/VisualFilter.js +1 -1
  52. package/src/sap/fe/core/controls/filterbar/VisualFilterContainer.js +1 -1
  53. package/src/sap/fe/core/controls/filterbar/utils/VisualFilterUtils.js +1 -1
  54. package/src/sap/fe/core/controls/massEdit/MassEditDialog.fragment.xml +106 -0
  55. package/src/sap/fe/core/controls/massEdit/MassEditHandlers.js +78 -0
  56. package/src/sap/fe/core/converters/ConverterContext.js +13 -1
  57. package/src/sap/fe/core/converters/ConverterContext.ts +10 -0
  58. package/src/sap/fe/core/converters/ManifestSettings.js +1 -1
  59. package/src/sap/fe/core/converters/ManifestSettings.ts +3 -0
  60. package/src/sap/fe/core/converters/ManifestWrapper.js +18 -7
  61. package/src/sap/fe/core/converters/ManifestWrapper.ts +15 -6
  62. package/src/sap/fe/core/converters/MetaModelConverter.js +62 -4
  63. package/src/sap/fe/core/converters/MetaModelConverter.ts +60 -4
  64. package/src/sap/fe/core/converters/annotations/DataField.js +3 -3
  65. package/src/sap/fe/core/converters/annotations/DataField.ts +1 -1
  66. package/src/sap/fe/core/converters/common/AnnotationConverter.js +18 -10
  67. package/src/sap/fe/core/converters/controls/Common/Action.js +10 -1
  68. package/src/sap/fe/core/converters/controls/Common/Action.ts +6 -0
  69. package/src/sap/fe/core/converters/controls/Common/Form.js +17 -9
  70. package/src/sap/fe/core/converters/controls/Common/Form.ts +9 -3
  71. package/src/sap/fe/core/converters/controls/Common/KPI.js +69 -4
  72. package/src/sap/fe/core/converters/controls/Common/KPI.ts +72 -0
  73. package/src/sap/fe/core/converters/controls/Common/Table.js +172 -284
  74. package/src/sap/fe/core/converters/controls/Common/Table.ts +228 -348
  75. package/src/sap/fe/core/converters/controls/Common/table/StandardActions.js +468 -0
  76. package/src/sap/fe/core/converters/controls/Common/table/StandardActions.ts +609 -0
  77. package/src/sap/fe/core/converters/controls/ListReport/FilterBar.js +30 -13
  78. package/src/sap/fe/core/converters/controls/ListReport/FilterBar.ts +31 -12
  79. package/src/sap/fe/core/converters/controls/ListReport/VisualFilters.js +2 -2
  80. package/src/sap/fe/core/converters/controls/ListReport/VisualFilters.ts +1 -1
  81. package/src/sap/fe/core/converters/controls/ObjectPage/SubSection.js +14 -6
  82. package/src/sap/fe/core/converters/controls/ObjectPage/SubSection.ts +26 -5
  83. package/src/sap/fe/core/converters/helpers/Aggregation.js +8 -1
  84. package/src/sap/fe/core/converters/helpers/Aggregation.ts +9 -1
  85. package/src/sap/fe/core/converters/helpers/IssueManager.js +4 -1
  86. package/src/sap/fe/core/converters/helpers/IssueManager.ts +3 -0
  87. package/src/sap/fe/core/designtime/AppComponent.designtime.js +9 -1
  88. package/src/sap/fe/core/formatters/ValueFormatter.js +30 -5
  89. package/src/sap/fe/core/formatters/ValueFormatter.ts +25 -3
  90. package/src/sap/fe/core/fpm/Component.js +1 -1
  91. package/src/sap/fe/core/helpers/AppStartupHelper.js +359 -0
  92. package/src/sap/fe/core/helpers/AppStartupHelper.ts +388 -0
  93. package/src/sap/fe/core/helpers/BindingExpression.js +199 -111
  94. package/src/sap/fe/core/helpers/BindingExpression.ts +193 -102
  95. package/src/sap/fe/core/helpers/DynamicAnnotationPathHelper.js +1 -1
  96. package/src/sap/fe/core/helpers/EditState.js +1 -1
  97. package/src/sap/fe/core/helpers/ExcelFormatHelper.js +1 -1
  98. package/src/sap/fe/core/helpers/FPMHelper.js +1 -1
  99. package/src/sap/fe/core/helpers/KeepAliveHelper.js +2 -2
  100. package/src/sap/fe/core/helpers/KeepAliveHelper.ts +1 -1
  101. package/src/sap/fe/core/helpers/MassEditHelper.js +678 -0
  102. package/src/sap/fe/core/helpers/ModelHelper.js +1 -1
  103. package/src/sap/fe/core/helpers/PasteHelper.js +1 -1
  104. package/src/sap/fe/core/helpers/SemanticDateOperators.js +1 -1
  105. package/src/sap/fe/core/helpers/SemanticKeyHelper.js +1 -1
  106. package/src/sap/fe/core/helpers/StableIdHelper.js +1 -1
  107. package/src/sap/fe/core/library.js +28 -2
  108. package/src/sap/fe/core/library.support.js +10 -4
  109. package/src/sap/fe/core/manifestMerger/ChangePageConfiguration.js +62 -0
  110. package/src/sap/fe/core/manifestMerger/ChangePageConfiguration.ts +66 -0
  111. package/src/sap/fe/core/messagebundle.properties +40 -5
  112. package/src/sap/fe/core/messagebundle_ar.properties +24 -2
  113. package/src/sap/fe/core/messagebundle_bg.properties +24 -2
  114. package/src/sap/fe/core/messagebundle_ca.properties +24 -2
  115. package/src/sap/fe/core/messagebundle_cs.properties +25 -3
  116. package/src/sap/fe/core/messagebundle_cy.properties +24 -2
  117. package/src/sap/fe/core/messagebundle_da.properties +24 -2
  118. package/src/sap/fe/core/messagebundle_de.properties +24 -2
  119. package/src/sap/fe/core/messagebundle_el.properties +24 -2
  120. package/src/sap/fe/core/messagebundle_en.properties +23 -1
  121. package/src/sap/fe/core/messagebundle_en_GB.properties +23 -1
  122. package/src/sap/fe/core/messagebundle_en_US_sappsd.properties +27 -1
  123. package/src/sap/fe/core/messagebundle_en_US_saprigi.properties +24 -2
  124. package/src/sap/fe/core/messagebundle_en_US_saptrc.properties +24 -2
  125. package/src/sap/fe/core/messagebundle_es.properties +24 -2
  126. package/src/sap/fe/core/messagebundle_es_MX.properties +24 -2
  127. package/src/sap/fe/core/messagebundle_et.properties +24 -2
  128. package/src/sap/fe/core/messagebundle_fi.properties +25 -3
  129. package/src/sap/fe/core/messagebundle_fr.properties +25 -3
  130. package/src/sap/fe/core/messagebundle_fr_CA.properties +24 -2
  131. package/src/sap/fe/core/messagebundle_hi.properties +24 -2
  132. package/src/sap/fe/core/messagebundle_hr.properties +24 -2
  133. package/src/sap/fe/core/messagebundle_hu.properties +25 -3
  134. package/src/sap/fe/core/messagebundle_id.properties +26 -4
  135. package/src/sap/fe/core/messagebundle_it.properties +24 -2
  136. package/src/sap/fe/core/messagebundle_iw.properties +24 -2
  137. package/src/sap/fe/core/messagebundle_ja.properties +24 -2
  138. package/src/sap/fe/core/messagebundle_kk.properties +24 -2
  139. package/src/sap/fe/core/messagebundle_ko.properties +24 -2
  140. package/src/sap/fe/core/messagebundle_lt.properties +24 -2
  141. package/src/sap/fe/core/messagebundle_lv.properties +24 -2
  142. package/src/sap/fe/core/messagebundle_ms.properties +24 -2
  143. package/src/sap/fe/core/messagebundle_nl.properties +24 -2
  144. package/src/sap/fe/core/messagebundle_no.properties +24 -2
  145. package/src/sap/fe/core/messagebundle_pl.properties +24 -2
  146. package/src/sap/fe/core/messagebundle_pt.properties +25 -3
  147. package/src/sap/fe/core/messagebundle_pt_PT.properties +24 -2
  148. package/src/sap/fe/core/messagebundle_ro.properties +24 -2
  149. package/src/sap/fe/core/messagebundle_ru.properties +24 -2
  150. package/src/sap/fe/core/messagebundle_sh.properties +24 -2
  151. package/src/sap/fe/core/messagebundle_sk.properties +24 -2
  152. package/src/sap/fe/core/messagebundle_sl.properties +24 -2
  153. package/src/sap/fe/core/messagebundle_sv.properties +25 -3
  154. package/src/sap/fe/core/messagebundle_th.properties +24 -2
  155. package/src/sap/fe/core/messagebundle_tr.properties +24 -2
  156. package/src/sap/fe/core/messagebundle_uk.properties +24 -2
  157. package/src/sap/fe/core/messagebundle_vi.properties +24 -2
  158. package/src/sap/fe/core/messagebundle_zh_CN.properties +24 -2
  159. package/src/sap/fe/core/messagebundle_zh_TW.properties +24 -2
  160. package/src/sap/fe/core/services/AsyncComponentServiceFactory.js +1 -1
  161. package/src/sap/fe/core/services/CacheHandlerServiceFactory.js +1 -1
  162. package/src/sap/fe/core/services/EnvironmentServiceFactory.js +4 -3
  163. package/src/sap/fe/core/services/EnvironmentServiceFactory.ts +3 -0
  164. package/src/sap/fe/core/services/NavigationServiceFactory.js +1 -1
  165. package/src/sap/fe/core/services/ResourceModelServiceFactory.js +1 -1
  166. package/src/sap/fe/core/services/RoutingServiceFactory.js +94 -347
  167. package/src/sap/fe/core/services/ShellServicesFactory.js +31 -2
  168. package/src/sap/fe/core/services/ShellServicesFactory.ts +30 -1
  169. package/src/sap/fe/core/services/SideEffectsServiceFactory.js +8 -5
  170. package/src/sap/fe/core/services/SideEffectsServiceFactory.ts +11 -6
  171. package/src/sap/fe/core/services/TemplatedViewServiceFactory.js +13 -4
  172. package/src/sap/fe/core/services/view/TemplatingErrorPage.controller.js +1 -1
  173. package/src/sap/fe/core/support/InvalidAnnotationColumnKey.support.js +38 -0
  174. package/src/sap/fe/core/support/InvalidAnnotationColumnKey.support.ts +18 -0
  175. package/src/sap/fe/core/templating/DataModelPathHelper.js +10 -48
  176. package/src/sap/fe/core/templating/DataModelPathHelper.ts +14 -46
  177. package/src/sap/fe/core/templating/DisplayModeFormatter.js +114 -0
  178. package/src/sap/fe/core/templating/DisplayModeFormatter.ts +86 -0
  179. package/src/sap/fe/core/templating/FilterHelper.js +10 -7
  180. package/src/sap/fe/core/templating/FilterHelper.ts +8 -6
  181. package/src/sap/fe/core/templating/PropertyHelper.js +2 -2
  182. package/src/sap/fe/core/templating/PropertyHelper.ts +1 -1
  183. package/src/sap/fe/core/templating/UIFormatters.js +15 -110
  184. package/src/sap/fe/core/templating/UIFormatters.ts +6 -73
  185. package/src/sap/fe/core/controls/filterbar.d.js +0 -8
  186. package/src/sap/fe/core/controls/filterbar.d.ts +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sapui5/sap.fe.core",
3
- "version": "1.97.0",
3
+ "version": "1.98.0",
4
4
  "description": "SAPUI5 Library sap.fe.core",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "author": "SAP SE (https://www.sap.com)",
@@ -10,9 +10,9 @@
10
10
  "build-local": "tsc --project tsconfig-local.json && copyfiles -u 6 \"../../node_modules/@sap-ux/annotation-converter/ui5-dist/**/*.js\" dist-local/src && copyfiles ui5.yaml dist-local",
11
11
  "copy-dependency": "copyfiles -u 6 \"../../node_modules/@sap-ux/annotation-converter/ui5-dist/**/*.js\" target/classes/META-INF/resources",
12
12
  "prepare-npm-sources": "copyfiles -u 6 \"../../node_modules/@sap-ux/annotation-converter/ui5-dist/**/*.js\" target/npm-sources/src && babel target/npm-sources/src --out-dir target/npm-sources/src --extensions \".ts\" --config-file ../../.babelrc",
13
- "test": "jest",
14
- "test-refs": "jest --config jest.config-refs.js",
15
- "test-updateSnapshots": "jest -u",
13
+ "test": "jest --runInBand",
14
+ "test-refs": "jest --runInBand --config jest.config-refs.js",
15
+ "test-updateSnapshots": "jest --runInBand -u",
16
16
  "watch-local": "npm run build-local && tsc --project tsconfig-local.json --watch"
17
17
  },
18
18
  "keywords": [
@@ -6,7 +6,7 @@
6
6
  <copyright>SAP UI development toolkit for HTML5 (SAPUI5)
7
7
  (c) Copyright 2009-2021 SAP SE. All rights reserved
8
8
  </copyright>
9
- <version>1.97.0</version>
9
+ <version>1.98.0</version>
10
10
 
11
11
  <documentation>UI5 library: sap.fe.core</documentation>
12
12
 
@@ -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
 
6
6
  sap.ui.define(
@@ -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
 
6
6
  // ----------------------------------------------------------------------------------
@@ -286,7 +286,8 @@ sap.ui.define(
286
286
  }
287
287
 
288
288
  // Adding Semantic Date Operators
289
- SemanticDateOperators.addSemanticDateOperators();
289
+ // Commenting since it is not needed for SingleRange
290
+ // SemanticDateOperators.addSemanticDateOperators();
290
291
 
291
292
  // the init function configures the routing according to the settings above
292
293
  // it will call the createContent function to instantiate the RootView and add it to the UIComponent aggregations
@@ -377,6 +378,7 @@ sap.ui.define(
377
378
  var oMainModel = this.oModels[undefined];
378
379
  var oHeaders = jQuery.extend({}, oMainModel.oRequestor.mHeaders);
379
380
  // As we need to cleanup the application / handle the dirty object we need to call our cleanup before the models are destroyed
381
+ this.getRoutingService().beforeExit();
380
382
  UIComponent.prototype.destroy.apply(this, arguments);
381
383
  oMainModel.oRequestor.mHeaders = oHeaders;
382
384
  },
@@ -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
  [
@@ -105,7 +105,7 @@ sap.ui.define(
105
105
  * @ui5-restricted
106
106
  **/
107
107
  applyAppState: function() {
108
- if (BusyLocker.isLocked(this)) {
108
+ if (this.oAppComponent.getModel("internal").getProperty("/uiAdaptation") || BusyLocker.isLocked(this)) {
109
109
  return Promise.resolve();
110
110
  }
111
111
  BusyLocker.lock(this);
@@ -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/Controller", "sap/fe/core/CommonUtils"], function(Controller, CommonUtils) {
6
6
  "use strict";
@@ -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
 
6
6
  sap.ui.define(["sap/base/Log"], function(Log) {
@@ -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
 
6
6
  sap.ui.define(
@@ -53,7 +53,7 @@ sap.ui.define(
53
53
  Fragment
54
54
  ) {
55
55
  "use strict";
56
-
56
+ var CommonUtils;
57
57
  var ProgrammingModel = FELibrary.ProgrammingModel;
58
58
 
59
59
  var aValidTypes = [
@@ -294,6 +294,11 @@ sap.ui.define(
294
294
  return getAppComponent(oControl).getShellServices();
295
295
  }
296
296
 
297
+ function getHash() {
298
+ var sHash = window.location.hash;
299
+ return sHash.split("&")[0];
300
+ }
301
+
297
302
  function _getSOIntents(oObjectPageLayout, oSemanticObject, oParam) {
298
303
  var oShellServiceHelper = CommonUtils.getShellServices(oObjectPageLayout);
299
304
  return oShellServiceHelper.getLinks({
@@ -306,8 +311,9 @@ sap.ui.define(
306
311
  function _createMappings(oMapping) {
307
312
  var aSOMappings = [];
308
313
  var aMappingKeys = Object.keys(oMapping);
314
+ var oSemanticMapping;
309
315
  for (var i = 0; i < aMappingKeys.length; i++) {
310
- var oSemanticMapping = {
316
+ oSemanticMapping = {
311
317
  "LocalProperty": {
312
318
  "$PropertyPath": aMappingKeys[i]
313
319
  },
@@ -802,7 +808,7 @@ sap.ui.define(
802
808
  var fnGetLinks = function(oData) {
803
809
  if (oData) {
804
810
  var aKeys = Object.keys(oData);
805
- aKeys.map(function(sKey) {
811
+ aKeys.forEach(function(sKey) {
806
812
  if (sKey.indexOf("_") !== 0 && sKey.indexOf("odata.context") === -1) {
807
813
  oParams[sKey] = { value: oData[sKey] };
808
814
  }
@@ -1470,13 +1476,14 @@ sap.ui.define(
1470
1476
  * @param {object} oSelectionVariant Instance of {@link sap.fe.navigation.SelectionVariant} SelectionVariant to be used.
1471
1477
  * @param {object} mFilters Conditons to be added to the SelectionVariant
1472
1478
  * @param {object} oTargetInfo Object returned after selection variant from the table is prepared.
1479
+ * @param {object} oFilterInfo Object containing the converted FilterBar filters
1473
1480
  * @returns {object} Instance of {@link sap.fe.navigation.SelectionVariant} SelectionVariant with the conditions.
1474
1481
  * @private
1475
1482
  * @ui5-restricted
1476
1483
  * @example <code>
1477
1484
  * </code>
1478
1485
  */
1479
- function addExternalStateFiltersToSelectionVariant(oSelectionVariant, mFilters, oTargetInfo) {
1486
+ function addExternalStateFiltersToSelectionVariant(oSelectionVariant, mFilters, oTargetInfo, oFilterInfo) {
1480
1487
  var sFilter,
1481
1488
  sLow = "",
1482
1489
  sHigh = null;
@@ -1507,6 +1514,10 @@ sap.ui.define(
1507
1514
  case "EQ":
1508
1515
  oSelectOptionState.option = sOperator;
1509
1516
  break;
1517
+ case "TODAY":
1518
+ case "DATE":
1519
+ oSelectOptionState.option = "EQ";
1520
+ break;
1510
1521
  case "EEQ":
1511
1522
  oSelectOptionState.option = "EQ";
1512
1523
  break;
@@ -1566,6 +1577,13 @@ sap.ui.define(
1566
1577
  var oFilter = aFilters[item];
1567
1578
  sLow = (oFilter.values[0] && oFilter.values[0].toString()) || "";
1568
1579
  sHigh = (oFilter.values[1] && oFilter.values[1].toString()) || null;
1580
+ if (oFilter.operator === "TODAY" || oFilter.operator === "DATE") {
1581
+ var aFilter = oFilterInfo[0].aFilters.filter(function(oFilter) {
1582
+ return oFilter.sPath === sFilter;
1583
+ });
1584
+ sLow = aFilter[0].oValue1 || "";
1585
+ sHigh = null;
1586
+ }
1569
1587
  var oSelectOptionValues = fnGetSignAndOption(oFilter.operator, sLow, sHigh);
1570
1588
  if (oSelectOptionValues.option) {
1571
1589
  oSelectionVariant.addSelectOption(
@@ -1688,7 +1706,7 @@ sap.ui.define(
1688
1706
  oStartupParameters = (oComponentData && oComponentData.startupParameters) || {},
1689
1707
  oShellServices = oAppComponent.getShellServices();
1690
1708
  if (!oShellServices.hasUShell()) {
1691
- aParameters.map(function(oParameter) {
1709
+ aParameters.forEach(function(oParameter) {
1692
1710
  var sPropertyName = bIsAction
1693
1711
  ? "/" + oParameter.$Name
1694
1712
  : oParameter.getPath().slice(oParameter.getPath().lastIndexOf("/") + 1);
@@ -1706,7 +1724,7 @@ sap.ui.define(
1706
1724
  return oShellServices.getStartupAppState(oAppComponent).then(function(oStartupAppState) {
1707
1725
  var oData = oStartupAppState.getData() || {},
1708
1726
  aExtendedParameters = (oData.selectionVariant && oData.selectionVariant.SelectOptions) || [];
1709
- aParameters.map(function(oParameter) {
1727
+ aParameters.forEach(function(oParameter) {
1710
1728
  var sPropertyName = bIsAction
1711
1729
  ? "/" + oParameter.$Name
1712
1730
  : oParameter.getPath().slice(oParameter.getPath().lastIndexOf("/") + 1);
@@ -1906,7 +1924,7 @@ sap.ui.define(
1906
1924
  .then(function(aValues) {
1907
1925
  var aLinks,
1908
1926
  _oLink,
1909
- _sLinkIntent,
1927
+ _sLinkIntentAction,
1910
1928
  aFinalLinks = [];
1911
1929
  var oFinalSemanticObjects = {};
1912
1930
  var bIntentHasActions = function(sIntent, aActions) {
@@ -1931,10 +1949,11 @@ sap.ui.define(
1931
1949
  var hasTargets = false;
1932
1950
  for (var iLinkCount = 0; iLinkCount < aLinks[i][0].length; iLinkCount++) {
1933
1951
  _oLink = aLinks[i][0][iLinkCount];
1934
- _sLinkIntent = _oLink && _oLink.intent.split("-")[1];
1952
+ _sLinkIntentAction = _oLink && _oLink.intent.split("?")[0].split("-")[1];
1953
+
1935
1954
  if (!(_oLink && _oLink.intent && _oLink.intent.indexOf(sCurrentHash) === 0)) {
1936
1955
  hasTargetsNotFiltered = true;
1937
- if (!bIntentHasActions(_sLinkIntent, aSemanticObjects[k].unavailableActions)) {
1956
+ if (!bIntentHasActions(_sLinkIntentAction, aSemanticObjects[k].unavailableActions)) {
1938
1957
  aFinalLinks[i].push(_oLink);
1939
1958
  hasTargets = true;
1940
1959
  }
@@ -2011,9 +2030,6 @@ sap.ui.define(
2011
2030
  * @returns {Promise} Once resolved, a promise is returned which is resolved without a result in case of success of setting internal Semantic Targets Model
2012
2031
  */
2013
2032
  function fnGetSemanticTargetsFromPageModel(oController, sPageModel) {
2014
- var _fnfindValues = function(obj, key) {
2015
- return _fnfindValuesHelper(obj, key, []);
2016
- };
2017
2033
  var _fnfindValuesHelper = function(obj, key, list) {
2018
2034
  if (!obj) {
2019
2035
  return list;
@@ -2038,6 +2054,9 @@ sap.ui.define(
2038
2054
  }
2039
2055
  return list;
2040
2056
  };
2057
+ var _fnfindValues = function(obj, key) {
2058
+ return _fnfindValuesHelper(obj, key, []);
2059
+ };
2041
2060
  var _fnDeleteDuplicateSemanticObjects = function(aSemanticObjectPath) {
2042
2061
  return aSemanticObjectPath.filter(function(value, index) {
2043
2062
  return aSemanticObjectPath.indexOf(value) === index;
@@ -2058,7 +2077,7 @@ sap.ui.define(
2058
2077
  var aSemanticObjectsFound = _fnfindValues(oPageModel, "semanticObjectPath");
2059
2078
  aSemanticObjectsFound = _fnDeleteDuplicateSemanticObjects(aSemanticObjectsFound);
2060
2079
  var oShellServiceHelper = CommonUtils.getShellServices(oAppComponent);
2061
- var sCurrentHash = oShellServiceHelper.hrefForExternal();
2080
+ var sCurrentHash = CommonUtils.getHash();
2062
2081
  var aSemanticObjectsForGetLinks = [];
2063
2082
  var aSemanticObjects = [];
2064
2083
  var sPath;
@@ -2286,7 +2305,7 @@ sap.ui.define(
2286
2305
  }
2287
2306
  }
2288
2307
  };
2289
- if (oControl.isA("sap.ui.mdc.ChartNew")) {
2308
+ if (oControl.isA("sap.ui.mdc.Chart")) {
2290
2309
  oControl
2291
2310
  .innerChartBound()
2292
2311
  .then(function() {
@@ -2313,7 +2332,7 @@ sap.ui.define(
2313
2332
  });
2314
2333
  }
2315
2334
 
2316
- var CommonUtils = {
2335
+ CommonUtils = {
2317
2336
  isPropertyFilterable: isPropertyFilterable,
2318
2337
  isFieldControlPathInapplicable: isFieldControlPathInapplicable,
2319
2338
  removeSensitiveData: removeSensitiveData,
@@ -2342,6 +2361,7 @@ sap.ui.define(
2342
2361
  getNonComputedVisibleFields: getNonComputedVisibleFields,
2343
2362
  setUserDefaults: setUserDefaults,
2344
2363
  getShellServices: getShellServices,
2364
+ getHash: getHash,
2345
2365
  getIBNActions: fnGetIBNActions,
2346
2366
  getHeaderFacetItemConfigForExternalNavigation: getHeaderFacetItemConfigForExternalNavigation,
2347
2367
  getSemanticObjectMapping: getSemanticObjectMapping,
@@ -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
  ["sap/ui/base/Object", "sap/fe/core/CommonUtils", "sap/base/Log", "sap/ui/core/Component", "sap/ui/model/json/JSONModel"],
@@ -157,11 +157,12 @@ sap.ui.define(
157
157
  * @alias sap.fe.core.ExtensionAPI#navigateToTarget
158
158
  * @param {string} sTarget Name of the target route
159
159
  * @param {sap.ui.model.Context} [oContext] Context instance
160
+ * @returns {Promise} Promise that is resolved when the navigation is finalized
160
161
  *
161
162
  * @public
162
163
  */
163
164
  navigateToTarget: function(sTarget, oContext) {
164
- this._controller._routing.navigateToTarget(oContext, sTarget);
165
+ return this._controller._routing.navigateToTarget(oContext, sTarget);
165
166
  },
166
167
 
167
168
  /**
@@ -229,10 +230,17 @@ sap.ui.define(
229
230
  * @public
230
231
  */
231
232
  updateAppState: function() {
232
- return this._controller
233
- .getAppComponent()
234
- .getAppStateHandler()
235
- .createAppState();
233
+ if (
234
+ !this._controller
235
+ .getAppComponent()
236
+ .getModel("internal")
237
+ .getProperty("/uiAdaptation")
238
+ ) {
239
+ return this._controller
240
+ .getAppComponent()
241
+ .getAppStateHandler()
242
+ .createAppState();
243
+ }
236
244
  },
237
245
 
238
246
  /**
@@ -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
  [
@@ -17,7 +17,9 @@ sap.ui.define(
17
17
  "sap/fe/core/controllerextensions/Share",
18
18
  "sap/fe/core/controllerextensions/ViewState",
19
19
  "sap/fe/core/controllerextensions/Paginator",
20
- "sap/fe/core/controllerextensions/Placeholder"
20
+ "sap/fe/core/controllerextensions/Placeholder",
21
+ "sap/fe/core/controllerextensions/SideEffects",
22
+ "sap/fe/core/controllerextensions/MassEdit"
21
23
  ],
22
24
  function(
23
25
  Controller,
@@ -33,7 +35,9 @@ sap.ui.define(
33
35
  Share,
34
36
  ViewState,
35
37
  Paginator,
36
- Placeholder
38
+ Placeholder,
39
+ SideEffects,
40
+ MassEdit
37
41
  ) {
38
42
  "use strict";
39
43
 
@@ -60,6 +64,8 @@ sap.ui.define(
60
64
  paginator: Paginator,
61
65
  viewState: ViewState,
62
66
  placeholder: Placeholder,
67
+ _sideEffects: SideEffects,
68
+ massEdit: MassEdit,
63
69
  /**
64
70
  * @private
65
71
  * @name sap.fe.core.PageController.getMetadata
@@ -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
  /* eslint-disable no-alert */
6
6
  sap.ui.define(
@@ -190,7 +190,7 @@ sap.ui.define(
190
190
  * @param {boolean} bPreserveHistory If set to true, non-ancestor entries in history will be retained
191
191
  * @param {boolean} bDisablePreservationCache If set to true, cache preservation mechanism is disabled for the current navigation
192
192
  * @param {boolean} bForceFocus If set to true, the logic to set the focus once the navigation is finalized will be triggered (onPageReady)
193
- * @returns {Promise} Promise that is resolved when the navigation is finalized
193
+ * @returns {Promise} Promise (resolved when the navigation is finalized) that returns 'true' if a navigation took place, 'false' if the navigation didn't happen
194
194
  * @ui5-restricted
195
195
  */
196
196
  navToHash: function(sHash, bPreserveHistory, bDisablePreservationCache, bForceFocus) {
@@ -224,7 +224,7 @@ sap.ui.define(
224
224
  // in the EditFlow we rely on a UI5 mechanism that displays a confirm dialog.
225
225
  if (!confirm(this.oResourceBundle.getText("C_ROUTER_PROXY_SAPFE_EXIT_NOTSAVED_MESSAGE"))) {
226
226
  // The user clicked on Cancel --> cancel navigation
227
- return Promise.resolve();
227
+ return Promise.resolve(false);
228
228
  }
229
229
  this.bIsGuardCrossAllowed = true;
230
230
  }
@@ -607,12 +607,12 @@ sap.ui.define(
607
607
  },
608
608
 
609
609
  /**
610
- * Rebuilds the browser history from the app root page.
610
+ * Synchronizes the browser history with the internal history of the routerProxy, and triggers a navigation if needed.
611
611
  *
612
612
  * @memberof sap.fe.core.RouterProxy
613
613
  * @param {object} oHistoryAction Specifies the navigation action to be performed
614
- * @param {boolean} bRebuildOnly `true` if rebuilding history
615
- * @returns {Promise} A promise that is resolved when the navigation is finalized
614
+ * @param {boolean} bRebuildOnly `true` if internal history is currently being rebuilt
615
+ * @returns {Promise} Promise (resolved when the navigation is finalized) that returns 'true' if a navigation took place, 'false' if the navigation didn't happen
616
616
  * @ui5-restricted
617
617
  * @final
618
618
  */
@@ -640,7 +640,7 @@ sap.ui.define(
640
640
  }
641
641
 
642
642
  that.bIsRebuildHistoryRunning = false;
643
- resolve();
643
+ resolve(true); // a navigation occurred
644
644
  }
645
645
 
646
646
  // Async callbacks when navigating back, in order to let all notifications and events get processed
@@ -655,7 +655,7 @@ sap.ui.define(
655
655
  function backAsync() {
656
656
  window.removeEventListener("popstate", backAsync);
657
657
  that.bIsRebuildHistoryRunning = false;
658
- resolve();
658
+ resolve(true); // a navigation occurred
659
659
  }
660
660
 
661
661
  that._bIgnoreRestore = true;
@@ -665,14 +665,14 @@ sap.ui.define(
665
665
  that._oRouter.getHashChanger().replaceHash(oTargetState.hash);
666
666
  history.replaceState(Object.assign({ feLevel: newLevel }, history.state), "");
667
667
  that.bIsRebuildHistoryRunning = false;
668
- resolve();
668
+ resolve(true); // a navigation occurred
669
669
  break;
670
670
 
671
671
  case "append":
672
672
  that._oRouter.getHashChanger().setHash(oTargetState.hash);
673
673
  history.replaceState(Object.assign({ feLevel: newLevel }, history.state), "");
674
674
  that.bIsRebuildHistoryRunning = false;
675
- resolve();
675
+ resolve(true); // a navigation occurred
676
676
  break;
677
677
 
678
678
  case "back":
@@ -689,7 +689,7 @@ sap.ui.define(
689
689
  default:
690
690
  // No navigation
691
691
  that.bIsRebuildHistoryRunning = false;
692
- resolve();
692
+ resolve(false); // no navigation --> resolve to false
693
693
  }
694
694
  });
695
695
  },
@@ -803,6 +803,22 @@ sap.ui.define(
803
803
  return !sPrevHash || !that.checkHashWithGuard(sPrevHash);
804
804
  }
805
805
  return false;
806
+ },
807
+
808
+ /**
809
+ * Checks if the last 2 entries in the history share the same context.
810
+ *
811
+ * @returns {boolean} `true` if they share the same context.
812
+ */
813
+ checkIfBackHasSameContext: function() {
814
+ if (this._oManagedHistory.length < 2) {
815
+ return false;
816
+ }
817
+
818
+ var oCurrentState = this._oManagedHistory[this._oManagedHistory.length - 1];
819
+ var oPreviousState = this._oManagedHistory[this._oManagedHistory.length - 2];
820
+
821
+ return oCurrentState.hash.split("?")[0] === oPreviousState.hash.split("?")[0];
806
822
  }
807
823
  });
808
824
  }
@@ -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/base/Log", "sap/ui/base/Object"], function(Log, BaseObject) {
6
6
  "use strict";
@@ -1,10 +1,10 @@
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
- ["sap/ui/core/UIComponent", "sap/fe/core/CommonUtils", "sap/base/Log"],
7
- function(UIComponent, CommonUtils, Log) {
6
+ ["sap/ui/core/UIComponent", "sap/fe/core/CommonUtils", "sap/ui/mdc/p13n/StateUtil", "sap/base/Log"],
7
+ function(UIComponent, CommonUtils, StateUtil, Log) {
8
8
  "use strict";
9
9
 
10
10
  var TemplateComponent = UIComponent.extend("sap.fe.core.TemplateComponent", {
@@ -12,7 +12,7 @@ sap.ui.define(
12
12
  interfaces: ["sap.ui.core.IAsyncContentCreation"],
13
13
  properties: {
14
14
  /**
15
- * OData EntitySet name
15
+ * Name of the OData entity set
16
16
  */
17
17
  entitySet: {
18
18
  type: "string",
@@ -93,6 +93,15 @@ sap.ui.define(
93
93
  init: function() {
94
94
  this.oAppComponent = CommonUtils.getAppComponent(this);
95
95
  UIComponent.prototype.init.apply(this, arguments);
96
+ var oStateChangedHandler = function(oEvent) {
97
+ var oControl = oEvent.getParameter("control");
98
+ if (oControl.isA("sap.ui.mdc.Table") || oControl.isA("sap.ui.mdc.FilterBar")) {
99
+ var oMacroAPI = oControl.getParent();
100
+ oMacroAPI.fireStateChanged();
101
+ }
102
+ };
103
+ StateUtil.detachStateChange(oStateChangedHandler);
104
+ StateUtil.attachStateChange(oStateChangedHandler);
96
105
  },
97
106
 
98
107
  // This method is called by UI5 core to access to the component containing the customizing configuration.
@@ -141,7 +150,7 @@ sap.ui.define(
141
150
  .getController()
142
151
  ._getPageTitleInformation();
143
152
  } else {
144
- return Promise.resolve({});
153
+ return {};
145
154
  }
146
155
  },
147
156
 
@@ -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/base/Log", "sap/ui/base/Object", "sap/ui/model/json/JSONModel"], function(Log, BaseObject, JSONModel) {
6
6
  "use strict";