@openui5/sap.ui.fl 1.115.1 → 1.117.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 (263) hide show
  1. package/.eslintrc.json +33 -2
  2. package/.reuse/dep5 +0 -5
  3. package/THIRDPARTY.txt +1 -7
  4. package/package.json +3 -3
  5. package/src/sap/ui/fl/.library +1 -1
  6. package/src/sap/ui/fl/Cache.js +30 -33
  7. package/src/sap/ui/fl/ChangePersistence.js +139 -84
  8. package/src/sap/ui/fl/ChangePersistenceFactory.js +1 -1
  9. package/src/sap/ui/fl/FakeLrepConnector.js +7 -7
  10. package/src/sap/ui/fl/FakeLrepConnectorLocalStorage.js +7 -7
  11. package/src/sap/ui/fl/FakeLrepConnectorSessionStorage.js +5 -5
  12. package/src/sap/ui/fl/FakeLrepLocalStorage.js +1 -1
  13. package/src/sap/ui/fl/FlexController.js +82 -210
  14. package/src/sap/ui/fl/FlexControllerFactory.js +12 -1
  15. package/src/sap/ui/fl/Layer.js +1 -1
  16. package/src/sap/ui/fl/LayerUtils.js +11 -11
  17. package/src/sap/ui/fl/Utils.js +45 -88
  18. package/src/sap/ui/fl/apply/_internal/DelegateMediator.js +41 -38
  19. package/src/sap/ui/fl/apply/_internal/appVariant/DescriptorChangeTypes.js +1 -1
  20. package/src/sap/ui/fl/apply/_internal/changes/Applier.js +130 -94
  21. package/src/sap/ui/fl/apply/_internal/changes/FlexCustomData.js +1 -1
  22. package/src/sap/ui/fl/apply/_internal/changes/Reverter.js +10 -4
  23. package/src/sap/ui/fl/apply/_internal/changes/Utils.js +7 -2
  24. package/src/sap/ui/fl/apply/_internal/changes/descriptor/Applier.js +19 -19
  25. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ApplyStrategyFactory.js +4 -5
  26. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ApplyUtil.js +1 -2
  27. package/src/sap/ui/fl/apply/_internal/changes/descriptor/Preprocessor.js +1 -1
  28. package/src/sap/ui/fl/apply/_internal/changes/descriptor/Registration.js +1 -1
  29. package/src/sap/ui/fl/apply/_internal/changes/descriptor/RegistrationBuild.js +1 -1
  30. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/AddAnnotationsToOData.js +18 -16
  31. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/AddNewInbound.js +11 -9
  32. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/ChangeDataSource.js +2 -1
  33. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/ChangeInbound.js +4 -2
  34. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/RemoveAllInboundsExceptOne.js +9 -7
  35. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/SetTitle.js +1 -1
  36. package/src/sap/ui/fl/apply/_internal/changes/descriptor/fiori/SetAbstract.js +4 -2
  37. package/src/sap/ui/fl/apply/_internal/changes/descriptor/fiori/SetRegistrationIds.js +4 -3
  38. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ovp/AddNewCard.js +4 -2
  39. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ovp/ChangeCard.js +4 -2
  40. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ovp/DeleteCard.js +2 -1
  41. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddComponentUsages.js +3 -5
  42. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddLibrary.js +7 -7
  43. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddNewModel.js +13 -11
  44. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddNewModelEnhanceWith.js +4 -4
  45. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/SetFlexExtensionPointEnabled.js +4 -3
  46. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/SetMinUI5Version.js +5 -5
  47. package/src/sap/ui/fl/apply/_internal/connectors/ObjectStorageConnector.js +4 -5
  48. package/src/sap/ui/fl/apply/_internal/connectors/ObjectStorageUtils.js +29 -29
  49. package/src/sap/ui/fl/apply/_internal/controlVariants/URLHandler.js +1 -2
  50. package/src/sap/ui/fl/apply/_internal/controlVariants/Utils.js +6 -4
  51. package/src/sap/ui/fl/apply/_internal/extensionPoint/Processor.js +44 -44
  52. package/src/sap/ui/fl/apply/_internal/flexObjects/AppDescriptorChange.js +3 -3
  53. package/src/sap/ui/fl/apply/_internal/flexObjects/CompVariant.js +15 -1
  54. package/src/sap/ui/fl/apply/_internal/flexObjects/CompVariantRevertData.js +1 -1
  55. package/src/sap/ui/fl/apply/_internal/flexObjects/ControllerExtensionChange.js +1 -1
  56. package/src/sap/ui/fl/apply/_internal/flexObjects/FlVariant.js +1 -14
  57. package/src/sap/ui/fl/apply/_internal/flexObjects/FlexObject.js +3 -1
  58. package/src/sap/ui/fl/apply/_internal/flexObjects/FlexObjectFactory.js +16 -8
  59. package/src/sap/ui/fl/apply/_internal/flexObjects/RevertData.js +1 -1
  60. package/src/sap/ui/fl/apply/_internal/flexObjects/States.js +1 -1
  61. package/src/sap/ui/fl/apply/_internal/flexObjects/UIChange.js +12 -4
  62. package/src/sap/ui/fl/apply/_internal/flexObjects/UpdatableChange.js +1 -1
  63. package/src/sap/ui/fl/apply/_internal/flexObjects/Variant.js +23 -5
  64. package/src/sap/ui/fl/apply/_internal/flexState/FlexState.js +206 -64
  65. package/src/sap/ui/fl/apply/_internal/flexState/InitialPrepareFunctions.js +27 -17
  66. package/src/sap/ui/fl/apply/_internal/flexState/Loader.js +16 -10
  67. package/src/sap/ui/fl/apply/_internal/flexState/ManifestUtils.js +23 -7
  68. package/src/sap/ui/fl/apply/_internal/flexState/UI2Personalization/UI2PersonalizationState.js +2 -2
  69. package/src/sap/ui/fl/apply/_internal/flexState/appDescriptorChanges/prepareAppDescriptorMap.js +1 -1
  70. package/src/sap/ui/fl/apply/_internal/flexState/changes/DependencyHandler.js +4 -4
  71. package/src/sap/ui/fl/apply/_internal/flexState/changes/ExtensionPointState.js +50 -50
  72. package/src/sap/ui/fl/apply/_internal/flexState/compVariants/CompVariantMerger.js +27 -13
  73. package/src/sap/ui/fl/apply/_internal/flexState/compVariants/prepareCompVariantsMap.js +5 -5
  74. package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/Switcher.js +5 -5
  75. package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/VariantManagementState.js +55 -37
  76. package/src/sap/ui/fl/apply/_internal/preprocessors/ComponentLifecycleHooks.js +20 -23
  77. package/src/sap/ui/fl/apply/_internal/preprocessors/ControllerExtension.js +5 -5
  78. package/src/sap/ui/fl/apply/_internal/preprocessors/EventHistory.js +6 -6
  79. package/src/sap/ui/fl/apply/_internal/preprocessors/RegistrationDelegator.js +1 -2
  80. package/src/sap/ui/fl/apply/_internal/preprocessors/XmlPreprocessor.js +6 -6
  81. package/src/sap/ui/fl/apply/api/ControlVariantApplyAPI.js +15 -5
  82. package/src/sap/ui/fl/apply/api/DelegateMediatorAPI.js +10 -4
  83. package/src/sap/ui/fl/apply/api/FlexRuntimeInfoAPI.js +6 -8
  84. package/src/sap/ui/fl/apply/api/SmartVariantManagementApplyAPI.js +6 -6
  85. package/src/sap/ui/fl/apply/api/UI2PersonalizationApplyAPI.js +3 -5
  86. package/src/sap/ui/fl/changeHandler/AddIFrame.js +22 -22
  87. package/src/sap/ui/fl/changeHandler/AddXML.js +1 -1
  88. package/src/sap/ui/fl/changeHandler/AddXMLAtExtensionPoint.js +43 -36
  89. package/src/sap/ui/fl/changeHandler/Base.js +7 -7
  90. package/src/sap/ui/fl/changeHandler/BaseAddViaDelegate.js +107 -107
  91. package/src/sap/ui/fl/changeHandler/BaseAddXml.js +45 -45
  92. package/src/sap/ui/fl/changeHandler/BaseRename.js +26 -26
  93. package/src/sap/ui/fl/changeHandler/BaseTreeModifier.js +1 -1
  94. package/src/sap/ui/fl/changeHandler/HideControl.js +15 -16
  95. package/src/sap/ui/fl/changeHandler/MoveControls.js +190 -191
  96. package/src/sap/ui/fl/changeHandler/MoveElements.js +36 -36
  97. package/src/sap/ui/fl/changeHandler/PropertyBindingChange.js +7 -7
  98. package/src/sap/ui/fl/changeHandler/PropertyChange.js +7 -7
  99. package/src/sap/ui/fl/changeHandler/StashControl.js +35 -35
  100. package/src/sap/ui/fl/changeHandler/UnhideControl.js +7 -7
  101. package/src/sap/ui/fl/changeHandler/UnstashControl.js +21 -21
  102. package/src/sap/ui/fl/changeHandler/UpdateIFrame.js +39 -39
  103. package/src/sap/ui/fl/changeHandler/common/ChangeCategories.js +1 -1
  104. package/src/sap/ui/fl/changeHandler/common/createIFrame.js +5 -5
  105. package/src/sap/ui/fl/changeHandler/common/getTargetAggregationIndex.js +5 -5
  106. package/src/sap/ui/fl/descriptorRelated/api/DescriptorChangeFactory.js +12 -12
  107. package/src/sap/ui/fl/descriptorRelated/api/DescriptorInlineChangeFactory.js +7 -9
  108. package/src/sap/ui/fl/descriptorRelated/api/DescriptorVariantFactory.js +1 -1
  109. package/src/sap/ui/fl/descriptorRelated/internal/Utils.js +12 -12
  110. package/src/sap/ui/fl/designtime/util/IFrame.designtime.js +60 -60
  111. package/src/sap/ui/fl/designtime/variants/VariantManagement.designtime.js +2 -5
  112. package/src/sap/ui/fl/initial/_internal/Storage.js +20 -21
  113. package/src/sap/ui/fl/initial/_internal/StorageResultMerger.js +4 -4
  114. package/src/sap/ui/fl/initial/_internal/StorageUtils.js +20 -21
  115. package/src/sap/ui/fl/initial/_internal/changeHandlers/ChangeHandlerRegistration.js +6 -6
  116. package/src/sap/ui/fl/initial/_internal/changeHandlers/ChangeHandlerStorage.js +1 -1
  117. package/src/sap/ui/fl/initial/_internal/connectors/BackendConnector.js +2 -2
  118. package/src/sap/ui/fl/initial/_internal/connectors/KeyUserConnector.js +1 -1
  119. package/src/sap/ui/fl/initial/_internal/connectors/LrepConnector.js +4 -4
  120. package/src/sap/ui/fl/initial/_internal/connectors/StaticFileConnector.js +3 -3
  121. package/src/sap/ui/fl/initial/_internal/connectors/Utils.js +22 -18
  122. package/src/sap/ui/fl/initial/_internal/storageResultDisassemble.js +4 -4
  123. package/src/sap/ui/fl/interfaces/BaseLoadConnector.js +2 -2
  124. package/src/sap/ui/fl/interfaces/Delegate.js +7 -9
  125. package/src/sap/ui/fl/library.js +44 -45
  126. package/src/sap/ui/fl/library.support.js +59 -59
  127. package/src/sap/ui/fl/messagebundle.properties +4 -119
  128. package/src/sap/ui/fl/messagebundle_ar.properties +2 -79
  129. package/src/sap/ui/fl/messagebundle_bg.properties +2 -79
  130. package/src/sap/ui/fl/messagebundle_ca.properties +2 -79
  131. package/src/sap/ui/fl/messagebundle_cs.properties +2 -79
  132. package/src/sap/ui/fl/messagebundle_cy.properties +2 -79
  133. package/src/sap/ui/fl/messagebundle_da.properties +2 -79
  134. package/src/sap/ui/fl/messagebundle_de.properties +2 -79
  135. package/src/sap/ui/fl/messagebundle_el.properties +2 -79
  136. package/src/sap/ui/fl/messagebundle_en.properties +2 -79
  137. package/src/sap/ui/fl/messagebundle_en_GB.properties +2 -79
  138. package/src/sap/ui/fl/messagebundle_en_US_sappsd.properties +2 -79
  139. package/src/sap/ui/fl/messagebundle_en_US_saprigi.properties +2 -79
  140. package/src/sap/ui/fl/messagebundle_en_US_saptrc.properties +2 -79
  141. package/src/sap/ui/fl/messagebundle_es.properties +2 -79
  142. package/src/sap/ui/fl/messagebundle_es_MX.properties +2 -79
  143. package/src/sap/ui/fl/messagebundle_et.properties +2 -79
  144. package/src/sap/ui/fl/messagebundle_fi.properties +2 -79
  145. package/src/sap/ui/fl/messagebundle_fr.properties +2 -79
  146. package/src/sap/ui/fl/messagebundle_fr_CA.properties +2 -79
  147. package/src/sap/ui/fl/messagebundle_hi.properties +2 -79
  148. package/src/sap/ui/fl/messagebundle_hr.properties +2 -79
  149. package/src/sap/ui/fl/messagebundle_hu.properties +2 -79
  150. package/src/sap/ui/fl/messagebundle_id.properties +2 -79
  151. package/src/sap/ui/fl/messagebundle_it.properties +2 -79
  152. package/src/sap/ui/fl/messagebundle_iw.properties +2 -79
  153. package/src/sap/ui/fl/messagebundle_ja.properties +2 -79
  154. package/src/sap/ui/fl/messagebundle_kk.properties +2 -79
  155. package/src/sap/ui/fl/messagebundle_ko.properties +2 -79
  156. package/src/sap/ui/fl/messagebundle_lt.properties +2 -79
  157. package/src/sap/ui/fl/messagebundle_lv.properties +2 -79
  158. package/src/sap/ui/fl/messagebundle_ms.properties +2 -79
  159. package/src/sap/ui/fl/messagebundle_nl.properties +2 -79
  160. package/src/sap/ui/fl/messagebundle_no.properties +2 -79
  161. package/src/sap/ui/fl/messagebundle_pl.properties +2 -79
  162. package/src/sap/ui/fl/messagebundle_pt.properties +2 -79
  163. package/src/sap/ui/fl/messagebundle_pt_PT.properties +2 -79
  164. package/src/sap/ui/fl/messagebundle_ro.properties +2 -79
  165. package/src/sap/ui/fl/messagebundle_ru.properties +2 -79
  166. package/src/sap/ui/fl/messagebundle_sh.properties +2 -79
  167. package/src/sap/ui/fl/messagebundle_sk.properties +2 -79
  168. package/src/sap/ui/fl/messagebundle_sl.properties +2 -79
  169. package/src/sap/ui/fl/messagebundle_sv.properties +2 -79
  170. package/src/sap/ui/fl/messagebundle_th.properties +2 -79
  171. package/src/sap/ui/fl/messagebundle_tr.properties +2 -79
  172. package/src/sap/ui/fl/messagebundle_uk.properties +3 -80
  173. package/src/sap/ui/fl/messagebundle_vi.properties +2 -79
  174. package/src/sap/ui/fl/messagebundle_zh_CN.properties +2 -79
  175. package/src/sap/ui/fl/messagebundle_zh_TW.properties +2 -79
  176. package/src/sap/ui/fl/registry/Settings.js +41 -43
  177. package/src/sap/ui/fl/requireAsync.js +7 -1
  178. package/src/sap/ui/fl/support/_internal/extractChangeDependencies.js +9 -9
  179. package/src/sap/ui/fl/support/_internal/getChangeDependencies.js +22 -22
  180. package/src/sap/ui/fl/support/_internal/getFlexSettings.js +3 -3
  181. package/src/sap/ui/fl/support/api/SupportAPI.js +1 -1
  182. package/src/sap/ui/fl/support/apps/contentbrowser/Component.js +3 -5
  183. package/src/sap/ui/fl/support/apps/contentbrowser/controller/ContentDetails.controller.js +27 -27
  184. package/src/sap/ui/fl/support/apps/contentbrowser/controller/ContentDetailsEdit.controller.js +20 -20
  185. package/src/sap/ui/fl/support/apps/contentbrowser/controller/LayerContentMaster.controller.js +17 -17
  186. package/src/sap/ui/fl/support/apps/contentbrowser/controller/Layers.controller.js +4 -4
  187. package/src/sap/ui/fl/support/apps/contentbrowser/lrepConnector/LRepConnector.js +34 -34
  188. package/src/sap/ui/fl/support/apps/contentbrowser/utils/DataUtils.js +10 -10
  189. package/src/sap/ui/fl/support/apps/contentbrowser/utils/ErrorUtils.js +5 -5
  190. package/src/sap/ui/fl/transport/TransportSelection.js +1 -1
  191. package/src/sap/ui/fl/util/DescriptorChangeCheck.js +2 -2
  192. package/src/sap/ui/fl/util/IFrame.js +18 -18
  193. package/src/sap/ui/fl/util/IFrameRenderer.js +1 -1
  194. package/src/sap/ui/fl/util/ManagedObjectModel.js +7 -7
  195. package/src/sap/ui/fl/util/changePropertyValueByPath.js +2 -2
  196. package/src/sap/ui/fl/util/getContainerUserInfo.js +25 -25
  197. package/src/sap/ui/fl/util/resolveBinding.js +3 -3
  198. package/src/sap/ui/fl/variants/VariantManagement.js +8 -47
  199. package/src/sap/ui/fl/variants/VariantModel.js +236 -146
  200. package/src/sap/ui/fl/variants/context/Component.js +1 -2
  201. package/src/sap/ui/fl/variants/context/controller/ContextVisibility.controller.js +2 -5
  202. package/src/sap/ui/fl/write/_internal/SaveAs.js +163 -161
  203. package/src/sap/ui/fl/write/_internal/Storage.js +51 -53
  204. package/src/sap/ui/fl/write/_internal/StorageFeaturesMerger.js +4 -4
  205. package/src/sap/ui/fl/write/_internal/Versions.js +105 -97
  206. package/src/sap/ui/fl/write/_internal/appVariant/AppVariant.js +9 -9
  207. package/src/sap/ui/fl/write/_internal/appVariant/AppVariantFactory.js +7 -7
  208. package/src/sap/ui/fl/write/_internal/appVariant/AppVariantInlineChange.js +2 -2
  209. package/src/sap/ui/fl/write/_internal/appVariant/AppVariantInlineChangeFactory.js +3 -5
  210. package/src/sap/ui/fl/write/_internal/condenser/Condenser.js +15 -10
  211. package/src/sap/ui/fl/write/_internal/condenser/UIReconstruction.js +1 -1
  212. package/src/sap/ui/fl/write/_internal/condenser/classifications/Create.js +1 -1
  213. package/src/sap/ui/fl/write/_internal/condenser/classifications/Destroy.js +1 -1
  214. package/src/sap/ui/fl/write/_internal/condenser/classifications/Move.js +1 -1
  215. package/src/sap/ui/fl/write/_internal/connectors/BackendConnector.js +10 -10
  216. package/src/sap/ui/fl/write/_internal/connectors/KeyUserConnector.js +23 -24
  217. package/src/sap/ui/fl/write/_internal/connectors/LrepConnector.js +60 -61
  218. package/src/sap/ui/fl/write/_internal/connectors/NeoLrepConnector.js +4 -4
  219. package/src/sap/ui/fl/write/_internal/connectors/ObjectPathConnector.js +6 -6
  220. package/src/sap/ui/fl/write/_internal/connectors/PersonalizationConnector.js +2 -2
  221. package/src/sap/ui/fl/write/_internal/connectors/Utils.js +14 -14
  222. package/src/sap/ui/fl/write/_internal/extensionPoint/Processor.js +3 -3
  223. package/src/sap/ui/fl/write/_internal/extensionPoint/Registry.js +40 -10
  224. package/src/sap/ui/fl/write/_internal/fieldExtensibility/ABAPAccess.js +2 -2
  225. package/src/sap/ui/fl/write/_internal/fieldExtensibility/ABAPExtensibilityVariant.js +1 -1
  226. package/src/sap/ui/fl/write/_internal/fieldExtensibility/ABAPExtensibilityVariantFactory.js +1 -1
  227. package/src/sap/ui/fl/write/_internal/fieldExtensibility/MultiTenantABAPExtensibilityVariant.js +2 -2
  228. package/src/sap/ui/fl/write/_internal/fieldExtensibility/ServiceValidation.js +1 -3
  229. package/src/sap/ui/fl/write/_internal/fieldExtensibility/SingleTenantABAPExtensibilityVariant.js +2 -2
  230. package/src/sap/ui/fl/write/_internal/fieldExtensibility/UriParser.js +1 -1
  231. package/src/sap/ui/fl/write/_internal/fieldExtensibility/Utils.js +3 -3
  232. package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/CAPAccess.js +1 -1
  233. package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/dialog/CustomFieldCAPDialog.js +2 -2
  234. package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/getEditorConfig.js +2 -2
  235. package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/booleanEditor/BooleanEditor.js +2 -2
  236. package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/rangeEditor/RangeEditor.js +3 -3
  237. package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/timeEditor/TimeEditor.js +4 -4
  238. package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/validators/IsRequired.js +2 -2
  239. package/src/sap/ui/fl/write/_internal/flexState/FlexObjectState.js +33 -35
  240. package/src/sap/ui/fl/write/_internal/flexState/compVariants/CompVariantState.js +81 -59
  241. package/src/sap/ui/fl/write/_internal/transport/TransportDialog.js +12 -13
  242. package/src/sap/ui/fl/write/_internal/transport/TransportSelection.js +12 -12
  243. package/src/sap/ui/fl/write/_internal/transport/Transports.js +7 -7
  244. package/src/sap/ui/fl/write/api/AppVariantWriteAPI.js +12 -15
  245. package/src/sap/ui/fl/write/api/ChangesWriteAPI.js +222 -185
  246. package/src/sap/ui/fl/write/api/ContextBasedAdaptationsAPI.js +546 -110
  247. package/src/sap/ui/fl/write/api/ControlPersonalizationWriteAPI.js +122 -68
  248. package/src/sap/ui/fl/write/api/ExtensionPointRegistryAPI.js +19 -4
  249. package/src/sap/ui/fl/write/api/FeaturesAPI.js +19 -20
  250. package/src/sap/ui/fl/write/api/FieldExtensibility.js +1 -1
  251. package/src/sap/ui/fl/write/api/LocalResetAPI.js +32 -33
  252. package/src/sap/ui/fl/write/api/PersistenceWriteAPI.js +119 -73
  253. package/src/sap/ui/fl/write/api/ReloadInfoAPI.js +8 -8
  254. package/src/sap/ui/fl/write/api/SmartBusinessWriteAPI.js +18 -21
  255. package/src/sap/ui/fl/write/api/SmartVariantManagementWriteAPI.js +14 -13
  256. package/src/sap/ui/fl/write/api/TranslationAPI.js +13 -17
  257. package/src/sap/ui/fl/write/api/UI2PersonalizationWriteAPI.js +5 -7
  258. package/src/sap/ui/fl/write/api/VersionsAPI.js +14 -14
  259. package/src/sap/ui/fl/write/api/connectors/FileListBaseConnector.js +1 -1
  260. package/src/sap/ui/fl/write/api/connectors/ObjectStorageConnector.js +7 -7
  261. package/src/sap/ui/fl/write/connectors/BaseConnector.js +17 -17
  262. package/ui5.yaml +1 -2
  263. package/src/sap/ui/fl/apply/_internal/ChangesController.js +0 -49
package/.eslintrc.json CHANGED
@@ -15,10 +15,41 @@
15
15
  "no-multi-spaces": "error",
16
16
  "indent": ["error", "tab", {
17
17
  "SwitchCase": 1,
18
- "MemberExpression": "off"
18
+ "MemberExpression": 0
19
19
  }],
20
20
  "one-var": ["error", "never"],
21
21
  "no-useless-call": "error",
22
- "key-spacing": ["error", { "beforeColon": false }]
22
+ "key-spacing": ["error", { "beforeColon": false }],
23
+ "default-case": ["error", { "commentPattern": "^skip\\sdefault" }],
24
+
25
+ "comma-dangle": ["error", "never"],
26
+ "max-len": ["warn", {
27
+ "code": 140,
28
+ "ignorePattern": "@param|@returns|@description|<|QUnit.test",
29
+ "ignoreUrls": true
30
+ }],
31
+ "space-before-function-paren": ["error", {
32
+ "anonymous": "never",
33
+ "named": "never",
34
+ "asyncArrow": "always"
35
+ }],
36
+ "no-multi-assign": ["error", { "ignoreNonDeclaration": true }],
37
+ "dot-notation": ["error", { "allowKeywords": true }],
38
+ "spaced-comment": ["error", "always", {
39
+ "line": {
40
+ "exceptions": ["-"]
41
+ },
42
+ "block": {
43
+ "markers": ["!"],
44
+ "exceptions": ["*"],
45
+ "balanced": true
46
+ }
47
+
48
+ }],
49
+ "no-multiple-empty-lines": ["error", {"max": 1}],
50
+ "quotes": ["error", "double", {
51
+ "avoidEscape": true,
52
+ "allowTemplateLiterals": true
53
+ }]
23
54
  }
24
55
  }
package/.reuse/dep5 CHANGED
@@ -457,11 +457,6 @@ Comment: these files belong to: UI5 Web Components
457
457
 
458
458
  # Outside of Libraries:
459
459
 
460
- Files: src/testsuite-utils/src/main/resources/META-INF/less/less.js
461
- Copyright: 2009-2014, Alexis Sellier <self@cloudhead.net>
462
- License: Apache-2.0
463
- Comment: these files belong to: LESS
464
-
465
460
  Files: lib/jsdoc/ui5/plugin.js
466
461
  Copyright:
467
462
  2009-2023 SAP SE or an SAP affiliate company and OpenUI5 contributors
package/THIRDPARTY.txt CHANGED
@@ -460,19 +460,13 @@ Contained in: src/sap.ui.webc.main/src/sap/ui/webc/main/thirdparty/*.*
460
460
 
461
461
  Outside of Libraries:
462
462
 
463
- Component: LESS, version: 1.6.3
464
- Copyright: 2009-2014, Alexis Sellier <self@cloudhead.net>
465
- License: Apache-2.0
466
- License Text: https://github.com/SAP/openui5/blob/master/LICENSES/Apache-2.0.txt
467
- Contained in: src/testsuite-utils/src/main/resources/META-INF/less/less.js
468
-
469
463
  Component: JSDoc 3, version: 3.6.7
470
464
  Copyright: 2011-present Michael Mathews micmath@gmail.com and the contributors to JSDoc
471
465
  License: Apache-2.0
472
466
  License Text: https://github.com/SAP/openui5/blob/master/LICENSES/Apache-2.0.txt
473
467
  Contained in: lib/jsdoc/ui5/plugin.js
474
468
 
475
- Component: SAP Theming Base Content, version: 11.3.0
469
+ Component: SAP Theming Base Content, version: 11.4.2
476
470
  Copyright: SAP SE or an SAP affiliate company and Theming Base Content contributors
477
471
  License: Apache-2.0
478
472
  License Text: https://github.com/SAP/openui5/blob/master/LICENSES/Apache-2.0.txt
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openui5/sap.ui.fl",
3
- "version": "1.115.1",
3
+ "version": "1.117.0",
4
4
  "description": "OpenUI5 UI Library sap.ui.fl",
5
5
  "author": "SAP SE (https://www.sap.com)",
6
6
  "license": "Apache-2.0",
@@ -14,7 +14,7 @@
14
14
  "url": "https://github.com/SAP/openui5.git"
15
15
  },
16
16
  "dependencies": {
17
- "@openui5/sap.m": "1.115.1",
18
- "@openui5/sap.ui.core": "1.115.1"
17
+ "@openui5/sap.m": "1.117.0",
18
+ "@openui5/sap.ui.core": "1.117.0"
19
19
  }
20
20
  }
@@ -6,7 +6,7 @@
6
6
  <copyright>OpenUI5
7
7
  * (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
8
8
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.</copyright>
9
- <version>1.115.1</version>
9
+ <version>1.117.0</version>
10
10
 
11
11
  <documentation>SAPUI5 library with sap.ui.fl controls.</documentation>
12
12
 
@@ -8,13 +8,15 @@ sap.ui.define([
8
8
  "sap/base/util/ObjectPath",
9
9
  "sap/base/Log",
10
10
  "sap/ui/fl/apply/_internal/flexState/FlexState",
11
- "sap/ui/fl/apply/api/ControlVariantApplyAPI"
11
+ "sap/ui/fl/apply/api/ControlVariantApplyAPI",
12
+ "sap/ui/fl/Utils"
12
13
  ],
13
14
  function(
14
15
  ObjectPath,
15
16
  Log,
16
17
  FlexState,
17
- ControlVariantApplyAPI
18
+ ControlVariantApplyAPI,
19
+ Utils
18
20
  ) {
19
21
  "use strict";
20
22
 
@@ -26,7 +28,7 @@ function(
26
28
  * @alias sap.ui.fl.Cache
27
29
  * @experimental Since 1.25.0
28
30
  * @author SAP SE
29
- * @version 1.115.1
31
+ * @version 1.117.0
30
32
  *
31
33
  * @private
32
34
  * @ui5-restricted sap.ui.fl
@@ -63,17 +65,15 @@ function(
63
65
  return ObjectPath.get(vPath, mStorageResponse);
64
66
  }
65
67
 
66
- function _concatControlVariantIdWithCacheKey(sCacheKey, sControlVariantIds) {
68
+ function concatControlVariantIdWithCacheKey(sCacheKey, sControlVariantIds) {
67
69
  if (!sControlVariantIds) {
68
70
  return sCacheKey;
69
71
  }
70
- return sCacheKey === Cache.NOTAG ?
71
- sCacheKey.replace(/>$/, ''.concat('-', sControlVariantIds, '>')) :
72
- sCacheKey.concat('-', sControlVariantIds);
72
+ return sCacheKey.concat("-", sControlVariantIds);
73
73
  }
74
74
 
75
75
  function _trimEtag(sCacheKey) {
76
- return sCacheKey.replace(/(^W\/|")/g, '');
76
+ return sCacheKey.replace(/(^W\/|")/g, "");
77
77
  }
78
78
 
79
79
  Cache.NOTAG = "<NoTag>";
@@ -104,7 +104,7 @@ function(
104
104
  Cache.getChangesFillingCache = function(mComponent, mPropertyBag, bInvalidateCache) {
105
105
  var oPromise = Promise.resolve();
106
106
  if (bInvalidateCache) {
107
- oPromise = FlexState.clearAndInitialize(mPropertyBag);
107
+ oPromise = FlexState.update(mPropertyBag);
108
108
  }
109
109
 
110
110
  return oPromise.then(function() {
@@ -127,38 +127,35 @@ function(
127
127
  * @ui5-restricted sap.ui.fl
128
128
  *
129
129
  */
130
- Cache.getCacheKey = function(mComponent, oAppComponent) {
130
+ Cache.getCacheKey = async function(mComponent, oAppComponent) {
131
+ let sCacheKey = Cache.NOTAG;
131
132
  if (!mComponent || !mComponent.name || !oAppComponent) {
132
133
  Log.warning("Not all parameters were passed to determine a flexibility cache key.");
133
- return Promise.resolve(Cache.NOTAG);
134
- }
135
- return this.getChangesFillingCache(mComponent)
136
- .then(function(oWrappedChangeFileContent) {
137
- if (oWrappedChangeFileContent && oWrappedChangeFileContent.cacheKey) {
138
- return _trimEtag(oWrappedChangeFileContent.cacheKey);
139
- }
140
-
141
- return Cache.NOTAG;
142
- })
143
- .then(function(sCacheKey) {
144
- // concat current control variant ids to cachekey if available
145
- var oVariantModel = oAppComponent.getModel(ControlVariantApplyAPI.getVariantModelName());
146
- if (!oVariantModel) {
147
- return sCacheKey;
148
- }
149
- // If there are no changes, the standard variant is created after the variant management control is instantiated
150
- // When the cache key is calculated before this happens, the standard variant id is unknown
151
- // To avoid inconsistencies between page load and navigation scenarios, all standard variants are filtered
152
- var aVariantManagementControlIds = oVariantModel.getVariantManagementControlIds();
153
- var aCurrentControlVariantIds = oVariantModel.getCurrentControlVariantIds()
134
+ } else {
135
+ const oWrappedChangeFileContent = await this.getChangesFillingCache(mComponent);
136
+ if (oWrappedChangeFileContent && oWrappedChangeFileContent.cacheKey) {
137
+ sCacheKey = _trimEtag(oWrappedChangeFileContent.cacheKey);
138
+
139
+ // Concat current control variant ids to cache key
140
+ if (Utils.isApplicationComponent(oAppComponent) || Utils.isEmbeddedComponent(oAppComponent)) {
141
+ const oVariantModel = await ControlVariantApplyAPI.getVariantModel(oAppComponent);
142
+ // If there are no changes, the standard variant is created after the variant management control is instantiated
143
+ // When the cache key is calculated before this happens, the standard variant id is unknown
144
+ // To avoid inconsistencies between page load and navigation scenarios, all standard variants are filtered
145
+ var aVariantManagementControlIds = oVariantModel.getVariantManagementControlIds();
146
+ var aCurrentControlVariantIds = oVariantModel.getCurrentControlVariantIds()
154
147
  .filter(function(sVariantId) {
155
148
  // FIXME: The standard variant flag should be part of the variant instance
156
149
  // This can be changed once the variant data selector is ready
157
150
  // For now rely on the fact that standard variants have the same name as the vm control
158
151
  return !aVariantManagementControlIds.includes(sVariantId);
159
152
  });
160
- return _concatControlVariantIdWithCacheKey(sCacheKey, aCurrentControlVariantIds.join("-"));
161
- });
153
+ sCacheKey = concatControlVariantIdWithCacheKey(sCacheKey, aCurrentControlVariantIds.join("-"));
154
+ }
155
+ }
156
+ }
157
+
158
+ return sCacheKey;
162
159
  };
163
160
 
164
161
  /**
@@ -66,7 +66,7 @@ sap.ui.define([
66
66
  *
67
67
  * @constructor
68
68
  * @author SAP SE
69
- * @version 1.115.1
69
+ * @version 1.117.0
70
70
  * @experimental Since 1.25.0
71
71
  * @param {object} mComponent - Component data to initiate <code>ChangePersistence</code> instance
72
72
  * @param {string} mComponent.name - Name of the component this instance is responsible for
@@ -77,7 +77,7 @@ sap.ui.define([
77
77
  this._mChanges = DependencyHandler.createEmptyDependencyMap();
78
78
  this._bChangesMapCreated = false;
79
79
 
80
- //_mChangesInitial contains a clone of _mChanges to recreated dependencies if changes need to be reapplied
80
+ // _mChangesInitial contains a clone of _mChanges to recreated dependencies if changes need to be reapplied
81
81
  this._mChangesInitial = merge({}, this._mChanges);
82
82
 
83
83
  if (!this._mComponent || !this._mComponent.name) {
@@ -170,7 +170,7 @@ sap.ui.define([
170
170
  /**
171
171
  * Calls the back end asynchronously and fetches all changes for the component
172
172
  * New changes (dirty state) that are not yet saved to the back end won't be returned.
173
- * @param {map} mPropertyBag Contains additional data needed for reading changes
173
+ * @param {object} mPropertyBag Contains additional data needed for reading changes
174
174
  * @param {object} [mPropertyBag.appDescriptor] Manifest that belongs to the current running component
175
175
  * @param {string} [mPropertyBag.siteId] ID of the site belonging to the current running component
176
176
  * @param {string} [mPropertyBag.currentLayer] Specifies a single layer for loading changes. If this parameter is set, the max layer filtering is not applied
@@ -185,65 +185,65 @@ sap.ui.define([
185
185
  */
186
186
  ChangePersistence.prototype.getChangesForComponent = function(mPropertyBag, bInvalidateCache) {
187
187
  return Utils.getUShellService("URLParsing")
188
- .then(function(oURLParsingService) {
189
- this._oUShellURLParsingService = oURLParsingService;
190
- return Cache.getChangesFillingCache(this._mComponent, mPropertyBag, bInvalidateCache);
191
- }.bind(this))
192
- .then(function(mPropertyBag, oWrappedChangeFileContent) {
193
- var oChangeFileContent = merge({}, oWrappedChangeFileContent);
194
- var oAppComponent = mPropertyBag && mPropertyBag.component && Utils.getAppComponentForControl(mPropertyBag.component);
195
-
196
- var bHasFlexObjects = StorageUtils.isStorageResponseFilled(oChangeFileContent.changes);
197
-
198
- if (!bHasFlexObjects) {
199
- return [];
200
- }
188
+ .then(function(oURLParsingService) {
189
+ this._oUShellURLParsingService = oURLParsingService;
190
+ return Cache.getChangesFillingCache(this._mComponent, mPropertyBag, bInvalidateCache);
191
+ }.bind(this))
192
+ .then(function(mPropertyBag, oWrappedChangeFileContent) {
193
+ var oChangeFileContent = merge({}, oWrappedChangeFileContent);
194
+ var oAppComponent = mPropertyBag && mPropertyBag.component && Utils.getAppComponentForControl(mPropertyBag.component);
195
+
196
+ var bHasFlexObjects = StorageUtils.isStorageResponseFilled(oChangeFileContent.changes);
201
197
 
202
- var aChanges = oChangeFileContent.changes.changes;
203
-
204
- //Binds a json model of message bundle to the component the first time a change within the vendor layer was detected
205
- //It enables the translation of changes
206
- if (!this._oMessagebundle && oChangeFileContent.messagebundle && oAppComponent) {
207
- if (!oAppComponent.getModel("i18nFlexVendor")) {
208
- if (aChanges.some(function(oChange) {
209
- return oChange.layer === Layer.VENDOR;
210
- })) {
211
- this._oMessagebundle = oChangeFileContent.messagebundle;
212
- var oModel = new JSONModel(this._oMessagebundle);
213
- oAppComponent.setModel(oModel, "i18nFlexVendor");
214
- }
198
+ if (!bHasFlexObjects) {
199
+ return [];
200
+ }
201
+
202
+ var aChanges = oChangeFileContent.changes.changes;
203
+
204
+ // Binds a json model of message bundle to the component the first time a change within the vendor layer was detected
205
+ // It enables the translation of changes
206
+ if (!this._oMessagebundle && oChangeFileContent.messagebundle && oAppComponent) {
207
+ if (!oAppComponent.getModel("i18nFlexVendor")) {
208
+ if (aChanges.some(function(oChange) {
209
+ return oChange.layer === Layer.VENDOR;
210
+ })) {
211
+ this._oMessagebundle = oChangeFileContent.messagebundle;
212
+ var oModel = new JSONModel(this._oMessagebundle);
213
+ oAppComponent.setModel(oModel, "i18nFlexVendor");
215
214
  }
216
215
  }
216
+ }
217
217
 
218
- var sCurrentLayer = mPropertyBag && mPropertyBag.currentLayer;
219
- var bFilterMaxLayer = !(mPropertyBag && mPropertyBag.ignoreMaxLayerParameter);
220
- var fnFilter = function() { return true; };
221
- if (sCurrentLayer) {
222
- aChanges = LayerUtils.filterChangeOrChangeDefinitionsByCurrentLayer(aChanges, sCurrentLayer);
223
- } else if (LayerUtils.isLayerFilteringRequired(this._oUShellURLParsingService) && bFilterMaxLayer) {
224
- fnFilter = filterChangeForMaxLayer.bind(this);
225
- //If layer filtering required, excludes changes in higher layer than the max layer
226
- aChanges = aChanges.filter(fnFilter);
227
- } else if (this._bHasChangesOverMaxLayer && !bFilterMaxLayer) {
228
- // ignoreMaxLayerParameter = true is set from flexController.hasHigherLayerChanges(),
229
- // triggered by rta.stop(), to check if reload needs to be performed
230
- // as ctrl variant changes are already gone and to improve performance, just return the constant
231
- this._bHasChangesOverMaxLayer = false;
232
- return this.HIGHER_LAYER_CHANGES_EXIST;
233
- }
218
+ var sCurrentLayer = mPropertyBag && mPropertyBag.currentLayer;
219
+ var bFilterMaxLayer = !(mPropertyBag && mPropertyBag.ignoreMaxLayerParameter);
220
+ var fnFilter = function() { return true; };
221
+ if (sCurrentLayer) {
222
+ aChanges = LayerUtils.filterChangeOrChangeDefinitionsByCurrentLayer(aChanges, sCurrentLayer);
223
+ } else if (LayerUtils.isLayerFilteringRequired(this._oUShellURLParsingService) && bFilterMaxLayer) {
224
+ fnFilter = filterChangeForMaxLayer.bind(this);
225
+ // If layer filtering required, excludes changes in higher layer than the max layer
226
+ aChanges = aChanges.filter(fnFilter);
227
+ } else if (this._bHasChangesOverMaxLayer && !bFilterMaxLayer) {
228
+ // ignoreMaxLayerParameter = true is set from flexController.hasHigherLayerChanges(),
229
+ // triggered by rta.stop(), to check if reload needs to be performed
230
+ // as ctrl variant changes are already gone and to improve performance, just return the constant
231
+ this._bHasChangesOverMaxLayer = false;
232
+ return this.HIGHER_LAYER_CHANGES_EXIST;
233
+ }
234
234
 
235
- var bIncludeControlVariants = oChangeFileContent.changes && mPropertyBag && mPropertyBag.includeCtrlVariants;
236
- var aFilteredVariantChanges = this._getAllCtrlVariantChanges(oChangeFileContent, bIncludeControlVariants, fnFilter);
237
- aChanges = aChanges.concat(aFilteredVariantChanges);
235
+ var bIncludeControlVariants = oChangeFileContent.changes && mPropertyBag && mPropertyBag.includeCtrlVariants;
236
+ var aFilteredVariantChanges = this._getAllCtrlVariantChanges(oChangeFileContent, bIncludeControlVariants, fnFilter);
237
+ aChanges = aChanges.concat(aFilteredVariantChanges);
238
238
 
239
- return this._checkAndGetChangeInstances(aChanges, oChangeFileContent);
240
- }.bind(this, mPropertyBag));
239
+ return this._checkAndGetChangeInstances(aChanges, oChangeFileContent);
240
+ }.bind(this, mPropertyBag));
241
241
  };
242
242
 
243
243
  ChangePersistence.prototype._checkAndGetChangeInstances = function(aChanges, oChangeFileContent) {
244
244
  return aChanges
245
- .filter(preconditionsFulfilled)
246
- .map(getChangeInstance.bind(this, oChangeFileContent));
245
+ .filter(preconditionsFulfilled)
246
+ .map(getChangeInstance.bind(this, oChangeFileContent));
247
247
  };
248
248
 
249
249
  function filterChangeForMaxLayer(oChangeOrChangeContent) {
@@ -274,13 +274,13 @@ sap.ui.define([
274
274
  return VariantManagementState.getInitialChanges({reference: this._mComponent.name});
275
275
  }
276
276
  return ["variants", "variantChanges", "variantDependentControlChanges", "variantManagementChanges"]
277
- .reduce(function(aResult, sVariantChangeType) {
278
- if (oChangeFileContent.changes[sVariantChangeType]) {
279
- return aResult.concat(oChangeFileContent.changes[sVariantChangeType]);
280
- }
281
- return aResult;
282
- }, [])
283
- .filter(fnFilter);
277
+ .reduce(function(aResult, sVariantChangeType) {
278
+ if (oChangeFileContent.changes[sVariantChangeType]) {
279
+ return aResult.concat(oChangeFileContent.changes[sVariantChangeType]);
280
+ }
281
+ return aResult;
282
+ }, [])
283
+ .filter(fnFilter);
284
284
  };
285
285
 
286
286
  /**
@@ -295,7 +295,7 @@ sap.ui.define([
295
295
 
296
296
  function createChangeMap(aChanges) {
297
297
  Measurement.start("fl.createDependencyMap", "Measurement of creating initial dependency map");
298
- //Since starting RTA does not recreate ChangePersistence instance, resets changes map is required to filter personalized changes
298
+ // Since starting RTA does not recreate ChangePersistence instance, resets changes map is required to filter personalized changes
299
299
  this._mChanges = DependencyHandler.createEmptyDependencyMap();
300
300
 
301
301
  aChanges.forEach(this.addChangeAndUpdateDependencies.bind(this, oAppComponent));
@@ -396,7 +396,7 @@ sap.ui.define([
396
396
 
397
397
  /**
398
398
  * Getter for the private aggregation containing sap.ui.fl.apply._internal.flexObjects.FlexObject objects mapped by their selector ids.
399
- * @return {map} mChanges mapping with changes sorted by their selector ids
399
+ * @return {Object<string,object>} mChanges mapping with changes sorted by their selector ids
400
400
  * @public
401
401
  */
402
402
  ChangePersistence.prototype.getChangesMapForComponent = function() {
@@ -405,7 +405,7 @@ sap.ui.define([
405
405
 
406
406
  /**
407
407
  * Returns all changes that are currently loaded for the component.
408
- * @param {map} mPropertyBag - Contains additional data needed for reading changes
408
+ * @param {object} mPropertyBag - Contains additional data needed for reading changes
409
409
  * @param {string} [mPropertyBag.layer] - Specifies a single layer for loading changes
410
410
  * @param {boolean} [mPropertyBag.includeDirtyChanges] - Whether dirty changes of the current session should be included
411
411
  * @returns {sap.ui.fl.apply._internal.flexObjects.FlexObject[]} Array of changes
@@ -415,7 +415,7 @@ sap.ui.define([
415
415
  var aChanges = union(
416
416
  this.getChangesMapForComponent().aChanges,
417
417
  mPropertyBag.includeDirtyChanges && this.getDirtyChanges()
418
- ).filter(function (oChange) {
418
+ ).filter(function(oChange) {
419
419
  return (
420
420
  Boolean(oChange)
421
421
  && oChange.getFileType() === "change"
@@ -448,7 +448,7 @@ sap.ui.define([
448
448
  * view1
449
449
  * view1--view2--view3
450
450
  *
451
- * @param {map} mPropertyBag contains additional data that are needed for reading of changes
451
+ * @param {object} mPropertyBag contains additional data that are needed for reading of changes
452
452
  * @param {string} mPropertyBag.viewId - id of the view
453
453
  * @param {string} mPropertyBag.name - name of the view
454
454
  * @param {sap.ui.core.Component} mPropertyBag.appComponent - Application component for the view
@@ -463,6 +463,12 @@ sap.ui.define([
463
463
  });
464
464
  };
465
465
 
466
+ function finalizeChangeCreation(oChange, oAppComponent) {
467
+ this._addRunTimeCreatedChangeAndUpdateDependencies(oAppComponent, oChange);
468
+ this._mChangesEntries[oChange.getId()] = oChange;
469
+ this._addPropagationListener(oAppComponent);
470
+ }
471
+
466
472
  /**
467
473
  * Adds a new change and returns the id of the new change.
468
474
  *
@@ -473,20 +479,35 @@ sap.ui.define([
473
479
  */
474
480
  ChangePersistence.prototype.addChange = function(vChange, oAppComponent) {
475
481
  var oChange = this.addDirtyChange(vChange);
476
- this._addRunTimeCreatedChangeAndUpdateDependencies(oAppComponent, oChange);
477
- this._mChangesEntries[oChange.getId()] = oChange;
478
- this._addPropagationListener(oAppComponent);
482
+ finalizeChangeCreation.call(this, oChange, oAppComponent);
479
483
  return oChange;
480
484
  };
481
485
 
486
+ /**
487
+ * Adds new changes and returns the ids of the new changes.
488
+ *
489
+ * @param {object[]} aChanges - Array with complete and finalized JSON object representation the file content of the changes or Change instances
490
+ * @param {sap.ui.core.Component} oAppComponent - Application component instance
491
+ * @returns {sap.ui.fl.apply._internal.flexObjects.FlexObject[]} the newly created changes
492
+ * @public
493
+ */
494
+ ChangePersistence.prototype.addChanges = function(aChanges, oAppComponent) {
495
+ var aNewChanges = this.addDirtyChanges(aChanges);
496
+ aNewChanges.forEach(function(oChange) {
497
+ finalizeChangeCreation.call(this, oChange, oAppComponent);
498
+ }.bind(this));
499
+ return aNewChanges;
500
+ };
501
+
482
502
  /**
483
503
  * Adds a new dirty change.
484
504
  *
485
505
  * @param {object} vChange - JSON object of change or change object
506
+ * @param {boolean} [bSkipAddToState] - If set to true, the change won't be added to the FlexState
486
507
  * @returns {sap.ui.fl.apply._internal.flexObjects.FlexObject} The prepared change object
487
508
  * @public
488
509
  */
489
- ChangePersistence.prototype.addDirtyChange = function(vChange) {
510
+ ChangePersistence.prototype.addDirtyChange = function(vChange, bSkipAddToState) {
490
511
  var oNewChange;
491
512
  if (typeof vChange.isA === "function" && vChange.isA("sap.ui.fl.apply._internal.flexObjects.FlexObject")) {
492
513
  oNewChange = vChange;
@@ -497,11 +518,28 @@ sap.ui.define([
497
518
  // don't add the same change twice
498
519
  if (this._aDirtyChanges.indexOf(oNewChange) === -1) {
499
520
  this._aDirtyChanges.push(oNewChange);
500
- FlexState.addDirtyFlexObject(this._mComponent.name, oNewChange);
521
+ if (!bSkipAddToState) {
522
+ FlexState.addDirtyFlexObject(this._mComponent.name, oNewChange);
523
+ }
501
524
  }
502
525
  return oNewChange;
503
526
  };
504
527
 
528
+ /**
529
+ * Adds new dirty changes.
530
+ *
531
+ * @param {object[]} aChanges - JSON objects of changes or change objects
532
+ * @returns {sap.ui.fl.apply._internal.flexObjects.FlexObject[]} The prepared change objects
533
+ * @public
534
+ */
535
+ ChangePersistence.prototype.addDirtyChanges = function(aChanges) {
536
+ var aNewChanges = aChanges.map(function(oChange) {
537
+ return this.addDirtyChange(oChange, true);
538
+ }.bind(this));
539
+ FlexState.addDirtyFlexObjects(this._mComponent.name, aNewChanges);
540
+ return aNewChanges;
541
+ };
542
+
505
543
  /**
506
544
  * If the first changes were created, the <code>propagationListener</code> of <code>sap.ui.fl</code> might not yet
507
545
  * be attached to the application component and must be added then.
@@ -728,7 +766,7 @@ sap.ui.define([
728
766
  if (sParentVersion) {
729
767
  // in case of changes saved for a draft only the first writing operation must have the parentVersion targeting the basis
730
768
  // followup changes must point the the existing draft created with the first request
731
- var aNewChanges = aDirtyChanges.filter(function (oChange) {
769
+ var aNewChanges = aDirtyChanges.filter(function(oChange) {
732
770
  return oChange.getState() === States.LifecycleState.NEW;
733
771
  });
734
772
  oFirstNewChange = [].concat(aNewChanges).shift();
@@ -736,8 +774,8 @@ sap.ui.define([
736
774
 
737
775
  return aDirtyChanges.reduce(function(oPreviousPromise, oDirtyChange) {
738
776
  return oPreviousPromise
739
- .then(performSingleSaveAction.bind(undefined, oDirtyChange, oFirstNewChange, sParentVersion))
740
- .then(this._updateCacheAndDirtyState.bind(this, oDirtyChange, bSkipUpdateCache));
777
+ .then(performSingleSaveAction.bind(undefined, oDirtyChange, oFirstNewChange, sParentVersion))
778
+ .then(this._updateCacheAndDirtyState.bind(this, oDirtyChange, bSkipUpdateCache));
741
779
  }.bind(this), Promise.resolve());
742
780
  };
743
781
 
@@ -779,14 +817,12 @@ sap.ui.define([
779
817
  if (!bSkipUpdateCache) {
780
818
  switch (oDirtyChange.getState()) {
781
819
  case States.LifecycleState.NEW:
782
- oDirtyChange.setState(States.LifecycleState.PERSISTED);
783
820
  Cache.addChange(this._mComponent, oDirtyChange.convertToFileContent());
784
821
  break;
785
822
  case States.LifecycleState.DELETED:
786
823
  Cache.deleteChange(this._mComponent, oDirtyChange.convertToFileContent());
787
824
  break;
788
825
  case States.LifecycleState.DIRTY:
789
- oDirtyChange.setState(States.LifecycleState.PERSISTED);
790
826
  Cache.updateChange(this._mComponent, oDirtyChange.convertToFileContent());
791
827
  break;
792
828
  default:
@@ -857,8 +893,9 @@ sap.ui.define([
857
893
  *
858
894
  * @param {sap.ui.fl.apply._internal.flexObjects.FlexObject} oChange the change to be deleted
859
895
  * @param {boolean} [bRunTimeCreatedChange] set if the change was created at runtime
896
+ * @param {boolean} [bSkipRemoveFromFlexState] set if the change should not be removed from the FlexState
860
897
  */
861
- ChangePersistence.prototype.deleteChange = function(oChange, bRunTimeCreatedChange) {
898
+ ChangePersistence.prototype.deleteChange = function(oChange, bRunTimeCreatedChange, bSkipRemoveFromFlexState) {
862
899
  var nIndexInDirtyChanges = this._aDirtyChanges.indexOf(oChange);
863
900
 
864
901
  if (nIndexInDirtyChanges > -1) {
@@ -866,7 +903,9 @@ sap.ui.define([
866
903
  return;
867
904
  }
868
905
  this._aDirtyChanges.splice(nIndexInDirtyChanges, 1);
869
- FlexState.removeDirtyFlexObject(this._mComponent.name, oChange);
906
+ if (!bSkipRemoveFromFlexState) {
907
+ FlexState.removeDirtyFlexObject(this._mComponent.name, oChange);
908
+ }
870
909
  this._deleteChangeInMap(oChange, bRunTimeCreatedChange);
871
910
  return;
872
911
  }
@@ -876,6 +915,22 @@ sap.ui.define([
876
915
  this._deleteChangeInMap(oChange, bRunTimeCreatedChange);
877
916
  };
878
917
 
918
+ /**
919
+ * Prepares multiple changes to be deleted with the next call to
920
+ * @see {ChangePersistence#saveDirtyChanges};
921
+ *
922
+ * Removal from the FlexState happens in one go to trigger only one invalidation.
923
+ *
924
+ * @param {sap.ui.fl.apply._internal.flexObjects.FlexObject[]} aChanges the changes to be deleted
925
+ * @param {boolean} [bRunTimeCreatedChanges] set if the change was created at runtime
926
+ */
927
+ ChangePersistence.prototype.deleteChanges = function(aChanges, bRunTimeCreatedChanges) {
928
+ aChanges.forEach(function(oChange) {
929
+ this.deleteChange(oChange, bRunTimeCreatedChanges, true);
930
+ }.bind(this));
931
+ FlexState.removeDirtyFlexObjects(this._mComponent.name, aChanges);
932
+ };
933
+
879
934
  ChangePersistence.prototype.removeChange = function(oChange) {
880
935
  var nIndexInDirtyChanges = this._aDirtyChanges.indexOf(oChange);
881
936
 
@@ -935,7 +990,7 @@ sap.ui.define([
935
990
 
936
991
  return Storage.publish({
937
992
  transportDialogSettings: {
938
- rootControl: oRootControl, //TODO not used value, should be removed.
993
+ rootControl: oRootControl, // TODO not used value, should be removed.
939
994
  styleClass: sStyleClass
940
995
  },
941
996
  layer: sLayer,
@@ -974,7 +1029,7 @@ sap.ui.define([
974
1029
  var aLayers = [].concat(vLayer || []);
975
1030
  var aDirtyChanges = this._aDirtyChanges;
976
1031
 
977
- var aChangesToBeRemoved = aDirtyChanges.filter(function (oChange) {
1032
+ var aChangesToBeRemoved = aDirtyChanges.filter(function(oChange) {
978
1033
  var bChangeValid = true;
979
1034
 
980
1035
  if (aLayers.length && !aLayers.includes(oChange.getLayer())) {
@@ -997,11 +1052,11 @@ sap.ui.define([
997
1052
  return bChangeValid;
998
1053
  });
999
1054
 
1000
- aChangesToBeRemoved.forEach(function (oChange) {
1055
+ FlexState.removeDirtyFlexObjects(this._mComponent.name, aChangesToBeRemoved);
1056
+ aChangesToBeRemoved.forEach(function(oChange) {
1001
1057
  var nIndex = aDirtyChanges.indexOf(oChange);
1002
1058
  aDirtyChanges.splice(nIndex, 1);
1003
- FlexState.removeDirtyFlexObject(this._mComponent.name, oChange);
1004
- }.bind(this));
1059
+ });
1005
1060
 
1006
1061
  return Promise.resolve(aChangesToBeRemoved);
1007
1062
  };
@@ -1023,7 +1078,7 @@ sap.ui.define([
1023
1078
  var bSelectorIdsProvided = aSelectorIds && aSelectorIds.length > 0;
1024
1079
  var bChangeTypesProvided = aChangeTypes && aChangeTypes.length > 0;
1025
1080
 
1026
- //In case of application reset and PUBLIC layer available, also includes comp variant entities
1081
+ // In case of application reset and PUBLIC layer available, also includes comp variant entities
1027
1082
  var isPublicLayerAvailable = Settings.getInstanceOrUndef() && Settings.getInstanceOrUndef().isPublicLayerAvailable();
1028
1083
  var isApplicationReset = sGenerator === undefined && aSelectorIds === undefined && aChangeTypes === undefined;
1029
1084
  var aCompVariantsEntries = [];
@@ -1052,11 +1107,11 @@ sap.ui.define([
1052
1107
  }.bind(this))
1053
1108
  .then(function(oResponse) {
1054
1109
  var aChangesToRevert = [];
1055
- //If reset changes for control, returns an array of deleted changes for reverting
1110
+ // If reset changes for control, returns an array of deleted changes for reverting
1056
1111
  if (aSelectorIds || aChangeTypes) {
1057
1112
  var aNames = [];
1058
1113
  if (oResponse && oResponse.response && oResponse.response.length > 0) {
1059
- oResponse.response.forEach(function (oChangeContentId) {
1114
+ oResponse.response.forEach(function(oChangeContentId) {
1060
1115
  aNames.push(oChangeContentId.fileName);
1061
1116
  });
1062
1117
  }
@@ -19,7 +19,7 @@ sap.ui.define([
19
19
  * @alias sap.ui.fl.ChangePersistenceFactory
20
20
  * @experimental Since 1.27.0
21
21
  * @author SAP SE
22
- * @version 1.115.1
22
+ * @version 1.117.0
23
23
  * @private
24
24
  * @ui5-restricted sap.ui.fl
25
25
  */