@openui5/sap.ui.integration 1.96.2 → 1.97.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 (131) hide show
  1. package/.reuse/dep5 +1 -1
  2. package/THIRDPARTY.txt +2 -1
  3. package/package.json +3 -3
  4. package/src/sap/ui/integration/.library +1 -1
  5. package/src/sap/ui/integration/ActionDefinition.js +1 -1
  6. package/src/sap/ui/integration/Designtime.js +1 -1
  7. package/src/sap/ui/integration/Extension.js +1 -1
  8. package/src/sap/ui/integration/Host.js +37 -1
  9. package/src/sap/ui/integration/ManifestResolver.js +102 -0
  10. package/src/sap/ui/integration/cards/AdaptiveContent.js +1 -1
  11. package/src/sap/ui/integration/cards/AnalyticalContent.js +7 -8
  12. package/src/sap/ui/integration/cards/AnalyticsCloudContent.js +4 -2
  13. package/src/sap/ui/integration/cards/BaseContent.js +50 -5
  14. package/src/sap/ui/integration/cards/BaseContentRenderer.js +1 -1
  15. package/src/sap/ui/integration/cards/BaseListContent.js +4 -2
  16. package/src/sap/ui/integration/cards/CalendarContent.js +3 -1
  17. package/src/sap/ui/integration/cards/CalendarContentRenderer.js +1 -0
  18. package/src/sap/ui/integration/cards/ComponentContent.js +2 -1
  19. package/src/sap/ui/integration/cards/Footer.js +1 -1
  20. package/src/sap/ui/integration/cards/Header.js +1 -1
  21. package/src/sap/ui/integration/cards/ListContent.js +36 -11
  22. package/src/sap/ui/integration/cards/NumericHeader.js +1 -1
  23. package/src/sap/ui/integration/cards/ObjectContent.js +145 -131
  24. package/src/sap/ui/integration/cards/TableContent.js +5 -8
  25. package/src/sap/ui/integration/cards/TimelineContent.js +7 -9
  26. package/src/sap/ui/integration/cards/WebPageContent.js +5 -1
  27. package/src/sap/ui/integration/cards/adaptivecards/elements/UI5InputChoiceSet.js +1 -1
  28. package/src/sap/ui/integration/cards/adaptivecards/elements/UI5InputDate.js +1 -1
  29. package/src/sap/ui/integration/cards/adaptivecards/elements/UI5InputNumber.js +1 -1
  30. package/src/sap/ui/integration/cards/adaptivecards/elements/UI5InputText.js +1 -1
  31. package/src/sap/ui/integration/cards/adaptivecards/elements/UI5InputToggle.js +1 -1
  32. package/src/sap/ui/integration/cards/filters/BaseFilter.js +1 -1
  33. package/src/sap/ui/integration/cards/filters/DateRangeFilter.js +15 -13
  34. package/src/sap/ui/integration/cards/filters/FilterBarFactory.js +1 -1
  35. package/src/sap/ui/integration/cards/filters/SelectFilter.js +33 -3
  36. package/src/sap/ui/integration/controls/ActionsStrip.js +1 -1
  37. package/src/sap/ui/integration/controls/ActionsToolbar.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/designtime/baseEditor/BaseEditor.js +1 -1
  42. package/src/sap/ui/integration/designtime/baseEditor/PropertyEditor.js +1 -1
  43. package/src/sap/ui/integration/designtime/baseEditor/PropertyEditors.js +1 -1
  44. package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_en_US_sappsd.properties +15 -11
  45. package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_en_US_saprigi.properties +13 -19
  46. package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_en_US_saptrc.properties +16 -12
  47. package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/BasePropertyEditor.js +1 -1
  48. package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/PropertyEditorFactory.js +1 -1
  49. package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/arrayEditor/ArrayEditor.js +1 -1
  50. package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/booleanEditor/BooleanEditor.js +1 -1
  51. package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/dateEditor/DateEditor.js +1 -1
  52. package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/dateTimeEditor/DateTimeEditor.js +1 -1
  53. package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/enumStringEditor/EnumStringEditor.js +1 -1
  54. package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/groupEditor/GroupEditor.js +1 -1
  55. package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/iconEditor/IconEditor.js +1 -1
  56. package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/iconEditor/IsInIconPool.validator.js +1 -1
  57. package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/integerEditor/IntegerEditor.js +1 -1
  58. package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/jsonEditor/JsonEditor.js +1 -1
  59. package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/listEditor/ListEditor.js +1 -1
  60. package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/mapEditor/MapEditor.js +1 -1
  61. package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/numberEditor/NumberEditor.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/i18n/i18n_en_US_saprigi.properties +0 -4
  81. package/src/sap/ui/integration/designtime/cardEditor/propertyEditor/complexMapEditor/ComplexMapEditor.js +1 -1
  82. package/src/sap/ui/integration/designtime/cardEditor/propertyEditor/destinationsEditor/DestinationsEditor.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 +1 -1
  86. package/src/sap/ui/integration/designtime/editor/CardPreview.js +26 -4
  87. package/src/sap/ui/integration/designtime/editor/css/CardPreview.css +18 -1
  88. package/src/sap/ui/integration/editor/Editor.js +61 -37
  89. package/src/sap/ui/integration/editor/EditorResourceBundles.js +1 -1
  90. package/src/sap/ui/integration/editor/Extension.js +1 -1
  91. package/src/sap/ui/integration/editor/Manifest.js +1 -1
  92. package/src/sap/ui/integration/editor/Settings.js +1 -1
  93. package/src/sap/ui/integration/editor/fields/BaseField.js +8 -2
  94. package/src/sap/ui/integration/editor/fields/BooleanField.js +3 -1
  95. package/src/sap/ui/integration/editor/fields/DateField.js +1 -1
  96. package/src/sap/ui/integration/editor/fields/DateTimeField.js +1 -1
  97. package/src/sap/ui/integration/editor/fields/DestinationField.js +1 -1
  98. package/src/sap/ui/integration/editor/fields/IntegerField.js +4 -1
  99. package/src/sap/ui/integration/editor/fields/ListField.js +254 -57
  100. package/src/sap/ui/integration/editor/fields/NumberField.js +1 -1
  101. package/src/sap/ui/integration/editor/fields/StringField.js +2 -3
  102. package/src/sap/ui/integration/editor/fields/viz/ColorSelect.js +1 -1
  103. package/src/sap/ui/integration/editor/fields/viz/IconSelect.js +1 -1
  104. package/src/sap/ui/integration/editor/fields/viz/ShapeSelect.js +1 -1
  105. package/src/sap/ui/integration/library.js +2 -2
  106. package/src/sap/ui/integration/messagebundle_en_US_saprigi.properties +55 -81
  107. package/src/sap/ui/integration/model/ContextModel.js +1 -1
  108. package/src/sap/ui/integration/model/ObservableModel.js +1 -1
  109. package/src/sap/ui/integration/schemas/sap-card.json +29 -4
  110. package/src/sap/ui/integration/themes/base/CalendarContent.less +31 -4
  111. package/src/sap/ui/integration/util/BaseFactory.js +1 -1
  112. package/src/sap/ui/integration/util/BindingHelper.js +2 -2
  113. package/src/sap/ui/integration/util/BindingResolver.js +1 -1
  114. package/src/sap/ui/integration/util/CardActions.js +1 -1
  115. package/src/sap/ui/integration/util/CardObserver.js +1 -1
  116. package/src/sap/ui/integration/util/ContentFactory.js +3 -7
  117. package/src/sap/ui/integration/util/CsrfTokenHandler.js +312 -0
  118. package/src/sap/ui/integration/util/DataProvider.js +10 -1
  119. package/src/sap/ui/integration/util/DataProviderFactory.js +48 -11
  120. package/src/sap/ui/integration/util/Destinations.js +1 -1
  121. package/src/sap/ui/integration/util/ExtensionDataProvider.js +1 -1
  122. package/src/sap/ui/integration/util/HeaderFactory.js +1 -1
  123. package/src/sap/ui/integration/util/JSONBindingHelper.js +2 -2
  124. package/src/sap/ui/integration/util/LoadingProvider.js +1 -1
  125. package/src/sap/ui/integration/util/Manifest.js +2 -2
  126. package/src/sap/ui/integration/util/RequestDataProvider.js +86 -48
  127. package/src/sap/ui/integration/util/ServiceDataProvider.js +1 -1
  128. package/src/sap/ui/integration/util/ServiceManager.js +1 -1
  129. package/src/sap/ui/integration/util/Utils.js +41 -1
  130. package/src/sap/ui/integration/widgets/Card.js +17 -3
  131. package/ui5.yaml +286 -1
@@ -8,18 +8,22 @@ sap.ui.define([
8
8
  "sap/m/Input",
9
9
  "sap/m/Text",
10
10
  "sap/m/MultiComboBox",
11
+ "sap/m/MultiInput",
11
12
  "sap/ui/core/ListItem",
12
13
  "sap/base/util/each",
13
14
  "sap/base/util/restricted/_debounce",
14
15
  "sap/base/util/restricted/_isEqual",
15
16
  "sap/base/util/ObjectPath",
16
17
  "sap/base/util/includes",
18
+ "sap/base/util/merge",
17
19
  "sap/ui/core/SeparatorItem",
18
20
  "sap/ui/core/Core",
19
21
  "sap/ui/model/Sorter",
22
+ "sap/m/Token",
23
+ "sap/m/Tokenizer",
20
24
  "sap/base/util/deepClone"
21
25
  ], function (
22
- BaseField, Input, Text, MultiComboBox, ListItem, each, _debounce, _isEqual, ObjectPath, includes, SeparatorItem, Core, Sorter, deepClone
26
+ BaseField, Input, Text, MultiComboBox, MultiInput, ListItem, each, _debounce, _isEqual, ObjectPath, includes, merge, SeparatorItem, Core, Sorter, Token, Tokenizer, deepClone
23
27
  ) {
24
28
  "use strict";
25
29
  var sDefaultSeperator = "#";
@@ -31,7 +35,7 @@ sap.ui.define([
31
35
  * @alias sap.ui.integration.editor.fields.ListField
32
36
  * @author SAP SE
33
37
  * @since 1.83.0
34
- * @version 1.96.2
38
+ * @version 1.97.0
35
39
  * @private
36
40
  * @experimental since 1.83.0
37
41
  * @ui5-restricted
@@ -47,49 +51,50 @@ sap.ui.define([
47
51
  if (oResourceBundle && oResourceBundle.sLocale !== Core.getConfiguration().getLanguage()) {
48
52
  oResourceBundle = Core.getLibraryResourceBundle("sap.ui.integration");
49
53
  }
50
- var that = this;
54
+ var that = this,
55
+ oItem;
51
56
  var oVisualization = oConfig.visualization;
52
57
  if (!oVisualization) {
53
58
  if (oConfig.values) {
54
- var oItem = this.formatListItem(oConfig.values.item);
55
- oVisualization = {
56
- type: MultiComboBox,
57
- settings: {
58
- selectedKeys: {
59
- path: 'currentSettings>value'
60
- },
61
- busy: { path: 'currentSettings>_loading' },
62
- editable: oConfig.editable,
63
- visible: oConfig.visible,
64
- showSecondaryValues: true,
65
- width: "100%",
66
- items: {
67
- path: "", //empty, because the bindingContext for the undefined model already points to the path
68
- template: oItem,
69
- sorter: [new Sorter({
70
- path: 'Selected',
71
- descending: false,
72
- group: true
73
- })],
74
- groupHeaderFactory: that.getGroupHeader
75
- }
76
- }
77
- };
78
- if (this.isFilterBackend()) {
79
- oVisualization.settings.selectedKeys = {
80
- parts: [
81
- 'currentSettings>value',
82
- 'currentSettings>suggestValue'
83
- ],
84
- formatter: function(sValue, sSuggestValue) {
85
- if (sSuggestValue) {
86
- //set suggest value in the input field of the MultiComboBox
87
- that.setSuggestValue();
59
+ oItem = this.formatListItem(oConfig.values.item);
60
+ oVisualization = {
61
+ type: MultiComboBox,
62
+ settings: {
63
+ selectedKeys: {
64
+ path: 'currentSettings>value'
65
+ },
66
+ busy: { path: 'currentSettings>_loading' },
67
+ editable: oConfig.editable,
68
+ visible: oConfig.visible,
69
+ showSecondaryValues: true,
70
+ width: "100%",
71
+ items: {
72
+ path: "", //empty, because the bindingContext for the undefined model already points to the path
73
+ template: oItem,
74
+ sorter: [new Sorter({
75
+ path: 'Selected',
76
+ descending: false,
77
+ group: true
78
+ })],
79
+ groupHeaderFactory: that.getGroupHeader
88
80
  }
89
- return sValue;
90
81
  }
91
82
  };
92
- }
83
+ if (this.isFilterBackend()) {
84
+ oVisualization.settings.selectedKeys = {
85
+ parts: [
86
+ 'currentSettings>value',
87
+ 'currentSettings>suggestValue'
88
+ ],
89
+ formatter: function(sValue, sSuggestValue) {
90
+ if (sSuggestValue) {
91
+ //set suggest value in the input field of the MultiComboBox
92
+ that.setSuggestValue();
93
+ }
94
+ return sValue;
95
+ }
96
+ };
97
+ }
93
98
  } else {
94
99
  oVisualization = {
95
100
  type: Input,
@@ -111,6 +116,37 @@ sap.ui.define([
111
116
  }
112
117
  };
113
118
  }
119
+ } else if (oConfig.values && this.isFilterBackend() && oVisualization.type === "MultiInput") {
120
+ oItem = this.formatListItem(oConfig.values.item);
121
+ var oSettings = {
122
+ busy: { path: 'currentSettings>_loading' },
123
+ placeholder: oConfig.placeholder,
124
+ editable: oConfig.editable,
125
+ visible: oConfig.visible,
126
+ showSuggestion: true,
127
+ autocomplete: false,
128
+ showValueHelp: false,
129
+ filterSuggests: false,
130
+ width: "100%",
131
+ suggestionItems: {
132
+ path: "", //empty, because the bindingContext for the undefined model already points to the path
133
+ template: oItem,
134
+ sorter: [new Sorter({
135
+ path: 'Selected',
136
+ descending: false,
137
+ group: true
138
+ })],
139
+ groupHeaderFactory: that.getGroupHeader
140
+ }
141
+ };
142
+ if (oVisualization.settings) {
143
+ oSettings = merge(oSettings, oVisualization.settings);
144
+ }
145
+ // use MultiInput for backend filter if visualization.type === "MultiInput"
146
+ oVisualization = {
147
+ type: MultiInput,
148
+ settings: oSettings
149
+ };
114
150
  }
115
151
  this._visualization = oVisualization;
116
152
  this.attachAfterInit(this._afterInit);
@@ -118,24 +154,37 @@ sap.ui.define([
118
154
 
119
155
  ListField.prototype._afterInit = function () {
120
156
  var oControl = this.getAggregation("_field");
121
- if (oControl instanceof MultiComboBox) {
122
- var oConfig = this.getConfiguration();
157
+ var oConfig = this.getConfiguration();
158
+ var oModel = this.getModel();
159
+ if (oConfig.values) {
123
160
  this.prepareFieldsInKey(oConfig);
161
+ }
162
+ if (oControl instanceof MultiComboBox) {
124
163
  if (this.isFilterBackend()) {
125
- this.onInput = _debounce(this.onInput, 500);
164
+ this.onInputForMultiComboBox = _debounce(this.onInputForMultiComboBox, 500);
126
165
  //if need to filter backend by input value, need to hook the onInput function which only support filter locally.
127
- oControl.oninput = this.onInput;
166
+ oControl.oninput = this.onInputForMultiComboBox;
128
167
  //listen to the selectionChange event of MultiComboBox
129
168
  oControl.attachSelectionChange(this.onSelectionChangeForFilterBackend);
130
169
  //listen to the selectionFinish event of MultiComboBox
131
170
  oControl.attachSelectionFinish(this.onSelectionFinish);
132
- var oModel = this.getModel();
133
171
  //merge the previous selected items with new items got from request
134
172
  oModel.attachPropertyChange(this.onPropertyChange, this);
135
173
  } else {
136
174
  //listen to the selectionChange event of MultiComboBox
137
175
  oControl.attachSelectionChange(this.onSelectionChange);
138
176
  }
177
+ } else if (oControl instanceof MultiInput) {
178
+ //init tokens from changes
179
+ this.initTokens();
180
+ this.onInputForMultiInput = _debounce(this.onInputForMultiInput, 500);
181
+ //if need to filter backend by input value, need to hook the onInput function which only support filter locally.
182
+ oControl.oninput = this.onInputForMultiInput;
183
+ //merge the previous selected items with new items got from request
184
+ oModel.attachPropertyChange(this.onPropertyChange, this);
185
+ //init tokens with new items got from request
186
+ oModel.attachPropertyChange(this.initTokens, this);
187
+ oControl.attachTokenChange(this.onTokenChange);
139
188
  }
140
189
  };
141
190
 
@@ -158,6 +207,39 @@ sap.ui.define([
158
207
  }
159
208
  };
160
209
 
210
+ ListField.prototype.initTokens = function() {
211
+ var oControl = this.getAggregation("_field");
212
+ var oConfig = this.getConfiguration();
213
+ var aTokens = [];
214
+ if (Array.isArray(oConfig.valueTokens) && oConfig.valueTokens.length > 0) {
215
+ oConfig.valueTokens.forEach(function (oValueToken) {
216
+ var token = new Token(oValueToken);
217
+ aTokens.push(token);
218
+ });
219
+ } else if (Array.isArray(oConfig.value) && oConfig.value.length > 0 && Array.isArray(oConfig.valueItems) && oConfig.valueItems.length > 0) {
220
+ // backward compatibility for old changes
221
+ // init tokens from valueItems saved by MultiComboBox
222
+ oConfig.valueTokens = [];
223
+ var oValueItemKeys = oConfig.valueItems.map(function (oValueItem) {
224
+ return this.getKeyFromItem(oValueItem);
225
+ }.bind(this));
226
+ oConfig.value.forEach(function (sValuekey) {
227
+ if (includes(oValueItemKeys, sValuekey)) {
228
+ var oSuggestionItem = oControl.getSuggestionItemByKey(sValuekey);
229
+ var sText = oSuggestionItem ? oSuggestionItem.getText() : sValuekey;
230
+ var oItem = {
231
+ key: sValuekey,
232
+ text: sText
233
+ };
234
+ var token = new Token(oItem);
235
+ aTokens.push(token);
236
+ oConfig.valueTokens.push(oItem);
237
+ }
238
+ });
239
+ }
240
+ oControl.setTokens(aTokens);
241
+ };
242
+
161
243
  ListField.prototype.getKeyFromItem = function(oItem) {
162
244
  var sItemKey = "";
163
245
  this._aFields.forEach(function (field) {
@@ -222,7 +304,7 @@ sap.ui.define([
222
304
  //concat the filtered items to the selectedItems list as new data
223
305
  oData = oConfig.valueItems.concat(oNotSelectedItems);
224
306
  var oControl = this.getAggregation("_field");
225
- if (oControl.isOpen()) {
307
+ if (oControl.isOpen && oControl.isOpen()) {
226
308
  aSelectedItemKeys = oConfig.valueItems.map(function (oSelectedItem) {
227
309
  return this.getKeyFromItem(oSelectedItem);
228
310
  }.bind(this));
@@ -262,7 +344,7 @@ sap.ui.define([
262
344
  };
263
345
 
264
346
  ListField.prototype.onSelectionChangeForFilterBackend = function(oEvent) {
265
- var oField = oEvent.oSource.getParent();
347
+ var oField = oEvent.getSource().getParent();
266
348
  var oConfig = oField.getConfiguration();
267
349
  var oListItem = oEvent.getParameter("changedItem");
268
350
  var sChangedItemKey = oListItem.getKey();
@@ -270,16 +352,16 @@ sap.ui.define([
270
352
 
271
353
  //get items in data model
272
354
  var oData = this.getModel().getData();
273
- var sPath = oConfig.values.data.path || "/";
355
+ var sPath = oConfig.values.data.path || "/";
274
356
  var aPath, oItems;
275
- if (sPath !== "/") {
276
- if (sPath.startsWith("/")) {
277
- sPath = sPath.substring(1);
278
- }
279
- if (sPath.endsWith("/")) {
280
- sPath = sPath.substring(0, sPath.length - 1);
281
- }
282
- aPath = sPath.split("/");
357
+ if (sPath !== "/") {
358
+ if (sPath.startsWith("/")) {
359
+ sPath = sPath.substring(1);
360
+ }
361
+ if (sPath.endsWith("/")) {
362
+ sPath = sPath.substring(0, sPath.length - 1);
363
+ }
364
+ aPath = sPath.split("/");
283
365
  oItems = ObjectPath.get(aPath, oData);
284
366
  } else {
285
367
  oItems = oData;
@@ -309,7 +391,7 @@ sap.ui.define([
309
391
  }
310
392
  }
311
393
  oNewItems.push(oNewItem);
312
- });
394
+ });
313
395
  if (aPath !== undefined) {
314
396
  ObjectPath.set(aPath, oNewItems, oData);
315
397
  this.getModel().checkUpdate(true);
@@ -319,6 +401,103 @@ sap.ui.define([
319
401
  }
320
402
  };
321
403
 
404
+ ListField.prototype.onTokenChange = function(oEvent) {
405
+ var oField = this.getParent();
406
+ var oConfig = oField.getConfiguration();
407
+ var oSettingsModel = oField.getModel("currentSettings");
408
+ var sSettingspath = oField.getBindingContext("currentSettings").sPath;
409
+ var aValue = oSettingsModel.getProperty(sSettingspath + "/value");
410
+
411
+ var oToken = oEvent.getParameter("token");
412
+ if (oToken) {
413
+ var sItemKey = oToken.getKey();
414
+ if (!oConfig.valueTokens) {
415
+ oConfig.valueTokens = [];
416
+ }
417
+ if (!aValue) {
418
+ aValue = [];
419
+ }
420
+ //get the change type
421
+ var sChangeType = oEvent.getParameter("type");
422
+ switch (sChangeType) {
423
+ case Tokenizer.TokenChangeType.Removed:
424
+ // remove the item in value
425
+ aValue = aValue.filter(function (value) {
426
+ return value !== sItemKey;
427
+ });
428
+ oConfig.value = aValue;
429
+ // remove the item token
430
+ oConfig.valueTokens = oConfig.valueTokens.filter(function (valueToken) {
431
+ return valueToken.key !== sItemKey;
432
+ });
433
+ break;
434
+ case Tokenizer.TokenChangeType.Added:
435
+ // add the selected item into value
436
+ if (!includes(aValue, sItemKey)) {
437
+ aValue = aValue.concat([sItemKey]);
438
+ oConfig.value = aValue;
439
+ }
440
+ // add the token of the selected item
441
+ var aTokenKeys = oConfig.valueTokens.map(function (oValueToken) {
442
+ return oValueToken.key;
443
+ });
444
+ if (!includes(aTokenKeys, sItemKey)) {
445
+ oConfig.valueTokens = oConfig.valueTokens.concat([{
446
+ "key": sItemKey,
447
+ "text": oToken.getText()
448
+ }]);
449
+ }
450
+ break;
451
+ case Tokenizer.TokenChangeType.RemovedAll :
452
+ oConfig.value = [];
453
+ oConfig.valueItems = [];
454
+ oConfig.valueTokens = [];
455
+ break;
456
+ default:
457
+ break;
458
+ }
459
+ var oData = oField.getModel().getData();
460
+ var oResult;
461
+ var sPath = oConfig.values.data.path || "/";
462
+ var aPath;
463
+ if (sPath !== "/") {
464
+ if (sPath.startsWith("/")) {
465
+ sPath = sPath.substring(1);
466
+ }
467
+ if (sPath.endsWith("/")) {
468
+ sPath = sPath.substring(0, sPath.length - 1);
469
+ }
470
+ aPath = sPath.split("/");
471
+ oResult = deepClone(ObjectPath.get(aPath, oData), 10);
472
+ } else {
473
+ oResult = deepClone(oData, 10);
474
+ }
475
+ if (Array.isArray(oResult)) {
476
+ // update the group in the items popover
477
+ oConfig.valueItems = [];
478
+ oResult.forEach(function (oItem) {
479
+ var sItemKey = oField.getKeyFromItem(oItem);
480
+ if (includes(oConfig.value, sItemKey)) {
481
+ oItem.Selected = oResourceBundle.getText("EDITOR_ITEM_SELECTED");
482
+ oConfig.valueItems.push(oItem);
483
+ } else {
484
+ oItem.Selected = oResourceBundle.getText("EDITOR_ITEM_UNSELECTED");
485
+ }
486
+ });
487
+ if (sPath !== "/") {
488
+ ObjectPath.set(aPath, oResult, oData);
489
+ } else {
490
+ oData = oResult;
491
+ }
492
+ oField.getModel().setData(oData);
493
+ oField.getModel().checkUpdate(true);
494
+ }
495
+ //save the selected keys as field value
496
+ oSettingsModel.setProperty(sSettingspath + "/value", oConfig.value);
497
+ oSettingsModel.setProperty(sSettingspath + "/valueItems", oConfig.valueItems);
498
+ }
499
+ };
500
+
322
501
  ListField.prototype.onSelectionChange = function(oEvent) {
323
502
  var oField = oEvent.oSource.getParent();
324
503
  var oConfig = oField.getConfiguration();
@@ -407,7 +586,7 @@ sap.ui.define([
407
586
  }
408
587
  };
409
588
 
410
- ListField.prototype.onInput = function (oEvent) {
589
+ ListField.prototype.onInputForMultiComboBox = function (oEvent) {
411
590
  //get the suggestion value
412
591
  var sTerm = oEvent.target.value;
413
592
  var sSettingspath = this.getBindingContext("currentSettings").sPath;
@@ -419,5 +598,23 @@ sap.ui.define([
419
598
  oEvent.srcControl._getSuggestionsPopover()._sTypedInValue = sTerm;
420
599
  };
421
600
 
601
+ ListField.prototype.onInputForMultiInput = function (oEvent) {
602
+ var oControl = oEvent.srcControl;
603
+ MultiInput.prototype.oninput.apply(oControl, arguments);
604
+ //get the suggestion value
605
+ var sTerm = oEvent.target.value;
606
+ if (sTerm === "") {
607
+ return;
608
+ }
609
+ var sSettingspath = this.getBindingContext("currentSettings").sPath;
610
+ var oSettingsModel = this.getModel("currentSettings");
611
+ //set the suggestion value into data model property "suggestValue" for filter backend
612
+ var sSuggestValue = oSettingsModel.getProperty(sSettingspath + "/suggestValue");
613
+ if (sSuggestValue !== sTerm.replaceAll("'", "\'\'")) {
614
+ oSettingsModel.setProperty(sSettingspath + "/suggestValue", sTerm.replaceAll("'", "\'\'"));
615
+ oSettingsModel.setProperty(sSettingspath + "/_loading", true);
616
+ }
617
+ };
618
+
422
619
  return ListField;
423
620
  });
@@ -17,7 +17,7 @@ sap.ui.define([
17
17
  * @alias sap.ui.integration.editor.fields.NumberField
18
18
  * @author SAP SE
19
19
  * @since 1.83.0
20
- * @version 1.96.2
20
+ * @version 1.97.0
21
21
  * @private
22
22
  * @experimental since 1.83.0
23
23
  * @ui5-restricted
@@ -19,7 +19,6 @@ sap.ui.define([
19
19
  "sap/m/List",
20
20
  "sap/m/CustomListItem",
21
21
  "sap/m/VBox",
22
- "./viz/IconSelect",
23
22
  "sap/base/util/each",
24
23
  "sap/base/util/restricted/_debounce",
25
24
  "sap/ui/core/Core",
@@ -32,7 +31,7 @@ sap.ui.define([
32
31
  "sap/base/util/merge",
33
32
  "sap/ui/core/CustomData"
34
33
  ], function (
35
- BaseField, Input, Text, Title, Select, ComboBox, Popover, Button, OverflowToolbar, ToolbarSpacer, ListItem, List, CustomListItem, VBox, IconSelect, each, _debounce, Core, JSONModel, EditorResourceBundles, deepClone, Sorter, SeparatorItem, includes, merge, CustomData
34
+ BaseField, Input, Text, Title, Select, ComboBox, Popover, Button, OverflowToolbar, ToolbarSpacer, ListItem, List, CustomListItem, VBox, each, _debounce, Core, JSONModel, EditorResourceBundles, deepClone, Sorter, SeparatorItem, includes, merge, CustomData
36
35
  ) {
37
36
  "use strict";
38
37
  var REGEXP_PARAMETERS = /parameters\.([^\}\}]+)/g;
@@ -48,7 +47,7 @@ sap.ui.define([
48
47
  * @alias sap.ui.integration.editor.fields.StringField
49
48
  * @author SAP SE
50
49
  * @since 1.83.0
51
- * @version 1.96.2
50
+ * @version 1.97.0
52
51
  * @private
53
52
  * @experimental since 1.83.0
54
53
  * @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.96.2
24
+ * @version 1.97.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.96.2
29
+ * @version 1.97.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.96.2
24
+ * @version 1.97.0
25
25
  * @private
26
26
  * @experimental since 1.84.0
27
27
  * @ui5-restricted
@@ -19,7 +19,7 @@ sap.ui.define([
19
19
  // delegate further initialization of this library to the Core
20
20
  sap.ui.getCore().initLibrary({
21
21
  name: "sap.ui.integration",
22
- version: "1.96.2",
22
+ version: "1.97.0",
23
23
  dependencies: ["sap.ui.core", "sap.f", "sap.m"],
24
24
  types: [
25
25
  "sap.ui.integration.CardActionType",
@@ -48,7 +48,7 @@ sap.ui.define([
48
48
  * @namespace
49
49
  * @alias sap.ui.integration
50
50
  * @author SAP SE
51
- * @version 1.96.2
51
+ * @version 1.97.0
52
52
  * @since 1.62
53
53
  * @public
54
54
  */