@openui5/sap.ui.fl 1.104.0 → 1.105.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 (254) hide show
  1. package/.reuse/dep5 +1 -1
  2. package/THIRDPARTY.txt +1 -1
  3. package/package.json +3 -3
  4. package/src/sap/ui/fl/.library +1 -1
  5. package/src/sap/ui/fl/Cache.js +3 -3
  6. package/src/sap/ui/fl/Change.js +29 -4
  7. package/src/sap/ui/fl/ChangePersistence.js +26 -14
  8. package/src/sap/ui/fl/ChangePersistenceFactory.js +1 -1
  9. package/src/sap/ui/fl/FakeLrepConnector.js +6 -0
  10. package/src/sap/ui/fl/FakeLrepConnectorLocalStorage.js +9 -3
  11. package/src/sap/ui/fl/FakeLrepConnectorSessionStorage.js +9 -3
  12. package/src/sap/ui/fl/FakeLrepLocalStorage.js +9 -3
  13. package/src/sap/ui/fl/FlexController.js +3 -1
  14. package/src/sap/ui/fl/FlexControllerFactory.js +1 -1
  15. package/src/sap/ui/fl/Layer.js +5 -2
  16. package/src/sap/ui/fl/LayerUtils.js +1 -1
  17. package/src/sap/ui/fl/Utils.js +76 -41
  18. package/src/sap/ui/fl/apply/_internal/ChangesController.js +2 -2
  19. package/src/sap/ui/fl/apply/_internal/DelegateMediator.js +1 -1
  20. package/src/sap/ui/fl/apply/_internal/appVariant/DescriptorChangeTypes.js +2 -2
  21. package/src/sap/ui/fl/apply/_internal/changes/Applier.js +2 -2
  22. package/src/sap/ui/fl/apply/_internal/changes/FlexCustomData.js +1 -1
  23. package/src/sap/ui/fl/apply/_internal/changes/Reverter.js +2 -2
  24. package/src/sap/ui/fl/apply/_internal/changes/Utils.js +3 -3
  25. package/src/sap/ui/fl/apply/_internal/changes/descriptor/Preprocessor.js +1 -1
  26. package/src/sap/ui/fl/apply/_internal/changes/descriptor/Registration.js +1 -1
  27. package/src/sap/ui/fl/apply/_internal/changes/descriptor/RegistrationBuild.js +1 -1
  28. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/AddAnnotationsToOData.js +1 -1
  29. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/ChangeDataSource.js +1 -1
  30. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/ChangeInbound.js +1 -1
  31. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/SetTitle.js +1 -1
  32. package/src/sap/ui/fl/apply/_internal/changes/descriptor/fiori/SetAbstract.js +1 -1
  33. package/src/sap/ui/fl/apply/_internal/changes/descriptor/fiori/SetRegistrationIds.js +1 -1
  34. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ovp/AddNewCard.js +1 -1
  35. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ovp/ChangeCard.js +1 -1
  36. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ovp/DeleteCard.js +1 -1
  37. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddComponentUsages.js +1 -1
  38. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddLibrary.js +1 -1
  39. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddNewModel.js +1 -1
  40. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddNewModelEnhanceWith.js +1 -1
  41. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/SetFlexExtensionPointEnabled.js +1 -1
  42. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/SetMinUI5Version.js +1 -1
  43. package/src/sap/ui/fl/apply/_internal/connectors/ObjectStorageConnector.js +2 -2
  44. package/src/sap/ui/fl/apply/_internal/connectors/ObjectStorageUtils.js +3 -3
  45. package/src/sap/ui/fl/apply/_internal/controlVariants/URLHandler.js +2 -2
  46. package/src/sap/ui/fl/apply/_internal/controlVariants/Utils.js +8 -43
  47. package/src/sap/ui/fl/apply/_internal/extensionPoint/Processor.js +1 -1
  48. package/src/sap/ui/fl/apply/_internal/flexObjects/AppDescriptorChange.js +73 -0
  49. package/src/sap/ui/fl/apply/_internal/flexObjects/CompVariant.js +11 -20
  50. package/src/sap/ui/fl/apply/_internal/flexObjects/ControllerExtensionChange.js +81 -0
  51. package/src/sap/ui/fl/apply/_internal/flexObjects/FlVariant.js +111 -0
  52. package/src/sap/ui/fl/apply/_internal/flexObjects/FlexObject.js +51 -17
  53. package/src/sap/ui/fl/apply/_internal/flexObjects/FlexObjectFactory.js +114 -34
  54. package/src/sap/ui/fl/apply/_internal/flexObjects/Variant.js +4 -15
  55. package/src/sap/ui/fl/apply/_internal/flexState/FlexState.js +22 -6
  56. package/src/sap/ui/fl/apply/_internal/flexState/Loader.js +3 -3
  57. package/src/sap/ui/fl/apply/_internal/flexState/ManifestUtils.js +1 -1
  58. package/src/sap/ui/fl/apply/_internal/flexState/UI2Personalization/UI2PersonalizationState.js +3 -3
  59. package/src/sap/ui/fl/apply/_internal/flexState/appDescriptorChanges/prepareAppDescriptorMap.js +2 -2
  60. package/src/sap/ui/fl/apply/_internal/flexState/changes/DependencyHandler.js +3 -3
  61. package/src/sap/ui/fl/apply/_internal/flexState/changes/ExtensionPointState.js +4 -4
  62. package/src/sap/ui/fl/apply/_internal/flexState/changes/prepareChangesMap.js +2 -2
  63. package/src/sap/ui/fl/apply/_internal/flexState/compVariants/CompVariantMerger.js +4 -4
  64. package/src/sap/ui/fl/apply/_internal/flexState/compVariants/Utils.js +2 -2
  65. package/src/sap/ui/fl/apply/_internal/flexState/compVariants/prepareCompVariantsMap.js +2 -2
  66. package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/Switcher.js +3 -3
  67. package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/VariantManagementState.js +27 -35
  68. package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/prepareVariantsMap.js +76 -111
  69. package/src/sap/ui/fl/apply/_internal/preprocessors/ControllerExtension.js +1 -1
  70. package/src/sap/ui/fl/apply/_internal/preprocessors/EventHistory.js +1 -1
  71. package/src/sap/ui/fl/apply/_internal/preprocessors/RegistrationDelegator.js +1 -1
  72. package/src/sap/ui/fl/apply/_internal/preprocessors/XmlPreprocessor.js +1 -1
  73. package/src/sap/ui/fl/apply/api/ControlVariantApplyAPI.js +4 -4
  74. package/src/sap/ui/fl/apply/api/DelegateMediatorAPI.js +2 -2
  75. package/src/sap/ui/fl/apply/api/FlexRuntimeInfoAPI.js +2 -2
  76. package/src/sap/ui/fl/apply/api/SmartVariantManagementApplyAPI.js +2 -2
  77. package/src/sap/ui/fl/apply/api/UI2PersonalizationApplyAPI.js +2 -2
  78. package/src/sap/ui/fl/changeHandler/AddIFrame.js +7 -7
  79. package/src/sap/ui/fl/changeHandler/AddXML.js +14 -16
  80. package/src/sap/ui/fl/changeHandler/AddXMLAtExtensionPoint.js +9 -6
  81. package/src/sap/ui/fl/changeHandler/Base.js +1 -1
  82. package/src/sap/ui/fl/changeHandler/BaseAddViaDelegate.js +30 -35
  83. package/src/sap/ui/fl/changeHandler/BaseAddXml.js +14 -15
  84. package/src/sap/ui/fl/changeHandler/BaseRename.js +9 -15
  85. package/src/sap/ui/fl/changeHandler/HideControl.js +1 -1
  86. package/src/sap/ui/fl/changeHandler/MoveControls.js +12 -8
  87. package/src/sap/ui/fl/changeHandler/MoveElements.js +3 -2
  88. package/src/sap/ui/fl/changeHandler/PropertyBindingChange.js +13 -12
  89. package/src/sap/ui/fl/changeHandler/PropertyChange.js +18 -21
  90. package/src/sap/ui/fl/changeHandler/StashControl.js +1 -1
  91. package/src/sap/ui/fl/changeHandler/UnhideControl.js +1 -1
  92. package/src/sap/ui/fl/changeHandler/UnstashControl.js +3 -5
  93. package/src/sap/ui/fl/changeHandler/UpdateIFrame.js +3 -5
  94. package/src/sap/ui/fl/codeExt/CodeExtManager.js +1 -1
  95. package/src/sap/ui/fl/descriptorRelated/api/DescriptorChangeFactory.js +13 -22
  96. package/src/sap/ui/fl/descriptorRelated/api/DescriptorInlineChangeFactory.js +1 -1
  97. package/src/sap/ui/fl/descriptorRelated/api/DescriptorVariantFactory.js +1 -1
  98. package/src/sap/ui/fl/designtime/variants/VariantManagement.designtime.js +2 -2
  99. package/src/sap/ui/fl/initial/_internal/Storage.js +18 -5
  100. package/src/sap/ui/fl/initial/_internal/StorageResultMerger.js +27 -3
  101. package/src/sap/ui/fl/initial/_internal/StorageUtils.js +4 -4
  102. package/src/sap/ui/fl/initial/_internal/changeHandlers/ChangeHandlerRegistration.js +8 -0
  103. package/src/sap/ui/fl/initial/_internal/changeHandlers/ChangeHandlerStorage.js +9 -1
  104. package/src/sap/ui/fl/initial/_internal/changeHandlers/ChangeRegistryItem.js +1 -2
  105. package/src/sap/ui/fl/initial/_internal/connectors/BackendConnector.js +3 -3
  106. package/src/sap/ui/fl/initial/_internal/connectors/KeyUserConnector.js +2 -2
  107. package/src/sap/ui/fl/initial/_internal/connectors/LrepConnector.js +2 -3
  108. package/src/sap/ui/fl/initial/_internal/connectors/NeoLrepConnector.js +2 -3
  109. package/src/sap/ui/fl/initial/_internal/connectors/PersonalizationConnector.js +2 -2
  110. package/src/sap/ui/fl/initial/_internal/connectors/StaticFileConnector.js +2 -2
  111. package/src/sap/ui/fl/initial/_internal/connectors/Utils.js +5 -5
  112. package/src/sap/ui/fl/initial/_internal/storageResultDisassemble.js +3 -3
  113. package/src/sap/ui/fl/interfaces/BaseLoadConnector.js +9 -6
  114. package/src/sap/ui/fl/interfaces/Delegate.js +34 -18
  115. package/src/sap/ui/fl/library.js +351 -27
  116. package/src/sap/ui/fl/messagebundle_ar.properties +2 -0
  117. package/src/sap/ui/fl/messagebundle_bg.properties +2 -0
  118. package/src/sap/ui/fl/messagebundle_ca.properties +2 -0
  119. package/src/sap/ui/fl/messagebundle_cs.properties +2 -0
  120. package/src/sap/ui/fl/messagebundle_cy.properties +2 -0
  121. package/src/sap/ui/fl/messagebundle_da.properties +2 -0
  122. package/src/sap/ui/fl/messagebundle_de.properties +2 -0
  123. package/src/sap/ui/fl/messagebundle_el.properties +2 -0
  124. package/src/sap/ui/fl/messagebundle_en.properties +2 -0
  125. package/src/sap/ui/fl/messagebundle_en_GB.properties +2 -0
  126. package/src/sap/ui/fl/messagebundle_en_US_sappsd.properties +2 -0
  127. package/src/sap/ui/fl/messagebundle_en_US_saprigi.properties +37 -2
  128. package/src/sap/ui/fl/messagebundle_en_US_saptrc.properties +2 -0
  129. package/src/sap/ui/fl/messagebundle_es.properties +2 -0
  130. package/src/sap/ui/fl/messagebundle_es_MX.properties +2 -0
  131. package/src/sap/ui/fl/messagebundle_et.properties +2 -0
  132. package/src/sap/ui/fl/messagebundle_fi.properties +2 -0
  133. package/src/sap/ui/fl/messagebundle_fr.properties +2 -0
  134. package/src/sap/ui/fl/messagebundle_fr_CA.properties +2 -0
  135. package/src/sap/ui/fl/messagebundle_hi.properties +2 -0
  136. package/src/sap/ui/fl/messagebundle_hr.properties +2 -0
  137. package/src/sap/ui/fl/messagebundle_hu.properties +2 -0
  138. package/src/sap/ui/fl/messagebundle_id.properties +2 -0
  139. package/src/sap/ui/fl/messagebundle_it.properties +2 -0
  140. package/src/sap/ui/fl/messagebundle_iw.properties +2 -0
  141. package/src/sap/ui/fl/messagebundle_ja.properties +2 -0
  142. package/src/sap/ui/fl/messagebundle_kk.properties +2 -0
  143. package/src/sap/ui/fl/messagebundle_ko.properties +2 -0
  144. package/src/sap/ui/fl/messagebundle_lt.properties +2 -0
  145. package/src/sap/ui/fl/messagebundle_lv.properties +2 -0
  146. package/src/sap/ui/fl/messagebundle_ms.properties +2 -0
  147. package/src/sap/ui/fl/messagebundle_nl.properties +2 -0
  148. package/src/sap/ui/fl/messagebundle_no.properties +2 -0
  149. package/src/sap/ui/fl/messagebundle_pl.properties +2 -0
  150. package/src/sap/ui/fl/messagebundle_pt.properties +2 -0
  151. package/src/sap/ui/fl/messagebundle_pt_PT.properties +2 -0
  152. package/src/sap/ui/fl/messagebundle_ro.properties +2 -0
  153. package/src/sap/ui/fl/messagebundle_ru.properties +2 -0
  154. package/src/sap/ui/fl/messagebundle_sh.properties +2 -0
  155. package/src/sap/ui/fl/messagebundle_sk.properties +2 -0
  156. package/src/sap/ui/fl/messagebundle_sl.properties +2 -0
  157. package/src/sap/ui/fl/messagebundle_sv.properties +2 -0
  158. package/src/sap/ui/fl/messagebundle_th.properties +2 -0
  159. package/src/sap/ui/fl/messagebundle_tr.properties +2 -0
  160. package/src/sap/ui/fl/messagebundle_uk.properties +2 -0
  161. package/src/sap/ui/fl/messagebundle_vi.properties +2 -0
  162. package/src/sap/ui/fl/messagebundle_zh_CN.properties +2 -0
  163. package/src/sap/ui/fl/messagebundle_zh_TW.properties +2 -0
  164. package/src/sap/ui/fl/requireAsync.js +2 -2
  165. package/src/sap/ui/fl/support/{apps/uiFlexibilityDiagnostics/helper/Extractor.js → _internal/extractChangeDependencies.js} +55 -57
  166. package/src/sap/ui/fl/support/_internal/getChangeDependencies.js +6 -6
  167. package/src/sap/ui/fl/support/_internal/getFlexSettings.js +14 -4
  168. package/src/sap/ui/fl/support/api/SupportAPI.js +3 -3
  169. package/src/sap/ui/fl/support/apps/contentbrowser/controller/ContentDetails.controller.js +16 -5
  170. package/src/sap/ui/fl/support/apps/contentbrowser/controller/ContentDetailsEdit.controller.js +18 -8
  171. package/src/sap/ui/fl/support/apps/contentbrowser/controller/LayerContentMaster.controller.js +1 -1
  172. package/src/sap/ui/fl/support/apps/contentbrowser/controller/Layers.controller.js +1 -1
  173. package/src/sap/ui/fl/support/apps/contentbrowser/i18n/i18n.properties +4 -1
  174. package/src/sap/ui/fl/support/apps/contentbrowser/lrepConnector/LRepConnector.js +11 -3
  175. package/src/sap/ui/fl/support/apps/contentbrowser/utils/DataUtils.js +1 -1
  176. package/src/sap/ui/fl/support/apps/contentbrowser/utils/ErrorUtils.js +1 -1
  177. package/src/sap/ui/fl/support/apps/contentbrowser/view/ContentDetails.view.xml +1 -0
  178. package/src/sap/ui/fl/support/apps/contentbrowser/view/ContentDetailsEdit.view.xml +1 -0
  179. package/src/sap/ui/fl/transport/TransportSelection.js +1 -1
  180. package/src/sap/ui/fl/util/IFrame.js +27 -2
  181. package/src/sap/ui/fl/util/ManagedObjectModel.js +1 -1
  182. package/src/sap/ui/fl/util/resolveBinding.js +1 -1
  183. package/src/sap/ui/fl/variants/VariantManagement.js +41 -14
  184. package/src/sap/ui/fl/variants/VariantModel.js +90 -98
  185. package/src/sap/ui/fl/write/_internal/FlexInfoSession.js +46 -0
  186. package/src/sap/ui/fl/write/_internal/SaveAs.js +8 -9
  187. package/src/sap/ui/fl/write/_internal/Storage.js +4 -4
  188. package/src/sap/ui/fl/write/_internal/StorageFeaturesMerger.js +3 -3
  189. package/src/sap/ui/fl/write/_internal/Versions.js +3 -3
  190. package/src/sap/ui/fl/write/_internal/appVariant/AppVariant.js +3 -3
  191. package/src/sap/ui/fl/write/_internal/appVariant/AppVariantFactory.js +1 -1
  192. package/src/sap/ui/fl/write/_internal/appVariant/AppVariantInlineChange.js +3 -3
  193. package/src/sap/ui/fl/write/_internal/appVariant/AppVariantInlineChangeFactory.js +1 -1
  194. package/src/sap/ui/fl/write/_internal/condenser/Condenser.js +1 -1
  195. package/src/sap/ui/fl/write/_internal/condenser/UIReconstruction.js +1 -1
  196. package/src/sap/ui/fl/write/_internal/connectors/BackendConnector.js +3 -3
  197. package/src/sap/ui/fl/write/_internal/connectors/JsObjectConnector.js +2 -2
  198. package/src/sap/ui/fl/write/_internal/connectors/KeyUserConnector.js +27 -18
  199. package/src/sap/ui/fl/write/_internal/connectors/LocalStorageConnector.js +2 -2
  200. package/src/sap/ui/fl/write/_internal/connectors/LrepConnector.js +3 -3
  201. package/src/sap/ui/fl/write/_internal/connectors/NeoLrepConnector.js +3 -3
  202. package/src/sap/ui/fl/write/_internal/connectors/ObjectPathConnector.js +3 -3
  203. package/src/sap/ui/fl/write/_internal/connectors/ObjectStorageConnector.js +2 -2
  204. package/src/sap/ui/fl/write/_internal/connectors/PersonalizationConnector.js +3 -3
  205. package/src/sap/ui/fl/write/_internal/connectors/SessionStorageConnector.js +2 -2
  206. package/src/sap/ui/fl/write/_internal/connectors/Utils.js +3 -3
  207. package/src/sap/ui/fl/write/_internal/delegates/ODataV4ReadDelegate.js +2 -2
  208. package/src/sap/ui/fl/write/_internal/extensionPoint/Processor.js +1 -1
  209. package/src/sap/ui/fl/write/_internal/extensionPoint/Registry.js +1 -1
  210. package/src/sap/ui/fl/write/_internal/fieldExtensibility/ABAPAccess.js +1 -1
  211. package/src/sap/ui/fl/write/_internal/fieldExtensibility/ABAPExtensibilityVariant.js +4 -4
  212. package/src/sap/ui/fl/write/_internal/fieldExtensibility/ABAPExtensibilityVariantFactory.js +3 -3
  213. package/src/sap/ui/fl/write/_internal/fieldExtensibility/MultiTenantABAPExtensibilityVariant.js +3 -3
  214. package/src/sap/ui/fl/write/_internal/fieldExtensibility/ServiceValidation.js +1 -1
  215. package/src/sap/ui/fl/write/_internal/fieldExtensibility/SingleTenantABAPExtensibilityVariant.js +4 -4
  216. package/src/sap/ui/fl/write/_internal/fieldExtensibility/UriParser.js +1 -1
  217. package/src/sap/ui/fl/write/_internal/fieldExtensibility/Utils.js +68 -18
  218. package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/CAPAccess.js +1 -1
  219. package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/dialog/CustomFieldCAPDialog.js +1 -1
  220. package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/booleanEditor/BooleanEditor.js +1 -1
  221. package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/rangeEditor/RangeEditor.js +1 -1
  222. package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/timeEditor/TimeEditor.js +1 -1
  223. package/src/sap/ui/fl/write/_internal/flexState/FlexObjectState.js +47 -10
  224. package/src/sap/ui/fl/write/_internal/flexState/compVariants/CompVariantState.js +3 -3
  225. package/src/sap/ui/fl/write/_internal/transport/TransportSelection.js +1 -1
  226. package/src/sap/ui/fl/write/_internal/transport/Transports.js +10 -3
  227. package/src/sap/ui/fl/write/api/AppVariantWriteAPI.js +2 -2
  228. package/src/sap/ui/fl/write/api/ChangesWriteAPI.js +24 -18
  229. package/src/sap/ui/fl/write/api/ContextSharingAPI.js +2 -2
  230. package/src/sap/ui/fl/write/api/ControlPersonalizationWriteAPI.js +2 -2
  231. package/src/sap/ui/fl/write/api/ExtensionPointRegistryAPI.js +2 -2
  232. package/src/sap/ui/fl/write/api/FeaturesAPI.js +9 -7
  233. package/src/sap/ui/fl/write/api/FieldExtensibility.js +3 -3
  234. package/src/sap/ui/fl/write/api/LocalResetAPI.js +2 -2
  235. package/src/sap/ui/fl/write/api/PersistenceWriteAPI.js +5 -46
  236. package/src/sap/ui/fl/write/api/ReloadInfoAPI.js +49 -43
  237. package/src/sap/ui/fl/write/api/SmartBusinessWriteAPI.js +2 -2
  238. package/src/sap/ui/fl/write/api/SmartVariantManagementWriteAPI.js +2 -2
  239. package/src/sap/ui/fl/write/api/TranslationAPI.js +2 -2
  240. package/src/sap/ui/fl/write/api/UI2PersonalizationWriteAPI.js +2 -2
  241. package/src/sap/ui/fl/write/api/VersionsAPI.js +2 -2
  242. package/src/sap/ui/fl/write/api/connectors/FileListBaseConnector.js +4 -3
  243. package/src/sap/ui/fl/write/api/connectors/ObjectStorageConnector.js +4 -3
  244. package/src/sap/ui/fl/write/connectors/BaseConnector.js +4 -4
  245. package/src/sap/ui/fl/Variant.js +0 -511
  246. package/src/sap/ui/fl/support/Flexibility.js +0 -384
  247. package/src/sap/ui/fl/support/apps/uiFlexibilityDiagnostics/Component.js +0 -18
  248. package/src/sap/ui/fl/support/apps/uiFlexibilityDiagnostics/controller/Root.controller.js +0 -227
  249. package/src/sap/ui/fl/support/apps/uiFlexibilityDiagnostics/index.html +0 -21
  250. package/src/sap/ui/fl/support/apps/uiFlexibilityDiagnostics/manifest.json +0 -44
  251. package/src/sap/ui/fl/support/apps/uiFlexibilityDiagnostics/view/Root.view.xml +0 -95
  252. package/src/sap/ui/fl/support/diagnostics/Flexibility.controller.js +0 -35
  253. package/src/sap/ui/fl/support/diagnostics/Flexibility.view.xml +0 -41
  254. package/src/sap/ui/fl/support/flexibility.css +0 -32
@@ -13,7 +13,7 @@ sap.ui.define(["sap/ui/fl/Utils", "sap/ui/thirdparty/jquery"], function(Utils, j
13
13
  * @constructor
14
14
  * @alias sap.ui.fl.support.apps.contentbrowser.lrepConnector.LRepConnector
15
15
  * @author SAP SE
16
- * @version 1.104.0
16
+ * @version 1.105.0
17
17
  * @experimental Since 1.45
18
18
  */
19
19
  var LrepConnector = {};
@@ -58,10 +58,11 @@ sap.ui.define(["sap/ui/fl/Utils", "sap/ui/thirdparty/jquery"], function(Utils, j
58
58
  * @param {string} sContent - Content of the file saved to the layered repository
59
59
  * @param {string} sTransportId - ID of an ABAP transport or ATO_NOTIFICATION
60
60
  * @param {string} sPackageName - Name of an ABAP package
61
+ * @param [boolean] bSupport - Save file with support mode for activated version
61
62
  * @returns {Promise} Promise of the SAVE content request to the back end
62
63
  * @public
63
64
  */
64
- LrepConnector.saveFile = function (sLayer, sNamespace, sFilename, sFileType, sContent, sTransportId, sPackageName) {
65
+ LrepConnector.saveFile = function (sLayer, sNamespace, sFilename, sFileType, sContent, sTransportId, sPackageName, bSupport) {
65
66
  return new Promise(function (fnResolve, fnReject) {
66
67
  if (!sLayer || sNamespace === undefined || !sFilename || !sFileType) {
67
68
  fnReject();
@@ -73,6 +74,9 @@ sap.ui.define(["sap/ui/fl/Utils", "sap/ui/thirdparty/jquery"], function(Utils, j
73
74
  var sChangeListSuffix = this._getChangeListSuffix(sTransportId);
74
75
  var sPackageSuffix = this._getPackageSuffix(sPackageName);
75
76
  var sUrl = LrepConnector.sContentPathPrefix + sContentSuffix + sLayerSuffix + sChangeListSuffix + sPackageSuffix;
77
+ if (bSupport) {
78
+ sUrl = sUrl + "&support=true";
79
+ }
76
80
  this._getTokenAndSendPutRequest(sUrl, sContent, fnResolve, fnReject);
77
81
  }.bind(this));
78
82
  };
@@ -85,10 +89,11 @@ sap.ui.define(["sap/ui/fl/Utils", "sap/ui/thirdparty/jquery"], function(Utils, j
85
89
  * @param {string} sFileName - Name of the file
86
90
  * @param {string} sFileType - Type of the file
87
91
  * @param {string} sTransportId - ID of the ABAP transport or ATO_NOTIFICATION
92
+ * @param [boolean] bSupport - Delete file with support mode for activated version
88
93
  * @returns {Promise} Promise of DELETE content request to the back end
89
94
  * @public
90
95
  */
91
- LrepConnector.deleteFile = function (sLayer, sNamespace, sFileName, sFileType, sTransportId) {
96
+ LrepConnector.deleteFile = function (sLayer, sNamespace, sFileName, sFileType, sTransportId, bSupport) {
92
97
  return new Promise(function (fnResolve, fnReject) {
93
98
  if (!sLayer || sNamespace === undefined || !sFileName || !sFileType) {
94
99
  fnReject();
@@ -99,6 +104,9 @@ sap.ui.define(["sap/ui/fl/Utils", "sap/ui/thirdparty/jquery"], function(Utils, j
99
104
  var sLayerSuffix = this._getLayerSuffix(sLayer);
100
105
  var sChangeListSuffix = this._getChangeListSuffix(sTransportId);
101
106
  var sUrl = LrepConnector.sContentPathPrefix + sContentSuffix + sLayerSuffix + sChangeListSuffix;
107
+ if (bSupport) {
108
+ sUrl = sUrl + "&support=true";
109
+ }
102
110
  this._getTokenAndSendDeletionRequest(sUrl, fnResolve, fnReject);
103
111
  }.bind(this));
104
112
  };
@@ -19,7 +19,7 @@ sap.ui.define([
19
19
  * @constructor
20
20
  * @alias sap.ui.fl.support.apps.contentbrowser.utils.DataUtils
21
21
  * @author SAP SE
22
- * @version 1.104.0
22
+ * @version 1.105.0
23
23
  * @experimental Since 1.45
24
24
  */
25
25
  var DataUtils = {
@@ -16,7 +16,7 @@ function (MessagePopoverItem, MessagePopover) {
16
16
  * @constructor
17
17
  * @alias sap.ui.fl.support.apps.contentbrowser.utils.ErrorUtils
18
18
  * @author SAP SE
19
- * @version 1.104.0
19
+ * @version 1.105.0
20
20
  * @experimental Since 1.45
21
21
  */
22
22
  var ErrorUtils = {};
@@ -47,6 +47,7 @@
47
47
  <ToolbarSpacer />
48
48
  <Button text="{i18n>edit}" press=".onEditClicked" />
49
49
  <Button text="{i18n>delete}" press=".onDeleteClicked" />
50
+ <CheckBox id="activeVersionCheckBox" text="{i18n>onActiveVersion}" valueState="Warning" visible="false"/>
50
51
  </Toolbar>
51
52
  </footer>
52
53
  </Page>
@@ -18,6 +18,7 @@
18
18
  <ToolbarSpacer />
19
19
  <Button text="{i18n>save}" press=".onSave" />
20
20
  <Button text="{i18n>cancel}" press=".onCancel" />
21
+ <CheckBox id="activeVersionCheckBox" text="{i18n>onActiveVersion}" valueState="Warning" visible="false"/>
21
22
  </Toolbar>
22
23
  </footer>
23
24
  </Page>
@@ -17,7 +17,7 @@ sap.ui.define([
17
17
  * @alias sap.ui.fl.transport.TransportSelection
18
18
  * @constructor
19
19
  * @author SAP SE
20
- * @version 1.104.0
20
+ * @version 1.105.0
21
21
  * @since 1.38.0
22
22
  * Helper object to select an ABAP transport for an LREP object. This is not a generic utility to select a transport request, but part
23
23
  * of the SmartVariant control.
@@ -11,6 +11,7 @@ sap.ui.define([
11
11
  "sap/ui/model/json/JSONModel",
12
12
  "./getContainerUserInfo",
13
13
  "sap/base/util/extend",
14
+ "sap/base/util/restricted/_CancelablePromise",
14
15
  "sap/base/security/URLListValidator",
15
16
  "sap/base/Log",
16
17
  "sap/ui/core/library",
@@ -21,6 +22,7 @@ sap.ui.define([
21
22
  JSONModel,
22
23
  getContainerUserInfo,
23
24
  extend,
25
+ CancelablePromise,
24
26
  URLListValidator,
25
27
  Log
26
28
  ) {
@@ -50,7 +52,7 @@ sap.ui.define([
50
52
  * @extends sap.ui.core.Control
51
53
  *
52
54
  * @author SAP SE
53
- * @version 1.104.0
55
+ * @version 1.105.0
54
56
  *
55
57
  * @constructor
56
58
  * @private
@@ -114,7 +116,30 @@ sap.ui.define([
114
116
  var sEncodedUrl = decodeURI(sUrl) === sUrl ? encodeURI(sUrl) : sUrl;
115
117
 
116
118
  if (IFrame.isValidUrl(sEncodedUrl)) {
117
- this.setProperty("url", sEncodedUrl);
119
+ // Setting the url of the IFrame directly can lead to issues
120
+ // if the change doesn't result in a reload of the embedded page
121
+ // e.g. when a navigation parameter is changed
122
+ // To avoid problems with the ushell and the embedded apps, it is safer
123
+ // to unload the iframe content first and thus force a full browser reload
124
+
125
+ if (this._oSetUrlPromise) {
126
+ this._oSetUrlPromise.cancel();
127
+ delete this._oSetUrlPromise;
128
+ }
129
+
130
+ this.setProperty("url", "");
131
+
132
+ this._oSetUrlPromise = new CancelablePromise(function (fnResolve, fnReject, onCancel) {
133
+ onCancel.shouldReject = false;
134
+ // Use a timeout here to avoid issues with browser caching in Chrome
135
+ // that seem to lead to a mismatch between IFrame content and src,
136
+ // see Chromium issue 324102
137
+ setTimeout(fnResolve, 0);
138
+ });
139
+
140
+ this._oSetUrlPromise.then(function() {
141
+ this.setProperty("url", sEncodedUrl);
142
+ }.bind(this));
118
143
  } else {
119
144
  Log.error("Provided URL is not valid as an IFrame src");
120
145
  }
@@ -25,7 +25,7 @@ sap.ui.define([
25
25
  * @extends sap.ui.core.Element
26
26
  *
27
27
  * @author SAP SE
28
- * @version 1.104.0
28
+ * @version 1.105.0
29
29
  *
30
30
  * @constructor
31
31
  * @private
@@ -34,7 +34,7 @@ sap.ui.define([
34
34
  *
35
35
  * @function
36
36
  * @author SAP SE
37
- * @version 1.104.0
37
+ * @version 1.105.0
38
38
  * @alias sap.ui.fl.util.resolveBinding
39
39
  * @experimental
40
40
  * @since 1.91
@@ -1,5 +1,5 @@
1
- /*
2
- * ! OpenUI5
1
+ /*!
2
+ * OpenUI5
3
3
  * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
@@ -7,6 +7,8 @@
7
7
  // Provides control sap.ui.fl.variants.VariantManagement.
8
8
  sap.ui.define([
9
9
  "sap/ui/model/Context",
10
+ "sap/ui/model/Filter",
11
+ "sap/ui/model/FilterOperator",
10
12
  "sap/m/VariantItem",
11
13
  "sap/m/VariantManagement",
12
14
  "sap/ui/fl/Utils",
@@ -16,6 +18,8 @@ sap.ui.define([
16
18
  'sap/base/Log'
17
19
  ], function(
18
20
  Context,
21
+ Filter,
22
+ FilterOperator,
19
23
  VariantItem,
20
24
  MVariantManagement,
21
25
  flUtils,
@@ -53,7 +57,7 @@ sap.ui.define([
53
57
  /**
54
58
  * Determines the intention of setting the current variant based on passed information.
55
59
  * <p>
56
- * <b>Note:</b> The <code>VariantManagement</code> control does not react in any way to this property.
60
+ * <b>Note:</b> The <code>VariantManagement</code> control does not react in any way to this property. It is used internally by the flexibility layer.
57
61
  */
58
62
  updateVariantInURL: {
59
63
  type: "boolean",
@@ -61,7 +65,9 @@ sap.ui.define([
61
65
  defaultValue: false
62
66
  },
63
67
  /**
64
- * When set to false, doesn't reset the <code>VariantManagement</code> control to the default variant, when its binding context is changed.
68
+ * When set to <code>false</code>, doesn't reset the <code>VariantManagement</code> control to the default variant, when its binding context is changed.
69
+ * <p>
70
+ * <b>Note:</b> The <code>VariantManagement</code> control does not react in any way to this property. It is used internally by the flexibility layer.
65
71
  */
66
72
  resetOnContextChange: {
67
73
  type: "boolean",
@@ -94,7 +100,8 @@ sap.ui.define([
94
100
  },
95
101
  /**
96
102
  * If set to <code>true</code>, the key for a vendor variant will be added manually.<br>
97
- * <b>Note:</b>This flag is only used internally in the app variant scenarios.
103
+ * <p>
104
+ * <b>Note:</b> This flag is only used internally.
98
105
  */
99
106
  manualVariantKey: {
100
107
  type: "boolean",
@@ -103,8 +110,7 @@ sap.ui.define([
103
110
  },
104
111
 
105
112
  /**
106
- * Indicates that the control is in error state. If set to <code>true</code>, an error message will be displayed whenever the variant is
107
- * opened.
113
+ * 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.
108
114
  */
109
115
  inErrorState: {
110
116
  type: "boolean",
@@ -124,8 +130,8 @@ sap.ui.define([
124
130
 
125
131
  /**
126
132
  * Defines the Apply Automatically text for the standard variant in the Manage Views dialog if the application controls this behavior.
127
- *
128
- * <br><b>Note:</b> the usage of this property is restricted to <code>sap.fe</code> components only.
133
+ * <p>
134
+ * <b>Note:</b> the usage of this property is restricted to <code>sap.fe</code> components only.
129
135
  */
130
136
  displayTextForExecuteOnSelectionForStandardVariant: {
131
137
  type: "string",
@@ -266,7 +272,7 @@ sap.ui.define([
266
272
  associations: {
267
273
 
268
274
  /**
269
- * Contains the controls for which the variant management is responsible.
275
+ * Contains the ids of the controls for which the variant management is responsible.
270
276
  */
271
277
  "for": {
272
278
  type: "sap.ui.core.Control",
@@ -567,9 +573,6 @@ sap.ui.define([
567
573
 
568
574
  ///<OVERWRITES>
569
575
 
570
- VariantManagement.prototype.onclick = function(oEvent) {
571
- this._oVM.onclick(oEvent);
572
- };
573
576
  VariantManagement.prototype._createSaveAsDialog = function() {
574
577
  this._oVM._createSaveAsDialog();
575
578
  };
@@ -710,9 +713,15 @@ sap.ui.define([
710
713
  return this._oVM.getDefaultKey();
711
714
  };
712
715
 
716
+ /**
717
+ * Determines if the current variant is modified.
718
+ * @public
719
+ * @returns {boolean} If the current variant is modified <code>true</code>, otherwise <code>false</code>
720
+ */
713
721
  VariantManagement.prototype.getModified = function() {
714
722
  return this._oVM.getModified();
715
723
  };
724
+
716
725
  VariantManagement.prototype.setModified = function(bFlag) {
717
726
  this._oVM.setModified(bFlag);
718
727
  };
@@ -844,7 +853,12 @@ sap.ui.define([
844
853
  this._oVM.bindAggregation("items", {
845
854
  path: this.oContext + "/variants",
846
855
  model: sModelName,
847
- template: oItemsTemplate
856
+ template: oItemsTemplate,
857
+ filters: new Filter({
858
+ path: "visible",
859
+ operator: FilterOperator.EQ,
860
+ value1: true
861
+ })
848
862
  });
849
863
  };
850
864
 
@@ -949,5 +963,18 @@ sap.ui.define([
949
963
  this._aSelectEventHandlers = undefined;
950
964
  };
951
965
 
966
+ // <overwrite for docu>
967
+ /**
968
+ * Adds a control to the association {@link #for for}.
969
+ * @public
970
+ * @param {sap.ui.core.ID | sap.ui.core.Control} vFor The control to add; if empty, nothing is inserted
971
+ * @returns {Object} Reference to <code>this</code> in order to allow method chaining
972
+ */
973
+ VariantManagement.prototype.addFor = function(vFor) {
974
+ this.addAssociation("for", vFor);
975
+ return this;
976
+ };
977
+
978
+
952
979
  return VariantManagement;
953
980
  });
@@ -1,5 +1,5 @@
1
- /*
2
- * ! OpenUI5
1
+ /*!
2
+ * OpenUI5
3
3
  * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
@@ -17,10 +17,10 @@ sap.ui.define([
17
17
  "sap/ui/core/BusyIndicator",
18
18
  "sap/ui/fl/apply/_internal/changes/Reverter",
19
19
  "sap/ui/fl/apply/_internal/controlVariants/URLHandler",
20
+ "sap/ui/fl/apply/_internal/flexObjects/FlexObjectFactory",
20
21
  "sap/ui/fl/apply/_internal/flexState/controlVariants/Switcher",
21
22
  "sap/ui/fl/apply/_internal/flexState/controlVariants/VariantManagementState",
22
23
  "sap/ui/fl/apply/_internal/controlVariants/Utils",
23
- "sap/ui/fl/changeHandler/Base",
24
24
  "sap/ui/fl/Change",
25
25
  "sap/ui/fl/Layer",
26
26
  "sap/ui/fl/LayerUtils",
@@ -40,10 +40,10 @@ sap.ui.define([
40
40
  BusyIndicator,
41
41
  Reverter,
42
42
  URLHandler,
43
+ FlexObjectFactory,
43
44
  Switcher,
44
45
  VariantManagementState,
45
46
  VariantUtil,
46
- BaseChangeHandler,
47
47
  Change,
48
48
  Layer,
49
49
  LayerUtils,
@@ -264,7 +264,7 @@ sap.ui.define([
264
264
  * @class Variant model implementation for JSON format.
265
265
  * @extends sap.ui.model.json.JSONModel
266
266
  * @author SAP SE
267
- * @version 1.104.0
267
+ * @version 1.105.0
268
268
  * @param {object} oData - Either the URL where to load the JSON from or a JS object
269
269
  * @param {object} mPropertyBag - Map of properties required for the constructor
270
270
  * @param {sap.ui.fl.FlexController} mPropertyBag.flexController - <code>FlexController</code> instance for the component which uses the variant model
@@ -440,8 +440,22 @@ sap.ui.define([
440
440
  });
441
441
  };
442
442
 
443
- VariantModel.prototype.getVariantProperty = function(sVariantReference, sProperty) {
444
- return this.getVariant(sVariantReference).content.content[sProperty];
443
+ /**
444
+ * Searches for the variant and returns the current title.
445
+ *
446
+ * @param {string} sVariantReference - Variant reference
447
+ * @param {string} sVMReference - Variant management reference
448
+ * @returns {string} Title of the variant
449
+ */
450
+ VariantModel.prototype.getVariantTitle = function(sVariantReference, sVMReference) {
451
+ var sTitle = "";
452
+ this.oData[sVMReference].variants.some(function(oVariantData) {
453
+ if (oVariantData.key === sVariantReference) {
454
+ sTitle = oVariantData.title;
455
+ return true;
456
+ }
457
+ });
458
+ return sTitle;
445
459
  };
446
460
 
447
461
  function handleInitialLoadScenario(sVMReference, oVariantManagementControl) {
@@ -463,7 +477,7 @@ sap.ui.define([
463
477
  vReference: sVMReference
464
478
  });
465
479
  // set executeOnSelect in model and State without creating a change
466
- oVariant.content.content.executeOnSelect = true;
480
+ oVariant.instance.setExecuteOnSelection(true);
467
481
  this.oData[sVMReference].variants[0].originalExecuteOnSelect = true;
468
482
  this.oData[sVMReference].variants[0].executeOnSelect = true;
469
483
  return true;
@@ -595,58 +609,57 @@ sap.ui.define([
595
609
  }, 0);
596
610
  };
597
611
 
612
+ function createNewVariant(oSourceVariant, mPropertyBag) {
613
+ var mProperties = {
614
+ id: mPropertyBag.newVariantReference,
615
+ variantName: mPropertyBag.title,
616
+ contexts: mPropertyBag.contexts,
617
+ layer: mPropertyBag.layer,
618
+ reference: oSourceVariant.getFlexObjectMetadata().reference,
619
+ generator: mPropertyBag.generator,
620
+ variantManagementReference: mPropertyBag.variantManagementReference
621
+ };
622
+ if (mPropertyBag.currentVariantComparison === 1) {
623
+ // in case a user variant should be saved as a PUBLIC variant, but refers to a PUBLIC variant,
624
+ // the references dependencies must be followed one more time
625
+ if (mPropertyBag.sourceVariantSource.instance.getLayer() === mPropertyBag.layer) {
626
+ mProperties.variantReference = mPropertyBag.sourceVariantSource.instance.getVariantReference();
627
+ } else {
628
+ mProperties.variantReference = oSourceVariant.getVariantReference();
629
+ }
630
+ } else if (mPropertyBag.currentVariantComparison === 0) {
631
+ mProperties.variantReference = oSourceVariant.getVariantReference();
632
+ } else if (mPropertyBag.currentVariantComparison === -1) {
633
+ mProperties.variantReference = mPropertyBag.sourceVariantReference;
634
+ }
635
+
636
+ return FlexObjectFactory.createFlVariant(mProperties);
637
+ }
638
+
598
639
  VariantModel.prototype._duplicateVariant = function(mPropertyBag) {
599
- var sNewVariantReference = mPropertyBag.newVariantReference;
600
640
  var sSourceVariantReference = mPropertyBag.sourceVariantReference;
601
641
  var sVariantManagementReference = mPropertyBag.variantManagementReference;
602
642
  var oSourceVariant = this.getVariant(sSourceVariantReference);
603
643
 
604
- var aVariantChanges =
605
- VariantManagementState.getControlChangesForVariant({
606
- vmReference: sVariantManagementReference,
607
- vReference: sSourceVariantReference,
608
- reference: this.sFlexReference
609
- })
610
- .map(function(oVariantChange) {
611
- return oVariantChange.getDefinition();
612
- });
644
+ var aVariantChanges = VariantManagementState.getControlChangesForVariant({
645
+ vmReference: sVariantManagementReference,
646
+ vReference: sSourceVariantReference,
647
+ reference: this.sFlexReference
648
+ })
649
+ .map(function(oVariantChange) {
650
+ return oVariantChange.getDefinition();
651
+ });
613
652
 
653
+ mPropertyBag.currentVariantComparison = LayerUtils.compareAgainstCurrentLayer(oSourceVariant.instance.getLayer(), mPropertyBag.layer);
654
+ if (mPropertyBag.currentVariantComparison === 1) {
655
+ mPropertyBag.sourceVariantSource = this.getVariant(oSourceVariant.instance.getVariantReference());
656
+ }
614
657
  var oDuplicateVariant = {
615
- content: {},
658
+ instance: createNewVariant(oSourceVariant.instance, mPropertyBag),
616
659
  controlChanges: aVariantChanges,
617
660
  variantChanges: {}
618
661
  };
619
662
 
620
- var iCurrentLayerComp = LayerUtils.compareAgainstCurrentLayer(oSourceVariant.content.layer, mPropertyBag.layer);
621
-
622
- Object.keys(oSourceVariant.content).forEach(function(sKey) {
623
- if (sKey === "fileName") {
624
- oDuplicateVariant.content[sKey] = sNewVariantReference;
625
- } else if (sKey === "variantReference") {
626
- if (iCurrentLayerComp === 1) {
627
- // in case a user variant should be saved as a PUBLIC variant, but refers to a PUBLIC variant,
628
- // the references dependencies must be followed one more time
629
- var oSourceVariantsSource = this.getVariant(oSourceVariant.content.variantReference);
630
- if (oSourceVariantsSource.content.layer === mPropertyBag.layer) {
631
- oDuplicateVariant.content[sKey] = oSourceVariantsSource.content.variantReference;
632
- } else {
633
- oDuplicateVariant.content[sKey] = oSourceVariant.content.variantReference;
634
- }
635
- } else if (iCurrentLayerComp === 0) {
636
- oDuplicateVariant.content[sKey] = oSourceVariant.content.variantReference;
637
- } else if (iCurrentLayerComp === -1) {
638
- oDuplicateVariant.content[sKey] = sSourceVariantReference;
639
- }
640
- } else if (sKey === "content") {
641
- oDuplicateVariant.content[sKey] = JSON.parse(JSON.stringify(oSourceVariant.content[sKey]));
642
- oDuplicateVariant.content.content.title = mPropertyBag.title;
643
- } else {
644
- oDuplicateVariant.content[sKey] = oSourceVariant.content[sKey];
645
- }
646
- }.bind(this));
647
- oDuplicateVariant.content.layer = mPropertyBag.layer;
648
- oDuplicateVariant.content.contexts = mPropertyBag.contexts;
649
-
650
663
  aVariantChanges = oDuplicateVariant.controlChanges.slice();
651
664
 
652
665
  var oDuplicateChangeData = {};
@@ -657,7 +670,7 @@ sap.ui.define([
657
670
  oDuplicateChangeData = merge({}, oChange);
658
671
  // ensure that the layer is set to the current variants (USER may becomes PUBLIC)
659
672
  oDuplicateChangeData.layer = mPropertyBag.layer;
660
- oDuplicateChangeData.variantReference = oDuplicateVariant.content.fileName;
673
+ oDuplicateChangeData.variantReference = oDuplicateVariant.instance.getId();
661
674
  if (!oDuplicateChangeData.support) {
662
675
  oDuplicateChangeData.support = {};
663
676
  }
@@ -691,11 +704,11 @@ sap.ui.define([
691
704
  var oDuplicateVariantData = this._duplicateVariant(mPropertyBag);
692
705
  oDuplicateVariantData.generator = mPropertyBag.generator;
693
706
  var oVariantModelData = {
694
- key: oDuplicateVariantData.content.fileName,
707
+ key: oDuplicateVariantData.instance.getId(),
695
708
  layer: mPropertyBag.layer,
696
- title: oDuplicateVariantData.content.content.title,
697
- originalTitle: oDuplicateVariantData.content.content.title,
698
- originalExecuteOnSelect: oDuplicateVariantData.content.content.executeOnSelect,
709
+ title: oDuplicateVariantData.instance.getName(),
710
+ originalTitle: oDuplicateVariantData.instance.getName(),
711
+ originalExecuteOnSelect: oDuplicateVariantData.instance.getExecuteOnSelection(),
699
712
  executeOnSelect: false,
700
713
  favorite: true,
701
714
  originalFavorite: true,
@@ -705,35 +718,19 @@ sap.ui.define([
705
718
  visible: true,
706
719
  originalVisible: true,
707
720
  sharing: mPropertyBag.layer === Layer.USER ? this.sharing.PRIVATE : this.sharing.PUBLIC,
708
- contexts: oDuplicateVariantData.content.contexts,
709
- originalContexts: oDuplicateVariantData.originalContexts
721
+ originalContexts: oDuplicateVariantData.instance.getContexts(),
722
+ contexts: oDuplicateVariantData.instance.getContexts()
710
723
  };
711
724
 
712
- var oVariant = VariantUtil.createVariant({
713
- model: this,
714
- variantSpecificData: oDuplicateVariantData
715
- });
716
-
717
725
  // sets copied variant and associated changes as dirty
718
726
  var aChanges = [];
719
- [oVariant].concat(oVariant.getControlChanges()).forEach(function(oChange) {
727
+ [oDuplicateVariantData.instance].concat(oDuplicateVariantData.controlChanges).forEach(function(oChange) {
720
728
  aChanges.push(this.oChangePersistence.addDirtyChange(oChange));
721
729
  }.bind(this));
722
730
 
723
731
  // adds variant to variants map
724
732
  var iIndex = VariantManagementState.addVariantToVariantManagement({
725
- // ensure "visible" and "favorite" properties are available inside oVariant.content.content
726
- variantData: merge({}, oVariant.getDefinitionWithChanges(),
727
- {
728
- content: {
729
- content: {
730
- visible: oVariantModelData.visible,
731
- favorite:
732
- oVariantModelData.favorite
733
- }
734
- }
735
- }
736
- ),
733
+ variantData: oDuplicateVariantData,
737
734
  reference: this.sFlexReference,
738
735
  vmReference: mPropertyBag.variantManagementReference
739
736
  });
@@ -742,7 +739,7 @@ sap.ui.define([
742
739
  this.oData[mPropertyBag.variantManagementReference].variants.splice(iIndex, 0, oVariantModelData);
743
740
  return this.updateCurrentVariant({
744
741
  variantManagementReference: mPropertyBag.variantManagementReference,
745
- newVariantReference: oVariant.getId(),
742
+ newVariantReference: oDuplicateVariantData.instance.getId(),
746
743
  appComponent: mPropertyBag.appComponent,
747
744
  internallyCalled: true,
748
745
  scenario: "saveAs"
@@ -898,9 +895,6 @@ sap.ui.define([
898
895
  mNewChangeData.fileType = "ctrl_variant_management_change";
899
896
  mNewChangeData.selector = JsControlTreeModifier.getSelector(sVariantManagementReference, mPropertyBag.appComponent);
900
897
  } else {
901
- if (mPropertyBag.changeType === "setTitle") {
902
- BaseChangeHandler.setTextInChange(mNewChangeData, "title", mPropertyBag.title, "XFLD");
903
- }
904
898
  mNewChangeData.fileType = "ctrl_variant_change";
905
899
  mNewChangeData.selector = JsControlTreeModifier.getSelector(mPropertyBag.variantReference, mPropertyBag.appComponent);
906
900
  }
@@ -908,6 +902,9 @@ sap.ui.define([
908
902
  var oChange = this.oFlexController.createBaseChange(mNewChangeData, mPropertyBag.appComponent);
909
903
  //update change with additional content
910
904
  oChange.setContent(mAdditionalChangeContent);
905
+ if (mPropertyBag.changeType === "setTitle") {
906
+ oChange.setText("title", mPropertyBag.title, "XFLD");
907
+ }
911
908
 
912
909
  mUpdateVariantsStateParams.changeContent = oChange.getDefinition();
913
910
  //update variants state and write change to ChangePersistence
@@ -962,6 +959,7 @@ sap.ui.define([
962
959
  var iVariantIndex = -1;
963
960
  var oVariant;
964
961
  var oData = this.getData();
962
+ var oVariantInstance = this.getVariant(mPropertyBag.variantReference, sVariantManagementReference).instance;
965
963
 
966
964
  if (mPropertyBag.variantReference) {
967
965
  iVariantIndex = this.getVariantManagementReference(mPropertyBag.variantReference).variantIndex;
@@ -975,20 +973,21 @@ sap.ui.define([
975
973
  //Update Variant Model
976
974
  oVariant.title = mPropertyBag.title;
977
975
  oVariant.originalTitle = oVariant.title;
976
+ oVariantInstance.setName(mPropertyBag.title, true);
978
977
  break;
979
978
  case "setFavorite":
980
979
  mAdditionalChangeContent.favorite = mPropertyBag.favorite;
981
980
  //Update Variant Model
982
981
  oVariant.favorite = mPropertyBag.favorite;
983
982
  oVariant.originalFavorite = oVariant.favorite;
983
+ oVariantInstance.setFavorite(mPropertyBag.favorite);
984
984
  break;
985
985
  case "setExecuteOnSelect":
986
986
  mAdditionalChangeContent.executeOnSelect = mPropertyBag.executeOnSelect;
987
- if (oVariant) {
988
- //Update Variant Model
989
- oVariant.executeOnSelect = mPropertyBag.executeOnSelect;
990
- oVariant.originalExecuteOnSelect = oVariant.executeOnSelect;
991
- }
987
+ //Update Variant Model
988
+ oVariant.executeOnSelect = mPropertyBag.executeOnSelect;
989
+ oVariant.originalExecuteOnSelect = oVariant.executeOnSelect;
990
+ oVariantInstance.setExecuteOnSelection(mPropertyBag.executeOnSelect);
992
991
  break;
993
992
  case "setVisible":
994
993
  mAdditionalChangeContent.visible = mPropertyBag.visible;
@@ -996,12 +995,14 @@ sap.ui.define([
996
995
  //Update Variant Model
997
996
  oVariant.visible = mPropertyBag.visible;
998
997
  oVariant.originalVisible = oVariant.visible;
998
+ oVariantInstance.setVisible(mPropertyBag.visible);
999
999
  break;
1000
1000
  case "setContexts":
1001
1001
  mAdditionalChangeContent.contexts = mPropertyBag.contexts;
1002
1002
  //Update Variant Model
1003
1003
  oVariant.contexts = mPropertyBag.contexts;
1004
1004
  oVariant.originalContexts = mPropertyBag.contexts;
1005
+ oVariantInstance.setContexts(mPropertyBag.contexts);
1005
1006
  break;
1006
1007
  case "setDefault":
1007
1008
  mAdditionalChangeContent.defaultVariant = mPropertyBag.defaultVariant;
@@ -1113,22 +1114,13 @@ sap.ui.define([
1113
1114
  variantManagementChanges: {},
1114
1115
  variants: [
1115
1116
  {
1116
- content: {
1117
- fileName: sVariantManagementReference,
1118
- fileType: "ctrl_variant",
1117
+ instance: FlexObjectFactory.createFlVariant({
1118
+ id: sVariantManagementReference,
1119
1119
  variantManagementReference: sVariantManagementReference,
1120
- variantReference: "",
1121
- support: {
1122
- user: VariantUtil.DEFAULT_AUTHOR
1123
- },
1124
- content: {
1125
- title: this._oResourceBundle.getText("STANDARD_VARIANT_TITLE"),
1126
- favorite: true,
1127
- visible: true,
1128
- executeOnSelect: false
1129
- },
1130
- contexts: {}
1131
- },
1120
+ variantName: this._oResourceBundle.getText("STANDARD_VARIANT_TITLE"),
1121
+ user: VariantUtil.DEFAULT_AUTHOR,
1122
+ reference: this.sFlexReference
1123
+ }),
1132
1124
  controlChanges: [],
1133
1125
  variantChanges: {}
1134
1126
  }