sweetalert2 11.26.2 → 11.26.4
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 +2 -6
- package/dist/sweetalert2.all.js +6 -3
- package/dist/sweetalert2.all.min.js +2 -2
- package/dist/sweetalert2.esm.all.js +6 -3
- package/dist/sweetalert2.esm.all.min.js +2 -2
- package/dist/sweetalert2.esm.js +6 -3
- package/dist/sweetalert2.esm.min.js +2 -2
- package/dist/sweetalert2.js +6 -3
- package/dist/sweetalert2.min.js +2 -2
- package/package.json +1 -1
- package/src/SweetAlert.js +1 -1
- package/src/types.js +1 -0
- package/src/utils/dom/init.js +1 -0
- package/src/utils/draggable.js +4 -1
- package/sweetalert2.d.ts +8 -8
package/src/types.js
CHANGED
package/src/utils/dom/init.js
CHANGED
package/src/utils/draggable.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import globalState from '../globalState.js'
|
|
1
2
|
import * as dom from './dom/index.js'
|
|
2
3
|
|
|
3
4
|
let dragging = false
|
|
@@ -57,7 +58,9 @@ const move = (event) => {
|
|
|
57
58
|
|
|
58
59
|
if (dragging) {
|
|
59
60
|
let { clientX, clientY } = getClientXY(event)
|
|
60
|
-
|
|
61
|
+
const deltaX = clientX - mousedownX
|
|
62
|
+
// In RTL mode, negate the horizontal delta since insetInlineStart refers to the right edge
|
|
63
|
+
popup.style.insetInlineStart = `${initialX + (globalState.isRTL ? -deltaX : deltaX)}px`
|
|
61
64
|
popup.style.insetBlockStart = `${initialY + (clientY - mousedownY)}px`
|
|
62
65
|
}
|
|
63
66
|
}
|
package/sweetalert2.d.ts
CHANGED
|
@@ -322,14 +322,14 @@ declare module 'sweetalert2' {
|
|
|
322
322
|
function argsToParams(params: SweetAlertArrayOptions | readonly [SweetAlertOptions]): SweetAlertOptions
|
|
323
323
|
|
|
324
324
|
/**
|
|
325
|
-
* An
|
|
326
|
-
*/
|
|
327
|
-
|
|
328
|
-
cancel
|
|
329
|
-
backdrop
|
|
330
|
-
close
|
|
331
|
-
esc
|
|
332
|
-
timer
|
|
325
|
+
* An object of possible reasons that can explain an alert dismissal.
|
|
326
|
+
*/
|
|
327
|
+
const DismissReason: {
|
|
328
|
+
readonly cancel: 'cancel'
|
|
329
|
+
readonly backdrop: 'backdrop'
|
|
330
|
+
readonly close: 'close'
|
|
331
|
+
readonly esc: 'esc'
|
|
332
|
+
readonly timer: 'timer'
|
|
333
333
|
}
|
|
334
334
|
|
|
335
335
|
/**
|