@ni/nimble-components 11.11.0 → 11.12.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 +6 -10
- package/dist/all-components-bundle.js.map +1 -1
- package/dist/all-components-bundle.min.js +756 -757
- package/dist/all-components-bundle.min.js.map +1 -1
- package/dist/esm/dialog/index.d.ts +1 -5
- package/dist/esm/dialog/index.js +6 -9
- package/dist/esm/dialog/index.js.map +1 -1
- package/dist/esm/dialog/template.js +0 -1
- package/dist/esm/dialog/template.js.map +1 -1
- package/package.json +1 -1
|
@@ -23,6 +23,7 @@ export interface ExtendedDialog extends HTMLDialogElement {
|
|
|
23
23
|
* A nimble-styled dialog.
|
|
24
24
|
*/
|
|
25
25
|
export declare class Dialog<CloseReason = void> extends FoundationElement {
|
|
26
|
+
static readonly USER_DISMISSED: symbol;
|
|
26
27
|
/**
|
|
27
28
|
* @public
|
|
28
29
|
* @description
|
|
@@ -40,7 +41,6 @@ export declare class Dialog<CloseReason = void> extends FoundationElement {
|
|
|
40
41
|
*/
|
|
41
42
|
get open(): boolean;
|
|
42
43
|
private resolveShow?;
|
|
43
|
-
private closeReason;
|
|
44
44
|
/**
|
|
45
45
|
* Opens the dialog
|
|
46
46
|
* @returns Promise that is resolved when the dialog is closed. The value of the resolved Promise is the reason value passed to the close() method, or USER_DISMISSED if the dialog was closed via the ESC key.
|
|
@@ -51,10 +51,6 @@ export declare class Dialog<CloseReason = void> extends FoundationElement {
|
|
|
51
51
|
* @param reason An optional value indicating how/why the dialog was closed.
|
|
52
52
|
*/
|
|
53
53
|
close(reason: CloseReason): void;
|
|
54
|
-
/**
|
|
55
|
-
* @internal
|
|
56
|
-
*/
|
|
57
|
-
closeHandler(): boolean;
|
|
58
54
|
/**
|
|
59
55
|
* @internal
|
|
60
56
|
*/
|
package/dist/esm/dialog/index.js
CHANGED
|
@@ -49,16 +49,9 @@ export class Dialog extends FoundationElement {
|
|
|
49
49
|
if (!this.open) {
|
|
50
50
|
throw new Error('Dialog is not open');
|
|
51
51
|
}
|
|
52
|
-
this.closeReason = reason;
|
|
53
52
|
this.dialogElement.close();
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* @internal
|
|
57
|
-
*/
|
|
58
|
-
closeHandler() {
|
|
59
|
-
this.resolveShow(this.closeReason);
|
|
53
|
+
this.resolveShow(reason);
|
|
60
54
|
this.resolveShow = undefined;
|
|
61
|
-
return true;
|
|
62
55
|
}
|
|
63
56
|
/**
|
|
64
57
|
* @internal
|
|
@@ -68,11 +61,15 @@ export class Dialog extends FoundationElement {
|
|
|
68
61
|
event.preventDefault();
|
|
69
62
|
}
|
|
70
63
|
else {
|
|
71
|
-
this.
|
|
64
|
+
this.resolveShow(USER_DISMISSED);
|
|
65
|
+
this.resolveShow = undefined;
|
|
72
66
|
}
|
|
73
67
|
return true;
|
|
74
68
|
}
|
|
75
69
|
}
|
|
70
|
+
// We want the member to match the name of the constant
|
|
71
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
72
|
+
Dialog.USER_DISMISSED = USER_DISMISSED;
|
|
76
73
|
__decorate([
|
|
77
74
|
attr({ attribute: 'prevent-dismiss', mode: 'boolean' })
|
|
78
75
|
], Dialog.prototype, "preventDismiss", void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/dialog/index.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAC/C,OAAO,EACH,WAAW,EACX,6BAA6B,EAC7B,YAAY,EACZ,iBAAiB,EACpB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAQtC;;;GAGG;AACH,MAAM,CAAC,MAAM,cAAc,GAAkB,MAAM,CAAC,gBAAgB,CAAC,CAAC;AAatE;;GAEG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M,CAAC,CAAC;QAC1B,IAAI,CAAC,WAAW,GAAG,SAAS,CAAC;IACjC,CAAC;IAED;;OAEG;IACI,aAAa,CAAC,KAAY;QAC7B,IAAI,IAAI,CAAC,cAAc,EAAE;YACrB,KAAK,CAAC,cAAc,EAAE,CAAC;SAC1B;aAAM;YACH,IAAI,CAAC,WAAY,CAAC,cAAc,CAAC,CAAC;YAClC,IAAI,CAAC,WAAW,GAAG,SAAS,CAAC;SAChC;QACD,OAAO,IAAI,CAAC;IAChB,CAAC;;AAlED,uDAAuD;AACvD,gEAAgE;AACzC,qBAAc,GAAG,cAAc,CAAC;AAQvD;IADC,IAAI,CAAC,EAAE,SAAS,EAAE,iBAAiB,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;8CAC1B;AA6DlC,WAAW,CAAC,MAAM,EAAE,6BAA6B,CAAC,CAAC;AAEnD,MAAM,YAAY,GAAG,MAAM,CAAC,OAAO,CAAC;IAChC,QAAQ,EAAE,QAAQ;IAClB,QAAQ;IACR,MAAM;IACN,SAAS,EAAE,MAAM;CACpB,CAAC,CAAC;AAEH,YAAY,CAAC,WAAW,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,YAAY,EAAE,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"template.js","sourceRoot":"","sources":["../../../src/dialog/template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAC;AAGpD,MAAM,CAAC,MAAM,QAAQ,GAAG,IAAI,CAAQ;;;cAGtB,GAAG,CAAC,eAAe,CAAC;;0BAER,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS;uBACnB,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,KAAK,CAAC
|
|
1
|
+
{"version":3,"file":"template.js","sourceRoot":"","sources":["../../../src/dialog/template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAC;AAGpD,MAAM,CAAC,MAAM,QAAQ,GAAG,IAAI,CAAQ;;;cAGtB,GAAG,CAAC,eAAe,CAAC;;0BAER,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS;uBACnB,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,KAAK,CAAC;;;;;CAKxD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ni/nimble-components",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.12.0",
|
|
4
4
|
"description": "Styled web components for the NI Nimble Design System",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "npm run generate-icons && npm run build-components && npm run bundle-components && npm run generate-scss && npm run build-storybook",
|