sweetalert2 11.4.13 → 11.4.16
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/README.md +8 -8
- package/dist/sweetalert2.all.js +447 -60
- package/dist/sweetalert2.all.min.js +1 -1
- package/dist/sweetalert2.js +447 -60
- package/dist/sweetalert2.min.js +1 -1
- package/package.json +3 -3
- package/src/SweetAlert.js +27 -7
- package/src/globalState.js +8 -2
- package/src/instanceMethods/_destroy.js +12 -6
- package/src/keydown-handler.js +47 -4
- package/src/staticMethods/showLoading.js +2 -2
- package/src/types.js +35 -0
- package/src/utils/dom/animationEndEvent.js +3 -0
- package/src/utils/dom/domUtils.js +44 -3
- package/src/utils/dom/getters.js +68 -1
- package/src/utils/dom/init.js +32 -2
- package/src/utils/dom/measureScrollbar.js +6 -2
- package/src/utils/dom/parseHtmlToContainer.js +4 -0
- package/src/utils/dom/renderers/render.js +4 -0
- package/src/utils/dom/renderers/renderActions.js +20 -0
- package/src/utils/dom/renderers/renderCloseButton.js +4 -0
- package/src/utils/dom/renderers/renderContainer.js +32 -16
- package/src/utils/dom/renderers/renderContent.js +4 -0
- package/src/utils/dom/renderers/renderFooter.js +4 -0
- package/src/utils/dom/renderers/renderIcon.js +20 -0
- package/src/utils/dom/renderers/renderImage.js +4 -0
- package/src/utils/dom/renderers/renderInput.js +0 -2
- package/src/utils/dom/renderers/renderPopup.js +8 -0
- package/src/utils/dom/renderers/renderProgressSteps.js +28 -16
- package/src/utils/dom/renderers/renderTitle.js +4 -0
- package/src/utils/utils.js +1 -1
- package/sweetalert2.d.ts +4 -1
package/sweetalert2.d.ts
CHANGED
|
@@ -79,7 +79,7 @@ declare module 'sweetalert2' {
|
|
|
79
79
|
* @param result The promise originally returned by `Swal.fire()` will be resolved with this value.
|
|
80
80
|
* If no object is given, the promise is resolved with an empty `SweetAlertResult` object.
|
|
81
81
|
*/
|
|
82
|
-
function close(result?: SweetAlertResult): void
|
|
82
|
+
function close(result?: Partial<SweetAlertResult>): void
|
|
83
83
|
|
|
84
84
|
/**
|
|
85
85
|
* Gets the popup container which contains the backdrop and the popup itself.
|
|
@@ -636,12 +636,14 @@ declare module 'sweetalert2' {
|
|
|
636
636
|
|
|
637
637
|
/**
|
|
638
638
|
* CSS classes for animations when showing a popup (fade in)
|
|
639
|
+
*
|
|
639
640
|
* @default { popup: 'swal2-show', backdrop: 'swal2-backdrop-show', icon: 'swal2-icon-show' }
|
|
640
641
|
*/
|
|
641
642
|
showClass?: SweetAlertShowClass
|
|
642
643
|
|
|
643
644
|
/**
|
|
644
645
|
* CSS classes for animations when hiding a popup (fade out)
|
|
646
|
+
*
|
|
645
647
|
* @default { popup: 'swal2-hide', backdrop: 'swal2-backdrop-hide', icon: 'swal2-icon-hide' }
|
|
646
648
|
*/
|
|
647
649
|
hideClass?: SweetAlertHideClass
|
|
@@ -1008,6 +1010,7 @@ declare module 'sweetalert2' {
|
|
|
1008
1010
|
/**
|
|
1009
1011
|
* If the `input` parameter is set to `'select'` or `'radio'`, you can provide options.
|
|
1010
1012
|
* Object keys will represent options values, object values will represent options text values.
|
|
1013
|
+
*
|
|
1011
1014
|
* @default {}
|
|
1012
1015
|
*/
|
|
1013
1016
|
inputOptions?: SyncOrAsync<ReadonlyMap<string, string> | Record<string, any>>
|