@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,28 +1,13 @@
1
- import { EntityType } from "@sap-ux/annotation-converter";
2
- import { DataFieldForActionTypes, DataFieldForIntentBasedNavigationTypes, PropertyAnnotationValue } from "@sap-ux/vocabularies-types";
3
- import {
4
- AnnotationAction,
5
- BaseAction,
6
- ButtonType,
7
- getEnabledForAnnotationAction,
8
- getSemanticObjectMapping
9
- } from "sap/fe/core/converters/controls/Common/Action";
1
+ import type { EntityType, PropertyAnnotationValue } from "@sap-ux/vocabularies-types";
2
+ import type { DataFieldForActionTypes, DataFieldForIntentBasedNavigationTypes } from "@sap-ux/vocabularies-types/vocabularies/UI";
3
+ import type { AnnotationAction, BaseAction } from "sap/fe/core/converters/controls/Common/Action";
4
+ import { ButtonType, getEnabledForAnnotationAction, getSemanticObjectMapping } from "sap/fe/core/converters/controls/Common/Action";
10
5
  import { Placement } from "sap/fe/core/converters/helpers/ConfigurableObject";
11
6
  import { KeyHelper } from "sap/fe/core/converters/helpers/Key";
12
- import {
13
- and,
14
- annotationExpression,
15
- BindingExpression,
16
- compileBinding,
17
- constant,
18
- equal,
19
- Expression,
20
- fn,
21
- ifElse,
22
- not
23
- } from "sap/fe/core/helpers/BindingExpression";
7
+ import type { BindingToolkitExpression, CompiledBindingToolkitExpression } from "sap/fe/core/helpers/BindingToolkit";
8
+ import { and, compileExpression, constant, equal, fn, getExpressionFromAnnotation, ifElse, not } from "sap/fe/core/helpers/BindingToolkit";
24
9
  import { isPathDeletable } from "sap/fe/core/templating/DataModelPathHelper";
25
- import ConverterContext from "../ConverterContext";
10
+ import type ConverterContext from "../ConverterContext";
26
11
  import { Draft, singletonPathVisitor, UI } from "../helpers/BindingHelper";
27
12
  import { ActionType } from "../ManifestSettings";
28
13
 
@@ -32,9 +17,9 @@ import { ActionType } from "../ManifestSettings";
32
17
  * - Not statically hidden
33
18
  * - Either linked to an Unbound action or to an action which has an OperationAvailable that is not set to false statically.
34
19
  *
35
- * @param {EntityType} entityType The current entity type
36
- * @param {boolean} bDetermining The flag which denotes whether or not the action is a determining action
37
- * @returns {DataFieldForActionTypes[]} An array of DataField for action respecting the input parameter 'bDetermining'
20
+ * @param entityType The current entity type
21
+ * @param bDetermining The flag which denotes whether or not the action is a determining action
22
+ * @returns An array of DataField for action respecting the input parameter 'bDetermining'
38
23
  */
39
24
  export function getIdentificationDataFieldForActions(entityType: EntityType, bDetermining: boolean): DataFieldForActionTypes[] {
40
25
  return (entityType.annotations?.UI?.Identification?.filter((identificationDataField) => {
@@ -57,9 +42,9 @@ export function getIdentificationDataFieldForActions(entityType: EntityType, bDe
57
42
  * They must be
58
43
  * - Not statically hidden.
59
44
  *
60
- * @param {EntityType} entityType The current entitytype
61
- * @param {boolean} bDetermining Whether or not the action should be determining
62
- * @returns {DataFieldForIntentBasedNavigationTypes[]} An array of data field for action respecting the bDetermining property.
45
+ * @param entityType The current entitytype
46
+ * @param bDetermining Whether or not the action should be determining
47
+ * @returns An array of data field for action respecting the bDetermining property.
63
48
  */
64
49
  function getIdentificationDataFieldForIBNActions(entityType: EntityType, bDetermining: boolean): DataFieldForIntentBasedNavigationTypes[] {
65
50
  return (entityType.annotations?.UI?.Identification?.filter((identificationDataField) => {
@@ -86,19 +71,19 @@ const IMPORTANT_CRITICALITIES = [
86
71
  /**
87
72
  * Method to determine the 'visible' property binding for the Delete button on an object page.
88
73
  *
89
- * @param {ConverterContext} converterContext Instance of the converter context.
90
- * @param {PropertyAnnotationValue<boolean> | undefined} deleteHidden The value of the UI.DeleteHidden annotation on the entity set / type.
91
- * @returns {Expression<boolean>} The binding expression for the 'visible' property of the Delete button.
74
+ * @param converterContext Instance of the converter context.
75
+ * @param deleteHidden The value of the UI.DeleteHidden annotation on the entity set / type.
76
+ * @returns The binding expression for the 'visible' property of the Delete button.
92
77
  */
93
78
  export function getDeleteButtonVisibility(
94
79
  converterContext: ConverterContext,
95
80
  deleteHidden: PropertyAnnotationValue<boolean> | undefined
96
- ): Expression<boolean> {
81
+ ): BindingToolkitExpression<boolean> {
97
82
  const dataModelObjectPath = converterContext.getDataModelObjectPath(),
98
83
  visitedNavigationPaths = dataModelObjectPath.navigationProperties.map((navProp) => navProp.name),
99
84
  // Set absolute binding path for Singleton references, otherwise the configured annotation path itself.
100
85
  // For e.g. /com.sap.namespace.EntityContainer/Singleton/Property to /Singleton/Property
101
- deleteHiddenExpression: Expression<boolean | undefined> = annotationExpression(
86
+ deleteHiddenExpression: BindingToolkitExpression<boolean | undefined> = getExpressionFromAnnotation(
102
87
  deleteHidden,
103
88
  visitedNavigationPaths,
104
89
  undefined,
@@ -109,7 +94,7 @@ export function getDeleteButtonVisibility(
109
94
  // Delete button is visible
110
95
  // In OP --> when not in edit mode
111
96
  // In sub-OP --> when in edit mode
112
- editableExpression: Expression<boolean> = viewLevel > 1 ? UI.IsEditable : not(UI.IsEditable);
97
+ editableExpression: BindingToolkitExpression<boolean> = viewLevel > 1 ? UI.IsEditable : not(UI.IsEditable);
113
98
 
114
99
  // If UI.DeleteHidden annotation on entity set or type is either not defined or explicitly set to false,
115
100
  // Delete button is visible based on editableExpression.
@@ -125,14 +110,14 @@ export function getDeleteButtonVisibility(
125
110
  /**
126
111
  * Method to determine the 'enabled' property binding for the Delete button on an object page.
127
112
  *
128
- * @param {PropertyAnnotationValue<boolean>|undefined} isDeletable The delete restriction configured
129
- * @param {Expression<boolean>} isParentDeletable The delete restriction configured on the parent entity
130
- * @returns {Expression<boolean>} The binding expression for the 'enabled' property of the Delete button
113
+ * @param isDeletable The delete restriction configured
114
+ * @param isParentDeletable The delete restriction configured on the parent entity
115
+ * @returns The binding expression for the 'enabled' property of the Delete button
131
116
  */
132
117
  export function getDeleteButtonEnabled(
133
118
  isDeletable: PropertyAnnotationValue<Boolean> | undefined,
134
- isParentDeletable: Expression<boolean>
135
- ): Expression<boolean> {
119
+ isParentDeletable: BindingToolkitExpression<boolean>
120
+ ): BindingToolkitExpression<boolean> {
136
121
  return ifElse(
137
122
  isParentDeletable !== undefined,
138
123
  isParentDeletable,
@@ -143,33 +128,33 @@ export function getDeleteButtonEnabled(
143
128
  /**
144
129
  * Method to determine the 'visible' property binding for the Edit button on an object page.
145
130
  *
146
- * @param {ConverterContext} converterContext Instance of the converter context.
147
- * @param {PropertyAnnotationValue<boolean> | undefined} updateHidden The value of the UI.UpdateHidden annotation on the entity set / type.
148
- * @returns {Expression<boolean>} The binding expression for the 'visible' property of the Edit button.
131
+ * @param converterContext Instance of the converter context.
132
+ * @param updateHidden The value of the UI.UpdateHidden annotation on the entity set / type.
133
+ * @returns The binding expression for the 'visible' property of the Edit button.
149
134
  */
150
135
  export function getEditButtonVisibility(
151
136
  converterContext: ConverterContext,
152
137
  updateHidden: PropertyAnnotationValue<boolean> | undefined
153
- ): Expression<boolean> {
138
+ ): BindingToolkitExpression<boolean> {
154
139
  const entitySet = converterContext.getEntitySet(),
155
140
  bIsDraftRoot = entitySet && entitySet.annotations.Common?.DraftRoot ? true : false,
156
141
  dataModelObjectPath = converterContext.getDataModelObjectPath(),
157
142
  visitedNavigationPaths = dataModelObjectPath.navigationProperties.map((navProp) => navProp.name),
158
143
  // Set absolute binding path for Singleton references, otherwise the configured annotation path itself.
159
144
  // For e.g. /com.sap.namespace.EntityContainer/Singleton/Property to /Singleton/Property
160
- updateHiddenExpression: Expression<boolean | undefined> = annotationExpression(
145
+ updateHiddenExpression: BindingToolkitExpression<boolean | undefined> = getExpressionFromAnnotation(
161
146
  updateHidden,
162
147
  visitedNavigationPaths,
163
148
  undefined,
164
149
  (path: string) => singletonPathVisitor(path, converterContext.getConvertedTypes(), visitedNavigationPaths)
165
150
  ),
166
- notEditableExpression: Expression<boolean> = not(UI.IsEditable);
151
+ notEditableExpression: BindingToolkitExpression<boolean> = not(UI.IsEditable);
167
152
 
168
153
  // If UI.UpdateHidden annotation on entity set or type is either not defined or explicitly set to false,
169
154
  // Edit button is visible in display mode.
170
155
  // else,
171
156
  // Edit button is visible based on both annotation path and in display mode.
172
- const resultantExpression: Expression<boolean> = ifElse(
157
+ const resultantExpression: BindingToolkitExpression<boolean> = ifElse(
173
158
  updateHidden === undefined || updateHidden.valueOf() === false,
174
159
  notEditableExpression,
175
160
  and(notEditableExpression, equal(updateHiddenExpression, false))
@@ -180,10 +165,10 @@ export function getEditButtonVisibility(
180
165
  /**
181
166
  * Method to determine the 'enabled' property binding for the Edit button on an object page.
182
167
  *
183
- * @param {ConverterContext} converterContext Instance of the converter context.
184
- * @returns {Expression<boolean>} The binding expression for the 'enabled' property of the Edit button.
168
+ * @param converterContext Instance of the converter context.
169
+ * @returns The binding expression for the 'enabled' property of the Edit button.
185
170
  */
186
- export function getEditButtonEnabled(converterContext: ConverterContext): BindingExpression<boolean> {
171
+ export function getEditButtonEnabled(converterContext: ConverterContext): CompiledBindingToolkitExpression {
187
172
  const entitySet = converterContext.getEntitySet(),
188
173
  isDraftRoot = entitySet && entitySet.annotations.Common?.DraftRoot ? true : false,
189
174
  isSticky = entitySet && entitySet.annotations.Session?.StickySessionSupported ? true : false;
@@ -195,7 +180,7 @@ export function getEditButtonEnabled(converterContext: ConverterContext): Bindin
195
180
  editActionName = entitySet?.annotations.Session?.StickySessionSupported?.EditAction as string;
196
181
  }
197
182
  if (editActionName) {
198
- const editActionAnnotationPath = converterContext.getAbsoluteAnnotationPath(editActionName as string),
183
+ const editActionAnnotationPath = converterContext.getAbsoluteAnnotationPath(editActionName),
199
184
  editActions = (converterContext.getEntityTypeAnnotation(editActionAnnotationPath)?.annotation as any)?.actions;
200
185
  if (editActions?.length) {
201
186
  const editAction = editActions[0];
@@ -206,13 +191,9 @@ export function getEditButtonEnabled(converterContext: ConverterContext): Bindin
206
191
  }
207
192
  }
208
193
  }
209
- return true;
194
+ return "true";
210
195
  }
211
196
 
212
- /**
213
- * @param converterContext
214
- * @returns {BaseAction[]}
215
- */
216
197
  export function getHeaderDefaultActions(converterContext: ConverterContext): BaseAction[] {
217
198
  const entitySet = converterContext.getEntitySet(),
218
199
  entityType = converterContext.getEntityType(),
@@ -225,7 +206,7 @@ export function getHeaderDefaultActions(converterContext: ConverterContext): Bas
225
206
  pathVisitor: (path: string, navigationPaths: string[]) =>
226
207
  singletonPathVisitor(path, converterContext.getConvertedTypes(), navigationPaths)
227
208
  }),
228
- bParentEntitySetDeletable = isParentDeletable ? compileBinding(isParentDeletable) : isParentDeletable,
209
+ bParentEntitySetDeletable = isParentDeletable ? compileExpression(isParentDeletable) : isParentDeletable,
229
210
  headerDataFieldForActions = getIdentificationDataFieldForActions(converterContext.getEntityType(), false);
230
211
 
231
212
  // Initialize actions and start with draft actions if available since they should appear in the first
@@ -248,7 +229,7 @@ export function getHeaderDefaultActions(converterContext: ConverterContext): Bas
248
229
  type: ActionType.DataFieldForAction,
249
230
  annotationPath: converterContext.getEntitySetBasedAnnotationPath(dataField.fullyQualifiedName),
250
231
  key: KeyHelper.generateKeyFromDataField(dataField),
251
- visible: compileBinding(not(equal(annotationExpression(dataField.annotations?.UI?.Hidden), true))),
232
+ visible: compileExpression(not(equal(getExpressionFromAnnotation(dataField.annotations?.UI?.Hidden), true))),
252
233
  enabled: getEnabledForAnnotationAction(converterContext, dataField.ActionTarget),
253
234
  isNavigable: true
254
235
  });
@@ -264,7 +245,7 @@ export function getHeaderDefaultActions(converterContext: ConverterContext): Bas
264
245
  headerActions.push({
265
246
  type: ActionType.Primary,
266
247
  key: "EditAction",
267
- visible: compileBinding(getEditButtonVisibility(converterContext, updateHidden)),
248
+ visible: compileExpression(getEditButtonVisibility(converterContext, updateHidden)),
268
249
  enabled: getEditButtonEnabled(converterContext)
269
250
  });
270
251
  }
@@ -281,8 +262,8 @@ export function getHeaderDefaultActions(converterContext: ConverterContext): Bas
281
262
  headerActions.push({
282
263
  type: ActionType.Secondary,
283
264
  key: "DeleteAction",
284
- visible: compileBinding(getDeleteButtonVisibility(converterContext, deleteHidden)),
285
- enabled: compileBinding(getDeleteButtonEnabled(oEntityDeleteRestrictions?.Deletable, isParentDeletable)),
265
+ visible: compileExpression(getDeleteButtonVisibility(converterContext, deleteHidden)),
266
+ enabled: compileExpression(getDeleteButtonEnabled(oEntityDeleteRestrictions?.Deletable, isParentDeletable)),
286
267
  parentEntityDeleteEnabled: bParentEntitySetDeletable
287
268
  });
288
269
  }
@@ -299,32 +280,32 @@ export function getHeaderDefaultActions(converterContext: ConverterContext): Bas
299
280
  };
300
281
 
301
282
  if (dataField.RequiresContext?.valueOf() === true) {
302
- throw new Error("RequiresContext property should not be true for header IBN action : " + dataField.Label);
283
+ throw new Error(`RequiresContext property should not be true for header IBN action : ${dataField.Label}`);
303
284
  } else if (dataField.Inline?.valueOf() === true) {
304
- throw new Error("Inline property should not be true for header IBN action : " + dataField.Label);
285
+ throw new Error(`Inline property should not be true for header IBN action : ${dataField.Label}`);
305
286
  }
306
287
  headerActions.push({
307
288
  type: ActionType.DataFieldForIntentBasedNavigation,
308
289
  text: dataField.Label?.toString(),
309
290
  annotationPath: converterContext.getEntitySetBasedAnnotationPath(dataField.fullyQualifiedName),
310
291
  buttonType: ButtonType.Ghost,
311
- visible: compileBinding(not(equal(annotationExpression(dataField.annotations?.UI?.Hidden?.valueOf()), true))),
292
+ visible: compileExpression(not(equal(getExpressionFromAnnotation(dataField.annotations?.UI?.Hidden?.valueOf()), true))),
312
293
  enabled:
313
294
  dataField.NavigationAvailable !== undefined
314
- ? compileBinding(equal(annotationExpression(dataField.NavigationAvailable?.valueOf()), true))
295
+ ? compileExpression(equal(getExpressionFromAnnotation(dataField.NavigationAvailable?.valueOf()), true))
315
296
  : true,
316
297
  key: KeyHelper.generateKeyFromDataField(dataField),
317
298
  isNavigable: true,
318
- press: compileBinding(
299
+ press: compileExpression(
319
300
  fn("._intentBasedNavigation.navigate", [
320
- annotationExpression(dataField.SemanticObject),
321
- annotationExpression(dataField.Action),
301
+ getExpressionFromAnnotation(dataField.SemanticObject),
302
+ getExpressionFromAnnotation(dataField.Action),
322
303
  oNavigationParams
323
304
  ])
324
305
  ),
325
- customData: compileBinding({
326
- semanticObject: annotationExpression(dataField.SemanticObject),
327
- action: annotationExpression(dataField.Action)
306
+ customData: compileExpression({
307
+ semanticObject: getExpressionFromAnnotation(dataField.SemanticObject),
308
+ action: getExpressionFromAnnotation(dataField.Action)
328
309
  })
329
310
  } as AnnotationAction);
330
311
  });
@@ -338,7 +319,7 @@ export function getHeaderDefaultActions(converterContext: ConverterContext): Bas
338
319
  type: ActionType.DataFieldForAction,
339
320
  annotationPath: converterContext.getEntitySetBasedAnnotationPath(dataField.fullyQualifiedName),
340
321
  key: KeyHelper.generateKeyFromDataField(dataField),
341
- visible: compileBinding(not(equal(annotationExpression(dataField.annotations?.UI?.Hidden), true))),
322
+ visible: compileExpression(not(equal(getExpressionFromAnnotation(dataField.annotations?.UI?.Hidden), true))),
342
323
  enabled: getEnabledForAnnotationAction(converterContext, dataField.ActionTarget),
343
324
  isNavigable: true
344
325
  } as AnnotationAction);
@@ -347,10 +328,6 @@ export function getHeaderDefaultActions(converterContext: ConverterContext): Bas
347
328
  return headerActions;
348
329
  }
349
330
 
350
- /**
351
- * @param converterContext
352
- * @returns {BaseAction[]}
353
- */
354
331
  export function getHiddenHeaderActions(converterContext: ConverterContext): BaseAction[] {
355
332
  const entityType = converterContext.getEntityType();
356
333
  const hiddenActions = (entityType.annotations?.UI?.Identification?.filter((identificationDataField) => {
@@ -364,11 +341,6 @@ export function getHiddenHeaderActions(converterContext: ConverterContext): Base
364
341
  });
365
342
  }
366
343
 
367
- /**
368
- * @param viewLevel
369
- * @param converterContext
370
- * @returns {BaseAction[]}
371
- */
372
344
  export function getFooterDefaultActions(viewLevel: number, converterContext: ConverterContext): BaseAction[] {
373
345
  const entitySet = converterContext.getEntitySet();
374
346
  const entityType = converterContext.getEntityType();
@@ -396,7 +368,7 @@ export function getFooterDefaultActions(viewLevel: number, converterContext: Con
396
368
  type: ActionType.DataFieldForAction,
397
369
  annotationPath: converterContext.getEntitySetBasedAnnotationPath(dataField.fullyQualifiedName),
398
370
  key: KeyHelper.generateKeyFromDataField(dataField),
399
- visible: compileBinding(not(equal(annotationExpression(dataField.annotations?.UI?.Hidden), true))),
371
+ visible: compileExpression(not(equal(getExpressionFromAnnotation(dataField.annotations?.UI?.Hidden), true))),
400
372
  enabled: getEnabledForAnnotationAction(converterContext, dataField.ActionTarget),
401
373
  isNavigable: true
402
374
  };
@@ -422,7 +394,7 @@ export function getFooterDefaultActions(viewLevel: number, converterContext: Con
422
394
  type: ActionType.DataFieldForAction,
423
395
  annotationPath: converterContext.getEntitySetBasedAnnotationPath(dataField.fullyQualifiedName),
424
396
  key: KeyHelper.generateKeyFromDataField(dataField),
425
- visible: compileBinding(not(equal(annotationExpression(dataField.annotations?.UI?.Hidden), true))),
397
+ visible: compileExpression(not(equal(getExpressionFromAnnotation(dataField.annotations?.UI?.Hidden), true))),
426
398
  enabled: getEnabledForAnnotationAction(converterContext, dataField.ActionTarget),
427
399
  isNavigable: true
428
400
  } as AnnotationAction);