@brightspace-ui/core 3.79.7 → 3.80.0
Sign up to get free protection for your applications and to get access to all the features.
@@ -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);
|
@@ -453,11 +459,11 @@ export const DialogMixin = superclass => class extends RtlMixin(superclass) {
|
|
453
459
|
if (reduceMotion) await new Promise(resolve => requestAnimationFrame(resolve));
|
454
460
|
else await animPromise;
|
455
461
|
|
456
|
-
const flag = window.D2L?.LP?.Web?.UI?.Flags.Flag('GAUD-7397-dialog-resize-
|
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
|
464
|
+
await this.waitForUpdateComplete();
|
465
|
+
await this._updateSize();
|
459
466
|
}
|
460
|
-
await this._updateSize();
|
461
467
|
/** Dispatched when the dialog is opened */
|
462
468
|
this.dispatchEvent(new CustomEvent(
|
463
469
|
'd2l-dialog-open', { bubbles: true, composed: true }
|
@@ -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
|
-
|
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.
|
3
|
+
"version": "3.80.0",
|
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",
|