@openui5/sap.ui.rta 1.136.4 → 1.139.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/README.md +1 -1
- package/REUSE.toml +8 -29
- package/THIRDPARTY.txt +72 -90
- package/package.json +7 -7
- package/src/sap/ui/rta/.library +1 -1
- package/src/sap/ui/rta/Client.js +1 -1
- package/src/sap/ui/rta/RuntimeAuthoring.js +90 -127
- package/src/sap/ui/rta/Utils.js +1 -1
- package/src/sap/ui/rta/appVariant/AppVariantDialog.js +5 -4
- package/src/sap/ui/rta/appVariant/AppVariantManager.js +1 -1
- package/src/sap/ui/rta/command/AddIFrame.js +12 -5
- package/src/sap/ui/rta/command/AddProperty.js +1 -1
- package/src/sap/ui/rta/command/AddXML.js +1 -1
- package/src/sap/ui/rta/command/AddXMLAtExtensionPoint.js +1 -1
- package/src/sap/ui/rta/command/AnnotationCommand.js +1 -1
- package/src/sap/ui/rta/command/BaseCommand.js +1 -1
- 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 +1 -1
- package/src/sap/ui/rta/command/CompositeCommand.js +1 -1
- package/src/sap/ui/rta/command/ControlVariantConfigure.js +1 -1
- package/src/sap/ui/rta/command/ControlVariantSave.js +1 -1
- package/src/sap/ui/rta/command/ControlVariantSaveAs.js +1 -1
- package/src/sap/ui/rta/command/ControlVariantSetTitle.js +1 -1
- package/src/sap/ui/rta/command/ControlVariantSwitch.js +1 -1
- package/src/sap/ui/rta/command/CreateContainer.js +1 -1
- package/src/sap/ui/rta/command/CustomAdd.js +1 -1
- package/src/sap/ui/rta/command/ExtendControllerCommand.js +1 -1
- package/src/sap/ui/rta/command/FlexCommand.js +2 -3
- package/src/sap/ui/rta/command/LREPSerializer.js +2 -85
- package/src/sap/ui/rta/command/LocalReset.js +1 -1
- package/src/sap/ui/rta/command/ManifestCommand.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 +115 -87
- 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/command/manifest/AddLibrary.js +1 -1
- package/src/sap/ui/rta/enablement/elementActionTest.js +1 -1
- package/src/sap/ui/rta/library.js +2 -2
- package/src/sap/ui/rta/messagebundle.properties +39 -57
- package/src/sap/ui/rta/messagebundle_ar.properties +7 -31
- package/src/sap/ui/rta/messagebundle_bg.properties +8 -32
- package/src/sap/ui/rta/messagebundle_ca.properties +8 -32
- package/src/sap/ui/rta/messagebundle_cnr.properties +7 -31
- package/src/sap/ui/rta/messagebundle_cs.properties +7 -31
- package/src/sap/ui/rta/messagebundle_cy.properties +8 -32
- package/src/sap/ui/rta/messagebundle_da.properties +8 -32
- package/src/sap/ui/rta/messagebundle_de.properties +6 -30
- package/src/sap/ui/rta/messagebundle_el.properties +8 -32
- package/src/sap/ui/rta/messagebundle_en.properties +8 -32
- package/src/sap/ui/rta/messagebundle_en_GB.properties +8 -32
- package/src/sap/ui/rta/messagebundle_en_US_saprigi.properties +29 -48
- package/src/sap/ui/rta/messagebundle_es.properties +8 -32
- package/src/sap/ui/rta/messagebundle_es_MX.properties +15 -39
- package/src/sap/ui/rta/messagebundle_et.properties +8 -32
- package/src/sap/ui/rta/messagebundle_fi.properties +8 -32
- package/src/sap/ui/rta/messagebundle_fr.properties +9 -33
- package/src/sap/ui/rta/messagebundle_fr_CA.properties +8 -32
- package/src/sap/ui/rta/messagebundle_hi.properties +7 -31
- package/src/sap/ui/rta/messagebundle_hr.properties +8 -32
- package/src/sap/ui/rta/messagebundle_hu.properties +8 -32
- package/src/sap/ui/rta/messagebundle_id.properties +9 -33
- package/src/sap/ui/rta/messagebundle_it.properties +8 -32
- package/src/sap/ui/rta/messagebundle_iw.properties +7 -31
- package/src/sap/ui/rta/messagebundle_ja.properties +8 -32
- package/src/sap/ui/rta/messagebundle_kk.properties +9 -33
- package/src/sap/ui/rta/messagebundle_ko.properties +8 -32
- package/src/sap/ui/rta/messagebundle_lt.properties +8 -32
- package/src/sap/ui/rta/messagebundle_lv.properties +8 -32
- package/src/sap/ui/rta/messagebundle_mk.properties +8 -32
- package/src/sap/ui/rta/messagebundle_ms.properties +8 -32
- package/src/sap/ui/rta/messagebundle_nl.properties +7 -31
- package/src/sap/ui/rta/messagebundle_no.properties +8 -32
- package/src/sap/ui/rta/messagebundle_pl.properties +8 -32
- package/src/sap/ui/rta/messagebundle_pt.properties +8 -32
- package/src/sap/ui/rta/messagebundle_pt_PT.properties +8 -32
- package/src/sap/ui/rta/messagebundle_ro.properties +8 -32
- package/src/sap/ui/rta/messagebundle_ru.properties +8 -32
- package/src/sap/ui/rta/messagebundle_sh.properties +7 -31
- package/src/sap/ui/rta/messagebundle_sk.properties +8 -32
- package/src/sap/ui/rta/messagebundle_sl.properties +8 -32
- package/src/sap/ui/rta/messagebundle_sr.properties +7 -31
- package/src/sap/ui/rta/messagebundle_sv.properties +8 -32
- package/src/sap/ui/rta/messagebundle_th.properties +8 -32
- package/src/sap/ui/rta/messagebundle_tr.properties +8 -32
- package/src/sap/ui/rta/messagebundle_uk.properties +8 -32
- package/src/sap/ui/rta/messagebundle_vi.properties +9 -33
- package/src/sap/ui/rta/messagebundle_zh_CN.properties +8 -32
- package/src/sap/ui/rta/messagebundle_zh_TW.properties +8 -32
- package/src/sap/ui/rta/plugin/AddXMLAtExtensionPoint.js +1 -1
- package/src/sap/ui/rta/plugin/AddXMLPlugin.js +3 -2
- package/src/sap/ui/rta/plugin/BaseCreate.js +1 -1
- package/src/sap/ui/rta/plugin/Combine.js +1 -1
- package/src/sap/ui/rta/plugin/ControlVariant.js +1 -1
- package/src/sap/ui/rta/plugin/CreateContainer.js +57 -35
- package/src/sap/ui/rta/plugin/CutPaste.js +1 -1
- package/src/sap/ui/rta/plugin/DragDrop.js +1 -1
- package/src/sap/ui/rta/plugin/ExtendControllerPlugin.js +3 -2
- package/src/sap/ui/rta/plugin/LocalReset.js +1 -1
- package/src/sap/ui/rta/plugin/Plugin.js +1 -1
- package/src/sap/ui/rta/plugin/RTAElementMover.js +1 -1
- package/src/sap/ui/rta/plugin/Remove.js +1 -1
- package/src/sap/ui/rta/plugin/Resize.js +1 -1
- package/src/sap/ui/rta/plugin/Selection.js +14 -7
- package/src/sap/ui/rta/plugin/Settings.js +1 -1
- package/src/sap/ui/rta/plugin/Split.js +1 -1
- package/src/sap/ui/rta/plugin/Stretch.js +1 -1
- package/src/sap/ui/rta/plugin/additionalElements/ActionExtractor.js +11 -1
- package/src/sap/ui/rta/plugin/additionalElements/AddElementsDialog.js +1 -1
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsPlugin.js +1 -1
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsUtils.js +1 -1
- package/src/sap/ui/rta/plugin/additionalElements/CommandBuilder.js +1 -1
- package/src/sap/ui/rta/plugin/annotations/AnnotationChangeDialog.fragment.xml +16 -3
- package/src/sap/ui/rta/plugin/annotations/AnnotationChangeDialog.js +1 -1
- package/src/sap/ui/rta/plugin/annotations/AnnotationChangeDialogController.js +1 -1
- package/src/sap/ui/rta/plugin/annotations/AnnotationPlugin.js +3 -3
- package/src/sap/ui/rta/plugin/iframe/AddIFrame.js +1 -1
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.fragment.xml +256 -203
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.js +28 -75
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialogController.js +72 -17
- package/src/sap/ui/rta/plugin/rename/Rename.js +1 -1
- package/src/sap/ui/rta/plugin/rename/RenameDialog.fragment.xml +2 -2
- package/src/sap/ui/rta/plugin/rename/RenameDialog.js +41 -23
- package/src/sap/ui/rta/service/Action.js +1 -1
- package/src/sap/ui/rta/service/ControllerExtension.js +1 -1
- package/src/sap/ui/rta/service/Outline.js +1 -1
- package/src/sap/ui/rta/service/Property.js +1 -1
- package/src/sap/ui/rta/service/Selection.js +1 -1
- package/src/sap/ui/rta/service/SupportTools.js +1 -1
- package/src/sap/ui/rta/themes/base/AddIFrame.less +23 -33
- package/src/sap/ui/rta/toolbar/ActionsMenu.fragment.xml +4 -2
- package/src/sap/ui/rta/toolbar/Adaptation.js +16 -3
- package/src/sap/ui/rta/toolbar/Base.js +1 -1
- package/src/sap/ui/rta/toolbar/Fiori.js +2 -7
- package/src/sap/ui/rta/toolbar/FioriLike.js +1 -1
- package/src/sap/ui/rta/toolbar/OverflowToolbarButton.js +1 -1
- package/src/sap/ui/rta/toolbar/Standalone.js +1 -1
- package/src/sap/ui/rta/toolbar/contextBased/SaveAsAdaptation.js +1 -1
- package/src/sap/ui/rta/toolbar/translation/Translation.js +1 -1
- package/src/sap/ui/rta/toolbar/versioning/Versioning.js +1 -1
- package/src/sap/ui/rta/util/Animation.js +4 -6
- package/src/sap/ui/rta/util/BindingsExtractor.js +44 -53
- package/src/sap/ui/rta/util/PluginManager.js +6 -6
- package/src/sap/ui/rta/util/PopupManager.js +90 -109
- package/src/sap/ui/rta/util/ReloadManager.js +53 -98
- package/src/sap/ui/rta/util/ServiceEventBus.js +3 -4
- package/src/sap/ui/rta/util/ServiceManager.js +1 -1
- package/src/sap/ui/rta/util/adaptationStarter.js +59 -80
- package/src/sap/ui/rta/util/changeVisualization/ChangeCategories.js +3 -3
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicator.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorRegistry.js +5 -4
- package/src/sap/ui/rta/util/changeVisualization/ChangeStates.js +2 -4
- package/src/sap/ui/rta/util/changeVisualization/ChangeVisualization.js +13 -25
- package/src/sap/ui/rta/util/changeVisualization/ChangeVisualizationUtils.js +5 -7
- package/src/sap/ui/rta/util/changeVisualization/commands/CombineVisualization.js +9 -9
- package/src/sap/ui/rta/util/changeVisualization/commands/CreateContainerVisualization.js +5 -5
- package/src/sap/ui/rta/util/changeVisualization/commands/MoveVisualization.js +8 -8
- package/src/sap/ui/rta/util/changeVisualization/commands/RenameVisualization.js +5 -5
- package/src/sap/ui/rta/util/changeVisualization/commands/SplitVisualization.js +5 -5
- package/src/sap/ui/rta/util/changeVisualization/commands/getCommandVisualization.js +2 -2
- package/src/sap/ui/rta/util/guidedTour/GuidedTour.js +22 -5
- package/src/sap/ui/rta/util/guidedTour/TourMarker.fragment.xml +1 -1
- package/src/sap/ui/rta/util/guidedTour/content/GeneralTour.js +1 -1
- package/src/sap/ui/rta/util/hasStableId.js +11 -19
- package/src/sap/ui/rta/util/showMessageBox.js +15 -15
- package/src/sap/ui/rta/util/validateFlexEnabled.js +35 -34
- package/src/sap/ui/rta/util/validateStableIds.js +22 -31
- package/src/sap/ui/rta/util/validateText.js +7 -7
- package/src/sap/ui/rta/util/whatsNew/WhatsNew.js +34 -9
- package/src/sap/ui/rta/util/whatsNew/WhatsNewOverview.js +2 -6
- package/src/sap/ui/rta/util/whatsNew/WhatsNewOverviewDialog.fragment.xml +1 -0
- package/src/sap/ui/rta/util/whatsNew/WhatsNewUtils.js +4 -4
- package/src/sap/ui/rta/util/whatsNew/whatsNewContent/WhatsNewFeatures.js +8 -22
|
@@ -5,9 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
sap.ui.define([
|
|
7
7
|
"sap/base/Log",
|
|
8
|
-
"sap/ui/core/Control",
|
|
9
8
|
"sap/ui/core/Lib",
|
|
10
|
-
"sap/ui/core/UIComponent",
|
|
11
9
|
"sap/ui/fl/initial/api/InitialFlexAPI",
|
|
12
10
|
"sap/ui/fl/write/api/PersistenceWriteAPI",
|
|
13
11
|
"sap/ui/fl/Layer",
|
|
@@ -16,9 +14,7 @@ sap.ui.define([
|
|
|
16
14
|
"sap/ui/rta/RuntimeAuthoring"
|
|
17
15
|
], function(
|
|
18
16
|
Log,
|
|
19
|
-
Control,
|
|
20
17
|
Lib,
|
|
21
|
-
UIComponent,
|
|
22
18
|
InitialFlexAPI,
|
|
23
19
|
PersistenceWriteAPI,
|
|
24
20
|
Layer,
|
|
@@ -28,30 +24,27 @@ sap.ui.define([
|
|
|
28
24
|
) {
|
|
29
25
|
"use strict";
|
|
30
26
|
|
|
31
|
-
function checkKeyUser(sLayer) {
|
|
27
|
+
async function checkKeyUser(sLayer) {
|
|
32
28
|
if (Layer.CUSTOMER === sLayer) {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}
|
|
41
|
-
});
|
|
29
|
+
const bIsKeyUser = await InitialFlexAPI.isKeyUser();
|
|
30
|
+
if (!bIsKeyUser) {
|
|
31
|
+
const oRtaResourceBundle = Lib.getResourceBundleFor("sap.ui.rta");
|
|
32
|
+
const oError = new Error(oRtaResourceBundle.getText("MSG_NO_KEY_USER_RIGHTS_ERROR_MESSAGE"));
|
|
33
|
+
oError.reason = "isKeyUser";
|
|
34
|
+
throw oError;
|
|
35
|
+
}
|
|
42
36
|
}
|
|
43
|
-
return Promise.resolve();
|
|
44
37
|
}
|
|
45
38
|
|
|
46
39
|
function checkFlexEnabled(oAppComponent) {
|
|
47
40
|
// fiori tools is always a developer scenario where the flexEnabled flag should not be evaluated
|
|
48
|
-
|
|
41
|
+
const sFioriToolsMode = new URLSearchParams(window.location.search).get("fiori-tools-rta-mode");
|
|
49
42
|
if (!sFioriToolsMode || sFioriToolsMode === "false") {
|
|
50
|
-
|
|
51
|
-
|
|
43
|
+
const oManifest = oAppComponent.getManifest() || {};
|
|
44
|
+
const vFlexEnabled = oManifest["sap.ui5"] && oManifest["sap.ui5"].flexEnabled;
|
|
52
45
|
|
|
53
46
|
if (vFlexEnabled === false) {
|
|
54
|
-
|
|
47
|
+
const oError = Error("This app is not enabled for key user adaptation");
|
|
55
48
|
oError.reason = "flexEnabled";
|
|
56
49
|
throw oError;
|
|
57
50
|
}
|
|
@@ -62,8 +55,7 @@ sap.ui.define([
|
|
|
62
55
|
// pseudo app variants are not supported
|
|
63
56
|
const oComponentData = oAppComponent.getComponentData?.();
|
|
64
57
|
if (oComponentData?.startupParameters && Array.isArray(oComponentData.startupParameters["sap-app-id"])) {
|
|
65
|
-
const
|
|
66
|
-
const sACHComponent = oManifest["sap.app"]?.ach;
|
|
58
|
+
const sACHComponent = oAppComponent.getManifest()["sap.app"]?.ach;
|
|
67
59
|
const oRtaResourceBundle = Lib.getResourceBundleFor("sap.ui.rta");
|
|
68
60
|
const sErrorMessage = oRtaResourceBundle.getText("MSG_PSEUDO_APP_VARIANT_ERROR_MESSAGE", [sACHComponent]);
|
|
69
61
|
const oError = Error(sErrorMessage);
|
|
@@ -81,54 +73,46 @@ sap.ui.define([
|
|
|
81
73
|
*
|
|
82
74
|
* @param {object} mOptions - Object with properties
|
|
83
75
|
* @param {sap.ui.core.Control|sap.ui.core.UIComponent} mOptions.rootControl - Control instance to get the AppComponent. This then is used to start UI adaptation.
|
|
84
|
-
* @param {function} [
|
|
85
|
-
* @param {function} [
|
|
86
|
-
* @param {function} [
|
|
87
|
-
* @param {function} [
|
|
76
|
+
* @param {function} [fnLoadPlugins] - Callback function that enables the modification of the default plugin list of UI adaptation. UI adaptation is passed to this function and it should return a promise
|
|
77
|
+
* @param {function} [fnOnStart] - Event handler function called on start event
|
|
78
|
+
* @param {function} [fnOnFailed] - Event handler function called on failed event
|
|
79
|
+
* @param {function} [fnOnStop] - Event handler function called on stop event
|
|
88
80
|
* @returns {Promise} Resolves when UI adaptation was successfully started with adaptation instance.
|
|
89
81
|
* @private
|
|
90
82
|
*/
|
|
91
|
-
function adaptationStarter(mOptions,
|
|
92
|
-
|
|
83
|
+
async function adaptationStarter(mOptions, fnLoadPlugins, fnOnStart, fnOnFailed, fnOnStop) {
|
|
84
|
+
const oRtaResourceBundle = Lib.getResourceBundleFor("sap.ui.rta");
|
|
93
85
|
|
|
94
|
-
|
|
95
|
-
if (!(mOptions.rootControl
|
|
96
|
-
|
|
86
|
+
try {
|
|
87
|
+
if (!(mOptions.rootControl?.isA("sap.ui.core.Control")) && !(mOptions.rootControl?.isA("sap.ui.core.UIComponent"))) {
|
|
88
|
+
const oError = Error("An invalid root control was passed");
|
|
97
89
|
oError.reason = "rootControl";
|
|
98
90
|
throw oError;
|
|
99
91
|
}
|
|
100
92
|
mOptions.rootControl = FlexUtils.getAppComponentForControl(mOptions.rootControl);
|
|
101
|
-
})
|
|
102
|
-
.then(checkKeyUser.bind(undefined, mOptions.flexSettings.layer))
|
|
103
|
-
.then(function() {
|
|
104
|
-
return checkFlexEnabled(mOptions.rootControl);
|
|
105
|
-
})
|
|
106
|
-
.then(checkPseudoAppVariant.bind(undefined, mOptions.rootControl))
|
|
107
|
-
.then(function() {
|
|
108
|
-
oRta = new RuntimeAuthoring(mOptions);
|
|
109
93
|
|
|
110
|
-
|
|
111
|
-
|
|
94
|
+
await checkKeyUser(mOptions.flexSettings.layer);
|
|
95
|
+
checkFlexEnabled(mOptions.rootControl);
|
|
96
|
+
checkPseudoAppVariant(mOptions.rootControl);
|
|
97
|
+
|
|
98
|
+
const oRta = new RuntimeAuthoring(mOptions);
|
|
99
|
+
if (fnOnStart) {
|
|
100
|
+
oRta.attachEvent("start", fnOnStart);
|
|
112
101
|
}
|
|
113
|
-
if (
|
|
114
|
-
oRta.attachEvent("failed",
|
|
102
|
+
if (fnOnFailed) {
|
|
103
|
+
oRta.attachEvent("failed", fnOnFailed);
|
|
115
104
|
}
|
|
116
|
-
|
|
105
|
+
oRta.attachEvent("stop", fnOnStop || function() {
|
|
117
106
|
oRta.destroy();
|
|
118
|
-
};
|
|
119
|
-
oRta.attachEvent("stop", fnOnStop);
|
|
107
|
+
});
|
|
120
108
|
|
|
121
|
-
if (
|
|
122
|
-
|
|
109
|
+
if (fnLoadPlugins) {
|
|
110
|
+
await fnLoadPlugins(oRta);
|
|
123
111
|
}
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
.then(function() {
|
|
127
|
-
return oRta.start();
|
|
128
|
-
})
|
|
129
|
-
.then(function() {
|
|
112
|
+
await oRta.start();
|
|
113
|
+
|
|
130
114
|
if (mOptions.flexSettings.layer === "CUSTOMER") {
|
|
131
|
-
|
|
115
|
+
const mPropertyBag = {
|
|
132
116
|
oComponent: mOptions.rootControl,
|
|
133
117
|
selector: mOptions.rootControl,
|
|
134
118
|
invalidateCache: false,
|
|
@@ -136,38 +120,33 @@ sap.ui.define([
|
|
|
136
120
|
currentLayer: Layer.CUSTOMER
|
|
137
121
|
};
|
|
138
122
|
|
|
139
|
-
PersistenceWriteAPI.getChangesWarning(mPropertyBag)
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
:
|
|
149
|
-
|
|
150
|
-
title: "TIT_ADAPTATION_STARTER_NO_CHANGES_IN_P_TITLE"
|
|
151
|
-
};
|
|
123
|
+
const oWarningMessage = await PersistenceWriteAPI.getChangesWarning(mPropertyBag);
|
|
124
|
+
if (oWarningMessage.showWarning) {
|
|
125
|
+
const oMessageProps = oWarningMessage.warningType === "mixedChangesWarning"
|
|
126
|
+
? {
|
|
127
|
+
text: "MSG_ADAPTATION_STARTER_MIXED_CHANGES_WARNING",
|
|
128
|
+
title: "TIT_ADAPTATION_STARTER_MIXED_CHANGES_TITLE"
|
|
129
|
+
}
|
|
130
|
+
: {
|
|
131
|
+
text: "MSG_ADAPTATION_STARTER_NO_CHANGES_IN_P_WARNING",
|
|
132
|
+
title: "TIT_ADAPTATION_STARTER_NO_CHANGES_IN_P_TITLE"
|
|
133
|
+
};
|
|
152
134
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
});
|
|
135
|
+
showMessageBox(
|
|
136
|
+
oRtaResourceBundle.getText(oMessageProps.text),
|
|
137
|
+
{
|
|
138
|
+
title: oRtaResourceBundle.getText(oMessageProps.title)
|
|
139
|
+
},
|
|
140
|
+
"warning"
|
|
141
|
+
);
|
|
142
|
+
}
|
|
162
143
|
}
|
|
163
144
|
return oRta;
|
|
164
|
-
})
|
|
165
|
-
.catch(function(vError) {
|
|
145
|
+
} catch (vError) {
|
|
166
146
|
if (
|
|
167
147
|
vError.message !== "Reload triggered"
|
|
168
148
|
&& !(FlexUtils.getUshellContainer() && vError.reason === "flexEnabled") // FLP Plugin already handles this error
|
|
169
149
|
) {
|
|
170
|
-
var oRtaResourceBundle = Lib.getResourceBundleFor("sap.ui.rta");
|
|
171
150
|
if (vError.reason === "isKeyUser" || vError.reason === "pseudoAppVariant") {
|
|
172
151
|
showMessageBox(
|
|
173
152
|
vError.message,
|
|
@@ -184,7 +163,7 @@ sap.ui.define([
|
|
|
184
163
|
Log.error("UI Adaptation could not be started", vError.message);
|
|
185
164
|
}
|
|
186
165
|
throw vError;
|
|
187
|
-
}
|
|
166
|
+
}
|
|
188
167
|
}
|
|
189
168
|
return adaptationStarter;
|
|
190
169
|
});
|
|
@@ -11,12 +11,12 @@ sap.ui.define([
|
|
|
11
11
|
) {
|
|
12
12
|
"use strict";
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
const ChangeCategories = {};
|
|
15
15
|
|
|
16
16
|
ChangeCategories.ALL = "all";
|
|
17
17
|
|
|
18
18
|
// Assignment of commands to change categories
|
|
19
|
-
|
|
19
|
+
const COMMANDS = {};
|
|
20
20
|
COMMANDS[FlChangeCategories.ADD] = [
|
|
21
21
|
"createContainer",
|
|
22
22
|
"addDelegateProperty",
|
|
@@ -29,7 +29,7 @@ sap.ui.define([
|
|
|
29
29
|
COMMANDS[FlChangeCategories.REMOVE] = ["remove"];
|
|
30
30
|
COMMANDS[FlChangeCategories.OTHER] = [];
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
const CATEGORY_ICONS = {};
|
|
33
33
|
CATEGORY_ICONS[ChangeCategories.ALL] = "sap-icon://show";
|
|
34
34
|
CATEGORY_ICONS[FlChangeCategories.ADD] = "sap-icon://add";
|
|
35
35
|
CATEGORY_ICONS[FlChangeCategories.MOVE] = "sap-icon://move";
|
|
@@ -46,7 +46,7 @@ sap.ui.define([
|
|
|
46
46
|
* @alias sap.ui.rta.util.changeVisualization.ChangeIndicator
|
|
47
47
|
* @author SAP SE
|
|
48
48
|
* @since 1.84.0
|
|
49
|
-
* @version 1.
|
|
49
|
+
* @version 1.139.0
|
|
50
50
|
* @private
|
|
51
51
|
*/
|
|
52
52
|
const ChangeIndicator = Control.extend("sap.ui.rta.util.changeVisualization.ChangeIndicator", {
|
|
@@ -37,7 +37,7 @@ sap.ui.define([
|
|
|
37
37
|
* @alias sap.ui.rta.util.changeVisualization.ChangeIndicatorRegistry
|
|
38
38
|
* @author SAP SE
|
|
39
39
|
* @since 1.86.0
|
|
40
|
-
* @version 1.
|
|
40
|
+
* @version 1.139.0
|
|
41
41
|
* @private
|
|
42
42
|
*/
|
|
43
43
|
const ChangeIndicatorRegistry = ManagedObject.extend("sap.ui.rta.util.changeVisualization.ChangeIndicatorRegistry", {
|
|
@@ -293,10 +293,11 @@ sap.ui.define([
|
|
|
293
293
|
|
|
294
294
|
/**
|
|
295
295
|
* Waits for the registered indicators to be rendered.
|
|
296
|
-
* @returns {Promise} Resolves when all
|
|
296
|
+
* @returns {Promise} Resolves when all visible indicators are rendered.
|
|
297
297
|
*/
|
|
298
298
|
ChangeIndicatorRegistry.prototype.waitForIndicatorRendering = function() {
|
|
299
|
-
|
|
299
|
+
const aVisibleIndicators = this.getChangeIndicators().filter((oIndicator) => oIndicator.getVisible());
|
|
300
|
+
return Promise.all(aVisibleIndicators.map((oIndicator) => oIndicator.waitForRendering()));
|
|
300
301
|
};
|
|
301
302
|
|
|
302
303
|
/**
|
|
@@ -348,4 +349,4 @@ sap.ui.define([
|
|
|
348
349
|
};
|
|
349
350
|
|
|
350
351
|
return ChangeIndicatorRegistry;
|
|
351
|
-
});
|
|
352
|
+
});
|
|
@@ -4,12 +4,10 @@
|
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
sap.ui.define([
|
|
8
|
-
], function(
|
|
9
|
-
) {
|
|
7
|
+
sap.ui.define([], function() {
|
|
10
8
|
"use strict";
|
|
11
9
|
|
|
12
|
-
|
|
10
|
+
const ChangeStates = {};
|
|
13
11
|
|
|
14
12
|
ChangeStates.ALL = "all";
|
|
15
13
|
ChangeStates.DRAFT = "draft";
|
|
@@ -84,7 +84,7 @@ sap.ui.define([
|
|
|
84
84
|
* @alias sap.ui.rta.util.changeVisualization.ChangeVisualization
|
|
85
85
|
* @author SAP SE
|
|
86
86
|
* @since 1.84.0
|
|
87
|
-
* @version 1.
|
|
87
|
+
* @version 1.139.0
|
|
88
88
|
* @private
|
|
89
89
|
*/
|
|
90
90
|
const ChangeVisualization = Control.extend("sap.ui.rta.util.changeVisualization.ChangeVisualization", {
|
|
@@ -133,7 +133,6 @@ sap.ui.define([
|
|
|
133
133
|
});
|
|
134
134
|
this._oChangeVisualizationModel.setDefaultBindingMode("TwoWay");
|
|
135
135
|
this._sSelectedChangeCategory = ChangeCategories.ALL;
|
|
136
|
-
this._bSetModeChanged = false;
|
|
137
136
|
|
|
138
137
|
// For the event handlers to work, the function instance has to remain stable
|
|
139
138
|
this._fnOnClickHandler = _onClick.bind(this);
|
|
@@ -266,10 +265,7 @@ sap.ui.define([
|
|
|
266
265
|
|
|
267
266
|
// Filter allRegisteredChanges for independent changes and get the ids
|
|
268
267
|
const aRegisteredIndependentChanges = aAllRegisteredChanges.filter(function(oChange) {
|
|
269
|
-
|
|
270
|
-
return true;
|
|
271
|
-
}
|
|
272
|
-
return false;
|
|
268
|
+
return !oChange.dependent;
|
|
273
269
|
});
|
|
274
270
|
|
|
275
271
|
const oSortedChanges = this._determineChangeVisibility(
|
|
@@ -336,29 +332,21 @@ sap.ui.define([
|
|
|
336
332
|
return `${sBaseText} (${sStateText})`;
|
|
337
333
|
};
|
|
338
334
|
|
|
339
|
-
ChangeVisualization.prototype.openChangeCategorySelectionPopover = function(oEvent) {
|
|
335
|
+
ChangeVisualization.prototype.openChangeCategorySelectionPopover = async function(oEvent) {
|
|
340
336
|
// Event bubbled through the toolbar, get original source
|
|
341
|
-
this._oToolbarButton ||= Element.getElementById(oEvent
|
|
342
|
-
const oPopover = this.getPopover();
|
|
337
|
+
this._oToolbarButton ||= Element.getElementById(oEvent?.getParameter("id"));
|
|
338
|
+
const oPopover = this.getPopover?.();
|
|
343
339
|
|
|
344
340
|
if (!oPopover) {
|
|
345
|
-
Fragment.load({
|
|
341
|
+
const oPopover = await Fragment.load({
|
|
346
342
|
name: "sap.ui.rta.util.changeVisualization.ChangeIndicatorCategorySelection",
|
|
347
343
|
id: `${this._oToolbarButton.sId}--ChangeIndicatorCategorySelection`,
|
|
348
344
|
controller: this
|
|
349
|
-
})
|
|
350
|
-
.
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
this.setPopover(oPopover);
|
|
355
|
-
// Currently required because of an binding issue from the control
|
|
356
|
-
// At the first opening of the popover the controls don't get updated when the bound
|
|
357
|
-
// model changes. With the reopening this Problem gets fixed
|
|
358
|
-
// TODO Remove once control owners have fixed the issue
|
|
359
|
-
oPopover.close();
|
|
360
|
-
oPopover.openBy(this._oToolbarButton);
|
|
361
|
-
}.bind(this));
|
|
345
|
+
});
|
|
346
|
+
this._oToolbarButton.addDependent(oPopover);
|
|
347
|
+
oPopover.setModel(this._oChangeVisualizationModel, "visualizationModel");
|
|
348
|
+
oPopover.openBy(this._oToolbarButton);
|
|
349
|
+
this.setPopover(oPopover);
|
|
362
350
|
return;
|
|
363
351
|
}
|
|
364
352
|
|
|
@@ -633,7 +621,7 @@ sap.ui.define([
|
|
|
633
621
|
// Set the tabindex according the sorting
|
|
634
622
|
// Focus the first visible indicator
|
|
635
623
|
await this._oChangeIndicatorRegistry.waitForIndicatorRendering();
|
|
636
|
-
|
|
624
|
+
|
|
637
625
|
this._oChangeIndicatorRegistry.getChangeIndicators().forEach((oIndicator) => {
|
|
638
626
|
const oOverlay = OverlayRegistry.getOverlay(oIndicator.getOverlayId());
|
|
639
627
|
// As setting the focus happens asynchronously after rendering,
|
|
@@ -643,12 +631,12 @@ sap.ui.define([
|
|
|
643
631
|
}
|
|
644
632
|
if (oIndicator.getVisible()) {
|
|
645
633
|
oOverlay.setFocusable(true);
|
|
646
|
-
aVisibleIndicators.push(oIndicator);
|
|
647
634
|
} else {
|
|
648
635
|
oOverlay.setFocusable(false);
|
|
649
636
|
}
|
|
650
637
|
});
|
|
651
638
|
|
|
639
|
+
const aVisibleIndicators = this._oChangeIndicatorRegistry.getChangeIndicators().filter((oIndicator) => oIndicator.getVisible());
|
|
652
640
|
if (aVisibleIndicators.length > 0) {
|
|
653
641
|
aVisibleIndicators.sort(function(oIndicator1, oIndicator2) {
|
|
654
642
|
const iDeltaY = oIndicator1.getPosY() - oIndicator2.getPosY();
|
|
@@ -4,12 +4,10 @@
|
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
sap.ui.define([
|
|
8
|
-
], function(
|
|
9
|
-
) {
|
|
7
|
+
sap.ui.define([], function() {
|
|
10
8
|
"use strict";
|
|
11
9
|
|
|
12
|
-
|
|
10
|
+
const ChangeVisualizationUtils = {};
|
|
13
11
|
|
|
14
12
|
/**
|
|
15
13
|
*
|
|
@@ -24,10 +22,10 @@ sap.ui.define([
|
|
|
24
22
|
if (!sString) {
|
|
25
23
|
return null;
|
|
26
24
|
}
|
|
27
|
-
|
|
25
|
+
const iStringLength = sString.length;
|
|
28
26
|
if (iStringLength > 60) {
|
|
29
|
-
|
|
30
|
-
|
|
27
|
+
const sFirstPart = sString.substring(0, 27);
|
|
28
|
+
const sLastPart = sString.substring(iStringLength - 27);
|
|
31
29
|
sString = `${sFirstPart}(...)${sLastPart}`;
|
|
32
30
|
}
|
|
33
31
|
return sString;
|
|
@@ -19,9 +19,9 @@ sap.ui.define([
|
|
|
19
19
|
) {
|
|
20
20
|
"use strict";
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
const oRtaResourceBundle = Lib.getResourceBundleFor("sap.ui.rta");
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
const CombineVisualization = {};
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
27
|
* Creates a localized description for combine changes based on the provided
|
|
@@ -35,7 +35,7 @@ sap.ui.define([
|
|
|
35
35
|
* @returns {object} Map containing localized description text and tooltip
|
|
36
36
|
*/
|
|
37
37
|
CombineVisualization.getDescription = function(mPayload, sLabel, mPropertyBag) {
|
|
38
|
-
|
|
38
|
+
const iOriginalSelectorCount = (mPayload.originalSelectors || []).length;
|
|
39
39
|
if (iOriginalSelectorCount < 2) {
|
|
40
40
|
// Fallback if no payload was provided
|
|
41
41
|
return {
|
|
@@ -50,14 +50,14 @@ sap.ui.define([
|
|
|
50
50
|
};
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
53
|
+
const oAppComponent = mPropertyBag.appComponent;
|
|
54
|
+
const aOriginalSelectors = mPayload.originalSelectors;
|
|
55
|
+
const aLabels = aOriginalSelectors.map(function(oSelector) {
|
|
56
|
+
const sId = JsControlTreeModifier.getControlIdBySelector(oSelector, oAppComponent);
|
|
57
|
+
const oControl = Element.getElementById(sId);
|
|
58
58
|
return oControl ? ElementUtil.getLabelForElement(oControl) : sId;
|
|
59
59
|
});
|
|
60
|
-
|
|
60
|
+
const aShortLabels = aLabels.map(ChangeVisualizationUtils.shortenString);
|
|
61
61
|
|
|
62
62
|
if (iOriginalSelectorCount === 2) {
|
|
63
63
|
return {
|
|
@@ -13,7 +13,7 @@ sap.ui.define([
|
|
|
13
13
|
) {
|
|
14
14
|
"use strict";
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
const CreateContainerVisualization = {};
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
19
|
* Creates a localized description for create container, based on the provided
|
|
@@ -25,10 +25,10 @@ sap.ui.define([
|
|
|
25
25
|
* @returns {object} Map containing localized description text and tooltip
|
|
26
26
|
*/
|
|
27
27
|
CreateContainerVisualization.getDescription = function(mPayload, sLabel) {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
const oRtaResourceBundle = Lib.getResourceBundleFor("sap.ui.rta");
|
|
29
|
+
const sElementLabel = mPayload.originalLabel || sLabel;
|
|
30
|
+
const sShortenedElementLabel = ChangeVisualizationUtils.shortenString(sElementLabel);
|
|
31
|
+
const sTextKey = "TXT_CHANGEVISUALIZATION_CHANGE_CREATECONTAINER";
|
|
32
32
|
return {
|
|
33
33
|
descriptionText: oRtaResourceBundle.getText(sTextKey, [sShortenedElementLabel]),
|
|
34
34
|
descriptionTooltip: oRtaResourceBundle.getText(sTextKey, [sElementLabel])
|
|
@@ -15,7 +15,7 @@ sap.ui.define([
|
|
|
15
15
|
) {
|
|
16
16
|
"use strict";
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
const MoveVisualization = {};
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
21
|
* Creates a localized description and button text for move changes based on the provided
|
|
@@ -29,17 +29,17 @@ sap.ui.define([
|
|
|
29
29
|
* @returns {object} Localized description text and button text
|
|
30
30
|
*/
|
|
31
31
|
MoveVisualization.getDescription = function(mPayload, sLabel, mPropertyBag) {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
32
|
+
const oRtaResourceBundle = Lib.getResourceBundleFor("sap.ui.rta");
|
|
33
|
+
let sDescriptionText = oRtaResourceBundle.getText("TXT_CHANGEVISUALIZATION_CHANGE_MOVE_WITHIN", [ChangeVisualizationUtils.shortenString(sLabel)]);
|
|
34
|
+
let sDescriptionTooltip = oRtaResourceBundle.getText("TXT_CHANGEVISUALIZATION_CHANGE_MOVE_WITHIN", [sLabel]);
|
|
35
|
+
let sButtonText;
|
|
36
|
+
const oAppComponent = mPropertyBag.appComponent;
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
const sSourceId = (
|
|
39
39
|
mPayload.sourceContainer
|
|
40
40
|
&& JsControlTreeModifier.getControlIdBySelector(mPayload.sourceContainer, oAppComponent)
|
|
41
41
|
);
|
|
42
|
-
|
|
42
|
+
const sTargetId = (
|
|
43
43
|
mPayload.targetContainer
|
|
44
44
|
&& JsControlTreeModifier.getControlIdBySelector(mPayload.targetContainer, oAppComponent)
|
|
45
45
|
);
|
|
@@ -13,7 +13,7 @@ sap.ui.define([
|
|
|
13
13
|
) {
|
|
14
14
|
"use strict";
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
const RenameVisualization = {};
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
19
|
* Creates a localized description for rename changes based on the provided
|
|
@@ -26,18 +26,18 @@ sap.ui.define([
|
|
|
26
26
|
* @returns {object} Localized description
|
|
27
27
|
*/
|
|
28
28
|
RenameVisualization.getDescription = function(mPayload, sFallbackLabel) {
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
const oRtaResourceBundle = Lib.getResourceBundleFor("sap.ui.rta");
|
|
30
|
+
const sKey = mPayload.originalLabel
|
|
31
31
|
? "TXT_CHANGEVISUALIZATION_CHANGE_RENAME_FROM_TO"
|
|
32
32
|
: "TXT_CHANGEVISUALIZATION_CHANGE_RENAME_TO";
|
|
33
|
-
|
|
33
|
+
const sDescriptionText = oRtaResourceBundle.getText(
|
|
34
34
|
sKey,
|
|
35
35
|
[
|
|
36
36
|
ChangeVisualizationUtils.shortenString(mPayload.newLabel) || sFallbackLabel,
|
|
37
37
|
ChangeVisualizationUtils.shortenString(mPayload.originalLabel)
|
|
38
38
|
]
|
|
39
39
|
);
|
|
40
|
-
|
|
40
|
+
const sDescriptionTooltip = oRtaResourceBundle.getText(
|
|
41
41
|
sKey,
|
|
42
42
|
[
|
|
43
43
|
mPayload.newLabel || sFallbackLabel,
|
|
@@ -13,7 +13,7 @@ sap.ui.define([
|
|
|
13
13
|
) {
|
|
14
14
|
"use strict";
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
const SplitVisualization = {};
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
19
|
* Creates a localized description and button text for split changes based on the provided
|
|
@@ -24,10 +24,10 @@ sap.ui.define([
|
|
|
24
24
|
* @returns {object} Localized description text and button text
|
|
25
25
|
*/
|
|
26
26
|
SplitVisualization.getDescription = function(mPayload, sLabel) {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
27
|
+
const oRtaResourceBundle = Lib.getResourceBundleFor("sap.ui.rta");
|
|
28
|
+
const sDescriptionText = oRtaResourceBundle.getText("TXT_CHANGEVISUALIZATION_CHANGE_SPLIT", [ChangeVisualizationUtils.shortenString(sLabel)]);
|
|
29
|
+
const sDescriptionTooltip = oRtaResourceBundle.getText("TXT_CHANGEVISUALIZATION_CHANGE_SPLIT", [sLabel]);
|
|
30
|
+
const sButtonText = oRtaResourceBundle.getText("BTN_CHANGEVISUALIZATION_SHOW_DEPENDENT_CONTAINER_SPLIT");
|
|
31
31
|
return { descriptionText: sDescriptionText, descriptionTooltip: sDescriptionTooltip, buttonText: sButtonText};
|
|
32
32
|
};
|
|
33
33
|
|
|
@@ -19,7 +19,7 @@ sap.ui.define([
|
|
|
19
19
|
) {
|
|
20
20
|
"use strict";
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
const mCommands = {
|
|
23
23
|
rename: RenameVisualization,
|
|
24
24
|
move: MoveVisualization,
|
|
25
25
|
combine: CombineVisualization,
|
|
@@ -28,7 +28,7 @@ sap.ui.define([
|
|
|
28
28
|
};
|
|
29
29
|
|
|
30
30
|
return function(mIndicatorInformation) {
|
|
31
|
-
|
|
31
|
+
let sCommandName = mIndicatorInformation.commandName;
|
|
32
32
|
|
|
33
33
|
// Settings commands can be assigned to existing categories
|
|
34
34
|
// (e.g. "move" to display the "Show Source" button)
|