@openui5/sap.ui.fl 1.120.7 → 1.121.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/.reuse/dep5 +23 -21
- package/THIRDPARTY.txt +6 -43
- package/package.json +3 -3
- package/src/sap/ui/fl/.library +1 -1
- package/src/sap/ui/fl/ChangePersistence.js +38 -133
- package/src/sap/ui/fl/ChangePersistenceFactory.js +1 -1
- package/src/sap/ui/fl/FakeLrepConnectorLocalStorage.js +1 -1
- package/src/sap/ui/fl/FakeLrepConnectorSessionStorage.js +1 -1
- package/src/sap/ui/fl/FakeLrepLocalStorage.js +1 -1
- package/src/sap/ui/fl/FlexController.js +28 -15
- package/src/sap/ui/fl/FlexControllerFactory.js +1 -1
- package/src/sap/ui/fl/LayerUtils.js +5 -5
- package/src/sap/ui/fl/Utils.js +15 -18
- package/src/sap/ui/fl/apply/_internal/DelegateMediator.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/Applier.js +19 -20
- package/src/sap/ui/fl/apply/_internal/changes/FlexCustomData.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/Utils.js +1 -1
- 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/AddNewInbound.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/ChangeDataSource.js +6 -2
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/ChangeInbound.js +9 -3
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/RemoveAllInboundsExceptOne.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 +2 -2
- 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/controlVariants/URLHandler.js +17 -11
- package/src/sap/ui/fl/apply/_internal/extensionPoint/Processor.js +7 -19
- package/src/sap/ui/fl/{write → apply}/_internal/extensionPoint/Registry.js +2 -2
- package/src/sap/ui/fl/apply/_internal/flexObjects/AppDescriptorChange.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/CompVariant.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/ControllerExtensionChange.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/FlVariant.js +1 -3
- package/src/sap/ui/fl/apply/_internal/flexObjects/FlexObject.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/FlexObjectFactory.js +13 -7
- package/src/sap/ui/fl/apply/_internal/flexObjects/UIChange.js +3 -2
- package/src/sap/ui/fl/apply/_internal/flexObjects/Variant.js +8 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/getVariantAuthor.js +47 -0
- package/src/sap/ui/fl/apply/_internal/flexState/DataSelector.js +124 -34
- package/src/sap/ui/fl/apply/_internal/flexState/FlexState.js +118 -45
- package/src/sap/ui/fl/apply/_internal/flexState/InitialPrepareFunctions.js +25 -9
- package/src/sap/ui/fl/apply/_internal/flexState/Loader.js +17 -3
- package/src/sap/ui/fl/apply/_internal/flexState/ManifestUtils.js +21 -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 +108 -104
- package/src/sap/ui/fl/apply/_internal/flexState/changes/ExtensionPointState.js +93 -34
- package/src/sap/ui/fl/apply/_internal/flexState/changes/UIChangesState.js +195 -0
- package/src/sap/ui/fl/apply/_internal/flexState/compVariants/CompVariantMerger.js +7 -6
- package/src/sap/ui/fl/apply/_internal/flexState/compVariants/Utils.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexState/compVariants/prepareCompVariantsMap.js +6 -6
- package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/Switcher.js +2 -2
- package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/VariantManagementState.js +89 -11
- package/src/sap/ui/fl/apply/_internal/preprocessors/ComponentLifecycleHooks.js +20 -28
- package/src/sap/ui/fl/apply/_internal/preprocessors/ControllerExtension.js +1 -1
- package/src/sap/ui/fl/apply/_internal/preprocessors/EventHistory.js +1 -1
- package/src/sap/ui/fl/apply/_internal/preprocessors/RegistrationDelegator.js +1 -1
- package/src/sap/ui/fl/apply/_internal/preprocessors/XmlPreprocessor.js +1 -1
- package/src/sap/ui/fl/apply/api/ControlVariantApplyAPI.js +1 -1
- package/src/sap/ui/fl/{write → apply}/api/ExtensionPointRegistryAPI.js +3 -3
- package/src/sap/ui/fl/apply/api/FlexRuntimeInfoAPI.js +49 -8
- 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 +7 -6
- 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 +1 -1
- 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 +2 -2
- package/src/sap/ui/fl/changeHandler/UnhideControl.js +1 -1
- package/src/sap/ui/fl/changeHandler/UnstashControl.js +4 -4
- package/src/sap/ui/fl/changeHandler/UpdateIFrame.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/designtime/util/IFrame.designtime.js +3 -91
- package/src/sap/ui/fl/designtime/util/editIFrame.js +94 -0
- package/src/sap/ui/fl/initial/_internal/FlexConfiguration.js +1 -1
- package/src/sap/ui/fl/initial/_internal/FlexInfoSession.js +2 -23
- package/src/sap/ui/fl/initial/_internal/Storage.js +106 -39
- package/src/sap/ui/fl/{write → initial}/_internal/StorageFeaturesMerger.js +10 -7
- package/src/sap/ui/fl/initial/_internal/StorageUtils.js +14 -8
- package/src/sap/ui/fl/initial/_internal/changeHandlers/ChangeHandlerRegistration.js +1 -1
- package/src/sap/ui/fl/initial/_internal/changeHandlers/ChangeHandlerStorage.js +1 -1
- package/src/sap/ui/fl/initial/_internal/connectors/BackendConnector.js +26 -4
- package/src/sap/ui/fl/initial/_internal/connectors/BtpServiceConnector.js +44 -0
- package/src/sap/ui/fl/initial/_internal/connectors/KeyUserConnector.js +8 -1
- package/src/sap/ui/fl/initial/_internal/connectors/LrepConnector.js +48 -2
- package/src/sap/ui/fl/initial/_internal/connectors/NeoLrepConnector.js +25 -4
- package/src/sap/ui/fl/initial/_internal/connectors/PersonalizationConnector.js +12 -1
- package/src/sap/ui/fl/initial/_internal/connectors/StaticFileConnector.js +14 -4
- 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/initial/api/Version.js +0 -1
- package/src/sap/ui/fl/interfaces/BaseLoadConnector.js +22 -1
- package/src/sap/ui/fl/interfaces/Delegate.js +1 -1
- package/src/sap/ui/fl/library.js +48 -43
- package/src/sap/ui/fl/messagebundle.properties +3 -0
- package/src/sap/ui/fl/messagebundle_bg.properties +1 -1
- package/src/sap/ui/fl/messagebundle_en_US_saprigi.properties +39 -39
- package/src/sap/ui/fl/messagebundle_hu.properties +1 -1
- package/src/sap/ui/fl/messagebundle_it.properties +1 -1
- package/src/sap/ui/fl/messagebundle_lv.properties +1 -1
- package/src/sap/ui/fl/messagebundle_mk.properties +2 -2
- package/src/sap/ui/fl/messagebundle_no.properties +1 -1
- package/src/sap/ui/fl/registry/Settings.js +12 -1
- package/src/sap/ui/fl/support/_internal/extractChangeDependencies.js +40 -20
- package/src/sap/ui/fl/support/_internal/getAllUIChanges.js +93 -0
- package/src/sap/ui/fl/support/_internal/getChangeDependencies.js +4 -4
- package/src/sap/ui/fl/support/_internal/getFlexSettings.js +1 -1
- 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 +1 -1
- package/src/sap/ui/fl/support/apps/contentbrowser/utils/ErrorUtils.js +1 -1
- package/src/sap/ui/fl/transport/TransportSelection.js +1 -1
- package/src/sap/ui/fl/util/DescriptorChangeCheck.js +34 -19
- package/src/sap/ui/fl/util/IFrame.js +48 -16
- package/src/sap/ui/fl/util/ManagedObjectModel.js +1 -1
- package/src/sap/ui/fl/util/resolveBinding.js +1 -1
- package/src/sap/ui/fl/variants/VariantManagement.js +88 -49
- package/src/sap/ui/fl/variants/VariantModel.js +19 -6
- package/src/sap/ui/fl/write/_internal/Storage.js +5 -34
- package/src/sap/ui/fl/write/_internal/Versions.js +62 -63
- package/src/sap/ui/fl/write/_internal/appVariant/AppVariant.js +2 -2
- package/src/sap/ui/fl/write/_internal/appVariant/AppVariantFactory.js +2 -2
- package/src/sap/ui/fl/write/_internal/appVariant/AppVariantInlineChange.js +2 -2
- package/src/sap/ui/fl/write/_internal/appVariant/AppVariantInlineChangeFactory.js +2 -2
- package/src/sap/ui/fl/write/_internal/condenser/Condenser.js +1 -1
- package/src/sap/ui/fl/write/_internal/condenser/UIReconstruction.js +1 -1
- package/src/sap/ui/fl/write/_internal/connectors/BackendConnector.js +1 -16
- package/src/sap/ui/fl/write/_internal/connectors/BtpServiceConnector.js +55 -0
- package/src/sap/ui/fl/write/_internal/connectors/KeyUserConnector.js +3 -9
- package/src/sap/ui/fl/write/_internal/connectors/LrepConnector.js +1 -26
- package/src/sap/ui/fl/write/_internal/connectors/NeoLrepConnector.js +3 -20
- package/src/sap/ui/fl/write/_internal/connectors/ObjectPathConnector.js +5 -1
- package/src/sap/ui/fl/write/_internal/connectors/PersonalizationConnector.js +1 -15
- package/src/sap/ui/fl/write/_internal/connectors/Utils.js +1 -1
- package/src/sap/ui/fl/write/_internal/extensionPoint/Processor.js +11 -4
- 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 +7 -7
- 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 +22 -3
- package/src/sap/ui/fl/write/_internal/flexState/UI2Personalization/UI2PersonalizationState.js +1 -1
- package/src/sap/ui/fl/write/_internal/flexState/compVariants/CompVariantState.js +36 -4
- 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/ChangesWriteAPI.js +1 -3
- package/src/sap/ui/fl/write/api/ContextBasedAdaptationsAPI.js +1 -1
- package/src/sap/ui/fl/write/api/FeaturesAPI.js +2 -2
- package/src/sap/ui/fl/write/api/FieldExtensibility.js +2 -2
- package/src/sap/ui/fl/write/api/PersistenceWriteAPI.js +36 -7
- package/src/sap/ui/fl/write/api/ReloadInfoAPI.js +88 -105
- package/src/sap/ui/fl/write/api/SmartBusinessWriteAPI.js +25 -2
- package/src/sap/ui/fl/write/api/SmartVariantManagementWriteAPI.js +1 -0
- package/src/sap/ui/fl/write/api/VersionsAPI.js +0 -1
- package/src/sap/ui/fl/write/api/connectors/ObjectStorageConnector.js +241 -28
- package/src/sap/ui/fl/write/connectors/BaseConnector.js +2 -10
- package/ui5.yaml +37 -76
- package/LICENSES/BSD-2-Clause.txt +0 -22
- package/src/sap/ui/fl/apply/_internal/flexState/changes/prepareChangesMap.js +0 -26
- /package/src/sap/ui/fl/descriptorRelated/{internal/Utils.js → Utils.js} +0 -0
|
@@ -15,7 +15,7 @@ TRANSPORT_DIALOG_TRANSPORT_TT=\u0418\u0437\u0431\u0435\u0440\u0438 \u043F\u0440\
|
|
|
15
15
|
|
|
16
16
|
TRANSPORT_DIALOG_PACKAGE_TT=\u0418\u0437\u0431\u0435\u0440\u0438 \u043F\u0430\u043A\u0435\u0442
|
|
17
17
|
|
|
18
|
-
TRANSPORT_DIALOG_NO_TRANSPORT=\u0421\u043E\u0437\u0434\u0430\u0458 \u0431\u0430\u0440\u0430\u045A\u0435 \u0437\u0430 \
|
|
18
|
+
TRANSPORT_DIALOG_NO_TRANSPORT=\u0421\u043E\u0437\u0434\u0430\u0458 \u0431\u0430\u0440\u0430\u045A\u0435 \u0437\u0430 \u0442\u0440\u0430\u043D\u0441\u043F\u043E\u0440\u0442
|
|
19
19
|
|
|
20
20
|
TRANSPORT_DIALOG_LOCAL_OBJECT=\u041B\u043E\u043A\u0430\u043B\u0435\u043D \u043E\u0431\u0458\u0435\u043A\u0442
|
|
21
21
|
|
|
@@ -73,6 +73,6 @@ CAP_ERR_WHITESPACE=\u041D\u0430\u0437\u0438\u0432\u043E\u0442 \u043D\u0435 \u044
|
|
|
73
73
|
|
|
74
74
|
BUSINESS_OBJECT_NODE_TITLE=\u0414\u043E\u0441\u0442\u0430\u043F\u043D\u0438 \u0434\u0435\u043B\u043E\u0432\u043D\u0438 \u0458\u0430\u0437\u043B\u0438 \u043D\u0430 \u043E\u0431\u0458\u0435\u043A\u0442\u043E\u0442\:
|
|
75
75
|
|
|
76
|
-
MSG_DEPENDENT_CHANGE_ERROR=\u0421\u043B\u0435\u0434\u043D\
|
|
76
|
+
MSG_DEPENDENT_CHANGE_ERROR=\u0421\u043B\u0435\u0434\u043D\u0438\u0432\u0435 \u043F\u0440\u043E\u043C\u0435\u043D\u0438 \u043D\u0435 \u043C\u043E\u0436\u0430\u0442 \u0434\u0430 \u0441\u0435 \u043F\u0440\u0438\u043C\u0435\u043D\u0430\u0442\: {0}.\n\u0422\u043E\u0430 \u0435 \u043F\u043E\u0441\u043B\u0435\u0434\u0438\u0446\u0430 \u043D\u0430 \u0441\u043B\u0435\u0434\u043D\u0438\u0442\u0435 \u043E\u0442\u0432\u043E\u0440\u0435\u043D\u0438 \u0437\u0430\u0432\u0438\u0441\u043D\u043E\u0441\u0442\u0438\: {1}
|
|
77
77
|
|
|
78
78
|
CBA_MIGRATED_ADAPTATION_TITLE={0} (\u043C\u0438\u0433\u0440\u0438\u0440\u0430\u043D\u043E \u043E\u0434 \u043E\u0433\u0440\u0430\u043D\u0438\u0447\u0435\u043D \u043F\u0440\u0438\u043A\u0430\u0437)
|
|
@@ -73,6 +73,6 @@ CAP_ERR_WHITESPACE=Navnet kan ikke inneholde blanktegn
|
|
|
73
73
|
|
|
74
74
|
BUSINESS_OBJECT_NODE_TITLE=Tilgjengelige businessobjektknutepunkt\:
|
|
75
75
|
|
|
76
|
-
MSG_DEPENDENT_CHANGE_ERROR=F\u00F8lgende endring kan ikke
|
|
76
|
+
MSG_DEPENDENT_CHANGE_ERROR=F\u00F8lgende endring kan ikke gj\u00F8res\: {0}.\nDette er p\u00E5 grunn av f\u00F8lgende \u00E5pne avhengigheter\: {1}
|
|
77
77
|
|
|
78
78
|
CBA_MIGRATED_ADAPTATION_TITLE={0} (migrert fra begrenset visning)
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
sap.ui.define([
|
|
8
|
-
"sap/ui/fl/
|
|
8
|
+
"sap/ui/fl/initial/_internal/Storage",
|
|
9
9
|
"sap/ui/fl/Utils",
|
|
10
10
|
"sap/base/Log"
|
|
11
11
|
], function(
|
|
@@ -116,11 +116,13 @@ sap.ui.define([
|
|
|
116
116
|
isPublicLayerAvailable: false,
|
|
117
117
|
isLocalResetEnabled: false,
|
|
118
118
|
isVariantAdaptationEnabled: false,
|
|
119
|
+
isVariantAuthorNameAvailable: false,
|
|
119
120
|
versioning: {},
|
|
120
121
|
_bFlexChangeMode: false,
|
|
121
122
|
_bFlexibilityAdaptationButtonAllowed: false
|
|
122
123
|
};
|
|
123
124
|
}
|
|
125
|
+
// The following line is used by the Flex Support Tool to set breakpoints - please adjust the tool if you change it!
|
|
124
126
|
oSettings.userId = sUserId;
|
|
125
127
|
return Settings._storeInstance(oSettings);
|
|
126
128
|
});
|
|
@@ -327,6 +329,15 @@ sap.ui.define([
|
|
|
327
329
|
return this._getBooleanProperty("isVariantPersonalizationEnabled");
|
|
328
330
|
};
|
|
329
331
|
|
|
332
|
+
/**
|
|
333
|
+
* Checks whether full names of variants' authors are available or not.
|
|
334
|
+
*
|
|
335
|
+
* @returns {boolean} <code>true</code> if personalization of variants is enabled
|
|
336
|
+
*/
|
|
337
|
+
Settings.prototype.isVariantAuthorNameAvailable = function() {
|
|
338
|
+
return this._getBooleanProperty("isVariantAuthorNameAvailable");
|
|
339
|
+
};
|
|
340
|
+
|
|
330
341
|
/**
|
|
331
342
|
* Checks whether condensing of changes is enabled for the used backend.
|
|
332
343
|
*
|
|
@@ -8,12 +8,12 @@ sap.ui.define([
|
|
|
8
8
|
"sap/ui/core/util/reflection/JsControlTreeModifier",
|
|
9
9
|
"sap/ui/core/Element",
|
|
10
10
|
"sap/ui/fl/apply/_internal/flexState/ManifestUtils",
|
|
11
|
-
"sap/ui/
|
|
11
|
+
"sap/ui/fl/apply/_internal/flexState/changes/UIChangesState"
|
|
12
12
|
], function(
|
|
13
13
|
JsControlTreeModifier,
|
|
14
14
|
Element,
|
|
15
15
|
ManifestUtils,
|
|
16
|
-
|
|
16
|
+
UIChangesState
|
|
17
17
|
) {
|
|
18
18
|
"use strict";
|
|
19
19
|
|
|
@@ -45,6 +45,10 @@ sap.ui.define([
|
|
|
45
45
|
return oCorrectAppComponent;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
+
// TODO with regards to variants, what is the expected outcome here? All UI Changes, all vm-independent + current variant UI Changes,
|
|
49
|
+
// all vm-independent + all vm-dependent UI Changes?
|
|
50
|
+
// as of now, _mChangesEntries is extremely unreliable. After creating a variant it includes all variants and all vm-dependent changes,
|
|
51
|
+
// after a reload only the initial vm-dependent change is available.
|
|
48
52
|
function enhanceExportWithChangeData(oChangePersistence, oExport) {
|
|
49
53
|
var oAppComponent = getAppComponentInstance(oExport.sComponentName);
|
|
50
54
|
for (var sChangeId in oChangePersistence._mChangesEntries) {
|
|
@@ -70,25 +74,18 @@ sap.ui.define([
|
|
|
70
74
|
}
|
|
71
75
|
}
|
|
72
76
|
|
|
73
|
-
enhanceExportWithDependencyData(
|
|
77
|
+
enhanceExportWithDependencyData(oExport.sComponentName, oExport);
|
|
74
78
|
}
|
|
75
79
|
|
|
76
|
-
function enhanceExportWithDependencyData(
|
|
77
|
-
|
|
78
|
-
|
|
80
|
+
function enhanceExportWithDependencyData(sReference, oExport) {
|
|
81
|
+
const mInitialDependencies = UIChangesState.getCompleteDependencyMap(sReference);
|
|
82
|
+
for (var sChangeId in mInitialDependencies) {
|
|
83
|
+
var mChangeSpecificDependencies = mInitialDependencies[sChangeId];
|
|
79
84
|
oExport.mChangesEntries[sChangeId].aControlsDependencies = mChangeSpecificDependencies.controlsDependencies;
|
|
80
85
|
oExport.mChangesEntries[sChangeId].aDependencies = mChangeSpecificDependencies.dependencies;
|
|
81
86
|
}
|
|
82
87
|
}
|
|
83
88
|
|
|
84
|
-
function enhanceExportWithVariantChangeData(oChangePersistence, oExport) {
|
|
85
|
-
jQuery.each(oChangePersistence._mVariantsChanges, function(sChangeId, oChange) {
|
|
86
|
-
oExport.mVariantsChanges[sChangeId] = {
|
|
87
|
-
mDefinition: oChange._oDefinition
|
|
88
|
-
};
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
|
|
92
89
|
function enhanceWithChangetypeSpecificData(oExport, sExportParameterName, mControlData, sControlDataParameterName, aCustomDataChanges) {
|
|
93
90
|
if (aCustomDataChanges) {
|
|
94
91
|
mControlData[sControlDataParameterName] = aCustomDataChanges;
|
|
@@ -115,7 +112,7 @@ sap.ui.define([
|
|
|
115
112
|
function enhanceExportWithControlData(oChangePersistence, oExport) {
|
|
116
113
|
// collect applied changes
|
|
117
114
|
|
|
118
|
-
for (var sControlId in oChangePersistence.
|
|
115
|
+
for (var sControlId in oChangePersistence.getDependencyMapForComponent().mChanges) {
|
|
119
116
|
var mControlData = {
|
|
120
117
|
bPresent: false,
|
|
121
118
|
aAppliedChanges: [],
|
|
@@ -128,10 +125,34 @@ sap.ui.define([
|
|
|
128
125
|
|
|
129
126
|
if (oControl) {
|
|
130
127
|
mControlData.bPresent = true;
|
|
131
|
-
enhanceWithChangetypeSpecificData(
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
128
|
+
enhanceWithChangetypeSpecificData(
|
|
129
|
+
oExport,
|
|
130
|
+
"aAppliedChanges",
|
|
131
|
+
mControlData,
|
|
132
|
+
"aAppliedChanges",
|
|
133
|
+
getChangesForControlFromCustomData(oControl, "sap.ui.fl.appliedChanges.")
|
|
134
|
+
);
|
|
135
|
+
enhanceWithChangetypeSpecificData(
|
|
136
|
+
oExport,
|
|
137
|
+
"aFailedChanges",
|
|
138
|
+
mControlData,
|
|
139
|
+
"aFailedChangesJs",
|
|
140
|
+
getChangesForControlFromCustomData(oControl, "sap.ui.fl.failedChanges.js.")
|
|
141
|
+
);
|
|
142
|
+
enhanceWithChangetypeSpecificData(
|
|
143
|
+
oExport,
|
|
144
|
+
"aFailedChanges",
|
|
145
|
+
mControlData,
|
|
146
|
+
"aFailedChangesXml",
|
|
147
|
+
getChangesForControlFromCustomData(oControl, "sap.ui.fl.failedChanges.xml.")
|
|
148
|
+
);
|
|
149
|
+
enhanceWithChangetypeSpecificData(
|
|
150
|
+
oExport,
|
|
151
|
+
"aNotApplicableChanges",
|
|
152
|
+
mControlData,
|
|
153
|
+
"aNotApplicableChanges",
|
|
154
|
+
getChangesForControlFromCustomData(oControl, "sap.ui.fl.notApplicableChanges.")
|
|
155
|
+
);
|
|
135
156
|
}
|
|
136
157
|
oExport.mControlData[sControlId] = mControlData;
|
|
137
158
|
}
|
|
@@ -155,7 +176,6 @@ sap.ui.define([
|
|
|
155
176
|
};
|
|
156
177
|
|
|
157
178
|
enhanceExportWithChangeData(oChangePersistence, oExport);
|
|
158
|
-
enhanceExportWithVariantChangeData(oChangePersistence, oExport);
|
|
159
179
|
enhanceExportWithControlData(oChangePersistence, oExport);
|
|
160
180
|
|
|
161
181
|
return oExport;
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* OpenUI5
|
|
3
|
+
* (c) Copyright 2009-2024 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/core/ComponentRegistry",
|
|
10
|
+
"sap/ui/fl/apply/_internal/flexState/changes/UIChangesState",
|
|
11
|
+
"sap/ui/fl/apply/_internal/flexState/ManifestUtils",
|
|
12
|
+
"sap/ui/fl/Utils"
|
|
13
|
+
], function(
|
|
14
|
+
Log,
|
|
15
|
+
ComponentRegistry,
|
|
16
|
+
UIChangesState,
|
|
17
|
+
ManifestUtils,
|
|
18
|
+
Utils
|
|
19
|
+
) {
|
|
20
|
+
"use strict";
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Returns an array with all UI Changes for the application.
|
|
24
|
+
*
|
|
25
|
+
* @namespace sap.ui.fl.support._internal.getAllUIChanges
|
|
26
|
+
* @since 1.121
|
|
27
|
+
* @version 1.121.0
|
|
28
|
+
* @private
|
|
29
|
+
* @ui5-restricted sap.ui.fl.support.api.SupportAPI
|
|
30
|
+
*/
|
|
31
|
+
|
|
32
|
+
function getAllUIChangesFromChangesState(oCurrentAppContainerObject) {
|
|
33
|
+
const oAppComponent = oCurrentAppContainerObject.oContainer.getComponentInstance();
|
|
34
|
+
const sReference = ManifestUtils.getFlexReferenceForControl(oAppComponent);
|
|
35
|
+
return UIChangesState.getAllUIChanges(sReference);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
return function() {
|
|
39
|
+
return Utils.getUShellService("AppLifeCycle").then(function(oAppLifeCycleService) {
|
|
40
|
+
if (oAppLifeCycleService) {
|
|
41
|
+
const oCurrentApp = oAppLifeCycleService.getCurrentApplication();
|
|
42
|
+
if (oCurrentApp.componentInstance) {
|
|
43
|
+
return getAllUIChangesFromChangesState(oCurrentApp.componentInstance);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// potential cFLP scenario with the instance running in an iFrame where the top has no access to the componentInstance
|
|
47
|
+
return oCurrentApp.getIntent().then(function(oIntent) {
|
|
48
|
+
// The iFrame ID is not public API and may change in the future.
|
|
49
|
+
// Until there is an API, this is the way how to get any hold on the app at all
|
|
50
|
+
var iFrame = document.getElementById(`application-${oIntent.semanticObject}-${oIntent.action}`);
|
|
51
|
+
if (!iFrame) {
|
|
52
|
+
Log.error("the iFrame in the cFLP scenario could not be determined");
|
|
53
|
+
return undefined;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// to use the iFrame scope, the code has to be called via eval
|
|
57
|
+
return iFrame.contentWindow.eval("" +
|
|
58
|
+
" new Promise(function (resolve) {" +
|
|
59
|
+
" sap.ui.require([" +
|
|
60
|
+
' "sap/ui/fl/apply/_internal/flexState/ManifestUtils",' +
|
|
61
|
+
' "sap/ui/fl/Utils",' +
|
|
62
|
+
' "sap/ui/fl/apply/_internal/flexState/changes/UIChangesState"' +
|
|
63
|
+
" ], function (" +
|
|
64
|
+
" ManifestUtils," +
|
|
65
|
+
" Utils," +
|
|
66
|
+
" UIChangesState" +
|
|
67
|
+
" ) {" +
|
|
68
|
+
' Utils.getUShellService("AppLifeCycle").then(function (oAppLifeCycleService) {' +
|
|
69
|
+
" return oAppLifeCycleService.getCurrentApplication().componentInstance;" +
|
|
70
|
+
" }).then(function (oCurrentAppContainerObject) {" +
|
|
71
|
+
" if (oCurrentAppContainerObject) {" +
|
|
72
|
+
" const sReference = ManifestUtils.getFlexReferenceForControl(oAppComponent);" +
|
|
73
|
+
" resolve(return UIChangesState.getAllUIChanges(sReference));" +
|
|
74
|
+
" };" +
|
|
75
|
+
" });" +
|
|
76
|
+
" });" +
|
|
77
|
+
" });");
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// standalone case
|
|
82
|
+
const aApplications = ComponentRegistry.filter(function(oComponent) {
|
|
83
|
+
return oComponent.getManifestObject().getRawJson()["sap.app"].type === "application";
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
if (aApplications.length === 1) {
|
|
87
|
+
return getAllUIChangesFromChangesState(aApplications[0]);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
return undefined;
|
|
91
|
+
});
|
|
92
|
+
};
|
|
93
|
+
});
|
|
@@ -6,14 +6,14 @@
|
|
|
6
6
|
|
|
7
7
|
sap.ui.define([
|
|
8
8
|
"sap/base/Log",
|
|
9
|
-
"sap/ui/core/
|
|
9
|
+
"sap/ui/core/ComponentRegistry",
|
|
10
10
|
"sap/ui/fl/ChangePersistenceFactory",
|
|
11
11
|
"sap/ui/fl/apply/_internal/changes/FlexCustomData",
|
|
12
12
|
"sap/ui/fl/support/_internal/extractChangeDependencies",
|
|
13
13
|
"sap/ui/fl/Utils"
|
|
14
14
|
], function(
|
|
15
15
|
Log,
|
|
16
|
-
|
|
16
|
+
ComponentRegistry,
|
|
17
17
|
ChangePersistenceFactory,
|
|
18
18
|
FlexCustomData,
|
|
19
19
|
extractChangeDependencies,
|
|
@@ -27,7 +27,7 @@ sap.ui.define([
|
|
|
27
27
|
*
|
|
28
28
|
* @namespace sap.ui.fl.support._internal.getChangeDependencies
|
|
29
29
|
* @since 1.98
|
|
30
|
-
* @version 1.
|
|
30
|
+
* @version 1.121.0
|
|
31
31
|
* @private
|
|
32
32
|
* @ui5-restricted sap.ui.fl.support.api.SupportAPI
|
|
33
33
|
*/
|
|
@@ -83,7 +83,7 @@ sap.ui.define([
|
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
// standalone case
|
|
86
|
-
var aApplications =
|
|
86
|
+
var aApplications = ComponentRegistry.filter(function(oComponent) {
|
|
87
87
|
return oComponent.getManifestObject().getRawJson()["sap.app"].type === "application";
|
|
88
88
|
});
|
|
89
89
|
|
|
@@ -5,9 +5,11 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
sap.ui.define([
|
|
8
|
+
"sap/ui/fl/support/_internal/getAllUIChanges",
|
|
8
9
|
"sap/ui/fl/support/_internal/getFlexSettings",
|
|
9
10
|
"sap/ui/fl/support/_internal/getChangeDependencies"
|
|
10
11
|
], function(
|
|
12
|
+
getAllUIChanges,
|
|
11
13
|
getFlexSettings,
|
|
12
14
|
getChangeDependencies
|
|
13
15
|
) {
|
|
@@ -18,14 +20,15 @@ sap.ui.define([
|
|
|
18
20
|
*
|
|
19
21
|
* @namespace sap.ui.fl.support.api.SupportAPI
|
|
20
22
|
* @since 1.98
|
|
21
|
-
* @version 1.
|
|
23
|
+
* @version 1.121.0
|
|
22
24
|
* @private
|
|
23
25
|
* @ui5-restricted ui5 support tools
|
|
24
26
|
*/
|
|
25
27
|
var SupportAPI = /** @lends sap.ui.fl.support.api.SupportAPI */{
|
|
28
|
+
getAllUIChanges,
|
|
26
29
|
getChangeDependencies,
|
|
27
30
|
getFlexSettings
|
|
28
31
|
};
|
|
29
32
|
|
|
30
33
|
return SupportAPI;
|
|
31
|
-
});
|
|
34
|
+
});
|
|
@@ -13,7 +13,7 @@ sap.ui.define(["sap/ui/fl/Utils", "sap/ui/thirdparty/jquery"], function(Utils, j
|
|
|
13
13
|
* @constructor
|
|
14
14
|
* @alias sap.ui.fl.support.apps.contentbrowser.lrepConnector.LRepConnector
|
|
15
15
|
* @author SAP SE
|
|
16
|
-
* @version 1.
|
|
16
|
+
* @version 1.121.0
|
|
17
17
|
* @since 1.45
|
|
18
18
|
* @private
|
|
19
19
|
*/
|
|
@@ -17,7 +17,7 @@ sap.ui.define([
|
|
|
17
17
|
* @alias sap.ui.fl.transport.TransportSelection
|
|
18
18
|
* @constructor
|
|
19
19
|
* @author SAP SE
|
|
20
|
-
* @version 1.
|
|
20
|
+
* @version 1.121.0
|
|
21
21
|
* @since 1.38.0
|
|
22
22
|
* Helper object to select an ABAP transport for an LREP object. This is not a generic utility to select a transport request, but part
|
|
23
23
|
* of the SmartVariant control.
|
|
@@ -5,22 +5,18 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
sap.ui.define([
|
|
8
|
-
"sap/base/util/includes",
|
|
9
8
|
"sap/ui/fl/Layer"
|
|
10
9
|
], function(
|
|
11
|
-
includes,
|
|
12
10
|
Layer
|
|
13
11
|
) {
|
|
14
12
|
"use strict";
|
|
15
13
|
|
|
16
|
-
function checkChange(oEntityPropertyChange, aSupportedProperties, aSupportedOperations) {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
formatEntityCheck(oEntityPropertyChange, aSupportedProperties, aSupportedOperations);
|
|
23
|
-
}
|
|
14
|
+
function checkChange(oEntityPropertyChange, aSupportedProperties, aSupportedOperations, oSupportedPropertyPattern) {
|
|
15
|
+
const aEntityPropertyChanges = Array.isArray(oEntityPropertyChange) ? oEntityPropertyChange : [oEntityPropertyChange];
|
|
16
|
+
aEntityPropertyChanges.forEach(function(oChange) {
|
|
17
|
+
formatEntityCheck(oChange, aSupportedProperties, aSupportedOperations);
|
|
18
|
+
checkPropertyValuePattern(oChange, oSupportedPropertyPattern);
|
|
19
|
+
});
|
|
24
20
|
}
|
|
25
21
|
|
|
26
22
|
/**
|
|
@@ -72,10 +68,10 @@ sap.ui.define([
|
|
|
72
68
|
throw new Error("Invalid change format: The mandatory 'propertyValue' is not defined. Please define the mandatory property 'propertyValue'");
|
|
73
69
|
}
|
|
74
70
|
}
|
|
75
|
-
if (!includes(
|
|
71
|
+
if (!aSupportedProperties.includes(oChangeEntity.propertyPath) && !isGenericPropertyPathSupported(aSupportedProperties, oChangeEntity.propertyPath)) {
|
|
76
72
|
throw new Error(`Changing ${oChangeEntity.propertyPath} is not supported. The supported 'propertyPath' is: ${aSupportedProperties.join("|")}`);
|
|
77
73
|
}
|
|
78
|
-
if (!includes(
|
|
74
|
+
if (!aSupportedOperations.includes(oChangeEntity.operation)) {
|
|
79
75
|
throw new Error(`Operation ${oChangeEntity.operation} is not supported. The supported 'operation' is ${aSupportedOperations.join("|")}`);
|
|
80
76
|
}
|
|
81
77
|
}
|
|
@@ -87,21 +83,22 @@ sap.ui.define([
|
|
|
87
83
|
* @param {sap.ui.fl.apply._internal.flexObjects.FlexObject} oChange - Changes to be merged
|
|
88
84
|
* @param {Array} aSupportedProperties - Array of supported properties by change merger
|
|
89
85
|
* @param {Array} aSupportedOperations - Array of supported operations by change merger
|
|
86
|
+
* @param {Object} oSupportedPropertyPattern - Object with supported pattern as regex
|
|
90
87
|
* @private
|
|
91
88
|
* @ui5-restricted sap.ui.fl, sap.suite.ui.generic.template
|
|
92
89
|
*/
|
|
93
|
-
function checkEntityPropertyChange(oChange, aSupportedProperties, aSupportedOperations) {
|
|
94
|
-
var
|
|
95
|
-
return
|
|
90
|
+
function checkEntityPropertyChange(oChange, aSupportedProperties, aSupportedOperations, oSupportedPropertyPattern) {
|
|
91
|
+
var sId = Object.keys(oChange).filter(function(sKey) {
|
|
92
|
+
return sKey.endsWith("Id");
|
|
96
93
|
}).shift();
|
|
97
|
-
if (!oChange[
|
|
98
|
-
throw new Error(`Mandatory "${
|
|
94
|
+
if (!oChange[sId]) {
|
|
95
|
+
throw new Error(`Mandatory "${sId}" parameter is not provided.`);
|
|
99
96
|
}
|
|
100
97
|
if (!oChange.entityPropertyChange) {
|
|
101
|
-
throw new Error(`Changes for "${oChange[
|
|
98
|
+
throw new Error(`Changes for "${oChange[sId]}" are not provided.`);
|
|
102
99
|
}
|
|
103
100
|
|
|
104
|
-
checkChange(oChange.entityPropertyChange, aSupportedProperties, aSupportedOperations);
|
|
101
|
+
checkChange(oChange.entityPropertyChange, aSupportedProperties, aSupportedOperations, oSupportedPropertyPattern);
|
|
105
102
|
}
|
|
106
103
|
|
|
107
104
|
var layer_prefixes = {};
|
|
@@ -150,6 +147,24 @@ sap.ui.define([
|
|
|
150
147
|
return sPrefix;
|
|
151
148
|
}
|
|
152
149
|
|
|
150
|
+
/**
|
|
151
|
+
* Checks the format consistency for change mergers (ChangeDataSource and ChangeInbound)
|
|
152
|
+
* and other mergers with the prefix "change". The format of a change is valid if it includes the ID as well as <code>entityPropertyChange</code>.
|
|
153
|
+
*
|
|
154
|
+
* @param {sap.ui.fl.apply._internal.flexObjects.FlexObject} oChange - Changes to be merged
|
|
155
|
+
* @param {object} oSupportedPattern - Object with pattern for limited property values
|
|
156
|
+
* @private
|
|
157
|
+
* @ui5-restricted sap.ui.fl, sap.suite.ui.generic.template
|
|
158
|
+
*/
|
|
159
|
+
function checkPropertyValuePattern(oChange, oSupportedPattern) {
|
|
160
|
+
// if no pattern is provided, everything is allowed
|
|
161
|
+
if (!Object.keys(oSupportedPattern).includes(oChange.propertyPath)) { return; }
|
|
162
|
+
if (!oChange.propertyValue.match(oSupportedPattern[oChange.propertyPath])) {
|
|
163
|
+
throw new Error(`Not supported format for propertyPath ${oChange.propertyPath}. ` +
|
|
164
|
+
`The supported pattern is ${oSupportedPattern[oChange.propertyPath]}`);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
153
168
|
return {
|
|
154
169
|
checkEntityPropertyChange,
|
|
155
170
|
checkIdNamespaceCompliance,
|
|
@@ -53,7 +53,7 @@ sap.ui.define([
|
|
|
53
53
|
* @extends sap.ui.core.Control
|
|
54
54
|
*
|
|
55
55
|
* @author SAP SE
|
|
56
|
-
* @version 1.
|
|
56
|
+
* @version 1.121.0
|
|
57
57
|
*
|
|
58
58
|
* @constructor
|
|
59
59
|
* @private
|
|
@@ -162,7 +162,7 @@ sap.ui.define([
|
|
|
162
162
|
// Make sure that it was not encoded before
|
|
163
163
|
var sEncodedUrl = decodeURI(sUrl) === sUrl ? encodeURI(sUrl) : sUrl;
|
|
164
164
|
|
|
165
|
-
if (IFrame.isValidUrl(sEncodedUrl)) {
|
|
165
|
+
if (IFrame.isValidUrl(sEncodedUrl).result) {
|
|
166
166
|
if (this.getUseLegacyNavigation()) {
|
|
167
167
|
// Set by pushing to the history
|
|
168
168
|
this._setUrlLegacy(sEncodedUrl);
|
|
@@ -241,24 +241,56 @@ sap.ui.define([
|
|
|
241
241
|
return new URL(sUrl, oDocumentLocation.href);
|
|
242
242
|
};
|
|
243
243
|
|
|
244
|
+
IFrame.VALIDATION_ERROR = {
|
|
245
|
+
UNSAFE_PROTOCOL: "unsafeProtocol",
|
|
246
|
+
MIXED_CONTENT: "mixedContent",
|
|
247
|
+
FORBIDDEN_URL: "forbiddenUrl",
|
|
248
|
+
INVALID_URL: "invalidUrl"
|
|
249
|
+
};
|
|
250
|
+
|
|
244
251
|
IFrame.isValidUrl = function(sUrl) {
|
|
245
252
|
try {
|
|
246
253
|
const oUrl = IFrame._toUrl(sUrl);
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
//
|
|
258
|
-
|
|
259
|
-
|
|
254
|
+
|
|
255
|
+
// Forbid dangerous javascript pseudo protocol
|
|
256
|
+
if (/javascript/i.test(oUrl.protocol)) {
|
|
257
|
+
return {
|
|
258
|
+
result: false,
|
|
259
|
+
error: IFrame.VALIDATION_ERROR.UNSAFE_PROTOCOL
|
|
260
|
+
};
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
if (
|
|
264
|
+
// Forbid unsafe http embedding within https to conform with mixed content security restrictions
|
|
265
|
+
/http(?!s)/.test(oUrl.protocol)
|
|
266
|
+
// Exception: Host is using http, no protocol downgrade happening
|
|
267
|
+
// Required for local testing and onPrem systems
|
|
268
|
+
&& !/http(?!s)/.test(IFrame._getDocumentLocation().protocol)
|
|
269
|
+
) {
|
|
270
|
+
return {
|
|
271
|
+
result: false,
|
|
272
|
+
error: IFrame.VALIDATION_ERROR.MIXED_CONTENT
|
|
273
|
+
};
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
// Take further customer restrictions into account
|
|
277
|
+
// Since the validator doesn't return an error, use a generic error message
|
|
278
|
+
if (!URLListValidator.validate(sUrl)) {
|
|
279
|
+
return {
|
|
280
|
+
result: false,
|
|
281
|
+
error: IFrame.VALIDATION_ERROR.FORBIDDEN_URL
|
|
282
|
+
};
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
return {
|
|
286
|
+
result: true
|
|
287
|
+
};
|
|
260
288
|
} catch {
|
|
261
|
-
|
|
289
|
+
// URL parsing failed
|
|
290
|
+
return {
|
|
291
|
+
result: false,
|
|
292
|
+
error: IFrame.VALIDATION_ERROR.INVALID_URL
|
|
293
|
+
};
|
|
262
294
|
}
|
|
263
295
|
};
|
|
264
296
|
|