@openui5/sap.ui.rta 1.115.1 → 1.117.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.json +33 -2
- package/.reuse/dep5 +0 -5
- package/THIRDPARTY.txt +1 -7
- package/package.json +6 -6
- package/src/sap/ui/rta/.library +1 -1
- package/src/sap/ui/rta/Client.js +60 -59
- package/src/sap/ui/rta/RuntimeAuthoring.js +256 -254
- package/src/sap/ui/rta/Utils.js +42 -42
- package/src/sap/ui/rta/api/startAdaptation.js +2 -2
- package/src/sap/ui/rta/appVariant/AppVariantDialog.js +3 -3
- package/src/sap/ui/rta/appVariant/AppVariantManager.js +27 -27
- package/src/sap/ui/rta/appVariant/AppVariantUtils.js +100 -103
- package/src/sap/ui/rta/appVariant/Feature.js +75 -77
- package/src/sap/ui/rta/appVariant/S4HanaCloudBackend.js +6 -7
- package/src/sap/ui/rta/appVariant/Utils.js +17 -17
- package/src/sap/ui/rta/appVariant/manageApps/webapp/controller/ManageApps.controller.js +36 -36
- package/src/sap/ui/rta/command/AddIFrame.js +7 -7
- package/src/sap/ui/rta/command/AddProperty.js +7 -7
- package/src/sap/ui/rta/command/AddXML.js +1 -1
- package/src/sap/ui/rta/command/AddXMLAtExtensionPoint.js +7 -7
- package/src/sap/ui/rta/command/AppDescriptorCommand.js +18 -18
- package/src/sap/ui/rta/command/BaseCommand.js +1 -2
- package/src/sap/ui/rta/command/BindProperty.js +1 -1
- package/src/sap/ui/rta/command/Combine.js +1 -1
- package/src/sap/ui/rta/command/CommandFactory.js +11 -11
- package/src/sap/ui/rta/command/CompositeCommand.js +1 -1
- package/src/sap/ui/rta/command/ControlVariantConfigure.js +28 -3
- package/src/sap/ui/rta/command/ControlVariantSave.js +1 -1
- package/src/sap/ui/rta/command/ControlVariantSaveAs.js +26 -24
- package/src/sap/ui/rta/command/ControlVariantSetTitle.js +7 -7
- package/src/sap/ui/rta/command/ControlVariantSwitch.js +11 -11
- package/src/sap/ui/rta/command/CreateContainer.js +2 -2
- package/src/sap/ui/rta/command/CustomAdd.js +1 -1
- package/src/sap/ui/rta/command/FlexCommand.js +30 -30
- package/src/sap/ui/rta/command/LREPSerializer.js +20 -10
- package/src/sap/ui/rta/command/LocalReset.js +1 -1
- package/src/sap/ui/rta/command/Move.js +1 -1
- package/src/sap/ui/rta/command/Property.js +1 -1
- package/src/sap/ui/rta/command/Remove.js +1 -1
- package/src/sap/ui/rta/command/Rename.js +1 -1
- package/src/sap/ui/rta/command/Resize.js +1 -1
- package/src/sap/ui/rta/command/Reveal.js +1 -1
- package/src/sap/ui/rta/command/Settings.js +1 -1
- package/src/sap/ui/rta/command/Split.js +1 -1
- package/src/sap/ui/rta/command/Stack.js +4 -4
- package/src/sap/ui/rta/command/appDescriptor/AddLibrary.js +1 -1
- package/src/sap/ui/rta/command/compVariant/CompVariantContent.js +1 -1
- package/src/sap/ui/rta/command/compVariant/CompVariantSaveAs.js +1 -1
- package/src/sap/ui/rta/command/compVariant/CompVariantSwitch.js +1 -1
- package/src/sap/ui/rta/command/compVariant/CompVariantUpdate.js +1 -1
- package/src/sap/ui/rta/enablement/TestDelegate.js +92 -92
- package/src/sap/ui/rta/enablement/elementActionTest.js +230 -112
- package/src/sap/ui/rta/library.js +2 -2
- package/src/sap/ui/rta/messagebundle.properties +11 -1
- package/src/sap/ui/rta/messagebundle_ar.properties +5 -0
- package/src/sap/ui/rta/messagebundle_bg.properties +5 -0
- package/src/sap/ui/rta/messagebundle_ca.properties +5 -0
- package/src/sap/ui/rta/messagebundle_cs.properties +5 -0
- package/src/sap/ui/rta/messagebundle_cy.properties +5 -0
- package/src/sap/ui/rta/messagebundle_da.properties +5 -0
- package/src/sap/ui/rta/messagebundle_de.properties +6 -1
- package/src/sap/ui/rta/messagebundle_el.properties +5 -0
- package/src/sap/ui/rta/messagebundle_en.properties +5 -0
- package/src/sap/ui/rta/messagebundle_en_GB.properties +5 -0
- package/src/sap/ui/rta/messagebundle_en_US_sappsd.properties +5 -0
- package/src/sap/ui/rta/messagebundle_en_US_saprigi.properties +5 -0
- package/src/sap/ui/rta/messagebundle_en_US_saptrc.properties +6 -1
- package/src/sap/ui/rta/messagebundle_es.properties +5 -0
- package/src/sap/ui/rta/messagebundle_es_MX.properties +5 -0
- package/src/sap/ui/rta/messagebundle_et.properties +5 -0
- package/src/sap/ui/rta/messagebundle_fi.properties +5 -0
- package/src/sap/ui/rta/messagebundle_fr.properties +5 -0
- package/src/sap/ui/rta/messagebundle_fr_CA.properties +5 -0
- package/src/sap/ui/rta/messagebundle_hi.properties +5 -0
- package/src/sap/ui/rta/messagebundle_hr.properties +5 -0
- package/src/sap/ui/rta/messagebundle_hu.properties +5 -0
- package/src/sap/ui/rta/messagebundle_id.properties +5 -0
- package/src/sap/ui/rta/messagebundle_it.properties +5 -0
- package/src/sap/ui/rta/messagebundle_iw.properties +5 -0
- package/src/sap/ui/rta/messagebundle_ja.properties +5 -0
- package/src/sap/ui/rta/messagebundle_kk.properties +5 -0
- package/src/sap/ui/rta/messagebundle_ko.properties +5 -0
- package/src/sap/ui/rta/messagebundle_lt.properties +5 -0
- package/src/sap/ui/rta/messagebundle_lv.properties +5 -0
- package/src/sap/ui/rta/messagebundle_ms.properties +5 -0
- package/src/sap/ui/rta/messagebundle_nl.properties +5 -0
- package/src/sap/ui/rta/messagebundle_no.properties +5 -0
- package/src/sap/ui/rta/messagebundle_pl.properties +5 -0
- package/src/sap/ui/rta/messagebundle_pt.properties +5 -0
- package/src/sap/ui/rta/messagebundle_pt_PT.properties +5 -0
- package/src/sap/ui/rta/messagebundle_ro.properties +5 -0
- package/src/sap/ui/rta/messagebundle_ru.properties +5 -0
- package/src/sap/ui/rta/messagebundle_sh.properties +5 -0
- package/src/sap/ui/rta/messagebundle_sk.properties +5 -0
- package/src/sap/ui/rta/messagebundle_sl.properties +5 -0
- package/src/sap/ui/rta/messagebundle_sv.properties +5 -0
- package/src/sap/ui/rta/messagebundle_th.properties +5 -0
- package/src/sap/ui/rta/messagebundle_tr.properties +5 -0
- package/src/sap/ui/rta/messagebundle_uk.properties +5 -0
- package/src/sap/ui/rta/messagebundle_vi.properties +5 -0
- package/src/sap/ui/rta/messagebundle_zh_CN.properties +5 -0
- package/src/sap/ui/rta/messagebundle_zh_TW.properties +5 -0
- package/src/sap/ui/rta/plugin/AddXMLAtExtensionPoint.js +44 -44
- package/src/sap/ui/rta/plugin/BaseCreate.js +29 -29
- package/src/sap/ui/rta/plugin/Combine.js +9 -9
- package/src/sap/ui/rta/plugin/ControlVariant.js +21 -21
- package/src/sap/ui/rta/plugin/CreateContainer.js +6 -6
- package/src/sap/ui/rta/plugin/CutPaste.js +46 -46
- package/src/sap/ui/rta/plugin/DragDrop.js +2 -2
- package/src/sap/ui/rta/plugin/EasyAdd.js +4 -4
- package/src/sap/ui/rta/plugin/EasyRemove.js +5 -5
- package/src/sap/ui/rta/plugin/LocalReset.js +25 -25
- package/src/sap/ui/rta/plugin/Plugin.js +20 -20
- package/src/sap/ui/rta/plugin/RTAElementMover.js +42 -42
- package/src/sap/ui/rta/plugin/Remove.js +11 -11
- package/src/sap/ui/rta/plugin/Rename.js +7 -7
- package/src/sap/ui/rta/plugin/RenameHandler.js +17 -17
- package/src/sap/ui/rta/plugin/Resize.js +62 -62
- package/src/sap/ui/rta/plugin/Selection.js +14 -14
- package/src/sap/ui/rta/plugin/Settings.js +20 -20
- package/src/sap/ui/rta/plugin/Split.js +7 -7
- package/src/sap/ui/rta/plugin/Stretch.js +4 -4
- package/src/sap/ui/rta/plugin/additionalElements/ActionExtractor.js +94 -87
- package/src/sap/ui/rta/plugin/additionalElements/AddElementsDialog.js +18 -18
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsAnalyzer.js +98 -99
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsPlugin.js +144 -144
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsUtils.js +3 -4
- package/src/sap/ui/rta/plugin/additionalElements/CommandBuilder.js +67 -67
- package/src/sap/ui/rta/plugin/iframe/AddIFrame.js +38 -39
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.fragment.xml +1 -0
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.js +29 -29
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialogController.js +5 -5
- package/src/sap/ui/rta/plugin/iframe/urlCleaner.js +1 -1
- package/src/sap/ui/rta/service/Action.js +36 -37
- package/src/sap/ui/rta/service/ControllerExtension.js +4 -4
- package/src/sap/ui/rta/service/Outline.js +59 -59
- package/src/sap/ui/rta/service/Property.js +125 -125
- package/src/sap/ui/rta/service/Receiver.js +78 -77
- package/src/sap/ui/rta/service/Selection.js +6 -6
- package/src/sap/ui/rta/service/SupportTools.js +188 -37
- package/src/sap/ui/rta/service/index.js +1 -1
- package/src/sap/ui/rta/themes/base/FlexSupportExtension.less +14 -0
- package/src/sap/ui/rta/themes/base/library.source.less +2 -1
- package/src/sap/ui/rta/toolbar/Adaptation.js +81 -26
- package/src/sap/ui/rta/toolbar/AdaptationRenderer.js +1 -1
- package/src/sap/ui/rta/toolbar/Base.js +17 -15
- package/src/sap/ui/rta/toolbar/BaseRenderer.js +1 -2
- package/src/sap/ui/rta/toolbar/Fiori.js +8 -8
- package/src/sap/ui/rta/toolbar/FioriLike.js +1 -1
- package/src/sap/ui/rta/toolbar/OverflowToolbarButton.js +4 -4
- package/src/sap/ui/rta/toolbar/Personalization.js +2 -2
- package/src/sap/ui/rta/toolbar/Standalone.js +1 -1
- package/src/sap/ui/rta/toolbar/contextBased/ManageAdaptations.js +13 -6
- package/src/sap/ui/rta/toolbar/contextBased/ManageAdaptationsDialog.fragment.xml +2 -8
- package/src/sap/ui/rta/toolbar/contextBased/SaveAsAdaptation.js +2 -3
- package/src/sap/ui/rta/toolbar/contextBased/SaveAsAdaptationDialog.fragment.xml +0 -2
- package/src/sap/ui/rta/toolbar/translation/Translation.js +41 -41
- package/src/sap/ui/rta/toolbar/versioning/Versioning.js +9 -9
- package/src/sap/ui/rta/util/Animation.js +5 -5
- package/src/sap/ui/rta/util/BindingsExtractor.js +33 -33
- package/src/sap/ui/rta/util/PluginManager.js +25 -25
- package/src/sap/ui/rta/util/PopupManager.js +27 -27
- package/src/sap/ui/rta/util/ReloadManager.js +1 -1
- package/src/sap/ui/rta/util/ServiceEventBus.js +3 -4
- package/src/sap/ui/rta/util/StylesLoader.js +9 -9
- package/src/sap/ui/rta/util/UrlParser.js +19 -19
- package/src/sap/ui/rta/util/adaptationStarter.js +34 -31
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicator.js +23 -19
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorRegistry.js +61 -61
- package/src/sap/ui/rta/util/changeVisualization/ChangeVisualization.js +76 -63
- package/src/sap/ui/rta/util/changeVisualization/commands/CombineVisualization.js +6 -6
- package/src/sap/ui/rta/util/changeVisualization/commands/CreateContainerVisualization.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/commands/SplitVisualization.js +1 -1
- package/src/sap/ui/rta/util/hasStableId.js +2 -2
- package/src/sap/ui/rta/util/showMessageBox.js +4 -5
- package/src/sap/ui/rta/util/validateFlexEnabled.js +5 -5
- package/src/sap/ui/rta/util/validateStableIds.js +8 -8
- package/ui5.yaml +1 -1
|
@@ -40,12 +40,12 @@ sap.ui.define([
|
|
|
40
40
|
var vBinding;
|
|
41
41
|
if (bAbsoluteAggregationBinding) {
|
|
42
42
|
vBinding = oElement.getBindingInfo(sAggregationName, sModelName);
|
|
43
|
-
//check to be model binding otherwise return undefined
|
|
43
|
+
// check to be model binding otherwise return undefined
|
|
44
44
|
if (typeof vBinding.model === "string" && vBinding.model !== sModelName) {
|
|
45
45
|
vBinding = undefined;
|
|
46
46
|
}
|
|
47
47
|
} else {
|
|
48
|
-
//here we explicitly request the models binding context
|
|
48
|
+
// here we explicitly request the models binding context
|
|
49
49
|
vBinding = oElement.getBindingContext(sModelName);
|
|
50
50
|
}
|
|
51
51
|
return vBinding;
|
|
@@ -61,8 +61,8 @@ sap.ui.define([
|
|
|
61
61
|
function _flattenProperties(aProperties) {
|
|
62
62
|
var aFlattenedProperties = aProperties.reduce(function(aFlattened, oProperty) {
|
|
63
63
|
if (Array.isArray(oProperty.properties)) {
|
|
64
|
-
//currently only one level supported by our dialogs, etc. => TODO make deep types possible
|
|
65
|
-
//Only take the leaves, but attach the parent property name/label to it
|
|
64
|
+
// currently only one level supported by our dialogs, etc. => TODO make deep types possible
|
|
65
|
+
// Only take the leaves, but attach the parent property name/label to it
|
|
66
66
|
aFlattened = aFlattened.concat(oProperty.properties.map(function(mInnerProp) {
|
|
67
67
|
mInnerProp.parentPropertyName = oProperty.label || oProperty.name;
|
|
68
68
|
return mInnerProp;
|
|
@@ -83,7 +83,7 @@ sap.ui.define([
|
|
|
83
83
|
payload: mAction.delegateInfo.payload || {}
|
|
84
84
|
};
|
|
85
85
|
return mAction.delegateInfo.delegate.getPropertyInfo(mPropertyBag)
|
|
86
|
-
|
|
86
|
+
.then(_flattenProperties.bind(null));
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
function getAllPropertiesFromDelegate(oElement, sAggregationName) {
|
|
@@ -111,20 +111,20 @@ sap.ui.define([
|
|
|
111
111
|
} else {
|
|
112
112
|
fnGetAllProperties = getAllPropertiesFromDelegate.bind(null, oElement, sAggregationName);
|
|
113
113
|
}
|
|
114
|
-
return fnGetAllProperties() //arguments bound before
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
114
|
+
return fnGetAllProperties() // arguments bound before
|
|
115
|
+
.then(function(aProperties) {
|
|
116
|
+
return _checkForDuplicateProperties(aProperties);
|
|
117
|
+
});
|
|
118
118
|
}
|
|
119
119
|
|
|
120
120
|
function _filterUnsupportedProperties(aProperties) {
|
|
121
121
|
return aProperties.filter(function(mProperty) {
|
|
122
|
-
//see _enrichProperty
|
|
122
|
+
// see _enrichProperty
|
|
123
123
|
return !(mProperty.unsupported || mProperty.hideFromReveal);
|
|
124
124
|
});
|
|
125
125
|
}
|
|
126
126
|
|
|
127
|
-
function _oPropertyToAdditionalElementInfo
|
|
127
|
+
function _oPropertyToAdditionalElementInfo(oProperty) {
|
|
128
128
|
return {
|
|
129
129
|
selected: false,
|
|
130
130
|
label: oProperty.label || oProperty.name,
|
|
@@ -132,7 +132,7 @@ sap.ui.define([
|
|
|
132
132
|
duplicateName: oProperty.duplicateName ? oProperty.duplicateName : false,
|
|
133
133
|
tooltip: oProperty.tooltip || oProperty.label,
|
|
134
134
|
originalLabel: "",
|
|
135
|
-
//command relevant data
|
|
135
|
+
// command relevant data
|
|
136
136
|
type: "delegate",
|
|
137
137
|
entityType: oProperty.entityType,
|
|
138
138
|
name: oProperty.name,
|
|
@@ -140,7 +140,7 @@ sap.ui.define([
|
|
|
140
140
|
};
|
|
141
141
|
}
|
|
142
142
|
|
|
143
|
-
function _elementToAdditionalElementInfo
|
|
143
|
+
function _elementToAdditionalElementInfo(mData) {
|
|
144
144
|
var oElement = mData.element;
|
|
145
145
|
var mAction = mData.action;
|
|
146
146
|
return {
|
|
@@ -150,8 +150,8 @@ sap.ui.define([
|
|
|
150
150
|
parentPropertyName: oElement.__parentPropertyName ? oElement.__parentPropertyName : "",
|
|
151
151
|
duplicateName: oElement.__duplicateName ? oElement.__duplicateName : false,
|
|
152
152
|
originalLabel: oElement.__renamedLabel && oElement.__label !== oElement.__originalLabel ? oElement.__originalLabel : "",
|
|
153
|
-
bindingPath: oElement.__bindingPath, //used for OPA tests and debugging
|
|
154
|
-
//command relevant data
|
|
153
|
+
bindingPath: oElement.__bindingPath, // used for OPA tests and debugging
|
|
154
|
+
// command relevant data
|
|
155
155
|
type: "invisible",
|
|
156
156
|
elementId: oElement.getId(),
|
|
157
157
|
sourceAggregation: mData.sourceAggregation
|
|
@@ -175,22 +175,22 @@ sap.ui.define([
|
|
|
175
175
|
var sRelevantContainerBindingContext = _getBindingContextPath(oElement, sAggregationName, sModelName);
|
|
176
176
|
|
|
177
177
|
return ElementUtil
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
178
|
+
.findAllSiblingsInContainer(oElement, oRelevantContainer)
|
|
179
|
+
// We accept only siblings that are bound on the same model
|
|
180
|
+
.filter(function(oSiblingElement) {
|
|
181
|
+
return sRelevantContainerBindingContext === _getBindingContextPath(oSiblingElement, sAggregationName, sModelName);
|
|
182
|
+
});
|
|
183
183
|
}
|
|
184
184
|
return [oElement];
|
|
185
185
|
}
|
|
186
186
|
|
|
187
187
|
function _checkForDuplicateProperties(aProperties) {
|
|
188
188
|
aProperties.forEach(function(oModelProperty, index, aProperties) {
|
|
189
|
-
if (oModelProperty
|
|
189
|
+
if (oModelProperty.duplicateName !== true) {
|
|
190
190
|
for (var j = index + 1; j < aProperties.length - 1; j++) {
|
|
191
191
|
if (oModelProperty.label === aProperties[j].label) {
|
|
192
|
-
oModelProperty
|
|
193
|
-
aProperties[j]
|
|
192
|
+
oModelProperty.duplicateName = true;
|
|
193
|
+
aProperties[j].duplicateName = true;
|
|
194
194
|
}
|
|
195
195
|
}
|
|
196
196
|
}
|
|
@@ -198,7 +198,7 @@ sap.ui.define([
|
|
|
198
198
|
return aProperties;
|
|
199
199
|
}
|
|
200
200
|
|
|
201
|
-
//check for duplicate labels to later add the parent property name/label if available
|
|
201
|
+
// check for duplicate labels to later add the parent property name/label if available
|
|
202
202
|
function _checkForDuplicateLabels(oInvisibleElement, aProperties) {
|
|
203
203
|
return aProperties.some(function(oModelProperty) {
|
|
204
204
|
return oModelProperty.label === oInvisibleElement.__label;
|
|
@@ -227,31 +227,31 @@ sap.ui.define([
|
|
|
227
227
|
*/
|
|
228
228
|
function _findModelProperty(aControlsBindingPaths, aProperties) {
|
|
229
229
|
return aProperties
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|| sBindingPath.startsWith(oModelProperty.bindingPath +
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
230
|
+
.sort(function(oProperty1, oProperty2) {
|
|
231
|
+
// Temporary fix to avoid evaluating technical properties like RAP feature
|
|
232
|
+
// control flags, might lead to problems if multiple value bindings exist
|
|
233
|
+
// on a hidden control
|
|
234
|
+
return !!oProperty2.hideFromReveal - !!oProperty1.hideFromReveal;
|
|
235
|
+
})
|
|
236
|
+
.filter(function(oModelProperty) {
|
|
237
|
+
return aControlsBindingPaths.some(function(sBindingPath) {
|
|
238
|
+
// there might be some deeper binding paths available on controls,
|
|
239
|
+
// than returned by the model evaluation (e.g. navigation property paths)
|
|
240
|
+
// in this case we only check if the navigation path is valid
|
|
241
|
+
// unsupported: check existence of the property also in the navigation target
|
|
242
|
+
return (
|
|
243
|
+
sBindingPath === oModelProperty.bindingPath
|
|
244
|
+
|| sBindingPath.startsWith(oModelProperty.bindingPath + "/")
|
|
245
|
+
);
|
|
246
|
+
});
|
|
247
|
+
})
|
|
248
|
+
.pop();
|
|
249
249
|
}
|
|
250
250
|
|
|
251
251
|
function _vBindingToPath(vBinding) {
|
|
252
252
|
return (
|
|
253
253
|
isPlainObject(vBinding)
|
|
254
|
-
? vBinding.parts[0].path //TODO what about complex bindings with multiple paths, this was not covered so far?
|
|
254
|
+
? vBinding.parts[0].path // TODO what about complex bindings with multiple paths, this was not covered so far?
|
|
255
255
|
: !!vBinding.getPath && vBinding.getPath()
|
|
256
256
|
);
|
|
257
257
|
}
|
|
@@ -284,7 +284,7 @@ sap.ui.define([
|
|
|
284
284
|
return _getRepresentedPropertiesFromDelegate(mAction, sAggregationName)
|
|
285
285
|
.then(function(aRepresentedProperties) {
|
|
286
286
|
if (aRepresentedProperties === undefined) {
|
|
287
|
-
//delegate skipped taking over => evaluate binding
|
|
287
|
+
// delegate skipped taking over => evaluate binding
|
|
288
288
|
return _getRepresentedBindingPathsFromBinding(oElement, mAction, sModelName, sAggregationName);
|
|
289
289
|
}
|
|
290
290
|
var aBindingPaths = [];
|
|
@@ -295,7 +295,6 @@ sap.ui.define([
|
|
|
295
295
|
});
|
|
296
296
|
}
|
|
297
297
|
|
|
298
|
-
|
|
299
298
|
function _getRepresentedBindingPaths(oElement, mAction, sModelName, sAggregationName) {
|
|
300
299
|
return Promise.resolve().then(function() {
|
|
301
300
|
var bHasDelegateAndGetRepresentedProperties = !!ObjectPath.get("delegateInfo.delegate.getRepresentedProperties", mAction);
|
|
@@ -320,7 +319,7 @@ sap.ui.define([
|
|
|
320
319
|
|
|
321
320
|
oInvisibleElement.__tooltip = mSomeItem.tooltip;
|
|
322
321
|
|
|
323
|
-
//found element
|
|
322
|
+
// found element
|
|
324
323
|
oInvisibleElement.__bindingPath = mSomeItem.name;
|
|
325
324
|
|
|
326
325
|
// oInvisibleElement.__label has the current label retrieved before in the analysis
|
|
@@ -345,7 +344,7 @@ sap.ui.define([
|
|
|
345
344
|
aRepresentedProperties.some(function(oProperty) {
|
|
346
345
|
if (oProperty.id === oInvisibleElement.getId()) {
|
|
347
346
|
oRepresentedProperty = oProperty;
|
|
348
|
-
return true; //skip processing
|
|
347
|
+
return true; // skip processing
|
|
349
348
|
}
|
|
350
349
|
});
|
|
351
350
|
return oRepresentedProperty.bindingPaths || [];
|
|
@@ -416,8 +415,8 @@ sap.ui.define([
|
|
|
416
415
|
}
|
|
417
416
|
|
|
418
417
|
function _getModelName(mAddViaDelegate) {
|
|
419
|
-
//ManagedObject jsdoc tells to use undefined for default model, therefore it
|
|
420
|
-
//is necessary to return undefined if modelName or whole delegateInfo is missing
|
|
418
|
+
// ManagedObject jsdoc tells to use undefined for default model, therefore it
|
|
419
|
+
// is necessary to return undefined if modelName or whole delegateInfo is missing
|
|
421
420
|
return ObjectPath.get("delegateInfo.payload.modelName", mAddViaDelegate);
|
|
422
421
|
}
|
|
423
422
|
|
|
@@ -442,33 +441,33 @@ sap.ui.define([
|
|
|
442
441
|
_getAllPropertiesFromModels(oElement, sAggregationName, mActions),
|
|
443
442
|
_getRepresentedBindingPathsFromDelegateIfAvailable(mAddViaDelegate, sAggregationName)
|
|
444
443
|
])
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
});
|
|
467
|
-
return aAllElementData;
|
|
468
|
-
})
|
|
469
|
-
.then(function(aAllElementData) {
|
|
470
|
-
return aAllElementData.map(_elementToAdditionalElementInfo);
|
|
444
|
+
.then(function(args) {
|
|
445
|
+
var aProperties = args[0];
|
|
446
|
+
var aRepresentedProperties = args[1];
|
|
447
|
+
var aAllElementData = [];
|
|
448
|
+
var aInvisibleElements = mRevealData.elements || [];
|
|
449
|
+
|
|
450
|
+
aInvisibleElements.forEach(function(mInvisibleElement) {
|
|
451
|
+
var oInvisibleElement = mInvisibleElement.element;
|
|
452
|
+
var mRevealAction = mInvisibleElement.action;
|
|
453
|
+
|
|
454
|
+
oInvisibleElement.__label = ElementUtil.getLabelForElement(oInvisibleElement, mRevealAction.getLabel);
|
|
455
|
+
|
|
456
|
+
var bIncludeElement = _enhanceByMetadata(oElement, sAggregationName, oInvisibleElement, mActions, aRepresentedProperties, aProperties);
|
|
457
|
+
|
|
458
|
+
if (bIncludeElement) {
|
|
459
|
+
aAllElementData.push({
|
|
460
|
+
element: oInvisibleElement,
|
|
461
|
+
action: mRevealAction,
|
|
462
|
+
sourceAggregation: mInvisibleElement.sourceAggregation
|
|
463
|
+
});
|
|
464
|
+
}
|
|
471
465
|
});
|
|
466
|
+
return aAllElementData;
|
|
467
|
+
})
|
|
468
|
+
.then(function(aAllElementData) {
|
|
469
|
+
return aAllElementData.map(_elementToAdditionalElementInfo);
|
|
470
|
+
});
|
|
472
471
|
},
|
|
473
472
|
|
|
474
473
|
/**
|
|
@@ -479,7 +478,7 @@ sap.ui.define([
|
|
|
479
478
|
*
|
|
480
479
|
* @return {Promise} - returns a Promise which resolves with a list of available to display delegate properties
|
|
481
480
|
*/
|
|
482
|
-
getUnrepresentedDelegateProperties: function
|
|
481
|
+
getUnrepresentedDelegateProperties: function(oElement, mAction) {
|
|
483
482
|
var sModelName = _getModelName(mAction);
|
|
484
483
|
var oDefaultAggregation = oElement.getMetadata().getAggregation();
|
|
485
484
|
var sAggregationName = oDefaultAggregation ? oDefaultAggregation.name : mAction.action.aggregation;
|
|
@@ -487,29 +486,29 @@ sap.ui.define([
|
|
|
487
486
|
_getAllPropertiesFromAddViaDelegateAction(oElement, sAggregationName, mAction),
|
|
488
487
|
_getRepresentedBindingPaths(oElement, mAction, sModelName, sAggregationName)
|
|
489
488
|
])
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
});
|
|
506
|
-
|
|
507
|
-
aUnrepresentedProperties = _checkForDuplicateProperties(aUnrepresentedProperties);
|
|
508
|
-
|
|
509
|
-
return aUnrepresentedProperties;
|
|
510
|
-
}).then(function(aUnrepresentedProperties) {
|
|
511
|
-
return aUnrepresentedProperties.map(_oPropertyToAdditionalElementInfo);
|
|
489
|
+
.then(function(args) {
|
|
490
|
+
var aAllProperties = args[0];
|
|
491
|
+
var aRepresentedBindingPaths = args[1];
|
|
492
|
+
|
|
493
|
+
var fnFilter = mAction.action.filter ? mAction.action.filter : function() {return true;};
|
|
494
|
+
|
|
495
|
+
var aUnrepresentedProperties = _filterUnsupportedProperties(aAllProperties);
|
|
496
|
+
aUnrepresentedProperties = aUnrepresentedProperties.filter(function(oModelProperty) {
|
|
497
|
+
var bIsRepresented = false;
|
|
498
|
+
if (aRepresentedBindingPaths) {
|
|
499
|
+
bIsRepresented = aRepresentedBindingPaths.some(function(sBindingPath) {
|
|
500
|
+
return sBindingPath === oModelProperty.bindingPath;
|
|
501
|
+
});
|
|
502
|
+
}
|
|
503
|
+
return !bIsRepresented && fnFilter(mAction.relevantContainer, oModelProperty);
|
|
512
504
|
});
|
|
505
|
+
|
|
506
|
+
aUnrepresentedProperties = _checkForDuplicateProperties(aUnrepresentedProperties);
|
|
507
|
+
|
|
508
|
+
return aUnrepresentedProperties;
|
|
509
|
+
}).then(function(aUnrepresentedProperties) {
|
|
510
|
+
return aUnrepresentedProperties.map(_oPropertyToAdditionalElementInfo);
|
|
511
|
+
});
|
|
513
512
|
}
|
|
514
513
|
};
|
|
515
514
|
return oAnalyzer;
|