@openui5/sap.ui.rta 1.108.2 → 1.110.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 +16 -16
- package/THIRDPARTY.txt +2 -2
- package/package.json +6 -6
- package/src/sap/ui/rta/.library +2 -2
- package/src/sap/ui/rta/Client.js +2 -2
- package/src/sap/ui/rta/RuntimeAuthoring.js +240 -191
- package/src/sap/ui/rta/Utils.js +40 -19
- package/src/sap/ui/rta/api/startAdaptation.js +1 -1
- package/src/sap/ui/rta/api/startKeyUserAdaptation.js +1 -1
- package/src/sap/ui/rta/appVariant/AppVariantDialog.js +1 -1
- package/src/sap/ui/rta/appVariant/AppVariantManager.js +2 -2
- package/src/sap/ui/rta/appVariant/AppVariantOverviewDialog.js +1 -1
- package/src/sap/ui/rta/appVariant/AppVariantUtils.js +1 -1
- package/src/sap/ui/rta/appVariant/Feature.js +2 -8
- package/src/sap/ui/rta/appVariant/S4HanaCloudBackend.js +1 -1
- package/src/sap/ui/rta/appVariant/Utils.js +1 -1
- package/src/sap/ui/rta/appVariant/manageApps/webapp/Component.js +1 -1
- package/src/sap/ui/rta/appVariant/manageApps/webapp/controller/ManageApps.controller.js +1 -1
- package/src/sap/ui/rta/appVariant/manageApps/webapp/index.js +1 -1
- package/src/sap/ui/rta/appVariant/manageApps/webapp/model/models.js +1 -1
- package/src/sap/ui/rta/command/AddIFrame.js +2 -2
- package/src/sap/ui/rta/command/AddProperty.js +2 -2
- package/src/sap/ui/rta/command/AddXML.js +3 -3
- package/src/sap/ui/rta/command/AddXMLAtExtensionPoint.js +3 -3
- package/src/sap/ui/rta/command/AppDescriptorCommand.js +3 -3
- package/src/sap/ui/rta/command/BaseCommand.js +2 -2
- package/src/sap/ui/rta/command/BindProperty.js +2 -2
- package/src/sap/ui/rta/command/Combine.js +2 -2
- package/src/sap/ui/rta/command/CommandFactory.js +2 -2
- package/src/sap/ui/rta/command/CompositeCommand.js +2 -2
- package/src/sap/ui/rta/command/ControlVariantConfigure.js +5 -3
- package/src/sap/ui/rta/command/ControlVariantSave.js +2 -2
- package/src/sap/ui/rta/command/ControlVariantSaveAs.js +15 -15
- package/src/sap/ui/rta/command/ControlVariantSetTitle.js +11 -4
- package/src/sap/ui/rta/command/ControlVariantSwitch.js +42 -10
- package/src/sap/ui/rta/command/CreateContainer.js +2 -2
- package/src/sap/ui/rta/command/CustomAdd.js +2 -2
- package/src/sap/ui/rta/command/FlexCommand.js +18 -16
- package/src/sap/ui/rta/command/LREPSerializer.js +27 -17
- package/src/sap/ui/rta/command/LocalReset.js +2 -2
- package/src/sap/ui/rta/command/Move.js +2 -2
- package/src/sap/ui/rta/command/Property.js +2 -2
- package/src/sap/ui/rta/command/Remove.js +2 -2
- package/src/sap/ui/rta/command/Rename.js +2 -2
- package/src/sap/ui/rta/command/Resize.js +2 -2
- package/src/sap/ui/rta/command/Reveal.js +2 -2
- package/src/sap/ui/rta/command/Settings.js +2 -2
- package/src/sap/ui/rta/command/Split.js +2 -2
- package/src/sap/ui/rta/command/Stack.js +11 -3
- package/src/sap/ui/rta/command/appDescriptor/AddLibrary.js +2 -2
- package/src/sap/ui/rta/command/compVariant/CompVariantContent.js +2 -3
- package/src/sap/ui/rta/command/compVariant/CompVariantSaveAs.js +2 -2
- package/src/sap/ui/rta/command/compVariant/CompVariantSwitch.js +28 -6
- package/src/sap/ui/rta/command/compVariant/CompVariantUpdate.js +2 -2
- package/src/sap/ui/rta/enablement/TestDelegate.js +1 -1
- package/src/sap/ui/rta/enablement/elementActionTest.js +28 -19
- package/src/sap/ui/rta/library.js +3 -3
- package/src/sap/ui/rta/messagebundle.properties +65 -17
- package/src/sap/ui/rta/messagebundle_ar.properties +32 -8
- package/src/sap/ui/rta/messagebundle_bg.properties +32 -8
- package/src/sap/ui/rta/messagebundle_ca.properties +32 -8
- package/src/sap/ui/rta/messagebundle_cs.properties +32 -8
- package/src/sap/ui/rta/messagebundle_cy.properties +31 -7
- package/src/sap/ui/rta/messagebundle_da.properties +31 -7
- package/src/sap/ui/rta/messagebundle_de.properties +31 -7
- package/src/sap/ui/rta/messagebundle_el.properties +31 -7
- package/src/sap/ui/rta/messagebundle_en.properties +31 -7
- package/src/sap/ui/rta/messagebundle_en_GB.properties +32 -8
- package/src/sap/ui/rta/messagebundle_en_US_sappsd.properties +31 -7
- package/src/sap/ui/rta/messagebundle_en_US_saprigi.properties +31 -7
- package/src/sap/ui/rta/messagebundle_en_US_saptrc.properties +31 -7
- package/src/sap/ui/rta/messagebundle_es.properties +31 -7
- package/src/sap/ui/rta/messagebundle_es_MX.properties +31 -7
- package/src/sap/ui/rta/messagebundle_et.properties +31 -7
- package/src/sap/ui/rta/messagebundle_fi.properties +31 -7
- package/src/sap/ui/rta/messagebundle_fr.properties +31 -7
- package/src/sap/ui/rta/messagebundle_fr_CA.properties +32 -8
- package/src/sap/ui/rta/messagebundle_hi.properties +32 -8
- package/src/sap/ui/rta/messagebundle_hr.properties +32 -8
- package/src/sap/ui/rta/messagebundle_hu.properties +31 -7
- package/src/sap/ui/rta/messagebundle_id.properties +32 -8
- package/src/sap/ui/rta/messagebundle_it.properties +32 -8
- package/src/sap/ui/rta/messagebundle_iw.properties +31 -7
- package/src/sap/ui/rta/messagebundle_ja.properties +32 -8
- package/src/sap/ui/rta/messagebundle_kk.properties +31 -7
- package/src/sap/ui/rta/messagebundle_ko.properties +31 -7
- package/src/sap/ui/rta/messagebundle_lt.properties +31 -7
- package/src/sap/ui/rta/messagebundle_lv.properties +32 -8
- package/src/sap/ui/rta/messagebundle_ms.properties +32 -8
- package/src/sap/ui/rta/messagebundle_nl.properties +31 -7
- package/src/sap/ui/rta/messagebundle_no.properties +32 -8
- package/src/sap/ui/rta/messagebundle_pl.properties +32 -8
- package/src/sap/ui/rta/messagebundle_pt.properties +32 -8
- package/src/sap/ui/rta/messagebundle_pt_PT.properties +31 -7
- package/src/sap/ui/rta/messagebundle_ro.properties +32 -8
- package/src/sap/ui/rta/messagebundle_ru.properties +32 -8
- package/src/sap/ui/rta/messagebundle_sh.properties +31 -7
- package/src/sap/ui/rta/messagebundle_sk.properties +31 -7
- package/src/sap/ui/rta/messagebundle_sl.properties +31 -7
- package/src/sap/ui/rta/messagebundle_sv.properties +32 -8
- package/src/sap/ui/rta/messagebundle_th.properties +33 -9
- package/src/sap/ui/rta/messagebundle_tr.properties +31 -7
- package/src/sap/ui/rta/messagebundle_uk.properties +31 -7
- package/src/sap/ui/rta/messagebundle_vi.properties +32 -8
- package/src/sap/ui/rta/messagebundle_zh_CN.properties +32 -8
- package/src/sap/ui/rta/messagebundle_zh_TW.properties +32 -8
- package/src/sap/ui/rta/plugin/AddXMLAtExtensionPoint.js +2 -2
- package/src/sap/ui/rta/plugin/BaseCreate.js +2 -2
- package/src/sap/ui/rta/plugin/Combine.js +2 -2
- package/src/sap/ui/rta/plugin/CompVariant.js +107 -29
- package/src/sap/ui/rta/plugin/ControlVariant.js +118 -50
- package/src/sap/ui/rta/plugin/CreateContainer.js +2 -2
- package/src/sap/ui/rta/plugin/CutPaste.js +2 -2
- package/src/sap/ui/rta/plugin/DragDrop.js +4 -4
- package/src/sap/ui/rta/plugin/EasyAdd.js +30 -21
- package/src/sap/ui/rta/plugin/EasyRemove.js +13 -11
- package/src/sap/ui/rta/plugin/LocalReset.js +6 -4
- package/src/sap/ui/rta/plugin/Plugin.js +50 -13
- package/src/sap/ui/rta/plugin/RTAElementMover.js +2 -2
- package/src/sap/ui/rta/plugin/Remove.js +2 -2
- package/src/sap/ui/rta/plugin/Rename.js +2 -2
- package/src/sap/ui/rta/plugin/RenameHandler.js +29 -19
- package/src/sap/ui/rta/plugin/Resize.js +2 -2
- package/src/sap/ui/rta/plugin/Selection.js +7 -14
- package/src/sap/ui/rta/plugin/Settings.js +2 -2
- package/src/sap/ui/rta/plugin/Split.js +2 -2
- package/src/sap/ui/rta/plugin/Stretch.js +17 -16
- package/src/sap/ui/rta/plugin/additionalElements/ActionExtractor.js +28 -7
- package/src/sap/ui/rta/plugin/additionalElements/AddElementsDialog.fragment.xml +1 -0
- package/src/sap/ui/rta/plugin/additionalElements/AddElementsDialog.js +2 -2
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsAnalyzer.js +1 -1
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsPlugin.js +5 -5
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsUtils.js +2 -2
- package/src/sap/ui/rta/plugin/additionalElements/CommandBuilder.js +2 -2
- package/src/sap/ui/rta/plugin/iframe/AddIFrame.js +2 -2
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.fragment.xml +7 -2
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.js +2 -2
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialogController.js +4 -4
- package/src/sap/ui/rta/plugin/iframe/urlCleaner.js +1 -1
- package/src/sap/ui/rta/service/Action.js +2 -2
- package/src/sap/ui/rta/service/ControllerExtension.js +3 -3
- package/src/sap/ui/rta/service/Outline.js +2 -2
- package/src/sap/ui/rta/service/Property.js +2 -2
- package/src/sap/ui/rta/service/Receiver.js +1 -1
- package/src/sap/ui/rta/service/Selection.js +2 -2
- package/src/sap/ui/rta/service/SupportTools.js +2 -2
- package/src/sap/ui/rta/service/index.js +1 -1
- package/src/sap/ui/rta/themes/base/Toolbar.adaptation.less +26 -9
- package/src/sap/ui/rta/themes/base/library.source.less +1 -1
- package/src/sap/ui/rta/themes/sap_hcb/library.source.less +1 -1
- package/src/sap/ui/rta/toolbar/ActionsMenu.fragment.xml +82 -0
- package/src/sap/ui/rta/toolbar/Adaptation.fragment.xml +35 -90
- package/src/sap/ui/rta/toolbar/Adaptation.js +83 -27
- package/src/sap/ui/rta/toolbar/AdaptationRenderer.js +1 -1
- package/src/sap/ui/rta/toolbar/Base.js +4 -4
- package/src/sap/ui/rta/toolbar/BaseRenderer.js +1 -1
- package/src/sap/ui/rta/toolbar/Fiori.js +11 -10
- package/src/sap/ui/rta/toolbar/FioriLike.js +2 -2
- package/src/sap/ui/rta/toolbar/OverflowToolbarButton.js +2 -2
- package/src/sap/ui/rta/toolbar/Personalization.js +2 -2
- package/src/sap/ui/rta/toolbar/Standalone.js +2 -2
- package/src/sap/ui/rta/toolbar/contextBased/ManageAdaptations.js +263 -0
- package/src/sap/ui/rta/toolbar/contextBased/ManageAdaptationsDialog.fragment.xml +149 -0
- package/src/sap/ui/rta/toolbar/contextBased/SaveAsAdaptation.js +185 -0
- package/src/sap/ui/rta/toolbar/contextBased/{SaveAsContextBasedAdaptationDialog.fragment.xml → SaveAsAdaptationDialog.fragment.xml} +19 -15
- package/src/sap/ui/rta/toolbar/translation/Translation.js +2 -2
- package/src/sap/ui/rta/toolbar/versioning/Versioning.js +4 -4
- package/src/sap/ui/rta/util/Animation.js +5 -9
- package/src/sap/ui/rta/util/BindingsExtractor.js +1 -1
- package/src/sap/ui/rta/util/PluginManager.js +2 -2
- package/src/sap/ui/rta/util/PopupManager.js +2 -2
- package/src/sap/ui/rta/util/ReloadManager.js +2 -2
- package/src/sap/ui/rta/util/ServiceEventBus.js +2 -2
- package/src/sap/ui/rta/util/StylesLoader.js +1 -1
- package/src/sap/ui/rta/util/UrlParser.js +1 -1
- package/src/sap/ui/rta/util/adaptationStarter.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/ChangeCategories.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicator.js +4 -3
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorCategorySelection.fragment.xml +11 -10
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorPopover.fragment.xml +1 -0
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorRegistry.js +28 -4
- package/src/sap/ui/rta/util/changeVisualization/ChangeStates.js +2 -2
- package/src/sap/ui/rta/util/changeVisualization/ChangeVisualization.js +110 -72
- package/src/sap/ui/rta/util/changeVisualization/ChangeVisualizationUtils.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/commands/CombineVisualization.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/commands/CreateContainerVisualization.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/commands/MoveVisualization.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/commands/RenameVisualization.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/commands/SplitVisualization.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/commands/getCommandVisualization.js +1 -1
- package/src/sap/ui/rta/util/hasStableId.js +1 -1
- package/src/sap/ui/rta/util/showMessageBox.js +1 -1
- package/src/sap/ui/rta/util/validateFlexEnabled.js +1 -1
- package/src/sap/ui/rta/util/validateStableIds.js +1 -1
- package/src/sap/ui/rta/appContexts/AppContextsOverviewDialog.js +0 -76
- package/src/sap/ui/rta/appContexts/Component.js +0 -31
- package/src/sap/ui/rta/appContexts/controller/ManageContexts.controller.js +0 -323
- package/src/sap/ui/rta/appContexts/controller/RestAPIConnector.js +0 -22
- package/src/sap/ui/rta/appContexts/i18n/i18n.properties +0 -47
- package/src/sap/ui/rta/appContexts/i18n/i18n_ar.properties +0 -23
- package/src/sap/ui/rta/appContexts/i18n/i18n_bg.properties +0 -23
- package/src/sap/ui/rta/appContexts/i18n/i18n_ca.properties +0 -23
- package/src/sap/ui/rta/appContexts/i18n/i18n_cs.properties +0 -23
- package/src/sap/ui/rta/appContexts/i18n/i18n_cy.properties +0 -23
- package/src/sap/ui/rta/appContexts/i18n/i18n_da.properties +0 -23
- package/src/sap/ui/rta/appContexts/i18n/i18n_de.properties +0 -23
- package/src/sap/ui/rta/appContexts/i18n/i18n_el.properties +0 -23
- package/src/sap/ui/rta/appContexts/i18n/i18n_en.properties +0 -23
- package/src/sap/ui/rta/appContexts/i18n/i18n_en_GB.properties +0 -23
- package/src/sap/ui/rta/appContexts/i18n/i18n_en_US_sappsd.properties +0 -23
- package/src/sap/ui/rta/appContexts/i18n/i18n_en_US_saprigi.properties +0 -23
- package/src/sap/ui/rta/appContexts/i18n/i18n_en_US_saptrc.properties +0 -23
- package/src/sap/ui/rta/appContexts/i18n/i18n_es.properties +0 -23
- package/src/sap/ui/rta/appContexts/i18n/i18n_es_MX.properties +0 -23
- package/src/sap/ui/rta/appContexts/i18n/i18n_et.properties +0 -23
- package/src/sap/ui/rta/appContexts/i18n/i18n_fi.properties +0 -23
- package/src/sap/ui/rta/appContexts/i18n/i18n_fr.properties +0 -23
- package/src/sap/ui/rta/appContexts/i18n/i18n_fr_CA.properties +0 -23
- package/src/sap/ui/rta/appContexts/i18n/i18n_hi.properties +0 -23
- package/src/sap/ui/rta/appContexts/i18n/i18n_hr.properties +0 -23
- package/src/sap/ui/rta/appContexts/i18n/i18n_hu.properties +0 -23
- package/src/sap/ui/rta/appContexts/i18n/i18n_id.properties +0 -23
- package/src/sap/ui/rta/appContexts/i18n/i18n_it.properties +0 -23
- package/src/sap/ui/rta/appContexts/i18n/i18n_iw.properties +0 -23
- package/src/sap/ui/rta/appContexts/i18n/i18n_ja.properties +0 -23
- package/src/sap/ui/rta/appContexts/i18n/i18n_kk.properties +0 -23
- package/src/sap/ui/rta/appContexts/i18n/i18n_ko.properties +0 -23
- package/src/sap/ui/rta/appContexts/i18n/i18n_lt.properties +0 -23
- package/src/sap/ui/rta/appContexts/i18n/i18n_lv.properties +0 -23
- package/src/sap/ui/rta/appContexts/i18n/i18n_ms.properties +0 -23
- package/src/sap/ui/rta/appContexts/i18n/i18n_nl.properties +0 -23
- package/src/sap/ui/rta/appContexts/i18n/i18n_no.properties +0 -23
- package/src/sap/ui/rta/appContexts/i18n/i18n_pl.properties +0 -23
- package/src/sap/ui/rta/appContexts/i18n/i18n_pt.properties +0 -23
- package/src/sap/ui/rta/appContexts/i18n/i18n_pt_PT.properties +0 -23
- package/src/sap/ui/rta/appContexts/i18n/i18n_ro.properties +0 -23
- package/src/sap/ui/rta/appContexts/i18n/i18n_ru.properties +0 -23
- package/src/sap/ui/rta/appContexts/i18n/i18n_sh.properties +0 -23
- package/src/sap/ui/rta/appContexts/i18n/i18n_sk.properties +0 -23
- package/src/sap/ui/rta/appContexts/i18n/i18n_sl.properties +0 -23
- package/src/sap/ui/rta/appContexts/i18n/i18n_sv.properties +0 -23
- package/src/sap/ui/rta/appContexts/i18n/i18n_th.properties +0 -23
- package/src/sap/ui/rta/appContexts/i18n/i18n_tr.properties +0 -23
- package/src/sap/ui/rta/appContexts/i18n/i18n_uk.properties +0 -23
- package/src/sap/ui/rta/appContexts/i18n/i18n_vi.properties +0 -23
- package/src/sap/ui/rta/appContexts/i18n/i18n_zh_CN.properties +0 -23
- package/src/sap/ui/rta/appContexts/i18n/i18n_zh_TW.properties +0 -23
- package/src/sap/ui/rta/appContexts/index.html +0 -25
- package/src/sap/ui/rta/appContexts/manifest.json +0 -52
- package/src/sap/ui/rta/appContexts/view/EditContextsDialog.fragment.xml +0 -76
- package/src/sap/ui/rta/appContexts/view/ManageContexts.view.xml +0 -103
- package/src/sap/ui/rta/appContexts/view/SaveAsContextsDialog.fragment.xml +0 -76
- package/src/sap/ui/rta/toolbar/contextBased/SaveAsContextBasedAdaptation.js +0 -124
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -23,7 +23,6 @@ sap.ui.define([
|
|
|
23
23
|
"sap/ui/dt/Util",
|
|
24
24
|
"sap/ui/events/KeyCodes",
|
|
25
25
|
"sap/ui/fl/write/api/Version",
|
|
26
|
-
"sap/ui/fl/apply/api/SmartVariantManagementApplyAPI",
|
|
27
26
|
"sap/ui/fl/write/api/ContextBasedAdaptationsAPI",
|
|
28
27
|
"sap/ui/fl/write/api/ControlPersonalizationWriteAPI",
|
|
29
28
|
"sap/ui/fl/write/api/FeaturesAPI",
|
|
@@ -71,7 +70,6 @@ sap.ui.define([
|
|
|
71
70
|
DtUtil,
|
|
72
71
|
KeyCodes,
|
|
73
72
|
Version,
|
|
74
|
-
SmartVariantManagementApplyAPI,
|
|
75
73
|
ContextBasedAdaptationsAPI,
|
|
76
74
|
ControlPersonalizationWriteAPI,
|
|
77
75
|
FeaturesAPI,
|
|
@@ -118,7 +116,7 @@ sap.ui.define([
|
|
|
118
116
|
* @class The runtime authoring allows to adapt the fields of a running application.
|
|
119
117
|
* @extends sap.ui.base.ManagedObject
|
|
120
118
|
* @author SAP SE
|
|
121
|
-
* @version 1.
|
|
119
|
+
* @version 1.110.0
|
|
122
120
|
* @constructor
|
|
123
121
|
* @private
|
|
124
122
|
* @since 1.30
|
|
@@ -299,6 +297,19 @@ sap.ui.define([
|
|
|
299
297
|
ReloadManager.disableAutomaticStart(sLayer);
|
|
300
298
|
};
|
|
301
299
|
|
|
300
|
+
/**
|
|
301
|
+
* Check if RTA is about to start or starting after a reload
|
|
302
|
+
* e.g. when reloading without personalization changes
|
|
303
|
+
*
|
|
304
|
+
* @public
|
|
305
|
+
* @static
|
|
306
|
+
* @param {sap.ui.fl.Layer} [sLayer] - Active layer, CUSTOMER by default
|
|
307
|
+
* @returns {boolean} Returns true if RTA is about to start or starting
|
|
308
|
+
*/
|
|
309
|
+
RuntimeAuthoring.willRTAStartAfterReload = function(sLayer) {
|
|
310
|
+
return ReloadManager.needsAutomaticStart(sLayer || Layer.CUSTOMER);
|
|
311
|
+
};
|
|
312
|
+
|
|
302
313
|
RuntimeAuthoring.prototype.addDependent = function(oObject, sName, bCreateGetter) {
|
|
303
314
|
bCreateGetter = typeof bCreateGetter === "undefined" ? true : !!bCreateGetter;
|
|
304
315
|
if (!(sName in this._dependents)) {
|
|
@@ -382,7 +393,7 @@ sap.ui.define([
|
|
|
382
393
|
var oUriParams = UriParameters.fromQuery(window.location.search);
|
|
383
394
|
var sUriLayer = oUriParams.get("sap-ui-layer");
|
|
384
395
|
|
|
385
|
-
mFlexSettings =
|
|
396
|
+
mFlexSettings = Object.assign({}, this.getFlexSettings(), mFlexSettings);
|
|
386
397
|
if (sUriLayer) {
|
|
387
398
|
mFlexSettings.layer = sUriLayer.toUpperCase();
|
|
388
399
|
}
|
|
@@ -459,7 +470,6 @@ sap.ui.define([
|
|
|
459
470
|
}
|
|
460
471
|
var oFlexInfoSession = PersistenceWriteAPI.getResetAndPublishInfoFromSession(this.getRootControlInstance());
|
|
461
472
|
this.bInitialResetEnabled = !!oFlexInfoSession.isResetEnabled;
|
|
462
|
-
this.bInitialPublishEnabled = !!oFlexInfoSession.isPublishEnabled;
|
|
463
473
|
|
|
464
474
|
this._oSerializer = new LREPSerializer({commandStack: this.getCommandStack(), rootControl: this.getRootControl()});
|
|
465
475
|
|
|
@@ -483,12 +493,13 @@ sap.ui.define([
|
|
|
483
493
|
//add root control is triggering overlay creation, so we need to wait for the scope to be set.
|
|
484
494
|
this._oDesignTime.addRootElement(this._oRootControl);
|
|
485
495
|
|
|
486
|
-
|
|
496
|
+
//TODO: remove when Overlay.getOverlayContainer() does not return jQuery any more
|
|
497
|
+
Overlay.getOverlayContainer().get(0).classList.add("sapUiRta");
|
|
487
498
|
if (this.getLayer() === Layer.USER) {
|
|
488
|
-
|
|
499
|
+
Overlay.getOverlayContainer().get(0).classList.add("sapUiRtaPersonalize");
|
|
489
500
|
} else {
|
|
490
501
|
// RTA Visual Improvements
|
|
491
|
-
|
|
502
|
+
document.body.classList.add("sapUiRtaMode");
|
|
492
503
|
}
|
|
493
504
|
this._oDesignTime.getSelectionManager().attachChange(function(oEvent) {
|
|
494
505
|
this.fireSelectionChange({selection: oEvent.getParameter("selection")});
|
|
@@ -558,6 +569,7 @@ sap.ui.define([
|
|
|
558
569
|
validateFlexEnabled(this);
|
|
559
570
|
}
|
|
560
571
|
this._sStatus = STARTED;
|
|
572
|
+
RuntimeAuthoring.disableRestart(Layer.CUSTOMER);
|
|
561
573
|
this.fireStart({
|
|
562
574
|
editablePluginsCount: this.getPluginManager().getEditableOverlaysCount()
|
|
563
575
|
});
|
|
@@ -576,6 +588,18 @@ sap.ui.define([
|
|
|
576
588
|
return Promise.reject("RuntimeAuthoring is already started");
|
|
577
589
|
};
|
|
578
590
|
|
|
591
|
+
function showSaveConfirmation() {
|
|
592
|
+
return Utils.showMessageBox("warning", "MSG_UNSAVED_CHANGES_ON_CLOSE", {
|
|
593
|
+
titleKey: "TIT_UNSAVED_CHANGES_ON_CLOSE",
|
|
594
|
+
actionKeys: [
|
|
595
|
+
"BTN_UNSAVED_CHANGES_ON_CLOSE_SAVE",
|
|
596
|
+
"BTN_UNSAVED_CHANGES_ON_CLOSE_DONT_SAVE"
|
|
597
|
+
],
|
|
598
|
+
emphasizedActionKey: "BTN_UNSAVED_CHANGES_ON_CLOSE_SAVE",
|
|
599
|
+
showCancel: true
|
|
600
|
+
});
|
|
601
|
+
}
|
|
602
|
+
|
|
579
603
|
/**
|
|
580
604
|
* Stops Runtime Authoring
|
|
581
605
|
*
|
|
@@ -585,13 +609,33 @@ sap.ui.define([
|
|
|
585
609
|
* @returns {Promise} Resolves with undefined
|
|
586
610
|
*/
|
|
587
611
|
RuntimeAuthoring.prototype.stop = function(bSkipSave, bSkipRestart) {
|
|
588
|
-
|
|
612
|
+
var bUserCancelled;
|
|
589
613
|
var oReloadInfo;
|
|
614
|
+
checkToolbarAndExecuteFunction.call(this, "setBusy", true);
|
|
590
615
|
return waitForPendingActions.call(this)
|
|
616
|
+
.then(function() {
|
|
617
|
+
var oCommandStack = this.getCommandStack();
|
|
618
|
+
var sLayer = this.getLayer();
|
|
619
|
+
if (sLayer !== Layer.USER && !bSkipSave && oCommandStack.canUndo()) {
|
|
620
|
+
return showSaveConfirmation()
|
|
621
|
+
.then(function (sAction) {
|
|
622
|
+
if (sAction === MessageBox.Action.CANCEL) {
|
|
623
|
+
bUserCancelled = true;
|
|
624
|
+
return Promise.reject();
|
|
625
|
+
}
|
|
626
|
+
if (sAction === this._getTextResources().getText("BTN_UNSAVED_CHANGES_ON_CLOSE_DONT_SAVE")) {
|
|
627
|
+
return this._oSerializer.clearCommandStack(/*bRemoveChanges = */true);
|
|
628
|
+
}
|
|
629
|
+
return undefined;
|
|
630
|
+
}.bind(this));
|
|
631
|
+
}
|
|
632
|
+
return undefined;
|
|
633
|
+
}.bind(this))
|
|
591
634
|
.then(function() {
|
|
592
635
|
if (bSkipRestart) {
|
|
593
636
|
return {};
|
|
594
637
|
}
|
|
638
|
+
//Reload check must happen before _serializeToLrep is called
|
|
595
639
|
return ReloadManager.checkReloadOnExit({
|
|
596
640
|
layer: this.getLayer(),
|
|
597
641
|
selector: this.getRootControlInstance(),
|
|
@@ -603,20 +647,31 @@ sap.ui.define([
|
|
|
603
647
|
}.bind(this))
|
|
604
648
|
.then(function(oReturn) {
|
|
605
649
|
oReloadInfo = oReturn;
|
|
606
|
-
|
|
650
|
+
if (!bSkipSave) {
|
|
651
|
+
// serializeToLrep has to be called even when no changes were made -> to invalidate cache
|
|
652
|
+
return this._serializeToLrep();
|
|
653
|
+
}
|
|
654
|
+
return undefined;
|
|
607
655
|
}.bind(this))
|
|
608
|
-
.then(checkToolbarAndExecuteFunction.bind(this, "hide", bSkipSave))
|
|
609
656
|
.then(function() {
|
|
657
|
+
checkToolbarAndExecuteFunction.call(this, "hide", bSkipSave);
|
|
610
658
|
this.fireStop();
|
|
611
659
|
if (!bSkipRestart) {
|
|
612
660
|
ReloadManager.handleUrlParametersOnExit(oReloadInfo);
|
|
613
661
|
}
|
|
614
662
|
}.bind(this))
|
|
615
|
-
.catch(
|
|
663
|
+
.catch(function(vError) {
|
|
664
|
+
if (!bUserCancelled) {
|
|
665
|
+
return showTechnicalError(vError);
|
|
666
|
+
}
|
|
667
|
+
return undefined;
|
|
668
|
+
})
|
|
616
669
|
.then(function() {
|
|
617
670
|
checkToolbarAndExecuteFunction.call(this, "setBusy", false);
|
|
618
|
-
|
|
619
|
-
|
|
671
|
+
if (!bUserCancelled) {
|
|
672
|
+
this._sStatus = STOPPED;
|
|
673
|
+
document.body.classList.remove("sapUiRtaMode");
|
|
674
|
+
}
|
|
620
675
|
}.bind(this));
|
|
621
676
|
};
|
|
622
677
|
|
|
@@ -693,9 +748,13 @@ sap.ui.define([
|
|
|
693
748
|
|
|
694
749
|
Overlay.getOverlayContainer().toggleClass("sapUiRtaVisualizationMode", (sNewMode === "visualization"));
|
|
695
750
|
if (sNewMode === "visualization") {
|
|
696
|
-
|
|
751
|
+
document.querySelectorAll(".sapUiDtOverlayMovable").forEach(function(oNode) {
|
|
752
|
+
oNode.style.cursor = "default";
|
|
753
|
+
});
|
|
697
754
|
} else {
|
|
698
|
-
|
|
755
|
+
document.querySelectorAll(".sapUiDtOverlayMovable").forEach(function(oNode) {
|
|
756
|
+
oNode.style.cursor = "move";
|
|
757
|
+
});
|
|
699
758
|
}
|
|
700
759
|
|
|
701
760
|
this._oToolbarControlsModel.setProperty("/modeSwitcher", sNewMode);
|
|
@@ -813,51 +872,6 @@ sap.ui.define([
|
|
|
813
872
|
}.bind(this));
|
|
814
873
|
};
|
|
815
874
|
|
|
816
|
-
/**
|
|
817
|
-
* Function to handle ABAP transport of the changes
|
|
818
|
-
*
|
|
819
|
-
* @returns {Promise} Returns a Promise processing the transport of changes
|
|
820
|
-
*/
|
|
821
|
-
RuntimeAuthoring.prototype.transport = function() {
|
|
822
|
-
this.getPluginManager().handleStopCutPaste();
|
|
823
|
-
|
|
824
|
-
BusyIndicator.show(500);
|
|
825
|
-
return this._serializeToLrep().then(function() {
|
|
826
|
-
BusyIndicator.hide();
|
|
827
|
-
var bVariantByStartupParameter = FlexUtils.isVariantByStartupParameter(this._oRootControl);
|
|
828
|
-
var bAppVariantRunning = SmartVariantManagementApplyAPI.isApplicationVariant({control: this._oRootControl}) && !bVariantByStartupParameter;
|
|
829
|
-
return (bAppVariantRunning ? RtaAppVariantFeature.getAppVariantDescriptor(this._oRootControl) : Promise.resolve())
|
|
830
|
-
.then(function(oAppVariantDescriptor) {
|
|
831
|
-
var aAppVariantDescriptor = [];
|
|
832
|
-
if (oAppVariantDescriptor) {
|
|
833
|
-
aAppVariantDescriptor.push(oAppVariantDescriptor);
|
|
834
|
-
}
|
|
835
|
-
return PersistenceWriteAPI.publish({
|
|
836
|
-
selector: this.getRootControlInstance(),
|
|
837
|
-
styleClass: Utils.getRtaStyleClassName(),
|
|
838
|
-
layer: this.getLayer(),
|
|
839
|
-
appVariantDescriptors: aAppVariantDescriptor
|
|
840
|
-
})
|
|
841
|
-
.then(function(sMessage) {
|
|
842
|
-
if (sMessage !== "Error" && sMessage !== "Cancel") {
|
|
843
|
-
MessageToast.show(sMessage);
|
|
844
|
-
if (this.getShowToolbars()) {
|
|
845
|
-
PersistenceWriteAPI.getResetAndPublishInfo({
|
|
846
|
-
selector: this.getRootControlInstance(),
|
|
847
|
-
layer: this.getLayer()
|
|
848
|
-
})
|
|
849
|
-
.then(function(oPublishAndResetInfo) {
|
|
850
|
-
this._oToolbarControlsModel.setProperty("/publishEnabled", oPublishAndResetInfo.isPublishEnabled);
|
|
851
|
-
this._oToolbarControlsModel.setProperty("/restoreEnabled", oPublishAndResetInfo.isResetEnabled);
|
|
852
|
-
}.bind(this));
|
|
853
|
-
}
|
|
854
|
-
}
|
|
855
|
-
}.bind(this));
|
|
856
|
-
}.bind(this));
|
|
857
|
-
}.bind(this))
|
|
858
|
-
.catch(showTechnicalError);
|
|
859
|
-
};
|
|
860
|
-
|
|
861
875
|
RuntimeAuthoring.prototype.undo = function() {
|
|
862
876
|
this.getPluginManager().handleStopCutPaste();
|
|
863
877
|
return this.getCommandStack().undo();
|
|
@@ -896,6 +910,20 @@ sap.ui.define([
|
|
|
896
910
|
return serializeAndSave.call(this, undefined, bCondenseAnyLayer);
|
|
897
911
|
};
|
|
898
912
|
|
|
913
|
+
/**
|
|
914
|
+
* Condenses the given changes and saves the result.
|
|
915
|
+
* For the function to do anything at least two changes have to be passed.
|
|
916
|
+
*
|
|
917
|
+
* @param {object[]} aChanges - Array of flex object instances
|
|
918
|
+
* @returns {Promise} Resolves when the save and condense is done
|
|
919
|
+
* @private
|
|
920
|
+
* @ui5-restricted Visual Editor
|
|
921
|
+
*/
|
|
922
|
+
RuntimeAuthoring.prototype.condenseAndSaveChanges = function(/* aChanges */) {
|
|
923
|
+
// for now there is no functionality to only consider passed changes during condensing, so the standard save functionality is triggered
|
|
924
|
+
return this._serializeToLrep.apply(this, arguments);
|
|
925
|
+
};
|
|
926
|
+
|
|
899
927
|
/**
|
|
900
928
|
* Check for unsaved changes before leaving UI adaptation at runtime
|
|
901
929
|
*
|
|
@@ -905,8 +933,7 @@ sap.ui.define([
|
|
|
905
933
|
RuntimeAuthoring.prototype._onUnload = function() {
|
|
906
934
|
// this function is still in the prototype scope for easier testing
|
|
907
935
|
var oCommandStack = this.getCommandStack();
|
|
908
|
-
|
|
909
|
-
if (bUnsaved && this.getShowWindowUnloadDialog()) {
|
|
936
|
+
if (oCommandStack.canUndo() && this.getShowWindowUnloadDialog()) {
|
|
910
937
|
return this._getTextResources().getText("MSG_UNSAVED_CHANGES");
|
|
911
938
|
}
|
|
912
939
|
window.onbeforeunload = this._oldUnloadHandler;
|
|
@@ -1016,7 +1043,7 @@ sap.ui.define([
|
|
|
1016
1043
|
}
|
|
1017
1044
|
|
|
1018
1045
|
/**
|
|
1019
|
-
* Adapt the enablement of undo/redo/reset
|
|
1046
|
+
* Adapt the enablement of undo/redo/reset button
|
|
1020
1047
|
*
|
|
1021
1048
|
* @returns {Promise} Resolves as soon as the MessageBox is closed
|
|
1022
1049
|
*/
|
|
@@ -1056,16 +1083,17 @@ sap.ui.define([
|
|
|
1056
1083
|
var oCommandStack = this.getCommandStack();
|
|
1057
1084
|
var bCanUndo = oCommandStack.canUndo();
|
|
1058
1085
|
var bCanRedo = oCommandStack.canRedo();
|
|
1059
|
-
var
|
|
1086
|
+
var bWasSaved = oCommandStack.getSaved();
|
|
1087
|
+
var bTranslationRelevantDirtyChange = this._oToolbarControlsModel.getProperty("/translation/visible") &&
|
|
1060
1088
|
TranslationAPI.hasTranslationRelevantDirtyChanges({layer: Layer.CUSTOMER, selector: this.getRootControlInstance()});
|
|
1061
1089
|
|
|
1062
1090
|
// TODO: move to the setter to the ChangesState
|
|
1063
1091
|
this._oVersionsModel.setDirtyChanges(PersistenceWriteAPI.hasDirtyChanges({selector: this.getRootControlInstance()}));
|
|
1064
|
-
this._oToolbarControlsModel.setProperty("/
|
|
1065
|
-
this._oToolbarControlsModel.setProperty("/
|
|
1066
|
-
this._oToolbarControlsModel.setProperty("/
|
|
1067
|
-
this._oToolbarControlsModel.setProperty("/
|
|
1068
|
-
this._oToolbarControlsModel.setProperty("/
|
|
1092
|
+
this._oToolbarControlsModel.setProperty("/undo/enabled", bCanUndo);
|
|
1093
|
+
this._oToolbarControlsModel.setProperty("/redo/enabled", bCanRedo);
|
|
1094
|
+
this._oToolbarControlsModel.setProperty("/save/enabled", bCanUndo);
|
|
1095
|
+
this._oToolbarControlsModel.setProperty("/restore/enabled", this.bInitialResetEnabled || bCanUndo || bWasSaved);
|
|
1096
|
+
this._oToolbarControlsModel.setProperty("/translation/enabled", this.bPersistedDataTranslatable || bTranslationRelevantDirtyChange);
|
|
1069
1097
|
}
|
|
1070
1098
|
this.fireUndoRedoStackModified();
|
|
1071
1099
|
}
|
|
@@ -1085,19 +1113,19 @@ sap.ui.define([
|
|
|
1085
1113
|
}
|
|
1086
1114
|
|
|
1087
1115
|
function onKeyDown(oEvent) {
|
|
1088
|
-
// if for example the addField Dialog/
|
|
1116
|
+
// if for example the addField Dialog/reset Popup is open, we don't want the user to be able to undo/redo
|
|
1089
1117
|
var bMacintosh = Device.os.macintosh;
|
|
1090
1118
|
var bFocusInsideOverlayContainer = Overlay.getOverlayContainer().get(0).contains(document.activeElement);
|
|
1091
1119
|
var bFocusInsideRtaToolbar = this.getShowToolbars() && this.getToolbar().getDomRef().contains(document.activeElement);
|
|
1092
1120
|
var bFocusOnContextMenu = false;
|
|
1093
1121
|
// there might be two divs with that style-class (compact and expanded context menu)
|
|
1094
|
-
|
|
1095
|
-
if (
|
|
1122
|
+
document.querySelectorAll(".sapUiDtContextMenu").forEach(function(oNode) {
|
|
1123
|
+
if (oNode.contains(document.activeElement)) {
|
|
1096
1124
|
bFocusOnContextMenu = true;
|
|
1097
1125
|
}
|
|
1098
1126
|
});
|
|
1099
1127
|
var bFocusOnBody = document.body === document.activeElement;
|
|
1100
|
-
var bFocusInsideRenameField =
|
|
1128
|
+
var bFocusInsideRenameField = DOMUtil.getParents(document.activeElement, ".sapUiRtaEditableField").length > 0;
|
|
1101
1129
|
|
|
1102
1130
|
if ((bFocusInsideOverlayContainer || bFocusInsideRtaToolbar || bFocusOnContextMenu || bFocusOnBody) && !bFocusInsideRenameField) {
|
|
1103
1131
|
// OSX: replace CTRL with CMD
|
|
@@ -1127,15 +1155,6 @@ sap.ui.define([
|
|
|
1127
1155
|
}
|
|
1128
1156
|
}
|
|
1129
1157
|
|
|
1130
|
-
function onSaveAsContextBasedAdaptation(oEvent) {
|
|
1131
|
-
var mPropertyBag = {
|
|
1132
|
-
parameters: oEvent.mParameters,
|
|
1133
|
-
control: this.getRootControlInstance(),
|
|
1134
|
-
layer: this.getLayer()
|
|
1135
|
-
};
|
|
1136
|
-
return ContextBasedAdaptationsAPI.create(mPropertyBag);
|
|
1137
|
-
}
|
|
1138
|
-
|
|
1139
1158
|
function saveOnly(oEvent) {
|
|
1140
1159
|
var fnCallback = oEvent.getParameter("callback") || function() {};
|
|
1141
1160
|
return this.save()
|
|
@@ -1144,7 +1163,7 @@ sap.ui.define([
|
|
|
1144
1163
|
|
|
1145
1164
|
function serializeAndSave(bActivateVersion, bCondenseAnyLayer) {
|
|
1146
1165
|
if (this.getShowToolbars()) {
|
|
1147
|
-
this.bPersistedDataTranslatable = this._oToolbarControlsModel.getProperty("/
|
|
1166
|
+
this.bPersistedDataTranslatable = this._oToolbarControlsModel.getProperty("/translation/enabled");
|
|
1148
1167
|
}
|
|
1149
1168
|
var mPropertyBag = {
|
|
1150
1169
|
// Save changes on the current layer and discard dirty changes on other layers
|
|
@@ -1170,6 +1189,7 @@ sap.ui.define([
|
|
|
1170
1189
|
if (sAction === MessageBox.Action.OK) {
|
|
1171
1190
|
return activate.call(this, sVersionTitle);
|
|
1172
1191
|
}
|
|
1192
|
+
return undefined;
|
|
1173
1193
|
}.bind(this));
|
|
1174
1194
|
}
|
|
1175
1195
|
return activate.call(this, sVersionTitle);
|
|
@@ -1190,7 +1210,7 @@ sap.ui.define([
|
|
|
1190
1210
|
}).then(function() {
|
|
1191
1211
|
showMessageToast.call(this, "MSG_DRAFT_ACTIVATION_SUCCESS");
|
|
1192
1212
|
this.bInitialResetEnabled = true;
|
|
1193
|
-
this._oToolbarControlsModel.setProperty("/
|
|
1213
|
+
this._oToolbarControlsModel.setProperty("/restore/enabled", true);
|
|
1194
1214
|
this.getCommandStack().removeAllCommands();
|
|
1195
1215
|
}.bind(this))
|
|
1196
1216
|
.catch(function(oError) {
|
|
@@ -1318,7 +1338,7 @@ sap.ui.define([
|
|
|
1318
1338
|
}.bind(this));
|
|
1319
1339
|
}
|
|
1320
1340
|
|
|
1321
|
-
function createToolsMenu(
|
|
1341
|
+
function createToolsMenu(mButtonsAvailability) {
|
|
1322
1342
|
if (!this.getDependent("toolbar")) {
|
|
1323
1343
|
var bUserLayer = this.getLayer() === Layer.USER;
|
|
1324
1344
|
var oProperties = {
|
|
@@ -1333,7 +1353,6 @@ sap.ui.define([
|
|
|
1333
1353
|
};
|
|
1334
1354
|
|
|
1335
1355
|
if (!bUserLayer) {
|
|
1336
|
-
oProperties.transport = this.transport.bind(this);
|
|
1337
1356
|
oProperties.publishVersion = onPublishVersion.bind(this);
|
|
1338
1357
|
oProperties.undo = this.undo.bind(this);
|
|
1339
1358
|
oProperties.redo = this.redo.bind(this);
|
|
@@ -1341,7 +1360,6 @@ sap.ui.define([
|
|
|
1341
1360
|
oProperties.activate = onActivate.bind(this);
|
|
1342
1361
|
oProperties.discardDraft = onDiscardDraft.bind(this);
|
|
1343
1362
|
oProperties.switchVersion = onSwitchVersion.bind(this);
|
|
1344
|
-
oProperties.saveAsContextBasedAdaptation = onSaveAsContextBasedAdaptation.bind(this);
|
|
1345
1363
|
oProperties.openChangeCategorySelectionPopover = this.getChangeVisualization
|
|
1346
1364
|
? this.getChangeVisualization().openChangeCategorySelectionPopover.bind(this.getChangeVisualization())
|
|
1347
1365
|
: function() {};
|
|
@@ -1363,8 +1381,8 @@ sap.ui.define([
|
|
|
1363
1381
|
return Promise.all([oToolbar.onFragmentLoaded(), FeaturesAPI.isKeyUserTranslationEnabled(this.getLayer())])
|
|
1364
1382
|
.then(function(aArguments) {
|
|
1365
1383
|
var bTranslationAvailable = aArguments[1];
|
|
1366
|
-
var
|
|
1367
|
-
var bExtendedOverview =
|
|
1384
|
+
var bAppVariantsAvailable = mButtonsAvailability.saveAsAvailable;
|
|
1385
|
+
var bExtendedOverview = bAppVariantsAvailable && RtaAppVariantFeature.isOverviewExtended();
|
|
1368
1386
|
var oUriParameters = UriParameters.fromURL(window.location.href);
|
|
1369
1387
|
// the "Visualization" tab should not be visible if the "fiori-tools-rta-mode" URL-parameter is set to any value but "false"
|
|
1370
1388
|
var bVisualizationButtonVisible;
|
|
@@ -1372,24 +1390,55 @@ sap.ui.define([
|
|
|
1372
1390
|
this.bPersistedDataTranslatable = false;
|
|
1373
1391
|
|
|
1374
1392
|
this._oToolbarControlsModel = new JSONModel({
|
|
1375
|
-
undoEnabled: false,
|
|
1376
|
-
redoEnabled: false,
|
|
1377
|
-
translationVisible: bTranslationAvailable,
|
|
1378
|
-
translationEnabled: this.bPersistedDataTranslatable,
|
|
1379
|
-
publishVisible: aButtonsVisibility.publishAvailable,
|
|
1380
|
-
publishEnabled: this.bInitialPublishEnabled,
|
|
1381
|
-
restoreEnabled: this.bInitialResetEnabled,
|
|
1382
|
-
appVariantsOverviewVisible: bSaveAsAvailable && bExtendedOverview,
|
|
1383
|
-
appVariantsOverviewEnabled: bSaveAsAvailable && bExtendedOverview,
|
|
1384
|
-
saveAsVisible: bSaveAsAvailable,
|
|
1385
|
-
contextBasedAdaptationVisible: aButtonsVisibility.contextBasedAdaptationAvailable,
|
|
1386
|
-
saveAsEnabled: false,
|
|
1387
|
-
manageAppsVisible: bSaveAsAvailable && !bExtendedOverview,
|
|
1388
|
-
manageAppsEnabled: bSaveAsAvailable && !bExtendedOverview,
|
|
1389
1393
|
modeSwitcher: this.getMode(),
|
|
1390
|
-
|
|
1394
|
+
undo: {
|
|
1395
|
+
enabled: false
|
|
1396
|
+
},
|
|
1397
|
+
redo: {
|
|
1398
|
+
enabled: false
|
|
1399
|
+
},
|
|
1400
|
+
save: {
|
|
1401
|
+
enabled: false
|
|
1402
|
+
},
|
|
1403
|
+
translation: {
|
|
1404
|
+
visible: bTranslationAvailable,
|
|
1405
|
+
enabled: this.bPersistedDataTranslatable
|
|
1406
|
+
},
|
|
1407
|
+
appVariantMenu: {
|
|
1408
|
+
visible: bAppVariantsAvailable,
|
|
1409
|
+
enabled: bAppVariantsAvailable,
|
|
1410
|
+
overview: {
|
|
1411
|
+
visible: bAppVariantsAvailable && bExtendedOverview,
|
|
1412
|
+
enabled: bAppVariantsAvailable && bExtendedOverview
|
|
1413
|
+
},
|
|
1414
|
+
manageApps: {
|
|
1415
|
+
visible: bAppVariantsAvailable && !bExtendedOverview,
|
|
1416
|
+
enabled: bAppVariantsAvailable && !bExtendedOverview
|
|
1417
|
+
},
|
|
1418
|
+
saveAs: {
|
|
1419
|
+
visible: bAppVariantsAvailable,
|
|
1420
|
+
enabled: bAppVariantsAvailable
|
|
1421
|
+
}
|
|
1422
|
+
},
|
|
1423
|
+
restore: {
|
|
1424
|
+
visible: !this._oVersionsModel.getProperty("/versioningEnabled"),
|
|
1425
|
+
enabled: this.bInitialResetEnabled
|
|
1426
|
+
},
|
|
1427
|
+
contextBasedAdaptation: {
|
|
1428
|
+
visible: mButtonsAvailability.contextBasedAdaptationAvailable,
|
|
1429
|
+
enabled: mButtonsAvailability.contextBasedAdaptationAvailable
|
|
1430
|
+
},
|
|
1431
|
+
actionsMenuButton: {
|
|
1432
|
+
enabled: true
|
|
1433
|
+
},
|
|
1434
|
+
visualizationButton: {
|
|
1435
|
+
visible: bVisualizationButtonVisible,
|
|
1436
|
+
enabled: bVisualizationButtonVisible
|
|
1437
|
+
}
|
|
1391
1438
|
});
|
|
1392
1439
|
|
|
1440
|
+
this._oVersionsModel.setProperty("/publishVersionVisible", mButtonsAvailability.publishAvailable);
|
|
1441
|
+
|
|
1393
1442
|
var oTranslationPromise = new Promise(function(resolve) {
|
|
1394
1443
|
if (!bTranslationAvailable) {
|
|
1395
1444
|
resolve();
|
|
@@ -1399,20 +1448,20 @@ sap.ui.define([
|
|
|
1399
1448
|
TranslationAPI.getSourceLanguages({selector: this.getRootControlInstance(), layer: this.getLayer()})
|
|
1400
1449
|
.then(function(aSourceLanguages) {
|
|
1401
1450
|
this.bPersistedDataTranslatable = aSourceLanguages.length > 0;
|
|
1402
|
-
this._oToolbarControlsModel.setProperty("/
|
|
1451
|
+
this._oToolbarControlsModel.setProperty("/translation/enabled", this.bPersistedDataTranslatable);
|
|
1403
1452
|
}.bind(this)).finally(resolve);
|
|
1404
1453
|
}.bind(this));
|
|
1405
1454
|
|
|
1406
1455
|
var oSaveAsPromise = new Promise(function(resolve) {
|
|
1407
|
-
if (!
|
|
1456
|
+
if (!bAppVariantsAvailable) {
|
|
1408
1457
|
resolve();
|
|
1409
1458
|
return;
|
|
1410
1459
|
}
|
|
1411
1460
|
|
|
1412
1461
|
RtaAppVariantFeature.isManifestSupported().then(function(bResult) {
|
|
1413
|
-
this._oToolbarControlsModel.setProperty("/
|
|
1414
|
-
this._oToolbarControlsModel.setProperty("/
|
|
1415
|
-
this._oToolbarControlsModel.setProperty("/
|
|
1462
|
+
this._oToolbarControlsModel.setProperty("/appVariantMenu/saveAs/enabled", bResult);
|
|
1463
|
+
this._oToolbarControlsModel.setProperty("/appVariantMenu/overview/enabled", bResult);
|
|
1464
|
+
this._oToolbarControlsModel.setProperty("/appVariantMenu/manageApps/enabled", bResult);
|
|
1416
1465
|
}.bind(this)).finally(resolve);
|
|
1417
1466
|
}.bind(this));
|
|
1418
1467
|
|
|
@@ -1572,6 +1621,7 @@ sap.ui.define([
|
|
|
1572
1621
|
Log.error("sap.ui.rta: " + oError.message);
|
|
1573
1622
|
});
|
|
1574
1623
|
}
|
|
1624
|
+
return undefined;
|
|
1575
1625
|
}.bind(this));
|
|
1576
1626
|
return this._pElementModified;
|
|
1577
1627
|
}
|
|
@@ -1650,94 +1700,93 @@ sap.ui.define([
|
|
|
1650
1700
|
}
|
|
1651
1701
|
}
|
|
1652
1702
|
} else {
|
|
1653
|
-
this._mServices[sName] = mService = {
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1703
|
+
this._mServices[sName] = mService = {};
|
|
1704
|
+
mService.status = SERVICE_STARTING;
|
|
1705
|
+
mService.location = sServiceLocation;
|
|
1706
|
+
mService.initPromise = new Promise(function(fnResolve, fnReject) {
|
|
1707
|
+
sap.ui.require(
|
|
1708
|
+
[sServiceLocation],
|
|
1709
|
+
function(fnServiceFactory) {
|
|
1710
|
+
mService.factory = fnServiceFactory;
|
|
1711
|
+
|
|
1712
|
+
if (!this._oServiceEventBus) {
|
|
1713
|
+
this._oServiceEventBus = new ServiceEventBus();
|
|
1714
|
+
}
|
|
1665
1715
|
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
);
|
|
1677
|
-
}
|
|
1678
|
-
if (!isPlainObject(oService)) {
|
|
1679
|
-
throw DtUtil.createError(
|
|
1680
|
-
"RuntimeAuthoring#startService",
|
|
1681
|
-
DtUtil.printf("Invalid service format. Service should return simple javascript object after initialization. Service name = '{0}'", sName),
|
|
1682
|
-
"sap.ui.rta"
|
|
1683
|
-
);
|
|
1684
|
-
}
|
|
1685
|
-
|
|
1686
|
-
mService.service = oService;
|
|
1687
|
-
mService.exports = {};
|
|
1688
|
-
|
|
1689
|
-
// Expose events API if there is at least one event
|
|
1690
|
-
if (Array.isArray(oService.events) && oService.events.length > 0) {
|
|
1691
|
-
jQuery.extend(mService.exports, {
|
|
1692
|
-
attachEvent: this._oServiceEventBus.subscribe.bind(this._oServiceEventBus, sName),
|
|
1693
|
-
detachEvent: this._oServiceEventBus.unsubscribe.bind(this._oServiceEventBus, sName),
|
|
1694
|
-
attachEventOnce: this._oServiceEventBus.subscribeOnce.bind(this._oServiceEventBus, sName)
|
|
1695
|
-
});
|
|
1696
|
-
}
|
|
1697
|
-
|
|
1698
|
-
// Expose methods/properties from exports object if any
|
|
1699
|
-
var mExports = oService.exports || {};
|
|
1700
|
-
jQuery.extend(
|
|
1701
|
-
mService.exports,
|
|
1702
|
-
Object.keys(mExports).reduce(function(mResult, sKey) {
|
|
1703
|
-
var vValue = mExports[sKey];
|
|
1704
|
-
mResult[sKey] = typeof vValue === "function"
|
|
1705
|
-
? DtUtil.waitForSynced(this._oDesignTime, vValue)
|
|
1706
|
-
: vValue;
|
|
1707
|
-
return mResult;
|
|
1708
|
-
}.bind(this), {})
|
|
1716
|
+
DtUtil.wrapIntoPromise(fnServiceFactory)(
|
|
1717
|
+
this,
|
|
1718
|
+
this._oServiceEventBus.publish.bind(this._oServiceEventBus, sName)
|
|
1719
|
+
)
|
|
1720
|
+
.then(function(oService) {
|
|
1721
|
+
if (this.bIsDestroyed) {
|
|
1722
|
+
throw DtUtil.createError(
|
|
1723
|
+
"RuntimeAuthoring#startService",
|
|
1724
|
+
DtUtil.printf("RuntimeAuthoring instance is destroyed while initializing the service '{0}'", sName),
|
|
1725
|
+
"sap.ui.rta"
|
|
1709
1726
|
);
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1727
|
+
}
|
|
1728
|
+
if (!isPlainObject(oService)) {
|
|
1729
|
+
throw DtUtil.createError(
|
|
1730
|
+
"RuntimeAuthoring#startService",
|
|
1731
|
+
DtUtil.printf("Invalid service format. Service should return simple javascript object after initialization. Service name = '{0}'", sName),
|
|
1732
|
+
"sap.ui.rta"
|
|
1733
|
+
);
|
|
1734
|
+
}
|
|
1735
|
+
|
|
1736
|
+
mService.service = oService;
|
|
1737
|
+
mService.exports = {};
|
|
1738
|
+
|
|
1739
|
+
// Expose events API if there is at least one event
|
|
1740
|
+
if (Array.isArray(oService.events) && oService.events.length > 0) {
|
|
1741
|
+
Object.assign(mService.exports, {
|
|
1742
|
+
attachEvent: this._oServiceEventBus.subscribe.bind(this._oServiceEventBus, sName),
|
|
1743
|
+
detachEvent: this._oServiceEventBus.unsubscribe.bind(this._oServiceEventBus, sName),
|
|
1744
|
+
attachEventOnce: this._oServiceEventBus.subscribeOnce.bind(this._oServiceEventBus, sName)
|
|
1745
|
+
});
|
|
1746
|
+
}
|
|
1747
|
+
|
|
1748
|
+
// Expose methods/properties from exports object if any
|
|
1749
|
+
var mExports = oService.exports || {};
|
|
1750
|
+
Object.assign(
|
|
1751
|
+
mService.exports,
|
|
1752
|
+
Object.keys(mExports).reduce(function(mResult, sKey) {
|
|
1753
|
+
var vValue = mExports[sKey];
|
|
1754
|
+
mResult[sKey] = typeof vValue === "function"
|
|
1755
|
+
? DtUtil.waitForSynced(this._oDesignTime, vValue)
|
|
1756
|
+
: vValue;
|
|
1757
|
+
return mResult;
|
|
1758
|
+
}.bind(this), {})
|
|
1759
|
+
);
|
|
1760
|
+
|
|
1761
|
+
mService.status = SERVICE_STARTED;
|
|
1762
|
+
fnResolve(Object.freeze(mService.exports));
|
|
1763
|
+
}.bind(this))
|
|
1764
|
+
.catch(fnReject);
|
|
1765
|
+
}.bind(this),
|
|
1766
|
+
function(vError) {
|
|
1730
1767
|
mService.status = SERVICE_FAILED;
|
|
1731
|
-
|
|
1768
|
+
fnReject(
|
|
1732
1769
|
DtUtil.propagateError(
|
|
1733
1770
|
vError,
|
|
1734
1771
|
"RuntimeAuthoring#startService",
|
|
1735
|
-
DtUtil.printf("
|
|
1772
|
+
DtUtil.printf("Can't load service '{0}' by its name: {1}", sName, sServiceLocation),
|
|
1736
1773
|
"sap.ui.rta"
|
|
1737
1774
|
)
|
|
1738
1775
|
);
|
|
1739
|
-
}
|
|
1740
|
-
|
|
1776
|
+
}
|
|
1777
|
+
);
|
|
1778
|
+
}.bind(this))
|
|
1779
|
+
.catch(function(vError) {
|
|
1780
|
+
mService.status = SERVICE_FAILED;
|
|
1781
|
+
return Promise.reject(
|
|
1782
|
+
DtUtil.propagateError(
|
|
1783
|
+
vError,
|
|
1784
|
+
"RuntimeAuthoring#startService",
|
|
1785
|
+
DtUtil.printf("Error during service '{0}' initialization.", sName),
|
|
1786
|
+
"sap.ui.rta"
|
|
1787
|
+
)
|
|
1788
|
+
);
|
|
1789
|
+
});
|
|
1741
1790
|
|
|
1742
1791
|
return mService.initPromise;
|
|
1743
1792
|
}
|
|
@@ -1776,4 +1825,4 @@ sap.ui.define([
|
|
|
1776
1825
|
};
|
|
1777
1826
|
|
|
1778
1827
|
return RuntimeAuthoring;
|
|
1779
|
-
});
|
|
1828
|
+
});
|