@brightspace-ui/core 3.256.0 → 3.257.0
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.
|
@@ -5,6 +5,7 @@ import { clearDismissible, setDismissible } from '../../helpers/dismissible.js';
|
|
|
5
5
|
import { findComposedAncestor, getComposedChildren, isComposedAncestor } from '../../helpers/dom.js';
|
|
6
6
|
import { getComposedActiveElement, getFirstFocusableDescendant, getFirstFocusableRelative, getNextFocusable, isFocusable } from '../../helpers/focus.js';
|
|
7
7
|
import { classMap } from 'lit/directives/class-map.js';
|
|
8
|
+
import { getFlag } from '../../helpers/flags.js';
|
|
8
9
|
import { getUniqueId } from '../../helpers/uniqueId.js';
|
|
9
10
|
import { html } from 'lit';
|
|
10
11
|
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
@@ -25,6 +26,8 @@ const reduceMotion = matchMedia('(prefers-reduced-motion: reduce)').matches;
|
|
|
25
26
|
const abortAction = 'abort';
|
|
26
27
|
const defaultMargin = { top: 75, right: 30, bottom: 30, left: 30 };
|
|
27
28
|
|
|
29
|
+
const closeDialogWhenDisconnectedFlag = getFlag('GAUD-10113-close-dialog-when-disconnected', true);
|
|
30
|
+
|
|
28
31
|
export const DialogMixin = superclass => class extends superclass {
|
|
29
32
|
|
|
30
33
|
static get properties() {
|
|
@@ -107,6 +110,11 @@ export const DialogMixin = superclass => class extends superclass {
|
|
|
107
110
|
disconnectedCallback() {
|
|
108
111
|
super.disconnectedCallback();
|
|
109
112
|
window.removeEventListener('d2l-mvc-dialog-open', this._handleMvcDialogOpen);
|
|
113
|
+
|
|
114
|
+
// If the dialog is disconnected before the close animation finishes
|
|
115
|
+
if (this.opened && closeDialogWhenDisconnectedFlag) {
|
|
116
|
+
this._handleClose();
|
|
117
|
+
}
|
|
110
118
|
}
|
|
111
119
|
|
|
112
120
|
async updated(changedProperties) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brightspace-ui/core",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.257.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",
|