@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
|
@@ -28,7 +28,7 @@ sap.ui.define([
|
|
|
28
28
|
* @author SAP SE
|
|
29
29
|
* @experimental Since 1.58
|
|
30
30
|
* @since 1.58
|
|
31
|
-
* @version 1.
|
|
31
|
+
* @version 1.117.0
|
|
32
32
|
* @private
|
|
33
33
|
* @ui5-restricted
|
|
34
34
|
*/
|
|
@@ -92,7 +92,7 @@ sap.ui.define([
|
|
|
92
92
|
* @return {object} Object containing properties, annotations, label and name
|
|
93
93
|
* @private
|
|
94
94
|
*/
|
|
95
|
-
oProperty._getDesignTimeProperties = function
|
|
95
|
+
oProperty._getDesignTimeProperties = function(sControlId) {
|
|
96
96
|
var oOverlay = OverlayRegistry.getOverlay(sControlId);
|
|
97
97
|
// if overlay could not be found
|
|
98
98
|
if (!oOverlay) {
|
|
@@ -117,16 +117,16 @@ sap.ui.define([
|
|
|
117
117
|
oProperty._getResolvedLinks(oDesignTimeMetadataData.links, oElement)
|
|
118
118
|
]
|
|
119
119
|
)
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
120
|
+
.then(function(aPromiseResults) {
|
|
121
|
+
return Object.assign(
|
|
122
|
+
{},
|
|
123
|
+
aPromiseResults[0] && !isEmptyObject(aPromiseResults[0]) && {annotations: aPromiseResults[0]},
|
|
124
|
+
aPromiseResults[1] && {properties: aPromiseResults[1]},
|
|
125
|
+
aPromiseResults[2] && {label: validate(aPromiseResults[2])},
|
|
126
|
+
oDesignTimeMetadataData.name && {name: oDesignTimeMetadata.getName(oElement)},
|
|
127
|
+
!isEmptyObject(aPromiseResults[3]) && {links: aPromiseResults[3]}
|
|
128
|
+
);
|
|
129
|
+
});
|
|
130
130
|
};
|
|
131
131
|
|
|
132
132
|
/**
|
|
@@ -140,75 +140,75 @@ sap.ui.define([
|
|
|
140
140
|
* @return {object} Promise resolving to an object containing all properties consolidated
|
|
141
141
|
* @private
|
|
142
142
|
*/
|
|
143
|
-
oProperty._getConsolidatedProperties = function
|
|
143
|
+
oProperty._getConsolidatedProperties = function(vDtProperties, mMetadataObj, oElement) {
|
|
144
144
|
var mFilteredMetadataObject = Object.keys(mMetadataObj)
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
145
|
+
.reduce(function(mFiltered, sKey) {
|
|
146
|
+
mFiltered[sKey] = {
|
|
147
|
+
value: validate(oElement.getProperty(sKey)),
|
|
148
|
+
virtual: false,
|
|
149
|
+
type: mMetadataObj[sKey].type,
|
|
150
|
+
name: mMetadataObj[sKey].name,
|
|
151
|
+
ignore: false, // default value, might be overwritten below if required by designtime metadata
|
|
152
|
+
group: mMetadataObj[sKey].group,
|
|
153
|
+
deprecated: mMetadataObj[sKey].deprecated,
|
|
154
|
+
defaultValue: mMetadataObj[sKey].defaultValue,
|
|
155
|
+
visibility: mMetadataObj[sKey].visibility
|
|
156
|
+
};
|
|
157
|
+
var mBindingInfo = oProperty._getBindingInfo(sKey, oElement);
|
|
158
|
+
Object.assign(
|
|
159
|
+
mFiltered[sKey],
|
|
160
|
+
mBindingInfo && {binding: mBindingInfo}
|
|
161
|
+
);
|
|
162
|
+
return mFiltered;
|
|
163
|
+
}, {});
|
|
164
164
|
|
|
165
165
|
return oProperty._getResolvedFunction(vDtProperties, oElement)
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
166
|
+
.then(function(mDtObj) {
|
|
167
|
+
return Promise.all(
|
|
168
|
+
// for each property in the mDtObj.properties a promise is returned
|
|
169
|
+
Object.keys(mDtObj)
|
|
170
|
+
.map(function(sKey) {
|
|
171
|
+
return oProperty._getResolvedFunction(mDtObj[sKey].ignore, oElement)
|
|
172
|
+
.then(function(bIgnore) {
|
|
173
|
+
if (typeof bIgnore !== "boolean") {
|
|
174
|
+
throw DtUtil.createError(
|
|
175
|
+
"services.Property#get",
|
|
176
|
+
"Invalid ignore property value found in designtime for element with id " + oElement.getId() + " .", "sap.ui.rta"
|
|
177
|
+
);
|
|
178
|
+
}
|
|
179
179
|
|
|
180
|
-
|
|
180
|
+
var mResult = {};
|
|
181
181
|
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
182
|
+
// ensure ignore function is replaced by a boolean value
|
|
183
|
+
if (!mFilteredMetadataObject[sKey]) {
|
|
184
|
+
// if not available in control metadata
|
|
185
|
+
if (mDtObj[sKey].virtual === true) {
|
|
186
|
+
// virtual properties
|
|
187
|
+
mResult = oProperty._getEvaluatedVirtualProperty(mDtObj, sKey, oElement, bIgnore);
|
|
188
|
+
} else {
|
|
189
|
+
// dt-metadata properties
|
|
190
|
+
mResult[sKey] = {
|
|
191
|
+
value: validate(_omit(mDtObj[sKey], "ignore")),
|
|
192
|
+
virtual: false,
|
|
193
|
+
ignore: bIgnore
|
|
194
|
+
};
|
|
195
|
+
}
|
|
196
|
+
} else {
|
|
197
|
+
mResult[sKey] = {
|
|
198
|
+
ignore: bIgnore
|
|
199
|
+
};
|
|
200
|
+
}
|
|
201
201
|
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
202
|
+
return mResult;
|
|
203
|
+
});
|
|
204
|
+
})
|
|
205
|
+
);
|
|
206
|
+
})
|
|
207
|
+
.then(function(aFilteredResults) {
|
|
208
|
+
return aFilteredResults.reduce(function(mConsolidatedObject, oFilteredResult) {
|
|
209
|
+
return merge(mConsolidatedObject, oFilteredResult);
|
|
210
|
+
}, mFilteredMetadataObject);
|
|
211
|
+
});
|
|
212
212
|
};
|
|
213
213
|
|
|
214
214
|
/**
|
|
@@ -237,16 +237,16 @@ sap.ui.define([
|
|
|
237
237
|
|
|
238
238
|
// evaluate possibleValues
|
|
239
239
|
return oProperty._getResolvedFunction(mDtObj[sPropertyName].possibleValues, oElement)
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
240
|
+
.then(function(vPossibleValues) {
|
|
241
|
+
Object.assign(
|
|
242
|
+
mEvaluatedProperty[sPropertyName],
|
|
243
|
+
mBindingInfo && {binding: mBindingInfo},
|
|
244
|
+
vPossibleValues && {possibleValues: validate(vPossibleValues)},
|
|
245
|
+
typeof mDtObj[sPropertyName].nullable === "boolean" && {nullable: mDtObj[sPropertyName].nullable} // nullable property
|
|
246
|
+
);
|
|
247
247
|
|
|
248
|
-
|
|
249
|
-
|
|
248
|
+
return mEvaluatedProperty;
|
|
249
|
+
});
|
|
250
250
|
};
|
|
251
251
|
|
|
252
252
|
/**
|
|
@@ -259,39 +259,39 @@ sap.ui.define([
|
|
|
259
259
|
* @return {Promise} Promise resolving to an object containing all annotations consolidated
|
|
260
260
|
* @private
|
|
261
261
|
*/
|
|
262
|
-
oProperty._getConsolidatedAnnotations = function
|
|
262
|
+
oProperty._getConsolidatedAnnotations = function(mDtObj, oElement) {
|
|
263
263
|
return Promise.all(
|
|
264
264
|
Object.keys(mDtObj)
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
}
|
|
284
|
-
return mFiltered;
|
|
285
|
-
});
|
|
265
|
+
.map(function(sKey) {
|
|
266
|
+
return oProperty._getResolvedFunction(mDtObj[sKey].ignore, oElement)
|
|
267
|
+
.then(function(bIgnore) {
|
|
268
|
+
var mFiltered = {};
|
|
269
|
+
if (typeof bIgnore !== "boolean" && typeof bIgnore !== "undefined") {
|
|
270
|
+
throw DtUtil.createError(
|
|
271
|
+
"services.Property#get",
|
|
272
|
+
"Invalid ignore property value found in designtime for element with id " + oElement.getId() + " .", "sap.ui.rta"
|
|
273
|
+
);
|
|
274
|
+
}
|
|
275
|
+
// to ensure ignore function is replaced by a boolean value
|
|
276
|
+
mDtObj[sKey].ignore = bIgnore;
|
|
277
|
+
if (!bIgnore) {
|
|
278
|
+
mFiltered[sKey] = Object.assign({}, mDtObj[sKey]);
|
|
279
|
+
return oProperty._getResolvedLinks(mFiltered[sKey].links, oElement)
|
|
280
|
+
.then(function(mLinks) {
|
|
281
|
+
if (!isEmptyObject(mLinks)) {
|
|
282
|
+
mFiltered[sKey].links = mLinks;
|
|
286
283
|
}
|
|
284
|
+
return mFiltered;
|
|
287
285
|
});
|
|
288
|
-
|
|
286
|
+
}
|
|
287
|
+
});
|
|
288
|
+
})
|
|
289
289
|
)
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
290
|
+
.then(function(aFilteredResults) {
|
|
291
|
+
return aFilteredResults.reduce(function(mConsolidatedObject, oFilteredResult) {
|
|
292
|
+
return Object.assign(mConsolidatedObject, oFilteredResult);
|
|
293
|
+
}, {});
|
|
294
|
+
});
|
|
295
295
|
};
|
|
296
296
|
|
|
297
297
|
/**
|
|
@@ -315,30 +315,30 @@ sap.ui.define([
|
|
|
315
315
|
* @return {Promise} Promise resolving to links map
|
|
316
316
|
* @private
|
|
317
317
|
*/
|
|
318
|
-
oProperty._getResolvedLinks = function
|
|
318
|
+
oProperty._getResolvedLinks = function(mLinks, oElement) {
|
|
319
319
|
var aTextPromises = [];
|
|
320
320
|
var mResolvedLinks = Object.assign({}, mLinks);
|
|
321
321
|
|
|
322
|
-
Object.keys(mResolvedLinks).forEach(function
|
|
322
|
+
Object.keys(mResolvedLinks).forEach(function(sLinkName) {
|
|
323
323
|
if (Array.isArray(mResolvedLinks[sLinkName])) {
|
|
324
|
-
mResolvedLinks[sLinkName].forEach(function
|
|
324
|
+
mResolvedLinks[sLinkName].forEach(function(oLink) {
|
|
325
325
|
aTextPromises.push(
|
|
326
|
-
DtUtil.wrapIntoPromise(function
|
|
326
|
+
DtUtil.wrapIntoPromise(function() {
|
|
327
327
|
if (typeof oLink.text === "function") {
|
|
328
328
|
return oLink.text(oElement);
|
|
329
329
|
}
|
|
330
330
|
})(oLink)
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
331
|
+
.then(function(sLinkText) {
|
|
332
|
+
oLink.text = validate(sLinkText || oLink.text);
|
|
333
|
+
})
|
|
334
334
|
);
|
|
335
335
|
});
|
|
336
336
|
}
|
|
337
337
|
});
|
|
338
338
|
return Promise.all(aTextPromises)
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
339
|
+
.then(function() {
|
|
340
|
+
return mResolvedLinks;
|
|
341
|
+
});
|
|
342
342
|
};
|
|
343
343
|
|
|
344
344
|
/**
|
|
@@ -350,7 +350,7 @@ sap.ui.define([
|
|
|
350
350
|
* @return {object} Object containing the binding information
|
|
351
351
|
* @private
|
|
352
352
|
*/
|
|
353
|
-
oProperty._getBindingInfo = function
|
|
353
|
+
oProperty._getBindingInfo = function(sKey, oElement) {
|
|
354
354
|
var mPropertyBindingInfo = oElement.getBindingInfo(sKey);
|
|
355
355
|
if (!mPropertyBindingInfo) {
|
|
356
356
|
return;
|
|
@@ -395,8 +395,8 @@ sap.ui.define([
|
|
|
395
395
|
* @return {Promise} Promise resolving to the property value
|
|
396
396
|
* @private
|
|
397
397
|
*/
|
|
398
|
-
oProperty._getResolvedFunction = function
|
|
399
|
-
return DtUtil.wrapIntoPromise(function
|
|
398
|
+
oProperty._getResolvedFunction = function(vProperty, oElement) {
|
|
399
|
+
return DtUtil.wrapIntoPromise(function() {
|
|
400
400
|
return typeof vProperty === "function"
|
|
401
401
|
? (vProperty(oElement) || false) // could return a promise
|
|
402
402
|
: (vProperty || false);
|
|
@@ -8,32 +8,32 @@ sap.ui.define([
|
|
|
8
8
|
"sap/ui/core/postmessage/Bus",
|
|
9
9
|
"sap/ui/dt/Util",
|
|
10
10
|
"sap/base/util/uid"
|
|
11
|
-
], function
|
|
11
|
+
], function(
|
|
12
12
|
PostMessageBus,
|
|
13
13
|
DtUtil,
|
|
14
14
|
uid
|
|
15
15
|
) {
|
|
16
16
|
"use strict";
|
|
17
17
|
|
|
18
|
-
var CHANNEL_ID =
|
|
18
|
+
var CHANNEL_ID = "sap.ui.rta.service.receiver";
|
|
19
19
|
var oPostMessageBus;
|
|
20
20
|
|
|
21
|
-
return function
|
|
21
|
+
return function(oRta) {
|
|
22
22
|
var mEventHandlers = {};
|
|
23
23
|
|
|
24
|
-
var fnReceiver = function
|
|
24
|
+
var fnReceiver = function(oEvent) {
|
|
25
25
|
var mData = oEvent.data;
|
|
26
26
|
var mRequestBody = mData.body;
|
|
27
27
|
|
|
28
28
|
switch (oEvent.eventId) {
|
|
29
29
|
case "getService":
|
|
30
30
|
var sServiceName = mRequestBody.arguments[0];
|
|
31
|
-
oRta.getService(sServiceName).then(function
|
|
31
|
+
oRta.getService(sServiceName).then(function(oService) {
|
|
32
32
|
var mProperties = {};
|
|
33
33
|
var aMethods = [];
|
|
34
34
|
|
|
35
|
-
Object.keys(oService).forEach(function
|
|
36
|
-
if (typeof oService[sKey] ===
|
|
35
|
+
Object.keys(oService).forEach(function(sKey) {
|
|
36
|
+
if (typeof oService[sKey] === "function") {
|
|
37
37
|
if (!/^(at|de)tach/.test(sKey)) { // ignore system methods
|
|
38
38
|
aMethods.push(sKey);
|
|
39
39
|
}
|
|
@@ -59,33 +59,11 @@ sap.ui.define([
|
|
|
59
59
|
});
|
|
60
60
|
});
|
|
61
61
|
break;
|
|
62
|
-
case
|
|
62
|
+
case "callMethod":
|
|
63
63
|
oRta.getService(mRequestBody.service)
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
oPostMessageBus.publish({
|
|
68
|
-
target: oEvent.source,
|
|
69
|
-
origin: oEvent.origin,
|
|
70
|
-
channelId: CHANNEL_ID,
|
|
71
|
-
eventId: 'callMethod',
|
|
72
|
-
data: {
|
|
73
|
-
type: 'response',
|
|
74
|
-
status: 'success',
|
|
75
|
-
id: mData.id,
|
|
76
|
-
body: vResult
|
|
77
|
-
}
|
|
78
|
-
});
|
|
79
|
-
});
|
|
80
|
-
})
|
|
81
|
-
.catch(function (vError) {
|
|
82
|
-
var oError = DtUtil.propagateError(
|
|
83
|
-
vError,
|
|
84
|
-
"service.Receiver",
|
|
85
|
-
DtUtil.printf("Can't execute method {0} of service {1} due unexpected error.", mRequestBody.method, mRequestBody.service),
|
|
86
|
-
"sap.ui.rta"
|
|
87
|
-
);
|
|
88
|
-
|
|
64
|
+
.then(function(oService) {
|
|
65
|
+
oService[mRequestBody.method].apply(null, mRequestBody.arguments)
|
|
66
|
+
.then(function(vResult) {
|
|
89
67
|
oPostMessageBus.publish({
|
|
90
68
|
target: oEvent.source,
|
|
91
69
|
origin: oEvent.origin,
|
|
@@ -93,69 +71,92 @@ sap.ui.define([
|
|
|
93
71
|
eventId: "callMethod",
|
|
94
72
|
data: {
|
|
95
73
|
type: "response",
|
|
96
|
-
status: "
|
|
74
|
+
status: "success",
|
|
97
75
|
id: mData.id,
|
|
98
|
-
body:
|
|
76
|
+
body: vResult
|
|
99
77
|
}
|
|
100
78
|
});
|
|
101
79
|
});
|
|
80
|
+
})
|
|
81
|
+
.catch(function(vError) {
|
|
82
|
+
var oError = DtUtil.propagateError(
|
|
83
|
+
vError,
|
|
84
|
+
"service.Receiver",
|
|
85
|
+
DtUtil.printf("Can't execute method {0} of service {1} due unexpected error.", mRequestBody.method, mRequestBody.service),
|
|
86
|
+
"sap.ui.rta"
|
|
87
|
+
);
|
|
88
|
+
|
|
89
|
+
oPostMessageBus.publish({
|
|
90
|
+
target: oEvent.source,
|
|
91
|
+
origin: oEvent.origin,
|
|
92
|
+
channelId: CHANNEL_ID,
|
|
93
|
+
eventId: "callMethod",
|
|
94
|
+
data: {
|
|
95
|
+
type: "response",
|
|
96
|
+
status: "error",
|
|
97
|
+
id: mData.id,
|
|
98
|
+
body: oError.toString()
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
});
|
|
102
102
|
break;
|
|
103
|
-
case
|
|
103
|
+
case "subscribe":
|
|
104
104
|
oRta.getService(mRequestBody.service)
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
oPostMessageBus.publish({
|
|
108
|
-
target: oEvent.source,
|
|
109
|
-
origin: oEvent.origin,
|
|
110
|
-
channelId: CHANNEL_ID,
|
|
111
|
-
eventId: 'event',
|
|
112
|
-
data: {
|
|
113
|
-
body: {
|
|
114
|
-
service: mRequestBody.service,
|
|
115
|
-
event: mRequestBody.event,
|
|
116
|
-
data: vData
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
});
|
|
120
|
-
};
|
|
121
|
-
var sHandlerId = uid();
|
|
122
|
-
mEventHandlers[sHandlerId] = fnHandler;
|
|
123
|
-
oService.attachEvent(mRequestBody.event, fnHandler);
|
|
105
|
+
.then(function(oService) {
|
|
106
|
+
var fnHandler = function(vData) {
|
|
124
107
|
oPostMessageBus.publish({
|
|
125
108
|
target: oEvent.source,
|
|
126
109
|
origin: oEvent.origin,
|
|
127
110
|
channelId: CHANNEL_ID,
|
|
128
|
-
eventId:
|
|
111
|
+
eventId: "event",
|
|
129
112
|
data: {
|
|
130
|
-
type: 'response',
|
|
131
|
-
status: 'success',
|
|
132
|
-
id: mData.id,
|
|
133
113
|
body: {
|
|
134
|
-
|
|
114
|
+
service: mRequestBody.service,
|
|
115
|
+
event: mRequestBody.event,
|
|
116
|
+
data: vData
|
|
135
117
|
}
|
|
136
118
|
}
|
|
137
119
|
});
|
|
120
|
+
};
|
|
121
|
+
var sHandlerId = uid();
|
|
122
|
+
mEventHandlers[sHandlerId] = fnHandler;
|
|
123
|
+
oService.attachEvent(mRequestBody.event, fnHandler);
|
|
124
|
+
oPostMessageBus.publish({
|
|
125
|
+
target: oEvent.source,
|
|
126
|
+
origin: oEvent.origin,
|
|
127
|
+
channelId: CHANNEL_ID,
|
|
128
|
+
eventId: "subscribe",
|
|
129
|
+
data: {
|
|
130
|
+
type: "response",
|
|
131
|
+
status: "success",
|
|
132
|
+
id: mData.id,
|
|
133
|
+
body: {
|
|
134
|
+
id: sHandlerId
|
|
135
|
+
}
|
|
136
|
+
}
|
|
138
137
|
});
|
|
138
|
+
});
|
|
139
139
|
break;
|
|
140
|
-
case
|
|
140
|
+
case "unsubscribe":
|
|
141
141
|
oRta.getService(mRequestBody.service)
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
});
|
|
142
|
+
.then(function(oService) {
|
|
143
|
+
oService.detachEvent(mRequestBody.event, mEventHandlers[mRequestBody.id]);
|
|
144
|
+
delete mEventHandlers[mRequestBody.id];
|
|
145
|
+
oPostMessageBus.publish({
|
|
146
|
+
target: oEvent.source,
|
|
147
|
+
origin: oEvent.origin,
|
|
148
|
+
channelId: CHANNEL_ID,
|
|
149
|
+
eventId: "unsubscribe",
|
|
150
|
+
data: {
|
|
151
|
+
type: "response",
|
|
152
|
+
status: "success",
|
|
153
|
+
id: mData.id
|
|
154
|
+
}
|
|
156
155
|
});
|
|
156
|
+
});
|
|
157
157
|
break;
|
|
158
|
-
|
|
158
|
+
default:
|
|
159
|
+
// no default
|
|
159
160
|
}
|
|
160
161
|
};
|
|
161
162
|
|
|
@@ -171,7 +172,7 @@ sap.ui.define([
|
|
|
171
172
|
oPostMessageBus.subscribe(CHANNEL_ID, "unsubscribe", fnReceiver);
|
|
172
173
|
|
|
173
174
|
return {
|
|
174
|
-
destroy: function
|
|
175
|
+
destroy: function() {
|
|
175
176
|
if (oPostMessageBus) {
|
|
176
177
|
oPostMessageBus.unsubscribe(CHANNEL_ID, "getService", fnReceiver);
|
|
177
178
|
oPostMessageBus.unsubscribe(CHANNEL_ID, "callMethod", fnReceiver);
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
sap.ui.define(function
|
|
7
|
+
sap.ui.define(function() {
|
|
8
8
|
"use strict";
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -15,21 +15,21 @@ sap.ui.define(function () {
|
|
|
15
15
|
* @author SAP SE
|
|
16
16
|
* @experimental Since 1.58
|
|
17
17
|
* @since 1.58
|
|
18
|
-
* @version 1.
|
|
18
|
+
* @version 1.117.0
|
|
19
19
|
* @private
|
|
20
20
|
* @ui5-restricted
|
|
21
21
|
*/
|
|
22
22
|
|
|
23
|
-
return function
|
|
23
|
+
return function(oRta, fnPublish) {
|
|
24
24
|
var oSelectionManager = oRta._oDesignTime.getSelectionManager();
|
|
25
25
|
|
|
26
26
|
function getControlIds(aElementOverlays) {
|
|
27
|
-
return aElementOverlays.map(function
|
|
27
|
+
return aElementOverlays.map(function(oElementOverlay) {
|
|
28
28
|
return oElementOverlay.getElement().getId();
|
|
29
29
|
});
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
oSelectionManager.attachEvent("change", function
|
|
32
|
+
oSelectionManager.attachEvent("change", function(oEvent) {
|
|
33
33
|
fnPublish("change", getControlIds(oEvent.getParameter("selection")));
|
|
34
34
|
});
|
|
35
35
|
|
|
@@ -48,7 +48,7 @@ sap.ui.define(function () {
|
|
|
48
48
|
* @return {string[]} Selected control IDs
|
|
49
49
|
* @public
|
|
50
50
|
*/
|
|
51
|
-
get: function
|
|
51
|
+
get: function() {
|
|
52
52
|
return getControlIds(oSelectionManager.get());
|
|
53
53
|
},
|
|
54
54
|
|