@openui5/sap.ui.rta 1.97.1 → 1.100.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.reuse/dep5 +25 -30
- package/THIRDPARTY.txt +15 -22
- 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 +224 -168
- package/src/sap/ui/rta/Utils.js +4 -6
- package/src/sap/ui/rta/appContexts/AppContextsOverviewDialog.js +76 -0
- package/src/sap/ui/rta/appContexts/Component.js +31 -0
- package/src/sap/ui/rta/appContexts/controller/ManageContexts.controller.js +323 -0
- package/src/sap/ui/rta/appContexts/controller/RestAPIConnector.js +22 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n.properties +47 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_ar.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_bg.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_ca.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_cs.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_cy.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_da.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_de.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_el.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_en.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_en_GB.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_en_US_sappsd.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_en_US_saprigi.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_en_US_saptrc.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_es.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_es_MX.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_et.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_fi.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_fr.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_fr_CA.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_hi.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_hr.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_hu.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_id.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_it.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_iw.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_ja.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_kk.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_ko.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_lt.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_lv.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_ms.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_nl.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_no.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_pl.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_pt.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_pt_PT.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_ro.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_ru.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_sh.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_sk.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_sl.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_sv.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_th.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_tr.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_uk.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_vi.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_zh_CN.properties +23 -0
- package/src/sap/ui/rta/appContexts/i18n/i18n_zh_TW.properties +23 -0
- package/src/sap/ui/rta/appContexts/index.html +25 -0
- package/src/sap/ui/rta/appContexts/manifest.json +52 -0
- package/src/sap/ui/rta/appContexts/view/EditContextsDialog.fragment.xml +76 -0
- package/src/sap/ui/rta/appContexts/view/ManageContexts.view.xml +103 -0
- package/src/sap/ui/rta/appContexts/view/SaveAsContextsDialog.fragment.xml +76 -0
- package/src/sap/ui/rta/appVariant/AppVariantDialog.js +6 -3
- package/src/sap/ui/rta/appVariant/AppVariantManager.js +11 -11
- package/src/sap/ui/rta/appVariant/AppVariantUtils.js +3 -4
- package/src/sap/ui/rta/appVariant/Feature.js +22 -11
- 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 +3 -2
- package/src/sap/ui/rta/command/AddXMLAtExtensionPoint.js +3 -2
- 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 +3 -2
- package/src/sap/ui/rta/command/Combine.js +5 -1
- package/src/sap/ui/rta/command/CommandFactory.js +17 -13
- package/src/sap/ui/rta/command/CompositeCommand.js +5 -5
- 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 +11 -3
- 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 +22 -27
- 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 +2 -2
- package/src/sap/ui/rta/library.js +2 -2
- package/src/sap/ui/rta/messagebundle.properties +37 -17
- package/src/sap/ui/rta/messagebundle_ar.properties +20 -9
- package/src/sap/ui/rta/messagebundle_bg.properties +22 -11
- package/src/sap/ui/rta/messagebundle_ca.properties +20 -9
- package/src/sap/ui/rta/messagebundle_cs.properties +20 -9
- package/src/sap/ui/rta/messagebundle_cy.properties +20 -9
- package/src/sap/ui/rta/messagebundle_da.properties +20 -9
- package/src/sap/ui/rta/messagebundle_de.properties +20 -9
- package/src/sap/ui/rta/messagebundle_el.properties +20 -9
- package/src/sap/ui/rta/messagebundle_en.properties +20 -9
- package/src/sap/ui/rta/messagebundle_en_GB.properties +20 -9
- package/src/sap/ui/rta/messagebundle_en_US_sappsd.properties +20 -9
- package/src/sap/ui/rta/messagebundle_en_US_saprigi.properties +39 -20
- package/src/sap/ui/rta/messagebundle_en_US_saptrc.properties +22 -11
- package/src/sap/ui/rta/messagebundle_es.properties +20 -9
- package/src/sap/ui/rta/messagebundle_es_MX.properties +24 -13
- package/src/sap/ui/rta/messagebundle_et.properties +21 -10
- package/src/sap/ui/rta/messagebundle_fi.properties +20 -9
- package/src/sap/ui/rta/messagebundle_fr.properties +20 -9
- package/src/sap/ui/rta/messagebundle_fr_CA.properties +20 -9
- package/src/sap/ui/rta/messagebundle_hi.properties +20 -9
- package/src/sap/ui/rta/messagebundle_hr.properties +20 -9
- package/src/sap/ui/rta/messagebundle_hu.properties +20 -9
- package/src/sap/ui/rta/messagebundle_id.properties +23 -12
- package/src/sap/ui/rta/messagebundle_it.properties +21 -10
- package/src/sap/ui/rta/messagebundle_iw.properties +20 -9
- package/src/sap/ui/rta/messagebundle_ja.properties +20 -9
- package/src/sap/ui/rta/messagebundle_kk.properties +20 -9
- package/src/sap/ui/rta/messagebundle_ko.properties +21 -10
- package/src/sap/ui/rta/messagebundle_lt.properties +20 -9
- package/src/sap/ui/rta/messagebundle_lv.properties +22 -11
- package/src/sap/ui/rta/messagebundle_ms.properties +20 -9
- package/src/sap/ui/rta/messagebundle_nl.properties +20 -9
- package/src/sap/ui/rta/messagebundle_no.properties +20 -9
- package/src/sap/ui/rta/messagebundle_pl.properties +20 -9
- package/src/sap/ui/rta/messagebundle_pt.properties +20 -9
- package/src/sap/ui/rta/messagebundle_pt_PT.properties +20 -9
- package/src/sap/ui/rta/messagebundle_ro.properties +20 -9
- package/src/sap/ui/rta/messagebundle_ru.properties +20 -9
- package/src/sap/ui/rta/messagebundle_sh.properties +20 -9
- package/src/sap/ui/rta/messagebundle_sk.properties +20 -9
- package/src/sap/ui/rta/messagebundle_sl.properties +20 -9
- package/src/sap/ui/rta/messagebundle_sv.properties +20 -9
- package/src/sap/ui/rta/messagebundle_th.properties +20 -9
- package/src/sap/ui/rta/messagebundle_tr.properties +20 -9
- package/src/sap/ui/rta/messagebundle_uk.properties +21 -10
- package/src/sap/ui/rta/messagebundle_vi.properties +20 -9
- package/src/sap/ui/rta/messagebundle_zh_CN.properties +20 -9
- package/src/sap/ui/rta/messagebundle_zh_TW.properties +20 -9
- 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 +11 -4
- package/src/sap/ui/rta/plugin/ControlVariant.js +5 -6
- 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/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 +1 -1
- package/src/sap/ui/rta/plugin/Remove.js +22 -9
- package/src/sap/ui/rta/plugin/Rename.js +1 -1
- package/src/sap/ui/rta/plugin/RenameHandler.js +1 -1
- package/src/sap/ui/rta/plugin/Selection.js +35 -33
- package/src/sap/ui/rta/plugin/Settings.js +1 -1
- package/src/sap/ui/rta/plugin/Split.js +1 -1
- package/src/sap/ui/rta/plugin/Stretch.js +1 -1
- package/src/sap/ui/rta/plugin/additionalElements/ActionExtractor.js +53 -121
- package/src/sap/ui/rta/plugin/additionalElements/AddElementsDialog.js +1 -1
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsAnalyzer.js +0 -67
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsPlugin.js +9 -10
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsUtils.js +3 -4
- package/src/sap/ui/rta/plugin/additionalElements/CommandBuilder.js +17 -47
- 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 +5 -6
- package/src/sap/ui/rta/service/Outline.js +6 -3
- 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 +44 -61
- package/src/sap/ui/rta/toolbar/Adaptation.fragment.xml +1 -0
- package/src/sap/ui/rta/toolbar/Adaptation.js +12 -12
- package/src/sap/ui/rta/toolbar/Base.js +3 -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 +2 -2
- package/src/sap/ui/rta/toolbar/Personalization.js +1 -1
- package/src/sap/ui/rta/toolbar/Standalone.js +1 -1
- package/src/sap/ui/rta/toolbar/translation/DownloadTranslationDialog.fragment.xml +19 -10
- package/src/sap/ui/rta/toolbar/translation/Translation.js +146 -56
- package/src/sap/ui/rta/toolbar/translation/TranslationPopover.fragment.xml +8 -13
- package/src/sap/ui/rta/toolbar/translation/UploadTranslationDialog.fragment.xml +41 -0
- package/src/sap/ui/rta/util/PluginManager.js +1 -1
- package/src/sap/ui/rta/util/PopupManager.js +37 -13
- package/src/sap/ui/rta/util/ServiceEventBus.js +1 -1
- package/src/sap/ui/rta/util/adaptationStarter.js +40 -2
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicator.js +112 -60
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorPopover.fragment.xml +6 -5
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorRegistry.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/ChangeVisualization.js +87 -103
- package/src/sap/ui/rta/util/changeVisualization/ChangeVisualizationUtils.js +37 -0
- package/src/sap/ui/rta/util/changeVisualization/categories/MoveVisualization.js +5 -2
- package/src/sap/ui/rta/util/changeVisualization/categories/RenameVisualization.js +14 -2
- package/src/sap/ui/rta/util/changeVisualization/categories/SplitVisualization.js +5 -2
- package/src/sap/ui/rta/util/showMessageBox.js +4 -3
- package/src/sap/ui/rta/util/validateFlexEnabled.js +2 -1
|
@@ -13,7 +13,9 @@ sap.ui.define([
|
|
|
13
13
|
"sap/ui/events/KeyCodes",
|
|
14
14
|
"sap/ui/rta/util/changeVisualization/categories/getVisualizationCategory",
|
|
15
15
|
"sap/ui/fl/Utils",
|
|
16
|
-
"sap/ui/fl/util/resolveBinding"
|
|
16
|
+
"sap/ui/fl/util/resolveBinding",
|
|
17
|
+
"sap/ui/rta/util/changeVisualization/ChangeVisualizationUtils",
|
|
18
|
+
"sap/ui/core/Core"
|
|
17
19
|
], function(
|
|
18
20
|
Fragment,
|
|
19
21
|
JSONModel,
|
|
@@ -23,9 +25,20 @@ sap.ui.define([
|
|
|
23
25
|
KeyCodes,
|
|
24
26
|
getVisualizationCategory,
|
|
25
27
|
FlUtils,
|
|
26
|
-
resolveBinding
|
|
28
|
+
resolveBinding,
|
|
29
|
+
ChangeVisualizationUtils,
|
|
30
|
+
Core
|
|
27
31
|
) {
|
|
28
32
|
"use strict";
|
|
33
|
+
|
|
34
|
+
var CATEGORY_ICONS = {
|
|
35
|
+
add: "sap-icon://add",
|
|
36
|
+
move: "sap-icon://move",
|
|
37
|
+
rename: "sap-icon://edit",
|
|
38
|
+
combinesplit: "sap-icon://combine",
|
|
39
|
+
remove: "sap-icon://less"
|
|
40
|
+
};
|
|
41
|
+
|
|
29
42
|
/**
|
|
30
43
|
* @class
|
|
31
44
|
* Constructor for a new <code>sap.ui.rta.util.changeVisualization.ChangeIndicator</code> class.
|
|
@@ -35,7 +48,7 @@ sap.ui.define([
|
|
|
35
48
|
* @alias sap.ui.rta.util.changeVisualization.ChangeIndicator
|
|
36
49
|
* @author SAP SE
|
|
37
50
|
* @since 1.84.0
|
|
38
|
-
* @version 1.
|
|
51
|
+
* @version 1.100.0
|
|
39
52
|
* @private
|
|
40
53
|
*/
|
|
41
54
|
var ChangeIndicator = Control.extend("sap.ui.rta.util.changeVisualization.ChangeIndicator", {
|
|
@@ -79,11 +92,6 @@ sap.ui.define([
|
|
|
79
92
|
type: "sap.m.Popover",
|
|
80
93
|
multiple: false,
|
|
81
94
|
visibility: "hidden"
|
|
82
|
-
},
|
|
83
|
-
_text: {
|
|
84
|
-
type: "sap.m.Text",
|
|
85
|
-
multiple: false,
|
|
86
|
-
visibility: "hidden"
|
|
87
95
|
}
|
|
88
96
|
},
|
|
89
97
|
events: {
|
|
@@ -115,59 +123,89 @@ sap.ui.define([
|
|
|
115
123
|
oRm.openStart("div", oControl);
|
|
116
124
|
oRm.class("sapUiRtaChangeIndicator");
|
|
117
125
|
oRm.class("sapUiRtaChangeIndicatorChange");
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
126
|
+
if (oControl.getChanges().length > 4) {
|
|
127
|
+
oRm.class("sapUiRtaChangeIndicatorColorDark");
|
|
128
|
+
} else if (oControl.getChanges().length > 1) {
|
|
129
|
+
oRm.class("sapUiRtaChangeIndicatorColorMedium");
|
|
130
|
+
} else {
|
|
131
|
+
oRm.class("sapUiRtaChangeIndicatorColorLight");
|
|
132
|
+
}
|
|
122
133
|
oRm.openEnd();
|
|
123
|
-
oRm.renderControl(oControl.getAggregation("_text"));
|
|
124
|
-
oRm.close("div");
|
|
125
134
|
oRm.close("div");
|
|
126
135
|
}
|
|
127
136
|
},
|
|
128
|
-
constructor: function
|
|
137
|
+
constructor: function() {
|
|
129
138
|
this._oDetailModel = new JSONModel();
|
|
130
139
|
this._oDetailModel.setDefaultBindingMode("OneWay");
|
|
131
140
|
|
|
132
141
|
Control.prototype.constructor.apply(this, arguments);
|
|
142
|
+
|
|
143
|
+
this._fnHoverTrue = this._toggleHoverStyleClasses.bind(this, true);
|
|
144
|
+
this._fnHoverFalse = this._toggleHoverStyleClasses.bind(this, false);
|
|
133
145
|
}
|
|
134
146
|
});
|
|
135
147
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
148
|
+
function handleBrowserEventsOnElement(oElement, sEventHandler) {
|
|
149
|
+
oElement[sEventHandler]("click", this._onSelect, this);
|
|
150
|
+
oElement[sEventHandler]("tap", this._onSelect, this);
|
|
151
|
+
oElement[sEventHandler]("keydown", this._onKeyDown, this);
|
|
152
|
+
oElement[sEventHandler]("mouseout", this._fnHoverFalse);
|
|
153
|
+
oElement[sEventHandler]("focusout", this._fnHoverFalse);
|
|
154
|
+
oElement[sEventHandler]("mouseover", this._fnHoverTrue);
|
|
155
|
+
oElement[sEventHandler]("focusin", this._fnHoverTrue);
|
|
156
|
+
}
|
|
141
157
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
158
|
+
function centerVertically(oIndicator) {
|
|
159
|
+
var oIndicatorDomRef = oIndicator.getDomRef();
|
|
160
|
+
var iOverlayHeight = document.getElementById(oIndicator.getOverlayId()).offsetHeight;
|
|
161
|
+
var iIndicatorHeight = oIndicatorDomRef.offsetHeight;
|
|
162
|
+
// the indicator should be centered only if the element has a small enough height to improve the design and visibility
|
|
163
|
+
if (iOverlayHeight < iIndicatorHeight * 5) {
|
|
164
|
+
oIndicator.addStyleClass("sapUiRtaChangeIndicatorVerticallyCentered");
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
ChangeIndicator.prototype.init = function() {
|
|
169
|
+
this._iOldTabIndex = 0;
|
|
170
|
+
handleBrowserEventsOnElement.call(this, this, "attachBrowserEvent");
|
|
148
171
|
};
|
|
149
172
|
|
|
150
|
-
ChangeIndicator.prototype.
|
|
173
|
+
ChangeIndicator.prototype.setVisible = function(bVisible) {
|
|
174
|
+
Control.prototype.setVisible.apply(this, arguments);
|
|
175
|
+
var oOverlay = Core.byId(this.getOverlayId());
|
|
176
|
+
// needed because the change indicator cleanup is only triggered on save and exit
|
|
177
|
+
if (oOverlay) {
|
|
178
|
+
if (bVisible) {
|
|
179
|
+
handleBrowserEventsOnElement.call(this, oOverlay, "attachBrowserEvent");
|
|
180
|
+
} else {
|
|
181
|
+
handleBrowserEventsOnElement.call(this, oOverlay, "detachBrowserEvent");
|
|
182
|
+
if (this.getAggregation("_popover")) {
|
|
183
|
+
this.getAggregation("_popover").destroy();
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
return this;
|
|
188
|
+
};
|
|
189
|
+
|
|
190
|
+
ChangeIndicator.prototype.focus = function() {
|
|
151
191
|
if (this.getDomRef()) {
|
|
152
192
|
// Element is rendered, focus immediately
|
|
153
193
|
Control.prototype.focus.apply(this, arguments);
|
|
154
194
|
this._bScheduledForFocus = false;
|
|
195
|
+
return;
|
|
155
196
|
}
|
|
156
197
|
this._bScheduledForFocus = true;
|
|
157
198
|
};
|
|
158
199
|
|
|
159
|
-
ChangeIndicator.prototype.
|
|
160
|
-
var oOverlay = document.getElementById(this.getOverlayId());
|
|
161
|
-
var iSize = oOverlay.offsetHeight;
|
|
162
|
-
return (iSize > 50 ? 50 : iSize) - 2;
|
|
163
|
-
};
|
|
164
|
-
|
|
165
|
-
ChangeIndicator.prototype.onAfterRendering = function () {
|
|
166
|
-
// Attach to the overlay
|
|
200
|
+
ChangeIndicator.prototype.onAfterRendering = function() {
|
|
167
201
|
var oOverlay = document.getElementById(this.getOverlayId());
|
|
168
|
-
oOverlay
|
|
169
|
-
|
|
170
|
-
|
|
202
|
+
if (oOverlay) {
|
|
203
|
+
// Attach to the overlay
|
|
204
|
+
oOverlay.appendChild(this.getDomRef());
|
|
205
|
+
centerVertically(this);
|
|
206
|
+
}
|
|
207
|
+
// Restore the Tabindex if stored before; set to 0 as default
|
|
208
|
+
this.getDomRef().tabIndex = this._iOldTabIndex;
|
|
171
209
|
|
|
172
210
|
if (this._bScheduledForFocus) {
|
|
173
211
|
// Element was supposed to be focused before rendering
|
|
@@ -176,21 +214,27 @@ sap.ui.define([
|
|
|
176
214
|
}
|
|
177
215
|
};
|
|
178
216
|
|
|
179
|
-
ChangeIndicator.prototype.exit = function
|
|
217
|
+
ChangeIndicator.prototype.exit = function() {
|
|
180
218
|
var oDomRef = this.getDomRef();
|
|
219
|
+
var oOverlay = Core.byId(this.getOverlayId());
|
|
181
220
|
if (oDomRef) {
|
|
182
221
|
oDomRef.parentNode.removeChild(oDomRef);
|
|
183
222
|
}
|
|
184
|
-
|
|
185
|
-
|
|
223
|
+
if (oOverlay) {
|
|
224
|
+
if (this.getAggregation("_popover")) {
|
|
225
|
+
this.getAggregation("_popover").destroy();
|
|
226
|
+
}
|
|
227
|
+
handleBrowserEventsOnElement.call(this, oOverlay, "detachBrowserEvent");
|
|
228
|
+
}
|
|
229
|
+
handleBrowserEventsOnElement.call(this, this, "detachBrowserEvent");
|
|
186
230
|
};
|
|
187
231
|
|
|
188
|
-
ChangeIndicator.prototype.setChanges = function
|
|
232
|
+
ChangeIndicator.prototype.setChanges = function(aChanges) {
|
|
189
233
|
this.setProperty("changes", aChanges);
|
|
190
|
-
this._oDetailModel.setData((aChanges || []).map(this._formatChangesModelItem.bind(this)));
|
|
234
|
+
this._oDetailModel.setData((aChanges || []).reverse().map(this._formatChangesModelItem.bind(this)));
|
|
191
235
|
};
|
|
192
236
|
|
|
193
|
-
ChangeIndicator.prototype._onSelect = function
|
|
237
|
+
ChangeIndicator.prototype._onSelect = function(oEvent) {
|
|
194
238
|
this.focus();
|
|
195
239
|
oEvent.stopPropagation();
|
|
196
240
|
this._openDetailPopover();
|
|
@@ -206,19 +250,23 @@ sap.ui.define([
|
|
|
206
250
|
});
|
|
207
251
|
};
|
|
208
252
|
|
|
209
|
-
ChangeIndicator.prototype._toggleHoverStyleClasses = function(bAdd) {
|
|
210
|
-
|
|
253
|
+
ChangeIndicator.prototype._toggleHoverStyleClasses = function(bAdd, oEvent) {
|
|
254
|
+
if (oEvent) {
|
|
255
|
+
oEvent.stopPropagation();
|
|
256
|
+
oEvent.preventDefault();
|
|
257
|
+
}
|
|
258
|
+
var oOverlay = Core.byId(this.getOverlayId());
|
|
211
259
|
if (oOverlay.getMetadata().getName() !== "sap.ui.dt.ElementOverlay") {
|
|
212
260
|
return;
|
|
213
261
|
}
|
|
214
262
|
var sFunctionName = bAdd ? "addStyleClass" : "removeStyleClass";
|
|
215
|
-
oOverlay[sFunctionName]("sapUiRtaOverlayHover");
|
|
216
263
|
oOverlay[sFunctionName]("sapUiRtaChangeIndicatorHovered");
|
|
264
|
+
this[sFunctionName]("sapUiRtaHover");
|
|
217
265
|
};
|
|
218
266
|
|
|
219
|
-
ChangeIndicator.prototype._formatChangesModelItem = function
|
|
220
|
-
var oAffectedElement =
|
|
221
|
-
var mPayload = Object.keys(mChangeInformation.payload || {}).reduce(function
|
|
267
|
+
ChangeIndicator.prototype._formatChangesModelItem = function(mChangeInformation) {
|
|
268
|
+
var oAffectedElement = Core.byId(mChangeInformation.affectedElementId);
|
|
269
|
+
var mPayload = Object.keys(mChangeInformation.payload || {}).reduce(function(mPayload, sKey) {
|
|
222
270
|
var vOriginalValue = mChangeInformation.payload[sKey];
|
|
223
271
|
var bIsBinding = FlUtils.isBinding(vOriginalValue);
|
|
224
272
|
var vValue = bIsBinding
|
|
@@ -228,37 +276,41 @@ sap.ui.define([
|
|
|
228
276
|
return mPayload;
|
|
229
277
|
}, {});
|
|
230
278
|
|
|
231
|
-
var oOverlay =
|
|
279
|
+
var oOverlay = Core.byId(this.getOverlayId());
|
|
232
280
|
var sElementLabel = oOverlay.getDesignTimeMetadata().getLabel(oAffectedElement);
|
|
233
281
|
var oVisualizationUtil = getVisualizationCategory(mChangeInformation.commandName);
|
|
234
282
|
var oDescription = oVisualizationUtil && oVisualizationUtil.getDescription(mPayload, sElementLabel);
|
|
235
|
-
var oRtaResourceBundle =
|
|
236
|
-
var sChangeTitle = mChangeInformation.commandName.charAt(0).toUpperCase() + mChangeInformation.commandName.slice(1);
|
|
283
|
+
var oRtaResourceBundle = Core.getLibraryResourceBundle("sap.ui.rta");
|
|
237
284
|
sElementLabel = sElementLabel && "'" + sElementLabel + "'";
|
|
285
|
+
var sShortenedElementLabel = ChangeVisualizationUtils.shortenString(sElementLabel);
|
|
238
286
|
var sChangeTextKey = (
|
|
239
287
|
"TXT_CHANGEVISUALIZATION_CHANGE_"
|
|
240
288
|
+ mChangeInformation.commandName.toUpperCase()
|
|
241
289
|
);
|
|
242
|
-
var
|
|
290
|
+
var sDescriptionText = oDescription ? oDescription.descriptionText : oRtaResourceBundle.getText(sChangeTextKey, sShortenedElementLabel);
|
|
291
|
+
var sDescriptionTooltip = oDescription ? oDescription.descriptionTooltip : oRtaResourceBundle.getText(sChangeTextKey, sElementLabel);
|
|
243
292
|
var sCreationDate = mChangeInformation.change.getCreation();
|
|
244
293
|
var oDate = new Date(sCreationDate);
|
|
245
294
|
var sFallbackDate = oRtaResourceBundle.getText("TXT_CHANGEVISUALIZATION_CREATED_IN_SESSION_DATE");
|
|
246
295
|
var sFullDate = sCreationDate ? DateFormat.getDateTimeInstance().format(oDate) : sFallbackDate;
|
|
247
|
-
var sRelativeDate = sCreationDate ? DateFormat.getDateTimeInstance({relative: "true"}).format(oDate) : sFallbackDate;
|
|
296
|
+
var sRelativeDate = sCreationDate ? DateFormat.getDateTimeInstance({ relative: "true" }).format(oDate) : sFallbackDate;
|
|
248
297
|
var sDetailButtonText = oDescription && oDescription.buttonText;
|
|
249
298
|
return {
|
|
250
299
|
id: mChangeInformation.id,
|
|
251
300
|
change: mChangeInformation,
|
|
252
|
-
|
|
253
|
-
|
|
301
|
+
description: sDescriptionText,
|
|
302
|
+
descriptionTooltip: sDescriptionTooltip && sDescriptionText.length < sDescriptionTooltip.length ? sDescriptionTooltip : null,
|
|
254
303
|
fullDate: sFullDate,
|
|
255
304
|
relativeDate: sRelativeDate,
|
|
256
|
-
detailButtonText: sDetailButtonText
|
|
305
|
+
detailButtonText: sDetailButtonText,
|
|
306
|
+
icon: CATEGORY_ICONS[mChangeInformation.commandCategory]
|
|
257
307
|
};
|
|
258
308
|
};
|
|
259
309
|
|
|
260
|
-
ChangeIndicator.prototype._openDetailPopover = function
|
|
310
|
+
ChangeIndicator.prototype._openDetailPopover = function() {
|
|
261
311
|
if (!this.getAggregation("_popover")) {
|
|
312
|
+
//store the tabindex (tabindex will be removed on opening the popover)
|
|
313
|
+
this._iOldTabIndex = this.getDomRef().getAttribute("tabindex");
|
|
262
314
|
Fragment.load({
|
|
263
315
|
name: "sap.ui.rta.util.changeVisualization.ChangeIndicatorPopover",
|
|
264
316
|
controller: this
|
|
@@ -276,7 +328,7 @@ sap.ui.define([
|
|
|
276
328
|
}
|
|
277
329
|
};
|
|
278
330
|
|
|
279
|
-
ChangeIndicator.prototype._showDependentElements = function
|
|
331
|
+
ChangeIndicator.prototype._showDependentElements = function(oEvent) {
|
|
280
332
|
this.getAggregation("_popover").close();
|
|
281
333
|
var sChangeId = this.getChanges().length > 1
|
|
282
334
|
? oEvent.getSource().getBindingContext("details").getObject().id
|
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
showHeader="false"
|
|
7
7
|
placement="PreferredTopOrFlip"
|
|
8
8
|
class="sapUiRtaPopover">
|
|
9
|
-
<Label visible="false" text="Changes"/>
|
|
10
9
|
<Table
|
|
11
10
|
ariaLabelledBy="Changes"
|
|
12
11
|
items="{details>/}"
|
|
@@ -16,7 +15,7 @@
|
|
|
16
15
|
<columns>
|
|
17
16
|
<Column
|
|
18
17
|
width="auto">
|
|
19
|
-
<Text text="{i18n>
|
|
18
|
+
<Text text="{i18n>TIT_CHANGEVISUALIZATION_TYPE}" />
|
|
20
19
|
</Column>
|
|
21
20
|
<Column
|
|
22
21
|
width="auto">
|
|
@@ -30,11 +29,13 @@
|
|
|
30
29
|
<items>
|
|
31
30
|
<ColumnListItem>
|
|
32
31
|
<cells>
|
|
33
|
-
<
|
|
34
|
-
|
|
32
|
+
<core:Icon
|
|
33
|
+
src="{details>icon}"
|
|
34
|
+
class="sapUiTinyMarginBegin"/>
|
|
35
35
|
<HBox alignItems="Center">
|
|
36
36
|
<Text
|
|
37
|
-
text="{details>description}"
|
|
37
|
+
text="{details>description}"
|
|
38
|
+
tooltip="{details>descriptionTooltip}"/>
|
|
38
39
|
<Button
|
|
39
40
|
visible="{= !!${details>detailButtonText}}"
|
|
40
41
|
text="{details>detailButtonText}"
|
|
@@ -25,7 +25,7 @@ sap.ui.define([
|
|
|
25
25
|
* @alias sap.ui.rta.util.changeVisualization.ChangeIndicatorRegistry
|
|
26
26
|
* @author SAP SE
|
|
27
27
|
* @since 1.86.0
|
|
28
|
-
* @version 1.
|
|
28
|
+
* @version 1.100.0
|
|
29
29
|
* @private
|
|
30
30
|
*/
|
|
31
31
|
var ChangeIndicatorRegistry = ManagedObject.extend("sap.ui.rta.util.changeVisualization.ChangeIndicatorRegistry", {
|