@openui5/sap.ui.rta 1.94.0 → 1.97.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 +12 -12
- package/THIRDPARTY.txt +21 -17
- 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 +108 -73
- package/src/sap/ui/rta/Utils.js +73 -1
- package/src/sap/ui/rta/api/startAdaptation.js +1 -2
- package/src/sap/ui/rta/api/startKeyUserAdaptation.js +2 -2
- package/src/sap/ui/rta/appVariant/AppVariantDialog.js +8 -5
- package/src/sap/ui/rta/appVariant/AppVariantManager.js +27 -22
- package/src/sap/ui/rta/appVariant/AppVariantUtils.js +108 -85
- package/src/sap/ui/rta/appVariant/Feature.js +5 -12
- package/src/sap/ui/rta/appVariant/S4HanaCloudBackend.js +2 -1
- package/src/sap/ui/rta/appVariant/Utils.js +10 -2
- package/src/sap/ui/rta/appVariant/manageApps/webapp/controller/ManageApps.controller.js +35 -20
- 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 +4 -3
- package/src/sap/ui/rta/command/BaseCommand.js +1 -1
- package/src/sap/ui/rta/command/BindProperty.js +1 -1
- package/src/sap/ui/rta/command/Combine.js +1 -1
- package/src/sap/ui/rta/command/CommandFactory.js +1 -1
- package/src/sap/ui/rta/command/CompositeCommand.js +1 -1
- package/src/sap/ui/rta/command/ControlVariantConfigure.js +4 -4
- package/src/sap/ui/rta/command/ControlVariantSave.js +1 -1
- package/src/sap/ui/rta/command/ControlVariantSaveAs.js +7 -4
- package/src/sap/ui/rta/command/ControlVariantSetTitle.js +7 -7
- package/src/sap/ui/rta/command/ControlVariantSwitch.js +1 -6
- package/src/sap/ui/rta/command/CreateContainer.js +1 -1
- package/src/sap/ui/rta/command/CustomAdd.js +1 -1
- package/src/sap/ui/rta/command/FlexCommand.js +1 -1
- package/src/sap/ui/rta/command/LREPSerializer.js +1 -1
- package/src/sap/ui/rta/command/LocalReset.js +1 -1
- package/src/sap/ui/rta/command/Move.js +1 -1
- package/src/sap/ui/rta/command/Property.js +1 -1
- package/src/sap/ui/rta/command/Remove.js +1 -1
- package/src/sap/ui/rta/command/Rename.js +1 -1
- package/src/sap/ui/rta/command/Reveal.js +1 -1
- package/src/sap/ui/rta/command/Settings.js +1 -1
- package/src/sap/ui/rta/command/Split.js +1 -1
- package/src/sap/ui/rta/command/Stack.js +1 -1
- package/src/sap/ui/rta/command/appDescriptor/AddLibrary.js +1 -1
- package/src/sap/ui/rta/command/compVariant/CompVariantSaveAs.js +1 -1
- package/src/sap/ui/rta/command/compVariant/CompVariantSwitch.js +1 -1
- package/src/sap/ui/rta/command/compVariant/CompVariantUpdate.js +1 -1
- package/src/sap/ui/rta/enablement/elementActionTest.js +1 -1
- package/src/sap/ui/rta/library.js +2 -2
- package/src/sap/ui/rta/messagebundle.properties +14 -12
- package/src/sap/ui/rta/messagebundle_ar.properties +11 -10
- package/src/sap/ui/rta/messagebundle_bg.properties +11 -10
- package/src/sap/ui/rta/messagebundle_ca.properties +10 -9
- package/src/sap/ui/rta/messagebundle_cs.properties +11 -10
- package/src/sap/ui/rta/messagebundle_cy.properties +11 -10
- package/src/sap/ui/rta/messagebundle_da.properties +11 -10
- package/src/sap/ui/rta/messagebundle_de.properties +14 -13
- package/src/sap/ui/rta/messagebundle_el.properties +11 -10
- package/src/sap/ui/rta/messagebundle_en.properties +11 -10
- package/src/sap/ui/rta/messagebundle_en_GB.properties +11 -10
- package/src/sap/ui/rta/messagebundle_en_US_sappsd.properties +11 -10
- package/src/sap/ui/rta/messagebundle_en_US_saptrc.properties +11 -10
- package/src/sap/ui/rta/messagebundle_es.properties +11 -10
- package/src/sap/ui/rta/messagebundle_es_MX.properties +11 -10
- package/src/sap/ui/rta/messagebundle_et.properties +11 -10
- package/src/sap/ui/rta/messagebundle_fi.properties +10 -9
- package/src/sap/ui/rta/messagebundle_fr.properties +11 -10
- package/src/sap/ui/rta/messagebundle_fr_CA.properties +11 -10
- package/src/sap/ui/rta/messagebundle_hi.properties +11 -10
- package/src/sap/ui/rta/messagebundle_hr.properties +11 -10
- package/src/sap/ui/rta/messagebundle_hu.properties +10 -9
- package/src/sap/ui/rta/messagebundle_id.properties +11 -10
- package/src/sap/ui/rta/messagebundle_it.properties +11 -10
- package/src/sap/ui/rta/messagebundle_iw.properties +11 -10
- package/src/sap/ui/rta/messagebundle_ja.properties +11 -10
- package/src/sap/ui/rta/messagebundle_kk.properties +11 -10
- package/src/sap/ui/rta/messagebundle_ko.properties +11 -10
- package/src/sap/ui/rta/messagebundle_lt.properties +11 -10
- package/src/sap/ui/rta/messagebundle_lv.properties +11 -10
- package/src/sap/ui/rta/messagebundle_ms.properties +11 -10
- package/src/sap/ui/rta/messagebundle_nl.properties +11 -10
- package/src/sap/ui/rta/messagebundle_no.properties +11 -10
- package/src/sap/ui/rta/messagebundle_pl.properties +11 -10
- package/src/sap/ui/rta/messagebundle_pt.properties +10 -9
- package/src/sap/ui/rta/messagebundle_pt_PT.properties +10 -9
- package/src/sap/ui/rta/messagebundle_ro.properties +11 -10
- package/src/sap/ui/rta/messagebundle_ru.properties +10 -9
- package/src/sap/ui/rta/messagebundle_sh.properties +11 -10
- package/src/sap/ui/rta/messagebundle_sk.properties +11 -10
- package/src/sap/ui/rta/messagebundle_sl.properties +11 -10
- package/src/sap/ui/rta/messagebundle_sv.properties +11 -10
- package/src/sap/ui/rta/messagebundle_th.properties +16 -15
- package/src/sap/ui/rta/messagebundle_tr.properties +11 -10
- package/src/sap/ui/rta/messagebundle_uk.properties +12 -11
- package/src/sap/ui/rta/messagebundle_vi.properties +11 -10
- package/src/sap/ui/rta/messagebundle_zh_CN.properties +11 -10
- package/src/sap/ui/rta/messagebundle_zh_TW.properties +11 -10
- package/src/sap/ui/rta/plugin/AddXMLAtExtensionPoint.js +1 -1
- package/src/sap/ui/rta/plugin/BaseCreate.js +2 -2
- package/src/sap/ui/rta/plugin/Combine.js +1 -1
- package/src/sap/ui/rta/plugin/CompVariant.js +1 -2
- package/src/sap/ui/rta/plugin/ControlVariant.js +10 -5
- 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 +52 -2
- 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 +14 -62
- package/src/sap/ui/rta/plugin/Remove.js +1 -1
- package/src/sap/ui/rta/plugin/Rename.js +1 -1
- package/src/sap/ui/rta/plugin/RenameHandler.js +4 -14
- package/src/sap/ui/rta/plugin/Selection.js +1 -1
- package/src/sap/ui/rta/plugin/Settings.js +15 -14
- package/src/sap/ui/rta/plugin/Split.js +2 -1
- package/src/sap/ui/rta/plugin/Stretch.js +133 -138
- package/src/sap/ui/rta/plugin/additionalElements/ActionExtractor.js +6 -6
- package/src/sap/ui/rta/plugin/additionalElements/AddElementsDialog.fragment.xml +74 -0
- package/src/sap/ui/rta/plugin/additionalElements/AddElementsDialog.js +97 -260
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsAnalyzer.js +1 -1
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsPlugin.js +31 -18
- 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 +8 -5
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.js +31 -29
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialogController.js +1 -16
- package/src/sap/ui/rta/plugin/iframe/urlCleaner.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 +164 -67
- package/src/sap/ui/rta/service/Property.js +1 -3
- package/src/sap/ui/rta/service/Selection.js +2 -1
- package/src/sap/ui/rta/themes/base/ChangeVisualization.less +23 -30
- package/src/sap/ui/rta/themes/base/OverlayWithScrollbar.less +55 -0
- package/src/sap/ui/rta/themes/base/Toolbar.base.less +12 -1
- package/src/sap/ui/rta/themes/base/library.source.less +3 -1
- package/src/sap/ui/rta/toolbar/Adaptation.fragment.xml +26 -14
- package/src/sap/ui/rta/toolbar/Adaptation.js +3 -3
- 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 +3 -3
- 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/Translation.js +1 -1
- package/src/sap/ui/rta/util/BindingsExtractor.js +13 -7
- package/src/sap/ui/rta/util/PluginManager.js +2 -4
- package/src/sap/ui/rta/util/PopupManager.js +3 -11
- package/src/sap/ui/rta/util/ServiceEventBus.js +1 -1
- package/src/sap/ui/rta/util/adaptationStarter.js +4 -4
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicator.js +16 -78
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorPopover.fragment.xml +15 -37
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorRegistry.js +1 -2
- package/src/sap/ui/rta/util/changeVisualization/ChangeVisualization.js +85 -107
- package/src/sap/ui/rta/util/changeVisualization/categories/MoveVisualization.js +30 -0
- package/src/sap/ui/rta/util/changeVisualization/categories/RenameVisualization.js +3 -2
- package/src/sap/ui/rta/util/changeVisualization/categories/SplitVisualization.js +30 -0
- package/src/sap/ui/rta/util/changeVisualization/categories/getVisualizationCategory.js +9 -3
- package/src/sap/ui/rta/util/validateFlexEnabled.js +4 -4
- package/ui5.yaml +4 -1
- package/src/sap/ui/rta/assets/InPageStyles.css +0 -34
- package/src/sap/ui/rta/util/changeVisualization/ChangesListPopover.fragment.xml +0 -23
|
@@ -99,12 +99,36 @@
|
|
|
99
99
|
<OverflowToolbarLayoutData priority="Low" />
|
|
100
100
|
</toolbar:layoutData>
|
|
101
101
|
</toolbar:OverflowToolbarButton>
|
|
102
|
+
<MenuButton
|
|
103
|
+
id="sapUiRta_toggleChangeVisualizationMenuButton"
|
|
104
|
+
visible="{= ${controls>/modeSwitcher} === 'visualization'}"
|
|
105
|
+
text="{visualizationModel>/commandCategoryText}"
|
|
106
|
+
type="Transparent"
|
|
107
|
+
tooltip="{i18n>BUT_CHANGEVISUALIZATION_SELECTCHANGES}">
|
|
108
|
+
<menu>
|
|
109
|
+
<Menu
|
|
110
|
+
id="sapUiRta_changesList"
|
|
111
|
+
items="{visualizationModel>/commandCategories/}"
|
|
112
|
+
itemSelected=".onCommandCategorySelection"
|
|
113
|
+
class="sapUiRtaToolbarVisualizationSelection">
|
|
114
|
+
<MenuItem
|
|
115
|
+
id="sapUiRta_changesListItem"
|
|
116
|
+
text="{visualizationModel>title}"
|
|
117
|
+
key="{visualizationModel>key}"
|
|
118
|
+
icon="{visualizationModel>icon}"
|
|
119
|
+
enabled="{= ${visualizationModel>count} > 0}"/>
|
|
120
|
+
</Menu>
|
|
121
|
+
</menu>
|
|
122
|
+
<layoutData>
|
|
123
|
+
<OverflowToolbarLayoutData priority="NeverOverflow" />
|
|
124
|
+
</layoutData>
|
|
125
|
+
</MenuButton>
|
|
102
126
|
<Button
|
|
103
127
|
id="sapUiRta_undo"
|
|
104
128
|
icon="sap-icon://undo"
|
|
105
129
|
press=".undo"
|
|
106
130
|
enabled="{controls>/undoEnabled}"
|
|
107
|
-
visible="{=
|
|
131
|
+
visible="{= ${controls>/modeSwitcher} === 'adaptation'}"
|
|
108
132
|
type="Transparent"
|
|
109
133
|
tooltip="{i18n>BTN_UNDO}" >
|
|
110
134
|
<layoutData>
|
|
@@ -116,25 +140,13 @@
|
|
|
116
140
|
icon="sap-icon://redo"
|
|
117
141
|
press=".redo"
|
|
118
142
|
enabled="{controls>/redoEnabled}"
|
|
119
|
-
visible="{=
|
|
143
|
+
visible="{= ${controls>/modeSwitcher} === 'adaptation'}"
|
|
120
144
|
type="Transparent"
|
|
121
145
|
tooltip="{i18n>BTN_REDO}" >
|
|
122
146
|
<layoutData>
|
|
123
147
|
<OverflowToolbarLayoutData priority="NeverOverflow" />
|
|
124
148
|
</layoutData>
|
|
125
149
|
</Button>
|
|
126
|
-
<toolbar:OverflowToolbarButton
|
|
127
|
-
id="sapUiRta_toggleChangeVisualizationPopoverButton"
|
|
128
|
-
icon="sap-icon://show"
|
|
129
|
-
press=".toggleChangeVisualizationPopover"
|
|
130
|
-
visible="{= ${controls>/modeSwitcher} === 'visualization'}"
|
|
131
|
-
type="Transparent"
|
|
132
|
-
text="{i18n>BTN_CHANGEVISUALIZATION_OVERVIEW_ALL}"
|
|
133
|
-
tooltip="{i18n>BUT_CHANGEVISUALIZATION_SELECTCHANGES}">
|
|
134
|
-
<toolbar:layoutData>
|
|
135
|
-
<OverflowToolbarLayoutData priority="Low" />
|
|
136
|
-
</toolbar:layoutData>
|
|
137
|
-
</toolbar:OverflowToolbarButton>
|
|
138
150
|
<toolbar:OverflowToolbarButton
|
|
139
151
|
id="sapUiRta_publish"
|
|
140
152
|
enabled="{controls>/publishEnabled}"
|
|
@@ -39,7 +39,7 @@ function(
|
|
|
39
39
|
* @extends sap.ui.rta.toolbar.Base
|
|
40
40
|
*
|
|
41
41
|
* @author SAP SE
|
|
42
|
-
* @version 1.
|
|
42
|
+
* @version 1.97.0
|
|
43
43
|
*
|
|
44
44
|
* @constructor
|
|
45
45
|
* @private
|
|
@@ -65,7 +65,7 @@ function(
|
|
|
65
65
|
activate: {},
|
|
66
66
|
discardDraft: {},
|
|
67
67
|
switchVersion: {},
|
|
68
|
-
|
|
68
|
+
onCommandCategorySelection: {}
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
71
|
});
|
|
@@ -335,7 +335,7 @@ function(
|
|
|
335
335
|
showTranslationPopover: this.showTranslationPopover.bind(this),
|
|
336
336
|
undo: this.eventHandler.bind(this, "Undo"),
|
|
337
337
|
redo: this.eventHandler.bind(this, "Redo"),
|
|
338
|
-
|
|
338
|
+
onCommandCategorySelection: this.eventHandler.bind(this, "OnCommandCategorySelection"),
|
|
339
339
|
manageApps: onManageAppsPressed.bind(this),
|
|
340
340
|
appVariantOverview: onOverviewPressed.bind(this),
|
|
341
341
|
saveAs: onSaveAsPressed.bind(this),
|
|
@@ -8,8 +8,7 @@ sap.ui.define([
|
|
|
8
8
|
"sap/m/OverflowToolbarButton",
|
|
9
9
|
"sap/m/ButtonRenderer",
|
|
10
10
|
"sap/m/Button"
|
|
11
|
-
],
|
|
12
|
-
function(
|
|
11
|
+
], function(
|
|
13
12
|
SapMOverflowToolbarButton,
|
|
14
13
|
ButtonRenderer,
|
|
15
14
|
Button
|
|
@@ -24,7 +23,7 @@ function(
|
|
|
24
23
|
* @extends sap.m.OverflowToolbarButton
|
|
25
24
|
*
|
|
26
25
|
* @author SAP SE
|
|
27
|
-
* @version 1.
|
|
26
|
+
* @version 1.97.0
|
|
28
27
|
*
|
|
29
28
|
* @constructor
|
|
30
29
|
* @private
|
|
@@ -71,6 +70,7 @@ function(
|
|
|
71
70
|
* Get the Text if in Overflow-Area or Text in Toolbar is wanted
|
|
72
71
|
*
|
|
73
72
|
* @private
|
|
73
|
+
* @returns {string} Text
|
|
74
74
|
*/
|
|
75
75
|
OverflowToolbarButton.prototype._getText = function() {
|
|
76
76
|
if ((this.getIcon() === "" && this.getVisibleIcon() === "") || this._bInOverflow) {
|
|
@@ -97,18 +97,18 @@ function(
|
|
|
97
97
|
*
|
|
98
98
|
* @param {sap.ui.core.Control} oElement - Starting point of the search
|
|
99
99
|
* @param {sap.ui.model.Model} oParentDefaultModel - Model for filtering irrelevant binding paths
|
|
100
|
-
* @param {boolean} [
|
|
100
|
+
* @param {boolean} [vTemplate] - Whether we should consider provided element as a template
|
|
101
101
|
* @param {string} [sAggregationName] - if aggregation name is given then only for this aggregation bindings are returned, if not then all aggregations are considered
|
|
102
102
|
* @param {sap.ui.core.Control} [oRelevantContainerElement] - if this element is given then only bindings from element related to the relevant container are considered
|
|
103
103
|
* @returns {Array} - returns array with all relevant bindings for all properties of the element
|
|
104
104
|
*
|
|
105
105
|
* @private
|
|
106
106
|
*/
|
|
107
|
-
BindingsExtractor.getBindings = function(oElement, oParentDefaultModel,
|
|
107
|
+
BindingsExtractor.getBindings = function(oElement, oParentDefaultModel, vTemplate, sAggregationName, oRelevantContainerElement) {
|
|
108
108
|
var aBindings = [];
|
|
109
109
|
if (isElementRelatedToRelevantContainer(oElement, oRelevantContainerElement)) {
|
|
110
110
|
aBindings = (
|
|
111
|
-
|
|
111
|
+
vTemplate
|
|
112
112
|
? getBindingsFromTemplateProperties(oElement)
|
|
113
113
|
: BindingsExtractor.getBindingsFromProperties(oElement, oParentDefaultModel)
|
|
114
114
|
);
|
|
@@ -116,17 +116,22 @@ function(
|
|
|
116
116
|
var aAggregationNames = sAggregationName ? [sAggregationName] : Object.keys(oElement.getMetadata().getAllAggregations());
|
|
117
117
|
|
|
118
118
|
aAggregationNames.forEach(function (sAggregationNameInLoop) {
|
|
119
|
-
aBindings = aBindings.concat(getBindingsForAggregation(oElement, oParentDefaultModel,
|
|
119
|
+
aBindings = aBindings.concat(getBindingsForAggregation(oElement, oParentDefaultModel, vTemplate, sAggregationNameInLoop, oRelevantContainerElement));
|
|
120
120
|
});
|
|
121
121
|
|
|
122
122
|
return aBindings;
|
|
123
123
|
};
|
|
124
124
|
|
|
125
|
-
function getBindingsForAggregation(oElement, oParentDefaultModel,
|
|
125
|
+
function getBindingsForAggregation(oElement, oParentDefaultModel, vTemplate, sAggregationName, oRelevantContainerElement) {
|
|
126
126
|
var aBindings = [];
|
|
127
|
+
var oTemplate;
|
|
128
|
+
var bTemplate;
|
|
127
129
|
// Getting children of the current aggregation and iterating through all of them
|
|
128
130
|
var oBinding = oElement.getBindingInfo(sAggregationName);
|
|
129
|
-
|
|
131
|
+
if (vTemplate !== false) {
|
|
132
|
+
oTemplate = oBinding && oBinding.template;
|
|
133
|
+
bTemplate = !!vTemplate;
|
|
134
|
+
}
|
|
130
135
|
var aElements = oTemplate ? [oTemplate] : ElementUtil.getAggregation(oElement, sAggregationName);
|
|
131
136
|
|
|
132
137
|
aElements.forEach(function (oChildElement) {
|
|
@@ -137,8 +142,9 @@ function(
|
|
|
137
142
|
? getBindingsFromTemplateProperties(oChildElement, oRelevantContainerElement)
|
|
138
143
|
: BindingsExtractor.getBindingsFromProperties(oChildElement, oParentDefaultModel));
|
|
139
144
|
}
|
|
145
|
+
// For children, templates should not be evaluated (because the delegate also does not consider them)
|
|
140
146
|
aBindings = aBindings.concat(
|
|
141
|
-
BindingsExtractor.getBindings(oChildElement, oParentDefaultModel,
|
|
147
|
+
BindingsExtractor.getBindings(oChildElement, oParentDefaultModel, false, undefined, oRelevantContainerElement)
|
|
142
148
|
);
|
|
143
149
|
}
|
|
144
150
|
});
|
|
@@ -66,7 +66,7 @@ sap.ui.define([
|
|
|
66
66
|
* Constructor for a new sap.ui.rta.util.PluginManager
|
|
67
67
|
* @extends sap.ui.base.ManagedObject
|
|
68
68
|
* @author SAP SE
|
|
69
|
-
* @version 1.
|
|
69
|
+
* @version 1.97.0
|
|
70
70
|
* @constructor
|
|
71
71
|
* @private
|
|
72
72
|
* @since 1.86
|
|
@@ -153,9 +153,7 @@ sap.ui.define([
|
|
|
153
153
|
});
|
|
154
154
|
|
|
155
155
|
this._mDefaultPlugins["additionalElements"] = new AdditionalElementsPlugin({
|
|
156
|
-
commandFactory: this._oCommandFactory
|
|
157
|
-
analyzer: AdditionalElementsAnalyzer,
|
|
158
|
-
dialog: new AdditionalElementsDialog()
|
|
156
|
+
commandFactory: this._oCommandFactory
|
|
159
157
|
});
|
|
160
158
|
|
|
161
159
|
this._mDefaultPlugins["createContainer"] = new CreateContainerPlugin({
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
/* global Map */
|
|
8
7
|
sap.ui.define([
|
|
9
8
|
"sap/ui/base/ManagedObject",
|
|
10
9
|
"sap/m/InstanceManager",
|
|
@@ -41,7 +40,7 @@ sap.ui.define([
|
|
|
41
40
|
* Constructor for a new sap.ui.rta.util.PopupManager
|
|
42
41
|
* @extends sap.ui.base.ManagedObject
|
|
43
42
|
* @author SAP SE
|
|
44
|
-
* @version 1.
|
|
43
|
+
* @version 1.97.0
|
|
45
44
|
* @constructor
|
|
46
45
|
* @private
|
|
47
46
|
* @since 1.48
|
|
@@ -243,7 +242,7 @@ sap.ui.define([
|
|
|
243
242
|
|
|
244
243
|
/**
|
|
245
244
|
* Apply focus events to all open popups and set focus on the first.
|
|
246
|
-
* @param {function}
|
|
245
|
+
* @param {function} fnEvent - Function to apply to open popups
|
|
247
246
|
* @private
|
|
248
247
|
*/
|
|
249
248
|
PopupManager.prototype._applyPatchesToOpenPopups = function(fnEvent) {
|
|
@@ -256,7 +255,7 @@ sap.ui.define([
|
|
|
256
255
|
|
|
257
256
|
/**
|
|
258
257
|
* Remove focus events from all open popups.
|
|
259
|
-
* @param {function}
|
|
258
|
+
* @param {function} fnEvent - Function to apply to open popups
|
|
260
259
|
* @private
|
|
261
260
|
*/
|
|
262
261
|
PopupManager.prototype._removePatchesToOpenPopups = function(fnEvent) {
|
|
@@ -337,13 +336,6 @@ sap.ui.define([
|
|
|
337
336
|
}
|
|
338
337
|
};
|
|
339
338
|
|
|
340
|
-
/**
|
|
341
|
-
* Applies the passed function to the relevant open popups.
|
|
342
|
-
*
|
|
343
|
-
* @param {function} fnPopupMethod specifies function to be applied
|
|
344
|
-
* @param {boolean} bFocus Set to true if the popup is in focus
|
|
345
|
-
* @private
|
|
346
|
-
*/
|
|
347
339
|
PopupManager.prototype._applyPopupAttributes = function(mPropertyBag) {
|
|
348
340
|
//check if popups are open
|
|
349
341
|
var oRelevantPopups = this.getCategorizedOpenPopups();
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
sap.ui.define([
|
|
7
7
|
"sap/ui/rta/RuntimeAuthoring",
|
|
8
|
-
"sap/ui/core/
|
|
8
|
+
"sap/ui/core/Control",
|
|
9
9
|
"sap/ui/fl/Utils",
|
|
10
10
|
"sap/ui/fl/Layer",
|
|
11
11
|
"sap/ui/fl/write/api/FeaturesAPI",
|
|
@@ -13,7 +13,7 @@ sap.ui.define([
|
|
|
13
13
|
"sap/base/Log"
|
|
14
14
|
], function(
|
|
15
15
|
RuntimeAuthoring,
|
|
16
|
-
|
|
16
|
+
Control,
|
|
17
17
|
FlexUtils,
|
|
18
18
|
Layer,
|
|
19
19
|
FeaturesAPI,
|
|
@@ -38,7 +38,7 @@ sap.ui.define([
|
|
|
38
38
|
* Starter util for UI adaptation.
|
|
39
39
|
* 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.
|
|
40
40
|
* @param {object} mOptions - Object with properties
|
|
41
|
-
* @param {sap.ui.core.
|
|
41
|
+
* @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.
|
|
42
42
|
* @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
|
|
43
43
|
* @param {function} [onStart] - Event handler function called on start event
|
|
44
44
|
* @param {function} [onFailed] - Event handler function called on failed event
|
|
@@ -47,7 +47,7 @@ sap.ui.define([
|
|
|
47
47
|
* @private
|
|
48
48
|
*/
|
|
49
49
|
function adaptationStarter(mOptions, loadPlugins, onStart, onFailed, onStop) {
|
|
50
|
-
if (!(mOptions.rootControl instanceof
|
|
50
|
+
if (!(mOptions.rootControl instanceof Control) && !(mOptions.rootControl instanceof UIComponent)) {
|
|
51
51
|
return Promise.reject(new Error("An invalid root control was passed"));
|
|
52
52
|
}
|
|
53
53
|
|
|
@@ -10,9 +10,7 @@ sap.ui.define([
|
|
|
10
10
|
"sap/ui/core/Control",
|
|
11
11
|
"sap/m/Text",
|
|
12
12
|
"sap/ui/core/format/DateFormat",
|
|
13
|
-
"sap/ui/core/Icon",
|
|
14
13
|
"sap/ui/events/KeyCodes",
|
|
15
|
-
"sap/base/strings/capitalize",
|
|
16
14
|
"sap/ui/rta/util/changeVisualization/categories/getVisualizationCategory",
|
|
17
15
|
"sap/ui/fl/Utils",
|
|
18
16
|
"sap/ui/fl/util/resolveBinding"
|
|
@@ -22,9 +20,7 @@ sap.ui.define([
|
|
|
22
20
|
Control,
|
|
23
21
|
Text,
|
|
24
22
|
DateFormat,
|
|
25
|
-
Icon,
|
|
26
23
|
KeyCodes,
|
|
27
|
-
capitalize,
|
|
28
24
|
getVisualizationCategory,
|
|
29
25
|
FlUtils,
|
|
30
26
|
resolveBinding
|
|
@@ -39,9 +35,8 @@ sap.ui.define([
|
|
|
39
35
|
* @alias sap.ui.rta.util.changeVisualization.ChangeIndicator
|
|
40
36
|
* @author SAP SE
|
|
41
37
|
* @since 1.84.0
|
|
42
|
-
* @version 1.
|
|
38
|
+
* @version 1.97.0
|
|
43
39
|
* @private
|
|
44
|
-
* @ui5-restricted
|
|
45
40
|
*/
|
|
46
41
|
var ChangeIndicator = Control.extend("sap.ui.rta.util.changeVisualization.ChangeIndicator", {
|
|
47
42
|
metadata: {
|
|
@@ -54,13 +49,6 @@ sap.ui.define([
|
|
|
54
49
|
type: "array",
|
|
55
50
|
defaultValue: []
|
|
56
51
|
},
|
|
57
|
-
/**
|
|
58
|
-
* Mode of the indicator, "change" or "dependent"
|
|
59
|
-
*/
|
|
60
|
-
mode: {
|
|
61
|
-
type: "string",
|
|
62
|
-
defaultValue: "change"
|
|
63
|
-
},
|
|
64
52
|
/**
|
|
65
53
|
* Distance from the left side of the screen in px
|
|
66
54
|
*/
|
|
@@ -96,11 +84,6 @@ sap.ui.define([
|
|
|
96
84
|
type: "sap.m.Text",
|
|
97
85
|
multiple: false,
|
|
98
86
|
visibility: "hidden"
|
|
99
|
-
},
|
|
100
|
-
_icon: {
|
|
101
|
-
type: "sap.ui.core.Icon",
|
|
102
|
-
multiple: false,
|
|
103
|
-
visibility: "hidden"
|
|
104
87
|
}
|
|
105
88
|
},
|
|
106
89
|
events: {
|
|
@@ -131,21 +114,12 @@ sap.ui.define([
|
|
|
131
114
|
render: function(oRm, oControl) {
|
|
132
115
|
oRm.openStart("div", oControl);
|
|
133
116
|
oRm.class("sapUiRtaChangeIndicator");
|
|
134
|
-
oRm.class("
|
|
135
|
-
if (
|
|
136
|
-
oControl.getMode() === "change"
|
|
137
|
-
&& oControl.getModel()
|
|
138
|
-
&& oControl.getModel().getData().selectedChange
|
|
139
|
-
) {
|
|
140
|
-
// Root selector of dependent selection
|
|
141
|
-
oRm.class("sapUiRtaChangeIndicatorChangeSolid");
|
|
142
|
-
}
|
|
117
|
+
oRm.class("sapUiRtaChangeIndicatorChange");
|
|
143
118
|
oRm.style("width", oControl._getSize() + "px");
|
|
144
119
|
oRm.style("height", oControl._getSize() + "px");
|
|
145
120
|
oRm.openEnd();
|
|
146
121
|
oRm.openStart("div");
|
|
147
122
|
oRm.openEnd();
|
|
148
|
-
oRm.renderControl(oControl.getAggregation("_icon"));
|
|
149
123
|
oRm.renderControl(oControl.getAggregation("_text"));
|
|
150
124
|
oRm.close("div");
|
|
151
125
|
oRm.close("div");
|
|
@@ -165,24 +139,6 @@ sap.ui.define([
|
|
|
165
139
|
visible: "{= (${changes} || []).length > 1}"
|
|
166
140
|
}).addStyleClass("sapUiRtaChangeIndicatorText"));
|
|
167
141
|
|
|
168
|
-
this.setAggregation("_icon", new Icon({
|
|
169
|
-
src: "sap-icon://display",
|
|
170
|
-
visible: {
|
|
171
|
-
path: "/selectedChange",
|
|
172
|
-
formatter: function (sSelectedChange) {
|
|
173
|
-
return !!(
|
|
174
|
-
sSelectedChange
|
|
175
|
-
&& this.getChanges().some(function (oChange) {
|
|
176
|
-
return (
|
|
177
|
-
oChange.id === sSelectedChange
|
|
178
|
-
&& oChange.dependent === false
|
|
179
|
-
);
|
|
180
|
-
})
|
|
181
|
-
);
|
|
182
|
-
}.bind(this)
|
|
183
|
-
}
|
|
184
|
-
}).addStyleClass("sapUiRtaChangeIndicatorIcon"));
|
|
185
|
-
|
|
186
142
|
this.attachBrowserEvent("click", this._onSelect, this);
|
|
187
143
|
this.attachBrowserEvent("keydown", this._onKeyDown, this);
|
|
188
144
|
this.attachBrowserEvent("mouseleave", function() {this._toggleHoverStyleClasses(false); }, this);
|
|
@@ -234,27 +190,10 @@ sap.ui.define([
|
|
|
234
190
|
this._oDetailModel.setData((aChanges || []).map(this._formatChangesModelItem.bind(this)));
|
|
235
191
|
};
|
|
236
192
|
|
|
237
|
-
ChangeIndicator.prototype.setMode = function (sMode) {
|
|
238
|
-
this.setProperty("mode", sMode);
|
|
239
|
-
// Mode might have changed the information displayed for each change
|
|
240
|
-
this._oDetailModel.setData((this.getChanges() || []).map(this._formatChangesModelItem.bind(this)));
|
|
241
|
-
};
|
|
242
|
-
|
|
243
193
|
ChangeIndicator.prototype._onSelect = function (oEvent) {
|
|
244
194
|
this.focus();
|
|
245
195
|
oEvent.stopPropagation();
|
|
246
|
-
|
|
247
|
-
this.getModel().getData().selectedChange
|
|
248
|
-
&& !this.getChanges().some(function (oChange) {
|
|
249
|
-
return oChange.dependent;
|
|
250
|
-
})
|
|
251
|
-
) {
|
|
252
|
-
this.fireSelectChange({
|
|
253
|
-
changeId: undefined
|
|
254
|
-
});
|
|
255
|
-
} else {
|
|
256
|
-
this._openDetailPopover();
|
|
257
|
-
}
|
|
196
|
+
this._openDetailPopover();
|
|
258
197
|
};
|
|
259
198
|
|
|
260
199
|
ChangeIndicator.prototype._onKeyDown = function(oEvent) {
|
|
@@ -291,30 +230,30 @@ sap.ui.define([
|
|
|
291
230
|
|
|
292
231
|
var oOverlay = sap.ui.getCore().byId(this.getOverlayId());
|
|
293
232
|
var sElementLabel = oOverlay.getDesignTimeMetadata().getLabel(oAffectedElement);
|
|
294
|
-
var oVisualizationUtil = getVisualizationCategory(mChangeInformation.
|
|
295
|
-
var
|
|
233
|
+
var oVisualizationUtil = getVisualizationCategory(mChangeInformation.commandName);
|
|
234
|
+
var oDescription = oVisualizationUtil && oVisualizationUtil.getDescription(mPayload, sElementLabel);
|
|
296
235
|
var oRtaResourceBundle = sap.ui.getCore().getLibraryResourceBundle("sap.ui.rta");
|
|
297
|
-
var sMode = this.getMode();
|
|
298
236
|
var sChangeTitle = mChangeInformation.commandName.charAt(0).toUpperCase() + mChangeInformation.commandName.slice(1);
|
|
299
237
|
sElementLabel = sElementLabel && "'" + sElementLabel + "'";
|
|
300
238
|
var sChangeTextKey = (
|
|
301
|
-
"
|
|
302
|
-
+ sMode.toUpperCase() + "_"
|
|
239
|
+
"TXT_CHANGEVISUALIZATION_CHANGE_"
|
|
303
240
|
+ mChangeInformation.commandName.toUpperCase()
|
|
304
241
|
);
|
|
305
|
-
var sChangeText =
|
|
306
|
-
var
|
|
307
|
-
var
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
);
|
|
242
|
+
var sChangeText = oDescription ? oDescription.descriptionText : oRtaResourceBundle.getText(sChangeTextKey, sElementLabel);
|
|
243
|
+
var sCreationDate = mChangeInformation.change.getCreation();
|
|
244
|
+
var oDate = new Date(sCreationDate);
|
|
245
|
+
var sFallbackDate = oRtaResourceBundle.getText("TXT_CHANGEVISUALIZATION_CREATED_IN_SESSION_DATE");
|
|
246
|
+
var sFullDate = sCreationDate ? DateFormat.getDateTimeInstance().format(oDate) : sFallbackDate;
|
|
247
|
+
var sRelativeDate = sCreationDate ? DateFormat.getDateTimeInstance({relative: "true"}).format(oDate) : sFallbackDate;
|
|
248
|
+
var sDetailButtonText = oDescription && oDescription.buttonText;
|
|
311
249
|
return {
|
|
312
250
|
id: mChangeInformation.id,
|
|
313
251
|
change: mChangeInformation,
|
|
314
252
|
changeTitle: sChangeTitle,
|
|
315
253
|
description: sChangeText,
|
|
316
|
-
|
|
317
|
-
|
|
254
|
+
fullDate: sFullDate,
|
|
255
|
+
relativeDate: sRelativeDate,
|
|
256
|
+
detailButtonText: sDetailButtonText
|
|
318
257
|
};
|
|
319
258
|
};
|
|
320
259
|
|
|
@@ -342,7 +281,6 @@ sap.ui.define([
|
|
|
342
281
|
var sChangeId = this.getChanges().length > 1
|
|
343
282
|
? oEvent.getSource().getBindingContext("details").getObject().id
|
|
344
283
|
: this.getChanges()[0].id;
|
|
345
|
-
|
|
346
284
|
this.fireSelectChange({
|
|
347
285
|
changeId: sChangeId
|
|
348
286
|
});
|
|
@@ -3,15 +3,16 @@
|
|
|
3
3
|
xmlns="sap.m"
|
|
4
4
|
xmlns:l="sap.ui.layout">
|
|
5
5
|
<Popover
|
|
6
|
-
|
|
6
|
+
showHeader="false"
|
|
7
7
|
placement="PreferredTopOrFlip"
|
|
8
8
|
class="sapUiRtaPopover">
|
|
9
|
+
<Label visible="false" text="Changes"/>
|
|
9
10
|
<Table
|
|
11
|
+
ariaLabelledBy="Changes"
|
|
10
12
|
items="{details>/}"
|
|
11
13
|
inset="false"
|
|
12
14
|
fixedLayout="false"
|
|
13
|
-
width="auto"
|
|
14
|
-
visible="{= ${details>/}.length > 1}">
|
|
15
|
+
width="auto">
|
|
15
16
|
<columns>
|
|
16
17
|
<Column
|
|
17
18
|
width="auto">
|
|
@@ -25,50 +26,27 @@
|
|
|
25
26
|
width="auto">
|
|
26
27
|
<Text text="{i18n>TIT_CHANGEVISUALIZATION_DATE}" />
|
|
27
28
|
</Column>
|
|
28
|
-
<Column
|
|
29
|
-
width="auto">
|
|
30
|
-
<Text text="{i18n>TIT_CHANGEVISUALIZATION_DETAILS}" />
|
|
31
|
-
</Column>
|
|
32
29
|
</columns>
|
|
33
30
|
<items>
|
|
34
31
|
<ColumnListItem>
|
|
35
32
|
<cells>
|
|
36
33
|
<Text
|
|
37
34
|
text="{details>changeTitle}" />
|
|
35
|
+
<HBox alignItems="Center">
|
|
36
|
+
<Text
|
|
37
|
+
text="{details>description}"/>
|
|
38
|
+
<Button
|
|
39
|
+
visible="{= !!${details>detailButtonText}}"
|
|
40
|
+
text="{details>detailButtonText}"
|
|
41
|
+
press="._showDependentElements"
|
|
42
|
+
class="sapUiTinyMarginBegin"/>
|
|
43
|
+
</HBox>
|
|
38
44
|
<Text
|
|
39
|
-
text="{details>
|
|
40
|
-
|
|
41
|
-
text="{details>date}" />
|
|
42
|
-
<Button
|
|
43
|
-
visible="{details>enableDetailButton}"
|
|
44
|
-
icon="sap-icon://display"
|
|
45
|
-
press="._showDependentElements"/>
|
|
45
|
+
text="{details>relativeDate}"
|
|
46
|
+
tooltip="{details>fullDate}"/>
|
|
46
47
|
</cells>
|
|
47
48
|
</ColumnListItem>
|
|
48
49
|
</items>
|
|
49
50
|
</Table>
|
|
50
|
-
<l:VerticalLayout
|
|
51
|
-
visible="{= ${details>/}.length === 1}">
|
|
52
|
-
<Text
|
|
53
|
-
text="{details>/0/description}"
|
|
54
|
-
class="sapUiTinyMargin"/>
|
|
55
|
-
<Text
|
|
56
|
-
text="{details>/0/date}"
|
|
57
|
-
class="sapUiTinyMargin"/>
|
|
58
|
-
</l:VerticalLayout>
|
|
59
|
-
<footer>
|
|
60
|
-
<FlexBox
|
|
61
|
-
direction="RowReverse"
|
|
62
|
-
visible="{= ${details>/}.length === 1}">
|
|
63
|
-
<items>
|
|
64
|
-
<Button
|
|
65
|
-
visible="{details>/0/enableDetailButton}"
|
|
66
|
-
text="{i18n>TIT_CHANGEVISUALIZATION_DETAILS}"
|
|
67
|
-
icon="sap-icon://display"
|
|
68
|
-
press="._showDependentElements"
|
|
69
|
-
class="sapUiTinyMargin"/>
|
|
70
|
-
</items>
|
|
71
|
-
</FlexBox>
|
|
72
|
-
</footer>
|
|
73
51
|
</Popover>
|
|
74
52
|
</core:FragmentDefinition>
|
|
@@ -25,9 +25,8 @@ 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.97.0
|
|
29
29
|
* @private
|
|
30
|
-
* @ui5-restricted
|
|
31
30
|
*/
|
|
32
31
|
var ChangeIndicatorRegistry = ManagedObject.extend("sap.ui.rta.util.changeVisualization.ChangeIndicatorRegistry", {
|
|
33
32
|
metadata: {
|