@brightspace-ui/core 3.93.0 → 3.93.1

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.
@@ -31,7 +31,7 @@
31
31
  <d2l-filter-dimension-set-value key="art" text="Art" count="12"></d2l-filter-dimension-set-value>
32
32
  <d2l-filter-dimension-set-value key="astronomy" text="Astronomy" count="2" selected></d2l-filter-dimension-set-value>
33
33
  <d2l-filter-dimension-set-value key="biology" text="Biology" count="15"></d2l-filter-dimension-set-value>
34
- <d2l-filter-dimension-set-value key="chemistry" text="Chemistry" count="1"disabled></d2l-filter-dimension-set-value>
34
+ <d2l-filter-dimension-set-value key="chemistry" text="Chemistry" count="1" disabled selected></d2l-filter-dimension-set-value>
35
35
  <d2l-filter-dimension-set-value key="drama" text="Drama" count="23" disabled></d2l-filter-dimension-set-value>
36
36
  <d2l-filter-dimension-set-value key="english" text="English" count="100"></d2l-filter-dimension-set-value>
37
37
  <d2l-filter-dimension-set-value key="how-to" text="How To Write a How To Article With a Flashy Title" count="100"></d2l-filter-dimension-set-value>
@@ -52,17 +52,31 @@ class SelectAll extends FocusMixin(LocalizeCoreElement(SelectionObserverMixin(Li
52
52
  return html`
53
53
  <d2l-input-checkbox
54
54
  aria-label="${this.localize('components.selection.select-all')}"
55
- @change="${this._handleCheckboxChange}"
56
- ?checked="${this.selectionInfo.state === SelectionInfo.states.all || this.selectionInfo.state === SelectionInfo.states.allPages}"
55
+ @change="${this.#handleCheckboxChange}"
56
+ ?checked="${this.#getIsChecked()}"
57
57
  ?disabled="${this.disabled}"
58
58
  description="${ifDefined(this.selectionInfo.state !== SelectionInfo.states.none ? summary : undefined)}"
59
- ?indeterminate="${this.selectionInfo.state === SelectionInfo.states.some}">
59
+ ?indeterminate="${this.#getIsIndeterminate()}">
60
60
  </d2l-input-checkbox>
61
61
  `;
62
62
  }
63
63
 
64
- _handleCheckboxChange(e) {
65
- if (this._provider) this._provider.setSelectionForAll(e.target.checked, false);
64
+ #getIsChecked() {
65
+ return this.selectionInfo.state === SelectionInfo.states.all || this.selectionInfo.state === SelectionInfo.states.allPages;
66
+ }
67
+
68
+ #getIsIndeterminate() {
69
+ return this.selectionInfo.state === SelectionInfo.states.some;
70
+ }
71
+
72
+ async #handleCheckboxChange(e) {
73
+ const checkbox = e.target;
74
+ if (this._provider) this._provider.setSelectionForAll(checkbox.checked, false);
75
+
76
+ // keep inner checkbox checked and indeterminate in sync with this.state
77
+ await this.updateComplete;
78
+ checkbox.checked = this.#getIsChecked();
79
+ checkbox.indeterminate = this.#getIsIndeterminate();
66
80
  }
67
81
 
68
82
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightspace-ui/core",
3
- "version": "3.93.0",
3
+ "version": "3.93.1",
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",