@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
@@ -1,10 +1,4 @@
1
- import {
2
- AvailabilityType,
3
- FilterFieldManifestConfiguration,
4
- FilterManifestConfiguration,
5
- FilterSettings,
6
- TemplateType
7
- } from "../../ManifestSettings";
1
+ import { AvailabilityType, FilterFieldManifestConfiguration, FilterManifestConfiguration, FilterSettings } from "../../ManifestSettings";
8
2
  import { EntityType, NavigationProperty, Property } from "@sap-ux/annotation-converter";
9
3
  import ConverterContext from "sap/fe/core/converters/ConverterContext";
10
4
  import { AnnotationTerm, DataFieldAbstractTypes, DataFieldTypes, ReferenceFacetTypes, UIAnnotationTerms } from "@sap-ux/vocabularies-types";
@@ -12,8 +6,10 @@ import {
12
6
  getSelectionVariantConfiguration,
13
7
  SelectionVariantConfiguration,
14
8
  TableVisualization,
15
- isFilteringCaseSensitive
9
+ isFilteringCaseSensitive,
10
+ getTypeConfig
16
11
  } from "sap/fe/core/converters/controls/Common/Table";
12
+ import { ChartVisualization } from "sap/fe/core/converters/controls/Common/Chart";
17
13
  import { ConfigurableObject, CustomElement, insertCustomElements, Placement } from "sap/fe/core/converters/helpers/ConfigurableObject";
18
14
  import { getVisualFilters, VisualFilters } from "sap/fe/core/converters/controls/ListReport/VisualFilters";
19
15
  import { SelectOptionType, FieldGroupType, FieldGroup } from "@sap-ux/vocabularies-types/dist/generated/UI";
@@ -22,8 +18,10 @@ import { getSelectionVariant } from "../Common/DataVisualization";
22
18
  import { KeyHelper } from "sap/fe/core/converters/helpers/Key";
23
19
  import { IssueType, IssueSeverity, IssueCategory } from "sap/fe/core/converters/helpers/IssueManager";
24
20
  import { PropertyPath } from "@sap-ux/vocabularies-types/dist/Edm";
21
+ //import { hasValueHelp } from "sap/fe/core/templating/PropertyHelper";
25
22
 
26
23
  export type FilterField = ConfigurableObject & {
24
+ type?: string;
27
25
  conditionPath: string;
28
26
  availability: AvailabilityType;
29
27
  annotationPath: string;
@@ -42,13 +40,21 @@ type FilterGroup = {
42
40
  groupLabel?: string;
43
41
  };
44
42
 
43
+ enum filterFieldType {
44
+ Default = "Default",
45
+ Slot = "Slot"
46
+ }
47
+
48
+ const sEdmString = "Edm.String";
49
+ const sStringDataType = "sap.ui.model.odata.type.String";
50
+
45
51
  export type CustomElementFilterField = CustomElement<FilterField>;
46
52
 
47
53
  /**
48
54
  * Enter all DataFields of a given FieldGroup into the filterFacetMap.
49
55
  *
50
56
  * @param {AnnotationTerm<FieldGroupType>} fieldGroup
51
- * @returns {Record<string, FilterGroup>} The map of facets for the given fieldGroup
57
+ * @returns {Record<string, FilterGroup>} The map of facets for the given FieldGroup
52
58
  */
53
59
  function getFieldGroupFilterGroups(fieldGroup: AnnotationTerm<FieldGroupType>): Record<string, FilterGroup> {
54
60
  const filterFacetMap: Record<string, FilterGroup> = {};
@@ -76,8 +82,8 @@ function getExcludedFilterProperties(selectionVariants: SelectionVariantConfigur
76
82
  }
77
83
 
78
84
  /**
79
- * Check that all the tables for a dedicated entityset are configured as analytical table.
80
- * @param {TableVisualization[]} listReportTables List Report tables
85
+ * Check that all the tables for a dedicated entity set are configured as analytical table.
86
+ * @param {TableVisualization[]} listReportTables List report tables
81
87
  * @param {string} contextPath
82
88
  * @returns {boolean} Is FilterBar search field hidden or not
83
89
  */
@@ -119,10 +125,10 @@ function getSelectionVariants(
119
125
  }
120
126
 
121
127
  /**
122
- * Returns the condition path required for the condition model. It looks like follow:
128
+ * Returns the condition path required for the condition model. It looks as follows:
123
129
  * <1:N-PropertyName>*\/<1:1-PropertyName>/<PropertyName>.
124
130
  *
125
- * @param entityType The root EntityTy[e
131
+ * @param entityType The root EntityType
126
132
  * @param propertyPath The full path to the target property
127
133
  * @returns {string} The formatted condition path
128
134
  */
@@ -172,6 +178,70 @@ const _createFilterSelectionField = function(
172
178
  return undefined;
173
179
  };
174
180
 
181
+ export function getModelType(sType: any) {
182
+ type defaultModelType = {
183
+ [key: string]: {
184
+ [key: string]: string;
185
+ };
186
+ };
187
+ const mDefaultTypeForEdmType: defaultModelType = {
188
+ "Edm.Boolean": {
189
+ modelType: "Bool"
190
+ },
191
+ "Edm.Byte": {
192
+ modelType: "Int"
193
+ },
194
+ "Edm.Date": {
195
+ modelType: "Date"
196
+ },
197
+ "Edm.DateTime": {
198
+ modelType: "Date"
199
+ },
200
+ "Edm.DateTimeOffset": {
201
+ modelType: "DateTimeOffset"
202
+ },
203
+ "Edm.Decimal": {
204
+ modelType: "Decimal"
205
+ },
206
+ "Edm.Double": {
207
+ modelType: "Float"
208
+ },
209
+ "Edm.Float": {
210
+ modelType: "Float"
211
+ },
212
+ "Edm.Guid": {
213
+ modelType: "Guid"
214
+ },
215
+ "Edm.Int16": {
216
+ modelType: "Int"
217
+ },
218
+ "Edm.Int32": {
219
+ modelType: "Int"
220
+ },
221
+ "Edm.Int64": {
222
+ modelType: "Int"
223
+ },
224
+ "Edm.SByte": {
225
+ modelType: "Int"
226
+ },
227
+ "Edm.Single": {
228
+ modelType: "Float"
229
+ },
230
+ "Edm.String": {
231
+ modelType: "String"
232
+ },
233
+ "Edm.Time": {
234
+ modelType: "TimeOfDay"
235
+ },
236
+ "Edm.TimeOfDay": {
237
+ modelType: "TimeOfDay"
238
+ },
239
+ "Edm.Stream": {
240
+ //no corresponding modelType - ignore for filtering
241
+ }
242
+ };
243
+ return sType && sType in mDefaultTypeForEdmType && mDefaultTypeForEdmType[sType].modelType;
244
+ }
175
245
  const _getSelectionFields = function(
176
246
  entityType: EntityType,
177
247
  navigationPath: string,
@@ -217,7 +287,7 @@ const _getSelectionFieldsByPath = function(
217
287
  includeHidden,
218
288
  converterContext
219
289
  );
220
- } else if (property.targetType !== undefined) {
290
+ } else if (property.targetType !== undefined && property.targetType._type === "ComplexType") {
221
291
  // handle ComplexType properties
222
292
  localSelectionFields = _getSelectionFields(
223
293
  entityType,
@@ -258,7 +328,7 @@ const _getFilterField = function(
258
328
  filterField = _createFilterSelectionField(entityType, entityType.resolvePath(propertyPath), propertyPath, true, converterContext);
259
329
  }
260
330
  if (!filterField) {
261
- converterContext.getDiagnostics().addIssue(IssueCategory.Annotation, IssueSeverity.High, IssueType.MISSING_SELECTIONFIELD);
331
+ converterContext.getDiagnostics()?.addIssue(IssueCategory.Annotation, IssueSeverity.High, IssueType.MISSING_SELECTIONFIELD);
262
332
  }
263
333
  // defined SelectionFields are available by default
264
334
  if (filterField) {
@@ -318,7 +388,7 @@ const _getDefaultFilterFields = function(
318
388
  };
319
389
 
320
390
  /**
321
- * Get all Parameter filterFields in case of a parameterized service.
391
+ * Get all parameter filter fields in case of a parameterized service.
322
392
  * @param {ConverterContext} converterContext
323
393
  * @returns {FilterField[]} An array of parameter filterfields
324
394
  */
@@ -342,20 +412,28 @@ function _getParameterFields(converterContext: ConverterContext): FilterField[]
342
412
  * Determines if the FilterBar search field is hidden or not.
343
413
  *
344
414
  * @param {TableVisualization[]} listReportTables The list report tables
415
+ * @param {ChartVisualization[]} charts The ALP charts
345
416
  * @param {ConverterContext} converterContext The converter context
346
417
  * @returns {boolean} The information if the FilterBar search field is hidden or not
347
418
  */
348
- export const getFilterBarhideBasicSearch = function(listReportTables: TableVisualization[], converterContext: ConverterContext): boolean {
349
- if (
350
- converterContext.getManifestWrapper().hasMultipleVisualizations() ||
351
- converterContext.getTemplateType() === TemplateType.AnalyticalListPage
352
- ) {
419
+ export const getFilterBarhideBasicSearch = function(
420
+ listReportTables: TableVisualization[],
421
+ charts: ChartVisualization[],
422
+ converterContext: ConverterContext
423
+ ): boolean {
424
+ // Check if charts allow search
425
+ const noSearchInCharts = charts.length === 0 || charts.every(chart => !chart.applySupported.enableSearch);
426
+
427
+ // Check if all tables are analytical and none of them allow for search
428
+ const noSearchInTables =
429
+ listReportTables.length === 0 || listReportTables.every(table => table.enableAnalytics && !table.enableAnalyticsSearch);
430
+
431
+ const contextPath = converterContext.getContextPath();
432
+ if (contextPath && noSearchInCharts && noSearchInTables) {
353
433
  return true;
434
+ } else {
435
+ return false;
354
436
  }
355
- // Tries to find a non-analytical table with the main entity set (page entity set) as collection
356
- // if at least one table matches these conditions, basic search field must be displayed.
357
- const sContextPath = converterContext.getContextPath();
358
- return checkAllTableForEntitySetAreAnalytical(listReportTables, sContextPath);
359
437
  };
360
438
 
361
439
  /**
@@ -383,9 +461,14 @@ export const getManifestFilterFields = function(
383
461
  const filterField = definedFilterFields[sKey];
384
462
  const propertyName = KeyHelper.getPathFromSelectionFieldKey(sKey);
385
463
  const selectionField = selectionFields[propertyName];
386
- const visualFilter = getVisualFilters(entityType, converterContext, sKey, definedFilterFields);
464
+ const type = filterField.type === "Slot" ? filterFieldType.Slot : filterFieldType.Default;
465
+ const visualFilter =
466
+ filterField && filterField?.visualFilter
467
+ ? getVisualFilters(entityType, converterContext, sKey, definedFilterFields)
468
+ : undefined;
387
469
  filterFields[sKey] = {
388
470
  key: sKey,
471
+ type: type,
389
472
  annotationPath: selectionField?.annotationPath,
390
473
  conditionPath: selectionField?.conditionPath || propertyName,
391
474
  template: filterField.template,
@@ -403,10 +486,326 @@ export const getFilterField = function(propertyPath: string, converterContext: C
403
486
  return _getFilterField({}, propertyPath, converterContext, entityType);
404
487
  };
405
488
 
489
+ export const getFilterRestrictions = function(oFilterRestrictionsAnnotation: any, sRestriction: any) {
490
+ if (sRestriction === "RequiredProperties" || sRestriction === "NonFilterableProperties") {
491
+ let aProps = [];
492
+ if (oFilterRestrictionsAnnotation && oFilterRestrictionsAnnotation[sRestriction]) {
493
+ aProps = oFilterRestrictionsAnnotation[sRestriction].map(function(oProperty: any) {
494
+ return oProperty.$PropertyPath || oProperty.value;
495
+ });
496
+ }
497
+ return aProps;
498
+ } else if (sRestriction === "FilterAllowedExpressions") {
499
+ const mAllowedExpressions = {} as any;
500
+ if (oFilterRestrictionsAnnotation && oFilterRestrictionsAnnotation.FilterExpressionRestrictions) {
501
+ oFilterRestrictionsAnnotation.FilterExpressionRestrictions.forEach(function(oProperty: any) {
502
+ //SingleValue | MultiValue | SingleRange | MultiRange | SearchExpression | MultiRangeOrSearchExpression
503
+ if (mAllowedExpressions[oProperty.Property.value]) {
504
+ mAllowedExpressions[oProperty.Property.value].push(oProperty.AllowedExpressions);
505
+ } else {
506
+ mAllowedExpressions[oProperty.Property.value] = [oProperty.AllowedExpressions];
507
+ }
508
+ });
509
+ }
510
+ return mAllowedExpressions;
511
+ }
512
+ return oFilterRestrictionsAnnotation;
513
+ };
514
+
515
+ const getSearchFilterPropertyInfo = function() {
516
+ return {
517
+ name: "$search",
518
+ path: "$search",
519
+ dataType: sStringDataType,
520
+ maxConditions: 1
521
+ };
522
+ };
523
+
524
+ const getEditStateFilterPropertyInfo = function() {
525
+ return {
526
+ name: "$editState",
527
+ path: "$editState",
528
+ groupLabel: "",
529
+ group: "",
530
+ dataType: sStringDataType,
531
+ hiddenFilter: false
532
+ };
533
+ };
534
+
535
+ const getSearchRestrictions = function(converterContext: ConverterContext) {
536
+ return converterContext.getEntitySet()?.annotations?.Capabilities?.SearchRestrictions;
537
+ };
538
+
539
+ export const getNavigationRestrictions = function(converterContext: ConverterContext, sNavigationPath: string) {
540
+ const oNavigationRestrictions: any = converterContext.getEntitySet()?.annotations?.Capabilities?.NavigationRestrictions;
541
+ const aRestrictedProperties = oNavigationRestrictions && oNavigationRestrictions.RestrictedProperties;
542
+ return (
543
+ aRestrictedProperties &&
544
+ aRestrictedProperties.find(function(oRestrictedProperty: any) {
545
+ return (
546
+ oRestrictedProperty &&
547
+ oRestrictedProperty.NavigationProperty &&
548
+ (oRestrictedProperty.NavigationProperty.$NavigationPropertyPath === sNavigationPath ||
549
+ oRestrictedProperty.NavigationProperty.value === sNavigationPath)
550
+ );
551
+ })
552
+ );
553
+ };
554
+
555
+ const _fetchBasicPropertyInfo = function(oFilterFieldInfo: any) {
556
+ return {
557
+ key: oFilterFieldInfo.key,
558
+ annotationPath: oFilterFieldInfo.annotationPath,
559
+ conditionPath: oFilterFieldInfo.conditionPath,
560
+ name: oFilterFieldInfo.conditionPath,
561
+ label: oFilterFieldInfo.label,
562
+ hiddenFilter: oFilterFieldInfo.availability === "Hidden",
563
+ display: "Value",
564
+ isParameter: oFilterFieldInfo.isParameter,
565
+ caseSensitive: oFilterFieldInfo.caseSensitive,
566
+ availability: oFilterFieldInfo.availability,
567
+ position: oFilterFieldInfo.position,
568
+ type: oFilterFieldInfo.type,
569
+ template: oFilterFieldInfo.template,
570
+ menu: oFilterFieldInfo.menu
571
+ };
572
+ };
573
+
574
+ export const getSpecificAllowedExpression = function(aExpressions: any) {
575
+ const aAllowedExpressionsPriority = [
576
+ "SingleValue",
577
+ "MultiValue",
578
+ "SingleRange",
579
+ "MultiRange",
580
+ "SearchExpression",
581
+ "MultiRangeOrSearchExpression"
582
+ ];
583
+
584
+ aExpressions.sort(function(a: any, b: any) {
585
+ return aAllowedExpressionsPriority.indexOf(a) - aAllowedExpressionsPriority.indexOf(b);
586
+ });
587
+
588
+ return aExpressions[0];
589
+ };
590
+
591
+ export const displayMode = function(oPropertyAnnotations: any, oCollectionAnnotations: any) {
592
+ const oTextAnnotation = oPropertyAnnotations?.Common?.Text,
593
+ oTextArrangmentAnnotation =
594
+ oTextAnnotation &&
595
+ ((oPropertyAnnotations && oPropertyAnnotations?.Common?.Text?.annotations?.UI?.TextArrangement) ||
596
+ (oCollectionAnnotations && oCollectionAnnotations?.UI?.TextArrangement));
597
+
598
+ if (oTextArrangmentAnnotation) {
599
+ if (oTextArrangmentAnnotation.valueOf() === "UI.TextArrangementType/TextOnly") {
600
+ return "Description";
601
+ } else if (oTextArrangmentAnnotation.valueOf() === "UI.TextArrangementType/TextLast") {
602
+ return "ValueDescription";
603
+ }
604
+ return "DescriptionValue"; //TextFirst
605
+ }
606
+ return oTextAnnotation ? "DescriptionValue" : "Value";
607
+ };
608
+
609
+ const _fetchPropertyInfo = function(converterContext: ConverterContext, oFilterFieldInfo: any, oTypeConfig: any) {
610
+ let oPropertyInfo = _fetchBasicPropertyInfo(oFilterFieldInfo);
611
+ const sAnnotationPath = oFilterFieldInfo.annotationPath;
612
+
613
+ if (!sAnnotationPath) {
614
+ return oPropertyInfo;
615
+ }
616
+ const targetPropertyObject = converterContext.getConverterContextFor(sAnnotationPath).getDataModelObjectPath().targetObject;
617
+
618
+ const oPropertyAnnotations = targetPropertyObject?.annotations;
619
+ const oCollectionAnnotations = converterContext?.getDataModelObjectPath().targetObject?.annotations;
620
+
621
+ const oFormatOptions = oTypeConfig.formatOptions;
622
+ const oConstraints = oTypeConfig.constraints;
623
+ oPropertyInfo = Object.assign(oPropertyInfo, {
624
+ formatOptions: oFormatOptions,
625
+ constraints: oConstraints,
626
+ display: displayMode(oPropertyAnnotations, oCollectionAnnotations)
627
+ });
628
+ return oPropertyInfo;
629
+ };
630
+
631
+ export const isMultiValue = function(oProperty: any) {
632
+ let bIsMultiValue = true;
633
+ //SingleValue | MultiValue | SingleRange | MultiRange | SearchExpression | MultiRangeOrSearchExpression
634
+ switch (oProperty.filterExpression) {
635
+ case "SearchExpression":
636
+ case "SingleRange":
637
+ case "SingleValue":
638
+ bIsMultiValue = false;
639
+ break;
640
+ default:
641
+ break;
642
+ }
643
+ if (oProperty.type && oProperty.type.indexOf("Boolean") > 0) {
644
+ bIsMultiValue = false;
645
+ }
646
+ return bIsMultiValue;
647
+ };
648
+
649
+ const getAnnotatedSelectionFieldData = function(
650
+ converterContext: ConverterContext,
651
+ lrTables: TableVisualization[] = [],
652
+ annotationPath: string = ""
653
+ ) {
654
+ // Fetch all selectionVariants defined in the different visualizations and different views (multi table mode)
655
+ const selectionVariants: SelectionVariantConfiguration[] = getSelectionVariants(lrTables, converterContext);
656
+
657
+ // create a map of properties to be used in selection variants
658
+ const excludedFilterProperties: Record<string, boolean> = getExcludedFilterProperties(selectionVariants);
659
+ const entityType = converterContext.getEntityType();
660
+ //Filters which has to be added which is part of SV/Default annotations but not present in the SelectionFields
661
+ const annotatedSelectionFields = ((annotationPath && converterContext.getEntityTypeAnnotation(annotationPath)?.annotation) ||
662
+ entityType.annotations?.UI?.SelectionFields ||
663
+ []) as PropertyPath[];
664
+
665
+ // create a map of all potential filter fields based on...
666
+ const filterFields: Record<string, FilterField> = {
667
+ // ...non hidden properties of the entity
668
+ ..._getSelectionFields(entityType, "", entityType.entityProperties, false, converterContext),
669
+ // ...additional manifest defined navigation properties
670
+ ..._getSelectionFieldsByPath(
671
+ entityType,
672
+ converterContext.getManifestWrapper().getFilterConfiguration().navigationProperties,
673
+ false,
674
+ converterContext
675
+ )
676
+ };
677
+
678
+ const propertyInfoFields: any =
679
+ annotatedSelectionFields?.reduce((selectionFields: FilterField[], selectionField) => {
680
+ const propertyPath = selectionField.value;
681
+ if (!(propertyPath in excludedFilterProperties)) {
682
+ const filterField: FilterField | undefined = _getFilterField(filterFields, propertyPath, converterContext, entityType);
683
+ if (filterField) {
684
+ filterField.group = "";
685
+ filterField.groupLabel = "";
686
+ selectionFields.push(filterField);
687
+ }
688
+ }
689
+ return selectionFields;
690
+ }, []) || [];
691
+
692
+ return {
693
+ excludedFilterProperties: excludedFilterProperties,
694
+ entityType: entityType,
695
+ annotatedSelectionFields: annotatedSelectionFields,
696
+ filterFields: filterFields,
697
+ propertyInfoFields: propertyInfoFields
698
+ };
699
+ };
700
+ export const processSelectionFields = function(propertyInfoFields: any, converterContext: ConverterContext) {
701
+ //get TypeConfig function
702
+ const aTypeConfig: any = [];
703
+ const selectionFieldTypes: any = [];
704
+ const _fnTypeConfig = function(property: Property) {
705
+ const oTypeConfig = getTypeConfig(property, undefined);
706
+ selectionFieldTypes.push(property?.type);
707
+ if (property?.type === sEdmString && (!oTypeConfig.constraints.nullable || oTypeConfig.constraints.nullable === true)) {
708
+ oTypeConfig.formatOptions.parseKeepsEmptyString = false;
709
+ }
710
+ aTypeConfig.push(oTypeConfig);
711
+ };
712
+
713
+ //add typeConfig
714
+ propertyInfoFields.forEach(function(parameterField: any) {
715
+ if (parameterField.annotationPath) {
716
+ const propertyConvertyContext = converterContext.getConverterContextFor(parameterField.annotationPath);
717
+ const propertyTargetObject = propertyConvertyContext.getDataModelObjectPath().targetObject;
718
+ _fnTypeConfig(propertyTargetObject);
719
+ } else {
720
+ selectionFieldTypes.push(sEdmString);
721
+ aTypeConfig.push({ type: sStringDataType });
722
+ }
723
+ });
724
+
725
+ // filterRestrictions
726
+ const oFilterRestrictions = converterContext.getEntitySet()?.annotations?.Capabilities?.FilterRestrictions;
727
+ const oRet = {} as any;
728
+ oRet["RequiredProperties"] = getFilterRestrictions(oFilterRestrictions, "RequiredProperties") || [];
729
+ oRet["NonFilterableProperties"] = getFilterRestrictions(oFilterRestrictions, "NonFilterableProperties") || [];
730
+ oRet["FilterAllowedExpressions"] = getFilterRestrictions(oFilterRestrictions, "FilterAllowedExpressions") || {};
731
+
732
+ const sEntitySetPath = converterContext.getContextPath();
733
+ const aPathParts = sEntitySetPath.split("/");
734
+ if (aPathParts.length > 2) {
735
+ const sNavigationPath = aPathParts[aPathParts.length - 1];
736
+ aPathParts.splice(-1, 1);
737
+ const oNavigationRestrictions = getNavigationRestrictions(converterContext, sNavigationPath);
738
+ const oNavigationFilterRestrictions = oNavigationRestrictions && oNavigationRestrictions.FilterRestrictions;
739
+ oRet.RequiredProperties.concat(getFilterRestrictions(oNavigationFilterRestrictions, "RequiredProperties") || []);
740
+ oRet.NonFilterableProperties.concat(getFilterRestrictions(oNavigationFilterRestrictions, "NonFilterableProperties") || []);
741
+ oRet.FilterAllowedExpressions = {
742
+ ...(getFilterRestrictions(oNavigationFilterRestrictions, "FilterAllowedExpressions") || {}),
743
+ ...oRet.FilterAllowedExpressions
744
+ };
745
+ }
746
+ const isCaseSensitive = isFilteringCaseSensitive(converterContext);
747
+ const aRequiredProps = oRet.RequiredProperties;
748
+ const aNonFilterableProps = oRet.NonFilterableProperties;
749
+ let oPropertyInfo;
750
+ const aFetchedProperties: any = [];
751
+
752
+ // process the fields to add necessary properties
753
+ Object.keys(propertyInfoFields).forEach(function(sFilterFieldKey: string) {
754
+ const oConvertedProperty = propertyInfoFields[sFilterFieldKey];
755
+ let sPropertyPath;
756
+ if (oConvertedProperty.conditionPath) {
757
+ sPropertyPath = oConvertedProperty.conditionPath.replace(/\+|\*/g, "");
758
+ }
759
+ if (aNonFilterableProps.indexOf(sPropertyPath) === -1) {
760
+ oPropertyInfo = _fetchPropertyInfo(converterContext, oConvertedProperty, aTypeConfig[sFilterFieldKey]);
761
+ if (oPropertyInfo) {
762
+ oPropertyInfo = Object.assign(oPropertyInfo, {
763
+ maxConditions: !oPropertyInfo.isParameter && isMultiValue(oPropertyInfo) ? -1 : 1,
764
+ required: oPropertyInfo.isParameter || aRequiredProps.indexOf(sPropertyPath) >= 0,
765
+ caseSensitive: isCaseSensitive,
766
+ dataType: selectionFieldTypes[sFilterFieldKey]
767
+ });
768
+
769
+ aFetchedProperties.push(oPropertyInfo);
770
+ }
771
+ }
772
+ });
773
+
774
+ //add edit
775
+ if (converterContext.getDataModelObjectPath().targetObject?.annotations?.Common?.DraftRoot) {
776
+ aFetchedProperties.push(getEditStateFilterPropertyInfo());
777
+ }
778
+ // add search
779
+ const searchRestrictions = getSearchRestrictions(converterContext);
780
+ const hideBasicSearch = Boolean(searchRestrictions && !searchRestrictions.Searchable);
781
+ if (sEntitySetPath && hideBasicSearch !== true) {
782
+ if (!searchRestrictions || searchRestrictions?.Searchable) {
783
+ aFetchedProperties.push(getSearchFilterPropertyInfo());
784
+ }
785
+ }
786
+
787
+ return aFetchedProperties;
788
+ };
789
+
790
+ export const insertCustomManifestElements = function(
791
+ filterFields: FilterField[],
792
+ entityType: EntityType,
793
+ converterContext: ConverterContext
794
+ ) {
795
+ return insertCustomElements(filterFields, getManifestFilterFields(entityType, converterContext), {
796
+ "availability": "overwrite",
797
+ label: "overwrite",
798
+ type: "overwrite",
799
+ position: "overwrite",
800
+ template: "overwrite",
801
+ settings: "overwrite",
802
+ visualFilter: "overwrite"
803
+ });
804
+ };
805
+
406
806
  /**
407
807
  * Retrieve the configuration for the selection fields that will be used within the filter bar
408
808
  * This configuration takes into account annotation and the selection variants.
409
- *
410
809
  * @param {ConverterContext} converterContext
411
810
  * @param {TableVisualization[]} lrTables
412
811
  * @param {string} annotationPath
@@ -416,14 +815,39 @@ export const getSelectionFields = function(
416
815
  converterContext: ConverterContext,
417
816
  lrTables: TableVisualization[] = [],
418
817
  annotationPath: string = ""
419
- ): FilterField[] {
420
- // Fetch all selectionVariants defined in the different visualizations and different views (multi table mode)
421
- const selectionVariants: SelectionVariantConfiguration[] = getSelectionVariants(lrTables, converterContext);
818
+ ): any {
819
+ const oAnnotatedSelectionFieldData = getAnnotatedSelectionFieldData(converterContext, lrTables, annotationPath);
820
+ const parameterFields = _getParameterFields(converterContext);
821
+ let propertyInfoFields: FilterField[] = JSON.parse(JSON.stringify(oAnnotatedSelectionFieldData.propertyInfoFields));
822
+ const entityType = oAnnotatedSelectionFieldData.entityType;
823
+
824
+ propertyInfoFields = parameterFields.concat(propertyInfoFields);
825
+
826
+ propertyInfoFields = insertCustomManifestElements(propertyInfoFields, entityType, converterContext);
827
+
828
+ const aFetchedProperties = processSelectionFields(propertyInfoFields, converterContext);
829
+ aFetchedProperties.sort(function(a: any, b: any) {
830
+ if (a.groupLabel === undefined || a.groupLabel === null) {
831
+ return -1;
832
+ }
833
+ if (b.groupLabel === undefined || b.groupLabel === null) {
834
+ return 1;
835
+ }
836
+ return a.groupLabel.localeCompare(b.groupLabel);
837
+ });
422
838
 
839
+ let sFetchProperties = JSON.stringify(aFetchedProperties);
840
+ sFetchProperties = sFetchProperties.replace(/\{/g, "\\{");
841
+ sFetchProperties = sFetchProperties.replace(/\}/g, "\\}");
842
+ const sPropertyInfo = sFetchProperties;
843
+ // end of propertyFields processing
844
+
845
+ // to populate selection fields
846
+ let propSelectionFields: FilterField[] = JSON.parse(JSON.stringify(oAnnotatedSelectionFieldData.propertyInfoFields));
847
+ propSelectionFields = parameterFields.concat(propSelectionFields);
423
848
  // create a map of properties to be used in selection variants
424
- const excludedFilterProperties: Record<string, boolean> = getExcludedFilterProperties(selectionVariants);
425
- const entityType = converterContext.getEntityType();
426
- const filterFacets = entityType.annotations.UI?.FilterFacets;
849
+ const excludedFilterProperties: Record<string, boolean> = oAnnotatedSelectionFieldData.excludedFilterProperties;
850
+ const filterFacets = entityType?.annotations?.UI?.FilterFacets;
427
851
  let filterFacetMap: Record<string, FilterGroup> = {};
428
852
 
429
853
  const aFieldGroups = converterContext.getAnnotationsByTerm("UI", UIAnnotationTerms.FieldGroup);
@@ -454,22 +878,10 @@ export const getSelectionFields = function(
454
878
  }
455
879
 
456
880
  // create a map of all potential filter fields based on...
457
- const filterFields: Record<string, FilterField> = {
458
- // ...non hidden properties of the entity
459
- ..._getSelectionFields(entityType, "", entityType.entityProperties, false, converterContext),
460
- // ...additional manifest defined navigation properties
461
- ..._getSelectionFieldsByPath(
462
- entityType,
463
- converterContext.getManifestWrapper().getFilterConfiguration().navigationProperties,
464
- false,
465
- converterContext
466
- )
467
- };
881
+ const filterFields: Record<string, FilterField> = oAnnotatedSelectionFieldData.filterFields;
468
882
 
469
883
  //Filters which has to be added which is part of SV/Default annotations but not present in the SelectionFields
470
- const annotatedSelectionFields = ((annotationPath && converterContext.getEntityTypeAnnotation(annotationPath)?.annotation) ||
471
- entityType.annotations?.UI?.SelectionFields ||
472
- []) as PropertyPath[];
884
+ const annotatedSelectionFields = oAnnotatedSelectionFieldData.annotatedSelectionFields;
473
885
  const defaultFilters = _getDefaultFilterFields(
474
886
  filterFields,
475
887
  aSelectOptions,
@@ -478,24 +890,9 @@ export const getSelectionFields = function(
478
890
  excludedFilterProperties,
479
891
  annotatedSelectionFields
480
892
  );
481
- const parameterFields = _getParameterFields(converterContext);
482
893
 
483
894
  // finally create final list of filter fields by adding the SelectionFields first (order matters)...
484
- let allFilters = parameterFields
485
- .concat(
486
- annotatedSelectionFields?.reduce((selectionFields: FilterField[], selectionField) => {
487
- const propertyPath = selectionField.value;
488
- if (!(propertyPath in excludedFilterProperties)) {
489
- const filterField: FilterField | undefined = _getFilterField(filterFields, propertyPath, converterContext, entityType);
490
- if (filterField) {
491
- filterField.group = "";
492
- filterField.groupLabel = "";
493
- selectionFields.push(filterField);
494
- }
495
- }
496
- return selectionFields;
497
- }, []) || []
498
- )
895
+ let allFilters = propSelectionFields
499
896
  // To add the FilterField which is not part of the Selection Fields but the property is mentioned in the Selection Variant
500
897
  .concat(defaultFilters || [])
501
898
  // ...and adding remaining filter fields, that are not used in a SelectionVariant (order doesn't matter)
@@ -522,14 +919,7 @@ export const getSelectionFields = function(
522
919
  }
523
920
  }
524
921
 
525
- const selectionFields = insertCustomElements(allFilters, getManifestFilterFields(entityType, converterContext), {
526
- "availability": "overwrite",
527
- label: "overwrite",
528
- position: "overwrite",
529
- template: "overwrite",
530
- settings: "overwrite",
531
- visualFilter: "overwrite"
532
- });
922
+ const selectionFields = insertCustomManifestElements(allFilters, entityType, converterContext);
533
923
 
534
924
  // Add caseSensitive property to all selection fields.
535
925
  const isCaseSensitive = isFilteringCaseSensitive(converterContext);
@@ -537,5 +927,5 @@ export const getSelectionFields = function(
537
927
  filterField.caseSensitive = isCaseSensitive;
538
928
  });
539
929
 
540
- return selectionFields;
930
+ return { selectionFields, sPropertyInfo };
541
931
  };