@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
|
@@ -17,6 +17,7 @@ sap.ui.define([
|
|
|
17
17
|
"sap/ui/core/Icon",
|
|
18
18
|
"sap/ui/layout/HorizontalLayout",
|
|
19
19
|
"sap/ui/layout/Grid",
|
|
20
|
+
'sap/base/Log',
|
|
20
21
|
"sap/m/SearchField",
|
|
21
22
|
"sap/m/RadioButton",
|
|
22
23
|
"sap/m/ColumnListItem",
|
|
@@ -57,6 +58,7 @@ sap.ui.define([
|
|
|
57
58
|
Icon,
|
|
58
59
|
HorizontalLayout,
|
|
59
60
|
Grid,
|
|
61
|
+
Log,
|
|
60
62
|
SearchField,
|
|
61
63
|
RadioButton,
|
|
62
64
|
ColumnListItem,
|
|
@@ -330,7 +332,6 @@ sap.ui.define([
|
|
|
330
332
|
VariantManagement.MAX_NAME_LEN = 100;
|
|
331
333
|
VariantManagement.COLUMN_FAV_IDX = 0;
|
|
332
334
|
VariantManagement.COLUMN_NAME_IDX = 1;
|
|
333
|
-
VariantManagement.COLUMN_EXEC_IDX = 3;
|
|
334
335
|
|
|
335
336
|
/*
|
|
336
337
|
* Constructs and initializes the <code>VariantManagement</code> control.
|
|
@@ -415,6 +416,44 @@ sap.ui.define([
|
|
|
415
416
|
this.oVariantInvisibleText.toStatic();
|
|
416
417
|
|
|
417
418
|
this.addDependent(this.oVariantLayout);
|
|
419
|
+
|
|
420
|
+
this._fRegisteredApplyAutomaticallyOnStandardVariant = null;
|
|
421
|
+
};
|
|
422
|
+
|
|
423
|
+
/**
|
|
424
|
+
* Registration of a callback function. The provided callback function is executed to check if apply automatically on standard variant should be considered.
|
|
425
|
+
* @private
|
|
426
|
+
* @ui5-restricted sap.fe
|
|
427
|
+
* @since 1.93
|
|
428
|
+
* @param {function} fCallBack Called when standard variant must be applied. It determines if apply automatically on standard variant should be considered.
|
|
429
|
+
* @returns {this} Reference to this in order to allow method chaining.
|
|
430
|
+
*/
|
|
431
|
+
VariantManagement.prototype.registerApplyAutomaticallyOnStandardVariant = function(fCallBack) {
|
|
432
|
+
this._fRegisteredApplyAutomaticallyOnStandardVariant = fCallBack;
|
|
433
|
+
|
|
434
|
+
return this;
|
|
435
|
+
};
|
|
436
|
+
|
|
437
|
+
/**
|
|
438
|
+
* Retrieves the apply automatically state for a variant.
|
|
439
|
+
* @private
|
|
440
|
+
* @ui5-restricted sap.mdc
|
|
441
|
+
* @since 1.93
|
|
442
|
+
* @param {object} oVariant the inner variant object
|
|
443
|
+
* @returns {boolean} apply automatically state
|
|
444
|
+
*/
|
|
445
|
+
VariantManagement.prototype.getApplyAutomaticallyOnVariant = function(oVariant) {
|
|
446
|
+
var bExecuteOnSelection = oVariant.executeOnSelect;
|
|
447
|
+
|
|
448
|
+
if (this._fRegisteredApplyAutomaticallyOnStandardVariant && this.getDisplayTextForExecuteOnSelectionForStandardVariant() && (oVariant.key === this.getStandardVariantKey())) {
|
|
449
|
+
try {
|
|
450
|
+
bExecuteOnSelection = this._fRegisteredApplyAutomaticallyOnStandardVariant();
|
|
451
|
+
} catch (ex) {
|
|
452
|
+
Log.error("callback for determination of apply automatically on standard variant failed");
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
return bExecuteOnSelection;
|
|
418
457
|
};
|
|
419
458
|
|
|
420
459
|
/**
|
|
@@ -425,12 +464,10 @@ sap.ui.define([
|
|
|
425
464
|
* @returns {object} Configuration information for the <code>sap.m.IOverflowToolbarContent</code> interface.
|
|
426
465
|
*/
|
|
427
466
|
VariantManagement.prototype.getOverflowToolbarConfig = function() {
|
|
428
|
-
|
|
467
|
+
return {
|
|
429
468
|
canOverflow: false,
|
|
430
469
|
invalidationEvents: ["save", "manage", "select"]
|
|
431
470
|
};
|
|
432
|
-
|
|
433
|
-
return oConfig;
|
|
434
471
|
};
|
|
435
472
|
|
|
436
473
|
/**
|
|
@@ -459,6 +496,7 @@ sap.ui.define([
|
|
|
459
496
|
var oModel = new JSONModel({
|
|
460
497
|
showExecuteOnSelection: false,
|
|
461
498
|
showSetAsDefault: true,
|
|
499
|
+
showPublic: false,
|
|
462
500
|
editable: true,
|
|
463
501
|
popoverTitle: this._oRb.getText("VARIANT_MANAGEMENT_VARIANTS")
|
|
464
502
|
});
|
|
@@ -466,7 +504,7 @@ sap.ui.define([
|
|
|
466
504
|
|
|
467
505
|
this._bindProperties();
|
|
468
506
|
|
|
469
|
-
this.
|
|
507
|
+
this._updateInnerModelWithSettingsInfo();
|
|
470
508
|
};
|
|
471
509
|
|
|
472
510
|
VariantManagement.prototype._bindProperties = function() {
|
|
@@ -480,12 +518,29 @@ sap.ui.define([
|
|
|
480
518
|
});
|
|
481
519
|
};
|
|
482
520
|
|
|
483
|
-
VariantManagement.prototype.
|
|
521
|
+
VariantManagement.prototype._updateInnerModelWithSettingsInfo = function() {
|
|
484
522
|
flSettings.getInstance().then(function (oSettings) {
|
|
485
523
|
this.getModel(VariantManagement.INNER_MODEL_NAME).setProperty("/showSaveAs", oSettings.isVariantPersonalizationEnabled());
|
|
524
|
+
this.getModel(VariantManagement.INNER_MODEL_NAME).setProperty("/showPublic", oSettings.isPublicFlVariantEnabled());
|
|
486
525
|
}.bind(this));
|
|
487
526
|
};
|
|
488
527
|
|
|
528
|
+
VariantManagement.prototype._getShowPublic = function() {
|
|
529
|
+
var oModel = this.getModel(VariantManagement.INNER_MODEL_NAME);
|
|
530
|
+
if (oModel) {
|
|
531
|
+
return oModel.getProperty("/showPublic");
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
return false;
|
|
535
|
+
};
|
|
536
|
+
|
|
537
|
+
VariantManagement.prototype._setShowPublic = function(bValue) {
|
|
538
|
+
var oInnerModel = this.getModel(VariantManagement.INNER_MODEL_NAME);
|
|
539
|
+
if (oInnerModel) {
|
|
540
|
+
oInnerModel.setProperty("/showPublic", bValue);
|
|
541
|
+
}
|
|
542
|
+
};
|
|
543
|
+
|
|
489
544
|
VariantManagement.prototype._getShowExecuteOnSelection = function() {
|
|
490
545
|
var oModel = this.getModel(VariantManagement.INNER_MODEL_NAME);
|
|
491
546
|
if (oModel) {
|
|
@@ -502,7 +557,6 @@ sap.ui.define([
|
|
|
502
557
|
}
|
|
503
558
|
};
|
|
504
559
|
|
|
505
|
-
|
|
506
560
|
VariantManagement.prototype.setExecuteOnSelection = function(bValue) {
|
|
507
561
|
var oModel = this.getModel(this._sModelName);
|
|
508
562
|
if (oModel && this.oContext) {
|
|
@@ -812,9 +866,7 @@ sap.ui.define([
|
|
|
812
866
|
};
|
|
813
867
|
|
|
814
868
|
VariantManagement.prototype.getFocusDomRef = function() {
|
|
815
|
-
|
|
816
|
-
return this.oVariantPopoverTrigger.getFocusDomRef();
|
|
817
|
-
}
|
|
869
|
+
return this.oVariantPopoverTrigger.getFocusDomRef();
|
|
818
870
|
};
|
|
819
871
|
|
|
820
872
|
VariantManagement.prototype.onclick = function(oEvent) {
|
|
@@ -1156,6 +1208,15 @@ sap.ui.define([
|
|
|
1156
1208
|
width: "100%"
|
|
1157
1209
|
});
|
|
1158
1210
|
|
|
1211
|
+
this.oPublic = new CheckBox(this.getId() + "-public", {
|
|
1212
|
+
text: this._oRb.getText("VARIANT_MANAGEMENT_SETASPUBLIC"),
|
|
1213
|
+
visible: {
|
|
1214
|
+
path: "/showPublic",
|
|
1215
|
+
model: VariantManagement.INNER_MODEL_NAME
|
|
1216
|
+
},
|
|
1217
|
+
width: "100%"
|
|
1218
|
+
});
|
|
1219
|
+
|
|
1159
1220
|
this.oExecuteOnSelect = new CheckBox(this.getId() + "-execute", {
|
|
1160
1221
|
text: this._oRb.getText("VARIANT_MANAGEMENT_EXECUTEONSELECT"),
|
|
1161
1222
|
visible: {
|
|
@@ -1185,6 +1246,7 @@ sap.ui.define([
|
|
|
1185
1246
|
this._checkVariantNameConstraints(this.oInputName);
|
|
1186
1247
|
|
|
1187
1248
|
if (this.oInputName.getValueState() === "Error") {
|
|
1249
|
+
this.oInputName.focus();
|
|
1188
1250
|
return;
|
|
1189
1251
|
}
|
|
1190
1252
|
|
|
@@ -1203,6 +1265,9 @@ sap.ui.define([
|
|
|
1203
1265
|
oSaveAsDialogOptionsGrid.addContent(this.oDefault);
|
|
1204
1266
|
}
|
|
1205
1267
|
|
|
1268
|
+
|
|
1269
|
+
oSaveAsDialogOptionsGrid.addContent(this.oPublic);
|
|
1270
|
+
|
|
1206
1271
|
if (this._getShowExecuteOnSelection()) {
|
|
1207
1272
|
oSaveAsDialogOptionsGrid.addContent(this.oExecuteOnSelect);
|
|
1208
1273
|
}
|
|
@@ -1213,6 +1278,7 @@ sap.ui.define([
|
|
|
1213
1278
|
this._bSaveOngoing = false;
|
|
1214
1279
|
|
|
1215
1280
|
if (this._sStyleClass) {
|
|
1281
|
+
this._setShowPublic(this._bShowPublic);
|
|
1216
1282
|
this.oSaveAsDialog.removeStyleClass(this._sStyleClass);
|
|
1217
1283
|
this._sStyleClass = undefined;
|
|
1218
1284
|
}
|
|
@@ -1257,22 +1323,22 @@ sap.ui.define([
|
|
|
1257
1323
|
VariantManagement.prototype.openSaveAsDialogForKeyUser = function (sRtaStyleClassName) {
|
|
1258
1324
|
this._openSaveAsDialog(sRtaStyleClassName);
|
|
1259
1325
|
this.oSaveAsDialog.addStyleClass(sRtaStyleClassName);
|
|
1260
|
-
this._sStyleClass = sRtaStyleClassName;
|
|
1326
|
+
this._sStyleClass = sRtaStyleClassName; // indicates that dialog is running in key user scenario
|
|
1327
|
+
|
|
1328
|
+
this._bShowPublic = this._getShowPublic();
|
|
1329
|
+
this._setShowPublic(false);
|
|
1261
1330
|
};
|
|
1262
1331
|
|
|
1263
1332
|
VariantManagement.prototype._openSaveAsDialog = function() {
|
|
1264
1333
|
this._createSaveAsDialog();
|
|
1265
1334
|
|
|
1266
1335
|
this.oInputName.setValue(this.getSelectedVariantText(this.getCurrentVariantKey()));
|
|
1267
|
-
//this.oSaveSave.setEnabled(false);
|
|
1268
|
-
|
|
1269
1336
|
this.oInputName.setEnabled(true);
|
|
1270
1337
|
this.oInputName.setValueState(ValueState.None);
|
|
1271
1338
|
this.oInputName.setValueStateText(null);
|
|
1272
1339
|
|
|
1273
|
-
//this._checkVariantNameConstraints(this.oInputName);
|
|
1274
|
-
|
|
1275
1340
|
this.oDefault.setSelected(false);
|
|
1341
|
+
this.oPublic.setSelected(false);
|
|
1276
1342
|
this.oExecuteOnSelect.setSelected(false);
|
|
1277
1343
|
|
|
1278
1344
|
if (this.oVariantPopOver) {
|
|
@@ -1328,7 +1394,8 @@ sap.ui.define([
|
|
|
1328
1394
|
name: sName,
|
|
1329
1395
|
overwrite: false,
|
|
1330
1396
|
def: this.oDefault.getSelected(),
|
|
1331
|
-
execute: this.oExecuteOnSelect.getSelected()
|
|
1397
|
+
execute: this.oExecuteOnSelect.getSelected(),
|
|
1398
|
+
"public": this._sStyleClass ? undefined : this.oPublic.getSelected()
|
|
1332
1399
|
});
|
|
1333
1400
|
};
|
|
1334
1401
|
|
|
@@ -1425,13 +1492,25 @@ sap.ui.define([
|
|
|
1425
1492
|
header: new Text({
|
|
1426
1493
|
text: this._oRb.getText("VARIANT_MANAGEMENT_NAME")
|
|
1427
1494
|
}),
|
|
1428
|
-
width: "
|
|
1495
|
+
width: "16rem"
|
|
1496
|
+
}), new Column({
|
|
1497
|
+
header: new Text({
|
|
1498
|
+
text: this._oRb.getText("VARIANT_MANAGEMENT_VARIANTTYPE"),
|
|
1499
|
+
wrappingType: "Hyphenated"
|
|
1500
|
+
}),
|
|
1501
|
+
visible: {
|
|
1502
|
+
path: "/showPublic",
|
|
1503
|
+
model: VariantManagement.INNER_MODEL_NAME
|
|
1504
|
+
},
|
|
1505
|
+
demandPopin: true,
|
|
1506
|
+
popinDisplay: PopinDisplay.Inline,
|
|
1507
|
+
minScreenWidth: ScreenSize.Tablet
|
|
1429
1508
|
}), new Column({
|
|
1430
1509
|
header: new Text({
|
|
1431
1510
|
text: this._oRb.getText("VARIANT_MANAGEMENT_DEFAULT"),
|
|
1432
1511
|
wrappingType: "Hyphenated"
|
|
1433
1512
|
}),
|
|
1434
|
-
hAlign: TextAlign.
|
|
1513
|
+
hAlign: TextAlign.Center,
|
|
1435
1514
|
demandPopin: true,
|
|
1436
1515
|
popinDisplay: PopinDisplay.Block,
|
|
1437
1516
|
minScreenWidth: ScreenSize.Tablet,
|
|
@@ -1492,6 +1571,13 @@ sap.ui.define([
|
|
|
1492
1571
|
title: this._oRb.getText("VARIANT_MANAGEMENT_MANAGEDIALOG"),
|
|
1493
1572
|
beginButton: this.oManagementSave,
|
|
1494
1573
|
endButton: this.oManagementCancel,
|
|
1574
|
+
afterClose: function() {
|
|
1575
|
+
if (this._sStyleClass) {
|
|
1576
|
+
this._setShowPublic(this._bShowPublic);
|
|
1577
|
+
this.oManagementDialog.removeStyleClass(this._sStyleClass);
|
|
1578
|
+
this._sStyleClass = undefined;
|
|
1579
|
+
}
|
|
1580
|
+
}.bind(this),
|
|
1495
1581
|
content: [
|
|
1496
1582
|
this.oManagementTable
|
|
1497
1583
|
],
|
|
@@ -1601,7 +1687,6 @@ sap.ui.define([
|
|
|
1601
1687
|
type: ButtonType.Transparent,
|
|
1602
1688
|
press: fPress,
|
|
1603
1689
|
tooltip: this._oRb.getText("VARIANT_MANAGEMENT_DELETE"),
|
|
1604
|
-
// visible: "{:= ${remove} ? true : false }}"
|
|
1605
1690
|
visible: oItem.remove
|
|
1606
1691
|
});
|
|
1607
1692
|
|
|
@@ -1648,9 +1733,18 @@ sap.ui.define([
|
|
|
1648
1733
|
});
|
|
1649
1734
|
}
|
|
1650
1735
|
|
|
1651
|
-
|
|
1736
|
+
return new ColumnListItem({
|
|
1652
1737
|
cells: [
|
|
1653
|
-
oFavoriteIcon, oNameControl, new
|
|
1738
|
+
oFavoriteIcon, oNameControl, new Text({
|
|
1739
|
+
text: {
|
|
1740
|
+
path: "sharing",
|
|
1741
|
+
model: this._sModelName,
|
|
1742
|
+
formatter: function(sValue) {
|
|
1743
|
+
return this._oRb.getText(sValue === "private" ? "VARIANT_MANAGEMENT_PRIVATE" : "VARIANT_MANAGEMENT_PUBLIC");
|
|
1744
|
+
}.bind(this)
|
|
1745
|
+
},
|
|
1746
|
+
textAlign: "Center"
|
|
1747
|
+
}), new RadioButton({
|
|
1654
1748
|
groupName: this.getId(),
|
|
1655
1749
|
select: fSelectRB,
|
|
1656
1750
|
selected: {
|
|
@@ -1666,11 +1760,8 @@ sap.ui.define([
|
|
|
1666
1760
|
}), oDeleteButton, new Text({
|
|
1667
1761
|
text: '{' + this._sModelName + ">key}"
|
|
1668
1762
|
})
|
|
1669
|
-
|
|
1670
1763
|
]
|
|
1671
1764
|
});
|
|
1672
|
-
|
|
1673
|
-
return oTemplate;
|
|
1674
1765
|
};
|
|
1675
1766
|
|
|
1676
1767
|
VariantManagement.prototype._openManagementDialog = function(sClass) {
|
|
@@ -1701,6 +1792,9 @@ sap.ui.define([
|
|
|
1701
1792
|
});
|
|
1702
1793
|
}
|
|
1703
1794
|
if (sClass) {
|
|
1795
|
+
this._sStyleClass = sClass;
|
|
1796
|
+
this._bShowPublic = this._getShowPublic();
|
|
1797
|
+
this._setShowPublic(false);
|
|
1704
1798
|
this.oManagementDialog.addStyleClass(sClass);
|
|
1705
1799
|
}
|
|
1706
1800
|
this.oManagementDialog.open();
|
|
@@ -1725,16 +1819,12 @@ sap.ui.define([
|
|
|
1725
1819
|
return;
|
|
1726
1820
|
}
|
|
1727
1821
|
|
|
1728
|
-
if (bToInActive) {
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
if (oIcon.hasStyleClass("sapUiFlVarMngmtFavNonInteractiveColor")) {
|
|
1735
|
-
oIcon.removeStyleClass("sapUiFlVarMngmtFavNonInteractiveColor");
|
|
1736
|
-
oIcon.addStyleClass("sapUiFlVarMngmtFavColor");
|
|
1737
|
-
}
|
|
1822
|
+
if (bToInActive && oIcon.hasStyleClass("sapUiFlVarMngmtFavColor")) {
|
|
1823
|
+
oIcon.removeStyleClass("sapUiFlVarMngmtFavColor");
|
|
1824
|
+
oIcon.addStyleClass("sapUiFlVarMngmtFavNonInteractiveColor");
|
|
1825
|
+
} else if (oIcon.hasStyleClass("sapUiFlVarMngmtFavNonInteractiveColor")) {
|
|
1826
|
+
oIcon.removeStyleClass("sapUiFlVarMngmtFavNonInteractiveColor");
|
|
1827
|
+
oIcon.addStyleClass("sapUiFlVarMngmtFavColor");
|
|
1738
1828
|
}
|
|
1739
1829
|
};
|
|
1740
1830
|
|
|
@@ -1813,8 +1903,8 @@ sap.ui.define([
|
|
|
1813
1903
|
var oModel;
|
|
1814
1904
|
var sKey = oItem.key;
|
|
1815
1905
|
|
|
1816
|
-
// do not allow the deletion of the
|
|
1817
|
-
if (this.
|
|
1906
|
+
// do not allow the deletion of the standard
|
|
1907
|
+
if (this.getStandardVariantKey() === sKey) {
|
|
1818
1908
|
return;
|
|
1819
1909
|
}
|
|
1820
1910
|
|
|
@@ -2090,6 +2180,11 @@ sap.ui.define([
|
|
|
2090
2180
|
}
|
|
2091
2181
|
this.oDefault = undefined;
|
|
2092
2182
|
|
|
2183
|
+
if (this.oPublic && !this.oPublic._bIsBeingDestroyed) {
|
|
2184
|
+
this.oPublic.destroy();
|
|
2185
|
+
}
|
|
2186
|
+
this.oPublic = undefined;
|
|
2187
|
+
|
|
2093
2188
|
if (this.oExecuteOnSelect && !this.oExecuteOnSelect._bIsBeingDestroyed) {
|
|
2094
2189
|
this.oExecuteOnSelect.destroy();
|
|
2095
2190
|
}
|
|
@@ -2115,6 +2210,8 @@ sap.ui.define([
|
|
|
2115
2210
|
if (this._sStyleClass) {
|
|
2116
2211
|
this._sStyleClass = undefined;
|
|
2117
2212
|
}
|
|
2213
|
+
|
|
2214
|
+
this._fRegisteredApplyAutomaticallyOnStandardVariant = null;
|
|
2118
2215
|
};
|
|
2119
2216
|
|
|
2120
2217
|
return VariantManagement;
|
|
@@ -58,6 +58,7 @@ sap.ui.define([
|
|
|
58
58
|
* @param {object} mPropertyBag - Object with properties
|
|
59
59
|
* @param {string} mPropertyBag.vmReference - Variant management reference
|
|
60
60
|
* @param {sap.ui.fl.variants.VariantModel} mPropertyBag.model - Variant model instance
|
|
61
|
+
* @returns {Promise<undefined>} Resolves with undefined
|
|
61
62
|
*
|
|
62
63
|
* @private
|
|
63
64
|
*/
|
|
@@ -259,7 +260,7 @@ sap.ui.define([
|
|
|
259
260
|
* @class Variant model implementation for JSON format.
|
|
260
261
|
* @extends sap.ui.model.json.JSONModel
|
|
261
262
|
* @author SAP SE
|
|
262
|
-
* @version 1.
|
|
263
|
+
* @version 1.95.0
|
|
263
264
|
* @param {object} oData - Either the URL where to load the JSON from or a JS object
|
|
264
265
|
* @param {sap.ui.fl.FlexController} oFlexController - <code>FlexController</code> instance for the component which uses the variant model
|
|
265
266
|
* @param {sap.ui.core.Component} oAppComponent - Application component instance that is currently loading
|
|
@@ -279,6 +280,11 @@ sap.ui.define([
|
|
|
279
280
|
JSONModel.apply(this, arguments);
|
|
280
281
|
this.bObserve = bObserve;
|
|
281
282
|
|
|
283
|
+
this.sharing = {
|
|
284
|
+
PRIVATE: "private",
|
|
285
|
+
PUBLIC: "public"
|
|
286
|
+
};
|
|
287
|
+
|
|
282
288
|
// FlexControllerFactory creates a FlexController instance for an application component,
|
|
283
289
|
// which creates a ChangePersistence instance.
|
|
284
290
|
// After retrieving changes for the created ChangePersistence instance,
|
|
@@ -572,14 +578,23 @@ sap.ui.define([
|
|
|
572
578
|
variantChanges: {}
|
|
573
579
|
};
|
|
574
580
|
|
|
575
|
-
var iCurrentLayerComp = LayerUtils.compareAgainstCurrentLayer(oSourceVariant.content.layer,
|
|
581
|
+
var iCurrentLayerComp = LayerUtils.compareAgainstCurrentLayer(oSourceVariant.content.layer, mPropertyBag.layer);
|
|
576
582
|
|
|
577
583
|
Object.keys(oSourceVariant.content).forEach(function(sKey) {
|
|
578
584
|
if (sKey === "fileName") {
|
|
579
585
|
oDuplicateVariant.content[sKey] = sNewVariantReference;
|
|
580
586
|
} else if (sKey === "variantReference") {
|
|
581
|
-
if (iCurrentLayerComp ===
|
|
582
|
-
|
|
587
|
+
if (iCurrentLayerComp === 1) {
|
|
588
|
+
// in case a user variant should be saved as a PUBLIC variant, but refers to a PUBLIC variant,
|
|
589
|
+
// the references dependencies must be followed one more time
|
|
590
|
+
var oSourceVariantsSource = this.getVariant(oSourceVariant.content.variantReference);
|
|
591
|
+
if (oSourceVariantsSource.content.layer === mPropertyBag.layer) {
|
|
592
|
+
oDuplicateVariant.content[sKey] = oSourceVariantsSource.content.variantReference;
|
|
593
|
+
} else {
|
|
594
|
+
oDuplicateVariant.content[sKey] = oSourceVariant.content.variantReference;
|
|
595
|
+
}
|
|
596
|
+
} else if (iCurrentLayerComp === 0) {
|
|
597
|
+
oDuplicateVariant.content[sKey] = oSourceVariant.content.variantReference;
|
|
583
598
|
} else if (iCurrentLayerComp === -1) {
|
|
584
599
|
oDuplicateVariant.content[sKey] = sSourceVariantReference;
|
|
585
600
|
}
|
|
@@ -589,16 +604,19 @@ sap.ui.define([
|
|
|
589
604
|
} else {
|
|
590
605
|
oDuplicateVariant.content[sKey] = oSourceVariant.content[sKey];
|
|
591
606
|
}
|
|
592
|
-
});
|
|
593
|
-
oDuplicateVariant.content
|
|
607
|
+
}.bind(this));
|
|
608
|
+
oDuplicateVariant.content.layer = mPropertyBag.layer;
|
|
594
609
|
|
|
595
610
|
aVariantChanges = oDuplicateVariant.controlChanges.slice();
|
|
596
611
|
|
|
597
612
|
var oDuplicateChangeData = {};
|
|
598
613
|
var oDuplicateChangeContent;
|
|
599
614
|
oDuplicateVariant.controlChanges = aVariantChanges.reduce(function(aSameLayerChanges, oChange) {
|
|
600
|
-
|
|
615
|
+
// copy all changes in the same layer and higher layers (PUBLIC variant can copy USER layer changes)
|
|
616
|
+
if (LayerUtils.compareAgainstCurrentLayer(oChange.layer, mPropertyBag.layer) >= 0) {
|
|
601
617
|
oDuplicateChangeData = merge({}, oChange);
|
|
618
|
+
// ensure that the layer is set to the current variants (USER may becomes PUBLIC)
|
|
619
|
+
oDuplicateChangeData.layer = mPropertyBag.layer;
|
|
602
620
|
oDuplicateChangeData.variantReference = oDuplicateVariant.content.fileName;
|
|
603
621
|
if (!oDuplicateChangeData.support) {
|
|
604
622
|
oDuplicateChangeData.support = {};
|
|
@@ -610,7 +628,7 @@ sap.ui.define([
|
|
|
610
628
|
aSameLayerChanges.push(new Change(oDuplicateChangeContent));
|
|
611
629
|
}
|
|
612
630
|
return aSameLayerChanges;
|
|
613
|
-
}
|
|
631
|
+
}, []);
|
|
614
632
|
|
|
615
633
|
return oDuplicateVariant;
|
|
616
634
|
};
|
|
@@ -644,7 +662,8 @@ sap.ui.define([
|
|
|
644
662
|
change: true,
|
|
645
663
|
remove: true,
|
|
646
664
|
visible: true,
|
|
647
|
-
originalVisible: true
|
|
665
|
+
originalVisible: true,
|
|
666
|
+
sharing: mPropertyBag.layer === Layer.USER ? this.sharing.PRIVATE : this.sharing.PUBLIC
|
|
648
667
|
};
|
|
649
668
|
|
|
650
669
|
var oVariant = VariantUtil.createVariant({
|
|
@@ -784,6 +803,7 @@ sap.ui.define([
|
|
|
784
803
|
* @param {sap.ui.fl.variants.VariantManagement} oVariantManagementControl - Variant management control
|
|
785
804
|
* @param {String} sVariantManagementReference - Variant management reference
|
|
786
805
|
* @param {String} sLayer - Current layer
|
|
806
|
+
* @param {String} sClass - Style class assigned to the management dialog
|
|
787
807
|
* @returns {Promise} Promise which resolves when "manage" event is fired from the variant management control
|
|
788
808
|
* @public
|
|
789
809
|
*/
|
|
@@ -1030,7 +1050,7 @@ sap.ui.define([
|
|
|
1030
1050
|
// TODO: To be removed in a separate change
|
|
1031
1051
|
// try-catch added to prevent FlexState initialize checks, since many tests use fake components / fake responses
|
|
1032
1052
|
try {
|
|
1033
|
-
VariantManagementState.addFakeStandardVariant(this.sFlexReference, oStandardVariant);
|
|
1053
|
+
VariantManagementState.addFakeStandardVariant(this.sFlexReference, this.oAppComponent.getId(), oStandardVariant);
|
|
1034
1054
|
} catch (oError) {
|
|
1035
1055
|
Log.error("Variants Map was not found: " + oError.message);
|
|
1036
1056
|
}
|
|
@@ -1072,8 +1092,9 @@ sap.ui.define([
|
|
|
1072
1092
|
this.oData[sVariantManagementReference].variants.forEach(function(oVariant) {
|
|
1073
1093
|
oVariant.rename = true;
|
|
1074
1094
|
oVariant.change = true;
|
|
1095
|
+
oVariant.sharing = this.sharing.PUBLIC;
|
|
1075
1096
|
oVariant.remove = isVariantValidForRemove(oVariant, sVariantManagementReference, bDesignTimeModeToBeSet);
|
|
1076
|
-
});
|
|
1097
|
+
}.bind(this));
|
|
1077
1098
|
} else if (this.oData[sVariantManagementReference]._isEditable) { // Personalization settings
|
|
1078
1099
|
oControl.attachManage({
|
|
1079
1100
|
variantManagementReference: sVariantManagementReference
|
|
@@ -1085,15 +1106,28 @@ sap.ui.define([
|
|
|
1085
1106
|
this.oData[sVariantManagementReference].variants.forEach(function(oVariant) {
|
|
1086
1107
|
oVariant.remove = isVariantValidForRemove(oVariant, sVariantManagementReference, bDesignTimeModeToBeSet);
|
|
1087
1108
|
// Check for end-user variant
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1109
|
+
switch (oVariant.layer) {
|
|
1110
|
+
case Layer.USER:
|
|
1111
|
+
oVariant.rename = true;
|
|
1112
|
+
oVariant.change = true;
|
|
1113
|
+
oVariant.sharing = this.sharing.PRIVATE;
|
|
1114
|
+
updatePersonalVariantPropertiesWithFlpSettings(oVariant);
|
|
1115
|
+
break;
|
|
1116
|
+
case Layer.PUBLIC:
|
|
1117
|
+
var oUShellContainer = Utils.getUshellContainer();
|
|
1118
|
+
var oUser = oUShellContainer && oUShellContainer.getUser();
|
|
1119
|
+
var bUserIsAuthorized = !oUser || oUser.getId().toUpperCase() === oVariant.author.toUpperCase() || Settings.getInstanceOrUndef().isKeyUser();
|
|
1120
|
+
oVariant.remove = bUserIsAuthorized;
|
|
1121
|
+
oVariant.rename = bUserIsAuthorized;
|
|
1122
|
+
oVariant.change = bUserIsAuthorized;
|
|
1123
|
+
oVariant.sharing = this.sharing.PUBLIC;
|
|
1124
|
+
break;
|
|
1125
|
+
default:
|
|
1126
|
+
oVariant.rename = false;
|
|
1127
|
+
oVariant.change = false;
|
|
1128
|
+
oVariant.sharing = this.sharing.PUBLIC;
|
|
1095
1129
|
}
|
|
1096
|
-
});
|
|
1130
|
+
}.bind(this));
|
|
1097
1131
|
} else {
|
|
1098
1132
|
this.oData[sVariantManagementReference].variantsEditable = false;
|
|
1099
1133
|
this.oData[sVariantManagementReference].variants.forEach(function(oVariant) {
|
|
@@ -1167,12 +1201,12 @@ sap.ui.define([
|
|
|
1167
1201
|
changeInstance: true
|
|
1168
1202
|
});
|
|
1169
1203
|
|
|
1170
|
-
if (mParameters
|
|
1204
|
+
if (mParameters.overwrite) {
|
|
1171
1205
|
// handle triggered "Save" button
|
|
1172
1206
|
return this.oFlexController.saveSequenceOfDirtyChanges(this._getDirtyChangesFromVariantChanges(aSourceVariantChanges), oAppComponent);
|
|
1173
1207
|
}
|
|
1174
1208
|
|
|
1175
|
-
var sLayer = mParameters.layer || Layer.USER;
|
|
1209
|
+
var sLayer = mParameters.layer || (mParameters.public ? Layer.PUBLIC : Layer.USER);
|
|
1176
1210
|
|
|
1177
1211
|
// handle triggered "SaveAs" button
|
|
1178
1212
|
var sNewVariantReference = mParameters.newVariantReference || Utils.createDefaultFileName();
|
|
@@ -1180,7 +1214,7 @@ sap.ui.define([
|
|
|
1180
1214
|
variantManagementReference: sVariantManagementReference,
|
|
1181
1215
|
appComponent: oAppComponent,
|
|
1182
1216
|
layer: sLayer,
|
|
1183
|
-
title: mParameters
|
|
1217
|
+
title: mParameters.name,
|
|
1184
1218
|
sourceVariantReference: sSourceVariantReference,
|
|
1185
1219
|
newVariantReference: sNewVariantReference,
|
|
1186
1220
|
generator: mParameters.generator
|
|
@@ -1416,7 +1450,7 @@ sap.ui.define([
|
|
|
1416
1450
|
}.bind(this));
|
|
1417
1451
|
return this._oVariantSwitchPromise
|
|
1418
1452
|
.then(function() {
|
|
1419
|
-
VariantManagementState.clearFakedStandardVariants(this.sFlexReference);
|
|
1453
|
+
VariantManagementState.clearFakedStandardVariants(this.sFlexReference, this.oAppComponent.getId());
|
|
1420
1454
|
VariantManagementState.resetContent(this.sFlexReference);
|
|
1421
1455
|
//re-initialize hash data and remove existing parameters
|
|
1422
1456
|
if (!bSkipURLHandling) {
|
|
@@ -20,7 +20,7 @@ sap.ui.define([
|
|
|
20
20
|
*
|
|
21
21
|
* @namespace sap.ui.fl.write._internal.Storage
|
|
22
22
|
* @since 1.67
|
|
23
|
-
* @version 1.
|
|
23
|
+
* @version 1.95.0
|
|
24
24
|
* @private
|
|
25
25
|
* @ui5-restricted sap.ui.fl
|
|
26
26
|
*/
|
|
@@ -149,7 +149,7 @@ sap.ui.define([
|
|
|
149
149
|
} else if (mPropertyBag.condensedChanges.length) {
|
|
150
150
|
bDifferentOrder = mPropertyBag.allChanges[index].getFileName() !== mPropertyBag.condensedChanges[index - iOffset].getFileName();
|
|
151
151
|
}
|
|
152
|
-
if (oChange.condenserState === "select" && bDifferentOrder && !bAlreadyReordered) {
|
|
152
|
+
if ((oChange.condenserState === "select" || oChange.condenserState === "update") && bDifferentOrder && !bAlreadyReordered) {
|
|
153
153
|
var aReorderedChanges = mPropertyBag.condensedChanges.slice(index - iOffset).map(function(oChange) {
|
|
154
154
|
return oChange.getFileName();
|
|
155
155
|
});
|
|
@@ -16,14 +16,16 @@ sap.ui.define([
|
|
|
16
16
|
*
|
|
17
17
|
* @namespace sap.ui.fl.write._internal.StorageFeaturesMerger
|
|
18
18
|
* @since 1.70
|
|
19
|
-
* @version 1.
|
|
19
|
+
* @version 1.95.0
|
|
20
20
|
* @private
|
|
21
21
|
* @ui5-restricted sap.ui.fl.write._internal.Storage
|
|
22
22
|
*/
|
|
23
23
|
|
|
24
24
|
var DEFAULT_FEATURES = {
|
|
25
25
|
isKeyUser: false,
|
|
26
|
+
isKeyUserTranslationEnabled: false,
|
|
26
27
|
isVariantSharingEnabled: false,
|
|
28
|
+
isPublicFlVariantEnabled: false,
|
|
27
29
|
isVariantPersonalizationEnabled: true,
|
|
28
30
|
isAtoAvailable: false,
|
|
29
31
|
isAtoEnabled: false,
|
|
@@ -58,6 +60,7 @@ sap.ui.define([
|
|
|
58
60
|
*/
|
|
59
61
|
mergeResults: function(aResponses) {
|
|
60
62
|
var oResult = DEFAULT_FEATURES;
|
|
63
|
+
|
|
61
64
|
aResponses.forEach(function (oResponse) {
|
|
62
65
|
Object.keys(oResponse.features).forEach(function (sKey) {
|
|
63
66
|
if (sKey !== "isVersioningEnabled") {
|
|
@@ -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.95.0
|
|
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
|
});
|