@sapui5/sap.fe.core 1.102.3 → 1.105.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 (359) hide show
  1. package/package.json +6 -6
  2. package/src/sap/fe/core/.library +1 -1
  3. package/src/sap/fe/core/ActionRuntime.js +120 -0
  4. package/src/sap/fe/core/ActionRuntime.ts +108 -0
  5. package/src/sap/fe/core/AppComponent.js +81 -35
  6. package/src/sap/fe/core/AppComponent.ts +68 -44
  7. package/src/sap/fe/core/AppStateHandler.js +82 -70
  8. package/src/sap/fe/core/AppStateHandler.ts +32 -37
  9. package/src/sap/fe/core/BaseController.js +12 -10
  10. package/src/sap/fe/core/BaseController.ts +15 -13
  11. package/src/sap/fe/core/CommonUtils.js +291 -218
  12. package/src/sap/fe/core/CommonUtils.ts +315 -251
  13. package/src/sap/fe/core/ExtensionAPI.js +25 -28
  14. package/src/sap/fe/core/ExtensionAPI.ts +36 -38
  15. package/src/sap/fe/core/PageController.js +5 -5
  16. package/src/sap/fe/core/PageController.ts +4 -5
  17. package/src/sap/fe/core/TemplateComponent.js +21 -10
  18. package/src/sap/fe/core/TemplateComponent.ts +9 -6
  19. package/src/sap/fe/core/TemplateModel.js +2 -2
  20. package/src/sap/fe/core/TemplateModel.ts +1 -1
  21. package/src/sap/fe/core/buildingBlocks/AttributeModel.js +11 -3
  22. package/src/sap/fe/core/buildingBlocks/AttributeModel.ts +8 -2
  23. package/src/sap/fe/core/buildingBlocks/BuildingBlock.js +197 -43
  24. package/src/sap/fe/core/buildingBlocks/BuildingBlock.ts +164 -24
  25. package/src/sap/fe/core/buildingBlocks/BuildingBlockFormatter.js +14 -0
  26. package/src/sap/fe/core/buildingBlocks/BuildingBlockFormatter.ts +5 -0
  27. package/src/sap/fe/core/buildingBlocks/BuildingBlockRuntime.js +609 -230
  28. package/src/sap/fe/core/buildingBlocks/BuildingBlockRuntime.ts +275 -128
  29. package/src/sap/fe/core/buildingBlocks/TraceInfo.js +30 -30
  30. package/src/sap/fe/core/buildingBlocks/TraceInfo.ts +32 -29
  31. package/src/sap/fe/core/controllerextensions/BusyLocker.js +1 -1
  32. package/src/sap/fe/core/controllerextensions/EditFlow.js +761 -700
  33. package/src/sap/fe/core/controllerextensions/EditFlow.ts +478 -514
  34. package/src/sap/fe/core/controllerextensions/IntentBasedNavigation.js +10 -10
  35. package/src/sap/fe/core/controllerextensions/IntentBasedNavigation.ts +10 -10
  36. package/src/sap/fe/core/controllerextensions/InternalEditFlow.js +104 -75
  37. package/src/sap/fe/core/controllerextensions/InternalEditFlow.ts +71 -79
  38. package/src/sap/fe/core/controllerextensions/InternalIntentBasedNavigation.js +68 -68
  39. package/src/sap/fe/core/controllerextensions/InternalIntentBasedNavigation.ts +76 -76
  40. package/src/sap/fe/core/controllerextensions/InternalRouting.js +162 -102
  41. package/src/sap/fe/core/controllerextensions/InternalRouting.ts +177 -121
  42. package/src/sap/fe/core/controllerextensions/KPIManagement.js +67 -69
  43. package/src/sap/fe/core/controllerextensions/KPIManagement.ts +106 -123
  44. package/src/sap/fe/core/controllerextensions/MassEdit.js +10 -10
  45. package/src/sap/fe/core/controllerextensions/MassEdit.ts +20 -27
  46. package/src/sap/fe/core/controllerextensions/MessageHandler.js +21 -13
  47. package/src/sap/fe/core/controllerextensions/MessageHandler.ts +21 -14
  48. package/src/sap/fe/core/controllerextensions/PageReady.js +98 -26
  49. package/src/sap/fe/core/controllerextensions/PageReady.ts +98 -34
  50. package/src/sap/fe/core/controllerextensions/Paginator.js +31 -32
  51. package/src/sap/fe/core/controllerextensions/Paginator.ts +33 -34
  52. package/src/sap/fe/core/controllerextensions/Placeholder.js +5 -7
  53. package/src/sap/fe/core/controllerextensions/Placeholder.ts +12 -14
  54. package/src/sap/fe/core/controllerextensions/Routing.js +11 -12
  55. package/src/sap/fe/core/controllerextensions/Routing.ts +12 -13
  56. package/src/sap/fe/core/controllerextensions/RoutingListener.js +1 -1
  57. package/src/sap/fe/core/controllerextensions/Share.js +171 -140
  58. package/src/sap/fe/core/controllerextensions/Share.ts +117 -118
  59. package/src/sap/fe/core/controllerextensions/SideEffects.js +47 -51
  60. package/src/sap/fe/core/controllerextensions/SideEffects.ts +56 -60
  61. package/src/sap/fe/core/controllerextensions/ViewState.js +201 -132
  62. package/src/sap/fe/core/controllerextensions/ViewState.ts +141 -148
  63. package/src/sap/fe/core/controllerextensions/collaboration/ActivityBase.js +5 -5
  64. package/src/sap/fe/core/controllerextensions/collaboration/ActivityBase.ts +8 -7
  65. package/src/sap/fe/core/controllerextensions/collaboration/ActivitySync.js +13 -12
  66. package/src/sap/fe/core/controllerextensions/collaboration/ActivitySync.ts +17 -20
  67. package/src/sap/fe/core/controllerextensions/collaboration/CollaborationCommon.js +13 -12
  68. package/src/sap/fe/core/controllerextensions/collaboration/CollaborationCommon.ts +15 -15
  69. package/src/sap/fe/core/controllerextensions/collaboration/Manage.js +57 -18
  70. package/src/sap/fe/core/controllerextensions/collaboration/Manage.ts +60 -28
  71. package/src/sap/fe/core/controllerextensions/collaboration/ManageDialog.fragment.xml +29 -21
  72. package/src/sap/fe/core/controllerextensions/editFlow/TransactionHelper.js +1424 -940
  73. package/src/sap/fe/core/controllerextensions/editFlow/TransactionHelper.ts +799 -836
  74. package/src/sap/fe/core/controllerextensions/editFlow/draft.js +410 -377
  75. package/src/sap/fe/core/controllerextensions/editFlow/draft.ts +275 -358
  76. package/src/sap/fe/core/controllerextensions/editFlow/draftDataLossPopup.js +309 -0
  77. package/src/sap/fe/core/controllerextensions/editFlow/draftDataLossPopup.ts +320 -0
  78. package/src/sap/fe/core/controllerextensions/editFlow/operations.js +752 -579
  79. package/src/sap/fe/core/controllerextensions/editFlow/operations.ts +631 -599
  80. package/src/sap/fe/core/controllerextensions/editFlow/sticky.js +92 -74
  81. package/src/sap/fe/core/controllerextensions/editFlow/sticky.ts +49 -52
  82. package/src/sap/fe/core/controllerextensions/messageHandler/messageHandling.js +78 -41
  83. package/src/sap/fe/core/controllerextensions/messageHandler/messageHandling.ts +110 -84
  84. package/src/sap/fe/core/controllerextensions/routing/RouterProxy.js +69 -81
  85. package/src/sap/fe/core/controllerextensions/routing/RouterProxy.ts +64 -73
  86. package/src/sap/fe/core/controls/ActionParameterDialog.fragment.xml +18 -2
  87. package/src/sap/fe/core/controls/ActionParameterDialogFieldValueHelp.fragment.xml +35 -0
  88. package/src/sap/fe/core/controls/ActionParameterDialogValueHelp.fragment.xml +25 -24
  89. package/src/sap/fe/core/controls/Any.js +9 -5
  90. package/src/sap/fe/core/controls/Any.ts +10 -4
  91. package/src/sap/fe/core/controls/CommandExecution.js +12 -26
  92. package/src/sap/fe/core/controls/CommandExecution.ts +11 -25
  93. package/src/sap/fe/core/controls/ConditionalWrapper.js +3 -3
  94. package/src/sap/fe/core/controls/ConditionalWrapper.ts +3 -3
  95. package/src/sap/fe/core/controls/CustomFilterFieldContentWrapper.js +26 -26
  96. package/src/sap/fe/core/controls/CustomFilterFieldContentWrapper.ts +25 -24
  97. package/src/sap/fe/core/controls/CustomQuickViewPage.js +3 -3
  98. package/src/sap/fe/core/controls/CustomQuickViewPage.ts +2 -2
  99. package/src/sap/fe/core/controls/DataLossOrDraftDiscard/DataLossOrDraftDiscardHandler.js +3 -3
  100. package/src/sap/fe/core/controls/DataLossOrDraftDiscard/DataLossOrDraftDiscardHandler.ts +5 -5
  101. package/src/sap/fe/core/controls/FieldWrapper.js +3 -3
  102. package/src/sap/fe/core/controls/FieldWrapper.ts +3 -3
  103. package/src/sap/fe/core/controls/FileWrapper.js +9 -4
  104. package/src/sap/fe/core/controls/FileWrapper.ts +16 -12
  105. package/src/sap/fe/core/controls/FilterBar.js +7 -3
  106. package/src/sap/fe/core/controls/FilterBar.ts +13 -9
  107. package/src/sap/fe/core/controls/FormElementWrapper.js +2 -2
  108. package/src/sap/fe/core/controls/FormElementWrapper.ts +2 -2
  109. package/src/sap/fe/core/controls/MassEditSelect.js +1 -1
  110. package/src/sap/fe/core/controls/MassEditSelect.ts +0 -4
  111. package/src/sap/fe/core/controls/MultiValueParameterDelegate.js +1 -1
  112. package/src/sap/fe/core/controls/NonComputedVisibleKeyFieldsDialog.fragment.xml +44 -19
  113. package/src/sap/fe/core/controls/filterbar/FilterContainer.js +2 -2
  114. package/src/sap/fe/core/controls/filterbar/VisualFilter.js +17 -13
  115. package/src/sap/fe/core/controls/filterbar/VisualFilter.ts +20 -22
  116. package/src/sap/fe/core/controls/filterbar/VisualFilterContainer.js +4 -4
  117. package/src/sap/fe/core/controls/filterbar/VisualFilterContainer.ts +8 -8
  118. package/src/sap/fe/core/controls/filterbar/utils/VisualFilterUtils.js +49 -49
  119. package/src/sap/fe/core/controls/filterbar/utils/VisualFilterUtils.ts +54 -54
  120. package/src/sap/fe/core/controls/massEdit/MassEditDialog.fragment.xml +8 -2
  121. package/src/sap/fe/core/controls/massEdit/MassEditField.fragment.xml +22 -35
  122. package/src/sap/fe/core/controls/massEdit/MassEditHandlers.js +89 -88
  123. package/src/sap/fe/core/controls/massEdit/MassEditHandlers.ts +107 -106
  124. package/src/sap/fe/core/converters/ConverterContext.js +48 -34
  125. package/src/sap/fe/core/converters/ConverterContext.ts +81 -67
  126. package/src/sap/fe/core/converters/ManifestSettings.js +1 -1
  127. package/src/sap/fe/core/converters/ManifestSettings.ts +18 -15
  128. package/src/sap/fe/core/converters/ManifestWrapper.js +59 -45
  129. package/src/sap/fe/core/converters/ManifestWrapper.ts +55 -45
  130. package/src/sap/fe/core/converters/MetaModelConverter.js +74 -40
  131. package/src/sap/fe/core/converters/MetaModelConverter.ts +176 -140
  132. package/src/sap/fe/core/converters/TemplateConverter.js +21 -20
  133. package/src/sap/fe/core/converters/TemplateConverter.ts +27 -24
  134. package/src/sap/fe/core/converters/annotations/DataField.js +58 -35
  135. package/src/sap/fe/core/converters/annotations/DataField.ts +102 -76
  136. package/src/sap/fe/core/converters/common/AnnotationConverter.js +1956 -1494
  137. package/src/sap/fe/core/converters/controls/Common/Action.js +78 -51
  138. package/src/sap/fe/core/converters/controls/Common/Action.ts +87 -52
  139. package/src/sap/fe/core/converters/controls/Common/Chart.js +22 -16
  140. package/src/sap/fe/core/converters/controls/Common/Chart.ts +42 -43
  141. package/src/sap/fe/core/converters/controls/Common/Criticality.js +3 -3
  142. package/src/sap/fe/core/converters/controls/Common/Criticality.ts +4 -4
  143. package/src/sap/fe/core/converters/controls/Common/DataVisualization.js +65 -29
  144. package/src/sap/fe/core/converters/controls/Common/DataVisualization.ts +93 -62
  145. package/src/sap/fe/core/converters/controls/Common/Form.js +31 -31
  146. package/src/sap/fe/core/converters/controls/Common/Form.ts +46 -57
  147. package/src/sap/fe/core/converters/controls/Common/KPI.js +11 -11
  148. package/src/sap/fe/core/converters/controls/Common/KPI.ts +49 -52
  149. package/src/sap/fe/core/converters/controls/Common/Table.js +251 -264
  150. package/src/sap/fe/core/converters/controls/Common/Table.ts +344 -370
  151. package/src/sap/fe/core/converters/controls/Common/table/StandardActions.js +119 -119
  152. package/src/sap/fe/core/converters/controls/Common/table/StandardActions.ts +147 -144
  153. package/src/sap/fe/core/converters/controls/ListReport/FilterBar.js +89 -59
  154. package/src/sap/fe/core/converters/controls/ListReport/FilterBar.ts +118 -71
  155. package/src/sap/fe/core/converters/controls/ListReport/VisualFilters.js +28 -26
  156. package/src/sap/fe/core/converters/controls/ListReport/VisualFilters.ts +46 -43
  157. package/src/sap/fe/core/converters/controls/ObjectPage/Avatar.js +9 -9
  158. package/src/sap/fe/core/converters/controls/ObjectPage/Avatar.ts +14 -13
  159. package/src/sap/fe/core/converters/controls/ObjectPage/HeaderFacet.js +131 -95
  160. package/src/sap/fe/core/converters/controls/ObjectPage/HeaderFacet.ts +123 -87
  161. package/src/sap/fe/core/converters/controls/ObjectPage/SubSection.js +98 -87
  162. package/src/sap/fe/core/converters/controls/ObjectPage/SubSection.ts +121 -117
  163. package/src/sap/fe/core/converters/helpers/Aggregation.js +2 -4
  164. package/src/sap/fe/core/converters/helpers/Aggregation.ts +12 -15
  165. package/src/sap/fe/core/converters/helpers/BindingHelper.js +31 -31
  166. package/src/sap/fe/core/converters/helpers/BindingHelper.ts +30 -29
  167. package/src/sap/fe/core/converters/helpers/ConfigurableObject.js +8 -6
  168. package/src/sap/fe/core/converters/helpers/ConfigurableObject.ts +18 -10
  169. package/src/sap/fe/core/converters/helpers/DataFieldHelper.js +136 -0
  170. package/src/sap/fe/core/converters/helpers/DataFieldHelper.ts +139 -0
  171. package/src/sap/fe/core/converters/helpers/ID.js +48 -46
  172. package/src/sap/fe/core/converters/helpers/ID.ts +26 -25
  173. package/src/sap/fe/core/converters/helpers/IssueManager.js +1 -1
  174. package/src/sap/fe/core/converters/helpers/Key.js +7 -7
  175. package/src/sap/fe/core/converters/helpers/Key.ts +7 -7
  176. package/src/sap/fe/core/converters/helpers/SelectionVariantHelper.js +1 -1
  177. package/src/sap/fe/core/converters/helpers/SelectionVariantHelper.ts +4 -5
  178. package/src/sap/fe/core/converters/objectPage/FormMenuActions.js +6 -6
  179. package/src/sap/fe/core/converters/objectPage/FormMenuActions.ts +10 -10
  180. package/src/sap/fe/core/converters/objectPage/HeaderAndFooterAction.js +53 -75
  181. package/src/sap/fe/core/converters/objectPage/HeaderAndFooterAction.ts +59 -90
  182. package/src/sap/fe/core/converters/templates/ListReportConverter.js +58 -57
  183. package/src/sap/fe/core/converters/templates/ListReportConverter.ts +93 -86
  184. package/src/sap/fe/core/converters/templates/ObjectPageConverter.js +58 -44
  185. package/src/sap/fe/core/converters/templates/ObjectPageConverter.ts +87 -80
  186. package/src/sap/fe/core/designtime/AppComponent.designtime.js +4 -4
  187. package/src/sap/fe/core/designtime/AppComponent.designtime.ts +4 -4
  188. package/src/sap/fe/core/formatters/CollaborationFormatter.js +2 -2
  189. package/src/sap/fe/core/formatters/CollaborationFormatter.ts +3 -3
  190. package/src/sap/fe/core/formatters/FPMFormatter.js +5 -5
  191. package/src/sap/fe/core/formatters/FPMFormatter.ts +10 -10
  192. package/src/sap/fe/core/formatters/KPIFormatter.js +7 -7
  193. package/src/sap/fe/core/formatters/KPIFormatter.ts +10 -10
  194. package/src/sap/fe/core/formatters/StandardFormatter.js +96 -0
  195. package/src/sap/fe/core/formatters/StandardFormatter.ts +70 -0
  196. package/src/sap/fe/core/formatters/TableFormatter.js +11 -11
  197. package/src/sap/fe/core/formatters/TableFormatter.ts +12 -12
  198. package/src/sap/fe/core/formatters/TableFormatterTypes.js +1 -1
  199. package/src/sap/fe/core/formatters/ValueFormatter.js +8 -8
  200. package/src/sap/fe/core/formatters/ValueFormatter.ts +9 -9
  201. package/src/sap/fe/core/fpm/Component.js +33 -7
  202. package/src/sap/fe/core/fpm/Component.ts +14 -0
  203. package/src/sap/fe/core/helpers/AnnotationEnum.js +1 -1
  204. package/src/sap/fe/core/helpers/AppStartupHelper.js +19 -18
  205. package/src/sap/fe/core/helpers/AppStartupHelper.ts +41 -43
  206. package/src/sap/fe/core/helpers/BindingToolkit.js +1836 -0
  207. package/src/sap/fe/core/helpers/{BindingExpression.ts → BindingToolkit.ts} +397 -270
  208. package/src/sap/fe/core/helpers/ClassSupport.js +49 -12
  209. package/src/sap/fe/core/helpers/ClassSupport.ts +37 -10
  210. package/src/sap/fe/core/helpers/DynamicAnnotationPathHelper.js +2 -2
  211. package/src/sap/fe/core/helpers/DynamicAnnotationPathHelper.ts +1 -1
  212. package/src/sap/fe/core/helpers/EditState.js +1 -6
  213. package/src/sap/fe/core/helpers/EditState.ts +5 -10
  214. package/src/sap/fe/core/helpers/ExcelFormatHelper.js +2 -2
  215. package/src/sap/fe/core/helpers/ExcelFormatHelper.ts +4 -4
  216. package/src/sap/fe/core/helpers/FPMHelper.js +1 -1
  217. package/src/sap/fe/core/helpers/FPMHelper.ts +2 -2
  218. package/src/sap/fe/core/helpers/KeepAliveHelper.js +31 -31
  219. package/src/sap/fe/core/helpers/KeepAliveHelper.ts +52 -56
  220. package/src/sap/fe/core/helpers/KeepAliveRefreshTypes.js +1 -1
  221. package/src/sap/fe/core/helpers/MassEditHelper.js +306 -280
  222. package/src/sap/fe/core/helpers/MassEditHelper.ts +380 -360
  223. package/src/sap/fe/core/helpers/MessageStrip.js +81 -0
  224. package/src/sap/fe/core/helpers/MessageStrip.ts +79 -0
  225. package/src/sap/fe/core/helpers/ModelHelper.js +25 -25
  226. package/src/sap/fe/core/helpers/ModelHelper.ts +34 -32
  227. package/src/sap/fe/core/helpers/PasteHelper.js +3 -10
  228. package/src/sap/fe/core/helpers/PasteHelper.ts +20 -25
  229. package/src/sap/fe/core/helpers/SemanticDateOperators.js +1 -1
  230. package/src/sap/fe/core/helpers/SemanticDateOperators.ts +11 -11
  231. package/src/sap/fe/core/helpers/SemanticKeyHelper.js +3 -3
  232. package/src/sap/fe/core/helpers/SemanticKeyHelper.ts +8 -8
  233. package/src/sap/fe/core/helpers/StableIdHelper.js +12 -12
  234. package/src/sap/fe/core/helpers/StableIdHelper.ts +12 -12
  235. package/src/sap/fe/core/helpers/Synchronization.js +1 -1
  236. package/src/sap/fe/core/helpers/ToES6Promise.js +32 -0
  237. package/src/sap/fe/core/helpers/ToES6Promise.ts +19 -0
  238. package/src/sap/fe/core/jsx-runtime/Fragment.js +16 -0
  239. package/src/sap/fe/core/jsx-runtime/Fragment.ts +3 -0
  240. package/src/sap/fe/core/jsx-runtime/ViewLoader.js +109 -0
  241. package/src/sap/fe/core/jsx-runtime/ViewLoader.tsx +47 -0
  242. package/src/sap/fe/core/jsx-runtime/jsx-control.js +110 -0
  243. package/src/sap/fe/core/jsx-runtime/jsx-control.ts +92 -0
  244. package/src/sap/fe/core/jsx-runtime/jsx-xml.js +105 -0
  245. package/src/sap/fe/core/jsx-runtime/jsx-xml.ts +89 -0
  246. package/src/sap/fe/core/jsx-runtime/jsx.js +12 -90
  247. package/src/sap/fe/core/jsx-runtime/jsx.ts +24 -85
  248. package/src/sap/fe/core/jsx-runtime/jsxs.js +1 -1
  249. package/src/sap/fe/core/jsx-runtime/useMDXComponents.js +179 -0
  250. package/src/sap/fe/core/jsx-runtime/useMDXComponents.tsx +150 -0
  251. package/src/sap/fe/core/library.js +42 -3
  252. package/src/sap/fe/core/library.support.js +1 -1
  253. package/src/sap/fe/core/library.ts +38 -0
  254. package/src/sap/fe/core/manifestMerger/ChangePageConfiguration.js +3 -3
  255. package/src/sap/fe/core/manifestMerger/ChangePageConfiguration.ts +2 -2
  256. package/src/sap/fe/core/messagebundle.properties +39 -67
  257. package/src/sap/fe/core/messagebundle_ar.properties +27 -44
  258. package/src/sap/fe/core/messagebundle_bg.properties +27 -44
  259. package/src/sap/fe/core/messagebundle_ca.properties +27 -44
  260. package/src/sap/fe/core/messagebundle_cs.properties +27 -44
  261. package/src/sap/fe/core/messagebundle_cy.properties +26 -43
  262. package/src/sap/fe/core/messagebundle_da.properties +27 -44
  263. package/src/sap/fe/core/messagebundle_de.properties +25 -42
  264. package/src/sap/fe/core/messagebundle_el.properties +28 -45
  265. package/src/sap/fe/core/messagebundle_en.properties +27 -44
  266. package/src/sap/fe/core/messagebundle_en_GB.properties +27 -44
  267. package/src/sap/fe/core/messagebundle_en_US_sappsd.properties +25 -42
  268. package/src/sap/fe/core/messagebundle_en_US_saprigi.properties +26 -40
  269. package/src/sap/fe/core/messagebundle_en_US_saptrc.properties +25 -42
  270. package/src/sap/fe/core/messagebundle_es.properties +27 -44
  271. package/src/sap/fe/core/messagebundle_es_MX.properties +27 -44
  272. package/src/sap/fe/core/messagebundle_et.properties +27 -44
  273. package/src/sap/fe/core/messagebundle_fi.properties +27 -44
  274. package/src/sap/fe/core/messagebundle_fr.properties +26 -43
  275. package/src/sap/fe/core/messagebundle_fr_CA.properties +25 -42
  276. package/src/sap/fe/core/messagebundle_hi.properties +27 -44
  277. package/src/sap/fe/core/messagebundle_hr.properties +27 -44
  278. package/src/sap/fe/core/messagebundle_hu.properties +27 -44
  279. package/src/sap/fe/core/messagebundle_id.properties +27 -44
  280. package/src/sap/fe/core/messagebundle_it.properties +43 -60
  281. package/src/sap/fe/core/messagebundle_iw.properties +27 -44
  282. package/src/sap/fe/core/messagebundle_ja.properties +27 -44
  283. package/src/sap/fe/core/messagebundle_kk.properties +27 -44
  284. package/src/sap/fe/core/messagebundle_ko.properties +30 -47
  285. package/src/sap/fe/core/messagebundle_lt.properties +27 -44
  286. package/src/sap/fe/core/messagebundle_lv.properties +27 -44
  287. package/src/sap/fe/core/messagebundle_ms.properties +27 -44
  288. package/src/sap/fe/core/messagebundle_nl.properties +29 -46
  289. package/src/sap/fe/core/messagebundle_no.properties +27 -44
  290. package/src/sap/fe/core/messagebundle_pl.properties +28 -45
  291. package/src/sap/fe/core/messagebundle_pt.properties +28 -45
  292. package/src/sap/fe/core/messagebundle_pt_PT.properties +27 -44
  293. package/src/sap/fe/core/messagebundle_ro.properties +27 -44
  294. package/src/sap/fe/core/messagebundle_ru.properties +27 -44
  295. package/src/sap/fe/core/messagebundle_sh.properties +27 -44
  296. package/src/sap/fe/core/messagebundle_sk.properties +27 -44
  297. package/src/sap/fe/core/messagebundle_sl.properties +27 -44
  298. package/src/sap/fe/core/messagebundle_sv.properties +27 -44
  299. package/src/sap/fe/core/messagebundle_th.properties +25 -42
  300. package/src/sap/fe/core/messagebundle_tr.properties +27 -44
  301. package/src/sap/fe/core/messagebundle_uk.properties +27 -44
  302. package/src/sap/fe/core/messagebundle_vi.properties +27 -44
  303. package/src/sap/fe/core/messagebundle_zh_CN.properties +27 -44
  304. package/src/sap/fe/core/messagebundle_zh_TW.properties +27 -44
  305. package/src/sap/fe/core/services/AsyncComponentServiceFactory.js +3 -3
  306. package/src/sap/fe/core/services/AsyncComponentServiceFactory.ts +5 -5
  307. package/src/sap/fe/core/services/CacheHandlerServiceFactory.js +103 -75
  308. package/src/sap/fe/core/services/CacheHandlerServiceFactory.ts +72 -73
  309. package/src/sap/fe/core/services/EnvironmentServiceFactory.js +2 -2
  310. package/src/sap/fe/core/services/EnvironmentServiceFactory.ts +3 -2
  311. package/src/sap/fe/core/services/NavigationServiceFactory.js +62 -50
  312. package/src/sap/fe/core/services/NavigationServiceFactory.ts +63 -52
  313. package/src/sap/fe/core/services/ResourceModelServiceFactory.js +3 -3
  314. package/src/sap/fe/core/services/ResourceModelServiceFactory.ts +4 -4
  315. package/src/sap/fe/core/services/RoutingServiceFactory.js +56 -56
  316. package/src/sap/fe/core/services/RoutingServiceFactory.ts +67 -65
  317. package/src/sap/fe/core/services/ShellServicesFactory.js +93 -77
  318. package/src/sap/fe/core/services/ShellServicesFactory.ts +95 -82
  319. package/src/sap/fe/core/services/SideEffectsServiceFactory.js +64 -64
  320. package/src/sap/fe/core/services/SideEffectsServiceFactory.ts +102 -92
  321. package/src/sap/fe/core/services/TemplatedViewServiceFactory.js +232 -200
  322. package/src/sap/fe/core/services/TemplatedViewServiceFactory.ts +145 -142
  323. package/src/sap/fe/core/services/view/TemplatingErrorPage.controller.js +2 -2
  324. package/src/sap/fe/core/support/AnnotationIssue.support.js +1 -1
  325. package/src/sap/fe/core/support/CollectionFacetMissingID.support.js +1 -1
  326. package/src/sap/fe/core/support/CollectionFacetUnsupportedLevel.support.js +1 -1
  327. package/src/sap/fe/core/support/CommonHelper.js +3 -2
  328. package/src/sap/fe/core/support/CommonHelper.ts +9 -13
  329. package/src/sap/fe/core/support/Diagnostics.js +1 -1
  330. package/src/sap/fe/core/support/Diagnostics.ts +5 -5
  331. package/src/sap/fe/core/support/InvalidAnnotationColumnKey.support.js +1 -1
  332. package/src/sap/fe/core/templating/CommonFormatters.js +85 -0
  333. package/src/sap/fe/core/templating/CommonFormatters.ts +90 -0
  334. package/src/sap/fe/core/templating/CriticalityFormatters.js +31 -31
  335. package/src/sap/fe/core/templating/CriticalityFormatters.ts +42 -40
  336. package/src/sap/fe/core/templating/DataFieldFormatters.js +8 -8
  337. package/src/sap/fe/core/templating/DataFieldFormatters.ts +13 -10
  338. package/src/sap/fe/core/templating/DataModelPathHelper.js +23 -15
  339. package/src/sap/fe/core/templating/DataModelPathHelper.ts +47 -34
  340. package/src/sap/fe/core/templating/DisplayModeFormatter.js +1 -1
  341. package/src/sap/fe/core/templating/DisplayModeFormatter.ts +2 -3
  342. package/src/sap/fe/core/templating/EntitySetHelper.js +7 -7
  343. package/src/sap/fe/core/templating/EntitySetHelper.ts +6 -8
  344. package/src/sap/fe/core/templating/FieldControlHelper.js +35 -34
  345. package/src/sap/fe/core/templating/FieldControlHelper.ts +29 -46
  346. package/src/sap/fe/core/templating/FilterHelper.js +18 -17
  347. package/src/sap/fe/core/templating/FilterHelper.ts +18 -18
  348. package/src/sap/fe/core/templating/FilterTemplating.js +1 -1
  349. package/src/sap/fe/core/templating/FilterTemplating.ts +3 -3
  350. package/src/sap/fe/core/templating/PropertyFormatters.js +7 -7
  351. package/src/sap/fe/core/templating/PropertyFormatters.ts +21 -19
  352. package/src/sap/fe/core/templating/PropertyHelper.js +25 -25
  353. package/src/sap/fe/core/templating/PropertyHelper.ts +25 -26
  354. package/src/sap/fe/core/templating/UIFormatters.js +152 -95
  355. package/src/sap/fe/core/templating/UIFormatters.ts +202 -128
  356. package/src/sap/fe/core/type/DateTimeWithTimezone.js +2 -2
  357. package/src/sap/fe/core/type/Email.js +3 -3
  358. package/src/sap/fe/core/type/Email.ts +2 -2
  359. package/src/sap/fe/core/helpers/BindingExpression.js +0 -1732
@@ -1,29 +1,34 @@
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
+ ServiceObject,
26
+ Singleton
27
+ } from "@sap-ux/vocabularies-types";
23
28
  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";
29
+ import type { DataModelObjectPath } from "sap/fe/core/templating/DataModelPathHelper";
30
+ import type Context from "sap/ui/model/Context";
31
+ import type ODataMetaModel from "sap/ui/model/odata/v4/ODataMetaModel";
27
32
  import { generate } from "../helpers/StableIdHelper";
28
33
 
29
34
  const VOCABULARY_ALIAS: any = {
@@ -80,7 +85,7 @@ function parsePropertyValue(
80
85
  oCapabilities: EnvironmentCapabilities
81
86
  ): any {
82
87
  let value;
83
- const currentPropertyTarget: string = currentTarget + "/" + propertyKey;
88
+ const currentPropertyTarget: string = `${currentTarget}/${propertyKey}`;
84
89
  const typeOfAnnotation = typeof annotationObject;
85
90
  if (annotationObject === null) {
86
91
  value = { type: "Null", Null: null };
@@ -96,7 +101,7 @@ function parsePropertyValue(
96
101
  Collection: annotationObject.map((subAnnotationObject, subAnnotationObjectIndex) =>
97
102
  parseAnnotationObject(
98
103
  subAnnotationObject,
99
- currentPropertyTarget + "/" + subAnnotationObjectIndex,
104
+ `${currentPropertyTarget}/${subAnnotationObjectIndex}`,
100
105
  annotationsLists,
101
106
  oCapabilities
102
107
  )
@@ -180,7 +185,7 @@ function parsePropertyValue(
180
185
  } else if (annotationObject.$EnumMember !== undefined) {
181
186
  value = {
182
187
  type: "EnumMember",
183
- EnumMember: mapNameToAlias(annotationObject.$EnumMember.split("/")[0]) + "/" + annotationObject.$EnumMember.split("/")[1]
188
+ EnumMember: `${mapNameToAlias(annotationObject.$EnumMember.split("/")[0])}/${annotationObject.$EnumMember.split("/")[1]}`
184
189
  };
185
190
  } else if (annotationObject.$Type) {
186
191
  value = {
@@ -208,7 +213,7 @@ function mapNameToAlias(annotationName: string): string {
208
213
  pathPart += "@";
209
214
  }
210
215
  const lastDot = annoPart.lastIndexOf(".");
211
- return pathPart + VOCABULARY_ALIAS[annoPart.substr(0, lastDot)] + "." + annoPart.substr(lastDot + 1);
216
+ return `${pathPart + VOCABULARY_ALIAS[annoPart.substr(0, lastDot)]}.${annoPart.substr(lastDot + 1)}`;
212
217
  }
213
218
  function parseAnnotationObject(
214
219
  annotationObject: any,
@@ -264,50 +269,50 @@ function parseAnnotationObject(
264
269
  } else if (annotationObject.$EnumMember !== undefined) {
265
270
  parsedAnnotationObject = {
266
271
  type: "EnumMember",
267
- EnumMember: mapNameToAlias(annotationObject.$EnumMember.split("/")[0]) + "/" + annotationObject.$EnumMember.split("/")[1]
272
+ EnumMember: `${mapNameToAlias(annotationObject.$EnumMember.split("/")[0])}/${annotationObject.$EnumMember.split("/")[1]}`
268
273
  };
269
274
  } else if (Array.isArray(annotationObject)) {
270
- const parsedAnnotationCollection = parsedAnnotationObject as any;
275
+ const parsedAnnotationCollection = parsedAnnotationObject;
271
276
  parsedAnnotationCollection.collection = annotationObject.map((subAnnotationObject, subAnnotationIndex) =>
272
- parseAnnotationObject(subAnnotationObject, currentObjectTarget + "/" + subAnnotationIndex, annotationsLists, oCapabilities)
277
+ parseAnnotationObject(subAnnotationObject, `${currentObjectTarget}/${subAnnotationIndex}`, annotationsLists, oCapabilities)
273
278
  );
274
279
  if (annotationObject.length > 0) {
275
280
  if (annotationObject[0].hasOwnProperty("$PropertyPath")) {
276
- (parsedAnnotationCollection.collection as any).type = "PropertyPath";
281
+ parsedAnnotationCollection.collection.type = "PropertyPath";
277
282
  } else if (annotationObject[0].hasOwnProperty("$Path")) {
278
- (parsedAnnotationCollection.collection as any).type = "Path";
283
+ parsedAnnotationCollection.collection.type = "Path";
279
284
  } else if (annotationObject[0].hasOwnProperty("$NavigationPropertyPath")) {
280
- (parsedAnnotationCollection.collection as any).type = "NavigationPropertyPath";
285
+ parsedAnnotationCollection.collection.type = "NavigationPropertyPath";
281
286
  } else if (annotationObject[0].hasOwnProperty("$AnnotationPath")) {
282
- (parsedAnnotationCollection.collection as any).type = "AnnotationPath";
287
+ parsedAnnotationCollection.collection.type = "AnnotationPath";
283
288
  } else if (annotationObject[0].hasOwnProperty("$Type")) {
284
- (parsedAnnotationCollection.collection as any).type = "Record";
289
+ parsedAnnotationCollection.collection.type = "Record";
285
290
  } else if (annotationObject[0].hasOwnProperty("$If")) {
286
- (parsedAnnotationCollection.collection as any).type = "If";
291
+ parsedAnnotationCollection.collection.type = "If";
287
292
  } else if (annotationObject[0].hasOwnProperty("$And")) {
288
- (parsedAnnotationCollection.collection as any).type = "And";
293
+ parsedAnnotationCollection.collection.type = "And";
289
294
  } else if (annotationObject[0].hasOwnProperty("$Or")) {
290
- (parsedAnnotationCollection.collection as any).type = "Or";
295
+ parsedAnnotationCollection.collection.type = "Or";
291
296
  } else if (annotationObject[0].hasOwnProperty("$Eq")) {
292
- (parsedAnnotationCollection.collection as any).type = "Eq";
297
+ parsedAnnotationCollection.collection.type = "Eq";
293
298
  } else if (annotationObject[0].hasOwnProperty("$Ne")) {
294
- (parsedAnnotationCollection.collection as any).type = "Ne";
299
+ parsedAnnotationCollection.collection.type = "Ne";
295
300
  } else if (annotationObject[0].hasOwnProperty("$Not")) {
296
- (parsedAnnotationCollection.collection as any).type = "Not";
301
+ parsedAnnotationCollection.collection.type = "Not";
297
302
  } else if (annotationObject[0].hasOwnProperty("$Gt")) {
298
- (parsedAnnotationCollection.collection as any).type = "Gt";
303
+ parsedAnnotationCollection.collection.type = "Gt";
299
304
  } else if (annotationObject[0].hasOwnProperty("$Ge")) {
300
- (parsedAnnotationCollection.collection as any).type = "Ge";
305
+ parsedAnnotationCollection.collection.type = "Ge";
301
306
  } else if (annotationObject[0].hasOwnProperty("$Lt")) {
302
- (parsedAnnotationCollection.collection as any).type = "Lt";
307
+ parsedAnnotationCollection.collection.type = "Lt";
303
308
  } else if (annotationObject[0].hasOwnProperty("$Le")) {
304
- (parsedAnnotationCollection.collection as any).type = "Le";
309
+ parsedAnnotationCollection.collection.type = "Le";
305
310
  } else if (annotationObject[0].hasOwnProperty("$Apply")) {
306
- (parsedAnnotationCollection.collection as any).type = "Apply";
311
+ parsedAnnotationCollection.collection.type = "Apply";
307
312
  } else if (typeof annotationObject[0] === "object") {
308
- (parsedAnnotationCollection.collection as any).type = "Record";
313
+ parsedAnnotationCollection.collection.type = "Record";
309
314
  } else {
310
- (parsedAnnotationCollection.collection as any).type = "String";
315
+ parsedAnnotationCollection.collection.type = "String";
311
316
  }
312
317
  }
313
318
  } else {
@@ -446,7 +451,7 @@ function createAnnotationLists(
446
451
  const annotationOfAnnotationSplit = annotationKey.split("@");
447
452
  if (annotationOfAnnotationSplit.length > 2) {
448
453
  currentOutAnnotationObject = getOrCreateAnnotationList(
449
- annotationTarget + "@" + annotationOfAnnotationSplit[1],
454
+ `${annotationTarget}@${annotationOfAnnotationSplit[1]}`,
450
455
  annotationLists
451
456
  );
452
457
  annotationKey = annotationOfAnnotationSplit[2];
@@ -462,9 +467,9 @@ function createAnnotationLists(
462
467
  term: `${annotationKey}`,
463
468
  qualifier: qualifier
464
469
  };
465
- let currentAnnotationTarget = annotationTarget + "@" + parsedAnnotationObject.term;
470
+ let currentAnnotationTarget = `${annotationTarget}@${parsedAnnotationObject.term}`;
466
471
  if (qualifier) {
467
- currentAnnotationTarget += "#" + qualifier;
472
+ currentAnnotationTarget += `#${qualifier}`;
468
473
  }
469
474
  let isCollection = false;
470
475
  const typeofAnnotation = typeof annotationObject;
@@ -510,55 +515,55 @@ function createAnnotationLists(
510
515
  } else if (annotationObject.$EnumMember !== undefined) {
511
516
  parsedAnnotationObject.value = {
512
517
  type: "EnumMember",
513
- EnumMember: mapNameToAlias(annotationObject.$EnumMember.split("/")[0]) + "/" + annotationObject.$EnumMember.split("/")[1]
518
+ EnumMember: `${mapNameToAlias(annotationObject.$EnumMember.split("/")[0])}/${annotationObject.$EnumMember.split("/")[1]}`
514
519
  };
515
520
  } else if (Array.isArray(annotationObject)) {
516
521
  isCollection = true;
517
522
  parsedAnnotationObject.collection = annotationObject.map((subAnnotationObject, subAnnotationIndex) =>
518
523
  parseAnnotationObject(
519
524
  subAnnotationObject,
520
- currentAnnotationTarget + "/" + subAnnotationIndex,
525
+ `${currentAnnotationTarget}/${subAnnotationIndex}`,
521
526
  annotationLists,
522
527
  oCapabilities
523
528
  )
524
529
  );
525
530
  if (annotationObject.length > 0) {
526
531
  if (annotationObject[0].hasOwnProperty("$PropertyPath")) {
527
- (parsedAnnotationObject.collection as any).type = "PropertyPath";
532
+ parsedAnnotationObject.collection.type = "PropertyPath";
528
533
  } else if (annotationObject[0].hasOwnProperty("$Path")) {
529
- (parsedAnnotationObject.collection as any).type = "Path";
534
+ parsedAnnotationObject.collection.type = "Path";
530
535
  } else if (annotationObject[0].hasOwnProperty("$NavigationPropertyPath")) {
531
- (parsedAnnotationObject.collection as any).type = "NavigationPropertyPath";
536
+ parsedAnnotationObject.collection.type = "NavigationPropertyPath";
532
537
  } else if (annotationObject[0].hasOwnProperty("$AnnotationPath")) {
533
- (parsedAnnotationObject.collection as any).type = "AnnotationPath";
538
+ parsedAnnotationObject.collection.type = "AnnotationPath";
534
539
  } else if (annotationObject[0].hasOwnProperty("$Type")) {
535
- (parsedAnnotationObject.collection as any).type = "Record";
540
+ parsedAnnotationObject.collection.type = "Record";
536
541
  } else if (annotationObject[0].hasOwnProperty("$If")) {
537
- (parsedAnnotationObject.collection as any).type = "If";
542
+ parsedAnnotationObject.collection.type = "If";
538
543
  } else if (annotationObject[0].hasOwnProperty("$Or")) {
539
- (parsedAnnotationObject.collection as any).type = "Or";
544
+ parsedAnnotationObject.collection.type = "Or";
540
545
  } else if (annotationObject[0].hasOwnProperty("$Eq")) {
541
- (parsedAnnotationObject.collection as any).type = "Eq";
546
+ parsedAnnotationObject.collection.type = "Eq";
542
547
  } else if (annotationObject[0].hasOwnProperty("$Ne")) {
543
- (parsedAnnotationObject.collection as any).type = "Ne";
548
+ parsedAnnotationObject.collection.type = "Ne";
544
549
  } else if (annotationObject[0].hasOwnProperty("$Not")) {
545
- (parsedAnnotationObject.collection as any).type = "Not";
550
+ parsedAnnotationObject.collection.type = "Not";
546
551
  } else if (annotationObject[0].hasOwnProperty("$Gt")) {
547
- (parsedAnnotationObject.collection as any).type = "Gt";
552
+ parsedAnnotationObject.collection.type = "Gt";
548
553
  } else if (annotationObject[0].hasOwnProperty("$Ge")) {
549
- (parsedAnnotationObject.collection as any).type = "Ge";
554
+ parsedAnnotationObject.collection.type = "Ge";
550
555
  } else if (annotationObject[0].hasOwnProperty("$Lt")) {
551
- (parsedAnnotationObject.collection as any).type = "Lt";
556
+ parsedAnnotationObject.collection.type = "Lt";
552
557
  } else if (annotationObject[0].hasOwnProperty("$Le")) {
553
- (parsedAnnotationObject.collection as any).type = "Le";
558
+ parsedAnnotationObject.collection.type = "Le";
554
559
  } else if (annotationObject[0].hasOwnProperty("$And")) {
555
- (parsedAnnotationObject.collection as any).type = "And";
560
+ parsedAnnotationObject.collection.type = "And";
556
561
  } else if (annotationObject[0].hasOwnProperty("$Apply")) {
557
- (parsedAnnotationObject.collection as any).type = "Apply";
562
+ parsedAnnotationObject.collection.type = "Apply";
558
563
  } else if (typeof annotationObject[0] === "object") {
559
- (parsedAnnotationObject.collection as any).type = "Record";
564
+ parsedAnnotationObject.collection.type = "Record";
560
565
  } else {
561
- (parsedAnnotationObject.collection as any).type = "String";
566
+ parsedAnnotationObject.collection.type = "String";
562
567
  }
563
568
  }
564
569
  } else {
@@ -599,8 +604,8 @@ function createAnnotationLists(
599
604
  }
600
605
  }
601
606
 
602
- function prepareProperty(propertyDefinition: any, entityTypeObject: EntityType | ComplexType, propertyName: string): Property {
603
- const propertyObject: Property = {
607
+ function prepareProperty(propertyDefinition: any, entityTypeObject: RawEntityType | RawComplexType, propertyName: string): RawProperty {
608
+ const propertyObject: RawProperty = {
604
609
  _type: "Property",
605
610
  name: propertyName,
606
611
  fullyQualifiedName: `${entityTypeObject.fullyQualifiedName}/${propertyName}`,
@@ -615,9 +620,9 @@ function prepareProperty(propertyDefinition: any, entityTypeObject: EntityType |
615
620
 
616
621
  function prepareNavigationProperty(
617
622
  navPropertyDefinition: any,
618
- entityTypeObject: EntityType | ComplexType,
623
+ entityTypeObject: RawEntityType | RawComplexType,
619
624
  navPropertyName: string
620
- ): V4NavigationProperty {
625
+ ): RawV4NavigationProperty {
621
626
  let referentialConstraint: ReferentialConstraint[] = [];
622
627
  if (navPropertyDefinition.$ReferentialConstraint) {
623
628
  referentialConstraint = Object.keys(navPropertyDefinition.$ReferentialConstraint).map((sourcePropertyName) => {
@@ -629,7 +634,7 @@ function prepareNavigationProperty(
629
634
  };
630
635
  });
631
636
  }
632
- const navigationProperty: V4NavigationProperty = {
637
+ const navigationProperty: RawV4NavigationProperty = {
633
638
  _type: "NavigationProperty",
634
639
  name: navPropertyName,
635
640
  fullyQualifiedName: `${entityTypeObject.fullyQualifiedName}/${navPropertyName}`,
@@ -643,8 +648,8 @@ function prepareNavigationProperty(
643
648
  return navigationProperty;
644
649
  }
645
650
 
646
- function prepareEntitySet(entitySetDefinition: any, entitySetName: string, entityContainerName: string): EntitySet {
647
- const entitySetObject: EntitySet = {
651
+ function prepareEntitySet(entitySetDefinition: any, entitySetName: string, entityContainerName: string): RawEntitySet {
652
+ const entitySetObject: RawEntitySet = {
648
653
  _type: "EntitySet",
649
654
  name: entitySetName,
650
655
  navigationPropertyBinding: {},
@@ -654,31 +659,31 @@ function prepareEntitySet(entitySetDefinition: any, entitySetName: string, entit
654
659
  return entitySetObject;
655
660
  }
656
661
 
657
- function prepareSingleton(singletonDefinition: any, singletonName: string, entityContainerName: string): Singleton {
662
+ function prepareSingleton(singletonDefinition: any, singletonName: string, entityContainerName: string): RawSingleton {
658
663
  return {
659
664
  _type: "Singleton",
660
665
  name: singletonName,
661
666
  navigationPropertyBinding: {},
662
- typeName: singletonDefinition.$Type,
667
+ entityTypeName: singletonDefinition.$Type,
663
668
  fullyQualifiedName: `${entityContainerName}/${singletonName}`,
664
669
  nullable: true
665
- } as Singleton;
670
+ };
666
671
  }
667
672
 
668
- function prepareTypeDefinition(typeDefinition: any, typeName: string, namespace: string): TypeDefinition {
669
- const typeObject: TypeDefinition = {
673
+ function prepareTypeDefinition(typeDefinition: any, typeName: string, namespace: string): RawTypeDefinition {
674
+ const typeObject: RawTypeDefinition = {
670
675
  _type: "TypeDefinition",
671
- name: typeName.replace(namespace + ".", ""),
676
+ name: typeName.replace(`${namespace}.`, ""),
672
677
  fullyQualifiedName: typeName,
673
678
  underlyingType: typeDefinition.$UnderlyingType
674
679
  };
675
680
  return typeObject;
676
681
  }
677
682
 
678
- function prepareComplexType(complexTypeDefinition: any, complexTypeName: string, namespace: string): ComplexType {
679
- const complexTypeObject: ComplexType = {
683
+ function prepareComplexType(complexTypeDefinition: any, complexTypeName: string, namespace: string): RawComplexType {
684
+ const complexTypeObject: RawComplexType = {
680
685
  _type: "ComplexType",
681
- name: complexTypeName.replace(namespace + ".", ""),
686
+ name: complexTypeName.replace(`${namespace}.`, ""),
682
687
  fullyQualifiedName: complexTypeName,
683
688
  properties: [],
684
689
  navigationProperties: []
@@ -717,16 +722,17 @@ function prepareEntityKeys(entityTypeDefinition: any, oMetaModelData: any): any
717
722
  return entityTypeDefinition.$Key || []; //handling of entity types without key as well as basetype
718
723
  }
719
724
 
720
- function prepareEntityType(entityTypeDefinition: any, entityTypeName: string, namespace: string, metaModelData: any): EntityType {
725
+ function prepareEntityType(entityTypeDefinition: any, entityTypeName: string, namespace: string, metaModelData: any): RawEntityType {
721
726
  const entityKeys: any = prepareEntityKeys(entityTypeDefinition, metaModelData);
722
727
 
723
- const entityTypeObject: EntityType = {
728
+ const entityTypeObject: RawEntityType = {
724
729
  _type: "EntityType",
725
- name: entityTypeName.replace(namespace + ".", ""),
730
+ name: entityTypeName.replace(`${namespace}.`, ""),
726
731
  fullyQualifiedName: entityTypeName,
727
732
  keys: [],
728
733
  entityProperties: [],
729
- navigationProperties: []
734
+ navigationProperties: [],
735
+ actions: {}
730
736
  };
731
737
 
732
738
  const entityProperties = Object.keys(entityTypeDefinition)
@@ -750,14 +756,14 @@ function prepareEntityType(entityTypeDefinition: any, entityTypeName: string, na
750
756
  });
751
757
 
752
758
  entityTypeObject.keys = entityKeys
753
- .map((entityKey: string) => entityProperties.find((property: Property) => property.name === entityKey))
759
+ .map((entityKey: string) => entityProperties.find((property: RawProperty) => property.name === entityKey))
754
760
  .filter((property: Property) => property !== undefined);
755
761
  entityTypeObject.entityProperties = entityProperties;
756
762
  entityTypeObject.navigationProperties = navigationProperties;
757
763
 
758
764
  return entityTypeObject;
759
765
  }
760
- function prepareAction(actionName: string, actionRawData: MetaModelAction, namespace: string, entityContainerName: string): Action {
766
+ function prepareAction(actionName: string, actionRawData: MetaModelAction, namespace: string, entityContainerName: string): RawAction {
761
767
  let actionEntityType: string = "";
762
768
  let actionFQN = `${actionName}`;
763
769
  const actionShortName = actionName.substr(namespace.length + 1);
@@ -786,6 +792,8 @@ function prepareAction(actionName: string, actionRawData: MetaModelAction, names
786
792
  _type: "ActionParameter",
787
793
  isEntitySet: param.$Type === actionRawData.$EntitySetPath,
788
794
  fullyQualifiedName: `${actionFQN}/${param.$Name}`,
795
+ isCollection: param.$isCollection ?? false,
796
+ name: param.$Name,
789
797
  type: param.$Type
790
798
  };
791
799
  })
@@ -794,14 +802,14 @@ function prepareAction(actionName: string, actionRawData: MetaModelAction, names
794
802
  export function prepareEntityTypes(
795
803
  oMetaModel: ODataMetaModel,
796
804
  oCapabilities: EnvironmentCapabilities = DefaultEnvironmentCapabilities
797
- ): ParserOutput {
805
+ ): RawMetadata {
798
806
  const oMetaModelData = oMetaModel.getObject("/$");
799
807
  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[] = [];
808
+ const entityTypes: RawEntityType[] = [];
809
+ const entitySets: RawEntitySet[] = [];
810
+ const singletons: RawSingleton[] = [];
811
+ const complexTypes: RawComplexType[] = [];
812
+ const typeDefinitions: RawTypeDefinition[] = [];
805
813
  const entityContainerName = oMetaModelData.$EntityContainer;
806
814
  let namespace = "";
807
815
  const schemaKeys = Object.keys(oMetaModelData).filter((metamodelKey) => oMetaModelData[metamodelKey].$kind === "Schema");
@@ -873,10 +881,15 @@ export function prepareEntityTypes(
873
881
  }
874
882
  });
875
883
 
876
- let entityContainer: EntityContainer = {};
884
+ let entityContainer: RawEntityContainer = {
885
+ _type: "EntityContainer",
886
+ name: "",
887
+ fullyQualifiedName: ""
888
+ };
877
889
  if (entityContainerName) {
878
890
  entityContainer = {
879
- name: entityContainerName.replace(namespace + ".", ""),
891
+ _type: "EntityContainer",
892
+ name: entityContainerName.replace(`${namespace}.`, ""),
880
893
  fullyQualifiedName: entityContainerName
881
894
  };
882
895
  }
@@ -892,13 +905,13 @@ export function prepareEntityTypes(
892
905
  }
893
906
  });
894
907
 
895
- const actions: Action[] = Object.keys(oMetaModelData)
908
+ const actions: RawAction[] = Object.keys(oMetaModelData)
896
909
  .filter((key) => {
897
910
  return Array.isArray(oMetaModelData[key]) && oMetaModelData[key].length > 0 && oMetaModelData[key][0].$kind === "Action";
898
911
  })
899
- .reduce((outActions: Action[], actionName) => {
900
- const actions = oMetaModelData[actionName];
901
- actions.forEach((action: MetaModelAction) => {
912
+ .reduce((outActions: RawAction[], actionName) => {
913
+ const innerActions = oMetaModelData[actionName];
914
+ innerActions.forEach((action: MetaModelAction) => {
902
915
  outActions.push(prepareAction(actionName, action, namespace, entityContainerName));
903
916
  });
904
917
  return outActions;
@@ -935,26 +948,34 @@ export function prepareEntityTypes(
935
948
  };
936
949
  }
937
950
 
938
- const mMetaModelMap: Record<string, ParserOutput> = {};
951
+ const mMetaModelMap: Record<string, ConvertedMetadata> = {};
939
952
 
940
953
  /**
941
954
  * Convert the ODataMetaModel into another format that allow for easy manipulation of the annotations.
942
955
  *
943
- * @param {ODataMetaModel} oMetaModel The current oDataMetaModel
956
+ * @param oMetaModel The ODataMetaModel
944
957
  * @param oCapabilities The current capabilities
945
- * @returns {ConverterOutput} An object containing object like annotation
958
+ * @returns An object containing object-like annotations
946
959
  */
947
- export function convertTypes(oMetaModel: ODataMetaModel, oCapabilities?: EnvironmentCapabilities): ConverterOutput {
960
+ export function convertTypes(oMetaModel: ODataMetaModel, oCapabilities?: EnvironmentCapabilities): ConvertedMetadata {
948
961
  const sMetaModelId = (oMetaModel as any).id;
949
962
  if (!mMetaModelMap.hasOwnProperty(sMetaModelId)) {
950
963
  const parsedOutput = prepareEntityTypes(oMetaModel, oCapabilities);
951
964
  try {
952
- mMetaModelMap[sMetaModelId] = AnnotationConverter.convertTypes(parsedOutput);
965
+ mMetaModelMap[sMetaModelId] = AnnotationConverter.convert(parsedOutput);
953
966
  } catch (oError) {
954
967
  throw new Error(oError as any);
955
968
  }
956
969
  }
957
- return mMetaModelMap[sMetaModelId] as any as ConverterOutput;
970
+ return mMetaModelMap[sMetaModelId] as any as ConvertedMetadata;
971
+ }
972
+
973
+ export function getConvertedTypes(oContext: Context) {
974
+ const oMetaModel = oContext.getModel() as unknown as ODataMetaModel;
975
+ if (!oMetaModel.isA("sap.ui.model.odata.v4.ODataMetaModel")) {
976
+ throw new Error("This should only be called on a ODataMetaModel");
977
+ }
978
+ return convertTypes(oMetaModel);
958
979
  }
959
980
 
960
981
  export function deleteModelCacheData(oMetaModel: ODataMetaModel) {
@@ -962,17 +983,23 @@ export function deleteModelCacheData(oMetaModel: ODataMetaModel) {
962
983
  }
963
984
 
964
985
  export function convertMetaModelContext(oMetaModelContext: Context, bIncludeVisitedObjects: boolean = false): any {
965
- const oConverterOutput = convertTypes(oMetaModelContext.getModel() as ODataMetaModel);
986
+ const oConvertedMetadata = convertTypes(oMetaModelContext.getModel() as ODataMetaModel);
966
987
  const sPath = oMetaModelContext.getPath();
967
988
 
968
989
  const aPathSplit = sPath.split("/");
969
- let targetEntitySet: _EntitySet | _Singleton = oConverterOutput.entitySets.find(
970
- (entitySet) => entitySet.name === aPathSplit[1]
971
- ) as _EntitySet;
990
+ let firstPart = aPathSplit[1];
991
+ let beginIndex = 2;
992
+ if (oConvertedMetadata.entityContainer.fullyQualifiedName === firstPart) {
993
+ firstPart = aPathSplit[2];
994
+ beginIndex++;
995
+ }
996
+ let targetEntitySet: EntitySet | Singleton = oConvertedMetadata.entitySets.find(
997
+ (entitySet) => entitySet.name === firstPart
998
+ ) as EntitySet;
972
999
  if (!targetEntitySet) {
973
- targetEntitySet = oConverterOutput.singletons.find((singleton) => singleton.name === aPathSplit[1]) as _Singleton;
1000
+ targetEntitySet = oConvertedMetadata.singletons.find((singleton) => singleton.name === firstPart) as Singleton;
974
1001
  }
975
- let relativePath = aPathSplit.slice(2).join("/");
1002
+ let relativePath = aPathSplit.slice(beginIndex).join("/");
976
1003
 
977
1004
  const localObjects: any[] = [targetEntitySet];
978
1005
  while (relativePath && relativePath.length > 0 && relativePath.startsWith("$NavigationPropertyBinding")) {
@@ -1024,8 +1051,13 @@ export function convertMetaModelContext(oMetaModelContext: Context, bIncludeVisi
1024
1051
  relativePath = relativeSplit.join("/");
1025
1052
  }
1026
1053
  if (relativePath.startsWith("$Type")) {
1027
- // We're anyway going to look on the entityType...
1028
- relativePath = aPathSplit.slice(3).join("/");
1054
+ // As $Type@ is allowed as well
1055
+ if (relativePath.startsWith("$Type@")) {
1056
+ relativePath = relativePath.replace("$Type", "");
1057
+ } else {
1058
+ // We're anyway going to look on the entityType...
1059
+ relativePath = aPathSplit.slice(3).join("/");
1060
+ }
1029
1061
  }
1030
1062
  if (targetEntitySet && relativePath.length) {
1031
1063
  const oTarget = targetEntitySet.entityType.resolvePath(relativePath, bIncludeVisitedObjects);
@@ -1041,10 +1073,9 @@ export function convertMetaModelContext(oMetaModelContext: Context, bIncludeVisi
1041
1073
  const action = actions[relativeSplit[0]];
1042
1074
  if (relativeSplit[1] && action.parameters) {
1043
1075
  const parameterName = relativeSplit[1];
1044
- const targetParameter = action.parameters.find((parameter) => {
1045
- return parameter.fullyQualifiedName.endsWith("/" + parameterName);
1076
+ return action.parameters.find((parameter) => {
1077
+ return parameter.fullyQualifiedName.endsWith(`/${parameterName}`);
1046
1078
  });
1047
- return targetParameter;
1048
1079
  } else if (relativePath.length === 1) {
1049
1080
  return action;
1050
1081
  }
@@ -1062,41 +1093,46 @@ export function convertMetaModelContext(oMetaModelContext: Context, bIncludeVisi
1062
1093
  }
1063
1094
  }
1064
1095
 
1065
- type ConverterObject = {
1066
- _type: string;
1067
- name: string;
1068
- };
1069
1096
  export type ResolvedTarget = {
1070
- target?: ConverterObject;
1071
- visitedObjects: ConverterObject[];
1097
+ target?: ServiceObject;
1098
+ visitedObjects: (ServiceObject | Singleton)[];
1072
1099
  };
1073
1100
 
1074
1101
  export function getInvolvedDataModelObjects(oMetaModelContext: Context, oEntitySetMetaModelContext?: Context): DataModelObjectPath {
1075
- const oConverterOutput = convertTypes(oMetaModelContext.getModel() as ODataMetaModel);
1102
+ const oConvertedMetadata = convertTypes(oMetaModelContext.getModel() as ODataMetaModel);
1076
1103
  const metaModelContext = convertMetaModelContext(oMetaModelContext, true);
1077
1104
  let targetEntitySetLocation;
1078
1105
  if (oEntitySetMetaModelContext && oEntitySetMetaModelContext.getPath() !== "/") {
1079
1106
  targetEntitySetLocation = getInvolvedDataModelObjects(oEntitySetMetaModelContext);
1080
1107
  }
1081
- return getInvolvedDataModelObjectFromPath(metaModelContext, oConverterOutput, targetEntitySetLocation);
1108
+ return getInvolvedDataModelObjectFromPath(metaModelContext, oConvertedMetadata, targetEntitySetLocation);
1082
1109
  }
1083
1110
 
1084
1111
  export function getInvolvedDataModelObjectFromPath(
1085
1112
  metaModelContext: ResolvedTarget,
1086
- convertedTypes: ConverterOutput,
1113
+ convertedTypes: ConvertedMetadata,
1087
1114
  targetEntitySetLocation?: DataModelObjectPath
1088
1115
  ): DataModelObjectPath {
1089
1116
  const dataModelObjects = metaModelContext.visitedObjects.filter(
1090
- (visitedObject: any) => visitedObject && visitedObject.hasOwnProperty("_type") && visitedObject._type !== "EntityType"
1117
+ (visitedObject: any) =>
1118
+ visitedObject &&
1119
+ visitedObject.hasOwnProperty("_type") &&
1120
+ visitedObject._type !== "EntityType" &&
1121
+ visitedObject._type !== "EntityContainer"
1091
1122
  );
1092
- if (metaModelContext.target && metaModelContext.target.hasOwnProperty("_type") && metaModelContext.target._type !== "EntityType") {
1123
+ if (
1124
+ metaModelContext.target &&
1125
+ metaModelContext.target.hasOwnProperty("_type") &&
1126
+ metaModelContext.target._type !== "EntityType" &&
1127
+ dataModelObjects[dataModelObjects.length - 1] !== metaModelContext.target
1128
+ ) {
1093
1129
  dataModelObjects.push(metaModelContext.target);
1094
1130
  }
1095
- const navigationProperties: _NavigationProperty[] = [];
1096
- const rootEntitySet: _EntitySet = dataModelObjects[0] as _EntitySet;
1131
+ const navigationProperties: NavigationProperty[] = [];
1132
+ const rootEntitySet: EntitySet = dataModelObjects[0] as EntitySet;
1097
1133
  // currentEntitySet can be undefined.
1098
- let currentEntitySet: _EntitySet | undefined = rootEntitySet as _EntitySet;
1099
- let currentEntityType: _EntityType = rootEntitySet.entityType;
1134
+ let currentEntitySet: EntitySet | Singleton | undefined = rootEntitySet;
1135
+ let currentEntityType: EntityType = rootEntitySet.entityType;
1100
1136
  let i = 1;
1101
1137
  let currentObject;
1102
1138
  let navigatedPaths = [];
@@ -1104,17 +1140,17 @@ export function getInvolvedDataModelObjectFromPath(
1104
1140
  currentObject = dataModelObjects[i++];
1105
1141
  if (currentObject._type === "NavigationProperty") {
1106
1142
  navigatedPaths.push(currentObject.name);
1107
- navigationProperties.push(currentObject as _NavigationProperty);
1108
- currentEntityType = (currentObject as _NavigationProperty).targetType;
1143
+ navigationProperties.push(currentObject);
1144
+ currentEntityType = currentObject.targetType;
1109
1145
  if (currentEntitySet && currentEntitySet.navigationPropertyBinding.hasOwnProperty(navigatedPaths.join("/"))) {
1110
- currentEntitySet = currentEntitySet.navigationPropertyBinding[currentObject.name];
1146
+ currentEntitySet = currentEntitySet.navigationPropertyBinding[currentObject.name] as EntitySet;
1111
1147
  navigatedPaths = [];
1112
1148
  } else {
1113
1149
  currentEntitySet = undefined;
1114
1150
  }
1115
1151
  }
1116
- if (currentObject._type === "EntitySet") {
1117
- currentEntitySet = currentObject as _EntitySet;
1152
+ if (currentObject._type === "EntitySet" || currentObject._type === "Singleton") {
1153
+ currentEntitySet = currentObject;
1118
1154
  currentEntityType = currentEntitySet.entityType;
1119
1155
  }
1120
1156
  }
@@ -1129,7 +1165,7 @@ export function getInvolvedDataModelObjectFromPath(
1129
1165
  targetEntitySetLocation.startingEntitySet = rootEntitySet;
1130
1166
  targetEntitySetLocation.navigationProperties = requiredDataModelObjects
1131
1167
  .filter((object: any) => object._type === "NavigationProperty")
1132
- .concat(targetEntitySetLocation.navigationProperties) as _NavigationProperty[];
1168
+ .concat(targetEntitySetLocation.navigationProperties) as NavigationProperty[];
1133
1169
  }
1134
1170
  }
1135
1171
  const outDataModelPath = {