@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
|
@@ -6,84 +6,48 @@
|
|
|
6
6
|
sap.ui.define([
|
|
7
7
|
"sap/base/Log",
|
|
8
8
|
"sap/ui/base/ManagedObject",
|
|
9
|
-
"sap/ui/core/Fragment",
|
|
10
|
-
"sap/ui/core/library",
|
|
11
9
|
"sap/ui/core/Element",
|
|
10
|
+
"sap/ui/core/Fragment",
|
|
12
11
|
"sap/ui/core/Lib",
|
|
12
|
+
"sap/ui/core/library",
|
|
13
|
+
"sap/ui/fl/util/getContainerUserInfo",
|
|
13
14
|
"sap/ui/model/json/JSONModel",
|
|
14
|
-
"sap/ui/
|
|
15
|
+
"sap/ui/model/resource/ResourceModel",
|
|
15
16
|
"sap/ui/rta/plugin/iframe/AddIFrameDialogController",
|
|
16
|
-
"sap/ui/
|
|
17
|
+
"sap/ui/rta/Utils"
|
|
17
18
|
], function(
|
|
18
19
|
Log,
|
|
19
20
|
ManagedObject,
|
|
20
|
-
Fragment,
|
|
21
|
-
coreLibrary,
|
|
22
21
|
Element,
|
|
22
|
+
Fragment,
|
|
23
23
|
Lib,
|
|
24
|
+
coreLibrary,
|
|
25
|
+
getContainerUserInfo,
|
|
24
26
|
JSONModel,
|
|
25
|
-
|
|
27
|
+
ResourceModel,
|
|
26
28
|
AddIFrameDialogController,
|
|
27
|
-
|
|
29
|
+
RtaUtils
|
|
28
30
|
) {
|
|
29
31
|
"use strict";
|
|
30
32
|
|
|
31
33
|
// shortcut for sap.ui.core.ValueState
|
|
32
34
|
var {ValueState} = coreLibrary;
|
|
33
35
|
var _oTextResources = Lib.getResourceBundleFor("sap.ui.rta");
|
|
34
|
-
var _sDocumentationURL = "https://help.sap.com/docs/search?q=Embedding%20Content%20%28Object%20Pages%29";
|
|
35
|
-
var _sDocumentationHTML = `${_oTextResources.getText("IFRAME_ADDIFRAME_DIALOG_URL_WARNING_TEXT")} (` + `<a href=${_sDocumentationURL}>${_oTextResources.getText("IFRAME_ADDIFRAME_DIALOG_URL_WARNING_LINKTEXT")}</a>)`;
|
|
36
|
-
var _mText = {
|
|
37
|
-
dialogTitle: _oTextResources.getText("IFRAME_ADDIFRAME_DIALOG_TITLE"),
|
|
38
|
-
dialogCreateTitle: _oTextResources.getText("IFRAME_ADDIFRAME_DIALOG_TITLE"),
|
|
39
|
-
dialogUpdateTitle: _oTextResources.getText("IFRAME_ADDIFRAME_DIALOG_UPDATE_TITLE"),
|
|
40
|
-
sizeTitle: _oTextResources.getText("IFRAME_ADDIFRAME_DIALOG_SIZE_TITLE"),
|
|
41
|
-
widthLabel: _oTextResources.getText("IFRAME_ADDIFRAME_DIALOG_WIDTH_LABEL"),
|
|
42
|
-
widthUnitLabel: _oTextResources.getText("IFRAME_ADDIFRAME_DIALOG_WIDTH_UNITLABEL"),
|
|
43
|
-
heightLabel: _oTextResources.getText("IFRAME_ADDIFRAME_DIALOG_HEIGHT_LABEL"),
|
|
44
|
-
heightUnitLabel: _oTextResources.getText("IFRAME_ADDIFRAME_DIALOG_HEIGHT_UNITLABEL"),
|
|
45
|
-
dimensionsErrorText: _oTextResources.getText("IFRAME_ADDIFRAME_DIALOG_DIMENSIONS_ERROR"),
|
|
46
|
-
saveText: _oTextResources.getText("IFRAME_ADDIFRAME_DIALOG_BUTTON_SAVE"),
|
|
47
|
-
cancelText: _oTextResources.getText("IFRAME_ADDIFRAME_DIALOG_BUTTON_CANCEL"),
|
|
48
|
-
previewUrlLabel: _oTextResources.getText("IFRAME_ADDIFRAME_DIALOG_PREVIEW_URL_LABEL"),
|
|
49
|
-
previewUrlMessage: _oTextResources.getText("IFRAME_ADDIFRAME_DIALOG_BUTTON_PREVIEW_MESSAGE"),
|
|
50
|
-
previewButtonText: _oTextResources.getText("IFRAME_ADDIFRAME_DIALOG_BUTTON_SHOW_PREVIEW"),
|
|
51
|
-
showPreviewButton: _oTextResources.getText("IFRAME_ADDIFRAME_DIALOG_BUTTON_SHOW_PREVIEW"),
|
|
52
|
-
updatePreviewButton: _oTextResources.getText("IFRAME_ADDIFRAME_DIALOG_BUTTON_UPDATE_PREVIEW"),
|
|
53
|
-
previewFrameLabel: _oTextResources.getText("IFRAME_ADDIFRAME_DIALOG_PREVIEW_FRAME_LABEL"),
|
|
54
|
-
parameterSearchLabel: _oTextResources.getText("IFRAME_ADDIFRAME_DIALOG_PARAMETER_SEARCH_LABEL"),
|
|
55
|
-
editUrlLabel: _oTextResources.getText("IFRAME_ADDIFRAME_DIALOG_EDIT_URL_LABEL"),
|
|
56
|
-
parametersLabel: _oTextResources.getText("IFRAME_ADDIFRAME_DIALOG_PARAMETERS_LABEL"),
|
|
57
|
-
columnParameterLabel: _oTextResources.getText("IFRAME_ADDIFRAME_DIALOG_TABLE_PARAMETER_LABEL"),
|
|
58
|
-
columnUiValueLabel: _oTextResources.getText("IFRAME_ADDIFRAME_DIALOG_TABLE_UI_VALUE_LABEL"),
|
|
59
|
-
containerTitleLabel: _oTextResources.getText("IFRAME_ADDIFRAME_DIALOG_CONTAINER_TITLE_LABEL"),
|
|
60
|
-
containerTitleDefaultValue: _oTextResources.getText("IFRAME_ADDIFRAME_DIALOG_CONTAINER_TITLE_DEFAULT_VALUE_TEXT"),
|
|
61
|
-
selectAdditionalTextPercentSection: _oTextResources.getText("IFRAME_ADDIFRAME_DIALOG_SELECT_ADDITIONAL_TEXT_PERCENT_SECTION"),
|
|
62
|
-
selectAdditionalTextPercentHeader: _oTextResources.getText("IFRAME_ADDIFRAME_DIALOG_SELECT_ADDITIONAL_TEXT_PERCENT_HEADER"),
|
|
63
|
-
selectAdditionalTextVh: _oTextResources.getText("IFRAME_ADDIFRAME_DIALOG_SELECT_ADDITIONAL_TEXT_VH"),
|
|
64
|
-
selectAdditionalTextPx: _oTextResources.getText("IFRAME_ADDIFRAME_DIALOG_SELECT_ADDITIONAL_TEXT_PX"),
|
|
65
|
-
selectAdditionalTextRem: _oTextResources.getText("IFRAME_ADDIFRAME_DIALOG_SELECT_ADDITIONAL_TEXT_REM"),
|
|
66
|
-
advancedSettingsTitle: _oTextResources.getText("IFRAME_ADDIFRAME_ADVANCED_SETTINGS"),
|
|
67
|
-
additionalParametersSecurityWarningText: _oTextResources.getText("IFRAME_ADDIFRAME_ADDITIONAL_PARAMETERS_SECURITY_WARNING_TEXT"),
|
|
68
|
-
additionalParametersWarningMoreInfoText: _oTextResources.getText("IFRAME_ADDIFRAME_ADDITIONAL_PARAMETERS_WARNING_MORE_INFO_TEXT"),
|
|
69
|
-
additionalSandboxParametersLabel: _oTextResources.getText("IFRAME_ADDIFRAME_ADD_ADDITIONAL_SANDBOX_PARAMETERS_LABEL"),
|
|
70
|
-
additionalSandboxParametersPlaceholder: _oTextResources.getText("IFRAME_ADDIFRAME_ADD_ADDITIONAL_SANDBOX_PARAMETERS_PLACEHOLDER")
|
|
71
|
-
};
|
|
72
36
|
|
|
73
37
|
function createJSONModel(bSetUpdateTitle, bAsContainer, sFrameWidthValue, sFrameHeightValue, oAdvancedSettings) {
|
|
74
|
-
_mText.dialogTitle = bSetUpdateTitle ? _mText.dialogUpdateTitle : _mText.dialogCreateTitle;
|
|
75
|
-
|
|
76
38
|
var sSelectAdditionalTextPercent = bAsContainer
|
|
77
|
-
?
|
|
78
|
-
:
|
|
39
|
+
? _oTextResources.getText("IFRAME_ADDIFRAME_DIALOG_SELECT_ADDITIONAL_TEXT_PERCENT_SECTION")
|
|
40
|
+
: _oTextResources.getText("IFRAME_ADDIFRAME_DIALOG_SELECT_ADDITIONAL_TEXT_PERCENT_HEADER");
|
|
79
41
|
|
|
80
42
|
return new JSONModel({
|
|
81
|
-
|
|
43
|
+
dialogTitle: bSetUpdateTitle ?
|
|
44
|
+
_oTextResources.getText("IFRAME_ADDIFRAME_DIALOG_UPDATE_TITLE") :
|
|
45
|
+
_oTextResources.getText("IFRAME_ADDIFRAME_DIALOG_TITLE"),
|
|
82
46
|
asContainer: {
|
|
83
47
|
value: bAsContainer
|
|
84
48
|
},
|
|
85
49
|
title: {
|
|
86
|
-
value:
|
|
50
|
+
value: bAsContainer ? _oTextResources.getText("IFRAME_ADDIFRAME_DIALOG_CONTAINER_TITLE_DEFAULT_VALUE_TEXT") : null,
|
|
87
51
|
valueState: ValueState.None,
|
|
88
52
|
id: "sapUiRtaAddIFrameDialog_ContainerTitle_TitleInput"
|
|
89
53
|
},
|
|
@@ -96,7 +60,7 @@ sap.ui.define([
|
|
|
96
60
|
value: "%"
|
|
97
61
|
},
|
|
98
62
|
frameHeight: {
|
|
99
|
-
value: parseFloat(sFrameHeightValue) ||
|
|
63
|
+
value: parseFloat(sFrameHeightValue) || 35,
|
|
100
64
|
valueState: ValueState.None,
|
|
101
65
|
id: "sapUiRtaAddIFrameDialog_HeightInput"
|
|
102
66
|
},
|
|
@@ -114,29 +78,26 @@ sap.ui.define([
|
|
|
114
78
|
value: undefined
|
|
115
79
|
},
|
|
116
80
|
previewUrl: { value: "" },
|
|
117
|
-
documentationLink: {
|
|
118
|
-
HTML: _sDocumentationHTML
|
|
119
|
-
},
|
|
120
81
|
parameters: { value: [] },
|
|
121
82
|
unitsOfWidthMeasure: [{
|
|
122
83
|
unit: "%",
|
|
123
84
|
descriptionText: sSelectAdditionalTextPercent
|
|
124
85
|
}, {
|
|
125
86
|
unit: "px",
|
|
126
|
-
descriptionText:
|
|
87
|
+
descriptionText: _oTextResources.getText("IFRAME_ADDIFRAME_DIALOG_SELECT_ADDITIONAL_TEXT_PX")
|
|
127
88
|
}, {
|
|
128
89
|
unit: "rem",
|
|
129
|
-
descriptionText:
|
|
90
|
+
descriptionText: _oTextResources.getText("IFRAME_ADDIFRAME_DIALOG_SELECT_ADDITIONAL_TEXT_REM")
|
|
130
91
|
}],
|
|
131
92
|
unitsOfHeightMeasure: [{
|
|
132
93
|
unit: "vh",
|
|
133
|
-
descriptionText:
|
|
94
|
+
descriptionText: _oTextResources.getText("IFRAME_ADDIFRAME_DIALOG_SELECT_ADDITIONAL_TEXT_VH")
|
|
134
95
|
}, {
|
|
135
96
|
unit: "px",
|
|
136
|
-
descriptionText:
|
|
97
|
+
descriptionText: _oTextResources.getText("IFRAME_ADDIFRAME_DIALOG_SELECT_ADDITIONAL_TEXT_PX")
|
|
137
98
|
}, {
|
|
138
99
|
unit: "rem",
|
|
139
|
-
descriptionText:
|
|
100
|
+
descriptionText: _oTextResources.getText("IFRAME_ADDIFRAME_DIALOG_SELECT_ADDITIONAL_TEXT_REM")
|
|
140
101
|
}],
|
|
141
102
|
advancedSettings: {
|
|
142
103
|
value: {
|
|
@@ -149,6 +110,9 @@ sap.ui.define([
|
|
|
149
110
|
},
|
|
150
111
|
settingsUpdate: {
|
|
151
112
|
value: false
|
|
113
|
+
},
|
|
114
|
+
showParameters: {
|
|
115
|
+
value: false
|
|
152
116
|
}
|
|
153
117
|
});
|
|
154
118
|
}
|
|
@@ -159,7 +123,7 @@ sap.ui.define([
|
|
|
159
123
|
* @class Context - Dialog for IFrame settings in Runtime Authoring
|
|
160
124
|
* @extends sap.ui.base.ManagedObject
|
|
161
125
|
* @author SAP SE
|
|
162
|
-
* @version 1.
|
|
126
|
+
* @version 1.139.0
|
|
163
127
|
* @constructor
|
|
164
128
|
* @private
|
|
165
129
|
* @since 1.78
|
|
@@ -214,6 +178,8 @@ sap.ui.define([
|
|
|
214
178
|
this._oDialog.setModel(this._oJSONModel, "dialogInfo");
|
|
215
179
|
this._oDialog.setModel(oReferenceControl.getModel());
|
|
216
180
|
this._oDialog.setBindingContext(oReferenceControl.getBindingContext());
|
|
181
|
+
const oI18nModel = new ResourceModel({ bundleName: "sap.ui.rta.messagebundle" });
|
|
182
|
+
this._oDialog.setModel(oI18nModel, "i18n");
|
|
217
183
|
this._openDialog();
|
|
218
184
|
}.bind(this)).catch(function(oError) {
|
|
219
185
|
Log.error("Error loading fragment sap.ui.rta.plugin.iframe.AddIFrameDialog: ", oError);
|
|
@@ -227,7 +193,6 @@ sap.ui.define([
|
|
|
227
193
|
*/
|
|
228
194
|
AddIFrameDialog.prototype._openDialog = function() {
|
|
229
195
|
this._oDialog.attachAfterOpen(function() {
|
|
230
|
-
this._disablePanelExpand();
|
|
231
196
|
const oIframe = Element.getElementById("sapUiRtaAddIFrameDialog_PreviewFrame");
|
|
232
197
|
const oUserModel = oIframe.getModel("$user");
|
|
233
198
|
this._oDialog.setModel(oUserModel, "$user");
|
|
@@ -244,18 +209,6 @@ sap.ui.define([
|
|
|
244
209
|
this._oDialog.open();
|
|
245
210
|
};
|
|
246
211
|
|
|
247
|
-
/**
|
|
248
|
-
* Disables the opening of the Panel at start
|
|
249
|
-
*
|
|
250
|
-
* @private
|
|
251
|
-
*/
|
|
252
|
-
AddIFrameDialog.prototype._disablePanelExpand = function() {
|
|
253
|
-
var oPanelButton = Element.getElementById("sapUiRtaAddIFrameDialog_PreviewLinkPanel").getDependents()[0];
|
|
254
|
-
if (oPanelButton) {
|
|
255
|
-
oPanelButton.setEnabled(false);
|
|
256
|
-
}
|
|
257
|
-
};
|
|
258
|
-
|
|
259
212
|
/**
|
|
260
213
|
* Helper to extract current context URL parameters for the URL builder
|
|
261
214
|
*
|
|
@@ -57,6 +57,14 @@ sap.ui.define([
|
|
|
57
57
|
return new Token({key: sText, text: sText});
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
+
function setNewPreviewSize(sPropertyName) {
|
|
61
|
+
const sUnit = this._oJSONModel.getProperty(`${sPropertyName}Unit/value`);
|
|
62
|
+
const sValue = this._oJSONModel.getProperty(`${sPropertyName}/value`);
|
|
63
|
+
const oIFramePreview = Element.getElementById("sapUiRtaAddIFrameDialog_PreviewFrame");
|
|
64
|
+
const sIFramePropertyName = sPropertyName === "/frameWidth" ? "width" : "height";
|
|
65
|
+
oIFramePreview.setProperty(sIFramePropertyName, sValue + sUnit);
|
|
66
|
+
}
|
|
67
|
+
|
|
60
68
|
return Controller.extend("sap.ui.rta.plugin.iframe.AddIFrameDialogController", {
|
|
61
69
|
// eslint-disable-next-line object-shorthand
|
|
62
70
|
constructor: function(oJSONModel, mSettings) {
|
|
@@ -64,7 +72,15 @@ sap.ui.define([
|
|
|
64
72
|
this._importSettings(mSettings);
|
|
65
73
|
},
|
|
66
74
|
|
|
67
|
-
|
|
75
|
+
onBeforeOpen() {
|
|
76
|
+
if (this._buildPreviewURL()) {
|
|
77
|
+
// If a URL is set initially (updateIframe), validate it
|
|
78
|
+
this.onValidateUrl();
|
|
79
|
+
} else {
|
|
80
|
+
// Disable the save button but don't show an error message
|
|
81
|
+
this._checkIfAllFieldsValid(false);
|
|
82
|
+
}
|
|
83
|
+
// Configure the MultiInput field
|
|
68
84
|
// This syntax is the suggested way by the UI5 documentation to trigger a submit on the input field on focus loss
|
|
69
85
|
const oMultiInput = Element.getElementById("sapUiRtaAddIFrameDialog_AddAdditionalParametersInput");
|
|
70
86
|
oMultiInput.addValidator(multiInputValidator);
|
|
@@ -103,8 +119,7 @@ sap.ui.define([
|
|
|
103
119
|
*/
|
|
104
120
|
onValidationSuccess(oEvent) {
|
|
105
121
|
oEvent.getSource().setValueState(ValueState.None);
|
|
106
|
-
this.
|
|
107
|
-
this._areAllTextFieldsValid() && this._areAllValueStateNones());
|
|
122
|
+
this._checkIfAllFieldsValid(true);
|
|
108
123
|
},
|
|
109
124
|
|
|
110
125
|
/**
|
|
@@ -113,7 +128,7 @@ sap.ui.define([
|
|
|
113
128
|
*/
|
|
114
129
|
onValidationError(oEvent) {
|
|
115
130
|
oEvent.getSource().setValueState(ValueState.Error);
|
|
116
|
-
this.
|
|
131
|
+
this._checkIfAllFieldsValid(false);
|
|
117
132
|
this._setFocusOnInvalidInput();
|
|
118
133
|
},
|
|
119
134
|
|
|
@@ -131,9 +146,8 @@ sap.ui.define([
|
|
|
131
146
|
|
|
132
147
|
/**
|
|
133
148
|
* Event handler for Show Preview button
|
|
134
|
-
* @param {sap.ui.base.Event} oEvent - Event
|
|
135
149
|
*/
|
|
136
|
-
|
|
150
|
+
onPreviewPress() {
|
|
137
151
|
const sReturnedURL = this._buildReturnedURL();
|
|
138
152
|
const sURL = this._buildPreviewURL();
|
|
139
153
|
|
|
@@ -141,15 +155,6 @@ sap.ui.define([
|
|
|
141
155
|
return;
|
|
142
156
|
}
|
|
143
157
|
const oIFrame = Element.getElementById("sapUiRtaAddIFrameDialog_PreviewFrame");
|
|
144
|
-
// enable/disable expanding the Panel
|
|
145
|
-
const oPanel = Element.getElementById("sapUiRtaAddIFrameDialog_PreviewLinkPanel");
|
|
146
|
-
const oPanelButton = oPanel.getDependents()[0];
|
|
147
|
-
if (sURL) {
|
|
148
|
-
oPanelButton.setEnabled(true);
|
|
149
|
-
} else {
|
|
150
|
-
oPanel.setExpanded(false);
|
|
151
|
-
oPanelButton.setEnabled(false);
|
|
152
|
-
}
|
|
153
158
|
try {
|
|
154
159
|
this._oJSONModel.setProperty("/previousFrameUrl/value", sReturnedURL);
|
|
155
160
|
this._oJSONModel.setProperty("/settingsUpdate/value", false);
|
|
@@ -157,11 +162,23 @@ sap.ui.define([
|
|
|
157
162
|
oIFrame.applySettings({ url: sURL, advancedSettings: {...this._oJSONModel.getProperty("/advancedSettings/value")} });
|
|
158
163
|
// Use the URL from the IFrame to ensure that the complete path is shown
|
|
159
164
|
this._oJSONModel.setProperty("/previewUrl/value", oIFrame.getUrl());
|
|
165
|
+
// Prevent the URL preview link (next element in the DOM) from getting the focus because it looks bad
|
|
166
|
+
setTimeout(() => {
|
|
167
|
+
Element.getElementById("sapUiRtaAddIFrameDialog_PreviewLink").getFocusDomRef().blur();
|
|
168
|
+
}, 0);
|
|
160
169
|
} catch (oError) {
|
|
161
170
|
Log.error("Error previewing the URL: ", oError);
|
|
162
171
|
}
|
|
163
172
|
},
|
|
164
173
|
|
|
174
|
+
/**
|
|
175
|
+
* Event handler for handling the visibility of the parameters table
|
|
176
|
+
*/
|
|
177
|
+
toggleParameterVisibility() {
|
|
178
|
+
const bValue = this._oJSONModel.getProperty("/showParameters/value");
|
|
179
|
+
this._oJSONModel.setProperty("/showParameters/value", !bValue);
|
|
180
|
+
},
|
|
181
|
+
|
|
165
182
|
/**
|
|
166
183
|
* Event handler for pressing a parameter
|
|
167
184
|
* @param {sap.ui.base.Event} oEvent - Event
|
|
@@ -182,6 +199,34 @@ sap.ui.define([
|
|
|
182
199
|
oBinding.filter([oFilter]);
|
|
183
200
|
},
|
|
184
201
|
|
|
202
|
+
/**
|
|
203
|
+
* Event handler for size value change - can be the width or height
|
|
204
|
+
* This is used to update the iFrame size in the preview
|
|
205
|
+
* @param {sap.ui.base.Event} oEvent - Event
|
|
206
|
+
*/
|
|
207
|
+
onSizeValueChange(oEvent) {
|
|
208
|
+
// Get changed field and retrieve its unit from this._oJSONModel
|
|
209
|
+
const oSource = oEvent.getSource();
|
|
210
|
+
const sPropertyPath = oSource.getBindingInfo("value").parts[0].path;
|
|
211
|
+
// Extract "/frameWidth" or "/frameHeight" from the binding path (e.g. /frameWidth/value)
|
|
212
|
+
const sPropertyName = sPropertyPath.replace(/\/value$/, "");
|
|
213
|
+
setNewPreviewSize.call(this, sPropertyName);
|
|
214
|
+
},
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* Event handler for size unit change - can be the width or height
|
|
218
|
+
* This is used to update the iFrame size in the preview
|
|
219
|
+
* @param {sap.ui.base.Event} oEvent - Event
|
|
220
|
+
*/
|
|
221
|
+
onSizeUnitChange(oEvent) {
|
|
222
|
+
// Get changed field and retrieve its unit from this._oJSONModel
|
|
223
|
+
const oSource = oEvent.getSource();
|
|
224
|
+
const sPropertyPath = oSource.getBindingInfo("selectedKey").parts[0].path;
|
|
225
|
+
// Extract "/frameWidth" or "/frameHeight" from the binding path (e.g. /frameWidthUnit/value)
|
|
226
|
+
const sPropertyName = sPropertyPath.replace(/Unit\/value$/, "");
|
|
227
|
+
setNewPreviewSize.call(this, sPropertyName);
|
|
228
|
+
},
|
|
229
|
+
|
|
185
230
|
/**
|
|
186
231
|
* Build preview URL
|
|
187
232
|
* @returns {string} URL with resolved bindings
|
|
@@ -237,6 +282,16 @@ sap.ui.define([
|
|
|
237
282
|
return urlCleaner(this._oJSONModel.getProperty("/frameUrl/value"));
|
|
238
283
|
},
|
|
239
284
|
|
|
285
|
+
_checkIfAllFieldsValid(bExternalValidationSuccess) {
|
|
286
|
+
const bAllFieldsValid = (
|
|
287
|
+
bExternalValidationSuccess
|
|
288
|
+
&& !this._oJSONModel.getProperty("/frameUrlError/value")
|
|
289
|
+
&& this._areAllTextFieldsValid()
|
|
290
|
+
&& this._areAllValueStateNones()
|
|
291
|
+
);
|
|
292
|
+
this._oJSONModel.setProperty("/areAllFieldsValid", bAllFieldsValid);
|
|
293
|
+
},
|
|
294
|
+
|
|
240
295
|
onValidateUrl() {
|
|
241
296
|
const sUrl = this._buildPreviewURL();
|
|
242
297
|
const { result: bResult, error: sError } = isValidUrl(sUrl);
|
|
@@ -252,6 +307,7 @@ sap.ui.define([
|
|
|
252
307
|
const sErrorText = _oTextResources.getText(sErrorKey);
|
|
253
308
|
this._oJSONModel.setProperty("/frameUrlError/value", sErrorText);
|
|
254
309
|
}
|
|
310
|
+
this._checkIfAllFieldsValid(bResult);
|
|
255
311
|
},
|
|
256
312
|
|
|
257
313
|
/**
|
|
@@ -281,8 +337,7 @@ sap.ui.define([
|
|
|
281
337
|
bValidationError = true;
|
|
282
338
|
}
|
|
283
339
|
|
|
284
|
-
|
|
285
|
-
this._oJSONModel.setProperty("/areAllFieldsValid", bAllFieldsValid);
|
|
340
|
+
this._checkIfAllFieldsValid(!bValidationError);
|
|
286
341
|
oInput.setValueState(sValueState);
|
|
287
342
|
return bValidationError;
|
|
288
343
|
},
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
resizable="false"
|
|
8
8
|
draggable="true"
|
|
9
9
|
contentWidth="50rem"
|
|
10
|
-
title="{i18n>RENAME_DIALOG_TITLE}"
|
|
10
|
+
title="{= ${/dialogSettings/title} || ${i18n>RENAME_DIALOG_TITLE}}"
|
|
11
11
|
class="sapUiContentPadding"
|
|
12
12
|
initialFocus="sapUiRtaRenameDialog_input"
|
|
13
13
|
escapeHandler=".onCancel"
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
<beginButton>
|
|
46
46
|
<Button
|
|
47
47
|
id="sapUiRtaRenameDialog_saveButton"
|
|
48
|
-
enabled="{
|
|
48
|
+
enabled="{/isSaveEnabled}"
|
|
49
49
|
type="Emphasized"
|
|
50
50
|
text="{i18n>RENAME_DIALOG_CONFIRM}"
|
|
51
51
|
press="onSave"
|
|
@@ -27,7 +27,7 @@ sap.ui.define([
|
|
|
27
27
|
* @class Constructor for a new sap.ui.rta.plugin.rename.RenameDialog.
|
|
28
28
|
* @extends sap.ui.base.ManagedObject
|
|
29
29
|
* @author SAP SE
|
|
30
|
-
* @version 1.
|
|
30
|
+
* @version 1.139.0
|
|
31
31
|
* @constructor
|
|
32
32
|
* @since 1.136
|
|
33
33
|
* @private
|
|
@@ -58,18 +58,42 @@ sap.ui.define([
|
|
|
58
58
|
});
|
|
59
59
|
};
|
|
60
60
|
|
|
61
|
-
|
|
62
|
-
|
|
61
|
+
function getCurrentText(mPropertyBag) {
|
|
62
|
+
if (mPropertyBag.currentText) {
|
|
63
|
+
return mPropertyBag.currentText;
|
|
64
|
+
}
|
|
63
65
|
const oOverlay = mPropertyBag.overlay;
|
|
64
66
|
const oElement = oOverlay.getElement();
|
|
65
67
|
const oDesignTimeMetadata = oOverlay.getDesignTimeMetadata();
|
|
66
68
|
const oEditableControlDomRef = oDesignTimeMetadata.getAssociatedDomRef(oElement, mPropertyBag.domRef);
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
69
|
+
if (typeof mPropertyBag.action.getTextMutators === "function") {
|
|
70
|
+
return mPropertyBag.action.getTextMutators(oElement).getText();
|
|
71
|
+
}
|
|
72
|
+
return oEditableControlDomRef.textContent;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Opens the rename dialog and handles the rename.
|
|
77
|
+
* @param {object} mPropertyBag - Properties for the rename dialog
|
|
78
|
+
* @param {object} mPropertyBag.action - Action definition used to retrieve validators
|
|
79
|
+
* @param {sap.ui.dt.ElementOverlay} mPropertyBag.overlay - Overlay of the element to be renamed
|
|
80
|
+
* @param {string} [mPropertyBag.currentText] - Current text of the element, if not provided it will be fetched via the designtime metadata
|
|
81
|
+
* @param {boolean} [mPropertyBag.acceptSameText] - If true, the save button is still enabled and will return the same text if no changes are made
|
|
82
|
+
* @param {object} [mPropertyBag.dialogSettings] - Additional settings to customize the dialog
|
|
83
|
+
* @param {string} [mPropertyBag.dialogSettings.title] - Title of the dialog
|
|
84
|
+
* @returns {Promise<string>} Promise that resolves with the new text after renaming or undefined if cancelled
|
|
85
|
+
* @private
|
|
86
|
+
* @ui5-restricted sap.ui.rta
|
|
87
|
+
*/
|
|
88
|
+
RenameDialog.prototype.openDialogAndHandleRename = async function(mPropertyBag) {
|
|
89
|
+
this._oDialog = await this._createPopup();
|
|
90
|
+
const sCurrentText = getCurrentText(mPropertyBag);
|
|
91
|
+
this.bAcceptSameText = mPropertyBag.acceptSameText || false;
|
|
70
92
|
this.oDialogModel.setData({
|
|
71
93
|
oldText: sCurrentText,
|
|
72
|
-
newText: sCurrentText
|
|
94
|
+
newText: sCurrentText,
|
|
95
|
+
dialogSettings: mPropertyBag.dialogSettings || {},
|
|
96
|
+
isSaveEnabled: this.bAcceptSameText
|
|
73
97
|
});
|
|
74
98
|
this.oDialogModel.refresh(true);
|
|
75
99
|
this.oAction = mPropertyBag.action;
|
|
@@ -85,43 +109,37 @@ sap.ui.define([
|
|
|
85
109
|
return sNewText;
|
|
86
110
|
};
|
|
87
111
|
|
|
88
|
-
|
|
89
|
-
VALID: "VALID",
|
|
90
|
-
INVALID: "INVALID",
|
|
91
|
-
SAME_TEXT: "SAME_TEXT"
|
|
92
|
-
};
|
|
93
|
-
|
|
94
|
-
RenameDialog.prototype.checkValidRename = function() {
|
|
112
|
+
function checkValidRename() {
|
|
95
113
|
const oModelData = this.oDialogModel.getData();
|
|
96
114
|
const sNewText = oModelData.newText || "";
|
|
97
115
|
const sOldText = oModelData.oldText || "";
|
|
98
116
|
try {
|
|
99
117
|
validateText(sNewText, sOldText, this.oAction);
|
|
100
118
|
this.oDialogModel.setProperty("/validationError", undefined);
|
|
101
|
-
|
|
119
|
+
this.oDialogModel.setProperty("/isSaveEnabled", true);
|
|
120
|
+
return true;
|
|
102
121
|
} catch (oError) {
|
|
103
122
|
if (oError.message === "sameTextError") {
|
|
104
123
|
// Do not show error message in case of same text
|
|
105
124
|
this.oDialogModel.setProperty("/validationError", undefined);
|
|
106
|
-
|
|
125
|
+
this.oDialogModel.setProperty("/isSaveEnabled", this.bAcceptSameText);
|
|
126
|
+
return true;
|
|
107
127
|
}
|
|
108
128
|
this.oDialogModel.setProperty("/validationError", oError.message);
|
|
109
|
-
this.oDialogModel.setProperty("/
|
|
110
|
-
return
|
|
129
|
+
this.oDialogModel.setProperty("/isSaveEnabled", false);
|
|
130
|
+
return false;
|
|
111
131
|
}
|
|
112
|
-
}
|
|
132
|
+
}
|
|
113
133
|
|
|
114
134
|
RenameDialog.prototype.onTextChange = function(oEvent) {
|
|
115
135
|
const sNewText = oEvent.getParameter("value").trim("");
|
|
116
136
|
this.oDialogModel.setProperty("/newText", sNewText.length ? sNewText : "\xa0");
|
|
117
|
-
|
|
137
|
+
checkValidRename.call(this);
|
|
118
138
|
};
|
|
119
139
|
|
|
120
140
|
RenameDialog.prototype.onSave = function() {
|
|
121
|
-
if (
|
|
141
|
+
if (checkValidRename.call(this)) {
|
|
122
142
|
this._fnResolveAfterClose(this.oDialogModel.getData().newText);
|
|
123
|
-
} else if (this.checkValidRename() === VALIDATION_STATES.SAME_TEXT) {
|
|
124
|
-
this._fnResolveAfterClose();
|
|
125
143
|
}
|
|
126
144
|
};
|
|
127
145
|
|