@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
|
@@ -6,87 +6,97 @@
|
|
|
6
6
|
|
|
7
7
|
// Provides class sap.ui.rta.RuntimeAuthoring.
|
|
8
8
|
sap.ui.define([
|
|
9
|
+
"sap/base/strings/capitalize",
|
|
10
|
+
"sap/base/util/UriParameters",
|
|
11
|
+
"sap/base/Log",
|
|
12
|
+
"sap/m/MessageBox",
|
|
13
|
+
"sap/m/MessageToast",
|
|
9
14
|
"sap/ui/thirdparty/jquery",
|
|
10
15
|
"sap/ui/base/ManagedObject",
|
|
11
|
-
"sap/ui/
|
|
12
|
-
"sap/ui/rta/toolbar/Standalone",
|
|
13
|
-
"sap/ui/rta/toolbar/Personalization",
|
|
14
|
-
"sap/ui/rta/toolbar/FioriLike",
|
|
16
|
+
"sap/ui/core/BusyIndicator",
|
|
15
17
|
"sap/ui/dt/DesignTime",
|
|
18
|
+
"sap/ui/dt/DOMUtil",
|
|
19
|
+
"sap/ui/dt/ElementUtil",
|
|
16
20
|
"sap/ui/dt/Overlay",
|
|
17
|
-
"sap/ui/
|
|
18
|
-
"sap/ui/rta/command/LREPSerializer",
|
|
19
|
-
"sap/ui/rta/Utils",
|
|
21
|
+
"sap/ui/dt/OverlayRegistry",
|
|
20
22
|
"sap/ui/dt/Util",
|
|
21
|
-
"sap/ui/
|
|
22
|
-
"sap/ui/fl/
|
|
23
|
-
"sap/ui/fl/
|
|
24
|
-
"sap/ui/fl/
|
|
25
|
-
"sap/ui/fl/Layer",
|
|
26
|
-
"sap/ui/fl/write/api/ReloadInfoAPI",
|
|
23
|
+
"sap/ui/events/KeyCodes",
|
|
24
|
+
"sap/ui/fl/apply/api/FlexRuntimeInfoAPI",
|
|
25
|
+
"sap/ui/fl/apply/api/SmartVariantManagementApplyAPI",
|
|
26
|
+
"sap/ui/fl/write/api/ControlPersonalizationWriteAPI",
|
|
27
27
|
"sap/ui/fl/write/api/FeaturesAPI",
|
|
28
|
-
"sap/ui/fl/write/api/VersionsAPI",
|
|
29
28
|
"sap/ui/fl/write/api/PersistenceWriteAPI",
|
|
30
|
-
"sap/
|
|
31
|
-
"sap/
|
|
32
|
-
"sap/ui/
|
|
33
|
-
"sap/ui/
|
|
34
|
-
"sap/ui/
|
|
35
|
-
"sap/ui/
|
|
29
|
+
"sap/ui/fl/write/api/ReloadInfoAPI",
|
|
30
|
+
"sap/ui/fl/write/api/VersionsAPI",
|
|
31
|
+
"sap/ui/fl/Layer",
|
|
32
|
+
"sap/ui/fl/LayerUtils",
|
|
33
|
+
"sap/ui/fl/library",
|
|
34
|
+
"sap/ui/fl/registry/Settings",
|
|
35
|
+
"sap/ui/fl/Utils",
|
|
36
|
+
"sap/ui/model/json/JSONModel",
|
|
37
|
+
"sap/ui/performance/Measurement",
|
|
36
38
|
"sap/ui/rta/appVariant/Feature",
|
|
37
|
-
"sap/ui/
|
|
39
|
+
"sap/ui/rta/command/BaseCommand",
|
|
40
|
+
"sap/ui/rta/command/LREPSerializer",
|
|
41
|
+
"sap/ui/rta/command/Stack",
|
|
38
42
|
"sap/ui/rta/service/index",
|
|
43
|
+
"sap/ui/rta/toolbar/Fiori",
|
|
44
|
+
"sap/ui/rta/toolbar/FioriLike",
|
|
45
|
+
"sap/ui/rta/toolbar/Personalization",
|
|
46
|
+
"sap/ui/rta/toolbar/Standalone",
|
|
47
|
+
"sap/ui/rta/util/changeVisualization/ChangeVisualization",
|
|
48
|
+
"sap/ui/rta/util/PluginManager",
|
|
49
|
+
"sap/ui/rta/util/PopupManager",
|
|
39
50
|
"sap/ui/rta/util/ServiceEventBus",
|
|
40
|
-
"sap/ui/dt/OverlayRegistry",
|
|
41
|
-
"sap/base/strings/capitalize",
|
|
42
|
-
"sap/base/util/UriParameters",
|
|
43
|
-
"sap/ui/performance/Measurement",
|
|
44
|
-
"sap/base/Log",
|
|
45
|
-
"sap/ui/events/KeyCodes",
|
|
46
|
-
"sap/ui/model/json/JSONModel",
|
|
47
51
|
"sap/ui/rta/util/validateFlexEnabled",
|
|
48
|
-
"sap/ui/rta/
|
|
52
|
+
"sap/ui/rta/Utils",
|
|
53
|
+
"sap/ui/Device"
|
|
49
54
|
], function(
|
|
55
|
+
capitalize,
|
|
56
|
+
UriParameters,
|
|
57
|
+
Log,
|
|
58
|
+
MessageBox,
|
|
59
|
+
MessageToast,
|
|
50
60
|
jQuery,
|
|
51
61
|
ManagedObject,
|
|
52
|
-
|
|
53
|
-
StandaloneToolbar,
|
|
54
|
-
PersonalizationToolbar,
|
|
55
|
-
FioriLikeToolbar,
|
|
62
|
+
BusyIndicator,
|
|
56
63
|
DesignTime,
|
|
64
|
+
DOMUtil,
|
|
65
|
+
ElementUtil,
|
|
57
66
|
Overlay,
|
|
58
|
-
|
|
59
|
-
LREPSerializer,
|
|
60
|
-
Utils,
|
|
67
|
+
OverlayRegistry,
|
|
61
68
|
DtUtil,
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
Layer,
|
|
67
|
-
ReloadInfoAPI,
|
|
69
|
+
KeyCodes,
|
|
70
|
+
FlexRuntimeInfoAPI,
|
|
71
|
+
SmartVariantManagementApplyAPI,
|
|
72
|
+
ControlPersonalizationWriteAPI,
|
|
68
73
|
FeaturesAPI,
|
|
69
|
-
VersionsAPI,
|
|
70
74
|
PersistenceWriteAPI,
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
75
|
+
ReloadInfoAPI,
|
|
76
|
+
VersionsAPI,
|
|
77
|
+
Layer,
|
|
78
|
+
LayerUtils,
|
|
79
|
+
flexLibrary,
|
|
80
|
+
Settings,
|
|
81
|
+
FlexUtils,
|
|
82
|
+
JSONModel,
|
|
83
|
+
Measurement,
|
|
77
84
|
RtaAppVariantFeature,
|
|
78
|
-
|
|
85
|
+
BaseCommand,
|
|
86
|
+
LREPSerializer,
|
|
87
|
+
CommandStack,
|
|
79
88
|
ServicesIndex,
|
|
89
|
+
FioriToolbar,
|
|
90
|
+
FioriLikeToolbar,
|
|
91
|
+
PersonalizationToolbar,
|
|
92
|
+
StandaloneToolbar,
|
|
93
|
+
ChangeVisualization,
|
|
94
|
+
PluginManager,
|
|
95
|
+
PopupManager,
|
|
80
96
|
ServiceEventBus,
|
|
81
|
-
OverlayRegistry,
|
|
82
|
-
capitalize,
|
|
83
|
-
UriParameters,
|
|
84
|
-
Measurement,
|
|
85
|
-
Log,
|
|
86
|
-
KeyCodes,
|
|
87
|
-
JSONModel,
|
|
88
97
|
validateFlexEnabled,
|
|
89
|
-
|
|
98
|
+
Utils,
|
|
99
|
+
Device
|
|
90
100
|
) {
|
|
91
101
|
"use strict";
|
|
92
102
|
|
|
@@ -104,7 +114,7 @@ sap.ui.define([
|
|
|
104
114
|
* @class The runtime authoring allows to adapt the fields of a running application.
|
|
105
115
|
* @extends sap.ui.base.ManagedObject
|
|
106
116
|
* @author SAP SE
|
|
107
|
-
* @version 1.
|
|
117
|
+
* @version 1.100.0
|
|
108
118
|
* @constructor
|
|
109
119
|
* @private
|
|
110
120
|
* @since 1.30
|
|
@@ -215,6 +225,7 @@ sap.ui.define([
|
|
|
215
225
|
_sAppTitle: null,
|
|
216
226
|
_dependents: null,
|
|
217
227
|
_sStatus: STOPPED,
|
|
228
|
+
_bNavigationModeWarningShown: false,
|
|
218
229
|
constructor: function() {
|
|
219
230
|
// call parent constructor
|
|
220
231
|
ManagedObject.apply(this, arguments);
|
|
@@ -223,6 +234,7 @@ sap.ui.define([
|
|
|
223
234
|
this._mServices = {};
|
|
224
235
|
this._mCustomServicesDictinary = {};
|
|
225
236
|
this._mUShellServices = {};
|
|
237
|
+
this._pElementModified = Promise.resolve();
|
|
226
238
|
|
|
227
239
|
this.addDependent(new PluginManager(), "pluginManager");
|
|
228
240
|
this.addDependent(new PopupManager(), "popupManager");
|
|
@@ -239,10 +251,6 @@ sap.ui.define([
|
|
|
239
251
|
this.startService("receiver");
|
|
240
252
|
}
|
|
241
253
|
|
|
242
|
-
if (this._shouldValidateFlexEnabled()) {
|
|
243
|
-
this.attachEvent("start", validateFlexEnabled.bind(null, this));
|
|
244
|
-
}
|
|
245
|
-
|
|
246
254
|
this._loadUShellServicesPromise = FlexUtils.getUShellServices(["URLParsing", "AppLifeCycle", "CrossApplicationNavigation"])
|
|
247
255
|
.then(function (mUShellServices) {
|
|
248
256
|
this._mUShellServices = mUShellServices;
|
|
@@ -256,15 +264,11 @@ sap.ui.define([
|
|
|
256
264
|
});
|
|
257
265
|
|
|
258
266
|
RuntimeAuthoring.prototype._shouldValidateFlexEnabled = function () {
|
|
259
|
-
var
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
bShouldValidateFlexEnabled = sUriParam !== "true";
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
return bShouldValidateFlexEnabled;
|
|
267
|
+
var sUriParam = UriParameters.fromQuery(window.location.search).get("sap-ui-rta-skip-flex-validation");
|
|
268
|
+
return Settings.getInstance()
|
|
269
|
+
.then(function (oSettings) {
|
|
270
|
+
return !oSettings.isCustomerSystem() && sUriParam !== "true";
|
|
271
|
+
});
|
|
268
272
|
};
|
|
269
273
|
|
|
270
274
|
RuntimeAuthoring.prototype.addDependent = function (oObject, sName, bCreateGetter) {
|
|
@@ -326,7 +330,7 @@ sap.ui.define([
|
|
|
326
330
|
|
|
327
331
|
/**
|
|
328
332
|
* Getter method for plugins.
|
|
329
|
-
* @returns {
|
|
333
|
+
* @returns {Object<string, sap.ui.rta.plugin.Plugin>} map with plugins
|
|
330
334
|
*/
|
|
331
335
|
RuntimeAuthoring.prototype.getPlugins = function () {
|
|
332
336
|
return this.getPluginManager
|
|
@@ -354,12 +358,12 @@ sap.ui.define([
|
|
|
354
358
|
* Setter for flexSettings. Checks the Uri for parameters that override the layer.
|
|
355
359
|
* builds the rootNamespace and namespace parameters from the other parameters
|
|
356
360
|
*
|
|
357
|
-
* @param {
|
|
358
|
-
* @param {
|
|
359
|
-
* @param {
|
|
360
|
-
* @param {
|
|
361
|
-
* @param {
|
|
362
|
-
* @param {
|
|
361
|
+
* @param {object} [mFlexSettings] property bag
|
|
362
|
+
* @param {string} [mFlexSettings.layer] The Layer in which RTA should be started. Default: "CUSTOMER"
|
|
363
|
+
* @param {boolean} [mFlexSettings.developerMode] Whether RTA is started in DeveloperMode Mode. Whether RTA is started in DeveloperMode Mode
|
|
364
|
+
* @param {string} [mFlexSettings.baseId] base ID of the app
|
|
365
|
+
* @param {string} [mFlexSettings.projectId] project ID
|
|
366
|
+
* @param {string} [mFlexSettings.scenario] Key representing the current scenario
|
|
363
367
|
*/
|
|
364
368
|
RuntimeAuthoring.prototype.setFlexSettings = function(mFlexSettings) {
|
|
365
369
|
// Check URI-parameters for sap-ui-layer
|
|
@@ -385,7 +389,7 @@ sap.ui.define([
|
|
|
385
389
|
/**
|
|
386
390
|
* Checks the uri parameters for "sap-ui-layer" and returns either the current layer or the layer from the uri parameter, if there is one
|
|
387
391
|
*
|
|
388
|
-
* @returns {
|
|
392
|
+
* @returns {string} the layer after checking the uri parameters
|
|
389
393
|
* @private
|
|
390
394
|
*/
|
|
391
395
|
RuntimeAuthoring.prototype.getLayer = function () {
|
|
@@ -414,6 +418,15 @@ sap.ui.define([
|
|
|
414
418
|
}).then(this._setVersionsModel.bind(this));
|
|
415
419
|
};
|
|
416
420
|
|
|
421
|
+
RuntimeAuthoring.prototype._onPersonalizationChangeCreation = function() {
|
|
422
|
+
if (this.getMode() === "navigation" && !this._bNavigationModeWarningShown) {
|
|
423
|
+
this._showMessageToast("MSG_NAVIGATION_MODE_CHANGES_WARNING", {
|
|
424
|
+
duration: 5000
|
|
425
|
+
});
|
|
426
|
+
this._bNavigationModeWarningShown = true;
|
|
427
|
+
}
|
|
428
|
+
};
|
|
429
|
+
|
|
417
430
|
function addOrRemoveStyleClass(oRootControl, bAdd) {
|
|
418
431
|
if (oRootControl.isA("sap.ui.core.UIComponent")) {
|
|
419
432
|
oRootControl = oRootControl.getRootControl();
|
|
@@ -470,6 +483,9 @@ sap.ui.define([
|
|
|
470
483
|
scope: this.getMetadataScope(),
|
|
471
484
|
plugins: aPlugins
|
|
472
485
|
});
|
|
486
|
+
|
|
487
|
+
addOrRemoveStyleClass(this.getRootControlInstance(), true);
|
|
488
|
+
|
|
473
489
|
//add root control is triggering overlay creation, so we need to wait for the scope to be set.
|
|
474
490
|
this._oDesignTime.addRootElement(this._oRootControl);
|
|
475
491
|
|
|
@@ -497,6 +513,7 @@ sap.ui.define([
|
|
|
497
513
|
// Register function for checking unsaved before leaving RTA
|
|
498
514
|
this._oldUnloadHandler = window.onbeforeunload;
|
|
499
515
|
window.onbeforeunload = this._onUnload.bind(this);
|
|
516
|
+
return undefined;
|
|
500
517
|
}.bind(this))
|
|
501
518
|
.then(function () {
|
|
502
519
|
if (this.getShowToolbars()) {
|
|
@@ -504,6 +521,7 @@ sap.ui.define([
|
|
|
504
521
|
return this._getToolbarButtonsVisibility()
|
|
505
522
|
.then(this._createToolsMenu.bind(this));
|
|
506
523
|
}
|
|
524
|
+
return undefined;
|
|
507
525
|
}.bind(this))
|
|
508
526
|
// this is needed to initially check if undo is available, e.g. when the stack gets initialized with changes
|
|
509
527
|
.then(this._onStackModified.bind(this))
|
|
@@ -522,6 +540,7 @@ sap.ui.define([
|
|
|
522
540
|
// the show() method of the toolbar relies on this RTA instance being set on the PopupManager
|
|
523
541
|
return this.getToolbar().show();
|
|
524
542
|
}
|
|
543
|
+
return undefined;
|
|
525
544
|
}.bind(this))
|
|
526
545
|
.then(function () {
|
|
527
546
|
if (Device.browser.name === "ff") {
|
|
@@ -533,10 +552,17 @@ sap.ui.define([
|
|
|
533
552
|
.then(function() {
|
|
534
553
|
this.fnKeyDown = this._onKeyDown.bind(this);
|
|
535
554
|
jQuery(document).on("keydown", this.fnKeyDown);
|
|
536
|
-
|
|
537
|
-
|
|
555
|
+
this.fnOnPersonalizationChangeCreation = this._onPersonalizationChangeCreation.bind(this);
|
|
556
|
+
ControlPersonalizationWriteAPI.attachChangeCreation(
|
|
557
|
+
this.getRootControlInstance(),
|
|
558
|
+
this.fnOnPersonalizationChangeCreation
|
|
559
|
+
);
|
|
538
560
|
}.bind(this))
|
|
539
|
-
.then(
|
|
561
|
+
.then(this._shouldValidateFlexEnabled)
|
|
562
|
+
.then(function (bShouldValidateFlexEnabled) {
|
|
563
|
+
if (bShouldValidateFlexEnabled) {
|
|
564
|
+
validateFlexEnabled(this);
|
|
565
|
+
}
|
|
540
566
|
this._sStatus = STARTED;
|
|
541
567
|
this.fireStart({
|
|
542
568
|
editablePluginsCount: this.getPluginManager().getEditableOverlaysCount()
|
|
@@ -552,8 +578,10 @@ sap.ui.define([
|
|
|
552
578
|
this.destroy();
|
|
553
579
|
return Promise.reject(vError);
|
|
554
580
|
}
|
|
581
|
+
return undefined;
|
|
555
582
|
}.bind(this));
|
|
556
583
|
}
|
|
584
|
+
return undefined;
|
|
557
585
|
};
|
|
558
586
|
|
|
559
587
|
function _ffContextMenuHandler() {
|
|
@@ -593,7 +621,7 @@ sap.ui.define([
|
|
|
593
621
|
});
|
|
594
622
|
};
|
|
595
623
|
|
|
596
|
-
|
|
624
|
+
function showTechnicalError(vError) {
|
|
597
625
|
BusyIndicator.hide();
|
|
598
626
|
var sErrorMessage = vError.userMessage || vError.stack || vError.message || vError.status || vError;
|
|
599
627
|
var oTextResources = sap.ui.getCore().getLibraryResourceBundle("sap.ui.rta");
|
|
@@ -603,7 +631,7 @@ sap.ui.define([
|
|
|
603
631
|
MessageBox.error(sMsg, {
|
|
604
632
|
styleClass: Utils.getRtaStyleClassName()
|
|
605
633
|
});
|
|
606
|
-
}
|
|
634
|
+
}
|
|
607
635
|
|
|
608
636
|
/**
|
|
609
637
|
* @override
|
|
@@ -709,6 +737,7 @@ sap.ui.define([
|
|
|
709
737
|
if (this.getShowToolbars() && this.getToolbar && this.getToolbar()) {
|
|
710
738
|
return this.getToolbar()[sName](vValue);
|
|
711
739
|
}
|
|
740
|
+
return undefined;
|
|
712
741
|
};
|
|
713
742
|
|
|
714
743
|
/**
|
|
@@ -723,17 +752,25 @@ sap.ui.define([
|
|
|
723
752
|
return [];
|
|
724
753
|
};
|
|
725
754
|
|
|
755
|
+
function waitForPendingActions() {
|
|
756
|
+
return Promise.resolve(this._oDesignTime && this._oDesignTime.waitForBusyPlugins())
|
|
757
|
+
.then(function() {
|
|
758
|
+
return this._pElementModified;
|
|
759
|
+
}.bind(this));
|
|
760
|
+
}
|
|
761
|
+
|
|
726
762
|
/**
|
|
727
|
-
*
|
|
763
|
+
* Stops Runtime Authoring
|
|
728
764
|
*
|
|
729
765
|
* @public
|
|
730
|
-
* @param {boolean} bDontSaveChanges -
|
|
731
|
-
* @param {boolean} bSkipRestart -
|
|
732
|
-
* @returns {Promise}
|
|
766
|
+
* @param {boolean} bDontSaveChanges - Stop RTA with or w/o saving changes
|
|
767
|
+
* @param {boolean} bSkipRestart - Stop RTA with or w/o checking if a reload is needed to apply e.g. personalization/app descriptor changes
|
|
768
|
+
* @returns {Promise} Resolves with undefined
|
|
733
769
|
*/
|
|
734
770
|
RuntimeAuthoring.prototype.stop = function(bDontSaveChanges, bSkipRestart) {
|
|
735
771
|
this._checkToolbarAndExecuteFunction("setBusy", true);
|
|
736
|
-
return
|
|
772
|
+
return waitForPendingActions.call(this)
|
|
773
|
+
.then(this._handleReloadOnExit.bind(this, bSkipRestart))
|
|
737
774
|
.then(function(oReloadInfo) {
|
|
738
775
|
return ((bDontSaveChanges) ? Promise.resolve() : this._serializeToLrep(this))
|
|
739
776
|
.then(this._checkToolbarAndExecuteFunction.bind(this, "hide", bDontSaveChanges))
|
|
@@ -745,9 +782,10 @@ sap.ui.define([
|
|
|
745
782
|
oReloadInfo.triggerHardReload = (oReloadInfo.reloadMethod === this._RELOAD.RELOAD_PAGE); // StandAlone or AppDescriptorChanges case
|
|
746
783
|
return this._handleUrlParameterOnExit(oReloadInfo);
|
|
747
784
|
}
|
|
785
|
+
return undefined;
|
|
748
786
|
}.bind(this));
|
|
749
787
|
}.bind(this))
|
|
750
|
-
.catch(
|
|
788
|
+
.catch(showTechnicalError)
|
|
751
789
|
.then(function () {
|
|
752
790
|
this._checkToolbarAndExecuteFunction("setBusy", false);
|
|
753
791
|
this._sStatus = STOPPED;
|
|
@@ -837,10 +875,12 @@ sap.ui.define([
|
|
|
837
875
|
return this._getTextResources().getText("MSG_UNSAVED_CHANGES");
|
|
838
876
|
}
|
|
839
877
|
window.onbeforeunload = this._oldUnloadHandler;
|
|
878
|
+
return undefined;
|
|
840
879
|
};
|
|
841
880
|
|
|
842
881
|
RuntimeAuthoring.prototype._serializeAndSave = function() {
|
|
843
|
-
|
|
882
|
+
// Save changes on the current layer and discard dirty changes on other layers
|
|
883
|
+
return this._oSerializer.saveCommands(this._oVersionsModel.getProperty("/versioningEnabled"), this.getLayer(), true);
|
|
844
884
|
};
|
|
845
885
|
|
|
846
886
|
RuntimeAuthoring.prototype._serializeToLrep = function() {
|
|
@@ -935,16 +975,16 @@ sap.ui.define([
|
|
|
935
975
|
};
|
|
936
976
|
|
|
937
977
|
RuntimeAuthoring.prototype._onSwitchVersion = function (oEvent) {
|
|
938
|
-
var
|
|
939
|
-
var
|
|
978
|
+
var sVersion = oEvent.getParameter("version");
|
|
979
|
+
var sDisplayedVersion = this._oVersionsModel.getProperty("/displayedVersion");
|
|
940
980
|
|
|
941
|
-
if (
|
|
981
|
+
if (sVersion === sDisplayedVersion) {
|
|
942
982
|
// already displayed version needs no switch
|
|
943
983
|
return;
|
|
944
984
|
}
|
|
945
985
|
|
|
946
986
|
if (this.canUndo()) {
|
|
947
|
-
this.
|
|
987
|
+
this._sSwitchToVersion = sVersion;
|
|
948
988
|
Utils.showMessageBox("warning", "MSG_SWITCH_VERSION_DIALOG", {
|
|
949
989
|
titleKey: "TIT_SWITCH_VERSION_DIALOG",
|
|
950
990
|
actions: [MessageBox.Action.YES, MessageBox.Action.NO, MessageBox.Action.CANCEL],
|
|
@@ -952,22 +992,20 @@ sap.ui.define([
|
|
|
952
992
|
}).then(function (sAction) {
|
|
953
993
|
if (sAction === MessageBox.Action.YES) {
|
|
954
994
|
this._serializeToLrep(this)
|
|
955
|
-
.then(this._switchVersion.bind(this, this.
|
|
995
|
+
.then(this._switchVersion.bind(this, this._sSwitchToVersion));
|
|
956
996
|
} else if (sAction === MessageBox.Action.NO) {
|
|
957
997
|
// avoids the data loss popup; a reload is triggered later and will destroy RTA & the command stack
|
|
958
998
|
this.getCommandStack().removeAllCommands(true);
|
|
959
|
-
this._switchVersion(this.
|
|
999
|
+
this._switchVersion(this._sSwitchToVersion);
|
|
960
1000
|
}
|
|
961
1001
|
return undefined;
|
|
962
1002
|
}.bind(this));
|
|
963
1003
|
return;
|
|
964
1004
|
}
|
|
965
|
-
this._switchVersion(
|
|
1005
|
+
this._switchVersion(sVersion);
|
|
966
1006
|
};
|
|
967
1007
|
|
|
968
|
-
RuntimeAuthoring.prototype._switchVersion = function (
|
|
969
|
-
var sVersion = nVersion.toString();
|
|
970
|
-
|
|
1008
|
+
RuntimeAuthoring.prototype._switchVersion = function (sVersion) {
|
|
971
1009
|
RuntimeAuthoring.enableRestart(this.getLayer(), this.getRootControlInstance());
|
|
972
1010
|
|
|
973
1011
|
if (!FlexUtils.getUshellContainer()) {
|
|
@@ -984,7 +1022,7 @@ sap.ui.define([
|
|
|
984
1022
|
VersionsAPI.loadVersionForApplication({
|
|
985
1023
|
selector: this.getRootControlInstance(),
|
|
986
1024
|
layer: this.getLayer(),
|
|
987
|
-
version:
|
|
1025
|
+
version: sVersion
|
|
988
1026
|
});
|
|
989
1027
|
var aVersionsParameter = mParsedHash.params[sap.ui.fl.Versions.UrlParameter];
|
|
990
1028
|
if (
|
|
@@ -1047,6 +1085,14 @@ sap.ui.define([
|
|
|
1047
1085
|
return oToolbar.onFragmentLoaded().then(function() {
|
|
1048
1086
|
var bSaveAsAvailable = aButtonsVisibility.saveAsAvailable;
|
|
1049
1087
|
var bExtendedOverview = bSaveAsAvailable && RtaAppVariantFeature.isOverviewExtended();
|
|
1088
|
+
var oUriParameters = UriParameters.fromURL(window.location.href);
|
|
1089
|
+
// the "Visualization" tab should not be visible if the "fiori-tools-rta-mode" URL-parameter is set to any value but "false"
|
|
1090
|
+
var bVisualizationButtonVisible;
|
|
1091
|
+
if (oUriParameters.has("fiori-tools-rta-mode") && oUriParameters.get("fiori-tools-rta-mode") !== "false") {
|
|
1092
|
+
bVisualizationButtonVisible = false;
|
|
1093
|
+
} else {
|
|
1094
|
+
bVisualizationButtonVisible = true;
|
|
1095
|
+
}
|
|
1050
1096
|
|
|
1051
1097
|
this._oToolbarControlsModel = new JSONModel({
|
|
1052
1098
|
undoEnabled: false,
|
|
@@ -1062,7 +1108,8 @@ sap.ui.define([
|
|
|
1062
1108
|
saveAsEnabled: false,
|
|
1063
1109
|
manageAppsVisible: bSaveAsAvailable && !bExtendedOverview,
|
|
1064
1110
|
manageAppsEnabled: bSaveAsAvailable && !bExtendedOverview,
|
|
1065
|
-
modeSwitcher: this.getMode()
|
|
1111
|
+
modeSwitcher: this.getMode(),
|
|
1112
|
+
visualizationButtonVisible: bVisualizationButtonVisible
|
|
1066
1113
|
});
|
|
1067
1114
|
|
|
1068
1115
|
if (bSaveAsAvailable) {
|
|
@@ -1073,12 +1120,6 @@ sap.ui.define([
|
|
|
1073
1120
|
}.bind(this));
|
|
1074
1121
|
}
|
|
1075
1122
|
|
|
1076
|
-
/* TODO enable as soon as the code is ready
|
|
1077
|
-
FeaturesAPI.isKeyUserTranslationEnabled(this.getLayer()).then(function(oResult) {
|
|
1078
|
-
this._oToolbarControlsModel.setProperty("/translationVisible", oResult);
|
|
1079
|
-
}.bind(this));
|
|
1080
|
-
*/
|
|
1081
|
-
|
|
1082
1123
|
this.getToolbar().setModel(this._oVersionsModel, "versions");
|
|
1083
1124
|
this.getToolbar().setModel(this._oToolbarControlsModel, "controls");
|
|
1084
1125
|
}.bind(this));
|
|
@@ -1108,6 +1149,13 @@ sap.ui.define([
|
|
|
1108
1149
|
|
|
1109
1150
|
// detach browser events
|
|
1110
1151
|
jQuery(document).off("keydown", this.fnKeyDown);
|
|
1152
|
+
|
|
1153
|
+
if (this.fnOnPersonalizationChangeCreation) {
|
|
1154
|
+
ControlPersonalizationWriteAPI.detachChangeCreation(
|
|
1155
|
+
this.getRootControlInstance(),
|
|
1156
|
+
this.fnOnPersonalizationChangeCreation
|
|
1157
|
+
);
|
|
1158
|
+
}
|
|
1111
1159
|
}
|
|
1112
1160
|
|
|
1113
1161
|
if (this.getRootControlInstance()) {
|
|
@@ -1141,8 +1189,9 @@ sap.ui.define([
|
|
|
1141
1189
|
BusyIndicator.show(500);
|
|
1142
1190
|
return this._serializeToLrep().then(function () {
|
|
1143
1191
|
BusyIndicator.hide();
|
|
1144
|
-
var
|
|
1145
|
-
|
|
1192
|
+
var bVariantByStartupParameter = FlexUtils.isVariantByStartupParameter(this._oRootControl);
|
|
1193
|
+
var bAppVariantRunning = SmartVariantManagementApplyAPI.isApplicationVariant({control: this._oRootControl}) && !bVariantByStartupParameter;
|
|
1194
|
+
return (bAppVariantRunning ? RtaAppVariantFeature.getAppVariantDescriptor(this._oRootControl) : Promise.resolve())
|
|
1146
1195
|
.then(function(oAppVariantDescriptor) {
|
|
1147
1196
|
var aAppVariantDescriptor = [];
|
|
1148
1197
|
if (oAppVariantDescriptor) {
|
|
@@ -1170,7 +1219,7 @@ sap.ui.define([
|
|
|
1170
1219
|
}
|
|
1171
1220
|
}.bind(this));
|
|
1172
1221
|
}.bind(this));
|
|
1173
|
-
}.bind(this))["catch"](
|
|
1222
|
+
}.bind(this))["catch"](showTechnicalError);
|
|
1174
1223
|
};
|
|
1175
1224
|
|
|
1176
1225
|
/**
|
|
@@ -1188,6 +1237,8 @@ sap.ui.define([
|
|
|
1188
1237
|
selector: oSelector,
|
|
1189
1238
|
layer: sLayer
|
|
1190
1239
|
}).then(function () {
|
|
1240
|
+
// avoids the data loss popup; a reload is triggered later and will destroy RTA & the command stack
|
|
1241
|
+
this.getCommandStack().removeAllCommands(true);
|
|
1191
1242
|
ReloadInfoAPI.removeInfoSessionStorage(oSelector);
|
|
1192
1243
|
var oReloadInfo = {
|
|
1193
1244
|
isDraftAvailable: ReloadInfoAPI.hasVersionParameterWithValue({value: sLayer}, this._getUShellService("URLParsing")),
|
|
@@ -1214,13 +1265,14 @@ sap.ui.define([
|
|
|
1214
1265
|
|
|
1215
1266
|
/**
|
|
1216
1267
|
* Shows a message toast.
|
|
1217
|
-
* @param {string} sMessageKey The text key for the message
|
|
1268
|
+
* @param {string} sMessageKey - The text key for the message
|
|
1269
|
+
* @param {object} mOptions - Options for message toast
|
|
1218
1270
|
* @private
|
|
1219
1271
|
*/
|
|
1220
|
-
RuntimeAuthoring.prototype._showMessageToast = function(sMessageKey) {
|
|
1272
|
+
RuntimeAuthoring.prototype._showMessageToast = function(sMessageKey, mOptions) {
|
|
1221
1273
|
var sMessage = this._getTextResources().getText(sMessageKey);
|
|
1222
1274
|
|
|
1223
|
-
MessageToast.show(sMessage);
|
|
1275
|
+
MessageToast.show(sMessage, mOptions || {});
|
|
1224
1276
|
};
|
|
1225
1277
|
|
|
1226
1278
|
/**
|
|
@@ -1228,7 +1280,7 @@ sap.ui.define([
|
|
|
1228
1280
|
*
|
|
1229
1281
|
* @public
|
|
1230
1282
|
* @static
|
|
1231
|
-
* @param {
|
|
1283
|
+
* @param {sap.ui.fl.Layer} sLayer - Active layer
|
|
1232
1284
|
* @returns {boolean} Returns true if restart is needed
|
|
1233
1285
|
*/
|
|
1234
1286
|
RuntimeAuthoring.needsRestart = function(sLayer) {
|
|
@@ -1241,11 +1293,11 @@ sap.ui.define([
|
|
|
1241
1293
|
*
|
|
1242
1294
|
* @public
|
|
1243
1295
|
* @static
|
|
1244
|
-
* @param {
|
|
1245
|
-
* @param {sap.ui.core.Control} oRootControl -
|
|
1296
|
+
* @param {sap.ui.fl.Layer} sLayer - Active layer
|
|
1297
|
+
* @param {sap.ui.core.Control} oRootControl - Root control for which RTA was started
|
|
1246
1298
|
*/
|
|
1247
1299
|
RuntimeAuthoring.enableRestart = function(sLayer, oRootControl) {
|
|
1248
|
-
var sFlexReference =
|
|
1300
|
+
var sFlexReference = FlexRuntimeInfoAPI.getFlexReference({element: oRootControl});
|
|
1249
1301
|
var vParameter = sFlexReference || true;
|
|
1250
1302
|
window.sessionStorage.setItem("sap.ui.rta.restart." + sLayer, vParameter);
|
|
1251
1303
|
};
|
|
@@ -1255,7 +1307,7 @@ sap.ui.define([
|
|
|
1255
1307
|
*
|
|
1256
1308
|
* @public
|
|
1257
1309
|
* @static
|
|
1258
|
-
* @param {
|
|
1310
|
+
* @param {sap.ui.fl.Layer} sLayer - Active layer
|
|
1259
1311
|
*/
|
|
1260
1312
|
RuntimeAuthoring.disableRestart = function(sLayer) {
|
|
1261
1313
|
window.sessionStorage.removeItem("sap.ui.rta.restart." + sLayer);
|
|
@@ -1287,10 +1339,7 @@ sap.ui.define([
|
|
|
1287
1339
|
}).then(function(sAction) {
|
|
1288
1340
|
if (sAction === MessageBox.Action.OK) {
|
|
1289
1341
|
RuntimeAuthoring.enableRestart(sLayer, this.getRootControlInstance());
|
|
1290
|
-
return this._deleteChanges()
|
|
1291
|
-
.then(function () {
|
|
1292
|
-
this.getCommandStack().removeAllCommands();
|
|
1293
|
-
}.bind(this));
|
|
1342
|
+
return this._deleteChanges();
|
|
1294
1343
|
}
|
|
1295
1344
|
return undefined;
|
|
1296
1345
|
}.bind(this));
|
|
@@ -1381,35 +1430,38 @@ sap.ui.define([
|
|
|
1381
1430
|
* @private
|
|
1382
1431
|
*/
|
|
1383
1432
|
RuntimeAuthoring.prototype._handleElementModified = function(oEvent) {
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
var vAction = oEvent.getParameter("action");
|
|
1433
|
+
// events are synchronously reset after the handlers are called
|
|
1434
|
+
var oCommand = oEvent.getParameter("command");
|
|
1387
1435
|
var sNewControlID = oEvent.getParameter("newControlId");
|
|
1436
|
+
var vAction = oEvent.getParameter("action");
|
|
1388
1437
|
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
fnSelect
|
|
1438
|
+
this._pElementModified = this._pElementModified.then(function() {
|
|
1439
|
+
this.getPluginManager().handleStopCutPaste();
|
|
1440
|
+
|
|
1441
|
+
if (oCommand instanceof BaseCommand) {
|
|
1442
|
+
if (sNewControlID) {
|
|
1443
|
+
this._scheduleOnCreated(sNewControlID, function (oElementOverlay) {
|
|
1444
|
+
var oDesignTimeMetadata = oElementOverlay.getDesignTimeMetadata();
|
|
1445
|
+
var fnSelect = oDesignTimeMetadata.getData().select;
|
|
1446
|
+
if (typeof fnSelect === "function") {
|
|
1447
|
+
fnSelect(oElementOverlay.getElement());
|
|
1448
|
+
}
|
|
1449
|
+
});
|
|
1450
|
+
if (vAction) {
|
|
1451
|
+
this._scheduleRenameOnCreatedContainer(vAction, sNewControlID);
|
|
1397
1452
|
}
|
|
1398
|
-
});
|
|
1399
|
-
if (vAction) {
|
|
1400
|
-
this._scheduleRenameOnCreatedContainer(vAction, sNewControlID);
|
|
1401
1453
|
}
|
|
1454
|
+
return this.getCommandStack().pushAndExecute(oCommand)
|
|
1455
|
+
// Error handling when a command fails is done in the Stack
|
|
1456
|
+
.catch(function(oError) {
|
|
1457
|
+
if (oError && oError.message && oError.message.indexOf("The following Change cannot be applied because of a dependency") > -1) {
|
|
1458
|
+
Utils.showMessageBox("error", "MSG_DEPENDENCY_ERROR", {error: oError});
|
|
1459
|
+
}
|
|
1460
|
+
Log.error("sap.ui.rta: " + oError.message);
|
|
1461
|
+
});
|
|
1402
1462
|
}
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
.catch(function(oError) {
|
|
1406
|
-
if (oError && oError.message && oError.message.indexOf("The following Change cannot be applied because of a dependency") > -1) {
|
|
1407
|
-
Utils.showMessageBox("error", "MSG_DEPENDENCY_ERROR", {error: oError});
|
|
1408
|
-
}
|
|
1409
|
-
Log.error("sap.ui.rta: " + oError.message);
|
|
1410
|
-
});
|
|
1411
|
-
}
|
|
1412
|
-
return Promise.resolve();
|
|
1463
|
+
}.bind(this));
|
|
1464
|
+
return this._pElementModified;
|
|
1413
1465
|
};
|
|
1414
1466
|
|
|
1415
1467
|
/**
|
|
@@ -1509,6 +1561,7 @@ sap.ui.define([
|
|
|
1509
1561
|
if (oReloadInfo.triggerHardReload) {
|
|
1510
1562
|
this._reloadPage();
|
|
1511
1563
|
}
|
|
1564
|
+
return undefined;
|
|
1512
1565
|
};
|
|
1513
1566
|
|
|
1514
1567
|
/**
|
|
@@ -1584,6 +1637,7 @@ sap.ui.define([
|
|
|
1584
1637
|
if (oReloadInfo.allContexts) {
|
|
1585
1638
|
return "MSG_RELOAD_WITHOUT_ALL_CONTEXT";
|
|
1586
1639
|
}
|
|
1640
|
+
return undefined;
|
|
1587
1641
|
};
|
|
1588
1642
|
|
|
1589
1643
|
/**
|
|
@@ -1605,7 +1659,7 @@ sap.ui.define([
|
|
|
1605
1659
|
};
|
|
1606
1660
|
|
|
1607
1661
|
RuntimeAuthoring.prototype._triggerReloadOnStart = function(oReloadInfo) {
|
|
1608
|
-
if (this._getUShellService("CrossApplicationNavigation")) {
|
|
1662
|
+
if (this._getUShellService("CrossApplicationNavigation") && this._oVersionsModel.getProperty("/versioningEnabled")) {
|
|
1609
1663
|
if (oReloadInfo.isDraftAvailable) {
|
|
1610
1664
|
// clears FlexState and triggers reloading of the flex data without blocking
|
|
1611
1665
|
VersionsAPI.loadDraftForApplication({
|
|
@@ -1624,24 +1678,25 @@ sap.ui.define([
|
|
|
1624
1678
|
if (!sReason) {
|
|
1625
1679
|
return Promise.resolve();
|
|
1626
1680
|
}
|
|
1627
|
-
|
|
1628
|
-
.
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1681
|
+
// showing messages in visual editor is leading to blocked screen. In this case we should reload without message
|
|
1682
|
+
return (this.getFlexSettings().developerMode ? Promise.resolve() : Utils.showMessageBox("information", sReason))
|
|
1683
|
+
.then(function() {
|
|
1684
|
+
RuntimeAuthoring.enableRestart(oReloadInfo.layer, this.getRootControlInstance());
|
|
1685
|
+
// allContexts do not change the url parameter to trigger a reload
|
|
1686
|
+
if (
|
|
1687
|
+
oReloadInfo.allContexts &&
|
|
1688
|
+
!oReloadInfo.hasHigherLayerChanges &&
|
|
1689
|
+
this._getUShellService("AppLifeCycle")
|
|
1690
|
+
) {
|
|
1691
|
+
this._getUShellService("AppLifeCycle").reloadCurrentApp();
|
|
1692
|
+
}
|
|
1693
|
+
if (FlexUtils.getUshellContainer()) {
|
|
1694
|
+
// clears FlexState and triggers reloading of the flex data without blocking
|
|
1695
|
+
var oParsedHash = ReloadInfoAPI.handleParametersOnStart(oReloadInfo);
|
|
1696
|
+
return this._triggerCrossAppNavigation(oParsedHash);
|
|
1697
|
+
}
|
|
1698
|
+
return this._triggerHardReload(oReloadInfo);
|
|
1699
|
+
}.bind(this));
|
|
1645
1700
|
};
|
|
1646
1701
|
|
|
1647
1702
|
/**
|
|
@@ -1781,6 +1836,7 @@ sap.ui.define([
|
|
|
1781
1836
|
if (ServicesIndex.hasOwnProperty(sName)) {
|
|
1782
1837
|
return ServicesIndex[sName].replace(/\./g, "/");
|
|
1783
1838
|
}
|
|
1839
|
+
return undefined;
|
|
1784
1840
|
}
|
|
1785
1841
|
|
|
1786
1842
|
/**
|