@openui5/sap.ui.rta 1.121.0 → 1.122.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/THIRDPARTY.txt +1 -1
- 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 +40 -47
- package/src/sap/ui/rta/Utils.js +1 -1
- package/src/sap/ui/rta/appVariant/AppVariantManager.js +1 -1
- package/src/sap/ui/rta/command/AddIFrame.js +1 -1
- package/src/sap/ui/rta/command/AddProperty.js +1 -1
- package/src/sap/ui/rta/command/AddXML.js +1 -1
- package/src/sap/ui/rta/command/AddXMLAtExtensionPoint.js +1 -1
- package/src/sap/ui/rta/command/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 +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/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/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 +1 -1
- package/src/sap/ui/rta/command/appDescriptor/AddLibrary.js +1 -1
- 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/enablement/elementActionTest.js +1 -1
- package/src/sap/ui/rta/library.js +2 -2
- package/src/sap/ui/rta/messagebundle.properties +1 -5
- package/src/sap/ui/rta/messagebundle_ar.properties +2 -4
- package/src/sap/ui/rta/messagebundle_bg.properties +2 -4
- package/src/sap/ui/rta/messagebundle_ca.properties +1 -3
- package/src/sap/ui/rta/messagebundle_cnr.properties +1 -3
- package/src/sap/ui/rta/messagebundle_cs.properties +2 -4
- package/src/sap/ui/rta/messagebundle_cy.properties +2 -4
- package/src/sap/ui/rta/messagebundle_da.properties +2 -4
- package/src/sap/ui/rta/messagebundle_de.properties +2 -4
- package/src/sap/ui/rta/messagebundle_el.properties +2 -4
- package/src/sap/ui/rta/messagebundle_en.properties +2 -4
- package/src/sap/ui/rta/messagebundle_en_GB.properties +2 -4
- package/src/sap/ui/rta/messagebundle_es.properties +1 -3
- package/src/sap/ui/rta/messagebundle_es_MX.properties +1 -3
- package/src/sap/ui/rta/messagebundle_et.properties +1 -3
- package/src/sap/ui/rta/messagebundle_fi.properties +1 -3
- package/src/sap/ui/rta/messagebundle_fr.properties +1 -3
- package/src/sap/ui/rta/messagebundle_fr_CA.properties +2 -4
- package/src/sap/ui/rta/messagebundle_hi.properties +1 -3
- package/src/sap/ui/rta/messagebundle_hr.properties +2 -4
- package/src/sap/ui/rta/messagebundle_hu.properties +1 -3
- package/src/sap/ui/rta/messagebundle_id.properties +2 -4
- package/src/sap/ui/rta/messagebundle_it.properties +1 -3
- package/src/sap/ui/rta/messagebundle_iw.properties +1 -3
- package/src/sap/ui/rta/messagebundle_ja.properties +2 -4
- package/src/sap/ui/rta/messagebundle_kk.properties +2 -4
- package/src/sap/ui/rta/messagebundle_ko.properties +1 -3
- package/src/sap/ui/rta/messagebundle_lt.properties +1 -3
- package/src/sap/ui/rta/messagebundle_lv.properties +2 -4
- package/src/sap/ui/rta/messagebundle_mk.properties +13 -15
- package/src/sap/ui/rta/messagebundle_ms.properties +2 -4
- package/src/sap/ui/rta/messagebundle_nl.properties +2 -4
- package/src/sap/ui/rta/messagebundle_no.properties +1 -3
- package/src/sap/ui/rta/messagebundle_pl.properties +2 -4
- package/src/sap/ui/rta/messagebundle_pt.properties +2 -4
- package/src/sap/ui/rta/messagebundle_pt_PT.properties +1 -3
- package/src/sap/ui/rta/messagebundle_ro.properties +2 -4
- package/src/sap/ui/rta/messagebundle_ru.properties +1 -3
- package/src/sap/ui/rta/messagebundle_sh.properties +1 -3
- package/src/sap/ui/rta/messagebundle_sk.properties +1 -3
- package/src/sap/ui/rta/messagebundle_sl.properties +2 -4
- package/src/sap/ui/rta/messagebundle_sr.properties +1 -3
- package/src/sap/ui/rta/messagebundle_sv.properties +1 -3
- package/src/sap/ui/rta/messagebundle_th.properties +1 -3
- package/src/sap/ui/rta/messagebundle_tr.properties +1 -3
- package/src/sap/ui/rta/messagebundle_uk.properties +2 -4
- package/src/sap/ui/rta/messagebundle_vi.properties +2 -4
- package/src/sap/ui/rta/messagebundle_zh_CN.properties +1 -3
- package/src/sap/ui/rta/messagebundle_zh_TW.properties +2 -4
- 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/ControlVariant.js +1 -1
- package/src/sap/ui/rta/plugin/CreateContainer.js +1 -1
- package/src/sap/ui/rta/plugin/CutPaste.js +1 -1
- package/src/sap/ui/rta/plugin/DragDrop.js +1 -1
- package/src/sap/ui/rta/plugin/LocalReset.js +1 -1
- package/src/sap/ui/rta/plugin/Plugin.js +7 -8
- 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/Rename.js +1 -1
- package/src/sap/ui/rta/plugin/RenameHandler.js +20 -5
- package/src/sap/ui/rta/plugin/Resize.js +1 -1
- package/src/sap/ui/rta/plugin/Selection.js +1 -1
- package/src/sap/ui/rta/plugin/Settings.js +7 -2
- 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 +1 -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/iframe/AddIFrame.js +1 -1
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.js +1 -1
- package/src/sap/ui/rta/service/Action.js +1 -1
- package/src/sap/ui/rta/service/ControllerExtension.js +1 -1
- package/src/sap/ui/rta/service/Outline.js +7 -7
- 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/Overlay.less +4 -0
- package/src/sap/ui/rta/themes/base/library.source.less +0 -1
- package/src/sap/ui/rta/themes/sap_hcb/library.source.less +0 -1
- package/src/sap/ui/rta/toolbar/Adaptation.js +4 -8
- package/src/sap/ui/rta/toolbar/Base.js +7 -3
- package/src/sap/ui/rta/toolbar/Fiori.js +1 -1
- package/src/sap/ui/rta/toolbar/FioriLike.js +1 -1
- package/src/sap/ui/rta/toolbar/OverflowToolbarButton.js +1 -1
- package/src/sap/ui/rta/toolbar/Standalone.js +1 -1
- package/src/sap/ui/rta/toolbar/contextBased/SaveAsAdaptation.js +1 -1
- package/src/sap/ui/rta/toolbar/translation/Translation.js +1 -1
- package/src/sap/ui/rta/toolbar/versioning/Versioning.js +1 -1
- package/src/sap/ui/rta/util/PluginManager.js +2 -10
- package/src/sap/ui/rta/util/PopupManager.js +1 -1
- package/src/sap/ui/rta/util/ReloadManager.js +2 -3
- package/src/sap/ui/rta/util/ServiceEventBus.js +1 -1
- package/src/sap/ui/rta/util/ServiceManager.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicator.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorRegistry.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/ChangeVisualization.js +1 -3
- package/src/sap/ui/rta/plugin/EasyAdd.js +0 -217
- package/src/sap/ui/rta/plugin/EasyRemove.js +0 -141
- package/src/sap/ui/rta/themes/base/Toolbar.personalization.less +0 -29
- package/src/sap/ui/rta/themes/sap_hcb/Toolbar.personalization.less +0 -10
- package/src/sap/ui/rta/toolbar/Personalization.js +0 -73
|
@@ -30,7 +30,7 @@ sap.ui.define([
|
|
|
30
30
|
* @namespace sap.ui.rta.util.ReloadManager
|
|
31
31
|
* @alias sap.ui.rta.util.ReloadManager
|
|
32
32
|
* @since 1.104
|
|
33
|
-
* @version 1.
|
|
33
|
+
* @version 1.122.0
|
|
34
34
|
* @private
|
|
35
35
|
* @ui5-restricted
|
|
36
36
|
*/
|
|
@@ -288,11 +288,10 @@ sap.ui.define([
|
|
|
288
288
|
* Reloads the app inside FLP or standalone by removing max layer / draft parameter;
|
|
289
289
|
*
|
|
290
290
|
* @param {object} oReloadInfo - Information needed for the reload
|
|
291
|
-
* @param {sap.ui.fl.Layer} oReloadInfo.layer - Current layer
|
|
292
291
|
* @param {boolean} oReloadInfo.hasHigherLayerChanges - Indicates if higher layer changes exist
|
|
293
292
|
*/
|
|
294
293
|
ReloadManager.handleReloadOnExit = function(oReloadInfo) {
|
|
295
|
-
if (oReloadInfo.
|
|
294
|
+
if (oReloadInfo.reloadMethod !== mReloadMethods.NOT_NEEDED) {
|
|
296
295
|
oReloadInfo.removeVersionParameter = true;
|
|
297
296
|
ReloadManager.triggerReload(oReloadInfo);
|
|
298
297
|
}
|
|
@@ -46,7 +46,7 @@ sap.ui.define([
|
|
|
46
46
|
* @alias sap.ui.rta.util.changeVisualization.ChangeIndicator
|
|
47
47
|
* @author SAP SE
|
|
48
48
|
* @since 1.84.0
|
|
49
|
-
* @version 1.
|
|
49
|
+
* @version 1.122.0
|
|
50
50
|
* @private
|
|
51
51
|
*/
|
|
52
52
|
const ChangeIndicator = Control.extend("sap.ui.rta.util.changeVisualization.ChangeIndicator", {
|
|
@@ -37,7 +37,7 @@ sap.ui.define([
|
|
|
37
37
|
* @alias sap.ui.rta.util.changeVisualization.ChangeIndicatorRegistry
|
|
38
38
|
* @author SAP SE
|
|
39
39
|
* @since 1.86.0
|
|
40
|
-
* @version 1.
|
|
40
|
+
* @version 1.122.0
|
|
41
41
|
* @private
|
|
42
42
|
*/
|
|
43
43
|
const ChangeIndicatorRegistry = ManagedObject.extend("sap.ui.rta.util.changeVisualization.ChangeIndicatorRegistry", {
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
sap.ui.define([
|
|
8
|
-
"sap/ui/core/Core",
|
|
9
8
|
"sap/ui/core/Element",
|
|
10
9
|
"sap/ui/core/Fragment",
|
|
11
10
|
"sap/ui/core/Lib",
|
|
@@ -26,7 +25,6 @@ sap.ui.define([
|
|
|
26
25
|
"sap/ui/rta/util/changeVisualization/ChangeCategories",
|
|
27
26
|
"sap/ui/rta/util/changeVisualization/ChangeStates"
|
|
28
27
|
], function(
|
|
29
|
-
Core,
|
|
30
28
|
Element,
|
|
31
29
|
Fragment,
|
|
32
30
|
Lib,
|
|
@@ -86,7 +84,7 @@ sap.ui.define([
|
|
|
86
84
|
* @alias sap.ui.rta.util.changeVisualization.ChangeVisualization
|
|
87
85
|
* @author SAP SE
|
|
88
86
|
* @since 1.84.0
|
|
89
|
-
* @version 1.
|
|
87
|
+
* @version 1.122.0
|
|
90
88
|
* @private
|
|
91
89
|
*/
|
|
92
90
|
const ChangeVisualization = Control.extend("sap.ui.rta.util.changeVisualization.ChangeVisualization", {
|
|
@@ -1,217 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-2024 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/ui/core/Lib",
|
|
9
|
-
"sap/ui/rta/plugin/additionalElements/AdditionalElementsPlugin",
|
|
10
|
-
"sap/ui/dt/OverlayRegistry",
|
|
11
|
-
"sap/m/Button"
|
|
12
|
-
], function(
|
|
13
|
-
Lib,
|
|
14
|
-
AdditionalElementsPlugin,
|
|
15
|
-
OverlayRegistry,
|
|
16
|
-
Button
|
|
17
|
-
) {
|
|
18
|
-
"use strict";
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* Constructor for a new EasyAdd Plugin.
|
|
22
|
-
*
|
|
23
|
-
* @param {string} [sId] id for the new object, generated automatically if no id is given
|
|
24
|
-
* @param {object} [mSettings] initial settings for the new object
|
|
25
|
-
* @class The EasyAdd Plugin adds an Icon to an Overlay, which allows to trigger add operations directly
|
|
26
|
-
* @extends sap.ui.rta.plugin.additionalElements.AdditionalElementsPlugin
|
|
27
|
-
* @author SAP SE
|
|
28
|
-
* @version 1.121.0
|
|
29
|
-
* @constructor
|
|
30
|
-
* @private
|
|
31
|
-
* @since 1.48
|
|
32
|
-
* @alias sap.ui.rta.plugin.EasyAdd
|
|
33
|
-
*/
|
|
34
|
-
var EasyAdd = AdditionalElementsPlugin.extend("sap.ui.rta.plugin.EasyAdd", /** @lends sap.ui.rta.plugin.EasyAdd.prototype */ {
|
|
35
|
-
metadata: {
|
|
36
|
-
library: "sap.ui.rta",
|
|
37
|
-
properties: {},
|
|
38
|
-
associations: {},
|
|
39
|
-
events: {}
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* Register browser event for an overlay
|
|
45
|
-
*
|
|
46
|
-
* @param {sap.ui.dt.ElementOverlay} oOverlay overlay object
|
|
47
|
-
* @override
|
|
48
|
-
*/
|
|
49
|
-
EasyAdd.prototype.registerElementOverlay = function(...aArgs) {
|
|
50
|
-
const [oOverlay] = aArgs;
|
|
51
|
-
var oControl = oOverlay.getElement();
|
|
52
|
-
if (oControl.getMetadata().getName() === "sap.uxap.ObjectPageSection" && this.hasStableId(oOverlay)) {
|
|
53
|
-
oOverlay.addStyleClass("sapUiRtaPersAdd");
|
|
54
|
-
oControl.addStyleClass("sapUiRtaMarginBottom");
|
|
55
|
-
} else if (oControl.getMetadata().getName() === "sap.uxap.ObjectPageLayout" && this.hasStableId(oOverlay)) {
|
|
56
|
-
oOverlay.addStyleClass("sapUiRtaPersAddTop");
|
|
57
|
-
oControl.getDomRef().querySelectorAll("[id*='sectionsContainer']").forEach(function(oNode) {
|
|
58
|
-
oNode.classList.add("sapUiRtaPaddingTop");
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
var onAddPressed = function(bOverlayIsSibling, oOverlay, iIndex) {
|
|
63
|
-
var sControlName;
|
|
64
|
-
var sAggregationName = "sections";
|
|
65
|
-
if (bOverlayIsSibling) {
|
|
66
|
-
sControlName = oOverlay.getDesignTimeMetadata().getName().plural;
|
|
67
|
-
} else {
|
|
68
|
-
sControlName = oOverlay.getDesignTimeMetadata().getAggregation(sAggregationName).childNames.plural();
|
|
69
|
-
}
|
|
70
|
-
// This is needed to trigger the selection of available elements in the showAvailableElements method
|
|
71
|
-
// Normally, getAllElements is called before showAvailableElements, here this is not the case
|
|
72
|
-
this.clearCachedElements();
|
|
73
|
-
this.showAvailableElements(bOverlayIsSibling, sAggregationName, [oOverlay], iIndex, sControlName);
|
|
74
|
-
}.bind(this);
|
|
75
|
-
|
|
76
|
-
var fnAddButton = function(oOverlay, oOverlayDom, bSibling, vControlName, iIndex) {
|
|
77
|
-
var fnCallback = function(oEvent) {
|
|
78
|
-
var oOverlay = OverlayRegistry.getOverlay(oEvent.currentTarget.id.replace("-AddButton", ""));
|
|
79
|
-
onAddPressed(bSibling, oOverlay, iIndex);
|
|
80
|
-
oEvent.stopPropagation();
|
|
81
|
-
};
|
|
82
|
-
var sControlName = typeof vControlName === "function" ? vControlName() : vControlName;
|
|
83
|
-
this._addButton(oOverlay, fnCallback, oOverlayDom, sControlName, bSibling);
|
|
84
|
-
}.bind(this);
|
|
85
|
-
|
|
86
|
-
if (oOverlay.hasStyleClass("sapUiRtaPersAdd")) {
|
|
87
|
-
var aChildren = Array.from(oOverlay.getDomRef().querySelectorAll(":scope > .sapUiRtaPersAddIconOuter"));
|
|
88
|
-
var bAddButton = oOverlay.hasStyleClass("sapUiRtaPersAdd") && aChildren.length === 0;
|
|
89
|
-
if (bAddButton) {
|
|
90
|
-
fnAddButton(oOverlay, oOverlay.getDomRef(), true, oOverlay.getDesignTimeMetadata().getName().singular);
|
|
91
|
-
}
|
|
92
|
-
} else if (oOverlay.hasStyleClass("sapUiRtaPersAddTop")) {
|
|
93
|
-
var aChildren = Array.from(oOverlay.getAggregationOverlay("sections").getDomRef().querySelectorAll(":scope > .sapUiRtaPersAddIconOuter"));
|
|
94
|
-
if (aChildren.length === 0) {
|
|
95
|
-
var oSectionsOverlayDOM = oOverlay.getAggregationOverlay("sections").getDomRef();
|
|
96
|
-
fnAddButton(oOverlay, oSectionsOverlayDOM, false, oOverlay.getDesignTimeMetadata().getAggregation("sections").childNames.singular, 0);
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
AdditionalElementsPlugin.prototype.registerElementOverlay.apply(this, aArgs);
|
|
101
|
-
};
|
|
102
|
-
|
|
103
|
-
/**
|
|
104
|
-
* Deregister browser event for an overlay
|
|
105
|
-
*
|
|
106
|
-
* @param {sap.ui.dt.ElementOverlay} oOverlay overlay object
|
|
107
|
-
* @override
|
|
108
|
-
*/
|
|
109
|
-
EasyAdd.prototype.deregisterElementOverlay = function(...aArgs) {
|
|
110
|
-
const [oOverlay] = aArgs;
|
|
111
|
-
var oControl = oOverlay.getElement();
|
|
112
|
-
if (oOverlay._oAddButton) {
|
|
113
|
-
oOverlay._oAddButton.destroy();
|
|
114
|
-
}
|
|
115
|
-
if (oControl.getMetadata().getName() === "sap.uxap.ObjectPageSection") {
|
|
116
|
-
oOverlay.removeStyleClass("sapUiRtaPersAdd");
|
|
117
|
-
oControl.removeStyleClass("sapUiRtaMarginBottom");
|
|
118
|
-
} else if (oControl.getMetadata().getName() === "sap.uxap.ObjectPageLayout") {
|
|
119
|
-
oOverlay.removeStyleClass("sapUiRtaPersAddTop");
|
|
120
|
-
oControl.getDomRef().querySelectorAll("[id*='sectionsContainer']").forEach(function(oNode) {
|
|
121
|
-
oNode.classList.remove("sapUiRtaPaddingTop");
|
|
122
|
-
});
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
AdditionalElementsPlugin.prototype.deregisterElementOverlay.apply(this, aArgs);
|
|
126
|
-
};
|
|
127
|
-
|
|
128
|
-
/**
|
|
129
|
-
* On Editable Change the enablement of the Button has to be adapted
|
|
130
|
-
*
|
|
131
|
-
* @param {sap.ui.dt.Overlay} oOverlay overlay object
|
|
132
|
-
* @override
|
|
133
|
-
*/
|
|
134
|
-
EasyAdd.prototype._isEditable = function(...aArgs) {
|
|
135
|
-
const [oOverlay] = aArgs;
|
|
136
|
-
return AdditionalElementsPlugin.prototype._isEditable.apply(this, aArgs).then(function(bIsEditable) {
|
|
137
|
-
if (oOverlay._oAddButton) {
|
|
138
|
-
var bIsLayout = oOverlay.hasStyleClass("sapUiRtaPersAddTop");
|
|
139
|
-
var sOverlayIsSibling = bIsLayout ? "asChild" : "asSibling";
|
|
140
|
-
oOverlay._oAddButton.setEnabled(bIsEditable[sOverlayIsSibling]);
|
|
141
|
-
if (bIsLayout) {
|
|
142
|
-
var oLayout = oOverlay.getElement();
|
|
143
|
-
oLayout.attachEventOnce("onAfterRenderingDOMReady", function() {
|
|
144
|
-
oLayout.getDomRef().querySelectorAll("[id*='sectionsContainer']").forEach(function(oNode) {
|
|
145
|
-
oNode.classList.add("sapUiRtaPaddingTop");
|
|
146
|
-
});
|
|
147
|
-
});
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
return bIsEditable;
|
|
151
|
-
});
|
|
152
|
-
};
|
|
153
|
-
|
|
154
|
-
/**
|
|
155
|
-
* @param {sap.ui.dt.ElementOverlay} oOverlay - overlay object
|
|
156
|
-
* @param {function} fnCallback - callback function will be passed to the new button as on press event function
|
|
157
|
-
* @param {object} oOverlayDom - dom object of the overlay
|
|
158
|
-
* @param {string} sControlName - name of the control. This name will be displayed on the Add-Button
|
|
159
|
-
* @param {boolean} bOverlayIsSibling - defines if the button is added on a sibling or not
|
|
160
|
-
* @private
|
|
161
|
-
*/
|
|
162
|
-
EasyAdd.prototype._addButton = function(oOverlay, fnCallback, oOverlayDom, sControlName, bOverlayIsSibling) {
|
|
163
|
-
var bIsEditable = !!oOverlay.getEditableByPlugins()[this._retrievePluginName(bOverlayIsSibling)];
|
|
164
|
-
var oTextResources = Lib.getResourceBundleFor("sap.ui.rta");
|
|
165
|
-
|
|
166
|
-
var sId = `${oOverlay.getId()}-AddButton`;
|
|
167
|
-
var oHtmlButtonOuter = document.createElement("div");
|
|
168
|
-
oHtmlButtonOuter.classList.add("sapUiRtaPersAddIconOuter");
|
|
169
|
-
oHtmlButtonOuter.setAttribute("draggable", "true");
|
|
170
|
-
oHtmlButtonOuter.setAttribute("tabindex", -1);
|
|
171
|
-
oOverlay._oAddButton = new Button(sId, {
|
|
172
|
-
text: oTextResources.getText("CTX_ADD_ELEMENTS", [sControlName]),
|
|
173
|
-
icon: "sap-icon://add",
|
|
174
|
-
enabled: bIsEditable
|
|
175
|
-
})
|
|
176
|
-
.placeAt(oHtmlButtonOuter)
|
|
177
|
-
.attachBrowserEvent("click", fnCallback)
|
|
178
|
-
.attachBrowserEvent("tap", fnCallback);
|
|
179
|
-
oOverlayDom.append(oHtmlButtonOuter);
|
|
180
|
-
|
|
181
|
-
oHtmlButtonOuter.addEventListener("mouseover", function(oEvent) {
|
|
182
|
-
oEvent.stopPropagation();
|
|
183
|
-
var oOverlay = oEvent.fromElement ? OverlayRegistry.getOverlay(oEvent.fromElement.id) : null;
|
|
184
|
-
if (oOverlay && oOverlay.getMetadata().getName() === "sap.ui.dt.ElementOverlay") {
|
|
185
|
-
var oParentContainer = oOverlay.getParentElementOverlay();
|
|
186
|
-
oParentContainer.removeStyleClass("sapUiRtaOverlayHover");
|
|
187
|
-
}
|
|
188
|
-
});
|
|
189
|
-
|
|
190
|
-
oHtmlButtonOuter.addEventListener("mouseleave", function(oEvent) {
|
|
191
|
-
oEvent.stopPropagation();
|
|
192
|
-
var oOverlay = oEvent.toElement ? OverlayRegistry.getOverlay(oEvent.toElement.id) : null;
|
|
193
|
-
if (oOverlay && oOverlay.getMetadata().getName() === "sap.ui.dt.ElementOverlay") {
|
|
194
|
-
var oParentContainer = oOverlay.getParentElementOverlay();
|
|
195
|
-
if (oParentContainer.getMovable()) {
|
|
196
|
-
oParentContainer.addStyleClass("sapUiRtaOverlayHover");
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
});
|
|
200
|
-
|
|
201
|
-
oHtmlButtonOuter.addEventListener("click", function(oEvent) {
|
|
202
|
-
oEvent.stopPropagation();
|
|
203
|
-
});
|
|
204
|
-
|
|
205
|
-
oHtmlButtonOuter.addEventListener("contextmenu", function(oEvent) {
|
|
206
|
-
oEvent.stopPropagation();
|
|
207
|
-
oEvent.preventDefault();
|
|
208
|
-
});
|
|
209
|
-
|
|
210
|
-
oHtmlButtonOuter.addEventListener("dragstart", function(oEvent) {
|
|
211
|
-
oEvent.stopPropagation();
|
|
212
|
-
oEvent.preventDefault();
|
|
213
|
-
});
|
|
214
|
-
};
|
|
215
|
-
|
|
216
|
-
return EasyAdd;
|
|
217
|
-
});
|
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-2024 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/ui/core/Element",
|
|
9
|
-
"sap/ui/core/Lib",
|
|
10
|
-
"sap/ui/rta/plugin/Remove",
|
|
11
|
-
"sap/m/Button"
|
|
12
|
-
], function(
|
|
13
|
-
Element,
|
|
14
|
-
Lib,
|
|
15
|
-
Remove,
|
|
16
|
-
Button
|
|
17
|
-
) {
|
|
18
|
-
"use strict";
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* Constructor for a new EasyRemove Plugin.
|
|
22
|
-
*
|
|
23
|
-
* @param {string} [sId] id for the new object, generated automatically if no id is given
|
|
24
|
-
* @param {object} [mSettings] initial settings for the new object
|
|
25
|
-
* @class The EasyRemove Plugin adds an Icon to an Overlay, which allows to trigger remove operations directly
|
|
26
|
-
* @extends sap.ui.rta.plugin.Remove
|
|
27
|
-
* @author SAP SE
|
|
28
|
-
* @version 1.121.0
|
|
29
|
-
* @constructor
|
|
30
|
-
* @private
|
|
31
|
-
* @since 1.48
|
|
32
|
-
* @alias sap.ui.rta.plugin.EasyRemove
|
|
33
|
-
*/
|
|
34
|
-
var EasyRemove = Remove.extend("sap.ui.rta.plugin.EasyRemove", /** @lends sap.ui.rta.plugin.EasyRemove.prototype */ {
|
|
35
|
-
metadata: {
|
|
36
|
-
library: "sap.ui.rta",
|
|
37
|
-
properties: {},
|
|
38
|
-
associations: {},
|
|
39
|
-
events: {}
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* Register browser event for an overlay
|
|
45
|
-
*
|
|
46
|
-
* @param {sap.ui.dt.Overlay} oOverlay overlay object
|
|
47
|
-
* @override
|
|
48
|
-
*/
|
|
49
|
-
EasyRemove.prototype.registerElementOverlay = function(...aArgs) {
|
|
50
|
-
const [oOverlay] = aArgs;
|
|
51
|
-
var oControl = oOverlay.getElement();
|
|
52
|
-
if (oControl.getMetadata().getName() === "sap.uxap.ObjectPageSection" && this.hasStableId(oOverlay)) {
|
|
53
|
-
oOverlay.addStyleClass("sapUiRtaPersDelete");
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
var aChildren = Array.from(oOverlay.getDomRef().querySelectorAll(":scope > .sapUiRtaPersDeleteClick"));
|
|
57
|
-
if (oOverlay.hasStyleClass("sapUiRtaPersDelete") && aChildren.length === 0) {
|
|
58
|
-
var onDeletePressed = function(oOverlay) {
|
|
59
|
-
this.handler([oOverlay]);
|
|
60
|
-
}.bind(this);
|
|
61
|
-
|
|
62
|
-
var oDeleteButton = this._addButton(oOverlay);
|
|
63
|
-
oDeleteButton.attachBrowserEvent("contextmenu", function(oEvent) {
|
|
64
|
-
oEvent.stopPropagation();
|
|
65
|
-
oEvent.preventDefault();
|
|
66
|
-
});
|
|
67
|
-
|
|
68
|
-
var fnOnClick = function(oEvent) {
|
|
69
|
-
var oOverlay = Element.getElementById(oEvent.currentTarget.id.replace("-DeleteIcon", ""));
|
|
70
|
-
onDeletePressed(oOverlay);
|
|
71
|
-
oEvent.stopPropagation();
|
|
72
|
-
oEvent.preventDefault();
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
oDeleteButton
|
|
76
|
-
.attachBrowserEvent("click", fnOnClick)
|
|
77
|
-
.attachBrowserEvent("tap", fnOnClick);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
Remove.prototype.registerElementOverlay.apply(this, aArgs);
|
|
81
|
-
};
|
|
82
|
-
|
|
83
|
-
/**
|
|
84
|
-
* On Editable Change the enablement of the Button has to be adapted
|
|
85
|
-
*
|
|
86
|
-
* @param {sap.ui.dt.Overlay} oOverlay overlay object
|
|
87
|
-
* @override
|
|
88
|
-
*/
|
|
89
|
-
EasyRemove.prototype._isEditable = function(...aArgs) {
|
|
90
|
-
const [oOverlay] = aArgs;
|
|
91
|
-
if (oOverlay._oDeleteButton) {
|
|
92
|
-
oOverlay._oDeleteButton.setEnabled(this.isEnabled([oOverlay]));
|
|
93
|
-
}
|
|
94
|
-
return Remove.prototype._isEditable.apply(this, aArgs);
|
|
95
|
-
};
|
|
96
|
-
|
|
97
|
-
EasyRemove.prototype._addButton = function(oOverlay) {
|
|
98
|
-
var bEnabled = this.isEnabled([oOverlay]);
|
|
99
|
-
var sId = `${oOverlay.getId()}-DeleteIcon`;
|
|
100
|
-
var oHtmlIconWrapper = document.createElement("div");
|
|
101
|
-
oHtmlIconWrapper.classList.add("sapUiRtaPersDeleteClick");
|
|
102
|
-
oHtmlIconWrapper.setAttribute("draggable", "true");
|
|
103
|
-
var oHtmlIconOuter = document.createElement("div");
|
|
104
|
-
oHtmlIconOuter.classList.add("sapUiRtaPersDeleteIconOuter");
|
|
105
|
-
|
|
106
|
-
oOverlay._oDeleteButton = new Button(sId, {
|
|
107
|
-
icon: "sap-icon://less",
|
|
108
|
-
tooltip: Lib.getResourceBundleFor("sap.ui.rta").getText("CTX_REMOVE"),
|
|
109
|
-
enabled: bEnabled
|
|
110
|
-
}).placeAt(oHtmlIconOuter);
|
|
111
|
-
oHtmlIconWrapper.append(oHtmlIconOuter);
|
|
112
|
-
oOverlay.getDomRef().append(oHtmlIconWrapper);
|
|
113
|
-
|
|
114
|
-
oHtmlIconWrapper.addEventListener("dragstart", function(oEvent) {
|
|
115
|
-
oEvent.stopPropagation();
|
|
116
|
-
oEvent.preventDefault();
|
|
117
|
-
});
|
|
118
|
-
return oOverlay._oDeleteButton;
|
|
119
|
-
};
|
|
120
|
-
|
|
121
|
-
/**
|
|
122
|
-
* Deregister browser event for an overlay
|
|
123
|
-
*
|
|
124
|
-
* @param {sap.ui.dt.Overlay} oOverlay overlay object
|
|
125
|
-
* @override
|
|
126
|
-
*/
|
|
127
|
-
EasyRemove.prototype.deregisterElementOverlay = function(...aArgs) {
|
|
128
|
-
const [oOverlay] = aArgs;
|
|
129
|
-
var oControl = oOverlay.getElement();
|
|
130
|
-
if (oControl.getMetadata().getName() === "sap.uxap.ObjectPageSection") {
|
|
131
|
-
oOverlay.removeStyleClass("sapUiRtaPersDelete");
|
|
132
|
-
if (oOverlay._oDeleteButton) {
|
|
133
|
-
oOverlay._oDeleteButton.destroy();
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
Remove.prototype.deregisterElementOverlay.apply(this, aArgs);
|
|
138
|
-
};
|
|
139
|
-
|
|
140
|
-
return EasyRemove;
|
|
141
|
-
});
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/******************************************************************
|
|
2
|
-
Style of the Personalization Toolbar - base Theme
|
|
3
|
-
*******************************************************************/
|
|
4
|
-
@_sap_ui_rta_Toolbar_Personalization_TextColor: @sapUiTextInverted; // #fff
|
|
5
|
-
@_sap_ui_rta_Toolbar_Personalization_BaseColor: darken(desaturate(@sapUiChart1, 48%), 14%); //#435060
|
|
6
|
-
|
|
7
|
-
.sapUiRtaToolbar.type_personalization {
|
|
8
|
-
position: absolute;
|
|
9
|
-
left: 0;
|
|
10
|
-
right: 0;
|
|
11
|
-
bottom: 0;
|
|
12
|
-
background-color: @_sap_ui_rta_Toolbar_Personalization_BaseColor;
|
|
13
|
-
padding: 0 1rem; //16px
|
|
14
|
-
opacity: 0.9;
|
|
15
|
-
height: 3rem; //48p
|
|
16
|
-
|
|
17
|
-
.sapMBtn {
|
|
18
|
-
padding: 0;
|
|
19
|
-
margin: 0 0.25rem; //4px
|
|
20
|
-
|
|
21
|
-
.sapMBtnTransparent.sapMBtnInner {
|
|
22
|
-
border: none;
|
|
23
|
-
|
|
24
|
-
.sapMBtnContent {
|
|
25
|
-
color: @_sap_ui_rta_Toolbar_Personalization_TextColor;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/******************************************************************
|
|
2
|
-
Style of the Personalization Toolbar - sap_hcb Theme
|
|
3
|
-
*******************************************************************/
|
|
4
|
-
@_sap_ui_rta_Toolbar_Personalization_BaseColor: @sapUiNeutralBG; //#000000
|
|
5
|
-
@_sap_ui_rta_Toolbar_Personalization_BorderColor: @sapUiShellBorderColor; // #fff
|
|
6
|
-
@_sap_ui_rta_Toolbar_Personalization_TextColor: @sapUiBaseText; // #fff
|
|
7
|
-
|
|
8
|
-
.sapUiRtaToolbar.type_personalization {
|
|
9
|
-
border-top: @_sap_ui_rta_Toolbar_Personalization_BorderColor 0.125rem solid;
|
|
10
|
-
}
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-2024 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
|
-
"./Base",
|
|
9
|
-
"sap/m/Button"
|
|
10
|
-
],
|
|
11
|
-
function(
|
|
12
|
-
Base,
|
|
13
|
-
Button
|
|
14
|
-
) {
|
|
15
|
-
"use strict";
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Constructor for a new sap.ui.rta.toolbar.Personalization control
|
|
19
|
-
*
|
|
20
|
-
* @class
|
|
21
|
-
* Contains implementation of personalization specific toolbar
|
|
22
|
-
* @extends sap.ui.rta.toolbar.Base
|
|
23
|
-
*
|
|
24
|
-
* @author SAP SE
|
|
25
|
-
* @version 1.121.0
|
|
26
|
-
*
|
|
27
|
-
* @constructor
|
|
28
|
-
* @private
|
|
29
|
-
* @since 1.48
|
|
30
|
-
* @alias sap.ui.rta.toolbar.Personalization
|
|
31
|
-
*/
|
|
32
|
-
var Personalization = Base.extend("sap.ui.rta.toolbar.Personalization", {
|
|
33
|
-
renderer: "sap.ui.rta.toolbar.BaseRenderer",
|
|
34
|
-
type: "personalization",
|
|
35
|
-
metadata: {
|
|
36
|
-
library: "sap.ui.rta",
|
|
37
|
-
events: {
|
|
38
|
-
/**
|
|
39
|
-
* Events are fired when the Toolbar - Buttons are pressed
|
|
40
|
-
*/
|
|
41
|
-
exit: {},
|
|
42
|
-
restore: {}
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
// eslint-disable-next-line object-shorthand
|
|
46
|
-
constructor: function(...aArgs) {
|
|
47
|
-
Base.apply(this, aArgs);
|
|
48
|
-
this.setJustifyContent("End");
|
|
49
|
-
}
|
|
50
|
-
});
|
|
51
|
-
|
|
52
|
-
Personalization.prototype.buildContent = function() {
|
|
53
|
-
[
|
|
54
|
-
new Button("sapUiRta_restore", {
|
|
55
|
-
type: "Transparent",
|
|
56
|
-
text: "{i18n>BTN_RESTORE}",
|
|
57
|
-
visible: true,
|
|
58
|
-
press: this.eventHandler.bind(this, "Restore")
|
|
59
|
-
}).data("name", "restore"),
|
|
60
|
-
new Button("sapUiRta_exit", {
|
|
61
|
-
type: "Emphasized",
|
|
62
|
-
text: "{i18n>BTN_DONE}",
|
|
63
|
-
press: this.eventHandler.bind(this, "Exit")
|
|
64
|
-
}).data("name", "exit")
|
|
65
|
-
].forEach(function(oControl) {
|
|
66
|
-
this.addItem(oControl);
|
|
67
|
-
}.bind(this));
|
|
68
|
-
|
|
69
|
-
return Promise.resolve();
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
return Personalization;
|
|
73
|
-
});
|