@ui5/webcomponents 0.0.0-db2be6526 → 0.0.0-dc3ccac50

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 (205) hide show
  1. package/csp.js +7 -0
  2. package/dist/CheckBox.js +4 -0
  3. package/dist/ColorPalettePopover.js +0 -1
  4. package/dist/ColorPicker.js +1 -1
  5. package/dist/ComboBox.js +31 -1
  6. package/dist/DateTimePicker.js +2 -1
  7. package/dist/DayPicker.js +5 -0
  8. package/dist/FileUploader.js +14 -0
  9. package/dist/Icon.js +1 -0
  10. package/dist/Input.js +68 -18
  11. package/dist/List.js +2 -2
  12. package/dist/MultiComboBox.js +32 -7
  13. package/dist/MultiComboBoxItem.js +4 -10
  14. package/dist/Option.js +4 -10
  15. package/dist/Popup.js +2 -7
  16. package/dist/RangeSlider.js +1 -1
  17. package/dist/Select.js +27 -8
  18. package/dist/SliderBase.js +2 -1
  19. package/dist/Switch.js +4 -0
  20. package/dist/Tab.js +26 -12
  21. package/dist/TabContainer.js +5 -8
  22. package/dist/Table.js +2 -1
  23. package/dist/TableRow.js +1 -1
  24. package/dist/TextArea.js +14 -0
  25. package/dist/Token.js +21 -1
  26. package/dist/Tokenizer.js +4 -1
  27. package/dist/WheelSlider.js +9 -9
  28. package/dist/api.json +14 -28
  29. package/dist/features/InputSuggestions.js +100 -15
  30. package/dist/generated/assets/themes/sap_belize/parameters-bundle.css.json +1 -1
  31. package/dist/generated/assets/themes/sap_belize_hcb/parameters-bundle.css.json +1 -1
  32. package/dist/generated/assets/themes/sap_belize_hcw/parameters-bundle.css.json +1 -1
  33. package/dist/generated/assets/themes/sap_fiori_3/parameters-bundle.css.json +1 -1
  34. package/dist/generated/assets/themes/sap_fiori_3_dark/parameters-bundle.css.json +1 -1
  35. package/dist/generated/assets/themes/sap_fiori_3_hcb/parameters-bundle.css.json +1 -1
  36. package/dist/generated/assets/themes/sap_fiori_3_hcw/parameters-bundle.css.json +1 -1
  37. package/dist/generated/assets/themes/sap_horizon/parameters-bundle.css.json +1 -1
  38. package/dist/generated/assets/themes/sap_horizon_exp/parameters-bundle.css.json +1 -1
  39. package/dist/generated/templates/ComboBoxPopoverTemplate.lit.js +3 -3
  40. package/dist/generated/templates/ComboBoxTemplate.lit.js +4 -3
  41. package/dist/generated/templates/CustomListItemTemplate.lit.js +1 -1
  42. package/dist/generated/templates/FileUploaderPopoverTemplate.lit.js +1 -1
  43. package/dist/generated/templates/GroupHeaderListItemTemplate.lit.js +1 -1
  44. package/dist/generated/templates/InputPopoverTemplate.lit.js +3 -3
  45. package/dist/generated/templates/InputTemplate.lit.js +6 -5
  46. package/dist/generated/templates/ListItemTemplate.lit.js +1 -1
  47. package/dist/generated/templates/ListTemplate.lit.js +1 -1
  48. package/dist/generated/templates/MultiComboBoxPopoverTemplate.lit.js +4 -4
  49. package/dist/generated/templates/MultiComboBoxTemplate.lit.js +4 -3
  50. package/dist/generated/templates/MultiInputTemplate.lit.js +7 -6
  51. package/dist/generated/templates/SelectPopoverTemplate.lit.js +3 -3
  52. package/dist/generated/templates/SliderTemplate.lit.js +1 -1
  53. package/dist/generated/templates/StandardListItemTemplate.lit.js +1 -1
  54. package/dist/generated/templates/SuggestionListItemTemplate.lit.js +1 -1
  55. package/dist/generated/templates/SwitchTemplate.lit.js +3 -1
  56. package/dist/generated/templates/TabContainerPopoverTemplate.lit.js +1 -1
  57. package/dist/generated/templates/TabContainerTemplate.lit.js +1 -1
  58. package/dist/generated/templates/TabInStripTemplate.lit.js +2 -4
  59. package/dist/generated/templates/TextAreaPopoverTemplate.lit.js +1 -1
  60. package/dist/generated/templates/TokenTemplate.lit.js +1 -1
  61. package/dist/generated/templates/TreeListItemTemplate.lit.js +1 -1
  62. package/dist/generated/themes/Avatar.css.js +1 -1
  63. package/dist/generated/themes/AvatarGroup.css.js +1 -1
  64. package/dist/generated/themes/Badge.css.js +1 -1
  65. package/dist/generated/themes/Breadcrumbs.css.js +1 -1
  66. package/dist/generated/themes/BreadcrumbsPopover.css.js +1 -1
  67. package/dist/generated/themes/BrowserScrollbar.css.js +1 -1
  68. package/dist/generated/themes/BusyIndicator.css.js +1 -1
  69. package/dist/generated/themes/Button.css.js +1 -1
  70. package/dist/generated/themes/Button.ie11.css.js +1 -1
  71. package/dist/generated/themes/Calendar.css.js +1 -1
  72. package/dist/generated/themes/CalendarHeader.css.js +1 -1
  73. package/dist/generated/themes/Card.css.js +1 -1
  74. package/dist/generated/themes/CardHeader.css.js +1 -1
  75. package/dist/generated/themes/Carousel.css.js +1 -1
  76. package/dist/generated/themes/CheckBox.css.js +1 -1
  77. package/dist/generated/themes/ColorPalette.css.js +1 -1
  78. package/dist/generated/themes/ColorPaletteItem.css.js +1 -1
  79. package/dist/generated/themes/ColorPalettePopover.css.js +1 -1
  80. package/dist/generated/themes/ColorPaletteStaticArea.css.js +1 -1
  81. package/dist/generated/themes/ColorPicker.css.js +1 -1
  82. package/dist/generated/themes/ComboBox.css.js +1 -1
  83. package/dist/generated/themes/ComboBoxPopover.css.js +1 -1
  84. package/dist/generated/themes/CustomListItem.css.js +1 -1
  85. package/dist/generated/themes/DatePicker.css.js +1 -1
  86. package/dist/generated/themes/DatePickerPopover.css.js +1 -1
  87. package/dist/generated/themes/DateRangePicker.css.js +1 -1
  88. package/dist/generated/themes/DateTimePicker.css.js +1 -1
  89. package/dist/generated/themes/DateTimePickerPopover.css.js +1 -1
  90. package/dist/generated/themes/DayPicker.css.js +1 -1
  91. package/dist/generated/themes/Dialog.css.js +1 -1
  92. package/dist/generated/themes/FileUploader.css.js +1 -1
  93. package/dist/generated/themes/GroupHeaderListItem.css.js +1 -1
  94. package/dist/generated/themes/GrowingButton.css.js +1 -1
  95. package/dist/generated/themes/Icon.css.js +1 -1
  96. package/dist/generated/themes/Input.css.js +1 -1
  97. package/dist/generated/themes/InputIcon.css.js +1 -1
  98. package/dist/generated/themes/InvisibleTextStyles.css.js +1 -1
  99. package/dist/generated/themes/Label.css.js +1 -1
  100. package/dist/generated/themes/Link.css.js +1 -1
  101. package/dist/generated/themes/List.css.js +1 -1
  102. package/dist/generated/themes/ListItem.css.js +1 -1
  103. package/dist/generated/themes/ListItemBase.css.js +1 -1
  104. package/dist/generated/themes/MessageStrip.css.js +1 -1
  105. package/dist/generated/themes/MonthPicker.css.js +1 -1
  106. package/dist/generated/themes/MultiComboBox.css.js +1 -1
  107. package/dist/generated/themes/MultiInput.css.js +1 -1
  108. package/dist/generated/themes/Panel.css.js +1 -1
  109. package/dist/generated/themes/Popover.css.js +1 -1
  110. package/dist/generated/themes/Popup.css.js +1 -1
  111. package/dist/generated/themes/PopupGlobal.css.js +8 -0
  112. package/dist/generated/themes/PopupStaticAreaStyles.css.js +1 -1
  113. package/dist/generated/themes/PopupsCommon.css.js +1 -1
  114. package/dist/generated/themes/ProgressIndicator.css.js +1 -1
  115. package/dist/generated/themes/RadioButton.css.js +1 -1
  116. package/dist/generated/themes/RatingIndicator.css.js +1 -1
  117. package/dist/generated/themes/ResponsivePopover.css.js +1 -1
  118. package/dist/generated/themes/ResponsivePopoverCommon.css.js +1 -1
  119. package/dist/generated/themes/SegmentedButton.css.js +1 -1
  120. package/dist/generated/themes/Select.css.js +1 -1
  121. package/dist/generated/themes/SelectPopover.css.js +1 -1
  122. package/dist/generated/themes/SliderBase.css.js +1 -1
  123. package/dist/generated/themes/StepInput.css.js +1 -1
  124. package/dist/generated/themes/Suggestions.css.js +8 -0
  125. package/dist/generated/themes/Switch.css.js +1 -1
  126. package/dist/generated/themes/Tab.css.js +1 -1
  127. package/dist/generated/themes/TabContainer.css.js +1 -1
  128. package/dist/generated/themes/TabInOverflow.css.js +1 -1
  129. package/dist/generated/themes/TabInStrip.css.js +1 -1
  130. package/dist/generated/themes/Table.css.js +1 -1
  131. package/dist/generated/themes/TableCell.css.js +1 -1
  132. package/dist/generated/themes/TableColumn.css.js +1 -1
  133. package/dist/generated/themes/TableGroupRow.css.js +1 -1
  134. package/dist/generated/themes/TableRow.css.js +1 -1
  135. package/dist/generated/themes/TapHighlightColor.css.js +1 -1
  136. package/dist/generated/themes/TextArea.css.js +1 -1
  137. package/dist/generated/themes/TimePicker.css.js +1 -1
  138. package/dist/generated/themes/TimePickerPopover.css.js +1 -1
  139. package/dist/generated/themes/TimeSelection.css.js +1 -1
  140. package/dist/generated/themes/Title.css.js +1 -1
  141. package/dist/generated/themes/Toast.css.js +1 -1
  142. package/dist/generated/themes/ToggleButton.css.js +1 -1
  143. package/dist/generated/themes/ToggleButton.ie11.css.js +1 -1
  144. package/dist/generated/themes/Token.css.js +1 -1
  145. package/dist/generated/themes/Tokenizer.css.js +1 -1
  146. package/dist/generated/themes/Tree.css.js +1 -1
  147. package/dist/generated/themes/TreeListItem.css.js +1 -1
  148. package/dist/generated/themes/ValueStateMessage.css.js +1 -1
  149. package/dist/generated/themes/WheelSlider.css.js +1 -1
  150. package/dist/generated/themes/YearPicker.css.js +1 -1
  151. package/dist/generated/themes/sap_belize/parameters-bundle.css.js +1 -1
  152. package/dist/generated/themes/sap_belize_hcb/parameters-bundle.css.js +1 -1
  153. package/dist/generated/themes/sap_belize_hcw/parameters-bundle.css.js +1 -1
  154. package/dist/generated/themes/sap_fiori_3/parameters-bundle.css.js +1 -1
  155. package/dist/generated/themes/sap_fiori_3_dark/parameters-bundle.css.js +1 -1
  156. package/dist/generated/themes/sap_fiori_3_hcb/parameters-bundle.css.js +1 -1
  157. package/dist/generated/themes/sap_fiori_3_hcw/parameters-bundle.css.js +1 -1
  158. package/dist/generated/themes/sap_horizon/parameters-bundle.css.js +1 -1
  159. package/dist/generated/themes/sap_horizon_exp/parameters-bundle.css.js +1 -1
  160. package/package.json +8 -8
  161. package/src/CheckBox.js +4 -0
  162. package/src/ColorPalettePopover.js +0 -1
  163. package/src/ColorPicker.js +1 -1
  164. package/src/ComboBox.hbs +4 -0
  165. package/src/ComboBox.js +31 -1
  166. package/src/ComboBoxPopover.hbs +3 -0
  167. package/src/DateTimePicker.js +2 -1
  168. package/src/DayPicker.js +5 -0
  169. package/src/FileUploader.js +14 -0
  170. package/src/FileUploaderPopover.hbs +1 -0
  171. package/src/GroupHeaderListItem.hbs +1 -0
  172. package/src/Icon.js +1 -0
  173. package/src/Input.hbs +4 -0
  174. package/src/Input.js +68 -18
  175. package/src/InputPopover.hbs +4 -1
  176. package/src/List.hbs +1 -1
  177. package/src/List.js +2 -2
  178. package/src/ListItem.hbs +1 -0
  179. package/src/MultiComboBox.hbs +4 -0
  180. package/src/MultiComboBox.js +32 -7
  181. package/src/MultiComboBoxItem.js +4 -10
  182. package/src/MultiComboBoxPopover.hbs +4 -1
  183. package/src/Option.js +4 -10
  184. package/src/Popup.js +2 -7
  185. package/src/RangeSlider.js +1 -1
  186. package/src/Select.js +27 -8
  187. package/src/SelectPopover.hbs +4 -1
  188. package/src/Slider.hbs +1 -1
  189. package/src/SliderBase.js +2 -1
  190. package/src/Switch.hbs +12 -2
  191. package/src/Switch.js +4 -0
  192. package/src/Tab.js +26 -12
  193. package/src/TabContainer.hbs +6 -1
  194. package/src/TabContainer.js +5 -8
  195. package/src/TabContainerPopover.hbs +1 -0
  196. package/src/TabInStrip.hbs +1 -5
  197. package/src/Table.js +2 -1
  198. package/src/TableRow.js +1 -1
  199. package/src/TextArea.js +14 -0
  200. package/src/TextAreaPopover.hbs +1 -0
  201. package/src/Token.hbs +2 -0
  202. package/src/Token.js +21 -1
  203. package/src/Tokenizer.js +4 -1
  204. package/src/WheelSlider.js +9 -9
  205. package/src/features/InputSuggestions.js +100 -15
package/dist/Switch.js CHANGED
@@ -201,6 +201,10 @@ class Switch extends UI5Element {
201
201
  return this.design === SwitchDesign.Graphical;
202
202
  }
203
203
 
204
+ get hasNoLabel() {
205
+ return !(this.graphical || this.textOn || this.textOff);
206
+ }
207
+
204
208
  get _textOn() {
205
209
  return this.graphical ? "" : this.textOn;
206
210
  }
package/dist/Tab.js CHANGED
@@ -102,16 +102,6 @@ const metadata = {
102
102
  defaultValue: SemanticColor.Default,
103
103
  },
104
104
 
105
- /**
106
- * Defines the stable selector that you can use via getStableDomRef method.
107
- * @public
108
- * @type {string}
109
- * @since 1.0.0-rc.8
110
- */
111
- stableDomRef: {
112
- type: String,
113
- },
114
-
115
105
  /**
116
106
  * Specifies if the component is selected.
117
107
  *
@@ -179,6 +169,16 @@ class Tab extends UI5Element {
179
169
  ];
180
170
  }
181
171
 
172
+ get displayText() {
173
+ let text = this.text;
174
+
175
+ if (this._isInline && this.additionalText) {
176
+ text += ` (${this.additionalText})`;
177
+ }
178
+
179
+ return text;
180
+ }
181
+
182
182
  get isSeparator() {
183
183
  return false;
184
184
  }
@@ -191,6 +191,22 @@ class Tab extends UI5Element {
191
191
  return executeTemplate(this.constructor.overflowTemplate, this);
192
192
  }
193
193
 
194
+ get stableDomRef() {
195
+ return `${this._id}-stable-dom-ref`;
196
+ }
197
+
198
+ /**
199
+ * Returns the DOM reference of the tab that is placed in the header.
200
+ * <b>Note:</b> If you need a DOM ref to the tab content please use the <code>getDomRef</code> method.
201
+ *
202
+ * @function
203
+ * @public
204
+ * @since 1.0.0-rc.16
205
+ */
206
+ getTabInStripDomRef() {
207
+ return this._getTabInStripDomRef;
208
+ }
209
+
194
210
  getFocusDomRef() {
195
211
  let focusedDomRef = super.getFocusDomRef();
196
212
 
@@ -256,8 +272,6 @@ class Tab extends UI5Element {
256
272
 
257
273
  if (this._isInline) {
258
274
  classes.push("ui5-tab-strip-item--inline");
259
- } else {
260
- classes.push("ui5-tab-strip-item--standard");
261
275
  }
262
276
 
263
277
  if (this.additionalText) {
@@ -235,14 +235,6 @@ const metadata = {
235
235
  * <li><code>ui5-tab-separator</code> - used to separate tabs with a vertical line</li>
236
236
  * </ul>
237
237
  *
238
- * <h3>Stable DOM Refs</h3>
239
- *
240
- * In the context of <code>ui5-tabcontainer</code>, you can provide a custom stable DOM refs for:
241
- * <ul>
242
- * <li>Each <code>ui5-tab</code>
243
- * Example: <code><ui5-tab stable-dom-ref="in-stock"></ui5-tab></code></li>
244
- * </ul>
245
- *
246
238
  * <h3>ES6 Module Import</h3>
247
239
  *
248
240
  * <code>import "@ui5/webcomponents/dist/TabContainer";</code>
@@ -318,6 +310,7 @@ class TabContainer extends UI5Element {
318
310
  return this.getDomRef().querySelector(`#${item._id}`);
319
311
  };
320
312
  item._itemSelectCallback = this._onItemSelect.bind(this);
313
+ item._getRealDomRef = () => this.getDomRef().querySelector(`*[data-ui5-stable=${item.stableDomRef}]`);
321
314
  });
322
315
 
323
316
  if (!this._animationRunning) {
@@ -328,6 +321,10 @@ class TabContainer extends UI5Element {
328
321
  onAfterRendering() {
329
322
  this._scrollEnablement.scrollContainer = this._getHeaderScrollContainer();
330
323
  this._updateScrolling();
324
+
325
+ this.items.forEach(item => {
326
+ item._getTabInStripDomRef = this.getDomRef().querySelector(`*[data-ui5-stable="${item.stableDomRef}"]`);
327
+ });
331
328
  }
332
329
 
333
330
  onEnterDOM() {
package/dist/Table.js CHANGED
@@ -12,6 +12,7 @@ import isElementInView from "@ui5/webcomponents-base/dist/util/isElementInView.j
12
12
  import TableGrowingMode from "./types/TableGrowingMode.js";
13
13
  import BusyIndicator from "./BusyIndicator.js";
14
14
  import TableMode from "./types/TableMode.js";
15
+ import CheckBox from "./CheckBox.js"; // Ensure the dependency as it is being used in the renderer
15
16
 
16
17
  // Texts
17
18
  import {
@@ -399,7 +400,7 @@ class Table extends UI5Element {
399
400
  }
400
401
 
401
402
  static get dependencies() {
402
- return [BusyIndicator];
403
+ return [BusyIndicator, CheckBox];
403
404
  }
404
405
 
405
406
  static async onDefine() {
package/dist/TableRow.js CHANGED
@@ -277,7 +277,7 @@ class TableRow extends UI5Element {
277
277
 
278
278
  get shouldPopin() {
279
279
  return this._columnsInfo.filter(el => {
280
- return el.demandPopin;
280
+ return el.demandPopin || !el.visible;
281
281
  }).length;
282
282
  }
283
283
 
package/dist/TextArea.js CHANGED
@@ -655,6 +655,20 @@ class TextArea extends UI5Element {
655
655
  return this.valueStateTextMappings()[this.valueState];
656
656
  }
657
657
 
658
+ /**
659
+ * This method is relevant for sap_horizon theme only
660
+ */
661
+ get _valueStateMessageIcon() {
662
+ const iconPerValueState = {
663
+ Error: "error",
664
+ Warning: "alert",
665
+ Success: "sys-enter-2",
666
+ Information: "information",
667
+ };
668
+
669
+ return this.valueState !== ValueState.None ? iconPerValueState[this.valueState] : "";
670
+ }
671
+
658
672
  valueStateTextMappings() {
659
673
  return {
660
674
  "Information": TextArea.i18nBundle.getText(VALUE_STATE_INFORMATION),
package/dist/Token.js CHANGED
@@ -61,6 +61,14 @@ const metadata = {
61
61
  */
62
62
  selected: { type: Boolean },
63
63
 
64
+ /**
65
+ * Defines whether the component is focused or not.
66
+ *
67
+ * @type {boolean}
68
+ * @private
69
+ */
70
+ focused: { type: Boolean },
71
+
64
72
  /**
65
73
  * Defines the tabIndex of the component.
66
74
  * @type {string}
@@ -153,6 +161,14 @@ class Token extends UI5Element {
153
161
  this.fireEvent("select");
154
162
  }
155
163
 
164
+ _focusin() {
165
+ this.focused = true;
166
+ }
167
+
168
+ _focusout() {
169
+ this.focused = !this.focused;
170
+ }
171
+
156
172
  _delete() {
157
173
  this.fireEvent("delete");
158
174
  }
@@ -182,7 +198,11 @@ class Token extends UI5Element {
182
198
  }
183
199
 
184
200
  get iconURI() {
185
- return getTheme() === "sap_fiori_3" ? "decline" : "sys-cancel";
201
+ if (getTheme().includes("sap_belize")) {
202
+ return "sys-cancel";
203
+ }
204
+
205
+ return "decline";
186
206
  }
187
207
 
188
208
  static get dependencies() {
package/dist/Tokenizer.js CHANGED
@@ -27,6 +27,9 @@ import styles from "./generated/themes/Tokenizer.css.js";
27
27
  import ResponsivePopoverCommonCss from "./generated/themes/ResponsivePopoverCommon.css.js";
28
28
  import ValueStateMessageCss from "./generated/themes/ValueStateMessage.css.js";
29
29
 
30
+ // reuse suggestions focus styling for NMore popup
31
+ import SuggestionsCss from "./generated/themes/Suggestions.css.js";
32
+
30
33
  /**
31
34
  * @public
32
35
  */
@@ -125,7 +128,7 @@ class Tokenizer extends UI5Element {
125
128
  }
126
129
 
127
130
  static get staticAreaStyles() {
128
- return [ResponsivePopoverCommonCss, ValueStateMessageCss];
131
+ return [ResponsivePopoverCommonCss, ValueStateMessageCss, SuggestionsCss];
129
132
  }
130
133
 
131
134
  static get staticAreaTemplate() {
@@ -397,25 +397,25 @@ class WheelSlider extends UI5Element {
397
397
  this._selectElementByIndex(nextElementIndex);
398
398
  }
399
399
 
400
- _onkeydown(е) {
400
+ _onkeydown(e) {
401
401
  if (!this.expanded) {
402
402
  return;
403
403
  }
404
404
 
405
- if (isUp(е)) {
406
- this._onArrowUp(е);
405
+ if (isUp(e)) {
406
+ this._onArrowUp(e);
407
407
  }
408
408
 
409
- if (isDown(е)) {
410
- this._onArrowDown(е);
409
+ if (isDown(e)) {
410
+ this._onArrowDown(e);
411
411
  }
412
412
 
413
- if (isPageDown(е)) {
414
- this._selectLimitCell(е, false);
413
+ if (isPageDown(e)) {
414
+ this._selectLimitCell(e, false);
415
415
  }
416
416
 
417
- if (isPageUp(е)) {
418
- this._selectLimitCell(е, true);
417
+ if (isPageUp(e)) {
418
+ this._selectLimitCell(e, true);
419
419
  }
420
420
  }
421
421
 
package/dist/api.json CHANGED
@@ -951,8 +951,7 @@
951
951
  "name": "defaultColor",
952
952
  "visibility": "public",
953
953
  "type": "CSSColor",
954
- "description": "Defines the default color of the component. <b>Note:</b> The default color should be a part of the ColorPalette colors</code>",
955
- "defaultValue": "\"\""
954
+ "description": "Defines the default color of the component. <b>Note:</b> The default color should be a part of the ColorPalette colors</code>"
956
955
  },
957
956
  {
958
957
  "name": "showDefaultColor",
@@ -1019,7 +1018,7 @@
1019
1018
  {
1020
1019
  "name": "color",
1021
1020
  "visibility": "public",
1022
- "type": "String",
1021
+ "type": "CSSColor",
1023
1022
  "description": "Defines the currently selected color of the component. <br><br> <b>Note</b>: use HEX, RGB, RGBA, HSV formats or a CSS color name when modifying this property."
1024
1023
  }
1025
1024
  ],
@@ -2477,7 +2476,7 @@
2477
2476
  "static": true,
2478
2477
  "visibility": "public",
2479
2478
  "extends": "UI5Element",
2480
- "description": "<h3 class=\"comment-api-title\">Overview</h3>\n\nThe <code>ui5-list</code> component allows displaying a list of items, advanced keyboard handling support for navigating between items, and predefined modes to improve the development efficiency. <br><br> The <code>ui5-list</code> is а container for the available list items: <ul> <li><code>ui5-li</code></li> <li><code>ui5-li-custom</code></li> <li><code>ui5-li-groupheader</code></li> </ul> <br><br> To benefit from the built-in selection mechanism, you can use the available selection modes, such as <code>SingleSelect</code>, <code>MultiSelect</code> and <code>Delete</code>. <br><br> Additionally, the <code>ui5-list</code> provides header, footer, and customization for the list item separators.\n\n<br><br> <h3>Keyboard Handling</h3> The <code>ui5-list</code> provides advanced keyboard handling. When a list is focused the user can use the following keyboard shortcuts in order to perform a navigation: <br>\n\n<ul> <li>[UP/DOWN] - Navigates up and down the items</li> <li>[HOME] - Navigates to first item</li> <li>[END] - Navigates to the last item</li> </ul>\n\nThe user can use the following keyboard shortcuts to perform actions (such as select, delete), when the <code>mode</code> property is in use: <ul> <li>[SPACE] - Select an item (if <code>type</code> is 'Active') when <code>mode</code> is selection</li> <li>[DELETE] - Delete an item if <code>mode</code> property is <code>Delete</code></li> </ul> <br><br>\n\n<h3>ES6 Module Import</h3>\n\n<code>import \"@ui5/webcomponents/dist/List.js\";</code> <br> <code>import \"@ui5/webcomponents/dist/StandardListItem.js\";</code> (for <code>ui5-li</code>) <br> <code>import \"@ui5/webcomponents/dist/CustomListItem.js\";</code> (for <code>ui5-li-custom</code>) <br> <code>import \"@ui5/webcomponents/dist/GroupHeaderListItem.js\";</code> (for <code>ui5-li-groupheader</code>)",
2479
+ "description": "<h3 class=\"comment-api-title\">Overview</h3>\n\nThe <code>ui5-list</code> component allows displaying a list of items, advanced keyboard handling support for navigating between items, and predefined modes to improve the development efficiency. <br><br> The <code>ui5-list</code> is a container for the available list items: <ul> <li><code>ui5-li</code></li> <li><code>ui5-li-custom</code></li> <li><code>ui5-li-groupheader</code></li> </ul> <br><br> To benefit from the built-in selection mechanism, you can use the available selection modes, such as <code>SingleSelect</code>, <code>MultiSelect</code> and <code>Delete</code>. <br><br> Additionally, the <code>ui5-list</code> provides header, footer, and customization for the list item separators.\n\n<br><br> <h3>Keyboard Handling</h3> The <code>ui5-list</code> provides advanced keyboard handling. When a list is focused the user can use the following keyboard shortcuts in order to perform a navigation: <br>\n\n<ul> <li>[UP/DOWN] - Navigates up and down the items</li> <li>[HOME] - Navigates to first item</li> <li>[END] - Navigates to the last item</li> </ul>\n\nThe user can use the following keyboard shortcuts to perform actions (such as select, delete), when the <code>mode</code> property is in use: <ul> <li>[SPACE] - Select an item (if <code>type</code> is 'Active') when <code>mode</code> is selection</li> <li>[DELETE] - Delete an item if <code>mode</code> property is <code>Delete</code></li> </ul> <br><br>\n\n<h3>ES6 Module Import</h3>\n\n<code>import \"@ui5/webcomponents/dist/List.js\";</code> <br> <code>import \"@ui5/webcomponents/dist/StandardListItem.js\";</code> (for <code>ui5-li</code>) <br> <code>import \"@ui5/webcomponents/dist/CustomListItem.js\";</code> (for <code>ui5-li-custom</code>) <br> <code>import \"@ui5/webcomponents/dist/GroupHeaderListItem.js\";</code> (for <code>ui5-li-groupheader</code>)",
2481
2480
  "constructor": { "visibility": "public" },
2482
2481
  "properties": [
2483
2482
  {
@@ -2840,7 +2839,7 @@
2840
2839
  "visibility": "public",
2841
2840
  "since": "0.11.0",
2842
2841
  "extends": "UI5Element",
2843
- "description": "<h3 class=\"comment-api-title\">Overview</h3>\n\nThe <code>ui5-multi-combobox</code> component consists of a list box with items and a text field allowing the user to either type a value directly into the text field, or choose from the list of existing items.\n\nThe drop-down list is used for selecting and filtering values, it enables users to select one or more options from a predefined list. The control provides an editable input field to filter the list, and a dropdown arrow to expand/collapse the list of available options. The options in the list have checkboxes that permit multi-selection. Entered values are displayed as tokens. <h3>Structure</h3> The <code>ui5-multi-combobox</code> consists of the following elements: <ul> <li> Tokenizer - a list of tokens with selected options. <li> Input field - displays the selected option/s as token/s. Users can type to filter the list. <li> Drop-down arrow - expands\\collapses the option list.</li> <li> Option list - the list of available options.</li> </ul> <h3>Keyboard Handling</h3>\n\nThe <code>ui5-multi-combobox</code> provides advanced keyboard handling.\n\n<h4>Picker</h4> If the <code>ui5-multi-combobox</code> is focused, you can open or close the drop-down by pressing <code>F4</code>, <code>ALT+UP</code> or <code>ALT+DOWN</code> keys. Once the drop-down is opened, you can use the <code>UP</code> and <code>DOWN</code> arrow keys to navigate through the available options and select one by pressing the <code>Space</code> or <code>Enter</code> keys. <br>\n\n<h4>Tokens</h4> <ul> <li> Left/Right arrow keys - moves the focus selection form the currently focused token to the previous/next one (if available). </li> <li> Delete - deletes the token and focuses the previous token. </li> <li> Backspace - deletes the token and focus the next token. </li> </ul>\n\nIn the context of <code>ui5-multi-combobox</code>, you can provide a custom stable DOM ref for: <ul> <li>Every <code>ui5-mcb-item</code> that you provide. Example: <code>&lt;ui5-mcb-item stable-dom-ref=\"item1\"&gt;&lt;/ui5-mcb-item&gt;</code></li> </ul>\n\n<h3>CSS Shadow Parts</h3>\n\n<ui5-link target=\"_blank\" href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/::part\">CSS Shadow Parts</ui5-link> allow developers to style elements inside the Shadow DOM. <br> The <code>ui5-multi-combobox</code> exposes the following CSS Shadow Parts: <ul> <li>token-{index} - Used to style each token(where <code>token-0</code> corresponds to the first item)</li> </ul>\n\n<h3>ES6 Module Import</h3>\n\n<code>import \"@ui5/webcomponents/dist/MultiComboBox\";</code>",
2842
+ "description": "<h3 class=\"comment-api-title\">Overview</h3>\n\nThe <code>ui5-multi-combobox</code> component consists of a list box with items and a text field allowing the user to either type a value directly into the text field, or choose from the list of existing items.\n\nThe drop-down list is used for selecting and filtering values, it enables users to select one or more options from a predefined list. The control provides an editable input field to filter the list, and a dropdown arrow to expand/collapse the list of available options. The options in the list have checkboxes that permit multi-selection. Entered values are displayed as tokens. <h3>Structure</h3> The <code>ui5-multi-combobox</code> consists of the following elements: <ul> <li> Tokenizer - a list of tokens with selected options. <li> Input field - displays the selected option/s as token/s. Users can type to filter the list. <li> Drop-down arrow - expands\\collapses the option list.</li> <li> Option list - the list of available options.</li> </ul> <h3>Keyboard Handling</h3>\n\nThe <code>ui5-multi-combobox</code> provides advanced keyboard handling.\n\n<h4>Picker</h4> If the <code>ui5-multi-combobox</code> is focused, you can open or close the drop-down by pressing <code>F4</code>, <code>ALT+UP</code> or <code>ALT+DOWN</code> keys. Once the drop-down is opened, you can use the <code>UP</code> and <code>DOWN</code> arrow keys to navigate through the available options and select one by pressing the <code>Space</code> or <code>Enter</code> keys. <br>\n\n<h4>Tokens</h4> <ul> <li> Left/Right arrow keys - moves the focus selection form the currently focused token to the previous/next one (if available). </li> <li> Delete - deletes the token and focuses the previous token. </li> <li> Backspace - deletes the token and focus the next token. </li> </ul>\n\n<h3>CSS Shadow Parts</h3>\n\n<ui5-link target=\"_blank\" href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/::part\">CSS Shadow Parts</ui5-link> allow developers to style elements inside the Shadow DOM. <br> The <code>ui5-multi-combobox</code> exposes the following CSS Shadow Parts: <ul> <li>token-{index} - Used to style each token(where <code>token-0</code> corresponds to the first item)</li> </ul>\n\n<h3>ES6 Module Import</h3>\n\n<code>import \"@ui5/webcomponents/dist/MultiComboBox\";</code>",
2844
2843
  "constructor": { "visibility": "public" },
2845
2844
  "properties": [
2846
2845
  {
@@ -2980,13 +2979,6 @@
2980
2979
  "type": "boolean",
2981
2980
  "description": "Defines the selected state of the component.",
2982
2981
  "defaultValue": "false"
2983
- },
2984
- {
2985
- "name": "stableDomRef",
2986
- "visibility": "public",
2987
- "since": "1.0.0-rc.11",
2988
- "type": "string",
2989
- "description": "Defines the stable selector that you can use via getStableDomRef method."
2990
2982
  }
2991
2983
  ],
2992
2984
  "slots": []
@@ -3077,13 +3069,6 @@
3077
3069
  "description": "Defines the selected state of the component.",
3078
3070
  "defaultValue": "false"
3079
3071
  },
3080
- {
3081
- "name": "stableDomRef",
3082
- "visibility": "public",
3083
- "since": "1.0.0-rc.11",
3084
- "type": "string",
3085
- "description": "Defines the stable selector that you can use via getStableDomRef method."
3086
- },
3087
3072
  {
3088
3073
  "name": "value",
3089
3074
  "visibility": "public",
@@ -3837,7 +3822,7 @@
3837
3822
  "visibility": "public",
3838
3823
  "since": "0.8.0",
3839
3824
  "extends": "sap.ui.webcomponents.base.UI5Element",
3840
- "description": "<h3 class=\"comment-api-title\">Overview</h3> The <code>ui5-select</code> component is used to create a drop-down list. The items inside the <code>ui5-select</code> define the available options by using the <code>ui5-option</code> component.\n\n<h3>Keyboard Handling</h3> The <code>ui5-select</code> provides advanced keyboard handling. <br> <ul> <li>[F4, ALT+UP, ALT+DOWN, SPACE, ENTER] - Opens/closes the drop-down.</li> <li>[UP, DOWN] - If the drop-down is closed - changes selection to the next or the previous option. If the drop-down is opened - moves focus to the next or the previous option.</li> <li>[SPACE, ENTER] - If the drop-down is opened - selects the focused option.</li> <li>[ESC] - Closes the drop-down without changing the selection.</li> <li>[HOME] - Navigates to first option</li> <li>[END] - Navigates to the last option</li> </ul> <br>\n\n<h3>Stable DOM Refs</h3>\n\nIn the context of <code>ui5-select</code>, you can provide a custom stable DOM ref for: <ul> <li>Every <code>ui5-option</code> that you provide. Example: <code><ui5-option stable-dom-ref=\"option1\"></ui5-option></code></li> </ul>\n\n<h3>ES6 Module Import</h3> <code>import \"@ui5/webcomponents/dist/Select\";</code> <br> <code>import \"@ui5/webcomponents/dist/Option\";</code>",
3825
+ "description": "<h3 class=\"comment-api-title\">Overview</h3> The <code>ui5-select</code> component is used to create a drop-down list. The items inside the <code>ui5-select</code> define the available options by using the <code>ui5-option</code> component.\n\n<h3>Keyboard Handling</h3> The <code>ui5-select</code> provides advanced keyboard handling. <br> <ul> <li>[F4, ALT+UP, ALT+DOWN, SPACE, ENTER] - Opens/closes the drop-down.</li> <li>[UP, DOWN] - If the drop-down is closed - changes selection to the next or the previous option. If the drop-down is opened - moves focus to the next or the previous option.</li> <li>[SPACE, ENTER] - If the drop-down is opened - selects the focused option.</li> <li>[ESC] - Closes the drop-down without changing the selection.</li> <li>[HOME] - Navigates to first option</li> <li>[END] - Navigates to the last option</li> </ul> <br>\n\n<h3>ES6 Module Import</h3> <code>import \"@ui5/webcomponents/dist/Select\";</code> <br> <code>import \"@ui5/webcomponents/dist/Option\";</code>",
3841
3826
  "constructor": { "visibility": "public" },
3842
3827
  "properties": [
3843
3828
  {
@@ -4506,13 +4491,6 @@
4506
4491
  "description": "Specifies if the component is selected.",
4507
4492
  "defaultValue": "false"
4508
4493
  },
4509
- {
4510
- "name": "stableDomRef",
4511
- "visibility": "public",
4512
- "since": "1.0.0-rc.8",
4513
- "type": "string",
4514
- "description": "Defines the stable selector that you can use via getStableDomRef method."
4515
- },
4516
4494
  {
4517
4495
  "name": "text",
4518
4496
  "visibility": "public",
@@ -4528,6 +4506,14 @@
4528
4506
  "type": "Node[]",
4529
4507
  "description": "Defines the tab content."
4530
4508
  }
4509
+ ],
4510
+ "methods": [
4511
+ {
4512
+ "name": "getTabInStripDomRef",
4513
+ "visibility": "public",
4514
+ "since": "1.0.0-rc.16",
4515
+ "description": "Returns the DOM reference of the tab that is placed in the header. <b>Note:</b> If you need a DOM ref to the tab content please use the <code>getDomRef</code> method."
4516
+ }
4531
4517
  ]
4532
4518
  },
4533
4519
  {
@@ -4541,7 +4527,7 @@
4541
4527
  "static": true,
4542
4528
  "visibility": "public",
4543
4529
  "extends": "sap.ui.webcomponents.base.UI5Element",
4544
- "description": "<h3 class=\"comment-api-title\">Overview</h3>\n\nThe <code>ui5-tabcontainer</code> represents a collection of tabs with associated content. Navigation through the tabs changes the content display of the currently active content area. A tab can be labeled with text only, or icons with text.\n\n<h3>Structure</h3>\n\nThe <code>ui5-tabcontainer</code> can hold two types of entities: <ul> <li><code>ui5-tab</code> - contains all the information on an item (text and icon)</li> <li><code>ui5-tab-separator</code> - used to separate tabs with a vertical line</li> </ul>\n\n<h3>Stable DOM Refs</h3>\n\nIn the context of <code>ui5-tabcontainer</code>, you can provide a custom stable DOM refs for: <ul> <li>Each <code>ui5-tab</code> Example: <code><ui5-tab stable-dom-ref=\"in-stock\"></ui5-tab></code></li> </ul>\n\n<h3>ES6 Module Import</h3>\n\n<code>import \"@ui5/webcomponents/dist/TabContainer\";</code> <br> <code>import \"@ui5/webcomponents/dist/Tab\";</code> (for <code>ui5-tab</code>) <br> <code>import \"@ui5/webcomponents/dist/TabSeparator\";</code> (for <code>ui5-tab-separator</code>)",
4530
+ "description": "<h3 class=\"comment-api-title\">Overview</h3>\n\nThe <code>ui5-tabcontainer</code> represents a collection of tabs with associated content. Navigation through the tabs changes the content display of the currently active content area. A tab can be labeled with text only, or icons with text.\n\n<h3>Structure</h3>\n\nThe <code>ui5-tabcontainer</code> can hold two types of entities: <ul> <li><code>ui5-tab</code> - contains all the information on an item (text and icon)</li> <li><code>ui5-tab-separator</code> - used to separate tabs with a vertical line</li> </ul>\n\n<h3>ES6 Module Import</h3>\n\n<code>import \"@ui5/webcomponents/dist/TabContainer\";</code> <br> <code>import \"@ui5/webcomponents/dist/Tab\";</code> (for <code>ui5-tab</code>) <br> <code>import \"@ui5/webcomponents/dist/TabSeparator\";</code> (for <code>ui5-tab-separator</code>)",
4545
4531
  "constructor": { "visibility": "public" },
4546
4532
  "properties": [
4547
4533
  {
@@ -97,10 +97,16 @@ class Suggestions {
97
97
  }
98
98
 
99
99
  onEnter(event) {
100
+ if (this._isGroupOrInactiveItem) {
101
+ event.preventDefault();
102
+ return false;
103
+ }
104
+
100
105
  if (this._isItemOnTarget()) {
101
106
  this.onItemSelected(null, true /* keyboardUsed */);
102
107
  return true;
103
108
  }
109
+
104
110
  return false;
105
111
  }
106
112
 
@@ -135,9 +141,15 @@ class Suggestions {
135
141
  }
136
142
 
137
143
  async close(preventFocusRestore = false) {
144
+ const selectedItem = this._getItems() && this._getItems()[this.selectedItemIndex];
145
+
138
146
  this._getComponent().open = false;
139
147
  this.responsivePopover = await this._getSuggestionPopover();
140
148
  this.responsivePopover.close(false, false, preventFocusRestore);
149
+
150
+ if (selectedItem && selectedItem.focused) {
151
+ selectedItem.focused = false;
152
+ }
141
153
  }
142
154
 
143
155
  updateSelectedItemPosition(pos) {
@@ -171,16 +183,13 @@ class Suggestions {
171
183
 
172
184
  // If the item is "Inactive", prevent selection with SPACE or ENTER
173
185
  // to have consistency with the way "Inactive" items behave in the ui5-list
174
- if (item.type === "Inactive") {
175
- return;
176
- }
177
-
178
- if (item.group) {
186
+ if (item.type === "Inactive" || item.group) {
179
187
  return;
180
188
  }
181
189
 
182
190
  this._getComponent().onItemSelected(this._getRealItems()[this.selectedItemIndex], keyboardUsed);
183
191
  item.selected = false;
192
+ item.focused = false;
184
193
  this._getComponent().open = false;
185
194
  }
186
195
 
@@ -242,7 +251,17 @@ class Suggestions {
242
251
  }
243
252
 
244
253
  _isItemOnTarget() {
245
- return this.isOpened() && this.selectedItemIndex !== null;
254
+ return this.isOpened() && this.selectedItemIndex !== null && this.selectedItemIndex !== -1 && !this._isGroupOrInactiveItem;
255
+ }
256
+
257
+ get _isGroupOrInactiveItem() {
258
+ const items = this._getItems();
259
+
260
+ if (!items || !items[this.selectedItemIndex]) {
261
+ return false;
262
+ }
263
+
264
+ return (items[this.selectedItemIndex].group || items[this.selectedItemIndex].type === "Inactive");
246
265
  }
247
266
 
248
267
  isOpened() {
@@ -264,23 +283,68 @@ class Suggestions {
264
283
  _selectNextItem() {
265
284
  const itemsCount = this._getItems().length;
266
285
  const previousSelectedIdx = this.selectedItemIndex;
286
+ const hasValueState = this.component.hasValueStateMessage;
287
+
288
+ if (hasValueState && previousSelectedIdx === null && !this.component._isValueStateFocused) {
289
+ this.component._isValueStateFocused = true;
290
+ this.component.focused = false;
291
+ this.component.hasSuggestionItemSelected = false;
292
+ this.selectedItemIndex = null;
293
+
294
+ return;
295
+ }
296
+
297
+ if ((previousSelectedIdx === null && !hasValueState) || this.component._isValueStateFocused) {
298
+ this.component._isValueStateFocused = false;
299
+ --this.selectedItemIndex;
300
+ }
267
301
 
268
- if ((this.selectedItemIndex === null) || (++this.selectedItemIndex > itemsCount - 1)) {
269
- this.selectedItemIndex = 0;
302
+ if (previousSelectedIdx !== null && previousSelectedIdx + 1 > itemsCount - 1) {
303
+ return;
270
304
  }
271
305
 
272
- this._moveItemSelection(previousSelectedIdx, this.selectedItemIndex);
306
+ this._moveItemSelection(previousSelectedIdx, ++this.selectedItemIndex);
273
307
  }
274
308
 
275
309
  _selectPreviousItem() {
276
- const itemsCount = this._getItems().length;
310
+ const items = this._getItems();
277
311
  const previousSelectedIdx = this.selectedItemIndex;
312
+ const hasValueState = this.component.hasValueStateMessage;
278
313
 
279
- if ((this.selectedItemIndex === null) || (--this.selectedItemIndex < 0)) {
280
- this.selectedItemIndex = itemsCount - 1;
314
+ if (hasValueState && previousSelectedIdx === 0 && !this.component._isValueStateFocused) {
315
+ this.component.hasSuggestionItemSelected = false;
316
+ this.component._isValueStateFocused = true;
317
+ this.selectedItemIndex = null;
318
+
319
+ items[0].focused = false;
320
+ items[0].selected = false;
321
+
322
+ return;
323
+ }
324
+
325
+ if (this.component._isValueStateFocused) {
326
+ this.component.focused = true;
327
+ this.component._isValueStateFocused = false;
328
+ this.selectedItemIndex = null;
329
+
330
+ return;
331
+ }
332
+
333
+ if (previousSelectedIdx === -1 || previousSelectedIdx === null) {
334
+ return;
335
+ }
336
+
337
+ if (previousSelectedIdx - 1 < 0) {
338
+ items[previousSelectedIdx].selected = false;
339
+ items[previousSelectedIdx].focused = false;
340
+
341
+ this.component.focused = true;
342
+ this.component.hasSuggestionItemSelected = false;
343
+ this.selectedItemIndex -= 1;
344
+ return;
281
345
  }
282
346
 
283
- this._moveItemSelection(previousSelectedIdx, this.selectedItemIndex);
347
+ this._moveItemSelection(previousSelectedIdx, --this.selectedItemIndex);
284
348
  }
285
349
 
286
350
  _moveItemSelection(previousIdx, nextIdx) {
@@ -288,6 +352,12 @@ class Suggestions {
288
352
  const currentItem = items[nextIdx];
289
353
  const previousItem = items[previousIdx];
290
354
 
355
+ if (!currentItem) {
356
+ return;
357
+ }
358
+
359
+ this.component.focused = false;
360
+
291
361
  this.accInfo = {
292
362
  currentPos: nextIdx + 1,
293
363
  listSize: items.length,
@@ -296,16 +366,22 @@ class Suggestions {
296
366
 
297
367
  if (previousItem) {
298
368
  previousItem.selected = false;
369
+ previousItem.focused = false;
299
370
  }
300
371
 
301
372
  if (currentItem) {
302
- currentItem.selected = true;
373
+ currentItem.focused = true;
374
+
375
+ if (currentItem.type === "Active") {
376
+ currentItem.selected = true;
377
+ }
303
378
 
304
379
  if (this.handleFocus) {
305
380
  currentItem.focus();
306
381
  }
307
382
  }
308
383
 
384
+ this.component.hasSuggestionItemSelected = true;
309
385
  this.onItemPreviewed(currentItem);
310
386
 
311
387
  if (!this._isItemIntoView(currentItem)) {
@@ -317,9 +393,18 @@ class Suggestions {
317
393
  const items = this._getItems();
318
394
  items.forEach(item => {
319
395
  item.selected = false;
396
+ item.focused = false;
320
397
  });
321
398
  }
322
399
 
400
+ _clearItemFocus() {
401
+ const focusedItem = this._getItems().find(item => item.focused);
402
+
403
+ if (focusedItem) {
404
+ focusedItem.focused = false;
405
+ }
406
+ }
407
+
323
408
  _isItemIntoView(item) {
324
409
  const rectItem = item.getDomRef().getBoundingClientRect();
325
410
  const rectInput = this._getComponent().getDomRef().getBoundingClientRect();
@@ -344,7 +429,7 @@ class Suggestions {
344
429
  }
345
430
 
346
431
  _getItems() {
347
- return [...this.responsivePopover.querySelector("[ui5-list]").children];
432
+ return !!this.responsivePopover && [...this.responsivePopover.querySelector("[ui5-list]").children];
348
433
  }
349
434
 
350
435
  _getComponent() {