@sapui5/sap.fe.core 1.98.0 → 1.101.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (318) hide show
  1. package/package.json +8 -5
  2. package/src/sap/fe/core/.library +2 -3
  3. package/src/sap/fe/core/AnnotationHelper.js +328 -405
  4. package/src/sap/fe/core/AnnotationHelper.ts +321 -0
  5. package/src/sap/fe/core/AppComponent.js +382 -399
  6. package/src/sap/fe/core/AppComponent.ts +397 -0
  7. package/src/sap/fe/core/AppStateHandler.js +198 -181
  8. package/src/sap/fe/core/AppStateHandler.ts +171 -0
  9. package/src/sap/fe/core/BaseController.js +83 -58
  10. package/src/sap/fe/core/BaseController.ts +67 -0
  11. package/src/sap/fe/core/BusyLocker.js +105 -121
  12. package/src/sap/fe/core/BusyLocker.ts +98 -0
  13. package/src/sap/fe/core/CommonUtils.js +2221 -2399
  14. package/src/sap/fe/core/CommonUtils.ts +2248 -0
  15. package/src/sap/fe/core/ExtensionAPI.js +280 -274
  16. package/src/sap/fe/core/ExtensionAPI.ts +242 -0
  17. package/src/sap/fe/core/PageController.js +219 -131
  18. package/src/sap/fe/core/PageController.ts +129 -0
  19. package/src/sap/fe/core/RouterProxy.js +936 -823
  20. package/src/sap/fe/core/RouterProxy.ts +854 -0
  21. package/src/sap/fe/core/Synchronization.js +41 -35
  22. package/src/sap/fe/core/Synchronization.ts +29 -0
  23. package/src/sap/fe/core/TemplateComponent.js +248 -164
  24. package/src/sap/fe/core/TemplateComponent.ts +161 -0
  25. package/src/sap/fe/core/TemplateModel.js +77 -54
  26. package/src/sap/fe/core/TemplateModel.ts +63 -0
  27. package/src/sap/fe/core/TransactionHelper.js +1575 -1664
  28. package/src/sap/fe/core/TransactionHelper.ts +1736 -0
  29. package/src/sap/fe/core/actions/collaboration/ActivitySync.js +406 -0
  30. package/src/sap/fe/core/actions/collaboration/ActivitySync.ts +362 -0
  31. package/src/sap/fe/core/actions/collaboration/CollaborationCommon.js +146 -0
  32. package/src/sap/fe/core/actions/collaboration/CollaborationCommon.ts +129 -0
  33. package/src/sap/fe/core/actions/collaboration/Manage.js +264 -0
  34. package/src/sap/fe/core/actions/collaboration/Manage.ts +246 -0
  35. package/src/sap/fe/core/actions/collaboration/ManageDialog.fragment.xml +100 -0
  36. package/src/sap/fe/core/actions/collaboration/UserDetails.fragment.xml +13 -0
  37. package/src/sap/fe/core/actions/draft.js +663 -608
  38. package/src/sap/fe/core/actions/draft.ts +669 -0
  39. package/src/sap/fe/core/actions/messageHandling.js +576 -514
  40. package/src/sap/fe/core/actions/messageHandling.ts +562 -0
  41. package/src/sap/fe/core/actions/nonDraft.js +17 -19
  42. package/src/sap/fe/core/actions/nonDraft.ts +12 -0
  43. package/src/sap/fe/core/actions/operations.js +1093 -1215
  44. package/src/sap/fe/core/actions/operations.ts +1193 -0
  45. package/src/sap/fe/core/actions/sticky.js +114 -104
  46. package/src/sap/fe/core/actions/sticky.ts +119 -0
  47. package/src/sap/fe/core/buildingBlocks/AttributeModel.js +60 -0
  48. package/src/sap/fe/core/buildingBlocks/AttributeModel.ts +37 -0
  49. package/src/sap/fe/core/buildingBlocks/BuildingBlock.js +165 -0
  50. package/src/sap/fe/core/buildingBlocks/BuildingBlock.ts +178 -0
  51. package/src/sap/fe/core/buildingBlocks/BuildingBlockRuntime.js +707 -0
  52. package/src/sap/fe/core/buildingBlocks/BuildingBlockRuntime.ts +628 -0
  53. package/src/sap/fe/core/buildingBlocks/TraceInfo.js +436 -0
  54. package/src/sap/fe/core/buildingBlocks/TraceInfo.ts +431 -0
  55. package/src/sap/fe/core/controllerextensions/EditFlow.js +1855 -1827
  56. package/src/sap/fe/core/controllerextensions/EditFlow.ts +1792 -0
  57. package/src/sap/fe/core/controllerextensions/IntentBasedNavigation.js +80 -54
  58. package/src/sap/fe/core/controllerextensions/IntentBasedNavigation.ts +60 -0
  59. package/src/sap/fe/core/controllerextensions/InternalEditFlow.js +717 -512
  60. package/src/sap/fe/core/controllerextensions/InternalEditFlow.ts +785 -0
  61. package/src/sap/fe/core/controllerextensions/InternalIntentBasedNavigation.js +797 -815
  62. package/src/sap/fe/core/controllerextensions/InternalIntentBasedNavigation.ts +810 -0
  63. package/src/sap/fe/core/controllerextensions/InternalRouting.js +1057 -1004
  64. package/src/sap/fe/core/controllerextensions/InternalRouting.ts +1001 -0
  65. package/src/sap/fe/core/controllerextensions/KPIManagement.js +498 -533
  66. package/src/sap/fe/core/controllerextensions/KPIManagement.ts +36 -32
  67. package/src/sap/fe/core/controllerextensions/MassEdit.js +142 -77
  68. package/src/sap/fe/core/controllerextensions/MassEdit.ts +155 -0
  69. package/src/sap/fe/core/controllerextensions/MessageHandler.js +222 -236
  70. package/src/sap/fe/core/controllerextensions/MessageHandler.ts +215 -0
  71. package/src/sap/fe/core/controllerextensions/PageReady.js +312 -345
  72. package/src/sap/fe/core/controllerextensions/PageReady.ts +63 -55
  73. package/src/sap/fe/core/controllerextensions/Paginator.js +189 -175
  74. package/src/sap/fe/core/controllerextensions/Paginator.ts +169 -0
  75. package/src/sap/fe/core/controllerextensions/Placeholder.js +158 -149
  76. package/src/sap/fe/core/controllerextensions/Placeholder.ts +149 -0
  77. package/src/sap/fe/core/controllerextensions/Routing.js +145 -121
  78. package/src/sap/fe/core/controllerextensions/Routing.ts +131 -0
  79. package/src/sap/fe/core/controllerextensions/RoutingListener.js +8 -6
  80. package/src/sap/fe/core/controllerextensions/RoutingListener.ts +3 -0
  81. package/src/sap/fe/core/controllerextensions/Share.js +231 -268
  82. package/src/sap/fe/core/controllerextensions/Share.ts +231 -0
  83. package/src/sap/fe/core/controllerextensions/SideEffects.js +603 -644
  84. package/src/sap/fe/core/controllerextensions/SideEffects.ts +79 -79
  85. package/src/sap/fe/core/controllerextensions/ViewState.js +775 -806
  86. package/src/sap/fe/core/controllerextensions/ViewState.ts +796 -0
  87. package/src/sap/fe/core/controls/ActionParameterDialog.fragment.xml +2 -2
  88. package/src/sap/fe/core/controls/ActionPartial.fragment.xml +2 -2
  89. package/src/sap/fe/core/controls/Any.js +28 -0
  90. package/src/sap/fe/core/controls/Any.ts +30 -0
  91. package/src/sap/fe/core/controls/CommandExecution.js +93 -68
  92. package/src/sap/fe/core/controls/CommandExecution.ts +72 -0
  93. package/src/sap/fe/core/controls/ConditionalWrapper.js +166 -79
  94. package/src/sap/fe/core/controls/ConditionalWrapper.ts +74 -0
  95. package/src/sap/fe/core/controls/CustomFilterFieldContentWrapper.js +366 -0
  96. package/src/sap/fe/core/controls/CustomFilterFieldContentWrapper.ts +278 -0
  97. package/src/sap/fe/core/controls/CustomQuickViewPage.js +168 -125
  98. package/src/sap/fe/core/controls/CustomQuickViewPage.ts +116 -0
  99. package/src/sap/fe/core/controls/DataLossOrDraftDiscard/DataLossDraft.fragment.xml +44 -5
  100. package/src/sap/fe/core/controls/DataLossOrDraftDiscard/DataLossOrDraftDiscardHandler.js +164 -122
  101. package/src/sap/fe/core/controls/DataLossOrDraftDiscard/DataLossOrDraftDiscardHandler.ts +155 -0
  102. package/src/sap/fe/core/controls/FieldWrapper.js +213 -153
  103. package/src/sap/fe/core/controls/FieldWrapper.ts +104 -0
  104. package/src/sap/fe/core/controls/FileWrapper.js +313 -0
  105. package/src/sap/fe/core/controls/FileWrapper.ts +169 -0
  106. package/src/sap/fe/core/controls/FilterBar.js +198 -159
  107. package/src/sap/fe/core/controls/FilterBar.ts +148 -0
  108. package/src/sap/fe/core/controls/FormElementWrapper.js +101 -39
  109. package/src/sap/fe/core/controls/FormElementWrapper.ts +37 -0
  110. package/src/sap/fe/core/controls/MultiValueParameterDelegate.js +38 -42
  111. package/src/sap/fe/core/controls/MultiValueParameterDelegate.ts +31 -0
  112. package/src/sap/fe/core/controls/NonComputedVisibleKeyFieldsDialog.fragment.xml +1 -0
  113. package/src/sap/fe/core/controls/filterbar/FilterContainer.js +148 -115
  114. package/src/sap/fe/core/controls/filterbar/FilterContainer.ts +102 -0
  115. package/src/sap/fe/core/controls/filterbar/VisualFilter.js +301 -265
  116. package/src/sap/fe/core/controls/filterbar/VisualFilter.ts +252 -0
  117. package/src/sap/fe/core/controls/filterbar/VisualFilterContainer.js +186 -140
  118. package/src/sap/fe/core/controls/filterbar/VisualFilterContainer.ts +125 -0
  119. package/src/sap/fe/core/controls/filterbar/utils/VisualFilterUtils.js +336 -322
  120. package/src/sap/fe/core/controls/filterbar/utils/VisualFilterUtils.ts +337 -0
  121. package/src/sap/fe/core/controls/massEdit/MassEditDialog.fragment.xml +37 -42
  122. package/src/sap/fe/core/controls/massEdit/MassEditHandlers.js +76 -74
  123. package/src/sap/fe/core/controls/massEdit/MassEditHandlers.ts +71 -0
  124. package/src/sap/fe/core/converters/ConverterContext.js +348 -379
  125. package/src/sap/fe/core/converters/ConverterContext.ts +23 -19
  126. package/src/sap/fe/core/converters/ManifestSettings.js +13 -1
  127. package/src/sap/fe/core/converters/ManifestSettings.ts +18 -2
  128. package/src/sap/fe/core/converters/ManifestWrapper.js +354 -365
  129. package/src/sap/fe/core/converters/ManifestWrapper.ts +19 -0
  130. package/src/sap/fe/core/converters/MetaModelConverter.js +16 -11
  131. package/src/sap/fe/core/converters/MetaModelConverter.ts +21 -18
  132. package/src/sap/fe/core/converters/TemplateConverter.js +1 -1
  133. package/src/sap/fe/core/converters/TemplateConverter.ts +4 -3
  134. package/src/sap/fe/core/converters/annotations/DataField.js +26 -13
  135. package/src/sap/fe/core/converters/annotations/DataField.ts +40 -17
  136. package/src/sap/fe/core/converters/common/AnnotationConverter.js +17 -13
  137. package/src/sap/fe/core/converters/controls/Common/Action.js +11 -11
  138. package/src/sap/fe/core/converters/controls/Common/Action.ts +22 -21
  139. package/src/sap/fe/core/converters/controls/Common/Chart.js +12 -10
  140. package/src/sap/fe/core/converters/controls/Common/Chart.ts +23 -14
  141. package/src/sap/fe/core/converters/controls/Common/DataVisualization.js +3 -3
  142. package/src/sap/fe/core/converters/controls/Common/DataVisualization.ts +2 -2
  143. package/src/sap/fe/core/converters/controls/Common/Form.js +9 -7
  144. package/src/sap/fe/core/converters/controls/Common/Form.ts +23 -5
  145. package/src/sap/fe/core/converters/controls/Common/KPI.js +1 -1
  146. package/src/sap/fe/core/converters/controls/Common/KPI.ts +2 -2
  147. package/src/sap/fe/core/converters/controls/Common/Table.js +562 -218
  148. package/src/sap/fe/core/converters/controls/Common/Table.ts +670 -320
  149. package/src/sap/fe/core/converters/controls/Common/table/StandardActions.js +218 -94
  150. package/src/sap/fe/core/converters/controls/Common/table/StandardActions.ts +265 -159
  151. package/src/sap/fe/core/converters/controls/ListReport/FilterBar.js +495 -77
  152. package/src/sap/fe/core/converters/controls/ListReport/FilterBar.ts +535 -130
  153. package/src/sap/fe/core/converters/controls/ObjectPage/HeaderFacet.js +6 -6
  154. package/src/sap/fe/core/converters/controls/ObjectPage/HeaderFacet.ts +20 -18
  155. package/src/sap/fe/core/converters/controls/ObjectPage/SubSection.js +10 -7
  156. package/src/sap/fe/core/converters/controls/ObjectPage/SubSection.ts +13 -16
  157. package/src/sap/fe/core/converters/helpers/Aggregation.js +117 -127
  158. package/src/sap/fe/core/converters/helpers/Aggregation.ts +20 -5
  159. package/src/sap/fe/core/converters/helpers/BindingHelper.js +20 -6
  160. package/src/sap/fe/core/converters/helpers/BindingHelper.ts +16 -4
  161. package/src/sap/fe/core/converters/helpers/ConfigurableObject.js +12 -1
  162. package/src/sap/fe/core/converters/helpers/ConfigurableObject.ts +11 -0
  163. package/src/sap/fe/core/converters/helpers/IssueManager.js +4 -1
  164. package/src/sap/fe/core/converters/helpers/IssueManager.ts +3 -0
  165. package/src/sap/fe/core/converters/helpers/Key.js +42 -57
  166. package/src/sap/fe/core/converters/helpers/Key.ts +1 -1
  167. package/src/sap/fe/core/converters/objectPage/FormMenuActions.js +1 -1
  168. package/src/sap/fe/core/converters/objectPage/FormMenuActions.ts +0 -4
  169. package/src/sap/fe/core/converters/objectPage/HeaderAndFooterAction.js +54 -30
  170. package/src/sap/fe/core/converters/objectPage/HeaderAndFooterAction.ts +69 -43
  171. package/src/sap/fe/core/converters/templates/ListReportConverter.js +52 -28
  172. package/src/sap/fe/core/converters/templates/ListReportConverter.ts +111 -74
  173. package/src/sap/fe/core/converters/templates/ObjectPageConverter.js +11 -9
  174. package/src/sap/fe/core/converters/templates/ObjectPageConverter.ts +8 -8
  175. package/src/sap/fe/core/designtime/AppComponent.designtime.js +93 -98
  176. package/src/sap/fe/core/designtime/AppComponent.designtime.ts +91 -0
  177. package/src/sap/fe/core/formatters/CollaborationFormatter.js +104 -0
  178. package/src/sap/fe/core/formatters/CollaborationFormatter.ts +60 -0
  179. package/src/sap/fe/core/formatters/CriticalityFormatter.js +1 -1
  180. package/src/sap/fe/core/formatters/CriticalityFormatter.ts +1 -1
  181. package/src/sap/fe/core/formatters/FPMFormatter.js +1 -1
  182. package/src/sap/fe/core/formatters/FPMFormatter.ts +4 -10
  183. package/src/sap/fe/core/formatters/KPIFormatter.js +3 -12
  184. package/src/sap/fe/core/formatters/KPIFormatter.ts +4 -1
  185. package/src/sap/fe/core/formatters/TableFormatter.js +91 -29
  186. package/src/sap/fe/core/formatters/TableFormatter.ts +94 -28
  187. package/src/sap/fe/core/formatters/ValueFormatter.js +4 -4
  188. package/src/sap/fe/core/formatters/ValueFormatter.ts +5 -7
  189. package/src/sap/fe/core/fpm/Component.js +81 -55
  190. package/src/sap/fe/core/fpm/Component.ts +43 -0
  191. package/src/sap/fe/core/helpers/AppStartupHelper.js +324 -310
  192. package/src/sap/fe/core/helpers/AppStartupHelper.ts +370 -341
  193. package/src/sap/fe/core/helpers/BindingExpression.js +319 -360
  194. package/src/sap/fe/core/helpers/BindingExpression.ts +323 -397
  195. package/src/sap/fe/core/helpers/ClassSupport.js +321 -168
  196. package/src/sap/fe/core/helpers/ClassSupport.ts +362 -158
  197. package/src/sap/fe/core/helpers/DynamicAnnotationPathHelper.js +64 -59
  198. package/src/sap/fe/core/helpers/DynamicAnnotationPathHelper.ts +52 -0
  199. package/src/sap/fe/core/helpers/EditState.js +81 -84
  200. package/src/sap/fe/core/helpers/EditState.ts +81 -0
  201. package/src/sap/fe/core/helpers/ExcelFormatHelper.js +62 -48
  202. package/src/sap/fe/core/helpers/ExcelFormatHelper.ts +49 -0
  203. package/src/sap/fe/core/helpers/FPMHelper.js +52 -56
  204. package/src/sap/fe/core/helpers/FPMHelper.ts +62 -0
  205. package/src/sap/fe/core/helpers/KeepAliveHelper.js +3 -4
  206. package/src/sap/fe/core/helpers/KeepAliveHelper.ts +9 -9
  207. package/src/sap/fe/core/helpers/MassEditHelper.js +736 -676
  208. package/src/sap/fe/core/helpers/MassEditHelper.ts +803 -0
  209. package/src/sap/fe/core/helpers/ModelHelper.js +281 -225
  210. package/src/sap/fe/core/helpers/ModelHelper.ts +273 -0
  211. package/src/sap/fe/core/helpers/PasteHelper.js +210 -132
  212. package/src/sap/fe/core/helpers/PasteHelper.ts +197 -0
  213. package/src/sap/fe/core/helpers/SemanticDateOperators.js +336 -313
  214. package/src/sap/fe/core/helpers/SemanticDateOperators.ts +336 -0
  215. package/src/sap/fe/core/helpers/SemanticKeyHelper.js +66 -67
  216. package/src/sap/fe/core/helpers/SemanticKeyHelper.ts +73 -0
  217. package/src/sap/fe/core/helpers/StableIdHelper.js +1 -10
  218. package/src/sap/fe/core/helpers/StableIdHelper.ts +2 -10
  219. package/src/sap/fe/core/jsx-runtime/jsx.js +35 -5
  220. package/src/sap/fe/core/jsx-runtime/jsx.ts +23 -9
  221. package/src/sap/fe/core/library.js +426 -451
  222. package/src/sap/fe/core/library.support.js +23 -33
  223. package/src/sap/fe/core/library.support.ts +23 -0
  224. package/src/sap/fe/core/library.ts +420 -0
  225. package/src/sap/fe/core/manifestMerger/ChangePageConfiguration.js +5 -3
  226. package/src/sap/fe/core/manifestMerger/ChangePageConfiguration.ts +5 -5
  227. package/src/sap/fe/core/messagebundle.properties +63 -18
  228. package/src/sap/fe/core/messagebundle_ar.properties +37 -6
  229. package/src/sap/fe/core/messagebundle_bg.properties +37 -6
  230. package/src/sap/fe/core/messagebundle_ca.properties +37 -6
  231. package/src/sap/fe/core/messagebundle_cs.properties +38 -7
  232. package/src/sap/fe/core/messagebundle_cy.properties +37 -6
  233. package/src/sap/fe/core/messagebundle_da.properties +37 -6
  234. package/src/sap/fe/core/messagebundle_de.properties +37 -6
  235. package/src/sap/fe/core/messagebundle_el.properties +37 -6
  236. package/src/sap/fe/core/messagebundle_en.properties +37 -6
  237. package/src/sap/fe/core/messagebundle_en_GB.properties +37 -6
  238. package/src/sap/fe/core/messagebundle_en_US_sappsd.properties +37 -6
  239. package/src/sap/fe/core/messagebundle_en_US_saprigi.properties +37 -6
  240. package/src/sap/fe/core/messagebundle_en_US_saptrc.properties +37 -6
  241. package/src/sap/fe/core/messagebundle_es.properties +37 -6
  242. package/src/sap/fe/core/messagebundle_es_MX.properties +37 -6
  243. package/src/sap/fe/core/messagebundle_et.properties +37 -6
  244. package/src/sap/fe/core/messagebundle_fi.properties +38 -7
  245. package/src/sap/fe/core/messagebundle_fr.properties +43 -12
  246. package/src/sap/fe/core/messagebundle_fr_CA.properties +45 -14
  247. package/src/sap/fe/core/messagebundle_hi.properties +43 -12
  248. package/src/sap/fe/core/messagebundle_hr.properties +43 -12
  249. package/src/sap/fe/core/messagebundle_hu.properties +37 -6
  250. package/src/sap/fe/core/messagebundle_id.properties +38 -7
  251. package/src/sap/fe/core/messagebundle_it.properties +37 -6
  252. package/src/sap/fe/core/messagebundle_iw.properties +37 -6
  253. package/src/sap/fe/core/messagebundle_ja.properties +36 -5
  254. package/src/sap/fe/core/messagebundle_kk.properties +43 -12
  255. package/src/sap/fe/core/messagebundle_ko.properties +37 -6
  256. package/src/sap/fe/core/messagebundle_lt.properties +37 -6
  257. package/src/sap/fe/core/messagebundle_lv.properties +44 -13
  258. package/src/sap/fe/core/messagebundle_ms.properties +42 -11
  259. package/src/sap/fe/core/messagebundle_nl.properties +37 -6
  260. package/src/sap/fe/core/messagebundle_no.properties +37 -6
  261. package/src/sap/fe/core/messagebundle_pl.properties +37 -6
  262. package/src/sap/fe/core/messagebundle_pt.properties +38 -7
  263. package/src/sap/fe/core/messagebundle_pt_PT.properties +37 -6
  264. package/src/sap/fe/core/messagebundle_ro.properties +37 -6
  265. package/src/sap/fe/core/messagebundle_ru.properties +37 -6
  266. package/src/sap/fe/core/messagebundle_sh.properties +39 -8
  267. package/src/sap/fe/core/messagebundle_sk.properties +37 -6
  268. package/src/sap/fe/core/messagebundle_sl.properties +43 -12
  269. package/src/sap/fe/core/messagebundle_sv.properties +38 -7
  270. package/src/sap/fe/core/messagebundle_th.properties +36 -5
  271. package/src/sap/fe/core/messagebundle_tr.properties +39 -8
  272. package/src/sap/fe/core/messagebundle_uk.properties +37 -6
  273. package/src/sap/fe/core/messagebundle_vi.properties +37 -6
  274. package/src/sap/fe/core/messagebundle_zh_CN.properties +37 -6
  275. package/src/sap/fe/core/messagebundle_zh_TW.properties +43 -12
  276. package/src/sap/fe/core/services/AsyncComponentServiceFactory.js +47 -73
  277. package/src/sap/fe/core/services/AsyncComponentServiceFactory.ts +3 -1
  278. package/src/sap/fe/core/services/CacheHandlerServiceFactory.js +231 -202
  279. package/src/sap/fe/core/services/CacheHandlerServiceFactory.ts +211 -0
  280. package/src/sap/fe/core/services/EnvironmentServiceFactory.js +70 -96
  281. package/src/sap/fe/core/services/EnvironmentServiceFactory.ts +10 -8
  282. package/src/sap/fe/core/services/NavigationServiceFactory.js +351 -300
  283. package/src/sap/fe/core/services/NavigationServiceFactory.ts +313 -0
  284. package/src/sap/fe/core/services/ResourceModelServiceFactory.js +114 -81
  285. package/src/sap/fe/core/services/ResourceModelServiceFactory.ts +83 -0
  286. package/src/sap/fe/core/services/RoutingServiceFactory.js +963 -899
  287. package/src/sap/fe/core/services/RoutingServiceFactory.ts +907 -0
  288. package/src/sap/fe/core/services/ShellServicesFactory.js +694 -741
  289. package/src/sap/fe/core/services/ShellServicesFactory.ts +45 -40
  290. package/src/sap/fe/core/services/SideEffectsServiceFactory.js +572 -643
  291. package/src/sap/fe/core/services/SideEffectsServiceFactory.ts +67 -96
  292. package/src/sap/fe/core/services/TemplatedViewServiceFactory.js +429 -487
  293. package/src/sap/fe/core/services/TemplatedViewServiceFactory.ts +449 -0
  294. package/src/sap/fe/core/services/view/TemplatingErrorPage.controller.js +48 -8
  295. package/src/sap/fe/core/services/view/TemplatingErrorPage.controller.ts +11 -0
  296. package/src/sap/fe/core/support/AnnotationIssue.support.js +15 -3
  297. package/src/sap/fe/core/support/AnnotationIssue.support.ts +16 -2
  298. package/src/sap/fe/core/support/CollectionFacetUnsupportedLevel.support.js +2 -2
  299. package/src/sap/fe/core/support/CollectionFacetUnsupportedLevel.support.ts +1 -1
  300. package/src/sap/fe/core/support/CommonHelper.js +1 -1
  301. package/src/sap/fe/core/support/CommonHelper.ts +1 -4
  302. package/src/sap/fe/core/support/Diagnostics.js +36 -48
  303. package/src/sap/fe/core/templating/DataModelPathHelper.js +91 -90
  304. package/src/sap/fe/core/templating/DataModelPathHelper.ts +126 -123
  305. package/src/sap/fe/core/templating/DisplayModeFormatter.js +23 -3
  306. package/src/sap/fe/core/templating/DisplayModeFormatter.ts +26 -5
  307. package/src/sap/fe/core/templating/FieldControlHelper.js +8 -8
  308. package/src/sap/fe/core/templating/FieldControlHelper.ts +25 -7
  309. package/src/sap/fe/core/templating/FilterHelper.js +138 -79
  310. package/src/sap/fe/core/templating/FilterHelper.ts +148 -79
  311. package/src/sap/fe/core/templating/PropertyHelper.js +16 -2
  312. package/src/sap/fe/core/templating/PropertyHelper.ts +31 -24
  313. package/src/sap/fe/core/templating/UIFormatters.js +179 -43
  314. package/src/sap/fe/core/templating/UIFormatters.ts +190 -61
  315. package/src/sap/fe/core/type/Email.js +26 -8
  316. package/src/sap/fe/core/type/Email.ts +10 -11
  317. package/ui5.yaml +0 -3
  318. package/src/sap/fe/core/controllerextensions/ControllerExtensionMetadata.js +0 -74
@@ -1,177 +1,191 @@
1
1
  /*!
2
- * SAPUI5
3
- * (c) Copyright 2009-2022 SAP SE. All rights reserved.
2
+ * SAP UI development toolkit for HTML5 (SAPUI5)
3
+ * (c) Copyright 2009-2021 SAP SE. All rights reserved
4
4
  */
5
- sap.ui.define(["sap/ui/core/mvc/ControllerExtension", "sap/ui/core/mvc/OverrideExecution", "sap/ui/model/json/JSONModel"], function(
6
- ControllerExtension,
7
- OverrideExecution,
8
- JSONModel
9
- ) {
10
- "use strict";
11
- /**
12
- * @class Controller extension providing hooks for the navigation using paginators
13
- *
14
- * @name sap.fe.core.controllerextensions.Paginator
15
- * @hideconstructor
16
- * @public
17
- * @since 1.94.0
18
- */
19
- return ControllerExtension.extend("sap.fe.core.controllerextensions.Paginator", {
20
- metadata: {
21
- methods: {
22
- initialize: {
23
- "final": true,
24
- "public": true
25
- },
26
- updateCurrentContext: {
27
- "final": true,
28
- "public": true
29
- },
30
- onBeforeContextUpdate: {
31
- "final": false,
32
- "public": false,
33
- overrideExecution: OverrideExecution.After
34
- },
35
- onContextUpdate: {
36
- "final": false,
37
- "public": true,
38
- overrideExecution: OverrideExecution.After
39
- }
40
- }
41
- },
42
- /**
43
- * Initiates the paginator control.
44
- * @function
45
- * @param {string} oBinding ODataListBinding object
46
- * @param {object} oContext Current context where the navigation is initiated
47
- * @alias sap.fe.core.controllerextensions.Paginator#initialize
48
- * @public
49
- * @since 1.94.0
50
- **/
51
- initialize: function(oBinding, oContext) {
52
- if (oBinding && oBinding.getCurrentContexts) {
53
- this._oListBinding = oBinding;
54
- }
55
- if (oContext) {
56
- this._oCurrentContext = oContext;
57
- }
58
- this._updateCurrentIndexAndButtonEnablement();
59
- },
60
-
61
- _updateCurrentIndexAndButtonEnablement: function() {
62
- var that = this;
63
- if (this._oCurrentContext && this._oListBinding) {
64
- var sPath = this._oCurrentContext.getPath();
65
- // Storing the currentIndex in global variable
66
- this._iCurrentIndex = this._oListBinding.getCurrentContexts().findIndex(function(oContext) {
67
- return oContext && oContext.getPath() === sPath;
68
- });
69
- var oCurrentIndexContext = this._oListBinding.getCurrentContexts()[this._iCurrentIndex];
70
- if (
71
- (!this._iCurrentIndex && this._iCurrentIndex !== 0) ||
72
- !oCurrentIndexContext ||
73
- this._oCurrentContext.getPath() !== oCurrentIndexContext.getPath()
74
- ) {
75
- that._updateCurrentIndex();
76
- }
77
- that._handleButtonEnablement();
78
- }
79
- },
80
-
81
- _handleButtonEnablement: function() {
82
- //Enabling and Disabling the Buttons on change of the control context
83
- var that = this;
84
- var mButtonEnablementModel = that.base.getView().getModel("paginator");
85
- if (this._oListBinding && this._oListBinding.getCurrentContexts().length > 1 && this._iCurrentIndex > -1) {
86
- if (this._iCurrentIndex === this._oListBinding.getCurrentContexts().length - 1) {
87
- mButtonEnablementModel.setProperty("/navDownEnabled", false);
88
- } else {
89
- mButtonEnablementModel.setProperty("/navDownEnabled", true);
90
- }
91
- if (this._iCurrentIndex === 0) {
92
- mButtonEnablementModel.setProperty("/navUpEnabled", false);
93
- } else {
94
- mButtonEnablementModel.setProperty("/navUpEnabled", true);
95
- }
96
- } else {
97
- // Don't show the paginator buttons
98
- // 1. When no listbinding is available
99
- // 2. Only '1' or '0' context exists in the listBinding
100
- // 3. The current index is -ve, i.e the currentIndex is invalid.
101
- mButtonEnablementModel.setProperty("/navUpEnabled", false);
102
- mButtonEnablementModel.setProperty("/navDownEnabled", false);
103
- }
104
- },
105
-
106
- _updateCurrentIndex: function() {
107
- if (this._oCurrentContext && this._oListBinding) {
108
- var sPath = this._oCurrentContext.getPath();
109
- // Storing the currentIndex in global variable
110
- this._iCurrentIndex = this._oListBinding.getCurrentContexts().findIndex(function(oContext) {
111
- return oContext && oContext.getPath() === sPath;
112
- });
113
- }
114
- },
115
-
116
- updateCurrentContext: function(iDeltaIndex) {
117
- var that = this;
118
-
119
- if (!that._oListBinding) {
120
- return;
121
- }
122
-
123
- var aCurrentContexts = that._oListBinding.getCurrentContexts();
124
- var iNewIndex = that._iCurrentIndex + iDeltaIndex;
125
- var oNewContext = aCurrentContexts[iNewIndex];
126
-
127
- if (oNewContext) {
128
- var bPreventIdxUpdate = that.onBeforeContextUpdate(this._oListBinding, this._iCurrentIndex, iDeltaIndex);
129
- if (!bPreventIdxUpdate) {
130
- that._iCurrentIndex = iNewIndex;
131
- that._oCurrentContext = oNewContext;
132
- }
133
- that.onContextUpdate(oNewContext);
134
- }
135
- that._handleButtonEnablement();
136
- },
137
-
138
- /**
139
- * Called before context update.
140
- * @function
141
- * @param {object} oListBinding ODataListBinding object
142
- * @param {object} iCurrentIndex Current index of context in listBinding from where the navigation is initiated
143
- * @param {integer} iIndexUpdate The delta index for update
144
- * @returns {boolean} `true` to prevent the update of current context.
145
- * @alias sap.fe.core.controllerextensions.Paginator#onBeforeContextUpdate
146
- * @private
147
- **/
148
- onBeforeContextUpdate: function(oListBinding, iCurrentIndex, iIndexUpdate) {
149
- return false;
150
- },
151
-
152
- /**
153
- * Returns the updated context after the paginator operation.
154
- * @function
155
- * @param {string} oContext Final context returned after the paginator action
156
- * @alias sap.fe.core.controllerextensions.Paginator#onContextUpdate
157
- * @public
158
- * @since 1.94.0
159
- **/
160
- onContextUpdate: function(oContext) {
161
- //To be overridden by the application
162
- },
163
-
164
- override: {
165
- onInit: function() {
166
- this._oView = this.base.getView();
167
- this._oView.setModel(
168
- new JSONModel({
169
- navUpEnabled: false,
170
- navDownEnabled: false
171
- }),
172
- "paginator"
173
- );
174
- }
175
- }
176
- });
177
- });
5
+ sap.ui.define(["sap/fe/core/helpers/ClassSupport", "sap/ui/core/mvc/ControllerExtension", "sap/ui/core/mvc/OverrideExecution", "sap/ui/model/json/JSONModel"], function (ClassSupport, ControllerExtension, OverrideExecution, JSONModel) {
6
+ "use strict";
7
+
8
+ var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _class, _class2;
9
+
10
+ var publicExtension = ClassSupport.publicExtension;
11
+ var privateExtension = ClassSupport.privateExtension;
12
+ var methodOverride = ClassSupport.methodOverride;
13
+ var finalExtension = ClassSupport.finalExtension;
14
+ var extensible = ClassSupport.extensible;
15
+ var defineUI5Class = ClassSupport.defineUI5Class;
16
+
17
+ function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
18
+
19
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
20
+
21
+ function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { var desc = {}; Object.keys(descriptor).forEach(function (key) { desc[key] = descriptor[key]; }); desc.enumerable = !!desc.enumerable; desc.configurable = !!desc.configurable; if ('value' in desc || desc.initializer) { desc.writable = true; } desc = decorators.slice().reverse().reduce(function (desc, decorator) { return decorator(target, property, desc) || desc; }, desc); if (context && desc.initializer !== void 0) { desc.value = desc.initializer ? desc.initializer.call(context) : void 0; desc.initializer = undefined; } if (desc.initializer === void 0) { Object.defineProperty(target, property, desc); desc = null; } return desc; }
22
+
23
+ /**
24
+ * Controller extension providing hooks for the navigation using paginators
25
+ *
26
+ * @hideconstructor
27
+ * @public
28
+ * @since 1.94.0
29
+ */
30
+ var Paginator = (_dec = defineUI5Class("sap.fe.core.controllerextensions.Paginator"), _dec2 = methodOverride(), _dec3 = publicExtension(), _dec4 = finalExtension(), _dec5 = publicExtension(), _dec6 = finalExtension(), _dec7 = privateExtension(), _dec8 = extensible(OverrideExecution.After), _dec9 = privateExtension(), _dec10 = extensible(OverrideExecution.After), _dec(_class = (_class2 = /*#__PURE__*/function (_ControllerExtension) {
31
+ _inheritsLoose(Paginator, _ControllerExtension);
32
+
33
+ function Paginator() {
34
+ var _this;
35
+
36
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
37
+ args[_key] = arguments[_key];
38
+ }
39
+
40
+ _this = _ControllerExtension.call.apply(_ControllerExtension, [this].concat(args)) || this;
41
+ _this._iCurrentIndex = -1;
42
+ return _this;
43
+ }
44
+
45
+ var _proto = Paginator.prototype;
46
+
47
+ _proto.onInit = function onInit() {
48
+ this._oView = this.base.getView();
49
+
50
+ this._oView.setModel(new JSONModel({
51
+ navUpEnabled: false,
52
+ navDownEnabled: false
53
+ }), "paginator");
54
+ }
55
+ /**
56
+ * Initiates the paginator control.
57
+ * @function
58
+ * @param {sap.ui.model.odata.v4.ODataListBinding} oBinding ODataListBinding object
59
+ * @param {sap.ui.model.odata.v4.Context} oContext Current context where the navigation is initiated
60
+ * @alias sap.fe.core.controllerextensions.Paginator#initialize
61
+ * @public
62
+ * @since 1.94.0
63
+ **/
64
+ ;
65
+
66
+ _proto.initialize = function initialize(oBinding, oContext) {
67
+ if (oBinding && oBinding.getCurrentContexts) {
68
+ this._oListBinding = oBinding;
69
+ }
70
+
71
+ if (oContext) {
72
+ this._oCurrentContext = oContext;
73
+ }
74
+
75
+ this._updateCurrentIndexAndButtonEnablement();
76
+ };
77
+
78
+ _proto._updateCurrentIndexAndButtonEnablement = function _updateCurrentIndexAndButtonEnablement() {
79
+ if (this._oCurrentContext && this._oListBinding) {
80
+ var sPath = this._oCurrentContext.getPath(); // Storing the currentIndex in global variable
81
+
82
+
83
+ this._iCurrentIndex = this._oListBinding.getCurrentContexts().findIndex(function (oContext) {
84
+ return oContext && oContext.getPath() === sPath;
85
+ });
86
+
87
+ var oCurrentIndexContext = this._oListBinding.getCurrentContexts()[this._iCurrentIndex];
88
+
89
+ if (!this._iCurrentIndex && this._iCurrentIndex !== 0 || !oCurrentIndexContext || this._oCurrentContext.getPath() !== oCurrentIndexContext.getPath()) {
90
+ this._updateCurrentIndex();
91
+ }
92
+
93
+ this._handleButtonEnablement();
94
+ }
95
+ };
96
+
97
+ _proto._handleButtonEnablement = function _handleButtonEnablement() {
98
+ //Enabling and Disabling the Buttons on change of the control context
99
+ var mButtonEnablementModel = this.base.getView().getModel("paginator");
100
+
101
+ if (this._oListBinding && this._oListBinding.getCurrentContexts().length > 1 && this._iCurrentIndex > -1) {
102
+ if (this._iCurrentIndex === this._oListBinding.getCurrentContexts().length - 1) {
103
+ mButtonEnablementModel.setProperty("/navDownEnabled", false);
104
+ } else {
105
+ mButtonEnablementModel.setProperty("/navDownEnabled", true);
106
+ }
107
+
108
+ if (this._iCurrentIndex === 0) {
109
+ mButtonEnablementModel.setProperty("/navUpEnabled", false);
110
+ } else {
111
+ mButtonEnablementModel.setProperty("/navUpEnabled", true);
112
+ }
113
+ } else {
114
+ // Don't show the paginator buttons
115
+ // 1. When no listbinding is available
116
+ // 2. Only '1' or '0' context exists in the listBinding
117
+ // 3. The current index is -ve, i.e the currentIndex is invalid.
118
+ mButtonEnablementModel.setProperty("/navUpEnabled", false);
119
+ mButtonEnablementModel.setProperty("/navDownEnabled", false);
120
+ }
121
+ };
122
+
123
+ _proto._updateCurrentIndex = function _updateCurrentIndex() {
124
+ if (this._oCurrentContext && this._oListBinding) {
125
+ var sPath = this._oCurrentContext.getPath(); // Storing the currentIndex in global variable
126
+
127
+
128
+ this._iCurrentIndex = this._oListBinding.getCurrentContexts().findIndex(function (oContext) {
129
+ return oContext && oContext.getPath() === sPath;
130
+ });
131
+ }
132
+ };
133
+
134
+ _proto.updateCurrentContext = function updateCurrentContext(iDeltaIndex) {
135
+ if (!this._oListBinding) {
136
+ return;
137
+ }
138
+
139
+ var aCurrentContexts = this._oListBinding.getCurrentContexts();
140
+
141
+ var iNewIndex = this._iCurrentIndex + iDeltaIndex;
142
+ var oNewContext = aCurrentContexts[iNewIndex];
143
+
144
+ if (oNewContext) {
145
+ var bPreventIdxUpdate = this.onBeforeContextUpdate(this._oListBinding, this._iCurrentIndex, iDeltaIndex);
146
+
147
+ if (!bPreventIdxUpdate) {
148
+ this._iCurrentIndex = iNewIndex;
149
+ this._oCurrentContext = oNewContext;
150
+ }
151
+
152
+ this.onContextUpdate(oNewContext);
153
+ }
154
+
155
+ this._handleButtonEnablement();
156
+ }
157
+ /**
158
+ * Called before context update.
159
+ * @function
160
+ * @param {sap.ui.model.odata.v4.ODataListBinding} oListBinding ODataListBinding object
161
+ * @param {number} iCurrentIndex Current index of context in listBinding from where the navigation is initiated
162
+ * @param {number} iIndexUpdate The delta index for update
163
+ * @returns {boolean} `true` to prevent the update of current context.
164
+ * @alias sap.fe.core.controllerextensions.Paginator#onBeforeContextUpdate
165
+ * @private
166
+ **/
167
+ ;
168
+
169
+ _proto. // eslint-disable-next-line @typescript-eslint/no-unused-vars
170
+ onBeforeContextUpdate = function onBeforeContextUpdate(oListBinding, iCurrentIndex, iIndexUpdate) {
171
+ return false;
172
+ }
173
+ /**
174
+ * Returns the updated context after the paginator operation.
175
+ * @function
176
+ * @param {sap.ui.model.odata.v4.Context} oContext Final context returned after the paginator action
177
+ * @alias sap.fe.core.controllerextensions.Paginator#onContextUpdate
178
+ * @public
179
+ * @since 1.94.0
180
+ **/
181
+ ;
182
+
183
+ _proto. // eslint-disable-next-line @typescript-eslint/no-unused-vars
184
+ onContextUpdate = function onContextUpdate(oContext) {//To be overridden by the application
185
+ };
186
+
187
+ return Paginator;
188
+ }(ControllerExtension), (_applyDecoratedDescriptor(_class2.prototype, "onInit", [_dec2], Object.getOwnPropertyDescriptor(_class2.prototype, "onInit"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, "initialize", [_dec3, _dec4], Object.getOwnPropertyDescriptor(_class2.prototype, "initialize"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, "updateCurrentContext", [_dec5, _dec6], Object.getOwnPropertyDescriptor(_class2.prototype, "updateCurrentContext"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, "onBeforeContextUpdate", [_dec7, _dec8], Object.getOwnPropertyDescriptor(_class2.prototype, "onBeforeContextUpdate"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, "onContextUpdate", [_dec9, _dec10], Object.getOwnPropertyDescriptor(_class2.prototype, "onContextUpdate"), _class2.prototype)), _class2)) || _class);
189
+ return Paginator;
190
+ }, false);
191
+ //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlBhZ2lu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XVudXNlZC12YXJzXG5cdG9uQmVmb3JlQ29udGV4dFVwZGF0ZShvTGlzdEJpbmRpbmc6IE9EYXRhTGlzdEJpbmRpbmcsIGlDdXJyZW50SW5kZXg6IG51bWJlciwgaUluZGV4VXBkYXRlOiBudW1iZXIpIHtcblx0XHRyZXR1cm4gZmFsc2U7XG5cdH1cblxuXHQvKipcblx0ICogUmV0dXJucyB0aGUgdXBkYXRlZCBjb250ZXh0IGFmdGVyIHRoZSBwYWdpbmF0b3Igb3BlcmF0aW9uLlxuXHQgKiBAZnVuY3Rpb25cblx0ICogQHBhcmFtIHtzYXAudWkubW9kZWwub2RhdGEudjQuQ29udGV4dH0gb0NvbnRleHQgRmluYWwgY29udGV4dCByZXR1cm5lZCBhZnRlciB0aGUgcGFnaW5hdG9yIGFjdGlvblxuXHQgKiBAYWxpYXMgc2FwLmZlLmNvcmUuY29udHJvbGxlcmV4dGVuc2lvbnMuUGFnaW5hdG9yI29uQ29udGV4dFVwZGF0ZVxuXHQgKiBAcHVibGljXG5cdCAqIEBzaW5jZSAxLjk0LjBcblx0ICoqL1xuXHRAcHJpdmF0ZUV4dGVuc2lvbigpXG5cdEBleHRlbnNpYmxlKE92ZXJyaWRlRXhlY3V0aW9uLkFmdGVyKVxuXHQvLyBlc2xpbnQtZGlzYWJsZS1uZXh0LWxpbmUgQHR5cGVzY3JpcHQtZXNsaW50L25vLXVudXNlZC12YXJzXG5cdG9uQ29udGV4dFVwZGF0ZShvQ29udGV4dDogQ29udGV4dCkge1xuXHRcdC8vVG8gYmUgb3ZlcnJpZGRlbiBieSB0aGUgYXBwbGljYXRpb25cblx0fVxufVxuZXhwb3J0IGRlZmF1bHQgUGFnaW5hdG9yO1xuIl19
@@ -0,0 +1,169 @@
1
+ import {
2
+ defineUI5Class,
3
+ extensible,
4
+ finalExtension,
5
+ methodOverride,
6
+ privateExtension,
7
+ publicExtension
8
+ } from "sap/fe/core/helpers/ClassSupport";
9
+ import PageController from "sap/fe/core/PageController";
10
+ import ControllerExtension from "sap/ui/core/mvc/ControllerExtension";
11
+ import OverrideExecution from "sap/ui/core/mvc/OverrideExecution";
12
+ import View from "sap/ui/core/mvc/View";
13
+ import JSONModel from "sap/ui/model/json/JSONModel";
14
+ import Context from "sap/ui/model/odata/v4/Context";
15
+ import ODataListBinding from "sap/ui/model/odata/v4/ODataListBinding";
16
+
17
+ /**
18
+ * Controller extension providing hooks for the navigation using paginators
19
+ *
20
+ * @hideconstructor
21
+ * @public
22
+ * @since 1.94.0
23
+ */
24
+ @defineUI5Class("sap.fe.core.controllerextensions.Paginator")
25
+ class Paginator extends ControllerExtension {
26
+ private _oView!: View;
27
+ protected base!: PageController;
28
+ private _oListBinding: any;
29
+ private _oCurrentContext?: Context;
30
+ private _iCurrentIndex: number = -1;
31
+ @methodOverride()
32
+ onInit() {
33
+ this._oView = this.base.getView();
34
+ this._oView.setModel(
35
+ new JSONModel({
36
+ navUpEnabled: false,
37
+ navDownEnabled: false
38
+ }),
39
+ "paginator"
40
+ );
41
+ }
42
+ /**
43
+ * Initiates the paginator control.
44
+ * @function
45
+ * @param {sap.ui.model.odata.v4.ODataListBinding} oBinding ODataListBinding object
46
+ * @param {sap.ui.model.odata.v4.Context} oContext Current context where the navigation is initiated
47
+ * @alias sap.fe.core.controllerextensions.Paginator#initialize
48
+ * @public
49
+ * @since 1.94.0
50
+ **/
51
+ @publicExtension()
52
+ @finalExtension()
53
+ initialize(oBinding: ODataListBinding | any, oContext: Context) {
54
+ if (oBinding && oBinding.getCurrentContexts) {
55
+ this._oListBinding = oBinding;
56
+ }
57
+ if (oContext) {
58
+ this._oCurrentContext = oContext;
59
+ }
60
+ this._updateCurrentIndexAndButtonEnablement();
61
+ }
62
+
63
+ _updateCurrentIndexAndButtonEnablement() {
64
+ if (this._oCurrentContext && this._oListBinding) {
65
+ const sPath = this._oCurrentContext.getPath();
66
+ // Storing the currentIndex in global variable
67
+ this._iCurrentIndex = this._oListBinding.getCurrentContexts().findIndex(function (oContext: any) {
68
+ return oContext && oContext.getPath() === sPath;
69
+ });
70
+ const oCurrentIndexContext = this._oListBinding.getCurrentContexts()[this._iCurrentIndex];
71
+ if (
72
+ (!this._iCurrentIndex && this._iCurrentIndex !== 0) ||
73
+ !oCurrentIndexContext ||
74
+ this._oCurrentContext.getPath() !== oCurrentIndexContext.getPath()
75
+ ) {
76
+ this._updateCurrentIndex();
77
+ }
78
+ this._handleButtonEnablement();
79
+ }
80
+ }
81
+
82
+ _handleButtonEnablement() {
83
+ //Enabling and Disabling the Buttons on change of the control context
84
+ const mButtonEnablementModel = this.base.getView().getModel("paginator") as JSONModel;
85
+ if (this._oListBinding && this._oListBinding.getCurrentContexts().length > 1 && this._iCurrentIndex > -1) {
86
+ if (this._iCurrentIndex === this._oListBinding.getCurrentContexts().length - 1) {
87
+ mButtonEnablementModel.setProperty("/navDownEnabled", false);
88
+ } else {
89
+ mButtonEnablementModel.setProperty("/navDownEnabled", true);
90
+ }
91
+ if (this._iCurrentIndex === 0) {
92
+ mButtonEnablementModel.setProperty("/navUpEnabled", false);
93
+ } else {
94
+ mButtonEnablementModel.setProperty("/navUpEnabled", true);
95
+ }
96
+ } else {
97
+ // Don't show the paginator buttons
98
+ // 1. When no listbinding is available
99
+ // 2. Only '1' or '0' context exists in the listBinding
100
+ // 3. The current index is -ve, i.e the currentIndex is invalid.
101
+ mButtonEnablementModel.setProperty("/navUpEnabled", false);
102
+ mButtonEnablementModel.setProperty("/navDownEnabled", false);
103
+ }
104
+ }
105
+
106
+ _updateCurrentIndex() {
107
+ if (this._oCurrentContext && this._oListBinding) {
108
+ const sPath = this._oCurrentContext.getPath();
109
+ // Storing the currentIndex in global variable
110
+ this._iCurrentIndex = this._oListBinding.getCurrentContexts().findIndex(function (oContext: any) {
111
+ return oContext && oContext.getPath() === sPath;
112
+ });
113
+ }
114
+ }
115
+ @publicExtension()
116
+ @finalExtension()
117
+ updateCurrentContext(iDeltaIndex: any) {
118
+ if (!this._oListBinding) {
119
+ return;
120
+ }
121
+
122
+ const aCurrentContexts = this._oListBinding.getCurrentContexts();
123
+ const iNewIndex = this._iCurrentIndex + iDeltaIndex;
124
+ const oNewContext = aCurrentContexts[iNewIndex];
125
+
126
+ if (oNewContext) {
127
+ const bPreventIdxUpdate = this.onBeforeContextUpdate(this._oListBinding, this._iCurrentIndex, iDeltaIndex);
128
+ if (!bPreventIdxUpdate) {
129
+ this._iCurrentIndex = iNewIndex;
130
+ this._oCurrentContext = oNewContext;
131
+ }
132
+ this.onContextUpdate(oNewContext);
133
+ }
134
+ this._handleButtonEnablement();
135
+ }
136
+
137
+ /**
138
+ * Called before context update.
139
+ * @function
140
+ * @param {sap.ui.model.odata.v4.ODataListBinding} oListBinding ODataListBinding object
141
+ * @param {number} iCurrentIndex Current index of context in listBinding from where the navigation is initiated
142
+ * @param {number} iIndexUpdate The delta index for update
143
+ * @returns {boolean} `true` to prevent the update of current context.
144
+ * @alias sap.fe.core.controllerextensions.Paginator#onBeforeContextUpdate
145
+ * @private
146
+ **/
147
+ @privateExtension()
148
+ @extensible(OverrideExecution.After)
149
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
150
+ onBeforeContextUpdate(oListBinding: ODataListBinding, iCurrentIndex: number, iIndexUpdate: number) {
151
+ return false;
152
+ }
153
+
154
+ /**
155
+ * Returns the updated context after the paginator operation.
156
+ * @function
157
+ * @param {sap.ui.model.odata.v4.Context} oContext Final context returned after the paginator action
158
+ * @alias sap.fe.core.controllerextensions.Paginator#onContextUpdate
159
+ * @public
160
+ * @since 1.94.0
161
+ **/
162
+ @privateExtension()
163
+ @extensible(OverrideExecution.After)
164
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
165
+ onContextUpdate(oContext: Context) {
166
+ //To be overridden by the application
167
+ }
168
+ }
169
+ export default Paginator;