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