@openui5/sap.ui.rta 1.109.0 → 1.111.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.
Files changed (196) hide show
  1. package/.reuse/dep5 +16 -16
  2. package/THIRDPARTY.txt +2 -2
  3. package/package.json +6 -6
  4. package/src/sap/ui/rta/.library +2 -2
  5. package/src/sap/ui/rta/Client.js +2 -2
  6. package/src/sap/ui/rta/RuntimeAuthoring.js +251 -151
  7. package/src/sap/ui/rta/Utils.js +40 -19
  8. package/src/sap/ui/rta/api/startAdaptation.js +1 -1
  9. package/src/sap/ui/rta/api/startKeyUserAdaptation.js +1 -1
  10. package/src/sap/ui/rta/appVariant/AppVariantDialog.js +1 -1
  11. package/src/sap/ui/rta/appVariant/AppVariantManager.js +2 -2
  12. package/src/sap/ui/rta/appVariant/AppVariantOverviewDialog.js +1 -1
  13. package/src/sap/ui/rta/appVariant/AppVariantUtils.js +1 -1
  14. package/src/sap/ui/rta/appVariant/Feature.js +2 -8
  15. package/src/sap/ui/rta/appVariant/S4HanaCloudBackend.js +1 -1
  16. package/src/sap/ui/rta/appVariant/Utils.js +1 -1
  17. package/src/sap/ui/rta/appVariant/manageApps/webapp/Component.js +1 -1
  18. package/src/sap/ui/rta/appVariant/manageApps/webapp/controller/ManageApps.controller.js +1 -1
  19. package/src/sap/ui/rta/appVariant/manageApps/webapp/index.js +1 -1
  20. package/src/sap/ui/rta/appVariant/manageApps/webapp/model/models.js +1 -1
  21. package/src/sap/ui/rta/command/AddIFrame.js +2 -2
  22. package/src/sap/ui/rta/command/AddProperty.js +2 -2
  23. package/src/sap/ui/rta/command/AddXML.js +2 -2
  24. package/src/sap/ui/rta/command/AddXMLAtExtensionPoint.js +2 -2
  25. package/src/sap/ui/rta/command/AppDescriptorCommand.js +2 -2
  26. package/src/sap/ui/rta/command/BaseCommand.js +2 -2
  27. package/src/sap/ui/rta/command/BindProperty.js +2 -2
  28. package/src/sap/ui/rta/command/Combine.js +2 -2
  29. package/src/sap/ui/rta/command/CommandFactory.js +2 -2
  30. package/src/sap/ui/rta/command/CompositeCommand.js +2 -2
  31. package/src/sap/ui/rta/command/ControlVariantConfigure.js +2 -2
  32. package/src/sap/ui/rta/command/ControlVariantSave.js +2 -2
  33. package/src/sap/ui/rta/command/ControlVariantSaveAs.js +2 -2
  34. package/src/sap/ui/rta/command/ControlVariantSetTitle.js +2 -2
  35. package/src/sap/ui/rta/command/ControlVariantSwitch.js +15 -13
  36. package/src/sap/ui/rta/command/CreateContainer.js +2 -2
  37. package/src/sap/ui/rta/command/CustomAdd.js +2 -2
  38. package/src/sap/ui/rta/command/FlexCommand.js +2 -2
  39. package/src/sap/ui/rta/command/LREPSerializer.js +27 -12
  40. package/src/sap/ui/rta/command/LocalReset.js +2 -2
  41. package/src/sap/ui/rta/command/Move.js +2 -2
  42. package/src/sap/ui/rta/command/Property.js +2 -2
  43. package/src/sap/ui/rta/command/Remove.js +2 -2
  44. package/src/sap/ui/rta/command/Rename.js +2 -2
  45. package/src/sap/ui/rta/command/Resize.js +2 -2
  46. package/src/sap/ui/rta/command/Reveal.js +2 -2
  47. package/src/sap/ui/rta/command/Settings.js +2 -2
  48. package/src/sap/ui/rta/command/Split.js +2 -2
  49. package/src/sap/ui/rta/command/Stack.js +11 -3
  50. package/src/sap/ui/rta/command/appDescriptor/AddLibrary.js +2 -2
  51. package/src/sap/ui/rta/command/compVariant/CompVariantContent.js +2 -2
  52. package/src/sap/ui/rta/command/compVariant/CompVariantSaveAs.js +2 -2
  53. package/src/sap/ui/rta/command/compVariant/CompVariantSwitch.js +2 -2
  54. package/src/sap/ui/rta/command/compVariant/CompVariantUpdate.js +2 -2
  55. package/src/sap/ui/rta/enablement/TestDelegate.js +1 -1
  56. package/src/sap/ui/rta/enablement/elementActionTest.js +2 -2
  57. package/src/sap/ui/rta/library.js +3 -3
  58. package/src/sap/ui/rta/messagebundle.properties +65 -13
  59. package/src/sap/ui/rta/messagebundle_ar.properties +35 -11
  60. package/src/sap/ui/rta/messagebundle_bg.properties +35 -11
  61. package/src/sap/ui/rta/messagebundle_ca.properties +35 -11
  62. package/src/sap/ui/rta/messagebundle_cs.properties +35 -11
  63. package/src/sap/ui/rta/messagebundle_cy.properties +34 -10
  64. package/src/sap/ui/rta/messagebundle_da.properties +34 -10
  65. package/src/sap/ui/rta/messagebundle_de.properties +37 -13
  66. package/src/sap/ui/rta/messagebundle_el.properties +34 -10
  67. package/src/sap/ui/rta/messagebundle_en.properties +33 -9
  68. package/src/sap/ui/rta/messagebundle_en_GB.properties +33 -9
  69. package/src/sap/ui/rta/messagebundle_en_US_sappsd.properties +31 -5
  70. package/src/sap/ui/rta/messagebundle_en_US_saprigi.properties +37 -5
  71. package/src/sap/ui/rta/messagebundle_en_US_saptrc.properties +31 -7
  72. package/src/sap/ui/rta/messagebundle_es.properties +34 -10
  73. package/src/sap/ui/rta/messagebundle_es_MX.properties +34 -10
  74. package/src/sap/ui/rta/messagebundle_et.properties +34 -10
  75. package/src/sap/ui/rta/messagebundle_fi.properties +34 -10
  76. package/src/sap/ui/rta/messagebundle_fr.properties +34 -10
  77. package/src/sap/ui/rta/messagebundle_fr_CA.properties +35 -11
  78. package/src/sap/ui/rta/messagebundle_hi.properties +35 -11
  79. package/src/sap/ui/rta/messagebundle_hr.properties +35 -11
  80. package/src/sap/ui/rta/messagebundle_hu.properties +34 -10
  81. package/src/sap/ui/rta/messagebundle_id.properties +35 -11
  82. package/src/sap/ui/rta/messagebundle_it.properties +35 -11
  83. package/src/sap/ui/rta/messagebundle_iw.properties +34 -10
  84. package/src/sap/ui/rta/messagebundle_ja.properties +35 -11
  85. package/src/sap/ui/rta/messagebundle_kk.properties +34 -10
  86. package/src/sap/ui/rta/messagebundle_ko.properties +34 -10
  87. package/src/sap/ui/rta/messagebundle_lt.properties +34 -10
  88. package/src/sap/ui/rta/messagebundle_lv.properties +35 -11
  89. package/src/sap/ui/rta/messagebundle_ms.properties +35 -11
  90. package/src/sap/ui/rta/messagebundle_nl.properties +34 -10
  91. package/src/sap/ui/rta/messagebundle_no.properties +35 -11
  92. package/src/sap/ui/rta/messagebundle_pl.properties +35 -11
  93. package/src/sap/ui/rta/messagebundle_pt.properties +35 -11
  94. package/src/sap/ui/rta/messagebundle_pt_PT.properties +34 -10
  95. package/src/sap/ui/rta/messagebundle_ro.properties +35 -11
  96. package/src/sap/ui/rta/messagebundle_ru.properties +35 -11
  97. package/src/sap/ui/rta/messagebundle_sh.properties +34 -10
  98. package/src/sap/ui/rta/messagebundle_sk.properties +34 -10
  99. package/src/sap/ui/rta/messagebundle_sl.properties +34 -10
  100. package/src/sap/ui/rta/messagebundle_sv.properties +35 -11
  101. package/src/sap/ui/rta/messagebundle_th.properties +36 -12
  102. package/src/sap/ui/rta/messagebundle_tr.properties +34 -10
  103. package/src/sap/ui/rta/messagebundle_uk.properties +34 -10
  104. package/src/sap/ui/rta/messagebundle_vi.properties +35 -11
  105. package/src/sap/ui/rta/messagebundle_zh_CN.properties +35 -11
  106. package/src/sap/ui/rta/messagebundle_zh_TW.properties +35 -11
  107. package/src/sap/ui/rta/plugin/AddXMLAtExtensionPoint.js +2 -2
  108. package/src/sap/ui/rta/plugin/BaseCreate.js +2 -2
  109. package/src/sap/ui/rta/plugin/Combine.js +2 -2
  110. package/src/sap/ui/rta/plugin/CompVariant.js +4 -6
  111. package/src/sap/ui/rta/plugin/ControlVariant.js +2 -2
  112. package/src/sap/ui/rta/plugin/CreateContainer.js +3 -3
  113. package/src/sap/ui/rta/plugin/CutPaste.js +2 -2
  114. package/src/sap/ui/rta/plugin/DragDrop.js +4 -4
  115. package/src/sap/ui/rta/plugin/EasyAdd.js +30 -21
  116. package/src/sap/ui/rta/plugin/EasyRemove.js +13 -11
  117. package/src/sap/ui/rta/plugin/LocalReset.js +2 -2
  118. package/src/sap/ui/rta/plugin/Plugin.js +57 -13
  119. package/src/sap/ui/rta/plugin/RTAElementMover.js +2 -2
  120. package/src/sap/ui/rta/plugin/Remove.js +3 -3
  121. package/src/sap/ui/rta/plugin/Rename.js +2 -2
  122. package/src/sap/ui/rta/plugin/RenameHandler.js +30 -19
  123. package/src/sap/ui/rta/plugin/Resize.js +2 -2
  124. package/src/sap/ui/rta/plugin/Selection.js +8 -15
  125. package/src/sap/ui/rta/plugin/Settings.js +2 -2
  126. package/src/sap/ui/rta/plugin/Split.js +2 -2
  127. package/src/sap/ui/rta/plugin/Stretch.js +17 -16
  128. package/src/sap/ui/rta/plugin/additionalElements/ActionExtractor.js +28 -7
  129. package/src/sap/ui/rta/plugin/additionalElements/AddElementsDialog.fragment.xml +1 -0
  130. package/src/sap/ui/rta/plugin/additionalElements/AddElementsDialog.js +2 -2
  131. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsAnalyzer.js +4 -2
  132. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsPlugin.js +5 -5
  133. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsUtils.js +2 -2
  134. package/src/sap/ui/rta/plugin/additionalElements/CommandBuilder.js +2 -2
  135. package/src/sap/ui/rta/plugin/iframe/AddIFrame.js +2 -2
  136. package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.fragment.xml +7 -2
  137. package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.js +2 -2
  138. package/src/sap/ui/rta/plugin/iframe/AddIFrameDialogController.js +4 -4
  139. package/src/sap/ui/rta/plugin/iframe/urlCleaner.js +1 -1
  140. package/src/sap/ui/rta/service/Action.js +2 -2
  141. package/src/sap/ui/rta/service/ControllerExtension.js +2 -2
  142. package/src/sap/ui/rta/service/Outline.js +2 -2
  143. package/src/sap/ui/rta/service/Property.js +2 -2
  144. package/src/sap/ui/rta/service/Receiver.js +1 -1
  145. package/src/sap/ui/rta/service/Selection.js +2 -2
  146. package/src/sap/ui/rta/service/SupportTools.js +2 -2
  147. package/src/sap/ui/rta/service/index.js +1 -1
  148. package/src/sap/ui/rta/themes/base/AddIFrame.less +1 -1
  149. package/src/sap/ui/rta/themes/base/Dialogs.less +1 -1
  150. package/src/sap/ui/rta/themes/base/FieldRepository.less +1 -1
  151. package/src/sap/ui/rta/themes/base/library.source.less +1 -1
  152. package/src/sap/ui/rta/themes/sap_hcb/library.source.less +1 -1
  153. package/src/sap/ui/rta/toolbar/ActionsMenu.fragment.xml +82 -0
  154. package/src/sap/ui/rta/toolbar/Adaptation.fragment.xml +35 -79
  155. package/src/sap/ui/rta/toolbar/Adaptation.js +83 -25
  156. package/src/sap/ui/rta/toolbar/AdaptationRenderer.js +1 -1
  157. package/src/sap/ui/rta/toolbar/Base.js +4 -4
  158. package/src/sap/ui/rta/toolbar/BaseRenderer.js +1 -1
  159. package/src/sap/ui/rta/toolbar/Fiori.js +15 -11
  160. package/src/sap/ui/rta/toolbar/FioriLike.js +2 -2
  161. package/src/sap/ui/rta/toolbar/OverflowToolbarButton.js +2 -2
  162. package/src/sap/ui/rta/toolbar/Personalization.js +2 -2
  163. package/src/sap/ui/rta/toolbar/Standalone.js +2 -2
  164. package/src/sap/ui/rta/toolbar/contextBased/ManageAdaptations.js +340 -0
  165. package/src/sap/ui/rta/toolbar/contextBased/ManageAdaptationsDialog.fragment.xml +152 -0
  166. package/src/sap/ui/rta/toolbar/contextBased/SaveAsAdaptation.js +225 -0
  167. package/src/sap/ui/rta/toolbar/contextBased/{SaveAsContextBasedAdaptationDialog.fragment.xml → SaveAsAdaptationDialog.fragment.xml} +19 -15
  168. package/src/sap/ui/rta/toolbar/translation/Translation.js +2 -2
  169. package/src/sap/ui/rta/toolbar/versioning/Versioning.js +4 -4
  170. package/src/sap/ui/rta/util/Animation.js +5 -9
  171. package/src/sap/ui/rta/util/BindingsExtractor.js +1 -1
  172. package/src/sap/ui/rta/util/PluginManager.js +2 -2
  173. package/src/sap/ui/rta/util/PopupManager.js +2 -2
  174. package/src/sap/ui/rta/util/ReloadManager.js +2 -2
  175. package/src/sap/ui/rta/util/ServiceEventBus.js +2 -2
  176. package/src/sap/ui/rta/util/StylesLoader.js +1 -1
  177. package/src/sap/ui/rta/util/UrlParser.js +1 -1
  178. package/src/sap/ui/rta/util/adaptationStarter.js +1 -1
  179. package/src/sap/ui/rta/util/changeVisualization/ChangeCategories.js +1 -1
  180. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicator.js +4 -6
  181. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorCategorySelection.fragment.xml +1 -1
  182. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorRegistry.js +27 -3
  183. package/src/sap/ui/rta/util/changeVisualization/ChangeStates.js +2 -2
  184. package/src/sap/ui/rta/util/changeVisualization/ChangeVisualization.js +127 -71
  185. package/src/sap/ui/rta/util/changeVisualization/ChangeVisualizationUtils.js +1 -1
  186. package/src/sap/ui/rta/util/changeVisualization/commands/CombineVisualization.js +1 -1
  187. package/src/sap/ui/rta/util/changeVisualization/commands/CreateContainerVisualization.js +1 -1
  188. package/src/sap/ui/rta/util/changeVisualization/commands/MoveVisualization.js +1 -1
  189. package/src/sap/ui/rta/util/changeVisualization/commands/RenameVisualization.js +1 -1
  190. package/src/sap/ui/rta/util/changeVisualization/commands/SplitVisualization.js +1 -1
  191. package/src/sap/ui/rta/util/changeVisualization/commands/getCommandVisualization.js +1 -1
  192. package/src/sap/ui/rta/util/hasStableId.js +1 -1
  193. package/src/sap/ui/rta/util/showMessageBox.js +1 -1
  194. package/src/sap/ui/rta/util/validateFlexEnabled.js +1 -1
  195. package/src/sap/ui/rta/util/validateStableIds.js +1 -1
  196. package/src/sap/ui/rta/toolbar/contextBased/SaveAsContextBasedAdaptation.js +0 -124
@@ -0,0 +1,225 @@
1
+ /*!
2
+ * OpenUI5
3
+ * (c) Copyright 2009-2023 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/base/ManagedObject",
9
+ "sap/base/Log",
10
+ "sap/base/strings/formatMessage",
11
+ "sap/ui/core/Fragment",
12
+ "sap/ui/core/ValueState",
13
+ "sap/ui/fl/Layer",
14
+ "sap/ui/fl/write/api/ContextBasedAdaptationsAPI",
15
+ "sap/ui/fl/write/api/ContextSharingAPI",
16
+ "sap/ui/rta/Utils",
17
+ "sap/ui/model/Binding",
18
+ "sap/ui/model/json/JSONModel"
19
+ ], function(
20
+ ManagedObject,
21
+ Log,
22
+ formatMessage,
23
+ Fragment,
24
+ ValueState,
25
+ Layer,
26
+ ContextBasedAdaptationsAPI,
27
+ ContextSharingAPI,
28
+ Utils,
29
+ Binding,
30
+ JSONModel
31
+ ) {
32
+ "use strict";
33
+
34
+ /**
35
+ * Controller for the <code>sap.ui.rta.toolbar.contextBased.SaveAsAdaptation</code> controls.
36
+ * Contains implementation of context-based-adaptation functionality.
37
+ *
38
+ * @class
39
+ *
40
+ * @author SAP SE
41
+ * @version 1.111.0
42
+ *
43
+ * @constructor
44
+ * @private
45
+ * @since 1.110
46
+ * @alias sap.ui.rta.toolbar.contextBased.SaveAsAdaptation
47
+ */
48
+ var SaveAsAdaptation = ManagedObject.extend("sap.ui.rta.toolbar.contextBased.SaveAsAdaptation", {
49
+ metadata: {
50
+ properties: {
51
+ toolbar: {
52
+ type: "any" // "sap.ui.rta.toolbar.Base"
53
+ }
54
+ }
55
+ },
56
+ constructor: function() {
57
+ ManagedObject.prototype.constructor.apply(this, arguments);
58
+ this.oTextResources = this.getToolbar().getTextResources();
59
+ }
60
+ });
61
+
62
+ SaveAsAdaptation.prototype.openAddAdaptationDialog = function(sLayer) {
63
+ if (!this._oAddAdaptationDialogPromise) {
64
+ this._oAddAdaptationDialogPromise = Fragment.load({
65
+ name: "sap.ui.rta.toolbar.contextBased.SaveAsAdaptationDialog",
66
+ id: this.getToolbar().getId() + "_fragment--sapUiRta_addAdaptationDialog",
67
+ controller: {
68
+ onAdaptationTitleChange: onAdaptationTitleChange.bind(this),
69
+ onSaveAsAdaptation: onSaveAsAdaptation.bind(this),
70
+ onCancelAdaptationDialog: onCancelAdaptationDialog.bind(this),
71
+ onPriorityChange: onPriorityChange.bind(this)
72
+ }
73
+ }).then(function(oDialog) {
74
+ this._oAddAdaptationDialog = oDialog;
75
+ this._oAddAdaptationDialog.attachBeforeClose(clearComponent.bind(this));
76
+ oDialog.addStyleClass(Utils.getRtaStyleClassName());
77
+ this.getToolbar().addDependent(this._oAddAdaptationDialog);
78
+ }.bind(this));
79
+ } else {
80
+ this.getToolbar().getControl("addAdaptationDialog--saveAdaptation-title-input").setValue("");
81
+ }
82
+ return this._oAddAdaptationDialogPromise.then(function() {
83
+ return createContextSharingComponent.call(this, sLayer);
84
+ }.bind(this)).then(function() {
85
+ var oRtaInformation = this.getToolbar().getRtaInformation();
86
+ return ContextBasedAdaptationsAPI.load({
87
+ control: oRtaInformation.rootControl, layer: oRtaInformation.flexSettings.layer
88
+ });
89
+ }.bind(this)).catch(function(oError) {
90
+ Log.error(oError.stack);
91
+ this.oAdaptationsModel = new JSONModel({ adaptations: [] });
92
+ return this.oAdaptationsModel;
93
+ }.bind(this)).then(function(oAdaptationsModel) {
94
+ this.oAdaptationsModel = oAdaptationsModel;
95
+ return openDialog.call(this, oAdaptationsModel);
96
+ }.bind(this));
97
+ };
98
+
99
+ // ------ open dialog -----
100
+ function openDialog(oAdaptationsModel) {
101
+ formatPriorityText.call(this, oAdaptationsModel.getData());
102
+ return this._oAddAdaptationDialog.open();
103
+ }
104
+
105
+ // ------ formatting ------
106
+ function formatPriorityText(oAdaptationsModelData) {
107
+ var aItems = [{ key: 0, title: this.oTextResources.getText("TXT_SELECT_FIRST_PRIO") }];
108
+ var sPriorityTextTemplate = this.oTextResources.getText("TXT_SELECT_PRIO");
109
+ oAdaptationsModelData.adaptations.forEach(function(oAdaptation, iIndex) {
110
+ aItems.push({
111
+ key: (iIndex + 1).toString(),
112
+ title: formatMessage(sPriorityTextTemplate, [oAdaptation.title, iIndex + 2])
113
+ });
114
+ });
115
+ this.oPrioritySelectionModel = new JSONModel({
116
+ selected: this.oTextResources.getText("TXT_SELECT_FIRST_PRIO"),
117
+ priority: aItems
118
+ });
119
+ this._oAddAdaptationDialog.setModel(this.oPrioritySelectionModel, "prioritySelectionModel");
120
+ }
121
+
122
+ function onAdaptationTitleChange() {
123
+ enableSaveAsButton.call(this);
124
+ }
125
+
126
+ function onCancelAdaptationDialog() {
127
+ this._oAddAdaptationDialog.close();
128
+ }
129
+
130
+ function onSaveAsAdaptation() {
131
+ var oContextBasedAdaptation = {};
132
+ oContextBasedAdaptation.title = getAdaptationTitle.call(this);
133
+ oContextBasedAdaptation.contexts = this._oContextComponentInstance.getSelectedContexts();
134
+ oContextBasedAdaptation.priority = getAdaptationPriority.call(this);
135
+ var oRtaInformation = this.getToolbar().getRtaInformation();
136
+ ContextBasedAdaptationsAPI.create({
137
+ control: oRtaInformation.rootControl,
138
+ layer: oRtaInformation.flexSettings.layer,
139
+ contextBasedAdaptation: oContextBasedAdaptation
140
+ }).catch(function(oError) {
141
+ Log.error(oError.stack);
142
+ var sMessage = "MSG_LREP_TRANSFER_ERROR";
143
+ var oOptions = { titleKey: "SAC_DIALOG_HEADER" };
144
+ oOptions.details = oError.userMessage;
145
+ Utils.showMessageBox("error", sMessage, oOptions);
146
+ });
147
+ this._oAddAdaptationDialog.close();
148
+ }
149
+
150
+ function onPriorityChange(oEvent) {
151
+ this.sPriority = oEvent.getParameters().selectedItem.getProperty("key");
152
+ }
153
+
154
+
155
+ function checkAdaptationsNameConstraints() {
156
+ // check for empty adaptations title
157
+ if (this._oAddAdaptationDialog && this._oAddAdaptationDialog.isOpen()) {
158
+ var oInputField = this.getToolbar().getControl("addAdaptationDialog--saveAdaptation-title-input");
159
+ var iAdaptationTitleLength = oInputField.getValue().trim().length;
160
+ var iMaxTitleLength = 100;
161
+ if (iAdaptationTitleLength === 0) {
162
+ oInputField.setValueState(ValueState.Error);
163
+ oInputField.setValueStateText(this.oTextResources.getText("TXT_CTX_ERROR_EMPTY_TITLE"));
164
+ } else if (iAdaptationTitleLength > iMaxTitleLength) {
165
+ oInputField.setValueState(ValueState.Error);
166
+ oInputField.setValueStateText(this.oTextResources.getText("TXT_CTX_ERROR_MAX_LEN", [
167
+ iMaxTitleLength
168
+ ]));
169
+ } else if (iAdaptationTitleLength > 0) {
170
+ // check for duplicates
171
+ var iIndexOfDuplicate = this.oAdaptationsModel.getProperty("/adaptations").findIndex(function(adaptation) {
172
+ if (adaptation.title.trim().toLowerCase() === oInputField.getValue().trim().toLowerCase()) {
173
+ return true;
174
+ }
175
+ return false;
176
+ });
177
+ if (iIndexOfDuplicate > -1) {
178
+ oInputField.setValueState(ValueState.Error);
179
+ oInputField.setValueStateText(this.oTextResources.getText("TXT_CTX_ERROR_DUPLICATE_TITLE"));
180
+ } else {
181
+ oInputField.setValueState(ValueState.None);
182
+ oInputField.setValueStateText(null);
183
+ }
184
+ }
185
+ }
186
+ }
187
+
188
+ function createContextSharingComponent(sLayer) {
189
+ var mPropertyBag = { layer: sLayer || Layer.CUSTOMER };
190
+ return ContextSharingAPI.createComponent(mPropertyBag).then(function(oContextSharingComponent) {
191
+ this._oContextComponent = oContextSharingComponent;
192
+ this._oContextComponentInstance = oContextSharingComponent.getComponentInstance();
193
+ this._oContextComponentInstance.resetSelectedContexts();
194
+ this._oAddAdaptationDialog.addContent(this._oContextComponent);
195
+ var oSelectedContextsModel = this._oContextComponentInstance.getSelectedContextsModel();
196
+ this.oSelectedContextsBinding = new Binding(oSelectedContextsModel, "/", oSelectedContextsModel.getContext("/"));
197
+ this.oSelectedContextsBinding.attachChange(enableSaveAsButton.bind(this));
198
+ this._oContextComponentInstance.showMessageStrip(false);
199
+ }.bind(this));
200
+ }
201
+
202
+ function getAdaptationTitle() {
203
+ var oInputField = this.getToolbar().getControl("addAdaptationDialog--saveAdaptation-title-input");
204
+ return oInputField ? oInputField.getValue().trim() : "";
205
+ }
206
+
207
+ function getAdaptationPriority() {
208
+ return Number(this.sPriority) || 0;
209
+ }
210
+
211
+ function enableSaveAsButton() {
212
+ checkAdaptationsNameConstraints.call(this);
213
+ var oInputField = this.getToolbar().getControl("addAdaptationDialog--saveAdaptation-title-input");
214
+ var bEnable = oInputField.getValueState() === ValueState.None && this._oContextComponentInstance.getSelectedContexts().role.length > 0;
215
+ this.getToolbar().getControl("addAdaptationDialog--saveAdaptation-saveButton").setEnabled(bEnable);
216
+ }
217
+
218
+ function clearComponent() {
219
+ if (this._oContextComponentInstance) {
220
+ this._oContextComponentInstance.showMessageStrip(true);
221
+ this._oContextComponentInstance.resetSelectedContexts();
222
+ }
223
+ }
224
+ return SaveAsAdaptation;
225
+ });
@@ -6,14 +6,14 @@
6
6
  resizable="true"
7
7
  draggable="true"
8
8
  title="{i18n>SAC_DIALOG_HEADER}">
9
- <Panel id="saveContextBasedAdaptation-information-panel">
9
+ <Panel id="saveAdaptation-information-panel">
10
10
  <Toolbar id="toolbar">
11
11
  <Label id="label"
12
12
  text="Information"
13
13
  design="Bold">
14
14
  </Label>
15
15
  </Toolbar>
16
- <form:Form id="saveContextBasedAdaptation-form"
16
+ <form:Form id="saveAdaptation-form"
17
17
  editable="true">
18
18
  <form:layout>
19
19
  <form:ResponsiveGridLayout labelSpanXL="3"
@@ -34,13 +34,13 @@
34
34
  <form:formElements>
35
35
  <form:FormElement >
36
36
  <form:label>
37
- <Label id="saveContextBasedAdaptation-title-label"
37
+ <Label id="saveAdaptation-title-label"
38
38
  text="{i18n>APP_DIALOG_TITLE_TEXT}"
39
39
  textAlign="Left"
40
40
  required="true">
41
41
  </Label>
42
42
  </form:label>
43
- <Input id="saveContextBasedAdaptation-title-input"
43
+ <Input id="saveAdaptation-title-input"
44
44
  value="{/title}"
45
45
  valueLiveUpdate="true"
46
46
  liveChange=".onAdaptationTitleChange"
@@ -49,31 +49,35 @@
49
49
  </form:FormElement>
50
50
  <form:FormElement >
51
51
  <form:label>
52
- <Label id="saveContextBasedAdaptation-rank-label"
52
+ <Label id="saveAdaptation-rank-label"
53
53
  text="{i18n>CLM_HEADER_PRIORITY}"
54
54
  textAlign="Left"
55
55
  required="true">
56
56
  </Label>
57
57
  </form:label>
58
- <Select id="saveContextBasedAdaptation-rank-select"
59
- selectedKey="{/selected}">
60
- </Select>
58
+ <Select
59
+ id="saveAdaptation-rank-select"
60
+ forceSelection="true"
61
+ selectedKey="{prioritySelectionModel>/selected}"
62
+ items="{prioritySelectionModel>/priority}"
63
+ change=".onPriorityChange">
64
+ <core:Item key="{prioritySelectionModel>key}" text="{prioritySelectionModel>title}" />
65
+ </Select>
61
66
  </form:FormElement>
62
67
  </form:formElements>
63
68
  </form:FormContainer>
64
69
  </form:Form>
65
70
  </Panel>
66
71
  <beginButton>
67
- <Button id="saveContextBasedAdaptation-saveButton"
72
+ <Button id="saveAdaptation-saveButton"
68
73
  type="Emphasized"
69
- text="{i18n>APP_VARIANT_DIALOG_SAVE}"
70
- press=".onSaveAsContextBasedAdaptation"/>
74
+ text="{i18n>APP_CTX_DIALOG_SAVE}"
75
+ press=".onSaveAsAdaptation"/>
71
76
  </beginButton>
72
77
  <endButton>
73
- <Button id="saveContextBasedAdaptation-cancelButton"
74
- type="Emphasized"
75
- text="{i18n>SAVE_AS_APP_VARIANT_DIALOG_CANCEL}"
76
- press=".onCancelContextBasedAdaptationDialog"/>
78
+ <Button id="saveAdaptation-cancelButton"
79
+ text="{i18n>APP_CTX_DIALOG_CANCEL}"
80
+ press=".onCancelAdaptationDialog"/>
77
81
  </endButton>
78
82
  </Dialog>
79
83
  </core:FragmentDefinition>
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -49,7 +49,7 @@ sap.ui.define([
49
49
  * @class
50
50
  *
51
51
  * @author SAP SE
52
- * @version 1.109.0
52
+ * @version 1.111.0
53
53
  *
54
54
  * @constructor
55
55
  * @private
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -36,7 +36,7 @@ sap.ui.define([
36
36
  * @class
37
37
  *
38
38
  * @author SAP SE
39
- * @version 1.109.0
39
+ * @version 1.111.0
40
40
  *
41
41
  * @constructor
42
42
  * @private
@@ -131,7 +131,7 @@ sap.ui.define([
131
131
  return new GroupHeaderListItem({
132
132
  title: oGroup.key ? this.oTextResources.getText("TIT_VERSION_HISTORY_PUBLISHED") : this.oTextResources.getText("TIT_VERSION_HISTORY_UNPUBLISHED"),
133
133
  upperCase: false,
134
- visible: this.getToolbar().getModel("controls").getProperty("/publishVisible")
134
+ visible: this.getToolbar().getModel("versions").getProperty("/publishVersionVisible")
135
135
  }).addStyleClass("sapUiRtaVersionHistoryGrouping").addStyleClass("sapUiRtaVersionHistory");
136
136
  }
137
137
 
@@ -214,7 +214,7 @@ sap.ui.define([
214
214
  return this._oVersionHistoryDialogPromise.then(function(oVersionsDialog) {
215
215
  if (!oVersionsDialog.isOpen()) {
216
216
  oVersionsDialog.openBy(oVersionButton);
217
- if (this.getToolbar().getModel("controls").getProperty("/publishVisible")) {
217
+ if (this.getToolbar().getModel("versions").getProperty("/publishVersionVisible")) {
218
218
  var oList = this.getToolbar().getControl("versionHistoryDialog--versionList");
219
219
  var oSorter = new Sorter({
220
220
  path: "isPublished",
@@ -1,33 +1,29 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
7
7
  sap.ui.define([
8
- "sap/ui/thirdparty/jquery"
9
8
  ],
10
- function(jQuery) {
9
+ function() {
11
10
  "use strict";
12
11
 
13
12
  var module = {};
14
13
 
15
14
  /**
16
15
  * CSS Transition helper
17
- * @param {jQuery} $element - jQuery element(s)
16
+ * @param {HTMLElement} oElement - Element
18
17
  * @param {Function} fnCallback - The function should start animation process (e.g. by adding class to the element)
19
18
  * @return {Promise} Returns a Promise performing the animation
20
19
  */
21
- module.waitTransition = function ($element, fnCallback) {
22
- if (!($element instanceof jQuery)) {
23
- throw new Error('$element should be wrapped into jQuery object');
24
- }
20
+ module.waitTransition = function (oElement, fnCallback) {
25
21
  if (typeof fnCallback !== "function") {
26
22
  throw new Error('fnCallback should be a function');
27
23
  }
28
24
 
29
25
  return new Promise(function (fnResolve) {
30
- $element.one('transitionend', fnResolve);
26
+ oElement.addEventListener('transitionend', fnResolve, {once: true});
31
27
 
32
28
  // perform animation in the next animation frame, normally 16-17ms later.
33
29
  var iTimestampInitial;
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
  sap.ui.define([
@@ -68,7 +68,7 @@ sap.ui.define([
68
68
  * Constructor for a new sap.ui.rta.util.PluginManager
69
69
  * @extends sap.ui.base.ManagedObject
70
70
  * @author SAP SE
71
- * @version 1.109.0
71
+ * @version 1.111.0
72
72
  * @constructor
73
73
  * @private
74
74
  * @since 1.86
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -42,7 +42,7 @@ sap.ui.define([
42
42
  * Constructor for a new sap.ui.rta.util.PopupManager
43
43
  * @extends sap.ui.base.ManagedObject
44
44
  * @author SAP SE
45
- * @version 1.109.0
45
+ * @version 1.111.0
46
46
  * @constructor
47
47
  * @private
48
48
  * @since 1.48
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -30,7 +30,7 @@ sap.ui.define([
30
30
  * @namespace sap.ui.rta.util.ReloadManager
31
31
  * @alias sap.ui.rta.util.ReloadManager
32
32
  * @since 1.104
33
- * @version 1.109.0
33
+ * @version 1.111.0
34
34
  * @private
35
35
  * @ui5-restricted
36
36
  */
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -19,7 +19,7 @@ function(
19
19
  *
20
20
  * @extends sap.ui.core.EventBus
21
21
  * @author SAP SE
22
- * @version 1.109.0
22
+ * @version 1.111.0
23
23
  * @private
24
24
  * @since 1.56.0
25
25
  * @alias sap.ui.rta.util.ServiceEventBus
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
  sap.ui.define([
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -40,7 +40,7 @@ sap.ui.define([
40
40
  * @alias sap.ui.rta.util.changeVisualization.ChangeIndicator
41
41
  * @author SAP SE
42
42
  * @since 1.84.0
43
- * @version 1.109.0
43
+ * @version 1.111.0
44
44
  * @private
45
45
  */
46
46
  var ChangeIndicator = Control.extend("sap.ui.rta.util.changeVisualization.ChangeIndicator", {
@@ -129,11 +129,9 @@ sap.ui.define([
129
129
  constructor: function() {
130
130
  this._oDetailModel = new JSONModel();
131
131
  this._oDetailModel.setDefaultBindingMode("OneWay");
132
-
133
- Control.prototype.constructor.apply(this, arguments);
134
-
135
132
  this._fnHoverTrue = this._toggleHoverStyleClasses.bind(this, true);
136
133
  this._fnHoverFalse = this._toggleHoverStyleClasses.bind(this, false);
134
+ Control.prototype.constructor.apply(this, arguments);
137
135
  // is needed to prevent that multiple events listeners are attached
138
136
  // to the same overlay because setVisible is called multiple times
139
137
  this._bEventAttachedToElement = false;
@@ -300,7 +298,7 @@ sap.ui.define([
300
298
  };
301
299
 
302
300
  ChangeIndicator.prototype.onAfterRendering = function() {
303
- var oOverlay = Core.getElementById(this.getOverlayId());
301
+ var oOverlay = Core.byId(this.getOverlayId());
304
302
  if (oOverlay) {
305
303
  // Attach to the overlay
306
304
  oOverlay.getDomRef().appendChild(this.getDomRef());
@@ -26,7 +26,7 @@
26
26
  text="{visualizationModel>/popupInfoMessage}"
27
27
  type="Information"
28
28
  showIcon="true"
29
- visible="{= ${visualizationModel>/hiddenChanges}.length > 0 }">
29
+ visible="{= ${visualizationModel>/sortedChanges/relevantHiddenChanges}.length > 0 }">
30
30
  <link>
31
31
  <Link text="{i18n>BUT_CHANGEVISUALIZATION_LEARNMORE}"
32
32
  target="_blank"
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -39,7 +39,7 @@ sap.ui.define([
39
39
  * @alias sap.ui.rta.util.changeVisualization.ChangeIndicatorRegistry
40
40
  * @author SAP SE
41
41
  * @since 1.86.0
42
- * @version 1.109.0
42
+ * @version 1.111.0
43
43
  * @private
44
44
  */
45
45
  var ChangeIndicatorRegistry = ManagedObject.extend("sap.ui.rta.util.changeVisualization.ChangeIndicatorRegistry", {
@@ -145,6 +145,18 @@ sap.ui.define([
145
145
  return oChangeIndicators;
146
146
  };
147
147
 
148
+ ChangeIndicatorRegistry.prototype.getRelevantChangesWithSelector = function () {
149
+ var oSelectors = this.getSelectorsWithRegisteredChanges();
150
+ var aRelevantChanges = [];
151
+ Object.keys(oSelectors).forEach(function(sSelectorId) {
152
+ var aRelevantChangesForSelector = oSelectors[sSelectorId].filter(function (oChange) {
153
+ return !oChange.dependent;
154
+ });
155
+ aRelevantChanges = aRelevantChanges.concat(aRelevantChangesForSelector);
156
+ });
157
+ return aRelevantChanges;
158
+ };
159
+
148
160
  /**
149
161
  * Returns the registered change indicator for the given element ID.
150
162
  *
@@ -195,7 +207,7 @@ sap.ui.define([
195
207
  }
196
208
 
197
209
  if (oChange.getState() === "NEW") {
198
- aChangeStates = [ChangeStates.DIRTY, ChangeStates.DRAFT];
210
+ aChangeStates = ChangeStates.getDraftAndDirtyStates();
199
211
  } else if (aDraftChangesList && aDraftChangesList.includes(oChange.getId())) {
200
212
  aChangeStates = [ChangeStates.DRAFT];
201
213
  } else {
@@ -311,5 +323,17 @@ sap.ui.define([
311
323
  }.bind(this));
312
324
  };
313
325
 
326
+ /**
327
+ * Removes changes without any displayElementIds from the registry so the change can be re-registered and
328
+ * the visualizationInfo is updated => if an element is inside a dialog which hasnt been opened yet
329
+ */
330
+ ChangeIndicatorRegistry.prototype.removeRegisteredChangesWithoutVizInfo = function () {
331
+ this.getAllRegisteredChanges().forEach(function(oChange) {
332
+ if (oChange.visualizationInfo && oChange.visualizationInfo.displayElementIds.length === 0) {
333
+ this.removeRegisteredChange(oChange.change.getId());
334
+ }
335
+ }.bind(this));
336
+ };
337
+
314
338
  return ChangeIndicatorRegistry;
315
339
  });
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -20,7 +20,7 @@ sap.ui.define([
20
20
  *
21
21
  * @returns {array} Array of change states.
22
22
  */
23
- ChangeStates.getDraftState = function() {
23
+ ChangeStates.getDraftAndDirtyStates = function() {
24
24
  return [this.DRAFT, this.DIRTY];
25
25
  };
26
26