@sapui5/sap.fe.core 1.102.0 → 1.103.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 (311) hide show
  1. package/package.json +5 -5
  2. package/src/sap/fe/core/.library +1 -1
  3. package/src/sap/fe/core/AppComponent.js +62 -26
  4. package/src/sap/fe/core/AppComponent.ts +56 -40
  5. package/src/sap/fe/core/AppStateHandler.js +10 -10
  6. package/src/sap/fe/core/AppStateHandler.ts +9 -9
  7. package/src/sap/fe/core/BaseController.js +11 -9
  8. package/src/sap/fe/core/BaseController.ts +15 -13
  9. package/src/sap/fe/core/CommonUtils.js +236 -109
  10. package/src/sap/fe/core/CommonUtils.ts +252 -136
  11. package/src/sap/fe/core/ExtensionAPI.js +24 -27
  12. package/src/sap/fe/core/ExtensionAPI.ts +36 -38
  13. package/src/sap/fe/core/PageController.js +4 -4
  14. package/src/sap/fe/core/PageController.ts +4 -5
  15. package/src/sap/fe/core/TemplateComponent.js +1 -1
  16. package/src/sap/fe/core/TemplateComponent.ts +6 -6
  17. package/src/sap/fe/core/TemplateModel.js +1 -1
  18. package/src/sap/fe/core/TemplateModel.ts +1 -1
  19. package/src/sap/fe/core/buildingBlocks/AttributeModel.js +1 -1
  20. package/src/sap/fe/core/buildingBlocks/AttributeModel.ts +1 -1
  21. package/src/sap/fe/core/buildingBlocks/BuildingBlockRuntime.js +8 -8
  22. package/src/sap/fe/core/buildingBlocks/BuildingBlockRuntime.ts +11 -10
  23. package/src/sap/fe/core/buildingBlocks/TraceInfo.js +27 -27
  24. package/src/sap/fe/core/buildingBlocks/TraceInfo.ts +28 -26
  25. package/src/sap/fe/core/controllerextensions/EditFlow.js +129 -118
  26. package/src/sap/fe/core/controllerextensions/EditFlow.ts +154 -141
  27. package/src/sap/fe/core/controllerextensions/IntentBasedNavigation.js +9 -9
  28. package/src/sap/fe/core/controllerextensions/IntentBasedNavigation.ts +10 -10
  29. package/src/sap/fe/core/controllerextensions/InternalEditFlow.js +31 -26
  30. package/src/sap/fe/core/controllerextensions/InternalEditFlow.ts +34 -35
  31. package/src/sap/fe/core/controllerextensions/InternalIntentBasedNavigation.js +70 -70
  32. package/src/sap/fe/core/controllerextensions/InternalIntentBasedNavigation.ts +77 -77
  33. package/src/sap/fe/core/controllerextensions/InternalRouting.js +84 -78
  34. package/src/sap/fe/core/controllerextensions/InternalRouting.ts +105 -101
  35. package/src/sap/fe/core/controllerextensions/KPIManagement.js +66 -68
  36. package/src/sap/fe/core/controllerextensions/KPIManagement.ts +106 -123
  37. package/src/sap/fe/core/controllerextensions/MassEdit.js +8 -8
  38. package/src/sap/fe/core/controllerextensions/MassEdit.ts +19 -26
  39. package/src/sap/fe/core/controllerextensions/MessageHandler.js +20 -12
  40. package/src/sap/fe/core/controllerextensions/MessageHandler.ts +29 -14
  41. package/src/sap/fe/core/controllerextensions/PageReady.js +97 -25
  42. package/src/sap/fe/core/controllerextensions/PageReady.ts +94 -34
  43. package/src/sap/fe/core/controllerextensions/Paginator.js +21 -22
  44. package/src/sap/fe/core/controllerextensions/Paginator.ts +24 -25
  45. package/src/sap/fe/core/controllerextensions/Placeholder.js +4 -6
  46. package/src/sap/fe/core/controllerextensions/Placeholder.ts +12 -14
  47. package/src/sap/fe/core/controllerextensions/Routing.js +10 -11
  48. package/src/sap/fe/core/controllerextensions/Routing.ts +12 -13
  49. package/src/sap/fe/core/controllerextensions/Share.js +22 -22
  50. package/src/sap/fe/core/controllerextensions/Share.ts +30 -29
  51. package/src/sap/fe/core/controllerextensions/SideEffects.js +46 -50
  52. package/src/sap/fe/core/controllerextensions/SideEffects.ts +56 -60
  53. package/src/sap/fe/core/controllerextensions/ViewState.js +65 -62
  54. package/src/sap/fe/core/controllerextensions/ViewState.ts +68 -63
  55. package/src/sap/fe/core/controllerextensions/collaboration/ActivityBase.js +5 -5
  56. package/src/sap/fe/core/controllerextensions/collaboration/ActivityBase.ts +8 -7
  57. package/src/sap/fe/core/controllerextensions/collaboration/ActivitySync.js +6 -6
  58. package/src/sap/fe/core/controllerextensions/collaboration/ActivitySync.ts +12 -17
  59. package/src/sap/fe/core/controllerextensions/collaboration/CollaborationCommon.js +2 -2
  60. package/src/sap/fe/core/controllerextensions/collaboration/CollaborationCommon.ts +4 -4
  61. package/src/sap/fe/core/controllerextensions/collaboration/Manage.js +7 -9
  62. package/src/sap/fe/core/controllerextensions/collaboration/Manage.ts +18 -19
  63. package/src/sap/fe/core/controllerextensions/editFlow/TransactionHelper.js +184 -137
  64. package/src/sap/fe/core/controllerextensions/editFlow/TransactionHelper.ts +253 -206
  65. package/src/sap/fe/core/controllerextensions/editFlow/draft.js +113 -121
  66. package/src/sap/fe/core/controllerextensions/editFlow/draft.ts +148 -158
  67. package/src/sap/fe/core/controllerextensions/editFlow/operations.js +198 -148
  68. package/src/sap/fe/core/controllerextensions/editFlow/operations.ts +223 -159
  69. package/src/sap/fe/core/controllerextensions/editFlow/sticky.js +24 -26
  70. package/src/sap/fe/core/controllerextensions/editFlow/sticky.ts +35 -33
  71. package/src/sap/fe/core/controllerextensions/messageHandler/messageHandling.js +78 -44
  72. package/src/sap/fe/core/controllerextensions/messageHandler/messageHandling.ts +90 -60
  73. package/src/sap/fe/core/controllerextensions/routing/RouterProxy.js +52 -55
  74. package/src/sap/fe/core/controllerextensions/routing/RouterProxy.ts +55 -58
  75. package/src/sap/fe/core/controls/Any.js +9 -5
  76. package/src/sap/fe/core/controls/Any.ts +10 -4
  77. package/src/sap/fe/core/controls/CommandExecution.js +11 -25
  78. package/src/sap/fe/core/controls/CommandExecution.ts +11 -25
  79. package/src/sap/fe/core/controls/ConditionalWrapper.js +2 -2
  80. package/src/sap/fe/core/controls/ConditionalWrapper.ts +3 -3
  81. package/src/sap/fe/core/controls/CustomFilterFieldContentWrapper.js +22 -22
  82. package/src/sap/fe/core/controls/CustomFilterFieldContentWrapper.ts +25 -24
  83. package/src/sap/fe/core/controls/CustomQuickViewPage.js +2 -2
  84. package/src/sap/fe/core/controls/CustomQuickViewPage.ts +2 -2
  85. package/src/sap/fe/core/controls/DataLossOrDraftDiscard/DataLossOrDraftDiscardHandler.js +3 -3
  86. package/src/sap/fe/core/controls/DataLossOrDraftDiscard/DataLossOrDraftDiscardHandler.ts +5 -5
  87. package/src/sap/fe/core/controls/FieldWrapper.js +2 -2
  88. package/src/sap/fe/core/controls/FieldWrapper.ts +3 -3
  89. package/src/sap/fe/core/controls/FileWrapper.js +2 -2
  90. package/src/sap/fe/core/controls/FileWrapper.ts +11 -11
  91. package/src/sap/fe/core/controls/FilterBar.js +6 -2
  92. package/src/sap/fe/core/controls/FilterBar.ts +13 -9
  93. package/src/sap/fe/core/controls/FormElementWrapper.js +1 -1
  94. package/src/sap/fe/core/controls/FormElementWrapper.ts +2 -2
  95. package/src/sap/fe/core/controls/MassEditSelect.js +1 -1
  96. package/src/sap/fe/core/controls/MassEditSelect.ts +0 -4
  97. package/src/sap/fe/core/controls/NonComputedVisibleKeyFieldsDialog.fragment.xml +3 -3
  98. package/src/sap/fe/core/controls/filterbar/VisualFilter.js +16 -12
  99. package/src/sap/fe/core/controls/filterbar/VisualFilter.ts +20 -22
  100. package/src/sap/fe/core/controls/filterbar/VisualFilterContainer.js +3 -3
  101. package/src/sap/fe/core/controls/filterbar/VisualFilterContainer.ts +8 -8
  102. package/src/sap/fe/core/controls/filterbar/utils/VisualFilterUtils.js +47 -47
  103. package/src/sap/fe/core/controls/filterbar/utils/VisualFilterUtils.ts +52 -52
  104. package/src/sap/fe/core/controls/massEdit/MassEditDialog.fragment.xml +8 -2
  105. package/src/sap/fe/core/controls/massEdit/MassEditHandlers.js +89 -88
  106. package/src/sap/fe/core/controls/massEdit/MassEditHandlers.ts +107 -106
  107. package/src/sap/fe/core/converters/ConverterContext.js +26 -33
  108. package/src/sap/fe/core/converters/ConverterContext.ts +51 -60
  109. package/src/sap/fe/core/converters/ManifestSettings.js +1 -1
  110. package/src/sap/fe/core/converters/ManifestSettings.ts +14 -14
  111. package/src/sap/fe/core/converters/ManifestWrapper.js +59 -45
  112. package/src/sap/fe/core/converters/ManifestWrapper.ts +55 -45
  113. package/src/sap/fe/core/converters/MetaModelConverter.js +50 -32
  114. package/src/sap/fe/core/converters/MetaModelConverter.ts +145 -127
  115. package/src/sap/fe/core/converters/TemplateConverter.js +21 -20
  116. package/src/sap/fe/core/converters/TemplateConverter.ts +27 -24
  117. package/src/sap/fe/core/converters/annotations/DataField.js +54 -34
  118. package/src/sap/fe/core/converters/annotations/DataField.ts +97 -75
  119. package/src/sap/fe/core/converters/common/AnnotationConverter.js +1911 -1495
  120. package/src/sap/fe/core/converters/controls/Common/Action.js +50 -41
  121. package/src/sap/fe/core/converters/controls/Common/Action.ts +56 -46
  122. package/src/sap/fe/core/converters/controls/Common/Chart.js +14 -14
  123. package/src/sap/fe/core/converters/controls/Common/Chart.ts +23 -26
  124. package/src/sap/fe/core/converters/controls/Common/Criticality.js +3 -3
  125. package/src/sap/fe/core/converters/controls/Common/Criticality.ts +4 -4
  126. package/src/sap/fe/core/converters/controls/Common/DataVisualization.js +28 -28
  127. package/src/sap/fe/core/converters/controls/Common/DataVisualization.ts +40 -36
  128. package/src/sap/fe/core/converters/controls/Common/Form.js +25 -27
  129. package/src/sap/fe/core/converters/controls/Common/Form.ts +37 -45
  130. package/src/sap/fe/core/converters/controls/Common/KPI.js +11 -11
  131. package/src/sap/fe/core/converters/controls/Common/KPI.ts +35 -39
  132. package/src/sap/fe/core/converters/controls/Common/Table.js +174 -183
  133. package/src/sap/fe/core/converters/controls/Common/Table.ts +237 -250
  134. package/src/sap/fe/core/converters/controls/Common/table/StandardActions.js +119 -119
  135. package/src/sap/fe/core/converters/controls/Common/table/StandardActions.ts +144 -141
  136. package/src/sap/fe/core/converters/controls/ListReport/FilterBar.js +45 -41
  137. package/src/sap/fe/core/converters/controls/ListReport/FilterBar.ts +64 -57
  138. package/src/sap/fe/core/converters/controls/ListReport/VisualFilters.js +28 -26
  139. package/src/sap/fe/core/converters/controls/ListReport/VisualFilters.ts +46 -43
  140. package/src/sap/fe/core/converters/controls/ObjectPage/Avatar.js +9 -9
  141. package/src/sap/fe/core/converters/controls/ObjectPage/Avatar.ts +14 -13
  142. package/src/sap/fe/core/converters/controls/ObjectPage/HeaderFacet.js +67 -64
  143. package/src/sap/fe/core/converters/controls/ObjectPage/HeaderFacet.ts +69 -66
  144. package/src/sap/fe/core/converters/controls/ObjectPage/SubSection.js +73 -72
  145. package/src/sap/fe/core/converters/controls/ObjectPage/SubSection.ts +98 -96
  146. package/src/sap/fe/core/converters/helpers/Aggregation.js +2 -4
  147. package/src/sap/fe/core/converters/helpers/Aggregation.ts +10 -13
  148. package/src/sap/fe/core/converters/helpers/BindingHelper.js +31 -31
  149. package/src/sap/fe/core/converters/helpers/BindingHelper.ts +30 -29
  150. package/src/sap/fe/core/converters/helpers/ConfigurableObject.js +4 -4
  151. package/src/sap/fe/core/converters/helpers/ConfigurableObject.ts +9 -9
  152. package/src/sap/fe/core/converters/helpers/ID.js +46 -46
  153. package/src/sap/fe/core/converters/helpers/ID.ts +25 -25
  154. package/src/sap/fe/core/converters/helpers/Key.js +7 -7
  155. package/src/sap/fe/core/converters/helpers/Key.ts +7 -7
  156. package/src/sap/fe/core/converters/helpers/SelectionVariantHelper.js +1 -1
  157. package/src/sap/fe/core/converters/helpers/SelectionVariantHelper.ts +4 -4
  158. package/src/sap/fe/core/converters/objectPage/FormMenuActions.js +6 -6
  159. package/src/sap/fe/core/converters/objectPage/FormMenuActions.ts +10 -10
  160. package/src/sap/fe/core/converters/objectPage/HeaderAndFooterAction.js +46 -62
  161. package/src/sap/fe/core/converters/objectPage/HeaderAndFooterAction.ts +54 -82
  162. package/src/sap/fe/core/converters/templates/ListReportConverter.js +30 -29
  163. package/src/sap/fe/core/converters/templates/ListReportConverter.ts +40 -40
  164. package/src/sap/fe/core/converters/templates/ObjectPageConverter.js +39 -38
  165. package/src/sap/fe/core/converters/templates/ObjectPageConverter.ts +52 -61
  166. package/src/sap/fe/core/designtime/AppComponent.designtime.js +4 -4
  167. package/src/sap/fe/core/designtime/AppComponent.designtime.ts +4 -4
  168. package/src/sap/fe/core/formatters/CollaborationFormatter.js +2 -2
  169. package/src/sap/fe/core/formatters/CollaborationFormatter.ts +3 -3
  170. package/src/sap/fe/core/formatters/FPMFormatter.js +5 -5
  171. package/src/sap/fe/core/formatters/FPMFormatter.ts +10 -10
  172. package/src/sap/fe/core/formatters/KPIFormatter.js +7 -7
  173. package/src/sap/fe/core/formatters/KPIFormatter.ts +10 -10
  174. package/src/sap/fe/core/formatters/StandardFormatter.js +89 -0
  175. package/src/sap/fe/core/formatters/StandardFormatter.ts +64 -0
  176. package/src/sap/fe/core/formatters/TableFormatter.js +11 -11
  177. package/src/sap/fe/core/formatters/TableFormatter.ts +12 -12
  178. package/src/sap/fe/core/formatters/ValueFormatter.js +8 -8
  179. package/src/sap/fe/core/formatters/ValueFormatter.ts +9 -9
  180. package/src/sap/fe/core/helpers/AppStartupHelper.js +15 -15
  181. package/src/sap/fe/core/helpers/AppStartupHelper.ts +37 -40
  182. package/src/sap/fe/core/helpers/BindingToolkit.js +1809 -0
  183. package/src/sap/fe/core/helpers/{BindingExpression.ts → BindingToolkit.ts} +365 -264
  184. package/src/sap/fe/core/helpers/ClassSupport.js +20 -11
  185. package/src/sap/fe/core/helpers/ClassSupport.ts +14 -10
  186. package/src/sap/fe/core/helpers/DynamicAnnotationPathHelper.js +2 -2
  187. package/src/sap/fe/core/helpers/DynamicAnnotationPathHelper.ts +1 -1
  188. package/src/sap/fe/core/helpers/EditState.js +1 -6
  189. package/src/sap/fe/core/helpers/EditState.ts +5 -10
  190. package/src/sap/fe/core/helpers/ExcelFormatHelper.js +2 -2
  191. package/src/sap/fe/core/helpers/ExcelFormatHelper.ts +4 -4
  192. package/src/sap/fe/core/helpers/FPMHelper.js +1 -1
  193. package/src/sap/fe/core/helpers/FPMHelper.ts +2 -2
  194. package/src/sap/fe/core/helpers/KeepAliveHelper.js +31 -31
  195. package/src/sap/fe/core/helpers/KeepAliveHelper.ts +52 -56
  196. package/src/sap/fe/core/helpers/MassEditHelper.js +281 -254
  197. package/src/sap/fe/core/helpers/MassEditHelper.ts +337 -289
  198. package/src/sap/fe/core/helpers/ModelHelper.js +25 -25
  199. package/src/sap/fe/core/helpers/ModelHelper.ts +34 -32
  200. package/src/sap/fe/core/helpers/PasteHelper.js +3 -10
  201. package/src/sap/fe/core/helpers/PasteHelper.ts +20 -25
  202. package/src/sap/fe/core/helpers/SemanticDateOperators.js +1 -1
  203. package/src/sap/fe/core/helpers/SemanticDateOperators.ts +11 -11
  204. package/src/sap/fe/core/helpers/SemanticKeyHelper.js +3 -3
  205. package/src/sap/fe/core/helpers/SemanticKeyHelper.ts +8 -8
  206. package/src/sap/fe/core/helpers/StableIdHelper.js +12 -12
  207. package/src/sap/fe/core/helpers/StableIdHelper.ts +12 -12
  208. package/src/sap/fe/core/jsx-runtime/jsx.js +1 -1
  209. package/src/sap/fe/core/jsx-runtime/jsx.ts +8 -8
  210. package/src/sap/fe/core/library.js +42 -3
  211. package/src/sap/fe/core/library.ts +38 -0
  212. package/src/sap/fe/core/manifestMerger/ChangePageConfiguration.js +3 -3
  213. package/src/sap/fe/core/manifestMerger/ChangePageConfiguration.ts +2 -2
  214. package/src/sap/fe/core/messagebundle.properties +49 -35
  215. package/src/sap/fe/core/messagebundle_ar.properties +13 -5
  216. package/src/sap/fe/core/messagebundle_bg.properties +13 -5
  217. package/src/sap/fe/core/messagebundle_ca.properties +13 -5
  218. package/src/sap/fe/core/messagebundle_cs.properties +13 -5
  219. package/src/sap/fe/core/messagebundle_cy.properties +14 -6
  220. package/src/sap/fe/core/messagebundle_da.properties +13 -5
  221. package/src/sap/fe/core/messagebundle_de.properties +15 -7
  222. package/src/sap/fe/core/messagebundle_el.properties +14 -6
  223. package/src/sap/fe/core/messagebundle_en.properties +9 -1
  224. package/src/sap/fe/core/messagebundle_en_GB.properties +11 -3
  225. package/src/sap/fe/core/messagebundle_en_US_sappsd.properties +7 -1
  226. package/src/sap/fe/core/messagebundle_en_US_saprigi.properties +9 -1
  227. package/src/sap/fe/core/messagebundle_en_US_saptrc.properties +44 -85
  228. package/src/sap/fe/core/messagebundle_es.properties +13 -5
  229. package/src/sap/fe/core/messagebundle_es_MX.properties +13 -5
  230. package/src/sap/fe/core/messagebundle_et.properties +13 -5
  231. package/src/sap/fe/core/messagebundle_fi.properties +14 -6
  232. package/src/sap/fe/core/messagebundle_fr.properties +14 -6
  233. package/src/sap/fe/core/messagebundle_fr_CA.properties +14 -6
  234. package/src/sap/fe/core/messagebundle_hi.properties +14 -6
  235. package/src/sap/fe/core/messagebundle_hr.properties +14 -6
  236. package/src/sap/fe/core/messagebundle_hu.properties +13 -5
  237. package/src/sap/fe/core/messagebundle_id.properties +13 -5
  238. package/src/sap/fe/core/messagebundle_it.properties +33 -25
  239. package/src/sap/fe/core/messagebundle_iw.properties +13 -5
  240. package/src/sap/fe/core/messagebundle_ja.properties +14 -6
  241. package/src/sap/fe/core/messagebundle_kk.properties +13 -5
  242. package/src/sap/fe/core/messagebundle_ko.properties +13 -5
  243. package/src/sap/fe/core/messagebundle_lt.properties +13 -5
  244. package/src/sap/fe/core/messagebundle_lv.properties +14 -6
  245. package/src/sap/fe/core/messagebundle_ms.properties +13 -5
  246. package/src/sap/fe/core/messagebundle_nl.properties +13 -5
  247. package/src/sap/fe/core/messagebundle_no.properties +13 -5
  248. package/src/sap/fe/core/messagebundle_pl.properties +13 -5
  249. package/src/sap/fe/core/messagebundle_pt.properties +13 -5
  250. package/src/sap/fe/core/messagebundle_pt_PT.properties +14 -6
  251. package/src/sap/fe/core/messagebundle_ro.properties +13 -5
  252. package/src/sap/fe/core/messagebundle_ru.properties +13 -5
  253. package/src/sap/fe/core/messagebundle_sh.properties +13 -5
  254. package/src/sap/fe/core/messagebundle_sk.properties +13 -5
  255. package/src/sap/fe/core/messagebundle_sl.properties +17 -9
  256. package/src/sap/fe/core/messagebundle_sv.properties +14 -6
  257. package/src/sap/fe/core/messagebundle_th.properties +13 -5
  258. package/src/sap/fe/core/messagebundle_tr.properties +13 -5
  259. package/src/sap/fe/core/messagebundle_uk.properties +13 -5
  260. package/src/sap/fe/core/messagebundle_vi.properties +13 -5
  261. package/src/sap/fe/core/messagebundle_zh_CN.properties +14 -6
  262. package/src/sap/fe/core/messagebundle_zh_TW.properties +13 -5
  263. package/src/sap/fe/core/services/AsyncComponentServiceFactory.js +2 -2
  264. package/src/sap/fe/core/services/AsyncComponentServiceFactory.ts +5 -5
  265. package/src/sap/fe/core/services/CacheHandlerServiceFactory.js +2 -2
  266. package/src/sap/fe/core/services/CacheHandlerServiceFactory.ts +14 -14
  267. package/src/sap/fe/core/services/EnvironmentServiceFactory.js +1 -1
  268. package/src/sap/fe/core/services/EnvironmentServiceFactory.ts +3 -2
  269. package/src/sap/fe/core/services/NavigationServiceFactory.js +53 -44
  270. package/src/sap/fe/core/services/NavigationServiceFactory.ts +54 -46
  271. package/src/sap/fe/core/services/ResourceModelServiceFactory.js +2 -2
  272. package/src/sap/fe/core/services/ResourceModelServiceFactory.ts +4 -4
  273. package/src/sap/fe/core/services/RoutingServiceFactory.js +55 -55
  274. package/src/sap/fe/core/services/RoutingServiceFactory.ts +67 -65
  275. package/src/sap/fe/core/services/ShellServicesFactory.js +72 -76
  276. package/src/sap/fe/core/services/ShellServicesFactory.ts +76 -82
  277. package/src/sap/fe/core/services/SideEffectsServiceFactory.js +61 -61
  278. package/src/sap/fe/core/services/SideEffectsServiceFactory.ts +102 -92
  279. package/src/sap/fe/core/services/TemplatedViewServiceFactory.js +20 -15
  280. package/src/sap/fe/core/services/TemplatedViewServiceFactory.ts +26 -21
  281. package/src/sap/fe/core/support/CommonHelper.js +3 -2
  282. package/src/sap/fe/core/support/CommonHelper.ts +9 -13
  283. package/src/sap/fe/core/support/Diagnostics.js +1 -1
  284. package/src/sap/fe/core/support/Diagnostics.ts +5 -5
  285. package/src/sap/fe/core/templating/CommonFormatters.js +84 -0
  286. package/src/sap/fe/core/templating/CommonFormatters.ts +86 -0
  287. package/src/sap/fe/core/templating/CriticalityFormatters.js +31 -31
  288. package/src/sap/fe/core/templating/CriticalityFormatters.ts +42 -40
  289. package/src/sap/fe/core/templating/DataFieldFormatters.js +8 -8
  290. package/src/sap/fe/core/templating/DataFieldFormatters.ts +13 -10
  291. package/src/sap/fe/core/templating/DataModelPathHelper.js +16 -15
  292. package/src/sap/fe/core/templating/DataModelPathHelper.ts +42 -32
  293. package/src/sap/fe/core/templating/DisplayModeFormatter.js +1 -1
  294. package/src/sap/fe/core/templating/DisplayModeFormatter.ts +2 -3
  295. package/src/sap/fe/core/templating/EntitySetHelper.js +7 -7
  296. package/src/sap/fe/core/templating/EntitySetHelper.ts +6 -8
  297. package/src/sap/fe/core/templating/FieldControlHelper.js +35 -34
  298. package/src/sap/fe/core/templating/FieldControlHelper.ts +29 -46
  299. package/src/sap/fe/core/templating/FilterHelper.js +10 -9
  300. package/src/sap/fe/core/templating/FilterHelper.ts +13 -13
  301. package/src/sap/fe/core/templating/FilterTemplating.js +1 -1
  302. package/src/sap/fe/core/templating/FilterTemplating.ts +3 -3
  303. package/src/sap/fe/core/templating/PropertyFormatters.js +7 -7
  304. package/src/sap/fe/core/templating/PropertyFormatters.ts +21 -19
  305. package/src/sap/fe/core/templating/PropertyHelper.js +25 -25
  306. package/src/sap/fe/core/templating/PropertyHelper.ts +25 -26
  307. package/src/sap/fe/core/templating/UIFormatters.js +148 -93
  308. package/src/sap/fe/core/templating/UIFormatters.ts +196 -124
  309. package/src/sap/fe/core/type/Email.js +2 -2
  310. package/src/sap/fe/core/type/Email.ts +2 -2
  311. package/src/sap/fe/core/helpers/BindingExpression.js +0 -1732
@@ -1,37 +1,40 @@
1
1
  import Log from "sap/base/Log";
2
- import FlexibleColumnLayout from "sap/f/FlexibleColumnLayout";
2
+ import type FlexibleColumnLayout from "sap/f/FlexibleColumnLayout";
3
3
  import CommonUtils from "sap/fe/core/CommonUtils";
4
4
  import BusyLocker from "sap/fe/core/controllerextensions/BusyLocker";
5
5
  import { send } from "sap/fe/core/controllerextensions/collaboration/ActivitySync";
6
6
  import { Activity } from "sap/fe/core/controllerextensions/collaboration/CollaborationCommon";
7
- import draft, { SiblingInformation } from "sap/fe/core/controllerextensions/editFlow/draft";
7
+ import type { SiblingInformation } from "sap/fe/core/controllerextensions/editFlow/draft";
8
+ import draft from "sap/fe/core/controllerextensions/editFlow/draft";
8
9
  import { defineUI5Class, extensible, finalExtension, publicExtension } from "sap/fe/core/helpers/ClassSupport";
9
10
  import EditState from "sap/fe/core/helpers/EditState";
10
- import ModelHelper, { InternalModelContext } from "sap/fe/core/helpers/ModelHelper";
11
+ import type { InternalModelContext } from "sap/fe/core/helpers/ModelHelper";
12
+ import ModelHelper from "sap/fe/core/helpers/ModelHelper";
11
13
  import SemanticKeyHelper from "sap/fe/core/helpers/SemanticKeyHelper";
12
14
  import FELibrary from "sap/fe/core/library";
13
- import PageController from "sap/fe/core/PageController";
14
- import { SemanticMapping } from "sap/fe/core/services/RoutingServiceFactory";
15
- import { standardActions, triggerConfiguredSurvey, triggerType } from "sap/fe/templates/Feedback";
16
- import NavContainer from "sap/m/NavContainer";
17
- import Control from "sap/ui/core/Control";
15
+ import type PageController from "sap/fe/core/PageController";
16
+ import type { SemanticMapping } from "sap/fe/core/services/RoutingServiceFactory";
17
+ import { StandardActions, triggerConfiguredSurvey, TriggerType } from "sap/fe/templates/Feedback";
18
+ import type NavContainer from "sap/m/NavContainer";
19
+ import type Control from "sap/ui/core/Control";
18
20
  import Core from "sap/ui/core/Core";
19
21
  import coreLibrary from "sap/ui/core/library";
20
22
  import Message from "sap/ui/core/message/Message";
21
23
  import ControllerExtension from "sap/ui/core/mvc/ControllerExtension";
22
24
  import OverrideExecution from "sap/ui/core/mvc/OverrideExecution";
23
- import Table from "sap/ui/mdc/Table";
24
- import Context from "sap/ui/model/odata/v4/Context";
25
+ import type Table from "sap/ui/mdc/Table";
26
+ import type Context from "sap/ui/model/odata/v4/Context";
25
27
  import ODataListBinding from "sap/ui/model/odata/v4/ODataListBinding";
26
- import ODataMetaModel from "sap/ui/model/odata/v4/ODataMetaModel";
27
- import ODataModel from "sap/ui/model/odata/v4/ODataModel";
28
- import { CoreEx } from "types/extension_types";
28
+ import type ODataMetaModel from "sap/ui/model/odata/v4/ODataMetaModel";
29
+ import type ODataModel from "sap/ui/model/odata/v4/ODataModel";
30
+ import type { CoreEx, V4Context } from "types/extension_types";
29
31
 
30
32
  const CreationMode = FELibrary.CreationMode,
31
33
  ProgrammingModel = FELibrary.ProgrammingModel,
32
34
  Constants = FELibrary.Constants,
33
35
  DraftStatus = FELibrary.DraftStatus,
34
36
  EditMode = FELibrary.EditMode,
37
+ StartupMode = FELibrary.StartupMode,
35
38
  MessageType = coreLibrary.MessageType;
36
39
 
37
40
  /**
@@ -58,15 +61,15 @@ class EditFlow extends ControllerExtension {
58
61
  * Creates a draft document for an existing active document.
59
62
  *
60
63
  * @memberof sap.fe.core.controllerextensions.EditFlow
61
- * @param {object} oContext Context of the active document
62
- * @returns {Promise} Promise resolves once the editable document is available
64
+ * @param oContext Context of the active document
65
+ * @returns Promise resolves once the editable document is available
63
66
  * @alias sap.fe.core.controllerextensions.EditFlow#editDocument
64
67
  * @public
65
68
  * @since 1.90.0
66
69
  */
67
70
  @publicExtension()
68
71
  @finalExtension()
69
- async editDocument(oContext: Context): Promise<void> {
72
+ async editDocument(oContext: V4Context): Promise<void> {
70
73
  const bDraftNavigation = true;
71
74
  const transactionHelper = this._getTransactionHelper();
72
75
  const oRootViewController = this._getRootViewController() as any;
@@ -124,9 +127,9 @@ class EditFlow extends ControllerExtension {
124
127
  * Updates the draft status and displays the error messages if there are errors during an update.
125
128
  *
126
129
  * @memberof sap.fe.core.controllerextensions.EditFlow
127
- * @param {object} oContext Context of the updated field
128
- * @param {object} oPromise Promise to determine when the update operation is completed. The promise should be resolved when the update operation is completed, so the draft status can be updated.
129
- * @returns {Promise} Promise resolves once draft status has been updated
130
+ * @param oContext Context of the updated field
131
+ * @param oPromise Promise to determine when the update operation is completed. The promise should be resolved when the update operation is completed, so the draft status can be updated.
132
+ * @returns Promise resolves once draft status has been updated
130
133
  * @alias sap.fe.core.controllerextensions.EditFlow#updateDocument
131
134
  * @public
132
135
  * @since 1.90.0
@@ -207,15 +210,15 @@ class EditFlow extends ControllerExtension {
207
210
  * Creates a new document.
208
211
  *
209
212
  * @memberof sap.fe.core.controllerextensions.EditFlow
210
- * @param {sap.ui.model.odata.v4.ODataListBinding|string} vListBinding ODataListBinding object or the binding path for a temporary list binding
211
- * @param {map} mInParameters Contains the following attributes:
212
- * @param {string} mInParameters.creationMode The creation mode using one of the following:
213
+ * @param vListBinding ODataListBinding object or the binding path for a temporary list binding
214
+ * @param mInParameters Contains the following attributes:
215
+ * @param mInParameters.creationMode The creation mode using one of the following:
213
216
  * NewPage - the created document is shown in a new page, depending on whether metadata 'Sync', 'Async' or 'Deferred' is used
214
217
  * Inline - The creation is done inline (in a table)
215
218
  * External - The creation is done in a different application specified via the parameter 'outbound'
216
- * @param {string} mInParameters.outbound The navigation target where the document is created in case of creationMode 'External'
217
- * @param {boolean} mInParameters.createAtEnd Specifies if the new entry should be created at the top or bottom of a table in case of creationMode 'Inline'
218
- * @returns {Promise} Promise resolves once the object has been created
219
+ * @param mInParameters.outbound The navigation target where the document is created in case of creationMode 'External'
220
+ * @param mInParameters.createAtEnd Specifies if the new entry should be created at the top or bottom of a table in case of creationMode 'Inline'
221
+ * @returns Promise resolves once the object has been created
219
222
  * @alias sap.fe.core.controllerextensions.EditFlow#createDocument
220
223
  * @public
221
224
  * @since 1.90.0
@@ -263,13 +266,13 @@ class EditFlow extends ControllerExtension {
263
266
  oTable.getBindingContext(),
264
267
  {
265
268
  data: oCreationRowObjects,
266
- customValidationFunction: (oTable.getCreationRow() as any).data("customValidationFunction")
269
+ customValidationFunction: oTable.getCreationRow().data("customValidationFunction")
267
270
  },
268
271
  this.base.getView()
269
272
  );
270
273
 
271
274
  // disableAddRowButtonForEmptyData is set to false in manifest converter (Table.ts) if customValidationFunction exists
272
- if ((oTable.getCreationRow() as any).data("disableAddRowButtonForEmptyData") === "true") {
275
+ if (oTable.getCreationRow().data("disableAddRowButtonForEmptyData") === "true") {
273
276
  const oInternalModelContext = oTable.getBindingContext("internal") as InternalModelContext;
274
277
  oInternalModelContext.setProperty("creationRowFieldValidity", {});
275
278
  }
@@ -279,10 +282,14 @@ class EditFlow extends ControllerExtension {
279
282
  oTable = this.getView().byId(mParameters.tableId) as Table;
280
283
  }
281
284
 
282
- /**
283
- * @param {sap.ui.model.odata.v4.ODataListBinding} oListBinding
284
- * @param {object} oCreationPromise
285
- */
285
+ if (oTable && oTable.isA("sap.ui.mdc.Table")) {
286
+ const fnFocusOrScroll =
287
+ mParameters.creationMode === CreationMode.Inline ? oTable.focusRow.bind(oTable) : oTable.scrollToIndex.bind(oTable);
288
+ oTable.getRowBinding().attachEventOnce("change", function () {
289
+ fnFocusOrScroll(mParameters.createAtEnd ? oTable.getRowBinding().getLength() : 0, true);
290
+ });
291
+ }
292
+
286
293
  const handleSideEffects = (oListBinding: any, oCreationPromise: Promise<Context>) => {
287
294
  oCreationPromise
288
295
  .then(function (oNewContext: any) {
@@ -295,8 +302,8 @@ class EditFlow extends ControllerExtension {
295
302
  // this is avoid a potential list refresh, there could be a side effect that refreshes the list binding
296
303
  // if list binding is refreshed, transient contexts might be lost
297
304
  if (!CommonUtils.hasTransientContext(oListBinding)) {
298
- const oAppComponent = CommonUtils.getAppComponent(this.getView());
299
- oAppComponent
305
+ const appComponent = CommonUtils.getAppComponent(this.getView());
306
+ appComponent
300
307
  .getSideEffectsService()
301
308
  .requestSideEffectsForNavigationProperty(oListBinding.getPath(), oBindingContext);
302
309
  }
@@ -307,10 +314,10 @@ class EditFlow extends ControllerExtension {
307
314
  };
308
315
 
309
316
  /**
310
- * @param {Array} aValidationMessages Error messages from custom validation function
317
+ * @param aValidationMessages Error messages from custom validation function
311
318
  */
312
319
  const createCustomValidationMessages = (aValidationMessages: any[]) => {
313
- const sCustomValidationFunction = oTable && (oTable.getCreationRow() as any).data("customValidationFunction");
320
+ const sCustomValidationFunction = oTable && oTable.getCreationRow().data("customValidationFunction");
314
321
  const mCustomValidity = oTable && oTable.getBindingContext("internal")?.getProperty("creationRowCustomValidity");
315
322
  const oMessageManager = Core.getMessageManager();
316
323
  const aCustomMessages: any[] = [];
@@ -331,7 +338,7 @@ class EditFlow extends ControllerExtension {
331
338
  // Handle Bound CustomValidation message
332
339
  if (oValidationMessage.messageTarget) {
333
340
  oFieldControl = Core.getControl(mCustomValidity[oValidationMessage.messageTarget].fieldId) as Control;
334
- sTarget = oFieldControl.getBindingContext()?.getPath() + "/" + oFieldControl.getBindingPath("value");
341
+ sTarget = `${oFieldControl.getBindingContext()?.getPath()}/${oFieldControl.getBindingPath("value")}`;
335
342
  // Add validation message if still not exists
336
343
  if (
337
344
  oMessageManager
@@ -379,8 +386,9 @@ class EditFlow extends ControllerExtension {
379
386
  });
380
387
  }
381
388
  };
382
-
383
- bShouldBusyLock && BusyLocker.lock(oLockObject);
389
+ if (bShouldBusyLock) {
390
+ BusyLocker.lock(oLockObject);
391
+ }
384
392
  return this._syncTask(oExecCustomValidation)
385
393
  .then((aValidationMessages: any) => {
386
394
  if (aValidationMessages.length > 0) {
@@ -424,12 +432,12 @@ class EditFlow extends ControllerExtension {
424
432
  // in the absence of NewAction or NewAction with parameters, creation is async
425
433
  sNewAction =
426
434
  sProgrammingModel === ProgrammingModel.Draft
427
- ? oMetaModel.getObject(sPath + "@com.sap.vocabularies.Common.v1.DraftRoot/NewAction")
435
+ ? oMetaModel.getObject(`${sPath}@com.sap.vocabularies.Common.v1.DraftRoot/NewAction`)
428
436
  : oMetaModel.getObject(
429
- sPath + "@com.sap.vocabularies.Session.v1.StickySessionSupported/NewAction"
437
+ `${sPath}@com.sap.vocabularies.Session.v1.StickySessionSupported/NewAction`
430
438
  );
431
439
  if (sNewAction) {
432
- const aParameters = oMetaModel.getObject("/" + sNewAction + "/@$ui5.overload/0/$Parameter") || [];
440
+ const aParameters = oMetaModel.getObject(`/${sNewAction}/@$ui5.overload/0/$Parameter`) || [];
433
441
  // binding parameter (eg: _it) is not considered
434
442
  if (aParameters.length > 1) {
435
443
  return CreationMode.Deferred;
@@ -448,7 +456,7 @@ class EditFlow extends ControllerExtension {
448
456
  return CreationMode.Async;
449
457
  }
450
458
  })
451
- .then((sCreationMode: any) => {
459
+ .then((resolvedCreationMode: any) => {
452
460
  let oCreation: any;
453
461
  let mArgs: any;
454
462
  const oCreationRow = mParameters.creationRow;
@@ -459,15 +467,15 @@ class EditFlow extends ControllerExtension {
459
467
  const oMetaModel = oModel.getMetaModel();
460
468
  const oRoutingListener = this._getRoutingListener();
461
469
 
462
- if (sCreationMode !== CreationMode.Deferred) {
463
- if (sCreationMode === CreationMode.CreationRow) {
470
+ if (resolvedCreationMode !== CreationMode.Deferred) {
471
+ if (resolvedCreationMode === CreationMode.CreationRow) {
464
472
  oCreationRowContext = oCreationRow.getBindingContext();
465
473
  sMetaPath = oMetaModel.getMetaPath(oCreationRowContext.getPath());
466
474
  // prefill data from creation row
467
475
  oPayload = oCreationRowContext.getObject();
468
476
  mParameters.data = {};
469
477
  Object.keys(oPayload).forEach(function (sPropertyPath: string) {
470
- const oProperty = oMetaModel.getObject(sMetaPath + "/" + sPropertyPath);
478
+ const oProperty = oMetaModel.getObject(`${sMetaPath}/${sPropertyPath}`);
471
479
  // ensure navigation properties are not part of the payload, deep create not supported
472
480
  if (oProperty && oProperty.$kind === "NavigationProperty") {
473
481
  return;
@@ -476,7 +484,7 @@ class EditFlow extends ControllerExtension {
476
484
  });
477
485
  oValidationCheck = this._checkForValidationErrors(/*oCreationRowContext*/);
478
486
  }
479
- if (sCreationMode === CreationMode.CreationRow || sCreationMode === CreationMode.Inline) {
487
+ if (resolvedCreationMode === CreationMode.CreationRow || resolvedCreationMode === CreationMode.Inline) {
480
488
  mParameters.keepTransientContextOnFailed = false; // currently not fully supported
481
489
  // busy handling shall be done locally only
482
490
  mParameters.busyMode = "Local";
@@ -503,7 +511,7 @@ class EditFlow extends ControllerExtension {
503
511
  }
504
512
 
505
513
  let oNavigation;
506
- switch (sCreationMode) {
514
+ switch (resolvedCreationMode) {
507
515
  case CreationMode.Deferred:
508
516
  oNavigation = oRoutingListener.navigateForwardToContext(oListBinding, {
509
517
  bDeferredContext: true,
@@ -528,12 +536,12 @@ class EditFlow extends ControllerExtension {
528
536
  }
529
537
  oNavigation = oCreation.then(function (oNewDocumentContext: any) {
530
538
  if (!oNewDocumentContext) {
531
- const oResourceBundle = (Core as CoreEx).getLibraryResourceBundle("sap.fe.core");
539
+ const coreResourceBundle = (Core as CoreEx).getLibraryResourceBundle("sap.fe.core");
532
540
  return oRoutingListener.navigateToMessagePage(
533
- oResourceBundle.getText("C_COMMON_SAPFE_DATA_RECEIVED_ERROR"),
541
+ coreResourceBundle.getText("C_COMMON_SAPFE_DATA_RECEIVED_ERROR"),
534
542
  {
535
- title: oResourceBundle.getText("C_COMMON_SAPFE_ERROR"),
536
- description: oResourceBundle.getText("C_EDITFLOW_SAPFE_CREATION_FAILED_DESCRIPTION")
543
+ title: coreResourceBundle.getText("C_COMMON_SAPFE_ERROR"),
544
+ description: coreResourceBundle.getText("C_EDITFLOW_SAPFE_CREATION_FAILED_DESCRIPTION")
537
545
  }
538
546
  );
539
547
  } else {
@@ -574,7 +582,7 @@ class EditFlow extends ControllerExtension {
574
582
  });
575
583
  break;
576
584
  default:
577
- oNavigation = Promise.reject("Unhandled creationMode " + sCreationMode);
585
+ oNavigation = Promise.reject(`Unhandled creationMode ${resolvedCreationMode}`);
578
586
  break;
579
587
  }
580
588
 
@@ -618,14 +626,9 @@ class EditFlow extends ControllerExtension {
618
626
  });
619
627
  })
620
628
  .finally(function () {
621
- if (oTable && oTable.isA("sap.ui.mdc.Table")) {
622
- const fnFocusOrScroll =
623
- mParameters.creationMode === CreationMode.Inline ? oTable.focusRow.bind(oTable) : oTable.scrollToIndex.bind(oTable);
624
- oTable.getRowBinding().attachEventOnce("change", function () {
625
- fnFocusOrScroll(mParameters.createAtEnd ? oTable.getRowBinding().getLength() : 0, true);
626
- });
629
+ if (bShouldBusyLock) {
630
+ BusyLocker.unlock(oLockObject);
627
631
  }
628
- bShouldBusyLock && BusyLocker.unlock(oLockObject);
629
632
  });
630
633
  }
631
634
 
@@ -636,9 +639,10 @@ class EditFlow extends ControllerExtension {
636
639
  *
637
640
  * This function is meant to be individually overridden by consuming controllers, but not to be called directly.
638
641
  * The override execution is: {@link sap.ui.core.mvc.OverrideExecution.After}.
639
- * @param {object} mParameters Object containing the parameters passed to onBeforeSave
640
- * @param {sap.ui.model.odata.v4.Context} mParameters.context Page context that is going to be saved.
641
- * @returns {Promise} A promise to be returned by the overridden method. If resolved, the 'Save' action is triggered. If rejected, the 'Save' action is not triggered and the user stays in edit mode.
642
+ *
643
+ * @param mParameters Object containing the parameters passed to onBeforeSave
644
+ * @param mParameters.context Page context that is going to be saved.
645
+ * @returns A promise to be returned by the overridden method. If resolved, the 'Save' action is triggered. If rejected, the 'Save' action is not triggered and the user stays in edit mode.
642
646
  * @memberof sap.fe.core.controllerextensions.EditFlow
643
647
  * @alias sap.fe.core.controllerextensions.EditFlow#onBeforeSave
644
648
  * @public
@@ -658,10 +662,11 @@ class EditFlow extends ControllerExtension {
658
662
  *
659
663
  * This function is meant to be individually overridden by consuming controllers, but not to be called directly.
660
664
  * The override execution is: {@link sap.ui.core.mvc.OverrideExecution.After}.
661
- * @param {map} mParameters Object containing the parameters passed to onBeforeCreate
662
- * @param {string} mParameters.contextPath Path pointing to the context on which Create action is triggered
663
- * @param {Array} mParameters.createParameters Array of values that are filled in the Action Parameter Dialog
664
- * @returns {Promise} A promise to be returned by the overridden method. If resolved, the 'Create' action is triggered. If rejected, the 'Create' action is not triggered.
665
+ *
666
+ * @param mParameters Object containing the parameters passed to onBeforeCreate
667
+ * @param mParameters.contextPath Path pointing to the context on which Create action is triggered
668
+ * @param mParameters.createParameters Array of values that are filled in the Action Parameter Dialog
669
+ * @returns A promise to be returned by the overridden method. If resolved, the 'Create' action is triggered. If rejected, the 'Create' action is not triggered.
665
670
  * @memberof sap.fe.core.controllerextensions.EditFlow
666
671
  * @alias sap.fe.core.controllerextensions.EditFlow#onBeforeCreate
667
672
  * @public
@@ -681,9 +686,10 @@ class EditFlow extends ControllerExtension {
681
686
  *
682
687
  * This function is meant to be individually overridden by consuming controllers, but not to be called directly.
683
688
  * The override execution is: {@link sap.ui.core.mvc.OverrideExecution.After}.
684
- * @param {object} mParameters Object containing the parameters passed to onBeforeEdit
685
- * @param {sap.ui.model.odata.v4.Context} mParameters.context Page context that is going to be edited.
686
- * @returns {Promise} A promise to be returned by the overridden method. If resolved, the 'Edit' action is triggered. If rejected, the 'Edit' action is not triggered and the user stays in display mode.
689
+ *
690
+ * @param mParameters Object containing the parameters passed to onBeforeEdit
691
+ * @param mParameters.context Page context that is going to be edited.
692
+ * @returns A promise to be returned by the overridden method. If resolved, the 'Edit' action is triggered. If rejected, the 'Edit' action is not triggered and the user stays in display mode.
687
693
  * @memberof sap.fe.core.controllerextensions.EditFlow
688
694
  * @alias sap.fe.core.controllerextensions.EditFlow#onBeforeEdit
689
695
  * @public
@@ -703,9 +709,10 @@ class EditFlow extends ControllerExtension {
703
709
  *
704
710
  * This function is meant to be individually overridden by consuming controllers, but not to be called directly.
705
711
  * The override execution is: {@link sap.ui.core.mvc.OverrideExecution.After}.
706
- * @param {object} mParameters Object containing the parameters passed to onBeforeDiscard
707
- * @param {sap.ui.model.odata.v4.Context} mParameters.context Page context that is going to be discarded.
708
- * @returns {Promise} A promise to be returned by the overridden method. If resolved, the 'Discard' action is triggered. If rejected, the 'Discard' action is not triggered and the user stays in edit mode.
712
+ *
713
+ * @param mParameters Object containing the parameters passed to onBeforeDiscard
714
+ * @param mParameters.context Page context that is going to be discarded.
715
+ * @returns A promise to be returned by the overridden method. If resolved, the 'Discard' action is triggered. If rejected, the 'Discard' action is not triggered and the user stays in edit mode.
709
716
  * @memberof sap.fe.core.controllerextensions.EditFlow
710
717
  * @alias sap.fe.core.controllerextensions.EditFlow#onBeforeDiscard
711
718
  * @public
@@ -725,9 +732,10 @@ class EditFlow extends ControllerExtension {
725
732
  *
726
733
  * This function is meant to be individually overridden by consuming controllers, but not to be called directly.
727
734
  * The override execution is: {@link sap.ui.core.mvc.OverrideExecution.After}.
728
- * @param {object} mParameters Object containing the parameters passed to onBeforeDelete
729
- * @param {Array} mParameters.contexts An array of contexts that are going to be deleted
730
- * @returns {Promise} A promise to be returned by the overridden method. If resolved, the 'Delete' action is triggered. If rejected, the 'Delete' action is not triggered.
735
+ *
736
+ * @param mParameters Object containing the parameters passed to onBeforeDelete
737
+ * @param mParameters.contexts An array of contexts that are going to be deleted
738
+ * @returns A promise to be returned by the overridden method. If resolved, the 'Delete' action is triggered. If rejected, the 'Delete' action is not triggered.
731
739
  * @memberof sap.fe.core.controllerextensions.EditFlow
732
740
  * @alias sap.fe.core.controllerextensions.EditFlow#onBeforeDelete
733
741
  * @public
@@ -752,15 +760,15 @@ class EditFlow extends ControllerExtension {
752
760
  * Saves a new document after checking it.
753
761
  *
754
762
  * @memberof sap.fe.core.controllerextensions.EditFlow
755
- * @param {object} oContext Context of the editable document
756
- * @returns {Promise} Promise resolves once save is complete
763
+ * @param oContext Context of the editable document
764
+ * @returns Promise resolves once save is complete
757
765
  * @alias sap.fe.core.controllerextensions.EditFlow#saveDocument
758
766
  * @public
759
767
  * @since 1.90.0
760
768
  */
761
769
  @publicExtension()
762
770
  @finalExtension()
763
- async saveDocument(oContext: Context, mParameters: any): Promise<void> {
771
+ async saveDocument(oContext: V4Context, mParameters: any): Promise<void> {
764
772
  mParameters = mParameters || {};
765
773
  const bExecuteSideEffectsOnError = mParameters.bExecuteSideEffectsOnError || undefined;
766
774
  const bDraftNavigation = true;
@@ -802,7 +810,7 @@ class EditFlow extends ControllerExtension {
802
810
  this._removeStickySessionInternalProperties(sProgrammingModel);
803
811
 
804
812
  this._sendActivity(Activity.Activate, activeDocumentContext);
805
- this._triggerConfiguredSurvey(standardActions.save, triggerType.standardAction);
813
+ this._triggerConfiguredSurvey(StandardActions.save, TriggerType.standardAction);
806
814
 
807
815
  this._setEditMode(EditMode.Display, false);
808
816
  this._getMessageHandler().showMessageDialog();
@@ -828,7 +836,7 @@ class EditFlow extends ControllerExtension {
828
836
  }
829
837
  @publicExtension()
830
838
  @finalExtension()
831
- async toggleDraftActive(oContext: Context): Promise<void> {
839
+ async toggleDraftActive(oContext: V4Context): Promise<void> {
832
840
  const oContextData = oContext.getObject();
833
841
  let bEditable: boolean;
834
842
  const bIsDraft = oContext && this._getProgrammingModel(oContext) === ProgrammingModel.Draft;
@@ -863,7 +871,7 @@ class EditFlow extends ControllerExtension {
863
871
  const lastSemanticMapping = this._getSemanticMapping();
864
872
  if (lastSemanticMapping?.technicalPath === oContext.getPath()) {
865
873
  const targetPath = siblingInfo.pathMapping[siblingInfo.pathMapping.length - 1].newPath;
866
- siblingInfo.pathMapping.push({ oldPath: lastSemanticMapping!.semanticPath, newPath: targetPath });
874
+ siblingInfo.pathMapping.push({ oldPath: lastSemanticMapping.semanticPath, newPath: targetPath });
867
875
  }
868
876
  this._updatePathsInHistory(siblingInfo.pathMapping);
869
877
  }
@@ -873,7 +881,7 @@ class EditFlow extends ControllerExtension {
873
881
  return Promise.reject("Error in EditFlow.toggleDraftActive - Cannot find sibling");
874
882
  }
875
883
  } catch (oError) {
876
- return Promise.reject(("Error in EditFlow.toggleDraftActive:" + oError) as any);
884
+ return Promise.reject(`Error in EditFlow.toggleDraftActive:${oError}` as any);
877
885
  }
878
886
  }
879
887
 
@@ -886,17 +894,17 @@ class EditFlow extends ControllerExtension {
886
894
  *
887
895
  * @memberof sap.fe.core.controllerextensions.EditFlow
888
896
  * @param oContext Context of the editable document
889
- * @param {map} mParameters Can contain the following attributes:
890
- * @param {object} mParameters.control This is the control used to open the discard popover
891
- * @param {boolean} mParameters.skipDiscardPopover Optional, supresses the discard popover and allows custom handling
892
- * @returns {Promise} Promise resolves once editable document has been discarded
897
+ * @param mParameters Can contain the following attributes:
898
+ * @param mParameters.control This is the control used to open the discard popover
899
+ * @param mParameters.skipDiscardPopover Optional, supresses the discard popover and allows custom handling
900
+ * @returns Promise resolves once editable document has been discarded
893
901
  * @alias sap.fe.core.controllerextensions.EditFlow#cancelDocument
894
902
  * @public
895
903
  * @since 1.90.0
896
904
  */
897
905
  @publicExtension()
898
906
  @finalExtension()
899
- async cancelDocument(oContext: Context, mParameters: { control: object; skipDiscardPopover?: boolean }): Promise<any> {
907
+ async cancelDocument(oContext: V4Context, mParameters: { control: object; skipDiscardPopover?: boolean }): Promise<any> {
900
908
  const transactionHelper = this._getTransactionHelper();
901
909
  const oResourceBundle = this._getResourceBundle();
902
910
  const mInParameters: any = mParameters;
@@ -983,11 +991,11 @@ class EditFlow extends ControllerExtension {
983
991
  * Deletes the document.
984
992
  *
985
993
  * @memberof sap.fe.core.controllerextensions.EditFlow
986
- * @param {object} oContext Context of the document
987
- * @param {object} mInParameters Can contain the following attributes:
988
- * @param {string} mInParameters.title Title of the object being deleted
989
- * @param {string} mInParameters.description Description of the object being deleted
990
- * @returns {Promise} Promise resolves once document has been deleted
994
+ * @param oContext Context of the document
995
+ * @param mInParameters Can contain the following attributes:
996
+ * @param mInParameters.title Title of the object being deleted
997
+ * @param mInParameters.description Description of the object being deleted
998
+ * @returns Promise resolves once document has been deleted
991
999
  * @alias sap.fe.core.controllerextensions.EditFlow#deleteDocument
992
1000
  * @public
993
1001
  * @since 1.90.0
@@ -1014,11 +1022,18 @@ class EditFlow extends ControllerExtension {
1014
1022
  }
1015
1023
  this._sendActivity(Activity.Delete, oContext);
1016
1024
 
1017
- this._getRoutingListener().navigateBackFromContext(oContext);
1018
- // After delete is successfull, we need to dettch the setBackNavigation Methods
1025
+ // After delete is successfull, we need to detach the setBackNavigation Methods
1019
1026
  if (oAppComponent) {
1020
1027
  oAppComponent.getShellServices().setBackNavigation();
1021
1028
  }
1029
+
1030
+ if (oAppComponent?.getStartupMode() === StartupMode.Deeplink && !this._isFclEnabled()) {
1031
+ // In case the app has been launched with semantic keys, deleting the object we've landed on shall navigate back
1032
+ // to the app we came from (except for FCL, where we navigate to LR as usual)
1033
+ oAppComponent.getRouterProxy().exitFromApp();
1034
+ } else {
1035
+ this._getRoutingListener().navigateBackFromContext(oContext);
1036
+ }
1022
1037
  })
1023
1038
  .catch(function (oError: any) {
1024
1039
  Log.error("Error while deleting the document", oError);
@@ -1029,8 +1044,8 @@ class EditFlow extends ControllerExtension {
1029
1044
  * Submit the current set of changes and navigate back.
1030
1045
  *
1031
1046
  * @memberof sap.fe.core.controllerextensions.EditFlow
1032
- * @param {object} oContext Context of the document
1033
- * @returns {Promise} Promise resolves once the changes have been saved
1047
+ * @param oContext Context of the document
1048
+ * @returns Promise resolves once the changes have been saved
1034
1049
  * @alias sap.fe.core.controllerextensions.EditFlow#applyDocument
1035
1050
  * @public
1036
1051
  * @since 1.90.0
@@ -1063,20 +1078,20 @@ class EditFlow extends ControllerExtension {
1063
1078
  * Invokes an action (bound or unbound) and tracks the changes so that other pages can be refreshed and show the updated data upon navigation.
1064
1079
  *
1065
1080
  * @memberof sap.fe.core.controllerextensions.EditFlow
1066
- * @param {string} sActionName The name of the action to be called
1067
- * @param {object} mInParameters Contains the following attributes:
1068
- * @param {sap.ui.model.odata.v4.Context} mInParameters.contexts For a bound action, a context or an array with contexts for which the action is to be called must be provided
1069
- * @param {sap.ui.model.odata.v4.ODataModel} mInParameters.model For an unbound action, an instance of an OData V4 model must be provided
1070
- * @param {boolean} mInParameters.requiresNavigation Boolean value indicating whether navigation is required after the action has been executed. Navigation takes place to the context returned by the action
1071
- * @param {string} mInParameters.label A human-readable label for the action. This is needed in case the action has a parameter and a parameter dialog is shown to the user. The label will be used for the title of the dialog and for the confirmation button
1072
- * @param {string} mInParameters.invocationGrouping Mode how actions are to be called: 'ChangeSet' to put all action calls into one changeset, 'Isolated' to put them into separate changesets
1073
- * @param {object} mExtraParams PRIVATE
1074
- * @returns {Promise}
1081
+ * @param sActionName The name of the action to be called
1082
+ * @param mInParameters Contains the following attributes:
1083
+ * @param mInParameters.contexts For a bound action, a context or an array with contexts for which the action is to be called must be provided
1084
+ * @param mInParameters.model For an unbound action, an instance of an OData V4 model must be provided
1085
+ * @param mInParameters.requiresNavigation Boolean value indicating whether navigation is required after the action has been executed. Navigation takes place to the context returned by the action
1086
+ * @param mInParameters.label A human-readable label for the action. This is needed in case the action has a parameter and a parameter dialog is shown to the user. The label will be used for the title of the dialog and for the confirmation button
1087
+ * @param mInParameters.invocationGrouping Mode how actions are to be called: 'ChangeSet' to put all action calls into one changeset, 'Isolated' to put them into separate changesets
1088
+ * @param mExtraParams PRIVATE
1089
+ * @returns A promise once the action has been invoked
1075
1090
  * @alias sap.fe.core.controllerextensions.EditFlow#invokeAction
1076
1091
  * @public
1077
1092
  * @since 1.90.0
1078
1093
  * @final
1079
- **/
1094
+ */
1080
1095
  @publicExtension()
1081
1096
  @finalExtension()
1082
1097
  invokeAction(
@@ -1181,7 +1196,7 @@ class EditFlow extends ControllerExtension {
1181
1196
  }
1182
1197
 
1183
1198
  if (!mParameters.contexts) {
1184
- return Promise.reject("Context not found for entity type " + sOverloadEntityType);
1199
+ return Promise.reject(`Context not found for entity type ${sOverloadEntityType}`);
1185
1200
  }
1186
1201
  }
1187
1202
  }
@@ -1209,7 +1224,7 @@ class EditFlow extends ControllerExtension {
1209
1224
  })
1210
1225
  .then((oResponse: any) => {
1211
1226
  this._sendActivity(Activity.Action, mParameters.contexts);
1212
- this._triggerConfiguredSurvey(sActionName, triggerType.action);
1227
+ this._triggerConfiguredSurvey(sActionName, TriggerType.action);
1213
1228
 
1214
1229
  if (oCurrentActionCallBacks) {
1215
1230
  oCurrentActionCallBacks.fResolver(oResponse);
@@ -1260,10 +1275,8 @@ class EditFlow extends ControllerExtension {
1260
1275
  }
1261
1276
  if (err == Constants.CancelActionDialog) {
1262
1277
  return Promise.reject("Dialog cancelled.");
1263
- } else {
1264
- if (!(err && (err.canceled || (err.rejectedItems && err.rejectedItems[0].canceled)))) {
1265
- return Promise.reject("Error in EditFlow.invokeAction:" + err);
1266
- }
1278
+ } else if (!(err && (err.canceled || (err.rejectedItems && err.rejectedItems[0].canceled)))) {
1279
+ return Promise.reject(`Error in EditFlow.invokeAction:${err}`);
1267
1280
  }
1268
1281
  });
1269
1282
  }
@@ -1272,13 +1285,13 @@ class EditFlow extends ControllerExtension {
1272
1285
  * Secured execution of the given function. Ensures that the function is only executed when certain conditions are fulfilled.
1273
1286
  *
1274
1287
  * @memberof sap.fe.core.controllerextensions.EditFlow
1275
- * @param {Function} fnFunction The function to be executed. Should return a promise that is settled after completion of the execution. If nothing is returned, immediate completion is assumed.
1276
- * @param {object} mParameters Definitions of the preconditions to be checked before execution
1277
- * @param {object} mParameters.busy Defines the busy indicator
1278
- * @param {boolean} mParameters.busy.set Triggers a busy indicator when the function is executed.
1279
- * @param {boolean} mParameters.busy.check Executes function only if application isn't busy.
1280
- * @param {boolean} mParameters.updatesDocument This operation updates the current document without using the bound model and context. As a result, the draft status is updated if a draft document exists, and the user has to confirm the cancellation of the editing process.
1281
- * @returns {Promise} A promise that is rejected if the execution is prohibited and resolved by the promise returned by the fnFunction.
1288
+ * @param fnFunction The function to be executed. Should return a promise that is settled after completion of the execution. If nothing is returned, immediate completion is assumed.
1289
+ * @param mParameters Definitions of the preconditions to be checked before execution
1290
+ * @param mParameters.busy Defines the busy indicator
1291
+ * @param mParameters.busy.set Triggers a busy indicator when the function is executed.
1292
+ * @param mParameters.busy.check Executes function only if application isn't busy.
1293
+ * @param mParameters.updatesDocument This operation updates the current document without using the bound model and context. As a result, the draft status is updated if a draft document exists, and the user has to confirm the cancellation of the editing process.
1294
+ * @returns A promise that is rejected if the execution is prohibited and resolved by the promise returned by the fnFunction.
1282
1295
  * @alias sap.fe.core.controllerextensions.EditFlow#securedExecution
1283
1296
  * @public
1284
1297
  * @experimental As of version 1.90.0
@@ -1339,7 +1352,7 @@ class EditFlow extends ControllerExtension {
1339
1352
  if (bBusySet) {
1340
1353
  BusyLocker.unlock(oLockObject);
1341
1354
  }
1342
- return this._getMessageHandler().showMessageDialog();
1355
+ this._getMessageHandler().showMessageDialog();
1343
1356
  });
1344
1357
  }
1345
1358
 
@@ -1353,8 +1366,8 @@ class EditFlow extends ControllerExtension {
1353
1366
  if (!(this.base.getView()?.getBindingContext("internal") as InternalModelContext)?.getProperty("skipPatchHandlers")) {
1354
1367
  // Create a promise that will be resolved or rejected when the path is completed
1355
1368
  const oPatchPromise = new Promise<void>((resolve, reject) => {
1356
- oEvent.getSource().attachEventOnce("patchCompleted", (oEvent: any) => {
1357
- const bSuccess = oEvent.getParameter("success");
1369
+ oEvent.getSource().attachEventOnce("patchCompleted", (patchCompletedEvent: any) => {
1370
+ const bSuccess = patchCompletedEvent.getParameter("success");
1358
1371
  if (bSuccess) {
1359
1372
  resolve();
1360
1373
  } else {
@@ -1455,7 +1468,6 @@ class EditFlow extends ControllerExtension {
1455
1468
  * @function
1456
1469
  * @name _createActionPromise
1457
1470
  * @memberof sap.fe.core.controllerextensions.EditFlow
1458
- *
1459
1471
  * @returns {Function} The resolver function which can be used to externally resolve the promise
1460
1472
  */
1461
1473
 
@@ -1480,7 +1492,7 @@ class EditFlow extends ControllerExtension {
1480
1492
  send(this.getView(), action, content);
1481
1493
  }
1482
1494
 
1483
- _triggerConfiguredSurvey(sActionName: string, triggerType: triggerType) {
1495
+ _triggerConfiguredSurvey(sActionName: string, triggerType: TriggerType) {
1484
1496
  triggerConfiguredSurvey(this.getView(), sActionName, triggerType);
1485
1497
  }
1486
1498
 
@@ -1488,9 +1500,9 @@ class EditFlow extends ControllerExtension {
1488
1500
  * @function
1489
1501
  * @name _getActionResponseDataAndKeys
1490
1502
  * @memberof sap.fe.core.controllerextensions.EditFlow
1491
- * @param {string} sActionName The name of the action that is executed
1492
- * @param {object} oResponse The bound action's response data or response context
1493
- * @returns {object} Object with data and names of the key fields of the response
1503
+ * @param sActionName The name of the action that is executed
1504
+ * @param oResponse The bound action's response data or response context
1505
+ * @returns Object with data and names of the key fields of the response
1494
1506
  */
1495
1507
  _getActionResponseDataAndKeys(sActionName: string, oResponse: object) {
1496
1508
  return (this.base.getView().getController() as PageController)._editFlow.getActionResponseDataAndKeys(sActionName, oResponse);
@@ -1580,7 +1592,7 @@ class EditFlow extends ControllerExtension {
1580
1592
  }
1581
1593
 
1582
1594
  _getBoundContext(view: any, params: any) {
1583
- const viewLevel = (view.getViewData() as any).viewLevel;
1595
+ const viewLevel = view.getViewData().viewLevel;
1584
1596
  const bRefreshAfterAction = viewLevel > 1 || (viewLevel === 1 && params.controlId);
1585
1597
  return !params.isNavigable || !!bRefreshAfterAction;
1586
1598
  }
@@ -1624,9 +1636,9 @@ class EditFlow extends ControllerExtension {
1624
1636
  * @function
1625
1637
  * @name _refreshListIfRequired
1626
1638
  * @memberof sap.fe.core.controllerextensions.EditFlow
1627
- * @param {object} oResponse The response of the bound action and the names of the key fields
1628
- * @param {sap.ui.model.odata.v4.Context} oContext The bound context on which the action was executed
1629
- * @returns {Promise} Always resolves to param oResponse
1639
+ * @param oResponse The response of the bound action and the names of the key fields
1640
+ * @param oContext The bound context on which the action was executed
1641
+ * @returns Always resolves to param oResponse
1630
1642
  */
1631
1643
  _refreshListIfRequired(oResponse: any, oContext: Context) {
1632
1644
  if (!oContext || !oResponse || !oResponse.oData) {
@@ -1786,7 +1798,7 @@ class EditFlow extends ControllerExtension {
1786
1798
  }
1787
1799
  }
1788
1800
 
1789
- _createSiblingInfo(currentContext: Context, newContext: Context): SiblingInformation {
1801
+ _createSiblingInfo(currentContext: V4Context, newContext: V4Context): SiblingInformation {
1790
1802
  return {
1791
1803
  targetContext: newContext,
1792
1804
  pathMapping: [
@@ -1810,21 +1822,22 @@ class EditFlow extends ControllerExtension {
1810
1822
  }
1811
1823
 
1812
1824
  /**
1813
- * This methods creates a sibling context for a sub-object page, and calculates a sibling path for
1825
+ * This methods creates a sibling context for a subobject page, and calculates a sibling path for
1814
1826
  * all intermediates paths between the OP and the sub-OP.
1815
1827
  *
1816
- * @param {object} rootCurrentContext The context for the root of the draft
1817
- * @param {object} rightmostCurrentContext The context of the sub-object
1818
- * @param {string} sProgrammingModel The programming model
1819
- * @param {boolean} doNotComputeIfRoot If true, we don't compute siblingInfo if the root and the rightmost contexts are the same
1820
- * @returns {Promise} Returns the siblingInformation object
1828
+ * @param rootCurrentContext The context for the root of the draft
1829
+ * @param rightmostCurrentContext The context of the subobject
1830
+ * @param sProgrammingModel The programming model
1831
+ * @param doNotComputeIfRoot If true, we don't compute siblingInfo if the root and the rightmost contexts are the same
1832
+ * @returns Returns the siblingInformation object
1821
1833
  */
1822
1834
  async _computeSiblingInformation(
1823
- rootCurrentContext: Context,
1824
- rightmostCurrentContext: Context,
1835
+ rootCurrentContext: V4Context,
1836
+ rightmostCurrentContext: V4Context | null | undefined,
1825
1837
  sProgrammingModel: string,
1826
1838
  doNotComputeIfRoot: boolean
1827
1839
  ): Promise<SiblingInformation | undefined> {
1840
+ rightmostCurrentContext = rightmostCurrentContext ?? rootCurrentContext;
1828
1841
  if (!rightmostCurrentContext.getPath().startsWith(rootCurrentContext.getPath())) {
1829
1842
  // Wrong usage !!
1830
1843
  Log.error("Cannot compute rightmost sibling context");
@@ -1841,7 +1854,7 @@ class EditFlow extends ControllerExtension {
1841
1854
  // If not in draft mode, we just recreate a context from the path of the rightmost context
1842
1855
  // No path mapping is needed
1843
1856
  return {
1844
- targetContext: model.bindContext(rightmostCurrentContext.getPath()).getBoundContext() as Context,
1857
+ targetContext: model.bindContext(rightmostCurrentContext.getPath()).getBoundContext(),
1845
1858
  pathMapping: []
1846
1859
  };
1847
1860
  }