@openui5/sap.ui.rta 1.138.0 → 1.140.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/README.md +1 -1
- package/REUSE.toml +8 -1
- package/THIRDPARTY.txt +72 -66
- package/package.json +7 -7
- package/src/sap/ui/rta/.library +1 -1
- package/src/sap/ui/rta/Client.js +1 -1
- package/src/sap/ui/rta/RuntimeAuthoring.js +75 -122
- package/src/sap/ui/rta/Utils.js +1 -1
- package/src/sap/ui/rta/appVariant/AppVariantDialog.js +5 -4
- package/src/sap/ui/rta/appVariant/AppVariantManager.js +7 -30
- package/src/sap/ui/rta/appVariant/AppVariantUtils.js +6 -41
- package/src/sap/ui/rta/appVariant/Feature.js +5 -4
- package/src/sap/ui/rta/command/AddIFrame.js +12 -5
- 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/AnnotationCommand.js +1 -1
- package/src/sap/ui/rta/command/BaseCommand.js +1 -1
- package/src/sap/ui/rta/command/BindProperty.js +1 -1
- package/src/sap/ui/rta/command/Combine.js +1 -1
- package/src/sap/ui/rta/command/CommandFactory.js +1 -1
- package/src/sap/ui/rta/command/CompositeCommand.js +1 -1
- package/src/sap/ui/rta/command/ControlVariantConfigure.js +1 -1
- package/src/sap/ui/rta/command/ControlVariantSave.js +1 -1
- package/src/sap/ui/rta/command/ControlVariantSaveAs.js +1 -1
- package/src/sap/ui/rta/command/ControlVariantSetTitle.js +1 -1
- package/src/sap/ui/rta/command/ControlVariantSwitch.js +1 -1
- package/src/sap/ui/rta/command/CreateContainer.js +1 -1
- package/src/sap/ui/rta/command/CustomAdd.js +1 -1
- package/src/sap/ui/rta/command/ExtendControllerCommand.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/ManifestCommand.js +1 -1
- package/src/sap/ui/rta/command/Move.js +1 -1
- package/src/sap/ui/rta/command/Property.js +1 -1
- package/src/sap/ui/rta/command/Remove.js +1 -1
- package/src/sap/ui/rta/command/Rename.js +1 -1
- package/src/sap/ui/rta/command/Resize.js +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/compVariant/CompVariantContent.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/command/manifest/AddLibrary.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 +50 -20
- package/src/sap/ui/rta/messagebundle_ar.properties +34 -18
- package/src/sap/ui/rta/messagebundle_bg.properties +34 -18
- package/src/sap/ui/rta/messagebundle_ca.properties +34 -18
- package/src/sap/ui/rta/messagebundle_cnr.properties +32 -16
- package/src/sap/ui/rta/messagebundle_cs.properties +33 -17
- package/src/sap/ui/rta/messagebundle_cy.properties +31 -15
- package/src/sap/ui/rta/messagebundle_da.properties +33 -17
- package/src/sap/ui/rta/messagebundle_de.properties +32 -16
- package/src/sap/ui/rta/messagebundle_el.properties +34 -18
- package/src/sap/ui/rta/messagebundle_en.properties +34 -18
- package/src/sap/ui/rta/messagebundle_en_GB.properties +34 -18
- package/src/sap/ui/rta/messagebundle_en_US_saprigi.properties +33 -18
- package/src/sap/ui/rta/messagebundle_es.properties +34 -18
- package/src/sap/ui/rta/messagebundle_es_MX.properties +40 -24
- package/src/sap/ui/rta/messagebundle_et.properties +33 -17
- package/src/sap/ui/rta/messagebundle_fi.properties +32 -16
- package/src/sap/ui/rta/messagebundle_fr.properties +34 -18
- package/src/sap/ui/rta/messagebundle_fr_CA.properties +32 -16
- package/src/sap/ui/rta/messagebundle_hi.properties +33 -17
- package/src/sap/ui/rta/messagebundle_hr.properties +33 -17
- package/src/sap/ui/rta/messagebundle_hu.properties +33 -17
- package/src/sap/ui/rta/messagebundle_id.properties +36 -20
- package/src/sap/ui/rta/messagebundle_it.properties +33 -17
- package/src/sap/ui/rta/messagebundle_iw.properties +33 -17
- package/src/sap/ui/rta/messagebundle_ja.properties +34 -18
- package/src/sap/ui/rta/messagebundle_kk.properties +34 -18
- package/src/sap/ui/rta/messagebundle_ko.properties +32 -16
- package/src/sap/ui/rta/messagebundle_lt.properties +32 -16
- package/src/sap/ui/rta/messagebundle_lv.properties +33 -17
- package/src/sap/ui/rta/messagebundle_mk.properties +33 -17
- package/src/sap/ui/rta/messagebundle_ms.properties +33 -17
- package/src/sap/ui/rta/messagebundle_nl.properties +33 -17
- package/src/sap/ui/rta/messagebundle_no.properties +33 -17
- package/src/sap/ui/rta/messagebundle_pl.properties +33 -17
- package/src/sap/ui/rta/messagebundle_pt.properties +34 -18
- package/src/sap/ui/rta/messagebundle_pt_PT.properties +34 -18
- package/src/sap/ui/rta/messagebundle_ro.properties +32 -16
- package/src/sap/ui/rta/messagebundle_ru.properties +33 -17
- package/src/sap/ui/rta/messagebundle_sh.properties +32 -16
- package/src/sap/ui/rta/messagebundle_sk.properties +33 -17
- package/src/sap/ui/rta/messagebundle_sl.properties +32 -16
- package/src/sap/ui/rta/messagebundle_sr.properties +32 -16
- package/src/sap/ui/rta/messagebundle_sv.properties +33 -17
- package/src/sap/ui/rta/messagebundle_th.properties +34 -18
- package/src/sap/ui/rta/messagebundle_tr.properties +33 -17
- package/src/sap/ui/rta/messagebundle_uk.properties +33 -17
- package/src/sap/ui/rta/messagebundle_vi.properties +36 -20
- package/src/sap/ui/rta/messagebundle_zh_CN.properties +33 -17
- package/src/sap/ui/rta/messagebundle_zh_TW.properties +33 -17
- package/src/sap/ui/rta/plugin/AddXMLAtExtensionPoint.js +10 -10
- package/src/sap/ui/rta/plugin/AddXMLPlugin.js +3 -2
- package/src/sap/ui/rta/plugin/BaseCreate.js +1 -1
- package/src/sap/ui/rta/plugin/Combine.js +1 -1
- package/src/sap/ui/rta/plugin/ControlVariant.js +1 -1
- package/src/sap/ui/rta/plugin/CreateContainer.js +57 -35
- 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/ExtendControllerPlugin.js +3 -2
- 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 +1 -1
- package/src/sap/ui/rta/plugin/Resize.js +1 -1
- package/src/sap/ui/rta/plugin/Selection.js +1 -1
- package/src/sap/ui/rta/plugin/Settings.js +1 -1
- package/src/sap/ui/rta/plugin/Split.js +1 -1
- package/src/sap/ui/rta/plugin/Stretch.js +1 -1
- package/src/sap/ui/rta/plugin/additionalElements/ActionExtractor.js +1 -1
- package/src/sap/ui/rta/plugin/additionalElements/AddElementsDialog.js +1 -1
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsPlugin.js +1 -1
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsUtils.js +1 -1
- package/src/sap/ui/rta/plugin/additionalElements/CommandBuilder.js +1 -1
- package/src/sap/ui/rta/plugin/annotations/AnnotationChangeDialog.js +1 -1
- package/src/sap/ui/rta/plugin/annotations/AnnotationChangeDialogController.js +1 -1
- package/src/sap/ui/rta/plugin/annotations/AnnotationPlugin.js +1 -1
- package/src/sap/ui/rta/plugin/iframe/AddIFrame.js +1 -1
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.fragment.xml +254 -201
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.js +28 -75
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialogController.js +49 -11
- package/src/sap/ui/rta/plugin/rename/Rename.js +1 -1
- package/src/sap/ui/rta/plugin/rename/RenameDialog.fragment.xml +2 -2
- package/src/sap/ui/rta/plugin/rename/RenameDialog.js +40 -25
- package/src/sap/ui/rta/service/Action.js +1 -1
- package/src/sap/ui/rta/service/ControllerExtension.js +1 -1
- package/src/sap/ui/rta/service/Outline.js +1 -1
- package/src/sap/ui/rta/service/Property.js +1 -1
- package/src/sap/ui/rta/service/Selection.js +1 -1
- package/src/sap/ui/rta/service/SupportTools.js +1 -1
- package/src/sap/ui/rta/themes/base/AddIFrame.less +23 -33
- package/src/sap/ui/rta/toolbar/ActionsMenu.fragment.xml +1 -1
- package/src/sap/ui/rta/toolbar/Adaptation.js +4 -3
- package/src/sap/ui/rta/toolbar/Base.js +7 -7
- package/src/sap/ui/rta/toolbar/Fiori.js +9 -14
- package/src/sap/ui/rta/toolbar/FioriLike.js +2 -2
- package/src/sap/ui/rta/toolbar/OverflowToolbarButton.js +1 -1
- package/src/sap/ui/rta/toolbar/Standalone.js +3 -3
- package/src/sap/ui/rta/toolbar/contextBased/SaveAsAdaptation.js +1 -1
- package/src/sap/ui/rta/toolbar/translation/Translation.js +1 -1
- package/src/sap/ui/rta/toolbar/versioning/Versioning.js +1 -1
- package/src/sap/ui/rta/util/PluginManager.js +1 -1
- package/src/sap/ui/rta/util/PopupManager.js +1 -1
- package/src/sap/ui/rta/util/ReloadManager.js +1 -1
- package/src/sap/ui/rta/util/ServiceEventBus.js +1 -1
- package/src/sap/ui/rta/util/ServiceManager.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicator.js +6 -6
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorRegistry.js +5 -4
- package/src/sap/ui/rta/util/changeVisualization/ChangeVisualization.js +13 -25
- package/src/sap/ui/rta/util/changeVisualization/resolveBinding.js +79 -0
- package/src/sap/ui/rta/util/guidedTour/GuidedTour.js +22 -5
- package/src/sap/ui/rta/util/guidedTour/TourMarker.fragment.xml +1 -1
- package/src/sap/ui/rta/util/guidedTour/content/GeneralTour.js +1 -1
- package/src/sap/ui/rta/util/whatsNew/WhatsNew.js +2 -3
|
@@ -17,10 +17,8 @@ sap.ui.define([
|
|
|
17
17
|
"sap/ui/dt/DOMUtil",
|
|
18
18
|
"sap/ui/dt/ElementUtil",
|
|
19
19
|
"sap/ui/dt/Overlay",
|
|
20
|
-
"sap/ui/dt/OverlayRegistry",
|
|
21
20
|
"sap/ui/dt/Util",
|
|
22
21
|
"sap/ui/events/KeyCodes",
|
|
23
|
-
"sap/ui/fl/apply/_internal/flexState/ManifestUtils",
|
|
24
22
|
"sap/ui/fl/apply/api/FlexRuntimeInfoAPI",
|
|
25
23
|
"sap/ui/fl/initial/api/Version",
|
|
26
24
|
"sap/ui/fl/write/api/ContextBasedAdaptationsAPI",
|
|
@@ -66,10 +64,8 @@ sap.ui.define([
|
|
|
66
64
|
DOMUtil,
|
|
67
65
|
ElementUtil,
|
|
68
66
|
Overlay,
|
|
69
|
-
OverlayRegistry,
|
|
70
67
|
DtUtil,
|
|
71
68
|
KeyCodes,
|
|
72
|
-
ManifestUtils,
|
|
73
69
|
FlexRuntimeInfoAPI,
|
|
74
70
|
Version,
|
|
75
71
|
ContextBasedAdaptationsAPI,
|
|
@@ -110,6 +106,7 @@ sap.ui.define([
|
|
|
110
106
|
const STARTED = "STARTED";
|
|
111
107
|
const STOPPED = "STOPPED";
|
|
112
108
|
const FAILED = "FAILED";
|
|
109
|
+
const sParametersAfterRestartKey = "sap.ui.rta.RuntimeAuthoring.parametersAfterRestart";
|
|
113
110
|
|
|
114
111
|
/**
|
|
115
112
|
* Constructor for a new sap.ui.rta.RuntimeAuthoring class.
|
|
@@ -117,7 +114,7 @@ sap.ui.define([
|
|
|
117
114
|
* @class The runtime authoring allows to adapt the fields of a running application.
|
|
118
115
|
* @extends sap.ui.base.ManagedObject
|
|
119
116
|
* @author SAP SE
|
|
120
|
-
* @version 1.
|
|
117
|
+
* @version 1.140.0
|
|
121
118
|
* @constructor
|
|
122
119
|
* @private
|
|
123
120
|
* @since 1.30
|
|
@@ -138,19 +135,15 @@ sap.ui.define([
|
|
|
138
135
|
/** Whether the create custom field button should be shown */
|
|
139
136
|
showToolbars: {
|
|
140
137
|
type: "boolean",
|
|
141
|
-
defaultValue: true
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
/** Whether rta is triggered from a dialog button */
|
|
145
|
-
triggeredFromDialog: {
|
|
146
|
-
type: "boolean",
|
|
147
|
-
defaultValue: false
|
|
138
|
+
defaultValue: true,
|
|
139
|
+
group: "restoreAfterReload"
|
|
148
140
|
},
|
|
149
141
|
|
|
150
142
|
/** Whether the window unload dialog should be shown */
|
|
151
143
|
showWindowUnloadDialog: {
|
|
152
144
|
type: "boolean",
|
|
153
|
-
defaultValue: true
|
|
145
|
+
defaultValue: true,
|
|
146
|
+
group: "restoreAfterReload"
|
|
154
147
|
},
|
|
155
148
|
|
|
156
149
|
/** sap.ui.rta.command.Stack */
|
|
@@ -166,7 +159,8 @@ sap.ui.define([
|
|
|
166
159
|
defaultValue: {
|
|
167
160
|
layer: Layer.CUSTOMER,
|
|
168
161
|
developerMode: true
|
|
169
|
-
}
|
|
162
|
+
},
|
|
163
|
+
group: "restoreAfterReload"
|
|
170
164
|
},
|
|
171
165
|
|
|
172
166
|
/** Defines view state of key user adaptation. Possible values: adaptation, navigation, visualization */
|
|
@@ -180,11 +174,18 @@ sap.ui.define([
|
|
|
180
174
|
*/
|
|
181
175
|
metadataScope: {
|
|
182
176
|
type: "string",
|
|
183
|
-
defaultValue: "default"
|
|
177
|
+
defaultValue: "default",
|
|
178
|
+
group: "restoreAfterReload"
|
|
179
|
+
},
|
|
180
|
+
|
|
181
|
+
hideReset: {
|
|
182
|
+
type: "boolean",
|
|
183
|
+
defaultValue: false,
|
|
184
|
+
group: "restoreAfterReload"
|
|
184
185
|
}
|
|
185
186
|
},
|
|
186
187
|
events: {
|
|
187
|
-
/** Fired when
|
|
188
|
+
/** Fired when runtime authoring is started */
|
|
188
189
|
start: {
|
|
189
190
|
parameters: {
|
|
190
191
|
editablePluginsCount: {
|
|
@@ -193,10 +194,10 @@ sap.ui.define([
|
|
|
193
194
|
}
|
|
194
195
|
},
|
|
195
196
|
|
|
196
|
-
/** Fired when
|
|
197
|
+
/** Fired when runtime authoring is stopped */
|
|
197
198
|
stop: {},
|
|
198
199
|
|
|
199
|
-
/** Fired when
|
|
200
|
+
/** Fired when runtime authoring failed to start */
|
|
200
201
|
failed: {
|
|
201
202
|
parameters: {
|
|
202
203
|
error: {
|
|
@@ -230,7 +231,6 @@ sap.ui.define([
|
|
|
230
231
|
_bNavigationModeWarningShown: false,
|
|
231
232
|
// eslint-disable-next-line object-shorthand
|
|
232
233
|
constructor: function(...aArgs) {
|
|
233
|
-
// call parent constructor
|
|
234
234
|
ManagedObject.apply(this, aArgs);
|
|
235
235
|
|
|
236
236
|
this._dependents = {};
|
|
@@ -261,11 +261,8 @@ sap.ui.define([
|
|
|
261
261
|
return FeaturesAPI.isSeenFeaturesAvailable();
|
|
262
262
|
}.bind(this))
|
|
263
263
|
.then(function(bIsAvailable) {
|
|
264
|
-
|
|
265
|
-
const sWhatsNewReloadFlag = "sap.ui.rta.dontShowWhatsNewAfterReload";
|
|
266
|
-
if (bIsAvailable && !window.sessionStorage.getItem(sWhatsNewReloadFlag)) {
|
|
264
|
+
if (bIsAvailable) {
|
|
267
265
|
this.addDependent(new WhatsNew({ layer: this.getLayer() }), "whatsNew");
|
|
268
|
-
window.sessionStorage.setItem(sWhatsNewReloadFlag, true);
|
|
269
266
|
}
|
|
270
267
|
this.addDependent(new GuidedTour(), "guidedTour");
|
|
271
268
|
return Promise.resolve();
|
|
@@ -273,6 +270,25 @@ sap.ui.define([
|
|
|
273
270
|
}
|
|
274
271
|
});
|
|
275
272
|
|
|
273
|
+
RuntimeAuthoring.prototype.applySettings = function(...aArgs) {
|
|
274
|
+
const oSettings = { ...aArgs[0] };
|
|
275
|
+
|
|
276
|
+
const mParametersAfterRestart = window.sessionStorage.getItem(sParametersAfterRestartKey);
|
|
277
|
+
const aSupportedProperties = Object.values(this.getMetadata().getProperties())
|
|
278
|
+
.filter((oProperty) => oProperty.group === "restoreAfterReload");
|
|
279
|
+
|
|
280
|
+
if (mParametersAfterRestart) {
|
|
281
|
+
const aProperties = JSON.parse(mParametersAfterRestart);
|
|
282
|
+
aProperties.forEach(function(oProperty) {
|
|
283
|
+
if (aSupportedProperties.find((oSupportedProperty) => oSupportedProperty.name === oProperty.name)) {
|
|
284
|
+
oSettings[oProperty.name] = oProperty.value;
|
|
285
|
+
}
|
|
286
|
+
});
|
|
287
|
+
window.sessionStorage.removeItem(sParametersAfterRestartKey);
|
|
288
|
+
}
|
|
289
|
+
ManagedObject.prototype.applySettings.apply(this, [oSettings, aArgs[1]]);
|
|
290
|
+
};
|
|
291
|
+
|
|
276
292
|
RuntimeAuthoring.prototype.addDependent = function(oObject, sName, bCreateGetter) {
|
|
277
293
|
bCreateGetter = typeof bCreateGetter === "undefined" ? true : !!bCreateGetter;
|
|
278
294
|
if (!(sName in this._dependents)) {
|
|
@@ -429,6 +445,16 @@ sap.ui.define([
|
|
|
429
445
|
adaptationId: this._oContextBasedAdaptationsModel.getProperty("/displayedAdaptation/id")
|
|
430
446
|
});
|
|
431
447
|
if (bReloadTriggered) {
|
|
448
|
+
// After a reload RuntimeAuthoring should be initialized with the same parameters as before the reload
|
|
449
|
+
const aProperties = Object.values(this.getMetadata().getProperties())
|
|
450
|
+
.filter((oProperty) => oProperty.group === "restoreAfterReload")
|
|
451
|
+
.map((oProperty) => {
|
|
452
|
+
return {
|
|
453
|
+
name: oProperty.name,
|
|
454
|
+
value: oProperty.get(this)
|
|
455
|
+
};
|
|
456
|
+
});
|
|
457
|
+
window.sessionStorage.setItem(sParametersAfterRestartKey, JSON.stringify(aProperties));
|
|
432
458
|
// FLP Plugin reacts on this error string and doesn't pass the error on the UI
|
|
433
459
|
throw Error("Reload triggered");
|
|
434
460
|
}
|
|
@@ -476,20 +502,28 @@ sap.ui.define([
|
|
|
476
502
|
}
|
|
477
503
|
setBlockedOnRootElements.call(this, true);
|
|
478
504
|
|
|
479
|
-
const
|
|
505
|
+
const aSeenFeatureIds = await FeaturesAPI.getSeenFeatureIds({ layer: this.getLayer() });
|
|
506
|
+
|
|
507
|
+
const bGuidedTourAutostart = await shouldAutoStartGuidedTour(this.getRootControlInstance(), this.getLayer(), aSeenFeatureIds);
|
|
508
|
+
|
|
509
|
+
// The What's new should only be shown once per session
|
|
510
|
+
const sWhatsNewReloadFlag = "sap.ui.rta.dontShowWhatsNewAfterReload";
|
|
511
|
+
const bShowWhatsNew = this.getWhatsNew && !window.sessionStorage.getItem(sWhatsNewReloadFlag);
|
|
480
512
|
|
|
481
513
|
if (bGuidedTourAutostart) {
|
|
482
514
|
const oGuidedTour = this.getGuidedTour();
|
|
483
515
|
oGuidedTour.attachTourClosed(() => {
|
|
484
|
-
if (
|
|
516
|
+
if (bShowWhatsNew) {
|
|
485
517
|
// we want to exclude the guided tour feature from the whats new dialog if the tour opens before the dialog
|
|
486
518
|
const aExcludeGuidedTourFeature = ["GuidedTour"];
|
|
487
|
-
this.getWhatsNew().initializeWhatsNewDialog(aExcludeGuidedTourFeature);
|
|
519
|
+
this.getWhatsNew().initializeWhatsNewDialog(aSeenFeatureIds, aExcludeGuidedTourFeature);
|
|
520
|
+
window.sessionStorage.setItem(sWhatsNewReloadFlag, true);
|
|
488
521
|
}
|
|
489
522
|
});
|
|
490
523
|
oGuidedTour.autoStart(GeneralTour.getTourContent());
|
|
491
|
-
} else if (
|
|
492
|
-
this.getWhatsNew().initializeWhatsNewDialog();
|
|
524
|
+
} else if (bShowWhatsNew) {
|
|
525
|
+
this.getWhatsNew().initializeWhatsNewDialog(aSeenFeatureIds);
|
|
526
|
+
window.sessionStorage.setItem(sWhatsNewReloadFlag, true);
|
|
493
527
|
}
|
|
494
528
|
|
|
495
529
|
// PopupManager sets the toolbar to already open popups' autoCloseAreas
|
|
@@ -601,7 +635,11 @@ sap.ui.define([
|
|
|
601
635
|
await this._oSerializer.clearCommandStack(/* bRemoveChanges = */true);
|
|
602
636
|
}
|
|
603
637
|
}
|
|
604
|
-
const
|
|
638
|
+
const bSkipRestartViaSessionStorage = window.sessionStorage.getItem("sap.ui.rta.skipReload");
|
|
639
|
+
if (bSkipRestartViaSessionStorage) {
|
|
640
|
+
window.sessionStorage.removeItem("sap.ui.rta.skipReload");
|
|
641
|
+
}
|
|
642
|
+
const oReloadInfo = (bSkipRestart || bSkipRestartViaSessionStorage) ? {} : await ReloadManager.checkReloadOnExit({
|
|
605
643
|
layer: this.getLayer(),
|
|
606
644
|
selector: this.getRootControlInstance(),
|
|
607
645
|
isDraftAvailable: this._oVersionsModel.getProperty("/draftAvailable"),
|
|
@@ -1036,7 +1074,7 @@ sap.ui.define([
|
|
|
1036
1074
|
* @returns {Promise<boolean>} Resolves to a boolean indicating if the guided tour should be started automatically
|
|
1037
1075
|
* @ui5-restricted sap.ui.rta
|
|
1038
1076
|
*/
|
|
1039
|
-
async function shouldAutoStartGuidedTour(oRootControl, sLayer) {
|
|
1077
|
+
async function shouldAutoStartGuidedTour(oRootControl, sLayer, aSeenFeatureIds) {
|
|
1040
1078
|
const aConnectors = FlexUtils.getConnectors();
|
|
1041
1079
|
const aProhibitedConnectors = ["LocalStorageConnector", "SessionStorageConnector"];
|
|
1042
1080
|
const bHasConnectors = aConnectors.length > 0;
|
|
@@ -1073,17 +1111,17 @@ sap.ui.define([
|
|
|
1073
1111
|
sUserId
|
|
1074
1112
|
);
|
|
1075
1113
|
|
|
1076
|
-
|
|
1077
|
-
return false;
|
|
1078
|
-
}
|
|
1114
|
+
let bAutostartGuidedTour = true;
|
|
1079
1115
|
|
|
1080
|
-
|
|
1116
|
+
if (!aHasOwnChanges || aHasOwnChanges.length > 0 || aVersionsFromUser.length > 0 || aSeenFeatureIds.length > 0) {
|
|
1117
|
+
bAutostartGuidedTour = false;
|
|
1118
|
+
}
|
|
1081
1119
|
|
|
1082
1120
|
// UI Adaptation Tour should only be shown once per session
|
|
1083
|
-
if (
|
|
1121
|
+
if (bAutostartGuidedTour) {
|
|
1084
1122
|
window.sessionStorage.setItem(sUIAdaptationTourReloadFlag, true);
|
|
1085
1123
|
}
|
|
1086
|
-
return
|
|
1124
|
+
return bAutostartGuidedTour;
|
|
1087
1125
|
}
|
|
1088
1126
|
|
|
1089
1127
|
function showTechnicalError(vError) {
|
|
@@ -1630,7 +1668,7 @@ sap.ui.define([
|
|
|
1630
1668
|
}
|
|
1631
1669
|
},
|
|
1632
1670
|
restore: {
|
|
1633
|
-
visible: !this._oVersionsModel.getProperty("/versioningEnabled"),
|
|
1671
|
+
visible: !this._oVersionsModel.getProperty("/versioningEnabled") && this.getHideReset() === false,
|
|
1634
1672
|
enabled: this.bInitialResetEnabled
|
|
1635
1673
|
},
|
|
1636
1674
|
contextBasedAdaptation: {
|
|
@@ -1719,86 +1757,6 @@ sap.ui.define([
|
|
|
1719
1757
|
this._oDesignTime.attachEvent("elementOverlayCreated", onElementOverlayCreated, this);
|
|
1720
1758
|
}
|
|
1721
1759
|
|
|
1722
|
-
/**
|
|
1723
|
-
* Triggers a callback when a control gets created and its associated overlay is visible.
|
|
1724
|
-
*
|
|
1725
|
-
* @param {string} sNewControlID - ID of the newly created control
|
|
1726
|
-
* @param {Function} fnCallback - Callback to execute when the conditions are met, the overlay is the only parameter
|
|
1727
|
-
*/
|
|
1728
|
-
function scheduleOnCreatedAndVisible(sNewControlID, fnCallback) {
|
|
1729
|
-
function onGeometryChanged(oEvent) {
|
|
1730
|
-
const oElementOverlay = oEvent.getSource();
|
|
1731
|
-
if (oElementOverlay.getGeometry() && oElementOverlay.getGeometry().visible) {
|
|
1732
|
-
oElementOverlay.detachEvent("geometryChanged", onGeometryChanged);
|
|
1733
|
-
fnCallback(oElementOverlay);
|
|
1734
|
-
}
|
|
1735
|
-
}
|
|
1736
|
-
|
|
1737
|
-
function onGeometryCheck(oElementOverlay) {
|
|
1738
|
-
// the control can be set to visible, but still have no size when we do the check
|
|
1739
|
-
// that's why we also attach to 'geometryChanged' and check if the overlay has a size
|
|
1740
|
-
if (!oElementOverlay.getGeometry() || !oElementOverlay.getGeometry().visible) {
|
|
1741
|
-
oElementOverlay.attachEvent("geometryChanged", onGeometryChanged);
|
|
1742
|
-
} else {
|
|
1743
|
-
fnCallback(oElementOverlay);
|
|
1744
|
-
}
|
|
1745
|
-
}
|
|
1746
|
-
|
|
1747
|
-
scheduleOnCreated.call(this, sNewControlID, function(oNewOverlay) {
|
|
1748
|
-
// the overlay needs to be rendered
|
|
1749
|
-
if (oNewOverlay.isRendered()) {
|
|
1750
|
-
onGeometryCheck(oNewOverlay);
|
|
1751
|
-
} else {
|
|
1752
|
-
oNewOverlay.attachEventOnce("afterRendering", function(oEvent) {
|
|
1753
|
-
onGeometryCheck(oEvent.getSource());
|
|
1754
|
-
});
|
|
1755
|
-
}
|
|
1756
|
-
});
|
|
1757
|
-
}
|
|
1758
|
-
|
|
1759
|
-
/**
|
|
1760
|
-
* Function to automatically start the rename plugin on a container when it gets created
|
|
1761
|
-
*
|
|
1762
|
-
* @param {object} vAction - The create action from designtime metadata
|
|
1763
|
-
* @param {string} sNewControlID - The id of the newly created container
|
|
1764
|
-
* @param {string} sNewContainerName - The name of the newly created container
|
|
1765
|
-
*/
|
|
1766
|
-
function scheduleRenameOnCreatedContainer(vAction, sNewControlID, sNewContainerName) {
|
|
1767
|
-
const fnStartEdit = function(oElementOverlay) {
|
|
1768
|
-
if (oElementOverlay.getSelectable()) {
|
|
1769
|
-
oElementOverlay.setSelected(true);
|
|
1770
|
-
} else {
|
|
1771
|
-
// TODO todos#7
|
|
1772
|
-
// The async editableByPlugin evaluation has not finished yet
|
|
1773
|
-
// thus the overlay is not selectable yet and setSelected would fail
|
|
1774
|
-
oElementOverlay.attachEventOnce("selectableChange", () => {
|
|
1775
|
-
oElementOverlay.setSelected(true);
|
|
1776
|
-
});
|
|
1777
|
-
}
|
|
1778
|
-
this.getPluginManager().getPlugin("rename").startEdit(oElementOverlay);
|
|
1779
|
-
}.bind(this);
|
|
1780
|
-
|
|
1781
|
-
scheduleOnCreatedAndVisible.call(this, sNewControlID, async function(oElementOverlay) {
|
|
1782
|
-
// get container of the new control for rename
|
|
1783
|
-
const sNewContainerID = this.getPluginManager().getPlugin("createContainer").getCreatedContainerId(
|
|
1784
|
-
vAction,
|
|
1785
|
-
oElementOverlay.getElement().getId()
|
|
1786
|
-
);
|
|
1787
|
-
const oContainerElementOverlay = OverlayRegistry.getOverlay(sNewContainerID);
|
|
1788
|
-
if (oContainerElementOverlay) {
|
|
1789
|
-
if (sNewContainerName) {
|
|
1790
|
-
await this.getPluginManager().getPlugin("rename").createRenameCommand(oContainerElementOverlay, sNewContainerName);
|
|
1791
|
-
// The create container and rename must be a single command in the stack
|
|
1792
|
-
this.getCommandStack().compositeLastTwoCommands();
|
|
1793
|
-
} else {
|
|
1794
|
-
fnStartEdit(oContainerElementOverlay);
|
|
1795
|
-
}
|
|
1796
|
-
} else {
|
|
1797
|
-
scheduleOnCreatedAndVisible.call(this, sNewContainerID, fnStartEdit);
|
|
1798
|
-
}
|
|
1799
|
-
}.bind(this));
|
|
1800
|
-
}
|
|
1801
|
-
|
|
1802
1760
|
/**
|
|
1803
1761
|
* Function to handle modification of an element
|
|
1804
1762
|
*
|
|
@@ -1809,8 +1767,6 @@ sap.ui.define([
|
|
|
1809
1767
|
// events are synchronously reset after the handlers are called
|
|
1810
1768
|
const oCommand = oEvent.getParameter("command");
|
|
1811
1769
|
const sNewControlID = oEvent.getParameter("newControlId");
|
|
1812
|
-
const vAction = oEvent.getParameter("action");
|
|
1813
|
-
const sContainerTitle = oEvent.getParameter("title");
|
|
1814
1770
|
|
|
1815
1771
|
this._pElementModified = this._pElementModified.then(function() {
|
|
1816
1772
|
this.getPluginManager().handleStopCutPaste();
|
|
@@ -1824,9 +1780,6 @@ sap.ui.define([
|
|
|
1824
1780
|
fnSelect(oElementOverlay.getElement());
|
|
1825
1781
|
}
|
|
1826
1782
|
});
|
|
1827
|
-
if (vAction) {
|
|
1828
|
-
scheduleRenameOnCreatedContainer.call(this, vAction, sNewControlID, sContainerTitle);
|
|
1829
|
-
}
|
|
1830
1783
|
}
|
|
1831
1784
|
return this.getCommandStack().pushAndExecute(oCommand)
|
|
1832
1785
|
// Error handling when a command fails is done in the Stack
|
package/src/sap/ui/rta/Utils.js
CHANGED
|
@@ -97,7 +97,7 @@ sap.ui.define([
|
|
|
97
97
|
|
|
98
98
|
function _handleSearch(oEvent) {
|
|
99
99
|
var sValue = oEvent.getParameter("value");
|
|
100
|
-
var oFilter = new Filter("
|
|
100
|
+
var oFilter = new Filter("text", FilterOperator.Contains, sValue);
|
|
101
101
|
var oBinding = oEvent.getSource().getBinding("items");
|
|
102
102
|
oBinding.filter([oFilter]);
|
|
103
103
|
}
|
|
@@ -136,7 +136,7 @@ sap.ui.define([
|
|
|
136
136
|
oSelectDialog.bindAggregation("items", {
|
|
137
137
|
path: "/icons",
|
|
138
138
|
template: new StandardListItem({
|
|
139
|
-
title: "{
|
|
139
|
+
title: "{text}",
|
|
140
140
|
description: "",
|
|
141
141
|
icon: "{icon}",
|
|
142
142
|
iconDensityAware: false,
|
|
@@ -149,10 +149,11 @@ sap.ui.define([
|
|
|
149
149
|
var aIcons = [];
|
|
150
150
|
|
|
151
151
|
aUI5Icons.forEach(function(sName) {
|
|
152
|
-
|
|
152
|
+
const iconInfo = IconPool.getIconInfo(sName);
|
|
153
153
|
aIcons.push({
|
|
154
154
|
icon: iconInfo.uri,
|
|
155
|
-
name:
|
|
155
|
+
name: iconInfo.name,
|
|
156
|
+
text: iconInfo.text || sName.toLowerCase()
|
|
156
157
|
});
|
|
157
158
|
});
|
|
158
159
|
|
|
@@ -24,7 +24,7 @@ sap.ui.define([
|
|
|
24
24
|
* @class
|
|
25
25
|
* @extends sap.ui.base.ManagedObject
|
|
26
26
|
* @author SAP SE
|
|
27
|
-
* @version 1.
|
|
27
|
+
* @version 1.140.0
|
|
28
28
|
* @constructor
|
|
29
29
|
* @private
|
|
30
30
|
* @since 1.53
|
|
@@ -82,7 +82,8 @@ sap.ui.define([
|
|
|
82
82
|
* @description Creates all the manifest inline changes for different change types.
|
|
83
83
|
*/
|
|
84
84
|
AppVariantManager.prototype.createAllInlineChanges = function(oAppVariantSpecificData, vSelector) {
|
|
85
|
-
|
|
85
|
+
// TODO Refactor, this sets a global as side effect
|
|
86
|
+
AppVariantUtils.getId(oAppVariantSpecificData.referenceAppId);
|
|
86
87
|
const aAllInlineChangeOperations = [];
|
|
87
88
|
let oPropertyChange = {};
|
|
88
89
|
|
|
@@ -102,44 +103,20 @@ sap.ui.define([
|
|
|
102
103
|
oPropertyChange = AppVariantUtils.getInlineChangeInputIcon(oAppVariantSpecificData.icon);
|
|
103
104
|
aAllInlineChangeOperations.push(AppVariantUtils.createInlineChange(oPropertyChange, "appdescr_ui_setIcon", vSelector));
|
|
104
105
|
|
|
105
|
-
|
|
106
|
-
return AppVariantUtils.getInboundInfo(oAppVariantSpecificData.inbounds)
|
|
107
|
-
.then(function(oInboundInfo) {
|
|
108
|
-
const sCurrentRunningInboundId = oInboundInfo.currentRunningInbound;
|
|
109
|
-
|
|
110
|
-
// If there is no inbound, create a new inbound
|
|
111
|
-
if (oInboundInfo.addNewInboundRequired) {
|
|
112
|
-
// create a inline change using a change type 'appdescr_app_addNewInbound'
|
|
113
|
-
const oInlineChangePromise = AppVariantUtils.prepareAddNewInboundChange(sCurrentRunningInboundId, sAppVariantId, oAppVariantSpecificData)
|
|
114
|
-
.then(function(oPropertyChange) {
|
|
115
|
-
return AppVariantUtils.createInlineChange(oPropertyChange, "appdescr_app_addNewInbound", vSelector);
|
|
116
|
-
});
|
|
117
|
-
|
|
118
|
-
aAllInlineChangeOperations.push(oInlineChangePromise);
|
|
119
|
-
} else {
|
|
120
|
-
// create a inline change using a change type 'appdescr_app_changeInbound'
|
|
121
|
-
oPropertyChange = AppVariantUtils.prepareChangeInboundChange(sCurrentRunningInboundId, sAppVariantId, oAppVariantSpecificData);
|
|
122
|
-
aAllInlineChangeOperations.push(AppVariantUtils.createInlineChange(oPropertyChange, "appdescr_app_changeInbound", vSelector));
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
// remove all other inbounds except appVariant inbound
|
|
126
|
-
// create a inline change using a change type 'appdescr_app_removeAllInboundsExceptOne'
|
|
127
|
-
oPropertyChange = AppVariantUtils.prepareRemoveAllInboundsExceptOneChange(sCurrentRunningInboundId);
|
|
128
|
-
aAllInlineChangeOperations.push(AppVariantUtils.createInlineChange(oPropertyChange, "appdescr_app_removeAllInboundsExceptOne", vSelector));
|
|
129
|
-
|
|
130
|
-
return Promise.all(aAllInlineChangeOperations);
|
|
131
|
-
});
|
|
106
|
+
return Promise.all(aAllInlineChangeOperations);
|
|
132
107
|
};
|
|
133
108
|
|
|
134
109
|
/**
|
|
135
110
|
* @param {string} sAppVariantId - Application variant ID
|
|
111
|
+
* @param {object} oParsedHash - Parsed Hash containing semantic object, action and parameters for inbound
|
|
136
112
|
* @param {sap.ui.fl.Selector} vSelector - Selector
|
|
137
113
|
* @returns {Promise} Resolved promise
|
|
138
114
|
* @description Creates the app variant with all inline changes in backend.
|
|
139
115
|
*/
|
|
140
|
-
AppVariantManager.prototype.createAppVariant = function(sAppVariantId, vSelector) {
|
|
116
|
+
AppVariantManager.prototype.createAppVariant = function(sAppVariantId, oParsedHash, vSelector) {
|
|
141
117
|
const mPropertyBag = {
|
|
142
118
|
id: sAppVariantId,
|
|
119
|
+
parsedHash: oParsedHash,
|
|
143
120
|
layer: this.getLayer()
|
|
144
121
|
};
|
|
145
122
|
return AppVariantUtils.createAppVariant(vSelector, mPropertyBag);
|
|
@@ -148,52 +148,17 @@ sap.ui.define([
|
|
|
148
148
|
};
|
|
149
149
|
};
|
|
150
150
|
|
|
151
|
-
AppVariantUtils.
|
|
152
|
-
var oInboundInfo = {};
|
|
153
|
-
if (!oInbounds) {
|
|
154
|
-
oInboundInfo.currentRunningInbound = "customer.savedAsAppVariant";
|
|
155
|
-
oInboundInfo.addNewInboundRequired = true;
|
|
156
|
-
return Promise.resolve(oInboundInfo);
|
|
157
|
-
}
|
|
158
|
-
|
|
151
|
+
AppVariantUtils.getParsedHash = function() {
|
|
159
152
|
return FlexUtils.getUShellService("URLParsing")
|
|
160
153
|
.then(function(oURLParsingService) {
|
|
161
154
|
return FlexUtils.getParsedURLHash(oURLParsingService);
|
|
162
155
|
})
|
|
163
156
|
.then(function(oParsedHash) {
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
return {
|
|
170
|
-
currentRunningInbound: "customer.savedAsAppVariant",
|
|
171
|
-
addNewInboundRequired: false
|
|
172
|
-
};
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
aInbounds.forEach(function(sInboundId) {
|
|
176
|
-
if ((oInbounds[sInboundId].action === oParsedHash.action) && (oInbounds[sInboundId].semanticObject === oParsedHash.semanticObject)) {
|
|
177
|
-
aInboundsFound.push(sInboundId);
|
|
178
|
-
}
|
|
179
|
-
});
|
|
180
|
-
|
|
181
|
-
switch (aInboundsFound.length) {
|
|
182
|
-
case 0:
|
|
183
|
-
oInboundInfo.currentRunningInbound = "customer.savedAsAppVariant";
|
|
184
|
-
oInboundInfo.addNewInboundRequired = true;
|
|
185
|
-
break;
|
|
186
|
-
case 1:
|
|
187
|
-
[oInboundInfo.currentRunningInbound] = aInboundsFound;
|
|
188
|
-
oInboundInfo.addNewInboundRequired = false;
|
|
189
|
-
break;
|
|
190
|
-
default:
|
|
191
|
-
oInboundInfo.currentRunningInbound = "customer.savedAsAppVariant";
|
|
192
|
-
oInboundInfo.addNewInboundRequired = true;
|
|
193
|
-
break;
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
return oInboundInfo;
|
|
157
|
+
return {
|
|
158
|
+
action: oParsedHash.action,
|
|
159
|
+
semanticObject: oParsedHash.semanticObject,
|
|
160
|
+
params: oParsedHash.params
|
|
161
|
+
};
|
|
197
162
|
});
|
|
198
163
|
};
|
|
199
164
|
|
|
@@ -168,9 +168,9 @@ sap.ui.define([
|
|
|
168
168
|
return FeaturesAPI.isSaveAsAvailable(sCurrentLayer).then(function(bIsSaveAsAvailable) {
|
|
169
169
|
if (bIsSaveAsAvailable) {
|
|
170
170
|
if (oManifest["sap.app"].crossNavigation && oManifest["sap.app"].crossNavigation.inbounds) {
|
|
171
|
-
return AppVariantUtils.
|
|
171
|
+
return AppVariantUtils.getParsedHash(oManifest["sap.app"].crossNavigation.inbounds);
|
|
172
172
|
}
|
|
173
|
-
return AppVariantUtils.
|
|
173
|
+
return AppVariantUtils.getParsedHash();
|
|
174
174
|
}
|
|
175
175
|
return undefined;
|
|
176
176
|
}).then(function(oInboundInfo) {
|
|
@@ -249,11 +249,12 @@ sap.ui.define([
|
|
|
249
249
|
return AppVariantUtils.addChangesToPersistence(aAllInlineChanges, vSelector);
|
|
250
250
|
};
|
|
251
251
|
|
|
252
|
-
const fnCreateAppVariant = function() {
|
|
252
|
+
const fnCreateAppVariant = async function() {
|
|
253
253
|
const sAppVariantId = AppVariantUtils.getNewAppVariantId();
|
|
254
|
+
const oParsedHash = await AppVariantUtils.getParsedHash();
|
|
254
255
|
|
|
255
256
|
// Based on the key user provided info, app variant manifest is created
|
|
256
|
-
return oAppVariantManager.createAppVariant(sAppVariantId, vSelector)
|
|
257
|
+
return oAppVariantManager.createAppVariant(sAppVariantId, oParsedHash, vSelector)
|
|
257
258
|
.catch(function(oError) {
|
|
258
259
|
let sMessageKey = oError.messageKey;
|
|
259
260
|
sMessageKey ||= "MSG_SAVE_APP_VARIANT_FAILED";
|
|
@@ -16,7 +16,7 @@ sap.ui.define([
|
|
|
16
16
|
* @class
|
|
17
17
|
* @extends sap.ui.rta.command.FlexCommand
|
|
18
18
|
* @author SAP SE
|
|
19
|
-
* @version 1.
|
|
19
|
+
* @version 1.140.0
|
|
20
20
|
* @constructor
|
|
21
21
|
* @private
|
|
22
22
|
* @since 1.75
|
|
@@ -87,11 +87,18 @@ sap.ui.define([
|
|
|
87
87
|
|
|
88
88
|
AddIFrame.prototype._getChangeSpecificData = function() {
|
|
89
89
|
var mChangeSpecificData = FlexCommand.prototype._getChangeSpecificData.call(this);
|
|
90
|
-
|
|
91
|
-
delete mChangeSpecificData.changeType;
|
|
90
|
+
const { title: sTitle, ...oContent } = mChangeSpecificData.content;
|
|
92
91
|
return {
|
|
93
|
-
changeType:
|
|
94
|
-
content:
|
|
92
|
+
changeType: mChangeSpecificData.changeType,
|
|
93
|
+
content: oContent,
|
|
94
|
+
texts: sTitle
|
|
95
|
+
? {
|
|
96
|
+
title: {
|
|
97
|
+
value: sTitle,
|
|
98
|
+
type: "XTIT"
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
: {}
|
|
95
102
|
};
|
|
96
103
|
};
|
|
97
104
|
|