@openui5/sap.ui.fl 1.96.2 → 1.97.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.reuse/dep5 +1 -1
- package/THIRDPARTY.txt +2 -1
- 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/ChangePersistence.js +6 -4
- package/src/sap/ui/fl/ChangePersistenceFactory.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 +9 -5
- 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 +8 -8
- package/src/sap/ui/fl/Variant.js +1 -1
- package/src/sap/ui/fl/XmlPreprocessorImpl.js +10 -11
- package/src/sap/ui/fl/apply/_internal/DelegateMediator.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/FlexCustomData.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/Utils.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/Applier.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/Preprocessor.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/Registration.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/RegistrationBuild.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/AddAnnotationsToOData.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/ChangeDataSource.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/ChangeInbound.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/SetTitle.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/fiori/SetAbstract.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/fiori/SetRegistrationIds.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ovp/AddNewCard.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ovp/ChangeCard.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ovp/DeleteCard.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddComponentUsages.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddLibrary.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddNewModel.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddNewModelEnhanceWith.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/SetFlexExtensionPointEnabled.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/SetMinUI5Version.js +1 -1
- package/src/sap/ui/fl/apply/_internal/connectors/ObjectStorageUtils.js +1 -1
- package/src/sap/ui/fl/apply/_internal/controlVariants/URLHandler.js +263 -263
- package/src/sap/ui/fl/apply/_internal/controlVariants/Utils.js +39 -9
- package/src/sap/ui/fl/apply/_internal/extensionPoint/Processor.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexState/FlexState.js +3 -33
- package/src/sap/ui/fl/apply/_internal/flexState/Loader.js +9 -16
- package/src/sap/ui/fl/apply/_internal/flexState/ManifestUtils.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexState/UI2Personalization/UI2PersonalizationState.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexState/appDescriptorChanges/prepareAppDescriptorMap.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 +2 -2
- package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/Switcher.js +2 -4
- package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/VariantManagementState.js +13 -11
- package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/prepareVariantsMap.js +1 -1
- package/src/sap/ui/fl/apply/api/ControlVariantApplyAPI.js +86 -6
- package/src/sap/ui/fl/apply/api/FlexRuntimeInfoAPI.js +58 -9
- package/src/sap/ui/fl/changeHandler/AddIFrame.js +1 -1
- package/src/sap/ui/fl/changeHandler/AddXML.js +1 -1
- package/src/sap/ui/fl/changeHandler/AddXMLAtExtensionPoint.js +1 -1
- package/src/sap/ui/fl/changeHandler/Base.js +1 -1
- package/src/sap/ui/fl/changeHandler/BaseAddViaDelegate.js +1 -1
- package/src/sap/ui/fl/changeHandler/BaseAddXml.js +1 -1
- package/src/sap/ui/fl/changeHandler/BaseRename.js +1 -1
- package/src/sap/ui/fl/changeHandler/HideControl.js +1 -1
- package/src/sap/ui/fl/changeHandler/MoveControls.js +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 +1 -1
- package/src/sap/ui/fl/codeExt/CodeExtManager.js +16 -10
- package/src/sap/ui/fl/descriptorRelated/api/DescriptorChangeFactory.js +4 -4
- package/src/sap/ui/fl/descriptorRelated/api/DescriptorInlineChangeFactory.js +1 -1
- package/src/sap/ui/fl/descriptorRelated/api/DescriptorVariantFactory.js +1 -1
- package/src/sap/ui/fl/initial/_internal/Storage.js +1 -1
- package/src/sap/ui/fl/initial/_internal/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 -3
- 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_en_US_sappsd.properties +19 -2
- package/src/sap/ui/fl/messagebundle_en_US_saprigi.properties +2 -35
- package/src/sap/ui/fl/messagebundle_en_US_saptrc.properties +19 -2
- package/src/sap/ui/fl/registry/Settings.js +15 -16
- package/src/sap/ui/fl/support/Flexibility.js +83 -72
- package/src/sap/ui/fl/support/apps/contentbrowser/controller/ContentDetails.controller.js +12 -12
- package/src/sap/ui/fl/support/apps/contentbrowser/controller/ContentDetailsEdit.controller.js +8 -8
- package/src/sap/ui/fl/support/apps/contentbrowser/controller/LayerContentMaster.controller.js +9 -9
- package/src/sap/ui/fl/support/apps/contentbrowser/controller/Layers.controller.js +3 -3
- package/src/sap/ui/fl/support/apps/contentbrowser/lrepConnector/LRepConnector.js +51 -52
- package/src/sap/ui/fl/support/apps/contentbrowser/utils/DataUtils.js +129 -125
- package/src/sap/ui/fl/support/apps/contentbrowser/utils/ErrorUtils.js +1 -1
- package/src/sap/ui/fl/support/apps/uiFlexibilityDiagnostics/controller/Root.controller.js +0 -2
- package/src/sap/ui/fl/support/diagnostics/Flexibility.controller.js +1 -1
- package/src/sap/ui/fl/transport/TransportSelection.js +1 -1
- package/src/sap/ui/fl/util/DescriptorChangeCheck.js +2 -4
- package/src/sap/ui/fl/util/IFrame.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/VariantModel.js +1 -1
- package/src/sap/ui/fl/variants/context/controller/ContextVisibility.controller.js +12 -2
- package/src/sap/ui/fl/write/_internal/Storage.js +1 -1
- package/src/sap/ui/fl/write/_internal/StorageFeaturesMerger.js +1 -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 +1 -1
- package/src/sap/ui/fl/write/_internal/condenser/Condenser.js +3 -2
- package/src/sap/ui/fl/write/_internal/condenser/UIReconstruction.js +1 -1
- package/src/sap/ui/fl/write/_internal/connectors/BackendConnector.js +2 -2
- package/src/sap/ui/fl/write/_internal/connectors/KeyUserConnector.js +23 -23
- 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/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 +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/CAPAccess.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/dialog/CustomFieldCAPDialog.js +2 -2
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/booleanEditor/BooleanEditor.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/rangeEditor/RangeEditor.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/timeEditor/TimeEditor.js +1 -1
- package/src/sap/ui/fl/write/_internal/flexState/FlexObjectState.js +4 -3
- package/src/sap/ui/fl/write/_internal/flexState/compVariants/CompVariantState.js +5 -4
- package/src/sap/ui/fl/write/_internal/transport/TransportDialog.js +5 -7
- package/src/sap/ui/fl/write/_internal/transport/TransportSelection.js +6 -5
- package/src/sap/ui/fl/write/_internal/transport/Transports.js +1 -2
- package/src/sap/ui/fl/write/api/ControlPersonalizationWriteAPI.js +117 -13
- package/src/sap/ui/fl/write/api/FeaturesAPI.js +1 -0
- package/src/sap/ui/fl/write/api/FieldExtensibility.js +7 -3
- package/src/sap/ui/fl/write/api/PersistenceWriteAPI.js +2 -1
- package/src/sap/ui/fl/write/api/SmartVariantManagementWriteAPI.js +2 -0
- package/ui5.yaml +132 -1
- package/src/sap/ui/fl/ControlPersonalizationAPI.js +0 -479
|
@@ -13,7 +13,7 @@ sap.ui.define(["sap/ui/fl/Utils", "sap/ui/thirdparty/jquery"], function(Utils, j
|
|
|
13
13
|
* @constructor
|
|
14
14
|
* @alias sap.ui.fl.support.apps.contentbrowser.lrepConnector.LRepConnector
|
|
15
15
|
* @author SAP SE
|
|
16
|
-
* @version 1.
|
|
16
|
+
* @version 1.97.0
|
|
17
17
|
* @experimental Since 1.45
|
|
18
18
|
*/
|
|
19
19
|
var LrepConnector = {};
|
|
@@ -25,11 +25,11 @@ sap.ui.define(["sap/ui/fl/Utils", "sap/ui/thirdparty/jquery"], function(Utils, j
|
|
|
25
25
|
/**
|
|
26
26
|
* Gets content from the layered repository.
|
|
27
27
|
*
|
|
28
|
-
* @param {
|
|
29
|
-
* @param {
|
|
30
|
-
* @param {boolean} bReadContextMetadata -
|
|
31
|
-
* @param {boolean} bReadRuntimeContext -
|
|
32
|
-
* @param {boolean} bRequestAsText -
|
|
28
|
+
* @param {string} sLayer - Determines the layer for obtaining the content
|
|
29
|
+
* @param {string} sContentSuffix - Namespace plus filename and file type of content
|
|
30
|
+
* @param {boolean} bReadContextMetadata - Read content plus metadata information
|
|
31
|
+
* @param {boolean} bReadRuntimeContext - Gets the content in runtime instead of design time
|
|
32
|
+
* @param {boolean} bRequestAsText - Gets content data as plain text
|
|
33
33
|
* @returns {Promise} Promise of GET content request to the back end
|
|
34
34
|
* @public
|
|
35
35
|
*/
|
|
@@ -51,13 +51,13 @@ sap.ui.define(["sap/ui/fl/Utils", "sap/ui/thirdparty/jquery"], function(Utils, j
|
|
|
51
51
|
/**
|
|
52
52
|
* Saves a file to the layered repository.
|
|
53
53
|
*
|
|
54
|
-
* @param {
|
|
55
|
-
* @param {
|
|
56
|
-
* @param {
|
|
57
|
-
* @param {
|
|
58
|
-
* @param {
|
|
59
|
-
* @param
|
|
60
|
-
* @param
|
|
54
|
+
* @param {string} sLayer - Determines the layer for saving the content
|
|
55
|
+
* @param {string} sNamespace - Namespace of the file
|
|
56
|
+
* @param {string} sFilename - Name of the file
|
|
57
|
+
* @param {string} sFileType - Type of the file
|
|
58
|
+
* @param {string} sContent - Content of the file saved to the layered repository
|
|
59
|
+
* @param {string} sTransportId - ID of an ABAP transport or ATO_NOTIFICATION
|
|
60
|
+
* @param {string} sPackageName - Name of an ABAP package
|
|
61
61
|
* @returns {Promise} Promise of the SAVE content request to the back end
|
|
62
62
|
* @public
|
|
63
63
|
*/
|
|
@@ -80,11 +80,11 @@ sap.ui.define(["sap/ui/fl/Utils", "sap/ui/thirdparty/jquery"], function(Utils, j
|
|
|
80
80
|
/**
|
|
81
81
|
* Deletes a file from the layered repository.
|
|
82
82
|
*
|
|
83
|
-
* @param {
|
|
84
|
-
* @param {
|
|
85
|
-
* @param {
|
|
86
|
-
* @param {
|
|
87
|
-
* @param
|
|
83
|
+
* @param {string} sLayer - Determines the layer for deleting the content
|
|
84
|
+
* @param {string} sNamespace - Namespace of the file
|
|
85
|
+
* @param {string} sFileName - Name of the file
|
|
86
|
+
* @param {string} sFileType - Type of the file
|
|
87
|
+
* @param {string} sTransportId - ID of the ABAP transport or ATO_NOTIFICATION
|
|
88
88
|
* @returns {Promise} Promise of DELETE content request to the back end
|
|
89
89
|
* @public
|
|
90
90
|
*/
|
|
@@ -141,8 +141,8 @@ sap.ui.define(["sap/ui/fl/Utils", "sap/ui/thirdparty/jquery"], function(Utils, j
|
|
|
141
141
|
/**
|
|
142
142
|
* Get layer suffix for request URL;
|
|
143
143
|
* If all layers are selected, the layer suffix is empty.
|
|
144
|
-
* @param {
|
|
145
|
-
* @returns {
|
|
144
|
+
* @param {string} sLayer - Normal layer plus 'All'
|
|
145
|
+
* @returns {string} Correct layer suffix
|
|
146
146
|
* @private
|
|
147
147
|
*/
|
|
148
148
|
LrepConnector._getLayerSuffix = function (sLayer) {
|
|
@@ -154,8 +154,8 @@ sap.ui.define(["sap/ui/fl/Utils", "sap/ui/thirdparty/jquery"], function(Utils, j
|
|
|
154
154
|
|
|
155
155
|
/**
|
|
156
156
|
* Get changelist suffix for request URL;
|
|
157
|
-
* @param {
|
|
158
|
-
* @returns {
|
|
157
|
+
* @param {string} sChangeList - Transport ID
|
|
158
|
+
* @returns {string} Correct changelist suffix
|
|
159
159
|
* @private
|
|
160
160
|
*/
|
|
161
161
|
LrepConnector._getChangeListSuffix = function (sChangeList) {
|
|
@@ -164,8 +164,8 @@ sap.ui.define(["sap/ui/fl/Utils", "sap/ui/thirdparty/jquery"], function(Utils, j
|
|
|
164
164
|
|
|
165
165
|
/**
|
|
166
166
|
* Get package suffix for request URL;
|
|
167
|
-
* @param {
|
|
168
|
-
* @returns {
|
|
167
|
+
* @param {string} sPackage - Package name
|
|
168
|
+
* @returns {string} Correct package suffix
|
|
169
169
|
* @private
|
|
170
170
|
*/
|
|
171
171
|
LrepConnector._getPackageSuffix = function (sPackage) {
|
|
@@ -175,10 +175,10 @@ sap.ui.define(["sap/ui/fl/Utils", "sap/ui/thirdparty/jquery"], function(Utils, j
|
|
|
175
175
|
/**
|
|
176
176
|
* Get context suffix for request URL.
|
|
177
177
|
*
|
|
178
|
-
* @param {
|
|
179
|
-
* @param {boolean} bReadRuntimeContext -
|
|
180
|
-
* @param {boolean} bReadContextMetadata -
|
|
181
|
-
* @returns {
|
|
178
|
+
* @param {string} sLayerSuffix - Layer suffix based on selected layer
|
|
179
|
+
* @param {boolean} bReadRuntimeContext - Gets content in runtime instead of design time
|
|
180
|
+
* @param {boolean} bReadContextMetadata - Reads content plus metadata information
|
|
181
|
+
* @returns {string} Correct context suffix for URL request
|
|
182
182
|
* @private
|
|
183
183
|
*/
|
|
184
184
|
LrepConnector._getContextSuffix = function (sLayerSuffix, bReadRuntimeContext, bReadContextMetadata) {
|
|
@@ -197,9 +197,9 @@ sap.ui.define(["sap/ui/fl/Utils", "sap/ui/thirdparty/jquery"], function(Utils, j
|
|
|
197
197
|
/**
|
|
198
198
|
* Reports an error during back-end request.
|
|
199
199
|
*
|
|
200
|
-
* @param {
|
|
201
|
-
* @param {
|
|
202
|
-
* @param {
|
|
200
|
+
* @param {object} oJqXHR - <code>jqXHR</code> object which is returned from ajax request
|
|
201
|
+
* @param {string} sTextStatus - Status text of the error
|
|
202
|
+
* @param {object} oErrorThrown - Object that contains the error description
|
|
203
203
|
* @private
|
|
204
204
|
*/
|
|
205
205
|
LrepConnector._reportError = function (oJqXHR, sTextStatus, oErrorThrown) {
|
|
@@ -211,10 +211,10 @@ sap.ui.define(["sap/ui/fl/Utils", "sap/ui/thirdparty/jquery"], function(Utils, j
|
|
|
211
211
|
/**
|
|
212
212
|
* Sends a GET content request to the back end.
|
|
213
213
|
*
|
|
214
|
-
* @param {
|
|
215
|
-
* @param {
|
|
216
|
-
* @param {
|
|
217
|
-
* @param {boolean} bRequestAsText -
|
|
214
|
+
* @param {string} sUrl - Request URL
|
|
215
|
+
* @param {function} fnResolve - Callback function if request was resolved
|
|
216
|
+
* @param {function} fnReject - Callback function if request was rejected
|
|
217
|
+
* @param {boolean} bRequestAsText - Sends ajax request with data type as plain text
|
|
218
218
|
* @private
|
|
219
219
|
*/
|
|
220
220
|
LrepConnector._sendContentRequest = function (sUrl, fnResolve, fnReject, bRequestAsText) {
|
|
@@ -239,11 +239,10 @@ sap.ui.define(["sap/ui/fl/Utils", "sap/ui/thirdparty/jquery"], function(Utils, j
|
|
|
239
239
|
/**
|
|
240
240
|
* Gets the token and sends an updating request.
|
|
241
241
|
*
|
|
242
|
-
* @param {
|
|
243
|
-
* @param {
|
|
244
|
-
* @param {
|
|
245
|
-
* @param {
|
|
246
|
-
* @param {Function} fnReject - callback function if request was rejected
|
|
242
|
+
* @param {string} sUrl - Request URL
|
|
243
|
+
* @param {object} oData - Data for PUT request
|
|
244
|
+
* @param {function} fnResolve - Callback function if request was resolved
|
|
245
|
+
* @param {function} fnReject - Callback function if request was rejected
|
|
247
246
|
* @private
|
|
248
247
|
*/
|
|
249
248
|
LrepConnector._getTokenAndSendPutRequest = function (sUrl, oData, fnResolve, fnReject) {
|
|
@@ -256,11 +255,11 @@ sap.ui.define(["sap/ui/fl/Utils", "sap/ui/thirdparty/jquery"], function(Utils, j
|
|
|
256
255
|
/**
|
|
257
256
|
* Sends PUT content request to the back end.
|
|
258
257
|
*
|
|
259
|
-
* @param {
|
|
260
|
-
* @param {
|
|
261
|
-
* @param {
|
|
262
|
-
* @param {
|
|
263
|
-
* @param {
|
|
258
|
+
* @param {object} oXcsrfToken - Token object
|
|
259
|
+
* @param {string} sUrl - Request URL
|
|
260
|
+
* @param {object} oData - Data of PUT request
|
|
261
|
+
* @param {function} fnResolve - Callback function if request was resolved
|
|
262
|
+
* @param {function} fnReject - Callback function if request was rejected
|
|
264
263
|
* @private
|
|
265
264
|
*/
|
|
266
265
|
LrepConnector._sendPutRequest = function (oXcsrfToken, sUrl, oData, fnResolve, fnReject) {
|
|
@@ -286,9 +285,9 @@ sap.ui.define(["sap/ui/fl/Utils", "sap/ui/thirdparty/jquery"], function(Utils, j
|
|
|
286
285
|
/**
|
|
287
286
|
* Gets token and sends DELETE content request to the back end.
|
|
288
287
|
*
|
|
289
|
-
* @param {
|
|
290
|
-
* @param {
|
|
291
|
-
* @param {
|
|
288
|
+
* @param {string} sUrl - Request URL
|
|
289
|
+
* @param {function} fnResolve - Callback function if request was resolved
|
|
290
|
+
* @param {function} fnReject - Callback function if request was rejected
|
|
292
291
|
* @private
|
|
293
292
|
*/
|
|
294
293
|
LrepConnector._getTokenAndSendDeletionRequest = function (sUrl, fnResolve, fnReject) {
|
|
@@ -301,10 +300,10 @@ sap.ui.define(["sap/ui/fl/Utils", "sap/ui/thirdparty/jquery"], function(Utils, j
|
|
|
301
300
|
/**
|
|
302
301
|
* Sends DELETE request to the back end.
|
|
303
302
|
*
|
|
304
|
-
* @param {
|
|
305
|
-
* @param {
|
|
306
|
-
* @param {
|
|
307
|
-
* @param {
|
|
303
|
+
* @param {object} oXcsrfToken - Token object
|
|
304
|
+
* @param {string} sUrl - Request URL
|
|
305
|
+
* @param {function} fnResolve - Callback function if request was resolved
|
|
306
|
+
* @param {function} fnReject - Callback function if request was rejected
|
|
308
307
|
* @private
|
|
309
308
|
*/
|
|
310
309
|
LrepConnector._sendDeletionRequest = function (oXcsrfToken, sUrl, fnResolve, fnReject) {
|
|
@@ -4,143 +4,147 @@
|
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
sap.ui.define([
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
sap.ui.define([
|
|
8
|
+
"sap/m/GroupHeaderListItem",
|
|
9
|
+
"sap/ui/thirdparty/jquery"
|
|
10
|
+
], function(
|
|
11
|
+
GroupHeaderListItem,
|
|
12
|
+
jQuery
|
|
13
|
+
) {
|
|
14
|
+
"use strict";
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Provides data utility functions for the Content Browser.
|
|
18
|
+
*
|
|
19
|
+
* @constructor
|
|
20
|
+
* @alias sap.ui.fl.support.apps.contentbrowser.utils.DataUtils
|
|
21
|
+
* @author SAP SE
|
|
22
|
+
* @version 1.97.0
|
|
23
|
+
* @experimental Since 1.45
|
|
24
|
+
*/
|
|
25
|
+
var DataUtils = {
|
|
26
|
+
aExcludeList: [{
|
|
27
|
+
category: "NS",
|
|
28
|
+
name: "LREP_HOME_CONTENT",
|
|
29
|
+
ns: "UIF/"
|
|
30
|
+
}, {
|
|
31
|
+
category: "NS",
|
|
32
|
+
name: "virtual~",
|
|
33
|
+
ns: "/"
|
|
34
|
+
}],
|
|
10
35
|
|
|
11
36
|
/**
|
|
12
|
-
*
|
|
37
|
+
* Pretty printer for specific file types.
|
|
13
38
|
*
|
|
14
|
-
* @
|
|
15
|
-
* @
|
|
16
|
-
* @
|
|
17
|
-
* @
|
|
18
|
-
* @experimental Since 1.45
|
|
39
|
+
* @param {Object} oData - Data to be formatted
|
|
40
|
+
* @param {String} sFileType - File type of data
|
|
41
|
+
* @returns {Object} Data after formatting
|
|
42
|
+
* @public
|
|
19
43
|
*/
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
* @param {String} sFileType - file type of data
|
|
36
|
-
* @returns {Object} oData - data after formatting
|
|
37
|
-
* @public
|
|
38
|
-
*/
|
|
39
|
-
formatData: function (oData, sFileType) {
|
|
40
|
-
// code extension and properties files do not need formation
|
|
41
|
-
if ((sFileType === "js") || (sFileType === "properties")) {
|
|
42
|
-
return oData;
|
|
43
|
-
}
|
|
44
|
-
// other files should be formatted to JSON
|
|
45
|
-
try {
|
|
46
|
-
oData = JSON.parse(oData);
|
|
47
|
-
return JSON.stringify(oData, null, '\t');
|
|
48
|
-
} catch (oError) {
|
|
49
|
-
var ErrorUtils = sap.ui.require("sap/ui/fl/support/apps/contentbrowser/utils/ErrorUtils");
|
|
50
|
-
ErrorUtils.displayError("Error", oError.name, oError.message);
|
|
51
|
-
return oData;
|
|
52
|
-
}
|
|
53
|
-
},
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* Factory for creating list group header objects for the metadata list.
|
|
57
|
-
* @param {Object} oGroup - group data passed from the lists model binding
|
|
58
|
-
* @returns {sap.m.GroupHeaderListItem}
|
|
59
|
-
* @public
|
|
60
|
-
*/
|
|
61
|
-
getGroupHeader: function (oGroup) {
|
|
62
|
-
var sTitle = "{i18n>systemData}";
|
|
44
|
+
formatData: function (oData, sFileType) {
|
|
45
|
+
// code extension and properties files do not need formation
|
|
46
|
+
if ((sFileType === "js") || (sFileType === "properties")) {
|
|
47
|
+
return oData;
|
|
48
|
+
}
|
|
49
|
+
// other files should be formatted to JSON
|
|
50
|
+
try {
|
|
51
|
+
oData = JSON.parse(oData);
|
|
52
|
+
return JSON.stringify(oData, null, '\t');
|
|
53
|
+
} catch (oError) {
|
|
54
|
+
var ErrorUtils = sap.ui.require("sap/ui/fl/support/apps/contentbrowser/utils/ErrorUtils");
|
|
55
|
+
ErrorUtils.displayError("Error", oError.name, oError.message);
|
|
56
|
+
return oData;
|
|
57
|
+
}
|
|
58
|
+
},
|
|
63
59
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
60
|
+
/**
|
|
61
|
+
* Factory for creating list group header objects for the metadata list.
|
|
62
|
+
* @param {Object} oGroup - Group data passed from the lists model binding
|
|
63
|
+
* @returns {sap.m.GroupHeaderListItem} New GroupHeaderListItem
|
|
64
|
+
* @public
|
|
65
|
+
*/
|
|
66
|
+
getGroupHeader: function (oGroup) {
|
|
67
|
+
var sTitle = "{i18n>systemData}";
|
|
67
68
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
});
|
|
72
|
-
},
|
|
69
|
+
if (oGroup.key === "custom") {
|
|
70
|
+
sTitle = "{i18n>externalReferences}";
|
|
71
|
+
}
|
|
73
72
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
*/
|
|
80
|
-
isNotExcluded: function (oContentItem) {
|
|
81
|
-
var bNotExcluded = true;
|
|
82
|
-
jQuery.each(this.aExcludeList, function (index, mExcludeListElement) {
|
|
83
|
-
var bAllPropertiesMatched = true;
|
|
73
|
+
return new GroupHeaderListItem({
|
|
74
|
+
title: sTitle,
|
|
75
|
+
upperCase: false
|
|
76
|
+
});
|
|
77
|
+
},
|
|
84
78
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
79
|
+
/**
|
|
80
|
+
* Verifies if item content is not in the exclude list.
|
|
81
|
+
* @param {Object} oContentItem - Content item needs to be verified
|
|
82
|
+
* @returns {boolean} <code>true</code> if the item is not excluded
|
|
83
|
+
* @public
|
|
84
|
+
*/
|
|
85
|
+
isNotExcluded: function (oContentItem) {
|
|
86
|
+
var bNotExcluded = true;
|
|
87
|
+
jQuery.each(this.aExcludeList, function (index, mExcludeListElement) {
|
|
88
|
+
var bAllPropertiesMatched = true;
|
|
88
89
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
return false; // break each
|
|
92
|
-
}
|
|
90
|
+
jQuery.each(mExcludeListElement, function (sProperty, sValue) {
|
|
91
|
+
bAllPropertiesMatched = bAllPropertiesMatched && oContentItem[sProperty] === sValue;
|
|
93
92
|
});
|
|
94
|
-
return bNotExcluded;
|
|
95
|
-
},
|
|
96
93
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
* @returns {String} - string after removing leading and trailing slashes
|
|
101
|
-
* @public
|
|
102
|
-
*/
|
|
103
|
-
cleanLeadingAndTrailingSlashes: function (sNamespace) {
|
|
104
|
-
if (!sNamespace) {
|
|
105
|
-
return "";
|
|
94
|
+
if (bAllPropertiesMatched) {
|
|
95
|
+
bNotExcluded = false;
|
|
96
|
+
return false; // break each
|
|
106
97
|
}
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
}
|
|
111
|
-
if (sNamespace[sNamespace.length - 1] === "/") {
|
|
112
|
-
var sNamespaceWithoutTrailingSlash = sNamespace.substring(0, sNamespace.length - 1);
|
|
113
|
-
return this.cleanLeadingAndTrailingSlashes(sNamespaceWithoutTrailingSlash);
|
|
114
|
-
}
|
|
115
|
-
return sNamespace;
|
|
116
|
-
},
|
|
98
|
+
});
|
|
99
|
+
return bNotExcluded;
|
|
100
|
+
},
|
|
117
101
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
* @param {string} sSuffix - suffix
|
|
136
|
-
* @returns {boolean} <code>true</code> if the passed suffix is the last part of the passed string
|
|
137
|
-
* @public
|
|
138
|
-
*/
|
|
139
|
-
endsStringWith: function (sString, sSuffix) {
|
|
140
|
-
return sString.indexOf(sSuffix, sString.length - sSuffix.length) !== -1;
|
|
102
|
+
/**
|
|
103
|
+
* Removes leading and trailing slashes from a string.
|
|
104
|
+
* @param {String} sNamespace - Input string
|
|
105
|
+
* @returns {String} String after removing leading and trailing slashes
|
|
106
|
+
* @public
|
|
107
|
+
*/
|
|
108
|
+
cleanLeadingAndTrailingSlashes: function (sNamespace) {
|
|
109
|
+
if (!sNamespace) {
|
|
110
|
+
return "";
|
|
111
|
+
}
|
|
112
|
+
if (sNamespace[0] === "/") {
|
|
113
|
+
var sNamespaceWithoutLeadingSlash = sNamespace.substring(1, sNamespace.length);
|
|
114
|
+
return this.cleanLeadingAndTrailingSlashes(sNamespaceWithoutLeadingSlash);
|
|
115
|
+
}
|
|
116
|
+
if (sNamespace[sNamespace.length - 1] === "/") {
|
|
117
|
+
var sNamespaceWithoutTrailingSlash = sNamespace.substring(0, sNamespace.length - 1);
|
|
118
|
+
return this.cleanLeadingAndTrailingSlashes(sNamespaceWithoutTrailingSlash);
|
|
141
119
|
}
|
|
142
|
-
|
|
120
|
+
return sNamespace;
|
|
121
|
+
},
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Title formatter: combines the items namespace, filename and type.
|
|
125
|
+
* @param {object} mModelData - Object with model data
|
|
126
|
+
* @param {string} mModelData.namespace - Namespace
|
|
127
|
+
* @param {string} mModelData.fileName - Filename
|
|
128
|
+
* @param {string} mModelData.fileType - Filetype
|
|
129
|
+
* @returns {string} Item title after formatting
|
|
130
|
+
* @public
|
|
131
|
+
*/
|
|
132
|
+
formatItemTitle: function (mModelData) {
|
|
133
|
+
return mModelData.namespace + mModelData.fileName + "." + mModelData.fileType;
|
|
134
|
+
},
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Helper function to determine if a file ends with a specified suffix.
|
|
138
|
+
*
|
|
139
|
+
* @param {string} sString - String that has to be checked
|
|
140
|
+
* @param {string} sSuffix - Suffix
|
|
141
|
+
* @returns {boolean} <code>true</code> if the passed suffix is the last part of the passed string
|
|
142
|
+
* @public
|
|
143
|
+
*/
|
|
144
|
+
endsStringWith: function (sString, sSuffix) {
|
|
145
|
+
return sString.indexOf(sSuffix, sString.length - sSuffix.length) !== -1;
|
|
146
|
+
}
|
|
147
|
+
};
|
|
143
148
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
);
|
|
149
|
+
return DataUtils;
|
|
150
|
+
}, true);
|
|
@@ -17,7 +17,7 @@ sap.ui.define([
|
|
|
17
17
|
* @alias sap.ui.fl.transport.TransportSelection
|
|
18
18
|
* @constructor
|
|
19
19
|
* @author SAP SE
|
|
20
|
-
* @version 1.
|
|
20
|
+
* @version 1.97.0
|
|
21
21
|
* @since 1.38.0
|
|
22
22
|
* Helper object to select an ABAP transport for an LREP object. This is not a generic utility to select a transport request, but part
|
|
23
23
|
* of the SmartVariant control.
|
|
@@ -90,10 +90,8 @@ sap.ui.define([
|
|
|
90
90
|
throw new Error("Id " + sId + " must not start with reserved " + layer_prefixes[sKey]);
|
|
91
91
|
}
|
|
92
92
|
});
|
|
93
|
-
} else {
|
|
94
|
-
|
|
95
|
-
throw new Error("Id " + sId + " must start with " + sPrefix);
|
|
96
|
-
}
|
|
93
|
+
} else if (!sId.startsWith(sPrefix)) {
|
|
94
|
+
throw new Error("Id " + sId + " must start with " + sPrefix);
|
|
97
95
|
}
|
|
98
96
|
}
|
|
99
97
|
|
|
@@ -275,7 +275,7 @@ sap.ui.define([
|
|
|
275
275
|
* @class Variant model implementation for JSON format.
|
|
276
276
|
* @extends sap.ui.model.json.JSONModel
|
|
277
277
|
* @author SAP SE
|
|
278
|
-
* @version 1.
|
|
278
|
+
* @version 1.97.0
|
|
279
279
|
* @param {object} oData - Either the URL where to load the JSON from or a JS object
|
|
280
280
|
* @param {object} mPropertyBag - Map of properties required for the constructor
|
|
281
281
|
* @param {sap.ui.fl.FlexController} mPropertyBag.flexController - <code>FlexController</code> instance for the component which uses the variant model
|
|
@@ -11,8 +11,7 @@ sap.ui.define([
|
|
|
11
11
|
"sap/m/MessageStrip",
|
|
12
12
|
"sap/ui/core/MessageType",
|
|
13
13
|
"sap/base/util/restricted/_isEqual"
|
|
14
|
-
],
|
|
15
|
-
function (
|
|
14
|
+
], function (
|
|
16
15
|
Controller,
|
|
17
16
|
Fragment,
|
|
18
17
|
WriteStorage,
|
|
@@ -114,6 +113,7 @@ function (
|
|
|
114
113
|
|
|
115
114
|
/**
|
|
116
115
|
* If restricted radio button is selected, then it reveals the hidden selected contexts list.
|
|
116
|
+
* @param {sap.ui.base.Event} oEvent - Event object
|
|
117
117
|
*/
|
|
118
118
|
onSelectRestrictedRadioButton: function(oEvent) {
|
|
119
119
|
oEvent.getSource().setSelected(true);
|
|
@@ -129,6 +129,7 @@ function (
|
|
|
129
129
|
/**
|
|
130
130
|
* Checks if all data is loaded from back end.
|
|
131
131
|
* If not, it retrieves the next chunk from the back end and then updates the model.
|
|
132
|
+
* @returns {Promise} Resolves with additional data
|
|
132
133
|
*/
|
|
133
134
|
_appendDataFromBackend: function() {
|
|
134
135
|
var oRoles = this.oContextsModel.getProperty("/values");
|
|
@@ -143,6 +144,8 @@ function (
|
|
|
143
144
|
* Proxy handler that is called if <code>updateStarted</code> events are fired.
|
|
144
145
|
* Delegates to <code>_appendDataFromBackend</code> in case of a <code>Growing</code> event.
|
|
145
146
|
* <code>Growing</code> events are triggered if the user clicks on <code>More</code> or scrolls down in the <code>Select Contexts</code> list.
|
|
147
|
+
* @param {sap.ui.base.Event} oEvent - Event object
|
|
148
|
+
* @returns {Promise} Resolves with additional data
|
|
146
149
|
*/
|
|
147
150
|
_updateStartedHandler: function(oEvent) {
|
|
148
151
|
if (oEvent.getParameter && oEvent.getParameter("reason") === "Growing") {
|
|
@@ -153,6 +156,8 @@ function (
|
|
|
153
156
|
|
|
154
157
|
/**
|
|
155
158
|
* Retrieves contexts from the back end, then opens a new <code>Select Contexts</code> dialog.
|
|
159
|
+
* @param {object} oDialog - The Select Contexts dialog
|
|
160
|
+
* @returns {Promise} Resolves as soon as the dialog is opened
|
|
156
161
|
*/
|
|
157
162
|
_addContexts: function(oDialog) {
|
|
158
163
|
oDialog.clearSelection();
|
|
@@ -164,6 +169,7 @@ function (
|
|
|
164
169
|
|
|
165
170
|
/**
|
|
166
171
|
* Proxy handler method that calls <code>_addContext</code> if the <code>Select Contexts</code> dialog is not yet opened.
|
|
172
|
+
* @returns {Promise} Resolves as soon as the dialog is opened
|
|
167
173
|
*/
|
|
168
174
|
onAddContextsHandler: function() {
|
|
169
175
|
if (!this._oDialog) {
|
|
@@ -176,6 +182,8 @@ function (
|
|
|
176
182
|
|
|
177
183
|
/**
|
|
178
184
|
* Retrieves filtered data from the back end, then updates the model.
|
|
185
|
+
* @param {sap.ui.base.Event} oEvent - Event object
|
|
186
|
+
* @returns {Promise<object>} The data
|
|
179
187
|
*/
|
|
180
188
|
onSearch: function(oEvent) {
|
|
181
189
|
oEvent.getSource().clearSelection();
|
|
@@ -195,6 +203,7 @@ function (
|
|
|
195
203
|
|
|
196
204
|
/**
|
|
197
205
|
* Removes a single selected context.
|
|
206
|
+
* @param {sap.ui.base.Event} oEvent - Event object
|
|
198
207
|
*/
|
|
199
208
|
onDeleteContext: function(oEvent) {
|
|
200
209
|
var aItems = this.oSelectedContextsModel.getProperty("/selected");
|
|
@@ -217,6 +226,7 @@ function (
|
|
|
217
226
|
|
|
218
227
|
/**
|
|
219
228
|
* Shows or removes error message depending on the input.
|
|
229
|
+
* @param {boolean} bShowError - Whether the error should be shown on the UI
|
|
220
230
|
*/
|
|
221
231
|
showErrorMessage: function(bShowError) {
|
|
222
232
|
var sErrorMessageId = this.getView().getId() + "--noSelectedRolesError";
|