@openui5/sap.ui.rta 1.100.0 → 1.102.1
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 +5 -5
- 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 +141 -86
- package/src/sap/ui/rta/Utils.js +1 -1
- package/src/sap/ui/rta/appVariant/AppVariantManager.js +1 -1
- package/src/sap/ui/rta/appVariant/AppVariantUtils.js +2 -2
- package/src/sap/ui/rta/appVariant/manageApps/webapp/controller/ManageApps.controller.js +0 -17
- package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n.properties +0 -4
- package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_ar.properties +0 -2
- package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_bg.properties +0 -2
- package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_ca.properties +0 -2
- package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_cs.properties +0 -2
- package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_cy.properties +0 -2
- package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_da.properties +0 -2
- package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_de.properties +0 -2
- package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_el.properties +0 -2
- package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_en.properties +0 -2
- package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_en_GB.properties +0 -2
- package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_en_US_sappsd.properties +0 -2
- package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_en_US_saprigi.properties +0 -2
- package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_en_US_saptrc.properties +0 -2
- package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_es.properties +0 -2
- package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_es_MX.properties +0 -2
- package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_et.properties +0 -2
- package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_fi.properties +0 -2
- package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_fr.properties +0 -2
- package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_fr_CA.properties +0 -2
- package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_hi.properties +0 -2
- package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_hr.properties +0 -2
- package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_hu.properties +0 -2
- package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_id.properties +0 -2
- package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_it.properties +0 -2
- package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_iw.properties +0 -2
- package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_ja.properties +0 -2
- package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_kk.properties +0 -2
- package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_ko.properties +0 -2
- package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_lt.properties +0 -2
- package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_lv.properties +0 -2
- package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_ms.properties +0 -2
- package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_nl.properties +0 -2
- package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_no.properties +0 -2
- package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_pl.properties +0 -2
- package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_pt.properties +0 -2
- package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_pt_PT.properties +0 -2
- package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_ro.properties +0 -2
- package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_ru.properties +0 -2
- package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_sh.properties +0 -2
- package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_sk.properties +0 -2
- package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_sl.properties +0 -2
- package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_sv.properties +0 -2
- package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_th.properties +0 -2
- package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_tr.properties +0 -2
- package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_uk.properties +0 -2
- package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_vi.properties +0 -2
- package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_zh_CN.properties +0 -2
- package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_zh_TW.properties +0 -2
- package/src/sap/ui/rta/appVariant/manageApps/webapp/view/ManageApps.view.xml +0 -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 +8 -2
- 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 +3 -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/Resize.js +45 -0
- 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 +8 -6
- package/src/sap/ui/rta/command/appDescriptor/AddLibrary.js +1 -1
- package/src/sap/ui/rta/command/compVariant/CompVariantContent.js +82 -0
- 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 +6 -9
- package/src/sap/ui/rta/messagebundle.properties +24 -8
- package/src/sap/ui/rta/messagebundle_ar.properties +14 -6
- package/src/sap/ui/rta/messagebundle_bg.properties +16 -8
- package/src/sap/ui/rta/messagebundle_ca.properties +15 -7
- package/src/sap/ui/rta/messagebundle_cs.properties +14 -6
- package/src/sap/ui/rta/messagebundle_cy.properties +14 -6
- package/src/sap/ui/rta/messagebundle_da.properties +14 -6
- package/src/sap/ui/rta/messagebundle_de.properties +14 -6
- package/src/sap/ui/rta/messagebundle_el.properties +14 -6
- package/src/sap/ui/rta/messagebundle_en.properties +14 -6
- package/src/sap/ui/rta/messagebundle_en_GB.properties +14 -6
- package/src/sap/ui/rta/messagebundle_en_US_sappsd.properties +14 -6
- package/src/sap/ui/rta/messagebundle_en_US_saprigi.properties +14 -6
- package/src/sap/ui/rta/messagebundle_en_US_saptrc.properties +14 -6
- package/src/sap/ui/rta/messagebundle_es.properties +14 -6
- package/src/sap/ui/rta/messagebundle_es_MX.properties +14 -6
- package/src/sap/ui/rta/messagebundle_et.properties +14 -6
- package/src/sap/ui/rta/messagebundle_fi.properties +14 -6
- package/src/sap/ui/rta/messagebundle_fr.properties +14 -6
- package/src/sap/ui/rta/messagebundle_fr_CA.properties +14 -6
- package/src/sap/ui/rta/messagebundle_hi.properties +13 -5
- package/src/sap/ui/rta/messagebundle_hr.properties +14 -6
- package/src/sap/ui/rta/messagebundle_hu.properties +14 -6
- package/src/sap/ui/rta/messagebundle_id.properties +14 -6
- package/src/sap/ui/rta/messagebundle_it.properties +14 -6
- package/src/sap/ui/rta/messagebundle_iw.properties +14 -6
- package/src/sap/ui/rta/messagebundle_ja.properties +14 -6
- package/src/sap/ui/rta/messagebundle_kk.properties +14 -6
- package/src/sap/ui/rta/messagebundle_ko.properties +14 -6
- package/src/sap/ui/rta/messagebundle_lt.properties +14 -6
- package/src/sap/ui/rta/messagebundle_lv.properties +14 -6
- package/src/sap/ui/rta/messagebundle_ms.properties +14 -6
- package/src/sap/ui/rta/messagebundle_nl.properties +14 -6
- package/src/sap/ui/rta/messagebundle_no.properties +14 -6
- package/src/sap/ui/rta/messagebundle_pl.properties +14 -6
- package/src/sap/ui/rta/messagebundle_pt.properties +14 -6
- package/src/sap/ui/rta/messagebundle_pt_PT.properties +14 -6
- package/src/sap/ui/rta/messagebundle_ro.properties +14 -6
- package/src/sap/ui/rta/messagebundle_ru.properties +14 -6
- package/src/sap/ui/rta/messagebundle_sh.properties +14 -6
- package/src/sap/ui/rta/messagebundle_sk.properties +14 -6
- package/src/sap/ui/rta/messagebundle_sl.properties +14 -6
- package/src/sap/ui/rta/messagebundle_sv.properties +14 -6
- package/src/sap/ui/rta/messagebundle_th.properties +14 -6
- package/src/sap/ui/rta/messagebundle_tr.properties +14 -6
- package/src/sap/ui/rta/messagebundle_uk.properties +14 -6
- package/src/sap/ui/rta/messagebundle_vi.properties +14 -6
- package/src/sap/ui/rta/messagebundle_zh_CN.properties +14 -6
- package/src/sap/ui/rta/messagebundle_zh_TW.properties +15 -7
- package/src/sap/ui/rta/plugin/AddXMLAtExtensionPoint.js +1 -1
- package/src/sap/ui/rta/plugin/BaseCreate.js +1 -1
- package/src/sap/ui/rta/plugin/Combine.js +5 -11
- package/src/sap/ui/rta/plugin/CompVariant.js +85 -66
- package/src/sap/ui/rta/plugin/ControlVariant.js +1 -1
- package/src/sap/ui/rta/plugin/CreateContainer.js +1 -3
- 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 +32 -11
- package/src/sap/ui/rta/plugin/RTAElementMover.js +1 -1
- package/src/sap/ui/rta/plugin/Remove.js +5 -19
- package/src/sap/ui/rta/plugin/Rename.js +6 -19
- package/src/sap/ui/rta/plugin/RenameHandler.js +23 -6
- package/src/sap/ui/rta/plugin/Resize.js +432 -0
- package/src/sap/ui/rta/plugin/Selection.js +1 -1
- package/src/sap/ui/rta/plugin/Settings.js +1 -1
- package/src/sap/ui/rta/plugin/Split.js +5 -11
- 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/AdditionalElementsAnalyzer.js +20 -10
- 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 +1 -1
- package/src/sap/ui/rta/service/Property.js +1 -1
- package/src/sap/ui/rta/service/Selection.js +1 -1
- package/src/sap/ui/rta/themes/base/AddIFrame.less +37 -29
- package/src/sap/ui/rta/themes/base/ChangeVisualization.less +63 -63
- package/src/sap/ui/rta/themes/base/ContextMenu.less +25 -0
- package/src/sap/ui/rta/themes/base/Dialogs.less +79 -0
- package/src/sap/ui/rta/themes/base/FieldRepository.less +14 -61
- package/src/sap/ui/rta/themes/base/Overlay.less +96 -98
- package/src/sap/ui/rta/themes/base/OverlayWithScrollbar.less +7 -1
- package/src/sap/ui/rta/themes/base/Toolbar.adaptation.less +178 -36
- package/src/sap/ui/rta/themes/base/Toolbar.base.less +23 -154
- package/src/sap/ui/rta/themes/base/Toolbar.fiori.less +2 -21
- package/src/sap/ui/rta/themes/base/Toolbar.personalization.less +3 -14
- package/src/sap/ui/rta/themes/base/Toolbar.standalone.less +0 -9
- package/src/sap/ui/rta/themes/base/library.source.less +2 -0
- package/src/sap/ui/rta/themes/sap_hcb/ChangeVisualization.less +7 -0
- package/src/sap/ui/rta/themes/sap_hcb/ContextMenu.less +5 -0
- package/src/sap/ui/rta/themes/sap_hcb/Dialogs.less +28 -0
- package/src/sap/ui/rta/themes/sap_hcb/FieldRepository.less +18 -0
- package/src/sap/ui/rta/themes/sap_hcb/Overlay.less +52 -12
- package/src/sap/ui/rta/themes/sap_hcb/Toolbar.adaptation.less +38 -0
- package/src/sap/ui/rta/themes/sap_hcb/Toolbar.base.less +14 -2
- package/src/sap/ui/rta/themes/sap_hcb/Toolbar.personalization.less +8 -2
- package/src/sap/ui/rta/themes/sap_hcb/library.source.less +5 -2
- package/src/sap/ui/rta/toolbar/Adaptation.fragment.xml +33 -32
- package/src/sap/ui/rta/toolbar/Adaptation.js +68 -24
- package/src/sap/ui/rta/toolbar/Base.js +1 -1
- 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/Personalization.js +1 -1
- package/src/sap/ui/rta/toolbar/Standalone.js +1 -1
- package/src/sap/ui/rta/toolbar/VersionHistory.fragment.xml +2 -1
- package/src/sap/ui/rta/toolbar/translation/DownloadTranslationDialog.fragment.xml +20 -17
- package/src/sap/ui/rta/toolbar/translation/Translation.js +104 -98
- package/src/sap/ui/rta/toolbar/translation/UploadTranslationDialog.fragment.xml +4 -2
- package/src/sap/ui/rta/util/PluginManager.js +10 -4
- package/src/sap/ui/rta/util/PopupManager.js +1 -1
- package/src/sap/ui/rta/util/ServiceEventBus.js +1 -1
- package/src/sap/ui/rta/util/adaptationStarter.js +102 -80
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicator.js +11 -4
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorCategorySelection.fragment.xml +30 -0
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorPopover.fragment.xml +1 -1
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorRegistry.js +1 -6
- package/src/sap/ui/rta/util/changeVisualization/ChangeVisualization.js +105 -27
- package/src/sap/ui/rta/util/changeVisualization/categories/MoveVisualization.js +25 -7
- package/src/sap/ui/rta/themes/sap_hcb/Toolbar.standalone.less +0 -9
|
@@ -30,7 +30,8 @@ sap.ui.define([
|
|
|
30
30
|
"sap/ui/rta/plugin/Settings",
|
|
31
31
|
"sap/ui/rta/plugin/Split",
|
|
32
32
|
"sap/ui/rta/plugin/Stretch",
|
|
33
|
-
"sap/ui/rta/plugin/LocalReset"
|
|
33
|
+
"sap/ui/rta/plugin/LocalReset",
|
|
34
|
+
"sap/ui/rta/plugin/Resize"
|
|
34
35
|
], function(
|
|
35
36
|
isEmptyObject,
|
|
36
37
|
values,
|
|
@@ -58,7 +59,8 @@ sap.ui.define([
|
|
|
58
59
|
SettingsPlugin,
|
|
59
60
|
SplitPlugin,
|
|
60
61
|
StretchPlugin,
|
|
61
|
-
LocalResetPlugin
|
|
62
|
+
LocalResetPlugin,
|
|
63
|
+
ResizePlugin
|
|
62
64
|
) {
|
|
63
65
|
"use strict";
|
|
64
66
|
|
|
@@ -66,7 +68,7 @@ sap.ui.define([
|
|
|
66
68
|
* Constructor for a new sap.ui.rta.util.PluginManager
|
|
67
69
|
* @extends sap.ui.base.ManagedObject
|
|
68
70
|
* @author SAP SE
|
|
69
|
-
* @version 1.
|
|
71
|
+
* @version 1.102.1
|
|
70
72
|
* @constructor
|
|
71
73
|
* @private
|
|
72
74
|
* @since 1.86
|
|
@@ -181,6 +183,10 @@ sap.ui.define([
|
|
|
181
183
|
commandFactory: this._oCommandFactory
|
|
182
184
|
});
|
|
183
185
|
|
|
186
|
+
this._mDefaultPlugins["resize"] = new ResizePlugin({
|
|
187
|
+
commandFactory: this._oCommandFactory
|
|
188
|
+
});
|
|
189
|
+
|
|
184
190
|
this._mDefaultPlugins["contextMenu"] = new ContextMenuPlugin();
|
|
185
191
|
|
|
186
192
|
this._mDefaultPlugins["tabHandling"] = new TabHandlingPlugin();
|
|
@@ -207,7 +213,7 @@ sap.ui.define([
|
|
|
207
213
|
if (
|
|
208
214
|
oFlexSettings.layer === Layer.CUSTOMER
|
|
209
215
|
&& oSettings
|
|
210
|
-
&&
|
|
216
|
+
&& oSettings.isPublicLayerAvailable()
|
|
211
217
|
) {
|
|
212
218
|
this._mDefaultPlugins["localReset"] = new LocalResetPlugin({
|
|
213
219
|
commandFactory: this._oCommandFactory
|
|
@@ -4,43 +4,59 @@
|
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
sap.ui.define([
|
|
7
|
-
"sap/
|
|
7
|
+
"sap/base/Log",
|
|
8
8
|
"sap/ui/core/Control",
|
|
9
|
-
"sap/ui/fl/Utils",
|
|
10
|
-
"sap/ui/fl/Layer",
|
|
11
|
-
"sap/ui/fl/write/api/FeaturesAPI",
|
|
12
9
|
"sap/ui/core/UIComponent",
|
|
13
|
-
"sap/
|
|
10
|
+
"sap/ui/fl/write/api/FeaturesAPI",
|
|
14
11
|
"sap/ui/fl/write/api/PersistenceWriteAPI",
|
|
15
|
-
"sap/ui/
|
|
12
|
+
"sap/ui/fl/Layer",
|
|
13
|
+
"sap/ui/fl/Utils",
|
|
14
|
+
"sap/ui/rta/util/showMessageBox",
|
|
15
|
+
"sap/ui/rta/RuntimeAuthoring"
|
|
16
16
|
], function(
|
|
17
|
-
|
|
17
|
+
Log,
|
|
18
18
|
Control,
|
|
19
|
-
FlexUtils,
|
|
20
|
-
Layer,
|
|
21
|
-
FeaturesAPI,
|
|
22
19
|
UIComponent,
|
|
23
|
-
|
|
20
|
+
FeaturesAPI,
|
|
24
21
|
PersistenceWriteAPI,
|
|
25
|
-
|
|
22
|
+
Layer,
|
|
23
|
+
FlexUtils,
|
|
24
|
+
showMessageBox,
|
|
25
|
+
RuntimeAuthoring
|
|
26
26
|
) {
|
|
27
27
|
"use strict";
|
|
28
28
|
|
|
29
29
|
function checkKeyUser(sLayer) {
|
|
30
30
|
if (Layer.CUSTOMER === sLayer) {
|
|
31
31
|
return FeaturesAPI.isKeyUser()
|
|
32
|
-
.then(function
|
|
32
|
+
.then(function(bIsKeyUser) {
|
|
33
33
|
if (!bIsKeyUser) {
|
|
34
|
-
|
|
34
|
+
var oError = Error("Key user rights have not been granted to the current user");
|
|
35
|
+
oError.reason = "isKeyUser";
|
|
36
|
+
throw oError;
|
|
35
37
|
}
|
|
36
38
|
});
|
|
37
39
|
}
|
|
38
40
|
return Promise.resolve();
|
|
39
41
|
}
|
|
40
42
|
|
|
43
|
+
function checkFlexEnabled(oAppComponent) {
|
|
44
|
+
var oManifest = oAppComponent.getManifest() || {};
|
|
45
|
+
var vFlexEnabled = oManifest["sap.ui5"] && oManifest["sap.ui5"].flexEnabled;
|
|
46
|
+
|
|
47
|
+
if (vFlexEnabled === false) {
|
|
48
|
+
var oError = Error("This app is not enabled for key user adaptation");
|
|
49
|
+
oError.reason = "flexEnabled";
|
|
50
|
+
throw oError;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
41
54
|
/**
|
|
42
55
|
* Starter util for UI adaptation.
|
|
43
56
|
* With this API you are also able to modify the UI adaptation plugins list and or add some event handler functions to be called on start, failed and stop events.
|
|
57
|
+
* The function also checks for the Key User authorization and the <code>flexEnabled</code> flag in the manifest.
|
|
58
|
+
* If either check is not passed successfully the function returns a rejected Promise.
|
|
59
|
+
*
|
|
44
60
|
* @param {object} mOptions - Object with properties
|
|
45
61
|
* @param {sap.ui.core.Control|sap.ui.core.UIComponent} mOptions.rootControl - Control instance to get the AppComponent. This then is used to start UI adaptation.
|
|
46
62
|
* @param {function} [loadPlugins] - Callback function that enables the modification of the default plugin list of UI adaptation. UI adaptation is passed to this function and it should return a promise
|
|
@@ -51,78 +67,84 @@ sap.ui.define([
|
|
|
51
67
|
* @private
|
|
52
68
|
*/
|
|
53
69
|
function adaptationStarter(mOptions, loadPlugins, onStart, onFailed, onStop) {
|
|
54
|
-
if (!(mOptions.rootControl instanceof Control) && !(mOptions.rootControl instanceof UIComponent)) {
|
|
55
|
-
return Promise.reject(new Error("An invalid root control was passed"));
|
|
56
|
-
}
|
|
57
|
-
|
|
58
70
|
var oRta;
|
|
59
|
-
return checkKeyUser(mOptions.flexSettings.layer)
|
|
60
|
-
.then(function () {
|
|
61
|
-
mOptions.rootControl = FlexUtils.getAppComponentForControl(mOptions.rootControl);
|
|
62
71
|
|
|
63
|
-
|
|
72
|
+
return Promise.resolve().then(function() {
|
|
73
|
+
if (!(mOptions.rootControl instanceof Control) && !(mOptions.rootControl instanceof UIComponent)) {
|
|
74
|
+
var oError = Error("An invalid root control was passed");
|
|
75
|
+
oError.reason = "rootControl";
|
|
76
|
+
throw oError;
|
|
77
|
+
}
|
|
78
|
+
mOptions.rootControl = FlexUtils.getAppComponentForControl(mOptions.rootControl);
|
|
79
|
+
})
|
|
80
|
+
.then(checkKeyUser.bind(undefined, mOptions.flexSettings.layer))
|
|
81
|
+
.then(function() {
|
|
82
|
+
return checkFlexEnabled(mOptions.rootControl);
|
|
83
|
+
})
|
|
84
|
+
.then(function() {
|
|
85
|
+
oRta = new RuntimeAuthoring(mOptions);
|
|
64
86
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
87
|
+
if (onStart) {
|
|
88
|
+
oRta.attachEvent("start", onStart);
|
|
89
|
+
}
|
|
90
|
+
if (onFailed) {
|
|
91
|
+
oRta.attachEvent("failed", onFailed);
|
|
92
|
+
}
|
|
93
|
+
var fnOnStop = onStop || function() {
|
|
94
|
+
oRta.destroy();
|
|
95
|
+
};
|
|
96
|
+
oRta.attachEvent("stop", fnOnStop);
|
|
75
97
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
98
|
+
if (loadPlugins) {
|
|
99
|
+
return loadPlugins(oRta);
|
|
100
|
+
}
|
|
101
|
+
})
|
|
102
|
+
.then(function() {
|
|
103
|
+
return oRta.start();
|
|
104
|
+
})
|
|
105
|
+
.then(function() {
|
|
106
|
+
if (mOptions.flexSettings.layer === "CUSTOMER") {
|
|
107
|
+
var mPropertyBag = {
|
|
108
|
+
oComponent: mOptions.rootControl,
|
|
109
|
+
selector: mOptions.rootControl,
|
|
110
|
+
invalidateCache: false,
|
|
111
|
+
includeVariants: true,
|
|
112
|
+
includeCtrlVariants: true,
|
|
113
|
+
currentLayer: Layer.CUSTOMER
|
|
114
|
+
};
|
|
93
115
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
116
|
+
PersistenceWriteAPI.getChangesWarning(mPropertyBag)
|
|
117
|
+
.then(function(oWarningMessage) {
|
|
118
|
+
if (oWarningMessage.showWarning) {
|
|
119
|
+
var oRtaResourceBundle = sap.ui.getCore().getLibraryResourceBundle("sap.ui.rta");
|
|
120
|
+
var oMessageProps = oWarningMessage.warningType === "mixedChangesWarning"
|
|
121
|
+
? {
|
|
122
|
+
text: "MSG_ADAPTATION_STARTER_MIXED_CHANGES_WARNING",
|
|
123
|
+
title: "TIT_ADAPTATION_STARTER_MIXED_CHANGES_TITLE"
|
|
124
|
+
}
|
|
125
|
+
: {
|
|
126
|
+
text: "MSG_ADAPTATION_STARTER_NO_CHANGES_IN_P_WARNING",
|
|
127
|
+
title: "TIT_ADAPTATION_STARTER_NO_CHANGES_IN_P_TITLE"
|
|
128
|
+
};
|
|
107
129
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
130
|
+
showMessageBox(
|
|
131
|
+
oRtaResourceBundle.getText(oMessageProps.text),
|
|
132
|
+
{
|
|
133
|
+
title: oRtaResourceBundle.getText(oMessageProps.title)
|
|
134
|
+
},
|
|
135
|
+
"warning"
|
|
136
|
+
);
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
return oRta;
|
|
141
|
+
})
|
|
142
|
+
.catch(function(vError) {
|
|
143
|
+
if (vError !== "Reload triggered") {
|
|
144
|
+
Log.error("UI Adaptation could not be started", vError.message);
|
|
145
|
+
}
|
|
146
|
+
throw vError;
|
|
147
|
+
});
|
|
126
148
|
}
|
|
127
149
|
return adaptationStarter;
|
|
128
150
|
});
|
|
@@ -48,7 +48,7 @@ sap.ui.define([
|
|
|
48
48
|
* @alias sap.ui.rta.util.changeVisualization.ChangeIndicator
|
|
49
49
|
* @author SAP SE
|
|
50
50
|
* @since 1.84.0
|
|
51
|
-
* @version 1.
|
|
51
|
+
* @version 1.102.1
|
|
52
52
|
* @private
|
|
53
53
|
*/
|
|
54
54
|
var ChangeIndicator = Control.extend("sap.ui.rta.util.changeVisualization.ChangeIndicator", {
|
|
@@ -142,6 +142,9 @@ sap.ui.define([
|
|
|
142
142
|
|
|
143
143
|
this._fnHoverTrue = this._toggleHoverStyleClasses.bind(this, true);
|
|
144
144
|
this._fnHoverFalse = this._toggleHoverStyleClasses.bind(this, false);
|
|
145
|
+
// is needed to prevent that multiple events listeners are attached
|
|
146
|
+
// to the same overlay because setVisible is called multiple times
|
|
147
|
+
this._bEventAttachedToElement = false;
|
|
145
148
|
}
|
|
146
149
|
});
|
|
147
150
|
|
|
@@ -175,10 +178,13 @@ sap.ui.define([
|
|
|
175
178
|
var oOverlay = Core.byId(this.getOverlayId());
|
|
176
179
|
// needed because the change indicator cleanup is only triggered on save and exit
|
|
177
180
|
if (oOverlay) {
|
|
178
|
-
if (bVisible) {
|
|
181
|
+
if (bVisible && !this._bEventAttachedToElement) {
|
|
179
182
|
handleBrowserEventsOnElement.call(this, oOverlay, "attachBrowserEvent");
|
|
180
|
-
|
|
183
|
+
this._bEventAttachedToElement = true;
|
|
184
|
+
}
|
|
185
|
+
if (!bVisible) {
|
|
181
186
|
handleBrowserEventsOnElement.call(this, oOverlay, "detachBrowserEvent");
|
|
187
|
+
this._bEventAttachedToElement = false;
|
|
182
188
|
if (this.getAggregation("_popover")) {
|
|
183
189
|
this.getAggregation("_popover").destroy();
|
|
184
190
|
}
|
|
@@ -276,10 +282,11 @@ sap.ui.define([
|
|
|
276
282
|
return mPayload;
|
|
277
283
|
}, {});
|
|
278
284
|
|
|
285
|
+
var mPropertyBag = { appComponent: FlUtils.getAppComponentForControl(oAffectedElement) };
|
|
279
286
|
var oOverlay = Core.byId(this.getOverlayId());
|
|
280
287
|
var sElementLabel = oOverlay.getDesignTimeMetadata().getLabel(oAffectedElement);
|
|
281
288
|
var oVisualizationUtil = getVisualizationCategory(mChangeInformation.commandName);
|
|
282
|
-
var oDescription = oVisualizationUtil && oVisualizationUtil.getDescription(mPayload, sElementLabel);
|
|
289
|
+
var oDescription = oVisualizationUtil && oVisualizationUtil.getDescription(mPayload, sElementLabel, mPropertyBag);
|
|
283
290
|
var oRtaResourceBundle = Core.getLibraryResourceBundle("sap.ui.rta");
|
|
284
291
|
sElementLabel = sElementLabel && "'" + sElementLabel + "'";
|
|
285
292
|
var sShortenedElementLabel = ChangeVisualizationUtils.shortenString(sElementLabel);
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<core:FragmentDefinition
|
|
2
|
+
xmlns:core="sap.ui.core"
|
|
3
|
+
xmlns="sap.m"
|
|
4
|
+
xmlns:l="sap.ui.layout">
|
|
5
|
+
<Popover
|
|
6
|
+
showHeader="false"
|
|
7
|
+
placement="Bottom">
|
|
8
|
+
<MessageStrip
|
|
9
|
+
text="{visualizationModel>/popupInfoMessage}"
|
|
10
|
+
type="Information"
|
|
11
|
+
showIcon="true"
|
|
12
|
+
visible="{= ${visualizationModel>/hiddenChanges}.length > 0 }">
|
|
13
|
+
<link>
|
|
14
|
+
<Link text="{i18n>BUT_CHANGEVISUALIZATION_LEARNMORE}"
|
|
15
|
+
target="_blank"
|
|
16
|
+
href="https://ui5.sap.com/1.101.0/#/topic/35274280504f42cd87cc4fd3d403ca91.html#loio35274280504f42cd87cc4fd3d403ca91/visualization" />
|
|
17
|
+
</link>
|
|
18
|
+
</MessageStrip>
|
|
19
|
+
<List
|
|
20
|
+
class="sapUiRtaChangesList"
|
|
21
|
+
items="{visualizationModel>/commandCategories/}">
|
|
22
|
+
<StandardListItem
|
|
23
|
+
title="{visualizationModel>title}"
|
|
24
|
+
counter="{visualizationModel>count}"
|
|
25
|
+
type="{= ${visualizationModel>count} > 0 ? 'Active' : 'Inactive'}"
|
|
26
|
+
icon="{visualizationModel>icon}"
|
|
27
|
+
press=".onCommandCategorySelection"/>
|
|
28
|
+
</List>
|
|
29
|
+
</Popover>
|
|
30
|
+
</core:FragmentDefinition>
|
|
@@ -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.102.1
|
|
29
29
|
* @private
|
|
30
30
|
*/
|
|
31
31
|
var ChangeIndicatorRegistry = ManagedObject.extend("sap.ui.rta.util.changeVisualization.ChangeIndicatorRegistry", {
|
|
@@ -168,11 +168,6 @@ sap.ui.define([
|
|
|
168
168
|
}
|
|
169
169
|
};
|
|
170
170
|
|
|
171
|
-
// Only register changes that are valid for visualization
|
|
172
|
-
if (oNewChangeInformation.commandCategory === undefined) {
|
|
173
|
-
return;
|
|
174
|
-
}
|
|
175
|
-
|
|
176
171
|
this._oChanges[oChange.getId()] = oNewChangeInformation;
|
|
177
172
|
};
|
|
178
173
|
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
sap.ui.define([
|
|
8
|
+
"sap/ui/core/Fragment",
|
|
8
9
|
"sap/base/util/restricted/_difference",
|
|
9
10
|
"sap/base/util/deepEqual",
|
|
10
11
|
"sap/base/Log",
|
|
@@ -22,6 +23,7 @@ sap.ui.define([
|
|
|
22
23
|
"sap/ui/rta/util/changeVisualization/ChangeIndicator",
|
|
23
24
|
"sap/ui/rta/util/changeVisualization/ChangeIndicatorRegistry"
|
|
24
25
|
], function(
|
|
26
|
+
Fragment,
|
|
25
27
|
difference,
|
|
26
28
|
deepEqual,
|
|
27
29
|
Log,
|
|
@@ -77,8 +79,9 @@ sap.ui.define([
|
|
|
77
79
|
* When clicking anywhere on the application, the menu must close
|
|
78
80
|
*/
|
|
79
81
|
function _onClick() {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
+
var oPopover = this.getPopover();
|
|
83
|
+
if (oPopover && oPopover.isOpen()) {
|
|
84
|
+
oPopover.close();
|
|
82
85
|
}
|
|
83
86
|
}
|
|
84
87
|
|
|
@@ -90,7 +93,7 @@ sap.ui.define([
|
|
|
90
93
|
* @alias sap.ui.rta.util.changeVisualization.ChangeVisualization
|
|
91
94
|
* @author SAP SE
|
|
92
95
|
* @since 1.84.0
|
|
93
|
-
* @version 1.
|
|
96
|
+
* @version 1.102.1
|
|
94
97
|
* @private
|
|
95
98
|
*/
|
|
96
99
|
var ChangeVisualization = Control.extend("sap.ui.rta.util.changeVisualization.ChangeVisualization", {
|
|
@@ -110,6 +113,12 @@ sap.ui.define([
|
|
|
110
113
|
type: "boolean",
|
|
111
114
|
defaultValue: false
|
|
112
115
|
}
|
|
116
|
+
},
|
|
117
|
+
aggregations: {
|
|
118
|
+
popover: {
|
|
119
|
+
type: "sap.m.Popover",
|
|
120
|
+
multiple: false
|
|
121
|
+
}
|
|
113
122
|
}
|
|
114
123
|
},
|
|
115
124
|
constructor: function() {
|
|
@@ -161,9 +170,7 @@ sap.ui.define([
|
|
|
161
170
|
|
|
162
171
|
ChangeVisualization.prototype.exit = function() {
|
|
163
172
|
this._oChangeIndicatorRegistry.destroy();
|
|
164
|
-
|
|
165
|
-
this.oRootOverlay.getDomRef().removeEventListener("click", this._fnOnClickHandler, { capture: true });
|
|
166
|
-
}
|
|
173
|
+
this._toggleRootOverlayClickHandler(false);
|
|
167
174
|
};
|
|
168
175
|
|
|
169
176
|
ChangeVisualization.prototype._reset = function() {
|
|
@@ -171,12 +178,25 @@ sap.ui.define([
|
|
|
171
178
|
};
|
|
172
179
|
|
|
173
180
|
ChangeVisualization.prototype._updateVisualizationModelMenuData = function() {
|
|
181
|
+
var aVisualizedChanges = this._oChangeVisualizationModel.getData().visualizedChanges;
|
|
182
|
+
var aHiddenChanges = [];
|
|
183
|
+
var aRegisteredChanges = this._oChangeIndicatorRegistry.getChanges();
|
|
184
|
+
aRegisteredChanges.forEach(function(oChange) {
|
|
185
|
+
var oVisualizedChange = aVisualizedChanges.find(function(oVisualizedChange) {
|
|
186
|
+
return oChange.change.getId() === oVisualizedChange.id;
|
|
187
|
+
});
|
|
188
|
+
if (!oVisualizedChange && !oChange.dependent) {
|
|
189
|
+
aHiddenChanges.push(oChange);
|
|
190
|
+
}
|
|
191
|
+
});
|
|
174
192
|
var aCommandData = Object.keys(VALID_COMMANDS).map(function(sCommandCategoryName) {
|
|
175
|
-
var sTitle = this._getCommandCategoryLabel(
|
|
176
|
-
|
|
193
|
+
var sTitle = this._getCommandCategoryLabel(
|
|
194
|
+
sCommandCategoryName,
|
|
195
|
+
this._getChangesForCommandCategory(sCommandCategoryName, aVisualizedChanges).length
|
|
196
|
+
);
|
|
177
197
|
return {
|
|
178
198
|
key: sCommandCategoryName,
|
|
179
|
-
count: this._getChangesForCommandCategory(sCommandCategoryName).length,
|
|
199
|
+
count: this._getChangesForCommandCategory(sCommandCategoryName, aVisualizedChanges).length,
|
|
180
200
|
title: sTitle,
|
|
181
201
|
icon: CATEGORY_ICONS[sCommandCategoryName]
|
|
182
202
|
};
|
|
@@ -184,19 +204,23 @@ sap.ui.define([
|
|
|
184
204
|
|
|
185
205
|
aCommandData.unshift({
|
|
186
206
|
key: CATEGORY_ALL,
|
|
187
|
-
count: this._getChangesForCommandCategory(CATEGORY_ALL).length,
|
|
188
|
-
title: this._getCommandCategoryLabel(CATEGORY_ALL, this._getChangesForCommandCategory(CATEGORY_ALL).length),
|
|
207
|
+
count: this._getChangesForCommandCategory(CATEGORY_ALL, aVisualizedChanges).length,
|
|
208
|
+
title: this._getCommandCategoryLabel(CATEGORY_ALL, this._getChangesForCommandCategory(CATEGORY_ALL, aVisualizedChanges).length),
|
|
189
209
|
icon: CATEGORY_ICONS[CATEGORY_ALL]
|
|
190
210
|
});
|
|
191
211
|
|
|
192
212
|
this._updateVisualizationModel({
|
|
193
|
-
commandCategories: aCommandData
|
|
213
|
+
commandCategories: aCommandData,
|
|
214
|
+
hiddenChanges: aHiddenChanges,
|
|
215
|
+
popupInfoMessage: this._oTextBundle.getText(
|
|
216
|
+
"MSG_CHANGEVISUALIZATION_HIDDEN_CHANGES_INFO",
|
|
217
|
+
[aHiddenChanges.length]
|
|
218
|
+
)
|
|
194
219
|
});
|
|
195
220
|
};
|
|
196
221
|
|
|
197
|
-
ChangeVisualization.prototype._getChangesForCommandCategory = function(sCommandCategory) {
|
|
198
|
-
|
|
199
|
-
return aRegisteredChanges.filter(function(oChange) {
|
|
222
|
+
ChangeVisualization.prototype._getChangesForCommandCategory = function(sCommandCategory, aChanges) {
|
|
223
|
+
return aChanges.filter(function(oChange) {
|
|
200
224
|
return sCommandCategory === CATEGORY_ALL
|
|
201
225
|
? oChange.commandCategory !== undefined
|
|
202
226
|
: sCommandCategory === oChange.commandCategory;
|
|
@@ -213,6 +237,35 @@ sap.ui.define([
|
|
|
213
237
|
return this._oTextBundle.getText(sButtonKey);
|
|
214
238
|
};
|
|
215
239
|
|
|
240
|
+
ChangeVisualization.prototype.openChangeCategorySelectionPopover = function(oEvent) {
|
|
241
|
+
if (!this._oToolbarButton) {
|
|
242
|
+
// Event bubbled through the toolbar, get original source
|
|
243
|
+
this._oToolbarButton = sap.ui.getCore().byId(oEvent.getParameter("id"));
|
|
244
|
+
}
|
|
245
|
+
var oPopover = this.getPopover();
|
|
246
|
+
|
|
247
|
+
if (!oPopover) {
|
|
248
|
+
Fragment.load({
|
|
249
|
+
name: "sap.ui.rta.util.changeVisualization.ChangeIndicatorCategorySelection",
|
|
250
|
+
id: this._getComponent().createId("changeVisualization_changesListPopover"),
|
|
251
|
+
controller: this
|
|
252
|
+
})
|
|
253
|
+
.then(function(oPopover) {
|
|
254
|
+
this._oToolbarButton.addDependent(oPopover);
|
|
255
|
+
oPopover.setModel(this._oChangeVisualizationModel, "visualizationModel");
|
|
256
|
+
oPopover.openBy(this._oToolbarButton);
|
|
257
|
+
this.setPopover(oPopover);
|
|
258
|
+
}.bind(this));
|
|
259
|
+
return;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
if (oPopover.isOpen()) {
|
|
263
|
+
oPopover.close();
|
|
264
|
+
} else {
|
|
265
|
+
oPopover.openBy(this._oToolbarButton);
|
|
266
|
+
}
|
|
267
|
+
};
|
|
268
|
+
|
|
216
269
|
/**
|
|
217
270
|
* Sets the selected command category and visualizes all changes for the given category
|
|
218
271
|
*
|
|
@@ -220,14 +273,16 @@ sap.ui.define([
|
|
|
220
273
|
* @returns {Promise} - Promise of category change
|
|
221
274
|
*/
|
|
222
275
|
ChangeVisualization.prototype.onCommandCategorySelection = function(oEvent) {
|
|
223
|
-
var sSelectedCommandCategory = oEvent.
|
|
276
|
+
var sSelectedCommandCategory = oEvent.getSource().getBindingContext("visualizationModel").getObject().key;
|
|
224
277
|
return this._selectCommandCategory(sSelectedCommandCategory);
|
|
225
278
|
};
|
|
226
279
|
|
|
227
280
|
ChangeVisualization.prototype._selectCommandCategory = function(sSelectedCommandCategory) {
|
|
228
281
|
this._sSelectedCommandCategory = sSelectedCommandCategory;
|
|
229
282
|
|
|
230
|
-
var
|
|
283
|
+
var aRegisteredChanges = this._oChangeIndicatorRegistry.getChanges();
|
|
284
|
+
var aRelevantChanges = this._getChangesForCommandCategory(sSelectedCommandCategory, aRegisteredChanges);
|
|
285
|
+
|
|
231
286
|
var sCommandCategoryText = this._getCommandCategoryButton(sSelectedCommandCategory);
|
|
232
287
|
|
|
233
288
|
this._updateVisualizationModel({
|
|
@@ -425,20 +480,24 @@ sap.ui.define([
|
|
|
425
480
|
ChangeVisualization.prototype._updateChangeIndicators = function() {
|
|
426
481
|
var oSelectors = this._oChangeIndicatorRegistry.getChangeIndicatorData();
|
|
427
482
|
var oIndicators = {};
|
|
483
|
+
var aVisualizedChanges = [];
|
|
428
484
|
Object.keys(oSelectors)
|
|
429
485
|
.forEach(function(sSelectorId) {
|
|
430
486
|
var aChanges = oSelectors[sSelectorId];
|
|
431
487
|
var oOverlay = OverlayRegistry.getOverlay(sSelectorId);
|
|
432
|
-
if (!oOverlay || !oOverlay.getDomRef()) {
|
|
488
|
+
if (!oOverlay || !oOverlay.getDomRef() || !oOverlay.isVisible()) {
|
|
433
489
|
// Change is not visible
|
|
434
490
|
return undefined;
|
|
435
491
|
}
|
|
436
|
-
|
|
437
492
|
var oOverlayPosition = oOverlay.getDomRef().getClientRects()[0] || { left: 0, top: 0 };
|
|
493
|
+
var aRelevantChanges = this._filterRelevantChanges(aChanges);
|
|
494
|
+
aRelevantChanges.forEach(function (oChange) {
|
|
495
|
+
aVisualizedChanges.push(oChange);
|
|
496
|
+
});
|
|
438
497
|
oIndicators[sSelectorId] = {
|
|
439
498
|
posX: parseInt(oOverlayPosition.left),
|
|
440
499
|
posY: parseInt(oOverlayPosition.top),
|
|
441
|
-
changes:
|
|
500
|
+
changes: aRelevantChanges
|
|
442
501
|
};
|
|
443
502
|
|
|
444
503
|
if (!this._oChangeIndicatorRegistry.hasChangeIndicator(sSelectorId)) {
|
|
@@ -451,10 +510,14 @@ sap.ui.define([
|
|
|
451
510
|
!deepEqual(
|
|
452
511
|
oIndicators,
|
|
453
512
|
this._oChangeVisualizationModel.getData().content
|
|
513
|
+
) || !deepEqual(
|
|
514
|
+
aVisualizedChanges,
|
|
515
|
+
this._oChangeVisualizationModel.getData().visualizedChanges
|
|
454
516
|
)
|
|
455
517
|
) {
|
|
456
518
|
this._updateVisualizationModel({
|
|
457
|
-
content: oIndicators
|
|
519
|
+
content: oIndicators,
|
|
520
|
+
visualizedChanges: aVisualizedChanges
|
|
458
521
|
});
|
|
459
522
|
}
|
|
460
523
|
};
|
|
@@ -522,6 +585,25 @@ sap.ui.define([
|
|
|
522
585
|
aVisibleIndicators[0].focus();
|
|
523
586
|
};
|
|
524
587
|
|
|
588
|
+
ChangeVisualization.prototype._toggleRootOverlayClickHandler = function (bEnable) {
|
|
589
|
+
var oRootOverlayDomRef = this.oRootOverlay && this.oRootOverlay.getDomRef();
|
|
590
|
+
if (oRootOverlayDomRef) {
|
|
591
|
+
if (bEnable) {
|
|
592
|
+
oRootOverlayDomRef.addEventListener(
|
|
593
|
+
"click",
|
|
594
|
+
this._fnOnClickHandler,
|
|
595
|
+
{ capture: true }
|
|
596
|
+
);
|
|
597
|
+
} else {
|
|
598
|
+
oRootOverlayDomRef.removeEventListener(
|
|
599
|
+
"click",
|
|
600
|
+
this._fnOnClickHandler,
|
|
601
|
+
{ capture: true }
|
|
602
|
+
);
|
|
603
|
+
}
|
|
604
|
+
}
|
|
605
|
+
};
|
|
606
|
+
|
|
525
607
|
/**
|
|
526
608
|
* Triggers the mode switch (on/off).
|
|
527
609
|
*
|
|
@@ -534,14 +616,10 @@ sap.ui.define([
|
|
|
534
616
|
|
|
535
617
|
if (this.getIsActive()) {
|
|
536
618
|
this.setIsActive(false);
|
|
537
|
-
|
|
538
|
-
this.oRootOverlay.getDomRef().removeEventListener("click", this._fnOnClickHandler, { capture: true });
|
|
539
|
-
}
|
|
619
|
+
this._toggleRootOverlayClickHandler(false);
|
|
540
620
|
return;
|
|
541
621
|
}
|
|
542
|
-
|
|
543
|
-
this.oRootOverlay.getDomRef().addEventListener("click", this._fnOnClickHandler, { capture: true });
|
|
544
|
-
}
|
|
622
|
+
this._toggleRootOverlayClickHandler(true);
|
|
545
623
|
if (!this.getRootControlId()) {
|
|
546
624
|
this.setRootControlId(oRootControl);
|
|
547
625
|
}
|