@sapui5/sap.fe.core 1.102.2 → 1.104.1

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 (324) hide show
  1. package/package.json +6 -6
  2. package/src/sap/fe/core/.library +1 -1
  3. package/src/sap/fe/core/AppComponent.js +73 -30
  4. package/src/sap/fe/core/AppComponent.ts +65 -43
  5. package/src/sap/fe/core/AppStateHandler.js +82 -70
  6. package/src/sap/fe/core/AppStateHandler.ts +32 -37
  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 +227 -126
  10. package/src/sap/fe/core/CommonUtils.ts +240 -163
  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/BuildingBlock.js +181 -43
  22. package/src/sap/fe/core/buildingBlocks/BuildingBlock.ts +150 -24
  23. package/src/sap/fe/core/buildingBlocks/BuildingBlockRuntime.js +585 -210
  24. package/src/sap/fe/core/buildingBlocks/BuildingBlockRuntime.ts +246 -96
  25. package/src/sap/fe/core/buildingBlocks/TraceInfo.js +30 -30
  26. package/src/sap/fe/core/buildingBlocks/TraceInfo.ts +32 -29
  27. package/src/sap/fe/core/controllerextensions/EditFlow.js +379 -330
  28. package/src/sap/fe/core/controllerextensions/EditFlow.ts +253 -245
  29. package/src/sap/fe/core/controllerextensions/IntentBasedNavigation.js +9 -9
  30. package/src/sap/fe/core/controllerextensions/IntentBasedNavigation.ts +10 -10
  31. package/src/sap/fe/core/controllerextensions/InternalEditFlow.js +101 -74
  32. package/src/sap/fe/core/controllerextensions/InternalEditFlow.ts +69 -79
  33. package/src/sap/fe/core/controllerextensions/InternalIntentBasedNavigation.js +67 -67
  34. package/src/sap/fe/core/controllerextensions/InternalIntentBasedNavigation.ts +76 -76
  35. package/src/sap/fe/core/controllerextensions/InternalRouting.js +85 -77
  36. package/src/sap/fe/core/controllerextensions/InternalRouting.ts +103 -99
  37. package/src/sap/fe/core/controllerextensions/KPIManagement.js +66 -68
  38. package/src/sap/fe/core/controllerextensions/KPIManagement.ts +106 -123
  39. package/src/sap/fe/core/controllerextensions/MassEdit.js +9 -9
  40. package/src/sap/fe/core/controllerextensions/MassEdit.ts +20 -27
  41. package/src/sap/fe/core/controllerextensions/MessageHandler.js +20 -12
  42. package/src/sap/fe/core/controllerextensions/MessageHandler.ts +21 -14
  43. package/src/sap/fe/core/controllerextensions/PageReady.js +97 -25
  44. package/src/sap/fe/core/controllerextensions/PageReady.ts +98 -34
  45. package/src/sap/fe/core/controllerextensions/Paginator.js +21 -22
  46. package/src/sap/fe/core/controllerextensions/Paginator.ts +24 -25
  47. package/src/sap/fe/core/controllerextensions/Placeholder.js +4 -6
  48. package/src/sap/fe/core/controllerextensions/Placeholder.ts +12 -14
  49. package/src/sap/fe/core/controllerextensions/Routing.js +10 -11
  50. package/src/sap/fe/core/controllerextensions/Routing.ts +12 -13
  51. package/src/sap/fe/core/controllerextensions/Share.js +170 -139
  52. package/src/sap/fe/core/controllerextensions/Share.ts +117 -118
  53. package/src/sap/fe/core/controllerextensions/SideEffects.js +46 -50
  54. package/src/sap/fe/core/controllerextensions/SideEffects.ts +56 -60
  55. package/src/sap/fe/core/controllerextensions/ViewState.js +200 -131
  56. package/src/sap/fe/core/controllerextensions/ViewState.ts +141 -148
  57. package/src/sap/fe/core/controllerextensions/collaboration/ActivityBase.js +5 -5
  58. package/src/sap/fe/core/controllerextensions/collaboration/ActivityBase.ts +8 -7
  59. package/src/sap/fe/core/controllerextensions/collaboration/ActivitySync.js +11 -10
  60. package/src/sap/fe/core/controllerextensions/collaboration/ActivitySync.ts +17 -20
  61. package/src/sap/fe/core/controllerextensions/collaboration/CollaborationCommon.js +2 -2
  62. package/src/sap/fe/core/controllerextensions/collaboration/CollaborationCommon.ts +4 -4
  63. package/src/sap/fe/core/controllerextensions/collaboration/Manage.js +7 -9
  64. package/src/sap/fe/core/controllerextensions/collaboration/Manage.ts +18 -19
  65. package/src/sap/fe/core/controllerextensions/editFlow/TransactionHelper.js +190 -141
  66. package/src/sap/fe/core/controllerextensions/editFlow/TransactionHelper.ts +258 -210
  67. package/src/sap/fe/core/controllerextensions/editFlow/draft.js +183 -125
  68. package/src/sap/fe/core/controllerextensions/editFlow/draft.ts +213 -156
  69. package/src/sap/fe/core/controllerextensions/editFlow/operations.js +164 -140
  70. package/src/sap/fe/core/controllerextensions/editFlow/operations.ts +180 -150
  71. package/src/sap/fe/core/controllerextensions/editFlow/sticky.js +24 -26
  72. package/src/sap/fe/core/controllerextensions/editFlow/sticky.ts +35 -33
  73. package/src/sap/fe/core/controllerextensions/messageHandler/messageHandling.js +71 -41
  74. package/src/sap/fe/core/controllerextensions/messageHandler/messageHandling.ts +102 -82
  75. package/src/sap/fe/core/controllerextensions/routing/RouterProxy.js +61 -71
  76. package/src/sap/fe/core/controllerextensions/routing/RouterProxy.ts +56 -64
  77. package/src/sap/fe/core/controls/Any.js +9 -5
  78. package/src/sap/fe/core/controls/Any.ts +10 -4
  79. package/src/sap/fe/core/controls/CommandExecution.js +11 -25
  80. package/src/sap/fe/core/controls/CommandExecution.ts +11 -25
  81. package/src/sap/fe/core/controls/ConditionalWrapper.js +2 -2
  82. package/src/sap/fe/core/controls/ConditionalWrapper.ts +3 -3
  83. package/src/sap/fe/core/controls/CustomFilterFieldContentWrapper.js +22 -22
  84. package/src/sap/fe/core/controls/CustomFilterFieldContentWrapper.ts +25 -24
  85. package/src/sap/fe/core/controls/CustomQuickViewPage.js +2 -2
  86. package/src/sap/fe/core/controls/CustomQuickViewPage.ts +2 -2
  87. package/src/sap/fe/core/controls/DataLossOrDraftDiscard/DataLossOrDraftDiscardHandler.js +3 -3
  88. package/src/sap/fe/core/controls/DataLossOrDraftDiscard/DataLossOrDraftDiscardHandler.ts +5 -5
  89. package/src/sap/fe/core/controls/FieldWrapper.js +2 -2
  90. package/src/sap/fe/core/controls/FieldWrapper.ts +3 -3
  91. package/src/sap/fe/core/controls/FileWrapper.js +7 -2
  92. package/src/sap/fe/core/controls/FileWrapper.ts +15 -11
  93. package/src/sap/fe/core/controls/FilterBar.js +6 -2
  94. package/src/sap/fe/core/controls/FilterBar.ts +13 -9
  95. package/src/sap/fe/core/controls/FormElementWrapper.js +1 -1
  96. package/src/sap/fe/core/controls/FormElementWrapper.ts +2 -2
  97. package/src/sap/fe/core/controls/MassEditSelect.js +1 -1
  98. package/src/sap/fe/core/controls/MassEditSelect.ts +0 -4
  99. package/src/sap/fe/core/controls/NonComputedVisibleKeyFieldsDialog.fragment.xml +3 -3
  100. package/src/sap/fe/core/controls/filterbar/VisualFilter.js +16 -12
  101. package/src/sap/fe/core/controls/filterbar/VisualFilter.ts +20 -22
  102. package/src/sap/fe/core/controls/filterbar/VisualFilterContainer.js +3 -3
  103. package/src/sap/fe/core/controls/filterbar/VisualFilterContainer.ts +8 -8
  104. package/src/sap/fe/core/controls/filterbar/utils/VisualFilterUtils.js +49 -49
  105. package/src/sap/fe/core/controls/filterbar/utils/VisualFilterUtils.ts +54 -54
  106. package/src/sap/fe/core/controls/massEdit/MassEditDialog.fragment.xml +8 -2
  107. package/src/sap/fe/core/controls/massEdit/MassEditField.fragment.xml +22 -35
  108. package/src/sap/fe/core/controls/massEdit/MassEditHandlers.js +89 -88
  109. package/src/sap/fe/core/controls/massEdit/MassEditHandlers.ts +107 -106
  110. package/src/sap/fe/core/converters/ConverterContext.js +26 -33
  111. package/src/sap/fe/core/converters/ConverterContext.ts +52 -61
  112. package/src/sap/fe/core/converters/ManifestSettings.js +1 -1
  113. package/src/sap/fe/core/converters/ManifestSettings.ts +17 -15
  114. package/src/sap/fe/core/converters/ManifestWrapper.js +59 -45
  115. package/src/sap/fe/core/converters/ManifestWrapper.ts +55 -45
  116. package/src/sap/fe/core/converters/MetaModelConverter.js +64 -35
  117. package/src/sap/fe/core/converters/MetaModelConverter.ts +154 -129
  118. package/src/sap/fe/core/converters/TemplateConverter.js +21 -20
  119. package/src/sap/fe/core/converters/TemplateConverter.ts +27 -24
  120. package/src/sap/fe/core/converters/annotations/DataField.js +58 -35
  121. package/src/sap/fe/core/converters/annotations/DataField.ts +102 -76
  122. package/src/sap/fe/core/converters/common/AnnotationConverter.js +1911 -1495
  123. package/src/sap/fe/core/converters/controls/Common/Action.js +50 -41
  124. package/src/sap/fe/core/converters/controls/Common/Action.ts +56 -46
  125. package/src/sap/fe/core/converters/controls/Common/Chart.js +14 -14
  126. package/src/sap/fe/core/converters/controls/Common/Chart.ts +26 -33
  127. package/src/sap/fe/core/converters/controls/Common/Criticality.js +3 -3
  128. package/src/sap/fe/core/converters/controls/Common/Criticality.ts +4 -4
  129. package/src/sap/fe/core/converters/controls/Common/DataVisualization.js +30 -28
  130. package/src/sap/fe/core/converters/controls/Common/DataVisualization.ts +60 -61
  131. package/src/sap/fe/core/converters/controls/Common/Form.js +27 -28
  132. package/src/sap/fe/core/converters/controls/Common/Form.ts +44 -57
  133. package/src/sap/fe/core/converters/controls/Common/KPI.js +11 -11
  134. package/src/sap/fe/core/converters/controls/Common/KPI.ts +49 -52
  135. package/src/sap/fe/core/converters/controls/Common/Table.js +181 -197
  136. package/src/sap/fe/core/converters/controls/Common/Table.ts +251 -280
  137. package/src/sap/fe/core/converters/controls/Common/table/StandardActions.js +119 -119
  138. package/src/sap/fe/core/converters/controls/Common/table/StandardActions.ts +144 -141
  139. package/src/sap/fe/core/converters/controls/ListReport/FilterBar.js +45 -41
  140. package/src/sap/fe/core/converters/controls/ListReport/FilterBar.ts +65 -59
  141. package/src/sap/fe/core/converters/controls/ListReport/VisualFilters.js +28 -26
  142. package/src/sap/fe/core/converters/controls/ListReport/VisualFilters.ts +46 -43
  143. package/src/sap/fe/core/converters/controls/ObjectPage/Avatar.js +9 -9
  144. package/src/sap/fe/core/converters/controls/ObjectPage/Avatar.ts +14 -13
  145. package/src/sap/fe/core/converters/controls/ObjectPage/HeaderFacet.js +67 -64
  146. package/src/sap/fe/core/converters/controls/ObjectPage/HeaderFacet.ts +69 -66
  147. package/src/sap/fe/core/converters/controls/ObjectPage/SubSection.js +77 -73
  148. package/src/sap/fe/core/converters/controls/ObjectPage/SubSection.ts +101 -97
  149. package/src/sap/fe/core/converters/helpers/Aggregation.js +2 -4
  150. package/src/sap/fe/core/converters/helpers/Aggregation.ts +12 -15
  151. package/src/sap/fe/core/converters/helpers/BindingHelper.js +31 -31
  152. package/src/sap/fe/core/converters/helpers/BindingHelper.ts +30 -29
  153. package/src/sap/fe/core/converters/helpers/ConfigurableObject.js +4 -4
  154. package/src/sap/fe/core/converters/helpers/ConfigurableObject.ts +9 -9
  155. package/src/sap/fe/core/converters/helpers/ID.js +48 -46
  156. package/src/sap/fe/core/converters/helpers/ID.ts +26 -25
  157. package/src/sap/fe/core/converters/helpers/Key.js +7 -7
  158. package/src/sap/fe/core/converters/helpers/Key.ts +7 -7
  159. package/src/sap/fe/core/converters/helpers/SelectionVariantHelper.js +1 -1
  160. package/src/sap/fe/core/converters/helpers/SelectionVariantHelper.ts +4 -5
  161. package/src/sap/fe/core/converters/objectPage/FormMenuActions.js +6 -6
  162. package/src/sap/fe/core/converters/objectPage/FormMenuActions.ts +10 -10
  163. package/src/sap/fe/core/converters/objectPage/HeaderAndFooterAction.js +46 -62
  164. package/src/sap/fe/core/converters/objectPage/HeaderAndFooterAction.ts +54 -82
  165. package/src/sap/fe/core/converters/templates/ListReportConverter.js +55 -42
  166. package/src/sap/fe/core/converters/templates/ListReportConverter.ts +81 -66
  167. package/src/sap/fe/core/converters/templates/ObjectPageConverter.js +39 -38
  168. package/src/sap/fe/core/converters/templates/ObjectPageConverter.ts +52 -61
  169. package/src/sap/fe/core/designtime/AppComponent.designtime.js +4 -4
  170. package/src/sap/fe/core/designtime/AppComponent.designtime.ts +4 -4
  171. package/src/sap/fe/core/formatters/CollaborationFormatter.js +2 -2
  172. package/src/sap/fe/core/formatters/CollaborationFormatter.ts +3 -3
  173. package/src/sap/fe/core/formatters/FPMFormatter.js +5 -5
  174. package/src/sap/fe/core/formatters/FPMFormatter.ts +10 -10
  175. package/src/sap/fe/core/formatters/KPIFormatter.js +7 -7
  176. package/src/sap/fe/core/formatters/KPIFormatter.ts +10 -10
  177. package/src/sap/fe/core/formatters/StandardFormatter.js +96 -0
  178. package/src/sap/fe/core/formatters/StandardFormatter.ts +70 -0
  179. package/src/sap/fe/core/formatters/TableFormatter.js +11 -11
  180. package/src/sap/fe/core/formatters/TableFormatter.ts +12 -12
  181. package/src/sap/fe/core/formatters/ValueFormatter.js +8 -8
  182. package/src/sap/fe/core/formatters/ValueFormatter.ts +9 -9
  183. package/src/sap/fe/core/helpers/AppStartupHelper.js +15 -15
  184. package/src/sap/fe/core/helpers/AppStartupHelper.ts +37 -40
  185. package/src/sap/fe/core/helpers/BindingToolkit.js +1832 -0
  186. package/src/sap/fe/core/helpers/{BindingExpression.ts → BindingToolkit.ts} +396 -269
  187. package/src/sap/fe/core/helpers/ClassSupport.js +49 -12
  188. package/src/sap/fe/core/helpers/ClassSupport.ts +37 -10
  189. package/src/sap/fe/core/helpers/DynamicAnnotationPathHelper.js +2 -2
  190. package/src/sap/fe/core/helpers/DynamicAnnotationPathHelper.ts +1 -1
  191. package/src/sap/fe/core/helpers/EditState.js +1 -6
  192. package/src/sap/fe/core/helpers/EditState.ts +5 -10
  193. package/src/sap/fe/core/helpers/ExcelFormatHelper.js +2 -2
  194. package/src/sap/fe/core/helpers/ExcelFormatHelper.ts +4 -4
  195. package/src/sap/fe/core/helpers/FPMHelper.js +1 -1
  196. package/src/sap/fe/core/helpers/FPMHelper.ts +2 -2
  197. package/src/sap/fe/core/helpers/KeepAliveHelper.js +31 -31
  198. package/src/sap/fe/core/helpers/KeepAliveHelper.ts +52 -56
  199. package/src/sap/fe/core/helpers/MassEditHelper.js +306 -280
  200. package/src/sap/fe/core/helpers/MassEditHelper.ts +380 -360
  201. package/src/sap/fe/core/helpers/MessageStrip.js +81 -0
  202. package/src/sap/fe/core/helpers/MessageStrip.ts +79 -0
  203. package/src/sap/fe/core/helpers/ModelHelper.js +25 -25
  204. package/src/sap/fe/core/helpers/ModelHelper.ts +34 -32
  205. package/src/sap/fe/core/helpers/PasteHelper.js +3 -10
  206. package/src/sap/fe/core/helpers/PasteHelper.ts +20 -25
  207. package/src/sap/fe/core/helpers/SemanticDateOperators.js +1 -1
  208. package/src/sap/fe/core/helpers/SemanticDateOperators.ts +11 -11
  209. package/src/sap/fe/core/helpers/SemanticKeyHelper.js +3 -3
  210. package/src/sap/fe/core/helpers/SemanticKeyHelper.ts +8 -8
  211. package/src/sap/fe/core/helpers/StableIdHelper.js +12 -12
  212. package/src/sap/fe/core/helpers/StableIdHelper.ts +12 -12
  213. package/src/sap/fe/core/helpers/ToES6Promise.js +32 -0
  214. package/src/sap/fe/core/helpers/ToES6Promise.ts +19 -0
  215. package/src/sap/fe/core/jsx-runtime/Fragment.js +16 -0
  216. package/src/sap/fe/core/jsx-runtime/Fragment.ts +3 -0
  217. package/src/sap/fe/core/jsx-runtime/jsx-control.js +99 -0
  218. package/src/sap/fe/core/jsx-runtime/jsx-control.ts +82 -0
  219. package/src/sap/fe/core/jsx-runtime/jsx-xml.js +105 -0
  220. package/src/sap/fe/core/jsx-runtime/jsx-xml.ts +89 -0
  221. package/src/sap/fe/core/jsx-runtime/jsx.js +12 -90
  222. package/src/sap/fe/core/jsx-runtime/jsx.ts +24 -85
  223. package/src/sap/fe/core/library.js +42 -3
  224. package/src/sap/fe/core/library.ts +38 -0
  225. package/src/sap/fe/core/manifestMerger/ChangePageConfiguration.js +3 -3
  226. package/src/sap/fe/core/manifestMerger/ChangePageConfiguration.ts +2 -2
  227. package/src/sap/fe/core/messagebundle.properties +39 -63
  228. package/src/sap/fe/core/messagebundle_ar.properties +25 -39
  229. package/src/sap/fe/core/messagebundle_bg.properties +25 -39
  230. package/src/sap/fe/core/messagebundle_ca.properties +25 -39
  231. package/src/sap/fe/core/messagebundle_cs.properties +25 -39
  232. package/src/sap/fe/core/messagebundle_cy.properties +25 -39
  233. package/src/sap/fe/core/messagebundle_da.properties +25 -39
  234. package/src/sap/fe/core/messagebundle_de.properties +25 -39
  235. package/src/sap/fe/core/messagebundle_el.properties +26 -40
  236. package/src/sap/fe/core/messagebundle_en.properties +25 -39
  237. package/src/sap/fe/core/messagebundle_en_GB.properties +25 -39
  238. package/src/sap/fe/core/messagebundle_en_US_sappsd.properties +25 -39
  239. package/src/sap/fe/core/messagebundle_en_US_saprigi.properties +25 -39
  240. package/src/sap/fe/core/messagebundle_en_US_saptrc.properties +26 -18
  241. package/src/sap/fe/core/messagebundle_es.properties +27 -41
  242. package/src/sap/fe/core/messagebundle_es_MX.properties +25 -39
  243. package/src/sap/fe/core/messagebundle_et.properties +25 -39
  244. package/src/sap/fe/core/messagebundle_fi.properties +25 -39
  245. package/src/sap/fe/core/messagebundle_fr.properties +26 -40
  246. package/src/sap/fe/core/messagebundle_fr_CA.properties +25 -39
  247. package/src/sap/fe/core/messagebundle_hi.properties +25 -39
  248. package/src/sap/fe/core/messagebundle_hr.properties +25 -39
  249. package/src/sap/fe/core/messagebundle_hu.properties +25 -39
  250. package/src/sap/fe/core/messagebundle_id.properties +25 -39
  251. package/src/sap/fe/core/messagebundle_it.properties +41 -55
  252. package/src/sap/fe/core/messagebundle_iw.properties +25 -39
  253. package/src/sap/fe/core/messagebundle_ja.properties +25 -39
  254. package/src/sap/fe/core/messagebundle_kk.properties +25 -39
  255. package/src/sap/fe/core/messagebundle_ko.properties +30 -44
  256. package/src/sap/fe/core/messagebundle_lt.properties +25 -39
  257. package/src/sap/fe/core/messagebundle_lv.properties +25 -39
  258. package/src/sap/fe/core/messagebundle_ms.properties +25 -39
  259. package/src/sap/fe/core/messagebundle_nl.properties +27 -41
  260. package/src/sap/fe/core/messagebundle_no.properties +25 -39
  261. package/src/sap/fe/core/messagebundle_pl.properties +26 -40
  262. package/src/sap/fe/core/messagebundle_pt.properties +26 -40
  263. package/src/sap/fe/core/messagebundle_pt_PT.properties +25 -39
  264. package/src/sap/fe/core/messagebundle_ro.properties +25 -39
  265. package/src/sap/fe/core/messagebundle_ru.properties +25 -39
  266. package/src/sap/fe/core/messagebundle_sh.properties +25 -39
  267. package/src/sap/fe/core/messagebundle_sk.properties +25 -39
  268. package/src/sap/fe/core/messagebundle_sl.properties +25 -39
  269. package/src/sap/fe/core/messagebundle_sv.properties +25 -39
  270. package/src/sap/fe/core/messagebundle_th.properties +25 -39
  271. package/src/sap/fe/core/messagebundle_tr.properties +25 -39
  272. package/src/sap/fe/core/messagebundle_uk.properties +25 -39
  273. package/src/sap/fe/core/messagebundle_vi.properties +25 -39
  274. package/src/sap/fe/core/messagebundle_zh_CN.properties +25 -39
  275. package/src/sap/fe/core/messagebundle_zh_TW.properties +25 -39
  276. package/src/sap/fe/core/services/AsyncComponentServiceFactory.js +2 -2
  277. package/src/sap/fe/core/services/AsyncComponentServiceFactory.ts +5 -5
  278. package/src/sap/fe/core/services/CacheHandlerServiceFactory.js +97 -69
  279. package/src/sap/fe/core/services/CacheHandlerServiceFactory.ts +68 -69
  280. package/src/sap/fe/core/services/EnvironmentServiceFactory.js +1 -1
  281. package/src/sap/fe/core/services/EnvironmentServiceFactory.ts +3 -2
  282. package/src/sap/fe/core/services/NavigationServiceFactory.js +61 -49
  283. package/src/sap/fe/core/services/NavigationServiceFactory.ts +63 -52
  284. package/src/sap/fe/core/services/ResourceModelServiceFactory.js +2 -2
  285. package/src/sap/fe/core/services/ResourceModelServiceFactory.ts +4 -4
  286. package/src/sap/fe/core/services/RoutingServiceFactory.js +55 -55
  287. package/src/sap/fe/core/services/RoutingServiceFactory.ts +67 -65
  288. package/src/sap/fe/core/services/ShellServicesFactory.js +92 -76
  289. package/src/sap/fe/core/services/ShellServicesFactory.ts +95 -82
  290. package/src/sap/fe/core/services/SideEffectsServiceFactory.js +61 -61
  291. package/src/sap/fe/core/services/SideEffectsServiceFactory.ts +102 -92
  292. package/src/sap/fe/core/services/TemplatedViewServiceFactory.js +224 -198
  293. package/src/sap/fe/core/services/TemplatedViewServiceFactory.ts +138 -139
  294. package/src/sap/fe/core/support/CommonHelper.js +3 -2
  295. package/src/sap/fe/core/support/CommonHelper.ts +9 -13
  296. package/src/sap/fe/core/support/Diagnostics.js +1 -1
  297. package/src/sap/fe/core/support/Diagnostics.ts +5 -5
  298. package/src/sap/fe/core/templating/CommonFormatters.js +84 -0
  299. package/src/sap/fe/core/templating/CommonFormatters.ts +86 -0
  300. package/src/sap/fe/core/templating/CriticalityFormatters.js +31 -31
  301. package/src/sap/fe/core/templating/CriticalityFormatters.ts +42 -40
  302. package/src/sap/fe/core/templating/DataFieldFormatters.js +8 -8
  303. package/src/sap/fe/core/templating/DataFieldFormatters.ts +13 -10
  304. package/src/sap/fe/core/templating/DataModelPathHelper.js +16 -15
  305. package/src/sap/fe/core/templating/DataModelPathHelper.ts +42 -32
  306. package/src/sap/fe/core/templating/DisplayModeFormatter.js +1 -1
  307. package/src/sap/fe/core/templating/DisplayModeFormatter.ts +2 -3
  308. package/src/sap/fe/core/templating/EntitySetHelper.js +7 -7
  309. package/src/sap/fe/core/templating/EntitySetHelper.ts +6 -8
  310. package/src/sap/fe/core/templating/FieldControlHelper.js +35 -34
  311. package/src/sap/fe/core/templating/FieldControlHelper.ts +29 -46
  312. package/src/sap/fe/core/templating/FilterHelper.js +16 -15
  313. package/src/sap/fe/core/templating/FilterHelper.ts +18 -18
  314. package/src/sap/fe/core/templating/FilterTemplating.js +1 -1
  315. package/src/sap/fe/core/templating/FilterTemplating.ts +3 -3
  316. package/src/sap/fe/core/templating/PropertyFormatters.js +7 -7
  317. package/src/sap/fe/core/templating/PropertyFormatters.ts +21 -19
  318. package/src/sap/fe/core/templating/PropertyHelper.js +25 -25
  319. package/src/sap/fe/core/templating/PropertyHelper.ts +25 -26
  320. package/src/sap/fe/core/templating/UIFormatters.js +152 -95
  321. package/src/sap/fe/core/templating/UIFormatters.ts +202 -128
  322. package/src/sap/fe/core/type/Email.js +2 -2
  323. package/src/sap/fe/core/type/Email.ts +2 -2
  324. package/src/sap/fe/core/helpers/BindingExpression.js +0 -1732
@@ -1,19 +1,13 @@
1
- import ResourceBundle from "sap/base/i18n/ResourceBundle";
1
+ import type ResourceBundle from "sap/base/i18n/ResourceBundle";
2
2
  import Log from "sap/base/Log";
3
3
  import mergeObjects from "sap/base/util/merge";
4
- import AppComponent from "sap/fe/core/AppComponent";
4
+ import type AppComponent from "sap/fe/core/AppComponent";
5
5
  import { IssueCategory, IssueCategoryType, IssueSeverity } from "sap/fe/core/converters/helpers/IssueManager";
6
- import {
7
- BindingExpression,
8
- bindingExpression,
9
- compileBinding,
10
- constant,
11
- not,
12
- or,
13
- transformRecursively
14
- } from "sap/fe/core/helpers/BindingExpression";
6
+ import type { CompiledBindingToolkitExpression } from "sap/fe/core/helpers/BindingToolkit";
7
+ import { compileExpression, constant, not, or, pathInModel, transformRecursively } from "sap/fe/core/helpers/BindingToolkit";
15
8
  import ModelHelper from "sap/fe/core/helpers/ModelHelper";
16
9
  import SemanticDateOperators from "sap/fe/core/helpers/SemanticDateOperators";
10
+ import SemanticKeyHelper from "sap/fe/core/helpers/SemanticKeyHelper";
17
11
  import { generate } from "sap/fe/core/helpers/StableIdHelper";
18
12
  import Bar from "sap/m/Bar";
19
13
  import Button from "sap/m/Button";
@@ -21,20 +15,19 @@ import Dialog from "sap/m/Dialog";
21
15
  import MessageBox from "sap/m/MessageBox";
22
16
  import Title from "sap/m/Title";
23
17
  import Component from "sap/ui/core/Component";
24
- import Control from "sap/ui/core/Control";
18
+ import type Control from "sap/ui/core/Control";
25
19
  import Core from "sap/ui/core/Core";
26
20
  import Fragment from "sap/ui/core/Fragment";
27
21
  import View from "sap/ui/core/mvc/View";
28
22
  import XMLPreprocessor from "sap/ui/core/util/XMLPreprocessor";
29
23
  import XMLTemplateProcessor from "sap/ui/core/XMLTemplateProcessor";
30
- import { system } from "sap/ui/Device";
31
24
  import FilterOperatorUtil from "sap/ui/mdc/condition/FilterOperatorUtil";
32
25
  import TypeUtil from "sap/ui/mdc/odata/v4/TypeUtil";
33
- import Context from "sap/ui/model/Context";
26
+ import type Context from "sap/ui/model/Context";
34
27
  import JSONModel from "sap/ui/model/json/JSONModel";
35
- import ODataMetaModel from "sap/ui/model/odata/v4/ODataMetaModel";
36
- import ODataModel from "sap/ui/model/odata/v4/ODataModel";
37
- import { CoreEx } from "types/extension_types";
28
+ import type ODataMetaModel from "sap/ui/model/odata/v4/ODataMetaModel";
29
+ import type ODataModel from "sap/ui/model/odata/v4/ODataModel";
30
+ import type { CoreEx } from "types/extension_types";
38
31
  import messageHandling from "./controllerextensions/messageHandler/messageHandling";
39
32
  import { getConditions } from "./templating/FilterHelper";
40
33
 
@@ -68,7 +61,7 @@ function normalizeSearchTerm(sSearchTerm: string) {
68
61
  .split(/\s+/)
69
62
  .reduce(function (sNormalized: string | undefined, sCurrentWord: string) {
70
63
  if (sCurrentWord !== "") {
71
- sNormalized = (sNormalized ? sNormalized + " " : "") + '"' + sCurrentWord + '"';
64
+ sNormalized = `${sNormalized ? `${sNormalized} ` : ""}"${sCurrentWord}"`;
72
65
  }
73
66
  return sNormalized;
74
67
  }, undefined);
@@ -132,12 +125,12 @@ function getSearchRestrictions(sFullPath: any, oMetaModel: any) {
132
125
  if (oNavigationRestrictions && oNavigationRestrictions["SearchRestrictions"]) {
133
126
  return oNavigationRestrictions["SearchRestrictions"];
134
127
  }
135
- sPath = sPath + "/$NavigationPropertyBinding/" + aNavigationParts[i];
128
+ sPath = `${sPath}/$NavigationPropertyBinding/${aNavigationParts[i]}`;
136
129
  }
137
- return oMetaModel.getObject(sFullPath + "@Org.OData.Capabilities.V1.SearchRestrictions");
130
+ return oMetaModel.getObject(`${sFullPath}@Org.OData.Capabilities.V1.SearchRestrictions`);
138
131
  }
139
132
  function getNavigationRestrictions(oModel: any, sEntitySetPath: any, sNavigationPath: any) {
140
- const oNavigationRestrictions = oModel.getObject(sEntitySetPath + "@Org.OData.Capabilities.V1.NavigationRestrictions");
133
+ const oNavigationRestrictions = oModel.getObject(`${sEntitySetPath}@Org.OData.Capabilities.V1.NavigationRestrictions`);
141
134
  const aRestrictedProperties = oNavigationRestrictions && oNavigationRestrictions.RestrictedProperties;
142
135
  return (
143
136
  aRestrictedProperties &&
@@ -152,7 +145,7 @@ function getNavigationRestrictions(oModel: any, sEntitySetPath: any, sNavigation
152
145
  }
153
146
  function _isInNonFilterableProperties(oModel: any, sEntitySetPath: any, sContextPath: any) {
154
147
  let bIsNotFilterable = false;
155
- const oAnnotation = oModel.getObject(sEntitySetPath + "@Org.OData.Capabilities.V1.FilterRestrictions");
148
+ const oAnnotation = oModel.getObject(`${sEntitySetPath}@Org.OData.Capabilities.V1.FilterRestrictions`);
156
149
  if (oAnnotation && oAnnotation.NonFilterableProperties) {
157
150
  bIsNotFilterable = oAnnotation.NonFilterableProperties.some(function (property: any) {
158
151
  return property.$NavigationPropertyPath === sContextPath || property.$PropertyPath === sContextPath;
@@ -162,7 +155,7 @@ function _isInNonFilterableProperties(oModel: any, sEntitySetPath: any, sContext
162
155
  }
163
156
  // TODO rework this!
164
157
  function _isContextPathFilterable(oModel: any, sEntitySetPath: any, sContexPath: any) {
165
- const sFullPath = sEntitySetPath + "/" + sContexPath,
158
+ const sFullPath = `${sEntitySetPath}/${sContexPath}`,
166
159
  aESParts = sFullPath.split("/").splice(0, 2),
167
160
  aContext = sFullPath.split("/").splice(2);
168
161
  let bIsNotFilterable = false,
@@ -172,7 +165,7 @@ function _isContextPathFilterable(oModel: any, sEntitySetPath: any, sContexPath:
172
165
 
173
166
  bIsNotFilterable = aContext.some(function (item: string, index: number, array: string[]) {
174
167
  if (sContext.length > 0) {
175
- sContext += "/" + item;
168
+ sContext += `/${item}`;
176
169
  } else {
177
170
  sContext = item;
178
171
  }
@@ -194,12 +187,12 @@ function _isContextPathFilterable(oModel: any, sEntitySetPath: any, sContexPath:
194
187
  if (index === array.length - 1) {
195
188
  //last path segment
196
189
  bIsNotFilterable = _isInNonFilterableProperties(oModel, sEntitySetPath, sContext);
197
- } else if (oModel.getObject(sEntitySetPath + "/$NavigationPropertyBinding/" + item)) {
190
+ } else if (oModel.getObject(`${sEntitySetPath}/$NavigationPropertyBinding/${item}`)) {
198
191
  //check existing context path and initialize it
199
192
  bIsNotFilterable = _isInNonFilterableProperties(oModel, sEntitySetPath, sContext);
200
193
  sContext = "";
201
194
  //set the new EntitySet
202
- sEntitySetPath = "/" + oModel.getObject(sEntitySetPath + "/$NavigationPropertyBinding/" + item);
195
+ sEntitySetPath = `/${oModel.getObject(`${sEntitySetPath}/$NavigationPropertyBinding/${item}`)}`;
203
196
  }
204
197
  return bIsNotFilterable === true;
205
198
  });
@@ -211,18 +204,18 @@ function isPropertyFilterable(
211
204
  sEntitySetPath: string,
212
205
  sProperty: string,
213
206
  bSkipHiddenFilter?: boolean
214
- ): boolean | BindingExpression<string> {
207
+ ): boolean | CompiledBindingToolkitExpression {
215
208
  if (typeof sProperty !== "string") {
216
209
  throw new Error("sProperty parameter must be a string");
217
210
  }
218
211
  let bIsFilterable;
219
212
 
220
213
  // Parameters should be rendered as filterfields
221
- if (oModel.getObject(sEntitySetPath + "/@com.sap.vocabularies.Common.v1.ResultContext") === true) {
214
+ if (oModel.getObject(`${sEntitySetPath}/@com.sap.vocabularies.Common.v1.ResultContext`) === true) {
222
215
  return true;
223
216
  }
224
217
 
225
- const oNavigationContext = oModel.createBindingContext(sEntitySetPath + "/" + sProperty) as Context;
218
+ const oNavigationContext = oModel.createBindingContext(`${sEntitySetPath}/${sProperty}`) as Context;
226
219
 
227
220
  if (!bSkipHiddenFilter) {
228
221
  if (
@@ -235,11 +228,11 @@ function isPropertyFilterable(
235
228
  const sHiddenFilterPath = oNavigationContext.getProperty("@com.sap.vocabularies.UI.v1.HiddenFilter/$Path");
236
229
 
237
230
  if (sHiddenPath && sHiddenFilterPath) {
238
- return compileBinding(not(or(bindingExpression(sHiddenPath), bindingExpression(sHiddenFilterPath))));
231
+ return compileExpression(not(or(pathInModel(sHiddenPath), pathInModel(sHiddenFilterPath))));
239
232
  } else if (sHiddenPath) {
240
- return compileBinding(not(bindingExpression(sHiddenPath)));
233
+ return compileExpression(not(pathInModel(sHiddenPath)));
241
234
  } else if (sHiddenFilterPath) {
242
- return compileBinding(not(bindingExpression(sHiddenFilterPath)));
235
+ return compileExpression(not(pathInModel(sHiddenFilterPath)));
243
236
  }
244
237
  }
245
238
 
@@ -354,7 +347,7 @@ function updateRelateAppsModel(
354
347
  }
355
348
  } else {
356
349
  // fallback to Technical Keys if no Semantic Key is present
357
- const aTechnicalKeys = oMetaModel.getObject(oMetaPath + "/$Type/$Key");
350
+ const aTechnicalKeys = oMetaModel.getObject(`${oMetaPath}/$Type/$Key`);
358
351
  for (const key in aTechnicalKeys) {
359
352
  const sObjKey = aTechnicalKeys[key];
360
353
  if (!oParam[sObjKey]) {
@@ -373,7 +366,7 @@ function updateRelateAppsModel(
373
366
  _getSOIntents(oObjectPageLayout, aManifestSOKeys[key], oParam)
374
367
  .then(
375
368
  _getRelatedIntents.bind(
376
- this as any,
369
+ this,
377
370
  oManifestData.additionalSemanticObjects[aManifestSOKeys[key]],
378
371
  oBindingContext,
379
372
  aManifestSOItems
@@ -397,8 +390,8 @@ function updateRelateAppsModel(
397
390
  if (aLinks && aLinks.length > 0) {
398
391
  const oTargetParams: any = {};
399
392
  const aAnnotationsSOItems: any[] = [];
400
- const sEntitySetPath = oMetaPath + "@";
401
- const sEntityTypePath = oMetaPath + "/@";
393
+ const sEntitySetPath = `${oMetaPath}@`;
394
+ const sEntityTypePath = `${oMetaPath}/@`;
402
395
  const oEntitySetAnnotations = oMetaModel.getObject(sEntitySetPath);
403
396
  oSemanticObjectAnnotations = _getSemanticObjectAnnotations(oEntitySetAnnotations, sCurrentSemObj);
404
397
  if (!oSemanticObjectAnnotations.bHasEntitySetSO) {
@@ -440,8 +433,8 @@ function _getSemanticObjectAnnotations(oEntityAnnotations: any, sCurrentSemObj:
440
433
 
441
434
  if (key.indexOf("#") > -1) {
442
435
  sQualifier = key.split("#")[1];
443
- sAnnotationMappingTerm = sAnnotationMappingTerm + "#" + sQualifier;
444
- sAnnotationActionTerm = sAnnotationActionTerm + "#" + sQualifier;
436
+ sAnnotationMappingTerm = `${sAnnotationMappingTerm}#${sQualifier}`;
437
+ sAnnotationActionTerm = `${sAnnotationActionTerm}#${sQualifier}`;
445
438
  }
446
439
 
447
440
  oSemanticObjectAnnotations.aMappings = oSemanticObjectAnnotations.aMappings.concat(oEntityAnnotations[sAnnotationMappingTerm]);
@@ -460,7 +453,7 @@ function fnUpdateRelatedAppsDetails(oObjectPageLayout: any) {
460
453
  const oPath = oBindingContext && oBindingContext.getPath();
461
454
  const oMetaPath = oMetaModel.getMetaPath(oPath);
462
455
  // Semantic Key Vocabulary
463
- const sSemanticKeyVocabulary = oMetaPath + "/" + "@com.sap.vocabularies.Common.v1.SemanticKey";
456
+ const sSemanticKeyVocabulary = `${oMetaPath}/` + `@com.sap.vocabularies.Common.v1.SemanticKey`;
464
457
  //Semantic Keys
465
458
  const aSemKeys = oMetaModel.getObject(sSemanticKeyVocabulary);
466
459
  // Unavailable Actions
@@ -468,8 +461,8 @@ function fnUpdateRelatedAppsDetails(oObjectPageLayout: any) {
468
461
  if (!oEntry) {
469
462
  oBindingContext
470
463
  .requestObject()
471
- .then(function (oEntry: any) {
472
- return updateRelateAppsModel(oBindingContext, oEntry, oObjectPageLayout, aSemKeys, oMetaModel, oMetaPath);
464
+ .then(function (requestedObject: any) {
465
+ return updateRelateAppsModel(oBindingContext, requestedObject, oObjectPageLayout, aSemKeys, oMetaModel, oMetaPath);
473
466
  })
474
467
  .catch(function (oError: any) {
475
468
  Log.error("Cannot update the related app details", oError);
@@ -510,7 +503,7 @@ function getTargetView(oControl: any) {
510
503
  oControl = oControl.getComponentInstance();
511
504
  oControl = oControl && oControl.getRootControl();
512
505
  }
513
- while (oControl && !(oControl instanceof View)) {
506
+ while (oControl && !oControl.isA("sap.ui.core.mvc.View")) {
514
507
  oControl = oControl.getParent();
515
508
  }
516
509
  return oControl;
@@ -541,7 +534,7 @@ function removeSensitiveData(aAttributes: any[], oMetaModel: ODataMetaModel) {
541
534
  const aProperties = Object.keys(oAttribute);
542
535
  for (let j = 0; j < aProperties.length; j++) {
543
536
  const sProp = aProperties[j],
544
- aPropertyAnnotations = oMetaModel.getObject("/" + sEntitySet + "/" + sProp + "@");
537
+ aPropertyAnnotations = oMetaModel.getObject(`/${sEntitySet}/${sProp}@`);
545
538
  if (aPropertyAnnotations) {
546
539
  if (
547
540
  aPropertyAnnotations["@com.sap.vocabularies.PersonalData.v1.IsPotentiallySensitive"] ||
@@ -573,7 +566,7 @@ function _fnCheckIsMatch(oObject: any, oKeysToCheck: any) {
573
566
  return true;
574
567
  }
575
568
  function fnGetContextPathProperties(oMetaModel: ODataMetaModel, sContextPath: string, oFilter?: object) {
576
- const oEntityType = oMetaModel.getObject(sContextPath + "/") || {},
569
+ const oEntityType = oMetaModel.getObject(`${sContextPath}/`) || {},
577
570
  oProperties: any = {};
578
571
 
579
572
  for (const sKey in oEntityType) {
@@ -591,7 +584,7 @@ function fnGetContextPathProperties(oMetaModel: ODataMetaModel, sContextPath: st
591
584
  function fnGetMandatoryFilterFields(oMetaModel: ODataMetaModel, sContextPath: string) {
592
585
  let aMandatoryFilterFields;
593
586
  if (oMetaModel && sContextPath) {
594
- aMandatoryFilterFields = oMetaModel.getObject(sContextPath + "@Org.OData.Capabilities.V1.FilterRestrictions/RequiredProperties");
587
+ aMandatoryFilterFields = oMetaModel.getObject(`${sContextPath}@Org.OData.Capabilities.V1.FilterRestrictions/RequiredProperties`);
595
588
  }
596
589
  return aMandatoryFilterFields;
597
590
  }
@@ -668,12 +661,12 @@ function getTranslatedText(sFrameworkKey: string, oResourceBundle: ResourceBundl
668
661
  // hence we need to do this recurrsively to check if the key exists in any of the bundles the forms the FE resource bundle
669
662
  const bResourceKeyExists = _checkIfResourceKeyExists(
670
663
  (oResourceBundle as any).aCustomBundles,
671
- sFrameworkKey + "|" + sEntitySetName
664
+ `${sFrameworkKey}|${sEntitySetName}`
672
665
  );
673
666
 
674
667
  // if resource key with entity set name for instance specific text overriding is provided by the application
675
668
  // then use the same key otherwise use the Framework key
676
- sResourceKey = bResourceKeyExists ? sFrameworkKey + "|" + sEntitySetName : sFrameworkKey;
669
+ sResourceKey = bResourceKeyExists ? `${sFrameworkKey}|${sEntitySetName}` : sFrameworkKey;
677
670
  }
678
671
  return oResourceBundle.getText(sResourceKey, oParams);
679
672
  }
@@ -701,18 +694,18 @@ function getActionPath(oAction: any, bReturnOnlyPath: boolean, sActionName?: str
701
694
  const sEntityTypeName = oAction.getObject(sContextPath).$Type;
702
695
  const sEntityName = getEntitySetName(oAction.getModel(), sEntityTypeName);
703
696
  if (sEntityName) {
704
- sContextPath = "/" + sEntityName;
697
+ sContextPath = `/${sEntityName}`;
705
698
  }
706
699
  if (bCheckStaticValue) {
707
- return oAction.getObject(sContextPath + "/" + sActionName + "@Org.OData.Core.V1.OperationAvailable");
700
+ return oAction.getObject(`${sContextPath}/${sActionName}@Org.OData.Core.V1.OperationAvailable`);
708
701
  }
709
702
  if (bReturnOnlyPath) {
710
- return sContextPath + "/" + sActionName;
703
+ return `${sContextPath}/${sActionName}`;
711
704
  } else {
712
705
  return {
713
706
  sContextPath: sContextPath,
714
- sProperty: oAction.getObject(sContextPath + "/" + sActionName + "@Org.OData.Core.V1.OperationAvailable/$Path"),
715
- sBindingParameter: oAction.getObject(sContextPath + "/" + sActionName + "/@$ui5.overload/0/$Parameter/0/$Name")
707
+ sProperty: oAction.getObject(`${sContextPath}/${sActionName}@Org.OData.Core.V1.OperationAvailable/$Path`),
708
+ sBindingParameter: oAction.getObject(`${sContextPath}/${sActionName}/@$ui5.overload/0/$Parameter/0/$Name`)
716
709
  };
717
710
  }
718
711
  }
@@ -747,7 +740,7 @@ function computeDisplayMode(oPropertyAnnotations: any, oCollectionAnnotations?:
747
740
  }
748
741
  function _getEntityType(oContext: any) {
749
742
  const oMetaModel = oContext.getModel().getMetaModel();
750
- return oMetaModel.getObject(oMetaModel.getMetaPath(oContext.getPath()) + "/$Type");
743
+ return oMetaModel.getObject(`${oMetaModel.getMetaPath(oContext.getPath())}/$Type`);
751
744
  }
752
745
  function _requestObject(sAction: any, oSelectedContext: any, sProperty: any) {
753
746
  let oContext = oSelectedContext;
@@ -816,16 +809,16 @@ function _setContextsBasedOnOperationAvailable(oInternalModelContext: any, aRequ
816
809
  * @param aNotApplicable
817
810
  */
818
811
  function _setDynamicActionContexts(oInternalModelContext: any, sAction: any, aApplicable: any, aNotApplicable: any) {
819
- const sDynamicActionPathPrefix = oInternalModelContext.getPath() + "/dynamicActions/" + sAction,
812
+ const sDynamicActionPathPrefix = `${oInternalModelContext.getPath()}/dynamicActions/${sAction}`,
820
813
  oInternalModel = oInternalModelContext.getModel();
821
- oInternalModel.setProperty(sDynamicActionPathPrefix + "/aApplicable", aApplicable);
822
- oInternalModel.setProperty(sDynamicActionPathPrefix + "/aNotApplicable", aNotApplicable);
814
+ oInternalModel.setProperty(`${sDynamicActionPathPrefix}/aApplicable`, aApplicable);
815
+ oInternalModel.setProperty(`${sDynamicActionPathPrefix}/aNotApplicable`, aNotApplicable);
823
816
  }
824
817
  function setActionEnablement(oInternalModelContext: any, oActionOperationAvailableMap: any, aSelectedContexts: any) {
825
818
  const aPromises = [];
826
819
  for (const sAction in oActionOperationAvailableMap) {
827
820
  // Reset all properties before computation
828
- oInternalModelContext.setProperty("dynamicActions/" + sAction, {
821
+ oInternalModelContext.setProperty(`dynamicActions/${sAction}`, {
829
822
  bEnabled: false,
830
823
  aApplicable: [],
831
824
  aNotApplicable: []
@@ -836,7 +829,7 @@ function setActionEnablement(oInternalModelContext: any, oActionOperationAvailab
836
829
  const aApplicable = [],
837
830
  aNotApplicable = [],
838
831
  sProperty = oActionOperationAvailableMap[sAction],
839
- sDynamicActionEnabledPath = oInternalModelContext.getPath() + "/dynamicActions/" + sAction + "/bEnabled";
832
+ sDynamicActionEnabledPath = `${oInternalModelContext.getPath()}/dynamicActions/${sAction}/bEnabled`;
840
833
 
841
834
  if (typeof sProperty === "object" && sProperty !== null && sProperty !== undefined) {
842
835
  for (let i = 0; i < aSelectedContexts.length; i++) {
@@ -845,14 +838,14 @@ function setActionEnablement(oInternalModelContext: any, oActionOperationAvailab
845
838
  const oContextData = oSelectedContext.getObject();
846
839
  const oTransformedBinding = transformRecursively(
847
840
  sProperty,
848
- "Binding",
841
+ "PathInModel",
849
842
  // eslint-disable-next-line no-loop-func
850
843
  function (oBindingExpression: any) {
851
844
  return constant(oContextData[oBindingExpression.path]);
852
845
  },
853
846
  true
854
847
  );
855
- const sResult = compileBinding(oTransformedBinding);
848
+ const sResult = compileExpression(oTransformedBinding);
856
849
  if (sResult === "true") {
857
850
  oInternalModelContext.getModel().setProperty(sDynamicActionEnabledPath, true);
858
851
  aApplicable.push(oSelectedContext);
@@ -868,7 +861,7 @@ function setActionEnablement(oInternalModelContext: any, oActionOperationAvailab
868
861
  const oSelectedContext = aSelectedContexts[i];
869
862
  if (oSelectedContext) {
870
863
  const oContextData = oSelectedContext.getObject();
871
- if (sProperty === null && !!oContextData["#" + sAction]) {
864
+ if (sProperty === null && !!oContextData[`#${sAction}`]) {
872
865
  //look for action advertisement if present and its value is not null
873
866
  oInternalModelContext.getModel().setProperty(sDynamicActionEnabledPath, true);
874
867
  break;
@@ -963,7 +956,7 @@ function getOperatorsForProperty(
963
956
  let aSemanticDateOps: any[] = [];
964
957
  const oSettings = typeof sSettings === "string" ? JSON.parse(sSettings).customData : sSettings;
965
958
 
966
- if (oContext.getObject(sEntitySetPath + "/@com.sap.vocabularies.Common.v1.ResultContext") === true) {
959
+ if (oContext.getObject(`${sEntitySetPath}/@com.sap.vocabularies.Common.v1.ResultContext`) === true) {
967
960
  return aEqualsOps.toString();
968
961
  }
969
962
 
@@ -999,15 +992,20 @@ function getOperatorsForProperty(
999
992
  sRestrictions = _getRestrictions(aDefaultOperators, aEqualsOps);
1000
993
  break;
1001
994
  case "SingleRange":
1002
- const aExpressionOps = bSemanticDateRange
1003
- ? sType === "Edm.Date"
1004
- ? aSemanticDateOps
1005
- : sType === "Edm.DateTimeOffset"
1006
- ? aSingleRangeDateTimeOps.concat(aBasicDateTimeOps)
1007
- : aSingleRangeOps
1008
- : sType === "Edm.DateTimeOffset"
1009
- ? aSingleRangeDTBasicOps
1010
- : aSingleRangeOps;
995
+ let aExpressionOps;
996
+ if (bSemanticDateRange) {
997
+ if (sType === "Edm.Date") {
998
+ aExpressionOps = aSemanticDateOps;
999
+ } else if (sType === "Edm.DateTimeOffset") {
1000
+ aExpressionOps = aSingleRangeDateTimeOps.concat(aBasicDateTimeOps);
1001
+ } else {
1002
+ aExpressionOps = aSingleRangeOps;
1003
+ }
1004
+ } else if (sType === "Edm.DateTimeOffset") {
1005
+ aExpressionOps = aSingleRangeDTBasicOps;
1006
+ } else {
1007
+ aExpressionOps = aSingleRangeOps;
1008
+ }
1011
1009
  const sOperators = _getRestrictions(aDefaultOperators, aExpressionOps);
1012
1010
  sRestrictions = sOperators ? sOperators : "";
1013
1011
  break;
@@ -1039,7 +1037,7 @@ function getOperatorsForProperty(
1039
1037
  }
1040
1038
  function getParameterInfo(oMetaModel: any, sContextPath: any) {
1041
1039
  const sParameterContextPath = sContextPath.substring(0, sContextPath.lastIndexOf("/"));
1042
- const bResultContext = oMetaModel.getObject(sParameterContextPath + "/@com.sap.vocabularies.Common.v1.ResultContext");
1040
+ const bResultContext = oMetaModel.getObject(`${sParameterContextPath}/@com.sap.vocabularies.Common.v1.ResultContext`);
1043
1041
  const oParameterInfo: any = {};
1044
1042
  if (bResultContext && sParameterContextPath !== sContextPath) {
1045
1043
  oParameterInfo.contextPath = sParameterContextPath;
@@ -1117,24 +1115,24 @@ function addSelectionVariantToConditions(oSelectionVariant: any, oConditions: ob
1117
1115
  const aMetadataParameters = Object.keys(oValidParameterProperties);
1118
1116
  aMetadataParameters.forEach(function (sMetadataParameter: string) {
1119
1117
  let sSelectOptionName;
1120
- if (aSelectOptionsPropertyNames.includes("$Parameter." + sMetadataParameter)) {
1121
- sSelectOptionName = "$Parameter." + sMetadataParameter;
1118
+ if (aSelectOptionsPropertyNames.includes(`$Parameter.${sMetadataParameter}`)) {
1119
+ sSelectOptionName = `$Parameter.${sMetadataParameter}`;
1122
1120
  } else if (aSelectOptionsPropertyNames.includes(sMetadataParameter)) {
1123
1121
  sSelectOptionName = sMetadataParameter;
1124
1122
  } else if (
1125
1123
  sMetadataParameter.startsWith("P_") &&
1126
- aSelectOptionsPropertyNames.includes("$Parameter." + sMetadataParameter.slice(2, sMetadataParameter.length))
1124
+ aSelectOptionsPropertyNames.includes(`$Parameter.${sMetadataParameter.slice(2, sMetadataParameter.length)}`)
1127
1125
  ) {
1128
- sSelectOptionName = "$Parameter." + sMetadataParameter.slice(2, sMetadataParameter.length);
1126
+ sSelectOptionName = `$Parameter.${sMetadataParameter.slice(2, sMetadataParameter.length)}`;
1129
1127
  } else if (
1130
1128
  sMetadataParameter.startsWith("P_") &&
1131
1129
  aSelectOptionsPropertyNames.includes(sMetadataParameter.slice(2, sMetadataParameter.length))
1132
1130
  ) {
1133
1131
  sSelectOptionName = sMetadataParameter.slice(2, sMetadataParameter.length);
1134
- } else if (aSelectOptionsPropertyNames.includes("$Parameter.P_" + sMetadataParameter)) {
1135
- sSelectOptionName = "$Parameter.P_" + sMetadataParameter;
1136
- } else if (aSelectOptionsPropertyNames.includes("P_" + sMetadataParameter)) {
1137
- sSelectOptionName = "P_" + sMetadataParameter;
1132
+ } else if (aSelectOptionsPropertyNames.includes(`$Parameter.P_${sMetadataParameter}`)) {
1133
+ sSelectOptionName = `$Parameter.P_${sMetadataParameter}`;
1134
+ } else if (aSelectOptionsPropertyNames.includes(`P_${sMetadataParameter}`)) {
1135
+ sSelectOptionName = `P_${sMetadataParameter}`;
1138
1136
  }
1139
1137
 
1140
1138
  if (sSelectOptionName) {
@@ -1161,8 +1159,8 @@ function addSelectionVariantToConditions(oSelectionVariant: any, oConditions: ob
1161
1159
  aSelectOptionsPropertyNames.includes(sMetadataProperty.slice(2, sMetadataProperty.length))
1162
1160
  ) {
1163
1161
  sSelectOptionName = sMetadataProperty.slice(2, sMetadataProperty.length);
1164
- } else if (aSelectOptionsPropertyNames.includes("P_" + sMetadataProperty)) {
1165
- sSelectOptionName = "P_" + sMetadataProperty;
1162
+ } else if (aSelectOptionsPropertyNames.includes(`P_${sMetadataProperty}`)) {
1163
+ sSelectOptionName = `P_${sMetadataProperty}`;
1166
1164
  }
1167
1165
  if (sSelectOptionName) {
1168
1166
  addSelectOptionsToConditions(
@@ -1181,9 +1179,9 @@ function addSelectionVariantToConditions(oSelectionVariant: any, oConditions: ob
1181
1179
 
1182
1180
  aSelectOptionsPropertyNames.forEach(function (sSelectOption: any) {
1183
1181
  if (sSelectOption.indexOf(".") > 0 && !sSelectOption.includes("$Parameter")) {
1184
- const sFullContextPath = ("/" + sSelectOption.replaceAll(".", "/")).startsWith(sContextPath)
1185
- ? "/" + sSelectOption.replaceAll(".", "/")
1186
- : sContextPath + "/" + sSelectOption.replaceAll(".", "/"); // check if the full path, eg SalesOrderManage._Item.Material exists in the metamodel
1182
+ const sFullContextPath = `/${sSelectOption.replaceAll(".", "/")}`.startsWith(sContextPath)
1183
+ ? `/${sSelectOption.replaceAll(".", "/")}`
1184
+ : `${sContextPath}/${sSelectOption.replaceAll(".", "/")}`; // check if the full path, eg SalesOrderManage._Item.Material exists in the metamodel
1187
1185
  if (oMetaModel.getObject(sFullContextPath.replace("P_", ""))) {
1188
1186
  _createConditionsForNavProperties(
1189
1187
  sFullContextPath,
@@ -1216,20 +1214,20 @@ function _createConditionsForNavProperties(
1216
1214
  ) {
1217
1215
  let aNavObjectNames = sSelectOption.split(".");
1218
1216
  // Eg: "SalesOrderManage._Item._Material.Material" or "_Item.Material"
1219
- if (("/" + sSelectOption.replaceAll(".", "/")).startsWith(sMainEntitySetPath)) {
1220
- const sFullPath = (("/" + sSelectOption) as any).replaceAll(".", "/"),
1221
- sNavPath = sFullPath.replace(sMainEntitySetPath + "/", "");
1217
+ if (`/${sSelectOption.replaceAll(".", "/")}`.startsWith(sMainEntitySetPath)) {
1218
+ const sFullPath = (`/${sSelectOption}` as any).replaceAll(".", "/"),
1219
+ sNavPath = sFullPath.replace(`${sMainEntitySetPath}/`, "");
1222
1220
  aNavObjectNames = sNavPath.split("/");
1223
1221
  }
1224
1222
  let sConditionPath = "";
1225
1223
  const sPropertyName = aNavObjectNames[aNavObjectNames.length - 1]; // Material from SalesOrderManage._Item.Material
1226
1224
  for (let i = 0; i < aNavObjectNames.length - 1; i++) {
1227
- if (oMetaModel.getObject(sMainEntitySetPath + "/" + aNavObjectNames[i].replace("P_", "")).$isCollection) {
1228
- sConditionPath = sConditionPath + aNavObjectNames[i] + "*/"; // _Item*/ in case of 1:n cardinality
1225
+ if (oMetaModel.getObject(`${sMainEntitySetPath}/${aNavObjectNames[i].replace("P_", "")}`).$isCollection) {
1226
+ sConditionPath = `${sConditionPath + aNavObjectNames[i]}*/`; // _Item*/ in case of 1:n cardinality
1229
1227
  } else {
1230
- sConditionPath = sConditionPath + aNavObjectNames[i] + "/"; // _Item/ in case of 1:1 cardinality
1228
+ sConditionPath = `${sConditionPath + aNavObjectNames[i]}/`; // _Item/ in case of 1:1 cardinality
1231
1229
  }
1232
- sMainEntitySetPath = sMainEntitySetPath + "/" + aNavObjectNames[i];
1230
+ sMainEntitySetPath = `${sMainEntitySetPath}/${aNavObjectNames[i]}`;
1233
1231
  }
1234
1232
  const sNavPropertyPath = sFullContextPath.slice(0, sFullContextPath.lastIndexOf("/")),
1235
1233
  oValidProperties = CommonUtils.getContextPathProperties(oMetaModel, sNavPropertyPath),
@@ -1239,12 +1237,11 @@ function _createConditionsForNavProperties(
1239
1237
  sSelectOptionName = sPropertyName;
1240
1238
  } else if (sPropertyName.startsWith("P_") && oValidProperties[sPropertyName.replace("P_", "")]) {
1241
1239
  sSelectOptionName = sPropertyName.replace("P_", "");
1242
- } else if (oValidProperties["P_" + sPropertyName] && aSelectOptionsPropertyNames.includes("P_" + sPropertyName)) {
1243
- sSelectOptionName = "P_" + sPropertyName;
1240
+ } else if (oValidProperties[`P_${sPropertyName}`] && aSelectOptionsPropertyNames.includes(`P_${sPropertyName}`)) {
1241
+ sSelectOptionName = `P_${sPropertyName}`;
1244
1242
  }
1245
1243
  if (sPropertyName.startsWith("P_") && oConditions[sConditionPath + sSelectOptionName]) {
1246
1244
  // if there is no SalesOrderManage._Item.Material yet in the oConditions
1247
- return;
1248
1245
  } else if (!sPropertyName.startsWith("P_") && oConditions[sConditionPath + sSelectOptionName]) {
1249
1246
  delete oConditions[sConditionPath + sSelectOptionName];
1250
1247
  addSelectOptionsToConditions(
@@ -1298,7 +1295,7 @@ function addExternalStateFiltersToSelectionVariant(oSelectionVariant: any, mFilt
1298
1295
  break;
1299
1296
  case "EndsWith":
1300
1297
  oSelectOptionState.option = "CP";
1301
- oSelectOptionState.low = "*" + oSelectOptionState.low;
1298
+ oSelectOptionState.low = `*${oSelectOptionState.low}`;
1302
1299
  break;
1303
1300
  case "BT":
1304
1301
  case "LE":
@@ -1334,7 +1331,7 @@ function addExternalStateFiltersToSelectionVariant(oSelectionVariant: any, mFilt
1334
1331
  break;
1335
1332
  case "NotEndsWith":
1336
1333
  oSelectOptionState.option = "CP";
1337
- oSelectOptionState.low = "*" + oSelectOptionState.low;
1334
+ oSelectOptionState.low = `*${oSelectOptionState.low}`;
1338
1335
  oSelectOptionState.sign = "E";
1339
1336
  break;
1340
1337
  case "NotEmpty":
@@ -1358,29 +1355,31 @@ function addExternalStateFiltersToSelectionVariant(oSelectionVariant: any, mFilt
1358
1355
  oSelectOptionState.sign = "E";
1359
1356
  break;
1360
1357
  default:
1361
- Log.warning(sOperator + " is not supported. " + sFilter + " could not be added to the navigation context");
1358
+ Log.warning(`${sOperator} is not supported. ${sFilter} could not be added to the navigation context`);
1362
1359
  }
1363
1360
  return oSelectOptionState;
1364
1361
  };
1365
1362
  const oFilterConditions = mFilters.filterConditions;
1366
1363
  const oFiltersWithoutConflict = mFilters.filterConditionsWithoutConflict ? mFilters.filterConditionsWithoutConflict : {};
1367
1364
  const oTablePropertiesWithoutConflict = oTargetInfo.propertiesWithoutConflict ? oTargetInfo.propertiesWithoutConflict : {};
1368
- const addFiltersToSelectionVariant = function (oSelectionVariant: any, sFilterName: any, sPath?: any) {
1365
+ const addFiltersToSelectionVariant = function (selectionVariant: any, sFilterName: any, sPath?: any) {
1369
1366
  const aFilters = oFilterConditions[sFilterName];
1370
1367
  for (const item in aFilters) {
1371
1368
  const oFilter = aFilters[item];
1372
1369
  sLow = (oFilter.values[0] && oFilter.values[0].toString()) || "";
1373
1370
  sHigh = (oFilter.values[1] && oFilter.values[1].toString()) || null;
1374
1371
  if (oFilter.operator === "TODAY" || oFilter.operator === "DATE") {
1375
- const aFilter = oFilterInfo[0].aFilters.filter(function (oFilter: any) {
1376
- return oFilter.sPath === sFilterName;
1377
- });
1378
- sLow = aFilter[0].oValue1 || "";
1372
+ const aFilter =
1373
+ oFilterInfo[0].aFilters &&
1374
+ oFilterInfo[0].aFilters.filter(function (filter: any) {
1375
+ return filter.sPath === sFilterName;
1376
+ });
1377
+ sLow = (aFilter && aFilter[0].oValue1) || oFilterInfo[0].oValue1 || "";
1379
1378
  sHigh = null;
1380
1379
  }
1381
1380
  const oSelectOptionValues = fnGetSignAndOption(oFilter.operator, sLow, sHigh);
1382
1381
  if (oSelectOptionValues.option) {
1383
- oSelectionVariant.addSelectOption(
1382
+ selectionVariant.addSelectOption(
1384
1383
  sPath ? sPath : sFilterName,
1385
1384
  oSelectOptionValues.sign,
1386
1385
  oSelectOptionValues.option,
@@ -1443,12 +1442,13 @@ function addDefaultDisplayCurrency(aMandatoryFilterFields: any[], oSelectionVari
1443
1442
  }
1444
1443
  }
1445
1444
  function getNonComputedVisibleFields(oMetaModel: ODataMetaModel, sPath: any, oView?: any) {
1446
- const aTechnicalKeys = oMetaModel.getObject(sPath + "/").$Key;
1447
- const aNonComputedVisibleFields = [];
1448
- const oEntityType = oMetaModel.getObject(sPath + "/");
1445
+ const aTechnicalKeys = oMetaModel.getObject(`${sPath}/`).$Key;
1446
+ const aNonComputedVisibleFields: any = [];
1447
+ const aImmutableVisibleFields: any = [];
1448
+ const oEntityType = oMetaModel.getObject(`${sPath}/`);
1449
1449
  for (const item in oEntityType) {
1450
1450
  if (oEntityType[item].$kind && oEntityType[item].$kind === "Property") {
1451
- const oAnnotations = oMetaModel.getObject(sPath + "/" + item + "@") || {},
1451
+ const oAnnotations = oMetaModel.getObject(`${sPath}/${item}@`) || {},
1452
1452
  bIsKey = aTechnicalKeys.indexOf(item) > -1,
1453
1453
  bIsImmutable = oAnnotations["@Org.OData.Core.V1.Immutable"],
1454
1454
  bIsNonComputed = !oAnnotations["@Org.OData.Core.V1.Computed"],
@@ -1459,11 +1459,13 @@ function getNonComputedVisibleFields(oMetaModel: ODataMetaModel, sPath: any, oVi
1459
1459
  ? bIsComputedDefaultValue && oAnnotations["@com.sap.vocabularies.Common.v1.Text"]
1460
1460
  : false;
1461
1461
  if (
1462
- (bIsImmutable || bIsKeyComputedDefaultValueWithText || (bIsKey && oEntityType[item].$Type !== "Edm.Guid")) &&
1462
+ (bIsKeyComputedDefaultValueWithText || (bIsKey && oEntityType[item].$Type !== "Edm.Guid")) &&
1463
1463
  bIsNonComputed &&
1464
1464
  bIsVisible
1465
1465
  ) {
1466
1466
  aNonComputedVisibleFields.push(item);
1467
+ } else if (bIsImmutable && bIsNonComputed && bIsVisible) {
1468
+ aImmutableVisibleFields.push(item);
1467
1469
  }
1468
1470
 
1469
1471
  if (!bIsNonComputed && bIsComputedDefaultValue && oView) {
@@ -1479,8 +1481,95 @@ function getNonComputedVisibleFields(oMetaModel: ODataMetaModel, sPath: any, oVi
1479
1481
  }
1480
1482
  }
1481
1483
  }
1482
- return aNonComputedVisibleFields;
1484
+ const aRequiredProperties = CommonUtils.getRequiredPropertiesFromInsertRestrictions(sPath, oMetaModel);
1485
+ if (aRequiredProperties.length) {
1486
+ aRequiredProperties.forEach(function (sProperty: any) {
1487
+ const oAnnotations = oMetaModel.getObject(`${sPath}/${sProperty}@`),
1488
+ bIsVisible = !oAnnotations || !oAnnotations["@com.sap.vocabularies.UI.v1.Hidden"];
1489
+ if (bIsVisible && aNonComputedVisibleFields.indexOf(sProperty) === -1 && aImmutableVisibleFields.indexOf(sProperty) === -1) {
1490
+ aNonComputedVisibleFields.push(sProperty);
1491
+ }
1492
+ });
1493
+ }
1494
+ return aNonComputedVisibleFields.concat(aImmutableVisibleFields);
1495
+ }
1496
+
1497
+ function getRequiredProperties(sPath: any, oMetaModel: any, bCheckUpdateRestrictions: boolean = false) {
1498
+ const aPathParts = sPath.split("/");
1499
+ const aRequiredProperties: any = [];
1500
+ let aRequiredPropertiesWithPaths: any = [];
1501
+ let oEntitySetAnnotations = oMetaModel.getObject(`${sPath}@`);
1502
+ if (aPathParts.length > 2) {
1503
+ const sNavigationPath = aPathParts[aPathParts.length - 1];
1504
+ aPathParts.splice(-1, 1); // removing NavigationProperty from the end.
1505
+ const sParentEntitySetPath = aPathParts.join("/");
1506
+ const oNavigationRestrictions = CommonUtils.getNavigationRestrictions(oMetaModel, sParentEntitySetPath, sNavigationPath);
1507
+ oEntitySetAnnotations = oMetaModel.getObject(`${sParentEntitySetPath}/$NavigationPropertyBinding/${sNavigationPath}@`);
1508
+ if (CommonUtils.hasRestrictedPropertiesInAnnotations(oNavigationRestrictions, true, bCheckUpdateRestrictions)) {
1509
+ aRequiredPropertiesWithPaths = bCheckUpdateRestrictions
1510
+ ? oNavigationRestrictions["UpdateRestrictions"].RequiredProperties
1511
+ : oNavigationRestrictions["InsertRestrictions"].RequiredProperties;
1512
+ }
1513
+ if (
1514
+ (!aRequiredPropertiesWithPaths || !aRequiredPropertiesWithPaths.length) &&
1515
+ CommonUtils.hasRestrictedPropertiesInAnnotations(oEntitySetAnnotations, false, bCheckUpdateRestrictions)
1516
+ ) {
1517
+ aRequiredPropertiesWithPaths = CommonUtils.getRequiredPropertiesFromAnnotations(
1518
+ oEntitySetAnnotations,
1519
+ bCheckUpdateRestrictions
1520
+ );
1521
+ }
1522
+ } else if (CommonUtils.hasRestrictedPropertiesInAnnotations(oEntitySetAnnotations, false, bCheckUpdateRestrictions)) {
1523
+ aRequiredPropertiesWithPaths = CommonUtils.getRequiredPropertiesFromAnnotations(oEntitySetAnnotations, bCheckUpdateRestrictions);
1524
+ }
1525
+ aRequiredPropertiesWithPaths.forEach(function (oRequiredProperty: any) {
1526
+ const sProperty = oRequiredProperty["$PropertyPath"];
1527
+ aRequiredProperties.push(sProperty);
1528
+ });
1529
+ return aRequiredProperties;
1530
+ }
1531
+
1532
+ function getRequiredPropertiesFromInsertRestrictions(sPath: any, oMetaModel: any) {
1533
+ return CommonUtils.getRequiredProperties(sPath, oMetaModel);
1534
+ }
1535
+
1536
+ function getRequiredPropertiesFromUpdateRestrictions(sPath: any, oMetaModel: any) {
1537
+ return CommonUtils.getRequiredProperties(sPath, oMetaModel, true);
1538
+ }
1539
+
1540
+ function getRequiredPropertiesFromAnnotations(oAnnotations: any, bCheckUpdateRestrictions: boolean = false) {
1541
+ if (bCheckUpdateRestrictions) {
1542
+ return oAnnotations["@Org.OData.Capabilities.V1.UpdateRestrictions"].RequiredProperties;
1543
+ }
1544
+ return oAnnotations["@Org.OData.Capabilities.V1.InsertRestrictions"].RequiredProperties;
1545
+ }
1546
+
1547
+ function hasRestrictedPropertiesInAnnotations(
1548
+ oAnnotations: any,
1549
+ bIsNavigationRestrictions: boolean = false,
1550
+ bCheckUpdateRestrictions: boolean = false
1551
+ ) {
1552
+ if (bIsNavigationRestrictions) {
1553
+ if (bCheckUpdateRestrictions) {
1554
+ return oAnnotations && oAnnotations["UpdateRestrictions"] && oAnnotations["UpdateRestrictions"].RequiredProperties
1555
+ ? true
1556
+ : false;
1557
+ }
1558
+ return oAnnotations && oAnnotations["InsertRestrictions"] && oAnnotations["InsertRestrictions"].RequiredProperties ? true : false;
1559
+ } else if (bCheckUpdateRestrictions) {
1560
+ return oAnnotations &&
1561
+ oAnnotations["@Org.OData.Capabilities.V1.UpdateRestrictions"] &&
1562
+ oAnnotations["@Org.OData.Capabilities.V1.UpdateRestrictions"].RequiredProperties
1563
+ ? true
1564
+ : false;
1565
+ }
1566
+ return oAnnotations &&
1567
+ oAnnotations["@Org.OData.Capabilities.V1.InsertRestrictions"] &&
1568
+ oAnnotations["@Org.OData.Capabilities.V1.InsertRestrictions"].RequiredProperties
1569
+ ? true
1570
+ : false;
1483
1571
  }
1572
+
1484
1573
  function setUserDefaults(
1485
1574
  oAppComponent: AppComponent,
1486
1575
  aParameters: any[],
@@ -1496,7 +1585,7 @@ function setUserDefaults(
1496
1585
  if (!oShellServices.hasUShell()) {
1497
1586
  aParameters.forEach(function (oParameter: any) {
1498
1587
  const sPropertyName = bIsAction
1499
- ? "/" + oParameter.$Name
1588
+ ? `/${oParameter.$Name}`
1500
1589
  : oParameter.getPath().slice(oParameter.getPath().lastIndexOf("/") + 1);
1501
1590
  const sParameterName = bIsAction ? sPropertyName.slice(1) : sPropertyName;
1502
1591
  if (oActionDefaultValues && bIsCreate) {
@@ -1514,7 +1603,7 @@ function setUserDefaults(
1514
1603
  aExtendedParameters = (oData.selectionVariant && oData.selectionVariant.SelectOptions) || [];
1515
1604
  aParameters.forEach(function (oParameter: any) {
1516
1605
  const sPropertyName = bIsAction
1517
- ? "/" + oParameter.$Name
1606
+ ? `/${oParameter.$Name}`
1518
1607
  : oParameter.getPath().slice(oParameter.getPath().lastIndexOf("/") + 1);
1519
1608
  const sParameterName = bIsAction ? sPropertyName.slice(1) : sPropertyName;
1520
1609
  if (oActionDefaultValues && bIsCreate) {
@@ -1620,7 +1709,7 @@ function getHeaderFacetItemConfigForExternalNavigation(oViewData: any, oCrossNav
1620
1709
  semanticObjectMapping: aSemanticObjectMapping
1621
1710
  };
1622
1711
  } else {
1623
- Log.error("Cross navigation outbound is configured without semantic object and action for " + sOutbound);
1712
+ Log.error(`Cross navigation outbound is configured without semantic object and action for ${sOutbound}`);
1624
1713
  }
1625
1714
  }
1626
1715
  }
@@ -1648,9 +1737,9 @@ function setSemanticObjectMappings(oSelectionVariant: any, vMappings: object) {
1648
1737
  }
1649
1738
  function fnGetSemanticObjectsFromPath(oMetaModel: any, sPath: any) {
1650
1739
  return new Promise(function (resolve: (value: any) => void) {
1651
- const sSemanticObject = oMetaModel.getObject(sPath + "@com.sap.vocabularies.Common.v1.SemanticObject");
1740
+ const sSemanticObject = oMetaModel.getObject(`${sPath}@com.sap.vocabularies.Common.v1.SemanticObject`);
1652
1741
  const aSemanticObjectUnavailableActions = oMetaModel.getObject(
1653
- sPath + "@com.sap.vocabularies.Common.v1.SemanticObjectUnavailableActions"
1742
+ `${sPath}@com.sap.vocabularies.Common.v1.SemanticObjectUnavailableActions`
1654
1743
  );
1655
1744
  const aSemanticObjectForGetLinks = [{ semanticObject: sSemanticObject }];
1656
1745
  const oSemanticObject = {
@@ -1828,7 +1917,7 @@ function fnGetSemanticTargetsFromPageModel(oController: any, sPageModel: string)
1828
1917
  element.semanticObject.semanticObject &&
1829
1918
  typeof element.semanticObject.semanticObject === "object"
1830
1919
  ) {
1831
- sSemObjExpression = compileBinding(bindingExpression(element.semanticObject.semanticObject.$Path));
1920
+ sSemObjExpression = compileExpression(pathInModel(element.semanticObject.semanticObject.$Path));
1832
1921
  element.semanticObject.semanticObject = sSemObjExpression;
1833
1922
  element.semanticObjectForGetLinks[0].semanticObject = sSemObjExpression;
1834
1923
  return true;
@@ -1894,7 +1983,7 @@ function getFilterRestrictions(oFilterRestrictionsAnnotation: any, sRestriction:
1894
1983
  function getFilterRestrictionsByPath(sEntitySetPath: any, oMetaModel: any) {
1895
1984
  const oRet: any = {},
1896
1985
  FilterRestrictions = CommonUtils.FilterRestrictions,
1897
- oFilterRestrictions = sEntitySetPath ? oMetaModel.getObject(sEntitySetPath + "@Org.OData.Capabilities.V1.FilterRestrictions") : {};
1986
+ oFilterRestrictions = sEntitySetPath ? oMetaModel.getObject(`${sEntitySetPath}@Org.OData.Capabilities.V1.FilterRestrictions`) : {};
1898
1987
  oRet[FilterRestrictions.REQUIRED_PROPERTIES] = getFilterRestrictions(oFilterRestrictions, FilterRestrictions.REQUIRED_PROPERTIES) || [];
1899
1988
  oRet[FilterRestrictions.NON_FILTERABLE_PROPERTIES] =
1900
1989
  getFilterRestrictions(oFilterRestrictions, FilterRestrictions.NON_FILTERABLE_PROPERTIES) || [];
@@ -1960,10 +2049,10 @@ function getSingletonPath(path: string, metaModel: ODataMetaModel): string | und
1960
2049
  const parts = path.split("/").filter(Boolean),
1961
2050
  propertyName = parts.pop(),
1962
2051
  navigationPath = parts.join("/"),
1963
- entitySet = navigationPath && metaModel.getObject("/" + navigationPath);
2052
+ entitySet = navigationPath && metaModel.getObject(`/${navigationPath}`);
1964
2053
  if (entitySet?.$kind === "Singleton") {
1965
2054
  const singletonName = parts[parts.length - 1];
1966
- return "/" + singletonName + "/" + propertyName;
2055
+ return `/${singletonName}/${propertyName}`;
1967
2056
  }
1968
2057
  return undefined;
1969
2058
  }
@@ -2025,10 +2114,11 @@ function loadMacroLibrary() {
2025
2114
  function fnOnStrictHandlingFailed(sGroupId: string, actionName: string, oModel: ODataModel, aMessages: any[]) {
2026
2115
  const localI18nRef = (Core as CoreEx).getLibraryResourceBundle("sap.fe.core"),
2027
2116
  sActionName = actionName,
2028
- sCancelButtonTxt = localI18nRef.getText("CANCEL");
2117
+ sCancelButtonTxt = localI18nRef.getText("C_COMMON_DIALOG_CANCEL");
2118
+ aMessages = aMessages.filter((oMessage) => oMessage.getTechnicalDetails() && oMessage.getTechnicalDetails().httpStatus === 412);
2029
2119
  if (aMessages.length === 1) {
2030
- const sMessage = aMessages[0].message + "\n" + localI18nRef.getText("PROCEED");
2031
- const dialogPromise = new Promise(function (resolve) {
2120
+ const sMessage = `${aMessages[0].message}\n${localI18nRef.getText("PROCEED")}`;
2121
+ return new Promise(function (resolve) {
2032
2122
  MessageBox.warning(sMessage, {
2033
2123
  title: localI18nRef.getText("WARNING"),
2034
2124
  actions: [sActionName, sCancelButtonTxt],
@@ -2043,7 +2133,6 @@ function fnOnStrictHandlingFailed(sGroupId: string, actionName: string, oModel:
2043
2133
  }
2044
2134
  });
2045
2135
  });
2046
- return dialogPromise;
2047
2136
  }
2048
2137
  return new Promise(function (resolve) {
2049
2138
  const oMessageDialogModel = new JSONModel();
@@ -2067,6 +2156,7 @@ function fnOnStrictHandlingFailed(sGroupId: string, actionName: string, oModel:
2067
2156
  press: function () {
2068
2157
  resolve(true);
2069
2158
  oModel.submitBatch(sGroupId);
2159
+ oMessageDialogModel.setData({});
2070
2160
  oDialog.close();
2071
2161
  },
2072
2162
  type: "Emphasized",
@@ -2077,6 +2167,7 @@ function fnOnStrictHandlingFailed(sGroupId: string, actionName: string, oModel:
2077
2167
  new Button({
2078
2168
  press: function () {
2079
2169
  resolve(false);
2170
+ oMessageDialogModel.setData({});
2080
2171
  oDialog.close();
2081
2172
  },
2082
2173
  text: sCancelButtonTxt
@@ -2091,9 +2182,9 @@ function getMessageColumn(oControl: any): string {
2091
2182
  return "";
2092
2183
  }
2093
2184
  const headerInfoTitlePath = oControl.getParent().getTableDefinition().headerInfoTitle;
2094
- const oMetaModel = oControl && (oControl.getModel().getMetaModel() as any),
2185
+ const oMetaModel = oControl && oControl.getModel().getMetaModel(),
2095
2186
  sCurrentEntitySetName = oControl.data("metaPath");
2096
- const aTechnicalKeys = oMetaModel.getObject(sCurrentEntitySetName + "/$Type/$Key");
2187
+ const aTechnicalKeys = oMetaModel.getObject(`${sCurrentEntitySetName}/$Type/$Key`);
2097
2188
  const aFilteredTechnicalKeys: string[] = [];
2098
2189
 
2099
2190
  aTechnicalKeys.forEach(function (technicalKey: string) {
@@ -2126,44 +2217,25 @@ function getMessageColumn(oControl: any): string {
2126
2217
  return subtitleColumn;
2127
2218
  }
2128
2219
 
2129
- function getMessageStripText(
2130
- view: any,
2131
- aIgnoredLabels: any,
2132
- oFilterBar: any,
2133
- bIsChart: any,
2134
- bIsSearchIgnored: any,
2135
- sTabTitle: any,
2136
- oResourceBundle: any,
2137
- fnGetLocalizedText: any
2138
- ): string {
2139
- let sText = "";
2140
- if (bIsChart) {
2141
- const oChart = view.getController().getChartControl();
2142
- const bIsDraftSupported = oChart.data("draftSupported") === "true";
2143
- const oMacroResourceBundle = Core.getLibraryResourceBundle("sap.fe.macros") as ResourceBundle;
2144
- bIsSearchIgnored = bIsSearchIgnored && aIgnoredLabels.includes(oMacroResourceBundle.getText("M_FILTERBAR_SEARCH"));
2145
- if (aIgnoredLabels.length === 2 && bIsSearchIgnored && bIsDraftSupported) {
2146
- sText = oResourceBundle.getText("C_LR_MULTIVIZ_CHART_IGNORED_FILTER_DRAFT_DATA_AND_SEARCH");
2147
- } else if (aIgnoredLabels.length === 1 && bIsDraftSupported) {
2148
- sText = oResourceBundle.getText("C_MULTIVIZ_CHART_IGNORED_FILTER_DRAFT_DATA");
2149
- } else {
2150
- const sResource =
2151
- "C_LR_MULTIVIZ_CHART_" +
2152
- (aIgnoredLabels.length === 1 ? "SINGLE" : "MULTI") +
2153
- "_IGNORED_FILTER_" +
2154
- (system.desktop ? "LARGE" : "SMALL");
2155
- sText = oResourceBundle.getText(sResource, [aIgnoredLabels.join(", ")]);
2220
+ function getKeys(oMetaModel: any, sPath: string, sEntitySetName: string): string {
2221
+ const sMetaPath = oMetaModel.getMetaPath(sPath);
2222
+ const aTechnicalKeys = oMetaModel.getObject(`${sMetaPath}/$Type/$Key`);
2223
+ let sKey: string = "";
2224
+ const semanticKey = SemanticKeyHelper.getSemanticKeys(oMetaModel, sEntitySetName);
2225
+ if (semanticKey !== undefined && semanticKey.length === 1) {
2226
+ sKey = semanticKey[0].$PropertyPath;
2227
+ } else if (aTechnicalKeys) {
2228
+ const aFilteredTechnicalKeys: string[] = [];
2229
+ aTechnicalKeys.forEach(function (technicalKey: string) {
2230
+ if (technicalKey !== "IsActiveEntity") {
2231
+ aFilteredTechnicalKeys.push(technicalKey);
2232
+ }
2233
+ });
2234
+ if (aFilteredTechnicalKeys !== undefined && aFilteredTechnicalKeys.length === 1) {
2235
+ sKey = aFilteredTechnicalKeys[0];
2156
2236
  }
2157
- } else {
2158
- const sResource =
2159
- "C_LR_MULTITABLES_" +
2160
- (aIgnoredLabels.length === 1 ? "SINGLE" : "MULTI") +
2161
- "_IGNORED_FILTER_" +
2162
- (system.desktop ? "LARGE" : "SMALL"),
2163
- sLocalizedTableTitle = fnGetLocalizedText(sTabTitle, oFilterBar);
2164
- sText = oResourceBundle.getText(sResource, [aIgnoredLabels.join(", "), sLocalizedTableTitle]);
2165
2237
  }
2166
- return sText;
2238
+ return sKey;
2167
2239
  }
2168
2240
 
2169
2241
  const CommonUtils = {
@@ -2222,8 +2294,13 @@ const CommonUtils = {
2222
2294
  normalizeSearchTerm: normalizeSearchTerm,
2223
2295
  fnOnStrictHandlingFailed: fnOnStrictHandlingFailed,
2224
2296
  getSingletonPath: getSingletonPath,
2225
- getMessageStripText: getMessageStripText,
2226
- getMessageColumn: getMessageColumn
2297
+ getMessageColumn: getMessageColumn,
2298
+ getRequiredPropertiesFromUpdateRestrictions: getRequiredPropertiesFromUpdateRestrictions,
2299
+ getRequiredPropertiesFromInsertRestrictions: getRequiredPropertiesFromInsertRestrictions,
2300
+ hasRestrictedPropertiesInAnnotations: hasRestrictedPropertiesInAnnotations,
2301
+ getRequiredPropertiesFromAnnotations: getRequiredPropertiesFromAnnotations,
2302
+ getRequiredProperties: getRequiredProperties,
2303
+ getKeys: getKeys
2227
2304
  };
2228
2305
 
2229
2306
  export default CommonUtils;