@ni/nimble-components 7.5.0 → 7.6.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.
- package/dist/all-components-bundle.js +11 -1
- package/dist/all-components-bundle.js.map +1 -1
- package/dist/all-components-bundle.min.js +1 -1
- package/dist/all-components-bundle.min.js.map +1 -1
- package/dist/esm/drawer/index.d.ts +6 -0
- package/dist/esm/drawer/index.js +11 -1
- package/dist/esm/drawer/index.js.map +1 -1
- package/dist/esm/nimble-components/src/drawer/index.d.ts +6 -0
- package/package.json +1 -1
|
@@ -14932,6 +14932,7 @@
|
|
|
14932
14932
|
this.propertiesToWatch = ['hidden', 'location', 'state'];
|
|
14933
14933
|
this.animationDurationMilliseconds = animationDurationWhenDisabledMilliseconds;
|
|
14934
14934
|
}
|
|
14935
|
+
/** @internal */
|
|
14935
14936
|
connectedCallback() {
|
|
14936
14937
|
// disable trapFocus before super.connectedCallback as FAST Dialog will immediately queue work to
|
|
14937
14938
|
// change focus if it's true before connectedCallback
|
|
@@ -14949,6 +14950,7 @@
|
|
|
14949
14950
|
this.propertyChangeSubscriber = subscriber;
|
|
14950
14951
|
this.propertyChangeNotifier = notifier;
|
|
14951
14952
|
}
|
|
14953
|
+
/** @internal */
|
|
14952
14954
|
disconnectedCallback() {
|
|
14953
14955
|
super.disconnectedCallback();
|
|
14954
14956
|
this.cancelCurrentAnimation();
|
|
@@ -14970,8 +14972,16 @@
|
|
|
14970
14972
|
// Not calling super.hide() as that will immediately hide the drawer, whereas 'Closing' state will animate
|
|
14971
14973
|
this.state = DrawerState.Closing;
|
|
14972
14974
|
}
|
|
14975
|
+
/**
|
|
14976
|
+
* Handler for overlay clicks (user-initiated dismiss requests) only.
|
|
14977
|
+
* @internal
|
|
14978
|
+
*/
|
|
14973
14979
|
dismiss() {
|
|
14974
|
-
|
|
14980
|
+
const shouldDismiss = this.$emit('cancel', {},
|
|
14981
|
+
// Aligned with the configuration of HTMLDialogElement cancel event:
|
|
14982
|
+
// https://developer.mozilla.org/en-US/docs/Web/API/HTMLDialogElement/cancel_event
|
|
14983
|
+
{ bubbles: false, cancelable: true, composed: false });
|
|
14984
|
+
if (shouldDismiss && !this.preventDismiss) {
|
|
14975
14985
|
super.dismiss();
|
|
14976
14986
|
this.hide();
|
|
14977
14987
|
}
|