sweetalert2 11.3.7 → 11.4.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/sweetalert2.d.ts CHANGED
@@ -12,7 +12,6 @@ declare module 'sweetalert2' {
12
12
  * ```
13
13
  */
14
14
  namespace Swal {
15
-
16
15
  /**
17
16
  * Function to display a SweetAlert2 popup, with an object of options, all being optional.
18
17
  * See the `SweetAlertOptions` interface for the list of accepted fields and values.
@@ -26,7 +25,7 @@ declare module 'sweetalert2' {
26
25
  * })
27
26
  * ```
28
27
  */
29
- function fire<T = any>(options: SweetAlertOptions<T>): Promise<SweetAlertResult<Awaited<T>>>;
28
+ function fire<T = any>(options: SweetAlertOptions<T>): Promise<SweetAlertResult<Awaited<T>>>
30
29
 
31
30
  /**
32
31
  * Function to display a simple SweetAlert2 popup.
@@ -36,7 +35,7 @@ declare module 'sweetalert2' {
36
35
  * Swal.fire('The Internet?', 'That thing is still around?', 'question');
37
36
  * ```
38
37
  */
39
- function fire<T = any>(title?: string, html?: string, icon?: SweetAlertIcon): Promise<SweetAlertResult<Awaited<T>>>;
38
+ function fire<T = any>(title?: string, html?: string, icon?: SweetAlertIcon): Promise<SweetAlertResult<Awaited<T>>>
40
39
 
41
40
  /**
42
41
  * Reuse configuration by creating a `Swal` instance.
@@ -54,12 +53,12 @@ declare module 'sweetalert2' {
54
53
  *
55
54
  * @param options the default options to set for this instance.
56
55
  */
57
- function mixin(options: SweetAlertOptions): typeof Swal;
56
+ function mixin(options: SweetAlertOptions): typeof Swal
58
57
 
59
58
  /**
60
59
  * Determines if a popup is shown.
61
60
  */
62
- function isVisible(): boolean;
61
+ function isVisible(): boolean
63
62
 
64
63
  /**
65
64
  * Updates popup options.
@@ -72,7 +71,7 @@ declare module 'sweetalert2' {
72
71
  * })
73
72
  * ```
74
73
  */
75
- function update(options: Pick<SweetAlertOptions, SweetAlertUpdatableParameters>): void;
74
+ function update(options: Pick<SweetAlertOptions, SweetAlertUpdatableParameters>): void
76
75
 
77
76
  /**
78
77
  * Closes the currently open SweetAlert2 popup programmatically.
@@ -80,92 +79,92 @@ declare module 'sweetalert2' {
80
79
  * @param result The promise originally returned by `Swal.fire()` will be resolved with this value.
81
80
  * If no object is given, the promise is resolved with an empty `SweetAlertResult` object.
82
81
  */
83
- function close(result?: SweetAlertResult): void;
82
+ function close(result?: SweetAlertResult): void
84
83
 
85
84
  /**
86
85
  * Gets the popup container which contains the backdrop and the popup itself.
87
86
  */
88
- function getContainer(): HTMLElement | null;
87
+ function getContainer(): HTMLElement | null
89
88
 
90
89
  /**
91
90
  * Gets the popup.
92
91
  */
93
- function getPopup(): HTMLElement | null;
92
+ function getPopup(): HTMLElement | null
94
93
 
95
94
  /**
96
95
  * Gets the popup title.
97
96
  */
98
- function getTitle(): HTMLElement | null;
97
+ function getTitle(): HTMLElement | null
99
98
 
100
99
  /**
101
100
  * Gets progress steps.
102
101
  */
103
- function getProgressSteps(): HTMLElement | null;
102
+ function getProgressSteps(): HTMLElement | null
104
103
 
105
104
  /**
106
105
  * Gets the DOM element where the `html`/`text` parameter is rendered to.
107
106
  */
108
- function getHtmlContainer(): HTMLElement | null;
107
+ function getHtmlContainer(): HTMLElement | null
109
108
 
110
109
  /**
111
110
  * Gets the image.
112
111
  */
113
- function getImage(): HTMLElement | null;
112
+ function getImage(): HTMLElement | null
114
113
 
115
114
  /**
116
115
  * Gets the close button.
117
116
  */
118
- function getCloseButton(): HTMLButtonElement | null;
117
+ function getCloseButton(): HTMLButtonElement | null
119
118
 
120
119
  /**
121
120
  * Gets the icon.
122
121
  */
123
- function getIcon(): HTMLElement | null;
122
+ function getIcon(): HTMLElement | null
124
123
 
125
124
  /**
126
125
  * Gets the "Confirm" button.
127
126
  */
128
- function getConfirmButton(): HTMLButtonElement | null;
127
+ function getConfirmButton(): HTMLButtonElement | null
129
128
 
130
129
  /**
131
130
  * Gets the "Deny" button.
132
131
  */
133
- function getDenyButton(): HTMLButtonElement | null;
132
+ function getDenyButton(): HTMLButtonElement | null
134
133
 
135
134
  /**
136
135
  * Gets the "Cancel" button.
137
136
  */
138
- function getCancelButton(): HTMLButtonElement | null;
137
+ function getCancelButton(): HTMLButtonElement | null
139
138
 
140
139
  /**
141
140
  * Gets actions (buttons) wrapper.
142
141
  */
143
- function getActions(): HTMLElement | null;
142
+ function getActions(): HTMLElement | null
144
143
 
145
144
  /**
146
145
  * Gets the popup footer.
147
146
  */
148
- function getFooter(): HTMLElement | null;
147
+ function getFooter(): HTMLElement | null
149
148
 
150
149
  /**
151
150
  * Gets the timer progress bar (see the `timerProgressBar` param).
152
151
  */
153
- function getTimerProgressBar(): HTMLElement | null;
152
+ function getTimerProgressBar(): HTMLElement | null
154
153
 
155
154
  /**
156
155
  * Gets all focusable elements in the popup.
157
156
  */
158
- function getFocusableElements(): readonly HTMLElement[];
157
+ function getFocusableElements(): readonly HTMLElement[]
159
158
 
160
159
  /**
161
160
  * Enables "Confirm" and "Cancel" buttons.
162
161
  */
163
- function enableButtons(): void;
162
+ function enableButtons(): void
164
163
 
165
164
  /**
166
165
  * Disables "Confirm" and "Cancel" buttons.
167
166
  */
168
- function disableButtons(): void;
167
+ function disableButtons(): void
169
168
 
170
169
  /**
171
170
  * Shows loader (spinner), this is useful with AJAX requests.
@@ -176,95 +175,95 @@ declare module 'sweetalert2' {
176
175
  * Swal.showLoading(Swal.getDenyButton())
177
176
  * ```
178
177
  */
179
- function showLoading(buttonToReplace?: HTMLButtonElement): void;
178
+ function showLoading(buttonToReplace?: HTMLButtonElement): void
180
179
 
181
180
  /**
182
181
  * Hides loader and shows back the button which was hidden by .showLoading()
183
182
  */
184
- function hideLoading(): void;
183
+ function hideLoading(): void
185
184
 
186
185
  /**
187
186
  * Determines if popup is in the loading state.
188
187
  */
189
- function isLoading(): boolean;
188
+ function isLoading(): boolean
190
189
 
191
190
  /**
192
191
  * Clicks the "Confirm" button programmatically.
193
192
  */
194
- function clickConfirm(): void;
193
+ function clickConfirm(): void
195
194
 
196
195
  /**
197
196
  * Clicks the "Deny" button programmatically.
198
197
  */
199
- function clickDeny(): void;
198
+ function clickDeny(): void
200
199
 
201
200
  /**
202
201
  * Clicks the "Cancel" button programmatically.
203
202
  */
204
- function clickCancel(): void;
203
+ function clickCancel(): void
205
204
 
206
205
  /**
207
206
  * Shows a validation message.
208
207
  *
209
208
  * @param validationMessage The validation message.
210
209
  */
211
- function showValidationMessage(validationMessage: string): void;
210
+ function showValidationMessage(validationMessage: string): void
212
211
 
213
212
  /**
214
213
  * Hides validation message.
215
214
  */
216
- function resetValidationMessage(): void;
215
+ function resetValidationMessage(): void
217
216
 
218
217
  /**
219
218
  * Gets the input DOM node, this method works with input parameter.
220
219
  */
221
- function getInput(): HTMLInputElement | null;
220
+ function getInput(): HTMLInputElement | null
222
221
 
223
222
  /**
224
223
  * Disables the popup input. A disabled input element is unusable and un-clickable.
225
224
  */
226
- function disableInput(): void;
225
+ function disableInput(): void
227
226
 
228
227
  /**
229
228
  * Enables the popup input.
230
229
  */
231
- function enableInput(): void;
230
+ function enableInput(): void
232
231
 
233
232
  /**
234
233
  * Gets the validation message container.
235
234
  */
236
- function getValidationMessage(): HTMLElement | null;
235
+ function getValidationMessage(): HTMLElement | null
237
236
 
238
237
  /**
239
238
  * If `timer` parameter is set, returns number of milliseconds of timer remained.
240
239
  * Otherwise, returns undefined.
241
240
  */
242
- function getTimerLeft(): number | undefined;
241
+ function getTimerLeft(): number | undefined
243
242
 
244
243
  /**
245
244
  * Stop timer. Returns number of milliseconds of timer remained.
246
245
  * If `timer` parameter isn't set, returns `undefined`.
247
246
  */
248
- function stopTimer(): number | undefined;
247
+ function stopTimer(): number | undefined
249
248
 
250
249
  /**
251
250
  * Resume timer. Returns number of milliseconds of timer remained.
252
251
  * If `timer` parameter isn't set, returns `undefined`.
253
252
  */
254
- function resumeTimer(): number | undefined;
253
+ function resumeTimer(): number | undefined
255
254
 
256
255
  /**
257
256
  * Toggle timer. Returns number of milliseconds of timer remained.
258
257
  * If `timer` parameter isn't set, returns `undefined`.
259
258
  */
260
- function toggleTimer(): number | undefined;
259
+ function toggleTimer(): number | undefined
261
260
 
262
261
  /**
263
262
  * Check if timer is running. Returns true if timer is running,
264
263
  * and false is timer is paused / stopped.
265
264
  * If `timer` parameter isn't set, returns `undefined`.
266
265
  */
267
- function isTimerRunning(): boolean | undefined;
266
+ function isTimerRunning(): boolean | undefined
268
267
 
269
268
  /**
270
269
  * Increase timer. Returns number of milliseconds of an updated timer.
@@ -272,21 +271,21 @@ declare module 'sweetalert2' {
272
271
  *
273
272
  * @param n The number of milliseconds to add to the currect timer
274
273
  */
275
- function increaseTimer(n: number): number | undefined;
274
+ function increaseTimer(n: number): number | undefined
276
275
 
277
276
  /**
278
277
  * Determines if a given parameter name is valid.
279
278
  *
280
279
  * @param paramName The parameter to check
281
280
  */
282
- function isValidParameter(paramName: string): paramName is keyof SweetAlertOptions;
281
+ function isValidParameter(paramName: string): paramName is keyof SweetAlertOptions
283
282
 
284
283
  /**
285
284
  * Determines if a given parameter name is valid for `Swal.update()` method.
286
285
  *
287
286
  * @param paramName The parameter to check
288
287
  */
289
- function isUpdatableParameter(paramName: string): paramName is SweetAlertUpdatableParameters;
288
+ function isUpdatableParameter(paramName: string): paramName is SweetAlertUpdatableParameters
290
289
 
291
290
  /**
292
291
  * Normalizes the arguments you can give to Swal.fire() in an object of type SweetAlertOptions.
@@ -299,13 +298,17 @@ declare module 'sweetalert2' {
299
298
  *
300
299
  * @param params The array of arguments to normalize.
301
300
  */
302
- function argsToParams<T>(params: SweetAlertArrayOptions | readonly [SweetAlertOptions<T>]): SweetAlertOptions<T>;
301
+ function argsToParams<T>(params: SweetAlertArrayOptions | readonly [SweetAlertOptions<T>]): SweetAlertOptions<T>
303
302
 
304
303
  /**
305
304
  * An enum of possible reasons that can explain an alert dismissal.
306
305
  */
307
306
  enum DismissReason {
308
- cancel, backdrop, close, esc, timer
307
+ cancel,
308
+ backdrop,
309
+ close,
310
+ esc,
311
+ timer,
309
312
  }
310
313
 
311
314
  /**
@@ -315,35 +318,57 @@ declare module 'sweetalert2' {
315
318
  }
316
319
 
317
320
  interface SweetAlertHideShowClass {
318
- backdrop?: string | readonly string[];
319
- icon?: string | readonly string[];
320
- popup?: string | readonly string[];
321
+ backdrop?: string | readonly string[]
322
+ icon?: string | readonly string[]
323
+ popup?: string | readonly string[]
321
324
  }
322
325
 
323
- type Awaited<T> = T extends Promise<infer U> ? U : T;
326
+ type Awaited<T> = T extends Promise<infer U> ? U : T
324
327
 
325
- type SyncOrAsync<T> = T | Promise<T> | { toPromise: () => T };
328
+ type SyncOrAsync<T> = T | Promise<T> | { toPromise: () => T }
326
329
 
327
- type ValueOrThunk<T> = T | (() => T);
330
+ type ValueOrThunk<T> = T | (() => T)
328
331
 
329
- export type SweetAlertArrayOptions = readonly [string?, string?, SweetAlertIcon?];
332
+ export type SweetAlertArrayOptions = readonly [string?, string?, SweetAlertIcon?]
330
333
 
331
- export type SweetAlertGrow = 'row' | 'column' | 'fullscreen' | false;
334
+ export type SweetAlertGrow = 'row' | 'column' | 'fullscreen' | false
332
335
 
333
- export type SweetAlertHideClass = SweetAlertHideShowClass;
336
+ export type SweetAlertHideClass = SweetAlertHideShowClass
334
337
 
335
- export type SweetAlertShowClass = Readonly<SweetAlertHideShowClass>;
338
+ export type SweetAlertShowClass = Readonly<SweetAlertHideShowClass>
336
339
 
337
- export type SweetAlertIcon = 'success' | 'error' | 'warning' | 'info' | 'question';
340
+ export type SweetAlertIcon = 'success' | 'error' | 'warning' | 'info' | 'question'
338
341
 
339
342
  export type SweetAlertInput =
340
- 'text' | 'email' | 'password' | 'number' | 'tel' | 'range' | 'textarea' | 'select' | 'radio' | 'checkbox' |
341
- 'file' | 'url';
343
+ | 'text'
344
+ | 'email'
345
+ | 'password'
346
+ | 'number'
347
+ | 'tel'
348
+ | 'range'
349
+ | 'textarea'
350
+ | 'select'
351
+ | 'radio'
352
+ | 'checkbox'
353
+ | 'file'
354
+ | 'url'
342
355
 
343
356
  export type SweetAlertPosition =
344
- 'top' | 'top-start' | 'top-end' | 'top-left' | 'top-right' |
345
- 'center' | 'center-start' | 'center-end' | 'center-left' | 'center-right' |
346
- 'bottom' | 'bottom-start' | 'bottom-end' | 'bottom-left' | 'bottom-right';
357
+ | 'top'
358
+ | 'top-start'
359
+ | 'top-end'
360
+ | 'top-left'
361
+ | 'top-right'
362
+ | 'center'
363
+ | 'center-start'
364
+ | 'center-end'
365
+ | 'center-left'
366
+ | 'center-right'
367
+ | 'bottom'
368
+ | 'bottom-start'
369
+ | 'bottom-end'
370
+ | 'bottom-left'
371
+ | 'bottom-right'
347
372
 
348
373
  export type SweetAlertUpdatableParameters =
349
374
  | 'allowEscapeKey'
@@ -385,32 +410,33 @@ declare module 'sweetalert2' {
385
410
  | 'text'
386
411
  | 'title'
387
412
  | 'titleText'
388
- | 'willClose';
413
+ | 'willClose'
389
414
 
390
415
  export interface SweetAlertCustomClass {
391
- container?: string | readonly string[];
392
- popup?: string | readonly string[];
393
- title?: string | readonly string[];
394
- closeButton?: string | readonly string[];
395
- icon?: string | readonly string[];
396
- image?: string | readonly string[];
397
- htmlContainer?: string | readonly string[];
398
- input?: string | readonly string[];
399
- validationMessage?: string | readonly string[];
400
- actions?: string | readonly string[];
401
- confirmButton?: string | readonly string[];
402
- denyButton?: string | readonly string[];
403
- cancelButton?: string | readonly string[];
404
- loader?: string | readonly string[];
405
- footer?: string | readonly string[];
416
+ container?: string | readonly string[]
417
+ popup?: string | readonly string[]
418
+ title?: string | readonly string[]
419
+ closeButton?: string | readonly string[]
420
+ icon?: string | readonly string[]
421
+ image?: string | readonly string[]
422
+ htmlContainer?: string | readonly string[]
423
+ input?: string | readonly string[]
424
+ validationMessage?: string | readonly string[]
425
+ actions?: string | readonly string[]
426
+ confirmButton?: string | readonly string[]
427
+ denyButton?: string | readonly string[]
428
+ cancelButton?: string | readonly string[]
429
+ loader?: string | readonly string[]
430
+ footer?: string | readonly string[]
431
+ timerProgressBar?: string | readonly string[]
406
432
  }
407
433
 
408
434
  export interface SweetAlertResult<T = any> {
409
- readonly isConfirmed: boolean;
410
- readonly isDenied: boolean;
411
- readonly isDismissed: boolean;
412
- readonly value?: T;
413
- readonly dismiss?: Swal.DismissReason;
435
+ readonly isConfirmed: boolean
436
+ readonly isDenied: boolean
437
+ readonly isDismissed: boolean
438
+ readonly value?: T
439
+ readonly dismiss?: Swal.DismissReason
414
440
  }
415
441
 
416
442
  export interface SweetAlertOptions<PreConfirmResult = any, PreConfirmCallbackValue = any> {
@@ -420,14 +446,14 @@ declare module 'sweetalert2' {
420
446
  *
421
447
  * @default ''
422
448
  */
423
- title?: string | HTMLElement | JQuery;
449
+ title?: string | HTMLElement | JQuery
424
450
 
425
451
  /**
426
452
  * The title of the popup, as text. Useful to avoid HTML injection.
427
453
  *
428
454
  * @default ''
429
455
  */
430
- titleText?: string;
456
+ titleText?: string
431
457
 
432
458
  /**
433
459
  * A description for the popup.
@@ -435,7 +461,7 @@ declare module 'sweetalert2' {
435
461
  *
436
462
  * @default ''
437
463
  */
438
- text?: string;
464
+ text?: string
439
465
 
440
466
  /**
441
467
  * A HTML description for the popup.
@@ -446,7 +472,7 @@ declare module 'sweetalert2' {
446
472
  *
447
473
  * @default ''
448
474
  */
449
- html?: string | HTMLElement | JQuery;
475
+ html?: string | HTMLElement | JQuery
450
476
 
451
477
  /**
452
478
  * The icon of the popup.
@@ -456,14 +482,14 @@ declare module 'sweetalert2' {
456
482
  *
457
483
  * @default undefined
458
484
  */
459
- icon?: SweetAlertIcon;
485
+ icon?: SweetAlertIcon
460
486
 
461
487
  /**
462
488
  * Use this to change the color of the icon.
463
489
  *
464
490
  * @default undefined
465
491
  */
466
- iconColor?: string;
492
+ iconColor?: string
467
493
 
468
494
  /**
469
495
  * The custom HTML content for an icon.
@@ -478,14 +504,14 @@ declare module 'sweetalert2' {
478
504
  *
479
505
  * @default undefined
480
506
  */
481
- iconHtml?: string;
507
+ iconHtml?: string
482
508
 
483
509
  /**
484
510
  * The footer of the popup, as HTML.
485
511
  *
486
512
  * @default ''
487
513
  */
488
- footer?: string | HTMLElement | JQuery;
514
+ footer?: string | HTMLElement | JQuery
489
515
 
490
516
  /**
491
517
  * The declarative <template> of the popup. All API prams can be set via
@@ -531,7 +557,7 @@ declare module 'sweetalert2' {
531
557
  *
532
558
  * @default undefined
533
559
  */
534
- template?: string | HTMLTemplateElement;
560
+ template?: string | HTMLTemplateElement
535
561
 
536
562
  /**
537
563
  * Whether or not SweetAlert2 should show a full screen click-to-dismiss backdrop.
@@ -539,7 +565,7 @@ declare module 'sweetalert2' {
539
565
  *
540
566
  * @default true
541
567
  */
542
- backdrop?: boolean | string;
568
+ backdrop?: boolean | string
543
569
 
544
570
  /**
545
571
  * Whether or not an alert should be treated as a toast notification.
@@ -548,14 +574,14 @@ declare module 'sweetalert2' {
548
574
  *
549
575
  * @default false
550
576
  */
551
- toast?: boolean;
577
+ toast?: boolean
552
578
 
553
579
  /**
554
580
  * The container element for adding popup into (query selector only).
555
581
  *
556
582
  * @default 'body'
557
583
  */
558
- target?: string | HTMLElement;
584
+ target?: string | HTMLElement
559
585
 
560
586
  /**
561
587
  * Input field type, can be `'text'`, `'email'`, `'password'`, `'number'`, `'tel'`, `'range'`, `'textarea'`,
@@ -563,61 +589,61 @@ declare module 'sweetalert2' {
563
589
  *
564
590
  * @default undefined
565
591
  */
566
- input?: SweetAlertInput;
592
+ input?: SweetAlertInput
567
593
 
568
594
  /**
569
595
  * Popup width, including paddings (`box-sizing: border-box`).
570
596
  *
571
597
  * @default undefined
572
598
  */
573
- width?: number | string;
599
+ width?: number | string
574
600
 
575
601
  /**
576
602
  * Popup padding.
577
603
  *
578
604
  * @default undefined
579
605
  */
580
- padding?: number | string;
606
+ padding?: number | string
581
607
 
582
608
  /**
583
609
  * Color for title, content and footer (CSS `color` property). The default color is `#545454`.
584
610
  *
585
611
  * @default undefined
586
612
  */
587
- color?: string;
613
+ color?: string
588
614
 
589
615
  /**
590
616
  * Popup background (CSS `background` property). The default background is `#fff`.
591
617
  *
592
618
  * @default undefined
593
619
  */
594
- background?: string;
620
+ background?: string
595
621
 
596
622
  /**
597
623
  * Popup position
598
624
  *
599
625
  * @default 'center'
600
626
  */
601
- position?: SweetAlertPosition;
627
+ position?: SweetAlertPosition
602
628
 
603
629
  /**
604
630
  * Popup grow direction
605
631
  *
606
632
  * @default false
607
633
  */
608
- grow?: SweetAlertGrow;
634
+ grow?: SweetAlertGrow
609
635
 
610
636
  /**
611
637
  * CSS classes for animations when showing a popup (fade in)
612
638
  * @default { popup: 'swal2-show', backdrop: 'swal2-backdrop-show', icon: 'swal2-icon-show' }
613
639
  */
614
- showClass?: SweetAlertShowClass;
640
+ showClass?: SweetAlertShowClass
615
641
 
616
642
  /**
617
643
  * CSS classes for animations when hiding a popup (fade out)
618
644
  * @default { popup: 'swal2-hide', backdrop: 'swal2-backdrop-hide', icon: 'swal2-icon-hide' }
619
645
  */
620
- hideClass?: SweetAlertHideClass;
646
+ hideClass?: SweetAlertHideClass
621
647
 
622
648
  /**
623
649
  * A custom CSS class for the popup.
@@ -642,21 +668,22 @@ declare module 'sweetalert2' {
642
668
  * denyButton: '...',
643
669
  * cancelButton: '...',
644
670
  * loader: '...',
645
- * footer: '...'
671
+ * footer: '...',
672
+ * timerProgressBar: '...',
646
673
  * }
647
674
  * })
648
675
  * ```
649
676
  *
650
677
  * @default {}
651
678
  */
652
- customClass?: SweetAlertCustomClass;
679
+ customClass?: SweetAlertCustomClass
653
680
 
654
681
  /**
655
682
  * Auto close timer of the popup. Set in ms (milliseconds).
656
683
  *
657
684
  * @default undefined
658
685
  */
659
- timer?: number;
686
+ timer?: number
660
687
 
661
688
  /**
662
689
  * If set to `true`, the timer will have a progress bar at the bottom of a popup.
@@ -664,7 +691,7 @@ declare module 'sweetalert2' {
664
691
  *
665
692
  * @default false
666
693
  */
667
- timerProgressBar?: boolean;
694
+ timerProgressBar?: boolean
668
695
 
669
696
  /**
670
697
  * By default, SweetAlert2 sets html's and body's CSS `height` to `auto !important`.
@@ -672,7 +699,7 @@ declare module 'sweetalert2' {
672
699
  *
673
700
  * @default true
674
701
  */
675
- heightAuto?: boolean;
702
+ heightAuto?: boolean
676
703
 
677
704
  /**
678
705
  * If set to `false`, the user can't dismiss the popup by clicking outside it.
@@ -681,7 +708,7 @@ declare module 'sweetalert2' {
681
708
  *
682
709
  * @default true
683
710
  */
684
- allowOutsideClick?: ValueOrThunk<boolean>;
711
+ allowOutsideClick?: ValueOrThunk<boolean>
685
712
 
686
713
  /**
687
714
  * If set to `false`, the user can't dismiss the popup by pressing the Escape key.
@@ -690,7 +717,7 @@ declare module 'sweetalert2' {
690
717
  *
691
718
  * @default true
692
719
  */
693
- allowEscapeKey?: ValueOrThunk<boolean>;
720
+ allowEscapeKey?: ValueOrThunk<boolean>
694
721
 
695
722
  /**
696
723
  * If set to `false`, the user can't confirm the popup by pressing the Enter or Space keys,
@@ -699,14 +726,14 @@ declare module 'sweetalert2' {
699
726
  *
700
727
  * @default true
701
728
  */
702
- allowEnterKey?: ValueOrThunk<boolean>;
729
+ allowEnterKey?: ValueOrThunk<boolean>
703
730
 
704
731
  /**
705
732
  * If set to `false`, SweetAlert2 will allow keydown events propagation to the document.
706
733
  *
707
734
  * @default true
708
735
  */
709
- stopKeydownPropagation?: boolean;
736
+ stopKeydownPropagation?: boolean
710
737
 
711
738
  /**
712
739
  * Useful for those who are using SweetAlert2 along with Bootstrap modals.
@@ -716,7 +743,7 @@ declare module 'sweetalert2' {
716
743
  *
717
744
  * @default false
718
745
  */
719
- keydownListenerCapture?: boolean;
746
+ keydownListenerCapture?: boolean
720
747
 
721
748
  /**
722
749
  * If set to `false`, the "Confirm" button will not be shown.
@@ -724,84 +751,84 @@ declare module 'sweetalert2' {
724
751
  *
725
752
  * @default true
726
753
  */
727
- showConfirmButton?: boolean;
754
+ showConfirmButton?: boolean
728
755
 
729
756
  /**
730
757
  * If set to `true`, the "Deny" button will be shown, which the user can click on to deny the popup.
731
758
  *
732
759
  * @default false
733
760
  */
734
- showDenyButton?: boolean;
761
+ showDenyButton?: boolean
735
762
 
736
763
  /**
737
764
  * If set to `true`, the "Cancel" button will be shown, which the user can click on to dismiss the popup.
738
765
  *
739
766
  * @default false
740
767
  */
741
- showCancelButton?: boolean;
768
+ showCancelButton?: boolean
742
769
 
743
770
  /**
744
771
  * Use this to change the text on the "Confirm" button.
745
772
  *
746
773
  * @default 'OK'
747
774
  */
748
- confirmButtonText?: string;
775
+ confirmButtonText?: string
749
776
 
750
777
  /**
751
778
  * Use this to change the text on the "Confirm" button.
752
779
  *
753
780
  * @default 'No'
754
781
  */
755
- denyButtonText?: string;
782
+ denyButtonText?: string
756
783
 
757
784
  /**
758
785
  * Use this to change the text on the "Cancel" button.
759
786
  *
760
787
  * @default 'Cancel'
761
788
  */
762
- cancelButtonText?: string;
789
+ cancelButtonText?: string
763
790
 
764
791
  /**
765
792
  * Use this to change the background color of the "Confirm" button.
766
793
  *
767
794
  * @default undefined
768
795
  */
769
- confirmButtonColor?: string;
796
+ confirmButtonColor?: string
770
797
 
771
798
  /**
772
799
  * Use this to change the background color of the "Deny" button.
773
800
  *
774
801
  * @default undefined
775
802
  */
776
- denyButtonColor?: string;
803
+ denyButtonColor?: string
777
804
 
778
805
  /**
779
806
  * Use this to change the background color of the "Cancel" button.
780
807
  *
781
808
  * @default undefined
782
809
  */
783
- cancelButtonColor?: string;
810
+ cancelButtonColor?: string
784
811
 
785
812
  /**
786
813
  * Use this to change the `aria-label` for the "Confirm" button.
787
814
  *
788
815
  * @default ''
789
816
  */
790
- confirmButtonAriaLabel?: string;
817
+ confirmButtonAriaLabel?: string
791
818
 
792
819
  /**
793
820
  * Use this to change the `aria-label` for the "Deny" button.
794
821
  *
795
822
  * @default ''
796
823
  */
797
- denyButtonAriaLabel?: string;
824
+ denyButtonAriaLabel?: string
798
825
 
799
826
  /**
800
827
  * Use this to change the `aria-label` for the "Cancel" button.
801
828
  *
802
829
  * @default ''
803
830
  */
804
- cancelButtonAriaLabel?: string;
831
+ cancelButtonAriaLabel?: string
805
832
 
806
833
  /**
807
834
  * Whether to apply the default SweetAlert2 styling to buttons.
@@ -809,35 +836,35 @@ declare module 'sweetalert2' {
809
836
  *
810
837
  * @default true
811
838
  */
812
- buttonsStyling?: boolean;
839
+ buttonsStyling?: boolean
813
840
 
814
841
  /**
815
842
  * Set to `true` if you want to invert default buttons positions.
816
843
  *
817
844
  * @default false
818
845
  */
819
- reverseButtons?: boolean;
846
+ reverseButtons?: boolean
820
847
 
821
848
  /**
822
849
  * Set to `false` if you want to focus the first element in tab order instead of the "Confirm" button by default.
823
850
  *
824
851
  * @default true
825
852
  */
826
- focusConfirm?: boolean;
853
+ focusConfirm?: boolean
827
854
 
828
855
  /**
829
856
  * Set to `true` if you want to focus the "Deny" button by default.
830
857
  *
831
858
  * @default false
832
859
  */
833
- focusDeny?: boolean;
860
+ focusDeny?: boolean
834
861
 
835
862
  /**
836
863
  * Set to `true` if you want to focus the "Cancel" button by default.
837
864
  *
838
865
  * @default false
839
866
  */
840
- focusCancel?: boolean;
867
+ focusCancel?: boolean
841
868
 
842
869
  /**
843
870
  * Set to `false` if you don't want to return the focus to the element that invoked the modal
@@ -845,35 +872,35 @@ declare module 'sweetalert2' {
845
872
  *
846
873
  * @default true
847
874
  */
848
- returnFocus?: boolean;
875
+ returnFocus?: boolean
849
876
 
850
877
  /**
851
878
  * Set to `true` to show close button.
852
879
  *
853
880
  * @default false
854
881
  */
855
- showCloseButton?: boolean;
882
+ showCloseButton?: boolean
856
883
 
857
884
  /**
858
885
  * Use this to change the HTML content of the close button.
859
886
  *
860
887
  * @default '&times;'
861
888
  */
862
- closeButtonHtml?: string;
889
+ closeButtonHtml?: string
863
890
 
864
891
  /**
865
892
  * Use this to change the `aria-label` for the close button.
866
893
  *
867
894
  * @default 'Close this dialog'
868
895
  */
869
- closeButtonAriaLabel?: string;
896
+ closeButtonAriaLabel?: string
870
897
 
871
898
  /**
872
899
  * Use this to change the HTML content of the loader.
873
900
  *
874
901
  * @default ''
875
902
  */
876
- loaderHtml?: string;
903
+ loaderHtml?: string
877
904
 
878
905
  /**
879
906
  * Set to `true` to disable buttons and show the loader instead of the Confirm button.
@@ -881,7 +908,7 @@ declare module 'sweetalert2' {
881
908
  *
882
909
  * @default false
883
910
  */
884
- showLoaderOnConfirm?: boolean;
911
+ showLoaderOnConfirm?: boolean
885
912
 
886
913
  /**
887
914
  * Set to `true` to disable buttons and show the loader instead of the Deny button.
@@ -889,7 +916,7 @@ declare module 'sweetalert2' {
889
916
  *
890
917
  * @default false
891
918
  */
892
- showLoaderOnDeny?: boolean;
919
+ showLoaderOnDeny?: boolean
893
920
 
894
921
  /**
895
922
  * Function to execute before confirming, may be async (Promise-returning) or sync.
@@ -915,7 +942,7 @@ declare module 'sweetalert2' {
915
942
  *
916
943
  * @default undefined
917
944
  */
918
- preConfirm?(inputValue: PreConfirmCallbackValue): PreConfirmResult;
945
+ preConfirm?(inputValue: PreConfirmCallbackValue): PreConfirmResult
919
946
 
920
947
  /**
921
948
  * Function to execute before denying, may be async (Promise-returning) or sync.
@@ -926,63 +953,63 @@ declare module 'sweetalert2' {
926
953
  *
927
954
  * @default undefined
928
955
  */
929
- preDeny?(value: any): SyncOrAsync<any | void>;
956
+ preDeny?(value: any): SyncOrAsync<any | void>
930
957
 
931
958
  /**
932
959
  * Add an image to the popup. Should contain a string with the path or URL to the image.
933
960
  *
934
961
  * @default undefined
935
962
  */
936
- imageUrl?: string;
963
+ imageUrl?: string
937
964
 
938
965
  /**
939
966
  * If imageUrl is set, you can specify imageWidth to describes image width.
940
967
  *
941
968
  * @default undefined
942
969
  */
943
- imageWidth?: number | string;
970
+ imageWidth?: number | string
944
971
 
945
972
  /**
946
973
  * If imageUrl is set, you can specify imageHeight to describes image height.
947
974
  *
948
975
  * @default undefined
949
976
  */
950
- imageHeight?: number | string;
977
+ imageHeight?: number | string
951
978
 
952
979
  /**
953
980
  * An alternative text for the custom image icon.
954
981
  *
955
982
  * @default ''
956
983
  */
957
- imageAlt?: string;
984
+ imageAlt?: string
958
985
 
959
986
  /**
960
987
  * Input field label.
961
988
  *
962
989
  * @default ''
963
990
  */
964
- inputLabel?: string;
991
+ inputLabel?: string
965
992
 
966
993
  /**
967
994
  * Input field placeholder.
968
995
  *
969
996
  * @default ''
970
997
  */
971
- inputPlaceholder?: string;
998
+ inputPlaceholder?: string
972
999
 
973
1000
  /**
974
1001
  * Input field initial value.
975
1002
  *
976
1003
  * @default ''
977
1004
  */
978
- inputValue?: SyncOrAsync<string | number | boolean>;
1005
+ inputValue?: SyncOrAsync<string | number | boolean>
979
1006
 
980
1007
  /**
981
1008
  * If the `input` parameter is set to `'select'` or `'radio'`, you can provide options.
982
1009
  * Object keys will represent options values, object values will represent options text values.
983
1010
  * @default {}
984
1011
  */
985
- inputOptions?: SyncOrAsync<ReadonlyMap<string, string> | Record<string, any>>;
1012
+ inputOptions?: SyncOrAsync<ReadonlyMap<string, string> | Record<string, any>>
986
1013
 
987
1014
  /**
988
1015
  * Automatically remove whitespaces from both ends of a result string.
@@ -990,7 +1017,7 @@ declare module 'sweetalert2' {
990
1017
  *
991
1018
  * @default true
992
1019
  */
993
- inputAutoTrim?: boolean;
1020
+ inputAutoTrim?: boolean
994
1021
 
995
1022
  /**
996
1023
  * HTML input attributes (e.g. `min`, `max`, `step`, `accept`), that are added to the input field.
@@ -1008,7 +1035,7 @@ declare module 'sweetalert2' {
1008
1035
  *
1009
1036
  * @default {}
1010
1037
  */
1011
- inputAttributes?: Record<string, string>;
1038
+ inputAttributes?: Record<string, string>
1012
1039
 
1013
1040
  /**
1014
1041
  * Validator for input field, may be async (Promise-returning) or sync.
@@ -1024,7 +1051,7 @@ declare module 'sweetalert2' {
1024
1051
  *
1025
1052
  * @default undefined
1026
1053
  */
1027
- inputValidator?(inputValue: string): SyncOrAsync<string | null>;
1054
+ inputValidator?(inputValue: string): SyncOrAsync<string | null>
1028
1055
 
1029
1056
  /**
1030
1057
  * If you want to return the input value as `result.value` when denying the popup, set to `true`.
@@ -1032,7 +1059,7 @@ declare module 'sweetalert2' {
1032
1059
  *
1033
1060
  * @default false
1034
1061
  */
1035
- returnInputValueOnDeny?: boolean;
1062
+ returnInputValueOnDeny?: boolean
1036
1063
 
1037
1064
  /**
1038
1065
  * A custom validation message for default validators (email, url).
@@ -1047,28 +1074,28 @@ declare module 'sweetalert2' {
1047
1074
  *
1048
1075
  * @default undefined
1049
1076
  */
1050
- validationMessage?: string;
1077
+ validationMessage?: string
1051
1078
 
1052
1079
  /**
1053
1080
  * Progress steps, useful for popup queues.
1054
1081
  *
1055
1082
  * @default []
1056
1083
  */
1057
- progressSteps?: readonly string[];
1084
+ progressSteps?: readonly string[]
1058
1085
 
1059
1086
  /**
1060
1087
  * Current active progress step.
1061
1088
  *
1062
1089
  * @default undefined
1063
1090
  */
1064
- currentProgressStep?: number;
1091
+ currentProgressStep?: number
1065
1092
 
1066
1093
  /**
1067
1094
  * Distance between progress steps.
1068
1095
  *
1069
1096
  * @default undefined
1070
1097
  */
1071
- progressStepsDistance?: number | string;
1098
+ progressStepsDistance?: number | string
1072
1099
 
1073
1100
  /**
1074
1101
  * Popup lifecycle hook. Synchronously runs before the popup is shown on screen.
@@ -1076,7 +1103,7 @@ declare module 'sweetalert2' {
1076
1103
  * @default undefined
1077
1104
  * @param popup The popup DOM element.
1078
1105
  */
1079
- willOpen?(popup: HTMLElement): void;
1106
+ willOpen?(popup: HTMLElement): void
1080
1107
 
1081
1108
  /**
1082
1109
  * Popup lifecycle hook. Asynchronously runs after the popup has been shown on screen.
@@ -1084,7 +1111,7 @@ declare module 'sweetalert2' {
1084
1111
  * @default undefined
1085
1112
  * @param popup The popup DOM element.
1086
1113
  */
1087
- didOpen?(popup: HTMLElement): void;
1114
+ didOpen?(popup: HTMLElement): void
1088
1115
 
1089
1116
  /**
1090
1117
  * Popup lifecycle hook. Synchronously runs after the popup DOM has been updated (ie. just before the popup is
@@ -1096,7 +1123,7 @@ declare module 'sweetalert2' {
1096
1123
  * @default undefined
1097
1124
  * @param popup The popup DOM element.
1098
1125
  */
1099
- didRender?(popup: HTMLElement): void;
1126
+ didRender?(popup: HTMLElement): void
1100
1127
 
1101
1128
  /**
1102
1129
  * Popup lifecycle hook. Synchronously runs when the popup closes by user interaction (and not due to another popup
@@ -1105,7 +1132,7 @@ declare module 'sweetalert2' {
1105
1132
  * @default undefined
1106
1133
  * @param popup The popup DOM element.
1107
1134
  */
1108
- willClose?(popup: HTMLElement): void;
1135
+ willClose?(popup: HTMLElement): void
1109
1136
 
1110
1137
  /**
1111
1138
  * Popup lifecycle hook. Asynchronously runs after the popup has been disposed by user interaction (and not due to
@@ -1113,7 +1140,7 @@ declare module 'sweetalert2' {
1113
1140
  *
1114
1141
  * @default undefined
1115
1142
  */
1116
- didClose?(): void;
1143
+ didClose?(): void
1117
1144
 
1118
1145
  /**
1119
1146
  * Popup lifecycle hook. Synchronously runs after popup has been destroyed either by user interaction or by another
@@ -1123,14 +1150,14 @@ declare module 'sweetalert2' {
1123
1150
  *
1124
1151
  * @default undefined
1125
1152
  */
1126
- didDestroy?(): void;
1153
+ didDestroy?(): void
1127
1154
 
1128
1155
  /**
1129
1156
  * Set to `false` to disable body padding adjustment when scrollbar is present.
1130
1157
  *
1131
1158
  * @default true
1132
1159
  */
1133
- scrollbarPadding?: boolean;
1160
+ scrollbarPadding?: boolean
1134
1161
  }
1135
1162
 
1136
1163
  export default Swal
@@ -1153,5 +1180,4 @@ declare module 'sweetalert2/*/sweetalert2.all.js' {
1153
1180
  * They will be merged with 'true' definitions.
1154
1181
  */
1155
1182
 
1156
- interface JQuery {
1157
- }
1183
+ interface JQuery {}