@sapui5/sap.fe.core 1.98.0 → 1.99.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 (231) hide show
  1. package/package.json +3 -2
  2. package/src/sap/fe/core/.library +1 -1
  3. package/src/sap/fe/core/AnnotationHelper.js +377 -405
  4. package/src/sap/fe/core/AnnotationHelper.ts +385 -0
  5. package/src/sap/fe/core/AppComponent.js +3 -2
  6. package/src/sap/fe/core/AppStateHandler.js +229 -181
  7. package/src/sap/fe/core/AppStateHandler.ts +171 -0
  8. package/src/sap/fe/core/BaseController.js +3 -2
  9. package/src/sap/fe/core/BusyLocker.js +105 -121
  10. package/src/sap/fe/core/BusyLocker.ts +98 -0
  11. package/src/sap/fe/core/CommonUtils.js +2073 -2399
  12. package/src/sap/fe/core/CommonUtils.ts +2078 -0
  13. package/src/sap/fe/core/ExtensionAPI.js +3 -2
  14. package/src/sap/fe/core/PageController.js +84 -125
  15. package/src/sap/fe/core/PageController.ts +101 -0
  16. package/src/sap/fe/core/RouterProxy.js +986 -823
  17. package/src/sap/fe/core/RouterProxy.ts +838 -0
  18. package/src/sap/fe/core/Synchronization.js +51 -35
  19. package/src/sap/fe/core/Synchronization.ts +29 -0
  20. package/src/sap/fe/core/TemplateComponent.js +173 -164
  21. package/src/sap/fe/core/TemplateComponent.ts +166 -0
  22. package/src/sap/fe/core/TemplateModel.js +97 -54
  23. package/src/sap/fe/core/TemplateModel.ts +63 -0
  24. package/src/sap/fe/core/TransactionHelper.js +1576 -1664
  25. package/src/sap/fe/core/TransactionHelper.ts +1706 -0
  26. package/src/sap/fe/core/actions/draft.js +559 -608
  27. package/src/sap/fe/core/actions/draft.ts +593 -0
  28. package/src/sap/fe/core/actions/messageHandling.js +545 -514
  29. package/src/sap/fe/core/actions/messageHandling.ts +532 -0
  30. package/src/sap/fe/core/actions/nonDraft.js +17 -19
  31. package/src/sap/fe/core/actions/nonDraft.ts +12 -0
  32. package/src/sap/fe/core/actions/operations.js +1074 -1215
  33. package/src/sap/fe/core/actions/operations.ts +1162 -0
  34. package/src/sap/fe/core/actions/sticky.js +102 -105
  35. package/src/sap/fe/core/actions/sticky.ts +102 -0
  36. package/src/sap/fe/core/controllerextensions/ControllerExtensionMetadata.js +3 -2
  37. package/src/sap/fe/core/controllerextensions/EditFlow.js +54 -211
  38. package/src/sap/fe/core/controllerextensions/IntentBasedNavigation.js +3 -2
  39. package/src/sap/fe/core/controllerextensions/InternalEditFlow.js +279 -11
  40. package/src/sap/fe/core/controllerextensions/InternalIntentBasedNavigation.js +8 -6
  41. package/src/sap/fe/core/controllerextensions/InternalRouting.js +47 -45
  42. package/src/sap/fe/core/controllerextensions/KPIManagement.js +2 -3
  43. package/src/sap/fe/core/controllerextensions/KPIManagement.ts +29 -26
  44. package/src/sap/fe/core/controllerextensions/MassEdit.js +101 -8
  45. package/src/sap/fe/core/controllerextensions/MessageHandler.js +17 -8
  46. package/src/sap/fe/core/controllerextensions/PageReady.js +2 -2
  47. package/src/sap/fe/core/controllerextensions/PageReady.ts +12 -8
  48. package/src/sap/fe/core/controllerextensions/Paginator.js +3 -2
  49. package/src/sap/fe/core/controllerextensions/Placeholder.js +3 -2
  50. package/src/sap/fe/core/controllerextensions/Routing.js +9 -4
  51. package/src/sap/fe/core/controllerextensions/RoutingListener.js +3 -2
  52. package/src/sap/fe/core/controllerextensions/Share.js +3 -2
  53. package/src/sap/fe/core/controllerextensions/SideEffects.js +3 -3
  54. package/src/sap/fe/core/controllerextensions/SideEffects.ts +18 -18
  55. package/src/sap/fe/core/controllerextensions/ViewState.js +3 -2
  56. package/src/sap/fe/core/controls/CommandExecution.js +3 -2
  57. package/src/sap/fe/core/controls/ConditionalWrapper.js +3 -2
  58. package/src/sap/fe/core/controls/CustomQuickViewPage.js +3 -2
  59. package/src/sap/fe/core/controls/DataLossOrDraftDiscard/DataLossOrDraftDiscardHandler.js +3 -2
  60. package/src/sap/fe/core/controls/FieldWrapper.js +11 -22
  61. package/src/sap/fe/core/controls/FilterBar.js +3 -2
  62. package/src/sap/fe/core/controls/FormElementWrapper.js +3 -2
  63. package/src/sap/fe/core/controls/MultiValueParameterDelegate.js +3 -2
  64. package/src/sap/fe/core/controls/NonComputedVisibleKeyFieldsDialog.fragment.xml +1 -0
  65. package/src/sap/fe/core/controls/filterbar/FilterContainer.js +3 -2
  66. package/src/sap/fe/core/controls/filterbar/VisualFilter.js +5 -4
  67. package/src/sap/fe/core/controls/filterbar/VisualFilterContainer.js +3 -2
  68. package/src/sap/fe/core/controls/filterbar/utils/VisualFilterUtils.js +3 -2
  69. package/src/sap/fe/core/controls/massEdit/MassEditHandlers.js +3 -2
  70. package/src/sap/fe/core/converters/ConverterContext.js +2 -2
  71. package/src/sap/fe/core/converters/ConverterContext.ts +4 -3
  72. package/src/sap/fe/core/converters/ManifestSettings.js +1 -1
  73. package/src/sap/fe/core/converters/ManifestSettings.ts +1 -0
  74. package/src/sap/fe/core/converters/ManifestWrapper.js +39 -26
  75. package/src/sap/fe/core/converters/ManifestWrapper.ts +9 -0
  76. package/src/sap/fe/core/converters/MetaModelConverter.js +11 -8
  77. package/src/sap/fe/core/converters/MetaModelConverter.ts +16 -16
  78. package/src/sap/fe/core/converters/TemplateConverter.js +1 -1
  79. package/src/sap/fe/core/converters/TemplateConverter.ts +2 -2
  80. package/src/sap/fe/core/converters/common/AnnotationConverter.js +17 -13
  81. package/src/sap/fe/core/converters/controls/Common/Action.js +2 -2
  82. package/src/sap/fe/core/converters/controls/Common/Action.ts +2 -2
  83. package/src/sap/fe/core/converters/controls/Common/Chart.js +5 -3
  84. package/src/sap/fe/core/converters/controls/Common/Chart.ts +11 -3
  85. package/src/sap/fe/core/converters/controls/Common/DataVisualization.js +3 -3
  86. package/src/sap/fe/core/converters/controls/Common/DataVisualization.ts +2 -2
  87. package/src/sap/fe/core/converters/controls/Common/Form.js +4 -2
  88. package/src/sap/fe/core/converters/controls/Common/Form.ts +16 -2
  89. package/src/sap/fe/core/converters/controls/Common/Table.js +250 -146
  90. package/src/sap/fe/core/converters/controls/Common/Table.ts +300 -167
  91. package/src/sap/fe/core/converters/controls/Common/table/StandardActions.js +115 -56
  92. package/src/sap/fe/core/converters/controls/Common/table/StandardActions.ts +120 -74
  93. package/src/sap/fe/core/converters/controls/ListReport/FilterBar.js +467 -32
  94. package/src/sap/fe/core/converters/controls/ListReport/FilterBar.ts +483 -54
  95. package/src/sap/fe/core/converters/controls/ObjectPage/SubSection.js +6 -6
  96. package/src/sap/fe/core/converters/controls/ObjectPage/SubSection.ts +9 -15
  97. package/src/sap/fe/core/converters/helpers/Aggregation.js +13 -5
  98. package/src/sap/fe/core/converters/helpers/Aggregation.ts +20 -5
  99. package/src/sap/fe/core/converters/helpers/IssueManager.js +4 -1
  100. package/src/sap/fe/core/converters/helpers/IssueManager.ts +3 -0
  101. package/src/sap/fe/core/converters/objectPage/HeaderAndFooterAction.js +4 -4
  102. package/src/sap/fe/core/converters/objectPage/HeaderAndFooterAction.ts +3 -3
  103. package/src/sap/fe/core/converters/templates/ListReportConverter.js +13 -6
  104. package/src/sap/fe/core/converters/templates/ListReportConverter.ts +26 -15
  105. package/src/sap/fe/core/designtime/AppComponent.designtime.js +3 -2
  106. package/src/sap/fe/core/formatters/CriticalityFormatter.js +1 -1
  107. package/src/sap/fe/core/formatters/CriticalityFormatter.ts +1 -1
  108. package/src/sap/fe/core/formatters/FPMFormatter.js +1 -1
  109. package/src/sap/fe/core/formatters/FPMFormatter.ts +4 -10
  110. package/src/sap/fe/core/formatters/KPIFormatter.js +1 -1
  111. package/src/sap/fe/core/formatters/KPIFormatter.ts +3 -1
  112. package/src/sap/fe/core/formatters/TableFormatter.js +39 -28
  113. package/src/sap/fe/core/formatters/TableFormatter.ts +43 -28
  114. package/src/sap/fe/core/formatters/ValueFormatter.js +1 -1
  115. package/src/sap/fe/core/formatters/ValueFormatter.ts +7 -6
  116. package/src/sap/fe/core/fpm/Component.js +3 -2
  117. package/src/sap/fe/core/helpers/AppStartupHelper.js +2 -2
  118. package/src/sap/fe/core/helpers/AppStartupHelper.ts +7 -4
  119. package/src/sap/fe/core/helpers/BindingExpression.js +314 -355
  120. package/src/sap/fe/core/helpers/BindingExpression.ts +317 -391
  121. package/src/sap/fe/core/helpers/ClassSupport.js +27 -15
  122. package/src/sap/fe/core/helpers/ClassSupport.ts +31 -20
  123. package/src/sap/fe/core/helpers/DynamicAnnotationPathHelper.js +63 -59
  124. package/src/sap/fe/core/helpers/DynamicAnnotationPathHelper.ts +56 -0
  125. package/src/sap/fe/core/helpers/EditState.js +81 -84
  126. package/src/sap/fe/core/helpers/EditState.ts +81 -0
  127. package/src/sap/fe/core/helpers/ExcelFormatHelper.js +62 -48
  128. package/src/sap/fe/core/helpers/ExcelFormatHelper.ts +49 -0
  129. package/src/sap/fe/core/helpers/FPMHelper.js +52 -56
  130. package/src/sap/fe/core/helpers/FPMHelper.ts +62 -0
  131. package/src/sap/fe/core/helpers/KeepAliveHelper.js +3 -4
  132. package/src/sap/fe/core/helpers/KeepAliveHelper.ts +9 -9
  133. package/src/sap/fe/core/helpers/MassEditHelper.js +27 -18
  134. package/src/sap/fe/core/helpers/ModelHelper.js +229 -225
  135. package/src/sap/fe/core/helpers/ModelHelper.ts +227 -0
  136. package/src/sap/fe/core/helpers/PasteHelper.js +210 -132
  137. package/src/sap/fe/core/helpers/PasteHelper.ts +196 -0
  138. package/src/sap/fe/core/helpers/SemanticDateOperators.js +332 -313
  139. package/src/sap/fe/core/helpers/SemanticDateOperators.ts +330 -0
  140. package/src/sap/fe/core/helpers/SemanticKeyHelper.js +66 -67
  141. package/src/sap/fe/core/helpers/SemanticKeyHelper.ts +73 -0
  142. package/src/sap/fe/core/helpers/StableIdHelper.js +4 -7
  143. package/src/sap/fe/core/helpers/StableIdHelper.ts +2 -6
  144. package/src/sap/fe/core/jsx-runtime/jsx.js +1 -1
  145. package/src/sap/fe/core/jsx-runtime/jsx.ts +1 -1
  146. package/src/sap/fe/core/library.js +4 -3
  147. package/src/sap/fe/core/library.support.js +3 -2
  148. package/src/sap/fe/core/manifestMerger/ChangePageConfiguration.js +1 -1
  149. package/src/sap/fe/core/manifestMerger/ChangePageConfiguration.ts +1 -1
  150. package/src/sap/fe/core/messagebundle.properties +23 -10
  151. package/src/sap/fe/core/messagebundle_ar.properties +9 -0
  152. package/src/sap/fe/core/messagebundle_bg.properties +9 -0
  153. package/src/sap/fe/core/messagebundle_ca.properties +9 -0
  154. package/src/sap/fe/core/messagebundle_cs.properties +10 -1
  155. package/src/sap/fe/core/messagebundle_cy.properties +9 -0
  156. package/src/sap/fe/core/messagebundle_da.properties +9 -0
  157. package/src/sap/fe/core/messagebundle_de.properties +9 -0
  158. package/src/sap/fe/core/messagebundle_el.properties +9 -0
  159. package/src/sap/fe/core/messagebundle_en.properties +9 -0
  160. package/src/sap/fe/core/messagebundle_en_GB.properties +9 -0
  161. package/src/sap/fe/core/messagebundle_en_US_sappsd.properties +9 -0
  162. package/src/sap/fe/core/messagebundle_en_US_saprigi.properties +9 -0
  163. package/src/sap/fe/core/messagebundle_en_US_saptrc.properties +9 -0
  164. package/src/sap/fe/core/messagebundle_es.properties +9 -0
  165. package/src/sap/fe/core/messagebundle_es_MX.properties +9 -0
  166. package/src/sap/fe/core/messagebundle_et.properties +9 -0
  167. package/src/sap/fe/core/messagebundle_fi.properties +9 -0
  168. package/src/sap/fe/core/messagebundle_fr.properties +13 -4
  169. package/src/sap/fe/core/messagebundle_fr_CA.properties +15 -6
  170. package/src/sap/fe/core/messagebundle_hi.properties +15 -6
  171. package/src/sap/fe/core/messagebundle_hr.properties +15 -6
  172. package/src/sap/fe/core/messagebundle_hu.properties +9 -0
  173. package/src/sap/fe/core/messagebundle_id.properties +10 -1
  174. package/src/sap/fe/core/messagebundle_it.properties +9 -0
  175. package/src/sap/fe/core/messagebundle_iw.properties +9 -0
  176. package/src/sap/fe/core/messagebundle_ja.properties +9 -0
  177. package/src/sap/fe/core/messagebundle_kk.properties +15 -6
  178. package/src/sap/fe/core/messagebundle_ko.properties +9 -0
  179. package/src/sap/fe/core/messagebundle_lt.properties +9 -0
  180. package/src/sap/fe/core/messagebundle_lv.properties +15 -6
  181. package/src/sap/fe/core/messagebundle_ms.properties +14 -5
  182. package/src/sap/fe/core/messagebundle_nl.properties +9 -0
  183. package/src/sap/fe/core/messagebundle_no.properties +9 -0
  184. package/src/sap/fe/core/messagebundle_pl.properties +9 -0
  185. package/src/sap/fe/core/messagebundle_pt.properties +9 -0
  186. package/src/sap/fe/core/messagebundle_pt_PT.properties +9 -0
  187. package/src/sap/fe/core/messagebundle_ro.properties +9 -0
  188. package/src/sap/fe/core/messagebundle_ru.properties +9 -0
  189. package/src/sap/fe/core/messagebundle_sh.properties +11 -2
  190. package/src/sap/fe/core/messagebundle_sk.properties +9 -0
  191. package/src/sap/fe/core/messagebundle_sl.properties +15 -6
  192. package/src/sap/fe/core/messagebundle_sv.properties +9 -0
  193. package/src/sap/fe/core/messagebundle_th.properties +9 -0
  194. package/src/sap/fe/core/messagebundle_tr.properties +9 -0
  195. package/src/sap/fe/core/messagebundle_uk.properties +9 -0
  196. package/src/sap/fe/core/messagebundle_vi.properties +9 -0
  197. package/src/sap/fe/core/messagebundle_zh_CN.properties +9 -0
  198. package/src/sap/fe/core/messagebundle_zh_TW.properties +15 -6
  199. package/src/sap/fe/core/services/AsyncComponentServiceFactory.js +1 -1
  200. package/src/sap/fe/core/services/AsyncComponentServiceFactory.ts +3 -1
  201. package/src/sap/fe/core/services/CacheHandlerServiceFactory.js +269 -202
  202. package/src/sap/fe/core/services/CacheHandlerServiceFactory.ts +212 -0
  203. package/src/sap/fe/core/services/EnvironmentServiceFactory.js +1 -1
  204. package/src/sap/fe/core/services/EnvironmentServiceFactory.ts +7 -6
  205. package/src/sap/fe/core/services/NavigationServiceFactory.js +406 -300
  206. package/src/sap/fe/core/services/NavigationServiceFactory.ts +316 -0
  207. package/src/sap/fe/core/services/ResourceModelServiceFactory.js +149 -81
  208. package/src/sap/fe/core/services/ResourceModelServiceFactory.ts +80 -0
  209. package/src/sap/fe/core/services/RoutingServiceFactory.js +987 -899
  210. package/src/sap/fe/core/services/RoutingServiceFactory.ts +898 -0
  211. package/src/sap/fe/core/services/ShellServicesFactory.js +1 -1
  212. package/src/sap/fe/core/services/ShellServicesFactory.ts +15 -10
  213. package/src/sap/fe/core/services/SideEffectsServiceFactory.js +35 -81
  214. package/src/sap/fe/core/services/SideEffectsServiceFactory.ts +46 -94
  215. package/src/sap/fe/core/services/TemplatedViewServiceFactory.js +461 -487
  216. package/src/sap/fe/core/services/TemplatedViewServiceFactory.ts +453 -0
  217. package/src/sap/fe/core/services/view/TemplatingErrorPage.controller.js +10 -8
  218. package/src/sap/fe/core/services/view/TemplatingErrorPage.controller.ts +8 -0
  219. package/src/sap/fe/core/support/AnnotationIssue.support.js +15 -3
  220. package/src/sap/fe/core/support/AnnotationIssue.support.ts +16 -2
  221. package/src/sap/fe/core/support/CollectionFacetUnsupportedLevel.support.js +2 -2
  222. package/src/sap/fe/core/support/CollectionFacetUnsupportedLevel.support.ts +1 -1
  223. package/src/sap/fe/core/templating/FieldControlHelper.js +8 -8
  224. package/src/sap/fe/core/templating/FieldControlHelper.ts +25 -7
  225. package/src/sap/fe/core/templating/FilterHelper.js +138 -72
  226. package/src/sap/fe/core/templating/FilterHelper.ts +139 -71
  227. package/src/sap/fe/core/templating/UIFormatters.js +31 -1
  228. package/src/sap/fe/core/templating/UIFormatters.ts +33 -2
  229. package/src/sap/fe/core/type/Email.js +1 -1
  230. package/src/sap/fe/core/type/Email.ts +4 -6
  231. package/ui5.yaml +0 -3
@@ -55,7 +55,7 @@ export type StandardActionsContext = {
55
55
  };
56
56
 
57
57
  /**
58
- * Generates context for the standard actions.
58
+ * Generates the context for the standard actions.
59
59
  *
60
60
  * @param {ConverterContext} converterContext
61
61
  * @param {NavigationSettingsConfiguration} navigationSettings
@@ -100,17 +100,13 @@ export function isExternalCreateConfigured(navigationSettings: NavigationSetting
100
100
  }
101
101
 
102
102
  /**
103
- * Checks if sticky or draft is supported.
103
+ * Checks if draft is supported.
104
104
  *
105
105
  * @param {ConverterContext} converterContext
106
106
  * @returns {boolean}
107
107
  */
108
- export function isDraftOrStickySupported(converterContext: ConverterContext): boolean {
108
+ export function isDraftSupported(converterContext: ConverterContext): boolean {
109
109
  const currentEntitySet = converterContext.getEntitySet();
110
- const bIsStickySessionSupported = converterContext.getDataModelObjectPath().startingEntitySet?.annotations?.Session
111
- ?.StickySessionSupported
112
- ? true
113
- : false;
114
110
  const bIsDraftRoot = currentEntitySet && currentEntitySet.annotations?.Common?.DraftRoot ? true : false;
115
111
  const bIsDraftNode = currentEntitySet && currentEntitySet.annotations?.Common?.DraftNode ? true : false;
116
112
  const bIsDraftParentEntityForContainment =
@@ -120,12 +116,23 @@ export function isDraftOrStickySupported(converterContext: ConverterContext): bo
120
116
  ? true
121
117
  : false;
122
118
 
123
- return (
124
- bIsDraftRoot ||
125
- bIsDraftNode ||
126
- bIsStickySessionSupported ||
127
- (!converterContext.getEntitySet() && bIsDraftParentEntityForContainment)
128
- );
119
+ return bIsDraftRoot || bIsDraftNode || (!converterContext.getEntitySet() && bIsDraftParentEntityForContainment);
120
+ }
121
+
122
+ /**
123
+ * Checks if sticky or draft is supported.
124
+ *
125
+ * @param {ConverterContext} converterContext
126
+ * @returns {boolean}
127
+ */
128
+ export function isDraftOrStickySupported(converterContext: ConverterContext): boolean {
129
+ const bIsDraftSupported = isDraftSupported(converterContext);
130
+ const bIsStickySessionSupported = converterContext.getDataModelObjectPath().startingEntitySet?.annotations?.Session
131
+ ?.StickySessionSupported
132
+ ? true
133
+ : false;
134
+
135
+ return bIsDraftSupported || bIsStickySessionSupported;
129
136
  }
130
137
 
131
138
  /**
@@ -152,7 +159,7 @@ export function getNewAction(converterContext: ConverterContext): any {
152
159
  }
153
160
 
154
161
  /**
155
- * Gets binding expression for the action visibility configured into annotation.
162
+ * Gets the binding expression for the action visibility configured into annotation.
156
163
  *
157
164
  * @param {ConverterContext} converterContext
158
165
  * @param {string} sAnnotationTerm
@@ -177,7 +184,7 @@ export function isActionAnnotatedHidden(converterContext: ConverterContext, sAnn
177
184
  }
178
185
 
179
186
  /**
180
- * Gets annotated restrictions for actions.
187
+ * Gets the annotated restrictions for the actions.
181
188
  *
182
189
  * @param {ConverterContext} converterContext
183
190
  * @returns {StandardActionsRestrictionsType}
@@ -214,20 +221,20 @@ export function getRestrictions(converterContext: ConverterContext): StandardAct
214
221
  * Checks if templating for insert/update actions is mandatory.
215
222
  *
216
223
  * @param {StandardActionsContext} standardActionsContext
217
- * @param {boolean} isDraftOrStickySupported
224
+ * @param {boolean} isDraftOrSticky
218
225
  * @param {boolean} isCreateAlwaysHidden
219
226
  * @returns {boolean}
220
227
  */
221
228
  export function getInsertUpdateActionsTemplating(
222
229
  standardActionsContext: StandardActionsContext,
223
- isDraftOrStickySupported: boolean,
230
+ isDraftOrSticky: boolean,
224
231
  isCreateAlwaysHidden: boolean
225
232
  ): boolean {
226
- return (isDraftOrStickySupported || standardActionsContext.isExternalCreateConfigured) && !isCreateAlwaysHidden;
233
+ return (isDraftOrSticky || standardActionsContext.isExternalCreateConfigured) && !isCreateAlwaysHidden;
227
234
  }
228
235
 
229
236
  /**
230
- * Gets binding expressions for the properties of the action Create.
237
+ * Gets the binding expressions for the properties of the action Create.
231
238
  *
232
239
  * @param {ConverterContext} converterContext
233
240
  * @param {StandardActionsContext} standardActionsContext
@@ -246,7 +253,7 @@ export function getStandardActionCreate(
246
253
  }
247
254
 
248
255
  /**
249
- * Gets binding expressions for the properties of the action Delete.
256
+ * Gets the binding expressions for the properties of the action Delete.
250
257
  *
251
258
  * @param {ConverterContext} converterContext
252
259
  * @param {StandardActionsContext} standardActionsContext
@@ -266,50 +273,49 @@ export function getStandardActionDelete(
266
273
  }
267
274
 
268
275
  /**
269
- * Gets binding expressions for the properties of the action Paste.
276
+ * Gets the binding expressions for the properties of the action Paste.
270
277
  *
271
278
  * @param {ConverterContext} converterContext
272
279
  * @param {StandardActionsContext} standardActionsContext
280
+ * @param {boolean} isInsertUpdateActionsTemplated
273
281
  * @returns {StandardActionConfigType}
274
282
  */
275
283
  export function getStandardActionPaste(
276
284
  converterContext: ConverterContext,
277
- standardActionsContext: StandardActionsContext
285
+ standardActionsContext: StandardActionsContext,
286
+ isInsertUpdateActionsTemplated: boolean
278
287
  ): StandardActionConfigType {
279
288
  const createVisibility = getCreateVisibility(converterContext, standardActionsContext);
280
- const pasteVisibility = getPasteVisibility(converterContext, standardActionsContext, createVisibility);
281
-
289
+ const createEnablement = getCreateEnablement(converterContext, standardActionsContext, createVisibility);
290
+ const pasteVisibility = getPasteVisibility(converterContext, standardActionsContext, createVisibility, isInsertUpdateActionsTemplated);
282
291
  return {
283
- isTemplated: compileBinding(getDefaultTemplating(pasteVisibility)),
284
292
  visible: compileBinding(pasteVisibility),
285
- enabled: compileBinding(pasteVisibility)
293
+ enabled: compileBinding(getPasteEnablement(pasteVisibility, createEnablement))
286
294
  };
287
295
  }
288
296
 
289
297
  /**
290
- * Gets binding expressions for the properties of the action MassEdit.
298
+ * Gets the binding expressions for the properties of the action MassEdit.
291
299
  *
292
300
  * @param {ConverterContext} converterContext
293
301
  * @param {StandardActionsContext} standardActionsContext
294
- * @param {string | undefined} selectionMode
295
302
  * @returns {StandardActionConfigType}
296
303
  */
297
304
  export function getStandardActionMassEdit(
298
305
  converterContext: ConverterContext,
299
- standardActionsContext: StandardActionsContext,
300
- selectionMode: string | undefined
306
+ standardActionsContext: StandardActionsContext
301
307
  ): StandardActionConfigType {
302
- const massEditVisibility = getMassEditVisibility(converterContext, standardActionsContext, selectionMode);
308
+ const massEditVisibility = getMassEditVisibility(converterContext, standardActionsContext);
303
309
 
304
310
  return {
305
311
  isTemplated: compileBinding(getDefaultTemplating(massEditVisibility)),
306
312
  visible: compileBinding(massEditVisibility),
307
- enabled: compileBinding(getMassEditEnablement(standardActionsContext, massEditVisibility))
313
+ enabled: compileBinding(getMassEditEnablement(converterContext, standardActionsContext, massEditVisibility))
308
314
  };
309
315
  }
310
316
 
311
317
  /**
312
- * Gets binding expressions for the templating of the action Create.
318
+ * Gets the binding expression for the templating of the action Create.
313
319
  *
314
320
  * @param {StandardActionsContext} standardActionsContext
315
321
  * @param {Expression<boolean>} createVisibility
@@ -350,7 +356,7 @@ export function getCreateTemplating(
350
356
  }
351
357
 
352
358
  /**
353
- * Gets binding expressions for the templating of the non-Create actions.
359
+ * Gets the binding expression for the templating of the non-Create actions.
354
360
  *
355
361
  * @param {Expression<boolean>} actionVisibility
356
362
  * @returns {Expression<boolean> }
@@ -360,7 +366,7 @@ export function getDefaultTemplating(actionVisibility: Expression<boolean>): Exp
360
366
  }
361
367
 
362
368
  /**
363
- * Gets binding expressions for the property visible of the action Create.
369
+ * Gets the binding expression for the property visible of the action Create.
364
370
  *
365
371
  * @param {ConverterContext} converterContext
366
372
  * @param {StandardActionsContext} standardActionsContext
@@ -410,7 +416,7 @@ export function getCreateVisibility(
410
416
  }
411
417
 
412
418
  /**
413
- * Gets binding expressions for the property visible of the action Delete.
419
+ * Gets the binding expression for the property visible of the action Delete.
414
420
  *
415
421
  * @param {ConverterContext} converterContext
416
422
  * @param {StandardActionsContext} standardActionsContext
@@ -421,7 +427,7 @@ export function getDeleteVisibility(
421
427
  standardActionsContext: StandardActionsContext
422
428
  ): Expression<boolean> {
423
429
  const isDeleteHidden = standardActionsContext.hiddenAnnotation.delete;
424
- const isPathDeletable = standardActionsContext.restrictions.isDeletable.expression;
430
+ const pathDeletableExpression = standardActionsContext.restrictions.isDeletable.expression;
425
431
 
426
432
  //Delete Button is visible:
427
433
  // Prerequisites:
@@ -440,7 +446,7 @@ export function getDeleteVisibility(
440
446
  or(standardActionsContext.isViewWithMultipleVisualizations, converterContext.getTemplateType() === TemplateType.AnalyticalListPage),
441
447
  false,
442
448
  ifElse(
443
- and(isConstant(isPathDeletable), equal(isPathDeletable, false)),
449
+ and(isConstant(pathDeletableExpression), equal(pathDeletableExpression, false)),
444
450
  false,
445
451
  ifElse(
446
452
  and(isConstant(isDeleteHidden), equal(isDeleteHidden, constant(true))),
@@ -456,22 +462,29 @@ export function getDeleteVisibility(
456
462
  }
457
463
 
458
464
  /**
459
- * Gets binding expressions for the property visible of the action Paste.
465
+ * Gets the binding expression for the property visible of the action Paste.
460
466
  *
461
467
  * @param {ConverterContext} converterContext
462
468
  * @param {StandardActionsContext} standardActionsContext
463
469
  * @param {Expression<boolean>} createVisibility
470
+ * @param {boolean} isInsertUpdateActionsTemplated
464
471
  * @returns {Expression<boolean> }
465
472
  */
466
473
  export function getPasteVisibility(
467
474
  converterContext: ConverterContext,
468
475
  standardActionsContext: StandardActionsContext,
469
- createVisibility: Expression<boolean>
476
+ createVisibility: Expression<boolean>,
477
+ isInsertUpdateActionsTemplated: boolean
470
478
  ): Expression<boolean> {
471
- // If Create is visible, enablePaste is not disabled into manifest and we are on OP/blocks outside Fiori elements templates, button will be visible according to insertable restrictions and create visibility
479
+ // If Create is visible, enablePaste is not disabled into manifest and we are on OP/blocks outside Fiori elements templates
480
+ // Then button will be visible according to insertable restrictions and create visibility
472
481
  // Otherwise it's not visible
473
482
  return ifElse(
474
- and(notEqual(standardActionsContext.tableManifestConfiguration.enablePaste, false), equal(createVisibility, true)),
483
+ and(
484
+ notEqual(standardActionsContext.tableManifestConfiguration.enablePaste, false),
485
+ createVisibility,
486
+ isInsertUpdateActionsTemplated
487
+ ),
475
488
  [TemplateType.ListReport, TemplateType.AnalyticalListPage].indexOf(converterContext.getTemplateType()) === -1 &&
476
489
  standardActionsContext.restrictions.isInsertable.expression,
477
490
  false
@@ -479,24 +492,23 @@ export function getPasteVisibility(
479
492
  }
480
493
 
481
494
  /**
482
- * Gets binding expressions for the property visible of the action MassEdit.
495
+ * Gets the binding expression for the property visible of the action MassEdit.
483
496
  *
484
497
  * @param {ConverterContext} converterContext
485
498
  * @param {StandardActionsContext} standardActionsContext
486
- * @param {string | undefined} selectionMode
487
499
  * @returns {Expression<boolean> }
488
500
  */
489
501
  export function getMassEditVisibility(
490
502
  converterContext: ConverterContext,
491
- standardActionsContext: StandardActionsContext,
492
- selectionMode: string | undefined
503
+ standardActionsContext: StandardActionsContext
493
504
  ): Expression<boolean> {
494
505
  const isUpdateHidden = standardActionsContext.hiddenAnnotation.update,
495
- isPathUpdatable = standardActionsContext.restrictions.isUpdatable.expression,
496
- bMassEditEnabledInManifest: boolean = standardActionsContext.tableManifestConfiguration?.enableMassEdit || false,
497
- iSelectionLimit: number = standardActionsContext.tableManifestConfiguration?.selectionLimit;
498
- const bIsRelevantSelectionMode: boolean = !((selectionMode && selectionMode === "Single") || (iSelectionLimit && iSelectionLimit < 2));
499
-
506
+ pathUpdatableExpression = standardActionsContext.restrictions.isUpdatable.expression,
507
+ bMassEditEnabledInManifest: boolean = standardActionsContext.tableManifestConfiguration?.enableMassEdit || false;
508
+ const templateBindingExpression =
509
+ converterContext.getTemplateType() === TemplateType.ObjectPage
510
+ ? equal(UI.IsEditable, true)
511
+ : converterContext.getTemplateType() === TemplateType.ListReport;
500
512
  //MassEdit is visible
501
513
  // If
502
514
  // - there is no static restrictions set to false
@@ -505,18 +517,14 @@ export function getMassEditVisibility(
505
517
  // Then MassEdit is always visible in LR or dynamically visible in OP according to ui>Editable and hiddenAnnotation
506
518
  // Button is hidden for all other cases
507
519
  return ifElse(
508
- and(not(and(isConstant(isPathUpdatable), equal(isPathUpdatable, false))), bIsRelevantSelectionMode, bMassEditEnabledInManifest),
509
- ifElse(
510
- converterContext.getTemplateType() === TemplateType.ObjectPage,
511
- and(equal(UI.IsEditable, true), not(isUpdateHidden)),
512
- converterContext.getTemplateType() === TemplateType.ListReport
513
- ),
520
+ and(not(and(isConstant(pathUpdatableExpression), equal(pathUpdatableExpression, false))), bMassEditEnabledInManifest),
521
+ and(templateBindingExpression, not(isUpdateHidden)),
514
522
  false
515
523
  );
516
524
  }
517
525
 
518
526
  /**
519
- * Gets binding expressions for the property enabled of the action Create.
527
+ * Gets the binding expression for the property enabled of the action Create.
520
528
  *
521
529
  * @param {ConverterContext} converterContext
522
530
  * @param {StandardActionsContext} standardActionsContext
@@ -531,7 +539,7 @@ export function getCreateEnablement(
531
539
  const isInsertable = standardActionsContext.restrictions.isInsertable.expression;
532
540
  const CollectionType = converterContext.resolveAbsolutePath<any>(standardActionsContext.collectionPath).target?._type;
533
541
  return and(
534
- not(equal(createVisibility, constant(false))),
542
+ createVisibility,
535
543
  ifElse(
536
544
  CollectionType === "EntitySet",
537
545
  true,
@@ -545,7 +553,7 @@ export function getCreateEnablement(
545
553
  }
546
554
 
547
555
  /**
548
- * Gets binding expressions for the property enabled of the action Delete.
556
+ * Gets the binding expression for the property enabled of the action Delete.
549
557
  *
550
558
  * @param {ConverterContext} converterContext
551
559
  * @param {StandardActionsContext} standardActionsContext
@@ -565,7 +573,7 @@ export function getDeleteEnablement(
565
573
  const numberOfUnSavedContexts = bindingExpression("unSavedContexts", "internal");
566
574
 
567
575
  return and(
568
- not(equal(deleteVisibility, constant(false))),
576
+ deleteVisibility,
569
577
  ifElse(
570
578
  or(converterContext.getTemplateType() !== TemplateType.ObjectPage, isOnlyDynamicOnCurrentEntity),
571
579
  ifElse(
@@ -582,28 +590,66 @@ export function getDeleteEnablement(
582
590
  }
583
591
 
584
592
  /**
585
- * Gets binding expressions for the property enabled of the action MassEdit.
593
+ * Gets the binding expression for the property enabled of the action Paste.
594
+ *
595
+ * @param {Expression<boolean>} pasteVisibility
596
+ * @param {Expression<boolean>} createEnablement
597
+ * @returns {Expression<boolean> }
598
+ */
599
+ export function getPasteEnablement(pasteVisibility: Expression<boolean>, createEnablement: Expression<boolean>): Expression<boolean> {
600
+ return and(pasteVisibility, createEnablement);
601
+ }
602
+
603
+ /**
604
+ * Gets the binding expression for the property enabled of the action MassEdit.
586
605
  *
606
+ * @param {ConverterContext} converterContext
587
607
  * @param {StandardActionsContext} standardActionsContext
588
608
  * @param {Expression<boolean>} massEditVisibility
589
609
  * @returns {Expression<boolean> }
590
610
  */
591
611
  export function getMassEditEnablement(
612
+ converterContext: ConverterContext,
592
613
  standardActionsContext: StandardActionsContext,
593
614
  massEditVisibility: Expression<boolean>
594
615
  ): Expression<boolean> {
595
- const isPathUpdatable = standardActionsContext.restrictions.isUpdatable.expression;
616
+ const pathUpdatableExpression = standardActionsContext.restrictions.isUpdatable.expression;
596
617
  const isOnlyDynamicOnCurrentEntity: any =
597
- standardActionsContext.restrictions.isUpdatable.isOnlyCurrentEntityExpression && !isConstant(isPathUpdatable);
598
- const numberOfSelectedContexts = greaterOrEqual(bindingExpression("numberOfSelectedContexts", "internal"), 2);
599
- const numberOfUpdatableContexts = greaterOrEqual(length(bindingExpression("updatableContexts", "internal")), 2);
600
-
601
- return and(
602
- not(equal(massEditVisibility, constant(false))),
603
- ifElse(
604
- isOnlyDynamicOnCurrentEntity,
605
- and(numberOfSelectedContexts, numberOfUpdatableContexts),
606
- and(numberOfSelectedContexts, isPathUpdatable)
607
- )
618
+ standardActionsContext.restrictions.isUpdatable.isOnlyCurrentEntityExpression && !isConstant(pathUpdatableExpression);
619
+ const numberOfSelectedContexts = greaterOrEqual(bindingExpression("numberOfSelectedContexts", "internal"), 1);
620
+ const numberOfUpdatableContexts = greaterOrEqual(length(bindingExpression("updatableContexts", "internal")), 1);
621
+ const bIsDraftSupported = isDraftSupported(converterContext);
622
+ const bDisplayMode = isInDisplayMode(converterContext);
623
+
624
+ // numberOfUpdatableContexts needs to be added to the binding in case
625
+ // 1. Update is dependent on current entity property (isOnlyDynamicOnCurrentEntity is true).
626
+ // 2. The table is read only and draft enabled(like LR), in this case only active contexts can be mass edited.
627
+ // So, update depends on 'IsActiveEntity' value which needs to be checked runtime.
628
+ const runtimeBinding = ifElse(
629
+ or(and(bDisplayMode, bIsDraftSupported), isOnlyDynamicOnCurrentEntity),
630
+ and(numberOfSelectedContexts, numberOfUpdatableContexts),
631
+ and(numberOfSelectedContexts)
608
632
  );
633
+
634
+ return and(massEditVisibility, ifElse(isOnlyDynamicOnCurrentEntity, runtimeBinding, and(runtimeBinding, pathUpdatableExpression)));
635
+ }
636
+
637
+ /**
638
+ * Tells if the table in template is in display mode.
639
+ *
640
+ * @param {ConverterContext} converterContext
641
+ * @param {ViewPathConfiguration} viewConfiguration
642
+ * @returns {boolean}
643
+ */
644
+ export function isInDisplayMode(converterContext: ConverterContext, viewConfiguration?: ViewPathConfiguration): boolean {
645
+ const templateType = converterContext.getTemplateType();
646
+ if (
647
+ templateType === TemplateType.ListReport ||
648
+ templateType === TemplateType.AnalyticalListPage ||
649
+ (viewConfiguration && converterContext.getManifestWrapper().hasMultipleVisualizations(viewConfiguration))
650
+ ) {
651
+ return true;
652
+ }
653
+ // updatable will be handled at the property level
654
+ return false;
609
655
  }