@skyux/modals 5.8.2 → 5.9.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/bundles/skyux-modals.umd.js +19 -23
- package/documentation.json +156 -504
- package/esm2015/index.js +1 -1
- package/esm2015/index.js.map +1 -1
- package/esm2015/lib/modules/confirm/confirm-button-action.js.map +1 -1
- package/esm2015/lib/modules/confirm/confirm-button-config.js.map +1 -1
- package/esm2015/lib/modules/confirm/confirm-button.js.map +1 -1
- package/esm2015/lib/modules/confirm/confirm-closed-event-args.js.map +1 -1
- package/esm2015/lib/modules/confirm/confirm-config.js.map +1 -1
- package/esm2015/lib/modules/confirm/confirm-instance.js +2 -2
- package/esm2015/lib/modules/confirm/confirm-instance.js.map +1 -1
- package/esm2015/lib/modules/confirm/confirm-modal-context.js +3 -1
- package/esm2015/lib/modules/confirm/confirm-modal-context.js.map +1 -1
- package/esm2015/lib/modules/confirm/confirm-type.js +2 -3
- package/esm2015/lib/modules/confirm/confirm-type.js.map +1 -1
- package/esm2015/lib/modules/confirm/confirm.service.js +3 -4
- package/esm2015/lib/modules/confirm/confirm.service.js.map +1 -1
- package/esm2015/lib/modules/modal/modal-instance.js +0 -5
- package/esm2015/lib/modules/modal/modal-instance.js.map +1 -1
- package/esm2015/lib/modules/modal/modal.service.js +1 -1
- package/esm2015/lib/modules/modal/modal.service.js.map +1 -1
- package/fesm2015/skyux-modals.js +17 -20
- package/fesm2015/skyux-modals.js.map +1 -1
- package/index.d.ts +0 -1
- package/lib/modules/confirm/confirm-button-action.d.ts +3 -0
- package/lib/modules/confirm/confirm-button-config.d.ts +6 -7
- package/lib/modules/confirm/confirm-button.d.ts +4 -0
- package/lib/modules/confirm/confirm-closed-event-args.d.ts +1 -1
- package/lib/modules/confirm/confirm-config.d.ts +3 -5
- package/lib/modules/confirm/confirm-instance.d.ts +2 -2
- package/lib/modules/confirm/confirm-modal-context.d.ts +3 -0
- package/lib/modules/confirm/confirm-type.d.ts +2 -3
- package/lib/modules/confirm/confirm.service.d.ts +3 -4
- package/lib/modules/modal/modal-instance.d.ts +0 -3
- package/lib/modules/modal/modal.service.d.ts +1 -1
- package/package.json +5 -5
package/esm2015/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
// TODO: confirm-button is internal and should be removed in a future version
|
|
1
2
|
export * from './lib/modules/confirm/confirm-button';
|
|
2
3
|
export * from './lib/modules/confirm/confirm-button-action';
|
|
3
4
|
export * from './lib/modules/confirm/confirm-button-config';
|
|
4
5
|
export * from './lib/modules/confirm/confirm-closed-event-args';
|
|
5
6
|
export * from './lib/modules/confirm/confirm-config';
|
|
6
7
|
export * from './lib/modules/confirm/confirm-instance';
|
|
7
|
-
export * from './lib/modules/confirm/confirm-modal-context';
|
|
8
8
|
export * from './lib/modules/confirm/confirm-type';
|
|
9
9
|
export * from './lib/modules/confirm/confirm.module';
|
|
10
10
|
export * from './lib/modules/confirm/confirm.service';
|
package/esm2015/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/components/modals/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,sCAAsC,CAAC;AACrD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,iDAAiD,CAAC;AAChE,cAAc,sCAAsC,CAAC;AACrD,cAAc,wCAAwC,CAAC;AACvD,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/components/modals/src/index.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,cAAc,sCAAsC,CAAC;AACrD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,iDAAiD,CAAC;AAChE,cAAc,sCAAsC,CAAC;AACrD,cAAc,wCAAwC,CAAC;AACvD,cAAc,oCAAoC,CAAC;AACnD,cAAc,sCAAsC,CAAC;AACrD,cAAc,uCAAuC,CAAC;AAEtD,cAAc,gDAAgD,CAAC;AAC/D,cAAc,sCAAsC,CAAC;AACrD,cAAc,yCAAyC,CAAC;AACxD,cAAc,wCAAwC,CAAC;AACvD,cAAc,oCAAoC,CAAC;AACnD,cAAc,qCAAqC,CAAC;AACpD,cAAc,kCAAkC,CAAC;AACjD,cAAc,mCAAmC,CAAC;AAElD,0FAA0F;AAC1F,2EAA2E;AAC3E,OAAO,EAAE,mBAAmB,IAAI,EAAE,EAAE,MAAM,yCAAyC,CAAC;AACpF,OAAO,EAAE,wBAAwB,IAAI,EAAE,EAAE,MAAM,6CAA6C,CAAC;AAC7F,OAAO,EAAE,uBAAuB,IAAI,EAAE,EAAE,MAAM,4CAA4C,CAAC;AAC3F,OAAO,EAAE,uBAAuB,IAAI,EAAE,EAAE,MAAM,4CAA4C,CAAC;AAC3F,OAAO,EAAE,iBAAiB,IAAI,EAAE,EAAE,MAAM,qCAAqC,CAAC","sourcesContent":["// TODO: confirm-button is internal and should be removed in a future version\nexport * from './lib/modules/confirm/confirm-button';\nexport * from './lib/modules/confirm/confirm-button-action';\nexport * from './lib/modules/confirm/confirm-button-config';\nexport * from './lib/modules/confirm/confirm-closed-event-args';\nexport * from './lib/modules/confirm/confirm-config';\nexport * from './lib/modules/confirm/confirm-instance';\nexport * from './lib/modules/confirm/confirm-type';\nexport * from './lib/modules/confirm/confirm.module';\nexport * from './lib/modules/confirm/confirm.service';\n\nexport * from './lib/modules/modal/modal-before-close-handler';\nexport * from './lib/modules/modal/modal-close-args';\nexport * from './lib/modules/modal/modal-configuration';\nexport * from './lib/modules/modal/modal-host.service';\nexport * from './lib/modules/modal/modal-instance';\nexport * from './lib/modules/modal/modal.interface';\nexport * from './lib/modules/modal/modal.module';\nexport * from './lib/modules/modal/modal.service';\n\n// Components and directives must be exported to support Angular's \"partial\" Ivy compiler.\n// Obscure names are used to indicate types are not part of the public API.\nexport { SkyConfirmComponent as λ1 } from './lib/modules/confirm/confirm.component';\nexport { SkyModalContentComponent as λ2 } from './lib/modules/modal/modal-content.component';\nexport { SkyModalFooterComponent as λ3 } from './lib/modules/modal/modal-footer.component';\nexport { SkyModalHeaderComponent as λ4 } from './lib/modules/modal/modal-header.component';\nexport { SkyModalComponent as λ5 } from './lib/modules/modal/modal.component';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"confirm-button-action.js","sourceRoot":"","sources":["../../../../../../../../libs/components/modals/src/lib/modules/confirm/confirm-button-action.ts"],"names":[],"mappings":"","sourcesContent":["
|
|
1
|
+
{"version":3,"file":"confirm-button-action.js","sourceRoot":"","sources":["../../../../../../../../libs/components/modals/src/lib/modules/confirm/confirm-button-action.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * @internal\n */\nexport type SkyConfirmButtonAction = 'ok' | 'yes' | 'no' | 'cancel';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"confirm-button-config.js","sourceRoot":"","sources":["../../../../../../../../libs/components/modals/src/lib/modules/confirm/confirm-button-config.ts"],"names":[],"mappings":"","sourcesContent":["export interface SkyConfirmButtonConfig {\n /**\n * Specifies an identifier to return when users select the button to close the\n *
|
|
1
|
+
{"version":3,"file":"confirm-button-config.js","sourceRoot":"","sources":["../../../../../../../../libs/components/modals/src/lib/modules/confirm/confirm-button-config.ts"],"names":[],"mappings":"","sourcesContent":["export interface SkyConfirmButtonConfig {\n /**\n * Specifies an identifier to return when users select the button to close the\n * dialog. This is useful to determine which button users select.\n */\n action: string;\n /**\n * Specifies the label for the button.\n */\n text: string;\n /**\n * Specifies a style to apply to the button. The valid options are `primary` for\n * the button that triggers the recommended or most-common action, `default` for\n * buttons that trigger less-common actions, and `link` for a button that\n * closes the dialog.\n */\n styleType?: 'primary' | 'default' | 'link' | string;\n /**\n * Indicates whether to place focus on this button by default.\n */\n autofocus?: boolean;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"confirm-button.js","sourceRoot":"","sources":["../../../../../../../../libs/components/modals/src/lib/modules/confirm/confirm-button.ts"],"names":[],"mappings":"","sourcesContent":["import { SkyConfirmButtonAction } from './confirm-button-action';\n\nexport interface SkyConfirmButton {\n action: SkyConfirmButtonAction;\n styleType: string;\n text: string;\n autofocus?: boolean;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"confirm-button.js","sourceRoot":"","sources":["../../../../../../../../libs/components/modals/src/lib/modules/confirm/confirm-button.ts"],"names":[],"mappings":"","sourcesContent":["import { SkyConfirmButtonAction } from './confirm-button-action';\n\n/**\n * The view model for button configuration that the confirm component uses.\n * @internal\n */\nexport interface SkyConfirmButton {\n action: SkyConfirmButtonAction;\n styleType: string;\n text: string;\n autofocus?: boolean;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"confirm-closed-event-args.js","sourceRoot":"","sources":["../../../../../../../../libs/components/modals/src/lib/modules/confirm/confirm-closed-event-args.ts"],"names":[],"mappings":"","sourcesContent":["export interface SkyConfirmCloseEventArgs {\n /**\n * The identifier for the button that users selected to close the
|
|
1
|
+
{"version":3,"file":"confirm-closed-event-args.js","sourceRoot":"","sources":["../../../../../../../../libs/components/modals/src/lib/modules/confirm/confirm-closed-event-args.ts"],"names":[],"mappings":"","sourcesContent":["export interface SkyConfirmCloseEventArgs {\n /**\n * The identifier for the button that users selected to close the dialog.\n */\n action: string;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"confirm-config.js","sourceRoot":"","sources":["../../../../../../../../libs/components/modals/src/lib/modules/confirm/confirm-config.ts"],"names":[],"mappings":"","sourcesContent":["import { SkyConfirmButtonConfig } from './confirm-button-config';\nimport { SkyConfirmType } from './confirm-type';\n\nexport interface SkyConfirmConfig {\n /**\n * Specifies the message to display in bold at the top of the dialog.\n * @required\n */\n message: string;\n /**\n * Specifies secondary text to display under the primary message.\n */\n body?: string;\n /**\n * Specifies
|
|
1
|
+
{"version":3,"file":"confirm-config.js","sourceRoot":"","sources":["../../../../../../../../libs/components/modals/src/lib/modules/confirm/confirm-config.ts"],"names":[],"mappings":"","sourcesContent":["import { SkyConfirmButtonConfig } from './confirm-button-config';\nimport { SkyConfirmType } from './confirm-type';\n\nexport interface SkyConfirmConfig {\n /**\n * Specifies the message to display in bold at the top of the dialog.\n * @required\n */\n message: string;\n /**\n * Specifies secondary text to display under the primary message.\n */\n body?: string;\n /**\n * Specifies a list of buttons to display when the `type` property is set to `SkyConfirmType.Custom`.\n */\n buttons?: SkyConfirmButtonConfig[];\n /**\n * Indicates whether to preserve whitespace and new lines inside the dialog.\n * @default false\n */\n preserveWhiteSpace?: boolean;\n /**\n * Specifies a preset button configuration for the dialog.\n */\n type?: SkyConfirmType;\n}\n"]}
|
|
@@ -2,9 +2,9 @@ import { EventEmitter } from '@angular/core';
|
|
|
2
2
|
export class SkyConfirmInstance {
|
|
3
3
|
constructor() {
|
|
4
4
|
/**
|
|
5
|
-
* Fires when users select an action to close the
|
|
5
|
+
* Fires when users select an action to close the dialog. This event
|
|
6
6
|
* returns a `SkyConfirmCloseEventArgs` object with information about the button that
|
|
7
|
-
* users select.
|
|
7
|
+
* users select. It returns the `'cancel'` action when users press the <kbd>Escape</kbd> key.
|
|
8
8
|
*/
|
|
9
9
|
this.closed = new EventEmitter();
|
|
10
10
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"confirm-instance.js","sourceRoot":"","sources":["../../../../../../../../libs/components/modals/src/lib/modules/confirm/confirm-instance.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAI7C,MAAM,OAAO,kBAAkB;IAA/B;QACE;;;;WAIG;QACI,WAAM,GAAG,IAAI,YAAY,EAA4B,CAAC;IAC/D,CAAC;CAAA","sourcesContent":["import { EventEmitter } from '@angular/core';\n\nimport { SkyConfirmCloseEventArgs } from './confirm-closed-event-args';\n\nexport class SkyConfirmInstance {\n /**\n * Fires when users select an action to close the
|
|
1
|
+
{"version":3,"file":"confirm-instance.js","sourceRoot":"","sources":["../../../../../../../../libs/components/modals/src/lib/modules/confirm/confirm-instance.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAI7C,MAAM,OAAO,kBAAkB;IAA/B;QACE;;;;WAIG;QACI,WAAM,GAAG,IAAI,YAAY,EAA4B,CAAC;IAC/D,CAAC;CAAA","sourcesContent":["import { EventEmitter } from '@angular/core';\n\nimport { SkyConfirmCloseEventArgs } from './confirm-closed-event-args';\n\nexport class SkyConfirmInstance {\n /**\n * Fires when users select an action to close the dialog. This event\n * returns a `SkyConfirmCloseEventArgs` object with information about the button that\n * users select. It returns the `'cancel'` action when users press the <kbd>Escape</kbd> key.\n */\n public closed = new EventEmitter<SkyConfirmCloseEventArgs>();\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"confirm-modal-context.js","sourceRoot":"","sources":["../../../../../../../../libs/components/modals/src/lib/modules/confirm/confirm-modal-context.ts"],"names":[],"mappings":"AAIA
|
|
1
|
+
{"version":3,"file":"confirm-modal-context.js","sourceRoot":"","sources":["../../../../../../../../libs/components/modals/src/lib/modules/confirm/confirm-modal-context.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,MAAM,OAAO,sBAAsB;CAMlC","sourcesContent":["import { SkyConfirmButtonConfig } from './confirm-button-config';\nimport { SkyConfirmConfig } from './confirm-config';\nimport { SkyConfirmType } from './confirm-type';\n\n/**\n * @internal\n */\nexport class SkyConfirmModalContext implements SkyConfirmConfig {\n public message: string;\n public body: string;\n public buttons: SkyConfirmButtonConfig[];\n public preserveWhiteSpace: boolean;\n public type: SkyConfirmType;\n}\n"]}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
export var SkyConfirmType;
|
|
2
2
|
(function (SkyConfirmType) {
|
|
3
3
|
/**
|
|
4
|
-
* Allows you to define your own
|
|
5
|
-
* specify an array of `SkyConfirmButtonConfig` objects.
|
|
4
|
+
* Allows you to define your own buttons using the `buttons` property of `SkyConfirmConfig`.
|
|
6
5
|
*/
|
|
7
6
|
SkyConfirmType[SkyConfirmType["Custom"] = 0] = "Custom";
|
|
8
7
|
/**
|
|
9
|
-
* Displays one button with an **OK** label.
|
|
8
|
+
* Displays one button with an **OK** label and an `'ok'` action.
|
|
10
9
|
*/
|
|
11
10
|
SkyConfirmType[SkyConfirmType["OK"] = 1] = "OK";
|
|
12
11
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"confirm-type.js","sourceRoot":"","sources":["../../../../../../../../libs/components/modals/src/lib/modules/confirm/confirm-type.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,
|
|
1
|
+
{"version":3,"file":"confirm-type.js","sourceRoot":"","sources":["../../../../../../../../libs/components/modals/src/lib/modules/confirm/confirm-type.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,cAqBX;AArBD,WAAY,cAAc;IACxB;;OAEG;IACH,uDAAU,CAAA;IACV;;OAEG;IACH,+CAAM,CAAA;IACN;;;;OAIG;IACH,6DAAa,CAAA;IACb;;;;OAIG;IACH,iEAAe,CAAA;AACjB,CAAC,EArBW,cAAc,KAAd,cAAc,QAqBzB","sourcesContent":["export enum SkyConfirmType {\n /**\n * Allows you to define your own buttons using the `buttons` property of `SkyConfirmConfig`.\n */\n Custom = 0,\n /**\n * Displays one button with an **OK** label and an `'ok'` action.\n */\n OK = 1,\n /**\n * Displays two buttons with **Yes** and **Cancel** labels.\n * @deprecated Use the `Custom` type to follow the guidance that labels\n * should clearly indicate the actions that occur when users select buttons.\n */\n YesCancel = 2,\n /**\n * Displays three buttons with **Yes**, **No**, and **Cancel** labels.\n * @deprecated Use the `Custom` type to follow the guidance that labels\n * should clearly indicate the actions that occur when users select buttons.\n */\n YesNoCancel = 3,\n}\n"]}
|
|
@@ -6,16 +6,15 @@ import { SkyConfirmComponent } from './confirm.component';
|
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
import * as i1 from "../modal/modal.service";
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
10
|
-
* Within the service, you can specify the dialog's message and customize the button text.
|
|
9
|
+
* Launches a dialog.
|
|
11
10
|
*/
|
|
12
11
|
export class SkyConfirmService {
|
|
13
12
|
constructor(modalService) {
|
|
14
13
|
this.modalService = modalService;
|
|
15
14
|
}
|
|
16
15
|
/**
|
|
17
|
-
* Opens a
|
|
18
|
-
*
|
|
16
|
+
* Opens a dialog using the specified options.
|
|
17
|
+
* @param config Specifies configuration options for the dialog.
|
|
19
18
|
*/
|
|
20
19
|
open(config) {
|
|
21
20
|
const modalInstance = this.modalService.open(SkyConfirmComponent, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"confirm.service.js","sourceRoot":"","sources":["../../../../../../../../libs/components/modals/src/lib/modules/confirm/confirm.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAI3C,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAIzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;;;AAE1D
|
|
1
|
+
{"version":3,"file":"confirm.service.js","sourceRoot":"","sources":["../../../../../../../../libs/components/modals/src/lib/modules/confirm/confirm.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAI3C,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAIzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;;;AAE1D;;GAEG;AAOH,MAAM,OAAO,iBAAiB;IAC5B,YAAoB,YAA6B;QAA7B,iBAAY,GAAZ,YAAY,CAAiB;IAAG,CAAC;IAErD;;;OAGG;IACI,IAAI,CAAC,MAAwB;QAClC,MAAM,aAAa,GAAqB,IAAI,CAAC,YAAY,CAAC,IAAI,CAC5D,mBAAmB,EACnB;YACE,SAAS,EAAE;gBACT;oBACE,OAAO,EAAE,sBAAsB;oBAC/B,QAAQ,EAAE,MAAM;iBACjB;aACF;SACF,CACF,CAAC;QAEF,MAAM,eAAe,GAAG,IAAI,kBAAkB,EAAE,CAAC;QAEjD,aAAa,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,IAAuB,EAAE,EAAE;YACzD,IAAI,MAAM,GAA6B,IAAI,CAAC,IAAI,CAAC;YAEjD,0CAA0C;YAC1C,IAAI,MAAM,KAAK,SAAS,EAAE;gBACxB,MAAM,GAAG;oBACP,MAAM,EAAE,QAAQ;iBACjB,CAAC;aACH;YAED,eAAe,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YACpC,eAAe,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC;QACpC,CAAC,CAAC,CAAC;QAEH,OAAO,eAAe,CAAC;IACzB,CAAC;;+GArCU,iBAAiB;mHAAjB,iBAAiB,cAFhB,KAAK;4FAEN,iBAAiB;kBAN7B,UAAU;mBAAC;oBACV,gGAAgG;oBAChG,8FAA8F;oBAC9F,2FAA2F;oBAC3F,UAAU,EAAE,KAAK;iBAClB","sourcesContent":["import { Injectable } from '@angular/core';\n\nimport { SkyModalCloseArgs } from '../modal/modal-close-args';\nimport { SkyModalInstance } from '../modal/modal-instance';\nimport { SkyModalService } from '../modal/modal.service';\n\nimport { SkyConfirmCloseEventArgs } from './confirm-closed-event-args';\nimport { SkyConfirmConfig } from './confirm-config';\nimport { SkyConfirmInstance } from './confirm-instance';\nimport { SkyConfirmModalContext } from './confirm-modal-context';\nimport { SkyConfirmComponent } from './confirm.component';\n\n/**\n * Launches a dialog.\n */\n@Injectable({\n // Must be 'any' so that the modal component is created in the context of its module's injector.\n // If set to 'root', the component's dependency injections would only be derived from the root\n // injector and may loose context if the modal was opened from within a lazy-loaded module.\n providedIn: 'any',\n})\nexport class SkyConfirmService {\n constructor(private modalService: SkyModalService) {}\n\n /**\n * Opens a dialog using the specified options.\n * @param config Specifies configuration options for the dialog.\n */\n public open(config: SkyConfirmConfig): SkyConfirmInstance {\n const modalInstance: SkyModalInstance = this.modalService.open(\n SkyConfirmComponent,\n {\n providers: [\n {\n provide: SkyConfirmModalContext,\n useValue: config,\n },\n ],\n }\n );\n\n const confirmInstance = new SkyConfirmInstance();\n\n modalInstance.closed.subscribe((args: SkyModalCloseArgs) => {\n let result: SkyConfirmCloseEventArgs = args.data;\n\n // The modal was closed using the ESC key.\n if (result === undefined) {\n result = {\n action: 'cancel',\n };\n }\n\n confirmInstance.closed.emit(result);\n confirmInstance.closed.complete();\n });\n\n return confirmInstance;\n }\n}\n"]}
|
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
import { Subject } from 'rxjs';
|
|
2
2
|
import { SkyModalBeforeCloseHandler } from './modal-before-close-handler';
|
|
3
3
|
import { SkyModalCloseArgs } from './modal-close-args';
|
|
4
|
-
// TODO: this class won't show in the generated docs until this work is done:
|
|
5
|
-
// https://github.com/blackbaud/skyux-docs-tools/issues/30
|
|
6
|
-
/**
|
|
7
|
-
* Allows you to close the modal and return data from the launched modal.
|
|
8
|
-
*/
|
|
9
4
|
export class SkyModalInstance {
|
|
10
5
|
constructor() {
|
|
11
6
|
this._beforeClose = new Subject();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modal-instance.js","sourceRoot":"","sources":["../../../../../../../../libs/components/modals/src/lib/modules/modal/modal-instance.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,OAAO,EAAE,MAAM,MAAM,CAAC;AAE3C,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAC1E,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEvD,
|
|
1
|
+
{"version":3,"file":"modal-instance.js","sourceRoot":"","sources":["../../../../../../../../libs/components/modals/src/lib/modules/modal/modal-instance.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,OAAO,EAAE,MAAM,MAAM,CAAC;AAE3C,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAC1E,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEvD,MAAM,OAAO,gBAAgB;IAA7B;QAqCU,iBAAY,GAAG,IAAI,OAAO,EAA8B,CAAC;QAEzD,YAAO,GAAG,IAAI,OAAO,EAAqB,CAAC;QAE3C,gBAAW,GAAG,IAAI,OAAO,EAAU,CAAC;IAgF9C,CAAC;IAxHC;;;;;OAKG;IACH,IAAW,WAAW;QACpB,OAAO,IAAI,CAAC,YAAY,CAAC;IAC3B,CAAC;IAED;;;;;;;OAOG;IACH,IAAW,MAAM;QACf,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IAED;;;;OAIG;IACH,IAAW,UAAU;QACnB,OAAO,IAAI,CAAC,WAAW,CAAC;IAC1B,CAAC;IAaD;;;;;;;OAOG;IACI,KAAK,CACV,MAAY,EACZ,MAAe,EACf,iBAA2B;QAE3B,IAAI,MAAM,KAAK,SAAS,EAAE;YACxB,MAAM,GAAG,OAAO,CAAC;SAClB;QAED,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,iBAAiB,CAAC,CAAC;IACrD,CAAC;IAED;;;;;OAKG;IACI,MAAM,CAAC,MAAY;QACxB,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IACpC,CAAC;IAED;;;;;OAKG;IACI,IAAI,CAAC,MAAY;QACtB,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAClC,CAAC;IAED;;;;;;OAMG;IACI,QAAQ,CAAC,OAAgB;QAC9B,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACjC,CAAC;IAEO,UAAU,CAChB,IAAY,EACZ,MAAY,EACZ,iBAAiB,GAAG,KAAK;QAEzB,MAAM,IAAI,GAAG,IAAI,iBAAiB,EAAE,CAAC;QAErC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;QACnB,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC;QAEnB,IAAI,IAAI,CAAC,YAAY,CAAC,SAAS,CAAC,MAAM,KAAK,CAAC,IAAI,iBAAiB,EAAE;YACjE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;SACzB;aAAM;YACL,IAAI,CAAC,YAAY,CAAC,IAAI,CACpB,IAAI,0BAA0B,CAAC,GAAG,EAAE;gBAClC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;YAC1B,CAAC,EAAE,IAAI,CAAC,CACT,CAAC;SACH;IACH,CAAC;IAEO,YAAY,CAAC,IAAuB;QAC1C,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACxB,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC;QACxB,IAAI,CAAC,YAAY,CAAC,QAAQ,EAAE,CAAC;QAC7B,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,CAAC;IAC9B,CAAC;CACF","sourcesContent":["import { Observable, Subject } from 'rxjs';\n\nimport { SkyModalBeforeCloseHandler } from './modal-before-close-handler';\nimport { SkyModalCloseArgs } from './modal-close-args';\n\nexport class SkyModalInstance {\n /**\n * An event that the modal instance emits when it is about to close.\n * It emits a `SkyModalBeforeCloseHandler` object with a `closeModal` method\n * that closes the modal. If a subscription exists for this event,\n * the modal does not close until the subscriber calls the `closeModal` method.\n */\n public get beforeClose(): Observable<SkyModalBeforeCloseHandler> {\n return this._beforeClose;\n }\n\n /**\n * An event that the modal instance emits when it closes.\n * It emits a `SkyModalCloseArgs` object with a `data` property that includes\n * data passed from users on close or save and a `reason` property that indicates\n * whether the modal was saved or closed without saving.\n * The `reason` property accepts any string value.\n * Common examples include `\"cancel\"`, `\"close\"`, and `\"save\"`.\n */\n public get closed(): Observable<SkyModalCloseArgs> {\n return this._closed;\n }\n\n /**\n * An event that the modal instance emits when users click\n * the <i class=\"fa fa-question-circle\" aria-hidden=\"true\"></i> button.\n * If a `helpKey` parameter was specified, the `helpOpened` event broadcasts the `helpKey`.\n */\n public get helpOpened(): Observable<string> {\n return this._helpOpened;\n }\n\n /**\n * A direct reference to the provided component's class.\n */\n public componentInstance: any;\n\n private _beforeClose = new Subject<SkyModalBeforeCloseHandler>();\n\n private _closed = new Subject<SkyModalCloseArgs>();\n\n private _helpOpened = new Subject<string>();\n\n /**\n * Closes the modal instance.\n * @param result Specifies an object to emit to subscribers of the `closed` event of the\n * modal instance. The `SkyModalInstance` provider can be injected into a component's constructor\n * so that this `close` function can be called from a button in the `sky-modal-footer`.\n * @param reason Specifies the reason for the modal closing, with the default reason of `\"close\"`.\n * @param ignoreBeforeClose Indicates whether to ignore the modal instance's `beforeClose` event.\n */\n public close(\n result?: any,\n reason?: string,\n ignoreBeforeClose?: boolean\n ): void {\n if (reason === undefined) {\n reason = 'close';\n }\n\n this.closeModal(reason, result, ignoreBeforeClose);\n }\n\n /**\n * Closes the modal instance with `reason=\"cancel\"`.\n * @param result Specifies an object to emit to subscribers of the `closed` event of the modal\n * instance. The `SkyModalInstance` provider can be injected into a component's constructor so\n * that this cancel function can be called from a button in the `sky-modal-footer`.\n */\n public cancel(result?: any): void {\n this.closeModal('cancel', result);\n }\n\n /**\n * Closes the modal instance with `reason=\"save\"`.\n * @param result Specifies an object to emit to subscribers of the `closed` event of the modal\n * instance. The `SkyModalInstance` provider can be injected into a component's constructor so\n * that this `save` function can be called from a button in `the sky-modal-footer`.\n */\n public save(result?: any): void {\n this.closeModal('save', result);\n }\n\n /**\n * Triggers the `helpOpened` event that broadcasts a `helpKey` parameter to open\n * when users click the <i class=\"fa fa-question-circle\" aria-hidden=\"true\"></i> button.\n * @param helpKey Specifies a string to emit to subscribers of\n * the modal instance's `helpOpened` event. Consumers can inject the `SkyModalInstance` provider\n * into a component's constructor to call the `openHelp` function in the modal template.\n */\n public openHelp(helpKey?: string): void {\n this._helpOpened.next(helpKey);\n }\n\n private closeModal(\n type: string,\n result?: any,\n ignoreBeforeClose = false\n ): void {\n const args = new SkyModalCloseArgs();\n\n args.reason = type;\n args.data = result;\n\n if (this._beforeClose.observers.length === 0 || ignoreBeforeClose) {\n this.notifyClosed(args);\n } else {\n this._beforeClose.next(\n new SkyModalBeforeCloseHandler(() => {\n this.notifyClosed(args);\n }, args)\n );\n }\n }\n\n private notifyClosed(args: SkyModalCloseArgs): void {\n this._closed.next(args);\n this._closed.complete();\n this._beforeClose.complete();\n this._helpOpened.complete();\n }\n}\n"]}
|
|
@@ -28,7 +28,7 @@ export class SkyModalService {
|
|
|
28
28
|
/**
|
|
29
29
|
* Opens a modal using the specified component.
|
|
30
30
|
* @param component Determines the component to render.
|
|
31
|
-
* @param {SkyModalConfigurationInterface} config
|
|
31
|
+
* @param {SkyModalConfigurationInterface} config Specifies configuration options for the modal.
|
|
32
32
|
*/
|
|
33
33
|
open(component, config) {
|
|
34
34
|
const modalInstance = new SkyModalInstance();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modal.service.js","sourceRoot":"","sources":["../../../../../../../../libs/components/modals/src/lib/modules/modal/modal.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,UAAU,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAEzD,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;;;AAGpD;;;;GAIG;AAOH,MAAM,OAAO,eAAe;IAG1B,wFAAwF;IACxF,uCAAuC;IACvC,YAAoB,uBAAoD;QAApD,4BAAuB,GAAvB,uBAAuB,CAA6B;IAAG,CAAC;IAE5E;;;OAGG;IACI,OAAO;QACZ,IAAI,eAAe,CAAC,IAAI,EAAE;YACxB,IAAI,CAAC,uBAAuB,CAAC,eAAe,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;YACnE,eAAe,CAAC,IAAI,GAAG,SAAS,CAAC;SAClC;IACH,CAAC;IAED;;;;OAIG;IACI,IAAI,CACT,SAAc,EACd,MAA+C;QAE/C,MAAM,aAAa,GAAG,IAAI,gBAAgB,EAAE,CAAC;QAC7C,IAAI,CAAC,mBAAmB,EAAE,CAAC;QAC3B,MAAM,MAAM,GAAG,IAAI,CAAC,sBAAsB,CAAC,MAAM,CAAC,CAAC;QAEnD,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC;YACpB,OAAO,EAAE,gBAAgB;YACzB,QAAQ,EAAE,aAAa;SACxB,CAAC,CAAC;QAEH,eAAe,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,aAAa,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC;QAErE,OAAO,aAAa,CAAC;IACvB,CAAC;IAEO,sBAAsB,CAC5B,iBAAsB;QAEtB,MAAM,aAAa,GAAmC;YACpD,SAAS,EAAE,EAAE;YACb,QAAQ,EAAE,KAAK;YACf,IAAI,EAAE,QAAQ;YACd,SAAS,EAAE,KAAK;SACjB,CAAC;QACF,IAAI,MAAM,GAAmC,SAAS,CAAC;QACvD,IAAI,MAAM,GAAQ,SAAS,CAAC;QAE5B,qDAAqD;QACrD,MAAM,GAAG;YACP,YAAY,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,aAAa,EAAE;gBAC7C,SAAS,EAAE,iBAAiB;aAC7B,CAAC;YACF,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,aAAa,EAAE,iBAAiB,CAAC;SAC5D,CAAC;QAEF,IAAI,KAAK,CAAC,OAAO,CAAC,iBAAiB,CAAC,KAAK,IAAI,EAAE;YAC7C,MAAM,GAAG,MAAM,CAAC,YAAY,CAAC,CAAC;SAC/B;aAAM;YACL,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;SAC3B;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;IAEO,mBAAmB;QACzB,IAAI,CAAC,eAAe,CAAC,IAAI,EAAE;YACzB,eAAe,CAAC,IAAI,GAAG,IAAI,CAAC,uBAAuB,CAAC,eAAe,CACjE,qBAAqB,CACtB,CAAC;SACH;IACH,CAAC;;6GA5EU,eAAe;iHAAf,eAAe,cAFd,KAAK;4FAEN,eAAe;kBAN3B,UAAU;mBAAC;oBACV,gGAAgG;oBAChG,8FAA8F;oBAC9F,2FAA2F;oBAC3F,UAAU,EAAE,KAAK;iBAClB","sourcesContent":["import { ComponentRef, Injectable } from '@angular/core';\nimport { SkyDynamicComponentService } from '@skyux/core';\n\nimport { SkyModalHostComponent } from './modal-host.component';\nimport { SkyModalInstance } from './modal-instance';\nimport { SkyModalConfigurationInterface } from './modal.interface';\n\n/**\n * A service that launches modals. For information about how to test modals in SKY UX, see\n * [write unit tests for modals](https://developer.blackbaud.com/skyux/learn/accessibility/test).\n * @dynamic\n */\n@Injectable({\n // Must be 'any' so that the modal component is created in the context of its module's injector.\n // If set to 'root', the component's dependency injections would only be derived from the root\n // injector and may loose context if the modal was opened from within a lazy-loaded module.\n providedIn: 'any',\n})\nexport class SkyModalService {\n private static host: ComponentRef<SkyModalHostComponent>;\n\n // TODO: In future breaking change - remove extra parameters as they are no longer used.\n /* tslint:disable:no-unused-variable */\n constructor(private dynamicComponentService?: SkyDynamicComponentService) {}\n\n /**\n * @private\n * Removes the modal host from the DOM.\n */\n public dispose(): void {\n if (SkyModalService.host) {\n this.dynamicComponentService.removeComponent(SkyModalService.host);\n SkyModalService.host = undefined;\n }\n }\n\n /**\n * Opens a modal using the specified component.\n * @param component Determines the component to render.\n * @param {SkyModalConfigurationInterface} config
|
|
1
|
+
{"version":3,"file":"modal.service.js","sourceRoot":"","sources":["../../../../../../../../libs/components/modals/src/lib/modules/modal/modal.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,UAAU,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAEzD,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;;;AAGpD;;;;GAIG;AAOH,MAAM,OAAO,eAAe;IAG1B,wFAAwF;IACxF,uCAAuC;IACvC,YAAoB,uBAAoD;QAApD,4BAAuB,GAAvB,uBAAuB,CAA6B;IAAG,CAAC;IAE5E;;;OAGG;IACI,OAAO;QACZ,IAAI,eAAe,CAAC,IAAI,EAAE;YACxB,IAAI,CAAC,uBAAuB,CAAC,eAAe,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;YACnE,eAAe,CAAC,IAAI,GAAG,SAAS,CAAC;SAClC;IACH,CAAC;IAED;;;;OAIG;IACI,IAAI,CACT,SAAc,EACd,MAA+C;QAE/C,MAAM,aAAa,GAAG,IAAI,gBAAgB,EAAE,CAAC;QAC7C,IAAI,CAAC,mBAAmB,EAAE,CAAC;QAC3B,MAAM,MAAM,GAAG,IAAI,CAAC,sBAAsB,CAAC,MAAM,CAAC,CAAC;QAEnD,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC;YACpB,OAAO,EAAE,gBAAgB;YACzB,QAAQ,EAAE,aAAa;SACxB,CAAC,CAAC;QAEH,eAAe,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,aAAa,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC;QAErE,OAAO,aAAa,CAAC;IACvB,CAAC;IAEO,sBAAsB,CAC5B,iBAAsB;QAEtB,MAAM,aAAa,GAAmC;YACpD,SAAS,EAAE,EAAE;YACb,QAAQ,EAAE,KAAK;YACf,IAAI,EAAE,QAAQ;YACd,SAAS,EAAE,KAAK;SACjB,CAAC;QACF,IAAI,MAAM,GAAmC,SAAS,CAAC;QACvD,IAAI,MAAM,GAAQ,SAAS,CAAC;QAE5B,qDAAqD;QACrD,MAAM,GAAG;YACP,YAAY,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,aAAa,EAAE;gBAC7C,SAAS,EAAE,iBAAiB;aAC7B,CAAC;YACF,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,aAAa,EAAE,iBAAiB,CAAC;SAC5D,CAAC;QAEF,IAAI,KAAK,CAAC,OAAO,CAAC,iBAAiB,CAAC,KAAK,IAAI,EAAE;YAC7C,MAAM,GAAG,MAAM,CAAC,YAAY,CAAC,CAAC;SAC/B;aAAM;YACL,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;SAC3B;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;IAEO,mBAAmB;QACzB,IAAI,CAAC,eAAe,CAAC,IAAI,EAAE;YACzB,eAAe,CAAC,IAAI,GAAG,IAAI,CAAC,uBAAuB,CAAC,eAAe,CACjE,qBAAqB,CACtB,CAAC;SACH;IACH,CAAC;;6GA5EU,eAAe;iHAAf,eAAe,cAFd,KAAK;4FAEN,eAAe;kBAN3B,UAAU;mBAAC;oBACV,gGAAgG;oBAChG,8FAA8F;oBAC9F,2FAA2F;oBAC3F,UAAU,EAAE,KAAK;iBAClB","sourcesContent":["import { ComponentRef, Injectable } from '@angular/core';\nimport { SkyDynamicComponentService } from '@skyux/core';\n\nimport { SkyModalHostComponent } from './modal-host.component';\nimport { SkyModalInstance } from './modal-instance';\nimport { SkyModalConfigurationInterface } from './modal.interface';\n\n/**\n * A service that launches modals. For information about how to test modals in SKY UX, see\n * [write unit tests for modals](https://developer.blackbaud.com/skyux/learn/accessibility/test).\n * @dynamic\n */\n@Injectable({\n // Must be 'any' so that the modal component is created in the context of its module's injector.\n // If set to 'root', the component's dependency injections would only be derived from the root\n // injector and may loose context if the modal was opened from within a lazy-loaded module.\n providedIn: 'any',\n})\nexport class SkyModalService {\n private static host: ComponentRef<SkyModalHostComponent>;\n\n // TODO: In future breaking change - remove extra parameters as they are no longer used.\n /* tslint:disable:no-unused-variable */\n constructor(private dynamicComponentService?: SkyDynamicComponentService) {}\n\n /**\n * @private\n * Removes the modal host from the DOM.\n */\n public dispose(): void {\n if (SkyModalService.host) {\n this.dynamicComponentService.removeComponent(SkyModalService.host);\n SkyModalService.host = undefined;\n }\n }\n\n /**\n * Opens a modal using the specified component.\n * @param component Determines the component to render.\n * @param {SkyModalConfigurationInterface} config Specifies configuration options for the modal.\n */\n public open(\n component: any,\n config?: SkyModalConfigurationInterface | any[]\n ): SkyModalInstance {\n const modalInstance = new SkyModalInstance();\n this.createHostComponent();\n const params = this.getConfigFromParameter(config);\n\n params.providers.push({\n provide: SkyModalInstance,\n useValue: modalInstance,\n });\n\n SkyModalService.host.instance.open(modalInstance, component, params);\n\n return modalInstance;\n }\n\n private getConfigFromParameter(\n providersOrConfig: any\n ): SkyModalConfigurationInterface {\n const defaultParams: SkyModalConfigurationInterface = {\n providers: [],\n fullPage: false,\n size: 'medium',\n tiledBody: false,\n };\n let params: SkyModalConfigurationInterface = undefined;\n let method: any = undefined;\n\n // Object Literal Lookup for backwards compatability.\n method = {\n 'providers?': Object.assign({}, defaultParams, {\n providers: providersOrConfig,\n }),\n config: Object.assign({}, defaultParams, providersOrConfig),\n };\n\n if (Array.isArray(providersOrConfig) === true) {\n params = method['providers?'];\n } else {\n params = method['config'];\n }\n\n return params;\n }\n\n private createHostComponent(): void {\n if (!SkyModalService.host) {\n SkyModalService.host = this.dynamicComponentService.createComponent(\n SkyModalHostComponent\n );\n }\n }\n}\n"]}
|
package/fesm2015/skyux-modals.js
CHANGED
|
@@ -19,27 +19,22 @@ import { trigger, state, style, transition, animate } from '@angular/animations'
|
|
|
19
19
|
class SkyConfirmInstance {
|
|
20
20
|
constructor() {
|
|
21
21
|
/**
|
|
22
|
-
* Fires when users select an action to close the
|
|
22
|
+
* Fires when users select an action to close the dialog. This event
|
|
23
23
|
* returns a `SkyConfirmCloseEventArgs` object with information about the button that
|
|
24
|
-
* users select.
|
|
24
|
+
* users select. It returns the `'cancel'` action when users press the <kbd>Escape</kbd> key.
|
|
25
25
|
*/
|
|
26
26
|
this.closed = new EventEmitter();
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
/* istanbul ignore next */
|
|
31
|
-
class SkyConfirmModalContext {
|
|
32
|
-
}
|
|
33
|
-
|
|
34
30
|
var SkyConfirmType;
|
|
35
31
|
(function (SkyConfirmType) {
|
|
36
32
|
/**
|
|
37
|
-
* Allows you to define your own
|
|
38
|
-
* specify an array of `SkyConfirmButtonConfig` objects.
|
|
33
|
+
* Allows you to define your own buttons using the `buttons` property of `SkyConfirmConfig`.
|
|
39
34
|
*/
|
|
40
35
|
SkyConfirmType[SkyConfirmType["Custom"] = 0] = "Custom";
|
|
41
36
|
/**
|
|
42
|
-
* Displays one button with an **OK** label.
|
|
37
|
+
* Displays one button with an **OK** label and an `'ok'` action.
|
|
43
38
|
*/
|
|
44
39
|
SkyConfirmType[SkyConfirmType["OK"] = 1] = "OK";
|
|
45
40
|
/**
|
|
@@ -841,11 +836,6 @@ class SkyModalBeforeCloseHandler {
|
|
|
841
836
|
class SkyModalCloseArgs {
|
|
842
837
|
}
|
|
843
838
|
|
|
844
|
-
// TODO: this class won't show in the generated docs until this work is done:
|
|
845
|
-
// https://github.com/blackbaud/skyux-docs-tools/issues/30
|
|
846
|
-
/**
|
|
847
|
-
* Allows you to close the modal and return data from the launched modal.
|
|
848
|
-
*/
|
|
849
839
|
class SkyModalInstance {
|
|
850
840
|
constructor() {
|
|
851
841
|
this._beforeClose = new Subject();
|
|
@@ -943,6 +933,12 @@ class SkyModalInstance {
|
|
|
943
933
|
}
|
|
944
934
|
}
|
|
945
935
|
|
|
936
|
+
/**
|
|
937
|
+
* @internal
|
|
938
|
+
*/
|
|
939
|
+
class SkyConfirmModalContext {
|
|
940
|
+
}
|
|
941
|
+
|
|
946
942
|
class SkyConfirmComponent {
|
|
947
943
|
constructor(config, modal, resourcesService) {
|
|
948
944
|
this.config = config;
|
|
@@ -1108,7 +1104,7 @@ class SkyModalService {
|
|
|
1108
1104
|
/**
|
|
1109
1105
|
* Opens a modal using the specified component.
|
|
1110
1106
|
* @param component Determines the component to render.
|
|
1111
|
-
* @param {SkyModalConfigurationInterface} config
|
|
1107
|
+
* @param {SkyModalConfigurationInterface} config Specifies configuration options for the modal.
|
|
1112
1108
|
*/
|
|
1113
1109
|
open(component, config) {
|
|
1114
1110
|
const modalInstance = new SkyModalInstance();
|
|
@@ -1164,16 +1160,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
1164
1160
|
}], ctorParameters: function () { return [{ type: i3.SkyDynamicComponentService }]; } });
|
|
1165
1161
|
|
|
1166
1162
|
/**
|
|
1167
|
-
*
|
|
1168
|
-
* Within the service, you can specify the dialog's message and customize the button text.
|
|
1163
|
+
* Launches a dialog.
|
|
1169
1164
|
*/
|
|
1170
1165
|
class SkyConfirmService {
|
|
1171
1166
|
constructor(modalService) {
|
|
1172
1167
|
this.modalService = modalService;
|
|
1173
1168
|
}
|
|
1174
1169
|
/**
|
|
1175
|
-
* Opens a
|
|
1176
|
-
*
|
|
1170
|
+
* Opens a dialog using the specified options.
|
|
1171
|
+
* @param config Specifies configuration options for the dialog.
|
|
1177
1172
|
*/
|
|
1178
1173
|
open(config) {
|
|
1179
1174
|
const modalInstance = this.modalService.open(SkyConfirmComponent, {
|
|
@@ -1213,9 +1208,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
1213
1208
|
|
|
1214
1209
|
// TODO: defaults won't show in the generated docs until this work is done:
|
|
1215
1210
|
|
|
1211
|
+
// TODO: confirm-button is internal and should be removed in a future version
|
|
1212
|
+
|
|
1216
1213
|
/**
|
|
1217
1214
|
* Generated bundle index. Do not edit.
|
|
1218
1215
|
*/
|
|
1219
1216
|
|
|
1220
|
-
export { SkyConfirmInstance,
|
|
1217
|
+
export { SkyConfirmInstance, SkyConfirmModule, SkyConfirmService, SkyConfirmType, SkyModalBeforeCloseHandler, SkyModalCloseArgs, SkyModalConfiguration, SkyModalHostService, SkyModalInstance, SkyModalModule, SkyModalService, SkyConfirmComponent as λ1, SkyModalContentComponent as λ2, SkyModalFooterComponent as λ3, SkyModalHeaderComponent as λ4, SkyModalComponent as λ5 };
|
|
1221
1218
|
//# sourceMappingURL=skyux-modals.js.map
|