@brightspace-ui/core 1.183.2 → 1.184.3

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.
@@ -30,7 +30,7 @@ class FilterSearchDemo extends LitElement {
30
30
  <d2l-filter-dimension-set-value key="instructor" text="Instructor"></d2l-filter-dimension-set-value>
31
31
  <d2l-filter-dimension-set-value key="student" text="Student"></d2l-filter-dimension-set-value>
32
32
  </d2l-filter-dimension-set>
33
- <d2l-filter-dimension-set key="event" text="Event on Search" search-type="manual">
33
+ <d2l-filter-dimension-set key="event" text="Event on Search" select-all search-type="manual">
34
34
  ${this._fullData.map(value => html`
35
35
  <d2l-filter-dimension-set-value key="${value.key}" text="${value.text}" ?selected="${value.selected}"></d2l-filter-dimension-set-value>
36
36
  `)}
@@ -24,6 +24,8 @@ import { LocalizeCoreElement } from '../../lang/localize-core-element.js';
24
24
  import { offscreenStyles } from '../offscreen/offscreen.js';
25
25
  import { RtlMixin } from '../../mixins/rtl-mixin.js';
26
26
 
27
+ const ARROWLEFT_KEY_CODE = 37;
28
+ const ESCAPE_KEY_CODE = 27;
27
29
  const SET_DIMENSION_ID_PREFIX = 'list-';
28
30
 
29
31
  /**
@@ -201,8 +203,10 @@ class Filter extends LocalizeCoreElement(RtlMixin(LitElement)) {
201
203
  }
202
204
  return html`
203
205
  <d2l-hierarchical-view
206
+ @d2l-hierarchical-view-hide-start="${this._handleDimensionHideStart}"
204
207
  @d2l-hierarchical-view-show-complete="${this._handleDimensionShowComplete}"
205
208
  @d2l-hierarchical-view-show-start="${this._handleDimensionShowStart}"
209
+ @keyup="${this._handleDimensionHideKeyPress}"
206
210
  data-key="${dimension.key}">
207
211
  ${dimensionHTML}
208
212
  </d2l-hierarchical-view>
@@ -259,11 +263,10 @@ class Filter extends LocalizeCoreElement(RtlMixin(LitElement)) {
259
263
  </d2l-input-search>
260
264
  `;
261
265
 
262
- const selectAll = !dimension.selectAllIdPrefix || dimension.searchValue ? null : html`
266
+ const selectAll = !dimension.selectAllIdPrefix || dimension.searchValue || dimension.loading || this._isDimensionEmpty(dimension) ? null : html`
263
267
  <div class="d2l-filter-dimension-select-all">
264
268
  <d2l-selection-select-all
265
- selection-for="${dimension.selectAllIdPrefix}${dimension.key}"
266
- ?disabled="${dimension.loading || this._isDimensionEmpty(dimension)}">
269
+ selection-for="${dimension.selectAllIdPrefix}${dimension.key}">
267
270
  </d2l-selection-select-all>
268
271
  <d2l-selection-summary
269
272
  selection-for="${dimension.selectAllIdPrefix}${dimension.key}"
@@ -292,7 +295,7 @@ class Filter extends LocalizeCoreElement(RtlMixin(LitElement)) {
292
295
  `;
293
296
 
294
297
  return html`
295
- <div slot="header">
298
+ <div slot="header" @keyup="${this._handleDimensionHideKeyPress}">
296
299
  ${header}
297
300
  ${actions}
298
301
  </div>
@@ -490,6 +493,16 @@ class Filter extends LocalizeCoreElement(RtlMixin(LitElement)) {
490
493
 
491
494
  _handleDimensionHide() {
492
495
  this.shadowRoot.querySelector(`d2l-hierarchical-view[data-key="${this._activeDimensionKey}"]`).hide();
496
+ }
497
+
498
+ _handleDimensionHideKeyPress(e) {
499
+ if (this._activeDimensionKey && (e.keyCode === ARROWLEFT_KEY_CODE || e.keyCode === ESCAPE_KEY_CODE)) {
500
+ e.stopPropagation();
501
+ this._handleDimensionHide();
502
+ }
503
+ }
504
+
505
+ _handleDimensionHideStart() {
493
506
  this._activeDimensionKey = null;
494
507
  }
495
508
 
@@ -1,10 +1,13 @@
1
+ import { isFramed } from './framed.js';
2
+
1
3
  let ifrauBackdropService;
2
4
 
3
5
  export async function tryGetIfrauBackdropService() {
4
- if (!window.ifrauclient) return null;
6
+ if (!await isFramed()) return null;
5
7
  if (ifrauBackdropService) return ifrauBackdropService;
6
8
 
7
- const ifrauClient = await window.ifrauclient().connect();
9
+ const ifrau = await import('ifrau/client/slim.js');
10
+ const ifrauClient = await new ifrau.SlimClient().connect();
8
11
  ifrauBackdropService = await ifrauClient.getService('dialogWC', '0.1');
9
12
 
10
13
  return ifrauBackdropService;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightspace-ui/core",
3
- "version": "1.183.2",
3
+ "version": "1.184.3",
4
4
  "description": "A collection of accessible, free, open-source web components for building Brightspace applications",
5
5
  "repository": "https://github.com/BrightspaceUI/core.git",
6
6
  "publishConfig": {
@@ -65,6 +65,7 @@
65
65
  "@open-wc/dedupe-mixin": "^1",
66
66
  "@webcomponents/shadycss": "^1",
67
67
  "focus-visible": "^5",
68
+ "ifrau": "^0.39",
68
69
  "intl-messageformat": "^7",
69
70
  "lit-element": "^2",
70
71
  "lit-html": "^1.4.1",