@sapui5/sap.fe.core 1.98.0 → 1.101.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 (318) hide show
  1. package/package.json +8 -5
  2. package/src/sap/fe/core/.library +2 -3
  3. package/src/sap/fe/core/AnnotationHelper.js +328 -405
  4. package/src/sap/fe/core/AnnotationHelper.ts +321 -0
  5. package/src/sap/fe/core/AppComponent.js +382 -399
  6. package/src/sap/fe/core/AppComponent.ts +397 -0
  7. package/src/sap/fe/core/AppStateHandler.js +198 -181
  8. package/src/sap/fe/core/AppStateHandler.ts +171 -0
  9. package/src/sap/fe/core/BaseController.js +83 -58
  10. package/src/sap/fe/core/BaseController.ts +67 -0
  11. package/src/sap/fe/core/BusyLocker.js +105 -121
  12. package/src/sap/fe/core/BusyLocker.ts +98 -0
  13. package/src/sap/fe/core/CommonUtils.js +2221 -2399
  14. package/src/sap/fe/core/CommonUtils.ts +2248 -0
  15. package/src/sap/fe/core/ExtensionAPI.js +280 -274
  16. package/src/sap/fe/core/ExtensionAPI.ts +242 -0
  17. package/src/sap/fe/core/PageController.js +219 -131
  18. package/src/sap/fe/core/PageController.ts +129 -0
  19. package/src/sap/fe/core/RouterProxy.js +936 -823
  20. package/src/sap/fe/core/RouterProxy.ts +854 -0
  21. package/src/sap/fe/core/Synchronization.js +41 -35
  22. package/src/sap/fe/core/Synchronization.ts +29 -0
  23. package/src/sap/fe/core/TemplateComponent.js +248 -164
  24. package/src/sap/fe/core/TemplateComponent.ts +161 -0
  25. package/src/sap/fe/core/TemplateModel.js +77 -54
  26. package/src/sap/fe/core/TemplateModel.ts +63 -0
  27. package/src/sap/fe/core/TransactionHelper.js +1575 -1664
  28. package/src/sap/fe/core/TransactionHelper.ts +1736 -0
  29. package/src/sap/fe/core/actions/collaboration/ActivitySync.js +406 -0
  30. package/src/sap/fe/core/actions/collaboration/ActivitySync.ts +362 -0
  31. package/src/sap/fe/core/actions/collaboration/CollaborationCommon.js +146 -0
  32. package/src/sap/fe/core/actions/collaboration/CollaborationCommon.ts +129 -0
  33. package/src/sap/fe/core/actions/collaboration/Manage.js +264 -0
  34. package/src/sap/fe/core/actions/collaboration/Manage.ts +246 -0
  35. package/src/sap/fe/core/actions/collaboration/ManageDialog.fragment.xml +100 -0
  36. package/src/sap/fe/core/actions/collaboration/UserDetails.fragment.xml +13 -0
  37. package/src/sap/fe/core/actions/draft.js +663 -608
  38. package/src/sap/fe/core/actions/draft.ts +669 -0
  39. package/src/sap/fe/core/actions/messageHandling.js +576 -514
  40. package/src/sap/fe/core/actions/messageHandling.ts +562 -0
  41. package/src/sap/fe/core/actions/nonDraft.js +17 -19
  42. package/src/sap/fe/core/actions/nonDraft.ts +12 -0
  43. package/src/sap/fe/core/actions/operations.js +1093 -1215
  44. package/src/sap/fe/core/actions/operations.ts +1193 -0
  45. package/src/sap/fe/core/actions/sticky.js +114 -104
  46. package/src/sap/fe/core/actions/sticky.ts +119 -0
  47. package/src/sap/fe/core/buildingBlocks/AttributeModel.js +60 -0
  48. package/src/sap/fe/core/buildingBlocks/AttributeModel.ts +37 -0
  49. package/src/sap/fe/core/buildingBlocks/BuildingBlock.js +165 -0
  50. package/src/sap/fe/core/buildingBlocks/BuildingBlock.ts +178 -0
  51. package/src/sap/fe/core/buildingBlocks/BuildingBlockRuntime.js +707 -0
  52. package/src/sap/fe/core/buildingBlocks/BuildingBlockRuntime.ts +628 -0
  53. package/src/sap/fe/core/buildingBlocks/TraceInfo.js +436 -0
  54. package/src/sap/fe/core/buildingBlocks/TraceInfo.ts +431 -0
  55. package/src/sap/fe/core/controllerextensions/EditFlow.js +1855 -1827
  56. package/src/sap/fe/core/controllerextensions/EditFlow.ts +1792 -0
  57. package/src/sap/fe/core/controllerextensions/IntentBasedNavigation.js +80 -54
  58. package/src/sap/fe/core/controllerextensions/IntentBasedNavigation.ts +60 -0
  59. package/src/sap/fe/core/controllerextensions/InternalEditFlow.js +717 -512
  60. package/src/sap/fe/core/controllerextensions/InternalEditFlow.ts +785 -0
  61. package/src/sap/fe/core/controllerextensions/InternalIntentBasedNavigation.js +797 -815
  62. package/src/sap/fe/core/controllerextensions/InternalIntentBasedNavigation.ts +810 -0
  63. package/src/sap/fe/core/controllerextensions/InternalRouting.js +1057 -1004
  64. package/src/sap/fe/core/controllerextensions/InternalRouting.ts +1001 -0
  65. package/src/sap/fe/core/controllerextensions/KPIManagement.js +498 -533
  66. package/src/sap/fe/core/controllerextensions/KPIManagement.ts +36 -32
  67. package/src/sap/fe/core/controllerextensions/MassEdit.js +142 -77
  68. package/src/sap/fe/core/controllerextensions/MassEdit.ts +155 -0
  69. package/src/sap/fe/core/controllerextensions/MessageHandler.js +222 -236
  70. package/src/sap/fe/core/controllerextensions/MessageHandler.ts +215 -0
  71. package/src/sap/fe/core/controllerextensions/PageReady.js +312 -345
  72. package/src/sap/fe/core/controllerextensions/PageReady.ts +63 -55
  73. package/src/sap/fe/core/controllerextensions/Paginator.js +189 -175
  74. package/src/sap/fe/core/controllerextensions/Paginator.ts +169 -0
  75. package/src/sap/fe/core/controllerextensions/Placeholder.js +158 -149
  76. package/src/sap/fe/core/controllerextensions/Placeholder.ts +149 -0
  77. package/src/sap/fe/core/controllerextensions/Routing.js +145 -121
  78. package/src/sap/fe/core/controllerextensions/Routing.ts +131 -0
  79. package/src/sap/fe/core/controllerextensions/RoutingListener.js +8 -6
  80. package/src/sap/fe/core/controllerextensions/RoutingListener.ts +3 -0
  81. package/src/sap/fe/core/controllerextensions/Share.js +231 -268
  82. package/src/sap/fe/core/controllerextensions/Share.ts +231 -0
  83. package/src/sap/fe/core/controllerextensions/SideEffects.js +603 -644
  84. package/src/sap/fe/core/controllerextensions/SideEffects.ts +79 -79
  85. package/src/sap/fe/core/controllerextensions/ViewState.js +775 -806
  86. package/src/sap/fe/core/controllerextensions/ViewState.ts +796 -0
  87. package/src/sap/fe/core/controls/ActionParameterDialog.fragment.xml +2 -2
  88. package/src/sap/fe/core/controls/ActionPartial.fragment.xml +2 -2
  89. package/src/sap/fe/core/controls/Any.js +28 -0
  90. package/src/sap/fe/core/controls/Any.ts +30 -0
  91. package/src/sap/fe/core/controls/CommandExecution.js +93 -68
  92. package/src/sap/fe/core/controls/CommandExecution.ts +72 -0
  93. package/src/sap/fe/core/controls/ConditionalWrapper.js +166 -79
  94. package/src/sap/fe/core/controls/ConditionalWrapper.ts +74 -0
  95. package/src/sap/fe/core/controls/CustomFilterFieldContentWrapper.js +366 -0
  96. package/src/sap/fe/core/controls/CustomFilterFieldContentWrapper.ts +278 -0
  97. package/src/sap/fe/core/controls/CustomQuickViewPage.js +168 -125
  98. package/src/sap/fe/core/controls/CustomQuickViewPage.ts +116 -0
  99. package/src/sap/fe/core/controls/DataLossOrDraftDiscard/DataLossDraft.fragment.xml +44 -5
  100. package/src/sap/fe/core/controls/DataLossOrDraftDiscard/DataLossOrDraftDiscardHandler.js +164 -122
  101. package/src/sap/fe/core/controls/DataLossOrDraftDiscard/DataLossOrDraftDiscardHandler.ts +155 -0
  102. package/src/sap/fe/core/controls/FieldWrapper.js +213 -153
  103. package/src/sap/fe/core/controls/FieldWrapper.ts +104 -0
  104. package/src/sap/fe/core/controls/FileWrapper.js +313 -0
  105. package/src/sap/fe/core/controls/FileWrapper.ts +169 -0
  106. package/src/sap/fe/core/controls/FilterBar.js +198 -159
  107. package/src/sap/fe/core/controls/FilterBar.ts +148 -0
  108. package/src/sap/fe/core/controls/FormElementWrapper.js +101 -39
  109. package/src/sap/fe/core/controls/FormElementWrapper.ts +37 -0
  110. package/src/sap/fe/core/controls/MultiValueParameterDelegate.js +38 -42
  111. package/src/sap/fe/core/controls/MultiValueParameterDelegate.ts +31 -0
  112. package/src/sap/fe/core/controls/NonComputedVisibleKeyFieldsDialog.fragment.xml +1 -0
  113. package/src/sap/fe/core/controls/filterbar/FilterContainer.js +148 -115
  114. package/src/sap/fe/core/controls/filterbar/FilterContainer.ts +102 -0
  115. package/src/sap/fe/core/controls/filterbar/VisualFilter.js +301 -265
  116. package/src/sap/fe/core/controls/filterbar/VisualFilter.ts +252 -0
  117. package/src/sap/fe/core/controls/filterbar/VisualFilterContainer.js +186 -140
  118. package/src/sap/fe/core/controls/filterbar/VisualFilterContainer.ts +125 -0
  119. package/src/sap/fe/core/controls/filterbar/utils/VisualFilterUtils.js +336 -322
  120. package/src/sap/fe/core/controls/filterbar/utils/VisualFilterUtils.ts +337 -0
  121. package/src/sap/fe/core/controls/massEdit/MassEditDialog.fragment.xml +37 -42
  122. package/src/sap/fe/core/controls/massEdit/MassEditHandlers.js +76 -74
  123. package/src/sap/fe/core/controls/massEdit/MassEditHandlers.ts +71 -0
  124. package/src/sap/fe/core/converters/ConverterContext.js +348 -379
  125. package/src/sap/fe/core/converters/ConverterContext.ts +23 -19
  126. package/src/sap/fe/core/converters/ManifestSettings.js +13 -1
  127. package/src/sap/fe/core/converters/ManifestSettings.ts +18 -2
  128. package/src/sap/fe/core/converters/ManifestWrapper.js +354 -365
  129. package/src/sap/fe/core/converters/ManifestWrapper.ts +19 -0
  130. package/src/sap/fe/core/converters/MetaModelConverter.js +16 -11
  131. package/src/sap/fe/core/converters/MetaModelConverter.ts +21 -18
  132. package/src/sap/fe/core/converters/TemplateConverter.js +1 -1
  133. package/src/sap/fe/core/converters/TemplateConverter.ts +4 -3
  134. package/src/sap/fe/core/converters/annotations/DataField.js +26 -13
  135. package/src/sap/fe/core/converters/annotations/DataField.ts +40 -17
  136. package/src/sap/fe/core/converters/common/AnnotationConverter.js +17 -13
  137. package/src/sap/fe/core/converters/controls/Common/Action.js +11 -11
  138. package/src/sap/fe/core/converters/controls/Common/Action.ts +22 -21
  139. package/src/sap/fe/core/converters/controls/Common/Chart.js +12 -10
  140. package/src/sap/fe/core/converters/controls/Common/Chart.ts +23 -14
  141. package/src/sap/fe/core/converters/controls/Common/DataVisualization.js +3 -3
  142. package/src/sap/fe/core/converters/controls/Common/DataVisualization.ts +2 -2
  143. package/src/sap/fe/core/converters/controls/Common/Form.js +9 -7
  144. package/src/sap/fe/core/converters/controls/Common/Form.ts +23 -5
  145. package/src/sap/fe/core/converters/controls/Common/KPI.js +1 -1
  146. package/src/sap/fe/core/converters/controls/Common/KPI.ts +2 -2
  147. package/src/sap/fe/core/converters/controls/Common/Table.js +562 -218
  148. package/src/sap/fe/core/converters/controls/Common/Table.ts +670 -320
  149. package/src/sap/fe/core/converters/controls/Common/table/StandardActions.js +218 -94
  150. package/src/sap/fe/core/converters/controls/Common/table/StandardActions.ts +265 -159
  151. package/src/sap/fe/core/converters/controls/ListReport/FilterBar.js +495 -77
  152. package/src/sap/fe/core/converters/controls/ListReport/FilterBar.ts +535 -130
  153. package/src/sap/fe/core/converters/controls/ObjectPage/HeaderFacet.js +6 -6
  154. package/src/sap/fe/core/converters/controls/ObjectPage/HeaderFacet.ts +20 -18
  155. package/src/sap/fe/core/converters/controls/ObjectPage/SubSection.js +10 -7
  156. package/src/sap/fe/core/converters/controls/ObjectPage/SubSection.ts +13 -16
  157. package/src/sap/fe/core/converters/helpers/Aggregation.js +117 -127
  158. package/src/sap/fe/core/converters/helpers/Aggregation.ts +20 -5
  159. package/src/sap/fe/core/converters/helpers/BindingHelper.js +20 -6
  160. package/src/sap/fe/core/converters/helpers/BindingHelper.ts +16 -4
  161. package/src/sap/fe/core/converters/helpers/ConfigurableObject.js +12 -1
  162. package/src/sap/fe/core/converters/helpers/ConfigurableObject.ts +11 -0
  163. package/src/sap/fe/core/converters/helpers/IssueManager.js +4 -1
  164. package/src/sap/fe/core/converters/helpers/IssueManager.ts +3 -0
  165. package/src/sap/fe/core/converters/helpers/Key.js +42 -57
  166. package/src/sap/fe/core/converters/helpers/Key.ts +1 -1
  167. package/src/sap/fe/core/converters/objectPage/FormMenuActions.js +1 -1
  168. package/src/sap/fe/core/converters/objectPage/FormMenuActions.ts +0 -4
  169. package/src/sap/fe/core/converters/objectPage/HeaderAndFooterAction.js +54 -30
  170. package/src/sap/fe/core/converters/objectPage/HeaderAndFooterAction.ts +69 -43
  171. package/src/sap/fe/core/converters/templates/ListReportConverter.js +52 -28
  172. package/src/sap/fe/core/converters/templates/ListReportConverter.ts +111 -74
  173. package/src/sap/fe/core/converters/templates/ObjectPageConverter.js +11 -9
  174. package/src/sap/fe/core/converters/templates/ObjectPageConverter.ts +8 -8
  175. package/src/sap/fe/core/designtime/AppComponent.designtime.js +93 -98
  176. package/src/sap/fe/core/designtime/AppComponent.designtime.ts +91 -0
  177. package/src/sap/fe/core/formatters/CollaborationFormatter.js +104 -0
  178. package/src/sap/fe/core/formatters/CollaborationFormatter.ts +60 -0
  179. package/src/sap/fe/core/formatters/CriticalityFormatter.js +1 -1
  180. package/src/sap/fe/core/formatters/CriticalityFormatter.ts +1 -1
  181. package/src/sap/fe/core/formatters/FPMFormatter.js +1 -1
  182. package/src/sap/fe/core/formatters/FPMFormatter.ts +4 -10
  183. package/src/sap/fe/core/formatters/KPIFormatter.js +3 -12
  184. package/src/sap/fe/core/formatters/KPIFormatter.ts +4 -1
  185. package/src/sap/fe/core/formatters/TableFormatter.js +91 -29
  186. package/src/sap/fe/core/formatters/TableFormatter.ts +94 -28
  187. package/src/sap/fe/core/formatters/ValueFormatter.js +4 -4
  188. package/src/sap/fe/core/formatters/ValueFormatter.ts +5 -7
  189. package/src/sap/fe/core/fpm/Component.js +81 -55
  190. package/src/sap/fe/core/fpm/Component.ts +43 -0
  191. package/src/sap/fe/core/helpers/AppStartupHelper.js +324 -310
  192. package/src/sap/fe/core/helpers/AppStartupHelper.ts +370 -341
  193. package/src/sap/fe/core/helpers/BindingExpression.js +319 -360
  194. package/src/sap/fe/core/helpers/BindingExpression.ts +323 -397
  195. package/src/sap/fe/core/helpers/ClassSupport.js +321 -168
  196. package/src/sap/fe/core/helpers/ClassSupport.ts +362 -158
  197. package/src/sap/fe/core/helpers/DynamicAnnotationPathHelper.js +64 -59
  198. package/src/sap/fe/core/helpers/DynamicAnnotationPathHelper.ts +52 -0
  199. package/src/sap/fe/core/helpers/EditState.js +81 -84
  200. package/src/sap/fe/core/helpers/EditState.ts +81 -0
  201. package/src/sap/fe/core/helpers/ExcelFormatHelper.js +62 -48
  202. package/src/sap/fe/core/helpers/ExcelFormatHelper.ts +49 -0
  203. package/src/sap/fe/core/helpers/FPMHelper.js +52 -56
  204. package/src/sap/fe/core/helpers/FPMHelper.ts +62 -0
  205. package/src/sap/fe/core/helpers/KeepAliveHelper.js +3 -4
  206. package/src/sap/fe/core/helpers/KeepAliveHelper.ts +9 -9
  207. package/src/sap/fe/core/helpers/MassEditHelper.js +736 -676
  208. package/src/sap/fe/core/helpers/MassEditHelper.ts +803 -0
  209. package/src/sap/fe/core/helpers/ModelHelper.js +281 -225
  210. package/src/sap/fe/core/helpers/ModelHelper.ts +273 -0
  211. package/src/sap/fe/core/helpers/PasteHelper.js +210 -132
  212. package/src/sap/fe/core/helpers/PasteHelper.ts +197 -0
  213. package/src/sap/fe/core/helpers/SemanticDateOperators.js +336 -313
  214. package/src/sap/fe/core/helpers/SemanticDateOperators.ts +336 -0
  215. package/src/sap/fe/core/helpers/SemanticKeyHelper.js +66 -67
  216. package/src/sap/fe/core/helpers/SemanticKeyHelper.ts +73 -0
  217. package/src/sap/fe/core/helpers/StableIdHelper.js +1 -10
  218. package/src/sap/fe/core/helpers/StableIdHelper.ts +2 -10
  219. package/src/sap/fe/core/jsx-runtime/jsx.js +35 -5
  220. package/src/sap/fe/core/jsx-runtime/jsx.ts +23 -9
  221. package/src/sap/fe/core/library.js +426 -451
  222. package/src/sap/fe/core/library.support.js +23 -33
  223. package/src/sap/fe/core/library.support.ts +23 -0
  224. package/src/sap/fe/core/library.ts +420 -0
  225. package/src/sap/fe/core/manifestMerger/ChangePageConfiguration.js +5 -3
  226. package/src/sap/fe/core/manifestMerger/ChangePageConfiguration.ts +5 -5
  227. package/src/sap/fe/core/messagebundle.properties +63 -18
  228. package/src/sap/fe/core/messagebundle_ar.properties +37 -6
  229. package/src/sap/fe/core/messagebundle_bg.properties +37 -6
  230. package/src/sap/fe/core/messagebundle_ca.properties +37 -6
  231. package/src/sap/fe/core/messagebundle_cs.properties +38 -7
  232. package/src/sap/fe/core/messagebundle_cy.properties +37 -6
  233. package/src/sap/fe/core/messagebundle_da.properties +37 -6
  234. package/src/sap/fe/core/messagebundle_de.properties +37 -6
  235. package/src/sap/fe/core/messagebundle_el.properties +37 -6
  236. package/src/sap/fe/core/messagebundle_en.properties +37 -6
  237. package/src/sap/fe/core/messagebundle_en_GB.properties +37 -6
  238. package/src/sap/fe/core/messagebundle_en_US_sappsd.properties +37 -6
  239. package/src/sap/fe/core/messagebundle_en_US_saprigi.properties +37 -6
  240. package/src/sap/fe/core/messagebundle_en_US_saptrc.properties +37 -6
  241. package/src/sap/fe/core/messagebundle_es.properties +37 -6
  242. package/src/sap/fe/core/messagebundle_es_MX.properties +37 -6
  243. package/src/sap/fe/core/messagebundle_et.properties +37 -6
  244. package/src/sap/fe/core/messagebundle_fi.properties +38 -7
  245. package/src/sap/fe/core/messagebundle_fr.properties +43 -12
  246. package/src/sap/fe/core/messagebundle_fr_CA.properties +45 -14
  247. package/src/sap/fe/core/messagebundle_hi.properties +43 -12
  248. package/src/sap/fe/core/messagebundle_hr.properties +43 -12
  249. package/src/sap/fe/core/messagebundle_hu.properties +37 -6
  250. package/src/sap/fe/core/messagebundle_id.properties +38 -7
  251. package/src/sap/fe/core/messagebundle_it.properties +37 -6
  252. package/src/sap/fe/core/messagebundle_iw.properties +37 -6
  253. package/src/sap/fe/core/messagebundle_ja.properties +36 -5
  254. package/src/sap/fe/core/messagebundle_kk.properties +43 -12
  255. package/src/sap/fe/core/messagebundle_ko.properties +37 -6
  256. package/src/sap/fe/core/messagebundle_lt.properties +37 -6
  257. package/src/sap/fe/core/messagebundle_lv.properties +44 -13
  258. package/src/sap/fe/core/messagebundle_ms.properties +42 -11
  259. package/src/sap/fe/core/messagebundle_nl.properties +37 -6
  260. package/src/sap/fe/core/messagebundle_no.properties +37 -6
  261. package/src/sap/fe/core/messagebundle_pl.properties +37 -6
  262. package/src/sap/fe/core/messagebundle_pt.properties +38 -7
  263. package/src/sap/fe/core/messagebundle_pt_PT.properties +37 -6
  264. package/src/sap/fe/core/messagebundle_ro.properties +37 -6
  265. package/src/sap/fe/core/messagebundle_ru.properties +37 -6
  266. package/src/sap/fe/core/messagebundle_sh.properties +39 -8
  267. package/src/sap/fe/core/messagebundle_sk.properties +37 -6
  268. package/src/sap/fe/core/messagebundle_sl.properties +43 -12
  269. package/src/sap/fe/core/messagebundle_sv.properties +38 -7
  270. package/src/sap/fe/core/messagebundle_th.properties +36 -5
  271. package/src/sap/fe/core/messagebundle_tr.properties +39 -8
  272. package/src/sap/fe/core/messagebundle_uk.properties +37 -6
  273. package/src/sap/fe/core/messagebundle_vi.properties +37 -6
  274. package/src/sap/fe/core/messagebundle_zh_CN.properties +37 -6
  275. package/src/sap/fe/core/messagebundle_zh_TW.properties +43 -12
  276. package/src/sap/fe/core/services/AsyncComponentServiceFactory.js +47 -73
  277. package/src/sap/fe/core/services/AsyncComponentServiceFactory.ts +3 -1
  278. package/src/sap/fe/core/services/CacheHandlerServiceFactory.js +231 -202
  279. package/src/sap/fe/core/services/CacheHandlerServiceFactory.ts +211 -0
  280. package/src/sap/fe/core/services/EnvironmentServiceFactory.js +70 -96
  281. package/src/sap/fe/core/services/EnvironmentServiceFactory.ts +10 -8
  282. package/src/sap/fe/core/services/NavigationServiceFactory.js +351 -300
  283. package/src/sap/fe/core/services/NavigationServiceFactory.ts +313 -0
  284. package/src/sap/fe/core/services/ResourceModelServiceFactory.js +114 -81
  285. package/src/sap/fe/core/services/ResourceModelServiceFactory.ts +83 -0
  286. package/src/sap/fe/core/services/RoutingServiceFactory.js +963 -899
  287. package/src/sap/fe/core/services/RoutingServiceFactory.ts +907 -0
  288. package/src/sap/fe/core/services/ShellServicesFactory.js +694 -741
  289. package/src/sap/fe/core/services/ShellServicesFactory.ts +45 -40
  290. package/src/sap/fe/core/services/SideEffectsServiceFactory.js +572 -643
  291. package/src/sap/fe/core/services/SideEffectsServiceFactory.ts +67 -96
  292. package/src/sap/fe/core/services/TemplatedViewServiceFactory.js +429 -487
  293. package/src/sap/fe/core/services/TemplatedViewServiceFactory.ts +449 -0
  294. package/src/sap/fe/core/services/view/TemplatingErrorPage.controller.js +48 -8
  295. package/src/sap/fe/core/services/view/TemplatingErrorPage.controller.ts +11 -0
  296. package/src/sap/fe/core/support/AnnotationIssue.support.js +15 -3
  297. package/src/sap/fe/core/support/AnnotationIssue.support.ts +16 -2
  298. package/src/sap/fe/core/support/CollectionFacetUnsupportedLevel.support.js +2 -2
  299. package/src/sap/fe/core/support/CollectionFacetUnsupportedLevel.support.ts +1 -1
  300. package/src/sap/fe/core/support/CommonHelper.js +1 -1
  301. package/src/sap/fe/core/support/CommonHelper.ts +1 -4
  302. package/src/sap/fe/core/support/Diagnostics.js +36 -48
  303. package/src/sap/fe/core/templating/DataModelPathHelper.js +91 -90
  304. package/src/sap/fe/core/templating/DataModelPathHelper.ts +126 -123
  305. package/src/sap/fe/core/templating/DisplayModeFormatter.js +23 -3
  306. package/src/sap/fe/core/templating/DisplayModeFormatter.ts +26 -5
  307. package/src/sap/fe/core/templating/FieldControlHelper.js +8 -8
  308. package/src/sap/fe/core/templating/FieldControlHelper.ts +25 -7
  309. package/src/sap/fe/core/templating/FilterHelper.js +138 -79
  310. package/src/sap/fe/core/templating/FilterHelper.ts +148 -79
  311. package/src/sap/fe/core/templating/PropertyHelper.js +16 -2
  312. package/src/sap/fe/core/templating/PropertyHelper.ts +31 -24
  313. package/src/sap/fe/core/templating/UIFormatters.js +179 -43
  314. package/src/sap/fe/core/templating/UIFormatters.ts +190 -61
  315. package/src/sap/fe/core/type/Email.js +26 -8
  316. package/src/sap/fe/core/type/Email.ts +10 -11
  317. package/ui5.yaml +0 -3
  318. package/src/sap/fe/core/controllerextensions/ControllerExtensionMetadata.js +0 -74
@@ -0,0 +1,321 @@
1
+ import { DataField, UIAnnotationTerms, UIAnnotationTypes } from "@sap-ux/vocabularies-types";
2
+ import CommonUtils from "sap/fe/core/CommonUtils";
3
+ import { ConverterAction } from "sap/fe/core/converters/controls/Common/Action";
4
+ import { ManifestAction } from "sap/fe/core/converters/ManifestSettings";
5
+ import { BindingExpression, compileBinding, Expression, fn, or, ref, resolveBindingString } from "sap/fe/core/helpers/BindingExpression";
6
+ import ModelHelper from "sap/fe/core/helpers/ModelHelper";
7
+ import { generate } from "sap/fe/core/helpers/StableIdHelper";
8
+ import mLibrary from "sap/m/library";
9
+ import ODataModelAnnotationHelper from "sap/ui/model/odata/v4/AnnotationHelper";
10
+ const ButtonType = mLibrary.ButtonType;
11
+ const AnnotationHelper = {
12
+ /* this helper can be activated to debug template processing
13
+ debug: function (oContext) {
14
+ //debugger;
15
+ },
16
+ */
17
+
18
+ getTargetContext: function (oTarget: any) {
19
+ const sTarget = oTarget.getObject(oTarget.getPath()),
20
+ sNavigationPath = ODataModelAnnotationHelper.getNavigationPath(oTarget.getPath());
21
+ return sNavigationPath + "/" + sTarget;
22
+ },
23
+
24
+ getNavigationContext: function (oContext: any) {
25
+ return ODataModelAnnotationHelper.getNavigationPath(oContext.getPath());
26
+ },
27
+ /**
28
+ * Checks if the footer is visible or not.
29
+ *
30
+ * @function
31
+ * @static
32
+ * @name sap.fe.core.AnnotationHelper.getDataFieldBasedFooterVisibility
33
+ * @memberof sap.fe.core.AnnotationHelper
34
+ * @param {Array} aDataFields Array of DataFields in the identification
35
+ * @param {boolean} bConsiderEditable Whether the edit mode binding is required or not
36
+ * @returns {string} An expression if all the actions are ui.hidden, true otherwise
37
+ * @private
38
+ * @ui5-restricted
39
+ **/
40
+ getDataFieldBasedFooterVisibility: function (aDataFields: any[], bConsiderEditable: boolean) {
41
+ let sHiddenExpression = "";
42
+ let sSemiHiddenExpression;
43
+ const aHiddenActionPath = [];
44
+
45
+ for (const i in aDataFields) {
46
+ const oDataField = aDataFields[i];
47
+ if (oDataField.$Type === UIAnnotationTypes.DataFieldForAction && oDataField.Determining === true) {
48
+ const hiddenExpression = oDataField[`@${UIAnnotationTerms.Hidden}`];
49
+ if (!hiddenExpression) {
50
+ return true;
51
+ } else if (hiddenExpression.$Path) {
52
+ if (aHiddenActionPath.indexOf(hiddenExpression.$Path) === -1) {
53
+ aHiddenActionPath.push(hiddenExpression.$Path);
54
+ }
55
+ }
56
+ }
57
+ }
58
+
59
+ if (aHiddenActionPath.length) {
60
+ for (let index = 0; index < aHiddenActionPath.length; index++) {
61
+ if (aHiddenActionPath[index]) {
62
+ sSemiHiddenExpression = "(%{" + aHiddenActionPath[index] + "} === true ? false : true )";
63
+ }
64
+ if (index == aHiddenActionPath.length - 1) {
65
+ sHiddenExpression = sHiddenExpression + sSemiHiddenExpression;
66
+ } else {
67
+ sHiddenExpression = sHiddenExpression + sSemiHiddenExpression + "||";
68
+ }
69
+ }
70
+ return (
71
+ "{= " +
72
+ (bConsiderEditable ? "(" : "") +
73
+ sHiddenExpression +
74
+ (bConsiderEditable ? " || ${ui>/isEditable}) " : " ") +
75
+ "&& ${internal>isCreateDialogOpen} !== true}"
76
+ );
77
+ } else {
78
+ return "{= " + (bConsiderEditable ? "${ui>/isEditable} && " : "") + "${internal>isCreateDialogOpen} !== true}";
79
+ }
80
+ },
81
+
82
+ /**
83
+ * Returns the metamodel path correctly for bound actions. For unbound actions,
84
+ * an incorrect path is returned, but is ignored during templating.
85
+ *
86
+ * For example, for the bound action someNameSpace.SomeBoundAction of the entity set SomeEntitySet,
87
+ * the string "/SomeEntitySet/someNameSpace.SomeBoundAction" is returned.
88
+ *
89
+ * @function
90
+ * @static
91
+ * @name sap.fe.core.AnnotationHelper.getActionContext
92
+ * @memberof sap.fe.core.AnnotationHelper
93
+ * @param {object} oAction The context object for the action
94
+ * @returns {string} Correct metamodel path for bound and incorrect path for unbound actions
95
+ * @private
96
+ * @ui5-restricted
97
+ **/
98
+ getActionContext: function (oAction: object) {
99
+ return CommonUtils.getActionPath(oAction, true);
100
+ },
101
+ /**
102
+ * Returns the metamodel path correctly for overloaded bound actions. For unbound actions,
103
+ * incorrect path is returned but during templating it is ignored.
104
+ * e.g. for bound action someNameSpace.SomeBoundAction of entity set SomeEntitySet,
105
+ * the string "/SomeEntitySet/someNameSpace.SomeBoundAction/@$ui5.overload/0" is returned.
106
+ *
107
+ * @function
108
+ * @static
109
+ * @name sap.fe.core.AnnotationHelper.getPathToBoundActionOverload
110
+ * @memberof sap.fe.core.AnnotationHelper
111
+ * @param {object} oAction The context object for the action
112
+ * @returns {string} Correct metamodel path for bound action overload and incorrect path for unbound actions
113
+ * @private
114
+ * @ui5-restricted
115
+ **/
116
+ getPathToBoundActionOverload: function (oAction: object) {
117
+ const sPath = CommonUtils.getActionPath(oAction, true);
118
+ return sPath + "/@$ui5.overload/0";
119
+ },
120
+ /**
121
+ * Returns an expression to determine Emphasized button type based on Criticality across all actions
122
+ * If critical action is rendered, its considered to be the primary action. Hence template's default primary action is set back to Default.
123
+ *
124
+ * @function
125
+ * @static
126
+ * @name sap.fe.core.AnnotationHelper.buildEmphasizedButtonExpression
127
+ * @memberof sap.fe.core.AnnotationHelper
128
+ * @param {Array} aIdentification Array of all the DataFields in Identification
129
+ * @returns {string} An expression to deduce if button type is Default or Emphasized
130
+ * @private
131
+ * @ui5-restricted
132
+ **/
133
+ buildEmphasizedButtonExpression: function (aIdentification?: any[]) {
134
+ if (!aIdentification) {
135
+ return ButtonType.Emphasized;
136
+ }
137
+ let sFormatEmphasizedExpression: string | undefined;
138
+ let bIsAlwaysDefault: boolean,
139
+ sHiddenSimplePath,
140
+ sHiddenExpression = "";
141
+ aIdentification.forEach(function (oDataField: any) {
142
+ const oCriticalityProperty = oDataField.Criticality;
143
+ const oDataFieldHidden = oDataField["@com.sap.vocabularies.UI.v1.Hidden"];
144
+ if (oDataField.$Type === "com.sap.vocabularies.UI.v1.DataFieldForAction" && !bIsAlwaysDefault && oCriticalityProperty) {
145
+ if (!sFormatEmphasizedExpression && oDataFieldHidden === true) {
146
+ // if DataField is set to hidden, we can skip other checks and return Default button type
147
+ sFormatEmphasizedExpression = ButtonType.Emphasized;
148
+ return;
149
+ }
150
+ if (oDataFieldHidden && oDataFieldHidden.$Path) {
151
+ // when visibility of critical button is based on path, collect all paths for expression
152
+ sHiddenSimplePath = oDataFieldHidden.$Path;
153
+ if (sHiddenExpression) {
154
+ sHiddenExpression = sHiddenExpression + " && ";
155
+ }
156
+ sHiddenExpression = sHiddenExpression + "%{" + sHiddenSimplePath + "} === true";
157
+ sFormatEmphasizedExpression = "{= (" + sHiddenExpression + ") ? 'Emphasized' : 'Default' }";
158
+ }
159
+ switch (oCriticalityProperty.$EnumMember) {
160
+ // supported criticality are [Positive/3/'3'] and [Negative/1/'1']
161
+ case "com.sap.vocabularies.UI.v1.CriticalityType/Negative":
162
+ case "com.sap.vocabularies.UI.v1.CriticalityType/Positive":
163
+ case "1":
164
+ case 1:
165
+ case "3":
166
+ case 3:
167
+ if (!oDataFieldHidden) {
168
+ sFormatEmphasizedExpression = ButtonType.Default;
169
+ bIsAlwaysDefault = true;
170
+ }
171
+ sFormatEmphasizedExpression = sFormatEmphasizedExpression || ButtonType.Default;
172
+ break;
173
+ default:
174
+ sFormatEmphasizedExpression = ButtonType.Emphasized;
175
+ }
176
+ if (oCriticalityProperty.$Path) {
177
+ // when Criticality is set using a path, use the path for deducing the Emphsized type for default Primary Action
178
+ const sCombinedHiddenExpression = sHiddenExpression ? "!(" + sHiddenExpression + ") && " : "";
179
+ sFormatEmphasizedExpression =
180
+ "{= " +
181
+ sCombinedHiddenExpression +
182
+ "((${" +
183
+ oCriticalityProperty.$Path +
184
+ "} === 'com.sap.vocabularies.UI.v1.CriticalityType/Negative') || (${" +
185
+ oCriticalityProperty.$Path +
186
+ "} === '1') || (${" +
187
+ oCriticalityProperty.$Path +
188
+ "} === 1) " +
189
+ "|| (${" +
190
+ oCriticalityProperty.$Path +
191
+ "} === 'com.sap.vocabularies.UI.v1.CriticalityType/Positive') || (${" +
192
+ oCriticalityProperty.$Path +
193
+ "} === '3') || (${" +
194
+ oCriticalityProperty.$Path +
195
+ "} === 3)) ? " +
196
+ "'Default'" +
197
+ " : " +
198
+ "'Emphasized'" +
199
+ " }";
200
+ }
201
+ }
202
+ });
203
+ return sFormatEmphasizedExpression || ButtonType.Emphasized;
204
+ },
205
+ /**
206
+ * Method to determine if the programming model is sticky.
207
+ *
208
+ * @function
209
+ * @name isStickySessionSupported
210
+ * @param {object} [vCollectionOrMetaModel] The collection or the metadata model
211
+ * @param {object} [oInterface] Contains the context, used in oDataContext
212
+ * @returns {boolean} `true` if sticky, `false` otherwise
213
+ */
214
+ isStickySessionSupported: function (vCollectionOrMetaModel: object | undefined, oInterface: any | undefined) {
215
+ let oMetaModel;
216
+ if (oInterface) {
217
+ oMetaModel = oInterface.context.getModel();
218
+ } else {
219
+ oMetaModel = vCollectionOrMetaModel;
220
+ }
221
+ return ModelHelper.isStickySessionSupported(oMetaModel);
222
+ },
223
+ /**
224
+ * Method returns Whether the action type is manifest or not.
225
+ *
226
+ * @function
227
+ * @name isManifestActionVisible
228
+ * @param {object} oAction The action object
229
+ * @returns {boolean} `true` if action is coming from manifest, `false` otherwise
230
+ */
231
+ isManifestAction: function (oAction: any) {
232
+ const aActions = [
233
+ "Primary",
234
+ "DefaultApply",
235
+ "Secondary",
236
+ "ForAction",
237
+ "ForNavigation",
238
+ "SwitchToActiveObject",
239
+ "SwitchToDraftObject",
240
+ "DraftActions"
241
+ ];
242
+ return aActions.indexOf(oAction.type) < 0;
243
+ },
244
+ /**
245
+ * Method returns whether footer is visible or not on object / subobject page.
246
+ *
247
+ * @function
248
+ * @name getFooterVisible
249
+ * @param {ConverterAction[]} footerActions The footer action object coming from the converter
250
+ * @param {DataField[]} dataFields Data field array for normal footer visibility processing
251
+ * @returns {boolean | BindingExpression<string>} `true` if any action is true, otherwise compiled Binding or `false`
252
+ */
253
+ getFooterVisible: function (footerActions: ConverterAction[], dataFields: DataField[]): boolean | BindingExpression<string> {
254
+ const manifestActions = footerActions.filter((action) => AnnotationHelper.isManifestAction(action)) as ManifestAction[];
255
+ let customActionVisibility: Expression<boolean>;
256
+ if (manifestActions.length) {
257
+ // If we have manifest actions
258
+ const customActionIndividualVisibility = manifestActions.map((action) => {
259
+ return resolveBindingString<boolean>(action.visible as string | boolean, "boolean");
260
+ });
261
+ // construct the footer's visibility-binding out of all actions' visibility-bindings, first the binding of all custom actions ...
262
+ customActionVisibility = or(...customActionIndividualVisibility);
263
+ // and then the binding of all annotation actions inside the footer ...
264
+ const annotationActionVisibility = this.getDataFieldBasedFooterVisibility(dataFields, true);
265
+ // finally, return everything.
266
+ return compileBinding(or(customActionVisibility, resolveBindingString<boolean>(annotationActionVisibility, "boolean")));
267
+ }
268
+ return this.getDataFieldBasedFooterVisibility(dataFields, true);
269
+ },
270
+ /**
271
+ * Build an expression calling an action handler via the FPM helper's actionWrapper function
272
+ *
273
+ * This function assumes that the 'FPM.actionWrapper()' function is available at runtime.
274
+ *
275
+ * @param {object} oAction Action metadata
276
+ * @param {string} oAction.handlerModule Module containing the action handler method
277
+ * @param {string} oAction.handlerMethod Action handler method name
278
+ * @param {object} [oThis] `this` (if the function is called from a macro)
279
+ * @param {string} oThis.id The table's ID
280
+ * @returns {string} The action wrapper binding expression
281
+ */
282
+ buildActionWrapper: function (oAction: { handlerModule: string; handlerMethod: string }, oThis: { id: string } | undefined) {
283
+ const aParams: any[] = [ref("$event"), oAction.handlerModule, oAction.handlerMethod];
284
+
285
+ if (oThis && oThis.id) {
286
+ const oAdditionalParams = {
287
+ contexts: ref("${internal>selectedContexts}")
288
+ };
289
+ aParams.push(oAdditionalParams);
290
+ }
291
+ return compileBinding(fn("FPM.actionWrapper", aParams));
292
+ },
293
+
294
+ /**
295
+ * Method returns an VariantBackReference expression based on variantManagement and oConverterContext value.
296
+ *
297
+ * @function
298
+ * @name getVariantBackReference
299
+ * @param {object} oViewData Object Containing View Data
300
+ * @param {object} oConverterContext Object containing converted context
301
+ * @returns {string}
302
+ */
303
+ getVariantBackReference: function (oViewData: any, oConverterContext: any) {
304
+ if (oViewData && oViewData.variantManagement === "Page") {
305
+ return "fe::PageVariantManagement";
306
+ }
307
+ if (oViewData && oViewData.variantManagement === "Control") {
308
+ return generate([oConverterContext.filterBarId, "VariantManagement"]);
309
+ }
310
+ return undefined;
311
+ },
312
+ getDefaultPath: function (aViews: any) {
313
+ for (let i = 0; i < aViews.length; i++) {
314
+ if (aViews[i].defaultPath) {
315
+ return aViews[i].defaultPath;
316
+ }
317
+ }
318
+ }
319
+ };
320
+
321
+ export default AnnotationHelper;