@openui5/sap.ui.fl 1.98.0 → 1.101.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.
- package/THIRDPARTY.txt +6 -6
- package/package.json +3 -3
- package/src/sap/ui/fl/.library +1 -1
- package/src/sap/ui/fl/Cache.js +1 -1
- package/src/sap/ui/fl/Change.js +34 -12
- package/src/sap/ui/fl/ChangePersistence.js +130 -168
- package/src/sap/ui/fl/ChangePersistenceFactory.js +2 -2
- package/src/sap/ui/fl/FakeLrepConnectorLocalStorage.js +3 -4
- package/src/sap/ui/fl/FakeLrepConnectorSessionStorage.js +3 -4
- package/src/sap/ui/fl/FakeLrepLocalStorage.js +4 -4
- package/src/sap/ui/fl/FlexController.js +25 -57
- package/src/sap/ui/fl/FlexControllerFactory.js +5 -2
- package/src/sap/ui/fl/LayerUtils.js +1 -1
- package/src/sap/ui/fl/Utils.js +14 -14
- package/src/sap/ui/fl/Variant.js +5 -5
- package/src/sap/ui/fl/apply/_internal/DelegateMediator.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/Applier.js +56 -9
- package/src/sap/ui/fl/apply/_internal/changes/FlexCustomData.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/Reverter.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/Utils.js +46 -2
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/Preprocessor.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/Registration.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/RegistrationBuild.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/AddAnnotationsToOData.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/ChangeDataSource.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/ChangeInbound.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/SetTitle.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/fiori/SetAbstract.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/fiori/SetRegistrationIds.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ovp/AddNewCard.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ovp/ChangeCard.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ovp/DeleteCard.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddComponentUsages.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddLibrary.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddNewModel.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddNewModelEnhanceWith.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/SetFlexExtensionPointEnabled.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/SetMinUI5Version.js +1 -1
- package/src/sap/ui/fl/apply/_internal/connectors/ObjectStorageUtils.js +1 -1
- package/src/sap/ui/fl/apply/_internal/extensionPoint/Processor.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/CompVariant.js +8 -0
- package/src/sap/ui/fl/apply/_internal/flexObjects/FlexObject.js +452 -0
- package/src/sap/ui/fl/apply/_internal/flexObjects/FlexObjectFactory.js +68 -0
- package/src/sap/ui/fl/apply/_internal/flexState/FlexState.js +34 -43
- package/src/sap/ui/fl/apply/_internal/flexState/Loader.js +1 -3
- package/src/sap/ui/fl/apply/_internal/flexState/ManifestUtils.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexState/UI2Personalization/UI2PersonalizationState.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexState/changes/DependencyHandler.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexState/changes/ExtensionPointState.js +12 -10
- package/src/sap/ui/fl/apply/_internal/flexState/compVariants/CompVariantMerger.js +2 -2
- package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/Switcher.js +1 -4
- package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/VariantManagementState.js +34 -32
- package/src/sap/ui/fl/{PreprocessorImpl.js → apply/_internal/preprocessors/ControllerExtension.js} +38 -47
- package/src/sap/ui/fl/{EventHistory.js → apply/_internal/preprocessors/EventHistory.js} +7 -7
- package/src/sap/ui/fl/{RegistrationDelegator.js → apply/_internal/preprocessors/RegistrationDelegator.js} +40 -42
- package/src/sap/ui/fl/{XmlPreprocessorImpl.js → apply/_internal/preprocessors/XmlPreprocessor.js} +6 -6
- package/src/sap/ui/fl/apply/api/ControlVariantApplyAPI.js +1 -1
- package/src/sap/ui/fl/apply/api/SmartVariantManagementApplyAPI.js +1 -1
- package/src/sap/ui/fl/changeHandler/AddIFrame.js +1 -1
- package/src/sap/ui/fl/changeHandler/AddXML.js +1 -1
- package/src/sap/ui/fl/changeHandler/AddXMLAtExtensionPoint.js +1 -1
- package/src/sap/ui/fl/changeHandler/Base.js +1 -1
- package/src/sap/ui/fl/changeHandler/BaseAddViaDelegate.js +1 -1
- package/src/sap/ui/fl/changeHandler/BaseAddXml.js +1 -1
- package/src/sap/ui/fl/changeHandler/BaseRename.js +1 -1
- package/src/sap/ui/fl/changeHandler/HideControl.js +1 -1
- package/src/sap/ui/fl/changeHandler/MoveControls.js +7 -2
- package/src/sap/ui/fl/changeHandler/MoveElements.js +1 -1
- package/src/sap/ui/fl/changeHandler/PropertyBindingChange.js +1 -1
- package/src/sap/ui/fl/changeHandler/PropertyChange.js +1 -1
- package/src/sap/ui/fl/changeHandler/StashControl.js +1 -1
- package/src/sap/ui/fl/changeHandler/UnhideControl.js +1 -1
- package/src/sap/ui/fl/changeHandler/UnstashControl.js +1 -1
- package/src/sap/ui/fl/changeHandler/UpdateIFrame.js +1 -1
- package/src/sap/ui/fl/codeExt/CodeExtManager.js +1 -1
- package/src/sap/ui/fl/descriptorRelated/api/DescriptorChangeFactory.js +4 -4
- package/src/sap/ui/fl/descriptorRelated/api/DescriptorInlineChangeFactory.js +1 -1
- package/src/sap/ui/fl/descriptorRelated/api/DescriptorVariantFactory.js +1 -1
- package/src/sap/ui/fl/initial/_internal/Storage.js +1 -1
- package/src/sap/ui/fl/initial/_internal/StorageUtils.js +1 -1
- package/src/sap/ui/fl/initial/_internal/changeHandlers/ChangeRegistryItem.js +9 -9
- package/src/sap/ui/fl/initial/_internal/connectors/Utils.js +1 -1
- package/src/sap/ui/fl/initial/_internal/storageResultDisassemble.js +1 -1
- package/src/sap/ui/fl/interfaces/BaseLoadConnector.js +1 -1
- package/src/sap/ui/fl/interfaces/Delegate.js +1 -1
- package/src/sap/ui/fl/library.js +16 -16
- package/src/sap/ui/fl/messagebundle_fr.properties +14 -14
- package/src/sap/ui/fl/registry/Settings.js +44 -5
- package/src/sap/ui/fl/support/Flexibility.js +1 -1
- package/src/sap/ui/fl/support/_internal/getChangeDependencies.js +1 -1
- package/src/sap/ui/fl/support/_internal/getFlexSettings.js +34 -0
- package/src/sap/ui/fl/support/api/SupportAPI.js +5 -2
- package/src/sap/ui/fl/support/apps/contentbrowser/controller/ContentDetails.controller.js +1 -1
- package/src/sap/ui/fl/support/apps/contentbrowser/controller/ContentDetailsEdit.controller.js +1 -1
- package/src/sap/ui/fl/support/apps/contentbrowser/controller/LayerContentMaster.controller.js +1 -1
- package/src/sap/ui/fl/support/apps/contentbrowser/controller/Layers.controller.js +1 -1
- package/src/sap/ui/fl/support/apps/contentbrowser/lrepConnector/LRepConnector.js +1 -1
- package/src/sap/ui/fl/support/apps/contentbrowser/utils/DataUtils.js +4 -4
- package/src/sap/ui/fl/support/apps/contentbrowser/utils/ErrorUtils.js +4 -4
- package/src/sap/ui/fl/support/diagnostics/Flexibility.controller.js +1 -1
- package/src/sap/ui/fl/themes/base/VariantManagement.less +0 -1
- package/src/sap/ui/fl/transport/TransportSelection.js +1 -1
- package/src/sap/ui/fl/util/DescriptorChangeCheck.js +1 -1
- package/src/sap/ui/fl/util/IFrame.js +1 -1
- package/src/sap/ui/fl/util/IFrameRenderer.js +1 -1
- package/src/sap/ui/fl/util/ManagedObjectModel.js +1 -1
- package/src/sap/ui/fl/util/changePropertyValueByPath.js +1 -1
- package/src/sap/ui/fl/util/resolveBinding.js +1 -1
- package/src/sap/ui/fl/variants/VariantManagement.js +5 -0
- package/src/sap/ui/fl/variants/VariantModel.js +34 -31
- package/src/sap/ui/fl/variants/context/Component.js +2 -6
- package/src/sap/ui/fl/variants/context/controller/ContextVisibility.controller.js +6 -41
- package/src/sap/ui/fl/variants/context/i18n/i18n.properties +3 -7
- package/src/sap/ui/fl/variants/context/i18n/i18n_ar.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_bg.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_ca.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_cs.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_cy.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_da.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_de.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_el.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_en.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_en_GB.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_en_US_sappsd.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_en_US_saprigi.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_en_US_saptrc.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_es.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_es_MX.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_et.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_fi.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_fr.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_fr_CA.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_hi.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_hr.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_hu.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_id.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_it.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_iw.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_ja.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_kk.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_ko.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_lt.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_lv.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_ms.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_nl.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_no.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_pl.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_pt.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_pt_PT.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_ro.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_ru.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_sh.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_sk.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_sl.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_sv.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_th.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_tr.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_uk.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_vi.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_zh_CN.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_zh_TW.properties +2 -4
- package/src/sap/ui/fl/variants/context/view/ContextVisibility.view.xml +7 -6
- package/src/sap/ui/fl/write/_internal/Storage.js +15 -1
- package/src/sap/ui/fl/write/_internal/StorageFeaturesMerger.js +1 -1
- package/src/sap/ui/fl/write/_internal/Versions.js +2 -2
- package/src/sap/ui/fl/write/_internal/appVariant/AppVariant.js +5 -1
- package/src/sap/ui/fl/write/_internal/appVariant/AppVariantFactory.js +4 -2
- package/src/sap/ui/fl/write/_internal/appVariant/AppVariantInlineChange.js +1 -1
- package/src/sap/ui/fl/write/_internal/appVariant/AppVariantInlineChangeFactory.js +1 -1
- package/src/sap/ui/fl/write/_internal/condenser/Condenser.js +2 -2
- package/src/sap/ui/fl/write/_internal/condenser/UIReconstruction.js +1 -1
- package/src/sap/ui/fl/write/_internal/connectors/BackendConnector.js +1 -1
- package/src/sap/ui/fl/write/_internal/connectors/KeyUserConnector.js +33 -3
- package/src/sap/ui/fl/write/_internal/connectors/LrepConnector.js +1 -4
- package/src/sap/ui/fl/write/_internal/connectors/NeoLrepConnector.js +1 -1
- package/src/sap/ui/fl/write/_internal/connectors/ObjectPathConnector.js +1 -1
- package/src/sap/ui/fl/write/_internal/connectors/PersonalizationConnector.js +1 -1
- package/src/sap/ui/fl/write/_internal/connectors/Utils.js +1 -1
- package/src/sap/ui/fl/write/_internal/extensionPoint/Processor.js +1 -1
- package/src/sap/ui/fl/write/_internal/extensionPoint/Registry.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/ABAPAccess.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/ABAPExtensibilityVariant.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/ABAPExtensibilityVariantFactory.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/MultiTenantABAPExtensibilityVariant.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/ServiceValidation.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/SingleTenantABAPExtensibilityVariant.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/UriParser.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/Utils.js +5 -5
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/CAPAccess.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/dialog/CustomFieldCAPDialog.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/booleanEditor/BooleanEditor.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/rangeEditor/RangeEditor.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/timeEditor/TimeEditor.js +1 -1
- package/src/sap/ui/fl/write/_internal/flexState/FlexObjectState.js +2 -2
- package/src/sap/ui/fl/write/_internal/flexState/compVariants/CompVariantState.js +1 -1
- package/src/sap/ui/fl/write/_internal/transport/TransportSelection.js +1 -1
- package/src/sap/ui/fl/write/_internal/transport/Transports.js +1 -1
- package/src/sap/ui/fl/write/api/AppVariantWriteAPI.js +13 -4
- package/src/sap/ui/fl/write/api/ControlPersonalizationWriteAPI.js +125 -32
- package/src/sap/ui/fl/write/api/FeaturesAPI.js +4 -1
- package/src/sap/ui/fl/write/api/FieldExtensibility.js +1 -1
- package/src/sap/ui/fl/write/api/PersistenceWriteAPI.js +49 -4
- package/src/sap/ui/fl/write/api/TranslationAPI.js +23 -2
- package/src/sap/ui/fl/write/connectors/BaseConnector.js +13 -0
|
@@ -44,10 +44,12 @@ sap.ui.define([
|
|
|
44
44
|
* The persistence happens inside an object mapped to the component reference, with the following properties:
|
|
45
45
|
*
|
|
46
46
|
* {
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
47
|
+
* preparedMaps: {
|
|
48
|
+
* appDescriptorMap: {},
|
|
49
|
+
* changesMap: {},
|
|
50
|
+
* variantsMap: {},
|
|
51
|
+
* compVariantsMap: {},
|
|
52
|
+
* },
|
|
51
53
|
* storageResponse: {
|
|
52
54
|
* changes: {
|
|
53
55
|
* changes: [...],
|
|
@@ -65,14 +67,16 @@ sap.ui.define([
|
|
|
65
67
|
* },
|
|
66
68
|
* loadModules: <boolean>
|
|
67
69
|
* },
|
|
70
|
+
* unfilteredStorageResnonse: {...}, // same as above but without layer filtering
|
|
68
71
|
* partialFlexState: <boolean>,
|
|
69
|
-
* componentId: "<componentId>"
|
|
72
|
+
* componentId: "<componentId>",
|
|
73
|
+
* componentData: {...}
|
|
70
74
|
* }
|
|
71
75
|
*
|
|
72
76
|
* @namespace sap.ui.fl.apply._internal.flexState.FlexState
|
|
73
77
|
* @experimental
|
|
74
78
|
* @since 1.73
|
|
75
|
-
* @version 1.
|
|
79
|
+
* @version 1.101.0
|
|
76
80
|
* @private
|
|
77
81
|
* @ui5-restricted sap.ui.fl.apply._internal
|
|
78
82
|
*/
|
|
@@ -84,7 +88,6 @@ sap.ui.define([
|
|
|
84
88
|
var _oShellNavigationService;
|
|
85
89
|
var _oURLParsingService;
|
|
86
90
|
var _oChangePersistenceFactory;
|
|
87
|
-
var _oFlexControllerFactory;
|
|
88
91
|
var _mFlexObjectInfo = {
|
|
89
92
|
appDescriptorChanges: {
|
|
90
93
|
prepareFunction: prepareAppDescriptorMap,
|
|
@@ -104,16 +107,12 @@ sap.ui.define([
|
|
|
104
107
|
}
|
|
105
108
|
};
|
|
106
109
|
// some runtime data is only fetched once (e.g. during control init) and has to survive an invalidation of the FlexState
|
|
110
|
+
// TODO: move to maps as soon as they don't get cleared with cache invalidation
|
|
107
111
|
var _mExternalData = {
|
|
108
112
|
compVariants: {},
|
|
109
113
|
variants: {}
|
|
110
114
|
};
|
|
111
115
|
|
|
112
|
-
function updateComponentData(mPropertyBag) {
|
|
113
|
-
var oComponent = Component.get(mPropertyBag.componentId);
|
|
114
|
-
_mInstances[mPropertyBag.reference].componentData = oComponent ? oComponent.getComponentData() : mPropertyBag.componentData;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
116
|
function enhancePropertyBag(mPropertyBag) {
|
|
118
117
|
var oComponent = Component.get(mPropertyBag.componentId);
|
|
119
118
|
mPropertyBag.componentData = mPropertyBag.componentData || oComponent.getComponentData() || {};
|
|
@@ -127,6 +126,9 @@ sap.ui.define([
|
|
|
127
126
|
}
|
|
128
127
|
|
|
129
128
|
if (!_mInstances[sReference].preparedMaps[sMapName]) {
|
|
129
|
+
if (!_mInstances[sReference].storageResponse) {
|
|
130
|
+
_mInstances[sReference].storageResponse = filterByMaxLayer(_mInstances[sReference].unfilteredStorageResponse);
|
|
131
|
+
}
|
|
130
132
|
var mPropertyBag = {
|
|
131
133
|
unfilteredStorageResponse: _mInstances[sReference].unfilteredStorageResponse,
|
|
132
134
|
storageResponse: _mInstances[sReference].storageResponse,
|
|
@@ -214,7 +216,7 @@ sap.ui.define([
|
|
|
214
216
|
|
|
215
217
|
function registerMaxLayerHandler(sReference) {
|
|
216
218
|
var oShellNavigationService = getUShellService("ShellNavigation");
|
|
217
|
-
if (oShellNavigationService) {
|
|
219
|
+
if (oShellNavigationService && !_mNavigationHandlers[sReference]) {
|
|
218
220
|
_mNavigationHandlers[sReference] = handleMaxLayerChange.bind(null, sReference);
|
|
219
221
|
oShellNavigationService.registerNavigationFilter(_mNavigationHandlers[sReference]);
|
|
220
222
|
}
|
|
@@ -248,10 +250,6 @@ sap.ui.define([
|
|
|
248
250
|
return undefined;
|
|
249
251
|
}
|
|
250
252
|
|
|
251
|
-
function clearPreparedMaps(sReference) {
|
|
252
|
-
_mInstances[sReference].preparedMaps = {};
|
|
253
|
-
}
|
|
254
|
-
|
|
255
253
|
function checkPartialFlexState(mInitProperties) {
|
|
256
254
|
var oFlexInstance = _mInstances[mInitProperties.reference];
|
|
257
255
|
if (oFlexInstance.partialFlexState === true && mInitProperties.partialFlexState !== true) {
|
|
@@ -296,16 +294,14 @@ sap.ui.define([
|
|
|
296
294
|
return undefined;
|
|
297
295
|
}
|
|
298
296
|
|
|
299
|
-
// TODO: get rid of the following module dependencies as
|
|
300
|
-
//
|
|
297
|
+
// TODO: get rid of the following module dependencies as soon as the change state
|
|
298
|
+
// is migrated from changePersistenceFactory to the FlexState
|
|
301
299
|
function lazyLoadModules() {
|
|
302
300
|
return Promise.all([
|
|
303
|
-
Utils.requireAsync("sap/ui/fl/ChangePersistenceFactory")
|
|
304
|
-
Utils.requireAsync("sap/ui/fl/FlexControllerFactory")
|
|
301
|
+
Utils.requireAsync("sap/ui/fl/ChangePersistenceFactory")
|
|
305
302
|
])
|
|
306
303
|
.then(function(aModules) {
|
|
307
304
|
_oChangePersistenceFactory = aModules[0];
|
|
308
|
-
_oFlexControllerFactory = aModules[1];
|
|
309
305
|
})
|
|
310
306
|
.catch(function(oError) {
|
|
311
307
|
Log.error("Error loading modules: " + oError.message);
|
|
@@ -325,7 +321,7 @@ sap.ui.define([
|
|
|
325
321
|
* @param {object} [mPropertyBag.asyncHints] - Async hints passed from the app index to the component processing
|
|
326
322
|
* @param {string} [mPropertyBag.version] - Number of the version in which the state should be initialized
|
|
327
323
|
* @param {boolean} [mPropertyBag.partialFlexState=false] - if true state is initialized partially and does not include flex bundles
|
|
328
|
-
* @returns {
|
|
324
|
+
* @returns {Promise<undefined>} Resolves a promise as soon as FlexState is initialized
|
|
329
325
|
*/
|
|
330
326
|
FlexState.initialize = function(mPropertyBag) {
|
|
331
327
|
return Promise.all([
|
|
@@ -349,11 +345,10 @@ sap.ui.define([
|
|
|
349
345
|
|
|
350
346
|
return loadFlexData(mPropertyBag);
|
|
351
347
|
})
|
|
352
|
-
.then(function(mPropertyBag
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
_mInstances[mPropertyBag.reference].
|
|
356
|
-
updateComponentData(mPropertyBag);
|
|
348
|
+
.then(function(mPropertyBag) {
|
|
349
|
+
if (!_mInstances[mPropertyBag.reference].componentData) {
|
|
350
|
+
var oComponent = Component.get(mPropertyBag.componentId);
|
|
351
|
+
_mInstances[mPropertyBag.reference].componentData = oComponent ? oComponent.getComponentData() : mPropertyBag.componentData;
|
|
357
352
|
}
|
|
358
353
|
}.bind(null, mPropertyBag));
|
|
359
354
|
};
|
|
@@ -367,7 +362,7 @@ sap.ui.define([
|
|
|
367
362
|
* @param {object} [mPropertyBag.manifest] - Manifest that belongs to actual component
|
|
368
363
|
* @param {string} [mPropertyBag.componentData] - Component data of the current component
|
|
369
364
|
* @param {string} [mPropertyBag.version] - Number of the version in which the state should be initialized
|
|
370
|
-
* @returns {
|
|
365
|
+
* @returns {Promise<undefined>} Resolves a promise as soon as FlexState is initialized again
|
|
371
366
|
*/
|
|
372
367
|
FlexState.clearAndInitialize = function(mPropertyBag) {
|
|
373
368
|
enhancePropertyBag(mPropertyBag);
|
|
@@ -383,13 +378,13 @@ sap.ui.define([
|
|
|
383
378
|
deRegisterMaxLayerHandler(sReference);
|
|
384
379
|
delete _mInstances[sReference];
|
|
385
380
|
delete _mInitPromises[sReference];
|
|
386
|
-
// TODO: get rid of the following deletes as
|
|
387
|
-
//
|
|
388
|
-
if (
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
381
|
+
// TODO: get rid of the following deletes as soon as the change state
|
|
382
|
+
// is migrated from changePersistenceFactory to the FlexState
|
|
383
|
+
if (
|
|
384
|
+
_oChangePersistenceFactory
|
|
385
|
+
&& (_oChangePersistenceFactory._instanceCache || {}).hasOwnProperty(sReference)
|
|
386
|
+
) {
|
|
387
|
+
_oChangePersistenceFactory._instanceCache[sReference].removeDirtyChanges();
|
|
393
388
|
}
|
|
394
389
|
} else {
|
|
395
390
|
Object.keys(_mInstances).forEach(function(sReference) {
|
|
@@ -433,14 +428,10 @@ sap.ui.define([
|
|
|
433
428
|
* The next initialize call will add it again.
|
|
434
429
|
*
|
|
435
430
|
* @param {string} sReference - Flex reference of the app
|
|
436
|
-
* @param {string} sComponentId - Component instance ID
|
|
437
431
|
*/
|
|
438
|
-
FlexState.clearFilteredResponse = function(sReference
|
|
439
|
-
if (
|
|
440
|
-
_mInstances[sReference]
|
|
441
|
-
&& (!sComponentId || sComponentId === _mInstances[sReference].componentId)
|
|
442
|
-
) {
|
|
443
|
-
clearPreparedMaps(sReference);
|
|
432
|
+
FlexState.clearFilteredResponse = function(sReference) {
|
|
433
|
+
if (_mInstances[sReference]) {
|
|
434
|
+
_mInstances[sReference].preparedMaps = {};
|
|
444
435
|
delete _mInstances[sReference].storageResponse;
|
|
445
436
|
}
|
|
446
437
|
};
|
|
@@ -5,12 +5,10 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
sap.ui.define([
|
|
8
|
-
"sap/base/util/deepClone",
|
|
9
8
|
"sap/ui/fl/apply/_internal/flexState/ManifestUtils",
|
|
10
9
|
"sap/ui/fl/initial/_internal/Storage",
|
|
11
10
|
"sap/ui/fl/Utils"
|
|
12
11
|
], function(
|
|
13
|
-
deepClone,
|
|
14
12
|
ManifestUtils,
|
|
15
13
|
ApplyStorage,
|
|
16
14
|
Utils
|
|
@@ -75,7 +73,7 @@ sap.ui.define([
|
|
|
75
73
|
* @namespace sap.ui.fl.apply._internal.flexState.Loader
|
|
76
74
|
* @experimental
|
|
77
75
|
* @since 1.74
|
|
78
|
-
* @version 1.
|
|
76
|
+
* @version 1.101.0
|
|
79
77
|
* @private
|
|
80
78
|
* @ui5-restricted sap.ui.fl.apply._internal.flexState
|
|
81
79
|
*/
|
|
@@ -5,17 +5,19 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
sap.ui.define([
|
|
8
|
-
"sap/ui/fl/write/api/ChangesWriteAPI",
|
|
9
|
-
"sap/ui/fl/ChangePersistenceFactory",
|
|
10
8
|
"sap/base/util/restricted/_omit",
|
|
11
9
|
"sap/base/util/merge",
|
|
12
|
-
"sap/base/Log"
|
|
10
|
+
"sap/base/Log",
|
|
11
|
+
"sap/ui/fl/apply/_internal/changes/Utils",
|
|
12
|
+
"sap/ui/fl/write/api/ChangesWriteAPI",
|
|
13
|
+
"sap/ui/fl/ChangePersistenceFactory"
|
|
13
14
|
], function(
|
|
14
|
-
ChangesWriteAPI,
|
|
15
|
-
ChangePersistenceFactory,
|
|
16
15
|
_omit,
|
|
17
16
|
merge,
|
|
18
|
-
Log
|
|
17
|
+
Log,
|
|
18
|
+
ChangesUtils,
|
|
19
|
+
ChangesWriteAPI,
|
|
20
|
+
ChangePersistenceFactory
|
|
19
21
|
) {
|
|
20
22
|
"use strict";
|
|
21
23
|
|
|
@@ -26,17 +28,17 @@ sap.ui.define([
|
|
|
26
28
|
* @namespace sap.ui.fl.apply._internal.flexState.changes.ExtensionPointState
|
|
27
29
|
* @experimental Since 1.79
|
|
28
30
|
* @since 1.79
|
|
29
|
-
* @version 1.
|
|
31
|
+
* @version 1.101.0
|
|
30
32
|
* @private
|
|
31
33
|
* @ui5-restricted
|
|
32
34
|
*/
|
|
33
35
|
var ExtensionPointState = {};
|
|
34
36
|
|
|
35
|
-
function isChangeValidForExtensionPoint(
|
|
37
|
+
function isChangeValidForExtensionPoint(mPropertyBag, oChange) {
|
|
36
38
|
if (oChange.getSelector().name !== mPropertyBag.extensionPointName) {
|
|
37
39
|
return false;
|
|
38
40
|
}
|
|
39
|
-
return
|
|
41
|
+
return ChangesUtils.filterChangeByView(mPropertyBag, oChange);
|
|
40
42
|
}
|
|
41
43
|
|
|
42
44
|
function isValidForRuntimeOnlyChanges(oChange, mExtensionPointInfo) {
|
|
@@ -101,7 +103,7 @@ sap.ui.define([
|
|
|
101
103
|
}
|
|
102
104
|
return oChangePersistence.getChangesForComponent()
|
|
103
105
|
.then(function(aChanges) {
|
|
104
|
-
return aChanges.filter(isChangeValidForExtensionPoint.bind(
|
|
106
|
+
return aChanges.filter(isChangeValidForExtensionPoint.bind(undefined, mPropertyBag));
|
|
105
107
|
});
|
|
106
108
|
};
|
|
107
109
|
|
|
@@ -114,7 +114,7 @@ sap.ui.define([
|
|
|
114
114
|
*
|
|
115
115
|
* @namespace sap.ui.fl.apply._internal.flexState.compVariants.CompVariantMerger
|
|
116
116
|
* @since 1.86
|
|
117
|
-
* @version 1.
|
|
117
|
+
* @version 1.101.0
|
|
118
118
|
* @private
|
|
119
119
|
* @ui5-restricted sap.ui.fl
|
|
120
120
|
*/
|
|
@@ -179,7 +179,7 @@ sap.ui.define([
|
|
|
179
179
|
*
|
|
180
180
|
* @function
|
|
181
181
|
* @since 1.89
|
|
182
|
-
* @version 1.
|
|
182
|
+
* @version 1.101.0
|
|
183
183
|
* @private
|
|
184
184
|
* @ui5-restricted sap.ui.fl
|
|
185
185
|
*
|
|
@@ -36,7 +36,6 @@ sap.ui.define([
|
|
|
36
36
|
var aCurrentVariantChanges = VariantManagementState.getControlChangesForVariant(
|
|
37
37
|
Object.assign(
|
|
38
38
|
_pick(mPropertyBag, ["vmReference", "variantsMap", "reference"]), {
|
|
39
|
-
changeInstance: true,
|
|
40
39
|
vReference: mPropertyBag.currentVReference
|
|
41
40
|
}
|
|
42
41
|
)
|
|
@@ -44,7 +43,6 @@ sap.ui.define([
|
|
|
44
43
|
var aNewChanges = VariantManagementState.getControlChangesForVariant(
|
|
45
44
|
Object.assign(
|
|
46
45
|
_pick(mPropertyBag, ["vmReference", "variantsMap", "reference"]), {
|
|
47
|
-
changeInstance: true,
|
|
48
46
|
vReference: mPropertyBag.newVReference
|
|
49
47
|
}
|
|
50
48
|
)
|
|
@@ -93,7 +91,7 @@ sap.ui.define([
|
|
|
93
91
|
* @namespace sap.ui.fl.apply._internal.flexState.controlVariants.Switcher
|
|
94
92
|
* @experimental Since 1.74
|
|
95
93
|
* @since 1.74
|
|
96
|
-
* @version 1.
|
|
94
|
+
* @version 1.101.0
|
|
97
95
|
* @private
|
|
98
96
|
* @ui5-restricted
|
|
99
97
|
*/
|
|
@@ -108,7 +106,6 @@ sap.ui.define([
|
|
|
108
106
|
* @param {string} mPropertyBag.newVReference - Variant reference to be switched to
|
|
109
107
|
* @param {string} mPropertyBag.currentVReference - Variant reference to be switched from
|
|
110
108
|
* @param {sap.ui.core.Component} mPropertyBag.appComponent - App component
|
|
111
|
-
* @param {boolean} [mPropertyBag.changeInstance] <code>true</code> if each change has to be an instance of <code>sap.ui.fl.Change</code>
|
|
112
109
|
*
|
|
113
110
|
* @returns {Promise} Resolves after variant has been switched
|
|
114
111
|
* @private
|
|
@@ -43,19 +43,20 @@ sap.ui.define([
|
|
|
43
43
|
* @namespace sap.ui.fl.apply._internal.flexState.controlVariants.VariantManagementState
|
|
44
44
|
* @experimental Since 1.74
|
|
45
45
|
* @since 1.74
|
|
46
|
-
* @version 1.
|
|
46
|
+
* @version 1.101.0
|
|
47
47
|
* @private
|
|
48
48
|
* @ui5-restricted
|
|
49
49
|
*/
|
|
50
50
|
var VariantManagementState = {};
|
|
51
51
|
|
|
52
|
+
var mUpdateStateListeners = {};
|
|
53
|
+
|
|
52
54
|
function getReferencedChanges(mPropertyBag) {
|
|
53
55
|
var aReferencedVariantChanges = [];
|
|
54
56
|
if (mPropertyBag.variantData.content.variantReference) {
|
|
55
57
|
aReferencedVariantChanges = VariantManagementState.getControlChangesForVariant(Object.assign(
|
|
56
58
|
mPropertyBag, {
|
|
57
|
-
vReference: mPropertyBag.variantData.content.variantReference
|
|
58
|
-
changeInstance: true
|
|
59
|
+
vReference: mPropertyBag.variantData.content.variantReference
|
|
59
60
|
}));
|
|
60
61
|
return aReferencedVariantChanges.filter(function(oReferencedChange) {
|
|
61
62
|
return LayerUtils.compareAgainstCurrentLayer(oReferencedChange.getDefinition().layer, mPropertyBag.variantData.content.layer) === -1; /* Referenced change layer below current layer*/
|
|
@@ -123,6 +124,27 @@ sap.ui.define([
|
|
|
123
124
|
}
|
|
124
125
|
}
|
|
125
126
|
|
|
127
|
+
/**
|
|
128
|
+
* TODO: adapt as soon as the ChangePersistence is removed
|
|
129
|
+
* Temporary function to inform the VariantModel about the state being updated, so that the dirty state can be updated.
|
|
130
|
+
* The concept is fine, but the functionality will probably move somewhere else
|
|
131
|
+
*
|
|
132
|
+
* @param {string} sReference - Flex Reference
|
|
133
|
+
* @param {function} fnListener - Function to call when the state changes
|
|
134
|
+
*/
|
|
135
|
+
VariantManagementState.addUpdateStateListener = function(sReference, fnListener) {
|
|
136
|
+
mUpdateStateListeners[sReference] = fnListener;
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Removes the listener registered for the given reference
|
|
141
|
+
*
|
|
142
|
+
* @param {string} sReference - Flex Reference
|
|
143
|
+
*/
|
|
144
|
+
VariantManagementState.removeUpdateStateListener = function(sReference) {
|
|
145
|
+
delete mUpdateStateListeners[sReference];
|
|
146
|
+
};
|
|
147
|
+
|
|
126
148
|
/**
|
|
127
149
|
* Returns variant management state for the passed component reference.
|
|
128
150
|
*
|
|
@@ -143,30 +165,14 @@ sap.ui.define([
|
|
|
143
165
|
FlexState.resetFakedStandardVariants(sReference, sComponentId);
|
|
144
166
|
};
|
|
145
167
|
|
|
146
|
-
/**
|
|
147
|
-
* Resets variant management state
|
|
148
|
-
*
|
|
149
|
-
* @param {string} sReference - Component reference
|
|
150
|
-
* @param {string} sComponentId - Component instance ID
|
|
151
|
-
*
|
|
152
|
-
* @private
|
|
153
|
-
* @ui5-restricted
|
|
154
|
-
*/
|
|
155
|
-
VariantManagementState.resetContent = function(sReference, sComponentId) {
|
|
156
|
-
// reset on component destroy() should be handled more centrally
|
|
157
|
-
// once all maps are prepared in flex state
|
|
158
|
-
FlexState.clearFilteredResponse(sReference, sComponentId);
|
|
159
|
-
};
|
|
160
|
-
|
|
161
168
|
/**
|
|
162
169
|
* Returns control changes for a given variant reference.
|
|
163
170
|
*
|
|
164
171
|
* @param {object} mPropertyBag Object with the necessary properties
|
|
165
|
-
* @param {
|
|
166
|
-
* @param {
|
|
172
|
+
* @param {string} mPropertyBag.vmReference - Variant management reference
|
|
173
|
+
* @param {string} mPropertyBag.vReference - ID of the variant
|
|
167
174
|
* @param {string} mPropertyBag.reference - Component reference
|
|
168
175
|
* @param {boolean} [mPropertyBag.includeDirtyChanges] - Whether dirty changes of the current session should be included, <code>true</code> by default
|
|
169
|
-
* @param {boolean} [mPropertyBag.changeInstance] <code>true</code> if each change has to be an instance of <code>sap.ui.fl.Change</code>
|
|
170
176
|
*
|
|
171
177
|
* @returns {object[]|sap.ui.fl.Change[]} All changes of the variant
|
|
172
178
|
* @private
|
|
@@ -182,11 +188,6 @@ sap.ui.define([
|
|
|
182
188
|
|| oChange.getState() === Change.states.PERSISTED
|
|
183
189
|
);
|
|
184
190
|
});
|
|
185
|
-
if (!mPropertyBag.changeInstance) {
|
|
186
|
-
aResult = aResult.map(function(oChange) {
|
|
187
|
-
return oChange.getDefinition();
|
|
188
|
-
});
|
|
189
|
-
}
|
|
190
191
|
}
|
|
191
192
|
return aResult;
|
|
192
193
|
};
|
|
@@ -235,7 +236,7 @@ sap.ui.define([
|
|
|
235
236
|
* Returns the current variant reference for a given variant management reference.
|
|
236
237
|
*
|
|
237
238
|
* @param {object} mPropertyBag - Object with the necessary properties
|
|
238
|
-
* @param {
|
|
239
|
+
* @param {string} mPropertyBag.vmReference - Variant management reference
|
|
239
240
|
* @param {string} mPropertyBag.reference - Component reference
|
|
240
241
|
* @returns {string} Reference of the current variant
|
|
241
242
|
*/
|
|
@@ -368,7 +369,7 @@ sap.ui.define([
|
|
|
368
369
|
* @ui5-restricted
|
|
369
370
|
*/
|
|
370
371
|
VariantManagementState.addChangeToVariant = function(mPropertyBag) {
|
|
371
|
-
var aExistingChanges = VariantManagementState.getControlChangesForVariant(
|
|
372
|
+
var aExistingChanges = VariantManagementState.getControlChangesForVariant(mPropertyBag);
|
|
372
373
|
var aChangeFileNames = aExistingChanges.map(function(oChange) {
|
|
373
374
|
return oChange.getDefinition().fileName;
|
|
374
375
|
});
|
|
@@ -395,7 +396,7 @@ sap.ui.define([
|
|
|
395
396
|
* @ui5-restricted
|
|
396
397
|
*/
|
|
397
398
|
VariantManagementState.removeChangeFromVariant = function(mPropertyBag) {
|
|
398
|
-
var aControlChanges = VariantManagementState.getControlChangesForVariant(
|
|
399
|
+
var aControlChanges = VariantManagementState.getControlChangesForVariant(mPropertyBag);
|
|
399
400
|
var oVariant = VariantManagementState.getVariant(mPropertyBag);
|
|
400
401
|
var bChangeFound = false;
|
|
401
402
|
|
|
@@ -420,7 +421,6 @@ sap.ui.define([
|
|
|
420
421
|
* @param {object} mPropertyBag - Object with the necessary properties
|
|
421
422
|
* @param {string} mPropertyBag.reference - Component reference
|
|
422
423
|
* @param {string} [mPropertyBag.vmReference] - Variant management reference
|
|
423
|
-
* @param {boolean} [mPropertyBag.changeInstance] <code>true</code> if each change has to be an instance of <code>sap.ui.fl.Change</code>
|
|
424
424
|
*
|
|
425
425
|
* @returns {Array} All changes of current or default variants
|
|
426
426
|
* @private
|
|
@@ -569,6 +569,9 @@ sap.ui.define([
|
|
|
569
569
|
break;
|
|
570
570
|
default:
|
|
571
571
|
}
|
|
572
|
+
if (mUpdateStateListeners[mPropertyBag.reference]) {
|
|
573
|
+
mUpdateStateListeners[mPropertyBag.reference]();
|
|
574
|
+
}
|
|
572
575
|
}
|
|
573
576
|
};
|
|
574
577
|
|
|
@@ -585,8 +588,7 @@ sap.ui.define([
|
|
|
585
588
|
VariantManagementState.waitForInitialVariantChanges = function(mPropertyBag) {
|
|
586
589
|
var aCurrentVariantChanges = VariantManagementState.getInitialChanges({
|
|
587
590
|
vmReference: mPropertyBag.vmReference,
|
|
588
|
-
reference: mPropertyBag.reference
|
|
589
|
-
changeInstance: true
|
|
591
|
+
reference: mPropertyBag.reference
|
|
590
592
|
});
|
|
591
593
|
var aControls = aCurrentVariantChanges.reduce(function(aCurrentControls, oChange) {
|
|
592
594
|
var oSelector = oChange.getSelector();
|
package/src/sap/ui/fl/{PreprocessorImpl.js → apply/_internal/preprocessors/ControllerExtension.js}
RENAMED
|
@@ -19,28 +19,48 @@ sap.ui.define([
|
|
|
19
19
|
) {
|
|
20
20
|
"use strict";
|
|
21
21
|
|
|
22
|
-
function isCodeExt(oChange) {
|
|
23
|
-
return oChange.getChangeType() === "codeExt";
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
function isForController (sControllerName, oChange) {
|
|
27
|
-
var sSelectorControllerName = oChange.getSelector().controllerName;
|
|
28
|
-
return sControllerName === sSelectorControllerName;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
22
|
/**
|
|
32
|
-
*
|
|
23
|
+
* Provides the Controller Extensions to the ControllerExtensionProvider from the core
|
|
33
24
|
*
|
|
34
|
-
* @name sap.ui.fl.
|
|
25
|
+
* @name sap.ui.fl.apply._internal.preprocessors.ControllerExtension
|
|
35
26
|
* @class
|
|
36
27
|
* @constructor
|
|
37
28
|
* @author SAP SE
|
|
38
|
-
* @version 1.
|
|
29
|
+
* @version 1.101.0
|
|
39
30
|
* @experimental Since 1.27.0
|
|
40
31
|
* @private
|
|
41
32
|
* @ui5-restricted sap.ui.fl, sap.ui.core
|
|
42
33
|
*/
|
|
43
|
-
var
|
|
34
|
+
var ControllerExtension = function() {};
|
|
35
|
+
|
|
36
|
+
function isCodeExt(oChange) {
|
|
37
|
+
return oChange.getChangeType() === "codeExt";
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function isForController(sControllerName, oChange) {
|
|
41
|
+
var sSelectorControllerName = oChange.getSelector().controllerName;
|
|
42
|
+
return sControllerName === sSelectorControllerName;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
function getExtensionModules(aCodeExtModuleNames) {
|
|
46
|
+
if (aCodeExtModuleNames.length === 0) {
|
|
47
|
+
return Promise.resolve([]);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
return new Promise(function(resolve) {
|
|
51
|
+
sap.ui.require(
|
|
52
|
+
aCodeExtModuleNames,
|
|
53
|
+
function() {
|
|
54
|
+
// arguments are not a real array. This creates one for further processing
|
|
55
|
+
resolve(Array.prototype.slice.call(arguments));
|
|
56
|
+
},
|
|
57
|
+
function(oError) {
|
|
58
|
+
Log.error("Code Extension not found", oError.message);
|
|
59
|
+
resolve([]);
|
|
60
|
+
}
|
|
61
|
+
);
|
|
62
|
+
});
|
|
63
|
+
}
|
|
44
64
|
|
|
45
65
|
/**
|
|
46
66
|
* Provides an array of extension providers. An extension provider is an object which were defined as controller extensions. These objects
|
|
@@ -51,9 +71,8 @@ sap.ui.define([
|
|
|
51
71
|
* @param {boolean} bAsync - Flag whether <code>Promise</code> should be returned or not (async=true)
|
|
52
72
|
* @returns {Promise|Array} An empty array in case of a sync processing or a Promise with all successful loaded controller extensions
|
|
53
73
|
* @see sap.ui.core.mvc.Controller for an overview of the available functions on controllers.
|
|
54
|
-
* @since 1.34.0
|
|
55
74
|
*/
|
|
56
|
-
|
|
75
|
+
ControllerExtension.prototype.getControllerExtensions = function(sControllerName, sComponentId, bAsync) {
|
|
57
76
|
if (bAsync) {
|
|
58
77
|
if (!sComponentId) {
|
|
59
78
|
Log.warning("No component ID for determining the anchor of the code extensions was passed.");
|
|
@@ -82,41 +101,13 @@ sap.ui.define([
|
|
|
82
101
|
return oChange.getModuleName();
|
|
83
102
|
});
|
|
84
103
|
|
|
85
|
-
return
|
|
104
|
+
return getExtensionModules(aExtensionModules);
|
|
86
105
|
});
|
|
87
106
|
}
|
|
88
107
|
|
|
89
|
-
Log.warning("Synchronous extensions are not supported
|
|
108
|
+
Log.warning("Synchronous extensions are not supported via UI5 Flexibility");
|
|
90
109
|
return [];
|
|
91
110
|
};
|
|
92
111
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
*
|
|
96
|
-
* @param {Array} aCodeExtModuleNames - Names of all controller extensions which have to be requested
|
|
97
|
-
* @returns {Promise} Promise resolved with an array with all successful loaded controller extensions
|
|
98
|
-
* @since 1.60.0
|
|
99
|
-
*/
|
|
100
|
-
PreprocessorImpl.getExtensionModules = function(aCodeExtModuleNames) {
|
|
101
|
-
if (aCodeExtModuleNames.length === 0) {
|
|
102
|
-
return Promise.resolve([]);
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
return new Promise(function(resolve) {
|
|
106
|
-
sap.ui.require(
|
|
107
|
-
aCodeExtModuleNames,
|
|
108
|
-
function() {
|
|
109
|
-
// arguments are not a real array. This creates one for further processing
|
|
110
|
-
var aModules = Array.prototype.slice.call(arguments);
|
|
111
|
-
resolve(aModules);
|
|
112
|
-
},
|
|
113
|
-
function(oError) {
|
|
114
|
-
Log.error("Code Extension not found", oError.message);
|
|
115
|
-
resolve([]);
|
|
116
|
-
}
|
|
117
|
-
);
|
|
118
|
-
});
|
|
119
|
-
};
|
|
120
|
-
|
|
121
|
-
return PreprocessorImpl;
|
|
122
|
-
}, /* bExport= */true);
|
|
112
|
+
return ControllerExtension;
|
|
113
|
+
});
|
|
@@ -4,20 +4,20 @@
|
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
sap.ui.define(function
|
|
7
|
+
sap.ui.define(["sap/ui/core/Core"], function(oCore) {
|
|
8
8
|
"use strict";
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* Provides a history of events. This is needed to show/hide the personalization icon
|
|
12
12
|
*
|
|
13
13
|
* @namespace
|
|
14
|
-
* @alias sap.ui.fl.EventHistory
|
|
14
|
+
* @alias sap.ui.fl.apply._internal.preprocessors.EventHistory
|
|
15
15
|
* @experimental Since 1.47.0
|
|
16
16
|
* @author SAP SE
|
|
17
|
-
* @version 1.
|
|
17
|
+
* @version 1.101.0
|
|
18
18
|
*
|
|
19
19
|
* @private
|
|
20
|
-
* @ui5-restricted sap.ui.fl.RegistrationDelegator
|
|
20
|
+
* @ui5-restricted sap.ui.fl.apply._internal.preprocessors.RegistrationDelegator
|
|
21
21
|
*/
|
|
22
22
|
var EventHistory = function () {
|
|
23
23
|
};
|
|
@@ -36,7 +36,7 @@ sap.ui.define(function () {
|
|
|
36
36
|
EventHistory.start = function () {
|
|
37
37
|
EventHistory._aEventIds.forEach(function(sEventId) {
|
|
38
38
|
if (EventHistory._aUnsubscribedEventIds.indexOf(sEventId) === -1) {
|
|
39
|
-
|
|
39
|
+
oCore.getEventBus().subscribe("sap.ui", sEventId, EventHistory.saveEvent);
|
|
40
40
|
EventHistory._oHistory[sEventId] = [];
|
|
41
41
|
}
|
|
42
42
|
});
|
|
@@ -76,7 +76,7 @@ sap.ui.define(function () {
|
|
|
76
76
|
* @return {array} List of events
|
|
77
77
|
*/
|
|
78
78
|
EventHistory.getHistoryAndStop = function (sEventId) {
|
|
79
|
-
|
|
79
|
+
oCore.getEventBus().unsubscribe("sap.ui", sEventId, EventHistory.saveEvent);
|
|
80
80
|
EventHistory._addUnsubscribedEvent(sEventId);
|
|
81
81
|
return EventHistory._oHistory[sEventId] || [];
|
|
82
82
|
};
|
|
@@ -88,4 +88,4 @@ sap.ui.define(function () {
|
|
|
88
88
|
};
|
|
89
89
|
|
|
90
90
|
return EventHistory;
|
|
91
|
-
}
|
|
91
|
+
});
|