@openui5/sap.ui.rta 1.127.1 → 1.129.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/THIRDPARTY.txt +1 -1
- 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 +21 -3
- package/src/sap/ui/rta/Utils.js +1 -1
- package/src/sap/ui/rta/appVariant/AppVariantManager.js +1 -1
- package/src/sap/ui/rta/appVariant/AppVariantUtils.js +1 -1
- package/src/sap/ui/rta/appVariant/Feature.js +2 -2
- package/src/sap/ui/rta/appVariant/Utils.js +3 -3
- package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_en_US_sappsd.properties +2 -2
- package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_en_US_saptrc.properties +27 -27
- 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 +2 -2
- package/src/sap/ui/rta/command/Annotation.js +46 -0
- 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 +14 -8
- 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 +14 -15
- 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 +8 -5
- 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/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 +5 -2
- package/src/sap/ui/rta/command/appDescriptor/AddLibrary.js +1 -1
- package/src/sap/ui/rta/command/compVariant/CompVariantContent.js +6 -4
- package/src/sap/ui/rta/command/compVariant/CompVariantSaveAs.js +7 -5
- package/src/sap/ui/rta/command/compVariant/CompVariantSwitch.js +1 -1
- package/src/sap/ui/rta/command/compVariant/CompVariantUpdate.js +5 -3
- package/src/sap/ui/rta/enablement/TestDelegate.js +4 -3
- package/src/sap/ui/rta/enablement/elementActionTest.js +9 -6
- package/src/sap/ui/rta/library.js +2 -2
- package/src/sap/ui/rta/messagebundle.properties +47 -3
- package/src/sap/ui/rta/messagebundle_ar.properties +24 -2
- package/src/sap/ui/rta/messagebundle_bg.properties +24 -2
- package/src/sap/ui/rta/messagebundle_ca.properties +24 -2
- package/src/sap/ui/rta/messagebundle_cnr.properties +25 -3
- package/src/sap/ui/rta/messagebundle_cs.properties +24 -2
- package/src/sap/ui/rta/messagebundle_cy.properties +25 -3
- package/src/sap/ui/rta/messagebundle_da.properties +25 -3
- package/src/sap/ui/rta/messagebundle_de.properties +24 -2
- package/src/sap/ui/rta/messagebundle_el.properties +24 -2
- package/src/sap/ui/rta/messagebundle_en.properties +24 -2
- package/src/sap/ui/rta/messagebundle_en_GB.properties +24 -2
- package/src/sap/ui/rta/messagebundle_en_US_saprigi.properties +24 -2
- package/src/sap/ui/rta/messagebundle_es.properties +24 -2
- package/src/sap/ui/rta/messagebundle_es_MX.properties +24 -2
- package/src/sap/ui/rta/messagebundle_et.properties +24 -2
- package/src/sap/ui/rta/messagebundle_fi.properties +24 -2
- package/src/sap/ui/rta/messagebundle_fr.properties +24 -2
- package/src/sap/ui/rta/messagebundle_fr_CA.properties +25 -3
- package/src/sap/ui/rta/messagebundle_hi.properties +24 -2
- package/src/sap/ui/rta/messagebundle_hr.properties +24 -2
- package/src/sap/ui/rta/messagebundle_hu.properties +25 -3
- package/src/sap/ui/rta/messagebundle_id.properties +25 -3
- package/src/sap/ui/rta/messagebundle_it.properties +24 -2
- package/src/sap/ui/rta/messagebundle_iw.properties +24 -2
- package/src/sap/ui/rta/messagebundle_ja.properties +24 -2
- package/src/sap/ui/rta/messagebundle_kk.properties +24 -2
- package/src/sap/ui/rta/messagebundle_ko.properties +25 -3
- package/src/sap/ui/rta/messagebundle_lt.properties +24 -2
- package/src/sap/ui/rta/messagebundle_lv.properties +24 -2
- package/src/sap/ui/rta/messagebundle_mk.properties +24 -2
- package/src/sap/ui/rta/messagebundle_ms.properties +24 -2
- package/src/sap/ui/rta/messagebundle_nl.properties +24 -2
- package/src/sap/ui/rta/messagebundle_no.properties +24 -2
- package/src/sap/ui/rta/messagebundle_pl.properties +24 -2
- package/src/sap/ui/rta/messagebundle_pt.properties +24 -2
- package/src/sap/ui/rta/messagebundle_pt_PT.properties +24 -2
- package/src/sap/ui/rta/messagebundle_ro.properties +25 -3
- package/src/sap/ui/rta/messagebundle_ru.properties +24 -2
- package/src/sap/ui/rta/messagebundle_sh.properties +25 -3
- package/src/sap/ui/rta/messagebundle_sk.properties +24 -2
- package/src/sap/ui/rta/messagebundle_sl.properties +24 -2
- package/src/sap/ui/rta/messagebundle_sr.properties +25 -3
- package/src/sap/ui/rta/messagebundle_sv.properties +24 -2
- package/src/sap/ui/rta/messagebundle_th.properties +24 -2
- package/src/sap/ui/rta/messagebundle_tr.properties +24 -2
- package/src/sap/ui/rta/messagebundle_uk.properties +26 -4
- package/src/sap/ui/rta/messagebundle_vi.properties +25 -3
- package/src/sap/ui/rta/messagebundle_zh_CN.properties +24 -2
- package/src/sap/ui/rta/messagebundle_zh_TW.properties +24 -2
- 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 +1 -1
- package/src/sap/ui/rta/plugin/LocalReset.js +1 -1
- package/src/sap/ui/rta/plugin/Plugin.js +2 -3
- 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/Rename.js +1 -1
- package/src/sap/ui/rta/plugin/RenameHandler.js +5 -2
- 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 +34 -10
- 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.fragment.xml +0 -1
- package/src/sap/ui/rta/plugin/additionalElements/AddElementsDialog.js +1 -1
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsPlugin.js +70 -69
- 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 +9 -7
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.fragment.xml +22 -7
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.js +2 -1
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialogController.js +7 -4
- package/src/sap/ui/rta/service/Action.js +4 -3
- package/src/sap/ui/rta/service/ControllerExtension.js +1 -1
- package/src/sap/ui/rta/service/Outline.js +5 -9
- package/src/sap/ui/rta/service/Property.js +10 -11
- 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 +8 -10
- package/src/sap/ui/rta/themes/base/ChangeVisualization.less +2 -3
- package/src/sap/ui/rta/themes/base/ContextMenu.less +13 -13
- package/src/sap/ui/rta/themes/base/Dialogs.less +2 -2
- package/src/sap/ui/rta/themes/base/FieldRepository.less +5 -10
- package/src/sap/ui/rta/themes/base/FlexSupportExtension.less +9 -4
- package/src/sap/ui/rta/themes/base/Overlay.less +27 -180
- package/src/sap/ui/rta/themes/base/OverlayWithScrollbar.less +1 -1
- package/src/sap/ui/rta/themes/base/Toolbar.adaptation.less +18 -76
- package/src/sap/ui/rta/themes/base/Toolbar.base.less +18 -18
- package/src/sap/ui/rta/themes/base/WhatsNew.less +7 -0
- package/src/sap/ui/rta/themes/base/library.source.less +10 -11
- package/src/sap/ui/rta/toolbar/ActionsMenu.fragment.xml +8 -0
- package/src/sap/ui/rta/toolbar/Adaptation.fragment.xml +8 -1
- package/src/sap/ui/rta/toolbar/Adaptation.js +9 -2
- 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 +1 -1
- package/src/sap/ui/rta/toolbar/Standalone.js +1 -1
- package/src/sap/ui/rta/toolbar/contextBased/ManageAdaptations.js +20 -18
- package/src/sap/ui/rta/toolbar/contextBased/ManageAdaptationsDialog.fragment.xml +1 -1
- package/src/sap/ui/rta/toolbar/contextBased/SaveAsAdaptation.js +1 -1
- package/src/sap/ui/rta/toolbar/translation/Translation.js +3 -3
- package/src/sap/ui/rta/toolbar/versioning/Versioning.js +1 -1
- package/src/sap/ui/rta/util/PluginManager.js +2 -2
- 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 +2 -2
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicator.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorCategorySelection.fragment.xml +10 -10
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorRegistry.js +11 -13
- package/src/sap/ui/rta/util/changeVisualization/ChangeVisualization.js +60 -25
- package/src/sap/ui/rta/util/whatsNew/WhatsNew.js +110 -0
- package/src/sap/ui/rta/util/whatsNew/WhatsNewDialog.fragment.xml +81 -0
- package/src/sap/ui/rta/util/whatsNew/WhatsNewOverview.js +82 -0
- package/src/sap/ui/rta/util/whatsNew/WhatsNewOverviewDialog.fragment.xml +75 -0
- package/src/sap/ui/rta/util/whatsNew/WhatsNewUtils.js +73 -0
- package/src/sap/ui/rta/util/whatsNew/whatsNewContent/WhatsNewFeatures.js +138 -0
- package/src/sap/ui/rta/util/whatsNew/whatsNewContent/whatsNewImages/AdvancedSettingsImage.png +0 -0
- package/src/sap/ui/rta/util/whatsNew/whatsNewContent/whatsNewImages/FullIframe.png +0 -0
- package/src/sap/ui/rta/util/whatsNew/whatsNewContent/whatsNewImages/MiniMenu.png +0 -0
- package/src/sap/ui/rta/util/whatsNew/whatsNewContent/whatsNewImages/WhatsNewOverview.png +0 -0
|
@@ -37,7 +37,7 @@ sap.ui.define([
|
|
|
37
37
|
* @alias sap.ui.rta.util.changeVisualization.ChangeIndicatorRegistry
|
|
38
38
|
* @author SAP SE
|
|
39
39
|
* @since 1.86.0
|
|
40
|
-
* @version 1.
|
|
40
|
+
* @version 1.129.0
|
|
41
41
|
* @private
|
|
42
42
|
*/
|
|
43
43
|
const ChangeIndicatorRegistry = ManagedObject.extend("sap.ui.rta.util.changeVisualization.ChangeIndicatorRegistry", {
|
|
@@ -81,7 +81,7 @@ sap.ui.define([
|
|
|
81
81
|
*/
|
|
82
82
|
ChangeIndicatorRegistry.prototype.getAllRegisteredChanges = function() {
|
|
83
83
|
return values(this._oRegisteredChanges || {}).map(function(oChange) {
|
|
84
|
-
return
|
|
84
|
+
return { ...oChange };
|
|
85
85
|
});
|
|
86
86
|
};
|
|
87
87
|
|
|
@@ -101,7 +101,7 @@ sap.ui.define([
|
|
|
101
101
|
* @returns {object} Registered change
|
|
102
102
|
*/
|
|
103
103
|
ChangeIndicatorRegistry.prototype.getRegisteredChange = function(sChangeId) {
|
|
104
|
-
return this._oRegisteredChanges[sChangeId] &&
|
|
104
|
+
return this._oRegisteredChanges[sChangeId] && { ...this._oRegisteredChanges[sChangeId] };
|
|
105
105
|
};
|
|
106
106
|
|
|
107
107
|
/**
|
|
@@ -118,16 +118,14 @@ sap.ui.define([
|
|
|
118
118
|
if (oChangeIndicators[sSelectorId] === undefined) {
|
|
119
119
|
oChangeIndicators[sSelectorId] = [];
|
|
120
120
|
}
|
|
121
|
-
oChangeIndicators[sSelectorId].push(
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
_omit(oChangeIndicatorData, ["visualizationInfo"])
|
|
130
|
-
));
|
|
121
|
+
oChangeIndicators[sSelectorId].push({
|
|
122
|
+
id: oChangeIndicatorData.change.getId(),
|
|
123
|
+
dependent: bDependent,
|
|
124
|
+
affectedElementId: sAffectedElementId || sPreviousAffectedElementId,
|
|
125
|
+
displayElementsKey: oChangeIndicatorData.visualizationInfo.displayElementIds.toString(),
|
|
126
|
+
descriptionPayload: oChangeIndicatorData.visualizationInfo.descriptionPayload || {},
|
|
127
|
+
..._omit(oChangeIndicatorData, ["visualizationInfo"])
|
|
128
|
+
});
|
|
131
129
|
sPreviousAffectedElementId = sAffectedElementId || sPreviousAffectedElementId;
|
|
132
130
|
}
|
|
133
131
|
|
|
@@ -84,7 +84,7 @@ sap.ui.define([
|
|
|
84
84
|
* @alias sap.ui.rta.util.changeVisualization.ChangeVisualization
|
|
85
85
|
* @author SAP SE
|
|
86
86
|
* @since 1.84.0
|
|
87
|
-
* @version 1.
|
|
87
|
+
* @version 1.129.0
|
|
88
88
|
* @private
|
|
89
89
|
*/
|
|
90
90
|
const ChangeVisualization = Control.extend("sap.ui.rta.util.changeVisualization.ChangeVisualization", {
|
|
@@ -323,9 +323,15 @@ sap.ui.define([
|
|
|
323
323
|
return this._oTextBundle.getText(sLabelKey, [iChangesCount]);
|
|
324
324
|
};
|
|
325
325
|
|
|
326
|
-
ChangeVisualization.prototype.
|
|
326
|
+
ChangeVisualization.prototype._getChangeCategoryButtonText = function(sChangeCategoryName) {
|
|
327
327
|
const sButtonKey = `BTN_CHANGEVISUALIZATION_OVERVIEW_${sChangeCategoryName.toUpperCase()}`;
|
|
328
|
-
|
|
328
|
+
const sBaseText = this._oTextBundle.getText(sButtonKey);
|
|
329
|
+
const sVisualizedChangeState = this._oChangeVisualizationModel.getData().changeState;
|
|
330
|
+
if (sVisualizedChangeState === ChangeStates.ALL) {
|
|
331
|
+
return sBaseText;
|
|
332
|
+
}
|
|
333
|
+
const sStateText = this._oTextBundle.getText(`BUT_CHANGEVISUALIZATION_VERSIONING_${sVisualizedChangeState.toUpperCase()}`);
|
|
334
|
+
return `${sBaseText} (${sStateText})`;
|
|
329
335
|
};
|
|
330
336
|
|
|
331
337
|
ChangeVisualization.prototype.openChangeCategorySelectionPopover = function(oEvent) {
|
|
@@ -369,6 +375,7 @@ sap.ui.define([
|
|
|
369
375
|
ChangeVisualization.prototype.onChangeCategorySelection = function(oEvent) {
|
|
370
376
|
const sSelectedChangeCategory = oEvent.getSource().getBindingContext("visualizationModel").getObject().key;
|
|
371
377
|
this._selectChangeCategory(sSelectedChangeCategory);
|
|
378
|
+
this.getPopover()?.close();
|
|
372
379
|
};
|
|
373
380
|
|
|
374
381
|
ChangeVisualization.prototype.onVersioningCategoryChange = function(oEvent) {
|
|
@@ -379,7 +386,7 @@ sap.ui.define([
|
|
|
379
386
|
ChangeVisualization.prototype._selectChangeCategory = function(sSelectedChangeCategory) {
|
|
380
387
|
this._sSelectedChangeCategory = sSelectedChangeCategory;
|
|
381
388
|
|
|
382
|
-
const sChangeCategoryText = this.
|
|
389
|
+
const sChangeCategoryText = this._getChangeCategoryButtonText(sSelectedChangeCategory);
|
|
383
390
|
|
|
384
391
|
this._updateVisualizationModel({
|
|
385
392
|
changeCategory: sSelectedChangeCategory,
|
|
@@ -393,8 +400,12 @@ sap.ui.define([
|
|
|
393
400
|
ChangeVisualization.prototype._selectChangeState = function(sSelectedChangeState) {
|
|
394
401
|
this._sSelectedChangeState = sSelectedChangeState;
|
|
395
402
|
|
|
403
|
+
const sSelectedChangeCategory = this._oChangeVisualizationModel.getData().changeCategory;
|
|
404
|
+
const sChangeCategoryText = this._getChangeCategoryButtonText(sSelectedChangeCategory);
|
|
405
|
+
|
|
396
406
|
this._updateVisualizationModel({
|
|
397
|
-
changeState: sSelectedChangeState
|
|
407
|
+
changeState: sSelectedChangeState,
|
|
408
|
+
changeCategoryText: sChangeCategoryText
|
|
398
409
|
});
|
|
399
410
|
|
|
400
411
|
this._updateChangeIndicators();
|
|
@@ -515,11 +526,10 @@ sap.ui.define([
|
|
|
515
526
|
};
|
|
516
527
|
|
|
517
528
|
ChangeVisualization.prototype._updateVisualizationModel = function(oData) {
|
|
518
|
-
this._oChangeVisualizationModel.setData(
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
));
|
|
529
|
+
this._oChangeVisualizationModel.setData({
|
|
530
|
+
...this._oChangeVisualizationModel.getData(),
|
|
531
|
+
...oData
|
|
532
|
+
});
|
|
523
533
|
};
|
|
524
534
|
|
|
525
535
|
ChangeVisualization.prototype._updateChangeIndicators = function() {
|
|
@@ -559,6 +569,7 @@ sap.ui.define([
|
|
|
559
569
|
} else if (oChangeIndicator.getOverlayId() !== sOverlayId) {
|
|
560
570
|
// Overlay id might change, e.g. during undo/redo of dirty changes
|
|
561
571
|
oChangeIndicator.setOverlayId(sOverlayId);
|
|
572
|
+
oChangeIndicator.setVisible(true);
|
|
562
573
|
}
|
|
563
574
|
return undefined;
|
|
564
575
|
}.bind(this));
|
|
@@ -615,30 +626,38 @@ sap.ui.define([
|
|
|
615
626
|
this._oChangeIndicatorRegistry.registerChangeIndicator(sSelectorId, oChangeIndicator);
|
|
616
627
|
};
|
|
617
628
|
|
|
618
|
-
ChangeVisualization.prototype._setFocusedIndicator = function() {
|
|
629
|
+
ChangeVisualization.prototype._setFocusedIndicator = async function() {
|
|
619
630
|
// Sort the Indicators according XY-Position
|
|
620
631
|
// Set the tabindex according the sorting
|
|
621
632
|
// Focus the first visible indicator
|
|
622
|
-
this._oChangeIndicatorRegistry.waitForIndicatorRendering()
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
633
|
+
await this._oChangeIndicatorRegistry.waitForIndicatorRendering();
|
|
634
|
+
const aVisibleIndicators = [];
|
|
635
|
+
this._oChangeIndicatorRegistry.getChangeIndicators().forEach((oIndicator) => {
|
|
636
|
+
const oOverlay = OverlayRegistry.getOverlay(oIndicator.getOverlayId());
|
|
637
|
+
// As setting the focus happens asynchronously after rendering,
|
|
638
|
+
// the overlay can be gone by the time this code is executed
|
|
639
|
+
if (!oOverlay) {
|
|
640
|
+
return;
|
|
641
|
+
}
|
|
642
|
+
if (oIndicator.getVisible()) {
|
|
643
|
+
oOverlay.setFocusable(true);
|
|
644
|
+
aVisibleIndicators.push(oIndicator);
|
|
645
|
+
} else {
|
|
646
|
+
oOverlay.setFocusable(false);
|
|
647
|
+
}
|
|
648
|
+
});
|
|
649
|
+
|
|
650
|
+
if (aVisibleIndicators.length > 0) {
|
|
651
|
+
aVisibleIndicators.sort(function(oIndicator1, oIndicator2) {
|
|
630
652
|
const iDeltaY = oIndicator1.getPosY() - oIndicator2.getPosY();
|
|
631
653
|
const iDeltaX = oIndicator1.getPosX() - oIndicator2.getPosX();
|
|
632
654
|
// Only consider x value if y is the same
|
|
633
655
|
return iDeltaY || iDeltaX;
|
|
634
656
|
});
|
|
635
|
-
|
|
636
|
-
if (aVisibleIndicators.length === 0) {
|
|
637
|
-
return;
|
|
638
|
-
}
|
|
639
|
-
|
|
640
657
|
const aVisibleIndicatorsOnScrollPosition = [];
|
|
641
658
|
aVisibleIndicators.forEach(function(oIndicator, iIndex) {
|
|
659
|
+
const oOverlay = OverlayRegistry.getOverlay(oIndicator.getOverlayId());
|
|
660
|
+
oOverlay.setFocusable(true);
|
|
642
661
|
oIndicator.getDomRef().tabIndex = iIndex + 2;
|
|
643
662
|
// Indicators with posY < 0 are outside of the current scroll position
|
|
644
663
|
if (oIndicator.getPosY() > 0) {
|
|
@@ -652,7 +671,7 @@ sap.ui.define([
|
|
|
652
671
|
} else {
|
|
653
672
|
aVisibleIndicators[0].focus();
|
|
654
673
|
}
|
|
655
|
-
}
|
|
674
|
+
}
|
|
656
675
|
};
|
|
657
676
|
|
|
658
677
|
ChangeVisualization.prototype._toggleRootOverlayClickHandler = function(bEnable) {
|
|
@@ -684,6 +703,17 @@ sap.ui.define([
|
|
|
684
703
|
this.oMenuButton = oToolbar.getControl("toggleChangeVisualizationMenuButton");
|
|
685
704
|
this.oRootOverlay = OverlayRegistry.getOverlay(oRootControl);
|
|
686
705
|
this.setVersionsModel(oToolbar);
|
|
706
|
+
// When the visualization is started, the focusable overlays are stored to be reset when the visualization is stopped
|
|
707
|
+
this.aFocusableOverlays ||= OverlayRegistry.getOverlays().filter(function(oOverlay) {
|
|
708
|
+
return oOverlay.getFocusable();
|
|
709
|
+
});
|
|
710
|
+
|
|
711
|
+
const fnSetOverlayFocusability = (bFocusable) => {
|
|
712
|
+
this.aFocusableOverlays.forEach(function(oOverlay) {
|
|
713
|
+
oOverlay.setFocusable(bFocusable);
|
|
714
|
+
});
|
|
715
|
+
};
|
|
716
|
+
|
|
687
717
|
if (this.oVersionsModel && this.oVersionsModel.getData().versioningEnabled) {
|
|
688
718
|
this._updateVisualizationModel({
|
|
689
719
|
versioningAvailable: this.oVersionsModel.getData().versioningEnabled,
|
|
@@ -697,15 +727,20 @@ sap.ui.define([
|
|
|
697
727
|
});
|
|
698
728
|
}
|
|
699
729
|
|
|
730
|
+
// Clean up when the visualization is no longer active
|
|
700
731
|
if (this.getIsActive()) {
|
|
701
732
|
this.setIsActive(false);
|
|
702
733
|
this._toggleRootOverlayClickHandler(false);
|
|
734
|
+
fnSetOverlayFocusability(true);
|
|
735
|
+
delete this.aFocusableOverlays;
|
|
703
736
|
return;
|
|
704
737
|
}
|
|
738
|
+
fnSetOverlayFocusability(false);
|
|
705
739
|
this._toggleRootOverlayClickHandler(true);
|
|
706
740
|
if (!this.getRootControlId()) {
|
|
707
741
|
this.setRootControlId(oRootControl);
|
|
708
742
|
}
|
|
743
|
+
|
|
709
744
|
this.setIsActive(true);
|
|
710
745
|
// show all change visualizations at startup
|
|
711
746
|
this._updateChangeRegistry()
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* OpenUI5
|
|
3
|
+
* (c) Copyright 2009-2024 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/library",
|
|
9
|
+
"sap/ui/base/ManagedObject",
|
|
10
|
+
"sap/ui/core/Element",
|
|
11
|
+
"sap/ui/core/Fragment",
|
|
12
|
+
"sap/ui/fl/write/api/FeaturesAPI",
|
|
13
|
+
"sap/ui/model/json/JSONModel",
|
|
14
|
+
"sap/ui/model/resource/ResourceModel",
|
|
15
|
+
"sap/ui/rta/util/whatsNew/whatsNewContent/WhatsNewFeatures",
|
|
16
|
+
"sap/ui/rta/util/whatsNew/WhatsNewUtils"
|
|
17
|
+
], function(
|
|
18
|
+
mLibrary,
|
|
19
|
+
ManagedObject,
|
|
20
|
+
Element,
|
|
21
|
+
Fragment,
|
|
22
|
+
FeaturesAPI,
|
|
23
|
+
JSONModel,
|
|
24
|
+
ResourceModel,
|
|
25
|
+
WhatsNewFeatures,
|
|
26
|
+
WhatsNewUtils
|
|
27
|
+
) {
|
|
28
|
+
"use strict";
|
|
29
|
+
|
|
30
|
+
const oURLHelper = mLibrary.URLHelper;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* @class Constructor for a new sap.ui.rta.util.whatsNew.WhatsNew
|
|
34
|
+
* @extends sap.ui.base.ManagedObject
|
|
35
|
+
* @author SAP SE
|
|
36
|
+
* @version 1.129.0
|
|
37
|
+
* @constructor
|
|
38
|
+
* @since 1.129
|
|
39
|
+
* @private
|
|
40
|
+
* @ui5-restricted sap.ui.rta
|
|
41
|
+
*/
|
|
42
|
+
const WhatsNew = ManagedObject.extend("sap.ui.rta.util.whatsNew.WhatsNew", {
|
|
43
|
+
metadata: {
|
|
44
|
+
properties: {
|
|
45
|
+
dontShowAgainFeatureIds: { type: "array", defaultValue: [] },
|
|
46
|
+
layer: { type: "string", defaultValue: "" }
|
|
47
|
+
},
|
|
48
|
+
aggregations: {
|
|
49
|
+
whatsNewDialog: { type: "sap.m.Dialog", multiple: false }
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
WhatsNew.prototype.setDontShowAgainFeatureIds = async function(aDontShowAgainFeatureIds) {
|
|
55
|
+
this.setProperty("dontShowAgainFeatureIds", aDontShowAgainFeatureIds);
|
|
56
|
+
this.aUnseenFeatures = await WhatsNewUtils.getFilteredFeatures(aDontShowAgainFeatureIds, this.getLayer());
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
WhatsNew.prototype.initializeWhatsNewDialog = async function() {
|
|
60
|
+
const aDontShowAgainFeatureIds = await FeaturesAPI.getSeenFeatureIds({ layer: this.getLayer() });
|
|
61
|
+
await this.setDontShowAgainFeatureIds(aDontShowAgainFeatureIds);
|
|
62
|
+
if (this.aUnseenFeatures.length === 0 || this.getLayer() !== "CUSTOMER") {
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
const oWhatsNewDialogModel = new JSONModel();
|
|
66
|
+
oWhatsNewDialogModel.setData({ featureCollection: this.aUnseenFeatures });
|
|
67
|
+
if (!this.oWhatsNewDialog) {
|
|
68
|
+
await this.createWhatsNewDialog(oWhatsNewDialogModel);
|
|
69
|
+
}
|
|
70
|
+
this.oWhatsNewDialog.open();
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
WhatsNew.prototype.createWhatsNewDialog = async function(oWhatsNewDialogModel) {
|
|
74
|
+
const oRTAResourceModel = new ResourceModel({ bundleName: "sap.ui.rta.messagebundle" });
|
|
75
|
+
this.oWhatsNewDialog = await Fragment.load({
|
|
76
|
+
name: "sap.ui.rta.util.whatsNew.WhatsNewDialog",
|
|
77
|
+
controller: this
|
|
78
|
+
});
|
|
79
|
+
this.oWhatsNewDialog.setModel(oRTAResourceModel, "i18n");
|
|
80
|
+
this.oWhatsNewDialog.setModel(oWhatsNewDialogModel, "whatsNewModel");
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
WhatsNew.prototype.closeWhatsNewDialog = function() {
|
|
84
|
+
if (this.oWhatsNewDialog) {
|
|
85
|
+
const oDontShowAgainCheckbox = Element.getElementById("whatsNewDialog_DontShowAgain");
|
|
86
|
+
if (oDontShowAgainCheckbox.getSelected()) {
|
|
87
|
+
const aUnseenFeatureIds = this.aUnseenFeatures.map((oUnseenFeature) => oUnseenFeature.featureId);
|
|
88
|
+
const aSeenFeatureIds = [...this.getDontShowAgainFeatureIds(), ...aUnseenFeatureIds];
|
|
89
|
+
const mPropertyBag = { layer: this.getLayer(), seenFeatureIds: aSeenFeatureIds };
|
|
90
|
+
FeaturesAPI.setSeenFeatureIds(mPropertyBag);
|
|
91
|
+
}
|
|
92
|
+
this.oWhatsNewDialog.close();
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
WhatsNew.prototype.onLearnMorePress = function() {
|
|
97
|
+
const sActivePageId = Element.getElementById("sapWhatsNewDialogCarousel").getActivePage();
|
|
98
|
+
const sLearnMoreUrl = WhatsNewUtils.getLearnMoreURL(sActivePageId, this.aUnseenFeatures);
|
|
99
|
+
oURLHelper.redirect(sLearnMoreUrl, true);
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
WhatsNew.prototype.destroy = function(...aArgs) {
|
|
103
|
+
ManagedObject.prototype.destroy.apply(this, aArgs);
|
|
104
|
+
if (this.oWhatsNewDialog) {
|
|
105
|
+
this.oWhatsNewDialog.destroy();
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
return WhatsNew;
|
|
110
|
+
});
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
<core:FragmentDefinition
|
|
2
|
+
xmlns:core="sap.ui.core"
|
|
3
|
+
xmlns="sap.m"
|
|
4
|
+
xmlns:grid="sap.ui.layout.cssgrid"
|
|
5
|
+
xmlns:f="sap.f"
|
|
6
|
+
xmlns:util="sap.ui.fl.util">
|
|
7
|
+
<Dialog
|
|
8
|
+
id="sapUiRtaWhatsNewDialog"
|
|
9
|
+
title="{i18n>TIT_WHATS_NEW_DIALOG}"
|
|
10
|
+
contentWidth="50rem"
|
|
11
|
+
contentHeight="33rem"
|
|
12
|
+
horizontalScrolling="false">
|
|
13
|
+
<content>
|
|
14
|
+
<Carousel
|
|
15
|
+
id="sapWhatsNewDialogCarousel"
|
|
16
|
+
loop="true"
|
|
17
|
+
pages="{path: 'whatsNewModel>/featureCollection', templateShareable: false}"
|
|
18
|
+
height="33rem"
|
|
19
|
+
width="100%">
|
|
20
|
+
<pages>
|
|
21
|
+
<Page enableScrolling="true" showHeader="false">
|
|
22
|
+
<VBox height="100%" width="100%">
|
|
23
|
+
<Title text="{whatsNewModel>title}" class="sapUiMediumMarginTop sapUiLargeMarginBegin sapUiTinyMarginBottom" level="H3"/>
|
|
24
|
+
<f:Card width="44rem" height="24rem" class="sapUiLargeMarginBeginEnd sapUiSmallMarginBottom">
|
|
25
|
+
<f:content>
|
|
26
|
+
<Page showHeader="false" backgroundDesign="Transparent">
|
|
27
|
+
<VBox items="{path: 'whatsNewModel>information', templateShareable: false}" class="sapUiSmallMargin">
|
|
28
|
+
<HBox alignItems="Center" class="sapUiTinyMargin">
|
|
29
|
+
<FormattedText
|
|
30
|
+
visible="{= (${whatsNewModel>image} === null ? true : false) && (${whatsNewModel>text} !== null ? true : false)}"
|
|
31
|
+
htmlText="{whatsNewModel>text}"
|
|
32
|
+
/>
|
|
33
|
+
<Image
|
|
34
|
+
src= "{whatsNewModel>image}"
|
|
35
|
+
visible="{= (${whatsNewModel>image} !== null ? true : false) && (${whatsNewModel>text} === null ? true : false)}"
|
|
36
|
+
class="whatsNewImage"
|
|
37
|
+
width="100%"
|
|
38
|
+
/>
|
|
39
|
+
<grid:CSSGrid
|
|
40
|
+
visible="{= (${whatsNewModel>image} !== null ? true : false) && (${whatsNewModel>text} !== null ? true : false)}"
|
|
41
|
+
gridTemplateColumns="2fr 3fr"
|
|
42
|
+
gridGap="1rem">
|
|
43
|
+
<Image
|
|
44
|
+
src= "{whatsNewModel>image}"
|
|
45
|
+
class="whatsNewImage"
|
|
46
|
+
width="100%"/>
|
|
47
|
+
<HBox alignItems="Center">
|
|
48
|
+
<FormattedText htmlText="{whatsNewModel>text}"/>
|
|
49
|
+
</HBox>
|
|
50
|
+
</grid:CSSGrid>
|
|
51
|
+
</HBox>
|
|
52
|
+
</VBox>
|
|
53
|
+
</Page>
|
|
54
|
+
</f:content>
|
|
55
|
+
</f:Card>
|
|
56
|
+
</VBox>
|
|
57
|
+
</Page>
|
|
58
|
+
</pages>
|
|
59
|
+
</Carousel>
|
|
60
|
+
</content>
|
|
61
|
+
<footer>
|
|
62
|
+
<Toolbar>
|
|
63
|
+
<content>
|
|
64
|
+
<CheckBox
|
|
65
|
+
id="whatsNewDialog_DontShowAgain"
|
|
66
|
+
text="{i18n>TXT_DONT_SHOW_AGAIN_WHATS_NEW_DIALOG}">
|
|
67
|
+
</CheckBox>
|
|
68
|
+
<ToolbarSpacer />
|
|
69
|
+
<Button
|
|
70
|
+
id="sapUiRtaWhatsNewDialog_LearnMore"
|
|
71
|
+
text="{i18n>BTN_LEARN_MORE_WHATS_NEW_DIALOG}"
|
|
72
|
+
press=".onLearnMorePress"/>
|
|
73
|
+
<Button
|
|
74
|
+
id="sapUiRtaWhatsNewDialog_ButtonClose"
|
|
75
|
+
text="{i18n>BTN_CLOSE_FEEDBACK_DIALOG}"
|
|
76
|
+
press=".closeWhatsNewDialog"/>
|
|
77
|
+
</content>
|
|
78
|
+
</Toolbar>
|
|
79
|
+
</footer>
|
|
80
|
+
</Dialog>
|
|
81
|
+
</core:FragmentDefinition>
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* OpenUI5
|
|
3
|
+
* (c) Copyright 2009-2024 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/library",
|
|
9
|
+
"sap/ui/core/Fragment",
|
|
10
|
+
"sap/ui/model/json/JSONModel",
|
|
11
|
+
"sap/ui/model/resource/ResourceModel",
|
|
12
|
+
"sap/ui/rta/util/whatsNew/WhatsNewUtils"
|
|
13
|
+
], function(
|
|
14
|
+
mLibrary,
|
|
15
|
+
Fragment,
|
|
16
|
+
JSONModel,
|
|
17
|
+
ResourceModel,
|
|
18
|
+
WhatsNewUtils
|
|
19
|
+
) {
|
|
20
|
+
"use strict";
|
|
21
|
+
const WhatsNewOverview = {};
|
|
22
|
+
const oURLHelper = mLibrary.URLHelper;
|
|
23
|
+
let oWhatsNewOverviewDialog;
|
|
24
|
+
let aWhatsNewOverviewContent;
|
|
25
|
+
|
|
26
|
+
async function getWhatsNewOverviewContent() {
|
|
27
|
+
const aFeatures = await WhatsNewUtils.getFilteredFeatures([]);
|
|
28
|
+
return [...aFeatures].reverse();
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
WhatsNewOverview.openWhatsNewOverviewDialog = async function() {
|
|
32
|
+
const oWhatsNewDialogModel = new JSONModel();
|
|
33
|
+
aWhatsNewOverviewContent = await getWhatsNewOverviewContent();
|
|
34
|
+
oWhatsNewDialogModel.setData({ featureCollection: aWhatsNewOverviewContent });
|
|
35
|
+
oWhatsNewDialogModel.setProperty("overviewActive", true);
|
|
36
|
+
if (!oWhatsNewOverviewDialog) {
|
|
37
|
+
await WhatsNewOverview.createWhatsNewOverviewDialog(oWhatsNewDialogModel);
|
|
38
|
+
}
|
|
39
|
+
oWhatsNewOverviewDialog.open();
|
|
40
|
+
|
|
41
|
+
return oWhatsNewOverviewDialog;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
WhatsNewOverview.createWhatsNewOverviewDialog = async function(oWhatsNewDialogModel) {
|
|
45
|
+
const oRTAResourceModel = new ResourceModel({ bundleName: "sap.ui.rta.messagebundle" });
|
|
46
|
+
oWhatsNewOverviewDialog = await Fragment.load(
|
|
47
|
+
{
|
|
48
|
+
name: "sap.ui.rta.util.whatsNew.WhatsNewOverviewDialog",
|
|
49
|
+
controller: WhatsNewOverview
|
|
50
|
+
}
|
|
51
|
+
);
|
|
52
|
+
oWhatsNewOverviewDialog.setModel(oRTAResourceModel, "i18n");
|
|
53
|
+
oWhatsNewOverviewDialog.setModel(oWhatsNewDialogModel, "whatsNewModel");
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
WhatsNewOverview.closeWhatsNewOverviewDialog = function() {
|
|
57
|
+
if (oWhatsNewOverviewDialog) {
|
|
58
|
+
oWhatsNewOverviewDialog.close();
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
WhatsNewOverview.backToOverview = function() {
|
|
63
|
+
var oContext = oWhatsNewOverviewDialog.getBindingContext("whatsNewModel");
|
|
64
|
+
oContext.setProperty("overviewActive", true);
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
WhatsNewOverview.onSelectListItem = function(oEvent) {
|
|
68
|
+
const oSelectedItem = oEvent.getSource();
|
|
69
|
+
const oContext = oSelectedItem.getBindingContext("whatsNewModel");
|
|
70
|
+
const sPath = oContext.getPath();
|
|
71
|
+
oContext.setProperty("overviewActive", false);
|
|
72
|
+
oWhatsNewOverviewDialog.bindElement({ path: sPath, model: "whatsNewModel" });
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
WhatsNewOverview.onLearnMorePress = function(oEvent) {
|
|
76
|
+
const sPath = oEvent.getSource().getBindingContext("whatsNewModel").getPath();
|
|
77
|
+
const sLearnMoreUrl = WhatsNewUtils.getLearnMoreURL(sPath, aWhatsNewOverviewContent);
|
|
78
|
+
oURLHelper.redirect(sLearnMoreUrl, true);
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
return WhatsNewOverview;
|
|
82
|
+
});
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
<core:FragmentDefinition
|
|
2
|
+
xmlns:core="sap.ui.core"
|
|
3
|
+
xmlns="sap.m"
|
|
4
|
+
xmlns:grid="sap.ui.layout.cssgrid"
|
|
5
|
+
xmlns:f="sap.f"
|
|
6
|
+
xmlns:util="sap.ui.fl.util">
|
|
7
|
+
<Dialog
|
|
8
|
+
id="sapUiRtaWhatsNewOverviewDialog"
|
|
9
|
+
title="What's New in Key User Adaptation"
|
|
10
|
+
contentWidth="50rem"
|
|
11
|
+
contentHeight="33rem"
|
|
12
|
+
horizontalScrolling="false">
|
|
13
|
+
<List id="whatsNewOverview" items="{path: 'whatsNewModel>/featureCollection'}" visible="{whatsNewModel>overviewActive}">
|
|
14
|
+
<StandardListItem description="{whatsNewModel>description}" title="{whatsNewModel>title}" press=".onSelectListItem" type="Active"/>
|
|
15
|
+
</List>
|
|
16
|
+
<VBox id="whatsNewItemPage" visible="{= ${whatsNewModel>overviewActive} === false}">
|
|
17
|
+
<VBox height="100%" width="100%" >
|
|
18
|
+
<Title text="{whatsNewModel>title}" class="sapUiMediumMarginTop sapUiLargeMarginBegin sapUiTinyMarginBottom" level="H3"/>
|
|
19
|
+
<VBox class="sapUiSmallMargin sapUiLargeMarginBegin sapUiLargeMarginEnd" >
|
|
20
|
+
<VBox height="100%" width="100%" items="{whatsNewModel>information}">
|
|
21
|
+
<HBox alignItems="Center" class=" sapUiSmallMarginBottom ">
|
|
22
|
+
<FormattedText
|
|
23
|
+
visible="{= (${whatsNewModel>image} === null ? true : false) && (${whatsNewModel>text} !== null ? true : false)}"
|
|
24
|
+
htmlText="{whatsNewModel>text}"
|
|
25
|
+
class="sapUiMediumMarginEnd"/>
|
|
26
|
+
<Image
|
|
27
|
+
src= "{whatsNewModel>image}"
|
|
28
|
+
visible="{= (${whatsNewModel>image} !== null ? true : false) && (${whatsNewModel>text} === null ? true : false)}"
|
|
29
|
+
class=" sapUiMediumMarginEnd whatsNewImage"
|
|
30
|
+
width="100%"
|
|
31
|
+
/>
|
|
32
|
+
<grid:CSSGrid
|
|
33
|
+
visible="{= (${whatsNewModel>image} !== null ? true : false) && (${whatsNewModel>text} !== null ? true : false)}"
|
|
34
|
+
gridTemplateColumns="2fr 3fr"
|
|
35
|
+
gridGap="1rem">
|
|
36
|
+
<Image
|
|
37
|
+
src= "{whatsNewModel>image}"
|
|
38
|
+
decorative="true"
|
|
39
|
+
densityAware="false"
|
|
40
|
+
class=" sapUiMediumMarginEnd whatsNewImage"
|
|
41
|
+
width="100%"
|
|
42
|
+
/>
|
|
43
|
+
<HBox alignItems="Center">
|
|
44
|
+
<FormattedText htmlText="{whatsNewModel>text}"/>
|
|
45
|
+
</HBox>
|
|
46
|
+
</grid:CSSGrid>
|
|
47
|
+
</HBox>
|
|
48
|
+
</VBox>
|
|
49
|
+
</VBox>
|
|
50
|
+
</VBox>
|
|
51
|
+
</VBox>
|
|
52
|
+
<footer>
|
|
53
|
+
<Toolbar>
|
|
54
|
+
<content>
|
|
55
|
+
<ToolbarSpacer />
|
|
56
|
+
<Button
|
|
57
|
+
id="sapUiRtaWhatsNewOverviewDialog_LearnMore"
|
|
58
|
+
visible="{= ${whatsNewModel>overviewActive} === false}"
|
|
59
|
+
text="{i18n>BTN_LEARN_MORE_WHATS_NEW_DIALOG}"
|
|
60
|
+
press=".onLearnMorePress"/>
|
|
61
|
+
<Button
|
|
62
|
+
id="sapUiRtaWhatsNewOverviewDialog_ButtonClose"
|
|
63
|
+
visible="{whatsNewModel>overviewActive}"
|
|
64
|
+
text="{i18n>BTN_CLOSE_FEEDBACK_DIALOG}"
|
|
65
|
+
press=".closeWhatsNewOverviewDialog"/>
|
|
66
|
+
<Button
|
|
67
|
+
id="sapUiRtaWhatsNewOverviewDialog_ButtonBack"
|
|
68
|
+
visible="{= ${whatsNewModel>overviewActive} === false}"
|
|
69
|
+
text="{i18n>BTN_BACK_WHATS_NEW_OVERVIEW_DIALOG}"
|
|
70
|
+
press=".backToOverview"/>
|
|
71
|
+
</content>
|
|
72
|
+
</Toolbar>
|
|
73
|
+
</footer>
|
|
74
|
+
</Dialog>
|
|
75
|
+
</core:FragmentDefinition>
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* OpenUI5
|
|
3
|
+
* (c) Copyright 2009-2024 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/ui/fl/registry/Settings",
|
|
9
|
+
"sap/ui/rta/util/whatsNew/whatsNewContent/WhatsNewFeatures"
|
|
10
|
+
], function(
|
|
11
|
+
Settings,
|
|
12
|
+
WhatsNewFeatures
|
|
13
|
+
) {
|
|
14
|
+
"use strict";
|
|
15
|
+
|
|
16
|
+
function filterDontShowAgainFeatures(aFeatures, aDontShowAgainFeatureIds) {
|
|
17
|
+
return aFeatures.filter((oFeature) => {
|
|
18
|
+
return !aDontShowAgainFeatureIds?.includes(oFeature.featureId);
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
async function filterApplicableFeatures(aFeatures, sLayer) {
|
|
23
|
+
const aAreFeaturesApplicable = await Promise.all(
|
|
24
|
+
aFeatures.map((oFeature) => {
|
|
25
|
+
if (typeof oFeature.isFeatureApplicable === "function") {
|
|
26
|
+
return oFeature.isFeatureApplicable(sLayer);
|
|
27
|
+
}
|
|
28
|
+
return true;
|
|
29
|
+
})
|
|
30
|
+
);
|
|
31
|
+
|
|
32
|
+
const aFilteredFeatures = aFeatures.filter((oFeature, iIndex) => {
|
|
33
|
+
return aAreFeaturesApplicable[iIndex];
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
return aFilteredFeatures;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
const WhatsNewUtils = {
|
|
40
|
+
/**
|
|
41
|
+
* Get the URL for the feature documentation
|
|
42
|
+
* @param {string} sPath - The path of the feature, including the index
|
|
43
|
+
* @param {Array} aFeatureCollection - Feature collection
|
|
44
|
+
* @returns {string} URL for the feature documentation
|
|
45
|
+
*/
|
|
46
|
+
getLearnMoreURL(sPath, aFeatureCollection) {
|
|
47
|
+
const sFeaturePageIndex = sPath.slice(-1);
|
|
48
|
+
const oSettings = Settings.getInstanceOrUndef();
|
|
49
|
+
if (oSettings?.isAtoEnabled() && oSettings?.getSystem()) {
|
|
50
|
+
return aFeatureCollection[sFeaturePageIndex].documentationUrls.s4HanaCloudUrl;
|
|
51
|
+
}
|
|
52
|
+
if (!oSettings?.isAtoEnabled() && oSettings?.getSystem()) {
|
|
53
|
+
return aFeatureCollection[sFeaturePageIndex].documentationUrls.s4HanaOnPremUrl;
|
|
54
|
+
}
|
|
55
|
+
return aFeatureCollection[sFeaturePageIndex].documentationUrls.btpUrl;
|
|
56
|
+
},
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Filters the new features based on the dontShowAgain feature IDs and the Flex settings
|
|
60
|
+
* @param {string[]} aDontShowAgainFeatureIds - Array of feature IDs that should be excluded
|
|
61
|
+
* from the What's New dialog
|
|
62
|
+
* @param {string} sLayer - Layer for which the features should be filtered
|
|
63
|
+
* @returns {object[]} Filtered What's New features
|
|
64
|
+
*/
|
|
65
|
+
getFilteredFeatures(aDontShowAgainFeatureIds, sLayer) {
|
|
66
|
+
const aAllFeatures = WhatsNewFeatures.getAllFeatures();
|
|
67
|
+
const aNewFeatures = filterDontShowAgainFeatures(aAllFeatures, aDontShowAgainFeatureIds);
|
|
68
|
+
return filterApplicableFeatures(aNewFeatures, sLayer);
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
return WhatsNewUtils;
|
|
73
|
+
});
|