@openui5/sap.ui.rta 1.93.3 → 1.96.2
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/dep5 +6 -11
- package/THIRDPARTY.txt +10 -16
- 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 +160 -121
- package/src/sap/ui/rta/Utils.js +73 -1
- package/src/sap/ui/rta/appVariant/AppVariantDialog.js +4 -3
- package/src/sap/ui/rta/appVariant/AppVariantManager.js +24 -17
- package/src/sap/ui/rta/appVariant/AppVariantUtils.js +107 -78
- package/src/sap/ui/rta/appVariant/Feature.js +5 -12
- package/src/sap/ui/rta/appVariant/Utils.js +10 -2
- package/src/sap/ui/rta/appVariant/manageApps/webapp/controller/ManageApps.controller.js +35 -20
- package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_de.properties +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/AppDescriptorCommand.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 +4 -4
- package/src/sap/ui/rta/command/ControlVariantSave.js +1 -1
- package/src/sap/ui/rta/command/ControlVariantSaveAs.js +7 -4
- package/src/sap/ui/rta/command/ControlVariantSetTitle.js +7 -7
- 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/FlexCommand.js +1 -1
- package/src/sap/ui/rta/command/LREPSerializer.js +1 -1
- package/src/sap/ui/rta/command/LocalReset.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/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 +1 -1
- package/src/sap/ui/rta/command/appDescriptor/AddLibrary.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/enablement/elementActionTest.js +1 -1
- package/src/sap/ui/rta/library.js +2 -2
- package/src/sap/ui/rta/messagebundle.properties +23 -9
- package/src/sap/ui/rta/messagebundle_ar.properties +14 -7
- package/src/sap/ui/rta/messagebundle_bg.properties +14 -7
- package/src/sap/ui/rta/messagebundle_ca.properties +14 -7
- package/src/sap/ui/rta/messagebundle_cs.properties +14 -7
- package/src/sap/ui/rta/messagebundle_cy.properties +14 -7
- package/src/sap/ui/rta/messagebundle_da.properties +14 -7
- package/src/sap/ui/rta/messagebundle_de.properties +23 -16
- package/src/sap/ui/rta/messagebundle_el.properties +14 -7
- package/src/sap/ui/rta/messagebundle_en.properties +14 -7
- package/src/sap/ui/rta/messagebundle_en_GB.properties +14 -7
- package/src/sap/ui/rta/messagebundle_en_US_sappsd.properties +14 -7
- package/src/sap/ui/rta/messagebundle_en_US_saprigi.properties +14 -7
- package/src/sap/ui/rta/messagebundle_en_US_saptrc.properties +14 -7
- package/src/sap/ui/rta/messagebundle_es.properties +14 -7
- package/src/sap/ui/rta/messagebundle_es_MX.properties +14 -7
- package/src/sap/ui/rta/messagebundle_et.properties +14 -7
- package/src/sap/ui/rta/messagebundle_fi.properties +15 -8
- package/src/sap/ui/rta/messagebundle_fr.properties +14 -7
- package/src/sap/ui/rta/messagebundle_fr_CA.properties +14 -7
- package/src/sap/ui/rta/messagebundle_hi.properties +14 -7
- package/src/sap/ui/rta/messagebundle_hr.properties +14 -7
- package/src/sap/ui/rta/messagebundle_hu.properties +14 -7
- package/src/sap/ui/rta/messagebundle_id.properties +16 -9
- package/src/sap/ui/rta/messagebundle_it.properties +14 -7
- package/src/sap/ui/rta/messagebundle_iw.properties +14 -7
- package/src/sap/ui/rta/messagebundle_ja.properties +14 -7
- package/src/sap/ui/rta/messagebundle_kk.properties +14 -7
- package/src/sap/ui/rta/messagebundle_ko.properties +14 -7
- package/src/sap/ui/rta/messagebundle_lt.properties +14 -7
- package/src/sap/ui/rta/messagebundle_lv.properties +14 -7
- package/src/sap/ui/rta/messagebundle_ms.properties +14 -7
- package/src/sap/ui/rta/messagebundle_nl.properties +14 -7
- package/src/sap/ui/rta/messagebundle_no.properties +14 -7
- package/src/sap/ui/rta/messagebundle_pl.properties +14 -7
- package/src/sap/ui/rta/messagebundle_pt.properties +14 -7
- package/src/sap/ui/rta/messagebundle_pt_PT.properties +14 -7
- package/src/sap/ui/rta/messagebundle_ro.properties +14 -7
- package/src/sap/ui/rta/messagebundle_ru.properties +14 -7
- package/src/sap/ui/rta/messagebundle_sh.properties +14 -7
- package/src/sap/ui/rta/messagebundle_sk.properties +14 -7
- package/src/sap/ui/rta/messagebundle_sl.properties +14 -7
- package/src/sap/ui/rta/messagebundle_sv.properties +16 -9
- package/src/sap/ui/rta/messagebundle_th.properties +14 -7
- package/src/sap/ui/rta/messagebundle_tr.properties +14 -7
- package/src/sap/ui/rta/messagebundle_uk.properties +14 -7
- package/src/sap/ui/rta/messagebundle_vi.properties +14 -7
- package/src/sap/ui/rta/messagebundle_zh_CN.properties +14 -7
- package/src/sap/ui/rta/messagebundle_zh_TW.properties +14 -7
- package/src/sap/ui/rta/plugin/AddXMLAtExtensionPoint.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/CompVariant.js +1 -2
- package/src/sap/ui/rta/plugin/ControlVariant.js +10 -5
- 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 +52 -2
- package/src/sap/ui/rta/plugin/EasyAdd.js +1 -1
- package/src/sap/ui/rta/plugin/EasyRemove.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 +18 -61
- package/src/sap/ui/rta/plugin/Remove.js +1 -1
- package/src/sap/ui/rta/plugin/Rename.js +1 -1
- package/src/sap/ui/rta/plugin/RenameHandler.js +4 -1
- package/src/sap/ui/rta/plugin/Selection.js +35 -1
- package/src/sap/ui/rta/plugin/Settings.js +15 -14
- package/src/sap/ui/rta/plugin/Split.js +1 -1
- package/src/sap/ui/rta/plugin/Stretch.js +133 -139
- package/src/sap/ui/rta/plugin/additionalElements/ActionExtractor.js +505 -0
- package/src/sap/ui/rta/plugin/additionalElements/AddElementsDialog.fragment.xml +74 -0
- package/src/sap/ui/rta/plugin/additionalElements/AddElementsDialog.js +97 -260
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsAnalyzer.js +4 -2
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsPlugin.js +136 -831
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsUtils.js +117 -0
- package/src/sap/ui/rta/plugin/additionalElements/CommandBuilder.js +337 -0
- package/src/sap/ui/rta/plugin/iframe/AddIFrame.js +8 -5
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.js +31 -29
- 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 +109 -62
- 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/themes/base/ChangeVisualization.less +16 -0
- package/src/sap/ui/rta/themes/base/Overlay.less +59 -58
- package/src/sap/ui/rta/{assets/InPageStyles.css → themes/base/OverlayWithScrollbar.less} +14 -12
- package/src/sap/ui/rta/themes/base/Toolbar.base.less +12 -1
- package/src/sap/ui/rta/themes/base/library.source.less +3 -1
- package/src/sap/ui/rta/themes/sap_hcb/Overlay.less +2 -3
- package/src/sap/ui/rta/toolbar/Adaptation.fragment.xml +67 -48
- package/src/sap/ui/rta/toolbar/Adaptation.js +43 -38
- package/src/sap/ui/rta/toolbar/AdaptationRenderer.js +4 -5
- package/src/sap/ui/rta/toolbar/Base.js +64 -18
- package/src/sap/ui/rta/toolbar/BaseRenderer.js +2 -2
- package/src/sap/ui/rta/toolbar/Fiori.js +9 -9
- package/src/sap/ui/rta/toolbar/FioriLike.js +4 -4
- package/src/sap/ui/rta/toolbar/OverflowToolbarButton.js +98 -0
- package/src/sap/ui/rta/toolbar/Personalization.js +8 -8
- package/src/sap/ui/rta/toolbar/Standalone.js +4 -4
- package/src/sap/ui/rta/toolbar/translation/Translation.js +52 -39
- package/src/sap/ui/rta/util/BindingsExtractor.js +24 -27
- package/src/sap/ui/rta/util/PluginManager.js +2 -4
- package/src/sap/ui/rta/util/PopupManager.js +1 -1
- package/src/sap/ui/rta/util/ServiceEventBus.js +1 -1
- package/src/sap/ui/rta/util/adaptationStarter.js +3 -3
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicator.js +21 -2
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorRegistry.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/ChangeVisualization.js +71 -96
- package/ui5.yaml +4 -1
- package/src/sap/ui/rta/util/changeVisualization/ChangesListPopover.fragment.xml +0 -23
|
@@ -22,7 +22,7 @@ function(
|
|
|
22
22
|
* This class is being assigned to the original Fiori Header Toolbar when RTA Toolbar shows
|
|
23
23
|
* @type {string}
|
|
24
24
|
*/
|
|
25
|
-
var FIORI_HIDDEN_CLASS =
|
|
25
|
+
var FIORI_HIDDEN_CLASS = "sapUiRtaFioriHeaderInvisible";
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
28
|
* Constructor for a new sap.ui.rta.toolbar.Fiori control
|
|
@@ -32,7 +32,7 @@ function(
|
|
|
32
32
|
* @extends sap.ui.rta.toolbar.Adaptation
|
|
33
33
|
*
|
|
34
34
|
* @author SAP SE
|
|
35
|
-
* @version 1.
|
|
35
|
+
* @version 1.96.2
|
|
36
36
|
*
|
|
37
37
|
* @constructor
|
|
38
38
|
* @private
|
|
@@ -44,8 +44,8 @@ function(
|
|
|
44
44
|
metadata: {
|
|
45
45
|
library: "sap.ui.rta"
|
|
46
46
|
},
|
|
47
|
-
renderer:
|
|
48
|
-
type:
|
|
47
|
+
renderer: "sap.ui.rta.toolbar.AdaptationRenderer",
|
|
48
|
+
type: "fiori"
|
|
49
49
|
});
|
|
50
50
|
|
|
51
51
|
Fiori.prototype.init = function () {
|
|
@@ -65,7 +65,7 @@ function(
|
|
|
65
65
|
|
|
66
66
|
if (this._oFioriHeader.getShowLogo() && sLogoPath) {
|
|
67
67
|
// Unstable: if FLP changes ID of <img> element, logo could be not found
|
|
68
|
-
var $logo = this._oFioriHeader.$().find(
|
|
68
|
+
var $logo = this._oFioriHeader.$().find("#shell-header-icon");
|
|
69
69
|
var iWidth;
|
|
70
70
|
var iHeight;
|
|
71
71
|
|
|
@@ -81,8 +81,8 @@ function(
|
|
|
81
81
|
this.getControl("iconBox").addItem(
|
|
82
82
|
new Image(this.getId() + "_fragment--sapUiRta_icon", {
|
|
83
83
|
src: sLogoPath,
|
|
84
|
-
width: iWidth ? iWidth +
|
|
85
|
-
height: iHeight ? iHeight +
|
|
84
|
+
width: iWidth ? iWidth + "px" : iWidth,
|
|
85
|
+
height: iHeight ? iHeight + "px" : iHeight
|
|
86
86
|
})
|
|
87
87
|
);
|
|
88
88
|
}
|
|
@@ -106,7 +106,7 @@ function(
|
|
|
106
106
|
"sap.ui.rta: please check Fiori Launchpad logo, expected size is",
|
|
107
107
|
iWidth + "x" + iHeight + ",",
|
|
108
108
|
"but actual is " + iNaturalWidth + "x" + iNaturalHeight
|
|
109
|
-
].join(
|
|
109
|
+
].join(" "));
|
|
110
110
|
}
|
|
111
111
|
};
|
|
112
112
|
|
|
@@ -121,4 +121,4 @@ function(
|
|
|
121
121
|
};
|
|
122
122
|
|
|
123
123
|
return Fiori;
|
|
124
|
-
}
|
|
124
|
+
});
|
|
@@ -20,7 +20,7 @@ function(
|
|
|
20
20
|
* @extends sap.ui.rta.toolbar.Adaptation
|
|
21
21
|
*
|
|
22
22
|
* @author SAP SE
|
|
23
|
-
* @version 1.
|
|
23
|
+
* @version 1.96.2
|
|
24
24
|
*
|
|
25
25
|
* @constructor
|
|
26
26
|
* @private
|
|
@@ -32,9 +32,9 @@ function(
|
|
|
32
32
|
metadata: {
|
|
33
33
|
library: "sap.ui.rta"
|
|
34
34
|
},
|
|
35
|
-
renderer:
|
|
36
|
-
type:
|
|
35
|
+
renderer: "sap.ui.rta.toolbar.AdaptationRenderer",
|
|
36
|
+
type: "fiori"
|
|
37
37
|
});
|
|
38
38
|
|
|
39
39
|
return FioriLike;
|
|
40
|
-
}
|
|
40
|
+
});
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* OpenUI5
|
|
3
|
+
* (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
sap.ui.define([
|
|
8
|
+
"sap/m/OverflowToolbarButton",
|
|
9
|
+
"sap/m/ButtonRenderer",
|
|
10
|
+
"sap/m/Button"
|
|
11
|
+
],
|
|
12
|
+
function(
|
|
13
|
+
SapMOverflowToolbarButton,
|
|
14
|
+
ButtonRenderer,
|
|
15
|
+
Button
|
|
16
|
+
) {
|
|
17
|
+
"use strict";
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Constructor for a new sap.ui.rta.toolbar.OverflowToolbarButton control
|
|
21
|
+
*
|
|
22
|
+
* @class
|
|
23
|
+
* Base class for Toolbar control
|
|
24
|
+
* @extends sap.m.OverflowToolbarButton
|
|
25
|
+
*
|
|
26
|
+
* @author SAP SE
|
|
27
|
+
* @version 1.96.2
|
|
28
|
+
*
|
|
29
|
+
* @constructor
|
|
30
|
+
* @private
|
|
31
|
+
* @since 1.94
|
|
32
|
+
* @alias sap.ui.rta.toolbar.OverflowToolbarButton
|
|
33
|
+
* @experimental Since 1.94. This class is experimental. The API might be changed in the future.
|
|
34
|
+
*/
|
|
35
|
+
|
|
36
|
+
var OverflowToolbarButton = SapMOverflowToolbarButton.extend("sap.ui.rta.toolbar.OverflowToolbarButton", {
|
|
37
|
+
metadata: {
|
|
38
|
+
library: "sap.ui.rta",
|
|
39
|
+
interfaces: [
|
|
40
|
+
"sap.m.IOverflowToolbarContent"
|
|
41
|
+
],
|
|
42
|
+
properties: {
|
|
43
|
+
visibleIcon: {type: "string", defaultValue: ""}
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
renderer: ButtonRenderer
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Remove the icon when entering the OverflowArea
|
|
51
|
+
*
|
|
52
|
+
* @private
|
|
53
|
+
*/
|
|
54
|
+
OverflowToolbarButton.prototype._onBeforeEnterOverflow = function () {
|
|
55
|
+
SapMOverflowToolbarButton.prototype._onBeforeEnterOverflow.apply(this, arguments);
|
|
56
|
+
this.setVisibleIcon(this.getIcon());
|
|
57
|
+
this.setIcon("");
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Restore the icon when leaving the OverflowArea
|
|
62
|
+
*
|
|
63
|
+
* @private
|
|
64
|
+
*/
|
|
65
|
+
OverflowToolbarButton.prototype._onAfterExitOverflow = function () {
|
|
66
|
+
SapMOverflowToolbarButton.prototype._onAfterExitOverflow.apply(this, arguments);
|
|
67
|
+
this.setIcon(this.getVisibleIcon());
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Get the Text if in Overflow-Area or Text in Toolbar is wanted
|
|
72
|
+
*
|
|
73
|
+
* @private
|
|
74
|
+
*/
|
|
75
|
+
OverflowToolbarButton.prototype._getText = function() {
|
|
76
|
+
if ((this.getIcon() === "" && this.getVisibleIcon() === "") || this._bInOverflow) {
|
|
77
|
+
return Button.prototype._getText.call(this);
|
|
78
|
+
}
|
|
79
|
+
return "";
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Special Icon handling when moving the Button in the OverflowArea
|
|
84
|
+
* Required by the {@link sap.m.IOverflowToolbarContent} interface.
|
|
85
|
+
*
|
|
86
|
+
* @public
|
|
87
|
+
* @returns {object} Configuration information for the <code>sap.m.IOverflowToolbarContent</code> interface.
|
|
88
|
+
*/
|
|
89
|
+
OverflowToolbarButton.prototype.getOverflowToolbarConfig = function () {
|
|
90
|
+
return {
|
|
91
|
+
canOverflow: true,
|
|
92
|
+
onBeforeEnterOverflow: this._onBeforeEnterOverflow.bind(this),
|
|
93
|
+
onAfterExitOverflow: this._onAfterExitOverflow.bind(this)
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
return OverflowToolbarButton;
|
|
98
|
+
}, false);
|
|
@@ -22,7 +22,7 @@ function(
|
|
|
22
22
|
* @extends sap.ui.rta.toolbar.Base
|
|
23
23
|
*
|
|
24
24
|
* @author SAP SE
|
|
25
|
-
* @version 1.
|
|
25
|
+
* @version 1.96.2
|
|
26
26
|
*
|
|
27
27
|
* @constructor
|
|
28
28
|
* @private
|
|
@@ -31,8 +31,8 @@ function(
|
|
|
31
31
|
* @experimental Since 1.48. This class is experimental. API might be changed in future.
|
|
32
32
|
*/
|
|
33
33
|
var Personalization = Base.extend("sap.ui.rta.toolbar.Personalization", {
|
|
34
|
-
renderer:
|
|
35
|
-
type:
|
|
34
|
+
renderer: "sap.ui.rta.toolbar.BaseRenderer",
|
|
35
|
+
type: "personalization",
|
|
36
36
|
metadata: {
|
|
37
37
|
library: "sap.ui.rta",
|
|
38
38
|
events: {
|
|
@@ -55,13 +55,13 @@ function(
|
|
|
55
55
|
type: "Transparent",
|
|
56
56
|
text: "{i18n>BTN_RESTORE}",
|
|
57
57
|
visible: true,
|
|
58
|
-
press: this.eventHandler.bind(this,
|
|
59
|
-
}).data(
|
|
58
|
+
press: this.eventHandler.bind(this, "Restore")
|
|
59
|
+
}).data("name", "restore"),
|
|
60
60
|
new Button("sapUiRta_exit", {
|
|
61
61
|
type: "Emphasized",
|
|
62
62
|
text: "{i18n>BTN_DONE}",
|
|
63
|
-
press: this.eventHandler.bind(this,
|
|
64
|
-
}).data(
|
|
63
|
+
press: this.eventHandler.bind(this, "Exit")
|
|
64
|
+
}).data("name", "exit")
|
|
65
65
|
].forEach(function (oControl) {
|
|
66
66
|
this.addItem(oControl);
|
|
67
67
|
}.bind(this));
|
|
@@ -70,4 +70,4 @@ function(
|
|
|
70
70
|
};
|
|
71
71
|
|
|
72
72
|
return Personalization;
|
|
73
|
-
}
|
|
73
|
+
});
|
|
@@ -20,7 +20,7 @@ function(
|
|
|
20
20
|
* @extends sap.ui.rta.toolbar.Adaptation
|
|
21
21
|
*
|
|
22
22
|
* @author SAP SE
|
|
23
|
-
* @version 1.
|
|
23
|
+
* @version 1.96.2
|
|
24
24
|
*
|
|
25
25
|
* @constructor
|
|
26
26
|
* @private
|
|
@@ -32,9 +32,9 @@ function(
|
|
|
32
32
|
metadata: {
|
|
33
33
|
library: "sap.ui.rta"
|
|
34
34
|
},
|
|
35
|
-
renderer:
|
|
36
|
-
type:
|
|
35
|
+
renderer: "sap.ui.rta.toolbar.AdaptationRenderer",
|
|
36
|
+
type: "standalone"
|
|
37
37
|
});
|
|
38
38
|
|
|
39
39
|
return Standalone;
|
|
40
|
-
}
|
|
40
|
+
});
|
|
@@ -5,11 +5,12 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
sap.ui.define([
|
|
8
|
+
"sap/ui/base/ManagedObject",
|
|
8
9
|
"sap/ui/core/Fragment",
|
|
9
10
|
"sap/ui/rta/Utils",
|
|
10
11
|
"sap/ui/model/json/JSONModel"
|
|
11
|
-
],
|
|
12
|
-
|
|
12
|
+
], function(
|
|
13
|
+
ManagedObject,
|
|
13
14
|
Fragment,
|
|
14
15
|
Utils,
|
|
15
16
|
JSONModel
|
|
@@ -17,23 +18,18 @@ function(
|
|
|
17
18
|
"use strict";
|
|
18
19
|
|
|
19
20
|
var oDialog;
|
|
20
|
-
var
|
|
21
|
-
|
|
22
|
-
var oTranslationModel = new JSONModel({
|
|
23
|
-
sourceLanguage: "",
|
|
24
|
-
downloadChangedTexts: false
|
|
25
|
-
});
|
|
21
|
+
var oPopover;
|
|
26
22
|
|
|
27
23
|
function resetTranslationDialog() {
|
|
28
|
-
|
|
29
|
-
|
|
24
|
+
this._oTranslationModel.setProperty("/sourceLanguage", "");
|
|
25
|
+
this._oTranslationModel.setProperty("/downloadChangedTexts", false);
|
|
30
26
|
return Promise.resolve(oDialog);
|
|
31
27
|
}
|
|
32
28
|
|
|
33
29
|
function createDownloadTranslationDialog() {
|
|
34
30
|
return Fragment.load({
|
|
35
31
|
name: "sap.ui.rta.toolbar.translation.DownloadTranslationDialog",
|
|
36
|
-
id:
|
|
32
|
+
id: this.getContext().getId() + "_download_translation_fragment",
|
|
37
33
|
controller: {
|
|
38
34
|
onDownloadFile: function () {
|
|
39
35
|
oDialog.close();
|
|
@@ -44,10 +40,10 @@ function(
|
|
|
44
40
|
}
|
|
45
41
|
}).then(function (oTranslationDialog) {
|
|
46
42
|
oDialog = oTranslationDialog;
|
|
47
|
-
oDialog.setModel(
|
|
43
|
+
oDialog.setModel(this._oTranslationModel, "translation");
|
|
48
44
|
oDialog.addStyleClass(Utils.getRtaStyleClassName());
|
|
49
|
-
|
|
50
|
-
});
|
|
45
|
+
this.getContext().addDependent(oDialog);
|
|
46
|
+
}.bind(this));
|
|
51
47
|
}
|
|
52
48
|
|
|
53
49
|
/**
|
|
@@ -57,38 +53,57 @@ function(
|
|
|
57
53
|
* @class
|
|
58
54
|
*
|
|
59
55
|
* @author SAP SE
|
|
60
|
-
* @version 1.
|
|
56
|
+
* @version 1.96.2
|
|
61
57
|
*
|
|
62
58
|
* @constructor
|
|
63
59
|
* @private
|
|
64
60
|
* @since 1.93
|
|
65
61
|
* @alias sap.ui.rta.toolbar.translation.Translation
|
|
66
62
|
*/
|
|
67
|
-
var Translation = {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
63
|
+
var Translation = ManagedObject.extend("sap.ui.rta.toolbar.translation.Translation", {
|
|
64
|
+
metadata: {
|
|
65
|
+
properties: {
|
|
66
|
+
context: {
|
|
67
|
+
type: "sap.ui.rta.toolbar.Base"
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
constructor: function() {
|
|
72
|
+
ManagedObject.prototype.constructor.apply(this, arguments);
|
|
73
|
+
this._oTranslationModel = new JSONModel({
|
|
74
|
+
sourceLanguage: "",
|
|
75
|
+
downloadChangedTexts: false
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
});
|
|
71
79
|
|
|
72
|
-
|
|
73
|
-
if (
|
|
74
|
-
|
|
75
|
-
oDialog = undefined;
|
|
80
|
+
Translation.prototype.exit = function() {
|
|
81
|
+
if (this._oDialogPromise) {
|
|
82
|
+
this._oDialogPromise.then(oDialog.destroy.bind(oDialog));
|
|
76
83
|
}
|
|
84
|
+
if (this._oPopoverPromise) {
|
|
85
|
+
this._oPopoverPromise.then(oPopover.destroy.bind(oPopover));
|
|
86
|
+
}
|
|
87
|
+
};
|
|
77
88
|
|
|
78
|
-
|
|
79
|
-
|
|
89
|
+
Translation.prototype.showTranslationPopover = function (oEvent) {
|
|
90
|
+
var oTranslationButton = oEvent.getSource();
|
|
91
|
+
|
|
92
|
+
if (!this._oPopoverPromise) {
|
|
93
|
+
this._oPopoverPromise = Fragment.load({
|
|
80
94
|
name: "sap.ui.rta.toolbar.translation.TranslationPopover",
|
|
81
|
-
id:
|
|
95
|
+
id: this.getContext().getId() + "_translationPopoverDialog",
|
|
82
96
|
controller: {
|
|
83
|
-
openDownloadTranslationDialog:
|
|
97
|
+
openDownloadTranslationDialog: this.openDownloadTranslationDialog.bind(this)
|
|
84
98
|
}
|
|
85
|
-
}).then(function (
|
|
86
|
-
|
|
87
|
-
|
|
99
|
+
}).then(function (oTranslationPopover) {
|
|
100
|
+
oPopover = oTranslationPopover;
|
|
101
|
+
oTranslationButton.addDependent(oTranslationPopover);
|
|
102
|
+
return oTranslationPopover;
|
|
88
103
|
});
|
|
89
104
|
}
|
|
90
105
|
|
|
91
|
-
return
|
|
106
|
+
return this._oPopoverPromise.then(function (oTranslationDialog) {
|
|
92
107
|
if (!oTranslationDialog.isOpen()) {
|
|
93
108
|
oTranslationDialog.openBy(oTranslationButton);
|
|
94
109
|
} else {
|
|
@@ -97,18 +112,16 @@ function(
|
|
|
97
112
|
});
|
|
98
113
|
};
|
|
99
114
|
|
|
100
|
-
Translation.openDownloadTranslationDialog = function () {
|
|
101
|
-
var oDialogPromise;
|
|
102
|
-
|
|
115
|
+
Translation.prototype.openDownloadTranslationDialog = function () {
|
|
103
116
|
if (oDialog) {
|
|
104
|
-
|
|
117
|
+
this._oDialogPromise = resetTranslationDialog.call(this);
|
|
105
118
|
} else {
|
|
106
|
-
|
|
119
|
+
this._oDialogPromise = createDownloadTranslationDialog.call(this);
|
|
107
120
|
}
|
|
108
|
-
return
|
|
109
|
-
|
|
121
|
+
return this._oDialogPromise.then(function () {
|
|
122
|
+
this.getContext().addDependent(oDialog);
|
|
110
123
|
return oDialog.open();
|
|
111
|
-
});
|
|
124
|
+
}.bind(this));
|
|
112
125
|
};
|
|
113
126
|
|
|
114
127
|
return Translation;
|
|
@@ -16,6 +16,8 @@ function(
|
|
|
16
16
|
) {
|
|
17
17
|
"use strict";
|
|
18
18
|
|
|
19
|
+
var BindingsExtractor = {};
|
|
20
|
+
|
|
19
21
|
/**
|
|
20
22
|
* Get all relevant binding paths and binding context paths for the element (from all properties)
|
|
21
23
|
*
|
|
@@ -26,14 +28,14 @@ function(
|
|
|
26
28
|
*
|
|
27
29
|
* @private
|
|
28
30
|
*/
|
|
29
|
-
function
|
|
31
|
+
BindingsExtractor.collectBindingPaths = function(oElement, oModel, oRelevantContainerElement) {
|
|
30
32
|
var mBindingsCollection = {
|
|
31
33
|
bindingPaths: [],
|
|
32
34
|
bindingContextPaths: []
|
|
33
35
|
};
|
|
34
36
|
var sAggregationName = oElement.sParentAggregationName;
|
|
35
37
|
var oParent = oElement.getParent();
|
|
36
|
-
var aBindings = getBindings(oElement, oModel, undefined, undefined, oRelevantContainerElement);
|
|
38
|
+
var aBindings = BindingsExtractor.getBindings(oElement, oModel, undefined, undefined, oRelevantContainerElement);
|
|
37
39
|
|
|
38
40
|
if (oParent) {
|
|
39
41
|
var oDefaultAggregation = oParent.getMetadata().getAggregation();
|
|
@@ -50,7 +52,7 @@ function(
|
|
|
50
52
|
if (oTemplateDefaultAggregation) {
|
|
51
53
|
var sTemplateDefaultAggregationName = oTemplateDefaultAggregation.name;
|
|
52
54
|
var oTemplateElement = ElementUtil.getAggregation(oTemplate, sTemplateDefaultAggregationName)[iPositionOfInvisibleElement];
|
|
53
|
-
aBindings = aBindings.concat(getBindings(oTemplateElement, null, true, undefined, oRelevantContainerElement));
|
|
55
|
+
aBindings = aBindings.concat(BindingsExtractor.getBindings(oTemplateElement, null, true, undefined, oRelevantContainerElement));
|
|
54
56
|
}
|
|
55
57
|
}
|
|
56
58
|
}
|
|
@@ -70,13 +72,15 @@ function(
|
|
|
70
72
|
}
|
|
71
73
|
}
|
|
72
74
|
if (isPlainObject(aBindings[i])) {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
+
var sCurrentPath = aBindings[i].parts[0] && aBindings[i].parts[0].path;
|
|
76
|
+
// Sometimes the binding does not contain a path
|
|
77
|
+
if (sCurrentPath && mBindingsCollection.bindingPaths.indexOf(sCurrentPath) === -1) {
|
|
78
|
+
mBindingsCollection.bindingPaths.push(sCurrentPath);
|
|
75
79
|
}
|
|
76
80
|
}
|
|
77
81
|
}
|
|
78
82
|
return mBindingsCollection;
|
|
79
|
-
}
|
|
83
|
+
};
|
|
80
84
|
|
|
81
85
|
function isElementRelatedToRelevantContainer(oElement, oRelevantContainerElement) {
|
|
82
86
|
if (oRelevantContainerElement && oElement !== oRelevantContainerElement) {
|
|
@@ -100,13 +104,13 @@ function(
|
|
|
100
104
|
*
|
|
101
105
|
* @private
|
|
102
106
|
*/
|
|
103
|
-
function
|
|
107
|
+
BindingsExtractor.getBindings = function(oElement, oParentDefaultModel, vTemplate, sAggregationName, oRelevantContainerElement) {
|
|
104
108
|
var aBindings = [];
|
|
105
109
|
if (isElementRelatedToRelevantContainer(oElement, oRelevantContainerElement)) {
|
|
106
110
|
aBindings = (
|
|
107
111
|
vTemplate
|
|
108
112
|
? getBindingsFromTemplateProperties(oElement)
|
|
109
|
-
: getBindingsFromProperties(oElement, oParentDefaultModel)
|
|
113
|
+
: BindingsExtractor.getBindingsFromProperties(oElement, oParentDefaultModel)
|
|
110
114
|
);
|
|
111
115
|
}
|
|
112
116
|
var aAggregationNames = sAggregationName ? [sAggregationName] : Object.keys(oElement.getMetadata().getAllAggregations());
|
|
@@ -116,7 +120,7 @@ function(
|
|
|
116
120
|
});
|
|
117
121
|
|
|
118
122
|
return aBindings;
|
|
119
|
-
}
|
|
123
|
+
};
|
|
120
124
|
|
|
121
125
|
function getBindingsForAggregation(oElement, oParentDefaultModel, vTemplate, sAggregationName, oRelevantContainerElement) {
|
|
122
126
|
var aBindings = [];
|
|
@@ -136,12 +140,11 @@ function(
|
|
|
136
140
|
// Fetching bindings from Element and all children of Element
|
|
137
141
|
aBindings = aBindings.concat(oTemplate || bTemplate
|
|
138
142
|
? getBindingsFromTemplateProperties(oChildElement, oRelevantContainerElement)
|
|
139
|
-
: getBindingsFromProperties(oChildElement, oParentDefaultModel));
|
|
143
|
+
: BindingsExtractor.getBindingsFromProperties(oChildElement, oParentDefaultModel));
|
|
140
144
|
}
|
|
141
|
-
|
|
142
145
|
// For children, templates should not be evaluated (because the delegate also does not consider them)
|
|
143
146
|
aBindings = aBindings.concat(
|
|
144
|
-
getBindings(oChildElement, oParentDefaultModel, false, undefined, oRelevantContainerElement)
|
|
147
|
+
BindingsExtractor.getBindings(oChildElement, oParentDefaultModel, false, undefined, oRelevantContainerElement)
|
|
145
148
|
);
|
|
146
149
|
}
|
|
147
150
|
});
|
|
@@ -159,13 +162,13 @@ function(
|
|
|
159
162
|
*
|
|
160
163
|
* @private
|
|
161
164
|
*/
|
|
162
|
-
function
|
|
165
|
+
BindingsExtractor.flattenBindings = function(oBinding, oParentDefaultModel) {
|
|
163
166
|
var aBindings = [];
|
|
164
167
|
var sModelName = oBinding.getMetadata().getName();
|
|
165
168
|
|
|
166
169
|
if (sModelName === "sap.ui.model.CompositeBinding") {
|
|
167
170
|
oBinding.getBindings().forEach(function (oBinding) {
|
|
168
|
-
aBindings = aBindings.concat(flattenBindings(oBinding, oParentDefaultModel));
|
|
171
|
+
aBindings = aBindings.concat(BindingsExtractor.flattenBindings(oBinding, oParentDefaultModel));
|
|
169
172
|
});
|
|
170
173
|
} else if (
|
|
171
174
|
(
|
|
@@ -185,7 +188,7 @@ function(
|
|
|
185
188
|
}
|
|
186
189
|
|
|
187
190
|
return aBindings;
|
|
188
|
-
}
|
|
191
|
+
};
|
|
189
192
|
|
|
190
193
|
/**
|
|
191
194
|
* Fetches all bindings from template
|
|
@@ -218,7 +221,7 @@ function(
|
|
|
218
221
|
*
|
|
219
222
|
* @private
|
|
220
223
|
*/
|
|
221
|
-
function
|
|
224
|
+
BindingsExtractor.getBindingsFromProperties = function(oElement, oParentDefaultModel) {
|
|
222
225
|
var aPropertiesKeys = Object.keys(oElement.getMetadata().getAllProperties());
|
|
223
226
|
|
|
224
227
|
return aPropertiesKeys
|
|
@@ -226,13 +229,13 @@ function(
|
|
|
226
229
|
.filter(oElement.getBinding.bind(oElement))
|
|
227
230
|
.reduce(function (aBindings, sPropertyName) {
|
|
228
231
|
return aBindings.concat(
|
|
229
|
-
flattenBindings(
|
|
232
|
+
BindingsExtractor.flattenBindings(
|
|
230
233
|
oElement.getBinding(sPropertyName),
|
|
231
234
|
oParentDefaultModel
|
|
232
235
|
)
|
|
233
236
|
);
|
|
234
237
|
}, []);
|
|
235
|
-
}
|
|
238
|
+
};
|
|
236
239
|
|
|
237
240
|
/**
|
|
238
241
|
* Retrieving all bindings from all available properties for a specified element of template
|
|
@@ -264,18 +267,12 @@ function(
|
|
|
264
267
|
* @return {boolean|string} - Returns the binding context path string from element. If not available <code>false</code> is returned.
|
|
265
268
|
* @private
|
|
266
269
|
*/
|
|
267
|
-
function
|
|
270
|
+
BindingsExtractor.getBindingContextPath = function(oElement) {
|
|
268
271
|
if (oElement.getBindingContext() && oElement.getBindingContext().getPath) {
|
|
269
272
|
return oElement.getBindingContext().getPath();
|
|
270
273
|
}
|
|
271
274
|
return undefined;
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
return {
|
|
275
|
-
getBindings: getBindings,
|
|
276
|
-
collectBindingPaths: collectBindingPaths,
|
|
277
|
-
flattenBindings: flattenBindings,
|
|
278
|
-
getBindingsFromProperties: getBindingsFromProperties,
|
|
279
|
-
getBindingContextPath: getBindingContextPath
|
|
280
275
|
};
|
|
276
|
+
|
|
277
|
+
return BindingsExtractor;
|
|
281
278
|
}, true);
|
|
@@ -66,7 +66,7 @@ sap.ui.define([
|
|
|
66
66
|
* Constructor for a new sap.ui.rta.util.PluginManager
|
|
67
67
|
* @extends sap.ui.base.ManagedObject
|
|
68
68
|
* @author SAP SE
|
|
69
|
-
* @version 1.
|
|
69
|
+
* @version 1.96.2
|
|
70
70
|
* @constructor
|
|
71
71
|
* @private
|
|
72
72
|
* @since 1.86
|
|
@@ -153,9 +153,7 @@ sap.ui.define([
|
|
|
153
153
|
});
|
|
154
154
|
|
|
155
155
|
this._mDefaultPlugins["additionalElements"] = new AdditionalElementsPlugin({
|
|
156
|
-
commandFactory: this._oCommandFactory
|
|
157
|
-
analyzer: AdditionalElementsAnalyzer,
|
|
158
|
-
dialog: new AdditionalElementsDialog()
|
|
156
|
+
commandFactory: this._oCommandFactory
|
|
159
157
|
});
|
|
160
158
|
|
|
161
159
|
this._mDefaultPlugins["createContainer"] = new CreateContainerPlugin({
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
sap.ui.define([
|
|
7
7
|
"sap/ui/rta/RuntimeAuthoring",
|
|
8
|
-
"sap/ui/core/
|
|
8
|
+
"sap/ui/core/Control",
|
|
9
9
|
"sap/ui/fl/Utils",
|
|
10
10
|
"sap/ui/fl/Layer",
|
|
11
11
|
"sap/ui/fl/write/api/FeaturesAPI",
|
|
@@ -13,7 +13,7 @@ sap.ui.define([
|
|
|
13
13
|
"sap/base/Log"
|
|
14
14
|
], function(
|
|
15
15
|
RuntimeAuthoring,
|
|
16
|
-
|
|
16
|
+
Control,
|
|
17
17
|
FlexUtils,
|
|
18
18
|
Layer,
|
|
19
19
|
FeaturesAPI,
|
|
@@ -47,7 +47,7 @@ sap.ui.define([
|
|
|
47
47
|
* @private
|
|
48
48
|
*/
|
|
49
49
|
function adaptationStarter(mOptions, loadPlugins, onStart, onFailed, onStop) {
|
|
50
|
-
if (!(mOptions.rootControl instanceof
|
|
50
|
+
if (!(mOptions.rootControl instanceof Control) && !(mOptions.rootControl instanceof UIComponent)) {
|
|
51
51
|
return Promise.reject(new Error("An invalid root control was passed"));
|
|
52
52
|
}
|
|
53
53
|
|