@openui5/sap.ui.integration 1.101.0 → 1.102.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 (182) hide show
  1. package/THIRDPARTY.txt +1 -1
  2. package/package.json +3 -3
  3. package/src/sap/ui/integration/.library +1 -1
  4. package/src/sap/ui/integration/ActionDefinition.js +1 -1
  5. package/src/sap/ui/integration/Designtime.js +1 -1
  6. package/src/sap/ui/integration/Extension.js +1 -1
  7. package/src/sap/ui/integration/Host.js +1 -1
  8. package/src/sap/ui/integration/cards/AdaptiveContent.js +1 -1
  9. package/src/sap/ui/integration/cards/AnalyticalContent.js +2 -1
  10. package/src/sap/ui/integration/cards/AnalyticsCloudContent.js +1 -1
  11. package/src/sap/ui/integration/cards/BaseContent.js +1 -1
  12. package/src/sap/ui/integration/cards/BaseListContent.js +1 -1
  13. package/src/sap/ui/integration/cards/CalendarContent.js +1 -1
  14. package/src/sap/ui/integration/cards/ComponentContent.js +1 -1
  15. package/src/sap/ui/integration/cards/Footer.js +1 -1
  16. package/src/sap/ui/integration/cards/Header.js +1 -1
  17. package/src/sap/ui/integration/cards/ListContent.js +1 -1
  18. package/src/sap/ui/integration/cards/NumericHeader.js +1 -1
  19. package/src/sap/ui/integration/cards/ObjectContent.js +1 -1
  20. package/src/sap/ui/integration/cards/TableContent.js +1 -1
  21. package/src/sap/ui/integration/cards/TimelineContent.js +1 -1
  22. package/src/sap/ui/integration/cards/WebPageContent.js +1 -1
  23. package/src/sap/ui/integration/cards/actions/CardActions.js +1 -1
  24. package/src/sap/ui/integration/cards/adaptivecards/elements/UI5InputChoiceSet.js +1 -1
  25. package/src/sap/ui/integration/cards/adaptivecards/elements/UI5InputDate.js +1 -1
  26. package/src/sap/ui/integration/cards/adaptivecards/elements/UI5InputNumber.js +1 -1
  27. package/src/sap/ui/integration/cards/adaptivecards/elements/UI5InputText.js +1 -1
  28. package/src/sap/ui/integration/cards/adaptivecards/elements/UI5InputToggle.js +1 -1
  29. package/src/sap/ui/integration/cards/filters/BaseFilter.js +1 -1
  30. package/src/sap/ui/integration/cards/filters/DateRangeFilter.js +1 -1
  31. package/src/sap/ui/integration/cards/filters/FilterBar.js +1 -1
  32. package/src/sap/ui/integration/cards/filters/FilterBarFactory.js +1 -1
  33. package/src/sap/ui/integration/cards/filters/SearchFilter.js +1 -1
  34. package/src/sap/ui/integration/cards/filters/SelectFilter.js +1 -1
  35. package/src/sap/ui/integration/controls/ActionsStrip.js +1 -1
  36. package/src/sap/ui/integration/controls/ActionsToolbar.js +1 -1
  37. package/src/sap/ui/integration/controls/LinkWithIcon.js +1 -1
  38. package/src/sap/ui/integration/controls/ListContentItem.js +1 -1
  39. package/src/sap/ui/integration/controls/Microchart.js +1 -1
  40. package/src/sap/ui/integration/controls/MicrochartLegend.js +1 -1
  41. package/src/sap/ui/integration/controls/Paginator.js +1 -1
  42. package/src/sap/ui/integration/designtime/baseEditor/BaseEditor.js +1 -1
  43. package/src/sap/ui/integration/designtime/baseEditor/PropertyEditor.js +1 -1
  44. package/src/sap/ui/integration/designtime/baseEditor/PropertyEditors.js +1 -1
  45. package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/BasePropertyEditor.js +1 -1
  46. package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/PropertyEditorFactory.js +1 -1
  47. package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/arrayEditor/ArrayEditor.js +1 -1
  48. package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/booleanEditor/BooleanEditor.js +1 -1
  49. package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/dateEditor/DateEditor.js +1 -1
  50. package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/dateTimeEditor/DateTimeEditor.js +1 -1
  51. package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/enumStringEditor/EnumStringEditor.js +1 -1
  52. package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/groupEditor/GroupEditor.js +1 -1
  53. package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/iconEditor/IconEditor.js +1 -1
  54. package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/iconEditor/IsInIconPool.validator.js +1 -1
  55. package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/integerEditor/IntegerEditor.js +1 -1
  56. package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/jsonEditor/JsonEditor.js +1 -1
  57. package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/listEditor/ListEditor.js +1 -1
  58. package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/mapEditor/MapEditor.js +1 -1
  59. package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/multiSelectEditor/MultiSelectEditor.js +1 -1
  60. package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/numberEditor/NumberEditor.js +1 -1
  61. package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/objectArrayEditor/ObjectArrayEditor.js +1 -1
  62. package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/selectEditor/SelectEditor.js +1 -1
  63. package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/separatorEditor/SeparatorEditor.js +1 -1
  64. package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/stringEditor/StringEditor.js +1 -1
  65. package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/textAreaEditor/TextAreaEditor.js +1 -1
  66. package/src/sap/ui/integration/designtime/baseEditor/util/binding/ObjectBinding.js +1 -1
  67. package/src/sap/ui/integration/designtime/baseEditor/util/unset.js +1 -1
  68. package/src/sap/ui/integration/designtime/baseEditor/validator/IsBoolean.js +1 -1
  69. package/src/sap/ui/integration/designtime/baseEditor/validator/IsDate.js +1 -1
  70. package/src/sap/ui/integration/designtime/baseEditor/validator/IsInteger.js +1 -1
  71. package/src/sap/ui/integration/designtime/baseEditor/validator/IsNumber.js +1 -1
  72. package/src/sap/ui/integration/designtime/baseEditor/validator/IsSelectedKey.js +1 -1
  73. package/src/sap/ui/integration/designtime/baseEditor/validator/IsStringList.js +1 -1
  74. package/src/sap/ui/integration/designtime/baseEditor/validator/IsUniqueKey.js +1 -1
  75. package/src/sap/ui/integration/designtime/baseEditor/validator/IsUniqueList.js +1 -1
  76. package/src/sap/ui/integration/designtime/baseEditor/validator/IsValidBinding.js +1 -1
  77. package/src/sap/ui/integration/designtime/baseEditor/validator/MaxLength.js +1 -1
  78. package/src/sap/ui/integration/designtime/baseEditor/validator/NotABinding.js +1 -1
  79. package/src/sap/ui/integration/designtime/baseEditor/validator/ValidatorRegistry.js +1 -1
  80. package/src/sap/ui/integration/designtime/cardEditor/propertyEditor/complexMapEditor/ComplexMapEditor.js +1 -1
  81. package/src/sap/ui/integration/designtime/cardEditor/propertyEditor/destinationsEditor/DestinationsEditor.js +1 -1
  82. package/src/sap/ui/integration/designtime/cardEditor/propertyEditor/filtersEditor/FiltersEditor.js +1 -1
  83. package/src/sap/ui/integration/designtime/cardEditor/propertyEditor/iconEditor/IconEditor.js +1 -1
  84. package/src/sap/ui/integration/designtime/cardEditor/propertyEditor/parametersEditor/ParametersEditor.js +1 -1
  85. package/src/sap/ui/integration/designtime/editor/CardEditor.js +12 -4
  86. package/src/sap/ui/integration/designtime/editor/CardPreview.js +1 -1
  87. package/src/sap/ui/integration/editor/Editor.js +145 -41
  88. package/src/sap/ui/integration/editor/EditorResourceBundles.js +1 -1
  89. package/src/sap/ui/integration/editor/Extension.js +1 -1
  90. package/src/sap/ui/integration/editor/Manifest.js +1 -1
  91. package/src/sap/ui/integration/editor/Merger.js +0 -1
  92. package/src/sap/ui/integration/editor/Settings.js +1 -1
  93. package/src/sap/ui/integration/editor/css/Editor.css +11 -5
  94. package/src/sap/ui/integration/editor/fields/BaseField.js +43 -9
  95. package/src/sap/ui/integration/editor/fields/BooleanField.js +1 -1
  96. package/src/sap/ui/integration/editor/fields/DateField.js +1 -1
  97. package/src/sap/ui/integration/editor/fields/DateTimeField.js +1 -1
  98. package/src/sap/ui/integration/editor/fields/DestinationField.js +1 -1
  99. package/src/sap/ui/integration/editor/fields/IntegerField.js +1 -1
  100. package/src/sap/ui/integration/editor/fields/NumberField.js +1 -1
  101. package/src/sap/ui/integration/editor/fields/ObjectField.js +1119 -446
  102. package/src/sap/ui/integration/editor/fields/ObjectListField.js +186 -197
  103. package/src/sap/ui/integration/editor/fields/StringField.js +36 -13
  104. package/src/sap/ui/integration/editor/fields/StringListField.js +1 -1
  105. package/src/sap/ui/integration/editor/fields/viz/ColorSelect.js +1 -1
  106. package/src/sap/ui/integration/editor/fields/viz/IconSelect.js +1 -1
  107. package/src/sap/ui/integration/editor/fields/viz/ShapeSelect.js +1 -1
  108. package/src/sap/ui/integration/library.js +5 -5
  109. package/src/sap/ui/integration/messagebundle.properties +44 -23
  110. package/src/sap/ui/integration/messagebundle_ar.properties +26 -12
  111. package/src/sap/ui/integration/messagebundle_bg.properties +26 -12
  112. package/src/sap/ui/integration/messagebundle_ca.properties +26 -12
  113. package/src/sap/ui/integration/messagebundle_cs.properties +26 -12
  114. package/src/sap/ui/integration/messagebundle_cy.properties +26 -12
  115. package/src/sap/ui/integration/messagebundle_da.properties +26 -12
  116. package/src/sap/ui/integration/messagebundle_de.properties +26 -12
  117. package/src/sap/ui/integration/messagebundle_el.properties +26 -12
  118. package/src/sap/ui/integration/messagebundle_en.properties +26 -12
  119. package/src/sap/ui/integration/messagebundle_en_GB.properties +26 -12
  120. package/src/sap/ui/integration/messagebundle_en_US_sappsd.properties +26 -12
  121. package/src/sap/ui/integration/messagebundle_en_US_saprigi.properties +26 -12
  122. package/src/sap/ui/integration/messagebundle_en_US_saptrc.properties +26 -12
  123. package/src/sap/ui/integration/messagebundle_es.properties +27 -13
  124. package/src/sap/ui/integration/messagebundle_es_MX.properties +26 -12
  125. package/src/sap/ui/integration/messagebundle_et.properties +26 -12
  126. package/src/sap/ui/integration/messagebundle_fi.properties +27 -13
  127. package/src/sap/ui/integration/messagebundle_fr.properties +26 -12
  128. package/src/sap/ui/integration/messagebundle_fr_CA.properties +26 -12
  129. package/src/sap/ui/integration/messagebundle_hi.properties +26 -12
  130. package/src/sap/ui/integration/messagebundle_hr.properties +26 -12
  131. package/src/sap/ui/integration/messagebundle_hu.properties +26 -12
  132. package/src/sap/ui/integration/messagebundle_id.properties +26 -12
  133. package/src/sap/ui/integration/messagebundle_it.properties +26 -12
  134. package/src/sap/ui/integration/messagebundle_iw.properties +26 -12
  135. package/src/sap/ui/integration/messagebundle_ja.properties +26 -12
  136. package/src/sap/ui/integration/messagebundle_kk.properties +26 -12
  137. package/src/sap/ui/integration/messagebundle_ko.properties +27 -13
  138. package/src/sap/ui/integration/messagebundle_lt.properties +26 -12
  139. package/src/sap/ui/integration/messagebundle_lv.properties +26 -12
  140. package/src/sap/ui/integration/messagebundle_ms.properties +26 -12
  141. package/src/sap/ui/integration/messagebundle_nl.properties +26 -12
  142. package/src/sap/ui/integration/messagebundle_no.properties +26 -12
  143. package/src/sap/ui/integration/messagebundle_pl.properties +26 -12
  144. package/src/sap/ui/integration/messagebundle_pt.properties +26 -12
  145. package/src/sap/ui/integration/messagebundle_pt_PT.properties +26 -12
  146. package/src/sap/ui/integration/messagebundle_ro.properties +26 -12
  147. package/src/sap/ui/integration/messagebundle_ru.properties +26 -12
  148. package/src/sap/ui/integration/messagebundle_sh.properties +26 -12
  149. package/src/sap/ui/integration/messagebundle_sk.properties +26 -12
  150. package/src/sap/ui/integration/messagebundle_sl.properties +26 -12
  151. package/src/sap/ui/integration/messagebundle_sv.properties +26 -12
  152. package/src/sap/ui/integration/messagebundle_th.properties +26 -12
  153. package/src/sap/ui/integration/messagebundle_tr.properties +26 -12
  154. package/src/sap/ui/integration/messagebundle_uk.properties +26 -12
  155. package/src/sap/ui/integration/messagebundle_vi.properties +26 -12
  156. package/src/sap/ui/integration/messagebundle_zh_CN.properties +26 -12
  157. package/src/sap/ui/integration/messagebundle_zh_TW.properties +26 -12
  158. package/src/sap/ui/integration/model/ContextModel.js +1 -1
  159. package/src/sap/ui/integration/model/ObservableModel.js +1 -1
  160. package/src/sap/ui/integration/model/PagingModelListBinding.js +1 -1
  161. package/src/sap/ui/integration/schemas/sap-card.json +73 -3
  162. package/src/sap/ui/integration/util/BaseFactory.js +1 -1
  163. package/src/sap/ui/integration/util/BindingHelper.js +1 -1
  164. package/src/sap/ui/integration/util/BindingResolver.js +1 -1
  165. package/src/sap/ui/integration/util/CardMerger.js +82 -8
  166. package/src/sap/ui/integration/util/CardObserver.js +1 -1
  167. package/src/sap/ui/integration/util/ContentFactory.js +1 -1
  168. package/src/sap/ui/integration/util/CsrfTokenHandler.js +1 -1
  169. package/src/sap/ui/integration/util/DataProvider.js +1 -1
  170. package/src/sap/ui/integration/util/DataProviderFactory.js +1 -1
  171. package/src/sap/ui/integration/util/Destinations.js +1 -1
  172. package/src/sap/ui/integration/util/ExtensionDataProvider.js +1 -1
  173. package/src/sap/ui/integration/util/HeaderFactory.js +1 -1
  174. package/src/sap/ui/integration/util/JSONBindingHelper.js +1 -1
  175. package/src/sap/ui/integration/util/LoadingProvider.js +1 -1
  176. package/src/sap/ui/integration/util/Manifest.js +2 -1
  177. package/src/sap/ui/integration/util/RequestDataProvider.js +1 -1
  178. package/src/sap/ui/integration/util/ServiceDataProvider.js +1 -1
  179. package/src/sap/ui/integration/util/ServiceManager.js +1 -1
  180. package/src/sap/ui/integration/util/SkeletonCard.js +1 -1
  181. package/src/sap/ui/integration/util/Utils.js +16 -1
  182. package/src/sap/ui/integration/widgets/Card.js +32 -10
@@ -6,20 +6,20 @@
6
6
 
7
7
  sap.ui.define([
8
8
  "sap/ui/integration/editor/fields/ObjectField",
9
- "sap/ui/core/Core",
10
9
  "sap/ui/model/json/JSONModel",
11
10
  "sap/ui/table/Table",
11
+ "sap/m/CheckBox",
12
12
  "sap/base/util/deepEqual",
13
13
  "sap/base/util/deepClone",
14
- "sap/base/util/includes"
14
+ "sap/ui/integration/util/Utils"
15
15
  ], function (
16
16
  ObjectField,
17
- Core,
18
17
  JSONModel,
19
18
  Table,
19
+ CheckBox,
20
20
  deepEqual,
21
21
  deepClone,
22
- includes
22
+ Utils
23
23
  ) {
24
24
  "use strict";
25
25
 
@@ -29,7 +29,7 @@ sap.ui.define([
29
29
  * @alias sap.ui.integration.editor.fields.ObjectListField
30
30
  * @author SAP SE
31
31
  * @since 1.100.0
32
- * @version 1.101.0
32
+ * @version 1.102.0
33
33
  * @private
34
34
  * @experimental since 1.100.0
35
35
  * @ui5-restricted
@@ -43,8 +43,12 @@ sap.ui.define([
43
43
 
44
44
  ObjectListField.prototype.initVisualization = function (oConfig) {
45
45
  var that = this;
46
- that._newObjectTemplate = {};
47
- that._bIsEnableSelectAllInTable = true;
46
+ that._newObjectTemplate = {
47
+ "_dt": {
48
+ "_selected": true,
49
+ "_uuid": ""
50
+ }
51
+ };
48
52
  var oVisualization = oConfig.visualization;
49
53
  if (!oVisualization) {
50
54
  if (oConfig.value && !oConfig.properties && (!oConfig.values || (oConfig.values && !oConfig.values.metadata))) {
@@ -66,14 +70,22 @@ sap.ui.define([
66
70
  var oControl = that.getAggregation("_field");
67
71
  if (oControl instanceof Table) {
68
72
  oControl.addStyleClass("sapUiIntegrationEditorItemObjectListFieldTable");
69
- // select all the rows if values from config.value
70
73
  var oConfig = that.getConfiguration();
74
+ // select all the results come from config.value
71
75
  if (!oConfig.values){
72
76
  var oValue = deepClone(oConfig.value, 500) || [];
73
- oControl.setModel(new JSONModel({
74
- value: oValue
77
+ oValue.forEach(function (oItem) {
78
+ oItem._dt = oItem._dt || {};
79
+ oItem._dt._selected = true;
80
+ oItem._dt._uuid = oItem._dt._uuid || Utils.generateUuidV4();
81
+ });
82
+ that.setModel(new JSONModel({
83
+ value: oValue,
84
+ _allSelected: true
75
85
  }));
76
- oControl.selectAll();
86
+ that.bindObject({
87
+ path: "/value"
88
+ });
77
89
  }
78
90
  }
79
91
  };
@@ -85,7 +97,8 @@ sap.ui.define([
85
97
  var oProperties = {};
86
98
  oConfig.value.forEach(function(oObject) {
87
99
  for (var n in oObject) {
88
- if (!oProperties[n]) {
100
+ // not show _dt property which generated and used by editor
101
+ if (!oProperties[n] && n !== "_dt") {
89
102
  var sType = typeof oObject[n];
90
103
  var oProperty = sType === "string" ? {} : {"type": sType};
91
104
  oProperties[n] = oProperty;
@@ -99,34 +112,115 @@ sap.ui.define([
99
112
  }
100
113
  };
101
114
 
102
- ObjectListField.prototype.onSelectionChange = function (oEvent) {
115
+ ObjectListField.prototype.buildSelectionColumnLables = function() {
116
+ var that = this;
117
+ var oConfig = that.getConfiguration();
118
+ var oResourceBundle = that.getResourceBundle();
119
+ return new CheckBox({
120
+ selected: "{/_allSelected}",
121
+ visible: typeof oConfig.values !== "undefined",
122
+ tooltip: {
123
+ path: '/_allSelected',
124
+ formatter: function(bAllSelected) {
125
+ if (!bAllSelected) {
126
+ return oResourceBundle.getText("EDITOR_FIELD_OBJECT_LIST_TABLE_COLUMN_SELECTION_TOOLTIP_ADDALL");
127
+ } else {
128
+ return oResourceBundle.getText("EDITOR_FIELD_OBJECT_LIST_TABLE_COLUMN_SELECTION_TOOLTIP_REMOVEALL");
129
+ }
130
+ }
131
+ },
132
+ select: that.onSelectionColumnClick.bind(that)
133
+ });
134
+ };
135
+
136
+ ObjectListField.prototype.onSelectionColumnClick = function(oEvent) {
103
137
  var that = this;
104
- var oControl = oEvent.getSource();
105
- var bUserInteraction = oEvent.getParameter("userInteraction") || false;
106
- // only update data models if is user interaction
107
- if (bUserInteraction) {
108
- var aSelectedIndices = oControl.getSelectedIndices();
138
+ var bIsSelected = oEvent.getParameter("selected");
139
+ var oTable = that.getAggregation("_field");
140
+ var oRowContexts = oTable.getBinding("rows").getContexts();
141
+ oRowContexts.forEach(function (oRowContext) {
142
+ var oItem = oRowContext.getObject();
143
+ oItem._dt = oItem._dt || {};
144
+ oItem._dt._selected = bIsSelected;
145
+ });
109
146
 
110
- var oRowContexts = oControl.getBinding("rows").getContexts();
111
- var oValue;
112
- if (aSelectedIndices.length > 0) {
113
- oValue = [];
114
- aSelectedIndices.forEach(function(iSelectedIndice) {
115
- var oObject = oRowContexts[iSelectedIndice].getObject();
116
- oValue.push(deepClone(oObject, 500));
117
- });
147
+ var oModel = oTable.getModel();
148
+ var sPath = oTable.getBinding("rows").getPath();
149
+ var oData = oModel.getProperty(sPath);
150
+ var aValues;
151
+ oData.forEach(function (oObject) {
152
+ if (oObject._dt && oObject._dt._selected) {
153
+ var oClonedObject = deepClone(oObject, 500);
154
+ aValues = aValues || [];
155
+ aValues.push(oClonedObject);
118
156
  }
157
+ });
158
+ oModel.checkUpdate(true);
159
+ that.setValue(aValues);
160
+ };
119
161
 
120
- // merge the selections with the ones which not been seen since filtering
121
- if (oControl._aPathsOfFilteredOut && oControl._aPathsOfFilteredOut.length > 0) {
122
- oValue = oValue || [];
123
- var oModel = oControl.getModel();
124
- oControl._aPathsOfFilteredOut.forEach(function(sPathOfFilteredOut) {
125
- var oObject = oModel.getProperty(sPathOfFilteredOut);
126
- oValue.push(deepClone(oObject, 500));
127
- });
162
+ ObjectListField.prototype.updateSelectionColumn = function() {
163
+ var that = this;
164
+ var oTable = that.getAggregation("_field");
165
+ var oRowContexts = oTable.getBinding("rows").getContexts();
166
+ var bAllSelected = true;
167
+ if (oRowContexts.length === 0) {
168
+ bAllSelected = false;
169
+ } else {
170
+ for (var i = 0; i < oRowContexts.length; i++) {
171
+ var oObject = oRowContexts[i].getObject();
172
+ if (!oObject._dt || oObject._dt._selected !== true) {
173
+ bAllSelected = false;
174
+ break;
175
+ }
176
+ }
177
+ }
178
+ oTable.getModel().setProperty("/_allSelected", bAllSelected);
179
+ };
180
+
181
+ ObjectListField.prototype.onAdd = function(oEvent) {
182
+ var that = this;
183
+ var oControl = that.getAggregation("_field");
184
+ var oNewObject = that._oObjectDetailsPopover.getModel().getProperty("/value");
185
+ var sPath = oControl.getBinding("rows").getPath();
186
+ var oModel = oControl.getModel();
187
+ var oData = oModel.getProperty(sPath);
188
+ oData.push(oNewObject);
189
+ oModel.setProperty("/_hasTableAllSelected", false);
190
+ oModel.setProperty("/_hasTableSelected", false);
191
+ oModel.checkUpdate();
192
+ that.refreshValue();
193
+ that._oObjectDetailsPopover.close();
194
+ };
195
+
196
+ ObjectListField.prototype.refreshValue = function () {
197
+ var that = this;
198
+ var oTable = that.getAggregation("_field");
199
+ var oModel = oTable.getModel();
200
+ var sPath = oTable.getBinding("rows").getPath();
201
+ var oData = oModel.getProperty(sPath);
202
+ var vValue = [];
203
+ oData.forEach(function (oItem) {
204
+ if (oItem._dt._selected) {
205
+ var oClonedObject = deepClone(oItem);
206
+ vValue.push(oClonedObject);
128
207
  }
129
- that._setCurrentProperty("value", oValue);
208
+ });
209
+ that.setValue(vValue);
210
+ };
211
+
212
+ ObjectListField.prototype.onSelectionChange = function (oEvent) {
213
+ var that = this;
214
+ var bSelected = oEvent.getParameter("selected");
215
+ var vValue = this._getCurrentProperty("value");
216
+ var oTable = that.getAggregation("_field");
217
+ var oModel = oTable.getModel();
218
+ if (bSelected || vValue.length > 1) {
219
+ that.refreshValue();
220
+ that.updateSelectionColumn();
221
+ } else {
222
+ oModel.setProperty("/_allSelected", false);
223
+ that.setValue(undefined);
130
224
  }
131
225
  };
132
226
 
@@ -134,36 +228,72 @@ sap.ui.define([
134
228
  var that = this;
135
229
  var oConfig = that.getConfiguration();
136
230
  var oTable = that.getAggregation("_field");
231
+ var oModel = oTable.getModel();
137
232
  if (oConfig.value && Array.isArray(oConfig.value) && oConfig.value.length > 0) {
138
- var oValue,
139
- oModel = oTable.getModel(),
233
+ var aValues = deepClone(oConfig.value, 500),
140
234
  sPath = oTable.getBinding("rows").getPath();
141
235
  if (Array.isArray(tResult) && tResult.length > 0) {
236
+ var aUUIDs = [];
237
+ // move the uuids into backup array
238
+ aValues.forEach(function (oItem) {
239
+ var sUuid;
240
+ if (!oItem._dt) {
241
+ sUuid = Utils.generateUuidV4();
242
+ } else {
243
+ sUuid = oItem._dt._uuid || Utils.generateUuidV4();
244
+ delete oItem._dt._uuid;
245
+ }
246
+ aUUIDs.push(sUuid);
247
+ });
142
248
  var aNotSelectedObjects = [];
249
+ // filter out the unselected request results, and add uuid for them
143
250
  for (var i = 0; i < tResult.length; i++) {
144
251
  var oRequestObject = tResult[i];
145
252
  var bIsSelected = false;
146
- for (var j = 0; j < oConfig.value.length; j++) {
147
- if (deepEqual(oConfig.value[j], oRequestObject)) {
253
+ for (var j = 0; j < aValues.length; j++) {
254
+ if (deepEqual(oRequestObject, aValues[j])) {
148
255
  bIsSelected = true;
149
256
  break;
150
257
  }
151
258
  }
152
259
  if (!bIsSelected) {
260
+ oRequestObject._dt._uuid = Utils.generateUuidV4();
153
261
  aNotSelectedObjects.push(oRequestObject);
154
262
  }
155
263
  }
156
- tResult = deepClone(oConfig.value.concat(aNotSelectedObjects), 500);
157
- oModel.setProperty(sPath, tResult);
158
- oTable.addSelectionInterval(0, oConfig.value.length - 1);
264
+ // add uuid for each result in value, and mark them as selected
265
+ for (var k = 0; k < aValues.length; k++) {
266
+ var oValueItem = aValues[k];
267
+ oValueItem._dt = oValueItem._dt || {};
268
+ oValueItem._dt._selected = true;
269
+ oValueItem._dt._uuid = aUUIDs[k];
270
+ }
271
+ if (aNotSelectedObjects.length > 0) {
272
+ oModel.setProperty("/_allSelected", false);
273
+ aValues = aValues.concat(aNotSelectedObjects);
274
+ } else {
275
+ oModel.setProperty("/_allSelected", true);
276
+ }
159
277
  } else {
160
- oValue = deepClone(oConfig.value, 500);
161
- tResult = oValue;
162
- oModel.setProperty(sPath, tResult);
163
- oTable.selectAll();
278
+ // add uuid for each result in value, and mark them as selected
279
+ aValues.forEach(function (oItem) {
280
+ oItem._dt = oItem._dt || {};
281
+ oItem._dt._selected = true;
282
+ oItem._dt._uuid = oItem._dt._uuid || Utils.generateUuidV4();
283
+ });
284
+ oModel.setProperty("/_allSelected", true);
285
+ }
286
+ oModel.setProperty(sPath, aValues);
287
+ } else {
288
+ // add uuid for each request result
289
+ if (Array.isArray(tResult) && tResult.length > 0) {
290
+ tResult.forEach(function(oResult) {
291
+ oResult._dt._uuid = Utils.generateUuidV4();
292
+ });
164
293
  }
294
+ oModel.setProperty("/_allSelected", false);
165
295
  }
166
- return tResult;
296
+ oModel.checkUpdate();
167
297
  };
168
298
 
169
299
  ObjectListField.prototype.onChangeOfTextArea = function (oEvent) {
@@ -193,7 +323,7 @@ sap.ui.define([
193
323
  var that = this;
194
324
  var oValueModel;
195
325
  if (!bIsInDetailsPopover) {
196
- that._setCurrentProperty("value", oValue);
326
+ that.setValue(oValue);
197
327
  } else {
198
328
  oValueModel = oTextArea.getModel();
199
329
  oValueModel.setProperty("/value", oValue);
@@ -202,157 +332,16 @@ sap.ui.define([
202
332
  oTextArea.setValueStateText("");
203
333
  };
204
334
 
205
- ObjectListField.prototype.checkHasValue = function() {
206
- var that = this;
207
- var oValue = that._getCurrentProperty("value");
208
- if (Array.isArray(oValue) && oValue.length > 0) {
209
- return true;
210
- }
211
- return false;
212
- };
213
-
214
- // restore the selections since the selections are lost, BCP: 2280048930, JIRA: CPOUIFTEAMB-252
215
- ObjectListField.prototype.applyBeforeValueAndSelections = function(sMode, oParameter) {
216
- var that = this;
217
- var oControl = that.getAggregation("_field");
218
- var aSelectedIndices = oParameter.selectedIndices;
219
- var iRowNumber = oParameter.rowNumber;
220
- var sBasePath = oControl.getBinding("rows").getPath();
221
- var aRowContexts = oControl.getBinding("rows").getContexts();
222
- var iNewRowNumber = aRowContexts.length;
223
- var iRowIndex = oParameter.rowIndex;
224
- var oModel = oControl.getModel();
225
- var oNewValue = [];
226
- var aSelectedIndicesCloned;
227
- switch (sMode) {
228
- case "add":
229
- // update the selections
230
- aSelectedIndices.forEach(function(iSelectedIndex) {
231
- oControl.addSelectionInterval(iSelectedIndex, iSelectedIndex);
232
- });
233
- break;
234
- case "update":
235
- // update the selections when row number changed which means the update may cause it filter out
236
- var bIsUpdateSelectedRow = false;
237
- if (iRowNumber !== iNewRowNumber) {
238
- aSelectedIndicesCloned = deepClone(aSelectedIndices);
239
- aSelectedIndices = [];
240
- aSelectedIndicesCloned.forEach(function(iSelectedIndex) {
241
- if (iSelectedIndex < iRowIndex) {
242
- aSelectedIndices.push(iSelectedIndex);
243
- } else if (iSelectedIndex > iRowIndex) {
244
- aSelectedIndices.push(iSelectedIndex - 1);
245
- } else if (iSelectedIndex === iRowIndex) {
246
- bIsUpdateSelectedRow = true;
247
- oControl._aPathsOfFilteredOut.push(oParameter.path);
248
- }
249
- });
250
-
251
- } else if (includes(aSelectedIndices, iRowIndex)) {
252
- bIsUpdateSelectedRow = true;
253
- }
254
- if (bIsUpdateSelectedRow) {
255
- //update objects in field value if it is selected
256
- aSelectedIndices.forEach(function(iIndex) {
257
- var sSelectedIndicePath = aRowContexts[iIndex].getPath();
258
- var oObject = oModel.getProperty(sSelectedIndicePath);
259
- oNewValue.push(deepClone(oObject, 500));
260
- });
261
- if (oControl._aPathsOfFilteredOut && oControl._aPathsOfFilteredOut.length > 0) {
262
- oControl._aPathsOfFilteredOut.forEach(function(sPathOfFilteredOut) {
263
- var oObject = oModel.getProperty(sPathOfFilteredOut);
264
- oNewValue.push(deepClone(oObject, 500));
265
- });
266
- }
267
- that._setCurrentProperty("value", oNewValue);
268
- }
269
- // reselect the selections
270
- aSelectedIndices.forEach(function(iSelectedIndex) {
271
- oControl.addSelectionInterval(iSelectedIndex, iSelectedIndex);
272
- });
273
- break;
274
- case "delete":
275
- var bIsDeleteSelectedRow = false;
276
- if (includes(aSelectedIndices, iRowIndex)) {
277
- bIsDeleteSelectedRow = true;
335
+ ObjectListField.prototype.cleanDT = function(oValue) {
336
+ if (oValue) {
337
+ oValue.forEach(function(oItem) {
338
+ if (oItem && oItem._dt && oItem._dt._selected) {
339
+ delete oItem._dt._selected;
278
340
  }
279
- aSelectedIndicesCloned = deepClone(aSelectedIndices);
280
- aSelectedIndices = [];
281
- aSelectedIndicesCloned.forEach(function(iSelectedIndex) {
282
- if (iSelectedIndex < iRowIndex) {
283
- aSelectedIndices.push(iSelectedIndex);
284
- } else if (iSelectedIndex > iRowIndex) {
285
- aSelectedIndices.push(iSelectedIndex - 1);
286
- }
287
- });
288
- aSelectedIndices.forEach(function(iSelectedIndex) {
289
- oControl.addSelectionInterval(iSelectedIndex, iSelectedIndex);
290
- });
291
- // update the Paths in oTable._aPathsOfFilteredOut
292
- if (oControl._aPathsOfFilteredOut && oControl._aPathsOfFilteredOut.length > 0) {
293
- oControl._aPathsOfFilteredOut = oControl._aPathsOfFilteredOut.map(function (sPathOfFilteredOut) {
294
- var iRealIndexOfFilteredOut = sPathOfFilteredOut.substring(sPathOfFilteredOut.lastIndexOf("/") + 1);
295
- if (iRealIndexOfFilteredOut > oParameter.realIndex) {
296
- iRealIndexOfFilteredOut--;
297
- return sBasePath + "/" + iRealIndexOfFilteredOut;
298
- } else {
299
- return sPathOfFilteredOut;
300
- }
301
- });
341
+ if (oItem && oItem._dt && deepEqual(oItem._dt, {})) {
342
+ delete oItem._dt;
302
343
  }
303
-
304
- if (bIsDeleteSelectedRow) {
305
- aSelectedIndices.forEach(function(iIndex) {
306
- var sSelectedIndicePath = aRowContexts[iIndex].getPath();
307
- var oObject = oModel.getProperty(sSelectedIndicePath);
308
- oNewValue.push(deepClone(oObject, 500));
309
- });
310
- if (oControl._aPathsOfFilteredOut && oControl._aPathsOfFilteredOut.length > 0) {
311
- oControl._aPathsOfFilteredOut.forEach(function(sPathOfFilteredOut) {
312
- var oObject = oModel.getProperty(sPathOfFilteredOut);
313
- oNewValue.push(deepClone(oObject, 500));
314
- });
315
- }
316
- if (oNewValue.length === 0) {
317
- oNewValue = undefined;
318
- }
319
- that._setCurrentProperty("value", oNewValue);
320
- }
321
- break;
322
- case "filter":
323
- var oColumn = oParameter.column;
324
- var aPathsOfSelectedObjects = oControl._aPathsOfFilteredOut || [];
325
- if (aSelectedIndices.length > 0) {
326
- aSelectedIndices.forEach(function(iSelectedIndice) {
327
- var sPath = aRowContexts[iSelectedIndice].getPath();
328
- aPathsOfSelectedObjects.push(sPath);
329
- });
330
- oControl._aPathsOfFilteredOut = aPathsOfSelectedObjects;
331
- }
332
- if (oColumn._applySelection !== false && oControl._aPathsOfFilteredOut && oControl._aPathsOfFilteredOut.length > 0) {
333
- oControl.attachEventOnce("rowsUpdated", function() {
334
- if (oControl._aPathsOfFilteredOut && oControl._aPathsOfFilteredOut.length > 0) {
335
- // select the exist selected rows
336
- var aFilteredRowContexts = oControl.getBinding("rows").getContexts() || [];
337
- for (var i = 0; i < aFilteredRowContexts.length; i++) {
338
- if (oControl._aPathsOfFilteredOut.length === 0) {
339
- break;
340
- }
341
- var sPath = aFilteredRowContexts[i].getPath();
342
- for (var j = 0; j < oControl._aPathsOfFilteredOut.length; j++) {
343
- if (oControl._aPathsOfFilteredOut[j] === sPath) {
344
- oControl.addSelectionInterval(i, i);
345
- oControl._aPathsOfFilteredOut.splice(j, 1);
346
- break;
347
- }
348
- }
349
- }
350
- }
351
- });
352
- }
353
- delete oColumn._applySelection;
354
- break;
355
- default:
344
+ });
356
345
  }
357
346
  };
358
347
 
@@ -26,11 +26,34 @@ sap.ui.define([
26
26
  "sap/ui/integration/editor/EditorResourceBundles",
27
27
  "sap/base/util/deepClone",
28
28
  "sap/ui/model/Sorter",
29
- "sap/ui/core/SeparatorItem",
29
+ 'sap/m/GroupHeaderListItem',
30
30
  "sap/base/util/includes",
31
31
  "sap/ui/core/CustomData"
32
32
  ], function (
33
- BaseField, Input, Text, Title, Select, ComboBox, Popover, Button, OverflowToolbar, ToolbarSpacer, ListItem, List, CustomListItem, VBox, each, _debounce, Core, JSONModel, EditorResourceBundles, deepClone, Sorter, SeparatorItem, includes, CustomData
33
+ BaseField,
34
+ Input,
35
+ Text,
36
+ Title,
37
+ Select,
38
+ ComboBox,
39
+ Popover,
40
+ Button,
41
+ OverflowToolbar,
42
+ ToolbarSpacer,
43
+ ListItem,
44
+ List,
45
+ CustomListItem,
46
+ VBox,
47
+ each,
48
+ _debounce,
49
+ Core,
50
+ JSONModel,
51
+ EditorResourceBundles,
52
+ deepClone,
53
+ Sorter,
54
+ GroupHeaderListItem,
55
+ includes,
56
+ CustomData
34
57
  ) {
35
58
  "use strict";
36
59
  var REGEXP_PARAMETERS = /parameters\.([^\}\}]+)/g;
@@ -46,7 +69,7 @@ sap.ui.define([
46
69
  * @alias sap.ui.integration.editor.fields.StringField
47
70
  * @author SAP SE
48
71
  * @since 1.83.0
49
- * @version 1.101.0
72
+ * @version 1.102.0
50
73
  * @private
51
74
  * @experimental since 1.83.0
52
75
  * @ui5-restricted
@@ -278,7 +301,6 @@ sap.ui.define([
278
301
  oControl.attachSelectionChange(this.onSelectionChange.bind(this));
279
302
  }
280
303
  }
281
- this._settingsModel = this.getModel("currentSettings");
282
304
  };
283
305
 
284
306
  StringField.prototype.onSelectionChange = function(oEvent) {
@@ -358,13 +380,13 @@ sap.ui.define([
358
380
  return aOriginTranslatedValues;
359
381
  };
360
382
 
361
- StringField.prototype.getTranslationValueInTexts = function (sLanguage, sKey) {
383
+ StringField.prototype.getTranslationValueInTexts = function (sLanguage, sManifestPath) {
362
384
  var sTranslationPath = "/texts/" + sLanguage;
363
385
  var oProperty = this._settingsModel.getProperty(sTranslationPath) || {};
364
- return oProperty[sKey];
386
+ return oProperty[sManifestPath];
365
387
  };
366
388
 
367
- StringField.prototype.setTranslationValueInTexts = function (sLanguage, sKey, sValue) {
389
+ StringField.prototype.setTranslationValueInTexts = function (sLanguage, sManifestPath, sValue) {
368
390
  var sTranslationPath = "/texts";
369
391
  var oData = this._settingsModel.getData();
370
392
  if (!oData) {
@@ -373,7 +395,7 @@ sap.ui.define([
373
395
  if (!oData.hasOwnProperty("texts")) {
374
396
  var oTexts = {};
375
397
  oTexts[sLanguage] = {};
376
- oTexts[sLanguage][sKey] = sValue;
398
+ oTexts[sLanguage][sManifestPath] = sValue;
377
399
  this._settingsModel.setProperty(sTranslationPath, oTexts);
378
400
  } else {
379
401
  sTranslationPath = "/texts/" + sLanguage;
@@ -383,7 +405,7 @@ sap.ui.define([
383
405
  } else {
384
406
  oLanguage = oData.texts[sLanguage];
385
407
  }
386
- oLanguage[sKey] = sValue;
408
+ oLanguage[sManifestPath] = sValue;
387
409
  this._settingsModel.setProperty(sTranslationPath, oLanguage);
388
410
  }
389
411
  };
@@ -473,10 +495,10 @@ sap.ui.define([
473
495
  descending: true,
474
496
  group: true
475
497
  })],
476
- groupHeaderFactory: that.getGroupHeader
498
+ groupHeaderFactory: oField.getGroupHeader
477
499
  }
478
500
  });
479
- var sPlacement = oField._previewPostion === "right" ? "Right" : "Left";
501
+ var sPlacement = oField._previewPosition === "right" ? "Right" : "Left";
480
502
  that._oTranslationPopover = new Popover({
481
503
  placement: sPlacement,
482
504
  contentWidth: "300px",
@@ -572,8 +594,9 @@ sap.ui.define([
572
594
  };
573
595
 
574
596
  StringField.prototype.getGroupHeader = function(oGroup) {
575
- return new SeparatorItem( {
576
- text: oGroup.key
597
+ return new GroupHeaderListItem({
598
+ title: oGroup.key,
599
+ upperCase: false
577
600
  });
578
601
  };
579
602
 
@@ -46,7 +46,7 @@ sap.ui.define([
46
46
  * @alias sap.ui.integration.editor.fields.StringListField
47
47
  * @author SAP SE
48
48
  * @since 1.83.0
49
- * @version 1.101.0
49
+ * @version 1.102.0
50
50
  * @private
51
51
  * @experimental since 1.83.0
52
52
  * @ui5-restricted
@@ -21,7 +21,7 @@ sap.ui.define([
21
21
  * @alias sap.ui.integration.editor.fields.viz.ColorSelect
22
22
  * @author SAP SE
23
23
  * @since 1.84.0
24
- * @version 1.101.0
24
+ * @version 1.102.0
25
25
  * @private
26
26
  * @experimental since 1.84.0
27
27
  * @ui5-restricted
@@ -26,7 +26,7 @@ sap.ui.define([
26
26
  * @alias sap.ui.integration.editor.fields.viz.IconSelect
27
27
  * @author SAP SE
28
28
  * @since 1.84.0
29
- * @version 1.101.0
29
+ * @version 1.102.0
30
30
  * @private
31
31
  * @experimental since 1.84.0
32
32
  * @ui5-restricted
@@ -21,7 +21,7 @@ sap.ui.define([
21
21
  * @alias sap.ui.integration.editor.fields.viz.ShapeSelect
22
22
  * @author SAP SE
23
23
  * @since 1.84.0
24
- * @version 1.101.0
24
+ * @version 1.102.0
25
25
  * @private
26
26
  * @experimental since 1.84.0
27
27
  * @ui5-restricted
@@ -22,13 +22,13 @@ sap.ui.define([
22
22
  * @namespace
23
23
  * @alias sap.ui.integration
24
24
  * @author SAP SE
25
- * @version 1.101.0
25
+ * @version 1.102.0
26
26
  * @since 1.62
27
27
  * @public
28
28
  */
29
29
  var thisLib = sap.ui.getCore().initLibrary({
30
30
  name: "sap.ui.integration",
31
- version: "1.101.0",
31
+ version: "1.102.0",
32
32
  dependencies: ["sap.ui.core", "sap.f", "sap.m"],
33
33
  types: [
34
34
  "sap.ui.integration.CardActionType",
@@ -63,19 +63,19 @@ sap.ui.define([
63
63
  */
64
64
  thisLib.CardActionType = {
65
65
  /**
66
- * Used for navigation actions
66
+ * Used for navigation actions.
67
67
  * @public
68
68
  */
69
69
  Navigation: "Navigation",
70
70
 
71
71
  /**
72
- * Used for submit actions
72
+ * Used for submit actions.
73
73
  * @public
74
74
  */
75
75
  Submit: "Submit",
76
76
 
77
77
  /**
78
- * Used for custom actions
78
+ * Used for custom actions.
79
79
  * @public
80
80
  * @experimental Since 1.76
81
81
  */