@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,29 +1,33 @@
1
- import {
2
- ConverterOutput,
3
- EntitySet as _EntitySet,
4
- EntityType as _EntityType,
5
- NavigationProperty as _NavigationProperty,
6
- Singleton as _Singleton
7
- } from "@sap-ux/annotation-converter";
8
- import { Annotation, AnnotationList, AnnotationRecord, Expression, ParserOutput } from "@sap-ux/vocabularies-types";
9
- import {
10
- Action,
11
- ComplexType,
12
- EntityContainer,
1
+ // This file is retrieved from @sap-ux/annotation-converter, shared code with tool suite
2
+
3
+ import type {
4
+ Annotation,
5
+ AnnotationList,
6
+ AnnotationRecord,
7
+ ConvertedMetadata,
13
8
  EntitySet,
14
9
  EntityType,
10
+ Expression,
11
+ NavigationProperty,
15
12
  Property,
13
+ RawAction,
14
+ RawComplexType,
15
+ RawEntityContainer,
16
+ RawEntitySet,
17
+ RawEntityType,
18
+ RawMetadata,
19
+ RawProperty,
20
+ RawSingleton,
21
+ RawTypeDefinition,
22
+ RawV4NavigationProperty,
16
23
  Reference,
17
24
  ReferentialConstraint,
18
- Singleton,
19
- TypeDefinition,
20
- V4NavigationProperty
21
- } from "@sap-ux/vocabularies-types/dist/Parser";
22
- // This file is retrieved from @sap-ux/annotation-converter, shared code with tool suite
25
+ Singleton
26
+ } from "@sap-ux/vocabularies-types";
23
27
  import { AnnotationConverter } from "sap/fe/core/converters/common";
24
- import { DataModelObjectPath } from "sap/fe/core/templating/DataModelPathHelper";
25
- import Context from "sap/ui/model/Context";
26
- import ODataMetaModel from "sap/ui/model/odata/v4/ODataMetaModel";
28
+ import type { DataModelObjectPath } from "sap/fe/core/templating/DataModelPathHelper";
29
+ import type Context from "sap/ui/model/Context";
30
+ import type ODataMetaModel from "sap/ui/model/odata/v4/ODataMetaModel";
27
31
  import { generate } from "../helpers/StableIdHelper";
28
32
 
29
33
  const VOCABULARY_ALIAS: any = {
@@ -80,7 +84,7 @@ function parsePropertyValue(
80
84
  oCapabilities: EnvironmentCapabilities
81
85
  ): any {
82
86
  let value;
83
- const currentPropertyTarget: string = currentTarget + "/" + propertyKey;
87
+ const currentPropertyTarget: string = `${currentTarget}/${propertyKey}`;
84
88
  const typeOfAnnotation = typeof annotationObject;
85
89
  if (annotationObject === null) {
86
90
  value = { type: "Null", Null: null };
@@ -96,7 +100,7 @@ function parsePropertyValue(
96
100
  Collection: annotationObject.map((subAnnotationObject, subAnnotationObjectIndex) =>
97
101
  parseAnnotationObject(
98
102
  subAnnotationObject,
99
- currentPropertyTarget + "/" + subAnnotationObjectIndex,
103
+ `${currentPropertyTarget}/${subAnnotationObjectIndex}`,
100
104
  annotationsLists,
101
105
  oCapabilities
102
106
  )
@@ -180,7 +184,7 @@ function parsePropertyValue(
180
184
  } else if (annotationObject.$EnumMember !== undefined) {
181
185
  value = {
182
186
  type: "EnumMember",
183
- EnumMember: mapNameToAlias(annotationObject.$EnumMember.split("/")[0]) + "/" + annotationObject.$EnumMember.split("/")[1]
187
+ EnumMember: `${mapNameToAlias(annotationObject.$EnumMember.split("/")[0])}/${annotationObject.$EnumMember.split("/")[1]}`
184
188
  };
185
189
  } else if (annotationObject.$Type) {
186
190
  value = {
@@ -208,7 +212,7 @@ function mapNameToAlias(annotationName: string): string {
208
212
  pathPart += "@";
209
213
  }
210
214
  const lastDot = annoPart.lastIndexOf(".");
211
- return pathPart + VOCABULARY_ALIAS[annoPart.substr(0, lastDot)] + "." + annoPart.substr(lastDot + 1);
215
+ return `${pathPart + VOCABULARY_ALIAS[annoPart.substr(0, lastDot)]}.${annoPart.substr(lastDot + 1)}`;
212
216
  }
213
217
  function parseAnnotationObject(
214
218
  annotationObject: any,
@@ -264,50 +268,50 @@ function parseAnnotationObject(
264
268
  } else if (annotationObject.$EnumMember !== undefined) {
265
269
  parsedAnnotationObject = {
266
270
  type: "EnumMember",
267
- EnumMember: mapNameToAlias(annotationObject.$EnumMember.split("/")[0]) + "/" + annotationObject.$EnumMember.split("/")[1]
271
+ EnumMember: `${mapNameToAlias(annotationObject.$EnumMember.split("/")[0])}/${annotationObject.$EnumMember.split("/")[1]}`
268
272
  };
269
273
  } else if (Array.isArray(annotationObject)) {
270
- const parsedAnnotationCollection = parsedAnnotationObject as any;
274
+ const parsedAnnotationCollection = parsedAnnotationObject;
271
275
  parsedAnnotationCollection.collection = annotationObject.map((subAnnotationObject, subAnnotationIndex) =>
272
- parseAnnotationObject(subAnnotationObject, currentObjectTarget + "/" + subAnnotationIndex, annotationsLists, oCapabilities)
276
+ parseAnnotationObject(subAnnotationObject, `${currentObjectTarget}/${subAnnotationIndex}`, annotationsLists, oCapabilities)
273
277
  );
274
278
  if (annotationObject.length > 0) {
275
279
  if (annotationObject[0].hasOwnProperty("$PropertyPath")) {
276
- (parsedAnnotationCollection.collection as any).type = "PropertyPath";
280
+ parsedAnnotationCollection.collection.type = "PropertyPath";
277
281
  } else if (annotationObject[0].hasOwnProperty("$Path")) {
278
- (parsedAnnotationCollection.collection as any).type = "Path";
282
+ parsedAnnotationCollection.collection.type = "Path";
279
283
  } else if (annotationObject[0].hasOwnProperty("$NavigationPropertyPath")) {
280
- (parsedAnnotationCollection.collection as any).type = "NavigationPropertyPath";
284
+ parsedAnnotationCollection.collection.type = "NavigationPropertyPath";
281
285
  } else if (annotationObject[0].hasOwnProperty("$AnnotationPath")) {
282
- (parsedAnnotationCollection.collection as any).type = "AnnotationPath";
286
+ parsedAnnotationCollection.collection.type = "AnnotationPath";
283
287
  } else if (annotationObject[0].hasOwnProperty("$Type")) {
284
- (parsedAnnotationCollection.collection as any).type = "Record";
288
+ parsedAnnotationCollection.collection.type = "Record";
285
289
  } else if (annotationObject[0].hasOwnProperty("$If")) {
286
- (parsedAnnotationCollection.collection as any).type = "If";
290
+ parsedAnnotationCollection.collection.type = "If";
287
291
  } else if (annotationObject[0].hasOwnProperty("$And")) {
288
- (parsedAnnotationCollection.collection as any).type = "And";
292
+ parsedAnnotationCollection.collection.type = "And";
289
293
  } else if (annotationObject[0].hasOwnProperty("$Or")) {
290
- (parsedAnnotationCollection.collection as any).type = "Or";
294
+ parsedAnnotationCollection.collection.type = "Or";
291
295
  } else if (annotationObject[0].hasOwnProperty("$Eq")) {
292
- (parsedAnnotationCollection.collection as any).type = "Eq";
296
+ parsedAnnotationCollection.collection.type = "Eq";
293
297
  } else if (annotationObject[0].hasOwnProperty("$Ne")) {
294
- (parsedAnnotationCollection.collection as any).type = "Ne";
298
+ parsedAnnotationCollection.collection.type = "Ne";
295
299
  } else if (annotationObject[0].hasOwnProperty("$Not")) {
296
- (parsedAnnotationCollection.collection as any).type = "Not";
300
+ parsedAnnotationCollection.collection.type = "Not";
297
301
  } else if (annotationObject[0].hasOwnProperty("$Gt")) {
298
- (parsedAnnotationCollection.collection as any).type = "Gt";
302
+ parsedAnnotationCollection.collection.type = "Gt";
299
303
  } else if (annotationObject[0].hasOwnProperty("$Ge")) {
300
- (parsedAnnotationCollection.collection as any).type = "Ge";
304
+ parsedAnnotationCollection.collection.type = "Ge";
301
305
  } else if (annotationObject[0].hasOwnProperty("$Lt")) {
302
- (parsedAnnotationCollection.collection as any).type = "Lt";
306
+ parsedAnnotationCollection.collection.type = "Lt";
303
307
  } else if (annotationObject[0].hasOwnProperty("$Le")) {
304
- (parsedAnnotationCollection.collection as any).type = "Le";
308
+ parsedAnnotationCollection.collection.type = "Le";
305
309
  } else if (annotationObject[0].hasOwnProperty("$Apply")) {
306
- (parsedAnnotationCollection.collection as any).type = "Apply";
310
+ parsedAnnotationCollection.collection.type = "Apply";
307
311
  } else if (typeof annotationObject[0] === "object") {
308
- (parsedAnnotationCollection.collection as any).type = "Record";
312
+ parsedAnnotationCollection.collection.type = "Record";
309
313
  } else {
310
- (parsedAnnotationCollection.collection as any).type = "String";
314
+ parsedAnnotationCollection.collection.type = "String";
311
315
  }
312
316
  }
313
317
  } else {
@@ -446,7 +450,7 @@ function createAnnotationLists(
446
450
  const annotationOfAnnotationSplit = annotationKey.split("@");
447
451
  if (annotationOfAnnotationSplit.length > 2) {
448
452
  currentOutAnnotationObject = getOrCreateAnnotationList(
449
- annotationTarget + "@" + annotationOfAnnotationSplit[1],
453
+ `${annotationTarget}@${annotationOfAnnotationSplit[1]}`,
450
454
  annotationLists
451
455
  );
452
456
  annotationKey = annotationOfAnnotationSplit[2];
@@ -462,9 +466,9 @@ function createAnnotationLists(
462
466
  term: `${annotationKey}`,
463
467
  qualifier: qualifier
464
468
  };
465
- let currentAnnotationTarget = annotationTarget + "@" + parsedAnnotationObject.term;
469
+ let currentAnnotationTarget = `${annotationTarget}@${parsedAnnotationObject.term}`;
466
470
  if (qualifier) {
467
- currentAnnotationTarget += "#" + qualifier;
471
+ currentAnnotationTarget += `#${qualifier}`;
468
472
  }
469
473
  let isCollection = false;
470
474
  const typeofAnnotation = typeof annotationObject;
@@ -510,55 +514,55 @@ function createAnnotationLists(
510
514
  } else if (annotationObject.$EnumMember !== undefined) {
511
515
  parsedAnnotationObject.value = {
512
516
  type: "EnumMember",
513
- EnumMember: mapNameToAlias(annotationObject.$EnumMember.split("/")[0]) + "/" + annotationObject.$EnumMember.split("/")[1]
517
+ EnumMember: `${mapNameToAlias(annotationObject.$EnumMember.split("/")[0])}/${annotationObject.$EnumMember.split("/")[1]}`
514
518
  };
515
519
  } else if (Array.isArray(annotationObject)) {
516
520
  isCollection = true;
517
521
  parsedAnnotationObject.collection = annotationObject.map((subAnnotationObject, subAnnotationIndex) =>
518
522
  parseAnnotationObject(
519
523
  subAnnotationObject,
520
- currentAnnotationTarget + "/" + subAnnotationIndex,
524
+ `${currentAnnotationTarget}/${subAnnotationIndex}`,
521
525
  annotationLists,
522
526
  oCapabilities
523
527
  )
524
528
  );
525
529
  if (annotationObject.length > 0) {
526
530
  if (annotationObject[0].hasOwnProperty("$PropertyPath")) {
527
- (parsedAnnotationObject.collection as any).type = "PropertyPath";
531
+ parsedAnnotationObject.collection.type = "PropertyPath";
528
532
  } else if (annotationObject[0].hasOwnProperty("$Path")) {
529
- (parsedAnnotationObject.collection as any).type = "Path";
533
+ parsedAnnotationObject.collection.type = "Path";
530
534
  } else if (annotationObject[0].hasOwnProperty("$NavigationPropertyPath")) {
531
- (parsedAnnotationObject.collection as any).type = "NavigationPropertyPath";
535
+ parsedAnnotationObject.collection.type = "NavigationPropertyPath";
532
536
  } else if (annotationObject[0].hasOwnProperty("$AnnotationPath")) {
533
- (parsedAnnotationObject.collection as any).type = "AnnotationPath";
537
+ parsedAnnotationObject.collection.type = "AnnotationPath";
534
538
  } else if (annotationObject[0].hasOwnProperty("$Type")) {
535
- (parsedAnnotationObject.collection as any).type = "Record";
539
+ parsedAnnotationObject.collection.type = "Record";
536
540
  } else if (annotationObject[0].hasOwnProperty("$If")) {
537
- (parsedAnnotationObject.collection as any).type = "If";
541
+ parsedAnnotationObject.collection.type = "If";
538
542
  } else if (annotationObject[0].hasOwnProperty("$Or")) {
539
- (parsedAnnotationObject.collection as any).type = "Or";
543
+ parsedAnnotationObject.collection.type = "Or";
540
544
  } else if (annotationObject[0].hasOwnProperty("$Eq")) {
541
- (parsedAnnotationObject.collection as any).type = "Eq";
545
+ parsedAnnotationObject.collection.type = "Eq";
542
546
  } else if (annotationObject[0].hasOwnProperty("$Ne")) {
543
- (parsedAnnotationObject.collection as any).type = "Ne";
547
+ parsedAnnotationObject.collection.type = "Ne";
544
548
  } else if (annotationObject[0].hasOwnProperty("$Not")) {
545
- (parsedAnnotationObject.collection as any).type = "Not";
549
+ parsedAnnotationObject.collection.type = "Not";
546
550
  } else if (annotationObject[0].hasOwnProperty("$Gt")) {
547
- (parsedAnnotationObject.collection as any).type = "Gt";
551
+ parsedAnnotationObject.collection.type = "Gt";
548
552
  } else if (annotationObject[0].hasOwnProperty("$Ge")) {
549
- (parsedAnnotationObject.collection as any).type = "Ge";
553
+ parsedAnnotationObject.collection.type = "Ge";
550
554
  } else if (annotationObject[0].hasOwnProperty("$Lt")) {
551
- (parsedAnnotationObject.collection as any).type = "Lt";
555
+ parsedAnnotationObject.collection.type = "Lt";
552
556
  } else if (annotationObject[0].hasOwnProperty("$Le")) {
553
- (parsedAnnotationObject.collection as any).type = "Le";
557
+ parsedAnnotationObject.collection.type = "Le";
554
558
  } else if (annotationObject[0].hasOwnProperty("$And")) {
555
- (parsedAnnotationObject.collection as any).type = "And";
559
+ parsedAnnotationObject.collection.type = "And";
556
560
  } else if (annotationObject[0].hasOwnProperty("$Apply")) {
557
- (parsedAnnotationObject.collection as any).type = "Apply";
561
+ parsedAnnotationObject.collection.type = "Apply";
558
562
  } else if (typeof annotationObject[0] === "object") {
559
- (parsedAnnotationObject.collection as any).type = "Record";
563
+ parsedAnnotationObject.collection.type = "Record";
560
564
  } else {
561
- (parsedAnnotationObject.collection as any).type = "String";
565
+ parsedAnnotationObject.collection.type = "String";
562
566
  }
563
567
  }
564
568
  } else {
@@ -599,8 +603,8 @@ function createAnnotationLists(
599
603
  }
600
604
  }
601
605
 
602
- function prepareProperty(propertyDefinition: any, entityTypeObject: EntityType | ComplexType, propertyName: string): Property {
603
- const propertyObject: Property = {
606
+ function prepareProperty(propertyDefinition: any, entityTypeObject: RawEntityType | RawComplexType, propertyName: string): RawProperty {
607
+ const propertyObject: RawProperty = {
604
608
  _type: "Property",
605
609
  name: propertyName,
606
610
  fullyQualifiedName: `${entityTypeObject.fullyQualifiedName}/${propertyName}`,
@@ -615,9 +619,9 @@ function prepareProperty(propertyDefinition: any, entityTypeObject: EntityType |
615
619
 
616
620
  function prepareNavigationProperty(
617
621
  navPropertyDefinition: any,
618
- entityTypeObject: EntityType | ComplexType,
622
+ entityTypeObject: RawEntityType | RawComplexType,
619
623
  navPropertyName: string
620
- ): V4NavigationProperty {
624
+ ): RawV4NavigationProperty {
621
625
  let referentialConstraint: ReferentialConstraint[] = [];
622
626
  if (navPropertyDefinition.$ReferentialConstraint) {
623
627
  referentialConstraint = Object.keys(navPropertyDefinition.$ReferentialConstraint).map((sourcePropertyName) => {
@@ -629,7 +633,7 @@ function prepareNavigationProperty(
629
633
  };
630
634
  });
631
635
  }
632
- const navigationProperty: V4NavigationProperty = {
636
+ const navigationProperty: RawV4NavigationProperty = {
633
637
  _type: "NavigationProperty",
634
638
  name: navPropertyName,
635
639
  fullyQualifiedName: `${entityTypeObject.fullyQualifiedName}/${navPropertyName}`,
@@ -643,8 +647,8 @@ function prepareNavigationProperty(
643
647
  return navigationProperty;
644
648
  }
645
649
 
646
- function prepareEntitySet(entitySetDefinition: any, entitySetName: string, entityContainerName: string): EntitySet {
647
- const entitySetObject: EntitySet = {
650
+ function prepareEntitySet(entitySetDefinition: any, entitySetName: string, entityContainerName: string): RawEntitySet {
651
+ const entitySetObject: RawEntitySet = {
648
652
  _type: "EntitySet",
649
653
  name: entitySetName,
650
654
  navigationPropertyBinding: {},
@@ -654,31 +658,31 @@ function prepareEntitySet(entitySetDefinition: any, entitySetName: string, entit
654
658
  return entitySetObject;
655
659
  }
656
660
 
657
- function prepareSingleton(singletonDefinition: any, singletonName: string, entityContainerName: string): Singleton {
661
+ function prepareSingleton(singletonDefinition: any, singletonName: string, entityContainerName: string): RawSingleton {
658
662
  return {
659
663
  _type: "Singleton",
660
664
  name: singletonName,
661
665
  navigationPropertyBinding: {},
662
- typeName: singletonDefinition.$Type,
666
+ entityTypeName: singletonDefinition.$Type,
663
667
  fullyQualifiedName: `${entityContainerName}/${singletonName}`,
664
668
  nullable: true
665
- } as Singleton;
669
+ };
666
670
  }
667
671
 
668
- function prepareTypeDefinition(typeDefinition: any, typeName: string, namespace: string): TypeDefinition {
669
- const typeObject: TypeDefinition = {
672
+ function prepareTypeDefinition(typeDefinition: any, typeName: string, namespace: string): RawTypeDefinition {
673
+ const typeObject: RawTypeDefinition = {
670
674
  _type: "TypeDefinition",
671
- name: typeName.replace(namespace + ".", ""),
675
+ name: typeName.replace(`${namespace}.`, ""),
672
676
  fullyQualifiedName: typeName,
673
677
  underlyingType: typeDefinition.$UnderlyingType
674
678
  };
675
679
  return typeObject;
676
680
  }
677
681
 
678
- function prepareComplexType(complexTypeDefinition: any, complexTypeName: string, namespace: string): ComplexType {
679
- const complexTypeObject: ComplexType = {
682
+ function prepareComplexType(complexTypeDefinition: any, complexTypeName: string, namespace: string): RawComplexType {
683
+ const complexTypeObject: RawComplexType = {
680
684
  _type: "ComplexType",
681
- name: complexTypeName.replace(namespace + ".", ""),
685
+ name: complexTypeName.replace(`${namespace}.`, ""),
682
686
  fullyQualifiedName: complexTypeName,
683
687
  properties: [],
684
688
  navigationProperties: []
@@ -717,16 +721,17 @@ function prepareEntityKeys(entityTypeDefinition: any, oMetaModelData: any): any
717
721
  return entityTypeDefinition.$Key || []; //handling of entity types without key as well as basetype
718
722
  }
719
723
 
720
- function prepareEntityType(entityTypeDefinition: any, entityTypeName: string, namespace: string, metaModelData: any): EntityType {
724
+ function prepareEntityType(entityTypeDefinition: any, entityTypeName: string, namespace: string, metaModelData: any): RawEntityType {
721
725
  const entityKeys: any = prepareEntityKeys(entityTypeDefinition, metaModelData);
722
726
 
723
- const entityTypeObject: EntityType = {
727
+ const entityTypeObject: RawEntityType = {
724
728
  _type: "EntityType",
725
- name: entityTypeName.replace(namespace + ".", ""),
729
+ name: entityTypeName.replace(`${namespace}.`, ""),
726
730
  fullyQualifiedName: entityTypeName,
727
731
  keys: [],
728
732
  entityProperties: [],
729
- navigationProperties: []
733
+ navigationProperties: [],
734
+ actions: {}
730
735
  };
731
736
 
732
737
  const entityProperties = Object.keys(entityTypeDefinition)
@@ -750,14 +755,14 @@ function prepareEntityType(entityTypeDefinition: any, entityTypeName: string, na
750
755
  });
751
756
 
752
757
  entityTypeObject.keys = entityKeys
753
- .map((entityKey: string) => entityProperties.find((property: Property) => property.name === entityKey))
758
+ .map((entityKey: string) => entityProperties.find((property: RawProperty) => property.name === entityKey))
754
759
  .filter((property: Property) => property !== undefined);
755
760
  entityTypeObject.entityProperties = entityProperties;
756
761
  entityTypeObject.navigationProperties = navigationProperties;
757
762
 
758
763
  return entityTypeObject;
759
764
  }
760
- function prepareAction(actionName: string, actionRawData: MetaModelAction, namespace: string, entityContainerName: string): Action {
765
+ function prepareAction(actionName: string, actionRawData: MetaModelAction, namespace: string, entityContainerName: string): RawAction {
761
766
  let actionEntityType: string = "";
762
767
  let actionFQN = `${actionName}`;
763
768
  const actionShortName = actionName.substr(namespace.length + 1);
@@ -786,6 +791,7 @@ function prepareAction(actionName: string, actionRawData: MetaModelAction, names
786
791
  _type: "ActionParameter",
787
792
  isEntitySet: param.$Type === actionRawData.$EntitySetPath,
788
793
  fullyQualifiedName: `${actionFQN}/${param.$Name}`,
794
+ name: param.$Name,
789
795
  type: param.$Type
790
796
  };
791
797
  })
@@ -794,14 +800,14 @@ function prepareAction(actionName: string, actionRawData: MetaModelAction, names
794
800
  export function prepareEntityTypes(
795
801
  oMetaModel: ODataMetaModel,
796
802
  oCapabilities: EnvironmentCapabilities = DefaultEnvironmentCapabilities
797
- ): ParserOutput {
803
+ ): RawMetadata {
798
804
  const oMetaModelData = oMetaModel.getObject("/$");
799
805
  const annotationLists: Record<string, AnnotationList> = {};
800
- const entityTypes: EntityType[] = [];
801
- const entitySets: EntitySet[] = [];
802
- const singletons: Singleton[] = [];
803
- const complexTypes: ComplexType[] = [];
804
- const typeDefinitions: TypeDefinition[] = [];
806
+ const entityTypes: RawEntityType[] = [];
807
+ const entitySets: RawEntitySet[] = [];
808
+ const singletons: RawSingleton[] = [];
809
+ const complexTypes: RawComplexType[] = [];
810
+ const typeDefinitions: RawTypeDefinition[] = [];
805
811
  const entityContainerName = oMetaModelData.$EntityContainer;
806
812
  let namespace = "";
807
813
  const schemaKeys = Object.keys(oMetaModelData).filter((metamodelKey) => oMetaModelData[metamodelKey].$kind === "Schema");
@@ -873,10 +879,15 @@ export function prepareEntityTypes(
873
879
  }
874
880
  });
875
881
 
876
- let entityContainer: EntityContainer = {};
882
+ let entityContainer: RawEntityContainer = {
883
+ _type: "EntityContainer",
884
+ name: "",
885
+ fullyQualifiedName: ""
886
+ };
877
887
  if (entityContainerName) {
878
888
  entityContainer = {
879
- name: entityContainerName.replace(namespace + ".", ""),
889
+ _type: "EntityContainer",
890
+ name: entityContainerName.replace(`${namespace}.`, ""),
880
891
  fullyQualifiedName: entityContainerName
881
892
  };
882
893
  }
@@ -892,13 +903,13 @@ export function prepareEntityTypes(
892
903
  }
893
904
  });
894
905
 
895
- const actions: Action[] = Object.keys(oMetaModelData)
906
+ const actions: RawAction[] = Object.keys(oMetaModelData)
896
907
  .filter((key) => {
897
908
  return Array.isArray(oMetaModelData[key]) && oMetaModelData[key].length > 0 && oMetaModelData[key][0].$kind === "Action";
898
909
  })
899
- .reduce((outActions: Action[], actionName) => {
900
- const actions = oMetaModelData[actionName];
901
- actions.forEach((action: MetaModelAction) => {
910
+ .reduce((outActions: RawAction[], actionName) => {
911
+ const innerActions = oMetaModelData[actionName];
912
+ innerActions.forEach((action: MetaModelAction) => {
902
913
  outActions.push(prepareAction(actionName, action, namespace, entityContainerName));
903
914
  });
904
915
  return outActions;
@@ -935,26 +946,34 @@ export function prepareEntityTypes(
935
946
  };
936
947
  }
937
948
 
938
- const mMetaModelMap: Record<string, ParserOutput> = {};
949
+ const mMetaModelMap: Record<string, ConvertedMetadata> = {};
939
950
 
940
951
  /**
941
952
  * Convert the ODataMetaModel into another format that allow for easy manipulation of the annotations.
942
953
  *
943
- * @param {ODataMetaModel} oMetaModel The current oDataMetaModel
954
+ * @param oMetaModel The ODataMetaModel
944
955
  * @param oCapabilities The current capabilities
945
- * @returns {ConverterOutput} An object containing object like annotation
956
+ * @returns An object containing object-like annotations
946
957
  */
947
- export function convertTypes(oMetaModel: ODataMetaModel, oCapabilities?: EnvironmentCapabilities): ConverterOutput {
958
+ export function convertTypes(oMetaModel: ODataMetaModel, oCapabilities?: EnvironmentCapabilities): ConvertedMetadata {
948
959
  const sMetaModelId = (oMetaModel as any).id;
949
960
  if (!mMetaModelMap.hasOwnProperty(sMetaModelId)) {
950
961
  const parsedOutput = prepareEntityTypes(oMetaModel, oCapabilities);
951
962
  try {
952
- mMetaModelMap[sMetaModelId] = AnnotationConverter.convertTypes(parsedOutput);
963
+ mMetaModelMap[sMetaModelId] = AnnotationConverter.convert(parsedOutput);
953
964
  } catch (oError) {
954
965
  throw new Error(oError as any);
955
966
  }
956
967
  }
957
- return mMetaModelMap[sMetaModelId] as any as ConverterOutput;
968
+ return mMetaModelMap[sMetaModelId] as any as ConvertedMetadata;
969
+ }
970
+
971
+ export function getConvertedTypes(oContext: Context) {
972
+ const oMetaModel = oContext.getModel() as unknown as ODataMetaModel;
973
+ if (!oMetaModel.isA("sap.ui.model.odata.v4.ODataMetaModel")) {
974
+ throw new Error("This should only be called on a ODataMetaModel");
975
+ }
976
+ return convertTypes(oMetaModel);
958
977
  }
959
978
 
960
979
  export function deleteModelCacheData(oMetaModel: ODataMetaModel) {
@@ -962,15 +981,15 @@ export function deleteModelCacheData(oMetaModel: ODataMetaModel) {
962
981
  }
963
982
 
964
983
  export function convertMetaModelContext(oMetaModelContext: Context, bIncludeVisitedObjects: boolean = false): any {
965
- const oConverterOutput = convertTypes(oMetaModelContext.getModel() as ODataMetaModel);
984
+ const oConvertedMetadata = convertTypes(oMetaModelContext.getModel() as ODataMetaModel);
966
985
  const sPath = oMetaModelContext.getPath();
967
986
 
968
987
  const aPathSplit = sPath.split("/");
969
- let targetEntitySet: _EntitySet | _Singleton = oConverterOutput.entitySets.find(
988
+ let targetEntitySet: EntitySet | Singleton = oConvertedMetadata.entitySets.find(
970
989
  (entitySet) => entitySet.name === aPathSplit[1]
971
- ) as _EntitySet;
990
+ ) as EntitySet;
972
991
  if (!targetEntitySet) {
973
- targetEntitySet = oConverterOutput.singletons.find((singleton) => singleton.name === aPathSplit[1]) as _Singleton;
992
+ targetEntitySet = oConvertedMetadata.singletons.find((singleton) => singleton.name === aPathSplit[1]) as Singleton;
974
993
  }
975
994
  let relativePath = aPathSplit.slice(2).join("/");
976
995
 
@@ -1041,10 +1060,9 @@ export function convertMetaModelContext(oMetaModelContext: Context, bIncludeVisi
1041
1060
  const action = actions[relativeSplit[0]];
1042
1061
  if (relativeSplit[1] && action.parameters) {
1043
1062
  const parameterName = relativeSplit[1];
1044
- const targetParameter = action.parameters.find((parameter) => {
1045
- return parameter.fullyQualifiedName.endsWith("/" + parameterName);
1063
+ return action.parameters.find((parameter) => {
1064
+ return parameter.fullyQualifiedName.endsWith(`/${parameterName}`);
1046
1065
  });
1047
- return targetParameter;
1048
1066
  } else if (relativePath.length === 1) {
1049
1067
  return action;
1050
1068
  }
@@ -1072,18 +1090,18 @@ export type ResolvedTarget = {
1072
1090
  };
1073
1091
 
1074
1092
  export function getInvolvedDataModelObjects(oMetaModelContext: Context, oEntitySetMetaModelContext?: Context): DataModelObjectPath {
1075
- const oConverterOutput = convertTypes(oMetaModelContext.getModel() as ODataMetaModel);
1093
+ const oConvertedMetadata = convertTypes(oMetaModelContext.getModel() as ODataMetaModel);
1076
1094
  const metaModelContext = convertMetaModelContext(oMetaModelContext, true);
1077
1095
  let targetEntitySetLocation;
1078
1096
  if (oEntitySetMetaModelContext && oEntitySetMetaModelContext.getPath() !== "/") {
1079
1097
  targetEntitySetLocation = getInvolvedDataModelObjects(oEntitySetMetaModelContext);
1080
1098
  }
1081
- return getInvolvedDataModelObjectFromPath(metaModelContext, oConverterOutput, targetEntitySetLocation);
1099
+ return getInvolvedDataModelObjectFromPath(metaModelContext, oConvertedMetadata, targetEntitySetLocation);
1082
1100
  }
1083
1101
 
1084
1102
  export function getInvolvedDataModelObjectFromPath(
1085
1103
  metaModelContext: ResolvedTarget,
1086
- convertedTypes: ConverterOutput,
1104
+ convertedTypes: ConvertedMetadata,
1087
1105
  targetEntitySetLocation?: DataModelObjectPath
1088
1106
  ): DataModelObjectPath {
1089
1107
  const dataModelObjects = metaModelContext.visitedObjects.filter(
@@ -1092,11 +1110,11 @@ export function getInvolvedDataModelObjectFromPath(
1092
1110
  if (metaModelContext.target && metaModelContext.target.hasOwnProperty("_type") && metaModelContext.target._type !== "EntityType") {
1093
1111
  dataModelObjects.push(metaModelContext.target);
1094
1112
  }
1095
- const navigationProperties: _NavigationProperty[] = [];
1096
- const rootEntitySet: _EntitySet = dataModelObjects[0] as _EntitySet;
1113
+ const navigationProperties: NavigationProperty[] = [];
1114
+ const rootEntitySet: EntitySet = dataModelObjects[0] as EntitySet;
1097
1115
  // currentEntitySet can be undefined.
1098
- let currentEntitySet: _EntitySet | undefined = rootEntitySet as _EntitySet;
1099
- let currentEntityType: _EntityType = rootEntitySet.entityType;
1116
+ let currentEntitySet: EntitySet | undefined = rootEntitySet;
1117
+ let currentEntityType: EntityType = rootEntitySet.entityType;
1100
1118
  let i = 1;
1101
1119
  let currentObject;
1102
1120
  let navigatedPaths = [];
@@ -1104,17 +1122,17 @@ export function getInvolvedDataModelObjectFromPath(
1104
1122
  currentObject = dataModelObjects[i++];
1105
1123
  if (currentObject._type === "NavigationProperty") {
1106
1124
  navigatedPaths.push(currentObject.name);
1107
- navigationProperties.push(currentObject as _NavigationProperty);
1108
- currentEntityType = (currentObject as _NavigationProperty).targetType;
1125
+ navigationProperties.push(currentObject as NavigationProperty);
1126
+ currentEntityType = (currentObject as NavigationProperty).targetType;
1109
1127
  if (currentEntitySet && currentEntitySet.navigationPropertyBinding.hasOwnProperty(navigatedPaths.join("/"))) {
1110
- currentEntitySet = currentEntitySet.navigationPropertyBinding[currentObject.name];
1128
+ currentEntitySet = currentEntitySet.navigationPropertyBinding[currentObject.name] as EntitySet;
1111
1129
  navigatedPaths = [];
1112
1130
  } else {
1113
1131
  currentEntitySet = undefined;
1114
1132
  }
1115
1133
  }
1116
1134
  if (currentObject._type === "EntitySet") {
1117
- currentEntitySet = currentObject as _EntitySet;
1135
+ currentEntitySet = currentObject as EntitySet;
1118
1136
  currentEntityType = currentEntitySet.entityType;
1119
1137
  }
1120
1138
  }
@@ -1129,7 +1147,7 @@ export function getInvolvedDataModelObjectFromPath(
1129
1147
  targetEntitySetLocation.startingEntitySet = rootEntitySet;
1130
1148
  targetEntitySetLocation.navigationProperties = requiredDataModelObjects
1131
1149
  .filter((object: any) => object._type === "NavigationProperty")
1132
- .concat(targetEntitySetLocation.navigationProperties) as _NavigationProperty[];
1150
+ .concat(targetEntitySetLocation.navigationProperties) as NavigationProperty[];
1133
1151
  }
1134
1152
  }
1135
1153
  const outDataModelPath = {