@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,431 @@
1
+ import ManagedObject from "sap/ui/base/ManagedObject";
2
+ import XMLPreprocessor from "sap/ui/core/util/XMLPreprocessor";
3
+ //Trace information
4
+ const aTraceInfo: any[] = [
5
+ /* Structure for a macro
6
+ {
7
+ macro: '', //name of macro
8
+ metaDataContexts: [ //Properties of type sap.ui.model.Context
9
+ {
10
+ name: '', //context property name / key
11
+ path: '', //from oContext.getPath()
12
+ }
13
+ ],
14
+ properties: { // Other properties which become part of {this>}
15
+ property1: value,
16
+ property2: value
17
+ }
18
+ viewInfo: {
19
+ viewInfo: {} // As specified in view or fragement creation
20
+ },
21
+ traceID: this.index, //ID for this trace information,
22
+ macroInfo: {
23
+ macroID: index, // traceID of this macro (redundant for macros)
24
+ parentMacroID, index // traceID of the parent macro (if it has a parent)
25
+ }
26
+ }
27
+ // Structure for a control
28
+ {
29
+ control: '', //control class
30
+ properties: { // Other properties which become part of {this>}
31
+ property1: {
32
+ originalValue: '', //Value before templating
33
+ resolvedValue: '' //Value after templating
34
+ }
35
+ }
36
+ contexts: { //Models and Contexts used during templating
37
+ // Model or context name used for this control
38
+ modelName1: { // For ODataMetaModel
39
+ path1: {
40
+ path: '', //absolut path within metamodel
41
+ data: '', //data of path unless type Object
42
+ }
43
+ modelName2: {
44
+ // for other model types
45
+ {
46
+ property1: value,
47
+ property2: value
48
+ }
49
+ // In case binding cannot be resolved -> mark as runtime binding
50
+ // This is not always true, e.g. in case the path is metamodelpath
51
+ {
52
+ "bindingFor": "Runtime"
53
+ }
54
+ }
55
+ },
56
+ viewInfo: {
57
+ viewInfo: {} // As specified in view or fragement creation
58
+ },
59
+ macroInfo: {
60
+ macroID: index, // traceID of the macro that created this control
61
+ parentMacroID, index // traceID of the macro's parent macro
62
+ },
63
+ traceID: this.index //ID for this trace information
64
+ }
65
+ */
66
+ ];
67
+ const traceNamespace = "http://schemas.sap.com/sapui5/extension/sap.fe.info/1",
68
+ xmlns = "http://www.w3.org/2000/xmlns/",
69
+ /**
70
+ * Switch is currently based on url parameter
71
+ */
72
+ traceIsOn = location.search.indexOf("sap-ui-xx-feTraceInfo=true") > -1,
73
+ /**
74
+ * Specify all namespaces that shall be traced during templating
75
+ */
76
+ aNamespaces = [
77
+ "sap.m",
78
+ "sap.uxap",
79
+ "sap.ui.unified",
80
+ "sap.f",
81
+ "sap.ui.table",
82
+ "sap.suite.ui.microchart",
83
+ "sap.ui.layout.form",
84
+ "sap.ui.mdc",
85
+ "sap.ui.mdc.link",
86
+ "sap.ui.mdc.field",
87
+ "sap.fe.fpm"
88
+ ],
89
+ oCallbacks: any = {};
90
+
91
+ function fnClone(oObject: any) {
92
+ return JSON.parse(JSON.stringify(oObject));
93
+ }
94
+ function collectContextInfo(sValue: any, oContexts: any, oVisitor: any, oNode: any) {
95
+ let aContexts;
96
+ const aPromises: any[] = [];
97
+ try {
98
+ aContexts = (ManagedObject as any).bindingParser(sValue, undefined, false, true) || [];
99
+ } catch (e) {
100
+ aContexts = [];
101
+ }
102
+ aContexts = Array.isArray(aContexts) ? aContexts : [aContexts];
103
+ aContexts
104
+ .filter(function (oContext: any) {
105
+ return oContext.path || oContext.parts;
106
+ })
107
+ .forEach(function (oContext: any) {
108
+ const aParts = oContext.parts || [oContext];
109
+ aParts
110
+ .filter(function (oContext: any) {
111
+ return oContext.path;
112
+ })
113
+ .forEach(function (oContext: any) {
114
+ const oModel = (oContexts[oContext.model] = oContexts[oContext.model] || {});
115
+ const sSimplePath =
116
+ oContext.path.indexOf(">") < 0 ? (oContext.model && oContext.model + ">") + oContext.path : oContext.path;
117
+ let oRealContext: any;
118
+ let aParts;
119
+
120
+ if (typeof oContext.model === "undefined" && sSimplePath.indexOf(">") > -1) {
121
+ aParts = sSimplePath.split(">");
122
+ oContext.model = aParts[0];
123
+ oContext.path = aParts[1];
124
+ }
125
+ try {
126
+ oRealContext = oVisitor.getContext(sSimplePath);
127
+ aPromises.push(
128
+ oVisitor
129
+ .getResult("{" + sSimplePath + "}", oNode)
130
+ .then(function (oResult: any) {
131
+ if (oRealContext.getModel().getMetadata().getName() === "sap.ui.model.json.JSONModel") {
132
+ if (!oResult.oModel) {
133
+ oModel[oContext.path] = oResult; //oRealContext.getObject(oContext.path);
134
+ } else {
135
+ oModel[oContext.path] = "Context from " + oResult.getPath();
136
+ }
137
+ } else {
138
+ oModel[oContext.path] = {
139
+ path: oRealContext.getPath(),
140
+ data: typeof oResult === "object" ? "[ctrl/cmd-click] on path to see data" : oResult
141
+ };
142
+ }
143
+ })
144
+ .catch(function () {
145
+ oModel[oContext.path] = {
146
+ bindingFor: "Runtime"
147
+ };
148
+ })
149
+ );
150
+ } catch (exc) {
151
+ oModel[oContext.path] = {
152
+ bindingFor: "Runtime"
153
+ };
154
+ }
155
+ });
156
+ });
157
+ return Promise.all(aPromises);
158
+ }
159
+ function fillAttributes(oResults: any, oAttributes: any, sName: any, sValue: any) {
160
+ return oResults
161
+ .then(function (result: any) {
162
+ oAttributes[sName] =
163
+ sValue !== result
164
+ ? {
165
+ originalValue: sValue,
166
+ resolvedValue: result
167
+ }
168
+ : sValue;
169
+ })
170
+ .catch(function (e: any) {
171
+ oAttributes[sName] = {
172
+ originalValue: sValue,
173
+ error: (e.stack && e.stack.toString()) || e
174
+ };
175
+ });
176
+ }
177
+ function collectInfo(oNode: any, oVisitor: any) {
178
+ const oAttributes = {};
179
+ const aPromises = [];
180
+ const oContexts = {};
181
+ let oResults;
182
+ for (let i = oNode.attributes.length >>> 0; i--; ) {
183
+ const oAttribute = oNode.attributes[i],
184
+ sName = oAttribute.nodeName,
185
+ sValue = oNode.getAttribute(sName);
186
+ if (!["core:require"].includes(sName)) {
187
+ aPromises.push(collectContextInfo(sValue, oContexts, oVisitor, oNode));
188
+ oResults = oVisitor.getResult(sValue, oNode);
189
+ if (oResults) {
190
+ aPromises.push(fillAttributes(oResults, oAttributes, sName, sValue));
191
+ } else {
192
+ //What
193
+ }
194
+ }
195
+ }
196
+ return Promise.all(aPromises).then(function () {
197
+ return { properties: oAttributes, contexts: oContexts };
198
+ });
199
+ }
200
+ function resolve(oNode: any, oVisitor: any) {
201
+ const sControlName = oNode.nodeName.split(":")[1] || oNode.nodeName,
202
+ bIsControl = /^[A-Z]/.test(sControlName),
203
+ oTraceMetadataContext: any = {
204
+ control: oNode.namespaceURI + "." + (oNode.nodeName.split(":")[1] || oNode.nodeName)
205
+ };
206
+
207
+ if (bIsControl) {
208
+ if (!oNode.ownerDocument.firstChild.getAttribute("xmlns:trace")) {
209
+ oNode.ownerDocument.firstChild.setAttributeNS(xmlns, "xmlns:trace", traceNamespace);
210
+ oNode.ownerDocument.firstChild.setAttributeNS(traceNamespace, "trace:is", "on");
211
+ }
212
+ return collectInfo(oNode, oVisitor)
213
+ .then(function (result: { properties: {}; contexts: {} }) {
214
+ const bRelevant = Object.keys(result.contexts).length > 0; //If no context was used it is not relevant so we ignore Object.keys(result.properties).length
215
+ if (bRelevant) {
216
+ Object.assign(oTraceMetadataContext, result);
217
+ oTraceMetadataContext.viewInfo = oVisitor.getViewInfo();
218
+ oTraceMetadataContext.macroInfo = oVisitor.getSettings()["_macroInfo"];
219
+ oTraceMetadataContext.traceID = aTraceInfo.length;
220
+ oNode.setAttributeNS(traceNamespace, "trace:traceID", oTraceMetadataContext.traceID);
221
+ aTraceInfo.push(oTraceMetadataContext);
222
+ }
223
+ return oVisitor.visitAttributes(oNode).then(function () {
224
+ return oVisitor.visitChildNodes(oNode);
225
+ });
226
+ })
227
+ .catch(function (exc: any) {
228
+ oTraceMetadataContext.error = {
229
+ exception: exc,
230
+ node: new XMLSerializer().serializeToString(oNode)
231
+ };
232
+ });
233
+ } else {
234
+ return oVisitor.visitAttributes(oNode).then(function () {
235
+ return oVisitor.visitChildNodes(oNode);
236
+ });
237
+ }
238
+ }
239
+ /**
240
+ * Register path-through XMLPreprocessor plugin for all namespaces
241
+ * given above in aNamespaces
242
+ */
243
+ if (traceIsOn) {
244
+ aNamespaces.forEach(function (namespace: string) {
245
+ oCallbacks[namespace] = XMLPreprocessor.plugIn(resolve.bind(namespace), namespace);
246
+ });
247
+ }
248
+ /**
249
+ * Adds information about the processing of one macro to the collection.
250
+ *
251
+ * @name sap.fe.macros.TraceInfo.traceMacroCalls
252
+ * @param {string} sName Macro class name
253
+ * @param {object} oMetadata Definition from (macro).metadata.js
254
+ * @param {object} mContexts Available named contexts
255
+ * @param {XMLNode} oNode
256
+ * @param {object} oVisitor
257
+ * @returns {object}
258
+ * @private
259
+ * @ui5-restricted
260
+ * @static
261
+ */
262
+ function traceMacroCalls(sName: string, oMetadata: any, mContexts: any, oNode: any, oVisitor: any) {
263
+ let aMetadataContextKeys = (oMetadata.metadataContexts && Object.keys(oMetadata.metadataContexts)) || [];
264
+ const aProperties = (oMetadata.properties && Object.keys(oMetadata.properties)) || [];
265
+ const macroInfo = fnClone(oVisitor.getSettings()["_macroInfo"] || {});
266
+ const oTraceMetadataContext: any = {
267
+ macro: sName,
268
+ metaDataContexts: [] as any[],
269
+ properties: {}
270
+ };
271
+
272
+ if (aMetadataContextKeys.length === 0) {
273
+ //In case the macro has not metadata.js we take all metadataContexts except this
274
+ aMetadataContextKeys = Object.keys(mContexts).filter(function (name: string) {
275
+ return name !== "this";
276
+ });
277
+ }
278
+
279
+ if (!oNode.getAttribute("xmlns:trace")) {
280
+ oNode.setAttributeNS(xmlns, "xmlns:trace", traceNamespace);
281
+ }
282
+
283
+ if (aMetadataContextKeys.length > 0) {
284
+ aMetadataContextKeys.forEach(function (sKey: any) {
285
+ const oContext = mContexts[sKey],
286
+ oMetaDataContext: any = oContext && {
287
+ name: sKey,
288
+ path: oContext.getPath()
289
+ //data: JSON.stringify(oContext.getObject(),null,2)
290
+ };
291
+
292
+ if (oMetaDataContext) {
293
+ oTraceMetadataContext.metaDataContexts.push(oMetaDataContext);
294
+ }
295
+ });
296
+
297
+ aProperties.forEach(function (sKey: any) {
298
+ const //oPropertySettings = oMetadata.properties[sKey],
299
+ oProperty = mContexts.this.getObject(sKey);
300
+ // (oNode.hasAttribute(sKey) && oNode.getAttribute(sKey)) ||
301
+ // (oPropertySettings.hasOwnProperty("defaultValue") && oPropertySettings.define) ||
302
+ // false;
303
+
304
+ if (oProperty) {
305
+ oTraceMetadataContext.properties[sKey] = oProperty;
306
+ }
307
+ });
308
+ oTraceMetadataContext.viewInfo = oVisitor.getViewInfo();
309
+ oTraceMetadataContext.traceID = aTraceInfo.length;
310
+ macroInfo.parentMacroID = macroInfo.macroID;
311
+ macroInfo.macroID = oTraceMetadataContext.traceID;
312
+ oTraceMetadataContext.macroInfo = macroInfo;
313
+ oNode.setAttributeNS(traceNamespace, "trace:macroID", oTraceMetadataContext.traceID);
314
+ aTraceInfo.push(oTraceMetadataContext);
315
+ return oTraceMetadataContext;
316
+ }
317
+ }
318
+ /**
319
+ * Returns the globally stored trace information for the macro or
320
+ * control marked with the given id.
321
+ *
322
+ * Returns all trace information if no id is specified
323
+ *
324
+ *
325
+ <pre>Structure for a macro
326
+ {
327
+ macro: '', //name of macro
328
+ metaDataContexts: [ //Properties of type sap.ui.model.Context
329
+ {
330
+ name: '', //context property name / key
331
+ path: '', //from oContext.getPath()
332
+ }
333
+ ],
334
+ properties: { // Other properties which become part of {this>}
335
+ property1: value,
336
+ property2: value
337
+ }
338
+ viewInfo: {
339
+ viewInfo: {} // As specified in view or fragement creation
340
+ },
341
+ traceID: this.index, //ID for this trace information,
342
+ macroInfo: {
343
+ macroID: index, // traceID of this macro (redundant for macros)
344
+ parentMacroID, index // traceID of the parent macro (if it has a parent)
345
+ }
346
+ }
347
+ Structure for a control
348
+ {
349
+ control: '', //control class
350
+ properties: { // Other properties which become part of {this>}
351
+ property1: {
352
+ originalValue: '', //Value before templating
353
+ resolvedValue: '' //Value after templating
354
+ }
355
+ }
356
+ contexts: { //Models and Contexts used during templating
357
+ // Model or context name used for this control
358
+ modelName1: { // For ODataMetaModel
359
+ path1: {
360
+ path: '', //absolut path within metamodel
361
+ data: '', //data of path unless type Object
362
+ }
363
+ modelName2: {
364
+ // for other model types
365
+ {
366
+ property1: value,
367
+ property2: value
368
+ }
369
+ // In case binding cannot be resolved -> mark as runtime binding
370
+ // This is not always true, e.g. in case the path is metamodelpath
371
+ {
372
+ "bindingFor": "Runtime"
373
+ }
374
+ }
375
+ },
376
+ viewInfo: {
377
+ viewInfo: {} // As specified in view or fragement creation
378
+ },
379
+ macroInfo: {
380
+ macroID: index, // traceID of the macro that created this control
381
+ parentMacroID, index // traceID of the macro's parent macro
382
+ },
383
+ traceID: this.index //ID for this trace information
384
+ }</pre>.
385
+ *
386
+ * @function
387
+ * @name sap.fe.macros.TraceInfo.getTraceInfo
388
+ * @param {number} id TraceInfo id
389
+ * @returns {object|Array} Object / Array for TraceInfo
390
+ * @private
391
+ * @static
392
+ */
393
+ function getTraceInfo(id: number) {
394
+ if (id) {
395
+ return aTraceInfo[id];
396
+ }
397
+ const aErrors = aTraceInfo.filter(function (traceInfo: any) {
398
+ return traceInfo.error;
399
+ });
400
+ return (aErrors.length > 0 && aErrors) || aTraceInfo;
401
+ }
402
+ /**
403
+ * Returns true if TraceInfo is active.
404
+ *
405
+ * @function
406
+ * @name sap.fe.macros.TraceInfo.isTraceInfoActive
407
+ * @returns {boolean} `true` when active
408
+ * @private
409
+ * @static
410
+ */
411
+ function isTraceInfoActive() {
412
+ return traceIsOn;
413
+ }
414
+ /**
415
+ * @typedef sap.fe.macros.TraceInfo
416
+ * TraceInfo for SAP Fiori elements
417
+ *
418
+ * Once traces is switched, information about macros and controls
419
+ * that are processed during xml preprocessing ( @see {@link sap.ui.core.util.XMLPreprocessor})
420
+ * will be collected within this singleton
421
+ * @namespace
422
+ * @private
423
+ * @global
424
+ * @experimental This module is only for experimental use! <br/><b>This is only a POC and maybe deleted</b>
425
+ * @since 1.74.0
426
+ */
427
+ export default {
428
+ isTraceInfoActive: isTraceInfoActive,
429
+ traceMacroCalls: traceMacroCalls,
430
+ getTraceInfo: getTraceInfo
431
+ };