@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
@@ -0,0 +1,73 @@
1
+ /*!
2
+ * OpenUI5
3
+ * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
4
+ * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
+ */
6
+
7
+ sap.ui.define([
8
+ "sap/ui/fl/apply/_internal/flexObjects/FlexObject"
9
+ ], function(
10
+ FlexObject
11
+ ) {
12
+ "use strict";
13
+
14
+ /**
15
+ * Flexibility AppDescriptorChange Class. Changes a specified part of the manifest.
16
+ *
17
+ * @class Flexibility AppDescriptor Change Class.
18
+ * @extends sap.ui.fl.apply._internal.flexObjects.FlexObject
19
+ * @namespace sap.ui.fl.apply._internal.flexObjects.AppDescriptorChange
20
+ * @alias sap.ui.fl.apply._internal.flexObjects.AppDescriptorChange
21
+ * @since 1.105
22
+ * @version 1.105.0
23
+ * @private
24
+ * @ui5-restricted
25
+ */
26
+ var AppDescriptorChange = FlexObject.extend("sap.ui.fl.apply._internal.flexObjects.AppDescriptorChange", /* @lends sap.ui.fl.apply._internal.flexObjects.AppDescriptorChange.prototype */ {
27
+ metadata: {
28
+ properties: {
29
+ appDescriptorChange: {
30
+ type: "boolean",
31
+ defaultValue: true
32
+ }
33
+ }
34
+ }
35
+ });
36
+
37
+ /**
38
+ * Returns the mapping between flex object properties and file content properties in the back-end response.
39
+ * @returns {object} Mapping information
40
+ * @static
41
+ */
42
+ AppDescriptorChange.getMappingInfo = function () {
43
+ return Object.assign(FlexObject.getMappingInfo(), {
44
+ appDescriptorChange: "appDescriptorChange"
45
+ });
46
+ };
47
+
48
+ /**
49
+ * Returns the mapping between flex object properties and file content properties in the back-end response.
50
+ * Can be overridden to avoid access of static mapping within base methods.
51
+ * @returns {object} Mapping information
52
+ */
53
+ AppDescriptorChange.prototype.getMappingInfo = function () {
54
+ return AppDescriptorChange.getMappingInfo();
55
+ };
56
+
57
+ // ----------------- temporary functions -----------------
58
+ // The AppDescriptorChange is treated like a normal UI Change.
59
+ // This functions should be removed as soon as this is not the case anymore.
60
+ AppDescriptorChange.prototype.getSelector = function() {
61
+ return {};
62
+ };
63
+ AppDescriptorChange.prototype.isValidForDependencyMap = function() {
64
+ return false;
65
+ };
66
+ AppDescriptorChange.prototype.getVariantReference = function() {
67
+ return undefined;
68
+ };
69
+
70
+ // /temporary functions
71
+
72
+ return AppDescriptorChange;
73
+ });
@@ -32,7 +32,7 @@ sap.ui.define([
32
32
  * @extends sap.ui.fl.apply._internal.flexObjects.Variant
33
33
  * @alias sap.ui.fl.apply._internal.flexObjects.CompVariant
34
34
  * @since 1.103
35
- * @version 1.104.0
35
+ * @version 1.105.0
36
36
  * @private
37
37
  * @ui5-restricted sap.ui.fl sap.ui.comp
38
38
  */
@@ -63,6 +63,14 @@ sap.ui.define([
63
63
  multiple: true,
64
64
  singularName: "revertData",
65
65
  defaultValue: []
66
+ },
67
+ /**
68
+ * Changes belonging to the variant
69
+ */
70
+ changes: {
71
+ type: "sap.ui.fl.Change",
72
+ multiple: true,
73
+ defaultValue: []
66
74
  }
67
75
  }
68
76
  },
@@ -89,7 +97,8 @@ sap.ui.define([
89
97
  */
90
98
  CompVariant.getMappingInfo = function () {
91
99
  return Object.assign(Variant.getMappingInfo(), {
92
- persistencyKey: "selector.persistencyKey"
100
+ persistencyKey: "selector.persistencyKey",
101
+ variantId: "variantId"
93
102
  });
94
103
  };
95
104
 
@@ -168,24 +177,6 @@ sap.ui.define([
168
177
  return this.getFlexObjectMetadata().packageName;
169
178
  };
170
179
 
171
- /**
172
- * Sets the transport request.
173
- * Used by the SmartVariantManagement control.
174
- * @param {string} sRequest Transport request
175
- */
176
- CompVariant.prototype.setRequest = function (sRequest) {
177
- this._sRequest = sRequest;
178
- };
179
-
180
- /**
181
- * Gets the transport request.
182
- * Used by the SmartVariantManagement control.
183
- * @returns {string} Transport request
184
- */
185
- CompVariant.prototype.getRequest = function () {
186
- return this._sRequest;
187
- };
188
-
189
180
  /**
190
181
  * Checks if the object is a variant from smart variant management.
191
182
  * Used by the SmartVariantManagement control.
@@ -0,0 +1,81 @@
1
+ /*!
2
+ * OpenUI5
3
+ * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
4
+ * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
+ */
6
+
7
+ sap.ui.define([
8
+ "sap/ui/fl/apply/_internal/flexObjects/FlexObject"
9
+ ], function(
10
+ FlexObject
11
+ ) {
12
+ "use strict";
13
+
14
+ /**
15
+ * Flexibility ControllerExtensionChange class.
16
+ *
17
+ * @param {object} mPropertyBag - Initial object properties
18
+ *
19
+ * @class ControllerExtensionChange instance
20
+ * @extends sap.ui.fl.apply._internal.flexObjects.FlexObject
21
+ * @alias sap.ui.fl.apply._internal.flexObjects.ControllerExtensionChange
22
+ * @since 1.105
23
+ * @version 1.105.0
24
+ * @private
25
+ * @ui5-restricted sap.ui.fl
26
+ */
27
+ var ControllerExtensionChange = FlexObject.extend("sap.ui.fl.apply._internal.flexObjects.ControllerExtensionChange", /** @lends sap.ui.fl.apply._internal.flexObjects.ControllerExtensionChange.prototype */ {
28
+ metadata: {
29
+ properties: {
30
+ controllerName: {
31
+ type: "string"
32
+ }
33
+ }
34
+ }
35
+ });
36
+
37
+ /**
38
+ * Returns the mapping between flex object properties and file content properties in the back-end response.
39
+ * @returns {object} Mapping information
40
+ * @static
41
+ */
42
+ ControllerExtensionChange.getMappingInfo = function() {
43
+ return Object.assign(FlexObject.getMappingInfo(), {
44
+ controllerName: "selector.controllerName"
45
+ });
46
+ };
47
+
48
+ /**
49
+ * Returns the mapping between flex object properties and file content properties in the back-end response.
50
+ * Can be overridden to avoid access of static mapping within base methods.
51
+ * @returns {object} Mapping information
52
+ */
53
+ ControllerExtensionChange.prototype.getMappingInfo = function() {
54
+ return ControllerExtensionChange.getMappingInfo();
55
+ };
56
+
57
+ // ----------------- temporary functions -----------------
58
+ // The controller extension is still treated like a normal UI Change.
59
+ // This functions should be removed as soon as this is not the case anymore.
60
+ ControllerExtensionChange.prototype.getSelector = function() {
61
+ return {
62
+ controllerName: this.getControllerName()
63
+ };
64
+ };
65
+ ControllerExtensionChange.prototype.getVariantReference = function() {
66
+ return undefined;
67
+ };
68
+ ControllerExtensionChange.prototype.isValidForDependencyMap = function() {
69
+ return false;
70
+ };
71
+ ControllerExtensionChange.prototype.setInitialApplyState = function() {
72
+ };
73
+ // addXML also uses getModuleName, but as soon as those changes are also migrated getFlexObjectMetadata().moduleName can be used
74
+ ControllerExtensionChange.prototype.getModuleName = function() {
75
+ return this.getFlexObjectMetadata().moduleName;
76
+ };
77
+
78
+ // /temporary functions
79
+
80
+ return ControllerExtensionChange;
81
+ });
@@ -0,0 +1,111 @@
1
+ /*!
2
+ * OpenUI5
3
+ * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
4
+ * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
+ */
6
+
7
+ sap.ui.define([
8
+ "sap/ui/core/Core",
9
+ "sap/ui/fl/apply/_internal/controlVariants/Utils",
10
+ "sap/ui/fl/apply/_internal/flexObjects/Variant"
11
+ ], function(
12
+ Core,
13
+ ControlVariantUtils,
14
+ Variant
15
+ ) {
16
+ "use strict";
17
+
18
+ /**
19
+ * Flexibility variant class. Stores variant content, changes and related information.
20
+ *
21
+ * @param {object} mPropertyBag - Initial object properties
22
+ *
23
+ * @class FlVariant instance
24
+ * @extends sap.ui.fl.apply._internal.flexObjects.Variant
25
+ * @namespace sap.ui.fl.apply._internal.flexObjects.FlVariant
26
+ * @alias sap.ui.fl.apply._internal.flexObjects.FlVariant
27
+ * @since 1.104
28
+ * @version 1.105.0
29
+ * @private
30
+ * @ui5-restricted sap.ui.fl
31
+ */
32
+ var FlVariant = Variant.extend("sap.ui.fl.apply._internal.flexObjects.FlVariant", /* @lends sap.ui.fl.apply._internal.flexObjects.FlVariant.prototype */ {
33
+ metadata: {
34
+ properties: {
35
+ /**
36
+ * ID of the base variant this variant was created from.
37
+ */
38
+ variantReference: {
39
+ type: "string"
40
+ },
41
+ /**
42
+ * Local ID of the variant management control this variant belongs to.
43
+ * TODO: move variantManagementReference to selector (is always the local ID)
44
+ */
45
+ variantManagementReference: {
46
+ type: "string"
47
+ },
48
+ /**
49
+ * Indicates if the variant should be shown to the user.
50
+ */
51
+ visible: {
52
+ type: "boolean",
53
+ defaultValue: true
54
+ }
55
+ }
56
+ },
57
+ constructor: function(sId, mSettings) {
58
+ if (typeof sId !== "string" && sId !== undefined) {
59
+ mSettings = sId;
60
+ sId = mSettings && mSettings.id;
61
+ }
62
+ mSettings.fileType = "ctrl_variant";
63
+ if (mSettings.favorite === undefined) {
64
+ mSettings.favorite = true;
65
+ }
66
+
67
+ Variant.apply(this, arguments);
68
+
69
+ if (!this.getName() && mSettings.content && mSettings.content.title) {
70
+ this.setName(mSettings.content.title);
71
+ }
72
+
73
+ var aTitleKeyMatch = this.getName().match(/.i18n>(\w+)./);
74
+ if (aTitleKeyMatch) {
75
+ this.setName(Core.getLibraryResourceBundle("sap.ui.fl").getText(aTitleKeyMatch[1]));
76
+ }
77
+
78
+ var oSupportInfo = this.getSupportInformation();
79
+ if (this.getId() === this.getVariantManagementReference()) {
80
+ this.setStandardVariant(true);
81
+ if (!oSupportInfo.user) {
82
+ oSupportInfo.user = ControlVariantUtils.DEFAULT_AUTHOR;
83
+ this.setSupportInformation(oSupportInfo);
84
+ }
85
+ }
86
+ }
87
+ });
88
+
89
+ /**
90
+ * Returns the mapping between flex object properties and file content properties in the back-end response.
91
+ * @returns {object} Mapping information
92
+ * @static
93
+ */
94
+ FlVariant.getMappingInfo = function () {
95
+ return Object.assign(Variant.getMappingInfo(), {
96
+ variantReference: "variantReference",
97
+ variantManagementReference: "variantManagementReference"
98
+ });
99
+ };
100
+
101
+ /**
102
+ * Returns the mapping between flex object properties and file content properties in the back-end response.
103
+ * Can be overridden to avoid access of static mapping within base methods.
104
+ * @returns {object} Mapping information
105
+ */
106
+ FlVariant.prototype.getMappingInfo = function () {
107
+ return FlVariant.getMappingInfo();
108
+ };
109
+
110
+ return FlVariant;
111
+ });
@@ -4,7 +4,6 @@
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
  sap.ui.define([
7
- "sap/base/Log",
8
7
  "sap/base/util/deepClone",
9
8
  "sap/base/util/isEmptyObject",
10
9
  "sap/base/util/isPlainObject",
@@ -16,7 +15,6 @@ sap.ui.define([
16
15
  "sap/ui/fl/registry/Settings",
17
16
  "sap/ui/fl/Utils"
18
17
  ], function(
19
- Log,
20
18
  deepClone,
21
19
  isEmptyObject,
22
20
  isPlainObject,
@@ -71,7 +69,7 @@ sap.ui.define([
71
69
  * @extends sap.ui.base.ManagedObject
72
70
  * @alias sap.ui.fl.apply._internal.flexObjects.FlexObject
73
71
  * @since 1.100
74
- * @version 1.104.0
72
+ * @version 1.105.0
75
73
  * @private
76
74
  * @ui5-restricted sap.ui.fl
77
75
  */
@@ -137,17 +135,14 @@ sap.ui.define([
137
135
  constructor: function() {
138
136
  ManagedObject.apply(this, arguments);
139
137
  var oFlexObjectMetadata = this.getFlexObjectMetadata();
140
- if (oFlexObjectMetadata.reference) {
141
- oFlexObjectMetadata.namespace = (
142
- oFlexObjectMetadata.namespace
143
- || Utils.createNamespace(
144
- { reference: oFlexObjectMetadata.reference },
145
- this.getFileType()
146
- )
147
- );
138
+ var sReference = oFlexObjectMetadata.reference;
139
+ if (sReference) {
140
+ if (!oFlexObjectMetadata.namespace) {
141
+ oFlexObjectMetadata.namespace = Utils.createNamespace({ reference: sReference }, this.getFileType());
142
+ }
148
143
 
149
144
  if (!oFlexObjectMetadata.projectId) {
150
- oFlexObjectMetadata.projectId = oFlexObjectMetadata.reference.replace(".Component", "");
145
+ oFlexObjectMetadata.projectId = sReference.replace(".Component", "");
151
146
  }
152
147
  }
153
148
  this.setFlexObjectMetadata(oFlexObjectMetadata);
@@ -338,14 +333,19 @@ sap.ui.define([
338
333
  * Sets the new text for the given text ID or creates new text with the given ID.
339
334
  * @param {string} sTextId - Text ID which was used as part of the <code>texts</code> property
340
335
  * @param {string} sNewText - New text for the given text ID
336
+ * @param {string} [sType] - Translation text type, e.g. XBUT, XTIT, XTOL, XFLD
341
337
  * @param {boolean} [bSkipStateChange] - If set to <code>true</code>, doesn't set the state to dirty
342
338
  * @returns {sap.ui.fl.apply._internal.flexObjects.FlexObject} <code>this</code> context for chaining
343
339
  */
344
- FlexObject.prototype.setText = function (sTextId, sNewText, bSkipStateChange) {
340
+ FlexObject.prototype.setText = function (sTextId, sNewText, sType, bSkipStateChange) {
345
341
  var oTexts = Object.assign({}, this.getTexts());
346
- oTexts[sTextId] = Object.assign({}, oTexts[sTextId], {
342
+ var oNewText = {
347
343
  value: sNewText
348
- });
344
+ };
345
+ if (sType) {
346
+ oNewText.type = sType;
347
+ }
348
+ oTexts[sTextId] = Object.assign({}, oTexts[sTextId], oNewText);
349
349
  this.setTexts(oTexts);
350
350
  if (!bSkipStateChange) {
351
351
  this.setState(States.DIRTY);
@@ -353,6 +353,42 @@ sap.ui.define([
353
353
  return this;
354
354
  };
355
355
 
356
+ // ----------------- legacy functions -----------------
357
+
358
+ /**
359
+ * Sets the transport request.
360
+ * Also used by the SmartVariantManagement control.
361
+ * @param {string} sRequest - Transport request
362
+ */
363
+ FlexObject.prototype.setRequest = function (sRequest) {
364
+ this._sRequest = sRequest;
365
+ };
366
+
367
+ /**
368
+ * Gets the transport request.
369
+ * Also used by the SmartVariantManagement control.
370
+ * @returns {string} Transport request
371
+ */
372
+ FlexObject.prototype.getRequest = function () {
373
+ return this._sRequest || "";
374
+ };
375
+
376
+ // ----------------------------------------------------
377
+
378
+ // ----------------- temporary functions -------------
379
+
380
+ /**
381
+ * Necessary due to consumers like Visual Editor still
382
+ * calling this function with e.g. Variants
383
+ * Should be removed after all consumers are adjusted.
384
+ * @returns {object} file content as JSON object
385
+ */
386
+ FlexObject.prototype.getDefinition = function() {
387
+ return this.convertToFileContent();
388
+ };
389
+
390
+ // ----------------------------------------------------
391
+
356
392
  function capitalize(sKey) {
357
393
  return sKey.length ? sKey.charAt(0).toUpperCase() + sKey.slice(1) : sKey;
358
394
  }
@@ -436,8 +472,6 @@ sap.ui.define([
436
472
  Object.entries(vValue).forEach(function(aEntry) {
437
473
  fnMapProperty(aEntry[0], aEntry[1], sNewPath);
438
474
  });
439
- } else {
440
- Log.error("Missing mapping info for property " + sNewPath);
441
475
  }
442
476
  };
443
477
 
@@ -7,18 +7,24 @@ sap.ui.define([
7
7
  "sap/base/util/restricted/_pick",
8
8
  "sap/base/util/ObjectPath",
9
9
  "sap/ui/core/Core",
10
+ "sap/ui/fl/apply/_internal/flexObjects/AppDescriptorChange",
10
11
  "sap/ui/fl/apply/_internal/flexObjects/CompVariant",
12
+ "sap/ui/fl/apply/_internal/flexObjects/ControllerExtensionChange",
11
13
  "sap/ui/fl/apply/_internal/flexObjects/FlexObject",
14
+ "sap/ui/fl/apply/_internal/flexObjects/FlVariant",
12
15
  "sap/ui/fl/Layer",
13
16
  "sap/ui/fl/Utils"
14
17
  ], function(
15
18
  _pick,
16
19
  ObjectPath,
17
20
  Core,
21
+ AppDescriptorChange,
18
22
  CompVariant,
23
+ ControllerExtensionChange,
19
24
  FlexObject,
25
+ FlVariant,
20
26
  Layer,
21
- flUtils
27
+ Utils
22
28
  ) {
23
29
  "use strict";
24
30
 
@@ -31,22 +37,58 @@ sap.ui.define([
31
37
  */
32
38
  var FLEX_OBJECT_TYPES = {
33
39
  BASE_FLEX_OBJECT: FlexObject,
34
- COMP_VARIANT_OBJECT: CompVariant
40
+ COMP_VARIANT_OBJECT: CompVariant,
41
+ FL_VARIANT_OBJECT: FlVariant,
42
+ CONTROLLER_EXTENSION: ControllerExtensionChange,
43
+ APP_DESCRIPTOR_CHANGE: AppDescriptorChange
35
44
  };
36
45
 
37
46
  function getFlexObjectClass(oNewFileContent) {
38
47
  if (oNewFileContent.fileType === "variant") {
39
48
  return FLEX_OBJECT_TYPES.COMP_VARIANT_OBJECT;
49
+ } else if (oNewFileContent.fileType === "ctrl_variant") {
50
+ return FLEX_OBJECT_TYPES.FL_VARIANT_OBJECT;
51
+ } else if (oNewFileContent.changeType === "codeExt") {
52
+ return FLEX_OBJECT_TYPES.CONTROLLER_EXTENSION;
53
+ } else if (oNewFileContent.appDescriptorChange) {
54
+ return FLEX_OBJECT_TYPES.APP_DESCRIPTOR_CHANGE;
40
55
  }
41
56
  return FLEX_OBJECT_TYPES.BASE_FLEX_OBJECT;
42
57
  }
43
58
 
59
+ function createBasePropertyBag(mProperties) {
60
+ var sChangeType = mProperties.type || mProperties.changeType;
61
+ var sFileName = mProperties.fileName || mProperties.id || Utils.createDefaultFileName(sChangeType);
62
+ return {
63
+ id: sFileName,
64
+ layer: mProperties.layer,
65
+ content: mProperties.content,
66
+ texts: mProperties.texts,
67
+ supportInformation: {
68
+ service: mProperties.ODataService,
69
+ command: mProperties.command,
70
+ compositeCommand: mProperties.compositeCommand,
71
+ generator: mProperties.generator,
72
+ sapui5Version: Core.getConfiguration().getVersion().toString(),
73
+ sourceSystem: mProperties.sourceSystem,
74
+ sourceClient: mProperties.sourceClient,
75
+ originalLanguage: mProperties.originalLanguage,
76
+ user: mProperties.user
77
+ },
78
+ flexObjectMetadata: {
79
+ changeType: sChangeType,
80
+ reference: mProperties.reference,
81
+ packageName: mProperties.packageName
82
+ }
83
+ };
84
+ }
85
+
44
86
  /**
45
87
  * Helper class to create any flex object.
46
88
  *
47
89
  * @namespace sap.ui.fl.apply._internal.flexObjects.FlexObjectFactory
48
90
  * @since 1.100
49
- * @version 1.104.0
91
+ * @version 1.105.0
50
92
  * @private
51
93
  * @ui5-restricted sap.ui.fl
52
94
  */
@@ -82,6 +124,67 @@ sap.ui.define([
82
124
  return oFlexObject;
83
125
  };
84
126
 
127
+ FlexObjectFactory.createAppDescriptorChange = function(mPropertyBag) {
128
+ mPropertyBag.compositeCommand = mPropertyBag.compositeCommand || mPropertyBag.support && mPropertyBag.support.compositeCommand;
129
+ var mProperties = createBasePropertyBag(mPropertyBag);
130
+ return new AppDescriptorChange(mProperties);
131
+ };
132
+
133
+ /**
134
+ * Creates a new ControllerExtensionChange.
135
+ *
136
+ * @param {object} mPropertyBag - File content
137
+ * @param {string} mPropertyBag.codeRef - Name of the extension file
138
+ * @param {string} mPropertyBag.controllerName - Name of the Controller
139
+ * @param {string} mPropertyBag.namespace - See {@link sap.ui.fl.apply._internal.flexObjects.FlexObject.FlexObjectMetadata}
140
+ * @param {string} mPropertyBag.reference - See {@link sap.ui.fl.apply._internal.flexObjects.FlexObject.FlexObjectMetadata}
141
+ * @param {string} mPropertyBag.moduleName - Location of the extension file
142
+ * @param {string} mPropertyBag.generator - See {@link sap.ui.fl.apply._internal.flexObjects.FlexObject.SupportInformation}
143
+ * @returns {sap.ui.fl.apply._internal.flexObjects.ControllerExtensionChange} Created ControllerExtensionChange instance
144
+ */
145
+ FlexObjectFactory.createControllerExtensionChange = function(mPropertyBag) {
146
+ mPropertyBag.generator = mPropertyBag.generator || "FlexObjectFactory.createControllerExtensionChange";
147
+ mPropertyBag.changeType = "codeExt";
148
+ mPropertyBag.content = {
149
+ codeRef: mPropertyBag.codeRef
150
+ };
151
+
152
+ var mProperties = createBasePropertyBag(mPropertyBag);
153
+ mProperties.flexObjectMetadata.moduleName = mPropertyBag.moduleName;
154
+ mProperties.controllerName = mPropertyBag.controllerName;
155
+ return new ControllerExtensionChange(mProperties);
156
+ };
157
+
158
+ /**
159
+ * Creates a new <code>sap.ui.fl.apply._internal.flexObjects.FlVariant</code>.
160
+ *
161
+ * @param {object} mPropertyBag - Properties for the variant
162
+ * @param {string} mPropertyBag.id - ID of the new variant
163
+ * @param {string} mPropertyBag.variantName - Name of the new variant
164
+ * @param {string} mPropertyBag.variantManagementReference - Reference to the variant management control
165
+ * @param {string} [mPropertyBag.variantReference] - Reference to another variant that is the basis for the new variant
166
+ * @param {string} [mPropertyBag.user] - Author of the variant
167
+ * @param {object} [mPropertyBag.contexts] - See {@link sap.ui.fl.apply._internal.flexObjects.Variant}
168
+ * @param {object} [mPropertyBag.layer] - See {@link sap.ui.fl.apply._internal.flexObjects.FlexObject}
169
+ * @param {string} [mPropertyBag.reference] - See {@link sap.ui.fl.apply._internal.flexObjects.FlexObject.FlexObjectMetadata}
170
+ * @param {string} [mPropertyBag.generator] - See {@link sap.ui.fl.apply._internal.flexObjects.FlexObject.SupportInformation}
171
+ * @returns {sap.ui.fl.apply._internal.flexObjects.FlVariant} Variant instance
172
+ */
173
+ FlexObjectFactory.createFlVariant = function(mPropertyBag) {
174
+ mPropertyBag.generator = mPropertyBag.generator || "FlexObjectFactory.createFlVariant";
175
+ var mProperties = createBasePropertyBag(mPropertyBag);
176
+ mProperties.variantManagementReference = mPropertyBag.variantManagementReference;
177
+ mProperties.variantReference = mPropertyBag.variantReference;
178
+ mProperties.contexts = mPropertyBag.contexts;
179
+ mProperties.texts = {
180
+ variantName: {
181
+ value: mPropertyBag.variantName,
182
+ type: "XFLD"
183
+ }
184
+ };
185
+ return new FlVariant(mProperties);
186
+ };
187
+
85
188
  /**
86
189
  * Creates a new flex object of type <code>CompVariant</code>.
87
190
  *
@@ -114,38 +217,15 @@ sap.ui.define([
114
217
  * @returns {sap.ui.fl.apply._internal.flexObjects.CompVariant} Created comp variant object
115
218
  */
116
219
  FlexObjectFactory.createCompVariant = function (oFileContent) {
117
- var sFileName = oFileContent.fileName
118
- || oFileContent.id
119
- || flUtils.createDefaultFileName(oFileContent.fileType);
220
+ oFileContent.generator = oFileContent.generator || "FlexObjectFactory.createCompVariant";
221
+ oFileContent.user = ObjectPath.get("support.user", oFileContent);
222
+ var mCompVariantContent = createBasePropertyBag(oFileContent);
120
223
 
121
- var mCompVariantContent = {
122
- id: sFileName,
123
- variantId: oFileContent.variantId || sFileName,
124
- content: oFileContent.content || {},
125
- contexts: oFileContent.contexts || {},
126
- layer: oFileContent.layer,
127
- favorite: oFileContent.favorite,
128
- texts: oFileContent.texts,
129
- persistencyKey: oFileContent.persistencyKey
130
- || ObjectPath.get("selector.persistencyKey", oFileContent),
131
- persisted: oFileContent.persisted,
132
- supportInformation: {
133
- service: oFileContent.ODataService,
134
- command: oFileContent.command,
135
- generator: oFileContent.generator || "FlexObjectFactory.createCompVariant",
136
- user: ObjectPath.get("support.user", oFileContent),
137
- sapui5Version: Core.getConfiguration().getVersion().toString(),
138
- sourceSystem: oFileContent.sourceSystem,
139
- sourceClient: oFileContent.sourceClient,
140
- originalLanguage: oFileContent.originalLanguage
141
- },
142
- flexObjectMetadata: {
143
- changeType: oFileContent.type,
144
- reference: oFileContent.reference,
145
- packageName: oFileContent.packageName,
146
- creation: oFileContent.creation
147
- }
148
- };
224
+ mCompVariantContent.variantId = oFileContent.variantId || mCompVariantContent.id;
225
+ mCompVariantContent.contexts = oFileContent.contexts;
226
+ mCompVariantContent.favorite = oFileContent.favorite;
227
+ mCompVariantContent.persisted = oFileContent.persisted;
228
+ mCompVariantContent.persistencyKey = oFileContent.persistencyKey || ObjectPath.get("selector.persistencyKey", oFileContent);
149
229
 
150
230
  if (oFileContent.layer === Layer.VENDOR || oFileContent.layer === Layer.CUSTOMER_BASE) {
151
231
  mCompVariantContent.favorite = true;
@@ -16,7 +16,7 @@ sap.ui.define([
16
16
  * @extends sap.ui.fl.apply._internal.flexObjects.FlexObject
17
17
  * @alias sap.ui.fl.apply._internal.flexObjects.Variant
18
18
  * @since 1.103
19
- * @version 1.104.0
19
+ * @version 1.105.0
20
20
  * @private
21
21
  * @ui5-restricted sap.ui.fl
22
22
  */
@@ -57,16 +57,6 @@ sap.ui.define([
57
57
  variantId: {
58
58
  type: "string"
59
59
  }
60
- },
61
- aggregations: {
62
- /**
63
- * Changes belonging to the variant
64
- */
65
- changes: {
66
- type: "sap.ui.fl.Change",
67
- multiple: true,
68
- defaultValue: []
69
- }
70
60
  }
71
61
  },
72
62
  constructor: function() {
@@ -88,8 +78,7 @@ sap.ui.define([
88
78
  favorite: "favorite",
89
79
  executeOnSelection: "executeOnSelection",
90
80
  standardVariant: "standardVariant",
91
- contexts: "contexts",
92
- variantId: "variantId"
81
+ contexts: "contexts"
93
82
  });
94
83
  };
95
84
 
@@ -111,12 +100,12 @@ sap.ui.define([
111
100
  };
112
101
 
113
102
  /**
114
- * Sets the variant name on the correponding <code>texts</code> FlexObject property
103
+ * Sets the variant name on the corresponding <code>texts</code> FlexObject property
115
104
  * @param {string} sName - Variant name
116
105
  * @param {boolean} [bSkipStateChange] - If set to <code>true</code>, doesn't set the state to dirty
117
106
  */
118
107
  Variant.prototype.setName = function(sName, bSkipStateChange) {
119
- this.setText("variantName", sName, bSkipStateChange);
108
+ this.setText("variantName", sName, "XFLD", bSkipStateChange);
120
109
  };
121
110
 
122
111
  return Variant;