@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
|
@@ -32,7 +32,7 @@ sap.ui.define([
|
|
|
32
32
|
* handled by the AdditionalElements Plugin (Reveal, Add Via Delegate, Add Custom)
|
|
33
33
|
*
|
|
34
34
|
* @author SAP SE
|
|
35
|
-
* @version 1.
|
|
35
|
+
* @version 1.117.0
|
|
36
36
|
* @private
|
|
37
37
|
* @since 1.94
|
|
38
38
|
* @experimental Since 1.94. This class is experimental and provides only limited functionality. Also the API might be changed in future.
|
|
@@ -44,14 +44,14 @@ sap.ui.define([
|
|
|
44
44
|
var aRequiredLibraries = DelegateMediatorAPI.getKnownDefaultDelegateLibraries();
|
|
45
45
|
aRequiredLibraries.forEach(function(sLibrary) {
|
|
46
46
|
var oLoadLibraryPromise = sap.ui.getCore().loadLibrary(sLibrary, { async: true })
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
47
|
+
.then(function() {
|
|
48
|
+
return Promise.resolve(sLibrary);
|
|
49
|
+
})
|
|
50
|
+
.catch(function(vError) {
|
|
51
|
+
Log.warning("Required library not available: ", vError);
|
|
52
|
+
// Ignore the error here as the default delegate might not be required
|
|
53
|
+
return Promise.resolve();
|
|
54
|
+
});
|
|
55
55
|
aLoadLibraryPromises.push(oLoadLibraryPromise);
|
|
56
56
|
});
|
|
57
57
|
return Promise.all(aLoadLibraryPromises);
|
|
@@ -59,27 +59,28 @@ sap.ui.define([
|
|
|
59
59
|
|
|
60
60
|
function getAddViaDelegateActionData(mAction, oDesignTimeMetadata, oPlugin) {
|
|
61
61
|
return oPlugin.hasChangeHandler(mAction.changeType, mAction.element)
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
62
|
+
.then(function(bHasChangeHandler) {
|
|
63
|
+
if (bHasChangeHandler) {
|
|
64
|
+
return {
|
|
65
|
+
aggregationName: mAction.aggregation,
|
|
66
|
+
addPropertyActionData: {
|
|
67
|
+
designTimeMetadata: oDesignTimeMetadata,
|
|
68
|
+
action: mAction,
|
|
69
|
+
delegateInfo: {
|
|
70
|
+
payload: mAction.delegateInfo.payload || {},
|
|
71
|
+
delegate: mAction.delegateInfo.instance,
|
|
72
|
+
modelType: mAction.delegateInfo.modelType,
|
|
73
|
+
requiredLibraries: mAction.delegateInfo.requiredLibraries,
|
|
74
|
+
delegateType: mAction.delegateInfo.delegateType
|
|
75
75
|
}
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
return undefined;
|
|
80
|
+
});
|
|
80
81
|
}
|
|
81
82
|
|
|
82
|
-
function getInvisibleElements
|
|
83
|
+
function getInvisibleElements(oParentOverlay, sAggregationName, oPlugin) {
|
|
83
84
|
var oParentElement = oParentOverlay.getElement();
|
|
84
85
|
if (!oParentElement) {
|
|
85
86
|
return [];
|
|
@@ -132,7 +133,7 @@ sap.ui.define([
|
|
|
132
133
|
function isValidAction(oCheckElementOverlay, mParents, mAction, oPlugin) {
|
|
133
134
|
var bValidAction = mAction.changeType && oPlugin.hasStableId(oCheckElementOverlay);
|
|
134
135
|
if (bValidAction && oCheckElementOverlay !== mParents.relevantContainerOverlay) {
|
|
135
|
-
//relevant container is needed for some changes, so it must have a stable ID
|
|
136
|
+
// relevant container is needed for some changes, so it must have a stable ID
|
|
136
137
|
bValidAction = oPlugin.hasStableId(mParents.relevantContainerOverlay);
|
|
137
138
|
}
|
|
138
139
|
return bValidAction;
|
|
@@ -146,39 +147,45 @@ sap.ui.define([
|
|
|
146
147
|
if (bValidAction) {
|
|
147
148
|
mAction.element = oCheckElement;
|
|
148
149
|
return DelegateMediatorAPI.getDelegateForControl({
|
|
149
|
-
control: mParents.relevantContainer, //delegate will always be added on the relevant container
|
|
150
|
+
control: mParents.relevantContainer, // delegate will always be added on the relevant container
|
|
150
151
|
modifier: JsControlTreeModifier,
|
|
151
152
|
supportsDefault: mAction.supportsDefaultDelegate
|
|
152
153
|
})
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
154
|
+
.then(function(mDelegateInfo) {
|
|
155
|
+
// Only complete delegators can be used for additional elements
|
|
156
|
+
if (
|
|
157
|
+
mDelegateInfo &&
|
|
158
|
+
mDelegateInfo.names &&
|
|
159
|
+
mDelegateInfo.names.length &&
|
|
160
|
+
mDelegateInfo.delegateType === DelegateMediatorAPI.types.COMPLETE
|
|
161
|
+
) {
|
|
162
|
+
var aRequiredLibraries = DelegateMediatorAPI.getRequiredLibrariesForDefaultDelegate({
|
|
163
|
+
delegateName: mDelegateInfo.names,
|
|
164
|
+
control: mParents.relevantContainer
|
|
165
|
+
});
|
|
166
|
+
|
|
167
|
+
// Check if all required libraries were successfully loaded
|
|
168
|
+
if (
|
|
169
|
+
difference(
|
|
170
|
+
aRequiredLibraries,
|
|
171
|
+
aDefaultDelegateLibraries.filter(Boolean)
|
|
172
|
+
).length === 0
|
|
173
|
+
) {
|
|
174
|
+
mAction.delegateInfo = mDelegateInfo;
|
|
175
|
+
aFilteredActions.push(mAction);
|
|
170
176
|
}
|
|
171
|
-
|
|
172
|
-
|
|
177
|
+
}
|
|
178
|
+
return aFilteredActions;
|
|
179
|
+
});
|
|
173
180
|
}
|
|
174
181
|
return aFilteredActions;
|
|
175
182
|
}
|
|
176
183
|
|
|
177
|
-
return aActions.reduce(function
|
|
184
|
+
return aActions.reduce(function(oPreviousActionsPromise, mAction) {
|
|
178
185
|
return oPreviousActionsPromise
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
186
|
+
.then(function(aFilteredActions) {
|
|
187
|
+
return fnFilterActions(aFilteredActions, mAction);
|
|
188
|
+
});
|
|
182
189
|
}, Promise.resolve([]));
|
|
183
190
|
}
|
|
184
191
|
|
|
@@ -237,7 +244,7 @@ sap.ui.define([
|
|
|
237
244
|
var mParents = AdditionalElementsUtils.getParents(true, oOverlay, oPlugin);
|
|
238
245
|
if (bHasChangeHandler) {
|
|
239
246
|
if (mRevealAction.changeOnRelevantContainer) {
|
|
240
|
-
//we have the child overlay, so we need the parents
|
|
247
|
+
// we have the child overlay, so we need the parents
|
|
241
248
|
bRevealEnabled = oPlugin.hasStableId(mParents.relevantContainerOverlay)
|
|
242
249
|
&& oPlugin.hasStableId(mParents.parentOverlay);
|
|
243
250
|
} else {
|
|
@@ -320,7 +327,7 @@ sap.ui.define([
|
|
|
320
327
|
oRevealActionsPromise,
|
|
321
328
|
oAddPropertyActionsPromise
|
|
322
329
|
]).then(function(aAllActions) {
|
|
323
|
-
//join and condense all action data
|
|
330
|
+
// join and condense all action data
|
|
324
331
|
var mAllActions = merge(aAllActions[0], aAllActions[1]);
|
|
325
332
|
oSourceElementOverlay._mAddActions = oSourceElementOverlay._mAddActions || {asSibling: {}, asChild: {}};
|
|
326
333
|
oSourceElementOverlay._mAddActions[sSiblingOrChild] = mAllActions;
|
|
@@ -364,7 +371,7 @@ sap.ui.define([
|
|
|
364
371
|
if (mParents.relevantContainer !== mParents.parent) {
|
|
365
372
|
aParents = ElementUtil.findAllSiblingsInContainer(mParents.parent, mParents.relevantContainer).map(function(oParent) {
|
|
366
373
|
return OverlayRegistry.getOverlay(oParent);
|
|
367
|
-
}).filter(function
|
|
374
|
+
}).filter(function(oOverlay) {
|
|
368
375
|
return oOverlay;
|
|
369
376
|
});
|
|
370
377
|
}
|
|
@@ -384,12 +391,12 @@ sap.ui.define([
|
|
|
384
391
|
return getRevealActionFromAggregations(aParents, mReveal, sAggregationName, aAggregationNames, oPlugin);
|
|
385
392
|
});
|
|
386
393
|
}, Promise.resolve({}))
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
394
|
+
.then(function(mAggregatedReveal) {
|
|
395
|
+
if (bSibling) {
|
|
396
|
+
mRevealCache[mParents.parentOverlay.getId()] = mAggregatedReveal;
|
|
397
|
+
}
|
|
398
|
+
return mAggregatedReveal;
|
|
399
|
+
});
|
|
393
400
|
}
|
|
394
401
|
return Promise.resolve({});
|
|
395
402
|
};
|
|
@@ -406,32 +413,32 @@ sap.ui.define([
|
|
|
406
413
|
var mParents = AdditionalElementsUtils.getParents(bSibling, oSourceElementOverlay, oPlugin);
|
|
407
414
|
var oDesignTimeMetadata = mParents.parentOverlay && mParents.parentOverlay.getDesignTimeMetadata();
|
|
408
415
|
return Promise.resolve()
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
416
|
+
.then(function() {
|
|
417
|
+
var aActions = oDesignTimeMetadata ? oDesignTimeMetadata.getActionDataFromAggregations("add", mParents.parent, undefined, "delegate") : [];
|
|
418
|
+
if (aActions.length) {
|
|
419
|
+
return loadKnownDefaultDelegateLibraries()
|
|
420
|
+
.then(filterValidAddPropertyActions.bind(this, aActions, mParents, oPlugin));
|
|
421
|
+
}
|
|
422
|
+
return [];
|
|
423
|
+
}.bind(this))
|
|
424
|
+
.then(function(aActions) {
|
|
425
|
+
return aActions.reduce(function(oPreviousPromise, oAction) {
|
|
426
|
+
return oPreviousPromise
|
|
427
|
+
.then(function(oReturn) {
|
|
428
|
+
return getAddViaDelegateActionData.call(this, oAction, oDesignTimeMetadata, oPlugin)
|
|
429
|
+
.then(function(mAction) {
|
|
430
|
+
if (mAction) {
|
|
431
|
+
mAction.addPropertyActionData.relevantContainer = mParents.relevantContainer;
|
|
432
|
+
if (!oReturn[mAction.aggregationName]) {
|
|
433
|
+
oReturn[mAction.aggregationName] = {};
|
|
434
|
+
}
|
|
435
|
+
oReturn[mAction.aggregationName].addViaDelegate = mAction.addPropertyActionData;
|
|
436
|
+
}
|
|
437
|
+
return oReturn;
|
|
438
|
+
});
|
|
439
|
+
}.bind(this));
|
|
440
|
+
}.bind(this), Promise.resolve({}));
|
|
441
|
+
}.bind(this));
|
|
435
442
|
};
|
|
436
443
|
|
|
437
444
|
return ActionExtractor;
|
|
@@ -32,7 +32,7 @@ sap.ui.define([
|
|
|
32
32
|
* @class Context - Dialog for available Fields in Runtime Authoring
|
|
33
33
|
* @extends sap.ui.base.ManagedObject
|
|
34
34
|
* @author SAP SE
|
|
35
|
-
* @version 1.
|
|
35
|
+
* @version 1.117.0
|
|
36
36
|
* @constructor
|
|
37
37
|
* @private
|
|
38
38
|
* @since 1.44
|
|
@@ -83,10 +83,10 @@ sap.ui.define([
|
|
|
83
83
|
customFieldVisible: false,
|
|
84
84
|
businessContextVisible: false,
|
|
85
85
|
customFieldButtonTooltip: "",
|
|
86
|
-
businessContextTexts: [{text: ""}] //empty element in first place, to be replaced by the headerText (see: addExtensionData)
|
|
86
|
+
businessContextTexts: [{text: ""}] // empty element in first place, to be replaced by the headerText (see: addExtensionData)
|
|
87
87
|
});
|
|
88
88
|
|
|
89
|
-
this._oDialogPromise.then(function
|
|
89
|
+
this._oDialogPromise.then(function(oDialog) {
|
|
90
90
|
oDialog.setModel(this._oDialogModel);
|
|
91
91
|
if (!oRTAResourceModel) {
|
|
92
92
|
oRTAResourceModel = new ResourceModel({bundleName: "sap.ui.rta.messagebundle"});
|
|
@@ -97,8 +97,8 @@ sap.ui.define([
|
|
|
97
97
|
|
|
98
98
|
this._oDialogModel.setProperty("/listNoDataText", oRTAResourceModel.getProperty("MSG_NO_FIELDS").toLowerCase());
|
|
99
99
|
|
|
100
|
-
//retrieve List to set the sorting for the 'items' aggregation, since sap.ui.model.Sorter
|
|
101
|
-
//does not support binding to a model property...
|
|
100
|
+
// retrieve List to set the sorting for the 'items' aggregation, since sap.ui.model.Sorter
|
|
101
|
+
// does not support binding to a model property...
|
|
102
102
|
this._oList = sap.ui.getCore().byId(this.getId() + "--rta_addElementsDialogList");
|
|
103
103
|
this._bDescendingSortOrder = false;
|
|
104
104
|
}.bind(this));
|
|
@@ -127,21 +127,21 @@ sap.ui.define([
|
|
|
127
127
|
oDialog.close();
|
|
128
128
|
this._fnResolveOnDialogConfirm();
|
|
129
129
|
}.bind(this));
|
|
130
|
-
//indicate that the dialog has been closed and the selected fields (if any) are to be added to the UI
|
|
130
|
+
// indicate that the dialog has been closed and the selected fields (if any) are to be added to the UI
|
|
131
131
|
};
|
|
132
132
|
|
|
133
133
|
/**
|
|
134
134
|
* Close dialog. All sections will be reverted
|
|
135
135
|
*/
|
|
136
136
|
AddElementsDialog.prototype._cancelDialog = function() {
|
|
137
|
-
//clear all selections
|
|
137
|
+
// clear all selections
|
|
138
138
|
this._oDialogModel.getObject("/elements").forEach(function(oElem) {
|
|
139
139
|
oElem.selected = false;
|
|
140
140
|
});
|
|
141
141
|
this._oDialogPromise.then(function(oDialog) {
|
|
142
142
|
oDialog.close();
|
|
143
143
|
});
|
|
144
|
-
//indicate that the dialog has been closed without choosing to add any fields (canceled)
|
|
144
|
+
// indicate that the dialog has been closed without choosing to add any fields (canceled)
|
|
145
145
|
this._fnRejectOnDialogCancel();
|
|
146
146
|
};
|
|
147
147
|
|
|
@@ -184,7 +184,7 @@ sap.ui.define([
|
|
|
184
184
|
*
|
|
185
185
|
* @private
|
|
186
186
|
*/
|
|
187
|
-
AddElementsDialog.prototype._resortList = function
|
|
187
|
+
AddElementsDialog.prototype._resortList = function() {
|
|
188
188
|
this._bDescendingSortOrder = !this._bDescendingSortOrder;
|
|
189
189
|
var oBinding = this._oList.getBinding("items");
|
|
190
190
|
var aSorter = [];
|
|
@@ -219,7 +219,7 @@ sap.ui.define([
|
|
|
219
219
|
*
|
|
220
220
|
* @private
|
|
221
221
|
*/
|
|
222
|
-
AddElementsDialog.prototype._redirectToCustomFieldCreation = function
|
|
222
|
+
AddElementsDialog.prototype._redirectToCustomFieldCreation = function() {
|
|
223
223
|
this.fireOpenCustomField();
|
|
224
224
|
this._oDialogPromise.then(function(oDialog) {
|
|
225
225
|
oDialog.close();
|
|
@@ -261,31 +261,31 @@ sap.ui.define([
|
|
|
261
261
|
* @returns {Promise<undefined>} A promise resolving to undefined
|
|
262
262
|
* @public
|
|
263
263
|
*/
|
|
264
|
-
AddElementsDialog.prototype.addExtensionData = function
|
|
265
|
-
//clear old values from last run
|
|
264
|
+
AddElementsDialog.prototype.addExtensionData = function(aExtensionData) {
|
|
265
|
+
// clear old values from last run
|
|
266
266
|
this._removeExtensionDataTexts();
|
|
267
267
|
|
|
268
268
|
var aBusinessContextTexts = this._oDialogModel.getObject("/businessContextTexts");
|
|
269
269
|
if (aExtensionData && aExtensionData.length > 0) {
|
|
270
|
-
aExtensionData.forEach(function
|
|
270
|
+
aExtensionData.forEach(function(oContext) {
|
|
271
271
|
aBusinessContextTexts.push({
|
|
272
272
|
text: oContext.description
|
|
273
273
|
});
|
|
274
274
|
}, this);
|
|
275
275
|
} else {
|
|
276
|
-
//Message "none" when no extension data is available
|
|
276
|
+
// Message "none" when no extension data is available
|
|
277
277
|
aBusinessContextTexts.push({
|
|
278
278
|
text: oRTAResourceModel.getProperty("MSG_NO_BUSINESS_CONTEXTS")
|
|
279
279
|
});
|
|
280
280
|
}
|
|
281
|
-
//set the container visible
|
|
281
|
+
// set the container visible
|
|
282
282
|
this._setBusinessContextVisible(true);
|
|
283
283
|
|
|
284
284
|
return FieldExtensibility.getTexts().then(function(oFieldExtensibilityTexts) {
|
|
285
285
|
if (oFieldExtensibilityTexts) {
|
|
286
286
|
this._oDialogModel.setProperty("/customFieldButtonTooltip", oFieldExtensibilityTexts.tooltip);
|
|
287
|
-
//the first entry is always the "header" to be set by the implementation of FieldExtensibility
|
|
288
|
-
//it is set during the instantiation of the model, in the 'init' function
|
|
287
|
+
// the first entry is always the "header" to be set by the implementation of FieldExtensibility
|
|
288
|
+
// it is set during the instantiation of the model, in the 'init' function
|
|
289
289
|
this._oDialogModel.setProperty("/businessContextTexts/0/text", oFieldExtensibilityTexts.headerText);
|
|
290
290
|
}
|
|
291
291
|
}.bind(this));
|
|
@@ -296,7 +296,7 @@ sap.ui.define([
|
|
|
296
296
|
* (except for the title)
|
|
297
297
|
* @private
|
|
298
298
|
*/
|
|
299
|
-
AddElementsDialog.prototype._removeExtensionDataTexts = function
|
|
299
|
+
AddElementsDialog.prototype._removeExtensionDataTexts = function() {
|
|
300
300
|
var aBusinessContextTexts = this._oDialogModel.getObject("/businessContextTexts");
|
|
301
301
|
aBusinessContextTexts.splice(1);
|
|
302
302
|
};
|