@openui5/sap.ui.rta 1.131.1 → 1.132.1
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 +1 -2
- package/THIRDPARTY.txt +1 -1
- package/package.json +6 -6
- package/src/sap/ui/rta/.library +2 -2
- package/src/sap/ui/rta/Client.js +2 -2
- package/src/sap/ui/rta/RuntimeAuthoring.js +26 -10
- package/src/sap/ui/rta/Utils.js +2 -2
- package/src/sap/ui/rta/api/startAdaptation.js +1 -1
- package/src/sap/ui/rta/api/startKeyUserAdaptation.js +1 -1
- package/src/sap/ui/rta/appVariant/AppVariantDialog.js +1 -1
- package/src/sap/ui/rta/appVariant/AppVariantManager.js +2 -2
- package/src/sap/ui/rta/appVariant/AppVariantOverviewDialog.js +1 -1
- package/src/sap/ui/rta/appVariant/AppVariantUtils.js +1 -1
- package/src/sap/ui/rta/appVariant/Feature.js +1 -1
- package/src/sap/ui/rta/appVariant/S4HanaCloudBackend.js +1 -1
- package/src/sap/ui/rta/appVariant/Utils.js +1 -1
- package/src/sap/ui/rta/appVariant/manageApps/webapp/Component.js +1 -1
- package/src/sap/ui/rta/appVariant/manageApps/webapp/controller/ManageApps.controller.js +1 -1
- package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_en_US_saptrc.properties +27 -27
- package/src/sap/ui/rta/appVariant/manageApps/webapp/index.html +3 -3
- package/src/sap/ui/rta/appVariant/manageApps/webapp/index.js +1 -1
- package/src/sap/ui/rta/appVariant/manageApps/webapp/model/models.js +1 -1
- package/src/sap/ui/rta/command/AddIFrame.js +2 -2
- package/src/sap/ui/rta/command/AddProperty.js +2 -2
- package/src/sap/ui/rta/command/AddXML.js +2 -2
- package/src/sap/ui/rta/command/AddXMLAtExtensionPoint.js +2 -2
- package/src/sap/ui/rta/command/AnnotationCommand.js +79 -0
- package/src/sap/ui/rta/command/AppDescriptorCommand.js +2 -2
- package/src/sap/ui/rta/command/BaseCommand.js +2 -2
- package/src/sap/ui/rta/command/BindProperty.js +6 -8
- package/src/sap/ui/rta/command/Combine.js +2 -2
- package/src/sap/ui/rta/command/CommandFactory.js +3 -3
- package/src/sap/ui/rta/command/CompositeCommand.js +2 -2
- package/src/sap/ui/rta/command/ControlVariantConfigure.js +9 -5
- package/src/sap/ui/rta/command/ControlVariantSave.js +2 -2
- package/src/sap/ui/rta/command/ControlVariantSaveAs.js +8 -6
- package/src/sap/ui/rta/command/ControlVariantSetTitle.js +14 -11
- package/src/sap/ui/rta/command/ControlVariantSwitch.js +6 -4
- package/src/sap/ui/rta/command/CreateContainer.js +2 -2
- package/src/sap/ui/rta/command/CustomAdd.js +2 -2
- package/src/sap/ui/rta/command/FlexCommand.js +2 -2
- package/src/sap/ui/rta/command/LREPSerializer.js +2 -2
- package/src/sap/ui/rta/command/LocalReset.js +2 -2
- package/src/sap/ui/rta/command/Move.js +2 -2
- package/src/sap/ui/rta/command/Property.js +2 -2
- package/src/sap/ui/rta/command/Remove.js +2 -2
- package/src/sap/ui/rta/command/Rename.js +2 -2
- package/src/sap/ui/rta/command/Resize.js +2 -2
- package/src/sap/ui/rta/command/Reveal.js +2 -2
- package/src/sap/ui/rta/command/Settings.js +2 -2
- package/src/sap/ui/rta/command/Split.js +2 -2
- package/src/sap/ui/rta/command/Stack.js +2 -2
- package/src/sap/ui/rta/command/appDescriptor/AddLibrary.js +2 -2
- package/src/sap/ui/rta/command/compVariant/CompVariantContent.js +2 -2
- package/src/sap/ui/rta/command/compVariant/CompVariantSaveAs.js +2 -2
- package/src/sap/ui/rta/command/compVariant/CompVariantSwitch.js +2 -2
- package/src/sap/ui/rta/command/compVariant/CompVariantUpdate.js +14 -2
- package/src/sap/ui/rta/enablement/TestDelegate.js +1 -1
- package/src/sap/ui/rta/enablement/elementActionTest.js +15 -16
- package/src/sap/ui/rta/library.js +3 -3
- package/src/sap/ui/rta/messagebundle.properties +18 -0
- package/src/sap/ui/rta/messagebundle_ar.properties +10 -0
- package/src/sap/ui/rta/messagebundle_bg.properties +13 -3
- package/src/sap/ui/rta/messagebundle_ca.properties +10 -0
- package/src/sap/ui/rta/messagebundle_cnr.properties +10 -0
- package/src/sap/ui/rta/messagebundle_cs.properties +10 -0
- package/src/sap/ui/rta/messagebundle_cy.properties +10 -0
- package/src/sap/ui/rta/messagebundle_da.properties +10 -0
- package/src/sap/ui/rta/messagebundle_de.properties +10 -0
- package/src/sap/ui/rta/messagebundle_el.properties +10 -0
- package/src/sap/ui/rta/messagebundle_en.properties +10 -0
- package/src/sap/ui/rta/messagebundle_en_GB.properties +10 -0
- package/src/sap/ui/rta/messagebundle_en_US_saprigi.properties +10 -0
- package/src/sap/ui/rta/messagebundle_en_US_saptrc.properties +347 -325
- package/src/sap/ui/rta/messagebundle_es.properties +10 -0
- package/src/sap/ui/rta/messagebundle_es_MX.properties +18 -8
- package/src/sap/ui/rta/messagebundle_et.properties +10 -0
- package/src/sap/ui/rta/messagebundle_fi.properties +10 -0
- package/src/sap/ui/rta/messagebundle_fr.properties +10 -0
- package/src/sap/ui/rta/messagebundle_fr_CA.properties +10 -0
- package/src/sap/ui/rta/messagebundle_hi.properties +10 -0
- package/src/sap/ui/rta/messagebundle_hr.properties +10 -0
- package/src/sap/ui/rta/messagebundle_hu.properties +10 -0
- package/src/sap/ui/rta/messagebundle_id.properties +10 -0
- package/src/sap/ui/rta/messagebundle_it.properties +10 -0
- package/src/sap/ui/rta/messagebundle_iw.properties +10 -0
- package/src/sap/ui/rta/messagebundle_ja.properties +10 -0
- package/src/sap/ui/rta/messagebundle_kk.properties +10 -0
- package/src/sap/ui/rta/messagebundle_ko.properties +10 -0
- package/src/sap/ui/rta/messagebundle_lt.properties +10 -0
- package/src/sap/ui/rta/messagebundle_lv.properties +10 -0
- package/src/sap/ui/rta/messagebundle_mk.properties +10 -0
- package/src/sap/ui/rta/messagebundle_ms.properties +14 -4
- package/src/sap/ui/rta/messagebundle_nl.properties +10 -0
- package/src/sap/ui/rta/messagebundle_no.properties +10 -0
- package/src/sap/ui/rta/messagebundle_pl.properties +10 -0
- package/src/sap/ui/rta/messagebundle_pt.properties +10 -0
- package/src/sap/ui/rta/messagebundle_pt_PT.properties +10 -0
- package/src/sap/ui/rta/messagebundle_ro.properties +10 -0
- package/src/sap/ui/rta/messagebundle_ru.properties +10 -0
- package/src/sap/ui/rta/messagebundle_sh.properties +10 -0
- package/src/sap/ui/rta/messagebundle_sk.properties +10 -0
- package/src/sap/ui/rta/messagebundle_sl.properties +10 -0
- package/src/sap/ui/rta/messagebundle_sr.properties +10 -0
- package/src/sap/ui/rta/messagebundle_sv.properties +10 -0
- package/src/sap/ui/rta/messagebundle_th.properties +10 -0
- package/src/sap/ui/rta/messagebundle_tr.properties +10 -0
- package/src/sap/ui/rta/messagebundle_uk.properties +11 -1
- package/src/sap/ui/rta/messagebundle_vi.properties +10 -0
- package/src/sap/ui/rta/messagebundle_zh_CN.properties +10 -0
- package/src/sap/ui/rta/messagebundle_zh_TW.properties +10 -0
- package/src/sap/ui/rta/plugin/AddXMLAtExtensionPoint.js +2 -2
- package/src/sap/ui/rta/plugin/BaseCreate.js +2 -2
- package/src/sap/ui/rta/plugin/Combine.js +2 -2
- package/src/sap/ui/rta/plugin/CompVariant.js +4 -2
- package/src/sap/ui/rta/plugin/ControlVariant.js +5 -23
- package/src/sap/ui/rta/plugin/CreateContainer.js +2 -2
- package/src/sap/ui/rta/plugin/CutPaste.js +2 -2
- package/src/sap/ui/rta/plugin/DragDrop.js +2 -2
- package/src/sap/ui/rta/plugin/LocalReset.js +2 -2
- package/src/sap/ui/rta/plugin/Plugin.js +15 -13
- package/src/sap/ui/rta/plugin/RTAElementMover.js +2 -2
- package/src/sap/ui/rta/plugin/Remove.js +2 -2
- package/src/sap/ui/rta/plugin/Rename.js +3 -3
- package/src/sap/ui/rta/plugin/RenameHandler.js +5 -9
- package/src/sap/ui/rta/plugin/Resize.js +3 -3
- package/src/sap/ui/rta/plugin/Selection.js +2 -2
- package/src/sap/ui/rta/plugin/Settings.js +2 -21
- package/src/sap/ui/rta/plugin/Split.js +2 -2
- package/src/sap/ui/rta/plugin/Stretch.js +7 -5
- package/src/sap/ui/rta/plugin/additionalElements/ActionExtractor.js +94 -126
- package/src/sap/ui/rta/plugin/additionalElements/AddElementsDialog.js +28 -31
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsAnalyzer.js +141 -172
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsPlugin.js +108 -137
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsUtils.js +2 -2
- package/src/sap/ui/rta/plugin/additionalElements/CommandBuilder.js +96 -141
- package/src/sap/ui/rta/plugin/annotations/AnnotationChangeDialog.fragment.xml +112 -0
- package/src/sap/ui/rta/plugin/annotations/AnnotationChangeDialog.js +183 -0
- package/src/sap/ui/rta/plugin/annotations/AnnotationChangeDialogController.js +109 -0
- package/src/sap/ui/rta/plugin/annotations/AnnotationPlugin.js +239 -0
- package/src/sap/ui/rta/plugin/annotations/AnnotationTypes.js +15 -0
- package/src/sap/ui/rta/plugin/iframe/AddIFrame.js +2 -2
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.js +3 -3
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialogController.js +1 -1
- package/src/sap/ui/rta/plugin/iframe/urlCleaner.js +1 -1
- package/src/sap/ui/rta/service/Action.js +2 -2
- package/src/sap/ui/rta/service/ControllerExtension.js +2 -2
- package/src/sap/ui/rta/service/Outline.js +2 -2
- package/src/sap/ui/rta/service/Property.js +2 -2
- package/src/sap/ui/rta/service/Receiver.js +1 -1
- package/src/sap/ui/rta/service/Selection.js +2 -2
- package/src/sap/ui/rta/service/SupportTools.js +2 -2
- package/src/sap/ui/rta/service/index.js +1 -1
- package/src/sap/ui/rta/themes/base/WhatsNew.less +5 -0
- package/src/sap/ui/rta/themes/base/library.source.less +1 -1
- package/src/sap/ui/rta/themes/sap_hcb/library.source.less +1 -1
- package/src/sap/ui/rta/toolbar/Adaptation.js +2 -2
- package/src/sap/ui/rta/toolbar/AdaptationRenderer.js +1 -1
- package/src/sap/ui/rta/toolbar/Base.js +2 -2
- package/src/sap/ui/rta/toolbar/BaseRenderer.js +1 -1
- package/src/sap/ui/rta/toolbar/Fiori.js +3 -4
- package/src/sap/ui/rta/toolbar/FioriLike.js +2 -2
- package/src/sap/ui/rta/toolbar/OverflowToolbarButton.js +2 -2
- package/src/sap/ui/rta/toolbar/Standalone.js +2 -2
- package/src/sap/ui/rta/toolbar/contextBased/ManageAdaptations.js +1 -1
- package/src/sap/ui/rta/toolbar/contextBased/SaveAsAdaptation.js +2 -2
- package/src/sap/ui/rta/toolbar/translation/Translation.js +3 -3
- package/src/sap/ui/rta/toolbar/versioning/Versioning.js +2 -2
- package/src/sap/ui/rta/util/Animation.js +1 -1
- package/src/sap/ui/rta/util/BindingsExtractor.js +1 -1
- package/src/sap/ui/rta/util/PluginManager.js +16 -10
- package/src/sap/ui/rta/util/PopupManager.js +3 -3
- package/src/sap/ui/rta/util/ReloadManager.js +9 -9
- package/src/sap/ui/rta/util/ServiceEventBus.js +2 -2
- package/src/sap/ui/rta/util/ServiceManager.js +2 -2
- package/src/sap/ui/rta/util/adaptationStarter.js +17 -2
- package/src/sap/ui/rta/util/changeVisualization/ChangeCategories.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicator.js +2 -2
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorRegistry.js +2 -2
- package/src/sap/ui/rta/util/changeVisualization/ChangeStates.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/ChangeVisualization.js +5 -3
- package/src/sap/ui/rta/util/changeVisualization/ChangeVisualizationUtils.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/commands/CombineVisualization.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/commands/CreateContainerVisualization.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/commands/MoveVisualization.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/commands/RenameVisualization.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/commands/SplitVisualization.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/commands/getCommandVisualization.js +1 -1
- package/src/sap/ui/rta/util/hasStableId.js +1 -1
- package/src/sap/ui/rta/util/showMessageBox.js +1 -1
- package/src/sap/ui/rta/util/validateFlexEnabled.js +1 -1
- package/src/sap/ui/rta/util/validateStableIds.js +1 -1
- package/src/sap/ui/rta/util/validateText.js +1 -1
- package/src/sap/ui/rta/util/whatsNew/WhatsNew.js +2 -2
- package/src/sap/ui/rta/util/whatsNew/WhatsNewDialog.fragment.xml +5 -4
- package/src/sap/ui/rta/util/whatsNew/WhatsNewOverview.js +1 -1
- package/src/sap/ui/rta/util/whatsNew/WhatsNewOverviewDialog.fragment.xml +8 -2
- package/src/sap/ui/rta/util/whatsNew/WhatsNewUtils.js +1 -1
- package/src/sap/ui/rta/util/whatsNew/whatsNewContent/WhatsNewFeatures.js +1 -1
- package/src/sap/ui/rta/command/Annotation.js +0 -45
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2025 SAP SE or an SAP affiliate company.
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
sap.ui.define([
|
|
8
|
-
"sap/base/util/restricted/_difference",
|
|
9
8
|
"sap/base/util/merge",
|
|
10
9
|
"sap/base/Log",
|
|
11
10
|
"sap/ui/core/util/reflection/JsControlTreeModifier",
|
|
@@ -16,7 +15,6 @@ sap.ui.define([
|
|
|
16
15
|
"sap/ui/rta/plugin/additionalElements/AdditionalElementsUtils",
|
|
17
16
|
"sap/ui/rta/Utils"
|
|
18
17
|
], function(
|
|
19
|
-
difference,
|
|
20
18
|
merge,
|
|
21
19
|
Log,
|
|
22
20
|
JsControlTreeModifier,
|
|
@@ -34,33 +32,31 @@ sap.ui.define([
|
|
|
34
32
|
* handled by the AdditionalElements Plugin (Reveal, Add Via Delegate, Add Custom)
|
|
35
33
|
*
|
|
36
34
|
* @author SAP SE
|
|
37
|
-
* @version 1.
|
|
35
|
+
* @version 1.132.1
|
|
38
36
|
* @private
|
|
39
37
|
* @since 1.94
|
|
40
38
|
*/
|
|
41
39
|
const ActionExtractor = {};
|
|
42
40
|
|
|
43
|
-
function getAddViaDelegateActionData(mAction, oDesignTimeMetadata, oPlugin) {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
delegateType: mAction.delegateInfo.delegateType
|
|
58
|
-
}
|
|
41
|
+
async function getAddViaDelegateActionData(mAction, oDesignTimeMetadata, oPlugin) {
|
|
42
|
+
const bHasChangeHandler = await oPlugin.hasChangeHandler(mAction.changeType, mAction.element);
|
|
43
|
+
if (bHasChangeHandler) {
|
|
44
|
+
return {
|
|
45
|
+
aggregationName: mAction.aggregation,
|
|
46
|
+
addPropertyActionData: {
|
|
47
|
+
designTimeMetadata: oDesignTimeMetadata,
|
|
48
|
+
action: mAction,
|
|
49
|
+
delegateInfo: {
|
|
50
|
+
payload: mAction.delegateInfo.payload || {},
|
|
51
|
+
delegate: mAction.delegateInfo.instance,
|
|
52
|
+
modelType: mAction.delegateInfo.modelType,
|
|
53
|
+
requiredLibraries: mAction.delegateInfo.requiredLibraries,
|
|
54
|
+
delegateType: mAction.delegateInfo.delegateType
|
|
59
55
|
}
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
return undefined;
|
|
64
60
|
}
|
|
65
61
|
|
|
66
62
|
function getInvisibleElements(oParentOverlay, sAggregationName, oPlugin) {
|
|
@@ -123,7 +119,7 @@ sap.ui.define([
|
|
|
123
119
|
}
|
|
124
120
|
|
|
125
121
|
// Return all elements that can be made visible in each aggregation (including elements from other aggregations)
|
|
126
|
-
function getRevealActionFromAggregations(aParents, _mReveal, sAggregationName, aAggregationNames, oPlugin) {
|
|
122
|
+
async function getRevealActionFromAggregations(aParents, _mReveal, sAggregationName, aAggregationNames, oPlugin) {
|
|
127
123
|
const aInvisibleElements = aParents.reduce(function(aInvisibleChildren, oParentOverlay) {
|
|
128
124
|
let aInvisibleChildrenPerAggregation = [];
|
|
129
125
|
aAggregationNames.forEach(function(sAggregation) {
|
|
@@ -133,24 +129,20 @@ sap.ui.define([
|
|
|
133
129
|
return oParentOverlay ? aInvisibleChildren.concat(aInvisibleChildrenPerAggregation) : aInvisibleChildren;
|
|
134
130
|
}.bind(this), []);
|
|
135
131
|
|
|
136
|
-
|
|
132
|
+
let oRevealObject = {
|
|
137
133
|
elements: [],
|
|
138
134
|
controlTypeNames: []
|
|
139
135
|
};
|
|
140
|
-
const
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
});
|
|
144
|
-
}, Promise.resolve(oInitialRevealObject));
|
|
136
|
+
for (const mInvisibleElement of aInvisibleElements) {
|
|
137
|
+
oRevealObject = await checkAndEnrichReveal(oRevealObject, mInvisibleElement, oPlugin, sAggregationName);
|
|
138
|
+
}
|
|
145
139
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
return _mReveal;
|
|
153
|
-
});
|
|
140
|
+
if (oRevealObject.elements.length > 0) {
|
|
141
|
+
_mReveal[sAggregationName] = {
|
|
142
|
+
reveal: oRevealObject
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
return _mReveal;
|
|
154
146
|
}
|
|
155
147
|
|
|
156
148
|
function filterValidAddPropertyActions(aActions, mParents, oPlugin) {
|
|
@@ -161,21 +153,18 @@ sap.ui.define([
|
|
|
161
153
|
});
|
|
162
154
|
}
|
|
163
155
|
|
|
164
|
-
function loadRequiredLibraries(mRequiredLibraries) {
|
|
156
|
+
async function loadRequiredLibraries(mRequiredLibraries) {
|
|
165
157
|
const aRequiredLibraries = Object.keys(mRequiredLibraries || {});
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
})
|
|
172
|
-
return Promise.all(aRequireLibrariesPromise)
|
|
173
|
-
.then(() => true)
|
|
174
|
-
.catch((vError) => {
|
|
158
|
+
try {
|
|
159
|
+
for (const sLibrary of aRequiredLibraries) {
|
|
160
|
+
await Lib.load({name: sLibrary});
|
|
161
|
+
}
|
|
162
|
+
return true;
|
|
163
|
+
} catch (vError) {
|
|
175
164
|
Log.error("Required library not available: ", vError);
|
|
176
165
|
// Ignore the error here as the write delegate might not be required
|
|
177
166
|
return false;
|
|
178
|
-
}
|
|
167
|
+
}
|
|
179
168
|
}
|
|
180
169
|
|
|
181
170
|
function filterValidDelegateForAction(aActions, mParents) {
|
|
@@ -203,68 +192,53 @@ sap.ui.define([
|
|
|
203
192
|
return oFilterPromise;
|
|
204
193
|
}
|
|
205
194
|
|
|
206
|
-
function checkAndEnrichReveal(mReveal, mInvisibleElement, oPlugin, sTargetAggregation) {
|
|
207
|
-
const
|
|
208
|
-
let oDesignTimeMetadata;
|
|
209
|
-
let mRevealAction;
|
|
210
|
-
let bRevealEnabled = false;
|
|
211
|
-
let oHasChangeHandlerPromise = Promise.resolve(false);
|
|
212
|
-
const sSourceAggregation = mInvisibleElement.sourceAggregation;
|
|
213
|
-
|
|
214
|
-
const oOverlay = OverlayRegistry.getOverlay(oInvisibleElement);
|
|
195
|
+
async function checkAndEnrichReveal(mReveal, mInvisibleElement, oPlugin, sTargetAggregation) {
|
|
196
|
+
const oOverlay = OverlayRegistry.getOverlay(mInvisibleElement.element);
|
|
215
197
|
if (oOverlay) {
|
|
216
|
-
oDesignTimeMetadata = oOverlay.getDesignTimeMetadata();
|
|
198
|
+
const oDesignTimeMetadata = oOverlay.getDesignTimeMetadata();
|
|
217
199
|
|
|
218
|
-
mRevealAction = oDesignTimeMetadata && oDesignTimeMetadata.getAction("reveal",
|
|
200
|
+
const mRevealAction = oDesignTimeMetadata && oDesignTimeMetadata.getAction("reveal", mInvisibleElement.element);
|
|
219
201
|
if (mRevealAction && mRevealAction.changeType) {
|
|
220
|
-
let oRevealSelector =
|
|
202
|
+
let oRevealSelector = mInvisibleElement.element;
|
|
221
203
|
if (mRevealAction.changeOnRelevantContainer) {
|
|
222
204
|
oRevealSelector = oOverlay.getRelevantContainer();
|
|
223
205
|
}
|
|
224
206
|
|
|
225
|
-
|
|
226
|
-
.
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
207
|
+
// Element can be made invalid while the check is running (e.g. destroyed during undo of split)
|
|
208
|
+
if (ElementUtil.isElementValid(mInvisibleElement.element)) {
|
|
209
|
+
const mParents = AdditionalElementsUtils.getParents(true, oOverlay, oPlugin);
|
|
210
|
+
const bHasChangeHandler = await oPlugin.hasChangeHandler(mRevealAction.changeType, oRevealSelector);
|
|
211
|
+
if (bHasChangeHandler) {
|
|
212
|
+
let bRevealEnabled = mRevealAction.changeOnRelevantContainer ?
|
|
213
|
+
// we have the child overlay, so we need the parents
|
|
214
|
+
oPlugin.hasStableId(mParents.relevantContainerOverlay) && oPlugin.hasStableId(mParents.parentOverlay)
|
|
215
|
+
: true;
|
|
216
|
+
mRevealAction.getAggregationName ||= defaultGetAggregationName;
|
|
217
|
+
|
|
218
|
+
// Check if the invisible element can be moved to the target aggregation
|
|
219
|
+
if (bRevealEnabled && (mInvisibleElement.sourceAggregation !== sTargetAggregation)) {
|
|
220
|
+
const oAggregationOverlay = mParents.parentOverlay.getAggregationOverlay(sTargetAggregation);
|
|
221
|
+
bRevealEnabled = await Utils.checkTargetZone(oAggregationOverlay, oOverlay, oPlugin);
|
|
222
|
+
}
|
|
239
223
|
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
224
|
+
if (bRevealEnabled) {
|
|
225
|
+
mReveal.elements.push({
|
|
226
|
+
element: mInvisibleElement.element,
|
|
227
|
+
designTimeMetadata: oDesignTimeMetadata,
|
|
228
|
+
action: mRevealAction,
|
|
229
|
+
sourceAggregation: mInvisibleElement.sourceAggregation,
|
|
230
|
+
targetAggregation: sTargetAggregation
|
|
231
|
+
});
|
|
232
|
+
const mName = oDesignTimeMetadata.getName(mInvisibleElement.element);
|
|
233
|
+
if (mName) {
|
|
234
|
+
mReveal.controlTypeNames.push(mName);
|
|
244
235
|
}
|
|
245
236
|
}
|
|
246
237
|
}
|
|
247
|
-
return bRevealEnabled;
|
|
248
|
-
});
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
return oHasChangeHandlerPromise.then(function(bIncludeReveal) {
|
|
253
|
-
if (bIncludeReveal) {
|
|
254
|
-
mReveal.elements.push({
|
|
255
|
-
element: oInvisibleElement,
|
|
256
|
-
designTimeMetadata: oDesignTimeMetadata,
|
|
257
|
-
action: mRevealAction,
|
|
258
|
-
sourceAggregation: sSourceAggregation,
|
|
259
|
-
targetAggregation: sTargetAggregation
|
|
260
|
-
});
|
|
261
|
-
const mName = oDesignTimeMetadata.getName(oInvisibleElement);
|
|
262
|
-
if (mName) {
|
|
263
|
-
mReveal.controlTypeNames.push(mName);
|
|
264
238
|
}
|
|
265
239
|
}
|
|
266
|
-
|
|
267
|
-
|
|
240
|
+
}
|
|
241
|
+
return mReveal;
|
|
268
242
|
}
|
|
269
243
|
|
|
270
244
|
/**
|
|
@@ -298,32 +272,28 @@ sap.ui.define([
|
|
|
298
272
|
*
|
|
299
273
|
* @return {Promise} Resolving to a structure with all "add/reveal" action relevant data collected
|
|
300
274
|
*/
|
|
301
|
-
ActionExtractor.getActions = function(bSibling, oSourceElementOverlay, oPlugin, bInvalidate, oDesignTime) {
|
|
275
|
+
ActionExtractor.getActions = async function(bSibling, oSourceElementOverlay, oPlugin, bInvalidate, oDesignTime) {
|
|
302
276
|
const sSiblingOrChild = bSibling ? "asSibling" : "asChild";
|
|
303
277
|
if (!bInvalidate && oSourceElementOverlay._mAddActions) {
|
|
304
|
-
return
|
|
278
|
+
return oSourceElementOverlay._mAddActions[sSiblingOrChild];
|
|
305
279
|
}
|
|
306
280
|
|
|
307
|
-
const
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
oSourceElementOverlay._mAddActions ||= {asSibling: {}, asChild: {}};
|
|
317
|
-
oSourceElementOverlay._mAddActions[sSiblingOrChild] = mAllActions;
|
|
318
|
-
return mAllActions;
|
|
319
|
-
});
|
|
281
|
+
const [oRevealAction, oAddViaDelegateAction] = await Promise.all([
|
|
282
|
+
this._getRevealActions(bSibling, oSourceElementOverlay, oPlugin, oDesignTime),
|
|
283
|
+
this._getAddViaDelegateActions(bSibling, oSourceElementOverlay, oPlugin)
|
|
284
|
+
]);
|
|
285
|
+
// join and condense all action data
|
|
286
|
+
const mAllActions = merge(oRevealAction, oAddViaDelegateAction);
|
|
287
|
+
oSourceElementOverlay._mAddActions ||= {asSibling: {}, asChild: {}};
|
|
288
|
+
oSourceElementOverlay._mAddActions[sSiblingOrChild] = mAllActions;
|
|
289
|
+
return mAllActions;
|
|
320
290
|
};
|
|
321
291
|
|
|
322
292
|
/**
|
|
323
293
|
* Returns the already calculated actions of an Overlay, or undefined if no actions available
|
|
324
294
|
* @param {boolean} bSibling - Indicates if the elements should be added as sibling (true) or child (false) to the overlay
|
|
325
295
|
* @param {sap.ui.dt.ElementOverlay} oOverlay - Elements will be added in relation (sibling/parent) to this overlay
|
|
326
|
-
* @returns {object
|
|
296
|
+
* @returns {object|undefined} - Object with all "add/reveal" action relevant data collected or undefined if no actions available
|
|
327
297
|
*/
|
|
328
298
|
ActionExtractor.getActionsOrUndef = function(bSibling, oOverlay) {
|
|
329
299
|
const sSiblingOrChild = bSibling ? "asSibling" : "asChild";
|
|
@@ -342,7 +312,7 @@ sap.ui.define([
|
|
|
342
312
|
*
|
|
343
313
|
* @returns {Promise<object>} Reveal action data
|
|
344
314
|
*/
|
|
345
|
-
ActionExtractor._getRevealActions = function(bSibling, oSourceElementOverlay, oPlugin, oDesignTime) {
|
|
315
|
+
ActionExtractor._getRevealActions = async function(bSibling, oSourceElementOverlay, oPlugin, oDesignTime) {
|
|
346
316
|
if (bIsSyncRegistered) {
|
|
347
317
|
bIsSyncRegistered = false;
|
|
348
318
|
oDesignTime.attachEventOnce("synced", function() {
|
|
@@ -371,19 +341,17 @@ sap.ui.define([
|
|
|
371
341
|
}).map(function(oAggregationOverlay) {
|
|
372
342
|
return oAggregationOverlay.getAggregationName();
|
|
373
343
|
});
|
|
374
|
-
|
|
344
|
+
const mAggregatedReveal = await aAggregationNames.reduce(function(oPreviousPromise, sAggregationName) {
|
|
375
345
|
return oPreviousPromise.then(function(mReveal) {
|
|
376
346
|
return getRevealActionFromAggregations(aParents, mReveal, sAggregationName, aAggregationNames, oPlugin);
|
|
377
347
|
});
|
|
378
|
-
}, Promise.resolve({}))
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
return mAggregatedReveal;
|
|
384
|
-
});
|
|
348
|
+
}, Promise.resolve({}));
|
|
349
|
+
if (bSibling) {
|
|
350
|
+
mRevealCache[mParents.parentOverlay.getId()] = mAggregatedReveal;
|
|
351
|
+
}
|
|
352
|
+
return mAggregatedReveal;
|
|
385
353
|
}
|
|
386
|
-
return
|
|
354
|
+
return {};
|
|
387
355
|
};
|
|
388
356
|
|
|
389
357
|
/**
|
|
@@ -415,4 +383,4 @@ sap.ui.define([
|
|
|
415
383
|
};
|
|
416
384
|
|
|
417
385
|
return ActionExtractor;
|
|
418
|
-
});
|
|
386
|
+
});
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2025 SAP SE or an SAP affiliate company.
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
sap.ui.define([
|
|
7
7
|
"sap/ui/base/ManagedObject",
|
|
8
8
|
"sap/ui/core/Element",
|
|
9
9
|
"sap/ui/core/Fragment",
|
|
10
|
-
"sap/ui/core/Lib",
|
|
11
10
|
"sap/ui/model/json/JSONModel",
|
|
12
11
|
"sap/ui/model/Filter",
|
|
13
12
|
"sap/ui/model/FilterOperator",
|
|
@@ -18,7 +17,6 @@ sap.ui.define([
|
|
|
18
17
|
ManagedObject,
|
|
19
18
|
Element,
|
|
20
19
|
Fragment,
|
|
21
|
-
Lib,
|
|
22
20
|
JSONModel,
|
|
23
21
|
Filter,
|
|
24
22
|
FilterOperator,
|
|
@@ -34,13 +32,13 @@ sap.ui.define([
|
|
|
34
32
|
* @class Context - Dialog for available Fields in Runtime Authoring
|
|
35
33
|
* @extends sap.ui.base.ManagedObject
|
|
36
34
|
* @author SAP SE
|
|
37
|
-
* @version 1.
|
|
35
|
+
* @version 1.132.1
|
|
38
36
|
* @constructor
|
|
39
37
|
* @private
|
|
40
38
|
* @since 1.44
|
|
41
39
|
* @alias sap.ui.rta.plugin.additionalElements.AddElementsDialog
|
|
42
40
|
*/
|
|
43
|
-
|
|
41
|
+
const AddElementsDialog = ManagedObject.extend("sap.ui.rta.plugin.additionalElements.AddElementsDialog", {
|
|
44
42
|
metadata: {
|
|
45
43
|
library: "sap.ui.rta",
|
|
46
44
|
properties: {
|
|
@@ -59,7 +57,7 @@ sap.ui.define([
|
|
|
59
57
|
}
|
|
60
58
|
});
|
|
61
59
|
|
|
62
|
-
|
|
60
|
+
let oRTAResourceModel;
|
|
63
61
|
|
|
64
62
|
/**
|
|
65
63
|
* Initialize the Dialog
|
|
@@ -124,11 +122,10 @@ sap.ui.define([
|
|
|
124
122
|
* Close the dialog.
|
|
125
123
|
* @returns {Promise} a Promise that resolves (to nothing) once the dialog is loaded and closed
|
|
126
124
|
*/
|
|
127
|
-
AddElementsDialog.prototype._submitDialog = function() {
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
}.bind(this));
|
|
125
|
+
AddElementsDialog.prototype._submitDialog = async function() {
|
|
126
|
+
const oDialog = await this._oDialogPromise;
|
|
127
|
+
oDialog.close();
|
|
128
|
+
this._fnResolveOnDialogConfirm();
|
|
132
129
|
// indicate that the dialog has been closed and the selected fields (if any) are to be added to the UI
|
|
133
130
|
};
|
|
134
131
|
|
|
@@ -188,8 +185,8 @@ sap.ui.define([
|
|
|
188
185
|
*/
|
|
189
186
|
AddElementsDialog.prototype._resortList = function() {
|
|
190
187
|
this._bDescendingSortOrder = !this._bDescendingSortOrder;
|
|
191
|
-
|
|
192
|
-
|
|
188
|
+
const oBinding = this._oList.getBinding("items");
|
|
189
|
+
const aSorter = [];
|
|
193
190
|
aSorter.push(new Sorter("label", this._bDescendingSortOrder));
|
|
194
191
|
oBinding.sort(aSorter);
|
|
195
192
|
};
|
|
@@ -201,15 +198,15 @@ sap.ui.define([
|
|
|
201
198
|
* @private
|
|
202
199
|
*/
|
|
203
200
|
AddElementsDialog.prototype._updateModelFilter = function(oEvent) {
|
|
204
|
-
|
|
205
|
-
|
|
201
|
+
const sValue = oEvent.getParameter("newValue");
|
|
202
|
+
const oBinding = this._oList.getBinding("items");
|
|
206
203
|
if ((typeof sValue) === "string") {
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
204
|
+
const oFilterLabel = new Filter("label", FilterOperator.Contains, sValue);
|
|
205
|
+
const oOriginalLabelFilter = new Filter("originalLabel", FilterOperator.Contains, sValue);
|
|
206
|
+
const oParentPropertyNameFilter = new Filter("parentPropertyName", FilterOperator.Contains, sValue);
|
|
207
|
+
const oDuplicateNameFilter = new Filter("duplicateName", FilterOperator.EQ, true);
|
|
208
|
+
const oParentNameFilter = new Filter({ filters: [oParentPropertyNameFilter, oDuplicateNameFilter], and: true });
|
|
209
|
+
const oFilterLabelOrInfo = new Filter({ filters: [oFilterLabel, oOriginalLabelFilter, oParentNameFilter], and: false });
|
|
213
210
|
oBinding.filter([oFilterLabelOrInfo]);
|
|
214
211
|
} else {
|
|
215
212
|
oBinding.filter([]);
|
|
@@ -228,19 +225,19 @@ sap.ui.define([
|
|
|
228
225
|
});
|
|
229
226
|
};
|
|
230
227
|
|
|
231
|
-
AddElementsDialog.prototype.setTitle = function(sTitle) {
|
|
228
|
+
AddElementsDialog.prototype.setTitle = async function(sTitle) {
|
|
232
229
|
ManagedObject.prototype.setProperty.call(this, "title", sTitle, true);
|
|
233
|
-
this._oDialogPromise
|
|
234
|
-
|
|
235
|
-
});
|
|
230
|
+
const oDialog = await this._oDialogPromise;
|
|
231
|
+
oDialog.setTitle(sTitle);
|
|
236
232
|
};
|
|
237
233
|
|
|
238
234
|
/**
|
|
239
235
|
* Sets the information for the extensibility menu button items
|
|
240
236
|
*
|
|
241
|
-
* @param {
|
|
242
|
-
* @param {string}
|
|
243
|
-
* @param {
|
|
237
|
+
* @param {object} oExtensibilityInfo - Information for the extensibility menu button
|
|
238
|
+
* @param {string} oExtensibilityInfo.UITexts.buttonText - Text for the extensibility MenuButton
|
|
239
|
+
* @param {string} oExtensibilityInfo.UITexts.tooltip - Tooltip for the extensibility MenuButton
|
|
240
|
+
* @param {object[]} oExtensibilityInfo.UITexts.options - Options available on the extensibility MenuButton
|
|
244
241
|
* @public
|
|
245
242
|
*/
|
|
246
243
|
AddElementsDialog.prototype.setExtensibilityOptions = function(oExtensibilityInfo) {
|
|
@@ -286,7 +283,7 @@ sap.ui.define([
|
|
|
286
283
|
// clear old values from last run
|
|
287
284
|
this._removeExtensionDataTexts();
|
|
288
285
|
|
|
289
|
-
|
|
286
|
+
const aBusinessContextTexts = this._oDialogModel.getObject("/businessContextTexts");
|
|
290
287
|
if (aContexts && aContexts.length > 0) {
|
|
291
288
|
aContexts.forEach(function(oContext) {
|
|
292
289
|
aBusinessContextTexts.push({
|
|
@@ -313,9 +310,9 @@ sap.ui.define([
|
|
|
313
310
|
* @private
|
|
314
311
|
*/
|
|
315
312
|
AddElementsDialog.prototype._removeExtensionDataTexts = function() {
|
|
316
|
-
|
|
313
|
+
const aBusinessContextTexts = this._oDialogModel.getObject("/businessContextTexts");
|
|
317
314
|
aBusinessContextTexts.splice(1);
|
|
318
315
|
};
|
|
319
316
|
|
|
320
317
|
return AddElementsDialog;
|
|
321
|
-
});
|
|
318
|
+
});
|