@openui5/sap.ui.fl 1.93.3 → 1.96.2
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 +6 -11
- package/THIRDPARTY.txt +10 -16
- 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 +18 -14
- package/src/sap/ui/fl/ChangePersistence.js +92 -82
- package/src/sap/ui/fl/ChangePersistenceFactory.js +1 -1
- package/src/sap/ui/fl/ControlPersonalizationAPI.js +3 -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 +28 -22
- package/src/sap/ui/fl/FlexControllerFactory.js +9 -2
- package/src/sap/ui/fl/LayerUtils.js +34 -22
- 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 +54 -34
- package/src/sap/ui/fl/Variant.js +2 -11
- package/src/sap/ui/fl/XmlPreprocessorImpl.js +1 -1
- package/src/sap/ui/fl/apply/_internal/DelegateMediator.js +1 -1
- package/src/sap/ui/fl/apply/_internal/appVariant/DescriptorChangeTypes.js +2 -1
- package/src/sap/ui/fl/apply/_internal/changes/Applier.js +69 -45
- package/src/sap/ui/fl/apply/_internal/changes/FlexCustomData.js +1 -29
- 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 +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/controlVariants/URLHandler.js +40 -29
- package/src/sap/ui/fl/apply/_internal/extensionPoint/Processor.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/CompVariant.js +10 -8
- package/src/sap/ui/fl/apply/_internal/flexObjects/States.js +14 -0
- package/src/sap/ui/fl/apply/_internal/flexState/FlexState.js +133 -30
- 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/compVariants/prepareCompVariantsMap.js +5 -5
- package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/Switcher.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/VariantManagementState.js +13 -28
- package/src/sap/ui/fl/apply/api/ControlVariantApplyAPI.js +1 -1
- package/src/sap/ui/fl/apply/api/FlexRuntimeInfoAPI.js +25 -5
- 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 +10 -8
- 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 +6 -3
- 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 +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 +8 -5
- 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/designtime/util/IFrame.designtime.js +12 -8
- package/src/sap/ui/fl/designtime/variants/VariantManagement.designtime.js +10 -4
- package/src/sap/ui/fl/initial/_internal/Storage.js +1 -1
- package/src/sap/ui/fl/initial/_internal/StorageResultMerger.js +1 -1
- package/src/sap/ui/fl/initial/_internal/StorageUtils.js +1 -1
- package/src/sap/ui/fl/initial/_internal/changeHandlers/ChangeRegistryItem.js +1 -1
- 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 +9 -9
- package/src/sap/ui/fl/library.support.js +56 -46
- package/src/sap/ui/fl/messagebundle.properties +39 -2
- package/src/sap/ui/fl/messagebundle_ar.properties +31 -6
- package/src/sap/ui/fl/messagebundle_bg.properties +31 -6
- package/src/sap/ui/fl/messagebundle_ca.properties +32 -7
- package/src/sap/ui/fl/messagebundle_cs.properties +31 -6
- package/src/sap/ui/fl/messagebundle_cy.properties +31 -6
- package/src/sap/ui/fl/messagebundle_da.properties +31 -6
- package/src/sap/ui/fl/messagebundle_de.properties +31 -6
- package/src/sap/ui/fl/messagebundle_el.properties +31 -6
- package/src/sap/ui/fl/messagebundle_en.properties +27 -2
- package/src/sap/ui/fl/messagebundle_en_GB.properties +28 -3
- package/src/sap/ui/fl/messagebundle_en_US_sappsd.properties +8 -0
- package/src/sap/ui/fl/messagebundle_en_US_saprigi.properties +35 -2
- package/src/sap/ui/fl/messagebundle_en_US_saptrc.properties +8 -0
- package/src/sap/ui/fl/messagebundle_es.properties +32 -7
- package/src/sap/ui/fl/messagebundle_es_MX.properties +31 -6
- package/src/sap/ui/fl/messagebundle_et.properties +31 -6
- package/src/sap/ui/fl/messagebundle_fi.properties +31 -6
- package/src/sap/ui/fl/messagebundle_fr.properties +31 -6
- package/src/sap/ui/fl/messagebundle_fr_CA.properties +31 -6
- package/src/sap/ui/fl/messagebundle_hi.properties +31 -6
- package/src/sap/ui/fl/messagebundle_hr.properties +31 -6
- package/src/sap/ui/fl/messagebundle_hu.properties +31 -6
- package/src/sap/ui/fl/messagebundle_id.properties +31 -6
- package/src/sap/ui/fl/messagebundle_it.properties +32 -7
- package/src/sap/ui/fl/messagebundle_iw.properties +31 -6
- package/src/sap/ui/fl/messagebundle_ja.properties +31 -6
- package/src/sap/ui/fl/messagebundle_kk.properties +31 -6
- package/src/sap/ui/fl/messagebundle_ko.properties +32 -7
- package/src/sap/ui/fl/messagebundle_lt.properties +31 -6
- package/src/sap/ui/fl/messagebundle_lv.properties +31 -6
- package/src/sap/ui/fl/messagebundle_ms.properties +31 -6
- package/src/sap/ui/fl/messagebundle_nl.properties +31 -6
- package/src/sap/ui/fl/messagebundle_no.properties +31 -6
- package/src/sap/ui/fl/messagebundle_pl.properties +31 -6
- package/src/sap/ui/fl/messagebundle_pt.properties +31 -6
- package/src/sap/ui/fl/messagebundle_pt_PT.properties +31 -6
- package/src/sap/ui/fl/messagebundle_ro.properties +31 -6
- package/src/sap/ui/fl/messagebundle_ru.properties +31 -6
- package/src/sap/ui/fl/messagebundle_sh.properties +33 -8
- package/src/sap/ui/fl/messagebundle_sk.properties +31 -6
- package/src/sap/ui/fl/messagebundle_sl.properties +31 -6
- package/src/sap/ui/fl/messagebundle_sv.properties +31 -6
- package/src/sap/ui/fl/messagebundle_th.properties +29 -4
- package/src/sap/ui/fl/messagebundle_tr.properties +31 -6
- package/src/sap/ui/fl/messagebundle_uk.properties +33 -8
- package/src/sap/ui/fl/messagebundle_vi.properties +31 -6
- package/src/sap/ui/fl/messagebundle_zh_CN.properties +31 -6
- package/src/sap/ui/fl/messagebundle_zh_TW.properties +31 -6
- package/src/sap/ui/fl/registry/Settings.js +57 -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 +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/support/diagnostics/Flexibility.controller.js +1 -1
- package/src/sap/ui/fl/themes/base/VariantManagement.less +4 -0
- package/src/sap/ui/fl/transport/TransportSelection.js +1 -1
- package/src/sap/ui/fl/util/IFrame.js +10 -3
- package/src/sap/ui/fl/util/ManagedObjectModel.js +1 -1
- package/src/sap/ui/fl/util/getContainerUserInfo.js +32 -28
- package/src/sap/ui/fl/util/resolveBinding.js +1 -1
- package/src/sap/ui/fl/variants/VariantManagement.js +326 -37
- package/src/sap/ui/fl/variants/VariantModel.js +191 -75
- package/src/sap/ui/fl/write/_internal/Storage.js +6 -4
- package/src/sap/ui/fl/write/_internal/StorageFeaturesMerger.js +1 -1
- package/src/sap/ui/fl/write/_internal/Versions.js +61 -54
- 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 +35 -4
- package/src/sap/ui/fl/write/_internal/condenser/UIReconstruction.js +1 -1
- package/src/sap/ui/fl/write/_internal/condenser/classifications/Move.js +7 -1
- 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/LrepConnector.js +3 -3
- 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 -17
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/CAPAccess.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/dialog/CustomFieldCAPDialog.fragment.xml +1 -0
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/dialog/CustomFieldCAPDialog.js +47 -18
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/getEditorConfig.js +60 -22
- 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.fragment.xml +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/timeEditor/TimeEditor.js +15 -22
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/validators/IsRequired.js +20 -0
- package/src/sap/ui/fl/write/_internal/flexState/FlexObjectState.js +1 -1
- package/src/sap/ui/fl/write/_internal/flexState/compVariants/CompVariantState.js +10 -10
- 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 -2
- package/src/sap/ui/fl/write/api/FieldExtensibility.js +22 -7
- package/src/sap/ui/fl/write/api/ReloadInfoAPI.js +20 -16
- package/ui5.yaml +4 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/annotationsEditor/AnnotationsEditor.js +0 -49
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/dateEditor/DateEditor.js +0 -43
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/dateTimeEditor/DateTimeEditor.js +0 -38
|
@@ -8,7 +8,6 @@ sap.ui.define([
|
|
|
8
8
|
"sap/ui/fl/registry/Settings",
|
|
9
9
|
"sap/ui/fl/ChangePersistenceFactory",
|
|
10
10
|
"sap/ui/fl/write/_internal/Storage",
|
|
11
|
-
"sap/base/util/UriParameters",
|
|
12
11
|
"sap/ui/model/json/JSONModel",
|
|
13
12
|
"sap/ui/fl/Utils",
|
|
14
13
|
"sap/ui/model/BindingMode"
|
|
@@ -16,7 +15,6 @@ sap.ui.define([
|
|
|
16
15
|
Settings,
|
|
17
16
|
ChangePersistenceFactory,
|
|
18
17
|
Storage,
|
|
19
|
-
UriParameters,
|
|
20
18
|
JSONModel,
|
|
21
19
|
Utils,
|
|
22
20
|
BindingMode
|
|
@@ -45,65 +43,71 @@ sap.ui.define([
|
|
|
45
43
|
}
|
|
46
44
|
});
|
|
47
45
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
46
|
+
return Utils.getUShellService("URLParsing")
|
|
47
|
+
.then(function (oURLParsingService) {
|
|
48
|
+
var sPersistedBasisForDisplayedVersion = Utils.getParameter(
|
|
49
|
+
sap.ui.fl.Versions.UrlParameter,
|
|
50
|
+
oURLParsingService
|
|
51
|
+
);
|
|
52
|
+
var nPersistedBasisForDisplayedVersion;
|
|
53
|
+
if (sPersistedBasisForDisplayedVersion) {
|
|
54
|
+
nPersistedBasisForDisplayedVersion = parseInt(sPersistedBasisForDisplayedVersion);
|
|
55
|
+
} else if (aVersions.length > 0) {
|
|
56
|
+
nPersistedBasisForDisplayedVersion = aVersions[0].version;
|
|
57
|
+
} else {
|
|
58
|
+
nPersistedBasisForDisplayedVersion = sap.ui.fl.Versions.Original;
|
|
59
|
+
}
|
|
57
60
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
61
|
+
var oModel = new JSONModel({
|
|
62
|
+
versioningEnabled: bVersioningEnabled,
|
|
63
|
+
versions: aVersions,
|
|
64
|
+
activeVersion: nActiveVersion,
|
|
65
|
+
backendDraft: bBackendDraft,
|
|
66
|
+
dirtyChanges: false,
|
|
67
|
+
draftAvailable: bBackendDraft,
|
|
68
|
+
activateEnabled: bBackendDraft,
|
|
69
|
+
persistedVersion: nPersistedBasisForDisplayedVersion,
|
|
70
|
+
displayedVersion: nPersistedBasisForDisplayedVersion
|
|
71
|
+
});
|
|
69
72
|
|
|
70
|
-
|
|
71
|
-
|
|
73
|
+
oModel.setDefaultBindingMode(BindingMode.OneWay);
|
|
74
|
+
oModel.setSizeLimit(MODEL_SIZE_LIMIT);
|
|
72
75
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
76
|
+
// TODO: currently called by sap.ui.rta.RuntimeAuthoring but should be by a ChangesState
|
|
77
|
+
oModel.setDirtyChanges = function (bDirtyChanges) {
|
|
78
|
+
oModel.setProperty("/dirtyChanges", bDirtyChanges);
|
|
79
|
+
oModel.updateDraftVersion();
|
|
80
|
+
oModel.updateBindings(true);
|
|
81
|
+
};
|
|
79
82
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
83
|
+
oModel.updateDraftVersion = function () {
|
|
84
|
+
var aVersions = oModel.getProperty("/versions");
|
|
85
|
+
var bVersioningEnabled = oModel.getProperty("/versioningEnabled");
|
|
86
|
+
var bDirtyChanges = oModel.getProperty("/dirtyChanges");
|
|
87
|
+
var bBackendDraft = oModel.getProperty("/backendDraft");
|
|
88
|
+
var bDraftAvailable = bVersioningEnabled && (bDirtyChanges || bBackendDraft);
|
|
89
|
+
oModel.setProperty("/draftAvailable", bDraftAvailable);
|
|
87
90
|
|
|
88
|
-
|
|
89
|
-
|
|
91
|
+
var nDisplayedVersion = bDirtyChanges ? sap.ui.fl.Versions.Draft : oModel.getProperty("/persistedVersion");
|
|
92
|
+
oModel.setProperty("/displayedVersion", nDisplayedVersion);
|
|
90
93
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
94
|
+
// add draft
|
|
95
|
+
if (!_doesDraftExistInVersions(aVersions) && bDraftAvailable) {
|
|
96
|
+
aVersions.splice(0, 0, {version: sap.ui.fl.Versions.Draft, type: "draft"});
|
|
97
|
+
}
|
|
95
98
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
99
|
+
// remove draft
|
|
100
|
+
if (_doesDraftExistInVersions(aVersions) && !bDraftAvailable) {
|
|
101
|
+
aVersions.shift();
|
|
102
|
+
oModel.setProperty("/displayedVersion", oModel.getProperty("/persistedVersion"));
|
|
103
|
+
}
|
|
101
104
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
+
var bActivateEnabled = oModel.getProperty("/displayedVersion") !== oModel.getProperty("/activeVersion");
|
|
106
|
+
oModel.setProperty("/activateEnabled", bActivateEnabled);
|
|
107
|
+
};
|
|
105
108
|
|
|
106
|
-
|
|
109
|
+
return oModel;
|
|
110
|
+
});
|
|
107
111
|
}
|
|
108
112
|
|
|
109
113
|
// TODO: the handling should move to the FlexState as soon as it is ready
|
|
@@ -154,7 +158,7 @@ sap.ui.define([
|
|
|
154
158
|
*
|
|
155
159
|
* @namespace sap.ui.fl.write._internal.Versions
|
|
156
160
|
* @since 1.74
|
|
157
|
-
* @version 1.
|
|
161
|
+
* @version 1.96.2
|
|
158
162
|
* @private
|
|
159
163
|
* @ui5-restricted sap.ui.fl
|
|
160
164
|
*/
|
|
@@ -179,9 +183,12 @@ sap.ui.define([
|
|
|
179
183
|
var aVersionsPromise = bVersionsEnabled ? Storage.versions.load(mPropertyBag) : Promise.resolve([]);
|
|
180
184
|
return aVersionsPromise
|
|
181
185
|
.then(function (aVersions) {
|
|
186
|
+
return createModel(mPropertyBag, bVersionsEnabled, aVersions);
|
|
187
|
+
})
|
|
188
|
+
.then(function (oModel) {
|
|
182
189
|
_mInstances[sReference] = _mInstances[sReference] || {};
|
|
183
190
|
_mInstances[sReference][sLayer] = _mInstances[sReference][sLayer] || {};
|
|
184
|
-
_mInstances[sReference][sLayer] =
|
|
191
|
+
_mInstances[sReference][sLayer] = oModel;
|
|
185
192
|
return _mInstances[sReference][sLayer];
|
|
186
193
|
});
|
|
187
194
|
});
|
|
@@ -33,7 +33,7 @@ sap.ui.define([
|
|
|
33
33
|
* @namespace
|
|
34
34
|
* @alias sap.ui.fl.write._internal.appVariant.AppVariantInlineChangeFactory
|
|
35
35
|
* @author SAP SE
|
|
36
|
-
* @version 1.
|
|
36
|
+
* @version 1.96.2
|
|
37
37
|
* @private
|
|
38
38
|
* @ui5-restricted sap.ui.rta, smart business
|
|
39
39
|
*/
|
|
@@ -926,5 +926,24 @@ sap.ui.define([
|
|
|
926
926
|
return _createAppVariantInlineChange(mPropertyBag);
|
|
927
927
|
};
|
|
928
928
|
|
|
929
|
+
/**
|
|
930
|
+
* Creates an inline change of change type <code>appdescr_fiori_setAbstract</code>.
|
|
931
|
+
*
|
|
932
|
+
* @param {object} mPropertyBag - Parameters of the change type
|
|
933
|
+
* @param {string} mPropertyBag.changeType - Inline change type of an app variant
|
|
934
|
+
* @param {object} mPropertyBag.content - Content of an inline change
|
|
935
|
+
* @param {boolean} mPropertyBag.content.abstract - Abstract property to be disabled (only allowd value is <code>false</code>)
|
|
936
|
+
*
|
|
937
|
+
* @return {Promise} Resolving when the descriptor inline change was created successfully (without back-end access)
|
|
938
|
+
*
|
|
939
|
+
* @private
|
|
940
|
+
* @ui5-restricted WebIDE
|
|
941
|
+
*/
|
|
942
|
+
AppVariantInlineChangeFactory.create_fiori_setAbstract = function(mPropertyBag) {
|
|
943
|
+
Utils.checkParameterAndType(mPropertyBag.content, "abstract", "boolean");
|
|
944
|
+
Utils.checkParameterAndType(mPropertyBag, "changeType", "string");
|
|
945
|
+
return _createAppVariantInlineChange(mPropertyBag);
|
|
946
|
+
};
|
|
947
|
+
|
|
929
948
|
return AppVariantInlineChangeFactory;
|
|
930
949
|
});
|
|
@@ -41,7 +41,7 @@ sap.ui.define([
|
|
|
41
41
|
* @namespace
|
|
42
42
|
* @alias sap.ui.fl.write._internal.condenser.Condenser
|
|
43
43
|
* @author SAP SE
|
|
44
|
-
* @version 1.
|
|
44
|
+
* @version 1.96.2
|
|
45
45
|
*/
|
|
46
46
|
var Condenser = {};
|
|
47
47
|
|
|
@@ -57,15 +57,20 @@ sap.ui.define([
|
|
|
57
57
|
reverse: Reverse
|
|
58
58
|
};
|
|
59
59
|
|
|
60
|
+
var PROPERTIES_WITH_SELECTORS = ["affectedControl", "sourceContainer", "targetContainer"];
|
|
61
|
+
|
|
60
62
|
/**
|
|
61
|
-
* Verify 'move' subtype has already been added to the data structure before 'create' subtype
|
|
63
|
+
* Verify 'move' subtype has already been added to the data structure before 'create' subtype and they both belong to the same targetContainer
|
|
62
64
|
*
|
|
63
65
|
* @param {Map} mSubtypes - Map of properties that holds key-value pairs. A key is a unique identifier. A value is an array object that contains changes
|
|
64
66
|
* @param {object} oCondenserInfo - Condenser specific information that is delivered by the change handler
|
|
65
67
|
* @returns {boolean} <code>true</code> if the 'move' subtype has been added to the data structure before 'create' subtype
|
|
66
68
|
*/
|
|
67
69
|
function isCreateAfterMoveSubtype(mSubtypes, oCondenserInfo) {
|
|
68
|
-
|
|
70
|
+
var aMoveSubType = mSubtypes[sap.ui.fl.condenser.Classification.Move];
|
|
71
|
+
return oCondenserInfo.classification === sap.ui.fl.condenser.Classification.Create
|
|
72
|
+
&& aMoveSubType
|
|
73
|
+
&& aMoveSubType[aMoveSubType.length - 1].targetContainer === oCondenserInfo.targetContainer;
|
|
69
74
|
}
|
|
70
75
|
|
|
71
76
|
/**
|
|
@@ -202,6 +207,15 @@ sap.ui.define([
|
|
|
202
207
|
}
|
|
203
208
|
return undefined;
|
|
204
209
|
})
|
|
210
|
+
.then(function(oCondenserInfo) {
|
|
211
|
+
// changes in templates get the binding holder as selector but have the original selector
|
|
212
|
+
// inside the template as dependent selector. As there might be multiple different controls in the template
|
|
213
|
+
// the selectors have to be changed back before the maps gets created
|
|
214
|
+
if (oCondenserInfo && mControl.bTemplateAffected) {
|
|
215
|
+
replaceTemplateSelector(oCondenserInfo, oChange);
|
|
216
|
+
}
|
|
217
|
+
return oCondenserInfo;
|
|
218
|
+
})
|
|
205
219
|
.catch(function() {
|
|
206
220
|
return undefined;
|
|
207
221
|
});
|
|
@@ -210,6 +224,16 @@ sap.ui.define([
|
|
|
210
224
|
return Promise.resolve();
|
|
211
225
|
}
|
|
212
226
|
|
|
227
|
+
function replaceTemplateSelector(oCondenserInfo, oChange) {
|
|
228
|
+
var oOriginalSelector = oChange.getOriginalSelector();
|
|
229
|
+
var oTemplateSelector = oChange.getSelector();
|
|
230
|
+
PROPERTIES_WITH_SELECTORS.forEach(function(sPropertyName) {
|
|
231
|
+
if (oCondenserInfo[sPropertyName] && oCondenserInfo[sPropertyName] === oTemplateSelector) {
|
|
232
|
+
oCondenserInfo[sPropertyName] = oOriginalSelector;
|
|
233
|
+
}
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
|
|
213
237
|
/**
|
|
214
238
|
* Retrieves the classification types map.
|
|
215
239
|
*
|
|
@@ -301,7 +325,7 @@ sap.ui.define([
|
|
|
301
325
|
}
|
|
302
326
|
|
|
303
327
|
function changeSelectorsToIdsInCondenserInfo(oCondenserInfo, oAppComponent) {
|
|
304
|
-
|
|
328
|
+
PROPERTIES_WITH_SELECTORS.forEach(function(sPropertyName) {
|
|
305
329
|
if (oCondenserInfo && oCondenserInfo[sPropertyName]) {
|
|
306
330
|
oCondenserInfo[sPropertyName] = JsControlTreeModifier.getControlIdBySelector(oCondenserInfo[sPropertyName], oAppComponent);
|
|
307
331
|
}
|
|
@@ -380,6 +404,12 @@ sap.ui.define([
|
|
|
380
404
|
});
|
|
381
405
|
}
|
|
382
406
|
|
|
407
|
+
function sortCondenserInfosByInitialOrder(aChanges, aCondenserInfos) {
|
|
408
|
+
aCondenserInfos.sort(function(a, b) {
|
|
409
|
+
return aChanges.indexOf(a.change) - aChanges.indexOf(b.change);
|
|
410
|
+
});
|
|
411
|
+
}
|
|
412
|
+
|
|
383
413
|
function addAllIndexRelatedChanges(aReducedChanges, aIndexRelatedChanges) {
|
|
384
414
|
var aReducedChangeIds = aReducedChanges.map(function(oChange) {
|
|
385
415
|
return oChange.getId();
|
|
@@ -480,6 +510,7 @@ sap.ui.define([
|
|
|
480
510
|
|
|
481
511
|
var bSuccess = true;
|
|
482
512
|
var aCondenserInfos = getCondenserInfos(mReducedChanges, []);
|
|
513
|
+
sortCondenserInfosByInitialOrder(aChanges, aCondenserInfos);
|
|
483
514
|
try {
|
|
484
515
|
Measurement.start("Condenser_sort", "sort index related changes - CondenserClass", ["sap.ui.fl", "Condenser"]);
|
|
485
516
|
var aReducedIndexRelatedChanges = UIReconstruction.sortIndexRelatedChanges(mUIReconstructions, aCondenserInfos);
|
|
@@ -61,7 +61,13 @@ sap.ui.define([
|
|
|
61
61
|
|
|
62
62
|
var iCurrentSourceIndex = aContainerElements.indexOf(sAffectedControlId);
|
|
63
63
|
var iTargetIndex = oCondenserInfo.getTargetIndex(oCondenserInfo.change);
|
|
64
|
-
|
|
64
|
+
|
|
65
|
+
// if the move was done from a different container the element can't be found
|
|
66
|
+
if (iInitialSourceIndex === -1) {
|
|
67
|
+
aContainerElements.splice(iTargetIndex, 0, sAffectedControlId);
|
|
68
|
+
} else {
|
|
69
|
+
aContainerElements.splice(iTargetIndex, 0, aContainerElements.splice(iCurrentSourceIndex, 1)[0]);
|
|
70
|
+
}
|
|
65
71
|
}
|
|
66
72
|
};
|
|
67
73
|
});
|
|
@@ -146,7 +146,7 @@ sap.ui.define([
|
|
|
146
146
|
*
|
|
147
147
|
* @namespace sap.ui.fl.write._internal.connectors.LrepConnector
|
|
148
148
|
* @since 1.67
|
|
149
|
-
* @version 1.
|
|
149
|
+
* @version 1.96.2
|
|
150
150
|
* @private
|
|
151
151
|
* @ui5-restricted sap.ui.fl.write._internal.Storage
|
|
152
152
|
*/
|
|
@@ -469,7 +469,7 @@ sap.ui.define([
|
|
|
469
469
|
var sAppVariantManifestUrl = mPropertyBag.appVarUrl;
|
|
470
470
|
var oRequestOption = WriteUtils.getRequestOptions(
|
|
471
471
|
InitialConnector,
|
|
472
|
-
|
|
472
|
+
Utils.getLrepUrl() + ROUTES.TOKEN,
|
|
473
473
|
undefined,
|
|
474
474
|
"application/json; charset=utf-8", "json"
|
|
475
475
|
);
|
|
@@ -479,7 +479,7 @@ sap.ui.define([
|
|
|
479
479
|
var sAppVariantUrl = InitialUtils.getUrl(ROUTES.APPVARIANTS, mPropertyBag);
|
|
480
480
|
var oRequestOption = WriteUtils.getRequestOptions(
|
|
481
481
|
InitialConnector,
|
|
482
|
-
|
|
482
|
+
Utils.getLrepUrl() + ROUTES.TOKEN,
|
|
483
483
|
undefined,
|
|
484
484
|
"application/json; charset=utf-8", "json"
|
|
485
485
|
);
|
|
@@ -17,7 +17,7 @@ sap.ui.define([
|
|
|
17
17
|
* @class
|
|
18
18
|
* @namespace sap.ui.fl.write._internal.fieldExtensibility.ABAPExtensibilityVariant
|
|
19
19
|
* @since 1.87
|
|
20
|
-
* @version 1.
|
|
20
|
+
* @version 1.96.2
|
|
21
21
|
* @public
|
|
22
22
|
* @param {sap.ui.base.ManagedObject} oControl - Control to add extensions
|
|
23
23
|
*/
|
|
@@ -117,7 +117,7 @@ sap.ui.define([
|
|
|
117
117
|
* @namespace sap.ui.fl.write._internal.fieldExtensibility.ABAPExtensibilityVariantFactory
|
|
118
118
|
* @experimental Since 1.87.0
|
|
119
119
|
* @author SAP SE
|
|
120
|
-
* @version 1.
|
|
120
|
+
* @version 1.96.2
|
|
121
121
|
*/
|
|
122
122
|
var ABAPExtensibilityVariantFactory = {};
|
|
123
123
|
|
|
@@ -8,11 +8,13 @@ sap.ui.define([
|
|
|
8
8
|
"sap/base/Log",
|
|
9
9
|
"sap/base/security/encodeURL",
|
|
10
10
|
"sap/ui/core/Core",
|
|
11
|
+
"sap/ui/fl/Utils",
|
|
11
12
|
"sap/ui/thirdparty/jquery"
|
|
12
13
|
], function(
|
|
13
14
|
Log,
|
|
14
15
|
encodeURL,
|
|
15
16
|
Core,
|
|
17
|
+
FlexUtils,
|
|
16
18
|
jQuery
|
|
17
19
|
) {
|
|
18
20
|
"use strict";
|
|
@@ -198,7 +200,7 @@ sap.ui.define([
|
|
|
198
200
|
* @namespace sap.ui.fl.write._internal.fieldExtensibility.Utils
|
|
199
201
|
* @experimental Since 1.87.0
|
|
200
202
|
* @author SAP SE
|
|
201
|
-
* @version 1.
|
|
203
|
+
* @version 1.96.2
|
|
202
204
|
*/
|
|
203
205
|
var Utils = {};
|
|
204
206
|
|
|
@@ -295,20 +297,6 @@ sap.ui.define([
|
|
|
295
297
|
return Promise.resolve(null);
|
|
296
298
|
};
|
|
297
299
|
|
|
298
|
-
/**
|
|
299
|
-
* Gets the cross app navigation service.
|
|
300
|
-
*
|
|
301
|
-
* @public
|
|
302
|
-
* @returns {sap.ushell.services.ContainerInterface|null} cross app navigation service or null
|
|
303
|
-
*/
|
|
304
|
-
Utils.getCrossAppNavigationService = function() {
|
|
305
|
-
if (sap.ushell && sap.ushell.Container) {
|
|
306
|
-
return sap.ushell.Container.getServiceAsync("CrossApplicationNavigation");
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
return Promise.resolve(null);
|
|
310
|
-
};
|
|
311
|
-
|
|
312
300
|
/**
|
|
313
301
|
* Gets the navigation URI for a given Intent
|
|
314
302
|
*
|
|
@@ -317,7 +305,7 @@ sap.ui.define([
|
|
|
317
305
|
* @returns {Promise<string|null>} Resolves with navigation URI or null
|
|
318
306
|
*/
|
|
319
307
|
Utils.getNavigationUriForIntent = function(mIntent) {
|
|
320
|
-
return
|
|
308
|
+
return FlexUtils.getUShellService("CrossApplicationNavigation").then(function(oCrossAppNavigationService) {
|
|
321
309
|
if (oCrossAppNavigationService && oCrossAppNavigationService.hrefForExternal) {
|
|
322
310
|
return oCrossAppNavigationService.hrefForExternal(mIntent);
|
|
323
311
|
}
|
|
@@ -381,7 +369,7 @@ sap.ui.define([
|
|
|
381
369
|
* @returns {Promise<Array<Boolean>>} Resolves with an array of booleans
|
|
382
370
|
*/
|
|
383
371
|
Utils.isNavigationSupportedForIntents = function(aIntents) {
|
|
384
|
-
return
|
|
372
|
+
return FlexUtils.getUShellService("CrossApplicationNavigation").then(function(oCrossAppNavigationService) {
|
|
385
373
|
if (oCrossAppNavigationService && oCrossAppNavigationService.isNavigationSupported) {
|
|
386
374
|
return oCrossAppNavigationService.isNavigationSupported(aIntents).then(function(aResults) {
|
|
387
375
|
return aResults.map(function(oResult) {
|