1 | import { EventEmitter, OnChanges, OnDestroy, SimpleChanges } from '@angular/core';
|
2 | import Swal, { SweetAlertOptions } from 'sweetalert2';
|
3 | import * as events from './swal-events';
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 | export declare class SwalComponent implements OnChanges, OnDestroy {
|
20 | private readonly defaultSwalOptions;
|
21 | title: SweetAlertOptions['title'];
|
22 | titleText: SweetAlertOptions['titleText'];
|
23 | text: SweetAlertOptions['text'];
|
24 | html: SweetAlertOptions['html'];
|
25 | footer: SweetAlertOptions['footer'];
|
26 | type: SweetAlertOptions['type'];
|
27 | backdrop: SweetAlertOptions['backdrop'];
|
28 | toast: SweetAlertOptions['toast'];
|
29 | target: SweetAlertOptions['target'];
|
30 | input: SweetAlertOptions['input'];
|
31 | width: SweetAlertOptions['width'];
|
32 | padding: SweetAlertOptions['padding'];
|
33 | background: SweetAlertOptions['background'];
|
34 | position: SweetAlertOptions['position'];
|
35 | grow: SweetAlertOptions['grow'];
|
36 | customClass: SweetAlertOptions['customClass'];
|
37 | timer: SweetAlertOptions['timer'];
|
38 | animation: SweetAlertOptions['animation'];
|
39 | allowOutsideClick: SweetAlertOptions['allowOutsideClick'];
|
40 | allowEscapeKey: SweetAlertOptions['allowEscapeKey'];
|
41 | allowEnterKey: SweetAlertOptions['allowEnterKey'];
|
42 | showConfirmButton: SweetAlertOptions['showConfirmButton'];
|
43 | showCancelButton: SweetAlertOptions['showCancelButton'];
|
44 | confirmButtonText: SweetAlertOptions['confirmButtonText'];
|
45 | cancelButtonText: SweetAlertOptions['cancelButtonText'];
|
46 | confirmButtonColor: SweetAlertOptions['confirmButtonColor'];
|
47 | cancelButtonColor: SweetAlertOptions['cancelButtonColor'];
|
48 | confirmButtonClass: SweetAlertOptions['confirmButtonClass'];
|
49 | cancelButtonClass: SweetAlertOptions['cancelButtonClass'];
|
50 | confirmButtonAriaLabel: SweetAlertOptions['confirmButtonAriaLabel'];
|
51 | cancelButtonAriaLabel: SweetAlertOptions['cancelButtonAriaLabel'];
|
52 | buttonsStyling: SweetAlertOptions['buttonsStyling'];
|
53 | reverseButtons: SweetAlertOptions['reverseButtons'];
|
54 | focusConfirm: SweetAlertOptions['focusConfirm'];
|
55 | focusCancel: SweetAlertOptions['focusCancel'];
|
56 | showCloseButton: SweetAlertOptions['showCloseButton'];
|
57 | closeButtonAriaLabel: SweetAlertOptions['closeButtonAriaLabel'];
|
58 | showLoaderOnConfirm: SweetAlertOptions['showLoaderOnConfirm'];
|
59 | preConfirm: SweetAlertOptions['preConfirm'];
|
60 | imageUrl: SweetAlertOptions['imageUrl'];
|
61 | imageWidth: SweetAlertOptions['imageWidth'];
|
62 | imageHeight: SweetAlertOptions['imageHeight'];
|
63 | imageAlt: SweetAlertOptions['imageAlt'];
|
64 | imageClass: SweetAlertOptions['imageClass'];
|
65 | inputPlaceholder: SweetAlertOptions['inputPlaceholder'];
|
66 | inputValue: SweetAlertOptions['inputValue'];
|
67 | inputOptions: SweetAlertOptions['inputOptions'];
|
68 | inputAutoTrim: SweetAlertOptions['inputAutoTrim'];
|
69 | inputAttributes: SweetAlertOptions['inputAttributes'];
|
70 | inputValidator: SweetAlertOptions['inputValidator'];
|
71 | inputClass: SweetAlertOptions['inputClass'];
|
72 | progressSteps: SweetAlertOptions['progressSteps'];
|
73 | currentProgressStep: SweetAlertOptions['currentProgressStep'];
|
74 | progressStepsDistance: SweetAlertOptions['progressStepsDistance'];
|
75 | |
76 |
|
77 |
|
78 |
|
79 | readonly beforeOpen: EventEmitter<events.BeforeOpenEvent>;
|
80 | |
81 |
|
82 |
|
83 | readonly open: EventEmitter<events.OpenEvent>;
|
84 | |
85 |
|
86 |
|
87 | readonly close: EventEmitter<events.CloseEvent>;
|
88 | |
89 |
|
90 |
|
91 |
|
92 |
|
93 |
|
94 |
|
95 |
|
96 |
|
97 | readonly confirm: EventEmitter<any>;
|
98 | |
99 |
|
100 |
|
101 |
|
102 |
|
103 |
|
104 |
|
105 |
|
106 |
|
107 |
|
108 |
|
109 | readonly cancel: EventEmitter<any>;
|
110 | |
111 |
|
112 |
|
113 |
|
114 |
|
115 |
|
116 |
|
117 | options: SweetAlertOptions;
|
118 | nativeSwal: typeof Swal;
|
119 | private isCurrentlyShown;
|
120 | private readonly touchedProps;
|
121 | private readonly markTouched;
|
122 | constructor(defaultSwalOptions: SweetAlertOptions);
|
123 | ngOnChanges(changes: SimpleChanges): void;
|
124 | ngOnDestroy(): void;
|
125 | /**
|
126 | * Shows the SweetAlert.
|
127 | *
|
128 | * Returns the SweetAlert2 promise for convenience and use in code behind templates.
|
129 | * Otherwise, (confirm)="myHandler($event)" and (cancel)="myHandler($event)" can be used in templates.
|
130 | */
|
131 | show(): Promise<any>;
|
132 | }
|