@ui5/webcomponents 0.31.22 → 0.31.26

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 (42) hide show
  1. package/CHANGELOG.md +49 -0
  2. package/dist/CalendarHeader.js +2 -2
  3. package/dist/Card.js +1 -0
  4. package/dist/DayPicker.js +5 -0
  5. package/dist/Input.js +4 -0
  6. package/dist/List.js +1 -0
  7. package/dist/MessageStrip.js +30 -2
  8. package/dist/MultiComboBox.js +4 -0
  9. package/dist/TabContainer.js +1 -1
  10. package/dist/TableRow.js +1 -1
  11. package/dist/TextArea.js +2 -1
  12. package/dist/features/InputSuggestions.js +6 -15
  13. package/dist/generated/assets/themes/sap_belize_hcb/parameters-bundle.css.json +1 -1
  14. package/dist/generated/assets/themes/sap_belize_hcw/parameters-bundle.css.json +1 -1
  15. package/dist/generated/i18n/i18n-defaults.js +2 -2
  16. package/dist/generated/templates/InputPopoverTemplate.lit.js +1 -1
  17. package/dist/generated/templates/MessageStripTemplate.lit.js +1 -1
  18. package/dist/generated/templates/MultiComboBoxPopoverTemplate.lit.js +1 -1
  19. package/dist/generated/templates/TabContainerTemplate.lit.js +2 -2
  20. package/dist/generated/themes/DatePickerPopover.css.js +1 -1
  21. package/dist/generated/themes/Dialog.css.js +1 -1
  22. package/dist/generated/themes/Link.css.js +1 -1
  23. package/dist/generated/themes/sap_belize_hcb/parameters-bundle.css.js +1 -1
  24. package/dist/generated/themes/sap_belize_hcw/parameters-bundle.css.js +1 -1
  25. package/dist/i18n/messagebundle.properties +16 -1
  26. package/package.json +8 -8
  27. package/src/CalendarHeader.js +2 -2
  28. package/src/Card.js +1 -0
  29. package/src/DayPicker.js +5 -0
  30. package/src/Input.js +4 -0
  31. package/src/InputPopover.hbs +1 -1
  32. package/src/List.js +1 -0
  33. package/src/MessageStrip.hbs +6 -6
  34. package/src/MessageStrip.js +30 -2
  35. package/src/MultiComboBox.js +4 -0
  36. package/src/MultiComboBoxPopover.hbs +1 -1
  37. package/src/TabContainer.hbs +3 -0
  38. package/src/TabContainer.js +1 -1
  39. package/src/TableRow.js +1 -1
  40. package/src/TextArea.js +2 -1
  41. package/src/features/InputSuggestions.js +6 -15
  42. package/src/i18n/messagebundle.properties +16 -1
@@ -24,12 +24,12 @@
24
24
 
25
25
  {{#unless noCloseButton}}
26
26
  <ui5-button
27
- icon="decline"
28
- icon-size=".75rem"
29
- design="Transparent"
30
- class="ui5-messagestrip-close-button"
31
- title="{{_closeButtonText}}"
32
- @click={{_closeClick}}
27
+ icon="decline"
28
+ icon-size=".75rem"
29
+ design="Transparent"
30
+ class="ui5-messagestrip-close-button"
31
+ ._buttonAccInfo="{{accInfo.button}}"
32
+ @click={{_closeClick}}
33
33
  ></ui5-button>
34
34
  {{/unless}}
35
35
  </div>
@@ -10,7 +10,14 @@ import MessageStripType from "./types/MessageStripType.js";
10
10
  import MessageStripTemplate from "./generated/templates/MessageStripTemplate.lit.js";
11
11
  import Icon from "./Icon.js";
12
12
  import Button from "./Button.js";
13
- import { MESSAGE_STRIP_CLOSE_BUTTON } from "./generated/i18n/i18n-defaults.js";
13
+ import {
14
+ MESSAGE_STRIP_CLOSE_BUTTON,
15
+ MESSAGE_STRIP_CLOSABLE,
16
+ MESSAGE_STRIP_ERROR,
17
+ MESSAGE_STRIP_WARNING,
18
+ MESSAGE_STRIP_SUCCESS,
19
+ MESSAGE_STRIP_INFORMATION,
20
+ } from "./generated/i18n/i18n-defaults.js";
14
21
 
15
22
  // Styles
16
23
  import messageStripCss from "./generated/themes/MessageStrip.css.js";
@@ -189,14 +196,27 @@ class MessageStrip extends UI5Element {
189
196
  };
190
197
  }
191
198
 
199
+ get designAnnouncementMappings() {
200
+ return {
201
+ "Information": this.i18nBundle.getText(MESSAGE_STRIP_INFORMATION),
202
+ "Positive": this.i18nBundle.getText(MESSAGE_STRIP_SUCCESS),
203
+ "Negative": this.i18nBundle.getText(MESSAGE_STRIP_ERROR),
204
+ "Warning": this.i18nBundle.getText(MESSAGE_STRIP_WARNING),
205
+ };
206
+ }
207
+
192
208
  get hiddenText() {
193
- return `Message Strip ${this.type} ${this.noCloseButton ? "" : "closable"}`;
209
+ return `${this.designAnnouncementMappings[this.type]} ${this.noCloseButton ? "" : this._closableText}`;
194
210
  }
195
211
 
196
212
  get _closeButtonText() {
197
213
  return this.i18nBundle.getText(MESSAGE_STRIP_CLOSE_BUTTON);
198
214
  }
199
215
 
216
+ get _closableText() {
217
+ return this.i18nBundle.getText(MESSAGE_STRIP_CLOSABLE);
218
+ }
219
+
200
220
  get classes() {
201
221
  return {
202
222
  root: {
@@ -219,6 +239,14 @@ class MessageStrip extends UI5Element {
219
239
  get typeClasses() {
220
240
  return MessageStrip.typeClassesMappings()[this.type];
221
241
  }
242
+
243
+ get accInfo() {
244
+ return {
245
+ "button": {
246
+ "title": this._closeButtonText,
247
+ },
248
+ };
249
+ }
222
250
  }
223
251
 
224
252
  MessageStrip.define();
@@ -852,6 +852,10 @@ class MultiComboBox extends UI5Element {
852
852
  return (this._isFocusInside || this.open) && !this.readonly;
853
853
  }
854
854
 
855
+ get _valueStatePopoverHorizontalAlign() {
856
+ return this.effectiveDir !== "rtl" ? "Left" : "Right";
857
+ }
858
+
855
859
  get classes() {
856
860
  return {
857
861
  popoverValueState: {
@@ -98,7 +98,7 @@
98
98
  no-arrow
99
99
  class="ui5-valuestatemessage-popover"
100
100
  placement-type="Bottom"
101
- horizontal-align="Left"
101
+ horizontal-align="{{_valueStatePopoverHorizontalAlign}}"
102
102
  >
103
103
  <div slot="header" class="{{classes.popoverValueState}}" style="{{styles.popoverHeader}}">
104
104
  {{> valueStateMessage}}
@@ -11,6 +11,7 @@
11
11
  <div class="{{classes.headerBackArrow}}">
12
12
  <ui5-button @click="{{_onHeaderBackArrowClick}}"
13
13
  icon="slim-arrow-left"
14
+ data-ui5-stable="tabs-left"
14
15
  design="Transparent"
15
16
  tabindex="-1"
16
17
  title="{{previousIconACCName}}"></ui5-button>
@@ -37,6 +38,7 @@
37
38
  <div class="{{classes.headerForwardArrow}}">
38
39
  <ui5-button @click="{{_onHeaderForwardArrowClick}}"
39
40
  icon="slim-arrow-right"
41
+ data-ui5-stable="tabs-right"
40
42
  design="Transparent"
41
43
  tabindex="-1"
42
44
  title="{{nextIconACCName}}"></ui5-button>
@@ -53,6 +55,7 @@
53
55
  {{else}}
54
56
  <ui5-button
55
57
  icon="{{overflowMenuIcon}}"
58
+ data-ui5-stable="tabs-overflow"
56
59
  design="Transparent"
57
60
  tabindex="-1"
58
61
  title="{{overflowMenuTitle}}"
@@ -458,7 +458,7 @@ class TabContainer extends UI5Element {
458
458
  }
459
459
 
460
460
  async _onOverflowButtonClick(event) {
461
- const button = this.overflowButton[0] || this.getDomRef().querySelector(".ui-tc__overflowButton > ui5-button");
461
+ const button = this.overflowButton[0] || this.getDomRef().querySelector(".ui-tc__overflowButton > [ui5-button]");
462
462
 
463
463
  if (event.target !== button) {
464
464
  return;
package/src/TableRow.js CHANGED
@@ -105,7 +105,7 @@ class TableRow extends UI5Element {
105
105
  this.fireEvent("row-click", { row: this });
106
106
  }
107
107
 
108
- if (isSpace(event)) {
108
+ if (isSpace(event) && event.target.tagName.toLowerCase() === "tr") {
109
109
  event.preventDefault();
110
110
  }
111
111
  }
package/src/TextArea.js CHANGED
@@ -542,6 +542,7 @@ class TextArea extends UI5Element {
542
542
 
543
543
  get styles() {
544
544
  const lineHeight = 1.4 * 16;
545
+ const mainHeight = (this.rows * lineHeight) + (this.showExceededText ? 32 : 0);
545
546
 
546
547
  return {
547
548
  mirror: {
@@ -549,7 +550,7 @@ class TextArea extends UI5Element {
549
550
  },
550
551
  main: {
551
552
  width: "100%",
552
- height: (this.rows && !this.growing) ? `${this.rows * lineHeight}px` : "100%",
553
+ height: (this.rows && !this.growing) ? `${mainHeight}px` : "100%",
553
554
  },
554
555
  focusDiv: {
555
556
  "height": (this.showExceededText ? "calc(100% - 26px)" : "100%"),
@@ -1,6 +1,7 @@
1
1
  import { registerFeature } from "@ui5/webcomponents-base/dist/FeaturesRegistry.js";
2
2
  import { getI18nBundle } from "@ui5/webcomponents-base/dist/i18nBundle.js";
3
-
3
+ import encodeXML from "@ui5/webcomponents-base/dist/util/encodeXML.js";
4
+ import generateHighlightedMarkup from "@ui5/webcomponents-base/dist/util/generateHighlightedMarkup.js";
4
5
  import List from "../List.js";
5
6
  import ResponsivePopover from "../ResponsivePopover.js";
6
7
  import SuggestionItem from "../SuggestionItem.js";
@@ -392,31 +393,21 @@ class Suggestions {
392
393
  }
393
394
 
394
395
  getHighlightedText(suggestion, input) {
395
- let text = suggestion.text || suggestion.textContent;
396
- text = this.sanitizeText(text);
397
-
396
+ const text = suggestion.text || suggestion.textContent;
398
397
  return this.hightlightInput(text, input);
399
398
  }
400
399
 
401
400
  getHighlightedDesc(suggestion, input) {
402
- let text = suggestion.description;
403
- text = this.sanitizeText(text);
404
-
401
+ const text = suggestion.description || "";
405
402
  return this.hightlightInput(text, input);
406
403
  }
407
404
 
408
405
  hightlightInput(text, input) {
409
- if (!text) {
410
- return text;
411
- }
412
-
413
- const inputEscaped = input.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
414
- const regEx = new RegExp(inputEscaped, "ig");
415
- return text.replace(regEx, match => `<b>${match}</b>`);
406
+ return generateHighlightedMarkup(text, input);
416
407
  }
417
408
 
418
409
  sanitizeText(text) {
419
- return text && text.replace("<", "&lt");
410
+ return encodeXML(text);
420
411
  }
421
412
 
422
413
  static get dependencies() {
@@ -113,7 +113,22 @@ ARIA_LABEL_LIST_MULTISELECTABLE=Contains Multi-Selectable Items
113
113
  ARIA_LABEL_LIST_DELETABLE=Contains Deletable Items
114
114
 
115
115
  #XTOL: Tooltip of messgae strip close button
116
- MESSAGE_STRIP_CLOSE_BUTTON=Message Strip Close
116
+ MESSAGE_STRIP_CLOSE_BUTTON=Information Bar Close
117
+
118
+ #XACT: ARIA announcement for the MessageStrip's closable state
119
+ MESSAGE_STRIP_CLOSABLE=Closable
120
+
121
+ #XACT: ARIA announcement for the MessageStrip's "Error" state
122
+ MESSAGE_STRIP_ERROR=Error Information Bar
123
+
124
+ #XACT: ARIA announcement for the MessageStrip's "Warning" state
125
+ MESSAGE_STRIP_WARNING=Warning Information Bar
126
+
127
+ #XACT: ARIA announcement for the MessageStrip's "Success" state
128
+ MESSAGE_STRIP_SUCCESS=Success Information Bar
129
+
130
+ #XACT: ARIA announcement for the MessageStrip's "Information" state
131
+ MESSAGE_STRIP_INFORMATION=Information Bar
117
132
 
118
133
  #XFLD: MultiComboBox dialog button
119
134
  MULTICOMBOBOX_DIALOG_OK_BUTTON=OK