@sapui5/sap.fe.core 1.97.0 → 1.100.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (306) hide show
  1. package/package.json +7 -4
  2. package/src/sap/fe/core/.library +1 -1
  3. package/src/sap/fe/core/AnnotationHelper.js +309 -405
  4. package/src/sap/fe/core/AnnotationHelper.ts +315 -0
  5. package/src/sap/fe/core/AppComponent.js +389 -397
  6. package/src/sap/fe/core/AppComponent.ts +403 -0
  7. package/src/sap/fe/core/AppStateHandler.js +198 -181
  8. package/src/sap/fe/core/AppStateHandler.ts +171 -0
  9. package/src/sap/fe/core/BaseController.js +83 -58
  10. package/src/sap/fe/core/BaseController.ts +68 -0
  11. package/src/sap/fe/core/BusyLocker.js +105 -121
  12. package/src/sap/fe/core/BusyLocker.ts +98 -0
  13. package/src/sap/fe/core/CommonUtils.js +2164 -2379
  14. package/src/sap/fe/core/CommonUtils.ts +2177 -0
  15. package/src/sap/fe/core/ExtensionAPI.js +279 -266
  16. package/src/sap/fe/core/ExtensionAPI.ts +250 -0
  17. package/src/sap/fe/core/PageController.js +218 -125
  18. package/src/sap/fe/core/PageController.ts +129 -0
  19. package/src/sap/fe/core/RouterProxy.js +924 -807
  20. package/src/sap/fe/core/RouterProxy.ts +840 -0
  21. package/src/sap/fe/core/Synchronization.js +41 -35
  22. package/src/sap/fe/core/Synchronization.ts +29 -0
  23. package/src/sap/fe/core/TemplateComponent.js +173 -155
  24. package/src/sap/fe/core/TemplateComponent.ts +173 -0
  25. package/src/sap/fe/core/TemplateModel.js +79 -54
  26. package/src/sap/fe/core/TemplateModel.ts +63 -0
  27. package/src/sap/fe/core/TransactionHelper.js +1560 -1579
  28. package/src/sap/fe/core/TransactionHelper.ts +1717 -0
  29. package/src/sap/fe/core/actions/collaboration/ActivitySync.js +392 -0
  30. package/src/sap/fe/core/actions/collaboration/ActivitySync.ts +355 -0
  31. package/src/sap/fe/core/actions/collaboration/CollaborationCommon.js +136 -0
  32. package/src/sap/fe/core/actions/collaboration/CollaborationCommon.ts +119 -0
  33. package/src/sap/fe/core/actions/collaboration/Manage.js +262 -0
  34. package/src/sap/fe/core/actions/collaboration/Manage.ts +244 -0
  35. package/src/sap/fe/core/actions/collaboration/ManageDialog.fragment.xml +103 -0
  36. package/src/sap/fe/core/actions/collaboration/UserDetails.fragment.xml +13 -0
  37. package/src/sap/fe/core/actions/draft.js +521 -581
  38. package/src/sap/fe/core/actions/draft.ts +566 -0
  39. package/src/sap/fe/core/actions/messageHandling.js +564 -511
  40. package/src/sap/fe/core/actions/messageHandling.ts +552 -0
  41. package/src/sap/fe/core/actions/nonDraft.js +17 -19
  42. package/src/sap/fe/core/actions/nonDraft.ts +12 -0
  43. package/src/sap/fe/core/actions/operations.js +1093 -1211
  44. package/src/sap/fe/core/actions/operations.ts +1192 -0
  45. package/src/sap/fe/core/actions/sticky.js +114 -104
  46. package/src/sap/fe/core/actions/sticky.ts +119 -0
  47. package/src/sap/fe/core/controllerextensions/ControllerExtensionMetadata.js +70 -66
  48. package/src/sap/fe/core/controllerextensions/ControllerExtensionMetadata.ts +65 -0
  49. package/src/sap/fe/core/controllerextensions/EditFlow.js +1594 -1701
  50. package/src/sap/fe/core/controllerextensions/EditFlow.ts +1672 -0
  51. package/src/sap/fe/core/controllerextensions/IntentBasedNavigation.js +80 -54
  52. package/src/sap/fe/core/controllerextensions/IntentBasedNavigation.ts +61 -0
  53. package/src/sap/fe/core/controllerextensions/InternalEditFlow.js +719 -505
  54. package/src/sap/fe/core/controllerextensions/InternalEditFlow.ts +783 -0
  55. package/src/sap/fe/core/controllerextensions/InternalIntentBasedNavigation.js +797 -813
  56. package/src/sap/fe/core/controllerextensions/InternalIntentBasedNavigation.ts +803 -0
  57. package/src/sap/fe/core/controllerextensions/InternalRouting.js +1005 -973
  58. package/src/sap/fe/core/controllerextensions/InternalRouting.ts +978 -0
  59. package/src/sap/fe/core/controllerextensions/KPIManagement.js +530 -476
  60. package/src/sap/fe/core/controllerextensions/KPIManagement.ts +137 -46
  61. package/src/sap/fe/core/controllerextensions/MassEdit.js +144 -0
  62. package/src/sap/fe/core/controllerextensions/MassEdit.ts +156 -0
  63. package/src/sap/fe/core/controllerextensions/MessageHandler.js +234 -232
  64. package/src/sap/fe/core/controllerextensions/MessageHandler.ts +225 -0
  65. package/src/sap/fe/core/controllerextensions/PageReady.js +302 -337
  66. package/src/sap/fe/core/controllerextensions/PageReady.ts +23 -17
  67. package/src/sap/fe/core/controllerextensions/Paginator.js +189 -148
  68. package/src/sap/fe/core/controllerextensions/Paginator.ts +163 -0
  69. package/src/sap/fe/core/controllerextensions/Placeholder.js +158 -146
  70. package/src/sap/fe/core/controllerextensions/Placeholder.ts +151 -0
  71. package/src/sap/fe/core/controllerextensions/Routing.js +145 -106
  72. package/src/sap/fe/core/controllerextensions/Routing.ts +132 -0
  73. package/src/sap/fe/core/controllerextensions/RoutingListener.js +8 -6
  74. package/src/sap/fe/core/controllerextensions/RoutingListener.ts +3 -0
  75. package/src/sap/fe/core/controllerextensions/Share.js +220 -244
  76. package/src/sap/fe/core/controllerextensions/Share.ts +231 -0
  77. package/src/sap/fe/core/controllerextensions/SideEffects.js +593 -634
  78. package/src/sap/fe/core/controllerextensions/SideEffects.ts +29 -27
  79. package/src/sap/fe/core/controllerextensions/ViewState.js +789 -806
  80. package/src/sap/fe/core/controllerextensions/ViewState.ts +805 -0
  81. package/src/sap/fe/core/controls/ActionParameterDialog.fragment.xml +4 -3
  82. package/src/sap/fe/core/controls/ActionPartial.fragment.xml +2 -2
  83. package/src/sap/fe/core/controls/CommandExecution.js +68 -66
  84. package/src/sap/fe/core/controls/CommandExecution.ts +72 -0
  85. package/src/sap/fe/core/controls/ConditionalWrapper.js +91 -75
  86. package/src/sap/fe/core/controls/ConditionalWrapper.ts +83 -0
  87. package/src/sap/fe/core/controls/CustomQuickViewPage.js +131 -125
  88. package/src/sap/fe/core/controls/CustomQuickViewPage.ts +126 -0
  89. package/src/sap/fe/core/controls/DataLossOrDraftDiscard/DataLossOrDraftDiscardHandler.js +105 -110
  90. package/src/sap/fe/core/controls/DataLossOrDraftDiscard/DataLossOrDraftDiscardHandler.ts +101 -0
  91. package/src/sap/fe/core/controls/FieldWrapper.js +122 -140
  92. package/src/sap/fe/core/controls/FieldWrapper.ts +115 -0
  93. package/src/sap/fe/core/controls/FilterBar.js +163 -159
  94. package/src/sap/fe/core/controls/FilterBar.ts +143 -0
  95. package/src/sap/fe/core/controls/FormElementWrapper.js +46 -44
  96. package/src/sap/fe/core/controls/FormElementWrapper.ts +40 -0
  97. package/src/sap/fe/core/controls/MultiValueParameterDelegate.js +38 -42
  98. package/src/sap/fe/core/controls/MultiValueParameterDelegate.ts +31 -0
  99. package/src/sap/fe/core/controls/NonComputedVisibleKeyFieldsDialog.fragment.xml +2 -1
  100. package/src/sap/fe/core/controls/filterbar/FilterContainer.js +127 -116
  101. package/src/sap/fe/core/controls/filterbar/FilterContainer.ts +98 -0
  102. package/src/sap/fe/core/controls/filterbar/VisualFilter.js +242 -255
  103. package/src/sap/fe/core/controls/filterbar/VisualFilter.ts +245 -0
  104. package/src/sap/fe/core/controls/filterbar/VisualFilterContainer.js +151 -141
  105. package/src/sap/fe/core/controls/filterbar/VisualFilterContainer.ts +125 -0
  106. package/src/sap/fe/core/controls/filterbar/utils/VisualFilterUtils.js +336 -322
  107. package/src/sap/fe/core/controls/filterbar/utils/VisualFilterUtils.ts +337 -0
  108. package/src/sap/fe/core/controls/massEdit/MassEditDialog.fragment.xml +106 -0
  109. package/src/sap/fe/core/controls/massEdit/MassEditHandlers.js +79 -0
  110. package/src/sap/fe/core/controls/massEdit/MassEditHandlers.ts +70 -0
  111. package/src/sap/fe/core/converters/ConverterContext.js +348 -367
  112. package/src/sap/fe/core/converters/ConverterContext.ts +33 -19
  113. package/src/sap/fe/core/converters/ManifestSettings.js +12 -1
  114. package/src/sap/fe/core/converters/ManifestSettings.ts +16 -1
  115. package/src/sap/fe/core/converters/ManifestWrapper.js +354 -354
  116. package/src/sap/fe/core/converters/ManifestWrapper.ts +34 -6
  117. package/src/sap/fe/core/converters/MetaModelConverter.js +72 -9
  118. package/src/sap/fe/core/converters/MetaModelConverter.ts +75 -16
  119. package/src/sap/fe/core/converters/TemplateConverter.js +1 -1
  120. package/src/sap/fe/core/converters/TemplateConverter.ts +4 -3
  121. package/src/sap/fe/core/converters/annotations/DataField.js +28 -14
  122. package/src/sap/fe/core/converters/annotations/DataField.ts +38 -14
  123. package/src/sap/fe/core/converters/common/AnnotationConverter.js +33 -21
  124. package/src/sap/fe/core/converters/controls/Common/Action.js +11 -2
  125. package/src/sap/fe/core/converters/controls/Common/Action.ts +8 -2
  126. package/src/sap/fe/core/converters/controls/Common/Chart.js +5 -3
  127. package/src/sap/fe/core/converters/controls/Common/Chart.ts +11 -3
  128. package/src/sap/fe/core/converters/controls/Common/DataVisualization.js +3 -3
  129. package/src/sap/fe/core/converters/controls/Common/DataVisualization.ts +2 -2
  130. package/src/sap/fe/core/converters/controls/Common/Form.js +21 -11
  131. package/src/sap/fe/core/converters/controls/Common/Form.ts +28 -6
  132. package/src/sap/fe/core/converters/controls/Common/KPI.js +69 -4
  133. package/src/sap/fe/core/converters/controls/Common/KPI.ts +75 -2
  134. package/src/sap/fe/core/converters/controls/Common/Table.js +507 -408
  135. package/src/sap/fe/core/converters/controls/Common/Table.ts +618 -500
  136. package/src/sap/fe/core/converters/controls/Common/table/StandardActions.js +592 -0
  137. package/src/sap/fe/core/converters/controls/Common/table/StandardActions.ts +718 -0
  138. package/src/sap/fe/core/converters/controls/ListReport/FilterBar.js +465 -59
  139. package/src/sap/fe/core/converters/controls/ListReport/FilterBar.ts +462 -72
  140. package/src/sap/fe/core/converters/controls/ListReport/VisualFilters.js +2 -2
  141. package/src/sap/fe/core/converters/controls/ListReport/VisualFilters.ts +1 -1
  142. package/src/sap/fe/core/converters/controls/ObjectPage/SubSection.js +17 -9
  143. package/src/sap/fe/core/converters/controls/ObjectPage/SubSection.ts +24 -9
  144. package/src/sap/fe/core/converters/helpers/Aggregation.js +118 -121
  145. package/src/sap/fe/core/converters/helpers/Aggregation.ts +28 -5
  146. package/src/sap/fe/core/converters/helpers/BindingHelper.js +20 -6
  147. package/src/sap/fe/core/converters/helpers/BindingHelper.ts +16 -4
  148. package/src/sap/fe/core/converters/helpers/ConfigurableObject.js +12 -1
  149. package/src/sap/fe/core/converters/helpers/ConfigurableObject.ts +11 -0
  150. package/src/sap/fe/core/converters/helpers/IssueManager.js +7 -1
  151. package/src/sap/fe/core/converters/helpers/IssueManager.ts +6 -0
  152. package/src/sap/fe/core/converters/helpers/Key.js +42 -57
  153. package/src/sap/fe/core/converters/helpers/Key.ts +1 -1
  154. package/src/sap/fe/core/converters/objectPage/HeaderAndFooterAction.js +28 -7
  155. package/src/sap/fe/core/converters/objectPage/HeaderAndFooterAction.ts +23 -6
  156. package/src/sap/fe/core/converters/templates/ListReportConverter.js +20 -7
  157. package/src/sap/fe/core/converters/templates/ListReportConverter.ts +36 -14
  158. package/src/sap/fe/core/converters/templates/ObjectPageConverter.js +7 -5
  159. package/src/sap/fe/core/converters/templates/ObjectPageConverter.ts +5 -1
  160. package/src/sap/fe/core/designtime/AppComponent.designtime.js +93 -90
  161. package/src/sap/fe/core/designtime/AppComponent.designtime.ts +91 -0
  162. package/src/sap/fe/core/formatters/CollaborationFormatter.js +104 -0
  163. package/src/sap/fe/core/formatters/CollaborationFormatter.ts +60 -0
  164. package/src/sap/fe/core/formatters/CriticalityFormatter.js +1 -1
  165. package/src/sap/fe/core/formatters/CriticalityFormatter.ts +1 -1
  166. package/src/sap/fe/core/formatters/FPMFormatter.js +1 -1
  167. package/src/sap/fe/core/formatters/FPMFormatter.ts +4 -10
  168. package/src/sap/fe/core/formatters/KPIFormatter.js +1 -1
  169. package/src/sap/fe/core/formatters/KPIFormatter.ts +3 -1
  170. package/src/sap/fe/core/formatters/TableFormatter.js +91 -29
  171. package/src/sap/fe/core/formatters/TableFormatter.ts +94 -28
  172. package/src/sap/fe/core/formatters/ValueFormatter.js +30 -5
  173. package/src/sap/fe/core/formatters/ValueFormatter.ts +30 -7
  174. package/src/sap/fe/core/fpm/Component.js +51 -54
  175. package/src/sap/fe/core/fpm/Component.ts +48 -0
  176. package/src/sap/fe/core/helpers/AppStartupHelper.js +373 -0
  177. package/src/sap/fe/core/helpers/AppStartupHelper.ts +417 -0
  178. package/src/sap/fe/core/helpers/BindingExpression.js +489 -442
  179. package/src/sap/fe/core/helpers/BindingExpression.ts +486 -469
  180. package/src/sap/fe/core/helpers/ClassSupport.js +212 -76
  181. package/src/sap/fe/core/helpers/ClassSupport.ts +198 -71
  182. package/src/sap/fe/core/helpers/DynamicAnnotationPathHelper.js +64 -59
  183. package/src/sap/fe/core/helpers/DynamicAnnotationPathHelper.ts +52 -0
  184. package/src/sap/fe/core/helpers/EditState.js +81 -84
  185. package/src/sap/fe/core/helpers/EditState.ts +81 -0
  186. package/src/sap/fe/core/helpers/ExcelFormatHelper.js +62 -48
  187. package/src/sap/fe/core/helpers/ExcelFormatHelper.ts +49 -0
  188. package/src/sap/fe/core/helpers/FPMHelper.js +52 -56
  189. package/src/sap/fe/core/helpers/FPMHelper.ts +62 -0
  190. package/src/sap/fe/core/helpers/KeepAliveHelper.js +4 -5
  191. package/src/sap/fe/core/helpers/KeepAliveHelper.ts +10 -10
  192. package/src/sap/fe/core/helpers/MassEditHelper.js +604 -0
  193. package/src/sap/fe/core/helpers/MassEditHelper.ts +699 -0
  194. package/src/sap/fe/core/helpers/ModelHelper.js +253 -225
  195. package/src/sap/fe/core/helpers/ModelHelper.ts +250 -0
  196. package/src/sap/fe/core/helpers/PasteHelper.js +210 -132
  197. package/src/sap/fe/core/helpers/PasteHelper.ts +196 -0
  198. package/src/sap/fe/core/helpers/SemanticDateOperators.js +336 -313
  199. package/src/sap/fe/core/helpers/SemanticDateOperators.ts +334 -0
  200. package/src/sap/fe/core/helpers/SemanticKeyHelper.js +66 -67
  201. package/src/sap/fe/core/helpers/SemanticKeyHelper.ts +73 -0
  202. package/src/sap/fe/core/helpers/StableIdHelper.js +4 -7
  203. package/src/sap/fe/core/helpers/StableIdHelper.ts +2 -6
  204. package/src/sap/fe/core/jsx-runtime/jsx.js +1 -1
  205. package/src/sap/fe/core/jsx-runtime/jsx.ts +1 -1
  206. package/src/sap/fe/core/library.js +427 -425
  207. package/src/sap/fe/core/library.support.js +23 -27
  208. package/src/sap/fe/core/library.support.ts +23 -0
  209. package/src/sap/fe/core/library.ts +420 -0
  210. package/src/sap/fe/core/manifestMerger/ChangePageConfiguration.js +64 -0
  211. package/src/sap/fe/core/manifestMerger/ChangePageConfiguration.ts +69 -0
  212. package/src/sap/fe/core/messagebundle.properties +78 -13
  213. package/src/sap/fe/core/messagebundle_ar.properties +58 -7
  214. package/src/sap/fe/core/messagebundle_bg.properties +58 -7
  215. package/src/sap/fe/core/messagebundle_ca.properties +58 -7
  216. package/src/sap/fe/core/messagebundle_cs.properties +59 -8
  217. package/src/sap/fe/core/messagebundle_cy.properties +58 -7
  218. package/src/sap/fe/core/messagebundle_da.properties +58 -7
  219. package/src/sap/fe/core/messagebundle_de.properties +58 -7
  220. package/src/sap/fe/core/messagebundle_el.properties +58 -7
  221. package/src/sap/fe/core/messagebundle_en.properties +57 -6
  222. package/src/sap/fe/core/messagebundle_en_GB.properties +57 -6
  223. package/src/sap/fe/core/messagebundle_en_US_sappsd.properties +61 -6
  224. package/src/sap/fe/core/messagebundle_en_US_saprigi.properties +58 -7
  225. package/src/sap/fe/core/messagebundle_en_US_saptrc.properties +58 -7
  226. package/src/sap/fe/core/messagebundle_es.properties +58 -7
  227. package/src/sap/fe/core/messagebundle_es_MX.properties +58 -7
  228. package/src/sap/fe/core/messagebundle_et.properties +58 -7
  229. package/src/sap/fe/core/messagebundle_fi.properties +60 -9
  230. package/src/sap/fe/core/messagebundle_fr.properties +64 -13
  231. package/src/sap/fe/core/messagebundle_fr_CA.properties +59 -8
  232. package/src/sap/fe/core/messagebundle_hi.properties +58 -7
  233. package/src/sap/fe/core/messagebundle_hr.properties +58 -7
  234. package/src/sap/fe/core/messagebundle_hu.properties +59 -8
  235. package/src/sap/fe/core/messagebundle_id.properties +61 -10
  236. package/src/sap/fe/core/messagebundle_it.properties +58 -7
  237. package/src/sap/fe/core/messagebundle_iw.properties +58 -7
  238. package/src/sap/fe/core/messagebundle_ja.properties +58 -7
  239. package/src/sap/fe/core/messagebundle_kk.properties +58 -7
  240. package/src/sap/fe/core/messagebundle_ko.properties +58 -7
  241. package/src/sap/fe/core/messagebundle_lt.properties +58 -7
  242. package/src/sap/fe/core/messagebundle_lv.properties +59 -8
  243. package/src/sap/fe/core/messagebundle_ms.properties +58 -7
  244. package/src/sap/fe/core/messagebundle_nl.properties +58 -7
  245. package/src/sap/fe/core/messagebundle_no.properties +58 -7
  246. package/src/sap/fe/core/messagebundle_pl.properties +58 -7
  247. package/src/sap/fe/core/messagebundle_pt.properties +59 -8
  248. package/src/sap/fe/core/messagebundle_pt_PT.properties +58 -7
  249. package/src/sap/fe/core/messagebundle_ro.properties +58 -7
  250. package/src/sap/fe/core/messagebundle_ru.properties +58 -7
  251. package/src/sap/fe/core/messagebundle_sh.properties +58 -7
  252. package/src/sap/fe/core/messagebundle_sk.properties +58 -7
  253. package/src/sap/fe/core/messagebundle_sl.properties +58 -7
  254. package/src/sap/fe/core/messagebundle_sv.properties +59 -8
  255. package/src/sap/fe/core/messagebundle_th.properties +58 -7
  256. package/src/sap/fe/core/messagebundle_tr.properties +60 -9
  257. package/src/sap/fe/core/messagebundle_uk.properties +58 -7
  258. package/src/sap/fe/core/messagebundle_vi.properties +58 -7
  259. package/src/sap/fe/core/messagebundle_zh_CN.properties +58 -7
  260. package/src/sap/fe/core/messagebundle_zh_TW.properties +58 -7
  261. package/src/sap/fe/core/services/AsyncComponentServiceFactory.js +45 -71
  262. package/src/sap/fe/core/services/AsyncComponentServiceFactory.ts +3 -1
  263. package/src/sap/fe/core/services/CacheHandlerServiceFactory.js +231 -202
  264. package/src/sap/fe/core/services/CacheHandlerServiceFactory.ts +212 -0
  265. package/src/sap/fe/core/services/EnvironmentServiceFactory.js +67 -92
  266. package/src/sap/fe/core/services/EnvironmentServiceFactory.ts +10 -6
  267. package/src/sap/fe/core/services/NavigationServiceFactory.js +351 -300
  268. package/src/sap/fe/core/services/NavigationServiceFactory.ts +313 -0
  269. package/src/sap/fe/core/services/ResourceModelServiceFactory.js +114 -81
  270. package/src/sap/fe/core/services/ResourceModelServiceFactory.ts +83 -0
  271. package/src/sap/fe/core/services/RoutingServiceFactory.js +927 -1152
  272. package/src/sap/fe/core/services/RoutingServiceFactory.ts +898 -0
  273. package/src/sap/fe/core/services/ShellServicesFactory.js +649 -707
  274. package/src/sap/fe/core/services/ShellServicesFactory.ts +52 -15
  275. package/src/sap/fe/core/services/SideEffectsServiceFactory.js +569 -637
  276. package/src/sap/fe/core/services/SideEffectsServiceFactory.ts +78 -102
  277. package/src/sap/fe/core/services/TemplatedViewServiceFactory.js +429 -478
  278. package/src/sap/fe/core/services/TemplatedViewServiceFactory.ts +460 -0
  279. package/src/sap/fe/core/services/view/TemplatingErrorPage.controller.js +10 -8
  280. package/src/sap/fe/core/services/view/TemplatingErrorPage.controller.ts +8 -0
  281. package/src/sap/fe/core/support/AnnotationIssue.support.js +15 -3
  282. package/src/sap/fe/core/support/AnnotationIssue.support.ts +16 -2
  283. package/src/sap/fe/core/support/CollectionFacetUnsupportedLevel.support.js +2 -2
  284. package/src/sap/fe/core/support/CollectionFacetUnsupportedLevel.support.ts +1 -1
  285. package/src/sap/fe/core/support/CommonHelper.js +1 -1
  286. package/src/sap/fe/core/support/CommonHelper.ts +1 -1
  287. package/src/sap/fe/core/support/Diagnostics.js +36 -48
  288. package/src/sap/fe/core/support/InvalidAnnotationColumnKey.support.js +38 -0
  289. package/src/sap/fe/core/support/InvalidAnnotationColumnKey.support.ts +18 -0
  290. package/src/sap/fe/core/templating/DataModelPathHelper.js +97 -127
  291. package/src/sap/fe/core/templating/DataModelPathHelper.ts +112 -135
  292. package/src/sap/fe/core/templating/DisplayModeFormatter.js +114 -0
  293. package/src/sap/fe/core/templating/DisplayModeFormatter.ts +86 -0
  294. package/src/sap/fe/core/templating/FieldControlHelper.js +8 -8
  295. package/src/sap/fe/core/templating/FieldControlHelper.ts +25 -7
  296. package/src/sap/fe/core/templating/FilterHelper.js +140 -78
  297. package/src/sap/fe/core/templating/FilterHelper.ts +149 -78
  298. package/src/sap/fe/core/templating/PropertyHelper.js +3 -3
  299. package/src/sap/fe/core/templating/PropertyHelper.ts +2 -2
  300. package/src/sap/fe/core/templating/UIFormatters.js +76 -135
  301. package/src/sap/fe/core/templating/UIFormatters.ts +76 -99
  302. package/src/sap/fe/core/type/Email.js +1 -1
  303. package/src/sap/fe/core/type/Email.ts +4 -6
  304. package/ui5.yaml +0 -3
  305. package/src/sap/fe/core/controls/filterbar.d.js +0 -8
  306. package/src/sap/fe/core/controls/filterbar.d.ts +0 -0
@@ -1,12 +1,17 @@
1
- import { ControllerExtension, OverrideExecution, View } from "sap/ui/core/mvc";
2
- import { ControllerExtensionMetadata } from "sap/fe/core/controllerextensions";
3
- import { Component } from "sap/ui/core";
4
- import { AppComponent, CommonUtils } from "sap/fe/core";
5
- import { ManagedObject, EventProvider } from "sap/ui/base";
6
- import { Log } from "sap/base";
7
- import { Context } from "sap/ui/model";
1
+ import ControllerExtension from "sap/ui/core/mvc/ControllerExtension";
2
+ import OverrideExecution from "sap/ui/core/mvc/OverrideExecution";
3
+ import View from "sap/ui/core/mvc/View";
4
+ import ControllerExtensionMetadata from "sap/fe/core/controllerextensions/ControllerExtensionMetadata";
5
+ import Component from "sap/ui/core/Component";
6
+ import AppComponent from "sap/fe/core/AppComponent";
7
+ import ManagedObject from "sap/ui/base/ManagedObject";
8
+ import EventProvider from "sap/ui/base/EventProvider";
9
+ import Log from "sap/base/Log";
10
+ import Event from "sap/ui/base/Event";
11
+ import Context from "sap/ui/model/Context";
8
12
  import { UI5Class, Override, Public, Final, Extensible, Private } from "../helpers/ClassSupport";
9
- import { TemplatedViewServiceFactory } from "sap/fe/core/services";
13
+ import TemplatedViewServiceFactory from "sap/fe/core/services/TemplatedViewServiceFactory";
14
+ import CommonUtils from "../CommonUtils";
10
15
 
11
16
  @UI5Class("sap.fe.core.controllerextensions.PageReady", ControllerExtensionMetadata)
12
17
  class PageReadyControllerExtension extends ControllerExtension {
@@ -37,7 +42,7 @@ class PageReadyControllerExtension extends ControllerExtension {
37
42
  this._oPageComponent = Component.getOwnerComponentFor(this._oView);
38
43
 
39
44
  if (this._oPageComponent && this._oPageComponent.attachContainerDefined) {
40
- this._oPageComponent.attachContainerDefined((oEvent: UI5Event) => this.registerContainer(oEvent.getParameter("container")));
45
+ this._oPageComponent.attachContainerDefined((oEvent: Event) => this.registerContainer(oEvent.getParameter("container")));
41
46
  } else {
42
47
  this.registerContainer(this._oView);
43
48
  }
@@ -93,20 +98,20 @@ class PageReadyControllerExtension extends ControllerExtension {
93
98
  }
94
99
 
95
100
  @Override("_routing")
96
- onAfterBinding(oBindingContext: Context<any>) {
101
+ onAfterBinding(oBindingContext: Context) {
97
102
  if (!this._bAfterBindingAlreadyApplied) {
98
103
  this._bAfterBindingAlreadyApplied = true;
99
104
  let aBoundElements: any[] = [];
100
105
  const aNotBoundMDCTables: any[] = [];
101
106
  let iRequested = 0;
102
107
  let iReceived = 0;
103
- const fnRequested = (oEvent: UI5Event) => {
104
- oEvent.getSource().detachDataRequested(fnRequested);
108
+ const fnRequested = (oEvent: Event) => {
109
+ (oEvent.getSource() as any).detachDataRequested(fnRequested);
105
110
  iRequested++;
106
111
  this.bDataReceived = false;
107
112
  };
108
- const fnReceived = (oEvent: UI5Event) => {
109
- switch (oEvent.getSource().sGroupId) {
113
+ const fnReceived = (oEvent: Event) => {
114
+ switch ((oEvent.getSource() as any).sGroupId) {
110
115
  case "$auto.Workers":
111
116
  this._oEventProvider.fireEvent("workersBatchReceived");
112
117
  break;
@@ -115,7 +120,7 @@ class PageReadyControllerExtension extends ControllerExtension {
115
120
  break;
116
121
  default:
117
122
  }
118
- oEvent.getSource().detachDataReceived(fnReceived);
123
+ (oEvent.getSource() as any).detachDataReceived(fnReceived);
119
124
  iReceived++;
120
125
  if (iReceived >= iRequested && iRequested !== 0) {
121
126
  iRequested = 0;
@@ -124,9 +129,9 @@ class PageReadyControllerExtension extends ControllerExtension {
124
129
  this.checkPageReadyDebounced();
125
130
  }
126
131
  };
127
- const fnSearch = (oEvent: UI5Event) => {
132
+ const fnSearch = (oEvent: Event) => {
128
133
  const aMDCTables = aNotBoundMDCTables.filter(oElem => {
129
- if (oEvent.getSource().sId === oElem.getFilter() && oElem.getVisible()) {
134
+ if ((oEvent.getSource() as any).sId === oElem.getFilter() && oElem.getVisible()) {
130
135
  return true;
131
136
  }
132
137
  return false;
@@ -319,6 +324,7 @@ class PageReadyControllerExtension extends ControllerExtension {
319
324
  return false;
320
325
  }
321
326
 
327
+ @Public
322
328
  public checkPageReadyDebounced() {
323
329
  if (this.pageReadyTimer) {
324
330
  clearTimeout(this.pageReadyTimer);
@@ -1,150 +1,191 @@
1
1
  /*!
2
- * SAPUI5
3
- * (c) Copyright 2009-2021 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
- onContextUpdate: {
31
- "final": false,
32
- "public": true,
33
- overrideExecution: OverrideExecution.After
34
- }
35
- }
36
- },
37
- /**
38
- * Initiates the paginator control.
39
- * @function
40
- * @param {string} oBinding ODataListBinding object
41
- * @param {object} oContext Current context where the navigation is initiated
42
- * @alias sap.fe.core.controllerextensions.Paginator#initialize
43
- * @public
44
- * @since 1.94.0
45
- **/
46
- initialize: function(oBinding, oContext) {
47
- if (oBinding && oBinding.getCurrentContexts) {
48
- this._oListBinding = oBinding;
49
- }
50
- if (oContext) {
51
- this._oCurrentContext = oContext;
52
- }
53
- this._updateCurrentIndexAndButtonEnablement();
54
- },
55
-
56
- _updateCurrentIndexAndButtonEnablement: function() {
57
- var that = this;
58
- if (this._oCurrentContext && this._oListBinding) {
59
- var sPath = this._oCurrentContext.getPath();
60
- // Storing the currentIndex in global variable
61
- this._iCurrentIndex = this._oListBinding.getCurrentContexts().findIndex(function(oContext) {
62
- return oContext && oContext.getPath() === sPath;
63
- });
64
- var oCurrentIndexContext = this._oListBinding.getCurrentContexts()[this._iCurrentIndex];
65
- if (
66
- (!this._iCurrentIndex && this._iCurrentIndex !== 0) ||
67
- !oCurrentIndexContext ||
68
- this._oCurrentContext.getPath() !== oCurrentIndexContext.getPath()
69
- ) {
70
- that._updateCurrentIndex();
71
- }
72
- that._handleButtonEnablement();
73
- }
74
- },
75
-
76
- _handleButtonEnablement: function() {
77
- //Enabling and Disabling the Buttons on change of the control context
78
- var that = this;
79
- var mButtonEnablementModel = that.base.getView().getModel("paginator");
80
- if (this._oListBinding && this._oListBinding.getCurrentContexts().length > 1 && this._iCurrentIndex > -1) {
81
- if (this._iCurrentIndex === this._oListBinding.getCurrentContexts().length - 1) {
82
- mButtonEnablementModel.setProperty("/navDownEnabled", false);
83
- } else {
84
- mButtonEnablementModel.setProperty("/navDownEnabled", true);
85
- }
86
- if (this._iCurrentIndex === 0) {
87
- mButtonEnablementModel.setProperty("/navUpEnabled", false);
88
- } else {
89
- mButtonEnablementModel.setProperty("/navUpEnabled", true);
90
- }
91
- } else {
92
- // Don't show the paginator buttons
93
- // 1. When no listbinding is available
94
- // 2. Only '1' or '0' context exists in the listBinding
95
- // 3. The current index is -ve, i.e the currentIndex is invalid.
96
- mButtonEnablementModel.setProperty("/navUpEnabled", false);
97
- mButtonEnablementModel.setProperty("/navDownEnabled", false);
98
- }
99
- },
100
-
101
- _updateCurrentIndex: function() {
102
- if (this._oCurrentContext && this._oListBinding) {
103
- var sPath = this._oCurrentContext.getPath();
104
- // Storing the currentIndex in global variable
105
- this._iCurrentIndex = this._oListBinding.getCurrentContexts().findIndex(function(oContext) {
106
- return oContext && oContext.getPath() === sPath;
107
- });
108
- }
109
- },
110
-
111
- updateCurrentContext: function(index) {
112
- var that = this;
113
- if (!this._oListBinding) {
114
- return;
115
- }
116
- var aCurrentContexts = this._oListBinding.getCurrentContexts();
117
- var iNewIndex = this._iCurrentIndex + index;
118
- if (aCurrentContexts[iNewIndex]) {
119
- this._iCurrentIndex = iNewIndex;
120
- that.onContextUpdate(aCurrentContexts[iNewIndex]);
121
- }
122
- that._handleButtonEnablement();
123
- },
124
-
125
- /**
126
- * Returns the updated context after the paginator operation.
127
- * @function
128
- * @param {string} oContext Final context returned after the paginator action
129
- * @alias sap.fe.core.controllerextensions.Paginator#onContextUpdate
130
- * @public
131
- * @since 1.94.0
132
- **/
133
- onContextUpdate: function(oContext) {
134
- //To be overridden by the application
135
- },
136
-
137
- override: {
138
- onInit: function() {
139
- this._oView = this.base.getView();
140
- this._oView.setModel(
141
- new JSONModel({
142
- navUpEnabled: false,
143
- navDownEnabled: false
144
- }),
145
- "paginator"
146
- );
147
- }
148
- }
149
- });
150
- });
5
+ sap.ui.define(["sap/ui/core/mvc/ControllerExtension", "sap/ui/core/mvc/OverrideExecution", "sap/ui/model/json/JSONModel", "sap/fe/core/helpers/ClassSupport", "sap/fe/core/controllerextensions/ControllerExtensionMetadata"], function (ControllerExtension, OverrideExecution, JSONModel, ClassSupport, ControllerExtensionMetadata) {
6
+ "use strict";
7
+
8
+ var _dec, _dec2, _dec3, _dec4, _class, _class2;
9
+
10
+ var UI5Class = ClassSupport.UI5Class;
11
+ var Public = ClassSupport.Public;
12
+ var Private = ClassSupport.Private;
13
+ var Override = ClassSupport.Override;
14
+ var Final = ClassSupport.Final;
15
+ var Extensible = ClassSupport.Extensible;
16
+
17
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _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 = UI5Class("sap.fe.core.controllerextensions.Paginator", ControllerExtensionMetadata), _dec2 = Override(), _dec3 = Extensible(OverrideExecution.After), _dec4 = Extensible(OverrideExecution.After), _dec(_class = (_class2 = /*#__PURE__*/function (_ControllerExtension) {
31
+ _inherits(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", [Public, Final], Object.getOwnPropertyDescriptor(_class2.prototype, "initialize"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, "updateCurrentContext", [Public, Final], Object.getOwnPropertyDescriptor(_class2.prototype, "updateCurrentContext"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, "onBeforeContextUpdate", [Private, _dec3], Object.getOwnPropertyDescriptor(_class2.prototype, "onBeforeContextUpdate"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, "onContextUpdate", [Private, _dec4], Object.getOwnPropertyDescriptor(_class2.prototype, "onContextUpdate"), _class2.prototype)), _class2)) || _class);
189
+ return Paginator;
190
+ }, false);
191
+ //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlBhZ2luYXRvci50cyJdLCJuYW1lcyI6WyJQYWdpbmF0b3IiLCJVSTVDbGFzcyIsIkNvbnRyb2xsZXJFeHRlbnNpb25NZXRhZGF0YSIsIk92ZXJyaWRlIiwiRXh0ZW5zaWJsZSIsIk92ZXJyaWRlRXhlY3V0aW9uIiwiQWZ0ZXIiLCJfaUN1cnJlbnRJbmRleCIsIm9uSW5pdCIsIl9vVmlldyIsImJhc2UiLCJnZXRWaWV3Iiwic2V0TW9kZWwiLCJKU09OTW9kZWwiLCJuYXZVcEVuYWJsZWQiLCJuYXZEb3duRW5hYmxlZCIsImluaXRpYWxpemUiLCJvQmluZGluZyIsIm9Db250ZXh0IiwiZ2V0Q3VycmVudENvbnRleHRzIiwiX29MaXN0QmluZGluZyIsIl9vQ3VycmVudENvbnRleHQiLCJfdXBkYXRlQ3VycmVudEluZGV4QW5kQnV0dG9uRW5hYmxlbWVudCIsInNQYXRoIiwiZ2V0UGF0aCIsImZpbmRJbmRleCIsIm9DdXJyZW50SW5kZXhDb250ZXh0IiwiX3VwZGF0ZUN1cnJlbnRJbmRleCIsIl9oYW5kbGVCdXR0b25FbmFibGVtZW50IiwibUJ1dHRvbkVuYWJsZW1lbnRNb2RlbCIsImdldE1vZGVsIiwibGVuZ3RoIiwic2V0UHJvcGVydHkiLCJ1cGRhdGVDdXJyZW50Q29udGV4dCIsImlEZWx0YUluZGV4IiwiYUN1cnJlbnRDb250ZXh0cyIsImlOZXdJbmRleCIsIm9OZXdDb250ZXh0IiwiYlByZXZlbnRJZHhVcGRhdGUiLCJvbkJlZm9yZUNvbnRleHRVcGRhdGUiLCJvbkNvbnRleHRVcGRhdGUiLCJvTGlzdEJpbmRpbmciLCJpQ3VycmVudEluZGV4IiwiaUluZ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ControllerExtension";
2
+ import OverrideExecution from "sap/ui/core/mvc/OverrideExecution";
3
+ import JSONModel from "sap/ui/model/json/JSONModel";
4
+ import { Extensible, Final, Override, Private, Public, UI5Class } from "sap/fe/core/helpers/ClassSupport";
5
+ import ControllerExtensionMetadata from "sap/fe/core/controllerextensions/ControllerExtensionMetadata";
6
+ import View from "sap/ui/core/mvc/View";
7
+ import PageController from "sap/fe/core/PageController";
8
+ import ODataListBinding from "sap/ui/model/odata/v4/ODataListBinding";
9
+ import Context from "sap/ui/model/odata/v4/Context";
10
+
11
+ /**
12
+ * Controller extension providing hooks for the navigation using paginators
13
+ *
14
+ * @hideconstructor
15
+ * @public
16
+ * @since 1.94.0
17
+ */
18
+ @UI5Class("sap.fe.core.controllerextensions.Paginator", ControllerExtensionMetadata)
19
+ class Paginator extends ControllerExtension {
20
+ private _oView!: View;
21
+ private base!: PageController;
22
+ private _oListBinding: any;
23
+ private _oCurrentContext?: Context;
24
+ private _iCurrentIndex: number = -1;
25
+ @Override()
26
+ onInit() {
27
+ this._oView = this.base.getView();
28
+ this._oView.setModel(
29
+ new JSONModel({
30
+ navUpEnabled: false,
31
+ navDownEnabled: false
32
+ }),
33
+ "paginator"
34
+ );
35
+ }
36
+ /**
37
+ * Initiates the paginator control.
38
+ * @function
39
+ * @param {sap.ui.model.odata.v4.ODataListBinding} oBinding ODataListBinding object
40
+ * @param {sap.ui.model.odata.v4.Context} oContext Current context where the navigation is initiated
41
+ * @alias sap.fe.core.controllerextensions.Paginator#initialize
42
+ * @public
43
+ * @since 1.94.0
44
+ **/
45
+ @Public
46
+ @Final
47
+ initialize(oBinding: ODataListBinding | any, oContext: Context) {
48
+ if (oBinding && oBinding.getCurrentContexts) {
49
+ this._oListBinding = oBinding;
50
+ }
51
+ if (oContext) {
52
+ this._oCurrentContext = oContext;
53
+ }
54
+ this._updateCurrentIndexAndButtonEnablement();
55
+ }
56
+
57
+ _updateCurrentIndexAndButtonEnablement() {
58
+ if (this._oCurrentContext && this._oListBinding) {
59
+ const sPath = this._oCurrentContext.getPath();
60
+ // Storing the currentIndex in global variable
61
+ this._iCurrentIndex = this._oListBinding.getCurrentContexts().findIndex(function(oContext: any) {
62
+ return oContext && oContext.getPath() === sPath;
63
+ });
64
+ const oCurrentIndexContext = this._oListBinding.getCurrentContexts()[this._iCurrentIndex];
65
+ if (
66
+ (!this._iCurrentIndex && this._iCurrentIndex !== 0) ||
67
+ !oCurrentIndexContext ||
68
+ this._oCurrentContext.getPath() !== oCurrentIndexContext.getPath()
69
+ ) {
70
+ this._updateCurrentIndex();
71
+ }
72
+ this._handleButtonEnablement();
73
+ }
74
+ }
75
+
76
+ _handleButtonEnablement() {
77
+ //Enabling and Disabling the Buttons on change of the control context
78
+ const mButtonEnablementModel = this.base.getView().getModel("paginator") as JSONModel;
79
+ if (this._oListBinding && this._oListBinding.getCurrentContexts().length > 1 && this._iCurrentIndex > -1) {
80
+ if (this._iCurrentIndex === this._oListBinding.getCurrentContexts().length - 1) {
81
+ mButtonEnablementModel.setProperty("/navDownEnabled", false);
82
+ } else {
83
+ mButtonEnablementModel.setProperty("/navDownEnabled", true);
84
+ }
85
+ if (this._iCurrentIndex === 0) {
86
+ mButtonEnablementModel.setProperty("/navUpEnabled", false);
87
+ } else {
88
+ mButtonEnablementModel.setProperty("/navUpEnabled", true);
89
+ }
90
+ } else {
91
+ // Don't show the paginator buttons
92
+ // 1. When no listbinding is available
93
+ // 2. Only '1' or '0' context exists in the listBinding
94
+ // 3. The current index is -ve, i.e the currentIndex is invalid.
95
+ mButtonEnablementModel.setProperty("/navUpEnabled", false);
96
+ mButtonEnablementModel.setProperty("/navDownEnabled", false);
97
+ }
98
+ }
99
+
100
+ _updateCurrentIndex() {
101
+ if (this._oCurrentContext && this._oListBinding) {
102
+ const sPath = this._oCurrentContext.getPath();
103
+ // Storing the currentIndex in global variable
104
+ this._iCurrentIndex = this._oListBinding.getCurrentContexts().findIndex(function(oContext: any) {
105
+ return oContext && oContext.getPath() === sPath;
106
+ });
107
+ }
108
+ }
109
+ @Public
110
+ @Final
111
+ updateCurrentContext(iDeltaIndex: any) {
112
+ if (!this._oListBinding) {
113
+ return;
114
+ }
115
+
116
+ const aCurrentContexts = this._oListBinding.getCurrentContexts();
117
+ const iNewIndex = this._iCurrentIndex + iDeltaIndex;
118
+ const oNewContext = aCurrentContexts[iNewIndex];
119
+
120
+ if (oNewContext) {
121
+ const bPreventIdxUpdate = this.onBeforeContextUpdate(this._oListBinding, this._iCurrentIndex, iDeltaIndex);
122
+ if (!bPreventIdxUpdate) {
123
+ this._iCurrentIndex = iNewIndex;
124
+ this._oCurrentContext = oNewContext;
125
+ }
126
+ this.onContextUpdate(oNewContext);
127
+ }
128
+ this._handleButtonEnablement();
129
+ }
130
+
131
+ /**
132
+ * Called before context update.
133
+ * @function
134
+ * @param {sap.ui.model.odata.v4.ODataListBinding} oListBinding ODataListBinding object
135
+ * @param {number} iCurrentIndex Current index of context in listBinding from where the navigation is initiated
136
+ * @param {number} iIndexUpdate The delta index for update
137
+ * @returns {boolean} `true` to prevent the update of current context.
138
+ * @alias sap.fe.core.controllerextensions.Paginator#onBeforeContextUpdate
139
+ * @private
140
+ **/
141
+ @Private
142
+ @Extensible(OverrideExecution.After)
143
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
144
+ onBeforeContextUpdate(oListBinding: ODataListBinding, iCurrentIndex: number, iIndexUpdate: number) {
145
+ return false;
146
+ }
147
+
148
+ /**
149
+ * Returns the updated context after the paginator operation.
150
+ * @function
151
+ * @param {sap.ui.model.odata.v4.Context} oContext Final context returned after the paginator action
152
+ * @alias sap.fe.core.controllerextensions.Paginator#onContextUpdate
153
+ * @public
154
+ * @since 1.94.0
155
+ **/
156
+ @Private
157
+ @Extensible(OverrideExecution.After)
158
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
159
+ onContextUpdate(oContext: Context) {
160
+ //To be overridden by the application
161
+ }
162
+ }
163
+ export default Paginator;