@openui5/sap.ui.rta 1.92.0 → 1.95.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/{.eslintrc → .eslintrc.json} +0 -0
- package/.reuse/dep5 +1 -6
- package/THIRDPARTY.txt +4 -10
- 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 +67 -57
- package/src/sap/ui/rta/Utils.js +73 -1
- package/src/sap/ui/rta/appVariant/AppVariantManager.js +1 -1
- package/src/sap/ui/rta/appVariant/S4HanaCloudBackend.js +1 -2
- package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_de.properties +1 -1
- package/src/sap/ui/rta/command/AddIFrame.js +1 -1
- package/src/sap/ui/rta/command/AddProperty.js +1 -1
- package/src/sap/ui/rta/command/AddXML.js +1 -1
- package/src/sap/ui/rta/command/AddXMLAtExtensionPoint.js +1 -1
- package/src/sap/ui/rta/command/AppDescriptorCommand.js +1 -1
- package/src/sap/ui/rta/command/BaseCommand.js +1 -1
- package/src/sap/ui/rta/command/BindProperty.js +1 -1
- package/src/sap/ui/rta/command/Combine.js +1 -1
- package/src/sap/ui/rta/command/CommandFactory.js +146 -125
- package/src/sap/ui/rta/command/CompositeCommand.js +1 -1
- package/src/sap/ui/rta/command/ControlVariantConfigure.js +1 -1
- package/src/sap/ui/rta/command/ControlVariantSave.js +1 -1
- package/src/sap/ui/rta/command/ControlVariantSaveAs.js +1 -1
- package/src/sap/ui/rta/command/ControlVariantSetTitle.js +1 -1
- package/src/sap/ui/rta/command/ControlVariantSwitch.js +1 -1
- package/src/sap/ui/rta/command/CreateContainer.js +1 -1
- package/src/sap/ui/rta/command/CustomAdd.js +1 -1
- package/src/sap/ui/rta/command/FlexCommand.js +25 -14
- package/src/sap/ui/rta/command/LREPSerializer.js +25 -24
- 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 +2 -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/TestDelegate.js +47 -37
- package/src/sap/ui/rta/enablement/elementActionTest.js +29 -33
- package/src/sap/ui/rta/library.js +2 -2
- package/src/sap/ui/rta/messagebundle.properties +36 -4
- package/src/sap/ui/rta/messagebundle_ar.properties +17 -1
- package/src/sap/ui/rta/messagebundle_bg.properties +17 -1
- package/src/sap/ui/rta/messagebundle_ca.properties +17 -1
- package/src/sap/ui/rta/messagebundle_cs.properties +17 -1
- package/src/sap/ui/rta/messagebundle_cy.properties +17 -1
- package/src/sap/ui/rta/messagebundle_da.properties +17 -1
- package/src/sap/ui/rta/messagebundle_de.properties +32 -16
- package/src/sap/ui/rta/messagebundle_el.properties +18 -2
- package/src/sap/ui/rta/messagebundle_en.properties +17 -1
- package/src/sap/ui/rta/messagebundle_en_GB.properties +17 -1
- package/src/sap/ui/rta/messagebundle_en_US_sappsd.properties +18 -2
- package/src/sap/ui/rta/messagebundle_en_US_saprigi.properties +9 -0
- package/src/sap/ui/rta/messagebundle_en_US_saptrc.properties +18 -2
- package/src/sap/ui/rta/messagebundle_es.properties +17 -1
- package/src/sap/ui/rta/messagebundle_es_MX.properties +17 -1
- package/src/sap/ui/rta/messagebundle_et.properties +17 -1
- package/src/sap/ui/rta/messagebundle_fi.properties +19 -3
- package/src/sap/ui/rta/messagebundle_fr.properties +17 -1
- package/src/sap/ui/rta/messagebundle_fr_CA.properties +17 -1
- package/src/sap/ui/rta/messagebundle_hi.properties +17 -1
- package/src/sap/ui/rta/messagebundle_hr.properties +17 -1
- package/src/sap/ui/rta/messagebundle_hu.properties +17 -1
- package/src/sap/ui/rta/messagebundle_id.properties +19 -3
- package/src/sap/ui/rta/messagebundle_it.properties +17 -1
- package/src/sap/ui/rta/messagebundle_iw.properties +17 -1
- package/src/sap/ui/rta/messagebundle_ja.properties +17 -1
- package/src/sap/ui/rta/messagebundle_kk.properties +17 -1
- package/src/sap/ui/rta/messagebundle_ko.properties +18 -2
- package/src/sap/ui/rta/messagebundle_lt.properties +17 -1
- package/src/sap/ui/rta/messagebundle_lv.properties +17 -1
- package/src/sap/ui/rta/messagebundle_ms.properties +17 -1
- package/src/sap/ui/rta/messagebundle_nl.properties +17 -1
- package/src/sap/ui/rta/messagebundle_no.properties +17 -1
- package/src/sap/ui/rta/messagebundle_pl.properties +17 -1
- package/src/sap/ui/rta/messagebundle_pt.properties +17 -1
- package/src/sap/ui/rta/messagebundle_pt_PT.properties +17 -1
- package/src/sap/ui/rta/messagebundle_ro.properties +17 -1
- package/src/sap/ui/rta/messagebundle_ru.properties +17 -1
- package/src/sap/ui/rta/messagebundle_sh.properties +17 -1
- package/src/sap/ui/rta/messagebundle_sk.properties +17 -1
- package/src/sap/ui/rta/messagebundle_sl.properties +17 -1
- package/src/sap/ui/rta/messagebundle_sv.properties +19 -3
- package/src/sap/ui/rta/messagebundle_th.properties +17 -1
- package/src/sap/ui/rta/messagebundle_tr.properties +17 -1
- package/src/sap/ui/rta/messagebundle_uk.properties +17 -1
- package/src/sap/ui/rta/messagebundle_vi.properties +17 -1
- package/src/sap/ui/rta/messagebundle_zh_CN.properties +17 -1
- package/src/sap/ui/rta/messagebundle_zh_TW.properties +17 -1
- package/src/sap/ui/rta/plugin/AddXMLAtExtensionPoint.js +1 -1
- package/src/sap/ui/rta/plugin/BaseCreate.js +1 -1
- package/src/sap/ui/rta/plugin/Combine.js +1 -1
- package/src/sap/ui/rta/plugin/ControlVariant.js +1 -1
- 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 +2 -10
- package/src/sap/ui/rta/plugin/Plugin.js +1 -1
- package/src/sap/ui/rta/plugin/RTAElementMover.js +18 -61
- 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 -1
- package/src/sap/ui/rta/plugin/Selection.js +35 -1
- package/src/sap/ui/rta/plugin/Settings.js +15 -14
- package/src/sap/ui/rta/plugin/Split.js +1 -1
- package/src/sap/ui/rta/plugin/Stretch.js +133 -138
- package/src/sap/ui/rta/plugin/additionalElements/ActionExtractor.js +505 -0
- package/src/sap/ui/rta/plugin/additionalElements/AddElementsDialog.js +1 -1
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsAnalyzer.js +10 -7
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsPlugin.js +122 -821
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsUtils.js +117 -0
- package/src/sap/ui/rta/plugin/additionalElements/CommandBuilder.js +337 -0
- package/src/sap/ui/rta/plugin/iframe/AddIFrame.js +1 -1
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.fragment.xml +1 -1
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.js +1 -1
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialogController.js +25 -4
- 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 +109 -62
- package/src/sap/ui/rta/service/Property.js +1 -1
- package/src/sap/ui/rta/service/Selection.js +1 -1
- package/src/sap/ui/rta/themes/base/ChangeVisualization.less +16 -0
- package/src/sap/ui/rta/themes/base/Overlay.less +59 -58
- package/src/sap/ui/rta/themes/sap_hcb/Overlay.less +2 -3
- package/src/sap/ui/rta/toolbar/Adaptation.fragment.xml +63 -44
- package/src/sap/ui/rta/toolbar/Adaptation.js +49 -37
- package/src/sap/ui/rta/toolbar/AdaptationRenderer.js +4 -5
- package/src/sap/ui/rta/toolbar/Base.js +76 -25
- package/src/sap/ui/rta/toolbar/BaseRenderer.js +2 -2
- package/src/sap/ui/rta/toolbar/Fiori.js +9 -9
- package/src/sap/ui/rta/toolbar/FioriLike.js +4 -4
- package/src/sap/ui/rta/toolbar/OverflowToolbarButton.js +98 -0
- package/src/sap/ui/rta/toolbar/Personalization.js +8 -8
- package/src/sap/ui/rta/toolbar/Standalone.js +4 -4
- package/src/sap/ui/rta/toolbar/translation/DownloadTranslationDialog.fragment.xml +39 -0
- package/src/sap/ui/rta/toolbar/translation/Translation.js +128 -0
- package/src/sap/ui/rta/toolbar/translation/TranslationPopover.fragment.xml +19 -0
- package/src/sap/ui/rta/util/BindingsExtractor.js +35 -31
- 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/ServiceEventBus.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicator.js +21 -2
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorRegistry.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/ChangeVisualization.js +42 -38
|
@@ -5,22 +5,26 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
sap.ui.define([
|
|
8
|
-
"sap/ui/core/Fragment",
|
|
9
8
|
"sap/ui/core/format/DateFormat",
|
|
10
|
-
"sap/ui/
|
|
11
|
-
"./Base",
|
|
9
|
+
"sap/ui/core/Fragment",
|
|
12
10
|
"sap/ui/core/library",
|
|
13
11
|
"sap/ui/fl/library",
|
|
14
|
-
"sap/ui/rta/Utils"
|
|
12
|
+
"sap/ui/rta/Utils",
|
|
13
|
+
"sap/ui/rta/toolbar/translation/Translation",
|
|
14
|
+
"sap/ui/rta/appVariant/Feature",
|
|
15
|
+
"sap/ui/rta/toolbar/Base",
|
|
16
|
+
"sap/ui/Device"
|
|
15
17
|
],
|
|
16
18
|
function(
|
|
17
|
-
Fragment,
|
|
18
19
|
DateFormat,
|
|
19
|
-
|
|
20
|
-
Base,
|
|
20
|
+
Fragment,
|
|
21
21
|
coreLibrary,
|
|
22
22
|
flexLibrary,
|
|
23
|
-
Utils
|
|
23
|
+
Utils,
|
|
24
|
+
Translation,
|
|
25
|
+
AppVariantFeature,
|
|
26
|
+
Base,
|
|
27
|
+
Device
|
|
24
28
|
) {
|
|
25
29
|
"use strict";
|
|
26
30
|
|
|
@@ -35,7 +39,7 @@ function(
|
|
|
35
39
|
* @extends sap.ui.rta.toolbar.Base
|
|
36
40
|
*
|
|
37
41
|
* @author SAP SE
|
|
38
|
-
* @version 1.
|
|
42
|
+
* @version 1.95.0
|
|
39
43
|
*
|
|
40
44
|
* @constructor
|
|
41
45
|
* @private
|
|
@@ -58,13 +62,10 @@ function(
|
|
|
58
62
|
restore: {},
|
|
59
63
|
transport: {},
|
|
60
64
|
modeChange: {},
|
|
61
|
-
manageApps: {},
|
|
62
|
-
appVariantOverview: {},
|
|
63
|
-
saveAs: {},
|
|
64
65
|
activate: {},
|
|
65
66
|
discardDraft: {},
|
|
66
67
|
switchVersion: {},
|
|
67
|
-
|
|
68
|
+
toggleChangeVisualizationPopover: {}
|
|
68
69
|
}
|
|
69
70
|
}
|
|
70
71
|
});
|
|
@@ -103,7 +104,7 @@ function(
|
|
|
103
104
|
Base.prototype.exit.apply(this, arguments);
|
|
104
105
|
};
|
|
105
106
|
|
|
106
|
-
function
|
|
107
|
+
function setButtonProperties(sButtonName, sIcon, sTextKey, sToolTipKey) {
|
|
107
108
|
var oButton = this.getControl(sButtonName);
|
|
108
109
|
var sText = sTextKey ? this.getTextResources().getText(sTextKey) : "";
|
|
109
110
|
var sToolTip = sToolTipKey ? this.getTextResources().getText(sToolTipKey) : "";
|
|
@@ -253,16 +254,21 @@ function(
|
|
|
253
254
|
});
|
|
254
255
|
};
|
|
255
256
|
|
|
257
|
+
Adaptation.prototype.showTranslationPopover = function (oEvent) {
|
|
258
|
+
var oTranslation = this.addExtension("translation", Translation);
|
|
259
|
+
return oTranslation.showTranslationPopover(oEvent, this);
|
|
260
|
+
};
|
|
261
|
+
|
|
256
262
|
Adaptation.prototype.showRestore = function (bVersioningEnabled) {
|
|
257
263
|
return !bVersioningEnabled;
|
|
258
264
|
};
|
|
259
265
|
|
|
260
266
|
Adaptation.prototype._showButtonIcon = function(sButtonName, sIcon, sToolTipKey) {
|
|
261
|
-
|
|
267
|
+
setButtonProperties.call(this, sButtonName, sIcon, "", sToolTipKey);
|
|
262
268
|
};
|
|
263
269
|
|
|
264
270
|
Adaptation.prototype._showButtonText = function(sButtonName, sTextKey) {
|
|
265
|
-
|
|
271
|
+
setButtonProperties.call(this, sButtonName, "", sTextKey, "");
|
|
266
272
|
};
|
|
267
273
|
|
|
268
274
|
Adaptation.prototype._switchToIcons = function() {
|
|
@@ -273,6 +279,7 @@ function(
|
|
|
273
279
|
oIconSpacer.setVisible(false);
|
|
274
280
|
this._showButtonIcon("adaptationSwitcherButton", "sap-icon://wrench", "BTN_ADAPTATION");
|
|
275
281
|
this._showButtonIcon("navigationSwitcherButton", "sap-icon://explorer", "BTN_NAVIGATION");
|
|
282
|
+
this._showButtonIcon("visualizationSwitcherButton", "sap-icon://show", "BTN_VISUALIZATION");
|
|
276
283
|
this._showButtonIcon("exit", "sap-icon://decline", "BTN_EXIT");
|
|
277
284
|
};
|
|
278
285
|
|
|
@@ -284,6 +291,7 @@ function(
|
|
|
284
291
|
oIconSpacer.setVisible(true);
|
|
285
292
|
this._showButtonText("adaptationSwitcherButton", "BTN_ADAPTATION");
|
|
286
293
|
this._showButtonText("navigationSwitcherButton", "BTN_NAVIGATION");
|
|
294
|
+
this._showButtonText("visualizationSwitcherButton", "BTN_VISUALIZATION");
|
|
287
295
|
this._showButtonText("exit", "BTN_EXIT");
|
|
288
296
|
};
|
|
289
297
|
|
|
@@ -311,14 +319,7 @@ function(
|
|
|
311
319
|
};
|
|
312
320
|
|
|
313
321
|
/**
|
|
314
|
-
*
|
|
315
|
-
* HBox (this)
|
|
316
|
-
* HBox
|
|
317
|
-
* place for Icon in Fiori Toolbar
|
|
318
|
-
* HBox
|
|
319
|
-
* OverflowToolbar
|
|
320
|
-
* Segmented Button, Buttons for Undo, Redo, manageApps, appVariantOverview, restore, publish, saveAs
|
|
321
|
-
* Save & Exit Button
|
|
322
|
+
* Loads and creates the Fragment of the Toolbar
|
|
322
323
|
*
|
|
323
324
|
* @returns {sap.ui.core.Control[]} Returns the controls in a structure described above.
|
|
324
325
|
*/
|
|
@@ -331,14 +332,15 @@ function(
|
|
|
331
332
|
discardDraft: this.eventHandler.bind(this, "DiscardDraft"),
|
|
332
333
|
formatDiscardDraftVisible: this.formatDiscardDraftVisible.bind(this),
|
|
333
334
|
modeChange: this.eventHandler.bind(this, "ModeChange"),
|
|
335
|
+
showTranslationPopover: this.showTranslationPopover.bind(this),
|
|
334
336
|
undo: this.eventHandler.bind(this, "Undo"),
|
|
335
337
|
redo: this.eventHandler.bind(this, "Redo"),
|
|
336
|
-
|
|
337
|
-
manageApps:
|
|
338
|
-
appVariantOverview:
|
|
338
|
+
toggleChangeVisualizationPopover: this.eventHandler.bind(this, "ToggleChangeVisualizationPopover"),
|
|
339
|
+
manageApps: onManageAppsPressed.bind(this),
|
|
340
|
+
appVariantOverview: onOverviewPressed.bind(this),
|
|
341
|
+
saveAs: onSaveAsPressed.bind(this),
|
|
339
342
|
restore: this.eventHandler.bind(this, "Restore"),
|
|
340
343
|
publish: this.eventHandler.bind(this, "Transport"),
|
|
341
|
-
saveAs: this.eventHandler.bind(this, "SaveAs"),
|
|
342
344
|
exit: this.eventHandler.bind(this, "Exit"),
|
|
343
345
|
formatVersionButtonText: this.formatVersionButtonText.bind(this),
|
|
344
346
|
showVersionHistory: this.showVersionHistory.bind(this),
|
|
@@ -347,13 +349,27 @@ function(
|
|
|
347
349
|
});
|
|
348
350
|
};
|
|
349
351
|
|
|
350
|
-
function
|
|
352
|
+
function onSaveAsPressed() {
|
|
353
|
+
AppVariantFeature.onSaveAs(true, true, this.getRtaInformation().flexSettings.layer, null);
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
function onOverviewPressed(oEvent) {
|
|
357
|
+
var oItem = oEvent.getParameter("item");
|
|
358
|
+
var bTriggeredForKeyUser = oItem.getId().endsWith("keyUser");
|
|
359
|
+
return AppVariantFeature.onGetOverview(bTriggeredForKeyUser, this.getRtaInformation().flexSettings.layer);
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
function onManageAppsPressed() {
|
|
363
|
+
AppVariantFeature.onGetOverview(true, this.getRtaInformation().flexSettings.layer);
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
function resetDialog() {
|
|
351
367
|
this.getControl("versionTitleInput").setValue("");
|
|
352
368
|
this.getControl("confirmVersionTitleButton").setEnabled(false);
|
|
353
369
|
return Promise.resolve(this._oDialog);
|
|
354
370
|
}
|
|
355
371
|
|
|
356
|
-
function
|
|
372
|
+
function createDialog() {
|
|
357
373
|
return Fragment.load({
|
|
358
374
|
name: "sap.ui.rta.toolbar.VersionTitleDialog",
|
|
359
375
|
id: this.getId() + "_fragment",
|
|
@@ -386,9 +402,9 @@ function(
|
|
|
386
402
|
var oDialogPromise;
|
|
387
403
|
|
|
388
404
|
if (this._oDialog) {
|
|
389
|
-
oDialogPromise =
|
|
405
|
+
oDialogPromise = resetDialog.call(this);
|
|
390
406
|
} else {
|
|
391
|
-
oDialogPromise =
|
|
407
|
+
oDialogPromise = createDialog.call(this);
|
|
392
408
|
}
|
|
393
409
|
|
|
394
410
|
return oDialogPromise.then(function () {
|
|
@@ -419,9 +435,5 @@ function(
|
|
|
419
435
|
}
|
|
420
436
|
};
|
|
421
437
|
|
|
422
|
-
/* Methods propagation */
|
|
423
|
-
Adaptation.prototype.show = function () { return Base.prototype.show.apply(this, arguments); };
|
|
424
|
-
Adaptation.prototype.hide = function () { return Base.prototype.hide.apply(this, arguments); };
|
|
425
|
-
|
|
426
438
|
return Adaptation;
|
|
427
|
-
}
|
|
439
|
+
});
|
|
@@ -5,17 +5,16 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
sap.ui.define([
|
|
8
|
-
|
|
9
|
-
],
|
|
10
|
-
function(
|
|
8
|
+
"sap/ui/rta/toolbar/BaseRenderer"
|
|
9
|
+
], function(
|
|
11
10
|
BaseRenderer
|
|
12
11
|
) {
|
|
13
12
|
"use strict";
|
|
14
13
|
|
|
15
|
-
var AdaptationRenderer = BaseRenderer.extend(
|
|
14
|
+
var AdaptationRenderer = BaseRenderer.extend("sap.ui.rta.toolbar.AdaptationRenderer");
|
|
16
15
|
|
|
17
16
|
AdaptationRenderer.render = function (oRM, oControl) {
|
|
18
|
-
oRM.addClass(
|
|
17
|
+
oRM.addClass("sapUiRtaToolbarAdaptation");
|
|
19
18
|
|
|
20
19
|
BaseRenderer.render(oRM, oControl);
|
|
21
20
|
};
|
|
@@ -5,16 +5,15 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
sap.ui.define([
|
|
8
|
-
"sap/ui/model/resource/ResourceModel",
|
|
9
8
|
"sap/m/HBox",
|
|
10
|
-
"sap/ui/
|
|
11
|
-
"sap/ui/
|
|
12
|
-
|
|
13
|
-
function(
|
|
14
|
-
ResourceModel,
|
|
9
|
+
"sap/ui/dt/util/ZIndexManager",
|
|
10
|
+
"sap/ui/model/resource/ResourceModel",
|
|
11
|
+
"sap/ui/rta/util/Animation"
|
|
12
|
+
], function(
|
|
15
13
|
HBox,
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
ZIndexManager,
|
|
15
|
+
ResourceModel,
|
|
16
|
+
Animation
|
|
18
17
|
) {
|
|
19
18
|
"use strict";
|
|
20
19
|
|
|
@@ -26,7 +25,7 @@ function(
|
|
|
26
25
|
* @extends sap.m.HBox
|
|
27
26
|
*
|
|
28
27
|
* @author SAP SE
|
|
29
|
-
* @version 1.
|
|
28
|
+
* @version 1.95.0
|
|
30
29
|
*
|
|
31
30
|
* @constructor
|
|
32
31
|
* @private
|
|
@@ -50,6 +49,17 @@ function(
|
|
|
50
49
|
type: "int"
|
|
51
50
|
},
|
|
52
51
|
|
|
52
|
+
/**
|
|
53
|
+
* information from the rta instance needed for some Toolbar extensions.
|
|
54
|
+
* Includes the flexSettings, command stack and the root control from the RuntimeAuthoring instance
|
|
55
|
+
*/
|
|
56
|
+
rtaInformation: {
|
|
57
|
+
type: "object",
|
|
58
|
+
defaultValue: {
|
|
59
|
+
flexSettings: {}
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
|
|
53
63
|
/** i18n bundle */
|
|
54
64
|
textResources: "object"
|
|
55
65
|
}
|
|
@@ -58,6 +68,7 @@ function(
|
|
|
58
68
|
// call parent constructor
|
|
59
69
|
HBox.apply(this, arguments);
|
|
60
70
|
|
|
71
|
+
this._oExtensions = {};
|
|
61
72
|
this.setAlignItems("Center");
|
|
62
73
|
this.setVisible(false);
|
|
63
74
|
this.placeToContainer();
|
|
@@ -90,6 +101,40 @@ function(
|
|
|
90
101
|
return this.buildContent();
|
|
91
102
|
};
|
|
92
103
|
|
|
104
|
+
Base.prototype.exit = function() {
|
|
105
|
+
Object.values(this._oExtensions).forEach(function(oExtension) {
|
|
106
|
+
oExtension.destroy();
|
|
107
|
+
});
|
|
108
|
+
this._oExtensions = {};
|
|
109
|
+
|
|
110
|
+
HBox.prototype.exit.apply(this, arguments);
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Adds an extension to the toolbar, if it is not already registered.
|
|
115
|
+
* The new extension gets created with the toolbar itself as property 'context'.
|
|
116
|
+
*
|
|
117
|
+
* @param {string} sName - Name of the extension
|
|
118
|
+
* @param {sap.ui.base.ManagedObject} Extension - Extension Class to be instantiated
|
|
119
|
+
* @returns {sap.ui.base.ManagedObject} Returns the newly created module.
|
|
120
|
+
*/
|
|
121
|
+
Base.prototype.addExtension = function(sName, Extension) {
|
|
122
|
+
if (!Object.keys(this._oExtensions).includes(sName)) {
|
|
123
|
+
this._oExtensions[sName] = new Extension({context: this});
|
|
124
|
+
}
|
|
125
|
+
return this._oExtensions[sName];
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Returns the extension with the passed name
|
|
130
|
+
*
|
|
131
|
+
* @param {string} sName - Name of the extension
|
|
132
|
+
* @returns {sap.ui.base.ManagedObject|undefined} Returns the extension or undefined if it does not exist
|
|
133
|
+
*/
|
|
134
|
+
Base.prototype.getExtension = function(sName) {
|
|
135
|
+
return this._oExtensions[sName];
|
|
136
|
+
};
|
|
137
|
+
|
|
93
138
|
/**
|
|
94
139
|
* @override
|
|
95
140
|
*/
|
|
@@ -110,13 +155,13 @@ function(
|
|
|
110
155
|
* @param {sap.ui.base.Event} oEvent - Event object
|
|
111
156
|
*/
|
|
112
157
|
Base.prototype.eventHandler = function (sEventName, oEvent) {
|
|
113
|
-
this[
|
|
158
|
+
this["fire" + sEventName](oEvent.getParameters());
|
|
114
159
|
};
|
|
115
160
|
|
|
116
161
|
/**
|
|
117
162
|
* Function provides controls which should be rendered into the Toolbar. Controls are going to be rendered
|
|
118
163
|
* in the same order as provided in returned array.
|
|
119
|
-
* @
|
|
164
|
+
* @returns {Array.<sap.ui.core.Control>} An array of controls
|
|
120
165
|
* @protected
|
|
121
166
|
*/
|
|
122
167
|
Base.prototype.buildControls = function () {
|
|
@@ -135,6 +180,7 @@ function(
|
|
|
135
180
|
/**
|
|
136
181
|
* Adds content into the Toolbar
|
|
137
182
|
* @protected
|
|
183
|
+
* @returns {Promise} An empty Promise
|
|
138
184
|
*/
|
|
139
185
|
Base.prototype.buildContent = function () {
|
|
140
186
|
return this.buildControls().then(function (aControls) {
|
|
@@ -144,7 +190,7 @@ function(
|
|
|
144
190
|
|
|
145
191
|
/**
|
|
146
192
|
* Makes the Toolbar visible
|
|
147
|
-
* @
|
|
193
|
+
* @returns {Promise} A Promise which resolves after animation has been completed
|
|
148
194
|
* @public
|
|
149
195
|
*/
|
|
150
196
|
Base.prototype.show = function() {
|
|
@@ -163,7 +209,7 @@ function(
|
|
|
163
209
|
// 2) animate DomRef
|
|
164
210
|
.then(function () {
|
|
165
211
|
return this.animation
|
|
166
|
-
? Animation.waitTransition(this.$(), this.addStyleClass.bind(this,
|
|
212
|
+
? Animation.waitTransition(this.$(), this.addStyleClass.bind(this, "is_visible"))
|
|
167
213
|
: Promise.resolve();
|
|
168
214
|
}.bind(this))
|
|
169
215
|
// 3) focus on Toolbar
|
|
@@ -174,27 +220,32 @@ function(
|
|
|
174
220
|
|
|
175
221
|
/**
|
|
176
222
|
* Makes the Toolbar invisible
|
|
177
|
-
* @
|
|
223
|
+
* @param {boolean} bSkipTransition - skips the transition for cases like page reloads - where the animation won't be visible and can cause timing issues
|
|
224
|
+
* @returns {Promise} A Promise which resolves after animation has been completed
|
|
178
225
|
* @public
|
|
179
226
|
*/
|
|
180
|
-
Base.prototype.hide = function() {
|
|
227
|
+
Base.prototype.hide = function(bSkipTransition) {
|
|
228
|
+
var oPromise = Promise.resolve();
|
|
181
229
|
// 1) animate DomRef
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
230
|
+
if (this.animation) {
|
|
231
|
+
if (bSkipTransition) {
|
|
232
|
+
this.removeStyleClass("is_visible");
|
|
233
|
+
} else {
|
|
234
|
+
oPromise = Animation.waitTransition(this.$(), this.removeStyleClass.bind(this, "is_visible"));
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
return oPromise
|
|
187
238
|
// 2) hide DomRef
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
239
|
+
.then(function () {
|
|
240
|
+
this.setVisible(false);
|
|
241
|
+
}.bind(this));
|
|
191
242
|
};
|
|
192
243
|
|
|
193
244
|
/**
|
|
194
245
|
* Getter for inner controls
|
|
195
246
|
*
|
|
196
247
|
* @param {string} sName - Name of the control
|
|
197
|
-
* @
|
|
248
|
+
* @returns {sap.ui.core.Control|undefined} A control or undefined if there is no control with provided name
|
|
198
249
|
* @public
|
|
199
250
|
*/
|
|
200
251
|
Base.prototype.getControl = function(sName) {
|
|
@@ -210,4 +261,4 @@ function(
|
|
|
210
261
|
};
|
|
211
262
|
|
|
212
263
|
return Base;
|
|
213
|
-
}
|
|
264
|
+
});
|
|
@@ -14,10 +14,10 @@ function(
|
|
|
14
14
|
) {
|
|
15
15
|
"use strict";
|
|
16
16
|
|
|
17
|
-
var BaseRenderer = Renderer.extend.call(HBoxRenderer,
|
|
17
|
+
var BaseRenderer = Renderer.extend.call(HBoxRenderer, "sap.ui.rta.toolbar.BaseRenderer");
|
|
18
18
|
|
|
19
19
|
BaseRenderer.render = function (oRM, oControl) {
|
|
20
|
-
oRM.addClass(
|
|
20
|
+
oRM.addClass("sapUiRtaToolbar");
|
|
21
21
|
oRM.addClass("color_" + oControl.getColor());
|
|
22
22
|
|
|
23
23
|
// setting type if exists
|
|
@@ -22,7 +22,7 @@ function(
|
|
|
22
22
|
* This class is being assigned to the original Fiori Header Toolbar when RTA Toolbar shows
|
|
23
23
|
* @type {string}
|
|
24
24
|
*/
|
|
25
|
-
var FIORI_HIDDEN_CLASS =
|
|
25
|
+
var FIORI_HIDDEN_CLASS = "sapUiRtaFioriHeaderInvisible";
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
28
|
* Constructor for a new sap.ui.rta.toolbar.Fiori control
|
|
@@ -32,7 +32,7 @@ function(
|
|
|
32
32
|
* @extends sap.ui.rta.toolbar.Adaptation
|
|
33
33
|
*
|
|
34
34
|
* @author SAP SE
|
|
35
|
-
* @version 1.
|
|
35
|
+
* @version 1.95.0
|
|
36
36
|
*
|
|
37
37
|
* @constructor
|
|
38
38
|
* @private
|
|
@@ -44,8 +44,8 @@ function(
|
|
|
44
44
|
metadata: {
|
|
45
45
|
library: "sap.ui.rta"
|
|
46
46
|
},
|
|
47
|
-
renderer:
|
|
48
|
-
type:
|
|
47
|
+
renderer: "sap.ui.rta.toolbar.AdaptationRenderer",
|
|
48
|
+
type: "fiori"
|
|
49
49
|
});
|
|
50
50
|
|
|
51
51
|
Fiori.prototype.init = function () {
|
|
@@ -65,7 +65,7 @@ function(
|
|
|
65
65
|
|
|
66
66
|
if (this._oFioriHeader.getShowLogo() && sLogoPath) {
|
|
67
67
|
// Unstable: if FLP changes ID of <img> element, logo could be not found
|
|
68
|
-
var $logo = this._oFioriHeader.$().find(
|
|
68
|
+
var $logo = this._oFioriHeader.$().find("#shell-header-icon");
|
|
69
69
|
var iWidth;
|
|
70
70
|
var iHeight;
|
|
71
71
|
|
|
@@ -81,8 +81,8 @@ function(
|
|
|
81
81
|
this.getControl("iconBox").addItem(
|
|
82
82
|
new Image(this.getId() + "_fragment--sapUiRta_icon", {
|
|
83
83
|
src: sLogoPath,
|
|
84
|
-
width: iWidth ? iWidth +
|
|
85
|
-
height: iHeight ? iHeight +
|
|
84
|
+
width: iWidth ? iWidth + "px" : iWidth,
|
|
85
|
+
height: iHeight ? iHeight + "px" : iHeight
|
|
86
86
|
})
|
|
87
87
|
);
|
|
88
88
|
}
|
|
@@ -106,7 +106,7 @@ function(
|
|
|
106
106
|
"sap.ui.rta: please check Fiori Launchpad logo, expected size is",
|
|
107
107
|
iWidth + "x" + iHeight + ",",
|
|
108
108
|
"but actual is " + iNaturalWidth + "x" + iNaturalHeight
|
|
109
|
-
].join(
|
|
109
|
+
].join(" "));
|
|
110
110
|
}
|
|
111
111
|
};
|
|
112
112
|
|
|
@@ -121,4 +121,4 @@ function(
|
|
|
121
121
|
};
|
|
122
122
|
|
|
123
123
|
return Fiori;
|
|
124
|
-
}
|
|
124
|
+
});
|
|
@@ -20,7 +20,7 @@ function(
|
|
|
20
20
|
* @extends sap.ui.rta.toolbar.Adaptation
|
|
21
21
|
*
|
|
22
22
|
* @author SAP SE
|
|
23
|
-
* @version 1.
|
|
23
|
+
* @version 1.95.0
|
|
24
24
|
*
|
|
25
25
|
* @constructor
|
|
26
26
|
* @private
|
|
@@ -32,9 +32,9 @@ function(
|
|
|
32
32
|
metadata: {
|
|
33
33
|
library: "sap.ui.rta"
|
|
34
34
|
},
|
|
35
|
-
renderer:
|
|
36
|
-
type:
|
|
35
|
+
renderer: "sap.ui.rta.toolbar.AdaptationRenderer",
|
|
36
|
+
type: "fiori"
|
|
37
37
|
});
|
|
38
38
|
|
|
39
39
|
return FioriLike;
|
|
40
|
-
}
|
|
40
|
+
});
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* OpenUI5
|
|
3
|
+
* (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
sap.ui.define([
|
|
8
|
+
"sap/m/OverflowToolbarButton",
|
|
9
|
+
"sap/m/ButtonRenderer",
|
|
10
|
+
"sap/m/Button"
|
|
11
|
+
],
|
|
12
|
+
function(
|
|
13
|
+
SapMOverflowToolbarButton,
|
|
14
|
+
ButtonRenderer,
|
|
15
|
+
Button
|
|
16
|
+
) {
|
|
17
|
+
"use strict";
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Constructor for a new sap.ui.rta.toolbar.OverflowToolbarButton control
|
|
21
|
+
*
|
|
22
|
+
* @class
|
|
23
|
+
* Base class for Toolbar control
|
|
24
|
+
* @extends sap.m.OverflowToolbarButton
|
|
25
|
+
*
|
|
26
|
+
* @author SAP SE
|
|
27
|
+
* @version 1.95.0
|
|
28
|
+
*
|
|
29
|
+
* @constructor
|
|
30
|
+
* @private
|
|
31
|
+
* @since 1.94
|
|
32
|
+
* @alias sap.ui.rta.toolbar.OverflowToolbarButton
|
|
33
|
+
* @experimental Since 1.94. This class is experimental. The API might be changed in the future.
|
|
34
|
+
*/
|
|
35
|
+
|
|
36
|
+
var OverflowToolbarButton = SapMOverflowToolbarButton.extend("sap.ui.rta.toolbar.OverflowToolbarButton", {
|
|
37
|
+
metadata: {
|
|
38
|
+
library: "sap.ui.rta",
|
|
39
|
+
interfaces: [
|
|
40
|
+
"sap.m.IOverflowToolbarContent"
|
|
41
|
+
],
|
|
42
|
+
properties: {
|
|
43
|
+
visibleIcon: {type: "string", defaultValue: ""}
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
renderer: ButtonRenderer
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Remove the icon when entering the OverflowArea
|
|
51
|
+
*
|
|
52
|
+
* @private
|
|
53
|
+
*/
|
|
54
|
+
OverflowToolbarButton.prototype._onBeforeEnterOverflow = function () {
|
|
55
|
+
SapMOverflowToolbarButton.prototype._onBeforeEnterOverflow.apply(this, arguments);
|
|
56
|
+
this.setVisibleIcon(this.getIcon());
|
|
57
|
+
this.setIcon("");
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Restore the icon when leaving the OverflowArea
|
|
62
|
+
*
|
|
63
|
+
* @private
|
|
64
|
+
*/
|
|
65
|
+
OverflowToolbarButton.prototype._onAfterExitOverflow = function () {
|
|
66
|
+
SapMOverflowToolbarButton.prototype._onAfterExitOverflow.apply(this, arguments);
|
|
67
|
+
this.setIcon(this.getVisibleIcon());
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Get the Text if in Overflow-Area or Text in Toolbar is wanted
|
|
72
|
+
*
|
|
73
|
+
* @private
|
|
74
|
+
*/
|
|
75
|
+
OverflowToolbarButton.prototype._getText = function() {
|
|
76
|
+
if ((this.getIcon() === "" && this.getVisibleIcon() === "") || this._bInOverflow) {
|
|
77
|
+
return Button.prototype._getText.call(this);
|
|
78
|
+
}
|
|
79
|
+
return "";
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Special Icon handling when moving the Button in the OverflowArea
|
|
84
|
+
* Required by the {@link sap.m.IOverflowToolbarContent} interface.
|
|
85
|
+
*
|
|
86
|
+
* @public
|
|
87
|
+
* @returns {object} Configuration information for the <code>sap.m.IOverflowToolbarContent</code> interface.
|
|
88
|
+
*/
|
|
89
|
+
OverflowToolbarButton.prototype.getOverflowToolbarConfig = function () {
|
|
90
|
+
return {
|
|
91
|
+
canOverflow: true,
|
|
92
|
+
onBeforeEnterOverflow: this._onBeforeEnterOverflow.bind(this),
|
|
93
|
+
onAfterExitOverflow: this._onAfterExitOverflow.bind(this)
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
return OverflowToolbarButton;
|
|
98
|
+
}, false);
|
|
@@ -22,7 +22,7 @@ function(
|
|
|
22
22
|
* @extends sap.ui.rta.toolbar.Base
|
|
23
23
|
*
|
|
24
24
|
* @author SAP SE
|
|
25
|
-
* @version 1.
|
|
25
|
+
* @version 1.95.0
|
|
26
26
|
*
|
|
27
27
|
* @constructor
|
|
28
28
|
* @private
|
|
@@ -31,8 +31,8 @@ function(
|
|
|
31
31
|
* @experimental Since 1.48. This class is experimental. API might be changed in future.
|
|
32
32
|
*/
|
|
33
33
|
var Personalization = Base.extend("sap.ui.rta.toolbar.Personalization", {
|
|
34
|
-
renderer:
|
|
35
|
-
type:
|
|
34
|
+
renderer: "sap.ui.rta.toolbar.BaseRenderer",
|
|
35
|
+
type: "personalization",
|
|
36
36
|
metadata: {
|
|
37
37
|
library: "sap.ui.rta",
|
|
38
38
|
events: {
|
|
@@ -55,13 +55,13 @@ function(
|
|
|
55
55
|
type: "Transparent",
|
|
56
56
|
text: "{i18n>BTN_RESTORE}",
|
|
57
57
|
visible: true,
|
|
58
|
-
press: this.eventHandler.bind(this,
|
|
59
|
-
}).data(
|
|
58
|
+
press: this.eventHandler.bind(this, "Restore")
|
|
59
|
+
}).data("name", "restore"),
|
|
60
60
|
new Button("sapUiRta_exit", {
|
|
61
61
|
type: "Emphasized",
|
|
62
62
|
text: "{i18n>BTN_DONE}",
|
|
63
|
-
press: this.eventHandler.bind(this,
|
|
64
|
-
}).data(
|
|
63
|
+
press: this.eventHandler.bind(this, "Exit")
|
|
64
|
+
}).data("name", "exit")
|
|
65
65
|
].forEach(function (oControl) {
|
|
66
66
|
this.addItem(oControl);
|
|
67
67
|
}.bind(this));
|
|
@@ -70,4 +70,4 @@ function(
|
|
|
70
70
|
};
|
|
71
71
|
|
|
72
72
|
return Personalization;
|
|
73
|
-
}
|
|
73
|
+
});
|
|
@@ -20,7 +20,7 @@ function(
|
|
|
20
20
|
* @extends sap.ui.rta.toolbar.Adaptation
|
|
21
21
|
*
|
|
22
22
|
* @author SAP SE
|
|
23
|
-
* @version 1.
|
|
23
|
+
* @version 1.95.0
|
|
24
24
|
*
|
|
25
25
|
* @constructor
|
|
26
26
|
* @private
|
|
@@ -32,9 +32,9 @@ function(
|
|
|
32
32
|
metadata: {
|
|
33
33
|
library: "sap.ui.rta"
|
|
34
34
|
},
|
|
35
|
-
renderer:
|
|
36
|
-
type:
|
|
35
|
+
renderer: "sap.ui.rta.toolbar.AdaptationRenderer",
|
|
36
|
+
type: "standalone"
|
|
37
37
|
});
|
|
38
38
|
|
|
39
39
|
return Standalone;
|
|
40
|
-
}
|
|
40
|
+
});
|