@openui5/sap.ui.fl 1.115.1 → 1.116.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 (260) 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 +29 -29
  7. package/src/sap/ui/fl/ChangePersistence.js +69 -71
  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 +157 -130
  14. package/src/sap/ui/fl/FlexControllerFactory.js +1 -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 +16 -17
  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 +114 -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 +2 -2
  23. package/src/sap/ui/fl/apply/_internal/changes/Utils.js +2 -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 +15 -15
  31. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/AddNewInbound.js +8 -8
  32. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/ChangeDataSource.js +1 -1
  33. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/ChangeInbound.js +1 -1
  34. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/RemoveAllInboundsExceptOne.js +6 -6
  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 +1 -1
  37. package/src/sap/ui/fl/apply/_internal/changes/descriptor/fiori/SetRegistrationIds.js +1 -2
  38. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ovp/AddNewCard.js +1 -1
  39. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ovp/ChangeCard.js +1 -1
  40. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ovp/DeleteCard.js +1 -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 +4 -6
  43. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddNewModel.js +10 -10
  44. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddNewModelEnhanceWith.js +1 -3
  45. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/SetFlexExtensionPointEnabled.js +1 -2
  46. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/SetMinUI5Version.js +2 -4
  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 +6 -5
  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 +183 -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 +5 -5
  67. package/src/sap/ui/fl/apply/_internal/flexState/ManifestUtils.js +5 -5
  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 +12 -12
  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 +4 -4
  81. package/src/sap/ui/fl/apply/api/ControlVariantApplyAPI.js +5 -5
  82. package/src/sap/ui/fl/apply/api/DelegateMediatorAPI.js +10 -4
  83. package/src/sap/ui/fl/apply/api/FlexRuntimeInfoAPI.js +5 -5
  84. package/src/sap/ui/fl/apply/api/SmartVariantManagementApplyAPI.js +6 -6
  85. package/src/sap/ui/fl/changeHandler/AddIFrame.js +21 -21
  86. package/src/sap/ui/fl/changeHandler/AddXML.js +1 -1
  87. package/src/sap/ui/fl/changeHandler/AddXMLAtExtensionPoint.js +34 -34
  88. package/src/sap/ui/fl/changeHandler/Base.js +7 -7
  89. package/src/sap/ui/fl/changeHandler/BaseAddViaDelegate.js +107 -107
  90. package/src/sap/ui/fl/changeHandler/BaseAddXml.js +45 -45
  91. package/src/sap/ui/fl/changeHandler/BaseRename.js +26 -26
  92. package/src/sap/ui/fl/changeHandler/BaseTreeModifier.js +1 -1
  93. package/src/sap/ui/fl/changeHandler/HideControl.js +15 -16
  94. package/src/sap/ui/fl/changeHandler/MoveControls.js +190 -191
  95. package/src/sap/ui/fl/changeHandler/MoveElements.js +36 -36
  96. package/src/sap/ui/fl/changeHandler/PropertyBindingChange.js +7 -7
  97. package/src/sap/ui/fl/changeHandler/PropertyChange.js +7 -7
  98. package/src/sap/ui/fl/changeHandler/StashControl.js +35 -35
  99. package/src/sap/ui/fl/changeHandler/UnhideControl.js +7 -7
  100. package/src/sap/ui/fl/changeHandler/UnstashControl.js +21 -21
  101. package/src/sap/ui/fl/changeHandler/UpdateIFrame.js +39 -39
  102. package/src/sap/ui/fl/changeHandler/common/ChangeCategories.js +1 -1
  103. package/src/sap/ui/fl/changeHandler/common/createIFrame.js +5 -5
  104. package/src/sap/ui/fl/changeHandler/common/getTargetAggregationIndex.js +5 -5
  105. package/src/sap/ui/fl/descriptorRelated/api/DescriptorChangeFactory.js +12 -12
  106. package/src/sap/ui/fl/descriptorRelated/api/DescriptorInlineChangeFactory.js +7 -9
  107. package/src/sap/ui/fl/descriptorRelated/api/DescriptorVariantFactory.js +1 -1
  108. package/src/sap/ui/fl/descriptorRelated/internal/Utils.js +12 -12
  109. package/src/sap/ui/fl/designtime/util/IFrame.designtime.js +60 -60
  110. package/src/sap/ui/fl/designtime/variants/VariantManagement.designtime.js +2 -5
  111. package/src/sap/ui/fl/initial/_internal/Storage.js +18 -19
  112. package/src/sap/ui/fl/initial/_internal/StorageResultMerger.js +4 -4
  113. package/src/sap/ui/fl/initial/_internal/StorageUtils.js +20 -21
  114. package/src/sap/ui/fl/initial/_internal/changeHandlers/ChangeHandlerRegistration.js +6 -6
  115. package/src/sap/ui/fl/initial/_internal/changeHandlers/ChangeHandlerStorage.js +1 -1
  116. package/src/sap/ui/fl/initial/_internal/connectors/BackendConnector.js +2 -2
  117. package/src/sap/ui/fl/initial/_internal/connectors/KeyUserConnector.js +1 -1
  118. package/src/sap/ui/fl/initial/_internal/connectors/LrepConnector.js +4 -4
  119. package/src/sap/ui/fl/initial/_internal/connectors/StaticFileConnector.js +2 -2
  120. package/src/sap/ui/fl/initial/_internal/connectors/Utils.js +18 -18
  121. package/src/sap/ui/fl/initial/_internal/storageResultDisassemble.js +4 -4
  122. package/src/sap/ui/fl/interfaces/BaseLoadConnector.js +2 -2
  123. package/src/sap/ui/fl/interfaces/Delegate.js +7 -9
  124. package/src/sap/ui/fl/library.js +44 -45
  125. package/src/sap/ui/fl/library.support.js +59 -59
  126. package/src/sap/ui/fl/messagebundle.properties +4 -119
  127. package/src/sap/ui/fl/messagebundle_ar.properties +2 -79
  128. package/src/sap/ui/fl/messagebundle_bg.properties +2 -79
  129. package/src/sap/ui/fl/messagebundle_ca.properties +2 -79
  130. package/src/sap/ui/fl/messagebundle_cs.properties +2 -79
  131. package/src/sap/ui/fl/messagebundle_cy.properties +2 -79
  132. package/src/sap/ui/fl/messagebundle_da.properties +2 -79
  133. package/src/sap/ui/fl/messagebundle_de.properties +2 -79
  134. package/src/sap/ui/fl/messagebundle_el.properties +2 -79
  135. package/src/sap/ui/fl/messagebundle_en.properties +2 -79
  136. package/src/sap/ui/fl/messagebundle_en_GB.properties +2 -79
  137. package/src/sap/ui/fl/messagebundle_en_US_sappsd.properties +2 -79
  138. package/src/sap/ui/fl/messagebundle_en_US_saprigi.properties +2 -79
  139. package/src/sap/ui/fl/messagebundle_en_US_saptrc.properties +2 -79
  140. package/src/sap/ui/fl/messagebundle_es.properties +2 -79
  141. package/src/sap/ui/fl/messagebundle_es_MX.properties +2 -79
  142. package/src/sap/ui/fl/messagebundle_et.properties +2 -79
  143. package/src/sap/ui/fl/messagebundle_fi.properties +2 -79
  144. package/src/sap/ui/fl/messagebundle_fr.properties +2 -79
  145. package/src/sap/ui/fl/messagebundle_fr_CA.properties +2 -79
  146. package/src/sap/ui/fl/messagebundle_hi.properties +2 -79
  147. package/src/sap/ui/fl/messagebundle_hr.properties +2 -79
  148. package/src/sap/ui/fl/messagebundle_hu.properties +2 -79
  149. package/src/sap/ui/fl/messagebundle_id.properties +2 -79
  150. package/src/sap/ui/fl/messagebundle_it.properties +2 -79
  151. package/src/sap/ui/fl/messagebundle_iw.properties +2 -79
  152. package/src/sap/ui/fl/messagebundle_ja.properties +2 -79
  153. package/src/sap/ui/fl/messagebundle_kk.properties +2 -79
  154. package/src/sap/ui/fl/messagebundle_ko.properties +2 -79
  155. package/src/sap/ui/fl/messagebundle_lt.properties +2 -79
  156. package/src/sap/ui/fl/messagebundle_lv.properties +2 -79
  157. package/src/sap/ui/fl/messagebundle_ms.properties +2 -79
  158. package/src/sap/ui/fl/messagebundle_nl.properties +2 -79
  159. package/src/sap/ui/fl/messagebundle_no.properties +2 -79
  160. package/src/sap/ui/fl/messagebundle_pl.properties +2 -79
  161. package/src/sap/ui/fl/messagebundle_pt.properties +2 -79
  162. package/src/sap/ui/fl/messagebundle_pt_PT.properties +2 -79
  163. package/src/sap/ui/fl/messagebundle_ro.properties +2 -79
  164. package/src/sap/ui/fl/messagebundle_ru.properties +2 -79
  165. package/src/sap/ui/fl/messagebundle_sh.properties +2 -79
  166. package/src/sap/ui/fl/messagebundle_sk.properties +2 -79
  167. package/src/sap/ui/fl/messagebundle_sl.properties +2 -79
  168. package/src/sap/ui/fl/messagebundle_sv.properties +2 -79
  169. package/src/sap/ui/fl/messagebundle_th.properties +2 -79
  170. package/src/sap/ui/fl/messagebundle_tr.properties +2 -79
  171. package/src/sap/ui/fl/messagebundle_uk.properties +3 -80
  172. package/src/sap/ui/fl/messagebundle_vi.properties +2 -79
  173. package/src/sap/ui/fl/messagebundle_zh_CN.properties +2 -79
  174. package/src/sap/ui/fl/messagebundle_zh_TW.properties +2 -79
  175. package/src/sap/ui/fl/registry/Settings.js +41 -43
  176. package/src/sap/ui/fl/requireAsync.js +7 -1
  177. package/src/sap/ui/fl/support/_internal/extractChangeDependencies.js +8 -8
  178. package/src/sap/ui/fl/support/_internal/getChangeDependencies.js +22 -22
  179. package/src/sap/ui/fl/support/_internal/getFlexSettings.js +3 -3
  180. package/src/sap/ui/fl/support/api/SupportAPI.js +1 -1
  181. package/src/sap/ui/fl/support/apps/contentbrowser/Component.js +3 -5
  182. package/src/sap/ui/fl/support/apps/contentbrowser/controller/ContentDetails.controller.js +27 -27
  183. package/src/sap/ui/fl/support/apps/contentbrowser/controller/ContentDetailsEdit.controller.js +20 -20
  184. package/src/sap/ui/fl/support/apps/contentbrowser/controller/LayerContentMaster.controller.js +17 -17
  185. package/src/sap/ui/fl/support/apps/contentbrowser/controller/Layers.controller.js +4 -4
  186. package/src/sap/ui/fl/support/apps/contentbrowser/lrepConnector/LRepConnector.js +34 -34
  187. package/src/sap/ui/fl/support/apps/contentbrowser/utils/DataUtils.js +10 -10
  188. package/src/sap/ui/fl/support/apps/contentbrowser/utils/ErrorUtils.js +5 -5
  189. package/src/sap/ui/fl/transport/TransportSelection.js +1 -1
  190. package/src/sap/ui/fl/util/DescriptorChangeCheck.js +2 -2
  191. package/src/sap/ui/fl/util/IFrame.js +18 -18
  192. package/src/sap/ui/fl/util/IFrameRenderer.js +1 -1
  193. package/src/sap/ui/fl/util/ManagedObjectModel.js +7 -7
  194. package/src/sap/ui/fl/util/changePropertyValueByPath.js +2 -2
  195. package/src/sap/ui/fl/util/getContainerUserInfo.js +25 -25
  196. package/src/sap/ui/fl/util/resolveBinding.js +3 -3
  197. package/src/sap/ui/fl/variants/VariantManagement.js +8 -32
  198. package/src/sap/ui/fl/variants/VariantModel.js +182 -124
  199. package/src/sap/ui/fl/variants/context/Component.js +1 -2
  200. package/src/sap/ui/fl/variants/context/controller/ContextVisibility.controller.js +2 -5
  201. package/src/sap/ui/fl/write/_internal/SaveAs.js +143 -143
  202. package/src/sap/ui/fl/write/_internal/Storage.js +46 -49
  203. package/src/sap/ui/fl/write/_internal/StorageFeaturesMerger.js +4 -4
  204. package/src/sap/ui/fl/write/_internal/Versions.js +104 -94
  205. package/src/sap/ui/fl/write/_internal/appVariant/AppVariant.js +9 -9
  206. package/src/sap/ui/fl/write/_internal/appVariant/AppVariantFactory.js +7 -7
  207. package/src/sap/ui/fl/write/_internal/appVariant/AppVariantInlineChange.js +2 -2
  208. package/src/sap/ui/fl/write/_internal/appVariant/AppVariantInlineChangeFactory.js +3 -5
  209. package/src/sap/ui/fl/write/_internal/condenser/Condenser.js +15 -10
  210. package/src/sap/ui/fl/write/_internal/condenser/UIReconstruction.js +1 -1
  211. package/src/sap/ui/fl/write/_internal/condenser/classifications/Create.js +1 -1
  212. package/src/sap/ui/fl/write/_internal/condenser/classifications/Destroy.js +1 -1
  213. package/src/sap/ui/fl/write/_internal/condenser/classifications/Move.js +1 -1
  214. package/src/sap/ui/fl/write/_internal/connectors/BackendConnector.js +10 -10
  215. package/src/sap/ui/fl/write/_internal/connectors/KeyUserConnector.js +23 -24
  216. package/src/sap/ui/fl/write/_internal/connectors/LrepConnector.js +60 -61
  217. package/src/sap/ui/fl/write/_internal/connectors/NeoLrepConnector.js +4 -4
  218. package/src/sap/ui/fl/write/_internal/connectors/ObjectPathConnector.js +6 -6
  219. package/src/sap/ui/fl/write/_internal/connectors/PersonalizationConnector.js +2 -2
  220. package/src/sap/ui/fl/write/_internal/connectors/Utils.js +14 -14
  221. package/src/sap/ui/fl/write/_internal/extensionPoint/Processor.js +3 -3
  222. package/src/sap/ui/fl/write/_internal/extensionPoint/Registry.js +15 -7
  223. package/src/sap/ui/fl/write/_internal/fieldExtensibility/ABAPAccess.js +2 -2
  224. package/src/sap/ui/fl/write/_internal/fieldExtensibility/ABAPExtensibilityVariant.js +1 -1
  225. package/src/sap/ui/fl/write/_internal/fieldExtensibility/ABAPExtensibilityVariantFactory.js +1 -1
  226. package/src/sap/ui/fl/write/_internal/fieldExtensibility/MultiTenantABAPExtensibilityVariant.js +2 -2
  227. package/src/sap/ui/fl/write/_internal/fieldExtensibility/ServiceValidation.js +1 -3
  228. package/src/sap/ui/fl/write/_internal/fieldExtensibility/SingleTenantABAPExtensibilityVariant.js +2 -2
  229. package/src/sap/ui/fl/write/_internal/fieldExtensibility/UriParser.js +1 -1
  230. package/src/sap/ui/fl/write/_internal/fieldExtensibility/Utils.js +3 -3
  231. package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/CAPAccess.js +1 -1
  232. package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/dialog/CustomFieldCAPDialog.js +2 -2
  233. package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/getEditorConfig.js +2 -2
  234. package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/booleanEditor/BooleanEditor.js +2 -2
  235. package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/rangeEditor/RangeEditor.js +3 -3
  236. package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/timeEditor/TimeEditor.js +4 -4
  237. package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/validators/IsRequired.js +2 -2
  238. package/src/sap/ui/fl/write/_internal/flexState/FlexObjectState.js +26 -26
  239. package/src/sap/ui/fl/write/_internal/flexState/compVariants/CompVariantState.js +78 -57
  240. package/src/sap/ui/fl/write/_internal/transport/TransportDialog.js +12 -13
  241. package/src/sap/ui/fl/write/_internal/transport/TransportSelection.js +12 -12
  242. package/src/sap/ui/fl/write/_internal/transport/Transports.js +7 -7
  243. package/src/sap/ui/fl/write/api/AppVariantWriteAPI.js +7 -7
  244. package/src/sap/ui/fl/write/api/ChangesWriteAPI.js +9 -9
  245. package/src/sap/ui/fl/write/api/ContextBasedAdaptationsAPI.js +546 -110
  246. package/src/sap/ui/fl/write/api/ControlPersonalizationWriteAPI.js +109 -67
  247. package/src/sap/ui/fl/write/api/ExtensionPointRegistryAPI.js +3 -3
  248. package/src/sap/ui/fl/write/api/FeaturesAPI.js +19 -20
  249. package/src/sap/ui/fl/write/api/FieldExtensibility.js +1 -1
  250. package/src/sap/ui/fl/write/api/LocalResetAPI.js +19 -19
  251. package/src/sap/ui/fl/write/api/PersistenceWriteAPI.js +59 -54
  252. package/src/sap/ui/fl/write/api/ReloadInfoAPI.js +8 -8
  253. package/src/sap/ui/fl/write/api/SmartBusinessWriteAPI.js +6 -6
  254. package/src/sap/ui/fl/write/api/SmartVariantManagementWriteAPI.js +14 -13
  255. package/src/sap/ui/fl/write/api/TranslationAPI.js +13 -13
  256. package/src/sap/ui/fl/write/api/UI2PersonalizationWriteAPI.js +1 -1
  257. package/src/sap/ui/fl/write/api/VersionsAPI.js +14 -14
  258. package/src/sap/ui/fl/write/api/connectors/FileListBaseConnector.js +1 -1
  259. package/src/sap/ui/fl/write/api/connectors/ObjectStorageConnector.js +7 -7
  260. package/src/sap/ui/fl/write/connectors/BaseConnector.js +17 -17
@@ -100,16 +100,6 @@ sap.ui.define([
100
100
  group: "Misc",
101
101
  defaultValue: true
102
102
  },
103
- /**
104
- * If set to <code>true</code>, the key for a vendor variant will be added manually.<br>
105
- * <p>
106
- * <b>Note:</b> This flag is only used internally.
107
- */
108
- manualVariantKey: {
109
- type: "boolean",
110
- group: "Misc",
111
- defaultValue: false
112
- },
113
103
 
114
104
  /**
115
105
  * Indicates that the control is in error state. If set to <code>true</code>, an error message will be displayed whenever the variant is opened.
@@ -218,7 +208,7 @@ sap.ui.define([
218
208
  /**
219
209
  * Indicates the check box state for 'Public'.
220
210
  */
221
- 'public': {
211
+ "public": {
222
212
  type: "boolean"
223
213
  },
224
214
 
@@ -370,7 +360,7 @@ sap.ui.define([
370
360
  };
371
361
  };
372
362
 
373
- /// <EVENT FORWARDING>
363
+ // / <EVENT FORWARDING>
374
364
  VariantManagement.prototype.attachCancel = function(mProps, fnCallback, oObj) {
375
365
  this.attachEvent("cancel", mProps, fnCallback, oObj);
376
366
  return this;
@@ -557,7 +547,6 @@ sap.ui.define([
557
547
  }
558
548
  };
559
549
 
560
-
561
550
  VariantManagement.prototype._fireManage = function(oEvent) {
562
551
  this._handleAllListeners(oEvent, this._aManageEventHandlers);
563
552
  };
@@ -594,10 +583,9 @@ sap.ui.define([
594
583
 
595
584
  return this;
596
585
  };
597
- /// </EVENT FORWARDING>
598
-
586
+ // / </EVENT FORWARDING>
599
587
 
600
- ///<OVERWRITES>
588
+ // /<OVERWRITES>
601
589
 
602
590
  VariantManagement.prototype._createSaveAsDialog = function() {
603
591
  this._oVM._createSaveAsDialog();
@@ -673,12 +661,11 @@ sap.ui.define([
673
661
  };
674
662
 
675
663
  VariantManagement.prototype.setShowExecuteOnSelection = function(bValue) {
676
- //this.setProperty("showExecuteOnSelection", bValue);
664
+ // this.setProperty("showExecuteOnSelection", bValue);
677
665
  this._oVM.setSupportApplyAutomatically(bValue);
678
666
  return this;
679
667
  };
680
668
 
681
-
682
669
  VariantManagement.prototype.setShowSetAsDefault = function(bValue) {
683
670
  this.setProperty("showSetAsDefault", bValue);
684
671
  this._oVM.setSupportDefault(bValue);
@@ -697,12 +684,6 @@ sap.ui.define([
697
684
  return this;
698
685
  };
699
686
 
700
- VariantManagement.prototype.setManualVariantKey = function(bValue) {
701
- this.setProperty("manualVariantKey", bValue);
702
- this._oVM._setShowManualVariantKey(bValue);
703
- return this;
704
- };
705
-
706
687
  VariantManagement.prototype.setInErrorState = function(bValue) {
707
688
  this.setProperty("inErrorState", bValue);
708
689
  this._oVM.setInErrorState(bValue);
@@ -713,7 +694,6 @@ sap.ui.define([
713
694
  this._oVM.openManagementDialog(bCreateAlways, sClass, oRolesComponentContainer);
714
695
  };
715
696
 
716
-
717
697
  VariantManagement.prototype.openSaveAsDialogForKeyUser = function(sClass, oRolesComponentContainer) {
718
698
  this._oVM.openSaveAsDialog(sClass, oRolesComponentContainer);
719
699
  };
@@ -782,14 +762,14 @@ sap.ui.define([
782
762
  VariantManagement.prototype.getStandardVariantKey = function() {
783
763
  return this._oVM.getStandardVariantKey();
784
764
  };
785
- /// </OVERWRITES>
765
+ // / </OVERWRITES>
786
766
 
787
767
  VariantManagement.prototype._getEmbeddedVM = function() {
788
768
  return this._oVM;
789
769
  };
790
770
 
791
771
  VariantManagement.prototype._updateWithSettingsInfo = function() {
792
- flSettings.getInstance().then(function (oSettings) {
772
+ flSettings.getInstance().then(function(oSettings) {
793
773
  if (this._oVM) {
794
774
  this._oVM.setShowSaveAs(oSettings.isVariantPersonalizationEnabled());
795
775
  this._oVM.setSupportPublic(oSettings.isPublicFlVariantEnabled());
@@ -816,7 +796,6 @@ sap.ui.define([
816
796
  return this;
817
797
  };
818
798
 
819
-
820
799
  /**
821
800
  * Reinitializes the inner model registration. This is necessary when using a session dependent <code>VariantManagement</code>
822
801
  * control that may be used across the lifecycle of more than one application.
@@ -860,7 +839,6 @@ sap.ui.define([
860
839
 
861
840
  this._oVM.setSupportDefault(true);
862
841
 
863
-
864
842
  this._createItemsModel(sModelName);
865
843
 
866
844
  this._oVM.bindProperty("selectedKey", {
@@ -918,7 +896,6 @@ sap.ui.define([
918
896
  originalContexts: "{" + sModelName + ">originalContexts}"
919
897
  });
920
898
 
921
-
922
899
  this._oVM.bindAggregation("items", {
923
900
  path: this.oContext + "/variants",
924
901
  model: sModelName,
@@ -1011,7 +988,6 @@ sap.ui.define([
1011
988
  return bExecuteOnSelection;
1012
989
  };
1013
990
 
1014
-
1015
991
  // exit destroy all controls created in init
1016
992
  VariantManagement.prototype.exit = function() {
1017
993
  this._oVM.detachManage(this._fireManage, this);
@@ -1053,7 +1029,7 @@ sap.ui.define([
1053
1029
  * @private
1054
1030
  * @ui5-restricted sap.m.OverflowToolBar, sap.m.Toolbar
1055
1031
  */
1056
- VariantManagement.prototype._getToolbarInteractive = function () {
1032
+ VariantManagement.prototype._getToolbarInteractive = function() {
1057
1033
  return true;
1058
1034
  };
1059
1035
 
@@ -135,21 +135,21 @@ sap.ui.define([
135
135
  aVariantDirtyChanges = aVariantDirtyChanges.reverse();
136
136
 
137
137
  return Promise.resolve()
138
- .then(function() {
139
- if (mPropertyBag.revert) {
140
- return Reverter.revertMultipleChanges(aVariantDirtyChanges, {
141
- appComponent: mPropertyBag.model.oAppComponent,
142
- modifier: JsControlTreeModifier,
143
- flexController: mPropertyBag.model.oFlexController
144
- });
145
- }
146
- return undefined;
147
- })
148
- .then(function() {
149
- aVariantDirtyChanges.forEach(function(oChange) {
150
- mPropertyBag.model.oFlexController.deleteChange(oChange);
138
+ .then(function() {
139
+ if (mPropertyBag.revert) {
140
+ return Reverter.revertMultipleChanges(aVariantDirtyChanges, {
141
+ appComponent: mPropertyBag.model.oAppComponent,
142
+ modifier: JsControlTreeModifier,
143
+ flexController: mPropertyBag.model.oFlexController
151
144
  });
145
+ }
146
+ return undefined;
147
+ })
148
+ .then(function() {
149
+ aVariantDirtyChanges.forEach(function(oChange) {
150
+ mPropertyBag.model.oFlexController.deleteChange(oChange);
152
151
  });
152
+ });
153
153
  }
154
154
 
155
155
  /**
@@ -164,8 +164,8 @@ sap.ui.define([
164
164
  function executeAfterSwitch(fnCallback, oModel) {
165
165
  // if there are multiple switches triggered very quickly this makes sure that they are being executed one after another
166
166
  oModel._oVariantSwitchPromise = oModel._oVariantSwitchPromise
167
- .catch(function() {})
168
- .then(fnCallback);
167
+ .catch(function() {})
168
+ .then(fnCallback);
169
169
  oModel.oFlexController.setVariantSwitchPromise(oModel._oVariantSwitchPromise);
170
170
  return oModel._oVariantSwitchPromise;
171
171
  }
@@ -182,19 +182,19 @@ sap.ui.define([
182
182
 
183
183
  function switchVariantAndUpdateModel(mPropertyBag, sScenario) {
184
184
  return Switcher.switchVariant(mPropertyBag)
185
- .then(function() {
186
- // update current variant in model
187
- if (this.oData[mPropertyBag.vmReference].updateVariantInURL) {
188
- URLHandler.updateVariantInURL({
189
- vmReference: mPropertyBag.vmReference,
190
- newVReference: mPropertyBag.newVReference,
191
- model: this
192
- });
193
- }
185
+ .then(function() {
186
+ // update current variant in model
187
+ if (this.oData[mPropertyBag.vmReference].updateVariantInURL) {
188
+ URLHandler.updateVariantInURL({
189
+ vmReference: mPropertyBag.vmReference,
190
+ newVReference: mPropertyBag.newVReference,
191
+ model: this
192
+ });
193
+ }
194
194
 
195
- // tell listeners that variant switch has happened
196
- this.callVariantSwitchListeners(mPropertyBag.vmReference, mPropertyBag.newVReference, undefined, sScenario);
197
- }.bind(this));
195
+ // tell listeners that variant switch has happened
196
+ this.callVariantSwitchListeners(mPropertyBag.vmReference, mPropertyBag.newVReference, undefined, sScenario);
197
+ }.bind(this));
198
198
  }
199
199
 
200
200
  function updatePersonalVariantPropertiesWithFlpSettings(oVariant) {
@@ -230,7 +230,7 @@ sap.ui.define([
230
230
  resolve();
231
231
  } else {
232
232
  oControl.addEventDelegate({
233
- onAfterRendering: function () {
233
+ onAfterRendering: function() {
234
234
  resolve();
235
235
  }
236
236
  });
@@ -248,15 +248,15 @@ sap.ui.define([
248
248
  Utils.getUShellService("ShellNavigation")
249
249
  ];
250
250
  return Promise.all(aServicePromises)
251
- .then(function(aServices) {
252
- setUShellService("UserInfo", aServices[0]);
253
- setUShellService("URLParsing", aServices[1]);
254
- setUShellService("CrossApplicationNavigation", aServices[2]);
255
- setUShellService("ShellNavigation", aServices[3]);
256
- })
257
- .catch(function(vError) {
258
- throw new Error("Error getting service from Unified Shell: " + vError);
259
- });
251
+ .then(function(aServices) {
252
+ setUShellService("UserInfo", aServices[0]);
253
+ setUShellService("URLParsing", aServices[1]);
254
+ setUShellService("CrossApplicationNavigation", aServices[2]);
255
+ setUShellService("ShellNavigation", aServices[3]);
256
+ })
257
+ .catch(function(vError) {
258
+ throw new Error("Error getting service from Unified Shell: " + vError);
259
+ });
260
260
  }
261
261
  }
262
262
 
@@ -280,7 +280,7 @@ sap.ui.define([
280
280
  * @class Variant model implementation for JSON format.
281
281
  * @extends sap.ui.model.json.JSONModel
282
282
  * @author SAP SE
283
- * @version 1.115.1
283
+ * @version 1.116.0
284
284
  * @param {object} oData - Either the URL where to load the JSON from or a JS object
285
285
  * @param {object} mPropertyBag - Map of properties required for the constructor
286
286
  * @param {sap.ui.fl.FlexController} mPropertyBag.flexController - <code>FlexController</code> instance for the component which uses the variant model
@@ -334,9 +334,9 @@ sap.ui.define([
334
334
  }
335
335
  oCurrentData[sVariantManagementKey].variants = oVariantMapEntry.variants.map(function(oVariant) {
336
336
  var oCurrentVariantData = (oCurrentData[sVariantManagementKey].variants || [])
337
- .find(function(oVariantToCheck) {
338
- return oVariantToCheck.key === oVariant.key;
339
- });
337
+ .find(function(oVariantToCheck) {
338
+ return oVariantToCheck.key === oVariant.key;
339
+ });
340
340
  setOriginalVariantProperties(oVariant);
341
341
  return Object.assign(
342
342
  {},
@@ -363,10 +363,10 @@ sap.ui.define([
363
363
  */
364
364
  VariantModel.prototype.initialize = function() {
365
365
  return Promise.all([Settings.getInstance(), initUshellServices()])
366
- .then(function() {
367
- //initialize hash data - variants map & model should exist at this point (set on constructor)
368
- URLHandler.initialize({ model: this });
369
- }.bind(this));
366
+ .then(function() {
367
+ // initialize hash data - variants map & model should exist at this point (set on constructor)
368
+ URLHandler.initialize({ model: this });
369
+ }.bind(this));
370
370
  };
371
371
 
372
372
  /**
@@ -550,7 +550,7 @@ sap.ui.define([
550
550
  * @param {string} sVariantReference - Variant reference to remove dirty changes from
551
551
  * @returns {Promise} Promise resolving to dirty changes which will be removed
552
552
  */
553
- VariantModel.prototype.eraseDirtyChangesOnVariant = function (sVariantManagementReference, sVariantReference) {
553
+ VariantModel.prototype.eraseDirtyChangesOnVariant = function(sVariantManagementReference, sVariantReference) {
554
554
  var aSourceVariantChanges = VariantManagementState.getControlChangesForVariant({
555
555
  reference: this.sFlexReference,
556
556
  vmReference: sVariantManagementReference,
@@ -606,7 +606,8 @@ sap.ui.define([
606
606
  adaptationId: mPropertyBag.adaptationId,
607
607
  reference: oSourceVariant.getFlexObjectMetadata().reference,
608
608
  generator: mPropertyBag.generator,
609
- variantManagementReference: mPropertyBag.variantManagementReference
609
+ variantManagementReference: mPropertyBag.variantManagementReference,
610
+ user: mPropertyBag.layer === Layer.VENDOR ? "SAP" : Settings.getInstanceOrUndef().getUserId()
610
611
  };
611
612
  if (mPropertyBag.currentVariantComparison === 1) {
612
613
  // in case a user variant should be saved as a PUBLIC variant, but refers to a PUBLIC variant,
@@ -635,9 +636,9 @@ sap.ui.define([
635
636
  vReference: sSourceVariantReference,
636
637
  reference: this.sFlexReference
637
638
  })
638
- .map(function(oVariantChange) {
639
- return oVariantChange.convertToFileContent();
640
- });
639
+ .map(function(oVariantChange) {
640
+ return oVariantChange.convertToFileContent();
641
+ });
641
642
 
642
643
  mPropertyBag.currentVariantComparison = LayerUtils.compareAgainstCurrentLayer(oSourceVariant.instance.getLayer(), mPropertyBag.layer);
643
644
  if (mPropertyBag.currentVariantComparison === 1) {
@@ -702,10 +703,6 @@ sap.ui.define([
702
703
  VariantModel.prototype.copyVariant = function(mPropertyBag) {
703
704
  var oDuplicateVariantData = this._duplicateVariant(mPropertyBag);
704
705
  oDuplicateVariantData.generator = mPropertyBag.generator;
705
- var sAuthor = Settings.getInstanceOrUndef().getUserId() ? Settings.getInstanceOrUndef().getUserId() : undefined;
706
- if (mPropertyBag.layer === Layer.VENDOR) {
707
- sAuthor = "SAP";
708
- }
709
706
 
710
707
  this.oData[mPropertyBag.variantManagementReference].variants.push({
711
708
  key: oDuplicateVariantData.instance.getId(),
@@ -714,8 +711,7 @@ sap.ui.define([
714
711
  remove: true,
715
712
  sharing: mPropertyBag.layer === Layer.USER
716
713
  ? this.sharing.PRIVATE
717
- : this.sharing.PUBLIC,
718
- author: sAuthor
714
+ : this.sharing.PUBLIC
719
715
  });
720
716
 
721
717
  var aChanges = [];
@@ -866,29 +862,34 @@ sap.ui.define([
866
862
  };
867
863
 
868
864
  /**
869
- * Sets the variant properties and adds a variant change
865
+ * Sets the variant properties and creates a variant change
870
866
  * @param {string} sVariantManagementReference - Variant management reference
871
867
  * @param {object} mPropertyBag - Map of properties
868
+ * @param {string} [mPropertyBag.adaptationId] - Adaptation ID to set which overrules the currently display adaptation
872
869
  * @returns {sap.ui.fl.apply._internal.flexObjects.FlexObject} Created Change object
873
870
  */
874
- VariantModel.prototype.addVariantChange = function(sVariantManagementReference, mPropertyBag) {
871
+ VariantModel.prototype.createVariantChange = function(sVariantManagementReference, mPropertyBag) {
875
872
  var mAdditionalChangeContent = this.setVariantProperties(sVariantManagementReference, mPropertyBag);
876
873
 
877
874
  var mNewChangeData = {};
878
875
 
879
- //create new change object
876
+ // create new change object
880
877
  mNewChangeData.changeType = mPropertyBag.changeType;
881
878
  mNewChangeData.layer = mPropertyBag.layer;
882
879
  mNewChangeData.generator = mPropertyBag.generator;
883
880
 
884
- //add adaptationId
885
- var mContextBasedAdaptationBag = {
886
- layer: mPropertyBag.layer,
887
- control: mPropertyBag.appComponent,
888
- reference: this.sFlexReference
889
- };
890
- if (ContextBasedAdaptationsAPI.hasAdaptationsModel(mContextBasedAdaptationBag)) {
891
- mNewChangeData.adaptationId = ContextBasedAdaptationsAPI.getDisplayedAdaptationId(mContextBasedAdaptationBag);
881
+ // add adaptationId
882
+ if (mPropertyBag.adaptationId !== undefined) {
883
+ mNewChangeData.adaptationId = mPropertyBag.adaptationId;
884
+ } else {
885
+ var mContextBasedAdaptationBag = {
886
+ layer: mPropertyBag.layer,
887
+ control: mPropertyBag.appComponent,
888
+ reference: this.sFlexReference
889
+ };
890
+ if (ContextBasedAdaptationsAPI.hasAdaptationsModel(mContextBasedAdaptationBag)) {
891
+ mNewChangeData.adaptationId = ContextBasedAdaptationsAPI.getDisplayedAdaptationId(mContextBasedAdaptationBag);
892
+ }
892
893
  }
893
894
 
894
895
  if (mPropertyBag.changeType === "setDefault") {
@@ -900,11 +901,24 @@ sap.ui.define([
900
901
  }
901
902
 
902
903
  var oChange = this.oFlexController.createBaseChange(mNewChangeData, mPropertyBag.appComponent);
903
- //update change with additional content
904
+ // update change with additional content
904
905
  oChange.setContent(mAdditionalChangeContent);
905
906
  if (mPropertyBag.changeType === "setTitle") {
906
907
  oChange.setText("title", mPropertyBag.title, "XFLD");
907
908
  }
909
+
910
+ return oChange;
911
+ };
912
+
913
+ /**
914
+ * Sets the variant properties and adds a variant change
915
+ * @param {string} sVariantManagementReference - Variant management reference
916
+ * @param {object} mPropertyBag - Map of properties
917
+ * @param {string} [mPropertyBag.adaptationId] - Adaptation ID to set which overrules the currently display adaptation
918
+ * @returns {sap.ui.fl.apply._internal.flexObjects.FlexObject} Created Change object
919
+ */
920
+ VariantModel.prototype.addVariantChange = function(sVariantManagementReference, mPropertyBag) {
921
+ var oChange = this.createVariantChange(sVariantManagementReference, mPropertyBag);
908
922
  this.oChangePersistence.addDirtyChange(oChange);
909
923
 
910
924
  return oChange;
@@ -971,7 +985,7 @@ sap.ui.define([
971
985
  break;
972
986
  case "setDefault":
973
987
  mAdditionalChangeContent.defaultVariant = mPropertyBag.defaultVariant;
974
- //Update hash data
988
+ // Update hash data
975
989
  var aHashParameters = URLHandler.getStoredHashParams({model: this});
976
990
  if (aHashParameters) {
977
991
  if (
@@ -1023,7 +1037,7 @@ sap.ui.define([
1023
1037
  reference: this.sFlexReference
1024
1038
  });
1025
1039
 
1026
- VariantManagementState.addFakeStandardVariant(this.sFlexReference, this.oAppComponent.getId(), sVariantManagementReference, oStandardVariantInstance);
1040
+ VariantManagementState.addRuntimeSteadyObject(this.sFlexReference, this.oAppComponent.getId(), oStandardVariantInstance);
1027
1041
  }
1028
1042
  };
1029
1043
 
@@ -1125,16 +1139,18 @@ sap.ui.define([
1125
1139
  function handleDirtyChanges(oFlexController, aCopiedVariantDirtyChanges, sVariantManagementReference, oAppComponent) {
1126
1140
  if (!this._bDesignTimeMode) {
1127
1141
  return oFlexController.saveSequenceOfDirtyChanges(aCopiedVariantDirtyChanges, oAppComponent)
1128
- .then(function(oResponse) {
1129
- if (oResponse) {
1130
- var oResponseData = oResponse.response[0];
1131
- this.oData[sVariantManagementReference].variants.forEach(function(oVariant) {
1132
- if (oVariant.key === oResponseData.fileName) {
1133
- oVariant.author = oResponseData.support.user;
1134
- }
1135
- });
1136
- }
1137
- }.bind(this));
1142
+ .then(function(oResponse) {
1143
+ // TODO: as soon as the invalidation is done automatically this can be removed
1144
+ this.invalidateMap();
1145
+ if (oResponse) {
1146
+ var oResponseData = oResponse.response[0];
1147
+ this.oData[sVariantManagementReference].variants.forEach(function(oVariant) {
1148
+ if (oVariant.key === oResponseData.fileName) {
1149
+ oVariant.author = oResponseData.support.user;
1150
+ }
1151
+ });
1152
+ }
1153
+ }.bind(this));
1138
1154
  }
1139
1155
  return Promise.resolve();
1140
1156
  }
@@ -1166,7 +1182,15 @@ sap.ui.define([
1166
1182
 
1167
1183
  if (mParameters.overwrite) {
1168
1184
  // handle triggered "Save" button
1169
- return this.oFlexController.saveSequenceOfDirtyChanges(this._getDirtyChangesFromVariantChanges(aSourceVariantChanges), oAppComponent);
1185
+ return this.oFlexController.saveSequenceOfDirtyChanges(
1186
+ this._getDirtyChangesFromVariantChanges(aSourceVariantChanges),
1187
+ oAppComponent
1188
+ )
1189
+ .then(function(oResponse) {
1190
+ // TODO: as soon as the invalidation is done automatically this can be removed
1191
+ this.invalidateMap();
1192
+ return oResponse;
1193
+ }.bind(this));
1170
1194
  }
1171
1195
 
1172
1196
  var sVariantLayer = mParameters.layer || (mParameters.public ? Layer.PUBLIC : Layer.USER);
@@ -1186,45 +1210,45 @@ sap.ui.define([
1186
1210
  };
1187
1211
 
1188
1212
  return this.copyVariant(mPropertyBag)
1189
- .then(function(aCopiedVariantDirtyChanges) {
1190
- if (bSetDefault) {
1191
- var mPropertyBagSetDefault = {
1192
- changeType: "setDefault",
1193
- defaultVariant: sNewVariantReference,
1194
- originalDefaultVariant: this.oData[sVariantManagementReference].defaultVariant,
1195
- appComponent: oAppComponent,
1196
- layer: sVariantChangeLayer,
1197
- variantManagementReference: sVariantManagementReference
1198
- };
1199
- var oSetDefaultChange = this.addVariantChange(sVariantManagementReference, mPropertyBagSetDefault);
1200
- aCopiedVariantDirtyChanges.push(oSetDefaultChange);
1201
- }
1202
- if (bSetExecuteOnSelect) {
1203
- var mPropertyBagSetExecute = {
1204
- changeType: "setExecuteOnSelect",
1205
- executeOnSelect: true,
1206
- variantReference: sNewVariantReference,
1207
- appComponent: oAppComponent,
1208
- layer: sVariantChangeLayer,
1209
- variantManagementReference: sVariantManagementReference
1210
- };
1211
- var oSetExecuteChange = this.addVariantChange(sVariantManagementReference, mPropertyBagSetExecute);
1212
- aCopiedVariantDirtyChanges.push(oSetExecuteChange);
1213
- }
1214
- aNewVariantDirtyChanges = aCopiedVariantDirtyChanges;
1215
- // unsaved changes on the source variant are removed before copied variant changes are saved
1216
- return eraseDirtyChanges({
1217
- changes: aSourceVariantChanges,
1218
- vmReference: sVariantManagementReference,
1219
- vReference: sSourceVariantReference,
1220
- model: this
1221
- })
1222
- .then(handleDirtyChanges.bind(this, this.oFlexController, aCopiedVariantDirtyChanges, sVariantManagementReference, oAppComponent));
1223
- }.bind(this));
1213
+ .then(function(aCopiedVariantDirtyChanges) {
1214
+ if (bSetDefault) {
1215
+ var mPropertyBagSetDefault = {
1216
+ changeType: "setDefault",
1217
+ defaultVariant: sNewVariantReference,
1218
+ originalDefaultVariant: this.oData[sVariantManagementReference].defaultVariant,
1219
+ appComponent: oAppComponent,
1220
+ layer: sVariantChangeLayer,
1221
+ variantManagementReference: sVariantManagementReference
1222
+ };
1223
+ var oSetDefaultChange = this.addVariantChange(sVariantManagementReference, mPropertyBagSetDefault);
1224
+ aCopiedVariantDirtyChanges.push(oSetDefaultChange);
1225
+ }
1226
+ if (bSetExecuteOnSelect) {
1227
+ var mPropertyBagSetExecute = {
1228
+ changeType: "setExecuteOnSelect",
1229
+ executeOnSelect: true,
1230
+ variantReference: sNewVariantReference,
1231
+ appComponent: oAppComponent,
1232
+ layer: sVariantChangeLayer,
1233
+ variantManagementReference: sVariantManagementReference
1234
+ };
1235
+ var oSetExecuteChange = this.addVariantChange(sVariantManagementReference, mPropertyBagSetExecute);
1236
+ aCopiedVariantDirtyChanges.push(oSetExecuteChange);
1237
+ }
1238
+ aNewVariantDirtyChanges = aCopiedVariantDirtyChanges;
1239
+ // unsaved changes on the source variant are removed before copied variant changes are saved
1240
+ return eraseDirtyChanges({
1241
+ changes: aSourceVariantChanges,
1242
+ vmReference: sVariantManagementReference,
1243
+ vReference: sSourceVariantReference,
1244
+ model: this
1245
+ })
1246
+ .then(handleDirtyChanges.bind(this, this.oFlexController, aCopiedVariantDirtyChanges, sVariantManagementReference, oAppComponent));
1247
+ }.bind(this));
1224
1248
  }.bind(this, sVMReference, oAppComponent, mParameters), this)
1225
- .then(function() {
1226
- return aNewVariantDirtyChanges;
1227
- });
1249
+ .then(function() {
1250
+ return aNewVariantDirtyChanges;
1251
+ });
1228
1252
  };
1229
1253
 
1230
1254
  VariantModel.prototype.getLocalId = function(sId, oAppComponent) {
@@ -1259,6 +1283,37 @@ sap.ui.define([
1259
1283
  }.bind(this));
1260
1284
  };
1261
1285
 
1286
+ function resolveTitleBindingsAndCreateVariantChanges(oVariantManagementControl, sVariantManagementReference) {
1287
+ this.oData[sVariantManagementReference].variants.forEach(function(oVariant) {
1288
+ // Find model and key from patterns like {i18n>TextKey} - only resource models are supported
1289
+ var aMatches = oVariant.title && oVariant.title.match(/{(\w+)>(\w+)}/);
1290
+ if (aMatches) {
1291
+ var sModelName = aMatches[1];
1292
+ var sKey = aMatches[2];
1293
+ var oModel = oVariantManagementControl.getModel(sModelName);
1294
+ if (oModel) {
1295
+ var sResolvedTitle = oModel.getResourceBundle().getText(sKey);
1296
+ var mChangeProperties = {
1297
+ variantReference: oVariant.key,
1298
+ changeType: "setTitle",
1299
+ title: sResolvedTitle,
1300
+ layer: oVariant.layer,
1301
+ appComponent: this.oAppComponent
1302
+ };
1303
+ var oVariantChange = this.createVariantChange(sVariantManagementReference, mChangeProperties);
1304
+ // The change cannot be added as a dirty change but must survive a state invalidation
1305
+ VariantManagementState.addRuntimeSteadyObject(this.sFlexReference, this.oAppComponent.getId(), oVariantChange);
1306
+ } else {
1307
+ // Wait for model to be assigned and try again
1308
+ oVariantManagementControl.attachEventOnce(
1309
+ "modelContextChange",
1310
+ resolveTitleBindingsAndCreateVariantChanges.bind(this, oVariantManagementControl, sVariantManagementReference)
1311
+ );
1312
+ }
1313
+ }
1314
+ }.bind(this));
1315
+ }
1316
+
1262
1317
  VariantModel.prototype.registerToModel = function(oVariantManagementControl) {
1263
1318
  var sVariantManagementReference = this.getVariantManagementReferenceForControl(oVariantManagementControl);
1264
1319
 
@@ -1271,6 +1326,9 @@ sap.ui.define([
1271
1326
  // only attachVariantApplied will set this to true
1272
1327
  this.oData[sVariantManagementReference].showExecuteOnSelection = false;
1273
1328
 
1329
+ // replace bindings in titles with the resolved texts
1330
+ resolveTitleBindingsAndCreateVariantChanges.call(this, oVariantManagementControl, sVariantManagementReference);
1331
+
1274
1332
  // attach/detach events on control
1275
1333
  // select event
1276
1334
  oVariantManagementControl.attachEvent("select", {
@@ -1284,7 +1342,7 @@ sap.ui.define([
1284
1342
  // set model's properties specific to control's appearance
1285
1343
  this.setModelPropertiesForControl(sVariantManagementReference, false, oVariantManagementControl);
1286
1344
 
1287
- //control property updateVariantInURL set initially
1345
+ // control property updateVariantInURL set initially
1288
1346
  var sUpdateURL = oVariantManagementControl.getUpdateVariantInURL(); // default false
1289
1347
  this.oData[sVariantManagementReference].updateVariantInURL = sUpdateURL;
1290
1348
  URLHandler.registerControl({
@@ -1353,9 +1411,9 @@ sap.ui.define([
1353
1411
  */
1354
1412
  VariantModel.prototype.getCurrentControlVariantIds = function() {
1355
1413
  return Object.keys(this.oData || {})
1356
- .reduce(function(aCurrentVariants, sVariantManagementReference) {
1357
- return aCurrentVariants.concat([this.oData[sVariantManagementReference].currentVariant]);
1358
- }.bind(this), []);
1414
+ .reduce(function(aCurrentVariants, sVariantManagementReference) {
1415
+ return aCurrentVariants.concat([this.oData[sVariantManagementReference].currentVariant]);
1416
+ }.bind(this), []);
1359
1417
  };
1360
1418
 
1361
1419
  /**
@@ -1382,7 +1440,7 @@ sap.ui.define([
1382
1440
  */
1383
1441
  VariantModel.prototype.destroy = function() {
1384
1442
  this.oDataSelector.removeUpdateListener(this.fnUpdateListener);
1385
- VariantManagementState.clearFakeStandardVariants(this.sFlexReference, this.oAppComponent.getId());
1443
+ VariantManagementState.clearRuntimeSteadyObjects(this.sFlexReference, this.oAppComponent.getId());
1386
1444
  JSONModel.prototype.destroy.apply(this);
1387
1445
  };
1388
1446
 
@@ -6,7 +6,7 @@
6
6
 
7
7
  sap.ui.define([
8
8
  "sap/ui/core/UIComponent"
9
- ], function (UIComponent) {
9
+ ], function(UIComponent) {
10
10
  "use strict";
11
11
 
12
12
  /**
@@ -19,7 +19,6 @@ sap.ui.define([
19
19
  * @ui5-restricted sap.ui.comp, sap.ui.fl
20
20
  */
21
21
 
22
-
23
22
  /**
24
23
  * Provides a UI component for context sharing.
25
24
  *