@openui5/sap.ui.rta 1.136.1 → 1.138.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/REUSE.toml +0 -28
- package/THIRDPARTY.txt +1 -25
- package/package.json +6 -6
- package/src/sap/ui/rta/.library +1 -1
- package/src/sap/ui/rta/Client.js +1 -1
- package/src/sap/ui/rta/RuntimeAuthoring.js +33 -22
- package/src/sap/ui/rta/Utils.js +1 -1
- package/src/sap/ui/rta/appVariant/AppVariantManager.js +1 -1
- package/src/sap/ui/rta/command/AddIFrame.js +1 -1
- 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 +12 -60
- package/src/sap/ui/rta/messagebundle_ar.properties +17 -41
- package/src/sap/ui/rta/messagebundle_bg.properties +17 -41
- package/src/sap/ui/rta/messagebundle_ca.properties +17 -41
- package/src/sap/ui/rta/messagebundle_cnr.properties +17 -41
- package/src/sap/ui/rta/messagebundle_cs.properties +16 -40
- package/src/sap/ui/rta/messagebundle_cy.properties +17 -41
- package/src/sap/ui/rta/messagebundle_da.properties +17 -41
- package/src/sap/ui/rta/messagebundle_de.properties +15 -39
- package/src/sap/ui/rta/messagebundle_el.properties +17 -41
- package/src/sap/ui/rta/messagebundle_en.properties +18 -42
- package/src/sap/ui/rta/messagebundle_en_GB.properties +18 -42
- package/src/sap/ui/rta/messagebundle_en_US_saprigi.properties +102 -35
- package/src/sap/ui/rta/messagebundle_es.properties +43 -67
- package/src/sap/ui/rta/messagebundle_es_MX.properties +17 -41
- package/src/sap/ui/rta/messagebundle_et.properties +18 -42
- package/src/sap/ui/rta/messagebundle_fi.properties +17 -41
- package/src/sap/ui/rta/messagebundle_fr.properties +18 -42
- package/src/sap/ui/rta/messagebundle_fr_CA.properties +18 -42
- package/src/sap/ui/rta/messagebundle_hi.properties +17 -41
- package/src/sap/ui/rta/messagebundle_hr.properties +18 -42
- package/src/sap/ui/rta/messagebundle_hu.properties +17 -41
- package/src/sap/ui/rta/messagebundle_id.properties +22 -46
- package/src/sap/ui/rta/messagebundle_it.properties +17 -41
- package/src/sap/ui/rta/messagebundle_iw.properties +18 -42
- package/src/sap/ui/rta/messagebundle_ja.properties +20 -44
- package/src/sap/ui/rta/messagebundle_kk.properties +23 -47
- package/src/sap/ui/rta/messagebundle_ko.properties +18 -42
- package/src/sap/ui/rta/messagebundle_lt.properties +17 -41
- package/src/sap/ui/rta/messagebundle_lv.properties +17 -41
- package/src/sap/ui/rta/messagebundle_mk.properties +19 -43
- package/src/sap/ui/rta/messagebundle_ms.properties +17 -41
- package/src/sap/ui/rta/messagebundle_nl.properties +16 -40
- package/src/sap/ui/rta/messagebundle_no.properties +17 -41
- package/src/sap/ui/rta/messagebundle_pl.properties +20 -44
- package/src/sap/ui/rta/messagebundle_pt.properties +17 -41
- package/src/sap/ui/rta/messagebundle_pt_PT.properties +18 -42
- package/src/sap/ui/rta/messagebundle_ro.properties +17 -41
- package/src/sap/ui/rta/messagebundle_ru.properties +17 -41
- package/src/sap/ui/rta/messagebundle_sh.properties +17 -41
- package/src/sap/ui/rta/messagebundle_sk.properties +13 -37
- package/src/sap/ui/rta/messagebundle_sl.properties +38 -62
- package/src/sap/ui/rta/messagebundle_sr.properties +17 -41
- package/src/sap/ui/rta/messagebundle_sv.properties +18 -42
- package/src/sap/ui/rta/messagebundle_th.properties +18 -42
- package/src/sap/ui/rta/messagebundle_tr.properties +17 -41
- package/src/sap/ui/rta/messagebundle_uk.properties +18 -42
- package/src/sap/ui/rta/messagebundle_vi.properties +19 -43
- package/src/sap/ui/rta/messagebundle_zh_CN.properties +18 -42
- package/src/sap/ui/rta/messagebundle_zh_TW.properties +18 -42
- package/src/sap/ui/rta/plugin/AddXMLAtExtensionPoint.js +1 -1
- package/src/sap/ui/rta/plugin/AddXMLPlugin.js +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +2 -2
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.js +1 -1
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialogController.js +23 -6
- package/src/sap/ui/rta/plugin/rename/Rename.js +1 -1
- package/src/sap/ui/rta/plugin/rename/RenameDialog.js +1 -1
- 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/toolbar/ActionsMenu.fragment.xml +4 -4
- package/src/sap/ui/rta/toolbar/Adaptation.js +15 -3
- package/src/sap/ui/rta/toolbar/Base.js +1 -1
- package/src/sap/ui/rta/toolbar/Fiori.js +1 -1
- 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 +1 -1
- package/src/sap/ui/rta/util/changeVisualization/ChangeStates.js +2 -4
- package/src/sap/ui/rta/util/changeVisualization/ChangeVisualization.js +1 -1
- 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 +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 +33 -7
- 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
|
@@ -30,22 +30,17 @@ sap.ui.define([
|
|
|
30
30
|
* @namespace sap.ui.rta.util.ReloadManager
|
|
31
31
|
* @alias sap.ui.rta.util.ReloadManager
|
|
32
32
|
* @since 1.104
|
|
33
|
-
* @version 1.
|
|
33
|
+
* @version 1.138.0
|
|
34
34
|
* @private
|
|
35
35
|
* @ui5-restricted
|
|
36
36
|
*/
|
|
37
|
-
|
|
37
|
+
const ReloadManager = {};
|
|
38
38
|
|
|
39
|
-
|
|
40
|
-
var mReloadMethods = {
|
|
41
|
-
NOT_NEEDED: "NO_RELOAD",
|
|
42
|
-
VIA_HASH: "CROSS_APP_NAVIGATION",
|
|
43
|
-
RELOAD_PAGE: "HARD_RELOAD"
|
|
44
|
-
};
|
|
39
|
+
let mUShellServices = {};
|
|
45
40
|
|
|
46
41
|
function getReloadMessageOnStart(oReloadInfo) {
|
|
47
|
-
|
|
48
|
-
|
|
42
|
+
let sReason;
|
|
43
|
+
const bIsCustomerLayer = oReloadInfo.layer === Layer.CUSTOMER;
|
|
49
44
|
|
|
50
45
|
if (oReloadInfo.hasHigherLayerChanges && oReloadInfo.isDraftAvailable) {
|
|
51
46
|
sReason = bIsCustomerLayer ? "MSG_VIEWS_OR_PERSONALIZATION_AND_DRAFT_EXISTS" : "MSG_HIGHER_LAYER_CHANGES_AND_DRAFT_EXISTS";
|
|
@@ -62,7 +57,7 @@ sap.ui.define([
|
|
|
62
57
|
}
|
|
63
58
|
|
|
64
59
|
function getReloadMessageOnExit(oReloadInfo) {
|
|
65
|
-
|
|
60
|
+
const bIsCustomerLayer = oReloadInfo.layer === Layer.CUSTOMER;
|
|
66
61
|
|
|
67
62
|
if (oReloadInfo.hasHigherLayerChanges) {
|
|
68
63
|
if (!bIsCustomerLayer) {
|
|
@@ -102,48 +97,44 @@ sap.ui.define([
|
|
|
102
97
|
return undefined;
|
|
103
98
|
}
|
|
104
99
|
|
|
105
|
-
function handleReloadMessageBoxOnExit(oReloadReasons) {
|
|
106
|
-
|
|
100
|
+
async function handleReloadMessageBoxOnExit(oReloadReasons) {
|
|
101
|
+
const sReason = getReloadMessageOnExit(oReloadReasons);
|
|
107
102
|
|
|
108
103
|
if (sReason) {
|
|
109
|
-
|
|
104
|
+
await Utils.showMessageBox("information", sReason, {
|
|
110
105
|
titleKey: "HEADER_RELOAD_NEEDED"
|
|
111
106
|
});
|
|
112
107
|
}
|
|
113
|
-
return Promise.resolve();
|
|
114
108
|
}
|
|
115
109
|
|
|
116
|
-
function triggerReloadOnStart(oReloadInfo
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
return VersionsAPI.loadVersionForApplication({
|
|
110
|
+
async function triggerReloadOnStart(oReloadInfo) {
|
|
111
|
+
if (mUShellServices.Navigation && oReloadInfo.versioningEnabled) {
|
|
112
|
+
// clears FlexState and triggers reloading of the flex data without blocking
|
|
113
|
+
if (oReloadInfo.isDraftAvailable) {
|
|
114
|
+
await VersionsAPI.loadDraftForApplication({
|
|
115
|
+
control: oReloadInfo.selector,
|
|
116
|
+
layer: oReloadInfo.layer,
|
|
117
|
+
allContexts: oReloadInfo.allContexts,
|
|
118
|
+
adaptationId: oReloadInfo.adaptationId
|
|
119
|
+
});
|
|
120
|
+
} else {
|
|
121
|
+
await VersionsAPI.loadVersionForApplication({
|
|
129
122
|
control: oReloadInfo.selector,
|
|
130
123
|
layer: oReloadInfo.layer,
|
|
131
124
|
allContexts: oReloadInfo.allContexts,
|
|
132
125
|
adaptationId: oReloadInfo.adaptationId
|
|
133
126
|
});
|
|
134
127
|
}
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
return true;
|
|
146
|
-
});
|
|
128
|
+
}
|
|
129
|
+
const sReason = getReloadMessageOnStart(oReloadInfo);
|
|
130
|
+
// showing messages in visual editor is leading to blocked screen. In this case we should reload without message
|
|
131
|
+
if (!oReloadInfo.developerMode) {
|
|
132
|
+
await Utils.showMessageBox("information", sReason);
|
|
133
|
+
}
|
|
134
|
+
ReloadManager.enableAutomaticStart(oReloadInfo.layer, oReloadInfo.selector);
|
|
135
|
+
oReloadInfo.onStart = true;
|
|
136
|
+
ReloadManager.triggerReload(oReloadInfo);
|
|
137
|
+
return true;
|
|
147
138
|
}
|
|
148
139
|
|
|
149
140
|
ReloadManager.setUShellServices = function(mPassedUShellServices) {
|
|
@@ -157,8 +148,8 @@ sap.ui.define([
|
|
|
157
148
|
* @param {sap.ui.core.Control} oRootControl - Root control for which key user adaptation was started
|
|
158
149
|
*/
|
|
159
150
|
ReloadManager.enableAutomaticStart = function(sLayer, oRootControl) {
|
|
160
|
-
|
|
161
|
-
|
|
151
|
+
const sFlexReference = FlexRuntimeInfoAPI.getFlexReference({element: oRootControl});
|
|
152
|
+
const vParameter = sFlexReference || true;
|
|
162
153
|
window.sessionStorage.setItem(`sap.ui.rta.restart.${sLayer}`, vParameter);
|
|
163
154
|
};
|
|
164
155
|
|
|
@@ -181,37 +172,12 @@ sap.ui.define([
|
|
|
181
172
|
return !!window.sessionStorage.getItem(`sap.ui.rta.restart.${sLayer}`);
|
|
182
173
|
};
|
|
183
174
|
|
|
184
|
-
/**
|
|
185
|
-
* Sets a flag in sessionStorage to indicate that the "What's New" dialog should not be shown after rta reload.
|
|
186
|
-
*/
|
|
187
|
-
ReloadManager.setDontShowWhatsNewAfterReload = () => {
|
|
188
|
-
window.sessionStorage.setItem("sap.ui.rta.whatsNew", true);
|
|
189
|
-
};
|
|
190
|
-
|
|
191
|
-
/**
|
|
192
|
-
* Checks if the "What's New" dialog should be shown rta after reload.
|
|
193
|
-
*
|
|
194
|
-
* @returns {boolean} Returns true if the "What's New" dialog should be shown, false otherwise.
|
|
195
|
-
*/
|
|
196
|
-
ReloadManager.getDontShowWhatsNewAfterReload = () => {
|
|
197
|
-
return window.sessionStorage.getItem("sap.ui.rta.whatsNew");
|
|
198
|
-
};
|
|
199
|
-
|
|
200
|
-
/**
|
|
201
|
-
* Removes the flag from sessionStorage that indicates the "What's New" dialog should not be shown after reload.
|
|
202
|
-
*/
|
|
203
|
-
ReloadManager.removeDontShowWhatsNewAfterReload = () => {
|
|
204
|
-
window.sessionStorage.removeItem("sap.ui.rta.whatsNew");
|
|
205
|
-
};
|
|
206
|
-
|
|
207
175
|
/**
|
|
208
176
|
* Triggers the reload of the page. Can either be a soft reload inside the FLP or a hard reload.
|
|
209
177
|
*
|
|
210
178
|
* @param {object} oReloadInfo - Information needed for the reload
|
|
211
|
-
* @param {sap.ui.fl.Layer} oReloadInfo.layer - Current layer
|
|
212
179
|
* @param {boolean} oReloadInfo.hasHigherLayerChanges - Indicates if higher layer changes exist
|
|
213
180
|
* @param {boolean} oReloadInfo.ignoreMaxLayerParameter - Indicates if the max layer parameter should be ignored
|
|
214
|
-
* @param {string|object} oReloadInfo.parameters - The URL parameters to be modified
|
|
215
181
|
* @param {string} oReloadInfo.versionSwitch - Indicates if we are in a version switch scenario
|
|
216
182
|
* @param {string} oReloadInfo.version - Version we want to switch to
|
|
217
183
|
* @param {string} oReloadInfo.removeVersionParameter - Indicates if version parameter should be removed
|
|
@@ -225,9 +191,7 @@ sap.ui.define([
|
|
|
225
191
|
}
|
|
226
192
|
if (FlUtils.getUshellContainer()) {
|
|
227
193
|
mUShellServices.AppLifeCycle.reloadCurrentApp();
|
|
228
|
-
}
|
|
229
|
-
// standalone app always trigger hard reload
|
|
230
|
-
if (!FlUtils.getUshellContainer() || oReloadInfo.triggerHardReload) {
|
|
194
|
+
} else {
|
|
231
195
|
ReloadManager.reloadPage();
|
|
232
196
|
}
|
|
233
197
|
};
|
|
@@ -260,25 +224,20 @@ sap.ui.define([
|
|
|
260
224
|
*
|
|
261
225
|
* @return {Promise<boolean>} Resolving to <code>false</code> means that reload is not necessary
|
|
262
226
|
*/
|
|
263
|
-
ReloadManager.handleReloadOnStart = function(mProperties) {
|
|
227
|
+
ReloadManager.handleReloadOnStart = async function(mProperties) {
|
|
264
228
|
merge(mProperties, {
|
|
265
|
-
hasHigherLayerChanges: false,
|
|
266
|
-
isDraftAvailable: false,
|
|
267
229
|
ignoreMaxLayerParameter: false,
|
|
268
|
-
includeCtrlVariants: true
|
|
269
|
-
URLParsingService: mUShellServices.URLParsing
|
|
270
|
-
});
|
|
271
|
-
return ReloadInfoAPI.getReloadReasonsForStart(mProperties).then(function(oReloadInfo) {
|
|
272
|
-
if (
|
|
273
|
-
oReloadInfo.hasHigherLayerChanges
|
|
274
|
-
|| oReloadInfo.isDraftAvailable
|
|
275
|
-
|| oReloadInfo.allContexts
|
|
276
|
-
|| oReloadInfo.switchAdaptation
|
|
277
|
-
) {
|
|
278
|
-
return triggerReloadOnStart(oReloadInfo, mProperties.versioningEnabled, mProperties.developerMode);
|
|
279
|
-
}
|
|
280
|
-
return undefined;
|
|
230
|
+
includeCtrlVariants: true
|
|
281
231
|
});
|
|
232
|
+
const oReloadInfo = await ReloadInfoAPI.getReloadReasonsForStart(mProperties);
|
|
233
|
+
if (
|
|
234
|
+
oReloadInfo.hasHigherLayerChanges
|
|
235
|
+
|| oReloadInfo.isDraftAvailable
|
|
236
|
+
|| oReloadInfo.allContexts
|
|
237
|
+
) {
|
|
238
|
+
return triggerReloadOnStart(merge(mProperties, oReloadInfo));
|
|
239
|
+
}
|
|
240
|
+
return undefined;
|
|
282
241
|
};
|
|
283
242
|
|
|
284
243
|
/**
|
|
@@ -290,21 +249,17 @@ sap.ui.define([
|
|
|
290
249
|
* @param {boolean} mProperties.versioningEnabled - Whether versioning is enabled
|
|
291
250
|
* @param {boolean} mProperties.isDraftAvailable - Whether a draft is available
|
|
292
251
|
* @param {boolean} mProperties.activeVersion - Number of the active version
|
|
293
|
-
* @param {Promise} mProperties.changesNeedReloadPromise - Resolves to whether any change needs a
|
|
252
|
+
* @param {Promise} mProperties.changesNeedReloadPromise - Resolves to whether any change needs a reload
|
|
294
253
|
* @param {boolean} bSkipRestart - Stop key user adaptation without reloading the app in any way
|
|
295
254
|
*
|
|
296
255
|
* @return {Promise<object>} Resolving to an object containing information about whether a reload is needed and how to handle it
|
|
297
256
|
*/
|
|
298
|
-
ReloadManager.checkReloadOnExit = function(mProperties) {
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
oReloadInfo.triggerHardReload = oReloadInfo.reloadMethod === mReloadMethods.RELOAD_PAGE;
|
|
305
|
-
return oReloadInfo;
|
|
306
|
-
});
|
|
307
|
-
});
|
|
257
|
+
ReloadManager.checkReloadOnExit = async function(mProperties) {
|
|
258
|
+
const bChangesNeedReload = await mProperties.changesNeedReloadPromise;
|
|
259
|
+
mProperties.changesNeedReload = bChangesNeedReload;
|
|
260
|
+
const oReloadInfo = ReloadInfoAPI.getReloadInfo(mProperties);
|
|
261
|
+
await handleReloadMessageBoxOnExit(oReloadInfo);
|
|
262
|
+
return oReloadInfo;
|
|
308
263
|
};
|
|
309
264
|
|
|
310
265
|
/**
|
|
@@ -314,7 +269,7 @@ sap.ui.define([
|
|
|
314
269
|
* @param {boolean} oReloadInfo.hasHigherLayerChanges - Indicates if higher layer changes exist
|
|
315
270
|
*/
|
|
316
271
|
ReloadManager.handleReloadOnExit = function(oReloadInfo) {
|
|
317
|
-
if (oReloadInfo.
|
|
272
|
+
if (oReloadInfo.reloadNeeded) {
|
|
318
273
|
oReloadInfo.removeVersionParameter = true;
|
|
319
274
|
ReloadManager.triggerReload(oReloadInfo);
|
|
320
275
|
}
|
|
@@ -6,8 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
sap.ui.define([
|
|
8
8
|
"sap/ui/core/EventBus"
|
|
9
|
-
],
|
|
10
|
-
function(
|
|
9
|
+
], function(
|
|
11
10
|
EventBus
|
|
12
11
|
) {
|
|
13
12
|
"use strict";
|
|
@@ -19,12 +18,12 @@ function(
|
|
|
19
18
|
*
|
|
20
19
|
* @extends sap.ui.core.EventBus
|
|
21
20
|
* @author SAP SE
|
|
22
|
-
* @version 1.
|
|
21
|
+
* @version 1.138.0
|
|
23
22
|
* @private
|
|
24
23
|
* @since 1.56.0
|
|
25
24
|
* @alias sap.ui.rta.util.ServiceEventBus
|
|
26
25
|
*/
|
|
27
|
-
|
|
26
|
+
const ServiceEventBus = EventBus.extend("sap.ui.rta.util.ServiceEventBus");
|
|
28
27
|
|
|
29
28
|
ServiceEventBus.prototype._callListener = function(fnCallback, oListener, sChannelId, sEventId, vData) {
|
|
30
29
|
fnCallback.call(oListener, vData);
|
|
@@ -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.138.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.138.0
|
|
41
41
|
* @private
|
|
42
42
|
*/
|
|
43
43
|
const ChangeIndicatorRegistry = ManagedObject.extend("sap.ui.rta.util.changeVisualization.ChangeIndicatorRegistry", {
|
|
@@ -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.138.0
|
|
88
88
|
* @private
|
|
89
89
|
*/
|
|
90
90
|
const ChangeVisualization = Control.extend("sap.ui.rta.util.changeVisualization.ChangeVisualization", {
|
|
@@ -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])
|