@openui5/sap.ui.rta 1.117.1 → 1.119.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/.eslintrc.json +25 -1
- package/THIRDPARTY.txt +2 -2
- package/package.json +6 -6
- package/src/sap/ui/rta/.library +1 -1
- package/src/sap/ui/rta/Client.js +32 -21
- package/src/sap/ui/rta/RuntimeAuthoring.js +107 -97
- package/src/sap/ui/rta/Utils.js +10 -16
- package/src/sap/ui/rta/api/startAdaptation.js +0 -1
- package/src/sap/ui/rta/api/startKeyUserAdaptation.js +0 -1
- package/src/sap/ui/rta/appVariant/AppVariantDialog.js +24 -26
- package/src/sap/ui/rta/appVariant/AppVariantManager.js +1 -3
- package/src/sap/ui/rta/appVariant/AppVariantOverviewDialog.js +5 -4
- package/src/sap/ui/rta/appVariant/AppVariantUtils.js +21 -21
- package/src/sap/ui/rta/appVariant/Feature.js +20 -30
- package/src/sap/ui/rta/appVariant/S4HanaCloudBackend.js +21 -17
- package/src/sap/ui/rta/appVariant/Utils.js +4 -3
- package/src/sap/ui/rta/appVariant/manageApps/webapp/Component.js +8 -7
- package/src/sap/ui/rta/appVariant/manageApps/webapp/controller/ManageApps.controller.js +17 -17
- package/src/sap/ui/rta/appVariant/manageApps/webapp/manifest.json +1 -1
- package/src/sap/ui/rta/appVariant/manageApps/webapp/model/models.js +1 -1
- package/src/sap/ui/rta/command/AddIFrame.js +10 -7
- package/src/sap/ui/rta/command/AddProperty.js +1 -3
- package/src/sap/ui/rta/command/AddXML.js +7 -7
- package/src/sap/ui/rta/command/AddXMLAtExtensionPoint.js +5 -5
- package/src/sap/ui/rta/command/AppDescriptorCommand.js +1 -3
- package/src/sap/ui/rta/command/BaseCommand.js +1 -3
- package/src/sap/ui/rta/command/BindProperty.js +4 -5
- package/src/sap/ui/rta/command/Combine.js +1 -3
- package/src/sap/ui/rta/command/CommandFactory.js +7 -11
- package/src/sap/ui/rta/command/CompositeCommand.js +2 -6
- package/src/sap/ui/rta/command/ControlVariantConfigure.js +2 -2
- package/src/sap/ui/rta/command/ControlVariantSave.js +1 -1
- package/src/sap/ui/rta/command/ControlVariantSaveAs.js +4 -4
- package/src/sap/ui/rta/command/ControlVariantSetTitle.js +1 -1
- package/src/sap/ui/rta/command/ControlVariantSwitch.js +4 -3
- package/src/sap/ui/rta/command/CreateContainer.js +1 -3
- package/src/sap/ui/rta/command/CustomAdd.js +1 -2
- package/src/sap/ui/rta/command/FlexCommand.js +2 -7
- package/src/sap/ui/rta/command/LREPSerializer.js +1 -3
- package/src/sap/ui/rta/command/LocalReset.js +1 -1
- package/src/sap/ui/rta/command/Move.js +1 -3
- package/src/sap/ui/rta/command/Property.js +1 -3
- package/src/sap/ui/rta/command/Remove.js +1 -3
- package/src/sap/ui/rta/command/Rename.js +1 -3
- package/src/sap/ui/rta/command/Resize.js +1 -1
- package/src/sap/ui/rta/command/Reveal.js +1 -3
- package/src/sap/ui/rta/command/Settings.js +5 -7
- package/src/sap/ui/rta/command/Split.js +1 -3
- package/src/sap/ui/rta/command/Stack.js +3 -5
- package/src/sap/ui/rta/command/appDescriptor/AddLibrary.js +1 -3
- 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 +4 -3
- package/src/sap/ui/rta/command/compVariant/CompVariantUpdate.js +1 -1
- package/src/sap/ui/rta/enablement/TestDelegate.js +7 -8
- package/src/sap/ui/rta/enablement/elementActionTest.js +25 -29
- package/src/sap/ui/rta/library.js +2 -3
- package/src/sap/ui/rta/messagebundle.properties +13 -7
- package/src/sap/ui/rta/messagebundle_ar.properties +8 -8
- package/src/sap/ui/rta/messagebundle_bg.properties +20 -20
- package/src/sap/ui/rta/messagebundle_ca.properties +7 -7
- package/src/sap/ui/rta/messagebundle_cs.properties +10 -10
- package/src/sap/ui/rta/messagebundle_cy.properties +8 -8
- package/src/sap/ui/rta/messagebundle_da.properties +7 -7
- package/src/sap/ui/rta/messagebundle_de.properties +9 -9
- package/src/sap/ui/rta/messagebundle_el.properties +7 -7
- package/src/sap/ui/rta/messagebundle_en.properties +11 -8
- package/src/sap/ui/rta/messagebundle_en_GB.properties +8 -8
- package/src/sap/ui/rta/messagebundle_en_US_sappsd.properties +8 -8
- package/src/sap/ui/rta/messagebundle_en_US_saprigi.properties +7 -7
- package/src/sap/ui/rta/messagebundle_en_US_saptrc.properties +8 -8
- package/src/sap/ui/rta/messagebundle_es.properties +8 -8
- package/src/sap/ui/rta/messagebundle_es_MX.properties +13 -13
- package/src/sap/ui/rta/messagebundle_et.properties +6 -6
- package/src/sap/ui/rta/messagebundle_fi.properties +9 -9
- package/src/sap/ui/rta/messagebundle_fr.properties +9 -9
- package/src/sap/ui/rta/messagebundle_fr_CA.properties +9 -9
- package/src/sap/ui/rta/messagebundle_hi.properties +12 -12
- package/src/sap/ui/rta/messagebundle_hr.properties +9 -9
- package/src/sap/ui/rta/messagebundle_hu.properties +10 -10
- package/src/sap/ui/rta/messagebundle_id.properties +10 -10
- package/src/sap/ui/rta/messagebundle_it.properties +9 -9
- package/src/sap/ui/rta/messagebundle_iw.properties +8 -8
- package/src/sap/ui/rta/messagebundle_ja.properties +21 -21
- package/src/sap/ui/rta/messagebundle_kk.properties +9 -9
- package/src/sap/ui/rta/messagebundle_ko.properties +7 -7
- package/src/sap/ui/rta/messagebundle_lt.properties +8 -8
- package/src/sap/ui/rta/messagebundle_lv.properties +8 -8
- package/src/sap/ui/rta/messagebundle_ms.properties +11 -11
- package/src/sap/ui/rta/messagebundle_nl.properties +8 -8
- package/src/sap/ui/rta/messagebundle_no.properties +9 -9
- package/src/sap/ui/rta/messagebundle_pl.properties +9 -9
- package/src/sap/ui/rta/messagebundle_pt.properties +9 -9
- package/src/sap/ui/rta/messagebundle_pt_PT.properties +8 -8
- package/src/sap/ui/rta/messagebundle_ro.properties +9 -9
- package/src/sap/ui/rta/messagebundle_ru.properties +8 -8
- package/src/sap/ui/rta/messagebundle_sh.properties +8 -8
- package/src/sap/ui/rta/messagebundle_sk.properties +9 -9
- package/src/sap/ui/rta/messagebundle_sl.properties +9 -9
- package/src/sap/ui/rta/messagebundle_sv.properties +8 -8
- package/src/sap/ui/rta/messagebundle_th.properties +14 -14
- package/src/sap/ui/rta/messagebundle_tr.properties +8 -8
- package/src/sap/ui/rta/messagebundle_uk.properties +10 -10
- package/src/sap/ui/rta/messagebundle_vi.properties +8 -8
- package/src/sap/ui/rta/messagebundle_zh_CN.properties +9 -9
- package/src/sap/ui/rta/messagebundle_zh_TW.properties +8 -8
- package/src/sap/ui/rta/plugin/AddXMLAtExtensionPoint.js +1 -2
- package/src/sap/ui/rta/plugin/BaseCreate.js +2 -3
- package/src/sap/ui/rta/plugin/Combine.js +1 -2
- package/src/sap/ui/rta/plugin/ControlVariant.js +12 -8
- package/src/sap/ui/rta/plugin/CreateContainer.js +1 -2
- package/src/sap/ui/rta/plugin/CutPaste.js +13 -13
- package/src/sap/ui/rta/plugin/DragDrop.js +17 -16
- package/src/sap/ui/rta/plugin/EasyAdd.js +12 -10
- package/src/sap/ui/rta/plugin/EasyRemove.js +11 -9
- package/src/sap/ui/rta/plugin/LocalReset.js +4 -2
- package/src/sap/ui/rta/plugin/Plugin.js +6 -10
- package/src/sap/ui/rta/plugin/RTAElementMover.js +3 -6
- package/src/sap/ui/rta/plugin/Remove.js +8 -9
- package/src/sap/ui/rta/plugin/Rename.js +9 -9
- package/src/sap/ui/rta/plugin/RenameHandler.js +21 -22
- package/src/sap/ui/rta/plugin/Resize.js +11 -10
- package/src/sap/ui/rta/plugin/Selection.js +33 -14
- package/src/sap/ui/rta/plugin/Settings.js +11 -11
- package/src/sap/ui/rta/plugin/Split.js +1 -2
- package/src/sap/ui/rta/plugin/Stretch.js +18 -20
- package/src/sap/ui/rta/plugin/additionalElements/ActionExtractor.js +4 -9
- package/src/sap/ui/rta/plugin/additionalElements/AddElementsDialog.js +5 -9
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsAnalyzer.js +4 -4
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsPlugin.js +41 -43
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsUtils.js +2 -3
- package/src/sap/ui/rta/plugin/additionalElements/CommandBuilder.js +5 -6
- package/src/sap/ui/rta/plugin/iframe/AddIFrame.js +9 -7
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.fragment.xml +45 -3
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.js +22 -23
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialogController.js +58 -30
- package/src/sap/ui/rta/service/Action.js +5 -6
- package/src/sap/ui/rta/service/ControllerExtension.js +8 -9
- package/src/sap/ui/rta/service/Outline.js +13 -11
- package/src/sap/ui/rta/service/Property.js +3 -4
- package/src/sap/ui/rta/service/Receiver.js +2 -2
- package/src/sap/ui/rta/service/Selection.js +2 -3
- package/src/sap/ui/rta/service/SupportTools.js +2 -3
- package/src/sap/ui/rta/themes/base/AddIFrame.less +6 -1
- package/src/sap/ui/rta/themes/base/Toolbar.base.less +4 -0
- package/src/sap/ui/rta/toolbar/Adaptation.js +26 -19
- package/src/sap/ui/rta/toolbar/Base.js +25 -11
- package/src/sap/ui/rta/toolbar/BaseRenderer.js +2 -2
- package/src/sap/ui/rta/toolbar/FeedbackDialog.fragment.xml +4 -4
- package/src/sap/ui/rta/toolbar/Fiori.js +20 -20
- package/src/sap/ui/rta/toolbar/FioriLike.js +1 -2
- package/src/sap/ui/rta/toolbar/OverflowToolbarButton.js +5 -6
- package/src/sap/ui/rta/toolbar/Personalization.js +4 -4
- package/src/sap/ui/rta/toolbar/Standalone.js +1 -2
- package/src/sap/ui/rta/toolbar/contextBased/ManageAdaptations.js +43 -20
- package/src/sap/ui/rta/toolbar/contextBased/SaveAsAdaptation.js +16 -7
- package/src/sap/ui/rta/toolbar/translation/Translation.js +13 -14
- package/src/sap/ui/rta/toolbar/versioning/Versioning.js +31 -28
- package/src/sap/ui/rta/util/Animation.js +1 -3
- package/src/sap/ui/rta/util/PluginManager.js +1 -3
- package/src/sap/ui/rta/util/PopupManager.js +23 -19
- package/src/sap/ui/rta/util/ReloadManager.js +4 -4
- package/src/sap/ui/rta/util/ServiceEventBus.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicator.js +18 -16
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorRegistry.js +6 -9
- package/src/sap/ui/rta/util/changeVisualization/ChangeVisualization.js +9 -10
- 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 +2 -2
- package/src/sap/ui/rta/util/changeVisualization/commands/MoveVisualization.js +4 -4
- package/src/sap/ui/rta/util/changeVisualization/commands/SplitVisualization.js +2 -2
- package/src/sap/ui/rta/util/hasStableId.js +1 -1
- package/src/sap/ui/rta/util/showMessageBox.js +2 -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/StylesLoader.js +0 -31
- package/src/sap/ui/rta/util/UrlParser.js +0 -51
|
@@ -82,7 +82,7 @@ sap.ui.define([
|
|
|
82
82
|
var oError = DtUtil.propagateError(
|
|
83
83
|
vError,
|
|
84
84
|
"service.Receiver",
|
|
85
|
-
|
|
85
|
+
`Unexpected error: Can't execute method ${mRequestBody.method} of service ${mRequestBody.service}`,
|
|
86
86
|
"sap.ui.rta"
|
|
87
87
|
);
|
|
88
88
|
|
|
@@ -172,7 +172,7 @@ sap.ui.define([
|
|
|
172
172
|
oPostMessageBus.subscribe(CHANNEL_ID, "unsubscribe", fnReceiver);
|
|
173
173
|
|
|
174
174
|
return {
|
|
175
|
-
destroy
|
|
175
|
+
destroy() {
|
|
176
176
|
if (oPostMessageBus) {
|
|
177
177
|
oPostMessageBus.unsubscribe(CHANNEL_ID, "getService", fnReceiver);
|
|
178
178
|
oPostMessageBus.unsubscribe(CHANNEL_ID, "callMethod", fnReceiver);
|
|
@@ -13,9 +13,8 @@ sap.ui.define(function() {
|
|
|
13
13
|
* @namespace
|
|
14
14
|
* @name sap.ui.rta.service.Selection
|
|
15
15
|
* @author SAP SE
|
|
16
|
-
* @experimental Since 1.58
|
|
17
16
|
* @since 1.58
|
|
18
|
-
* @version 1.
|
|
17
|
+
* @version 1.119.0
|
|
19
18
|
* @private
|
|
20
19
|
* @ui5-restricted
|
|
21
20
|
*/
|
|
@@ -48,7 +47,7 @@ sap.ui.define(function() {
|
|
|
48
47
|
* @return {string[]} Selected control IDs
|
|
49
48
|
* @public
|
|
50
49
|
*/
|
|
51
|
-
get
|
|
50
|
+
get() {
|
|
52
51
|
return getControlIds(oSelectionManager.get());
|
|
53
52
|
},
|
|
54
53
|
|
|
@@ -27,9 +27,8 @@ sap.ui.define([
|
|
|
27
27
|
* @namespace
|
|
28
28
|
* @name sap.ui.rta.service.SupportTools
|
|
29
29
|
* @author SAP SE
|
|
30
|
-
* @experimental Since 1.106
|
|
31
30
|
* @since 1.106
|
|
32
|
-
* @version 1.
|
|
31
|
+
* @version 1.119.0
|
|
33
32
|
* @private
|
|
34
33
|
* @ui5-restricted
|
|
35
34
|
*/
|
|
@@ -342,7 +341,7 @@ sap.ui.define([
|
|
|
342
341
|
onRtaStart();
|
|
343
342
|
|
|
344
343
|
return {
|
|
345
|
-
destroy
|
|
344
|
+
destroy() {
|
|
346
345
|
window.removeEventListener("message", fnOnMessageReceivedBound);
|
|
347
346
|
}
|
|
348
347
|
};
|
|
@@ -116,9 +116,14 @@
|
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
+
.sapUiRtaAddIFrameDialogLegacyNavigationContainer > div {
|
|
120
|
+
display: flex;
|
|
121
|
+
align-items: center;
|
|
122
|
+
}
|
|
123
|
+
|
|
119
124
|
.sapUiRtaAddIFrameDialogPreviewGrid {
|
|
120
125
|
padding: 0;
|
|
121
|
-
margin: 0 1rem;
|
|
126
|
+
margin: 0 1rem 1rem;
|
|
122
127
|
background: @_sap_ui_rta_AddIFrame_PreviewBG;
|
|
123
128
|
border: 0.0625rem solid @_sap_ui_rta_AddIFrame_BorderColor; //1px
|
|
124
129
|
|
|
@@ -21,7 +21,8 @@ sap.ui.define([
|
|
|
21
21
|
"sap/ui/rta/toolbar/translation/Translation",
|
|
22
22
|
"sap/ui/rta/toolbar/versioning/Versioning",
|
|
23
23
|
"sap/ui/rta/Utils",
|
|
24
|
-
"sap/m/MessageBox"
|
|
24
|
+
"sap/m/MessageBox",
|
|
25
|
+
"sap/ui/performance/Measurement"
|
|
25
26
|
], function(
|
|
26
27
|
AdaptationRenderer,
|
|
27
28
|
Log,
|
|
@@ -39,7 +40,8 @@ sap.ui.define([
|
|
|
39
40
|
Translation,
|
|
40
41
|
Versioning,
|
|
41
42
|
Utils,
|
|
42
|
-
MessageBox
|
|
43
|
+
MessageBox,
|
|
44
|
+
Measurement
|
|
43
45
|
) {
|
|
44
46
|
"use strict";
|
|
45
47
|
|
|
@@ -51,13 +53,12 @@ sap.ui.define([
|
|
|
51
53
|
* @extends sap.ui.rta.toolbar.Base
|
|
52
54
|
*
|
|
53
55
|
* @author SAP SE
|
|
54
|
-
* @version 1.
|
|
56
|
+
* @version 1.119.0
|
|
55
57
|
*
|
|
56
58
|
* @constructor
|
|
57
59
|
* @private
|
|
58
60
|
* @since 1.48
|
|
59
61
|
* @alias sap.ui.rta.toolbar.Adaptation
|
|
60
|
-
* @experimental Since 1.48. This class is experimental. API might be changed in future.
|
|
61
62
|
*/
|
|
62
63
|
var Adaptation = Base.extend("sap.ui.rta.toolbar.Adaptation", {
|
|
63
64
|
renderer: AdaptationRenderer,
|
|
@@ -92,11 +93,11 @@ sap.ui.define([
|
|
|
92
93
|
// Size of three icons + spacing in pixels
|
|
93
94
|
var SWITCHER_ICON_WIDTH = 124;
|
|
94
95
|
|
|
95
|
-
Adaptation.prototype.init = function() {
|
|
96
|
+
Adaptation.prototype.init = function(...aArgs) {
|
|
96
97
|
this._mSizeLimits = {
|
|
97
98
|
switchToIcons: undefined
|
|
98
99
|
};
|
|
99
|
-
this._pFragmentLoaded = Base.prototype.init.apply(this,
|
|
100
|
+
this._pFragmentLoaded = Base.prototype.init.apply(this, aArgs)
|
|
100
101
|
.then(function() {
|
|
101
102
|
this._onResize = this._onResize.bind(this);
|
|
102
103
|
window.addEventListener("resize", this._onResize);
|
|
@@ -113,12 +114,12 @@ sap.ui.define([
|
|
|
113
114
|
return this._pFragmentLoaded;
|
|
114
115
|
};
|
|
115
116
|
|
|
116
|
-
Adaptation.prototype.exit = function() {
|
|
117
|
+
Adaptation.prototype.exit = function(...aArgs) {
|
|
117
118
|
window.removeEventListener("resize", this._onResize);
|
|
118
119
|
this._aIntersectionObservers.forEach(function(oInstersectionObserver) {
|
|
119
120
|
oInstersectionObserver.disconnect();
|
|
120
121
|
});
|
|
121
|
-
Base.prototype.exit.apply(this,
|
|
122
|
+
Base.prototype.exit.apply(this, aArgs);
|
|
122
123
|
};
|
|
123
124
|
|
|
124
125
|
Adaptation.prototype._restoreHiddenElements = function() {
|
|
@@ -147,11 +148,11 @@ sap.ui.define([
|
|
|
147
148
|
|
|
148
149
|
Adaptation.prototype.adjustToolbarSectionWidths = function() {
|
|
149
150
|
// The middle section (switcher) is used as base for the other calculations
|
|
150
|
-
this.getControl(Adaptation.MIDDLE_SECTION).setWidth(
|
|
151
|
+
this.getControl(Adaptation.MIDDLE_SECTION).setWidth(`${this._iSwitcherToolbarWidth}px`);
|
|
151
152
|
[Adaptation.LEFT_SECTION, Adaptation.RIGHT_SECTION].forEach(function(sSectionName) {
|
|
152
153
|
this.getControl(sSectionName).getDomRef().style.setProperty(
|
|
153
154
|
"width",
|
|
154
|
-
|
|
155
|
+
`calc(50% - ${Math.ceil(this._iSwitcherToolbarWidth / 2)}px)`,
|
|
155
156
|
"important"
|
|
156
157
|
);
|
|
157
158
|
}.bind(this));
|
|
@@ -245,7 +246,7 @@ sap.ui.define([
|
|
|
245
246
|
var oButton = oEvent.getSource();
|
|
246
247
|
if (!this._oActionsMenuFragment) {
|
|
247
248
|
return Fragment.load({
|
|
248
|
-
id: this.getId()
|
|
249
|
+
id: `${this.getId()}_actionsMenu_fragment`,
|
|
249
250
|
name: "sap.ui.rta.toolbar.ActionsMenu",
|
|
250
251
|
controller: {
|
|
251
252
|
openDownloadTranslationDialog: onOpenDownloadTranslationDialog.bind(this),
|
|
@@ -254,7 +255,7 @@ sap.ui.define([
|
|
|
254
255
|
overviewForKeyUser: onOverviewForKeyUserPressed.bind(this),
|
|
255
256
|
overviewForDeveloper: onOverviewForDeveloperPressed.bind(this),
|
|
256
257
|
restore: this.eventHandler.bind(this, "Restore"),
|
|
257
|
-
formatSaveAsEnabled
|
|
258
|
+
formatSaveAsEnabled,
|
|
258
259
|
saveAs: onSaveAsPressed.bind(this)
|
|
259
260
|
}
|
|
260
261
|
}).then(function(oMenu) {
|
|
@@ -302,7 +303,7 @@ sap.ui.define([
|
|
|
302
303
|
Adaptation.prototype.buildControls = function() {
|
|
303
304
|
return Fragment.load({
|
|
304
305
|
name: "sap.ui.rta.toolbar.Adaptation",
|
|
305
|
-
id: this.getId()
|
|
306
|
+
id: `${this.getId()}_fragment`,
|
|
306
307
|
controller: {
|
|
307
308
|
activate: this._openVersionTitleDialog.bind(this),
|
|
308
309
|
discardDraft: this.eventHandler.bind(this, "DiscardDraft"),
|
|
@@ -374,11 +375,14 @@ sap.ui.define([
|
|
|
374
375
|
|
|
375
376
|
function performMigration(oRtaInformation) {
|
|
376
377
|
BusyIndicator.show();
|
|
378
|
+
Measurement.start("onCBAMigration", "Measurement of migration to context-based adaptation");
|
|
377
379
|
return ContextBasedAdaptationsAPI.migrate({
|
|
378
380
|
control: oRtaInformation.rootControl,
|
|
379
381
|
layer: oRtaInformation.flexSettings.layer
|
|
380
382
|
})
|
|
381
383
|
.finally(function() {
|
|
384
|
+
Measurement.end("onCBAMigration");
|
|
385
|
+
Measurement.getActive() && Log.info(`onCBAMigration: ${Measurement.getMeasurement("onCBAMigration").time} ms`);
|
|
382
386
|
BusyIndicator.hide();
|
|
383
387
|
})
|
|
384
388
|
.then(Utils.showMessageBox.bind(undefined, "information", "DAC_DIALOG_MIGRATION_SUCCESSFULL_DESCRIPTION", {
|
|
@@ -403,8 +407,11 @@ sap.ui.define([
|
|
|
403
407
|
function onSaveAsAdaptation() {
|
|
404
408
|
var oRtaInformation = this.getRtaInformation();
|
|
405
409
|
Utils.checkDraftOverwrite(this.getModel("versions")).then(function() {
|
|
410
|
+
Measurement.start("onCBACanMigrate", "Measurement if its possible to migrate to context-based adaptation");
|
|
406
411
|
return ContextBasedAdaptationsAPI.canMigrate({ control: oRtaInformation.rootControl, layer: oRtaInformation.flexSettings.layer });
|
|
407
412
|
}).then(function(bCanMigrate) {
|
|
413
|
+
Measurement.end("onCBACanMigrate");
|
|
414
|
+
Measurement.getActive() && Log.info(`onCBACanMigrate: ${Measurement.getMeasurement("onCBACanMigrate").time} ms`);
|
|
408
415
|
if (bCanMigrate) {
|
|
409
416
|
confirmMigration.call(this, oRtaInformation);
|
|
410
417
|
} else {
|
|
@@ -425,7 +432,7 @@ sap.ui.define([
|
|
|
425
432
|
function handleError(oError) {
|
|
426
433
|
if (oError !== "cancel") {
|
|
427
434
|
Utils.showMessageBox("error", "MSG_LREP_TRANSFER_ERROR", {error: oError});
|
|
428
|
-
Log.error(
|
|
435
|
+
Log.error(`sap.ui.rta: ${oError.stack || oError.message || oError}`);
|
|
429
436
|
}
|
|
430
437
|
}
|
|
431
438
|
|
|
@@ -450,7 +457,7 @@ sap.ui.define([
|
|
|
450
457
|
if (sTitle === "") {
|
|
451
458
|
return this.getTextResources().getText("TXT_DEFAULT_APP");
|
|
452
459
|
}
|
|
453
|
-
return this.getTextResources().getText("BTN_ADAPTING_FOR", sTitle);
|
|
460
|
+
return this.getTextResources().getText("BTN_ADAPTING_FOR", [sTitle]);
|
|
454
461
|
}
|
|
455
462
|
return this.getTextResources().getText("BTN_ADAPTING_FOR_ALL_USERS");
|
|
456
463
|
}
|
|
@@ -468,7 +475,7 @@ sap.ui.define([
|
|
|
468
475
|
}
|
|
469
476
|
|
|
470
477
|
Adaptation.prototype.getControl = function(sName) {
|
|
471
|
-
var oControl = sap.ui.getCore().byId(this.getId()
|
|
478
|
+
var oControl = sap.ui.getCore().byId(`${this.getId()}_fragment--sapUiRta_${sName}`);
|
|
472
479
|
// Control is inside the ActionsMenu
|
|
473
480
|
if (!oControl && this._oActionsMenuFragment) {
|
|
474
481
|
oControl = sap.ui.getCore().byId(this._oActionsMenuFragment.getId().replace("sapUiRta_actions", "sapUiRta_") + sName);
|
|
@@ -479,11 +486,11 @@ sap.ui.define([
|
|
|
479
486
|
/**
|
|
480
487
|
* @inheritDoc
|
|
481
488
|
*/
|
|
482
|
-
Adaptation.prototype.hide = function() {
|
|
489
|
+
Adaptation.prototype.hide = function(...aArgs) {
|
|
483
490
|
this._aIntersectionObservers.forEach(function(oInstersectionObserver) {
|
|
484
491
|
oInstersectionObserver.disconnect();
|
|
485
492
|
});
|
|
486
|
-
return Base.prototype.hide.apply(this,
|
|
493
|
+
return Base.prototype.hide.apply(this, aArgs);
|
|
487
494
|
};
|
|
488
495
|
|
|
489
496
|
Adaptation.prototype.showFeedbackForm = function() {
|
|
@@ -499,7 +506,7 @@ sap.ui.define([
|
|
|
499
506
|
oUrlParams.set("feature", (sConnector === "KeyUserConnector" ? "BTP" : "ABAP"));
|
|
500
507
|
|
|
501
508
|
var oFeedbackDialogModel = new JSONModel({
|
|
502
|
-
url: sURL
|
|
509
|
+
url: `${sURL}?${oUrlParams.toString()}`
|
|
503
510
|
});
|
|
504
511
|
|
|
505
512
|
return Fragment.load({
|
|
@@ -29,13 +29,12 @@ sap.ui.define([
|
|
|
29
29
|
* @extends sap.m.HBox
|
|
30
30
|
*
|
|
31
31
|
* @author SAP SE
|
|
32
|
-
* @version 1.
|
|
32
|
+
* @version 1.119.0
|
|
33
33
|
*
|
|
34
34
|
* @constructor
|
|
35
35
|
* @private
|
|
36
36
|
* @since 1.48
|
|
37
37
|
* @alias sap.ui.rta.toolbar.Base
|
|
38
|
-
* @experimental Since 1.48. This class is experimental. The API might be changed in future.
|
|
39
38
|
*/
|
|
40
39
|
|
|
41
40
|
var Base = HBox.extend("sap.ui.rta.toolbar.Base", {
|
|
@@ -68,9 +67,10 @@ sap.ui.define([
|
|
|
68
67
|
textResources: "object"
|
|
69
68
|
}
|
|
70
69
|
},
|
|
71
|
-
|
|
70
|
+
// eslint-disable-next-line object-shorthand
|
|
71
|
+
constructor: function(...aArgs) {
|
|
72
72
|
// call parent constructor
|
|
73
|
-
HBox.apply(this,
|
|
73
|
+
HBox.apply(this, aArgs);
|
|
74
74
|
|
|
75
75
|
this._oExtensions = {};
|
|
76
76
|
this.setAlignItems("Center");
|
|
@@ -97,23 +97,26 @@ sap.ui.define([
|
|
|
97
97
|
/**
|
|
98
98
|
* @override
|
|
99
99
|
*/
|
|
100
|
-
Base.prototype.init = function() {
|
|
100
|
+
Base.prototype.init = function(...aArgs) {
|
|
101
101
|
this._oResourceModel = new ResourceModel({
|
|
102
102
|
bundle: sap.ui.getCore().getLibraryResourceBundle("sap.ui.rta")
|
|
103
103
|
});
|
|
104
|
-
HBox.prototype.init.apply(this,
|
|
104
|
+
HBox.prototype.init.apply(this, aArgs);
|
|
105
105
|
// Assign the model object to the SAPUI5 core using the name "i18n"
|
|
106
106
|
this.setModel(this._oResourceModel, "i18n");
|
|
107
|
+
this._fnOnScrollBound = this._onScroll.bind(this);
|
|
108
|
+
window.addEventListener("scroll", this._fnOnScrollBound, true);
|
|
107
109
|
return this.buildContent();
|
|
108
110
|
};
|
|
109
111
|
|
|
110
|
-
Base.prototype.exit = function() {
|
|
112
|
+
Base.prototype.exit = function(...aArgs) {
|
|
111
113
|
Object.values(this._oExtensions).forEach(function(oExtension) {
|
|
112
114
|
oExtension.destroy();
|
|
113
115
|
});
|
|
114
116
|
this._oExtensions = {};
|
|
117
|
+
window.removeEventListener("scroll", this._fnOnScrollBound, true);
|
|
115
118
|
|
|
116
|
-
HBox.prototype.exit.apply(this,
|
|
119
|
+
HBox.prototype.exit.apply(this, aArgs);
|
|
117
120
|
};
|
|
118
121
|
|
|
119
122
|
/**
|
|
@@ -151,7 +154,7 @@ sap.ui.define([
|
|
|
151
154
|
* @param {sap.ui.base.Event} oEvent - Event object
|
|
152
155
|
*/
|
|
153
156
|
Base.prototype.eventHandler = function(sEventName, oEvent) {
|
|
154
|
-
this[
|
|
157
|
+
this[`fire${sEventName}`](oEvent.getParameters());
|
|
155
158
|
};
|
|
156
159
|
|
|
157
160
|
/**
|
|
@@ -194,7 +197,7 @@ sap.ui.define([
|
|
|
194
197
|
// 1) create Promise and wait until DomRef is available
|
|
195
198
|
return new Promise(function(fnResolve) {
|
|
196
199
|
var oDelegate = {
|
|
197
|
-
onAfterRendering
|
|
200
|
+
onAfterRendering() {
|
|
198
201
|
this.removeEventDelegate(oDelegate);
|
|
199
202
|
fnResolve();
|
|
200
203
|
}
|
|
@@ -249,7 +252,7 @@ sap.ui.define([
|
|
|
249
252
|
* @public
|
|
250
253
|
*/
|
|
251
254
|
Base.prototype.getControl = function(sName) {
|
|
252
|
-
return sap.ui.getCore().byId(
|
|
255
|
+
return sap.ui.getCore().byId(`sapUiRta_${sName}`);
|
|
253
256
|
};
|
|
254
257
|
|
|
255
258
|
/**
|
|
@@ -260,5 +263,16 @@ sap.ui.define([
|
|
|
260
263
|
this.setZIndex(ZIndexManager.getNextZIndex());
|
|
261
264
|
};
|
|
262
265
|
|
|
266
|
+
Base.prototype._onScroll = function() {
|
|
267
|
+
var oDomElement = this.getDomRef();
|
|
268
|
+
// In some cases, there is a scroll event before
|
|
269
|
+
// the DOM Element is created
|
|
270
|
+
if (!oDomElement) {
|
|
271
|
+
return;
|
|
272
|
+
}
|
|
273
|
+
var sScrollClass = "sapUiRtaToolbar_scrolling";
|
|
274
|
+
oDomElement.classList.toggle(sScrollClass, window.scrollY > 0);
|
|
275
|
+
};
|
|
276
|
+
|
|
263
277
|
return Base;
|
|
264
278
|
});
|
|
@@ -20,10 +20,10 @@ function(
|
|
|
20
20
|
|
|
21
21
|
BaseRenderer.render = function(oRM, oControl) {
|
|
22
22
|
oRM.class("sapUiRtaToolbar");
|
|
23
|
-
oRM.class(
|
|
23
|
+
oRM.class(`color_${oControl.getColor()}`);
|
|
24
24
|
|
|
25
25
|
// setting type if exists
|
|
26
|
-
oControl.type && oRM.class(
|
|
26
|
+
oControl.type && oRM.class(`type_${oControl.type}`);
|
|
27
27
|
|
|
28
28
|
// setting z-index if exists
|
|
29
29
|
var iZIndex = oControl.getZIndex();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<core:FragmentDefinition
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
xmlns:core="sap.ui.core"
|
|
3
|
+
xmlns="sap.m"
|
|
4
|
+
xmlns:util="sap.ui.fl.util">
|
|
5
5
|
<Dialog
|
|
6
6
|
id="sapUiRtaFeedbackIFrameDialog"
|
|
7
7
|
title="{i18n>TIT_FEEDBACK}"
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
<content>
|
|
12
12
|
<util:IFrame
|
|
13
13
|
id="sapUiRtaFeedbackIFrameDialog_iFrame"
|
|
14
|
-
url="{
|
|
14
|
+
url="{feedbackModel>/url}"
|
|
15
15
|
height="46rem"/>
|
|
16
16
|
</content>
|
|
17
17
|
<buttons>
|
|
@@ -32,13 +32,12 @@ function(
|
|
|
32
32
|
* @extends sap.ui.rta.toolbar.Adaptation
|
|
33
33
|
*
|
|
34
34
|
* @author SAP SE
|
|
35
|
-
* @version 1.
|
|
35
|
+
* @version 1.119.0
|
|
36
36
|
*
|
|
37
37
|
* @constructor
|
|
38
38
|
* @private
|
|
39
39
|
* @since 1.48
|
|
40
40
|
* @alias sap.ui.rta.toolbar.Fiori
|
|
41
|
-
* @experimental Since 1.48. This class is experimental. API might be changed in future.
|
|
42
41
|
*/
|
|
43
42
|
var Fiori = Adaptation.extend("sap.ui.rta.toolbar.Fiori", {
|
|
44
43
|
metadata: {
|
|
@@ -48,19 +47,19 @@ function(
|
|
|
48
47
|
type: "fiori"
|
|
49
48
|
});
|
|
50
49
|
|
|
51
|
-
Fiori.prototype.init = function() {
|
|
50
|
+
Fiori.prototype.init = function(...aArgs) {
|
|
52
51
|
this._oRenderer = Utils.getFiori2Renderer();
|
|
53
52
|
this._oFioriHeader = this._oRenderer.getRootControl().getShellHeader();
|
|
54
|
-
Adaptation.prototype.init.apply(this,
|
|
53
|
+
Adaptation.prototype.init.apply(this, aArgs);
|
|
55
54
|
};
|
|
56
55
|
|
|
57
|
-
Fiori.prototype.show = function() {
|
|
56
|
+
Fiori.prototype.show = function(...aArgs) {
|
|
58
57
|
this._oFioriHeader.addStyleClass(FIORI_HIDDEN_CLASS);
|
|
59
|
-
return Adaptation.prototype.show.apply(this,
|
|
58
|
+
return Adaptation.prototype.show.apply(this, aArgs);
|
|
60
59
|
};
|
|
61
60
|
|
|
62
|
-
Fiori.prototype.buildControls = function() {
|
|
63
|
-
return Adaptation.prototype.buildControls.apply(this,
|
|
61
|
+
Fiori.prototype.buildControls = function(...aArgs) {
|
|
62
|
+
return Adaptation.prototype.buildControls.apply(this, aArgs).then(function(aControls) {
|
|
64
63
|
var sLogoPath = this._oFioriHeader.getLogo();
|
|
65
64
|
|
|
66
65
|
if (this._oFioriHeader.getShowLogo() && sLogoPath) {
|
|
@@ -81,10 +80,10 @@ function(
|
|
|
81
80
|
|
|
82
81
|
// first control is the left HBox
|
|
83
82
|
this.getControl("iconBox").addItem(
|
|
84
|
-
new Image(this.getId()
|
|
83
|
+
new Image(`${this.getId()}_fragment--sapUiRta_icon`, {
|
|
85
84
|
src: sLogoPath,
|
|
86
|
-
width: iWidth ? iWidth
|
|
87
|
-
height: iHeight ? iHeight
|
|
85
|
+
width: iWidth ? `${iWidth}px` : iWidth,
|
|
86
|
+
height: iHeight ? `${iHeight}px` : iHeight
|
|
88
87
|
})
|
|
89
88
|
);
|
|
90
89
|
}
|
|
@@ -95,8 +94,8 @@ function(
|
|
|
95
94
|
/**
|
|
96
95
|
* @inheritDoc
|
|
97
96
|
*/
|
|
98
|
-
Fiori.prototype.hide = function() {
|
|
99
|
-
return Adaptation.prototype.hide.apply(this,
|
|
97
|
+
Fiori.prototype.hide = function(...aArgs) {
|
|
98
|
+
return Adaptation.prototype.hide.apply(this, aArgs)
|
|
100
99
|
.then(function() {
|
|
101
100
|
this._oFioriHeader.removeStyleClass(FIORI_HIDDEN_CLASS);
|
|
102
101
|
}.bind(this));
|
|
@@ -109,8 +108,8 @@ function(
|
|
|
109
108
|
if (iWidth !== iNaturalWidth || iHeight !== iNaturalHeight) {
|
|
110
109
|
Log.error([
|
|
111
110
|
"sap.ui.rta: please check Fiori Launchpad logo, expected size is",
|
|
112
|
-
iWidth
|
|
113
|
-
|
|
111
|
+
`${iWidth}x${iHeight},`,
|
|
112
|
+
`but actual is ${iNaturalWidth}x${iNaturalHeight}`
|
|
114
113
|
].join(" "));
|
|
115
114
|
}
|
|
116
115
|
};
|
|
@@ -123,7 +122,8 @@ function(
|
|
|
123
122
|
Adaptation.prototype._restoreHiddenElements.apply(this);
|
|
124
123
|
};
|
|
125
124
|
|
|
126
|
-
Fiori.prototype._hideElementsOnIntersection = function(
|
|
125
|
+
Fiori.prototype._hideElementsOnIntersection = function(...aArgs) {
|
|
126
|
+
const [sSectionName, aEntries] = aArgs;
|
|
127
127
|
var bWiderThanLogo;
|
|
128
128
|
|
|
129
129
|
if (aEntries[0].intersectionRatio === 0) {
|
|
@@ -141,12 +141,12 @@ function(
|
|
|
141
141
|
this._iLogoVisibilityLimit = this._calculateWindowWidth(aEntries);
|
|
142
142
|
this._setLogoVisibility(false);
|
|
143
143
|
if (bWiderThanLogo) {
|
|
144
|
-
Adaptation.prototype._hideElementsOnIntersection.apply(this,
|
|
144
|
+
Adaptation.prototype._hideElementsOnIntersection.apply(this, aArgs);
|
|
145
145
|
}
|
|
146
146
|
return;
|
|
147
147
|
}
|
|
148
148
|
}
|
|
149
|
-
Adaptation.prototype._hideElementsOnIntersection.apply(this,
|
|
149
|
+
Adaptation.prototype._hideElementsOnIntersection.apply(this, aArgs);
|
|
150
150
|
};
|
|
151
151
|
|
|
152
152
|
Fiori.prototype._setLogoVisibility = function(bVisible) {
|
|
@@ -156,11 +156,11 @@ function(
|
|
|
156
156
|
oIconSpacer.setVisible(bVisible);
|
|
157
157
|
};
|
|
158
158
|
|
|
159
|
-
Fiori.prototype.destroy = function() {
|
|
159
|
+
Fiori.prototype.destroy = function(...aArgs) {
|
|
160
160
|
// In case of destroy() without normal hide() call
|
|
161
161
|
this._oFioriHeader.removeStyleClass(FIORI_HIDDEN_CLASS);
|
|
162
162
|
|
|
163
|
-
Adaptation.prototype.destroy.apply(this,
|
|
163
|
+
Adaptation.prototype.destroy.apply(this, aArgs);
|
|
164
164
|
};
|
|
165
165
|
|
|
166
166
|
return Fiori;
|
|
@@ -20,13 +20,12 @@ function(
|
|
|
20
20
|
* @extends sap.ui.rta.toolbar.Adaptation
|
|
21
21
|
*
|
|
22
22
|
* @author SAP SE
|
|
23
|
-
* @version 1.
|
|
23
|
+
* @version 1.119.0
|
|
24
24
|
*
|
|
25
25
|
* @constructor
|
|
26
26
|
* @private
|
|
27
27
|
* @since 1.84
|
|
28
28
|
* @alias sap.ui.rta.toolbar.FioriLike
|
|
29
|
-
* @experimental Since 1.84. This class is experimental. API might be changed in future.
|
|
30
29
|
*/
|
|
31
30
|
var FioriLike = Adaptation.extend("sap.ui.rta.toolbar.FioriLike", {
|
|
32
31
|
metadata: {
|
|
@@ -23,13 +23,12 @@ sap.ui.define([
|
|
|
23
23
|
* @extends sap.m.OverflowToolbarButton
|
|
24
24
|
*
|
|
25
25
|
* @author SAP SE
|
|
26
|
-
* @version 1.
|
|
26
|
+
* @version 1.119.0
|
|
27
27
|
*
|
|
28
28
|
* @constructor
|
|
29
29
|
* @private
|
|
30
30
|
* @since 1.94
|
|
31
31
|
* @alias sap.ui.rta.toolbar.OverflowToolbarButton
|
|
32
|
-
* @experimental Since 1.94. This class is experimental. The API might be changed in the future.
|
|
33
32
|
*/
|
|
34
33
|
|
|
35
34
|
var OverflowToolbarButton = SapMOverflowToolbarButton.extend("sap.ui.rta.toolbar.OverflowToolbarButton", {
|
|
@@ -50,8 +49,8 @@ sap.ui.define([
|
|
|
50
49
|
*
|
|
51
50
|
* @private
|
|
52
51
|
*/
|
|
53
|
-
OverflowToolbarButton.prototype._onBeforeEnterOverflow = function() {
|
|
54
|
-
SapMOverflowToolbarButton.prototype._onBeforeEnterOverflow.apply(this,
|
|
52
|
+
OverflowToolbarButton.prototype._onBeforeEnterOverflow = function(...aArgs) {
|
|
53
|
+
SapMOverflowToolbarButton.prototype._onBeforeEnterOverflow.apply(this, aArgs);
|
|
55
54
|
this.setVisibleIcon(this.getIcon());
|
|
56
55
|
this.setIcon("");
|
|
57
56
|
};
|
|
@@ -61,8 +60,8 @@ sap.ui.define([
|
|
|
61
60
|
*
|
|
62
61
|
* @private
|
|
63
62
|
*/
|
|
64
|
-
OverflowToolbarButton.prototype._onAfterExitOverflow = function() {
|
|
65
|
-
SapMOverflowToolbarButton.prototype._onAfterExitOverflow.apply(this,
|
|
63
|
+
OverflowToolbarButton.prototype._onAfterExitOverflow = function(...aArgs) {
|
|
64
|
+
SapMOverflowToolbarButton.prototype._onAfterExitOverflow.apply(this, aArgs);
|
|
66
65
|
this.setIcon(this.getVisibleIcon());
|
|
67
66
|
};
|
|
68
67
|
|
|
@@ -22,13 +22,12 @@ function(
|
|
|
22
22
|
* @extends sap.ui.rta.toolbar.Base
|
|
23
23
|
*
|
|
24
24
|
* @author SAP SE
|
|
25
|
-
* @version 1.
|
|
25
|
+
* @version 1.119.0
|
|
26
26
|
*
|
|
27
27
|
* @constructor
|
|
28
28
|
* @private
|
|
29
29
|
* @since 1.48
|
|
30
30
|
* @alias sap.ui.rta.toolbar.Personalization
|
|
31
|
-
* @experimental Since 1.48. This class is experimental. API might be changed in future.
|
|
32
31
|
*/
|
|
33
32
|
var Personalization = Base.extend("sap.ui.rta.toolbar.Personalization", {
|
|
34
33
|
renderer: "sap.ui.rta.toolbar.BaseRenderer",
|
|
@@ -43,8 +42,9 @@ function(
|
|
|
43
42
|
restore: {}
|
|
44
43
|
}
|
|
45
44
|
},
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
// eslint-disable-next-line object-shorthand
|
|
46
|
+
constructor: function(...aArgs) {
|
|
47
|
+
Base.apply(this, aArgs);
|
|
48
48
|
this.setJustifyContent("End");
|
|
49
49
|
}
|
|
50
50
|
});
|
|
@@ -20,13 +20,12 @@ function(
|
|
|
20
20
|
* @extends sap.ui.rta.toolbar.Adaptation
|
|
21
21
|
*
|
|
22
22
|
* @author SAP SE
|
|
23
|
-
* @version 1.
|
|
23
|
+
* @version 1.119.0
|
|
24
24
|
*
|
|
25
25
|
* @constructor
|
|
26
26
|
* @private
|
|
27
27
|
* @since 1.48
|
|
28
28
|
* @alias sap.ui.rta.toolbar.Standalone
|
|
29
|
-
* @experimental Since 1.48. This class is experimental. API might be changed in future.
|
|
30
29
|
*/
|
|
31
30
|
var Standalone = Adaptation.extend("sap.ui.rta.toolbar.Standalone", {
|
|
32
31
|
metadata: {
|