@openui5/sap.ui.rta 1.136.2 → 1.138.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/REUSE.toml +0 -28
- package/THIRDPARTY.txt +0 -24
- 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 +33 -17
- package/src/sap/ui/rta/Utils.js +1 -1
- package/src/sap/ui/rta/appVariant/AppVariantManager.js +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/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 +2 -3
- package/src/sap/ui/rta/command/LREPSerializer.js +2 -85
- 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 +115 -87
- 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 +12 -60
- package/src/sap/ui/rta/messagebundle_ar.properties +6 -31
- package/src/sap/ui/rta/messagebundle_bg.properties +7 -32
- package/src/sap/ui/rta/messagebundle_ca.properties +7 -32
- package/src/sap/ui/rta/messagebundle_cnr.properties +6 -31
- package/src/sap/ui/rta/messagebundle_cs.properties +6 -31
- package/src/sap/ui/rta/messagebundle_cy.properties +7 -32
- package/src/sap/ui/rta/messagebundle_da.properties +7 -32
- package/src/sap/ui/rta/messagebundle_de.properties +5 -30
- package/src/sap/ui/rta/messagebundle_el.properties +7 -32
- package/src/sap/ui/rta/messagebundle_en.properties +7 -32
- package/src/sap/ui/rta/messagebundle_en_GB.properties +7 -32
- package/src/sap/ui/rta/messagebundle_en_US_saprigi.properties +8 -32
- package/src/sap/ui/rta/messagebundle_es.properties +7 -32
- package/src/sap/ui/rta/messagebundle_es_MX.properties +7 -32
- package/src/sap/ui/rta/messagebundle_et.properties +7 -32
- package/src/sap/ui/rta/messagebundle_fi.properties +7 -32
- package/src/sap/ui/rta/messagebundle_fr.properties +7 -32
- package/src/sap/ui/rta/messagebundle_fr_CA.properties +7 -32
- package/src/sap/ui/rta/messagebundle_hi.properties +6 -31
- package/src/sap/ui/rta/messagebundle_hr.properties +7 -32
- package/src/sap/ui/rta/messagebundle_hu.properties +7 -32
- package/src/sap/ui/rta/messagebundle_id.properties +7 -32
- package/src/sap/ui/rta/messagebundle_it.properties +7 -32
- package/src/sap/ui/rta/messagebundle_iw.properties +7 -32
- package/src/sap/ui/rta/messagebundle_ja.properties +7 -32
- package/src/sap/ui/rta/messagebundle_kk.properties +14 -39
- package/src/sap/ui/rta/messagebundle_ko.properties +7 -32
- package/src/sap/ui/rta/messagebundle_lt.properties +7 -32
- package/src/sap/ui/rta/messagebundle_lv.properties +7 -32
- package/src/sap/ui/rta/messagebundle_mk.properties +7 -32
- package/src/sap/ui/rta/messagebundle_ms.properties +7 -32
- package/src/sap/ui/rta/messagebundle_nl.properties +6 -31
- package/src/sap/ui/rta/messagebundle_no.properties +7 -32
- package/src/sap/ui/rta/messagebundle_pl.properties +7 -32
- package/src/sap/ui/rta/messagebundle_pt.properties +7 -32
- package/src/sap/ui/rta/messagebundle_pt_PT.properties +7 -32
- package/src/sap/ui/rta/messagebundle_ro.properties +7 -32
- package/src/sap/ui/rta/messagebundle_ru.properties +7 -32
- package/src/sap/ui/rta/messagebundle_sh.properties +6 -31
- package/src/sap/ui/rta/messagebundle_sk.properties +7 -32
- package/src/sap/ui/rta/messagebundle_sl.properties +7 -32
- package/src/sap/ui/rta/messagebundle_sr.properties +6 -31
- package/src/sap/ui/rta/messagebundle_sv.properties +7 -32
- package/src/sap/ui/rta/messagebundle_th.properties +7 -32
- package/src/sap/ui/rta/messagebundle_tr.properties +7 -32
- package/src/sap/ui/rta/messagebundle_uk.properties +7 -32
- package/src/sap/ui/rta/messagebundle_vi.properties +7 -32
- package/src/sap/ui/rta/messagebundle_zh_CN.properties +7 -32
- package/src/sap/ui/rta/messagebundle_zh_TW.properties +7 -32
- package/src/sap/ui/rta/plugin/AddXMLAtExtensionPoint.js +1 -1
- package/src/sap/ui/rta/plugin/AddXMLPlugin.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/ExtendControllerPlugin.js +1 -1
- package/src/sap/ui/rta/plugin/LocalReset.js +1 -1
- package/src/sap/ui/rta/plugin/Plugin.js +1 -1
- package/src/sap/ui/rta/plugin/RTAElementMover.js +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 +14 -7
- 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 +11 -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.fragment.xml +16 -3
- 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 +3 -3
- package/src/sap/ui/rta/plugin/iframe/AddIFrame.js +1 -1
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.fragment.xml +2 -2
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.js +1 -1
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialogController.js +23 -6
- package/src/sap/ui/rta/plugin/rename/Rename.js +1 -1
- package/src/sap/ui/rta/plugin/rename/RenameDialog.js +1 -1
- package/src/sap/ui/rta/service/Action.js +1 -1
- package/src/sap/ui/rta/service/ControllerExtension.js +1 -1
- package/src/sap/ui/rta/service/Outline.js +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/toolbar/ActionsMenu.fragment.xml +4 -2
- package/src/sap/ui/rta/toolbar/Adaptation.js +15 -3
- package/src/sap/ui/rta/toolbar/Base.js +1 -1
- package/src/sap/ui/rta/toolbar/Fiori.js +1 -1
- package/src/sap/ui/rta/toolbar/FioriLike.js +1 -1
- package/src/sap/ui/rta/toolbar/OverflowToolbarButton.js +1 -1
- package/src/sap/ui/rta/toolbar/Standalone.js +1 -1
- 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/Animation.js +4 -6
- package/src/sap/ui/rta/util/BindingsExtractor.js +44 -53
- package/src/sap/ui/rta/util/PluginManager.js +6 -6
- package/src/sap/ui/rta/util/PopupManager.js +90 -109
- package/src/sap/ui/rta/util/ReloadManager.js +53 -98
- package/src/sap/ui/rta/util/ServiceEventBus.js +3 -4
- package/src/sap/ui/rta/util/ServiceManager.js +1 -1
- package/src/sap/ui/rta/util/adaptationStarter.js +59 -80
- package/src/sap/ui/rta/util/changeVisualization/ChangeCategories.js +3 -3
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicator.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorRegistry.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/ChangeStates.js +2 -4
- package/src/sap/ui/rta/util/changeVisualization/ChangeVisualization.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/ChangeVisualizationUtils.js +5 -7
- package/src/sap/ui/rta/util/changeVisualization/commands/CombineVisualization.js +9 -9
- package/src/sap/ui/rta/util/changeVisualization/commands/CreateContainerVisualization.js +5 -5
- package/src/sap/ui/rta/util/changeVisualization/commands/MoveVisualization.js +8 -8
- package/src/sap/ui/rta/util/changeVisualization/commands/RenameVisualization.js +5 -5
- package/src/sap/ui/rta/util/changeVisualization/commands/SplitVisualization.js +5 -5
- package/src/sap/ui/rta/util/changeVisualization/commands/getCommandVisualization.js +2 -2
- package/src/sap/ui/rta/util/guidedTour/GuidedTour.js +1 -1
- package/src/sap/ui/rta/util/hasStableId.js +11 -19
- package/src/sap/ui/rta/util/showMessageBox.js +15 -15
- package/src/sap/ui/rta/util/validateFlexEnabled.js +35 -34
- package/src/sap/ui/rta/util/validateStableIds.js +22 -31
- package/src/sap/ui/rta/util/validateText.js +7 -7
- package/src/sap/ui/rta/util/whatsNew/WhatsNew.js +33 -7
- package/src/sap/ui/rta/util/whatsNew/WhatsNewOverview.js +2 -6
- package/src/sap/ui/rta/util/whatsNew/WhatsNewOverviewDialog.fragment.xml +1 -0
- package/src/sap/ui/rta/util/whatsNew/WhatsNewUtils.js +4 -4
- package/src/sap/ui/rta/util/whatsNew/whatsNewContent/WhatsNewFeatures.js +8 -22
|
@@ -15,7 +15,7 @@ sap.ui.define([
|
|
|
15
15
|
) {
|
|
16
16
|
"use strict";
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
const MoveVisualization = {};
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
21
|
* Creates a localized description and button text for move changes based on the provided
|
|
@@ -29,17 +29,17 @@ sap.ui.define([
|
|
|
29
29
|
* @returns {object} Localized description text and button text
|
|
30
30
|
*/
|
|
31
31
|
MoveVisualization.getDescription = function(mPayload, sLabel, mPropertyBag) {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
32
|
+
const oRtaResourceBundle = Lib.getResourceBundleFor("sap.ui.rta");
|
|
33
|
+
let sDescriptionText = oRtaResourceBundle.getText("TXT_CHANGEVISUALIZATION_CHANGE_MOVE_WITHIN", [ChangeVisualizationUtils.shortenString(sLabel)]);
|
|
34
|
+
let sDescriptionTooltip = oRtaResourceBundle.getText("TXT_CHANGEVISUALIZATION_CHANGE_MOVE_WITHIN", [sLabel]);
|
|
35
|
+
let sButtonText;
|
|
36
|
+
const oAppComponent = mPropertyBag.appComponent;
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
const sSourceId = (
|
|
39
39
|
mPayload.sourceContainer
|
|
40
40
|
&& JsControlTreeModifier.getControlIdBySelector(mPayload.sourceContainer, oAppComponent)
|
|
41
41
|
);
|
|
42
|
-
|
|
42
|
+
const sTargetId = (
|
|
43
43
|
mPayload.targetContainer
|
|
44
44
|
&& JsControlTreeModifier.getControlIdBySelector(mPayload.targetContainer, oAppComponent)
|
|
45
45
|
);
|
|
@@ -13,7 +13,7 @@ sap.ui.define([
|
|
|
13
13
|
) {
|
|
14
14
|
"use strict";
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
const RenameVisualization = {};
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
19
|
* Creates a localized description for rename changes based on the provided
|
|
@@ -26,18 +26,18 @@ sap.ui.define([
|
|
|
26
26
|
* @returns {object} Localized description
|
|
27
27
|
*/
|
|
28
28
|
RenameVisualization.getDescription = function(mPayload, sFallbackLabel) {
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
const oRtaResourceBundle = Lib.getResourceBundleFor("sap.ui.rta");
|
|
30
|
+
const sKey = mPayload.originalLabel
|
|
31
31
|
? "TXT_CHANGEVISUALIZATION_CHANGE_RENAME_FROM_TO"
|
|
32
32
|
: "TXT_CHANGEVISUALIZATION_CHANGE_RENAME_TO";
|
|
33
|
-
|
|
33
|
+
const sDescriptionText = oRtaResourceBundle.getText(
|
|
34
34
|
sKey,
|
|
35
35
|
[
|
|
36
36
|
ChangeVisualizationUtils.shortenString(mPayload.newLabel) || sFallbackLabel,
|
|
37
37
|
ChangeVisualizationUtils.shortenString(mPayload.originalLabel)
|
|
38
38
|
]
|
|
39
39
|
);
|
|
40
|
-
|
|
40
|
+
const sDescriptionTooltip = oRtaResourceBundle.getText(
|
|
41
41
|
sKey,
|
|
42
42
|
[
|
|
43
43
|
mPayload.newLabel || sFallbackLabel,
|
|
@@ -13,7 +13,7 @@ sap.ui.define([
|
|
|
13
13
|
) {
|
|
14
14
|
"use strict";
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
const SplitVisualization = {};
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
19
|
* Creates a localized description and button text for split changes based on the provided
|
|
@@ -24,10 +24,10 @@ sap.ui.define([
|
|
|
24
24
|
* @returns {object} Localized description text and button text
|
|
25
25
|
*/
|
|
26
26
|
SplitVisualization.getDescription = function(mPayload, sLabel) {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
27
|
+
const oRtaResourceBundle = Lib.getResourceBundleFor("sap.ui.rta");
|
|
28
|
+
const sDescriptionText = oRtaResourceBundle.getText("TXT_CHANGEVISUALIZATION_CHANGE_SPLIT", [ChangeVisualizationUtils.shortenString(sLabel)]);
|
|
29
|
+
const sDescriptionTooltip = oRtaResourceBundle.getText("TXT_CHANGEVISUALIZATION_CHANGE_SPLIT", [sLabel]);
|
|
30
|
+
const sButtonText = oRtaResourceBundle.getText("BTN_CHANGEVISUALIZATION_SHOW_DEPENDENT_CONTAINER_SPLIT");
|
|
31
31
|
return { descriptionText: sDescriptionText, descriptionTooltip: sDescriptionTooltip, buttonText: sButtonText};
|
|
32
32
|
};
|
|
33
33
|
|
|
@@ -19,7 +19,7 @@ sap.ui.define([
|
|
|
19
19
|
) {
|
|
20
20
|
"use strict";
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
const mCommands = {
|
|
23
23
|
rename: RenameVisualization,
|
|
24
24
|
move: MoveVisualization,
|
|
25
25
|
combine: CombineVisualization,
|
|
@@ -28,7 +28,7 @@ sap.ui.define([
|
|
|
28
28
|
};
|
|
29
29
|
|
|
30
30
|
return function(mIndicatorInformation) {
|
|
31
|
-
|
|
31
|
+
let sCommandName = mIndicatorInformation.commandName;
|
|
32
32
|
|
|
33
33
|
// Settings commands can be assigned to existing categories
|
|
34
34
|
// (e.g. "move" to display the "Show Source" button)
|
|
@@ -16,15 +16,15 @@ sap.ui.define([
|
|
|
16
16
|
"use strict";
|
|
17
17
|
|
|
18
18
|
function isCloneFromAggregationBinding(oControl) {
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
const {sParentAggregationName} = oControl;
|
|
20
|
+
const oParent = oControl.getParent();
|
|
21
21
|
|
|
22
22
|
if (oParent && sParentAggregationName) {
|
|
23
|
-
|
|
23
|
+
const oBindingInfo = oParent.getBindingInfo(sParentAggregationName);
|
|
24
24
|
if (oBindingInfo) {
|
|
25
25
|
if (
|
|
26
26
|
oBindingInfo.template
|
|
27
|
-
&& oControl
|
|
27
|
+
&& oControl.isA(oBindingInfo.template.getMetadata().getClass())
|
|
28
28
|
) {
|
|
29
29
|
return oBindingInfo.template;
|
|
30
30
|
}
|
|
@@ -47,31 +47,23 @@ sap.ui.define([
|
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
if (typeof oElementOverlay.data("hasStableId") !== "boolean") {
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
const aStableElements = oElementOverlay.getDesignTimeMetadata().getStableElements(oElementOverlay);
|
|
51
|
+
let bUnstable = false;
|
|
52
52
|
|
|
53
53
|
if (aStableElements.length > 0) {
|
|
54
54
|
if (isCloneFromAggregationBinding(oElementOverlay.getElement())) {
|
|
55
55
|
bUnstable = aStableElements.some(function(vStableElement) {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
var bUnstable = false;
|
|
59
|
-
|
|
60
|
-
if (isPlainObject(vStableElement)) {
|
|
61
|
-
vControl = vStableElement.id;
|
|
62
|
-
oAppComponent = vStableElement.appComponent;
|
|
63
|
-
} else {
|
|
64
|
-
vControl = vStableElement;
|
|
65
|
-
}
|
|
56
|
+
const vControl = isPlainObject(vStableElement) ? vStableElement.id : vStableElement;
|
|
57
|
+
const oAppComponent = isPlainObject(vStableElement) && vStableElement.appComponent;
|
|
66
58
|
|
|
67
59
|
// 1. First we check control as is, as getStableElements() may already return a control from the template
|
|
68
60
|
bUnstable = !FlUtils.checkControlId(vControl, oAppComponent);
|
|
69
61
|
|
|
70
62
|
// 2. If it's unstable, we try to detect the corresponding control in the template manually
|
|
71
63
|
if (bUnstable) {
|
|
72
|
-
|
|
64
|
+
const oControl = ElementUtil.getElementInstance(vControl);
|
|
73
65
|
if (ElementUtil.getElementInstance(vControl)) {
|
|
74
|
-
|
|
66
|
+
const mLocationInTemplate = ElementUtil.getAggregationInformation(oControl);
|
|
75
67
|
bUnstable = !FlUtils.checkControlId(ElementUtil.extractTemplateId(mLocationInTemplate), oAppComponent);
|
|
76
68
|
}
|
|
77
69
|
}
|
|
@@ -80,7 +72,7 @@ sap.ui.define([
|
|
|
80
72
|
});
|
|
81
73
|
} else {
|
|
82
74
|
bUnstable = aStableElements.some(function(vStableElement) {
|
|
83
|
-
|
|
75
|
+
const vControl = vStableElement.id || vStableElement;
|
|
84
76
|
return !FlUtils.checkControlId(vControl, vStableElement.appComponent);
|
|
85
77
|
});
|
|
86
78
|
}
|
|
@@ -17,20 +17,20 @@ sap.ui.define([
|
|
|
17
17
|
) {
|
|
18
18
|
"use strict";
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
const sLinkRegex = "\\[(.*?)\\]\\((.*?)\\)";
|
|
21
21
|
|
|
22
22
|
function hasLinks(sMessage) {
|
|
23
|
-
|
|
23
|
+
const vResult = getLinks(sMessage);
|
|
24
24
|
return Array.isArray(vResult) && vResult.length > 0;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
function isLink(sText) {
|
|
28
|
-
|
|
28
|
+
const oRegex = new RegExp(`^${sLinkRegex}$`);
|
|
29
29
|
return Array.isArray(oRegex.exec(sText));
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
function extractLink(sLink) {
|
|
33
|
-
|
|
33
|
+
const aMatch = new RegExp(sLinkRegex).exec(sLink);
|
|
34
34
|
return {
|
|
35
35
|
text: aMatch[1],
|
|
36
36
|
href: aMatch[2]
|
|
@@ -38,16 +38,16 @@ sap.ui.define([
|
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
function getLinks(sMessage) {
|
|
41
|
-
|
|
41
|
+
const oRegExp = new RegExp(sLinkRegex, "g");
|
|
42
42
|
return sMessage.match(oRegExp);
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
function convertIntoControls(aSymbols) {
|
|
46
|
-
|
|
46
|
+
const oLayout = new HorizontalLayout({
|
|
47
47
|
allowWrapping: true,
|
|
48
48
|
content: aSymbols.map(function(sSymbol) {
|
|
49
49
|
if (isLink(sSymbol)) {
|
|
50
|
-
|
|
50
|
+
const mLink = extractLink(sSymbol);
|
|
51
51
|
return new Link({
|
|
52
52
|
text: mLink.text,
|
|
53
53
|
href: mLink.href,
|
|
@@ -69,19 +69,19 @@ sap.ui.define([
|
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
function getSymbols(sMessage) {
|
|
72
|
-
|
|
73
|
-
|
|
72
|
+
const aSymbols = [sMessage];
|
|
73
|
+
const aLinks = getLinks(sMessage);
|
|
74
74
|
|
|
75
75
|
aLinks.forEach(function(sLink) {
|
|
76
|
-
|
|
76
|
+
let i = 0;
|
|
77
77
|
while (i < aSymbols.length) {
|
|
78
|
-
|
|
78
|
+
const sSymbol = aSymbols[i];
|
|
79
79
|
|
|
80
80
|
if (isLink(sSymbol)) {
|
|
81
81
|
i++;
|
|
82
82
|
} else {
|
|
83
|
-
|
|
84
|
-
|
|
83
|
+
const aParts = sSymbol.split(sLink);
|
|
84
|
+
const aInsert = [];
|
|
85
85
|
|
|
86
86
|
aParts.forEach(function(sPart, iIndex, aOriginal) { // eslint-disable-line no-loop-func
|
|
87
87
|
aInsert.push(sPart);
|
|
@@ -111,10 +111,10 @@ sap.ui.define([
|
|
|
111
111
|
* @param {string} [sMessageType="show"] - Decides the type of the MessageBox that should be shown with (see different types at {@link sap.m.MessageBox})
|
|
112
112
|
*/
|
|
113
113
|
return function showMessageBox(sMessage, mOptions, sMessageType) {
|
|
114
|
-
|
|
114
|
+
let vMessage;
|
|
115
115
|
|
|
116
116
|
if (hasLinks(sMessage)) {
|
|
117
|
-
|
|
117
|
+
const aSymbols = getSymbols(sMessage);
|
|
118
118
|
vMessage = convertIntoControls(aSymbols);
|
|
119
119
|
} else {
|
|
120
120
|
vMessage = sMessage;
|
|
@@ -24,13 +24,14 @@ sap.ui.define([
|
|
|
24
24
|
DtUtil
|
|
25
25
|
) {
|
|
26
26
|
"use strict";
|
|
27
|
+
|
|
27
28
|
return function(oRta) {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
const mMessageBoxShow = {};
|
|
30
|
+
let aPendingOverlaysToValidate = [];
|
|
31
|
+
const oComponent = FlUtils.getAppComponentForControl(oRta.getRootControlInstance());
|
|
31
32
|
|
|
32
|
-
function
|
|
33
|
-
|
|
33
|
+
function displayMessage(oRta, oComponent, sText, sIconType, sTitle) {
|
|
34
|
+
const sComponentId = oComponent.getId();
|
|
34
35
|
if (!mMessageBoxShow[sComponentId]) {
|
|
35
36
|
showMessageBox(
|
|
36
37
|
oRta._getTextResources().getText(sText),
|
|
@@ -41,16 +42,16 @@ sap.ui.define([
|
|
|
41
42
|
},
|
|
42
43
|
"show"
|
|
43
44
|
);
|
|
44
|
-
|
|
45
|
+
setMessageBoxShow(sComponentId, true);
|
|
45
46
|
}
|
|
46
47
|
}
|
|
47
48
|
|
|
48
|
-
function
|
|
49
|
+
function setMessageBoxShow(sComponentId, bValue) {
|
|
49
50
|
mMessageBoxShow[sComponentId] = bValue;
|
|
50
51
|
}
|
|
51
52
|
|
|
52
|
-
function
|
|
53
|
-
|
|
53
|
+
function isValidApp(oComponent) {
|
|
54
|
+
const oManifest = oComponent.getManifest();
|
|
54
55
|
|
|
55
56
|
return (
|
|
56
57
|
ObjectPath.get(["sap.app", "id"], oManifest) !== "sap.ui.documentation.sdk"
|
|
@@ -59,7 +60,7 @@ sap.ui.define([
|
|
|
59
60
|
);
|
|
60
61
|
}
|
|
61
62
|
|
|
62
|
-
function
|
|
63
|
+
function isTestEnvironment() {
|
|
63
64
|
return (
|
|
64
65
|
"QUnit" in window
|
|
65
66
|
|| (
|
|
@@ -69,28 +70,28 @@ sap.ui.define([
|
|
|
69
70
|
);
|
|
70
71
|
}
|
|
71
72
|
|
|
72
|
-
function
|
|
73
|
+
function isControlAvailable(oControl) {
|
|
73
74
|
return oControl && !oControl._bIsBeingDestroyed;
|
|
74
75
|
}
|
|
75
76
|
|
|
76
|
-
function
|
|
77
|
-
|
|
77
|
+
function handleModeChanged(oEvent) {
|
|
78
|
+
const sNewMode = oEvent.getParameters().mode;
|
|
78
79
|
if (sNewMode === "adaptation") {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
aPendingOverlaysToValidate = aPendingOverlaysToValidate.filter(
|
|
82
|
-
|
|
80
|
+
const oRta = oEvent.getSource();
|
|
81
|
+
const oComponent = FlUtils.getAppComponentForControl(oRta.getRootControlInstance());
|
|
82
|
+
aPendingOverlaysToValidate = aPendingOverlaysToValidate.filter(isControlAvailable);
|
|
83
|
+
handleUnstableIds(oRta, oComponent, aPendingOverlaysToValidate);
|
|
83
84
|
aPendingOverlaysToValidate = [];
|
|
84
85
|
}
|
|
85
86
|
}
|
|
86
87
|
|
|
87
|
-
function
|
|
88
|
-
|
|
88
|
+
function validateCreatedOverlay(oEvent, oRta) {
|
|
89
|
+
const oElementOverlayCreated = oEvent.getParameters().elementOverlay;
|
|
89
90
|
if (oRta.getMode() === "adaptation") {
|
|
90
|
-
|
|
91
|
+
const oComponent = FlUtils.getAppComponentForControl(oRta.getRootControlInstance());
|
|
91
92
|
DtUtil.waitForSynced(oRta._oDesignTime, function(oOverlay) {
|
|
92
|
-
if (
|
|
93
|
-
|
|
93
|
+
if (isControlAvailable(oOverlay)) {
|
|
94
|
+
handleUnstableIds(oRta, oComponent, [oOverlay]);
|
|
94
95
|
}
|
|
95
96
|
})(oElementOverlayCreated);
|
|
96
97
|
} else {
|
|
@@ -98,33 +99,33 @@ sap.ui.define([
|
|
|
98
99
|
}
|
|
99
100
|
}
|
|
100
101
|
|
|
101
|
-
function
|
|
102
|
-
|
|
102
|
+
function handleUnstableIds(oRta, oComponent, aElementOverlays) {
|
|
103
|
+
const aUnstableOverlays = validateStableIds(aElementOverlays, oComponent);
|
|
103
104
|
|
|
104
105
|
if (aUnstableOverlays.length) {
|
|
105
106
|
aUnstableOverlays.forEach(function(oElementOverlay) {
|
|
106
107
|
Log.error("Control ID was generated dynamically by SAPUI5. To support SAPUI5 flexibility, a stable control ID is needed to assign the changes to.", oElementOverlay.getElement().getId());
|
|
107
108
|
});
|
|
108
|
-
|
|
109
|
+
displayMessage(oRta, oComponent, "MSG_UNSTABLE_ID_FOUND", "ERROR", "HEADER_ERROR");
|
|
109
110
|
}
|
|
110
111
|
}
|
|
111
112
|
|
|
112
113
|
oRta.attachEventOnce("stop", function() {
|
|
113
|
-
|
|
114
|
+
setMessageBoxShow(oComponent.getId(), false);
|
|
114
115
|
});
|
|
115
116
|
|
|
116
|
-
if (oComponent &&
|
|
117
|
-
|
|
118
|
-
|
|
117
|
+
if (oComponent && isValidApp(oComponent)) {
|
|
118
|
+
const oManifest = oComponent.getManifest();
|
|
119
|
+
const vFlexEnabled = ObjectPath.get(["sap.ui5", "flexEnabled"], oManifest);
|
|
119
120
|
|
|
120
121
|
if (typeof vFlexEnabled !== "boolean") {
|
|
121
|
-
if (!
|
|
122
|
-
|
|
122
|
+
if (!isTestEnvironment()) {
|
|
123
|
+
displayMessage(oRta, oComponent, "MSG_NO_FLEX_ENABLED_FLAG", "WARNING", "HEADER_WARNING");
|
|
123
124
|
}
|
|
124
125
|
} else { // flexEnabled === true
|
|
125
|
-
oRta.attachEvent("modeChanged",
|
|
126
|
-
oRta._oDesignTime.attachEvent("elementOverlayCreated", oRta,
|
|
127
|
-
|
|
126
|
+
oRta.attachEvent("modeChanged", handleModeChanged);
|
|
127
|
+
oRta._oDesignTime.attachEvent("elementOverlayCreated", oRta, validateCreatedOverlay);
|
|
128
|
+
handleUnstableIds(oRta, oComponent, oRta._oDesignTime.getElementOverlays());
|
|
128
129
|
}
|
|
129
130
|
}
|
|
130
131
|
};
|
|
@@ -7,40 +7,36 @@
|
|
|
7
7
|
sap.ui.define([
|
|
8
8
|
"sap/base/util/ObjectPath",
|
|
9
9
|
"sap/ui/rta/util/hasStableId",
|
|
10
|
-
"sap/ui/core/mvc/View",
|
|
11
|
-
"sap/ui/core/Fragment",
|
|
12
10
|
"sap/ui/dt/OverlayUtil",
|
|
13
11
|
"sap/base/util/isPlainObject"
|
|
14
12
|
], function(
|
|
15
13
|
ObjectPath,
|
|
16
14
|
hasStableId,
|
|
17
|
-
View,
|
|
18
|
-
Fragment,
|
|
19
15
|
OverlayUtil,
|
|
20
16
|
isPlainObject
|
|
21
17
|
) {
|
|
22
18
|
"use strict";
|
|
23
19
|
|
|
24
20
|
function isFioriElementsApp(oComponent) {
|
|
25
|
-
|
|
21
|
+
const mManifest = oComponent.getManifest();
|
|
26
22
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
23
|
+
const isV4 = !!ObjectPath.get(["sap.ui5", "dependencies", "libs", "sap.fe.templates"], mManifest);
|
|
24
|
+
const isV2 = !!ObjectPath.get(["sap.ui.generic.app"], mManifest);
|
|
25
|
+
const isOVP = !!ObjectPath.get(["sap.ovp"], mManifest);
|
|
30
26
|
return isV2 || isV4 || isOVP;
|
|
31
27
|
}
|
|
32
28
|
|
|
33
29
|
function getFioriElementsExtensions(oComponent) {
|
|
34
|
-
|
|
30
|
+
const oManifest = oComponent.getManifest();
|
|
35
31
|
|
|
36
|
-
|
|
32
|
+
const mViewExtensions = ObjectPath.get(["sap.ui5", "extends", "extensions", "sap.ui.viewExtensions"], oManifest);
|
|
37
33
|
|
|
38
|
-
|
|
34
|
+
const aViewExtensions = [];
|
|
39
35
|
|
|
40
36
|
if (isPlainObject(mViewExtensions)) {
|
|
41
37
|
Object.keys(mViewExtensions).forEach(function(sViewExtensionGroupName) {
|
|
42
38
|
if (sViewExtensionGroupName.startsWith("sap.suite.ui.generic.template")) {
|
|
43
|
-
|
|
39
|
+
const mViewExtensionGroup = mViewExtensions[sViewExtensionGroupName];
|
|
44
40
|
|
|
45
41
|
Object.keys(mViewExtensionGroup).forEach(function(sViewExtensionName) {
|
|
46
42
|
aViewExtensions.push(mViewExtensionGroup[sViewExtensionName]);
|
|
@@ -53,20 +49,19 @@ sap.ui.define([
|
|
|
53
49
|
}
|
|
54
50
|
|
|
55
51
|
function getExtensionOverlays(aExtensionList, aElementOverlays) {
|
|
56
|
-
|
|
52
|
+
const aExtensionOverlays = [];
|
|
57
53
|
|
|
58
|
-
for (
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
var sElementName;
|
|
54
|
+
for (let i = 0, l = aElementOverlays.length; i < l; i++) {
|
|
55
|
+
const oElementOverlay = aElementOverlays[i];
|
|
56
|
+
const oElement = oElementOverlay.getElement();
|
|
57
|
+
const bIsExtensionOverlay = aExtensionList.some(function(mViewExtension) { // eslint-disable-line no-loop-func
|
|
58
|
+
let sExtensionName;
|
|
59
|
+
let sElementName;
|
|
65
60
|
|
|
66
|
-
if (oElement
|
|
61
|
+
if (oElement.isA("sap.ui.core.mvc.View")) {
|
|
67
62
|
sElementName = oElement.getViewName();
|
|
68
63
|
sExtensionName = mViewExtension.viewName;
|
|
69
|
-
} else if (oElement
|
|
64
|
+
} else if (oElement.isA("sap.ui.core.Fragment")) {
|
|
70
65
|
sElementName = oElement.getFragmentName();
|
|
71
66
|
} else {
|
|
72
67
|
// viewName/fragmentName are essential for proper element detection
|
|
@@ -74,7 +69,7 @@ sap.ui.define([
|
|
|
74
69
|
}
|
|
75
70
|
|
|
76
71
|
return (
|
|
77
|
-
oElement
|
|
72
|
+
oElement.isA(mViewExtension.className)
|
|
78
73
|
&& sElementName === sExtensionName
|
|
79
74
|
);
|
|
80
75
|
});
|
|
@@ -89,7 +84,7 @@ sap.ui.define([
|
|
|
89
84
|
}
|
|
90
85
|
}
|
|
91
86
|
|
|
92
|
-
|
|
87
|
+
const aRelevantOverlays = [];
|
|
93
88
|
|
|
94
89
|
aExtensionOverlays.forEach(function(oElementOverlay) {
|
|
95
90
|
OverlayUtil.iterateOverlayElementTree(oElementOverlay, function(oElementOverlay) {
|
|
@@ -101,12 +96,10 @@ sap.ui.define([
|
|
|
101
96
|
}
|
|
102
97
|
|
|
103
98
|
return function(aElementOverlays, oComponent) {
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
var aRelevantOverlays = aElementOverlays.slice(0);
|
|
99
|
+
let aRelevantOverlays = aElementOverlays.slice(0);
|
|
107
100
|
|
|
108
101
|
if (isFioriElementsApp(oComponent)) {
|
|
109
|
-
|
|
102
|
+
const aExtensionList = getFioriElementsExtensions(oComponent);
|
|
110
103
|
|
|
111
104
|
aRelevantOverlays = (
|
|
112
105
|
aExtensionList.length
|
|
@@ -115,13 +108,11 @@ sap.ui.define([
|
|
|
115
108
|
);
|
|
116
109
|
}
|
|
117
110
|
|
|
118
|
-
|
|
111
|
+
return aRelevantOverlays.filter(function(oElementOverlay) {
|
|
119
112
|
return (
|
|
120
113
|
!oElementOverlay.getDesignTimeMetadata().markedAsNotAdaptable()
|
|
121
114
|
&& !hasStableId(oElementOverlay)
|
|
122
115
|
);
|
|
123
116
|
});
|
|
124
|
-
|
|
125
|
-
return aResult;
|
|
126
117
|
};
|
|
127
118
|
});
|
|
@@ -12,8 +12,8 @@ sap.ui.define([
|
|
|
12
12
|
) {
|
|
13
13
|
"use strict";
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
const sEmptyTextKey = "\xa0";
|
|
16
|
+
const oValidators = {
|
|
17
17
|
noEmptyText: {
|
|
18
18
|
validatorFunction(sNewText) {
|
|
19
19
|
return sNewText !== sEmptyTextKey;
|
|
@@ -26,8 +26,8 @@ sap.ui.define([
|
|
|
26
26
|
if (sOldText === sNewText) {
|
|
27
27
|
throw Error("sameTextError");
|
|
28
28
|
}
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
let oBindingParserResult;
|
|
30
|
+
let bError;
|
|
31
31
|
|
|
32
32
|
try {
|
|
33
33
|
oBindingParserResult = BindingParser.complexParser(sNewText, undefined, true);
|
|
@@ -42,11 +42,11 @@ sap.ui.define([
|
|
|
42
42
|
|
|
43
43
|
return function(sNewText, sOldText, oAction) {
|
|
44
44
|
checkPreconditionsAndThrowError(sNewText, sOldText);
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
let sErrorText;
|
|
46
|
+
const aValidators = oAction && oAction.validators || [];
|
|
47
47
|
|
|
48
48
|
aValidators.some(function(vValidator) {
|
|
49
|
-
|
|
49
|
+
let oValidator;
|
|
50
50
|
|
|
51
51
|
if (
|
|
52
52
|
typeof vValidator === "string" && oValidators[vValidator]
|
|
@@ -12,7 +12,6 @@ sap.ui.define([
|
|
|
12
12
|
"sap/ui/fl/write/api/FeaturesAPI",
|
|
13
13
|
"sap/ui/model/json/JSONModel",
|
|
14
14
|
"sap/ui/model/resource/ResourceModel",
|
|
15
|
-
"sap/ui/rta/util/ReloadManager",
|
|
16
15
|
"sap/ui/rta/util/whatsNew/WhatsNewUtils"
|
|
17
16
|
], function(
|
|
18
17
|
mLibrary,
|
|
@@ -22,7 +21,6 @@ sap.ui.define([
|
|
|
22
21
|
FeaturesAPI,
|
|
23
22
|
JSONModel,
|
|
24
23
|
ResourceModel,
|
|
25
|
-
ReloadManager,
|
|
26
24
|
WhatsNewUtils
|
|
27
25
|
) {
|
|
28
26
|
"use strict";
|
|
@@ -33,7 +31,7 @@ sap.ui.define([
|
|
|
33
31
|
* @class Constructor for a new sap.ui.rta.util.whatsNew.WhatsNew
|
|
34
32
|
* @extends sap.ui.base.ManagedObject
|
|
35
33
|
* @author SAP SE
|
|
36
|
-
* @version 1.
|
|
34
|
+
* @version 1.138.0
|
|
37
35
|
* @constructor
|
|
38
36
|
* @since 1.129
|
|
39
37
|
* @private
|
|
@@ -51,6 +49,25 @@ sap.ui.define([
|
|
|
51
49
|
}
|
|
52
50
|
});
|
|
53
51
|
|
|
52
|
+
function updateLearnMoreButton(oCarousel) {
|
|
53
|
+
const sActivePageId = oCarousel.getActivePage();
|
|
54
|
+
const aPages = oCarousel.getPages();
|
|
55
|
+
const oLearnMoreBtn = Element.getElementById("sapUiRtaWhatsNewDialog_LearnMore");
|
|
56
|
+
|
|
57
|
+
// During initialization of the carousel the ActivePageId is not set yet, so we default to the index of the first page
|
|
58
|
+
const iCurrentIndex = sActivePageId
|
|
59
|
+
? aPages.findIndex(function(oPage) {
|
|
60
|
+
return oPage.getId() === sActivePageId;
|
|
61
|
+
})
|
|
62
|
+
: 0;
|
|
63
|
+
|
|
64
|
+
if (this.aUnseenFeatures[iCurrentIndex] && this.aUnseenFeatures[iCurrentIndex].documentationUrls) {
|
|
65
|
+
oLearnMoreBtn.setEnabled(true);
|
|
66
|
+
} else {
|
|
67
|
+
oLearnMoreBtn.setEnabled(false);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
54
71
|
WhatsNew.prototype.setDontShowAgainFeatureIds = async function(aDontShowAgainFeatureIds) {
|
|
55
72
|
this.setProperty("dontShowAgainFeatureIds", aDontShowAgainFeatureIds);
|
|
56
73
|
this.aUnseenFeatures = await WhatsNewUtils.getFilteredFeatures(aDontShowAgainFeatureIds, this.getLayer());
|
|
@@ -63,15 +80,14 @@ sap.ui.define([
|
|
|
63
80
|
return;
|
|
64
81
|
}
|
|
65
82
|
const oWhatsNewDialogModel = new JSONModel();
|
|
66
|
-
|
|
67
|
-
if (
|
|
83
|
+
this.aUnseenFeatures = this.aUnseenFeatures.filter((oFeature) => !aExcludeFeatureIds.includes(oFeature.featureId));
|
|
84
|
+
if (this.aUnseenFeatures.length === 0) {
|
|
68
85
|
return;
|
|
69
86
|
}
|
|
70
|
-
oWhatsNewDialogModel.setData({ featureCollection:
|
|
87
|
+
oWhatsNewDialogModel.setData({ featureCollection: this.aUnseenFeatures });
|
|
71
88
|
if (!this.oWhatsNewDialog) {
|
|
72
89
|
await this.createWhatsNewDialog(oWhatsNewDialogModel);
|
|
73
90
|
}
|
|
74
|
-
ReloadManager.setDontShowWhatsNewAfterReload();
|
|
75
91
|
this.oWhatsNewDialog.open();
|
|
76
92
|
};
|
|
77
93
|
|
|
@@ -83,6 +99,16 @@ sap.ui.define([
|
|
|
83
99
|
});
|
|
84
100
|
this.oWhatsNewDialog.setModel(oRTAResourceModel, "i18n");
|
|
85
101
|
this.oWhatsNewDialog.setModel(oWhatsNewDialogModel, "whatsNewModel");
|
|
102
|
+
|
|
103
|
+
// Dynamically enable/disable the Learn More button based on the current carousel page
|
|
104
|
+
const oCarousel = Element.getElementById("sapWhatsNewDialogCarousel");
|
|
105
|
+
if (oCarousel) {
|
|
106
|
+
oCarousel.attachEvent("pageChanged", () => {
|
|
107
|
+
updateLearnMoreButton.call(this, oCarousel);
|
|
108
|
+
});
|
|
109
|
+
// Initial state
|
|
110
|
+
updateLearnMoreButton.call(this, oCarousel);
|
|
111
|
+
}
|
|
86
112
|
};
|
|
87
113
|
|
|
88
114
|
WhatsNew.prototype.closeWhatsNewDialog = function() {
|