@brightspace-ui/core 3.75.1 → 3.75.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -628,7 +628,7 @@ export const DropdownContentMixin = superclass => class extends LocalizeCoreElem
628
628
 
629
629
  // DE44538: wait for dropdown content to fully render,
630
630
  // otherwise this.getContentContainer() can return null.
631
- await this.updateComplete;
631
+ await this.__waitForContentContainer();
632
632
 
633
633
  this.__previousFocusableAncestor =
634
634
  newValue === true
@@ -849,6 +849,12 @@ export const DropdownContentMixin = superclass => class extends LocalizeCoreElem
849
849
  this._topOverflow = this.__content.scrollTop !== 0;
850
850
  }
851
851
 
852
+ async __waitForContentContainer() {
853
+ if (this.getContentContainer() !== null) return;
854
+ await new Promise(resolve => requestAnimationFrame(resolve));
855
+ return this.__waitForContentContainer();
856
+ }
857
+
852
858
  _constrainSpaceAround(spaceAround, spaceRequired, targetRect) {
853
859
  const constrained = { ...spaceAround };
854
860
  if (this.boundary) {
@@ -49,11 +49,11 @@ function addSpaceListener() {
49
49
  if (spaceListenerAdded) return;
50
50
  spaceListenerAdded = true;
51
51
  document.addEventListener('keydown', e => {
52
- if (e.keyCode !== 32) return;
52
+ if (e.key !== ' ') return;
53
53
  spacePressed = true;
54
54
  });
55
55
  document.addEventListener('keyup', e => {
56
- if (e.keyCode !== 32) return;
56
+ if (e.key !== ' ') return;
57
57
  spacePressed = false;
58
58
  });
59
59
  }
@@ -244,6 +244,7 @@ class Filter extends FocusMixin(LocalizeCoreElement(RtlMixin(LitElement))) {
244
244
  onSubscribe: this._updateActiveFiltersSubscriber.bind(this),
245
245
  updateSubscribers: this._updateActiveFiltersSubscribers.bind(this)
246
246
  });
247
+ this._spacePressedDuringLastSelection = false;
247
248
  }
248
249
 
249
250
  static get focusElementSelector() {
@@ -617,7 +618,7 @@ class Filter extends FocusMixin(LocalizeCoreElement(RtlMixin(LitElement))) {
617
618
  return html`
618
619
  <d2l-list-item
619
620
  id="${itemId}"
620
- @d2l-list-item-selected="${ifDefined(item.additionalContent ? this._handleListItemSelelcted : undefined)}"
621
+ @d2l-list-item-selected="${item.additionalContent ? this._handleListItemSelected : undefined}"
621
622
  ?selection-disabled="${item.disabled}"
622
623
  ?hidden="${item.hidden}"
623
624
  key="${item.key}"
@@ -896,18 +897,23 @@ class Filter extends FocusMixin(LocalizeCoreElement(RtlMixin(LitElement))) {
896
897
  }
897
898
 
898
899
  async _handleExpandCollapse(e) {
899
- const eventPromise = e.target.expanded ? e.detail.expandComplete : e.detail.collapseComplete;
900
+ const expanded = e.target.expanded;
901
+ const eventPromise = expanded ? e.detail.expandComplete : e.detail.collapseComplete;
900
902
  const parentListItem = e.target.closest('d2l-list-item');
901
903
  parentListItem.classList.add('expanding-content');
902
904
 
903
905
  await eventPromise;
904
906
  parentListItem.classList.remove('expanding-content');
907
+
908
+ if (expanded && !hasDisplayedKeyboardTooltip && this._spacePressedDuringLastSelection) {
909
+ await new Promise(resolve => requestAnimationFrame(resolve));
910
+ this._displayKeyboardTooltip = true;
911
+ hasDisplayedKeyboardTooltip = true;
912
+ }
905
913
  }
906
914
 
907
- _handleListItemSelelcted() {
908
- if (hasDisplayedKeyboardTooltip || !spacePressed) return;
909
- this._displayKeyboardTooltip = true;
910
- hasDisplayedKeyboardTooltip = true;
915
+ _handleListItemSelected() {
916
+ this._spacePressedDuringLastSelection = spacePressed;
911
917
  }
912
918
 
913
919
  _handleSearch(e) {
@@ -461,9 +461,17 @@ class InputTime extends InputInlineHelpMixin(FocusMixin(LabelledMixin(SkeletonMi
461
461
  // open and focus dropdown on down arrow or enter
462
462
  if (e.keyCode === 40 || e.keyCode === 13) {
463
463
  if (!this._dropdownFirstOpened) this._dropdownFirstOpened = true;
464
- this.opened = true;
465
464
  e.preventDefault();
465
+ await this._waitForItems();
466
+ this.opened = true;
466
467
  }
467
468
  }
469
+
470
+ async _waitForItems() {
471
+ const items = this.shadowRoot.querySelectorAll('d2l-menu-item-radio');
472
+ if (items.length > 0) return;
473
+ await new Promise(resolve => requestAnimationFrame(resolve));
474
+ return this._waitForItems();
475
+ }
468
476
  }
469
477
  customElements.define('d2l-input-time', InputTime);
package/lang/fr.js CHANGED
@@ -120,7 +120,7 @@ export default {
120
120
  "components.selection-controls.label": "Actions à sélectionner",
121
121
  "components.switch.visible": "Visible",
122
122
  "components.switch.visibleWithPeriod": "Visible.",
123
- "components.switch.hidden": "Masqué(e)",
123
+ "components.switch.hidden": "Masqué",
124
124
  "components.switch.conditions": "Les conditions doivent être remplies",
125
125
  "components.table-col-sort-button.addSortOrder": "Sélectionner pour ajouter un ordre de tri",
126
126
  "components.table-col-sort-button.changeSortOrder": "Sélectionner pour modifier l'ordre de tri",
package/lang/hi.js CHANGED
@@ -43,7 +43,7 @@ export default {
43
43
  "components.form-element.input.number.rangeUnderflow": "{minExclusive, select, true {संख्या {min} से ज़्यादा होनी चाहिए.} other {संख्या {min} से ज़्यादा या उसके बराबर होनी चाहिए.}}",
44
44
  "components.form-element.input.text.tooShort": "{label} कम से कम {minlength} वर्णों का होना चाहिए",
45
45
  "components.form-element.input.url.typeMismatch": "URL मान्य नहीं है",
46
- "components.form-element.valueMissing": "{label} ज़रूरी है",
46
+ "components.form-element.valueMissing": "{label} ज़रूरी है",
47
47
  "components.form-error-summary.errorSummary": "{count, plural, one {आपके द्वारा सबमिट की गई जानकारी में {count} त्रुटियाँ पाई गईं} other {आपके द्वारा सबमिट की गई जानकारी में {count} त्रुटियाँ पाई गईं}}",
48
48
  "components.form-error-summary.text": "त्रुटि विवरण टॉगल करें",
49
49
  "components.input-color.backgroundColor": "पृष्ठभूमि का रंग",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightspace-ui/core",
3
- "version": "3.75.1",
3
+ "version": "3.75.2",
4
4
  "description": "A collection of accessible, free, open-source web components for building Brightspace applications",
5
5
  "type": "module",
6
6
  "repository": "https://github.com/BrightspaceUI/core.git",
@@ -47,16 +47,13 @@
47
47
  "devDependencies": {
48
48
  "@brightspace-ui/stylelint-config": "^1",
49
49
  "@brightspace-ui/testing": "^1",
50
- "@eslint/compat": "^1",
51
- "@eslint/eslintrc": "^3",
52
- "@eslint/js": "^9",
53
50
  "@rollup/plugin-dynamic-import-vars": "^2",
54
51
  "@rollup/plugin-node-resolve": "^15",
55
52
  "@rollup/plugin-replace": "^6",
56
53
  "@web/dev-server": "^0.4",
57
54
  "chalk": "^5",
58
55
  "eslint": "^9",
59
- "eslint-config-brightspace": "^1.2.1",
56
+ "eslint-config-brightspace": "^2.0.0",
60
57
  "glob-all": "^3",
61
58
  "messageformat-validator": "^2",
62
59
  "rollup": "^4",