@openui5/sap.ui.fl 1.92.0 → 1.95.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/{.eslintrc → .eslintrc.json} +0 -0
- package/.reuse/dep5 +1 -6
- package/THIRDPARTY.txt +4 -10
- 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 +44 -27
- package/src/sap/ui/fl/ChangePersistence.js +63 -22
- package/src/sap/ui/fl/ChangePersistenceFactory.js +1 -1
- package/src/sap/ui/fl/ControlPersonalizationAPI.js +1 -1
- package/src/sap/ui/fl/EventHistory.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 +1 -1
- package/src/sap/ui/fl/FlexControllerFactory.js +1 -1
- package/src/sap/ui/fl/LayerUtils.js +1 -1
- package/src/sap/ui/fl/PreprocessorImpl.js +1 -1
- package/src/sap/ui/fl/RegistrationDelegator.js +1 -1
- package/src/sap/ui/fl/Utils.js +50 -2
- package/src/sap/ui/fl/Variant.js +20 -20
- package/src/sap/ui/fl/XmlPreprocessorImpl.js +1 -1
- package/src/sap/ui/fl/apply/_internal/DelegateMediator.js +2 -2
- package/src/sap/ui/fl/apply/_internal/appVariant/DescriptorChangeTypes.js +2 -1
- package/src/sap/ui/fl/apply/_internal/changes/Applier.js +117 -70
- package/src/sap/ui/fl/apply/_internal/changes/FlexCustomData.js +173 -43
- package/src/sap/ui/fl/apply/_internal/changes/Reverter.js +91 -85
- package/src/sap/ui/fl/apply/_internal/changes/Utils.js +19 -8
- 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 +3 -2
- 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 +52 -0
- 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/flexState/FlexState.js +13 -1
- package/src/sap/ui/fl/apply/_internal/flexState/Loader.js +52 -4
- package/src/sap/ui/fl/apply/_internal/flexState/ManifestUtils.js +5 -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 +1 -1
- 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 -1
- package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/VariantManagementState.js +12 -7
- package/src/sap/ui/fl/apply/api/ControlVariantApplyAPI.js +1 -1
- package/src/sap/ui/fl/apply/api/SmartVariantManagementApplyAPI.js +2 -0
- package/src/sap/ui/fl/changeHandler/AddIFrame.js +23 -9
- package/src/sap/ui/fl/changeHandler/AddXML.js +2 -3
- package/src/sap/ui/fl/changeHandler/AddXMLAtExtensionPoint.js +40 -29
- package/src/sap/ui/fl/changeHandler/Base.js +10 -8
- package/src/sap/ui/fl/changeHandler/BaseAddViaDelegate.js +43 -30
- package/src/sap/ui/fl/changeHandler/BaseAddXml.js +65 -26
- package/src/sap/ui/fl/changeHandler/BaseRename.js +29 -18
- package/src/sap/ui/fl/changeHandler/HideControl.js +21 -18
- package/src/sap/ui/fl/changeHandler/MoveControls.js +250 -172
- package/src/sap/ui/fl/changeHandler/MoveElements.js +90 -61
- package/src/sap/ui/fl/changeHandler/PropertyBindingChange.js +12 -12
- package/src/sap/ui/fl/changeHandler/PropertyChange.js +27 -23
- package/src/sap/ui/fl/changeHandler/StashControl.js +51 -23
- package/src/sap/ui/fl/changeHandler/UnhideControl.js +13 -14
- package/src/sap/ui/fl/changeHandler/UnstashControl.js +23 -16
- package/src/sap/ui/fl/changeHandler/UpdateIFrame.js +45 -22
- package/src/sap/ui/fl/changeHandler/common/createIFrame.js +6 -2
- package/src/sap/ui/fl/changeHandler/common/getTargetAggregationIndex.js +8 -4
- package/src/sap/ui/fl/changeHandler/common/revertAddedControls.js +17 -7
- 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 +18 -1
- package/src/sap/ui/fl/descriptorRelated/api/DescriptorVariantFactory.js +1 -1
- package/src/sap/ui/fl/descriptorRelated/internal/Utils.js +1 -0
- package/src/sap/ui/fl/designtime/util/IFrame.designtime.js +3 -0
- 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/ChangeHandlerStorage.js +5 -0
- package/src/sap/ui/fl/initial/_internal/changeHandlers/ChangeRegistryItem.js +1 -1
- package/src/sap/ui/fl/initial/_internal/connectors/Utils.js +2 -2
- 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 +9 -9
- package/src/sap/ui/fl/messagebundle.properties +24 -0
- package/src/sap/ui/fl/messagebundle_ar.properties +17 -1
- package/src/sap/ui/fl/messagebundle_bg.properties +17 -1
- package/src/sap/ui/fl/messagebundle_ca.properties +18 -2
- package/src/sap/ui/fl/messagebundle_cs.properties +17 -1
- package/src/sap/ui/fl/messagebundle_cy.properties +17 -1
- package/src/sap/ui/fl/messagebundle_da.properties +17 -1
- package/src/sap/ui/fl/messagebundle_de.properties +17 -1
- package/src/sap/ui/fl/messagebundle_el.properties +17 -1
- package/src/sap/ui/fl/messagebundle_en.properties +16 -0
- package/src/sap/ui/fl/messagebundle_en_GB.properties +16 -0
- package/src/sap/ui/fl/messagebundle_en_US_sappsd.properties +16 -0
- package/src/sap/ui/fl/messagebundle_en_US_saptrc.properties +16 -0
- package/src/sap/ui/fl/messagebundle_es.properties +18 -2
- package/src/sap/ui/fl/messagebundle_es_MX.properties +17 -1
- package/src/sap/ui/fl/messagebundle_et.properties +17 -1
- package/src/sap/ui/fl/messagebundle_fi.properties +17 -1
- package/src/sap/ui/fl/messagebundle_fr.properties +16 -0
- package/src/sap/ui/fl/messagebundle_fr_CA.properties +16 -0
- package/src/sap/ui/fl/messagebundle_hi.properties +17 -1
- package/src/sap/ui/fl/messagebundle_hr.properties +17 -1
- package/src/sap/ui/fl/messagebundle_hu.properties +17 -1
- package/src/sap/ui/fl/messagebundle_id.properties +17 -1
- package/src/sap/ui/fl/messagebundle_it.properties +17 -1
- package/src/sap/ui/fl/messagebundle_iw.properties +17 -1
- package/src/sap/ui/fl/messagebundle_ja.properties +17 -1
- package/src/sap/ui/fl/messagebundle_kk.properties +17 -1
- package/src/sap/ui/fl/messagebundle_ko.properties +17 -1
- package/src/sap/ui/fl/messagebundle_lt.properties +17 -1
- package/src/sap/ui/fl/messagebundle_lv.properties +17 -1
- package/src/sap/ui/fl/messagebundle_ms.properties +17 -1
- package/src/sap/ui/fl/messagebundle_nl.properties +17 -1
- package/src/sap/ui/fl/messagebundle_no.properties +17 -1
- package/src/sap/ui/fl/messagebundle_pl.properties +17 -1
- package/src/sap/ui/fl/messagebundle_pt.properties +17 -1
- package/src/sap/ui/fl/messagebundle_pt_PT.properties +17 -1
- package/src/sap/ui/fl/messagebundle_ro.properties +16 -0
- package/src/sap/ui/fl/messagebundle_ru.properties +17 -1
- package/src/sap/ui/fl/messagebundle_sh.properties +19 -3
- package/src/sap/ui/fl/messagebundle_sk.properties +17 -1
- package/src/sap/ui/fl/messagebundle_sl.properties +17 -1
- package/src/sap/ui/fl/messagebundle_sv.properties +17 -1
- package/src/sap/ui/fl/messagebundle_th.properties +17 -1
- package/src/sap/ui/fl/messagebundle_tr.properties +17 -1
- package/src/sap/ui/fl/messagebundle_uk.properties +19 -3
- package/src/sap/ui/fl/messagebundle_vi.properties +17 -1
- package/src/sap/ui/fl/messagebundle_zh_CN.properties +17 -1
- package/src/sap/ui/fl/messagebundle_zh_TW.properties +17 -1
- package/src/sap/ui/fl/registry/Settings.js +27 -23
- package/src/sap/ui/fl/support/Flexibility.js +1 -1
- 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 +7 -7
- package/src/sap/ui/fl/support/apps/contentbrowser/utils/DataUtils.js +2 -2
- package/src/sap/ui/fl/support/apps/contentbrowser/utils/ErrorUtils.js +1 -1
- package/src/sap/ui/fl/support/diagnostics/Flexibility.controller.js +1 -1
- package/src/sap/ui/fl/themes/base/VariantManagement.less +5 -0
- package/src/sap/ui/fl/transport/TransportSelection.js +1 -1
- package/src/sap/ui/fl/util/IFrame.flexibility.js +2 -1
- package/src/sap/ui/fl/util/IFrame.js +29 -2
- 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/resolveBinding.js +1 -1
- package/src/sap/ui/fl/variants/VariantManagement.js +133 -36
- package/src/sap/ui/fl/variants/VariantModel.js +57 -23
- package/src/sap/ui/fl/write/_internal/Storage.js +2 -2
- package/src/sap/ui/fl/write/_internal/StorageFeaturesMerger.js +4 -1
- package/src/sap/ui/fl/write/_internal/Versions.js +1 -1
- package/src/sap/ui/fl/write/_internal/appVariant/AppVariant.js +1 -1
- package/src/sap/ui/fl/write/_internal/appVariant/AppVariantFactory.js +1 -1
- package/src/sap/ui/fl/write/_internal/appVariant/AppVariantInlineChange.js +1 -1
- package/src/sap/ui/fl/write/_internal/appVariant/AppVariantInlineChangeFactory.js +20 -1
- package/src/sap/ui/fl/write/_internal/condenser/Condenser.js +23 -12
- package/src/sap/ui/fl/write/_internal/condenser/UIReconstruction.js +2 -24
- package/src/sap/ui/fl/write/_internal/condenser/Utils.js +8 -5
- package/src/sap/ui/fl/write/_internal/condenser/classifications/Create.js +10 -8
- package/src/sap/ui/fl/write/_internal/condenser/classifications/Destroy.js +14 -11
- package/src/sap/ui/fl/write/_internal/condenser/classifications/Move.js +37 -20
- package/src/sap/ui/fl/write/_internal/connectors/BackendConnector.js +1 -1
- package/src/sap/ui/fl/write/_internal/connectors/KeyUserConnector.js +1 -1
- package/src/sap/ui/fl/write/_internal/connectors/LocalStorageConnector.js +1 -0
- package/src/sap/ui/fl/write/_internal/connectors/LrepConnector.js +1 -1
- 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/delegates/ODataV4ReadDelegate.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 +7 -5
- 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 +2 -2
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/CAPAccess.js +129 -0
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/dialog/CustomFieldCAPDialog.fragment.xml +33 -0
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/dialog/CustomFieldCAPDialog.js +172 -0
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/getEditorConfig.js +209 -0
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/annotationsEditor/AnnotationsEditor.js +49 -0
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/booleanEditor/BooleanEditor.fragment.xml +6 -0
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/booleanEditor/BooleanEditor.js +41 -0
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/dateEditor/DateEditor.js +43 -0
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/dateTimeEditor/DateTimeEditor.js +38 -0
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/rangeEditor/RangeEditor.fragment.xml +22 -0
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/rangeEditor/RangeEditor.js +84 -0
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/timeEditor/TimeEditor.fragment.xml +10 -0
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/timeEditor/TimeEditor.js +70 -0
- package/src/sap/ui/fl/write/_internal/flexState/FlexObjectState.js +16 -10
- package/src/sap/ui/fl/write/_internal/flexState/compVariants/CompVariantState.js +11 -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 -1
- package/src/sap/ui/fl/write/api/FeaturesAPI.js +1 -0
- package/src/sap/ui/fl/write/api/FieldExtensibility.js +24 -9
- package/src/sap/ui/fl/write/api/LocalResetAPI.js +9 -8
- package/src/sap/ui/fl/write/api/PersistenceWriteAPI.js +32 -26
- package/src/sap/ui/fl/write/api/SmartVariantManagementWriteAPI.js +1 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* OpenUI5
|
|
3
|
+
* (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
// Customization of the default datetime editor to support custom output formats
|
|
8
|
+
// To be implemented in base class
|
|
9
|
+
|
|
10
|
+
sap.ui.define([
|
|
11
|
+
"sap/ui/integration/designtime/baseEditor/propertyEditor/dateTimeEditor/DateTimeEditor"
|
|
12
|
+
], function (
|
|
13
|
+
BaseDateTimeEditor
|
|
14
|
+
) {
|
|
15
|
+
"use strict";
|
|
16
|
+
|
|
17
|
+
var DateTimeEditor = BaseDateTimeEditor.extend("sap.ui.fl.write._internal.fieldExtensibility.cap.editor.propertyEditor.dateTimeEditor.DateTimeEditor", {
|
|
18
|
+
xmlFragment: "sap.ui.integration.designtime.baseEditor.propertyEditor.dateTimeEditor.DateTimeEditor",
|
|
19
|
+
metadata: {
|
|
20
|
+
library: "sap.ui.fl"
|
|
21
|
+
},
|
|
22
|
+
renderer: BaseDateTimeEditor.getMetadata().getRenderer().render
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
DateTimeEditor.prototype._parse = function (sValue) {
|
|
26
|
+
if (sValue === "") {
|
|
27
|
+
return undefined;
|
|
28
|
+
}
|
|
29
|
+
var sParsedDate = new Date(sValue);
|
|
30
|
+
|
|
31
|
+
// TODO: For now use a hardcoded format, move to default config later
|
|
32
|
+
return this._isValidDate(sParsedDate)
|
|
33
|
+
? sParsedDate.toISOString().split(".")[0] + "Z" // Cut ms
|
|
34
|
+
: sValue;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
return DateTimeEditor;
|
|
38
|
+
});
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<core:FragmentDefinition
|
|
2
|
+
xmlns="sap.m"
|
|
3
|
+
xmlns:core="sap.ui.core"
|
|
4
|
+
xmlns:baseEditor="sap.ui.integration.designtime.baseEditor"
|
|
5
|
+
>
|
|
6
|
+
<HBox>
|
|
7
|
+
<baseEditor:PropertyEditor
|
|
8
|
+
init="wrapperInit"
|
|
9
|
+
config="{contentModel>/0/config}"
|
|
10
|
+
value="{contentModel>/0/value}"
|
|
11
|
+
renderLabel="false"
|
|
12
|
+
valueChange="_onChange"
|
|
13
|
+
/>
|
|
14
|
+
<baseEditor:PropertyEditor
|
|
15
|
+
init="wrapperInit"
|
|
16
|
+
config="{contentModel>/1/config}"
|
|
17
|
+
value="{contentModel>/1/value}"
|
|
18
|
+
renderLabel="false"
|
|
19
|
+
valueChange="_onChange"
|
|
20
|
+
/>
|
|
21
|
+
</HBox>
|
|
22
|
+
</core:FragmentDefinition>
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* OpenUI5
|
|
3
|
+
* (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
|
+
*/
|
|
6
|
+
sap.ui.define([
|
|
7
|
+
"sap/ui/integration/designtime/baseEditor/propertyEditor/BasePropertyEditor",
|
|
8
|
+
"sap/ui/model/json/JSONModel"
|
|
9
|
+
], function (
|
|
10
|
+
BasePropertyEditor,
|
|
11
|
+
JSONModel
|
|
12
|
+
) {
|
|
13
|
+
"use strict";
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* @class
|
|
17
|
+
* Constructor for a new <code>RangeEditor</code>.
|
|
18
|
+
*
|
|
19
|
+
* @extends sap.ui.integration.designtime.baseEditor.propertyEditor.BasePropertyEditor
|
|
20
|
+
* @alias sap.ui.fl.write._internal.fieldExtensibility.cap.editor.propertyEditor.rangeEditor.RangeEditor
|
|
21
|
+
* @author SAP SE
|
|
22
|
+
* @since 1.93
|
|
23
|
+
* @version 1.95.0
|
|
24
|
+
*
|
|
25
|
+
* @private
|
|
26
|
+
* @experimental 1.93
|
|
27
|
+
* @ui5-restricted sap.ui.fl
|
|
28
|
+
*/
|
|
29
|
+
var RangeEditor = BasePropertyEditor.extend("sap.ui.fl.write._internal.fieldExtensibility.cap.editor.propertyEditor.rangeEditor.RangeEditor", {
|
|
30
|
+
xmlFragment: "sap.ui.fl.write._internal.fieldExtensibility.cap.editor.propertyEditor.rangeEditor.RangeEditor",
|
|
31
|
+
metadata: {
|
|
32
|
+
library: "sap.ui.fl"
|
|
33
|
+
},
|
|
34
|
+
renderer: BasePropertyEditor.getMetadata().getRenderer().render
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
RangeEditor.configMetadata = Object.assign({}, BasePropertyEditor.configMetadata, {
|
|
38
|
+
rangeType: {
|
|
39
|
+
defaultValue: "string"
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
RangeEditor.prototype.init = function() {
|
|
44
|
+
BasePropertyEditor.prototype.init.apply(this, arguments);
|
|
45
|
+
this._oContentModel = new JSONModel();
|
|
46
|
+
this._oContentModel.setDefaultBindingMode("OneWay");
|
|
47
|
+
this.setModel(this._oContentModel, "contentModel");
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
RangeEditor.prototype.getExpectedWrapperCount = function () {
|
|
51
|
+
return 2;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
RangeEditor.prototype.setConfig = function() {
|
|
55
|
+
// RangeType might change, make sure to update nested editors
|
|
56
|
+
BasePropertyEditor.prototype.setConfig.apply(this, arguments);
|
|
57
|
+
this.setValue(this.getValue());
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
RangeEditor.prototype.setValue = function(aValues) {
|
|
61
|
+
BasePropertyEditor.prototype.setValue.apply(this, arguments);
|
|
62
|
+
var oConfig = {
|
|
63
|
+
type: this.getConfig().rangeType
|
|
64
|
+
};
|
|
65
|
+
var aRangeValues = Array.isArray(aValues) ? aValues : [];
|
|
66
|
+
this._oContentModel.setData([{
|
|
67
|
+
value: aRangeValues[0],
|
|
68
|
+
config: Object.assign({ index: 0 }, oConfig)
|
|
69
|
+
}, {
|
|
70
|
+
value: aRangeValues[1],
|
|
71
|
+
config: Object.assign({ index: 1 }, oConfig)
|
|
72
|
+
}]);
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
RangeEditor.prototype._onChange = function(oEvent) {
|
|
76
|
+
var vValue = oEvent.getParameter("value");
|
|
77
|
+
var iIndex = oEvent.getSource().getConfig().index;
|
|
78
|
+
var aNewValue = (this.getValue() || []).slice();
|
|
79
|
+
aNewValue[iIndex] = vValue;
|
|
80
|
+
this.setValue(aNewValue);
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
return RangeEditor;
|
|
84
|
+
});
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* OpenUI5
|
|
3
|
+
* (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
|
+
*/
|
|
6
|
+
sap.ui.define([
|
|
7
|
+
"sap/ui/integration/designtime/baseEditor/propertyEditor/BasePropertyEditor",
|
|
8
|
+
"sap/ui/integration/designtime/baseEditor/propertyEditor/dateEditor/DateEditor",
|
|
9
|
+
"sap/ui/core/format/DateFormat"
|
|
10
|
+
], function (
|
|
11
|
+
BasePropertyEditor,
|
|
12
|
+
DateEditor,
|
|
13
|
+
DateFormat
|
|
14
|
+
) {
|
|
15
|
+
"use strict";
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* @class
|
|
19
|
+
* Constructor for a new <code>TimeEditor</code>.
|
|
20
|
+
*
|
|
21
|
+
* @extends sap.ui.integration.designtime.baseEditor.propertyEditor.dateEditor.DateEditor
|
|
22
|
+
* @alias sap.ui.fl.write._internal.fieldExtensibility.cap.editor.propertyEditor.timeEditor.TimeEditor
|
|
23
|
+
* @author SAP SE
|
|
24
|
+
* @since 1.93
|
|
25
|
+
* @version 1.95.0
|
|
26
|
+
*
|
|
27
|
+
* @private
|
|
28
|
+
* @experimental 1.93
|
|
29
|
+
* @ui5-restricted sap.ui.fl
|
|
30
|
+
*/
|
|
31
|
+
var TimeEditor = DateEditor.extend("sap.ui.fl.write._internal.fieldExtensibility.cap.editor.propertyEditor.timeEditor.TimeEditor", {
|
|
32
|
+
xmlFragment: "sap.ui.fl.write._internal.fieldExtensibility.cap.editor.propertyEditor.timeEditor.TimeEditor",
|
|
33
|
+
metadata: {
|
|
34
|
+
library: "sap.ui.fl"
|
|
35
|
+
},
|
|
36
|
+
renderer: BasePropertyEditor.getMetadata().getRenderer().render
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
TimeEditor.prototype.getDefaultValidators = function () {
|
|
40
|
+
return Object.assign(
|
|
41
|
+
{},
|
|
42
|
+
BasePropertyEditor.prototype.getDefaultValidators.call(this)
|
|
43
|
+
);
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
TimeEditor.prototype.formatValue = function (sValue) {
|
|
47
|
+
return sValue;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
TimeEditor.prototype._parse = function (sValue) {
|
|
51
|
+
if (sValue === "") {
|
|
52
|
+
return undefined;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// For now use a hardcoded format, move to default config later
|
|
56
|
+
var oTimeFormatterInstance = DateFormat.getTimeInstance({
|
|
57
|
+
pattern: "HH:mm:ss"
|
|
58
|
+
});
|
|
59
|
+
var oParsedDate = oTimeFormatterInstance.parse(sValue);
|
|
60
|
+
return this._isValidDate(oParsedDate)
|
|
61
|
+
? oTimeFormatterInstance.format(oParsedDate)
|
|
62
|
+
: sValue;
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
TimeEditor.prototype.getFormatterInstance = function () {
|
|
66
|
+
return DateFormat.getTimeInstance();
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
return TimeEditor;
|
|
70
|
+
});
|
|
@@ -10,6 +10,7 @@ sap.ui.define([
|
|
|
10
10
|
"sap/ui/fl/apply/_internal/flexState/ManifestUtils",
|
|
11
11
|
"sap/ui/fl/apply/_internal/ChangesController",
|
|
12
12
|
"sap/ui/fl/write/_internal/flexState/compVariants/CompVariantState",
|
|
13
|
+
"sap/ui/fl/apply/_internal/flexState/compVariants/CompVariantMerger",
|
|
13
14
|
"sap/ui/fl/ChangePersistenceFactory",
|
|
14
15
|
"sap/ui/fl/LayerUtils",
|
|
15
16
|
"sap/ui/fl/apply/_internal/flexState/compVariants/Utils",
|
|
@@ -20,6 +21,7 @@ sap.ui.define([
|
|
|
20
21
|
ManifestUtils,
|
|
21
22
|
ChangesController,
|
|
22
23
|
CompVariantState,
|
|
24
|
+
CompVariantMerger,
|
|
23
25
|
ChangePersistenceFactory,
|
|
24
26
|
LayerUtils,
|
|
25
27
|
CompVariantsUtils,
|
|
@@ -30,7 +32,7 @@ sap.ui.define([
|
|
|
30
32
|
/**
|
|
31
33
|
* @namespace sap.ui.fl.apply._internal.flexState.FlexObjectState
|
|
32
34
|
* @since 1.83
|
|
33
|
-
* @version 1.
|
|
35
|
+
* @version 1.95.0
|
|
34
36
|
* @private
|
|
35
37
|
* @ui5-restricted sap.ui.fl
|
|
36
38
|
*/
|
|
@@ -50,6 +52,17 @@ sap.ui.define([
|
|
|
50
52
|
function getCompVariantEntities(mPropertyBag) {
|
|
51
53
|
var mCompEntities = FlexState.getCompVariantsMap(mPropertyBag.reference);
|
|
52
54
|
var aEntities = [];
|
|
55
|
+
//Enhance CompVariantsMap with external data and standard variant after FlexState has been cleared and reinitialized
|
|
56
|
+
if (mPropertyBag.invalidateCache) {
|
|
57
|
+
var oDataToRestore = FlexState.getInitialNonFlCompVariantData(mPropertyBag.reference);
|
|
58
|
+
if (oDataToRestore) {
|
|
59
|
+
Object.keys(oDataToRestore).forEach(function(sPersistencyKey) {
|
|
60
|
+
mCompEntities._initialize(sPersistencyKey, oDataToRestore[sPersistencyKey].variants);
|
|
61
|
+
CompVariantMerger.merge(sPersistencyKey, mCompEntities[sPersistencyKey], oDataToRestore[sPersistencyKey].standardVariant);
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
53
66
|
for (var sPersistencyKey in mCompEntities) {
|
|
54
67
|
var mCompVariantsOfPersistencyKey = mCompEntities[sPersistencyKey];
|
|
55
68
|
for (var sId in mCompVariantsOfPersistencyKey.byId) {
|
|
@@ -108,15 +121,8 @@ sap.ui.define([
|
|
|
108
121
|
FlexObjectState.getFlexObjects = function (mPropertyBag) {
|
|
109
122
|
return initFlexStateAndSetReference(mPropertyBag)
|
|
110
123
|
.then(function () {
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
return Promise.all([
|
|
115
|
-
aCompVariantEntities,
|
|
116
|
-
aChangePersistenceEntities
|
|
117
|
-
]).then(function (aEntities) {
|
|
118
|
-
return aEntities[0] // compVariant entities (changes of type defaultVariant / standardVariant, variant)
|
|
119
|
-
.concat(aEntities[1]); // ChangePersistence entities (change, ctrl_variant, ctrl_variant_change, ctrl_variant_management_change)
|
|
124
|
+
return getChangePersistenceEntities(mPropertyBag).then(function (aChangePersistenceEntities) {
|
|
125
|
+
return getCompVariantEntities(mPropertyBag).concat(aChangePersistenceEntities);
|
|
120
126
|
});
|
|
121
127
|
});
|
|
122
128
|
};
|
|
@@ -220,7 +220,7 @@ sap.ui.define([
|
|
|
220
220
|
*
|
|
221
221
|
* @namespace sap.ui.fl.write._internal.flexState.compVariants.CompVariantState
|
|
222
222
|
* @since 1.83
|
|
223
|
-
* @version 1.
|
|
223
|
+
* @version 1.95.0
|
|
224
224
|
* @private
|
|
225
225
|
* @ui5-restricted sap.ui.fl
|
|
226
226
|
*/
|
|
@@ -383,6 +383,7 @@ sap.ui.define([
|
|
|
383
383
|
* @param {string} mPropertyBag.persistencyKey - Key of the variant management
|
|
384
384
|
* @param {string} mPropertyBag.id - ID of the variant
|
|
385
385
|
* @param {string} [mPropertyBag.packageName] - ID of the package in which the update should be transported - only valid for sap-ui-layer=VENDOR use case
|
|
386
|
+
* @param {string} [mPropertyBag.transportId] - ID of the transport in which the update should be transported
|
|
386
387
|
* @param {object} [mPropertyBag.revert=false] - Flag if the update is a revert operation
|
|
387
388
|
* @param {object} [mPropertyBag.name] - Title of the variant
|
|
388
389
|
* @param {object} [mPropertyBag.content] - Content of the new change
|
|
@@ -397,7 +398,7 @@ sap.ui.define([
|
|
|
397
398
|
CompVariantState.updateVariant = function (mPropertyBag) {
|
|
398
399
|
function variantCanBeUpdated(oVariant, sLayer) {
|
|
399
400
|
var bSameLayer = oVariant.getLayer() === sLayer;
|
|
400
|
-
var sPackageName = oVariant.
|
|
401
|
+
var sPackageName = oVariant.getPackage();
|
|
401
402
|
var bNotTransported = !sPackageName || sPackageName === "$TMP";
|
|
402
403
|
// in case changes were already done within the layer, no update of the variant can be done to safeguard the execution order
|
|
403
404
|
var bIsChangedOnLayer = oVariant.getChanges().some(function (oChange) {
|
|
@@ -446,8 +447,8 @@ sap.ui.define([
|
|
|
446
447
|
if (mPropertyBag.name) {
|
|
447
448
|
oVariant.storeName(mPropertyBag.name);
|
|
448
449
|
}
|
|
449
|
-
if (mPropertyBag.
|
|
450
|
-
oVariant.setRequest(mPropertyBag.
|
|
450
|
+
if (mPropertyBag.transportId) {
|
|
451
|
+
oVariant.setRequest(mPropertyBag.transportId);
|
|
451
452
|
}
|
|
452
453
|
oVariant.storeContent(mPropertyBag.content || oVariant.getContent());
|
|
453
454
|
}
|
|
@@ -488,6 +489,9 @@ sap.ui.define([
|
|
|
488
489
|
};
|
|
489
490
|
}
|
|
490
491
|
oChange.setContent(oChangeContent);
|
|
492
|
+
if (mPropertyBag.transportId) {
|
|
493
|
+
oChange.setRequest(mPropertyBag.transportId);
|
|
494
|
+
}
|
|
491
495
|
CompVariantMerger.applyChangeOnVariant(oVariant, oChange);
|
|
492
496
|
storeRevertDataInVariant(mPropertyBag, oVariant, CompVariantState.operationType.UpdateVariantViaChangeUpdate, oChange);
|
|
493
497
|
}
|
|
@@ -531,6 +535,9 @@ sap.ui.define([
|
|
|
531
535
|
}
|
|
532
536
|
|
|
533
537
|
var oChange = new Change(oChangeDefinition);
|
|
538
|
+
if (mPropertyBag.transportId) {
|
|
539
|
+
oChange.setRequest(mPropertyBag.transportId);
|
|
540
|
+
}
|
|
534
541
|
addChange(oChange);
|
|
535
542
|
storeRevertDataInVariant(mPropertyBag, oVariant, CompVariantState.operationType.NewChange, oChange);
|
|
536
543
|
CompVariantMerger.applyChangeOnVariant(oVariant, oChange);
|
|
@@ -27,7 +27,7 @@ sap.ui.define([
|
|
|
27
27
|
* @alias sap.ui.fl.write._internal.transport.TransportSelection
|
|
28
28
|
* @constructor
|
|
29
29
|
* @author SAP SE
|
|
30
|
-
* @version 1.
|
|
30
|
+
* @version 1.95.0
|
|
31
31
|
* @since 1.74.0
|
|
32
32
|
* Helper object to select an ABAP transport for an LREP object. This is not a generic utility to select a transport request, but part
|
|
33
33
|
* of the SmartVariant control.
|
|
@@ -28,7 +28,7 @@ sap.ui.define([
|
|
|
28
28
|
* Entity that handles ABAP transport related information.
|
|
29
29
|
* @alias sap.ui.fl.write._internal.transport.Transports
|
|
30
30
|
* @author SAP SE
|
|
31
|
-
* @version 1.
|
|
31
|
+
* @version 1.95.0
|
|
32
32
|
* @since 1.74.0
|
|
33
33
|
* @private
|
|
34
34
|
* @ui5-restricted sap.ui.fl.write._internal.transport
|
|
@@ -125,7 +125,7 @@ sap.ui.define([
|
|
|
125
125
|
* @ui5-restricted
|
|
126
126
|
*/
|
|
127
127
|
apply: function(mPropertyBag) {
|
|
128
|
-
if (!mPropertyBag.element instanceof Element) {
|
|
128
|
+
if (!(mPropertyBag.element instanceof Element)) {
|
|
129
129
|
return Promise.reject("Please provide an Element");
|
|
130
130
|
}
|
|
131
131
|
|
|
@@ -5,9 +5,13 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
sap.ui.define([
|
|
8
|
-
"sap/ui/fl/write/_internal/fieldExtensibility/ABAPAccess"
|
|
8
|
+
"sap/ui/fl/write/_internal/fieldExtensibility/ABAPAccess",
|
|
9
|
+
"sap/ui/fl/write/_internal/fieldExtensibility/cap/CAPAccess",
|
|
10
|
+
"sap/base/util/UriParameters"
|
|
9
11
|
], function(
|
|
10
|
-
ABAPAccess
|
|
12
|
+
ABAPAccess,
|
|
13
|
+
CAPAccess,
|
|
14
|
+
UriParameters
|
|
11
15
|
) {
|
|
12
16
|
"use strict";
|
|
13
17
|
|
|
@@ -16,7 +20,7 @@ sap.ui.define([
|
|
|
16
20
|
*
|
|
17
21
|
* @namespace sap.ui.fl.write.api.FieldExtensibility
|
|
18
22
|
* @since 1.87
|
|
19
|
-
* @version 1.
|
|
23
|
+
* @version 1.95.0
|
|
20
24
|
* @private
|
|
21
25
|
* @ui5-restricted sap.ui.fl, sap.ui.rta
|
|
22
26
|
*/
|
|
@@ -27,15 +31,21 @@ sap.ui.define([
|
|
|
27
31
|
// we can add parameters here, but the assumption is that this is not dependent on a single control
|
|
28
32
|
function getImplementationForCurrentScenario() {
|
|
29
33
|
if (!_oCurrentScenario) {
|
|
30
|
-
|
|
31
|
-
|
|
34
|
+
var oUriParams = UriParameters.fromQuery(window.location.search);
|
|
35
|
+
if (oUriParams.get("sap-ui-fl-xx-capScenario") === "true") {
|
|
36
|
+
_oCurrentScenario = CAPAccess;
|
|
37
|
+
} else {
|
|
38
|
+
_oCurrentScenario = ABAPAccess;
|
|
39
|
+
}
|
|
32
40
|
}
|
|
33
41
|
return _oCurrentScenario;
|
|
34
42
|
}
|
|
35
43
|
|
|
36
|
-
function callFunctionInImplementation(
|
|
44
|
+
function callFunctionInImplementation() {
|
|
45
|
+
var aArgs = Array.from(arguments);
|
|
46
|
+
var sFunctionName = aArgs.shift();
|
|
37
47
|
var oImplementation = getImplementationForCurrentScenario();
|
|
38
|
-
return Promise.resolve(oImplementation[sFunctionName](
|
|
48
|
+
return Promise.resolve(oImplementation[sFunctionName].apply(null, aArgs));
|
|
39
49
|
}
|
|
40
50
|
|
|
41
51
|
/**
|
|
@@ -102,8 +112,13 @@ sap.ui.define([
|
|
|
102
112
|
*
|
|
103
113
|
* @param {object} oExtensibilityInfo - Information about the extension data. Should be the return value of <code>FieldExtensibility.getExtensionData</code>
|
|
104
114
|
*/
|
|
105
|
-
FieldExtensibility.onTriggerCreateExtensionData = function(oExtensibilityInfo) {
|
|
106
|
-
return callFunctionInImplementation("onTriggerCreateExtensionData", oExtensibilityInfo);
|
|
115
|
+
FieldExtensibility.onTriggerCreateExtensionData = function(oExtensibilityInfo, sRtaStyleClassName) {
|
|
116
|
+
return callFunctionInImplementation("onTriggerCreateExtensionData", oExtensibilityInfo, sRtaStyleClassName);
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
// Resets the current scenario for testing purposes
|
|
120
|
+
FieldExtensibility._resetCurrentScenario = function() {
|
|
121
|
+
_oCurrentScenario = null;
|
|
107
122
|
};
|
|
108
123
|
|
|
109
124
|
return FieldExtensibility;
|
|
@@ -88,16 +88,17 @@ sap.ui.define([
|
|
|
88
88
|
|
|
89
89
|
var aRevertQueue = aReverseChanges.map(function (oChange) {
|
|
90
90
|
var oControl = JsControlTreeModifier.bySelector(oChange.getSelector(), oAppComponent);
|
|
91
|
-
PersistenceWriteAPI.remove({
|
|
92
|
-
change: oChange,
|
|
93
|
-
selector: oControl
|
|
94
|
-
});
|
|
95
|
-
|
|
96
|
-
oChange.setQueuedForRevert();
|
|
97
91
|
return function () {
|
|
98
|
-
return
|
|
92
|
+
return PersistenceWriteAPI.remove({
|
|
99
93
|
change: oChange,
|
|
100
|
-
|
|
94
|
+
selector: oControl
|
|
95
|
+
})
|
|
96
|
+
.then(function () {
|
|
97
|
+
oChange.setQueuedForRevert();
|
|
98
|
+
return ChangesWriteAPI.revert({
|
|
99
|
+
change: oChange,
|
|
100
|
+
element: oControl
|
|
101
|
+
});
|
|
101
102
|
});
|
|
102
103
|
};
|
|
103
104
|
});
|
|
@@ -141,15 +141,15 @@ sap.ui.define([
|
|
|
141
141
|
var bIsLayerTransportable = mPropertyBag.layer !== Layer.USER && mPropertyBag.layer !== Layer.PUBLIC;
|
|
142
142
|
// By default:
|
|
143
143
|
// Reset is enabled if there is change
|
|
144
|
-
// Publish is
|
|
144
|
+
// Publish is by default disabled
|
|
145
145
|
// All contexts provided is true to not trigger a reload and add additional parameter to flex/data request
|
|
146
146
|
var oFlexInfo = {
|
|
147
147
|
isResetEnabled: bHasChanges,
|
|
148
|
-
isPublishEnabled:
|
|
148
|
+
isPublishEnabled: false,
|
|
149
149
|
allContextsProvided: true
|
|
150
150
|
};
|
|
151
151
|
// If there is change and the layer is transportable , the request to back end is always necessary
|
|
152
|
-
// because of control variant reset logic through setVisible change
|
|
152
|
+
// because of control variant reset logic through setVisible change and app descriptor changes
|
|
153
153
|
if (bIsLayerTransportable) {
|
|
154
154
|
return ChangesController.getFlexControllerInstance(mPropertyBag.selector).getResetAndPublishInfo(mPropertyBag)
|
|
155
155
|
.then(function(oResponse) {
|
|
@@ -157,7 +157,7 @@ sap.ui.define([
|
|
|
157
157
|
oFlexInfo.isResetEnabled = oResponse.isResetEnabled;
|
|
158
158
|
// Together with publish info from back end,
|
|
159
159
|
// system setting info for publish availability also need to be checked
|
|
160
|
-
oFlexInfo.isPublishEnabled =
|
|
160
|
+
oFlexInfo.isPublishEnabled = bIsPublishAvailable && oResponse.isPublishEnabled;
|
|
161
161
|
return oFlexInfo;
|
|
162
162
|
})
|
|
163
163
|
.catch(function(oError) {
|
|
@@ -252,32 +252,38 @@ sap.ui.define([
|
|
|
252
252
|
* @param {object} mPropertyBag - Object with parameters as properties
|
|
253
253
|
* @param {sap.ui.fl.Change} mPropertyBag.change - Change to be removed
|
|
254
254
|
* @param {sap.ui.fl.Selector} mPropertyBag.selector - To retrieve the associated flex persistence
|
|
255
|
-
*
|
|
255
|
+
* @returns {Promise} resolves when changes are removed
|
|
256
256
|
* @private
|
|
257
257
|
* @ui5-restricted
|
|
258
258
|
*/
|
|
259
259
|
PersistenceWriteAPI.remove = function(mPropertyBag) {
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
260
|
+
var oFlexController;
|
|
261
|
+
var oAppComponent;
|
|
262
|
+
return Promise.resolve()
|
|
263
|
+
.then(function () {
|
|
264
|
+
if (!mPropertyBag.selector) {
|
|
265
|
+
return Promise.reject(new Error("An invalid selector was passed so change could not be removed with id: " + mPropertyBag.change.getId()));
|
|
266
|
+
}
|
|
267
|
+
oAppComponent = ChangesController.getAppComponentForSelector(mPropertyBag.selector);
|
|
268
|
+
if (!oAppComponent) {
|
|
269
|
+
return Promise.reject(new Error("Invalid application component for selector, change could not be removed with id: " + mPropertyBag.change.getId()));
|
|
270
|
+
}
|
|
271
|
+
// descriptor change
|
|
272
|
+
if (isDescriptorChange(mPropertyBag.change)) {
|
|
273
|
+
var oDescriptorFlexController = ChangesController.getDescriptorFlexControllerInstance(oAppComponent);
|
|
274
|
+
oDescriptorFlexController.deleteChange(mPropertyBag.change, oAppComponent);
|
|
275
|
+
return undefined;
|
|
276
|
+
}
|
|
277
|
+
var oElement = JsControlTreeModifier.bySelector(mPropertyBag.change.getSelector(), oAppComponent);
|
|
278
|
+
oFlexController = ChangesController.getFlexControllerInstance(oAppComponent);
|
|
279
|
+
// remove custom data for flex change
|
|
280
|
+
if (oElement) {
|
|
281
|
+
FlexCustomData.sync.destroyAppliedCustomData(oElement, mPropertyBag.change, JsControlTreeModifier);
|
|
282
|
+
}
|
|
283
|
+
// delete from flex persistence map
|
|
284
|
+
oFlexController.deleteChange(mPropertyBag.change, oAppComponent);
|
|
285
|
+
return undefined;
|
|
286
|
+
});
|
|
281
287
|
};
|
|
282
288
|
|
|
283
289
|
/**
|
|
@@ -84,6 +84,7 @@ sap.ui.define([
|
|
|
84
84
|
* sap.ui.comp.smartchart.SmartChart} mPropertyBag.control - Variant management control for which the variant should be updated
|
|
85
85
|
* @param {string} mPropertyBag.id - ID of the variant
|
|
86
86
|
* @param {string} [mPropertyBag.packageName] - ID of the package in which the update should be transported - only valid for sap-ui-layer=VENDOR use case
|
|
87
|
+
* @param {string} [mPropertyBag.transportId] - ID of the transport in which the update should be assigned
|
|
87
88
|
* @param {object} [mPropertyBag.name] - Title of the variant
|
|
88
89
|
* @param {object} [mPropertyBag.content] - Content of the new change
|
|
89
90
|
* @param {object} [mPropertyBag.favorite] - Flag if the variant should be flagged as a favorite
|