@sapui5/sap.fe.core 1.113.0 → 1.115.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 (375) hide show
  1. package/package.json +1 -1
  2. package/src/sap/fe/core/.library +1 -1
  3. package/src/sap/fe/core/ActionRuntime-dbg.js +68 -5
  4. package/src/sap/fe/core/ActionRuntime.js +1 -1
  5. package/src/sap/fe/core/ActionRuntime.js.map +1 -1
  6. package/src/sap/fe/core/ActionRuntime.ts +120 -4
  7. package/src/sap/fe/core/AppComponent-dbg.js +8 -2
  8. package/src/sap/fe/core/AppComponent.js +1 -1
  9. package/src/sap/fe/core/AppComponent.js.map +1 -1
  10. package/src/sap/fe/core/AppComponent.ts +19 -3
  11. package/src/sap/fe/core/AppStateHandler-dbg.js +14 -10
  12. package/src/sap/fe/core/AppStateHandler.js +1 -1
  13. package/src/sap/fe/core/AppStateHandler.js.map +1 -1
  14. package/src/sap/fe/core/AppStateHandler.ts +17 -11
  15. package/src/sap/fe/core/BaseController-dbg.js +1 -1
  16. package/src/sap/fe/core/BaseController.ts +13 -2
  17. package/src/sap/fe/core/CommonUtils-dbg.js +74 -317
  18. package/src/sap/fe/core/CommonUtils.js +1 -1
  19. package/src/sap/fe/core/CommonUtils.js.map +1 -1
  20. package/src/sap/fe/core/CommonUtils.ts +96 -473
  21. package/src/sap/fe/core/ExtensionAPI-dbg.js +1 -1
  22. package/src/sap/fe/core/ExtensionAPI.ts +2 -2
  23. package/src/sap/fe/core/StateFilterToSelectionVariant-dbg.js +263 -0
  24. package/src/sap/fe/core/StateFilterToSelectionVariant.js +6 -0
  25. package/src/sap/fe/core/StateFilterToSelectionVariant.js.map +1 -0
  26. package/src/sap/fe/core/StateFilterToSelectionVariant.ts +316 -0
  27. package/src/sap/fe/core/TemplateComponent-dbg.js +1 -1
  28. package/src/sap/fe/core/TemplateComponent.ts +6 -0
  29. package/src/sap/fe/core/buildingBlocks/BuildingBlockBase-dbg.js +10 -3
  30. package/src/sap/fe/core/buildingBlocks/BuildingBlockBase.js +1 -1
  31. package/src/sap/fe/core/buildingBlocks/BuildingBlockBase.js.map +1 -1
  32. package/src/sap/fe/core/buildingBlocks/BuildingBlockBase.ts +8 -1
  33. package/src/sap/fe/core/buildingBlocks/BuildingBlockSupport-dbg.js +1 -1
  34. package/src/sap/fe/core/buildingBlocks/BuildingBlockSupport.ts +1 -0
  35. package/src/sap/fe/core/buildingBlocks/BuildingBlockTemplateProcessor-dbg.js +8 -8
  36. package/src/sap/fe/core/buildingBlocks/BuildingBlockTemplateProcessor.js.map +1 -1
  37. package/src/sap/fe/core/buildingBlocks/BuildingBlockTemplateProcessor.ts +7 -7
  38. package/src/sap/fe/core/buildingBlocks/RuntimeBuildingBlockFragment-dbg.js +1 -1
  39. package/src/sap/fe/core/buildingBlocks/RuntimeBuildingBlockFragment.ts +1 -1
  40. package/src/sap/fe/core/controllerextensions/EditFlow-dbg.js +68 -36
  41. package/src/sap/fe/core/controllerextensions/EditFlow.js +1 -1
  42. package/src/sap/fe/core/controllerextensions/EditFlow.js.map +1 -1
  43. package/src/sap/fe/core/controllerextensions/EditFlow.ts +83 -43
  44. package/src/sap/fe/core/controllerextensions/InternalIntentBasedNavigation-dbg.js +12 -11
  45. package/src/sap/fe/core/controllerextensions/InternalIntentBasedNavigation.js +1 -1
  46. package/src/sap/fe/core/controllerextensions/InternalIntentBasedNavigation.js.map +1 -1
  47. package/src/sap/fe/core/controllerextensions/InternalIntentBasedNavigation.ts +17 -21
  48. package/src/sap/fe/core/controllerextensions/InternalRouting-dbg.js +233 -133
  49. package/src/sap/fe/core/controllerextensions/InternalRouting.js +1 -1
  50. package/src/sap/fe/core/controllerextensions/InternalRouting.js.map +1 -1
  51. package/src/sap/fe/core/controllerextensions/InternalRouting.ts +260 -145
  52. package/src/sap/fe/core/controllerextensions/MassEdit-dbg.js +1 -1
  53. package/src/sap/fe/core/controllerextensions/MassEdit.ts +3 -3
  54. package/src/sap/fe/core/controllerextensions/Routing-dbg.js +5 -3
  55. package/src/sap/fe/core/controllerextensions/Routing.js.map +1 -1
  56. package/src/sap/fe/core/controllerextensions/Routing.ts +5 -4
  57. package/src/sap/fe/core/controllerextensions/Share-dbg.js +3 -2
  58. package/src/sap/fe/core/controllerextensions/Share.js +1 -1
  59. package/src/sap/fe/core/controllerextensions/Share.js.map +1 -1
  60. package/src/sap/fe/core/controllerextensions/Share.ts +2 -1
  61. package/src/sap/fe/core/controllerextensions/SideEffects-dbg.js +19 -14
  62. package/src/sap/fe/core/controllerextensions/SideEffects.js +1 -1
  63. package/src/sap/fe/core/controllerextensions/SideEffects.js.map +1 -1
  64. package/src/sap/fe/core/controllerextensions/SideEffects.ts +25 -18
  65. package/src/sap/fe/core/controllerextensions/ViewState-dbg.js +40 -26
  66. package/src/sap/fe/core/controllerextensions/ViewState.js +1 -1
  67. package/src/sap/fe/core/controllerextensions/ViewState.js.map +1 -1
  68. package/src/sap/fe/core/controllerextensions/ViewState.ts +59 -33
  69. package/src/sap/fe/core/controllerextensions/collaboration/ActivitySync-dbg.js +8 -8
  70. package/src/sap/fe/core/controllerextensions/collaboration/ActivitySync.js +1 -1
  71. package/src/sap/fe/core/controllerextensions/collaboration/ActivitySync.js.map +1 -1
  72. package/src/sap/fe/core/controllerextensions/collaboration/ActivitySync.ts +23 -25
  73. package/src/sap/fe/core/controllerextensions/collaboration/CollaborationCommon-dbg.js +7 -45
  74. package/src/sap/fe/core/controllerextensions/collaboration/CollaborationCommon.js +1 -1
  75. package/src/sap/fe/core/controllerextensions/collaboration/CollaborationCommon.js.map +1 -1
  76. package/src/sap/fe/core/controllerextensions/collaboration/CollaborationCommon.ts +5 -48
  77. package/src/sap/fe/core/controllerextensions/editFlow/NotApplicableContextDialog-dbg.js +2 -2
  78. package/src/sap/fe/core/controllerextensions/editFlow/NotApplicableContextDialog.js +1 -1
  79. package/src/sap/fe/core/controllerextensions/editFlow/NotApplicableContextDialog.js.map +1 -1
  80. package/src/sap/fe/core/controllerextensions/editFlow/NotApplicableContextDialog.tsx +7 -3
  81. package/src/sap/fe/core/controllerextensions/editFlow/TransactionHelper-dbg.js +73 -90
  82. package/src/sap/fe/core/controllerextensions/editFlow/TransactionHelper.js +1 -1
  83. package/src/sap/fe/core/controllerextensions/editFlow/TransactionHelper.js.map +1 -1
  84. package/src/sap/fe/core/controllerextensions/editFlow/TransactionHelper.ts +88 -101
  85. package/src/sap/fe/core/controllerextensions/editFlow/draft-dbg.js +26 -4
  86. package/src/sap/fe/core/controllerextensions/editFlow/draft.js +1 -1
  87. package/src/sap/fe/core/controllerextensions/editFlow/draft.js.map +1 -1
  88. package/src/sap/fe/core/controllerextensions/editFlow/draft.ts +29 -3
  89. package/src/sap/fe/core/controllerextensions/editFlow/draftDataLossPopup-dbg.js +13 -10
  90. package/src/sap/fe/core/controllerextensions/editFlow/draftDataLossPopup.js +1 -1
  91. package/src/sap/fe/core/controllerextensions/editFlow/draftDataLossPopup.js.map +1 -1
  92. package/src/sap/fe/core/controllerextensions/editFlow/draftDataLossPopup.ts +7 -20
  93. package/src/sap/fe/core/controllerextensions/editFlow/operations/facade-dbg.js +64 -4
  94. package/src/sap/fe/core/controllerextensions/editFlow/operations/facade.js +1 -1
  95. package/src/sap/fe/core/controllerextensions/editFlow/operations/facade.js.map +1 -1
  96. package/src/sap/fe/core/controllerextensions/editFlow/operations/facade.ts +91 -8
  97. package/src/sap/fe/core/controllerextensions/editFlow/sticky-dbg.js +2 -4
  98. package/src/sap/fe/core/controllerextensions/editFlow/sticky.js +1 -1
  99. package/src/sap/fe/core/controllerextensions/editFlow/sticky.js.map +1 -1
  100. package/src/sap/fe/core/controllerextensions/editFlow/sticky.ts +3 -5
  101. package/src/sap/fe/core/controllerextensions/messageHandler/messageHandling-dbg.js +9 -9
  102. package/src/sap/fe/core/controllerextensions/messageHandler/messageHandling.js +1 -1
  103. package/src/sap/fe/core/controllerextensions/messageHandler/messageHandling.js.map +1 -1
  104. package/src/sap/fe/core/controllerextensions/messageHandler/messageHandling.ts +8 -8
  105. package/src/sap/fe/core/controls/ActionParameterDialog.fragment.xml +2 -0
  106. package/src/sap/fe/core/controls/CommandExecution-dbg.js +4 -9
  107. package/src/sap/fe/core/controls/CommandExecution.js +1 -1
  108. package/src/sap/fe/core/controls/CommandExecution.js.map +1 -1
  109. package/src/sap/fe/core/controls/CommandExecution.ts +0 -8
  110. package/src/sap/fe/core/controls/DataLossOrDraftDiscard/DraftDataLossDialog.block-dbg.js +335 -0
  111. package/src/sap/fe/core/controls/DataLossOrDraftDiscard/DraftDataLossDialog.block.js +6 -0
  112. package/src/sap/fe/core/controls/DataLossOrDraftDiscard/DraftDataLossDialog.block.js.map +1 -0
  113. package/src/sap/fe/core/controls/DataLossOrDraftDiscard/DraftDataLossDialog.block.tsx +336 -0
  114. package/src/sap/fe/core/controls/NonComputedVisibleKeyFieldsDialog.fragment.xml +1 -0
  115. package/src/sap/fe/core/controls/filterbar/VisualFilter-dbg.js +3 -28
  116. package/src/sap/fe/core/controls/filterbar/VisualFilter.js +1 -1
  117. package/src/sap/fe/core/controls/filterbar/VisualFilter.js.map +1 -1
  118. package/src/sap/fe/core/controls/filterbar/VisualFilter.ts +8 -29
  119. package/src/sap/fe/core/controls/filterbar/adapter/SelectionVariantToStateFilters-dbg.js +435 -0
  120. package/src/sap/fe/core/controls/filterbar/adapter/SelectionVariantToStateFilters.js +6 -0
  121. package/src/sap/fe/core/controls/filterbar/adapter/SelectionVariantToStateFilters.js.map +1 -0
  122. package/src/sap/fe/core/controls/filterbar/adapter/SelectionVariantToStateFilters.ts +532 -0
  123. package/src/sap/fe/core/controls/filterbar/utils/VisualFilterUtils-dbg.js +30 -1
  124. package/src/sap/fe/core/controls/filterbar/utils/VisualFilterUtils.js +1 -1
  125. package/src/sap/fe/core/controls/filterbar/utils/VisualFilterUtils.js.map +1 -1
  126. package/src/sap/fe/core/controls/filterbar/utils/VisualFilterUtils.ts +38 -0
  127. package/src/sap/fe/core/converters/ManifestSettings-dbg.js +1 -1
  128. package/src/sap/fe/core/converters/ManifestSettings.ts +7 -5
  129. package/src/sap/fe/core/converters/MetaModelConverter-dbg.js +36 -4
  130. package/src/sap/fe/core/converters/MetaModelConverter.js +1 -1
  131. package/src/sap/fe/core/converters/MetaModelConverter.js.map +1 -1
  132. package/src/sap/fe/core/converters/MetaModelConverter.ts +45 -4
  133. package/src/sap/fe/core/converters/TemplateConverter-dbg.js +2 -3
  134. package/src/sap/fe/core/converters/TemplateConverter.js +1 -1
  135. package/src/sap/fe/core/converters/TemplateConverter.js.map +1 -1
  136. package/src/sap/fe/core/converters/TemplateConverter.ts +1 -6
  137. package/src/sap/fe/core/converters/annotations/DataField-dbg.js +18 -3
  138. package/src/sap/fe/core/converters/annotations/DataField.js +1 -1
  139. package/src/sap/fe/core/converters/annotations/DataField.js.map +1 -1
  140. package/src/sap/fe/core/converters/annotations/DataField.ts +18 -2
  141. package/src/sap/fe/core/converters/common/AnnotationConverter-dbg.js +679 -676
  142. package/src/sap/fe/core/converters/common/AnnotationConverter.js +1 -1
  143. package/src/sap/fe/core/converters/common/AnnotationConverter.js.map +1 -1
  144. package/src/sap/fe/core/converters/controls/Common/Chart-dbg.js +32 -20
  145. package/src/sap/fe/core/converters/controls/Common/Chart.js +1 -1
  146. package/src/sap/fe/core/converters/controls/Common/Chart.js.map +1 -1
  147. package/src/sap/fe/core/converters/controls/Common/Chart.ts +30 -18
  148. package/src/sap/fe/core/converters/controls/Common/DataVisualization-dbg.js +4 -5
  149. package/src/sap/fe/core/converters/controls/Common/DataVisualization.js +1 -1
  150. package/src/sap/fe/core/converters/controls/Common/DataVisualization.js.map +1 -1
  151. package/src/sap/fe/core/converters/controls/Common/DataVisualization.ts +6 -37
  152. package/src/sap/fe/core/converters/controls/Common/Table-dbg.js +100 -72
  153. package/src/sap/fe/core/converters/controls/Common/Table.js +1 -1
  154. package/src/sap/fe/core/converters/controls/Common/Table.js.map +1 -1
  155. package/src/sap/fe/core/converters/controls/Common/Table.ts +146 -99
  156. package/src/sap/fe/core/converters/controls/Common/table/StandardActions-dbg.js +37 -10
  157. package/src/sap/fe/core/converters/controls/Common/table/StandardActions.js +1 -1
  158. package/src/sap/fe/core/converters/controls/Common/table/StandardActions.js.map +1 -1
  159. package/src/sap/fe/core/converters/controls/Common/table/StandardActions.ts +49 -16
  160. package/src/sap/fe/core/converters/controls/ListReport/FilterBar-dbg.js +47 -18
  161. package/src/sap/fe/core/converters/controls/ListReport/FilterBar.js +1 -1
  162. package/src/sap/fe/core/converters/controls/ListReport/FilterBar.js.map +1 -1
  163. package/src/sap/fe/core/converters/controls/ListReport/FilterBar.ts +74 -20
  164. package/src/sap/fe/core/converters/controls/ListReport/VisualFilters-dbg.js +26 -9
  165. package/src/sap/fe/core/converters/controls/ListReport/VisualFilters.js +1 -1
  166. package/src/sap/fe/core/converters/controls/ListReport/VisualFilters.js.map +1 -1
  167. package/src/sap/fe/core/converters/controls/ListReport/VisualFilters.ts +24 -8
  168. package/src/sap/fe/core/converters/helpers/Aggregation-dbg.js +28 -2
  169. package/src/sap/fe/core/converters/helpers/Aggregation.js +1 -1
  170. package/src/sap/fe/core/converters/helpers/Aggregation.js.map +1 -1
  171. package/src/sap/fe/core/converters/helpers/Aggregation.ts +28 -9
  172. package/src/sap/fe/core/converters/helpers/InsightsHelpers-dbg.js +39 -0
  173. package/src/sap/fe/core/converters/helpers/InsightsHelpers.js +6 -0
  174. package/src/sap/fe/core/converters/helpers/InsightsHelpers.js.map +1 -0
  175. package/src/sap/fe/core/converters/helpers/InsightsHelpers.ts +45 -0
  176. package/src/sap/fe/core/converters/templates/ListReportConverter-dbg.js +13 -15
  177. package/src/sap/fe/core/converters/templates/ListReportConverter.js +1 -1
  178. package/src/sap/fe/core/converters/templates/ListReportConverter.js.map +1 -1
  179. package/src/sap/fe/core/converters/templates/ListReportConverter.ts +18 -54
  180. package/src/sap/fe/core/converters/templates/ObjectPageConverter-dbg.js +12 -12
  181. package/src/sap/fe/core/converters/templates/ObjectPageConverter.js +1 -1
  182. package/src/sap/fe/core/converters/templates/ObjectPageConverter.js.map +1 -1
  183. package/src/sap/fe/core/converters/templates/ObjectPageConverter.ts +16 -11
  184. package/src/sap/fe/core/formatters/CollaborationFormatter-dbg.js +17 -33
  185. package/src/sap/fe/core/formatters/CollaborationFormatter.js +1 -1
  186. package/src/sap/fe/core/formatters/CollaborationFormatter.js.map +1 -1
  187. package/src/sap/fe/core/formatters/CollaborationFormatter.ts +27 -22
  188. package/src/sap/fe/core/formatters/ValueFormatter-dbg.js +5 -11
  189. package/src/sap/fe/core/formatters/ValueFormatter.js +1 -1
  190. package/src/sap/fe/core/formatters/ValueFormatter.js.map +1 -1
  191. package/src/sap/fe/core/formatters/ValueFormatter.ts +4 -25
  192. package/src/sap/fe/core/fpm/Component-dbg.js +3 -1
  193. package/src/sap/fe/core/fpm/Component.js +1 -1
  194. package/src/sap/fe/core/fpm/Component.js.map +1 -1
  195. package/src/sap/fe/core/fpm/Component.ts +3 -1
  196. package/src/sap/fe/core/fpm/manifest.json +1 -1
  197. package/src/sap/fe/core/helpers/BindingToolkit-dbg.js +74 -26
  198. package/src/sap/fe/core/helpers/BindingToolkit.js +1 -1
  199. package/src/sap/fe/core/helpers/BindingToolkit.js.map +1 -1
  200. package/src/sap/fe/core/helpers/BindingToolkit.ts +116 -33
  201. package/src/sap/fe/core/helpers/DeleteHelper-dbg.js +82 -37
  202. package/src/sap/fe/core/helpers/DeleteHelper.js +1 -1
  203. package/src/sap/fe/core/helpers/DeleteHelper.js.map +1 -1
  204. package/src/sap/fe/core/helpers/DeleteHelper.ts +109 -56
  205. package/src/sap/fe/core/helpers/KeepAliveHelper-dbg.js +1 -1
  206. package/src/sap/fe/core/helpers/KeepAliveHelper.ts +7 -5
  207. package/src/sap/fe/core/helpers/MassEditHelper-dbg.js +13 -3
  208. package/src/sap/fe/core/helpers/MassEditHelper.js +1 -1
  209. package/src/sap/fe/core/helpers/MassEditHelper.js.map +1 -1
  210. package/src/sap/fe/core/helpers/MassEditHelper.ts +28 -18
  211. package/src/sap/fe/core/helpers/MessageStrip-dbg.js +1 -1
  212. package/src/sap/fe/core/helpers/MessageStrip.ts +2 -1
  213. package/src/sap/fe/core/helpers/ModelHelper-dbg.js +1 -1
  214. package/src/sap/fe/core/helpers/ModelHelper.ts +3 -3
  215. package/src/sap/fe/core/helpers/RecommendationHelper-dbg.js +71 -0
  216. package/src/sap/fe/core/helpers/RecommendationHelper.js +6 -0
  217. package/src/sap/fe/core/helpers/RecommendationHelper.js.map +1 -0
  218. package/src/sap/fe/core/helpers/RecommendationHelper.ts +94 -0
  219. package/src/sap/fe/core/helpers/ResourceModelHelper-dbg.js +5 -2
  220. package/src/sap/fe/core/helpers/ResourceModelHelper.js +1 -1
  221. package/src/sap/fe/core/helpers/ResourceModelHelper.js.map +1 -1
  222. package/src/sap/fe/core/helpers/ResourceModelHelper.ts +5 -0
  223. package/src/sap/fe/core/helpers/StableIdHelper-dbg.js +24 -2
  224. package/src/sap/fe/core/helpers/StableIdHelper.js +1 -1
  225. package/src/sap/fe/core/helpers/StableIdHelper.js.map +1 -1
  226. package/src/sap/fe/core/helpers/StableIdHelper.ts +23 -1
  227. package/src/sap/fe/core/helpers/TitleHelper-dbg.js +239 -0
  228. package/src/sap/fe/core/helpers/TitleHelper.js +6 -0
  229. package/src/sap/fe/core/helpers/TitleHelper.js.map +1 -0
  230. package/src/sap/fe/core/helpers/TitleHelper.ts +295 -0
  231. package/src/sap/fe/core/jsx-runtime/ViewLoader-dbg.js +4 -1
  232. package/src/sap/fe/core/jsx-runtime/ViewLoader.js +1 -1
  233. package/src/sap/fe/core/jsx-runtime/ViewLoader.js.map +1 -1
  234. package/src/sap/fe/core/jsx-runtime/ViewLoader.tsx +3 -0
  235. package/src/sap/fe/core/jsx-runtime/jsx-control-dbg.js +41 -17
  236. package/src/sap/fe/core/jsx-runtime/jsx-control.js +1 -1
  237. package/src/sap/fe/core/jsx-runtime/jsx-control.js.map +1 -1
  238. package/src/sap/fe/core/jsx-runtime/jsx-control.ts +45 -21
  239. package/src/sap/fe/core/jsx-runtime/jsx-dbg.js +1 -1
  240. package/src/sap/fe/core/jsx-runtime/jsx.ts +1 -0
  241. package/src/sap/fe/core/jsx-runtime/useMDXComponents-dbg.js +8 -4
  242. package/src/sap/fe/core/jsx-runtime/useMDXComponents.js +1 -1
  243. package/src/sap/fe/core/jsx-runtime/useMDXComponents.js.map +1 -1
  244. package/src/sap/fe/core/jsx-runtime/useMDXComponents.tsx +7 -2
  245. package/src/sap/fe/core/library-dbg.js +4 -3
  246. package/src/sap/fe/core/library-preload.js +91 -74
  247. package/src/sap/fe/core/library-preload.js.map +1 -1
  248. package/src/sap/fe/core/library.js +1 -1
  249. package/src/sap/fe/core/library.js.map +1 -1
  250. package/src/sap/fe/core/library.ts +1 -1
  251. package/src/sap/fe/core/manifest.json +1 -1
  252. package/src/sap/fe/core/manifestMerger/ChangePageConfiguration-dbg.js +4 -3
  253. package/src/sap/fe/core/manifestMerger/ChangePageConfiguration.js +1 -1
  254. package/src/sap/fe/core/manifestMerger/ChangePageConfiguration.js.map +1 -1
  255. package/src/sap/fe/core/manifestMerger/ChangePageConfiguration.ts +3 -2
  256. package/src/sap/fe/core/messagebundle.properties +12 -8
  257. package/src/sap/fe/core/messagebundle_ar.properties +7 -5
  258. package/src/sap/fe/core/messagebundle_bg.properties +7 -5
  259. package/src/sap/fe/core/messagebundle_ca.properties +7 -5
  260. package/src/sap/fe/core/messagebundle_cs.properties +7 -5
  261. package/src/sap/fe/core/messagebundle_cy.properties +7 -5
  262. package/src/sap/fe/core/messagebundle_da.properties +7 -5
  263. package/src/sap/fe/core/messagebundle_de.properties +7 -5
  264. package/src/sap/fe/core/messagebundle_el.properties +7 -5
  265. package/src/sap/fe/core/messagebundle_en.properties +7 -5
  266. package/src/sap/fe/core/messagebundle_en_GB.properties +6 -4
  267. package/src/sap/fe/core/messagebundle_en_US_sappsd.properties +7 -4
  268. package/src/sap/fe/core/messagebundle_en_US_saprigi.properties +6 -4
  269. package/src/sap/fe/core/messagebundle_en_US_saptrc.properties +7 -4
  270. package/src/sap/fe/core/messagebundle_es.properties +7 -5
  271. package/src/sap/fe/core/messagebundle_es_MX.properties +7 -5
  272. package/src/sap/fe/core/messagebundle_et.properties +7 -5
  273. package/src/sap/fe/core/messagebundle_fi.properties +7 -5
  274. package/src/sap/fe/core/messagebundle_fr.properties +7 -5
  275. package/src/sap/fe/core/messagebundle_fr_CA.properties +8 -6
  276. package/src/sap/fe/core/messagebundle_hi.properties +7 -5
  277. package/src/sap/fe/core/messagebundle_hr.properties +7 -5
  278. package/src/sap/fe/core/messagebundle_hu.properties +7 -5
  279. package/src/sap/fe/core/messagebundle_id.properties +7 -5
  280. package/src/sap/fe/core/messagebundle_it.properties +8 -6
  281. package/src/sap/fe/core/messagebundle_iw.properties +7 -5
  282. package/src/sap/fe/core/messagebundle_ja.properties +7 -5
  283. package/src/sap/fe/core/messagebundle_kk.properties +7 -5
  284. package/src/sap/fe/core/messagebundle_ko.properties +7 -5
  285. package/src/sap/fe/core/messagebundle_lt.properties +7 -5
  286. package/src/sap/fe/core/messagebundle_lv.properties +7 -5
  287. package/src/sap/fe/core/messagebundle_ms.properties +7 -5
  288. package/src/sap/fe/core/messagebundle_nl.properties +7 -5
  289. package/src/sap/fe/core/messagebundle_no.properties +7 -5
  290. package/src/sap/fe/core/messagebundle_pl.properties +7 -5
  291. package/src/sap/fe/core/messagebundle_pt.properties +7 -5
  292. package/src/sap/fe/core/messagebundle_pt_PT.properties +7 -5
  293. package/src/sap/fe/core/messagebundle_ro.properties +7 -5
  294. package/src/sap/fe/core/messagebundle_ru.properties +7 -5
  295. package/src/sap/fe/core/messagebundle_sh.properties +7 -5
  296. package/src/sap/fe/core/messagebundle_sk.properties +7 -5
  297. package/src/sap/fe/core/messagebundle_sl.properties +7 -5
  298. package/src/sap/fe/core/messagebundle_sv.properties +7 -5
  299. package/src/sap/fe/core/messagebundle_th.properties +7 -5
  300. package/src/sap/fe/core/messagebundle_tr.properties +7 -5
  301. package/src/sap/fe/core/messagebundle_uk.properties +7 -5
  302. package/src/sap/fe/core/messagebundle_vi.properties +7 -5
  303. package/src/sap/fe/core/messagebundle_zh_CN.properties +7 -5
  304. package/src/sap/fe/core/messagebundle_zh_TW.properties +7 -5
  305. package/src/sap/fe/core/operationsHelper-dbg.js +1 -1
  306. package/src/sap/fe/core/operationsHelper.ts +1 -1
  307. package/src/sap/fe/core/rootView/Fcl-dbg.controller.js +8 -2
  308. package/src/sap/fe/core/rootView/Fcl.controller.js +1 -1
  309. package/src/sap/fe/core/rootView/Fcl.controller.js.map +1 -1
  310. package/src/sap/fe/core/rootView/Fcl.controller.ts +8 -1
  311. package/src/sap/fe/core/rootView/NavContainer-dbg.controller.js +8 -2
  312. package/src/sap/fe/core/rootView/NavContainer.controller.js +1 -1
  313. package/src/sap/fe/core/rootView/NavContainer.controller.js.map +1 -1
  314. package/src/sap/fe/core/rootView/NavContainer.controller.ts +10 -3
  315. package/src/sap/fe/core/rootView/RootViewBaseController-dbg.js +16 -6
  316. package/src/sap/fe/core/rootView/RootViewBaseController.js +1 -1
  317. package/src/sap/fe/core/rootView/RootViewBaseController.js.map +1 -1
  318. package/src/sap/fe/core/rootView/RootViewBaseController.ts +10 -4
  319. package/src/sap/fe/core/services/EnvironmentServiceFactory-dbg.js +54 -5
  320. package/src/sap/fe/core/services/EnvironmentServiceFactory.js +1 -1
  321. package/src/sap/fe/core/services/EnvironmentServiceFactory.js.map +1 -1
  322. package/src/sap/fe/core/services/EnvironmentServiceFactory.ts +52 -6
  323. package/src/sap/fe/core/services/NavigationServiceFactory-dbg.js +31 -14
  324. package/src/sap/fe/core/services/NavigationServiceFactory.js +1 -1
  325. package/src/sap/fe/core/services/NavigationServiceFactory.js.map +1 -1
  326. package/src/sap/fe/core/services/NavigationServiceFactory.ts +15 -1
  327. package/src/sap/fe/core/services/RoutingServiceFactory-dbg.js +10 -4
  328. package/src/sap/fe/core/services/RoutingServiceFactory.js +1 -1
  329. package/src/sap/fe/core/services/RoutingServiceFactory.js.map +1 -1
  330. package/src/sap/fe/core/services/RoutingServiceFactory.ts +29 -7
  331. package/src/sap/fe/core/services/SideEffectsServiceFactory-dbg.js +5 -2
  332. package/src/sap/fe/core/services/SideEffectsServiceFactory.js +1 -1
  333. package/src/sap/fe/core/services/SideEffectsServiceFactory.js.map +1 -1
  334. package/src/sap/fe/core/services/SideEffectsServiceFactory.ts +9 -5
  335. package/src/sap/fe/core/services/TemplatedViewServiceFactory-dbg.js +1 -2
  336. package/src/sap/fe/core/services/TemplatedViewServiceFactory.js.map +1 -1
  337. package/src/sap/fe/core/services/TemplatedViewServiceFactory.ts +2 -18
  338. package/src/sap/fe/core/templating/CommonFormatters-dbg.js +8 -8
  339. package/src/sap/fe/core/templating/CommonFormatters.js.map +1 -1
  340. package/src/sap/fe/core/templating/CommonFormatters.ts +9 -9
  341. package/src/sap/fe/core/templating/CriticalityFormatters-dbg.js +1 -1
  342. package/src/sap/fe/core/templating/CriticalityFormatters.ts +2 -2
  343. package/src/sap/fe/core/templating/DataFieldFormatters-dbg.js +38 -2
  344. package/src/sap/fe/core/templating/DataFieldFormatters.js +1 -1
  345. package/src/sap/fe/core/templating/DataFieldFormatters.js.map +1 -1
  346. package/src/sap/fe/core/templating/DataFieldFormatters.ts +40 -0
  347. package/src/sap/fe/core/templating/FieldControlHelper-dbg.js +5 -6
  348. package/src/sap/fe/core/templating/FieldControlHelper.js +1 -1
  349. package/src/sap/fe/core/templating/FieldControlHelper.js.map +1 -1
  350. package/src/sap/fe/core/templating/FieldControlHelper.ts +13 -11
  351. package/src/sap/fe/core/templating/FilterHelper-dbg.js +13 -1
  352. package/src/sap/fe/core/templating/FilterHelper.js +1 -1
  353. package/src/sap/fe/core/templating/FilterHelper.js.map +1 -1
  354. package/src/sap/fe/core/templating/FilterHelper.ts +13 -1
  355. package/src/sap/fe/core/templating/PropertyHelper-dbg.js +1 -1
  356. package/src/sap/fe/core/templating/PropertyHelper.ts +7 -7
  357. package/src/sap/fe/core/templating/UIFormatters-dbg.js +5 -6
  358. package/src/sap/fe/core/templating/UIFormatters.js +1 -1
  359. package/src/sap/fe/core/templating/UIFormatters.js.map +1 -1
  360. package/src/sap/fe/core/templating/UIFormatters.ts +6 -7
  361. package/src/sap/fe/core/type/TypeUtil-dbg.js +2 -2
  362. package/src/sap/fe/core/type/TypeUtil.js +1 -1
  363. package/src/sap/fe/core/type/TypeUtil.js.map +1 -1
  364. package/src/sap/fe/core/type/TypeUtil.ts +2 -2
  365. package/src/sap/fe/core/controllerextensions/collaboration/Manage-dbg.js +0 -243
  366. package/src/sap/fe/core/controllerextensions/collaboration/Manage.js +0 -6
  367. package/src/sap/fe/core/controllerextensions/collaboration/Manage.js.map +0 -1
  368. package/src/sap/fe/core/controllerextensions/collaboration/Manage.ts +0 -283
  369. package/src/sap/fe/core/controllerextensions/collaboration/ManageDialog.fragment.xml +0 -121
  370. package/src/sap/fe/core/controllerextensions/collaboration/UserDetails.fragment.xml +0 -11
  371. package/src/sap/fe/core/controls/DataLossOrDraftDiscard/DataLossDraft.fragment.xml +0 -59
  372. package/src/sap/fe/core/controls/DataLossOrDraftDiscard/DataLossOrDraftDiscardHandler-dbg.js +0 -171
  373. package/src/sap/fe/core/controls/DataLossOrDraftDiscard/DataLossOrDraftDiscardHandler.js +0 -6
  374. package/src/sap/fe/core/controls/DataLossOrDraftDiscard/DataLossOrDraftDiscardHandler.js.map +0 -1
  375. package/src/sap/fe/core/controls/DataLossOrDraftDiscard/DataLossOrDraftDiscardHandler.ts +0 -184
@@ -8,6 +8,7 @@ import uniqueSort from "sap/base/util/array/uniqueSort";
8
8
  import mergeObjects from "sap/base/util/merge";
9
9
  import type AppComponent from "sap/fe/core/AppComponent";
10
10
  import type { ComponentData } from "sap/fe/core/AppComponent";
11
+ import type { FEView } from "sap/fe/core/BaseController";
11
12
  import ConverterContext from "sap/fe/core/converters/ConverterContext";
12
13
  import * as MetaModelConverter from "sap/fe/core/converters/MetaModelConverter";
13
14
  import { compileExpression, pathInModel } from "sap/fe/core/helpers/BindingToolkit";
@@ -15,8 +16,10 @@ import type { InternalModelContext } from "sap/fe/core/helpers/ModelHelper";
15
16
  import ModelHelper from "sap/fe/core/helpers/ModelHelper";
16
17
  import SemanticDateOperators from "sap/fe/core/helpers/SemanticDateOperators";
17
18
  import { generate } from "sap/fe/core/helpers/StableIdHelper";
19
+ import FELibrary from "sap/fe/core/library";
18
20
  import type PageController from "sap/fe/core/PageController";
19
21
  import type { IShellServices } from "sap/fe/core/services/ShellServicesFactory";
22
+ import StateFilterToSelectionVariant from "sap/fe/core/StateFilterToSelectionVariant";
20
23
  import type Diagnostics from "sap/fe/core/support/Diagnostics";
21
24
  import TypeUtil from "sap/fe/core/type/TypeUtil";
22
25
  import type SelectionVariant from "sap/fe/navigation/SelectionVariant";
@@ -40,7 +43,6 @@ import type ActionToolbarAction from "sap/ui/mdc/actiontoolbar/ActionToolbarActi
40
43
  import type { default as MDCChart } from "sap/ui/mdc/Chart";
41
44
  import type { ConditionObject } from "sap/ui/mdc/condition/Condition";
42
45
  import FilterOperatorUtil from "sap/ui/mdc/condition/FilterOperatorUtil";
43
- import RangeOperator from "sap/ui/mdc/condition/RangeOperator";
44
46
  import type FilterBar from "sap/ui/mdc/FilterBar";
45
47
  import type Table from "sap/ui/mdc/Table";
46
48
  import type MDCTable from "sap/ui/mdc/valuehelp/content/MDCTable";
@@ -65,16 +67,20 @@ import AnyElement from "./controls/AnyElement";
65
67
  import * as MetaModelFunction from "./helpers/MetaModelFunction";
66
68
  import { getConditions } from "./templating/FilterHelper";
67
69
 
68
- type ConditionType = {
69
- operator: string;
70
- values: Array<unknown> | undefined;
71
- validated?: string;
72
- };
70
+ const ProgrammingModel = FELibrary.ProgrammingModel;
73
71
 
74
72
  type MyInboxIntent = {
75
73
  semanticObject: string;
76
74
  action: string;
77
75
  };
76
+ type ExternalFilter = {
77
+ filterConditions: Record<string, ConditionObject[]>;
78
+ filterConditionsWithoutConflict?: Record<string, string>;
79
+ };
80
+
81
+ type NavigationInfo = {
82
+ propertiesWithoutConflict?: Record<string, string>;
83
+ };
78
84
 
79
85
  function normalizeSearchTerm(sSearchTerm: string) {
80
86
  if (!sSearchTerm) {
@@ -419,7 +425,7 @@ function _getSemanticObjectAnnotations(oEntityAnnotations: Record<string, unknow
419
425
  }
420
426
 
421
427
  function fnUpdateRelatedAppsDetails(oObjectPageLayout: ObjectPageLayout, appComponent: AppComponent) {
422
- const oMetaModel = oObjectPageLayout.getModel().getMetaModel() as ODataMetaModel;
428
+ const oMetaModel = (oObjectPageLayout.getModel() as ODataModel).getMetaModel();
423
429
  const oBindingContext = oObjectPageLayout.getBindingContext() as ODataV4Context;
424
430
  const path = (oBindingContext && oBindingContext.getPath()) || "";
425
431
  const oMetaPath = oMetaModel.getMetaPath(path);
@@ -484,12 +490,12 @@ function getCurrentPageView(oAppComponent: AppComponent) {
484
490
  : CommonUtils.getTargetView((oAppComponent.getRootContainer() as NavContainer).getCurrentPage());
485
491
  }
486
492
 
487
- function getTargetView(oControl: ManagedObject | null): View {
493
+ function getTargetView(oControl: ManagedObject | null): FEView {
488
494
  if (oControl && oControl.isA<ComponentContainer>("sap.ui.core.ComponentContainer")) {
489
495
  const oComponent = oControl.getComponentInstance();
490
496
  oControl = oComponent && oComponent.getRootControl();
491
497
  }
492
- while (oControl && !oControl.isA<View>("sap.ui.core.mvc.View")) {
498
+ while (oControl && !oControl.isA<FEView>("sap.ui.core.mvc.View")) {
493
499
  oControl = oControl.getParent();
494
500
  }
495
501
  return oControl!;
@@ -1008,304 +1014,9 @@ function addSemanticDatesToConditions(oSemanticDates: SemanticDateConfiguration)
1008
1014
  };
1009
1015
  }
1010
1016
 
1011
- function addSelectOptionsToConditions(
1012
- sContextPath: string,
1013
- oSelectionVariant: SelectionVariant,
1014
- sSelectOptionProp: string,
1015
- oConditions: Record<string, ConditionObject[]>,
1016
- sConditionPath: string | undefined,
1017
- sConditionProp: string,
1018
- oValidProperties: Record<string, MetaModelProperty>,
1019
- metaModelContext: ODataMetaModel,
1020
- isParameter: boolean,
1021
- bIsFLPValuePresent?: boolean,
1022
- bUseSemanticDateRange?: boolean | string,
1023
- oViewData?: object
1024
- ) {
1025
- let aConditions: ConditionObject[] = [],
1026
- aSelectOptions: SelectOption[],
1027
- aValidOperators: string[],
1028
- aSemanticDateOperators: string[] = [];
1029
-
1030
- if (isParameter || MetaModelFunction.isPropertyFilterable(metaModelContext, sContextPath, sConditionProp, true)) {
1031
- const oPropertyMetadata = oValidProperties[sConditionProp];
1032
- aSelectOptions = oSelectionVariant.getSelectOption(sSelectOptionProp) as SelectOption[];
1033
- const settings = getFilterConfigurationSetting(oViewData, sConditionProp);
1034
- aValidOperators = isParameter ? ["EQ"] : CommonUtils.getOperatorsForProperty(sConditionProp, sContextPath, metaModelContext);
1035
- if (bUseSemanticDateRange) {
1036
- aSemanticDateOperators = isParameter
1037
- ? ["EQ"]
1038
- : CommonUtils.getOperatorsForProperty(
1039
- sConditionProp,
1040
- sContextPath,
1041
- metaModelContext,
1042
- oPropertyMetadata?.$Type,
1043
- bUseSemanticDateRange,
1044
- settings
1045
- );
1046
- }
1047
- // Create conditions for all the selectOptions of the property
1048
- aConditions = isParameter
1049
- ? CommonUtils.addSelectOptionToConditions(
1050
- oPropertyMetadata,
1051
- aValidOperators,
1052
- aSemanticDateOperators,
1053
- aConditions,
1054
- aSelectOptions[0]
1055
- )
1056
- : aSelectOptions.reduce(
1057
- CommonUtils.addSelectOptionToConditions.bind(null, oPropertyMetadata, aValidOperators, aSemanticDateOperators),
1058
- aConditions
1059
- );
1060
- if (aConditions.length) {
1061
- if (sConditionPath) {
1062
- oConditions[sConditionPath + sConditionProp] = oConditions.hasOwnProperty(sConditionPath + sConditionProp)
1063
- ? oConditions[sConditionPath + sConditionProp].concat(aConditions)
1064
- : aConditions;
1065
- } else if (bIsFLPValuePresent) {
1066
- // If FLP values are present replace it with FLP values
1067
- aConditions.forEach((element) => {
1068
- element["filtered"] = true;
1069
- });
1070
- if (oConditions.hasOwnProperty(sConditionProp)) {
1071
- oConditions[sConditionProp].forEach((element) => {
1072
- element["filtered"] = false;
1073
- });
1074
- oConditions[sConditionProp] = oConditions[sConditionProp].concat(aConditions);
1075
- } else {
1076
- oConditions[sConditionProp] = aConditions;
1077
- }
1078
- } else {
1079
- oConditions[sConditionProp] = oConditions.hasOwnProperty(sConditionProp)
1080
- ? oConditions[sConditionProp].concat(aConditions)
1081
- : aConditions;
1082
- }
1083
- }
1084
- }
1085
- }
1086
-
1087
- /**
1088
- * Method to create the semantic dates from filter conditions
1089
- *
1090
- * @function
1091
- * @name createSemanticDatesFromConditions
1092
- * @param oCondition Filter field condition
1093
- * @param sFilterName Filter Field Path
1094
- * @returns The Semantic date conditions
1095
- */
1096
-
1097
- function createSemanticDatesFromConditions(oCondition: ConditionType): SemanticDateConfiguration {
1098
- return {
1099
- high: (oCondition?.values?.[0] as string) || null,
1100
- low: (oCondition?.values?.[1] as string) || null,
1101
- operator: oCondition?.operator
1102
- };
1103
- }
1104
-
1105
- /**
1106
- * Method to Return the filter configuration
1107
- *
1108
- * @function
1109
- * @name getFilterConfigurationSetting
1110
- * @param oViewData manifest Configuration
1111
- * @param sProperty Filter Field Path
1112
- * @returns The Filter Field Configuration
1113
- */
1114
1017
  type ViewData = {
1115
1018
  controlConfiguration?: Record<string, Record<string, unknown>>;
1116
1019
  };
1117
- function getFilterConfigurationSetting(oViewData: ViewData = {}, sProperty: string) {
1118
- const oConfig = oViewData?.controlConfiguration;
1119
- const filterConfig =
1120
- oConfig && (oConfig["@com.sap.vocabularies.UI.v1.SelectionFields"]?.filterFields as Record<string, { settings: string }>);
1121
- return filterConfig?.[sProperty] ? filterConfig[sProperty]?.settings : undefined;
1122
- }
1123
- function addSelectionVariantToConditions(
1124
- oSelectionVariant: SelectionVariant,
1125
- oConditions: Record<string, ConditionObject[]>,
1126
- oMetaModelContext: ODataMetaModel,
1127
- sContextPath: string,
1128
- bIsFLPValues?: boolean,
1129
- bUseSemanticDateRange?: boolean,
1130
- oViewData?: object
1131
- ) {
1132
- const aSelectOptionsPropertyNames = oSelectionVariant.getSelectOptionsPropertyNames(),
1133
- oValidProperties = CommonUtils.getContextPathProperties(oMetaModelContext, sContextPath),
1134
- aMetadatProperties = Object.keys(oValidProperties),
1135
- oParameterInfo = CommonUtils.getParameterInfo(oMetaModelContext, sContextPath),
1136
- sParameterContextPath = oParameterInfo.contextPath,
1137
- oValidParameterProperties = oParameterInfo.parameterProperties;
1138
-
1139
- if (sParameterContextPath !== undefined && oValidParameterProperties && Object.keys(oValidParameterProperties).length > 0) {
1140
- const aMetadataParameters = Object.keys(oValidParameterProperties);
1141
- aMetadataParameters.forEach(function (sMetadataParameter: string) {
1142
- let sSelectOptionName;
1143
- if (aSelectOptionsPropertyNames.includes(`$Parameter.${sMetadataParameter}`)) {
1144
- sSelectOptionName = `$Parameter.${sMetadataParameter}`;
1145
- } else if (aSelectOptionsPropertyNames.includes(sMetadataParameter)) {
1146
- sSelectOptionName = sMetadataParameter;
1147
- } else if (
1148
- sMetadataParameter.startsWith("P_") &&
1149
- aSelectOptionsPropertyNames.includes(`$Parameter.${sMetadataParameter.slice(2, sMetadataParameter.length)}`)
1150
- ) {
1151
- sSelectOptionName = `$Parameter.${sMetadataParameter.slice(2, sMetadataParameter.length)}`;
1152
- } else if (
1153
- sMetadataParameter.startsWith("P_") &&
1154
- aSelectOptionsPropertyNames.includes(sMetadataParameter.slice(2, sMetadataParameter.length))
1155
- ) {
1156
- sSelectOptionName = sMetadataParameter.slice(2, sMetadataParameter.length);
1157
- } else if (aSelectOptionsPropertyNames.includes(`$Parameter.P_${sMetadataParameter}`)) {
1158
- sSelectOptionName = `$Parameter.P_${sMetadataParameter}`;
1159
- } else if (aSelectOptionsPropertyNames.includes(`P_${sMetadataParameter}`)) {
1160
- sSelectOptionName = `P_${sMetadataParameter}`;
1161
- }
1162
-
1163
- if (sSelectOptionName) {
1164
- addSelectOptionsToConditions(
1165
- sParameterContextPath,
1166
- oSelectionVariant,
1167
- sSelectOptionName,
1168
- oConditions,
1169
- undefined,
1170
- sMetadataParameter,
1171
- oValidParameterProperties,
1172
- oMetaModelContext,
1173
- true,
1174
- bIsFLPValues,
1175
- bUseSemanticDateRange,
1176
- oViewData
1177
- );
1178
- }
1179
- });
1180
- }
1181
- aMetadatProperties.forEach(function (sMetadataProperty: string) {
1182
- let sSelectOptionName;
1183
- if (aSelectOptionsPropertyNames.includes(sMetadataProperty)) {
1184
- sSelectOptionName = sMetadataProperty;
1185
- } else if (
1186
- sMetadataProperty.startsWith("P_") &&
1187
- aSelectOptionsPropertyNames.includes(sMetadataProperty.slice(2, sMetadataProperty.length))
1188
- ) {
1189
- sSelectOptionName = sMetadataProperty.slice(2, sMetadataProperty.length);
1190
- } else if (aSelectOptionsPropertyNames.includes(`P_${sMetadataProperty}`)) {
1191
- sSelectOptionName = `P_${sMetadataProperty}`;
1192
- }
1193
- if (sSelectOptionName) {
1194
- addSelectOptionsToConditions(
1195
- sContextPath,
1196
- oSelectionVariant,
1197
- sSelectOptionName,
1198
- oConditions,
1199
- undefined,
1200
- sMetadataProperty,
1201
- oValidProperties,
1202
- oMetaModelContext,
1203
- false,
1204
- bIsFLPValues,
1205
- bUseSemanticDateRange,
1206
- oViewData
1207
- );
1208
- }
1209
- });
1210
-
1211
- aSelectOptionsPropertyNames.forEach(function (sSelectOption: string) {
1212
- if (sSelectOption.indexOf(".") > 0 && !sSelectOption.includes("$Parameter")) {
1213
- const sReplacedOption = sSelectOption.replaceAll(".", "/");
1214
- const sFullContextPath = `/${sReplacedOption}`.startsWith(sContextPath)
1215
- ? `/${sReplacedOption}`
1216
- : `${sContextPath}/${sReplacedOption}`; // check if the full path, eg SalesOrderManage._Item.Material exists in the metamodel
1217
- if (oMetaModelContext.getObject(sFullContextPath.replace("P_", ""))) {
1218
- _createConditionsForNavProperties(
1219
- sFullContextPath,
1220
- sContextPath,
1221
- oSelectionVariant,
1222
- sSelectOption,
1223
- oMetaModelContext,
1224
- oConditions,
1225
- bIsFLPValues,
1226
- bUseSemanticDateRange,
1227
- oViewData
1228
- );
1229
- }
1230
- }
1231
- });
1232
- return oConditions;
1233
- }
1234
-
1235
- function _createConditionsForNavProperties(
1236
- sFullContextPath: string,
1237
- sMainEntitySetPath: string,
1238
- oSelectionVariant: SelectionVariant,
1239
- sSelectOption: string,
1240
- oMetaModelContext: ODataMetaModel,
1241
- oConditions: Record<string, ConditionObject[]>,
1242
- bIsFLPValuePresent?: boolean,
1243
- bSemanticDateRange?: boolean,
1244
- oViewData?: object
1245
- ) {
1246
- let aNavObjectNames = sSelectOption.split(".");
1247
- // Eg: "SalesOrderManage._Item._Material.Material" or "_Item.Material"
1248
- if (`/${sSelectOption.replaceAll(".", "/")}`.startsWith(sMainEntitySetPath)) {
1249
- const sFullPath = `/${sSelectOption}`.replaceAll(".", "/"),
1250
- sNavPath = sFullPath.replace(`${sMainEntitySetPath}/`, "");
1251
- aNavObjectNames = sNavPath.split("/");
1252
- }
1253
- let sConditionPath = "";
1254
- const sPropertyName = aNavObjectNames[aNavObjectNames.length - 1]; // Material from SalesOrderManage._Item.Material
1255
- for (let i = 0; i < aNavObjectNames.length - 1; i++) {
1256
- if (oMetaModelContext.getObject(`${sMainEntitySetPath}/${aNavObjectNames[i].replace("P_", "")}`).$isCollection) {
1257
- sConditionPath = `${sConditionPath + aNavObjectNames[i]}*/`; // _Item*/ in case of 1:n cardinality
1258
- } else {
1259
- sConditionPath = `${sConditionPath + aNavObjectNames[i]}/`; // _Item/ in case of 1:1 cardinality
1260
- }
1261
- sMainEntitySetPath = `${sMainEntitySetPath}/${aNavObjectNames[i]}`;
1262
- }
1263
- const sNavPropertyPath = sFullContextPath.slice(0, sFullContextPath.lastIndexOf("/")),
1264
- oValidProperties = CommonUtils.getContextPathProperties(oMetaModelContext, sNavPropertyPath),
1265
- aSelectOptionsPropertyNames = oSelectionVariant.getSelectOptionsPropertyNames();
1266
- let sSelectOptionName = sPropertyName;
1267
- if (oValidProperties[sPropertyName]) {
1268
- sSelectOptionName = sPropertyName;
1269
- } else if (sPropertyName.startsWith("P_") && oValidProperties[sPropertyName.replace("P_", "")]) {
1270
- sSelectOptionName = sPropertyName.replace("P_", "");
1271
- } else if (oValidProperties[`P_${sPropertyName}`] && aSelectOptionsPropertyNames.includes(`P_${sPropertyName}`)) {
1272
- sSelectOptionName = `P_${sPropertyName}`;
1273
- }
1274
- if (sPropertyName.startsWith("P_") && oConditions[sConditionPath + sSelectOptionName]) {
1275
- // if there is no SalesOrderManage._Item.Material yet in the oConditions
1276
- } else if (!sPropertyName.startsWith("P_") && oConditions[sConditionPath + sSelectOptionName]) {
1277
- delete oConditions[sConditionPath + sSelectOptionName];
1278
- addSelectOptionsToConditions(
1279
- sNavPropertyPath,
1280
- oSelectionVariant,
1281
- sSelectOption,
1282
- oConditions,
1283
- sConditionPath,
1284
- sSelectOptionName,
1285
- oValidProperties,
1286
- oMetaModelContext,
1287
- false,
1288
- bIsFLPValuePresent,
1289
- bSemanticDateRange,
1290
- oViewData
1291
- );
1292
- } else {
1293
- addSelectOptionsToConditions(
1294
- sNavPropertyPath,
1295
- oSelectionVariant,
1296
- sSelectOption,
1297
- oConditions,
1298
- sConditionPath,
1299
- sSelectOptionName,
1300
- oValidProperties,
1301
- oMetaModelContext,
1302
- false,
1303
- bIsFLPValuePresent,
1304
- bSemanticDateRange,
1305
- oViewData
1306
- );
1307
- }
1308
- }
1309
1020
 
1310
1021
  function addPageContextToSelectionVariant(oSelectionVariant: SelectionVariant, mPageContext: unknown[], oView: View) {
1311
1022
  const oAppComponent = CommonUtils.getAppComponent(oView);
@@ -1313,188 +1024,57 @@ function addPageContextToSelectionVariant(oSelectionVariant: SelectionVariant, m
1313
1024
  return oNavigationService.mixAttributesAndSelectionVariant(mPageContext, oSelectionVariant.toJSONString());
1314
1025
  }
1315
1026
 
1316
- function addExternalStateFiltersToSelectionVariant(
1317
- oSelectionVariant: SelectionVariant,
1318
- mFilters: {
1319
- filterConditions: Record<string, Record<string, ConditionObject>>;
1320
- filterConditionsWithoutConflict: Record<string, string>;
1321
- },
1322
- oTargetInfo: {
1323
- propertiesWithoutConflict?: Record<string, string>;
1324
- },
1325
- oFilterBar?: FilterBar
1326
- ) {
1327
- let sFilter: string;
1328
- const fnGetSignAndOption = function (sOperator: string, sLowValue: string, sHighValue: string) {
1329
- const oSelectOptionState = {
1330
- option: "",
1331
- sign: "I",
1332
- low: sLowValue,
1333
- high: sHighValue
1334
- };
1335
- switch (sOperator) {
1336
- case "Contains":
1337
- oSelectOptionState.option = "CP";
1338
- break;
1339
- case "StartsWith":
1340
- oSelectOptionState.option = "CP";
1341
- oSelectOptionState.low += "*";
1342
- break;
1343
- case "EndsWith":
1344
- oSelectOptionState.option = "CP";
1345
- oSelectOptionState.low = `*${oSelectOptionState.low}`;
1346
- break;
1347
- case "BT":
1348
- case "LE":
1349
- case "LT":
1350
- case "GT":
1351
- case "NE":
1352
- case "EQ":
1353
- oSelectOptionState.option = sOperator;
1354
- break;
1355
- case "DATE":
1356
- oSelectOptionState.option = "EQ";
1357
- break;
1358
- case "DATERANGE":
1359
- oSelectOptionState.option = "BT";
1360
- break;
1361
- case "FROM":
1362
- oSelectOptionState.option = "GE";
1363
- break;
1364
- case "TO":
1365
- oSelectOptionState.option = "LE";
1366
- break;
1367
- case "EEQ":
1368
- oSelectOptionState.option = "EQ";
1369
- break;
1370
- case "Empty":
1371
- oSelectOptionState.option = "EQ";
1372
- oSelectOptionState.low = "";
1373
- break;
1374
- case "NotContains":
1375
- oSelectOptionState.option = "CP";
1376
- oSelectOptionState.sign = "E";
1377
- break;
1378
- case "NOTBT":
1379
- oSelectOptionState.option = "BT";
1380
- oSelectOptionState.sign = "E";
1381
- break;
1382
- case "NotStartsWith":
1383
- oSelectOptionState.option = "CP";
1384
- oSelectOptionState.low += "*";
1385
- oSelectOptionState.sign = "E";
1386
- break;
1387
- case "NotEndsWith":
1388
- oSelectOptionState.option = "CP";
1389
- oSelectOptionState.low = `*${oSelectOptionState.low}`;
1390
- oSelectOptionState.sign = "E";
1391
- break;
1392
- case "NotEmpty":
1393
- oSelectOptionState.option = "NE";
1394
- oSelectOptionState.low = "";
1395
- break;
1396
- case "NOTLE":
1397
- oSelectOptionState.option = "LE";
1398
- oSelectOptionState.sign = "E";
1399
- break;
1400
- case "NOTGE":
1401
- oSelectOptionState.option = "GE";
1402
- oSelectOptionState.sign = "E";
1403
- break;
1404
- case "NOTLT":
1405
- oSelectOptionState.option = "LT";
1406
- oSelectOptionState.sign = "E";
1407
- break;
1408
- case "NOTGT":
1409
- oSelectOptionState.option = "GT";
1410
- oSelectOptionState.sign = "E";
1411
- break;
1412
- default:
1413
- Log.warning(`${sOperator} is not supported. ${sFilter} could not be added to the navigation context`);
1414
- }
1415
- return oSelectOptionState;
1416
- };
1417
- const oFilterConditions = mFilters.filterConditions;
1418
- const oFiltersWithoutConflict = mFilters.filterConditionsWithoutConflict ? mFilters.filterConditionsWithoutConflict : {};
1419
- const oTablePropertiesWithoutConflict = oTargetInfo.propertiesWithoutConflict ? oTargetInfo.propertiesWithoutConflict : {};
1420
- const addFiltersToSelectionVariant = function (selectionVariant: SelectionVariant, sFilterName: string, sPath?: string) {
1421
- const aConditions = oFilterConditions[sFilterName];
1422
- const oPropertyInfo = oFilterBar && oFilterBar.getPropertyHelper().getProperty(sFilterName);
1423
- const oTypeConfig = oPropertyInfo?.typeConfig;
1424
- const oTypeUtil = oFilterBar && oFilterBar.getControlDelegate().getTypeUtil();
1425
-
1426
- for (const item in aConditions) {
1427
- const oCondition = aConditions[item];
1428
-
1429
- let option: string | undefined = "",
1430
- sign = "I",
1431
- low = "",
1432
- high = null,
1433
- semanticDates;
1434
-
1435
- const oOperator = FilterOperatorUtil.getOperator(oCondition.operator);
1436
- if (oOperator instanceof RangeOperator) {
1437
- semanticDates = CommonUtils.createSemanticDatesFromConditions(oCondition);
1438
- // handling of Date RangeOperators
1439
- const oModelFilter = oOperator.getModelFilter(
1440
- oCondition,
1441
- sFilterName,
1442
- oTypeConfig?.typeInstance,
1443
- false,
1444
- oTypeConfig?.baseType
1445
- );
1446
- if (!oModelFilter?.getFilters() && !oModelFilter?.getFilters()?.length) {
1447
- sign = oOperator.exclude ? "E" : "I";
1448
- low = oTypeUtil.externalizeValue(oModelFilter.getValue1(), oTypeConfig.typeInstance);
1449
- high = oTypeUtil.externalizeValue(oModelFilter.getValue2(), oTypeConfig.typeInstance);
1450
- option = oModelFilter.getOperator();
1451
- }
1452
- } else {
1453
- const aSemanticDateOpsExt = SemanticDateOperators.getSupportedOperations();
1454
- if (aSemanticDateOpsExt.includes(oCondition?.operator)) {
1455
- semanticDates = CommonUtils.createSemanticDatesFromConditions(oCondition);
1456
- }
1457
- const value1 = (oCondition.values[0] && oCondition.values[0].toString()) || "";
1458
- const value2 = (oCondition.values[1] && oCondition.values[1].toString()) || null;
1459
- const oSelectOption = fnGetSignAndOption(oCondition.operator, value1, value2);
1460
- sign = oOperator?.exclude ? "E" : "I";
1461
- low = oSelectOption?.low;
1462
- high = oSelectOption?.high;
1463
- option = oSelectOption?.option;
1464
- }
1465
-
1466
- if (option && semanticDates) {
1467
- selectionVariant.addSelectOption(sPath ? sPath : sFilterName, sign, option, low, high, undefined, semanticDates);
1468
- } else if (option) {
1469
- selectionVariant.addSelectOption(sPath ? sPath : sFilterName, sign, option, low, high);
1470
- }
1471
- }
1472
- };
1027
+ /**
1028
+ * Get selection variant based on the filter conditions and the navigation context fields.
1029
+ *
1030
+ * @param selectionVariant SelectionVariant provided by SAP Fiori elements.
1031
+ * @param filters Retrieved filter condition for filter bar and non conflicting properties
1032
+ * @param targetInfo Object containing intent-based navigation-related info
1033
+ * @param filterBar The filterbar control
1034
+ * @returns The selection variant
1035
+ */
1473
1036
 
1474
- for (sFilter in oFilterConditions) {
1037
+ function addExternalStateFiltersToSelectionVariant(
1038
+ inputSelectionVariant: SelectionVariant,
1039
+ filters: ExternalFilter,
1040
+ filterBar: FilterBar,
1041
+ targetInfo?: NavigationInfo
1042
+ ): SelectionVariant {
1043
+ const filterConditions = filters.filterConditions;
1044
+ const filtersWithoutConflict = filters.filterConditionsWithoutConflict ? filters.filterConditionsWithoutConflict : {};
1045
+ const tablePropertiesWithoutConflict = targetInfo?.propertiesWithoutConflict ? targetInfo.propertiesWithoutConflict : {};
1046
+
1047
+ const selectionVariantFromFilterbar = StateFilterToSelectionVariant.getSelectionVariantFromConditions(
1048
+ filterConditions,
1049
+ filterBar.getPropertyHelper()
1050
+ );
1051
+ for (const filterkey in filterConditions) {
1475
1052
  // only add the filter values if it is not already present in the SV already
1476
- if (!oSelectionVariant.getSelectOption(sFilter)) {
1053
+ const filterSelectOption = selectionVariantFromFilterbar.getSelectOption(filterkey);
1054
+ if (!inputSelectionVariant.getSelectOption(filterkey)) {
1477
1055
  // TODO : custom filters should be ignored more generically
1478
- if (sFilter === "$editState") {
1056
+ if (filterkey === "$editState") {
1479
1057
  continue;
1480
1058
  }
1481
- addFiltersToSelectionVariant(oSelectionVariant, sFilter);
1059
+ if (filterSelectOption) {
1060
+ inputSelectionVariant.massAddSelectOption(filterkey, filterSelectOption);
1061
+ }
1482
1062
  } else {
1483
- if (oTablePropertiesWithoutConflict && sFilter in oTablePropertiesWithoutConflict) {
1484
- addFiltersToSelectionVariant(oSelectionVariant, sFilter, oTablePropertiesWithoutConflict[sFilter]);
1063
+ if (tablePropertiesWithoutConflict && filterkey in tablePropertiesWithoutConflict) {
1064
+ inputSelectionVariant.massAddSelectOption(tablePropertiesWithoutConflict[filterkey], filterSelectOption as SelectOption[]);
1485
1065
  }
1486
1066
  // if property was without conflict in page context then add path from page context to SV
1487
- if (sFilter in oFiltersWithoutConflict) {
1488
- addFiltersToSelectionVariant(oSelectionVariant, sFilter, oFiltersWithoutConflict[sFilter]);
1067
+ if (filterkey in filtersWithoutConflict) {
1068
+ inputSelectionVariant.massAddSelectOption(filtersWithoutConflict[filterkey], filterSelectOption as SelectOption[]);
1489
1069
  }
1490
1070
  }
1491
1071
  }
1492
- return oSelectionVariant;
1072
+ return inputSelectionVariant;
1493
1073
  }
1494
1074
 
1495
1075
  function isStickyEditMode(oControl: Control) {
1496
1076
  const bIsStickyMode = ModelHelper.isStickySessionSupported((oControl.getModel() as ODataModel).getMetaModel());
1497
- const bUIEditable = oControl.getModel("ui").getProperty("/isEditable");
1077
+ const bUIEditable = (oControl.getModel("ui") as JSONModel).getProperty("/isEditable");
1498
1078
  return bIsStickyMode && bUIEditable;
1499
1079
  }
1500
1080
 
@@ -2388,6 +1968,50 @@ function getChartPropertiesWithoutPrefixes(aFilters: IFilterProp[]) {
2388
1968
  return aFilters;
2389
1969
  }
2390
1970
 
1971
+ /**
1972
+ * Gets the context of the DraftRoot path.
1973
+ * If a view has been created with the draft Root Path, this method returns its bindingContext.
1974
+ * Where no view is found a new created context is returned.
1975
+ * The new created context request the key of the entity in order to get the Etag of this entity.
1976
+ *
1977
+ * @function
1978
+ * @param programmingModel
1979
+ * @param view
1980
+ * @param appComponent
1981
+ * @name createRootContext
1982
+ * @returns Returns a Promise
1983
+ */
1984
+ async function createRootContext(programmingModel: string, view: View, appComponent: AppComponent): Promise<Context | undefined> {
1985
+ const context = view.getBindingContext() as ODataV4Context;
1986
+ if (context) {
1987
+ const rootContextPath =
1988
+ programmingModel === ProgrammingModel.Draft ? ModelHelper.getDraftRootPath(context) : ModelHelper.getStickyRootPath(context);
1989
+ let simpleRootContext: ODataV4Context;
1990
+ if (rootContextPath) {
1991
+ // Check if a view matches with the draft root path
1992
+ const existingBindingContextOnPage = appComponent
1993
+ .getRootViewController()
1994
+ .getInstancedViews()
1995
+ .find((pageView: View) => pageView.getBindingContext()?.getPath() === rootContextPath)
1996
+ ?.getBindingContext() as Context;
1997
+ if (existingBindingContextOnPage) {
1998
+ return existingBindingContextOnPage;
1999
+ }
2000
+ const internalModel = view.getModel("internal") as JSONModel;
2001
+ simpleRootContext = internalModel.getProperty("/simpleRootContext");
2002
+ if (simpleRootContext?.getPath() === rootContextPath) {
2003
+ return simpleRootContext;
2004
+ }
2005
+ const model = context.getModel();
2006
+ simpleRootContext = model.bindContext(rootContextPath).getBoundContext();
2007
+ await CommonUtils.waitForContextRequested(simpleRootContext);
2008
+ // Store this new created context to use it on the next iterations
2009
+ internalModel.setProperty("/simpleRootContext", simpleRootContext);
2010
+ return simpleRootContext;
2011
+ }
2012
+ }
2013
+ }
2014
+
2391
2015
  const CommonUtils = {
2392
2016
  fireButtonPress: fnFireButtonPress,
2393
2017
  getTargetView: getTargetView,
@@ -2406,7 +2030,6 @@ const CommonUtils = {
2406
2030
  getOperatorsForProperty: getOperatorsForProperty,
2407
2031
  getOperatorsForDateProperty: getOperatorsForDateProperty,
2408
2032
  getOperatorsForGuidProperty: getOperatorsForGuidProperty,
2409
- addSelectionVariantToConditions: addSelectionVariantToConditions,
2410
2033
  addExternalStateFiltersToSelectionVariant: addExternalStateFiltersToSelectionVariant,
2411
2034
  addPageContextToSelectionVariant: addPageContextToSelectionVariant,
2412
2035
  addDefaultDisplayCurrency: addDefaultDisplayCurrency,
@@ -2440,12 +2063,12 @@ const CommonUtils = {
2440
2063
  getTranslatedTextFromExpBindingString: _fntranslatedTextFromExpBindingString,
2441
2064
  addSemanticDatesToConditions: addSemanticDatesToConditions,
2442
2065
  addSelectOptionToConditions: addSelectOptionToConditions,
2443
- createSemanticDatesFromConditions: createSemanticDatesFromConditions,
2444
2066
  updateRelateAppsModel: updateRelateAppsModel,
2445
2067
  getSemanticObjectAnnotations: _getSemanticObjectAnnotations,
2446
2068
  getFiltersInfoForSV: getFiltersInfoForSV,
2447
2069
  getInternalChartNameFromPropertyNameAndKind: getInternalChartNameFromPropertyNameAndKind,
2448
2070
  getChartPropertiesWithoutPrefixes: getChartPropertiesWithoutPrefixes,
2071
+ createRootContext: createRootContext,
2449
2072
  isSmallDevice,
2450
2073
  getConverterContextForPath
2451
2074
  };