@sapui5/sap.fe.core 1.100.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 (250) hide show
  1. package/package.json +4 -4
  2. package/src/sap/fe/core/.library +2 -3
  3. package/src/sap/fe/core/AnnotationHelper.js +43 -24
  4. package/src/sap/fe/core/AnnotationHelper.ts +43 -37
  5. package/src/sap/fe/core/AppComponent.js +20 -27
  6. package/src/sap/fe/core/AppComponent.ts +19 -25
  7. package/src/sap/fe/core/AppStateHandler.js +5 -5
  8. package/src/sap/fe/core/AppStateHandler.ts +2 -2
  9. package/src/sap/fe/core/BaseController.js +9 -9
  10. package/src/sap/fe/core/BaseController.ts +3 -4
  11. package/src/sap/fe/core/CommonUtils.js +74 -17
  12. package/src/sap/fe/core/CommonUtils.ts +181 -110
  13. package/src/sap/fe/core/ExtensionAPI.js +11 -10
  14. package/src/sap/fe/core/ExtensionAPI.ts +22 -30
  15. package/src/sap/fe/core/PageController.js +12 -11
  16. package/src/sap/fe/core/PageController.ts +34 -34
  17. package/src/sap/fe/core/RouterProxy.js +36 -24
  18. package/src/sap/fe/core/RouterProxy.ts +36 -22
  19. package/src/sap/fe/core/TemplateComponent.js +193 -118
  20. package/src/sap/fe/core/TemplateComponent.ts +105 -117
  21. package/src/sap/fe/core/TemplateModel.js +6 -8
  22. package/src/sap/fe/core/TemplateModel.ts +2 -2
  23. package/src/sap/fe/core/TransactionHelper.js +33 -18
  24. package/src/sap/fe/core/TransactionHelper.ts +172 -153
  25. package/src/sap/fe/core/actions/collaboration/ActivitySync.js +31 -17
  26. package/src/sap/fe/core/actions/collaboration/ActivitySync.ts +52 -45
  27. package/src/sap/fe/core/actions/collaboration/CollaborationCommon.js +16 -6
  28. package/src/sap/fe/core/actions/collaboration/CollaborationCommon.ts +13 -3
  29. package/src/sap/fe/core/actions/collaboration/Manage.js +9 -7
  30. package/src/sap/fe/core/actions/collaboration/Manage.ts +33 -31
  31. package/src/sap/fe/core/actions/collaboration/ManageDialog.fragment.xml +53 -56
  32. package/src/sap/fe/core/actions/draft.js +308 -166
  33. package/src/sap/fe/core/actions/draft.ts +177 -74
  34. package/src/sap/fe/core/actions/messageHandling.js +25 -13
  35. package/src/sap/fe/core/actions/messageHandling.ts +49 -39
  36. package/src/sap/fe/core/actions/operations.js +4 -4
  37. package/src/sap/fe/core/actions/operations.ts +3 -2
  38. package/src/sap/fe/core/buildingBlocks/AttributeModel.js +60 -0
  39. package/src/sap/fe/core/buildingBlocks/AttributeModel.ts +37 -0
  40. package/src/sap/fe/core/buildingBlocks/BuildingBlock.js +165 -0
  41. package/src/sap/fe/core/buildingBlocks/BuildingBlock.ts +178 -0
  42. package/src/sap/fe/core/buildingBlocks/BuildingBlockRuntime.js +707 -0
  43. package/src/sap/fe/core/buildingBlocks/BuildingBlockRuntime.ts +628 -0
  44. package/src/sap/fe/core/buildingBlocks/TraceInfo.js +436 -0
  45. package/src/sap/fe/core/buildingBlocks/TraceInfo.ts +431 -0
  46. package/src/sap/fe/core/controllerextensions/EditFlow.js +506 -245
  47. package/src/sap/fe/core/controllerextensions/EditFlow.ts +395 -275
  48. package/src/sap/fe/core/controllerextensions/IntentBasedNavigation.js +11 -11
  49. package/src/sap/fe/core/controllerextensions/IntentBasedNavigation.ts +6 -7
  50. package/src/sap/fe/core/controllerextensions/InternalEditFlow.js +15 -17
  51. package/src/sap/fe/core/controllerextensions/InternalEditFlow.ts +98 -96
  52. package/src/sap/fe/core/controllerextensions/InternalIntentBasedNavigation.js +15 -15
  53. package/src/sap/fe/core/controllerextensions/InternalIntentBasedNavigation.ts +60 -53
  54. package/src/sap/fe/core/controllerextensions/InternalRouting.js +94 -42
  55. package/src/sap/fe/core/controllerextensions/InternalRouting.ts +114 -91
  56. package/src/sap/fe/core/controllerextensions/KPIManagement.js +14 -14
  57. package/src/sap/fe/core/controllerextensions/KPIManagement.ts +12 -11
  58. package/src/sap/fe/core/controllerextensions/MassEdit.js +12 -12
  59. package/src/sap/fe/core/controllerextensions/MassEdit.ts +8 -9
  60. package/src/sap/fe/core/controllerextensions/MessageHandler.js +13 -25
  61. package/src/sap/fe/core/controllerextensions/MessageHandler.ts +18 -28
  62. package/src/sap/fe/core/controllerextensions/PageReady.js +25 -23
  63. package/src/sap/fe/core/controllerextensions/PageReady.ts +49 -47
  64. package/src/sap/fe/core/controllerextensions/Paginator.js +13 -13
  65. package/src/sap/fe/core/controllerextensions/Paginator.ts +24 -18
  66. package/src/sap/fe/core/controllerextensions/Placeholder.js +10 -10
  67. package/src/sap/fe/core/controllerextensions/Placeholder.ts +12 -14
  68. package/src/sap/fe/core/controllerextensions/Routing.js +11 -11
  69. package/src/sap/fe/core/controllerextensions/Routing.ts +12 -13
  70. package/src/sap/fe/core/controllerextensions/Share.js +16 -16
  71. package/src/sap/fe/core/controllerextensions/Share.ts +32 -32
  72. package/src/sap/fe/core/controllerextensions/SideEffects.js +14 -14
  73. package/src/sap/fe/core/controllerextensions/SideEffects.ts +62 -63
  74. package/src/sap/fe/core/controllerextensions/ViewState.js +17 -31
  75. package/src/sap/fe/core/controllerextensions/ViewState.ts +93 -102
  76. package/src/sap/fe/core/controls/Any.js +28 -0
  77. package/src/sap/fe/core/controls/Any.ts +30 -0
  78. package/src/sap/fe/core/controls/CommandExecution.js +38 -15
  79. package/src/sap/fe/core/controls/CommandExecution.ts +20 -20
  80. package/src/sap/fe/core/controls/ConditionalWrapper.js +136 -65
  81. package/src/sap/fe/core/controls/ConditionalWrapper.ts +49 -58
  82. package/src/sap/fe/core/controls/CustomFilterFieldContentWrapper.js +366 -0
  83. package/src/sap/fe/core/controls/CustomFilterFieldContentWrapper.ts +278 -0
  84. package/src/sap/fe/core/controls/CustomQuickViewPage.js +73 -36
  85. package/src/sap/fe/core/controls/CustomQuickViewPage.ts +22 -32
  86. package/src/sap/fe/core/controls/DataLossOrDraftDiscard/DataLossDraft.fragment.xml +44 -5
  87. package/src/sap/fe/core/controls/DataLossOrDraftDiscard/DataLossOrDraftDiscardHandler.js +116 -66
  88. package/src/sap/fe/core/controls/DataLossOrDraftDiscard/DataLossOrDraftDiscardHandler.ts +121 -67
  89. package/src/sap/fe/core/controls/FieldWrapper.js +171 -87
  90. package/src/sap/fe/core/controls/FieldWrapper.ts +69 -80
  91. package/src/sap/fe/core/controls/FileWrapper.js +313 -0
  92. package/src/sap/fe/core/controls/FileWrapper.ts +169 -0
  93. package/src/sap/fe/core/controls/FilterBar.js +154 -119
  94. package/src/sap/fe/core/controls/FilterBar.ts +128 -123
  95. package/src/sap/fe/core/controls/FormElementWrapper.js +92 -37
  96. package/src/sap/fe/core/controls/FormElementWrapper.ts +32 -35
  97. package/src/sap/fe/core/controls/filterbar/FilterContainer.js +111 -89
  98. package/src/sap/fe/core/controls/filterbar/FilterContainer.ts +86 -82
  99. package/src/sap/fe/core/controls/filterbar/VisualFilter.js +242 -193
  100. package/src/sap/fe/core/controls/filterbar/VisualFilter.ts +211 -204
  101. package/src/sap/fe/core/controls/filterbar/VisualFilterContainer.js +152 -116
  102. package/src/sap/fe/core/controls/filterbar/VisualFilterContainer.ts +105 -105
  103. package/src/sap/fe/core/controls/filterbar/utils/VisualFilterUtils.js +1 -1
  104. package/src/sap/fe/core/controls/filterbar/utils/VisualFilterUtils.ts +2 -2
  105. package/src/sap/fe/core/controls/massEdit/MassEditDialog.fragment.xml +37 -42
  106. package/src/sap/fe/core/controls/massEdit/MassEditHandlers.js +7 -6
  107. package/src/sap/fe/core/controls/massEdit/MassEditHandlers.ts +15 -14
  108. package/src/sap/fe/core/converters/ManifestSettings.js +2 -1
  109. package/src/sap/fe/core/converters/ManifestSettings.ts +5 -1
  110. package/src/sap/fe/core/converters/annotations/DataField.js +1 -2
  111. package/src/sap/fe/core/converters/annotations/DataField.ts +3 -4
  112. package/src/sap/fe/core/converters/controls/Common/Action.js +10 -10
  113. package/src/sap/fe/core/converters/controls/Common/Action.ts +20 -19
  114. package/src/sap/fe/core/converters/controls/Common/Chart.js +8 -8
  115. package/src/sap/fe/core/converters/controls/Common/Chart.ts +12 -11
  116. package/src/sap/fe/core/converters/controls/Common/Form.js +5 -5
  117. package/src/sap/fe/core/converters/controls/Common/Form.ts +3 -1
  118. package/src/sap/fe/core/converters/controls/Common/KPI.js +1 -1
  119. package/src/sap/fe/core/converters/controls/Common/KPI.ts +2 -3
  120. package/src/sap/fe/core/converters/controls/Common/Table.js +245 -112
  121. package/src/sap/fe/core/converters/controls/Common/Table.ts +305 -193
  122. package/src/sap/fe/core/converters/controls/Common/table/StandardActions.js +5 -5
  123. package/src/sap/fe/core/converters/controls/Common/table/StandardActions.ts +4 -7
  124. package/src/sap/fe/core/converters/controls/ListReport/FilterBar.js +72 -43
  125. package/src/sap/fe/core/converters/controls/ListReport/FilterBar.ts +134 -100
  126. package/src/sap/fe/core/converters/controls/ObjectPage/HeaderFacet.js +6 -6
  127. package/src/sap/fe/core/converters/controls/ObjectPage/HeaderFacet.ts +20 -18
  128. package/src/sap/fe/core/converters/controls/ObjectPage/SubSection.js +5 -2
  129. package/src/sap/fe/core/converters/controls/ObjectPage/SubSection.ts +4 -1
  130. package/src/sap/fe/core/converters/objectPage/FormMenuActions.js +1 -1
  131. package/src/sap/fe/core/converters/objectPage/FormMenuActions.ts +0 -4
  132. package/src/sap/fe/core/converters/objectPage/HeaderAndFooterAction.js +27 -24
  133. package/src/sap/fe/core/converters/objectPage/HeaderAndFooterAction.ts +49 -40
  134. package/src/sap/fe/core/converters/templates/ListReportConverter.js +33 -22
  135. package/src/sap/fe/core/converters/templates/ListReportConverter.ts +77 -62
  136. package/src/sap/fe/core/converters/templates/ObjectPageConverter.js +5 -5
  137. package/src/sap/fe/core/converters/templates/ObjectPageConverter.ts +3 -7
  138. package/src/sap/fe/core/formatters/KPIFormatter.js +3 -12
  139. package/src/sap/fe/core/formatters/KPIFormatter.ts +3 -2
  140. package/src/sap/fe/core/formatters/TableFormatter.js +2 -2
  141. package/src/sap/fe/core/formatters/TableFormatter.ts +1 -1
  142. package/src/sap/fe/core/formatters/ValueFormatter.js +4 -4
  143. package/src/sap/fe/core/formatters/ValueFormatter.ts +4 -7
  144. package/src/sap/fe/core/fpm/Component.js +46 -17
  145. package/src/sap/fe/core/fpm/Component.ts +11 -16
  146. package/src/sap/fe/core/helpers/AppStartupHelper.js +4 -4
  147. package/src/sap/fe/core/helpers/AppStartupHelper.ts +3 -3
  148. package/src/sap/fe/core/helpers/ClassSupport.js +273 -256
  149. package/src/sap/fe/core/helpers/ClassSupport.ts +314 -237
  150. package/src/sap/fe/core/helpers/MassEditHelper.js +173 -39
  151. package/src/sap/fe/core/helpers/MassEditHelper.ts +236 -132
  152. package/src/sap/fe/core/helpers/ModelHelper.js +29 -1
  153. package/src/sap/fe/core/helpers/ModelHelper.ts +23 -0
  154. package/src/sap/fe/core/helpers/PasteHelper.js +4 -4
  155. package/src/sap/fe/core/helpers/PasteHelper.ts +4 -3
  156. package/src/sap/fe/core/helpers/SemanticDateOperators.js +3 -3
  157. package/src/sap/fe/core/helpers/SemanticDateOperators.ts +3 -1
  158. package/src/sap/fe/core/helpers/SemanticKeyHelper.js +1 -1
  159. package/src/sap/fe/core/helpers/SemanticKeyHelper.ts +1 -1
  160. package/src/sap/fe/core/helpers/StableIdHelper.js +1 -7
  161. package/src/sap/fe/core/helpers/StableIdHelper.ts +0 -4
  162. package/src/sap/fe/core/jsx-runtime/jsx.js +35 -5
  163. package/src/sap/fe/core/jsx-runtime/jsx.ts +22 -8
  164. package/src/sap/fe/core/library.js +4 -5
  165. package/src/sap/fe/core/library.ts +17 -17
  166. package/src/sap/fe/core/manifestMerger/ChangePageConfiguration.js +1 -1
  167. package/src/sap/fe/core/manifestMerger/ChangePageConfiguration.ts +0 -3
  168. package/src/sap/fe/core/messagebundle.properties +23 -8
  169. package/src/sap/fe/core/messagebundle_ar.properties +2 -0
  170. package/src/sap/fe/core/messagebundle_bg.properties +2 -0
  171. package/src/sap/fe/core/messagebundle_ca.properties +2 -0
  172. package/src/sap/fe/core/messagebundle_cs.properties +2 -0
  173. package/src/sap/fe/core/messagebundle_cy.properties +5 -3
  174. package/src/sap/fe/core/messagebundle_da.properties +2 -0
  175. package/src/sap/fe/core/messagebundle_de.properties +2 -0
  176. package/src/sap/fe/core/messagebundle_el.properties +2 -0
  177. package/src/sap/fe/core/messagebundle_en.properties +2 -0
  178. package/src/sap/fe/core/messagebundle_en_GB.properties +2 -0
  179. package/src/sap/fe/core/messagebundle_en_US_sappsd.properties +2 -0
  180. package/src/sap/fe/core/messagebundle_en_US_saprigi.properties +2 -0
  181. package/src/sap/fe/core/messagebundle_en_US_saptrc.properties +2 -0
  182. package/src/sap/fe/core/messagebundle_es.properties +2 -0
  183. package/src/sap/fe/core/messagebundle_es_MX.properties +2 -0
  184. package/src/sap/fe/core/messagebundle_et.properties +2 -0
  185. package/src/sap/fe/core/messagebundle_fi.properties +2 -0
  186. package/src/sap/fe/core/messagebundle_fr.properties +4 -2
  187. package/src/sap/fe/core/messagebundle_fr_CA.properties +5 -3
  188. package/src/sap/fe/core/messagebundle_hi.properties +2 -0
  189. package/src/sap/fe/core/messagebundle_hr.properties +5 -3
  190. package/src/sap/fe/core/messagebundle_hu.properties +2 -0
  191. package/src/sap/fe/core/messagebundle_id.properties +2 -0
  192. package/src/sap/fe/core/messagebundle_it.properties +2 -0
  193. package/src/sap/fe/core/messagebundle_iw.properties +2 -0
  194. package/src/sap/fe/core/messagebundle_ja.properties +2 -0
  195. package/src/sap/fe/core/messagebundle_kk.properties +2 -0
  196. package/src/sap/fe/core/messagebundle_ko.properties +2 -0
  197. package/src/sap/fe/core/messagebundle_lt.properties +2 -0
  198. package/src/sap/fe/core/messagebundle_lv.properties +5 -3
  199. package/src/sap/fe/core/messagebundle_ms.properties +2 -0
  200. package/src/sap/fe/core/messagebundle_nl.properties +2 -0
  201. package/src/sap/fe/core/messagebundle_no.properties +2 -0
  202. package/src/sap/fe/core/messagebundle_pl.properties +5 -3
  203. package/src/sap/fe/core/messagebundle_pt.properties +2 -0
  204. package/src/sap/fe/core/messagebundle_pt_PT.properties +2 -0
  205. package/src/sap/fe/core/messagebundle_ro.properties +5 -3
  206. package/src/sap/fe/core/messagebundle_ru.properties +5 -3
  207. package/src/sap/fe/core/messagebundle_sh.properties +2 -0
  208. package/src/sap/fe/core/messagebundle_sk.properties +2 -0
  209. package/src/sap/fe/core/messagebundle_sl.properties +2 -0
  210. package/src/sap/fe/core/messagebundle_sv.properties +3 -1
  211. package/src/sap/fe/core/messagebundle_th.properties +2 -0
  212. package/src/sap/fe/core/messagebundle_tr.properties +2 -0
  213. package/src/sap/fe/core/messagebundle_uk.properties +2 -0
  214. package/src/sap/fe/core/messagebundle_vi.properties +2 -0
  215. package/src/sap/fe/core/messagebundle_zh_CN.properties +5 -3
  216. package/src/sap/fe/core/messagebundle_zh_TW.properties +5 -3
  217. package/src/sap/fe/core/services/AsyncComponentServiceFactory.js +4 -4
  218. package/src/sap/fe/core/services/AsyncComponentServiceFactory.ts +1 -1
  219. package/src/sap/fe/core/services/CacheHandlerServiceFactory.js +5 -5
  220. package/src/sap/fe/core/services/CacheHandlerServiceFactory.ts +1 -2
  221. package/src/sap/fe/core/services/EnvironmentServiceFactory.js +7 -7
  222. package/src/sap/fe/core/services/EnvironmentServiceFactory.ts +6 -5
  223. package/src/sap/fe/core/services/NavigationServiceFactory.js +4 -4
  224. package/src/sap/fe/core/services/NavigationServiceFactory.ts +1 -1
  225. package/src/sap/fe/core/services/ResourceModelServiceFactory.js +4 -4
  226. package/src/sap/fe/core/services/ResourceModelServiceFactory.ts +1 -1
  227. package/src/sap/fe/core/services/RoutingServiceFactory.js +98 -62
  228. package/src/sap/fe/core/services/RoutingServiceFactory.ts +51 -42
  229. package/src/sap/fe/core/services/ShellServicesFactory.js +69 -29
  230. package/src/sap/fe/core/services/ShellServicesFactory.ts +26 -29
  231. package/src/sap/fe/core/services/SideEffectsServiceFactory.js +4 -4
  232. package/src/sap/fe/core/services/SideEffectsServiceFactory.ts +1 -1
  233. package/src/sap/fe/core/services/TemplatedViewServiceFactory.js +8 -8
  234. package/src/sap/fe/core/services/TemplatedViewServiceFactory.ts +6 -17
  235. package/src/sap/fe/core/services/view/TemplatingErrorPage.controller.js +43 -5
  236. package/src/sap/fe/core/services/view/TemplatingErrorPage.controller.ts +6 -3
  237. package/src/sap/fe/core/support/CommonHelper.js +1 -1
  238. package/src/sap/fe/core/support/CommonHelper.ts +0 -3
  239. package/src/sap/fe/core/templating/DataModelPathHelper.js +2 -9
  240. package/src/sap/fe/core/templating/DataModelPathHelper.ts +32 -38
  241. package/src/sap/fe/core/templating/DisplayModeFormatter.js +23 -3
  242. package/src/sap/fe/core/templating/DisplayModeFormatter.ts +26 -5
  243. package/src/sap/fe/core/templating/PropertyHelper.js +15 -1
  244. package/src/sap/fe/core/templating/PropertyHelper.ts +30 -23
  245. package/src/sap/fe/core/templating/UIFormatters.js +121 -21
  246. package/src/sap/fe/core/templating/UIFormatters.ts +134 -49
  247. package/src/sap/fe/core/type/Email.js +26 -8
  248. package/src/sap/fe/core/type/Email.ts +8 -7
  249. package/src/sap/fe/core/controllerextensions/ControllerExtensionMetadata.js +0 -78
  250. package/src/sap/fe/core/controllerextensions/ControllerExtensionMetadata.ts +0 -65
@@ -1,23 +1,23 @@
1
- import { AvailabilityType, FilterFieldManifestConfiguration, FilterManifestConfiguration, FilterSettings } from "../../ManifestSettings";
2
1
  import { EntityType, NavigationProperty, Property } from "@sap-ux/annotation-converter";
3
- import ConverterContext from "sap/fe/core/converters/ConverterContext";
4
2
  import { AnnotationTerm, DataFieldAbstractTypes, DataFieldTypes, ReferenceFacetTypes, UIAnnotationTerms } from "@sap-ux/vocabularies-types";
3
+ import { PropertyPath } from "@sap-ux/vocabularies-types/dist/Edm";
4
+ import { FieldGroup, FieldGroupType, SelectOptionType } from "@sap-ux/vocabularies-types/dist/generated/UI";
5
+ import { ChartVisualization } from "sap/fe/core/converters/controls/Common/Chart";
5
6
  import {
6
7
  getSelectionVariantConfiguration,
7
- SelectionVariantConfiguration,
8
- TableVisualization,
8
+ getTypeConfig,
9
9
  isFilteringCaseSensitive,
10
- getTypeConfig
10
+ SelectionVariantConfiguration,
11
+ TableVisualization
11
12
  } from "sap/fe/core/converters/controls/Common/Table";
12
- import { ChartVisualization } from "sap/fe/core/converters/controls/Common/Chart";
13
- import { ConfigurableObject, CustomElement, insertCustomElements, Placement } from "sap/fe/core/converters/helpers/ConfigurableObject";
14
13
  import { getVisualFilters, VisualFilters } from "sap/fe/core/converters/controls/ListReport/VisualFilters";
15
- import { SelectOptionType, FieldGroupType, FieldGroup } from "@sap-ux/vocabularies-types/dist/generated/UI";
14
+ import ConverterContext from "sap/fe/core/converters/ConverterContext";
15
+ import { ConfigurableObject, CustomElement, insertCustomElements, Placement } from "sap/fe/core/converters/helpers/ConfigurableObject";
16
+ import { IssueCategory, IssueSeverity, IssueType } from "sap/fe/core/converters/helpers/IssueManager";
17
+ import { KeyHelper } from "sap/fe/core/converters/helpers/Key";
16
18
  import { annotationExpression, compileBinding } from "sap/fe/core/helpers/BindingExpression";
19
+ import { AvailabilityType, FilterFieldManifestConfiguration, FilterManifestConfiguration, FilterSettings } from "../../ManifestSettings";
17
20
  import { getSelectionVariant } from "../Common/DataVisualization";
18
- import { KeyHelper } from "sap/fe/core/converters/helpers/Key";
19
- import { IssueType, IssueSeverity, IssueCategory } from "sap/fe/core/converters/helpers/IssueManager";
20
- import { PropertyPath } from "@sap-ux/vocabularies-types/dist/Edm";
21
21
  //import { hasValueHelp } from "sap/fe/core/templating/PropertyHelper";
22
22
 
23
23
  export type FilterField = ConfigurableObject & {
@@ -74,7 +74,7 @@ function getFieldGroupFilterGroups(fieldGroup: AnnotationTerm<FieldGroupType>):
74
74
 
75
75
  function getExcludedFilterProperties(selectionVariants: SelectionVariantConfiguration[]): Record<string, boolean> {
76
76
  return selectionVariants.reduce((previousValue: Record<string, boolean>, selectionVariant) => {
77
- selectionVariant.propertyNames.forEach(propertyName => {
77
+ selectionVariant.propertyNames.forEach((propertyName) => {
78
78
  previousValue[propertyName] = true;
79
79
  });
80
80
  return previousValue;
@@ -89,7 +89,7 @@ function getExcludedFilterProperties(selectionVariants: SelectionVariantConfigur
89
89
  */
90
90
  function checkAllTableForEntitySetAreAnalytical(listReportTables: TableVisualization[], contextPath: string | undefined) {
91
91
  if (contextPath && listReportTables.length > 0) {
92
- return listReportTables.every(visualization => {
92
+ return listReportTables.every((visualization) => {
93
93
  return visualization.enableAnalytics && contextPath === visualization.annotation.collection;
94
94
  });
95
95
  }
@@ -102,13 +102,13 @@ function getSelectionVariants(
102
102
  ): SelectionVariantConfiguration[] {
103
103
  const selectionVariantPaths: string[] = [];
104
104
  return lrTableVisualizations
105
- .map(visualization => {
105
+ .map((visualization) => {
106
106
  const tableFilters = visualization.control.filters;
107
107
  const tableSVConfigs: SelectionVariantConfiguration[] = [];
108
108
  for (const key in tableFilters) {
109
109
  if (Array.isArray(tableFilters[key].paths)) {
110
110
  const paths = tableFilters[key].paths;
111
- paths.forEach(path => {
111
+ paths.forEach((path) => {
112
112
  if (path && path.annotationPath && selectionVariantPaths.indexOf(path.annotationPath) === -1) {
113
113
  selectionVariantPaths.push(path.annotationPath);
114
114
  const selectionVariantConfig = getSelectionVariantConfiguration(path.annotationPath, converterContext);
@@ -132,7 +132,7 @@ function getSelectionVariants(
132
132
  * @param propertyPath The full path to the target property
133
133
  * @returns {string} The formatted condition path
134
134
  */
135
- const _getConditionPath = function(entityType: EntityType, propertyPath: string): string {
135
+ const _getConditionPath = function (entityType: EntityType, propertyPath: string): string {
136
136
  const parts = propertyPath.split("/");
137
137
  let partialPath;
138
138
  let key = "";
@@ -148,7 +148,7 @@ const _getConditionPath = function(entityType: EntityType, propertyPath: string)
148
148
  return key;
149
149
  };
150
150
 
151
- const _createFilterSelectionField = function(
151
+ const _createFilterSelectionField = function (
152
152
  entityType: EntityType,
153
153
  property: Property,
154
154
  fullPropertyPath: string,
@@ -242,7 +242,7 @@ export function getModelType(sType: any) {
242
242
  };
243
243
  return sType && sType in mDefaultTypeForEdmType && mDefaultTypeForEdmType[sType].modelType;
244
244
  }
245
- const _getSelectionFields = function(
245
+ const _getSelectionFields = function (
246
246
  entityType: EntityType,
247
247
  navigationPath: string,
248
248
  properties: Array<Property> | undefined,
@@ -263,7 +263,7 @@ const _getSelectionFields = function(
263
263
  return selectionFieldMap;
264
264
  };
265
265
 
266
- const _getSelectionFieldsByPath = function(
266
+ const _getSelectionFieldsByPath = function (
267
267
  entityType: EntityType,
268
268
  propertyPaths: Array<string> | undefined,
269
269
  includeHidden: boolean,
@@ -297,12 +297,7 @@ const _getSelectionFieldsByPath = function(
297
297
  converterContext
298
298
  );
299
299
  } else {
300
- const navigationPath = propertyPath.includes("/")
301
- ? propertyPath
302
- .split("/")
303
- .splice(0, 1)
304
- .join("/")
305
- : "";
300
+ const navigationPath = propertyPath.includes("/") ? propertyPath.split("/").splice(0, 1).join("/") : "";
306
301
  localSelectionFields = _getSelectionFields(entityType, navigationPath, [property], includeHidden, converterContext);
307
302
  }
308
303
 
@@ -315,13 +310,14 @@ const _getSelectionFieldsByPath = function(
315
310
  return selectionFields;
316
311
  };
317
312
 
318
- const _getFilterField = function(
313
+ const _getFilterField = function (
319
314
  filterFields: Record<string, FilterField>,
320
315
  propertyPath: string,
321
316
  converterContext: ConverterContext,
322
317
  entityType: EntityType
323
318
  ): FilterField | undefined {
324
319
  let filterField: FilterField | undefined = filterFields[propertyPath];
320
+ const availability = filterField && filterField.availability;
325
321
  if (filterField) {
326
322
  delete filterFields[propertyPath];
327
323
  } else {
@@ -332,14 +328,13 @@ const _getFilterField = function(
332
328
  }
333
329
  // defined SelectionFields are available by default
334
330
  if (filterField) {
335
- filterField.availability = AvailabilityType.Default;
331
+ filterField.availability = availability === AvailabilityType.Hidden ? AvailabilityType.Hidden : AvailabilityType.Default;
336
332
  filterField.isParameter = !!entityType.annotations?.Common?.ResultContext;
337
333
  }
338
334
  return filterField;
339
335
  };
340
336
 
341
- const _getDefaultFilterFields = function(
342
- filterFields: Record<string, FilterField>,
337
+ const _getDefaultFilterFields = function (
343
338
  aSelectOptions: any[],
344
339
  entityType: EntityType,
345
340
  converterContext: ConverterContext,
@@ -350,7 +345,7 @@ const _getDefaultFilterFields = function(
350
345
  const UISelectionFields: any = {};
351
346
  const properties = entityType.entityProperties;
352
347
  // Using entityType instead of entitySet
353
- annotatedSelectionFields?.forEach(SelectionField => {
348
+ annotatedSelectionFields?.forEach((SelectionField) => {
354
349
  UISelectionFields[SelectionField.value] = true;
355
350
  });
356
351
  if (aSelectOptions && aSelectOptions.length > 0) {
@@ -358,12 +353,12 @@ const _getDefaultFilterFields = function(
358
353
  const propertyName: any = selectOption.PropertyName;
359
354
  const sPropertyPath: string = propertyName.value;
360
355
  const UISelectionFields: any = {};
361
- annotatedSelectionFields?.forEach(SelectionField => {
356
+ annotatedSelectionFields?.forEach((SelectionField) => {
362
357
  UISelectionFields[SelectionField.value] = true;
363
358
  });
364
359
  if (!(sPropertyPath in excludedFilterProperties)) {
365
360
  if (!(sPropertyPath in UISelectionFields)) {
366
- const FilterField: FilterField | undefined = _getFilterField(filterFields, sPropertyPath, converterContext, entityType);
361
+ const FilterField: FilterField | undefined = getFilterField(sPropertyPath, converterContext, entityType);
367
362
  if (FilterField) {
368
363
  selectionFields.push(FilterField);
369
364
  }
@@ -376,7 +371,7 @@ const _getDefaultFilterFields = function(
376
371
  const PropertyPath = property.name;
377
372
  if (!(PropertyPath in excludedFilterProperties)) {
378
373
  if (defaultFilterValue && !(PropertyPath in UISelectionFields)) {
379
- const FilterField: FilterField | undefined = _getFilterField(filterFields, PropertyPath, converterContext, entityType);
374
+ const FilterField: FilterField | undefined = getFilterField(PropertyPath, converterContext, entityType);
380
375
  if (FilterField) {
381
376
  selectionFields.push(FilterField);
382
377
  }
@@ -399,11 +394,18 @@ function _getParameterFields(converterContext: ConverterContext): FilterField[]
399
394
  const parameterConverterContext =
400
395
  isParameterized && converterContext.getConverterContextFor("/" + dataModelObjectPath.startingEntitySet.name);
401
396
 
402
- const parameterFields = (parameterConverterContext
403
- ? parameterEntityType.entityProperties.map(function(property) {
404
- return _getFilterField({} as Record<string, FilterField>, property.name, parameterConverterContext, parameterEntityType);
405
- })
406
- : []) as FilterField[];
397
+ const parameterFields = (
398
+ parameterConverterContext
399
+ ? parameterEntityType.entityProperties.map(function (property) {
400
+ return _getFilterField(
401
+ {} as Record<string, FilterField>,
402
+ property.name,
403
+ parameterConverterContext,
404
+ parameterEntityType
405
+ );
406
+ })
407
+ : []
408
+ ) as FilterField[];
407
409
 
408
410
  return parameterFields;
409
411
  }
@@ -416,17 +418,17 @@ function _getParameterFields(converterContext: ConverterContext): FilterField[]
416
418
  * @param {ConverterContext} converterContext The converter context
417
419
  * @returns {boolean} The information if the FilterBar search field is hidden or not
418
420
  */
419
- export const getFilterBarhideBasicSearch = function(
421
+ export const getFilterBarhideBasicSearch = function (
420
422
  listReportTables: TableVisualization[],
421
423
  charts: ChartVisualization[],
422
424
  converterContext: ConverterContext
423
425
  ): boolean {
424
426
  // Check if charts allow search
425
- const noSearchInCharts = charts.length === 0 || charts.every(chart => !chart.applySupported.enableSearch);
427
+ const noSearchInCharts = charts.length === 0 || charts.every((chart) => !chart.applySupported.enableSearch);
426
428
 
427
429
  // Check if all tables are analytical and none of them allow for search
428
430
  const noSearchInTables =
429
- listReportTables.length === 0 || listReportTables.every(table => table.enableAnalytics && !table.enableAnalyticsSearch);
431
+ listReportTables.length === 0 || listReportTables.every((table) => table.enableAnalytics && !table.enableAnalyticsSearch);
430
432
 
431
433
  const contextPath = converterContext.getContextPath();
432
434
  if (contextPath && noSearchInCharts && noSearchInTables) {
@@ -443,7 +445,7 @@ export const getFilterBarhideBasicSearch = function(
443
445
  * @param converterContext The converter context
444
446
  * @returns {Record<string, CustomElementFilterField>} The filter fields defined in the manifest
445
447
  */
446
- export const getManifestFilterFields = function(
448
+ export const getManifestFilterFields = function (
447
449
  entityType: EntityType,
448
450
  converterContext: ConverterContext
449
451
  ): Record<string, CustomElementFilterField> {
@@ -451,7 +453,7 @@ export const getManifestFilterFields = function(
451
453
  const definedFilterFields: Record<string, FilterFieldManifestConfiguration> = fbConfig?.filterFields || {};
452
454
  const selectionFields: Record<string, FilterField> = _getSelectionFieldsByPath(
453
455
  entityType,
454
- Object.keys(definedFilterFields).map(key => KeyHelper.getPathFromSelectionFieldKey(key)),
456
+ Object.keys(definedFilterFields).map((key) => KeyHelper.getPathFromSelectionFieldKey(key)),
455
457
  true,
456
458
  converterContext
457
459
  );
@@ -482,15 +484,15 @@ export const getManifestFilterFields = function(
482
484
  return filterFields;
483
485
  };
484
486
 
485
- export const getFilterField = function(propertyPath: string, converterContext: ConverterContext, entityType: EntityType) {
487
+ export const getFilterField = function (propertyPath: string, converterContext: ConverterContext, entityType: EntityType) {
486
488
  return _getFilterField({}, propertyPath, converterContext, entityType);
487
489
  };
488
490
 
489
- export const getFilterRestrictions = function(oFilterRestrictionsAnnotation: any, sRestriction: any) {
491
+ export const getFilterRestrictions = function (oFilterRestrictionsAnnotation: any, sRestriction: any) {
490
492
  if (sRestriction === "RequiredProperties" || sRestriction === "NonFilterableProperties") {
491
493
  let aProps = [];
492
494
  if (oFilterRestrictionsAnnotation && oFilterRestrictionsAnnotation[sRestriction]) {
493
- aProps = oFilterRestrictionsAnnotation[sRestriction].map(function(oProperty: any) {
495
+ aProps = oFilterRestrictionsAnnotation[sRestriction].map(function (oProperty: any) {
494
496
  return oProperty.$PropertyPath || oProperty.value;
495
497
  });
496
498
  }
@@ -498,7 +500,7 @@ export const getFilterRestrictions = function(oFilterRestrictionsAnnotation: any
498
500
  } else if (sRestriction === "FilterAllowedExpressions") {
499
501
  const mAllowedExpressions = {} as any;
500
502
  if (oFilterRestrictionsAnnotation && oFilterRestrictionsAnnotation.FilterExpressionRestrictions) {
501
- oFilterRestrictionsAnnotation.FilterExpressionRestrictions.forEach(function(oProperty: any) {
503
+ oFilterRestrictionsAnnotation.FilterExpressionRestrictions.forEach(function (oProperty: any) {
502
504
  //SingleValue | MultiValue | SingleRange | MultiRange | SearchExpression | MultiRangeOrSearchExpression
503
505
  if (mAllowedExpressions[oProperty.Property.value]) {
504
506
  mAllowedExpressions[oProperty.Property.value].push(oProperty.AllowedExpressions);
@@ -512,7 +514,7 @@ export const getFilterRestrictions = function(oFilterRestrictionsAnnotation: any
512
514
  return oFilterRestrictionsAnnotation;
513
515
  };
514
516
 
515
- const getSearchFilterPropertyInfo = function() {
517
+ const getSearchFilterPropertyInfo = function () {
516
518
  return {
517
519
  name: "$search",
518
520
  path: "$search",
@@ -521,7 +523,7 @@ const getSearchFilterPropertyInfo = function() {
521
523
  };
522
524
  };
523
525
 
524
- const getEditStateFilterPropertyInfo = function() {
526
+ const getEditStateFilterPropertyInfo = function () {
525
527
  return {
526
528
  name: "$editState",
527
529
  path: "$editState",
@@ -532,16 +534,16 @@ const getEditStateFilterPropertyInfo = function() {
532
534
  };
533
535
  };
534
536
 
535
- const getSearchRestrictions = function(converterContext: ConverterContext) {
537
+ const getSearchRestrictions = function (converterContext: ConverterContext) {
536
538
  return converterContext.getEntitySet()?.annotations?.Capabilities?.SearchRestrictions;
537
539
  };
538
540
 
539
- export const getNavigationRestrictions = function(converterContext: ConverterContext, sNavigationPath: string) {
541
+ export const getNavigationRestrictions = function (converterContext: ConverterContext, sNavigationPath: string) {
540
542
  const oNavigationRestrictions: any = converterContext.getEntitySet()?.annotations?.Capabilities?.NavigationRestrictions;
541
543
  const aRestrictedProperties = oNavigationRestrictions && oNavigationRestrictions.RestrictedProperties;
542
544
  return (
543
545
  aRestrictedProperties &&
544
- aRestrictedProperties.find(function(oRestrictedProperty: any) {
546
+ aRestrictedProperties.find(function (oRestrictedProperty: any) {
545
547
  return (
546
548
  oRestrictedProperty &&
547
549
  oRestrictedProperty.NavigationProperty &&
@@ -552,7 +554,7 @@ export const getNavigationRestrictions = function(converterContext: ConverterCon
552
554
  );
553
555
  };
554
556
 
555
- const _fetchBasicPropertyInfo = function(oFilterFieldInfo: any) {
557
+ const _fetchBasicPropertyInfo = function (oFilterFieldInfo: any) {
556
558
  return {
557
559
  key: oFilterFieldInfo.key,
558
560
  annotationPath: oFilterFieldInfo.annotationPath,
@@ -571,7 +573,7 @@ const _fetchBasicPropertyInfo = function(oFilterFieldInfo: any) {
571
573
  };
572
574
  };
573
575
 
574
- export const getSpecificAllowedExpression = function(aExpressions: any) {
576
+ export const getSpecificAllowedExpression = function (aExpressions: any) {
575
577
  const aAllowedExpressionsPriority = [
576
578
  "SingleValue",
577
579
  "MultiValue",
@@ -581,14 +583,14 @@ export const getSpecificAllowedExpression = function(aExpressions: any) {
581
583
  "MultiRangeOrSearchExpression"
582
584
  ];
583
585
 
584
- aExpressions.sort(function(a: any, b: any) {
586
+ aExpressions.sort(function (a: any, b: any) {
585
587
  return aAllowedExpressionsPriority.indexOf(a) - aAllowedExpressionsPriority.indexOf(b);
586
588
  });
587
589
 
588
590
  return aExpressions[0];
589
591
  };
590
592
 
591
- export const displayMode = function(oPropertyAnnotations: any, oCollectionAnnotations: any) {
593
+ export const displayMode = function (oPropertyAnnotations: any, oCollectionAnnotations: any) {
592
594
  const oTextAnnotation = oPropertyAnnotations?.Common?.Text,
593
595
  oTextArrangmentAnnotation =
594
596
  oTextAnnotation &&
@@ -606,7 +608,7 @@ export const displayMode = function(oPropertyAnnotations: any, oCollectionAnnota
606
608
  return oTextAnnotation ? "DescriptionValue" : "Value";
607
609
  };
608
610
 
609
- const _fetchPropertyInfo = function(converterContext: ConverterContext, oFilterFieldInfo: any, oTypeConfig: any) {
611
+ const _fetchPropertyInfo = function (converterContext: ConverterContext, oFilterFieldInfo: any, oTypeConfig: any) {
610
612
  let oPropertyInfo = _fetchBasicPropertyInfo(oFilterFieldInfo);
611
613
  const sAnnotationPath = oFilterFieldInfo.annotationPath;
612
614
 
@@ -628,7 +630,7 @@ const _fetchPropertyInfo = function(converterContext: ConverterContext, oFilterF
628
630
  return oPropertyInfo;
629
631
  };
630
632
 
631
- export const isMultiValue = function(oProperty: any) {
633
+ export const isMultiValue = function (oProperty: any) {
632
634
  let bIsMultiValue = true;
633
635
  //SingleValue | MultiValue | SingleRange | MultiRange | SearchExpression | MultiRangeOrSearchExpression
634
636
  switch (oProperty.filterExpression) {
@@ -646,7 +648,7 @@ export const isMultiValue = function(oProperty: any) {
646
648
  return bIsMultiValue;
647
649
  };
648
650
 
649
- const getAnnotatedSelectionFieldData = function(
651
+ const getAnnotatedSelectionFieldData = function (
650
652
  converterContext: ConverterContext,
651
653
  lrTables: TableVisualization[] = [],
652
654
  annotationPath: string = ""
@@ -674,6 +676,11 @@ const getAnnotatedSelectionFieldData = function(
674
676
  converterContext
675
677
  )
676
678
  };
679
+ let aSelectOptions: any[] = [];
680
+ const selectionVariant = getSelectionVariant(entityType, converterContext);
681
+ if (selectionVariant) {
682
+ aSelectOptions = selectionVariant.SelectOptions;
683
+ }
677
684
 
678
685
  const propertyInfoFields: any =
679
686
  annotatedSelectionFields?.reduce((selectionFields: FilterField[], selectionField) => {
@@ -689,36 +696,52 @@ const getAnnotatedSelectionFieldData = function(
689
696
  return selectionFields;
690
697
  }, []) || [];
691
698
 
699
+ let defaultFilterFields = _getDefaultFilterFields(
700
+ aSelectOptions,
701
+ entityType,
702
+ converterContext,
703
+ excludedFilterProperties,
704
+ annotatedSelectionFields
705
+ );
706
+
692
707
  return {
693
708
  excludedFilterProperties: excludedFilterProperties,
694
709
  entityType: entityType,
695
710
  annotatedSelectionFields: annotatedSelectionFields,
696
711
  filterFields: filterFields,
697
- propertyInfoFields: propertyInfoFields
712
+ propertyInfoFields: propertyInfoFields,
713
+ defaultFilterFields: defaultFilterFields
698
714
  };
699
715
  };
700
- export const processSelectionFields = function(propertyInfoFields: any, converterContext: ConverterContext) {
716
+ export const processSelectionFields = function (
717
+ propertyInfoFields: any,
718
+ converterContext: ConverterContext,
719
+ defaultValuePropertyFields: any
720
+ ) {
701
721
  //get TypeConfig function
702
- const aTypeConfig: any = [];
703
722
  const selectionFieldTypes: any = [];
704
- const _fnTypeConfig = function(property: Property) {
705
- const oTypeConfig = getTypeConfig(property, undefined);
723
+ const aTypeConfig: any = {};
724
+ const _fnTypeConfig = function (property: Property, key: string) {
725
+ const oTypeConfig = getTypeConfig(property, property?.type);
706
726
  selectionFieldTypes.push(property?.type);
707
727
  if (property?.type === sEdmString && (!oTypeConfig.constraints.nullable || oTypeConfig.constraints.nullable === true)) {
708
728
  oTypeConfig.formatOptions.parseKeepsEmptyString = false;
709
729
  }
710
- aTypeConfig.push(oTypeConfig);
730
+ aTypeConfig[key] = oTypeConfig;
711
731
  };
712
732
 
733
+ if (defaultValuePropertyFields) {
734
+ propertyInfoFields = propertyInfoFields.concat(defaultValuePropertyFields);
735
+ }
713
736
  //add typeConfig
714
- propertyInfoFields.forEach(function(parameterField: any) {
737
+ propertyInfoFields.forEach(function (parameterField: any) {
715
738
  if (parameterField.annotationPath) {
716
739
  const propertyConvertyContext = converterContext.getConverterContextFor(parameterField.annotationPath);
717
740
  const propertyTargetObject = propertyConvertyContext.getDataModelObjectPath().targetObject;
718
- _fnTypeConfig(propertyTargetObject);
741
+ _fnTypeConfig(propertyTargetObject, parameterField.key);
719
742
  } else {
720
743
  selectionFieldTypes.push(sEdmString);
721
- aTypeConfig.push({ type: sStringDataType });
744
+ aTypeConfig[parameterField.key] = { type: sStringDataType };
722
745
  }
723
746
  });
724
747
 
@@ -750,20 +773,20 @@ export const processSelectionFields = function(propertyInfoFields: any, converte
750
773
  const aFetchedProperties: any = [];
751
774
 
752
775
  // process the fields to add necessary properties
753
- Object.keys(propertyInfoFields).forEach(function(sFilterFieldKey: string) {
754
- const oConvertedProperty = propertyInfoFields[sFilterFieldKey];
776
+ propertyInfoFields.forEach(function (propertyInfoField: any) {
777
+ const oConvertedProperty = propertyInfoField;
755
778
  let sPropertyPath;
756
779
  if (oConvertedProperty.conditionPath) {
757
780
  sPropertyPath = oConvertedProperty.conditionPath.replace(/\+|\*/g, "");
758
781
  }
759
782
  if (aNonFilterableProps.indexOf(sPropertyPath) === -1) {
760
- oPropertyInfo = _fetchPropertyInfo(converterContext, oConvertedProperty, aTypeConfig[sFilterFieldKey]);
783
+ oPropertyInfo = _fetchPropertyInfo(converterContext, oConvertedProperty, aTypeConfig[propertyInfoField.key]);
761
784
  if (oPropertyInfo) {
762
785
  oPropertyInfo = Object.assign(oPropertyInfo, {
763
786
  maxConditions: !oPropertyInfo.isParameter && isMultiValue(oPropertyInfo) ? -1 : 1,
764
787
  required: oPropertyInfo.isParameter || aRequiredProps.indexOf(sPropertyPath) >= 0,
765
788
  caseSensitive: isCaseSensitive,
766
- dataType: selectionFieldTypes[sFilterFieldKey]
789
+ dataType: aTypeConfig[propertyInfoField.key].type
767
790
  });
768
791
 
769
792
  aFetchedProperties.push(oPropertyInfo);
@@ -787,7 +810,7 @@ export const processSelectionFields = function(propertyInfoFields: any, converte
787
810
  return aFetchedProperties;
788
811
  };
789
812
 
790
- export const insertCustomManifestElements = function(
813
+ export const insertCustomManifestElements = function (
791
814
  filterFields: FilterField[],
792
815
  entityType: EntityType,
793
816
  converterContext: ConverterContext
@@ -811,7 +834,7 @@ export const insertCustomManifestElements = function(
811
834
  * @param {string} annotationPath
812
835
  * @returns {FilterSelectionField[]} An array of selection fields
813
836
  */
814
- export const getSelectionFields = function(
837
+ export const getSelectionFields = function (
815
838
  converterContext: ConverterContext,
816
839
  lrTables: TableVisualization[] = [],
817
840
  annotationPath: string = ""
@@ -825,8 +848,12 @@ export const getSelectionFields = function(
825
848
 
826
849
  propertyInfoFields = insertCustomManifestElements(propertyInfoFields, entityType, converterContext);
827
850
 
828
- const aFetchedProperties = processSelectionFields(propertyInfoFields, converterContext);
829
- aFetchedProperties.sort(function(a: any, b: any) {
851
+ const aFetchedProperties = processSelectionFields(
852
+ propertyInfoFields,
853
+ converterContext,
854
+ oAnnotatedSelectionFieldData.defaultFilterFields
855
+ );
856
+ aFetchedProperties.sort(function (a: any, b: any) {
830
857
  if (a.groupLabel === undefined || a.groupLabel === null) {
831
858
  return -1;
832
859
  }
@@ -871,35 +898,17 @@ export const getSelectionFields = function(
871
898
  }, {});
872
899
  }
873
900
 
874
- let aSelectOptions: any[] = [];
875
- const selectionVariant = getSelectionVariant(entityType, converterContext);
876
- if (selectionVariant) {
877
- aSelectOptions = selectionVariant.SelectOptions;
878
- }
879
-
880
901
  // create a map of all potential filter fields based on...
881
902
  const filterFields: Record<string, FilterField> = oAnnotatedSelectionFieldData.filterFields;
882
903
 
883
- //Filters which has to be added which is part of SV/Default annotations but not present in the SelectionFields
884
- const annotatedSelectionFields = oAnnotatedSelectionFieldData.annotatedSelectionFields;
885
- const defaultFilters = _getDefaultFilterFields(
886
- filterFields,
887
- aSelectOptions,
888
- entityType,
889
- converterContext,
890
- excludedFilterProperties,
891
- annotatedSelectionFields
892
- );
893
-
894
904
  // finally create final list of filter fields by adding the SelectionFields first (order matters)...
895
905
  let allFilters = propSelectionFields
896
- // To add the FilterField which is not part of the Selection Fields but the property is mentioned in the Selection Variant
897
- .concat(defaultFilters || [])
906
+
898
907
  // ...and adding remaining filter fields, that are not used in a SelectionVariant (order doesn't matter)
899
908
  .concat(
900
909
  Object.keys(filterFields)
901
- .filter(propertyPath => !(propertyPath in excludedFilterProperties))
902
- .map(propertyPath => {
910
+ .filter((propertyPath) => !(propertyPath in excludedFilterProperties))
911
+ .map((propertyPath) => {
903
912
  return Object.assign(filterFields[propertyPath], filterFacetMap[propertyPath]);
904
913
  })
905
914
  );
@@ -912,8 +921,8 @@ export const getSelectionFields = function(
912
921
  // LR to get aggregates (without currency/unit properties since we expect to be able to filter them).
913
922
  const aggregates = lrTables[0].aggregates;
914
923
  if (aggregates) {
915
- const aggregatableProperties: string[] = Object.keys(aggregates).map(aggregateKey => aggregates[aggregateKey].relativePath);
916
- allFilters = allFilters.filter(filterField => {
924
+ const aggregatableProperties: string[] = Object.keys(aggregates).map((aggregateKey) => aggregates[aggregateKey].relativePath);
925
+ allFilters = allFilters.filter((filterField) => {
917
926
  return aggregatableProperties.indexOf(filterField.key) === -1;
918
927
  });
919
928
  }
@@ -923,9 +932,34 @@ export const getSelectionFields = function(
923
932
 
924
933
  // Add caseSensitive property to all selection fields.
925
934
  const isCaseSensitive = isFilteringCaseSensitive(converterContext);
926
- selectionFields.forEach(filterField => {
935
+ selectionFields.forEach((filterField) => {
927
936
  filterField.caseSensitive = isCaseSensitive;
928
937
  });
929
938
 
930
939
  return { selectionFields, sPropertyInfo };
931
940
  };
941
+
942
+ /**
943
+ * Determines whether the filter bar inside a value help dialog should be expanded. This is true if one of the following condition holds:
944
+ * (1) a filter property is mandatory,
945
+ * (2) no search field exists (entity isn't search enabled),
946
+ * (3) when the data isn't loaded by default (annotation FetchValues = 2).
947
+ * @param {ConverterContext} converterContext The converter context
948
+ * @param {any} filterRestrictionsAnnotation The FilterRestriction annotation
949
+ * @param {any} valueListAnnotation The ValueList annotation
950
+ * @returns {boolean} The value for expandFilterFields
951
+ */
952
+ export const getExpandFilterFields = function(
953
+ converterContext: ConverterContext,
954
+ filterRestrictionsAnnotation: any,
955
+ valueListAnnotation: any
956
+ ): boolean {
957
+ const requiredProperties = getFilterRestrictions(filterRestrictionsAnnotation, "RequiredProperties");
958
+ const searchRestrictions = getSearchRestrictions(converterContext);
959
+ const hideBasicSearch = Boolean(searchRestrictions && !searchRestrictions.Searchable);
960
+ const valueList = valueListAnnotation.getObject();
961
+ if (requiredProperties.length > 0 || hideBasicSearch || valueList?.FetchValues === 2) {
962
+ return true;
963
+ }
964
+ return false;
965
+ };