@ui5/webcomponents 0.31.21 → 0.31.25

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 (37) hide show
  1. package/CHANGELOG.md +60 -0
  2. package/dist/CalendarHeader.js +2 -2
  3. package/dist/Card.js +16 -26
  4. package/dist/DayPicker.js +5 -0
  5. package/dist/Input.js +4 -0
  6. package/dist/List.js +1 -0
  7. package/dist/MultiComboBox.js +4 -0
  8. package/dist/TabContainer.js +1 -1
  9. package/dist/TableRow.js +1 -1
  10. package/dist/api.json +1 -1
  11. package/dist/features/InputSuggestions.js +6 -15
  12. package/dist/generated/assets/themes/sap_belize_hcb/parameters-bundle.css.json +1 -1
  13. package/dist/generated/assets/themes/sap_belize_hcw/parameters-bundle.css.json +1 -1
  14. package/dist/generated/templates/CardTemplate.lit.js +1 -1
  15. package/dist/generated/templates/InputPopoverTemplate.lit.js +1 -1
  16. package/dist/generated/templates/MultiComboBoxPopoverTemplate.lit.js +1 -1
  17. package/dist/generated/templates/TabContainerTemplate.lit.js +2 -2
  18. package/dist/generated/themes/DatePickerPopover.css.js +1 -1
  19. package/dist/generated/themes/Dialog.css.js +1 -1
  20. package/dist/generated/themes/Link.css.js +1 -1
  21. package/dist/generated/themes/sap_belize_hcb/parameters-bundle.css.js +1 -1
  22. package/dist/generated/themes/sap_belize_hcw/parameters-bundle.css.js +1 -1
  23. package/package.json +8 -8
  24. package/src/CalendarHeader.js +2 -2
  25. package/src/Card.hbs +2 -2
  26. package/src/Card.js +16 -26
  27. package/src/DayPicker.js +5 -0
  28. package/src/Input.js +4 -0
  29. package/src/InputPopover.hbs +1 -1
  30. package/src/List.js +1 -0
  31. package/src/MultiComboBox.js +4 -0
  32. package/src/MultiComboBoxPopover.hbs +1 -1
  33. package/src/TabContainer.hbs +3 -0
  34. package/src/TabContainer.js +1 -1
  35. package/src/TableRow.js +1 -1
  36. package/src/features/InputSuggestions.js +6 -15
  37. package/.port +0 -1
package/CHANGELOG.md CHANGED
@@ -3,6 +3,66 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [0.31.25](https://github.com/SAP/ui5-webcomponents/compare/v0.31.24...v0.31.25) (2021-11-29)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **ui5-input, ui5-multi-combobox:** value state popup now aligned properly in RTL mode ([#4310](https://github.com/SAP/ui5-webcomponents/issues/4310)) ([#4382](https://github.com/SAP/ui5-webcomponents/issues/4382)) ([a855dcc](https://github.com/SAP/ui5-webcomponents/commit/a855dcc))
12
+ * **ui5-table-row:** Prevent space when target is tr ([f891e9d](https://github.com/SAP/ui5-webcomponents/commit/f891e9d))
13
+
14
+
15
+
16
+
17
+
18
+ ## [0.31.24](https://github.com/SAP/ui5-webcomponents/compare/v0.31.23...v0.31.24) (2021-11-23)
19
+
20
+
21
+ ### Bug Fixes
22
+
23
+ * adding stable selectors for tab container and shellbar ([#4369](https://github.com/SAP/ui5-webcomponents/issues/4369)) ([dc2ea58](https://github.com/SAP/ui5-webcomponents/commit/dc2ea58))
24
+ * **ui5-date-picker:** Align day names in hide-week-numbers mode ([#4309](https://github.com/SAP/ui5-webcomponents/issues/4309)) ([9dcc887](https://github.com/SAP/ui5-webcomponents/commit/9dcc887)), closes [#4260](https://github.com/SAP/ui5-webcomponents/issues/4260)
25
+ * **ui5-tab-container:** selector fixed ([#4261](https://github.com/SAP/ui5-webcomponents/issues/4261)) ([#4273](https://github.com/SAP/ui5-webcomponents/issues/4273)) ([735d9c4](https://github.com/SAP/ui5-webcomponents/commit/735d9c4))
26
+
27
+
28
+
29
+
30
+
31
+ ## [0.31.23](https://github.com/SAP/ui5-webcomponents/compare/v0.31.22...v0.31.23) (2021-11-17)
32
+
33
+
34
+ ### Bug Fixes
35
+
36
+ * **ui5-input:** escape HTML before highlighting suggestions (XSS) ([#4296](https://github.com/SAP/ui5-webcomponents/issues/4296)) ([8120f6c](https://github.com/SAP/ui5-webcomponents/commit/8120f6c)), closes [#4245](https://github.com/SAP/ui5-webcomponents/issues/4245)
37
+ * **ui5-link:** add underlining in the regular state in hcb / hcw ([#3960](https://github.com/SAP/ui5-webcomponents/issues/3960)) ([e44dc97](https://github.com/SAP/ui5-webcomponents/commit/e44dc97))
38
+
39
+
40
+
41
+
42
+
43
+ ## [0.31.22](https://github.com/SAP/ui5-webcomponents/compare/v0.31.21...v0.31.22) (2021-10-26)
44
+
45
+
46
+ ### Bug Fixes
47
+
48
+ * **ui5-card:** accessibleName now takes effect ([0769850](https://github.com/SAP/ui5-webcomponents/commit/0769850))
49
+ * **ui5-card:** fix a11y "unique landmark" issue ([32e1477](https://github.com/SAP/ui5-webcomponents/commit/32e1477))
50
+
51
+
52
+ ### Features
53
+
54
+ * **framework:** allow using a custom i18n library ([#4119](https://github.com/SAP/ui5-webcomponents/issues/4119)) ([947889a](https://github.com/SAP/ui5-webcomponents/commit/947889a))
55
+ * **ui5-card:** introduce accessible-name-ref to replace aria-labelledby ([3f7138c](https://github.com/SAP/ui5-webcomponents/commit/3f7138c))
56
+
57
+
58
+ ### Reverts
59
+
60
+ * feat(framework): allow using a custom i18n library ([debc848](https://github.com/SAP/ui5-webcomponents/commit/debc848))
61
+
62
+
63
+
64
+
65
+
6
66
  ## [0.31.21](https://github.com/SAP/ui5-webcomponents/compare/v0.31.20...v0.31.21) (2021-10-16)
7
67
 
8
68
 
@@ -205,11 +205,11 @@ class CalendarHeader extends UI5Element {
205
205
  return {
206
206
  prevButton: {
207
207
  "ui5-calheader-arrowbtn": true,
208
- "ui5-calheader-arrowbtn-disabled": this._isPrevButtonDisabled,
208
+ "ui5-calheader-arrowbtn-disabled": this.isPrevButtonDisabled,
209
209
  },
210
210
  nextButton: {
211
211
  "ui5-calheader-arrowbtn": true,
212
- "ui5-calheader-arrowbtn-disabled": this._isNextButtonDisabled,
212
+ "ui5-calheader-arrowbtn-disabled": this.isNextButtonDisabled,
213
213
  },
214
214
  };
215
215
  }
package/dist/Card.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
2
2
  import litRender from "@ui5/webcomponents-base/dist/renderer/LitRenderer.js";
3
3
  import { fetchI18nBundle, getI18nBundle } from "@ui5/webcomponents-base/dist/i18nBundle.js";
4
- import { getEffectiveAriaLabelText } from "@ui5/webcomponents-base/dist/util/AriaLabelHelper.js";
4
+ import findNodeOwner from "@ui5/webcomponents-base/dist/util/findNodeOwner.js";
5
5
  import { isSpace, isEnter } from "@ui5/webcomponents-base/dist/Keys.js";
6
6
  import Integer from "@ui5/webcomponents-base/dist/types/Integer.js";
7
7
  import CardTemplate from "./generated/templates/CardTemplate.lit.js";
@@ -66,19 +66,6 @@ const metadata = {
66
66
  action: {
67
67
  type: HTMLElement,
68
68
  },
69
-
70
- /**
71
- * Defines the accessible name of the component, which is used as the name of the card region and should be unique per card.
72
- * <b>Note:</b> <code>accessibleName</code> should be always set.
73
- *
74
- * @type {String}
75
- * @defaultvalue ""
76
- * @public
77
- * @since 1.0.0-rc.16
78
- */
79
- accessibleName: {
80
- type: String,
81
- },
82
69
  },
83
70
  properties: /** @lends sap.ui.webcomponents.main.Card.prototype */ {
84
71
 
@@ -127,28 +114,28 @@ const metadata = {
127
114
  },
128
115
 
129
116
  /**
130
- * Defines the aria-label attribute for the <code>ui5-card</code>
117
+ * Defines the accessible name of the component, which is used as the name of the card region and should be unique per card.
118
+ * <b>Note:</b> <code>accessibleName</code> should be always set.
131
119
  *
132
120
  * @type {String}
133
- * @since 1.0.0-rc.9
134
- * @private
135
121
  * @defaultvalue ""
122
+ * @public
123
+ * @since 1.0.0-rc.16
136
124
  */
137
- ariaLabel: {
125
+ accessibleName: {
138
126
  type: String,
139
127
  },
140
128
 
141
129
  /**
142
- * Receives id(or many ids) of the elements that label the <code>ui5-card</code>
130
+ * Defines the IDs of the elements that label the component.
143
131
  *
144
132
  * @type {String}
145
133
  * @defaultvalue ""
146
- * @private
147
- * @since 1.0.0-rc.9
134
+ * @public
135
+ * @since 1.0.0-rc.16
148
136
  */
149
- ariaLabelledby: {
137
+ accessibleNameRef: {
150
138
  type: String,
151
- defaultValue: "",
152
139
  },
153
140
 
154
141
  /**
@@ -268,6 +255,9 @@ class Card extends UI5Element {
268
255
  return !!(this.heading || this.subheading || this.status || this.hasAction || this.avatar);
269
256
  }
270
257
 
258
+ // As in 0.31 we don't have all the accessibleNameRef, accessibleName related changes downported,
259
+ // we manually add getEffectiveAriaLabelText and getAriaLabelledByTexts methods and change them,
260
+ // so they work with accessibleName and accessibleNameRef, isntead of ariaLabel and ariaLabelledby
271
261
  getEffectiveAriaLabelText(el) {
272
262
  if (!el.accessibleNameRef) {
273
263
  if (el.accessibleName) {
@@ -279,7 +269,7 @@ class Card extends UI5Element {
279
269
 
280
270
  return this.getAriaLabelledByTexts(el);
281
271
  };
282
-
272
+
283
273
  getAriaLabelledByTexts(el, ownerDocument, readyIds = "") {
284
274
  const ids = (readyIds && readyIds.split(" ")) || el.accessibleNameRef.split(" ");
285
275
  const owner = ownerDocument || findNodeOwner(el);
@@ -296,9 +286,9 @@ class Card extends UI5Element {
296
286
 
297
287
  return result;
298
288
  };
299
-
289
+
300
290
  get ariaLabelText() {
301
- const effectiveAriaLabelText = getEffectiveAriaLabelText(this),
291
+ const effectiveAriaLabelText = this.getEffectiveAriaLabelText(this),
302
292
  effectiveAriaLabel = effectiveAriaLabelText ? ` ${effectiveAriaLabelText}` : "";
303
293
  return this.i18nBundle.getText(ARIA_ROLEDESCRIPTION_CARD) + effectiveAriaLabel;
304
294
  }
package/dist/DayPicker.js CHANGED
@@ -318,6 +318,10 @@ class DayPicker extends CalendarPart {
318
318
  }
319
319
 
320
320
  this._dayNames[1].classes += " ui5-dp-firstday";
321
+
322
+ if (this.shouldHideWeekNumbers) {
323
+ this._dayNames.shift();
324
+ }
321
325
  }
322
326
 
323
327
  onAfterRendering() {
@@ -721,6 +725,7 @@ class DayPicker extends CalendarPart {
721
725
  return {
722
726
  wrapper: {
723
727
  display: this._hidden ? "none" : "flex",
728
+ "justify-content": "center",
724
729
  },
725
730
  main: {
726
731
  width: "100%",
package/dist/Input.js CHANGED
@@ -1275,6 +1275,10 @@ class Input extends UI5Element {
1275
1275
  return this.placeholder;
1276
1276
  }
1277
1277
 
1278
+ get _valueStatePopoverHorizontalAlign() {
1279
+ return this.effectiveDir !== "rtl" ? "Left" : "Right";
1280
+ }
1281
+
1278
1282
  /**
1279
1283
  * Returns the caret position inside the native input
1280
1284
  * @protected
package/dist/List.js CHANGED
@@ -820,6 +820,7 @@ class List extends UI5Element {
820
820
  } else {
821
821
  this.focusPreviouslyFocusedItem();
822
822
  }
823
+ event.stopImmediatePropagation();
823
824
  }
824
825
 
825
826
  this.setForwardingFocus(false);
@@ -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: {
@@ -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/dist/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
  }