@skyux/modals 6.12.0 → 6.15.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.
Files changed (44) hide show
  1. package/documentation.json +340 -529
  2. package/esm2020/lib/modules/confirm/confirm-config-token.mjs +6 -0
  3. package/esm2020/lib/modules/confirm/confirm.component.mjs +103 -97
  4. package/esm2020/lib/modules/confirm/confirm.service.mjs +9 -5
  5. package/esm2020/lib/modules/modal/modal-adapter.service.mjs +20 -15
  6. package/esm2020/lib/modules/modal/modal-close-args.mjs +1 -1
  7. package/esm2020/lib/modules/modal/modal-component-adapter.service.mjs +17 -13
  8. package/esm2020/lib/modules/modal/modal-host-context-args.mjs +2 -0
  9. package/esm2020/lib/modules/modal/modal-host-context.mjs +9 -6
  10. package/esm2020/lib/modules/modal/modal-host.component.mjs +41 -14
  11. package/esm2020/lib/modules/modal/modal-host.service.mjs +21 -15
  12. package/esm2020/lib/modules/modal/modal-instance.mjs +31 -29
  13. package/esm2020/lib/modules/modal/modal-scroll-shadow.directive.mjs +71 -65
  14. package/esm2020/lib/modules/modal/modal.component.mjs +59 -74
  15. package/esm2020/lib/modules/modal/modal.service.mjs +50 -42
  16. package/esm2020/testing/modal-fixture.mjs +60 -84
  17. package/fesm2015/skyux-modals-testing.mjs +60 -83
  18. package/fesm2015/skyux-modals-testing.mjs.map +1 -1
  19. package/fesm2015/skyux-modals.mjs +412 -368
  20. package/fesm2015/skyux-modals.mjs.map +1 -1
  21. package/fesm2020/skyux-modals-testing.mjs +60 -83
  22. package/fesm2020/skyux-modals-testing.mjs.map +1 -1
  23. package/fesm2020/skyux-modals.mjs +409 -368
  24. package/fesm2020/skyux-modals.mjs.map +1 -1
  25. package/lib/modules/confirm/confirm-config-token.d.ts +6 -0
  26. package/lib/modules/confirm/confirm.component.d.ts +6 -12
  27. package/lib/modules/confirm/confirm.service.d.ts +1 -1
  28. package/lib/modules/modal/modal-adapter.service.d.ts +1 -5
  29. package/lib/modules/modal/modal-close-args.d.ts +1 -1
  30. package/lib/modules/modal/modal-component-adapter.service.d.ts +1 -2
  31. package/lib/modules/modal/modal-host-context-args.d.ts +7 -0
  32. package/lib/modules/modal/modal-host-context.d.ts +3 -2
  33. package/lib/modules/modal/modal-host.component.d.ts +1 -6
  34. package/lib/modules/modal/modal-host.service.d.ts +2 -2
  35. package/lib/modules/modal/modal-instance.d.ts +1 -5
  36. package/lib/modules/modal/modal-scroll-shadow.directive.d.ts +1 -13
  37. package/lib/modules/modal/modal.component.d.ts +12 -23
  38. package/lib/modules/modal/modal.service.d.ts +1 -3
  39. package/package.json +5 -6
  40. package/testing/modal-fixture.d.ts +6 -8
  41. package/esm2020/lib/modules/confirm/confirm-modal-context.mjs +0 -6
  42. package/esm2020/lib/modules/modal/modal-state-animation.mjs +0 -8
  43. package/lib/modules/confirm/confirm-modal-context.d.ts +0 -13
  44. package/lib/modules/modal/modal-state-animation.d.ts +0 -1
@@ -1,3 +1,4 @@
1
+ import { SkyModalHostContextArgs } from './modal-host-context-args';
1
2
  import * as i0 from "@angular/core";
2
3
  /**
3
4
  * Provided by the modal service to give the modal host
@@ -5,8 +6,8 @@ import * as i0 from "@angular/core";
5
6
  * @internal
6
7
  */
7
8
  export declare class SkyModalHostContext {
8
- teardownCallback: () => void;
9
- constructor(teardownCallback: () => void);
9
+ args: SkyModalHostContextArgs;
10
+ constructor(args: SkyModalHostContextArgs);
10
11
  static ɵfac: i0.ɵɵFactoryDeclaration<SkyModalHostContext, never>;
11
12
  static ɵprov: i0.ɵɵInjectableDeclaration<SkyModalHostContext>;
12
13
  }
@@ -10,11 +10,6 @@ import * as i0 from "@angular/core";
10
10
  */
11
11
  export declare class SkyModalHostComponent implements OnDestroy {
12
12
  #private;
13
- private resolver;
14
- private adapter;
15
- private injector;
16
- private router;
17
- private changeDetector;
18
13
  get modalOpen(): boolean;
19
14
  get backdropZIndex(): number;
20
15
  /**
@@ -23,7 +18,7 @@ export declare class SkyModalHostComponent implements OnDestroy {
23
18
  * TODO: Remove the `any` in a breaking change.
24
19
  * @internal
25
20
  */
26
- target: ViewContainerRef;
21
+ target: ViewContainerRef | undefined;
27
22
  constructor(resolver: ComponentFactoryResolver, adapter: SkyModalAdapterService, injector: Injector, router: Router, changeDetector: ChangeDetectorRef, modalHostContext: SkyModalHostContext);
28
23
  ngOnDestroy(): void;
29
24
  open(modalInstance: SkyModalInstance, component: any, config?: SkyModalConfigurationInterface): void;
@@ -7,18 +7,18 @@ import * as i0 from "@angular/core";
7
7
  export declare class SkyModalHostService {
8
8
  static get openModalCount(): number;
9
9
  static get fullPageModalCount(): number;
10
- private static get BASE_Z_INDEX();
11
10
  static get backdropZIndex(): number;
12
11
  static get topModal(): SkyModalHostService;
13
- private static modalHosts;
14
12
  close: EventEmitter<void>;
15
13
  fullPage: boolean;
16
14
  openHelp: EventEmitter<any>;
15
+ zIndex: number;
17
16
  constructor();
18
17
  getModalZIndex(): number;
19
18
  onClose(): void;
20
19
  onOpenHelp(helpKey?: string): void;
21
20
  destroy(): void;
21
+ private calculateZIndex;
22
22
  static ɵfac: i0.ɵɵFactoryDeclaration<SkyModalHostService, never>;
23
23
  static ɵprov: i0.ɵɵInjectableDeclaration<SkyModalHostService>;
24
24
  }
@@ -2,6 +2,7 @@ import { Observable } from 'rxjs';
2
2
  import { SkyModalBeforeCloseHandler } from './modal-before-close-handler';
3
3
  import { SkyModalCloseArgs } from './modal-close-args';
4
4
  export declare class SkyModalInstance {
5
+ #private;
5
6
  /**
6
7
  * An event that the modal instance emits when it is about to close.
7
8
  * It emits a `SkyModalBeforeCloseHandler` object with a `closeModal` method
@@ -28,9 +29,6 @@ export declare class SkyModalInstance {
28
29
  * A direct reference to the provided component's class.
29
30
  */
30
31
  componentInstance: any;
31
- private _beforeClose;
32
- private _closed;
33
- private _helpOpened;
34
32
  /**
35
33
  * Closes the modal instance.
36
34
  * @param result Specifies an object to emit to subscribers of the `closed` event of the
@@ -62,6 +60,4 @@ export declare class SkyModalInstance {
62
60
  * into a component's constructor to call the `openHelp` function in the modal template.
63
61
  */
64
62
  openHelp(helpKey?: string): void;
65
- private closeModal;
66
- private notifyClosed;
67
63
  }
@@ -9,25 +9,13 @@ import * as i0 from "@angular/core";
9
9
  * @internal
10
10
  */
11
11
  export declare class SkyModalScrollShadowDirective implements OnInit, OnDestroy {
12
- private elRef;
13
- private mutationObserverSvc;
14
- private ngZone;
15
- private themeSvc?;
12
+ #private;
16
13
  skyModalScrollShadow: EventEmitter<SkyModalScrollShadowEventArgs>;
17
- private currentShadow;
18
- private currentTheme;
19
- private mutationObserver;
20
- private ngUnsubscribe;
21
14
  constructor(elRef: ElementRef, mutationObserverSvc: MutationObserverService, ngZone: NgZone, themeSvc?: SkyThemeService);
22
15
  windowResize(): void;
23
16
  scroll(): void;
24
17
  ngOnInit(): void;
25
18
  ngOnDestroy(): void;
26
- private initMutationObserver;
27
- private destroyMutationObserver;
28
- private checkForShadow;
29
- private buildShadowStyle;
30
- private emitShadow;
31
19
  static ɵfac: i0.ɵɵFactoryDeclaration<SkyModalScrollShadowDirective, [null, null, null, { optional: true; }]>;
32
20
  static ɵdir: i0.ɵɵDirectiveDeclaration<SkyModalScrollShadowDirective, "[skyModalScrollShadow]", never, {}, { "skyModalScrollShadow": "skyModalScrollShadow"; }, never>;
33
21
  }
@@ -11,37 +11,27 @@ import * as i0 from "@angular/core";
11
11
  * and buttons.
12
12
  */
13
13
  export declare class SkyModalComponent implements AfterViewInit, OnDestroy {
14
- private hostService;
15
- private config;
16
- private elRef;
17
- private windowRef;
18
- private componentAdapter;
19
- private coreAdapter;
20
- private dockService;
21
- private mediaQueryService?;
22
- get wrapperClass(): string;
14
+ #private;
15
+ wrapperClass: string | undefined;
23
16
  /**
24
17
  * @internal
25
18
  */
26
- get ariaRole(): string;
27
- set ariaRole(value: string);
19
+ get ariaRole(): string | undefined;
20
+ set ariaRole(value: string | undefined);
21
+ ariaRoleOrDefault: string;
28
22
  /**
29
23
  * @internal
30
24
  */
31
- set tiledBody(value: boolean);
32
- get modalZIndex(): number;
33
- get modalFullPage(): boolean;
34
- get isSmallSize(): boolean;
35
- get isMediumSize(): boolean;
36
- get isLargeSize(): boolean;
37
- get isTiledBody(): boolean;
38
- get ariaDescribedBy(): string;
39
- get ariaLabelledBy(): string;
40
- get helpKey(): string;
25
+ tiledBody: boolean | undefined;
26
+ ariaDescribedBy: string;
27
+ ariaLabelledBy: string;
28
+ helpKey: string | undefined;
41
29
  modalState: string;
42
30
  modalContentId: string;
43
31
  modalHeaderId: string;
44
- scrollShadow: SkyModalScrollShadowEventArgs;
32
+ modalZIndex: number | undefined;
33
+ scrollShadow: SkyModalScrollShadowEventArgs | undefined;
34
+ size: string;
45
35
  private modalContentWrapperElement;
46
36
  constructor(hostService: SkyModalHostService, config: SkyModalConfiguration, elRef: ElementRef, windowRef: SkyAppWindowRef, componentAdapter: SkyModalComponentAdapterService, coreAdapter: SkyCoreAdapterService, dockService: SkyDockService, mediaQueryService?: SkyResizeObserverMediaQueryService);
47
37
  onDocumentKeyUp(event: KeyboardEvent): void;
@@ -53,7 +43,6 @@ export declare class SkyModalComponent implements AfterViewInit, OnDestroy {
53
43
  windowResize(): void;
54
44
  scrollShadowChange(args: SkyModalScrollShadowEventArgs): void;
55
45
  viewkeeperEnabled(): boolean;
56
- private isSizeEqual;
57
46
  static ɵfac: i0.ɵɵFactoryDeclaration<SkyModalComponent, [null, null, null, null, null, null, { host: true; }, { optional: true; }]>;
58
47
  static ɵcmp: i0.ɵɵComponentDeclaration<SkyModalComponent, "sky-modal", never, { "ariaRole": "ariaRole"; "tiledBody": "tiledBody"; }, {}, never, ["sky-modal-header", "sky-modal-content", "sky-modal-footer"]>;
59
48
  }
@@ -7,7 +7,7 @@ import * as i0 from "@angular/core";
7
7
  * @dynamic
8
8
  */
9
9
  export declare class SkyModalService {
10
- private dynamicComponentService?;
10
+ #private;
11
11
  private static host;
12
12
  constructor(dynamicComponentService?: SkyDynamicComponentService);
13
13
  /**
@@ -21,8 +21,6 @@ export declare class SkyModalService {
21
21
  * @param {SkyModalConfigurationInterface} config Specifies configuration options for the modal.
22
22
  */
23
23
  open(component: any, config?: SkyModalConfigurationInterface | any[]): SkyModalInstance;
24
- private getConfigFromParameter;
25
- private createHostComponent;
26
24
  static ɵfac: i0.ɵɵFactoryDeclaration<SkyModalService, never>;
27
25
  static ɵprov: i0.ɵɵInjectableDeclaration<SkyModalService>;
28
26
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skyux/modals",
3
- "version": "6.12.0",
3
+ "version": "6.15.0",
4
4
  "author": "Blackbaud, Inc.",
5
5
  "keywords": [
6
6
  "blackbaud",
@@ -40,14 +40,13 @@
40
40
  }
41
41
  },
42
42
  "peerDependencies": {
43
- "@angular/animations": "^13.3.2",
44
43
  "@angular/common": "^13.3.2",
45
44
  "@angular/core": "^13.3.2",
46
45
  "@angular/router": "^13.3.2",
47
- "@skyux/core": "6.12.0",
48
- "@skyux/i18n": "6.12.0",
49
- "@skyux/indicators": "6.12.0",
50
- "@skyux/theme": "6.12.0"
46
+ "@skyux/core": "6.15.0",
47
+ "@skyux/i18n": "6.15.0",
48
+ "@skyux/indicators": "6.15.0",
49
+ "@skyux/theme": "6.15.0"
51
50
  },
52
51
  "dependencies": {
53
52
  "tslib": "^2.3.1"
@@ -3,21 +3,20 @@ import { ComponentFixture } from '@angular/core/testing';
3
3
  * Allows interaction with a SKY UX modal component.
4
4
  */
5
5
  export declare class SkyModalFixture {
6
- private fixture;
7
- private modalElement;
8
- constructor(fixture: ComponentFixture<any>, skyTestId: string);
6
+ #private;
7
+ constructor(fixture: ComponentFixture<unknown>, skyTestId: string);
9
8
  /**
10
9
  * The modal component's ARIA describedby attribute.
11
10
  */
12
- get ariaDescribedBy(): string;
11
+ get ariaDescribedBy(): string | undefined;
13
12
  /**
14
13
  * The modal component's ARIA labelledby attribute.
15
14
  */
16
- get ariaLabelledBy(): string;
15
+ get ariaLabelledBy(): string | undefined;
17
16
  /**
18
17
  * The modal component's role attribute.
19
18
  */
20
- get ariaRole(): string;
19
+ get ariaRole(): string | undefined;
21
20
  /**
22
21
  * Whether or not the modal is a full page modal.
23
22
  */
@@ -25,7 +24,7 @@ export declare class SkyModalFixture {
25
24
  /**
26
25
  * The size of the modal.
27
26
  */
28
- get size(): string;
27
+ get size(): string | undefined;
29
28
  /**
30
29
  * Whether or not the modal is set up for tiled content.
31
30
  */
@@ -54,5 +53,4 @@ export declare class SkyModalFixture {
54
53
  * Returns the modal's header element.
55
54
  */
56
55
  getModalHeaderEl(): any;
57
- private getModalDiaglogElement;
58
56
  }
@@ -1,6 +0,0 @@
1
- /**
2
- * @internal
3
- */
4
- export class SkyConfirmModalContext {
5
- }
6
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uZmlybS1tb2RhbC1jb250ZXh0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9jb21wb25lbnRzL21vZGFscy9zcmMvbGliL21vZHVsZXMvY29uZmlybS9jb25maXJtLW1vZGFsLWNvbnRleHQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBSUE7O0dBRUc7QUFDSCxNQUFNLE9BQU8sc0JBQXNCO0NBTWxDIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgU2t5Q29uZmlybUJ1dHRvbkNvbmZpZyB9IGZyb20gJy4vY29uZmlybS1idXR0b24tY29uZmlnJztcbmltcG9ydCB7IFNreUNvbmZpcm1Db25maWcgfSBmcm9tICcuL2NvbmZpcm0tY29uZmlnJztcbmltcG9ydCB7IFNreUNvbmZpcm1UeXBlIH0gZnJvbSAnLi9jb25maXJtLXR5cGUnO1xuXG4vKipcbiAqIEBpbnRlcm5hbFxuICovXG5leHBvcnQgY2xhc3MgU2t5Q29uZmlybU1vZGFsQ29udGV4dCBpbXBsZW1lbnRzIFNreUNvbmZpcm1Db25maWcge1xuICBwdWJsaWMgbWVzc2FnZTogc3RyaW5nO1xuICBwdWJsaWMgYm9keTogc3RyaW5nO1xuICBwdWJsaWMgYnV0dG9uczogU2t5Q29uZmlybUJ1dHRvbkNvbmZpZ1tdO1xuICBwdWJsaWMgcHJlc2VydmVXaGl0ZVNwYWNlOiBib29sZWFuO1xuICBwdWJsaWMgdHlwZTogU2t5Q29uZmlybVR5cGU7XG59XG4iXX0=
@@ -1,8 +0,0 @@
1
- import { animate, state, style, transition, trigger, } from '@angular/animations';
2
- export const skyAnimationModalState = trigger('modalState', [
3
- state('in', style({ opacity: '1.0' })),
4
- state('out', style({ opacity: '0.0' })),
5
- transition('void => *', [style({ opacity: '0.0' }), animate(150)]),
6
- transition('* => void', [animate(150, style({ opacity: '0.0' }))]),
7
- ]);
8
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9kYWwtc3RhdGUtYW5pbWF0aW9uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9jb21wb25lbnRzL21vZGFscy9zcmMvbGliL21vZHVsZXMvbW9kYWwvbW9kYWwtc3RhdGUtYW5pbWF0aW9uLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFDTCxPQUFPLEVBQ1AsS0FBSyxFQUNMLEtBQUssRUFDTCxVQUFVLEVBQ1YsT0FBTyxHQUNSLE1BQU0scUJBQXFCLENBQUM7QUFFN0IsTUFBTSxDQUFDLE1BQU0sc0JBQXNCLEdBQUcsT0FBTyxDQUFDLFlBQVksRUFBRTtJQUMxRCxLQUFLLENBQUMsSUFBSSxFQUFFLEtBQUssQ0FBQyxFQUFFLE9BQU8sRUFBRSxLQUFLLEVBQUUsQ0FBQyxDQUFDO0lBQ3RDLEtBQUssQ0FBQyxLQUFLLEVBQUUsS0FBSyxDQUFDLEVBQUUsT0FBTyxFQUFFLEtBQUssRUFBRSxDQUFDLENBQUM7SUFDdkMsVUFBVSxDQUFDLFdBQVcsRUFBRSxDQUFDLEtBQUssQ0FBQyxFQUFFLE9BQU8sRUFBRSxLQUFLLEVBQUUsQ0FBQyxFQUFFLE9BQU8sQ0FBQyxHQUFHLENBQUMsQ0FBQyxDQUFDO0lBQ2xFLFVBQVUsQ0FBQyxXQUFXLEVBQUUsQ0FBQyxPQUFPLENBQUMsR0FBRyxFQUFFLEtBQUssQ0FBQyxFQUFFLE9BQU8sRUFBRSxLQUFLLEVBQUUsQ0FBQyxDQUFDLENBQUMsQ0FBQztDQUNuRSxDQUFRLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQge1xuICBhbmltYXRlLFxuICBzdGF0ZSxcbiAgc3R5bGUsXG4gIHRyYW5zaXRpb24sXG4gIHRyaWdnZXIsXG59IGZyb20gJ0Bhbmd1bGFyL2FuaW1hdGlvbnMnO1xuXG5leHBvcnQgY29uc3Qgc2t5QW5pbWF0aW9uTW9kYWxTdGF0ZSA9IHRyaWdnZXIoJ21vZGFsU3RhdGUnLCBbXG4gIHN0YXRlKCdpbicsIHN0eWxlKHsgb3BhY2l0eTogJzEuMCcgfSkpLFxuICBzdGF0ZSgnb3V0Jywgc3R5bGUoeyBvcGFjaXR5OiAnMC4wJyB9KSksXG4gIHRyYW5zaXRpb24oJ3ZvaWQgPT4gKicsIFtzdHlsZSh7IG9wYWNpdHk6ICcwLjAnIH0pLCBhbmltYXRlKDE1MCldKSxcbiAgdHJhbnNpdGlvbignKiA9PiB2b2lkJywgW2FuaW1hdGUoMTUwLCBzdHlsZSh7IG9wYWNpdHk6ICcwLjAnIH0pKV0pLFxuXSkgYXMgYW55O1xuIl19
@@ -1,13 +0,0 @@
1
- import { SkyConfirmButtonConfig } from './confirm-button-config';
2
- import { SkyConfirmConfig } from './confirm-config';
3
- import { SkyConfirmType } from './confirm-type';
4
- /**
5
- * @internal
6
- */
7
- export declare class SkyConfirmModalContext implements SkyConfirmConfig {
8
- message: string;
9
- body: string;
10
- buttons: SkyConfirmButtonConfig[];
11
- preserveWhiteSpace: boolean;
12
- type: SkyConfirmType;
13
- }
@@ -1 +0,0 @@
1
- export declare const skyAnimationModalState: any;