A Razor class library for interacting with SweetAlert2
This release adds support for the .NET 8 runetime, using the v8 versions of the Microsoft.AspNetCore.Components
and Microsoft.AspNetCore.Components.Web
packages.
Microsoft.AspNetCore.Components@6
to 6.0.25
Microsoft.AspNetCore.Components.Web@6
to 6.0.25
Microsoft.AspNetCore.Components@7
to 7.0.14
Microsoft.AspNetCore.Components.Web@7
to 7.0.14
This library no longer targets .NET Core 3.1 as it is no longer a supported version of .NET. The library still targets .NET Standard 2.0, so apps that are still on .NET Core 3.1 should still be able to use it.
IAsyncSweetAlertService
interfaceThe IAsyncSweetAlertService
interface has been made public by request. (https://github.com/Basaingeal/Razor.SweetAlert2/issues/2183)
The author of the sweetalert2
library added protestware concerning the war between Russia and Ukraine. (https://github.com/sweetalert2/sweetalert2/pull/2462) (SNYK: Undesired Behavior in sweetalert2)
This protestware was recently updated to auto-play the Ukrainian national anthem in addition to disabling all user events. This library will now detect when the <audio>
element that plays the anthem has been added to the document, and removes it.
sweetalert2
to 11.6.15
@sweetalert2/themes
to 5.0.15
The author of the sweetalert2
library added protestware concerning the war between Russia and Ukraine. (https://github.com/sweetalert2/sweetalert2/pull/2462) (SNYK: Undesired Behavior in sweetalert2)
This affects Russian speaking users visiting Russian websites. This was introduced in sweetalert2 11.4.9
and is the reason this wrapper library has been fixed at 11.4.8
for so long. In sweetalert2 11.5.0
, the author changed the protestware to disable the whole website. (https://github.com/sweetalert2/sweetalert2/commit/b101973c6a001fad0c1a88921c4d5e89345e9012)
// Dear russian users visiting russian sites. Let's play a game.
if (typeof window !== 'undefined' && /^ru\b/.test(navigator.language) && location.host.match(/\.(ru|su|xn--p1ai)$/)) {
document.body.style.pointerEvents = 'none'
}
This library bypasses that protest by re-enabling pointerEvents
if they have been disabled. Because the anti-war pop-up was removed in 11.5.0
, there should no longer be any undesired functionality when using this library.
Added support for .NET 7. The dependent libraries are still in Release Candidate mode. I will be bumping up the requirement to the full release versions when they are available.
sweetalert2
to 11.5.0
@sweetalert2/themes
to 5.0.12
Microsoft.AspNetCore.Components
and Microsoft.AspNetCore.Components.Web
v7 preview
sweetalert2
to 11.4.8