@openui5/sap.ui.fl 1.136.3 → 1.139.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 (234) hide show
  1. package/README.md +1 -1
  2. package/REUSE.toml +8 -29
  3. package/THIRDPARTY.txt +72 -90
  4. package/package.json +4 -4
  5. package/src/sap/ui/fl/.library +1 -1
  6. package/src/sap/ui/fl/FakeLrepConnectorLocalStorage.js +1 -1
  7. package/src/sap/ui/fl/FakeLrepConnectorSessionStorage.js +1 -1
  8. package/src/sap/ui/fl/FakeLrepLocalStorage.js +1 -1
  9. package/src/sap/ui/fl/LayerUtils.js +1 -1
  10. package/src/sap/ui/fl/Utils.js +4 -2
  11. package/src/sap/ui/fl/apply/_internal/DelegateMediator.js +1 -1
  12. package/src/sap/ui/fl/apply/_internal/changes/FlexCustomData.js +1 -1
  13. package/src/sap/ui/fl/apply/_internal/changes/Utils.js +3 -8
  14. package/src/sap/ui/fl/apply/_internal/changes/descriptor/Preprocessor.js +5 -5
  15. package/src/sap/ui/fl/apply/_internal/changes/descriptor/Registration.js +1 -1
  16. package/src/sap/ui/fl/apply/_internal/changes/descriptor/RegistrationBuild.js +1 -1
  17. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/AddAnnotationsToOData.js +1 -1
  18. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/AddNewDataSource.js +1 -1
  19. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/AddNewInbound.js +1 -1
  20. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/AddNewOutbound.js +1 -1
  21. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/AddTechnicalAttributes.js +1 -1
  22. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/ChangeDataSource.js +1 -1
  23. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/ChangeInbound.js +1 -1
  24. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/ChangeOutbound.js +1 -1
  25. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/RemoveAllInboundsExceptOne.js +1 -1
  26. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/SetAch.js +1 -1
  27. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/SetDescription.js +1 -1
  28. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/SetTitle.js +1 -1
  29. package/src/sap/ui/fl/apply/_internal/changes/descriptor/fiori/SetAbstract.js +1 -1
  30. package/src/sap/ui/fl/apply/_internal/changes/descriptor/fiori/SetCloudDevAdaptationStatus.js +1 -1
  31. package/src/sap/ui/fl/apply/_internal/changes/descriptor/fiori/SetRegistrationIds.js +1 -1
  32. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ovp/AddNewCard.js +1 -1
  33. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ovp/ChangeCard.js +1 -1
  34. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ovp/DeleteCard.js +1 -1
  35. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddComponentUsages.js +1 -1
  36. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddLibrary.js +1 -1
  37. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddNewModel.js +1 -1
  38. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddNewModelEnhanceWith.js +1 -1
  39. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/ChangeModel.js +1 -1
  40. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/SetFlexExtensionPointEnabled.js +1 -1
  41. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/SetMinUI5Version.js +1 -1
  42. package/src/sap/ui/fl/apply/_internal/connectors/ObjectStorageUtils.js +1 -1
  43. package/src/sap/ui/fl/apply/_internal/extensionPoint/Processor.js +1 -1
  44. package/src/sap/ui/fl/apply/_internal/extensionPoint/Registry.js +1 -1
  45. package/src/sap/ui/fl/apply/_internal/flexObjects/AnnotationChange.js +1 -1
  46. package/src/sap/ui/fl/apply/_internal/flexObjects/AppDescriptorChange.js +1 -1
  47. package/src/sap/ui/fl/apply/_internal/flexObjects/CompVariant.js +6 -6
  48. package/src/sap/ui/fl/apply/_internal/flexObjects/ControllerExtensionChange.js +1 -1
  49. package/src/sap/ui/fl/apply/_internal/flexObjects/FlVariant.js +1 -1
  50. package/src/sap/ui/fl/apply/_internal/flexObjects/FlexObject.js +3 -3
  51. package/src/sap/ui/fl/apply/_internal/flexObjects/FlexObjectFactory.js +3 -3
  52. package/src/sap/ui/fl/apply/_internal/flexObjects/UIChange.js +1 -1
  53. package/src/sap/ui/fl/apply/_internal/flexObjects/Variant.js +1 -1
  54. package/src/sap/ui/fl/apply/_internal/flexObjects/VariantChange.js +1 -1
  55. package/src/sap/ui/fl/apply/_internal/flexObjects/VariantManagementChange.js +1 -1
  56. package/src/sap/ui/fl/apply/_internal/flexObjects/getVariantAuthor.js +5 -5
  57. package/src/sap/ui/fl/apply/_internal/flexState/FlexObjectState.js +1 -1
  58. package/src/sap/ui/fl/apply/_internal/flexState/FlexState.js +43 -51
  59. package/src/sap/ui/fl/apply/_internal/flexState/Loader.js +13 -11
  60. package/src/sap/ui/fl/apply/_internal/flexState/ManifestUtils.js +1 -1
  61. package/src/sap/ui/fl/apply/_internal/flexState/UI2Personalization/UI2PersonalizationState.js +1 -1
  62. package/src/sap/ui/fl/apply/_internal/flexState/changes/DependencyHandler.js +1 -1
  63. package/src/sap/ui/fl/apply/_internal/flexState/changes/ExtensionPointState.js +1 -1
  64. package/src/sap/ui/fl/apply/_internal/flexState/changes/UIChangesState.js +1 -1
  65. package/src/sap/ui/fl/apply/_internal/flexState/compVariants/CompVariantManagementState.js +1 -1
  66. package/src/sap/ui/fl/apply/_internal/flexState/compVariants/CompVariantMerger.js +2 -2
  67. package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/Switcher.js +1 -1
  68. package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/VariantManagementState.js +3 -3
  69. package/src/sap/ui/fl/apply/_internal/preprocessors/ComponentLifecycleHooks.js +5 -9
  70. package/src/sap/ui/fl/apply/_internal/preprocessors/ControllerExtension.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/FlexRuntimeInfoAPI.js +22 -3
  74. package/src/sap/ui/fl/changeHandler/AddIFrame.js +1 -1
  75. package/src/sap/ui/fl/changeHandler/AddXML.js +1 -1
  76. package/src/sap/ui/fl/changeHandler/AddXMLAtExtensionPoint.js +1 -1
  77. package/src/sap/ui/fl/changeHandler/Base.js +1 -1
  78. package/src/sap/ui/fl/changeHandler/BaseAddViaDelegate.js +1 -1
  79. package/src/sap/ui/fl/changeHandler/BaseAddXml.js +1 -1
  80. package/src/sap/ui/fl/changeHandler/BaseRename.js +1 -1
  81. package/src/sap/ui/fl/changeHandler/ChangeAnnotation.js +1 -1
  82. package/src/sap/ui/fl/changeHandler/HideControl.js +1 -1
  83. package/src/sap/ui/fl/changeHandler/MoveControls.js +1 -1
  84. package/src/sap/ui/fl/changeHandler/MoveElements.js +1 -1
  85. package/src/sap/ui/fl/changeHandler/PropertyBindingChange.js +1 -1
  86. package/src/sap/ui/fl/changeHandler/PropertyChange.js +1 -1
  87. package/src/sap/ui/fl/changeHandler/StashControl.js +1 -1
  88. package/src/sap/ui/fl/changeHandler/UnhideControl.js +1 -1
  89. package/src/sap/ui/fl/changeHandler/UnstashControl.js +1 -1
  90. package/src/sap/ui/fl/changeHandler/UpdateIFrame.js +1 -1
  91. package/src/sap/ui/fl/descriptorRelated/api/DescriptorChange.js +10 -12
  92. package/src/sap/ui/fl/descriptorRelated/api/DescriptorChangeFactory.js +3 -3
  93. package/src/sap/ui/fl/descriptorRelated/api/DescriptorInlineChangeFactory.js +1 -1
  94. package/src/sap/ui/fl/descriptorRelated/api/DescriptorVariantFactory.js +1 -1
  95. package/src/sap/ui/fl/initial/_internal/FlexConfiguration.js +1 -1
  96. package/src/sap/ui/fl/initial/_internal/Settings.js +151 -0
  97. package/src/sap/ui/fl/initial/_internal/Storage.js +3 -2
  98. package/src/sap/ui/fl/initial/_internal/StorageFeaturesMerger.js +18 -24
  99. package/src/sap/ui/fl/initial/_internal/StorageUtils.js +9 -7
  100. package/src/sap/ui/fl/initial/_internal/changeHandlers/ChangeHandlerRegistration.js +1 -1
  101. package/src/sap/ui/fl/initial/_internal/changeHandlers/ChangeHandlerStorage.js +19 -7
  102. package/src/sap/ui/fl/initial/_internal/connectors/BtpServiceConnector.js +3 -1
  103. package/src/sap/ui/fl/initial/_internal/connectors/Utils.js +5 -2
  104. package/src/sap/ui/fl/initial/_internal/storageResultDisassemble.js +1 -1
  105. package/src/sap/ui/fl/initial/api/InitialFlexAPI.js +3 -3
  106. package/src/sap/ui/fl/interfaces/BaseLoadConnector.js +1 -1
  107. package/src/sap/ui/fl/interfaces/Delegate.js +1 -1
  108. package/src/sap/ui/fl/library.js +43 -43
  109. package/src/sap/ui/fl/messagebundle.properties +0 -9
  110. package/src/sap/ui/fl/messagebundle_ar.properties +0 -6
  111. package/src/sap/ui/fl/messagebundle_bg.properties +0 -6
  112. package/src/sap/ui/fl/messagebundle_ca.properties +0 -6
  113. package/src/sap/ui/fl/messagebundle_cnr.properties +0 -6
  114. package/src/sap/ui/fl/messagebundle_cs.properties +0 -6
  115. package/src/sap/ui/fl/messagebundle_cy.properties +0 -6
  116. package/src/sap/ui/fl/messagebundle_da.properties +0 -6
  117. package/src/sap/ui/fl/messagebundle_de.properties +0 -6
  118. package/src/sap/ui/fl/messagebundle_el.properties +0 -6
  119. package/src/sap/ui/fl/messagebundle_en.properties +0 -6
  120. package/src/sap/ui/fl/messagebundle_en_GB.properties +0 -6
  121. package/src/sap/ui/fl/messagebundle_en_US_saprigi.properties +0 -6
  122. package/src/sap/ui/fl/messagebundle_es.properties +0 -6
  123. package/src/sap/ui/fl/messagebundle_es_MX.properties +0 -6
  124. package/src/sap/ui/fl/messagebundle_et.properties +0 -6
  125. package/src/sap/ui/fl/messagebundle_fi.properties +0 -6
  126. package/src/sap/ui/fl/messagebundle_fr.properties +0 -6
  127. package/src/sap/ui/fl/messagebundle_fr_CA.properties +0 -6
  128. package/src/sap/ui/fl/messagebundle_hi.properties +0 -6
  129. package/src/sap/ui/fl/messagebundle_hr.properties +0 -6
  130. package/src/sap/ui/fl/messagebundle_hu.properties +0 -6
  131. package/src/sap/ui/fl/messagebundle_id.properties +0 -6
  132. package/src/sap/ui/fl/messagebundle_it.properties +0 -6
  133. package/src/sap/ui/fl/messagebundle_iw.properties +0 -6
  134. package/src/sap/ui/fl/messagebundle_ja.properties +0 -6
  135. package/src/sap/ui/fl/messagebundle_kk.properties +0 -6
  136. package/src/sap/ui/fl/messagebundle_ko.properties +0 -6
  137. package/src/sap/ui/fl/messagebundle_lt.properties +0 -6
  138. package/src/sap/ui/fl/messagebundle_lv.properties +0 -6
  139. package/src/sap/ui/fl/messagebundle_mk.properties +0 -6
  140. package/src/sap/ui/fl/messagebundle_ms.properties +0 -6
  141. package/src/sap/ui/fl/messagebundle_nl.properties +0 -6
  142. package/src/sap/ui/fl/messagebundle_no.properties +0 -6
  143. package/src/sap/ui/fl/messagebundle_pl.properties +0 -6
  144. package/src/sap/ui/fl/messagebundle_pt.properties +0 -6
  145. package/src/sap/ui/fl/messagebundle_pt_PT.properties +0 -6
  146. package/src/sap/ui/fl/messagebundle_ro.properties +0 -6
  147. package/src/sap/ui/fl/messagebundle_ru.properties +0 -6
  148. package/src/sap/ui/fl/messagebundle_sh.properties +0 -6
  149. package/src/sap/ui/fl/messagebundle_sk.properties +0 -6
  150. package/src/sap/ui/fl/messagebundle_sl.properties +0 -6
  151. package/src/sap/ui/fl/messagebundle_sr.properties +0 -6
  152. package/src/sap/ui/fl/messagebundle_sv.properties +0 -6
  153. package/src/sap/ui/fl/messagebundle_th.properties +0 -6
  154. package/src/sap/ui/fl/messagebundle_tr.properties +0 -6
  155. package/src/sap/ui/fl/messagebundle_uk.properties +0 -6
  156. package/src/sap/ui/fl/messagebundle_vi.properties +0 -6
  157. package/src/sap/ui/fl/messagebundle_zh_CN.properties +0 -6
  158. package/src/sap/ui/fl/messagebundle_zh_TW.properties +0 -6
  159. package/src/sap/ui/fl/support/_internal/extractChangeDependencies.js +5 -1
  160. package/src/sap/ui/fl/support/_internal/getAllUIChanges.js +1 -1
  161. package/src/sap/ui/fl/support/_internal/getChangeDependencies.js +2 -2
  162. package/src/sap/ui/fl/support/_internal/getFlexObjectInfos.js +1 -1
  163. package/src/sap/ui/fl/support/_internal/getFlexSettings.js +4 -4
  164. package/src/sap/ui/fl/support/api/SupportAPI.js +1 -1
  165. package/src/sap/ui/fl/support/apps/contentbrowser/controller/ContentDetails.controller.js +1 -1
  166. package/src/sap/ui/fl/support/apps/contentbrowser/controller/ContentDetailsEdit.controller.js +1 -1
  167. package/src/sap/ui/fl/support/apps/contentbrowser/controller/LayerContentMaster.controller.js +1 -1
  168. package/src/sap/ui/fl/support/apps/contentbrowser/controller/Layers.controller.js +1 -1
  169. package/src/sap/ui/fl/support/apps/contentbrowser/lrepConnector/LRepConnector.js +1 -1
  170. package/src/sap/ui/fl/support/apps/contentbrowser/utils/DataUtils.js +1 -1
  171. package/src/sap/ui/fl/support/apps/contentbrowser/utils/ErrorUtils.js +1 -1
  172. package/src/sap/ui/fl/transport/TransportSelection.js +1 -1
  173. package/src/sap/ui/fl/util/IFrame.js +2 -2
  174. package/src/sap/ui/fl/util/ManagedObjectModel.js +1 -1
  175. package/src/sap/ui/fl/util/resolveBinding.js +4 -2
  176. package/src/sap/ui/fl/variants/VariantManagement.js +3 -5
  177. package/src/sap/ui/fl/variants/VariantManager.js +12 -10
  178. package/src/sap/ui/fl/variants/VariantModel.js +26 -24
  179. package/src/sap/ui/fl/write/_internal/SaveAs.js +7 -8
  180. package/src/sap/ui/fl/write/_internal/Storage.js +1 -14
  181. package/src/sap/ui/fl/write/_internal/Versions.js +40 -27
  182. package/src/sap/ui/fl/write/_internal/appVariant/AppVariant.js +1 -1
  183. package/src/sap/ui/fl/write/_internal/appVariant/AppVariantFactory.js +1 -1
  184. package/src/sap/ui/fl/write/_internal/appVariant/AppVariantInlineChange.js +1 -1
  185. package/src/sap/ui/fl/write/_internal/appVariant/AppVariantInlineChangeFactory.js +1 -1
  186. package/src/sap/ui/fl/write/_internal/condenser/Condenser.js +1 -1
  187. package/src/sap/ui/fl/write/_internal/condenser/UIReconstruction.js +1 -1
  188. package/src/sap/ui/fl/write/_internal/connectors/BackendConnector.js +1 -1
  189. package/src/sap/ui/fl/write/_internal/connectors/BtpServiceConnector.js +1 -1
  190. package/src/sap/ui/fl/write/_internal/connectors/KeyUserConnector.js +1 -11
  191. package/src/sap/ui/fl/write/_internal/connectors/LrepConnector.js +4 -14
  192. package/src/sap/ui/fl/write/_internal/connectors/NeoLrepConnector.js +2 -39
  193. package/src/sap/ui/fl/write/_internal/connectors/ObjectPathConnector.js +1 -1
  194. package/src/sap/ui/fl/write/_internal/connectors/PersonalizationConnector.js +1 -1
  195. package/src/sap/ui/fl/write/_internal/connectors/Utils.js +1 -1
  196. package/src/sap/ui/fl/write/_internal/controlVariants/ControlVariantWriteUtils.js +4 -4
  197. package/src/sap/ui/fl/write/_internal/extensionPoint/Processor.js +1 -1
  198. package/src/sap/ui/fl/write/_internal/fieldExtensibility/ABAPAccess.js +1 -1
  199. package/src/sap/ui/fl/write/_internal/fieldExtensibility/ABAPExtensibilityVariant.js +1 -1
  200. package/src/sap/ui/fl/write/_internal/fieldExtensibility/ABAPExtensibilityVariantFactory.js +1 -1
  201. package/src/sap/ui/fl/write/_internal/fieldExtensibility/MultiTenantABAPExtensibilityVariant.js +1 -1
  202. package/src/sap/ui/fl/write/_internal/fieldExtensibility/ServiceValidation.js +1 -1
  203. package/src/sap/ui/fl/write/_internal/fieldExtensibility/SingleTenantABAPExtensibilityVariant.js +1 -1
  204. package/src/sap/ui/fl/write/_internal/fieldExtensibility/UriParser.js +1 -1
  205. package/src/sap/ui/fl/write/_internal/fieldExtensibility/Utils.js +1 -1
  206. package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/CAPAccess.js +1 -1
  207. package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/dialog/CustomFieldCAPDialog.js +1 -1
  208. package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/booleanEditor/BooleanEditor.js +1 -1
  209. package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/rangeEditor/RangeEditor.js +1 -1
  210. package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/timeEditor/TimeEditor.js +1 -1
  211. package/src/sap/ui/fl/write/_internal/flexState/FlexObjectManager.js +304 -50
  212. package/src/sap/ui/fl/write/_internal/flexState/UI2Personalization/UI2PersonalizationState.js +1 -1
  213. package/src/sap/ui/fl/write/_internal/flexState/changes/UIChangeManager.js +3 -3
  214. package/src/sap/ui/fl/write/_internal/flexState/compVariants/CompVariantState.js +5 -5
  215. package/src/sap/ui/fl/write/_internal/transport/TransportSelection.js +14 -14
  216. package/src/sap/ui/fl/write/_internal/transport/Transports.js +1 -1
  217. package/src/sap/ui/fl/write/api/BusinessNetworkAPI.js +55 -2
  218. package/src/sap/ui/fl/write/api/ChangesWriteAPI.js +38 -16
  219. package/src/sap/ui/fl/write/api/ContextSharingAPI.js +7 -7
  220. package/src/sap/ui/fl/write/api/ControlPersonalizationWriteAPI.js +6 -11
  221. package/src/sap/ui/fl/write/api/FeaturesAPI.js +23 -17
  222. package/src/sap/ui/fl/write/api/FieldExtensibility.js +1 -1
  223. package/src/sap/ui/fl/write/api/PersistenceWriteAPI.js +29 -14
  224. package/src/sap/ui/fl/write/api/ReloadInfoAPI.js +48 -76
  225. package/src/sap/ui/fl/write/api/SmartBusinessWriteAPI.js +2 -2
  226. package/src/sap/ui/fl/write/api/SmartVariantManagementWriteAPI.js +7 -7
  227. package/src/sap/ui/fl/write/api/VersionsAPI.js +15 -0
  228. package/src/sap/ui/fl/write/connectors/BaseConnector.js +0 -9
  229. package/ui5.yaml +0 -1
  230. package/src/sap/ui/fl/ChangePersistence.js +0 -438
  231. package/src/sap/ui/fl/ChangePersistenceFactory.js +0 -60
  232. package/src/sap/ui/fl/FlexController.js +0 -174
  233. package/src/sap/ui/fl/FlexControllerFactory.js +0 -82
  234. package/src/sap/ui/fl/registry/Settings.js +0 -477
@@ -1,82 +0,0 @@
1
- /*!
2
- * OpenUI5
3
- * (c) Copyright 2025 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/base/Log",
9
- "sap/ui/fl/apply/_internal/flexState/ManifestUtils",
10
- "sap/ui/fl/FlexController",
11
- "sap/ui/fl/Utils"
12
- ], function(
13
- Log,
14
- ManifestUtils,
15
- FlexController,
16
- Utils
17
- ) {
18
- "use strict";
19
- /**
20
- * Factory to create new instances of {sap.ui.fl.FlexController}
21
- * @constructor
22
- * @alias sap.ui.fl.FlexControllerFactory
23
- * @since 1.27.0
24
- * @author SAP SE
25
- * @version 1.136.3
26
- *
27
- * @private
28
- * @ui5-restricted sap.ui.fl
29
- */
30
- var FlexControllerFactory = {};
31
- FlexControllerFactory._instanceCache = {};
32
-
33
- /**
34
- * Creates or returns an instance of the FlexController
35
- *
36
- * @param {string} sComponentName - Name of the component
37
- * @returns {sap.ui.fl.FlexController} instance
38
- *
39
- */
40
- FlexControllerFactory.create = function(sComponentName) {
41
- var oFlexController = FlexControllerFactory._instanceCache[sComponentName];
42
-
43
- if (!oFlexController) {
44
- oFlexController = new FlexController(sComponentName);
45
- FlexControllerFactory._instanceCache[sComponentName] = oFlexController;
46
- }
47
-
48
- return oFlexController;
49
- };
50
-
51
- /**
52
- * Creates or returns an instance of the FlexController for the specified control.
53
- * The control needs to be embedded into a View and the view needs to be embedded into a component.
54
- * If the component is an embedded component, then the responsible app component is used.
55
- * If one of this prerequisites is not fulfilled, no instance of FlexController will be returned.
56
- *
57
- * @param {sap.ui.core.Control} oControl The control
58
- * @returns {sap.ui.fl.FlexController} instance
59
- */
60
- FlexControllerFactory.createForControl = function(oControl) {
61
- try {
62
- var oAppComponent = Utils.getAppComponentForControl(oControl);
63
- var sComponentName = ManifestUtils.getFlexReferenceForControl(oAppComponent || oControl);
64
- return FlexControllerFactory.create(sComponentName);
65
- } catch (oError) {
66
- Log.error(oError.message, undefined, "sap.ui.fl.FlexControllerFactory");
67
- }
68
- };
69
-
70
- /**
71
- * Creates or returns an instance of the FlexController for the specified selector.
72
- *
73
- * @param {sap.ui.fl.Selector} oSelector - Selector object
74
- * @returns {sap.ui.fl.FlexController} instance
75
- */
76
- FlexControllerFactory.createForSelector = function(oSelector) {
77
- var sComponentName = ManifestUtils.getFlexReferenceForSelector(oSelector);
78
- return FlexControllerFactory.create(sComponentName);
79
- };
80
-
81
- return FlexControllerFactory;
82
- });
@@ -1,477 +0,0 @@
1
- /*!
2
- * OpenUI5
3
- * (c) Copyright 2025 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/initial/_internal/Storage",
9
- "sap/ui/fl/Utils",
10
- "sap/base/Log"
11
- ], function(
12
- Storage,
13
- Utils,
14
- Log
15
- ) {
16
- "use strict";
17
-
18
- function retrieveUserId(oSettings) {
19
- if (oSettings && oSettings.logonUser) {
20
- return Promise.resolve(oSettings.logonUser);
21
- }
22
- var oUShellContainer = Utils.getUshellContainer();
23
- if (oUShellContainer) {
24
- return Utils.getUShellService("UserInfo")
25
- .then(function(oUserInfoService) {
26
- var oUser = oUserInfoService.getUser();
27
- return oUser && oUser.getId();
28
- })
29
- .catch(function(oError) {
30
- Log.error(`Error getting service from Unified Shell: ${oError.message}`);
31
- });
32
- }
33
- return Promise.resolve();
34
- }
35
-
36
- /**
37
- * FlexSettings access
38
- *
39
- * @param {object} oSettings - Settings as JSON object
40
- * @constructor
41
- * @alias sap.ui.fl.registry.Settings
42
- * @private
43
- * @ui5-restricted sap.ui.fl
44
- */
45
- var Settings = function(oSettings) {
46
- if (!oSettings) {
47
- throw new Error("no flex settings provided");
48
- }
49
- this._oSettings = oSettings;
50
- };
51
-
52
- /**
53
- * attaches a callback to an event on the event provider of Settings
54
- *
55
- * @param {string} sEventId - Name of the event
56
- * @param {function} oCallback - Callback that should be attached to the event
57
- */
58
- Settings.attachEvent = function(sEventId, oCallback) {
59
- Settings._oEventProvider.attachEvent(sEventId, oCallback);
60
- };
61
-
62
- /**
63
- * detaches a callback to an event on the event provider of Settings
64
- *
65
- * @param {string} sEventId - Name of the event
66
- * @param {function} oCallback - Callback that should be detached from the event
67
- */
68
- Settings.detachEvent = function(sEventId, oCallback) {
69
- Settings._oEventProvider.detachEvent(sEventId, oCallback);
70
- };
71
-
72
- /**
73
- * Returns a settings instance after reading the settings from the back end if not already done. There is only one instance of settings during a
74
- * session.
75
- *
76
- * @returns {Promise} With parameter <code>oInstance</code> of type {sap.ui.fl.registry.Settings}
77
- */
78
- Settings.getInstance = function() {
79
- if (Settings._instance) {
80
- return Promise.resolve(Settings._instance);
81
- }
82
- if (Settings._oLoadSettingsPromise) {
83
- return Settings._oLoadSettingsPromise;
84
- }
85
- return Settings._loadSettings();
86
- };
87
-
88
- /**
89
- * Sends request to the back end for settings content; Stores content into internal setting instance and returns the instance.
90
- *
91
- * @returns {Promise} With parameter <code>oInstance</code> of type {sap.ui.fl.registry.Settings}
92
- */
93
- Settings._loadSettings = function() {
94
- var oSettings;
95
- var oLoadingPromise = Storage.loadFeatures()
96
- .then(function(oLoadedSettings) {
97
- oSettings = oLoadedSettings;
98
- return retrieveUserId(oSettings);
99
- })
100
- .then(function(sUserId) {
101
- if (!oSettings) {
102
- Log.error("The request for flexibility settings failed; A default response is generated and returned to consuming APIs");
103
- // in case the back end cannot respond resolve with a default response
104
- oSettings = {
105
- isKeyUser: false,
106
- isKeyUserTranslationEnabled: false,
107
- isVariantSharingEnabled: false,
108
- isVariantPersonalizationEnabled: true,
109
- isAnnotationChangeEnabled: true,
110
- isAtoAvailable: false,
111
- isAtoEnabled: false,
112
- isAppVariantSaveAsEnabled: false,
113
- isContextSharingEnabled: true,
114
- isContextBasedAdaptationEnabled: false,
115
- isCondensingEnabled: false,
116
- isProductiveSystem: true,
117
- isPublicLayerAvailable: false,
118
- isLocalResetEnabled: false,
119
- isVariantAdaptationEnabled: false,
120
- isVariantAuthorNameAvailable: false,
121
- isSeenFeaturesAvailable: false,
122
- versioning: {},
123
- _bFlexChangeMode: false,
124
- _bFlexibilityAdaptationButtonAllowed: false
125
- };
126
- }
127
- // The following line is used by the Flex Support Tool to set breakpoints - please adjust the tool if you change it!
128
- oSettings.userId = sUserId;
129
- return Settings._storeInstance(oSettings);
130
- });
131
- Settings._oLoadSettingsPromise = oLoadingPromise;
132
- return oLoadingPromise;
133
- };
134
-
135
- /**
136
- * Writes the data received from the storage into an internal instance and then returns the settings object within a Promise.
137
- *
138
- * @param {object} oSettings - Data received from the storage
139
- * @returns {Promise} With parameter <code>oInstance</code> of type {sap.ui.fl.registry.Settings}
140
- *
141
- */
142
- Settings._storeInstance = function(oSettings) {
143
- Settings._instance ||= new Settings(oSettings);
144
- return Settings._instance;
145
- };
146
-
147
- /**
148
- * Returns a settings instance from the local instance cache. There is only one instance of settings during a session. If no instance has been
149
- * created before, undefined will be returned.
150
- *
151
- * @returns {sap.ui.fl.registry.Settings} Instance or undefined if no instance has been created so far
152
- */
153
- Settings.getInstanceOrUndef = function() {
154
- return Settings._instance;
155
- };
156
-
157
- /**
158
- * Getter for the default layer permissions
159
- * @returns {object} Map with the default layer permissions
160
- */
161
- Settings.getDefaultLayerPermissions = function() {
162
- return {
163
- VENDOR: true,
164
- CUSTOMER_BASE: true,
165
- CUSTOMER: true,
166
- PUBLIC: false,
167
- USER: false
168
- };
169
- };
170
-
171
- /**
172
- * Getter for the developer mode layer permissions
173
- * @returns {object} Map with the default developer mode layer permissions
174
- */
175
- Settings.getDeveloperModeLayerPermissions = function() {
176
- return {
177
- VENDOR: true,
178
- CUSTOMER_BASE: true,
179
- CUSTOMER: false,
180
- PUBLIC: false,
181
- USER: false
182
- };
183
- };
184
-
185
- /**
186
- * Reads boolean property of settings.
187
- *
188
- * @param {string} sPropertyName - Name of property
189
- * @returns {boolean} <code>true</code> if the property exists and is true
190
- */
191
- Settings.prototype._getBooleanProperty = function(sPropertyName) {
192
- return this._oSettings[sPropertyName] || false;
193
- };
194
-
195
- /**
196
- * Returns the key user status of the current user.
197
- *
198
- * @returns {boolean} <code>true</code> if the user is a flexibility key user, <code>false</code> if not supported
199
- */
200
- Settings.prototype.isKeyUser = function() {
201
- return this._getBooleanProperty("isKeyUser");
202
- };
203
-
204
- /**
205
- * Returns the information if translation is enabled for the KeyUser or not (has admin role).
206
- *
207
- * @returns {boolean} <code>true</code> if the user is a flexibility key user and has the admin role.
208
- */
209
- Settings.prototype.isKeyUserTranslationEnabled = function() {
210
- return this._getBooleanProperty("isKeyUserTranslationEnabled");
211
- };
212
-
213
- /**
214
- * Returns the information if a back end supports the PUBLIC layer.
215
- *
216
- * @returns {boolean} <code>true</code> if the PUBLIC layer is supported
217
- */
218
- Settings.prototype.isPublicLayerAvailable = function() {
219
- return this._getBooleanProperty("isPublicLayerAvailable");
220
- };
221
-
222
- /**
223
- * Returns the information if the adaptation of <code>sap.ui.comp.smartvariant.SmartVariantManagement</code> is enabled.
224
- *
225
- * @returns {boolean} <code>true</code> if the adaptation of <code>sap.ui.comp.smartvariant.SmartVariantManagement</code> is supported
226
- */
227
- Settings.prototype.isVariantAdaptationEnabled = function() {
228
- return this._getBooleanProperty("isVariantAdaptationEnabled");
229
- };
230
-
231
- /**
232
- * Returns a flag if save as app variants is enabled in the backend
233
- *
234
- * @returns {boolean} <code>true</code> if the underlying ABAP system allows app variants, <code>false</code> if not supported
235
- */
236
- Settings.prototype.isAppVariantSaveAsEnabled = function() {
237
- return !this.isContextBasedAdaptationEnabled() && this._getBooleanProperty("isAppVariantSaveAsEnabled");
238
- };
239
-
240
- /**
241
- * Returns a flag if save as key user adaptation is enabled in the backend
242
- *
243
- * @returns {boolean} <code>true</code> if the underlying ABAP system allows save as adaptation, <code>false</code> if not supported
244
- */
245
- Settings.prototype.isContextBasedAdaptationEnabled = function() {
246
- var oUriParameters = new URLSearchParams(window.location.search);
247
- var bIsContextBasedAdaptationEnabled = oUriParameters.get("sap-ui-xx-rta-adaptations");
248
- return bIsContextBasedAdaptationEnabled === "true" || this._getBooleanProperty("isContextBasedAdaptationEnabled");
249
- };
250
-
251
- /**
252
- * Returns a flag if the versioning is enabled for a given layer.
253
- *
254
- * @param {string} sLayer - Layer to check.
255
- * @returns {boolean} <code>true</code> if versioning is supported in the given layer
256
- */
257
- Settings.prototype.isVersioningEnabled = function(sLayer) {
258
- // there may be a versioning information for all layers
259
- return !!(this._oSettings.versioning[sLayer] || this._oSettings.versioning.ALL);
260
- };
261
-
262
- /**
263
- * Returns <code>true</code> if back end is ModelS back end.
264
- *
265
- * @returns {boolean} <code>true</code> if ATO coding exists in back end
266
- */
267
- Settings.prototype.isModelS = function() {
268
- return this._getBooleanProperty("isAtoAvailable");
269
- };
270
-
271
- /**
272
- * Returns <code>true</code> if ATO is enabled in the back end.
273
- *
274
- * @returns {boolean} <code>true</code> if ATO is enabled
275
- */
276
- Settings.prototype.isAtoEnabled = function() {
277
- return this._getBooleanProperty("isAtoEnabled");
278
- };
279
-
280
- /**
281
- * Returns <code>true</code> if ATO is available in the back end.
282
- *
283
- * @returns {boolean} <code>true</code> if ATO is available
284
- */
285
- Settings.prototype.isAtoAvailable = function() {
286
- return this._getBooleanProperty("isAtoAvailable");
287
- };
288
-
289
- /**
290
- * Checks whether the current system is defined as a productive system.
291
- *
292
- * @returns {boolean} <code>true</code> if system is productive system
293
- */
294
- Settings.prototype.isProductiveSystem = function() {
295
- return this._getBooleanProperty("isProductiveSystem");
296
- };
297
-
298
- /**
299
- * Checks whether sharing of <code>sap.ui.fl.apply._internal.flexObjects.CompVariant</code>s is enabled for the given user.
300
- *
301
- * @returns {boolean} <code>true</code> if sharing of <code>sap.ui.comp</code> variants is enabled
302
- */
303
- Settings.prototype.isVariantSharingEnabled = function() {
304
- return this._getBooleanProperty("isVariantSharingEnabled");
305
- };
306
-
307
- /**
308
- * Checks whether sharing of <code>sap.ui.fl</code> variants is enabled for the given user.
309
- *
310
- * @returns {boolean} <code>true</code> if sharing of <code>sap.ui.fl</code> variants is enabled
311
- */
312
- Settings.prototype.isPublicFlVariantEnabled = function() {
313
- return this._getBooleanProperty("isPublicFlVariantEnabled");
314
- };
315
-
316
- /**
317
- * Checks whether sharing of <code>sap.ui.fl</code> variants can be based on contexts.
318
- *
319
- * @returns {boolean} <code>true</code> if context based sharing of <code>sap.ui.fl</code> variants is enabled
320
- */
321
- Settings.prototype.isContextSharingEnabled = function() {
322
- return this._getBooleanProperty("isContextSharingEnabled");
323
- };
324
-
325
- /**
326
- * Checks whether personalization of variants is enabled or not.
327
- *
328
- * @returns {boolean} <code>true</code> if personalization of variants is enabled
329
- */
330
- Settings.prototype.isVariantPersonalizationEnabled = function() {
331
- return this._getBooleanProperty("isVariantPersonalizationEnabled");
332
- };
333
-
334
- /**
335
- * Checks whether full names of variants' authors are available or not.
336
- *
337
- * @returns {boolean} <code>true</code> if personalization of variants is enabled
338
- */
339
- Settings.prototype.isVariantAuthorNameAvailable = function() {
340
- return this._getBooleanProperty("isVariantAuthorNameAvailable");
341
- };
342
-
343
- /**
344
- * Checks whether condensing of changes is enabled for the used backend.
345
- *
346
- * @returns {boolean} <code>true</code> if condensing of changes is enabled
347
- */
348
- Settings.prototype.isCondensingEnabled = function() {
349
- return this._getBooleanProperty("isCondensingEnabled");
350
- };
351
-
352
- /**
353
- * Checks whether the personalization connector is used.
354
- *
355
- * @returns {boolean} <code>true</code> if personalization connector is used
356
- */
357
- Settings.prototype.hasPersoConnector = function() {
358
- return this._getBooleanProperty("hasPersoConnector");
359
- };
360
-
361
- /**
362
- * Checks whether change transport mechanism is available for the current system or not.
363
- *
364
- * @returns {boolean} <code>true</code> if transport of changes is available
365
- */
366
- Settings.prototype.isSystemWithTransports = function() {
367
- // Currently, transport mechanism is only available in ABAP stack which can be identified by system and client ids
368
- return !!(this._oSettings.system && this._oSettings.client);
369
- };
370
-
371
- /**
372
- * Checks whether publishing of versions is available for the current backend or not.
373
- *
374
- * @returns {boolean} <code>true</code> if publishing of versions is available
375
- */
376
- Settings.prototype.isPublishAvailable = function() {
377
- // Currently, only Keyuser service with Content Agent integrated will return this settings value
378
- return !!this._oSettings.isPublishAvailable;
379
- };
380
-
381
- /**
382
- * Checks whether the current system is defined as a productive system and transport mechanism of changes is also available or not.
383
- *
384
- * @returns {boolean} <code>true</code> if transport of changes is available
385
- */
386
- Settings.prototype.isProductiveSystemWithTransports = function() {
387
- return this.isProductiveSystem() && this.isSystemWithTransports();
388
- };
389
-
390
- /**
391
- * Returns the information if a back end supports local reset.
392
- *
393
- * @returns {boolean} <code>true</code> if the local reset is supported
394
- */
395
- Settings.prototype.isLocalResetEnabled = function() {
396
- return this._getBooleanProperty("isLocalResetEnabled");
397
- };
398
-
399
- /**
400
- * Returns the information if a backend supports to save viewed features for What's New.
401
- *
402
- * @returns {boolean} <code>true</code> if viewed features is supported
403
- */
404
- Settings.prototype.isSeenFeaturesAvailable = function() {
405
- return this._getBooleanProperty("isSeenFeaturesAvailable");
406
- };
407
-
408
- /**
409
- * Returns the information if a backend supports annotation changes.
410
- *
411
- * @returns {boolean} <code>true</code> if annotation changes are supported
412
- */
413
- Settings.prototype.isAnnotationChangeEnabled = function() {
414
- return this._getBooleanProperty("isAnnotationChangeEnabled");
415
- };
416
-
417
- /**
418
- * Getter for the system ID of the connected back end.
419
- * This is taken from the <code>system</code> property of the flex settings. Only filled for an ABAP back end.
420
- *
421
- * @returns {string} System ID of the connected back end or undefined (when property <code>system</code> does not exist in the flex settings file)
422
- */
423
- Settings.prototype.getSystem = function() {
424
- return this._oSettings.system;
425
- };
426
-
427
- /**
428
- * Getter for the client of the connected back end.
429
- * This is taken from the <code>client</code> property of the flex settings. Only filled for an ABAP back end.
430
- *
431
- * @returns {string} Client of the connected backend or undefined (when property <code>system</code> does not exist in the flex settings file)
432
- */
433
- Settings.prototype.getClient = function() {
434
- return this._oSettings.client;
435
- };
436
-
437
- // Used for stubbing in tests
438
- Settings.prototype._getHostname = function() {
439
- return document.location.hostname;
440
- };
441
-
442
- /**
443
- * Detects whether the system is a customer system.
444
- * This is taken from the <code>systemType</code> property of the flex settings (only filled for an ABAP back end)
445
- * or the hostname.
446
- *
447
- * @returns {boolean} <code>true</code> if it is a customer system
448
- */
449
- Settings.prototype.isCustomerSystem = function() {
450
- var sSystemType = this._oSettings.systemType;
451
- var bIsCustomerSystem = {
452
- CUSTOMER: true,
453
- SAP: false
454
- }[sSystemType];
455
- var sHostname = this._getHostname();
456
-
457
- return bIsCustomerSystem !== undefined
458
- ? bIsCustomerSystem
459
- // Fallback if back end has no info, guess based on hostname
460
- : !(
461
- sHostname === "localhost"
462
- || sHostname === "127.0.0.1"
463
- );
464
- };
465
-
466
- /**
467
- * Getter for the id of the current user.
468
- * This is taken from the <code>userId</code> property of the flex settings.
469
- *
470
- * @returns {string} User ID of the current user.
471
- */
472
- Settings.prototype.getUserId = function() {
473
- return this._oSettings.userId;
474
- };
475
-
476
- return Settings;
477
- }, /* bExport= */true);