@brightspace-ui/core 3.79.8 → 3.79.9

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.
@@ -149,6 +149,12 @@ export const DialogMixin = superclass => class extends RtlMixin(superclass) {
149
149
  });
150
150
  }
151
151
 
152
+ async waitForUpdateComplete() {
153
+ const predicate = () => true;
154
+ const composedChildren = getComposedChildren(this, predicate);
155
+ await Promise.all(composedChildren.map(child => waitForElem(child, predicate)));
156
+ }
157
+
152
158
  _addHandlers() {
153
159
  window.addEventListener('resize', this._updateSize);
154
160
  this.addEventListener('touchstart', this._handleTouchStart);
@@ -455,7 +461,7 @@ export const DialogMixin = superclass => class extends RtlMixin(superclass) {
455
461
 
456
462
  const flag = window.D2L?.LP?.Web?.UI?.Flags.Flag('GAUD-7397-dialog-resize-update-complete', true) ?? true;
457
463
  if (flag) {
458
- await this.#waitForUpdateComplete();
464
+ await this.waitForUpdateComplete();
459
465
  await this._updateSize();
460
466
  }
461
467
  /** Dispatched when the dialog is opened */
@@ -587,9 +593,4 @@ export const DialogMixin = superclass => class extends RtlMixin(superclass) {
587
593
  });
588
594
  }
589
595
 
590
- async #waitForUpdateComplete() {
591
- const predicate = () => true;
592
- const composedChildren = getComposedChildren(this, predicate);
593
- await Promise.all(composedChildren.map(child => waitForElem(child, predicate)));
594
- }
595
596
  };
@@ -205,7 +205,12 @@ class Dialog extends PropertyRequiredMixin(LocalizeCoreElement(AsyncContainerMix
205
205
  super.updated(changedProperties);
206
206
  if (!changedProperties.has('asyncState')) return;
207
207
  if (this.asyncState === asyncStates.complete) {
208
- this.resize();
208
+ const flag = window.D2L?.LP?.Web?.UI?.Flags.Flag('GAUD-7397-dialog-resize-update-complete', true) ?? true;
209
+ if (flag) {
210
+ this.waitForUpdateComplete().then(() => this.resize());
211
+ } else {
212
+ this.resize();
213
+ }
209
214
  }
210
215
  }
211
216
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightspace-ui/core",
3
- "version": "3.79.8",
3
+ "version": "3.79.9",
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",