@openui5/sap.ui.rta 1.134.0 → 1.136.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 +649 -0
- package/THIRDPARTY.txt +23 -23
- 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 +124 -28
- package/src/sap/ui/rta/Utils.js +19 -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 +26 -26
- 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 +72 -72
- package/src/sap/ui/rta/appVariant/S4HanaCloudBackend.js +1 -1
- package/src/sap/ui/rta/appVariant/Utils.js +27 -36
- package/src/sap/ui/rta/appVariant/manageApps/webapp/Component.js +1 -1
- package/src/sap/ui/rta/appVariant/manageApps/webapp/controller/ManageApps.controller.js +54 -68
- package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_fr_CA.properties +2 -2
- 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 +66 -6
- package/src/sap/ui/rta/command/BaseCommand.js +2 -2
- package/src/sap/ui/rta/command/BindProperty.js +2 -2
- package/src/sap/ui/rta/command/Combine.js +2 -2
- package/src/sap/ui/rta/command/CommandFactory.js +72 -48
- package/src/sap/ui/rta/command/CompositeCommand.js +13 -13
- package/src/sap/ui/rta/command/ControlVariantConfigure.js +2 -2
- package/src/sap/ui/rta/command/ControlVariantSave.js +2 -2
- package/src/sap/ui/rta/command/ControlVariantSaveAs.js +2 -2
- package/src/sap/ui/rta/command/ControlVariantSetTitle.js +2 -2
- package/src/sap/ui/rta/command/ControlVariantSwitch.js +2 -2
- 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/ExtendControllerCommand.js +93 -0
- package/src/sap/ui/rta/command/FlexCommand.js +55 -44
- package/src/sap/ui/rta/command/LREPSerializer.js +24 -24
- package/src/sap/ui/rta/command/LocalReset.js +2 -2
- package/src/sap/ui/rta/command/ManifestCommand.js +112 -0
- 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 +20 -5
- 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 +2 -2
- package/src/sap/ui/rta/command/{appDescriptor → manifest}/AddLibrary.js +11 -11
- package/src/sap/ui/rta/enablement/TestDelegate.js +1 -1
- package/src/sap/ui/rta/enablement/elementActionTest.js +2 -2
- package/src/sap/ui/rta/library.js +3 -3
- package/src/sap/ui/rta/messagebundle.properties +181 -9
- package/src/sap/ui/rta/messagebundle_ar.properties +105 -6
- package/src/sap/ui/rta/messagebundle_bg.properties +105 -6
- package/src/sap/ui/rta/messagebundle_ca.properties +108 -9
- package/src/sap/ui/rta/messagebundle_cnr.properties +106 -7
- package/src/sap/ui/rta/messagebundle_cs.properties +103 -4
- package/src/sap/ui/rta/messagebundle_cy.properties +105 -6
- package/src/sap/ui/rta/messagebundle_da.properties +104 -5
- package/src/sap/ui/rta/messagebundle_de.properties +114 -15
- package/src/sap/ui/rta/messagebundle_el.properties +102 -3
- package/src/sap/ui/rta/messagebundle_en.properties +105 -6
- package/src/sap/ui/rta/messagebundle_en_GB.properties +105 -6
- package/src/sap/ui/rta/messagebundle_en_US_saprigi.properties +9 -1
- package/src/sap/ui/rta/messagebundle_es.properties +109 -10
- package/src/sap/ui/rta/messagebundle_es_MX.properties +113 -14
- package/src/sap/ui/rta/messagebundle_et.properties +103 -4
- package/src/sap/ui/rta/messagebundle_fi.properties +107 -8
- package/src/sap/ui/rta/messagebundle_fr.properties +123 -24
- package/src/sap/ui/rta/messagebundle_fr_CA.properties +110 -11
- package/src/sap/ui/rta/messagebundle_hi.properties +105 -6
- package/src/sap/ui/rta/messagebundle_hr.properties +145 -46
- package/src/sap/ui/rta/messagebundle_hu.properties +104 -5
- package/src/sap/ui/rta/messagebundle_id.properties +113 -14
- package/src/sap/ui/rta/messagebundle_it.properties +146 -47
- package/src/sap/ui/rta/messagebundle_iw.properties +105 -6
- package/src/sap/ui/rta/messagebundle_ja.properties +117 -18
- package/src/sap/ui/rta/messagebundle_kk.properties +104 -5
- package/src/sap/ui/rta/messagebundle_ko.properties +105 -6
- package/src/sap/ui/rta/messagebundle_lt.properties +105 -6
- package/src/sap/ui/rta/messagebundle_lv.properties +104 -5
- package/src/sap/ui/rta/messagebundle_mk.properties +108 -9
- package/src/sap/ui/rta/messagebundle_ms.properties +115 -16
- package/src/sap/ui/rta/messagebundle_nl.properties +104 -5
- package/src/sap/ui/rta/messagebundle_no.properties +108 -9
- package/src/sap/ui/rta/messagebundle_pl.properties +104 -5
- package/src/sap/ui/rta/messagebundle_pt.properties +103 -4
- package/src/sap/ui/rta/messagebundle_pt_PT.properties +103 -4
- package/src/sap/ui/rta/messagebundle_ro.properties +103 -4
- package/src/sap/ui/rta/messagebundle_ru.properties +107 -8
- package/src/sap/ui/rta/messagebundle_sh.properties +106 -7
- package/src/sap/ui/rta/messagebundle_sk.properties +103 -4
- package/src/sap/ui/rta/messagebundle_sl.properties +103 -4
- package/src/sap/ui/rta/messagebundle_sr.properties +106 -7
- package/src/sap/ui/rta/messagebundle_sv.properties +104 -5
- package/src/sap/ui/rta/messagebundle_th.properties +104 -5
- package/src/sap/ui/rta/messagebundle_tr.properties +103 -4
- package/src/sap/ui/rta/messagebundle_uk.properties +105 -6
- package/src/sap/ui/rta/messagebundle_vi.properties +105 -6
- package/src/sap/ui/rta/messagebundle_zh_CN.properties +104 -5
- package/src/sap/ui/rta/messagebundle_zh_TW.properties +105 -6
- package/src/sap/ui/rta/plugin/AddXMLAtExtensionPoint.js +34 -34
- package/src/sap/ui/rta/plugin/AddXMLPlugin.js +54 -32
- 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 +114 -114
- package/src/sap/ui/rta/plugin/ControlVariant.js +37 -54
- 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/ExtendControllerPlugin.js +172 -0
- package/src/sap/ui/rta/plugin/LocalReset.js +4 -3
- package/src/sap/ui/rta/plugin/Plugin.js +31 -11
- 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/Resize.js +2 -2
- package/src/sap/ui/rta/plugin/Selection.js +2 -2
- package/src/sap/ui/rta/plugin/Settings.js +75 -62
- package/src/sap/ui/rta/plugin/Split.js +2 -2
- package/src/sap/ui/rta/plugin/Stretch.js +2 -2
- package/src/sap/ui/rta/plugin/additionalElements/ActionExtractor.js +2 -2
- package/src/sap/ui/rta/plugin/additionalElements/AddElementsDialog.js +2 -2
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsAnalyzer.js +1 -1
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsPlugin.js +2 -2
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsUtils.js +2 -2
- package/src/sap/ui/rta/plugin/additionalElements/CommandBuilder.js +2 -2
- package/src/sap/ui/rta/plugin/annotations/AnnotationChangeDialog.fragment.xml +13 -9
- package/src/sap/ui/rta/plugin/annotations/AnnotationChangeDialog.js +75 -13
- package/src/sap/ui/rta/plugin/annotations/AnnotationChangeDialogController.js +38 -32
- package/src/sap/ui/rta/plugin/annotations/AnnotationPlugin.js +61 -21
- package/src/sap/ui/rta/plugin/annotations/AnnotationTypes.js +1 -1
- package/src/sap/ui/rta/plugin/iframe/AddIFrame.js +8 -2
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.js +2 -2
- 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/plugin/{Rename.js → rename/Rename.js} +29 -67
- package/src/sap/ui/rta/plugin/rename/RenameDialog.fragment.xml +63 -0
- package/src/sap/ui/rta/plugin/rename/RenameDialog.js +140 -0
- package/src/sap/ui/rta/service/Action.js +2 -2
- package/src/sap/ui/rta/service/ControllerExtension.js +11 -5
- 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/Toolbar.adaptation.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/ActionsMenu.fragment.xml +6 -0
- package/src/sap/ui/rta/toolbar/Adaptation.fragment.xml +22 -9
- package/src/sap/ui/rta/toolbar/Adaptation.js +44 -9
- 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 +19 -10
- package/src/sap/ui/rta/toolbar/FioriLike.js +7 -5
- 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 +2 -2
- 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 +8 -6
- package/src/sap/ui/rta/util/PopupManager.js +2 -2
- package/src/sap/ui/rta/util/ReloadManager.js +2 -2
- 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 +1 -1
- 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 +4 -4
- 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/guidedTour/GuidedTour.js +242 -0
- package/src/sap/ui/rta/util/guidedTour/TourMarker.fragment.xml +50 -0
- package/src/sap/ui/rta/util/guidedTour/content/GeneralTour.js +205 -0
- package/src/sap/ui/rta/util/hasStableId.js +1 -1
- package/src/sap/ui/rta/util/isReuseComponent.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 +8 -4
- package/src/sap/ui/rta/util/whatsNew/WhatsNewDialog.fragment.xml +1 -1
- package/src/sap/ui/rta/util/whatsNew/WhatsNewOverview.js +1 -1
- package/src/sap/ui/rta/util/whatsNew/WhatsNewUtils.js +1 -1
- package/src/sap/ui/rta/util/whatsNew/whatsNewContent/WhatsNewFeatures.js +85 -1
- package/src/sap/ui/rta/util/whatsNew/whatsNewContent/whatsNewImages/ChangeLabelsAction.png +0 -0
- package/src/sap/ui/rta/util/whatsNew/whatsNewContent/whatsNewImages/DisplayBehavior.png +0 -0
- package/src/sap/ui/rta/util/whatsNew/whatsNewContent/whatsNewImages/ExtendedActions.png +0 -0
- package/src/sap/ui/rta/util/whatsNew/whatsNewContent/whatsNewImages/GuidedTour.png +0 -0
- package/src/sap/ui/rta/util/whatsNew/whatsNewContent/whatsNewImages/ReloadButtonToolbar.png +0 -0
- package/src/sap/ui/rta/util/whatsNew/whatsNewContent/whatsNewImages/RenameDialog.png +0 -0
- package/ui5.yaml +1 -1
- package/.reuse/dep5 +0 -471
- package/src/sap/ui/rta/command/AppDescriptorCommand.js +0 -114
- package/src/sap/ui/rta/plugin/RenameHandler.js +0 -477
|
@@ -1,34 +1,47 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright
|
|
3
|
+
* (c) Copyright 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
8
|
"sap/base/Log",
|
|
9
9
|
"sap/ui/base/DesignTime",
|
|
10
|
+
"sap/ui/core/util/reflection/JsControlTreeModifier",
|
|
11
|
+
"sap/ui/dt/OverlayRegistry",
|
|
10
12
|
"sap/ui/dt/Util",
|
|
13
|
+
"sap/ui/fl/write/api/PersistenceWriteAPI",
|
|
14
|
+
"sap/ui/fl/Utils",
|
|
11
15
|
"sap/ui/rta/plugin/annotations/AnnotationChangeDialog",
|
|
16
|
+
"sap/ui/rta/plugin/annotations/AnnotationTypes",
|
|
12
17
|
"sap/ui/rta/plugin/Plugin"
|
|
13
18
|
], function(
|
|
14
19
|
BaseLog,
|
|
15
20
|
DesignTime,
|
|
21
|
+
JsControlTreeModifier,
|
|
22
|
+
OverlayRegistry,
|
|
16
23
|
DtUtil,
|
|
24
|
+
PersistenceWriteAPI,
|
|
25
|
+
Utils,
|
|
17
26
|
AnnotationChangeDialog,
|
|
27
|
+
AnnotationTypes,
|
|
18
28
|
Plugin
|
|
19
29
|
) {
|
|
20
30
|
"use strict";
|
|
21
31
|
|
|
22
|
-
async function handleCompositeCommand(oElement, oAction,
|
|
32
|
+
async function handleCompositeCommand(oElement, oAction, aAnnotationChanges, aLegacyRenameChanges) {
|
|
23
33
|
const oCompositeCommand = await this.getCommandFactory().getCommandFor(oElement, "composite");
|
|
24
|
-
for (const oChange of
|
|
34
|
+
for (const oChange of aAnnotationChanges) {
|
|
35
|
+
// aLegacyRenameChanges is only passed for singleRename scenarios, where there is only one annotation change to be saved
|
|
36
|
+
// so we can simply add it in the loop
|
|
25
37
|
const oAnnotationCommand = await this.getCommandFactory().getCommandFor(
|
|
26
38
|
oElement,
|
|
27
39
|
"annotation",
|
|
28
40
|
{
|
|
29
41
|
changeType: oAction.changeType,
|
|
30
42
|
serviceUrl: oChange.serviceUrl,
|
|
31
|
-
content: oChange.content
|
|
43
|
+
content: {...oChange.content, objectTemplateInfo: oAction.objectTemplateInfo},
|
|
44
|
+
changesToDelete: aLegacyRenameChanges
|
|
32
45
|
}
|
|
33
46
|
);
|
|
34
47
|
oCompositeCommand.addCommand(oAnnotationCommand);
|
|
@@ -36,15 +49,14 @@ sap.ui.define([
|
|
|
36
49
|
|
|
37
50
|
if (oCompositeCommand.getCommands().length > 0) {
|
|
38
51
|
this.fireElementModified({
|
|
39
|
-
command: oCompositeCommand
|
|
40
|
-
hasAnnotationCommand: true
|
|
52
|
+
command: oCompositeCommand
|
|
41
53
|
});
|
|
42
54
|
}
|
|
43
55
|
}
|
|
44
56
|
|
|
45
|
-
function getActionText(oElementOverlay, oAction) {
|
|
57
|
+
function getActionText(oElementOverlay, oAction, oPropagatingControl) {
|
|
46
58
|
const vName = oAction.title;
|
|
47
|
-
const oElement = oElementOverlay.getElement();
|
|
59
|
+
const oElement = oPropagatingControl || oElementOverlay.getElement();
|
|
48
60
|
if (vName) {
|
|
49
61
|
if (typeof vName === "function") {
|
|
50
62
|
return vName(oElement);
|
|
@@ -59,7 +71,7 @@ sap.ui.define([
|
|
|
59
71
|
}
|
|
60
72
|
|
|
61
73
|
function getActionIcon(oAnnotationAction) {
|
|
62
|
-
const sDefaultIcon = "sap-icon://request";
|
|
74
|
+
const sDefaultIcon = oAnnotationAction.type === AnnotationTypes.StringType ? "sap-icon://edit" : "sap-icon://request";
|
|
63
75
|
const sActionIcon = oAnnotationAction.icon;
|
|
64
76
|
if (!sActionIcon) {
|
|
65
77
|
return sDefaultIcon;
|
|
@@ -71,6 +83,14 @@ sap.ui.define([
|
|
|
71
83
|
return sActionIcon;
|
|
72
84
|
}
|
|
73
85
|
|
|
86
|
+
function checkDesigntimeActionProperties(oAction) {
|
|
87
|
+
if (oAction.singleRename && !oAction.controlBasedRenameChangeType) {
|
|
88
|
+
BaseLog.error("When using singleRename, controlBasedRenameChangeType must also be defined");
|
|
89
|
+
return false;
|
|
90
|
+
}
|
|
91
|
+
return true;
|
|
92
|
+
}
|
|
93
|
+
|
|
74
94
|
/**
|
|
75
95
|
* Constructor for a new Annotation Plugin.
|
|
76
96
|
* Multiple annotation actions can be defined for the same overlay. Each action is represented by a menu item.
|
|
@@ -82,7 +102,7 @@ sap.ui.define([
|
|
|
82
102
|
* @class
|
|
83
103
|
* @extends sap.ui.rta.plugin.Plugin
|
|
84
104
|
* @author SAP SE
|
|
85
|
-
* @version 1.
|
|
105
|
+
* @version 1.136.0
|
|
86
106
|
* @constructor
|
|
87
107
|
* @private
|
|
88
108
|
* @since 1.132
|
|
@@ -97,7 +117,8 @@ sap.ui.define([
|
|
|
97
117
|
}
|
|
98
118
|
});
|
|
99
119
|
|
|
100
|
-
const
|
|
120
|
+
const sPluginIdDefault = "CTX_ANNOTATION";
|
|
121
|
+
const sPluginIdSingleLabelChange = "CTX_ANNOTATION_CHANGE_SINGLE_LABEL";
|
|
101
122
|
|
|
102
123
|
AnnotationPlugin.prototype.init = function(...aArgs) {
|
|
103
124
|
Plugin.prototype.init.apply(this, aArgs);
|
|
@@ -169,17 +190,32 @@ sap.ui.define([
|
|
|
169
190
|
const oElement = oElementOverlay.getElement();
|
|
170
191
|
|
|
171
192
|
try {
|
|
172
|
-
const
|
|
193
|
+
const aAnnotationChanges = await this._oDialog.openDialogAndHandleChanges({
|
|
173
194
|
title: getActionText(oElementOverlay, oAction),
|
|
174
195
|
type: oAction.type,
|
|
175
196
|
control: oElement,
|
|
176
197
|
delegate: oAction.delegate,
|
|
177
198
|
annotation: oAction.annotation,
|
|
178
|
-
description: oAction.description
|
|
199
|
+
description: oAction.description,
|
|
200
|
+
singleRename: oAction.singleRename,
|
|
201
|
+
controlBasedRenameChangeType: oAction.controlBasedRenameChangeType
|
|
179
202
|
});
|
|
180
203
|
|
|
181
|
-
if (
|
|
182
|
-
|
|
204
|
+
if (aAnnotationChanges.length) {
|
|
205
|
+
const aLegacyRenameChanges = [];
|
|
206
|
+
// for single rename scenarios we are able to remove any existing control based rename change in the context of
|
|
207
|
+
// the given control and change type
|
|
208
|
+
if (oAction.singleRename) {
|
|
209
|
+
const aUIChanges = await PersistenceWriteAPI._getUIChanges({
|
|
210
|
+
selector: oElement
|
|
211
|
+
});
|
|
212
|
+
const oAppComponent = Utils.getAppComponentForControl(oElement);
|
|
213
|
+
aLegacyRenameChanges.push(...aUIChanges.filter((oChange) =>
|
|
214
|
+
oChange.getChangeType() === oAction.controlBasedRenameChangeType
|
|
215
|
+
&& JsControlTreeModifier.getControlIdBySelector(oChange.getSelector(), oAppComponent) === oElement.getId()
|
|
216
|
+
));
|
|
217
|
+
}
|
|
218
|
+
return handleCompositeCommand.call(this, oElement, oAction, aAnnotationChanges, aLegacyRenameChanges);
|
|
183
219
|
}
|
|
184
220
|
return undefined;
|
|
185
221
|
} catch (vError) {
|
|
@@ -187,7 +223,7 @@ sap.ui.define([
|
|
|
187
223
|
vError,
|
|
188
224
|
"AnnotationPlugin#handler",
|
|
189
225
|
"Error occurred during handler execution",
|
|
190
|
-
"sap.ui.rta.plugin.annotations.
|
|
226
|
+
"sap.ui.rta.plugin.annotations.AnnotationPlugin"
|
|
191
227
|
);
|
|
192
228
|
}
|
|
193
229
|
};
|
|
@@ -205,16 +241,19 @@ sap.ui.define([
|
|
|
205
241
|
|
|
206
242
|
const aMenuItems = [];
|
|
207
243
|
if (oAnnotationActionMap) {
|
|
208
|
-
const iRank = this.getRank(sPluginId);
|
|
209
|
-
|
|
210
244
|
if (this._isEditableByPlugin(oResponsibleElementOverlay) === undefined) {
|
|
211
245
|
// The responsibleElement editableByPlugin state was not evaluated yet e.g. because it
|
|
212
246
|
// has no visible geometry, thus evaluateEditable now
|
|
213
247
|
await this.evaluateEditable([oResponsibleElementOverlay], { onRegistration: false });
|
|
214
248
|
}
|
|
215
|
-
Object.
|
|
249
|
+
Object.entries(oAnnotationActionMap).forEach(function([sKey, oAction], iIndex) {
|
|
250
|
+
const sPluginId = oAction.type === AnnotationTypes.StringType && oAction.singleRename
|
|
251
|
+
? sPluginIdSingleLabelChange
|
|
252
|
+
: sPluginIdDefault;
|
|
253
|
+
const iRank = this.getRank(sPluginId);
|
|
216
254
|
if (
|
|
217
255
|
this.isAvailable([oResponsibleElementOverlay])
|
|
256
|
+
&& checkDesigntimeActionProperties(oAction)
|
|
218
257
|
) {
|
|
219
258
|
const sActionText = getActionText(oResponsibleElementOverlay, oAction);
|
|
220
259
|
if (!sActionText) {
|
|
@@ -222,7 +261,7 @@ sap.ui.define([
|
|
|
222
261
|
}
|
|
223
262
|
|
|
224
263
|
aMenuItems.push({
|
|
225
|
-
id: sPluginId
|
|
264
|
+
id: `${sPluginId}_${sKey}`,
|
|
226
265
|
rank: iRank + iIndex,
|
|
227
266
|
text: sActionText,
|
|
228
267
|
icon: getActionIcon(oAction),
|
|
@@ -230,7 +269,8 @@ sap.ui.define([
|
|
|
230
269
|
typeof oAction.isEnabled === "function" && oAction.isEnabled(aElementOverlays[0].getElement())
|
|
231
270
|
|| (oAction.isEnabled !== false) && this.isEnabled(aElementOverlays)
|
|
232
271
|
),
|
|
233
|
-
handler: this.handler.bind(this, aElementOverlays, oAction)
|
|
272
|
+
handler: this.handler.bind(this, aElementOverlays, oAction),
|
|
273
|
+
additionalInfo: this._getAdditionalInfo(oResponsibleElementOverlay, oAction)
|
|
234
274
|
});
|
|
235
275
|
}
|
|
236
276
|
}, this);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright
|
|
3
|
+
* (c) Copyright 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
|
|
|
@@ -119,7 +119,7 @@ sap.ui.define([
|
|
|
119
119
|
* @class The AddIFrame allows trigger AddIFrame operations on the overlay.
|
|
120
120
|
* @extends sap.ui.rta.plugin.BaseCreate
|
|
121
121
|
* @author SAP SE
|
|
122
|
-
* @version 1.
|
|
122
|
+
* @version 1.136.0
|
|
123
123
|
* @constructor
|
|
124
124
|
* @private
|
|
125
125
|
* @since 1.75
|
|
@@ -186,6 +186,9 @@ sap.ui.define([
|
|
|
186
186
|
if (oAction) {
|
|
187
187
|
var oSiblingMenuItem = {
|
|
188
188
|
id: "CTX_CREATE_SIBLING_IFRAME",
|
|
189
|
+
additionalInfo: this._getAdditionalInfo(aElementOverlays[0], oAction, {
|
|
190
|
+
additionalInfoKey: "IFRAME_RTA_CONTEXT_MENU_INFO"
|
|
191
|
+
}),
|
|
189
192
|
rank: iBaseRank,
|
|
190
193
|
action: oAction,
|
|
191
194
|
...getCommonProperties.call(this)
|
|
@@ -202,6 +205,9 @@ sap.ui.define([
|
|
|
202
205
|
var oParentMenuItem = {
|
|
203
206
|
action: oAction,
|
|
204
207
|
id: `CTX_CREATE_CHILD_IFRAME_${oAction.aggregation.toUpperCase()}`,
|
|
208
|
+
additionalInfo: this._getAdditionalInfo(aElementOverlays[0], oAction, {
|
|
209
|
+
additionalInfoKey: "IFRAME_RTA_CONTEXT_MENU_INFO"
|
|
210
|
+
}),
|
|
205
211
|
rank: ++iBaseRank,
|
|
206
212
|
...getCommonProperties.call(this, oAction.aggregation)
|
|
207
213
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright
|
|
3
|
+
* (c) Copyright 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([
|
|
@@ -159,7 +159,7 @@ sap.ui.define([
|
|
|
159
159
|
* @class Context - Dialog for IFrame settings in Runtime Authoring
|
|
160
160
|
* @extends sap.ui.base.ManagedObject
|
|
161
161
|
* @author SAP SE
|
|
162
|
-
* @version 1.
|
|
162
|
+
* @version 1.136.0
|
|
163
163
|
* @constructor
|
|
164
164
|
* @private
|
|
165
165
|
* @since 1.78
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright
|
|
3
|
+
* (c) Copyright 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/
|
|
9
|
-
"sap/ui/rta/plugin/
|
|
10
|
-
"sap/
|
|
8
|
+
"sap/base/Log",
|
|
9
|
+
"sap/ui/rta/plugin/rename/RenameDialog",
|
|
10
|
+
"sap/ui/rta/plugin/Plugin"
|
|
11
11
|
], function(
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
Log,
|
|
13
|
+
RenameDialog,
|
|
14
|
+
Plugin
|
|
15
15
|
) {
|
|
16
16
|
"use strict";
|
|
17
17
|
|
|
@@ -28,7 +28,7 @@ sap.ui.define([
|
|
|
28
28
|
* @extends sap.ui.rta.plugin.Plugin
|
|
29
29
|
*
|
|
30
30
|
* @author SAP SE
|
|
31
|
-
* @version 1.
|
|
31
|
+
* @version 1.136.0
|
|
32
32
|
*
|
|
33
33
|
* @constructor
|
|
34
34
|
* @private
|
|
@@ -56,41 +56,28 @@ sap.ui.define([
|
|
|
56
56
|
}
|
|
57
57
|
});
|
|
58
58
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
Rename.prototype.exit = function(...aArgs) {
|
|
63
|
-
Plugin.prototype.exit.apply(this, aArgs);
|
|
64
|
-
|
|
65
|
-
this.setBusy(false);
|
|
66
|
-
RenameHandler._exit.call(this);
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* @override
|
|
71
|
-
*/
|
|
72
|
-
Rename.prototype.setDesignTime = function(oDesignTime) {
|
|
73
|
-
RenameHandler._setDesignTime.call(this, oDesignTime);
|
|
59
|
+
Rename.prototype.init = function(...aArgs) {
|
|
60
|
+
Plugin.prototype.init.apply(this, aArgs);
|
|
61
|
+
this._oDialog = new RenameDialog();
|
|
74
62
|
};
|
|
75
63
|
|
|
76
|
-
Rename.prototype.startEdit = function(oOverlay) {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
64
|
+
Rename.prototype.startEdit = async function(oOverlay) {
|
|
65
|
+
const oResponsibleElementOverlay = this.getResponsibleElementOverlay(oOverlay);
|
|
66
|
+
const oDomRef = this.getAction(oOverlay).domRef;
|
|
67
|
+
const sNewText = await this._oDialog.openDialogAndHandleRename({
|
|
80
68
|
overlay: oOverlay,
|
|
81
|
-
domRef:
|
|
82
|
-
|
|
83
|
-
pluginMethodName: "plugin.Rename.startEdit"
|
|
69
|
+
domRef: oDomRef,
|
|
70
|
+
action: this.getAction(oResponsibleElementOverlay)
|
|
84
71
|
});
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
RenameHandler._stopEdit.call(this, bRestoreFocus, "plugin.Rename.stopEdit");
|
|
72
|
+
if (sNewText) {
|
|
73
|
+
this.createRenameCommand(oOverlay, sNewText);
|
|
74
|
+
}
|
|
89
75
|
};
|
|
90
76
|
|
|
91
77
|
Rename.prototype.handler = function(aElementOverlays) {
|
|
92
|
-
|
|
93
|
-
|
|
78
|
+
const aSelectedOverlays = this.getSelectedOverlays();
|
|
79
|
+
const [oOverlay] = aSelectedOverlays?.length > 0 ? aSelectedOverlays : aElementOverlays;
|
|
80
|
+
this.startEdit(oOverlay);
|
|
94
81
|
};
|
|
95
82
|
|
|
96
83
|
/**
|
|
@@ -145,16 +132,6 @@ sap.ui.define([
|
|
|
145
132
|
return bIsEnabled;
|
|
146
133
|
};
|
|
147
134
|
|
|
148
|
-
/**
|
|
149
|
-
* @override
|
|
150
|
-
*/
|
|
151
|
-
Rename.prototype.registerElementOverlay = function(...aArgs) {
|
|
152
|
-
const [oOverlay] = aArgs;
|
|
153
|
-
oOverlay.attachEvent("editableChange", RenameHandler._manageClickEvent, this);
|
|
154
|
-
|
|
155
|
-
Plugin.prototype.registerElementOverlay.apply(this, aArgs);
|
|
156
|
-
};
|
|
157
|
-
|
|
158
135
|
/**
|
|
159
136
|
* @param {sap.ui.dt.ElementOverlay} oOverlay - Overlay to be checked for editable
|
|
160
137
|
* @returns {Promise.<boolean>|booolean} <code>true</code> if it's editable wrapped in a promise.
|
|
@@ -164,17 +141,6 @@ sap.ui.define([
|
|
|
164
141
|
return this._checkChangeHandlerAndStableId(oOverlay);
|
|
165
142
|
};
|
|
166
143
|
|
|
167
|
-
/**
|
|
168
|
-
* @override
|
|
169
|
-
*/
|
|
170
|
-
Rename.prototype.deregisterElementOverlay = function(...aArgs) {
|
|
171
|
-
const [oOverlay] = aArgs;
|
|
172
|
-
oOverlay.detachEvent("editableChange", RenameHandler._manageClickEvent, this);
|
|
173
|
-
oOverlay.detachBrowserEvent("click", RenameHandler._onClick, this);
|
|
174
|
-
|
|
175
|
-
Plugin.prototype.deregisterElementOverlay.apply(this, aArgs);
|
|
176
|
-
};
|
|
177
|
-
|
|
178
144
|
Rename.prototype.createRenameCommand = function(oElementOverlay, sNewText) {
|
|
179
145
|
var oResponsibleElementOverlay = this.getResponsibleElementOverlay(oElementOverlay);
|
|
180
146
|
var oRenamedElement = oResponsibleElementOverlay.getElement();
|
|
@@ -197,16 +163,6 @@ sap.ui.define([
|
|
|
197
163
|
});
|
|
198
164
|
};
|
|
199
165
|
|
|
200
|
-
/**
|
|
201
|
-
* @returns {Promise} Empty promise
|
|
202
|
-
* @private
|
|
203
|
-
*/
|
|
204
|
-
Rename.prototype._emitLabelChangeEvent = function() {
|
|
205
|
-
var sText = RenameHandler._getCurrentEditableFieldText.call(this);
|
|
206
|
-
this._fnSetControlText(sText);
|
|
207
|
-
return this.createRenameCommand(this._oEditedOverlay, sText);
|
|
208
|
-
};
|
|
209
|
-
|
|
210
166
|
/**
|
|
211
167
|
* Retrieve the context menu item for the action.
|
|
212
168
|
* @param {sap.ui.dt.ElementOverlay|sap.ui.dt.ElementOverlay[]} vElementOverlays - Target overlay(s)
|
|
@@ -224,5 +180,11 @@ sap.ui.define([
|
|
|
224
180
|
return "rename";
|
|
225
181
|
};
|
|
226
182
|
|
|
183
|
+
Rename.prototype.destroy = function(...args) {
|
|
184
|
+
Plugin.prototype.destroy.apply(this, args);
|
|
185
|
+
this._oDialog.destroy();
|
|
186
|
+
delete this._oDialog;
|
|
187
|
+
};
|
|
188
|
+
|
|
227
189
|
return Rename;
|
|
228
190
|
});
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
<core:FragmentDefinition
|
|
2
|
+
xmlns:core="sap.ui.core"
|
|
3
|
+
xmlns="sap.m"
|
|
4
|
+
>
|
|
5
|
+
<Dialog
|
|
6
|
+
id="sapUiRtaRenameDialog"
|
|
7
|
+
resizable="false"
|
|
8
|
+
draggable="true"
|
|
9
|
+
contentWidth="50rem"
|
|
10
|
+
title="{i18n>RENAME_DIALOG_TITLE}"
|
|
11
|
+
class="sapUiContentPadding"
|
|
12
|
+
initialFocus="sapUiRtaRenameDialog_input"
|
|
13
|
+
escapeHandler=".onCancel"
|
|
14
|
+
>
|
|
15
|
+
<content>
|
|
16
|
+
<HBox
|
|
17
|
+
alignItems="Center"
|
|
18
|
+
justifyContent="Start"
|
|
19
|
+
fitContainer="true"
|
|
20
|
+
>
|
|
21
|
+
<Label
|
|
22
|
+
text="{i18n>RENAME_DIALOG_LABEL}"
|
|
23
|
+
labelFor="sapUiRtaRenameDialog_input"
|
|
24
|
+
wrapping="true"
|
|
25
|
+
>
|
|
26
|
+
<layoutData>
|
|
27
|
+
<FlexItemData maxWidth="10rem" />
|
|
28
|
+
</layoutData>
|
|
29
|
+
</Label>
|
|
30
|
+
<Input
|
|
31
|
+
id="sapUiRtaRenameDialog_input"
|
|
32
|
+
value="{/newText}"
|
|
33
|
+
placeholder="{i18n>RENAME_DIALOG_PLACEHOLDER}"
|
|
34
|
+
liveChange="onTextChange"
|
|
35
|
+
valueState="{= ${/validationError} === undefined ? 'None' : 'Error'}"
|
|
36
|
+
valueStateText="{/validationError}"
|
|
37
|
+
width="100%"
|
|
38
|
+
>
|
|
39
|
+
<layoutData>
|
|
40
|
+
<FlexItemData growFactor="1" styleClass="sapUiTinyMarginBegin" />
|
|
41
|
+
</layoutData>
|
|
42
|
+
</Input>
|
|
43
|
+
</HBox>
|
|
44
|
+
</content>
|
|
45
|
+
<beginButton>
|
|
46
|
+
<Button
|
|
47
|
+
id="sapUiRtaRenameDialog_saveButton"
|
|
48
|
+
enabled="{= ${/validationError} === undefined }"
|
|
49
|
+
type="Emphasized"
|
|
50
|
+
text="{i18n>RENAME_DIALOG_CONFIRM}"
|
|
51
|
+
press="onSave"
|
|
52
|
+
/>
|
|
53
|
+
</beginButton>
|
|
54
|
+
<endButton>
|
|
55
|
+
<Button
|
|
56
|
+
id="sapUiRtaRenameDialog_cancelButton"
|
|
57
|
+
type="Transparent"
|
|
58
|
+
text="{i18n>RENAME_DIALOG_CANCEL}"
|
|
59
|
+
press="onCancel"
|
|
60
|
+
/>
|
|
61
|
+
</endButton>
|
|
62
|
+
</Dialog>
|
|
63
|
+
</core:FragmentDefinition>
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
|
|
2
|
+
/*!
|
|
3
|
+
* OpenUI5
|
|
4
|
+
* (c) Copyright 2025 SAP SE or an SAP affiliate company.
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
6
|
+
*/
|
|
7
|
+
sap.ui.define([
|
|
8
|
+
"sap/ui/base/ManagedObject",
|
|
9
|
+
"sap/ui/core/Element",
|
|
10
|
+
"sap/ui/core/Fragment",
|
|
11
|
+
"sap/ui/model/json/JSONModel",
|
|
12
|
+
"sap/ui/model/resource/ResourceModel",
|
|
13
|
+
"sap/ui/rta/util/validateText",
|
|
14
|
+
"sap/ui/rta/Utils"
|
|
15
|
+
], function(
|
|
16
|
+
ManagedObject,
|
|
17
|
+
Element,
|
|
18
|
+
Fragment,
|
|
19
|
+
JSONModel,
|
|
20
|
+
ResourceModel,
|
|
21
|
+
validateText,
|
|
22
|
+
RtaUtils
|
|
23
|
+
) {
|
|
24
|
+
"use strict";
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* @class Constructor for a new sap.ui.rta.plugin.rename.RenameDialog.
|
|
28
|
+
* @extends sap.ui.base.ManagedObject
|
|
29
|
+
* @author SAP SE
|
|
30
|
+
* @version 1.136.0
|
|
31
|
+
* @constructor
|
|
32
|
+
* @since 1.136
|
|
33
|
+
* @private
|
|
34
|
+
* @ui5-restricted sap.ui.rta
|
|
35
|
+
*/
|
|
36
|
+
const RenameDialog = ManagedObject.extend("sap.ui.rta.plugin.rename.RenameDialog");
|
|
37
|
+
|
|
38
|
+
RenameDialog.prototype._createPopup = async function() {
|
|
39
|
+
const oDialog = await Fragment.load({
|
|
40
|
+
name: "sap.ui.rta.plugin.rename.RenameDialog",
|
|
41
|
+
controller: this
|
|
42
|
+
});
|
|
43
|
+
oDialog.addStyleClass(RtaUtils.getRtaStyleClassName());
|
|
44
|
+
this.oDialogModel = new JSONModel();
|
|
45
|
+
oDialog.setModel(this.oDialogModel);
|
|
46
|
+
const oI18nModel = new ResourceModel({ bundleName: "sap.ui.rta.messagebundle" });
|
|
47
|
+
oDialog.setModel(oI18nModel, "i18n");
|
|
48
|
+
|
|
49
|
+
return oDialog;
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
RenameDialog.prototype._openPopup = function() {
|
|
53
|
+
this._oDialog.open();
|
|
54
|
+
const oInput = Element.getElementById("sapUiRtaRenameDialog_input");
|
|
55
|
+
oInput.getFocusDomRef().select();
|
|
56
|
+
return new Promise((resolve) => {
|
|
57
|
+
this._fnResolveAfterClose = resolve;
|
|
58
|
+
});
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
RenameDialog.prototype.openDialogAndHandleRename = async function(mPropertyBag) {
|
|
62
|
+
this._oDialog = await this._createPopup();
|
|
63
|
+
const oOverlay = mPropertyBag.overlay;
|
|
64
|
+
const oElement = oOverlay.getElement();
|
|
65
|
+
const oDesignTimeMetadata = oOverlay.getDesignTimeMetadata();
|
|
66
|
+
const oEditableControlDomRef = oDesignTimeMetadata.getAssociatedDomRef(oElement, mPropertyBag.domRef);
|
|
67
|
+
const sCurrentText = typeof mPropertyBag.action.getTextMutators === "function"
|
|
68
|
+
? mPropertyBag.action.getTextMutators(oElement).getText()
|
|
69
|
+
: oEditableControlDomRef.textContent;
|
|
70
|
+
this.oDialogModel.setData({
|
|
71
|
+
oldText: sCurrentText,
|
|
72
|
+
newText: sCurrentText
|
|
73
|
+
});
|
|
74
|
+
this.oDialogModel.refresh(true);
|
|
75
|
+
this.oAction = mPropertyBag.action;
|
|
76
|
+
const sNewText = await this._openPopup();
|
|
77
|
+
const oClosePromise = new Promise((resolve) => {
|
|
78
|
+
this._oDialog.attachAfterClose(() => {
|
|
79
|
+
this._oDialog.destroy();
|
|
80
|
+
resolve();
|
|
81
|
+
});
|
|
82
|
+
});
|
|
83
|
+
this._oDialog.close();
|
|
84
|
+
await oClosePromise;
|
|
85
|
+
return sNewText;
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
const VALIDATION_STATES = {
|
|
89
|
+
VALID: "VALID",
|
|
90
|
+
INVALID: "INVALID",
|
|
91
|
+
SAME_TEXT: "SAME_TEXT"
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
RenameDialog.prototype.checkValidRename = function() {
|
|
95
|
+
const oModelData = this.oDialogModel.getData();
|
|
96
|
+
const sNewText = oModelData.newText || "";
|
|
97
|
+
const sOldText = oModelData.oldText || "";
|
|
98
|
+
try {
|
|
99
|
+
validateText(sNewText, sOldText, this.oAction);
|
|
100
|
+
this.oDialogModel.setProperty("/validationError", undefined);
|
|
101
|
+
return VALIDATION_STATES.VALID;
|
|
102
|
+
} catch (oError) {
|
|
103
|
+
if (oError.message === "sameTextError") {
|
|
104
|
+
// Do not show error message in case of same text
|
|
105
|
+
this.oDialogModel.setProperty("/validationError", undefined);
|
|
106
|
+
return VALIDATION_STATES.SAME_TEXT;
|
|
107
|
+
}
|
|
108
|
+
this.oDialogModel.setProperty("/validationError", oError.message);
|
|
109
|
+
this.oDialogModel.setProperty("/isValidRename", false);
|
|
110
|
+
return VALIDATION_STATES.INVALID;
|
|
111
|
+
}
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
RenameDialog.prototype.onTextChange = function(oEvent) {
|
|
115
|
+
const sNewText = oEvent.getParameter("value").trim("");
|
|
116
|
+
this.oDialogModel.setProperty("/newText", sNewText.length ? sNewText : "\xa0");
|
|
117
|
+
this.checkValidRename();
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
RenameDialog.prototype.onSave = function() {
|
|
121
|
+
if (this.checkValidRename() === VALIDATION_STATES.VALID) {
|
|
122
|
+
this._fnResolveAfterClose(this.oDialogModel.getData().newText);
|
|
123
|
+
} else if (this.checkValidRename() === VALIDATION_STATES.SAME_TEXT) {
|
|
124
|
+
this._fnResolveAfterClose();
|
|
125
|
+
}
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
RenameDialog.prototype.onCancel = function() {
|
|
129
|
+
this._fnResolveAfterClose();
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
RenameDialog.prototype.destroy = function(...aArgs) {
|
|
133
|
+
ManagedObject.prototype.destroy.apply(this, aArgs);
|
|
134
|
+
if (this._oDialog) {
|
|
135
|
+
this._oDialog.destroy();
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
return RenameDialog;
|
|
140
|
+
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright
|
|
3
|
+
* (c) Copyright 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
|
|
|
@@ -24,7 +24,7 @@ sap.ui.define([
|
|
|
24
24
|
* @name sap.ui.rta.service.Action
|
|
25
25
|
* @author SAP SE
|
|
26
26
|
* @since 1.58
|
|
27
|
-
* @version 1.
|
|
27
|
+
* @version 1.136.0
|
|
28
28
|
* @private
|
|
29
29
|
* @ui5-restricted
|
|
30
30
|
*
|