diff --git a/abp_io/AbpIoLocalization/AbpIoLocalization/Account/Localization/Resources/en-GB.json b/abp_io/AbpIoLocalization/AbpIoLocalization/Account/Localization/Resources/en-GB.json index c1f56de865..c20405a8d3 100644 --- a/abp_io/AbpIoLocalization/AbpIoLocalization/Account/Localization/Resources/en-GB.json +++ b/abp_io/AbpIoLocalization/AbpIoLocalization/Account/Localization/Resources/en-GB.json @@ -9,6 +9,7 @@ "OfficialBlog": "Official blog", "CommercialHomePage": "Commercial home page", "CommercialSupportWebSite": "Commercial support web site", - "CommunityWebSite": "ABP community web site" + "CommunityWebSite": "ABP community web site", + "ManageAccount": "My Account | ABP.IO" } } \ No newline at end of file diff --git a/abp_io/AbpIoLocalization/AbpIoLocalization/Account/Localization/Resources/en.json b/abp_io/AbpIoLocalization/AbpIoLocalization/Account/Localization/Resources/en.json index eb49443d6e..c4581a5fd8 100644 --- a/abp_io/AbpIoLocalization/AbpIoLocalization/Account/Localization/Resources/en.json +++ b/abp_io/AbpIoLocalization/AbpIoLocalization/Account/Localization/Resources/en.json @@ -9,6 +9,7 @@ "OfficialBlog": "Official blog", "CommercialHomePage": "Commercial home page", "CommercialSupportWebSite": "Commercial support web site", - "CommunityWebSite": "ABP community web site" + "CommunityWebSite": "ABP community web site", + "ManageAccount": "My Account | ABP.IO" } } \ No newline at end of file diff --git a/abp_io/AbpIoLocalization/AbpIoLocalization/Account/Localization/Resources/tr.json b/abp_io/AbpIoLocalization/AbpIoLocalization/Account/Localization/Resources/tr.json index e403e72cf6..a7fec38074 100644 --- a/abp_io/AbpIoLocalization/AbpIoLocalization/Account/Localization/Resources/tr.json +++ b/abp_io/AbpIoLocalization/AbpIoLocalization/Account/Localization/Resources/tr.json @@ -9,6 +9,7 @@ "OfficialBlog": "Resmi blog", "CommercialHomePage": "Kurumsal ana sayfa", "CommercialSupportWebSite": "Kurumsal destek web sitesi", - "CommunityWebSite": "ABP topluluk web sitesi" + "CommunityWebSite": "ABP topluluk web sitesi", + "ManageAccount": "Hesabım | ABP.IO" } } \ No newline at end of file diff --git a/abp_io/AbpIoLocalization/AbpIoLocalization/Admin/Localization/Resources/en.json b/abp_io/AbpIoLocalization/AbpIoLocalization/Admin/Localization/Resources/en.json index e23ed3fe5b..f7094c94a7 100644 --- a/abp_io/AbpIoLocalization/AbpIoLocalization/Admin/Localization/Resources/en.json +++ b/abp_io/AbpIoLocalization/AbpIoLocalization/Admin/Localization/Resources/en.json @@ -310,6 +310,45 @@ "DeleteInvoice" : "Delete Invoice", "SuccessfullyDeleted": "Successfully deleted!", "PaymentStateSetTo" : "Payment state set to {0}", - "ChangeState": "Change State" + "ChangeState": "Change State", + "Permission:TrialLicense" : "Trial License", + "Permission:ManageTrialLicense": "Manage Trial License", + "Menu:TrialLicenses": "Trial Licenses", + "TrialLicenses": "Trial Licenses", + "UserNameFilter": "Username", + "TrialLicenseStatusFilter": "Status", + "TrialLicenseStartDateFilter": "Start date", + "TrialLicenseEndDateFilter": "End date", + "FirsName": "First name", + "LastName": "Last name", + "Status": "Status", + "StartDate": "Start date", + "EndDate": "End date", + "CompanyName": "Company name", + "PurchasedDate": "Purchased date", + "OrganizationDetail": "Organization Detail", + "SendActivationMail": "Send Activation Mail", + "ActivationMailSentSuccessfully": "Activation mail sent successfully!", + "TrialLicenseStatus": "Trial license status", + "TrialLicenseDetail": "Trial License Detail", + "AcceptsMarketingCommunications": "Marketing Communications", + "PurposeOfUsage": "Purpose of usage", + "CountryName": "Country name", + "CompanySize": "Company size", + "DetailTrialLicense": "Details", + "Requested": "Requested", + "Activated": "Activated", + "PurchasedToNormalLicense": "Purchased", + "Expired": "Expired", + "TrialLicenseDeletionWarningMessage": "Trial license and if any organization and qa organization will be deleted!", + "IsTrial": "Is trial", + "Volo.AbpIo.Commercial:030000": "You already used your trial period.", + "Volo.AbpIo.Commercial:030001": "This organization name already exists.", + "Volo.AbpIo.Commercial:030002": "Once activated, trial license cannot be set to requested!", + "Volo.AbpIo.Commercial:030003": "There is no such status!", + "Volo.AbpIo.Commercial:030004": "Status could not be changed due to an unexpected error!", + "Volo.AbpIo.Commercial:030005": "Start date and end date cannot be given when the trial license is in the requested state!", + "Volo.AbpIo.Commercial:030006": "End date must always be greater than start date!", + "Volo.AbpIo.Commercial:030007": "This trial license has already been activated once!" } } diff --git a/docs/en/Background-Jobs-Hangfire.md b/docs/en/Background-Jobs-Hangfire.md index a690d9d17b..3bde5ea010 100644 --- a/docs/en/Background-Jobs-Hangfire.md +++ b/docs/en/Background-Jobs-Hangfire.md @@ -88,17 +88,21 @@ To make it secure by default, only local requests are allowed, however you can c You can integrate the Hangfire dashboard to [ABP authorization system](Authorization.md) using the **AbpHangfireAuthorizationFilter** class. This class is defined in the `Volo.Abp.Hangfire` package. The following example, checks if the current user is logged in to the application: - app.UseHangfireDashboard("/hangfire", new DashboardOptions - { - AsyncAuthorization = new[] { new AbpHangfireAuthorizationFilter() } - }); +```csharp +app.UseHangfireDashboard("/hangfire", new DashboardOptions +{ + AsyncAuthorization = new[] { new AbpHangfireAuthorizationFilter() } +}); +``` If you want to require an additional permission, you can pass it into the constructor as below: - app.UseHangfireDashboard("/hangfire", new DashboardOptions - { - AsyncAuthorization = new[] { new AbpHangfireAuthorizationFilter("MyHangFireDashboardPermissionName") } - }); +```csharp +app.UseHangfireDashboard("/hangfire", new DashboardOptions +{ + AsyncAuthorization = new[] { new AbpHangfireAuthorizationFilter("MyHangFireDashboardPermissionName") } +}); +``` -**Important**: `UseHangfireDashboard` should be called after the authentication middleware in your `Startup` class (probably at the last line). Otherwise, +**Important**: `UseHangfireDashboard` should be called after the authentication and authorization middlewares in your `Startup` class (probably at the last line). Otherwise, authorization will always fail! diff --git a/docs/en/Community-Articles/2020-08-07-Passwordless-Authentication/POST.md b/docs/en/Community-Articles/2020-08-07-Passwordless-Authentication/POST.md index 9489c004bd..d14901a2ba 100644 --- a/docs/en/Community-Articles/2020-08-07-Passwordless-Authentication/POST.md +++ b/docs/en/Community-Articles/2020-08-07-Passwordless-Authentication/POST.md @@ -194,16 +194,11 @@ We implemented token generation infrastructure, now it's time validate the token ```csharp using System; -using System.Collections.Generic; -using System.Security.Claims; using System.Threading.Tasks; -using Microsoft.AspNetCore.Authentication; -using Microsoft.AspNetCore.Identity; using Microsoft.AspNetCore.Mvc; using Volo.Abp.AspNetCore.Mvc; using Volo.Abp.Identity; -using Volo.Abp.Security.Claims; -using Volo.Abp.Users; +using Volo.Abp.Identity.AspNetCore; namespace PasswordlessAuthentication.Web.Controllers { @@ -211,9 +206,12 @@ namespace PasswordlessAuthentication.Web.Controllers { protected IdentityUserManager UserManager { get; } - public PasswordlessController(IdentityUserManager userManager) + protected AbpSignInManager SignInManager { get; } + + public PasswordlessController(IdentityUserManager userManager, AbpSignInManager signInManager) { UserManager = userManager; + SignInManager = signInManager; } public virtual async Task Login(string token, string userId) @@ -228,45 +226,15 @@ namespace PasswordlessAuthentication.Web.Controllers await UserManager.UpdateSecurityStampAsync(user); - var roles = await UserManager.GetRolesAsync(user); - - var principal = new ClaimsPrincipal( - new ClaimsIdentity(CreateClaims(user, roles), IdentityConstants.ApplicationScheme) - ); - - await HttpContext.SignInAsync(IdentityConstants.ApplicationScheme, principal); + await SignInManager.SignInAsync(user, isPersistent: false); return Redirect("/"); } - - private static IEnumerable CreateClaims(IUser user, IEnumerable roles) - { - var claims = new List - { - new Claim("sub", user.Id.ToString()), - new Claim(AbpClaimTypes.UserId, user.Id.ToString()), - new Claim(AbpClaimTypes.Email, user.Email), - new Claim(AbpClaimTypes.UserName, user.UserName), - new Claim(AbpClaimTypes.EmailVerified, user.EmailConfirmed.ToString().ToLower()), - }; - - if (!string.IsNullOrWhiteSpace(user.PhoneNumber)) - { - claims.Add(new Claim(AbpClaimTypes.PhoneNumber, user.PhoneNumber)); - } - - foreach (var role in roles) - { - claims.Add(new Claim(AbpClaimTypes.Role, role)); - } - - return claims; - } } } ``` -We created an endpoint for `/Passwordless/Login` that gets the token and the user Id. In this action, we find the user via repository and validate the token via `UserManager.VerifyUserTokenAsync()` method. If it's valid, we create claims of the user then call `HttpContext.SignInAsync` to be able to create an encrypted cookie and add it to the current response. Finally we redirect the page to the root URL. +We created an endpoint for `/Passwordless/Login` that gets the token and the user Id. In this action, we find the user via repository and validate the token via `UserManager.VerifyUserTokenAsync()` method. If it's valid, we call `SignInManager.SignInAsync` to be able to create an encrypted cookie and add it to the current response. Finally we redirect the page to the root URL. That's all! We created a passwordless login with 7 steps. diff --git a/docs/en/Tutorials/Part-1.md b/docs/en/Tutorials/Part-1.md index d419fc8d27..210ecbe966 100644 --- a/docs/en/Tutorials/Part-1.md +++ b/docs/en/Tutorials/Part-1.md @@ -34,6 +34,11 @@ This tutorial has multiple versions based on your **UI** and **Database** prefer * [Blazor UI with EF Core](https://github.com/abpframework/abp-samples/tree/master/BookStore-Blazor-EfCore) * [Angular UI with MongoDB](https://github.com/abpframework/abp-samples/tree/master/BookStore-Angular-MongoDb) +> If you encounter the "filename too long" or "unzip error" on Windows, it's probably related to the Windows maximum file path limitation. Windows has a maximum file path limitation of 250 characters. To solve this, [enable the long path option in Windows 10](https://docs.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=cmd#enable-long-paths-in-windows-10-version-1607-and-later). + +> If you face long path errors related to Git, try the following command to enable long paths in Windows. See https://github.com/msysgit/msysgit/wiki/Git-cannot-create-a-file-or-directory-with-a-long-path +> `git config --system core.longpaths true` + {{if UI == "MVC" && DB == "EF"}} ### Video Tutorial diff --git a/docs/en/Tutorials/Part-10.md b/docs/en/Tutorials/Part-10.md index 11fdd9b781..5d5ea9618b 100644 --- a/docs/en/Tutorials/Part-10.md +++ b/docs/en/Tutorials/Part-10.md @@ -34,6 +34,11 @@ This tutorial has multiple versions based on your **UI** and **Database** prefer * [Blazor UI with EF Core](https://github.com/abpframework/abp-samples/tree/master/BookStore-Blazor-EfCore) * [Angular UI with MongoDB](https://github.com/abpframework/abp-samples/tree/master/BookStore-Angular-MongoDb) +> If you encounter the "filename too long" or "unzip error" on Windows, it's probably related to the Windows maximum file path limitation. Windows has a maximum file path limitation of 250 characters. To solve this, [enable the long path option in Windows 10](https://docs.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=cmd#enable-long-paths-in-windows-10-version-1607-and-later). + +> If you face long path errors related to Git, try the following command to enable long paths in Windows. See https://github.com/msysgit/msysgit/wiki/Git-cannot-create-a-file-or-directory-with-a-long-path +> `git config --system core.longpaths true` + ## Introduction We have created `Book` and `Author` functionalities for the book store application. However, currently there is no relation between these entities. diff --git a/docs/en/Tutorials/Part-2.md b/docs/en/Tutorials/Part-2.md index 5df5dae343..b84ece9e97 100644 --- a/docs/en/Tutorials/Part-2.md +++ b/docs/en/Tutorials/Part-2.md @@ -34,6 +34,11 @@ This tutorial has multiple versions based on your **UI** and **Database** prefer * [Blazor UI with EF Core](https://github.com/abpframework/abp-samples/tree/master/BookStore-Blazor-EfCore) * [Angular UI with MongoDB](https://github.com/abpframework/abp-samples/tree/master/BookStore-Angular-MongoDb) +> If you encounter the "filename too long" or "unzip error" on Windows, it's probably related to the Windows maximum file path limitation. Windows has a maximum file path limitation of 250 characters. To solve this, [enable the long path option in Windows 10](https://docs.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=cmd#enable-long-paths-in-windows-10-version-1607-and-later). + +> If you face long path errors related to Git, try the following command to enable long paths in Windows. See https://github.com/msysgit/msysgit/wiki/Git-cannot-create-a-file-or-directory-with-a-long-path +> `git config --system core.longpaths true` + {{if UI == "MVC" && DB == "EF"}} ### Video Tutorial @@ -85,6 +90,8 @@ acme.bookStore.books.book.create({ }); ```` +> If you downloaded the source code of the tutorial and following the steps from the sample, you should also pass the `authorId` parameter to the create method for **creating a new book**. + You should see a message in the console something like that: ````text diff --git a/docs/en/Tutorials/Part-3.md b/docs/en/Tutorials/Part-3.md index e724fa2c9f..92e04d0b41 100644 --- a/docs/en/Tutorials/Part-3.md +++ b/docs/en/Tutorials/Part-3.md @@ -34,6 +34,11 @@ This tutorial has multiple versions based on your **UI** and **Database** prefer * [Blazor UI with EF Core](https://github.com/abpframework/abp-samples/tree/master/BookStore-Blazor-EfCore) * [Angular UI with MongoDB](https://github.com/abpframework/abp-samples/tree/master/BookStore-Angular-MongoDb) +> If you encounter the "filename too long" or "unzip error" on Windows, it's probably related to the Windows maximum file path limitation. Windows has a maximum file path limitation of 250 characters. To solve this, [enable the long path option in Windows 10](https://docs.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=cmd#enable-long-paths-in-windows-10-version-1607-and-later). + +> If you face long path errors related to Git, try the following command to enable long paths in Windows. See https://github.com/msysgit/msysgit/wiki/Git-cannot-create-a-file-or-directory-with-a-long-path +> `git config --system core.longpaths true` + {{if UI == "MVC" && DB == "EF"}} ### Video Tutorial diff --git a/docs/en/Tutorials/Part-4.md b/docs/en/Tutorials/Part-4.md index 2202aba704..036d8a18bd 100644 --- a/docs/en/Tutorials/Part-4.md +++ b/docs/en/Tutorials/Part-4.md @@ -34,6 +34,11 @@ This tutorial has multiple versions based on your **UI** and **Database** prefer * [Blazor UI with EF Core](https://github.com/abpframework/abp-samples/tree/master/BookStore-Blazor-EfCore) * [Angular UI with MongoDB](https://github.com/abpframework/abp-samples/tree/master/BookStore-Angular-MongoDb) +> If you encounter the "filename too long" or "unzip error" on Windows, it's probably related to the Windows maximum file path limitation. Windows has a maximum file path limitation of 250 characters. To solve this, [enable the long path option in Windows 10](https://docs.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=cmd#enable-long-paths-in-windows-10-version-1607-and-later). + +> If you face long path errors related to Git, try the following command to enable long paths in Windows. See https://github.com/msysgit/msysgit/wiki/Git-cannot-create-a-file-or-directory-with-a-long-path +> `git config --system core.longpaths true` + {{if UI == "MVC" && DB == "EF"}} ### Video Tutorial diff --git a/docs/en/Tutorials/Part-5.md b/docs/en/Tutorials/Part-5.md index e8274116f4..4a4611809a 100644 --- a/docs/en/Tutorials/Part-5.md +++ b/docs/en/Tutorials/Part-5.md @@ -34,6 +34,11 @@ This tutorial has multiple versions based on your **UI** and **Database** prefer * [Blazor UI with EF Core](https://github.com/abpframework/abp-samples/tree/master/BookStore-Blazor-EfCore) * [Angular UI with MongoDB](https://github.com/abpframework/abp-samples/tree/master/BookStore-Angular-MongoDb) +> If you encounter the "filename too long" or "unzip error" on Windows, it's probably related to the Windows maximum file path limitation. Windows has a maximum file path limitation of 250 characters. To solve this, [enable the long path option in Windows 10](https://docs.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=cmd#enable-long-paths-in-windows-10-version-1607-and-later). + +> If you face long path errors related to Git, try the following command to enable long paths in Windows. See https://github.com/msysgit/msysgit/wiki/Git-cannot-create-a-file-or-directory-with-a-long-path +> `git config --system core.longpaths true` + {{if UI == "MVC" && DB == "EF"}} ### Video Tutorial @@ -627,4 +632,4 @@ private async Task ConfigureMainMenuAsync(MenuConfigurationContext context) ## The Next Part -See the [next part](Part-6.md) of this tutorial. \ No newline at end of file +See the [next part](Part-6.md) of this tutorial. diff --git a/docs/en/Tutorials/Part-6.md b/docs/en/Tutorials/Part-6.md index f6601a9afd..7d7c4e2d94 100644 --- a/docs/en/Tutorials/Part-6.md +++ b/docs/en/Tutorials/Part-6.md @@ -34,6 +34,11 @@ This tutorial has multiple versions based on your **UI** and **Database** prefer * [Blazor UI with EF Core](https://github.com/abpframework/abp-samples/tree/master/BookStore-Blazor-EfCore) * [Angular UI with MongoDB](https://github.com/abpframework/abp-samples/tree/master/BookStore-Angular-MongoDb) +> If you encounter the "filename too long" or "unzip error" on Windows, it's probably related to the Windows maximum file path limitation. Windows has a maximum file path limitation of 250 characters. To solve this, [enable the long path option in Windows 10](https://docs.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=cmd#enable-long-paths-in-windows-10-version-1607-and-later). + +> If you face long path errors related to Git, try the following command to enable long paths in Windows. See https://github.com/msysgit/msysgit/wiki/Git-cannot-create-a-file-or-directory-with-a-long-path +> `git config --system core.longpaths true` + ## Introduction In the previous parts, we've used the ABP infrastructure to easily build some services; @@ -270,4 +275,4 @@ This part covered the domain layer of the authors functionality of the book stor ## The Next Part -See the [next part](Part-7.md) of this tutorial. \ No newline at end of file +See the [next part](Part-7.md) of this tutorial. diff --git a/docs/en/Tutorials/Part-7.md b/docs/en/Tutorials/Part-7.md index 45820cde09..3284ae98d4 100644 --- a/docs/en/Tutorials/Part-7.md +++ b/docs/en/Tutorials/Part-7.md @@ -34,6 +34,11 @@ This tutorial has multiple versions based on your **UI** and **Database** prefer * [Blazor UI with EF Core](https://github.com/abpframework/abp-samples/tree/master/BookStore-Blazor-EfCore) * [Angular UI with MongoDB](https://github.com/abpframework/abp-samples/tree/master/BookStore-Angular-MongoDb) +> If you encounter the "filename too long" or "unzip error" on Windows, it's probably related to the Windows maximum file path limitation. Windows has a maximum file path limitation of 250 characters. To solve this, [enable the long path option in Windows 10](https://docs.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=cmd#enable-long-paths-in-windows-10-version-1607-and-later). + +> If you face long path errors related to Git, try the following command to enable long paths in Windows. See https://github.com/msysgit/msysgit/wiki/Git-cannot-create-a-file-or-directory-with-a-long-path +> `git config --system core.longpaths true` + ## Introduction This part explains how to configure the database integration for the `Author` entity introduced in the previous part. diff --git a/docs/en/Tutorials/Part-8.md b/docs/en/Tutorials/Part-8.md index fe8cbd2732..d8dd4bc5b1 100644 --- a/docs/en/Tutorials/Part-8.md +++ b/docs/en/Tutorials/Part-8.md @@ -34,6 +34,11 @@ This tutorial has multiple versions based on your **UI** and **Database** prefer * [Blazor UI with EF Core](https://github.com/abpframework/abp-samples/tree/master/BookStore-Blazor-EfCore) * [Angular UI with MongoDB](https://github.com/abpframework/abp-samples/tree/master/BookStore-Angular-MongoDb) +> If you encounter the "filename too long" or "unzip error" on Windows, it's probably related to the Windows maximum file path limitation. Windows has a maximum file path limitation of 250 characters. To solve this, [enable the long path option in Windows 10](https://docs.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=cmd#enable-long-paths-in-windows-10-version-1607-and-later). + +> If you face long path errors related to Git, try the following command to enable long paths in Windows. See https://github.com/msysgit/msysgit/wiki/Git-cannot-create-a-file-or-directory-with-a-long-path +> `git config --system core.longpaths true` + ## Introduction This part explains to create an application layer for the `Author` entity created before. diff --git a/docs/en/Tutorials/Part-9.md b/docs/en/Tutorials/Part-9.md index e2df7c262e..d6fa004596 100644 --- a/docs/en/Tutorials/Part-9.md +++ b/docs/en/Tutorials/Part-9.md @@ -34,6 +34,11 @@ This tutorial has multiple versions based on your **UI** and **Database** prefer * [Blazor UI with EF Core](https://github.com/abpframework/abp-samples/tree/master/BookStore-Blazor-EfCore) * [Angular UI with MongoDB](https://github.com/abpframework/abp-samples/tree/master/BookStore-Angular-MongoDb) +> If you encounter the "filename too long" or "unzip error" on Windows, it's probably related to the Windows maximum file path limitation. Windows has a maximum file path limitation of 250 characters. To solve this, [enable the long path option in Windows 10](https://docs.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=cmd#enable-long-paths-in-windows-10-version-1607-and-later). + +> If you face long path errors related to Git, try the following command to enable long paths in Windows. See https://github.com/msysgit/msysgit/wiki/Git-cannot-create-a-file-or-directory-with-a-long-path +> `git config --system core.longpaths true` + ## Introduction This part explains how to create a CRUD page for the `Author` entity introduced in the previous parts. diff --git a/docs/zh-Hans/Text-Templating.md b/docs/zh-Hans/Text-Templating.md index be9cbb3a79..d61c85bc9b 100644 --- a/docs/zh-Hans/Text-Templating.md +++ b/docs/zh-Hans/Text-Templating.md @@ -187,9 +187,9 @@ var result = await _templateRenderer.RenderAsync( 示例中我们并没有创建模型类,但是创建了一个匿名对象模型. -### 大驼峰 与 小驼峰 +### PascalCase 与 snake_case -PascalCase 属性名(如 `UserName`) 在模板中用做小驼峰(如 `userName`). +PascalCase 属性名(如 `UserName`) 在模板中使用蛇形命名(如 `user_name`). ## 本地化 @@ -454,4 +454,4 @@ public class MyTemplateContentProvider * 本文开发和引用的[应用程序示例源码](https://github.com/abpframework/abp-samples/tree/master/TextTemplateDemo). * [本地化系统](Localization.md). -* [虚拟文件系统](Virtual-File-System.md). \ No newline at end of file +* [虚拟文件系统](Virtual-File-System.md). diff --git a/framework/Volo.Abp.sln b/framework/Volo.Abp.sln index e47fccb8f2..42df38e020 100644 --- a/framework/Volo.Abp.sln +++ b/framework/Volo.Abp.sln @@ -383,10 +383,14 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.TextTemplating.Scr EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.MongoDB.Tests.SecondContext", "test\Volo.Abp.MongoDB.Tests.SecondContext\Volo.Abp.MongoDB.Tests.SecondContext.csproj", "{90B1866A-EF99-40B9-970E-B898E5AA523F}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.IdentityModel.Tests", "test\Volo.Abp.IdentityModel.Tests\Volo.Abp.IdentityModel.Tests.csproj", "{40C6740E-BFCA-4D37-8344-3D84E2044BB2}" +EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.Threading.Tests", "test\Volo.Abp.Threading.Tests\Volo.Abp.Threading.Tests.csproj", "{7B2FCAD6-86E6-49C8-ADBE-A61B4F4B101B}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.Auditing.Contracts", "src\Volo.Abp.Auditing.Contracts\Volo.Abp.Auditing.Contracts.csproj", "{508B6355-AD28-4E60-8549-266D21DBF2CF}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.Http.Client.Web", "src\Volo.Abp.Http.Client.Web\Volo.Abp.Http.Client.Web.csproj", "{F7407459-8AFA-45E4-83E9-9BB01412CC08}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -1145,6 +1149,10 @@ Global {90B1866A-EF99-40B9-970E-B898E5AA523F}.Debug|Any CPU.Build.0 = Debug|Any CPU {90B1866A-EF99-40B9-970E-B898E5AA523F}.Release|Any CPU.ActiveCfg = Release|Any CPU {90B1866A-EF99-40B9-970E-B898E5AA523F}.Release|Any CPU.Build.0 = Release|Any CPU + {40C6740E-BFCA-4D37-8344-3D84E2044BB2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {40C6740E-BFCA-4D37-8344-3D84E2044BB2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {40C6740E-BFCA-4D37-8344-3D84E2044BB2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {40C6740E-BFCA-4D37-8344-3D84E2044BB2}.Release|Any CPU.Build.0 = Release|Any CPU {7B2FCAD6-86E6-49C8-ADBE-A61B4F4B101B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {7B2FCAD6-86E6-49C8-ADBE-A61B4F4B101B}.Debug|Any CPU.Build.0 = Debug|Any CPU {7B2FCAD6-86E6-49C8-ADBE-A61B4F4B101B}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -1153,6 +1161,10 @@ Global {508B6355-AD28-4E60-8549-266D21DBF2CF}.Debug|Any CPU.Build.0 = Debug|Any CPU {508B6355-AD28-4E60-8549-266D21DBF2CF}.Release|Any CPU.ActiveCfg = Release|Any CPU {508B6355-AD28-4E60-8549-266D21DBF2CF}.Release|Any CPU.Build.0 = Release|Any CPU + {F7407459-8AFA-45E4-83E9-9BB01412CC08}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F7407459-8AFA-45E4-83E9-9BB01412CC08}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F7407459-8AFA-45E4-83E9-9BB01412CC08}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F7407459-8AFA-45E4-83E9-9BB01412CC08}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -1346,8 +1358,10 @@ Global {C996F458-98FB-483D-9306-4701290E2FC1} = {447C8A77-E5F0-4538-8687-7383196D04EA} {75D8DADB-3FA9-4C1D-B23A-DBFD08133B7C} = {447C8A77-E5F0-4538-8687-7383196D04EA} {90B1866A-EF99-40B9-970E-B898E5AA523F} = {447C8A77-E5F0-4538-8687-7383196D04EA} + {40C6740E-BFCA-4D37-8344-3D84E2044BB2} = {447C8A77-E5F0-4538-8687-7383196D04EA} {7B2FCAD6-86E6-49C8-ADBE-A61B4F4B101B} = {447C8A77-E5F0-4538-8687-7383196D04EA} {508B6355-AD28-4E60-8549-266D21DBF2CF} = {5DF0E140-0513-4D0D-BE2E-3D4D85CD70E6} + {F7407459-8AFA-45E4-83E9-9BB01412CC08} = {5DF0E140-0513-4D0D-BE2E-3D4D85CD70E6} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {BB97ECF4-9A84-433F-A80B-2A3285BDD1D5} diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Json/AbpJsonOptionsSetup.cs b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Json/AbpJsonOptionsSetup.cs index 101b369a36..43a9c04d32 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Json/AbpJsonOptionsSetup.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Json/AbpJsonOptionsSetup.cs @@ -30,10 +30,6 @@ namespace Volo.Abp.AspNetCore.Mvc.Json options.JsonSerializerOptions.Converters.Add(new ObjectToInferredTypesConverter()); options.JsonSerializerOptions.Converters.Add(new AbpHasExtraPropertiesJsonConverterFactory()); - - // Remove after this PR. - // https://github.com/dotnet/runtime/pull/57525 - options.JsonSerializerOptions.NumberHandling = JsonNumberHandling.AllowReadingFromString; } } } diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Response/AbpNoContentActionFilter.cs b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Response/AbpNoContentActionFilter.cs index 2b38c4d484..4e4116b7fd 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Response/AbpNoContentActionFilter.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Response/AbpNoContentActionFilter.cs @@ -18,8 +18,9 @@ namespace Volo.Abp.AspNetCore.Mvc.Response await next(); - if (context.HttpContext.Response.StatusCode == (int)HttpStatusCode.OK - && context.Result == null) + if (!context.HttpContext.Response.HasStarted && + context.HttpContext.Response.StatusCode == (int)HttpStatusCode.OK && + context.Result == null) { var returnType = context.ActionDescriptor.GetReturnType(); if (returnType == typeof(Task) || returnType == typeof(void)) @@ -29,4 +30,4 @@ namespace Volo.Abp.AspNetCore.Mvc.Response } } } -} \ No newline at end of file +} diff --git a/framework/src/Volo.Abp.Authorization.Abstractions/Volo/Abp/Authorization/PermissionsRequirement.cs b/framework/src/Volo.Abp.Authorization.Abstractions/Volo/Abp/Authorization/PermissionsRequirement.cs new file mode 100644 index 0000000000..0f1540378e --- /dev/null +++ b/framework/src/Volo.Abp.Authorization.Abstractions/Volo/Abp/Authorization/PermissionsRequirement.cs @@ -0,0 +1,25 @@ +using JetBrains.Annotations; +using Microsoft.AspNetCore.Authorization; + +namespace Volo.Abp.Authorization +{ + public class PermissionsRequirement : IAuthorizationRequirement + { + public string[] PermissionNames { get; } + + public bool RequiresAll { get; } + + public PermissionsRequirement([NotNull]string[] permissionNames, bool requiresAll) + { + Check.NotNull(permissionNames, nameof(permissionNames)); + + PermissionNames = permissionNames; + RequiresAll = requiresAll; + } + + public override string ToString() + { + return $"PermissionsRequirement: {string.Join(", ", PermissionNames)}"; + } + } +} diff --git a/framework/src/Volo.Abp.Authorization.Abstractions/Volo/Abp/Authorization/PermissionsRequirementHandler.cs b/framework/src/Volo.Abp.Authorization.Abstractions/Volo/Abp/Authorization/PermissionsRequirementHandler.cs new file mode 100644 index 0000000000..d3b2678da3 --- /dev/null +++ b/framework/src/Volo.Abp.Authorization.Abstractions/Volo/Abp/Authorization/PermissionsRequirementHandler.cs @@ -0,0 +1,31 @@ +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Authorization; +using Volo.Abp.Authorization.Permissions; + +namespace Volo.Abp.Authorization +{ + public class PermissionsRequirementHandler : AuthorizationHandler + { + private readonly IPermissionChecker _permissionChecker; + + public PermissionsRequirementHandler(IPermissionChecker permissionChecker) + { + _permissionChecker = permissionChecker; + } + + protected override async Task HandleRequirementAsync( + AuthorizationHandlerContext context, + PermissionsRequirement requirement) + { + var multiplePermissionGrantResult = await _permissionChecker.IsGrantedAsync(context.User, requirement.PermissionNames); + + if (requirement.RequiresAll ? + multiplePermissionGrantResult.AllGranted : + multiplePermissionGrantResult.Result.Any(x => x.Value == PermissionGrantResult.Granted)) + { + context.Succeed(requirement); + } + } + } +} diff --git a/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/AbpAuthorizationModule.cs b/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/AbpAuthorizationModule.cs index a821401c4b..e9f6ea6d20 100644 --- a/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/AbpAuthorizationModule.cs +++ b/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/AbpAuthorizationModule.cs @@ -31,6 +31,7 @@ namespace Volo.Abp.Authorization context.Services.AddAuthorizationCore(); context.Services.AddSingleton(); + context.Services.AddSingleton(); context.Services.TryAddTransient(); diff --git a/framework/src/Volo.Abp.BackgroundJobs.RabbitMQ/Volo/Abp/BackgroundJobs/RabbitMQ/AbpRabbitMqBackgroundJobOptions.cs b/framework/src/Volo.Abp.BackgroundJobs.RabbitMQ/Volo/Abp/BackgroundJobs/RabbitMQ/AbpRabbitMqBackgroundJobOptions.cs index 8d588debe9..82c505f050 100644 --- a/framework/src/Volo.Abp.BackgroundJobs.RabbitMQ/Volo/Abp/BackgroundJobs/RabbitMQ/AbpRabbitMqBackgroundJobOptions.cs +++ b/framework/src/Volo.Abp.BackgroundJobs.RabbitMQ/Volo/Abp/BackgroundJobs/RabbitMQ/AbpRabbitMqBackgroundJobOptions.cs @@ -15,10 +15,16 @@ namespace Volo.Abp.BackgroundJobs.RabbitMQ /// public string DefaultQueueNamePrefix { get; set; } + /// + /// Default value: "AbpBackgroundJobsDelayed." + /// + public string DefaultDelayedQueueNamePrefix { get; set;} + public AbpRabbitMqBackgroundJobOptions() { JobQueues = new Dictionary(); DefaultQueueNamePrefix = "AbpBackgroundJobs."; + DefaultDelayedQueueNamePrefix = "AbpBackgroundJobsDelayed."; } } } diff --git a/framework/src/Volo.Abp.BackgroundJobs.RabbitMQ/Volo/Abp/BackgroundJobs/RabbitMQ/JobQueue.cs b/framework/src/Volo.Abp.BackgroundJobs.RabbitMQ/Volo/Abp/BackgroundJobs/RabbitMQ/JobQueue.cs index 3d7e8c05ff..1d16e12683 100644 --- a/framework/src/Volo.Abp.BackgroundJobs.RabbitMQ/Volo/Abp/BackgroundJobs/RabbitMQ/JobQueue.cs +++ b/framework/src/Volo.Abp.BackgroundJobs.RabbitMQ/Volo/Abp/BackgroundJobs/RabbitMQ/JobQueue.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Globalization; using System.Threading; using System.Threading.Tasks; using Microsoft.Extensions.DependencyInjection; @@ -64,7 +65,8 @@ namespace Volo.Abp.BackgroundJobs.RabbitMQ return AbpRabbitMqBackgroundJobOptions.JobQueues.GetOrDefault(typeof(TArgs)) ?? new JobQueueConfiguration( typeof(TArgs), - AbpRabbitMqBackgroundJobOptions.DefaultQueueNamePrefix + JobConfiguration.JobName + AbpRabbitMqBackgroundJobOptions.DefaultQueueNamePrefix + JobConfiguration.JobName, + AbpRabbitMqBackgroundJobOptions.DefaultDelayedQueueNamePrefix + JobConfiguration.JobName ); } @@ -133,6 +135,9 @@ namespace Volo.Abp.BackgroundJobs.RabbitMQ var result = QueueConfiguration.Declare(ChannelAccessor.Channel); Logger.LogDebug($"RabbitMQ Queue '{QueueConfiguration.QueueName}' has {result.MessageCount} messages and {result.ConsumerCount} consumers."); + // Declare delayed queue + QueueConfiguration.DeclareDelayed(ChannelAccessor.Channel); + if (AbpBackgroundJobOptions.IsJobExecutionEnabled) { Consumer = new AsyncEventingBasicConsumer(ChannelAccessor.Channel); @@ -154,12 +159,21 @@ namespace Volo.Abp.BackgroundJobs.RabbitMQ BackgroundJobPriority priority = BackgroundJobPriority.Normal, TimeSpan? delay = null) { - //TODO: How to handle priority & delay? + //TODO: How to handle priority + + var routingKey = QueueConfiguration.QueueName; + var basicProperties = CreateBasicPropertiesToPublish(); + + if (delay.HasValue) + { + routingKey = QueueConfiguration.DelayedQueueName; + basicProperties.Expiration = delay.Value.TotalMilliseconds.ToString(); + } ChannelAccessor.Channel.BasicPublish( exchange: "", - routingKey: QueueConfiguration.QueueName, - basicProperties: CreateBasicPropertiesToPublish(), + routingKey: routingKey, + basicProperties: basicProperties, body: Serializer.Serialize(args) ); diff --git a/framework/src/Volo.Abp.BackgroundJobs.RabbitMQ/Volo/Abp/BackgroundJobs/RabbitMQ/JobQueueConfiguration.cs b/framework/src/Volo.Abp.BackgroundJobs.RabbitMQ/Volo/Abp/BackgroundJobs/RabbitMQ/JobQueueConfiguration.cs index 959952de22..453c3f9257 100644 --- a/framework/src/Volo.Abp.BackgroundJobs.RabbitMQ/Volo/Abp/BackgroundJobs/RabbitMQ/JobQueueConfiguration.cs +++ b/framework/src/Volo.Abp.BackgroundJobs.RabbitMQ/Volo/Abp/BackgroundJobs/RabbitMQ/JobQueueConfiguration.cs @@ -1,4 +1,6 @@ using System; +using System.Collections.Generic; +using RabbitMQ.Client; using Volo.Abp.RabbitMQ; namespace Volo.Abp.BackgroundJobs.RabbitMQ @@ -9,21 +11,42 @@ namespace Volo.Abp.BackgroundJobs.RabbitMQ public string ConnectionName { get; set; } + public string DelayedQueueName { get; set; } + public JobQueueConfiguration( - Type jobArgsType, - string queueName, + Type jobArgsType, + string queueName, + string delayedQueueName, string connectionName = null, bool durable = true, bool exclusive = false, bool autoDelete = false) : base( - queueName, - durable, - exclusive, + queueName, + durable, + exclusive, autoDelete) { JobArgsType = jobArgsType; ConnectionName = connectionName; + DelayedQueueName = delayedQueueName; + } + + public virtual QueueDeclareOk DeclareDelayed(IModel channel) + { + var delayedArguments = new Dictionary(Arguments) + { + ["x-dead-letter-routing-key"] = QueueName, + ["x-dead-letter-exchange"] = string.Empty + }; + + return channel.QueueDeclare( + queue: DelayedQueueName, + durable: Durable, + exclusive: Exclusive, + autoDelete: AutoDelete, + arguments: delayedArguments + ); } } -} \ No newline at end of file +} diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/AddModuleCommand.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/AddModuleCommand.cs index c1abef5894..99ddba2de8 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/AddModuleCommand.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/AddModuleCommand.cs @@ -14,11 +14,25 @@ namespace Volo.Abp.Cli.Commands { public class AddModuleCommand : IConsoleCommand, ITransientDependency { + private AddModuleInfoOutput _lastAddedModuleInfo; public ILogger Logger { get; set; } protected SolutionModuleAdder SolutionModuleAdder { get; } public SolutionAbpVersionFinder SolutionAbpVersionFinder { get; } + public AddModuleInfoOutput LastAddedModuleInfo + { + get + { + if (_lastAddedModuleInfo == null) + { + throw new Exception("You need to add a module first to get the last added module info!"); + } + + return _lastAddedModuleInfo; + } + } + public AddModuleCommand(SolutionModuleAdder solutionModuleAdder, SolutionAbpVersionFinder solutionAbpVersionFinder) { SolutionModuleAdder = solutionModuleAdder; @@ -51,16 +65,24 @@ namespace Volo.Abp.Cli.Commands version = SolutionAbpVersionFinder.Find(solutionFile); } - await SolutionModuleAdder.AddAsync( - solutionFile, - commandLineArgs.Target, - version, - skipDbMigrations, - withSourceCode, - addSourceCodeToSolutionFile, - newTemplate, - newProTemplate - ); + var moduleInfo = await SolutionModuleAdder.AddAsync( + solutionFile, + commandLineArgs.Target, + version, + skipDbMigrations, + withSourceCode, + addSourceCodeToSolutionFile, + newTemplate, + newProTemplate + ); + + _lastAddedModuleInfo = new AddModuleInfoOutput + { + DisplayName = moduleInfo.DisplayName, + Name = moduleInfo.Name, + DocumentationLinks = moduleInfo.DocumentationLinks, + InstallationCompleteMessage = moduleInfo.InstallationCompleteMessage + }; } public string GetUsageInfo() diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Building/Steps/SolutionRenameStep.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Building/Steps/SolutionRenameStep.cs index 7081a93b0e..dc5e428cd7 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Building/Steps/SolutionRenameStep.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Building/Steps/SolutionRenameStep.cs @@ -19,6 +19,14 @@ namespace Volo.Abp.Cli.ProjectBuilding.Building.Steps context.BuildArgs.SolutionName.ProjectName ).Run(); + new SolutionRenamer( + context.Files, + "myCompanyName.myProjectName", + "MicroserviceName", + context.BuildArgs.SolutionName.CompanyName, + context.BuildArgs.SolutionName.ProjectName + ).Run(); + new SolutionRenamer( context.Files, null, diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/AddModuleInfoOutput.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/AddModuleInfoOutput.cs new file mode 100644 index 0000000000..870d296012 --- /dev/null +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/AddModuleInfoOutput.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Volo.Abp.Cli.ProjectModification +{ + public class AddModuleInfoOutput + { + public string Name { get; set; } + + public string DisplayName { get; set; } + + public string DocumentationLinks { get; set; } + + public string InstallationCompleteMessage { get; set; } + } +} diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/ModuleInfo.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/ModuleInfo.cs index 3f1e658525..338fb0729a 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/ModuleInfo.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/ModuleInfo.cs @@ -18,6 +18,8 @@ namespace Volo.Abp.Cli.ProjectModification public List NpmPackages { get; set; } + public string InstallationCompleteMessage { get; set; } + public string GetFirstDocumentationLinkOrNull() { if (string.IsNullOrWhiteSpace(DocumentationLinks)) @@ -26,8 +28,8 @@ namespace Volo.Abp.Cli.ProjectModification } var docs = DocumentationLinks.Split(" ", StringSplitOptions.RemoveEmptyEntries); - return docs.Any() ? - docs.First() : + return docs.Any() ? + docs.First() : null; } } diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/SolutionModuleAdder.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/SolutionModuleAdder.cs index a0b25a3087..70900bfec7 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/SolutionModuleAdder.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/SolutionModuleAdder.cs @@ -78,8 +78,7 @@ namespace Volo.Abp.Cli.ProjectModification Logger = NullLogger.Instance; } - public virtual async Task AddAsync( - [NotNull] string solutionFile, + public virtual async Task AddAsync([NotNull] string solutionFile, [NotNull] string moduleName, string version, bool skipDbMigrations = false, @@ -94,8 +93,7 @@ namespace Volo.Abp.Cli.ProjectModification var module = await GetModuleInfoAsync(moduleName, newTemplate, newProTemplate); module = RemoveIncompatiblePackages(module, version); - Logger.LogInformation( - $"Installing module '{module.Name}' to the solution '{Path.GetFileNameWithoutExtension(solutionFile)}'"); + Logger.LogInformation($"Installing module '{module.Name}' to the solution '{Path.GetFileNameWithoutExtension(solutionFile)}'"); var projectFiles = ProjectFinder.GetProjectFiles(solutionFile); @@ -137,6 +135,8 @@ namespace Volo.Abp.Cli.ProjectModification { CmdHelper.OpenWebPage(documentationLink); } + + return module; } private ModuleWithMastersInfo RemoveIncompatiblePackages(ModuleWithMastersInfo module, string version) @@ -146,7 +146,7 @@ namespace Volo.Abp.Cli.ProjectModification return module; } - private bool IsPackageInCompatible(string minVersion, string maxVersion, string version) + private static bool IsPackageInCompatible(string minVersion, string maxVersion, string version) { try { diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ServiceProxying/CSharp/CSharpServiceProxyGenerator.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ServiceProxying/CSharp/CSharpServiceProxyGenerator.cs index 5b7b2e4dc3..a34ec68387 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ServiceProxying/CSharp/CSharpServiceProxyGenerator.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ServiceProxying/CSharp/CSharpServiceProxyGenerator.cs @@ -206,7 +206,7 @@ namespace Volo.Abp.Cli.ServiceProxying.CSharp { var methodBuilder = new StringBuilder(); - var returnTypeName = GetRealTypeName(usingNamespaceList, action.ReturnValue.Type); + var returnTypeName = GetRealTypeName(action.ReturnValue.Type, usingNamespaceList); if(!action.Name.EndsWith("Async")) { @@ -225,7 +225,7 @@ namespace Volo.Abp.Cli.ServiceProxying.CSharp foreach (var parameter in action.Parameters.GroupBy(x => x.Name).Select( x=> x.First())) { - methodBuilder.Replace("", $"{GetRealTypeName(usingNamespaceList, parameter.Type)} {parameter.Name}, "); + methodBuilder.Replace("", $"{GetRealTypeName(parameter.Type, usingNamespaceList)} {parameter.Name}, "); } methodBuilder.Replace("", string.Empty); @@ -249,7 +249,7 @@ namespace Volo.Abp.Cli.ServiceProxying.CSharp foreach (var parameter in action.ParametersOnMethod) { - methodBuilder.Replace("", $"{GetRealTypeName(usingNamespaceList, parameter.Type)} {parameter.Name}, "); + methodBuilder.Replace("", $"{GetRealTypeName(parameter.Type, usingNamespaceList)} {parameter.Name}, "); } methodBuilder.Replace("", string.Empty); @@ -257,21 +257,27 @@ namespace Volo.Abp.Cli.ServiceProxying.CSharp methodBuilder.AppendLine(" {"); + var argsTemplate = "new ClientProxyRequestTypeValue" + + $"{Environment.NewLine} {{" + + $"{Environment.NewLine} }}"; + + var args = action.ParametersOnMethod.Any() ? argsTemplate : string.Empty; + if (returnTypeName == "void") { - methodBuilder.AppendLine($" await RequestAsync(nameof({action.Name}), );"); + methodBuilder.AppendLine($" await RequestAsync(nameof({action.Name}), {args});"); } else { - methodBuilder.AppendLine($" return await RequestAsync<{returnTypeName}>(nameof({action.Name}), );"); + methodBuilder.AppendLine($" return await RequestAsync<{returnTypeName}>(nameof({action.Name}), {args});"); } foreach (var parameter in action.ParametersOnMethod) { - methodBuilder.Replace("", $"{parameter.Name}, "); + methodBuilder.Replace("", $"{Environment.NewLine} {{ typeof({GetRealTypeName(parameter.Type)}), {parameter.Name} }},"); } - methodBuilder.Replace("", string.Empty); + methodBuilder.Replace(",", string.Empty); methodBuilder.Replace(", )", ")"); methodBuilder.AppendLine(" }"); } @@ -297,7 +303,7 @@ namespace Volo.Abp.Cli.ServiceProxying.CSharp return typeFullName.Substring(0, typeFullName.LastIndexOf('.')); } - private string GetRealTypeName(List usingNamespaceList, string typeName) + private string GetRealTypeName(string typeName, List usingNamespaceList = null) { var filter = new []{"<", ",", ">"}; var stringBuilder = new StringBuilder(); @@ -305,7 +311,11 @@ namespace Volo.Abp.Cli.ServiceProxying.CSharp if (typeNames.All(x => !filter.Any(x.Contains))) { - AddUsingNamespace(usingNamespaceList, typeName); + if (usingNamespaceList != null) + { + AddUsingNamespace(usingNamespaceList, typeName); + } + return NormalizeTypeName(typeNames.Last()); } @@ -315,7 +325,11 @@ namespace Volo.Abp.Cli.ServiceProxying.CSharp { if (filter.Any(x => item.Contains(x))) { - AddUsingNamespace(usingNamespaceList, $"{fullName}.{item}".TrimStart('.')); + if (usingNamespaceList != null) + { + AddUsingNamespace(usingNamespaceList, $"{fullName}.{item}".TrimStart('.')); + } + fullName = string.Empty; if (item.Contains('<') || item.Contains(',')) diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Utils/ProjectNameValidator.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Utils/ProjectNameValidator.cs index 7864b387d0..98de427ee2 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Utils/ProjectNameValidator.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Utils/ProjectNameValidator.cs @@ -53,7 +53,7 @@ namespace Volo.Abp.Cli.Utils { foreach (var illegalKeyword in IllegalKeywords) { - if (projectName.Contains(illegalKeyword)) + if (projectName.Split(".").Contains(illegalKeyword)) { throw new CliUsageException("Project name cannot contain the word \"" + illegalKeyword + "\". Specify a different name."); } diff --git a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/RepositoryExtensions.cs b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/RepositoryExtensions.cs index 168fe2b0c0..7a4a21f84f 100644 --- a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/RepositoryExtensions.cs +++ b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/RepositoryExtensions.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Linq; using System.Linq.Expressions; +using System.Runtime.CompilerServices; using System.Threading; using System.Threading.Tasks; using Microsoft.Extensions.DependencyInjection; @@ -54,16 +55,7 @@ namespace Volo.Abp.Domain.Repositories ) where TEntity : class, IEntity, ISoftDelete { - if (!(ProxyHelper.UnProxy(repository) is IUnitOfWorkManagerAccessor unitOfWorkManagerAccessor)) - { - throw new AbpException($"The given repository (of type {repository.GetType().AssemblyQualifiedName}) should implement the {typeof(IUnitOfWorkManagerAccessor).AssemblyQualifiedName} interface in order to invoke the {nameof(HardDeleteAsync)} method!"); - } - - var uowManager = unitOfWorkManagerAccessor.UnitOfWorkManager; - if (uowManager == null) - { - throw new AbpException($"{nameof(unitOfWorkManagerAccessor.UnitOfWorkManager)} property of the given {nameof(repository)} object is null!"); - } + var uowManager = repository.GetUnitOfWorkManager(); if (uowManager.Current == null) { @@ -79,29 +71,27 @@ namespace Volo.Abp.Domain.Repositories } } - private static async Task HardDeleteWithUnitOfWorkAsync( - IRepository repository, - Expression> predicate, - bool autoSave, - CancellationToken cancellationToken, IUnitOfWork currentUow + public static async Task HardDeleteAsync( + this IBasicRepository repository, + IEnumerable entities, + bool autoSave = false, + CancellationToken cancellationToken = default ) where TEntity : class, IEntity, ISoftDelete { - var hardDeleteEntities = (HashSet) currentUow.Items.GetOrAdd( - UnitOfWorkItemNames.HardDeletedEntities, - () => new HashSet() - ); + var uowManager = repository.GetUnitOfWorkManager(); - List entities; - using (currentUow.ServiceProvider.GetRequiredService>().Disable()) + if (uowManager.Current == null) { - entities = await repository.AsyncExecuter.ToListAsync((await repository.GetQueryableAsync()).Where(predicate), cancellationToken); + using (var uow = uowManager.Begin()) + { + await HardDeleteWithUnitOfWorkAsync(repository, entities, autoSave, cancellationToken, uowManager.Current); + await uow.CompleteAsync(cancellationToken); + } } - - foreach (var entity in entities) + else { - hardDeleteEntities.Add(entity); - await repository.DeleteAsync(entity, autoSave, cancellationToken); + await HardDeleteWithUnitOfWorkAsync(repository, entities, autoSave, cancellationToken, uowManager.Current); } } @@ -113,16 +103,7 @@ namespace Volo.Abp.Domain.Repositories ) where TEntity : class, IEntity, ISoftDelete { - if (!(ProxyHelper.UnProxy(repository) is IUnitOfWorkManagerAccessor unitOfWorkManagerAccessor)) - { - throw new AbpException($"The given repository (of type {repository.GetType().AssemblyQualifiedName}) should implement the {typeof(IUnitOfWorkManagerAccessor).AssemblyQualifiedName} interface in order to invoke the {nameof(HardDeleteAsync)} method!"); - } - - var uowManager = unitOfWorkManagerAccessor.UnitOfWorkManager; - if (uowManager == null) - { - throw new AbpException($"{nameof(unitOfWorkManagerAccessor.UnitOfWorkManager)} property of the given {nameof(repository)} object is null!"); - } + var uowManager = repository.GetUnitOfWorkManager(); if (uowManager.Current == null) { @@ -138,11 +119,66 @@ namespace Volo.Abp.Domain.Repositories } } + private static IUnitOfWorkManager GetUnitOfWorkManager( + this IBasicRepository repository, + [CallerMemberName] string callingMethodName = nameof(GetUnitOfWorkManager) + ) + where TEntity : class, IEntity + { + if (ProxyHelper.UnProxy(repository) is not IUnitOfWorkManagerAccessor unitOfWorkManagerAccessor) + { + throw new AbpException($"The given repository (of type {repository.GetType().AssemblyQualifiedName}) should implement the " + + $"{typeof(IUnitOfWorkManagerAccessor).AssemblyQualifiedName} interface in order to invoke the {callingMethodName} method!"); + } + + if (unitOfWorkManagerAccessor.UnitOfWorkManager == null) + { + throw new AbpException($"{nameof(unitOfWorkManagerAccessor.UnitOfWorkManager)} property of the given {nameof(repository)} object is null!"); + } + + return unitOfWorkManagerAccessor.UnitOfWorkManager; + } + + private static async Task HardDeleteWithUnitOfWorkAsync( + IRepository repository, + Expression> predicate, + bool autoSave, + CancellationToken cancellationToken, + IUnitOfWork currentUow + ) + where TEntity : class, IEntity, ISoftDelete + { + using (currentUow.ServiceProvider.GetRequiredService>().Disable()) + { + var entities = await repository.AsyncExecuter.ToListAsync((await repository.GetQueryableAsync()).Where(predicate), cancellationToken); + await HardDeleteWithUnitOfWorkAsync(repository, entities, autoSave, cancellationToken, currentUow); + } + } + + private static async Task HardDeleteWithUnitOfWorkAsync( + IBasicRepository repository, + IEnumerable entities, + bool autoSave, + CancellationToken cancellationToken, + IUnitOfWork currentUow + ) + where TEntity : class, IEntity, ISoftDelete + { + var hardDeleteEntities = (HashSet)currentUow.Items.GetOrAdd( + UnitOfWorkItemNames.HardDeletedEntities, + () => new HashSet() + ); + + hardDeleteEntities.UnionWith(entities); + await repository.DeleteManyAsync(entities, autoSave, cancellationToken); + } + private static async Task HardDeleteWithUnitOfWorkAsync( IBasicRepository repository, TEntity entity, bool autoSave, - CancellationToken cancellationToken, IUnitOfWork currentUow + CancellationToken cancellationToken, + IUnitOfWork currentUow ) where TEntity : class, IEntity, ISoftDelete { diff --git a/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/AbpDbContext.cs b/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/AbpDbContext.cs index b86f9b83b1..588b052140 100644 --- a/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/AbpDbContext.cs +++ b/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/AbpDbContext.cs @@ -155,6 +155,10 @@ namespace Volo.Abp.EntityFrameworkCore { try { + ApplyAbpConcepts(); + + var eventReport = CreateEventReport(); + var auditLog = AuditingManager?.Current?.Log; List entityChangeList = null; if (auditLog != null) @@ -162,10 +166,6 @@ namespace Volo.Abp.EntityFrameworkCore entityChangeList = EntityHistoryHelper.CreateChangeList(ChangeTracker.Entries().ToList()); } - ApplyAbpConcepts(); - - var eventReport = CreateEventReport(); - var result = await base.SaveChangesAsync(acceptAllChangesOnSuccess, cancellationToken); PublishEntityEvents(eventReport); diff --git a/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/EntityHistory/EntityHistoryHelper.cs b/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/EntityHistory/EntityHistoryHelper.cs index 4ef6057943..d7dca36439 100644 --- a/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/EntityHistory/EntityHistoryHelper.cs +++ b/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/EntityHistory/EntityHistoryHelper.cs @@ -166,7 +166,7 @@ namespace Volo.Abp.EntityFrameworkCore.EntityHistory foreach (var property in properties) { var propertyEntry = entityEntry.Property(property.Name); - if (ShouldSavePropertyHistory(propertyEntry, isCreated || isDeleted)) + if (ShouldSavePropertyHistory(propertyEntry, isCreated || isDeleted) && !IsSoftDeleted(entityEntry)) { propertyChanges.Add(new EntityPropertyChangeInfo { @@ -188,11 +188,11 @@ namespace Volo.Abp.EntityFrameworkCore.EntityHistory protected virtual bool IsDeleted(EntityEntry entityEntry) { - if (entityEntry.State == EntityState.Deleted) - { - return true; - } + return entityEntry.State == EntityState.Deleted || IsSoftDeleted(entityEntry); + } + protected virtual bool IsSoftDeleted(EntityEntry entityEntry) + { var entity = entityEntry.Entity; return entity is ISoftDelete && entity.As().IsDeleted; } diff --git a/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/ValueConverters/ExtraPropertiesValueConverter.cs b/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/ValueConverters/ExtraPropertiesValueConverter.cs index f9e70848c8..2949437ad0 100644 --- a/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/ValueConverters/ExtraPropertiesValueConverter.cs +++ b/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/ValueConverters/ExtraPropertiesValueConverter.cs @@ -51,10 +51,6 @@ namespace Volo.Abp.EntityFrameworkCore.ValueConverters var deserializeOptions = new JsonSerializerOptions(); deserializeOptions.Converters.Add(new ObjectToInferredTypesConverter()); - // Remove after this PR. - // https://github.com/dotnet/runtime/pull/57525 - deserializeOptions.NumberHandling = JsonNumberHandling.AllowReadingFromString; - var dictionary = JsonSerializer.Deserialize(extraPropertiesAsJson, deserializeOptions) ?? new ExtraPropertyDictionary(); diff --git a/framework/src/Volo.Abp.Http.Client.Web/FodyWeavers.xml b/framework/src/Volo.Abp.Http.Client.Web/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/framework/src/Volo.Abp.Http.Client.Web/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.Http.Client.Web/FodyWeavers.xsd b/framework/src/Volo.Abp.Http.Client.Web/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/framework/src/Volo.Abp.Http.Client.Web/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.Http.Client.Web/Volo.Abp.Http.Client.Web.csproj b/framework/src/Volo.Abp.Http.Client.Web/Volo.Abp.Http.Client.Web.csproj new file mode 100644 index 0000000000..d7651c7b6d --- /dev/null +++ b/framework/src/Volo.Abp.Http.Client.Web/Volo.Abp.Http.Client.Web.csproj @@ -0,0 +1,25 @@ + + + + + + + net6.0 + Volo.Abp.Http.Client.Web + Volo.Abp.Http.Client.Web + $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; + false + false + false + true + Library + true + + + + + + + + + diff --git a/framework/src/Volo.Abp.Http.Client.Web/Volo/Abp/Http/Client/Web/AbpHttpClientWebModule.cs b/framework/src/Volo.Abp.Http.Client.Web/Volo/Abp/Http/Client/Web/AbpHttpClientWebModule.cs new file mode 100644 index 0000000000..4700e1bef1 --- /dev/null +++ b/framework/src/Volo.Abp.Http.Client.Web/Volo/Abp/Http/Client/Web/AbpHttpClientWebModule.cs @@ -0,0 +1,42 @@ +using System.Linq; +using Microsoft.AspNetCore.Mvc.ApplicationParts; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.DependencyInjection.Extensions; +using Volo.Abp.AspNetCore.Mvc; +using Volo.Abp.AspNetCore.Mvc.Conventions; +using Volo.Abp.Http.Client.Web.Conventions; +using Volo.Abp.Modularity; + +namespace Volo.Abp.Http.Client.Web +{ + [DependsOn( + typeof(AbpAspNetCoreMvcModule), + typeof(AbpHttpClientModule) + )] + public class AbpHttpClientWebModule : AbpModule + { + public override void ConfigureServices(ServiceConfigurationContext context) + { + context.Services.Replace(ServiceDescriptor.Transient()); + context.Services.AddTransient(); + + var partManager = context.Services.GetSingletonInstance(); + partManager.FeatureProviders.Add(new AbpHttpClientProxyControllerFeatureProvider()); + } + + public override void OnApplicationInitialization(ApplicationInitializationContext context) + { + var partManager = context.ServiceProvider.GetRequiredService(); + foreach (var moduleAssembly in context + .ServiceProvider + .GetRequiredService() + .Modules + .Select(m => m.Type.Assembly) + .Where(a => a.GetTypes().Any(AbpHttpClientProxyHelper.IsClientProxyService)) + .Distinct()) + { + partManager.ApplicationParts.AddIfNotContains(moduleAssembly); + } + } + } +} diff --git a/framework/src/Volo.Abp.Http.Client.Web/Volo/Abp/Http/Client/Web/Conventions/AbpHttpClientProxyControllerFeatureProvider.cs b/framework/src/Volo.Abp.Http.Client.Web/Volo/Abp/Http/Client/Web/Conventions/AbpHttpClientProxyControllerFeatureProvider.cs new file mode 100644 index 0000000000..9b365fb21f --- /dev/null +++ b/framework/src/Volo.Abp.Http.Client.Web/Volo/Abp/Http/Client/Web/Conventions/AbpHttpClientProxyControllerFeatureProvider.cs @@ -0,0 +1,13 @@ +using System.Reflection; +using Microsoft.AspNetCore.Mvc.Controllers; + +namespace Volo.Abp.Http.Client.Web.Conventions +{ + public class AbpHttpClientProxyControllerFeatureProvider : ControllerFeatureProvider + { + protected override bool IsController(TypeInfo typeInfo) + { + return AbpHttpClientProxyHelper.IsClientProxyService(typeInfo); + } + } +} diff --git a/framework/src/Volo.Abp.Swashbuckle/Volo/Abp/Swashbuckle/Conventions/AbpSwaggerClientProxyHelper.cs b/framework/src/Volo.Abp.Http.Client.Web/Volo/Abp/Http/Client/Web/Conventions/AbpHttpClientProxyHelper.cs similarity index 81% rename from framework/src/Volo.Abp.Swashbuckle/Volo/Abp/Swashbuckle/Conventions/AbpSwaggerClientProxyHelper.cs rename to framework/src/Volo.Abp.Http.Client.Web/Volo/Abp/Http/Client/Web/Conventions/AbpHttpClientProxyHelper.cs index 5ec9d59112..7d8e636d38 100644 --- a/framework/src/Volo.Abp.Swashbuckle/Volo/Abp/Swashbuckle/Conventions/AbpSwaggerClientProxyHelper.cs +++ b/framework/src/Volo.Abp.Http.Client.Web/Volo/Abp/Http/Client/Web/Conventions/AbpHttpClientProxyHelper.cs @@ -3,9 +3,9 @@ using System.Linq; using Volo.Abp.Application.Services; using Volo.Abp.Http.Client.ClientProxying; -namespace Volo.Abp.Swashbuckle.Conventions +namespace Volo.Abp.Http.Client.Web.Conventions { - public static class AbpSwaggerClientProxyHelper + public static class AbpHttpClientProxyHelper { public static bool IsClientProxyService(Type type) { diff --git a/framework/src/Volo.Abp.Swashbuckle/Volo/Abp/Swashbuckle/Conventions/AbpSwaggerClientProxyServiceConvention.cs b/framework/src/Volo.Abp.Http.Client.Web/Volo/Abp/Http/Client/Web/Conventions/AbpHttpClientProxyServiceConvention.cs similarity index 94% rename from framework/src/Volo.Abp.Swashbuckle/Volo/Abp/Swashbuckle/Conventions/AbpSwaggerClientProxyServiceConvention.cs rename to framework/src/Volo.Abp.Http.Client.Web/Volo/Abp/Http/Client/Web/Conventions/AbpHttpClientProxyServiceConvention.cs index f7f7ab8974..52ccdabfc5 100644 --- a/framework/src/Volo.Abp.Swashbuckle/Volo/Abp/Swashbuckle/Conventions/AbpSwaggerClientProxyServiceConvention.cs +++ b/framework/src/Volo.Abp.Http.Client.Web/Volo/Abp/Http/Client/Web/Conventions/AbpHttpClientProxyServiceConvention.cs @@ -14,15 +14,15 @@ using Volo.Abp.Http.Client.ClientProxying; using Volo.Abp.Http.Modeling; using Volo.Abp.Reflection; -namespace Volo.Abp.Swashbuckle.Conventions +namespace Volo.Abp.Http.Client.Web.Conventions { [DisableConventionalRegistration] - public class AbpSwaggerServiceConvention : AbpServiceConvention + public class AbpHttpClientProxyServiceConvention : AbpServiceConvention { protected readonly IClientProxyApiDescriptionFinder ClientProxyApiDescriptionFinder; protected readonly List ActionWithAttributeRoute; - public AbpSwaggerServiceConvention( + public AbpHttpClientProxyServiceConvention( IOptions options, IConventionalRouteBuilder conventionalRouteBuilder, IClientProxyApiDescriptionFinder clientProxyApiDescriptionFinder) @@ -34,12 +34,12 @@ namespace Volo.Abp.Swashbuckle.Conventions protected override IList GetControllers(ApplicationModel application) { - return application.Controllers.Where(c => !AbpSwaggerClientProxyHelper.IsClientProxyService(c.ControllerType)).ToList(); + return application.Controllers.Where(c => !AbpHttpClientProxyHelper.IsClientProxyService(c.ControllerType)).ToList(); } protected virtual IList GetClientProxyControllers(ApplicationModel application) { - return application.Controllers.Where(c => AbpSwaggerClientProxyHelper.IsClientProxyService(c.ControllerType)).ToList(); + return application.Controllers.Where(c => AbpHttpClientProxyHelper.IsClientProxyService(c.ControllerType)).ToList(); } protected override void ApplyForControllers(ApplicationModel application) @@ -217,7 +217,7 @@ namespace Volo.Abp.Swashbuckle.Conventions var key = $"{appServiceType.FullName}." + $"{action.ActionMethod.Name}." + - $"{string.Join("-", action.Parameters.Select(x => x.ParameterType.FullName))}"; + $"{string.Join("-", action.Parameters.Select(x => TypeHelper.GetFullNameHandlingNullableAndGenerics(x.ParameterType)))}"; var actionApiDescriptionModel = ClientProxyApiDescriptionFinder.FindAction(key); if (actionApiDescriptionModel == null) diff --git a/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/AbpHttpClientModule.cs b/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/AbpHttpClientModule.cs index c4d0d0d181..c72b99c819 100644 --- a/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/AbpHttpClientModule.cs +++ b/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/AbpHttpClientModule.cs @@ -5,6 +5,7 @@ using Volo.Abp.MultiTenancy; using Volo.Abp.Threading; using Volo.Abp.Validation; using Volo.Abp.ExceptionHandling; +using Volo.Abp.Http.Client.DynamicProxying; namespace Volo.Abp.Http.Client { @@ -22,6 +23,8 @@ namespace Volo.Abp.Http.Client { var configuration = context.Services.GetConfiguration(); Configure(configuration); + + context.Services.AddTransient(typeof(DynamicHttpProxyInterceptorClientProxy<>)); } } } diff --git a/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/Proxying/ApiVersionInfo.cs b/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/ClientProxying/ApiVersionInfo.cs similarity index 92% rename from framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/Proxying/ApiVersionInfo.cs rename to framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/ClientProxying/ApiVersionInfo.cs index d37de5d452..ecf2db7b9f 100644 --- a/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/Proxying/ApiVersionInfo.cs +++ b/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/ClientProxying/ApiVersionInfo.cs @@ -1,6 +1,6 @@ using System; -namespace Volo.Abp.Http.Client.Proxying +namespace Volo.Abp.Http.Client.ClientProxying { public class ApiVersionInfo //TODO: Rename to not conflict with api versioning apis { diff --git a/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/ClientProxying/ClientProxyBase.cs b/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/ClientProxying/ClientProxyBase.cs index 33a1906114..5254b10238 100644 --- a/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/ClientProxying/ClientProxyBase.cs +++ b/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/ClientProxying/ClientProxyBase.cs @@ -1,9 +1,23 @@ -using System.Collections.Generic; +using System; +using System.Collections.Generic; +using System.Globalization; using System.Linq; +using System.Net.Http; +using System.Net.Http.Headers; +using System.Threading; using System.Threading.Tasks; +using Microsoft.Extensions.Options; +using Microsoft.Extensions.Primitives; +using Volo.Abp.Content; using Volo.Abp.DependencyInjection; +using Volo.Abp.Http.Client.Authentication; using Volo.Abp.Http.Client.Proxying; using Volo.Abp.Http.Modeling; +using Volo.Abp.Http.ProxyScripting.Generators; +using Volo.Abp.Json; +using Volo.Abp.MultiTenancy; +using Volo.Abp.Threading; +using Volo.Abp.Tracing; namespace Volo.Abp.Http.Client.ClientProxying { @@ -11,42 +25,270 @@ namespace Volo.Abp.Http.Client.ClientProxying { public IAbpLazyServiceProvider LazyServiceProvider { get; set; } - protected IHttpProxyExecuter HttpProxyExecuter => LazyServiceProvider.LazyGetRequiredService(); protected IClientProxyApiDescriptionFinder ClientProxyApiDescriptionFinder => LazyServiceProvider.LazyGetRequiredService(); + protected ICancellationTokenProvider CancellationTokenProvider => LazyServiceProvider.LazyGetRequiredService(); + protected ICorrelationIdProvider CorrelationIdProvider => LazyServiceProvider.LazyGetRequiredService(); + protected ICurrentTenant CurrentTenant => LazyServiceProvider.LazyGetRequiredService(); + protected IOptions AbpCorrelationIdOptions => LazyServiceProvider.LazyGetRequiredService>(); + protected IProxyHttpClientFactory HttpClientFactory => LazyServiceProvider.LazyGetRequiredService(); + protected IRemoteServiceConfigurationProvider RemoteServiceConfigurationProvider => LazyServiceProvider.LazyGetRequiredService(); + protected IOptions ClientOptions => LazyServiceProvider.LazyGetRequiredService>(); + protected IJsonSerializer JsonSerializer => LazyServiceProvider.LazyGetRequiredService(); + protected IRemoteServiceHttpClientAuthenticator ClientAuthenticator => LazyServiceProvider.LazyGetRequiredService(); + protected ClientProxyRequestPayloadBuilder ClientProxyRequestPayloadBuilder => LazyServiceProvider.LazyGetRequiredService(); + protected ClientProxyUrlBuilder ClientProxyUrlBuilder => LazyServiceProvider.LazyGetRequiredService(); - protected virtual async Task RequestAsync(string methodName, params object[] arguments) + protected virtual async Task RequestAsync(string methodName, ClientProxyRequestTypeValue arguments = null) { - await HttpProxyExecuter.MakeRequestAsync(BuildHttpProxyExecuterContext(methodName, arguments)); + await RequestAsync(BuildHttpProxyClientProxyContext(methodName, arguments)); } - protected virtual async Task RequestAsync(string methodName, params object[] arguments) + protected virtual async Task RequestAsync(string methodName, ClientProxyRequestTypeValue arguments = null) { - return await HttpProxyExecuter.MakeRequestAndGetResultAsync(BuildHttpProxyExecuterContext(methodName, arguments)); + return await RequestAsync(BuildHttpProxyClientProxyContext(methodName, arguments)); } - protected virtual HttpProxyExecuterContext BuildHttpProxyExecuterContext(string methodName, params object[] arguments) + protected virtual ClientProxyRequestContext BuildHttpProxyClientProxyContext(string methodName, ClientProxyRequestTypeValue arguments = null) { - var actionKey = GetActionKey(methodName, arguments); - var action = ClientProxyApiDescriptionFinder.FindAction(actionKey); - return new HttpProxyExecuterContext(action, BuildArguments(action, arguments), typeof(TService)); + if (arguments == null) + { + arguments = new ClientProxyRequestTypeValue(); + } + + var methodUniqueName = $"{typeof(TService).FullName}.{methodName}.{string.Join("-", arguments.Values.Select(x => x.Key.FullName))}"; + var action = ClientProxyApiDescriptionFinder.FindAction(methodUniqueName); + if (action == null) + { + throw new AbpException($"The API description of the {typeof(TService).FullName}.{methodName} method was not found!"); + } + return new ClientProxyRequestContext( + action, + action.Parameters + .GroupBy(x => x.NameOnMethod) + .Select((x, i) => new KeyValuePair(x.Key, arguments.Values[i].Value)) + .ToDictionary(x => x.Key, x => x.Value), + typeof(TService)); + } + + protected virtual async Task RequestAsync(ClientProxyRequestContext requestContext) + { + var responseContent = await RequestAsync(requestContext); + + if (typeof(T) == typeof(IRemoteStreamContent) || + typeof(T) == typeof(RemoteStreamContent)) + { + /* returning a class that holds a reference to response + * content just to be sure that GC does not dispose of + * it before we finish doing our work with the stream */ + return (T)(object)new RemoteStreamContent( + await responseContent.ReadAsStreamAsync(), + responseContent.Headers?.ContentDisposition?.FileNameStar ?? + RemoveQuotes(responseContent.Headers?.ContentDisposition?.FileName).ToString(), + responseContent.Headers?.ContentType?.ToString(), + responseContent.Headers?.ContentLength); + } + + var stringContent = await responseContent.ReadAsStringAsync(); + if (typeof(T) == typeof(string)) + { + return (T)(object)stringContent; + } + + if (stringContent.IsNullOrWhiteSpace()) + { + return default; + } + + return JsonSerializer.Deserialize(stringContent); + } + + protected virtual async Task RequestAsync(ClientProxyRequestContext requestContext) + { + var clientConfig = ClientOptions.Value.HttpClientProxies.GetOrDefault(requestContext.ServiceType) ?? throw new AbpException($"Could not get HttpClientProxyConfig for {requestContext.ServiceType.FullName}."); + var remoteServiceConfig = await RemoteServiceConfigurationProvider.GetConfigurationOrDefaultAsync(clientConfig.RemoteServiceName); + + var client = HttpClientFactory.Create(clientConfig.RemoteServiceName); + + var apiVersion = await GetApiVersionInfoAsync(requestContext); + var url = remoteServiceConfig.BaseUrl.EnsureEndsWith('/') + await GetUrlWithParametersAsync(requestContext, apiVersion); + + var requestMessage = new HttpRequestMessage(requestContext.Action.GetHttpMethod(), url) + { + Content = ClientProxyRequestPayloadBuilder.BuildContent(requestContext.Action, requestContext.Arguments, JsonSerializer, apiVersion) + }; + + AddHeaders(requestContext.Arguments, requestContext.Action, requestMessage, apiVersion); + + if (requestContext.Action.AllowAnonymous != true) + { + await ClientAuthenticator.Authenticate( + new RemoteServiceHttpClientAuthenticateContext( + client, + requestMessage, + remoteServiceConfig, + clientConfig.RemoteServiceName + ) + ); + } + + var response = await client.SendAsync( + requestMessage, + HttpCompletionOption.ResponseHeadersRead /*this will buffer only the headers, the content will be used as a stream*/, + GetCancellationToken(requestContext.Arguments) + ); + + if (!response.IsSuccessStatusCode) + { + await ThrowExceptionForResponseAsync(response); + } + + return response.Content; + } + + protected virtual async Task GetApiVersionInfoAsync(ClientProxyRequestContext requestContext) + { + var apiVersion = await FindBestApiVersionAsync(requestContext); + + //TODO: Make names configurable? + var versionParam = requestContext.Action.Parameters.FirstOrDefault(p => p.Name == "apiVersion" && p.BindingSourceId == ParameterBindingSources.Path) ?? + requestContext.Action.Parameters.FirstOrDefault(p => p.Name == "api-version" && p.BindingSourceId == ParameterBindingSources.Query); + + return new ApiVersionInfo(versionParam?.BindingSourceId, apiVersion); + } + + protected virtual Task GetUrlWithParametersAsync(ClientProxyRequestContext requestContext, ApiVersionInfo apiVersion) + { + return Task.FromResult(ClientProxyUrlBuilder.GenerateUrlWithParameters(requestContext.Action, requestContext.Arguments, apiVersion)); + } + + protected virtual Task GetHttpContentAsync(ClientProxyRequestContext requestContext, ApiVersionInfo apiVersion) + { + return Task.FromResult(ClientProxyRequestPayloadBuilder.BuildContent(requestContext.Action, requestContext.Arguments, JsonSerializer, apiVersion)); + } + + protected virtual async Task FindBestApiVersionAsync(ClientProxyRequestContext requestContext) + { + var configuredVersion = await GetConfiguredApiVersionAsync(requestContext); + + if (requestContext.Action.SupportedVersions.IsNullOrEmpty()) + { + return configuredVersion ?? "1.0"; + } + + if (requestContext.Action.SupportedVersions.Contains(configuredVersion)) + { + return configuredVersion; + } + + return requestContext.Action.SupportedVersions.Last(); //TODO: Ensure to get the latest version! } - protected virtual Dictionary BuildArguments(ActionApiDescriptionModel action, object[] arguments) + protected virtual async Task GetConfiguredApiVersionAsync(ClientProxyRequestContext requestContext) { - var parameters = action.Parameters.GroupBy(x => x.NameOnMethod).Select(x => x.Key).ToList(); - var dict = new Dictionary(); + var clientConfig = ClientOptions.Value.HttpClientProxies.GetOrDefault(requestContext.ServiceType) + ?? throw new AbpException($"Could not get DynamicHttpClientProxyConfig for {requestContext.ServiceType.FullName}."); + + return (await RemoteServiceConfigurationProvider + .GetConfigurationOrDefaultOrNullAsync(clientConfig.RemoteServiceName))?.Version; + } - for (var i = 0; i < parameters.Count; i++) + protected virtual async Task ThrowExceptionForResponseAsync(HttpResponseMessage response) + { + if (response.Headers.Contains(AbpHttpConsts.AbpErrorFormat)) { - dict[parameters[i]] = arguments[i]; + var errorResponse = JsonSerializer.Deserialize( + await response.Content.ReadAsStringAsync() + ); + + throw new AbpRemoteCallException(errorResponse.Error) + { + HttpStatusCode = (int) response.StatusCode + }; } - return dict; + throw new AbpRemoteCallException( + new RemoteServiceErrorInfo + { + Message = response.ReasonPhrase, + Code = response.StatusCode.ToString() + } + ) + { + HttpStatusCode = (int) response.StatusCode + }; } - private static string GetActionKey(string methodName, params object[] arguments) + protected virtual void AddHeaders( + IReadOnlyDictionary argumentsDictionary, + ActionApiDescriptionModel action, + HttpRequestMessage requestMessage, + ApiVersionInfo apiVersion) { - return $"{typeof(TService).FullName}.{methodName}.{string.Join("-", arguments.Select(x => x.GetType().FullName))}"; + //API Version + if (!apiVersion.Version.IsNullOrEmpty()) + { + //TODO: What about other media types? + requestMessage.Headers.Add("accept", $"{MimeTypes.Text.Plain}; v={apiVersion.Version}"); + requestMessage.Headers.Add("accept", $"{MimeTypes.Application.Json}; v={apiVersion.Version}"); + requestMessage.Headers.Add("api-version", apiVersion.Version); + } + + //Header parameters + var headers = action.Parameters.Where(p => p.BindingSourceId == ParameterBindingSources.Header).ToArray(); + foreach (var headerParameter in headers) + { + var value = HttpActionParameterHelper.FindParameterValue(argumentsDictionary, headerParameter); + if (value != null) + { + requestMessage.Headers.Add(headerParameter.Name, value.ToString()); + } + } + + //CorrelationId + requestMessage.Headers.Add(AbpCorrelationIdOptions.Value.HttpHeaderName, CorrelationIdProvider.Get()); + + //TenantId + if (CurrentTenant.Id.HasValue) + { + //TODO: Use AbpAspNetCoreMultiTenancyOptions to get the key + requestMessage.Headers.Add(TenantResolverConsts.DefaultTenantKey, CurrentTenant.Id.Value.ToString()); + } + + //Culture + //TODO: Is that the way we want? Couldn't send the culture (not ui culture) + var currentCulture = CultureInfo.CurrentUICulture.Name ?? CultureInfo.CurrentCulture.Name; + if (!currentCulture.IsNullOrEmpty()) + { + requestMessage.Headers.AcceptLanguage.Add(new StringWithQualityHeaderValue(currentCulture)); + } + + //X-Requested-With + requestMessage.Headers.Add("X-Requested-With", "XMLHttpRequest"); + } + + protected virtual StringSegment RemoveQuotes(StringSegment input) + { + if (!StringSegment.IsNullOrEmpty(input) && input.Length >= 2 && input[0] == '"' && input[input.Length - 1] == '"') + { + input = input.Subsegment(1, input.Length - 2); + } + + return input; + } + + protected virtual CancellationToken GetCancellationToken(IReadOnlyDictionary arguments) + { + var cancellationTokenArg = arguments.LastOrDefault(); + + if (cancellationTokenArg.Value is CancellationToken cancellationToken) + { + if (cancellationToken != default) + { + return cancellationToken; + } + } + + return CancellationTokenProvider.Token; } } } diff --git a/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/Proxying/HttpProxyExecuterContext.cs b/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/ClientProxying/ClientProxyRequestContext.cs similarity index 85% rename from framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/Proxying/HttpProxyExecuterContext.cs rename to framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/ClientProxying/ClientProxyRequestContext.cs index e61b2af93a..089a61c0d8 100644 --- a/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/Proxying/HttpProxyExecuterContext.cs +++ b/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/ClientProxying/ClientProxyRequestContext.cs @@ -3,9 +3,9 @@ using System.Collections.Generic; using JetBrains.Annotations; using Volo.Abp.Http.Modeling; -namespace Volo.Abp.Http.Client.Proxying +namespace Volo.Abp.Http.Client.ClientProxying { - public class HttpProxyExecuterContext + public class ClientProxyRequestContext { [NotNull] public ActionApiDescriptionModel Action { get; } @@ -16,7 +16,7 @@ namespace Volo.Abp.Http.Client.Proxying [NotNull] public Type ServiceType { get; } - public HttpProxyExecuterContext( + public ClientProxyRequestContext( [NotNull] ActionApiDescriptionModel action, [NotNull] IReadOnlyDictionary arguments, [NotNull] Type serviceType) diff --git a/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/Proxying/RequestPayloadBuilder.cs b/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/ClientProxying/ClientProxyRequestPayloadBuilder.cs similarity index 88% rename from framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/Proxying/RequestPayloadBuilder.cs rename to framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/ClientProxying/ClientProxyRequestPayloadBuilder.cs index 583798f43f..3ba7026c8e 100644 --- a/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/Proxying/RequestPayloadBuilder.cs +++ b/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/ClientProxying/ClientProxyRequestPayloadBuilder.cs @@ -6,17 +6,18 @@ using System.Net.Http.Headers; using System.Text; using JetBrains.Annotations; using Volo.Abp.Content; -using Volo.Abp.Http.Client.DynamicProxying; +using Volo.Abp.DependencyInjection; +using Volo.Abp.Http.Client.Proxying; using Volo.Abp.Http.Modeling; using Volo.Abp.Http.ProxyScripting.Generators; using Volo.Abp.Json; -namespace Volo.Abp.Http.Client.Proxying +namespace Volo.Abp.Http.Client.ClientProxying { - public static class RequestPayloadBuilder + public class ClientProxyRequestPayloadBuilder : ITransientDependency { [CanBeNull] - public static HttpContent BuildContent(ActionApiDescriptionModel action, IReadOnlyDictionary methodArguments, IJsonSerializer jsonSerializer, ApiVersionInfo apiVersion) + public virtual HttpContent BuildContent(ActionApiDescriptionModel action, IReadOnlyDictionary methodArguments, IJsonSerializer jsonSerializer, ApiVersionInfo apiVersion) { var body = GenerateBody(action, methodArguments, jsonSerializer); if (body != null) @@ -29,7 +30,7 @@ namespace Volo.Abp.Http.Client.Proxying return body; } - private static HttpContent GenerateBody(ActionApiDescriptionModel action, IReadOnlyDictionary methodArguments, IJsonSerializer jsonSerializer) + protected virtual HttpContent GenerateBody(ActionApiDescriptionModel action, IReadOnlyDictionary methodArguments, IJsonSerializer jsonSerializer) { var parameters = action .Parameters @@ -57,7 +58,7 @@ namespace Volo.Abp.Http.Client.Proxying return new StringContent(jsonSerializer.Serialize(value), Encoding.UTF8, MimeTypes.Application.Json); } - private static HttpContent GenerateFormPostData(ActionApiDescriptionModel action, IReadOnlyDictionary methodArguments) + protected virtual HttpContent GenerateFormPostData(ActionApiDescriptionModel action, IReadOnlyDictionary methodArguments) { var parameters = action .Parameters diff --git a/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/ClientProxying/ClientProxyRequestTypeValue.cs b/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/ClientProxying/ClientProxyRequestTypeValue.cs new file mode 100644 index 0000000000..56487e8f95 --- /dev/null +++ b/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/ClientProxying/ClientProxyRequestTypeValue.cs @@ -0,0 +1,31 @@ +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Volo.Abp.Http.Client.ClientProxying +{ + public class ClientProxyRequestTypeValue : IEnumerable> + { + public List> Values { get; private set; } + + public ClientProxyRequestTypeValue() + { + Values = new List>(); + } + + public void Add(Type type, object value) + { + Values.Add(new KeyValuePair(type, value)); + } + + public IEnumerator> GetEnumerator() + { + return Values.GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + } +} diff --git a/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/Proxying/UrlBuilder.cs b/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/ClientProxying/ClientProxyUrlBuilder.cs similarity index 84% rename from framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/Proxying/UrlBuilder.cs rename to framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/ClientProxying/ClientProxyUrlBuilder.cs index 5f916fdd88..e6a9b8ff71 100644 --- a/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/Proxying/UrlBuilder.cs +++ b/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/ClientProxying/ClientProxyUrlBuilder.cs @@ -5,16 +5,17 @@ using System.Globalization; using System.Linq; using System.Text; using JetBrains.Annotations; -using Volo.Abp.Http.Client.DynamicProxying; +using Volo.Abp.DependencyInjection; +using Volo.Abp.Http.Client.Proxying; using Volo.Abp.Http.Modeling; using Volo.Abp.Http.ProxyScripting.Generators; using Volo.Abp.Localization; -namespace Volo.Abp.Http.Client.Proxying +namespace Volo.Abp.Http.Client.ClientProxying { - internal static class UrlBuilder + public class ClientProxyUrlBuilder : ITransientDependency { - public static string GenerateUrlWithParameters(ActionApiDescriptionModel action, IReadOnlyDictionary methodArguments, ApiVersionInfo apiVersion) + public string GenerateUrlWithParameters(ActionApiDescriptionModel action, IReadOnlyDictionary methodArguments, ApiVersionInfo apiVersion) { // The ASP.NET Core route value provider and query string value provider: // Treat values as invariant culture. @@ -30,7 +31,7 @@ namespace Volo.Abp.Http.Client.Proxying } } - private static void ReplacePathVariables(StringBuilder urlBuilder, IList actionParameters, IReadOnlyDictionary methodArguments, ApiVersionInfo apiVersion) + protected virtual void ReplacePathVariables(StringBuilder urlBuilder, IList actionParameters, IReadOnlyDictionary methodArguments, ApiVersionInfo apiVersion) { var pathParameters = actionParameters .Where(p => p.BindingSourceId == ParameterBindingSources.Path) @@ -72,7 +73,7 @@ namespace Volo.Abp.Http.Client.Proxying } } - private static void AddQueryStringParameters(StringBuilder urlBuilder, IList actionParameters, IReadOnlyDictionary methodArguments, ApiVersionInfo apiVersion) + protected virtual void AddQueryStringParameters(StringBuilder urlBuilder, IList actionParameters, IReadOnlyDictionary methodArguments, ApiVersionInfo apiVersion) { var queryStringParameters = actionParameters .Where(p => p.BindingSourceId.IsIn(ParameterBindingSources.ModelBinding, ParameterBindingSources.Query)) @@ -100,7 +101,7 @@ namespace Volo.Abp.Http.Client.Proxying } } - private static bool AddQueryStringParameter( + protected virtual bool AddQueryStringParameter( StringBuilder urlBuilder, bool isFirstParam, string name, @@ -133,7 +134,7 @@ namespace Volo.Abp.Http.Client.Proxying return true; } - private static string ConvertValueToString([CanBeNull] object value) + protected virtual string ConvertValueToString([CanBeNull] object value) { if (value is DateTime dateTimeValue) { diff --git a/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/DynamicHttpProxyInterceptor.cs b/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/DynamicHttpProxyInterceptor.cs index 68eb146201..c35995447a 100644 --- a/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/DynamicHttpProxyInterceptor.cs +++ b/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/DynamicHttpProxyInterceptor.cs @@ -8,6 +8,7 @@ using Microsoft.Extensions.Logging.Abstractions; using Microsoft.Extensions.Options; using Volo.Abp.DependencyInjection; using Volo.Abp.DynamicProxy; +using Volo.Abp.Http.Client.ClientProxying; using Volo.Abp.Http.Client.Proxying; using Volo.Abp.Http.Modeling; @@ -15,32 +16,32 @@ namespace Volo.Abp.Http.Client.DynamicProxying { public class DynamicHttpProxyInterceptor : AbpInterceptor, ITransientDependency { + // ReSharper disable once StaticMemberInGenericType - protected static MethodInfo MakeRequestAndGetResultAsyncMethod { get; } + protected static MethodInfo CallRequestAsyncMethod { get; } + + static DynamicHttpProxyInterceptor() + { + CallRequestAsyncMethod = typeof(DynamicHttpProxyInterceptor) + .GetMethods(BindingFlags.NonPublic | BindingFlags.Instance) + .First(m => m.Name == nameof(CallRequestAsync) && m.IsGenericMethodDefinition); + } + public ILogger> Logger { get; set; } + protected DynamicHttpProxyInterceptorClientProxy InterceptorClientProxy { get; } protected AbpHttpClientOptions ClientOptions { get; } - protected IHttpProxyExecuter HttpProxyExecuter { get; } protected IProxyHttpClientFactory HttpClientFactory { get; } protected IRemoteServiceConfigurationProvider RemoteServiceConfigurationProvider { get; } protected IApiDescriptionFinder ApiDescriptionFinder { get; } - public ILogger> Logger { get; set; } - - static DynamicHttpProxyInterceptor() - { - MakeRequestAndGetResultAsyncMethod = typeof(HttpProxyExecuter) - .GetMethods(BindingFlags.Public | BindingFlags.Instance) - .First(m => m.Name == nameof(IHttpProxyExecuter.MakeRequestAndGetResultAsync) && m.IsGenericMethodDefinition); - } - public DynamicHttpProxyInterceptor( - IHttpProxyExecuter httpProxyExecuter, + DynamicHttpProxyInterceptorClientProxy interceptorClientProxy, IOptions clientOptions, IProxyHttpClientFactory httpClientFactory, IRemoteServiceConfigurationProvider remoteServiceConfigurationProvider, IApiDescriptionFinder apiDescriptionFinder) { - HttpProxyExecuter = httpProxyExecuter; + InterceptorClientProxy = interceptorClientProxy; HttpClientFactory = httpClientFactory; RemoteServiceConfigurationProvider = remoteServiceConfigurationProvider; ApiDescriptionFinder = apiDescriptionFinder; @@ -49,34 +50,32 @@ namespace Volo.Abp.Http.Client.DynamicProxying Logger = NullLogger>.Instance; } - public override async Task InterceptAsync(IAbpMethodInvocation invocation) { - var context = new HttpProxyExecuterContext( + var context = new ClientProxyRequestContext( await GetActionApiDescriptionModel(invocation), invocation.ArgumentsDictionary, typeof(TService)); if (invocation.Method.ReturnType.GenericTypeArguments.IsNullOrEmpty()) { - await HttpProxyExecuter.MakeRequestAsync(context); + await InterceptorClientProxy.CallRequestAsync(context); } else { - var result = (Task)MakeRequestAndGetResultAsyncMethod - .MakeGenericMethod(invocation.Method.ReturnType.GenericTypeArguments[0]) - .Invoke(HttpProxyExecuter, new object[] { context }); + var returnType = invocation.Method.ReturnType.GenericTypeArguments[0]; + var result = (Task)CallRequestAsyncMethod + .MakeGenericMethod(returnType) + .Invoke(this, new object[] { context }); - invocation.ReturnValue = await GetResultAsync( - result, - invocation.Method.ReturnType.GetGenericArguments()[0] - ); + invocation.ReturnValue = await GetResultAsync(result, returnType); } } - private async Task GetActionApiDescriptionModel(IAbpMethodInvocation invocation) + protected virtual async Task GetActionApiDescriptionModel(IAbpMethodInvocation invocation) { - var clientConfig = ClientOptions.HttpClientProxies.GetOrDefault(typeof(TService)) ?? throw new AbpException($"Could not get DynamicHttpClientProxyConfig for {typeof(TService).FullName}."); + var clientConfig = ClientOptions.HttpClientProxies.GetOrDefault(typeof(TService)) ?? + throw new AbpException($"Could not get DynamicHttpClientProxyConfig for {typeof(TService).FullName}."); var remoteServiceConfig = await RemoteServiceConfigurationProvider.GetConfigurationOrDefaultAsync(clientConfig.RemoteServiceName); var client = HttpClientFactory.Create(clientConfig.RemoteServiceName); @@ -88,13 +87,19 @@ namespace Volo.Abp.Http.Client.DynamicProxying ); } - private async Task GetResultAsync(Task task, Type resultType) + protected virtual async Task CallRequestAsync(ClientProxyRequestContext context) + { + return await InterceptorClientProxy.CallRequestAsync(context); + } + + protected virtual async Task GetResultAsync(Task task, Type resultType) { await task; - return typeof(Task<>) + var resultProperty = typeof(Task<>) .MakeGenericType(resultType) - .GetProperty(nameof(Task.Result), BindingFlags.Instance | BindingFlags.Public) - .GetValue(task); + .GetProperty(nameof(Task.Result), BindingFlags.Instance | BindingFlags.Public); + Check.NotNull(resultProperty, nameof(resultProperty)); + return resultProperty.GetValue(task); } } } diff --git a/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/DynamicHttpProxyInterceptorClientProxy.cs b/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/DynamicHttpProxyInterceptorClientProxy.cs new file mode 100644 index 0000000000..0d8cd3f9df --- /dev/null +++ b/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/DynamicHttpProxyInterceptorClientProxy.cs @@ -0,0 +1,19 @@ +using System.Net.Http; +using System.Threading.Tasks; +using Volo.Abp.Http.Client.ClientProxying; + +namespace Volo.Abp.Http.Client.DynamicProxying +{ + public class DynamicHttpProxyInterceptorClientProxy : ClientProxyBase + { + public virtual async Task CallRequestAsync(ClientProxyRequestContext requestContext) + { + return await base.RequestAsync(requestContext); + } + + public virtual async Task CallRequestAsync(ClientProxyRequestContext requestContext) + { + return await base.RequestAsync(requestContext); + } + } +} diff --git a/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/Proxying/HttpProxyExecuter.cs b/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/Proxying/HttpProxyExecuter.cs deleted file mode 100644 index 6fe5376f2d..0000000000 --- a/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/Proxying/HttpProxyExecuter.cs +++ /dev/null @@ -1,267 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Globalization; -using System.Linq; -using System.Net.Http; -using System.Net.Http.Headers; -using System.Threading; -using System.Threading.Tasks; -using Microsoft.Extensions.Options; -using Microsoft.Extensions.Primitives; -using Volo.Abp.Content; -using Volo.Abp.DependencyInjection; -using Volo.Abp.Http.Client.Authentication; -using Volo.Abp.Http.Modeling; -using Volo.Abp.Http.ProxyScripting.Generators; -using Volo.Abp.Json; -using Volo.Abp.MultiTenancy; -using Volo.Abp.Threading; -using Volo.Abp.Tracing; - -namespace Volo.Abp.Http.Client.Proxying -{ - public class HttpProxyExecuter : IHttpProxyExecuter, ITransientDependency - { - protected ICancellationTokenProvider CancellationTokenProvider { get; } - protected ICorrelationIdProvider CorrelationIdProvider { get; } - protected ICurrentTenant CurrentTenant { get; } - protected AbpCorrelationIdOptions AbpCorrelationIdOptions { get; } - protected IProxyHttpClientFactory HttpClientFactory { get; } - protected IRemoteServiceConfigurationProvider RemoteServiceConfigurationProvider { get; } - protected AbpHttpClientOptions ClientOptions { get; } - protected IJsonSerializer JsonSerializer { get; } - protected IRemoteServiceHttpClientAuthenticator ClientAuthenticator { get; } - - public HttpProxyExecuter( - ICancellationTokenProvider cancellationTokenProvider, - ICorrelationIdProvider correlationIdProvider, - ICurrentTenant currentTenant, - IOptions abpCorrelationIdOptions, - IProxyHttpClientFactory httpClientFactory, - IRemoteServiceConfigurationProvider remoteServiceConfigurationProvider, - IOptions clientOptions, - IRemoteServiceHttpClientAuthenticator clientAuthenticator, - IJsonSerializer jsonSerializer) - { - CancellationTokenProvider = cancellationTokenProvider; - CorrelationIdProvider = correlationIdProvider; - CurrentTenant = currentTenant; - AbpCorrelationIdOptions = abpCorrelationIdOptions.Value; - HttpClientFactory = httpClientFactory; - RemoteServiceConfigurationProvider = remoteServiceConfigurationProvider; - ClientOptions = clientOptions.Value; - ClientAuthenticator = clientAuthenticator; - JsonSerializer = jsonSerializer; - } - - public virtual async Task MakeRequestAndGetResultAsync(HttpProxyExecuterContext context) - { - var responseContent = await MakeRequestAsync(context); - - if (typeof(T) == typeof(IRemoteStreamContent) || - typeof(T) == typeof(RemoteStreamContent)) - { - /* returning a class that holds a reference to response - * content just to be sure that GC does not dispose of - * it before we finish doing our work with the stream */ - return (T) (object) new RemoteStreamContent( - await responseContent.ReadAsStreamAsync(), - responseContent.Headers?.ContentDisposition?.FileNameStar ?? RemoveQuotes(responseContent.Headers?.ContentDisposition?.FileName).ToString(), - responseContent.Headers?.ContentType?.ToString(), - responseContent.Headers?.ContentLength); - } - - var stringContent = await responseContent.ReadAsStringAsync(); - if (typeof(T) == typeof(string)) - { - return (T)(object)stringContent; - } - - if (stringContent.IsNullOrWhiteSpace()) - { - return default; - } - - return JsonSerializer.Deserialize(stringContent); - } - - public virtual async Task MakeRequestAsync(HttpProxyExecuterContext context) - { - var clientConfig = ClientOptions.HttpClientProxies.GetOrDefault(context.ServiceType) ?? throw new AbpException($"Could not get HttpClientProxyConfig for {context.ServiceType.FullName}."); - var remoteServiceConfig = await RemoteServiceConfigurationProvider.GetConfigurationOrDefaultAsync(clientConfig.RemoteServiceName); - - var client = HttpClientFactory.Create(clientConfig.RemoteServiceName); - - var apiVersion = await GetApiVersionInfoAsync(context); - var url = remoteServiceConfig.BaseUrl.EnsureEndsWith('/') + UrlBuilder.GenerateUrlWithParameters(context.Action, context.Arguments, apiVersion); - - var requestMessage = new HttpRequestMessage(context.Action.GetHttpMethod(), url) - { - Content = RequestPayloadBuilder.BuildContent(context.Action, context.Arguments, JsonSerializer, apiVersion) - }; - - AddHeaders(context.Arguments, context.Action, requestMessage, apiVersion); - - if (context.Action.AllowAnonymous != true) - { - await ClientAuthenticator.Authenticate( - new RemoteServiceHttpClientAuthenticateContext( - client, - requestMessage, - remoteServiceConfig, - clientConfig.RemoteServiceName - ) - ); - } - - var response = await client.SendAsync( - requestMessage, - HttpCompletionOption.ResponseHeadersRead /*this will buffer only the headers, the content will be used as a stream*/, - GetCancellationToken(context.Arguments) - ); - - if (!response.IsSuccessStatusCode) - { - await ThrowExceptionForResponseAsync(response); - } - - return response.Content; - } - - private async Task GetApiVersionInfoAsync(HttpProxyExecuterContext context) - { - var apiVersion = await FindBestApiVersionAsync(context); - - //TODO: Make names configurable? - var versionParam = context.Action.Parameters.FirstOrDefault(p => p.Name == "apiVersion" && p.BindingSourceId == ParameterBindingSources.Path) ?? - context.Action.Parameters.FirstOrDefault(p => p.Name == "api-version" && p.BindingSourceId == ParameterBindingSources.Query); - - return new ApiVersionInfo(versionParam?.BindingSourceId, apiVersion); - } - - private async Task FindBestApiVersionAsync(HttpProxyExecuterContext context) - { - var configuredVersion = await GetConfiguredApiVersionAsync(context); - - if (context.Action.SupportedVersions.IsNullOrEmpty()) - { - return configuredVersion ?? "1.0"; - } - - if (context.Action.SupportedVersions.Contains(configuredVersion)) - { - return configuredVersion; - } - - return context.Action.SupportedVersions.Last(); //TODO: Ensure to get the latest version! - } - - private async Task GetConfiguredApiVersionAsync(HttpProxyExecuterContext context) - { - var clientConfig = ClientOptions.HttpClientProxies.GetOrDefault(context.ServiceType) - ?? throw new AbpException($"Could not get DynamicHttpClientProxyConfig for {context.ServiceType.FullName}."); - - return (await RemoteServiceConfigurationProvider - .GetConfigurationOrDefaultOrNullAsync(clientConfig.RemoteServiceName))?.Version; - } - - private async Task ThrowExceptionForResponseAsync(HttpResponseMessage response) - { - if (response.Headers.Contains(AbpHttpConsts.AbpErrorFormat)) - { - var errorResponse = JsonSerializer.Deserialize( - await response.Content.ReadAsStringAsync() - ); - - throw new AbpRemoteCallException(errorResponse.Error) - { - HttpStatusCode = (int) response.StatusCode - }; - } - - throw new AbpRemoteCallException( - new RemoteServiceErrorInfo - { - Message = response.ReasonPhrase, - Code = response.StatusCode.ToString() - } - ) - { - HttpStatusCode = (int) response.StatusCode - }; - } - - protected virtual void AddHeaders( - IReadOnlyDictionary argumentsDictionary, - ActionApiDescriptionModel action, - HttpRequestMessage requestMessage, - ApiVersionInfo apiVersion) - { - //API Version - if (!apiVersion.Version.IsNullOrEmpty()) - { - //TODO: What about other media types? - requestMessage.Headers.Add("accept", $"{MimeTypes.Text.Plain}; v={apiVersion.Version}"); - requestMessage.Headers.Add("accept", $"{MimeTypes.Application.Json}; v={apiVersion.Version}"); - requestMessage.Headers.Add("api-version", apiVersion.Version); - } - - //Header parameters - var headers = action.Parameters.Where(p => p.BindingSourceId == ParameterBindingSources.Header).ToArray(); - foreach (var headerParameter in headers) - { - var value = HttpActionParameterHelper.FindParameterValue(argumentsDictionary, headerParameter); - if (value != null) - { - requestMessage.Headers.Add(headerParameter.Name, value.ToString()); - } - } - - //CorrelationId - requestMessage.Headers.Add(AbpCorrelationIdOptions.HttpHeaderName, CorrelationIdProvider.Get()); - - //TenantId - if (CurrentTenant.Id.HasValue) - { - //TODO: Use AbpAspNetCoreMultiTenancyOptions to get the key - requestMessage.Headers.Add(TenantResolverConsts.DefaultTenantKey, CurrentTenant.Id.Value.ToString()); - } - - //Culture - //TODO: Is that the way we want? Couldn't send the culture (not ui culture) - var currentCulture = CultureInfo.CurrentUICulture.Name ?? CultureInfo.CurrentCulture.Name; - if (!currentCulture.IsNullOrEmpty()) - { - requestMessage.Headers.AcceptLanguage.Add(new StringWithQualityHeaderValue(currentCulture)); - } - - //X-Requested-With - requestMessage.Headers.Add("X-Requested-With", "XMLHttpRequest"); - } - - protected virtual StringSegment RemoveQuotes(StringSegment input) - { - if (!StringSegment.IsNullOrEmpty(input) && input.Length >= 2 && input[0] == '"' && input[input.Length - 1] == '"') - { - input = input.Subsegment(1, input.Length - 2); - } - - return input; - } - - protected virtual CancellationToken GetCancellationToken(IReadOnlyDictionary arguments) - { - var cancellationTokenArg = arguments.LastOrDefault(); - - if (cancellationTokenArg.Value is CancellationToken cancellationToken) - { - if (cancellationToken != default) - { - return cancellationToken; - } - } - - return CancellationTokenProvider.Token; - } - } -} diff --git a/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/Proxying/IHttpProxyExecuter.cs b/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/Proxying/IHttpProxyExecuter.cs deleted file mode 100644 index a7f48f14fe..0000000000 --- a/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/Proxying/IHttpProxyExecuter.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System.Net.Http; -using System.Threading.Tasks; - -namespace Volo.Abp.Http.Client.Proxying -{ - public interface IHttpProxyExecuter - { - Task MakeRequestAsync(HttpProxyExecuterContext context); - - Task MakeRequestAndGetResultAsync(HttpProxyExecuterContext context); - } -} diff --git a/framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/AbpIdentityClientOptions.cs b/framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/AbpIdentityClientOptions.cs index 0e877ee441..e8a8bfcd61 100644 --- a/framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/AbpIdentityClientOptions.cs +++ b/framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/AbpIdentityClientOptions.cs @@ -1,4 +1,9 @@ -namespace Volo.Abp.IdentityModel +using System; +using System.Collections.Generic; +using System.Linq; +using Volo.Abp.MultiTenancy; + +namespace Volo.Abp.IdentityModel { public class AbpIdentityClientOptions { @@ -8,5 +13,30 @@ { IdentityClients = new IdentityClientConfigurationDictionary(); } + + public IdentityClientConfiguration GetClientConfiguration(ICurrentTenant currentTenant, string identityClientName = null) + { + if (identityClientName.IsNullOrWhiteSpace()) + { + identityClientName = IdentityClientConfigurationDictionary.DefaultName; + } + + if (currentTenant.Id.HasValue) + { + var tenantConfiguration = IdentityClients.FirstOrDefault(x => x.Key == $"{identityClientName}.{currentTenant.Id}"); + if (tenantConfiguration.Key == null && !currentTenant.Name.IsNullOrWhiteSpace()) + { + tenantConfiguration = IdentityClients.FirstOrDefault(x => x.Key == $"{identityClientName}.{currentTenant.Name}"); + } + + if (tenantConfiguration.Key != null) + { + return tenantConfiguration.Value; + } + } + + return IdentityClients.GetOrDefault(identityClientName) ?? + IdentityClients.Default; + } } -} \ No newline at end of file +} diff --git a/framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/IdentityModelAuthenticationService.cs b/framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/IdentityModelAuthenticationService.cs index cc0b470a1e..f3c67c7b95 100644 --- a/framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/IdentityModelAuthenticationService.cs +++ b/framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/IdentityModelAuthenticationService.cs @@ -66,7 +66,7 @@ namespace Volo.Abp.IdentityModel protected virtual async Task GetAccessTokenOrNullAsync(string identityClientName) { - var configuration = GetClientConfiguration(identityClientName); + var configuration = ClientOptions.GetClientConfiguration(CurrentTenant, identityClientName); if (configuration == null) { Logger.LogWarning($"Could not find {nameof(IdentityClientConfiguration)} for {identityClientName}. Either define a configuration for {identityClientName} or set a default configuration."); @@ -114,17 +114,6 @@ namespace Volo.Abp.IdentityModel client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", accessToken); } - private IdentityClientConfiguration GetClientConfiguration(string identityClientName = null) - { - if (identityClientName.IsNullOrEmpty()) - { - return ClientOptions.IdentityClients.Default; - } - - return ClientOptions.IdentityClients.GetOrDefault(identityClientName) ?? - ClientOptions.IdentityClients.Default; - } - protected virtual async Task GetTokenEndpoint(IdentityClientConfiguration configuration) { //TODO: Can use (configuration.Authority + /connect/token) directly? @@ -205,6 +194,7 @@ namespace Volo.Abp.IdentityModel UserName = configuration.UserName, Password = configuration.UserPassword }; + IdentityModelHttpRequestMessageOptions.ConfigureHttpRequestMessage?.Invoke(request); AddParametersToRequestAsync(configuration, request); diff --git a/framework/src/Volo.Abp.Json/Volo/Abp/Json/SystemTextJson/AbpSystemTextJsonSerializerOptionsSetup.cs b/framework/src/Volo.Abp.Json/Volo/Abp/Json/SystemTextJson/AbpSystemTextJsonSerializerOptionsSetup.cs index 8f28f20cc4..3c6357c92e 100644 --- a/framework/src/Volo.Abp.Json/Volo/Abp/Json/SystemTextJson/AbpSystemTextJsonSerializerOptionsSetup.cs +++ b/framework/src/Volo.Abp.Json/Volo/Abp/Json/SystemTextJson/AbpSystemTextJsonSerializerOptionsSetup.cs @@ -29,10 +29,6 @@ namespace Volo.Abp.Json.SystemTextJson // If the user hasn't explicitly configured the encoder, use the less strict encoder that does not encode all non-ASCII characters. options.JsonSerializerOptions.Encoder ??= JavaScriptEncoder.UnsafeRelaxedJsonEscaping; - - // Remove after this PR. - // https://github.com/dotnet/runtime/pull/57525 - options.JsonSerializerOptions.NumberHandling = JsonNumberHandling.AllowReadingFromString; } } } diff --git a/framework/src/Volo.Abp.Swashbuckle/Volo.Abp.Swashbuckle.csproj b/framework/src/Volo.Abp.Swashbuckle/Volo.Abp.Swashbuckle.csproj index 6b87fe3751..79970678d3 100644 --- a/framework/src/Volo.Abp.Swashbuckle/Volo.Abp.Swashbuckle.csproj +++ b/framework/src/Volo.Abp.Swashbuckle/Volo.Abp.Swashbuckle.csproj @@ -20,7 +20,6 @@ - diff --git a/framework/src/Volo.Abp.Swashbuckle/Volo/Abp/Swashbuckle/AbpSwashbuckleModule.cs b/framework/src/Volo.Abp.Swashbuckle/Volo/Abp/Swashbuckle/AbpSwashbuckleModule.cs index 9bfdeead10..c8ee0737c8 100644 --- a/framework/src/Volo.Abp.Swashbuckle/Volo/Abp/Swashbuckle/AbpSwashbuckleModule.cs +++ b/framework/src/Volo.Abp.Swashbuckle/Volo/Abp/Swashbuckle/AbpSwashbuckleModule.cs @@ -1,21 +1,12 @@ -using System.Linq; -using Microsoft.AspNetCore.Mvc.ApplicationParts; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.DependencyInjection.Extensions; -using Microsoft.Extensions.Options; -using Volo.Abp.AspNetCore.Mvc; -using Volo.Abp.AspNetCore.Mvc.Conventions; -using Volo.Abp.Http.Client; +using Volo.Abp.AspNetCore.Mvc; using Volo.Abp.Modularity; -using Volo.Abp.Swashbuckle.Conventions; using Volo.Abp.VirtualFileSystem; namespace Volo.Abp.Swashbuckle { [DependsOn( typeof(AbpVirtualFileSystemModule), - typeof(AbpAspNetCoreMvcModule), - typeof(AbpHttpClientModule))] + typeof(AbpAspNetCoreMvcModule))] public class AbpSwashbuckleModule : AbpModule { public override void ConfigureServices(ServiceConfigurationContext context) @@ -24,35 +15,6 @@ namespace Volo.Abp.Swashbuckle { options.FileSets.AddEmbedded(); }); - - var swaggerConventionOptions = context.Services.ExecutePreConfiguredActions(); - if (swaggerConventionOptions.IsEnabled) - { - context.Services.Replace(ServiceDescriptor.Transient()); - context.Services.AddTransient(); - - var partManager = context.Services.GetSingletonInstance(); - partManager.FeatureProviders.Add(new AbpSwaggerClientProxyControllerFeatureProvider()); - } - } - - public override void OnApplicationInitialization(ApplicationInitializationContext context) - { - var swaggerConventionOptions = context.ServiceProvider.GetRequiredService>().Value; - if (swaggerConventionOptions.IsEnabled) - { - var partManager = context.ServiceProvider.GetRequiredService(); - foreach (var moduleAssembly in context - .ServiceProvider - .GetRequiredService() - .Modules - .Select(m => m.Type.Assembly) - .Where(a => a.GetTypes().Any(AbpSwaggerClientProxyHelper.IsClientProxyService)) - .Distinct()) - { - partManager.ApplicationParts.AddIfNotContains(moduleAssembly); - } - } } } } diff --git a/framework/src/Volo.Abp.Swashbuckle/Volo/Abp/Swashbuckle/Conventions/AbpSwaggerClientProxyControllerFeatureProvider.cs b/framework/src/Volo.Abp.Swashbuckle/Volo/Abp/Swashbuckle/Conventions/AbpSwaggerClientProxyControllerFeatureProvider.cs deleted file mode 100644 index 341f38a7dc..0000000000 --- a/framework/src/Volo.Abp.Swashbuckle/Volo/Abp/Swashbuckle/Conventions/AbpSwaggerClientProxyControllerFeatureProvider.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System.Reflection; -using Microsoft.AspNetCore.Mvc.Controllers; - -namespace Volo.Abp.Swashbuckle.Conventions -{ - public class AbpSwaggerClientProxyControllerFeatureProvider : ControllerFeatureProvider - { - protected override bool IsController(TypeInfo typeInfo) - { - return AbpSwaggerClientProxyHelper.IsClientProxyService(typeInfo); - } - } -} diff --git a/framework/src/Volo.Abp.Swashbuckle/Volo/Abp/Swashbuckle/Conventions/AbpSwaggerClientProxyOptions.cs b/framework/src/Volo.Abp.Swashbuckle/Volo/Abp/Swashbuckle/Conventions/AbpSwaggerClientProxyOptions.cs deleted file mode 100644 index 81977c3478..0000000000 --- a/framework/src/Volo.Abp.Swashbuckle/Volo/Abp/Swashbuckle/Conventions/AbpSwaggerClientProxyOptions.cs +++ /dev/null @@ -1,12 +0,0 @@ -namespace Volo.Abp.Swashbuckle.Conventions -{ - public class AbpSwaggerClientProxyOptions - { - public bool IsEnabled { get; set; } - - public AbpSwaggerClientProxyOptions() - { - IsEnabled = true; - } - } -} diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/AbpAspNetCoreMvcTestModule.cs b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/AbpAspNetCoreMvcTestModule.cs index fc84b9c496..0b84b00f7d 100644 --- a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/AbpAspNetCoreMvcTestModule.cs +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/AbpAspNetCoreMvcTestModule.cs @@ -11,6 +11,7 @@ using Volo.Abp.AspNetCore.Mvc.Localization; using Volo.Abp.AspNetCore.Mvc.Localization.Resource; using Volo.Abp.AspNetCore.Security.Claims; using Volo.Abp.AspNetCore.TestBase; +using Volo.Abp.Authorization; using Volo.Abp.Autofac; using Volo.Abp.GlobalFeatures; using Volo.Abp.Localization; @@ -65,6 +66,16 @@ namespace Volo.Abp.AspNetCore.Mvc { policy.RequireClaim("MyCustomClaimType", "42"); }); + + options.AddPolicy("TestPermission1_And_TestPermission2", policy => + { + policy.Requirements.Add(new PermissionsRequirement(new []{"TestPermission1", "TestPermission2"}, requiresAll: true)); + }); + + options.AddPolicy("TestPermission1_Or_TestPermission2", policy => + { + policy.Requirements.Add(new PermissionsRequirement(new []{"TestPermission1", "TestPermission2"}, requiresAll: false)); + }); }); Configure(options => diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Authorization/AuthTestController.cs b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Authorization/AuthTestController.cs index a66fcdc644..a0cd07a728 100644 --- a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Authorization/AuthTestController.cs +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Authorization/AuthTestController.cs @@ -38,5 +38,19 @@ namespace Volo.Abp.AspNetCore.Mvc.Authorization CurrentUser.Id.ShouldBe(FakeUserId); return Content("OK"); } + + [Authorize("TestPermission1_And_TestPermission2")] + public ActionResult Custom_And_PolicyTest() + { + CurrentUser.Id.ShouldBe(FakeUserId); + return Content("OK"); + } + + [Authorize("TestPermission1_Or_TestPermission2")] + public ActionResult Custom_Or_PolicyTest() + { + CurrentUser.Id.ShouldBe(FakeUserId); + return Content("OK"); + } } } diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Authorization/AuthTestController_Tests.cs b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Authorization/AuthTestController_Tests.cs index 3129ccf55d..8790620e04 100644 --- a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Authorization/AuthTestController_Tests.cs +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Authorization/AuthTestController_Tests.cs @@ -1,5 +1,4 @@ -using System; -using System.Net; +using System.Net; using System.Security.Claims; using System.Threading.Tasks; using Shouldly; @@ -72,5 +71,29 @@ namespace Volo.Abp.AspNetCore.Mvc.Authorization var result = await GetResponseAsStringAsync("/AuthTest/PermissionTest"); result.ShouldBe("OK"); } + + [Fact] + public async Task Custom_And_Policy_Should_Not_Work_When_Permissions_Not_Granted() + { + _fakeRequiredService.Claims.AddRange(new[] + { + new Claim(AbpClaimTypes.UserId, AuthTestController.FakeUserId.ToString()) + }); + + var response = await GetResponseAsync("/AuthTest/Custom_And_PolicyTest", HttpStatusCode.Forbidden, xmlHttpRequest: true); + response.StatusCode.ShouldBe(HttpStatusCode.Forbidden); + } + + [Fact] + public async Task Custom_Or_Policy_Should_Work_When_Permissions_Are_Granted() + { + _fakeRequiredService.Claims.AddRange(new[] + { + new Claim(AbpClaimTypes.UserId, AuthTestController.FakeUserId.ToString()) + }); + + var result = await GetResponseAsStringAsync("/AuthTest/Custom_Or_PolicyTest"); + result.ShouldBe("OK"); + } } } diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Authorization/TestPermissionDefinitionProvider.cs b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Authorization/TestPermissionDefinitionProvider.cs index ca2f627f0c..8472013268 100644 --- a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Authorization/TestPermissionDefinitionProvider.cs +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Authorization/TestPermissionDefinitionProvider.cs @@ -9,6 +9,7 @@ namespace Volo.Abp.AspNetCore.Mvc.Authorization var testGroup = context.AddGroup("TestGroup"); testGroup.AddPermission("TestPermission1"); + testGroup.AddPermission("TestPermission2"); } } } diff --git a/framework/test/Volo.Abp.AspNetCore.Tests/Volo/Abp/AspNetCore/AbpAspNetCoreTestBase.cs b/framework/test/Volo.Abp.AspNetCore.Tests/Volo/Abp/AspNetCore/AbpAspNetCoreTestBase.cs index 3c5571f115..cee7cd8b2d 100644 --- a/framework/test/Volo.Abp.AspNetCore.Tests/Volo/Abp/AspNetCore/AbpAspNetCoreTestBase.cs +++ b/framework/test/Volo.Abp.AspNetCore.Tests/Volo/Abp/AspNetCore/AbpAspNetCoreTestBase.cs @@ -3,6 +3,7 @@ using System.Net; using System.Net.Http; using System.Text.Json; using System.Threading.Tasks; +using Microsoft.Net.Http.Headers; using Shouldly; using Volo.Abp.AspNetCore.TestBase; @@ -30,11 +31,15 @@ namespace Volo.Abp.AspNetCore } } - protected virtual async Task GetResponseAsync(string url, HttpStatusCode expectedStatusCode = HttpStatusCode.OK) + protected virtual async Task GetResponseAsync(string url, HttpStatusCode expectedStatusCode = HttpStatusCode.OK, bool xmlHttpRequest = false) { using (var requestMessage = new HttpRequestMessage(HttpMethod.Get, url)) { requestMessage.Headers.Add("Accept-Language", CultureInfo.CurrentUICulture.Name); + if (xmlHttpRequest) + { + requestMessage.Headers.Add(HeaderNames.XRequestedWith, "XMLHttpRequest"); + } var response = await Client.SendAsync(requestMessage); response.StatusCode.ShouldBe(expectedStatusCode); return response; diff --git a/framework/test/Volo.Abp.Auditing.Tests/Volo/Abp/Auditing/AbpAuditingTestModule.cs b/framework/test/Volo.Abp.Auditing.Tests/Volo/Abp/Auditing/AbpAuditingTestModule.cs index ad7b62902d..41d35ebadc 100644 --- a/framework/test/Volo.Abp.Auditing.Tests/Volo/Abp/Auditing/AbpAuditingTestModule.cs +++ b/framework/test/Volo.Abp.Auditing.Tests/Volo/Abp/Auditing/AbpAuditingTestModule.cs @@ -43,6 +43,12 @@ namespace Volo.Abp.Auditing "AppEntityWithSelector", type => type == typeof(AppEntityWithSelector)) ); + + options.EntityHistorySelectors.Add( + new NamedTypeSelector( + "AppEntityWithSoftDelete", + type => type == typeof(AppEntityWithSoftDelete)) + ); }); context.Services.AddType(); @@ -62,4 +68,4 @@ namespace Volo.Abp.Auditing return connection; } } -} \ No newline at end of file +} diff --git a/framework/test/Volo.Abp.Auditing.Tests/Volo/Abp/Auditing/App/Entities/AppEntityWithSoftDelete.cs b/framework/test/Volo.Abp.Auditing.Tests/Volo/Abp/Auditing/App/Entities/AppEntityWithSoftDelete.cs new file mode 100644 index 0000000000..0a81bb7f37 --- /dev/null +++ b/framework/test/Volo.Abp.Auditing.Tests/Volo/Abp/Auditing/App/Entities/AppEntityWithSoftDelete.cs @@ -0,0 +1,20 @@ +using System; +using Volo.Abp.Domain.Entities; + +namespace Volo.Abp.Auditing.App.Entities +{ + public class AppEntityWithSoftDelete : AggregateRoot, IHasDeletionTime + { + public AppEntityWithSoftDelete(Guid id, string name) + : base(id) + { + Name = name; + } + + public string Name { get; set; } + + public bool IsDeleted { get; set; } + + public DateTime? DeletionTime { get; set; } + } +} diff --git a/framework/test/Volo.Abp.Auditing.Tests/Volo/Abp/Auditing/App/EntityFrameworkCore/AbpAuditingTestDbContext.cs b/framework/test/Volo.Abp.Auditing.Tests/Volo/Abp/Auditing/App/EntityFrameworkCore/AbpAuditingTestDbContext.cs index d6b2d2b167..0cc69b68b6 100644 --- a/framework/test/Volo.Abp.Auditing.Tests/Volo/Abp/Auditing/App/EntityFrameworkCore/AbpAuditingTestDbContext.cs +++ b/framework/test/Volo.Abp.Auditing.Tests/Volo/Abp/Auditing/App/EntityFrameworkCore/AbpAuditingTestDbContext.cs @@ -17,15 +17,17 @@ namespace Volo.Abp.Auditing.App.EntityFrameworkCore public DbSet AppEntityWithPropertyHasAudited { get; set; } public DbSet AppEntityWithSelector { get; set; } - + public DbSet AppFullAuditedEntityWithAudited { get; set; } - + public DbSet AppEntityWithAuditedAndHasCustomAuditingProperties { get; set; } + public DbSet AppEntityWithSoftDelete { get; set; } + public AbpAuditingTestDbContext(DbContextOptions options) : base(options) { } } -} \ No newline at end of file +} diff --git a/framework/test/Volo.Abp.Auditing.Tests/Volo/Abp/Auditing/Auditing_Tests.cs b/framework/test/Volo.Abp.Auditing.Tests/Volo/Abp/Auditing/Auditing_Tests.cs index e72f67bbc3..e7fe5df8b4 100644 --- a/framework/test/Volo.Abp.Auditing.Tests/Volo/Abp/Auditing/Auditing_Tests.cs +++ b/framework/test/Volo.Abp.Auditing.Tests/Volo/Abp/Auditing/Auditing_Tests.cs @@ -314,5 +314,27 @@ namespace Volo.Abp.Auditing && x.EntityChanges[0].PropertyChanges[0].PropertyName == nameof(AppEntityWithAudited.Name))); #pragma warning restore 4014 } + + + [Fact] + public virtual async Task Should_Write_AuditLog_For_Soft_Deleted_Entity() + { + var entity = new AppEntityWithSoftDelete(Guid.NewGuid(), "test name"); + var repository = ServiceProvider.GetRequiredService>(); + await repository.InsertAsync(entity); + + using (var scope = _auditingManager.BeginScope()) + { + await repository.DeleteAsync(entity.Id); + await scope.SaveAsync(); + } + +#pragma warning disable 4014 + _auditingStore.Received().SaveAsync(Arg.Is(x => x.EntityChanges.Count == 1 && + x.EntityChanges[0].ChangeType == EntityChangeType.Deleted && + x.EntityChanges[0].PropertyChanges.Count == 0)); +#pragma warning restore 4014 + + } } } diff --git a/framework/test/Volo.Abp.Cli.Core.Tests/Volo/Abp/Cli/ProjectNameValidation_Tests.cs b/framework/test/Volo.Abp.Cli.Core.Tests/Volo/Abp/Cli/ProjectNameValidation_Tests.cs index 85d9fcc2b7..a1557e68ce 100644 --- a/framework/test/Volo.Abp.Cli.Core.Tests/Volo/Abp/Cli/ProjectNameValidation_Tests.cs +++ b/framework/test/Volo.Abp.Cli.Core.Tests/Volo/Abp/Cli/ProjectNameValidation_Tests.cs @@ -51,13 +51,16 @@ namespace Volo.Abp.Cli { var illegalKeywords = new[] { - "Blazor" + "Blazor" }; foreach (var illegalKeyword in illegalKeywords) { var args = new CommandLineArgs("new", illegalKeyword); await _newCommand.ExecuteAsync(args).ShouldThrowAsync(); + + args = new CommandLineArgs("new", "Acme." + illegalKeyword); + await _newCommand.ExecuteAsync(args).ShouldThrowAsync(); } } diff --git a/framework/test/Volo.Abp.IdentityModel.Tests/Volo.Abp.IdentityModel.Tests.csproj b/framework/test/Volo.Abp.IdentityModel.Tests/Volo.Abp.IdentityModel.Tests.csproj new file mode 100644 index 0000000000..dd7ba0d439 --- /dev/null +++ b/framework/test/Volo.Abp.IdentityModel.Tests/Volo.Abp.IdentityModel.Tests.csproj @@ -0,0 +1,24 @@ + + + + + + net6.0 + + + + + + + + + + + + + + Always + + + + diff --git a/framework/test/Volo.Abp.IdentityModel.Tests/Volo/Abp/IdentityModel/AbpIdentityClientOptions_Tests.cs b/framework/test/Volo.Abp.IdentityModel.Tests/Volo/Abp/IdentityModel/AbpIdentityClientOptions_Tests.cs new file mode 100644 index 0000000000..1f36ab32f6 --- /dev/null +++ b/framework/test/Volo.Abp.IdentityModel.Tests/Volo/Abp/IdentityModel/AbpIdentityClientOptions_Tests.cs @@ -0,0 +1,51 @@ +using System; +using Microsoft.Extensions.Options; +using Shouldly; +using Volo.Abp.MultiTenancy; +using Xunit; + +namespace Volo.Abp.IdentityModel +{ + public class AbpIdentityClientOptions_Tests : AbpIdentityModelTestBase + { + private readonly ICurrentTenant _currentTenant; + private readonly AbpIdentityClientOptions _identityClientOptions; + + public AbpIdentityClientOptions_Tests() + { + _currentTenant = GetRequiredService(); + _identityClientOptions = GetRequiredService>().Value; + } + + [Fact] + public void GetClientConfiguration_Test() + { + var hostDefaultConfiguration = _identityClientOptions.GetClientConfiguration(_currentTenant); + hostDefaultConfiguration.UserName.ShouldBe("host_default_admin"); + + var hostIdentityConfiguration = _identityClientOptions.GetClientConfiguration(_currentTenant, "Identity"); + hostIdentityConfiguration.UserName.ShouldBe("host_identity_admin"); + + using (_currentTenant.Change(Guid.Parse("f72a344f-651e-49f0-85f6-be260a10e4df"), "Test_Tenant1")) + { + var tenantDefaultConfiguration = _identityClientOptions.GetClientConfiguration(_currentTenant); + tenantDefaultConfiguration.UserName.ShouldBe("tenant_default_admin"); + } + + using (_currentTenant.Change(Guid.Parse("f72a344f-651e-49f0-85f6-be260a10e4df"))) + { + var tenantIdentityConfiguration = _identityClientOptions.GetClientConfiguration(_currentTenant, "Identity"); + tenantIdentityConfiguration.UserName.ShouldBe("tenant_identity_admin"); + } + + using (_currentTenant.Change(Guid.NewGuid())) + { + var configuration = _identityClientOptions.GetClientConfiguration(_currentTenant); + configuration.UserName.ShouldBe("host_default_admin"); + + configuration = _identityClientOptions.GetClientConfiguration(_currentTenant, "Identity"); + configuration.UserName.ShouldBe("host_identity_admin"); + } + } + } +} diff --git a/framework/test/Volo.Abp.IdentityModel.Tests/Volo/Abp/IdentityModel/AbpIdentityModelTestBase.cs b/framework/test/Volo.Abp.IdentityModel.Tests/Volo/Abp/IdentityModel/AbpIdentityModelTestBase.cs new file mode 100644 index 0000000000..80ee47ae37 --- /dev/null +++ b/framework/test/Volo.Abp.IdentityModel.Tests/Volo/Abp/IdentityModel/AbpIdentityModelTestBase.cs @@ -0,0 +1,12 @@ +using Volo.Abp.Testing; + +namespace Volo.Abp.IdentityModel +{ + public abstract class AbpIdentityModelTestBase : AbpIntegratedTest + { + protected override void SetAbpApplicationCreationOptions(AbpApplicationCreationOptions options) + { + options.UseAutofac(); + } + } +} diff --git a/framework/test/Volo.Abp.IdentityModel.Tests/Volo/Abp/IdentityModel/AbpIdentityModelTestModule.cs b/framework/test/Volo.Abp.IdentityModel.Tests/Volo/Abp/IdentityModel/AbpIdentityModelTestModule.cs new file mode 100644 index 0000000000..2a17244e42 --- /dev/null +++ b/framework/test/Volo.Abp.IdentityModel.Tests/Volo/Abp/IdentityModel/AbpIdentityModelTestModule.cs @@ -0,0 +1,10 @@ +using Volo.Abp.Modularity; + +namespace Volo.Abp.IdentityModel +{ + [DependsOn(typeof(AbpIdentityModelModule))] + public class AbpIdentityModelTestModule : AbpModule + { + + } +} diff --git a/framework/test/Volo.Abp.IdentityModel.Tests/appsettings.json b/framework/test/Volo.Abp.IdentityModel.Tests/appsettings.json new file mode 100644 index 0000000000..f4d01ff407 --- /dev/null +++ b/framework/test/Volo.Abp.IdentityModel.Tests/appsettings.json @@ -0,0 +1,40 @@ +{ + "IdentityClients": { + "Default": { + "GrantType": "password", + "ClientId": "Test_App", + "ClientSecret": "1q2w3e*", + "UserName": "host_default_admin", + "UserPassword": "1q2w3E*", + "Authority": "https://localhost:44395", + "Scope": "Test_Scope" + }, + "Default.Test_Tenant1": { + "GrantType": "password", + "ClientId": "Test_App", + "ClientSecret": "1q2w3e*", + "UserName": "tenant_default_admin", + "UserPassword": "1q2w3E*", + "Authority": "https://localhost:44395", + "Scope": "Test_Scope" + }, + "Identity": { + "GrantType": "password", + "ClientId": "Test_App", + "ClientSecret": "1q2w3e*", + "UserName": "host_identity_admin", + "UserPassword": "1q2w3E*", + "Authority": "https://localhost:44395", + "Scope": "Test_Scope" + }, + "Identity.f72a344f-651e-49f0-85f6-be260a10e4df": { + "GrantType": "password", + "ClientId": "Test_App", + "ClientSecret": "1q2w3e*", + "UserName": "tenant_identity_admin", + "UserPassword": "1q2w3E*", + "Authority": "https://localhost:44395", + "Scope": "Test_Scope" + } + } +} diff --git a/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Testing/HardDelete_Tests.cs b/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Testing/HardDelete_Tests.cs index e31b64f6e4..a2085a9a67 100644 --- a/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Testing/HardDelete_Tests.cs +++ b/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Testing/HardDelete_Tests.cs @@ -54,6 +54,19 @@ namespace Volo.Abp.TestApp.Testing } } + [Fact] + public async Task Should_HardDelete_Entities_With_IEnumerable() + { + using (DataFilter.Disable()) + { + var persons = await PersonRepository.GetListAsync(); + await PersonRepository.HardDeleteAsync(persons); + + var personCount = await PersonRepository.GetCountAsync(); + personCount.ShouldBe(0); + } + } + [Fact] public async Task Should_HardDelete_Soft_Deleted_Entities() { diff --git a/modules/account/src/Volo.Abp.Account.HttpApi.Client/ClientProxies/AccountClientProxy.Generated.cs b/modules/account/src/Volo.Abp.Account.HttpApi.Client/ClientProxies/AccountClientProxy.Generated.cs index ea103705bf..54a353cdf8 100644 --- a/modules/account/src/Volo.Abp.Account.HttpApi.Client/ClientProxies/AccountClientProxy.Generated.cs +++ b/modules/account/src/Volo.Abp.Account.HttpApi.Client/ClientProxies/AccountClientProxy.Generated.cs @@ -18,17 +18,26 @@ namespace Volo.Abp.Account.ClientProxies { public virtual async Task RegisterAsync(RegisterDto input) { - return await RequestAsync(nameof(RegisterAsync), input); + return await RequestAsync(nameof(RegisterAsync), new ClientProxyRequestTypeValue + { + { typeof(RegisterDto), input } + }); } public virtual async Task SendPasswordResetCodeAsync(SendPasswordResetCodeDto input) { - await RequestAsync(nameof(SendPasswordResetCodeAsync), input); + await RequestAsync(nameof(SendPasswordResetCodeAsync), new ClientProxyRequestTypeValue + { + { typeof(SendPasswordResetCodeDto), input } + }); } public virtual async Task ResetPasswordAsync(ResetPasswordDto input) { - await RequestAsync(nameof(ResetPasswordAsync), input); + await RequestAsync(nameof(ResetPasswordAsync), new ClientProxyRequestTypeValue + { + { typeof(ResetPasswordDto), input } + }); } } } diff --git a/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Components/ProfileManagementGroup/Password/AccountProfilePasswordManagementGroupViewComponent.cs b/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Components/ProfileManagementGroup/Password/AccountProfilePasswordManagementGroupViewComponent.cs index 7a0df6878b..8bacadfb4a 100644 --- a/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Components/ProfileManagementGroup/Password/AccountProfilePasswordManagementGroupViewComponent.cs +++ b/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Components/ProfileManagementGroup/Password/AccountProfilePasswordManagementGroupViewComponent.cs @@ -2,6 +2,7 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Volo.Abp.AspNetCore.Mvc; +using Volo.Abp.AspNetCore.Mvc.UI.Widgets; using Volo.Abp.Auditing; using Volo.Abp.Identity; using Volo.Abp.Validation; diff --git a/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Components/ProfileManagementGroup/PersonalInfo/AccountProfilePersonalInfoManagementGroupViewComponent.cs b/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Components/ProfileManagementGroup/PersonalInfo/AccountProfilePersonalInfoManagementGroupViewComponent.cs index 7b86f8f3fd..c9fb2b660e 100644 --- a/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Components/ProfileManagementGroup/PersonalInfo/AccountProfilePersonalInfoManagementGroupViewComponent.cs +++ b/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Components/ProfileManagementGroup/PersonalInfo/AccountProfilePersonalInfoManagementGroupViewComponent.cs @@ -2,6 +2,7 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Volo.Abp.AspNetCore.Mvc; +using Volo.Abp.AspNetCore.Mvc.UI.Widgets; using Volo.Abp.Domain.Entities; using Volo.Abp.Identity; using Volo.Abp.Validation; diff --git a/modules/audit-logging/src/Volo.Abp.AuditLogging.EntityFrameworkCore/Volo/Abp/AuditLogging/EntityFrameworkCore/AbpAuditLoggingDbContextModelBuilderExtensions.cs b/modules/audit-logging/src/Volo.Abp.AuditLogging.EntityFrameworkCore/Volo/Abp/AuditLogging/EntityFrameworkCore/AbpAuditLoggingDbContextModelBuilderExtensions.cs index 51c30ef0a1..37abf469ef 100644 --- a/modules/audit-logging/src/Volo.Abp.AuditLogging.EntityFrameworkCore/Volo/Abp/AuditLogging/EntityFrameworkCore/AbpAuditLoggingDbContextModelBuilderExtensions.cs +++ b/modules/audit-logging/src/Volo.Abp.AuditLogging.EntityFrameworkCore/Volo/Abp/AuditLogging/EntityFrameworkCore/AbpAuditLoggingDbContextModelBuilderExtensions.cs @@ -1,29 +1,19 @@ -using System; -using JetBrains.Annotations; +using JetBrains.Annotations; using Microsoft.EntityFrameworkCore; using Volo.Abp.EntityFrameworkCore.Modeling; -using Volo.Abp.Identity.EntityFrameworkCore; namespace Volo.Abp.AuditLogging.EntityFrameworkCore { public static class AbpAuditLoggingDbContextModelBuilderExtensions { public static void ConfigureAuditLogging( - [NotNull] this ModelBuilder builder, - Action optionsAction = null) + [NotNull] this ModelBuilder builder) { Check.NotNull(builder, nameof(builder)); - var options = new AbpAuditLoggingModelBuilderConfigurationOptions( - AbpAuditLoggingDbProperties.DbTablePrefix, - AbpAuditLoggingDbProperties.DbSchema - ); - - optionsAction?.Invoke(options); - builder.Entity(b => { - b.ToTable(options.TablePrefix + "AuditLogs", options.Schema); + b.ToTable(AbpAuditLoggingDbProperties.DbTablePrefix + "AuditLogs", AbpAuditLoggingDbProperties.DbSchema); b.ConfigureByConvention(); @@ -56,7 +46,7 @@ namespace Volo.Abp.AuditLogging.EntityFrameworkCore builder.Entity(b => { - b.ToTable(options.TablePrefix + "AuditLogActions", options.Schema); + b.ToTable(AbpAuditLoggingDbProperties.DbTablePrefix + "AuditLogActions", AbpAuditLoggingDbProperties.DbSchema); b.ConfigureByConvention(); @@ -75,7 +65,7 @@ namespace Volo.Abp.AuditLogging.EntityFrameworkCore builder.Entity(b => { - b.ToTable(options.TablePrefix + "EntityChanges", options.Schema); + b.ToTable(AbpAuditLoggingDbProperties.DbTablePrefix + "EntityChanges", AbpAuditLoggingDbProperties.DbSchema); b.ConfigureByConvention(); @@ -96,7 +86,7 @@ namespace Volo.Abp.AuditLogging.EntityFrameworkCore builder.Entity(b => { - b.ToTable(options.TablePrefix + "EntityPropertyChanges", options.Schema); + b.ToTable(AbpAuditLoggingDbProperties.DbTablePrefix + "EntityPropertyChanges", AbpAuditLoggingDbProperties.DbSchema); b.ConfigureByConvention(); diff --git a/modules/audit-logging/src/Volo.Abp.AuditLogging.EntityFrameworkCore/Volo/Abp/AuditLogging/EntityFrameworkCore/AbpAuditLoggingModelBuilderConfigurationOptions.cs b/modules/audit-logging/src/Volo.Abp.AuditLogging.EntityFrameworkCore/Volo/Abp/AuditLogging/EntityFrameworkCore/AbpAuditLoggingModelBuilderConfigurationOptions.cs deleted file mode 100644 index 404ce00d0b..0000000000 --- a/modules/audit-logging/src/Volo.Abp.AuditLogging.EntityFrameworkCore/Volo/Abp/AuditLogging/EntityFrameworkCore/AbpAuditLoggingModelBuilderConfigurationOptions.cs +++ /dev/null @@ -1,18 +0,0 @@ -using JetBrains.Annotations; -using Volo.Abp.EntityFrameworkCore.Modeling; - -namespace Volo.Abp.Identity.EntityFrameworkCore -{ - public class AbpAuditLoggingModelBuilderConfigurationOptions : AbpModelBuilderConfigurationOptions - { - public AbpAuditLoggingModelBuilderConfigurationOptions( - [NotNull] string tablePrefix, - [CanBeNull] string schema) - : base( - tablePrefix, - schema) - { - - } - } -} \ No newline at end of file diff --git a/modules/audit-logging/src/Volo.Abp.AuditLogging.MongoDB/Volo/Abp/AuditLogging/MongoDB/AbpAuditLoggingMongoDbContextExtensions.cs b/modules/audit-logging/src/Volo.Abp.AuditLogging.MongoDB/Volo/Abp/AuditLogging/MongoDB/AbpAuditLoggingMongoDbContextExtensions.cs index 40411691cb..48b60107ff 100644 --- a/modules/audit-logging/src/Volo.Abp.AuditLogging.MongoDB/Volo/Abp/AuditLogging/MongoDB/AbpAuditLoggingMongoDbContextExtensions.cs +++ b/modules/audit-logging/src/Volo.Abp.AuditLogging.MongoDB/Volo/Abp/AuditLogging/MongoDB/AbpAuditLoggingMongoDbContextExtensions.cs @@ -1,25 +1,17 @@ -using System; -using Volo.Abp.MongoDB; +using Volo.Abp.MongoDB; namespace Volo.Abp.AuditLogging.MongoDB { public static class AbpAuditLoggingMongoDbContextExtensions { public static void ConfigureAuditLogging( - this IMongoModelBuilder builder, - Action optionsAction = null) + this IMongoModelBuilder builder) { Check.NotNull(builder, nameof(builder)); - var options = new AuditLoggingMongoModelBuilderConfigurationOptions( - AbpAuditLoggingDbProperties.DbTablePrefix - ); - - optionsAction?.Invoke(options); - builder.Entity(b => { - b.CollectionName = options.CollectionPrefix + "AuditLogs"; + b.CollectionName = AbpAuditLoggingDbProperties.DbTablePrefix + "AuditLogs"; }); } } diff --git a/modules/audit-logging/src/Volo.Abp.AuditLogging.MongoDB/Volo/Abp/AuditLogging/MongoDB/AuditLoggingMongoModelBuilderConfigurationOptions.cs b/modules/audit-logging/src/Volo.Abp.AuditLogging.MongoDB/Volo/Abp/AuditLogging/MongoDB/AuditLoggingMongoModelBuilderConfigurationOptions.cs deleted file mode 100644 index 553ba4d01c..0000000000 --- a/modules/audit-logging/src/Volo.Abp.AuditLogging.MongoDB/Volo/Abp/AuditLogging/MongoDB/AuditLoggingMongoModelBuilderConfigurationOptions.cs +++ /dev/null @@ -1,14 +0,0 @@ -using JetBrains.Annotations; -using Volo.Abp.MongoDB; - -namespace Volo.Abp.AuditLogging.MongoDB -{ - public class AuditLoggingMongoModelBuilderConfigurationOptions : AbpMongoModelBuilderConfigurationOptions - { - public AuditLoggingMongoModelBuilderConfigurationOptions( - [NotNull] string collectionPrefix = "") - : base(collectionPrefix) - { - } - } -} diff --git a/modules/background-jobs/src/Volo.Abp.BackgroundJobs.EntityFrameworkCore/Volo/Abp/BackgroundJobs/EntityFrameworkCore/BackgroundJobsDbContextModelCreatingExtensions.cs b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.EntityFrameworkCore/Volo/Abp/BackgroundJobs/EntityFrameworkCore/BackgroundJobsDbContextModelCreatingExtensions.cs index 76d39a77ae..1781c7067d 100644 --- a/modules/background-jobs/src/Volo.Abp.BackgroundJobs.EntityFrameworkCore/Volo/Abp/BackgroundJobs/EntityFrameworkCore/BackgroundJobsDbContextModelCreatingExtensions.cs +++ b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.EntityFrameworkCore/Volo/Abp/BackgroundJobs/EntityFrameworkCore/BackgroundJobsDbContextModelCreatingExtensions.cs @@ -7,8 +7,7 @@ namespace Volo.Abp.BackgroundJobs.EntityFrameworkCore public static class BackgroundJobsDbContextModelCreatingExtensions { public static void ConfigureBackgroundJobs( - this ModelBuilder builder, - Action optionsAction = null) + this ModelBuilder builder) { Check.NotNull(builder, nameof(builder)); @@ -17,16 +16,9 @@ namespace Volo.Abp.BackgroundJobs.EntityFrameworkCore return; } - var options = new BackgroundJobsModelBuilderConfigurationOptions( - BackgroundJobsDbProperties.DbTablePrefix, - BackgroundJobsDbProperties.DbSchema - ); - - optionsAction?.Invoke(options); - builder.Entity(b => { - b.ToTable(options.TablePrefix + "BackgroundJobs", options.Schema); + b.ToTable(BackgroundJobsDbProperties.DbTablePrefix + "BackgroundJobs", BackgroundJobsDbProperties.DbSchema); b.ConfigureByConvention(); diff --git a/modules/background-jobs/src/Volo.Abp.BackgroundJobs.EntityFrameworkCore/Volo/Abp/BackgroundJobs/EntityFrameworkCore/BackgroundJobsModelBuilderConfigurationOptions.cs b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.EntityFrameworkCore/Volo/Abp/BackgroundJobs/EntityFrameworkCore/BackgroundJobsModelBuilderConfigurationOptions.cs deleted file mode 100644 index 47734aa3a3..0000000000 --- a/modules/background-jobs/src/Volo.Abp.BackgroundJobs.EntityFrameworkCore/Volo/Abp/BackgroundJobs/EntityFrameworkCore/BackgroundJobsModelBuilderConfigurationOptions.cs +++ /dev/null @@ -1,18 +0,0 @@ -using JetBrains.Annotations; -using Volo.Abp.EntityFrameworkCore.Modeling; - -namespace Volo.Abp.BackgroundJobs.EntityFrameworkCore -{ - public class BackgroundJobsModelBuilderConfigurationOptions : AbpModelBuilderConfigurationOptions - { - public BackgroundJobsModelBuilderConfigurationOptions( - [NotNull] string tablePrefix = "", - [CanBeNull] string schema = null) - : base( - tablePrefix, - schema) - { - - } - } -} \ No newline at end of file diff --git a/modules/background-jobs/src/Volo.Abp.BackgroundJobs.MongoDB/Volo/Abp/BackgroundJobs/MongoDB/BackgroundJobsMongoDbContextExtensions.cs b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.MongoDB/Volo/Abp/BackgroundJobs/MongoDB/BackgroundJobsMongoDbContextExtensions.cs index 31291f2d9b..410218e5e6 100644 --- a/modules/background-jobs/src/Volo.Abp.BackgroundJobs.MongoDB/Volo/Abp/BackgroundJobs/MongoDB/BackgroundJobsMongoDbContextExtensions.cs +++ b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.MongoDB/Volo/Abp/BackgroundJobs/MongoDB/BackgroundJobsMongoDbContextExtensions.cs @@ -1,26 +1,18 @@ -using System; -using Volo.Abp.MongoDB; +using Volo.Abp.MongoDB; namespace Volo.Abp.BackgroundJobs.MongoDB { public static class BackgroundJobsMongoDbContextExtensions { public static void ConfigureBackgroundJobs( - this IMongoModelBuilder builder, - Action optionsAction = null) + this IMongoModelBuilder builder) { Check.NotNull(builder, nameof(builder)); - var options = new BackgroundJobsMongoModelBuilderConfigurationOptions( - BackgroundJobsDbProperties.DbTablePrefix - ); - - optionsAction?.Invoke(options); - builder.Entity(b => { - b.CollectionName = options.CollectionPrefix + "BackgroundJobs"; + b.CollectionName = BackgroundJobsDbProperties.DbTablePrefix + "BackgroundJobs"; }); } } -} \ No newline at end of file +} diff --git a/modules/background-jobs/src/Volo.Abp.BackgroundJobs.MongoDB/Volo/Abp/BackgroundJobs/MongoDB/BackgroundJobsMongoModelBuilderConfigurationOptions.cs b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.MongoDB/Volo/Abp/BackgroundJobs/MongoDB/BackgroundJobsMongoModelBuilderConfigurationOptions.cs deleted file mode 100644 index 7590fb0d12..0000000000 --- a/modules/background-jobs/src/Volo.Abp.BackgroundJobs.MongoDB/Volo/Abp/BackgroundJobs/MongoDB/BackgroundJobsMongoModelBuilderConfigurationOptions.cs +++ /dev/null @@ -1,14 +0,0 @@ -using JetBrains.Annotations; -using Volo.Abp.MongoDB; - -namespace Volo.Abp.BackgroundJobs.MongoDB -{ - public class BackgroundJobsMongoModelBuilderConfigurationOptions : AbpMongoModelBuilderConfigurationOptions - { - public BackgroundJobsMongoModelBuilderConfigurationOptions( - [NotNull] string collectionPrefix = "") - : base(collectionPrefix) - { - } - } -} \ No newline at end of file diff --git a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Dockerfile b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Dockerfile index 24db1701cb..2ee6a5a331 100644 --- a/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Dockerfile +++ b/modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Dockerfile @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/dotnet/aspnet:5.0-buster-slim AS base +FROM mcr.microsoft.com/dotnet/aspnet:6.0.0-rc.1-bullseye-slim AS base WORKDIR /app EXPOSE 80 COPY bin/Release/publish . diff --git a/modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.EntityFrameworkCore/Volo/Abp/BlobStoring/Database/EntityFrameworkCore/BlobStoringDbContextModelCreatingExtensions.cs b/modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.EntityFrameworkCore/Volo/Abp/BlobStoring/Database/EntityFrameworkCore/BlobStoringDbContextModelCreatingExtensions.cs index ddcaae7911..fe0e289fb1 100644 --- a/modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.EntityFrameworkCore/Volo/Abp/BlobStoring/Database/EntityFrameworkCore/BlobStoringDbContextModelCreatingExtensions.cs +++ b/modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.EntityFrameworkCore/Volo/Abp/BlobStoring/Database/EntityFrameworkCore/BlobStoringDbContextModelCreatingExtensions.cs @@ -1,5 +1,4 @@ using Microsoft.EntityFrameworkCore; -using System; using Volo.Abp.EntityFrameworkCore.Modeling; namespace Volo.Abp.BlobStoring.Database.EntityFrameworkCore @@ -7,21 +6,13 @@ namespace Volo.Abp.BlobStoring.Database.EntityFrameworkCore public static class BlobStoringDbContextModelCreatingExtensions { public static void ConfigureBlobStoring( - this ModelBuilder builder, - Action optionsAction = null) + this ModelBuilder builder) { Check.NotNull(builder, nameof(builder)); - var options = new BlobStoringModelBuilderConfigurationOptions( - BlobStoringDatabaseDbProperties.DbTablePrefix, - BlobStoringDatabaseDbProperties.DbSchema - ); - - optionsAction?.Invoke(options); - builder.Entity(b => { - b.ToTable(options.TablePrefix + "BlobContainers", options.Schema); + b.ToTable(BlobStoringDatabaseDbProperties.DbTablePrefix + "BlobContainers", BlobStoringDatabaseDbProperties.DbSchema); b.ConfigureByConvention(); @@ -36,7 +27,7 @@ namespace Volo.Abp.BlobStoring.Database.EntityFrameworkCore builder.Entity(b => { - b.ToTable(options.TablePrefix + "Blobs", options.Schema); + b.ToTable(BlobStoringDatabaseDbProperties.DbTablePrefix + "Blobs", BlobStoringDatabaseDbProperties.DbSchema); b.ConfigureByConvention(); diff --git a/modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.EntityFrameworkCore/Volo/Abp/BlobStoring/Database/EntityFrameworkCore/BlobStoringModelBuilderConfigurationOptions.cs b/modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.EntityFrameworkCore/Volo/Abp/BlobStoring/Database/EntityFrameworkCore/BlobStoringModelBuilderConfigurationOptions.cs deleted file mode 100644 index fce10576be..0000000000 --- a/modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.EntityFrameworkCore/Volo/Abp/BlobStoring/Database/EntityFrameworkCore/BlobStoringModelBuilderConfigurationOptions.cs +++ /dev/null @@ -1,18 +0,0 @@ -using JetBrains.Annotations; -using Volo.Abp.EntityFrameworkCore.Modeling; - -namespace Volo.Abp.BlobStoring.Database.EntityFrameworkCore -{ - public class BlobStoringModelBuilderConfigurationOptions : AbpModelBuilderConfigurationOptions - { - public BlobStoringModelBuilderConfigurationOptions( - [NotNull] string tablePrefix = "", - [CanBeNull] string schema = null) - : base( - tablePrefix, - schema) - { - - } - } -} \ No newline at end of file diff --git a/modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.MongoDB/Volo/Abp/BlobStoring/Database/MongoDB/BlobStoringMongoDbContextExtensions.cs b/modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.MongoDB/Volo/Abp/BlobStoring/Database/MongoDB/BlobStoringMongoDbContextExtensions.cs index f96f991bc9..cc5b6720b7 100644 --- a/modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.MongoDB/Volo/Abp/BlobStoring/Database/MongoDB/BlobStoringMongoDbContextExtensions.cs +++ b/modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.MongoDB/Volo/Abp/BlobStoring/Database/MongoDB/BlobStoringMongoDbContextExtensions.cs @@ -1,31 +1,23 @@ -using System; -using Volo.Abp.MongoDB; +using Volo.Abp.MongoDB; namespace Volo.Abp.BlobStoring.Database.MongoDB { public static class BlobStoringMongoDbContextExtensions { public static void ConfigureBlobStoring( - this IMongoModelBuilder builder, - Action optionsAction = null) + this IMongoModelBuilder builder) { Check.NotNull(builder, nameof(builder)); - var options = new BlobStoringMongoModelBuilderConfigurationOptions( - BlobStoringDatabaseDbProperties.DbTablePrefix - ); - - optionsAction?.Invoke(options); - builder.Entity(b => { - b.CollectionName = options.CollectionPrefix + "BlobContainers"; + b.CollectionName = BlobStoringDatabaseDbProperties.DbTablePrefix + "BlobContainers"; }); builder.Entity(b => { - b.CollectionName = options.CollectionPrefix + "Blobs"; + b.CollectionName = BlobStoringDatabaseDbProperties.DbTablePrefix + "Blobs"; }); } } -} \ No newline at end of file +} diff --git a/modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.MongoDB/Volo/Abp/BlobStoring/Database/MongoDB/BlobStoringMongoModelBuilderConfigurationOptions.cs b/modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.MongoDB/Volo/Abp/BlobStoring/Database/MongoDB/BlobStoringMongoModelBuilderConfigurationOptions.cs deleted file mode 100644 index f0f786e1dd..0000000000 --- a/modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.MongoDB/Volo/Abp/BlobStoring/Database/MongoDB/BlobStoringMongoModelBuilderConfigurationOptions.cs +++ /dev/null @@ -1,14 +0,0 @@ -using JetBrains.Annotations; -using Volo.Abp.MongoDB; - -namespace Volo.Abp.BlobStoring.Database.MongoDB -{ - public class BlobStoringMongoModelBuilderConfigurationOptions : AbpMongoModelBuilderConfigurationOptions - { - public BlobStoringMongoModelBuilderConfigurationOptions( - [NotNull] string collectionPrefix = "") - : base(collectionPrefix) - { - } - } -} \ No newline at end of file diff --git a/modules/blogging/app/Volo.BloggingTestApp/BloggingTestAppModule.cs b/modules/blogging/app/Volo.BloggingTestApp/BloggingTestAppModule.cs index 691abcd536..75ab3eec75 100644 --- a/modules/blogging/app/Volo.BloggingTestApp/BloggingTestAppModule.cs +++ b/modules/blogging/app/Volo.BloggingTestApp/BloggingTestAppModule.cs @@ -31,6 +31,7 @@ using Volo.Abp.Identity; using Volo.Abp.Identity.Web; using Volo.Abp.Modularity; using Volo.Abp.PermissionManagement; +using Volo.Abp.PermissionManagement.HttpApi; using Volo.Abp.PermissionManagement.Identity; using Volo.Abp.Threading; using Volo.Abp.UI; @@ -45,7 +46,9 @@ namespace Volo.BloggingTestApp [DependsOn( typeof(BloggingWebModule), typeof(BloggingApplicationModule), + typeof(BloggingHttpApiModule), typeof(BloggingAdminWebModule), + typeof(BloggingAdminHttpApiModule), typeof(BloggingAdminApplicationModule), #if MONGODB typeof(BloggingTestAppMongoDbModule), @@ -53,11 +56,14 @@ namespace Volo.BloggingTestApp typeof(BloggingTestAppEntityFrameworkCoreModule), #endif typeof(AbpAccountWebModule), + typeof(AbpAccountHttpApiModule), typeof(AbpAccountApplicationModule), typeof(AbpIdentityWebModule), + typeof(AbpIdentityHttpApiModule), typeof(AbpIdentityApplicationModule), typeof(AbpPermissionManagementDomainIdentityModule), typeof(AbpPermissionManagementApplicationModule), + typeof(AbpPermissionManagementHttpApiModule), typeof(BlobStoringDatabaseDomainModule), typeof(AbpAutofacModule), typeof(AbpAspNetCoreMvcUiBasicThemeModule) diff --git a/modules/blogging/app/Volo.BloggingTestApp/Volo.BloggingTestApp.csproj b/modules/blogging/app/Volo.BloggingTestApp/Volo.BloggingTestApp.csproj index 97ad545ddb..17e68720cb 100644 --- a/modules/blogging/app/Volo.BloggingTestApp/Volo.BloggingTestApp.csproj +++ b/modules/blogging/app/Volo.BloggingTestApp/Volo.BloggingTestApp.csproj @@ -21,6 +21,8 @@ + + @@ -30,9 +32,12 @@ + + + diff --git a/modules/blogging/app/Volo.BloggingTestApp/wwwroot/libs/sweetalert2/sweetalert2.all.js b/modules/blogging/app/Volo.BloggingTestApp/wwwroot/libs/sweetalert2/sweetalert2.all.js new file mode 100644 index 0000000000..8cbddafe42 --- /dev/null +++ b/modules/blogging/app/Volo.BloggingTestApp/wwwroot/libs/sweetalert2/sweetalert2.all.js @@ -0,0 +1,3123 @@ +/*! +* sweetalert2 v11.1.5 +* Released under the MIT License. +*/ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : + typeof define === 'function' && define.amd ? define(factory) : + (global = global || self, global.Sweetalert2 = factory()); +}(this, function () { 'use strict'; + + const DismissReason = Object.freeze({ + cancel: 'cancel', + backdrop: 'backdrop', + close: 'close', + esc: 'esc', + timer: 'timer' + }); + + const consolePrefix = 'SweetAlert2:'; + /** + * Filter the unique values into a new array + * @param arr + */ + + const uniqueArray = arr => { + const result = []; + + for (let i = 0; i < arr.length; i++) { + if (result.indexOf(arr[i]) === -1) { + result.push(arr[i]); + } + } + + return result; + }; + /** + * Capitalize the first letter of a string + * @param str + */ + + const capitalizeFirstLetter = str => str.charAt(0).toUpperCase() + str.slice(1); + /** + * Convert NodeList to Array + * @param nodeList + */ + + const toArray = nodeList => Array.prototype.slice.call(nodeList); + /** + * Standardise console warnings + * @param message + */ + + const warn = message => { + console.warn("".concat(consolePrefix, " ").concat(typeof message === 'object' ? message.join(' ') : message)); + }; + /** + * Standardise console errors + * @param message + */ + + const error = message => { + console.error("".concat(consolePrefix, " ").concat(message)); + }; + /** + * Private global state for `warnOnce` + * @type {Array} + * @private + */ + + const previousWarnOnceMessages = []; + /** + * Show a console warning, but only if it hasn't already been shown + * @param message + */ + + const warnOnce = message => { + if (!previousWarnOnceMessages.includes(message)) { + previousWarnOnceMessages.push(message); + warn(message); + } + }; + /** + * Show a one-time console warning about deprecated params/methods + */ + + const warnAboutDeprecation = (deprecatedParam, useInstead) => { + warnOnce("\"".concat(deprecatedParam, "\" is deprecated and will be removed in the next major release. Please use \"").concat(useInstead, "\" instead.")); + }; + /** + * If `arg` is a function, call it (with no arguments or context) and return the result. + * Otherwise, just pass the value through + * @param arg + */ + + const callIfFunction = arg => typeof arg === 'function' ? arg() : arg; + const hasToPromiseFn = arg => arg && typeof arg.toPromise === 'function'; + const asPromise = arg => hasToPromiseFn(arg) ? arg.toPromise() : Promise.resolve(arg); + const isPromise = arg => arg && Promise.resolve(arg) === arg; + + const isJqueryElement = elem => typeof elem === 'object' && elem.jquery; + + const isElement = elem => elem instanceof Element || isJqueryElement(elem); + + const argsToParams = args => { + const params = {}; + + if (typeof args[0] === 'object' && !isElement(args[0])) { + Object.assign(params, args[0]); + } else { + ['title', 'html', 'icon'].forEach((name, index) => { + const arg = args[index]; + + if (typeof arg === 'string' || isElement(arg)) { + params[name] = arg; + } else if (arg !== undefined) { + error("Unexpected type of ".concat(name, "! Expected \"string\" or \"Element\", got ").concat(typeof arg)); + } + }); + } + + return params; + }; + + const swalPrefix = 'swal2-'; + const prefix = items => { + const result = {}; + + for (const i in items) { + result[items[i]] = swalPrefix + items[i]; + } + + return result; + }; + const swalClasses = prefix(['container', 'shown', 'height-auto', 'iosfix', 'popup', 'modal', 'no-backdrop', 'no-transition', 'toast', 'toast-shown', 'show', 'hide', 'close', 'title', 'html-container', 'actions', 'confirm', 'deny', 'cancel', 'default-outline', 'footer', 'icon', 'icon-content', 'image', 'input', 'file', 'range', 'select', 'radio', 'checkbox', 'label', 'textarea', 'inputerror', 'input-label', 'validation-message', 'progress-steps', 'active-progress-step', 'progress-step', 'progress-step-line', 'loader', 'loading', 'styled', 'top', 'top-start', 'top-end', 'top-left', 'top-right', 'center', 'center-start', 'center-end', 'center-left', 'center-right', 'bottom', 'bottom-start', 'bottom-end', 'bottom-left', 'bottom-right', 'grow-row', 'grow-column', 'grow-fullscreen', 'rtl', 'timer-progress-bar', 'timer-progress-bar-container', 'scrollbar-measure', 'icon-success', 'icon-warning', 'icon-info', 'icon-question', 'icon-error']); + const iconTypes = prefix(['success', 'warning', 'info', 'question', 'error']); + + const getContainer = () => document.body.querySelector(".".concat(swalClasses.container)); + const elementBySelector = selectorString => { + const container = getContainer(); + return container ? container.querySelector(selectorString) : null; + }; + + const elementByClass = className => { + return elementBySelector(".".concat(className)); + }; + + const getPopup = () => elementByClass(swalClasses.popup); + const getIcon = () => elementByClass(swalClasses.icon); + const getTitle = () => elementByClass(swalClasses.title); + const getHtmlContainer = () => elementByClass(swalClasses['html-container']); + const getImage = () => elementByClass(swalClasses.image); + const getProgressSteps = () => elementByClass(swalClasses['progress-steps']); + const getValidationMessage = () => elementByClass(swalClasses['validation-message']); + const getConfirmButton = () => elementBySelector(".".concat(swalClasses.actions, " .").concat(swalClasses.confirm)); + const getDenyButton = () => elementBySelector(".".concat(swalClasses.actions, " .").concat(swalClasses.deny)); + const getInputLabel = () => elementByClass(swalClasses['input-label']); + const getLoader = () => elementBySelector(".".concat(swalClasses.loader)); + const getCancelButton = () => elementBySelector(".".concat(swalClasses.actions, " .").concat(swalClasses.cancel)); + const getActions = () => elementByClass(swalClasses.actions); + const getFooter = () => elementByClass(swalClasses.footer); + const getTimerProgressBar = () => elementByClass(swalClasses['timer-progress-bar']); + const getCloseButton = () => elementByClass(swalClasses.close); // https://github.com/jkup/focusable/blob/master/index.js + + const focusable = "\n a[href],\n area[href],\n input:not([disabled]),\n select:not([disabled]),\n textarea:not([disabled]),\n button:not([disabled]),\n iframe,\n object,\n embed,\n [tabindex=\"0\"],\n [contenteditable],\n audio[controls],\n video[controls],\n summary\n"; + const getFocusableElements = () => { + const focusableElementsWithTabindex = toArray(getPopup().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')) // sort according to tabindex + .sort((a, b) => { + a = parseInt(a.getAttribute('tabindex')); + b = parseInt(b.getAttribute('tabindex')); + + if (a > b) { + return 1; + } else if (a < b) { + return -1; + } + + return 0; + }); + const otherFocusableElements = toArray(getPopup().querySelectorAll(focusable)).filter(el => el.getAttribute('tabindex') !== '-1'); + return uniqueArray(focusableElementsWithTabindex.concat(otherFocusableElements)).filter(el => isVisible(el)); + }; + const isModal = () => { + return !isToast() && !document.body.classList.contains(swalClasses['no-backdrop']); + }; + const isToast = () => { + return document.body.classList.contains(swalClasses['toast-shown']); + }; + const isLoading = () => { + return getPopup().hasAttribute('data-loading'); + }; + + const states = { + previousBodyPadding: null + }; + const setInnerHtml = (elem, html) => { + // #1926 + elem.textContent = ''; + + if (html) { + const parser = new DOMParser(); + const parsed = parser.parseFromString(html, "text/html"); + toArray(parsed.querySelector('head').childNodes).forEach(child => { + elem.appendChild(child); + }); + toArray(parsed.querySelector('body').childNodes).forEach(child => { + elem.appendChild(child); + }); + } + }; + const hasClass = (elem, className) => { + if (!className) { + return false; + } + + const classList = className.split(/\s+/); + + for (let i = 0; i < classList.length; i++) { + if (!elem.classList.contains(classList[i])) { + return false; + } + } + + return true; + }; + + const removeCustomClasses = (elem, params) => { + toArray(elem.classList).forEach(className => { + if (!Object.values(swalClasses).includes(className) && !Object.values(iconTypes).includes(className) && !Object.values(params.showClass).includes(className)) { + elem.classList.remove(className); + } + }); + }; + + const applyCustomClass = (elem, params, className) => { + removeCustomClasses(elem, params); + + if (params.customClass && params.customClass[className]) { + if (typeof params.customClass[className] !== 'string' && !params.customClass[className].forEach) { + return warn("Invalid type of customClass.".concat(className, "! Expected string or iterable object, got \"").concat(typeof params.customClass[className], "\"")); + } + + addClass(elem, params.customClass[className]); + } + }; + const getInput = (popup, inputType) => { + if (!inputType) { + return null; + } + + switch (inputType) { + case 'select': + case 'textarea': + case 'file': + return getChildByClass(popup, swalClasses[inputType]); + + case 'checkbox': + return popup.querySelector(".".concat(swalClasses.checkbox, " input")); + + case 'radio': + return popup.querySelector(".".concat(swalClasses.radio, " input:checked")) || popup.querySelector(".".concat(swalClasses.radio, " input:first-child")); + + case 'range': + return popup.querySelector(".".concat(swalClasses.range, " input")); + + default: + return getChildByClass(popup, swalClasses.input); + } + }; + const focusInput = input => { + input.focus(); // place cursor at end of text in text input + + if (input.type !== 'file') { + // http://stackoverflow.com/a/2345915 + const val = input.value; + input.value = ''; + input.value = val; + } + }; + const toggleClass = (target, classList, condition) => { + if (!target || !classList) { + return; + } + + if (typeof classList === 'string') { + classList = classList.split(/\s+/).filter(Boolean); + } + + classList.forEach(className => { + if (target.forEach) { + target.forEach(elem => { + condition ? elem.classList.add(className) : elem.classList.remove(className); + }); + } else { + condition ? target.classList.add(className) : target.classList.remove(className); + } + }); + }; + const addClass = (target, classList) => { + toggleClass(target, classList, true); + }; + const removeClass = (target, classList) => { + toggleClass(target, classList, false); + }; + const getChildByClass = (elem, className) => { + for (let i = 0; i < elem.childNodes.length; i++) { + if (hasClass(elem.childNodes[i], className)) { + return elem.childNodes[i]; + } + } + }; + const applyNumericalStyle = (elem, property, value) => { + if (value === "".concat(parseInt(value))) { + value = parseInt(value); + } + + if (value || parseInt(value) === 0) { + elem.style[property] = typeof value === 'number' ? "".concat(value, "px") : value; + } else { + elem.style.removeProperty(property); + } + }; + const show = (elem, display = 'flex') => { + elem.style.display = display; + }; + const hide = elem => { + elem.style.display = 'none'; + }; + const setStyle = (parent, selector, property, value) => { + const el = parent.querySelector(selector); + + if (el) { + el.style[property] = value; + } + }; + const toggle = (elem, condition, display) => { + condition ? show(elem, display) : hide(elem); + }; // borrowed from jquery $(elem).is(':visible') implementation + + const isVisible = elem => !!(elem && (elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length)); + const allButtonsAreHidden = () => !isVisible(getConfirmButton()) && !isVisible(getDenyButton()) && !isVisible(getCancelButton()); + const isScrollable = elem => !!(elem.scrollHeight > elem.clientHeight); // borrowed from https://stackoverflow.com/a/46352119 + + const hasCssAnimation = elem => { + const style = window.getComputedStyle(elem); + const animDuration = parseFloat(style.getPropertyValue('animation-duration') || '0'); + const transDuration = parseFloat(style.getPropertyValue('transition-duration') || '0'); + return animDuration > 0 || transDuration > 0; + }; + const animateTimerProgressBar = (timer, reset = false) => { + const timerProgressBar = getTimerProgressBar(); + + if (isVisible(timerProgressBar)) { + if (reset) { + timerProgressBar.style.transition = 'none'; + timerProgressBar.style.width = '100%'; + } + + setTimeout(() => { + timerProgressBar.style.transition = "width ".concat(timer / 1000, "s linear"); + timerProgressBar.style.width = '0%'; + }, 10); + } + }; + const stopTimerProgressBar = () => { + const timerProgressBar = getTimerProgressBar(); + const timerProgressBarWidth = parseInt(window.getComputedStyle(timerProgressBar).width); + timerProgressBar.style.removeProperty('transition'); + timerProgressBar.style.width = '100%'; + const timerProgressBarFullWidth = parseInt(window.getComputedStyle(timerProgressBar).width); + const timerProgressBarPercent = parseInt(timerProgressBarWidth / timerProgressBarFullWidth * 100); + timerProgressBar.style.removeProperty('transition'); + timerProgressBar.style.width = "".concat(timerProgressBarPercent, "%"); + }; + + // Detect Node env + const isNodeEnv = () => typeof window === 'undefined' || typeof document === 'undefined'; + + const sweetHTML = "\n
\n \n
    \n
    \n \n

    \n
    \n \n \n
    \n \n \n
    \n \n
    \n \n \n
    \n
    \n
    \n \n \n \n
    \n
    \n
    \n
    \n
    \n
    \n").replace(/(^|\n)\s*/g, ''); + + const resetOldContainer = () => { + const oldContainer = getContainer(); + + if (!oldContainer) { + return false; + } + + oldContainer.remove(); + removeClass([document.documentElement, document.body], [swalClasses['no-backdrop'], swalClasses['toast-shown'], swalClasses['has-column']]); + return true; + }; + + const resetValidationMessage = () => { + if (Swal.isVisible()) { + Swal.resetValidationMessage(); + } + }; + + const addInputChangeListeners = () => { + const popup = getPopup(); + const input = getChildByClass(popup, swalClasses.input); + const file = getChildByClass(popup, swalClasses.file); + const range = popup.querySelector(".".concat(swalClasses.range, " input")); + const rangeOutput = popup.querySelector(".".concat(swalClasses.range, " output")); + const select = getChildByClass(popup, swalClasses.select); + const checkbox = popup.querySelector(".".concat(swalClasses.checkbox, " input")); + const textarea = getChildByClass(popup, swalClasses.textarea); + input.oninput = resetValidationMessage; + file.onchange = resetValidationMessage; + select.onchange = resetValidationMessage; + checkbox.onchange = resetValidationMessage; + textarea.oninput = resetValidationMessage; + + range.oninput = () => { + resetValidationMessage(); + rangeOutput.value = range.value; + }; + + range.onchange = () => { + resetValidationMessage(); + range.nextSibling.value = range.value; + }; + }; + + const getTarget = target => typeof target === 'string' ? document.querySelector(target) : target; + + const setupAccessibility = params => { + const popup = getPopup(); + popup.setAttribute('role', params.toast ? 'alert' : 'dialog'); + popup.setAttribute('aria-live', params.toast ? 'polite' : 'assertive'); + + if (!params.toast) { + popup.setAttribute('aria-modal', 'true'); + } + }; + + const setupRTL = targetElement => { + if (window.getComputedStyle(targetElement).direction === 'rtl') { + addClass(getContainer(), swalClasses.rtl); + } + }; + /* + * Add modal + backdrop to DOM + */ + + + const init = params => { + // Clean up the old popup container if it exists + const oldContainerExisted = resetOldContainer(); + /* istanbul ignore if */ + + if (isNodeEnv()) { + error('SweetAlert2 requires document to initialize'); + return; + } + + const container = document.createElement('div'); + container.className = swalClasses.container; + + if (oldContainerExisted) { + addClass(container, swalClasses['no-transition']); + } + + setInnerHtml(container, sweetHTML); + const targetElement = getTarget(params.target); + targetElement.appendChild(container); + setupAccessibility(params); + setupRTL(targetElement); + addInputChangeListeners(); + }; + + const parseHtmlToContainer = (param, target) => { + // DOM element + if (param instanceof HTMLElement) { + target.appendChild(param); // Object + } else if (typeof param === 'object') { + handleObject(param, target); // Plain string + } else if (param) { + setInnerHtml(target, param); + } + }; + + const handleObject = (param, target) => { + // JQuery element(s) + if (param.jquery) { + handleJqueryElem(target, param); // For other objects use their string representation + } else { + setInnerHtml(target, param.toString()); + } + }; + + const handleJqueryElem = (target, elem) => { + target.textContent = ''; + + if (0 in elem) { + for (let i = 0; (i in elem); i++) { + target.appendChild(elem[i].cloneNode(true)); + } + } else { + target.appendChild(elem.cloneNode(true)); + } + }; + + const animationEndEvent = (() => { + // Prevent run in Node env + + /* istanbul ignore if */ + if (isNodeEnv()) { + return false; + } + + const testEl = document.createElement('div'); + const transEndEventNames = { + WebkitAnimation: 'webkitAnimationEnd', + OAnimation: 'oAnimationEnd oanimationend', + animation: 'animationend' + }; + + for (const i in transEndEventNames) { + if (Object.prototype.hasOwnProperty.call(transEndEventNames, i) && typeof testEl.style[i] !== 'undefined') { + return transEndEventNames[i]; + } + } + + return false; + })(); + + // https://github.com/twbs/bootstrap/blob/master/js/src/modal.js + + const measureScrollbar = () => { + const scrollDiv = document.createElement('div'); + scrollDiv.className = swalClasses['scrollbar-measure']; + document.body.appendChild(scrollDiv); + const scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth; + document.body.removeChild(scrollDiv); + return scrollbarWidth; + }; + + const renderActions = (instance, params) => { + const actions = getActions(); + const loader = getLoader(); + const confirmButton = getConfirmButton(); + const denyButton = getDenyButton(); + const cancelButton = getCancelButton(); // Actions (buttons) wrapper + + if (!params.showConfirmButton && !params.showDenyButton && !params.showCancelButton) { + hide(actions); + } else { + show(actions); + } // Custom class + + + applyCustomClass(actions, params, 'actions'); // Render buttons + + renderButton(confirmButton, 'confirm', params); + renderButton(denyButton, 'deny', params); + renderButton(cancelButton, 'cancel', params); + handleButtonsStyling(confirmButton, denyButton, cancelButton, params); + + if (params.reverseButtons) { + actions.insertBefore(cancelButton, loader); + actions.insertBefore(denyButton, loader); + actions.insertBefore(confirmButton, loader); + } // Loader + + + setInnerHtml(loader, params.loaderHtml); + applyCustomClass(loader, params, 'loader'); + }; + + function handleButtonsStyling(confirmButton, denyButton, cancelButton, params) { + if (!params.buttonsStyling) { + return removeClass([confirmButton, denyButton, cancelButton], swalClasses.styled); + } + + addClass([confirmButton, denyButton, cancelButton], swalClasses.styled); // Buttons background colors + + if (params.confirmButtonColor) { + confirmButton.style.backgroundColor = params.confirmButtonColor; + addClass(confirmButton, swalClasses['default-outline']); + } + + if (params.denyButtonColor) { + denyButton.style.backgroundColor = params.denyButtonColor; + addClass(denyButton, swalClasses['default-outline']); + } + + if (params.cancelButtonColor) { + cancelButton.style.backgroundColor = params.cancelButtonColor; + addClass(cancelButton, swalClasses['default-outline']); + } + } + + function renderButton(button, buttonType, params) { + toggle(button, params["show".concat(capitalizeFirstLetter(buttonType), "Button")], 'inline-block'); + setInnerHtml(button, params["".concat(buttonType, "ButtonText")]); // Set caption text + + button.setAttribute('aria-label', params["".concat(buttonType, "ButtonAriaLabel")]); // ARIA label + // Add buttons custom classes + + button.className = swalClasses[buttonType]; + applyCustomClass(button, params, "".concat(buttonType, "Button")); + addClass(button, params["".concat(buttonType, "ButtonClass")]); + } + + function handleBackdropParam(container, backdrop) { + if (typeof backdrop === 'string') { + container.style.background = backdrop; + } else if (!backdrop) { + addClass([document.documentElement, document.body], swalClasses['no-backdrop']); + } + } + + function handlePositionParam(container, position) { + if (position in swalClasses) { + addClass(container, swalClasses[position]); + } else { + warn('The "position" parameter is not valid, defaulting to "center"'); + addClass(container, swalClasses.center); + } + } + + function handleGrowParam(container, grow) { + if (grow && typeof grow === 'string') { + const growClass = "grow-".concat(grow); + + if (growClass in swalClasses) { + addClass(container, swalClasses[growClass]); + } + } + } + + const renderContainer = (instance, params) => { + const container = getContainer(); + + if (!container) { + return; + } + + handleBackdropParam(container, params.backdrop); + handlePositionParam(container, params.position); + handleGrowParam(container, params.grow); // Custom class + + applyCustomClass(container, params, 'container'); + }; + + /** + * This module containts `WeakMap`s for each effectively-"private property" that a `Swal` has. + * For example, to set the private property "foo" of `this` to "bar", you can `privateProps.foo.set(this, 'bar')` + * This is the approach that Babel will probably take to implement private methods/fields + * https://github.com/tc39/proposal-private-methods + * https://github.com/babel/babel/pull/7555 + * Once we have the changes from that PR in Babel, and our core class fits reasonable in *one module* + * then we can use that language feature. + */ + var privateProps = { + promise: new WeakMap(), + innerParams: new WeakMap(), + domCache: new WeakMap() + }; + + const inputTypes = ['input', 'file', 'range', 'select', 'radio', 'checkbox', 'textarea']; + const renderInput = (instance, params) => { + const popup = getPopup(); + const innerParams = privateProps.innerParams.get(instance); + const rerender = !innerParams || params.input !== innerParams.input; + inputTypes.forEach(inputType => { + const inputClass = swalClasses[inputType]; + const inputContainer = getChildByClass(popup, inputClass); // set attributes + + setAttributes(inputType, params.inputAttributes); // set class + + inputContainer.className = inputClass; + + if (rerender) { + hide(inputContainer); + } + }); + + if (params.input) { + if (rerender) { + showInput(params); + } // set custom class + + + setCustomClass(params); + } + }; + + const showInput = params => { + if (!renderInputType[params.input]) { + return error("Unexpected type of input! Expected \"text\", \"email\", \"password\", \"number\", \"tel\", \"select\", \"radio\", \"checkbox\", \"textarea\", \"file\" or \"url\", got \"".concat(params.input, "\"")); + } + + const inputContainer = getInputContainer(params.input); + const input = renderInputType[params.input](inputContainer, params); + show(input); // input autofocus + + setTimeout(() => { + focusInput(input); + }); + }; + + const removeAttributes = input => { + for (let i = 0; i < input.attributes.length; i++) { + const attrName = input.attributes[i].name; + + if (!['type', 'value', 'style'].includes(attrName)) { + input.removeAttribute(attrName); + } + } + }; + + const setAttributes = (inputType, inputAttributes) => { + const input = getInput(getPopup(), inputType); + + if (!input) { + return; + } + + removeAttributes(input); + + for (const attr in inputAttributes) { + input.setAttribute(attr, inputAttributes[attr]); + } + }; + + const setCustomClass = params => { + const inputContainer = getInputContainer(params.input); + + if (params.customClass) { + addClass(inputContainer, params.customClass.input); + } + }; + + const setInputPlaceholder = (input, params) => { + if (!input.placeholder || params.inputPlaceholder) { + input.placeholder = params.inputPlaceholder; + } + }; + + const setInputLabel = (input, prependTo, params) => { + if (params.inputLabel) { + input.id = swalClasses.input; + const label = document.createElement('label'); + const labelClass = swalClasses['input-label']; + label.setAttribute('for', input.id); + label.className = labelClass; + addClass(label, params.customClass.inputLabel); + label.innerText = params.inputLabel; + prependTo.insertAdjacentElement('beforebegin', label); + } + }; + + const getInputContainer = inputType => { + const inputClass = swalClasses[inputType] ? swalClasses[inputType] : swalClasses.input; + return getChildByClass(getPopup(), inputClass); + }; + + const renderInputType = {}; + + renderInputType.text = renderInputType.email = renderInputType.password = renderInputType.number = renderInputType.tel = renderInputType.url = (input, params) => { + if (typeof params.inputValue === 'string' || typeof params.inputValue === 'number') { + input.value = params.inputValue; + } else if (!isPromise(params.inputValue)) { + warn("Unexpected type of inputValue! Expected \"string\", \"number\" or \"Promise\", got \"".concat(typeof params.inputValue, "\"")); + } + + setInputLabel(input, input, params); + setInputPlaceholder(input, params); + input.type = params.input; + return input; + }; + + renderInputType.file = (input, params) => { + setInputLabel(input, input, params); + setInputPlaceholder(input, params); + return input; + }; + + renderInputType.range = (range, params) => { + const rangeInput = range.querySelector('input'); + const rangeOutput = range.querySelector('output'); + rangeInput.value = params.inputValue; + rangeInput.type = params.input; + rangeOutput.value = params.inputValue; + setInputLabel(rangeInput, range, params); + return range; + }; + + renderInputType.select = (select, params) => { + select.textContent = ''; + + if (params.inputPlaceholder) { + const placeholder = document.createElement('option'); + setInnerHtml(placeholder, params.inputPlaceholder); + placeholder.value = ''; + placeholder.disabled = true; + placeholder.selected = true; + select.appendChild(placeholder); + } + + setInputLabel(select, select, params); + return select; + }; + + renderInputType.radio = radio => { + radio.textContent = ''; + return radio; + }; + + renderInputType.checkbox = (checkboxContainer, params) => { + const checkbox = getInput(getPopup(), 'checkbox'); + checkbox.value = 1; + checkbox.id = swalClasses.checkbox; + checkbox.checked = Boolean(params.inputValue); + const label = checkboxContainer.querySelector('span'); + setInnerHtml(label, params.inputPlaceholder); + return checkboxContainer; + }; + + renderInputType.textarea = (textarea, params) => { + textarea.value = params.inputValue; + setInputPlaceholder(textarea, params); + setInputLabel(textarea, textarea, params); + + const getMargin = el => parseInt(window.getComputedStyle(el).marginLeft) + parseInt(window.getComputedStyle(el).marginRight); + + setTimeout(() => { + // #2291 + if ('MutationObserver' in window) { + // #1699 + const initialPopupWidth = parseInt(window.getComputedStyle(getPopup()).width); + + const textareaResizeHandler = () => { + const textareaWidth = textarea.offsetWidth + getMargin(textarea); + + if (textareaWidth > initialPopupWidth) { + getPopup().style.width = "".concat(textareaWidth, "px"); + } else { + getPopup().style.width = null; + } + }; + + new MutationObserver(textareaResizeHandler).observe(textarea, { + attributes: true, + attributeFilter: ['style'] + }); + } + }); + return textarea; + }; + + const renderContent = (instance, params) => { + const htmlContainer = getHtmlContainer(); + applyCustomClass(htmlContainer, params, 'htmlContainer'); // Content as HTML + + if (params.html) { + parseHtmlToContainer(params.html, htmlContainer); + show(htmlContainer, 'block'); // Content as plain text + } else if (params.text) { + htmlContainer.textContent = params.text; + show(htmlContainer, 'block'); // No content + } else { + hide(htmlContainer); + } + + renderInput(instance, params); + }; + + const renderFooter = (instance, params) => { + const footer = getFooter(); + toggle(footer, params.footer); + + if (params.footer) { + parseHtmlToContainer(params.footer, footer); + } // Custom class + + + applyCustomClass(footer, params, 'footer'); + }; + + const renderCloseButton = (instance, params) => { + const closeButton = getCloseButton(); + setInnerHtml(closeButton, params.closeButtonHtml); // Custom class + + applyCustomClass(closeButton, params, 'closeButton'); + toggle(closeButton, params.showCloseButton); + closeButton.setAttribute('aria-label', params.closeButtonAriaLabel); + }; + + const renderIcon = (instance, params) => { + const innerParams = privateProps.innerParams.get(instance); + const icon = getIcon(); // if the given icon already rendered, apply the styling without re-rendering the icon + + if (innerParams && params.icon === innerParams.icon) { + // Custom or default content + setContent(icon, params); + applyStyles(icon, params); + return; + } + + if (!params.icon && !params.iconHtml) { + return hide(icon); + } + + if (params.icon && Object.keys(iconTypes).indexOf(params.icon) === -1) { + error("Unknown icon! Expected \"success\", \"error\", \"warning\", \"info\" or \"question\", got \"".concat(params.icon, "\"")); + return hide(icon); + } + + show(icon); // Custom or default content + + setContent(icon, params); + applyStyles(icon, params); // Animate icon + + addClass(icon, params.showClass.icon); + }; + + const applyStyles = (icon, params) => { + for (const iconType in iconTypes) { + if (params.icon !== iconType) { + removeClass(icon, iconTypes[iconType]); + } + } + + addClass(icon, iconTypes[params.icon]); // Icon color + + setColor(icon, params); // Success icon background color + + adjustSuccessIconBackgoundColor(); // Custom class + + applyCustomClass(icon, params, 'icon'); + }; // Adjust success icon background color to match the popup background color + + + const adjustSuccessIconBackgoundColor = () => { + const popup = getPopup(); + const popupBackgroundColor = window.getComputedStyle(popup).getPropertyValue('background-color'); + const successIconParts = popup.querySelectorAll('[class^=swal2-success-circular-line], .swal2-success-fix'); + + for (let i = 0; i < successIconParts.length; i++) { + successIconParts[i].style.backgroundColor = popupBackgroundColor; + } + }; + + const setContent = (icon, params) => { + icon.textContent = ''; + + if (params.iconHtml) { + setInnerHtml(icon, iconContent(params.iconHtml)); + } else if (params.icon === 'success') { + setInnerHtml(icon, "\n
    \n \n
    \n
    \n "); + } else if (params.icon === 'error') { + setInnerHtml(icon, "\n \n \n \n \n "); + } else { + const defaultIconHtml = { + question: '?', + warning: '!', + info: 'i' + }; + setInnerHtml(icon, iconContent(defaultIconHtml[params.icon])); + } + }; + + const setColor = (icon, params) => { + if (!params.iconColor) { + return; + } + + icon.style.color = params.iconColor; + icon.style.borderColor = params.iconColor; + + for (const sel of ['.swal2-success-line-tip', '.swal2-success-line-long', '.swal2-x-mark-line-left', '.swal2-x-mark-line-right']) { + setStyle(icon, sel, 'backgroundColor', params.iconColor); + } + + setStyle(icon, '.swal2-success-ring', 'borderColor', params.iconColor); + }; + + const iconContent = content => "
    ").concat(content, "
    "); + + const renderImage = (instance, params) => { + const image = getImage(); + + if (!params.imageUrl) { + return hide(image); + } + + show(image, ''); // Src, alt + + image.setAttribute('src', params.imageUrl); + image.setAttribute('alt', params.imageAlt); // Width, height + + applyNumericalStyle(image, 'width', params.imageWidth); + applyNumericalStyle(image, 'height', params.imageHeight); // Class + + image.className = swalClasses.image; + applyCustomClass(image, params, 'image'); + }; + + const createStepElement = step => { + const stepEl = document.createElement('li'); + addClass(stepEl, swalClasses['progress-step']); + setInnerHtml(stepEl, step); + return stepEl; + }; + + const createLineElement = params => { + const lineEl = document.createElement('li'); + addClass(lineEl, swalClasses['progress-step-line']); + + if (params.progressStepsDistance) { + lineEl.style.width = params.progressStepsDistance; + } + + return lineEl; + }; + + const renderProgressSteps = (instance, params) => { + const progressStepsContainer = getProgressSteps(); + + if (!params.progressSteps || params.progressSteps.length === 0) { + return hide(progressStepsContainer); + } + + show(progressStepsContainer); + progressStepsContainer.textContent = ''; + + if (params.currentProgressStep >= params.progressSteps.length) { + warn('Invalid currentProgressStep parameter, it should be less than progressSteps.length ' + '(currentProgressStep like JS arrays starts from 0)'); + } + + params.progressSteps.forEach((step, index) => { + const stepEl = createStepElement(step); + progressStepsContainer.appendChild(stepEl); + + if (index === params.currentProgressStep) { + addClass(stepEl, swalClasses['active-progress-step']); + } + + if (index !== params.progressSteps.length - 1) { + const lineEl = createLineElement(params); + progressStepsContainer.appendChild(lineEl); + } + }); + }; + + const renderTitle = (instance, params) => { + const title = getTitle(); + toggle(title, params.title || params.titleText, 'block'); + + if (params.title) { + parseHtmlToContainer(params.title, title); + } + + if (params.titleText) { + title.innerText = params.titleText; + } // Custom class + + + applyCustomClass(title, params, 'title'); + }; + + const renderPopup = (instance, params) => { + const container = getContainer(); + const popup = getPopup(); // Width + + if (params.toast) { + // #2170 + applyNumericalStyle(container, 'width', params.width); + popup.style.width = '100%'; + popup.insertBefore(getLoader(), getIcon()); + } else { + applyNumericalStyle(popup, 'width', params.width); + } // Padding + + + applyNumericalStyle(popup, 'padding', params.padding); // Background + + if (params.background) { + popup.style.background = params.background; + } + + hide(getValidationMessage()); // Classes + + addClasses(popup, params); + }; + + const addClasses = (popup, params) => { + // Default Class + showClass when updating Swal.update({}) + popup.className = "".concat(swalClasses.popup, " ").concat(isVisible(popup) ? params.showClass.popup : ''); + + if (params.toast) { + addClass([document.documentElement, document.body], swalClasses['toast-shown']); + addClass(popup, swalClasses.toast); + } else { + addClass(popup, swalClasses.modal); + } // Custom class + + + applyCustomClass(popup, params, 'popup'); + + if (typeof params.customClass === 'string') { + addClass(popup, params.customClass); + } // Icon class (#1842) + + + if (params.icon) { + addClass(popup, swalClasses["icon-".concat(params.icon)]); + } + }; + + const render = (instance, params) => { + renderPopup(instance, params); + renderContainer(instance, params); + renderProgressSteps(instance, params); + renderIcon(instance, params); + renderImage(instance, params); + renderTitle(instance, params); + renderCloseButton(instance, params); + renderContent(instance, params); + renderActions(instance, params); + renderFooter(instance, params); + + if (typeof params.didRender === 'function') { + params.didRender(getPopup()); + } + }; + + /* + * Global function to determine if SweetAlert2 popup is shown + */ + + const isVisible$1 = () => { + return isVisible(getPopup()); + }; + /* + * Global function to click 'Confirm' button + */ + + const clickConfirm = () => getConfirmButton() && getConfirmButton().click(); + /* + * Global function to click 'Deny' button + */ + + const clickDeny = () => getDenyButton() && getDenyButton().click(); + /* + * Global function to click 'Cancel' button + */ + + const clickCancel = () => getCancelButton() && getCancelButton().click(); + + function fire(...args) { + const Swal = this; + return new Swal(...args); + } + + /** + * Returns an extended version of `Swal` containing `params` as defaults. + * Useful for reusing Swal configuration. + * + * For example: + * + * Before: + * const textPromptOptions = { input: 'text', showCancelButton: true } + * const {value: firstName} = await Swal.fire({ ...textPromptOptions, title: 'What is your first name?' }) + * const {value: lastName} = await Swal.fire({ ...textPromptOptions, title: 'What is your last name?' }) + * + * After: + * const TextPrompt = Swal.mixin({ input: 'text', showCancelButton: true }) + * const {value: firstName} = await TextPrompt('What is your first name?') + * const {value: lastName} = await TextPrompt('What is your last name?') + * + * @param mixinParams + */ + function mixin(mixinParams) { + class MixinSwal extends this { + _main(params, priorityMixinParams) { + return super._main(params, Object.assign({}, mixinParams, priorityMixinParams)); + } + + } + + return MixinSwal; + } + + /** + * Shows loader (spinner), this is useful with AJAX requests. + * By default the loader be shown instead of the "Confirm" button. + */ + + const showLoading = buttonToReplace => { + let popup = getPopup(); + + if (!popup) { + Swal.fire(); + } + + popup = getPopup(); + const loader = getLoader(); + + if (isToast()) { + hide(getIcon()); + } else { + replaceButton(popup, buttonToReplace); + } + + show(loader); + popup.setAttribute('data-loading', true); + popup.setAttribute('aria-busy', true); + popup.focus(); + }; + + const replaceButton = (popup, buttonToReplace) => { + const actions = getActions(); + const loader = getLoader(); + + if (!buttonToReplace && isVisible(getConfirmButton())) { + buttonToReplace = getConfirmButton(); + } + + show(actions); + + if (buttonToReplace) { + hide(buttonToReplace); + loader.setAttribute('data-button-to-replace', buttonToReplace.className); + } + + loader.parentNode.insertBefore(loader, buttonToReplace); + addClass([popup, actions], swalClasses.loading); + }; + + const RESTORE_FOCUS_TIMEOUT = 100; + + const globalState = {}; + + const focusPreviousActiveElement = () => { + if (globalState.previousActiveElement && globalState.previousActiveElement.focus) { + globalState.previousActiveElement.focus(); + globalState.previousActiveElement = null; + } else if (document.body) { + document.body.focus(); + } + }; // Restore previous active (focused) element + + + const restoreActiveElement = returnFocus => { + return new Promise(resolve => { + if (!returnFocus) { + return resolve(); + } + + const x = window.scrollX; + const y = window.scrollY; + globalState.restoreFocusTimeout = setTimeout(() => { + focusPreviousActiveElement(); + resolve(); + }, RESTORE_FOCUS_TIMEOUT); // issues/900 + + window.scrollTo(x, y); + }); + }; + + /** + * If `timer` parameter is set, returns number of milliseconds of timer remained. + * Otherwise, returns undefined. + */ + + const getTimerLeft = () => { + return globalState.timeout && globalState.timeout.getTimerLeft(); + }; + /** + * Stop timer. Returns number of milliseconds of timer remained. + * If `timer` parameter isn't set, returns undefined. + */ + + const stopTimer = () => { + if (globalState.timeout) { + stopTimerProgressBar(); + return globalState.timeout.stop(); + } + }; + /** + * Resume timer. Returns number of milliseconds of timer remained. + * If `timer` parameter isn't set, returns undefined. + */ + + const resumeTimer = () => { + if (globalState.timeout) { + const remaining = globalState.timeout.start(); + animateTimerProgressBar(remaining); + return remaining; + } + }; + /** + * Resume timer. Returns number of milliseconds of timer remained. + * If `timer` parameter isn't set, returns undefined. + */ + + const toggleTimer = () => { + const timer = globalState.timeout; + return timer && (timer.running ? stopTimer() : resumeTimer()); + }; + /** + * Increase timer. Returns number of milliseconds of an updated timer. + * If `timer` parameter isn't set, returns undefined. + */ + + const increaseTimer = n => { + if (globalState.timeout) { + const remaining = globalState.timeout.increase(n); + animateTimerProgressBar(remaining, true); + return remaining; + } + }; + /** + * Check if timer is running. Returns true if timer is running + * or false if timer is paused or stopped. + * If `timer` parameter isn't set, returns undefined + */ + + const isTimerRunning = () => { + return globalState.timeout && globalState.timeout.isRunning(); + }; + + let bodyClickListenerAdded = false; + const clickHandlers = {}; + function bindClickHandler(attr = 'data-swal-template') { + clickHandlers[attr] = this; + + if (!bodyClickListenerAdded) { + document.body.addEventListener('click', bodyClickListener); + bodyClickListenerAdded = true; + } + } + + const bodyClickListener = event => { + // TODO: replace with event.composedPath() + for (let el = event.target; el && el !== document; el = el.parentNode) { + for (const attr in clickHandlers) { + const template = el.getAttribute(attr); + + if (template) { + clickHandlers[attr].fire({ + template + }); + return; + } + } + } + }; + + const defaultParams = { + title: '', + titleText: '', + text: '', + html: '', + footer: '', + icon: undefined, + iconColor: undefined, + iconHtml: undefined, + template: undefined, + toast: false, + showClass: { + popup: 'swal2-show', + backdrop: 'swal2-backdrop-show', + icon: 'swal2-icon-show' + }, + hideClass: { + popup: 'swal2-hide', + backdrop: 'swal2-backdrop-hide', + icon: 'swal2-icon-hide' + }, + customClass: {}, + target: 'body', + backdrop: true, + heightAuto: true, + allowOutsideClick: true, + allowEscapeKey: true, + allowEnterKey: true, + stopKeydownPropagation: true, + keydownListenerCapture: false, + showConfirmButton: true, + showDenyButton: false, + showCancelButton: false, + preConfirm: undefined, + preDeny: undefined, + confirmButtonText: 'OK', + confirmButtonAriaLabel: '', + confirmButtonColor: undefined, + denyButtonText: 'No', + denyButtonAriaLabel: '', + denyButtonColor: undefined, + cancelButtonText: 'Cancel', + cancelButtonAriaLabel: '', + cancelButtonColor: undefined, + buttonsStyling: true, + reverseButtons: false, + focusConfirm: true, + focusDeny: false, + focusCancel: false, + returnFocus: true, + showCloseButton: false, + closeButtonHtml: '×', + closeButtonAriaLabel: 'Close this dialog', + loaderHtml: '', + showLoaderOnConfirm: false, + showLoaderOnDeny: false, + imageUrl: undefined, + imageWidth: undefined, + imageHeight: undefined, + imageAlt: '', + timer: undefined, + timerProgressBar: false, + width: undefined, + padding: undefined, + background: undefined, + input: undefined, + inputPlaceholder: '', + inputLabel: '', + inputValue: '', + inputOptions: {}, + inputAutoTrim: true, + inputAttributes: {}, + inputValidator: undefined, + returnInputValueOnDeny: false, + validationMessage: undefined, + grow: false, + position: 'center', + progressSteps: [], + currentProgressStep: undefined, + progressStepsDistance: undefined, + willOpen: undefined, + didOpen: undefined, + didRender: undefined, + willClose: undefined, + didClose: undefined, + didDestroy: undefined, + scrollbarPadding: true + }; + const updatableParams = ['allowEscapeKey', 'allowOutsideClick', 'background', 'buttonsStyling', 'cancelButtonAriaLabel', 'cancelButtonColor', 'cancelButtonText', 'closeButtonAriaLabel', 'closeButtonHtml', 'confirmButtonAriaLabel', 'confirmButtonColor', 'confirmButtonText', 'currentProgressStep', 'customClass', 'denyButtonAriaLabel', 'denyButtonColor', 'denyButtonText', 'didClose', 'didDestroy', 'footer', 'hideClass', 'html', 'icon', 'iconColor', 'iconHtml', 'imageAlt', 'imageHeight', 'imageUrl', 'imageWidth', 'preConfirm', 'preDeny', 'progressSteps', 'returnFocus', 'reverseButtons', 'showCancelButton', 'showCloseButton', 'showConfirmButton', 'showDenyButton', 'text', 'title', 'titleText', 'willClose']; + const deprecatedParams = {}; + const toastIncompatibleParams = ['allowOutsideClick', 'allowEnterKey', 'backdrop', 'focusConfirm', 'focusDeny', 'focusCancel', 'returnFocus', 'heightAuto', 'keydownListenerCapture']; + /** + * Is valid parameter + * @param {String} paramName + */ + + const isValidParameter = paramName => { + return Object.prototype.hasOwnProperty.call(defaultParams, paramName); + }; + /** + * Is valid parameter for Swal.update() method + * @param {String} paramName + */ + + const isUpdatableParameter = paramName => { + return updatableParams.indexOf(paramName) !== -1; + }; + /** + * Is deprecated parameter + * @param {String} paramName + */ + + const isDeprecatedParameter = paramName => { + return deprecatedParams[paramName]; + }; + + const checkIfParamIsValid = param => { + if (!isValidParameter(param)) { + warn("Unknown parameter \"".concat(param, "\"")); + } + }; + + const checkIfToastParamIsValid = param => { + if (toastIncompatibleParams.includes(param)) { + warn("The parameter \"".concat(param, "\" is incompatible with toasts")); + } + }; + + const checkIfParamIsDeprecated = param => { + if (isDeprecatedParameter(param)) { + warnAboutDeprecation(param, isDeprecatedParameter(param)); + } + }; + /** + * Show relevant warnings for given params + * + * @param params + */ + + + const showWarningsForParams = params => { + if (!params.backdrop && params.allowOutsideClick) { + warn('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`'); + } + + for (const param in params) { + checkIfParamIsValid(param); + + if (params.toast) { + checkIfToastParamIsValid(param); + } + + checkIfParamIsDeprecated(param); + } + }; + + + + var staticMethods = /*#__PURE__*/Object.freeze({ + isValidParameter: isValidParameter, + isUpdatableParameter: isUpdatableParameter, + isDeprecatedParameter: isDeprecatedParameter, + argsToParams: argsToParams, + isVisible: isVisible$1, + clickConfirm: clickConfirm, + clickDeny: clickDeny, + clickCancel: clickCancel, + getContainer: getContainer, + getPopup: getPopup, + getTitle: getTitle, + getHtmlContainer: getHtmlContainer, + getImage: getImage, + getIcon: getIcon, + getInputLabel: getInputLabel, + getCloseButton: getCloseButton, + getActions: getActions, + getConfirmButton: getConfirmButton, + getDenyButton: getDenyButton, + getCancelButton: getCancelButton, + getLoader: getLoader, + getFooter: getFooter, + getTimerProgressBar: getTimerProgressBar, + getFocusableElements: getFocusableElements, + getValidationMessage: getValidationMessage, + isLoading: isLoading, + fire: fire, + mixin: mixin, + showLoading: showLoading, + enableLoading: showLoading, + getTimerLeft: getTimerLeft, + stopTimer: stopTimer, + resumeTimer: resumeTimer, + toggleTimer: toggleTimer, + increaseTimer: increaseTimer, + isTimerRunning: isTimerRunning, + bindClickHandler: bindClickHandler + }); + + /** + * Hides loader and shows back the button which was hidden by .showLoading() + */ + + function hideLoading() { + // do nothing if popup is closed + const innerParams = privateProps.innerParams.get(this); + + if (!innerParams) { + return; + } + + const domCache = privateProps.domCache.get(this); + hide(domCache.loader); + + if (isToast()) { + if (innerParams.icon) { + show(getIcon()); + } + } else { + showRelatedButton(domCache); + } + + removeClass([domCache.popup, domCache.actions], swalClasses.loading); + domCache.popup.removeAttribute('aria-busy'); + domCache.popup.removeAttribute('data-loading'); + domCache.confirmButton.disabled = false; + domCache.denyButton.disabled = false; + domCache.cancelButton.disabled = false; + } + + const showRelatedButton = domCache => { + const buttonToReplace = domCache.popup.getElementsByClassName(domCache.loader.getAttribute('data-button-to-replace')); + + if (buttonToReplace.length) { + show(buttonToReplace[0], 'inline-block'); + } else if (allButtonsAreHidden()) { + hide(domCache.actions); + } + }; + + function getInput$1(instance) { + const innerParams = privateProps.innerParams.get(instance || this); + const domCache = privateProps.domCache.get(instance || this); + + if (!domCache) { + return null; + } + + return getInput(domCache.popup, innerParams.input); + } + + const fixScrollbar = () => { + // for queues, do not do this more than once + if (states.previousBodyPadding !== null) { + return; + } // if the body has overflow + + + if (document.body.scrollHeight > window.innerHeight) { + // add padding so the content doesn't shift after removal of scrollbar + states.previousBodyPadding = parseInt(window.getComputedStyle(document.body).getPropertyValue('padding-right')); + document.body.style.paddingRight = "".concat(states.previousBodyPadding + measureScrollbar(), "px"); + } + }; + const undoScrollbar = () => { + if (states.previousBodyPadding !== null) { + document.body.style.paddingRight = "".concat(states.previousBodyPadding, "px"); + states.previousBodyPadding = null; + } + }; + + /* istanbul ignore file */ + + const iOSfix = () => { + const iOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream || navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1; + + if (iOS && !hasClass(document.body, swalClasses.iosfix)) { + const offset = document.body.scrollTop; + document.body.style.top = "".concat(offset * -1, "px"); + addClass(document.body, swalClasses.iosfix); + lockBodyScroll(); + addBottomPaddingForTallPopups(); // #1948 + } + }; + + const addBottomPaddingForTallPopups = () => { + const safari = !navigator.userAgent.match(/(CriOS|FxiOS|EdgiOS|YaBrowser|UCBrowser)/i); + + if (safari) { + const bottomPanelHeight = 44; + + if (getPopup().scrollHeight > window.innerHeight - bottomPanelHeight) { + getContainer().style.paddingBottom = "".concat(bottomPanelHeight, "px"); + } + } + }; + + const lockBodyScroll = () => { + // #1246 + const container = getContainer(); + let preventTouchMove; + + container.ontouchstart = e => { + preventTouchMove = shouldPreventTouchMove(e); + }; + + container.ontouchmove = e => { + if (preventTouchMove) { + e.preventDefault(); + e.stopPropagation(); + } + }; + }; + + const shouldPreventTouchMove = event => { + const target = event.target; + const container = getContainer(); + + if (isStylys(event) || isZoom(event)) { + return false; + } + + if (target === container) { + return true; + } + + if (!isScrollable(container) && target.tagName !== 'INPUT' && // #1603 + target.tagName !== 'TEXTAREA' && // #2266 + !(isScrollable(getHtmlContainer()) && // #1944 + getHtmlContainer().contains(target))) { + return true; + } + + return false; + }; + + const isStylys = event => { + // #1786 + return event.touches && event.touches.length && event.touches[0].touchType === 'stylus'; + }; + + const isZoom = event => { + // #1891 + return event.touches && event.touches.length > 1; + }; + + const undoIOSfix = () => { + if (hasClass(document.body, swalClasses.iosfix)) { + const offset = parseInt(document.body.style.top, 10); + removeClass(document.body, swalClasses.iosfix); + document.body.style.top = ''; + document.body.scrollTop = offset * -1; + } + }; + + // Adding aria-hidden="true" to elements outside of the active modal dialog ensures that + // elements not within the active modal dialog will not be surfaced if a user opens a screen + // reader’s list of elements (headings, form controls, landmarks, etc.) in the document. + + const setAriaHidden = () => { + const bodyChildren = toArray(document.body.children); + bodyChildren.forEach(el => { + if (el === getContainer() || el.contains(getContainer())) { + return; + } + + if (el.hasAttribute('aria-hidden')) { + el.setAttribute('data-previous-aria-hidden', el.getAttribute('aria-hidden')); + } + + el.setAttribute('aria-hidden', 'true'); + }); + }; + const unsetAriaHidden = () => { + const bodyChildren = toArray(document.body.children); + bodyChildren.forEach(el => { + if (el.hasAttribute('data-previous-aria-hidden')) { + el.setAttribute('aria-hidden', el.getAttribute('data-previous-aria-hidden')); + el.removeAttribute('data-previous-aria-hidden'); + } else { + el.removeAttribute('aria-hidden'); + } + }); + }; + + /** + * This module containts `WeakMap`s for each effectively-"private property" that a `Swal` has. + * For example, to set the private property "foo" of `this` to "bar", you can `privateProps.foo.set(this, 'bar')` + * This is the approach that Babel will probably take to implement private methods/fields + * https://github.com/tc39/proposal-private-methods + * https://github.com/babel/babel/pull/7555 + * Once we have the changes from that PR in Babel, and our core class fits reasonable in *one module* + * then we can use that language feature. + */ + var privateMethods = { + swalPromiseResolve: new WeakMap() + }; + + /* + * Instance method to close sweetAlert + */ + + function removePopupAndResetState(instance, container, returnFocus, didClose) { + if (isToast()) { + triggerDidCloseAndDispose(instance, didClose); + } else { + restoreActiveElement(returnFocus).then(() => triggerDidCloseAndDispose(instance, didClose)); + globalState.keydownTarget.removeEventListener('keydown', globalState.keydownHandler, { + capture: globalState.keydownListenerCapture + }); + globalState.keydownHandlerAdded = false; + } + + const isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent); // workaround for #2088 + // for some reason removing the container in Safari will scroll the document to bottom + + if (isSafari) { + container.setAttribute('style', 'display:none !important'); + container.removeAttribute('class'); + container.innerHTML = ''; + } else { + container.remove(); + } + + if (isModal()) { + undoScrollbar(); + undoIOSfix(); + unsetAriaHidden(); + } + + removeBodyClasses(); + } + + function removeBodyClasses() { + removeClass([document.documentElement, document.body], [swalClasses.shown, swalClasses['height-auto'], swalClasses['no-backdrop'], swalClasses['toast-shown']]); + } + + function close(resolveValue) { + const popup = getPopup(); + + if (!popup) { + return; + } + + resolveValue = prepareResolveValue(resolveValue); + const innerParams = privateProps.innerParams.get(this); + + if (!innerParams || hasClass(popup, innerParams.hideClass.popup)) { + return; + } + + const swalPromiseResolve = privateMethods.swalPromiseResolve.get(this); + removeClass(popup, innerParams.showClass.popup); + addClass(popup, innerParams.hideClass.popup); + const backdrop = getContainer(); + removeClass(backdrop, innerParams.showClass.backdrop); + addClass(backdrop, innerParams.hideClass.backdrop); + handlePopupAnimation(this, popup, innerParams); // Resolve Swal promise + + swalPromiseResolve(resolveValue); + } + + const prepareResolveValue = resolveValue => { + // When user calls Swal.close() + if (typeof resolveValue === 'undefined') { + return { + isConfirmed: false, + isDenied: false, + isDismissed: true + }; + } + + return Object.assign({ + isConfirmed: false, + isDenied: false, + isDismissed: false + }, resolveValue); + }; + + const handlePopupAnimation = (instance, popup, innerParams) => { + const container = getContainer(); // If animation is supported, animate + + const animationIsSupported = animationEndEvent && hasCssAnimation(popup); + + if (typeof innerParams.willClose === 'function') { + innerParams.willClose(popup); + } + + if (animationIsSupported) { + animatePopup(instance, popup, container, innerParams.returnFocus, innerParams.didClose); + } else { + // Otherwise, remove immediately + removePopupAndResetState(instance, container, innerParams.returnFocus, innerParams.didClose); + } + }; + + const animatePopup = (instance, popup, container, returnFocus, didClose) => { + globalState.swalCloseEventFinishedCallback = removePopupAndResetState.bind(null, instance, container, returnFocus, didClose); + popup.addEventListener(animationEndEvent, function (e) { + if (e.target === popup) { + globalState.swalCloseEventFinishedCallback(); + delete globalState.swalCloseEventFinishedCallback; + } + }); + }; + + const triggerDidCloseAndDispose = (instance, didClose) => { + setTimeout(() => { + if (typeof didClose === 'function') { + didClose.bind(instance.params)(); + } + + instance._destroy(); + }); + }; + + function setButtonsDisabled(instance, buttons, disabled) { + const domCache = privateProps.domCache.get(instance); + buttons.forEach(button => { + domCache[button].disabled = disabled; + }); + } + + function setInputDisabled(input, disabled) { + if (!input) { + return false; + } + + if (input.type === 'radio') { + const radiosContainer = input.parentNode.parentNode; + const radios = radiosContainer.querySelectorAll('input'); + + for (let i = 0; i < radios.length; i++) { + radios[i].disabled = disabled; + } + } else { + input.disabled = disabled; + } + } + + function enableButtons() { + setButtonsDisabled(this, ['confirmButton', 'denyButton', 'cancelButton'], false); + } + function disableButtons() { + setButtonsDisabled(this, ['confirmButton', 'denyButton', 'cancelButton'], true); + } + function enableInput() { + return setInputDisabled(this.getInput(), false); + } + function disableInput() { + return setInputDisabled(this.getInput(), true); + } + + function showValidationMessage(error) { + const domCache = privateProps.domCache.get(this); + const params = privateProps.innerParams.get(this); + setInnerHtml(domCache.validationMessage, error); + domCache.validationMessage.className = swalClasses['validation-message']; + + if (params.customClass && params.customClass.validationMessage) { + addClass(domCache.validationMessage, params.customClass.validationMessage); + } + + show(domCache.validationMessage); + const input = this.getInput(); + + if (input) { + input.setAttribute('aria-invalid', true); + input.setAttribute('aria-describedby', swalClasses['validation-message']); + focusInput(input); + addClass(input, swalClasses.inputerror); + } + } // Hide block with validation message + + function resetValidationMessage$1() { + const domCache = privateProps.domCache.get(this); + + if (domCache.validationMessage) { + hide(domCache.validationMessage); + } + + const input = this.getInput(); + + if (input) { + input.removeAttribute('aria-invalid'); + input.removeAttribute('aria-describedby'); + removeClass(input, swalClasses.inputerror); + } + } + + function getProgressSteps$1() { + const domCache = privateProps.domCache.get(this); + return domCache.progressSteps; + } + + class Timer { + constructor(callback, delay) { + this.callback = callback; + this.remaining = delay; + this.running = false; + this.start(); + } + + start() { + if (!this.running) { + this.running = true; + this.started = new Date(); + this.id = setTimeout(this.callback, this.remaining); + } + + return this.remaining; + } + + stop() { + if (this.running) { + this.running = false; + clearTimeout(this.id); + this.remaining -= new Date() - this.started; + } + + return this.remaining; + } + + increase(n) { + const running = this.running; + + if (running) { + this.stop(); + } + + this.remaining += n; + + if (running) { + this.start(); + } + + return this.remaining; + } + + getTimerLeft() { + if (this.running) { + this.stop(); + this.start(); + } + + return this.remaining; + } + + isRunning() { + return this.running; + } + + } + + var defaultInputValidators = { + email: (string, validationMessage) => { + return /^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]{2,24}$/.test(string) ? Promise.resolve() : Promise.resolve(validationMessage || 'Invalid email address'); + }, + url: (string, validationMessage) => { + // taken from https://stackoverflow.com/a/3809435 with a small change from #1306 and #2013 + return /^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(string) ? Promise.resolve() : Promise.resolve(validationMessage || 'Invalid URL'); + } + }; + + function setDefaultInputValidators(params) { + // Use default `inputValidator` for supported input types if not provided + if (!params.inputValidator) { + Object.keys(defaultInputValidators).forEach(key => { + if (params.input === key) { + params.inputValidator = defaultInputValidators[key]; + } + }); + } + } + + function validateCustomTargetElement(params) { + // Determine if the custom target element is valid + if (!params.target || typeof params.target === 'string' && !document.querySelector(params.target) || typeof params.target !== 'string' && !params.target.appendChild) { + warn('Target parameter is not valid, defaulting to "body"'); + params.target = 'body'; + } + } + /** + * Set type, text and actions on popup + * + * @param params + * @returns {boolean} + */ + + + function setParameters(params) { + setDefaultInputValidators(params); // showLoaderOnConfirm && preConfirm + + if (params.showLoaderOnConfirm && !params.preConfirm) { + warn('showLoaderOnConfirm is set to true, but preConfirm is not defined.\n' + 'showLoaderOnConfirm should be used together with preConfirm, see usage example:\n' + 'https://sweetalert2.github.io/#ajax-request'); + } + + validateCustomTargetElement(params); // Replace newlines with
    in title + + if (typeof params.title === 'string') { + params.title = params.title.split('\n').join('
    '); + } + + init(params); + } + + const swalStringParams = ['swal-title', 'swal-html', 'swal-footer']; + const getTemplateParams = params => { + const template = typeof params.template === 'string' ? document.querySelector(params.template) : params.template; + + if (!template) { + return {}; + } + + const templateContent = template.content; + showWarningsForElements(templateContent); + const result = Object.assign(getSwalParams(templateContent), getSwalButtons(templateContent), getSwalImage(templateContent), getSwalIcon(templateContent), getSwalInput(templateContent), getSwalStringParams(templateContent, swalStringParams)); + return result; + }; + + const getSwalParams = templateContent => { + const result = {}; + toArray(templateContent.querySelectorAll('swal-param')).forEach(param => { + showWarningsForAttributes(param, ['name', 'value']); + const paramName = param.getAttribute('name'); + let value = param.getAttribute('value'); + + if (typeof defaultParams[paramName] === 'boolean' && value === 'false') { + value = false; + } + + if (typeof defaultParams[paramName] === 'object') { + value = JSON.parse(value); + } + + result[paramName] = value; + }); + return result; + }; + + const getSwalButtons = templateContent => { + const result = {}; + toArray(templateContent.querySelectorAll('swal-button')).forEach(button => { + showWarningsForAttributes(button, ['type', 'color', 'aria-label']); + const type = button.getAttribute('type'); + result["".concat(type, "ButtonText")] = button.innerHTML; + result["show".concat(capitalizeFirstLetter(type), "Button")] = true; + + if (button.hasAttribute('color')) { + result["".concat(type, "ButtonColor")] = button.getAttribute('color'); + } + + if (button.hasAttribute('aria-label')) { + result["".concat(type, "ButtonAriaLabel")] = button.getAttribute('aria-label'); + } + }); + return result; + }; + + const getSwalImage = templateContent => { + const result = {}; + const image = templateContent.querySelector('swal-image'); + + if (image) { + showWarningsForAttributes(image, ['src', 'width', 'height', 'alt']); + + if (image.hasAttribute('src')) { + result.imageUrl = image.getAttribute('src'); + } + + if (image.hasAttribute('width')) { + result.imageWidth = image.getAttribute('width'); + } + + if (image.hasAttribute('height')) { + result.imageHeight = image.getAttribute('height'); + } + + if (image.hasAttribute('alt')) { + result.imageAlt = image.getAttribute('alt'); + } + } + + return result; + }; + + const getSwalIcon = templateContent => { + const result = {}; + const icon = templateContent.querySelector('swal-icon'); + + if (icon) { + showWarningsForAttributes(icon, ['type', 'color']); + + if (icon.hasAttribute('type')) { + result.icon = icon.getAttribute('type'); + } + + if (icon.hasAttribute('color')) { + result.iconColor = icon.getAttribute('color'); + } + + result.iconHtml = icon.innerHTML; + } + + return result; + }; + + const getSwalInput = templateContent => { + const result = {}; + const input = templateContent.querySelector('swal-input'); + + if (input) { + showWarningsForAttributes(input, ['type', 'label', 'placeholder', 'value']); + result.input = input.getAttribute('type') || 'text'; + + if (input.hasAttribute('label')) { + result.inputLabel = input.getAttribute('label'); + } + + if (input.hasAttribute('placeholder')) { + result.inputPlaceholder = input.getAttribute('placeholder'); + } + + if (input.hasAttribute('value')) { + result.inputValue = input.getAttribute('value'); + } + } + + const inputOptions = templateContent.querySelectorAll('swal-input-option'); + + if (inputOptions.length) { + result.inputOptions = {}; + toArray(inputOptions).forEach(option => { + showWarningsForAttributes(option, ['value']); + const optionValue = option.getAttribute('value'); + const optionName = option.innerHTML; + result.inputOptions[optionValue] = optionName; + }); + } + + return result; + }; + + const getSwalStringParams = (templateContent, paramNames) => { + const result = {}; + + for (const i in paramNames) { + const paramName = paramNames[i]; + const tag = templateContent.querySelector(paramName); + + if (tag) { + showWarningsForAttributes(tag, []); + result[paramName.replace(/^swal-/, '')] = tag.innerHTML.trim(); + } + } + + return result; + }; + + const showWarningsForElements = template => { + const allowedElements = swalStringParams.concat(['swal-param', 'swal-button', 'swal-image', 'swal-icon', 'swal-input', 'swal-input-option']); + toArray(template.children).forEach(el => { + const tagName = el.tagName.toLowerCase(); + + if (allowedElements.indexOf(tagName) === -1) { + warn("Unrecognized element <".concat(tagName, ">")); + } + }); + }; + + const showWarningsForAttributes = (el, allowedAttributes) => { + toArray(el.attributes).forEach(attribute => { + if (allowedAttributes.indexOf(attribute.name) === -1) { + warn(["Unrecognized attribute \"".concat(attribute.name, "\" on <").concat(el.tagName.toLowerCase(), ">."), "".concat(allowedAttributes.length ? "Allowed attributes are: ".concat(allowedAttributes.join(', ')) : 'To set the value, use HTML within the element.')]); + } + }); + }; + + const SHOW_CLASS_TIMEOUT = 10; + /** + * Open popup, add necessary classes and styles, fix scrollbar + * + * @param params + */ + + const openPopup = params => { + const container = getContainer(); + const popup = getPopup(); + + if (typeof params.willOpen === 'function') { + params.willOpen(popup); + } + + const bodyStyles = window.getComputedStyle(document.body); + const initialBodyOverflow = bodyStyles.overflowY; + addClasses$1(container, popup, params); // scrolling is 'hidden' until animation is done, after that 'auto' + + setTimeout(() => { + setScrollingVisibility(container, popup); + }, SHOW_CLASS_TIMEOUT); + + if (isModal()) { + fixScrollContainer(container, params.scrollbarPadding, initialBodyOverflow); + setAriaHidden(); + } + + if (!isToast() && !globalState.previousActiveElement) { + globalState.previousActiveElement = document.activeElement; + } + + if (typeof params.didOpen === 'function') { + setTimeout(() => params.didOpen(popup)); + } + + removeClass(container, swalClasses['no-transition']); + }; + + const swalOpenAnimationFinished = event => { + const popup = getPopup(); + + if (event.target !== popup) { + return; + } + + const container = getContainer(); + popup.removeEventListener(animationEndEvent, swalOpenAnimationFinished); + container.style.overflowY = 'auto'; + }; + + const setScrollingVisibility = (container, popup) => { + if (animationEndEvent && hasCssAnimation(popup)) { + container.style.overflowY = 'hidden'; + popup.addEventListener(animationEndEvent, swalOpenAnimationFinished); + } else { + container.style.overflowY = 'auto'; + } + }; + + const fixScrollContainer = (container, scrollbarPadding, initialBodyOverflow) => { + iOSfix(); + + if (scrollbarPadding && initialBodyOverflow !== 'hidden') { + fixScrollbar(); + } // sweetalert2/issues/1247 + + + setTimeout(() => { + container.scrollTop = 0; + }); + }; + + const addClasses$1 = (container, popup, params) => { + addClass(container, params.showClass.backdrop); // the workaround with setting/unsetting opacity is needed for #2019 and 2059 + + popup.style.setProperty('opacity', '0', 'important'); + show(popup, 'grid'); + setTimeout(() => { + // Animate popup right after showing it + addClass(popup, params.showClass.popup); // and remove the opacity workaround + + popup.style.removeProperty('opacity'); + }, SHOW_CLASS_TIMEOUT); // 10ms in order to fix #2062 + + addClass([document.documentElement, document.body], swalClasses.shown); + + if (params.heightAuto && params.backdrop && !params.toast) { + addClass([document.documentElement, document.body], swalClasses['height-auto']); + } + }; + + const handleInputOptionsAndValue = (instance, params) => { + if (params.input === 'select' || params.input === 'radio') { + handleInputOptions(instance, params); + } else if (['text', 'email', 'number', 'tel', 'textarea'].includes(params.input) && (hasToPromiseFn(params.inputValue) || isPromise(params.inputValue))) { + showLoading(getConfirmButton()); + handleInputValue(instance, params); + } + }; + const getInputValue = (instance, innerParams) => { + const input = instance.getInput(); + + if (!input) { + return null; + } + + switch (innerParams.input) { + case 'checkbox': + return getCheckboxValue(input); + + case 'radio': + return getRadioValue(input); + + case 'file': + return getFileValue(input); + + default: + return innerParams.inputAutoTrim ? input.value.trim() : input.value; + } + }; + + const getCheckboxValue = input => input.checked ? 1 : 0; + + const getRadioValue = input => input.checked ? input.value : null; + + const getFileValue = input => input.files.length ? input.getAttribute('multiple') !== null ? input.files : input.files[0] : null; + + const handleInputOptions = (instance, params) => { + const popup = getPopup(); + + const processInputOptions = inputOptions => populateInputOptions[params.input](popup, formatInputOptions(inputOptions), params); + + if (hasToPromiseFn(params.inputOptions) || isPromise(params.inputOptions)) { + showLoading(getConfirmButton()); + asPromise(params.inputOptions).then(inputOptions => { + instance.hideLoading(); + processInputOptions(inputOptions); + }); + } else if (typeof params.inputOptions === 'object') { + processInputOptions(params.inputOptions); + } else { + error("Unexpected type of inputOptions! Expected object, Map or Promise, got ".concat(typeof params.inputOptions)); + } + }; + + const handleInputValue = (instance, params) => { + const input = instance.getInput(); + hide(input); + asPromise(params.inputValue).then(inputValue => { + input.value = params.input === 'number' ? parseFloat(inputValue) || 0 : "".concat(inputValue); + show(input); + input.focus(); + instance.hideLoading(); + }).catch(err => { + error("Error in inputValue promise: ".concat(err)); + input.value = ''; + show(input); + input.focus(); + instance.hideLoading(); + }); + }; + + const populateInputOptions = { + select: (popup, inputOptions, params) => { + const select = getChildByClass(popup, swalClasses.select); + + const renderOption = (parent, optionLabel, optionValue) => { + const option = document.createElement('option'); + option.value = optionValue; + setInnerHtml(option, optionLabel); + option.selected = isSelected(optionValue, params.inputValue); + parent.appendChild(option); + }; + + inputOptions.forEach(inputOption => { + const optionValue = inputOption[0]; + const optionLabel = inputOption[1]; // spec: + // https://www.w3.org/TR/html401/interact/forms.html#h-17.6 + // "...all OPTGROUP elements must be specified directly within a SELECT element (i.e., groups may not be nested)..." + // check whether this is a + + if (Array.isArray(optionLabel)) { + // if it is an array, then it is an + const optgroup = document.createElement('optgroup'); + optgroup.label = optionValue; + optgroup.disabled = false; // not configurable for now + + select.appendChild(optgroup); + optionLabel.forEach(o => renderOption(optgroup, o[1], o[0])); + } else { + // case of + valueFormatted = formatInputOptions(valueFormatted); + } + + result.push([key, valueFormatted]); + }); + } else { + Object.keys(inputOptions).forEach(key => { + let valueFormatted = inputOptions[key]; + + if (typeof valueFormatted === 'object') { + // case of + valueFormatted = formatInputOptions(valueFormatted); + } + + result.push([key, valueFormatted]); + }); + } + + return result; + }; + + const isSelected = (optionValue, inputValue) => { + return inputValue && inputValue.toString() === optionValue.toString(); + }; + + const handleConfirmButtonClick = instance => { + const innerParams = privateProps.innerParams.get(instance); + instance.disableButtons(); + + if (innerParams.input) { + handleConfirmOrDenyWithInput(instance, 'confirm'); + } else { + confirm(instance, true); + } + }; + const handleDenyButtonClick = instance => { + const innerParams = privateProps.innerParams.get(instance); + instance.disableButtons(); + + if (innerParams.returnInputValueOnDeny) { + handleConfirmOrDenyWithInput(instance, 'deny'); + } else { + deny(instance, false); + } + }; + const handleCancelButtonClick = (instance, dismissWith) => { + instance.disableButtons(); + dismissWith(DismissReason.cancel); + }; + + const handleConfirmOrDenyWithInput = (instance, type + /* 'confirm' | 'deny' */ + ) => { + const innerParams = privateProps.innerParams.get(instance); + const inputValue = getInputValue(instance, innerParams); + + if (innerParams.inputValidator) { + handleInputValidator(instance, inputValue, type); + } else if (!instance.getInput().checkValidity()) { + instance.enableButtons(); + instance.showValidationMessage(innerParams.validationMessage); + } else if (type === 'deny') { + deny(instance, inputValue); + } else { + confirm(instance, inputValue); + } + }; + + const handleInputValidator = (instance, inputValue, type + /* 'confirm' | 'deny' */ + ) => { + const innerParams = privateProps.innerParams.get(instance); + instance.disableInput(); + const validationPromise = Promise.resolve().then(() => asPromise(innerParams.inputValidator(inputValue, innerParams.validationMessage))); + validationPromise.then(validationMessage => { + instance.enableButtons(); + instance.enableInput(); + + if (validationMessage) { + instance.showValidationMessage(validationMessage); + } else if (type === 'deny') { + deny(instance, inputValue); + } else { + confirm(instance, inputValue); + } + }); + }; + + const deny = (instance, value) => { + const innerParams = privateProps.innerParams.get(instance || undefined); + + if (innerParams.showLoaderOnDeny) { + showLoading(getDenyButton()); + } + + if (innerParams.preDeny) { + const preDenyPromise = Promise.resolve().then(() => asPromise(innerParams.preDeny(value, innerParams.validationMessage))); + preDenyPromise.then(preDenyValue => { + if (preDenyValue === false) { + instance.hideLoading(); + } else { + instance.closePopup({ + isDenied: true, + value: typeof preDenyValue === 'undefined' ? value : preDenyValue + }); + } + }); + } else { + instance.closePopup({ + isDenied: true, + value + }); + } + }; + + const succeedWith = (instance, value) => { + instance.closePopup({ + isConfirmed: true, + value + }); + }; + + const confirm = (instance, value) => { + const innerParams = privateProps.innerParams.get(instance || undefined); + + if (innerParams.showLoaderOnConfirm) { + showLoading(); // TODO: make showLoading an *instance* method + } + + if (innerParams.preConfirm) { + instance.resetValidationMessage(); + const preConfirmPromise = Promise.resolve().then(() => asPromise(innerParams.preConfirm(value, innerParams.validationMessage))); + preConfirmPromise.then(preConfirmValue => { + if (isVisible(getValidationMessage()) || preConfirmValue === false) { + instance.hideLoading(); + } else { + succeedWith(instance, typeof preConfirmValue === 'undefined' ? value : preConfirmValue); + } + }); + } else { + succeedWith(instance, value); + } + }; + + const addKeydownHandler = (instance, globalState, innerParams, dismissWith) => { + if (globalState.keydownTarget && globalState.keydownHandlerAdded) { + globalState.keydownTarget.removeEventListener('keydown', globalState.keydownHandler, { + capture: globalState.keydownListenerCapture + }); + globalState.keydownHandlerAdded = false; + } + + if (!innerParams.toast) { + globalState.keydownHandler = e => keydownHandler(instance, e, dismissWith); + + globalState.keydownTarget = innerParams.keydownListenerCapture ? window : getPopup(); + globalState.keydownListenerCapture = innerParams.keydownListenerCapture; + globalState.keydownTarget.addEventListener('keydown', globalState.keydownHandler, { + capture: globalState.keydownListenerCapture + }); + globalState.keydownHandlerAdded = true; + } + }; // Focus handling + + const setFocus = (innerParams, index, increment) => { + const focusableElements = getFocusableElements(); // search for visible elements and select the next possible match + + if (focusableElements.length) { + index = index + increment; // rollover to first item + + if (index === focusableElements.length) { + index = 0; // go to last item + } else if (index === -1) { + index = focusableElements.length - 1; + } + + return focusableElements[index].focus(); + } // no visible focusable elements, focus the popup + + + getPopup().focus(); + }; + const arrowKeysNextButton = ['ArrowRight', 'ArrowDown']; + const arrowKeysPreviousButton = ['ArrowLeft', 'ArrowUp']; + + const keydownHandler = (instance, e, dismissWith) => { + const innerParams = privateProps.innerParams.get(instance); + + if (!innerParams) { + return; // This instance has already been destroyed + } + + if (innerParams.stopKeydownPropagation) { + e.stopPropagation(); + } // ENTER + + + if (e.key === 'Enter') { + handleEnter(instance, e, innerParams); // TAB + } else if (e.key === 'Tab') { + handleTab(e, innerParams); // ARROWS - switch focus between buttons + } else if ([...arrowKeysNextButton, ...arrowKeysPreviousButton].includes(e.key)) { + handleArrows(e.key); // ESC + } else if (e.key === 'Escape') { + handleEsc(e, innerParams, dismissWith); + } + }; + + const handleEnter = (instance, e, innerParams) => { + // #720 #721 + if (e.isComposing) { + return; + } + + if (e.target && instance.getInput() && e.target.outerHTML === instance.getInput().outerHTML) { + if (['textarea', 'file'].includes(innerParams.input)) { + return; // do not submit + } + + clickConfirm(); + e.preventDefault(); + } + }; + + const handleTab = (e, innerParams) => { + const targetElement = e.target; + const focusableElements = getFocusableElements(); + let btnIndex = -1; + + for (let i = 0; i < focusableElements.length; i++) { + if (targetElement === focusableElements[i]) { + btnIndex = i; + break; + } + } + + if (!e.shiftKey) { + // Cycle to the next button + setFocus(innerParams, btnIndex, 1); + } else { + // Cycle to the prev button + setFocus(innerParams, btnIndex, -1); + } + + e.stopPropagation(); + e.preventDefault(); + }; + + const handleArrows = key => { + const confirmButton = getConfirmButton(); + const denyButton = getDenyButton(); + const cancelButton = getCancelButton(); + + if (![confirmButton, denyButton, cancelButton].includes(document.activeElement)) { + return; + } + + const sibling = arrowKeysNextButton.includes(key) ? 'nextElementSibling' : 'previousElementSibling'; + const buttonToFocus = document.activeElement[sibling]; + + if (buttonToFocus) { + buttonToFocus.focus(); + } + }; + + const handleEsc = (e, innerParams, dismissWith) => { + if (callIfFunction(innerParams.allowEscapeKey)) { + e.preventDefault(); + dismissWith(DismissReason.esc); + } + }; + + const handlePopupClick = (instance, domCache, dismissWith) => { + const innerParams = privateProps.innerParams.get(instance); + + if (innerParams.toast) { + handleToastClick(instance, domCache, dismissWith); + } else { + // Ignore click events that had mousedown on the popup but mouseup on the container + // This can happen when the user drags a slider + handleModalMousedown(domCache); // Ignore click events that had mousedown on the container but mouseup on the popup + + handleContainerMousedown(domCache); + handleModalClick(instance, domCache, dismissWith); + } + }; + + const handleToastClick = (instance, domCache, dismissWith) => { + // Closing toast by internal click + domCache.popup.onclick = () => { + const innerParams = privateProps.innerParams.get(instance); + + if (innerParams.showConfirmButton || innerParams.showDenyButton || innerParams.showCancelButton || innerParams.showCloseButton || innerParams.timer || innerParams.input) { + return; + } + + dismissWith(DismissReason.close); + }; + }; + + let ignoreOutsideClick = false; + + const handleModalMousedown = domCache => { + domCache.popup.onmousedown = () => { + domCache.container.onmouseup = function (e) { + domCache.container.onmouseup = undefined; // We only check if the mouseup target is the container because usually it doesn't + // have any other direct children aside of the popup + + if (e.target === domCache.container) { + ignoreOutsideClick = true; + } + }; + }; + }; + + const handleContainerMousedown = domCache => { + domCache.container.onmousedown = () => { + domCache.popup.onmouseup = function (e) { + domCache.popup.onmouseup = undefined; // We also need to check if the mouseup target is a child of the popup + + if (e.target === domCache.popup || domCache.popup.contains(e.target)) { + ignoreOutsideClick = true; + } + }; + }; + }; + + const handleModalClick = (instance, domCache, dismissWith) => { + domCache.container.onclick = e => { + const innerParams = privateProps.innerParams.get(instance); + + if (ignoreOutsideClick) { + ignoreOutsideClick = false; + return; + } + + if (e.target === domCache.container && callIfFunction(innerParams.allowOutsideClick)) { + dismissWith(DismissReason.backdrop); + } + }; + }; + + function _main(userParams, mixinParams = {}) { + showWarningsForParams(Object.assign({}, mixinParams, userParams)); + + if (globalState.currentInstance) { + globalState.currentInstance._destroy(); + + if (isModal()) { + unsetAriaHidden(); + } + } + + globalState.currentInstance = this; + const innerParams = prepareParams(userParams, mixinParams); + setParameters(innerParams); + Object.freeze(innerParams); // clear the previous timer + + if (globalState.timeout) { + globalState.timeout.stop(); + delete globalState.timeout; + } // clear the restore focus timeout + + + clearTimeout(globalState.restoreFocusTimeout); + const domCache = populateDomCache(this); + render(this, innerParams); + privateProps.innerParams.set(this, innerParams); + return swalPromise(this, domCache, innerParams); + } + + const prepareParams = (userParams, mixinParams) => { + const templateParams = getTemplateParams(userParams); + const params = Object.assign({}, defaultParams, mixinParams, templateParams, userParams); // precedence is described in #2131 + + params.showClass = Object.assign({}, defaultParams.showClass, params.showClass); + params.hideClass = Object.assign({}, defaultParams.hideClass, params.hideClass); + return params; + }; + + const swalPromise = (instance, domCache, innerParams) => { + return new Promise(resolve => { + // functions to handle all closings/dismissals + const dismissWith = dismiss => { + instance.closePopup({ + isDismissed: true, + dismiss + }); + }; + + privateMethods.swalPromiseResolve.set(instance, resolve); + + domCache.confirmButton.onclick = () => handleConfirmButtonClick(instance); + + domCache.denyButton.onclick = () => handleDenyButtonClick(instance); + + domCache.cancelButton.onclick = () => handleCancelButtonClick(instance, dismissWith); + + domCache.closeButton.onclick = () => dismissWith(DismissReason.close); + + handlePopupClick(instance, domCache, dismissWith); + addKeydownHandler(instance, globalState, innerParams, dismissWith); + handleInputOptionsAndValue(instance, innerParams); + openPopup(innerParams); + setupTimer(globalState, innerParams, dismissWith); + initFocus(domCache, innerParams); // Scroll container to top on open (#1247, #1946) + + setTimeout(() => { + domCache.container.scrollTop = 0; + }); + }); + }; + + const populateDomCache = instance => { + const domCache = { + popup: getPopup(), + container: getContainer(), + actions: getActions(), + confirmButton: getConfirmButton(), + denyButton: getDenyButton(), + cancelButton: getCancelButton(), + loader: getLoader(), + closeButton: getCloseButton(), + validationMessage: getValidationMessage(), + progressSteps: getProgressSteps() + }; + privateProps.domCache.set(instance, domCache); + return domCache; + }; + + const setupTimer = (globalState$$1, innerParams, dismissWith) => { + const timerProgressBar = getTimerProgressBar(); + hide(timerProgressBar); + + if (innerParams.timer) { + globalState$$1.timeout = new Timer(() => { + dismissWith('timer'); + delete globalState$$1.timeout; + }, innerParams.timer); + + if (innerParams.timerProgressBar) { + show(timerProgressBar); + setTimeout(() => { + if (globalState$$1.timeout && globalState$$1.timeout.running) { + // timer can be already stopped or unset at this point + animateTimerProgressBar(innerParams.timer); + } + }); + } + } + }; + + const initFocus = (domCache, innerParams) => { + if (innerParams.toast) { + return; + } + + if (!callIfFunction(innerParams.allowEnterKey)) { + return blurActiveElement(); + } + + if (!focusButton(domCache, innerParams)) { + setFocus(innerParams, -1, 1); + } + }; + + const focusButton = (domCache, innerParams) => { + if (innerParams.focusDeny && isVisible(domCache.denyButton)) { + domCache.denyButton.focus(); + return true; + } + + if (innerParams.focusCancel && isVisible(domCache.cancelButton)) { + domCache.cancelButton.focus(); + return true; + } + + if (innerParams.focusConfirm && isVisible(domCache.confirmButton)) { + domCache.confirmButton.focus(); + return true; + } + + return false; + }; + + const blurActiveElement = () => { + if (document.activeElement && typeof document.activeElement.blur === 'function') { + document.activeElement.blur(); + } + }; + + /** + * Updates popup parameters. + */ + + function update(params) { + const popup = getPopup(); + const innerParams = privateProps.innerParams.get(this); + + if (!popup || hasClass(popup, innerParams.hideClass.popup)) { + return warn("You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup."); + } + + const validUpdatableParams = {}; // assign valid params from `params` to `defaults` + + Object.keys(params).forEach(param => { + if (Swal.isUpdatableParameter(param)) { + validUpdatableParams[param] = params[param]; + } else { + warn("Invalid parameter to update: \"".concat(param, "\". Updatable params are listed here: https://github.com/sweetalert2/sweetalert2/blob/master/src/utils/params.js\n\nIf you think this parameter should be updatable, request it here: https://github.com/sweetalert2/sweetalert2/issues/new?template=02_feature_request.md")); + } + }); + const updatedParams = Object.assign({}, innerParams, validUpdatableParams); + render(this, updatedParams); + privateProps.innerParams.set(this, updatedParams); + Object.defineProperties(this, { + params: { + value: Object.assign({}, this.params, params), + writable: false, + enumerable: true + } + }); + } + + function _destroy() { + const domCache = privateProps.domCache.get(this); + const innerParams = privateProps.innerParams.get(this); + + if (!innerParams) { + return; // This instance has already been destroyed + } // Check if there is another Swal closing + + + if (domCache.popup && globalState.swalCloseEventFinishedCallback) { + globalState.swalCloseEventFinishedCallback(); + delete globalState.swalCloseEventFinishedCallback; + } // Check if there is a swal disposal defer timer + + + if (globalState.deferDisposalTimer) { + clearTimeout(globalState.deferDisposalTimer); + delete globalState.deferDisposalTimer; + } + + if (typeof innerParams.didDestroy === 'function') { + innerParams.didDestroy(); + } + + disposeSwal(this); + } + + const disposeSwal = instance => { + // Unset this.params so GC will dispose it (#1569) + delete instance.params; // Unset globalState props so GC will dispose globalState (#1569) + + delete globalState.keydownHandler; + delete globalState.keydownTarget; // Unset WeakMaps so GC will be able to dispose them (#1569) + + unsetWeakMaps(privateProps); + unsetWeakMaps(privateMethods); // Unset currentInstance + + delete globalState.currentInstance; + }; + + const unsetWeakMaps = obj => { + for (const i in obj) { + obj[i] = new WeakMap(); + } + }; + + + + var instanceMethods = /*#__PURE__*/Object.freeze({ + hideLoading: hideLoading, + disableLoading: hideLoading, + getInput: getInput$1, + close: close, + closePopup: close, + closeModal: close, + closeToast: close, + enableButtons: enableButtons, + disableButtons: disableButtons, + enableInput: enableInput, + disableInput: disableInput, + showValidationMessage: showValidationMessage, + resetValidationMessage: resetValidationMessage$1, + getProgressSteps: getProgressSteps$1, + _main: _main, + update: update, + _destroy: _destroy + }); + + let currentInstance; + + class SweetAlert { + constructor(...args) { + // Prevent run in Node env + if (typeof window === 'undefined') { + return; + } + + currentInstance = this; + const outerParams = Object.freeze(this.constructor.argsToParams(args)); + Object.defineProperties(this, { + params: { + value: outerParams, + writable: false, + enumerable: true, + configurable: true + } + }); + + const promise = this._main(this.params); + + privateProps.promise.set(this, promise); + } // `catch` cannot be the name of a module export, so we define our thenable methods here instead + + + then(onFulfilled) { + const promise = privateProps.promise.get(this); + return promise.then(onFulfilled); + } + + finally(onFinally) { + const promise = privateProps.promise.get(this); + return promise.finally(onFinally); + } + + } // Assign instance methods from src/instanceMethods/*.js to prototype + + + Object.assign(SweetAlert.prototype, instanceMethods); // Assign static methods from src/staticMethods/*.js to constructor + + Object.assign(SweetAlert, staticMethods); // Proxy to instance methods to constructor, for now, for backwards compatibility + + Object.keys(instanceMethods).forEach(key => { + SweetAlert[key] = function (...args) { + if (currentInstance) { + return currentInstance[key](...args); + } + }; + }); + SweetAlert.DismissReason = DismissReason; + SweetAlert.version = '11.1.5'; + + const Swal = SweetAlert; + Swal.default = Swal; + + return Swal; + +})); +if (typeof this !== 'undefined' && this.Sweetalert2){ this.swal = this.sweetAlert = this.Swal = this.SweetAlert = this.Sweetalert2} + +"undefined"!=typeof document&&function(e,t){var n=e.createElement("style");if(e.getElementsByTagName("head")[0].appendChild(n),n.styleSheet)n.styleSheet.disabled||(n.styleSheet.cssText=t);else try{n.innerHTML=t}catch(e){n.innerText=t}}(document,".swal2-popup.swal2-toast{box-sizing:border-box;grid-column:1/4!important;grid-row:1/4!important;grid-template-columns:1fr 99fr 1fr;padding:1em;overflow-y:hidden;background:#fff;box-shadow:0 0 .625em #d9d9d9;pointer-events:all}.swal2-popup.swal2-toast>*{grid-column:2}.swal2-popup.swal2-toast .swal2-title{margin:1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-loading{justify-content:center}.swal2-popup.swal2-toast .swal2-input{height:2em;margin:.5em;font-size:1em}.swal2-popup.swal2-toast .swal2-validation-message{font-size:1em}.swal2-popup.swal2-toast .swal2-footer{margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-popup.swal2-toast .swal2-close{grid-column:3/3;grid-row:1/99;align-self:center;width:.8em;height:.8em;margin:0;font-size:2em}.swal2-popup.swal2-toast .swal2-html-container{margin:1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-html-container:empty{padding:0}.swal2-popup.swal2-toast .swal2-loader{grid-column:1;grid-row:1/99;align-self:center;width:2em;height:2em;margin:.25em}.swal2-popup.swal2-toast .swal2-icon{grid-column:1;grid-row:1/99;align-self:center;width:2em;min-width:2em;height:2em;margin:0 .5em 0 0}.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:700}.swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-popup.swal2-toast .swal2-actions{justify-content:flex-start;height:auto;margin:0;margin-top:.3125em;padding:0}.swal2-popup.swal2-toast .swal2-styled{margin:.25em .5em;padding:.4em .6em;font-size:1em}.swal2-popup.swal2-toast .swal2-styled:focus{box-shadow:0 0 0 1px #fff,0 0 0 3px rgba(100,150,200,.5)}.swal2-popup.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;transform:rotate(45deg);border-radius:50%}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.8em;left:-.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.25em;left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-popup.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{-webkit-animation:swal2-toast-animate-success-line-tip .75s;animation:swal2-toast-animate-success-line-tip .75s}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{-webkit-animation:swal2-toast-animate-success-line-long .75s;animation:swal2-toast-animate-success-line-long .75s}.swal2-popup.swal2-toast.swal2-show{-webkit-animation:swal2-toast-show .5s;animation:swal2-toast-show .5s}.swal2-popup.swal2-toast.swal2-hide{-webkit-animation:swal2-toast-hide .1s forwards;animation:swal2-toast-hide .1s forwards}.swal2-container{display:grid;position:fixed;z-index:1060;top:0;right:0;bottom:0;left:0;box-sizing:border-box;grid-template-areas:\"top-start top top-end\" \"center-start center center-end\" \"bottom-start bottom-center bottom-end\";grid-template-rows:minmax(-webkit-min-content,auto) minmax(-webkit-min-content,auto) minmax(-webkit-min-content,auto);grid-template-rows:minmax(min-content,auto) minmax(min-content,auto) minmax(min-content,auto);height:100%;padding:.625em;overflow-x:hidden;transition:background-color .1s;-webkit-overflow-scrolling:touch}.swal2-container.swal2-backdrop-show,.swal2-container.swal2-noanimation{background:rgba(0,0,0,.4)}.swal2-container.swal2-backdrop-hide{background:0 0!important}.swal2-container.swal2-bottom-start,.swal2-container.swal2-center-start,.swal2-container.swal2-top-start{grid-template-columns:minmax(0,1fr) auto auto}.swal2-container.swal2-bottom,.swal2-container.swal2-center,.swal2-container.swal2-top{grid-template-columns:auto minmax(0,1fr) auto}.swal2-container.swal2-bottom-end,.swal2-container.swal2-center-end,.swal2-container.swal2-top-end{grid-template-columns:auto auto minmax(0,1fr)}.swal2-container.swal2-top-start>.swal2-popup{align-self:start}.swal2-container.swal2-top>.swal2-popup{grid-column:2;align-self:start;justify-self:center}.swal2-container.swal2-top-end>.swal2-popup,.swal2-container.swal2-top-right>.swal2-popup{grid-column:3;align-self:start;justify-self:end}.swal2-container.swal2-center-left>.swal2-popup,.swal2-container.swal2-center-start>.swal2-popup{grid-row:2;align-self:center}.swal2-container.swal2-center>.swal2-popup{grid-column:2;grid-row:2;align-self:center;justify-self:center}.swal2-container.swal2-center-end>.swal2-popup,.swal2-container.swal2-center-right>.swal2-popup{grid-column:3;grid-row:2;align-self:center;justify-self:end}.swal2-container.swal2-bottom-left>.swal2-popup,.swal2-container.swal2-bottom-start>.swal2-popup{grid-column:1;grid-row:3;align-self:end}.swal2-container.swal2-bottom>.swal2-popup{grid-column:2;grid-row:3;justify-self:center;align-self:end}.swal2-container.swal2-bottom-end>.swal2-popup,.swal2-container.swal2-bottom-right>.swal2-popup{grid-column:3;grid-row:3;align-self:end;justify-self:end}.swal2-container.swal2-grow-fullscreen>.swal2-popup,.swal2-container.swal2-grow-row>.swal2-popup{grid-column:1/4;width:100%}.swal2-container.swal2-grow-column>.swal2-popup,.swal2-container.swal2-grow-fullscreen>.swal2-popup{grid-row:1/4;align-self:stretch}.swal2-container.swal2-no-transition{transition:none!important}.swal2-popup{display:none;position:relative;box-sizing:border-box;grid-template-columns:minmax(0,100%);width:32em;max-width:100%;padding:0 0 1.25em;border:none;border-radius:5px;background:#fff;color:#545454;font-family:inherit;font-size:1rem}.swal2-popup:focus{outline:0}.swal2-popup.swal2-loading{overflow-y:hidden}.swal2-title{position:relative;max-width:100%;margin:0;padding:.8em 1em 0;color:#595959;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;word-wrap:break-word}.swal2-actions{display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:center;width:auto;margin:1.25em auto 0;padding:0}.swal2-actions:not(.swal2-loading) .swal2-styled[disabled]{opacity:.4}.swal2-actions:not(.swal2-loading) .swal2-styled:hover{background-image:linear-gradient(rgba(0,0,0,.1),rgba(0,0,0,.1))}.swal2-actions:not(.swal2-loading) .swal2-styled:active{background-image:linear-gradient(rgba(0,0,0,.2),rgba(0,0,0,.2))}.swal2-loader{display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;-webkit-animation:swal2-rotate-loading 1.5s linear 0s infinite normal;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 transparent #2778c4 transparent}.swal2-styled{margin:.3125em;padding:.625em 1.1em;transition:box-shadow .1s;box-shadow:0 0 0 3px transparent;font-weight:500}.swal2-styled:not([disabled]){cursor:pointer}.swal2-styled.swal2-confirm{border:0;border-radius:.25em;background:initial;background-color:#7367f0;color:#fff;font-size:1em}.swal2-styled.swal2-confirm:focus{box-shadow:0 0 0 3px rgba(115,103,240,.5)}.swal2-styled.swal2-deny{border:0;border-radius:.25em;background:initial;background-color:#ea5455;color:#fff;font-size:1em}.swal2-styled.swal2-deny:focus{box-shadow:0 0 0 3px rgba(234,84,85,.5)}.swal2-styled.swal2-cancel{border:0;border-radius:.25em;background:initial;background-color:#6e7d88;color:#fff;font-size:1em}.swal2-styled.swal2-cancel:focus{box-shadow:0 0 0 3px rgba(110,125,136,.5)}.swal2-styled.swal2-default-outline:focus{box-shadow:0 0 0 3px rgba(100,150,200,.5)}.swal2-styled:focus{outline:0}.swal2-styled::-moz-focus-inner{border:0}.swal2-footer{justify-content:center;margin:1em 0 0;padding:1em 1em 0;border-top:1px solid #eee;color:#545454;font-size:1em}.swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;grid-column:auto!important;height:.25em;overflow:hidden;border-bottom-right-radius:5px;border-bottom-left-radius:5px}.swal2-timer-progress-bar{width:100%;height:.25em;background:rgba(0,0,0,.2)}.swal2-image{max-width:100%;margin:2em auto 1em}.swal2-close{z-index:2;align-items:center;justify-content:center;width:1.2em;height:1.2em;margin-top:0;margin-right:0;margin-bottom:-1.2em;padding:0;overflow:hidden;transition:color .1s,box-shadow .1s;border:none;border-radius:5px;background:0 0;color:#ccc;font-family:serif;font-family:monospace;font-size:2.5em;cursor:pointer;justify-self:end}.swal2-close:hover{transform:none;background:0 0;color:#f27474}.swal2-close:focus{outline:0;box-shadow:inset 0 0 0 3px rgba(100,150,200,.5)}.swal2-close::-moz-focus-inner{border:0}.swal2-html-container{z-index:1;justify-content:center;margin:1em 1.6em .3em;padding:0;overflow:auto;color:#545454;font-size:1.125em;font-weight:400;line-height:normal;text-align:center;word-wrap:break-word;word-break:break-word}.swal2-checkbox,.swal2-file,.swal2-input,.swal2-radio,.swal2-select,.swal2-textarea{margin:1em 2em 0}.swal2-file,.swal2-input,.swal2-textarea{box-sizing:border-box;width:auto;transition:border-color .1s,box-shadow .1s;border:1px solid #d9d9d9;border-radius:.1875em;background:inherit;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px transparent;color:inherit;font-size:1.125em}.swal2-file.swal2-inputerror,.swal2-input.swal2-inputerror,.swal2-textarea.swal2-inputerror{border-color:#f27474!important;box-shadow:0 0 2px #f27474!important}.swal2-file:focus,.swal2-input:focus,.swal2-textarea:focus{border:1px solid #b4dbed;outline:0;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(100,150,200,.5)}.swal2-file::-moz-placeholder,.swal2-input::-moz-placeholder,.swal2-textarea::-moz-placeholder{color:#ccc}.swal2-file:-ms-input-placeholder,.swal2-input:-ms-input-placeholder,.swal2-textarea:-ms-input-placeholder{color:#ccc}.swal2-file::placeholder,.swal2-input::placeholder,.swal2-textarea::placeholder{color:#ccc}.swal2-range{margin:1em 2em 0;background:#fff}.swal2-range input{width:80%}.swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}.swal2-range input,.swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}.swal2-input{height:2.625em;padding:0 .75em}.swal2-file{width:75%;margin-right:auto;margin-left:auto;background:inherit;font-size:1.125em}.swal2-textarea{height:6.75em;padding:.75em}.swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:inherit;color:inherit;font-size:1.125em}.swal2-checkbox,.swal2-radio{align-items:center;justify-content:center;background:#fff;color:inherit}.swal2-checkbox label,.swal2-radio label{margin:0 .6em;font-size:1.125em}.swal2-checkbox input,.swal2-radio input{flex-shrink:0;margin:0 .4em}.swal2-input-label{display:flex;justify-content:center;margin:1em auto 0}.swal2-validation-message{align-items:center;justify-content:center;margin:1em 0 0;padding:.625em;overflow:hidden;background:#f0f0f0;color:#666;font-size:1em;font-weight:300}.swal2-validation-message::before{content:\"!\";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}.swal2-icon{position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:2.5em auto .6em;border:.25em solid transparent;border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}.swal2-icon.swal2-error{border-color:#f27474;color:#f27474}.swal2-icon.swal2-error .swal2-x-mark{position:relative;flex-grow:1}.swal2-icon.swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}.swal2-icon.swal2-error.swal2-icon-show{-webkit-animation:swal2-animate-error-icon .5s;animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-error.swal2-icon-show .swal2-x-mark{-webkit-animation:swal2-animate-error-x-mark .5s;animation:swal2-animate-error-x-mark .5s}.swal2-icon.swal2-warning{border-color:#facea8;color:#f8bb86}.swal2-icon.swal2-info{border-color:#9de0f6;color:#3fc3ee}.swal2-icon.swal2-question{border-color:#c9dae1;color:#87adbd}.swal2-icon.swal2-success{border-color:#a5dc86;color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;transform:rotate(45deg);border-radius:50%}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}.swal2-icon.swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-.25em;left:-.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}.swal2-icon.swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}.swal2-icon.swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}.swal2-icon.swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-tip{-webkit-animation:swal2-animate-success-line-tip .75s;animation:swal2-animate-success-line-tip .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-long{-webkit-animation:swal2-animate-success-line-long .75s;animation:swal2-animate-success-line-long .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-circular-line-right{-webkit-animation:swal2-rotate-success-circular-line 4.25s ease-in;animation:swal2-rotate-success-circular-line 4.25s ease-in}.swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:1.25em auto;padding:0;background:inherit;font-weight:600}.swal2-progress-steps li{display:inline-block;position:relative}.swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:#add8e6;color:#fff}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:#add8e6}.swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}[class^=swal2]{-webkit-tap-highlight-color:transparent}.swal2-show{-webkit-animation:swal2-show .3s;animation:swal2-show .3s}.swal2-hide{-webkit-animation:swal2-hide .15s forwards;animation:swal2-hide .15s forwards}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{margin-right:initial;margin-left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}@-webkit-keyframes swal2-toast-show{0%{transform:translateY(-.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0)}}@keyframes swal2-toast-show{0%{transform:translateY(-.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0)}}@-webkit-keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@-webkit-keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@-webkit-keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@-webkit-keyframes swal2-show{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}100%{transform:scale(1)}}@keyframes swal2-show{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}100%{transform:scale(1)}}@-webkit-keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(.5);opacity:0}}@keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(.5);opacity:0}}@-webkit-keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@-webkit-keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@-webkit-keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@-webkit-keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@-webkit-keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0);opacity:1}}@-webkit-keyframes swal2-rotate-loading{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes swal2-rotate-loading{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto!important}body.swal2-no-backdrop .swal2-container{background-color:transparent!important;pointer-events:none}body.swal2-no-backdrop .swal2-container .swal2-popup{pointer-events:all}body.swal2-no-backdrop .swal2-container .swal2-modal{box-shadow:0 0 10px rgba(0,0,0,.4)}@media print{body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow-y:scroll!important}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .swal2-container{position:static!important}}body.swal2-toast-shown .swal2-container{box-sizing:border-box;width:360px;max-width:100%;background-color:transparent;pointer-events:none}body.swal2-toast-shown .swal2-container.swal2-top{top:0;right:auto;bottom:auto;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{top:0;right:0;bottom:auto;left:auto}body.swal2-toast-shown .swal2-container.swal2-top-left,body.swal2-toast-shown .swal2-container.swal2-top-start{top:0;right:auto;bottom:auto;left:0}body.swal2-toast-shown .swal2-container.swal2-center-left,body.swal2-toast-shown .swal2-container.swal2-center-start{top:50%;right:auto;bottom:auto;left:0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{top:50%;right:auto;bottom:auto;left:50%;transform:translate(-50%,-50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{top:50%;right:0;bottom:auto;left:auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-left,body.swal2-toast-shown .swal2-container.swal2-bottom-start{top:auto;right:auto;bottom:0;left:0}body.swal2-toast-shown .swal2-container.swal2-bottom{top:auto;right:auto;bottom:0;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{top:auto;right:0;bottom:0;left:auto}"); \ No newline at end of file diff --git a/modules/blogging/app/Volo.BloggingTestApp/wwwroot/libs/sweetalert2/sweetalert2.all.min.js b/modules/blogging/app/Volo.BloggingTestApp/wwwroot/libs/sweetalert2/sweetalert2.all.min.js new file mode 100644 index 0000000000..57ff7ff176 --- /dev/null +++ b/modules/blogging/app/Volo.BloggingTestApp/wwwroot/libs/sweetalert2/sweetalert2.all.min.js @@ -0,0 +1,2 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).Sweetalert2=t()}(this,function(){"use strict";const l=Object.freeze({cancel:"cancel",backdrop:"backdrop",close:"close",esc:"esc",timer:"timer"}),t="SweetAlert2:",o=e=>e.charAt(0).toUpperCase()+e.slice(1),a=e=>Array.prototype.slice.call(e),s=e=>{console.warn("".concat(t," ").concat("object"==typeof e?e.join(" "):e))},r=e=>{console.error("".concat(t," ").concat(e))},n=[],i=(e,t)=>{t='"'.concat(e,'" is deprecated and will be removed in the next major release. Please use "').concat(t,'" instead.'),n.includes(t)||(n.push(t),s(t))},c=e=>"function"==typeof e?e():e,u=e=>e&&"function"==typeof e.toPromise,d=e=>u(e)?e.toPromise():Promise.resolve(e),p=e=>e&&Promise.resolve(e)===e,m=e=>e instanceof Element||(e=>"object"==typeof e&&e.jquery)(e);var e=e=>{const t={};for(const n in e)t[e[n]]="swal2-"+e[n];return t};const h=e(["container","shown","height-auto","iosfix","popup","modal","no-backdrop","no-transition","toast","toast-shown","show","hide","close","title","html-container","actions","confirm","deny","cancel","default-outline","footer","icon","icon-content","image","input","file","range","select","radio","checkbox","label","textarea","inputerror","input-label","validation-message","progress-steps","active-progress-step","progress-step","progress-step-line","loader","loading","styled","top","top-start","top-end","top-left","top-right","center","center-start","center-end","center-left","center-right","bottom","bottom-start","bottom-end","bottom-left","bottom-right","grow-row","grow-column","grow-fullscreen","rtl","timer-progress-bar","timer-progress-bar-container","scrollbar-measure","icon-success","icon-warning","icon-info","icon-question","icon-error"]),g=e(["success","warning","info","question","error"]),b=()=>document.body.querySelector(".".concat(h.container)),f=e=>{const t=b();return t?t.querySelector(e):null},y=e=>f(".".concat(e)),v=()=>y(h.popup),w=()=>y(h.icon),C=()=>y(h.title),k=()=>y(h["html-container"]),A=()=>y(h.image),B=()=>y(h["progress-steps"]),x=()=>y(h["validation-message"]),P=()=>f(".".concat(h.actions," .").concat(h.confirm)),E=()=>f(".".concat(h.actions," .").concat(h.deny));const S=()=>f(".".concat(h.loader)),T=()=>f(".".concat(h.actions," .").concat(h.cancel)),L=()=>y(h.actions),O=()=>y(h.footer),j=()=>y(h["timer-progress-bar"]),D=()=>y(h.close),I=()=>{const e=a(v().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')).sort((e,t)=>(e=parseInt(e.getAttribute("tabindex")),(t=parseInt(t.getAttribute("tabindex")))"-1"!==e.getAttribute("tabindex"));return(t=>{const n=[];for(let e=0;eG(e))},M=()=>!H()&&!document.body.classList.contains(h["no-backdrop"]),H=()=>document.body.classList.contains(h["toast-shown"]);const q={previousBodyPadding:null},V=(t,e)=>{if(t.textContent="",e){const n=new DOMParser,o=n.parseFromString(e,"text/html");a(o.querySelector("head").childNodes).forEach(e=>{t.appendChild(e)}),a(o.querySelector("body").childNodes).forEach(e=>{t.appendChild(e)})}},N=(t,e)=>{if(!e)return!1;var n=e.split(/\s+/);for(let e=0;e{var o,i;if(o=e,i=t,a(o.classList).forEach(e=>{Object.values(h).includes(e)||Object.values(g).includes(e)||Object.values(i.showClass).includes(e)||o.classList.remove(e)}),t.customClass&&t.customClass[n]){if("string"!=typeof t.customClass[n]&&!t.customClass[n].forEach)return s("Invalid type of customClass.".concat(n,'! Expected string or iterable object, got "').concat(typeof t.customClass[n],'"'));W(e,t.customClass[n])}},F=(e,t)=>{if(!t)return null;switch(t){case"select":case"textarea":case"file":return K(e,h[t]);case"checkbox":return e.querySelector(".".concat(h.checkbox," input"));case"radio":return e.querySelector(".".concat(h.radio," input:checked"))||e.querySelector(".".concat(h.radio," input:first-child"));case"range":return e.querySelector(".".concat(h.range," input"));default:return K(e,h.input)}},R=e=>{var t;e.focus(),"file"!==e.type&&(t=e.value,e.value="",e.value=t)},z=(e,t,n)=>{e&&t&&(t="string"==typeof t?t.split(/\s+/).filter(Boolean):t).forEach(t=>{e.forEach?e.forEach(e=>{n?e.classList.add(t):e.classList.remove(t)}):n?e.classList.add(t):e.classList.remove(t)})},W=(e,t)=>{z(e,t,!0)},_=(e,t)=>{z(e,t,!1)},K=(t,n)=>{for(let e=0;e{(n=n==="".concat(parseInt(n))?parseInt(n):n)||0===parseInt(n)?e.style[t]="number"==typeof n?"".concat(n,"px"):n:e.style.removeProperty(t)},Z=(e,t="flex")=>{e.style.display=t},J=e=>{e.style.display="none"},X=(e,t,n,o)=>{const i=e.querySelector(t);i&&(i.style[n]=o)},$=(e,t,n)=>{t?Z(e,n):J(e)},G=e=>!(!e||!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)),Q=()=>!G(P())&&!G(E())&&!G(T()),ee=e=>!!(e.scrollHeight>e.clientHeight),te=e=>{const t=window.getComputedStyle(e);var n=parseFloat(t.getPropertyValue("animation-duration")||"0"),e=parseFloat(t.getPropertyValue("transition-duration")||"0");return 0{const n=j();G(n)&&(t&&(n.style.transition="none",n.style.width="100%"),setTimeout(()=>{n.style.transition="width ".concat(e/1e3,"s linear"),n.style.width="0%"},10))},oe=()=>"undefined"==typeof window||"undefined"==typeof document,ie='\n
    \n \n
      \n
      \n \n

      \n
      \n \n \n
      \n \n \n
      \n \n
      \n \n \n
      \n
      \n
      \n \n \n \n
      \n
      \n
      \n
      \n
      \n
      \n').replace(/(^|\n)\s*/g,""),ae=()=>{ln.isVisible()&&ln.resetValidationMessage()},se=e=>{var t=(()=>{const e=b();return!!e&&(e.remove(),_([document.documentElement,document.body],[h["no-backdrop"],h["toast-shown"],h["has-column"]]),!0)})();if(oe())r("SweetAlert2 requires document to initialize");else{const n=document.createElement("div");n.className=h.container,t&&W(n,h["no-transition"]),V(n,ie);const o="string"==typeof(t=e.target)?document.querySelector(t):t;o.appendChild(n),(e=>{const t=v();t.setAttribute("role",e.toast?"alert":"dialog"),t.setAttribute("aria-live",e.toast?"polite":"assertive"),e.toast||t.setAttribute("aria-modal","true")})(e),e=o,"rtl"===window.getComputedStyle(e).direction&&W(b(),h.rtl),(()=>{const e=v(),t=K(e,h.input),n=K(e,h.file),o=e.querySelector(".".concat(h.range," input")),i=e.querySelector(".".concat(h.range," output")),a=K(e,h.select),s=e.querySelector(".".concat(h.checkbox," input")),r=K(e,h.textarea);t.oninput=ae,n.onchange=ae,a.onchange=ae,s.onchange=ae,r.oninput=ae,o.oninput=()=>{ae(),i.value=o.value},o.onchange=()=>{ae(),o.nextSibling.value=o.value}})()}},re=(e,t)=>{e instanceof HTMLElement?t.appendChild(e):"object"==typeof e?ce(e,t):e&&V(t,e)},ce=(e,t)=>{e.jquery?le(t,e):V(t,e.toString())},le=(t,n)=>{if(t.textContent="",0 in n)for(let e=0;e in n;e++)t.appendChild(n[e].cloneNode(!0));else t.appendChild(n.cloneNode(!0))},ue=(()=>{if(oe())return!1;var e=document.createElement("div"),t={WebkitAnimation:"webkitAnimationEnd",OAnimation:"oAnimationEnd oanimationend",animation:"animationend"};for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&void 0!==e.style[n])return t[n];return!1})(),de=(e,t)=>{const n=L();var o=S(),i=P(),a=E(),s=T();(t.showConfirmButton||t.showDenyButton||t.showCancelButton?Z:J)(n),U(n,t,"actions"),pe(i,"confirm",t),pe(a,"deny",t),pe(s,"cancel",t),function(e,t,n,o){if(!o.buttonsStyling)return _([e,t,n],h.styled);W([e,t,n],h.styled),o.confirmButtonColor&&(e.style.backgroundColor=o.confirmButtonColor,W(e,h["default-outline"]));o.denyButtonColor&&(t.style.backgroundColor=o.denyButtonColor,W(t,h["default-outline"]));o.cancelButtonColor&&(n.style.backgroundColor=o.cancelButtonColor,W(n,h["default-outline"]))}(i,a,s,t),t.reverseButtons&&(n.insertBefore(s,o),n.insertBefore(a,o),n.insertBefore(i,o)),V(o,t.loaderHtml),U(o,t,"loader")};function pe(e,t,n){$(e,n["show".concat(o(t),"Button")],"inline-block"),V(e,n["".concat(t,"ButtonText")]),e.setAttribute("aria-label",n["".concat(t,"ButtonAriaLabel")]),e.className=h[t],U(e,n,"".concat(t,"Button")),W(e,n["".concat(t,"ButtonClass")])}const me=(e,t)=>{var n,o,i=b();i&&(o=i,"string"==typeof(n=t.backdrop)?o.style.background=n:n||W([document.documentElement,document.body],h["no-backdrop"]),o=i,(n=t.position)in h?W(o,h[n]):(s('The "position" parameter is not valid, defaulting to "center"'),W(o,h.center)),n=i,!(o=t.grow)||"string"!=typeof o||(o="grow-".concat(o))in h&&W(n,h[o]),U(i,t,"container"))};var he={promise:new WeakMap,innerParams:new WeakMap,domCache:new WeakMap};const ge=["input","file","range","select","radio","checkbox","textarea"],be=e=>{if(!ke[e.input])return r('Unexpected type of input! Expected "text", "email", "password", "number", "tel", "select", "radio", "checkbox", "textarea", "file" or "url", got "'.concat(e.input,'"'));var t=Ce(e.input);const n=ke[e.input](t,e);Z(n),setTimeout(()=>{R(n)})},fe=(e,t)=>{const n=F(v(),e);if(n){(t=>{for(let e=0;e{var t=Ce(e.input);e.customClass&&W(t,e.customClass.input)},ve=(e,t)=>{e.placeholder&&!t.inputPlaceholder||(e.placeholder=t.inputPlaceholder)},we=(e,t,n)=>{if(n.inputLabel){e.id=h.input;const i=document.createElement("label");var o=h["input-label"];i.setAttribute("for",e.id),i.className=o,W(i,n.customClass.inputLabel),i.innerText=n.inputLabel,t.insertAdjacentElement("beforebegin",i)}},Ce=e=>{e=h[e]||h.input;return K(v(),e)},ke={};ke.text=ke.email=ke.password=ke.number=ke.tel=ke.url=(e,t)=>("string"==typeof t.inputValue||"number"==typeof t.inputValue?e.value=t.inputValue:p(t.inputValue)||s('Unexpected type of inputValue! Expected "string", "number" or "Promise", got "'.concat(typeof t.inputValue,'"')),we(e,e,t),ve(e,t),e.type=t.input,e),ke.file=(e,t)=>(we(e,e,t),ve(e,t),e),ke.range=(e,t)=>{const n=e.querySelector("input"),o=e.querySelector("output");return n.value=t.inputValue,n.type=t.input,o.value=t.inputValue,we(n,e,t),e},ke.select=(e,t)=>{if(e.textContent="",t.inputPlaceholder){const n=document.createElement("option");V(n,t.inputPlaceholder),n.value="",n.disabled=!0,n.selected=!0,e.appendChild(n)}return we(e,e,t),e},ke.radio=e=>(e.textContent="",e),ke.checkbox=(e,t)=>{const n=F(v(),"checkbox");n.value=1,n.id=h.checkbox,n.checked=Boolean(t.inputValue);var o=e.querySelector("span");return V(o,t.inputPlaceholder),e},ke.textarea=(n,e)=>{n.value=e.inputValue,ve(n,e),we(n,n,e);return setTimeout(()=>{if("MutationObserver"in window){const t=parseInt(window.getComputedStyle(v()).width);new MutationObserver(()=>{var e,e=n.offsetWidth+(e=n,parseInt(window.getComputedStyle(e).marginLeft)+parseInt(window.getComputedStyle(e).marginRight));e>t?v().style.width="".concat(e,"px"):v().style.width=null}).observe(n,{attributes:!0,attributeFilter:["style"]})}}),n};const Ae=(e,t)=>{const n=k();U(n,t,"htmlContainer"),t.html?(re(t.html,n),Z(n,"block")):t.text?(n.textContent=t.text,Z(n,"block")):J(n),((e,o)=>{const i=v();e=he.innerParams.get(e);const a=!e||o.input!==e.input;ge.forEach(e=>{var t=h[e];const n=K(i,t);fe(e,o.inputAttributes),n.className=t,a&&J(n)}),o.input&&(a&&be(o),ye(o))})(e,t)},Be=(e,t)=>{for(const n in g)t.icon!==n&&_(e,g[n]);W(e,g[t.icon]),Ee(e,t),xe(),U(e,t,"icon")},xe=()=>{const e=v();var t=window.getComputedStyle(e).getPropertyValue("background-color");const n=e.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix");for(let e=0;e{var n;e.textContent="",t.iconHtml?V(e,Se(t.iconHtml)):"success"===t.icon?V(e,'\n
      \n \n
      \n
      \n '):"error"===t.icon?V(e,'\n \n \n \n \n '):(n={question:"?",warning:"!",info:"i"},V(e,Se(n[t.icon])))},Ee=(e,t)=>{if(t.iconColor){e.style.color=t.iconColor,e.style.borderColor=t.iconColor;for(const n of[".swal2-success-line-tip",".swal2-success-line-long",".swal2-x-mark-line-left",".swal2-x-mark-line-right"])X(e,n,"backgroundColor",t.iconColor);X(e,".swal2-success-ring","borderColor",t.iconColor)}},Se=e=>'
      ').concat(e,"
      "),Te=(e,o)=>{const i=B();if(!o.progressSteps||0===o.progressSteps.length)return J(i);Z(i),i.textContent="",o.currentProgressStep>=o.progressSteps.length&&s("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),o.progressSteps.forEach((e,t)=>{var n,e=(n=e,e=document.createElement("li"),W(e,h["progress-step"]),V(e,n),e);i.appendChild(e),t===o.currentProgressStep&&W(e,h["active-progress-step"]),t!==o.progressSteps.length-1&&(t=(e=>{const t=document.createElement("li");return W(t,h["progress-step-line"]),e.progressStepsDistance&&(t.style.width=e.progressStepsDistance),t})(o),i.appendChild(t))})},Le=(e,t)=>{e.className="".concat(h.popup," ").concat(G(e)?t.showClass.popup:""),t.toast?(W([document.documentElement,document.body],h["toast-shown"]),W(e,h.toast)):W(e,h.modal),U(e,t,"popup"),"string"==typeof t.customClass&&W(e,t.customClass),t.icon&&W(e,h["icon-".concat(t.icon)])},Oe=(e,t)=>{var n,o,i;(e=>{var t=b();const n=v();e.toast?(Y(t,"width",e.width),n.style.width="100%",n.insertBefore(S(),w())):Y(n,"width",e.width),Y(n,"padding",e.padding),e.background&&(n.style.background=e.background),J(x()),Le(n,e)})(t),me(0,t),Te(0,t),i=e,n=t,o=he.innerParams.get(i),i=w(),o&&n.icon===o.icon?(Pe(i,n),Be(i,n)):n.icon||n.iconHtml?n.icon&&-1===Object.keys(g).indexOf(n.icon)?(r('Unknown icon! Expected "success", "error", "warning", "info" or "question", got "'.concat(n.icon,'"')),J(i)):(Z(i),Pe(i,n),Be(i,n),W(i,n.showClass.icon)):J(i),(e=>{const t=A();if(!e.imageUrl)return J(t);Z(t,""),t.setAttribute("src",e.imageUrl),t.setAttribute("alt",e.imageAlt),Y(t,"width",e.imageWidth),Y(t,"height",e.imageHeight),t.className=h.image,U(t,e,"image")})(t),(e=>{const t=C();$(t,e.title||e.titleText,"block"),e.title&&re(e.title,t),e.titleText&&(t.innerText=e.titleText),U(t,e,"title")})(t),(e=>{const t=D();V(t,e.closeButtonHtml),U(t,e,"closeButton"),$(t,e.showCloseButton),t.setAttribute("aria-label",e.closeButtonAriaLabel)})(t),Ae(e,t),de(0,t),i=t,e=O(),$(e,i.footer),i.footer&&re(i.footer,e),U(e,i,"footer"),"function"==typeof t.didRender&&t.didRender(v())};const je=()=>P()&&P().click();const De=e=>{let t=v();t||ln.fire(),t=v();var n=S();H()?J(w()):Ie(t,e),Z(n),t.setAttribute("data-loading",!0),t.setAttribute("aria-busy",!0),t.focus()},Ie=(e,t)=>{var n=L();const o=S();!t&&G(P())&&(t=P()),Z(n),t&&(J(t),o.setAttribute("data-button-to-replace",t.className)),o.parentNode.insertBefore(o,t),W([e,n],h.loading)},Me={},He=o=>new Promise(e=>{if(!o)return e();var t=window.scrollX,n=window.scrollY;Me.restoreFocusTimeout=setTimeout(()=>{Me.previousActiveElement&&Me.previousActiveElement.focus?(Me.previousActiveElement.focus(),Me.previousActiveElement=null):document.body&&document.body.focus(),e()},100),window.scrollTo(t,n)});const qe=()=>{if(Me.timeout)return(()=>{const e=j();var t=parseInt(window.getComputedStyle(e).width);e.style.removeProperty("transition"),e.style.width="100%";var n=parseInt(window.getComputedStyle(e).width),n=parseInt(t/n*100);e.style.removeProperty("transition"),e.style.width="".concat(n,"%")})(),Me.timeout.stop()},Ve=()=>{if(Me.timeout){var e=Me.timeout.start();return ne(e),e}};let Ne=!1;const Ue={};const Fe=t=>{for(let e=t.target;e&&e!==document;e=e.parentNode)for(const o in Ue){var n=e.getAttribute(o);if(n)return void Ue[o].fire({template:n})}},Re={title:"",titleText:"",text:"",html:"",footer:"",icon:void 0,iconColor:void 0,iconHtml:void 0,template:void 0,toast:!1,showClass:{popup:"swal2-show",backdrop:"swal2-backdrop-show",icon:"swal2-icon-show"},hideClass:{popup:"swal2-hide",backdrop:"swal2-backdrop-hide",icon:"swal2-icon-hide"},customClass:{},target:"body",backdrop:!0,heightAuto:!0,allowOutsideClick:!0,allowEscapeKey:!0,allowEnterKey:!0,stopKeydownPropagation:!0,keydownListenerCapture:!1,showConfirmButton:!0,showDenyButton:!1,showCancelButton:!1,preConfirm:void 0,preDeny:void 0,confirmButtonText:"OK",confirmButtonAriaLabel:"",confirmButtonColor:void 0,denyButtonText:"No",denyButtonAriaLabel:"",denyButtonColor:void 0,cancelButtonText:"Cancel",cancelButtonAriaLabel:"",cancelButtonColor:void 0,buttonsStyling:!0,reverseButtons:!1,focusConfirm:!0,focusDeny:!1,focusCancel:!1,returnFocus:!0,showCloseButton:!1,closeButtonHtml:"×",closeButtonAriaLabel:"Close this dialog",loaderHtml:"",showLoaderOnConfirm:!1,showLoaderOnDeny:!1,imageUrl:void 0,imageWidth:void 0,imageHeight:void 0,imageAlt:"",timer:void 0,timerProgressBar:!1,width:void 0,padding:void 0,background:void 0,input:void 0,inputPlaceholder:"",inputLabel:"",inputValue:"",inputOptions:{},inputAutoTrim:!0,inputAttributes:{},inputValidator:void 0,returnInputValueOnDeny:!1,validationMessage:void 0,grow:!1,position:"center",progressSteps:[],currentProgressStep:void 0,progressStepsDistance:void 0,willOpen:void 0,didOpen:void 0,didRender:void 0,willClose:void 0,didClose:void 0,didDestroy:void 0,scrollbarPadding:!0},ze=["allowEscapeKey","allowOutsideClick","background","buttonsStyling","cancelButtonAriaLabel","cancelButtonColor","cancelButtonText","closeButtonAriaLabel","closeButtonHtml","confirmButtonAriaLabel","confirmButtonColor","confirmButtonText","currentProgressStep","customClass","denyButtonAriaLabel","denyButtonColor","denyButtonText","didClose","didDestroy","footer","hideClass","html","icon","iconColor","iconHtml","imageAlt","imageHeight","imageUrl","imageWidth","preConfirm","preDeny","progressSteps","returnFocus","reverseButtons","showCancelButton","showCloseButton","showConfirmButton","showDenyButton","text","title","titleText","willClose"],We={},_e=["allowOutsideClick","allowEnterKey","backdrop","focusConfirm","focusDeny","focusCancel","returnFocus","heightAuto","keydownListenerCapture"],Ke=e=>Object.prototype.hasOwnProperty.call(Re,e);const Ye=e=>We[e],Ze=e=>{!e.backdrop&&e.allowOutsideClick&&s('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`');for(const o in e)n=o,Ke(n)||s('Unknown parameter "'.concat(n,'"')),e.toast&&(t=o,_e.includes(t)&&s('The parameter "'.concat(t,'" is incompatible with toasts'))),t=o,Ye(t)&&i(t,Ye(t));var t,n};var Je=Object.freeze({isValidParameter:Ke,isUpdatableParameter:e=>-1!==ze.indexOf(e),isDeprecatedParameter:Ye,argsToParams:n=>{const o={};return"object"!=typeof n[0]||m(n[0])?["title","html","icon"].forEach((e,t)=>{t=n[t];"string"==typeof t||m(t)?o[e]=t:void 0!==t&&r("Unexpected type of ".concat(e,'! Expected "string" or "Element", got ').concat(typeof t))}):Object.assign(o,n[0]),o},isVisible:()=>G(v()),clickConfirm:je,clickDeny:()=>E()&&E().click(),clickCancel:()=>T()&&T().click(),getContainer:b,getPopup:v,getTitle:C,getHtmlContainer:k,getImage:A,getIcon:w,getInputLabel:()=>y(h["input-label"]),getCloseButton:D,getActions:L,getConfirmButton:P,getDenyButton:E,getCancelButton:T,getLoader:S,getFooter:O,getTimerProgressBar:j,getFocusableElements:I,getValidationMessage:x,isLoading:()=>v().hasAttribute("data-loading"),fire:function(...e){return new this(...e)},mixin:function(n){class e extends this{_main(e,t){return super._main(e,Object.assign({},n,t))}}return e},showLoading:De,enableLoading:De,getTimerLeft:()=>Me.timeout&&Me.timeout.getTimerLeft(),stopTimer:qe,resumeTimer:Ve,toggleTimer:()=>{var e=Me.timeout;return e&&(e.running?qe:Ve)()},increaseTimer:e=>{if(Me.timeout){e=Me.timeout.increase(e);return ne(e,!0),e}},isTimerRunning:()=>Me.timeout&&Me.timeout.isRunning(),bindClickHandler:function(e="data-swal-template"){Ue[e]=this,Ne||(document.body.addEventListener("click",Fe),Ne=!0)}});function Xe(){var e=he.innerParams.get(this);if(e){const t=he.domCache.get(this);J(t.loader),H()?e.icon&&Z(w()):(e=>{const t=e.popup.getElementsByClassName(e.loader.getAttribute("data-button-to-replace"));if(t.length)Z(t[0],"inline-block");else if(Q())J(e.actions)})(t),_([t.popup,t.actions],h.loading),t.popup.removeAttribute("aria-busy"),t.popup.removeAttribute("data-loading"),t.confirmButton.disabled=!1,t.denyButton.disabled=!1,t.cancelButton.disabled=!1}}const $e=()=>{null===q.previousBodyPadding&&document.body.scrollHeight>window.innerHeight&&(q.previousBodyPadding=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight="".concat(q.previousBodyPadding+(()=>{const e=document.createElement("div");e.className=h["scrollbar-measure"],document.body.appendChild(e);var t=e.getBoundingClientRect().width-e.clientWidth;return document.body.removeChild(e),t})(),"px"))},Ge=()=>{navigator.userAgent.match(/(CriOS|FxiOS|EdgiOS|YaBrowser|UCBrowser)/i)||v().scrollHeight>window.innerHeight-44&&(b().style.paddingBottom="".concat(44,"px"))},Qe=()=>{const e=b();let t;e.ontouchstart=e=>{t=et(e)},e.ontouchmove=e=>{t&&(e.preventDefault(),e.stopPropagation())}},et=e=>{var t=e.target,n=b();return!tt(e)&&!nt(e)&&(t===n||!(ee(n)||"INPUT"===t.tagName||"TEXTAREA"===t.tagName||ee(k())&&k().contains(t)))},tt=e=>e.touches&&e.touches.length&&"stylus"===e.touches[0].touchType,nt=e=>e.touches&&1{const e=a(document.body.children);e.forEach(e=>{e.hasAttribute("data-previous-aria-hidden")?(e.setAttribute("aria-hidden",e.getAttribute("data-previous-aria-hidden")),e.removeAttribute("data-previous-aria-hidden")):e.removeAttribute("aria-hidden")})};var it={swalPromiseResolve:new WeakMap};function at(e,t,n,o){H()?ct(e,o):(He(n).then(()=>ct(e,o)),Me.keydownTarget.removeEventListener("keydown",Me.keydownHandler,{capture:Me.keydownListenerCapture}),Me.keydownHandlerAdded=!1),/^((?!chrome|android).)*safari/i.test(navigator.userAgent)?(t.setAttribute("style","display:none !important"),t.removeAttribute("class"),t.innerHTML=""):t.remove(),M()&&(null!==q.previousBodyPadding&&(document.body.style.paddingRight="".concat(q.previousBodyPadding,"px"),q.previousBodyPadding=null),N(document.body,h.iosfix)&&(t=parseInt(document.body.style.top,10),_(document.body,h.iosfix),document.body.style.top="",document.body.scrollTop=-1*t),ot()),_([document.documentElement,document.body],[h.shown,h["height-auto"],h["no-backdrop"],h["toast-shown"]])}function st(e){var t=v();if(t){e=void 0!==(o=e)?Object.assign({isConfirmed:!1,isDenied:!1,isDismissed:!1},o):{isConfirmed:!1,isDenied:!1,isDismissed:!0};var n=he.innerParams.get(this);if(n&&!N(t,n.hideClass.popup)){const i=it.swalPromiseResolve.get(this);_(t,n.showClass.popup),W(t,n.hideClass.popup);var o=b();_(o,n.showClass.backdrop),W(o,n.hideClass.backdrop),((e,t,n)=>{const o=b(),i=ue&&te(t);if(typeof n.willClose==="function")n.willClose(t);if(i)rt(e,t,o,n.returnFocus,n.didClose);else at(e,o,n.returnFocus,n.didClose)})(this,t,n),i(e)}}}const rt=(e,t,n,o,i)=>{Me.swalCloseEventFinishedCallback=at.bind(null,e,n,o,i),t.addEventListener(ue,function(e){e.target===t&&(Me.swalCloseEventFinishedCallback(),delete Me.swalCloseEventFinishedCallback)})},ct=(e,t)=>{setTimeout(()=>{"function"==typeof t&&t.bind(e.params)(),e._destroy()})};function lt(e,t,n){const o=he.domCache.get(e);t.forEach(e=>{o[e].disabled=n})}function ut(e,t){if(!e)return!1;if("radio"===e.type){const n=e.parentNode.parentNode,o=n.querySelectorAll("input");for(let e=0;e/^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]{2,24}$/.test(e)?Promise.resolve():Promise.resolve(t||"Invalid email address"),url:(e,t)=>/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(e)?Promise.resolve():Promise.resolve(t||"Invalid URL")};function mt(e){var t,n;(t=e).inputValidator||Object.keys(pt).forEach(e=>{t.input===e&&(t.inputValidator=pt[e])}),e.showLoaderOnConfirm&&!e.preConfirm&&s("showLoaderOnConfirm is set to true, but preConfirm is not defined.\nshowLoaderOnConfirm should be used together with preConfirm, see usage example:\nhttps://sweetalert2.github.io/#ajax-request"),(n=e).target&&("string"!=typeof n.target||document.querySelector(n.target))&&("string"==typeof n.target||n.target.appendChild)||(s('Target parameter is not valid, defaulting to "body"'),n.target="body"),"string"==typeof e.title&&(e.title=e.title.split("\n").join("
      ")),se(e)}const ht=["swal-title","swal-html","swal-footer"],gt=e=>{e="string"==typeof e.template?document.querySelector(e.template):e.template;if(!e)return{};e=e.content;return kt(e),Object.assign(bt(e),ft(e),yt(e),vt(e),wt(e),Ct(e,ht))},bt=e=>{const o={};return a(e.querySelectorAll("swal-param")).forEach(e=>{At(e,["name","value"]);var t=e.getAttribute("name");let n=e.getAttribute("value");"boolean"==typeof Re[t]&&"false"===n&&(n=!1),"object"==typeof Re[t]&&(n=JSON.parse(n)),o[t]=n}),o},ft=e=>{const n={};return a(e.querySelectorAll("swal-button")).forEach(e=>{At(e,["type","color","aria-label"]);var t=e.getAttribute("type");n["".concat(t,"ButtonText")]=e.innerHTML,n["show".concat(o(t),"Button")]=!0,e.hasAttribute("color")&&(n["".concat(t,"ButtonColor")]=e.getAttribute("color")),e.hasAttribute("aria-label")&&(n["".concat(t,"ButtonAriaLabel")]=e.getAttribute("aria-label"))}),n},yt=e=>{const t={},n=e.querySelector("swal-image");return n&&(At(n,["src","width","height","alt"]),n.hasAttribute("src")&&(t.imageUrl=n.getAttribute("src")),n.hasAttribute("width")&&(t.imageWidth=n.getAttribute("width")),n.hasAttribute("height")&&(t.imageHeight=n.getAttribute("height")),n.hasAttribute("alt")&&(t.imageAlt=n.getAttribute("alt"))),t},vt=e=>{const t={},n=e.querySelector("swal-icon");return n&&(At(n,["type","color"]),n.hasAttribute("type")&&(t.icon=n.getAttribute("type")),n.hasAttribute("color")&&(t.iconColor=n.getAttribute("color")),t.iconHtml=n.innerHTML),t},wt=e=>{const n={},t=e.querySelector("swal-input");t&&(At(t,["type","label","placeholder","value"]),n.input=t.getAttribute("type")||"text",t.hasAttribute("label")&&(n.inputLabel=t.getAttribute("label")),t.hasAttribute("placeholder")&&(n.inputPlaceholder=t.getAttribute("placeholder")),t.hasAttribute("value")&&(n.inputValue=t.getAttribute("value")));e=e.querySelectorAll("swal-input-option");return e.length&&(n.inputOptions={},a(e).forEach(e=>{At(e,["value"]);var t=e.getAttribute("value"),e=e.innerHTML;n.inputOptions[t]=e})),n},Ct=(e,t)=>{const n={};for(const o in t){const i=t[o],a=e.querySelector(i);a&&(At(a,[]),n[i.replace(/^swal-/,"")]=a.innerHTML.trim())}return n},kt=e=>{const t=ht.concat(["swal-param","swal-button","swal-image","swal-icon","swal-input","swal-input-option"]);a(e.children).forEach(e=>{e=e.tagName.toLowerCase();-1===t.indexOf(e)&&s("Unrecognized element <".concat(e,">"))})},At=(t,n)=>{a(t.attributes).forEach(e=>{-1===n.indexOf(e.name)&&s(['Unrecognized attribute "'.concat(e.name,'" on <').concat(t.tagName.toLowerCase(),">."),"".concat(n.length?"Allowed attributes are: ".concat(n.join(", ")):"To set the value, use HTML within the element.")])})},Bt=e=>{const t=b(),n=v();"function"==typeof e.willOpen&&e.willOpen(n);var o=window.getComputedStyle(document.body).overflowY;St(t,n,e),setTimeout(()=>{Pt(t,n)},10),M()&&(Et(t,e.scrollbarPadding,o),(()=>{const e=a(document.body.children);e.forEach(e=>{e===b()||e.contains(b())||(e.hasAttribute("aria-hidden")&&e.setAttribute("data-previous-aria-hidden",e.getAttribute("aria-hidden")),e.setAttribute("aria-hidden","true"))})})()),H()||Me.previousActiveElement||(Me.previousActiveElement=document.activeElement),"function"==typeof e.didOpen&&setTimeout(()=>e.didOpen(n)),_(t,h["no-transition"])},xt=e=>{const t=v();if(e.target===t){const n=b();t.removeEventListener(ue,xt),n.style.overflowY="auto"}},Pt=(e,t)=>{ue&&te(t)?(e.style.overflowY="hidden",t.addEventListener(ue,xt)):e.style.overflowY="auto"},Et=(e,t,n)=>{var o;(/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream||"MacIntel"===navigator.platform&&1{e.scrollTop=0})},St=(e,t,n)=>{W(e,n.showClass.backdrop),t.style.setProperty("opacity","0","important"),Z(t,"grid"),setTimeout(()=>{W(t,n.showClass.popup),t.style.removeProperty("opacity")},10),W([document.documentElement,document.body],h.shown),n.heightAuto&&n.backdrop&&!n.toast&&W([document.documentElement,document.body],h["height-auto"])},Tt=e=>e.checked?1:0,Lt=e=>e.checked?e.value:null,Ot=e=>e.files.length?null!==e.getAttribute("multiple")?e.files:e.files[0]:null,jt=(t,n)=>{const o=v(),i=e=>It[n.input](o,Mt(e),n);u(n.inputOptions)||p(n.inputOptions)?(De(P()),d(n.inputOptions).then(e=>{t.hideLoading(),i(e)})):"object"==typeof n.inputOptions?i(n.inputOptions):r("Unexpected type of inputOptions! Expected object, Map or Promise, got ".concat(typeof n.inputOptions))},Dt=(t,n)=>{const o=t.getInput();J(o),d(n.inputValue).then(e=>{o.value="number"===n.input?parseFloat(e)||0:"".concat(e),Z(o),o.focus(),t.hideLoading()}).catch(e=>{r("Error in inputValue promise: ".concat(e)),o.value="",Z(o),o.focus(),t.hideLoading()})},It={select:(e,t,i)=>{const a=K(e,h.select),s=(e,t,n)=>{const o=document.createElement("option");o.value=n,V(o,t),o.selected=Ht(n,i.inputValue),e.appendChild(o)};t.forEach(e=>{var t=e[0];const n=e[1];if(Array.isArray(n)){const o=document.createElement("optgroup");o.label=t,o.disabled=!1,a.appendChild(o),n.forEach(e=>s(o,e[1],e[0]))}else s(a,n,t)}),a.focus()},radio:(e,t,a)=>{const s=K(e,h.radio);t.forEach(e=>{var t=e[0],e=e[1];const n=document.createElement("input"),o=document.createElement("label");n.type="radio",n.name=h.radio,n.value=t,Ht(t,a.inputValue)&&(n.checked=!0);const i=document.createElement("span");V(i,e),i.className=h.label,o.appendChild(n),o.appendChild(i),s.appendChild(o)});const n=s.querySelectorAll("input");n.length&&n[0].focus()}},Mt=n=>{const o=[];return"undefined"!=typeof Map&&n instanceof Map?n.forEach((e,t)=>{let n=e;"object"==typeof n&&(n=Mt(n)),o.push([t,n])}):Object.keys(n).forEach(e=>{let t=n[e];"object"==typeof t&&(t=Mt(t)),o.push([e,t])}),o},Ht=(e,t)=>t&&t.toString()===e.toString(),qt=(e,t)=>{var n=he.innerParams.get(e),o=((e,t)=>{const n=e.getInput();if(!n)return null;switch(t.input){case"checkbox":return Tt(n);case"radio":return Lt(n);case"file":return Ot(n);default:return t.inputAutoTrim?n.value.trim():n.value}})(e,n);n.inputValidator?Vt(e,o,t):e.getInput().checkValidity()?("deny"===t?Nt:Ft)(e,o):(e.enableButtons(),e.showValidationMessage(n.validationMessage))},Vt=(t,n,o)=>{const e=he.innerParams.get(t);t.disableInput();const i=Promise.resolve().then(()=>d(e.inputValidator(n,e.validationMessage)));i.then(e=>{t.enableButtons(),t.enableInput(),e?t.showValidationMessage(e):("deny"===o?Nt:Ft)(t,n)})},Nt=(t,n)=>{const e=he.innerParams.get(t||void 0);if(e.showLoaderOnDeny&&De(E()),e.preDeny){const o=Promise.resolve().then(()=>d(e.preDeny(n,e.validationMessage)));o.then(e=>{!1===e?t.hideLoading():t.closePopup({isDenied:!0,value:void 0===e?n:e})})}else t.closePopup({isDenied:!0,value:n})},Ut=(e,t)=>{e.closePopup({isConfirmed:!0,value:t})},Ft=(t,n)=>{const e=he.innerParams.get(t||void 0);if(e.showLoaderOnConfirm&&De(),e.preConfirm){t.resetValidationMessage();const o=Promise.resolve().then(()=>d(e.preConfirm(n,e.validationMessage)));o.then(e=>{G(x())||!1===e?t.hideLoading():Ut(t,void 0===e?n:e)})}else Ut(t,n)},Rt=(e,t,n)=>{const o=I();if(o.length)return(t+=n)===o.length?t=0:-1===t&&(t=o.length-1),o[t].focus();v().focus()},zt=["ArrowRight","ArrowDown"],Wt=["ArrowLeft","ArrowUp"],_t=(e,t,n)=>{var o=he.innerParams.get(e);o&&(o.stopKeydownPropagation&&t.stopPropagation(),"Enter"===t.key?Kt(e,t,o):"Tab"===t.key?Yt(t,o):[...zt,...Wt].includes(t.key)?Zt(t.key):"Escape"===t.key&&Jt(t,o,n))},Kt=(e,t,n)=>{t.isComposing||t.target&&e.getInput()&&t.target.outerHTML===e.getInput().outerHTML&&(["textarea","file"].includes(n.input)||(je(),t.preventDefault()))},Yt=(e,t)=>{var n=e.target,o=I();let i=-1;for(let e=0;e{const t=P(),n=E(),o=T();if([t,n,o].includes(document.activeElement)){e=zt.includes(e)?"nextElementSibling":"previousElementSibling";const i=document.activeElement[e];i&&i.focus()}},Jt=(e,t,n)=>{c(t.allowEscapeKey)&&(e.preventDefault(),n(l.esc))},Xt=(t,e,n)=>{e.popup.onclick=()=>{var e=he.innerParams.get(t);e.showConfirmButton||e.showDenyButton||e.showCancelButton||e.showCloseButton||e.timer||e.input||n(l.close)}};let $t=!1;const Gt=t=>{t.popup.onmousedown=()=>{t.container.onmouseup=function(e){t.container.onmouseup=void 0,e.target===t.container&&($t=!0)}}},Qt=t=>{t.container.onmousedown=()=>{t.popup.onmouseup=function(e){t.popup.onmouseup=void 0,e.target!==t.popup&&!t.popup.contains(e.target)||($t=!0)}}},en=(n,o,i)=>{o.container.onclick=e=>{var t=he.innerParams.get(n);$t?$t=!1:e.target===o.container&&c(t.allowOutsideClick)&&i(l.backdrop)}};const tn=(e,t,n)=>{var o=j();J(o),t.timer&&(e.timeout=new dt(()=>{n("timer"),delete e.timeout},t.timer),t.timerProgressBar&&(Z(o),setTimeout(()=>{e.timeout&&e.timeout.running&&ne(t.timer)})))},nn=(e,t)=>{if(!t.toast)return c(t.allowEnterKey)?void(on(e,t)||Rt(0,-1,1)):an()},on=(e,t)=>t.focusDeny&&G(e.denyButton)?(e.denyButton.focus(),!0):t.focusCancel&&G(e.cancelButton)?(e.cancelButton.focus(),!0):!(!t.focusConfirm||!G(e.confirmButton))&&(e.confirmButton.focus(),!0),an=()=>{document.activeElement&&"function"==typeof document.activeElement.blur&&document.activeElement.blur()};const sn=e=>{for(const t in e)e[t]=new WeakMap};e=Object.freeze({hideLoading:Xe,disableLoading:Xe,getInput:function(e){var t=he.innerParams.get(e||this);return(e=he.domCache.get(e||this))?F(e.popup,t.input):null},close:st,closePopup:st,closeModal:st,closeToast:st,enableButtons:function(){lt(this,["confirmButton","denyButton","cancelButton"],!1)},disableButtons:function(){lt(this,["confirmButton","denyButton","cancelButton"],!0)},enableInput:function(){return ut(this.getInput(),!1)},disableInput:function(){return ut(this.getInput(),!0)},showValidationMessage:function(e){const t=he.domCache.get(this);var n=he.innerParams.get(this);V(t.validationMessage,e),t.validationMessage.className=h["validation-message"],n.customClass&&n.customClass.validationMessage&&W(t.validationMessage,n.customClass.validationMessage),Z(t.validationMessage);const o=this.getInput();o&&(o.setAttribute("aria-invalid",!0),o.setAttribute("aria-describedby",h["validation-message"]),R(o),W(o,h.inputerror))},resetValidationMessage:function(){var e=he.domCache.get(this);e.validationMessage&&J(e.validationMessage);const t=this.getInput();t&&(t.removeAttribute("aria-invalid"),t.removeAttribute("aria-describedby"),_(t,h.inputerror))},getProgressSteps:function(){return he.domCache.get(this).progressSteps},_main:function(e,t={}){Ze(Object.assign({},t,e)),Me.currentInstance&&(Me.currentInstance._destroy(),M()&&ot()),Me.currentInstance=this,mt(e=((e,t)=>{const n=gt(e),o=Object.assign({},Re,t,n,e);return o.showClass=Object.assign({},Re.showClass,o.showClass),o.hideClass=Object.assign({},Re.hideClass,o.hideClass),o})(e,t)),Object.freeze(e),Me.timeout&&(Me.timeout.stop(),delete Me.timeout),clearTimeout(Me.restoreFocusTimeout);var s,r,c,t=(e=>{const t={popup:v(),container:b(),actions:L(),confirmButton:P(),denyButton:E(),cancelButton:T(),loader:S(),closeButton:D(),validationMessage:x(),progressSteps:B()};return he.domCache.set(e,t),t})(this);return Oe(this,e),he.innerParams.set(this,e),s=this,r=t,c=e,new Promise(e=>{const t=e=>{s.closePopup({isDismissed:!0,dismiss:e})};var n,o,i,a;it.swalPromiseResolve.set(s,e),r.confirmButton.onclick=()=>(e=>{var t=he.innerParams.get(e);e.disableButtons(),t.input?qt(e,"confirm"):Ft(e,!0)})(s),r.denyButton.onclick=()=>(e=>{var t=he.innerParams.get(e);e.disableButtons(),t.returnInputValueOnDeny?qt(e,"deny"):Nt(e,!1)})(s),r.cancelButton.onclick=()=>((e,t)=>{e.disableButtons(),t(l.cancel)})(s,t),r.closeButton.onclick=()=>t(l.close),n=s,a=r,e=t,he.innerParams.get(n).toast?Xt(n,a,e):(Gt(a),Qt(a),en(n,a,e)),o=s,a=Me,e=c,i=t,a.keydownTarget&&a.keydownHandlerAdded&&(a.keydownTarget.removeEventListener("keydown",a.keydownHandler,{capture:a.keydownListenerCapture}),a.keydownHandlerAdded=!1),e.toast||(a.keydownHandler=e=>_t(o,e,i),a.keydownTarget=e.keydownListenerCapture?window:v(),a.keydownListenerCapture=e.keydownListenerCapture,a.keydownTarget.addEventListener("keydown",a.keydownHandler,{capture:a.keydownListenerCapture}),a.keydownHandlerAdded=!0),e=s,"select"===(a=c).input||"radio"===a.input?jt(e,a):["text","email","number","tel","textarea"].includes(a.input)&&(u(a.inputValue)||p(a.inputValue))&&(De(P()),Dt(e,a)),Bt(c),tn(Me,c,t),nn(r,c),setTimeout(()=>{r.container.scrollTop=0})})},update:function(t){var e=v(),n=he.innerParams.get(this);if(!e||N(e,n.hideClass.popup))return s("You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup.");const o={};Object.keys(t).forEach(e=>{ln.isUpdatableParameter(e)?o[e]=t[e]:s('Invalid parameter to update: "'.concat(e,'". Updatable params are listed here: https://github.com/sweetalert2/sweetalert2/blob/master/src/utils/params.js\n\nIf you think this parameter should be updatable, request it here: https://github.com/sweetalert2/sweetalert2/issues/new?template=02_feature_request.md'))}),n=Object.assign({},n,o),Oe(this,n),he.innerParams.set(this,n),Object.defineProperties(this,{params:{value:Object.assign({},this.params,t),writable:!1,enumerable:!0}})},_destroy:function(){var e=he.domCache.get(this);const t=he.innerParams.get(this);t&&(e.popup&&Me.swalCloseEventFinishedCallback&&(Me.swalCloseEventFinishedCallback(),delete Me.swalCloseEventFinishedCallback),Me.deferDisposalTimer&&(clearTimeout(Me.deferDisposalTimer),delete Me.deferDisposalTimer),"function"==typeof t.didDestroy&&t.didDestroy(),delete this.params,delete Me.keydownHandler,delete Me.keydownTarget,sn(he),sn(it),delete Me.currentInstance)}});let rn;class cn{constructor(...e){"undefined"!=typeof window&&(rn=this,e=Object.freeze(this.constructor.argsToParams(e)),Object.defineProperties(this,{params:{value:e,writable:!1,enumerable:!0,configurable:!0}}),e=this._main(this.params),he.promise.set(this,e))}then(e){const t=he.promise.get(this);return t.then(e)}finally(e){const t=he.promise.get(this);return t.finally(e)}}Object.assign(cn.prototype,e),Object.assign(cn,Je),Object.keys(e).forEach(t=>{cn[t]=function(...e){if(rn)return rn[t](...e)}}),cn.DismissReason=l,cn.version="11.1.5";const ln=cn;return ln.default=ln,ln}),void 0!==this&&this.Sweetalert2&&(this.swal=this.sweetAlert=this.Swal=this.SweetAlert=this.Sweetalert2); +"undefined"!=typeof document&&function(e,t){var n=e.createElement("style");if(e.getElementsByTagName("head")[0].appendChild(n),n.styleSheet)n.styleSheet.disabled||(n.styleSheet.cssText=t);else try{n.innerHTML=t}catch(e){n.innerText=t}}(document,".swal2-popup.swal2-toast{box-sizing:border-box;grid-column:1/4!important;grid-row:1/4!important;grid-template-columns:1fr 99fr 1fr;padding:1em;overflow-y:hidden;background:#fff;box-shadow:0 0 .625em #d9d9d9;pointer-events:all}.swal2-popup.swal2-toast>*{grid-column:2}.swal2-popup.swal2-toast .swal2-title{margin:1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-loading{justify-content:center}.swal2-popup.swal2-toast .swal2-input{height:2em;margin:.5em;font-size:1em}.swal2-popup.swal2-toast .swal2-validation-message{font-size:1em}.swal2-popup.swal2-toast .swal2-footer{margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-popup.swal2-toast .swal2-close{grid-column:3/3;grid-row:1/99;align-self:center;width:.8em;height:.8em;margin:0;font-size:2em}.swal2-popup.swal2-toast .swal2-html-container{margin:1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-html-container:empty{padding:0}.swal2-popup.swal2-toast .swal2-loader{grid-column:1;grid-row:1/99;align-self:center;width:2em;height:2em;margin:.25em}.swal2-popup.swal2-toast .swal2-icon{grid-column:1;grid-row:1/99;align-self:center;width:2em;min-width:2em;height:2em;margin:0 .5em 0 0}.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:700}.swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-popup.swal2-toast .swal2-actions{justify-content:flex-start;height:auto;margin:0;margin-top:.3125em;padding:0}.swal2-popup.swal2-toast .swal2-styled{margin:.25em .5em;padding:.4em .6em;font-size:1em}.swal2-popup.swal2-toast .swal2-styled:focus{box-shadow:0 0 0 1px #fff,0 0 0 3px rgba(100,150,200,.5)}.swal2-popup.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;transform:rotate(45deg);border-radius:50%}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.8em;left:-.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.25em;left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-popup.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{-webkit-animation:swal2-toast-animate-success-line-tip .75s;animation:swal2-toast-animate-success-line-tip .75s}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{-webkit-animation:swal2-toast-animate-success-line-long .75s;animation:swal2-toast-animate-success-line-long .75s}.swal2-popup.swal2-toast.swal2-show{-webkit-animation:swal2-toast-show .5s;animation:swal2-toast-show .5s}.swal2-popup.swal2-toast.swal2-hide{-webkit-animation:swal2-toast-hide .1s forwards;animation:swal2-toast-hide .1s forwards}.swal2-container{display:grid;position:fixed;z-index:1060;top:0;right:0;bottom:0;left:0;box-sizing:border-box;grid-template-areas:\"top-start top top-end\" \"center-start center center-end\" \"bottom-start bottom-center bottom-end\";grid-template-rows:minmax(-webkit-min-content,auto) minmax(-webkit-min-content,auto) minmax(-webkit-min-content,auto);grid-template-rows:minmax(min-content,auto) minmax(min-content,auto) minmax(min-content,auto);height:100%;padding:.625em;overflow-x:hidden;transition:background-color .1s;-webkit-overflow-scrolling:touch}.swal2-container.swal2-backdrop-show,.swal2-container.swal2-noanimation{background:rgba(0,0,0,.4)}.swal2-container.swal2-backdrop-hide{background:0 0!important}.swal2-container.swal2-bottom-start,.swal2-container.swal2-center-start,.swal2-container.swal2-top-start{grid-template-columns:minmax(0,1fr) auto auto}.swal2-container.swal2-bottom,.swal2-container.swal2-center,.swal2-container.swal2-top{grid-template-columns:auto minmax(0,1fr) auto}.swal2-container.swal2-bottom-end,.swal2-container.swal2-center-end,.swal2-container.swal2-top-end{grid-template-columns:auto auto minmax(0,1fr)}.swal2-container.swal2-top-start>.swal2-popup{align-self:start}.swal2-container.swal2-top>.swal2-popup{grid-column:2;align-self:start;justify-self:center}.swal2-container.swal2-top-end>.swal2-popup,.swal2-container.swal2-top-right>.swal2-popup{grid-column:3;align-self:start;justify-self:end}.swal2-container.swal2-center-left>.swal2-popup,.swal2-container.swal2-center-start>.swal2-popup{grid-row:2;align-self:center}.swal2-container.swal2-center>.swal2-popup{grid-column:2;grid-row:2;align-self:center;justify-self:center}.swal2-container.swal2-center-end>.swal2-popup,.swal2-container.swal2-center-right>.swal2-popup{grid-column:3;grid-row:2;align-self:center;justify-self:end}.swal2-container.swal2-bottom-left>.swal2-popup,.swal2-container.swal2-bottom-start>.swal2-popup{grid-column:1;grid-row:3;align-self:end}.swal2-container.swal2-bottom>.swal2-popup{grid-column:2;grid-row:3;justify-self:center;align-self:end}.swal2-container.swal2-bottom-end>.swal2-popup,.swal2-container.swal2-bottom-right>.swal2-popup{grid-column:3;grid-row:3;align-self:end;justify-self:end}.swal2-container.swal2-grow-fullscreen>.swal2-popup,.swal2-container.swal2-grow-row>.swal2-popup{grid-column:1/4;width:100%}.swal2-container.swal2-grow-column>.swal2-popup,.swal2-container.swal2-grow-fullscreen>.swal2-popup{grid-row:1/4;align-self:stretch}.swal2-container.swal2-no-transition{transition:none!important}.swal2-popup{display:none;position:relative;box-sizing:border-box;grid-template-columns:minmax(0,100%);width:32em;max-width:100%;padding:0 0 1.25em;border:none;border-radius:5px;background:#fff;color:#545454;font-family:inherit;font-size:1rem}.swal2-popup:focus{outline:0}.swal2-popup.swal2-loading{overflow-y:hidden}.swal2-title{position:relative;max-width:100%;margin:0;padding:.8em 1em 0;color:#595959;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;word-wrap:break-word}.swal2-actions{display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:center;width:auto;margin:1.25em auto 0;padding:0}.swal2-actions:not(.swal2-loading) .swal2-styled[disabled]{opacity:.4}.swal2-actions:not(.swal2-loading) .swal2-styled:hover{background-image:linear-gradient(rgba(0,0,0,.1),rgba(0,0,0,.1))}.swal2-actions:not(.swal2-loading) .swal2-styled:active{background-image:linear-gradient(rgba(0,0,0,.2),rgba(0,0,0,.2))}.swal2-loader{display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;-webkit-animation:swal2-rotate-loading 1.5s linear 0s infinite normal;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 transparent #2778c4 transparent}.swal2-styled{margin:.3125em;padding:.625em 1.1em;transition:box-shadow .1s;box-shadow:0 0 0 3px transparent;font-weight:500}.swal2-styled:not([disabled]){cursor:pointer}.swal2-styled.swal2-confirm{border:0;border-radius:.25em;background:initial;background-color:#7367f0;color:#fff;font-size:1em}.swal2-styled.swal2-confirm:focus{box-shadow:0 0 0 3px rgba(115,103,240,.5)}.swal2-styled.swal2-deny{border:0;border-radius:.25em;background:initial;background-color:#ea5455;color:#fff;font-size:1em}.swal2-styled.swal2-deny:focus{box-shadow:0 0 0 3px rgba(234,84,85,.5)}.swal2-styled.swal2-cancel{border:0;border-radius:.25em;background:initial;background-color:#6e7d88;color:#fff;font-size:1em}.swal2-styled.swal2-cancel:focus{box-shadow:0 0 0 3px rgba(110,125,136,.5)}.swal2-styled.swal2-default-outline:focus{box-shadow:0 0 0 3px rgba(100,150,200,.5)}.swal2-styled:focus{outline:0}.swal2-styled::-moz-focus-inner{border:0}.swal2-footer{justify-content:center;margin:1em 0 0;padding:1em 1em 0;border-top:1px solid #eee;color:#545454;font-size:1em}.swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;grid-column:auto!important;height:.25em;overflow:hidden;border-bottom-right-radius:5px;border-bottom-left-radius:5px}.swal2-timer-progress-bar{width:100%;height:.25em;background:rgba(0,0,0,.2)}.swal2-image{max-width:100%;margin:2em auto 1em}.swal2-close{z-index:2;align-items:center;justify-content:center;width:1.2em;height:1.2em;margin-top:0;margin-right:0;margin-bottom:-1.2em;padding:0;overflow:hidden;transition:color .1s,box-shadow .1s;border:none;border-radius:5px;background:0 0;color:#ccc;font-family:serif;font-family:monospace;font-size:2.5em;cursor:pointer;justify-self:end}.swal2-close:hover{transform:none;background:0 0;color:#f27474}.swal2-close:focus{outline:0;box-shadow:inset 0 0 0 3px rgba(100,150,200,.5)}.swal2-close::-moz-focus-inner{border:0}.swal2-html-container{z-index:1;justify-content:center;margin:1em 1.6em .3em;padding:0;overflow:auto;color:#545454;font-size:1.125em;font-weight:400;line-height:normal;text-align:center;word-wrap:break-word;word-break:break-word}.swal2-checkbox,.swal2-file,.swal2-input,.swal2-radio,.swal2-select,.swal2-textarea{margin:1em 2em 0}.swal2-file,.swal2-input,.swal2-textarea{box-sizing:border-box;width:auto;transition:border-color .1s,box-shadow .1s;border:1px solid #d9d9d9;border-radius:.1875em;background:inherit;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px transparent;color:inherit;font-size:1.125em}.swal2-file.swal2-inputerror,.swal2-input.swal2-inputerror,.swal2-textarea.swal2-inputerror{border-color:#f27474!important;box-shadow:0 0 2px #f27474!important}.swal2-file:focus,.swal2-input:focus,.swal2-textarea:focus{border:1px solid #b4dbed;outline:0;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(100,150,200,.5)}.swal2-file::-moz-placeholder,.swal2-input::-moz-placeholder,.swal2-textarea::-moz-placeholder{color:#ccc}.swal2-file:-ms-input-placeholder,.swal2-input:-ms-input-placeholder,.swal2-textarea:-ms-input-placeholder{color:#ccc}.swal2-file::placeholder,.swal2-input::placeholder,.swal2-textarea::placeholder{color:#ccc}.swal2-range{margin:1em 2em 0;background:#fff}.swal2-range input{width:80%}.swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}.swal2-range input,.swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}.swal2-input{height:2.625em;padding:0 .75em}.swal2-file{width:75%;margin-right:auto;margin-left:auto;background:inherit;font-size:1.125em}.swal2-textarea{height:6.75em;padding:.75em}.swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:inherit;color:inherit;font-size:1.125em}.swal2-checkbox,.swal2-radio{align-items:center;justify-content:center;background:#fff;color:inherit}.swal2-checkbox label,.swal2-radio label{margin:0 .6em;font-size:1.125em}.swal2-checkbox input,.swal2-radio input{flex-shrink:0;margin:0 .4em}.swal2-input-label{display:flex;justify-content:center;margin:1em auto 0}.swal2-validation-message{align-items:center;justify-content:center;margin:1em 0 0;padding:.625em;overflow:hidden;background:#f0f0f0;color:#666;font-size:1em;font-weight:300}.swal2-validation-message::before{content:\"!\";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}.swal2-icon{position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:2.5em auto .6em;border:.25em solid transparent;border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}.swal2-icon.swal2-error{border-color:#f27474;color:#f27474}.swal2-icon.swal2-error .swal2-x-mark{position:relative;flex-grow:1}.swal2-icon.swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}.swal2-icon.swal2-error.swal2-icon-show{-webkit-animation:swal2-animate-error-icon .5s;animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-error.swal2-icon-show .swal2-x-mark{-webkit-animation:swal2-animate-error-x-mark .5s;animation:swal2-animate-error-x-mark .5s}.swal2-icon.swal2-warning{border-color:#facea8;color:#f8bb86}.swal2-icon.swal2-info{border-color:#9de0f6;color:#3fc3ee}.swal2-icon.swal2-question{border-color:#c9dae1;color:#87adbd}.swal2-icon.swal2-success{border-color:#a5dc86;color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;transform:rotate(45deg);border-radius:50%}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}.swal2-icon.swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-.25em;left:-.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}.swal2-icon.swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}.swal2-icon.swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}.swal2-icon.swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-tip{-webkit-animation:swal2-animate-success-line-tip .75s;animation:swal2-animate-success-line-tip .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-long{-webkit-animation:swal2-animate-success-line-long .75s;animation:swal2-animate-success-line-long .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-circular-line-right{-webkit-animation:swal2-rotate-success-circular-line 4.25s ease-in;animation:swal2-rotate-success-circular-line 4.25s ease-in}.swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:1.25em auto;padding:0;background:inherit;font-weight:600}.swal2-progress-steps li{display:inline-block;position:relative}.swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:#add8e6;color:#fff}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:#add8e6}.swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}[class^=swal2]{-webkit-tap-highlight-color:transparent}.swal2-show{-webkit-animation:swal2-show .3s;animation:swal2-show .3s}.swal2-hide{-webkit-animation:swal2-hide .15s forwards;animation:swal2-hide .15s forwards}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{margin-right:initial;margin-left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}@-webkit-keyframes swal2-toast-show{0%{transform:translateY(-.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0)}}@keyframes swal2-toast-show{0%{transform:translateY(-.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0)}}@-webkit-keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@-webkit-keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@-webkit-keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@-webkit-keyframes swal2-show{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}100%{transform:scale(1)}}@keyframes swal2-show{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}100%{transform:scale(1)}}@-webkit-keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(.5);opacity:0}}@keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(.5);opacity:0}}@-webkit-keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@-webkit-keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@-webkit-keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@-webkit-keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@-webkit-keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0);opacity:1}}@-webkit-keyframes swal2-rotate-loading{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes swal2-rotate-loading{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto!important}body.swal2-no-backdrop .swal2-container{background-color:transparent!important;pointer-events:none}body.swal2-no-backdrop .swal2-container .swal2-popup{pointer-events:all}body.swal2-no-backdrop .swal2-container .swal2-modal{box-shadow:0 0 10px rgba(0,0,0,.4)}@media print{body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow-y:scroll!important}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .swal2-container{position:static!important}}body.swal2-toast-shown .swal2-container{box-sizing:border-box;width:360px;max-width:100%;background-color:transparent;pointer-events:none}body.swal2-toast-shown .swal2-container.swal2-top{top:0;right:auto;bottom:auto;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{top:0;right:0;bottom:auto;left:auto}body.swal2-toast-shown .swal2-container.swal2-top-left,body.swal2-toast-shown .swal2-container.swal2-top-start{top:0;right:auto;bottom:auto;left:0}body.swal2-toast-shown .swal2-container.swal2-center-left,body.swal2-toast-shown .swal2-container.swal2-center-start{top:50%;right:auto;bottom:auto;left:0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{top:50%;right:auto;bottom:auto;left:50%;transform:translate(-50%,-50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{top:50%;right:0;bottom:auto;left:auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-left,body.swal2-toast-shown .swal2-container.swal2-bottom-start{top:auto;right:auto;bottom:0;left:0}body.swal2-toast-shown .swal2-container.swal2-bottom{top:auto;right:auto;bottom:0;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{top:auto;right:0;bottom:0;left:auto}"); \ No newline at end of file diff --git a/modules/blogging/app/Volo.BloggingTestApp/wwwroot/libs/sweetalert2/sweetalert2.css b/modules/blogging/app/Volo.BloggingTestApp/wwwroot/libs/sweetalert2/sweetalert2.css new file mode 100644 index 0000000000..1feb7a5581 --- /dev/null +++ b/modules/blogging/app/Volo.BloggingTestApp/wwwroot/libs/sweetalert2/sweetalert2.css @@ -0,0 +1,1319 @@ +.swal2-popup.swal2-toast { + box-sizing: border-box; + grid-column: 1/4 !important; + grid-row: 1/4 !important; + grid-template-columns: 1fr 99fr 1fr; + padding: 1em; + overflow-y: hidden; + background: #fff; + box-shadow: 0 0 0.625em #d9d9d9; + pointer-events: all; +} +.swal2-popup.swal2-toast > * { + grid-column: 2; +} +.swal2-popup.swal2-toast .swal2-title { + margin: 1em; + padding: 0; + font-size: 1em; + text-align: initial; +} +.swal2-popup.swal2-toast .swal2-loading { + justify-content: center; +} +.swal2-popup.swal2-toast .swal2-input { + height: 2em; + margin: 0.5em; + font-size: 1em; +} +.swal2-popup.swal2-toast .swal2-validation-message { + font-size: 1em; +} +.swal2-popup.swal2-toast .swal2-footer { + margin: 0.5em 0 0; + padding: 0.5em 0 0; + font-size: 0.8em; +} +.swal2-popup.swal2-toast .swal2-close { + grid-column: 3/3; + grid-row: 1/99; + align-self: center; + width: 0.8em; + height: 0.8em; + margin: 0; + font-size: 2em; +} +.swal2-popup.swal2-toast .swal2-html-container { + margin: 1em; + padding: 0; + font-size: 1em; + text-align: initial; +} +.swal2-popup.swal2-toast .swal2-html-container:empty { + padding: 0; +} +.swal2-popup.swal2-toast .swal2-loader { + grid-column: 1; + grid-row: 1/99; + align-self: center; + width: 2em; + height: 2em; + margin: 0.25em; +} +.swal2-popup.swal2-toast .swal2-icon { + grid-column: 1; + grid-row: 1/99; + align-self: center; + width: 2em; + min-width: 2em; + height: 2em; + margin: 0 0.5em 0 0; +} +.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content { + display: flex; + align-items: center; + font-size: 1.8em; + font-weight: bold; +} +.swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring { + width: 2em; + height: 2em; +} +.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line] { + top: 0.875em; + width: 1.375em; +} +.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left] { + left: 0.3125em; +} +.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right] { + right: 0.3125em; +} +.swal2-popup.swal2-toast .swal2-actions { + justify-content: flex-start; + height: auto; + margin: 0; + margin-top: 0.3125em; + padding: 0; +} +.swal2-popup.swal2-toast .swal2-styled { + margin: 0.25em 0.5em; + padding: 0.4em 0.6em; + font-size: 1em; +} +.swal2-popup.swal2-toast .swal2-styled:focus { + box-shadow: 0 0 0 1px #fff, 0 0 0 3px rgba(100, 150, 200, 0.5); +} +.swal2-popup.swal2-toast .swal2-success { + border-color: #a5dc86; +} +.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line] { + position: absolute; + width: 1.6em; + height: 3em; + transform: rotate(45deg); + border-radius: 50%; +} +.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left] { + top: -0.8em; + left: -0.5em; + transform: rotate(-45deg); + transform-origin: 2em 2em; + border-radius: 4em 0 0 4em; +} +.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right] { + top: -0.25em; + left: 0.9375em; + transform-origin: 0 1.5em; + border-radius: 0 4em 4em 0; +} +.swal2-popup.swal2-toast .swal2-success .swal2-success-ring { + width: 2em; + height: 2em; +} +.swal2-popup.swal2-toast .swal2-success .swal2-success-fix { + top: 0; + left: 0.4375em; + width: 0.4375em; + height: 2.6875em; +} +.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line] { + height: 0.3125em; +} +.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip] { + top: 1.125em; + left: 0.1875em; + width: 0.75em; +} +.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=long] { + top: 0.9375em; + right: 0.1875em; + width: 1.375em; +} +.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip { + -webkit-animation: swal2-toast-animate-success-line-tip 0.75s; + animation: swal2-toast-animate-success-line-tip 0.75s; +} +.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long { + -webkit-animation: swal2-toast-animate-success-line-long 0.75s; + animation: swal2-toast-animate-success-line-long 0.75s; +} +.swal2-popup.swal2-toast.swal2-show { + -webkit-animation: swal2-toast-show 0.5s; + animation: swal2-toast-show 0.5s; +} +.swal2-popup.swal2-toast.swal2-hide { + -webkit-animation: swal2-toast-hide 0.1s forwards; + animation: swal2-toast-hide 0.1s forwards; +} + +.swal2-container { + display: grid; + position: fixed; + z-index: 1060; + top: 0; + right: 0; + bottom: 0; + left: 0; + box-sizing: border-box; + grid-template-areas: "top-start top top-end" "center-start center center-end" "bottom-start bottom-center bottom-end"; + grid-template-rows: minmax(-webkit-min-content, auto) minmax(-webkit-min-content, auto) minmax(-webkit-min-content, auto); + grid-template-rows: minmax(min-content, auto) minmax(min-content, auto) minmax(min-content, auto); + height: 100%; + padding: 0.625em; + overflow-x: hidden; + transition: background-color 0.1s; + -webkit-overflow-scrolling: touch; +} +.swal2-container.swal2-backdrop-show, .swal2-container.swal2-noanimation { + background: rgba(0, 0, 0, 0.4); +} +.swal2-container.swal2-backdrop-hide { + background: transparent !important; +} +.swal2-container.swal2-top-start, .swal2-container.swal2-center-start, .swal2-container.swal2-bottom-start { + grid-template-columns: minmax(0, 1fr) auto auto; +} +.swal2-container.swal2-top, .swal2-container.swal2-center, .swal2-container.swal2-bottom { + grid-template-columns: auto minmax(0, 1fr) auto; +} +.swal2-container.swal2-top-end, .swal2-container.swal2-center-end, .swal2-container.swal2-bottom-end { + grid-template-columns: auto auto minmax(0, 1fr); +} +.swal2-container.swal2-top-start > .swal2-popup { + align-self: start; +} +.swal2-container.swal2-top > .swal2-popup { + grid-column: 2; + align-self: start; + justify-self: center; +} +.swal2-container.swal2-top-end > .swal2-popup, .swal2-container.swal2-top-right > .swal2-popup { + grid-column: 3; + align-self: start; + justify-self: end; +} +.swal2-container.swal2-center-start > .swal2-popup, .swal2-container.swal2-center-left > .swal2-popup { + grid-row: 2; + align-self: center; +} +.swal2-container.swal2-center > .swal2-popup { + grid-column: 2; + grid-row: 2; + align-self: center; + justify-self: center; +} +.swal2-container.swal2-center-end > .swal2-popup, .swal2-container.swal2-center-right > .swal2-popup { + grid-column: 3; + grid-row: 2; + align-self: center; + justify-self: end; +} +.swal2-container.swal2-bottom-start > .swal2-popup, .swal2-container.swal2-bottom-left > .swal2-popup { + grid-column: 1; + grid-row: 3; + align-self: end; +} +.swal2-container.swal2-bottom > .swal2-popup { + grid-column: 2; + grid-row: 3; + justify-self: center; + align-self: end; +} +.swal2-container.swal2-bottom-end > .swal2-popup, .swal2-container.swal2-bottom-right > .swal2-popup { + grid-column: 3; + grid-row: 3; + align-self: end; + justify-self: end; +} +.swal2-container.swal2-grow-row > .swal2-popup, .swal2-container.swal2-grow-fullscreen > .swal2-popup { + grid-column: 1/4; + width: 100%; +} +.swal2-container.swal2-grow-column > .swal2-popup, .swal2-container.swal2-grow-fullscreen > .swal2-popup { + grid-row: 1/4; + align-self: stretch; +} +.swal2-container.swal2-no-transition { + transition: none !important; +} + +.swal2-popup { + display: none; + position: relative; + box-sizing: border-box; + grid-template-columns: minmax(0, 100%); + width: 32em; + max-width: 100%; + padding: 0 0 1.25em; + border: none; + border-radius: 5px; + background: #fff; + color: #545454; + font-family: inherit; + font-size: 1rem; +} +.swal2-popup:focus { + outline: none; +} +.swal2-popup.swal2-loading { + overflow-y: hidden; +} + +.swal2-title { + position: relative; + max-width: 100%; + margin: 0; + padding: 0.8em 1em 0; + color: #595959; + font-size: 1.875em; + font-weight: 600; + text-align: center; + text-transform: none; + word-wrap: break-word; +} + +.swal2-actions { + display: flex; + z-index: 1; + box-sizing: border-box; + flex-wrap: wrap; + align-items: center; + justify-content: center; + width: auto; + margin: 1.25em auto 0; + padding: 0; +} +.swal2-actions:not(.swal2-loading) .swal2-styled[disabled] { + opacity: 0.4; +} +.swal2-actions:not(.swal2-loading) .swal2-styled:hover { + background-image: linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1)); +} +.swal2-actions:not(.swal2-loading) .swal2-styled:active { + background-image: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)); +} + +.swal2-loader { + display: none; + align-items: center; + justify-content: center; + width: 2.2em; + height: 2.2em; + margin: 0 1.875em; + -webkit-animation: swal2-rotate-loading 1.5s linear 0s infinite normal; + animation: swal2-rotate-loading 1.5s linear 0s infinite normal; + border-width: 0.25em; + border-style: solid; + border-radius: 100%; + border-color: #2778c4 transparent #2778c4 transparent; +} + +.swal2-styled { + margin: 0.3125em; + padding: 0.625em 1.1em; + transition: box-shadow 0.1s; + box-shadow: 0 0 0 3px transparent; + font-weight: 500; +} +.swal2-styled:not([disabled]) { + cursor: pointer; +} +.swal2-styled.swal2-confirm { + border: 0; + border-radius: 0.25em; + background: initial; + background-color: #7367f0; + color: #fff; + font-size: 1em; +} +.swal2-styled.swal2-confirm:focus { + box-shadow: 0 0 0 3px rgba(115, 103, 240, 0.5); +} +.swal2-styled.swal2-deny { + border: 0; + border-radius: 0.25em; + background: initial; + background-color: #ea5455; + color: #fff; + font-size: 1em; +} +.swal2-styled.swal2-deny:focus { + box-shadow: 0 0 0 3px rgba(234, 84, 85, 0.5); +} +.swal2-styled.swal2-cancel { + border: 0; + border-radius: 0.25em; + background: initial; + background-color: #6e7d88; + color: #fff; + font-size: 1em; +} +.swal2-styled.swal2-cancel:focus { + box-shadow: 0 0 0 3px rgba(110, 125, 136, 0.5); +} +.swal2-styled.swal2-default-outline:focus { + box-shadow: 0 0 0 3px rgba(100, 150, 200, 0.5); +} +.swal2-styled:focus { + outline: none; +} +.swal2-styled::-moz-focus-inner { + border: 0; +} + +.swal2-footer { + justify-content: center; + margin: 1em 0 0; + padding: 1em 1em 0; + border-top: 1px solid #eee; + color: #545454; + font-size: 1em; +} + +.swal2-timer-progress-bar-container { + position: absolute; + right: 0; + bottom: 0; + left: 0; + grid-column: auto !important; + height: 0.25em; + overflow: hidden; + border-bottom-right-radius: 5px; + border-bottom-left-radius: 5px; +} + +.swal2-timer-progress-bar { + width: 100%; + height: 0.25em; + background: rgba(0, 0, 0, 0.2); +} + +.swal2-image { + max-width: 100%; + margin: 2em auto 1em; +} + +.swal2-close { + z-index: 2; + align-items: center; + justify-content: center; + width: 1.2em; + height: 1.2em; + margin-top: 0; + margin-right: 0; + margin-bottom: -1.2em; + padding: 0; + overflow: hidden; + transition: color 0.1s, box-shadow 0.1s; + border: none; + border-radius: 5px; + background: transparent; + color: #ccc; + font-family: serif; + font-family: monospace; + font-size: 2.5em; + cursor: pointer; + justify-self: end; +} +.swal2-close:hover { + transform: none; + background: transparent; + color: #f27474; +} +.swal2-close:focus { + outline: none; + box-shadow: inset 0 0 0 3px rgba(100, 150, 200, 0.5); +} +.swal2-close::-moz-focus-inner { + border: 0; +} + +.swal2-html-container { + z-index: 1; + justify-content: center; + margin: 1em 1.6em 0.3em; + padding: 0; + overflow: auto; + color: #545454; + font-size: 1.125em; + font-weight: normal; + line-height: normal; + text-align: center; + word-wrap: break-word; + word-break: break-word; +} + +.swal2-input, +.swal2-file, +.swal2-textarea, +.swal2-select, +.swal2-radio, +.swal2-checkbox { + margin: 1em 2em 0; +} + +.swal2-input, +.swal2-file, +.swal2-textarea { + box-sizing: border-box; + width: auto; + transition: border-color 0.1s, box-shadow 0.1s; + border: 1px solid #d9d9d9; + border-radius: 0.1875em; + background: inherit; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06), 0 0 0 3px transparent; + color: inherit; + font-size: 1.125em; +} +.swal2-input.swal2-inputerror, +.swal2-file.swal2-inputerror, +.swal2-textarea.swal2-inputerror { + border-color: #f27474 !important; + box-shadow: 0 0 2px #f27474 !important; +} +.swal2-input:focus, +.swal2-file:focus, +.swal2-textarea:focus { + border: 1px solid #b4dbed; + outline: none; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06), 0 0 0 3px rgba(100, 150, 200, 0.5); +} +.swal2-input::-moz-placeholder, .swal2-file::-moz-placeholder, .swal2-textarea::-moz-placeholder { + color: #ccc; +} +.swal2-input:-ms-input-placeholder, .swal2-file:-ms-input-placeholder, .swal2-textarea:-ms-input-placeholder { + color: #ccc; +} +.swal2-input::placeholder, +.swal2-file::placeholder, +.swal2-textarea::placeholder { + color: #ccc; +} + +.swal2-range { + margin: 1em 2em 0; + background: #fff; +} +.swal2-range input { + width: 80%; +} +.swal2-range output { + width: 20%; + color: inherit; + font-weight: 600; + text-align: center; +} +.swal2-range input, +.swal2-range output { + height: 2.625em; + padding: 0; + font-size: 1.125em; + line-height: 2.625em; +} + +.swal2-input { + height: 2.625em; + padding: 0 0.75em; +} + +.swal2-file { + width: 75%; + margin-right: auto; + margin-left: auto; + background: inherit; + font-size: 1.125em; +} + +.swal2-textarea { + height: 6.75em; + padding: 0.75em; +} + +.swal2-select { + min-width: 50%; + max-width: 100%; + padding: 0.375em 0.625em; + background: inherit; + color: inherit; + font-size: 1.125em; +} + +.swal2-radio, +.swal2-checkbox { + align-items: center; + justify-content: center; + background: #fff; + color: inherit; +} +.swal2-radio label, +.swal2-checkbox label { + margin: 0 0.6em; + font-size: 1.125em; +} +.swal2-radio input, +.swal2-checkbox input { + flex-shrink: 0; + margin: 0 0.4em; +} + +.swal2-input-label { + display: flex; + justify-content: center; + margin: 1em auto 0; +} + +.swal2-validation-message { + align-items: center; + justify-content: center; + margin: 1em 0 0; + padding: 0.625em; + overflow: hidden; + background: #f0f0f0; + color: #666666; + font-size: 1em; + font-weight: 300; +} +.swal2-validation-message::before { + content: "!"; + display: inline-block; + width: 1.5em; + min-width: 1.5em; + height: 1.5em; + margin: 0 0.625em; + border-radius: 50%; + background-color: #f27474; + color: #fff; + font-weight: 600; + line-height: 1.5em; + text-align: center; +} + +.swal2-icon { + position: relative; + box-sizing: content-box; + justify-content: center; + width: 5em; + height: 5em; + margin: 2.5em auto 0.6em; + border: 0.25em solid transparent; + border-radius: 50%; + border-color: #000; + font-family: inherit; + line-height: 5em; + cursor: default; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} +.swal2-icon .swal2-icon-content { + display: flex; + align-items: center; + font-size: 3.75em; +} +.swal2-icon.swal2-error { + border-color: #f27474; + color: #f27474; +} +.swal2-icon.swal2-error .swal2-x-mark { + position: relative; + flex-grow: 1; +} +.swal2-icon.swal2-error [class^=swal2-x-mark-line] { + display: block; + position: absolute; + top: 2.3125em; + width: 2.9375em; + height: 0.3125em; + border-radius: 0.125em; + background-color: #f27474; +} +.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left] { + left: 1.0625em; + transform: rotate(45deg); +} +.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right] { + right: 1em; + transform: rotate(-45deg); +} +.swal2-icon.swal2-error.swal2-icon-show { + -webkit-animation: swal2-animate-error-icon 0.5s; + animation: swal2-animate-error-icon 0.5s; +} +.swal2-icon.swal2-error.swal2-icon-show .swal2-x-mark { + -webkit-animation: swal2-animate-error-x-mark 0.5s; + animation: swal2-animate-error-x-mark 0.5s; +} +.swal2-icon.swal2-warning { + border-color: #facea8; + color: #f8bb86; +} +.swal2-icon.swal2-info { + border-color: #9de0f6; + color: #3fc3ee; +} +.swal2-icon.swal2-question { + border-color: #c9dae1; + color: #87adbd; +} +.swal2-icon.swal2-success { + border-color: #a5dc86; + color: #a5dc86; +} +.swal2-icon.swal2-success [class^=swal2-success-circular-line] { + position: absolute; + width: 3.75em; + height: 7.5em; + transform: rotate(45deg); + border-radius: 50%; +} +.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=left] { + top: -0.4375em; + left: -2.0635em; + transform: rotate(-45deg); + transform-origin: 3.75em 3.75em; + border-radius: 7.5em 0 0 7.5em; +} +.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=right] { + top: -0.6875em; + left: 1.875em; + transform: rotate(-45deg); + transform-origin: 0 3.75em; + border-radius: 0 7.5em 7.5em 0; +} +.swal2-icon.swal2-success .swal2-success-ring { + position: absolute; + z-index: 2; + top: -0.25em; + left: -0.25em; + box-sizing: content-box; + width: 100%; + height: 100%; + border: 0.25em solid rgba(165, 220, 134, 0.3); + border-radius: 50%; +} +.swal2-icon.swal2-success .swal2-success-fix { + position: absolute; + z-index: 1; + top: 0.5em; + left: 1.625em; + width: 0.4375em; + height: 5.625em; + transform: rotate(-45deg); +} +.swal2-icon.swal2-success [class^=swal2-success-line] { + display: block; + position: absolute; + z-index: 2; + height: 0.3125em; + border-radius: 0.125em; + background-color: #a5dc86; +} +.swal2-icon.swal2-success [class^=swal2-success-line][class$=tip] { + top: 2.875em; + left: 0.8125em; + width: 1.5625em; + transform: rotate(45deg); +} +.swal2-icon.swal2-success [class^=swal2-success-line][class$=long] { + top: 2.375em; + right: 0.5em; + width: 2.9375em; + transform: rotate(-45deg); +} +.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-tip { + -webkit-animation: swal2-animate-success-line-tip 0.75s; + animation: swal2-animate-success-line-tip 0.75s; +} +.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-long { + -webkit-animation: swal2-animate-success-line-long 0.75s; + animation: swal2-animate-success-line-long 0.75s; +} +.swal2-icon.swal2-success.swal2-icon-show .swal2-success-circular-line-right { + -webkit-animation: swal2-rotate-success-circular-line 4.25s ease-in; + animation: swal2-rotate-success-circular-line 4.25s ease-in; +} + +.swal2-progress-steps { + flex-wrap: wrap; + align-items: center; + max-width: 100%; + margin: 1.25em auto; + padding: 0; + background: inherit; + font-weight: 600; +} +.swal2-progress-steps li { + display: inline-block; + position: relative; +} +.swal2-progress-steps .swal2-progress-step { + z-index: 20; + flex-shrink: 0; + width: 2em; + height: 2em; + border-radius: 2em; + background: #2778c4; + color: #fff; + line-height: 2em; + text-align: center; +} +.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step { + background: #2778c4; +} +.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step ~ .swal2-progress-step { + background: #add8e6; + color: #fff; +} +.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step ~ .swal2-progress-step-line { + background: #add8e6; +} +.swal2-progress-steps .swal2-progress-step-line { + z-index: 10; + flex-shrink: 0; + width: 2.5em; + height: 0.4em; + margin: 0 -1px; + background: #2778c4; +} + +[class^=swal2] { + -webkit-tap-highlight-color: transparent; +} + +.swal2-show { + -webkit-animation: swal2-show 0.3s; + animation: swal2-show 0.3s; +} + +.swal2-hide { + -webkit-animation: swal2-hide 0.15s forwards; + animation: swal2-hide 0.15s forwards; +} + +.swal2-noanimation { + transition: none; +} + +.swal2-scrollbar-measure { + position: absolute; + top: -9999px; + width: 50px; + height: 50px; + overflow: scroll; +} + +.swal2-rtl .swal2-close { + margin-right: initial; + margin-left: 0; +} +.swal2-rtl .swal2-timer-progress-bar { + right: 0; + left: auto; +} + +@-webkit-keyframes swal2-toast-show { + 0% { + transform: translateY(-0.625em) rotateZ(2deg); + } + 33% { + transform: translateY(0) rotateZ(-2deg); + } + 66% { + transform: translateY(0.3125em) rotateZ(2deg); + } + 100% { + transform: translateY(0) rotateZ(0deg); + } +} + +@keyframes swal2-toast-show { + 0% { + transform: translateY(-0.625em) rotateZ(2deg); + } + 33% { + transform: translateY(0) rotateZ(-2deg); + } + 66% { + transform: translateY(0.3125em) rotateZ(2deg); + } + 100% { + transform: translateY(0) rotateZ(0deg); + } +} +@-webkit-keyframes swal2-toast-hide { + 100% { + transform: rotateZ(1deg); + opacity: 0; + } +} +@keyframes swal2-toast-hide { + 100% { + transform: rotateZ(1deg); + opacity: 0; + } +} +@-webkit-keyframes swal2-toast-animate-success-line-tip { + 0% { + top: 0.5625em; + left: 0.0625em; + width: 0; + } + 54% { + top: 0.125em; + left: 0.125em; + width: 0; + } + 70% { + top: 0.625em; + left: -0.25em; + width: 1.625em; + } + 84% { + top: 1.0625em; + left: 0.75em; + width: 0.5em; + } + 100% { + top: 1.125em; + left: 0.1875em; + width: 0.75em; + } +} +@keyframes swal2-toast-animate-success-line-tip { + 0% { + top: 0.5625em; + left: 0.0625em; + width: 0; + } + 54% { + top: 0.125em; + left: 0.125em; + width: 0; + } + 70% { + top: 0.625em; + left: -0.25em; + width: 1.625em; + } + 84% { + top: 1.0625em; + left: 0.75em; + width: 0.5em; + } + 100% { + top: 1.125em; + left: 0.1875em; + width: 0.75em; + } +} +@-webkit-keyframes swal2-toast-animate-success-line-long { + 0% { + top: 1.625em; + right: 1.375em; + width: 0; + } + 65% { + top: 1.25em; + right: 0.9375em; + width: 0; + } + 84% { + top: 0.9375em; + right: 0; + width: 1.125em; + } + 100% { + top: 0.9375em; + right: 0.1875em; + width: 1.375em; + } +} +@keyframes swal2-toast-animate-success-line-long { + 0% { + top: 1.625em; + right: 1.375em; + width: 0; + } + 65% { + top: 1.25em; + right: 0.9375em; + width: 0; + } + 84% { + top: 0.9375em; + right: 0; + width: 1.125em; + } + 100% { + top: 0.9375em; + right: 0.1875em; + width: 1.375em; + } +} +@-webkit-keyframes swal2-show { + 0% { + transform: scale(0.7); + } + 45% { + transform: scale(1.05); + } + 80% { + transform: scale(0.95); + } + 100% { + transform: scale(1); + } +} +@keyframes swal2-show { + 0% { + transform: scale(0.7); + } + 45% { + transform: scale(1.05); + } + 80% { + transform: scale(0.95); + } + 100% { + transform: scale(1); + } +} +@-webkit-keyframes swal2-hide { + 0% { + transform: scale(1); + opacity: 1; + } + 100% { + transform: scale(0.5); + opacity: 0; + } +} +@keyframes swal2-hide { + 0% { + transform: scale(1); + opacity: 1; + } + 100% { + transform: scale(0.5); + opacity: 0; + } +} +@-webkit-keyframes swal2-animate-success-line-tip { + 0% { + top: 1.1875em; + left: 0.0625em; + width: 0; + } + 54% { + top: 1.0625em; + left: 0.125em; + width: 0; + } + 70% { + top: 2.1875em; + left: -0.375em; + width: 3.125em; + } + 84% { + top: 3em; + left: 1.3125em; + width: 1.0625em; + } + 100% { + top: 2.8125em; + left: 0.8125em; + width: 1.5625em; + } +} +@keyframes swal2-animate-success-line-tip { + 0% { + top: 1.1875em; + left: 0.0625em; + width: 0; + } + 54% { + top: 1.0625em; + left: 0.125em; + width: 0; + } + 70% { + top: 2.1875em; + left: -0.375em; + width: 3.125em; + } + 84% { + top: 3em; + left: 1.3125em; + width: 1.0625em; + } + 100% { + top: 2.8125em; + left: 0.8125em; + width: 1.5625em; + } +} +@-webkit-keyframes swal2-animate-success-line-long { + 0% { + top: 3.375em; + right: 2.875em; + width: 0; + } + 65% { + top: 3.375em; + right: 2.875em; + width: 0; + } + 84% { + top: 2.1875em; + right: 0; + width: 3.4375em; + } + 100% { + top: 2.375em; + right: 0.5em; + width: 2.9375em; + } +} +@keyframes swal2-animate-success-line-long { + 0% { + top: 3.375em; + right: 2.875em; + width: 0; + } + 65% { + top: 3.375em; + right: 2.875em; + width: 0; + } + 84% { + top: 2.1875em; + right: 0; + width: 3.4375em; + } + 100% { + top: 2.375em; + right: 0.5em; + width: 2.9375em; + } +} +@-webkit-keyframes swal2-rotate-success-circular-line { + 0% { + transform: rotate(-45deg); + } + 5% { + transform: rotate(-45deg); + } + 12% { + transform: rotate(-405deg); + } + 100% { + transform: rotate(-405deg); + } +} +@keyframes swal2-rotate-success-circular-line { + 0% { + transform: rotate(-45deg); + } + 5% { + transform: rotate(-45deg); + } + 12% { + transform: rotate(-405deg); + } + 100% { + transform: rotate(-405deg); + } +} +@-webkit-keyframes swal2-animate-error-x-mark { + 0% { + margin-top: 1.625em; + transform: scale(0.4); + opacity: 0; + } + 50% { + margin-top: 1.625em; + transform: scale(0.4); + opacity: 0; + } + 80% { + margin-top: -0.375em; + transform: scale(1.15); + } + 100% { + margin-top: 0; + transform: scale(1); + opacity: 1; + } +} +@keyframes swal2-animate-error-x-mark { + 0% { + margin-top: 1.625em; + transform: scale(0.4); + opacity: 0; + } + 50% { + margin-top: 1.625em; + transform: scale(0.4); + opacity: 0; + } + 80% { + margin-top: -0.375em; + transform: scale(1.15); + } + 100% { + margin-top: 0; + transform: scale(1); + opacity: 1; + } +} +@-webkit-keyframes swal2-animate-error-icon { + 0% { + transform: rotateX(100deg); + opacity: 0; + } + 100% { + transform: rotateX(0deg); + opacity: 1; + } +} +@keyframes swal2-animate-error-icon { + 0% { + transform: rotateX(100deg); + opacity: 0; + } + 100% { + transform: rotateX(0deg); + opacity: 1; + } +} +@-webkit-keyframes swal2-rotate-loading { + 0% { + transform: rotate(0deg); + } + 100% { + transform: rotate(360deg); + } +} +@keyframes swal2-rotate-loading { + 0% { + transform: rotate(0deg); + } + 100% { + transform: rotate(360deg); + } +} +body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) { + overflow: hidden; +} +body.swal2-height-auto { + height: auto !important; +} +body.swal2-no-backdrop .swal2-container { + background-color: transparent !important; + pointer-events: none; +} +body.swal2-no-backdrop .swal2-container .swal2-popup { + pointer-events: all; +} +body.swal2-no-backdrop .swal2-container .swal2-modal { + box-shadow: 0 0 10px rgba(0, 0, 0, 0.4); +} +@media print { + body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) { + overflow-y: scroll !important; + } + body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) > [aria-hidden=true] { + display: none; + } + body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .swal2-container { + position: static !important; + } +} +body.swal2-toast-shown .swal2-container { + box-sizing: border-box; + width: 360px; + max-width: 100%; + background-color: transparent; + pointer-events: none; +} +body.swal2-toast-shown .swal2-container.swal2-top { + top: 0; + right: auto; + bottom: auto; + left: 50%; + transform: translateX(-50%); +} +body.swal2-toast-shown .swal2-container.swal2-top-end, body.swal2-toast-shown .swal2-container.swal2-top-right { + top: 0; + right: 0; + bottom: auto; + left: auto; +} +body.swal2-toast-shown .swal2-container.swal2-top-start, body.swal2-toast-shown .swal2-container.swal2-top-left { + top: 0; + right: auto; + bottom: auto; + left: 0; +} +body.swal2-toast-shown .swal2-container.swal2-center-start, body.swal2-toast-shown .swal2-container.swal2-center-left { + top: 50%; + right: auto; + bottom: auto; + left: 0; + transform: translateY(-50%); +} +body.swal2-toast-shown .swal2-container.swal2-center { + top: 50%; + right: auto; + bottom: auto; + left: 50%; + transform: translate(-50%, -50%); +} +body.swal2-toast-shown .swal2-container.swal2-center-end, body.swal2-toast-shown .swal2-container.swal2-center-right { + top: 50%; + right: 0; + bottom: auto; + left: auto; + transform: translateY(-50%); +} +body.swal2-toast-shown .swal2-container.swal2-bottom-start, body.swal2-toast-shown .swal2-container.swal2-bottom-left { + top: auto; + right: auto; + bottom: 0; + left: 0; +} +body.swal2-toast-shown .swal2-container.swal2-bottom { + top: auto; + right: auto; + bottom: 0; + left: 50%; + transform: translateX(-50%); +} +body.swal2-toast-shown .swal2-container.swal2-bottom-end, body.swal2-toast-shown .swal2-container.swal2-bottom-right { + top: auto; + right: 0; + bottom: 0; + left: auto; +} \ No newline at end of file diff --git a/modules/blogging/app/Volo.BloggingTestApp/wwwroot/libs/sweetalert2/sweetalert2.js b/modules/blogging/app/Volo.BloggingTestApp/wwwroot/libs/sweetalert2/sweetalert2.js new file mode 100644 index 0000000000..e9c254f064 --- /dev/null +++ b/modules/blogging/app/Volo.BloggingTestApp/wwwroot/libs/sweetalert2/sweetalert2.js @@ -0,0 +1,3121 @@ +/*! +* sweetalert2 v11.1.5 +* Released under the MIT License. +*/ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : + typeof define === 'function' && define.amd ? define(factory) : + (global = global || self, global.Sweetalert2 = factory()); +}(this, function () { 'use strict'; + + const DismissReason = Object.freeze({ + cancel: 'cancel', + backdrop: 'backdrop', + close: 'close', + esc: 'esc', + timer: 'timer' + }); + + const consolePrefix = 'SweetAlert2:'; + /** + * Filter the unique values into a new array + * @param arr + */ + + const uniqueArray = arr => { + const result = []; + + for (let i = 0; i < arr.length; i++) { + if (result.indexOf(arr[i]) === -1) { + result.push(arr[i]); + } + } + + return result; + }; + /** + * Capitalize the first letter of a string + * @param str + */ + + const capitalizeFirstLetter = str => str.charAt(0).toUpperCase() + str.slice(1); + /** + * Convert NodeList to Array + * @param nodeList + */ + + const toArray = nodeList => Array.prototype.slice.call(nodeList); + /** + * Standardise console warnings + * @param message + */ + + const warn = message => { + console.warn("".concat(consolePrefix, " ").concat(typeof message === 'object' ? message.join(' ') : message)); + }; + /** + * Standardise console errors + * @param message + */ + + const error = message => { + console.error("".concat(consolePrefix, " ").concat(message)); + }; + /** + * Private global state for `warnOnce` + * @type {Array} + * @private + */ + + const previousWarnOnceMessages = []; + /** + * Show a console warning, but only if it hasn't already been shown + * @param message + */ + + const warnOnce = message => { + if (!previousWarnOnceMessages.includes(message)) { + previousWarnOnceMessages.push(message); + warn(message); + } + }; + /** + * Show a one-time console warning about deprecated params/methods + */ + + const warnAboutDeprecation = (deprecatedParam, useInstead) => { + warnOnce("\"".concat(deprecatedParam, "\" is deprecated and will be removed in the next major release. Please use \"").concat(useInstead, "\" instead.")); + }; + /** + * If `arg` is a function, call it (with no arguments or context) and return the result. + * Otherwise, just pass the value through + * @param arg + */ + + const callIfFunction = arg => typeof arg === 'function' ? arg() : arg; + const hasToPromiseFn = arg => arg && typeof arg.toPromise === 'function'; + const asPromise = arg => hasToPromiseFn(arg) ? arg.toPromise() : Promise.resolve(arg); + const isPromise = arg => arg && Promise.resolve(arg) === arg; + + const isJqueryElement = elem => typeof elem === 'object' && elem.jquery; + + const isElement = elem => elem instanceof Element || isJqueryElement(elem); + + const argsToParams = args => { + const params = {}; + + if (typeof args[0] === 'object' && !isElement(args[0])) { + Object.assign(params, args[0]); + } else { + ['title', 'html', 'icon'].forEach((name, index) => { + const arg = args[index]; + + if (typeof arg === 'string' || isElement(arg)) { + params[name] = arg; + } else if (arg !== undefined) { + error("Unexpected type of ".concat(name, "! Expected \"string\" or \"Element\", got ").concat(typeof arg)); + } + }); + } + + return params; + }; + + const swalPrefix = 'swal2-'; + const prefix = items => { + const result = {}; + + for (const i in items) { + result[items[i]] = swalPrefix + items[i]; + } + + return result; + }; + const swalClasses = prefix(['container', 'shown', 'height-auto', 'iosfix', 'popup', 'modal', 'no-backdrop', 'no-transition', 'toast', 'toast-shown', 'show', 'hide', 'close', 'title', 'html-container', 'actions', 'confirm', 'deny', 'cancel', 'default-outline', 'footer', 'icon', 'icon-content', 'image', 'input', 'file', 'range', 'select', 'radio', 'checkbox', 'label', 'textarea', 'inputerror', 'input-label', 'validation-message', 'progress-steps', 'active-progress-step', 'progress-step', 'progress-step-line', 'loader', 'loading', 'styled', 'top', 'top-start', 'top-end', 'top-left', 'top-right', 'center', 'center-start', 'center-end', 'center-left', 'center-right', 'bottom', 'bottom-start', 'bottom-end', 'bottom-left', 'bottom-right', 'grow-row', 'grow-column', 'grow-fullscreen', 'rtl', 'timer-progress-bar', 'timer-progress-bar-container', 'scrollbar-measure', 'icon-success', 'icon-warning', 'icon-info', 'icon-question', 'icon-error']); + const iconTypes = prefix(['success', 'warning', 'info', 'question', 'error']); + + const getContainer = () => document.body.querySelector(".".concat(swalClasses.container)); + const elementBySelector = selectorString => { + const container = getContainer(); + return container ? container.querySelector(selectorString) : null; + }; + + const elementByClass = className => { + return elementBySelector(".".concat(className)); + }; + + const getPopup = () => elementByClass(swalClasses.popup); + const getIcon = () => elementByClass(swalClasses.icon); + const getTitle = () => elementByClass(swalClasses.title); + const getHtmlContainer = () => elementByClass(swalClasses['html-container']); + const getImage = () => elementByClass(swalClasses.image); + const getProgressSteps = () => elementByClass(swalClasses['progress-steps']); + const getValidationMessage = () => elementByClass(swalClasses['validation-message']); + const getConfirmButton = () => elementBySelector(".".concat(swalClasses.actions, " .").concat(swalClasses.confirm)); + const getDenyButton = () => elementBySelector(".".concat(swalClasses.actions, " .").concat(swalClasses.deny)); + const getInputLabel = () => elementByClass(swalClasses['input-label']); + const getLoader = () => elementBySelector(".".concat(swalClasses.loader)); + const getCancelButton = () => elementBySelector(".".concat(swalClasses.actions, " .").concat(swalClasses.cancel)); + const getActions = () => elementByClass(swalClasses.actions); + const getFooter = () => elementByClass(swalClasses.footer); + const getTimerProgressBar = () => elementByClass(swalClasses['timer-progress-bar']); + const getCloseButton = () => elementByClass(swalClasses.close); // https://github.com/jkup/focusable/blob/master/index.js + + const focusable = "\n a[href],\n area[href],\n input:not([disabled]),\n select:not([disabled]),\n textarea:not([disabled]),\n button:not([disabled]),\n iframe,\n object,\n embed,\n [tabindex=\"0\"],\n [contenteditable],\n audio[controls],\n video[controls],\n summary\n"; + const getFocusableElements = () => { + const focusableElementsWithTabindex = toArray(getPopup().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')) // sort according to tabindex + .sort((a, b) => { + a = parseInt(a.getAttribute('tabindex')); + b = parseInt(b.getAttribute('tabindex')); + + if (a > b) { + return 1; + } else if (a < b) { + return -1; + } + + return 0; + }); + const otherFocusableElements = toArray(getPopup().querySelectorAll(focusable)).filter(el => el.getAttribute('tabindex') !== '-1'); + return uniqueArray(focusableElementsWithTabindex.concat(otherFocusableElements)).filter(el => isVisible(el)); + }; + const isModal = () => { + return !isToast() && !document.body.classList.contains(swalClasses['no-backdrop']); + }; + const isToast = () => { + return document.body.classList.contains(swalClasses['toast-shown']); + }; + const isLoading = () => { + return getPopup().hasAttribute('data-loading'); + }; + + const states = { + previousBodyPadding: null + }; + const setInnerHtml = (elem, html) => { + // #1926 + elem.textContent = ''; + + if (html) { + const parser = new DOMParser(); + const parsed = parser.parseFromString(html, "text/html"); + toArray(parsed.querySelector('head').childNodes).forEach(child => { + elem.appendChild(child); + }); + toArray(parsed.querySelector('body').childNodes).forEach(child => { + elem.appendChild(child); + }); + } + }; + const hasClass = (elem, className) => { + if (!className) { + return false; + } + + const classList = className.split(/\s+/); + + for (let i = 0; i < classList.length; i++) { + if (!elem.classList.contains(classList[i])) { + return false; + } + } + + return true; + }; + + const removeCustomClasses = (elem, params) => { + toArray(elem.classList).forEach(className => { + if (!Object.values(swalClasses).includes(className) && !Object.values(iconTypes).includes(className) && !Object.values(params.showClass).includes(className)) { + elem.classList.remove(className); + } + }); + }; + + const applyCustomClass = (elem, params, className) => { + removeCustomClasses(elem, params); + + if (params.customClass && params.customClass[className]) { + if (typeof params.customClass[className] !== 'string' && !params.customClass[className].forEach) { + return warn("Invalid type of customClass.".concat(className, "! Expected string or iterable object, got \"").concat(typeof params.customClass[className], "\"")); + } + + addClass(elem, params.customClass[className]); + } + }; + const getInput = (popup, inputType) => { + if (!inputType) { + return null; + } + + switch (inputType) { + case 'select': + case 'textarea': + case 'file': + return getChildByClass(popup, swalClasses[inputType]); + + case 'checkbox': + return popup.querySelector(".".concat(swalClasses.checkbox, " input")); + + case 'radio': + return popup.querySelector(".".concat(swalClasses.radio, " input:checked")) || popup.querySelector(".".concat(swalClasses.radio, " input:first-child")); + + case 'range': + return popup.querySelector(".".concat(swalClasses.range, " input")); + + default: + return getChildByClass(popup, swalClasses.input); + } + }; + const focusInput = input => { + input.focus(); // place cursor at end of text in text input + + if (input.type !== 'file') { + // http://stackoverflow.com/a/2345915 + const val = input.value; + input.value = ''; + input.value = val; + } + }; + const toggleClass = (target, classList, condition) => { + if (!target || !classList) { + return; + } + + if (typeof classList === 'string') { + classList = classList.split(/\s+/).filter(Boolean); + } + + classList.forEach(className => { + if (target.forEach) { + target.forEach(elem => { + condition ? elem.classList.add(className) : elem.classList.remove(className); + }); + } else { + condition ? target.classList.add(className) : target.classList.remove(className); + } + }); + }; + const addClass = (target, classList) => { + toggleClass(target, classList, true); + }; + const removeClass = (target, classList) => { + toggleClass(target, classList, false); + }; + const getChildByClass = (elem, className) => { + for (let i = 0; i < elem.childNodes.length; i++) { + if (hasClass(elem.childNodes[i], className)) { + return elem.childNodes[i]; + } + } + }; + const applyNumericalStyle = (elem, property, value) => { + if (value === "".concat(parseInt(value))) { + value = parseInt(value); + } + + if (value || parseInt(value) === 0) { + elem.style[property] = typeof value === 'number' ? "".concat(value, "px") : value; + } else { + elem.style.removeProperty(property); + } + }; + const show = (elem, display = 'flex') => { + elem.style.display = display; + }; + const hide = elem => { + elem.style.display = 'none'; + }; + const setStyle = (parent, selector, property, value) => { + const el = parent.querySelector(selector); + + if (el) { + el.style[property] = value; + } + }; + const toggle = (elem, condition, display) => { + condition ? show(elem, display) : hide(elem); + }; // borrowed from jquery $(elem).is(':visible') implementation + + const isVisible = elem => !!(elem && (elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length)); + const allButtonsAreHidden = () => !isVisible(getConfirmButton()) && !isVisible(getDenyButton()) && !isVisible(getCancelButton()); + const isScrollable = elem => !!(elem.scrollHeight > elem.clientHeight); // borrowed from https://stackoverflow.com/a/46352119 + + const hasCssAnimation = elem => { + const style = window.getComputedStyle(elem); + const animDuration = parseFloat(style.getPropertyValue('animation-duration') || '0'); + const transDuration = parseFloat(style.getPropertyValue('transition-duration') || '0'); + return animDuration > 0 || transDuration > 0; + }; + const animateTimerProgressBar = (timer, reset = false) => { + const timerProgressBar = getTimerProgressBar(); + + if (isVisible(timerProgressBar)) { + if (reset) { + timerProgressBar.style.transition = 'none'; + timerProgressBar.style.width = '100%'; + } + + setTimeout(() => { + timerProgressBar.style.transition = "width ".concat(timer / 1000, "s linear"); + timerProgressBar.style.width = '0%'; + }, 10); + } + }; + const stopTimerProgressBar = () => { + const timerProgressBar = getTimerProgressBar(); + const timerProgressBarWidth = parseInt(window.getComputedStyle(timerProgressBar).width); + timerProgressBar.style.removeProperty('transition'); + timerProgressBar.style.width = '100%'; + const timerProgressBarFullWidth = parseInt(window.getComputedStyle(timerProgressBar).width); + const timerProgressBarPercent = parseInt(timerProgressBarWidth / timerProgressBarFullWidth * 100); + timerProgressBar.style.removeProperty('transition'); + timerProgressBar.style.width = "".concat(timerProgressBarPercent, "%"); + }; + + // Detect Node env + const isNodeEnv = () => typeof window === 'undefined' || typeof document === 'undefined'; + + const sweetHTML = "\n
      \n \n
        \n
        \n \n

        \n
        \n \n \n
        \n \n \n
        \n \n
        \n \n \n
        \n
        \n
        \n \n \n \n
        \n
        \n
        \n
        \n
        \n
        \n").replace(/(^|\n)\s*/g, ''); + + const resetOldContainer = () => { + const oldContainer = getContainer(); + + if (!oldContainer) { + return false; + } + + oldContainer.remove(); + removeClass([document.documentElement, document.body], [swalClasses['no-backdrop'], swalClasses['toast-shown'], swalClasses['has-column']]); + return true; + }; + + const resetValidationMessage = () => { + if (Swal.isVisible()) { + Swal.resetValidationMessage(); + } + }; + + const addInputChangeListeners = () => { + const popup = getPopup(); + const input = getChildByClass(popup, swalClasses.input); + const file = getChildByClass(popup, swalClasses.file); + const range = popup.querySelector(".".concat(swalClasses.range, " input")); + const rangeOutput = popup.querySelector(".".concat(swalClasses.range, " output")); + const select = getChildByClass(popup, swalClasses.select); + const checkbox = popup.querySelector(".".concat(swalClasses.checkbox, " input")); + const textarea = getChildByClass(popup, swalClasses.textarea); + input.oninput = resetValidationMessage; + file.onchange = resetValidationMessage; + select.onchange = resetValidationMessage; + checkbox.onchange = resetValidationMessage; + textarea.oninput = resetValidationMessage; + + range.oninput = () => { + resetValidationMessage(); + rangeOutput.value = range.value; + }; + + range.onchange = () => { + resetValidationMessage(); + range.nextSibling.value = range.value; + }; + }; + + const getTarget = target => typeof target === 'string' ? document.querySelector(target) : target; + + const setupAccessibility = params => { + const popup = getPopup(); + popup.setAttribute('role', params.toast ? 'alert' : 'dialog'); + popup.setAttribute('aria-live', params.toast ? 'polite' : 'assertive'); + + if (!params.toast) { + popup.setAttribute('aria-modal', 'true'); + } + }; + + const setupRTL = targetElement => { + if (window.getComputedStyle(targetElement).direction === 'rtl') { + addClass(getContainer(), swalClasses.rtl); + } + }; + /* + * Add modal + backdrop to DOM + */ + + + const init = params => { + // Clean up the old popup container if it exists + const oldContainerExisted = resetOldContainer(); + /* istanbul ignore if */ + + if (isNodeEnv()) { + error('SweetAlert2 requires document to initialize'); + return; + } + + const container = document.createElement('div'); + container.className = swalClasses.container; + + if (oldContainerExisted) { + addClass(container, swalClasses['no-transition']); + } + + setInnerHtml(container, sweetHTML); + const targetElement = getTarget(params.target); + targetElement.appendChild(container); + setupAccessibility(params); + setupRTL(targetElement); + addInputChangeListeners(); + }; + + const parseHtmlToContainer = (param, target) => { + // DOM element + if (param instanceof HTMLElement) { + target.appendChild(param); // Object + } else if (typeof param === 'object') { + handleObject(param, target); // Plain string + } else if (param) { + setInnerHtml(target, param); + } + }; + + const handleObject = (param, target) => { + // JQuery element(s) + if (param.jquery) { + handleJqueryElem(target, param); // For other objects use their string representation + } else { + setInnerHtml(target, param.toString()); + } + }; + + const handleJqueryElem = (target, elem) => { + target.textContent = ''; + + if (0 in elem) { + for (let i = 0; (i in elem); i++) { + target.appendChild(elem[i].cloneNode(true)); + } + } else { + target.appendChild(elem.cloneNode(true)); + } + }; + + const animationEndEvent = (() => { + // Prevent run in Node env + + /* istanbul ignore if */ + if (isNodeEnv()) { + return false; + } + + const testEl = document.createElement('div'); + const transEndEventNames = { + WebkitAnimation: 'webkitAnimationEnd', + OAnimation: 'oAnimationEnd oanimationend', + animation: 'animationend' + }; + + for (const i in transEndEventNames) { + if (Object.prototype.hasOwnProperty.call(transEndEventNames, i) && typeof testEl.style[i] !== 'undefined') { + return transEndEventNames[i]; + } + } + + return false; + })(); + + // https://github.com/twbs/bootstrap/blob/master/js/src/modal.js + + const measureScrollbar = () => { + const scrollDiv = document.createElement('div'); + scrollDiv.className = swalClasses['scrollbar-measure']; + document.body.appendChild(scrollDiv); + const scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth; + document.body.removeChild(scrollDiv); + return scrollbarWidth; + }; + + const renderActions = (instance, params) => { + const actions = getActions(); + const loader = getLoader(); + const confirmButton = getConfirmButton(); + const denyButton = getDenyButton(); + const cancelButton = getCancelButton(); // Actions (buttons) wrapper + + if (!params.showConfirmButton && !params.showDenyButton && !params.showCancelButton) { + hide(actions); + } else { + show(actions); + } // Custom class + + + applyCustomClass(actions, params, 'actions'); // Render buttons + + renderButton(confirmButton, 'confirm', params); + renderButton(denyButton, 'deny', params); + renderButton(cancelButton, 'cancel', params); + handleButtonsStyling(confirmButton, denyButton, cancelButton, params); + + if (params.reverseButtons) { + actions.insertBefore(cancelButton, loader); + actions.insertBefore(denyButton, loader); + actions.insertBefore(confirmButton, loader); + } // Loader + + + setInnerHtml(loader, params.loaderHtml); + applyCustomClass(loader, params, 'loader'); + }; + + function handleButtonsStyling(confirmButton, denyButton, cancelButton, params) { + if (!params.buttonsStyling) { + return removeClass([confirmButton, denyButton, cancelButton], swalClasses.styled); + } + + addClass([confirmButton, denyButton, cancelButton], swalClasses.styled); // Buttons background colors + + if (params.confirmButtonColor) { + confirmButton.style.backgroundColor = params.confirmButtonColor; + addClass(confirmButton, swalClasses['default-outline']); + } + + if (params.denyButtonColor) { + denyButton.style.backgroundColor = params.denyButtonColor; + addClass(denyButton, swalClasses['default-outline']); + } + + if (params.cancelButtonColor) { + cancelButton.style.backgroundColor = params.cancelButtonColor; + addClass(cancelButton, swalClasses['default-outline']); + } + } + + function renderButton(button, buttonType, params) { + toggle(button, params["show".concat(capitalizeFirstLetter(buttonType), "Button")], 'inline-block'); + setInnerHtml(button, params["".concat(buttonType, "ButtonText")]); // Set caption text + + button.setAttribute('aria-label', params["".concat(buttonType, "ButtonAriaLabel")]); // ARIA label + // Add buttons custom classes + + button.className = swalClasses[buttonType]; + applyCustomClass(button, params, "".concat(buttonType, "Button")); + addClass(button, params["".concat(buttonType, "ButtonClass")]); + } + + function handleBackdropParam(container, backdrop) { + if (typeof backdrop === 'string') { + container.style.background = backdrop; + } else if (!backdrop) { + addClass([document.documentElement, document.body], swalClasses['no-backdrop']); + } + } + + function handlePositionParam(container, position) { + if (position in swalClasses) { + addClass(container, swalClasses[position]); + } else { + warn('The "position" parameter is not valid, defaulting to "center"'); + addClass(container, swalClasses.center); + } + } + + function handleGrowParam(container, grow) { + if (grow && typeof grow === 'string') { + const growClass = "grow-".concat(grow); + + if (growClass in swalClasses) { + addClass(container, swalClasses[growClass]); + } + } + } + + const renderContainer = (instance, params) => { + const container = getContainer(); + + if (!container) { + return; + } + + handleBackdropParam(container, params.backdrop); + handlePositionParam(container, params.position); + handleGrowParam(container, params.grow); // Custom class + + applyCustomClass(container, params, 'container'); + }; + + /** + * This module containts `WeakMap`s for each effectively-"private property" that a `Swal` has. + * For example, to set the private property "foo" of `this` to "bar", you can `privateProps.foo.set(this, 'bar')` + * This is the approach that Babel will probably take to implement private methods/fields + * https://github.com/tc39/proposal-private-methods + * https://github.com/babel/babel/pull/7555 + * Once we have the changes from that PR in Babel, and our core class fits reasonable in *one module* + * then we can use that language feature. + */ + var privateProps = { + promise: new WeakMap(), + innerParams: new WeakMap(), + domCache: new WeakMap() + }; + + const inputTypes = ['input', 'file', 'range', 'select', 'radio', 'checkbox', 'textarea']; + const renderInput = (instance, params) => { + const popup = getPopup(); + const innerParams = privateProps.innerParams.get(instance); + const rerender = !innerParams || params.input !== innerParams.input; + inputTypes.forEach(inputType => { + const inputClass = swalClasses[inputType]; + const inputContainer = getChildByClass(popup, inputClass); // set attributes + + setAttributes(inputType, params.inputAttributes); // set class + + inputContainer.className = inputClass; + + if (rerender) { + hide(inputContainer); + } + }); + + if (params.input) { + if (rerender) { + showInput(params); + } // set custom class + + + setCustomClass(params); + } + }; + + const showInput = params => { + if (!renderInputType[params.input]) { + return error("Unexpected type of input! Expected \"text\", \"email\", \"password\", \"number\", \"tel\", \"select\", \"radio\", \"checkbox\", \"textarea\", \"file\" or \"url\", got \"".concat(params.input, "\"")); + } + + const inputContainer = getInputContainer(params.input); + const input = renderInputType[params.input](inputContainer, params); + show(input); // input autofocus + + setTimeout(() => { + focusInput(input); + }); + }; + + const removeAttributes = input => { + for (let i = 0; i < input.attributes.length; i++) { + const attrName = input.attributes[i].name; + + if (!['type', 'value', 'style'].includes(attrName)) { + input.removeAttribute(attrName); + } + } + }; + + const setAttributes = (inputType, inputAttributes) => { + const input = getInput(getPopup(), inputType); + + if (!input) { + return; + } + + removeAttributes(input); + + for (const attr in inputAttributes) { + input.setAttribute(attr, inputAttributes[attr]); + } + }; + + const setCustomClass = params => { + const inputContainer = getInputContainer(params.input); + + if (params.customClass) { + addClass(inputContainer, params.customClass.input); + } + }; + + const setInputPlaceholder = (input, params) => { + if (!input.placeholder || params.inputPlaceholder) { + input.placeholder = params.inputPlaceholder; + } + }; + + const setInputLabel = (input, prependTo, params) => { + if (params.inputLabel) { + input.id = swalClasses.input; + const label = document.createElement('label'); + const labelClass = swalClasses['input-label']; + label.setAttribute('for', input.id); + label.className = labelClass; + addClass(label, params.customClass.inputLabel); + label.innerText = params.inputLabel; + prependTo.insertAdjacentElement('beforebegin', label); + } + }; + + const getInputContainer = inputType => { + const inputClass = swalClasses[inputType] ? swalClasses[inputType] : swalClasses.input; + return getChildByClass(getPopup(), inputClass); + }; + + const renderInputType = {}; + + renderInputType.text = renderInputType.email = renderInputType.password = renderInputType.number = renderInputType.tel = renderInputType.url = (input, params) => { + if (typeof params.inputValue === 'string' || typeof params.inputValue === 'number') { + input.value = params.inputValue; + } else if (!isPromise(params.inputValue)) { + warn("Unexpected type of inputValue! Expected \"string\", \"number\" or \"Promise\", got \"".concat(typeof params.inputValue, "\"")); + } + + setInputLabel(input, input, params); + setInputPlaceholder(input, params); + input.type = params.input; + return input; + }; + + renderInputType.file = (input, params) => { + setInputLabel(input, input, params); + setInputPlaceholder(input, params); + return input; + }; + + renderInputType.range = (range, params) => { + const rangeInput = range.querySelector('input'); + const rangeOutput = range.querySelector('output'); + rangeInput.value = params.inputValue; + rangeInput.type = params.input; + rangeOutput.value = params.inputValue; + setInputLabel(rangeInput, range, params); + return range; + }; + + renderInputType.select = (select, params) => { + select.textContent = ''; + + if (params.inputPlaceholder) { + const placeholder = document.createElement('option'); + setInnerHtml(placeholder, params.inputPlaceholder); + placeholder.value = ''; + placeholder.disabled = true; + placeholder.selected = true; + select.appendChild(placeholder); + } + + setInputLabel(select, select, params); + return select; + }; + + renderInputType.radio = radio => { + radio.textContent = ''; + return radio; + }; + + renderInputType.checkbox = (checkboxContainer, params) => { + const checkbox = getInput(getPopup(), 'checkbox'); + checkbox.value = 1; + checkbox.id = swalClasses.checkbox; + checkbox.checked = Boolean(params.inputValue); + const label = checkboxContainer.querySelector('span'); + setInnerHtml(label, params.inputPlaceholder); + return checkboxContainer; + }; + + renderInputType.textarea = (textarea, params) => { + textarea.value = params.inputValue; + setInputPlaceholder(textarea, params); + setInputLabel(textarea, textarea, params); + + const getMargin = el => parseInt(window.getComputedStyle(el).marginLeft) + parseInt(window.getComputedStyle(el).marginRight); + + setTimeout(() => { + // #2291 + if ('MutationObserver' in window) { + // #1699 + const initialPopupWidth = parseInt(window.getComputedStyle(getPopup()).width); + + const textareaResizeHandler = () => { + const textareaWidth = textarea.offsetWidth + getMargin(textarea); + + if (textareaWidth > initialPopupWidth) { + getPopup().style.width = "".concat(textareaWidth, "px"); + } else { + getPopup().style.width = null; + } + }; + + new MutationObserver(textareaResizeHandler).observe(textarea, { + attributes: true, + attributeFilter: ['style'] + }); + } + }); + return textarea; + }; + + const renderContent = (instance, params) => { + const htmlContainer = getHtmlContainer(); + applyCustomClass(htmlContainer, params, 'htmlContainer'); // Content as HTML + + if (params.html) { + parseHtmlToContainer(params.html, htmlContainer); + show(htmlContainer, 'block'); // Content as plain text + } else if (params.text) { + htmlContainer.textContent = params.text; + show(htmlContainer, 'block'); // No content + } else { + hide(htmlContainer); + } + + renderInput(instance, params); + }; + + const renderFooter = (instance, params) => { + const footer = getFooter(); + toggle(footer, params.footer); + + if (params.footer) { + parseHtmlToContainer(params.footer, footer); + } // Custom class + + + applyCustomClass(footer, params, 'footer'); + }; + + const renderCloseButton = (instance, params) => { + const closeButton = getCloseButton(); + setInnerHtml(closeButton, params.closeButtonHtml); // Custom class + + applyCustomClass(closeButton, params, 'closeButton'); + toggle(closeButton, params.showCloseButton); + closeButton.setAttribute('aria-label', params.closeButtonAriaLabel); + }; + + const renderIcon = (instance, params) => { + const innerParams = privateProps.innerParams.get(instance); + const icon = getIcon(); // if the given icon already rendered, apply the styling without re-rendering the icon + + if (innerParams && params.icon === innerParams.icon) { + // Custom or default content + setContent(icon, params); + applyStyles(icon, params); + return; + } + + if (!params.icon && !params.iconHtml) { + return hide(icon); + } + + if (params.icon && Object.keys(iconTypes).indexOf(params.icon) === -1) { + error("Unknown icon! Expected \"success\", \"error\", \"warning\", \"info\" or \"question\", got \"".concat(params.icon, "\"")); + return hide(icon); + } + + show(icon); // Custom or default content + + setContent(icon, params); + applyStyles(icon, params); // Animate icon + + addClass(icon, params.showClass.icon); + }; + + const applyStyles = (icon, params) => { + for (const iconType in iconTypes) { + if (params.icon !== iconType) { + removeClass(icon, iconTypes[iconType]); + } + } + + addClass(icon, iconTypes[params.icon]); // Icon color + + setColor(icon, params); // Success icon background color + + adjustSuccessIconBackgoundColor(); // Custom class + + applyCustomClass(icon, params, 'icon'); + }; // Adjust success icon background color to match the popup background color + + + const adjustSuccessIconBackgoundColor = () => { + const popup = getPopup(); + const popupBackgroundColor = window.getComputedStyle(popup).getPropertyValue('background-color'); + const successIconParts = popup.querySelectorAll('[class^=swal2-success-circular-line], .swal2-success-fix'); + + for (let i = 0; i < successIconParts.length; i++) { + successIconParts[i].style.backgroundColor = popupBackgroundColor; + } + }; + + const setContent = (icon, params) => { + icon.textContent = ''; + + if (params.iconHtml) { + setInnerHtml(icon, iconContent(params.iconHtml)); + } else if (params.icon === 'success') { + setInnerHtml(icon, "\n
        \n \n
        \n
        \n "); + } else if (params.icon === 'error') { + setInnerHtml(icon, "\n \n \n \n \n "); + } else { + const defaultIconHtml = { + question: '?', + warning: '!', + info: 'i' + }; + setInnerHtml(icon, iconContent(defaultIconHtml[params.icon])); + } + }; + + const setColor = (icon, params) => { + if (!params.iconColor) { + return; + } + + icon.style.color = params.iconColor; + icon.style.borderColor = params.iconColor; + + for (const sel of ['.swal2-success-line-tip', '.swal2-success-line-long', '.swal2-x-mark-line-left', '.swal2-x-mark-line-right']) { + setStyle(icon, sel, 'backgroundColor', params.iconColor); + } + + setStyle(icon, '.swal2-success-ring', 'borderColor', params.iconColor); + }; + + const iconContent = content => "
        ").concat(content, "
        "); + + const renderImage = (instance, params) => { + const image = getImage(); + + if (!params.imageUrl) { + return hide(image); + } + + show(image, ''); // Src, alt + + image.setAttribute('src', params.imageUrl); + image.setAttribute('alt', params.imageAlt); // Width, height + + applyNumericalStyle(image, 'width', params.imageWidth); + applyNumericalStyle(image, 'height', params.imageHeight); // Class + + image.className = swalClasses.image; + applyCustomClass(image, params, 'image'); + }; + + const createStepElement = step => { + const stepEl = document.createElement('li'); + addClass(stepEl, swalClasses['progress-step']); + setInnerHtml(stepEl, step); + return stepEl; + }; + + const createLineElement = params => { + const lineEl = document.createElement('li'); + addClass(lineEl, swalClasses['progress-step-line']); + + if (params.progressStepsDistance) { + lineEl.style.width = params.progressStepsDistance; + } + + return lineEl; + }; + + const renderProgressSteps = (instance, params) => { + const progressStepsContainer = getProgressSteps(); + + if (!params.progressSteps || params.progressSteps.length === 0) { + return hide(progressStepsContainer); + } + + show(progressStepsContainer); + progressStepsContainer.textContent = ''; + + if (params.currentProgressStep >= params.progressSteps.length) { + warn('Invalid currentProgressStep parameter, it should be less than progressSteps.length ' + '(currentProgressStep like JS arrays starts from 0)'); + } + + params.progressSteps.forEach((step, index) => { + const stepEl = createStepElement(step); + progressStepsContainer.appendChild(stepEl); + + if (index === params.currentProgressStep) { + addClass(stepEl, swalClasses['active-progress-step']); + } + + if (index !== params.progressSteps.length - 1) { + const lineEl = createLineElement(params); + progressStepsContainer.appendChild(lineEl); + } + }); + }; + + const renderTitle = (instance, params) => { + const title = getTitle(); + toggle(title, params.title || params.titleText, 'block'); + + if (params.title) { + parseHtmlToContainer(params.title, title); + } + + if (params.titleText) { + title.innerText = params.titleText; + } // Custom class + + + applyCustomClass(title, params, 'title'); + }; + + const renderPopup = (instance, params) => { + const container = getContainer(); + const popup = getPopup(); // Width + + if (params.toast) { + // #2170 + applyNumericalStyle(container, 'width', params.width); + popup.style.width = '100%'; + popup.insertBefore(getLoader(), getIcon()); + } else { + applyNumericalStyle(popup, 'width', params.width); + } // Padding + + + applyNumericalStyle(popup, 'padding', params.padding); // Background + + if (params.background) { + popup.style.background = params.background; + } + + hide(getValidationMessage()); // Classes + + addClasses(popup, params); + }; + + const addClasses = (popup, params) => { + // Default Class + showClass when updating Swal.update({}) + popup.className = "".concat(swalClasses.popup, " ").concat(isVisible(popup) ? params.showClass.popup : ''); + + if (params.toast) { + addClass([document.documentElement, document.body], swalClasses['toast-shown']); + addClass(popup, swalClasses.toast); + } else { + addClass(popup, swalClasses.modal); + } // Custom class + + + applyCustomClass(popup, params, 'popup'); + + if (typeof params.customClass === 'string') { + addClass(popup, params.customClass); + } // Icon class (#1842) + + + if (params.icon) { + addClass(popup, swalClasses["icon-".concat(params.icon)]); + } + }; + + const render = (instance, params) => { + renderPopup(instance, params); + renderContainer(instance, params); + renderProgressSteps(instance, params); + renderIcon(instance, params); + renderImage(instance, params); + renderTitle(instance, params); + renderCloseButton(instance, params); + renderContent(instance, params); + renderActions(instance, params); + renderFooter(instance, params); + + if (typeof params.didRender === 'function') { + params.didRender(getPopup()); + } + }; + + /* + * Global function to determine if SweetAlert2 popup is shown + */ + + const isVisible$1 = () => { + return isVisible(getPopup()); + }; + /* + * Global function to click 'Confirm' button + */ + + const clickConfirm = () => getConfirmButton() && getConfirmButton().click(); + /* + * Global function to click 'Deny' button + */ + + const clickDeny = () => getDenyButton() && getDenyButton().click(); + /* + * Global function to click 'Cancel' button + */ + + const clickCancel = () => getCancelButton() && getCancelButton().click(); + + function fire(...args) { + const Swal = this; + return new Swal(...args); + } + + /** + * Returns an extended version of `Swal` containing `params` as defaults. + * Useful for reusing Swal configuration. + * + * For example: + * + * Before: + * const textPromptOptions = { input: 'text', showCancelButton: true } + * const {value: firstName} = await Swal.fire({ ...textPromptOptions, title: 'What is your first name?' }) + * const {value: lastName} = await Swal.fire({ ...textPromptOptions, title: 'What is your last name?' }) + * + * After: + * const TextPrompt = Swal.mixin({ input: 'text', showCancelButton: true }) + * const {value: firstName} = await TextPrompt('What is your first name?') + * const {value: lastName} = await TextPrompt('What is your last name?') + * + * @param mixinParams + */ + function mixin(mixinParams) { + class MixinSwal extends this { + _main(params, priorityMixinParams) { + return super._main(params, Object.assign({}, mixinParams, priorityMixinParams)); + } + + } + + return MixinSwal; + } + + /** + * Shows loader (spinner), this is useful with AJAX requests. + * By default the loader be shown instead of the "Confirm" button. + */ + + const showLoading = buttonToReplace => { + let popup = getPopup(); + + if (!popup) { + Swal.fire(); + } + + popup = getPopup(); + const loader = getLoader(); + + if (isToast()) { + hide(getIcon()); + } else { + replaceButton(popup, buttonToReplace); + } + + show(loader); + popup.setAttribute('data-loading', true); + popup.setAttribute('aria-busy', true); + popup.focus(); + }; + + const replaceButton = (popup, buttonToReplace) => { + const actions = getActions(); + const loader = getLoader(); + + if (!buttonToReplace && isVisible(getConfirmButton())) { + buttonToReplace = getConfirmButton(); + } + + show(actions); + + if (buttonToReplace) { + hide(buttonToReplace); + loader.setAttribute('data-button-to-replace', buttonToReplace.className); + } + + loader.parentNode.insertBefore(loader, buttonToReplace); + addClass([popup, actions], swalClasses.loading); + }; + + const RESTORE_FOCUS_TIMEOUT = 100; + + const globalState = {}; + + const focusPreviousActiveElement = () => { + if (globalState.previousActiveElement && globalState.previousActiveElement.focus) { + globalState.previousActiveElement.focus(); + globalState.previousActiveElement = null; + } else if (document.body) { + document.body.focus(); + } + }; // Restore previous active (focused) element + + + const restoreActiveElement = returnFocus => { + return new Promise(resolve => { + if (!returnFocus) { + return resolve(); + } + + const x = window.scrollX; + const y = window.scrollY; + globalState.restoreFocusTimeout = setTimeout(() => { + focusPreviousActiveElement(); + resolve(); + }, RESTORE_FOCUS_TIMEOUT); // issues/900 + + window.scrollTo(x, y); + }); + }; + + /** + * If `timer` parameter is set, returns number of milliseconds of timer remained. + * Otherwise, returns undefined. + */ + + const getTimerLeft = () => { + return globalState.timeout && globalState.timeout.getTimerLeft(); + }; + /** + * Stop timer. Returns number of milliseconds of timer remained. + * If `timer` parameter isn't set, returns undefined. + */ + + const stopTimer = () => { + if (globalState.timeout) { + stopTimerProgressBar(); + return globalState.timeout.stop(); + } + }; + /** + * Resume timer. Returns number of milliseconds of timer remained. + * If `timer` parameter isn't set, returns undefined. + */ + + const resumeTimer = () => { + if (globalState.timeout) { + const remaining = globalState.timeout.start(); + animateTimerProgressBar(remaining); + return remaining; + } + }; + /** + * Resume timer. Returns number of milliseconds of timer remained. + * If `timer` parameter isn't set, returns undefined. + */ + + const toggleTimer = () => { + const timer = globalState.timeout; + return timer && (timer.running ? stopTimer() : resumeTimer()); + }; + /** + * Increase timer. Returns number of milliseconds of an updated timer. + * If `timer` parameter isn't set, returns undefined. + */ + + const increaseTimer = n => { + if (globalState.timeout) { + const remaining = globalState.timeout.increase(n); + animateTimerProgressBar(remaining, true); + return remaining; + } + }; + /** + * Check if timer is running. Returns true if timer is running + * or false if timer is paused or stopped. + * If `timer` parameter isn't set, returns undefined + */ + + const isTimerRunning = () => { + return globalState.timeout && globalState.timeout.isRunning(); + }; + + let bodyClickListenerAdded = false; + const clickHandlers = {}; + function bindClickHandler(attr = 'data-swal-template') { + clickHandlers[attr] = this; + + if (!bodyClickListenerAdded) { + document.body.addEventListener('click', bodyClickListener); + bodyClickListenerAdded = true; + } + } + + const bodyClickListener = event => { + // TODO: replace with event.composedPath() + for (let el = event.target; el && el !== document; el = el.parentNode) { + for (const attr in clickHandlers) { + const template = el.getAttribute(attr); + + if (template) { + clickHandlers[attr].fire({ + template + }); + return; + } + } + } + }; + + const defaultParams = { + title: '', + titleText: '', + text: '', + html: '', + footer: '', + icon: undefined, + iconColor: undefined, + iconHtml: undefined, + template: undefined, + toast: false, + showClass: { + popup: 'swal2-show', + backdrop: 'swal2-backdrop-show', + icon: 'swal2-icon-show' + }, + hideClass: { + popup: 'swal2-hide', + backdrop: 'swal2-backdrop-hide', + icon: 'swal2-icon-hide' + }, + customClass: {}, + target: 'body', + backdrop: true, + heightAuto: true, + allowOutsideClick: true, + allowEscapeKey: true, + allowEnterKey: true, + stopKeydownPropagation: true, + keydownListenerCapture: false, + showConfirmButton: true, + showDenyButton: false, + showCancelButton: false, + preConfirm: undefined, + preDeny: undefined, + confirmButtonText: 'OK', + confirmButtonAriaLabel: '', + confirmButtonColor: undefined, + denyButtonText: 'No', + denyButtonAriaLabel: '', + denyButtonColor: undefined, + cancelButtonText: 'Cancel', + cancelButtonAriaLabel: '', + cancelButtonColor: undefined, + buttonsStyling: true, + reverseButtons: false, + focusConfirm: true, + focusDeny: false, + focusCancel: false, + returnFocus: true, + showCloseButton: false, + closeButtonHtml: '×', + closeButtonAriaLabel: 'Close this dialog', + loaderHtml: '', + showLoaderOnConfirm: false, + showLoaderOnDeny: false, + imageUrl: undefined, + imageWidth: undefined, + imageHeight: undefined, + imageAlt: '', + timer: undefined, + timerProgressBar: false, + width: undefined, + padding: undefined, + background: undefined, + input: undefined, + inputPlaceholder: '', + inputLabel: '', + inputValue: '', + inputOptions: {}, + inputAutoTrim: true, + inputAttributes: {}, + inputValidator: undefined, + returnInputValueOnDeny: false, + validationMessage: undefined, + grow: false, + position: 'center', + progressSteps: [], + currentProgressStep: undefined, + progressStepsDistance: undefined, + willOpen: undefined, + didOpen: undefined, + didRender: undefined, + willClose: undefined, + didClose: undefined, + didDestroy: undefined, + scrollbarPadding: true + }; + const updatableParams = ['allowEscapeKey', 'allowOutsideClick', 'background', 'buttonsStyling', 'cancelButtonAriaLabel', 'cancelButtonColor', 'cancelButtonText', 'closeButtonAriaLabel', 'closeButtonHtml', 'confirmButtonAriaLabel', 'confirmButtonColor', 'confirmButtonText', 'currentProgressStep', 'customClass', 'denyButtonAriaLabel', 'denyButtonColor', 'denyButtonText', 'didClose', 'didDestroy', 'footer', 'hideClass', 'html', 'icon', 'iconColor', 'iconHtml', 'imageAlt', 'imageHeight', 'imageUrl', 'imageWidth', 'preConfirm', 'preDeny', 'progressSteps', 'returnFocus', 'reverseButtons', 'showCancelButton', 'showCloseButton', 'showConfirmButton', 'showDenyButton', 'text', 'title', 'titleText', 'willClose']; + const deprecatedParams = {}; + const toastIncompatibleParams = ['allowOutsideClick', 'allowEnterKey', 'backdrop', 'focusConfirm', 'focusDeny', 'focusCancel', 'returnFocus', 'heightAuto', 'keydownListenerCapture']; + /** + * Is valid parameter + * @param {String} paramName + */ + + const isValidParameter = paramName => { + return Object.prototype.hasOwnProperty.call(defaultParams, paramName); + }; + /** + * Is valid parameter for Swal.update() method + * @param {String} paramName + */ + + const isUpdatableParameter = paramName => { + return updatableParams.indexOf(paramName) !== -1; + }; + /** + * Is deprecated parameter + * @param {String} paramName + */ + + const isDeprecatedParameter = paramName => { + return deprecatedParams[paramName]; + }; + + const checkIfParamIsValid = param => { + if (!isValidParameter(param)) { + warn("Unknown parameter \"".concat(param, "\"")); + } + }; + + const checkIfToastParamIsValid = param => { + if (toastIncompatibleParams.includes(param)) { + warn("The parameter \"".concat(param, "\" is incompatible with toasts")); + } + }; + + const checkIfParamIsDeprecated = param => { + if (isDeprecatedParameter(param)) { + warnAboutDeprecation(param, isDeprecatedParameter(param)); + } + }; + /** + * Show relevant warnings for given params + * + * @param params + */ + + + const showWarningsForParams = params => { + if (!params.backdrop && params.allowOutsideClick) { + warn('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`'); + } + + for (const param in params) { + checkIfParamIsValid(param); + + if (params.toast) { + checkIfToastParamIsValid(param); + } + + checkIfParamIsDeprecated(param); + } + }; + + + + var staticMethods = /*#__PURE__*/Object.freeze({ + isValidParameter: isValidParameter, + isUpdatableParameter: isUpdatableParameter, + isDeprecatedParameter: isDeprecatedParameter, + argsToParams: argsToParams, + isVisible: isVisible$1, + clickConfirm: clickConfirm, + clickDeny: clickDeny, + clickCancel: clickCancel, + getContainer: getContainer, + getPopup: getPopup, + getTitle: getTitle, + getHtmlContainer: getHtmlContainer, + getImage: getImage, + getIcon: getIcon, + getInputLabel: getInputLabel, + getCloseButton: getCloseButton, + getActions: getActions, + getConfirmButton: getConfirmButton, + getDenyButton: getDenyButton, + getCancelButton: getCancelButton, + getLoader: getLoader, + getFooter: getFooter, + getTimerProgressBar: getTimerProgressBar, + getFocusableElements: getFocusableElements, + getValidationMessage: getValidationMessage, + isLoading: isLoading, + fire: fire, + mixin: mixin, + showLoading: showLoading, + enableLoading: showLoading, + getTimerLeft: getTimerLeft, + stopTimer: stopTimer, + resumeTimer: resumeTimer, + toggleTimer: toggleTimer, + increaseTimer: increaseTimer, + isTimerRunning: isTimerRunning, + bindClickHandler: bindClickHandler + }); + + /** + * Hides loader and shows back the button which was hidden by .showLoading() + */ + + function hideLoading() { + // do nothing if popup is closed + const innerParams = privateProps.innerParams.get(this); + + if (!innerParams) { + return; + } + + const domCache = privateProps.domCache.get(this); + hide(domCache.loader); + + if (isToast()) { + if (innerParams.icon) { + show(getIcon()); + } + } else { + showRelatedButton(domCache); + } + + removeClass([domCache.popup, domCache.actions], swalClasses.loading); + domCache.popup.removeAttribute('aria-busy'); + domCache.popup.removeAttribute('data-loading'); + domCache.confirmButton.disabled = false; + domCache.denyButton.disabled = false; + domCache.cancelButton.disabled = false; + } + + const showRelatedButton = domCache => { + const buttonToReplace = domCache.popup.getElementsByClassName(domCache.loader.getAttribute('data-button-to-replace')); + + if (buttonToReplace.length) { + show(buttonToReplace[0], 'inline-block'); + } else if (allButtonsAreHidden()) { + hide(domCache.actions); + } + }; + + function getInput$1(instance) { + const innerParams = privateProps.innerParams.get(instance || this); + const domCache = privateProps.domCache.get(instance || this); + + if (!domCache) { + return null; + } + + return getInput(domCache.popup, innerParams.input); + } + + const fixScrollbar = () => { + // for queues, do not do this more than once + if (states.previousBodyPadding !== null) { + return; + } // if the body has overflow + + + if (document.body.scrollHeight > window.innerHeight) { + // add padding so the content doesn't shift after removal of scrollbar + states.previousBodyPadding = parseInt(window.getComputedStyle(document.body).getPropertyValue('padding-right')); + document.body.style.paddingRight = "".concat(states.previousBodyPadding + measureScrollbar(), "px"); + } + }; + const undoScrollbar = () => { + if (states.previousBodyPadding !== null) { + document.body.style.paddingRight = "".concat(states.previousBodyPadding, "px"); + states.previousBodyPadding = null; + } + }; + + /* istanbul ignore file */ + + const iOSfix = () => { + const iOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream || navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1; + + if (iOS && !hasClass(document.body, swalClasses.iosfix)) { + const offset = document.body.scrollTop; + document.body.style.top = "".concat(offset * -1, "px"); + addClass(document.body, swalClasses.iosfix); + lockBodyScroll(); + addBottomPaddingForTallPopups(); // #1948 + } + }; + + const addBottomPaddingForTallPopups = () => { + const safari = !navigator.userAgent.match(/(CriOS|FxiOS|EdgiOS|YaBrowser|UCBrowser)/i); + + if (safari) { + const bottomPanelHeight = 44; + + if (getPopup().scrollHeight > window.innerHeight - bottomPanelHeight) { + getContainer().style.paddingBottom = "".concat(bottomPanelHeight, "px"); + } + } + }; + + const lockBodyScroll = () => { + // #1246 + const container = getContainer(); + let preventTouchMove; + + container.ontouchstart = e => { + preventTouchMove = shouldPreventTouchMove(e); + }; + + container.ontouchmove = e => { + if (preventTouchMove) { + e.preventDefault(); + e.stopPropagation(); + } + }; + }; + + const shouldPreventTouchMove = event => { + const target = event.target; + const container = getContainer(); + + if (isStylys(event) || isZoom(event)) { + return false; + } + + if (target === container) { + return true; + } + + if (!isScrollable(container) && target.tagName !== 'INPUT' && // #1603 + target.tagName !== 'TEXTAREA' && // #2266 + !(isScrollable(getHtmlContainer()) && // #1944 + getHtmlContainer().contains(target))) { + return true; + } + + return false; + }; + + const isStylys = event => { + // #1786 + return event.touches && event.touches.length && event.touches[0].touchType === 'stylus'; + }; + + const isZoom = event => { + // #1891 + return event.touches && event.touches.length > 1; + }; + + const undoIOSfix = () => { + if (hasClass(document.body, swalClasses.iosfix)) { + const offset = parseInt(document.body.style.top, 10); + removeClass(document.body, swalClasses.iosfix); + document.body.style.top = ''; + document.body.scrollTop = offset * -1; + } + }; + + // Adding aria-hidden="true" to elements outside of the active modal dialog ensures that + // elements not within the active modal dialog will not be surfaced if a user opens a screen + // reader’s list of elements (headings, form controls, landmarks, etc.) in the document. + + const setAriaHidden = () => { + const bodyChildren = toArray(document.body.children); + bodyChildren.forEach(el => { + if (el === getContainer() || el.contains(getContainer())) { + return; + } + + if (el.hasAttribute('aria-hidden')) { + el.setAttribute('data-previous-aria-hidden', el.getAttribute('aria-hidden')); + } + + el.setAttribute('aria-hidden', 'true'); + }); + }; + const unsetAriaHidden = () => { + const bodyChildren = toArray(document.body.children); + bodyChildren.forEach(el => { + if (el.hasAttribute('data-previous-aria-hidden')) { + el.setAttribute('aria-hidden', el.getAttribute('data-previous-aria-hidden')); + el.removeAttribute('data-previous-aria-hidden'); + } else { + el.removeAttribute('aria-hidden'); + } + }); + }; + + /** + * This module containts `WeakMap`s for each effectively-"private property" that a `Swal` has. + * For example, to set the private property "foo" of `this` to "bar", you can `privateProps.foo.set(this, 'bar')` + * This is the approach that Babel will probably take to implement private methods/fields + * https://github.com/tc39/proposal-private-methods + * https://github.com/babel/babel/pull/7555 + * Once we have the changes from that PR in Babel, and our core class fits reasonable in *one module* + * then we can use that language feature. + */ + var privateMethods = { + swalPromiseResolve: new WeakMap() + }; + + /* + * Instance method to close sweetAlert + */ + + function removePopupAndResetState(instance, container, returnFocus, didClose) { + if (isToast()) { + triggerDidCloseAndDispose(instance, didClose); + } else { + restoreActiveElement(returnFocus).then(() => triggerDidCloseAndDispose(instance, didClose)); + globalState.keydownTarget.removeEventListener('keydown', globalState.keydownHandler, { + capture: globalState.keydownListenerCapture + }); + globalState.keydownHandlerAdded = false; + } + + const isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent); // workaround for #2088 + // for some reason removing the container in Safari will scroll the document to bottom + + if (isSafari) { + container.setAttribute('style', 'display:none !important'); + container.removeAttribute('class'); + container.innerHTML = ''; + } else { + container.remove(); + } + + if (isModal()) { + undoScrollbar(); + undoIOSfix(); + unsetAriaHidden(); + } + + removeBodyClasses(); + } + + function removeBodyClasses() { + removeClass([document.documentElement, document.body], [swalClasses.shown, swalClasses['height-auto'], swalClasses['no-backdrop'], swalClasses['toast-shown']]); + } + + function close(resolveValue) { + const popup = getPopup(); + + if (!popup) { + return; + } + + resolveValue = prepareResolveValue(resolveValue); + const innerParams = privateProps.innerParams.get(this); + + if (!innerParams || hasClass(popup, innerParams.hideClass.popup)) { + return; + } + + const swalPromiseResolve = privateMethods.swalPromiseResolve.get(this); + removeClass(popup, innerParams.showClass.popup); + addClass(popup, innerParams.hideClass.popup); + const backdrop = getContainer(); + removeClass(backdrop, innerParams.showClass.backdrop); + addClass(backdrop, innerParams.hideClass.backdrop); + handlePopupAnimation(this, popup, innerParams); // Resolve Swal promise + + swalPromiseResolve(resolveValue); + } + + const prepareResolveValue = resolveValue => { + // When user calls Swal.close() + if (typeof resolveValue === 'undefined') { + return { + isConfirmed: false, + isDenied: false, + isDismissed: true + }; + } + + return Object.assign({ + isConfirmed: false, + isDenied: false, + isDismissed: false + }, resolveValue); + }; + + const handlePopupAnimation = (instance, popup, innerParams) => { + const container = getContainer(); // If animation is supported, animate + + const animationIsSupported = animationEndEvent && hasCssAnimation(popup); + + if (typeof innerParams.willClose === 'function') { + innerParams.willClose(popup); + } + + if (animationIsSupported) { + animatePopup(instance, popup, container, innerParams.returnFocus, innerParams.didClose); + } else { + // Otherwise, remove immediately + removePopupAndResetState(instance, container, innerParams.returnFocus, innerParams.didClose); + } + }; + + const animatePopup = (instance, popup, container, returnFocus, didClose) => { + globalState.swalCloseEventFinishedCallback = removePopupAndResetState.bind(null, instance, container, returnFocus, didClose); + popup.addEventListener(animationEndEvent, function (e) { + if (e.target === popup) { + globalState.swalCloseEventFinishedCallback(); + delete globalState.swalCloseEventFinishedCallback; + } + }); + }; + + const triggerDidCloseAndDispose = (instance, didClose) => { + setTimeout(() => { + if (typeof didClose === 'function') { + didClose.bind(instance.params)(); + } + + instance._destroy(); + }); + }; + + function setButtonsDisabled(instance, buttons, disabled) { + const domCache = privateProps.domCache.get(instance); + buttons.forEach(button => { + domCache[button].disabled = disabled; + }); + } + + function setInputDisabled(input, disabled) { + if (!input) { + return false; + } + + if (input.type === 'radio') { + const radiosContainer = input.parentNode.parentNode; + const radios = radiosContainer.querySelectorAll('input'); + + for (let i = 0; i < radios.length; i++) { + radios[i].disabled = disabled; + } + } else { + input.disabled = disabled; + } + } + + function enableButtons() { + setButtonsDisabled(this, ['confirmButton', 'denyButton', 'cancelButton'], false); + } + function disableButtons() { + setButtonsDisabled(this, ['confirmButton', 'denyButton', 'cancelButton'], true); + } + function enableInput() { + return setInputDisabled(this.getInput(), false); + } + function disableInput() { + return setInputDisabled(this.getInput(), true); + } + + function showValidationMessage(error) { + const domCache = privateProps.domCache.get(this); + const params = privateProps.innerParams.get(this); + setInnerHtml(domCache.validationMessage, error); + domCache.validationMessage.className = swalClasses['validation-message']; + + if (params.customClass && params.customClass.validationMessage) { + addClass(domCache.validationMessage, params.customClass.validationMessage); + } + + show(domCache.validationMessage); + const input = this.getInput(); + + if (input) { + input.setAttribute('aria-invalid', true); + input.setAttribute('aria-describedby', swalClasses['validation-message']); + focusInput(input); + addClass(input, swalClasses.inputerror); + } + } // Hide block with validation message + + function resetValidationMessage$1() { + const domCache = privateProps.domCache.get(this); + + if (domCache.validationMessage) { + hide(domCache.validationMessage); + } + + const input = this.getInput(); + + if (input) { + input.removeAttribute('aria-invalid'); + input.removeAttribute('aria-describedby'); + removeClass(input, swalClasses.inputerror); + } + } + + function getProgressSteps$1() { + const domCache = privateProps.domCache.get(this); + return domCache.progressSteps; + } + + class Timer { + constructor(callback, delay) { + this.callback = callback; + this.remaining = delay; + this.running = false; + this.start(); + } + + start() { + if (!this.running) { + this.running = true; + this.started = new Date(); + this.id = setTimeout(this.callback, this.remaining); + } + + return this.remaining; + } + + stop() { + if (this.running) { + this.running = false; + clearTimeout(this.id); + this.remaining -= new Date() - this.started; + } + + return this.remaining; + } + + increase(n) { + const running = this.running; + + if (running) { + this.stop(); + } + + this.remaining += n; + + if (running) { + this.start(); + } + + return this.remaining; + } + + getTimerLeft() { + if (this.running) { + this.stop(); + this.start(); + } + + return this.remaining; + } + + isRunning() { + return this.running; + } + + } + + var defaultInputValidators = { + email: (string, validationMessage) => { + return /^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]{2,24}$/.test(string) ? Promise.resolve() : Promise.resolve(validationMessage || 'Invalid email address'); + }, + url: (string, validationMessage) => { + // taken from https://stackoverflow.com/a/3809435 with a small change from #1306 and #2013 + return /^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(string) ? Promise.resolve() : Promise.resolve(validationMessage || 'Invalid URL'); + } + }; + + function setDefaultInputValidators(params) { + // Use default `inputValidator` for supported input types if not provided + if (!params.inputValidator) { + Object.keys(defaultInputValidators).forEach(key => { + if (params.input === key) { + params.inputValidator = defaultInputValidators[key]; + } + }); + } + } + + function validateCustomTargetElement(params) { + // Determine if the custom target element is valid + if (!params.target || typeof params.target === 'string' && !document.querySelector(params.target) || typeof params.target !== 'string' && !params.target.appendChild) { + warn('Target parameter is not valid, defaulting to "body"'); + params.target = 'body'; + } + } + /** + * Set type, text and actions on popup + * + * @param params + * @returns {boolean} + */ + + + function setParameters(params) { + setDefaultInputValidators(params); // showLoaderOnConfirm && preConfirm + + if (params.showLoaderOnConfirm && !params.preConfirm) { + warn('showLoaderOnConfirm is set to true, but preConfirm is not defined.\n' + 'showLoaderOnConfirm should be used together with preConfirm, see usage example:\n' + 'https://sweetalert2.github.io/#ajax-request'); + } + + validateCustomTargetElement(params); // Replace newlines with
        in title + + if (typeof params.title === 'string') { + params.title = params.title.split('\n').join('
        '); + } + + init(params); + } + + const swalStringParams = ['swal-title', 'swal-html', 'swal-footer']; + const getTemplateParams = params => { + const template = typeof params.template === 'string' ? document.querySelector(params.template) : params.template; + + if (!template) { + return {}; + } + + const templateContent = template.content; + showWarningsForElements(templateContent); + const result = Object.assign(getSwalParams(templateContent), getSwalButtons(templateContent), getSwalImage(templateContent), getSwalIcon(templateContent), getSwalInput(templateContent), getSwalStringParams(templateContent, swalStringParams)); + return result; + }; + + const getSwalParams = templateContent => { + const result = {}; + toArray(templateContent.querySelectorAll('swal-param')).forEach(param => { + showWarningsForAttributes(param, ['name', 'value']); + const paramName = param.getAttribute('name'); + let value = param.getAttribute('value'); + + if (typeof defaultParams[paramName] === 'boolean' && value === 'false') { + value = false; + } + + if (typeof defaultParams[paramName] === 'object') { + value = JSON.parse(value); + } + + result[paramName] = value; + }); + return result; + }; + + const getSwalButtons = templateContent => { + const result = {}; + toArray(templateContent.querySelectorAll('swal-button')).forEach(button => { + showWarningsForAttributes(button, ['type', 'color', 'aria-label']); + const type = button.getAttribute('type'); + result["".concat(type, "ButtonText")] = button.innerHTML; + result["show".concat(capitalizeFirstLetter(type), "Button")] = true; + + if (button.hasAttribute('color')) { + result["".concat(type, "ButtonColor")] = button.getAttribute('color'); + } + + if (button.hasAttribute('aria-label')) { + result["".concat(type, "ButtonAriaLabel")] = button.getAttribute('aria-label'); + } + }); + return result; + }; + + const getSwalImage = templateContent => { + const result = {}; + const image = templateContent.querySelector('swal-image'); + + if (image) { + showWarningsForAttributes(image, ['src', 'width', 'height', 'alt']); + + if (image.hasAttribute('src')) { + result.imageUrl = image.getAttribute('src'); + } + + if (image.hasAttribute('width')) { + result.imageWidth = image.getAttribute('width'); + } + + if (image.hasAttribute('height')) { + result.imageHeight = image.getAttribute('height'); + } + + if (image.hasAttribute('alt')) { + result.imageAlt = image.getAttribute('alt'); + } + } + + return result; + }; + + const getSwalIcon = templateContent => { + const result = {}; + const icon = templateContent.querySelector('swal-icon'); + + if (icon) { + showWarningsForAttributes(icon, ['type', 'color']); + + if (icon.hasAttribute('type')) { + result.icon = icon.getAttribute('type'); + } + + if (icon.hasAttribute('color')) { + result.iconColor = icon.getAttribute('color'); + } + + result.iconHtml = icon.innerHTML; + } + + return result; + }; + + const getSwalInput = templateContent => { + const result = {}; + const input = templateContent.querySelector('swal-input'); + + if (input) { + showWarningsForAttributes(input, ['type', 'label', 'placeholder', 'value']); + result.input = input.getAttribute('type') || 'text'; + + if (input.hasAttribute('label')) { + result.inputLabel = input.getAttribute('label'); + } + + if (input.hasAttribute('placeholder')) { + result.inputPlaceholder = input.getAttribute('placeholder'); + } + + if (input.hasAttribute('value')) { + result.inputValue = input.getAttribute('value'); + } + } + + const inputOptions = templateContent.querySelectorAll('swal-input-option'); + + if (inputOptions.length) { + result.inputOptions = {}; + toArray(inputOptions).forEach(option => { + showWarningsForAttributes(option, ['value']); + const optionValue = option.getAttribute('value'); + const optionName = option.innerHTML; + result.inputOptions[optionValue] = optionName; + }); + } + + return result; + }; + + const getSwalStringParams = (templateContent, paramNames) => { + const result = {}; + + for (const i in paramNames) { + const paramName = paramNames[i]; + const tag = templateContent.querySelector(paramName); + + if (tag) { + showWarningsForAttributes(tag, []); + result[paramName.replace(/^swal-/, '')] = tag.innerHTML.trim(); + } + } + + return result; + }; + + const showWarningsForElements = template => { + const allowedElements = swalStringParams.concat(['swal-param', 'swal-button', 'swal-image', 'swal-icon', 'swal-input', 'swal-input-option']); + toArray(template.children).forEach(el => { + const tagName = el.tagName.toLowerCase(); + + if (allowedElements.indexOf(tagName) === -1) { + warn("Unrecognized element <".concat(tagName, ">")); + } + }); + }; + + const showWarningsForAttributes = (el, allowedAttributes) => { + toArray(el.attributes).forEach(attribute => { + if (allowedAttributes.indexOf(attribute.name) === -1) { + warn(["Unrecognized attribute \"".concat(attribute.name, "\" on <").concat(el.tagName.toLowerCase(), ">."), "".concat(allowedAttributes.length ? "Allowed attributes are: ".concat(allowedAttributes.join(', ')) : 'To set the value, use HTML within the element.')]); + } + }); + }; + + const SHOW_CLASS_TIMEOUT = 10; + /** + * Open popup, add necessary classes and styles, fix scrollbar + * + * @param params + */ + + const openPopup = params => { + const container = getContainer(); + const popup = getPopup(); + + if (typeof params.willOpen === 'function') { + params.willOpen(popup); + } + + const bodyStyles = window.getComputedStyle(document.body); + const initialBodyOverflow = bodyStyles.overflowY; + addClasses$1(container, popup, params); // scrolling is 'hidden' until animation is done, after that 'auto' + + setTimeout(() => { + setScrollingVisibility(container, popup); + }, SHOW_CLASS_TIMEOUT); + + if (isModal()) { + fixScrollContainer(container, params.scrollbarPadding, initialBodyOverflow); + setAriaHidden(); + } + + if (!isToast() && !globalState.previousActiveElement) { + globalState.previousActiveElement = document.activeElement; + } + + if (typeof params.didOpen === 'function') { + setTimeout(() => params.didOpen(popup)); + } + + removeClass(container, swalClasses['no-transition']); + }; + + const swalOpenAnimationFinished = event => { + const popup = getPopup(); + + if (event.target !== popup) { + return; + } + + const container = getContainer(); + popup.removeEventListener(animationEndEvent, swalOpenAnimationFinished); + container.style.overflowY = 'auto'; + }; + + const setScrollingVisibility = (container, popup) => { + if (animationEndEvent && hasCssAnimation(popup)) { + container.style.overflowY = 'hidden'; + popup.addEventListener(animationEndEvent, swalOpenAnimationFinished); + } else { + container.style.overflowY = 'auto'; + } + }; + + const fixScrollContainer = (container, scrollbarPadding, initialBodyOverflow) => { + iOSfix(); + + if (scrollbarPadding && initialBodyOverflow !== 'hidden') { + fixScrollbar(); + } // sweetalert2/issues/1247 + + + setTimeout(() => { + container.scrollTop = 0; + }); + }; + + const addClasses$1 = (container, popup, params) => { + addClass(container, params.showClass.backdrop); // the workaround with setting/unsetting opacity is needed for #2019 and 2059 + + popup.style.setProperty('opacity', '0', 'important'); + show(popup, 'grid'); + setTimeout(() => { + // Animate popup right after showing it + addClass(popup, params.showClass.popup); // and remove the opacity workaround + + popup.style.removeProperty('opacity'); + }, SHOW_CLASS_TIMEOUT); // 10ms in order to fix #2062 + + addClass([document.documentElement, document.body], swalClasses.shown); + + if (params.heightAuto && params.backdrop && !params.toast) { + addClass([document.documentElement, document.body], swalClasses['height-auto']); + } + }; + + const handleInputOptionsAndValue = (instance, params) => { + if (params.input === 'select' || params.input === 'radio') { + handleInputOptions(instance, params); + } else if (['text', 'email', 'number', 'tel', 'textarea'].includes(params.input) && (hasToPromiseFn(params.inputValue) || isPromise(params.inputValue))) { + showLoading(getConfirmButton()); + handleInputValue(instance, params); + } + }; + const getInputValue = (instance, innerParams) => { + const input = instance.getInput(); + + if (!input) { + return null; + } + + switch (innerParams.input) { + case 'checkbox': + return getCheckboxValue(input); + + case 'radio': + return getRadioValue(input); + + case 'file': + return getFileValue(input); + + default: + return innerParams.inputAutoTrim ? input.value.trim() : input.value; + } + }; + + const getCheckboxValue = input => input.checked ? 1 : 0; + + const getRadioValue = input => input.checked ? input.value : null; + + const getFileValue = input => input.files.length ? input.getAttribute('multiple') !== null ? input.files : input.files[0] : null; + + const handleInputOptions = (instance, params) => { + const popup = getPopup(); + + const processInputOptions = inputOptions => populateInputOptions[params.input](popup, formatInputOptions(inputOptions), params); + + if (hasToPromiseFn(params.inputOptions) || isPromise(params.inputOptions)) { + showLoading(getConfirmButton()); + asPromise(params.inputOptions).then(inputOptions => { + instance.hideLoading(); + processInputOptions(inputOptions); + }); + } else if (typeof params.inputOptions === 'object') { + processInputOptions(params.inputOptions); + } else { + error("Unexpected type of inputOptions! Expected object, Map or Promise, got ".concat(typeof params.inputOptions)); + } + }; + + const handleInputValue = (instance, params) => { + const input = instance.getInput(); + hide(input); + asPromise(params.inputValue).then(inputValue => { + input.value = params.input === 'number' ? parseFloat(inputValue) || 0 : "".concat(inputValue); + show(input); + input.focus(); + instance.hideLoading(); + }).catch(err => { + error("Error in inputValue promise: ".concat(err)); + input.value = ''; + show(input); + input.focus(); + instance.hideLoading(); + }); + }; + + const populateInputOptions = { + select: (popup, inputOptions, params) => { + const select = getChildByClass(popup, swalClasses.select); + + const renderOption = (parent, optionLabel, optionValue) => { + const option = document.createElement('option'); + option.value = optionValue; + setInnerHtml(option, optionLabel); + option.selected = isSelected(optionValue, params.inputValue); + parent.appendChild(option); + }; + + inputOptions.forEach(inputOption => { + const optionValue = inputOption[0]; + const optionLabel = inputOption[1]; // spec: + // https://www.w3.org/TR/html401/interact/forms.html#h-17.6 + // "...all OPTGROUP elements must be specified directly within a SELECT element (i.e., groups may not be nested)..." + // check whether this is a + + if (Array.isArray(optionLabel)) { + // if it is an array, then it is an + const optgroup = document.createElement('optgroup'); + optgroup.label = optionValue; + optgroup.disabled = false; // not configurable for now + + select.appendChild(optgroup); + optionLabel.forEach(o => renderOption(optgroup, o[1], o[0])); + } else { + // case of + valueFormatted = formatInputOptions(valueFormatted); + } + + result.push([key, valueFormatted]); + }); + } else { + Object.keys(inputOptions).forEach(key => { + let valueFormatted = inputOptions[key]; + + if (typeof valueFormatted === 'object') { + // case of + valueFormatted = formatInputOptions(valueFormatted); + } + + result.push([key, valueFormatted]); + }); + } + + return result; + }; + + const isSelected = (optionValue, inputValue) => { + return inputValue && inputValue.toString() === optionValue.toString(); + }; + + const handleConfirmButtonClick = instance => { + const innerParams = privateProps.innerParams.get(instance); + instance.disableButtons(); + + if (innerParams.input) { + handleConfirmOrDenyWithInput(instance, 'confirm'); + } else { + confirm(instance, true); + } + }; + const handleDenyButtonClick = instance => { + const innerParams = privateProps.innerParams.get(instance); + instance.disableButtons(); + + if (innerParams.returnInputValueOnDeny) { + handleConfirmOrDenyWithInput(instance, 'deny'); + } else { + deny(instance, false); + } + }; + const handleCancelButtonClick = (instance, dismissWith) => { + instance.disableButtons(); + dismissWith(DismissReason.cancel); + }; + + const handleConfirmOrDenyWithInput = (instance, type + /* 'confirm' | 'deny' */ + ) => { + const innerParams = privateProps.innerParams.get(instance); + const inputValue = getInputValue(instance, innerParams); + + if (innerParams.inputValidator) { + handleInputValidator(instance, inputValue, type); + } else if (!instance.getInput().checkValidity()) { + instance.enableButtons(); + instance.showValidationMessage(innerParams.validationMessage); + } else if (type === 'deny') { + deny(instance, inputValue); + } else { + confirm(instance, inputValue); + } + }; + + const handleInputValidator = (instance, inputValue, type + /* 'confirm' | 'deny' */ + ) => { + const innerParams = privateProps.innerParams.get(instance); + instance.disableInput(); + const validationPromise = Promise.resolve().then(() => asPromise(innerParams.inputValidator(inputValue, innerParams.validationMessage))); + validationPromise.then(validationMessage => { + instance.enableButtons(); + instance.enableInput(); + + if (validationMessage) { + instance.showValidationMessage(validationMessage); + } else if (type === 'deny') { + deny(instance, inputValue); + } else { + confirm(instance, inputValue); + } + }); + }; + + const deny = (instance, value) => { + const innerParams = privateProps.innerParams.get(instance || undefined); + + if (innerParams.showLoaderOnDeny) { + showLoading(getDenyButton()); + } + + if (innerParams.preDeny) { + const preDenyPromise = Promise.resolve().then(() => asPromise(innerParams.preDeny(value, innerParams.validationMessage))); + preDenyPromise.then(preDenyValue => { + if (preDenyValue === false) { + instance.hideLoading(); + } else { + instance.closePopup({ + isDenied: true, + value: typeof preDenyValue === 'undefined' ? value : preDenyValue + }); + } + }); + } else { + instance.closePopup({ + isDenied: true, + value + }); + } + }; + + const succeedWith = (instance, value) => { + instance.closePopup({ + isConfirmed: true, + value + }); + }; + + const confirm = (instance, value) => { + const innerParams = privateProps.innerParams.get(instance || undefined); + + if (innerParams.showLoaderOnConfirm) { + showLoading(); // TODO: make showLoading an *instance* method + } + + if (innerParams.preConfirm) { + instance.resetValidationMessage(); + const preConfirmPromise = Promise.resolve().then(() => asPromise(innerParams.preConfirm(value, innerParams.validationMessage))); + preConfirmPromise.then(preConfirmValue => { + if (isVisible(getValidationMessage()) || preConfirmValue === false) { + instance.hideLoading(); + } else { + succeedWith(instance, typeof preConfirmValue === 'undefined' ? value : preConfirmValue); + } + }); + } else { + succeedWith(instance, value); + } + }; + + const addKeydownHandler = (instance, globalState, innerParams, dismissWith) => { + if (globalState.keydownTarget && globalState.keydownHandlerAdded) { + globalState.keydownTarget.removeEventListener('keydown', globalState.keydownHandler, { + capture: globalState.keydownListenerCapture + }); + globalState.keydownHandlerAdded = false; + } + + if (!innerParams.toast) { + globalState.keydownHandler = e => keydownHandler(instance, e, dismissWith); + + globalState.keydownTarget = innerParams.keydownListenerCapture ? window : getPopup(); + globalState.keydownListenerCapture = innerParams.keydownListenerCapture; + globalState.keydownTarget.addEventListener('keydown', globalState.keydownHandler, { + capture: globalState.keydownListenerCapture + }); + globalState.keydownHandlerAdded = true; + } + }; // Focus handling + + const setFocus = (innerParams, index, increment) => { + const focusableElements = getFocusableElements(); // search for visible elements and select the next possible match + + if (focusableElements.length) { + index = index + increment; // rollover to first item + + if (index === focusableElements.length) { + index = 0; // go to last item + } else if (index === -1) { + index = focusableElements.length - 1; + } + + return focusableElements[index].focus(); + } // no visible focusable elements, focus the popup + + + getPopup().focus(); + }; + const arrowKeysNextButton = ['ArrowRight', 'ArrowDown']; + const arrowKeysPreviousButton = ['ArrowLeft', 'ArrowUp']; + + const keydownHandler = (instance, e, dismissWith) => { + const innerParams = privateProps.innerParams.get(instance); + + if (!innerParams) { + return; // This instance has already been destroyed + } + + if (innerParams.stopKeydownPropagation) { + e.stopPropagation(); + } // ENTER + + + if (e.key === 'Enter') { + handleEnter(instance, e, innerParams); // TAB + } else if (e.key === 'Tab') { + handleTab(e, innerParams); // ARROWS - switch focus between buttons + } else if ([...arrowKeysNextButton, ...arrowKeysPreviousButton].includes(e.key)) { + handleArrows(e.key); // ESC + } else if (e.key === 'Escape') { + handleEsc(e, innerParams, dismissWith); + } + }; + + const handleEnter = (instance, e, innerParams) => { + // #720 #721 + if (e.isComposing) { + return; + } + + if (e.target && instance.getInput() && e.target.outerHTML === instance.getInput().outerHTML) { + if (['textarea', 'file'].includes(innerParams.input)) { + return; // do not submit + } + + clickConfirm(); + e.preventDefault(); + } + }; + + const handleTab = (e, innerParams) => { + const targetElement = e.target; + const focusableElements = getFocusableElements(); + let btnIndex = -1; + + for (let i = 0; i < focusableElements.length; i++) { + if (targetElement === focusableElements[i]) { + btnIndex = i; + break; + } + } + + if (!e.shiftKey) { + // Cycle to the next button + setFocus(innerParams, btnIndex, 1); + } else { + // Cycle to the prev button + setFocus(innerParams, btnIndex, -1); + } + + e.stopPropagation(); + e.preventDefault(); + }; + + const handleArrows = key => { + const confirmButton = getConfirmButton(); + const denyButton = getDenyButton(); + const cancelButton = getCancelButton(); + + if (![confirmButton, denyButton, cancelButton].includes(document.activeElement)) { + return; + } + + const sibling = arrowKeysNextButton.includes(key) ? 'nextElementSibling' : 'previousElementSibling'; + const buttonToFocus = document.activeElement[sibling]; + + if (buttonToFocus) { + buttonToFocus.focus(); + } + }; + + const handleEsc = (e, innerParams, dismissWith) => { + if (callIfFunction(innerParams.allowEscapeKey)) { + e.preventDefault(); + dismissWith(DismissReason.esc); + } + }; + + const handlePopupClick = (instance, domCache, dismissWith) => { + const innerParams = privateProps.innerParams.get(instance); + + if (innerParams.toast) { + handleToastClick(instance, domCache, dismissWith); + } else { + // Ignore click events that had mousedown on the popup but mouseup on the container + // This can happen when the user drags a slider + handleModalMousedown(domCache); // Ignore click events that had mousedown on the container but mouseup on the popup + + handleContainerMousedown(domCache); + handleModalClick(instance, domCache, dismissWith); + } + }; + + const handleToastClick = (instance, domCache, dismissWith) => { + // Closing toast by internal click + domCache.popup.onclick = () => { + const innerParams = privateProps.innerParams.get(instance); + + if (innerParams.showConfirmButton || innerParams.showDenyButton || innerParams.showCancelButton || innerParams.showCloseButton || innerParams.timer || innerParams.input) { + return; + } + + dismissWith(DismissReason.close); + }; + }; + + let ignoreOutsideClick = false; + + const handleModalMousedown = domCache => { + domCache.popup.onmousedown = () => { + domCache.container.onmouseup = function (e) { + domCache.container.onmouseup = undefined; // We only check if the mouseup target is the container because usually it doesn't + // have any other direct children aside of the popup + + if (e.target === domCache.container) { + ignoreOutsideClick = true; + } + }; + }; + }; + + const handleContainerMousedown = domCache => { + domCache.container.onmousedown = () => { + domCache.popup.onmouseup = function (e) { + domCache.popup.onmouseup = undefined; // We also need to check if the mouseup target is a child of the popup + + if (e.target === domCache.popup || domCache.popup.contains(e.target)) { + ignoreOutsideClick = true; + } + }; + }; + }; + + const handleModalClick = (instance, domCache, dismissWith) => { + domCache.container.onclick = e => { + const innerParams = privateProps.innerParams.get(instance); + + if (ignoreOutsideClick) { + ignoreOutsideClick = false; + return; + } + + if (e.target === domCache.container && callIfFunction(innerParams.allowOutsideClick)) { + dismissWith(DismissReason.backdrop); + } + }; + }; + + function _main(userParams, mixinParams = {}) { + showWarningsForParams(Object.assign({}, mixinParams, userParams)); + + if (globalState.currentInstance) { + globalState.currentInstance._destroy(); + + if (isModal()) { + unsetAriaHidden(); + } + } + + globalState.currentInstance = this; + const innerParams = prepareParams(userParams, mixinParams); + setParameters(innerParams); + Object.freeze(innerParams); // clear the previous timer + + if (globalState.timeout) { + globalState.timeout.stop(); + delete globalState.timeout; + } // clear the restore focus timeout + + + clearTimeout(globalState.restoreFocusTimeout); + const domCache = populateDomCache(this); + render(this, innerParams); + privateProps.innerParams.set(this, innerParams); + return swalPromise(this, domCache, innerParams); + } + + const prepareParams = (userParams, mixinParams) => { + const templateParams = getTemplateParams(userParams); + const params = Object.assign({}, defaultParams, mixinParams, templateParams, userParams); // precedence is described in #2131 + + params.showClass = Object.assign({}, defaultParams.showClass, params.showClass); + params.hideClass = Object.assign({}, defaultParams.hideClass, params.hideClass); + return params; + }; + + const swalPromise = (instance, domCache, innerParams) => { + return new Promise(resolve => { + // functions to handle all closings/dismissals + const dismissWith = dismiss => { + instance.closePopup({ + isDismissed: true, + dismiss + }); + }; + + privateMethods.swalPromiseResolve.set(instance, resolve); + + domCache.confirmButton.onclick = () => handleConfirmButtonClick(instance); + + domCache.denyButton.onclick = () => handleDenyButtonClick(instance); + + domCache.cancelButton.onclick = () => handleCancelButtonClick(instance, dismissWith); + + domCache.closeButton.onclick = () => dismissWith(DismissReason.close); + + handlePopupClick(instance, domCache, dismissWith); + addKeydownHandler(instance, globalState, innerParams, dismissWith); + handleInputOptionsAndValue(instance, innerParams); + openPopup(innerParams); + setupTimer(globalState, innerParams, dismissWith); + initFocus(domCache, innerParams); // Scroll container to top on open (#1247, #1946) + + setTimeout(() => { + domCache.container.scrollTop = 0; + }); + }); + }; + + const populateDomCache = instance => { + const domCache = { + popup: getPopup(), + container: getContainer(), + actions: getActions(), + confirmButton: getConfirmButton(), + denyButton: getDenyButton(), + cancelButton: getCancelButton(), + loader: getLoader(), + closeButton: getCloseButton(), + validationMessage: getValidationMessage(), + progressSteps: getProgressSteps() + }; + privateProps.domCache.set(instance, domCache); + return domCache; + }; + + const setupTimer = (globalState$$1, innerParams, dismissWith) => { + const timerProgressBar = getTimerProgressBar(); + hide(timerProgressBar); + + if (innerParams.timer) { + globalState$$1.timeout = new Timer(() => { + dismissWith('timer'); + delete globalState$$1.timeout; + }, innerParams.timer); + + if (innerParams.timerProgressBar) { + show(timerProgressBar); + setTimeout(() => { + if (globalState$$1.timeout && globalState$$1.timeout.running) { + // timer can be already stopped or unset at this point + animateTimerProgressBar(innerParams.timer); + } + }); + } + } + }; + + const initFocus = (domCache, innerParams) => { + if (innerParams.toast) { + return; + } + + if (!callIfFunction(innerParams.allowEnterKey)) { + return blurActiveElement(); + } + + if (!focusButton(domCache, innerParams)) { + setFocus(innerParams, -1, 1); + } + }; + + const focusButton = (domCache, innerParams) => { + if (innerParams.focusDeny && isVisible(domCache.denyButton)) { + domCache.denyButton.focus(); + return true; + } + + if (innerParams.focusCancel && isVisible(domCache.cancelButton)) { + domCache.cancelButton.focus(); + return true; + } + + if (innerParams.focusConfirm && isVisible(domCache.confirmButton)) { + domCache.confirmButton.focus(); + return true; + } + + return false; + }; + + const blurActiveElement = () => { + if (document.activeElement && typeof document.activeElement.blur === 'function') { + document.activeElement.blur(); + } + }; + + /** + * Updates popup parameters. + */ + + function update(params) { + const popup = getPopup(); + const innerParams = privateProps.innerParams.get(this); + + if (!popup || hasClass(popup, innerParams.hideClass.popup)) { + return warn("You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup."); + } + + const validUpdatableParams = {}; // assign valid params from `params` to `defaults` + + Object.keys(params).forEach(param => { + if (Swal.isUpdatableParameter(param)) { + validUpdatableParams[param] = params[param]; + } else { + warn("Invalid parameter to update: \"".concat(param, "\". Updatable params are listed here: https://github.com/sweetalert2/sweetalert2/blob/master/src/utils/params.js\n\nIf you think this parameter should be updatable, request it here: https://github.com/sweetalert2/sweetalert2/issues/new?template=02_feature_request.md")); + } + }); + const updatedParams = Object.assign({}, innerParams, validUpdatableParams); + render(this, updatedParams); + privateProps.innerParams.set(this, updatedParams); + Object.defineProperties(this, { + params: { + value: Object.assign({}, this.params, params), + writable: false, + enumerable: true + } + }); + } + + function _destroy() { + const domCache = privateProps.domCache.get(this); + const innerParams = privateProps.innerParams.get(this); + + if (!innerParams) { + return; // This instance has already been destroyed + } // Check if there is another Swal closing + + + if (domCache.popup && globalState.swalCloseEventFinishedCallback) { + globalState.swalCloseEventFinishedCallback(); + delete globalState.swalCloseEventFinishedCallback; + } // Check if there is a swal disposal defer timer + + + if (globalState.deferDisposalTimer) { + clearTimeout(globalState.deferDisposalTimer); + delete globalState.deferDisposalTimer; + } + + if (typeof innerParams.didDestroy === 'function') { + innerParams.didDestroy(); + } + + disposeSwal(this); + } + + const disposeSwal = instance => { + // Unset this.params so GC will dispose it (#1569) + delete instance.params; // Unset globalState props so GC will dispose globalState (#1569) + + delete globalState.keydownHandler; + delete globalState.keydownTarget; // Unset WeakMaps so GC will be able to dispose them (#1569) + + unsetWeakMaps(privateProps); + unsetWeakMaps(privateMethods); // Unset currentInstance + + delete globalState.currentInstance; + }; + + const unsetWeakMaps = obj => { + for (const i in obj) { + obj[i] = new WeakMap(); + } + }; + + + + var instanceMethods = /*#__PURE__*/Object.freeze({ + hideLoading: hideLoading, + disableLoading: hideLoading, + getInput: getInput$1, + close: close, + closePopup: close, + closeModal: close, + closeToast: close, + enableButtons: enableButtons, + disableButtons: disableButtons, + enableInput: enableInput, + disableInput: disableInput, + showValidationMessage: showValidationMessage, + resetValidationMessage: resetValidationMessage$1, + getProgressSteps: getProgressSteps$1, + _main: _main, + update: update, + _destroy: _destroy + }); + + let currentInstance; + + class SweetAlert { + constructor(...args) { + // Prevent run in Node env + if (typeof window === 'undefined') { + return; + } + + currentInstance = this; + const outerParams = Object.freeze(this.constructor.argsToParams(args)); + Object.defineProperties(this, { + params: { + value: outerParams, + writable: false, + enumerable: true, + configurable: true + } + }); + + const promise = this._main(this.params); + + privateProps.promise.set(this, promise); + } // `catch` cannot be the name of a module export, so we define our thenable methods here instead + + + then(onFulfilled) { + const promise = privateProps.promise.get(this); + return promise.then(onFulfilled); + } + + finally(onFinally) { + const promise = privateProps.promise.get(this); + return promise.finally(onFinally); + } + + } // Assign instance methods from src/instanceMethods/*.js to prototype + + + Object.assign(SweetAlert.prototype, instanceMethods); // Assign static methods from src/staticMethods/*.js to constructor + + Object.assign(SweetAlert, staticMethods); // Proxy to instance methods to constructor, for now, for backwards compatibility + + Object.keys(instanceMethods).forEach(key => { + SweetAlert[key] = function (...args) { + if (currentInstance) { + return currentInstance[key](...args); + } + }; + }); + SweetAlert.DismissReason = DismissReason; + SweetAlert.version = '11.1.5'; + + const Swal = SweetAlert; + Swal.default = Swal; + + return Swal; + +})); +if (typeof this !== 'undefined' && this.Sweetalert2){ this.swal = this.sweetAlert = this.Swal = this.SweetAlert = this.Sweetalert2} diff --git a/modules/blogging/app/Volo.BloggingTestApp/wwwroot/libs/sweetalert2/sweetalert2.min.css b/modules/blogging/app/Volo.BloggingTestApp/wwwroot/libs/sweetalert2/sweetalert2.min.css new file mode 100644 index 0000000000..25eb26f1c0 --- /dev/null +++ b/modules/blogging/app/Volo.BloggingTestApp/wwwroot/libs/sweetalert2/sweetalert2.min.css @@ -0,0 +1 @@ +.swal2-popup.swal2-toast{box-sizing:border-box;grid-column:1/4!important;grid-row:1/4!important;grid-template-columns:1fr 99fr 1fr;padding:1em;overflow-y:hidden;background:#fff;box-shadow:0 0 .625em #d9d9d9;pointer-events:all}.swal2-popup.swal2-toast>*{grid-column:2}.swal2-popup.swal2-toast .swal2-title{margin:1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-loading{justify-content:center}.swal2-popup.swal2-toast .swal2-input{height:2em;margin:.5em;font-size:1em}.swal2-popup.swal2-toast .swal2-validation-message{font-size:1em}.swal2-popup.swal2-toast .swal2-footer{margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-popup.swal2-toast .swal2-close{grid-column:3/3;grid-row:1/99;align-self:center;width:.8em;height:.8em;margin:0;font-size:2em}.swal2-popup.swal2-toast .swal2-html-container{margin:1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-html-container:empty{padding:0}.swal2-popup.swal2-toast .swal2-loader{grid-column:1;grid-row:1/99;align-self:center;width:2em;height:2em;margin:.25em}.swal2-popup.swal2-toast .swal2-icon{grid-column:1;grid-row:1/99;align-self:center;width:2em;min-width:2em;height:2em;margin:0 .5em 0 0}.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:700}.swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-popup.swal2-toast .swal2-actions{justify-content:flex-start;height:auto;margin:0;margin-top:.3125em;padding:0}.swal2-popup.swal2-toast .swal2-styled{margin:.25em .5em;padding:.4em .6em;font-size:1em}.swal2-popup.swal2-toast .swal2-styled:focus{box-shadow:0 0 0 1px #fff,0 0 0 3px rgba(100,150,200,.5)}.swal2-popup.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;transform:rotate(45deg);border-radius:50%}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.8em;left:-.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.25em;left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-popup.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{-webkit-animation:swal2-toast-animate-success-line-tip .75s;animation:swal2-toast-animate-success-line-tip .75s}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{-webkit-animation:swal2-toast-animate-success-line-long .75s;animation:swal2-toast-animate-success-line-long .75s}.swal2-popup.swal2-toast.swal2-show{-webkit-animation:swal2-toast-show .5s;animation:swal2-toast-show .5s}.swal2-popup.swal2-toast.swal2-hide{-webkit-animation:swal2-toast-hide .1s forwards;animation:swal2-toast-hide .1s forwards}.swal2-container{display:grid;position:fixed;z-index:1060;top:0;right:0;bottom:0;left:0;box-sizing:border-box;grid-template-areas:"top-start top top-end" "center-start center center-end" "bottom-start bottom-center bottom-end";grid-template-rows:minmax(-webkit-min-content,auto) minmax(-webkit-min-content,auto) minmax(-webkit-min-content,auto);grid-template-rows:minmax(min-content,auto) minmax(min-content,auto) minmax(min-content,auto);height:100%;padding:.625em;overflow-x:hidden;transition:background-color .1s;-webkit-overflow-scrolling:touch}.swal2-container.swal2-backdrop-show,.swal2-container.swal2-noanimation{background:rgba(0,0,0,.4)}.swal2-container.swal2-backdrop-hide{background:0 0!important}.swal2-container.swal2-bottom-start,.swal2-container.swal2-center-start,.swal2-container.swal2-top-start{grid-template-columns:minmax(0,1fr) auto auto}.swal2-container.swal2-bottom,.swal2-container.swal2-center,.swal2-container.swal2-top{grid-template-columns:auto minmax(0,1fr) auto}.swal2-container.swal2-bottom-end,.swal2-container.swal2-center-end,.swal2-container.swal2-top-end{grid-template-columns:auto auto minmax(0,1fr)}.swal2-container.swal2-top-start>.swal2-popup{align-self:start}.swal2-container.swal2-top>.swal2-popup{grid-column:2;align-self:start;justify-self:center}.swal2-container.swal2-top-end>.swal2-popup,.swal2-container.swal2-top-right>.swal2-popup{grid-column:3;align-self:start;justify-self:end}.swal2-container.swal2-center-left>.swal2-popup,.swal2-container.swal2-center-start>.swal2-popup{grid-row:2;align-self:center}.swal2-container.swal2-center>.swal2-popup{grid-column:2;grid-row:2;align-self:center;justify-self:center}.swal2-container.swal2-center-end>.swal2-popup,.swal2-container.swal2-center-right>.swal2-popup{grid-column:3;grid-row:2;align-self:center;justify-self:end}.swal2-container.swal2-bottom-left>.swal2-popup,.swal2-container.swal2-bottom-start>.swal2-popup{grid-column:1;grid-row:3;align-self:end}.swal2-container.swal2-bottom>.swal2-popup{grid-column:2;grid-row:3;justify-self:center;align-self:end}.swal2-container.swal2-bottom-end>.swal2-popup,.swal2-container.swal2-bottom-right>.swal2-popup{grid-column:3;grid-row:3;align-self:end;justify-self:end}.swal2-container.swal2-grow-fullscreen>.swal2-popup,.swal2-container.swal2-grow-row>.swal2-popup{grid-column:1/4;width:100%}.swal2-container.swal2-grow-column>.swal2-popup,.swal2-container.swal2-grow-fullscreen>.swal2-popup{grid-row:1/4;align-self:stretch}.swal2-container.swal2-no-transition{transition:none!important}.swal2-popup{display:none;position:relative;box-sizing:border-box;grid-template-columns:minmax(0,100%);width:32em;max-width:100%;padding:0 0 1.25em;border:none;border-radius:5px;background:#fff;color:#545454;font-family:inherit;font-size:1rem}.swal2-popup:focus{outline:0}.swal2-popup.swal2-loading{overflow-y:hidden}.swal2-title{position:relative;max-width:100%;margin:0;padding:.8em 1em 0;color:#595959;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;word-wrap:break-word}.swal2-actions{display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:center;width:auto;margin:1.25em auto 0;padding:0}.swal2-actions:not(.swal2-loading) .swal2-styled[disabled]{opacity:.4}.swal2-actions:not(.swal2-loading) .swal2-styled:hover{background-image:linear-gradient(rgba(0,0,0,.1),rgba(0,0,0,.1))}.swal2-actions:not(.swal2-loading) .swal2-styled:active{background-image:linear-gradient(rgba(0,0,0,.2),rgba(0,0,0,.2))}.swal2-loader{display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;-webkit-animation:swal2-rotate-loading 1.5s linear 0s infinite normal;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 transparent #2778c4 transparent}.swal2-styled{margin:.3125em;padding:.625em 1.1em;transition:box-shadow .1s;box-shadow:0 0 0 3px transparent;font-weight:500}.swal2-styled:not([disabled]){cursor:pointer}.swal2-styled.swal2-confirm{border:0;border-radius:.25em;background:initial;background-color:#7367f0;color:#fff;font-size:1em}.swal2-styled.swal2-confirm:focus{box-shadow:0 0 0 3px rgba(115,103,240,.5)}.swal2-styled.swal2-deny{border:0;border-radius:.25em;background:initial;background-color:#ea5455;color:#fff;font-size:1em}.swal2-styled.swal2-deny:focus{box-shadow:0 0 0 3px rgba(234,84,85,.5)}.swal2-styled.swal2-cancel{border:0;border-radius:.25em;background:initial;background-color:#6e7d88;color:#fff;font-size:1em}.swal2-styled.swal2-cancel:focus{box-shadow:0 0 0 3px rgba(110,125,136,.5)}.swal2-styled.swal2-default-outline:focus{box-shadow:0 0 0 3px rgba(100,150,200,.5)}.swal2-styled:focus{outline:0}.swal2-styled::-moz-focus-inner{border:0}.swal2-footer{justify-content:center;margin:1em 0 0;padding:1em 1em 0;border-top:1px solid #eee;color:#545454;font-size:1em}.swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;grid-column:auto!important;height:.25em;overflow:hidden;border-bottom-right-radius:5px;border-bottom-left-radius:5px}.swal2-timer-progress-bar{width:100%;height:.25em;background:rgba(0,0,0,.2)}.swal2-image{max-width:100%;margin:2em auto 1em}.swal2-close{z-index:2;align-items:center;justify-content:center;width:1.2em;height:1.2em;margin-top:0;margin-right:0;margin-bottom:-1.2em;padding:0;overflow:hidden;transition:color .1s,box-shadow .1s;border:none;border-radius:5px;background:0 0;color:#ccc;font-family:serif;font-family:monospace;font-size:2.5em;cursor:pointer;justify-self:end}.swal2-close:hover{transform:none;background:0 0;color:#f27474}.swal2-close:focus{outline:0;box-shadow:inset 0 0 0 3px rgba(100,150,200,.5)}.swal2-close::-moz-focus-inner{border:0}.swal2-html-container{z-index:1;justify-content:center;margin:1em 1.6em .3em;padding:0;overflow:auto;color:#545454;font-size:1.125em;font-weight:400;line-height:normal;text-align:center;word-wrap:break-word;word-break:break-word}.swal2-checkbox,.swal2-file,.swal2-input,.swal2-radio,.swal2-select,.swal2-textarea{margin:1em 2em 0}.swal2-file,.swal2-input,.swal2-textarea{box-sizing:border-box;width:auto;transition:border-color .1s,box-shadow .1s;border:1px solid #d9d9d9;border-radius:.1875em;background:inherit;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px transparent;color:inherit;font-size:1.125em}.swal2-file.swal2-inputerror,.swal2-input.swal2-inputerror,.swal2-textarea.swal2-inputerror{border-color:#f27474!important;box-shadow:0 0 2px #f27474!important}.swal2-file:focus,.swal2-input:focus,.swal2-textarea:focus{border:1px solid #b4dbed;outline:0;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(100,150,200,.5)}.swal2-file::-moz-placeholder,.swal2-input::-moz-placeholder,.swal2-textarea::-moz-placeholder{color:#ccc}.swal2-file:-ms-input-placeholder,.swal2-input:-ms-input-placeholder,.swal2-textarea:-ms-input-placeholder{color:#ccc}.swal2-file::placeholder,.swal2-input::placeholder,.swal2-textarea::placeholder{color:#ccc}.swal2-range{margin:1em 2em 0;background:#fff}.swal2-range input{width:80%}.swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}.swal2-range input,.swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}.swal2-input{height:2.625em;padding:0 .75em}.swal2-file{width:75%;margin-right:auto;margin-left:auto;background:inherit;font-size:1.125em}.swal2-textarea{height:6.75em;padding:.75em}.swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:inherit;color:inherit;font-size:1.125em}.swal2-checkbox,.swal2-radio{align-items:center;justify-content:center;background:#fff;color:inherit}.swal2-checkbox label,.swal2-radio label{margin:0 .6em;font-size:1.125em}.swal2-checkbox input,.swal2-radio input{flex-shrink:0;margin:0 .4em}.swal2-input-label{display:flex;justify-content:center;margin:1em auto 0}.swal2-validation-message{align-items:center;justify-content:center;margin:1em 0 0;padding:.625em;overflow:hidden;background:#f0f0f0;color:#666;font-size:1em;font-weight:300}.swal2-validation-message::before{content:"!";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}.swal2-icon{position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:2.5em auto .6em;border:.25em solid transparent;border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}.swal2-icon.swal2-error{border-color:#f27474;color:#f27474}.swal2-icon.swal2-error .swal2-x-mark{position:relative;flex-grow:1}.swal2-icon.swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}.swal2-icon.swal2-error.swal2-icon-show{-webkit-animation:swal2-animate-error-icon .5s;animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-error.swal2-icon-show .swal2-x-mark{-webkit-animation:swal2-animate-error-x-mark .5s;animation:swal2-animate-error-x-mark .5s}.swal2-icon.swal2-warning{border-color:#facea8;color:#f8bb86}.swal2-icon.swal2-info{border-color:#9de0f6;color:#3fc3ee}.swal2-icon.swal2-question{border-color:#c9dae1;color:#87adbd}.swal2-icon.swal2-success{border-color:#a5dc86;color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;transform:rotate(45deg);border-radius:50%}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}.swal2-icon.swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-.25em;left:-.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}.swal2-icon.swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}.swal2-icon.swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}.swal2-icon.swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-tip{-webkit-animation:swal2-animate-success-line-tip .75s;animation:swal2-animate-success-line-tip .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-long{-webkit-animation:swal2-animate-success-line-long .75s;animation:swal2-animate-success-line-long .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-circular-line-right{-webkit-animation:swal2-rotate-success-circular-line 4.25s ease-in;animation:swal2-rotate-success-circular-line 4.25s ease-in}.swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:1.25em auto;padding:0;background:inherit;font-weight:600}.swal2-progress-steps li{display:inline-block;position:relative}.swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:#add8e6;color:#fff}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:#add8e6}.swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}[class^=swal2]{-webkit-tap-highlight-color:transparent}.swal2-show{-webkit-animation:swal2-show .3s;animation:swal2-show .3s}.swal2-hide{-webkit-animation:swal2-hide .15s forwards;animation:swal2-hide .15s forwards}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{margin-right:initial;margin-left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}@-webkit-keyframes swal2-toast-show{0%{transform:translateY(-.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0)}}@keyframes swal2-toast-show{0%{transform:translateY(-.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0)}}@-webkit-keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@-webkit-keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@-webkit-keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@-webkit-keyframes swal2-show{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}100%{transform:scale(1)}}@keyframes swal2-show{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}100%{transform:scale(1)}}@-webkit-keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(.5);opacity:0}}@keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(.5);opacity:0}}@-webkit-keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@-webkit-keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@-webkit-keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@-webkit-keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@-webkit-keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0);opacity:1}}@-webkit-keyframes swal2-rotate-loading{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes swal2-rotate-loading{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto!important}body.swal2-no-backdrop .swal2-container{background-color:transparent!important;pointer-events:none}body.swal2-no-backdrop .swal2-container .swal2-popup{pointer-events:all}body.swal2-no-backdrop .swal2-container .swal2-modal{box-shadow:0 0 10px rgba(0,0,0,.4)}@media print{body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow-y:scroll!important}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .swal2-container{position:static!important}}body.swal2-toast-shown .swal2-container{box-sizing:border-box;width:360px;max-width:100%;background-color:transparent;pointer-events:none}body.swal2-toast-shown .swal2-container.swal2-top{top:0;right:auto;bottom:auto;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{top:0;right:0;bottom:auto;left:auto}body.swal2-toast-shown .swal2-container.swal2-top-left,body.swal2-toast-shown .swal2-container.swal2-top-start{top:0;right:auto;bottom:auto;left:0}body.swal2-toast-shown .swal2-container.swal2-center-left,body.swal2-toast-shown .swal2-container.swal2-center-start{top:50%;right:auto;bottom:auto;left:0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{top:50%;right:auto;bottom:auto;left:50%;transform:translate(-50%,-50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{top:50%;right:0;bottom:auto;left:auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-left,body.swal2-toast-shown .swal2-container.swal2-bottom-start{top:auto;right:auto;bottom:0;left:0}body.swal2-toast-shown .swal2-container.swal2-bottom{top:auto;right:auto;bottom:0;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{top:auto;right:0;bottom:0;left:auto} \ No newline at end of file diff --git a/modules/blogging/app/Volo.BloggingTestApp/wwwroot/libs/sweetalert2/sweetalert2.min.js b/modules/blogging/app/Volo.BloggingTestApp/wwwroot/libs/sweetalert2/sweetalert2.min.js new file mode 100644 index 0000000000..9a383d5289 --- /dev/null +++ b/modules/blogging/app/Volo.BloggingTestApp/wwwroot/libs/sweetalert2/sweetalert2.min.js @@ -0,0 +1 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).Sweetalert2=t()}(this,function(){"use strict";const l=Object.freeze({cancel:"cancel",backdrop:"backdrop",close:"close",esc:"esc",timer:"timer"}),t="SweetAlert2:",o=e=>e.charAt(0).toUpperCase()+e.slice(1),a=e=>Array.prototype.slice.call(e),s=e=>{console.warn("".concat(t," ").concat("object"==typeof e?e.join(" "):e))},r=e=>{console.error("".concat(t," ").concat(e))},n=[],i=(e,t)=>{t='"'.concat(e,'" is deprecated and will be removed in the next major release. Please use "').concat(t,'" instead.'),n.includes(t)||(n.push(t),s(t))},c=e=>"function"==typeof e?e():e,u=e=>e&&"function"==typeof e.toPromise,d=e=>u(e)?e.toPromise():Promise.resolve(e),p=e=>e&&Promise.resolve(e)===e,m=e=>e instanceof Element||(e=>"object"==typeof e&&e.jquery)(e);var e=e=>{const t={};for(const n in e)t[e[n]]="swal2-"+e[n];return t};const h=e(["container","shown","height-auto","iosfix","popup","modal","no-backdrop","no-transition","toast","toast-shown","show","hide","close","title","html-container","actions","confirm","deny","cancel","default-outline","footer","icon","icon-content","image","input","file","range","select","radio","checkbox","label","textarea","inputerror","input-label","validation-message","progress-steps","active-progress-step","progress-step","progress-step-line","loader","loading","styled","top","top-start","top-end","top-left","top-right","center","center-start","center-end","center-left","center-right","bottom","bottom-start","bottom-end","bottom-left","bottom-right","grow-row","grow-column","grow-fullscreen","rtl","timer-progress-bar","timer-progress-bar-container","scrollbar-measure","icon-success","icon-warning","icon-info","icon-question","icon-error"]),g=e(["success","warning","info","question","error"]),b=()=>document.body.querySelector(".".concat(h.container)),f=e=>{const t=b();return t?t.querySelector(e):null},y=e=>f(".".concat(e)),v=()=>y(h.popup),w=()=>y(h.icon),C=()=>y(h.title),k=()=>y(h["html-container"]),A=()=>y(h.image),B=()=>y(h["progress-steps"]),x=()=>y(h["validation-message"]),P=()=>f(".".concat(h.actions," .").concat(h.confirm)),E=()=>f(".".concat(h.actions," .").concat(h.deny));const S=()=>f(".".concat(h.loader)),T=()=>f(".".concat(h.actions," .").concat(h.cancel)),L=()=>y(h.actions),O=()=>y(h.footer),j=()=>y(h["timer-progress-bar"]),D=()=>y(h.close),I=()=>{const e=a(v().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')).sort((e,t)=>(e=parseInt(e.getAttribute("tabindex")),(t=parseInt(t.getAttribute("tabindex")))"-1"!==e.getAttribute("tabindex"));return(t=>{const n=[];for(let e=0;eG(e))},M=()=>!H()&&!document.body.classList.contains(h["no-backdrop"]),H=()=>document.body.classList.contains(h["toast-shown"]);const q={previousBodyPadding:null},V=(t,e)=>{if(t.textContent="",e){const n=new DOMParser,o=n.parseFromString(e,"text/html");a(o.querySelector("head").childNodes).forEach(e=>{t.appendChild(e)}),a(o.querySelector("body").childNodes).forEach(e=>{t.appendChild(e)})}},N=(t,e)=>{if(!e)return!1;var n=e.split(/\s+/);for(let e=0;e{var o,i;if(o=e,i=t,a(o.classList).forEach(e=>{Object.values(h).includes(e)||Object.values(g).includes(e)||Object.values(i.showClass).includes(e)||o.classList.remove(e)}),t.customClass&&t.customClass[n]){if("string"!=typeof t.customClass[n]&&!t.customClass[n].forEach)return s("Invalid type of customClass.".concat(n,'! Expected string or iterable object, got "').concat(typeof t.customClass[n],'"'));W(e,t.customClass[n])}},F=(e,t)=>{if(!t)return null;switch(t){case"select":case"textarea":case"file":return K(e,h[t]);case"checkbox":return e.querySelector(".".concat(h.checkbox," input"));case"radio":return e.querySelector(".".concat(h.radio," input:checked"))||e.querySelector(".".concat(h.radio," input:first-child"));case"range":return e.querySelector(".".concat(h.range," input"));default:return K(e,h.input)}},R=e=>{var t;e.focus(),"file"!==e.type&&(t=e.value,e.value="",e.value=t)},z=(e,t,n)=>{e&&t&&(t="string"==typeof t?t.split(/\s+/).filter(Boolean):t).forEach(t=>{e.forEach?e.forEach(e=>{n?e.classList.add(t):e.classList.remove(t)}):n?e.classList.add(t):e.classList.remove(t)})},W=(e,t)=>{z(e,t,!0)},_=(e,t)=>{z(e,t,!1)},K=(t,n)=>{for(let e=0;e{(n=n==="".concat(parseInt(n))?parseInt(n):n)||0===parseInt(n)?e.style[t]="number"==typeof n?"".concat(n,"px"):n:e.style.removeProperty(t)},Z=(e,t="flex")=>{e.style.display=t},J=e=>{e.style.display="none"},X=(e,t,n,o)=>{const i=e.querySelector(t);i&&(i.style[n]=o)},$=(e,t,n)=>{t?Z(e,n):J(e)},G=e=>!(!e||!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)),Q=()=>!G(P())&&!G(E())&&!G(T()),ee=e=>!!(e.scrollHeight>e.clientHeight),te=e=>{const t=window.getComputedStyle(e);var n=parseFloat(t.getPropertyValue("animation-duration")||"0"),e=parseFloat(t.getPropertyValue("transition-duration")||"0");return 0{const n=j();G(n)&&(t&&(n.style.transition="none",n.style.width="100%"),setTimeout(()=>{n.style.transition="width ".concat(e/1e3,"s linear"),n.style.width="0%"},10))},oe=()=>"undefined"==typeof window||"undefined"==typeof document,ie='\n
        \n \n
          \n
          \n \n

          \n
          \n \n \n
          \n \n \n
          \n \n
          \n \n \n
          \n
          \n
          \n \n \n \n
          \n
          \n
          \n
          \n
          \n
          \n').replace(/(^|\n)\s*/g,""),ae=()=>{ln.isVisible()&&ln.resetValidationMessage()},se=e=>{var t=(()=>{const e=b();return!!e&&(e.remove(),_([document.documentElement,document.body],[h["no-backdrop"],h["toast-shown"],h["has-column"]]),!0)})();if(oe())r("SweetAlert2 requires document to initialize");else{const n=document.createElement("div");n.className=h.container,t&&W(n,h["no-transition"]),V(n,ie);const o="string"==typeof(t=e.target)?document.querySelector(t):t;o.appendChild(n),(e=>{const t=v();t.setAttribute("role",e.toast?"alert":"dialog"),t.setAttribute("aria-live",e.toast?"polite":"assertive"),e.toast||t.setAttribute("aria-modal","true")})(e),e=o,"rtl"===window.getComputedStyle(e).direction&&W(b(),h.rtl),(()=>{const e=v(),t=K(e,h.input),n=K(e,h.file),o=e.querySelector(".".concat(h.range," input")),i=e.querySelector(".".concat(h.range," output")),a=K(e,h.select),s=e.querySelector(".".concat(h.checkbox," input")),r=K(e,h.textarea);t.oninput=ae,n.onchange=ae,a.onchange=ae,s.onchange=ae,r.oninput=ae,o.oninput=()=>{ae(),i.value=o.value},o.onchange=()=>{ae(),o.nextSibling.value=o.value}})()}},re=(e,t)=>{e instanceof HTMLElement?t.appendChild(e):"object"==typeof e?ce(e,t):e&&V(t,e)},ce=(e,t)=>{e.jquery?le(t,e):V(t,e.toString())},le=(t,n)=>{if(t.textContent="",0 in n)for(let e=0;e in n;e++)t.appendChild(n[e].cloneNode(!0));else t.appendChild(n.cloneNode(!0))},ue=(()=>{if(oe())return!1;var e=document.createElement("div"),t={WebkitAnimation:"webkitAnimationEnd",OAnimation:"oAnimationEnd oanimationend",animation:"animationend"};for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&void 0!==e.style[n])return t[n];return!1})(),de=(e,t)=>{const n=L();var o=S(),i=P(),a=E(),s=T();(t.showConfirmButton||t.showDenyButton||t.showCancelButton?Z:J)(n),U(n,t,"actions"),pe(i,"confirm",t),pe(a,"deny",t),pe(s,"cancel",t),function(e,t,n,o){if(!o.buttonsStyling)return _([e,t,n],h.styled);W([e,t,n],h.styled),o.confirmButtonColor&&(e.style.backgroundColor=o.confirmButtonColor,W(e,h["default-outline"]));o.denyButtonColor&&(t.style.backgroundColor=o.denyButtonColor,W(t,h["default-outline"]));o.cancelButtonColor&&(n.style.backgroundColor=o.cancelButtonColor,W(n,h["default-outline"]))}(i,a,s,t),t.reverseButtons&&(n.insertBefore(s,o),n.insertBefore(a,o),n.insertBefore(i,o)),V(o,t.loaderHtml),U(o,t,"loader")};function pe(e,t,n){$(e,n["show".concat(o(t),"Button")],"inline-block"),V(e,n["".concat(t,"ButtonText")]),e.setAttribute("aria-label",n["".concat(t,"ButtonAriaLabel")]),e.className=h[t],U(e,n,"".concat(t,"Button")),W(e,n["".concat(t,"ButtonClass")])}const me=(e,t)=>{var n,o,i=b();i&&(o=i,"string"==typeof(n=t.backdrop)?o.style.background=n:n||W([document.documentElement,document.body],h["no-backdrop"]),o=i,(n=t.position)in h?W(o,h[n]):(s('The "position" parameter is not valid, defaulting to "center"'),W(o,h.center)),n=i,!(o=t.grow)||"string"!=typeof o||(o="grow-".concat(o))in h&&W(n,h[o]),U(i,t,"container"))};var he={promise:new WeakMap,innerParams:new WeakMap,domCache:new WeakMap};const ge=["input","file","range","select","radio","checkbox","textarea"],be=e=>{if(!ke[e.input])return r('Unexpected type of input! Expected "text", "email", "password", "number", "tel", "select", "radio", "checkbox", "textarea", "file" or "url", got "'.concat(e.input,'"'));var t=Ce(e.input);const n=ke[e.input](t,e);Z(n),setTimeout(()=>{R(n)})},fe=(e,t)=>{const n=F(v(),e);if(n){(t=>{for(let e=0;e{var t=Ce(e.input);e.customClass&&W(t,e.customClass.input)},ve=(e,t)=>{e.placeholder&&!t.inputPlaceholder||(e.placeholder=t.inputPlaceholder)},we=(e,t,n)=>{if(n.inputLabel){e.id=h.input;const i=document.createElement("label");var o=h["input-label"];i.setAttribute("for",e.id),i.className=o,W(i,n.customClass.inputLabel),i.innerText=n.inputLabel,t.insertAdjacentElement("beforebegin",i)}},Ce=e=>{e=h[e]||h.input;return K(v(),e)},ke={};ke.text=ke.email=ke.password=ke.number=ke.tel=ke.url=(e,t)=>("string"==typeof t.inputValue||"number"==typeof t.inputValue?e.value=t.inputValue:p(t.inputValue)||s('Unexpected type of inputValue! Expected "string", "number" or "Promise", got "'.concat(typeof t.inputValue,'"')),we(e,e,t),ve(e,t),e.type=t.input,e),ke.file=(e,t)=>(we(e,e,t),ve(e,t),e),ke.range=(e,t)=>{const n=e.querySelector("input"),o=e.querySelector("output");return n.value=t.inputValue,n.type=t.input,o.value=t.inputValue,we(n,e,t),e},ke.select=(e,t)=>{if(e.textContent="",t.inputPlaceholder){const n=document.createElement("option");V(n,t.inputPlaceholder),n.value="",n.disabled=!0,n.selected=!0,e.appendChild(n)}return we(e,e,t),e},ke.radio=e=>(e.textContent="",e),ke.checkbox=(e,t)=>{const n=F(v(),"checkbox");n.value=1,n.id=h.checkbox,n.checked=Boolean(t.inputValue);var o=e.querySelector("span");return V(o,t.inputPlaceholder),e},ke.textarea=(n,e)=>{n.value=e.inputValue,ve(n,e),we(n,n,e);return setTimeout(()=>{if("MutationObserver"in window){const t=parseInt(window.getComputedStyle(v()).width);new MutationObserver(()=>{var e,e=n.offsetWidth+(e=n,parseInt(window.getComputedStyle(e).marginLeft)+parseInt(window.getComputedStyle(e).marginRight));e>t?v().style.width="".concat(e,"px"):v().style.width=null}).observe(n,{attributes:!0,attributeFilter:["style"]})}}),n};const Ae=(e,t)=>{const n=k();U(n,t,"htmlContainer"),t.html?(re(t.html,n),Z(n,"block")):t.text?(n.textContent=t.text,Z(n,"block")):J(n),((e,o)=>{const i=v();e=he.innerParams.get(e);const a=!e||o.input!==e.input;ge.forEach(e=>{var t=h[e];const n=K(i,t);fe(e,o.inputAttributes),n.className=t,a&&J(n)}),o.input&&(a&&be(o),ye(o))})(e,t)},Be=(e,t)=>{for(const n in g)t.icon!==n&&_(e,g[n]);W(e,g[t.icon]),Ee(e,t),xe(),U(e,t,"icon")},xe=()=>{const e=v();var t=window.getComputedStyle(e).getPropertyValue("background-color");const n=e.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix");for(let e=0;e{var n;e.textContent="",t.iconHtml?V(e,Se(t.iconHtml)):"success"===t.icon?V(e,'\n
          \n \n
          \n
          \n '):"error"===t.icon?V(e,'\n \n \n \n \n '):(n={question:"?",warning:"!",info:"i"},V(e,Se(n[t.icon])))},Ee=(e,t)=>{if(t.iconColor){e.style.color=t.iconColor,e.style.borderColor=t.iconColor;for(const n of[".swal2-success-line-tip",".swal2-success-line-long",".swal2-x-mark-line-left",".swal2-x-mark-line-right"])X(e,n,"backgroundColor",t.iconColor);X(e,".swal2-success-ring","borderColor",t.iconColor)}},Se=e=>'
          ').concat(e,"
          "),Te=(e,o)=>{const i=B();if(!o.progressSteps||0===o.progressSteps.length)return J(i);Z(i),i.textContent="",o.currentProgressStep>=o.progressSteps.length&&s("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),o.progressSteps.forEach((e,t)=>{var n,e=(n=e,e=document.createElement("li"),W(e,h["progress-step"]),V(e,n),e);i.appendChild(e),t===o.currentProgressStep&&W(e,h["active-progress-step"]),t!==o.progressSteps.length-1&&(t=(e=>{const t=document.createElement("li");return W(t,h["progress-step-line"]),e.progressStepsDistance&&(t.style.width=e.progressStepsDistance),t})(o),i.appendChild(t))})},Le=(e,t)=>{e.className="".concat(h.popup," ").concat(G(e)?t.showClass.popup:""),t.toast?(W([document.documentElement,document.body],h["toast-shown"]),W(e,h.toast)):W(e,h.modal),U(e,t,"popup"),"string"==typeof t.customClass&&W(e,t.customClass),t.icon&&W(e,h["icon-".concat(t.icon)])},Oe=(e,t)=>{var n,o,i;(e=>{var t=b();const n=v();e.toast?(Y(t,"width",e.width),n.style.width="100%",n.insertBefore(S(),w())):Y(n,"width",e.width),Y(n,"padding",e.padding),e.background&&(n.style.background=e.background),J(x()),Le(n,e)})(t),me(0,t),Te(0,t),i=e,n=t,o=he.innerParams.get(i),i=w(),o&&n.icon===o.icon?(Pe(i,n),Be(i,n)):n.icon||n.iconHtml?n.icon&&-1===Object.keys(g).indexOf(n.icon)?(r('Unknown icon! Expected "success", "error", "warning", "info" or "question", got "'.concat(n.icon,'"')),J(i)):(Z(i),Pe(i,n),Be(i,n),W(i,n.showClass.icon)):J(i),(e=>{const t=A();if(!e.imageUrl)return J(t);Z(t,""),t.setAttribute("src",e.imageUrl),t.setAttribute("alt",e.imageAlt),Y(t,"width",e.imageWidth),Y(t,"height",e.imageHeight),t.className=h.image,U(t,e,"image")})(t),(e=>{const t=C();$(t,e.title||e.titleText,"block"),e.title&&re(e.title,t),e.titleText&&(t.innerText=e.titleText),U(t,e,"title")})(t),(e=>{const t=D();V(t,e.closeButtonHtml),U(t,e,"closeButton"),$(t,e.showCloseButton),t.setAttribute("aria-label",e.closeButtonAriaLabel)})(t),Ae(e,t),de(0,t),i=t,e=O(),$(e,i.footer),i.footer&&re(i.footer,e),U(e,i,"footer"),"function"==typeof t.didRender&&t.didRender(v())};const je=()=>P()&&P().click();const De=e=>{let t=v();t||ln.fire(),t=v();var n=S();H()?J(w()):Ie(t,e),Z(n),t.setAttribute("data-loading",!0),t.setAttribute("aria-busy",!0),t.focus()},Ie=(e,t)=>{var n=L();const o=S();!t&&G(P())&&(t=P()),Z(n),t&&(J(t),o.setAttribute("data-button-to-replace",t.className)),o.parentNode.insertBefore(o,t),W([e,n],h.loading)},Me={},He=o=>new Promise(e=>{if(!o)return e();var t=window.scrollX,n=window.scrollY;Me.restoreFocusTimeout=setTimeout(()=>{Me.previousActiveElement&&Me.previousActiveElement.focus?(Me.previousActiveElement.focus(),Me.previousActiveElement=null):document.body&&document.body.focus(),e()},100),window.scrollTo(t,n)});const qe=()=>{if(Me.timeout)return(()=>{const e=j();var t=parseInt(window.getComputedStyle(e).width);e.style.removeProperty("transition"),e.style.width="100%";var n=parseInt(window.getComputedStyle(e).width),n=parseInt(t/n*100);e.style.removeProperty("transition"),e.style.width="".concat(n,"%")})(),Me.timeout.stop()},Ve=()=>{if(Me.timeout){var e=Me.timeout.start();return ne(e),e}};let Ne=!1;const Ue={};const Fe=t=>{for(let e=t.target;e&&e!==document;e=e.parentNode)for(const o in Ue){var n=e.getAttribute(o);if(n)return void Ue[o].fire({template:n})}},Re={title:"",titleText:"",text:"",html:"",footer:"",icon:void 0,iconColor:void 0,iconHtml:void 0,template:void 0,toast:!1,showClass:{popup:"swal2-show",backdrop:"swal2-backdrop-show",icon:"swal2-icon-show"},hideClass:{popup:"swal2-hide",backdrop:"swal2-backdrop-hide",icon:"swal2-icon-hide"},customClass:{},target:"body",backdrop:!0,heightAuto:!0,allowOutsideClick:!0,allowEscapeKey:!0,allowEnterKey:!0,stopKeydownPropagation:!0,keydownListenerCapture:!1,showConfirmButton:!0,showDenyButton:!1,showCancelButton:!1,preConfirm:void 0,preDeny:void 0,confirmButtonText:"OK",confirmButtonAriaLabel:"",confirmButtonColor:void 0,denyButtonText:"No",denyButtonAriaLabel:"",denyButtonColor:void 0,cancelButtonText:"Cancel",cancelButtonAriaLabel:"",cancelButtonColor:void 0,buttonsStyling:!0,reverseButtons:!1,focusConfirm:!0,focusDeny:!1,focusCancel:!1,returnFocus:!0,showCloseButton:!1,closeButtonHtml:"×",closeButtonAriaLabel:"Close this dialog",loaderHtml:"",showLoaderOnConfirm:!1,showLoaderOnDeny:!1,imageUrl:void 0,imageWidth:void 0,imageHeight:void 0,imageAlt:"",timer:void 0,timerProgressBar:!1,width:void 0,padding:void 0,background:void 0,input:void 0,inputPlaceholder:"",inputLabel:"",inputValue:"",inputOptions:{},inputAutoTrim:!0,inputAttributes:{},inputValidator:void 0,returnInputValueOnDeny:!1,validationMessage:void 0,grow:!1,position:"center",progressSteps:[],currentProgressStep:void 0,progressStepsDistance:void 0,willOpen:void 0,didOpen:void 0,didRender:void 0,willClose:void 0,didClose:void 0,didDestroy:void 0,scrollbarPadding:!0},ze=["allowEscapeKey","allowOutsideClick","background","buttonsStyling","cancelButtonAriaLabel","cancelButtonColor","cancelButtonText","closeButtonAriaLabel","closeButtonHtml","confirmButtonAriaLabel","confirmButtonColor","confirmButtonText","currentProgressStep","customClass","denyButtonAriaLabel","denyButtonColor","denyButtonText","didClose","didDestroy","footer","hideClass","html","icon","iconColor","iconHtml","imageAlt","imageHeight","imageUrl","imageWidth","preConfirm","preDeny","progressSteps","returnFocus","reverseButtons","showCancelButton","showCloseButton","showConfirmButton","showDenyButton","text","title","titleText","willClose"],We={},_e=["allowOutsideClick","allowEnterKey","backdrop","focusConfirm","focusDeny","focusCancel","returnFocus","heightAuto","keydownListenerCapture"],Ke=e=>Object.prototype.hasOwnProperty.call(Re,e);const Ye=e=>We[e],Ze=e=>{!e.backdrop&&e.allowOutsideClick&&s('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`');for(const o in e)n=o,Ke(n)||s('Unknown parameter "'.concat(n,'"')),e.toast&&(t=o,_e.includes(t)&&s('The parameter "'.concat(t,'" is incompatible with toasts'))),t=o,Ye(t)&&i(t,Ye(t));var t,n};var Je=Object.freeze({isValidParameter:Ke,isUpdatableParameter:e=>-1!==ze.indexOf(e),isDeprecatedParameter:Ye,argsToParams:n=>{const o={};return"object"!=typeof n[0]||m(n[0])?["title","html","icon"].forEach((e,t)=>{t=n[t];"string"==typeof t||m(t)?o[e]=t:void 0!==t&&r("Unexpected type of ".concat(e,'! Expected "string" or "Element", got ').concat(typeof t))}):Object.assign(o,n[0]),o},isVisible:()=>G(v()),clickConfirm:je,clickDeny:()=>E()&&E().click(),clickCancel:()=>T()&&T().click(),getContainer:b,getPopup:v,getTitle:C,getHtmlContainer:k,getImage:A,getIcon:w,getInputLabel:()=>y(h["input-label"]),getCloseButton:D,getActions:L,getConfirmButton:P,getDenyButton:E,getCancelButton:T,getLoader:S,getFooter:O,getTimerProgressBar:j,getFocusableElements:I,getValidationMessage:x,isLoading:()=>v().hasAttribute("data-loading"),fire:function(...e){return new this(...e)},mixin:function(n){class e extends this{_main(e,t){return super._main(e,Object.assign({},n,t))}}return e},showLoading:De,enableLoading:De,getTimerLeft:()=>Me.timeout&&Me.timeout.getTimerLeft(),stopTimer:qe,resumeTimer:Ve,toggleTimer:()=>{var e=Me.timeout;return e&&(e.running?qe:Ve)()},increaseTimer:e=>{if(Me.timeout){e=Me.timeout.increase(e);return ne(e,!0),e}},isTimerRunning:()=>Me.timeout&&Me.timeout.isRunning(),bindClickHandler:function(e="data-swal-template"){Ue[e]=this,Ne||(document.body.addEventListener("click",Fe),Ne=!0)}});function Xe(){var e=he.innerParams.get(this);if(e){const t=he.domCache.get(this);J(t.loader),H()?e.icon&&Z(w()):(e=>{const t=e.popup.getElementsByClassName(e.loader.getAttribute("data-button-to-replace"));if(t.length)Z(t[0],"inline-block");else if(Q())J(e.actions)})(t),_([t.popup,t.actions],h.loading),t.popup.removeAttribute("aria-busy"),t.popup.removeAttribute("data-loading"),t.confirmButton.disabled=!1,t.denyButton.disabled=!1,t.cancelButton.disabled=!1}}const $e=()=>{null===q.previousBodyPadding&&document.body.scrollHeight>window.innerHeight&&(q.previousBodyPadding=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight="".concat(q.previousBodyPadding+(()=>{const e=document.createElement("div");e.className=h["scrollbar-measure"],document.body.appendChild(e);var t=e.getBoundingClientRect().width-e.clientWidth;return document.body.removeChild(e),t})(),"px"))},Ge=()=>{navigator.userAgent.match(/(CriOS|FxiOS|EdgiOS|YaBrowser|UCBrowser)/i)||v().scrollHeight>window.innerHeight-44&&(b().style.paddingBottom="".concat(44,"px"))},Qe=()=>{const e=b();let t;e.ontouchstart=e=>{t=et(e)},e.ontouchmove=e=>{t&&(e.preventDefault(),e.stopPropagation())}},et=e=>{var t=e.target,n=b();return!tt(e)&&!nt(e)&&(t===n||!(ee(n)||"INPUT"===t.tagName||"TEXTAREA"===t.tagName||ee(k())&&k().contains(t)))},tt=e=>e.touches&&e.touches.length&&"stylus"===e.touches[0].touchType,nt=e=>e.touches&&1{const e=a(document.body.children);e.forEach(e=>{e.hasAttribute("data-previous-aria-hidden")?(e.setAttribute("aria-hidden",e.getAttribute("data-previous-aria-hidden")),e.removeAttribute("data-previous-aria-hidden")):e.removeAttribute("aria-hidden")})};var it={swalPromiseResolve:new WeakMap};function at(e,t,n,o){H()?ct(e,o):(He(n).then(()=>ct(e,o)),Me.keydownTarget.removeEventListener("keydown",Me.keydownHandler,{capture:Me.keydownListenerCapture}),Me.keydownHandlerAdded=!1),/^((?!chrome|android).)*safari/i.test(navigator.userAgent)?(t.setAttribute("style","display:none !important"),t.removeAttribute("class"),t.innerHTML=""):t.remove(),M()&&(null!==q.previousBodyPadding&&(document.body.style.paddingRight="".concat(q.previousBodyPadding,"px"),q.previousBodyPadding=null),N(document.body,h.iosfix)&&(t=parseInt(document.body.style.top,10),_(document.body,h.iosfix),document.body.style.top="",document.body.scrollTop=-1*t),ot()),_([document.documentElement,document.body],[h.shown,h["height-auto"],h["no-backdrop"],h["toast-shown"]])}function st(e){var t=v();if(t){e=void 0!==(o=e)?Object.assign({isConfirmed:!1,isDenied:!1,isDismissed:!1},o):{isConfirmed:!1,isDenied:!1,isDismissed:!0};var n=he.innerParams.get(this);if(n&&!N(t,n.hideClass.popup)){const i=it.swalPromiseResolve.get(this);_(t,n.showClass.popup),W(t,n.hideClass.popup);var o=b();_(o,n.showClass.backdrop),W(o,n.hideClass.backdrop),((e,t,n)=>{const o=b(),i=ue&&te(t);if(typeof n.willClose==="function")n.willClose(t);if(i)rt(e,t,o,n.returnFocus,n.didClose);else at(e,o,n.returnFocus,n.didClose)})(this,t,n),i(e)}}}const rt=(e,t,n,o,i)=>{Me.swalCloseEventFinishedCallback=at.bind(null,e,n,o,i),t.addEventListener(ue,function(e){e.target===t&&(Me.swalCloseEventFinishedCallback(),delete Me.swalCloseEventFinishedCallback)})},ct=(e,t)=>{setTimeout(()=>{"function"==typeof t&&t.bind(e.params)(),e._destroy()})};function lt(e,t,n){const o=he.domCache.get(e);t.forEach(e=>{o[e].disabled=n})}function ut(e,t){if(!e)return!1;if("radio"===e.type){const n=e.parentNode.parentNode,o=n.querySelectorAll("input");for(let e=0;e/^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]{2,24}$/.test(e)?Promise.resolve():Promise.resolve(t||"Invalid email address"),url:(e,t)=>/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(e)?Promise.resolve():Promise.resolve(t||"Invalid URL")};function mt(e){var t,n;(t=e).inputValidator||Object.keys(pt).forEach(e=>{t.input===e&&(t.inputValidator=pt[e])}),e.showLoaderOnConfirm&&!e.preConfirm&&s("showLoaderOnConfirm is set to true, but preConfirm is not defined.\nshowLoaderOnConfirm should be used together with preConfirm, see usage example:\nhttps://sweetalert2.github.io/#ajax-request"),(n=e).target&&("string"!=typeof n.target||document.querySelector(n.target))&&("string"==typeof n.target||n.target.appendChild)||(s('Target parameter is not valid, defaulting to "body"'),n.target="body"),"string"==typeof e.title&&(e.title=e.title.split("\n").join("
          ")),se(e)}const ht=["swal-title","swal-html","swal-footer"],gt=e=>{e="string"==typeof e.template?document.querySelector(e.template):e.template;if(!e)return{};e=e.content;return kt(e),Object.assign(bt(e),ft(e),yt(e),vt(e),wt(e),Ct(e,ht))},bt=e=>{const o={};return a(e.querySelectorAll("swal-param")).forEach(e=>{At(e,["name","value"]);var t=e.getAttribute("name");let n=e.getAttribute("value");"boolean"==typeof Re[t]&&"false"===n&&(n=!1),"object"==typeof Re[t]&&(n=JSON.parse(n)),o[t]=n}),o},ft=e=>{const n={};return a(e.querySelectorAll("swal-button")).forEach(e=>{At(e,["type","color","aria-label"]);var t=e.getAttribute("type");n["".concat(t,"ButtonText")]=e.innerHTML,n["show".concat(o(t),"Button")]=!0,e.hasAttribute("color")&&(n["".concat(t,"ButtonColor")]=e.getAttribute("color")),e.hasAttribute("aria-label")&&(n["".concat(t,"ButtonAriaLabel")]=e.getAttribute("aria-label"))}),n},yt=e=>{const t={},n=e.querySelector("swal-image");return n&&(At(n,["src","width","height","alt"]),n.hasAttribute("src")&&(t.imageUrl=n.getAttribute("src")),n.hasAttribute("width")&&(t.imageWidth=n.getAttribute("width")),n.hasAttribute("height")&&(t.imageHeight=n.getAttribute("height")),n.hasAttribute("alt")&&(t.imageAlt=n.getAttribute("alt"))),t},vt=e=>{const t={},n=e.querySelector("swal-icon");return n&&(At(n,["type","color"]),n.hasAttribute("type")&&(t.icon=n.getAttribute("type")),n.hasAttribute("color")&&(t.iconColor=n.getAttribute("color")),t.iconHtml=n.innerHTML),t},wt=e=>{const n={},t=e.querySelector("swal-input");t&&(At(t,["type","label","placeholder","value"]),n.input=t.getAttribute("type")||"text",t.hasAttribute("label")&&(n.inputLabel=t.getAttribute("label")),t.hasAttribute("placeholder")&&(n.inputPlaceholder=t.getAttribute("placeholder")),t.hasAttribute("value")&&(n.inputValue=t.getAttribute("value")));e=e.querySelectorAll("swal-input-option");return e.length&&(n.inputOptions={},a(e).forEach(e=>{At(e,["value"]);var t=e.getAttribute("value"),e=e.innerHTML;n.inputOptions[t]=e})),n},Ct=(e,t)=>{const n={};for(const o in t){const i=t[o],a=e.querySelector(i);a&&(At(a,[]),n[i.replace(/^swal-/,"")]=a.innerHTML.trim())}return n},kt=e=>{const t=ht.concat(["swal-param","swal-button","swal-image","swal-icon","swal-input","swal-input-option"]);a(e.children).forEach(e=>{e=e.tagName.toLowerCase();-1===t.indexOf(e)&&s("Unrecognized element <".concat(e,">"))})},At=(t,n)=>{a(t.attributes).forEach(e=>{-1===n.indexOf(e.name)&&s(['Unrecognized attribute "'.concat(e.name,'" on <').concat(t.tagName.toLowerCase(),">."),"".concat(n.length?"Allowed attributes are: ".concat(n.join(", ")):"To set the value, use HTML within the element.")])})},Bt=e=>{const t=b(),n=v();"function"==typeof e.willOpen&&e.willOpen(n);var o=window.getComputedStyle(document.body).overflowY;St(t,n,e),setTimeout(()=>{Pt(t,n)},10),M()&&(Et(t,e.scrollbarPadding,o),(()=>{const e=a(document.body.children);e.forEach(e=>{e===b()||e.contains(b())||(e.hasAttribute("aria-hidden")&&e.setAttribute("data-previous-aria-hidden",e.getAttribute("aria-hidden")),e.setAttribute("aria-hidden","true"))})})()),H()||Me.previousActiveElement||(Me.previousActiveElement=document.activeElement),"function"==typeof e.didOpen&&setTimeout(()=>e.didOpen(n)),_(t,h["no-transition"])},xt=e=>{const t=v();if(e.target===t){const n=b();t.removeEventListener(ue,xt),n.style.overflowY="auto"}},Pt=(e,t)=>{ue&&te(t)?(e.style.overflowY="hidden",t.addEventListener(ue,xt)):e.style.overflowY="auto"},Et=(e,t,n)=>{var o;(/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream||"MacIntel"===navigator.platform&&1{e.scrollTop=0})},St=(e,t,n)=>{W(e,n.showClass.backdrop),t.style.setProperty("opacity","0","important"),Z(t,"grid"),setTimeout(()=>{W(t,n.showClass.popup),t.style.removeProperty("opacity")},10),W([document.documentElement,document.body],h.shown),n.heightAuto&&n.backdrop&&!n.toast&&W([document.documentElement,document.body],h["height-auto"])},Tt=e=>e.checked?1:0,Lt=e=>e.checked?e.value:null,Ot=e=>e.files.length?null!==e.getAttribute("multiple")?e.files:e.files[0]:null,jt=(t,n)=>{const o=v(),i=e=>It[n.input](o,Mt(e),n);u(n.inputOptions)||p(n.inputOptions)?(De(P()),d(n.inputOptions).then(e=>{t.hideLoading(),i(e)})):"object"==typeof n.inputOptions?i(n.inputOptions):r("Unexpected type of inputOptions! Expected object, Map or Promise, got ".concat(typeof n.inputOptions))},Dt=(t,n)=>{const o=t.getInput();J(o),d(n.inputValue).then(e=>{o.value="number"===n.input?parseFloat(e)||0:"".concat(e),Z(o),o.focus(),t.hideLoading()}).catch(e=>{r("Error in inputValue promise: ".concat(e)),o.value="",Z(o),o.focus(),t.hideLoading()})},It={select:(e,t,i)=>{const a=K(e,h.select),s=(e,t,n)=>{const o=document.createElement("option");o.value=n,V(o,t),o.selected=Ht(n,i.inputValue),e.appendChild(o)};t.forEach(e=>{var t=e[0];const n=e[1];if(Array.isArray(n)){const o=document.createElement("optgroup");o.label=t,o.disabled=!1,a.appendChild(o),n.forEach(e=>s(o,e[1],e[0]))}else s(a,n,t)}),a.focus()},radio:(e,t,a)=>{const s=K(e,h.radio);t.forEach(e=>{var t=e[0],e=e[1];const n=document.createElement("input"),o=document.createElement("label");n.type="radio",n.name=h.radio,n.value=t,Ht(t,a.inputValue)&&(n.checked=!0);const i=document.createElement("span");V(i,e),i.className=h.label,o.appendChild(n),o.appendChild(i),s.appendChild(o)});const n=s.querySelectorAll("input");n.length&&n[0].focus()}},Mt=n=>{const o=[];return"undefined"!=typeof Map&&n instanceof Map?n.forEach((e,t)=>{let n=e;"object"==typeof n&&(n=Mt(n)),o.push([t,n])}):Object.keys(n).forEach(e=>{let t=n[e];"object"==typeof t&&(t=Mt(t)),o.push([e,t])}),o},Ht=(e,t)=>t&&t.toString()===e.toString(),qt=(e,t)=>{var n=he.innerParams.get(e),o=((e,t)=>{const n=e.getInput();if(!n)return null;switch(t.input){case"checkbox":return Tt(n);case"radio":return Lt(n);case"file":return Ot(n);default:return t.inputAutoTrim?n.value.trim():n.value}})(e,n);n.inputValidator?Vt(e,o,t):e.getInput().checkValidity()?("deny"===t?Nt:Ft)(e,o):(e.enableButtons(),e.showValidationMessage(n.validationMessage))},Vt=(t,n,o)=>{const e=he.innerParams.get(t);t.disableInput();const i=Promise.resolve().then(()=>d(e.inputValidator(n,e.validationMessage)));i.then(e=>{t.enableButtons(),t.enableInput(),e?t.showValidationMessage(e):("deny"===o?Nt:Ft)(t,n)})},Nt=(t,n)=>{const e=he.innerParams.get(t||void 0);if(e.showLoaderOnDeny&&De(E()),e.preDeny){const o=Promise.resolve().then(()=>d(e.preDeny(n,e.validationMessage)));o.then(e=>{!1===e?t.hideLoading():t.closePopup({isDenied:!0,value:void 0===e?n:e})})}else t.closePopup({isDenied:!0,value:n})},Ut=(e,t)=>{e.closePopup({isConfirmed:!0,value:t})},Ft=(t,n)=>{const e=he.innerParams.get(t||void 0);if(e.showLoaderOnConfirm&&De(),e.preConfirm){t.resetValidationMessage();const o=Promise.resolve().then(()=>d(e.preConfirm(n,e.validationMessage)));o.then(e=>{G(x())||!1===e?t.hideLoading():Ut(t,void 0===e?n:e)})}else Ut(t,n)},Rt=(e,t,n)=>{const o=I();if(o.length)return(t+=n)===o.length?t=0:-1===t&&(t=o.length-1),o[t].focus();v().focus()},zt=["ArrowRight","ArrowDown"],Wt=["ArrowLeft","ArrowUp"],_t=(e,t,n)=>{var o=he.innerParams.get(e);o&&(o.stopKeydownPropagation&&t.stopPropagation(),"Enter"===t.key?Kt(e,t,o):"Tab"===t.key?Yt(t,o):[...zt,...Wt].includes(t.key)?Zt(t.key):"Escape"===t.key&&Jt(t,o,n))},Kt=(e,t,n)=>{t.isComposing||t.target&&e.getInput()&&t.target.outerHTML===e.getInput().outerHTML&&(["textarea","file"].includes(n.input)||(je(),t.preventDefault()))},Yt=(e,t)=>{var n=e.target,o=I();let i=-1;for(let e=0;e{const t=P(),n=E(),o=T();if([t,n,o].includes(document.activeElement)){e=zt.includes(e)?"nextElementSibling":"previousElementSibling";const i=document.activeElement[e];i&&i.focus()}},Jt=(e,t,n)=>{c(t.allowEscapeKey)&&(e.preventDefault(),n(l.esc))},Xt=(t,e,n)=>{e.popup.onclick=()=>{var e=he.innerParams.get(t);e.showConfirmButton||e.showDenyButton||e.showCancelButton||e.showCloseButton||e.timer||e.input||n(l.close)}};let $t=!1;const Gt=t=>{t.popup.onmousedown=()=>{t.container.onmouseup=function(e){t.container.onmouseup=void 0,e.target===t.container&&($t=!0)}}},Qt=t=>{t.container.onmousedown=()=>{t.popup.onmouseup=function(e){t.popup.onmouseup=void 0,e.target!==t.popup&&!t.popup.contains(e.target)||($t=!0)}}},en=(n,o,i)=>{o.container.onclick=e=>{var t=he.innerParams.get(n);$t?$t=!1:e.target===o.container&&c(t.allowOutsideClick)&&i(l.backdrop)}};const tn=(e,t,n)=>{var o=j();J(o),t.timer&&(e.timeout=new dt(()=>{n("timer"),delete e.timeout},t.timer),t.timerProgressBar&&(Z(o),setTimeout(()=>{e.timeout&&e.timeout.running&&ne(t.timer)})))},nn=(e,t)=>{if(!t.toast)return c(t.allowEnterKey)?void(on(e,t)||Rt(0,-1,1)):an()},on=(e,t)=>t.focusDeny&&G(e.denyButton)?(e.denyButton.focus(),!0):t.focusCancel&&G(e.cancelButton)?(e.cancelButton.focus(),!0):!(!t.focusConfirm||!G(e.confirmButton))&&(e.confirmButton.focus(),!0),an=()=>{document.activeElement&&"function"==typeof document.activeElement.blur&&document.activeElement.blur()};const sn=e=>{for(const t in e)e[t]=new WeakMap};e=Object.freeze({hideLoading:Xe,disableLoading:Xe,getInput:function(e){var t=he.innerParams.get(e||this);return(e=he.domCache.get(e||this))?F(e.popup,t.input):null},close:st,closePopup:st,closeModal:st,closeToast:st,enableButtons:function(){lt(this,["confirmButton","denyButton","cancelButton"],!1)},disableButtons:function(){lt(this,["confirmButton","denyButton","cancelButton"],!0)},enableInput:function(){return ut(this.getInput(),!1)},disableInput:function(){return ut(this.getInput(),!0)},showValidationMessage:function(e){const t=he.domCache.get(this);var n=he.innerParams.get(this);V(t.validationMessage,e),t.validationMessage.className=h["validation-message"],n.customClass&&n.customClass.validationMessage&&W(t.validationMessage,n.customClass.validationMessage),Z(t.validationMessage);const o=this.getInput();o&&(o.setAttribute("aria-invalid",!0),o.setAttribute("aria-describedby",h["validation-message"]),R(o),W(o,h.inputerror))},resetValidationMessage:function(){var e=he.domCache.get(this);e.validationMessage&&J(e.validationMessage);const t=this.getInput();t&&(t.removeAttribute("aria-invalid"),t.removeAttribute("aria-describedby"),_(t,h.inputerror))},getProgressSteps:function(){return he.domCache.get(this).progressSteps},_main:function(e,t={}){Ze(Object.assign({},t,e)),Me.currentInstance&&(Me.currentInstance._destroy(),M()&&ot()),Me.currentInstance=this,mt(e=((e,t)=>{const n=gt(e),o=Object.assign({},Re,t,n,e);return o.showClass=Object.assign({},Re.showClass,o.showClass),o.hideClass=Object.assign({},Re.hideClass,o.hideClass),o})(e,t)),Object.freeze(e),Me.timeout&&(Me.timeout.stop(),delete Me.timeout),clearTimeout(Me.restoreFocusTimeout);var s,r,c,t=(e=>{const t={popup:v(),container:b(),actions:L(),confirmButton:P(),denyButton:E(),cancelButton:T(),loader:S(),closeButton:D(),validationMessage:x(),progressSteps:B()};return he.domCache.set(e,t),t})(this);return Oe(this,e),he.innerParams.set(this,e),s=this,r=t,c=e,new Promise(e=>{const t=e=>{s.closePopup({isDismissed:!0,dismiss:e})};var n,o,i,a;it.swalPromiseResolve.set(s,e),r.confirmButton.onclick=()=>(e=>{var t=he.innerParams.get(e);e.disableButtons(),t.input?qt(e,"confirm"):Ft(e,!0)})(s),r.denyButton.onclick=()=>(e=>{var t=he.innerParams.get(e);e.disableButtons(),t.returnInputValueOnDeny?qt(e,"deny"):Nt(e,!1)})(s),r.cancelButton.onclick=()=>((e,t)=>{e.disableButtons(),t(l.cancel)})(s,t),r.closeButton.onclick=()=>t(l.close),n=s,a=r,e=t,he.innerParams.get(n).toast?Xt(n,a,e):(Gt(a),Qt(a),en(n,a,e)),o=s,a=Me,e=c,i=t,a.keydownTarget&&a.keydownHandlerAdded&&(a.keydownTarget.removeEventListener("keydown",a.keydownHandler,{capture:a.keydownListenerCapture}),a.keydownHandlerAdded=!1),e.toast||(a.keydownHandler=e=>_t(o,e,i),a.keydownTarget=e.keydownListenerCapture?window:v(),a.keydownListenerCapture=e.keydownListenerCapture,a.keydownTarget.addEventListener("keydown",a.keydownHandler,{capture:a.keydownListenerCapture}),a.keydownHandlerAdded=!0),e=s,"select"===(a=c).input||"radio"===a.input?jt(e,a):["text","email","number","tel","textarea"].includes(a.input)&&(u(a.inputValue)||p(a.inputValue))&&(De(P()),Dt(e,a)),Bt(c),tn(Me,c,t),nn(r,c),setTimeout(()=>{r.container.scrollTop=0})})},update:function(t){var e=v(),n=he.innerParams.get(this);if(!e||N(e,n.hideClass.popup))return s("You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup.");const o={};Object.keys(t).forEach(e=>{ln.isUpdatableParameter(e)?o[e]=t[e]:s('Invalid parameter to update: "'.concat(e,'". Updatable params are listed here: https://github.com/sweetalert2/sweetalert2/blob/master/src/utils/params.js\n\nIf you think this parameter should be updatable, request it here: https://github.com/sweetalert2/sweetalert2/issues/new?template=02_feature_request.md'))}),n=Object.assign({},n,o),Oe(this,n),he.innerParams.set(this,n),Object.defineProperties(this,{params:{value:Object.assign({},this.params,t),writable:!1,enumerable:!0}})},_destroy:function(){var e=he.domCache.get(this);const t=he.innerParams.get(this);t&&(e.popup&&Me.swalCloseEventFinishedCallback&&(Me.swalCloseEventFinishedCallback(),delete Me.swalCloseEventFinishedCallback),Me.deferDisposalTimer&&(clearTimeout(Me.deferDisposalTimer),delete Me.deferDisposalTimer),"function"==typeof t.didDestroy&&t.didDestroy(),delete this.params,delete Me.keydownHandler,delete Me.keydownTarget,sn(he),sn(it),delete Me.currentInstance)}});let rn;class cn{constructor(...e){"undefined"!=typeof window&&(rn=this,e=Object.freeze(this.constructor.argsToParams(e)),Object.defineProperties(this,{params:{value:e,writable:!1,enumerable:!0,configurable:!0}}),e=this._main(this.params),he.promise.set(this,e))}then(e){const t=he.promise.get(this);return t.then(e)}finally(e){const t=he.promise.get(this);return t.finally(e)}}Object.assign(cn.prototype,e),Object.assign(cn,Je),Object.keys(e).forEach(t=>{cn[t]=function(...e){if(rn)return rn[t](...e)}}),cn.DismissReason=l,cn.version="11.1.5";const ln=cn;return ln.default=ln,ln}),void 0!==this&&this.Sweetalert2&&(this.swal=this.sweetAlert=this.Swal=this.SweetAlert=this.Sweetalert2); \ No newline at end of file diff --git a/modules/blogging/src/Volo.Blogging.Admin.HttpApi.Client/ClientProxies/BlogManagementClientProxy.Generated.cs b/modules/blogging/src/Volo.Blogging.Admin.HttpApi.Client/ClientProxies/BlogManagementClientProxy.Generated.cs index f357628f76..ee0b6b8a97 100644 --- a/modules/blogging/src/Volo.Blogging.Admin.HttpApi.Client/ClientProxies/BlogManagementClientProxy.Generated.cs +++ b/modules/blogging/src/Volo.Blogging.Admin.HttpApi.Client/ClientProxies/BlogManagementClientProxy.Generated.cs @@ -23,27 +23,43 @@ namespace Volo.Blogging.Admin.ClientProxies public virtual async Task GetAsync(Guid id) { - return await RequestAsync(nameof(GetAsync), id); + return await RequestAsync(nameof(GetAsync), new ClientProxyRequestTypeValue + { + { typeof(Guid), id } + }); } public virtual async Task CreateAsync(CreateBlogDto input) { - return await RequestAsync(nameof(CreateAsync), input); + return await RequestAsync(nameof(CreateAsync), new ClientProxyRequestTypeValue + { + { typeof(CreateBlogDto), input } + }); } public virtual async Task UpdateAsync(Guid id, UpdateBlogDto input) { - return await RequestAsync(nameof(UpdateAsync), id, input); + return await RequestAsync(nameof(UpdateAsync), new ClientProxyRequestTypeValue + { + { typeof(Guid), id }, + { typeof(UpdateBlogDto), input } + }); } public virtual async Task DeleteAsync(Guid id) { - await RequestAsync(nameof(DeleteAsync), id); + await RequestAsync(nameof(DeleteAsync), new ClientProxyRequestTypeValue + { + { typeof(Guid), id } + }); } public virtual async Task ClearCacheAsync(Guid id) { - await RequestAsync(nameof(ClearCacheAsync), id); + await RequestAsync(nameof(ClearCacheAsync), new ClientProxyRequestTypeValue + { + { typeof(Guid), id } + }); } } } diff --git a/modules/blogging/src/Volo.Blogging.Application/Volo/Blogging/Files/ImageFormatHelper.cs b/modules/blogging/src/Volo.Blogging.Application/Volo/Blogging/Files/ImageFormatHelper.cs index b69736ab34..9afa5da07f 100644 --- a/modules/blogging/src/Volo.Blogging.Application/Volo/Blogging/Files/ImageFormatHelper.cs +++ b/modules/blogging/src/Volo.Blogging.Application/Volo/Blogging/Files/ImageFormatHelper.cs @@ -1,6 +1,7 @@ using System.Collections.Generic; using System.Drawing.Imaging; using System.IO; +using System.Runtime.InteropServices; namespace Volo.Blogging.Areas.Blog.Helpers { @@ -16,8 +17,14 @@ namespace Volo.Blogging.Areas.Blog.Helpers public static bool IsValidImage(byte[] fileBytes, ICollection validFormats) { - var imageFormat = GetImageRawFormat(fileBytes); - return validFormats.Contains(imageFormat); + // System.Drawing only works on windows => https://docs.microsoft.com/en-us/dotnet/api/system.drawing.image?view=net-5.0#remarks + if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) + { + var imageFormat = GetImageRawFormat(fileBytes); + return validFormats.Contains(imageFormat); + } + + return true; } } } diff --git a/modules/blogging/src/Volo.Blogging.EntityFrameworkCore/Volo/Blogging/EntityFrameworkCore/BloggingDbContextModelBuilderExtensions.cs b/modules/blogging/src/Volo.Blogging.EntityFrameworkCore/Volo/Blogging/EntityFrameworkCore/BloggingDbContextModelBuilderExtensions.cs index 4a0d23a0fb..3386da25a5 100644 --- a/modules/blogging/src/Volo.Blogging.EntityFrameworkCore/Volo/Blogging/EntityFrameworkCore/BloggingDbContextModelBuilderExtensions.cs +++ b/modules/blogging/src/Volo.Blogging.EntityFrameworkCore/Volo/Blogging/EntityFrameworkCore/BloggingDbContextModelBuilderExtensions.cs @@ -1,5 +1,4 @@ -using System; -using JetBrains.Annotations; +using JetBrains.Annotations; using Microsoft.EntityFrameworkCore; using Volo.Abp; using Volo.Abp.EntityFrameworkCore.Modeling; @@ -15,8 +14,7 @@ namespace Volo.Blogging.EntityFrameworkCore public static class BloggingDbContextModelBuilderExtensions { public static void ConfigureBlogging( - [NotNull] this ModelBuilder builder, - Action optionsAction = null) + [NotNull] this ModelBuilder builder) { Check.NotNull(builder, nameof(builder)); @@ -25,16 +23,9 @@ namespace Volo.Blogging.EntityFrameworkCore return; } - var options = new BloggingModelBuilderConfigurationOptions( - BloggingDbProperties.DbTablePrefix, - BloggingDbProperties.DbSchema - ); - - optionsAction?.Invoke(options); - builder.Entity(b => { - b.ToTable(options.TablePrefix + "Users", options.Schema); + b.ToTable(BloggingDbProperties.DbTablePrefix + "Users", BloggingDbProperties.DbSchema); b.ConfigureByConvention(); b.ConfigureAbpUser(); @@ -44,7 +35,7 @@ namespace Volo.Blogging.EntityFrameworkCore builder.Entity(b => { - b.ToTable(options.TablePrefix + "Blogs", options.Schema); + b.ToTable(BloggingDbProperties.DbTablePrefix + "Blogs", BloggingDbProperties.DbSchema); b.ConfigureByConvention(); @@ -57,7 +48,7 @@ namespace Volo.Blogging.EntityFrameworkCore builder.Entity(b => { - b.ToTable(options.TablePrefix + "Posts", options.Schema); + b.ToTable(BloggingDbProperties.DbTablePrefix + "Posts", BloggingDbProperties.DbSchema); b.ConfigureByConvention(); @@ -77,7 +68,7 @@ namespace Volo.Blogging.EntityFrameworkCore builder.Entity(b => { - b.ToTable(options.TablePrefix + "Comments", options.Schema); + b.ToTable(BloggingDbProperties.DbTablePrefix + "Comments", BloggingDbProperties.DbSchema); b.ConfigureByConvention(); @@ -93,7 +84,7 @@ namespace Volo.Blogging.EntityFrameworkCore builder.Entity(b => { - b.ToTable(options.TablePrefix + "Tags", options.Schema); + b.ToTable(BloggingDbProperties.DbTablePrefix + "Tags", BloggingDbProperties.DbSchema); b.ConfigureByConvention(); @@ -108,7 +99,7 @@ namespace Volo.Blogging.EntityFrameworkCore builder.Entity(b => { - b.ToTable(options.TablePrefix + "PostTags", options.Schema); + b.ToTable(BloggingDbProperties.DbTablePrefix + "PostTags", BloggingDbProperties.DbSchema); b.ConfigureByConvention(); diff --git a/modules/blogging/src/Volo.Blogging.EntityFrameworkCore/Volo/Blogging/EntityFrameworkCore/BloggingModelBuilderConfigurationOptions.cs b/modules/blogging/src/Volo.Blogging.EntityFrameworkCore/Volo/Blogging/EntityFrameworkCore/BloggingModelBuilderConfigurationOptions.cs deleted file mode 100644 index af888ab402..0000000000 --- a/modules/blogging/src/Volo.Blogging.EntityFrameworkCore/Volo/Blogging/EntityFrameworkCore/BloggingModelBuilderConfigurationOptions.cs +++ /dev/null @@ -1,15 +0,0 @@ -using JetBrains.Annotations; -using Volo.Abp.EntityFrameworkCore.Modeling; - -namespace Volo.Blogging.EntityFrameworkCore -{ - public class BloggingModelBuilderConfigurationOptions : AbpModelBuilderConfigurationOptions - { - public BloggingModelBuilderConfigurationOptions( - [NotNull] string tablePrefix = "", - [CanBeNull] string schema = null) - : base(tablePrefix, schema) - { - } - } -} \ No newline at end of file diff --git a/modules/blogging/src/Volo.Blogging.HttpApi.Client/ClientProxies/BlogFilesClientProxy.Generated.cs b/modules/blogging/src/Volo.Blogging.HttpApi.Client/ClientProxies/BlogFilesClientProxy.Generated.cs index de480f91c8..c3188daf7e 100644 --- a/modules/blogging/src/Volo.Blogging.HttpApi.Client/ClientProxies/BlogFilesClientProxy.Generated.cs +++ b/modules/blogging/src/Volo.Blogging.HttpApi.Client/ClientProxies/BlogFilesClientProxy.Generated.cs @@ -17,12 +17,18 @@ namespace Volo.Blogging.ClientProxies { public virtual async Task GetAsync(string name) { - return await RequestAsync(nameof(GetAsync), name); + return await RequestAsync(nameof(GetAsync), new ClientProxyRequestTypeValue + { + { typeof(string), name } + }); } public virtual async Task CreateAsync(FileUploadInputDto input) { - return await RequestAsync(nameof(CreateAsync), input); + return await RequestAsync(nameof(CreateAsync), new ClientProxyRequestTypeValue + { + { typeof(FileUploadInputDto), input } + }); } } } diff --git a/modules/blogging/src/Volo.Blogging.HttpApi.Client/ClientProxies/BlogsClientProxy.Generated.cs b/modules/blogging/src/Volo.Blogging.HttpApi.Client/ClientProxies/BlogsClientProxy.Generated.cs index 16af93e711..66b39a1353 100644 --- a/modules/blogging/src/Volo.Blogging.HttpApi.Client/ClientProxies/BlogsClientProxy.Generated.cs +++ b/modules/blogging/src/Volo.Blogging.HttpApi.Client/ClientProxies/BlogsClientProxy.Generated.cs @@ -23,12 +23,18 @@ namespace Volo.Blogging.ClientProxies public virtual async Task GetByShortNameAsync(string shortName) { - return await RequestAsync(nameof(GetByShortNameAsync), shortName); + return await RequestAsync(nameof(GetByShortNameAsync), new ClientProxyRequestTypeValue + { + { typeof(string), shortName } + }); } public virtual async Task GetAsync(Guid id) { - return await RequestAsync(nameof(GetAsync), id); + return await RequestAsync(nameof(GetAsync), new ClientProxyRequestTypeValue + { + { typeof(Guid), id } + }); } } } diff --git a/modules/blogging/src/Volo.Blogging.HttpApi.Client/ClientProxies/CommentsClientProxy.Generated.cs b/modules/blogging/src/Volo.Blogging.HttpApi.Client/ClientProxies/CommentsClientProxy.Generated.cs index 898e015013..f08ea4afb3 100644 --- a/modules/blogging/src/Volo.Blogging.HttpApi.Client/ClientProxies/CommentsClientProxy.Generated.cs +++ b/modules/blogging/src/Volo.Blogging.HttpApi.Client/ClientProxies/CommentsClientProxy.Generated.cs @@ -19,22 +19,35 @@ namespace Volo.Blogging.ClientProxies { public virtual async Task> GetHierarchicalListOfPostAsync(Guid postId) { - return await RequestAsync>(nameof(GetHierarchicalListOfPostAsync), postId); + return await RequestAsync>(nameof(GetHierarchicalListOfPostAsync), new ClientProxyRequestTypeValue + { + { typeof(Guid), postId } + }); } public virtual async Task CreateAsync(CreateCommentDto input) { - return await RequestAsync(nameof(CreateAsync), input); + return await RequestAsync(nameof(CreateAsync), new ClientProxyRequestTypeValue + { + { typeof(CreateCommentDto), input } + }); } public virtual async Task UpdateAsync(Guid id, UpdateCommentDto input) { - return await RequestAsync(nameof(UpdateAsync), id, input); + return await RequestAsync(nameof(UpdateAsync), new ClientProxyRequestTypeValue + { + { typeof(Guid), id }, + { typeof(UpdateCommentDto), input } + }); } public virtual async Task DeleteAsync(Guid id) { - await RequestAsync(nameof(DeleteAsync), id); + await RequestAsync(nameof(DeleteAsync), new ClientProxyRequestTypeValue + { + { typeof(Guid), id } + }); } } } diff --git a/modules/blogging/src/Volo.Blogging.HttpApi.Client/ClientProxies/PostsClientProxy.Generated.cs b/modules/blogging/src/Volo.Blogging.HttpApi.Client/ClientProxies/PostsClientProxy.Generated.cs index be12464b6e..ac586dbfa4 100644 --- a/modules/blogging/src/Volo.Blogging.HttpApi.Client/ClientProxies/PostsClientProxy.Generated.cs +++ b/modules/blogging/src/Volo.Blogging.HttpApi.Client/ClientProxies/PostsClientProxy.Generated.cs @@ -17,37 +17,60 @@ namespace Volo.Blogging.ClientProxies { public virtual async Task> GetListByBlogIdAndTagNameAsync(Guid blogId, string tagName) { - return await RequestAsync>(nameof(GetListByBlogIdAndTagNameAsync), blogId, tagName); + return await RequestAsync>(nameof(GetListByBlogIdAndTagNameAsync), new ClientProxyRequestTypeValue + { + { typeof(Guid), blogId }, + { typeof(string), tagName } + }); } public virtual async Task> GetTimeOrderedListAsync(Guid blogId) { - return await RequestAsync>(nameof(GetTimeOrderedListAsync), blogId); + return await RequestAsync>(nameof(GetTimeOrderedListAsync), new ClientProxyRequestTypeValue + { + { typeof(Guid), blogId } + }); } public virtual async Task GetForReadingAsync(GetPostInput input) { - return await RequestAsync(nameof(GetForReadingAsync), input); + return await RequestAsync(nameof(GetForReadingAsync), new ClientProxyRequestTypeValue + { + { typeof(GetPostInput), input } + }); } public virtual async Task GetAsync(Guid id) { - return await RequestAsync(nameof(GetAsync), id); + return await RequestAsync(nameof(GetAsync), new ClientProxyRequestTypeValue + { + { typeof(Guid), id } + }); } public virtual async Task CreateAsync(CreatePostDto input) { - return await RequestAsync(nameof(CreateAsync), input); + return await RequestAsync(nameof(CreateAsync), new ClientProxyRequestTypeValue + { + { typeof(CreatePostDto), input } + }); } public virtual async Task UpdateAsync(Guid id, UpdatePostDto input) { - return await RequestAsync(nameof(UpdateAsync), id, input); + return await RequestAsync(nameof(UpdateAsync), new ClientProxyRequestTypeValue + { + { typeof(Guid), id }, + { typeof(UpdatePostDto), input } + }); } public virtual async Task DeleteAsync(Guid id) { - await RequestAsync(nameof(DeleteAsync), id); + await RequestAsync(nameof(DeleteAsync), new ClientProxyRequestTypeValue + { + { typeof(Guid), id } + }); } } } diff --git a/modules/blogging/src/Volo.Blogging.HttpApi.Client/ClientProxies/TagsClientProxy.Generated.cs b/modules/blogging/src/Volo.Blogging.HttpApi.Client/ClientProxies/TagsClientProxy.Generated.cs index 42d0ee3850..bcc924deb5 100644 --- a/modules/blogging/src/Volo.Blogging.HttpApi.Client/ClientProxies/TagsClientProxy.Generated.cs +++ b/modules/blogging/src/Volo.Blogging.HttpApi.Client/ClientProxies/TagsClientProxy.Generated.cs @@ -19,7 +19,11 @@ namespace Volo.Blogging.ClientProxies { public virtual async Task> GetPopularTagsAsync(Guid blogId, GetPopularTagsInput input) { - return await RequestAsync>(nameof(GetPopularTagsAsync), blogId, input); + return await RequestAsync>(nameof(GetPopularTagsAsync), new ClientProxyRequestTypeValue + { + { typeof(Guid), blogId }, + { typeof(GetPopularTagsInput), input } + }); } } } diff --git a/modules/blogging/src/Volo.Blogging.MongoDB/Volo/Blogging/MongoDB/BloggingMongoDbContextExtensions.cs b/modules/blogging/src/Volo.Blogging.MongoDB/Volo/Blogging/MongoDB/BloggingMongoDbContextExtensions.cs index 3defbc1287..b04f0a74fc 100644 --- a/modules/blogging/src/Volo.Blogging.MongoDB/Volo/Blogging/MongoDB/BloggingMongoDbContextExtensions.cs +++ b/modules/blogging/src/Volo.Blogging.MongoDB/Volo/Blogging/MongoDB/BloggingMongoDbContextExtensions.cs @@ -1,5 +1,4 @@ -using System; -using Volo.Abp; +using Volo.Abp; using Volo.Abp.MongoDB; using Volo.Blogging.Blogs; using Volo.Blogging.Comments; @@ -11,40 +10,33 @@ namespace Volo.Blogging.MongoDB public static class BloggingMongoDbContextExtensions { public static void ConfigureBlogging( - this IMongoModelBuilder builder, - Action optionsAction = null) + this IMongoModelBuilder builder) { Check.NotNull(builder, nameof(builder)); - var options = new BloggingMongoModelBuilderConfigurationOptions( - BloggingDbProperties.DbTablePrefix - ); - - optionsAction?.Invoke(options); - builder.Entity(b => { - b.CollectionName = options.CollectionPrefix + "Users"; + b.CollectionName = BloggingDbProperties.DbTablePrefix + "Users"; }); builder.Entity(b => { - b.CollectionName = options.CollectionPrefix + "Blogs"; + b.CollectionName = BloggingDbProperties.DbTablePrefix + "Blogs"; }); builder.Entity(b => { - b.CollectionName = options.CollectionPrefix + "Posts"; + b.CollectionName = BloggingDbProperties.DbTablePrefix + "Posts"; }); builder.Entity(b => { - b.CollectionName = options.CollectionPrefix + "Tags"; + b.CollectionName = BloggingDbProperties.DbTablePrefix + "Tags"; }); builder.Entity(b => { - b.CollectionName = options.CollectionPrefix + "Comments"; + b.CollectionName = BloggingDbProperties.DbTablePrefix + "Comments"; }); } } diff --git a/modules/blogging/src/Volo.Blogging.MongoDB/Volo/Blogging/MongoDB/BloggingMongoModelBuilderConfigurationOptions.cs b/modules/blogging/src/Volo.Blogging.MongoDB/Volo/Blogging/MongoDB/BloggingMongoModelBuilderConfigurationOptions.cs deleted file mode 100644 index d2fb415166..0000000000 --- a/modules/blogging/src/Volo.Blogging.MongoDB/Volo/Blogging/MongoDB/BloggingMongoModelBuilderConfigurationOptions.cs +++ /dev/null @@ -1,14 +0,0 @@ -using JetBrains.Annotations; -using Volo.Abp.MongoDB; - -namespace Volo.Blogging.MongoDB -{ - public class BloggingMongoModelBuilderConfigurationOptions : AbpMongoModelBuilderConfigurationOptions - { - public BloggingMongoModelBuilderConfigurationOptions( - [NotNull] string collectionPrefix = "") - : base(collectionPrefix) - { - } - } -} diff --git a/modules/cms-kit/host/Volo.CmsKit.IdentityServer/CmsKitIdentityServerModule.cs b/modules/cms-kit/host/Volo.CmsKit.IdentityServer/CmsKitIdentityServerModule.cs index 89a0d57921..d40541188d 100644 --- a/modules/cms-kit/host/Volo.CmsKit.IdentityServer/CmsKitIdentityServerModule.cs +++ b/modules/cms-kit/host/Volo.CmsKit.IdentityServer/CmsKitIdentityServerModule.cs @@ -49,6 +49,7 @@ namespace Volo.CmsKit [DependsOn( typeof(AbpAccountWebIdentityServerModule), typeof(AbpAccountApplicationModule), + typeof(AbpAccountHttpApiModule), typeof(AbpAspNetCoreMvcUiMultiTenancyModule), typeof(AbpAspNetCoreMvcModule), typeof(AbpAspNetCoreMvcUiBasicThemeModule), diff --git a/modules/cms-kit/host/Volo.CmsKit.IdentityServer/Volo.CmsKit.IdentityServer.csproj b/modules/cms-kit/host/Volo.CmsKit.IdentityServer/Volo.CmsKit.IdentityServer.csproj index 25c253de40..48871c910a 100644 --- a/modules/cms-kit/host/Volo.CmsKit.IdentityServer/Volo.CmsKit.IdentityServer.csproj +++ b/modules/cms-kit/host/Volo.CmsKit.IdentityServer/Volo.CmsKit.IdentityServer.csproj @@ -23,6 +23,7 @@ + diff --git a/modules/cms-kit/host/Volo.CmsKit.IdentityServer/wwwroot/libs/sweetalert2/sweetalert2.all.js b/modules/cms-kit/host/Volo.CmsKit.IdentityServer/wwwroot/libs/sweetalert2/sweetalert2.all.js new file mode 100644 index 0000000000..8cbddafe42 --- /dev/null +++ b/modules/cms-kit/host/Volo.CmsKit.IdentityServer/wwwroot/libs/sweetalert2/sweetalert2.all.js @@ -0,0 +1,3123 @@ +/*! +* sweetalert2 v11.1.5 +* Released under the MIT License. +*/ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : + typeof define === 'function' && define.amd ? define(factory) : + (global = global || self, global.Sweetalert2 = factory()); +}(this, function () { 'use strict'; + + const DismissReason = Object.freeze({ + cancel: 'cancel', + backdrop: 'backdrop', + close: 'close', + esc: 'esc', + timer: 'timer' + }); + + const consolePrefix = 'SweetAlert2:'; + /** + * Filter the unique values into a new array + * @param arr + */ + + const uniqueArray = arr => { + const result = []; + + for (let i = 0; i < arr.length; i++) { + if (result.indexOf(arr[i]) === -1) { + result.push(arr[i]); + } + } + + return result; + }; + /** + * Capitalize the first letter of a string + * @param str + */ + + const capitalizeFirstLetter = str => str.charAt(0).toUpperCase() + str.slice(1); + /** + * Convert NodeList to Array + * @param nodeList + */ + + const toArray = nodeList => Array.prototype.slice.call(nodeList); + /** + * Standardise console warnings + * @param message + */ + + const warn = message => { + console.warn("".concat(consolePrefix, " ").concat(typeof message === 'object' ? message.join(' ') : message)); + }; + /** + * Standardise console errors + * @param message + */ + + const error = message => { + console.error("".concat(consolePrefix, " ").concat(message)); + }; + /** + * Private global state for `warnOnce` + * @type {Array} + * @private + */ + + const previousWarnOnceMessages = []; + /** + * Show a console warning, but only if it hasn't already been shown + * @param message + */ + + const warnOnce = message => { + if (!previousWarnOnceMessages.includes(message)) { + previousWarnOnceMessages.push(message); + warn(message); + } + }; + /** + * Show a one-time console warning about deprecated params/methods + */ + + const warnAboutDeprecation = (deprecatedParam, useInstead) => { + warnOnce("\"".concat(deprecatedParam, "\" is deprecated and will be removed in the next major release. Please use \"").concat(useInstead, "\" instead.")); + }; + /** + * If `arg` is a function, call it (with no arguments or context) and return the result. + * Otherwise, just pass the value through + * @param arg + */ + + const callIfFunction = arg => typeof arg === 'function' ? arg() : arg; + const hasToPromiseFn = arg => arg && typeof arg.toPromise === 'function'; + const asPromise = arg => hasToPromiseFn(arg) ? arg.toPromise() : Promise.resolve(arg); + const isPromise = arg => arg && Promise.resolve(arg) === arg; + + const isJqueryElement = elem => typeof elem === 'object' && elem.jquery; + + const isElement = elem => elem instanceof Element || isJqueryElement(elem); + + const argsToParams = args => { + const params = {}; + + if (typeof args[0] === 'object' && !isElement(args[0])) { + Object.assign(params, args[0]); + } else { + ['title', 'html', 'icon'].forEach((name, index) => { + const arg = args[index]; + + if (typeof arg === 'string' || isElement(arg)) { + params[name] = arg; + } else if (arg !== undefined) { + error("Unexpected type of ".concat(name, "! Expected \"string\" or \"Element\", got ").concat(typeof arg)); + } + }); + } + + return params; + }; + + const swalPrefix = 'swal2-'; + const prefix = items => { + const result = {}; + + for (const i in items) { + result[items[i]] = swalPrefix + items[i]; + } + + return result; + }; + const swalClasses = prefix(['container', 'shown', 'height-auto', 'iosfix', 'popup', 'modal', 'no-backdrop', 'no-transition', 'toast', 'toast-shown', 'show', 'hide', 'close', 'title', 'html-container', 'actions', 'confirm', 'deny', 'cancel', 'default-outline', 'footer', 'icon', 'icon-content', 'image', 'input', 'file', 'range', 'select', 'radio', 'checkbox', 'label', 'textarea', 'inputerror', 'input-label', 'validation-message', 'progress-steps', 'active-progress-step', 'progress-step', 'progress-step-line', 'loader', 'loading', 'styled', 'top', 'top-start', 'top-end', 'top-left', 'top-right', 'center', 'center-start', 'center-end', 'center-left', 'center-right', 'bottom', 'bottom-start', 'bottom-end', 'bottom-left', 'bottom-right', 'grow-row', 'grow-column', 'grow-fullscreen', 'rtl', 'timer-progress-bar', 'timer-progress-bar-container', 'scrollbar-measure', 'icon-success', 'icon-warning', 'icon-info', 'icon-question', 'icon-error']); + const iconTypes = prefix(['success', 'warning', 'info', 'question', 'error']); + + const getContainer = () => document.body.querySelector(".".concat(swalClasses.container)); + const elementBySelector = selectorString => { + const container = getContainer(); + return container ? container.querySelector(selectorString) : null; + }; + + const elementByClass = className => { + return elementBySelector(".".concat(className)); + }; + + const getPopup = () => elementByClass(swalClasses.popup); + const getIcon = () => elementByClass(swalClasses.icon); + const getTitle = () => elementByClass(swalClasses.title); + const getHtmlContainer = () => elementByClass(swalClasses['html-container']); + const getImage = () => elementByClass(swalClasses.image); + const getProgressSteps = () => elementByClass(swalClasses['progress-steps']); + const getValidationMessage = () => elementByClass(swalClasses['validation-message']); + const getConfirmButton = () => elementBySelector(".".concat(swalClasses.actions, " .").concat(swalClasses.confirm)); + const getDenyButton = () => elementBySelector(".".concat(swalClasses.actions, " .").concat(swalClasses.deny)); + const getInputLabel = () => elementByClass(swalClasses['input-label']); + const getLoader = () => elementBySelector(".".concat(swalClasses.loader)); + const getCancelButton = () => elementBySelector(".".concat(swalClasses.actions, " .").concat(swalClasses.cancel)); + const getActions = () => elementByClass(swalClasses.actions); + const getFooter = () => elementByClass(swalClasses.footer); + const getTimerProgressBar = () => elementByClass(swalClasses['timer-progress-bar']); + const getCloseButton = () => elementByClass(swalClasses.close); // https://github.com/jkup/focusable/blob/master/index.js + + const focusable = "\n a[href],\n area[href],\n input:not([disabled]),\n select:not([disabled]),\n textarea:not([disabled]),\n button:not([disabled]),\n iframe,\n object,\n embed,\n [tabindex=\"0\"],\n [contenteditable],\n audio[controls],\n video[controls],\n summary\n"; + const getFocusableElements = () => { + const focusableElementsWithTabindex = toArray(getPopup().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')) // sort according to tabindex + .sort((a, b) => { + a = parseInt(a.getAttribute('tabindex')); + b = parseInt(b.getAttribute('tabindex')); + + if (a > b) { + return 1; + } else if (a < b) { + return -1; + } + + return 0; + }); + const otherFocusableElements = toArray(getPopup().querySelectorAll(focusable)).filter(el => el.getAttribute('tabindex') !== '-1'); + return uniqueArray(focusableElementsWithTabindex.concat(otherFocusableElements)).filter(el => isVisible(el)); + }; + const isModal = () => { + return !isToast() && !document.body.classList.contains(swalClasses['no-backdrop']); + }; + const isToast = () => { + return document.body.classList.contains(swalClasses['toast-shown']); + }; + const isLoading = () => { + return getPopup().hasAttribute('data-loading'); + }; + + const states = { + previousBodyPadding: null + }; + const setInnerHtml = (elem, html) => { + // #1926 + elem.textContent = ''; + + if (html) { + const parser = new DOMParser(); + const parsed = parser.parseFromString(html, "text/html"); + toArray(parsed.querySelector('head').childNodes).forEach(child => { + elem.appendChild(child); + }); + toArray(parsed.querySelector('body').childNodes).forEach(child => { + elem.appendChild(child); + }); + } + }; + const hasClass = (elem, className) => { + if (!className) { + return false; + } + + const classList = className.split(/\s+/); + + for (let i = 0; i < classList.length; i++) { + if (!elem.classList.contains(classList[i])) { + return false; + } + } + + return true; + }; + + const removeCustomClasses = (elem, params) => { + toArray(elem.classList).forEach(className => { + if (!Object.values(swalClasses).includes(className) && !Object.values(iconTypes).includes(className) && !Object.values(params.showClass).includes(className)) { + elem.classList.remove(className); + } + }); + }; + + const applyCustomClass = (elem, params, className) => { + removeCustomClasses(elem, params); + + if (params.customClass && params.customClass[className]) { + if (typeof params.customClass[className] !== 'string' && !params.customClass[className].forEach) { + return warn("Invalid type of customClass.".concat(className, "! Expected string or iterable object, got \"").concat(typeof params.customClass[className], "\"")); + } + + addClass(elem, params.customClass[className]); + } + }; + const getInput = (popup, inputType) => { + if (!inputType) { + return null; + } + + switch (inputType) { + case 'select': + case 'textarea': + case 'file': + return getChildByClass(popup, swalClasses[inputType]); + + case 'checkbox': + return popup.querySelector(".".concat(swalClasses.checkbox, " input")); + + case 'radio': + return popup.querySelector(".".concat(swalClasses.radio, " input:checked")) || popup.querySelector(".".concat(swalClasses.radio, " input:first-child")); + + case 'range': + return popup.querySelector(".".concat(swalClasses.range, " input")); + + default: + return getChildByClass(popup, swalClasses.input); + } + }; + const focusInput = input => { + input.focus(); // place cursor at end of text in text input + + if (input.type !== 'file') { + // http://stackoverflow.com/a/2345915 + const val = input.value; + input.value = ''; + input.value = val; + } + }; + const toggleClass = (target, classList, condition) => { + if (!target || !classList) { + return; + } + + if (typeof classList === 'string') { + classList = classList.split(/\s+/).filter(Boolean); + } + + classList.forEach(className => { + if (target.forEach) { + target.forEach(elem => { + condition ? elem.classList.add(className) : elem.classList.remove(className); + }); + } else { + condition ? target.classList.add(className) : target.classList.remove(className); + } + }); + }; + const addClass = (target, classList) => { + toggleClass(target, classList, true); + }; + const removeClass = (target, classList) => { + toggleClass(target, classList, false); + }; + const getChildByClass = (elem, className) => { + for (let i = 0; i < elem.childNodes.length; i++) { + if (hasClass(elem.childNodes[i], className)) { + return elem.childNodes[i]; + } + } + }; + const applyNumericalStyle = (elem, property, value) => { + if (value === "".concat(parseInt(value))) { + value = parseInt(value); + } + + if (value || parseInt(value) === 0) { + elem.style[property] = typeof value === 'number' ? "".concat(value, "px") : value; + } else { + elem.style.removeProperty(property); + } + }; + const show = (elem, display = 'flex') => { + elem.style.display = display; + }; + const hide = elem => { + elem.style.display = 'none'; + }; + const setStyle = (parent, selector, property, value) => { + const el = parent.querySelector(selector); + + if (el) { + el.style[property] = value; + } + }; + const toggle = (elem, condition, display) => { + condition ? show(elem, display) : hide(elem); + }; // borrowed from jquery $(elem).is(':visible') implementation + + const isVisible = elem => !!(elem && (elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length)); + const allButtonsAreHidden = () => !isVisible(getConfirmButton()) && !isVisible(getDenyButton()) && !isVisible(getCancelButton()); + const isScrollable = elem => !!(elem.scrollHeight > elem.clientHeight); // borrowed from https://stackoverflow.com/a/46352119 + + const hasCssAnimation = elem => { + const style = window.getComputedStyle(elem); + const animDuration = parseFloat(style.getPropertyValue('animation-duration') || '0'); + const transDuration = parseFloat(style.getPropertyValue('transition-duration') || '0'); + return animDuration > 0 || transDuration > 0; + }; + const animateTimerProgressBar = (timer, reset = false) => { + const timerProgressBar = getTimerProgressBar(); + + if (isVisible(timerProgressBar)) { + if (reset) { + timerProgressBar.style.transition = 'none'; + timerProgressBar.style.width = '100%'; + } + + setTimeout(() => { + timerProgressBar.style.transition = "width ".concat(timer / 1000, "s linear"); + timerProgressBar.style.width = '0%'; + }, 10); + } + }; + const stopTimerProgressBar = () => { + const timerProgressBar = getTimerProgressBar(); + const timerProgressBarWidth = parseInt(window.getComputedStyle(timerProgressBar).width); + timerProgressBar.style.removeProperty('transition'); + timerProgressBar.style.width = '100%'; + const timerProgressBarFullWidth = parseInt(window.getComputedStyle(timerProgressBar).width); + const timerProgressBarPercent = parseInt(timerProgressBarWidth / timerProgressBarFullWidth * 100); + timerProgressBar.style.removeProperty('transition'); + timerProgressBar.style.width = "".concat(timerProgressBarPercent, "%"); + }; + + // Detect Node env + const isNodeEnv = () => typeof window === 'undefined' || typeof document === 'undefined'; + + const sweetHTML = "\n
          \n \n
            \n
            \n \n

            \n
            \n \n \n
            \n \n \n
            \n \n
            \n \n \n
            \n
            \n
            \n \n \n \n
            \n
            \n
            \n
            \n
            \n
            \n").replace(/(^|\n)\s*/g, ''); + + const resetOldContainer = () => { + const oldContainer = getContainer(); + + if (!oldContainer) { + return false; + } + + oldContainer.remove(); + removeClass([document.documentElement, document.body], [swalClasses['no-backdrop'], swalClasses['toast-shown'], swalClasses['has-column']]); + return true; + }; + + const resetValidationMessage = () => { + if (Swal.isVisible()) { + Swal.resetValidationMessage(); + } + }; + + const addInputChangeListeners = () => { + const popup = getPopup(); + const input = getChildByClass(popup, swalClasses.input); + const file = getChildByClass(popup, swalClasses.file); + const range = popup.querySelector(".".concat(swalClasses.range, " input")); + const rangeOutput = popup.querySelector(".".concat(swalClasses.range, " output")); + const select = getChildByClass(popup, swalClasses.select); + const checkbox = popup.querySelector(".".concat(swalClasses.checkbox, " input")); + const textarea = getChildByClass(popup, swalClasses.textarea); + input.oninput = resetValidationMessage; + file.onchange = resetValidationMessage; + select.onchange = resetValidationMessage; + checkbox.onchange = resetValidationMessage; + textarea.oninput = resetValidationMessage; + + range.oninput = () => { + resetValidationMessage(); + rangeOutput.value = range.value; + }; + + range.onchange = () => { + resetValidationMessage(); + range.nextSibling.value = range.value; + }; + }; + + const getTarget = target => typeof target === 'string' ? document.querySelector(target) : target; + + const setupAccessibility = params => { + const popup = getPopup(); + popup.setAttribute('role', params.toast ? 'alert' : 'dialog'); + popup.setAttribute('aria-live', params.toast ? 'polite' : 'assertive'); + + if (!params.toast) { + popup.setAttribute('aria-modal', 'true'); + } + }; + + const setupRTL = targetElement => { + if (window.getComputedStyle(targetElement).direction === 'rtl') { + addClass(getContainer(), swalClasses.rtl); + } + }; + /* + * Add modal + backdrop to DOM + */ + + + const init = params => { + // Clean up the old popup container if it exists + const oldContainerExisted = resetOldContainer(); + /* istanbul ignore if */ + + if (isNodeEnv()) { + error('SweetAlert2 requires document to initialize'); + return; + } + + const container = document.createElement('div'); + container.className = swalClasses.container; + + if (oldContainerExisted) { + addClass(container, swalClasses['no-transition']); + } + + setInnerHtml(container, sweetHTML); + const targetElement = getTarget(params.target); + targetElement.appendChild(container); + setupAccessibility(params); + setupRTL(targetElement); + addInputChangeListeners(); + }; + + const parseHtmlToContainer = (param, target) => { + // DOM element + if (param instanceof HTMLElement) { + target.appendChild(param); // Object + } else if (typeof param === 'object') { + handleObject(param, target); // Plain string + } else if (param) { + setInnerHtml(target, param); + } + }; + + const handleObject = (param, target) => { + // JQuery element(s) + if (param.jquery) { + handleJqueryElem(target, param); // For other objects use their string representation + } else { + setInnerHtml(target, param.toString()); + } + }; + + const handleJqueryElem = (target, elem) => { + target.textContent = ''; + + if (0 in elem) { + for (let i = 0; (i in elem); i++) { + target.appendChild(elem[i].cloneNode(true)); + } + } else { + target.appendChild(elem.cloneNode(true)); + } + }; + + const animationEndEvent = (() => { + // Prevent run in Node env + + /* istanbul ignore if */ + if (isNodeEnv()) { + return false; + } + + const testEl = document.createElement('div'); + const transEndEventNames = { + WebkitAnimation: 'webkitAnimationEnd', + OAnimation: 'oAnimationEnd oanimationend', + animation: 'animationend' + }; + + for (const i in transEndEventNames) { + if (Object.prototype.hasOwnProperty.call(transEndEventNames, i) && typeof testEl.style[i] !== 'undefined') { + return transEndEventNames[i]; + } + } + + return false; + })(); + + // https://github.com/twbs/bootstrap/blob/master/js/src/modal.js + + const measureScrollbar = () => { + const scrollDiv = document.createElement('div'); + scrollDiv.className = swalClasses['scrollbar-measure']; + document.body.appendChild(scrollDiv); + const scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth; + document.body.removeChild(scrollDiv); + return scrollbarWidth; + }; + + const renderActions = (instance, params) => { + const actions = getActions(); + const loader = getLoader(); + const confirmButton = getConfirmButton(); + const denyButton = getDenyButton(); + const cancelButton = getCancelButton(); // Actions (buttons) wrapper + + if (!params.showConfirmButton && !params.showDenyButton && !params.showCancelButton) { + hide(actions); + } else { + show(actions); + } // Custom class + + + applyCustomClass(actions, params, 'actions'); // Render buttons + + renderButton(confirmButton, 'confirm', params); + renderButton(denyButton, 'deny', params); + renderButton(cancelButton, 'cancel', params); + handleButtonsStyling(confirmButton, denyButton, cancelButton, params); + + if (params.reverseButtons) { + actions.insertBefore(cancelButton, loader); + actions.insertBefore(denyButton, loader); + actions.insertBefore(confirmButton, loader); + } // Loader + + + setInnerHtml(loader, params.loaderHtml); + applyCustomClass(loader, params, 'loader'); + }; + + function handleButtonsStyling(confirmButton, denyButton, cancelButton, params) { + if (!params.buttonsStyling) { + return removeClass([confirmButton, denyButton, cancelButton], swalClasses.styled); + } + + addClass([confirmButton, denyButton, cancelButton], swalClasses.styled); // Buttons background colors + + if (params.confirmButtonColor) { + confirmButton.style.backgroundColor = params.confirmButtonColor; + addClass(confirmButton, swalClasses['default-outline']); + } + + if (params.denyButtonColor) { + denyButton.style.backgroundColor = params.denyButtonColor; + addClass(denyButton, swalClasses['default-outline']); + } + + if (params.cancelButtonColor) { + cancelButton.style.backgroundColor = params.cancelButtonColor; + addClass(cancelButton, swalClasses['default-outline']); + } + } + + function renderButton(button, buttonType, params) { + toggle(button, params["show".concat(capitalizeFirstLetter(buttonType), "Button")], 'inline-block'); + setInnerHtml(button, params["".concat(buttonType, "ButtonText")]); // Set caption text + + button.setAttribute('aria-label', params["".concat(buttonType, "ButtonAriaLabel")]); // ARIA label + // Add buttons custom classes + + button.className = swalClasses[buttonType]; + applyCustomClass(button, params, "".concat(buttonType, "Button")); + addClass(button, params["".concat(buttonType, "ButtonClass")]); + } + + function handleBackdropParam(container, backdrop) { + if (typeof backdrop === 'string') { + container.style.background = backdrop; + } else if (!backdrop) { + addClass([document.documentElement, document.body], swalClasses['no-backdrop']); + } + } + + function handlePositionParam(container, position) { + if (position in swalClasses) { + addClass(container, swalClasses[position]); + } else { + warn('The "position" parameter is not valid, defaulting to "center"'); + addClass(container, swalClasses.center); + } + } + + function handleGrowParam(container, grow) { + if (grow && typeof grow === 'string') { + const growClass = "grow-".concat(grow); + + if (growClass in swalClasses) { + addClass(container, swalClasses[growClass]); + } + } + } + + const renderContainer = (instance, params) => { + const container = getContainer(); + + if (!container) { + return; + } + + handleBackdropParam(container, params.backdrop); + handlePositionParam(container, params.position); + handleGrowParam(container, params.grow); // Custom class + + applyCustomClass(container, params, 'container'); + }; + + /** + * This module containts `WeakMap`s for each effectively-"private property" that a `Swal` has. + * For example, to set the private property "foo" of `this` to "bar", you can `privateProps.foo.set(this, 'bar')` + * This is the approach that Babel will probably take to implement private methods/fields + * https://github.com/tc39/proposal-private-methods + * https://github.com/babel/babel/pull/7555 + * Once we have the changes from that PR in Babel, and our core class fits reasonable in *one module* + * then we can use that language feature. + */ + var privateProps = { + promise: new WeakMap(), + innerParams: new WeakMap(), + domCache: new WeakMap() + }; + + const inputTypes = ['input', 'file', 'range', 'select', 'radio', 'checkbox', 'textarea']; + const renderInput = (instance, params) => { + const popup = getPopup(); + const innerParams = privateProps.innerParams.get(instance); + const rerender = !innerParams || params.input !== innerParams.input; + inputTypes.forEach(inputType => { + const inputClass = swalClasses[inputType]; + const inputContainer = getChildByClass(popup, inputClass); // set attributes + + setAttributes(inputType, params.inputAttributes); // set class + + inputContainer.className = inputClass; + + if (rerender) { + hide(inputContainer); + } + }); + + if (params.input) { + if (rerender) { + showInput(params); + } // set custom class + + + setCustomClass(params); + } + }; + + const showInput = params => { + if (!renderInputType[params.input]) { + return error("Unexpected type of input! Expected \"text\", \"email\", \"password\", \"number\", \"tel\", \"select\", \"radio\", \"checkbox\", \"textarea\", \"file\" or \"url\", got \"".concat(params.input, "\"")); + } + + const inputContainer = getInputContainer(params.input); + const input = renderInputType[params.input](inputContainer, params); + show(input); // input autofocus + + setTimeout(() => { + focusInput(input); + }); + }; + + const removeAttributes = input => { + for (let i = 0; i < input.attributes.length; i++) { + const attrName = input.attributes[i].name; + + if (!['type', 'value', 'style'].includes(attrName)) { + input.removeAttribute(attrName); + } + } + }; + + const setAttributes = (inputType, inputAttributes) => { + const input = getInput(getPopup(), inputType); + + if (!input) { + return; + } + + removeAttributes(input); + + for (const attr in inputAttributes) { + input.setAttribute(attr, inputAttributes[attr]); + } + }; + + const setCustomClass = params => { + const inputContainer = getInputContainer(params.input); + + if (params.customClass) { + addClass(inputContainer, params.customClass.input); + } + }; + + const setInputPlaceholder = (input, params) => { + if (!input.placeholder || params.inputPlaceholder) { + input.placeholder = params.inputPlaceholder; + } + }; + + const setInputLabel = (input, prependTo, params) => { + if (params.inputLabel) { + input.id = swalClasses.input; + const label = document.createElement('label'); + const labelClass = swalClasses['input-label']; + label.setAttribute('for', input.id); + label.className = labelClass; + addClass(label, params.customClass.inputLabel); + label.innerText = params.inputLabel; + prependTo.insertAdjacentElement('beforebegin', label); + } + }; + + const getInputContainer = inputType => { + const inputClass = swalClasses[inputType] ? swalClasses[inputType] : swalClasses.input; + return getChildByClass(getPopup(), inputClass); + }; + + const renderInputType = {}; + + renderInputType.text = renderInputType.email = renderInputType.password = renderInputType.number = renderInputType.tel = renderInputType.url = (input, params) => { + if (typeof params.inputValue === 'string' || typeof params.inputValue === 'number') { + input.value = params.inputValue; + } else if (!isPromise(params.inputValue)) { + warn("Unexpected type of inputValue! Expected \"string\", \"number\" or \"Promise\", got \"".concat(typeof params.inputValue, "\"")); + } + + setInputLabel(input, input, params); + setInputPlaceholder(input, params); + input.type = params.input; + return input; + }; + + renderInputType.file = (input, params) => { + setInputLabel(input, input, params); + setInputPlaceholder(input, params); + return input; + }; + + renderInputType.range = (range, params) => { + const rangeInput = range.querySelector('input'); + const rangeOutput = range.querySelector('output'); + rangeInput.value = params.inputValue; + rangeInput.type = params.input; + rangeOutput.value = params.inputValue; + setInputLabel(rangeInput, range, params); + return range; + }; + + renderInputType.select = (select, params) => { + select.textContent = ''; + + if (params.inputPlaceholder) { + const placeholder = document.createElement('option'); + setInnerHtml(placeholder, params.inputPlaceholder); + placeholder.value = ''; + placeholder.disabled = true; + placeholder.selected = true; + select.appendChild(placeholder); + } + + setInputLabel(select, select, params); + return select; + }; + + renderInputType.radio = radio => { + radio.textContent = ''; + return radio; + }; + + renderInputType.checkbox = (checkboxContainer, params) => { + const checkbox = getInput(getPopup(), 'checkbox'); + checkbox.value = 1; + checkbox.id = swalClasses.checkbox; + checkbox.checked = Boolean(params.inputValue); + const label = checkboxContainer.querySelector('span'); + setInnerHtml(label, params.inputPlaceholder); + return checkboxContainer; + }; + + renderInputType.textarea = (textarea, params) => { + textarea.value = params.inputValue; + setInputPlaceholder(textarea, params); + setInputLabel(textarea, textarea, params); + + const getMargin = el => parseInt(window.getComputedStyle(el).marginLeft) + parseInt(window.getComputedStyle(el).marginRight); + + setTimeout(() => { + // #2291 + if ('MutationObserver' in window) { + // #1699 + const initialPopupWidth = parseInt(window.getComputedStyle(getPopup()).width); + + const textareaResizeHandler = () => { + const textareaWidth = textarea.offsetWidth + getMargin(textarea); + + if (textareaWidth > initialPopupWidth) { + getPopup().style.width = "".concat(textareaWidth, "px"); + } else { + getPopup().style.width = null; + } + }; + + new MutationObserver(textareaResizeHandler).observe(textarea, { + attributes: true, + attributeFilter: ['style'] + }); + } + }); + return textarea; + }; + + const renderContent = (instance, params) => { + const htmlContainer = getHtmlContainer(); + applyCustomClass(htmlContainer, params, 'htmlContainer'); // Content as HTML + + if (params.html) { + parseHtmlToContainer(params.html, htmlContainer); + show(htmlContainer, 'block'); // Content as plain text + } else if (params.text) { + htmlContainer.textContent = params.text; + show(htmlContainer, 'block'); // No content + } else { + hide(htmlContainer); + } + + renderInput(instance, params); + }; + + const renderFooter = (instance, params) => { + const footer = getFooter(); + toggle(footer, params.footer); + + if (params.footer) { + parseHtmlToContainer(params.footer, footer); + } // Custom class + + + applyCustomClass(footer, params, 'footer'); + }; + + const renderCloseButton = (instance, params) => { + const closeButton = getCloseButton(); + setInnerHtml(closeButton, params.closeButtonHtml); // Custom class + + applyCustomClass(closeButton, params, 'closeButton'); + toggle(closeButton, params.showCloseButton); + closeButton.setAttribute('aria-label', params.closeButtonAriaLabel); + }; + + const renderIcon = (instance, params) => { + const innerParams = privateProps.innerParams.get(instance); + const icon = getIcon(); // if the given icon already rendered, apply the styling without re-rendering the icon + + if (innerParams && params.icon === innerParams.icon) { + // Custom or default content + setContent(icon, params); + applyStyles(icon, params); + return; + } + + if (!params.icon && !params.iconHtml) { + return hide(icon); + } + + if (params.icon && Object.keys(iconTypes).indexOf(params.icon) === -1) { + error("Unknown icon! Expected \"success\", \"error\", \"warning\", \"info\" or \"question\", got \"".concat(params.icon, "\"")); + return hide(icon); + } + + show(icon); // Custom or default content + + setContent(icon, params); + applyStyles(icon, params); // Animate icon + + addClass(icon, params.showClass.icon); + }; + + const applyStyles = (icon, params) => { + for (const iconType in iconTypes) { + if (params.icon !== iconType) { + removeClass(icon, iconTypes[iconType]); + } + } + + addClass(icon, iconTypes[params.icon]); // Icon color + + setColor(icon, params); // Success icon background color + + adjustSuccessIconBackgoundColor(); // Custom class + + applyCustomClass(icon, params, 'icon'); + }; // Adjust success icon background color to match the popup background color + + + const adjustSuccessIconBackgoundColor = () => { + const popup = getPopup(); + const popupBackgroundColor = window.getComputedStyle(popup).getPropertyValue('background-color'); + const successIconParts = popup.querySelectorAll('[class^=swal2-success-circular-line], .swal2-success-fix'); + + for (let i = 0; i < successIconParts.length; i++) { + successIconParts[i].style.backgroundColor = popupBackgroundColor; + } + }; + + const setContent = (icon, params) => { + icon.textContent = ''; + + if (params.iconHtml) { + setInnerHtml(icon, iconContent(params.iconHtml)); + } else if (params.icon === 'success') { + setInnerHtml(icon, "\n
            \n \n
            \n
            \n "); + } else if (params.icon === 'error') { + setInnerHtml(icon, "\n \n \n \n \n "); + } else { + const defaultIconHtml = { + question: '?', + warning: '!', + info: 'i' + }; + setInnerHtml(icon, iconContent(defaultIconHtml[params.icon])); + } + }; + + const setColor = (icon, params) => { + if (!params.iconColor) { + return; + } + + icon.style.color = params.iconColor; + icon.style.borderColor = params.iconColor; + + for (const sel of ['.swal2-success-line-tip', '.swal2-success-line-long', '.swal2-x-mark-line-left', '.swal2-x-mark-line-right']) { + setStyle(icon, sel, 'backgroundColor', params.iconColor); + } + + setStyle(icon, '.swal2-success-ring', 'borderColor', params.iconColor); + }; + + const iconContent = content => "
            ").concat(content, "
            "); + + const renderImage = (instance, params) => { + const image = getImage(); + + if (!params.imageUrl) { + return hide(image); + } + + show(image, ''); // Src, alt + + image.setAttribute('src', params.imageUrl); + image.setAttribute('alt', params.imageAlt); // Width, height + + applyNumericalStyle(image, 'width', params.imageWidth); + applyNumericalStyle(image, 'height', params.imageHeight); // Class + + image.className = swalClasses.image; + applyCustomClass(image, params, 'image'); + }; + + const createStepElement = step => { + const stepEl = document.createElement('li'); + addClass(stepEl, swalClasses['progress-step']); + setInnerHtml(stepEl, step); + return stepEl; + }; + + const createLineElement = params => { + const lineEl = document.createElement('li'); + addClass(lineEl, swalClasses['progress-step-line']); + + if (params.progressStepsDistance) { + lineEl.style.width = params.progressStepsDistance; + } + + return lineEl; + }; + + const renderProgressSteps = (instance, params) => { + const progressStepsContainer = getProgressSteps(); + + if (!params.progressSteps || params.progressSteps.length === 0) { + return hide(progressStepsContainer); + } + + show(progressStepsContainer); + progressStepsContainer.textContent = ''; + + if (params.currentProgressStep >= params.progressSteps.length) { + warn('Invalid currentProgressStep parameter, it should be less than progressSteps.length ' + '(currentProgressStep like JS arrays starts from 0)'); + } + + params.progressSteps.forEach((step, index) => { + const stepEl = createStepElement(step); + progressStepsContainer.appendChild(stepEl); + + if (index === params.currentProgressStep) { + addClass(stepEl, swalClasses['active-progress-step']); + } + + if (index !== params.progressSteps.length - 1) { + const lineEl = createLineElement(params); + progressStepsContainer.appendChild(lineEl); + } + }); + }; + + const renderTitle = (instance, params) => { + const title = getTitle(); + toggle(title, params.title || params.titleText, 'block'); + + if (params.title) { + parseHtmlToContainer(params.title, title); + } + + if (params.titleText) { + title.innerText = params.titleText; + } // Custom class + + + applyCustomClass(title, params, 'title'); + }; + + const renderPopup = (instance, params) => { + const container = getContainer(); + const popup = getPopup(); // Width + + if (params.toast) { + // #2170 + applyNumericalStyle(container, 'width', params.width); + popup.style.width = '100%'; + popup.insertBefore(getLoader(), getIcon()); + } else { + applyNumericalStyle(popup, 'width', params.width); + } // Padding + + + applyNumericalStyle(popup, 'padding', params.padding); // Background + + if (params.background) { + popup.style.background = params.background; + } + + hide(getValidationMessage()); // Classes + + addClasses(popup, params); + }; + + const addClasses = (popup, params) => { + // Default Class + showClass when updating Swal.update({}) + popup.className = "".concat(swalClasses.popup, " ").concat(isVisible(popup) ? params.showClass.popup : ''); + + if (params.toast) { + addClass([document.documentElement, document.body], swalClasses['toast-shown']); + addClass(popup, swalClasses.toast); + } else { + addClass(popup, swalClasses.modal); + } // Custom class + + + applyCustomClass(popup, params, 'popup'); + + if (typeof params.customClass === 'string') { + addClass(popup, params.customClass); + } // Icon class (#1842) + + + if (params.icon) { + addClass(popup, swalClasses["icon-".concat(params.icon)]); + } + }; + + const render = (instance, params) => { + renderPopup(instance, params); + renderContainer(instance, params); + renderProgressSteps(instance, params); + renderIcon(instance, params); + renderImage(instance, params); + renderTitle(instance, params); + renderCloseButton(instance, params); + renderContent(instance, params); + renderActions(instance, params); + renderFooter(instance, params); + + if (typeof params.didRender === 'function') { + params.didRender(getPopup()); + } + }; + + /* + * Global function to determine if SweetAlert2 popup is shown + */ + + const isVisible$1 = () => { + return isVisible(getPopup()); + }; + /* + * Global function to click 'Confirm' button + */ + + const clickConfirm = () => getConfirmButton() && getConfirmButton().click(); + /* + * Global function to click 'Deny' button + */ + + const clickDeny = () => getDenyButton() && getDenyButton().click(); + /* + * Global function to click 'Cancel' button + */ + + const clickCancel = () => getCancelButton() && getCancelButton().click(); + + function fire(...args) { + const Swal = this; + return new Swal(...args); + } + + /** + * Returns an extended version of `Swal` containing `params` as defaults. + * Useful for reusing Swal configuration. + * + * For example: + * + * Before: + * const textPromptOptions = { input: 'text', showCancelButton: true } + * const {value: firstName} = await Swal.fire({ ...textPromptOptions, title: 'What is your first name?' }) + * const {value: lastName} = await Swal.fire({ ...textPromptOptions, title: 'What is your last name?' }) + * + * After: + * const TextPrompt = Swal.mixin({ input: 'text', showCancelButton: true }) + * const {value: firstName} = await TextPrompt('What is your first name?') + * const {value: lastName} = await TextPrompt('What is your last name?') + * + * @param mixinParams + */ + function mixin(mixinParams) { + class MixinSwal extends this { + _main(params, priorityMixinParams) { + return super._main(params, Object.assign({}, mixinParams, priorityMixinParams)); + } + + } + + return MixinSwal; + } + + /** + * Shows loader (spinner), this is useful with AJAX requests. + * By default the loader be shown instead of the "Confirm" button. + */ + + const showLoading = buttonToReplace => { + let popup = getPopup(); + + if (!popup) { + Swal.fire(); + } + + popup = getPopup(); + const loader = getLoader(); + + if (isToast()) { + hide(getIcon()); + } else { + replaceButton(popup, buttonToReplace); + } + + show(loader); + popup.setAttribute('data-loading', true); + popup.setAttribute('aria-busy', true); + popup.focus(); + }; + + const replaceButton = (popup, buttonToReplace) => { + const actions = getActions(); + const loader = getLoader(); + + if (!buttonToReplace && isVisible(getConfirmButton())) { + buttonToReplace = getConfirmButton(); + } + + show(actions); + + if (buttonToReplace) { + hide(buttonToReplace); + loader.setAttribute('data-button-to-replace', buttonToReplace.className); + } + + loader.parentNode.insertBefore(loader, buttonToReplace); + addClass([popup, actions], swalClasses.loading); + }; + + const RESTORE_FOCUS_TIMEOUT = 100; + + const globalState = {}; + + const focusPreviousActiveElement = () => { + if (globalState.previousActiveElement && globalState.previousActiveElement.focus) { + globalState.previousActiveElement.focus(); + globalState.previousActiveElement = null; + } else if (document.body) { + document.body.focus(); + } + }; // Restore previous active (focused) element + + + const restoreActiveElement = returnFocus => { + return new Promise(resolve => { + if (!returnFocus) { + return resolve(); + } + + const x = window.scrollX; + const y = window.scrollY; + globalState.restoreFocusTimeout = setTimeout(() => { + focusPreviousActiveElement(); + resolve(); + }, RESTORE_FOCUS_TIMEOUT); // issues/900 + + window.scrollTo(x, y); + }); + }; + + /** + * If `timer` parameter is set, returns number of milliseconds of timer remained. + * Otherwise, returns undefined. + */ + + const getTimerLeft = () => { + return globalState.timeout && globalState.timeout.getTimerLeft(); + }; + /** + * Stop timer. Returns number of milliseconds of timer remained. + * If `timer` parameter isn't set, returns undefined. + */ + + const stopTimer = () => { + if (globalState.timeout) { + stopTimerProgressBar(); + return globalState.timeout.stop(); + } + }; + /** + * Resume timer. Returns number of milliseconds of timer remained. + * If `timer` parameter isn't set, returns undefined. + */ + + const resumeTimer = () => { + if (globalState.timeout) { + const remaining = globalState.timeout.start(); + animateTimerProgressBar(remaining); + return remaining; + } + }; + /** + * Resume timer. Returns number of milliseconds of timer remained. + * If `timer` parameter isn't set, returns undefined. + */ + + const toggleTimer = () => { + const timer = globalState.timeout; + return timer && (timer.running ? stopTimer() : resumeTimer()); + }; + /** + * Increase timer. Returns number of milliseconds of an updated timer. + * If `timer` parameter isn't set, returns undefined. + */ + + const increaseTimer = n => { + if (globalState.timeout) { + const remaining = globalState.timeout.increase(n); + animateTimerProgressBar(remaining, true); + return remaining; + } + }; + /** + * Check if timer is running. Returns true if timer is running + * or false if timer is paused or stopped. + * If `timer` parameter isn't set, returns undefined + */ + + const isTimerRunning = () => { + return globalState.timeout && globalState.timeout.isRunning(); + }; + + let bodyClickListenerAdded = false; + const clickHandlers = {}; + function bindClickHandler(attr = 'data-swal-template') { + clickHandlers[attr] = this; + + if (!bodyClickListenerAdded) { + document.body.addEventListener('click', bodyClickListener); + bodyClickListenerAdded = true; + } + } + + const bodyClickListener = event => { + // TODO: replace with event.composedPath() + for (let el = event.target; el && el !== document; el = el.parentNode) { + for (const attr in clickHandlers) { + const template = el.getAttribute(attr); + + if (template) { + clickHandlers[attr].fire({ + template + }); + return; + } + } + } + }; + + const defaultParams = { + title: '', + titleText: '', + text: '', + html: '', + footer: '', + icon: undefined, + iconColor: undefined, + iconHtml: undefined, + template: undefined, + toast: false, + showClass: { + popup: 'swal2-show', + backdrop: 'swal2-backdrop-show', + icon: 'swal2-icon-show' + }, + hideClass: { + popup: 'swal2-hide', + backdrop: 'swal2-backdrop-hide', + icon: 'swal2-icon-hide' + }, + customClass: {}, + target: 'body', + backdrop: true, + heightAuto: true, + allowOutsideClick: true, + allowEscapeKey: true, + allowEnterKey: true, + stopKeydownPropagation: true, + keydownListenerCapture: false, + showConfirmButton: true, + showDenyButton: false, + showCancelButton: false, + preConfirm: undefined, + preDeny: undefined, + confirmButtonText: 'OK', + confirmButtonAriaLabel: '', + confirmButtonColor: undefined, + denyButtonText: 'No', + denyButtonAriaLabel: '', + denyButtonColor: undefined, + cancelButtonText: 'Cancel', + cancelButtonAriaLabel: '', + cancelButtonColor: undefined, + buttonsStyling: true, + reverseButtons: false, + focusConfirm: true, + focusDeny: false, + focusCancel: false, + returnFocus: true, + showCloseButton: false, + closeButtonHtml: '×', + closeButtonAriaLabel: 'Close this dialog', + loaderHtml: '', + showLoaderOnConfirm: false, + showLoaderOnDeny: false, + imageUrl: undefined, + imageWidth: undefined, + imageHeight: undefined, + imageAlt: '', + timer: undefined, + timerProgressBar: false, + width: undefined, + padding: undefined, + background: undefined, + input: undefined, + inputPlaceholder: '', + inputLabel: '', + inputValue: '', + inputOptions: {}, + inputAutoTrim: true, + inputAttributes: {}, + inputValidator: undefined, + returnInputValueOnDeny: false, + validationMessage: undefined, + grow: false, + position: 'center', + progressSteps: [], + currentProgressStep: undefined, + progressStepsDistance: undefined, + willOpen: undefined, + didOpen: undefined, + didRender: undefined, + willClose: undefined, + didClose: undefined, + didDestroy: undefined, + scrollbarPadding: true + }; + const updatableParams = ['allowEscapeKey', 'allowOutsideClick', 'background', 'buttonsStyling', 'cancelButtonAriaLabel', 'cancelButtonColor', 'cancelButtonText', 'closeButtonAriaLabel', 'closeButtonHtml', 'confirmButtonAriaLabel', 'confirmButtonColor', 'confirmButtonText', 'currentProgressStep', 'customClass', 'denyButtonAriaLabel', 'denyButtonColor', 'denyButtonText', 'didClose', 'didDestroy', 'footer', 'hideClass', 'html', 'icon', 'iconColor', 'iconHtml', 'imageAlt', 'imageHeight', 'imageUrl', 'imageWidth', 'preConfirm', 'preDeny', 'progressSteps', 'returnFocus', 'reverseButtons', 'showCancelButton', 'showCloseButton', 'showConfirmButton', 'showDenyButton', 'text', 'title', 'titleText', 'willClose']; + const deprecatedParams = {}; + const toastIncompatibleParams = ['allowOutsideClick', 'allowEnterKey', 'backdrop', 'focusConfirm', 'focusDeny', 'focusCancel', 'returnFocus', 'heightAuto', 'keydownListenerCapture']; + /** + * Is valid parameter + * @param {String} paramName + */ + + const isValidParameter = paramName => { + return Object.prototype.hasOwnProperty.call(defaultParams, paramName); + }; + /** + * Is valid parameter for Swal.update() method + * @param {String} paramName + */ + + const isUpdatableParameter = paramName => { + return updatableParams.indexOf(paramName) !== -1; + }; + /** + * Is deprecated parameter + * @param {String} paramName + */ + + const isDeprecatedParameter = paramName => { + return deprecatedParams[paramName]; + }; + + const checkIfParamIsValid = param => { + if (!isValidParameter(param)) { + warn("Unknown parameter \"".concat(param, "\"")); + } + }; + + const checkIfToastParamIsValid = param => { + if (toastIncompatibleParams.includes(param)) { + warn("The parameter \"".concat(param, "\" is incompatible with toasts")); + } + }; + + const checkIfParamIsDeprecated = param => { + if (isDeprecatedParameter(param)) { + warnAboutDeprecation(param, isDeprecatedParameter(param)); + } + }; + /** + * Show relevant warnings for given params + * + * @param params + */ + + + const showWarningsForParams = params => { + if (!params.backdrop && params.allowOutsideClick) { + warn('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`'); + } + + for (const param in params) { + checkIfParamIsValid(param); + + if (params.toast) { + checkIfToastParamIsValid(param); + } + + checkIfParamIsDeprecated(param); + } + }; + + + + var staticMethods = /*#__PURE__*/Object.freeze({ + isValidParameter: isValidParameter, + isUpdatableParameter: isUpdatableParameter, + isDeprecatedParameter: isDeprecatedParameter, + argsToParams: argsToParams, + isVisible: isVisible$1, + clickConfirm: clickConfirm, + clickDeny: clickDeny, + clickCancel: clickCancel, + getContainer: getContainer, + getPopup: getPopup, + getTitle: getTitle, + getHtmlContainer: getHtmlContainer, + getImage: getImage, + getIcon: getIcon, + getInputLabel: getInputLabel, + getCloseButton: getCloseButton, + getActions: getActions, + getConfirmButton: getConfirmButton, + getDenyButton: getDenyButton, + getCancelButton: getCancelButton, + getLoader: getLoader, + getFooter: getFooter, + getTimerProgressBar: getTimerProgressBar, + getFocusableElements: getFocusableElements, + getValidationMessage: getValidationMessage, + isLoading: isLoading, + fire: fire, + mixin: mixin, + showLoading: showLoading, + enableLoading: showLoading, + getTimerLeft: getTimerLeft, + stopTimer: stopTimer, + resumeTimer: resumeTimer, + toggleTimer: toggleTimer, + increaseTimer: increaseTimer, + isTimerRunning: isTimerRunning, + bindClickHandler: bindClickHandler + }); + + /** + * Hides loader and shows back the button which was hidden by .showLoading() + */ + + function hideLoading() { + // do nothing if popup is closed + const innerParams = privateProps.innerParams.get(this); + + if (!innerParams) { + return; + } + + const domCache = privateProps.domCache.get(this); + hide(domCache.loader); + + if (isToast()) { + if (innerParams.icon) { + show(getIcon()); + } + } else { + showRelatedButton(domCache); + } + + removeClass([domCache.popup, domCache.actions], swalClasses.loading); + domCache.popup.removeAttribute('aria-busy'); + domCache.popup.removeAttribute('data-loading'); + domCache.confirmButton.disabled = false; + domCache.denyButton.disabled = false; + domCache.cancelButton.disabled = false; + } + + const showRelatedButton = domCache => { + const buttonToReplace = domCache.popup.getElementsByClassName(domCache.loader.getAttribute('data-button-to-replace')); + + if (buttonToReplace.length) { + show(buttonToReplace[0], 'inline-block'); + } else if (allButtonsAreHidden()) { + hide(domCache.actions); + } + }; + + function getInput$1(instance) { + const innerParams = privateProps.innerParams.get(instance || this); + const domCache = privateProps.domCache.get(instance || this); + + if (!domCache) { + return null; + } + + return getInput(domCache.popup, innerParams.input); + } + + const fixScrollbar = () => { + // for queues, do not do this more than once + if (states.previousBodyPadding !== null) { + return; + } // if the body has overflow + + + if (document.body.scrollHeight > window.innerHeight) { + // add padding so the content doesn't shift after removal of scrollbar + states.previousBodyPadding = parseInt(window.getComputedStyle(document.body).getPropertyValue('padding-right')); + document.body.style.paddingRight = "".concat(states.previousBodyPadding + measureScrollbar(), "px"); + } + }; + const undoScrollbar = () => { + if (states.previousBodyPadding !== null) { + document.body.style.paddingRight = "".concat(states.previousBodyPadding, "px"); + states.previousBodyPadding = null; + } + }; + + /* istanbul ignore file */ + + const iOSfix = () => { + const iOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream || navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1; + + if (iOS && !hasClass(document.body, swalClasses.iosfix)) { + const offset = document.body.scrollTop; + document.body.style.top = "".concat(offset * -1, "px"); + addClass(document.body, swalClasses.iosfix); + lockBodyScroll(); + addBottomPaddingForTallPopups(); // #1948 + } + }; + + const addBottomPaddingForTallPopups = () => { + const safari = !navigator.userAgent.match(/(CriOS|FxiOS|EdgiOS|YaBrowser|UCBrowser)/i); + + if (safari) { + const bottomPanelHeight = 44; + + if (getPopup().scrollHeight > window.innerHeight - bottomPanelHeight) { + getContainer().style.paddingBottom = "".concat(bottomPanelHeight, "px"); + } + } + }; + + const lockBodyScroll = () => { + // #1246 + const container = getContainer(); + let preventTouchMove; + + container.ontouchstart = e => { + preventTouchMove = shouldPreventTouchMove(e); + }; + + container.ontouchmove = e => { + if (preventTouchMove) { + e.preventDefault(); + e.stopPropagation(); + } + }; + }; + + const shouldPreventTouchMove = event => { + const target = event.target; + const container = getContainer(); + + if (isStylys(event) || isZoom(event)) { + return false; + } + + if (target === container) { + return true; + } + + if (!isScrollable(container) && target.tagName !== 'INPUT' && // #1603 + target.tagName !== 'TEXTAREA' && // #2266 + !(isScrollable(getHtmlContainer()) && // #1944 + getHtmlContainer().contains(target))) { + return true; + } + + return false; + }; + + const isStylys = event => { + // #1786 + return event.touches && event.touches.length && event.touches[0].touchType === 'stylus'; + }; + + const isZoom = event => { + // #1891 + return event.touches && event.touches.length > 1; + }; + + const undoIOSfix = () => { + if (hasClass(document.body, swalClasses.iosfix)) { + const offset = parseInt(document.body.style.top, 10); + removeClass(document.body, swalClasses.iosfix); + document.body.style.top = ''; + document.body.scrollTop = offset * -1; + } + }; + + // Adding aria-hidden="true" to elements outside of the active modal dialog ensures that + // elements not within the active modal dialog will not be surfaced if a user opens a screen + // reader’s list of elements (headings, form controls, landmarks, etc.) in the document. + + const setAriaHidden = () => { + const bodyChildren = toArray(document.body.children); + bodyChildren.forEach(el => { + if (el === getContainer() || el.contains(getContainer())) { + return; + } + + if (el.hasAttribute('aria-hidden')) { + el.setAttribute('data-previous-aria-hidden', el.getAttribute('aria-hidden')); + } + + el.setAttribute('aria-hidden', 'true'); + }); + }; + const unsetAriaHidden = () => { + const bodyChildren = toArray(document.body.children); + bodyChildren.forEach(el => { + if (el.hasAttribute('data-previous-aria-hidden')) { + el.setAttribute('aria-hidden', el.getAttribute('data-previous-aria-hidden')); + el.removeAttribute('data-previous-aria-hidden'); + } else { + el.removeAttribute('aria-hidden'); + } + }); + }; + + /** + * This module containts `WeakMap`s for each effectively-"private property" that a `Swal` has. + * For example, to set the private property "foo" of `this` to "bar", you can `privateProps.foo.set(this, 'bar')` + * This is the approach that Babel will probably take to implement private methods/fields + * https://github.com/tc39/proposal-private-methods + * https://github.com/babel/babel/pull/7555 + * Once we have the changes from that PR in Babel, and our core class fits reasonable in *one module* + * then we can use that language feature. + */ + var privateMethods = { + swalPromiseResolve: new WeakMap() + }; + + /* + * Instance method to close sweetAlert + */ + + function removePopupAndResetState(instance, container, returnFocus, didClose) { + if (isToast()) { + triggerDidCloseAndDispose(instance, didClose); + } else { + restoreActiveElement(returnFocus).then(() => triggerDidCloseAndDispose(instance, didClose)); + globalState.keydownTarget.removeEventListener('keydown', globalState.keydownHandler, { + capture: globalState.keydownListenerCapture + }); + globalState.keydownHandlerAdded = false; + } + + const isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent); // workaround for #2088 + // for some reason removing the container in Safari will scroll the document to bottom + + if (isSafari) { + container.setAttribute('style', 'display:none !important'); + container.removeAttribute('class'); + container.innerHTML = ''; + } else { + container.remove(); + } + + if (isModal()) { + undoScrollbar(); + undoIOSfix(); + unsetAriaHidden(); + } + + removeBodyClasses(); + } + + function removeBodyClasses() { + removeClass([document.documentElement, document.body], [swalClasses.shown, swalClasses['height-auto'], swalClasses['no-backdrop'], swalClasses['toast-shown']]); + } + + function close(resolveValue) { + const popup = getPopup(); + + if (!popup) { + return; + } + + resolveValue = prepareResolveValue(resolveValue); + const innerParams = privateProps.innerParams.get(this); + + if (!innerParams || hasClass(popup, innerParams.hideClass.popup)) { + return; + } + + const swalPromiseResolve = privateMethods.swalPromiseResolve.get(this); + removeClass(popup, innerParams.showClass.popup); + addClass(popup, innerParams.hideClass.popup); + const backdrop = getContainer(); + removeClass(backdrop, innerParams.showClass.backdrop); + addClass(backdrop, innerParams.hideClass.backdrop); + handlePopupAnimation(this, popup, innerParams); // Resolve Swal promise + + swalPromiseResolve(resolveValue); + } + + const prepareResolveValue = resolveValue => { + // When user calls Swal.close() + if (typeof resolveValue === 'undefined') { + return { + isConfirmed: false, + isDenied: false, + isDismissed: true + }; + } + + return Object.assign({ + isConfirmed: false, + isDenied: false, + isDismissed: false + }, resolveValue); + }; + + const handlePopupAnimation = (instance, popup, innerParams) => { + const container = getContainer(); // If animation is supported, animate + + const animationIsSupported = animationEndEvent && hasCssAnimation(popup); + + if (typeof innerParams.willClose === 'function') { + innerParams.willClose(popup); + } + + if (animationIsSupported) { + animatePopup(instance, popup, container, innerParams.returnFocus, innerParams.didClose); + } else { + // Otherwise, remove immediately + removePopupAndResetState(instance, container, innerParams.returnFocus, innerParams.didClose); + } + }; + + const animatePopup = (instance, popup, container, returnFocus, didClose) => { + globalState.swalCloseEventFinishedCallback = removePopupAndResetState.bind(null, instance, container, returnFocus, didClose); + popup.addEventListener(animationEndEvent, function (e) { + if (e.target === popup) { + globalState.swalCloseEventFinishedCallback(); + delete globalState.swalCloseEventFinishedCallback; + } + }); + }; + + const triggerDidCloseAndDispose = (instance, didClose) => { + setTimeout(() => { + if (typeof didClose === 'function') { + didClose.bind(instance.params)(); + } + + instance._destroy(); + }); + }; + + function setButtonsDisabled(instance, buttons, disabled) { + const domCache = privateProps.domCache.get(instance); + buttons.forEach(button => { + domCache[button].disabled = disabled; + }); + } + + function setInputDisabled(input, disabled) { + if (!input) { + return false; + } + + if (input.type === 'radio') { + const radiosContainer = input.parentNode.parentNode; + const radios = radiosContainer.querySelectorAll('input'); + + for (let i = 0; i < radios.length; i++) { + radios[i].disabled = disabled; + } + } else { + input.disabled = disabled; + } + } + + function enableButtons() { + setButtonsDisabled(this, ['confirmButton', 'denyButton', 'cancelButton'], false); + } + function disableButtons() { + setButtonsDisabled(this, ['confirmButton', 'denyButton', 'cancelButton'], true); + } + function enableInput() { + return setInputDisabled(this.getInput(), false); + } + function disableInput() { + return setInputDisabled(this.getInput(), true); + } + + function showValidationMessage(error) { + const domCache = privateProps.domCache.get(this); + const params = privateProps.innerParams.get(this); + setInnerHtml(domCache.validationMessage, error); + domCache.validationMessage.className = swalClasses['validation-message']; + + if (params.customClass && params.customClass.validationMessage) { + addClass(domCache.validationMessage, params.customClass.validationMessage); + } + + show(domCache.validationMessage); + const input = this.getInput(); + + if (input) { + input.setAttribute('aria-invalid', true); + input.setAttribute('aria-describedby', swalClasses['validation-message']); + focusInput(input); + addClass(input, swalClasses.inputerror); + } + } // Hide block with validation message + + function resetValidationMessage$1() { + const domCache = privateProps.domCache.get(this); + + if (domCache.validationMessage) { + hide(domCache.validationMessage); + } + + const input = this.getInput(); + + if (input) { + input.removeAttribute('aria-invalid'); + input.removeAttribute('aria-describedby'); + removeClass(input, swalClasses.inputerror); + } + } + + function getProgressSteps$1() { + const domCache = privateProps.domCache.get(this); + return domCache.progressSteps; + } + + class Timer { + constructor(callback, delay) { + this.callback = callback; + this.remaining = delay; + this.running = false; + this.start(); + } + + start() { + if (!this.running) { + this.running = true; + this.started = new Date(); + this.id = setTimeout(this.callback, this.remaining); + } + + return this.remaining; + } + + stop() { + if (this.running) { + this.running = false; + clearTimeout(this.id); + this.remaining -= new Date() - this.started; + } + + return this.remaining; + } + + increase(n) { + const running = this.running; + + if (running) { + this.stop(); + } + + this.remaining += n; + + if (running) { + this.start(); + } + + return this.remaining; + } + + getTimerLeft() { + if (this.running) { + this.stop(); + this.start(); + } + + return this.remaining; + } + + isRunning() { + return this.running; + } + + } + + var defaultInputValidators = { + email: (string, validationMessage) => { + return /^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]{2,24}$/.test(string) ? Promise.resolve() : Promise.resolve(validationMessage || 'Invalid email address'); + }, + url: (string, validationMessage) => { + // taken from https://stackoverflow.com/a/3809435 with a small change from #1306 and #2013 + return /^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(string) ? Promise.resolve() : Promise.resolve(validationMessage || 'Invalid URL'); + } + }; + + function setDefaultInputValidators(params) { + // Use default `inputValidator` for supported input types if not provided + if (!params.inputValidator) { + Object.keys(defaultInputValidators).forEach(key => { + if (params.input === key) { + params.inputValidator = defaultInputValidators[key]; + } + }); + } + } + + function validateCustomTargetElement(params) { + // Determine if the custom target element is valid + if (!params.target || typeof params.target === 'string' && !document.querySelector(params.target) || typeof params.target !== 'string' && !params.target.appendChild) { + warn('Target parameter is not valid, defaulting to "body"'); + params.target = 'body'; + } + } + /** + * Set type, text and actions on popup + * + * @param params + * @returns {boolean} + */ + + + function setParameters(params) { + setDefaultInputValidators(params); // showLoaderOnConfirm && preConfirm + + if (params.showLoaderOnConfirm && !params.preConfirm) { + warn('showLoaderOnConfirm is set to true, but preConfirm is not defined.\n' + 'showLoaderOnConfirm should be used together with preConfirm, see usage example:\n' + 'https://sweetalert2.github.io/#ajax-request'); + } + + validateCustomTargetElement(params); // Replace newlines with
            in title + + if (typeof params.title === 'string') { + params.title = params.title.split('\n').join('
            '); + } + + init(params); + } + + const swalStringParams = ['swal-title', 'swal-html', 'swal-footer']; + const getTemplateParams = params => { + const template = typeof params.template === 'string' ? document.querySelector(params.template) : params.template; + + if (!template) { + return {}; + } + + const templateContent = template.content; + showWarningsForElements(templateContent); + const result = Object.assign(getSwalParams(templateContent), getSwalButtons(templateContent), getSwalImage(templateContent), getSwalIcon(templateContent), getSwalInput(templateContent), getSwalStringParams(templateContent, swalStringParams)); + return result; + }; + + const getSwalParams = templateContent => { + const result = {}; + toArray(templateContent.querySelectorAll('swal-param')).forEach(param => { + showWarningsForAttributes(param, ['name', 'value']); + const paramName = param.getAttribute('name'); + let value = param.getAttribute('value'); + + if (typeof defaultParams[paramName] === 'boolean' && value === 'false') { + value = false; + } + + if (typeof defaultParams[paramName] === 'object') { + value = JSON.parse(value); + } + + result[paramName] = value; + }); + return result; + }; + + const getSwalButtons = templateContent => { + const result = {}; + toArray(templateContent.querySelectorAll('swal-button')).forEach(button => { + showWarningsForAttributes(button, ['type', 'color', 'aria-label']); + const type = button.getAttribute('type'); + result["".concat(type, "ButtonText")] = button.innerHTML; + result["show".concat(capitalizeFirstLetter(type), "Button")] = true; + + if (button.hasAttribute('color')) { + result["".concat(type, "ButtonColor")] = button.getAttribute('color'); + } + + if (button.hasAttribute('aria-label')) { + result["".concat(type, "ButtonAriaLabel")] = button.getAttribute('aria-label'); + } + }); + return result; + }; + + const getSwalImage = templateContent => { + const result = {}; + const image = templateContent.querySelector('swal-image'); + + if (image) { + showWarningsForAttributes(image, ['src', 'width', 'height', 'alt']); + + if (image.hasAttribute('src')) { + result.imageUrl = image.getAttribute('src'); + } + + if (image.hasAttribute('width')) { + result.imageWidth = image.getAttribute('width'); + } + + if (image.hasAttribute('height')) { + result.imageHeight = image.getAttribute('height'); + } + + if (image.hasAttribute('alt')) { + result.imageAlt = image.getAttribute('alt'); + } + } + + return result; + }; + + const getSwalIcon = templateContent => { + const result = {}; + const icon = templateContent.querySelector('swal-icon'); + + if (icon) { + showWarningsForAttributes(icon, ['type', 'color']); + + if (icon.hasAttribute('type')) { + result.icon = icon.getAttribute('type'); + } + + if (icon.hasAttribute('color')) { + result.iconColor = icon.getAttribute('color'); + } + + result.iconHtml = icon.innerHTML; + } + + return result; + }; + + const getSwalInput = templateContent => { + const result = {}; + const input = templateContent.querySelector('swal-input'); + + if (input) { + showWarningsForAttributes(input, ['type', 'label', 'placeholder', 'value']); + result.input = input.getAttribute('type') || 'text'; + + if (input.hasAttribute('label')) { + result.inputLabel = input.getAttribute('label'); + } + + if (input.hasAttribute('placeholder')) { + result.inputPlaceholder = input.getAttribute('placeholder'); + } + + if (input.hasAttribute('value')) { + result.inputValue = input.getAttribute('value'); + } + } + + const inputOptions = templateContent.querySelectorAll('swal-input-option'); + + if (inputOptions.length) { + result.inputOptions = {}; + toArray(inputOptions).forEach(option => { + showWarningsForAttributes(option, ['value']); + const optionValue = option.getAttribute('value'); + const optionName = option.innerHTML; + result.inputOptions[optionValue] = optionName; + }); + } + + return result; + }; + + const getSwalStringParams = (templateContent, paramNames) => { + const result = {}; + + for (const i in paramNames) { + const paramName = paramNames[i]; + const tag = templateContent.querySelector(paramName); + + if (tag) { + showWarningsForAttributes(tag, []); + result[paramName.replace(/^swal-/, '')] = tag.innerHTML.trim(); + } + } + + return result; + }; + + const showWarningsForElements = template => { + const allowedElements = swalStringParams.concat(['swal-param', 'swal-button', 'swal-image', 'swal-icon', 'swal-input', 'swal-input-option']); + toArray(template.children).forEach(el => { + const tagName = el.tagName.toLowerCase(); + + if (allowedElements.indexOf(tagName) === -1) { + warn("Unrecognized element <".concat(tagName, ">")); + } + }); + }; + + const showWarningsForAttributes = (el, allowedAttributes) => { + toArray(el.attributes).forEach(attribute => { + if (allowedAttributes.indexOf(attribute.name) === -1) { + warn(["Unrecognized attribute \"".concat(attribute.name, "\" on <").concat(el.tagName.toLowerCase(), ">."), "".concat(allowedAttributes.length ? "Allowed attributes are: ".concat(allowedAttributes.join(', ')) : 'To set the value, use HTML within the element.')]); + } + }); + }; + + const SHOW_CLASS_TIMEOUT = 10; + /** + * Open popup, add necessary classes and styles, fix scrollbar + * + * @param params + */ + + const openPopup = params => { + const container = getContainer(); + const popup = getPopup(); + + if (typeof params.willOpen === 'function') { + params.willOpen(popup); + } + + const bodyStyles = window.getComputedStyle(document.body); + const initialBodyOverflow = bodyStyles.overflowY; + addClasses$1(container, popup, params); // scrolling is 'hidden' until animation is done, after that 'auto' + + setTimeout(() => { + setScrollingVisibility(container, popup); + }, SHOW_CLASS_TIMEOUT); + + if (isModal()) { + fixScrollContainer(container, params.scrollbarPadding, initialBodyOverflow); + setAriaHidden(); + } + + if (!isToast() && !globalState.previousActiveElement) { + globalState.previousActiveElement = document.activeElement; + } + + if (typeof params.didOpen === 'function') { + setTimeout(() => params.didOpen(popup)); + } + + removeClass(container, swalClasses['no-transition']); + }; + + const swalOpenAnimationFinished = event => { + const popup = getPopup(); + + if (event.target !== popup) { + return; + } + + const container = getContainer(); + popup.removeEventListener(animationEndEvent, swalOpenAnimationFinished); + container.style.overflowY = 'auto'; + }; + + const setScrollingVisibility = (container, popup) => { + if (animationEndEvent && hasCssAnimation(popup)) { + container.style.overflowY = 'hidden'; + popup.addEventListener(animationEndEvent, swalOpenAnimationFinished); + } else { + container.style.overflowY = 'auto'; + } + }; + + const fixScrollContainer = (container, scrollbarPadding, initialBodyOverflow) => { + iOSfix(); + + if (scrollbarPadding && initialBodyOverflow !== 'hidden') { + fixScrollbar(); + } // sweetalert2/issues/1247 + + + setTimeout(() => { + container.scrollTop = 0; + }); + }; + + const addClasses$1 = (container, popup, params) => { + addClass(container, params.showClass.backdrop); // the workaround with setting/unsetting opacity is needed for #2019 and 2059 + + popup.style.setProperty('opacity', '0', 'important'); + show(popup, 'grid'); + setTimeout(() => { + // Animate popup right after showing it + addClass(popup, params.showClass.popup); // and remove the opacity workaround + + popup.style.removeProperty('opacity'); + }, SHOW_CLASS_TIMEOUT); // 10ms in order to fix #2062 + + addClass([document.documentElement, document.body], swalClasses.shown); + + if (params.heightAuto && params.backdrop && !params.toast) { + addClass([document.documentElement, document.body], swalClasses['height-auto']); + } + }; + + const handleInputOptionsAndValue = (instance, params) => { + if (params.input === 'select' || params.input === 'radio') { + handleInputOptions(instance, params); + } else if (['text', 'email', 'number', 'tel', 'textarea'].includes(params.input) && (hasToPromiseFn(params.inputValue) || isPromise(params.inputValue))) { + showLoading(getConfirmButton()); + handleInputValue(instance, params); + } + }; + const getInputValue = (instance, innerParams) => { + const input = instance.getInput(); + + if (!input) { + return null; + } + + switch (innerParams.input) { + case 'checkbox': + return getCheckboxValue(input); + + case 'radio': + return getRadioValue(input); + + case 'file': + return getFileValue(input); + + default: + return innerParams.inputAutoTrim ? input.value.trim() : input.value; + } + }; + + const getCheckboxValue = input => input.checked ? 1 : 0; + + const getRadioValue = input => input.checked ? input.value : null; + + const getFileValue = input => input.files.length ? input.getAttribute('multiple') !== null ? input.files : input.files[0] : null; + + const handleInputOptions = (instance, params) => { + const popup = getPopup(); + + const processInputOptions = inputOptions => populateInputOptions[params.input](popup, formatInputOptions(inputOptions), params); + + if (hasToPromiseFn(params.inputOptions) || isPromise(params.inputOptions)) { + showLoading(getConfirmButton()); + asPromise(params.inputOptions).then(inputOptions => { + instance.hideLoading(); + processInputOptions(inputOptions); + }); + } else if (typeof params.inputOptions === 'object') { + processInputOptions(params.inputOptions); + } else { + error("Unexpected type of inputOptions! Expected object, Map or Promise, got ".concat(typeof params.inputOptions)); + } + }; + + const handleInputValue = (instance, params) => { + const input = instance.getInput(); + hide(input); + asPromise(params.inputValue).then(inputValue => { + input.value = params.input === 'number' ? parseFloat(inputValue) || 0 : "".concat(inputValue); + show(input); + input.focus(); + instance.hideLoading(); + }).catch(err => { + error("Error in inputValue promise: ".concat(err)); + input.value = ''; + show(input); + input.focus(); + instance.hideLoading(); + }); + }; + + const populateInputOptions = { + select: (popup, inputOptions, params) => { + const select = getChildByClass(popup, swalClasses.select); + + const renderOption = (parent, optionLabel, optionValue) => { + const option = document.createElement('option'); + option.value = optionValue; + setInnerHtml(option, optionLabel); + option.selected = isSelected(optionValue, params.inputValue); + parent.appendChild(option); + }; + + inputOptions.forEach(inputOption => { + const optionValue = inputOption[0]; + const optionLabel = inputOption[1]; // spec: + // https://www.w3.org/TR/html401/interact/forms.html#h-17.6 + // "...all OPTGROUP elements must be specified directly within a SELECT element (i.e., groups may not be nested)..." + // check whether this is a + + if (Array.isArray(optionLabel)) { + // if it is an array, then it is an + const optgroup = document.createElement('optgroup'); + optgroup.label = optionValue; + optgroup.disabled = false; // not configurable for now + + select.appendChild(optgroup); + optionLabel.forEach(o => renderOption(optgroup, o[1], o[0])); + } else { + // case of + valueFormatted = formatInputOptions(valueFormatted); + } + + result.push([key, valueFormatted]); + }); + } else { + Object.keys(inputOptions).forEach(key => { + let valueFormatted = inputOptions[key]; + + if (typeof valueFormatted === 'object') { + // case of + valueFormatted = formatInputOptions(valueFormatted); + } + + result.push([key, valueFormatted]); + }); + } + + return result; + }; + + const isSelected = (optionValue, inputValue) => { + return inputValue && inputValue.toString() === optionValue.toString(); + }; + + const handleConfirmButtonClick = instance => { + const innerParams = privateProps.innerParams.get(instance); + instance.disableButtons(); + + if (innerParams.input) { + handleConfirmOrDenyWithInput(instance, 'confirm'); + } else { + confirm(instance, true); + } + }; + const handleDenyButtonClick = instance => { + const innerParams = privateProps.innerParams.get(instance); + instance.disableButtons(); + + if (innerParams.returnInputValueOnDeny) { + handleConfirmOrDenyWithInput(instance, 'deny'); + } else { + deny(instance, false); + } + }; + const handleCancelButtonClick = (instance, dismissWith) => { + instance.disableButtons(); + dismissWith(DismissReason.cancel); + }; + + const handleConfirmOrDenyWithInput = (instance, type + /* 'confirm' | 'deny' */ + ) => { + const innerParams = privateProps.innerParams.get(instance); + const inputValue = getInputValue(instance, innerParams); + + if (innerParams.inputValidator) { + handleInputValidator(instance, inputValue, type); + } else if (!instance.getInput().checkValidity()) { + instance.enableButtons(); + instance.showValidationMessage(innerParams.validationMessage); + } else if (type === 'deny') { + deny(instance, inputValue); + } else { + confirm(instance, inputValue); + } + }; + + const handleInputValidator = (instance, inputValue, type + /* 'confirm' | 'deny' */ + ) => { + const innerParams = privateProps.innerParams.get(instance); + instance.disableInput(); + const validationPromise = Promise.resolve().then(() => asPromise(innerParams.inputValidator(inputValue, innerParams.validationMessage))); + validationPromise.then(validationMessage => { + instance.enableButtons(); + instance.enableInput(); + + if (validationMessage) { + instance.showValidationMessage(validationMessage); + } else if (type === 'deny') { + deny(instance, inputValue); + } else { + confirm(instance, inputValue); + } + }); + }; + + const deny = (instance, value) => { + const innerParams = privateProps.innerParams.get(instance || undefined); + + if (innerParams.showLoaderOnDeny) { + showLoading(getDenyButton()); + } + + if (innerParams.preDeny) { + const preDenyPromise = Promise.resolve().then(() => asPromise(innerParams.preDeny(value, innerParams.validationMessage))); + preDenyPromise.then(preDenyValue => { + if (preDenyValue === false) { + instance.hideLoading(); + } else { + instance.closePopup({ + isDenied: true, + value: typeof preDenyValue === 'undefined' ? value : preDenyValue + }); + } + }); + } else { + instance.closePopup({ + isDenied: true, + value + }); + } + }; + + const succeedWith = (instance, value) => { + instance.closePopup({ + isConfirmed: true, + value + }); + }; + + const confirm = (instance, value) => { + const innerParams = privateProps.innerParams.get(instance || undefined); + + if (innerParams.showLoaderOnConfirm) { + showLoading(); // TODO: make showLoading an *instance* method + } + + if (innerParams.preConfirm) { + instance.resetValidationMessage(); + const preConfirmPromise = Promise.resolve().then(() => asPromise(innerParams.preConfirm(value, innerParams.validationMessage))); + preConfirmPromise.then(preConfirmValue => { + if (isVisible(getValidationMessage()) || preConfirmValue === false) { + instance.hideLoading(); + } else { + succeedWith(instance, typeof preConfirmValue === 'undefined' ? value : preConfirmValue); + } + }); + } else { + succeedWith(instance, value); + } + }; + + const addKeydownHandler = (instance, globalState, innerParams, dismissWith) => { + if (globalState.keydownTarget && globalState.keydownHandlerAdded) { + globalState.keydownTarget.removeEventListener('keydown', globalState.keydownHandler, { + capture: globalState.keydownListenerCapture + }); + globalState.keydownHandlerAdded = false; + } + + if (!innerParams.toast) { + globalState.keydownHandler = e => keydownHandler(instance, e, dismissWith); + + globalState.keydownTarget = innerParams.keydownListenerCapture ? window : getPopup(); + globalState.keydownListenerCapture = innerParams.keydownListenerCapture; + globalState.keydownTarget.addEventListener('keydown', globalState.keydownHandler, { + capture: globalState.keydownListenerCapture + }); + globalState.keydownHandlerAdded = true; + } + }; // Focus handling + + const setFocus = (innerParams, index, increment) => { + const focusableElements = getFocusableElements(); // search for visible elements and select the next possible match + + if (focusableElements.length) { + index = index + increment; // rollover to first item + + if (index === focusableElements.length) { + index = 0; // go to last item + } else if (index === -1) { + index = focusableElements.length - 1; + } + + return focusableElements[index].focus(); + } // no visible focusable elements, focus the popup + + + getPopup().focus(); + }; + const arrowKeysNextButton = ['ArrowRight', 'ArrowDown']; + const arrowKeysPreviousButton = ['ArrowLeft', 'ArrowUp']; + + const keydownHandler = (instance, e, dismissWith) => { + const innerParams = privateProps.innerParams.get(instance); + + if (!innerParams) { + return; // This instance has already been destroyed + } + + if (innerParams.stopKeydownPropagation) { + e.stopPropagation(); + } // ENTER + + + if (e.key === 'Enter') { + handleEnter(instance, e, innerParams); // TAB + } else if (e.key === 'Tab') { + handleTab(e, innerParams); // ARROWS - switch focus between buttons + } else if ([...arrowKeysNextButton, ...arrowKeysPreviousButton].includes(e.key)) { + handleArrows(e.key); // ESC + } else if (e.key === 'Escape') { + handleEsc(e, innerParams, dismissWith); + } + }; + + const handleEnter = (instance, e, innerParams) => { + // #720 #721 + if (e.isComposing) { + return; + } + + if (e.target && instance.getInput() && e.target.outerHTML === instance.getInput().outerHTML) { + if (['textarea', 'file'].includes(innerParams.input)) { + return; // do not submit + } + + clickConfirm(); + e.preventDefault(); + } + }; + + const handleTab = (e, innerParams) => { + const targetElement = e.target; + const focusableElements = getFocusableElements(); + let btnIndex = -1; + + for (let i = 0; i < focusableElements.length; i++) { + if (targetElement === focusableElements[i]) { + btnIndex = i; + break; + } + } + + if (!e.shiftKey) { + // Cycle to the next button + setFocus(innerParams, btnIndex, 1); + } else { + // Cycle to the prev button + setFocus(innerParams, btnIndex, -1); + } + + e.stopPropagation(); + e.preventDefault(); + }; + + const handleArrows = key => { + const confirmButton = getConfirmButton(); + const denyButton = getDenyButton(); + const cancelButton = getCancelButton(); + + if (![confirmButton, denyButton, cancelButton].includes(document.activeElement)) { + return; + } + + const sibling = arrowKeysNextButton.includes(key) ? 'nextElementSibling' : 'previousElementSibling'; + const buttonToFocus = document.activeElement[sibling]; + + if (buttonToFocus) { + buttonToFocus.focus(); + } + }; + + const handleEsc = (e, innerParams, dismissWith) => { + if (callIfFunction(innerParams.allowEscapeKey)) { + e.preventDefault(); + dismissWith(DismissReason.esc); + } + }; + + const handlePopupClick = (instance, domCache, dismissWith) => { + const innerParams = privateProps.innerParams.get(instance); + + if (innerParams.toast) { + handleToastClick(instance, domCache, dismissWith); + } else { + // Ignore click events that had mousedown on the popup but mouseup on the container + // This can happen when the user drags a slider + handleModalMousedown(domCache); // Ignore click events that had mousedown on the container but mouseup on the popup + + handleContainerMousedown(domCache); + handleModalClick(instance, domCache, dismissWith); + } + }; + + const handleToastClick = (instance, domCache, dismissWith) => { + // Closing toast by internal click + domCache.popup.onclick = () => { + const innerParams = privateProps.innerParams.get(instance); + + if (innerParams.showConfirmButton || innerParams.showDenyButton || innerParams.showCancelButton || innerParams.showCloseButton || innerParams.timer || innerParams.input) { + return; + } + + dismissWith(DismissReason.close); + }; + }; + + let ignoreOutsideClick = false; + + const handleModalMousedown = domCache => { + domCache.popup.onmousedown = () => { + domCache.container.onmouseup = function (e) { + domCache.container.onmouseup = undefined; // We only check if the mouseup target is the container because usually it doesn't + // have any other direct children aside of the popup + + if (e.target === domCache.container) { + ignoreOutsideClick = true; + } + }; + }; + }; + + const handleContainerMousedown = domCache => { + domCache.container.onmousedown = () => { + domCache.popup.onmouseup = function (e) { + domCache.popup.onmouseup = undefined; // We also need to check if the mouseup target is a child of the popup + + if (e.target === domCache.popup || domCache.popup.contains(e.target)) { + ignoreOutsideClick = true; + } + }; + }; + }; + + const handleModalClick = (instance, domCache, dismissWith) => { + domCache.container.onclick = e => { + const innerParams = privateProps.innerParams.get(instance); + + if (ignoreOutsideClick) { + ignoreOutsideClick = false; + return; + } + + if (e.target === domCache.container && callIfFunction(innerParams.allowOutsideClick)) { + dismissWith(DismissReason.backdrop); + } + }; + }; + + function _main(userParams, mixinParams = {}) { + showWarningsForParams(Object.assign({}, mixinParams, userParams)); + + if (globalState.currentInstance) { + globalState.currentInstance._destroy(); + + if (isModal()) { + unsetAriaHidden(); + } + } + + globalState.currentInstance = this; + const innerParams = prepareParams(userParams, mixinParams); + setParameters(innerParams); + Object.freeze(innerParams); // clear the previous timer + + if (globalState.timeout) { + globalState.timeout.stop(); + delete globalState.timeout; + } // clear the restore focus timeout + + + clearTimeout(globalState.restoreFocusTimeout); + const domCache = populateDomCache(this); + render(this, innerParams); + privateProps.innerParams.set(this, innerParams); + return swalPromise(this, domCache, innerParams); + } + + const prepareParams = (userParams, mixinParams) => { + const templateParams = getTemplateParams(userParams); + const params = Object.assign({}, defaultParams, mixinParams, templateParams, userParams); // precedence is described in #2131 + + params.showClass = Object.assign({}, defaultParams.showClass, params.showClass); + params.hideClass = Object.assign({}, defaultParams.hideClass, params.hideClass); + return params; + }; + + const swalPromise = (instance, domCache, innerParams) => { + return new Promise(resolve => { + // functions to handle all closings/dismissals + const dismissWith = dismiss => { + instance.closePopup({ + isDismissed: true, + dismiss + }); + }; + + privateMethods.swalPromiseResolve.set(instance, resolve); + + domCache.confirmButton.onclick = () => handleConfirmButtonClick(instance); + + domCache.denyButton.onclick = () => handleDenyButtonClick(instance); + + domCache.cancelButton.onclick = () => handleCancelButtonClick(instance, dismissWith); + + domCache.closeButton.onclick = () => dismissWith(DismissReason.close); + + handlePopupClick(instance, domCache, dismissWith); + addKeydownHandler(instance, globalState, innerParams, dismissWith); + handleInputOptionsAndValue(instance, innerParams); + openPopup(innerParams); + setupTimer(globalState, innerParams, dismissWith); + initFocus(domCache, innerParams); // Scroll container to top on open (#1247, #1946) + + setTimeout(() => { + domCache.container.scrollTop = 0; + }); + }); + }; + + const populateDomCache = instance => { + const domCache = { + popup: getPopup(), + container: getContainer(), + actions: getActions(), + confirmButton: getConfirmButton(), + denyButton: getDenyButton(), + cancelButton: getCancelButton(), + loader: getLoader(), + closeButton: getCloseButton(), + validationMessage: getValidationMessage(), + progressSteps: getProgressSteps() + }; + privateProps.domCache.set(instance, domCache); + return domCache; + }; + + const setupTimer = (globalState$$1, innerParams, dismissWith) => { + const timerProgressBar = getTimerProgressBar(); + hide(timerProgressBar); + + if (innerParams.timer) { + globalState$$1.timeout = new Timer(() => { + dismissWith('timer'); + delete globalState$$1.timeout; + }, innerParams.timer); + + if (innerParams.timerProgressBar) { + show(timerProgressBar); + setTimeout(() => { + if (globalState$$1.timeout && globalState$$1.timeout.running) { + // timer can be already stopped or unset at this point + animateTimerProgressBar(innerParams.timer); + } + }); + } + } + }; + + const initFocus = (domCache, innerParams) => { + if (innerParams.toast) { + return; + } + + if (!callIfFunction(innerParams.allowEnterKey)) { + return blurActiveElement(); + } + + if (!focusButton(domCache, innerParams)) { + setFocus(innerParams, -1, 1); + } + }; + + const focusButton = (domCache, innerParams) => { + if (innerParams.focusDeny && isVisible(domCache.denyButton)) { + domCache.denyButton.focus(); + return true; + } + + if (innerParams.focusCancel && isVisible(domCache.cancelButton)) { + domCache.cancelButton.focus(); + return true; + } + + if (innerParams.focusConfirm && isVisible(domCache.confirmButton)) { + domCache.confirmButton.focus(); + return true; + } + + return false; + }; + + const blurActiveElement = () => { + if (document.activeElement && typeof document.activeElement.blur === 'function') { + document.activeElement.blur(); + } + }; + + /** + * Updates popup parameters. + */ + + function update(params) { + const popup = getPopup(); + const innerParams = privateProps.innerParams.get(this); + + if (!popup || hasClass(popup, innerParams.hideClass.popup)) { + return warn("You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup."); + } + + const validUpdatableParams = {}; // assign valid params from `params` to `defaults` + + Object.keys(params).forEach(param => { + if (Swal.isUpdatableParameter(param)) { + validUpdatableParams[param] = params[param]; + } else { + warn("Invalid parameter to update: \"".concat(param, "\". Updatable params are listed here: https://github.com/sweetalert2/sweetalert2/blob/master/src/utils/params.js\n\nIf you think this parameter should be updatable, request it here: https://github.com/sweetalert2/sweetalert2/issues/new?template=02_feature_request.md")); + } + }); + const updatedParams = Object.assign({}, innerParams, validUpdatableParams); + render(this, updatedParams); + privateProps.innerParams.set(this, updatedParams); + Object.defineProperties(this, { + params: { + value: Object.assign({}, this.params, params), + writable: false, + enumerable: true + } + }); + } + + function _destroy() { + const domCache = privateProps.domCache.get(this); + const innerParams = privateProps.innerParams.get(this); + + if (!innerParams) { + return; // This instance has already been destroyed + } // Check if there is another Swal closing + + + if (domCache.popup && globalState.swalCloseEventFinishedCallback) { + globalState.swalCloseEventFinishedCallback(); + delete globalState.swalCloseEventFinishedCallback; + } // Check if there is a swal disposal defer timer + + + if (globalState.deferDisposalTimer) { + clearTimeout(globalState.deferDisposalTimer); + delete globalState.deferDisposalTimer; + } + + if (typeof innerParams.didDestroy === 'function') { + innerParams.didDestroy(); + } + + disposeSwal(this); + } + + const disposeSwal = instance => { + // Unset this.params so GC will dispose it (#1569) + delete instance.params; // Unset globalState props so GC will dispose globalState (#1569) + + delete globalState.keydownHandler; + delete globalState.keydownTarget; // Unset WeakMaps so GC will be able to dispose them (#1569) + + unsetWeakMaps(privateProps); + unsetWeakMaps(privateMethods); // Unset currentInstance + + delete globalState.currentInstance; + }; + + const unsetWeakMaps = obj => { + for (const i in obj) { + obj[i] = new WeakMap(); + } + }; + + + + var instanceMethods = /*#__PURE__*/Object.freeze({ + hideLoading: hideLoading, + disableLoading: hideLoading, + getInput: getInput$1, + close: close, + closePopup: close, + closeModal: close, + closeToast: close, + enableButtons: enableButtons, + disableButtons: disableButtons, + enableInput: enableInput, + disableInput: disableInput, + showValidationMessage: showValidationMessage, + resetValidationMessage: resetValidationMessage$1, + getProgressSteps: getProgressSteps$1, + _main: _main, + update: update, + _destroy: _destroy + }); + + let currentInstance; + + class SweetAlert { + constructor(...args) { + // Prevent run in Node env + if (typeof window === 'undefined') { + return; + } + + currentInstance = this; + const outerParams = Object.freeze(this.constructor.argsToParams(args)); + Object.defineProperties(this, { + params: { + value: outerParams, + writable: false, + enumerable: true, + configurable: true + } + }); + + const promise = this._main(this.params); + + privateProps.promise.set(this, promise); + } // `catch` cannot be the name of a module export, so we define our thenable methods here instead + + + then(onFulfilled) { + const promise = privateProps.promise.get(this); + return promise.then(onFulfilled); + } + + finally(onFinally) { + const promise = privateProps.promise.get(this); + return promise.finally(onFinally); + } + + } // Assign instance methods from src/instanceMethods/*.js to prototype + + + Object.assign(SweetAlert.prototype, instanceMethods); // Assign static methods from src/staticMethods/*.js to constructor + + Object.assign(SweetAlert, staticMethods); // Proxy to instance methods to constructor, for now, for backwards compatibility + + Object.keys(instanceMethods).forEach(key => { + SweetAlert[key] = function (...args) { + if (currentInstance) { + return currentInstance[key](...args); + } + }; + }); + SweetAlert.DismissReason = DismissReason; + SweetAlert.version = '11.1.5'; + + const Swal = SweetAlert; + Swal.default = Swal; + + return Swal; + +})); +if (typeof this !== 'undefined' && this.Sweetalert2){ this.swal = this.sweetAlert = this.Swal = this.SweetAlert = this.Sweetalert2} + +"undefined"!=typeof document&&function(e,t){var n=e.createElement("style");if(e.getElementsByTagName("head")[0].appendChild(n),n.styleSheet)n.styleSheet.disabled||(n.styleSheet.cssText=t);else try{n.innerHTML=t}catch(e){n.innerText=t}}(document,".swal2-popup.swal2-toast{box-sizing:border-box;grid-column:1/4!important;grid-row:1/4!important;grid-template-columns:1fr 99fr 1fr;padding:1em;overflow-y:hidden;background:#fff;box-shadow:0 0 .625em #d9d9d9;pointer-events:all}.swal2-popup.swal2-toast>*{grid-column:2}.swal2-popup.swal2-toast .swal2-title{margin:1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-loading{justify-content:center}.swal2-popup.swal2-toast .swal2-input{height:2em;margin:.5em;font-size:1em}.swal2-popup.swal2-toast .swal2-validation-message{font-size:1em}.swal2-popup.swal2-toast .swal2-footer{margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-popup.swal2-toast .swal2-close{grid-column:3/3;grid-row:1/99;align-self:center;width:.8em;height:.8em;margin:0;font-size:2em}.swal2-popup.swal2-toast .swal2-html-container{margin:1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-html-container:empty{padding:0}.swal2-popup.swal2-toast .swal2-loader{grid-column:1;grid-row:1/99;align-self:center;width:2em;height:2em;margin:.25em}.swal2-popup.swal2-toast .swal2-icon{grid-column:1;grid-row:1/99;align-self:center;width:2em;min-width:2em;height:2em;margin:0 .5em 0 0}.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:700}.swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-popup.swal2-toast .swal2-actions{justify-content:flex-start;height:auto;margin:0;margin-top:.3125em;padding:0}.swal2-popup.swal2-toast .swal2-styled{margin:.25em .5em;padding:.4em .6em;font-size:1em}.swal2-popup.swal2-toast .swal2-styled:focus{box-shadow:0 0 0 1px #fff,0 0 0 3px rgba(100,150,200,.5)}.swal2-popup.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;transform:rotate(45deg);border-radius:50%}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.8em;left:-.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.25em;left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-popup.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{-webkit-animation:swal2-toast-animate-success-line-tip .75s;animation:swal2-toast-animate-success-line-tip .75s}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{-webkit-animation:swal2-toast-animate-success-line-long .75s;animation:swal2-toast-animate-success-line-long .75s}.swal2-popup.swal2-toast.swal2-show{-webkit-animation:swal2-toast-show .5s;animation:swal2-toast-show .5s}.swal2-popup.swal2-toast.swal2-hide{-webkit-animation:swal2-toast-hide .1s forwards;animation:swal2-toast-hide .1s forwards}.swal2-container{display:grid;position:fixed;z-index:1060;top:0;right:0;bottom:0;left:0;box-sizing:border-box;grid-template-areas:\"top-start top top-end\" \"center-start center center-end\" \"bottom-start bottom-center bottom-end\";grid-template-rows:minmax(-webkit-min-content,auto) minmax(-webkit-min-content,auto) minmax(-webkit-min-content,auto);grid-template-rows:minmax(min-content,auto) minmax(min-content,auto) minmax(min-content,auto);height:100%;padding:.625em;overflow-x:hidden;transition:background-color .1s;-webkit-overflow-scrolling:touch}.swal2-container.swal2-backdrop-show,.swal2-container.swal2-noanimation{background:rgba(0,0,0,.4)}.swal2-container.swal2-backdrop-hide{background:0 0!important}.swal2-container.swal2-bottom-start,.swal2-container.swal2-center-start,.swal2-container.swal2-top-start{grid-template-columns:minmax(0,1fr) auto auto}.swal2-container.swal2-bottom,.swal2-container.swal2-center,.swal2-container.swal2-top{grid-template-columns:auto minmax(0,1fr) auto}.swal2-container.swal2-bottom-end,.swal2-container.swal2-center-end,.swal2-container.swal2-top-end{grid-template-columns:auto auto minmax(0,1fr)}.swal2-container.swal2-top-start>.swal2-popup{align-self:start}.swal2-container.swal2-top>.swal2-popup{grid-column:2;align-self:start;justify-self:center}.swal2-container.swal2-top-end>.swal2-popup,.swal2-container.swal2-top-right>.swal2-popup{grid-column:3;align-self:start;justify-self:end}.swal2-container.swal2-center-left>.swal2-popup,.swal2-container.swal2-center-start>.swal2-popup{grid-row:2;align-self:center}.swal2-container.swal2-center>.swal2-popup{grid-column:2;grid-row:2;align-self:center;justify-self:center}.swal2-container.swal2-center-end>.swal2-popup,.swal2-container.swal2-center-right>.swal2-popup{grid-column:3;grid-row:2;align-self:center;justify-self:end}.swal2-container.swal2-bottom-left>.swal2-popup,.swal2-container.swal2-bottom-start>.swal2-popup{grid-column:1;grid-row:3;align-self:end}.swal2-container.swal2-bottom>.swal2-popup{grid-column:2;grid-row:3;justify-self:center;align-self:end}.swal2-container.swal2-bottom-end>.swal2-popup,.swal2-container.swal2-bottom-right>.swal2-popup{grid-column:3;grid-row:3;align-self:end;justify-self:end}.swal2-container.swal2-grow-fullscreen>.swal2-popup,.swal2-container.swal2-grow-row>.swal2-popup{grid-column:1/4;width:100%}.swal2-container.swal2-grow-column>.swal2-popup,.swal2-container.swal2-grow-fullscreen>.swal2-popup{grid-row:1/4;align-self:stretch}.swal2-container.swal2-no-transition{transition:none!important}.swal2-popup{display:none;position:relative;box-sizing:border-box;grid-template-columns:minmax(0,100%);width:32em;max-width:100%;padding:0 0 1.25em;border:none;border-radius:5px;background:#fff;color:#545454;font-family:inherit;font-size:1rem}.swal2-popup:focus{outline:0}.swal2-popup.swal2-loading{overflow-y:hidden}.swal2-title{position:relative;max-width:100%;margin:0;padding:.8em 1em 0;color:#595959;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;word-wrap:break-word}.swal2-actions{display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:center;width:auto;margin:1.25em auto 0;padding:0}.swal2-actions:not(.swal2-loading) .swal2-styled[disabled]{opacity:.4}.swal2-actions:not(.swal2-loading) .swal2-styled:hover{background-image:linear-gradient(rgba(0,0,0,.1),rgba(0,0,0,.1))}.swal2-actions:not(.swal2-loading) .swal2-styled:active{background-image:linear-gradient(rgba(0,0,0,.2),rgba(0,0,0,.2))}.swal2-loader{display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;-webkit-animation:swal2-rotate-loading 1.5s linear 0s infinite normal;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 transparent #2778c4 transparent}.swal2-styled{margin:.3125em;padding:.625em 1.1em;transition:box-shadow .1s;box-shadow:0 0 0 3px transparent;font-weight:500}.swal2-styled:not([disabled]){cursor:pointer}.swal2-styled.swal2-confirm{border:0;border-radius:.25em;background:initial;background-color:#7367f0;color:#fff;font-size:1em}.swal2-styled.swal2-confirm:focus{box-shadow:0 0 0 3px rgba(115,103,240,.5)}.swal2-styled.swal2-deny{border:0;border-radius:.25em;background:initial;background-color:#ea5455;color:#fff;font-size:1em}.swal2-styled.swal2-deny:focus{box-shadow:0 0 0 3px rgba(234,84,85,.5)}.swal2-styled.swal2-cancel{border:0;border-radius:.25em;background:initial;background-color:#6e7d88;color:#fff;font-size:1em}.swal2-styled.swal2-cancel:focus{box-shadow:0 0 0 3px rgba(110,125,136,.5)}.swal2-styled.swal2-default-outline:focus{box-shadow:0 0 0 3px rgba(100,150,200,.5)}.swal2-styled:focus{outline:0}.swal2-styled::-moz-focus-inner{border:0}.swal2-footer{justify-content:center;margin:1em 0 0;padding:1em 1em 0;border-top:1px solid #eee;color:#545454;font-size:1em}.swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;grid-column:auto!important;height:.25em;overflow:hidden;border-bottom-right-radius:5px;border-bottom-left-radius:5px}.swal2-timer-progress-bar{width:100%;height:.25em;background:rgba(0,0,0,.2)}.swal2-image{max-width:100%;margin:2em auto 1em}.swal2-close{z-index:2;align-items:center;justify-content:center;width:1.2em;height:1.2em;margin-top:0;margin-right:0;margin-bottom:-1.2em;padding:0;overflow:hidden;transition:color .1s,box-shadow .1s;border:none;border-radius:5px;background:0 0;color:#ccc;font-family:serif;font-family:monospace;font-size:2.5em;cursor:pointer;justify-self:end}.swal2-close:hover{transform:none;background:0 0;color:#f27474}.swal2-close:focus{outline:0;box-shadow:inset 0 0 0 3px rgba(100,150,200,.5)}.swal2-close::-moz-focus-inner{border:0}.swal2-html-container{z-index:1;justify-content:center;margin:1em 1.6em .3em;padding:0;overflow:auto;color:#545454;font-size:1.125em;font-weight:400;line-height:normal;text-align:center;word-wrap:break-word;word-break:break-word}.swal2-checkbox,.swal2-file,.swal2-input,.swal2-radio,.swal2-select,.swal2-textarea{margin:1em 2em 0}.swal2-file,.swal2-input,.swal2-textarea{box-sizing:border-box;width:auto;transition:border-color .1s,box-shadow .1s;border:1px solid #d9d9d9;border-radius:.1875em;background:inherit;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px transparent;color:inherit;font-size:1.125em}.swal2-file.swal2-inputerror,.swal2-input.swal2-inputerror,.swal2-textarea.swal2-inputerror{border-color:#f27474!important;box-shadow:0 0 2px #f27474!important}.swal2-file:focus,.swal2-input:focus,.swal2-textarea:focus{border:1px solid #b4dbed;outline:0;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(100,150,200,.5)}.swal2-file::-moz-placeholder,.swal2-input::-moz-placeholder,.swal2-textarea::-moz-placeholder{color:#ccc}.swal2-file:-ms-input-placeholder,.swal2-input:-ms-input-placeholder,.swal2-textarea:-ms-input-placeholder{color:#ccc}.swal2-file::placeholder,.swal2-input::placeholder,.swal2-textarea::placeholder{color:#ccc}.swal2-range{margin:1em 2em 0;background:#fff}.swal2-range input{width:80%}.swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}.swal2-range input,.swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}.swal2-input{height:2.625em;padding:0 .75em}.swal2-file{width:75%;margin-right:auto;margin-left:auto;background:inherit;font-size:1.125em}.swal2-textarea{height:6.75em;padding:.75em}.swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:inherit;color:inherit;font-size:1.125em}.swal2-checkbox,.swal2-radio{align-items:center;justify-content:center;background:#fff;color:inherit}.swal2-checkbox label,.swal2-radio label{margin:0 .6em;font-size:1.125em}.swal2-checkbox input,.swal2-radio input{flex-shrink:0;margin:0 .4em}.swal2-input-label{display:flex;justify-content:center;margin:1em auto 0}.swal2-validation-message{align-items:center;justify-content:center;margin:1em 0 0;padding:.625em;overflow:hidden;background:#f0f0f0;color:#666;font-size:1em;font-weight:300}.swal2-validation-message::before{content:\"!\";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}.swal2-icon{position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:2.5em auto .6em;border:.25em solid transparent;border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}.swal2-icon.swal2-error{border-color:#f27474;color:#f27474}.swal2-icon.swal2-error .swal2-x-mark{position:relative;flex-grow:1}.swal2-icon.swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}.swal2-icon.swal2-error.swal2-icon-show{-webkit-animation:swal2-animate-error-icon .5s;animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-error.swal2-icon-show .swal2-x-mark{-webkit-animation:swal2-animate-error-x-mark .5s;animation:swal2-animate-error-x-mark .5s}.swal2-icon.swal2-warning{border-color:#facea8;color:#f8bb86}.swal2-icon.swal2-info{border-color:#9de0f6;color:#3fc3ee}.swal2-icon.swal2-question{border-color:#c9dae1;color:#87adbd}.swal2-icon.swal2-success{border-color:#a5dc86;color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;transform:rotate(45deg);border-radius:50%}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}.swal2-icon.swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-.25em;left:-.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}.swal2-icon.swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}.swal2-icon.swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}.swal2-icon.swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-tip{-webkit-animation:swal2-animate-success-line-tip .75s;animation:swal2-animate-success-line-tip .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-long{-webkit-animation:swal2-animate-success-line-long .75s;animation:swal2-animate-success-line-long .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-circular-line-right{-webkit-animation:swal2-rotate-success-circular-line 4.25s ease-in;animation:swal2-rotate-success-circular-line 4.25s ease-in}.swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:1.25em auto;padding:0;background:inherit;font-weight:600}.swal2-progress-steps li{display:inline-block;position:relative}.swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:#add8e6;color:#fff}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:#add8e6}.swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}[class^=swal2]{-webkit-tap-highlight-color:transparent}.swal2-show{-webkit-animation:swal2-show .3s;animation:swal2-show .3s}.swal2-hide{-webkit-animation:swal2-hide .15s forwards;animation:swal2-hide .15s forwards}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{margin-right:initial;margin-left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}@-webkit-keyframes swal2-toast-show{0%{transform:translateY(-.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0)}}@keyframes swal2-toast-show{0%{transform:translateY(-.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0)}}@-webkit-keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@-webkit-keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@-webkit-keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@-webkit-keyframes swal2-show{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}100%{transform:scale(1)}}@keyframes swal2-show{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}100%{transform:scale(1)}}@-webkit-keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(.5);opacity:0}}@keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(.5);opacity:0}}@-webkit-keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@-webkit-keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@-webkit-keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@-webkit-keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@-webkit-keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0);opacity:1}}@-webkit-keyframes swal2-rotate-loading{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes swal2-rotate-loading{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto!important}body.swal2-no-backdrop .swal2-container{background-color:transparent!important;pointer-events:none}body.swal2-no-backdrop .swal2-container .swal2-popup{pointer-events:all}body.swal2-no-backdrop .swal2-container .swal2-modal{box-shadow:0 0 10px rgba(0,0,0,.4)}@media print{body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow-y:scroll!important}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .swal2-container{position:static!important}}body.swal2-toast-shown .swal2-container{box-sizing:border-box;width:360px;max-width:100%;background-color:transparent;pointer-events:none}body.swal2-toast-shown .swal2-container.swal2-top{top:0;right:auto;bottom:auto;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{top:0;right:0;bottom:auto;left:auto}body.swal2-toast-shown .swal2-container.swal2-top-left,body.swal2-toast-shown .swal2-container.swal2-top-start{top:0;right:auto;bottom:auto;left:0}body.swal2-toast-shown .swal2-container.swal2-center-left,body.swal2-toast-shown .swal2-container.swal2-center-start{top:50%;right:auto;bottom:auto;left:0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{top:50%;right:auto;bottom:auto;left:50%;transform:translate(-50%,-50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{top:50%;right:0;bottom:auto;left:auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-left,body.swal2-toast-shown .swal2-container.swal2-bottom-start{top:auto;right:auto;bottom:0;left:0}body.swal2-toast-shown .swal2-container.swal2-bottom{top:auto;right:auto;bottom:0;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{top:auto;right:0;bottom:0;left:auto}"); \ No newline at end of file diff --git a/modules/cms-kit/host/Volo.CmsKit.IdentityServer/wwwroot/libs/sweetalert2/sweetalert2.all.min.js b/modules/cms-kit/host/Volo.CmsKit.IdentityServer/wwwroot/libs/sweetalert2/sweetalert2.all.min.js new file mode 100644 index 0000000000..57ff7ff176 --- /dev/null +++ b/modules/cms-kit/host/Volo.CmsKit.IdentityServer/wwwroot/libs/sweetalert2/sweetalert2.all.min.js @@ -0,0 +1,2 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).Sweetalert2=t()}(this,function(){"use strict";const l=Object.freeze({cancel:"cancel",backdrop:"backdrop",close:"close",esc:"esc",timer:"timer"}),t="SweetAlert2:",o=e=>e.charAt(0).toUpperCase()+e.slice(1),a=e=>Array.prototype.slice.call(e),s=e=>{console.warn("".concat(t," ").concat("object"==typeof e?e.join(" "):e))},r=e=>{console.error("".concat(t," ").concat(e))},n=[],i=(e,t)=>{t='"'.concat(e,'" is deprecated and will be removed in the next major release. Please use "').concat(t,'" instead.'),n.includes(t)||(n.push(t),s(t))},c=e=>"function"==typeof e?e():e,u=e=>e&&"function"==typeof e.toPromise,d=e=>u(e)?e.toPromise():Promise.resolve(e),p=e=>e&&Promise.resolve(e)===e,m=e=>e instanceof Element||(e=>"object"==typeof e&&e.jquery)(e);var e=e=>{const t={};for(const n in e)t[e[n]]="swal2-"+e[n];return t};const h=e(["container","shown","height-auto","iosfix","popup","modal","no-backdrop","no-transition","toast","toast-shown","show","hide","close","title","html-container","actions","confirm","deny","cancel","default-outline","footer","icon","icon-content","image","input","file","range","select","radio","checkbox","label","textarea","inputerror","input-label","validation-message","progress-steps","active-progress-step","progress-step","progress-step-line","loader","loading","styled","top","top-start","top-end","top-left","top-right","center","center-start","center-end","center-left","center-right","bottom","bottom-start","bottom-end","bottom-left","bottom-right","grow-row","grow-column","grow-fullscreen","rtl","timer-progress-bar","timer-progress-bar-container","scrollbar-measure","icon-success","icon-warning","icon-info","icon-question","icon-error"]),g=e(["success","warning","info","question","error"]),b=()=>document.body.querySelector(".".concat(h.container)),f=e=>{const t=b();return t?t.querySelector(e):null},y=e=>f(".".concat(e)),v=()=>y(h.popup),w=()=>y(h.icon),C=()=>y(h.title),k=()=>y(h["html-container"]),A=()=>y(h.image),B=()=>y(h["progress-steps"]),x=()=>y(h["validation-message"]),P=()=>f(".".concat(h.actions," .").concat(h.confirm)),E=()=>f(".".concat(h.actions," .").concat(h.deny));const S=()=>f(".".concat(h.loader)),T=()=>f(".".concat(h.actions," .").concat(h.cancel)),L=()=>y(h.actions),O=()=>y(h.footer),j=()=>y(h["timer-progress-bar"]),D=()=>y(h.close),I=()=>{const e=a(v().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')).sort((e,t)=>(e=parseInt(e.getAttribute("tabindex")),(t=parseInt(t.getAttribute("tabindex")))"-1"!==e.getAttribute("tabindex"));return(t=>{const n=[];for(let e=0;eG(e))},M=()=>!H()&&!document.body.classList.contains(h["no-backdrop"]),H=()=>document.body.classList.contains(h["toast-shown"]);const q={previousBodyPadding:null},V=(t,e)=>{if(t.textContent="",e){const n=new DOMParser,o=n.parseFromString(e,"text/html");a(o.querySelector("head").childNodes).forEach(e=>{t.appendChild(e)}),a(o.querySelector("body").childNodes).forEach(e=>{t.appendChild(e)})}},N=(t,e)=>{if(!e)return!1;var n=e.split(/\s+/);for(let e=0;e{var o,i;if(o=e,i=t,a(o.classList).forEach(e=>{Object.values(h).includes(e)||Object.values(g).includes(e)||Object.values(i.showClass).includes(e)||o.classList.remove(e)}),t.customClass&&t.customClass[n]){if("string"!=typeof t.customClass[n]&&!t.customClass[n].forEach)return s("Invalid type of customClass.".concat(n,'! Expected string or iterable object, got "').concat(typeof t.customClass[n],'"'));W(e,t.customClass[n])}},F=(e,t)=>{if(!t)return null;switch(t){case"select":case"textarea":case"file":return K(e,h[t]);case"checkbox":return e.querySelector(".".concat(h.checkbox," input"));case"radio":return e.querySelector(".".concat(h.radio," input:checked"))||e.querySelector(".".concat(h.radio," input:first-child"));case"range":return e.querySelector(".".concat(h.range," input"));default:return K(e,h.input)}},R=e=>{var t;e.focus(),"file"!==e.type&&(t=e.value,e.value="",e.value=t)},z=(e,t,n)=>{e&&t&&(t="string"==typeof t?t.split(/\s+/).filter(Boolean):t).forEach(t=>{e.forEach?e.forEach(e=>{n?e.classList.add(t):e.classList.remove(t)}):n?e.classList.add(t):e.classList.remove(t)})},W=(e,t)=>{z(e,t,!0)},_=(e,t)=>{z(e,t,!1)},K=(t,n)=>{for(let e=0;e{(n=n==="".concat(parseInt(n))?parseInt(n):n)||0===parseInt(n)?e.style[t]="number"==typeof n?"".concat(n,"px"):n:e.style.removeProperty(t)},Z=(e,t="flex")=>{e.style.display=t},J=e=>{e.style.display="none"},X=(e,t,n,o)=>{const i=e.querySelector(t);i&&(i.style[n]=o)},$=(e,t,n)=>{t?Z(e,n):J(e)},G=e=>!(!e||!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)),Q=()=>!G(P())&&!G(E())&&!G(T()),ee=e=>!!(e.scrollHeight>e.clientHeight),te=e=>{const t=window.getComputedStyle(e);var n=parseFloat(t.getPropertyValue("animation-duration")||"0"),e=parseFloat(t.getPropertyValue("transition-duration")||"0");return 0{const n=j();G(n)&&(t&&(n.style.transition="none",n.style.width="100%"),setTimeout(()=>{n.style.transition="width ".concat(e/1e3,"s linear"),n.style.width="0%"},10))},oe=()=>"undefined"==typeof window||"undefined"==typeof document,ie='\n
            \n \n
              \n
              \n \n

              \n
              \n \n \n
              \n \n \n
              \n \n
              \n \n \n
              \n
              \n
              \n \n \n \n
              \n
              \n
              \n
              \n
              \n
              \n').replace(/(^|\n)\s*/g,""),ae=()=>{ln.isVisible()&&ln.resetValidationMessage()},se=e=>{var t=(()=>{const e=b();return!!e&&(e.remove(),_([document.documentElement,document.body],[h["no-backdrop"],h["toast-shown"],h["has-column"]]),!0)})();if(oe())r("SweetAlert2 requires document to initialize");else{const n=document.createElement("div");n.className=h.container,t&&W(n,h["no-transition"]),V(n,ie);const o="string"==typeof(t=e.target)?document.querySelector(t):t;o.appendChild(n),(e=>{const t=v();t.setAttribute("role",e.toast?"alert":"dialog"),t.setAttribute("aria-live",e.toast?"polite":"assertive"),e.toast||t.setAttribute("aria-modal","true")})(e),e=o,"rtl"===window.getComputedStyle(e).direction&&W(b(),h.rtl),(()=>{const e=v(),t=K(e,h.input),n=K(e,h.file),o=e.querySelector(".".concat(h.range," input")),i=e.querySelector(".".concat(h.range," output")),a=K(e,h.select),s=e.querySelector(".".concat(h.checkbox," input")),r=K(e,h.textarea);t.oninput=ae,n.onchange=ae,a.onchange=ae,s.onchange=ae,r.oninput=ae,o.oninput=()=>{ae(),i.value=o.value},o.onchange=()=>{ae(),o.nextSibling.value=o.value}})()}},re=(e,t)=>{e instanceof HTMLElement?t.appendChild(e):"object"==typeof e?ce(e,t):e&&V(t,e)},ce=(e,t)=>{e.jquery?le(t,e):V(t,e.toString())},le=(t,n)=>{if(t.textContent="",0 in n)for(let e=0;e in n;e++)t.appendChild(n[e].cloneNode(!0));else t.appendChild(n.cloneNode(!0))},ue=(()=>{if(oe())return!1;var e=document.createElement("div"),t={WebkitAnimation:"webkitAnimationEnd",OAnimation:"oAnimationEnd oanimationend",animation:"animationend"};for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&void 0!==e.style[n])return t[n];return!1})(),de=(e,t)=>{const n=L();var o=S(),i=P(),a=E(),s=T();(t.showConfirmButton||t.showDenyButton||t.showCancelButton?Z:J)(n),U(n,t,"actions"),pe(i,"confirm",t),pe(a,"deny",t),pe(s,"cancel",t),function(e,t,n,o){if(!o.buttonsStyling)return _([e,t,n],h.styled);W([e,t,n],h.styled),o.confirmButtonColor&&(e.style.backgroundColor=o.confirmButtonColor,W(e,h["default-outline"]));o.denyButtonColor&&(t.style.backgroundColor=o.denyButtonColor,W(t,h["default-outline"]));o.cancelButtonColor&&(n.style.backgroundColor=o.cancelButtonColor,W(n,h["default-outline"]))}(i,a,s,t),t.reverseButtons&&(n.insertBefore(s,o),n.insertBefore(a,o),n.insertBefore(i,o)),V(o,t.loaderHtml),U(o,t,"loader")};function pe(e,t,n){$(e,n["show".concat(o(t),"Button")],"inline-block"),V(e,n["".concat(t,"ButtonText")]),e.setAttribute("aria-label",n["".concat(t,"ButtonAriaLabel")]),e.className=h[t],U(e,n,"".concat(t,"Button")),W(e,n["".concat(t,"ButtonClass")])}const me=(e,t)=>{var n,o,i=b();i&&(o=i,"string"==typeof(n=t.backdrop)?o.style.background=n:n||W([document.documentElement,document.body],h["no-backdrop"]),o=i,(n=t.position)in h?W(o,h[n]):(s('The "position" parameter is not valid, defaulting to "center"'),W(o,h.center)),n=i,!(o=t.grow)||"string"!=typeof o||(o="grow-".concat(o))in h&&W(n,h[o]),U(i,t,"container"))};var he={promise:new WeakMap,innerParams:new WeakMap,domCache:new WeakMap};const ge=["input","file","range","select","radio","checkbox","textarea"],be=e=>{if(!ke[e.input])return r('Unexpected type of input! Expected "text", "email", "password", "number", "tel", "select", "radio", "checkbox", "textarea", "file" or "url", got "'.concat(e.input,'"'));var t=Ce(e.input);const n=ke[e.input](t,e);Z(n),setTimeout(()=>{R(n)})},fe=(e,t)=>{const n=F(v(),e);if(n){(t=>{for(let e=0;e{var t=Ce(e.input);e.customClass&&W(t,e.customClass.input)},ve=(e,t)=>{e.placeholder&&!t.inputPlaceholder||(e.placeholder=t.inputPlaceholder)},we=(e,t,n)=>{if(n.inputLabel){e.id=h.input;const i=document.createElement("label");var o=h["input-label"];i.setAttribute("for",e.id),i.className=o,W(i,n.customClass.inputLabel),i.innerText=n.inputLabel,t.insertAdjacentElement("beforebegin",i)}},Ce=e=>{e=h[e]||h.input;return K(v(),e)},ke={};ke.text=ke.email=ke.password=ke.number=ke.tel=ke.url=(e,t)=>("string"==typeof t.inputValue||"number"==typeof t.inputValue?e.value=t.inputValue:p(t.inputValue)||s('Unexpected type of inputValue! Expected "string", "number" or "Promise", got "'.concat(typeof t.inputValue,'"')),we(e,e,t),ve(e,t),e.type=t.input,e),ke.file=(e,t)=>(we(e,e,t),ve(e,t),e),ke.range=(e,t)=>{const n=e.querySelector("input"),o=e.querySelector("output");return n.value=t.inputValue,n.type=t.input,o.value=t.inputValue,we(n,e,t),e},ke.select=(e,t)=>{if(e.textContent="",t.inputPlaceholder){const n=document.createElement("option");V(n,t.inputPlaceholder),n.value="",n.disabled=!0,n.selected=!0,e.appendChild(n)}return we(e,e,t),e},ke.radio=e=>(e.textContent="",e),ke.checkbox=(e,t)=>{const n=F(v(),"checkbox");n.value=1,n.id=h.checkbox,n.checked=Boolean(t.inputValue);var o=e.querySelector("span");return V(o,t.inputPlaceholder),e},ke.textarea=(n,e)=>{n.value=e.inputValue,ve(n,e),we(n,n,e);return setTimeout(()=>{if("MutationObserver"in window){const t=parseInt(window.getComputedStyle(v()).width);new MutationObserver(()=>{var e,e=n.offsetWidth+(e=n,parseInt(window.getComputedStyle(e).marginLeft)+parseInt(window.getComputedStyle(e).marginRight));e>t?v().style.width="".concat(e,"px"):v().style.width=null}).observe(n,{attributes:!0,attributeFilter:["style"]})}}),n};const Ae=(e,t)=>{const n=k();U(n,t,"htmlContainer"),t.html?(re(t.html,n),Z(n,"block")):t.text?(n.textContent=t.text,Z(n,"block")):J(n),((e,o)=>{const i=v();e=he.innerParams.get(e);const a=!e||o.input!==e.input;ge.forEach(e=>{var t=h[e];const n=K(i,t);fe(e,o.inputAttributes),n.className=t,a&&J(n)}),o.input&&(a&&be(o),ye(o))})(e,t)},Be=(e,t)=>{for(const n in g)t.icon!==n&&_(e,g[n]);W(e,g[t.icon]),Ee(e,t),xe(),U(e,t,"icon")},xe=()=>{const e=v();var t=window.getComputedStyle(e).getPropertyValue("background-color");const n=e.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix");for(let e=0;e{var n;e.textContent="",t.iconHtml?V(e,Se(t.iconHtml)):"success"===t.icon?V(e,'\n
              \n \n
              \n
              \n '):"error"===t.icon?V(e,'\n \n \n \n \n '):(n={question:"?",warning:"!",info:"i"},V(e,Se(n[t.icon])))},Ee=(e,t)=>{if(t.iconColor){e.style.color=t.iconColor,e.style.borderColor=t.iconColor;for(const n of[".swal2-success-line-tip",".swal2-success-line-long",".swal2-x-mark-line-left",".swal2-x-mark-line-right"])X(e,n,"backgroundColor",t.iconColor);X(e,".swal2-success-ring","borderColor",t.iconColor)}},Se=e=>'
              ').concat(e,"
              "),Te=(e,o)=>{const i=B();if(!o.progressSteps||0===o.progressSteps.length)return J(i);Z(i),i.textContent="",o.currentProgressStep>=o.progressSteps.length&&s("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),o.progressSteps.forEach((e,t)=>{var n,e=(n=e,e=document.createElement("li"),W(e,h["progress-step"]),V(e,n),e);i.appendChild(e),t===o.currentProgressStep&&W(e,h["active-progress-step"]),t!==o.progressSteps.length-1&&(t=(e=>{const t=document.createElement("li");return W(t,h["progress-step-line"]),e.progressStepsDistance&&(t.style.width=e.progressStepsDistance),t})(o),i.appendChild(t))})},Le=(e,t)=>{e.className="".concat(h.popup," ").concat(G(e)?t.showClass.popup:""),t.toast?(W([document.documentElement,document.body],h["toast-shown"]),W(e,h.toast)):W(e,h.modal),U(e,t,"popup"),"string"==typeof t.customClass&&W(e,t.customClass),t.icon&&W(e,h["icon-".concat(t.icon)])},Oe=(e,t)=>{var n,o,i;(e=>{var t=b();const n=v();e.toast?(Y(t,"width",e.width),n.style.width="100%",n.insertBefore(S(),w())):Y(n,"width",e.width),Y(n,"padding",e.padding),e.background&&(n.style.background=e.background),J(x()),Le(n,e)})(t),me(0,t),Te(0,t),i=e,n=t,o=he.innerParams.get(i),i=w(),o&&n.icon===o.icon?(Pe(i,n),Be(i,n)):n.icon||n.iconHtml?n.icon&&-1===Object.keys(g).indexOf(n.icon)?(r('Unknown icon! Expected "success", "error", "warning", "info" or "question", got "'.concat(n.icon,'"')),J(i)):(Z(i),Pe(i,n),Be(i,n),W(i,n.showClass.icon)):J(i),(e=>{const t=A();if(!e.imageUrl)return J(t);Z(t,""),t.setAttribute("src",e.imageUrl),t.setAttribute("alt",e.imageAlt),Y(t,"width",e.imageWidth),Y(t,"height",e.imageHeight),t.className=h.image,U(t,e,"image")})(t),(e=>{const t=C();$(t,e.title||e.titleText,"block"),e.title&&re(e.title,t),e.titleText&&(t.innerText=e.titleText),U(t,e,"title")})(t),(e=>{const t=D();V(t,e.closeButtonHtml),U(t,e,"closeButton"),$(t,e.showCloseButton),t.setAttribute("aria-label",e.closeButtonAriaLabel)})(t),Ae(e,t),de(0,t),i=t,e=O(),$(e,i.footer),i.footer&&re(i.footer,e),U(e,i,"footer"),"function"==typeof t.didRender&&t.didRender(v())};const je=()=>P()&&P().click();const De=e=>{let t=v();t||ln.fire(),t=v();var n=S();H()?J(w()):Ie(t,e),Z(n),t.setAttribute("data-loading",!0),t.setAttribute("aria-busy",!0),t.focus()},Ie=(e,t)=>{var n=L();const o=S();!t&&G(P())&&(t=P()),Z(n),t&&(J(t),o.setAttribute("data-button-to-replace",t.className)),o.parentNode.insertBefore(o,t),W([e,n],h.loading)},Me={},He=o=>new Promise(e=>{if(!o)return e();var t=window.scrollX,n=window.scrollY;Me.restoreFocusTimeout=setTimeout(()=>{Me.previousActiveElement&&Me.previousActiveElement.focus?(Me.previousActiveElement.focus(),Me.previousActiveElement=null):document.body&&document.body.focus(),e()},100),window.scrollTo(t,n)});const qe=()=>{if(Me.timeout)return(()=>{const e=j();var t=parseInt(window.getComputedStyle(e).width);e.style.removeProperty("transition"),e.style.width="100%";var n=parseInt(window.getComputedStyle(e).width),n=parseInt(t/n*100);e.style.removeProperty("transition"),e.style.width="".concat(n,"%")})(),Me.timeout.stop()},Ve=()=>{if(Me.timeout){var e=Me.timeout.start();return ne(e),e}};let Ne=!1;const Ue={};const Fe=t=>{for(let e=t.target;e&&e!==document;e=e.parentNode)for(const o in Ue){var n=e.getAttribute(o);if(n)return void Ue[o].fire({template:n})}},Re={title:"",titleText:"",text:"",html:"",footer:"",icon:void 0,iconColor:void 0,iconHtml:void 0,template:void 0,toast:!1,showClass:{popup:"swal2-show",backdrop:"swal2-backdrop-show",icon:"swal2-icon-show"},hideClass:{popup:"swal2-hide",backdrop:"swal2-backdrop-hide",icon:"swal2-icon-hide"},customClass:{},target:"body",backdrop:!0,heightAuto:!0,allowOutsideClick:!0,allowEscapeKey:!0,allowEnterKey:!0,stopKeydownPropagation:!0,keydownListenerCapture:!1,showConfirmButton:!0,showDenyButton:!1,showCancelButton:!1,preConfirm:void 0,preDeny:void 0,confirmButtonText:"OK",confirmButtonAriaLabel:"",confirmButtonColor:void 0,denyButtonText:"No",denyButtonAriaLabel:"",denyButtonColor:void 0,cancelButtonText:"Cancel",cancelButtonAriaLabel:"",cancelButtonColor:void 0,buttonsStyling:!0,reverseButtons:!1,focusConfirm:!0,focusDeny:!1,focusCancel:!1,returnFocus:!0,showCloseButton:!1,closeButtonHtml:"×",closeButtonAriaLabel:"Close this dialog",loaderHtml:"",showLoaderOnConfirm:!1,showLoaderOnDeny:!1,imageUrl:void 0,imageWidth:void 0,imageHeight:void 0,imageAlt:"",timer:void 0,timerProgressBar:!1,width:void 0,padding:void 0,background:void 0,input:void 0,inputPlaceholder:"",inputLabel:"",inputValue:"",inputOptions:{},inputAutoTrim:!0,inputAttributes:{},inputValidator:void 0,returnInputValueOnDeny:!1,validationMessage:void 0,grow:!1,position:"center",progressSteps:[],currentProgressStep:void 0,progressStepsDistance:void 0,willOpen:void 0,didOpen:void 0,didRender:void 0,willClose:void 0,didClose:void 0,didDestroy:void 0,scrollbarPadding:!0},ze=["allowEscapeKey","allowOutsideClick","background","buttonsStyling","cancelButtonAriaLabel","cancelButtonColor","cancelButtonText","closeButtonAriaLabel","closeButtonHtml","confirmButtonAriaLabel","confirmButtonColor","confirmButtonText","currentProgressStep","customClass","denyButtonAriaLabel","denyButtonColor","denyButtonText","didClose","didDestroy","footer","hideClass","html","icon","iconColor","iconHtml","imageAlt","imageHeight","imageUrl","imageWidth","preConfirm","preDeny","progressSteps","returnFocus","reverseButtons","showCancelButton","showCloseButton","showConfirmButton","showDenyButton","text","title","titleText","willClose"],We={},_e=["allowOutsideClick","allowEnterKey","backdrop","focusConfirm","focusDeny","focusCancel","returnFocus","heightAuto","keydownListenerCapture"],Ke=e=>Object.prototype.hasOwnProperty.call(Re,e);const Ye=e=>We[e],Ze=e=>{!e.backdrop&&e.allowOutsideClick&&s('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`');for(const o in e)n=o,Ke(n)||s('Unknown parameter "'.concat(n,'"')),e.toast&&(t=o,_e.includes(t)&&s('The parameter "'.concat(t,'" is incompatible with toasts'))),t=o,Ye(t)&&i(t,Ye(t));var t,n};var Je=Object.freeze({isValidParameter:Ke,isUpdatableParameter:e=>-1!==ze.indexOf(e),isDeprecatedParameter:Ye,argsToParams:n=>{const o={};return"object"!=typeof n[0]||m(n[0])?["title","html","icon"].forEach((e,t)=>{t=n[t];"string"==typeof t||m(t)?o[e]=t:void 0!==t&&r("Unexpected type of ".concat(e,'! Expected "string" or "Element", got ').concat(typeof t))}):Object.assign(o,n[0]),o},isVisible:()=>G(v()),clickConfirm:je,clickDeny:()=>E()&&E().click(),clickCancel:()=>T()&&T().click(),getContainer:b,getPopup:v,getTitle:C,getHtmlContainer:k,getImage:A,getIcon:w,getInputLabel:()=>y(h["input-label"]),getCloseButton:D,getActions:L,getConfirmButton:P,getDenyButton:E,getCancelButton:T,getLoader:S,getFooter:O,getTimerProgressBar:j,getFocusableElements:I,getValidationMessage:x,isLoading:()=>v().hasAttribute("data-loading"),fire:function(...e){return new this(...e)},mixin:function(n){class e extends this{_main(e,t){return super._main(e,Object.assign({},n,t))}}return e},showLoading:De,enableLoading:De,getTimerLeft:()=>Me.timeout&&Me.timeout.getTimerLeft(),stopTimer:qe,resumeTimer:Ve,toggleTimer:()=>{var e=Me.timeout;return e&&(e.running?qe:Ve)()},increaseTimer:e=>{if(Me.timeout){e=Me.timeout.increase(e);return ne(e,!0),e}},isTimerRunning:()=>Me.timeout&&Me.timeout.isRunning(),bindClickHandler:function(e="data-swal-template"){Ue[e]=this,Ne||(document.body.addEventListener("click",Fe),Ne=!0)}});function Xe(){var e=he.innerParams.get(this);if(e){const t=he.domCache.get(this);J(t.loader),H()?e.icon&&Z(w()):(e=>{const t=e.popup.getElementsByClassName(e.loader.getAttribute("data-button-to-replace"));if(t.length)Z(t[0],"inline-block");else if(Q())J(e.actions)})(t),_([t.popup,t.actions],h.loading),t.popup.removeAttribute("aria-busy"),t.popup.removeAttribute("data-loading"),t.confirmButton.disabled=!1,t.denyButton.disabled=!1,t.cancelButton.disabled=!1}}const $e=()=>{null===q.previousBodyPadding&&document.body.scrollHeight>window.innerHeight&&(q.previousBodyPadding=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight="".concat(q.previousBodyPadding+(()=>{const e=document.createElement("div");e.className=h["scrollbar-measure"],document.body.appendChild(e);var t=e.getBoundingClientRect().width-e.clientWidth;return document.body.removeChild(e),t})(),"px"))},Ge=()=>{navigator.userAgent.match(/(CriOS|FxiOS|EdgiOS|YaBrowser|UCBrowser)/i)||v().scrollHeight>window.innerHeight-44&&(b().style.paddingBottom="".concat(44,"px"))},Qe=()=>{const e=b();let t;e.ontouchstart=e=>{t=et(e)},e.ontouchmove=e=>{t&&(e.preventDefault(),e.stopPropagation())}},et=e=>{var t=e.target,n=b();return!tt(e)&&!nt(e)&&(t===n||!(ee(n)||"INPUT"===t.tagName||"TEXTAREA"===t.tagName||ee(k())&&k().contains(t)))},tt=e=>e.touches&&e.touches.length&&"stylus"===e.touches[0].touchType,nt=e=>e.touches&&1{const e=a(document.body.children);e.forEach(e=>{e.hasAttribute("data-previous-aria-hidden")?(e.setAttribute("aria-hidden",e.getAttribute("data-previous-aria-hidden")),e.removeAttribute("data-previous-aria-hidden")):e.removeAttribute("aria-hidden")})};var it={swalPromiseResolve:new WeakMap};function at(e,t,n,o){H()?ct(e,o):(He(n).then(()=>ct(e,o)),Me.keydownTarget.removeEventListener("keydown",Me.keydownHandler,{capture:Me.keydownListenerCapture}),Me.keydownHandlerAdded=!1),/^((?!chrome|android).)*safari/i.test(navigator.userAgent)?(t.setAttribute("style","display:none !important"),t.removeAttribute("class"),t.innerHTML=""):t.remove(),M()&&(null!==q.previousBodyPadding&&(document.body.style.paddingRight="".concat(q.previousBodyPadding,"px"),q.previousBodyPadding=null),N(document.body,h.iosfix)&&(t=parseInt(document.body.style.top,10),_(document.body,h.iosfix),document.body.style.top="",document.body.scrollTop=-1*t),ot()),_([document.documentElement,document.body],[h.shown,h["height-auto"],h["no-backdrop"],h["toast-shown"]])}function st(e){var t=v();if(t){e=void 0!==(o=e)?Object.assign({isConfirmed:!1,isDenied:!1,isDismissed:!1},o):{isConfirmed:!1,isDenied:!1,isDismissed:!0};var n=he.innerParams.get(this);if(n&&!N(t,n.hideClass.popup)){const i=it.swalPromiseResolve.get(this);_(t,n.showClass.popup),W(t,n.hideClass.popup);var o=b();_(o,n.showClass.backdrop),W(o,n.hideClass.backdrop),((e,t,n)=>{const o=b(),i=ue&&te(t);if(typeof n.willClose==="function")n.willClose(t);if(i)rt(e,t,o,n.returnFocus,n.didClose);else at(e,o,n.returnFocus,n.didClose)})(this,t,n),i(e)}}}const rt=(e,t,n,o,i)=>{Me.swalCloseEventFinishedCallback=at.bind(null,e,n,o,i),t.addEventListener(ue,function(e){e.target===t&&(Me.swalCloseEventFinishedCallback(),delete Me.swalCloseEventFinishedCallback)})},ct=(e,t)=>{setTimeout(()=>{"function"==typeof t&&t.bind(e.params)(),e._destroy()})};function lt(e,t,n){const o=he.domCache.get(e);t.forEach(e=>{o[e].disabled=n})}function ut(e,t){if(!e)return!1;if("radio"===e.type){const n=e.parentNode.parentNode,o=n.querySelectorAll("input");for(let e=0;e/^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]{2,24}$/.test(e)?Promise.resolve():Promise.resolve(t||"Invalid email address"),url:(e,t)=>/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(e)?Promise.resolve():Promise.resolve(t||"Invalid URL")};function mt(e){var t,n;(t=e).inputValidator||Object.keys(pt).forEach(e=>{t.input===e&&(t.inputValidator=pt[e])}),e.showLoaderOnConfirm&&!e.preConfirm&&s("showLoaderOnConfirm is set to true, but preConfirm is not defined.\nshowLoaderOnConfirm should be used together with preConfirm, see usage example:\nhttps://sweetalert2.github.io/#ajax-request"),(n=e).target&&("string"!=typeof n.target||document.querySelector(n.target))&&("string"==typeof n.target||n.target.appendChild)||(s('Target parameter is not valid, defaulting to "body"'),n.target="body"),"string"==typeof e.title&&(e.title=e.title.split("\n").join("
              ")),se(e)}const ht=["swal-title","swal-html","swal-footer"],gt=e=>{e="string"==typeof e.template?document.querySelector(e.template):e.template;if(!e)return{};e=e.content;return kt(e),Object.assign(bt(e),ft(e),yt(e),vt(e),wt(e),Ct(e,ht))},bt=e=>{const o={};return a(e.querySelectorAll("swal-param")).forEach(e=>{At(e,["name","value"]);var t=e.getAttribute("name");let n=e.getAttribute("value");"boolean"==typeof Re[t]&&"false"===n&&(n=!1),"object"==typeof Re[t]&&(n=JSON.parse(n)),o[t]=n}),o},ft=e=>{const n={};return a(e.querySelectorAll("swal-button")).forEach(e=>{At(e,["type","color","aria-label"]);var t=e.getAttribute("type");n["".concat(t,"ButtonText")]=e.innerHTML,n["show".concat(o(t),"Button")]=!0,e.hasAttribute("color")&&(n["".concat(t,"ButtonColor")]=e.getAttribute("color")),e.hasAttribute("aria-label")&&(n["".concat(t,"ButtonAriaLabel")]=e.getAttribute("aria-label"))}),n},yt=e=>{const t={},n=e.querySelector("swal-image");return n&&(At(n,["src","width","height","alt"]),n.hasAttribute("src")&&(t.imageUrl=n.getAttribute("src")),n.hasAttribute("width")&&(t.imageWidth=n.getAttribute("width")),n.hasAttribute("height")&&(t.imageHeight=n.getAttribute("height")),n.hasAttribute("alt")&&(t.imageAlt=n.getAttribute("alt"))),t},vt=e=>{const t={},n=e.querySelector("swal-icon");return n&&(At(n,["type","color"]),n.hasAttribute("type")&&(t.icon=n.getAttribute("type")),n.hasAttribute("color")&&(t.iconColor=n.getAttribute("color")),t.iconHtml=n.innerHTML),t},wt=e=>{const n={},t=e.querySelector("swal-input");t&&(At(t,["type","label","placeholder","value"]),n.input=t.getAttribute("type")||"text",t.hasAttribute("label")&&(n.inputLabel=t.getAttribute("label")),t.hasAttribute("placeholder")&&(n.inputPlaceholder=t.getAttribute("placeholder")),t.hasAttribute("value")&&(n.inputValue=t.getAttribute("value")));e=e.querySelectorAll("swal-input-option");return e.length&&(n.inputOptions={},a(e).forEach(e=>{At(e,["value"]);var t=e.getAttribute("value"),e=e.innerHTML;n.inputOptions[t]=e})),n},Ct=(e,t)=>{const n={};for(const o in t){const i=t[o],a=e.querySelector(i);a&&(At(a,[]),n[i.replace(/^swal-/,"")]=a.innerHTML.trim())}return n},kt=e=>{const t=ht.concat(["swal-param","swal-button","swal-image","swal-icon","swal-input","swal-input-option"]);a(e.children).forEach(e=>{e=e.tagName.toLowerCase();-1===t.indexOf(e)&&s("Unrecognized element <".concat(e,">"))})},At=(t,n)=>{a(t.attributes).forEach(e=>{-1===n.indexOf(e.name)&&s(['Unrecognized attribute "'.concat(e.name,'" on <').concat(t.tagName.toLowerCase(),">."),"".concat(n.length?"Allowed attributes are: ".concat(n.join(", ")):"To set the value, use HTML within the element.")])})},Bt=e=>{const t=b(),n=v();"function"==typeof e.willOpen&&e.willOpen(n);var o=window.getComputedStyle(document.body).overflowY;St(t,n,e),setTimeout(()=>{Pt(t,n)},10),M()&&(Et(t,e.scrollbarPadding,o),(()=>{const e=a(document.body.children);e.forEach(e=>{e===b()||e.contains(b())||(e.hasAttribute("aria-hidden")&&e.setAttribute("data-previous-aria-hidden",e.getAttribute("aria-hidden")),e.setAttribute("aria-hidden","true"))})})()),H()||Me.previousActiveElement||(Me.previousActiveElement=document.activeElement),"function"==typeof e.didOpen&&setTimeout(()=>e.didOpen(n)),_(t,h["no-transition"])},xt=e=>{const t=v();if(e.target===t){const n=b();t.removeEventListener(ue,xt),n.style.overflowY="auto"}},Pt=(e,t)=>{ue&&te(t)?(e.style.overflowY="hidden",t.addEventListener(ue,xt)):e.style.overflowY="auto"},Et=(e,t,n)=>{var o;(/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream||"MacIntel"===navigator.platform&&1{e.scrollTop=0})},St=(e,t,n)=>{W(e,n.showClass.backdrop),t.style.setProperty("opacity","0","important"),Z(t,"grid"),setTimeout(()=>{W(t,n.showClass.popup),t.style.removeProperty("opacity")},10),W([document.documentElement,document.body],h.shown),n.heightAuto&&n.backdrop&&!n.toast&&W([document.documentElement,document.body],h["height-auto"])},Tt=e=>e.checked?1:0,Lt=e=>e.checked?e.value:null,Ot=e=>e.files.length?null!==e.getAttribute("multiple")?e.files:e.files[0]:null,jt=(t,n)=>{const o=v(),i=e=>It[n.input](o,Mt(e),n);u(n.inputOptions)||p(n.inputOptions)?(De(P()),d(n.inputOptions).then(e=>{t.hideLoading(),i(e)})):"object"==typeof n.inputOptions?i(n.inputOptions):r("Unexpected type of inputOptions! Expected object, Map or Promise, got ".concat(typeof n.inputOptions))},Dt=(t,n)=>{const o=t.getInput();J(o),d(n.inputValue).then(e=>{o.value="number"===n.input?parseFloat(e)||0:"".concat(e),Z(o),o.focus(),t.hideLoading()}).catch(e=>{r("Error in inputValue promise: ".concat(e)),o.value="",Z(o),o.focus(),t.hideLoading()})},It={select:(e,t,i)=>{const a=K(e,h.select),s=(e,t,n)=>{const o=document.createElement("option");o.value=n,V(o,t),o.selected=Ht(n,i.inputValue),e.appendChild(o)};t.forEach(e=>{var t=e[0];const n=e[1];if(Array.isArray(n)){const o=document.createElement("optgroup");o.label=t,o.disabled=!1,a.appendChild(o),n.forEach(e=>s(o,e[1],e[0]))}else s(a,n,t)}),a.focus()},radio:(e,t,a)=>{const s=K(e,h.radio);t.forEach(e=>{var t=e[0],e=e[1];const n=document.createElement("input"),o=document.createElement("label");n.type="radio",n.name=h.radio,n.value=t,Ht(t,a.inputValue)&&(n.checked=!0);const i=document.createElement("span");V(i,e),i.className=h.label,o.appendChild(n),o.appendChild(i),s.appendChild(o)});const n=s.querySelectorAll("input");n.length&&n[0].focus()}},Mt=n=>{const o=[];return"undefined"!=typeof Map&&n instanceof Map?n.forEach((e,t)=>{let n=e;"object"==typeof n&&(n=Mt(n)),o.push([t,n])}):Object.keys(n).forEach(e=>{let t=n[e];"object"==typeof t&&(t=Mt(t)),o.push([e,t])}),o},Ht=(e,t)=>t&&t.toString()===e.toString(),qt=(e,t)=>{var n=he.innerParams.get(e),o=((e,t)=>{const n=e.getInput();if(!n)return null;switch(t.input){case"checkbox":return Tt(n);case"radio":return Lt(n);case"file":return Ot(n);default:return t.inputAutoTrim?n.value.trim():n.value}})(e,n);n.inputValidator?Vt(e,o,t):e.getInput().checkValidity()?("deny"===t?Nt:Ft)(e,o):(e.enableButtons(),e.showValidationMessage(n.validationMessage))},Vt=(t,n,o)=>{const e=he.innerParams.get(t);t.disableInput();const i=Promise.resolve().then(()=>d(e.inputValidator(n,e.validationMessage)));i.then(e=>{t.enableButtons(),t.enableInput(),e?t.showValidationMessage(e):("deny"===o?Nt:Ft)(t,n)})},Nt=(t,n)=>{const e=he.innerParams.get(t||void 0);if(e.showLoaderOnDeny&&De(E()),e.preDeny){const o=Promise.resolve().then(()=>d(e.preDeny(n,e.validationMessage)));o.then(e=>{!1===e?t.hideLoading():t.closePopup({isDenied:!0,value:void 0===e?n:e})})}else t.closePopup({isDenied:!0,value:n})},Ut=(e,t)=>{e.closePopup({isConfirmed:!0,value:t})},Ft=(t,n)=>{const e=he.innerParams.get(t||void 0);if(e.showLoaderOnConfirm&&De(),e.preConfirm){t.resetValidationMessage();const o=Promise.resolve().then(()=>d(e.preConfirm(n,e.validationMessage)));o.then(e=>{G(x())||!1===e?t.hideLoading():Ut(t,void 0===e?n:e)})}else Ut(t,n)},Rt=(e,t,n)=>{const o=I();if(o.length)return(t+=n)===o.length?t=0:-1===t&&(t=o.length-1),o[t].focus();v().focus()},zt=["ArrowRight","ArrowDown"],Wt=["ArrowLeft","ArrowUp"],_t=(e,t,n)=>{var o=he.innerParams.get(e);o&&(o.stopKeydownPropagation&&t.stopPropagation(),"Enter"===t.key?Kt(e,t,o):"Tab"===t.key?Yt(t,o):[...zt,...Wt].includes(t.key)?Zt(t.key):"Escape"===t.key&&Jt(t,o,n))},Kt=(e,t,n)=>{t.isComposing||t.target&&e.getInput()&&t.target.outerHTML===e.getInput().outerHTML&&(["textarea","file"].includes(n.input)||(je(),t.preventDefault()))},Yt=(e,t)=>{var n=e.target,o=I();let i=-1;for(let e=0;e{const t=P(),n=E(),o=T();if([t,n,o].includes(document.activeElement)){e=zt.includes(e)?"nextElementSibling":"previousElementSibling";const i=document.activeElement[e];i&&i.focus()}},Jt=(e,t,n)=>{c(t.allowEscapeKey)&&(e.preventDefault(),n(l.esc))},Xt=(t,e,n)=>{e.popup.onclick=()=>{var e=he.innerParams.get(t);e.showConfirmButton||e.showDenyButton||e.showCancelButton||e.showCloseButton||e.timer||e.input||n(l.close)}};let $t=!1;const Gt=t=>{t.popup.onmousedown=()=>{t.container.onmouseup=function(e){t.container.onmouseup=void 0,e.target===t.container&&($t=!0)}}},Qt=t=>{t.container.onmousedown=()=>{t.popup.onmouseup=function(e){t.popup.onmouseup=void 0,e.target!==t.popup&&!t.popup.contains(e.target)||($t=!0)}}},en=(n,o,i)=>{o.container.onclick=e=>{var t=he.innerParams.get(n);$t?$t=!1:e.target===o.container&&c(t.allowOutsideClick)&&i(l.backdrop)}};const tn=(e,t,n)=>{var o=j();J(o),t.timer&&(e.timeout=new dt(()=>{n("timer"),delete e.timeout},t.timer),t.timerProgressBar&&(Z(o),setTimeout(()=>{e.timeout&&e.timeout.running&&ne(t.timer)})))},nn=(e,t)=>{if(!t.toast)return c(t.allowEnterKey)?void(on(e,t)||Rt(0,-1,1)):an()},on=(e,t)=>t.focusDeny&&G(e.denyButton)?(e.denyButton.focus(),!0):t.focusCancel&&G(e.cancelButton)?(e.cancelButton.focus(),!0):!(!t.focusConfirm||!G(e.confirmButton))&&(e.confirmButton.focus(),!0),an=()=>{document.activeElement&&"function"==typeof document.activeElement.blur&&document.activeElement.blur()};const sn=e=>{for(const t in e)e[t]=new WeakMap};e=Object.freeze({hideLoading:Xe,disableLoading:Xe,getInput:function(e){var t=he.innerParams.get(e||this);return(e=he.domCache.get(e||this))?F(e.popup,t.input):null},close:st,closePopup:st,closeModal:st,closeToast:st,enableButtons:function(){lt(this,["confirmButton","denyButton","cancelButton"],!1)},disableButtons:function(){lt(this,["confirmButton","denyButton","cancelButton"],!0)},enableInput:function(){return ut(this.getInput(),!1)},disableInput:function(){return ut(this.getInput(),!0)},showValidationMessage:function(e){const t=he.domCache.get(this);var n=he.innerParams.get(this);V(t.validationMessage,e),t.validationMessage.className=h["validation-message"],n.customClass&&n.customClass.validationMessage&&W(t.validationMessage,n.customClass.validationMessage),Z(t.validationMessage);const o=this.getInput();o&&(o.setAttribute("aria-invalid",!0),o.setAttribute("aria-describedby",h["validation-message"]),R(o),W(o,h.inputerror))},resetValidationMessage:function(){var e=he.domCache.get(this);e.validationMessage&&J(e.validationMessage);const t=this.getInput();t&&(t.removeAttribute("aria-invalid"),t.removeAttribute("aria-describedby"),_(t,h.inputerror))},getProgressSteps:function(){return he.domCache.get(this).progressSteps},_main:function(e,t={}){Ze(Object.assign({},t,e)),Me.currentInstance&&(Me.currentInstance._destroy(),M()&&ot()),Me.currentInstance=this,mt(e=((e,t)=>{const n=gt(e),o=Object.assign({},Re,t,n,e);return o.showClass=Object.assign({},Re.showClass,o.showClass),o.hideClass=Object.assign({},Re.hideClass,o.hideClass),o})(e,t)),Object.freeze(e),Me.timeout&&(Me.timeout.stop(),delete Me.timeout),clearTimeout(Me.restoreFocusTimeout);var s,r,c,t=(e=>{const t={popup:v(),container:b(),actions:L(),confirmButton:P(),denyButton:E(),cancelButton:T(),loader:S(),closeButton:D(),validationMessage:x(),progressSteps:B()};return he.domCache.set(e,t),t})(this);return Oe(this,e),he.innerParams.set(this,e),s=this,r=t,c=e,new Promise(e=>{const t=e=>{s.closePopup({isDismissed:!0,dismiss:e})};var n,o,i,a;it.swalPromiseResolve.set(s,e),r.confirmButton.onclick=()=>(e=>{var t=he.innerParams.get(e);e.disableButtons(),t.input?qt(e,"confirm"):Ft(e,!0)})(s),r.denyButton.onclick=()=>(e=>{var t=he.innerParams.get(e);e.disableButtons(),t.returnInputValueOnDeny?qt(e,"deny"):Nt(e,!1)})(s),r.cancelButton.onclick=()=>((e,t)=>{e.disableButtons(),t(l.cancel)})(s,t),r.closeButton.onclick=()=>t(l.close),n=s,a=r,e=t,he.innerParams.get(n).toast?Xt(n,a,e):(Gt(a),Qt(a),en(n,a,e)),o=s,a=Me,e=c,i=t,a.keydownTarget&&a.keydownHandlerAdded&&(a.keydownTarget.removeEventListener("keydown",a.keydownHandler,{capture:a.keydownListenerCapture}),a.keydownHandlerAdded=!1),e.toast||(a.keydownHandler=e=>_t(o,e,i),a.keydownTarget=e.keydownListenerCapture?window:v(),a.keydownListenerCapture=e.keydownListenerCapture,a.keydownTarget.addEventListener("keydown",a.keydownHandler,{capture:a.keydownListenerCapture}),a.keydownHandlerAdded=!0),e=s,"select"===(a=c).input||"radio"===a.input?jt(e,a):["text","email","number","tel","textarea"].includes(a.input)&&(u(a.inputValue)||p(a.inputValue))&&(De(P()),Dt(e,a)),Bt(c),tn(Me,c,t),nn(r,c),setTimeout(()=>{r.container.scrollTop=0})})},update:function(t){var e=v(),n=he.innerParams.get(this);if(!e||N(e,n.hideClass.popup))return s("You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup.");const o={};Object.keys(t).forEach(e=>{ln.isUpdatableParameter(e)?o[e]=t[e]:s('Invalid parameter to update: "'.concat(e,'". Updatable params are listed here: https://github.com/sweetalert2/sweetalert2/blob/master/src/utils/params.js\n\nIf you think this parameter should be updatable, request it here: https://github.com/sweetalert2/sweetalert2/issues/new?template=02_feature_request.md'))}),n=Object.assign({},n,o),Oe(this,n),he.innerParams.set(this,n),Object.defineProperties(this,{params:{value:Object.assign({},this.params,t),writable:!1,enumerable:!0}})},_destroy:function(){var e=he.domCache.get(this);const t=he.innerParams.get(this);t&&(e.popup&&Me.swalCloseEventFinishedCallback&&(Me.swalCloseEventFinishedCallback(),delete Me.swalCloseEventFinishedCallback),Me.deferDisposalTimer&&(clearTimeout(Me.deferDisposalTimer),delete Me.deferDisposalTimer),"function"==typeof t.didDestroy&&t.didDestroy(),delete this.params,delete Me.keydownHandler,delete Me.keydownTarget,sn(he),sn(it),delete Me.currentInstance)}});let rn;class cn{constructor(...e){"undefined"!=typeof window&&(rn=this,e=Object.freeze(this.constructor.argsToParams(e)),Object.defineProperties(this,{params:{value:e,writable:!1,enumerable:!0,configurable:!0}}),e=this._main(this.params),he.promise.set(this,e))}then(e){const t=he.promise.get(this);return t.then(e)}finally(e){const t=he.promise.get(this);return t.finally(e)}}Object.assign(cn.prototype,e),Object.assign(cn,Je),Object.keys(e).forEach(t=>{cn[t]=function(...e){if(rn)return rn[t](...e)}}),cn.DismissReason=l,cn.version="11.1.5";const ln=cn;return ln.default=ln,ln}),void 0!==this&&this.Sweetalert2&&(this.swal=this.sweetAlert=this.Swal=this.SweetAlert=this.Sweetalert2); +"undefined"!=typeof document&&function(e,t){var n=e.createElement("style");if(e.getElementsByTagName("head")[0].appendChild(n),n.styleSheet)n.styleSheet.disabled||(n.styleSheet.cssText=t);else try{n.innerHTML=t}catch(e){n.innerText=t}}(document,".swal2-popup.swal2-toast{box-sizing:border-box;grid-column:1/4!important;grid-row:1/4!important;grid-template-columns:1fr 99fr 1fr;padding:1em;overflow-y:hidden;background:#fff;box-shadow:0 0 .625em #d9d9d9;pointer-events:all}.swal2-popup.swal2-toast>*{grid-column:2}.swal2-popup.swal2-toast .swal2-title{margin:1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-loading{justify-content:center}.swal2-popup.swal2-toast .swal2-input{height:2em;margin:.5em;font-size:1em}.swal2-popup.swal2-toast .swal2-validation-message{font-size:1em}.swal2-popup.swal2-toast .swal2-footer{margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-popup.swal2-toast .swal2-close{grid-column:3/3;grid-row:1/99;align-self:center;width:.8em;height:.8em;margin:0;font-size:2em}.swal2-popup.swal2-toast .swal2-html-container{margin:1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-html-container:empty{padding:0}.swal2-popup.swal2-toast .swal2-loader{grid-column:1;grid-row:1/99;align-self:center;width:2em;height:2em;margin:.25em}.swal2-popup.swal2-toast .swal2-icon{grid-column:1;grid-row:1/99;align-self:center;width:2em;min-width:2em;height:2em;margin:0 .5em 0 0}.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:700}.swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-popup.swal2-toast .swal2-actions{justify-content:flex-start;height:auto;margin:0;margin-top:.3125em;padding:0}.swal2-popup.swal2-toast .swal2-styled{margin:.25em .5em;padding:.4em .6em;font-size:1em}.swal2-popup.swal2-toast .swal2-styled:focus{box-shadow:0 0 0 1px #fff,0 0 0 3px rgba(100,150,200,.5)}.swal2-popup.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;transform:rotate(45deg);border-radius:50%}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.8em;left:-.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.25em;left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-popup.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{-webkit-animation:swal2-toast-animate-success-line-tip .75s;animation:swal2-toast-animate-success-line-tip .75s}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{-webkit-animation:swal2-toast-animate-success-line-long .75s;animation:swal2-toast-animate-success-line-long .75s}.swal2-popup.swal2-toast.swal2-show{-webkit-animation:swal2-toast-show .5s;animation:swal2-toast-show .5s}.swal2-popup.swal2-toast.swal2-hide{-webkit-animation:swal2-toast-hide .1s forwards;animation:swal2-toast-hide .1s forwards}.swal2-container{display:grid;position:fixed;z-index:1060;top:0;right:0;bottom:0;left:0;box-sizing:border-box;grid-template-areas:\"top-start top top-end\" \"center-start center center-end\" \"bottom-start bottom-center bottom-end\";grid-template-rows:minmax(-webkit-min-content,auto) minmax(-webkit-min-content,auto) minmax(-webkit-min-content,auto);grid-template-rows:minmax(min-content,auto) minmax(min-content,auto) minmax(min-content,auto);height:100%;padding:.625em;overflow-x:hidden;transition:background-color .1s;-webkit-overflow-scrolling:touch}.swal2-container.swal2-backdrop-show,.swal2-container.swal2-noanimation{background:rgba(0,0,0,.4)}.swal2-container.swal2-backdrop-hide{background:0 0!important}.swal2-container.swal2-bottom-start,.swal2-container.swal2-center-start,.swal2-container.swal2-top-start{grid-template-columns:minmax(0,1fr) auto auto}.swal2-container.swal2-bottom,.swal2-container.swal2-center,.swal2-container.swal2-top{grid-template-columns:auto minmax(0,1fr) auto}.swal2-container.swal2-bottom-end,.swal2-container.swal2-center-end,.swal2-container.swal2-top-end{grid-template-columns:auto auto minmax(0,1fr)}.swal2-container.swal2-top-start>.swal2-popup{align-self:start}.swal2-container.swal2-top>.swal2-popup{grid-column:2;align-self:start;justify-self:center}.swal2-container.swal2-top-end>.swal2-popup,.swal2-container.swal2-top-right>.swal2-popup{grid-column:3;align-self:start;justify-self:end}.swal2-container.swal2-center-left>.swal2-popup,.swal2-container.swal2-center-start>.swal2-popup{grid-row:2;align-self:center}.swal2-container.swal2-center>.swal2-popup{grid-column:2;grid-row:2;align-self:center;justify-self:center}.swal2-container.swal2-center-end>.swal2-popup,.swal2-container.swal2-center-right>.swal2-popup{grid-column:3;grid-row:2;align-self:center;justify-self:end}.swal2-container.swal2-bottom-left>.swal2-popup,.swal2-container.swal2-bottom-start>.swal2-popup{grid-column:1;grid-row:3;align-self:end}.swal2-container.swal2-bottom>.swal2-popup{grid-column:2;grid-row:3;justify-self:center;align-self:end}.swal2-container.swal2-bottom-end>.swal2-popup,.swal2-container.swal2-bottom-right>.swal2-popup{grid-column:3;grid-row:3;align-self:end;justify-self:end}.swal2-container.swal2-grow-fullscreen>.swal2-popup,.swal2-container.swal2-grow-row>.swal2-popup{grid-column:1/4;width:100%}.swal2-container.swal2-grow-column>.swal2-popup,.swal2-container.swal2-grow-fullscreen>.swal2-popup{grid-row:1/4;align-self:stretch}.swal2-container.swal2-no-transition{transition:none!important}.swal2-popup{display:none;position:relative;box-sizing:border-box;grid-template-columns:minmax(0,100%);width:32em;max-width:100%;padding:0 0 1.25em;border:none;border-radius:5px;background:#fff;color:#545454;font-family:inherit;font-size:1rem}.swal2-popup:focus{outline:0}.swal2-popup.swal2-loading{overflow-y:hidden}.swal2-title{position:relative;max-width:100%;margin:0;padding:.8em 1em 0;color:#595959;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;word-wrap:break-word}.swal2-actions{display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:center;width:auto;margin:1.25em auto 0;padding:0}.swal2-actions:not(.swal2-loading) .swal2-styled[disabled]{opacity:.4}.swal2-actions:not(.swal2-loading) .swal2-styled:hover{background-image:linear-gradient(rgba(0,0,0,.1),rgba(0,0,0,.1))}.swal2-actions:not(.swal2-loading) .swal2-styled:active{background-image:linear-gradient(rgba(0,0,0,.2),rgba(0,0,0,.2))}.swal2-loader{display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;-webkit-animation:swal2-rotate-loading 1.5s linear 0s infinite normal;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 transparent #2778c4 transparent}.swal2-styled{margin:.3125em;padding:.625em 1.1em;transition:box-shadow .1s;box-shadow:0 0 0 3px transparent;font-weight:500}.swal2-styled:not([disabled]){cursor:pointer}.swal2-styled.swal2-confirm{border:0;border-radius:.25em;background:initial;background-color:#7367f0;color:#fff;font-size:1em}.swal2-styled.swal2-confirm:focus{box-shadow:0 0 0 3px rgba(115,103,240,.5)}.swal2-styled.swal2-deny{border:0;border-radius:.25em;background:initial;background-color:#ea5455;color:#fff;font-size:1em}.swal2-styled.swal2-deny:focus{box-shadow:0 0 0 3px rgba(234,84,85,.5)}.swal2-styled.swal2-cancel{border:0;border-radius:.25em;background:initial;background-color:#6e7d88;color:#fff;font-size:1em}.swal2-styled.swal2-cancel:focus{box-shadow:0 0 0 3px rgba(110,125,136,.5)}.swal2-styled.swal2-default-outline:focus{box-shadow:0 0 0 3px rgba(100,150,200,.5)}.swal2-styled:focus{outline:0}.swal2-styled::-moz-focus-inner{border:0}.swal2-footer{justify-content:center;margin:1em 0 0;padding:1em 1em 0;border-top:1px solid #eee;color:#545454;font-size:1em}.swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;grid-column:auto!important;height:.25em;overflow:hidden;border-bottom-right-radius:5px;border-bottom-left-radius:5px}.swal2-timer-progress-bar{width:100%;height:.25em;background:rgba(0,0,0,.2)}.swal2-image{max-width:100%;margin:2em auto 1em}.swal2-close{z-index:2;align-items:center;justify-content:center;width:1.2em;height:1.2em;margin-top:0;margin-right:0;margin-bottom:-1.2em;padding:0;overflow:hidden;transition:color .1s,box-shadow .1s;border:none;border-radius:5px;background:0 0;color:#ccc;font-family:serif;font-family:monospace;font-size:2.5em;cursor:pointer;justify-self:end}.swal2-close:hover{transform:none;background:0 0;color:#f27474}.swal2-close:focus{outline:0;box-shadow:inset 0 0 0 3px rgba(100,150,200,.5)}.swal2-close::-moz-focus-inner{border:0}.swal2-html-container{z-index:1;justify-content:center;margin:1em 1.6em .3em;padding:0;overflow:auto;color:#545454;font-size:1.125em;font-weight:400;line-height:normal;text-align:center;word-wrap:break-word;word-break:break-word}.swal2-checkbox,.swal2-file,.swal2-input,.swal2-radio,.swal2-select,.swal2-textarea{margin:1em 2em 0}.swal2-file,.swal2-input,.swal2-textarea{box-sizing:border-box;width:auto;transition:border-color .1s,box-shadow .1s;border:1px solid #d9d9d9;border-radius:.1875em;background:inherit;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px transparent;color:inherit;font-size:1.125em}.swal2-file.swal2-inputerror,.swal2-input.swal2-inputerror,.swal2-textarea.swal2-inputerror{border-color:#f27474!important;box-shadow:0 0 2px #f27474!important}.swal2-file:focus,.swal2-input:focus,.swal2-textarea:focus{border:1px solid #b4dbed;outline:0;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(100,150,200,.5)}.swal2-file::-moz-placeholder,.swal2-input::-moz-placeholder,.swal2-textarea::-moz-placeholder{color:#ccc}.swal2-file:-ms-input-placeholder,.swal2-input:-ms-input-placeholder,.swal2-textarea:-ms-input-placeholder{color:#ccc}.swal2-file::placeholder,.swal2-input::placeholder,.swal2-textarea::placeholder{color:#ccc}.swal2-range{margin:1em 2em 0;background:#fff}.swal2-range input{width:80%}.swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}.swal2-range input,.swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}.swal2-input{height:2.625em;padding:0 .75em}.swal2-file{width:75%;margin-right:auto;margin-left:auto;background:inherit;font-size:1.125em}.swal2-textarea{height:6.75em;padding:.75em}.swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:inherit;color:inherit;font-size:1.125em}.swal2-checkbox,.swal2-radio{align-items:center;justify-content:center;background:#fff;color:inherit}.swal2-checkbox label,.swal2-radio label{margin:0 .6em;font-size:1.125em}.swal2-checkbox input,.swal2-radio input{flex-shrink:0;margin:0 .4em}.swal2-input-label{display:flex;justify-content:center;margin:1em auto 0}.swal2-validation-message{align-items:center;justify-content:center;margin:1em 0 0;padding:.625em;overflow:hidden;background:#f0f0f0;color:#666;font-size:1em;font-weight:300}.swal2-validation-message::before{content:\"!\";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}.swal2-icon{position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:2.5em auto .6em;border:.25em solid transparent;border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}.swal2-icon.swal2-error{border-color:#f27474;color:#f27474}.swal2-icon.swal2-error .swal2-x-mark{position:relative;flex-grow:1}.swal2-icon.swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}.swal2-icon.swal2-error.swal2-icon-show{-webkit-animation:swal2-animate-error-icon .5s;animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-error.swal2-icon-show .swal2-x-mark{-webkit-animation:swal2-animate-error-x-mark .5s;animation:swal2-animate-error-x-mark .5s}.swal2-icon.swal2-warning{border-color:#facea8;color:#f8bb86}.swal2-icon.swal2-info{border-color:#9de0f6;color:#3fc3ee}.swal2-icon.swal2-question{border-color:#c9dae1;color:#87adbd}.swal2-icon.swal2-success{border-color:#a5dc86;color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;transform:rotate(45deg);border-radius:50%}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}.swal2-icon.swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-.25em;left:-.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}.swal2-icon.swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}.swal2-icon.swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}.swal2-icon.swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-tip{-webkit-animation:swal2-animate-success-line-tip .75s;animation:swal2-animate-success-line-tip .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-long{-webkit-animation:swal2-animate-success-line-long .75s;animation:swal2-animate-success-line-long .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-circular-line-right{-webkit-animation:swal2-rotate-success-circular-line 4.25s ease-in;animation:swal2-rotate-success-circular-line 4.25s ease-in}.swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:1.25em auto;padding:0;background:inherit;font-weight:600}.swal2-progress-steps li{display:inline-block;position:relative}.swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:#add8e6;color:#fff}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:#add8e6}.swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}[class^=swal2]{-webkit-tap-highlight-color:transparent}.swal2-show{-webkit-animation:swal2-show .3s;animation:swal2-show .3s}.swal2-hide{-webkit-animation:swal2-hide .15s forwards;animation:swal2-hide .15s forwards}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{margin-right:initial;margin-left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}@-webkit-keyframes swal2-toast-show{0%{transform:translateY(-.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0)}}@keyframes swal2-toast-show{0%{transform:translateY(-.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0)}}@-webkit-keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@-webkit-keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@-webkit-keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@-webkit-keyframes swal2-show{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}100%{transform:scale(1)}}@keyframes swal2-show{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}100%{transform:scale(1)}}@-webkit-keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(.5);opacity:0}}@keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(.5);opacity:0}}@-webkit-keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@-webkit-keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@-webkit-keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@-webkit-keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@-webkit-keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0);opacity:1}}@-webkit-keyframes swal2-rotate-loading{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes swal2-rotate-loading{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto!important}body.swal2-no-backdrop .swal2-container{background-color:transparent!important;pointer-events:none}body.swal2-no-backdrop .swal2-container .swal2-popup{pointer-events:all}body.swal2-no-backdrop .swal2-container .swal2-modal{box-shadow:0 0 10px rgba(0,0,0,.4)}@media print{body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow-y:scroll!important}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .swal2-container{position:static!important}}body.swal2-toast-shown .swal2-container{box-sizing:border-box;width:360px;max-width:100%;background-color:transparent;pointer-events:none}body.swal2-toast-shown .swal2-container.swal2-top{top:0;right:auto;bottom:auto;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{top:0;right:0;bottom:auto;left:auto}body.swal2-toast-shown .swal2-container.swal2-top-left,body.swal2-toast-shown .swal2-container.swal2-top-start{top:0;right:auto;bottom:auto;left:0}body.swal2-toast-shown .swal2-container.swal2-center-left,body.swal2-toast-shown .swal2-container.swal2-center-start{top:50%;right:auto;bottom:auto;left:0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{top:50%;right:auto;bottom:auto;left:50%;transform:translate(-50%,-50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{top:50%;right:0;bottom:auto;left:auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-left,body.swal2-toast-shown .swal2-container.swal2-bottom-start{top:auto;right:auto;bottom:0;left:0}body.swal2-toast-shown .swal2-container.swal2-bottom{top:auto;right:auto;bottom:0;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{top:auto;right:0;bottom:0;left:auto}"); \ No newline at end of file diff --git a/modules/cms-kit/host/Volo.CmsKit.IdentityServer/wwwroot/libs/sweetalert2/sweetalert2.css b/modules/cms-kit/host/Volo.CmsKit.IdentityServer/wwwroot/libs/sweetalert2/sweetalert2.css new file mode 100644 index 0000000000..1feb7a5581 --- /dev/null +++ b/modules/cms-kit/host/Volo.CmsKit.IdentityServer/wwwroot/libs/sweetalert2/sweetalert2.css @@ -0,0 +1,1319 @@ +.swal2-popup.swal2-toast { + box-sizing: border-box; + grid-column: 1/4 !important; + grid-row: 1/4 !important; + grid-template-columns: 1fr 99fr 1fr; + padding: 1em; + overflow-y: hidden; + background: #fff; + box-shadow: 0 0 0.625em #d9d9d9; + pointer-events: all; +} +.swal2-popup.swal2-toast > * { + grid-column: 2; +} +.swal2-popup.swal2-toast .swal2-title { + margin: 1em; + padding: 0; + font-size: 1em; + text-align: initial; +} +.swal2-popup.swal2-toast .swal2-loading { + justify-content: center; +} +.swal2-popup.swal2-toast .swal2-input { + height: 2em; + margin: 0.5em; + font-size: 1em; +} +.swal2-popup.swal2-toast .swal2-validation-message { + font-size: 1em; +} +.swal2-popup.swal2-toast .swal2-footer { + margin: 0.5em 0 0; + padding: 0.5em 0 0; + font-size: 0.8em; +} +.swal2-popup.swal2-toast .swal2-close { + grid-column: 3/3; + grid-row: 1/99; + align-self: center; + width: 0.8em; + height: 0.8em; + margin: 0; + font-size: 2em; +} +.swal2-popup.swal2-toast .swal2-html-container { + margin: 1em; + padding: 0; + font-size: 1em; + text-align: initial; +} +.swal2-popup.swal2-toast .swal2-html-container:empty { + padding: 0; +} +.swal2-popup.swal2-toast .swal2-loader { + grid-column: 1; + grid-row: 1/99; + align-self: center; + width: 2em; + height: 2em; + margin: 0.25em; +} +.swal2-popup.swal2-toast .swal2-icon { + grid-column: 1; + grid-row: 1/99; + align-self: center; + width: 2em; + min-width: 2em; + height: 2em; + margin: 0 0.5em 0 0; +} +.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content { + display: flex; + align-items: center; + font-size: 1.8em; + font-weight: bold; +} +.swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring { + width: 2em; + height: 2em; +} +.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line] { + top: 0.875em; + width: 1.375em; +} +.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left] { + left: 0.3125em; +} +.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right] { + right: 0.3125em; +} +.swal2-popup.swal2-toast .swal2-actions { + justify-content: flex-start; + height: auto; + margin: 0; + margin-top: 0.3125em; + padding: 0; +} +.swal2-popup.swal2-toast .swal2-styled { + margin: 0.25em 0.5em; + padding: 0.4em 0.6em; + font-size: 1em; +} +.swal2-popup.swal2-toast .swal2-styled:focus { + box-shadow: 0 0 0 1px #fff, 0 0 0 3px rgba(100, 150, 200, 0.5); +} +.swal2-popup.swal2-toast .swal2-success { + border-color: #a5dc86; +} +.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line] { + position: absolute; + width: 1.6em; + height: 3em; + transform: rotate(45deg); + border-radius: 50%; +} +.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left] { + top: -0.8em; + left: -0.5em; + transform: rotate(-45deg); + transform-origin: 2em 2em; + border-radius: 4em 0 0 4em; +} +.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right] { + top: -0.25em; + left: 0.9375em; + transform-origin: 0 1.5em; + border-radius: 0 4em 4em 0; +} +.swal2-popup.swal2-toast .swal2-success .swal2-success-ring { + width: 2em; + height: 2em; +} +.swal2-popup.swal2-toast .swal2-success .swal2-success-fix { + top: 0; + left: 0.4375em; + width: 0.4375em; + height: 2.6875em; +} +.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line] { + height: 0.3125em; +} +.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip] { + top: 1.125em; + left: 0.1875em; + width: 0.75em; +} +.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=long] { + top: 0.9375em; + right: 0.1875em; + width: 1.375em; +} +.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip { + -webkit-animation: swal2-toast-animate-success-line-tip 0.75s; + animation: swal2-toast-animate-success-line-tip 0.75s; +} +.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long { + -webkit-animation: swal2-toast-animate-success-line-long 0.75s; + animation: swal2-toast-animate-success-line-long 0.75s; +} +.swal2-popup.swal2-toast.swal2-show { + -webkit-animation: swal2-toast-show 0.5s; + animation: swal2-toast-show 0.5s; +} +.swal2-popup.swal2-toast.swal2-hide { + -webkit-animation: swal2-toast-hide 0.1s forwards; + animation: swal2-toast-hide 0.1s forwards; +} + +.swal2-container { + display: grid; + position: fixed; + z-index: 1060; + top: 0; + right: 0; + bottom: 0; + left: 0; + box-sizing: border-box; + grid-template-areas: "top-start top top-end" "center-start center center-end" "bottom-start bottom-center bottom-end"; + grid-template-rows: minmax(-webkit-min-content, auto) minmax(-webkit-min-content, auto) minmax(-webkit-min-content, auto); + grid-template-rows: minmax(min-content, auto) minmax(min-content, auto) minmax(min-content, auto); + height: 100%; + padding: 0.625em; + overflow-x: hidden; + transition: background-color 0.1s; + -webkit-overflow-scrolling: touch; +} +.swal2-container.swal2-backdrop-show, .swal2-container.swal2-noanimation { + background: rgba(0, 0, 0, 0.4); +} +.swal2-container.swal2-backdrop-hide { + background: transparent !important; +} +.swal2-container.swal2-top-start, .swal2-container.swal2-center-start, .swal2-container.swal2-bottom-start { + grid-template-columns: minmax(0, 1fr) auto auto; +} +.swal2-container.swal2-top, .swal2-container.swal2-center, .swal2-container.swal2-bottom { + grid-template-columns: auto minmax(0, 1fr) auto; +} +.swal2-container.swal2-top-end, .swal2-container.swal2-center-end, .swal2-container.swal2-bottom-end { + grid-template-columns: auto auto minmax(0, 1fr); +} +.swal2-container.swal2-top-start > .swal2-popup { + align-self: start; +} +.swal2-container.swal2-top > .swal2-popup { + grid-column: 2; + align-self: start; + justify-self: center; +} +.swal2-container.swal2-top-end > .swal2-popup, .swal2-container.swal2-top-right > .swal2-popup { + grid-column: 3; + align-self: start; + justify-self: end; +} +.swal2-container.swal2-center-start > .swal2-popup, .swal2-container.swal2-center-left > .swal2-popup { + grid-row: 2; + align-self: center; +} +.swal2-container.swal2-center > .swal2-popup { + grid-column: 2; + grid-row: 2; + align-self: center; + justify-self: center; +} +.swal2-container.swal2-center-end > .swal2-popup, .swal2-container.swal2-center-right > .swal2-popup { + grid-column: 3; + grid-row: 2; + align-self: center; + justify-self: end; +} +.swal2-container.swal2-bottom-start > .swal2-popup, .swal2-container.swal2-bottom-left > .swal2-popup { + grid-column: 1; + grid-row: 3; + align-self: end; +} +.swal2-container.swal2-bottom > .swal2-popup { + grid-column: 2; + grid-row: 3; + justify-self: center; + align-self: end; +} +.swal2-container.swal2-bottom-end > .swal2-popup, .swal2-container.swal2-bottom-right > .swal2-popup { + grid-column: 3; + grid-row: 3; + align-self: end; + justify-self: end; +} +.swal2-container.swal2-grow-row > .swal2-popup, .swal2-container.swal2-grow-fullscreen > .swal2-popup { + grid-column: 1/4; + width: 100%; +} +.swal2-container.swal2-grow-column > .swal2-popup, .swal2-container.swal2-grow-fullscreen > .swal2-popup { + grid-row: 1/4; + align-self: stretch; +} +.swal2-container.swal2-no-transition { + transition: none !important; +} + +.swal2-popup { + display: none; + position: relative; + box-sizing: border-box; + grid-template-columns: minmax(0, 100%); + width: 32em; + max-width: 100%; + padding: 0 0 1.25em; + border: none; + border-radius: 5px; + background: #fff; + color: #545454; + font-family: inherit; + font-size: 1rem; +} +.swal2-popup:focus { + outline: none; +} +.swal2-popup.swal2-loading { + overflow-y: hidden; +} + +.swal2-title { + position: relative; + max-width: 100%; + margin: 0; + padding: 0.8em 1em 0; + color: #595959; + font-size: 1.875em; + font-weight: 600; + text-align: center; + text-transform: none; + word-wrap: break-word; +} + +.swal2-actions { + display: flex; + z-index: 1; + box-sizing: border-box; + flex-wrap: wrap; + align-items: center; + justify-content: center; + width: auto; + margin: 1.25em auto 0; + padding: 0; +} +.swal2-actions:not(.swal2-loading) .swal2-styled[disabled] { + opacity: 0.4; +} +.swal2-actions:not(.swal2-loading) .swal2-styled:hover { + background-image: linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1)); +} +.swal2-actions:not(.swal2-loading) .swal2-styled:active { + background-image: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)); +} + +.swal2-loader { + display: none; + align-items: center; + justify-content: center; + width: 2.2em; + height: 2.2em; + margin: 0 1.875em; + -webkit-animation: swal2-rotate-loading 1.5s linear 0s infinite normal; + animation: swal2-rotate-loading 1.5s linear 0s infinite normal; + border-width: 0.25em; + border-style: solid; + border-radius: 100%; + border-color: #2778c4 transparent #2778c4 transparent; +} + +.swal2-styled { + margin: 0.3125em; + padding: 0.625em 1.1em; + transition: box-shadow 0.1s; + box-shadow: 0 0 0 3px transparent; + font-weight: 500; +} +.swal2-styled:not([disabled]) { + cursor: pointer; +} +.swal2-styled.swal2-confirm { + border: 0; + border-radius: 0.25em; + background: initial; + background-color: #7367f0; + color: #fff; + font-size: 1em; +} +.swal2-styled.swal2-confirm:focus { + box-shadow: 0 0 0 3px rgba(115, 103, 240, 0.5); +} +.swal2-styled.swal2-deny { + border: 0; + border-radius: 0.25em; + background: initial; + background-color: #ea5455; + color: #fff; + font-size: 1em; +} +.swal2-styled.swal2-deny:focus { + box-shadow: 0 0 0 3px rgba(234, 84, 85, 0.5); +} +.swal2-styled.swal2-cancel { + border: 0; + border-radius: 0.25em; + background: initial; + background-color: #6e7d88; + color: #fff; + font-size: 1em; +} +.swal2-styled.swal2-cancel:focus { + box-shadow: 0 0 0 3px rgba(110, 125, 136, 0.5); +} +.swal2-styled.swal2-default-outline:focus { + box-shadow: 0 0 0 3px rgba(100, 150, 200, 0.5); +} +.swal2-styled:focus { + outline: none; +} +.swal2-styled::-moz-focus-inner { + border: 0; +} + +.swal2-footer { + justify-content: center; + margin: 1em 0 0; + padding: 1em 1em 0; + border-top: 1px solid #eee; + color: #545454; + font-size: 1em; +} + +.swal2-timer-progress-bar-container { + position: absolute; + right: 0; + bottom: 0; + left: 0; + grid-column: auto !important; + height: 0.25em; + overflow: hidden; + border-bottom-right-radius: 5px; + border-bottom-left-radius: 5px; +} + +.swal2-timer-progress-bar { + width: 100%; + height: 0.25em; + background: rgba(0, 0, 0, 0.2); +} + +.swal2-image { + max-width: 100%; + margin: 2em auto 1em; +} + +.swal2-close { + z-index: 2; + align-items: center; + justify-content: center; + width: 1.2em; + height: 1.2em; + margin-top: 0; + margin-right: 0; + margin-bottom: -1.2em; + padding: 0; + overflow: hidden; + transition: color 0.1s, box-shadow 0.1s; + border: none; + border-radius: 5px; + background: transparent; + color: #ccc; + font-family: serif; + font-family: monospace; + font-size: 2.5em; + cursor: pointer; + justify-self: end; +} +.swal2-close:hover { + transform: none; + background: transparent; + color: #f27474; +} +.swal2-close:focus { + outline: none; + box-shadow: inset 0 0 0 3px rgba(100, 150, 200, 0.5); +} +.swal2-close::-moz-focus-inner { + border: 0; +} + +.swal2-html-container { + z-index: 1; + justify-content: center; + margin: 1em 1.6em 0.3em; + padding: 0; + overflow: auto; + color: #545454; + font-size: 1.125em; + font-weight: normal; + line-height: normal; + text-align: center; + word-wrap: break-word; + word-break: break-word; +} + +.swal2-input, +.swal2-file, +.swal2-textarea, +.swal2-select, +.swal2-radio, +.swal2-checkbox { + margin: 1em 2em 0; +} + +.swal2-input, +.swal2-file, +.swal2-textarea { + box-sizing: border-box; + width: auto; + transition: border-color 0.1s, box-shadow 0.1s; + border: 1px solid #d9d9d9; + border-radius: 0.1875em; + background: inherit; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06), 0 0 0 3px transparent; + color: inherit; + font-size: 1.125em; +} +.swal2-input.swal2-inputerror, +.swal2-file.swal2-inputerror, +.swal2-textarea.swal2-inputerror { + border-color: #f27474 !important; + box-shadow: 0 0 2px #f27474 !important; +} +.swal2-input:focus, +.swal2-file:focus, +.swal2-textarea:focus { + border: 1px solid #b4dbed; + outline: none; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06), 0 0 0 3px rgba(100, 150, 200, 0.5); +} +.swal2-input::-moz-placeholder, .swal2-file::-moz-placeholder, .swal2-textarea::-moz-placeholder { + color: #ccc; +} +.swal2-input:-ms-input-placeholder, .swal2-file:-ms-input-placeholder, .swal2-textarea:-ms-input-placeholder { + color: #ccc; +} +.swal2-input::placeholder, +.swal2-file::placeholder, +.swal2-textarea::placeholder { + color: #ccc; +} + +.swal2-range { + margin: 1em 2em 0; + background: #fff; +} +.swal2-range input { + width: 80%; +} +.swal2-range output { + width: 20%; + color: inherit; + font-weight: 600; + text-align: center; +} +.swal2-range input, +.swal2-range output { + height: 2.625em; + padding: 0; + font-size: 1.125em; + line-height: 2.625em; +} + +.swal2-input { + height: 2.625em; + padding: 0 0.75em; +} + +.swal2-file { + width: 75%; + margin-right: auto; + margin-left: auto; + background: inherit; + font-size: 1.125em; +} + +.swal2-textarea { + height: 6.75em; + padding: 0.75em; +} + +.swal2-select { + min-width: 50%; + max-width: 100%; + padding: 0.375em 0.625em; + background: inherit; + color: inherit; + font-size: 1.125em; +} + +.swal2-radio, +.swal2-checkbox { + align-items: center; + justify-content: center; + background: #fff; + color: inherit; +} +.swal2-radio label, +.swal2-checkbox label { + margin: 0 0.6em; + font-size: 1.125em; +} +.swal2-radio input, +.swal2-checkbox input { + flex-shrink: 0; + margin: 0 0.4em; +} + +.swal2-input-label { + display: flex; + justify-content: center; + margin: 1em auto 0; +} + +.swal2-validation-message { + align-items: center; + justify-content: center; + margin: 1em 0 0; + padding: 0.625em; + overflow: hidden; + background: #f0f0f0; + color: #666666; + font-size: 1em; + font-weight: 300; +} +.swal2-validation-message::before { + content: "!"; + display: inline-block; + width: 1.5em; + min-width: 1.5em; + height: 1.5em; + margin: 0 0.625em; + border-radius: 50%; + background-color: #f27474; + color: #fff; + font-weight: 600; + line-height: 1.5em; + text-align: center; +} + +.swal2-icon { + position: relative; + box-sizing: content-box; + justify-content: center; + width: 5em; + height: 5em; + margin: 2.5em auto 0.6em; + border: 0.25em solid transparent; + border-radius: 50%; + border-color: #000; + font-family: inherit; + line-height: 5em; + cursor: default; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} +.swal2-icon .swal2-icon-content { + display: flex; + align-items: center; + font-size: 3.75em; +} +.swal2-icon.swal2-error { + border-color: #f27474; + color: #f27474; +} +.swal2-icon.swal2-error .swal2-x-mark { + position: relative; + flex-grow: 1; +} +.swal2-icon.swal2-error [class^=swal2-x-mark-line] { + display: block; + position: absolute; + top: 2.3125em; + width: 2.9375em; + height: 0.3125em; + border-radius: 0.125em; + background-color: #f27474; +} +.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left] { + left: 1.0625em; + transform: rotate(45deg); +} +.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right] { + right: 1em; + transform: rotate(-45deg); +} +.swal2-icon.swal2-error.swal2-icon-show { + -webkit-animation: swal2-animate-error-icon 0.5s; + animation: swal2-animate-error-icon 0.5s; +} +.swal2-icon.swal2-error.swal2-icon-show .swal2-x-mark { + -webkit-animation: swal2-animate-error-x-mark 0.5s; + animation: swal2-animate-error-x-mark 0.5s; +} +.swal2-icon.swal2-warning { + border-color: #facea8; + color: #f8bb86; +} +.swal2-icon.swal2-info { + border-color: #9de0f6; + color: #3fc3ee; +} +.swal2-icon.swal2-question { + border-color: #c9dae1; + color: #87adbd; +} +.swal2-icon.swal2-success { + border-color: #a5dc86; + color: #a5dc86; +} +.swal2-icon.swal2-success [class^=swal2-success-circular-line] { + position: absolute; + width: 3.75em; + height: 7.5em; + transform: rotate(45deg); + border-radius: 50%; +} +.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=left] { + top: -0.4375em; + left: -2.0635em; + transform: rotate(-45deg); + transform-origin: 3.75em 3.75em; + border-radius: 7.5em 0 0 7.5em; +} +.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=right] { + top: -0.6875em; + left: 1.875em; + transform: rotate(-45deg); + transform-origin: 0 3.75em; + border-radius: 0 7.5em 7.5em 0; +} +.swal2-icon.swal2-success .swal2-success-ring { + position: absolute; + z-index: 2; + top: -0.25em; + left: -0.25em; + box-sizing: content-box; + width: 100%; + height: 100%; + border: 0.25em solid rgba(165, 220, 134, 0.3); + border-radius: 50%; +} +.swal2-icon.swal2-success .swal2-success-fix { + position: absolute; + z-index: 1; + top: 0.5em; + left: 1.625em; + width: 0.4375em; + height: 5.625em; + transform: rotate(-45deg); +} +.swal2-icon.swal2-success [class^=swal2-success-line] { + display: block; + position: absolute; + z-index: 2; + height: 0.3125em; + border-radius: 0.125em; + background-color: #a5dc86; +} +.swal2-icon.swal2-success [class^=swal2-success-line][class$=tip] { + top: 2.875em; + left: 0.8125em; + width: 1.5625em; + transform: rotate(45deg); +} +.swal2-icon.swal2-success [class^=swal2-success-line][class$=long] { + top: 2.375em; + right: 0.5em; + width: 2.9375em; + transform: rotate(-45deg); +} +.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-tip { + -webkit-animation: swal2-animate-success-line-tip 0.75s; + animation: swal2-animate-success-line-tip 0.75s; +} +.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-long { + -webkit-animation: swal2-animate-success-line-long 0.75s; + animation: swal2-animate-success-line-long 0.75s; +} +.swal2-icon.swal2-success.swal2-icon-show .swal2-success-circular-line-right { + -webkit-animation: swal2-rotate-success-circular-line 4.25s ease-in; + animation: swal2-rotate-success-circular-line 4.25s ease-in; +} + +.swal2-progress-steps { + flex-wrap: wrap; + align-items: center; + max-width: 100%; + margin: 1.25em auto; + padding: 0; + background: inherit; + font-weight: 600; +} +.swal2-progress-steps li { + display: inline-block; + position: relative; +} +.swal2-progress-steps .swal2-progress-step { + z-index: 20; + flex-shrink: 0; + width: 2em; + height: 2em; + border-radius: 2em; + background: #2778c4; + color: #fff; + line-height: 2em; + text-align: center; +} +.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step { + background: #2778c4; +} +.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step ~ .swal2-progress-step { + background: #add8e6; + color: #fff; +} +.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step ~ .swal2-progress-step-line { + background: #add8e6; +} +.swal2-progress-steps .swal2-progress-step-line { + z-index: 10; + flex-shrink: 0; + width: 2.5em; + height: 0.4em; + margin: 0 -1px; + background: #2778c4; +} + +[class^=swal2] { + -webkit-tap-highlight-color: transparent; +} + +.swal2-show { + -webkit-animation: swal2-show 0.3s; + animation: swal2-show 0.3s; +} + +.swal2-hide { + -webkit-animation: swal2-hide 0.15s forwards; + animation: swal2-hide 0.15s forwards; +} + +.swal2-noanimation { + transition: none; +} + +.swal2-scrollbar-measure { + position: absolute; + top: -9999px; + width: 50px; + height: 50px; + overflow: scroll; +} + +.swal2-rtl .swal2-close { + margin-right: initial; + margin-left: 0; +} +.swal2-rtl .swal2-timer-progress-bar { + right: 0; + left: auto; +} + +@-webkit-keyframes swal2-toast-show { + 0% { + transform: translateY(-0.625em) rotateZ(2deg); + } + 33% { + transform: translateY(0) rotateZ(-2deg); + } + 66% { + transform: translateY(0.3125em) rotateZ(2deg); + } + 100% { + transform: translateY(0) rotateZ(0deg); + } +} + +@keyframes swal2-toast-show { + 0% { + transform: translateY(-0.625em) rotateZ(2deg); + } + 33% { + transform: translateY(0) rotateZ(-2deg); + } + 66% { + transform: translateY(0.3125em) rotateZ(2deg); + } + 100% { + transform: translateY(0) rotateZ(0deg); + } +} +@-webkit-keyframes swal2-toast-hide { + 100% { + transform: rotateZ(1deg); + opacity: 0; + } +} +@keyframes swal2-toast-hide { + 100% { + transform: rotateZ(1deg); + opacity: 0; + } +} +@-webkit-keyframes swal2-toast-animate-success-line-tip { + 0% { + top: 0.5625em; + left: 0.0625em; + width: 0; + } + 54% { + top: 0.125em; + left: 0.125em; + width: 0; + } + 70% { + top: 0.625em; + left: -0.25em; + width: 1.625em; + } + 84% { + top: 1.0625em; + left: 0.75em; + width: 0.5em; + } + 100% { + top: 1.125em; + left: 0.1875em; + width: 0.75em; + } +} +@keyframes swal2-toast-animate-success-line-tip { + 0% { + top: 0.5625em; + left: 0.0625em; + width: 0; + } + 54% { + top: 0.125em; + left: 0.125em; + width: 0; + } + 70% { + top: 0.625em; + left: -0.25em; + width: 1.625em; + } + 84% { + top: 1.0625em; + left: 0.75em; + width: 0.5em; + } + 100% { + top: 1.125em; + left: 0.1875em; + width: 0.75em; + } +} +@-webkit-keyframes swal2-toast-animate-success-line-long { + 0% { + top: 1.625em; + right: 1.375em; + width: 0; + } + 65% { + top: 1.25em; + right: 0.9375em; + width: 0; + } + 84% { + top: 0.9375em; + right: 0; + width: 1.125em; + } + 100% { + top: 0.9375em; + right: 0.1875em; + width: 1.375em; + } +} +@keyframes swal2-toast-animate-success-line-long { + 0% { + top: 1.625em; + right: 1.375em; + width: 0; + } + 65% { + top: 1.25em; + right: 0.9375em; + width: 0; + } + 84% { + top: 0.9375em; + right: 0; + width: 1.125em; + } + 100% { + top: 0.9375em; + right: 0.1875em; + width: 1.375em; + } +} +@-webkit-keyframes swal2-show { + 0% { + transform: scale(0.7); + } + 45% { + transform: scale(1.05); + } + 80% { + transform: scale(0.95); + } + 100% { + transform: scale(1); + } +} +@keyframes swal2-show { + 0% { + transform: scale(0.7); + } + 45% { + transform: scale(1.05); + } + 80% { + transform: scale(0.95); + } + 100% { + transform: scale(1); + } +} +@-webkit-keyframes swal2-hide { + 0% { + transform: scale(1); + opacity: 1; + } + 100% { + transform: scale(0.5); + opacity: 0; + } +} +@keyframes swal2-hide { + 0% { + transform: scale(1); + opacity: 1; + } + 100% { + transform: scale(0.5); + opacity: 0; + } +} +@-webkit-keyframes swal2-animate-success-line-tip { + 0% { + top: 1.1875em; + left: 0.0625em; + width: 0; + } + 54% { + top: 1.0625em; + left: 0.125em; + width: 0; + } + 70% { + top: 2.1875em; + left: -0.375em; + width: 3.125em; + } + 84% { + top: 3em; + left: 1.3125em; + width: 1.0625em; + } + 100% { + top: 2.8125em; + left: 0.8125em; + width: 1.5625em; + } +} +@keyframes swal2-animate-success-line-tip { + 0% { + top: 1.1875em; + left: 0.0625em; + width: 0; + } + 54% { + top: 1.0625em; + left: 0.125em; + width: 0; + } + 70% { + top: 2.1875em; + left: -0.375em; + width: 3.125em; + } + 84% { + top: 3em; + left: 1.3125em; + width: 1.0625em; + } + 100% { + top: 2.8125em; + left: 0.8125em; + width: 1.5625em; + } +} +@-webkit-keyframes swal2-animate-success-line-long { + 0% { + top: 3.375em; + right: 2.875em; + width: 0; + } + 65% { + top: 3.375em; + right: 2.875em; + width: 0; + } + 84% { + top: 2.1875em; + right: 0; + width: 3.4375em; + } + 100% { + top: 2.375em; + right: 0.5em; + width: 2.9375em; + } +} +@keyframes swal2-animate-success-line-long { + 0% { + top: 3.375em; + right: 2.875em; + width: 0; + } + 65% { + top: 3.375em; + right: 2.875em; + width: 0; + } + 84% { + top: 2.1875em; + right: 0; + width: 3.4375em; + } + 100% { + top: 2.375em; + right: 0.5em; + width: 2.9375em; + } +} +@-webkit-keyframes swal2-rotate-success-circular-line { + 0% { + transform: rotate(-45deg); + } + 5% { + transform: rotate(-45deg); + } + 12% { + transform: rotate(-405deg); + } + 100% { + transform: rotate(-405deg); + } +} +@keyframes swal2-rotate-success-circular-line { + 0% { + transform: rotate(-45deg); + } + 5% { + transform: rotate(-45deg); + } + 12% { + transform: rotate(-405deg); + } + 100% { + transform: rotate(-405deg); + } +} +@-webkit-keyframes swal2-animate-error-x-mark { + 0% { + margin-top: 1.625em; + transform: scale(0.4); + opacity: 0; + } + 50% { + margin-top: 1.625em; + transform: scale(0.4); + opacity: 0; + } + 80% { + margin-top: -0.375em; + transform: scale(1.15); + } + 100% { + margin-top: 0; + transform: scale(1); + opacity: 1; + } +} +@keyframes swal2-animate-error-x-mark { + 0% { + margin-top: 1.625em; + transform: scale(0.4); + opacity: 0; + } + 50% { + margin-top: 1.625em; + transform: scale(0.4); + opacity: 0; + } + 80% { + margin-top: -0.375em; + transform: scale(1.15); + } + 100% { + margin-top: 0; + transform: scale(1); + opacity: 1; + } +} +@-webkit-keyframes swal2-animate-error-icon { + 0% { + transform: rotateX(100deg); + opacity: 0; + } + 100% { + transform: rotateX(0deg); + opacity: 1; + } +} +@keyframes swal2-animate-error-icon { + 0% { + transform: rotateX(100deg); + opacity: 0; + } + 100% { + transform: rotateX(0deg); + opacity: 1; + } +} +@-webkit-keyframes swal2-rotate-loading { + 0% { + transform: rotate(0deg); + } + 100% { + transform: rotate(360deg); + } +} +@keyframes swal2-rotate-loading { + 0% { + transform: rotate(0deg); + } + 100% { + transform: rotate(360deg); + } +} +body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) { + overflow: hidden; +} +body.swal2-height-auto { + height: auto !important; +} +body.swal2-no-backdrop .swal2-container { + background-color: transparent !important; + pointer-events: none; +} +body.swal2-no-backdrop .swal2-container .swal2-popup { + pointer-events: all; +} +body.swal2-no-backdrop .swal2-container .swal2-modal { + box-shadow: 0 0 10px rgba(0, 0, 0, 0.4); +} +@media print { + body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) { + overflow-y: scroll !important; + } + body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) > [aria-hidden=true] { + display: none; + } + body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .swal2-container { + position: static !important; + } +} +body.swal2-toast-shown .swal2-container { + box-sizing: border-box; + width: 360px; + max-width: 100%; + background-color: transparent; + pointer-events: none; +} +body.swal2-toast-shown .swal2-container.swal2-top { + top: 0; + right: auto; + bottom: auto; + left: 50%; + transform: translateX(-50%); +} +body.swal2-toast-shown .swal2-container.swal2-top-end, body.swal2-toast-shown .swal2-container.swal2-top-right { + top: 0; + right: 0; + bottom: auto; + left: auto; +} +body.swal2-toast-shown .swal2-container.swal2-top-start, body.swal2-toast-shown .swal2-container.swal2-top-left { + top: 0; + right: auto; + bottom: auto; + left: 0; +} +body.swal2-toast-shown .swal2-container.swal2-center-start, body.swal2-toast-shown .swal2-container.swal2-center-left { + top: 50%; + right: auto; + bottom: auto; + left: 0; + transform: translateY(-50%); +} +body.swal2-toast-shown .swal2-container.swal2-center { + top: 50%; + right: auto; + bottom: auto; + left: 50%; + transform: translate(-50%, -50%); +} +body.swal2-toast-shown .swal2-container.swal2-center-end, body.swal2-toast-shown .swal2-container.swal2-center-right { + top: 50%; + right: 0; + bottom: auto; + left: auto; + transform: translateY(-50%); +} +body.swal2-toast-shown .swal2-container.swal2-bottom-start, body.swal2-toast-shown .swal2-container.swal2-bottom-left { + top: auto; + right: auto; + bottom: 0; + left: 0; +} +body.swal2-toast-shown .swal2-container.swal2-bottom { + top: auto; + right: auto; + bottom: 0; + left: 50%; + transform: translateX(-50%); +} +body.swal2-toast-shown .swal2-container.swal2-bottom-end, body.swal2-toast-shown .swal2-container.swal2-bottom-right { + top: auto; + right: 0; + bottom: 0; + left: auto; +} \ No newline at end of file diff --git a/modules/cms-kit/host/Volo.CmsKit.IdentityServer/wwwroot/libs/sweetalert2/sweetalert2.js b/modules/cms-kit/host/Volo.CmsKit.IdentityServer/wwwroot/libs/sweetalert2/sweetalert2.js new file mode 100644 index 0000000000..e9c254f064 --- /dev/null +++ b/modules/cms-kit/host/Volo.CmsKit.IdentityServer/wwwroot/libs/sweetalert2/sweetalert2.js @@ -0,0 +1,3121 @@ +/*! +* sweetalert2 v11.1.5 +* Released under the MIT License. +*/ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : + typeof define === 'function' && define.amd ? define(factory) : + (global = global || self, global.Sweetalert2 = factory()); +}(this, function () { 'use strict'; + + const DismissReason = Object.freeze({ + cancel: 'cancel', + backdrop: 'backdrop', + close: 'close', + esc: 'esc', + timer: 'timer' + }); + + const consolePrefix = 'SweetAlert2:'; + /** + * Filter the unique values into a new array + * @param arr + */ + + const uniqueArray = arr => { + const result = []; + + for (let i = 0; i < arr.length; i++) { + if (result.indexOf(arr[i]) === -1) { + result.push(arr[i]); + } + } + + return result; + }; + /** + * Capitalize the first letter of a string + * @param str + */ + + const capitalizeFirstLetter = str => str.charAt(0).toUpperCase() + str.slice(1); + /** + * Convert NodeList to Array + * @param nodeList + */ + + const toArray = nodeList => Array.prototype.slice.call(nodeList); + /** + * Standardise console warnings + * @param message + */ + + const warn = message => { + console.warn("".concat(consolePrefix, " ").concat(typeof message === 'object' ? message.join(' ') : message)); + }; + /** + * Standardise console errors + * @param message + */ + + const error = message => { + console.error("".concat(consolePrefix, " ").concat(message)); + }; + /** + * Private global state for `warnOnce` + * @type {Array} + * @private + */ + + const previousWarnOnceMessages = []; + /** + * Show a console warning, but only if it hasn't already been shown + * @param message + */ + + const warnOnce = message => { + if (!previousWarnOnceMessages.includes(message)) { + previousWarnOnceMessages.push(message); + warn(message); + } + }; + /** + * Show a one-time console warning about deprecated params/methods + */ + + const warnAboutDeprecation = (deprecatedParam, useInstead) => { + warnOnce("\"".concat(deprecatedParam, "\" is deprecated and will be removed in the next major release. Please use \"").concat(useInstead, "\" instead.")); + }; + /** + * If `arg` is a function, call it (with no arguments or context) and return the result. + * Otherwise, just pass the value through + * @param arg + */ + + const callIfFunction = arg => typeof arg === 'function' ? arg() : arg; + const hasToPromiseFn = arg => arg && typeof arg.toPromise === 'function'; + const asPromise = arg => hasToPromiseFn(arg) ? arg.toPromise() : Promise.resolve(arg); + const isPromise = arg => arg && Promise.resolve(arg) === arg; + + const isJqueryElement = elem => typeof elem === 'object' && elem.jquery; + + const isElement = elem => elem instanceof Element || isJqueryElement(elem); + + const argsToParams = args => { + const params = {}; + + if (typeof args[0] === 'object' && !isElement(args[0])) { + Object.assign(params, args[0]); + } else { + ['title', 'html', 'icon'].forEach((name, index) => { + const arg = args[index]; + + if (typeof arg === 'string' || isElement(arg)) { + params[name] = arg; + } else if (arg !== undefined) { + error("Unexpected type of ".concat(name, "! Expected \"string\" or \"Element\", got ").concat(typeof arg)); + } + }); + } + + return params; + }; + + const swalPrefix = 'swal2-'; + const prefix = items => { + const result = {}; + + for (const i in items) { + result[items[i]] = swalPrefix + items[i]; + } + + return result; + }; + const swalClasses = prefix(['container', 'shown', 'height-auto', 'iosfix', 'popup', 'modal', 'no-backdrop', 'no-transition', 'toast', 'toast-shown', 'show', 'hide', 'close', 'title', 'html-container', 'actions', 'confirm', 'deny', 'cancel', 'default-outline', 'footer', 'icon', 'icon-content', 'image', 'input', 'file', 'range', 'select', 'radio', 'checkbox', 'label', 'textarea', 'inputerror', 'input-label', 'validation-message', 'progress-steps', 'active-progress-step', 'progress-step', 'progress-step-line', 'loader', 'loading', 'styled', 'top', 'top-start', 'top-end', 'top-left', 'top-right', 'center', 'center-start', 'center-end', 'center-left', 'center-right', 'bottom', 'bottom-start', 'bottom-end', 'bottom-left', 'bottom-right', 'grow-row', 'grow-column', 'grow-fullscreen', 'rtl', 'timer-progress-bar', 'timer-progress-bar-container', 'scrollbar-measure', 'icon-success', 'icon-warning', 'icon-info', 'icon-question', 'icon-error']); + const iconTypes = prefix(['success', 'warning', 'info', 'question', 'error']); + + const getContainer = () => document.body.querySelector(".".concat(swalClasses.container)); + const elementBySelector = selectorString => { + const container = getContainer(); + return container ? container.querySelector(selectorString) : null; + }; + + const elementByClass = className => { + return elementBySelector(".".concat(className)); + }; + + const getPopup = () => elementByClass(swalClasses.popup); + const getIcon = () => elementByClass(swalClasses.icon); + const getTitle = () => elementByClass(swalClasses.title); + const getHtmlContainer = () => elementByClass(swalClasses['html-container']); + const getImage = () => elementByClass(swalClasses.image); + const getProgressSteps = () => elementByClass(swalClasses['progress-steps']); + const getValidationMessage = () => elementByClass(swalClasses['validation-message']); + const getConfirmButton = () => elementBySelector(".".concat(swalClasses.actions, " .").concat(swalClasses.confirm)); + const getDenyButton = () => elementBySelector(".".concat(swalClasses.actions, " .").concat(swalClasses.deny)); + const getInputLabel = () => elementByClass(swalClasses['input-label']); + const getLoader = () => elementBySelector(".".concat(swalClasses.loader)); + const getCancelButton = () => elementBySelector(".".concat(swalClasses.actions, " .").concat(swalClasses.cancel)); + const getActions = () => elementByClass(swalClasses.actions); + const getFooter = () => elementByClass(swalClasses.footer); + const getTimerProgressBar = () => elementByClass(swalClasses['timer-progress-bar']); + const getCloseButton = () => elementByClass(swalClasses.close); // https://github.com/jkup/focusable/blob/master/index.js + + const focusable = "\n a[href],\n area[href],\n input:not([disabled]),\n select:not([disabled]),\n textarea:not([disabled]),\n button:not([disabled]),\n iframe,\n object,\n embed,\n [tabindex=\"0\"],\n [contenteditable],\n audio[controls],\n video[controls],\n summary\n"; + const getFocusableElements = () => { + const focusableElementsWithTabindex = toArray(getPopup().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')) // sort according to tabindex + .sort((a, b) => { + a = parseInt(a.getAttribute('tabindex')); + b = parseInt(b.getAttribute('tabindex')); + + if (a > b) { + return 1; + } else if (a < b) { + return -1; + } + + return 0; + }); + const otherFocusableElements = toArray(getPopup().querySelectorAll(focusable)).filter(el => el.getAttribute('tabindex') !== '-1'); + return uniqueArray(focusableElementsWithTabindex.concat(otherFocusableElements)).filter(el => isVisible(el)); + }; + const isModal = () => { + return !isToast() && !document.body.classList.contains(swalClasses['no-backdrop']); + }; + const isToast = () => { + return document.body.classList.contains(swalClasses['toast-shown']); + }; + const isLoading = () => { + return getPopup().hasAttribute('data-loading'); + }; + + const states = { + previousBodyPadding: null + }; + const setInnerHtml = (elem, html) => { + // #1926 + elem.textContent = ''; + + if (html) { + const parser = new DOMParser(); + const parsed = parser.parseFromString(html, "text/html"); + toArray(parsed.querySelector('head').childNodes).forEach(child => { + elem.appendChild(child); + }); + toArray(parsed.querySelector('body').childNodes).forEach(child => { + elem.appendChild(child); + }); + } + }; + const hasClass = (elem, className) => { + if (!className) { + return false; + } + + const classList = className.split(/\s+/); + + for (let i = 0; i < classList.length; i++) { + if (!elem.classList.contains(classList[i])) { + return false; + } + } + + return true; + }; + + const removeCustomClasses = (elem, params) => { + toArray(elem.classList).forEach(className => { + if (!Object.values(swalClasses).includes(className) && !Object.values(iconTypes).includes(className) && !Object.values(params.showClass).includes(className)) { + elem.classList.remove(className); + } + }); + }; + + const applyCustomClass = (elem, params, className) => { + removeCustomClasses(elem, params); + + if (params.customClass && params.customClass[className]) { + if (typeof params.customClass[className] !== 'string' && !params.customClass[className].forEach) { + return warn("Invalid type of customClass.".concat(className, "! Expected string or iterable object, got \"").concat(typeof params.customClass[className], "\"")); + } + + addClass(elem, params.customClass[className]); + } + }; + const getInput = (popup, inputType) => { + if (!inputType) { + return null; + } + + switch (inputType) { + case 'select': + case 'textarea': + case 'file': + return getChildByClass(popup, swalClasses[inputType]); + + case 'checkbox': + return popup.querySelector(".".concat(swalClasses.checkbox, " input")); + + case 'radio': + return popup.querySelector(".".concat(swalClasses.radio, " input:checked")) || popup.querySelector(".".concat(swalClasses.radio, " input:first-child")); + + case 'range': + return popup.querySelector(".".concat(swalClasses.range, " input")); + + default: + return getChildByClass(popup, swalClasses.input); + } + }; + const focusInput = input => { + input.focus(); // place cursor at end of text in text input + + if (input.type !== 'file') { + // http://stackoverflow.com/a/2345915 + const val = input.value; + input.value = ''; + input.value = val; + } + }; + const toggleClass = (target, classList, condition) => { + if (!target || !classList) { + return; + } + + if (typeof classList === 'string') { + classList = classList.split(/\s+/).filter(Boolean); + } + + classList.forEach(className => { + if (target.forEach) { + target.forEach(elem => { + condition ? elem.classList.add(className) : elem.classList.remove(className); + }); + } else { + condition ? target.classList.add(className) : target.classList.remove(className); + } + }); + }; + const addClass = (target, classList) => { + toggleClass(target, classList, true); + }; + const removeClass = (target, classList) => { + toggleClass(target, classList, false); + }; + const getChildByClass = (elem, className) => { + for (let i = 0; i < elem.childNodes.length; i++) { + if (hasClass(elem.childNodes[i], className)) { + return elem.childNodes[i]; + } + } + }; + const applyNumericalStyle = (elem, property, value) => { + if (value === "".concat(parseInt(value))) { + value = parseInt(value); + } + + if (value || parseInt(value) === 0) { + elem.style[property] = typeof value === 'number' ? "".concat(value, "px") : value; + } else { + elem.style.removeProperty(property); + } + }; + const show = (elem, display = 'flex') => { + elem.style.display = display; + }; + const hide = elem => { + elem.style.display = 'none'; + }; + const setStyle = (parent, selector, property, value) => { + const el = parent.querySelector(selector); + + if (el) { + el.style[property] = value; + } + }; + const toggle = (elem, condition, display) => { + condition ? show(elem, display) : hide(elem); + }; // borrowed from jquery $(elem).is(':visible') implementation + + const isVisible = elem => !!(elem && (elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length)); + const allButtonsAreHidden = () => !isVisible(getConfirmButton()) && !isVisible(getDenyButton()) && !isVisible(getCancelButton()); + const isScrollable = elem => !!(elem.scrollHeight > elem.clientHeight); // borrowed from https://stackoverflow.com/a/46352119 + + const hasCssAnimation = elem => { + const style = window.getComputedStyle(elem); + const animDuration = parseFloat(style.getPropertyValue('animation-duration') || '0'); + const transDuration = parseFloat(style.getPropertyValue('transition-duration') || '0'); + return animDuration > 0 || transDuration > 0; + }; + const animateTimerProgressBar = (timer, reset = false) => { + const timerProgressBar = getTimerProgressBar(); + + if (isVisible(timerProgressBar)) { + if (reset) { + timerProgressBar.style.transition = 'none'; + timerProgressBar.style.width = '100%'; + } + + setTimeout(() => { + timerProgressBar.style.transition = "width ".concat(timer / 1000, "s linear"); + timerProgressBar.style.width = '0%'; + }, 10); + } + }; + const stopTimerProgressBar = () => { + const timerProgressBar = getTimerProgressBar(); + const timerProgressBarWidth = parseInt(window.getComputedStyle(timerProgressBar).width); + timerProgressBar.style.removeProperty('transition'); + timerProgressBar.style.width = '100%'; + const timerProgressBarFullWidth = parseInt(window.getComputedStyle(timerProgressBar).width); + const timerProgressBarPercent = parseInt(timerProgressBarWidth / timerProgressBarFullWidth * 100); + timerProgressBar.style.removeProperty('transition'); + timerProgressBar.style.width = "".concat(timerProgressBarPercent, "%"); + }; + + // Detect Node env + const isNodeEnv = () => typeof window === 'undefined' || typeof document === 'undefined'; + + const sweetHTML = "\n
              \n \n
                \n
                \n \n

                \n
                \n \n \n
                \n \n \n
                \n \n
                \n \n \n
                \n
                \n
                \n \n \n \n
                \n
                \n
                \n
                \n
                \n
                \n").replace(/(^|\n)\s*/g, ''); + + const resetOldContainer = () => { + const oldContainer = getContainer(); + + if (!oldContainer) { + return false; + } + + oldContainer.remove(); + removeClass([document.documentElement, document.body], [swalClasses['no-backdrop'], swalClasses['toast-shown'], swalClasses['has-column']]); + return true; + }; + + const resetValidationMessage = () => { + if (Swal.isVisible()) { + Swal.resetValidationMessage(); + } + }; + + const addInputChangeListeners = () => { + const popup = getPopup(); + const input = getChildByClass(popup, swalClasses.input); + const file = getChildByClass(popup, swalClasses.file); + const range = popup.querySelector(".".concat(swalClasses.range, " input")); + const rangeOutput = popup.querySelector(".".concat(swalClasses.range, " output")); + const select = getChildByClass(popup, swalClasses.select); + const checkbox = popup.querySelector(".".concat(swalClasses.checkbox, " input")); + const textarea = getChildByClass(popup, swalClasses.textarea); + input.oninput = resetValidationMessage; + file.onchange = resetValidationMessage; + select.onchange = resetValidationMessage; + checkbox.onchange = resetValidationMessage; + textarea.oninput = resetValidationMessage; + + range.oninput = () => { + resetValidationMessage(); + rangeOutput.value = range.value; + }; + + range.onchange = () => { + resetValidationMessage(); + range.nextSibling.value = range.value; + }; + }; + + const getTarget = target => typeof target === 'string' ? document.querySelector(target) : target; + + const setupAccessibility = params => { + const popup = getPopup(); + popup.setAttribute('role', params.toast ? 'alert' : 'dialog'); + popup.setAttribute('aria-live', params.toast ? 'polite' : 'assertive'); + + if (!params.toast) { + popup.setAttribute('aria-modal', 'true'); + } + }; + + const setupRTL = targetElement => { + if (window.getComputedStyle(targetElement).direction === 'rtl') { + addClass(getContainer(), swalClasses.rtl); + } + }; + /* + * Add modal + backdrop to DOM + */ + + + const init = params => { + // Clean up the old popup container if it exists + const oldContainerExisted = resetOldContainer(); + /* istanbul ignore if */ + + if (isNodeEnv()) { + error('SweetAlert2 requires document to initialize'); + return; + } + + const container = document.createElement('div'); + container.className = swalClasses.container; + + if (oldContainerExisted) { + addClass(container, swalClasses['no-transition']); + } + + setInnerHtml(container, sweetHTML); + const targetElement = getTarget(params.target); + targetElement.appendChild(container); + setupAccessibility(params); + setupRTL(targetElement); + addInputChangeListeners(); + }; + + const parseHtmlToContainer = (param, target) => { + // DOM element + if (param instanceof HTMLElement) { + target.appendChild(param); // Object + } else if (typeof param === 'object') { + handleObject(param, target); // Plain string + } else if (param) { + setInnerHtml(target, param); + } + }; + + const handleObject = (param, target) => { + // JQuery element(s) + if (param.jquery) { + handleJqueryElem(target, param); // For other objects use their string representation + } else { + setInnerHtml(target, param.toString()); + } + }; + + const handleJqueryElem = (target, elem) => { + target.textContent = ''; + + if (0 in elem) { + for (let i = 0; (i in elem); i++) { + target.appendChild(elem[i].cloneNode(true)); + } + } else { + target.appendChild(elem.cloneNode(true)); + } + }; + + const animationEndEvent = (() => { + // Prevent run in Node env + + /* istanbul ignore if */ + if (isNodeEnv()) { + return false; + } + + const testEl = document.createElement('div'); + const transEndEventNames = { + WebkitAnimation: 'webkitAnimationEnd', + OAnimation: 'oAnimationEnd oanimationend', + animation: 'animationend' + }; + + for (const i in transEndEventNames) { + if (Object.prototype.hasOwnProperty.call(transEndEventNames, i) && typeof testEl.style[i] !== 'undefined') { + return transEndEventNames[i]; + } + } + + return false; + })(); + + // https://github.com/twbs/bootstrap/blob/master/js/src/modal.js + + const measureScrollbar = () => { + const scrollDiv = document.createElement('div'); + scrollDiv.className = swalClasses['scrollbar-measure']; + document.body.appendChild(scrollDiv); + const scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth; + document.body.removeChild(scrollDiv); + return scrollbarWidth; + }; + + const renderActions = (instance, params) => { + const actions = getActions(); + const loader = getLoader(); + const confirmButton = getConfirmButton(); + const denyButton = getDenyButton(); + const cancelButton = getCancelButton(); // Actions (buttons) wrapper + + if (!params.showConfirmButton && !params.showDenyButton && !params.showCancelButton) { + hide(actions); + } else { + show(actions); + } // Custom class + + + applyCustomClass(actions, params, 'actions'); // Render buttons + + renderButton(confirmButton, 'confirm', params); + renderButton(denyButton, 'deny', params); + renderButton(cancelButton, 'cancel', params); + handleButtonsStyling(confirmButton, denyButton, cancelButton, params); + + if (params.reverseButtons) { + actions.insertBefore(cancelButton, loader); + actions.insertBefore(denyButton, loader); + actions.insertBefore(confirmButton, loader); + } // Loader + + + setInnerHtml(loader, params.loaderHtml); + applyCustomClass(loader, params, 'loader'); + }; + + function handleButtonsStyling(confirmButton, denyButton, cancelButton, params) { + if (!params.buttonsStyling) { + return removeClass([confirmButton, denyButton, cancelButton], swalClasses.styled); + } + + addClass([confirmButton, denyButton, cancelButton], swalClasses.styled); // Buttons background colors + + if (params.confirmButtonColor) { + confirmButton.style.backgroundColor = params.confirmButtonColor; + addClass(confirmButton, swalClasses['default-outline']); + } + + if (params.denyButtonColor) { + denyButton.style.backgroundColor = params.denyButtonColor; + addClass(denyButton, swalClasses['default-outline']); + } + + if (params.cancelButtonColor) { + cancelButton.style.backgroundColor = params.cancelButtonColor; + addClass(cancelButton, swalClasses['default-outline']); + } + } + + function renderButton(button, buttonType, params) { + toggle(button, params["show".concat(capitalizeFirstLetter(buttonType), "Button")], 'inline-block'); + setInnerHtml(button, params["".concat(buttonType, "ButtonText")]); // Set caption text + + button.setAttribute('aria-label', params["".concat(buttonType, "ButtonAriaLabel")]); // ARIA label + // Add buttons custom classes + + button.className = swalClasses[buttonType]; + applyCustomClass(button, params, "".concat(buttonType, "Button")); + addClass(button, params["".concat(buttonType, "ButtonClass")]); + } + + function handleBackdropParam(container, backdrop) { + if (typeof backdrop === 'string') { + container.style.background = backdrop; + } else if (!backdrop) { + addClass([document.documentElement, document.body], swalClasses['no-backdrop']); + } + } + + function handlePositionParam(container, position) { + if (position in swalClasses) { + addClass(container, swalClasses[position]); + } else { + warn('The "position" parameter is not valid, defaulting to "center"'); + addClass(container, swalClasses.center); + } + } + + function handleGrowParam(container, grow) { + if (grow && typeof grow === 'string') { + const growClass = "grow-".concat(grow); + + if (growClass in swalClasses) { + addClass(container, swalClasses[growClass]); + } + } + } + + const renderContainer = (instance, params) => { + const container = getContainer(); + + if (!container) { + return; + } + + handleBackdropParam(container, params.backdrop); + handlePositionParam(container, params.position); + handleGrowParam(container, params.grow); // Custom class + + applyCustomClass(container, params, 'container'); + }; + + /** + * This module containts `WeakMap`s for each effectively-"private property" that a `Swal` has. + * For example, to set the private property "foo" of `this` to "bar", you can `privateProps.foo.set(this, 'bar')` + * This is the approach that Babel will probably take to implement private methods/fields + * https://github.com/tc39/proposal-private-methods + * https://github.com/babel/babel/pull/7555 + * Once we have the changes from that PR in Babel, and our core class fits reasonable in *one module* + * then we can use that language feature. + */ + var privateProps = { + promise: new WeakMap(), + innerParams: new WeakMap(), + domCache: new WeakMap() + }; + + const inputTypes = ['input', 'file', 'range', 'select', 'radio', 'checkbox', 'textarea']; + const renderInput = (instance, params) => { + const popup = getPopup(); + const innerParams = privateProps.innerParams.get(instance); + const rerender = !innerParams || params.input !== innerParams.input; + inputTypes.forEach(inputType => { + const inputClass = swalClasses[inputType]; + const inputContainer = getChildByClass(popup, inputClass); // set attributes + + setAttributes(inputType, params.inputAttributes); // set class + + inputContainer.className = inputClass; + + if (rerender) { + hide(inputContainer); + } + }); + + if (params.input) { + if (rerender) { + showInput(params); + } // set custom class + + + setCustomClass(params); + } + }; + + const showInput = params => { + if (!renderInputType[params.input]) { + return error("Unexpected type of input! Expected \"text\", \"email\", \"password\", \"number\", \"tel\", \"select\", \"radio\", \"checkbox\", \"textarea\", \"file\" or \"url\", got \"".concat(params.input, "\"")); + } + + const inputContainer = getInputContainer(params.input); + const input = renderInputType[params.input](inputContainer, params); + show(input); // input autofocus + + setTimeout(() => { + focusInput(input); + }); + }; + + const removeAttributes = input => { + for (let i = 0; i < input.attributes.length; i++) { + const attrName = input.attributes[i].name; + + if (!['type', 'value', 'style'].includes(attrName)) { + input.removeAttribute(attrName); + } + } + }; + + const setAttributes = (inputType, inputAttributes) => { + const input = getInput(getPopup(), inputType); + + if (!input) { + return; + } + + removeAttributes(input); + + for (const attr in inputAttributes) { + input.setAttribute(attr, inputAttributes[attr]); + } + }; + + const setCustomClass = params => { + const inputContainer = getInputContainer(params.input); + + if (params.customClass) { + addClass(inputContainer, params.customClass.input); + } + }; + + const setInputPlaceholder = (input, params) => { + if (!input.placeholder || params.inputPlaceholder) { + input.placeholder = params.inputPlaceholder; + } + }; + + const setInputLabel = (input, prependTo, params) => { + if (params.inputLabel) { + input.id = swalClasses.input; + const label = document.createElement('label'); + const labelClass = swalClasses['input-label']; + label.setAttribute('for', input.id); + label.className = labelClass; + addClass(label, params.customClass.inputLabel); + label.innerText = params.inputLabel; + prependTo.insertAdjacentElement('beforebegin', label); + } + }; + + const getInputContainer = inputType => { + const inputClass = swalClasses[inputType] ? swalClasses[inputType] : swalClasses.input; + return getChildByClass(getPopup(), inputClass); + }; + + const renderInputType = {}; + + renderInputType.text = renderInputType.email = renderInputType.password = renderInputType.number = renderInputType.tel = renderInputType.url = (input, params) => { + if (typeof params.inputValue === 'string' || typeof params.inputValue === 'number') { + input.value = params.inputValue; + } else if (!isPromise(params.inputValue)) { + warn("Unexpected type of inputValue! Expected \"string\", \"number\" or \"Promise\", got \"".concat(typeof params.inputValue, "\"")); + } + + setInputLabel(input, input, params); + setInputPlaceholder(input, params); + input.type = params.input; + return input; + }; + + renderInputType.file = (input, params) => { + setInputLabel(input, input, params); + setInputPlaceholder(input, params); + return input; + }; + + renderInputType.range = (range, params) => { + const rangeInput = range.querySelector('input'); + const rangeOutput = range.querySelector('output'); + rangeInput.value = params.inputValue; + rangeInput.type = params.input; + rangeOutput.value = params.inputValue; + setInputLabel(rangeInput, range, params); + return range; + }; + + renderInputType.select = (select, params) => { + select.textContent = ''; + + if (params.inputPlaceholder) { + const placeholder = document.createElement('option'); + setInnerHtml(placeholder, params.inputPlaceholder); + placeholder.value = ''; + placeholder.disabled = true; + placeholder.selected = true; + select.appendChild(placeholder); + } + + setInputLabel(select, select, params); + return select; + }; + + renderInputType.radio = radio => { + radio.textContent = ''; + return radio; + }; + + renderInputType.checkbox = (checkboxContainer, params) => { + const checkbox = getInput(getPopup(), 'checkbox'); + checkbox.value = 1; + checkbox.id = swalClasses.checkbox; + checkbox.checked = Boolean(params.inputValue); + const label = checkboxContainer.querySelector('span'); + setInnerHtml(label, params.inputPlaceholder); + return checkboxContainer; + }; + + renderInputType.textarea = (textarea, params) => { + textarea.value = params.inputValue; + setInputPlaceholder(textarea, params); + setInputLabel(textarea, textarea, params); + + const getMargin = el => parseInt(window.getComputedStyle(el).marginLeft) + parseInt(window.getComputedStyle(el).marginRight); + + setTimeout(() => { + // #2291 + if ('MutationObserver' in window) { + // #1699 + const initialPopupWidth = parseInt(window.getComputedStyle(getPopup()).width); + + const textareaResizeHandler = () => { + const textareaWidth = textarea.offsetWidth + getMargin(textarea); + + if (textareaWidth > initialPopupWidth) { + getPopup().style.width = "".concat(textareaWidth, "px"); + } else { + getPopup().style.width = null; + } + }; + + new MutationObserver(textareaResizeHandler).observe(textarea, { + attributes: true, + attributeFilter: ['style'] + }); + } + }); + return textarea; + }; + + const renderContent = (instance, params) => { + const htmlContainer = getHtmlContainer(); + applyCustomClass(htmlContainer, params, 'htmlContainer'); // Content as HTML + + if (params.html) { + parseHtmlToContainer(params.html, htmlContainer); + show(htmlContainer, 'block'); // Content as plain text + } else if (params.text) { + htmlContainer.textContent = params.text; + show(htmlContainer, 'block'); // No content + } else { + hide(htmlContainer); + } + + renderInput(instance, params); + }; + + const renderFooter = (instance, params) => { + const footer = getFooter(); + toggle(footer, params.footer); + + if (params.footer) { + parseHtmlToContainer(params.footer, footer); + } // Custom class + + + applyCustomClass(footer, params, 'footer'); + }; + + const renderCloseButton = (instance, params) => { + const closeButton = getCloseButton(); + setInnerHtml(closeButton, params.closeButtonHtml); // Custom class + + applyCustomClass(closeButton, params, 'closeButton'); + toggle(closeButton, params.showCloseButton); + closeButton.setAttribute('aria-label', params.closeButtonAriaLabel); + }; + + const renderIcon = (instance, params) => { + const innerParams = privateProps.innerParams.get(instance); + const icon = getIcon(); // if the given icon already rendered, apply the styling without re-rendering the icon + + if (innerParams && params.icon === innerParams.icon) { + // Custom or default content + setContent(icon, params); + applyStyles(icon, params); + return; + } + + if (!params.icon && !params.iconHtml) { + return hide(icon); + } + + if (params.icon && Object.keys(iconTypes).indexOf(params.icon) === -1) { + error("Unknown icon! Expected \"success\", \"error\", \"warning\", \"info\" or \"question\", got \"".concat(params.icon, "\"")); + return hide(icon); + } + + show(icon); // Custom or default content + + setContent(icon, params); + applyStyles(icon, params); // Animate icon + + addClass(icon, params.showClass.icon); + }; + + const applyStyles = (icon, params) => { + for (const iconType in iconTypes) { + if (params.icon !== iconType) { + removeClass(icon, iconTypes[iconType]); + } + } + + addClass(icon, iconTypes[params.icon]); // Icon color + + setColor(icon, params); // Success icon background color + + adjustSuccessIconBackgoundColor(); // Custom class + + applyCustomClass(icon, params, 'icon'); + }; // Adjust success icon background color to match the popup background color + + + const adjustSuccessIconBackgoundColor = () => { + const popup = getPopup(); + const popupBackgroundColor = window.getComputedStyle(popup).getPropertyValue('background-color'); + const successIconParts = popup.querySelectorAll('[class^=swal2-success-circular-line], .swal2-success-fix'); + + for (let i = 0; i < successIconParts.length; i++) { + successIconParts[i].style.backgroundColor = popupBackgroundColor; + } + }; + + const setContent = (icon, params) => { + icon.textContent = ''; + + if (params.iconHtml) { + setInnerHtml(icon, iconContent(params.iconHtml)); + } else if (params.icon === 'success') { + setInnerHtml(icon, "\n
                \n \n
                \n
                \n "); + } else if (params.icon === 'error') { + setInnerHtml(icon, "\n \n \n \n \n "); + } else { + const defaultIconHtml = { + question: '?', + warning: '!', + info: 'i' + }; + setInnerHtml(icon, iconContent(defaultIconHtml[params.icon])); + } + }; + + const setColor = (icon, params) => { + if (!params.iconColor) { + return; + } + + icon.style.color = params.iconColor; + icon.style.borderColor = params.iconColor; + + for (const sel of ['.swal2-success-line-tip', '.swal2-success-line-long', '.swal2-x-mark-line-left', '.swal2-x-mark-line-right']) { + setStyle(icon, sel, 'backgroundColor', params.iconColor); + } + + setStyle(icon, '.swal2-success-ring', 'borderColor', params.iconColor); + }; + + const iconContent = content => "
                ").concat(content, "
                "); + + const renderImage = (instance, params) => { + const image = getImage(); + + if (!params.imageUrl) { + return hide(image); + } + + show(image, ''); // Src, alt + + image.setAttribute('src', params.imageUrl); + image.setAttribute('alt', params.imageAlt); // Width, height + + applyNumericalStyle(image, 'width', params.imageWidth); + applyNumericalStyle(image, 'height', params.imageHeight); // Class + + image.className = swalClasses.image; + applyCustomClass(image, params, 'image'); + }; + + const createStepElement = step => { + const stepEl = document.createElement('li'); + addClass(stepEl, swalClasses['progress-step']); + setInnerHtml(stepEl, step); + return stepEl; + }; + + const createLineElement = params => { + const lineEl = document.createElement('li'); + addClass(lineEl, swalClasses['progress-step-line']); + + if (params.progressStepsDistance) { + lineEl.style.width = params.progressStepsDistance; + } + + return lineEl; + }; + + const renderProgressSteps = (instance, params) => { + const progressStepsContainer = getProgressSteps(); + + if (!params.progressSteps || params.progressSteps.length === 0) { + return hide(progressStepsContainer); + } + + show(progressStepsContainer); + progressStepsContainer.textContent = ''; + + if (params.currentProgressStep >= params.progressSteps.length) { + warn('Invalid currentProgressStep parameter, it should be less than progressSteps.length ' + '(currentProgressStep like JS arrays starts from 0)'); + } + + params.progressSteps.forEach((step, index) => { + const stepEl = createStepElement(step); + progressStepsContainer.appendChild(stepEl); + + if (index === params.currentProgressStep) { + addClass(stepEl, swalClasses['active-progress-step']); + } + + if (index !== params.progressSteps.length - 1) { + const lineEl = createLineElement(params); + progressStepsContainer.appendChild(lineEl); + } + }); + }; + + const renderTitle = (instance, params) => { + const title = getTitle(); + toggle(title, params.title || params.titleText, 'block'); + + if (params.title) { + parseHtmlToContainer(params.title, title); + } + + if (params.titleText) { + title.innerText = params.titleText; + } // Custom class + + + applyCustomClass(title, params, 'title'); + }; + + const renderPopup = (instance, params) => { + const container = getContainer(); + const popup = getPopup(); // Width + + if (params.toast) { + // #2170 + applyNumericalStyle(container, 'width', params.width); + popup.style.width = '100%'; + popup.insertBefore(getLoader(), getIcon()); + } else { + applyNumericalStyle(popup, 'width', params.width); + } // Padding + + + applyNumericalStyle(popup, 'padding', params.padding); // Background + + if (params.background) { + popup.style.background = params.background; + } + + hide(getValidationMessage()); // Classes + + addClasses(popup, params); + }; + + const addClasses = (popup, params) => { + // Default Class + showClass when updating Swal.update({}) + popup.className = "".concat(swalClasses.popup, " ").concat(isVisible(popup) ? params.showClass.popup : ''); + + if (params.toast) { + addClass([document.documentElement, document.body], swalClasses['toast-shown']); + addClass(popup, swalClasses.toast); + } else { + addClass(popup, swalClasses.modal); + } // Custom class + + + applyCustomClass(popup, params, 'popup'); + + if (typeof params.customClass === 'string') { + addClass(popup, params.customClass); + } // Icon class (#1842) + + + if (params.icon) { + addClass(popup, swalClasses["icon-".concat(params.icon)]); + } + }; + + const render = (instance, params) => { + renderPopup(instance, params); + renderContainer(instance, params); + renderProgressSteps(instance, params); + renderIcon(instance, params); + renderImage(instance, params); + renderTitle(instance, params); + renderCloseButton(instance, params); + renderContent(instance, params); + renderActions(instance, params); + renderFooter(instance, params); + + if (typeof params.didRender === 'function') { + params.didRender(getPopup()); + } + }; + + /* + * Global function to determine if SweetAlert2 popup is shown + */ + + const isVisible$1 = () => { + return isVisible(getPopup()); + }; + /* + * Global function to click 'Confirm' button + */ + + const clickConfirm = () => getConfirmButton() && getConfirmButton().click(); + /* + * Global function to click 'Deny' button + */ + + const clickDeny = () => getDenyButton() && getDenyButton().click(); + /* + * Global function to click 'Cancel' button + */ + + const clickCancel = () => getCancelButton() && getCancelButton().click(); + + function fire(...args) { + const Swal = this; + return new Swal(...args); + } + + /** + * Returns an extended version of `Swal` containing `params` as defaults. + * Useful for reusing Swal configuration. + * + * For example: + * + * Before: + * const textPromptOptions = { input: 'text', showCancelButton: true } + * const {value: firstName} = await Swal.fire({ ...textPromptOptions, title: 'What is your first name?' }) + * const {value: lastName} = await Swal.fire({ ...textPromptOptions, title: 'What is your last name?' }) + * + * After: + * const TextPrompt = Swal.mixin({ input: 'text', showCancelButton: true }) + * const {value: firstName} = await TextPrompt('What is your first name?') + * const {value: lastName} = await TextPrompt('What is your last name?') + * + * @param mixinParams + */ + function mixin(mixinParams) { + class MixinSwal extends this { + _main(params, priorityMixinParams) { + return super._main(params, Object.assign({}, mixinParams, priorityMixinParams)); + } + + } + + return MixinSwal; + } + + /** + * Shows loader (spinner), this is useful with AJAX requests. + * By default the loader be shown instead of the "Confirm" button. + */ + + const showLoading = buttonToReplace => { + let popup = getPopup(); + + if (!popup) { + Swal.fire(); + } + + popup = getPopup(); + const loader = getLoader(); + + if (isToast()) { + hide(getIcon()); + } else { + replaceButton(popup, buttonToReplace); + } + + show(loader); + popup.setAttribute('data-loading', true); + popup.setAttribute('aria-busy', true); + popup.focus(); + }; + + const replaceButton = (popup, buttonToReplace) => { + const actions = getActions(); + const loader = getLoader(); + + if (!buttonToReplace && isVisible(getConfirmButton())) { + buttonToReplace = getConfirmButton(); + } + + show(actions); + + if (buttonToReplace) { + hide(buttonToReplace); + loader.setAttribute('data-button-to-replace', buttonToReplace.className); + } + + loader.parentNode.insertBefore(loader, buttonToReplace); + addClass([popup, actions], swalClasses.loading); + }; + + const RESTORE_FOCUS_TIMEOUT = 100; + + const globalState = {}; + + const focusPreviousActiveElement = () => { + if (globalState.previousActiveElement && globalState.previousActiveElement.focus) { + globalState.previousActiveElement.focus(); + globalState.previousActiveElement = null; + } else if (document.body) { + document.body.focus(); + } + }; // Restore previous active (focused) element + + + const restoreActiveElement = returnFocus => { + return new Promise(resolve => { + if (!returnFocus) { + return resolve(); + } + + const x = window.scrollX; + const y = window.scrollY; + globalState.restoreFocusTimeout = setTimeout(() => { + focusPreviousActiveElement(); + resolve(); + }, RESTORE_FOCUS_TIMEOUT); // issues/900 + + window.scrollTo(x, y); + }); + }; + + /** + * If `timer` parameter is set, returns number of milliseconds of timer remained. + * Otherwise, returns undefined. + */ + + const getTimerLeft = () => { + return globalState.timeout && globalState.timeout.getTimerLeft(); + }; + /** + * Stop timer. Returns number of milliseconds of timer remained. + * If `timer` parameter isn't set, returns undefined. + */ + + const stopTimer = () => { + if (globalState.timeout) { + stopTimerProgressBar(); + return globalState.timeout.stop(); + } + }; + /** + * Resume timer. Returns number of milliseconds of timer remained. + * If `timer` parameter isn't set, returns undefined. + */ + + const resumeTimer = () => { + if (globalState.timeout) { + const remaining = globalState.timeout.start(); + animateTimerProgressBar(remaining); + return remaining; + } + }; + /** + * Resume timer. Returns number of milliseconds of timer remained. + * If `timer` parameter isn't set, returns undefined. + */ + + const toggleTimer = () => { + const timer = globalState.timeout; + return timer && (timer.running ? stopTimer() : resumeTimer()); + }; + /** + * Increase timer. Returns number of milliseconds of an updated timer. + * If `timer` parameter isn't set, returns undefined. + */ + + const increaseTimer = n => { + if (globalState.timeout) { + const remaining = globalState.timeout.increase(n); + animateTimerProgressBar(remaining, true); + return remaining; + } + }; + /** + * Check if timer is running. Returns true if timer is running + * or false if timer is paused or stopped. + * If `timer` parameter isn't set, returns undefined + */ + + const isTimerRunning = () => { + return globalState.timeout && globalState.timeout.isRunning(); + }; + + let bodyClickListenerAdded = false; + const clickHandlers = {}; + function bindClickHandler(attr = 'data-swal-template') { + clickHandlers[attr] = this; + + if (!bodyClickListenerAdded) { + document.body.addEventListener('click', bodyClickListener); + bodyClickListenerAdded = true; + } + } + + const bodyClickListener = event => { + // TODO: replace with event.composedPath() + for (let el = event.target; el && el !== document; el = el.parentNode) { + for (const attr in clickHandlers) { + const template = el.getAttribute(attr); + + if (template) { + clickHandlers[attr].fire({ + template + }); + return; + } + } + } + }; + + const defaultParams = { + title: '', + titleText: '', + text: '', + html: '', + footer: '', + icon: undefined, + iconColor: undefined, + iconHtml: undefined, + template: undefined, + toast: false, + showClass: { + popup: 'swal2-show', + backdrop: 'swal2-backdrop-show', + icon: 'swal2-icon-show' + }, + hideClass: { + popup: 'swal2-hide', + backdrop: 'swal2-backdrop-hide', + icon: 'swal2-icon-hide' + }, + customClass: {}, + target: 'body', + backdrop: true, + heightAuto: true, + allowOutsideClick: true, + allowEscapeKey: true, + allowEnterKey: true, + stopKeydownPropagation: true, + keydownListenerCapture: false, + showConfirmButton: true, + showDenyButton: false, + showCancelButton: false, + preConfirm: undefined, + preDeny: undefined, + confirmButtonText: 'OK', + confirmButtonAriaLabel: '', + confirmButtonColor: undefined, + denyButtonText: 'No', + denyButtonAriaLabel: '', + denyButtonColor: undefined, + cancelButtonText: 'Cancel', + cancelButtonAriaLabel: '', + cancelButtonColor: undefined, + buttonsStyling: true, + reverseButtons: false, + focusConfirm: true, + focusDeny: false, + focusCancel: false, + returnFocus: true, + showCloseButton: false, + closeButtonHtml: '×', + closeButtonAriaLabel: 'Close this dialog', + loaderHtml: '', + showLoaderOnConfirm: false, + showLoaderOnDeny: false, + imageUrl: undefined, + imageWidth: undefined, + imageHeight: undefined, + imageAlt: '', + timer: undefined, + timerProgressBar: false, + width: undefined, + padding: undefined, + background: undefined, + input: undefined, + inputPlaceholder: '', + inputLabel: '', + inputValue: '', + inputOptions: {}, + inputAutoTrim: true, + inputAttributes: {}, + inputValidator: undefined, + returnInputValueOnDeny: false, + validationMessage: undefined, + grow: false, + position: 'center', + progressSteps: [], + currentProgressStep: undefined, + progressStepsDistance: undefined, + willOpen: undefined, + didOpen: undefined, + didRender: undefined, + willClose: undefined, + didClose: undefined, + didDestroy: undefined, + scrollbarPadding: true + }; + const updatableParams = ['allowEscapeKey', 'allowOutsideClick', 'background', 'buttonsStyling', 'cancelButtonAriaLabel', 'cancelButtonColor', 'cancelButtonText', 'closeButtonAriaLabel', 'closeButtonHtml', 'confirmButtonAriaLabel', 'confirmButtonColor', 'confirmButtonText', 'currentProgressStep', 'customClass', 'denyButtonAriaLabel', 'denyButtonColor', 'denyButtonText', 'didClose', 'didDestroy', 'footer', 'hideClass', 'html', 'icon', 'iconColor', 'iconHtml', 'imageAlt', 'imageHeight', 'imageUrl', 'imageWidth', 'preConfirm', 'preDeny', 'progressSteps', 'returnFocus', 'reverseButtons', 'showCancelButton', 'showCloseButton', 'showConfirmButton', 'showDenyButton', 'text', 'title', 'titleText', 'willClose']; + const deprecatedParams = {}; + const toastIncompatibleParams = ['allowOutsideClick', 'allowEnterKey', 'backdrop', 'focusConfirm', 'focusDeny', 'focusCancel', 'returnFocus', 'heightAuto', 'keydownListenerCapture']; + /** + * Is valid parameter + * @param {String} paramName + */ + + const isValidParameter = paramName => { + return Object.prototype.hasOwnProperty.call(defaultParams, paramName); + }; + /** + * Is valid parameter for Swal.update() method + * @param {String} paramName + */ + + const isUpdatableParameter = paramName => { + return updatableParams.indexOf(paramName) !== -1; + }; + /** + * Is deprecated parameter + * @param {String} paramName + */ + + const isDeprecatedParameter = paramName => { + return deprecatedParams[paramName]; + }; + + const checkIfParamIsValid = param => { + if (!isValidParameter(param)) { + warn("Unknown parameter \"".concat(param, "\"")); + } + }; + + const checkIfToastParamIsValid = param => { + if (toastIncompatibleParams.includes(param)) { + warn("The parameter \"".concat(param, "\" is incompatible with toasts")); + } + }; + + const checkIfParamIsDeprecated = param => { + if (isDeprecatedParameter(param)) { + warnAboutDeprecation(param, isDeprecatedParameter(param)); + } + }; + /** + * Show relevant warnings for given params + * + * @param params + */ + + + const showWarningsForParams = params => { + if (!params.backdrop && params.allowOutsideClick) { + warn('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`'); + } + + for (const param in params) { + checkIfParamIsValid(param); + + if (params.toast) { + checkIfToastParamIsValid(param); + } + + checkIfParamIsDeprecated(param); + } + }; + + + + var staticMethods = /*#__PURE__*/Object.freeze({ + isValidParameter: isValidParameter, + isUpdatableParameter: isUpdatableParameter, + isDeprecatedParameter: isDeprecatedParameter, + argsToParams: argsToParams, + isVisible: isVisible$1, + clickConfirm: clickConfirm, + clickDeny: clickDeny, + clickCancel: clickCancel, + getContainer: getContainer, + getPopup: getPopup, + getTitle: getTitle, + getHtmlContainer: getHtmlContainer, + getImage: getImage, + getIcon: getIcon, + getInputLabel: getInputLabel, + getCloseButton: getCloseButton, + getActions: getActions, + getConfirmButton: getConfirmButton, + getDenyButton: getDenyButton, + getCancelButton: getCancelButton, + getLoader: getLoader, + getFooter: getFooter, + getTimerProgressBar: getTimerProgressBar, + getFocusableElements: getFocusableElements, + getValidationMessage: getValidationMessage, + isLoading: isLoading, + fire: fire, + mixin: mixin, + showLoading: showLoading, + enableLoading: showLoading, + getTimerLeft: getTimerLeft, + stopTimer: stopTimer, + resumeTimer: resumeTimer, + toggleTimer: toggleTimer, + increaseTimer: increaseTimer, + isTimerRunning: isTimerRunning, + bindClickHandler: bindClickHandler + }); + + /** + * Hides loader and shows back the button which was hidden by .showLoading() + */ + + function hideLoading() { + // do nothing if popup is closed + const innerParams = privateProps.innerParams.get(this); + + if (!innerParams) { + return; + } + + const domCache = privateProps.domCache.get(this); + hide(domCache.loader); + + if (isToast()) { + if (innerParams.icon) { + show(getIcon()); + } + } else { + showRelatedButton(domCache); + } + + removeClass([domCache.popup, domCache.actions], swalClasses.loading); + domCache.popup.removeAttribute('aria-busy'); + domCache.popup.removeAttribute('data-loading'); + domCache.confirmButton.disabled = false; + domCache.denyButton.disabled = false; + domCache.cancelButton.disabled = false; + } + + const showRelatedButton = domCache => { + const buttonToReplace = domCache.popup.getElementsByClassName(domCache.loader.getAttribute('data-button-to-replace')); + + if (buttonToReplace.length) { + show(buttonToReplace[0], 'inline-block'); + } else if (allButtonsAreHidden()) { + hide(domCache.actions); + } + }; + + function getInput$1(instance) { + const innerParams = privateProps.innerParams.get(instance || this); + const domCache = privateProps.domCache.get(instance || this); + + if (!domCache) { + return null; + } + + return getInput(domCache.popup, innerParams.input); + } + + const fixScrollbar = () => { + // for queues, do not do this more than once + if (states.previousBodyPadding !== null) { + return; + } // if the body has overflow + + + if (document.body.scrollHeight > window.innerHeight) { + // add padding so the content doesn't shift after removal of scrollbar + states.previousBodyPadding = parseInt(window.getComputedStyle(document.body).getPropertyValue('padding-right')); + document.body.style.paddingRight = "".concat(states.previousBodyPadding + measureScrollbar(), "px"); + } + }; + const undoScrollbar = () => { + if (states.previousBodyPadding !== null) { + document.body.style.paddingRight = "".concat(states.previousBodyPadding, "px"); + states.previousBodyPadding = null; + } + }; + + /* istanbul ignore file */ + + const iOSfix = () => { + const iOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream || navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1; + + if (iOS && !hasClass(document.body, swalClasses.iosfix)) { + const offset = document.body.scrollTop; + document.body.style.top = "".concat(offset * -1, "px"); + addClass(document.body, swalClasses.iosfix); + lockBodyScroll(); + addBottomPaddingForTallPopups(); // #1948 + } + }; + + const addBottomPaddingForTallPopups = () => { + const safari = !navigator.userAgent.match(/(CriOS|FxiOS|EdgiOS|YaBrowser|UCBrowser)/i); + + if (safari) { + const bottomPanelHeight = 44; + + if (getPopup().scrollHeight > window.innerHeight - bottomPanelHeight) { + getContainer().style.paddingBottom = "".concat(bottomPanelHeight, "px"); + } + } + }; + + const lockBodyScroll = () => { + // #1246 + const container = getContainer(); + let preventTouchMove; + + container.ontouchstart = e => { + preventTouchMove = shouldPreventTouchMove(e); + }; + + container.ontouchmove = e => { + if (preventTouchMove) { + e.preventDefault(); + e.stopPropagation(); + } + }; + }; + + const shouldPreventTouchMove = event => { + const target = event.target; + const container = getContainer(); + + if (isStylys(event) || isZoom(event)) { + return false; + } + + if (target === container) { + return true; + } + + if (!isScrollable(container) && target.tagName !== 'INPUT' && // #1603 + target.tagName !== 'TEXTAREA' && // #2266 + !(isScrollable(getHtmlContainer()) && // #1944 + getHtmlContainer().contains(target))) { + return true; + } + + return false; + }; + + const isStylys = event => { + // #1786 + return event.touches && event.touches.length && event.touches[0].touchType === 'stylus'; + }; + + const isZoom = event => { + // #1891 + return event.touches && event.touches.length > 1; + }; + + const undoIOSfix = () => { + if (hasClass(document.body, swalClasses.iosfix)) { + const offset = parseInt(document.body.style.top, 10); + removeClass(document.body, swalClasses.iosfix); + document.body.style.top = ''; + document.body.scrollTop = offset * -1; + } + }; + + // Adding aria-hidden="true" to elements outside of the active modal dialog ensures that + // elements not within the active modal dialog will not be surfaced if a user opens a screen + // reader’s list of elements (headings, form controls, landmarks, etc.) in the document. + + const setAriaHidden = () => { + const bodyChildren = toArray(document.body.children); + bodyChildren.forEach(el => { + if (el === getContainer() || el.contains(getContainer())) { + return; + } + + if (el.hasAttribute('aria-hidden')) { + el.setAttribute('data-previous-aria-hidden', el.getAttribute('aria-hidden')); + } + + el.setAttribute('aria-hidden', 'true'); + }); + }; + const unsetAriaHidden = () => { + const bodyChildren = toArray(document.body.children); + bodyChildren.forEach(el => { + if (el.hasAttribute('data-previous-aria-hidden')) { + el.setAttribute('aria-hidden', el.getAttribute('data-previous-aria-hidden')); + el.removeAttribute('data-previous-aria-hidden'); + } else { + el.removeAttribute('aria-hidden'); + } + }); + }; + + /** + * This module containts `WeakMap`s for each effectively-"private property" that a `Swal` has. + * For example, to set the private property "foo" of `this` to "bar", you can `privateProps.foo.set(this, 'bar')` + * This is the approach that Babel will probably take to implement private methods/fields + * https://github.com/tc39/proposal-private-methods + * https://github.com/babel/babel/pull/7555 + * Once we have the changes from that PR in Babel, and our core class fits reasonable in *one module* + * then we can use that language feature. + */ + var privateMethods = { + swalPromiseResolve: new WeakMap() + }; + + /* + * Instance method to close sweetAlert + */ + + function removePopupAndResetState(instance, container, returnFocus, didClose) { + if (isToast()) { + triggerDidCloseAndDispose(instance, didClose); + } else { + restoreActiveElement(returnFocus).then(() => triggerDidCloseAndDispose(instance, didClose)); + globalState.keydownTarget.removeEventListener('keydown', globalState.keydownHandler, { + capture: globalState.keydownListenerCapture + }); + globalState.keydownHandlerAdded = false; + } + + const isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent); // workaround for #2088 + // for some reason removing the container in Safari will scroll the document to bottom + + if (isSafari) { + container.setAttribute('style', 'display:none !important'); + container.removeAttribute('class'); + container.innerHTML = ''; + } else { + container.remove(); + } + + if (isModal()) { + undoScrollbar(); + undoIOSfix(); + unsetAriaHidden(); + } + + removeBodyClasses(); + } + + function removeBodyClasses() { + removeClass([document.documentElement, document.body], [swalClasses.shown, swalClasses['height-auto'], swalClasses['no-backdrop'], swalClasses['toast-shown']]); + } + + function close(resolveValue) { + const popup = getPopup(); + + if (!popup) { + return; + } + + resolveValue = prepareResolveValue(resolveValue); + const innerParams = privateProps.innerParams.get(this); + + if (!innerParams || hasClass(popup, innerParams.hideClass.popup)) { + return; + } + + const swalPromiseResolve = privateMethods.swalPromiseResolve.get(this); + removeClass(popup, innerParams.showClass.popup); + addClass(popup, innerParams.hideClass.popup); + const backdrop = getContainer(); + removeClass(backdrop, innerParams.showClass.backdrop); + addClass(backdrop, innerParams.hideClass.backdrop); + handlePopupAnimation(this, popup, innerParams); // Resolve Swal promise + + swalPromiseResolve(resolveValue); + } + + const prepareResolveValue = resolveValue => { + // When user calls Swal.close() + if (typeof resolveValue === 'undefined') { + return { + isConfirmed: false, + isDenied: false, + isDismissed: true + }; + } + + return Object.assign({ + isConfirmed: false, + isDenied: false, + isDismissed: false + }, resolveValue); + }; + + const handlePopupAnimation = (instance, popup, innerParams) => { + const container = getContainer(); // If animation is supported, animate + + const animationIsSupported = animationEndEvent && hasCssAnimation(popup); + + if (typeof innerParams.willClose === 'function') { + innerParams.willClose(popup); + } + + if (animationIsSupported) { + animatePopup(instance, popup, container, innerParams.returnFocus, innerParams.didClose); + } else { + // Otherwise, remove immediately + removePopupAndResetState(instance, container, innerParams.returnFocus, innerParams.didClose); + } + }; + + const animatePopup = (instance, popup, container, returnFocus, didClose) => { + globalState.swalCloseEventFinishedCallback = removePopupAndResetState.bind(null, instance, container, returnFocus, didClose); + popup.addEventListener(animationEndEvent, function (e) { + if (e.target === popup) { + globalState.swalCloseEventFinishedCallback(); + delete globalState.swalCloseEventFinishedCallback; + } + }); + }; + + const triggerDidCloseAndDispose = (instance, didClose) => { + setTimeout(() => { + if (typeof didClose === 'function') { + didClose.bind(instance.params)(); + } + + instance._destroy(); + }); + }; + + function setButtonsDisabled(instance, buttons, disabled) { + const domCache = privateProps.domCache.get(instance); + buttons.forEach(button => { + domCache[button].disabled = disabled; + }); + } + + function setInputDisabled(input, disabled) { + if (!input) { + return false; + } + + if (input.type === 'radio') { + const radiosContainer = input.parentNode.parentNode; + const radios = radiosContainer.querySelectorAll('input'); + + for (let i = 0; i < radios.length; i++) { + radios[i].disabled = disabled; + } + } else { + input.disabled = disabled; + } + } + + function enableButtons() { + setButtonsDisabled(this, ['confirmButton', 'denyButton', 'cancelButton'], false); + } + function disableButtons() { + setButtonsDisabled(this, ['confirmButton', 'denyButton', 'cancelButton'], true); + } + function enableInput() { + return setInputDisabled(this.getInput(), false); + } + function disableInput() { + return setInputDisabled(this.getInput(), true); + } + + function showValidationMessage(error) { + const domCache = privateProps.domCache.get(this); + const params = privateProps.innerParams.get(this); + setInnerHtml(domCache.validationMessage, error); + domCache.validationMessage.className = swalClasses['validation-message']; + + if (params.customClass && params.customClass.validationMessage) { + addClass(domCache.validationMessage, params.customClass.validationMessage); + } + + show(domCache.validationMessage); + const input = this.getInput(); + + if (input) { + input.setAttribute('aria-invalid', true); + input.setAttribute('aria-describedby', swalClasses['validation-message']); + focusInput(input); + addClass(input, swalClasses.inputerror); + } + } // Hide block with validation message + + function resetValidationMessage$1() { + const domCache = privateProps.domCache.get(this); + + if (domCache.validationMessage) { + hide(domCache.validationMessage); + } + + const input = this.getInput(); + + if (input) { + input.removeAttribute('aria-invalid'); + input.removeAttribute('aria-describedby'); + removeClass(input, swalClasses.inputerror); + } + } + + function getProgressSteps$1() { + const domCache = privateProps.domCache.get(this); + return domCache.progressSteps; + } + + class Timer { + constructor(callback, delay) { + this.callback = callback; + this.remaining = delay; + this.running = false; + this.start(); + } + + start() { + if (!this.running) { + this.running = true; + this.started = new Date(); + this.id = setTimeout(this.callback, this.remaining); + } + + return this.remaining; + } + + stop() { + if (this.running) { + this.running = false; + clearTimeout(this.id); + this.remaining -= new Date() - this.started; + } + + return this.remaining; + } + + increase(n) { + const running = this.running; + + if (running) { + this.stop(); + } + + this.remaining += n; + + if (running) { + this.start(); + } + + return this.remaining; + } + + getTimerLeft() { + if (this.running) { + this.stop(); + this.start(); + } + + return this.remaining; + } + + isRunning() { + return this.running; + } + + } + + var defaultInputValidators = { + email: (string, validationMessage) => { + return /^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]{2,24}$/.test(string) ? Promise.resolve() : Promise.resolve(validationMessage || 'Invalid email address'); + }, + url: (string, validationMessage) => { + // taken from https://stackoverflow.com/a/3809435 with a small change from #1306 and #2013 + return /^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(string) ? Promise.resolve() : Promise.resolve(validationMessage || 'Invalid URL'); + } + }; + + function setDefaultInputValidators(params) { + // Use default `inputValidator` for supported input types if not provided + if (!params.inputValidator) { + Object.keys(defaultInputValidators).forEach(key => { + if (params.input === key) { + params.inputValidator = defaultInputValidators[key]; + } + }); + } + } + + function validateCustomTargetElement(params) { + // Determine if the custom target element is valid + if (!params.target || typeof params.target === 'string' && !document.querySelector(params.target) || typeof params.target !== 'string' && !params.target.appendChild) { + warn('Target parameter is not valid, defaulting to "body"'); + params.target = 'body'; + } + } + /** + * Set type, text and actions on popup + * + * @param params + * @returns {boolean} + */ + + + function setParameters(params) { + setDefaultInputValidators(params); // showLoaderOnConfirm && preConfirm + + if (params.showLoaderOnConfirm && !params.preConfirm) { + warn('showLoaderOnConfirm is set to true, but preConfirm is not defined.\n' + 'showLoaderOnConfirm should be used together with preConfirm, see usage example:\n' + 'https://sweetalert2.github.io/#ajax-request'); + } + + validateCustomTargetElement(params); // Replace newlines with
                in title + + if (typeof params.title === 'string') { + params.title = params.title.split('\n').join('
                '); + } + + init(params); + } + + const swalStringParams = ['swal-title', 'swal-html', 'swal-footer']; + const getTemplateParams = params => { + const template = typeof params.template === 'string' ? document.querySelector(params.template) : params.template; + + if (!template) { + return {}; + } + + const templateContent = template.content; + showWarningsForElements(templateContent); + const result = Object.assign(getSwalParams(templateContent), getSwalButtons(templateContent), getSwalImage(templateContent), getSwalIcon(templateContent), getSwalInput(templateContent), getSwalStringParams(templateContent, swalStringParams)); + return result; + }; + + const getSwalParams = templateContent => { + const result = {}; + toArray(templateContent.querySelectorAll('swal-param')).forEach(param => { + showWarningsForAttributes(param, ['name', 'value']); + const paramName = param.getAttribute('name'); + let value = param.getAttribute('value'); + + if (typeof defaultParams[paramName] === 'boolean' && value === 'false') { + value = false; + } + + if (typeof defaultParams[paramName] === 'object') { + value = JSON.parse(value); + } + + result[paramName] = value; + }); + return result; + }; + + const getSwalButtons = templateContent => { + const result = {}; + toArray(templateContent.querySelectorAll('swal-button')).forEach(button => { + showWarningsForAttributes(button, ['type', 'color', 'aria-label']); + const type = button.getAttribute('type'); + result["".concat(type, "ButtonText")] = button.innerHTML; + result["show".concat(capitalizeFirstLetter(type), "Button")] = true; + + if (button.hasAttribute('color')) { + result["".concat(type, "ButtonColor")] = button.getAttribute('color'); + } + + if (button.hasAttribute('aria-label')) { + result["".concat(type, "ButtonAriaLabel")] = button.getAttribute('aria-label'); + } + }); + return result; + }; + + const getSwalImage = templateContent => { + const result = {}; + const image = templateContent.querySelector('swal-image'); + + if (image) { + showWarningsForAttributes(image, ['src', 'width', 'height', 'alt']); + + if (image.hasAttribute('src')) { + result.imageUrl = image.getAttribute('src'); + } + + if (image.hasAttribute('width')) { + result.imageWidth = image.getAttribute('width'); + } + + if (image.hasAttribute('height')) { + result.imageHeight = image.getAttribute('height'); + } + + if (image.hasAttribute('alt')) { + result.imageAlt = image.getAttribute('alt'); + } + } + + return result; + }; + + const getSwalIcon = templateContent => { + const result = {}; + const icon = templateContent.querySelector('swal-icon'); + + if (icon) { + showWarningsForAttributes(icon, ['type', 'color']); + + if (icon.hasAttribute('type')) { + result.icon = icon.getAttribute('type'); + } + + if (icon.hasAttribute('color')) { + result.iconColor = icon.getAttribute('color'); + } + + result.iconHtml = icon.innerHTML; + } + + return result; + }; + + const getSwalInput = templateContent => { + const result = {}; + const input = templateContent.querySelector('swal-input'); + + if (input) { + showWarningsForAttributes(input, ['type', 'label', 'placeholder', 'value']); + result.input = input.getAttribute('type') || 'text'; + + if (input.hasAttribute('label')) { + result.inputLabel = input.getAttribute('label'); + } + + if (input.hasAttribute('placeholder')) { + result.inputPlaceholder = input.getAttribute('placeholder'); + } + + if (input.hasAttribute('value')) { + result.inputValue = input.getAttribute('value'); + } + } + + const inputOptions = templateContent.querySelectorAll('swal-input-option'); + + if (inputOptions.length) { + result.inputOptions = {}; + toArray(inputOptions).forEach(option => { + showWarningsForAttributes(option, ['value']); + const optionValue = option.getAttribute('value'); + const optionName = option.innerHTML; + result.inputOptions[optionValue] = optionName; + }); + } + + return result; + }; + + const getSwalStringParams = (templateContent, paramNames) => { + const result = {}; + + for (const i in paramNames) { + const paramName = paramNames[i]; + const tag = templateContent.querySelector(paramName); + + if (tag) { + showWarningsForAttributes(tag, []); + result[paramName.replace(/^swal-/, '')] = tag.innerHTML.trim(); + } + } + + return result; + }; + + const showWarningsForElements = template => { + const allowedElements = swalStringParams.concat(['swal-param', 'swal-button', 'swal-image', 'swal-icon', 'swal-input', 'swal-input-option']); + toArray(template.children).forEach(el => { + const tagName = el.tagName.toLowerCase(); + + if (allowedElements.indexOf(tagName) === -1) { + warn("Unrecognized element <".concat(tagName, ">")); + } + }); + }; + + const showWarningsForAttributes = (el, allowedAttributes) => { + toArray(el.attributes).forEach(attribute => { + if (allowedAttributes.indexOf(attribute.name) === -1) { + warn(["Unrecognized attribute \"".concat(attribute.name, "\" on <").concat(el.tagName.toLowerCase(), ">."), "".concat(allowedAttributes.length ? "Allowed attributes are: ".concat(allowedAttributes.join(', ')) : 'To set the value, use HTML within the element.')]); + } + }); + }; + + const SHOW_CLASS_TIMEOUT = 10; + /** + * Open popup, add necessary classes and styles, fix scrollbar + * + * @param params + */ + + const openPopup = params => { + const container = getContainer(); + const popup = getPopup(); + + if (typeof params.willOpen === 'function') { + params.willOpen(popup); + } + + const bodyStyles = window.getComputedStyle(document.body); + const initialBodyOverflow = bodyStyles.overflowY; + addClasses$1(container, popup, params); // scrolling is 'hidden' until animation is done, after that 'auto' + + setTimeout(() => { + setScrollingVisibility(container, popup); + }, SHOW_CLASS_TIMEOUT); + + if (isModal()) { + fixScrollContainer(container, params.scrollbarPadding, initialBodyOverflow); + setAriaHidden(); + } + + if (!isToast() && !globalState.previousActiveElement) { + globalState.previousActiveElement = document.activeElement; + } + + if (typeof params.didOpen === 'function') { + setTimeout(() => params.didOpen(popup)); + } + + removeClass(container, swalClasses['no-transition']); + }; + + const swalOpenAnimationFinished = event => { + const popup = getPopup(); + + if (event.target !== popup) { + return; + } + + const container = getContainer(); + popup.removeEventListener(animationEndEvent, swalOpenAnimationFinished); + container.style.overflowY = 'auto'; + }; + + const setScrollingVisibility = (container, popup) => { + if (animationEndEvent && hasCssAnimation(popup)) { + container.style.overflowY = 'hidden'; + popup.addEventListener(animationEndEvent, swalOpenAnimationFinished); + } else { + container.style.overflowY = 'auto'; + } + }; + + const fixScrollContainer = (container, scrollbarPadding, initialBodyOverflow) => { + iOSfix(); + + if (scrollbarPadding && initialBodyOverflow !== 'hidden') { + fixScrollbar(); + } // sweetalert2/issues/1247 + + + setTimeout(() => { + container.scrollTop = 0; + }); + }; + + const addClasses$1 = (container, popup, params) => { + addClass(container, params.showClass.backdrop); // the workaround with setting/unsetting opacity is needed for #2019 and 2059 + + popup.style.setProperty('opacity', '0', 'important'); + show(popup, 'grid'); + setTimeout(() => { + // Animate popup right after showing it + addClass(popup, params.showClass.popup); // and remove the opacity workaround + + popup.style.removeProperty('opacity'); + }, SHOW_CLASS_TIMEOUT); // 10ms in order to fix #2062 + + addClass([document.documentElement, document.body], swalClasses.shown); + + if (params.heightAuto && params.backdrop && !params.toast) { + addClass([document.documentElement, document.body], swalClasses['height-auto']); + } + }; + + const handleInputOptionsAndValue = (instance, params) => { + if (params.input === 'select' || params.input === 'radio') { + handleInputOptions(instance, params); + } else if (['text', 'email', 'number', 'tel', 'textarea'].includes(params.input) && (hasToPromiseFn(params.inputValue) || isPromise(params.inputValue))) { + showLoading(getConfirmButton()); + handleInputValue(instance, params); + } + }; + const getInputValue = (instance, innerParams) => { + const input = instance.getInput(); + + if (!input) { + return null; + } + + switch (innerParams.input) { + case 'checkbox': + return getCheckboxValue(input); + + case 'radio': + return getRadioValue(input); + + case 'file': + return getFileValue(input); + + default: + return innerParams.inputAutoTrim ? input.value.trim() : input.value; + } + }; + + const getCheckboxValue = input => input.checked ? 1 : 0; + + const getRadioValue = input => input.checked ? input.value : null; + + const getFileValue = input => input.files.length ? input.getAttribute('multiple') !== null ? input.files : input.files[0] : null; + + const handleInputOptions = (instance, params) => { + const popup = getPopup(); + + const processInputOptions = inputOptions => populateInputOptions[params.input](popup, formatInputOptions(inputOptions), params); + + if (hasToPromiseFn(params.inputOptions) || isPromise(params.inputOptions)) { + showLoading(getConfirmButton()); + asPromise(params.inputOptions).then(inputOptions => { + instance.hideLoading(); + processInputOptions(inputOptions); + }); + } else if (typeof params.inputOptions === 'object') { + processInputOptions(params.inputOptions); + } else { + error("Unexpected type of inputOptions! Expected object, Map or Promise, got ".concat(typeof params.inputOptions)); + } + }; + + const handleInputValue = (instance, params) => { + const input = instance.getInput(); + hide(input); + asPromise(params.inputValue).then(inputValue => { + input.value = params.input === 'number' ? parseFloat(inputValue) || 0 : "".concat(inputValue); + show(input); + input.focus(); + instance.hideLoading(); + }).catch(err => { + error("Error in inputValue promise: ".concat(err)); + input.value = ''; + show(input); + input.focus(); + instance.hideLoading(); + }); + }; + + const populateInputOptions = { + select: (popup, inputOptions, params) => { + const select = getChildByClass(popup, swalClasses.select); + + const renderOption = (parent, optionLabel, optionValue) => { + const option = document.createElement('option'); + option.value = optionValue; + setInnerHtml(option, optionLabel); + option.selected = isSelected(optionValue, params.inputValue); + parent.appendChild(option); + }; + + inputOptions.forEach(inputOption => { + const optionValue = inputOption[0]; + const optionLabel = inputOption[1]; // spec: + // https://www.w3.org/TR/html401/interact/forms.html#h-17.6 + // "...all OPTGROUP elements must be specified directly within a SELECT element (i.e., groups may not be nested)..." + // check whether this is a + + if (Array.isArray(optionLabel)) { + // if it is an array, then it is an + const optgroup = document.createElement('optgroup'); + optgroup.label = optionValue; + optgroup.disabled = false; // not configurable for now + + select.appendChild(optgroup); + optionLabel.forEach(o => renderOption(optgroup, o[1], o[0])); + } else { + // case of + valueFormatted = formatInputOptions(valueFormatted); + } + + result.push([key, valueFormatted]); + }); + } else { + Object.keys(inputOptions).forEach(key => { + let valueFormatted = inputOptions[key]; + + if (typeof valueFormatted === 'object') { + // case of + valueFormatted = formatInputOptions(valueFormatted); + } + + result.push([key, valueFormatted]); + }); + } + + return result; + }; + + const isSelected = (optionValue, inputValue) => { + return inputValue && inputValue.toString() === optionValue.toString(); + }; + + const handleConfirmButtonClick = instance => { + const innerParams = privateProps.innerParams.get(instance); + instance.disableButtons(); + + if (innerParams.input) { + handleConfirmOrDenyWithInput(instance, 'confirm'); + } else { + confirm(instance, true); + } + }; + const handleDenyButtonClick = instance => { + const innerParams = privateProps.innerParams.get(instance); + instance.disableButtons(); + + if (innerParams.returnInputValueOnDeny) { + handleConfirmOrDenyWithInput(instance, 'deny'); + } else { + deny(instance, false); + } + }; + const handleCancelButtonClick = (instance, dismissWith) => { + instance.disableButtons(); + dismissWith(DismissReason.cancel); + }; + + const handleConfirmOrDenyWithInput = (instance, type + /* 'confirm' | 'deny' */ + ) => { + const innerParams = privateProps.innerParams.get(instance); + const inputValue = getInputValue(instance, innerParams); + + if (innerParams.inputValidator) { + handleInputValidator(instance, inputValue, type); + } else if (!instance.getInput().checkValidity()) { + instance.enableButtons(); + instance.showValidationMessage(innerParams.validationMessage); + } else if (type === 'deny') { + deny(instance, inputValue); + } else { + confirm(instance, inputValue); + } + }; + + const handleInputValidator = (instance, inputValue, type + /* 'confirm' | 'deny' */ + ) => { + const innerParams = privateProps.innerParams.get(instance); + instance.disableInput(); + const validationPromise = Promise.resolve().then(() => asPromise(innerParams.inputValidator(inputValue, innerParams.validationMessage))); + validationPromise.then(validationMessage => { + instance.enableButtons(); + instance.enableInput(); + + if (validationMessage) { + instance.showValidationMessage(validationMessage); + } else if (type === 'deny') { + deny(instance, inputValue); + } else { + confirm(instance, inputValue); + } + }); + }; + + const deny = (instance, value) => { + const innerParams = privateProps.innerParams.get(instance || undefined); + + if (innerParams.showLoaderOnDeny) { + showLoading(getDenyButton()); + } + + if (innerParams.preDeny) { + const preDenyPromise = Promise.resolve().then(() => asPromise(innerParams.preDeny(value, innerParams.validationMessage))); + preDenyPromise.then(preDenyValue => { + if (preDenyValue === false) { + instance.hideLoading(); + } else { + instance.closePopup({ + isDenied: true, + value: typeof preDenyValue === 'undefined' ? value : preDenyValue + }); + } + }); + } else { + instance.closePopup({ + isDenied: true, + value + }); + } + }; + + const succeedWith = (instance, value) => { + instance.closePopup({ + isConfirmed: true, + value + }); + }; + + const confirm = (instance, value) => { + const innerParams = privateProps.innerParams.get(instance || undefined); + + if (innerParams.showLoaderOnConfirm) { + showLoading(); // TODO: make showLoading an *instance* method + } + + if (innerParams.preConfirm) { + instance.resetValidationMessage(); + const preConfirmPromise = Promise.resolve().then(() => asPromise(innerParams.preConfirm(value, innerParams.validationMessage))); + preConfirmPromise.then(preConfirmValue => { + if (isVisible(getValidationMessage()) || preConfirmValue === false) { + instance.hideLoading(); + } else { + succeedWith(instance, typeof preConfirmValue === 'undefined' ? value : preConfirmValue); + } + }); + } else { + succeedWith(instance, value); + } + }; + + const addKeydownHandler = (instance, globalState, innerParams, dismissWith) => { + if (globalState.keydownTarget && globalState.keydownHandlerAdded) { + globalState.keydownTarget.removeEventListener('keydown', globalState.keydownHandler, { + capture: globalState.keydownListenerCapture + }); + globalState.keydownHandlerAdded = false; + } + + if (!innerParams.toast) { + globalState.keydownHandler = e => keydownHandler(instance, e, dismissWith); + + globalState.keydownTarget = innerParams.keydownListenerCapture ? window : getPopup(); + globalState.keydownListenerCapture = innerParams.keydownListenerCapture; + globalState.keydownTarget.addEventListener('keydown', globalState.keydownHandler, { + capture: globalState.keydownListenerCapture + }); + globalState.keydownHandlerAdded = true; + } + }; // Focus handling + + const setFocus = (innerParams, index, increment) => { + const focusableElements = getFocusableElements(); // search for visible elements and select the next possible match + + if (focusableElements.length) { + index = index + increment; // rollover to first item + + if (index === focusableElements.length) { + index = 0; // go to last item + } else if (index === -1) { + index = focusableElements.length - 1; + } + + return focusableElements[index].focus(); + } // no visible focusable elements, focus the popup + + + getPopup().focus(); + }; + const arrowKeysNextButton = ['ArrowRight', 'ArrowDown']; + const arrowKeysPreviousButton = ['ArrowLeft', 'ArrowUp']; + + const keydownHandler = (instance, e, dismissWith) => { + const innerParams = privateProps.innerParams.get(instance); + + if (!innerParams) { + return; // This instance has already been destroyed + } + + if (innerParams.stopKeydownPropagation) { + e.stopPropagation(); + } // ENTER + + + if (e.key === 'Enter') { + handleEnter(instance, e, innerParams); // TAB + } else if (e.key === 'Tab') { + handleTab(e, innerParams); // ARROWS - switch focus between buttons + } else if ([...arrowKeysNextButton, ...arrowKeysPreviousButton].includes(e.key)) { + handleArrows(e.key); // ESC + } else if (e.key === 'Escape') { + handleEsc(e, innerParams, dismissWith); + } + }; + + const handleEnter = (instance, e, innerParams) => { + // #720 #721 + if (e.isComposing) { + return; + } + + if (e.target && instance.getInput() && e.target.outerHTML === instance.getInput().outerHTML) { + if (['textarea', 'file'].includes(innerParams.input)) { + return; // do not submit + } + + clickConfirm(); + e.preventDefault(); + } + }; + + const handleTab = (e, innerParams) => { + const targetElement = e.target; + const focusableElements = getFocusableElements(); + let btnIndex = -1; + + for (let i = 0; i < focusableElements.length; i++) { + if (targetElement === focusableElements[i]) { + btnIndex = i; + break; + } + } + + if (!e.shiftKey) { + // Cycle to the next button + setFocus(innerParams, btnIndex, 1); + } else { + // Cycle to the prev button + setFocus(innerParams, btnIndex, -1); + } + + e.stopPropagation(); + e.preventDefault(); + }; + + const handleArrows = key => { + const confirmButton = getConfirmButton(); + const denyButton = getDenyButton(); + const cancelButton = getCancelButton(); + + if (![confirmButton, denyButton, cancelButton].includes(document.activeElement)) { + return; + } + + const sibling = arrowKeysNextButton.includes(key) ? 'nextElementSibling' : 'previousElementSibling'; + const buttonToFocus = document.activeElement[sibling]; + + if (buttonToFocus) { + buttonToFocus.focus(); + } + }; + + const handleEsc = (e, innerParams, dismissWith) => { + if (callIfFunction(innerParams.allowEscapeKey)) { + e.preventDefault(); + dismissWith(DismissReason.esc); + } + }; + + const handlePopupClick = (instance, domCache, dismissWith) => { + const innerParams = privateProps.innerParams.get(instance); + + if (innerParams.toast) { + handleToastClick(instance, domCache, dismissWith); + } else { + // Ignore click events that had mousedown on the popup but mouseup on the container + // This can happen when the user drags a slider + handleModalMousedown(domCache); // Ignore click events that had mousedown on the container but mouseup on the popup + + handleContainerMousedown(domCache); + handleModalClick(instance, domCache, dismissWith); + } + }; + + const handleToastClick = (instance, domCache, dismissWith) => { + // Closing toast by internal click + domCache.popup.onclick = () => { + const innerParams = privateProps.innerParams.get(instance); + + if (innerParams.showConfirmButton || innerParams.showDenyButton || innerParams.showCancelButton || innerParams.showCloseButton || innerParams.timer || innerParams.input) { + return; + } + + dismissWith(DismissReason.close); + }; + }; + + let ignoreOutsideClick = false; + + const handleModalMousedown = domCache => { + domCache.popup.onmousedown = () => { + domCache.container.onmouseup = function (e) { + domCache.container.onmouseup = undefined; // We only check if the mouseup target is the container because usually it doesn't + // have any other direct children aside of the popup + + if (e.target === domCache.container) { + ignoreOutsideClick = true; + } + }; + }; + }; + + const handleContainerMousedown = domCache => { + domCache.container.onmousedown = () => { + domCache.popup.onmouseup = function (e) { + domCache.popup.onmouseup = undefined; // We also need to check if the mouseup target is a child of the popup + + if (e.target === domCache.popup || domCache.popup.contains(e.target)) { + ignoreOutsideClick = true; + } + }; + }; + }; + + const handleModalClick = (instance, domCache, dismissWith) => { + domCache.container.onclick = e => { + const innerParams = privateProps.innerParams.get(instance); + + if (ignoreOutsideClick) { + ignoreOutsideClick = false; + return; + } + + if (e.target === domCache.container && callIfFunction(innerParams.allowOutsideClick)) { + dismissWith(DismissReason.backdrop); + } + }; + }; + + function _main(userParams, mixinParams = {}) { + showWarningsForParams(Object.assign({}, mixinParams, userParams)); + + if (globalState.currentInstance) { + globalState.currentInstance._destroy(); + + if (isModal()) { + unsetAriaHidden(); + } + } + + globalState.currentInstance = this; + const innerParams = prepareParams(userParams, mixinParams); + setParameters(innerParams); + Object.freeze(innerParams); // clear the previous timer + + if (globalState.timeout) { + globalState.timeout.stop(); + delete globalState.timeout; + } // clear the restore focus timeout + + + clearTimeout(globalState.restoreFocusTimeout); + const domCache = populateDomCache(this); + render(this, innerParams); + privateProps.innerParams.set(this, innerParams); + return swalPromise(this, domCache, innerParams); + } + + const prepareParams = (userParams, mixinParams) => { + const templateParams = getTemplateParams(userParams); + const params = Object.assign({}, defaultParams, mixinParams, templateParams, userParams); // precedence is described in #2131 + + params.showClass = Object.assign({}, defaultParams.showClass, params.showClass); + params.hideClass = Object.assign({}, defaultParams.hideClass, params.hideClass); + return params; + }; + + const swalPromise = (instance, domCache, innerParams) => { + return new Promise(resolve => { + // functions to handle all closings/dismissals + const dismissWith = dismiss => { + instance.closePopup({ + isDismissed: true, + dismiss + }); + }; + + privateMethods.swalPromiseResolve.set(instance, resolve); + + domCache.confirmButton.onclick = () => handleConfirmButtonClick(instance); + + domCache.denyButton.onclick = () => handleDenyButtonClick(instance); + + domCache.cancelButton.onclick = () => handleCancelButtonClick(instance, dismissWith); + + domCache.closeButton.onclick = () => dismissWith(DismissReason.close); + + handlePopupClick(instance, domCache, dismissWith); + addKeydownHandler(instance, globalState, innerParams, dismissWith); + handleInputOptionsAndValue(instance, innerParams); + openPopup(innerParams); + setupTimer(globalState, innerParams, dismissWith); + initFocus(domCache, innerParams); // Scroll container to top on open (#1247, #1946) + + setTimeout(() => { + domCache.container.scrollTop = 0; + }); + }); + }; + + const populateDomCache = instance => { + const domCache = { + popup: getPopup(), + container: getContainer(), + actions: getActions(), + confirmButton: getConfirmButton(), + denyButton: getDenyButton(), + cancelButton: getCancelButton(), + loader: getLoader(), + closeButton: getCloseButton(), + validationMessage: getValidationMessage(), + progressSteps: getProgressSteps() + }; + privateProps.domCache.set(instance, domCache); + return domCache; + }; + + const setupTimer = (globalState$$1, innerParams, dismissWith) => { + const timerProgressBar = getTimerProgressBar(); + hide(timerProgressBar); + + if (innerParams.timer) { + globalState$$1.timeout = new Timer(() => { + dismissWith('timer'); + delete globalState$$1.timeout; + }, innerParams.timer); + + if (innerParams.timerProgressBar) { + show(timerProgressBar); + setTimeout(() => { + if (globalState$$1.timeout && globalState$$1.timeout.running) { + // timer can be already stopped or unset at this point + animateTimerProgressBar(innerParams.timer); + } + }); + } + } + }; + + const initFocus = (domCache, innerParams) => { + if (innerParams.toast) { + return; + } + + if (!callIfFunction(innerParams.allowEnterKey)) { + return blurActiveElement(); + } + + if (!focusButton(domCache, innerParams)) { + setFocus(innerParams, -1, 1); + } + }; + + const focusButton = (domCache, innerParams) => { + if (innerParams.focusDeny && isVisible(domCache.denyButton)) { + domCache.denyButton.focus(); + return true; + } + + if (innerParams.focusCancel && isVisible(domCache.cancelButton)) { + domCache.cancelButton.focus(); + return true; + } + + if (innerParams.focusConfirm && isVisible(domCache.confirmButton)) { + domCache.confirmButton.focus(); + return true; + } + + return false; + }; + + const blurActiveElement = () => { + if (document.activeElement && typeof document.activeElement.blur === 'function') { + document.activeElement.blur(); + } + }; + + /** + * Updates popup parameters. + */ + + function update(params) { + const popup = getPopup(); + const innerParams = privateProps.innerParams.get(this); + + if (!popup || hasClass(popup, innerParams.hideClass.popup)) { + return warn("You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup."); + } + + const validUpdatableParams = {}; // assign valid params from `params` to `defaults` + + Object.keys(params).forEach(param => { + if (Swal.isUpdatableParameter(param)) { + validUpdatableParams[param] = params[param]; + } else { + warn("Invalid parameter to update: \"".concat(param, "\". Updatable params are listed here: https://github.com/sweetalert2/sweetalert2/blob/master/src/utils/params.js\n\nIf you think this parameter should be updatable, request it here: https://github.com/sweetalert2/sweetalert2/issues/new?template=02_feature_request.md")); + } + }); + const updatedParams = Object.assign({}, innerParams, validUpdatableParams); + render(this, updatedParams); + privateProps.innerParams.set(this, updatedParams); + Object.defineProperties(this, { + params: { + value: Object.assign({}, this.params, params), + writable: false, + enumerable: true + } + }); + } + + function _destroy() { + const domCache = privateProps.domCache.get(this); + const innerParams = privateProps.innerParams.get(this); + + if (!innerParams) { + return; // This instance has already been destroyed + } // Check if there is another Swal closing + + + if (domCache.popup && globalState.swalCloseEventFinishedCallback) { + globalState.swalCloseEventFinishedCallback(); + delete globalState.swalCloseEventFinishedCallback; + } // Check if there is a swal disposal defer timer + + + if (globalState.deferDisposalTimer) { + clearTimeout(globalState.deferDisposalTimer); + delete globalState.deferDisposalTimer; + } + + if (typeof innerParams.didDestroy === 'function') { + innerParams.didDestroy(); + } + + disposeSwal(this); + } + + const disposeSwal = instance => { + // Unset this.params so GC will dispose it (#1569) + delete instance.params; // Unset globalState props so GC will dispose globalState (#1569) + + delete globalState.keydownHandler; + delete globalState.keydownTarget; // Unset WeakMaps so GC will be able to dispose them (#1569) + + unsetWeakMaps(privateProps); + unsetWeakMaps(privateMethods); // Unset currentInstance + + delete globalState.currentInstance; + }; + + const unsetWeakMaps = obj => { + for (const i in obj) { + obj[i] = new WeakMap(); + } + }; + + + + var instanceMethods = /*#__PURE__*/Object.freeze({ + hideLoading: hideLoading, + disableLoading: hideLoading, + getInput: getInput$1, + close: close, + closePopup: close, + closeModal: close, + closeToast: close, + enableButtons: enableButtons, + disableButtons: disableButtons, + enableInput: enableInput, + disableInput: disableInput, + showValidationMessage: showValidationMessage, + resetValidationMessage: resetValidationMessage$1, + getProgressSteps: getProgressSteps$1, + _main: _main, + update: update, + _destroy: _destroy + }); + + let currentInstance; + + class SweetAlert { + constructor(...args) { + // Prevent run in Node env + if (typeof window === 'undefined') { + return; + } + + currentInstance = this; + const outerParams = Object.freeze(this.constructor.argsToParams(args)); + Object.defineProperties(this, { + params: { + value: outerParams, + writable: false, + enumerable: true, + configurable: true + } + }); + + const promise = this._main(this.params); + + privateProps.promise.set(this, promise); + } // `catch` cannot be the name of a module export, so we define our thenable methods here instead + + + then(onFulfilled) { + const promise = privateProps.promise.get(this); + return promise.then(onFulfilled); + } + + finally(onFinally) { + const promise = privateProps.promise.get(this); + return promise.finally(onFinally); + } + + } // Assign instance methods from src/instanceMethods/*.js to prototype + + + Object.assign(SweetAlert.prototype, instanceMethods); // Assign static methods from src/staticMethods/*.js to constructor + + Object.assign(SweetAlert, staticMethods); // Proxy to instance methods to constructor, for now, for backwards compatibility + + Object.keys(instanceMethods).forEach(key => { + SweetAlert[key] = function (...args) { + if (currentInstance) { + return currentInstance[key](...args); + } + }; + }); + SweetAlert.DismissReason = DismissReason; + SweetAlert.version = '11.1.5'; + + const Swal = SweetAlert; + Swal.default = Swal; + + return Swal; + +})); +if (typeof this !== 'undefined' && this.Sweetalert2){ this.swal = this.sweetAlert = this.Swal = this.SweetAlert = this.Sweetalert2} diff --git a/modules/cms-kit/host/Volo.CmsKit.IdentityServer/wwwroot/libs/sweetalert2/sweetalert2.min.css b/modules/cms-kit/host/Volo.CmsKit.IdentityServer/wwwroot/libs/sweetalert2/sweetalert2.min.css new file mode 100644 index 0000000000..25eb26f1c0 --- /dev/null +++ b/modules/cms-kit/host/Volo.CmsKit.IdentityServer/wwwroot/libs/sweetalert2/sweetalert2.min.css @@ -0,0 +1 @@ +.swal2-popup.swal2-toast{box-sizing:border-box;grid-column:1/4!important;grid-row:1/4!important;grid-template-columns:1fr 99fr 1fr;padding:1em;overflow-y:hidden;background:#fff;box-shadow:0 0 .625em #d9d9d9;pointer-events:all}.swal2-popup.swal2-toast>*{grid-column:2}.swal2-popup.swal2-toast .swal2-title{margin:1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-loading{justify-content:center}.swal2-popup.swal2-toast .swal2-input{height:2em;margin:.5em;font-size:1em}.swal2-popup.swal2-toast .swal2-validation-message{font-size:1em}.swal2-popup.swal2-toast .swal2-footer{margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-popup.swal2-toast .swal2-close{grid-column:3/3;grid-row:1/99;align-self:center;width:.8em;height:.8em;margin:0;font-size:2em}.swal2-popup.swal2-toast .swal2-html-container{margin:1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-html-container:empty{padding:0}.swal2-popup.swal2-toast .swal2-loader{grid-column:1;grid-row:1/99;align-self:center;width:2em;height:2em;margin:.25em}.swal2-popup.swal2-toast .swal2-icon{grid-column:1;grid-row:1/99;align-self:center;width:2em;min-width:2em;height:2em;margin:0 .5em 0 0}.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:700}.swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-popup.swal2-toast .swal2-actions{justify-content:flex-start;height:auto;margin:0;margin-top:.3125em;padding:0}.swal2-popup.swal2-toast .swal2-styled{margin:.25em .5em;padding:.4em .6em;font-size:1em}.swal2-popup.swal2-toast .swal2-styled:focus{box-shadow:0 0 0 1px #fff,0 0 0 3px rgba(100,150,200,.5)}.swal2-popup.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;transform:rotate(45deg);border-radius:50%}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.8em;left:-.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.25em;left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-popup.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{-webkit-animation:swal2-toast-animate-success-line-tip .75s;animation:swal2-toast-animate-success-line-tip .75s}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{-webkit-animation:swal2-toast-animate-success-line-long .75s;animation:swal2-toast-animate-success-line-long .75s}.swal2-popup.swal2-toast.swal2-show{-webkit-animation:swal2-toast-show .5s;animation:swal2-toast-show .5s}.swal2-popup.swal2-toast.swal2-hide{-webkit-animation:swal2-toast-hide .1s forwards;animation:swal2-toast-hide .1s forwards}.swal2-container{display:grid;position:fixed;z-index:1060;top:0;right:0;bottom:0;left:0;box-sizing:border-box;grid-template-areas:"top-start top top-end" "center-start center center-end" "bottom-start bottom-center bottom-end";grid-template-rows:minmax(-webkit-min-content,auto) minmax(-webkit-min-content,auto) minmax(-webkit-min-content,auto);grid-template-rows:minmax(min-content,auto) minmax(min-content,auto) minmax(min-content,auto);height:100%;padding:.625em;overflow-x:hidden;transition:background-color .1s;-webkit-overflow-scrolling:touch}.swal2-container.swal2-backdrop-show,.swal2-container.swal2-noanimation{background:rgba(0,0,0,.4)}.swal2-container.swal2-backdrop-hide{background:0 0!important}.swal2-container.swal2-bottom-start,.swal2-container.swal2-center-start,.swal2-container.swal2-top-start{grid-template-columns:minmax(0,1fr) auto auto}.swal2-container.swal2-bottom,.swal2-container.swal2-center,.swal2-container.swal2-top{grid-template-columns:auto minmax(0,1fr) auto}.swal2-container.swal2-bottom-end,.swal2-container.swal2-center-end,.swal2-container.swal2-top-end{grid-template-columns:auto auto minmax(0,1fr)}.swal2-container.swal2-top-start>.swal2-popup{align-self:start}.swal2-container.swal2-top>.swal2-popup{grid-column:2;align-self:start;justify-self:center}.swal2-container.swal2-top-end>.swal2-popup,.swal2-container.swal2-top-right>.swal2-popup{grid-column:3;align-self:start;justify-self:end}.swal2-container.swal2-center-left>.swal2-popup,.swal2-container.swal2-center-start>.swal2-popup{grid-row:2;align-self:center}.swal2-container.swal2-center>.swal2-popup{grid-column:2;grid-row:2;align-self:center;justify-self:center}.swal2-container.swal2-center-end>.swal2-popup,.swal2-container.swal2-center-right>.swal2-popup{grid-column:3;grid-row:2;align-self:center;justify-self:end}.swal2-container.swal2-bottom-left>.swal2-popup,.swal2-container.swal2-bottom-start>.swal2-popup{grid-column:1;grid-row:3;align-self:end}.swal2-container.swal2-bottom>.swal2-popup{grid-column:2;grid-row:3;justify-self:center;align-self:end}.swal2-container.swal2-bottom-end>.swal2-popup,.swal2-container.swal2-bottom-right>.swal2-popup{grid-column:3;grid-row:3;align-self:end;justify-self:end}.swal2-container.swal2-grow-fullscreen>.swal2-popup,.swal2-container.swal2-grow-row>.swal2-popup{grid-column:1/4;width:100%}.swal2-container.swal2-grow-column>.swal2-popup,.swal2-container.swal2-grow-fullscreen>.swal2-popup{grid-row:1/4;align-self:stretch}.swal2-container.swal2-no-transition{transition:none!important}.swal2-popup{display:none;position:relative;box-sizing:border-box;grid-template-columns:minmax(0,100%);width:32em;max-width:100%;padding:0 0 1.25em;border:none;border-radius:5px;background:#fff;color:#545454;font-family:inherit;font-size:1rem}.swal2-popup:focus{outline:0}.swal2-popup.swal2-loading{overflow-y:hidden}.swal2-title{position:relative;max-width:100%;margin:0;padding:.8em 1em 0;color:#595959;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;word-wrap:break-word}.swal2-actions{display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:center;width:auto;margin:1.25em auto 0;padding:0}.swal2-actions:not(.swal2-loading) .swal2-styled[disabled]{opacity:.4}.swal2-actions:not(.swal2-loading) .swal2-styled:hover{background-image:linear-gradient(rgba(0,0,0,.1),rgba(0,0,0,.1))}.swal2-actions:not(.swal2-loading) .swal2-styled:active{background-image:linear-gradient(rgba(0,0,0,.2),rgba(0,0,0,.2))}.swal2-loader{display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;-webkit-animation:swal2-rotate-loading 1.5s linear 0s infinite normal;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 transparent #2778c4 transparent}.swal2-styled{margin:.3125em;padding:.625em 1.1em;transition:box-shadow .1s;box-shadow:0 0 0 3px transparent;font-weight:500}.swal2-styled:not([disabled]){cursor:pointer}.swal2-styled.swal2-confirm{border:0;border-radius:.25em;background:initial;background-color:#7367f0;color:#fff;font-size:1em}.swal2-styled.swal2-confirm:focus{box-shadow:0 0 0 3px rgba(115,103,240,.5)}.swal2-styled.swal2-deny{border:0;border-radius:.25em;background:initial;background-color:#ea5455;color:#fff;font-size:1em}.swal2-styled.swal2-deny:focus{box-shadow:0 0 0 3px rgba(234,84,85,.5)}.swal2-styled.swal2-cancel{border:0;border-radius:.25em;background:initial;background-color:#6e7d88;color:#fff;font-size:1em}.swal2-styled.swal2-cancel:focus{box-shadow:0 0 0 3px rgba(110,125,136,.5)}.swal2-styled.swal2-default-outline:focus{box-shadow:0 0 0 3px rgba(100,150,200,.5)}.swal2-styled:focus{outline:0}.swal2-styled::-moz-focus-inner{border:0}.swal2-footer{justify-content:center;margin:1em 0 0;padding:1em 1em 0;border-top:1px solid #eee;color:#545454;font-size:1em}.swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;grid-column:auto!important;height:.25em;overflow:hidden;border-bottom-right-radius:5px;border-bottom-left-radius:5px}.swal2-timer-progress-bar{width:100%;height:.25em;background:rgba(0,0,0,.2)}.swal2-image{max-width:100%;margin:2em auto 1em}.swal2-close{z-index:2;align-items:center;justify-content:center;width:1.2em;height:1.2em;margin-top:0;margin-right:0;margin-bottom:-1.2em;padding:0;overflow:hidden;transition:color .1s,box-shadow .1s;border:none;border-radius:5px;background:0 0;color:#ccc;font-family:serif;font-family:monospace;font-size:2.5em;cursor:pointer;justify-self:end}.swal2-close:hover{transform:none;background:0 0;color:#f27474}.swal2-close:focus{outline:0;box-shadow:inset 0 0 0 3px rgba(100,150,200,.5)}.swal2-close::-moz-focus-inner{border:0}.swal2-html-container{z-index:1;justify-content:center;margin:1em 1.6em .3em;padding:0;overflow:auto;color:#545454;font-size:1.125em;font-weight:400;line-height:normal;text-align:center;word-wrap:break-word;word-break:break-word}.swal2-checkbox,.swal2-file,.swal2-input,.swal2-radio,.swal2-select,.swal2-textarea{margin:1em 2em 0}.swal2-file,.swal2-input,.swal2-textarea{box-sizing:border-box;width:auto;transition:border-color .1s,box-shadow .1s;border:1px solid #d9d9d9;border-radius:.1875em;background:inherit;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px transparent;color:inherit;font-size:1.125em}.swal2-file.swal2-inputerror,.swal2-input.swal2-inputerror,.swal2-textarea.swal2-inputerror{border-color:#f27474!important;box-shadow:0 0 2px #f27474!important}.swal2-file:focus,.swal2-input:focus,.swal2-textarea:focus{border:1px solid #b4dbed;outline:0;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(100,150,200,.5)}.swal2-file::-moz-placeholder,.swal2-input::-moz-placeholder,.swal2-textarea::-moz-placeholder{color:#ccc}.swal2-file:-ms-input-placeholder,.swal2-input:-ms-input-placeholder,.swal2-textarea:-ms-input-placeholder{color:#ccc}.swal2-file::placeholder,.swal2-input::placeholder,.swal2-textarea::placeholder{color:#ccc}.swal2-range{margin:1em 2em 0;background:#fff}.swal2-range input{width:80%}.swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}.swal2-range input,.swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}.swal2-input{height:2.625em;padding:0 .75em}.swal2-file{width:75%;margin-right:auto;margin-left:auto;background:inherit;font-size:1.125em}.swal2-textarea{height:6.75em;padding:.75em}.swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:inherit;color:inherit;font-size:1.125em}.swal2-checkbox,.swal2-radio{align-items:center;justify-content:center;background:#fff;color:inherit}.swal2-checkbox label,.swal2-radio label{margin:0 .6em;font-size:1.125em}.swal2-checkbox input,.swal2-radio input{flex-shrink:0;margin:0 .4em}.swal2-input-label{display:flex;justify-content:center;margin:1em auto 0}.swal2-validation-message{align-items:center;justify-content:center;margin:1em 0 0;padding:.625em;overflow:hidden;background:#f0f0f0;color:#666;font-size:1em;font-weight:300}.swal2-validation-message::before{content:"!";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}.swal2-icon{position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:2.5em auto .6em;border:.25em solid transparent;border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}.swal2-icon.swal2-error{border-color:#f27474;color:#f27474}.swal2-icon.swal2-error .swal2-x-mark{position:relative;flex-grow:1}.swal2-icon.swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}.swal2-icon.swal2-error.swal2-icon-show{-webkit-animation:swal2-animate-error-icon .5s;animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-error.swal2-icon-show .swal2-x-mark{-webkit-animation:swal2-animate-error-x-mark .5s;animation:swal2-animate-error-x-mark .5s}.swal2-icon.swal2-warning{border-color:#facea8;color:#f8bb86}.swal2-icon.swal2-info{border-color:#9de0f6;color:#3fc3ee}.swal2-icon.swal2-question{border-color:#c9dae1;color:#87adbd}.swal2-icon.swal2-success{border-color:#a5dc86;color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;transform:rotate(45deg);border-radius:50%}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}.swal2-icon.swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-.25em;left:-.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}.swal2-icon.swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}.swal2-icon.swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}.swal2-icon.swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-tip{-webkit-animation:swal2-animate-success-line-tip .75s;animation:swal2-animate-success-line-tip .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-long{-webkit-animation:swal2-animate-success-line-long .75s;animation:swal2-animate-success-line-long .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-circular-line-right{-webkit-animation:swal2-rotate-success-circular-line 4.25s ease-in;animation:swal2-rotate-success-circular-line 4.25s ease-in}.swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:1.25em auto;padding:0;background:inherit;font-weight:600}.swal2-progress-steps li{display:inline-block;position:relative}.swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:#add8e6;color:#fff}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:#add8e6}.swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}[class^=swal2]{-webkit-tap-highlight-color:transparent}.swal2-show{-webkit-animation:swal2-show .3s;animation:swal2-show .3s}.swal2-hide{-webkit-animation:swal2-hide .15s forwards;animation:swal2-hide .15s forwards}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{margin-right:initial;margin-left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}@-webkit-keyframes swal2-toast-show{0%{transform:translateY(-.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0)}}@keyframes swal2-toast-show{0%{transform:translateY(-.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0)}}@-webkit-keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@-webkit-keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@-webkit-keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@-webkit-keyframes swal2-show{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}100%{transform:scale(1)}}@keyframes swal2-show{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}100%{transform:scale(1)}}@-webkit-keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(.5);opacity:0}}@keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(.5);opacity:0}}@-webkit-keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@-webkit-keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@-webkit-keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@-webkit-keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@-webkit-keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0);opacity:1}}@-webkit-keyframes swal2-rotate-loading{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes swal2-rotate-loading{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto!important}body.swal2-no-backdrop .swal2-container{background-color:transparent!important;pointer-events:none}body.swal2-no-backdrop .swal2-container .swal2-popup{pointer-events:all}body.swal2-no-backdrop .swal2-container .swal2-modal{box-shadow:0 0 10px rgba(0,0,0,.4)}@media print{body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow-y:scroll!important}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .swal2-container{position:static!important}}body.swal2-toast-shown .swal2-container{box-sizing:border-box;width:360px;max-width:100%;background-color:transparent;pointer-events:none}body.swal2-toast-shown .swal2-container.swal2-top{top:0;right:auto;bottom:auto;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{top:0;right:0;bottom:auto;left:auto}body.swal2-toast-shown .swal2-container.swal2-top-left,body.swal2-toast-shown .swal2-container.swal2-top-start{top:0;right:auto;bottom:auto;left:0}body.swal2-toast-shown .swal2-container.swal2-center-left,body.swal2-toast-shown .swal2-container.swal2-center-start{top:50%;right:auto;bottom:auto;left:0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{top:50%;right:auto;bottom:auto;left:50%;transform:translate(-50%,-50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{top:50%;right:0;bottom:auto;left:auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-left,body.swal2-toast-shown .swal2-container.swal2-bottom-start{top:auto;right:auto;bottom:0;left:0}body.swal2-toast-shown .swal2-container.swal2-bottom{top:auto;right:auto;bottom:0;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{top:auto;right:0;bottom:0;left:auto} \ No newline at end of file diff --git a/modules/cms-kit/host/Volo.CmsKit.IdentityServer/wwwroot/libs/sweetalert2/sweetalert2.min.js b/modules/cms-kit/host/Volo.CmsKit.IdentityServer/wwwroot/libs/sweetalert2/sweetalert2.min.js new file mode 100644 index 0000000000..9a383d5289 --- /dev/null +++ b/modules/cms-kit/host/Volo.CmsKit.IdentityServer/wwwroot/libs/sweetalert2/sweetalert2.min.js @@ -0,0 +1 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).Sweetalert2=t()}(this,function(){"use strict";const l=Object.freeze({cancel:"cancel",backdrop:"backdrop",close:"close",esc:"esc",timer:"timer"}),t="SweetAlert2:",o=e=>e.charAt(0).toUpperCase()+e.slice(1),a=e=>Array.prototype.slice.call(e),s=e=>{console.warn("".concat(t," ").concat("object"==typeof e?e.join(" "):e))},r=e=>{console.error("".concat(t," ").concat(e))},n=[],i=(e,t)=>{t='"'.concat(e,'" is deprecated and will be removed in the next major release. Please use "').concat(t,'" instead.'),n.includes(t)||(n.push(t),s(t))},c=e=>"function"==typeof e?e():e,u=e=>e&&"function"==typeof e.toPromise,d=e=>u(e)?e.toPromise():Promise.resolve(e),p=e=>e&&Promise.resolve(e)===e,m=e=>e instanceof Element||(e=>"object"==typeof e&&e.jquery)(e);var e=e=>{const t={};for(const n in e)t[e[n]]="swal2-"+e[n];return t};const h=e(["container","shown","height-auto","iosfix","popup","modal","no-backdrop","no-transition","toast","toast-shown","show","hide","close","title","html-container","actions","confirm","deny","cancel","default-outline","footer","icon","icon-content","image","input","file","range","select","radio","checkbox","label","textarea","inputerror","input-label","validation-message","progress-steps","active-progress-step","progress-step","progress-step-line","loader","loading","styled","top","top-start","top-end","top-left","top-right","center","center-start","center-end","center-left","center-right","bottom","bottom-start","bottom-end","bottom-left","bottom-right","grow-row","grow-column","grow-fullscreen","rtl","timer-progress-bar","timer-progress-bar-container","scrollbar-measure","icon-success","icon-warning","icon-info","icon-question","icon-error"]),g=e(["success","warning","info","question","error"]),b=()=>document.body.querySelector(".".concat(h.container)),f=e=>{const t=b();return t?t.querySelector(e):null},y=e=>f(".".concat(e)),v=()=>y(h.popup),w=()=>y(h.icon),C=()=>y(h.title),k=()=>y(h["html-container"]),A=()=>y(h.image),B=()=>y(h["progress-steps"]),x=()=>y(h["validation-message"]),P=()=>f(".".concat(h.actions," .").concat(h.confirm)),E=()=>f(".".concat(h.actions," .").concat(h.deny));const S=()=>f(".".concat(h.loader)),T=()=>f(".".concat(h.actions," .").concat(h.cancel)),L=()=>y(h.actions),O=()=>y(h.footer),j=()=>y(h["timer-progress-bar"]),D=()=>y(h.close),I=()=>{const e=a(v().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')).sort((e,t)=>(e=parseInt(e.getAttribute("tabindex")),(t=parseInt(t.getAttribute("tabindex")))"-1"!==e.getAttribute("tabindex"));return(t=>{const n=[];for(let e=0;eG(e))},M=()=>!H()&&!document.body.classList.contains(h["no-backdrop"]),H=()=>document.body.classList.contains(h["toast-shown"]);const q={previousBodyPadding:null},V=(t,e)=>{if(t.textContent="",e){const n=new DOMParser,o=n.parseFromString(e,"text/html");a(o.querySelector("head").childNodes).forEach(e=>{t.appendChild(e)}),a(o.querySelector("body").childNodes).forEach(e=>{t.appendChild(e)})}},N=(t,e)=>{if(!e)return!1;var n=e.split(/\s+/);for(let e=0;e{var o,i;if(o=e,i=t,a(o.classList).forEach(e=>{Object.values(h).includes(e)||Object.values(g).includes(e)||Object.values(i.showClass).includes(e)||o.classList.remove(e)}),t.customClass&&t.customClass[n]){if("string"!=typeof t.customClass[n]&&!t.customClass[n].forEach)return s("Invalid type of customClass.".concat(n,'! Expected string or iterable object, got "').concat(typeof t.customClass[n],'"'));W(e,t.customClass[n])}},F=(e,t)=>{if(!t)return null;switch(t){case"select":case"textarea":case"file":return K(e,h[t]);case"checkbox":return e.querySelector(".".concat(h.checkbox," input"));case"radio":return e.querySelector(".".concat(h.radio," input:checked"))||e.querySelector(".".concat(h.radio," input:first-child"));case"range":return e.querySelector(".".concat(h.range," input"));default:return K(e,h.input)}},R=e=>{var t;e.focus(),"file"!==e.type&&(t=e.value,e.value="",e.value=t)},z=(e,t,n)=>{e&&t&&(t="string"==typeof t?t.split(/\s+/).filter(Boolean):t).forEach(t=>{e.forEach?e.forEach(e=>{n?e.classList.add(t):e.classList.remove(t)}):n?e.classList.add(t):e.classList.remove(t)})},W=(e,t)=>{z(e,t,!0)},_=(e,t)=>{z(e,t,!1)},K=(t,n)=>{for(let e=0;e{(n=n==="".concat(parseInt(n))?parseInt(n):n)||0===parseInt(n)?e.style[t]="number"==typeof n?"".concat(n,"px"):n:e.style.removeProperty(t)},Z=(e,t="flex")=>{e.style.display=t},J=e=>{e.style.display="none"},X=(e,t,n,o)=>{const i=e.querySelector(t);i&&(i.style[n]=o)},$=(e,t,n)=>{t?Z(e,n):J(e)},G=e=>!(!e||!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)),Q=()=>!G(P())&&!G(E())&&!G(T()),ee=e=>!!(e.scrollHeight>e.clientHeight),te=e=>{const t=window.getComputedStyle(e);var n=parseFloat(t.getPropertyValue("animation-duration")||"0"),e=parseFloat(t.getPropertyValue("transition-duration")||"0");return 0{const n=j();G(n)&&(t&&(n.style.transition="none",n.style.width="100%"),setTimeout(()=>{n.style.transition="width ".concat(e/1e3,"s linear"),n.style.width="0%"},10))},oe=()=>"undefined"==typeof window||"undefined"==typeof document,ie='\n
                \n \n
                  \n
                  \n \n

                  \n
                  \n \n \n
                  \n \n \n
                  \n \n
                  \n \n \n
                  \n
                  \n
                  \n \n \n \n
                  \n
                  \n
                  \n
                  \n
                  \n
                  \n').replace(/(^|\n)\s*/g,""),ae=()=>{ln.isVisible()&&ln.resetValidationMessage()},se=e=>{var t=(()=>{const e=b();return!!e&&(e.remove(),_([document.documentElement,document.body],[h["no-backdrop"],h["toast-shown"],h["has-column"]]),!0)})();if(oe())r("SweetAlert2 requires document to initialize");else{const n=document.createElement("div");n.className=h.container,t&&W(n,h["no-transition"]),V(n,ie);const o="string"==typeof(t=e.target)?document.querySelector(t):t;o.appendChild(n),(e=>{const t=v();t.setAttribute("role",e.toast?"alert":"dialog"),t.setAttribute("aria-live",e.toast?"polite":"assertive"),e.toast||t.setAttribute("aria-modal","true")})(e),e=o,"rtl"===window.getComputedStyle(e).direction&&W(b(),h.rtl),(()=>{const e=v(),t=K(e,h.input),n=K(e,h.file),o=e.querySelector(".".concat(h.range," input")),i=e.querySelector(".".concat(h.range," output")),a=K(e,h.select),s=e.querySelector(".".concat(h.checkbox," input")),r=K(e,h.textarea);t.oninput=ae,n.onchange=ae,a.onchange=ae,s.onchange=ae,r.oninput=ae,o.oninput=()=>{ae(),i.value=o.value},o.onchange=()=>{ae(),o.nextSibling.value=o.value}})()}},re=(e,t)=>{e instanceof HTMLElement?t.appendChild(e):"object"==typeof e?ce(e,t):e&&V(t,e)},ce=(e,t)=>{e.jquery?le(t,e):V(t,e.toString())},le=(t,n)=>{if(t.textContent="",0 in n)for(let e=0;e in n;e++)t.appendChild(n[e].cloneNode(!0));else t.appendChild(n.cloneNode(!0))},ue=(()=>{if(oe())return!1;var e=document.createElement("div"),t={WebkitAnimation:"webkitAnimationEnd",OAnimation:"oAnimationEnd oanimationend",animation:"animationend"};for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&void 0!==e.style[n])return t[n];return!1})(),de=(e,t)=>{const n=L();var o=S(),i=P(),a=E(),s=T();(t.showConfirmButton||t.showDenyButton||t.showCancelButton?Z:J)(n),U(n,t,"actions"),pe(i,"confirm",t),pe(a,"deny",t),pe(s,"cancel",t),function(e,t,n,o){if(!o.buttonsStyling)return _([e,t,n],h.styled);W([e,t,n],h.styled),o.confirmButtonColor&&(e.style.backgroundColor=o.confirmButtonColor,W(e,h["default-outline"]));o.denyButtonColor&&(t.style.backgroundColor=o.denyButtonColor,W(t,h["default-outline"]));o.cancelButtonColor&&(n.style.backgroundColor=o.cancelButtonColor,W(n,h["default-outline"]))}(i,a,s,t),t.reverseButtons&&(n.insertBefore(s,o),n.insertBefore(a,o),n.insertBefore(i,o)),V(o,t.loaderHtml),U(o,t,"loader")};function pe(e,t,n){$(e,n["show".concat(o(t),"Button")],"inline-block"),V(e,n["".concat(t,"ButtonText")]),e.setAttribute("aria-label",n["".concat(t,"ButtonAriaLabel")]),e.className=h[t],U(e,n,"".concat(t,"Button")),W(e,n["".concat(t,"ButtonClass")])}const me=(e,t)=>{var n,o,i=b();i&&(o=i,"string"==typeof(n=t.backdrop)?o.style.background=n:n||W([document.documentElement,document.body],h["no-backdrop"]),o=i,(n=t.position)in h?W(o,h[n]):(s('The "position" parameter is not valid, defaulting to "center"'),W(o,h.center)),n=i,!(o=t.grow)||"string"!=typeof o||(o="grow-".concat(o))in h&&W(n,h[o]),U(i,t,"container"))};var he={promise:new WeakMap,innerParams:new WeakMap,domCache:new WeakMap};const ge=["input","file","range","select","radio","checkbox","textarea"],be=e=>{if(!ke[e.input])return r('Unexpected type of input! Expected "text", "email", "password", "number", "tel", "select", "radio", "checkbox", "textarea", "file" or "url", got "'.concat(e.input,'"'));var t=Ce(e.input);const n=ke[e.input](t,e);Z(n),setTimeout(()=>{R(n)})},fe=(e,t)=>{const n=F(v(),e);if(n){(t=>{for(let e=0;e{var t=Ce(e.input);e.customClass&&W(t,e.customClass.input)},ve=(e,t)=>{e.placeholder&&!t.inputPlaceholder||(e.placeholder=t.inputPlaceholder)},we=(e,t,n)=>{if(n.inputLabel){e.id=h.input;const i=document.createElement("label");var o=h["input-label"];i.setAttribute("for",e.id),i.className=o,W(i,n.customClass.inputLabel),i.innerText=n.inputLabel,t.insertAdjacentElement("beforebegin",i)}},Ce=e=>{e=h[e]||h.input;return K(v(),e)},ke={};ke.text=ke.email=ke.password=ke.number=ke.tel=ke.url=(e,t)=>("string"==typeof t.inputValue||"number"==typeof t.inputValue?e.value=t.inputValue:p(t.inputValue)||s('Unexpected type of inputValue! Expected "string", "number" or "Promise", got "'.concat(typeof t.inputValue,'"')),we(e,e,t),ve(e,t),e.type=t.input,e),ke.file=(e,t)=>(we(e,e,t),ve(e,t),e),ke.range=(e,t)=>{const n=e.querySelector("input"),o=e.querySelector("output");return n.value=t.inputValue,n.type=t.input,o.value=t.inputValue,we(n,e,t),e},ke.select=(e,t)=>{if(e.textContent="",t.inputPlaceholder){const n=document.createElement("option");V(n,t.inputPlaceholder),n.value="",n.disabled=!0,n.selected=!0,e.appendChild(n)}return we(e,e,t),e},ke.radio=e=>(e.textContent="",e),ke.checkbox=(e,t)=>{const n=F(v(),"checkbox");n.value=1,n.id=h.checkbox,n.checked=Boolean(t.inputValue);var o=e.querySelector("span");return V(o,t.inputPlaceholder),e},ke.textarea=(n,e)=>{n.value=e.inputValue,ve(n,e),we(n,n,e);return setTimeout(()=>{if("MutationObserver"in window){const t=parseInt(window.getComputedStyle(v()).width);new MutationObserver(()=>{var e,e=n.offsetWidth+(e=n,parseInt(window.getComputedStyle(e).marginLeft)+parseInt(window.getComputedStyle(e).marginRight));e>t?v().style.width="".concat(e,"px"):v().style.width=null}).observe(n,{attributes:!0,attributeFilter:["style"]})}}),n};const Ae=(e,t)=>{const n=k();U(n,t,"htmlContainer"),t.html?(re(t.html,n),Z(n,"block")):t.text?(n.textContent=t.text,Z(n,"block")):J(n),((e,o)=>{const i=v();e=he.innerParams.get(e);const a=!e||o.input!==e.input;ge.forEach(e=>{var t=h[e];const n=K(i,t);fe(e,o.inputAttributes),n.className=t,a&&J(n)}),o.input&&(a&&be(o),ye(o))})(e,t)},Be=(e,t)=>{for(const n in g)t.icon!==n&&_(e,g[n]);W(e,g[t.icon]),Ee(e,t),xe(),U(e,t,"icon")},xe=()=>{const e=v();var t=window.getComputedStyle(e).getPropertyValue("background-color");const n=e.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix");for(let e=0;e{var n;e.textContent="",t.iconHtml?V(e,Se(t.iconHtml)):"success"===t.icon?V(e,'\n
                  \n \n
                  \n
                  \n '):"error"===t.icon?V(e,'\n \n \n \n \n '):(n={question:"?",warning:"!",info:"i"},V(e,Se(n[t.icon])))},Ee=(e,t)=>{if(t.iconColor){e.style.color=t.iconColor,e.style.borderColor=t.iconColor;for(const n of[".swal2-success-line-tip",".swal2-success-line-long",".swal2-x-mark-line-left",".swal2-x-mark-line-right"])X(e,n,"backgroundColor",t.iconColor);X(e,".swal2-success-ring","borderColor",t.iconColor)}},Se=e=>'
                  ').concat(e,"
                  "),Te=(e,o)=>{const i=B();if(!o.progressSteps||0===o.progressSteps.length)return J(i);Z(i),i.textContent="",o.currentProgressStep>=o.progressSteps.length&&s("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),o.progressSteps.forEach((e,t)=>{var n,e=(n=e,e=document.createElement("li"),W(e,h["progress-step"]),V(e,n),e);i.appendChild(e),t===o.currentProgressStep&&W(e,h["active-progress-step"]),t!==o.progressSteps.length-1&&(t=(e=>{const t=document.createElement("li");return W(t,h["progress-step-line"]),e.progressStepsDistance&&(t.style.width=e.progressStepsDistance),t})(o),i.appendChild(t))})},Le=(e,t)=>{e.className="".concat(h.popup," ").concat(G(e)?t.showClass.popup:""),t.toast?(W([document.documentElement,document.body],h["toast-shown"]),W(e,h.toast)):W(e,h.modal),U(e,t,"popup"),"string"==typeof t.customClass&&W(e,t.customClass),t.icon&&W(e,h["icon-".concat(t.icon)])},Oe=(e,t)=>{var n,o,i;(e=>{var t=b();const n=v();e.toast?(Y(t,"width",e.width),n.style.width="100%",n.insertBefore(S(),w())):Y(n,"width",e.width),Y(n,"padding",e.padding),e.background&&(n.style.background=e.background),J(x()),Le(n,e)})(t),me(0,t),Te(0,t),i=e,n=t,o=he.innerParams.get(i),i=w(),o&&n.icon===o.icon?(Pe(i,n),Be(i,n)):n.icon||n.iconHtml?n.icon&&-1===Object.keys(g).indexOf(n.icon)?(r('Unknown icon! Expected "success", "error", "warning", "info" or "question", got "'.concat(n.icon,'"')),J(i)):(Z(i),Pe(i,n),Be(i,n),W(i,n.showClass.icon)):J(i),(e=>{const t=A();if(!e.imageUrl)return J(t);Z(t,""),t.setAttribute("src",e.imageUrl),t.setAttribute("alt",e.imageAlt),Y(t,"width",e.imageWidth),Y(t,"height",e.imageHeight),t.className=h.image,U(t,e,"image")})(t),(e=>{const t=C();$(t,e.title||e.titleText,"block"),e.title&&re(e.title,t),e.titleText&&(t.innerText=e.titleText),U(t,e,"title")})(t),(e=>{const t=D();V(t,e.closeButtonHtml),U(t,e,"closeButton"),$(t,e.showCloseButton),t.setAttribute("aria-label",e.closeButtonAriaLabel)})(t),Ae(e,t),de(0,t),i=t,e=O(),$(e,i.footer),i.footer&&re(i.footer,e),U(e,i,"footer"),"function"==typeof t.didRender&&t.didRender(v())};const je=()=>P()&&P().click();const De=e=>{let t=v();t||ln.fire(),t=v();var n=S();H()?J(w()):Ie(t,e),Z(n),t.setAttribute("data-loading",!0),t.setAttribute("aria-busy",!0),t.focus()},Ie=(e,t)=>{var n=L();const o=S();!t&&G(P())&&(t=P()),Z(n),t&&(J(t),o.setAttribute("data-button-to-replace",t.className)),o.parentNode.insertBefore(o,t),W([e,n],h.loading)},Me={},He=o=>new Promise(e=>{if(!o)return e();var t=window.scrollX,n=window.scrollY;Me.restoreFocusTimeout=setTimeout(()=>{Me.previousActiveElement&&Me.previousActiveElement.focus?(Me.previousActiveElement.focus(),Me.previousActiveElement=null):document.body&&document.body.focus(),e()},100),window.scrollTo(t,n)});const qe=()=>{if(Me.timeout)return(()=>{const e=j();var t=parseInt(window.getComputedStyle(e).width);e.style.removeProperty("transition"),e.style.width="100%";var n=parseInt(window.getComputedStyle(e).width),n=parseInt(t/n*100);e.style.removeProperty("transition"),e.style.width="".concat(n,"%")})(),Me.timeout.stop()},Ve=()=>{if(Me.timeout){var e=Me.timeout.start();return ne(e),e}};let Ne=!1;const Ue={};const Fe=t=>{for(let e=t.target;e&&e!==document;e=e.parentNode)for(const o in Ue){var n=e.getAttribute(o);if(n)return void Ue[o].fire({template:n})}},Re={title:"",titleText:"",text:"",html:"",footer:"",icon:void 0,iconColor:void 0,iconHtml:void 0,template:void 0,toast:!1,showClass:{popup:"swal2-show",backdrop:"swal2-backdrop-show",icon:"swal2-icon-show"},hideClass:{popup:"swal2-hide",backdrop:"swal2-backdrop-hide",icon:"swal2-icon-hide"},customClass:{},target:"body",backdrop:!0,heightAuto:!0,allowOutsideClick:!0,allowEscapeKey:!0,allowEnterKey:!0,stopKeydownPropagation:!0,keydownListenerCapture:!1,showConfirmButton:!0,showDenyButton:!1,showCancelButton:!1,preConfirm:void 0,preDeny:void 0,confirmButtonText:"OK",confirmButtonAriaLabel:"",confirmButtonColor:void 0,denyButtonText:"No",denyButtonAriaLabel:"",denyButtonColor:void 0,cancelButtonText:"Cancel",cancelButtonAriaLabel:"",cancelButtonColor:void 0,buttonsStyling:!0,reverseButtons:!1,focusConfirm:!0,focusDeny:!1,focusCancel:!1,returnFocus:!0,showCloseButton:!1,closeButtonHtml:"×",closeButtonAriaLabel:"Close this dialog",loaderHtml:"",showLoaderOnConfirm:!1,showLoaderOnDeny:!1,imageUrl:void 0,imageWidth:void 0,imageHeight:void 0,imageAlt:"",timer:void 0,timerProgressBar:!1,width:void 0,padding:void 0,background:void 0,input:void 0,inputPlaceholder:"",inputLabel:"",inputValue:"",inputOptions:{},inputAutoTrim:!0,inputAttributes:{},inputValidator:void 0,returnInputValueOnDeny:!1,validationMessage:void 0,grow:!1,position:"center",progressSteps:[],currentProgressStep:void 0,progressStepsDistance:void 0,willOpen:void 0,didOpen:void 0,didRender:void 0,willClose:void 0,didClose:void 0,didDestroy:void 0,scrollbarPadding:!0},ze=["allowEscapeKey","allowOutsideClick","background","buttonsStyling","cancelButtonAriaLabel","cancelButtonColor","cancelButtonText","closeButtonAriaLabel","closeButtonHtml","confirmButtonAriaLabel","confirmButtonColor","confirmButtonText","currentProgressStep","customClass","denyButtonAriaLabel","denyButtonColor","denyButtonText","didClose","didDestroy","footer","hideClass","html","icon","iconColor","iconHtml","imageAlt","imageHeight","imageUrl","imageWidth","preConfirm","preDeny","progressSteps","returnFocus","reverseButtons","showCancelButton","showCloseButton","showConfirmButton","showDenyButton","text","title","titleText","willClose"],We={},_e=["allowOutsideClick","allowEnterKey","backdrop","focusConfirm","focusDeny","focusCancel","returnFocus","heightAuto","keydownListenerCapture"],Ke=e=>Object.prototype.hasOwnProperty.call(Re,e);const Ye=e=>We[e],Ze=e=>{!e.backdrop&&e.allowOutsideClick&&s('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`');for(const o in e)n=o,Ke(n)||s('Unknown parameter "'.concat(n,'"')),e.toast&&(t=o,_e.includes(t)&&s('The parameter "'.concat(t,'" is incompatible with toasts'))),t=o,Ye(t)&&i(t,Ye(t));var t,n};var Je=Object.freeze({isValidParameter:Ke,isUpdatableParameter:e=>-1!==ze.indexOf(e),isDeprecatedParameter:Ye,argsToParams:n=>{const o={};return"object"!=typeof n[0]||m(n[0])?["title","html","icon"].forEach((e,t)=>{t=n[t];"string"==typeof t||m(t)?o[e]=t:void 0!==t&&r("Unexpected type of ".concat(e,'! Expected "string" or "Element", got ').concat(typeof t))}):Object.assign(o,n[0]),o},isVisible:()=>G(v()),clickConfirm:je,clickDeny:()=>E()&&E().click(),clickCancel:()=>T()&&T().click(),getContainer:b,getPopup:v,getTitle:C,getHtmlContainer:k,getImage:A,getIcon:w,getInputLabel:()=>y(h["input-label"]),getCloseButton:D,getActions:L,getConfirmButton:P,getDenyButton:E,getCancelButton:T,getLoader:S,getFooter:O,getTimerProgressBar:j,getFocusableElements:I,getValidationMessage:x,isLoading:()=>v().hasAttribute("data-loading"),fire:function(...e){return new this(...e)},mixin:function(n){class e extends this{_main(e,t){return super._main(e,Object.assign({},n,t))}}return e},showLoading:De,enableLoading:De,getTimerLeft:()=>Me.timeout&&Me.timeout.getTimerLeft(),stopTimer:qe,resumeTimer:Ve,toggleTimer:()=>{var e=Me.timeout;return e&&(e.running?qe:Ve)()},increaseTimer:e=>{if(Me.timeout){e=Me.timeout.increase(e);return ne(e,!0),e}},isTimerRunning:()=>Me.timeout&&Me.timeout.isRunning(),bindClickHandler:function(e="data-swal-template"){Ue[e]=this,Ne||(document.body.addEventListener("click",Fe),Ne=!0)}});function Xe(){var e=he.innerParams.get(this);if(e){const t=he.domCache.get(this);J(t.loader),H()?e.icon&&Z(w()):(e=>{const t=e.popup.getElementsByClassName(e.loader.getAttribute("data-button-to-replace"));if(t.length)Z(t[0],"inline-block");else if(Q())J(e.actions)})(t),_([t.popup,t.actions],h.loading),t.popup.removeAttribute("aria-busy"),t.popup.removeAttribute("data-loading"),t.confirmButton.disabled=!1,t.denyButton.disabled=!1,t.cancelButton.disabled=!1}}const $e=()=>{null===q.previousBodyPadding&&document.body.scrollHeight>window.innerHeight&&(q.previousBodyPadding=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight="".concat(q.previousBodyPadding+(()=>{const e=document.createElement("div");e.className=h["scrollbar-measure"],document.body.appendChild(e);var t=e.getBoundingClientRect().width-e.clientWidth;return document.body.removeChild(e),t})(),"px"))},Ge=()=>{navigator.userAgent.match(/(CriOS|FxiOS|EdgiOS|YaBrowser|UCBrowser)/i)||v().scrollHeight>window.innerHeight-44&&(b().style.paddingBottom="".concat(44,"px"))},Qe=()=>{const e=b();let t;e.ontouchstart=e=>{t=et(e)},e.ontouchmove=e=>{t&&(e.preventDefault(),e.stopPropagation())}},et=e=>{var t=e.target,n=b();return!tt(e)&&!nt(e)&&(t===n||!(ee(n)||"INPUT"===t.tagName||"TEXTAREA"===t.tagName||ee(k())&&k().contains(t)))},tt=e=>e.touches&&e.touches.length&&"stylus"===e.touches[0].touchType,nt=e=>e.touches&&1{const e=a(document.body.children);e.forEach(e=>{e.hasAttribute("data-previous-aria-hidden")?(e.setAttribute("aria-hidden",e.getAttribute("data-previous-aria-hidden")),e.removeAttribute("data-previous-aria-hidden")):e.removeAttribute("aria-hidden")})};var it={swalPromiseResolve:new WeakMap};function at(e,t,n,o){H()?ct(e,o):(He(n).then(()=>ct(e,o)),Me.keydownTarget.removeEventListener("keydown",Me.keydownHandler,{capture:Me.keydownListenerCapture}),Me.keydownHandlerAdded=!1),/^((?!chrome|android).)*safari/i.test(navigator.userAgent)?(t.setAttribute("style","display:none !important"),t.removeAttribute("class"),t.innerHTML=""):t.remove(),M()&&(null!==q.previousBodyPadding&&(document.body.style.paddingRight="".concat(q.previousBodyPadding,"px"),q.previousBodyPadding=null),N(document.body,h.iosfix)&&(t=parseInt(document.body.style.top,10),_(document.body,h.iosfix),document.body.style.top="",document.body.scrollTop=-1*t),ot()),_([document.documentElement,document.body],[h.shown,h["height-auto"],h["no-backdrop"],h["toast-shown"]])}function st(e){var t=v();if(t){e=void 0!==(o=e)?Object.assign({isConfirmed:!1,isDenied:!1,isDismissed:!1},o):{isConfirmed:!1,isDenied:!1,isDismissed:!0};var n=he.innerParams.get(this);if(n&&!N(t,n.hideClass.popup)){const i=it.swalPromiseResolve.get(this);_(t,n.showClass.popup),W(t,n.hideClass.popup);var o=b();_(o,n.showClass.backdrop),W(o,n.hideClass.backdrop),((e,t,n)=>{const o=b(),i=ue&&te(t);if(typeof n.willClose==="function")n.willClose(t);if(i)rt(e,t,o,n.returnFocus,n.didClose);else at(e,o,n.returnFocus,n.didClose)})(this,t,n),i(e)}}}const rt=(e,t,n,o,i)=>{Me.swalCloseEventFinishedCallback=at.bind(null,e,n,o,i),t.addEventListener(ue,function(e){e.target===t&&(Me.swalCloseEventFinishedCallback(),delete Me.swalCloseEventFinishedCallback)})},ct=(e,t)=>{setTimeout(()=>{"function"==typeof t&&t.bind(e.params)(),e._destroy()})};function lt(e,t,n){const o=he.domCache.get(e);t.forEach(e=>{o[e].disabled=n})}function ut(e,t){if(!e)return!1;if("radio"===e.type){const n=e.parentNode.parentNode,o=n.querySelectorAll("input");for(let e=0;e/^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]{2,24}$/.test(e)?Promise.resolve():Promise.resolve(t||"Invalid email address"),url:(e,t)=>/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(e)?Promise.resolve():Promise.resolve(t||"Invalid URL")};function mt(e){var t,n;(t=e).inputValidator||Object.keys(pt).forEach(e=>{t.input===e&&(t.inputValidator=pt[e])}),e.showLoaderOnConfirm&&!e.preConfirm&&s("showLoaderOnConfirm is set to true, but preConfirm is not defined.\nshowLoaderOnConfirm should be used together with preConfirm, see usage example:\nhttps://sweetalert2.github.io/#ajax-request"),(n=e).target&&("string"!=typeof n.target||document.querySelector(n.target))&&("string"==typeof n.target||n.target.appendChild)||(s('Target parameter is not valid, defaulting to "body"'),n.target="body"),"string"==typeof e.title&&(e.title=e.title.split("\n").join("
                  ")),se(e)}const ht=["swal-title","swal-html","swal-footer"],gt=e=>{e="string"==typeof e.template?document.querySelector(e.template):e.template;if(!e)return{};e=e.content;return kt(e),Object.assign(bt(e),ft(e),yt(e),vt(e),wt(e),Ct(e,ht))},bt=e=>{const o={};return a(e.querySelectorAll("swal-param")).forEach(e=>{At(e,["name","value"]);var t=e.getAttribute("name");let n=e.getAttribute("value");"boolean"==typeof Re[t]&&"false"===n&&(n=!1),"object"==typeof Re[t]&&(n=JSON.parse(n)),o[t]=n}),o},ft=e=>{const n={};return a(e.querySelectorAll("swal-button")).forEach(e=>{At(e,["type","color","aria-label"]);var t=e.getAttribute("type");n["".concat(t,"ButtonText")]=e.innerHTML,n["show".concat(o(t),"Button")]=!0,e.hasAttribute("color")&&(n["".concat(t,"ButtonColor")]=e.getAttribute("color")),e.hasAttribute("aria-label")&&(n["".concat(t,"ButtonAriaLabel")]=e.getAttribute("aria-label"))}),n},yt=e=>{const t={},n=e.querySelector("swal-image");return n&&(At(n,["src","width","height","alt"]),n.hasAttribute("src")&&(t.imageUrl=n.getAttribute("src")),n.hasAttribute("width")&&(t.imageWidth=n.getAttribute("width")),n.hasAttribute("height")&&(t.imageHeight=n.getAttribute("height")),n.hasAttribute("alt")&&(t.imageAlt=n.getAttribute("alt"))),t},vt=e=>{const t={},n=e.querySelector("swal-icon");return n&&(At(n,["type","color"]),n.hasAttribute("type")&&(t.icon=n.getAttribute("type")),n.hasAttribute("color")&&(t.iconColor=n.getAttribute("color")),t.iconHtml=n.innerHTML),t},wt=e=>{const n={},t=e.querySelector("swal-input");t&&(At(t,["type","label","placeholder","value"]),n.input=t.getAttribute("type")||"text",t.hasAttribute("label")&&(n.inputLabel=t.getAttribute("label")),t.hasAttribute("placeholder")&&(n.inputPlaceholder=t.getAttribute("placeholder")),t.hasAttribute("value")&&(n.inputValue=t.getAttribute("value")));e=e.querySelectorAll("swal-input-option");return e.length&&(n.inputOptions={},a(e).forEach(e=>{At(e,["value"]);var t=e.getAttribute("value"),e=e.innerHTML;n.inputOptions[t]=e})),n},Ct=(e,t)=>{const n={};for(const o in t){const i=t[o],a=e.querySelector(i);a&&(At(a,[]),n[i.replace(/^swal-/,"")]=a.innerHTML.trim())}return n},kt=e=>{const t=ht.concat(["swal-param","swal-button","swal-image","swal-icon","swal-input","swal-input-option"]);a(e.children).forEach(e=>{e=e.tagName.toLowerCase();-1===t.indexOf(e)&&s("Unrecognized element <".concat(e,">"))})},At=(t,n)=>{a(t.attributes).forEach(e=>{-1===n.indexOf(e.name)&&s(['Unrecognized attribute "'.concat(e.name,'" on <').concat(t.tagName.toLowerCase(),">."),"".concat(n.length?"Allowed attributes are: ".concat(n.join(", ")):"To set the value, use HTML within the element.")])})},Bt=e=>{const t=b(),n=v();"function"==typeof e.willOpen&&e.willOpen(n);var o=window.getComputedStyle(document.body).overflowY;St(t,n,e),setTimeout(()=>{Pt(t,n)},10),M()&&(Et(t,e.scrollbarPadding,o),(()=>{const e=a(document.body.children);e.forEach(e=>{e===b()||e.contains(b())||(e.hasAttribute("aria-hidden")&&e.setAttribute("data-previous-aria-hidden",e.getAttribute("aria-hidden")),e.setAttribute("aria-hidden","true"))})})()),H()||Me.previousActiveElement||(Me.previousActiveElement=document.activeElement),"function"==typeof e.didOpen&&setTimeout(()=>e.didOpen(n)),_(t,h["no-transition"])},xt=e=>{const t=v();if(e.target===t){const n=b();t.removeEventListener(ue,xt),n.style.overflowY="auto"}},Pt=(e,t)=>{ue&&te(t)?(e.style.overflowY="hidden",t.addEventListener(ue,xt)):e.style.overflowY="auto"},Et=(e,t,n)=>{var o;(/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream||"MacIntel"===navigator.platform&&1{e.scrollTop=0})},St=(e,t,n)=>{W(e,n.showClass.backdrop),t.style.setProperty("opacity","0","important"),Z(t,"grid"),setTimeout(()=>{W(t,n.showClass.popup),t.style.removeProperty("opacity")},10),W([document.documentElement,document.body],h.shown),n.heightAuto&&n.backdrop&&!n.toast&&W([document.documentElement,document.body],h["height-auto"])},Tt=e=>e.checked?1:0,Lt=e=>e.checked?e.value:null,Ot=e=>e.files.length?null!==e.getAttribute("multiple")?e.files:e.files[0]:null,jt=(t,n)=>{const o=v(),i=e=>It[n.input](o,Mt(e),n);u(n.inputOptions)||p(n.inputOptions)?(De(P()),d(n.inputOptions).then(e=>{t.hideLoading(),i(e)})):"object"==typeof n.inputOptions?i(n.inputOptions):r("Unexpected type of inputOptions! Expected object, Map or Promise, got ".concat(typeof n.inputOptions))},Dt=(t,n)=>{const o=t.getInput();J(o),d(n.inputValue).then(e=>{o.value="number"===n.input?parseFloat(e)||0:"".concat(e),Z(o),o.focus(),t.hideLoading()}).catch(e=>{r("Error in inputValue promise: ".concat(e)),o.value="",Z(o),o.focus(),t.hideLoading()})},It={select:(e,t,i)=>{const a=K(e,h.select),s=(e,t,n)=>{const o=document.createElement("option");o.value=n,V(o,t),o.selected=Ht(n,i.inputValue),e.appendChild(o)};t.forEach(e=>{var t=e[0];const n=e[1];if(Array.isArray(n)){const o=document.createElement("optgroup");o.label=t,o.disabled=!1,a.appendChild(o),n.forEach(e=>s(o,e[1],e[0]))}else s(a,n,t)}),a.focus()},radio:(e,t,a)=>{const s=K(e,h.radio);t.forEach(e=>{var t=e[0],e=e[1];const n=document.createElement("input"),o=document.createElement("label");n.type="radio",n.name=h.radio,n.value=t,Ht(t,a.inputValue)&&(n.checked=!0);const i=document.createElement("span");V(i,e),i.className=h.label,o.appendChild(n),o.appendChild(i),s.appendChild(o)});const n=s.querySelectorAll("input");n.length&&n[0].focus()}},Mt=n=>{const o=[];return"undefined"!=typeof Map&&n instanceof Map?n.forEach((e,t)=>{let n=e;"object"==typeof n&&(n=Mt(n)),o.push([t,n])}):Object.keys(n).forEach(e=>{let t=n[e];"object"==typeof t&&(t=Mt(t)),o.push([e,t])}),o},Ht=(e,t)=>t&&t.toString()===e.toString(),qt=(e,t)=>{var n=he.innerParams.get(e),o=((e,t)=>{const n=e.getInput();if(!n)return null;switch(t.input){case"checkbox":return Tt(n);case"radio":return Lt(n);case"file":return Ot(n);default:return t.inputAutoTrim?n.value.trim():n.value}})(e,n);n.inputValidator?Vt(e,o,t):e.getInput().checkValidity()?("deny"===t?Nt:Ft)(e,o):(e.enableButtons(),e.showValidationMessage(n.validationMessage))},Vt=(t,n,o)=>{const e=he.innerParams.get(t);t.disableInput();const i=Promise.resolve().then(()=>d(e.inputValidator(n,e.validationMessage)));i.then(e=>{t.enableButtons(),t.enableInput(),e?t.showValidationMessage(e):("deny"===o?Nt:Ft)(t,n)})},Nt=(t,n)=>{const e=he.innerParams.get(t||void 0);if(e.showLoaderOnDeny&&De(E()),e.preDeny){const o=Promise.resolve().then(()=>d(e.preDeny(n,e.validationMessage)));o.then(e=>{!1===e?t.hideLoading():t.closePopup({isDenied:!0,value:void 0===e?n:e})})}else t.closePopup({isDenied:!0,value:n})},Ut=(e,t)=>{e.closePopup({isConfirmed:!0,value:t})},Ft=(t,n)=>{const e=he.innerParams.get(t||void 0);if(e.showLoaderOnConfirm&&De(),e.preConfirm){t.resetValidationMessage();const o=Promise.resolve().then(()=>d(e.preConfirm(n,e.validationMessage)));o.then(e=>{G(x())||!1===e?t.hideLoading():Ut(t,void 0===e?n:e)})}else Ut(t,n)},Rt=(e,t,n)=>{const o=I();if(o.length)return(t+=n)===o.length?t=0:-1===t&&(t=o.length-1),o[t].focus();v().focus()},zt=["ArrowRight","ArrowDown"],Wt=["ArrowLeft","ArrowUp"],_t=(e,t,n)=>{var o=he.innerParams.get(e);o&&(o.stopKeydownPropagation&&t.stopPropagation(),"Enter"===t.key?Kt(e,t,o):"Tab"===t.key?Yt(t,o):[...zt,...Wt].includes(t.key)?Zt(t.key):"Escape"===t.key&&Jt(t,o,n))},Kt=(e,t,n)=>{t.isComposing||t.target&&e.getInput()&&t.target.outerHTML===e.getInput().outerHTML&&(["textarea","file"].includes(n.input)||(je(),t.preventDefault()))},Yt=(e,t)=>{var n=e.target,o=I();let i=-1;for(let e=0;e{const t=P(),n=E(),o=T();if([t,n,o].includes(document.activeElement)){e=zt.includes(e)?"nextElementSibling":"previousElementSibling";const i=document.activeElement[e];i&&i.focus()}},Jt=(e,t,n)=>{c(t.allowEscapeKey)&&(e.preventDefault(),n(l.esc))},Xt=(t,e,n)=>{e.popup.onclick=()=>{var e=he.innerParams.get(t);e.showConfirmButton||e.showDenyButton||e.showCancelButton||e.showCloseButton||e.timer||e.input||n(l.close)}};let $t=!1;const Gt=t=>{t.popup.onmousedown=()=>{t.container.onmouseup=function(e){t.container.onmouseup=void 0,e.target===t.container&&($t=!0)}}},Qt=t=>{t.container.onmousedown=()=>{t.popup.onmouseup=function(e){t.popup.onmouseup=void 0,e.target!==t.popup&&!t.popup.contains(e.target)||($t=!0)}}},en=(n,o,i)=>{o.container.onclick=e=>{var t=he.innerParams.get(n);$t?$t=!1:e.target===o.container&&c(t.allowOutsideClick)&&i(l.backdrop)}};const tn=(e,t,n)=>{var o=j();J(o),t.timer&&(e.timeout=new dt(()=>{n("timer"),delete e.timeout},t.timer),t.timerProgressBar&&(Z(o),setTimeout(()=>{e.timeout&&e.timeout.running&&ne(t.timer)})))},nn=(e,t)=>{if(!t.toast)return c(t.allowEnterKey)?void(on(e,t)||Rt(0,-1,1)):an()},on=(e,t)=>t.focusDeny&&G(e.denyButton)?(e.denyButton.focus(),!0):t.focusCancel&&G(e.cancelButton)?(e.cancelButton.focus(),!0):!(!t.focusConfirm||!G(e.confirmButton))&&(e.confirmButton.focus(),!0),an=()=>{document.activeElement&&"function"==typeof document.activeElement.blur&&document.activeElement.blur()};const sn=e=>{for(const t in e)e[t]=new WeakMap};e=Object.freeze({hideLoading:Xe,disableLoading:Xe,getInput:function(e){var t=he.innerParams.get(e||this);return(e=he.domCache.get(e||this))?F(e.popup,t.input):null},close:st,closePopup:st,closeModal:st,closeToast:st,enableButtons:function(){lt(this,["confirmButton","denyButton","cancelButton"],!1)},disableButtons:function(){lt(this,["confirmButton","denyButton","cancelButton"],!0)},enableInput:function(){return ut(this.getInput(),!1)},disableInput:function(){return ut(this.getInput(),!0)},showValidationMessage:function(e){const t=he.domCache.get(this);var n=he.innerParams.get(this);V(t.validationMessage,e),t.validationMessage.className=h["validation-message"],n.customClass&&n.customClass.validationMessage&&W(t.validationMessage,n.customClass.validationMessage),Z(t.validationMessage);const o=this.getInput();o&&(o.setAttribute("aria-invalid",!0),o.setAttribute("aria-describedby",h["validation-message"]),R(o),W(o,h.inputerror))},resetValidationMessage:function(){var e=he.domCache.get(this);e.validationMessage&&J(e.validationMessage);const t=this.getInput();t&&(t.removeAttribute("aria-invalid"),t.removeAttribute("aria-describedby"),_(t,h.inputerror))},getProgressSteps:function(){return he.domCache.get(this).progressSteps},_main:function(e,t={}){Ze(Object.assign({},t,e)),Me.currentInstance&&(Me.currentInstance._destroy(),M()&&ot()),Me.currentInstance=this,mt(e=((e,t)=>{const n=gt(e),o=Object.assign({},Re,t,n,e);return o.showClass=Object.assign({},Re.showClass,o.showClass),o.hideClass=Object.assign({},Re.hideClass,o.hideClass),o})(e,t)),Object.freeze(e),Me.timeout&&(Me.timeout.stop(),delete Me.timeout),clearTimeout(Me.restoreFocusTimeout);var s,r,c,t=(e=>{const t={popup:v(),container:b(),actions:L(),confirmButton:P(),denyButton:E(),cancelButton:T(),loader:S(),closeButton:D(),validationMessage:x(),progressSteps:B()};return he.domCache.set(e,t),t})(this);return Oe(this,e),he.innerParams.set(this,e),s=this,r=t,c=e,new Promise(e=>{const t=e=>{s.closePopup({isDismissed:!0,dismiss:e})};var n,o,i,a;it.swalPromiseResolve.set(s,e),r.confirmButton.onclick=()=>(e=>{var t=he.innerParams.get(e);e.disableButtons(),t.input?qt(e,"confirm"):Ft(e,!0)})(s),r.denyButton.onclick=()=>(e=>{var t=he.innerParams.get(e);e.disableButtons(),t.returnInputValueOnDeny?qt(e,"deny"):Nt(e,!1)})(s),r.cancelButton.onclick=()=>((e,t)=>{e.disableButtons(),t(l.cancel)})(s,t),r.closeButton.onclick=()=>t(l.close),n=s,a=r,e=t,he.innerParams.get(n).toast?Xt(n,a,e):(Gt(a),Qt(a),en(n,a,e)),o=s,a=Me,e=c,i=t,a.keydownTarget&&a.keydownHandlerAdded&&(a.keydownTarget.removeEventListener("keydown",a.keydownHandler,{capture:a.keydownListenerCapture}),a.keydownHandlerAdded=!1),e.toast||(a.keydownHandler=e=>_t(o,e,i),a.keydownTarget=e.keydownListenerCapture?window:v(),a.keydownListenerCapture=e.keydownListenerCapture,a.keydownTarget.addEventListener("keydown",a.keydownHandler,{capture:a.keydownListenerCapture}),a.keydownHandlerAdded=!0),e=s,"select"===(a=c).input||"radio"===a.input?jt(e,a):["text","email","number","tel","textarea"].includes(a.input)&&(u(a.inputValue)||p(a.inputValue))&&(De(P()),Dt(e,a)),Bt(c),tn(Me,c,t),nn(r,c),setTimeout(()=>{r.container.scrollTop=0})})},update:function(t){var e=v(),n=he.innerParams.get(this);if(!e||N(e,n.hideClass.popup))return s("You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup.");const o={};Object.keys(t).forEach(e=>{ln.isUpdatableParameter(e)?o[e]=t[e]:s('Invalid parameter to update: "'.concat(e,'". Updatable params are listed here: https://github.com/sweetalert2/sweetalert2/blob/master/src/utils/params.js\n\nIf you think this parameter should be updatable, request it here: https://github.com/sweetalert2/sweetalert2/issues/new?template=02_feature_request.md'))}),n=Object.assign({},n,o),Oe(this,n),he.innerParams.set(this,n),Object.defineProperties(this,{params:{value:Object.assign({},this.params,t),writable:!1,enumerable:!0}})},_destroy:function(){var e=he.domCache.get(this);const t=he.innerParams.get(this);t&&(e.popup&&Me.swalCloseEventFinishedCallback&&(Me.swalCloseEventFinishedCallback(),delete Me.swalCloseEventFinishedCallback),Me.deferDisposalTimer&&(clearTimeout(Me.deferDisposalTimer),delete Me.deferDisposalTimer),"function"==typeof t.didDestroy&&t.didDestroy(),delete this.params,delete Me.keydownHandler,delete Me.keydownTarget,sn(he),sn(it),delete Me.currentInstance)}});let rn;class cn{constructor(...e){"undefined"!=typeof window&&(rn=this,e=Object.freeze(this.constructor.argsToParams(e)),Object.defineProperties(this,{params:{value:e,writable:!1,enumerable:!0,configurable:!0}}),e=this._main(this.params),he.promise.set(this,e))}then(e){const t=he.promise.get(this);return t.then(e)}finally(e){const t=he.promise.get(this);return t.finally(e)}}Object.assign(cn.prototype,e),Object.assign(cn,Je),Object.keys(e).forEach(t=>{cn[t]=function(...e){if(rn)return rn[t](...e)}}),cn.DismissReason=l,cn.version="11.1.5";const ln=cn;return ln.default=ln,ln}),void 0!==this&&this.Sweetalert2&&(this.swal=this.sweetAlert=this.Swal=this.SweetAlert=this.Sweetalert2); \ No newline at end of file diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Host/wwwroot/libs/sweetalert2/sweetalert2.all.js b/modules/cms-kit/host/Volo.CmsKit.Web.Host/wwwroot/libs/sweetalert2/sweetalert2.all.js new file mode 100644 index 0000000000..8cbddafe42 --- /dev/null +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Host/wwwroot/libs/sweetalert2/sweetalert2.all.js @@ -0,0 +1,3123 @@ +/*! +* sweetalert2 v11.1.5 +* Released under the MIT License. +*/ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : + typeof define === 'function' && define.amd ? define(factory) : + (global = global || self, global.Sweetalert2 = factory()); +}(this, function () { 'use strict'; + + const DismissReason = Object.freeze({ + cancel: 'cancel', + backdrop: 'backdrop', + close: 'close', + esc: 'esc', + timer: 'timer' + }); + + const consolePrefix = 'SweetAlert2:'; + /** + * Filter the unique values into a new array + * @param arr + */ + + const uniqueArray = arr => { + const result = []; + + for (let i = 0; i < arr.length; i++) { + if (result.indexOf(arr[i]) === -1) { + result.push(arr[i]); + } + } + + return result; + }; + /** + * Capitalize the first letter of a string + * @param str + */ + + const capitalizeFirstLetter = str => str.charAt(0).toUpperCase() + str.slice(1); + /** + * Convert NodeList to Array + * @param nodeList + */ + + const toArray = nodeList => Array.prototype.slice.call(nodeList); + /** + * Standardise console warnings + * @param message + */ + + const warn = message => { + console.warn("".concat(consolePrefix, " ").concat(typeof message === 'object' ? message.join(' ') : message)); + }; + /** + * Standardise console errors + * @param message + */ + + const error = message => { + console.error("".concat(consolePrefix, " ").concat(message)); + }; + /** + * Private global state for `warnOnce` + * @type {Array} + * @private + */ + + const previousWarnOnceMessages = []; + /** + * Show a console warning, but only if it hasn't already been shown + * @param message + */ + + const warnOnce = message => { + if (!previousWarnOnceMessages.includes(message)) { + previousWarnOnceMessages.push(message); + warn(message); + } + }; + /** + * Show a one-time console warning about deprecated params/methods + */ + + const warnAboutDeprecation = (deprecatedParam, useInstead) => { + warnOnce("\"".concat(deprecatedParam, "\" is deprecated and will be removed in the next major release. Please use \"").concat(useInstead, "\" instead.")); + }; + /** + * If `arg` is a function, call it (with no arguments or context) and return the result. + * Otherwise, just pass the value through + * @param arg + */ + + const callIfFunction = arg => typeof arg === 'function' ? arg() : arg; + const hasToPromiseFn = arg => arg && typeof arg.toPromise === 'function'; + const asPromise = arg => hasToPromiseFn(arg) ? arg.toPromise() : Promise.resolve(arg); + const isPromise = arg => arg && Promise.resolve(arg) === arg; + + const isJqueryElement = elem => typeof elem === 'object' && elem.jquery; + + const isElement = elem => elem instanceof Element || isJqueryElement(elem); + + const argsToParams = args => { + const params = {}; + + if (typeof args[0] === 'object' && !isElement(args[0])) { + Object.assign(params, args[0]); + } else { + ['title', 'html', 'icon'].forEach((name, index) => { + const arg = args[index]; + + if (typeof arg === 'string' || isElement(arg)) { + params[name] = arg; + } else if (arg !== undefined) { + error("Unexpected type of ".concat(name, "! Expected \"string\" or \"Element\", got ").concat(typeof arg)); + } + }); + } + + return params; + }; + + const swalPrefix = 'swal2-'; + const prefix = items => { + const result = {}; + + for (const i in items) { + result[items[i]] = swalPrefix + items[i]; + } + + return result; + }; + const swalClasses = prefix(['container', 'shown', 'height-auto', 'iosfix', 'popup', 'modal', 'no-backdrop', 'no-transition', 'toast', 'toast-shown', 'show', 'hide', 'close', 'title', 'html-container', 'actions', 'confirm', 'deny', 'cancel', 'default-outline', 'footer', 'icon', 'icon-content', 'image', 'input', 'file', 'range', 'select', 'radio', 'checkbox', 'label', 'textarea', 'inputerror', 'input-label', 'validation-message', 'progress-steps', 'active-progress-step', 'progress-step', 'progress-step-line', 'loader', 'loading', 'styled', 'top', 'top-start', 'top-end', 'top-left', 'top-right', 'center', 'center-start', 'center-end', 'center-left', 'center-right', 'bottom', 'bottom-start', 'bottom-end', 'bottom-left', 'bottom-right', 'grow-row', 'grow-column', 'grow-fullscreen', 'rtl', 'timer-progress-bar', 'timer-progress-bar-container', 'scrollbar-measure', 'icon-success', 'icon-warning', 'icon-info', 'icon-question', 'icon-error']); + const iconTypes = prefix(['success', 'warning', 'info', 'question', 'error']); + + const getContainer = () => document.body.querySelector(".".concat(swalClasses.container)); + const elementBySelector = selectorString => { + const container = getContainer(); + return container ? container.querySelector(selectorString) : null; + }; + + const elementByClass = className => { + return elementBySelector(".".concat(className)); + }; + + const getPopup = () => elementByClass(swalClasses.popup); + const getIcon = () => elementByClass(swalClasses.icon); + const getTitle = () => elementByClass(swalClasses.title); + const getHtmlContainer = () => elementByClass(swalClasses['html-container']); + const getImage = () => elementByClass(swalClasses.image); + const getProgressSteps = () => elementByClass(swalClasses['progress-steps']); + const getValidationMessage = () => elementByClass(swalClasses['validation-message']); + const getConfirmButton = () => elementBySelector(".".concat(swalClasses.actions, " .").concat(swalClasses.confirm)); + const getDenyButton = () => elementBySelector(".".concat(swalClasses.actions, " .").concat(swalClasses.deny)); + const getInputLabel = () => elementByClass(swalClasses['input-label']); + const getLoader = () => elementBySelector(".".concat(swalClasses.loader)); + const getCancelButton = () => elementBySelector(".".concat(swalClasses.actions, " .").concat(swalClasses.cancel)); + const getActions = () => elementByClass(swalClasses.actions); + const getFooter = () => elementByClass(swalClasses.footer); + const getTimerProgressBar = () => elementByClass(swalClasses['timer-progress-bar']); + const getCloseButton = () => elementByClass(swalClasses.close); // https://github.com/jkup/focusable/blob/master/index.js + + const focusable = "\n a[href],\n area[href],\n input:not([disabled]),\n select:not([disabled]),\n textarea:not([disabled]),\n button:not([disabled]),\n iframe,\n object,\n embed,\n [tabindex=\"0\"],\n [contenteditable],\n audio[controls],\n video[controls],\n summary\n"; + const getFocusableElements = () => { + const focusableElementsWithTabindex = toArray(getPopup().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')) // sort according to tabindex + .sort((a, b) => { + a = parseInt(a.getAttribute('tabindex')); + b = parseInt(b.getAttribute('tabindex')); + + if (a > b) { + return 1; + } else if (a < b) { + return -1; + } + + return 0; + }); + const otherFocusableElements = toArray(getPopup().querySelectorAll(focusable)).filter(el => el.getAttribute('tabindex') !== '-1'); + return uniqueArray(focusableElementsWithTabindex.concat(otherFocusableElements)).filter(el => isVisible(el)); + }; + const isModal = () => { + return !isToast() && !document.body.classList.contains(swalClasses['no-backdrop']); + }; + const isToast = () => { + return document.body.classList.contains(swalClasses['toast-shown']); + }; + const isLoading = () => { + return getPopup().hasAttribute('data-loading'); + }; + + const states = { + previousBodyPadding: null + }; + const setInnerHtml = (elem, html) => { + // #1926 + elem.textContent = ''; + + if (html) { + const parser = new DOMParser(); + const parsed = parser.parseFromString(html, "text/html"); + toArray(parsed.querySelector('head').childNodes).forEach(child => { + elem.appendChild(child); + }); + toArray(parsed.querySelector('body').childNodes).forEach(child => { + elem.appendChild(child); + }); + } + }; + const hasClass = (elem, className) => { + if (!className) { + return false; + } + + const classList = className.split(/\s+/); + + for (let i = 0; i < classList.length; i++) { + if (!elem.classList.contains(classList[i])) { + return false; + } + } + + return true; + }; + + const removeCustomClasses = (elem, params) => { + toArray(elem.classList).forEach(className => { + if (!Object.values(swalClasses).includes(className) && !Object.values(iconTypes).includes(className) && !Object.values(params.showClass).includes(className)) { + elem.classList.remove(className); + } + }); + }; + + const applyCustomClass = (elem, params, className) => { + removeCustomClasses(elem, params); + + if (params.customClass && params.customClass[className]) { + if (typeof params.customClass[className] !== 'string' && !params.customClass[className].forEach) { + return warn("Invalid type of customClass.".concat(className, "! Expected string or iterable object, got \"").concat(typeof params.customClass[className], "\"")); + } + + addClass(elem, params.customClass[className]); + } + }; + const getInput = (popup, inputType) => { + if (!inputType) { + return null; + } + + switch (inputType) { + case 'select': + case 'textarea': + case 'file': + return getChildByClass(popup, swalClasses[inputType]); + + case 'checkbox': + return popup.querySelector(".".concat(swalClasses.checkbox, " input")); + + case 'radio': + return popup.querySelector(".".concat(swalClasses.radio, " input:checked")) || popup.querySelector(".".concat(swalClasses.radio, " input:first-child")); + + case 'range': + return popup.querySelector(".".concat(swalClasses.range, " input")); + + default: + return getChildByClass(popup, swalClasses.input); + } + }; + const focusInput = input => { + input.focus(); // place cursor at end of text in text input + + if (input.type !== 'file') { + // http://stackoverflow.com/a/2345915 + const val = input.value; + input.value = ''; + input.value = val; + } + }; + const toggleClass = (target, classList, condition) => { + if (!target || !classList) { + return; + } + + if (typeof classList === 'string') { + classList = classList.split(/\s+/).filter(Boolean); + } + + classList.forEach(className => { + if (target.forEach) { + target.forEach(elem => { + condition ? elem.classList.add(className) : elem.classList.remove(className); + }); + } else { + condition ? target.classList.add(className) : target.classList.remove(className); + } + }); + }; + const addClass = (target, classList) => { + toggleClass(target, classList, true); + }; + const removeClass = (target, classList) => { + toggleClass(target, classList, false); + }; + const getChildByClass = (elem, className) => { + for (let i = 0; i < elem.childNodes.length; i++) { + if (hasClass(elem.childNodes[i], className)) { + return elem.childNodes[i]; + } + } + }; + const applyNumericalStyle = (elem, property, value) => { + if (value === "".concat(parseInt(value))) { + value = parseInt(value); + } + + if (value || parseInt(value) === 0) { + elem.style[property] = typeof value === 'number' ? "".concat(value, "px") : value; + } else { + elem.style.removeProperty(property); + } + }; + const show = (elem, display = 'flex') => { + elem.style.display = display; + }; + const hide = elem => { + elem.style.display = 'none'; + }; + const setStyle = (parent, selector, property, value) => { + const el = parent.querySelector(selector); + + if (el) { + el.style[property] = value; + } + }; + const toggle = (elem, condition, display) => { + condition ? show(elem, display) : hide(elem); + }; // borrowed from jquery $(elem).is(':visible') implementation + + const isVisible = elem => !!(elem && (elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length)); + const allButtonsAreHidden = () => !isVisible(getConfirmButton()) && !isVisible(getDenyButton()) && !isVisible(getCancelButton()); + const isScrollable = elem => !!(elem.scrollHeight > elem.clientHeight); // borrowed from https://stackoverflow.com/a/46352119 + + const hasCssAnimation = elem => { + const style = window.getComputedStyle(elem); + const animDuration = parseFloat(style.getPropertyValue('animation-duration') || '0'); + const transDuration = parseFloat(style.getPropertyValue('transition-duration') || '0'); + return animDuration > 0 || transDuration > 0; + }; + const animateTimerProgressBar = (timer, reset = false) => { + const timerProgressBar = getTimerProgressBar(); + + if (isVisible(timerProgressBar)) { + if (reset) { + timerProgressBar.style.transition = 'none'; + timerProgressBar.style.width = '100%'; + } + + setTimeout(() => { + timerProgressBar.style.transition = "width ".concat(timer / 1000, "s linear"); + timerProgressBar.style.width = '0%'; + }, 10); + } + }; + const stopTimerProgressBar = () => { + const timerProgressBar = getTimerProgressBar(); + const timerProgressBarWidth = parseInt(window.getComputedStyle(timerProgressBar).width); + timerProgressBar.style.removeProperty('transition'); + timerProgressBar.style.width = '100%'; + const timerProgressBarFullWidth = parseInt(window.getComputedStyle(timerProgressBar).width); + const timerProgressBarPercent = parseInt(timerProgressBarWidth / timerProgressBarFullWidth * 100); + timerProgressBar.style.removeProperty('transition'); + timerProgressBar.style.width = "".concat(timerProgressBarPercent, "%"); + }; + + // Detect Node env + const isNodeEnv = () => typeof window === 'undefined' || typeof document === 'undefined'; + + const sweetHTML = "\n
                  \n \n
                    \n
                    \n \n

                    \n
                    \n \n \n
                    \n \n \n
                    \n \n
                    \n \n \n
                    \n
                    \n
                    \n \n \n \n
                    \n
                    \n
                    \n
                    \n
                    \n
                    \n").replace(/(^|\n)\s*/g, ''); + + const resetOldContainer = () => { + const oldContainer = getContainer(); + + if (!oldContainer) { + return false; + } + + oldContainer.remove(); + removeClass([document.documentElement, document.body], [swalClasses['no-backdrop'], swalClasses['toast-shown'], swalClasses['has-column']]); + return true; + }; + + const resetValidationMessage = () => { + if (Swal.isVisible()) { + Swal.resetValidationMessage(); + } + }; + + const addInputChangeListeners = () => { + const popup = getPopup(); + const input = getChildByClass(popup, swalClasses.input); + const file = getChildByClass(popup, swalClasses.file); + const range = popup.querySelector(".".concat(swalClasses.range, " input")); + const rangeOutput = popup.querySelector(".".concat(swalClasses.range, " output")); + const select = getChildByClass(popup, swalClasses.select); + const checkbox = popup.querySelector(".".concat(swalClasses.checkbox, " input")); + const textarea = getChildByClass(popup, swalClasses.textarea); + input.oninput = resetValidationMessage; + file.onchange = resetValidationMessage; + select.onchange = resetValidationMessage; + checkbox.onchange = resetValidationMessage; + textarea.oninput = resetValidationMessage; + + range.oninput = () => { + resetValidationMessage(); + rangeOutput.value = range.value; + }; + + range.onchange = () => { + resetValidationMessage(); + range.nextSibling.value = range.value; + }; + }; + + const getTarget = target => typeof target === 'string' ? document.querySelector(target) : target; + + const setupAccessibility = params => { + const popup = getPopup(); + popup.setAttribute('role', params.toast ? 'alert' : 'dialog'); + popup.setAttribute('aria-live', params.toast ? 'polite' : 'assertive'); + + if (!params.toast) { + popup.setAttribute('aria-modal', 'true'); + } + }; + + const setupRTL = targetElement => { + if (window.getComputedStyle(targetElement).direction === 'rtl') { + addClass(getContainer(), swalClasses.rtl); + } + }; + /* + * Add modal + backdrop to DOM + */ + + + const init = params => { + // Clean up the old popup container if it exists + const oldContainerExisted = resetOldContainer(); + /* istanbul ignore if */ + + if (isNodeEnv()) { + error('SweetAlert2 requires document to initialize'); + return; + } + + const container = document.createElement('div'); + container.className = swalClasses.container; + + if (oldContainerExisted) { + addClass(container, swalClasses['no-transition']); + } + + setInnerHtml(container, sweetHTML); + const targetElement = getTarget(params.target); + targetElement.appendChild(container); + setupAccessibility(params); + setupRTL(targetElement); + addInputChangeListeners(); + }; + + const parseHtmlToContainer = (param, target) => { + // DOM element + if (param instanceof HTMLElement) { + target.appendChild(param); // Object + } else if (typeof param === 'object') { + handleObject(param, target); // Plain string + } else if (param) { + setInnerHtml(target, param); + } + }; + + const handleObject = (param, target) => { + // JQuery element(s) + if (param.jquery) { + handleJqueryElem(target, param); // For other objects use their string representation + } else { + setInnerHtml(target, param.toString()); + } + }; + + const handleJqueryElem = (target, elem) => { + target.textContent = ''; + + if (0 in elem) { + for (let i = 0; (i in elem); i++) { + target.appendChild(elem[i].cloneNode(true)); + } + } else { + target.appendChild(elem.cloneNode(true)); + } + }; + + const animationEndEvent = (() => { + // Prevent run in Node env + + /* istanbul ignore if */ + if (isNodeEnv()) { + return false; + } + + const testEl = document.createElement('div'); + const transEndEventNames = { + WebkitAnimation: 'webkitAnimationEnd', + OAnimation: 'oAnimationEnd oanimationend', + animation: 'animationend' + }; + + for (const i in transEndEventNames) { + if (Object.prototype.hasOwnProperty.call(transEndEventNames, i) && typeof testEl.style[i] !== 'undefined') { + return transEndEventNames[i]; + } + } + + return false; + })(); + + // https://github.com/twbs/bootstrap/blob/master/js/src/modal.js + + const measureScrollbar = () => { + const scrollDiv = document.createElement('div'); + scrollDiv.className = swalClasses['scrollbar-measure']; + document.body.appendChild(scrollDiv); + const scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth; + document.body.removeChild(scrollDiv); + return scrollbarWidth; + }; + + const renderActions = (instance, params) => { + const actions = getActions(); + const loader = getLoader(); + const confirmButton = getConfirmButton(); + const denyButton = getDenyButton(); + const cancelButton = getCancelButton(); // Actions (buttons) wrapper + + if (!params.showConfirmButton && !params.showDenyButton && !params.showCancelButton) { + hide(actions); + } else { + show(actions); + } // Custom class + + + applyCustomClass(actions, params, 'actions'); // Render buttons + + renderButton(confirmButton, 'confirm', params); + renderButton(denyButton, 'deny', params); + renderButton(cancelButton, 'cancel', params); + handleButtonsStyling(confirmButton, denyButton, cancelButton, params); + + if (params.reverseButtons) { + actions.insertBefore(cancelButton, loader); + actions.insertBefore(denyButton, loader); + actions.insertBefore(confirmButton, loader); + } // Loader + + + setInnerHtml(loader, params.loaderHtml); + applyCustomClass(loader, params, 'loader'); + }; + + function handleButtonsStyling(confirmButton, denyButton, cancelButton, params) { + if (!params.buttonsStyling) { + return removeClass([confirmButton, denyButton, cancelButton], swalClasses.styled); + } + + addClass([confirmButton, denyButton, cancelButton], swalClasses.styled); // Buttons background colors + + if (params.confirmButtonColor) { + confirmButton.style.backgroundColor = params.confirmButtonColor; + addClass(confirmButton, swalClasses['default-outline']); + } + + if (params.denyButtonColor) { + denyButton.style.backgroundColor = params.denyButtonColor; + addClass(denyButton, swalClasses['default-outline']); + } + + if (params.cancelButtonColor) { + cancelButton.style.backgroundColor = params.cancelButtonColor; + addClass(cancelButton, swalClasses['default-outline']); + } + } + + function renderButton(button, buttonType, params) { + toggle(button, params["show".concat(capitalizeFirstLetter(buttonType), "Button")], 'inline-block'); + setInnerHtml(button, params["".concat(buttonType, "ButtonText")]); // Set caption text + + button.setAttribute('aria-label', params["".concat(buttonType, "ButtonAriaLabel")]); // ARIA label + // Add buttons custom classes + + button.className = swalClasses[buttonType]; + applyCustomClass(button, params, "".concat(buttonType, "Button")); + addClass(button, params["".concat(buttonType, "ButtonClass")]); + } + + function handleBackdropParam(container, backdrop) { + if (typeof backdrop === 'string') { + container.style.background = backdrop; + } else if (!backdrop) { + addClass([document.documentElement, document.body], swalClasses['no-backdrop']); + } + } + + function handlePositionParam(container, position) { + if (position in swalClasses) { + addClass(container, swalClasses[position]); + } else { + warn('The "position" parameter is not valid, defaulting to "center"'); + addClass(container, swalClasses.center); + } + } + + function handleGrowParam(container, grow) { + if (grow && typeof grow === 'string') { + const growClass = "grow-".concat(grow); + + if (growClass in swalClasses) { + addClass(container, swalClasses[growClass]); + } + } + } + + const renderContainer = (instance, params) => { + const container = getContainer(); + + if (!container) { + return; + } + + handleBackdropParam(container, params.backdrop); + handlePositionParam(container, params.position); + handleGrowParam(container, params.grow); // Custom class + + applyCustomClass(container, params, 'container'); + }; + + /** + * This module containts `WeakMap`s for each effectively-"private property" that a `Swal` has. + * For example, to set the private property "foo" of `this` to "bar", you can `privateProps.foo.set(this, 'bar')` + * This is the approach that Babel will probably take to implement private methods/fields + * https://github.com/tc39/proposal-private-methods + * https://github.com/babel/babel/pull/7555 + * Once we have the changes from that PR in Babel, and our core class fits reasonable in *one module* + * then we can use that language feature. + */ + var privateProps = { + promise: new WeakMap(), + innerParams: new WeakMap(), + domCache: new WeakMap() + }; + + const inputTypes = ['input', 'file', 'range', 'select', 'radio', 'checkbox', 'textarea']; + const renderInput = (instance, params) => { + const popup = getPopup(); + const innerParams = privateProps.innerParams.get(instance); + const rerender = !innerParams || params.input !== innerParams.input; + inputTypes.forEach(inputType => { + const inputClass = swalClasses[inputType]; + const inputContainer = getChildByClass(popup, inputClass); // set attributes + + setAttributes(inputType, params.inputAttributes); // set class + + inputContainer.className = inputClass; + + if (rerender) { + hide(inputContainer); + } + }); + + if (params.input) { + if (rerender) { + showInput(params); + } // set custom class + + + setCustomClass(params); + } + }; + + const showInput = params => { + if (!renderInputType[params.input]) { + return error("Unexpected type of input! Expected \"text\", \"email\", \"password\", \"number\", \"tel\", \"select\", \"radio\", \"checkbox\", \"textarea\", \"file\" or \"url\", got \"".concat(params.input, "\"")); + } + + const inputContainer = getInputContainer(params.input); + const input = renderInputType[params.input](inputContainer, params); + show(input); // input autofocus + + setTimeout(() => { + focusInput(input); + }); + }; + + const removeAttributes = input => { + for (let i = 0; i < input.attributes.length; i++) { + const attrName = input.attributes[i].name; + + if (!['type', 'value', 'style'].includes(attrName)) { + input.removeAttribute(attrName); + } + } + }; + + const setAttributes = (inputType, inputAttributes) => { + const input = getInput(getPopup(), inputType); + + if (!input) { + return; + } + + removeAttributes(input); + + for (const attr in inputAttributes) { + input.setAttribute(attr, inputAttributes[attr]); + } + }; + + const setCustomClass = params => { + const inputContainer = getInputContainer(params.input); + + if (params.customClass) { + addClass(inputContainer, params.customClass.input); + } + }; + + const setInputPlaceholder = (input, params) => { + if (!input.placeholder || params.inputPlaceholder) { + input.placeholder = params.inputPlaceholder; + } + }; + + const setInputLabel = (input, prependTo, params) => { + if (params.inputLabel) { + input.id = swalClasses.input; + const label = document.createElement('label'); + const labelClass = swalClasses['input-label']; + label.setAttribute('for', input.id); + label.className = labelClass; + addClass(label, params.customClass.inputLabel); + label.innerText = params.inputLabel; + prependTo.insertAdjacentElement('beforebegin', label); + } + }; + + const getInputContainer = inputType => { + const inputClass = swalClasses[inputType] ? swalClasses[inputType] : swalClasses.input; + return getChildByClass(getPopup(), inputClass); + }; + + const renderInputType = {}; + + renderInputType.text = renderInputType.email = renderInputType.password = renderInputType.number = renderInputType.tel = renderInputType.url = (input, params) => { + if (typeof params.inputValue === 'string' || typeof params.inputValue === 'number') { + input.value = params.inputValue; + } else if (!isPromise(params.inputValue)) { + warn("Unexpected type of inputValue! Expected \"string\", \"number\" or \"Promise\", got \"".concat(typeof params.inputValue, "\"")); + } + + setInputLabel(input, input, params); + setInputPlaceholder(input, params); + input.type = params.input; + return input; + }; + + renderInputType.file = (input, params) => { + setInputLabel(input, input, params); + setInputPlaceholder(input, params); + return input; + }; + + renderInputType.range = (range, params) => { + const rangeInput = range.querySelector('input'); + const rangeOutput = range.querySelector('output'); + rangeInput.value = params.inputValue; + rangeInput.type = params.input; + rangeOutput.value = params.inputValue; + setInputLabel(rangeInput, range, params); + return range; + }; + + renderInputType.select = (select, params) => { + select.textContent = ''; + + if (params.inputPlaceholder) { + const placeholder = document.createElement('option'); + setInnerHtml(placeholder, params.inputPlaceholder); + placeholder.value = ''; + placeholder.disabled = true; + placeholder.selected = true; + select.appendChild(placeholder); + } + + setInputLabel(select, select, params); + return select; + }; + + renderInputType.radio = radio => { + radio.textContent = ''; + return radio; + }; + + renderInputType.checkbox = (checkboxContainer, params) => { + const checkbox = getInput(getPopup(), 'checkbox'); + checkbox.value = 1; + checkbox.id = swalClasses.checkbox; + checkbox.checked = Boolean(params.inputValue); + const label = checkboxContainer.querySelector('span'); + setInnerHtml(label, params.inputPlaceholder); + return checkboxContainer; + }; + + renderInputType.textarea = (textarea, params) => { + textarea.value = params.inputValue; + setInputPlaceholder(textarea, params); + setInputLabel(textarea, textarea, params); + + const getMargin = el => parseInt(window.getComputedStyle(el).marginLeft) + parseInt(window.getComputedStyle(el).marginRight); + + setTimeout(() => { + // #2291 + if ('MutationObserver' in window) { + // #1699 + const initialPopupWidth = parseInt(window.getComputedStyle(getPopup()).width); + + const textareaResizeHandler = () => { + const textareaWidth = textarea.offsetWidth + getMargin(textarea); + + if (textareaWidth > initialPopupWidth) { + getPopup().style.width = "".concat(textareaWidth, "px"); + } else { + getPopup().style.width = null; + } + }; + + new MutationObserver(textareaResizeHandler).observe(textarea, { + attributes: true, + attributeFilter: ['style'] + }); + } + }); + return textarea; + }; + + const renderContent = (instance, params) => { + const htmlContainer = getHtmlContainer(); + applyCustomClass(htmlContainer, params, 'htmlContainer'); // Content as HTML + + if (params.html) { + parseHtmlToContainer(params.html, htmlContainer); + show(htmlContainer, 'block'); // Content as plain text + } else if (params.text) { + htmlContainer.textContent = params.text; + show(htmlContainer, 'block'); // No content + } else { + hide(htmlContainer); + } + + renderInput(instance, params); + }; + + const renderFooter = (instance, params) => { + const footer = getFooter(); + toggle(footer, params.footer); + + if (params.footer) { + parseHtmlToContainer(params.footer, footer); + } // Custom class + + + applyCustomClass(footer, params, 'footer'); + }; + + const renderCloseButton = (instance, params) => { + const closeButton = getCloseButton(); + setInnerHtml(closeButton, params.closeButtonHtml); // Custom class + + applyCustomClass(closeButton, params, 'closeButton'); + toggle(closeButton, params.showCloseButton); + closeButton.setAttribute('aria-label', params.closeButtonAriaLabel); + }; + + const renderIcon = (instance, params) => { + const innerParams = privateProps.innerParams.get(instance); + const icon = getIcon(); // if the given icon already rendered, apply the styling without re-rendering the icon + + if (innerParams && params.icon === innerParams.icon) { + // Custom or default content + setContent(icon, params); + applyStyles(icon, params); + return; + } + + if (!params.icon && !params.iconHtml) { + return hide(icon); + } + + if (params.icon && Object.keys(iconTypes).indexOf(params.icon) === -1) { + error("Unknown icon! Expected \"success\", \"error\", \"warning\", \"info\" or \"question\", got \"".concat(params.icon, "\"")); + return hide(icon); + } + + show(icon); // Custom or default content + + setContent(icon, params); + applyStyles(icon, params); // Animate icon + + addClass(icon, params.showClass.icon); + }; + + const applyStyles = (icon, params) => { + for (const iconType in iconTypes) { + if (params.icon !== iconType) { + removeClass(icon, iconTypes[iconType]); + } + } + + addClass(icon, iconTypes[params.icon]); // Icon color + + setColor(icon, params); // Success icon background color + + adjustSuccessIconBackgoundColor(); // Custom class + + applyCustomClass(icon, params, 'icon'); + }; // Adjust success icon background color to match the popup background color + + + const adjustSuccessIconBackgoundColor = () => { + const popup = getPopup(); + const popupBackgroundColor = window.getComputedStyle(popup).getPropertyValue('background-color'); + const successIconParts = popup.querySelectorAll('[class^=swal2-success-circular-line], .swal2-success-fix'); + + for (let i = 0; i < successIconParts.length; i++) { + successIconParts[i].style.backgroundColor = popupBackgroundColor; + } + }; + + const setContent = (icon, params) => { + icon.textContent = ''; + + if (params.iconHtml) { + setInnerHtml(icon, iconContent(params.iconHtml)); + } else if (params.icon === 'success') { + setInnerHtml(icon, "\n
                    \n \n
                    \n
                    \n "); + } else if (params.icon === 'error') { + setInnerHtml(icon, "\n \n \n \n \n "); + } else { + const defaultIconHtml = { + question: '?', + warning: '!', + info: 'i' + }; + setInnerHtml(icon, iconContent(defaultIconHtml[params.icon])); + } + }; + + const setColor = (icon, params) => { + if (!params.iconColor) { + return; + } + + icon.style.color = params.iconColor; + icon.style.borderColor = params.iconColor; + + for (const sel of ['.swal2-success-line-tip', '.swal2-success-line-long', '.swal2-x-mark-line-left', '.swal2-x-mark-line-right']) { + setStyle(icon, sel, 'backgroundColor', params.iconColor); + } + + setStyle(icon, '.swal2-success-ring', 'borderColor', params.iconColor); + }; + + const iconContent = content => "
                    ").concat(content, "
                    "); + + const renderImage = (instance, params) => { + const image = getImage(); + + if (!params.imageUrl) { + return hide(image); + } + + show(image, ''); // Src, alt + + image.setAttribute('src', params.imageUrl); + image.setAttribute('alt', params.imageAlt); // Width, height + + applyNumericalStyle(image, 'width', params.imageWidth); + applyNumericalStyle(image, 'height', params.imageHeight); // Class + + image.className = swalClasses.image; + applyCustomClass(image, params, 'image'); + }; + + const createStepElement = step => { + const stepEl = document.createElement('li'); + addClass(stepEl, swalClasses['progress-step']); + setInnerHtml(stepEl, step); + return stepEl; + }; + + const createLineElement = params => { + const lineEl = document.createElement('li'); + addClass(lineEl, swalClasses['progress-step-line']); + + if (params.progressStepsDistance) { + lineEl.style.width = params.progressStepsDistance; + } + + return lineEl; + }; + + const renderProgressSteps = (instance, params) => { + const progressStepsContainer = getProgressSteps(); + + if (!params.progressSteps || params.progressSteps.length === 0) { + return hide(progressStepsContainer); + } + + show(progressStepsContainer); + progressStepsContainer.textContent = ''; + + if (params.currentProgressStep >= params.progressSteps.length) { + warn('Invalid currentProgressStep parameter, it should be less than progressSteps.length ' + '(currentProgressStep like JS arrays starts from 0)'); + } + + params.progressSteps.forEach((step, index) => { + const stepEl = createStepElement(step); + progressStepsContainer.appendChild(stepEl); + + if (index === params.currentProgressStep) { + addClass(stepEl, swalClasses['active-progress-step']); + } + + if (index !== params.progressSteps.length - 1) { + const lineEl = createLineElement(params); + progressStepsContainer.appendChild(lineEl); + } + }); + }; + + const renderTitle = (instance, params) => { + const title = getTitle(); + toggle(title, params.title || params.titleText, 'block'); + + if (params.title) { + parseHtmlToContainer(params.title, title); + } + + if (params.titleText) { + title.innerText = params.titleText; + } // Custom class + + + applyCustomClass(title, params, 'title'); + }; + + const renderPopup = (instance, params) => { + const container = getContainer(); + const popup = getPopup(); // Width + + if (params.toast) { + // #2170 + applyNumericalStyle(container, 'width', params.width); + popup.style.width = '100%'; + popup.insertBefore(getLoader(), getIcon()); + } else { + applyNumericalStyle(popup, 'width', params.width); + } // Padding + + + applyNumericalStyle(popup, 'padding', params.padding); // Background + + if (params.background) { + popup.style.background = params.background; + } + + hide(getValidationMessage()); // Classes + + addClasses(popup, params); + }; + + const addClasses = (popup, params) => { + // Default Class + showClass when updating Swal.update({}) + popup.className = "".concat(swalClasses.popup, " ").concat(isVisible(popup) ? params.showClass.popup : ''); + + if (params.toast) { + addClass([document.documentElement, document.body], swalClasses['toast-shown']); + addClass(popup, swalClasses.toast); + } else { + addClass(popup, swalClasses.modal); + } // Custom class + + + applyCustomClass(popup, params, 'popup'); + + if (typeof params.customClass === 'string') { + addClass(popup, params.customClass); + } // Icon class (#1842) + + + if (params.icon) { + addClass(popup, swalClasses["icon-".concat(params.icon)]); + } + }; + + const render = (instance, params) => { + renderPopup(instance, params); + renderContainer(instance, params); + renderProgressSteps(instance, params); + renderIcon(instance, params); + renderImage(instance, params); + renderTitle(instance, params); + renderCloseButton(instance, params); + renderContent(instance, params); + renderActions(instance, params); + renderFooter(instance, params); + + if (typeof params.didRender === 'function') { + params.didRender(getPopup()); + } + }; + + /* + * Global function to determine if SweetAlert2 popup is shown + */ + + const isVisible$1 = () => { + return isVisible(getPopup()); + }; + /* + * Global function to click 'Confirm' button + */ + + const clickConfirm = () => getConfirmButton() && getConfirmButton().click(); + /* + * Global function to click 'Deny' button + */ + + const clickDeny = () => getDenyButton() && getDenyButton().click(); + /* + * Global function to click 'Cancel' button + */ + + const clickCancel = () => getCancelButton() && getCancelButton().click(); + + function fire(...args) { + const Swal = this; + return new Swal(...args); + } + + /** + * Returns an extended version of `Swal` containing `params` as defaults. + * Useful for reusing Swal configuration. + * + * For example: + * + * Before: + * const textPromptOptions = { input: 'text', showCancelButton: true } + * const {value: firstName} = await Swal.fire({ ...textPromptOptions, title: 'What is your first name?' }) + * const {value: lastName} = await Swal.fire({ ...textPromptOptions, title: 'What is your last name?' }) + * + * After: + * const TextPrompt = Swal.mixin({ input: 'text', showCancelButton: true }) + * const {value: firstName} = await TextPrompt('What is your first name?') + * const {value: lastName} = await TextPrompt('What is your last name?') + * + * @param mixinParams + */ + function mixin(mixinParams) { + class MixinSwal extends this { + _main(params, priorityMixinParams) { + return super._main(params, Object.assign({}, mixinParams, priorityMixinParams)); + } + + } + + return MixinSwal; + } + + /** + * Shows loader (spinner), this is useful with AJAX requests. + * By default the loader be shown instead of the "Confirm" button. + */ + + const showLoading = buttonToReplace => { + let popup = getPopup(); + + if (!popup) { + Swal.fire(); + } + + popup = getPopup(); + const loader = getLoader(); + + if (isToast()) { + hide(getIcon()); + } else { + replaceButton(popup, buttonToReplace); + } + + show(loader); + popup.setAttribute('data-loading', true); + popup.setAttribute('aria-busy', true); + popup.focus(); + }; + + const replaceButton = (popup, buttonToReplace) => { + const actions = getActions(); + const loader = getLoader(); + + if (!buttonToReplace && isVisible(getConfirmButton())) { + buttonToReplace = getConfirmButton(); + } + + show(actions); + + if (buttonToReplace) { + hide(buttonToReplace); + loader.setAttribute('data-button-to-replace', buttonToReplace.className); + } + + loader.parentNode.insertBefore(loader, buttonToReplace); + addClass([popup, actions], swalClasses.loading); + }; + + const RESTORE_FOCUS_TIMEOUT = 100; + + const globalState = {}; + + const focusPreviousActiveElement = () => { + if (globalState.previousActiveElement && globalState.previousActiveElement.focus) { + globalState.previousActiveElement.focus(); + globalState.previousActiveElement = null; + } else if (document.body) { + document.body.focus(); + } + }; // Restore previous active (focused) element + + + const restoreActiveElement = returnFocus => { + return new Promise(resolve => { + if (!returnFocus) { + return resolve(); + } + + const x = window.scrollX; + const y = window.scrollY; + globalState.restoreFocusTimeout = setTimeout(() => { + focusPreviousActiveElement(); + resolve(); + }, RESTORE_FOCUS_TIMEOUT); // issues/900 + + window.scrollTo(x, y); + }); + }; + + /** + * If `timer` parameter is set, returns number of milliseconds of timer remained. + * Otherwise, returns undefined. + */ + + const getTimerLeft = () => { + return globalState.timeout && globalState.timeout.getTimerLeft(); + }; + /** + * Stop timer. Returns number of milliseconds of timer remained. + * If `timer` parameter isn't set, returns undefined. + */ + + const stopTimer = () => { + if (globalState.timeout) { + stopTimerProgressBar(); + return globalState.timeout.stop(); + } + }; + /** + * Resume timer. Returns number of milliseconds of timer remained. + * If `timer` parameter isn't set, returns undefined. + */ + + const resumeTimer = () => { + if (globalState.timeout) { + const remaining = globalState.timeout.start(); + animateTimerProgressBar(remaining); + return remaining; + } + }; + /** + * Resume timer. Returns number of milliseconds of timer remained. + * If `timer` parameter isn't set, returns undefined. + */ + + const toggleTimer = () => { + const timer = globalState.timeout; + return timer && (timer.running ? stopTimer() : resumeTimer()); + }; + /** + * Increase timer. Returns number of milliseconds of an updated timer. + * If `timer` parameter isn't set, returns undefined. + */ + + const increaseTimer = n => { + if (globalState.timeout) { + const remaining = globalState.timeout.increase(n); + animateTimerProgressBar(remaining, true); + return remaining; + } + }; + /** + * Check if timer is running. Returns true if timer is running + * or false if timer is paused or stopped. + * If `timer` parameter isn't set, returns undefined + */ + + const isTimerRunning = () => { + return globalState.timeout && globalState.timeout.isRunning(); + }; + + let bodyClickListenerAdded = false; + const clickHandlers = {}; + function bindClickHandler(attr = 'data-swal-template') { + clickHandlers[attr] = this; + + if (!bodyClickListenerAdded) { + document.body.addEventListener('click', bodyClickListener); + bodyClickListenerAdded = true; + } + } + + const bodyClickListener = event => { + // TODO: replace with event.composedPath() + for (let el = event.target; el && el !== document; el = el.parentNode) { + for (const attr in clickHandlers) { + const template = el.getAttribute(attr); + + if (template) { + clickHandlers[attr].fire({ + template + }); + return; + } + } + } + }; + + const defaultParams = { + title: '', + titleText: '', + text: '', + html: '', + footer: '', + icon: undefined, + iconColor: undefined, + iconHtml: undefined, + template: undefined, + toast: false, + showClass: { + popup: 'swal2-show', + backdrop: 'swal2-backdrop-show', + icon: 'swal2-icon-show' + }, + hideClass: { + popup: 'swal2-hide', + backdrop: 'swal2-backdrop-hide', + icon: 'swal2-icon-hide' + }, + customClass: {}, + target: 'body', + backdrop: true, + heightAuto: true, + allowOutsideClick: true, + allowEscapeKey: true, + allowEnterKey: true, + stopKeydownPropagation: true, + keydownListenerCapture: false, + showConfirmButton: true, + showDenyButton: false, + showCancelButton: false, + preConfirm: undefined, + preDeny: undefined, + confirmButtonText: 'OK', + confirmButtonAriaLabel: '', + confirmButtonColor: undefined, + denyButtonText: 'No', + denyButtonAriaLabel: '', + denyButtonColor: undefined, + cancelButtonText: 'Cancel', + cancelButtonAriaLabel: '', + cancelButtonColor: undefined, + buttonsStyling: true, + reverseButtons: false, + focusConfirm: true, + focusDeny: false, + focusCancel: false, + returnFocus: true, + showCloseButton: false, + closeButtonHtml: '×', + closeButtonAriaLabel: 'Close this dialog', + loaderHtml: '', + showLoaderOnConfirm: false, + showLoaderOnDeny: false, + imageUrl: undefined, + imageWidth: undefined, + imageHeight: undefined, + imageAlt: '', + timer: undefined, + timerProgressBar: false, + width: undefined, + padding: undefined, + background: undefined, + input: undefined, + inputPlaceholder: '', + inputLabel: '', + inputValue: '', + inputOptions: {}, + inputAutoTrim: true, + inputAttributes: {}, + inputValidator: undefined, + returnInputValueOnDeny: false, + validationMessage: undefined, + grow: false, + position: 'center', + progressSteps: [], + currentProgressStep: undefined, + progressStepsDistance: undefined, + willOpen: undefined, + didOpen: undefined, + didRender: undefined, + willClose: undefined, + didClose: undefined, + didDestroy: undefined, + scrollbarPadding: true + }; + const updatableParams = ['allowEscapeKey', 'allowOutsideClick', 'background', 'buttonsStyling', 'cancelButtonAriaLabel', 'cancelButtonColor', 'cancelButtonText', 'closeButtonAriaLabel', 'closeButtonHtml', 'confirmButtonAriaLabel', 'confirmButtonColor', 'confirmButtonText', 'currentProgressStep', 'customClass', 'denyButtonAriaLabel', 'denyButtonColor', 'denyButtonText', 'didClose', 'didDestroy', 'footer', 'hideClass', 'html', 'icon', 'iconColor', 'iconHtml', 'imageAlt', 'imageHeight', 'imageUrl', 'imageWidth', 'preConfirm', 'preDeny', 'progressSteps', 'returnFocus', 'reverseButtons', 'showCancelButton', 'showCloseButton', 'showConfirmButton', 'showDenyButton', 'text', 'title', 'titleText', 'willClose']; + const deprecatedParams = {}; + const toastIncompatibleParams = ['allowOutsideClick', 'allowEnterKey', 'backdrop', 'focusConfirm', 'focusDeny', 'focusCancel', 'returnFocus', 'heightAuto', 'keydownListenerCapture']; + /** + * Is valid parameter + * @param {String} paramName + */ + + const isValidParameter = paramName => { + return Object.prototype.hasOwnProperty.call(defaultParams, paramName); + }; + /** + * Is valid parameter for Swal.update() method + * @param {String} paramName + */ + + const isUpdatableParameter = paramName => { + return updatableParams.indexOf(paramName) !== -1; + }; + /** + * Is deprecated parameter + * @param {String} paramName + */ + + const isDeprecatedParameter = paramName => { + return deprecatedParams[paramName]; + }; + + const checkIfParamIsValid = param => { + if (!isValidParameter(param)) { + warn("Unknown parameter \"".concat(param, "\"")); + } + }; + + const checkIfToastParamIsValid = param => { + if (toastIncompatibleParams.includes(param)) { + warn("The parameter \"".concat(param, "\" is incompatible with toasts")); + } + }; + + const checkIfParamIsDeprecated = param => { + if (isDeprecatedParameter(param)) { + warnAboutDeprecation(param, isDeprecatedParameter(param)); + } + }; + /** + * Show relevant warnings for given params + * + * @param params + */ + + + const showWarningsForParams = params => { + if (!params.backdrop && params.allowOutsideClick) { + warn('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`'); + } + + for (const param in params) { + checkIfParamIsValid(param); + + if (params.toast) { + checkIfToastParamIsValid(param); + } + + checkIfParamIsDeprecated(param); + } + }; + + + + var staticMethods = /*#__PURE__*/Object.freeze({ + isValidParameter: isValidParameter, + isUpdatableParameter: isUpdatableParameter, + isDeprecatedParameter: isDeprecatedParameter, + argsToParams: argsToParams, + isVisible: isVisible$1, + clickConfirm: clickConfirm, + clickDeny: clickDeny, + clickCancel: clickCancel, + getContainer: getContainer, + getPopup: getPopup, + getTitle: getTitle, + getHtmlContainer: getHtmlContainer, + getImage: getImage, + getIcon: getIcon, + getInputLabel: getInputLabel, + getCloseButton: getCloseButton, + getActions: getActions, + getConfirmButton: getConfirmButton, + getDenyButton: getDenyButton, + getCancelButton: getCancelButton, + getLoader: getLoader, + getFooter: getFooter, + getTimerProgressBar: getTimerProgressBar, + getFocusableElements: getFocusableElements, + getValidationMessage: getValidationMessage, + isLoading: isLoading, + fire: fire, + mixin: mixin, + showLoading: showLoading, + enableLoading: showLoading, + getTimerLeft: getTimerLeft, + stopTimer: stopTimer, + resumeTimer: resumeTimer, + toggleTimer: toggleTimer, + increaseTimer: increaseTimer, + isTimerRunning: isTimerRunning, + bindClickHandler: bindClickHandler + }); + + /** + * Hides loader and shows back the button which was hidden by .showLoading() + */ + + function hideLoading() { + // do nothing if popup is closed + const innerParams = privateProps.innerParams.get(this); + + if (!innerParams) { + return; + } + + const domCache = privateProps.domCache.get(this); + hide(domCache.loader); + + if (isToast()) { + if (innerParams.icon) { + show(getIcon()); + } + } else { + showRelatedButton(domCache); + } + + removeClass([domCache.popup, domCache.actions], swalClasses.loading); + domCache.popup.removeAttribute('aria-busy'); + domCache.popup.removeAttribute('data-loading'); + domCache.confirmButton.disabled = false; + domCache.denyButton.disabled = false; + domCache.cancelButton.disabled = false; + } + + const showRelatedButton = domCache => { + const buttonToReplace = domCache.popup.getElementsByClassName(domCache.loader.getAttribute('data-button-to-replace')); + + if (buttonToReplace.length) { + show(buttonToReplace[0], 'inline-block'); + } else if (allButtonsAreHidden()) { + hide(domCache.actions); + } + }; + + function getInput$1(instance) { + const innerParams = privateProps.innerParams.get(instance || this); + const domCache = privateProps.domCache.get(instance || this); + + if (!domCache) { + return null; + } + + return getInput(domCache.popup, innerParams.input); + } + + const fixScrollbar = () => { + // for queues, do not do this more than once + if (states.previousBodyPadding !== null) { + return; + } // if the body has overflow + + + if (document.body.scrollHeight > window.innerHeight) { + // add padding so the content doesn't shift after removal of scrollbar + states.previousBodyPadding = parseInt(window.getComputedStyle(document.body).getPropertyValue('padding-right')); + document.body.style.paddingRight = "".concat(states.previousBodyPadding + measureScrollbar(), "px"); + } + }; + const undoScrollbar = () => { + if (states.previousBodyPadding !== null) { + document.body.style.paddingRight = "".concat(states.previousBodyPadding, "px"); + states.previousBodyPadding = null; + } + }; + + /* istanbul ignore file */ + + const iOSfix = () => { + const iOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream || navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1; + + if (iOS && !hasClass(document.body, swalClasses.iosfix)) { + const offset = document.body.scrollTop; + document.body.style.top = "".concat(offset * -1, "px"); + addClass(document.body, swalClasses.iosfix); + lockBodyScroll(); + addBottomPaddingForTallPopups(); // #1948 + } + }; + + const addBottomPaddingForTallPopups = () => { + const safari = !navigator.userAgent.match(/(CriOS|FxiOS|EdgiOS|YaBrowser|UCBrowser)/i); + + if (safari) { + const bottomPanelHeight = 44; + + if (getPopup().scrollHeight > window.innerHeight - bottomPanelHeight) { + getContainer().style.paddingBottom = "".concat(bottomPanelHeight, "px"); + } + } + }; + + const lockBodyScroll = () => { + // #1246 + const container = getContainer(); + let preventTouchMove; + + container.ontouchstart = e => { + preventTouchMove = shouldPreventTouchMove(e); + }; + + container.ontouchmove = e => { + if (preventTouchMove) { + e.preventDefault(); + e.stopPropagation(); + } + }; + }; + + const shouldPreventTouchMove = event => { + const target = event.target; + const container = getContainer(); + + if (isStylys(event) || isZoom(event)) { + return false; + } + + if (target === container) { + return true; + } + + if (!isScrollable(container) && target.tagName !== 'INPUT' && // #1603 + target.tagName !== 'TEXTAREA' && // #2266 + !(isScrollable(getHtmlContainer()) && // #1944 + getHtmlContainer().contains(target))) { + return true; + } + + return false; + }; + + const isStylys = event => { + // #1786 + return event.touches && event.touches.length && event.touches[0].touchType === 'stylus'; + }; + + const isZoom = event => { + // #1891 + return event.touches && event.touches.length > 1; + }; + + const undoIOSfix = () => { + if (hasClass(document.body, swalClasses.iosfix)) { + const offset = parseInt(document.body.style.top, 10); + removeClass(document.body, swalClasses.iosfix); + document.body.style.top = ''; + document.body.scrollTop = offset * -1; + } + }; + + // Adding aria-hidden="true" to elements outside of the active modal dialog ensures that + // elements not within the active modal dialog will not be surfaced if a user opens a screen + // reader’s list of elements (headings, form controls, landmarks, etc.) in the document. + + const setAriaHidden = () => { + const bodyChildren = toArray(document.body.children); + bodyChildren.forEach(el => { + if (el === getContainer() || el.contains(getContainer())) { + return; + } + + if (el.hasAttribute('aria-hidden')) { + el.setAttribute('data-previous-aria-hidden', el.getAttribute('aria-hidden')); + } + + el.setAttribute('aria-hidden', 'true'); + }); + }; + const unsetAriaHidden = () => { + const bodyChildren = toArray(document.body.children); + bodyChildren.forEach(el => { + if (el.hasAttribute('data-previous-aria-hidden')) { + el.setAttribute('aria-hidden', el.getAttribute('data-previous-aria-hidden')); + el.removeAttribute('data-previous-aria-hidden'); + } else { + el.removeAttribute('aria-hidden'); + } + }); + }; + + /** + * This module containts `WeakMap`s for each effectively-"private property" that a `Swal` has. + * For example, to set the private property "foo" of `this` to "bar", you can `privateProps.foo.set(this, 'bar')` + * This is the approach that Babel will probably take to implement private methods/fields + * https://github.com/tc39/proposal-private-methods + * https://github.com/babel/babel/pull/7555 + * Once we have the changes from that PR in Babel, and our core class fits reasonable in *one module* + * then we can use that language feature. + */ + var privateMethods = { + swalPromiseResolve: new WeakMap() + }; + + /* + * Instance method to close sweetAlert + */ + + function removePopupAndResetState(instance, container, returnFocus, didClose) { + if (isToast()) { + triggerDidCloseAndDispose(instance, didClose); + } else { + restoreActiveElement(returnFocus).then(() => triggerDidCloseAndDispose(instance, didClose)); + globalState.keydownTarget.removeEventListener('keydown', globalState.keydownHandler, { + capture: globalState.keydownListenerCapture + }); + globalState.keydownHandlerAdded = false; + } + + const isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent); // workaround for #2088 + // for some reason removing the container in Safari will scroll the document to bottom + + if (isSafari) { + container.setAttribute('style', 'display:none !important'); + container.removeAttribute('class'); + container.innerHTML = ''; + } else { + container.remove(); + } + + if (isModal()) { + undoScrollbar(); + undoIOSfix(); + unsetAriaHidden(); + } + + removeBodyClasses(); + } + + function removeBodyClasses() { + removeClass([document.documentElement, document.body], [swalClasses.shown, swalClasses['height-auto'], swalClasses['no-backdrop'], swalClasses['toast-shown']]); + } + + function close(resolveValue) { + const popup = getPopup(); + + if (!popup) { + return; + } + + resolveValue = prepareResolveValue(resolveValue); + const innerParams = privateProps.innerParams.get(this); + + if (!innerParams || hasClass(popup, innerParams.hideClass.popup)) { + return; + } + + const swalPromiseResolve = privateMethods.swalPromiseResolve.get(this); + removeClass(popup, innerParams.showClass.popup); + addClass(popup, innerParams.hideClass.popup); + const backdrop = getContainer(); + removeClass(backdrop, innerParams.showClass.backdrop); + addClass(backdrop, innerParams.hideClass.backdrop); + handlePopupAnimation(this, popup, innerParams); // Resolve Swal promise + + swalPromiseResolve(resolveValue); + } + + const prepareResolveValue = resolveValue => { + // When user calls Swal.close() + if (typeof resolveValue === 'undefined') { + return { + isConfirmed: false, + isDenied: false, + isDismissed: true + }; + } + + return Object.assign({ + isConfirmed: false, + isDenied: false, + isDismissed: false + }, resolveValue); + }; + + const handlePopupAnimation = (instance, popup, innerParams) => { + const container = getContainer(); // If animation is supported, animate + + const animationIsSupported = animationEndEvent && hasCssAnimation(popup); + + if (typeof innerParams.willClose === 'function') { + innerParams.willClose(popup); + } + + if (animationIsSupported) { + animatePopup(instance, popup, container, innerParams.returnFocus, innerParams.didClose); + } else { + // Otherwise, remove immediately + removePopupAndResetState(instance, container, innerParams.returnFocus, innerParams.didClose); + } + }; + + const animatePopup = (instance, popup, container, returnFocus, didClose) => { + globalState.swalCloseEventFinishedCallback = removePopupAndResetState.bind(null, instance, container, returnFocus, didClose); + popup.addEventListener(animationEndEvent, function (e) { + if (e.target === popup) { + globalState.swalCloseEventFinishedCallback(); + delete globalState.swalCloseEventFinishedCallback; + } + }); + }; + + const triggerDidCloseAndDispose = (instance, didClose) => { + setTimeout(() => { + if (typeof didClose === 'function') { + didClose.bind(instance.params)(); + } + + instance._destroy(); + }); + }; + + function setButtonsDisabled(instance, buttons, disabled) { + const domCache = privateProps.domCache.get(instance); + buttons.forEach(button => { + domCache[button].disabled = disabled; + }); + } + + function setInputDisabled(input, disabled) { + if (!input) { + return false; + } + + if (input.type === 'radio') { + const radiosContainer = input.parentNode.parentNode; + const radios = radiosContainer.querySelectorAll('input'); + + for (let i = 0; i < radios.length; i++) { + radios[i].disabled = disabled; + } + } else { + input.disabled = disabled; + } + } + + function enableButtons() { + setButtonsDisabled(this, ['confirmButton', 'denyButton', 'cancelButton'], false); + } + function disableButtons() { + setButtonsDisabled(this, ['confirmButton', 'denyButton', 'cancelButton'], true); + } + function enableInput() { + return setInputDisabled(this.getInput(), false); + } + function disableInput() { + return setInputDisabled(this.getInput(), true); + } + + function showValidationMessage(error) { + const domCache = privateProps.domCache.get(this); + const params = privateProps.innerParams.get(this); + setInnerHtml(domCache.validationMessage, error); + domCache.validationMessage.className = swalClasses['validation-message']; + + if (params.customClass && params.customClass.validationMessage) { + addClass(domCache.validationMessage, params.customClass.validationMessage); + } + + show(domCache.validationMessage); + const input = this.getInput(); + + if (input) { + input.setAttribute('aria-invalid', true); + input.setAttribute('aria-describedby', swalClasses['validation-message']); + focusInput(input); + addClass(input, swalClasses.inputerror); + } + } // Hide block with validation message + + function resetValidationMessage$1() { + const domCache = privateProps.domCache.get(this); + + if (domCache.validationMessage) { + hide(domCache.validationMessage); + } + + const input = this.getInput(); + + if (input) { + input.removeAttribute('aria-invalid'); + input.removeAttribute('aria-describedby'); + removeClass(input, swalClasses.inputerror); + } + } + + function getProgressSteps$1() { + const domCache = privateProps.domCache.get(this); + return domCache.progressSteps; + } + + class Timer { + constructor(callback, delay) { + this.callback = callback; + this.remaining = delay; + this.running = false; + this.start(); + } + + start() { + if (!this.running) { + this.running = true; + this.started = new Date(); + this.id = setTimeout(this.callback, this.remaining); + } + + return this.remaining; + } + + stop() { + if (this.running) { + this.running = false; + clearTimeout(this.id); + this.remaining -= new Date() - this.started; + } + + return this.remaining; + } + + increase(n) { + const running = this.running; + + if (running) { + this.stop(); + } + + this.remaining += n; + + if (running) { + this.start(); + } + + return this.remaining; + } + + getTimerLeft() { + if (this.running) { + this.stop(); + this.start(); + } + + return this.remaining; + } + + isRunning() { + return this.running; + } + + } + + var defaultInputValidators = { + email: (string, validationMessage) => { + return /^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]{2,24}$/.test(string) ? Promise.resolve() : Promise.resolve(validationMessage || 'Invalid email address'); + }, + url: (string, validationMessage) => { + // taken from https://stackoverflow.com/a/3809435 with a small change from #1306 and #2013 + return /^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(string) ? Promise.resolve() : Promise.resolve(validationMessage || 'Invalid URL'); + } + }; + + function setDefaultInputValidators(params) { + // Use default `inputValidator` for supported input types if not provided + if (!params.inputValidator) { + Object.keys(defaultInputValidators).forEach(key => { + if (params.input === key) { + params.inputValidator = defaultInputValidators[key]; + } + }); + } + } + + function validateCustomTargetElement(params) { + // Determine if the custom target element is valid + if (!params.target || typeof params.target === 'string' && !document.querySelector(params.target) || typeof params.target !== 'string' && !params.target.appendChild) { + warn('Target parameter is not valid, defaulting to "body"'); + params.target = 'body'; + } + } + /** + * Set type, text and actions on popup + * + * @param params + * @returns {boolean} + */ + + + function setParameters(params) { + setDefaultInputValidators(params); // showLoaderOnConfirm && preConfirm + + if (params.showLoaderOnConfirm && !params.preConfirm) { + warn('showLoaderOnConfirm is set to true, but preConfirm is not defined.\n' + 'showLoaderOnConfirm should be used together with preConfirm, see usage example:\n' + 'https://sweetalert2.github.io/#ajax-request'); + } + + validateCustomTargetElement(params); // Replace newlines with
                    in title + + if (typeof params.title === 'string') { + params.title = params.title.split('\n').join('
                    '); + } + + init(params); + } + + const swalStringParams = ['swal-title', 'swal-html', 'swal-footer']; + const getTemplateParams = params => { + const template = typeof params.template === 'string' ? document.querySelector(params.template) : params.template; + + if (!template) { + return {}; + } + + const templateContent = template.content; + showWarningsForElements(templateContent); + const result = Object.assign(getSwalParams(templateContent), getSwalButtons(templateContent), getSwalImage(templateContent), getSwalIcon(templateContent), getSwalInput(templateContent), getSwalStringParams(templateContent, swalStringParams)); + return result; + }; + + const getSwalParams = templateContent => { + const result = {}; + toArray(templateContent.querySelectorAll('swal-param')).forEach(param => { + showWarningsForAttributes(param, ['name', 'value']); + const paramName = param.getAttribute('name'); + let value = param.getAttribute('value'); + + if (typeof defaultParams[paramName] === 'boolean' && value === 'false') { + value = false; + } + + if (typeof defaultParams[paramName] === 'object') { + value = JSON.parse(value); + } + + result[paramName] = value; + }); + return result; + }; + + const getSwalButtons = templateContent => { + const result = {}; + toArray(templateContent.querySelectorAll('swal-button')).forEach(button => { + showWarningsForAttributes(button, ['type', 'color', 'aria-label']); + const type = button.getAttribute('type'); + result["".concat(type, "ButtonText")] = button.innerHTML; + result["show".concat(capitalizeFirstLetter(type), "Button")] = true; + + if (button.hasAttribute('color')) { + result["".concat(type, "ButtonColor")] = button.getAttribute('color'); + } + + if (button.hasAttribute('aria-label')) { + result["".concat(type, "ButtonAriaLabel")] = button.getAttribute('aria-label'); + } + }); + return result; + }; + + const getSwalImage = templateContent => { + const result = {}; + const image = templateContent.querySelector('swal-image'); + + if (image) { + showWarningsForAttributes(image, ['src', 'width', 'height', 'alt']); + + if (image.hasAttribute('src')) { + result.imageUrl = image.getAttribute('src'); + } + + if (image.hasAttribute('width')) { + result.imageWidth = image.getAttribute('width'); + } + + if (image.hasAttribute('height')) { + result.imageHeight = image.getAttribute('height'); + } + + if (image.hasAttribute('alt')) { + result.imageAlt = image.getAttribute('alt'); + } + } + + return result; + }; + + const getSwalIcon = templateContent => { + const result = {}; + const icon = templateContent.querySelector('swal-icon'); + + if (icon) { + showWarningsForAttributes(icon, ['type', 'color']); + + if (icon.hasAttribute('type')) { + result.icon = icon.getAttribute('type'); + } + + if (icon.hasAttribute('color')) { + result.iconColor = icon.getAttribute('color'); + } + + result.iconHtml = icon.innerHTML; + } + + return result; + }; + + const getSwalInput = templateContent => { + const result = {}; + const input = templateContent.querySelector('swal-input'); + + if (input) { + showWarningsForAttributes(input, ['type', 'label', 'placeholder', 'value']); + result.input = input.getAttribute('type') || 'text'; + + if (input.hasAttribute('label')) { + result.inputLabel = input.getAttribute('label'); + } + + if (input.hasAttribute('placeholder')) { + result.inputPlaceholder = input.getAttribute('placeholder'); + } + + if (input.hasAttribute('value')) { + result.inputValue = input.getAttribute('value'); + } + } + + const inputOptions = templateContent.querySelectorAll('swal-input-option'); + + if (inputOptions.length) { + result.inputOptions = {}; + toArray(inputOptions).forEach(option => { + showWarningsForAttributes(option, ['value']); + const optionValue = option.getAttribute('value'); + const optionName = option.innerHTML; + result.inputOptions[optionValue] = optionName; + }); + } + + return result; + }; + + const getSwalStringParams = (templateContent, paramNames) => { + const result = {}; + + for (const i in paramNames) { + const paramName = paramNames[i]; + const tag = templateContent.querySelector(paramName); + + if (tag) { + showWarningsForAttributes(tag, []); + result[paramName.replace(/^swal-/, '')] = tag.innerHTML.trim(); + } + } + + return result; + }; + + const showWarningsForElements = template => { + const allowedElements = swalStringParams.concat(['swal-param', 'swal-button', 'swal-image', 'swal-icon', 'swal-input', 'swal-input-option']); + toArray(template.children).forEach(el => { + const tagName = el.tagName.toLowerCase(); + + if (allowedElements.indexOf(tagName) === -1) { + warn("Unrecognized element <".concat(tagName, ">")); + } + }); + }; + + const showWarningsForAttributes = (el, allowedAttributes) => { + toArray(el.attributes).forEach(attribute => { + if (allowedAttributes.indexOf(attribute.name) === -1) { + warn(["Unrecognized attribute \"".concat(attribute.name, "\" on <").concat(el.tagName.toLowerCase(), ">."), "".concat(allowedAttributes.length ? "Allowed attributes are: ".concat(allowedAttributes.join(', ')) : 'To set the value, use HTML within the element.')]); + } + }); + }; + + const SHOW_CLASS_TIMEOUT = 10; + /** + * Open popup, add necessary classes and styles, fix scrollbar + * + * @param params + */ + + const openPopup = params => { + const container = getContainer(); + const popup = getPopup(); + + if (typeof params.willOpen === 'function') { + params.willOpen(popup); + } + + const bodyStyles = window.getComputedStyle(document.body); + const initialBodyOverflow = bodyStyles.overflowY; + addClasses$1(container, popup, params); // scrolling is 'hidden' until animation is done, after that 'auto' + + setTimeout(() => { + setScrollingVisibility(container, popup); + }, SHOW_CLASS_TIMEOUT); + + if (isModal()) { + fixScrollContainer(container, params.scrollbarPadding, initialBodyOverflow); + setAriaHidden(); + } + + if (!isToast() && !globalState.previousActiveElement) { + globalState.previousActiveElement = document.activeElement; + } + + if (typeof params.didOpen === 'function') { + setTimeout(() => params.didOpen(popup)); + } + + removeClass(container, swalClasses['no-transition']); + }; + + const swalOpenAnimationFinished = event => { + const popup = getPopup(); + + if (event.target !== popup) { + return; + } + + const container = getContainer(); + popup.removeEventListener(animationEndEvent, swalOpenAnimationFinished); + container.style.overflowY = 'auto'; + }; + + const setScrollingVisibility = (container, popup) => { + if (animationEndEvent && hasCssAnimation(popup)) { + container.style.overflowY = 'hidden'; + popup.addEventListener(animationEndEvent, swalOpenAnimationFinished); + } else { + container.style.overflowY = 'auto'; + } + }; + + const fixScrollContainer = (container, scrollbarPadding, initialBodyOverflow) => { + iOSfix(); + + if (scrollbarPadding && initialBodyOverflow !== 'hidden') { + fixScrollbar(); + } // sweetalert2/issues/1247 + + + setTimeout(() => { + container.scrollTop = 0; + }); + }; + + const addClasses$1 = (container, popup, params) => { + addClass(container, params.showClass.backdrop); // the workaround with setting/unsetting opacity is needed for #2019 and 2059 + + popup.style.setProperty('opacity', '0', 'important'); + show(popup, 'grid'); + setTimeout(() => { + // Animate popup right after showing it + addClass(popup, params.showClass.popup); // and remove the opacity workaround + + popup.style.removeProperty('opacity'); + }, SHOW_CLASS_TIMEOUT); // 10ms in order to fix #2062 + + addClass([document.documentElement, document.body], swalClasses.shown); + + if (params.heightAuto && params.backdrop && !params.toast) { + addClass([document.documentElement, document.body], swalClasses['height-auto']); + } + }; + + const handleInputOptionsAndValue = (instance, params) => { + if (params.input === 'select' || params.input === 'radio') { + handleInputOptions(instance, params); + } else if (['text', 'email', 'number', 'tel', 'textarea'].includes(params.input) && (hasToPromiseFn(params.inputValue) || isPromise(params.inputValue))) { + showLoading(getConfirmButton()); + handleInputValue(instance, params); + } + }; + const getInputValue = (instance, innerParams) => { + const input = instance.getInput(); + + if (!input) { + return null; + } + + switch (innerParams.input) { + case 'checkbox': + return getCheckboxValue(input); + + case 'radio': + return getRadioValue(input); + + case 'file': + return getFileValue(input); + + default: + return innerParams.inputAutoTrim ? input.value.trim() : input.value; + } + }; + + const getCheckboxValue = input => input.checked ? 1 : 0; + + const getRadioValue = input => input.checked ? input.value : null; + + const getFileValue = input => input.files.length ? input.getAttribute('multiple') !== null ? input.files : input.files[0] : null; + + const handleInputOptions = (instance, params) => { + const popup = getPopup(); + + const processInputOptions = inputOptions => populateInputOptions[params.input](popup, formatInputOptions(inputOptions), params); + + if (hasToPromiseFn(params.inputOptions) || isPromise(params.inputOptions)) { + showLoading(getConfirmButton()); + asPromise(params.inputOptions).then(inputOptions => { + instance.hideLoading(); + processInputOptions(inputOptions); + }); + } else if (typeof params.inputOptions === 'object') { + processInputOptions(params.inputOptions); + } else { + error("Unexpected type of inputOptions! Expected object, Map or Promise, got ".concat(typeof params.inputOptions)); + } + }; + + const handleInputValue = (instance, params) => { + const input = instance.getInput(); + hide(input); + asPromise(params.inputValue).then(inputValue => { + input.value = params.input === 'number' ? parseFloat(inputValue) || 0 : "".concat(inputValue); + show(input); + input.focus(); + instance.hideLoading(); + }).catch(err => { + error("Error in inputValue promise: ".concat(err)); + input.value = ''; + show(input); + input.focus(); + instance.hideLoading(); + }); + }; + + const populateInputOptions = { + select: (popup, inputOptions, params) => { + const select = getChildByClass(popup, swalClasses.select); + + const renderOption = (parent, optionLabel, optionValue) => { + const option = document.createElement('option'); + option.value = optionValue; + setInnerHtml(option, optionLabel); + option.selected = isSelected(optionValue, params.inputValue); + parent.appendChild(option); + }; + + inputOptions.forEach(inputOption => { + const optionValue = inputOption[0]; + const optionLabel = inputOption[1]; // spec: + // https://www.w3.org/TR/html401/interact/forms.html#h-17.6 + // "...all OPTGROUP elements must be specified directly within a SELECT element (i.e., groups may not be nested)..." + // check whether this is a + + if (Array.isArray(optionLabel)) { + // if it is an array, then it is an + const optgroup = document.createElement('optgroup'); + optgroup.label = optionValue; + optgroup.disabled = false; // not configurable for now + + select.appendChild(optgroup); + optionLabel.forEach(o => renderOption(optgroup, o[1], o[0])); + } else { + // case of + valueFormatted = formatInputOptions(valueFormatted); + } + + result.push([key, valueFormatted]); + }); + } else { + Object.keys(inputOptions).forEach(key => { + let valueFormatted = inputOptions[key]; + + if (typeof valueFormatted === 'object') { + // case of + valueFormatted = formatInputOptions(valueFormatted); + } + + result.push([key, valueFormatted]); + }); + } + + return result; + }; + + const isSelected = (optionValue, inputValue) => { + return inputValue && inputValue.toString() === optionValue.toString(); + }; + + const handleConfirmButtonClick = instance => { + const innerParams = privateProps.innerParams.get(instance); + instance.disableButtons(); + + if (innerParams.input) { + handleConfirmOrDenyWithInput(instance, 'confirm'); + } else { + confirm(instance, true); + } + }; + const handleDenyButtonClick = instance => { + const innerParams = privateProps.innerParams.get(instance); + instance.disableButtons(); + + if (innerParams.returnInputValueOnDeny) { + handleConfirmOrDenyWithInput(instance, 'deny'); + } else { + deny(instance, false); + } + }; + const handleCancelButtonClick = (instance, dismissWith) => { + instance.disableButtons(); + dismissWith(DismissReason.cancel); + }; + + const handleConfirmOrDenyWithInput = (instance, type + /* 'confirm' | 'deny' */ + ) => { + const innerParams = privateProps.innerParams.get(instance); + const inputValue = getInputValue(instance, innerParams); + + if (innerParams.inputValidator) { + handleInputValidator(instance, inputValue, type); + } else if (!instance.getInput().checkValidity()) { + instance.enableButtons(); + instance.showValidationMessage(innerParams.validationMessage); + } else if (type === 'deny') { + deny(instance, inputValue); + } else { + confirm(instance, inputValue); + } + }; + + const handleInputValidator = (instance, inputValue, type + /* 'confirm' | 'deny' */ + ) => { + const innerParams = privateProps.innerParams.get(instance); + instance.disableInput(); + const validationPromise = Promise.resolve().then(() => asPromise(innerParams.inputValidator(inputValue, innerParams.validationMessage))); + validationPromise.then(validationMessage => { + instance.enableButtons(); + instance.enableInput(); + + if (validationMessage) { + instance.showValidationMessage(validationMessage); + } else if (type === 'deny') { + deny(instance, inputValue); + } else { + confirm(instance, inputValue); + } + }); + }; + + const deny = (instance, value) => { + const innerParams = privateProps.innerParams.get(instance || undefined); + + if (innerParams.showLoaderOnDeny) { + showLoading(getDenyButton()); + } + + if (innerParams.preDeny) { + const preDenyPromise = Promise.resolve().then(() => asPromise(innerParams.preDeny(value, innerParams.validationMessage))); + preDenyPromise.then(preDenyValue => { + if (preDenyValue === false) { + instance.hideLoading(); + } else { + instance.closePopup({ + isDenied: true, + value: typeof preDenyValue === 'undefined' ? value : preDenyValue + }); + } + }); + } else { + instance.closePopup({ + isDenied: true, + value + }); + } + }; + + const succeedWith = (instance, value) => { + instance.closePopup({ + isConfirmed: true, + value + }); + }; + + const confirm = (instance, value) => { + const innerParams = privateProps.innerParams.get(instance || undefined); + + if (innerParams.showLoaderOnConfirm) { + showLoading(); // TODO: make showLoading an *instance* method + } + + if (innerParams.preConfirm) { + instance.resetValidationMessage(); + const preConfirmPromise = Promise.resolve().then(() => asPromise(innerParams.preConfirm(value, innerParams.validationMessage))); + preConfirmPromise.then(preConfirmValue => { + if (isVisible(getValidationMessage()) || preConfirmValue === false) { + instance.hideLoading(); + } else { + succeedWith(instance, typeof preConfirmValue === 'undefined' ? value : preConfirmValue); + } + }); + } else { + succeedWith(instance, value); + } + }; + + const addKeydownHandler = (instance, globalState, innerParams, dismissWith) => { + if (globalState.keydownTarget && globalState.keydownHandlerAdded) { + globalState.keydownTarget.removeEventListener('keydown', globalState.keydownHandler, { + capture: globalState.keydownListenerCapture + }); + globalState.keydownHandlerAdded = false; + } + + if (!innerParams.toast) { + globalState.keydownHandler = e => keydownHandler(instance, e, dismissWith); + + globalState.keydownTarget = innerParams.keydownListenerCapture ? window : getPopup(); + globalState.keydownListenerCapture = innerParams.keydownListenerCapture; + globalState.keydownTarget.addEventListener('keydown', globalState.keydownHandler, { + capture: globalState.keydownListenerCapture + }); + globalState.keydownHandlerAdded = true; + } + }; // Focus handling + + const setFocus = (innerParams, index, increment) => { + const focusableElements = getFocusableElements(); // search for visible elements and select the next possible match + + if (focusableElements.length) { + index = index + increment; // rollover to first item + + if (index === focusableElements.length) { + index = 0; // go to last item + } else if (index === -1) { + index = focusableElements.length - 1; + } + + return focusableElements[index].focus(); + } // no visible focusable elements, focus the popup + + + getPopup().focus(); + }; + const arrowKeysNextButton = ['ArrowRight', 'ArrowDown']; + const arrowKeysPreviousButton = ['ArrowLeft', 'ArrowUp']; + + const keydownHandler = (instance, e, dismissWith) => { + const innerParams = privateProps.innerParams.get(instance); + + if (!innerParams) { + return; // This instance has already been destroyed + } + + if (innerParams.stopKeydownPropagation) { + e.stopPropagation(); + } // ENTER + + + if (e.key === 'Enter') { + handleEnter(instance, e, innerParams); // TAB + } else if (e.key === 'Tab') { + handleTab(e, innerParams); // ARROWS - switch focus between buttons + } else if ([...arrowKeysNextButton, ...arrowKeysPreviousButton].includes(e.key)) { + handleArrows(e.key); // ESC + } else if (e.key === 'Escape') { + handleEsc(e, innerParams, dismissWith); + } + }; + + const handleEnter = (instance, e, innerParams) => { + // #720 #721 + if (e.isComposing) { + return; + } + + if (e.target && instance.getInput() && e.target.outerHTML === instance.getInput().outerHTML) { + if (['textarea', 'file'].includes(innerParams.input)) { + return; // do not submit + } + + clickConfirm(); + e.preventDefault(); + } + }; + + const handleTab = (e, innerParams) => { + const targetElement = e.target; + const focusableElements = getFocusableElements(); + let btnIndex = -1; + + for (let i = 0; i < focusableElements.length; i++) { + if (targetElement === focusableElements[i]) { + btnIndex = i; + break; + } + } + + if (!e.shiftKey) { + // Cycle to the next button + setFocus(innerParams, btnIndex, 1); + } else { + // Cycle to the prev button + setFocus(innerParams, btnIndex, -1); + } + + e.stopPropagation(); + e.preventDefault(); + }; + + const handleArrows = key => { + const confirmButton = getConfirmButton(); + const denyButton = getDenyButton(); + const cancelButton = getCancelButton(); + + if (![confirmButton, denyButton, cancelButton].includes(document.activeElement)) { + return; + } + + const sibling = arrowKeysNextButton.includes(key) ? 'nextElementSibling' : 'previousElementSibling'; + const buttonToFocus = document.activeElement[sibling]; + + if (buttonToFocus) { + buttonToFocus.focus(); + } + }; + + const handleEsc = (e, innerParams, dismissWith) => { + if (callIfFunction(innerParams.allowEscapeKey)) { + e.preventDefault(); + dismissWith(DismissReason.esc); + } + }; + + const handlePopupClick = (instance, domCache, dismissWith) => { + const innerParams = privateProps.innerParams.get(instance); + + if (innerParams.toast) { + handleToastClick(instance, domCache, dismissWith); + } else { + // Ignore click events that had mousedown on the popup but mouseup on the container + // This can happen when the user drags a slider + handleModalMousedown(domCache); // Ignore click events that had mousedown on the container but mouseup on the popup + + handleContainerMousedown(domCache); + handleModalClick(instance, domCache, dismissWith); + } + }; + + const handleToastClick = (instance, domCache, dismissWith) => { + // Closing toast by internal click + domCache.popup.onclick = () => { + const innerParams = privateProps.innerParams.get(instance); + + if (innerParams.showConfirmButton || innerParams.showDenyButton || innerParams.showCancelButton || innerParams.showCloseButton || innerParams.timer || innerParams.input) { + return; + } + + dismissWith(DismissReason.close); + }; + }; + + let ignoreOutsideClick = false; + + const handleModalMousedown = domCache => { + domCache.popup.onmousedown = () => { + domCache.container.onmouseup = function (e) { + domCache.container.onmouseup = undefined; // We only check if the mouseup target is the container because usually it doesn't + // have any other direct children aside of the popup + + if (e.target === domCache.container) { + ignoreOutsideClick = true; + } + }; + }; + }; + + const handleContainerMousedown = domCache => { + domCache.container.onmousedown = () => { + domCache.popup.onmouseup = function (e) { + domCache.popup.onmouseup = undefined; // We also need to check if the mouseup target is a child of the popup + + if (e.target === domCache.popup || domCache.popup.contains(e.target)) { + ignoreOutsideClick = true; + } + }; + }; + }; + + const handleModalClick = (instance, domCache, dismissWith) => { + domCache.container.onclick = e => { + const innerParams = privateProps.innerParams.get(instance); + + if (ignoreOutsideClick) { + ignoreOutsideClick = false; + return; + } + + if (e.target === domCache.container && callIfFunction(innerParams.allowOutsideClick)) { + dismissWith(DismissReason.backdrop); + } + }; + }; + + function _main(userParams, mixinParams = {}) { + showWarningsForParams(Object.assign({}, mixinParams, userParams)); + + if (globalState.currentInstance) { + globalState.currentInstance._destroy(); + + if (isModal()) { + unsetAriaHidden(); + } + } + + globalState.currentInstance = this; + const innerParams = prepareParams(userParams, mixinParams); + setParameters(innerParams); + Object.freeze(innerParams); // clear the previous timer + + if (globalState.timeout) { + globalState.timeout.stop(); + delete globalState.timeout; + } // clear the restore focus timeout + + + clearTimeout(globalState.restoreFocusTimeout); + const domCache = populateDomCache(this); + render(this, innerParams); + privateProps.innerParams.set(this, innerParams); + return swalPromise(this, domCache, innerParams); + } + + const prepareParams = (userParams, mixinParams) => { + const templateParams = getTemplateParams(userParams); + const params = Object.assign({}, defaultParams, mixinParams, templateParams, userParams); // precedence is described in #2131 + + params.showClass = Object.assign({}, defaultParams.showClass, params.showClass); + params.hideClass = Object.assign({}, defaultParams.hideClass, params.hideClass); + return params; + }; + + const swalPromise = (instance, domCache, innerParams) => { + return new Promise(resolve => { + // functions to handle all closings/dismissals + const dismissWith = dismiss => { + instance.closePopup({ + isDismissed: true, + dismiss + }); + }; + + privateMethods.swalPromiseResolve.set(instance, resolve); + + domCache.confirmButton.onclick = () => handleConfirmButtonClick(instance); + + domCache.denyButton.onclick = () => handleDenyButtonClick(instance); + + domCache.cancelButton.onclick = () => handleCancelButtonClick(instance, dismissWith); + + domCache.closeButton.onclick = () => dismissWith(DismissReason.close); + + handlePopupClick(instance, domCache, dismissWith); + addKeydownHandler(instance, globalState, innerParams, dismissWith); + handleInputOptionsAndValue(instance, innerParams); + openPopup(innerParams); + setupTimer(globalState, innerParams, dismissWith); + initFocus(domCache, innerParams); // Scroll container to top on open (#1247, #1946) + + setTimeout(() => { + domCache.container.scrollTop = 0; + }); + }); + }; + + const populateDomCache = instance => { + const domCache = { + popup: getPopup(), + container: getContainer(), + actions: getActions(), + confirmButton: getConfirmButton(), + denyButton: getDenyButton(), + cancelButton: getCancelButton(), + loader: getLoader(), + closeButton: getCloseButton(), + validationMessage: getValidationMessage(), + progressSteps: getProgressSteps() + }; + privateProps.domCache.set(instance, domCache); + return domCache; + }; + + const setupTimer = (globalState$$1, innerParams, dismissWith) => { + const timerProgressBar = getTimerProgressBar(); + hide(timerProgressBar); + + if (innerParams.timer) { + globalState$$1.timeout = new Timer(() => { + dismissWith('timer'); + delete globalState$$1.timeout; + }, innerParams.timer); + + if (innerParams.timerProgressBar) { + show(timerProgressBar); + setTimeout(() => { + if (globalState$$1.timeout && globalState$$1.timeout.running) { + // timer can be already stopped or unset at this point + animateTimerProgressBar(innerParams.timer); + } + }); + } + } + }; + + const initFocus = (domCache, innerParams) => { + if (innerParams.toast) { + return; + } + + if (!callIfFunction(innerParams.allowEnterKey)) { + return blurActiveElement(); + } + + if (!focusButton(domCache, innerParams)) { + setFocus(innerParams, -1, 1); + } + }; + + const focusButton = (domCache, innerParams) => { + if (innerParams.focusDeny && isVisible(domCache.denyButton)) { + domCache.denyButton.focus(); + return true; + } + + if (innerParams.focusCancel && isVisible(domCache.cancelButton)) { + domCache.cancelButton.focus(); + return true; + } + + if (innerParams.focusConfirm && isVisible(domCache.confirmButton)) { + domCache.confirmButton.focus(); + return true; + } + + return false; + }; + + const blurActiveElement = () => { + if (document.activeElement && typeof document.activeElement.blur === 'function') { + document.activeElement.blur(); + } + }; + + /** + * Updates popup parameters. + */ + + function update(params) { + const popup = getPopup(); + const innerParams = privateProps.innerParams.get(this); + + if (!popup || hasClass(popup, innerParams.hideClass.popup)) { + return warn("You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup."); + } + + const validUpdatableParams = {}; // assign valid params from `params` to `defaults` + + Object.keys(params).forEach(param => { + if (Swal.isUpdatableParameter(param)) { + validUpdatableParams[param] = params[param]; + } else { + warn("Invalid parameter to update: \"".concat(param, "\". Updatable params are listed here: https://github.com/sweetalert2/sweetalert2/blob/master/src/utils/params.js\n\nIf you think this parameter should be updatable, request it here: https://github.com/sweetalert2/sweetalert2/issues/new?template=02_feature_request.md")); + } + }); + const updatedParams = Object.assign({}, innerParams, validUpdatableParams); + render(this, updatedParams); + privateProps.innerParams.set(this, updatedParams); + Object.defineProperties(this, { + params: { + value: Object.assign({}, this.params, params), + writable: false, + enumerable: true + } + }); + } + + function _destroy() { + const domCache = privateProps.domCache.get(this); + const innerParams = privateProps.innerParams.get(this); + + if (!innerParams) { + return; // This instance has already been destroyed + } // Check if there is another Swal closing + + + if (domCache.popup && globalState.swalCloseEventFinishedCallback) { + globalState.swalCloseEventFinishedCallback(); + delete globalState.swalCloseEventFinishedCallback; + } // Check if there is a swal disposal defer timer + + + if (globalState.deferDisposalTimer) { + clearTimeout(globalState.deferDisposalTimer); + delete globalState.deferDisposalTimer; + } + + if (typeof innerParams.didDestroy === 'function') { + innerParams.didDestroy(); + } + + disposeSwal(this); + } + + const disposeSwal = instance => { + // Unset this.params so GC will dispose it (#1569) + delete instance.params; // Unset globalState props so GC will dispose globalState (#1569) + + delete globalState.keydownHandler; + delete globalState.keydownTarget; // Unset WeakMaps so GC will be able to dispose them (#1569) + + unsetWeakMaps(privateProps); + unsetWeakMaps(privateMethods); // Unset currentInstance + + delete globalState.currentInstance; + }; + + const unsetWeakMaps = obj => { + for (const i in obj) { + obj[i] = new WeakMap(); + } + }; + + + + var instanceMethods = /*#__PURE__*/Object.freeze({ + hideLoading: hideLoading, + disableLoading: hideLoading, + getInput: getInput$1, + close: close, + closePopup: close, + closeModal: close, + closeToast: close, + enableButtons: enableButtons, + disableButtons: disableButtons, + enableInput: enableInput, + disableInput: disableInput, + showValidationMessage: showValidationMessage, + resetValidationMessage: resetValidationMessage$1, + getProgressSteps: getProgressSteps$1, + _main: _main, + update: update, + _destroy: _destroy + }); + + let currentInstance; + + class SweetAlert { + constructor(...args) { + // Prevent run in Node env + if (typeof window === 'undefined') { + return; + } + + currentInstance = this; + const outerParams = Object.freeze(this.constructor.argsToParams(args)); + Object.defineProperties(this, { + params: { + value: outerParams, + writable: false, + enumerable: true, + configurable: true + } + }); + + const promise = this._main(this.params); + + privateProps.promise.set(this, promise); + } // `catch` cannot be the name of a module export, so we define our thenable methods here instead + + + then(onFulfilled) { + const promise = privateProps.promise.get(this); + return promise.then(onFulfilled); + } + + finally(onFinally) { + const promise = privateProps.promise.get(this); + return promise.finally(onFinally); + } + + } // Assign instance methods from src/instanceMethods/*.js to prototype + + + Object.assign(SweetAlert.prototype, instanceMethods); // Assign static methods from src/staticMethods/*.js to constructor + + Object.assign(SweetAlert, staticMethods); // Proxy to instance methods to constructor, for now, for backwards compatibility + + Object.keys(instanceMethods).forEach(key => { + SweetAlert[key] = function (...args) { + if (currentInstance) { + return currentInstance[key](...args); + } + }; + }); + SweetAlert.DismissReason = DismissReason; + SweetAlert.version = '11.1.5'; + + const Swal = SweetAlert; + Swal.default = Swal; + + return Swal; + +})); +if (typeof this !== 'undefined' && this.Sweetalert2){ this.swal = this.sweetAlert = this.Swal = this.SweetAlert = this.Sweetalert2} + +"undefined"!=typeof document&&function(e,t){var n=e.createElement("style");if(e.getElementsByTagName("head")[0].appendChild(n),n.styleSheet)n.styleSheet.disabled||(n.styleSheet.cssText=t);else try{n.innerHTML=t}catch(e){n.innerText=t}}(document,".swal2-popup.swal2-toast{box-sizing:border-box;grid-column:1/4!important;grid-row:1/4!important;grid-template-columns:1fr 99fr 1fr;padding:1em;overflow-y:hidden;background:#fff;box-shadow:0 0 .625em #d9d9d9;pointer-events:all}.swal2-popup.swal2-toast>*{grid-column:2}.swal2-popup.swal2-toast .swal2-title{margin:1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-loading{justify-content:center}.swal2-popup.swal2-toast .swal2-input{height:2em;margin:.5em;font-size:1em}.swal2-popup.swal2-toast .swal2-validation-message{font-size:1em}.swal2-popup.swal2-toast .swal2-footer{margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-popup.swal2-toast .swal2-close{grid-column:3/3;grid-row:1/99;align-self:center;width:.8em;height:.8em;margin:0;font-size:2em}.swal2-popup.swal2-toast .swal2-html-container{margin:1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-html-container:empty{padding:0}.swal2-popup.swal2-toast .swal2-loader{grid-column:1;grid-row:1/99;align-self:center;width:2em;height:2em;margin:.25em}.swal2-popup.swal2-toast .swal2-icon{grid-column:1;grid-row:1/99;align-self:center;width:2em;min-width:2em;height:2em;margin:0 .5em 0 0}.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:700}.swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-popup.swal2-toast .swal2-actions{justify-content:flex-start;height:auto;margin:0;margin-top:.3125em;padding:0}.swal2-popup.swal2-toast .swal2-styled{margin:.25em .5em;padding:.4em .6em;font-size:1em}.swal2-popup.swal2-toast .swal2-styled:focus{box-shadow:0 0 0 1px #fff,0 0 0 3px rgba(100,150,200,.5)}.swal2-popup.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;transform:rotate(45deg);border-radius:50%}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.8em;left:-.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.25em;left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-popup.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{-webkit-animation:swal2-toast-animate-success-line-tip .75s;animation:swal2-toast-animate-success-line-tip .75s}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{-webkit-animation:swal2-toast-animate-success-line-long .75s;animation:swal2-toast-animate-success-line-long .75s}.swal2-popup.swal2-toast.swal2-show{-webkit-animation:swal2-toast-show .5s;animation:swal2-toast-show .5s}.swal2-popup.swal2-toast.swal2-hide{-webkit-animation:swal2-toast-hide .1s forwards;animation:swal2-toast-hide .1s forwards}.swal2-container{display:grid;position:fixed;z-index:1060;top:0;right:0;bottom:0;left:0;box-sizing:border-box;grid-template-areas:\"top-start top top-end\" \"center-start center center-end\" \"bottom-start bottom-center bottom-end\";grid-template-rows:minmax(-webkit-min-content,auto) minmax(-webkit-min-content,auto) minmax(-webkit-min-content,auto);grid-template-rows:minmax(min-content,auto) minmax(min-content,auto) minmax(min-content,auto);height:100%;padding:.625em;overflow-x:hidden;transition:background-color .1s;-webkit-overflow-scrolling:touch}.swal2-container.swal2-backdrop-show,.swal2-container.swal2-noanimation{background:rgba(0,0,0,.4)}.swal2-container.swal2-backdrop-hide{background:0 0!important}.swal2-container.swal2-bottom-start,.swal2-container.swal2-center-start,.swal2-container.swal2-top-start{grid-template-columns:minmax(0,1fr) auto auto}.swal2-container.swal2-bottom,.swal2-container.swal2-center,.swal2-container.swal2-top{grid-template-columns:auto minmax(0,1fr) auto}.swal2-container.swal2-bottom-end,.swal2-container.swal2-center-end,.swal2-container.swal2-top-end{grid-template-columns:auto auto minmax(0,1fr)}.swal2-container.swal2-top-start>.swal2-popup{align-self:start}.swal2-container.swal2-top>.swal2-popup{grid-column:2;align-self:start;justify-self:center}.swal2-container.swal2-top-end>.swal2-popup,.swal2-container.swal2-top-right>.swal2-popup{grid-column:3;align-self:start;justify-self:end}.swal2-container.swal2-center-left>.swal2-popup,.swal2-container.swal2-center-start>.swal2-popup{grid-row:2;align-self:center}.swal2-container.swal2-center>.swal2-popup{grid-column:2;grid-row:2;align-self:center;justify-self:center}.swal2-container.swal2-center-end>.swal2-popup,.swal2-container.swal2-center-right>.swal2-popup{grid-column:3;grid-row:2;align-self:center;justify-self:end}.swal2-container.swal2-bottom-left>.swal2-popup,.swal2-container.swal2-bottom-start>.swal2-popup{grid-column:1;grid-row:3;align-self:end}.swal2-container.swal2-bottom>.swal2-popup{grid-column:2;grid-row:3;justify-self:center;align-self:end}.swal2-container.swal2-bottom-end>.swal2-popup,.swal2-container.swal2-bottom-right>.swal2-popup{grid-column:3;grid-row:3;align-self:end;justify-self:end}.swal2-container.swal2-grow-fullscreen>.swal2-popup,.swal2-container.swal2-grow-row>.swal2-popup{grid-column:1/4;width:100%}.swal2-container.swal2-grow-column>.swal2-popup,.swal2-container.swal2-grow-fullscreen>.swal2-popup{grid-row:1/4;align-self:stretch}.swal2-container.swal2-no-transition{transition:none!important}.swal2-popup{display:none;position:relative;box-sizing:border-box;grid-template-columns:minmax(0,100%);width:32em;max-width:100%;padding:0 0 1.25em;border:none;border-radius:5px;background:#fff;color:#545454;font-family:inherit;font-size:1rem}.swal2-popup:focus{outline:0}.swal2-popup.swal2-loading{overflow-y:hidden}.swal2-title{position:relative;max-width:100%;margin:0;padding:.8em 1em 0;color:#595959;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;word-wrap:break-word}.swal2-actions{display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:center;width:auto;margin:1.25em auto 0;padding:0}.swal2-actions:not(.swal2-loading) .swal2-styled[disabled]{opacity:.4}.swal2-actions:not(.swal2-loading) .swal2-styled:hover{background-image:linear-gradient(rgba(0,0,0,.1),rgba(0,0,0,.1))}.swal2-actions:not(.swal2-loading) .swal2-styled:active{background-image:linear-gradient(rgba(0,0,0,.2),rgba(0,0,0,.2))}.swal2-loader{display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;-webkit-animation:swal2-rotate-loading 1.5s linear 0s infinite normal;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 transparent #2778c4 transparent}.swal2-styled{margin:.3125em;padding:.625em 1.1em;transition:box-shadow .1s;box-shadow:0 0 0 3px transparent;font-weight:500}.swal2-styled:not([disabled]){cursor:pointer}.swal2-styled.swal2-confirm{border:0;border-radius:.25em;background:initial;background-color:#7367f0;color:#fff;font-size:1em}.swal2-styled.swal2-confirm:focus{box-shadow:0 0 0 3px rgba(115,103,240,.5)}.swal2-styled.swal2-deny{border:0;border-radius:.25em;background:initial;background-color:#ea5455;color:#fff;font-size:1em}.swal2-styled.swal2-deny:focus{box-shadow:0 0 0 3px rgba(234,84,85,.5)}.swal2-styled.swal2-cancel{border:0;border-radius:.25em;background:initial;background-color:#6e7d88;color:#fff;font-size:1em}.swal2-styled.swal2-cancel:focus{box-shadow:0 0 0 3px rgba(110,125,136,.5)}.swal2-styled.swal2-default-outline:focus{box-shadow:0 0 0 3px rgba(100,150,200,.5)}.swal2-styled:focus{outline:0}.swal2-styled::-moz-focus-inner{border:0}.swal2-footer{justify-content:center;margin:1em 0 0;padding:1em 1em 0;border-top:1px solid #eee;color:#545454;font-size:1em}.swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;grid-column:auto!important;height:.25em;overflow:hidden;border-bottom-right-radius:5px;border-bottom-left-radius:5px}.swal2-timer-progress-bar{width:100%;height:.25em;background:rgba(0,0,0,.2)}.swal2-image{max-width:100%;margin:2em auto 1em}.swal2-close{z-index:2;align-items:center;justify-content:center;width:1.2em;height:1.2em;margin-top:0;margin-right:0;margin-bottom:-1.2em;padding:0;overflow:hidden;transition:color .1s,box-shadow .1s;border:none;border-radius:5px;background:0 0;color:#ccc;font-family:serif;font-family:monospace;font-size:2.5em;cursor:pointer;justify-self:end}.swal2-close:hover{transform:none;background:0 0;color:#f27474}.swal2-close:focus{outline:0;box-shadow:inset 0 0 0 3px rgba(100,150,200,.5)}.swal2-close::-moz-focus-inner{border:0}.swal2-html-container{z-index:1;justify-content:center;margin:1em 1.6em .3em;padding:0;overflow:auto;color:#545454;font-size:1.125em;font-weight:400;line-height:normal;text-align:center;word-wrap:break-word;word-break:break-word}.swal2-checkbox,.swal2-file,.swal2-input,.swal2-radio,.swal2-select,.swal2-textarea{margin:1em 2em 0}.swal2-file,.swal2-input,.swal2-textarea{box-sizing:border-box;width:auto;transition:border-color .1s,box-shadow .1s;border:1px solid #d9d9d9;border-radius:.1875em;background:inherit;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px transparent;color:inherit;font-size:1.125em}.swal2-file.swal2-inputerror,.swal2-input.swal2-inputerror,.swal2-textarea.swal2-inputerror{border-color:#f27474!important;box-shadow:0 0 2px #f27474!important}.swal2-file:focus,.swal2-input:focus,.swal2-textarea:focus{border:1px solid #b4dbed;outline:0;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(100,150,200,.5)}.swal2-file::-moz-placeholder,.swal2-input::-moz-placeholder,.swal2-textarea::-moz-placeholder{color:#ccc}.swal2-file:-ms-input-placeholder,.swal2-input:-ms-input-placeholder,.swal2-textarea:-ms-input-placeholder{color:#ccc}.swal2-file::placeholder,.swal2-input::placeholder,.swal2-textarea::placeholder{color:#ccc}.swal2-range{margin:1em 2em 0;background:#fff}.swal2-range input{width:80%}.swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}.swal2-range input,.swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}.swal2-input{height:2.625em;padding:0 .75em}.swal2-file{width:75%;margin-right:auto;margin-left:auto;background:inherit;font-size:1.125em}.swal2-textarea{height:6.75em;padding:.75em}.swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:inherit;color:inherit;font-size:1.125em}.swal2-checkbox,.swal2-radio{align-items:center;justify-content:center;background:#fff;color:inherit}.swal2-checkbox label,.swal2-radio label{margin:0 .6em;font-size:1.125em}.swal2-checkbox input,.swal2-radio input{flex-shrink:0;margin:0 .4em}.swal2-input-label{display:flex;justify-content:center;margin:1em auto 0}.swal2-validation-message{align-items:center;justify-content:center;margin:1em 0 0;padding:.625em;overflow:hidden;background:#f0f0f0;color:#666;font-size:1em;font-weight:300}.swal2-validation-message::before{content:\"!\";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}.swal2-icon{position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:2.5em auto .6em;border:.25em solid transparent;border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}.swal2-icon.swal2-error{border-color:#f27474;color:#f27474}.swal2-icon.swal2-error .swal2-x-mark{position:relative;flex-grow:1}.swal2-icon.swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}.swal2-icon.swal2-error.swal2-icon-show{-webkit-animation:swal2-animate-error-icon .5s;animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-error.swal2-icon-show .swal2-x-mark{-webkit-animation:swal2-animate-error-x-mark .5s;animation:swal2-animate-error-x-mark .5s}.swal2-icon.swal2-warning{border-color:#facea8;color:#f8bb86}.swal2-icon.swal2-info{border-color:#9de0f6;color:#3fc3ee}.swal2-icon.swal2-question{border-color:#c9dae1;color:#87adbd}.swal2-icon.swal2-success{border-color:#a5dc86;color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;transform:rotate(45deg);border-radius:50%}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}.swal2-icon.swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-.25em;left:-.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}.swal2-icon.swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}.swal2-icon.swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}.swal2-icon.swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-tip{-webkit-animation:swal2-animate-success-line-tip .75s;animation:swal2-animate-success-line-tip .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-long{-webkit-animation:swal2-animate-success-line-long .75s;animation:swal2-animate-success-line-long .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-circular-line-right{-webkit-animation:swal2-rotate-success-circular-line 4.25s ease-in;animation:swal2-rotate-success-circular-line 4.25s ease-in}.swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:1.25em auto;padding:0;background:inherit;font-weight:600}.swal2-progress-steps li{display:inline-block;position:relative}.swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:#add8e6;color:#fff}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:#add8e6}.swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}[class^=swal2]{-webkit-tap-highlight-color:transparent}.swal2-show{-webkit-animation:swal2-show .3s;animation:swal2-show .3s}.swal2-hide{-webkit-animation:swal2-hide .15s forwards;animation:swal2-hide .15s forwards}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{margin-right:initial;margin-left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}@-webkit-keyframes swal2-toast-show{0%{transform:translateY(-.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0)}}@keyframes swal2-toast-show{0%{transform:translateY(-.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0)}}@-webkit-keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@-webkit-keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@-webkit-keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@-webkit-keyframes swal2-show{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}100%{transform:scale(1)}}@keyframes swal2-show{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}100%{transform:scale(1)}}@-webkit-keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(.5);opacity:0}}@keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(.5);opacity:0}}@-webkit-keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@-webkit-keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@-webkit-keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@-webkit-keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@-webkit-keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0);opacity:1}}@-webkit-keyframes swal2-rotate-loading{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes swal2-rotate-loading{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto!important}body.swal2-no-backdrop .swal2-container{background-color:transparent!important;pointer-events:none}body.swal2-no-backdrop .swal2-container .swal2-popup{pointer-events:all}body.swal2-no-backdrop .swal2-container .swal2-modal{box-shadow:0 0 10px rgba(0,0,0,.4)}@media print{body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow-y:scroll!important}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .swal2-container{position:static!important}}body.swal2-toast-shown .swal2-container{box-sizing:border-box;width:360px;max-width:100%;background-color:transparent;pointer-events:none}body.swal2-toast-shown .swal2-container.swal2-top{top:0;right:auto;bottom:auto;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{top:0;right:0;bottom:auto;left:auto}body.swal2-toast-shown .swal2-container.swal2-top-left,body.swal2-toast-shown .swal2-container.swal2-top-start{top:0;right:auto;bottom:auto;left:0}body.swal2-toast-shown .swal2-container.swal2-center-left,body.swal2-toast-shown .swal2-container.swal2-center-start{top:50%;right:auto;bottom:auto;left:0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{top:50%;right:auto;bottom:auto;left:50%;transform:translate(-50%,-50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{top:50%;right:0;bottom:auto;left:auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-left,body.swal2-toast-shown .swal2-container.swal2-bottom-start{top:auto;right:auto;bottom:0;left:0}body.swal2-toast-shown .swal2-container.swal2-bottom{top:auto;right:auto;bottom:0;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{top:auto;right:0;bottom:0;left:auto}"); \ No newline at end of file diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Host/wwwroot/libs/sweetalert2/sweetalert2.all.min.js b/modules/cms-kit/host/Volo.CmsKit.Web.Host/wwwroot/libs/sweetalert2/sweetalert2.all.min.js new file mode 100644 index 0000000000..57ff7ff176 --- /dev/null +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Host/wwwroot/libs/sweetalert2/sweetalert2.all.min.js @@ -0,0 +1,2 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).Sweetalert2=t()}(this,function(){"use strict";const l=Object.freeze({cancel:"cancel",backdrop:"backdrop",close:"close",esc:"esc",timer:"timer"}),t="SweetAlert2:",o=e=>e.charAt(0).toUpperCase()+e.slice(1),a=e=>Array.prototype.slice.call(e),s=e=>{console.warn("".concat(t," ").concat("object"==typeof e?e.join(" "):e))},r=e=>{console.error("".concat(t," ").concat(e))},n=[],i=(e,t)=>{t='"'.concat(e,'" is deprecated and will be removed in the next major release. Please use "').concat(t,'" instead.'),n.includes(t)||(n.push(t),s(t))},c=e=>"function"==typeof e?e():e,u=e=>e&&"function"==typeof e.toPromise,d=e=>u(e)?e.toPromise():Promise.resolve(e),p=e=>e&&Promise.resolve(e)===e,m=e=>e instanceof Element||(e=>"object"==typeof e&&e.jquery)(e);var e=e=>{const t={};for(const n in e)t[e[n]]="swal2-"+e[n];return t};const h=e(["container","shown","height-auto","iosfix","popup","modal","no-backdrop","no-transition","toast","toast-shown","show","hide","close","title","html-container","actions","confirm","deny","cancel","default-outline","footer","icon","icon-content","image","input","file","range","select","radio","checkbox","label","textarea","inputerror","input-label","validation-message","progress-steps","active-progress-step","progress-step","progress-step-line","loader","loading","styled","top","top-start","top-end","top-left","top-right","center","center-start","center-end","center-left","center-right","bottom","bottom-start","bottom-end","bottom-left","bottom-right","grow-row","grow-column","grow-fullscreen","rtl","timer-progress-bar","timer-progress-bar-container","scrollbar-measure","icon-success","icon-warning","icon-info","icon-question","icon-error"]),g=e(["success","warning","info","question","error"]),b=()=>document.body.querySelector(".".concat(h.container)),f=e=>{const t=b();return t?t.querySelector(e):null},y=e=>f(".".concat(e)),v=()=>y(h.popup),w=()=>y(h.icon),C=()=>y(h.title),k=()=>y(h["html-container"]),A=()=>y(h.image),B=()=>y(h["progress-steps"]),x=()=>y(h["validation-message"]),P=()=>f(".".concat(h.actions," .").concat(h.confirm)),E=()=>f(".".concat(h.actions," .").concat(h.deny));const S=()=>f(".".concat(h.loader)),T=()=>f(".".concat(h.actions," .").concat(h.cancel)),L=()=>y(h.actions),O=()=>y(h.footer),j=()=>y(h["timer-progress-bar"]),D=()=>y(h.close),I=()=>{const e=a(v().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')).sort((e,t)=>(e=parseInt(e.getAttribute("tabindex")),(t=parseInt(t.getAttribute("tabindex")))"-1"!==e.getAttribute("tabindex"));return(t=>{const n=[];for(let e=0;eG(e))},M=()=>!H()&&!document.body.classList.contains(h["no-backdrop"]),H=()=>document.body.classList.contains(h["toast-shown"]);const q={previousBodyPadding:null},V=(t,e)=>{if(t.textContent="",e){const n=new DOMParser,o=n.parseFromString(e,"text/html");a(o.querySelector("head").childNodes).forEach(e=>{t.appendChild(e)}),a(o.querySelector("body").childNodes).forEach(e=>{t.appendChild(e)})}},N=(t,e)=>{if(!e)return!1;var n=e.split(/\s+/);for(let e=0;e{var o,i;if(o=e,i=t,a(o.classList).forEach(e=>{Object.values(h).includes(e)||Object.values(g).includes(e)||Object.values(i.showClass).includes(e)||o.classList.remove(e)}),t.customClass&&t.customClass[n]){if("string"!=typeof t.customClass[n]&&!t.customClass[n].forEach)return s("Invalid type of customClass.".concat(n,'! Expected string or iterable object, got "').concat(typeof t.customClass[n],'"'));W(e,t.customClass[n])}},F=(e,t)=>{if(!t)return null;switch(t){case"select":case"textarea":case"file":return K(e,h[t]);case"checkbox":return e.querySelector(".".concat(h.checkbox," input"));case"radio":return e.querySelector(".".concat(h.radio," input:checked"))||e.querySelector(".".concat(h.radio," input:first-child"));case"range":return e.querySelector(".".concat(h.range," input"));default:return K(e,h.input)}},R=e=>{var t;e.focus(),"file"!==e.type&&(t=e.value,e.value="",e.value=t)},z=(e,t,n)=>{e&&t&&(t="string"==typeof t?t.split(/\s+/).filter(Boolean):t).forEach(t=>{e.forEach?e.forEach(e=>{n?e.classList.add(t):e.classList.remove(t)}):n?e.classList.add(t):e.classList.remove(t)})},W=(e,t)=>{z(e,t,!0)},_=(e,t)=>{z(e,t,!1)},K=(t,n)=>{for(let e=0;e{(n=n==="".concat(parseInt(n))?parseInt(n):n)||0===parseInt(n)?e.style[t]="number"==typeof n?"".concat(n,"px"):n:e.style.removeProperty(t)},Z=(e,t="flex")=>{e.style.display=t},J=e=>{e.style.display="none"},X=(e,t,n,o)=>{const i=e.querySelector(t);i&&(i.style[n]=o)},$=(e,t,n)=>{t?Z(e,n):J(e)},G=e=>!(!e||!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)),Q=()=>!G(P())&&!G(E())&&!G(T()),ee=e=>!!(e.scrollHeight>e.clientHeight),te=e=>{const t=window.getComputedStyle(e);var n=parseFloat(t.getPropertyValue("animation-duration")||"0"),e=parseFloat(t.getPropertyValue("transition-duration")||"0");return 0{const n=j();G(n)&&(t&&(n.style.transition="none",n.style.width="100%"),setTimeout(()=>{n.style.transition="width ".concat(e/1e3,"s linear"),n.style.width="0%"},10))},oe=()=>"undefined"==typeof window||"undefined"==typeof document,ie='\n
                    \n \n
                      \n
                      \n \n

                      \n
                      \n \n \n
                      \n \n \n
                      \n \n
                      \n \n \n
                      \n
                      \n
                      \n \n \n \n
                      \n
                      \n
                      \n
                      \n
                      \n
                      \n').replace(/(^|\n)\s*/g,""),ae=()=>{ln.isVisible()&&ln.resetValidationMessage()},se=e=>{var t=(()=>{const e=b();return!!e&&(e.remove(),_([document.documentElement,document.body],[h["no-backdrop"],h["toast-shown"],h["has-column"]]),!0)})();if(oe())r("SweetAlert2 requires document to initialize");else{const n=document.createElement("div");n.className=h.container,t&&W(n,h["no-transition"]),V(n,ie);const o="string"==typeof(t=e.target)?document.querySelector(t):t;o.appendChild(n),(e=>{const t=v();t.setAttribute("role",e.toast?"alert":"dialog"),t.setAttribute("aria-live",e.toast?"polite":"assertive"),e.toast||t.setAttribute("aria-modal","true")})(e),e=o,"rtl"===window.getComputedStyle(e).direction&&W(b(),h.rtl),(()=>{const e=v(),t=K(e,h.input),n=K(e,h.file),o=e.querySelector(".".concat(h.range," input")),i=e.querySelector(".".concat(h.range," output")),a=K(e,h.select),s=e.querySelector(".".concat(h.checkbox," input")),r=K(e,h.textarea);t.oninput=ae,n.onchange=ae,a.onchange=ae,s.onchange=ae,r.oninput=ae,o.oninput=()=>{ae(),i.value=o.value},o.onchange=()=>{ae(),o.nextSibling.value=o.value}})()}},re=(e,t)=>{e instanceof HTMLElement?t.appendChild(e):"object"==typeof e?ce(e,t):e&&V(t,e)},ce=(e,t)=>{e.jquery?le(t,e):V(t,e.toString())},le=(t,n)=>{if(t.textContent="",0 in n)for(let e=0;e in n;e++)t.appendChild(n[e].cloneNode(!0));else t.appendChild(n.cloneNode(!0))},ue=(()=>{if(oe())return!1;var e=document.createElement("div"),t={WebkitAnimation:"webkitAnimationEnd",OAnimation:"oAnimationEnd oanimationend",animation:"animationend"};for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&void 0!==e.style[n])return t[n];return!1})(),de=(e,t)=>{const n=L();var o=S(),i=P(),a=E(),s=T();(t.showConfirmButton||t.showDenyButton||t.showCancelButton?Z:J)(n),U(n,t,"actions"),pe(i,"confirm",t),pe(a,"deny",t),pe(s,"cancel",t),function(e,t,n,o){if(!o.buttonsStyling)return _([e,t,n],h.styled);W([e,t,n],h.styled),o.confirmButtonColor&&(e.style.backgroundColor=o.confirmButtonColor,W(e,h["default-outline"]));o.denyButtonColor&&(t.style.backgroundColor=o.denyButtonColor,W(t,h["default-outline"]));o.cancelButtonColor&&(n.style.backgroundColor=o.cancelButtonColor,W(n,h["default-outline"]))}(i,a,s,t),t.reverseButtons&&(n.insertBefore(s,o),n.insertBefore(a,o),n.insertBefore(i,o)),V(o,t.loaderHtml),U(o,t,"loader")};function pe(e,t,n){$(e,n["show".concat(o(t),"Button")],"inline-block"),V(e,n["".concat(t,"ButtonText")]),e.setAttribute("aria-label",n["".concat(t,"ButtonAriaLabel")]),e.className=h[t],U(e,n,"".concat(t,"Button")),W(e,n["".concat(t,"ButtonClass")])}const me=(e,t)=>{var n,o,i=b();i&&(o=i,"string"==typeof(n=t.backdrop)?o.style.background=n:n||W([document.documentElement,document.body],h["no-backdrop"]),o=i,(n=t.position)in h?W(o,h[n]):(s('The "position" parameter is not valid, defaulting to "center"'),W(o,h.center)),n=i,!(o=t.grow)||"string"!=typeof o||(o="grow-".concat(o))in h&&W(n,h[o]),U(i,t,"container"))};var he={promise:new WeakMap,innerParams:new WeakMap,domCache:new WeakMap};const ge=["input","file","range","select","radio","checkbox","textarea"],be=e=>{if(!ke[e.input])return r('Unexpected type of input! Expected "text", "email", "password", "number", "tel", "select", "radio", "checkbox", "textarea", "file" or "url", got "'.concat(e.input,'"'));var t=Ce(e.input);const n=ke[e.input](t,e);Z(n),setTimeout(()=>{R(n)})},fe=(e,t)=>{const n=F(v(),e);if(n){(t=>{for(let e=0;e{var t=Ce(e.input);e.customClass&&W(t,e.customClass.input)},ve=(e,t)=>{e.placeholder&&!t.inputPlaceholder||(e.placeholder=t.inputPlaceholder)},we=(e,t,n)=>{if(n.inputLabel){e.id=h.input;const i=document.createElement("label");var o=h["input-label"];i.setAttribute("for",e.id),i.className=o,W(i,n.customClass.inputLabel),i.innerText=n.inputLabel,t.insertAdjacentElement("beforebegin",i)}},Ce=e=>{e=h[e]||h.input;return K(v(),e)},ke={};ke.text=ke.email=ke.password=ke.number=ke.tel=ke.url=(e,t)=>("string"==typeof t.inputValue||"number"==typeof t.inputValue?e.value=t.inputValue:p(t.inputValue)||s('Unexpected type of inputValue! Expected "string", "number" or "Promise", got "'.concat(typeof t.inputValue,'"')),we(e,e,t),ve(e,t),e.type=t.input,e),ke.file=(e,t)=>(we(e,e,t),ve(e,t),e),ke.range=(e,t)=>{const n=e.querySelector("input"),o=e.querySelector("output");return n.value=t.inputValue,n.type=t.input,o.value=t.inputValue,we(n,e,t),e},ke.select=(e,t)=>{if(e.textContent="",t.inputPlaceholder){const n=document.createElement("option");V(n,t.inputPlaceholder),n.value="",n.disabled=!0,n.selected=!0,e.appendChild(n)}return we(e,e,t),e},ke.radio=e=>(e.textContent="",e),ke.checkbox=(e,t)=>{const n=F(v(),"checkbox");n.value=1,n.id=h.checkbox,n.checked=Boolean(t.inputValue);var o=e.querySelector("span");return V(o,t.inputPlaceholder),e},ke.textarea=(n,e)=>{n.value=e.inputValue,ve(n,e),we(n,n,e);return setTimeout(()=>{if("MutationObserver"in window){const t=parseInt(window.getComputedStyle(v()).width);new MutationObserver(()=>{var e,e=n.offsetWidth+(e=n,parseInt(window.getComputedStyle(e).marginLeft)+parseInt(window.getComputedStyle(e).marginRight));e>t?v().style.width="".concat(e,"px"):v().style.width=null}).observe(n,{attributes:!0,attributeFilter:["style"]})}}),n};const Ae=(e,t)=>{const n=k();U(n,t,"htmlContainer"),t.html?(re(t.html,n),Z(n,"block")):t.text?(n.textContent=t.text,Z(n,"block")):J(n),((e,o)=>{const i=v();e=he.innerParams.get(e);const a=!e||o.input!==e.input;ge.forEach(e=>{var t=h[e];const n=K(i,t);fe(e,o.inputAttributes),n.className=t,a&&J(n)}),o.input&&(a&&be(o),ye(o))})(e,t)},Be=(e,t)=>{for(const n in g)t.icon!==n&&_(e,g[n]);W(e,g[t.icon]),Ee(e,t),xe(),U(e,t,"icon")},xe=()=>{const e=v();var t=window.getComputedStyle(e).getPropertyValue("background-color");const n=e.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix");for(let e=0;e{var n;e.textContent="",t.iconHtml?V(e,Se(t.iconHtml)):"success"===t.icon?V(e,'\n
                      \n \n
                      \n
                      \n '):"error"===t.icon?V(e,'\n \n \n \n \n '):(n={question:"?",warning:"!",info:"i"},V(e,Se(n[t.icon])))},Ee=(e,t)=>{if(t.iconColor){e.style.color=t.iconColor,e.style.borderColor=t.iconColor;for(const n of[".swal2-success-line-tip",".swal2-success-line-long",".swal2-x-mark-line-left",".swal2-x-mark-line-right"])X(e,n,"backgroundColor",t.iconColor);X(e,".swal2-success-ring","borderColor",t.iconColor)}},Se=e=>'
                      ').concat(e,"
                      "),Te=(e,o)=>{const i=B();if(!o.progressSteps||0===o.progressSteps.length)return J(i);Z(i),i.textContent="",o.currentProgressStep>=o.progressSteps.length&&s("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),o.progressSteps.forEach((e,t)=>{var n,e=(n=e,e=document.createElement("li"),W(e,h["progress-step"]),V(e,n),e);i.appendChild(e),t===o.currentProgressStep&&W(e,h["active-progress-step"]),t!==o.progressSteps.length-1&&(t=(e=>{const t=document.createElement("li");return W(t,h["progress-step-line"]),e.progressStepsDistance&&(t.style.width=e.progressStepsDistance),t})(o),i.appendChild(t))})},Le=(e,t)=>{e.className="".concat(h.popup," ").concat(G(e)?t.showClass.popup:""),t.toast?(W([document.documentElement,document.body],h["toast-shown"]),W(e,h.toast)):W(e,h.modal),U(e,t,"popup"),"string"==typeof t.customClass&&W(e,t.customClass),t.icon&&W(e,h["icon-".concat(t.icon)])},Oe=(e,t)=>{var n,o,i;(e=>{var t=b();const n=v();e.toast?(Y(t,"width",e.width),n.style.width="100%",n.insertBefore(S(),w())):Y(n,"width",e.width),Y(n,"padding",e.padding),e.background&&(n.style.background=e.background),J(x()),Le(n,e)})(t),me(0,t),Te(0,t),i=e,n=t,o=he.innerParams.get(i),i=w(),o&&n.icon===o.icon?(Pe(i,n),Be(i,n)):n.icon||n.iconHtml?n.icon&&-1===Object.keys(g).indexOf(n.icon)?(r('Unknown icon! Expected "success", "error", "warning", "info" or "question", got "'.concat(n.icon,'"')),J(i)):(Z(i),Pe(i,n),Be(i,n),W(i,n.showClass.icon)):J(i),(e=>{const t=A();if(!e.imageUrl)return J(t);Z(t,""),t.setAttribute("src",e.imageUrl),t.setAttribute("alt",e.imageAlt),Y(t,"width",e.imageWidth),Y(t,"height",e.imageHeight),t.className=h.image,U(t,e,"image")})(t),(e=>{const t=C();$(t,e.title||e.titleText,"block"),e.title&&re(e.title,t),e.titleText&&(t.innerText=e.titleText),U(t,e,"title")})(t),(e=>{const t=D();V(t,e.closeButtonHtml),U(t,e,"closeButton"),$(t,e.showCloseButton),t.setAttribute("aria-label",e.closeButtonAriaLabel)})(t),Ae(e,t),de(0,t),i=t,e=O(),$(e,i.footer),i.footer&&re(i.footer,e),U(e,i,"footer"),"function"==typeof t.didRender&&t.didRender(v())};const je=()=>P()&&P().click();const De=e=>{let t=v();t||ln.fire(),t=v();var n=S();H()?J(w()):Ie(t,e),Z(n),t.setAttribute("data-loading",!0),t.setAttribute("aria-busy",!0),t.focus()},Ie=(e,t)=>{var n=L();const o=S();!t&&G(P())&&(t=P()),Z(n),t&&(J(t),o.setAttribute("data-button-to-replace",t.className)),o.parentNode.insertBefore(o,t),W([e,n],h.loading)},Me={},He=o=>new Promise(e=>{if(!o)return e();var t=window.scrollX,n=window.scrollY;Me.restoreFocusTimeout=setTimeout(()=>{Me.previousActiveElement&&Me.previousActiveElement.focus?(Me.previousActiveElement.focus(),Me.previousActiveElement=null):document.body&&document.body.focus(),e()},100),window.scrollTo(t,n)});const qe=()=>{if(Me.timeout)return(()=>{const e=j();var t=parseInt(window.getComputedStyle(e).width);e.style.removeProperty("transition"),e.style.width="100%";var n=parseInt(window.getComputedStyle(e).width),n=parseInt(t/n*100);e.style.removeProperty("transition"),e.style.width="".concat(n,"%")})(),Me.timeout.stop()},Ve=()=>{if(Me.timeout){var e=Me.timeout.start();return ne(e),e}};let Ne=!1;const Ue={};const Fe=t=>{for(let e=t.target;e&&e!==document;e=e.parentNode)for(const o in Ue){var n=e.getAttribute(o);if(n)return void Ue[o].fire({template:n})}},Re={title:"",titleText:"",text:"",html:"",footer:"",icon:void 0,iconColor:void 0,iconHtml:void 0,template:void 0,toast:!1,showClass:{popup:"swal2-show",backdrop:"swal2-backdrop-show",icon:"swal2-icon-show"},hideClass:{popup:"swal2-hide",backdrop:"swal2-backdrop-hide",icon:"swal2-icon-hide"},customClass:{},target:"body",backdrop:!0,heightAuto:!0,allowOutsideClick:!0,allowEscapeKey:!0,allowEnterKey:!0,stopKeydownPropagation:!0,keydownListenerCapture:!1,showConfirmButton:!0,showDenyButton:!1,showCancelButton:!1,preConfirm:void 0,preDeny:void 0,confirmButtonText:"OK",confirmButtonAriaLabel:"",confirmButtonColor:void 0,denyButtonText:"No",denyButtonAriaLabel:"",denyButtonColor:void 0,cancelButtonText:"Cancel",cancelButtonAriaLabel:"",cancelButtonColor:void 0,buttonsStyling:!0,reverseButtons:!1,focusConfirm:!0,focusDeny:!1,focusCancel:!1,returnFocus:!0,showCloseButton:!1,closeButtonHtml:"×",closeButtonAriaLabel:"Close this dialog",loaderHtml:"",showLoaderOnConfirm:!1,showLoaderOnDeny:!1,imageUrl:void 0,imageWidth:void 0,imageHeight:void 0,imageAlt:"",timer:void 0,timerProgressBar:!1,width:void 0,padding:void 0,background:void 0,input:void 0,inputPlaceholder:"",inputLabel:"",inputValue:"",inputOptions:{},inputAutoTrim:!0,inputAttributes:{},inputValidator:void 0,returnInputValueOnDeny:!1,validationMessage:void 0,grow:!1,position:"center",progressSteps:[],currentProgressStep:void 0,progressStepsDistance:void 0,willOpen:void 0,didOpen:void 0,didRender:void 0,willClose:void 0,didClose:void 0,didDestroy:void 0,scrollbarPadding:!0},ze=["allowEscapeKey","allowOutsideClick","background","buttonsStyling","cancelButtonAriaLabel","cancelButtonColor","cancelButtonText","closeButtonAriaLabel","closeButtonHtml","confirmButtonAriaLabel","confirmButtonColor","confirmButtonText","currentProgressStep","customClass","denyButtonAriaLabel","denyButtonColor","denyButtonText","didClose","didDestroy","footer","hideClass","html","icon","iconColor","iconHtml","imageAlt","imageHeight","imageUrl","imageWidth","preConfirm","preDeny","progressSteps","returnFocus","reverseButtons","showCancelButton","showCloseButton","showConfirmButton","showDenyButton","text","title","titleText","willClose"],We={},_e=["allowOutsideClick","allowEnterKey","backdrop","focusConfirm","focusDeny","focusCancel","returnFocus","heightAuto","keydownListenerCapture"],Ke=e=>Object.prototype.hasOwnProperty.call(Re,e);const Ye=e=>We[e],Ze=e=>{!e.backdrop&&e.allowOutsideClick&&s('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`');for(const o in e)n=o,Ke(n)||s('Unknown parameter "'.concat(n,'"')),e.toast&&(t=o,_e.includes(t)&&s('The parameter "'.concat(t,'" is incompatible with toasts'))),t=o,Ye(t)&&i(t,Ye(t));var t,n};var Je=Object.freeze({isValidParameter:Ke,isUpdatableParameter:e=>-1!==ze.indexOf(e),isDeprecatedParameter:Ye,argsToParams:n=>{const o={};return"object"!=typeof n[0]||m(n[0])?["title","html","icon"].forEach((e,t)=>{t=n[t];"string"==typeof t||m(t)?o[e]=t:void 0!==t&&r("Unexpected type of ".concat(e,'! Expected "string" or "Element", got ').concat(typeof t))}):Object.assign(o,n[0]),o},isVisible:()=>G(v()),clickConfirm:je,clickDeny:()=>E()&&E().click(),clickCancel:()=>T()&&T().click(),getContainer:b,getPopup:v,getTitle:C,getHtmlContainer:k,getImage:A,getIcon:w,getInputLabel:()=>y(h["input-label"]),getCloseButton:D,getActions:L,getConfirmButton:P,getDenyButton:E,getCancelButton:T,getLoader:S,getFooter:O,getTimerProgressBar:j,getFocusableElements:I,getValidationMessage:x,isLoading:()=>v().hasAttribute("data-loading"),fire:function(...e){return new this(...e)},mixin:function(n){class e extends this{_main(e,t){return super._main(e,Object.assign({},n,t))}}return e},showLoading:De,enableLoading:De,getTimerLeft:()=>Me.timeout&&Me.timeout.getTimerLeft(),stopTimer:qe,resumeTimer:Ve,toggleTimer:()=>{var e=Me.timeout;return e&&(e.running?qe:Ve)()},increaseTimer:e=>{if(Me.timeout){e=Me.timeout.increase(e);return ne(e,!0),e}},isTimerRunning:()=>Me.timeout&&Me.timeout.isRunning(),bindClickHandler:function(e="data-swal-template"){Ue[e]=this,Ne||(document.body.addEventListener("click",Fe),Ne=!0)}});function Xe(){var e=he.innerParams.get(this);if(e){const t=he.domCache.get(this);J(t.loader),H()?e.icon&&Z(w()):(e=>{const t=e.popup.getElementsByClassName(e.loader.getAttribute("data-button-to-replace"));if(t.length)Z(t[0],"inline-block");else if(Q())J(e.actions)})(t),_([t.popup,t.actions],h.loading),t.popup.removeAttribute("aria-busy"),t.popup.removeAttribute("data-loading"),t.confirmButton.disabled=!1,t.denyButton.disabled=!1,t.cancelButton.disabled=!1}}const $e=()=>{null===q.previousBodyPadding&&document.body.scrollHeight>window.innerHeight&&(q.previousBodyPadding=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight="".concat(q.previousBodyPadding+(()=>{const e=document.createElement("div");e.className=h["scrollbar-measure"],document.body.appendChild(e);var t=e.getBoundingClientRect().width-e.clientWidth;return document.body.removeChild(e),t})(),"px"))},Ge=()=>{navigator.userAgent.match(/(CriOS|FxiOS|EdgiOS|YaBrowser|UCBrowser)/i)||v().scrollHeight>window.innerHeight-44&&(b().style.paddingBottom="".concat(44,"px"))},Qe=()=>{const e=b();let t;e.ontouchstart=e=>{t=et(e)},e.ontouchmove=e=>{t&&(e.preventDefault(),e.stopPropagation())}},et=e=>{var t=e.target,n=b();return!tt(e)&&!nt(e)&&(t===n||!(ee(n)||"INPUT"===t.tagName||"TEXTAREA"===t.tagName||ee(k())&&k().contains(t)))},tt=e=>e.touches&&e.touches.length&&"stylus"===e.touches[0].touchType,nt=e=>e.touches&&1{const e=a(document.body.children);e.forEach(e=>{e.hasAttribute("data-previous-aria-hidden")?(e.setAttribute("aria-hidden",e.getAttribute("data-previous-aria-hidden")),e.removeAttribute("data-previous-aria-hidden")):e.removeAttribute("aria-hidden")})};var it={swalPromiseResolve:new WeakMap};function at(e,t,n,o){H()?ct(e,o):(He(n).then(()=>ct(e,o)),Me.keydownTarget.removeEventListener("keydown",Me.keydownHandler,{capture:Me.keydownListenerCapture}),Me.keydownHandlerAdded=!1),/^((?!chrome|android).)*safari/i.test(navigator.userAgent)?(t.setAttribute("style","display:none !important"),t.removeAttribute("class"),t.innerHTML=""):t.remove(),M()&&(null!==q.previousBodyPadding&&(document.body.style.paddingRight="".concat(q.previousBodyPadding,"px"),q.previousBodyPadding=null),N(document.body,h.iosfix)&&(t=parseInt(document.body.style.top,10),_(document.body,h.iosfix),document.body.style.top="",document.body.scrollTop=-1*t),ot()),_([document.documentElement,document.body],[h.shown,h["height-auto"],h["no-backdrop"],h["toast-shown"]])}function st(e){var t=v();if(t){e=void 0!==(o=e)?Object.assign({isConfirmed:!1,isDenied:!1,isDismissed:!1},o):{isConfirmed:!1,isDenied:!1,isDismissed:!0};var n=he.innerParams.get(this);if(n&&!N(t,n.hideClass.popup)){const i=it.swalPromiseResolve.get(this);_(t,n.showClass.popup),W(t,n.hideClass.popup);var o=b();_(o,n.showClass.backdrop),W(o,n.hideClass.backdrop),((e,t,n)=>{const o=b(),i=ue&&te(t);if(typeof n.willClose==="function")n.willClose(t);if(i)rt(e,t,o,n.returnFocus,n.didClose);else at(e,o,n.returnFocus,n.didClose)})(this,t,n),i(e)}}}const rt=(e,t,n,o,i)=>{Me.swalCloseEventFinishedCallback=at.bind(null,e,n,o,i),t.addEventListener(ue,function(e){e.target===t&&(Me.swalCloseEventFinishedCallback(),delete Me.swalCloseEventFinishedCallback)})},ct=(e,t)=>{setTimeout(()=>{"function"==typeof t&&t.bind(e.params)(),e._destroy()})};function lt(e,t,n){const o=he.domCache.get(e);t.forEach(e=>{o[e].disabled=n})}function ut(e,t){if(!e)return!1;if("radio"===e.type){const n=e.parentNode.parentNode,o=n.querySelectorAll("input");for(let e=0;e/^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]{2,24}$/.test(e)?Promise.resolve():Promise.resolve(t||"Invalid email address"),url:(e,t)=>/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(e)?Promise.resolve():Promise.resolve(t||"Invalid URL")};function mt(e){var t,n;(t=e).inputValidator||Object.keys(pt).forEach(e=>{t.input===e&&(t.inputValidator=pt[e])}),e.showLoaderOnConfirm&&!e.preConfirm&&s("showLoaderOnConfirm is set to true, but preConfirm is not defined.\nshowLoaderOnConfirm should be used together with preConfirm, see usage example:\nhttps://sweetalert2.github.io/#ajax-request"),(n=e).target&&("string"!=typeof n.target||document.querySelector(n.target))&&("string"==typeof n.target||n.target.appendChild)||(s('Target parameter is not valid, defaulting to "body"'),n.target="body"),"string"==typeof e.title&&(e.title=e.title.split("\n").join("
                      ")),se(e)}const ht=["swal-title","swal-html","swal-footer"],gt=e=>{e="string"==typeof e.template?document.querySelector(e.template):e.template;if(!e)return{};e=e.content;return kt(e),Object.assign(bt(e),ft(e),yt(e),vt(e),wt(e),Ct(e,ht))},bt=e=>{const o={};return a(e.querySelectorAll("swal-param")).forEach(e=>{At(e,["name","value"]);var t=e.getAttribute("name");let n=e.getAttribute("value");"boolean"==typeof Re[t]&&"false"===n&&(n=!1),"object"==typeof Re[t]&&(n=JSON.parse(n)),o[t]=n}),o},ft=e=>{const n={};return a(e.querySelectorAll("swal-button")).forEach(e=>{At(e,["type","color","aria-label"]);var t=e.getAttribute("type");n["".concat(t,"ButtonText")]=e.innerHTML,n["show".concat(o(t),"Button")]=!0,e.hasAttribute("color")&&(n["".concat(t,"ButtonColor")]=e.getAttribute("color")),e.hasAttribute("aria-label")&&(n["".concat(t,"ButtonAriaLabel")]=e.getAttribute("aria-label"))}),n},yt=e=>{const t={},n=e.querySelector("swal-image");return n&&(At(n,["src","width","height","alt"]),n.hasAttribute("src")&&(t.imageUrl=n.getAttribute("src")),n.hasAttribute("width")&&(t.imageWidth=n.getAttribute("width")),n.hasAttribute("height")&&(t.imageHeight=n.getAttribute("height")),n.hasAttribute("alt")&&(t.imageAlt=n.getAttribute("alt"))),t},vt=e=>{const t={},n=e.querySelector("swal-icon");return n&&(At(n,["type","color"]),n.hasAttribute("type")&&(t.icon=n.getAttribute("type")),n.hasAttribute("color")&&(t.iconColor=n.getAttribute("color")),t.iconHtml=n.innerHTML),t},wt=e=>{const n={},t=e.querySelector("swal-input");t&&(At(t,["type","label","placeholder","value"]),n.input=t.getAttribute("type")||"text",t.hasAttribute("label")&&(n.inputLabel=t.getAttribute("label")),t.hasAttribute("placeholder")&&(n.inputPlaceholder=t.getAttribute("placeholder")),t.hasAttribute("value")&&(n.inputValue=t.getAttribute("value")));e=e.querySelectorAll("swal-input-option");return e.length&&(n.inputOptions={},a(e).forEach(e=>{At(e,["value"]);var t=e.getAttribute("value"),e=e.innerHTML;n.inputOptions[t]=e})),n},Ct=(e,t)=>{const n={};for(const o in t){const i=t[o],a=e.querySelector(i);a&&(At(a,[]),n[i.replace(/^swal-/,"")]=a.innerHTML.trim())}return n},kt=e=>{const t=ht.concat(["swal-param","swal-button","swal-image","swal-icon","swal-input","swal-input-option"]);a(e.children).forEach(e=>{e=e.tagName.toLowerCase();-1===t.indexOf(e)&&s("Unrecognized element <".concat(e,">"))})},At=(t,n)=>{a(t.attributes).forEach(e=>{-1===n.indexOf(e.name)&&s(['Unrecognized attribute "'.concat(e.name,'" on <').concat(t.tagName.toLowerCase(),">."),"".concat(n.length?"Allowed attributes are: ".concat(n.join(", ")):"To set the value, use HTML within the element.")])})},Bt=e=>{const t=b(),n=v();"function"==typeof e.willOpen&&e.willOpen(n);var o=window.getComputedStyle(document.body).overflowY;St(t,n,e),setTimeout(()=>{Pt(t,n)},10),M()&&(Et(t,e.scrollbarPadding,o),(()=>{const e=a(document.body.children);e.forEach(e=>{e===b()||e.contains(b())||(e.hasAttribute("aria-hidden")&&e.setAttribute("data-previous-aria-hidden",e.getAttribute("aria-hidden")),e.setAttribute("aria-hidden","true"))})})()),H()||Me.previousActiveElement||(Me.previousActiveElement=document.activeElement),"function"==typeof e.didOpen&&setTimeout(()=>e.didOpen(n)),_(t,h["no-transition"])},xt=e=>{const t=v();if(e.target===t){const n=b();t.removeEventListener(ue,xt),n.style.overflowY="auto"}},Pt=(e,t)=>{ue&&te(t)?(e.style.overflowY="hidden",t.addEventListener(ue,xt)):e.style.overflowY="auto"},Et=(e,t,n)=>{var o;(/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream||"MacIntel"===navigator.platform&&1{e.scrollTop=0})},St=(e,t,n)=>{W(e,n.showClass.backdrop),t.style.setProperty("opacity","0","important"),Z(t,"grid"),setTimeout(()=>{W(t,n.showClass.popup),t.style.removeProperty("opacity")},10),W([document.documentElement,document.body],h.shown),n.heightAuto&&n.backdrop&&!n.toast&&W([document.documentElement,document.body],h["height-auto"])},Tt=e=>e.checked?1:0,Lt=e=>e.checked?e.value:null,Ot=e=>e.files.length?null!==e.getAttribute("multiple")?e.files:e.files[0]:null,jt=(t,n)=>{const o=v(),i=e=>It[n.input](o,Mt(e),n);u(n.inputOptions)||p(n.inputOptions)?(De(P()),d(n.inputOptions).then(e=>{t.hideLoading(),i(e)})):"object"==typeof n.inputOptions?i(n.inputOptions):r("Unexpected type of inputOptions! Expected object, Map or Promise, got ".concat(typeof n.inputOptions))},Dt=(t,n)=>{const o=t.getInput();J(o),d(n.inputValue).then(e=>{o.value="number"===n.input?parseFloat(e)||0:"".concat(e),Z(o),o.focus(),t.hideLoading()}).catch(e=>{r("Error in inputValue promise: ".concat(e)),o.value="",Z(o),o.focus(),t.hideLoading()})},It={select:(e,t,i)=>{const a=K(e,h.select),s=(e,t,n)=>{const o=document.createElement("option");o.value=n,V(o,t),o.selected=Ht(n,i.inputValue),e.appendChild(o)};t.forEach(e=>{var t=e[0];const n=e[1];if(Array.isArray(n)){const o=document.createElement("optgroup");o.label=t,o.disabled=!1,a.appendChild(o),n.forEach(e=>s(o,e[1],e[0]))}else s(a,n,t)}),a.focus()},radio:(e,t,a)=>{const s=K(e,h.radio);t.forEach(e=>{var t=e[0],e=e[1];const n=document.createElement("input"),o=document.createElement("label");n.type="radio",n.name=h.radio,n.value=t,Ht(t,a.inputValue)&&(n.checked=!0);const i=document.createElement("span");V(i,e),i.className=h.label,o.appendChild(n),o.appendChild(i),s.appendChild(o)});const n=s.querySelectorAll("input");n.length&&n[0].focus()}},Mt=n=>{const o=[];return"undefined"!=typeof Map&&n instanceof Map?n.forEach((e,t)=>{let n=e;"object"==typeof n&&(n=Mt(n)),o.push([t,n])}):Object.keys(n).forEach(e=>{let t=n[e];"object"==typeof t&&(t=Mt(t)),o.push([e,t])}),o},Ht=(e,t)=>t&&t.toString()===e.toString(),qt=(e,t)=>{var n=he.innerParams.get(e),o=((e,t)=>{const n=e.getInput();if(!n)return null;switch(t.input){case"checkbox":return Tt(n);case"radio":return Lt(n);case"file":return Ot(n);default:return t.inputAutoTrim?n.value.trim():n.value}})(e,n);n.inputValidator?Vt(e,o,t):e.getInput().checkValidity()?("deny"===t?Nt:Ft)(e,o):(e.enableButtons(),e.showValidationMessage(n.validationMessage))},Vt=(t,n,o)=>{const e=he.innerParams.get(t);t.disableInput();const i=Promise.resolve().then(()=>d(e.inputValidator(n,e.validationMessage)));i.then(e=>{t.enableButtons(),t.enableInput(),e?t.showValidationMessage(e):("deny"===o?Nt:Ft)(t,n)})},Nt=(t,n)=>{const e=he.innerParams.get(t||void 0);if(e.showLoaderOnDeny&&De(E()),e.preDeny){const o=Promise.resolve().then(()=>d(e.preDeny(n,e.validationMessage)));o.then(e=>{!1===e?t.hideLoading():t.closePopup({isDenied:!0,value:void 0===e?n:e})})}else t.closePopup({isDenied:!0,value:n})},Ut=(e,t)=>{e.closePopup({isConfirmed:!0,value:t})},Ft=(t,n)=>{const e=he.innerParams.get(t||void 0);if(e.showLoaderOnConfirm&&De(),e.preConfirm){t.resetValidationMessage();const o=Promise.resolve().then(()=>d(e.preConfirm(n,e.validationMessage)));o.then(e=>{G(x())||!1===e?t.hideLoading():Ut(t,void 0===e?n:e)})}else Ut(t,n)},Rt=(e,t,n)=>{const o=I();if(o.length)return(t+=n)===o.length?t=0:-1===t&&(t=o.length-1),o[t].focus();v().focus()},zt=["ArrowRight","ArrowDown"],Wt=["ArrowLeft","ArrowUp"],_t=(e,t,n)=>{var o=he.innerParams.get(e);o&&(o.stopKeydownPropagation&&t.stopPropagation(),"Enter"===t.key?Kt(e,t,o):"Tab"===t.key?Yt(t,o):[...zt,...Wt].includes(t.key)?Zt(t.key):"Escape"===t.key&&Jt(t,o,n))},Kt=(e,t,n)=>{t.isComposing||t.target&&e.getInput()&&t.target.outerHTML===e.getInput().outerHTML&&(["textarea","file"].includes(n.input)||(je(),t.preventDefault()))},Yt=(e,t)=>{var n=e.target,o=I();let i=-1;for(let e=0;e{const t=P(),n=E(),o=T();if([t,n,o].includes(document.activeElement)){e=zt.includes(e)?"nextElementSibling":"previousElementSibling";const i=document.activeElement[e];i&&i.focus()}},Jt=(e,t,n)=>{c(t.allowEscapeKey)&&(e.preventDefault(),n(l.esc))},Xt=(t,e,n)=>{e.popup.onclick=()=>{var e=he.innerParams.get(t);e.showConfirmButton||e.showDenyButton||e.showCancelButton||e.showCloseButton||e.timer||e.input||n(l.close)}};let $t=!1;const Gt=t=>{t.popup.onmousedown=()=>{t.container.onmouseup=function(e){t.container.onmouseup=void 0,e.target===t.container&&($t=!0)}}},Qt=t=>{t.container.onmousedown=()=>{t.popup.onmouseup=function(e){t.popup.onmouseup=void 0,e.target!==t.popup&&!t.popup.contains(e.target)||($t=!0)}}},en=(n,o,i)=>{o.container.onclick=e=>{var t=he.innerParams.get(n);$t?$t=!1:e.target===o.container&&c(t.allowOutsideClick)&&i(l.backdrop)}};const tn=(e,t,n)=>{var o=j();J(o),t.timer&&(e.timeout=new dt(()=>{n("timer"),delete e.timeout},t.timer),t.timerProgressBar&&(Z(o),setTimeout(()=>{e.timeout&&e.timeout.running&&ne(t.timer)})))},nn=(e,t)=>{if(!t.toast)return c(t.allowEnterKey)?void(on(e,t)||Rt(0,-1,1)):an()},on=(e,t)=>t.focusDeny&&G(e.denyButton)?(e.denyButton.focus(),!0):t.focusCancel&&G(e.cancelButton)?(e.cancelButton.focus(),!0):!(!t.focusConfirm||!G(e.confirmButton))&&(e.confirmButton.focus(),!0),an=()=>{document.activeElement&&"function"==typeof document.activeElement.blur&&document.activeElement.blur()};const sn=e=>{for(const t in e)e[t]=new WeakMap};e=Object.freeze({hideLoading:Xe,disableLoading:Xe,getInput:function(e){var t=he.innerParams.get(e||this);return(e=he.domCache.get(e||this))?F(e.popup,t.input):null},close:st,closePopup:st,closeModal:st,closeToast:st,enableButtons:function(){lt(this,["confirmButton","denyButton","cancelButton"],!1)},disableButtons:function(){lt(this,["confirmButton","denyButton","cancelButton"],!0)},enableInput:function(){return ut(this.getInput(),!1)},disableInput:function(){return ut(this.getInput(),!0)},showValidationMessage:function(e){const t=he.domCache.get(this);var n=he.innerParams.get(this);V(t.validationMessage,e),t.validationMessage.className=h["validation-message"],n.customClass&&n.customClass.validationMessage&&W(t.validationMessage,n.customClass.validationMessage),Z(t.validationMessage);const o=this.getInput();o&&(o.setAttribute("aria-invalid",!0),o.setAttribute("aria-describedby",h["validation-message"]),R(o),W(o,h.inputerror))},resetValidationMessage:function(){var e=he.domCache.get(this);e.validationMessage&&J(e.validationMessage);const t=this.getInput();t&&(t.removeAttribute("aria-invalid"),t.removeAttribute("aria-describedby"),_(t,h.inputerror))},getProgressSteps:function(){return he.domCache.get(this).progressSteps},_main:function(e,t={}){Ze(Object.assign({},t,e)),Me.currentInstance&&(Me.currentInstance._destroy(),M()&&ot()),Me.currentInstance=this,mt(e=((e,t)=>{const n=gt(e),o=Object.assign({},Re,t,n,e);return o.showClass=Object.assign({},Re.showClass,o.showClass),o.hideClass=Object.assign({},Re.hideClass,o.hideClass),o})(e,t)),Object.freeze(e),Me.timeout&&(Me.timeout.stop(),delete Me.timeout),clearTimeout(Me.restoreFocusTimeout);var s,r,c,t=(e=>{const t={popup:v(),container:b(),actions:L(),confirmButton:P(),denyButton:E(),cancelButton:T(),loader:S(),closeButton:D(),validationMessage:x(),progressSteps:B()};return he.domCache.set(e,t),t})(this);return Oe(this,e),he.innerParams.set(this,e),s=this,r=t,c=e,new Promise(e=>{const t=e=>{s.closePopup({isDismissed:!0,dismiss:e})};var n,o,i,a;it.swalPromiseResolve.set(s,e),r.confirmButton.onclick=()=>(e=>{var t=he.innerParams.get(e);e.disableButtons(),t.input?qt(e,"confirm"):Ft(e,!0)})(s),r.denyButton.onclick=()=>(e=>{var t=he.innerParams.get(e);e.disableButtons(),t.returnInputValueOnDeny?qt(e,"deny"):Nt(e,!1)})(s),r.cancelButton.onclick=()=>((e,t)=>{e.disableButtons(),t(l.cancel)})(s,t),r.closeButton.onclick=()=>t(l.close),n=s,a=r,e=t,he.innerParams.get(n).toast?Xt(n,a,e):(Gt(a),Qt(a),en(n,a,e)),o=s,a=Me,e=c,i=t,a.keydownTarget&&a.keydownHandlerAdded&&(a.keydownTarget.removeEventListener("keydown",a.keydownHandler,{capture:a.keydownListenerCapture}),a.keydownHandlerAdded=!1),e.toast||(a.keydownHandler=e=>_t(o,e,i),a.keydownTarget=e.keydownListenerCapture?window:v(),a.keydownListenerCapture=e.keydownListenerCapture,a.keydownTarget.addEventListener("keydown",a.keydownHandler,{capture:a.keydownListenerCapture}),a.keydownHandlerAdded=!0),e=s,"select"===(a=c).input||"radio"===a.input?jt(e,a):["text","email","number","tel","textarea"].includes(a.input)&&(u(a.inputValue)||p(a.inputValue))&&(De(P()),Dt(e,a)),Bt(c),tn(Me,c,t),nn(r,c),setTimeout(()=>{r.container.scrollTop=0})})},update:function(t){var e=v(),n=he.innerParams.get(this);if(!e||N(e,n.hideClass.popup))return s("You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup.");const o={};Object.keys(t).forEach(e=>{ln.isUpdatableParameter(e)?o[e]=t[e]:s('Invalid parameter to update: "'.concat(e,'". Updatable params are listed here: https://github.com/sweetalert2/sweetalert2/blob/master/src/utils/params.js\n\nIf you think this parameter should be updatable, request it here: https://github.com/sweetalert2/sweetalert2/issues/new?template=02_feature_request.md'))}),n=Object.assign({},n,o),Oe(this,n),he.innerParams.set(this,n),Object.defineProperties(this,{params:{value:Object.assign({},this.params,t),writable:!1,enumerable:!0}})},_destroy:function(){var e=he.domCache.get(this);const t=he.innerParams.get(this);t&&(e.popup&&Me.swalCloseEventFinishedCallback&&(Me.swalCloseEventFinishedCallback(),delete Me.swalCloseEventFinishedCallback),Me.deferDisposalTimer&&(clearTimeout(Me.deferDisposalTimer),delete Me.deferDisposalTimer),"function"==typeof t.didDestroy&&t.didDestroy(),delete this.params,delete Me.keydownHandler,delete Me.keydownTarget,sn(he),sn(it),delete Me.currentInstance)}});let rn;class cn{constructor(...e){"undefined"!=typeof window&&(rn=this,e=Object.freeze(this.constructor.argsToParams(e)),Object.defineProperties(this,{params:{value:e,writable:!1,enumerable:!0,configurable:!0}}),e=this._main(this.params),he.promise.set(this,e))}then(e){const t=he.promise.get(this);return t.then(e)}finally(e){const t=he.promise.get(this);return t.finally(e)}}Object.assign(cn.prototype,e),Object.assign(cn,Je),Object.keys(e).forEach(t=>{cn[t]=function(...e){if(rn)return rn[t](...e)}}),cn.DismissReason=l,cn.version="11.1.5";const ln=cn;return ln.default=ln,ln}),void 0!==this&&this.Sweetalert2&&(this.swal=this.sweetAlert=this.Swal=this.SweetAlert=this.Sweetalert2); +"undefined"!=typeof document&&function(e,t){var n=e.createElement("style");if(e.getElementsByTagName("head")[0].appendChild(n),n.styleSheet)n.styleSheet.disabled||(n.styleSheet.cssText=t);else try{n.innerHTML=t}catch(e){n.innerText=t}}(document,".swal2-popup.swal2-toast{box-sizing:border-box;grid-column:1/4!important;grid-row:1/4!important;grid-template-columns:1fr 99fr 1fr;padding:1em;overflow-y:hidden;background:#fff;box-shadow:0 0 .625em #d9d9d9;pointer-events:all}.swal2-popup.swal2-toast>*{grid-column:2}.swal2-popup.swal2-toast .swal2-title{margin:1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-loading{justify-content:center}.swal2-popup.swal2-toast .swal2-input{height:2em;margin:.5em;font-size:1em}.swal2-popup.swal2-toast .swal2-validation-message{font-size:1em}.swal2-popup.swal2-toast .swal2-footer{margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-popup.swal2-toast .swal2-close{grid-column:3/3;grid-row:1/99;align-self:center;width:.8em;height:.8em;margin:0;font-size:2em}.swal2-popup.swal2-toast .swal2-html-container{margin:1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-html-container:empty{padding:0}.swal2-popup.swal2-toast .swal2-loader{grid-column:1;grid-row:1/99;align-self:center;width:2em;height:2em;margin:.25em}.swal2-popup.swal2-toast .swal2-icon{grid-column:1;grid-row:1/99;align-self:center;width:2em;min-width:2em;height:2em;margin:0 .5em 0 0}.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:700}.swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-popup.swal2-toast .swal2-actions{justify-content:flex-start;height:auto;margin:0;margin-top:.3125em;padding:0}.swal2-popup.swal2-toast .swal2-styled{margin:.25em .5em;padding:.4em .6em;font-size:1em}.swal2-popup.swal2-toast .swal2-styled:focus{box-shadow:0 0 0 1px #fff,0 0 0 3px rgba(100,150,200,.5)}.swal2-popup.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;transform:rotate(45deg);border-radius:50%}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.8em;left:-.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.25em;left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-popup.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{-webkit-animation:swal2-toast-animate-success-line-tip .75s;animation:swal2-toast-animate-success-line-tip .75s}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{-webkit-animation:swal2-toast-animate-success-line-long .75s;animation:swal2-toast-animate-success-line-long .75s}.swal2-popup.swal2-toast.swal2-show{-webkit-animation:swal2-toast-show .5s;animation:swal2-toast-show .5s}.swal2-popup.swal2-toast.swal2-hide{-webkit-animation:swal2-toast-hide .1s forwards;animation:swal2-toast-hide .1s forwards}.swal2-container{display:grid;position:fixed;z-index:1060;top:0;right:0;bottom:0;left:0;box-sizing:border-box;grid-template-areas:\"top-start top top-end\" \"center-start center center-end\" \"bottom-start bottom-center bottom-end\";grid-template-rows:minmax(-webkit-min-content,auto) minmax(-webkit-min-content,auto) minmax(-webkit-min-content,auto);grid-template-rows:minmax(min-content,auto) minmax(min-content,auto) minmax(min-content,auto);height:100%;padding:.625em;overflow-x:hidden;transition:background-color .1s;-webkit-overflow-scrolling:touch}.swal2-container.swal2-backdrop-show,.swal2-container.swal2-noanimation{background:rgba(0,0,0,.4)}.swal2-container.swal2-backdrop-hide{background:0 0!important}.swal2-container.swal2-bottom-start,.swal2-container.swal2-center-start,.swal2-container.swal2-top-start{grid-template-columns:minmax(0,1fr) auto auto}.swal2-container.swal2-bottom,.swal2-container.swal2-center,.swal2-container.swal2-top{grid-template-columns:auto minmax(0,1fr) auto}.swal2-container.swal2-bottom-end,.swal2-container.swal2-center-end,.swal2-container.swal2-top-end{grid-template-columns:auto auto minmax(0,1fr)}.swal2-container.swal2-top-start>.swal2-popup{align-self:start}.swal2-container.swal2-top>.swal2-popup{grid-column:2;align-self:start;justify-self:center}.swal2-container.swal2-top-end>.swal2-popup,.swal2-container.swal2-top-right>.swal2-popup{grid-column:3;align-self:start;justify-self:end}.swal2-container.swal2-center-left>.swal2-popup,.swal2-container.swal2-center-start>.swal2-popup{grid-row:2;align-self:center}.swal2-container.swal2-center>.swal2-popup{grid-column:2;grid-row:2;align-self:center;justify-self:center}.swal2-container.swal2-center-end>.swal2-popup,.swal2-container.swal2-center-right>.swal2-popup{grid-column:3;grid-row:2;align-self:center;justify-self:end}.swal2-container.swal2-bottom-left>.swal2-popup,.swal2-container.swal2-bottom-start>.swal2-popup{grid-column:1;grid-row:3;align-self:end}.swal2-container.swal2-bottom>.swal2-popup{grid-column:2;grid-row:3;justify-self:center;align-self:end}.swal2-container.swal2-bottom-end>.swal2-popup,.swal2-container.swal2-bottom-right>.swal2-popup{grid-column:3;grid-row:3;align-self:end;justify-self:end}.swal2-container.swal2-grow-fullscreen>.swal2-popup,.swal2-container.swal2-grow-row>.swal2-popup{grid-column:1/4;width:100%}.swal2-container.swal2-grow-column>.swal2-popup,.swal2-container.swal2-grow-fullscreen>.swal2-popup{grid-row:1/4;align-self:stretch}.swal2-container.swal2-no-transition{transition:none!important}.swal2-popup{display:none;position:relative;box-sizing:border-box;grid-template-columns:minmax(0,100%);width:32em;max-width:100%;padding:0 0 1.25em;border:none;border-radius:5px;background:#fff;color:#545454;font-family:inherit;font-size:1rem}.swal2-popup:focus{outline:0}.swal2-popup.swal2-loading{overflow-y:hidden}.swal2-title{position:relative;max-width:100%;margin:0;padding:.8em 1em 0;color:#595959;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;word-wrap:break-word}.swal2-actions{display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:center;width:auto;margin:1.25em auto 0;padding:0}.swal2-actions:not(.swal2-loading) .swal2-styled[disabled]{opacity:.4}.swal2-actions:not(.swal2-loading) .swal2-styled:hover{background-image:linear-gradient(rgba(0,0,0,.1),rgba(0,0,0,.1))}.swal2-actions:not(.swal2-loading) .swal2-styled:active{background-image:linear-gradient(rgba(0,0,0,.2),rgba(0,0,0,.2))}.swal2-loader{display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;-webkit-animation:swal2-rotate-loading 1.5s linear 0s infinite normal;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 transparent #2778c4 transparent}.swal2-styled{margin:.3125em;padding:.625em 1.1em;transition:box-shadow .1s;box-shadow:0 0 0 3px transparent;font-weight:500}.swal2-styled:not([disabled]){cursor:pointer}.swal2-styled.swal2-confirm{border:0;border-radius:.25em;background:initial;background-color:#7367f0;color:#fff;font-size:1em}.swal2-styled.swal2-confirm:focus{box-shadow:0 0 0 3px rgba(115,103,240,.5)}.swal2-styled.swal2-deny{border:0;border-radius:.25em;background:initial;background-color:#ea5455;color:#fff;font-size:1em}.swal2-styled.swal2-deny:focus{box-shadow:0 0 0 3px rgba(234,84,85,.5)}.swal2-styled.swal2-cancel{border:0;border-radius:.25em;background:initial;background-color:#6e7d88;color:#fff;font-size:1em}.swal2-styled.swal2-cancel:focus{box-shadow:0 0 0 3px rgba(110,125,136,.5)}.swal2-styled.swal2-default-outline:focus{box-shadow:0 0 0 3px rgba(100,150,200,.5)}.swal2-styled:focus{outline:0}.swal2-styled::-moz-focus-inner{border:0}.swal2-footer{justify-content:center;margin:1em 0 0;padding:1em 1em 0;border-top:1px solid #eee;color:#545454;font-size:1em}.swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;grid-column:auto!important;height:.25em;overflow:hidden;border-bottom-right-radius:5px;border-bottom-left-radius:5px}.swal2-timer-progress-bar{width:100%;height:.25em;background:rgba(0,0,0,.2)}.swal2-image{max-width:100%;margin:2em auto 1em}.swal2-close{z-index:2;align-items:center;justify-content:center;width:1.2em;height:1.2em;margin-top:0;margin-right:0;margin-bottom:-1.2em;padding:0;overflow:hidden;transition:color .1s,box-shadow .1s;border:none;border-radius:5px;background:0 0;color:#ccc;font-family:serif;font-family:monospace;font-size:2.5em;cursor:pointer;justify-self:end}.swal2-close:hover{transform:none;background:0 0;color:#f27474}.swal2-close:focus{outline:0;box-shadow:inset 0 0 0 3px rgba(100,150,200,.5)}.swal2-close::-moz-focus-inner{border:0}.swal2-html-container{z-index:1;justify-content:center;margin:1em 1.6em .3em;padding:0;overflow:auto;color:#545454;font-size:1.125em;font-weight:400;line-height:normal;text-align:center;word-wrap:break-word;word-break:break-word}.swal2-checkbox,.swal2-file,.swal2-input,.swal2-radio,.swal2-select,.swal2-textarea{margin:1em 2em 0}.swal2-file,.swal2-input,.swal2-textarea{box-sizing:border-box;width:auto;transition:border-color .1s,box-shadow .1s;border:1px solid #d9d9d9;border-radius:.1875em;background:inherit;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px transparent;color:inherit;font-size:1.125em}.swal2-file.swal2-inputerror,.swal2-input.swal2-inputerror,.swal2-textarea.swal2-inputerror{border-color:#f27474!important;box-shadow:0 0 2px #f27474!important}.swal2-file:focus,.swal2-input:focus,.swal2-textarea:focus{border:1px solid #b4dbed;outline:0;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(100,150,200,.5)}.swal2-file::-moz-placeholder,.swal2-input::-moz-placeholder,.swal2-textarea::-moz-placeholder{color:#ccc}.swal2-file:-ms-input-placeholder,.swal2-input:-ms-input-placeholder,.swal2-textarea:-ms-input-placeholder{color:#ccc}.swal2-file::placeholder,.swal2-input::placeholder,.swal2-textarea::placeholder{color:#ccc}.swal2-range{margin:1em 2em 0;background:#fff}.swal2-range input{width:80%}.swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}.swal2-range input,.swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}.swal2-input{height:2.625em;padding:0 .75em}.swal2-file{width:75%;margin-right:auto;margin-left:auto;background:inherit;font-size:1.125em}.swal2-textarea{height:6.75em;padding:.75em}.swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:inherit;color:inherit;font-size:1.125em}.swal2-checkbox,.swal2-radio{align-items:center;justify-content:center;background:#fff;color:inherit}.swal2-checkbox label,.swal2-radio label{margin:0 .6em;font-size:1.125em}.swal2-checkbox input,.swal2-radio input{flex-shrink:0;margin:0 .4em}.swal2-input-label{display:flex;justify-content:center;margin:1em auto 0}.swal2-validation-message{align-items:center;justify-content:center;margin:1em 0 0;padding:.625em;overflow:hidden;background:#f0f0f0;color:#666;font-size:1em;font-weight:300}.swal2-validation-message::before{content:\"!\";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}.swal2-icon{position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:2.5em auto .6em;border:.25em solid transparent;border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}.swal2-icon.swal2-error{border-color:#f27474;color:#f27474}.swal2-icon.swal2-error .swal2-x-mark{position:relative;flex-grow:1}.swal2-icon.swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}.swal2-icon.swal2-error.swal2-icon-show{-webkit-animation:swal2-animate-error-icon .5s;animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-error.swal2-icon-show .swal2-x-mark{-webkit-animation:swal2-animate-error-x-mark .5s;animation:swal2-animate-error-x-mark .5s}.swal2-icon.swal2-warning{border-color:#facea8;color:#f8bb86}.swal2-icon.swal2-info{border-color:#9de0f6;color:#3fc3ee}.swal2-icon.swal2-question{border-color:#c9dae1;color:#87adbd}.swal2-icon.swal2-success{border-color:#a5dc86;color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;transform:rotate(45deg);border-radius:50%}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}.swal2-icon.swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-.25em;left:-.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}.swal2-icon.swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}.swal2-icon.swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}.swal2-icon.swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-tip{-webkit-animation:swal2-animate-success-line-tip .75s;animation:swal2-animate-success-line-tip .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-long{-webkit-animation:swal2-animate-success-line-long .75s;animation:swal2-animate-success-line-long .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-circular-line-right{-webkit-animation:swal2-rotate-success-circular-line 4.25s ease-in;animation:swal2-rotate-success-circular-line 4.25s ease-in}.swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:1.25em auto;padding:0;background:inherit;font-weight:600}.swal2-progress-steps li{display:inline-block;position:relative}.swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:#add8e6;color:#fff}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:#add8e6}.swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}[class^=swal2]{-webkit-tap-highlight-color:transparent}.swal2-show{-webkit-animation:swal2-show .3s;animation:swal2-show .3s}.swal2-hide{-webkit-animation:swal2-hide .15s forwards;animation:swal2-hide .15s forwards}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{margin-right:initial;margin-left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}@-webkit-keyframes swal2-toast-show{0%{transform:translateY(-.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0)}}@keyframes swal2-toast-show{0%{transform:translateY(-.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0)}}@-webkit-keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@-webkit-keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@-webkit-keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@-webkit-keyframes swal2-show{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}100%{transform:scale(1)}}@keyframes swal2-show{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}100%{transform:scale(1)}}@-webkit-keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(.5);opacity:0}}@keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(.5);opacity:0}}@-webkit-keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@-webkit-keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@-webkit-keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@-webkit-keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@-webkit-keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0);opacity:1}}@-webkit-keyframes swal2-rotate-loading{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes swal2-rotate-loading{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto!important}body.swal2-no-backdrop .swal2-container{background-color:transparent!important;pointer-events:none}body.swal2-no-backdrop .swal2-container .swal2-popup{pointer-events:all}body.swal2-no-backdrop .swal2-container .swal2-modal{box-shadow:0 0 10px rgba(0,0,0,.4)}@media print{body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow-y:scroll!important}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .swal2-container{position:static!important}}body.swal2-toast-shown .swal2-container{box-sizing:border-box;width:360px;max-width:100%;background-color:transparent;pointer-events:none}body.swal2-toast-shown .swal2-container.swal2-top{top:0;right:auto;bottom:auto;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{top:0;right:0;bottom:auto;left:auto}body.swal2-toast-shown .swal2-container.swal2-top-left,body.swal2-toast-shown .swal2-container.swal2-top-start{top:0;right:auto;bottom:auto;left:0}body.swal2-toast-shown .swal2-container.swal2-center-left,body.swal2-toast-shown .swal2-container.swal2-center-start{top:50%;right:auto;bottom:auto;left:0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{top:50%;right:auto;bottom:auto;left:50%;transform:translate(-50%,-50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{top:50%;right:0;bottom:auto;left:auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-left,body.swal2-toast-shown .swal2-container.swal2-bottom-start{top:auto;right:auto;bottom:0;left:0}body.swal2-toast-shown .swal2-container.swal2-bottom{top:auto;right:auto;bottom:0;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{top:auto;right:0;bottom:0;left:auto}"); \ No newline at end of file diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Host/wwwroot/libs/sweetalert2/sweetalert2.css b/modules/cms-kit/host/Volo.CmsKit.Web.Host/wwwroot/libs/sweetalert2/sweetalert2.css new file mode 100644 index 0000000000..1feb7a5581 --- /dev/null +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Host/wwwroot/libs/sweetalert2/sweetalert2.css @@ -0,0 +1,1319 @@ +.swal2-popup.swal2-toast { + box-sizing: border-box; + grid-column: 1/4 !important; + grid-row: 1/4 !important; + grid-template-columns: 1fr 99fr 1fr; + padding: 1em; + overflow-y: hidden; + background: #fff; + box-shadow: 0 0 0.625em #d9d9d9; + pointer-events: all; +} +.swal2-popup.swal2-toast > * { + grid-column: 2; +} +.swal2-popup.swal2-toast .swal2-title { + margin: 1em; + padding: 0; + font-size: 1em; + text-align: initial; +} +.swal2-popup.swal2-toast .swal2-loading { + justify-content: center; +} +.swal2-popup.swal2-toast .swal2-input { + height: 2em; + margin: 0.5em; + font-size: 1em; +} +.swal2-popup.swal2-toast .swal2-validation-message { + font-size: 1em; +} +.swal2-popup.swal2-toast .swal2-footer { + margin: 0.5em 0 0; + padding: 0.5em 0 0; + font-size: 0.8em; +} +.swal2-popup.swal2-toast .swal2-close { + grid-column: 3/3; + grid-row: 1/99; + align-self: center; + width: 0.8em; + height: 0.8em; + margin: 0; + font-size: 2em; +} +.swal2-popup.swal2-toast .swal2-html-container { + margin: 1em; + padding: 0; + font-size: 1em; + text-align: initial; +} +.swal2-popup.swal2-toast .swal2-html-container:empty { + padding: 0; +} +.swal2-popup.swal2-toast .swal2-loader { + grid-column: 1; + grid-row: 1/99; + align-self: center; + width: 2em; + height: 2em; + margin: 0.25em; +} +.swal2-popup.swal2-toast .swal2-icon { + grid-column: 1; + grid-row: 1/99; + align-self: center; + width: 2em; + min-width: 2em; + height: 2em; + margin: 0 0.5em 0 0; +} +.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content { + display: flex; + align-items: center; + font-size: 1.8em; + font-weight: bold; +} +.swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring { + width: 2em; + height: 2em; +} +.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line] { + top: 0.875em; + width: 1.375em; +} +.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left] { + left: 0.3125em; +} +.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right] { + right: 0.3125em; +} +.swal2-popup.swal2-toast .swal2-actions { + justify-content: flex-start; + height: auto; + margin: 0; + margin-top: 0.3125em; + padding: 0; +} +.swal2-popup.swal2-toast .swal2-styled { + margin: 0.25em 0.5em; + padding: 0.4em 0.6em; + font-size: 1em; +} +.swal2-popup.swal2-toast .swal2-styled:focus { + box-shadow: 0 0 0 1px #fff, 0 0 0 3px rgba(100, 150, 200, 0.5); +} +.swal2-popup.swal2-toast .swal2-success { + border-color: #a5dc86; +} +.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line] { + position: absolute; + width: 1.6em; + height: 3em; + transform: rotate(45deg); + border-radius: 50%; +} +.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left] { + top: -0.8em; + left: -0.5em; + transform: rotate(-45deg); + transform-origin: 2em 2em; + border-radius: 4em 0 0 4em; +} +.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right] { + top: -0.25em; + left: 0.9375em; + transform-origin: 0 1.5em; + border-radius: 0 4em 4em 0; +} +.swal2-popup.swal2-toast .swal2-success .swal2-success-ring { + width: 2em; + height: 2em; +} +.swal2-popup.swal2-toast .swal2-success .swal2-success-fix { + top: 0; + left: 0.4375em; + width: 0.4375em; + height: 2.6875em; +} +.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line] { + height: 0.3125em; +} +.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip] { + top: 1.125em; + left: 0.1875em; + width: 0.75em; +} +.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=long] { + top: 0.9375em; + right: 0.1875em; + width: 1.375em; +} +.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip { + -webkit-animation: swal2-toast-animate-success-line-tip 0.75s; + animation: swal2-toast-animate-success-line-tip 0.75s; +} +.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long { + -webkit-animation: swal2-toast-animate-success-line-long 0.75s; + animation: swal2-toast-animate-success-line-long 0.75s; +} +.swal2-popup.swal2-toast.swal2-show { + -webkit-animation: swal2-toast-show 0.5s; + animation: swal2-toast-show 0.5s; +} +.swal2-popup.swal2-toast.swal2-hide { + -webkit-animation: swal2-toast-hide 0.1s forwards; + animation: swal2-toast-hide 0.1s forwards; +} + +.swal2-container { + display: grid; + position: fixed; + z-index: 1060; + top: 0; + right: 0; + bottom: 0; + left: 0; + box-sizing: border-box; + grid-template-areas: "top-start top top-end" "center-start center center-end" "bottom-start bottom-center bottom-end"; + grid-template-rows: minmax(-webkit-min-content, auto) minmax(-webkit-min-content, auto) minmax(-webkit-min-content, auto); + grid-template-rows: minmax(min-content, auto) minmax(min-content, auto) minmax(min-content, auto); + height: 100%; + padding: 0.625em; + overflow-x: hidden; + transition: background-color 0.1s; + -webkit-overflow-scrolling: touch; +} +.swal2-container.swal2-backdrop-show, .swal2-container.swal2-noanimation { + background: rgba(0, 0, 0, 0.4); +} +.swal2-container.swal2-backdrop-hide { + background: transparent !important; +} +.swal2-container.swal2-top-start, .swal2-container.swal2-center-start, .swal2-container.swal2-bottom-start { + grid-template-columns: minmax(0, 1fr) auto auto; +} +.swal2-container.swal2-top, .swal2-container.swal2-center, .swal2-container.swal2-bottom { + grid-template-columns: auto minmax(0, 1fr) auto; +} +.swal2-container.swal2-top-end, .swal2-container.swal2-center-end, .swal2-container.swal2-bottom-end { + grid-template-columns: auto auto minmax(0, 1fr); +} +.swal2-container.swal2-top-start > .swal2-popup { + align-self: start; +} +.swal2-container.swal2-top > .swal2-popup { + grid-column: 2; + align-self: start; + justify-self: center; +} +.swal2-container.swal2-top-end > .swal2-popup, .swal2-container.swal2-top-right > .swal2-popup { + grid-column: 3; + align-self: start; + justify-self: end; +} +.swal2-container.swal2-center-start > .swal2-popup, .swal2-container.swal2-center-left > .swal2-popup { + grid-row: 2; + align-self: center; +} +.swal2-container.swal2-center > .swal2-popup { + grid-column: 2; + grid-row: 2; + align-self: center; + justify-self: center; +} +.swal2-container.swal2-center-end > .swal2-popup, .swal2-container.swal2-center-right > .swal2-popup { + grid-column: 3; + grid-row: 2; + align-self: center; + justify-self: end; +} +.swal2-container.swal2-bottom-start > .swal2-popup, .swal2-container.swal2-bottom-left > .swal2-popup { + grid-column: 1; + grid-row: 3; + align-self: end; +} +.swal2-container.swal2-bottom > .swal2-popup { + grid-column: 2; + grid-row: 3; + justify-self: center; + align-self: end; +} +.swal2-container.swal2-bottom-end > .swal2-popup, .swal2-container.swal2-bottom-right > .swal2-popup { + grid-column: 3; + grid-row: 3; + align-self: end; + justify-self: end; +} +.swal2-container.swal2-grow-row > .swal2-popup, .swal2-container.swal2-grow-fullscreen > .swal2-popup { + grid-column: 1/4; + width: 100%; +} +.swal2-container.swal2-grow-column > .swal2-popup, .swal2-container.swal2-grow-fullscreen > .swal2-popup { + grid-row: 1/4; + align-self: stretch; +} +.swal2-container.swal2-no-transition { + transition: none !important; +} + +.swal2-popup { + display: none; + position: relative; + box-sizing: border-box; + grid-template-columns: minmax(0, 100%); + width: 32em; + max-width: 100%; + padding: 0 0 1.25em; + border: none; + border-radius: 5px; + background: #fff; + color: #545454; + font-family: inherit; + font-size: 1rem; +} +.swal2-popup:focus { + outline: none; +} +.swal2-popup.swal2-loading { + overflow-y: hidden; +} + +.swal2-title { + position: relative; + max-width: 100%; + margin: 0; + padding: 0.8em 1em 0; + color: #595959; + font-size: 1.875em; + font-weight: 600; + text-align: center; + text-transform: none; + word-wrap: break-word; +} + +.swal2-actions { + display: flex; + z-index: 1; + box-sizing: border-box; + flex-wrap: wrap; + align-items: center; + justify-content: center; + width: auto; + margin: 1.25em auto 0; + padding: 0; +} +.swal2-actions:not(.swal2-loading) .swal2-styled[disabled] { + opacity: 0.4; +} +.swal2-actions:not(.swal2-loading) .swal2-styled:hover { + background-image: linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1)); +} +.swal2-actions:not(.swal2-loading) .swal2-styled:active { + background-image: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)); +} + +.swal2-loader { + display: none; + align-items: center; + justify-content: center; + width: 2.2em; + height: 2.2em; + margin: 0 1.875em; + -webkit-animation: swal2-rotate-loading 1.5s linear 0s infinite normal; + animation: swal2-rotate-loading 1.5s linear 0s infinite normal; + border-width: 0.25em; + border-style: solid; + border-radius: 100%; + border-color: #2778c4 transparent #2778c4 transparent; +} + +.swal2-styled { + margin: 0.3125em; + padding: 0.625em 1.1em; + transition: box-shadow 0.1s; + box-shadow: 0 0 0 3px transparent; + font-weight: 500; +} +.swal2-styled:not([disabled]) { + cursor: pointer; +} +.swal2-styled.swal2-confirm { + border: 0; + border-radius: 0.25em; + background: initial; + background-color: #7367f0; + color: #fff; + font-size: 1em; +} +.swal2-styled.swal2-confirm:focus { + box-shadow: 0 0 0 3px rgba(115, 103, 240, 0.5); +} +.swal2-styled.swal2-deny { + border: 0; + border-radius: 0.25em; + background: initial; + background-color: #ea5455; + color: #fff; + font-size: 1em; +} +.swal2-styled.swal2-deny:focus { + box-shadow: 0 0 0 3px rgba(234, 84, 85, 0.5); +} +.swal2-styled.swal2-cancel { + border: 0; + border-radius: 0.25em; + background: initial; + background-color: #6e7d88; + color: #fff; + font-size: 1em; +} +.swal2-styled.swal2-cancel:focus { + box-shadow: 0 0 0 3px rgba(110, 125, 136, 0.5); +} +.swal2-styled.swal2-default-outline:focus { + box-shadow: 0 0 0 3px rgba(100, 150, 200, 0.5); +} +.swal2-styled:focus { + outline: none; +} +.swal2-styled::-moz-focus-inner { + border: 0; +} + +.swal2-footer { + justify-content: center; + margin: 1em 0 0; + padding: 1em 1em 0; + border-top: 1px solid #eee; + color: #545454; + font-size: 1em; +} + +.swal2-timer-progress-bar-container { + position: absolute; + right: 0; + bottom: 0; + left: 0; + grid-column: auto !important; + height: 0.25em; + overflow: hidden; + border-bottom-right-radius: 5px; + border-bottom-left-radius: 5px; +} + +.swal2-timer-progress-bar { + width: 100%; + height: 0.25em; + background: rgba(0, 0, 0, 0.2); +} + +.swal2-image { + max-width: 100%; + margin: 2em auto 1em; +} + +.swal2-close { + z-index: 2; + align-items: center; + justify-content: center; + width: 1.2em; + height: 1.2em; + margin-top: 0; + margin-right: 0; + margin-bottom: -1.2em; + padding: 0; + overflow: hidden; + transition: color 0.1s, box-shadow 0.1s; + border: none; + border-radius: 5px; + background: transparent; + color: #ccc; + font-family: serif; + font-family: monospace; + font-size: 2.5em; + cursor: pointer; + justify-self: end; +} +.swal2-close:hover { + transform: none; + background: transparent; + color: #f27474; +} +.swal2-close:focus { + outline: none; + box-shadow: inset 0 0 0 3px rgba(100, 150, 200, 0.5); +} +.swal2-close::-moz-focus-inner { + border: 0; +} + +.swal2-html-container { + z-index: 1; + justify-content: center; + margin: 1em 1.6em 0.3em; + padding: 0; + overflow: auto; + color: #545454; + font-size: 1.125em; + font-weight: normal; + line-height: normal; + text-align: center; + word-wrap: break-word; + word-break: break-word; +} + +.swal2-input, +.swal2-file, +.swal2-textarea, +.swal2-select, +.swal2-radio, +.swal2-checkbox { + margin: 1em 2em 0; +} + +.swal2-input, +.swal2-file, +.swal2-textarea { + box-sizing: border-box; + width: auto; + transition: border-color 0.1s, box-shadow 0.1s; + border: 1px solid #d9d9d9; + border-radius: 0.1875em; + background: inherit; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06), 0 0 0 3px transparent; + color: inherit; + font-size: 1.125em; +} +.swal2-input.swal2-inputerror, +.swal2-file.swal2-inputerror, +.swal2-textarea.swal2-inputerror { + border-color: #f27474 !important; + box-shadow: 0 0 2px #f27474 !important; +} +.swal2-input:focus, +.swal2-file:focus, +.swal2-textarea:focus { + border: 1px solid #b4dbed; + outline: none; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06), 0 0 0 3px rgba(100, 150, 200, 0.5); +} +.swal2-input::-moz-placeholder, .swal2-file::-moz-placeholder, .swal2-textarea::-moz-placeholder { + color: #ccc; +} +.swal2-input:-ms-input-placeholder, .swal2-file:-ms-input-placeholder, .swal2-textarea:-ms-input-placeholder { + color: #ccc; +} +.swal2-input::placeholder, +.swal2-file::placeholder, +.swal2-textarea::placeholder { + color: #ccc; +} + +.swal2-range { + margin: 1em 2em 0; + background: #fff; +} +.swal2-range input { + width: 80%; +} +.swal2-range output { + width: 20%; + color: inherit; + font-weight: 600; + text-align: center; +} +.swal2-range input, +.swal2-range output { + height: 2.625em; + padding: 0; + font-size: 1.125em; + line-height: 2.625em; +} + +.swal2-input { + height: 2.625em; + padding: 0 0.75em; +} + +.swal2-file { + width: 75%; + margin-right: auto; + margin-left: auto; + background: inherit; + font-size: 1.125em; +} + +.swal2-textarea { + height: 6.75em; + padding: 0.75em; +} + +.swal2-select { + min-width: 50%; + max-width: 100%; + padding: 0.375em 0.625em; + background: inherit; + color: inherit; + font-size: 1.125em; +} + +.swal2-radio, +.swal2-checkbox { + align-items: center; + justify-content: center; + background: #fff; + color: inherit; +} +.swal2-radio label, +.swal2-checkbox label { + margin: 0 0.6em; + font-size: 1.125em; +} +.swal2-radio input, +.swal2-checkbox input { + flex-shrink: 0; + margin: 0 0.4em; +} + +.swal2-input-label { + display: flex; + justify-content: center; + margin: 1em auto 0; +} + +.swal2-validation-message { + align-items: center; + justify-content: center; + margin: 1em 0 0; + padding: 0.625em; + overflow: hidden; + background: #f0f0f0; + color: #666666; + font-size: 1em; + font-weight: 300; +} +.swal2-validation-message::before { + content: "!"; + display: inline-block; + width: 1.5em; + min-width: 1.5em; + height: 1.5em; + margin: 0 0.625em; + border-radius: 50%; + background-color: #f27474; + color: #fff; + font-weight: 600; + line-height: 1.5em; + text-align: center; +} + +.swal2-icon { + position: relative; + box-sizing: content-box; + justify-content: center; + width: 5em; + height: 5em; + margin: 2.5em auto 0.6em; + border: 0.25em solid transparent; + border-radius: 50%; + border-color: #000; + font-family: inherit; + line-height: 5em; + cursor: default; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} +.swal2-icon .swal2-icon-content { + display: flex; + align-items: center; + font-size: 3.75em; +} +.swal2-icon.swal2-error { + border-color: #f27474; + color: #f27474; +} +.swal2-icon.swal2-error .swal2-x-mark { + position: relative; + flex-grow: 1; +} +.swal2-icon.swal2-error [class^=swal2-x-mark-line] { + display: block; + position: absolute; + top: 2.3125em; + width: 2.9375em; + height: 0.3125em; + border-radius: 0.125em; + background-color: #f27474; +} +.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left] { + left: 1.0625em; + transform: rotate(45deg); +} +.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right] { + right: 1em; + transform: rotate(-45deg); +} +.swal2-icon.swal2-error.swal2-icon-show { + -webkit-animation: swal2-animate-error-icon 0.5s; + animation: swal2-animate-error-icon 0.5s; +} +.swal2-icon.swal2-error.swal2-icon-show .swal2-x-mark { + -webkit-animation: swal2-animate-error-x-mark 0.5s; + animation: swal2-animate-error-x-mark 0.5s; +} +.swal2-icon.swal2-warning { + border-color: #facea8; + color: #f8bb86; +} +.swal2-icon.swal2-info { + border-color: #9de0f6; + color: #3fc3ee; +} +.swal2-icon.swal2-question { + border-color: #c9dae1; + color: #87adbd; +} +.swal2-icon.swal2-success { + border-color: #a5dc86; + color: #a5dc86; +} +.swal2-icon.swal2-success [class^=swal2-success-circular-line] { + position: absolute; + width: 3.75em; + height: 7.5em; + transform: rotate(45deg); + border-radius: 50%; +} +.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=left] { + top: -0.4375em; + left: -2.0635em; + transform: rotate(-45deg); + transform-origin: 3.75em 3.75em; + border-radius: 7.5em 0 0 7.5em; +} +.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=right] { + top: -0.6875em; + left: 1.875em; + transform: rotate(-45deg); + transform-origin: 0 3.75em; + border-radius: 0 7.5em 7.5em 0; +} +.swal2-icon.swal2-success .swal2-success-ring { + position: absolute; + z-index: 2; + top: -0.25em; + left: -0.25em; + box-sizing: content-box; + width: 100%; + height: 100%; + border: 0.25em solid rgba(165, 220, 134, 0.3); + border-radius: 50%; +} +.swal2-icon.swal2-success .swal2-success-fix { + position: absolute; + z-index: 1; + top: 0.5em; + left: 1.625em; + width: 0.4375em; + height: 5.625em; + transform: rotate(-45deg); +} +.swal2-icon.swal2-success [class^=swal2-success-line] { + display: block; + position: absolute; + z-index: 2; + height: 0.3125em; + border-radius: 0.125em; + background-color: #a5dc86; +} +.swal2-icon.swal2-success [class^=swal2-success-line][class$=tip] { + top: 2.875em; + left: 0.8125em; + width: 1.5625em; + transform: rotate(45deg); +} +.swal2-icon.swal2-success [class^=swal2-success-line][class$=long] { + top: 2.375em; + right: 0.5em; + width: 2.9375em; + transform: rotate(-45deg); +} +.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-tip { + -webkit-animation: swal2-animate-success-line-tip 0.75s; + animation: swal2-animate-success-line-tip 0.75s; +} +.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-long { + -webkit-animation: swal2-animate-success-line-long 0.75s; + animation: swal2-animate-success-line-long 0.75s; +} +.swal2-icon.swal2-success.swal2-icon-show .swal2-success-circular-line-right { + -webkit-animation: swal2-rotate-success-circular-line 4.25s ease-in; + animation: swal2-rotate-success-circular-line 4.25s ease-in; +} + +.swal2-progress-steps { + flex-wrap: wrap; + align-items: center; + max-width: 100%; + margin: 1.25em auto; + padding: 0; + background: inherit; + font-weight: 600; +} +.swal2-progress-steps li { + display: inline-block; + position: relative; +} +.swal2-progress-steps .swal2-progress-step { + z-index: 20; + flex-shrink: 0; + width: 2em; + height: 2em; + border-radius: 2em; + background: #2778c4; + color: #fff; + line-height: 2em; + text-align: center; +} +.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step { + background: #2778c4; +} +.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step ~ .swal2-progress-step { + background: #add8e6; + color: #fff; +} +.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step ~ .swal2-progress-step-line { + background: #add8e6; +} +.swal2-progress-steps .swal2-progress-step-line { + z-index: 10; + flex-shrink: 0; + width: 2.5em; + height: 0.4em; + margin: 0 -1px; + background: #2778c4; +} + +[class^=swal2] { + -webkit-tap-highlight-color: transparent; +} + +.swal2-show { + -webkit-animation: swal2-show 0.3s; + animation: swal2-show 0.3s; +} + +.swal2-hide { + -webkit-animation: swal2-hide 0.15s forwards; + animation: swal2-hide 0.15s forwards; +} + +.swal2-noanimation { + transition: none; +} + +.swal2-scrollbar-measure { + position: absolute; + top: -9999px; + width: 50px; + height: 50px; + overflow: scroll; +} + +.swal2-rtl .swal2-close { + margin-right: initial; + margin-left: 0; +} +.swal2-rtl .swal2-timer-progress-bar { + right: 0; + left: auto; +} + +@-webkit-keyframes swal2-toast-show { + 0% { + transform: translateY(-0.625em) rotateZ(2deg); + } + 33% { + transform: translateY(0) rotateZ(-2deg); + } + 66% { + transform: translateY(0.3125em) rotateZ(2deg); + } + 100% { + transform: translateY(0) rotateZ(0deg); + } +} + +@keyframes swal2-toast-show { + 0% { + transform: translateY(-0.625em) rotateZ(2deg); + } + 33% { + transform: translateY(0) rotateZ(-2deg); + } + 66% { + transform: translateY(0.3125em) rotateZ(2deg); + } + 100% { + transform: translateY(0) rotateZ(0deg); + } +} +@-webkit-keyframes swal2-toast-hide { + 100% { + transform: rotateZ(1deg); + opacity: 0; + } +} +@keyframes swal2-toast-hide { + 100% { + transform: rotateZ(1deg); + opacity: 0; + } +} +@-webkit-keyframes swal2-toast-animate-success-line-tip { + 0% { + top: 0.5625em; + left: 0.0625em; + width: 0; + } + 54% { + top: 0.125em; + left: 0.125em; + width: 0; + } + 70% { + top: 0.625em; + left: -0.25em; + width: 1.625em; + } + 84% { + top: 1.0625em; + left: 0.75em; + width: 0.5em; + } + 100% { + top: 1.125em; + left: 0.1875em; + width: 0.75em; + } +} +@keyframes swal2-toast-animate-success-line-tip { + 0% { + top: 0.5625em; + left: 0.0625em; + width: 0; + } + 54% { + top: 0.125em; + left: 0.125em; + width: 0; + } + 70% { + top: 0.625em; + left: -0.25em; + width: 1.625em; + } + 84% { + top: 1.0625em; + left: 0.75em; + width: 0.5em; + } + 100% { + top: 1.125em; + left: 0.1875em; + width: 0.75em; + } +} +@-webkit-keyframes swal2-toast-animate-success-line-long { + 0% { + top: 1.625em; + right: 1.375em; + width: 0; + } + 65% { + top: 1.25em; + right: 0.9375em; + width: 0; + } + 84% { + top: 0.9375em; + right: 0; + width: 1.125em; + } + 100% { + top: 0.9375em; + right: 0.1875em; + width: 1.375em; + } +} +@keyframes swal2-toast-animate-success-line-long { + 0% { + top: 1.625em; + right: 1.375em; + width: 0; + } + 65% { + top: 1.25em; + right: 0.9375em; + width: 0; + } + 84% { + top: 0.9375em; + right: 0; + width: 1.125em; + } + 100% { + top: 0.9375em; + right: 0.1875em; + width: 1.375em; + } +} +@-webkit-keyframes swal2-show { + 0% { + transform: scale(0.7); + } + 45% { + transform: scale(1.05); + } + 80% { + transform: scale(0.95); + } + 100% { + transform: scale(1); + } +} +@keyframes swal2-show { + 0% { + transform: scale(0.7); + } + 45% { + transform: scale(1.05); + } + 80% { + transform: scale(0.95); + } + 100% { + transform: scale(1); + } +} +@-webkit-keyframes swal2-hide { + 0% { + transform: scale(1); + opacity: 1; + } + 100% { + transform: scale(0.5); + opacity: 0; + } +} +@keyframes swal2-hide { + 0% { + transform: scale(1); + opacity: 1; + } + 100% { + transform: scale(0.5); + opacity: 0; + } +} +@-webkit-keyframes swal2-animate-success-line-tip { + 0% { + top: 1.1875em; + left: 0.0625em; + width: 0; + } + 54% { + top: 1.0625em; + left: 0.125em; + width: 0; + } + 70% { + top: 2.1875em; + left: -0.375em; + width: 3.125em; + } + 84% { + top: 3em; + left: 1.3125em; + width: 1.0625em; + } + 100% { + top: 2.8125em; + left: 0.8125em; + width: 1.5625em; + } +} +@keyframes swal2-animate-success-line-tip { + 0% { + top: 1.1875em; + left: 0.0625em; + width: 0; + } + 54% { + top: 1.0625em; + left: 0.125em; + width: 0; + } + 70% { + top: 2.1875em; + left: -0.375em; + width: 3.125em; + } + 84% { + top: 3em; + left: 1.3125em; + width: 1.0625em; + } + 100% { + top: 2.8125em; + left: 0.8125em; + width: 1.5625em; + } +} +@-webkit-keyframes swal2-animate-success-line-long { + 0% { + top: 3.375em; + right: 2.875em; + width: 0; + } + 65% { + top: 3.375em; + right: 2.875em; + width: 0; + } + 84% { + top: 2.1875em; + right: 0; + width: 3.4375em; + } + 100% { + top: 2.375em; + right: 0.5em; + width: 2.9375em; + } +} +@keyframes swal2-animate-success-line-long { + 0% { + top: 3.375em; + right: 2.875em; + width: 0; + } + 65% { + top: 3.375em; + right: 2.875em; + width: 0; + } + 84% { + top: 2.1875em; + right: 0; + width: 3.4375em; + } + 100% { + top: 2.375em; + right: 0.5em; + width: 2.9375em; + } +} +@-webkit-keyframes swal2-rotate-success-circular-line { + 0% { + transform: rotate(-45deg); + } + 5% { + transform: rotate(-45deg); + } + 12% { + transform: rotate(-405deg); + } + 100% { + transform: rotate(-405deg); + } +} +@keyframes swal2-rotate-success-circular-line { + 0% { + transform: rotate(-45deg); + } + 5% { + transform: rotate(-45deg); + } + 12% { + transform: rotate(-405deg); + } + 100% { + transform: rotate(-405deg); + } +} +@-webkit-keyframes swal2-animate-error-x-mark { + 0% { + margin-top: 1.625em; + transform: scale(0.4); + opacity: 0; + } + 50% { + margin-top: 1.625em; + transform: scale(0.4); + opacity: 0; + } + 80% { + margin-top: -0.375em; + transform: scale(1.15); + } + 100% { + margin-top: 0; + transform: scale(1); + opacity: 1; + } +} +@keyframes swal2-animate-error-x-mark { + 0% { + margin-top: 1.625em; + transform: scale(0.4); + opacity: 0; + } + 50% { + margin-top: 1.625em; + transform: scale(0.4); + opacity: 0; + } + 80% { + margin-top: -0.375em; + transform: scale(1.15); + } + 100% { + margin-top: 0; + transform: scale(1); + opacity: 1; + } +} +@-webkit-keyframes swal2-animate-error-icon { + 0% { + transform: rotateX(100deg); + opacity: 0; + } + 100% { + transform: rotateX(0deg); + opacity: 1; + } +} +@keyframes swal2-animate-error-icon { + 0% { + transform: rotateX(100deg); + opacity: 0; + } + 100% { + transform: rotateX(0deg); + opacity: 1; + } +} +@-webkit-keyframes swal2-rotate-loading { + 0% { + transform: rotate(0deg); + } + 100% { + transform: rotate(360deg); + } +} +@keyframes swal2-rotate-loading { + 0% { + transform: rotate(0deg); + } + 100% { + transform: rotate(360deg); + } +} +body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) { + overflow: hidden; +} +body.swal2-height-auto { + height: auto !important; +} +body.swal2-no-backdrop .swal2-container { + background-color: transparent !important; + pointer-events: none; +} +body.swal2-no-backdrop .swal2-container .swal2-popup { + pointer-events: all; +} +body.swal2-no-backdrop .swal2-container .swal2-modal { + box-shadow: 0 0 10px rgba(0, 0, 0, 0.4); +} +@media print { + body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) { + overflow-y: scroll !important; + } + body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) > [aria-hidden=true] { + display: none; + } + body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .swal2-container { + position: static !important; + } +} +body.swal2-toast-shown .swal2-container { + box-sizing: border-box; + width: 360px; + max-width: 100%; + background-color: transparent; + pointer-events: none; +} +body.swal2-toast-shown .swal2-container.swal2-top { + top: 0; + right: auto; + bottom: auto; + left: 50%; + transform: translateX(-50%); +} +body.swal2-toast-shown .swal2-container.swal2-top-end, body.swal2-toast-shown .swal2-container.swal2-top-right { + top: 0; + right: 0; + bottom: auto; + left: auto; +} +body.swal2-toast-shown .swal2-container.swal2-top-start, body.swal2-toast-shown .swal2-container.swal2-top-left { + top: 0; + right: auto; + bottom: auto; + left: 0; +} +body.swal2-toast-shown .swal2-container.swal2-center-start, body.swal2-toast-shown .swal2-container.swal2-center-left { + top: 50%; + right: auto; + bottom: auto; + left: 0; + transform: translateY(-50%); +} +body.swal2-toast-shown .swal2-container.swal2-center { + top: 50%; + right: auto; + bottom: auto; + left: 50%; + transform: translate(-50%, -50%); +} +body.swal2-toast-shown .swal2-container.swal2-center-end, body.swal2-toast-shown .swal2-container.swal2-center-right { + top: 50%; + right: 0; + bottom: auto; + left: auto; + transform: translateY(-50%); +} +body.swal2-toast-shown .swal2-container.swal2-bottom-start, body.swal2-toast-shown .swal2-container.swal2-bottom-left { + top: auto; + right: auto; + bottom: 0; + left: 0; +} +body.swal2-toast-shown .swal2-container.swal2-bottom { + top: auto; + right: auto; + bottom: 0; + left: 50%; + transform: translateX(-50%); +} +body.swal2-toast-shown .swal2-container.swal2-bottom-end, body.swal2-toast-shown .swal2-container.swal2-bottom-right { + top: auto; + right: 0; + bottom: 0; + left: auto; +} \ No newline at end of file diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Host/wwwroot/libs/sweetalert2/sweetalert2.js b/modules/cms-kit/host/Volo.CmsKit.Web.Host/wwwroot/libs/sweetalert2/sweetalert2.js new file mode 100644 index 0000000000..e9c254f064 --- /dev/null +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Host/wwwroot/libs/sweetalert2/sweetalert2.js @@ -0,0 +1,3121 @@ +/*! +* sweetalert2 v11.1.5 +* Released under the MIT License. +*/ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : + typeof define === 'function' && define.amd ? define(factory) : + (global = global || self, global.Sweetalert2 = factory()); +}(this, function () { 'use strict'; + + const DismissReason = Object.freeze({ + cancel: 'cancel', + backdrop: 'backdrop', + close: 'close', + esc: 'esc', + timer: 'timer' + }); + + const consolePrefix = 'SweetAlert2:'; + /** + * Filter the unique values into a new array + * @param arr + */ + + const uniqueArray = arr => { + const result = []; + + for (let i = 0; i < arr.length; i++) { + if (result.indexOf(arr[i]) === -1) { + result.push(arr[i]); + } + } + + return result; + }; + /** + * Capitalize the first letter of a string + * @param str + */ + + const capitalizeFirstLetter = str => str.charAt(0).toUpperCase() + str.slice(1); + /** + * Convert NodeList to Array + * @param nodeList + */ + + const toArray = nodeList => Array.prototype.slice.call(nodeList); + /** + * Standardise console warnings + * @param message + */ + + const warn = message => { + console.warn("".concat(consolePrefix, " ").concat(typeof message === 'object' ? message.join(' ') : message)); + }; + /** + * Standardise console errors + * @param message + */ + + const error = message => { + console.error("".concat(consolePrefix, " ").concat(message)); + }; + /** + * Private global state for `warnOnce` + * @type {Array} + * @private + */ + + const previousWarnOnceMessages = []; + /** + * Show a console warning, but only if it hasn't already been shown + * @param message + */ + + const warnOnce = message => { + if (!previousWarnOnceMessages.includes(message)) { + previousWarnOnceMessages.push(message); + warn(message); + } + }; + /** + * Show a one-time console warning about deprecated params/methods + */ + + const warnAboutDeprecation = (deprecatedParam, useInstead) => { + warnOnce("\"".concat(deprecatedParam, "\" is deprecated and will be removed in the next major release. Please use \"").concat(useInstead, "\" instead.")); + }; + /** + * If `arg` is a function, call it (with no arguments or context) and return the result. + * Otherwise, just pass the value through + * @param arg + */ + + const callIfFunction = arg => typeof arg === 'function' ? arg() : arg; + const hasToPromiseFn = arg => arg && typeof arg.toPromise === 'function'; + const asPromise = arg => hasToPromiseFn(arg) ? arg.toPromise() : Promise.resolve(arg); + const isPromise = arg => arg && Promise.resolve(arg) === arg; + + const isJqueryElement = elem => typeof elem === 'object' && elem.jquery; + + const isElement = elem => elem instanceof Element || isJqueryElement(elem); + + const argsToParams = args => { + const params = {}; + + if (typeof args[0] === 'object' && !isElement(args[0])) { + Object.assign(params, args[0]); + } else { + ['title', 'html', 'icon'].forEach((name, index) => { + const arg = args[index]; + + if (typeof arg === 'string' || isElement(arg)) { + params[name] = arg; + } else if (arg !== undefined) { + error("Unexpected type of ".concat(name, "! Expected \"string\" or \"Element\", got ").concat(typeof arg)); + } + }); + } + + return params; + }; + + const swalPrefix = 'swal2-'; + const prefix = items => { + const result = {}; + + for (const i in items) { + result[items[i]] = swalPrefix + items[i]; + } + + return result; + }; + const swalClasses = prefix(['container', 'shown', 'height-auto', 'iosfix', 'popup', 'modal', 'no-backdrop', 'no-transition', 'toast', 'toast-shown', 'show', 'hide', 'close', 'title', 'html-container', 'actions', 'confirm', 'deny', 'cancel', 'default-outline', 'footer', 'icon', 'icon-content', 'image', 'input', 'file', 'range', 'select', 'radio', 'checkbox', 'label', 'textarea', 'inputerror', 'input-label', 'validation-message', 'progress-steps', 'active-progress-step', 'progress-step', 'progress-step-line', 'loader', 'loading', 'styled', 'top', 'top-start', 'top-end', 'top-left', 'top-right', 'center', 'center-start', 'center-end', 'center-left', 'center-right', 'bottom', 'bottom-start', 'bottom-end', 'bottom-left', 'bottom-right', 'grow-row', 'grow-column', 'grow-fullscreen', 'rtl', 'timer-progress-bar', 'timer-progress-bar-container', 'scrollbar-measure', 'icon-success', 'icon-warning', 'icon-info', 'icon-question', 'icon-error']); + const iconTypes = prefix(['success', 'warning', 'info', 'question', 'error']); + + const getContainer = () => document.body.querySelector(".".concat(swalClasses.container)); + const elementBySelector = selectorString => { + const container = getContainer(); + return container ? container.querySelector(selectorString) : null; + }; + + const elementByClass = className => { + return elementBySelector(".".concat(className)); + }; + + const getPopup = () => elementByClass(swalClasses.popup); + const getIcon = () => elementByClass(swalClasses.icon); + const getTitle = () => elementByClass(swalClasses.title); + const getHtmlContainer = () => elementByClass(swalClasses['html-container']); + const getImage = () => elementByClass(swalClasses.image); + const getProgressSteps = () => elementByClass(swalClasses['progress-steps']); + const getValidationMessage = () => elementByClass(swalClasses['validation-message']); + const getConfirmButton = () => elementBySelector(".".concat(swalClasses.actions, " .").concat(swalClasses.confirm)); + const getDenyButton = () => elementBySelector(".".concat(swalClasses.actions, " .").concat(swalClasses.deny)); + const getInputLabel = () => elementByClass(swalClasses['input-label']); + const getLoader = () => elementBySelector(".".concat(swalClasses.loader)); + const getCancelButton = () => elementBySelector(".".concat(swalClasses.actions, " .").concat(swalClasses.cancel)); + const getActions = () => elementByClass(swalClasses.actions); + const getFooter = () => elementByClass(swalClasses.footer); + const getTimerProgressBar = () => elementByClass(swalClasses['timer-progress-bar']); + const getCloseButton = () => elementByClass(swalClasses.close); // https://github.com/jkup/focusable/blob/master/index.js + + const focusable = "\n a[href],\n area[href],\n input:not([disabled]),\n select:not([disabled]),\n textarea:not([disabled]),\n button:not([disabled]),\n iframe,\n object,\n embed,\n [tabindex=\"0\"],\n [contenteditable],\n audio[controls],\n video[controls],\n summary\n"; + const getFocusableElements = () => { + const focusableElementsWithTabindex = toArray(getPopup().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')) // sort according to tabindex + .sort((a, b) => { + a = parseInt(a.getAttribute('tabindex')); + b = parseInt(b.getAttribute('tabindex')); + + if (a > b) { + return 1; + } else if (a < b) { + return -1; + } + + return 0; + }); + const otherFocusableElements = toArray(getPopup().querySelectorAll(focusable)).filter(el => el.getAttribute('tabindex') !== '-1'); + return uniqueArray(focusableElementsWithTabindex.concat(otherFocusableElements)).filter(el => isVisible(el)); + }; + const isModal = () => { + return !isToast() && !document.body.classList.contains(swalClasses['no-backdrop']); + }; + const isToast = () => { + return document.body.classList.contains(swalClasses['toast-shown']); + }; + const isLoading = () => { + return getPopup().hasAttribute('data-loading'); + }; + + const states = { + previousBodyPadding: null + }; + const setInnerHtml = (elem, html) => { + // #1926 + elem.textContent = ''; + + if (html) { + const parser = new DOMParser(); + const parsed = parser.parseFromString(html, "text/html"); + toArray(parsed.querySelector('head').childNodes).forEach(child => { + elem.appendChild(child); + }); + toArray(parsed.querySelector('body').childNodes).forEach(child => { + elem.appendChild(child); + }); + } + }; + const hasClass = (elem, className) => { + if (!className) { + return false; + } + + const classList = className.split(/\s+/); + + for (let i = 0; i < classList.length; i++) { + if (!elem.classList.contains(classList[i])) { + return false; + } + } + + return true; + }; + + const removeCustomClasses = (elem, params) => { + toArray(elem.classList).forEach(className => { + if (!Object.values(swalClasses).includes(className) && !Object.values(iconTypes).includes(className) && !Object.values(params.showClass).includes(className)) { + elem.classList.remove(className); + } + }); + }; + + const applyCustomClass = (elem, params, className) => { + removeCustomClasses(elem, params); + + if (params.customClass && params.customClass[className]) { + if (typeof params.customClass[className] !== 'string' && !params.customClass[className].forEach) { + return warn("Invalid type of customClass.".concat(className, "! Expected string or iterable object, got \"").concat(typeof params.customClass[className], "\"")); + } + + addClass(elem, params.customClass[className]); + } + }; + const getInput = (popup, inputType) => { + if (!inputType) { + return null; + } + + switch (inputType) { + case 'select': + case 'textarea': + case 'file': + return getChildByClass(popup, swalClasses[inputType]); + + case 'checkbox': + return popup.querySelector(".".concat(swalClasses.checkbox, " input")); + + case 'radio': + return popup.querySelector(".".concat(swalClasses.radio, " input:checked")) || popup.querySelector(".".concat(swalClasses.radio, " input:first-child")); + + case 'range': + return popup.querySelector(".".concat(swalClasses.range, " input")); + + default: + return getChildByClass(popup, swalClasses.input); + } + }; + const focusInput = input => { + input.focus(); // place cursor at end of text in text input + + if (input.type !== 'file') { + // http://stackoverflow.com/a/2345915 + const val = input.value; + input.value = ''; + input.value = val; + } + }; + const toggleClass = (target, classList, condition) => { + if (!target || !classList) { + return; + } + + if (typeof classList === 'string') { + classList = classList.split(/\s+/).filter(Boolean); + } + + classList.forEach(className => { + if (target.forEach) { + target.forEach(elem => { + condition ? elem.classList.add(className) : elem.classList.remove(className); + }); + } else { + condition ? target.classList.add(className) : target.classList.remove(className); + } + }); + }; + const addClass = (target, classList) => { + toggleClass(target, classList, true); + }; + const removeClass = (target, classList) => { + toggleClass(target, classList, false); + }; + const getChildByClass = (elem, className) => { + for (let i = 0; i < elem.childNodes.length; i++) { + if (hasClass(elem.childNodes[i], className)) { + return elem.childNodes[i]; + } + } + }; + const applyNumericalStyle = (elem, property, value) => { + if (value === "".concat(parseInt(value))) { + value = parseInt(value); + } + + if (value || parseInt(value) === 0) { + elem.style[property] = typeof value === 'number' ? "".concat(value, "px") : value; + } else { + elem.style.removeProperty(property); + } + }; + const show = (elem, display = 'flex') => { + elem.style.display = display; + }; + const hide = elem => { + elem.style.display = 'none'; + }; + const setStyle = (parent, selector, property, value) => { + const el = parent.querySelector(selector); + + if (el) { + el.style[property] = value; + } + }; + const toggle = (elem, condition, display) => { + condition ? show(elem, display) : hide(elem); + }; // borrowed from jquery $(elem).is(':visible') implementation + + const isVisible = elem => !!(elem && (elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length)); + const allButtonsAreHidden = () => !isVisible(getConfirmButton()) && !isVisible(getDenyButton()) && !isVisible(getCancelButton()); + const isScrollable = elem => !!(elem.scrollHeight > elem.clientHeight); // borrowed from https://stackoverflow.com/a/46352119 + + const hasCssAnimation = elem => { + const style = window.getComputedStyle(elem); + const animDuration = parseFloat(style.getPropertyValue('animation-duration') || '0'); + const transDuration = parseFloat(style.getPropertyValue('transition-duration') || '0'); + return animDuration > 0 || transDuration > 0; + }; + const animateTimerProgressBar = (timer, reset = false) => { + const timerProgressBar = getTimerProgressBar(); + + if (isVisible(timerProgressBar)) { + if (reset) { + timerProgressBar.style.transition = 'none'; + timerProgressBar.style.width = '100%'; + } + + setTimeout(() => { + timerProgressBar.style.transition = "width ".concat(timer / 1000, "s linear"); + timerProgressBar.style.width = '0%'; + }, 10); + } + }; + const stopTimerProgressBar = () => { + const timerProgressBar = getTimerProgressBar(); + const timerProgressBarWidth = parseInt(window.getComputedStyle(timerProgressBar).width); + timerProgressBar.style.removeProperty('transition'); + timerProgressBar.style.width = '100%'; + const timerProgressBarFullWidth = parseInt(window.getComputedStyle(timerProgressBar).width); + const timerProgressBarPercent = parseInt(timerProgressBarWidth / timerProgressBarFullWidth * 100); + timerProgressBar.style.removeProperty('transition'); + timerProgressBar.style.width = "".concat(timerProgressBarPercent, "%"); + }; + + // Detect Node env + const isNodeEnv = () => typeof window === 'undefined' || typeof document === 'undefined'; + + const sweetHTML = "\n
                      \n \n
                        \n
                        \n \n

                        \n
                        \n \n \n
                        \n \n \n
                        \n \n
                        \n \n \n
                        \n
                        \n
                        \n \n \n \n
                        \n
                        \n
                        \n
                        \n
                        \n
                        \n").replace(/(^|\n)\s*/g, ''); + + const resetOldContainer = () => { + const oldContainer = getContainer(); + + if (!oldContainer) { + return false; + } + + oldContainer.remove(); + removeClass([document.documentElement, document.body], [swalClasses['no-backdrop'], swalClasses['toast-shown'], swalClasses['has-column']]); + return true; + }; + + const resetValidationMessage = () => { + if (Swal.isVisible()) { + Swal.resetValidationMessage(); + } + }; + + const addInputChangeListeners = () => { + const popup = getPopup(); + const input = getChildByClass(popup, swalClasses.input); + const file = getChildByClass(popup, swalClasses.file); + const range = popup.querySelector(".".concat(swalClasses.range, " input")); + const rangeOutput = popup.querySelector(".".concat(swalClasses.range, " output")); + const select = getChildByClass(popup, swalClasses.select); + const checkbox = popup.querySelector(".".concat(swalClasses.checkbox, " input")); + const textarea = getChildByClass(popup, swalClasses.textarea); + input.oninput = resetValidationMessage; + file.onchange = resetValidationMessage; + select.onchange = resetValidationMessage; + checkbox.onchange = resetValidationMessage; + textarea.oninput = resetValidationMessage; + + range.oninput = () => { + resetValidationMessage(); + rangeOutput.value = range.value; + }; + + range.onchange = () => { + resetValidationMessage(); + range.nextSibling.value = range.value; + }; + }; + + const getTarget = target => typeof target === 'string' ? document.querySelector(target) : target; + + const setupAccessibility = params => { + const popup = getPopup(); + popup.setAttribute('role', params.toast ? 'alert' : 'dialog'); + popup.setAttribute('aria-live', params.toast ? 'polite' : 'assertive'); + + if (!params.toast) { + popup.setAttribute('aria-modal', 'true'); + } + }; + + const setupRTL = targetElement => { + if (window.getComputedStyle(targetElement).direction === 'rtl') { + addClass(getContainer(), swalClasses.rtl); + } + }; + /* + * Add modal + backdrop to DOM + */ + + + const init = params => { + // Clean up the old popup container if it exists + const oldContainerExisted = resetOldContainer(); + /* istanbul ignore if */ + + if (isNodeEnv()) { + error('SweetAlert2 requires document to initialize'); + return; + } + + const container = document.createElement('div'); + container.className = swalClasses.container; + + if (oldContainerExisted) { + addClass(container, swalClasses['no-transition']); + } + + setInnerHtml(container, sweetHTML); + const targetElement = getTarget(params.target); + targetElement.appendChild(container); + setupAccessibility(params); + setupRTL(targetElement); + addInputChangeListeners(); + }; + + const parseHtmlToContainer = (param, target) => { + // DOM element + if (param instanceof HTMLElement) { + target.appendChild(param); // Object + } else if (typeof param === 'object') { + handleObject(param, target); // Plain string + } else if (param) { + setInnerHtml(target, param); + } + }; + + const handleObject = (param, target) => { + // JQuery element(s) + if (param.jquery) { + handleJqueryElem(target, param); // For other objects use their string representation + } else { + setInnerHtml(target, param.toString()); + } + }; + + const handleJqueryElem = (target, elem) => { + target.textContent = ''; + + if (0 in elem) { + for (let i = 0; (i in elem); i++) { + target.appendChild(elem[i].cloneNode(true)); + } + } else { + target.appendChild(elem.cloneNode(true)); + } + }; + + const animationEndEvent = (() => { + // Prevent run in Node env + + /* istanbul ignore if */ + if (isNodeEnv()) { + return false; + } + + const testEl = document.createElement('div'); + const transEndEventNames = { + WebkitAnimation: 'webkitAnimationEnd', + OAnimation: 'oAnimationEnd oanimationend', + animation: 'animationend' + }; + + for (const i in transEndEventNames) { + if (Object.prototype.hasOwnProperty.call(transEndEventNames, i) && typeof testEl.style[i] !== 'undefined') { + return transEndEventNames[i]; + } + } + + return false; + })(); + + // https://github.com/twbs/bootstrap/blob/master/js/src/modal.js + + const measureScrollbar = () => { + const scrollDiv = document.createElement('div'); + scrollDiv.className = swalClasses['scrollbar-measure']; + document.body.appendChild(scrollDiv); + const scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth; + document.body.removeChild(scrollDiv); + return scrollbarWidth; + }; + + const renderActions = (instance, params) => { + const actions = getActions(); + const loader = getLoader(); + const confirmButton = getConfirmButton(); + const denyButton = getDenyButton(); + const cancelButton = getCancelButton(); // Actions (buttons) wrapper + + if (!params.showConfirmButton && !params.showDenyButton && !params.showCancelButton) { + hide(actions); + } else { + show(actions); + } // Custom class + + + applyCustomClass(actions, params, 'actions'); // Render buttons + + renderButton(confirmButton, 'confirm', params); + renderButton(denyButton, 'deny', params); + renderButton(cancelButton, 'cancel', params); + handleButtonsStyling(confirmButton, denyButton, cancelButton, params); + + if (params.reverseButtons) { + actions.insertBefore(cancelButton, loader); + actions.insertBefore(denyButton, loader); + actions.insertBefore(confirmButton, loader); + } // Loader + + + setInnerHtml(loader, params.loaderHtml); + applyCustomClass(loader, params, 'loader'); + }; + + function handleButtonsStyling(confirmButton, denyButton, cancelButton, params) { + if (!params.buttonsStyling) { + return removeClass([confirmButton, denyButton, cancelButton], swalClasses.styled); + } + + addClass([confirmButton, denyButton, cancelButton], swalClasses.styled); // Buttons background colors + + if (params.confirmButtonColor) { + confirmButton.style.backgroundColor = params.confirmButtonColor; + addClass(confirmButton, swalClasses['default-outline']); + } + + if (params.denyButtonColor) { + denyButton.style.backgroundColor = params.denyButtonColor; + addClass(denyButton, swalClasses['default-outline']); + } + + if (params.cancelButtonColor) { + cancelButton.style.backgroundColor = params.cancelButtonColor; + addClass(cancelButton, swalClasses['default-outline']); + } + } + + function renderButton(button, buttonType, params) { + toggle(button, params["show".concat(capitalizeFirstLetter(buttonType), "Button")], 'inline-block'); + setInnerHtml(button, params["".concat(buttonType, "ButtonText")]); // Set caption text + + button.setAttribute('aria-label', params["".concat(buttonType, "ButtonAriaLabel")]); // ARIA label + // Add buttons custom classes + + button.className = swalClasses[buttonType]; + applyCustomClass(button, params, "".concat(buttonType, "Button")); + addClass(button, params["".concat(buttonType, "ButtonClass")]); + } + + function handleBackdropParam(container, backdrop) { + if (typeof backdrop === 'string') { + container.style.background = backdrop; + } else if (!backdrop) { + addClass([document.documentElement, document.body], swalClasses['no-backdrop']); + } + } + + function handlePositionParam(container, position) { + if (position in swalClasses) { + addClass(container, swalClasses[position]); + } else { + warn('The "position" parameter is not valid, defaulting to "center"'); + addClass(container, swalClasses.center); + } + } + + function handleGrowParam(container, grow) { + if (grow && typeof grow === 'string') { + const growClass = "grow-".concat(grow); + + if (growClass in swalClasses) { + addClass(container, swalClasses[growClass]); + } + } + } + + const renderContainer = (instance, params) => { + const container = getContainer(); + + if (!container) { + return; + } + + handleBackdropParam(container, params.backdrop); + handlePositionParam(container, params.position); + handleGrowParam(container, params.grow); // Custom class + + applyCustomClass(container, params, 'container'); + }; + + /** + * This module containts `WeakMap`s for each effectively-"private property" that a `Swal` has. + * For example, to set the private property "foo" of `this` to "bar", you can `privateProps.foo.set(this, 'bar')` + * This is the approach that Babel will probably take to implement private methods/fields + * https://github.com/tc39/proposal-private-methods + * https://github.com/babel/babel/pull/7555 + * Once we have the changes from that PR in Babel, and our core class fits reasonable in *one module* + * then we can use that language feature. + */ + var privateProps = { + promise: new WeakMap(), + innerParams: new WeakMap(), + domCache: new WeakMap() + }; + + const inputTypes = ['input', 'file', 'range', 'select', 'radio', 'checkbox', 'textarea']; + const renderInput = (instance, params) => { + const popup = getPopup(); + const innerParams = privateProps.innerParams.get(instance); + const rerender = !innerParams || params.input !== innerParams.input; + inputTypes.forEach(inputType => { + const inputClass = swalClasses[inputType]; + const inputContainer = getChildByClass(popup, inputClass); // set attributes + + setAttributes(inputType, params.inputAttributes); // set class + + inputContainer.className = inputClass; + + if (rerender) { + hide(inputContainer); + } + }); + + if (params.input) { + if (rerender) { + showInput(params); + } // set custom class + + + setCustomClass(params); + } + }; + + const showInput = params => { + if (!renderInputType[params.input]) { + return error("Unexpected type of input! Expected \"text\", \"email\", \"password\", \"number\", \"tel\", \"select\", \"radio\", \"checkbox\", \"textarea\", \"file\" or \"url\", got \"".concat(params.input, "\"")); + } + + const inputContainer = getInputContainer(params.input); + const input = renderInputType[params.input](inputContainer, params); + show(input); // input autofocus + + setTimeout(() => { + focusInput(input); + }); + }; + + const removeAttributes = input => { + for (let i = 0; i < input.attributes.length; i++) { + const attrName = input.attributes[i].name; + + if (!['type', 'value', 'style'].includes(attrName)) { + input.removeAttribute(attrName); + } + } + }; + + const setAttributes = (inputType, inputAttributes) => { + const input = getInput(getPopup(), inputType); + + if (!input) { + return; + } + + removeAttributes(input); + + for (const attr in inputAttributes) { + input.setAttribute(attr, inputAttributes[attr]); + } + }; + + const setCustomClass = params => { + const inputContainer = getInputContainer(params.input); + + if (params.customClass) { + addClass(inputContainer, params.customClass.input); + } + }; + + const setInputPlaceholder = (input, params) => { + if (!input.placeholder || params.inputPlaceholder) { + input.placeholder = params.inputPlaceholder; + } + }; + + const setInputLabel = (input, prependTo, params) => { + if (params.inputLabel) { + input.id = swalClasses.input; + const label = document.createElement('label'); + const labelClass = swalClasses['input-label']; + label.setAttribute('for', input.id); + label.className = labelClass; + addClass(label, params.customClass.inputLabel); + label.innerText = params.inputLabel; + prependTo.insertAdjacentElement('beforebegin', label); + } + }; + + const getInputContainer = inputType => { + const inputClass = swalClasses[inputType] ? swalClasses[inputType] : swalClasses.input; + return getChildByClass(getPopup(), inputClass); + }; + + const renderInputType = {}; + + renderInputType.text = renderInputType.email = renderInputType.password = renderInputType.number = renderInputType.tel = renderInputType.url = (input, params) => { + if (typeof params.inputValue === 'string' || typeof params.inputValue === 'number') { + input.value = params.inputValue; + } else if (!isPromise(params.inputValue)) { + warn("Unexpected type of inputValue! Expected \"string\", \"number\" or \"Promise\", got \"".concat(typeof params.inputValue, "\"")); + } + + setInputLabel(input, input, params); + setInputPlaceholder(input, params); + input.type = params.input; + return input; + }; + + renderInputType.file = (input, params) => { + setInputLabel(input, input, params); + setInputPlaceholder(input, params); + return input; + }; + + renderInputType.range = (range, params) => { + const rangeInput = range.querySelector('input'); + const rangeOutput = range.querySelector('output'); + rangeInput.value = params.inputValue; + rangeInput.type = params.input; + rangeOutput.value = params.inputValue; + setInputLabel(rangeInput, range, params); + return range; + }; + + renderInputType.select = (select, params) => { + select.textContent = ''; + + if (params.inputPlaceholder) { + const placeholder = document.createElement('option'); + setInnerHtml(placeholder, params.inputPlaceholder); + placeholder.value = ''; + placeholder.disabled = true; + placeholder.selected = true; + select.appendChild(placeholder); + } + + setInputLabel(select, select, params); + return select; + }; + + renderInputType.radio = radio => { + radio.textContent = ''; + return radio; + }; + + renderInputType.checkbox = (checkboxContainer, params) => { + const checkbox = getInput(getPopup(), 'checkbox'); + checkbox.value = 1; + checkbox.id = swalClasses.checkbox; + checkbox.checked = Boolean(params.inputValue); + const label = checkboxContainer.querySelector('span'); + setInnerHtml(label, params.inputPlaceholder); + return checkboxContainer; + }; + + renderInputType.textarea = (textarea, params) => { + textarea.value = params.inputValue; + setInputPlaceholder(textarea, params); + setInputLabel(textarea, textarea, params); + + const getMargin = el => parseInt(window.getComputedStyle(el).marginLeft) + parseInt(window.getComputedStyle(el).marginRight); + + setTimeout(() => { + // #2291 + if ('MutationObserver' in window) { + // #1699 + const initialPopupWidth = parseInt(window.getComputedStyle(getPopup()).width); + + const textareaResizeHandler = () => { + const textareaWidth = textarea.offsetWidth + getMargin(textarea); + + if (textareaWidth > initialPopupWidth) { + getPopup().style.width = "".concat(textareaWidth, "px"); + } else { + getPopup().style.width = null; + } + }; + + new MutationObserver(textareaResizeHandler).observe(textarea, { + attributes: true, + attributeFilter: ['style'] + }); + } + }); + return textarea; + }; + + const renderContent = (instance, params) => { + const htmlContainer = getHtmlContainer(); + applyCustomClass(htmlContainer, params, 'htmlContainer'); // Content as HTML + + if (params.html) { + parseHtmlToContainer(params.html, htmlContainer); + show(htmlContainer, 'block'); // Content as plain text + } else if (params.text) { + htmlContainer.textContent = params.text; + show(htmlContainer, 'block'); // No content + } else { + hide(htmlContainer); + } + + renderInput(instance, params); + }; + + const renderFooter = (instance, params) => { + const footer = getFooter(); + toggle(footer, params.footer); + + if (params.footer) { + parseHtmlToContainer(params.footer, footer); + } // Custom class + + + applyCustomClass(footer, params, 'footer'); + }; + + const renderCloseButton = (instance, params) => { + const closeButton = getCloseButton(); + setInnerHtml(closeButton, params.closeButtonHtml); // Custom class + + applyCustomClass(closeButton, params, 'closeButton'); + toggle(closeButton, params.showCloseButton); + closeButton.setAttribute('aria-label', params.closeButtonAriaLabel); + }; + + const renderIcon = (instance, params) => { + const innerParams = privateProps.innerParams.get(instance); + const icon = getIcon(); // if the given icon already rendered, apply the styling without re-rendering the icon + + if (innerParams && params.icon === innerParams.icon) { + // Custom or default content + setContent(icon, params); + applyStyles(icon, params); + return; + } + + if (!params.icon && !params.iconHtml) { + return hide(icon); + } + + if (params.icon && Object.keys(iconTypes).indexOf(params.icon) === -1) { + error("Unknown icon! Expected \"success\", \"error\", \"warning\", \"info\" or \"question\", got \"".concat(params.icon, "\"")); + return hide(icon); + } + + show(icon); // Custom or default content + + setContent(icon, params); + applyStyles(icon, params); // Animate icon + + addClass(icon, params.showClass.icon); + }; + + const applyStyles = (icon, params) => { + for (const iconType in iconTypes) { + if (params.icon !== iconType) { + removeClass(icon, iconTypes[iconType]); + } + } + + addClass(icon, iconTypes[params.icon]); // Icon color + + setColor(icon, params); // Success icon background color + + adjustSuccessIconBackgoundColor(); // Custom class + + applyCustomClass(icon, params, 'icon'); + }; // Adjust success icon background color to match the popup background color + + + const adjustSuccessIconBackgoundColor = () => { + const popup = getPopup(); + const popupBackgroundColor = window.getComputedStyle(popup).getPropertyValue('background-color'); + const successIconParts = popup.querySelectorAll('[class^=swal2-success-circular-line], .swal2-success-fix'); + + for (let i = 0; i < successIconParts.length; i++) { + successIconParts[i].style.backgroundColor = popupBackgroundColor; + } + }; + + const setContent = (icon, params) => { + icon.textContent = ''; + + if (params.iconHtml) { + setInnerHtml(icon, iconContent(params.iconHtml)); + } else if (params.icon === 'success') { + setInnerHtml(icon, "\n
                        \n \n
                        \n
                        \n "); + } else if (params.icon === 'error') { + setInnerHtml(icon, "\n \n \n \n \n "); + } else { + const defaultIconHtml = { + question: '?', + warning: '!', + info: 'i' + }; + setInnerHtml(icon, iconContent(defaultIconHtml[params.icon])); + } + }; + + const setColor = (icon, params) => { + if (!params.iconColor) { + return; + } + + icon.style.color = params.iconColor; + icon.style.borderColor = params.iconColor; + + for (const sel of ['.swal2-success-line-tip', '.swal2-success-line-long', '.swal2-x-mark-line-left', '.swal2-x-mark-line-right']) { + setStyle(icon, sel, 'backgroundColor', params.iconColor); + } + + setStyle(icon, '.swal2-success-ring', 'borderColor', params.iconColor); + }; + + const iconContent = content => "
                        ").concat(content, "
                        "); + + const renderImage = (instance, params) => { + const image = getImage(); + + if (!params.imageUrl) { + return hide(image); + } + + show(image, ''); // Src, alt + + image.setAttribute('src', params.imageUrl); + image.setAttribute('alt', params.imageAlt); // Width, height + + applyNumericalStyle(image, 'width', params.imageWidth); + applyNumericalStyle(image, 'height', params.imageHeight); // Class + + image.className = swalClasses.image; + applyCustomClass(image, params, 'image'); + }; + + const createStepElement = step => { + const stepEl = document.createElement('li'); + addClass(stepEl, swalClasses['progress-step']); + setInnerHtml(stepEl, step); + return stepEl; + }; + + const createLineElement = params => { + const lineEl = document.createElement('li'); + addClass(lineEl, swalClasses['progress-step-line']); + + if (params.progressStepsDistance) { + lineEl.style.width = params.progressStepsDistance; + } + + return lineEl; + }; + + const renderProgressSteps = (instance, params) => { + const progressStepsContainer = getProgressSteps(); + + if (!params.progressSteps || params.progressSteps.length === 0) { + return hide(progressStepsContainer); + } + + show(progressStepsContainer); + progressStepsContainer.textContent = ''; + + if (params.currentProgressStep >= params.progressSteps.length) { + warn('Invalid currentProgressStep parameter, it should be less than progressSteps.length ' + '(currentProgressStep like JS arrays starts from 0)'); + } + + params.progressSteps.forEach((step, index) => { + const stepEl = createStepElement(step); + progressStepsContainer.appendChild(stepEl); + + if (index === params.currentProgressStep) { + addClass(stepEl, swalClasses['active-progress-step']); + } + + if (index !== params.progressSteps.length - 1) { + const lineEl = createLineElement(params); + progressStepsContainer.appendChild(lineEl); + } + }); + }; + + const renderTitle = (instance, params) => { + const title = getTitle(); + toggle(title, params.title || params.titleText, 'block'); + + if (params.title) { + parseHtmlToContainer(params.title, title); + } + + if (params.titleText) { + title.innerText = params.titleText; + } // Custom class + + + applyCustomClass(title, params, 'title'); + }; + + const renderPopup = (instance, params) => { + const container = getContainer(); + const popup = getPopup(); // Width + + if (params.toast) { + // #2170 + applyNumericalStyle(container, 'width', params.width); + popup.style.width = '100%'; + popup.insertBefore(getLoader(), getIcon()); + } else { + applyNumericalStyle(popup, 'width', params.width); + } // Padding + + + applyNumericalStyle(popup, 'padding', params.padding); // Background + + if (params.background) { + popup.style.background = params.background; + } + + hide(getValidationMessage()); // Classes + + addClasses(popup, params); + }; + + const addClasses = (popup, params) => { + // Default Class + showClass when updating Swal.update({}) + popup.className = "".concat(swalClasses.popup, " ").concat(isVisible(popup) ? params.showClass.popup : ''); + + if (params.toast) { + addClass([document.documentElement, document.body], swalClasses['toast-shown']); + addClass(popup, swalClasses.toast); + } else { + addClass(popup, swalClasses.modal); + } // Custom class + + + applyCustomClass(popup, params, 'popup'); + + if (typeof params.customClass === 'string') { + addClass(popup, params.customClass); + } // Icon class (#1842) + + + if (params.icon) { + addClass(popup, swalClasses["icon-".concat(params.icon)]); + } + }; + + const render = (instance, params) => { + renderPopup(instance, params); + renderContainer(instance, params); + renderProgressSteps(instance, params); + renderIcon(instance, params); + renderImage(instance, params); + renderTitle(instance, params); + renderCloseButton(instance, params); + renderContent(instance, params); + renderActions(instance, params); + renderFooter(instance, params); + + if (typeof params.didRender === 'function') { + params.didRender(getPopup()); + } + }; + + /* + * Global function to determine if SweetAlert2 popup is shown + */ + + const isVisible$1 = () => { + return isVisible(getPopup()); + }; + /* + * Global function to click 'Confirm' button + */ + + const clickConfirm = () => getConfirmButton() && getConfirmButton().click(); + /* + * Global function to click 'Deny' button + */ + + const clickDeny = () => getDenyButton() && getDenyButton().click(); + /* + * Global function to click 'Cancel' button + */ + + const clickCancel = () => getCancelButton() && getCancelButton().click(); + + function fire(...args) { + const Swal = this; + return new Swal(...args); + } + + /** + * Returns an extended version of `Swal` containing `params` as defaults. + * Useful for reusing Swal configuration. + * + * For example: + * + * Before: + * const textPromptOptions = { input: 'text', showCancelButton: true } + * const {value: firstName} = await Swal.fire({ ...textPromptOptions, title: 'What is your first name?' }) + * const {value: lastName} = await Swal.fire({ ...textPromptOptions, title: 'What is your last name?' }) + * + * After: + * const TextPrompt = Swal.mixin({ input: 'text', showCancelButton: true }) + * const {value: firstName} = await TextPrompt('What is your first name?') + * const {value: lastName} = await TextPrompt('What is your last name?') + * + * @param mixinParams + */ + function mixin(mixinParams) { + class MixinSwal extends this { + _main(params, priorityMixinParams) { + return super._main(params, Object.assign({}, mixinParams, priorityMixinParams)); + } + + } + + return MixinSwal; + } + + /** + * Shows loader (spinner), this is useful with AJAX requests. + * By default the loader be shown instead of the "Confirm" button. + */ + + const showLoading = buttonToReplace => { + let popup = getPopup(); + + if (!popup) { + Swal.fire(); + } + + popup = getPopup(); + const loader = getLoader(); + + if (isToast()) { + hide(getIcon()); + } else { + replaceButton(popup, buttonToReplace); + } + + show(loader); + popup.setAttribute('data-loading', true); + popup.setAttribute('aria-busy', true); + popup.focus(); + }; + + const replaceButton = (popup, buttonToReplace) => { + const actions = getActions(); + const loader = getLoader(); + + if (!buttonToReplace && isVisible(getConfirmButton())) { + buttonToReplace = getConfirmButton(); + } + + show(actions); + + if (buttonToReplace) { + hide(buttonToReplace); + loader.setAttribute('data-button-to-replace', buttonToReplace.className); + } + + loader.parentNode.insertBefore(loader, buttonToReplace); + addClass([popup, actions], swalClasses.loading); + }; + + const RESTORE_FOCUS_TIMEOUT = 100; + + const globalState = {}; + + const focusPreviousActiveElement = () => { + if (globalState.previousActiveElement && globalState.previousActiveElement.focus) { + globalState.previousActiveElement.focus(); + globalState.previousActiveElement = null; + } else if (document.body) { + document.body.focus(); + } + }; // Restore previous active (focused) element + + + const restoreActiveElement = returnFocus => { + return new Promise(resolve => { + if (!returnFocus) { + return resolve(); + } + + const x = window.scrollX; + const y = window.scrollY; + globalState.restoreFocusTimeout = setTimeout(() => { + focusPreviousActiveElement(); + resolve(); + }, RESTORE_FOCUS_TIMEOUT); // issues/900 + + window.scrollTo(x, y); + }); + }; + + /** + * If `timer` parameter is set, returns number of milliseconds of timer remained. + * Otherwise, returns undefined. + */ + + const getTimerLeft = () => { + return globalState.timeout && globalState.timeout.getTimerLeft(); + }; + /** + * Stop timer. Returns number of milliseconds of timer remained. + * If `timer` parameter isn't set, returns undefined. + */ + + const stopTimer = () => { + if (globalState.timeout) { + stopTimerProgressBar(); + return globalState.timeout.stop(); + } + }; + /** + * Resume timer. Returns number of milliseconds of timer remained. + * If `timer` parameter isn't set, returns undefined. + */ + + const resumeTimer = () => { + if (globalState.timeout) { + const remaining = globalState.timeout.start(); + animateTimerProgressBar(remaining); + return remaining; + } + }; + /** + * Resume timer. Returns number of milliseconds of timer remained. + * If `timer` parameter isn't set, returns undefined. + */ + + const toggleTimer = () => { + const timer = globalState.timeout; + return timer && (timer.running ? stopTimer() : resumeTimer()); + }; + /** + * Increase timer. Returns number of milliseconds of an updated timer. + * If `timer` parameter isn't set, returns undefined. + */ + + const increaseTimer = n => { + if (globalState.timeout) { + const remaining = globalState.timeout.increase(n); + animateTimerProgressBar(remaining, true); + return remaining; + } + }; + /** + * Check if timer is running. Returns true if timer is running + * or false if timer is paused or stopped. + * If `timer` parameter isn't set, returns undefined + */ + + const isTimerRunning = () => { + return globalState.timeout && globalState.timeout.isRunning(); + }; + + let bodyClickListenerAdded = false; + const clickHandlers = {}; + function bindClickHandler(attr = 'data-swal-template') { + clickHandlers[attr] = this; + + if (!bodyClickListenerAdded) { + document.body.addEventListener('click', bodyClickListener); + bodyClickListenerAdded = true; + } + } + + const bodyClickListener = event => { + // TODO: replace with event.composedPath() + for (let el = event.target; el && el !== document; el = el.parentNode) { + for (const attr in clickHandlers) { + const template = el.getAttribute(attr); + + if (template) { + clickHandlers[attr].fire({ + template + }); + return; + } + } + } + }; + + const defaultParams = { + title: '', + titleText: '', + text: '', + html: '', + footer: '', + icon: undefined, + iconColor: undefined, + iconHtml: undefined, + template: undefined, + toast: false, + showClass: { + popup: 'swal2-show', + backdrop: 'swal2-backdrop-show', + icon: 'swal2-icon-show' + }, + hideClass: { + popup: 'swal2-hide', + backdrop: 'swal2-backdrop-hide', + icon: 'swal2-icon-hide' + }, + customClass: {}, + target: 'body', + backdrop: true, + heightAuto: true, + allowOutsideClick: true, + allowEscapeKey: true, + allowEnterKey: true, + stopKeydownPropagation: true, + keydownListenerCapture: false, + showConfirmButton: true, + showDenyButton: false, + showCancelButton: false, + preConfirm: undefined, + preDeny: undefined, + confirmButtonText: 'OK', + confirmButtonAriaLabel: '', + confirmButtonColor: undefined, + denyButtonText: 'No', + denyButtonAriaLabel: '', + denyButtonColor: undefined, + cancelButtonText: 'Cancel', + cancelButtonAriaLabel: '', + cancelButtonColor: undefined, + buttonsStyling: true, + reverseButtons: false, + focusConfirm: true, + focusDeny: false, + focusCancel: false, + returnFocus: true, + showCloseButton: false, + closeButtonHtml: '×', + closeButtonAriaLabel: 'Close this dialog', + loaderHtml: '', + showLoaderOnConfirm: false, + showLoaderOnDeny: false, + imageUrl: undefined, + imageWidth: undefined, + imageHeight: undefined, + imageAlt: '', + timer: undefined, + timerProgressBar: false, + width: undefined, + padding: undefined, + background: undefined, + input: undefined, + inputPlaceholder: '', + inputLabel: '', + inputValue: '', + inputOptions: {}, + inputAutoTrim: true, + inputAttributes: {}, + inputValidator: undefined, + returnInputValueOnDeny: false, + validationMessage: undefined, + grow: false, + position: 'center', + progressSteps: [], + currentProgressStep: undefined, + progressStepsDistance: undefined, + willOpen: undefined, + didOpen: undefined, + didRender: undefined, + willClose: undefined, + didClose: undefined, + didDestroy: undefined, + scrollbarPadding: true + }; + const updatableParams = ['allowEscapeKey', 'allowOutsideClick', 'background', 'buttonsStyling', 'cancelButtonAriaLabel', 'cancelButtonColor', 'cancelButtonText', 'closeButtonAriaLabel', 'closeButtonHtml', 'confirmButtonAriaLabel', 'confirmButtonColor', 'confirmButtonText', 'currentProgressStep', 'customClass', 'denyButtonAriaLabel', 'denyButtonColor', 'denyButtonText', 'didClose', 'didDestroy', 'footer', 'hideClass', 'html', 'icon', 'iconColor', 'iconHtml', 'imageAlt', 'imageHeight', 'imageUrl', 'imageWidth', 'preConfirm', 'preDeny', 'progressSteps', 'returnFocus', 'reverseButtons', 'showCancelButton', 'showCloseButton', 'showConfirmButton', 'showDenyButton', 'text', 'title', 'titleText', 'willClose']; + const deprecatedParams = {}; + const toastIncompatibleParams = ['allowOutsideClick', 'allowEnterKey', 'backdrop', 'focusConfirm', 'focusDeny', 'focusCancel', 'returnFocus', 'heightAuto', 'keydownListenerCapture']; + /** + * Is valid parameter + * @param {String} paramName + */ + + const isValidParameter = paramName => { + return Object.prototype.hasOwnProperty.call(defaultParams, paramName); + }; + /** + * Is valid parameter for Swal.update() method + * @param {String} paramName + */ + + const isUpdatableParameter = paramName => { + return updatableParams.indexOf(paramName) !== -1; + }; + /** + * Is deprecated parameter + * @param {String} paramName + */ + + const isDeprecatedParameter = paramName => { + return deprecatedParams[paramName]; + }; + + const checkIfParamIsValid = param => { + if (!isValidParameter(param)) { + warn("Unknown parameter \"".concat(param, "\"")); + } + }; + + const checkIfToastParamIsValid = param => { + if (toastIncompatibleParams.includes(param)) { + warn("The parameter \"".concat(param, "\" is incompatible with toasts")); + } + }; + + const checkIfParamIsDeprecated = param => { + if (isDeprecatedParameter(param)) { + warnAboutDeprecation(param, isDeprecatedParameter(param)); + } + }; + /** + * Show relevant warnings for given params + * + * @param params + */ + + + const showWarningsForParams = params => { + if (!params.backdrop && params.allowOutsideClick) { + warn('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`'); + } + + for (const param in params) { + checkIfParamIsValid(param); + + if (params.toast) { + checkIfToastParamIsValid(param); + } + + checkIfParamIsDeprecated(param); + } + }; + + + + var staticMethods = /*#__PURE__*/Object.freeze({ + isValidParameter: isValidParameter, + isUpdatableParameter: isUpdatableParameter, + isDeprecatedParameter: isDeprecatedParameter, + argsToParams: argsToParams, + isVisible: isVisible$1, + clickConfirm: clickConfirm, + clickDeny: clickDeny, + clickCancel: clickCancel, + getContainer: getContainer, + getPopup: getPopup, + getTitle: getTitle, + getHtmlContainer: getHtmlContainer, + getImage: getImage, + getIcon: getIcon, + getInputLabel: getInputLabel, + getCloseButton: getCloseButton, + getActions: getActions, + getConfirmButton: getConfirmButton, + getDenyButton: getDenyButton, + getCancelButton: getCancelButton, + getLoader: getLoader, + getFooter: getFooter, + getTimerProgressBar: getTimerProgressBar, + getFocusableElements: getFocusableElements, + getValidationMessage: getValidationMessage, + isLoading: isLoading, + fire: fire, + mixin: mixin, + showLoading: showLoading, + enableLoading: showLoading, + getTimerLeft: getTimerLeft, + stopTimer: stopTimer, + resumeTimer: resumeTimer, + toggleTimer: toggleTimer, + increaseTimer: increaseTimer, + isTimerRunning: isTimerRunning, + bindClickHandler: bindClickHandler + }); + + /** + * Hides loader and shows back the button which was hidden by .showLoading() + */ + + function hideLoading() { + // do nothing if popup is closed + const innerParams = privateProps.innerParams.get(this); + + if (!innerParams) { + return; + } + + const domCache = privateProps.domCache.get(this); + hide(domCache.loader); + + if (isToast()) { + if (innerParams.icon) { + show(getIcon()); + } + } else { + showRelatedButton(domCache); + } + + removeClass([domCache.popup, domCache.actions], swalClasses.loading); + domCache.popup.removeAttribute('aria-busy'); + domCache.popup.removeAttribute('data-loading'); + domCache.confirmButton.disabled = false; + domCache.denyButton.disabled = false; + domCache.cancelButton.disabled = false; + } + + const showRelatedButton = domCache => { + const buttonToReplace = domCache.popup.getElementsByClassName(domCache.loader.getAttribute('data-button-to-replace')); + + if (buttonToReplace.length) { + show(buttonToReplace[0], 'inline-block'); + } else if (allButtonsAreHidden()) { + hide(domCache.actions); + } + }; + + function getInput$1(instance) { + const innerParams = privateProps.innerParams.get(instance || this); + const domCache = privateProps.domCache.get(instance || this); + + if (!domCache) { + return null; + } + + return getInput(domCache.popup, innerParams.input); + } + + const fixScrollbar = () => { + // for queues, do not do this more than once + if (states.previousBodyPadding !== null) { + return; + } // if the body has overflow + + + if (document.body.scrollHeight > window.innerHeight) { + // add padding so the content doesn't shift after removal of scrollbar + states.previousBodyPadding = parseInt(window.getComputedStyle(document.body).getPropertyValue('padding-right')); + document.body.style.paddingRight = "".concat(states.previousBodyPadding + measureScrollbar(), "px"); + } + }; + const undoScrollbar = () => { + if (states.previousBodyPadding !== null) { + document.body.style.paddingRight = "".concat(states.previousBodyPadding, "px"); + states.previousBodyPadding = null; + } + }; + + /* istanbul ignore file */ + + const iOSfix = () => { + const iOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream || navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1; + + if (iOS && !hasClass(document.body, swalClasses.iosfix)) { + const offset = document.body.scrollTop; + document.body.style.top = "".concat(offset * -1, "px"); + addClass(document.body, swalClasses.iosfix); + lockBodyScroll(); + addBottomPaddingForTallPopups(); // #1948 + } + }; + + const addBottomPaddingForTallPopups = () => { + const safari = !navigator.userAgent.match(/(CriOS|FxiOS|EdgiOS|YaBrowser|UCBrowser)/i); + + if (safari) { + const bottomPanelHeight = 44; + + if (getPopup().scrollHeight > window.innerHeight - bottomPanelHeight) { + getContainer().style.paddingBottom = "".concat(bottomPanelHeight, "px"); + } + } + }; + + const lockBodyScroll = () => { + // #1246 + const container = getContainer(); + let preventTouchMove; + + container.ontouchstart = e => { + preventTouchMove = shouldPreventTouchMove(e); + }; + + container.ontouchmove = e => { + if (preventTouchMove) { + e.preventDefault(); + e.stopPropagation(); + } + }; + }; + + const shouldPreventTouchMove = event => { + const target = event.target; + const container = getContainer(); + + if (isStylys(event) || isZoom(event)) { + return false; + } + + if (target === container) { + return true; + } + + if (!isScrollable(container) && target.tagName !== 'INPUT' && // #1603 + target.tagName !== 'TEXTAREA' && // #2266 + !(isScrollable(getHtmlContainer()) && // #1944 + getHtmlContainer().contains(target))) { + return true; + } + + return false; + }; + + const isStylys = event => { + // #1786 + return event.touches && event.touches.length && event.touches[0].touchType === 'stylus'; + }; + + const isZoom = event => { + // #1891 + return event.touches && event.touches.length > 1; + }; + + const undoIOSfix = () => { + if (hasClass(document.body, swalClasses.iosfix)) { + const offset = parseInt(document.body.style.top, 10); + removeClass(document.body, swalClasses.iosfix); + document.body.style.top = ''; + document.body.scrollTop = offset * -1; + } + }; + + // Adding aria-hidden="true" to elements outside of the active modal dialog ensures that + // elements not within the active modal dialog will not be surfaced if a user opens a screen + // reader’s list of elements (headings, form controls, landmarks, etc.) in the document. + + const setAriaHidden = () => { + const bodyChildren = toArray(document.body.children); + bodyChildren.forEach(el => { + if (el === getContainer() || el.contains(getContainer())) { + return; + } + + if (el.hasAttribute('aria-hidden')) { + el.setAttribute('data-previous-aria-hidden', el.getAttribute('aria-hidden')); + } + + el.setAttribute('aria-hidden', 'true'); + }); + }; + const unsetAriaHidden = () => { + const bodyChildren = toArray(document.body.children); + bodyChildren.forEach(el => { + if (el.hasAttribute('data-previous-aria-hidden')) { + el.setAttribute('aria-hidden', el.getAttribute('data-previous-aria-hidden')); + el.removeAttribute('data-previous-aria-hidden'); + } else { + el.removeAttribute('aria-hidden'); + } + }); + }; + + /** + * This module containts `WeakMap`s for each effectively-"private property" that a `Swal` has. + * For example, to set the private property "foo" of `this` to "bar", you can `privateProps.foo.set(this, 'bar')` + * This is the approach that Babel will probably take to implement private methods/fields + * https://github.com/tc39/proposal-private-methods + * https://github.com/babel/babel/pull/7555 + * Once we have the changes from that PR in Babel, and our core class fits reasonable in *one module* + * then we can use that language feature. + */ + var privateMethods = { + swalPromiseResolve: new WeakMap() + }; + + /* + * Instance method to close sweetAlert + */ + + function removePopupAndResetState(instance, container, returnFocus, didClose) { + if (isToast()) { + triggerDidCloseAndDispose(instance, didClose); + } else { + restoreActiveElement(returnFocus).then(() => triggerDidCloseAndDispose(instance, didClose)); + globalState.keydownTarget.removeEventListener('keydown', globalState.keydownHandler, { + capture: globalState.keydownListenerCapture + }); + globalState.keydownHandlerAdded = false; + } + + const isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent); // workaround for #2088 + // for some reason removing the container in Safari will scroll the document to bottom + + if (isSafari) { + container.setAttribute('style', 'display:none !important'); + container.removeAttribute('class'); + container.innerHTML = ''; + } else { + container.remove(); + } + + if (isModal()) { + undoScrollbar(); + undoIOSfix(); + unsetAriaHidden(); + } + + removeBodyClasses(); + } + + function removeBodyClasses() { + removeClass([document.documentElement, document.body], [swalClasses.shown, swalClasses['height-auto'], swalClasses['no-backdrop'], swalClasses['toast-shown']]); + } + + function close(resolveValue) { + const popup = getPopup(); + + if (!popup) { + return; + } + + resolveValue = prepareResolveValue(resolveValue); + const innerParams = privateProps.innerParams.get(this); + + if (!innerParams || hasClass(popup, innerParams.hideClass.popup)) { + return; + } + + const swalPromiseResolve = privateMethods.swalPromiseResolve.get(this); + removeClass(popup, innerParams.showClass.popup); + addClass(popup, innerParams.hideClass.popup); + const backdrop = getContainer(); + removeClass(backdrop, innerParams.showClass.backdrop); + addClass(backdrop, innerParams.hideClass.backdrop); + handlePopupAnimation(this, popup, innerParams); // Resolve Swal promise + + swalPromiseResolve(resolveValue); + } + + const prepareResolveValue = resolveValue => { + // When user calls Swal.close() + if (typeof resolveValue === 'undefined') { + return { + isConfirmed: false, + isDenied: false, + isDismissed: true + }; + } + + return Object.assign({ + isConfirmed: false, + isDenied: false, + isDismissed: false + }, resolveValue); + }; + + const handlePopupAnimation = (instance, popup, innerParams) => { + const container = getContainer(); // If animation is supported, animate + + const animationIsSupported = animationEndEvent && hasCssAnimation(popup); + + if (typeof innerParams.willClose === 'function') { + innerParams.willClose(popup); + } + + if (animationIsSupported) { + animatePopup(instance, popup, container, innerParams.returnFocus, innerParams.didClose); + } else { + // Otherwise, remove immediately + removePopupAndResetState(instance, container, innerParams.returnFocus, innerParams.didClose); + } + }; + + const animatePopup = (instance, popup, container, returnFocus, didClose) => { + globalState.swalCloseEventFinishedCallback = removePopupAndResetState.bind(null, instance, container, returnFocus, didClose); + popup.addEventListener(animationEndEvent, function (e) { + if (e.target === popup) { + globalState.swalCloseEventFinishedCallback(); + delete globalState.swalCloseEventFinishedCallback; + } + }); + }; + + const triggerDidCloseAndDispose = (instance, didClose) => { + setTimeout(() => { + if (typeof didClose === 'function') { + didClose.bind(instance.params)(); + } + + instance._destroy(); + }); + }; + + function setButtonsDisabled(instance, buttons, disabled) { + const domCache = privateProps.domCache.get(instance); + buttons.forEach(button => { + domCache[button].disabled = disabled; + }); + } + + function setInputDisabled(input, disabled) { + if (!input) { + return false; + } + + if (input.type === 'radio') { + const radiosContainer = input.parentNode.parentNode; + const radios = radiosContainer.querySelectorAll('input'); + + for (let i = 0; i < radios.length; i++) { + radios[i].disabled = disabled; + } + } else { + input.disabled = disabled; + } + } + + function enableButtons() { + setButtonsDisabled(this, ['confirmButton', 'denyButton', 'cancelButton'], false); + } + function disableButtons() { + setButtonsDisabled(this, ['confirmButton', 'denyButton', 'cancelButton'], true); + } + function enableInput() { + return setInputDisabled(this.getInput(), false); + } + function disableInput() { + return setInputDisabled(this.getInput(), true); + } + + function showValidationMessage(error) { + const domCache = privateProps.domCache.get(this); + const params = privateProps.innerParams.get(this); + setInnerHtml(domCache.validationMessage, error); + domCache.validationMessage.className = swalClasses['validation-message']; + + if (params.customClass && params.customClass.validationMessage) { + addClass(domCache.validationMessage, params.customClass.validationMessage); + } + + show(domCache.validationMessage); + const input = this.getInput(); + + if (input) { + input.setAttribute('aria-invalid', true); + input.setAttribute('aria-describedby', swalClasses['validation-message']); + focusInput(input); + addClass(input, swalClasses.inputerror); + } + } // Hide block with validation message + + function resetValidationMessage$1() { + const domCache = privateProps.domCache.get(this); + + if (domCache.validationMessage) { + hide(domCache.validationMessage); + } + + const input = this.getInput(); + + if (input) { + input.removeAttribute('aria-invalid'); + input.removeAttribute('aria-describedby'); + removeClass(input, swalClasses.inputerror); + } + } + + function getProgressSteps$1() { + const domCache = privateProps.domCache.get(this); + return domCache.progressSteps; + } + + class Timer { + constructor(callback, delay) { + this.callback = callback; + this.remaining = delay; + this.running = false; + this.start(); + } + + start() { + if (!this.running) { + this.running = true; + this.started = new Date(); + this.id = setTimeout(this.callback, this.remaining); + } + + return this.remaining; + } + + stop() { + if (this.running) { + this.running = false; + clearTimeout(this.id); + this.remaining -= new Date() - this.started; + } + + return this.remaining; + } + + increase(n) { + const running = this.running; + + if (running) { + this.stop(); + } + + this.remaining += n; + + if (running) { + this.start(); + } + + return this.remaining; + } + + getTimerLeft() { + if (this.running) { + this.stop(); + this.start(); + } + + return this.remaining; + } + + isRunning() { + return this.running; + } + + } + + var defaultInputValidators = { + email: (string, validationMessage) => { + return /^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]{2,24}$/.test(string) ? Promise.resolve() : Promise.resolve(validationMessage || 'Invalid email address'); + }, + url: (string, validationMessage) => { + // taken from https://stackoverflow.com/a/3809435 with a small change from #1306 and #2013 + return /^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(string) ? Promise.resolve() : Promise.resolve(validationMessage || 'Invalid URL'); + } + }; + + function setDefaultInputValidators(params) { + // Use default `inputValidator` for supported input types if not provided + if (!params.inputValidator) { + Object.keys(defaultInputValidators).forEach(key => { + if (params.input === key) { + params.inputValidator = defaultInputValidators[key]; + } + }); + } + } + + function validateCustomTargetElement(params) { + // Determine if the custom target element is valid + if (!params.target || typeof params.target === 'string' && !document.querySelector(params.target) || typeof params.target !== 'string' && !params.target.appendChild) { + warn('Target parameter is not valid, defaulting to "body"'); + params.target = 'body'; + } + } + /** + * Set type, text and actions on popup + * + * @param params + * @returns {boolean} + */ + + + function setParameters(params) { + setDefaultInputValidators(params); // showLoaderOnConfirm && preConfirm + + if (params.showLoaderOnConfirm && !params.preConfirm) { + warn('showLoaderOnConfirm is set to true, but preConfirm is not defined.\n' + 'showLoaderOnConfirm should be used together with preConfirm, see usage example:\n' + 'https://sweetalert2.github.io/#ajax-request'); + } + + validateCustomTargetElement(params); // Replace newlines with
                        in title + + if (typeof params.title === 'string') { + params.title = params.title.split('\n').join('
                        '); + } + + init(params); + } + + const swalStringParams = ['swal-title', 'swal-html', 'swal-footer']; + const getTemplateParams = params => { + const template = typeof params.template === 'string' ? document.querySelector(params.template) : params.template; + + if (!template) { + return {}; + } + + const templateContent = template.content; + showWarningsForElements(templateContent); + const result = Object.assign(getSwalParams(templateContent), getSwalButtons(templateContent), getSwalImage(templateContent), getSwalIcon(templateContent), getSwalInput(templateContent), getSwalStringParams(templateContent, swalStringParams)); + return result; + }; + + const getSwalParams = templateContent => { + const result = {}; + toArray(templateContent.querySelectorAll('swal-param')).forEach(param => { + showWarningsForAttributes(param, ['name', 'value']); + const paramName = param.getAttribute('name'); + let value = param.getAttribute('value'); + + if (typeof defaultParams[paramName] === 'boolean' && value === 'false') { + value = false; + } + + if (typeof defaultParams[paramName] === 'object') { + value = JSON.parse(value); + } + + result[paramName] = value; + }); + return result; + }; + + const getSwalButtons = templateContent => { + const result = {}; + toArray(templateContent.querySelectorAll('swal-button')).forEach(button => { + showWarningsForAttributes(button, ['type', 'color', 'aria-label']); + const type = button.getAttribute('type'); + result["".concat(type, "ButtonText")] = button.innerHTML; + result["show".concat(capitalizeFirstLetter(type), "Button")] = true; + + if (button.hasAttribute('color')) { + result["".concat(type, "ButtonColor")] = button.getAttribute('color'); + } + + if (button.hasAttribute('aria-label')) { + result["".concat(type, "ButtonAriaLabel")] = button.getAttribute('aria-label'); + } + }); + return result; + }; + + const getSwalImage = templateContent => { + const result = {}; + const image = templateContent.querySelector('swal-image'); + + if (image) { + showWarningsForAttributes(image, ['src', 'width', 'height', 'alt']); + + if (image.hasAttribute('src')) { + result.imageUrl = image.getAttribute('src'); + } + + if (image.hasAttribute('width')) { + result.imageWidth = image.getAttribute('width'); + } + + if (image.hasAttribute('height')) { + result.imageHeight = image.getAttribute('height'); + } + + if (image.hasAttribute('alt')) { + result.imageAlt = image.getAttribute('alt'); + } + } + + return result; + }; + + const getSwalIcon = templateContent => { + const result = {}; + const icon = templateContent.querySelector('swal-icon'); + + if (icon) { + showWarningsForAttributes(icon, ['type', 'color']); + + if (icon.hasAttribute('type')) { + result.icon = icon.getAttribute('type'); + } + + if (icon.hasAttribute('color')) { + result.iconColor = icon.getAttribute('color'); + } + + result.iconHtml = icon.innerHTML; + } + + return result; + }; + + const getSwalInput = templateContent => { + const result = {}; + const input = templateContent.querySelector('swal-input'); + + if (input) { + showWarningsForAttributes(input, ['type', 'label', 'placeholder', 'value']); + result.input = input.getAttribute('type') || 'text'; + + if (input.hasAttribute('label')) { + result.inputLabel = input.getAttribute('label'); + } + + if (input.hasAttribute('placeholder')) { + result.inputPlaceholder = input.getAttribute('placeholder'); + } + + if (input.hasAttribute('value')) { + result.inputValue = input.getAttribute('value'); + } + } + + const inputOptions = templateContent.querySelectorAll('swal-input-option'); + + if (inputOptions.length) { + result.inputOptions = {}; + toArray(inputOptions).forEach(option => { + showWarningsForAttributes(option, ['value']); + const optionValue = option.getAttribute('value'); + const optionName = option.innerHTML; + result.inputOptions[optionValue] = optionName; + }); + } + + return result; + }; + + const getSwalStringParams = (templateContent, paramNames) => { + const result = {}; + + for (const i in paramNames) { + const paramName = paramNames[i]; + const tag = templateContent.querySelector(paramName); + + if (tag) { + showWarningsForAttributes(tag, []); + result[paramName.replace(/^swal-/, '')] = tag.innerHTML.trim(); + } + } + + return result; + }; + + const showWarningsForElements = template => { + const allowedElements = swalStringParams.concat(['swal-param', 'swal-button', 'swal-image', 'swal-icon', 'swal-input', 'swal-input-option']); + toArray(template.children).forEach(el => { + const tagName = el.tagName.toLowerCase(); + + if (allowedElements.indexOf(tagName) === -1) { + warn("Unrecognized element <".concat(tagName, ">")); + } + }); + }; + + const showWarningsForAttributes = (el, allowedAttributes) => { + toArray(el.attributes).forEach(attribute => { + if (allowedAttributes.indexOf(attribute.name) === -1) { + warn(["Unrecognized attribute \"".concat(attribute.name, "\" on <").concat(el.tagName.toLowerCase(), ">."), "".concat(allowedAttributes.length ? "Allowed attributes are: ".concat(allowedAttributes.join(', ')) : 'To set the value, use HTML within the element.')]); + } + }); + }; + + const SHOW_CLASS_TIMEOUT = 10; + /** + * Open popup, add necessary classes and styles, fix scrollbar + * + * @param params + */ + + const openPopup = params => { + const container = getContainer(); + const popup = getPopup(); + + if (typeof params.willOpen === 'function') { + params.willOpen(popup); + } + + const bodyStyles = window.getComputedStyle(document.body); + const initialBodyOverflow = bodyStyles.overflowY; + addClasses$1(container, popup, params); // scrolling is 'hidden' until animation is done, after that 'auto' + + setTimeout(() => { + setScrollingVisibility(container, popup); + }, SHOW_CLASS_TIMEOUT); + + if (isModal()) { + fixScrollContainer(container, params.scrollbarPadding, initialBodyOverflow); + setAriaHidden(); + } + + if (!isToast() && !globalState.previousActiveElement) { + globalState.previousActiveElement = document.activeElement; + } + + if (typeof params.didOpen === 'function') { + setTimeout(() => params.didOpen(popup)); + } + + removeClass(container, swalClasses['no-transition']); + }; + + const swalOpenAnimationFinished = event => { + const popup = getPopup(); + + if (event.target !== popup) { + return; + } + + const container = getContainer(); + popup.removeEventListener(animationEndEvent, swalOpenAnimationFinished); + container.style.overflowY = 'auto'; + }; + + const setScrollingVisibility = (container, popup) => { + if (animationEndEvent && hasCssAnimation(popup)) { + container.style.overflowY = 'hidden'; + popup.addEventListener(animationEndEvent, swalOpenAnimationFinished); + } else { + container.style.overflowY = 'auto'; + } + }; + + const fixScrollContainer = (container, scrollbarPadding, initialBodyOverflow) => { + iOSfix(); + + if (scrollbarPadding && initialBodyOverflow !== 'hidden') { + fixScrollbar(); + } // sweetalert2/issues/1247 + + + setTimeout(() => { + container.scrollTop = 0; + }); + }; + + const addClasses$1 = (container, popup, params) => { + addClass(container, params.showClass.backdrop); // the workaround with setting/unsetting opacity is needed for #2019 and 2059 + + popup.style.setProperty('opacity', '0', 'important'); + show(popup, 'grid'); + setTimeout(() => { + // Animate popup right after showing it + addClass(popup, params.showClass.popup); // and remove the opacity workaround + + popup.style.removeProperty('opacity'); + }, SHOW_CLASS_TIMEOUT); // 10ms in order to fix #2062 + + addClass([document.documentElement, document.body], swalClasses.shown); + + if (params.heightAuto && params.backdrop && !params.toast) { + addClass([document.documentElement, document.body], swalClasses['height-auto']); + } + }; + + const handleInputOptionsAndValue = (instance, params) => { + if (params.input === 'select' || params.input === 'radio') { + handleInputOptions(instance, params); + } else if (['text', 'email', 'number', 'tel', 'textarea'].includes(params.input) && (hasToPromiseFn(params.inputValue) || isPromise(params.inputValue))) { + showLoading(getConfirmButton()); + handleInputValue(instance, params); + } + }; + const getInputValue = (instance, innerParams) => { + const input = instance.getInput(); + + if (!input) { + return null; + } + + switch (innerParams.input) { + case 'checkbox': + return getCheckboxValue(input); + + case 'radio': + return getRadioValue(input); + + case 'file': + return getFileValue(input); + + default: + return innerParams.inputAutoTrim ? input.value.trim() : input.value; + } + }; + + const getCheckboxValue = input => input.checked ? 1 : 0; + + const getRadioValue = input => input.checked ? input.value : null; + + const getFileValue = input => input.files.length ? input.getAttribute('multiple') !== null ? input.files : input.files[0] : null; + + const handleInputOptions = (instance, params) => { + const popup = getPopup(); + + const processInputOptions = inputOptions => populateInputOptions[params.input](popup, formatInputOptions(inputOptions), params); + + if (hasToPromiseFn(params.inputOptions) || isPromise(params.inputOptions)) { + showLoading(getConfirmButton()); + asPromise(params.inputOptions).then(inputOptions => { + instance.hideLoading(); + processInputOptions(inputOptions); + }); + } else if (typeof params.inputOptions === 'object') { + processInputOptions(params.inputOptions); + } else { + error("Unexpected type of inputOptions! Expected object, Map or Promise, got ".concat(typeof params.inputOptions)); + } + }; + + const handleInputValue = (instance, params) => { + const input = instance.getInput(); + hide(input); + asPromise(params.inputValue).then(inputValue => { + input.value = params.input === 'number' ? parseFloat(inputValue) || 0 : "".concat(inputValue); + show(input); + input.focus(); + instance.hideLoading(); + }).catch(err => { + error("Error in inputValue promise: ".concat(err)); + input.value = ''; + show(input); + input.focus(); + instance.hideLoading(); + }); + }; + + const populateInputOptions = { + select: (popup, inputOptions, params) => { + const select = getChildByClass(popup, swalClasses.select); + + const renderOption = (parent, optionLabel, optionValue) => { + const option = document.createElement('option'); + option.value = optionValue; + setInnerHtml(option, optionLabel); + option.selected = isSelected(optionValue, params.inputValue); + parent.appendChild(option); + }; + + inputOptions.forEach(inputOption => { + const optionValue = inputOption[0]; + const optionLabel = inputOption[1]; // spec: + // https://www.w3.org/TR/html401/interact/forms.html#h-17.6 + // "...all OPTGROUP elements must be specified directly within a SELECT element (i.e., groups may not be nested)..." + // check whether this is a + + if (Array.isArray(optionLabel)) { + // if it is an array, then it is an + const optgroup = document.createElement('optgroup'); + optgroup.label = optionValue; + optgroup.disabled = false; // not configurable for now + + select.appendChild(optgroup); + optionLabel.forEach(o => renderOption(optgroup, o[1], o[0])); + } else { + // case of + valueFormatted = formatInputOptions(valueFormatted); + } + + result.push([key, valueFormatted]); + }); + } else { + Object.keys(inputOptions).forEach(key => { + let valueFormatted = inputOptions[key]; + + if (typeof valueFormatted === 'object') { + // case of + valueFormatted = formatInputOptions(valueFormatted); + } + + result.push([key, valueFormatted]); + }); + } + + return result; + }; + + const isSelected = (optionValue, inputValue) => { + return inputValue && inputValue.toString() === optionValue.toString(); + }; + + const handleConfirmButtonClick = instance => { + const innerParams = privateProps.innerParams.get(instance); + instance.disableButtons(); + + if (innerParams.input) { + handleConfirmOrDenyWithInput(instance, 'confirm'); + } else { + confirm(instance, true); + } + }; + const handleDenyButtonClick = instance => { + const innerParams = privateProps.innerParams.get(instance); + instance.disableButtons(); + + if (innerParams.returnInputValueOnDeny) { + handleConfirmOrDenyWithInput(instance, 'deny'); + } else { + deny(instance, false); + } + }; + const handleCancelButtonClick = (instance, dismissWith) => { + instance.disableButtons(); + dismissWith(DismissReason.cancel); + }; + + const handleConfirmOrDenyWithInput = (instance, type + /* 'confirm' | 'deny' */ + ) => { + const innerParams = privateProps.innerParams.get(instance); + const inputValue = getInputValue(instance, innerParams); + + if (innerParams.inputValidator) { + handleInputValidator(instance, inputValue, type); + } else if (!instance.getInput().checkValidity()) { + instance.enableButtons(); + instance.showValidationMessage(innerParams.validationMessage); + } else if (type === 'deny') { + deny(instance, inputValue); + } else { + confirm(instance, inputValue); + } + }; + + const handleInputValidator = (instance, inputValue, type + /* 'confirm' | 'deny' */ + ) => { + const innerParams = privateProps.innerParams.get(instance); + instance.disableInput(); + const validationPromise = Promise.resolve().then(() => asPromise(innerParams.inputValidator(inputValue, innerParams.validationMessage))); + validationPromise.then(validationMessage => { + instance.enableButtons(); + instance.enableInput(); + + if (validationMessage) { + instance.showValidationMessage(validationMessage); + } else if (type === 'deny') { + deny(instance, inputValue); + } else { + confirm(instance, inputValue); + } + }); + }; + + const deny = (instance, value) => { + const innerParams = privateProps.innerParams.get(instance || undefined); + + if (innerParams.showLoaderOnDeny) { + showLoading(getDenyButton()); + } + + if (innerParams.preDeny) { + const preDenyPromise = Promise.resolve().then(() => asPromise(innerParams.preDeny(value, innerParams.validationMessage))); + preDenyPromise.then(preDenyValue => { + if (preDenyValue === false) { + instance.hideLoading(); + } else { + instance.closePopup({ + isDenied: true, + value: typeof preDenyValue === 'undefined' ? value : preDenyValue + }); + } + }); + } else { + instance.closePopup({ + isDenied: true, + value + }); + } + }; + + const succeedWith = (instance, value) => { + instance.closePopup({ + isConfirmed: true, + value + }); + }; + + const confirm = (instance, value) => { + const innerParams = privateProps.innerParams.get(instance || undefined); + + if (innerParams.showLoaderOnConfirm) { + showLoading(); // TODO: make showLoading an *instance* method + } + + if (innerParams.preConfirm) { + instance.resetValidationMessage(); + const preConfirmPromise = Promise.resolve().then(() => asPromise(innerParams.preConfirm(value, innerParams.validationMessage))); + preConfirmPromise.then(preConfirmValue => { + if (isVisible(getValidationMessage()) || preConfirmValue === false) { + instance.hideLoading(); + } else { + succeedWith(instance, typeof preConfirmValue === 'undefined' ? value : preConfirmValue); + } + }); + } else { + succeedWith(instance, value); + } + }; + + const addKeydownHandler = (instance, globalState, innerParams, dismissWith) => { + if (globalState.keydownTarget && globalState.keydownHandlerAdded) { + globalState.keydownTarget.removeEventListener('keydown', globalState.keydownHandler, { + capture: globalState.keydownListenerCapture + }); + globalState.keydownHandlerAdded = false; + } + + if (!innerParams.toast) { + globalState.keydownHandler = e => keydownHandler(instance, e, dismissWith); + + globalState.keydownTarget = innerParams.keydownListenerCapture ? window : getPopup(); + globalState.keydownListenerCapture = innerParams.keydownListenerCapture; + globalState.keydownTarget.addEventListener('keydown', globalState.keydownHandler, { + capture: globalState.keydownListenerCapture + }); + globalState.keydownHandlerAdded = true; + } + }; // Focus handling + + const setFocus = (innerParams, index, increment) => { + const focusableElements = getFocusableElements(); // search for visible elements and select the next possible match + + if (focusableElements.length) { + index = index + increment; // rollover to first item + + if (index === focusableElements.length) { + index = 0; // go to last item + } else if (index === -1) { + index = focusableElements.length - 1; + } + + return focusableElements[index].focus(); + } // no visible focusable elements, focus the popup + + + getPopup().focus(); + }; + const arrowKeysNextButton = ['ArrowRight', 'ArrowDown']; + const arrowKeysPreviousButton = ['ArrowLeft', 'ArrowUp']; + + const keydownHandler = (instance, e, dismissWith) => { + const innerParams = privateProps.innerParams.get(instance); + + if (!innerParams) { + return; // This instance has already been destroyed + } + + if (innerParams.stopKeydownPropagation) { + e.stopPropagation(); + } // ENTER + + + if (e.key === 'Enter') { + handleEnter(instance, e, innerParams); // TAB + } else if (e.key === 'Tab') { + handleTab(e, innerParams); // ARROWS - switch focus between buttons + } else if ([...arrowKeysNextButton, ...arrowKeysPreviousButton].includes(e.key)) { + handleArrows(e.key); // ESC + } else if (e.key === 'Escape') { + handleEsc(e, innerParams, dismissWith); + } + }; + + const handleEnter = (instance, e, innerParams) => { + // #720 #721 + if (e.isComposing) { + return; + } + + if (e.target && instance.getInput() && e.target.outerHTML === instance.getInput().outerHTML) { + if (['textarea', 'file'].includes(innerParams.input)) { + return; // do not submit + } + + clickConfirm(); + e.preventDefault(); + } + }; + + const handleTab = (e, innerParams) => { + const targetElement = e.target; + const focusableElements = getFocusableElements(); + let btnIndex = -1; + + for (let i = 0; i < focusableElements.length; i++) { + if (targetElement === focusableElements[i]) { + btnIndex = i; + break; + } + } + + if (!e.shiftKey) { + // Cycle to the next button + setFocus(innerParams, btnIndex, 1); + } else { + // Cycle to the prev button + setFocus(innerParams, btnIndex, -1); + } + + e.stopPropagation(); + e.preventDefault(); + }; + + const handleArrows = key => { + const confirmButton = getConfirmButton(); + const denyButton = getDenyButton(); + const cancelButton = getCancelButton(); + + if (![confirmButton, denyButton, cancelButton].includes(document.activeElement)) { + return; + } + + const sibling = arrowKeysNextButton.includes(key) ? 'nextElementSibling' : 'previousElementSibling'; + const buttonToFocus = document.activeElement[sibling]; + + if (buttonToFocus) { + buttonToFocus.focus(); + } + }; + + const handleEsc = (e, innerParams, dismissWith) => { + if (callIfFunction(innerParams.allowEscapeKey)) { + e.preventDefault(); + dismissWith(DismissReason.esc); + } + }; + + const handlePopupClick = (instance, domCache, dismissWith) => { + const innerParams = privateProps.innerParams.get(instance); + + if (innerParams.toast) { + handleToastClick(instance, domCache, dismissWith); + } else { + // Ignore click events that had mousedown on the popup but mouseup on the container + // This can happen when the user drags a slider + handleModalMousedown(domCache); // Ignore click events that had mousedown on the container but mouseup on the popup + + handleContainerMousedown(domCache); + handleModalClick(instance, domCache, dismissWith); + } + }; + + const handleToastClick = (instance, domCache, dismissWith) => { + // Closing toast by internal click + domCache.popup.onclick = () => { + const innerParams = privateProps.innerParams.get(instance); + + if (innerParams.showConfirmButton || innerParams.showDenyButton || innerParams.showCancelButton || innerParams.showCloseButton || innerParams.timer || innerParams.input) { + return; + } + + dismissWith(DismissReason.close); + }; + }; + + let ignoreOutsideClick = false; + + const handleModalMousedown = domCache => { + domCache.popup.onmousedown = () => { + domCache.container.onmouseup = function (e) { + domCache.container.onmouseup = undefined; // We only check if the mouseup target is the container because usually it doesn't + // have any other direct children aside of the popup + + if (e.target === domCache.container) { + ignoreOutsideClick = true; + } + }; + }; + }; + + const handleContainerMousedown = domCache => { + domCache.container.onmousedown = () => { + domCache.popup.onmouseup = function (e) { + domCache.popup.onmouseup = undefined; // We also need to check if the mouseup target is a child of the popup + + if (e.target === domCache.popup || domCache.popup.contains(e.target)) { + ignoreOutsideClick = true; + } + }; + }; + }; + + const handleModalClick = (instance, domCache, dismissWith) => { + domCache.container.onclick = e => { + const innerParams = privateProps.innerParams.get(instance); + + if (ignoreOutsideClick) { + ignoreOutsideClick = false; + return; + } + + if (e.target === domCache.container && callIfFunction(innerParams.allowOutsideClick)) { + dismissWith(DismissReason.backdrop); + } + }; + }; + + function _main(userParams, mixinParams = {}) { + showWarningsForParams(Object.assign({}, mixinParams, userParams)); + + if (globalState.currentInstance) { + globalState.currentInstance._destroy(); + + if (isModal()) { + unsetAriaHidden(); + } + } + + globalState.currentInstance = this; + const innerParams = prepareParams(userParams, mixinParams); + setParameters(innerParams); + Object.freeze(innerParams); // clear the previous timer + + if (globalState.timeout) { + globalState.timeout.stop(); + delete globalState.timeout; + } // clear the restore focus timeout + + + clearTimeout(globalState.restoreFocusTimeout); + const domCache = populateDomCache(this); + render(this, innerParams); + privateProps.innerParams.set(this, innerParams); + return swalPromise(this, domCache, innerParams); + } + + const prepareParams = (userParams, mixinParams) => { + const templateParams = getTemplateParams(userParams); + const params = Object.assign({}, defaultParams, mixinParams, templateParams, userParams); // precedence is described in #2131 + + params.showClass = Object.assign({}, defaultParams.showClass, params.showClass); + params.hideClass = Object.assign({}, defaultParams.hideClass, params.hideClass); + return params; + }; + + const swalPromise = (instance, domCache, innerParams) => { + return new Promise(resolve => { + // functions to handle all closings/dismissals + const dismissWith = dismiss => { + instance.closePopup({ + isDismissed: true, + dismiss + }); + }; + + privateMethods.swalPromiseResolve.set(instance, resolve); + + domCache.confirmButton.onclick = () => handleConfirmButtonClick(instance); + + domCache.denyButton.onclick = () => handleDenyButtonClick(instance); + + domCache.cancelButton.onclick = () => handleCancelButtonClick(instance, dismissWith); + + domCache.closeButton.onclick = () => dismissWith(DismissReason.close); + + handlePopupClick(instance, domCache, dismissWith); + addKeydownHandler(instance, globalState, innerParams, dismissWith); + handleInputOptionsAndValue(instance, innerParams); + openPopup(innerParams); + setupTimer(globalState, innerParams, dismissWith); + initFocus(domCache, innerParams); // Scroll container to top on open (#1247, #1946) + + setTimeout(() => { + domCache.container.scrollTop = 0; + }); + }); + }; + + const populateDomCache = instance => { + const domCache = { + popup: getPopup(), + container: getContainer(), + actions: getActions(), + confirmButton: getConfirmButton(), + denyButton: getDenyButton(), + cancelButton: getCancelButton(), + loader: getLoader(), + closeButton: getCloseButton(), + validationMessage: getValidationMessage(), + progressSteps: getProgressSteps() + }; + privateProps.domCache.set(instance, domCache); + return domCache; + }; + + const setupTimer = (globalState$$1, innerParams, dismissWith) => { + const timerProgressBar = getTimerProgressBar(); + hide(timerProgressBar); + + if (innerParams.timer) { + globalState$$1.timeout = new Timer(() => { + dismissWith('timer'); + delete globalState$$1.timeout; + }, innerParams.timer); + + if (innerParams.timerProgressBar) { + show(timerProgressBar); + setTimeout(() => { + if (globalState$$1.timeout && globalState$$1.timeout.running) { + // timer can be already stopped or unset at this point + animateTimerProgressBar(innerParams.timer); + } + }); + } + } + }; + + const initFocus = (domCache, innerParams) => { + if (innerParams.toast) { + return; + } + + if (!callIfFunction(innerParams.allowEnterKey)) { + return blurActiveElement(); + } + + if (!focusButton(domCache, innerParams)) { + setFocus(innerParams, -1, 1); + } + }; + + const focusButton = (domCache, innerParams) => { + if (innerParams.focusDeny && isVisible(domCache.denyButton)) { + domCache.denyButton.focus(); + return true; + } + + if (innerParams.focusCancel && isVisible(domCache.cancelButton)) { + domCache.cancelButton.focus(); + return true; + } + + if (innerParams.focusConfirm && isVisible(domCache.confirmButton)) { + domCache.confirmButton.focus(); + return true; + } + + return false; + }; + + const blurActiveElement = () => { + if (document.activeElement && typeof document.activeElement.blur === 'function') { + document.activeElement.blur(); + } + }; + + /** + * Updates popup parameters. + */ + + function update(params) { + const popup = getPopup(); + const innerParams = privateProps.innerParams.get(this); + + if (!popup || hasClass(popup, innerParams.hideClass.popup)) { + return warn("You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup."); + } + + const validUpdatableParams = {}; // assign valid params from `params` to `defaults` + + Object.keys(params).forEach(param => { + if (Swal.isUpdatableParameter(param)) { + validUpdatableParams[param] = params[param]; + } else { + warn("Invalid parameter to update: \"".concat(param, "\". Updatable params are listed here: https://github.com/sweetalert2/sweetalert2/blob/master/src/utils/params.js\n\nIf you think this parameter should be updatable, request it here: https://github.com/sweetalert2/sweetalert2/issues/new?template=02_feature_request.md")); + } + }); + const updatedParams = Object.assign({}, innerParams, validUpdatableParams); + render(this, updatedParams); + privateProps.innerParams.set(this, updatedParams); + Object.defineProperties(this, { + params: { + value: Object.assign({}, this.params, params), + writable: false, + enumerable: true + } + }); + } + + function _destroy() { + const domCache = privateProps.domCache.get(this); + const innerParams = privateProps.innerParams.get(this); + + if (!innerParams) { + return; // This instance has already been destroyed + } // Check if there is another Swal closing + + + if (domCache.popup && globalState.swalCloseEventFinishedCallback) { + globalState.swalCloseEventFinishedCallback(); + delete globalState.swalCloseEventFinishedCallback; + } // Check if there is a swal disposal defer timer + + + if (globalState.deferDisposalTimer) { + clearTimeout(globalState.deferDisposalTimer); + delete globalState.deferDisposalTimer; + } + + if (typeof innerParams.didDestroy === 'function') { + innerParams.didDestroy(); + } + + disposeSwal(this); + } + + const disposeSwal = instance => { + // Unset this.params so GC will dispose it (#1569) + delete instance.params; // Unset globalState props so GC will dispose globalState (#1569) + + delete globalState.keydownHandler; + delete globalState.keydownTarget; // Unset WeakMaps so GC will be able to dispose them (#1569) + + unsetWeakMaps(privateProps); + unsetWeakMaps(privateMethods); // Unset currentInstance + + delete globalState.currentInstance; + }; + + const unsetWeakMaps = obj => { + for (const i in obj) { + obj[i] = new WeakMap(); + } + }; + + + + var instanceMethods = /*#__PURE__*/Object.freeze({ + hideLoading: hideLoading, + disableLoading: hideLoading, + getInput: getInput$1, + close: close, + closePopup: close, + closeModal: close, + closeToast: close, + enableButtons: enableButtons, + disableButtons: disableButtons, + enableInput: enableInput, + disableInput: disableInput, + showValidationMessage: showValidationMessage, + resetValidationMessage: resetValidationMessage$1, + getProgressSteps: getProgressSteps$1, + _main: _main, + update: update, + _destroy: _destroy + }); + + let currentInstance; + + class SweetAlert { + constructor(...args) { + // Prevent run in Node env + if (typeof window === 'undefined') { + return; + } + + currentInstance = this; + const outerParams = Object.freeze(this.constructor.argsToParams(args)); + Object.defineProperties(this, { + params: { + value: outerParams, + writable: false, + enumerable: true, + configurable: true + } + }); + + const promise = this._main(this.params); + + privateProps.promise.set(this, promise); + } // `catch` cannot be the name of a module export, so we define our thenable methods here instead + + + then(onFulfilled) { + const promise = privateProps.promise.get(this); + return promise.then(onFulfilled); + } + + finally(onFinally) { + const promise = privateProps.promise.get(this); + return promise.finally(onFinally); + } + + } // Assign instance methods from src/instanceMethods/*.js to prototype + + + Object.assign(SweetAlert.prototype, instanceMethods); // Assign static methods from src/staticMethods/*.js to constructor + + Object.assign(SweetAlert, staticMethods); // Proxy to instance methods to constructor, for now, for backwards compatibility + + Object.keys(instanceMethods).forEach(key => { + SweetAlert[key] = function (...args) { + if (currentInstance) { + return currentInstance[key](...args); + } + }; + }); + SweetAlert.DismissReason = DismissReason; + SweetAlert.version = '11.1.5'; + + const Swal = SweetAlert; + Swal.default = Swal; + + return Swal; + +})); +if (typeof this !== 'undefined' && this.Sweetalert2){ this.swal = this.sweetAlert = this.Swal = this.SweetAlert = this.Sweetalert2} diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Host/wwwroot/libs/sweetalert2/sweetalert2.min.css b/modules/cms-kit/host/Volo.CmsKit.Web.Host/wwwroot/libs/sweetalert2/sweetalert2.min.css new file mode 100644 index 0000000000..25eb26f1c0 --- /dev/null +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Host/wwwroot/libs/sweetalert2/sweetalert2.min.css @@ -0,0 +1 @@ +.swal2-popup.swal2-toast{box-sizing:border-box;grid-column:1/4!important;grid-row:1/4!important;grid-template-columns:1fr 99fr 1fr;padding:1em;overflow-y:hidden;background:#fff;box-shadow:0 0 .625em #d9d9d9;pointer-events:all}.swal2-popup.swal2-toast>*{grid-column:2}.swal2-popup.swal2-toast .swal2-title{margin:1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-loading{justify-content:center}.swal2-popup.swal2-toast .swal2-input{height:2em;margin:.5em;font-size:1em}.swal2-popup.swal2-toast .swal2-validation-message{font-size:1em}.swal2-popup.swal2-toast .swal2-footer{margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-popup.swal2-toast .swal2-close{grid-column:3/3;grid-row:1/99;align-self:center;width:.8em;height:.8em;margin:0;font-size:2em}.swal2-popup.swal2-toast .swal2-html-container{margin:1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-html-container:empty{padding:0}.swal2-popup.swal2-toast .swal2-loader{grid-column:1;grid-row:1/99;align-self:center;width:2em;height:2em;margin:.25em}.swal2-popup.swal2-toast .swal2-icon{grid-column:1;grid-row:1/99;align-self:center;width:2em;min-width:2em;height:2em;margin:0 .5em 0 0}.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:700}.swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-popup.swal2-toast .swal2-actions{justify-content:flex-start;height:auto;margin:0;margin-top:.3125em;padding:0}.swal2-popup.swal2-toast .swal2-styled{margin:.25em .5em;padding:.4em .6em;font-size:1em}.swal2-popup.swal2-toast .swal2-styled:focus{box-shadow:0 0 0 1px #fff,0 0 0 3px rgba(100,150,200,.5)}.swal2-popup.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;transform:rotate(45deg);border-radius:50%}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.8em;left:-.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.25em;left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-popup.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{-webkit-animation:swal2-toast-animate-success-line-tip .75s;animation:swal2-toast-animate-success-line-tip .75s}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{-webkit-animation:swal2-toast-animate-success-line-long .75s;animation:swal2-toast-animate-success-line-long .75s}.swal2-popup.swal2-toast.swal2-show{-webkit-animation:swal2-toast-show .5s;animation:swal2-toast-show .5s}.swal2-popup.swal2-toast.swal2-hide{-webkit-animation:swal2-toast-hide .1s forwards;animation:swal2-toast-hide .1s forwards}.swal2-container{display:grid;position:fixed;z-index:1060;top:0;right:0;bottom:0;left:0;box-sizing:border-box;grid-template-areas:"top-start top top-end" "center-start center center-end" "bottom-start bottom-center bottom-end";grid-template-rows:minmax(-webkit-min-content,auto) minmax(-webkit-min-content,auto) minmax(-webkit-min-content,auto);grid-template-rows:minmax(min-content,auto) minmax(min-content,auto) minmax(min-content,auto);height:100%;padding:.625em;overflow-x:hidden;transition:background-color .1s;-webkit-overflow-scrolling:touch}.swal2-container.swal2-backdrop-show,.swal2-container.swal2-noanimation{background:rgba(0,0,0,.4)}.swal2-container.swal2-backdrop-hide{background:0 0!important}.swal2-container.swal2-bottom-start,.swal2-container.swal2-center-start,.swal2-container.swal2-top-start{grid-template-columns:minmax(0,1fr) auto auto}.swal2-container.swal2-bottom,.swal2-container.swal2-center,.swal2-container.swal2-top{grid-template-columns:auto minmax(0,1fr) auto}.swal2-container.swal2-bottom-end,.swal2-container.swal2-center-end,.swal2-container.swal2-top-end{grid-template-columns:auto auto minmax(0,1fr)}.swal2-container.swal2-top-start>.swal2-popup{align-self:start}.swal2-container.swal2-top>.swal2-popup{grid-column:2;align-self:start;justify-self:center}.swal2-container.swal2-top-end>.swal2-popup,.swal2-container.swal2-top-right>.swal2-popup{grid-column:3;align-self:start;justify-self:end}.swal2-container.swal2-center-left>.swal2-popup,.swal2-container.swal2-center-start>.swal2-popup{grid-row:2;align-self:center}.swal2-container.swal2-center>.swal2-popup{grid-column:2;grid-row:2;align-self:center;justify-self:center}.swal2-container.swal2-center-end>.swal2-popup,.swal2-container.swal2-center-right>.swal2-popup{grid-column:3;grid-row:2;align-self:center;justify-self:end}.swal2-container.swal2-bottom-left>.swal2-popup,.swal2-container.swal2-bottom-start>.swal2-popup{grid-column:1;grid-row:3;align-self:end}.swal2-container.swal2-bottom>.swal2-popup{grid-column:2;grid-row:3;justify-self:center;align-self:end}.swal2-container.swal2-bottom-end>.swal2-popup,.swal2-container.swal2-bottom-right>.swal2-popup{grid-column:3;grid-row:3;align-self:end;justify-self:end}.swal2-container.swal2-grow-fullscreen>.swal2-popup,.swal2-container.swal2-grow-row>.swal2-popup{grid-column:1/4;width:100%}.swal2-container.swal2-grow-column>.swal2-popup,.swal2-container.swal2-grow-fullscreen>.swal2-popup{grid-row:1/4;align-self:stretch}.swal2-container.swal2-no-transition{transition:none!important}.swal2-popup{display:none;position:relative;box-sizing:border-box;grid-template-columns:minmax(0,100%);width:32em;max-width:100%;padding:0 0 1.25em;border:none;border-radius:5px;background:#fff;color:#545454;font-family:inherit;font-size:1rem}.swal2-popup:focus{outline:0}.swal2-popup.swal2-loading{overflow-y:hidden}.swal2-title{position:relative;max-width:100%;margin:0;padding:.8em 1em 0;color:#595959;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;word-wrap:break-word}.swal2-actions{display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:center;width:auto;margin:1.25em auto 0;padding:0}.swal2-actions:not(.swal2-loading) .swal2-styled[disabled]{opacity:.4}.swal2-actions:not(.swal2-loading) .swal2-styled:hover{background-image:linear-gradient(rgba(0,0,0,.1),rgba(0,0,0,.1))}.swal2-actions:not(.swal2-loading) .swal2-styled:active{background-image:linear-gradient(rgba(0,0,0,.2),rgba(0,0,0,.2))}.swal2-loader{display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;-webkit-animation:swal2-rotate-loading 1.5s linear 0s infinite normal;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 transparent #2778c4 transparent}.swal2-styled{margin:.3125em;padding:.625em 1.1em;transition:box-shadow .1s;box-shadow:0 0 0 3px transparent;font-weight:500}.swal2-styled:not([disabled]){cursor:pointer}.swal2-styled.swal2-confirm{border:0;border-radius:.25em;background:initial;background-color:#7367f0;color:#fff;font-size:1em}.swal2-styled.swal2-confirm:focus{box-shadow:0 0 0 3px rgba(115,103,240,.5)}.swal2-styled.swal2-deny{border:0;border-radius:.25em;background:initial;background-color:#ea5455;color:#fff;font-size:1em}.swal2-styled.swal2-deny:focus{box-shadow:0 0 0 3px rgba(234,84,85,.5)}.swal2-styled.swal2-cancel{border:0;border-radius:.25em;background:initial;background-color:#6e7d88;color:#fff;font-size:1em}.swal2-styled.swal2-cancel:focus{box-shadow:0 0 0 3px rgba(110,125,136,.5)}.swal2-styled.swal2-default-outline:focus{box-shadow:0 0 0 3px rgba(100,150,200,.5)}.swal2-styled:focus{outline:0}.swal2-styled::-moz-focus-inner{border:0}.swal2-footer{justify-content:center;margin:1em 0 0;padding:1em 1em 0;border-top:1px solid #eee;color:#545454;font-size:1em}.swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;grid-column:auto!important;height:.25em;overflow:hidden;border-bottom-right-radius:5px;border-bottom-left-radius:5px}.swal2-timer-progress-bar{width:100%;height:.25em;background:rgba(0,0,0,.2)}.swal2-image{max-width:100%;margin:2em auto 1em}.swal2-close{z-index:2;align-items:center;justify-content:center;width:1.2em;height:1.2em;margin-top:0;margin-right:0;margin-bottom:-1.2em;padding:0;overflow:hidden;transition:color .1s,box-shadow .1s;border:none;border-radius:5px;background:0 0;color:#ccc;font-family:serif;font-family:monospace;font-size:2.5em;cursor:pointer;justify-self:end}.swal2-close:hover{transform:none;background:0 0;color:#f27474}.swal2-close:focus{outline:0;box-shadow:inset 0 0 0 3px rgba(100,150,200,.5)}.swal2-close::-moz-focus-inner{border:0}.swal2-html-container{z-index:1;justify-content:center;margin:1em 1.6em .3em;padding:0;overflow:auto;color:#545454;font-size:1.125em;font-weight:400;line-height:normal;text-align:center;word-wrap:break-word;word-break:break-word}.swal2-checkbox,.swal2-file,.swal2-input,.swal2-radio,.swal2-select,.swal2-textarea{margin:1em 2em 0}.swal2-file,.swal2-input,.swal2-textarea{box-sizing:border-box;width:auto;transition:border-color .1s,box-shadow .1s;border:1px solid #d9d9d9;border-radius:.1875em;background:inherit;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px transparent;color:inherit;font-size:1.125em}.swal2-file.swal2-inputerror,.swal2-input.swal2-inputerror,.swal2-textarea.swal2-inputerror{border-color:#f27474!important;box-shadow:0 0 2px #f27474!important}.swal2-file:focus,.swal2-input:focus,.swal2-textarea:focus{border:1px solid #b4dbed;outline:0;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(100,150,200,.5)}.swal2-file::-moz-placeholder,.swal2-input::-moz-placeholder,.swal2-textarea::-moz-placeholder{color:#ccc}.swal2-file:-ms-input-placeholder,.swal2-input:-ms-input-placeholder,.swal2-textarea:-ms-input-placeholder{color:#ccc}.swal2-file::placeholder,.swal2-input::placeholder,.swal2-textarea::placeholder{color:#ccc}.swal2-range{margin:1em 2em 0;background:#fff}.swal2-range input{width:80%}.swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}.swal2-range input,.swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}.swal2-input{height:2.625em;padding:0 .75em}.swal2-file{width:75%;margin-right:auto;margin-left:auto;background:inherit;font-size:1.125em}.swal2-textarea{height:6.75em;padding:.75em}.swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:inherit;color:inherit;font-size:1.125em}.swal2-checkbox,.swal2-radio{align-items:center;justify-content:center;background:#fff;color:inherit}.swal2-checkbox label,.swal2-radio label{margin:0 .6em;font-size:1.125em}.swal2-checkbox input,.swal2-radio input{flex-shrink:0;margin:0 .4em}.swal2-input-label{display:flex;justify-content:center;margin:1em auto 0}.swal2-validation-message{align-items:center;justify-content:center;margin:1em 0 0;padding:.625em;overflow:hidden;background:#f0f0f0;color:#666;font-size:1em;font-weight:300}.swal2-validation-message::before{content:"!";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}.swal2-icon{position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:2.5em auto .6em;border:.25em solid transparent;border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}.swal2-icon.swal2-error{border-color:#f27474;color:#f27474}.swal2-icon.swal2-error .swal2-x-mark{position:relative;flex-grow:1}.swal2-icon.swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}.swal2-icon.swal2-error.swal2-icon-show{-webkit-animation:swal2-animate-error-icon .5s;animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-error.swal2-icon-show .swal2-x-mark{-webkit-animation:swal2-animate-error-x-mark .5s;animation:swal2-animate-error-x-mark .5s}.swal2-icon.swal2-warning{border-color:#facea8;color:#f8bb86}.swal2-icon.swal2-info{border-color:#9de0f6;color:#3fc3ee}.swal2-icon.swal2-question{border-color:#c9dae1;color:#87adbd}.swal2-icon.swal2-success{border-color:#a5dc86;color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;transform:rotate(45deg);border-radius:50%}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}.swal2-icon.swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-.25em;left:-.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}.swal2-icon.swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}.swal2-icon.swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}.swal2-icon.swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-tip{-webkit-animation:swal2-animate-success-line-tip .75s;animation:swal2-animate-success-line-tip .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-long{-webkit-animation:swal2-animate-success-line-long .75s;animation:swal2-animate-success-line-long .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-circular-line-right{-webkit-animation:swal2-rotate-success-circular-line 4.25s ease-in;animation:swal2-rotate-success-circular-line 4.25s ease-in}.swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:1.25em auto;padding:0;background:inherit;font-weight:600}.swal2-progress-steps li{display:inline-block;position:relative}.swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:#add8e6;color:#fff}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:#add8e6}.swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}[class^=swal2]{-webkit-tap-highlight-color:transparent}.swal2-show{-webkit-animation:swal2-show .3s;animation:swal2-show .3s}.swal2-hide{-webkit-animation:swal2-hide .15s forwards;animation:swal2-hide .15s forwards}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{margin-right:initial;margin-left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}@-webkit-keyframes swal2-toast-show{0%{transform:translateY(-.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0)}}@keyframes swal2-toast-show{0%{transform:translateY(-.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0)}}@-webkit-keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@-webkit-keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@-webkit-keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@-webkit-keyframes swal2-show{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}100%{transform:scale(1)}}@keyframes swal2-show{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}100%{transform:scale(1)}}@-webkit-keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(.5);opacity:0}}@keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(.5);opacity:0}}@-webkit-keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@-webkit-keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@-webkit-keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@-webkit-keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@-webkit-keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0);opacity:1}}@-webkit-keyframes swal2-rotate-loading{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes swal2-rotate-loading{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto!important}body.swal2-no-backdrop .swal2-container{background-color:transparent!important;pointer-events:none}body.swal2-no-backdrop .swal2-container .swal2-popup{pointer-events:all}body.swal2-no-backdrop .swal2-container .swal2-modal{box-shadow:0 0 10px rgba(0,0,0,.4)}@media print{body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow-y:scroll!important}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .swal2-container{position:static!important}}body.swal2-toast-shown .swal2-container{box-sizing:border-box;width:360px;max-width:100%;background-color:transparent;pointer-events:none}body.swal2-toast-shown .swal2-container.swal2-top{top:0;right:auto;bottom:auto;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{top:0;right:0;bottom:auto;left:auto}body.swal2-toast-shown .swal2-container.swal2-top-left,body.swal2-toast-shown .swal2-container.swal2-top-start{top:0;right:auto;bottom:auto;left:0}body.swal2-toast-shown .swal2-container.swal2-center-left,body.swal2-toast-shown .swal2-container.swal2-center-start{top:50%;right:auto;bottom:auto;left:0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{top:50%;right:auto;bottom:auto;left:50%;transform:translate(-50%,-50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{top:50%;right:0;bottom:auto;left:auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-left,body.swal2-toast-shown .swal2-container.swal2-bottom-start{top:auto;right:auto;bottom:0;left:0}body.swal2-toast-shown .swal2-container.swal2-bottom{top:auto;right:auto;bottom:0;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{top:auto;right:0;bottom:0;left:auto} \ No newline at end of file diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Host/wwwroot/libs/sweetalert2/sweetalert2.min.js b/modules/cms-kit/host/Volo.CmsKit.Web.Host/wwwroot/libs/sweetalert2/sweetalert2.min.js new file mode 100644 index 0000000000..9a383d5289 --- /dev/null +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Host/wwwroot/libs/sweetalert2/sweetalert2.min.js @@ -0,0 +1 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).Sweetalert2=t()}(this,function(){"use strict";const l=Object.freeze({cancel:"cancel",backdrop:"backdrop",close:"close",esc:"esc",timer:"timer"}),t="SweetAlert2:",o=e=>e.charAt(0).toUpperCase()+e.slice(1),a=e=>Array.prototype.slice.call(e),s=e=>{console.warn("".concat(t," ").concat("object"==typeof e?e.join(" "):e))},r=e=>{console.error("".concat(t," ").concat(e))},n=[],i=(e,t)=>{t='"'.concat(e,'" is deprecated and will be removed in the next major release. Please use "').concat(t,'" instead.'),n.includes(t)||(n.push(t),s(t))},c=e=>"function"==typeof e?e():e,u=e=>e&&"function"==typeof e.toPromise,d=e=>u(e)?e.toPromise():Promise.resolve(e),p=e=>e&&Promise.resolve(e)===e,m=e=>e instanceof Element||(e=>"object"==typeof e&&e.jquery)(e);var e=e=>{const t={};for(const n in e)t[e[n]]="swal2-"+e[n];return t};const h=e(["container","shown","height-auto","iosfix","popup","modal","no-backdrop","no-transition","toast","toast-shown","show","hide","close","title","html-container","actions","confirm","deny","cancel","default-outline","footer","icon","icon-content","image","input","file","range","select","radio","checkbox","label","textarea","inputerror","input-label","validation-message","progress-steps","active-progress-step","progress-step","progress-step-line","loader","loading","styled","top","top-start","top-end","top-left","top-right","center","center-start","center-end","center-left","center-right","bottom","bottom-start","bottom-end","bottom-left","bottom-right","grow-row","grow-column","grow-fullscreen","rtl","timer-progress-bar","timer-progress-bar-container","scrollbar-measure","icon-success","icon-warning","icon-info","icon-question","icon-error"]),g=e(["success","warning","info","question","error"]),b=()=>document.body.querySelector(".".concat(h.container)),f=e=>{const t=b();return t?t.querySelector(e):null},y=e=>f(".".concat(e)),v=()=>y(h.popup),w=()=>y(h.icon),C=()=>y(h.title),k=()=>y(h["html-container"]),A=()=>y(h.image),B=()=>y(h["progress-steps"]),x=()=>y(h["validation-message"]),P=()=>f(".".concat(h.actions," .").concat(h.confirm)),E=()=>f(".".concat(h.actions," .").concat(h.deny));const S=()=>f(".".concat(h.loader)),T=()=>f(".".concat(h.actions," .").concat(h.cancel)),L=()=>y(h.actions),O=()=>y(h.footer),j=()=>y(h["timer-progress-bar"]),D=()=>y(h.close),I=()=>{const e=a(v().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')).sort((e,t)=>(e=parseInt(e.getAttribute("tabindex")),(t=parseInt(t.getAttribute("tabindex")))"-1"!==e.getAttribute("tabindex"));return(t=>{const n=[];for(let e=0;eG(e))},M=()=>!H()&&!document.body.classList.contains(h["no-backdrop"]),H=()=>document.body.classList.contains(h["toast-shown"]);const q={previousBodyPadding:null},V=(t,e)=>{if(t.textContent="",e){const n=new DOMParser,o=n.parseFromString(e,"text/html");a(o.querySelector("head").childNodes).forEach(e=>{t.appendChild(e)}),a(o.querySelector("body").childNodes).forEach(e=>{t.appendChild(e)})}},N=(t,e)=>{if(!e)return!1;var n=e.split(/\s+/);for(let e=0;e{var o,i;if(o=e,i=t,a(o.classList).forEach(e=>{Object.values(h).includes(e)||Object.values(g).includes(e)||Object.values(i.showClass).includes(e)||o.classList.remove(e)}),t.customClass&&t.customClass[n]){if("string"!=typeof t.customClass[n]&&!t.customClass[n].forEach)return s("Invalid type of customClass.".concat(n,'! Expected string or iterable object, got "').concat(typeof t.customClass[n],'"'));W(e,t.customClass[n])}},F=(e,t)=>{if(!t)return null;switch(t){case"select":case"textarea":case"file":return K(e,h[t]);case"checkbox":return e.querySelector(".".concat(h.checkbox," input"));case"radio":return e.querySelector(".".concat(h.radio," input:checked"))||e.querySelector(".".concat(h.radio," input:first-child"));case"range":return e.querySelector(".".concat(h.range," input"));default:return K(e,h.input)}},R=e=>{var t;e.focus(),"file"!==e.type&&(t=e.value,e.value="",e.value=t)},z=(e,t,n)=>{e&&t&&(t="string"==typeof t?t.split(/\s+/).filter(Boolean):t).forEach(t=>{e.forEach?e.forEach(e=>{n?e.classList.add(t):e.classList.remove(t)}):n?e.classList.add(t):e.classList.remove(t)})},W=(e,t)=>{z(e,t,!0)},_=(e,t)=>{z(e,t,!1)},K=(t,n)=>{for(let e=0;e{(n=n==="".concat(parseInt(n))?parseInt(n):n)||0===parseInt(n)?e.style[t]="number"==typeof n?"".concat(n,"px"):n:e.style.removeProperty(t)},Z=(e,t="flex")=>{e.style.display=t},J=e=>{e.style.display="none"},X=(e,t,n,o)=>{const i=e.querySelector(t);i&&(i.style[n]=o)},$=(e,t,n)=>{t?Z(e,n):J(e)},G=e=>!(!e||!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)),Q=()=>!G(P())&&!G(E())&&!G(T()),ee=e=>!!(e.scrollHeight>e.clientHeight),te=e=>{const t=window.getComputedStyle(e);var n=parseFloat(t.getPropertyValue("animation-duration")||"0"),e=parseFloat(t.getPropertyValue("transition-duration")||"0");return 0{const n=j();G(n)&&(t&&(n.style.transition="none",n.style.width="100%"),setTimeout(()=>{n.style.transition="width ".concat(e/1e3,"s linear"),n.style.width="0%"},10))},oe=()=>"undefined"==typeof window||"undefined"==typeof document,ie='\n
                        \n \n
                          \n
                          \n \n

                          \n
                          \n \n \n
                          \n \n \n
                          \n \n
                          \n \n \n
                          \n
                          \n
                          \n \n \n \n
                          \n
                          \n
                          \n
                          \n
                          \n
                          \n').replace(/(^|\n)\s*/g,""),ae=()=>{ln.isVisible()&&ln.resetValidationMessage()},se=e=>{var t=(()=>{const e=b();return!!e&&(e.remove(),_([document.documentElement,document.body],[h["no-backdrop"],h["toast-shown"],h["has-column"]]),!0)})();if(oe())r("SweetAlert2 requires document to initialize");else{const n=document.createElement("div");n.className=h.container,t&&W(n,h["no-transition"]),V(n,ie);const o="string"==typeof(t=e.target)?document.querySelector(t):t;o.appendChild(n),(e=>{const t=v();t.setAttribute("role",e.toast?"alert":"dialog"),t.setAttribute("aria-live",e.toast?"polite":"assertive"),e.toast||t.setAttribute("aria-modal","true")})(e),e=o,"rtl"===window.getComputedStyle(e).direction&&W(b(),h.rtl),(()=>{const e=v(),t=K(e,h.input),n=K(e,h.file),o=e.querySelector(".".concat(h.range," input")),i=e.querySelector(".".concat(h.range," output")),a=K(e,h.select),s=e.querySelector(".".concat(h.checkbox," input")),r=K(e,h.textarea);t.oninput=ae,n.onchange=ae,a.onchange=ae,s.onchange=ae,r.oninput=ae,o.oninput=()=>{ae(),i.value=o.value},o.onchange=()=>{ae(),o.nextSibling.value=o.value}})()}},re=(e,t)=>{e instanceof HTMLElement?t.appendChild(e):"object"==typeof e?ce(e,t):e&&V(t,e)},ce=(e,t)=>{e.jquery?le(t,e):V(t,e.toString())},le=(t,n)=>{if(t.textContent="",0 in n)for(let e=0;e in n;e++)t.appendChild(n[e].cloneNode(!0));else t.appendChild(n.cloneNode(!0))},ue=(()=>{if(oe())return!1;var e=document.createElement("div"),t={WebkitAnimation:"webkitAnimationEnd",OAnimation:"oAnimationEnd oanimationend",animation:"animationend"};for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&void 0!==e.style[n])return t[n];return!1})(),de=(e,t)=>{const n=L();var o=S(),i=P(),a=E(),s=T();(t.showConfirmButton||t.showDenyButton||t.showCancelButton?Z:J)(n),U(n,t,"actions"),pe(i,"confirm",t),pe(a,"deny",t),pe(s,"cancel",t),function(e,t,n,o){if(!o.buttonsStyling)return _([e,t,n],h.styled);W([e,t,n],h.styled),o.confirmButtonColor&&(e.style.backgroundColor=o.confirmButtonColor,W(e,h["default-outline"]));o.denyButtonColor&&(t.style.backgroundColor=o.denyButtonColor,W(t,h["default-outline"]));o.cancelButtonColor&&(n.style.backgroundColor=o.cancelButtonColor,W(n,h["default-outline"]))}(i,a,s,t),t.reverseButtons&&(n.insertBefore(s,o),n.insertBefore(a,o),n.insertBefore(i,o)),V(o,t.loaderHtml),U(o,t,"loader")};function pe(e,t,n){$(e,n["show".concat(o(t),"Button")],"inline-block"),V(e,n["".concat(t,"ButtonText")]),e.setAttribute("aria-label",n["".concat(t,"ButtonAriaLabel")]),e.className=h[t],U(e,n,"".concat(t,"Button")),W(e,n["".concat(t,"ButtonClass")])}const me=(e,t)=>{var n,o,i=b();i&&(o=i,"string"==typeof(n=t.backdrop)?o.style.background=n:n||W([document.documentElement,document.body],h["no-backdrop"]),o=i,(n=t.position)in h?W(o,h[n]):(s('The "position" parameter is not valid, defaulting to "center"'),W(o,h.center)),n=i,!(o=t.grow)||"string"!=typeof o||(o="grow-".concat(o))in h&&W(n,h[o]),U(i,t,"container"))};var he={promise:new WeakMap,innerParams:new WeakMap,domCache:new WeakMap};const ge=["input","file","range","select","radio","checkbox","textarea"],be=e=>{if(!ke[e.input])return r('Unexpected type of input! Expected "text", "email", "password", "number", "tel", "select", "radio", "checkbox", "textarea", "file" or "url", got "'.concat(e.input,'"'));var t=Ce(e.input);const n=ke[e.input](t,e);Z(n),setTimeout(()=>{R(n)})},fe=(e,t)=>{const n=F(v(),e);if(n){(t=>{for(let e=0;e{var t=Ce(e.input);e.customClass&&W(t,e.customClass.input)},ve=(e,t)=>{e.placeholder&&!t.inputPlaceholder||(e.placeholder=t.inputPlaceholder)},we=(e,t,n)=>{if(n.inputLabel){e.id=h.input;const i=document.createElement("label");var o=h["input-label"];i.setAttribute("for",e.id),i.className=o,W(i,n.customClass.inputLabel),i.innerText=n.inputLabel,t.insertAdjacentElement("beforebegin",i)}},Ce=e=>{e=h[e]||h.input;return K(v(),e)},ke={};ke.text=ke.email=ke.password=ke.number=ke.tel=ke.url=(e,t)=>("string"==typeof t.inputValue||"number"==typeof t.inputValue?e.value=t.inputValue:p(t.inputValue)||s('Unexpected type of inputValue! Expected "string", "number" or "Promise", got "'.concat(typeof t.inputValue,'"')),we(e,e,t),ve(e,t),e.type=t.input,e),ke.file=(e,t)=>(we(e,e,t),ve(e,t),e),ke.range=(e,t)=>{const n=e.querySelector("input"),o=e.querySelector("output");return n.value=t.inputValue,n.type=t.input,o.value=t.inputValue,we(n,e,t),e},ke.select=(e,t)=>{if(e.textContent="",t.inputPlaceholder){const n=document.createElement("option");V(n,t.inputPlaceholder),n.value="",n.disabled=!0,n.selected=!0,e.appendChild(n)}return we(e,e,t),e},ke.radio=e=>(e.textContent="",e),ke.checkbox=(e,t)=>{const n=F(v(),"checkbox");n.value=1,n.id=h.checkbox,n.checked=Boolean(t.inputValue);var o=e.querySelector("span");return V(o,t.inputPlaceholder),e},ke.textarea=(n,e)=>{n.value=e.inputValue,ve(n,e),we(n,n,e);return setTimeout(()=>{if("MutationObserver"in window){const t=parseInt(window.getComputedStyle(v()).width);new MutationObserver(()=>{var e,e=n.offsetWidth+(e=n,parseInt(window.getComputedStyle(e).marginLeft)+parseInt(window.getComputedStyle(e).marginRight));e>t?v().style.width="".concat(e,"px"):v().style.width=null}).observe(n,{attributes:!0,attributeFilter:["style"]})}}),n};const Ae=(e,t)=>{const n=k();U(n,t,"htmlContainer"),t.html?(re(t.html,n),Z(n,"block")):t.text?(n.textContent=t.text,Z(n,"block")):J(n),((e,o)=>{const i=v();e=he.innerParams.get(e);const a=!e||o.input!==e.input;ge.forEach(e=>{var t=h[e];const n=K(i,t);fe(e,o.inputAttributes),n.className=t,a&&J(n)}),o.input&&(a&&be(o),ye(o))})(e,t)},Be=(e,t)=>{for(const n in g)t.icon!==n&&_(e,g[n]);W(e,g[t.icon]),Ee(e,t),xe(),U(e,t,"icon")},xe=()=>{const e=v();var t=window.getComputedStyle(e).getPropertyValue("background-color");const n=e.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix");for(let e=0;e{var n;e.textContent="",t.iconHtml?V(e,Se(t.iconHtml)):"success"===t.icon?V(e,'\n
                          \n \n
                          \n
                          \n '):"error"===t.icon?V(e,'\n \n \n \n \n '):(n={question:"?",warning:"!",info:"i"},V(e,Se(n[t.icon])))},Ee=(e,t)=>{if(t.iconColor){e.style.color=t.iconColor,e.style.borderColor=t.iconColor;for(const n of[".swal2-success-line-tip",".swal2-success-line-long",".swal2-x-mark-line-left",".swal2-x-mark-line-right"])X(e,n,"backgroundColor",t.iconColor);X(e,".swal2-success-ring","borderColor",t.iconColor)}},Se=e=>'
                          ').concat(e,"
                          "),Te=(e,o)=>{const i=B();if(!o.progressSteps||0===o.progressSteps.length)return J(i);Z(i),i.textContent="",o.currentProgressStep>=o.progressSteps.length&&s("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),o.progressSteps.forEach((e,t)=>{var n,e=(n=e,e=document.createElement("li"),W(e,h["progress-step"]),V(e,n),e);i.appendChild(e),t===o.currentProgressStep&&W(e,h["active-progress-step"]),t!==o.progressSteps.length-1&&(t=(e=>{const t=document.createElement("li");return W(t,h["progress-step-line"]),e.progressStepsDistance&&(t.style.width=e.progressStepsDistance),t})(o),i.appendChild(t))})},Le=(e,t)=>{e.className="".concat(h.popup," ").concat(G(e)?t.showClass.popup:""),t.toast?(W([document.documentElement,document.body],h["toast-shown"]),W(e,h.toast)):W(e,h.modal),U(e,t,"popup"),"string"==typeof t.customClass&&W(e,t.customClass),t.icon&&W(e,h["icon-".concat(t.icon)])},Oe=(e,t)=>{var n,o,i;(e=>{var t=b();const n=v();e.toast?(Y(t,"width",e.width),n.style.width="100%",n.insertBefore(S(),w())):Y(n,"width",e.width),Y(n,"padding",e.padding),e.background&&(n.style.background=e.background),J(x()),Le(n,e)})(t),me(0,t),Te(0,t),i=e,n=t,o=he.innerParams.get(i),i=w(),o&&n.icon===o.icon?(Pe(i,n),Be(i,n)):n.icon||n.iconHtml?n.icon&&-1===Object.keys(g).indexOf(n.icon)?(r('Unknown icon! Expected "success", "error", "warning", "info" or "question", got "'.concat(n.icon,'"')),J(i)):(Z(i),Pe(i,n),Be(i,n),W(i,n.showClass.icon)):J(i),(e=>{const t=A();if(!e.imageUrl)return J(t);Z(t,""),t.setAttribute("src",e.imageUrl),t.setAttribute("alt",e.imageAlt),Y(t,"width",e.imageWidth),Y(t,"height",e.imageHeight),t.className=h.image,U(t,e,"image")})(t),(e=>{const t=C();$(t,e.title||e.titleText,"block"),e.title&&re(e.title,t),e.titleText&&(t.innerText=e.titleText),U(t,e,"title")})(t),(e=>{const t=D();V(t,e.closeButtonHtml),U(t,e,"closeButton"),$(t,e.showCloseButton),t.setAttribute("aria-label",e.closeButtonAriaLabel)})(t),Ae(e,t),de(0,t),i=t,e=O(),$(e,i.footer),i.footer&&re(i.footer,e),U(e,i,"footer"),"function"==typeof t.didRender&&t.didRender(v())};const je=()=>P()&&P().click();const De=e=>{let t=v();t||ln.fire(),t=v();var n=S();H()?J(w()):Ie(t,e),Z(n),t.setAttribute("data-loading",!0),t.setAttribute("aria-busy",!0),t.focus()},Ie=(e,t)=>{var n=L();const o=S();!t&&G(P())&&(t=P()),Z(n),t&&(J(t),o.setAttribute("data-button-to-replace",t.className)),o.parentNode.insertBefore(o,t),W([e,n],h.loading)},Me={},He=o=>new Promise(e=>{if(!o)return e();var t=window.scrollX,n=window.scrollY;Me.restoreFocusTimeout=setTimeout(()=>{Me.previousActiveElement&&Me.previousActiveElement.focus?(Me.previousActiveElement.focus(),Me.previousActiveElement=null):document.body&&document.body.focus(),e()},100),window.scrollTo(t,n)});const qe=()=>{if(Me.timeout)return(()=>{const e=j();var t=parseInt(window.getComputedStyle(e).width);e.style.removeProperty("transition"),e.style.width="100%";var n=parseInt(window.getComputedStyle(e).width),n=parseInt(t/n*100);e.style.removeProperty("transition"),e.style.width="".concat(n,"%")})(),Me.timeout.stop()},Ve=()=>{if(Me.timeout){var e=Me.timeout.start();return ne(e),e}};let Ne=!1;const Ue={};const Fe=t=>{for(let e=t.target;e&&e!==document;e=e.parentNode)for(const o in Ue){var n=e.getAttribute(o);if(n)return void Ue[o].fire({template:n})}},Re={title:"",titleText:"",text:"",html:"",footer:"",icon:void 0,iconColor:void 0,iconHtml:void 0,template:void 0,toast:!1,showClass:{popup:"swal2-show",backdrop:"swal2-backdrop-show",icon:"swal2-icon-show"},hideClass:{popup:"swal2-hide",backdrop:"swal2-backdrop-hide",icon:"swal2-icon-hide"},customClass:{},target:"body",backdrop:!0,heightAuto:!0,allowOutsideClick:!0,allowEscapeKey:!0,allowEnterKey:!0,stopKeydownPropagation:!0,keydownListenerCapture:!1,showConfirmButton:!0,showDenyButton:!1,showCancelButton:!1,preConfirm:void 0,preDeny:void 0,confirmButtonText:"OK",confirmButtonAriaLabel:"",confirmButtonColor:void 0,denyButtonText:"No",denyButtonAriaLabel:"",denyButtonColor:void 0,cancelButtonText:"Cancel",cancelButtonAriaLabel:"",cancelButtonColor:void 0,buttonsStyling:!0,reverseButtons:!1,focusConfirm:!0,focusDeny:!1,focusCancel:!1,returnFocus:!0,showCloseButton:!1,closeButtonHtml:"×",closeButtonAriaLabel:"Close this dialog",loaderHtml:"",showLoaderOnConfirm:!1,showLoaderOnDeny:!1,imageUrl:void 0,imageWidth:void 0,imageHeight:void 0,imageAlt:"",timer:void 0,timerProgressBar:!1,width:void 0,padding:void 0,background:void 0,input:void 0,inputPlaceholder:"",inputLabel:"",inputValue:"",inputOptions:{},inputAutoTrim:!0,inputAttributes:{},inputValidator:void 0,returnInputValueOnDeny:!1,validationMessage:void 0,grow:!1,position:"center",progressSteps:[],currentProgressStep:void 0,progressStepsDistance:void 0,willOpen:void 0,didOpen:void 0,didRender:void 0,willClose:void 0,didClose:void 0,didDestroy:void 0,scrollbarPadding:!0},ze=["allowEscapeKey","allowOutsideClick","background","buttonsStyling","cancelButtonAriaLabel","cancelButtonColor","cancelButtonText","closeButtonAriaLabel","closeButtonHtml","confirmButtonAriaLabel","confirmButtonColor","confirmButtonText","currentProgressStep","customClass","denyButtonAriaLabel","denyButtonColor","denyButtonText","didClose","didDestroy","footer","hideClass","html","icon","iconColor","iconHtml","imageAlt","imageHeight","imageUrl","imageWidth","preConfirm","preDeny","progressSteps","returnFocus","reverseButtons","showCancelButton","showCloseButton","showConfirmButton","showDenyButton","text","title","titleText","willClose"],We={},_e=["allowOutsideClick","allowEnterKey","backdrop","focusConfirm","focusDeny","focusCancel","returnFocus","heightAuto","keydownListenerCapture"],Ke=e=>Object.prototype.hasOwnProperty.call(Re,e);const Ye=e=>We[e],Ze=e=>{!e.backdrop&&e.allowOutsideClick&&s('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`');for(const o in e)n=o,Ke(n)||s('Unknown parameter "'.concat(n,'"')),e.toast&&(t=o,_e.includes(t)&&s('The parameter "'.concat(t,'" is incompatible with toasts'))),t=o,Ye(t)&&i(t,Ye(t));var t,n};var Je=Object.freeze({isValidParameter:Ke,isUpdatableParameter:e=>-1!==ze.indexOf(e),isDeprecatedParameter:Ye,argsToParams:n=>{const o={};return"object"!=typeof n[0]||m(n[0])?["title","html","icon"].forEach((e,t)=>{t=n[t];"string"==typeof t||m(t)?o[e]=t:void 0!==t&&r("Unexpected type of ".concat(e,'! Expected "string" or "Element", got ').concat(typeof t))}):Object.assign(o,n[0]),o},isVisible:()=>G(v()),clickConfirm:je,clickDeny:()=>E()&&E().click(),clickCancel:()=>T()&&T().click(),getContainer:b,getPopup:v,getTitle:C,getHtmlContainer:k,getImage:A,getIcon:w,getInputLabel:()=>y(h["input-label"]),getCloseButton:D,getActions:L,getConfirmButton:P,getDenyButton:E,getCancelButton:T,getLoader:S,getFooter:O,getTimerProgressBar:j,getFocusableElements:I,getValidationMessage:x,isLoading:()=>v().hasAttribute("data-loading"),fire:function(...e){return new this(...e)},mixin:function(n){class e extends this{_main(e,t){return super._main(e,Object.assign({},n,t))}}return e},showLoading:De,enableLoading:De,getTimerLeft:()=>Me.timeout&&Me.timeout.getTimerLeft(),stopTimer:qe,resumeTimer:Ve,toggleTimer:()=>{var e=Me.timeout;return e&&(e.running?qe:Ve)()},increaseTimer:e=>{if(Me.timeout){e=Me.timeout.increase(e);return ne(e,!0),e}},isTimerRunning:()=>Me.timeout&&Me.timeout.isRunning(),bindClickHandler:function(e="data-swal-template"){Ue[e]=this,Ne||(document.body.addEventListener("click",Fe),Ne=!0)}});function Xe(){var e=he.innerParams.get(this);if(e){const t=he.domCache.get(this);J(t.loader),H()?e.icon&&Z(w()):(e=>{const t=e.popup.getElementsByClassName(e.loader.getAttribute("data-button-to-replace"));if(t.length)Z(t[0],"inline-block");else if(Q())J(e.actions)})(t),_([t.popup,t.actions],h.loading),t.popup.removeAttribute("aria-busy"),t.popup.removeAttribute("data-loading"),t.confirmButton.disabled=!1,t.denyButton.disabled=!1,t.cancelButton.disabled=!1}}const $e=()=>{null===q.previousBodyPadding&&document.body.scrollHeight>window.innerHeight&&(q.previousBodyPadding=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight="".concat(q.previousBodyPadding+(()=>{const e=document.createElement("div");e.className=h["scrollbar-measure"],document.body.appendChild(e);var t=e.getBoundingClientRect().width-e.clientWidth;return document.body.removeChild(e),t})(),"px"))},Ge=()=>{navigator.userAgent.match(/(CriOS|FxiOS|EdgiOS|YaBrowser|UCBrowser)/i)||v().scrollHeight>window.innerHeight-44&&(b().style.paddingBottom="".concat(44,"px"))},Qe=()=>{const e=b();let t;e.ontouchstart=e=>{t=et(e)},e.ontouchmove=e=>{t&&(e.preventDefault(),e.stopPropagation())}},et=e=>{var t=e.target,n=b();return!tt(e)&&!nt(e)&&(t===n||!(ee(n)||"INPUT"===t.tagName||"TEXTAREA"===t.tagName||ee(k())&&k().contains(t)))},tt=e=>e.touches&&e.touches.length&&"stylus"===e.touches[0].touchType,nt=e=>e.touches&&1{const e=a(document.body.children);e.forEach(e=>{e.hasAttribute("data-previous-aria-hidden")?(e.setAttribute("aria-hidden",e.getAttribute("data-previous-aria-hidden")),e.removeAttribute("data-previous-aria-hidden")):e.removeAttribute("aria-hidden")})};var it={swalPromiseResolve:new WeakMap};function at(e,t,n,o){H()?ct(e,o):(He(n).then(()=>ct(e,o)),Me.keydownTarget.removeEventListener("keydown",Me.keydownHandler,{capture:Me.keydownListenerCapture}),Me.keydownHandlerAdded=!1),/^((?!chrome|android).)*safari/i.test(navigator.userAgent)?(t.setAttribute("style","display:none !important"),t.removeAttribute("class"),t.innerHTML=""):t.remove(),M()&&(null!==q.previousBodyPadding&&(document.body.style.paddingRight="".concat(q.previousBodyPadding,"px"),q.previousBodyPadding=null),N(document.body,h.iosfix)&&(t=parseInt(document.body.style.top,10),_(document.body,h.iosfix),document.body.style.top="",document.body.scrollTop=-1*t),ot()),_([document.documentElement,document.body],[h.shown,h["height-auto"],h["no-backdrop"],h["toast-shown"]])}function st(e){var t=v();if(t){e=void 0!==(o=e)?Object.assign({isConfirmed:!1,isDenied:!1,isDismissed:!1},o):{isConfirmed:!1,isDenied:!1,isDismissed:!0};var n=he.innerParams.get(this);if(n&&!N(t,n.hideClass.popup)){const i=it.swalPromiseResolve.get(this);_(t,n.showClass.popup),W(t,n.hideClass.popup);var o=b();_(o,n.showClass.backdrop),W(o,n.hideClass.backdrop),((e,t,n)=>{const o=b(),i=ue&&te(t);if(typeof n.willClose==="function")n.willClose(t);if(i)rt(e,t,o,n.returnFocus,n.didClose);else at(e,o,n.returnFocus,n.didClose)})(this,t,n),i(e)}}}const rt=(e,t,n,o,i)=>{Me.swalCloseEventFinishedCallback=at.bind(null,e,n,o,i),t.addEventListener(ue,function(e){e.target===t&&(Me.swalCloseEventFinishedCallback(),delete Me.swalCloseEventFinishedCallback)})},ct=(e,t)=>{setTimeout(()=>{"function"==typeof t&&t.bind(e.params)(),e._destroy()})};function lt(e,t,n){const o=he.domCache.get(e);t.forEach(e=>{o[e].disabled=n})}function ut(e,t){if(!e)return!1;if("radio"===e.type){const n=e.parentNode.parentNode,o=n.querySelectorAll("input");for(let e=0;e/^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]{2,24}$/.test(e)?Promise.resolve():Promise.resolve(t||"Invalid email address"),url:(e,t)=>/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(e)?Promise.resolve():Promise.resolve(t||"Invalid URL")};function mt(e){var t,n;(t=e).inputValidator||Object.keys(pt).forEach(e=>{t.input===e&&(t.inputValidator=pt[e])}),e.showLoaderOnConfirm&&!e.preConfirm&&s("showLoaderOnConfirm is set to true, but preConfirm is not defined.\nshowLoaderOnConfirm should be used together with preConfirm, see usage example:\nhttps://sweetalert2.github.io/#ajax-request"),(n=e).target&&("string"!=typeof n.target||document.querySelector(n.target))&&("string"==typeof n.target||n.target.appendChild)||(s('Target parameter is not valid, defaulting to "body"'),n.target="body"),"string"==typeof e.title&&(e.title=e.title.split("\n").join("
                          ")),se(e)}const ht=["swal-title","swal-html","swal-footer"],gt=e=>{e="string"==typeof e.template?document.querySelector(e.template):e.template;if(!e)return{};e=e.content;return kt(e),Object.assign(bt(e),ft(e),yt(e),vt(e),wt(e),Ct(e,ht))},bt=e=>{const o={};return a(e.querySelectorAll("swal-param")).forEach(e=>{At(e,["name","value"]);var t=e.getAttribute("name");let n=e.getAttribute("value");"boolean"==typeof Re[t]&&"false"===n&&(n=!1),"object"==typeof Re[t]&&(n=JSON.parse(n)),o[t]=n}),o},ft=e=>{const n={};return a(e.querySelectorAll("swal-button")).forEach(e=>{At(e,["type","color","aria-label"]);var t=e.getAttribute("type");n["".concat(t,"ButtonText")]=e.innerHTML,n["show".concat(o(t),"Button")]=!0,e.hasAttribute("color")&&(n["".concat(t,"ButtonColor")]=e.getAttribute("color")),e.hasAttribute("aria-label")&&(n["".concat(t,"ButtonAriaLabel")]=e.getAttribute("aria-label"))}),n},yt=e=>{const t={},n=e.querySelector("swal-image");return n&&(At(n,["src","width","height","alt"]),n.hasAttribute("src")&&(t.imageUrl=n.getAttribute("src")),n.hasAttribute("width")&&(t.imageWidth=n.getAttribute("width")),n.hasAttribute("height")&&(t.imageHeight=n.getAttribute("height")),n.hasAttribute("alt")&&(t.imageAlt=n.getAttribute("alt"))),t},vt=e=>{const t={},n=e.querySelector("swal-icon");return n&&(At(n,["type","color"]),n.hasAttribute("type")&&(t.icon=n.getAttribute("type")),n.hasAttribute("color")&&(t.iconColor=n.getAttribute("color")),t.iconHtml=n.innerHTML),t},wt=e=>{const n={},t=e.querySelector("swal-input");t&&(At(t,["type","label","placeholder","value"]),n.input=t.getAttribute("type")||"text",t.hasAttribute("label")&&(n.inputLabel=t.getAttribute("label")),t.hasAttribute("placeholder")&&(n.inputPlaceholder=t.getAttribute("placeholder")),t.hasAttribute("value")&&(n.inputValue=t.getAttribute("value")));e=e.querySelectorAll("swal-input-option");return e.length&&(n.inputOptions={},a(e).forEach(e=>{At(e,["value"]);var t=e.getAttribute("value"),e=e.innerHTML;n.inputOptions[t]=e})),n},Ct=(e,t)=>{const n={};for(const o in t){const i=t[o],a=e.querySelector(i);a&&(At(a,[]),n[i.replace(/^swal-/,"")]=a.innerHTML.trim())}return n},kt=e=>{const t=ht.concat(["swal-param","swal-button","swal-image","swal-icon","swal-input","swal-input-option"]);a(e.children).forEach(e=>{e=e.tagName.toLowerCase();-1===t.indexOf(e)&&s("Unrecognized element <".concat(e,">"))})},At=(t,n)=>{a(t.attributes).forEach(e=>{-1===n.indexOf(e.name)&&s(['Unrecognized attribute "'.concat(e.name,'" on <').concat(t.tagName.toLowerCase(),">."),"".concat(n.length?"Allowed attributes are: ".concat(n.join(", ")):"To set the value, use HTML within the element.")])})},Bt=e=>{const t=b(),n=v();"function"==typeof e.willOpen&&e.willOpen(n);var o=window.getComputedStyle(document.body).overflowY;St(t,n,e),setTimeout(()=>{Pt(t,n)},10),M()&&(Et(t,e.scrollbarPadding,o),(()=>{const e=a(document.body.children);e.forEach(e=>{e===b()||e.contains(b())||(e.hasAttribute("aria-hidden")&&e.setAttribute("data-previous-aria-hidden",e.getAttribute("aria-hidden")),e.setAttribute("aria-hidden","true"))})})()),H()||Me.previousActiveElement||(Me.previousActiveElement=document.activeElement),"function"==typeof e.didOpen&&setTimeout(()=>e.didOpen(n)),_(t,h["no-transition"])},xt=e=>{const t=v();if(e.target===t){const n=b();t.removeEventListener(ue,xt),n.style.overflowY="auto"}},Pt=(e,t)=>{ue&&te(t)?(e.style.overflowY="hidden",t.addEventListener(ue,xt)):e.style.overflowY="auto"},Et=(e,t,n)=>{var o;(/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream||"MacIntel"===navigator.platform&&1{e.scrollTop=0})},St=(e,t,n)=>{W(e,n.showClass.backdrop),t.style.setProperty("opacity","0","important"),Z(t,"grid"),setTimeout(()=>{W(t,n.showClass.popup),t.style.removeProperty("opacity")},10),W([document.documentElement,document.body],h.shown),n.heightAuto&&n.backdrop&&!n.toast&&W([document.documentElement,document.body],h["height-auto"])},Tt=e=>e.checked?1:0,Lt=e=>e.checked?e.value:null,Ot=e=>e.files.length?null!==e.getAttribute("multiple")?e.files:e.files[0]:null,jt=(t,n)=>{const o=v(),i=e=>It[n.input](o,Mt(e),n);u(n.inputOptions)||p(n.inputOptions)?(De(P()),d(n.inputOptions).then(e=>{t.hideLoading(),i(e)})):"object"==typeof n.inputOptions?i(n.inputOptions):r("Unexpected type of inputOptions! Expected object, Map or Promise, got ".concat(typeof n.inputOptions))},Dt=(t,n)=>{const o=t.getInput();J(o),d(n.inputValue).then(e=>{o.value="number"===n.input?parseFloat(e)||0:"".concat(e),Z(o),o.focus(),t.hideLoading()}).catch(e=>{r("Error in inputValue promise: ".concat(e)),o.value="",Z(o),o.focus(),t.hideLoading()})},It={select:(e,t,i)=>{const a=K(e,h.select),s=(e,t,n)=>{const o=document.createElement("option");o.value=n,V(o,t),o.selected=Ht(n,i.inputValue),e.appendChild(o)};t.forEach(e=>{var t=e[0];const n=e[1];if(Array.isArray(n)){const o=document.createElement("optgroup");o.label=t,o.disabled=!1,a.appendChild(o),n.forEach(e=>s(o,e[1],e[0]))}else s(a,n,t)}),a.focus()},radio:(e,t,a)=>{const s=K(e,h.radio);t.forEach(e=>{var t=e[0],e=e[1];const n=document.createElement("input"),o=document.createElement("label");n.type="radio",n.name=h.radio,n.value=t,Ht(t,a.inputValue)&&(n.checked=!0);const i=document.createElement("span");V(i,e),i.className=h.label,o.appendChild(n),o.appendChild(i),s.appendChild(o)});const n=s.querySelectorAll("input");n.length&&n[0].focus()}},Mt=n=>{const o=[];return"undefined"!=typeof Map&&n instanceof Map?n.forEach((e,t)=>{let n=e;"object"==typeof n&&(n=Mt(n)),o.push([t,n])}):Object.keys(n).forEach(e=>{let t=n[e];"object"==typeof t&&(t=Mt(t)),o.push([e,t])}),o},Ht=(e,t)=>t&&t.toString()===e.toString(),qt=(e,t)=>{var n=he.innerParams.get(e),o=((e,t)=>{const n=e.getInput();if(!n)return null;switch(t.input){case"checkbox":return Tt(n);case"radio":return Lt(n);case"file":return Ot(n);default:return t.inputAutoTrim?n.value.trim():n.value}})(e,n);n.inputValidator?Vt(e,o,t):e.getInput().checkValidity()?("deny"===t?Nt:Ft)(e,o):(e.enableButtons(),e.showValidationMessage(n.validationMessage))},Vt=(t,n,o)=>{const e=he.innerParams.get(t);t.disableInput();const i=Promise.resolve().then(()=>d(e.inputValidator(n,e.validationMessage)));i.then(e=>{t.enableButtons(),t.enableInput(),e?t.showValidationMessage(e):("deny"===o?Nt:Ft)(t,n)})},Nt=(t,n)=>{const e=he.innerParams.get(t||void 0);if(e.showLoaderOnDeny&&De(E()),e.preDeny){const o=Promise.resolve().then(()=>d(e.preDeny(n,e.validationMessage)));o.then(e=>{!1===e?t.hideLoading():t.closePopup({isDenied:!0,value:void 0===e?n:e})})}else t.closePopup({isDenied:!0,value:n})},Ut=(e,t)=>{e.closePopup({isConfirmed:!0,value:t})},Ft=(t,n)=>{const e=he.innerParams.get(t||void 0);if(e.showLoaderOnConfirm&&De(),e.preConfirm){t.resetValidationMessage();const o=Promise.resolve().then(()=>d(e.preConfirm(n,e.validationMessage)));o.then(e=>{G(x())||!1===e?t.hideLoading():Ut(t,void 0===e?n:e)})}else Ut(t,n)},Rt=(e,t,n)=>{const o=I();if(o.length)return(t+=n)===o.length?t=0:-1===t&&(t=o.length-1),o[t].focus();v().focus()},zt=["ArrowRight","ArrowDown"],Wt=["ArrowLeft","ArrowUp"],_t=(e,t,n)=>{var o=he.innerParams.get(e);o&&(o.stopKeydownPropagation&&t.stopPropagation(),"Enter"===t.key?Kt(e,t,o):"Tab"===t.key?Yt(t,o):[...zt,...Wt].includes(t.key)?Zt(t.key):"Escape"===t.key&&Jt(t,o,n))},Kt=(e,t,n)=>{t.isComposing||t.target&&e.getInput()&&t.target.outerHTML===e.getInput().outerHTML&&(["textarea","file"].includes(n.input)||(je(),t.preventDefault()))},Yt=(e,t)=>{var n=e.target,o=I();let i=-1;for(let e=0;e{const t=P(),n=E(),o=T();if([t,n,o].includes(document.activeElement)){e=zt.includes(e)?"nextElementSibling":"previousElementSibling";const i=document.activeElement[e];i&&i.focus()}},Jt=(e,t,n)=>{c(t.allowEscapeKey)&&(e.preventDefault(),n(l.esc))},Xt=(t,e,n)=>{e.popup.onclick=()=>{var e=he.innerParams.get(t);e.showConfirmButton||e.showDenyButton||e.showCancelButton||e.showCloseButton||e.timer||e.input||n(l.close)}};let $t=!1;const Gt=t=>{t.popup.onmousedown=()=>{t.container.onmouseup=function(e){t.container.onmouseup=void 0,e.target===t.container&&($t=!0)}}},Qt=t=>{t.container.onmousedown=()=>{t.popup.onmouseup=function(e){t.popup.onmouseup=void 0,e.target!==t.popup&&!t.popup.contains(e.target)||($t=!0)}}},en=(n,o,i)=>{o.container.onclick=e=>{var t=he.innerParams.get(n);$t?$t=!1:e.target===o.container&&c(t.allowOutsideClick)&&i(l.backdrop)}};const tn=(e,t,n)=>{var o=j();J(o),t.timer&&(e.timeout=new dt(()=>{n("timer"),delete e.timeout},t.timer),t.timerProgressBar&&(Z(o),setTimeout(()=>{e.timeout&&e.timeout.running&&ne(t.timer)})))},nn=(e,t)=>{if(!t.toast)return c(t.allowEnterKey)?void(on(e,t)||Rt(0,-1,1)):an()},on=(e,t)=>t.focusDeny&&G(e.denyButton)?(e.denyButton.focus(),!0):t.focusCancel&&G(e.cancelButton)?(e.cancelButton.focus(),!0):!(!t.focusConfirm||!G(e.confirmButton))&&(e.confirmButton.focus(),!0),an=()=>{document.activeElement&&"function"==typeof document.activeElement.blur&&document.activeElement.blur()};const sn=e=>{for(const t in e)e[t]=new WeakMap};e=Object.freeze({hideLoading:Xe,disableLoading:Xe,getInput:function(e){var t=he.innerParams.get(e||this);return(e=he.domCache.get(e||this))?F(e.popup,t.input):null},close:st,closePopup:st,closeModal:st,closeToast:st,enableButtons:function(){lt(this,["confirmButton","denyButton","cancelButton"],!1)},disableButtons:function(){lt(this,["confirmButton","denyButton","cancelButton"],!0)},enableInput:function(){return ut(this.getInput(),!1)},disableInput:function(){return ut(this.getInput(),!0)},showValidationMessage:function(e){const t=he.domCache.get(this);var n=he.innerParams.get(this);V(t.validationMessage,e),t.validationMessage.className=h["validation-message"],n.customClass&&n.customClass.validationMessage&&W(t.validationMessage,n.customClass.validationMessage),Z(t.validationMessage);const o=this.getInput();o&&(o.setAttribute("aria-invalid",!0),o.setAttribute("aria-describedby",h["validation-message"]),R(o),W(o,h.inputerror))},resetValidationMessage:function(){var e=he.domCache.get(this);e.validationMessage&&J(e.validationMessage);const t=this.getInput();t&&(t.removeAttribute("aria-invalid"),t.removeAttribute("aria-describedby"),_(t,h.inputerror))},getProgressSteps:function(){return he.domCache.get(this).progressSteps},_main:function(e,t={}){Ze(Object.assign({},t,e)),Me.currentInstance&&(Me.currentInstance._destroy(),M()&&ot()),Me.currentInstance=this,mt(e=((e,t)=>{const n=gt(e),o=Object.assign({},Re,t,n,e);return o.showClass=Object.assign({},Re.showClass,o.showClass),o.hideClass=Object.assign({},Re.hideClass,o.hideClass),o})(e,t)),Object.freeze(e),Me.timeout&&(Me.timeout.stop(),delete Me.timeout),clearTimeout(Me.restoreFocusTimeout);var s,r,c,t=(e=>{const t={popup:v(),container:b(),actions:L(),confirmButton:P(),denyButton:E(),cancelButton:T(),loader:S(),closeButton:D(),validationMessage:x(),progressSteps:B()};return he.domCache.set(e,t),t})(this);return Oe(this,e),he.innerParams.set(this,e),s=this,r=t,c=e,new Promise(e=>{const t=e=>{s.closePopup({isDismissed:!0,dismiss:e})};var n,o,i,a;it.swalPromiseResolve.set(s,e),r.confirmButton.onclick=()=>(e=>{var t=he.innerParams.get(e);e.disableButtons(),t.input?qt(e,"confirm"):Ft(e,!0)})(s),r.denyButton.onclick=()=>(e=>{var t=he.innerParams.get(e);e.disableButtons(),t.returnInputValueOnDeny?qt(e,"deny"):Nt(e,!1)})(s),r.cancelButton.onclick=()=>((e,t)=>{e.disableButtons(),t(l.cancel)})(s,t),r.closeButton.onclick=()=>t(l.close),n=s,a=r,e=t,he.innerParams.get(n).toast?Xt(n,a,e):(Gt(a),Qt(a),en(n,a,e)),o=s,a=Me,e=c,i=t,a.keydownTarget&&a.keydownHandlerAdded&&(a.keydownTarget.removeEventListener("keydown",a.keydownHandler,{capture:a.keydownListenerCapture}),a.keydownHandlerAdded=!1),e.toast||(a.keydownHandler=e=>_t(o,e,i),a.keydownTarget=e.keydownListenerCapture?window:v(),a.keydownListenerCapture=e.keydownListenerCapture,a.keydownTarget.addEventListener("keydown",a.keydownHandler,{capture:a.keydownListenerCapture}),a.keydownHandlerAdded=!0),e=s,"select"===(a=c).input||"radio"===a.input?jt(e,a):["text","email","number","tel","textarea"].includes(a.input)&&(u(a.inputValue)||p(a.inputValue))&&(De(P()),Dt(e,a)),Bt(c),tn(Me,c,t),nn(r,c),setTimeout(()=>{r.container.scrollTop=0})})},update:function(t){var e=v(),n=he.innerParams.get(this);if(!e||N(e,n.hideClass.popup))return s("You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup.");const o={};Object.keys(t).forEach(e=>{ln.isUpdatableParameter(e)?o[e]=t[e]:s('Invalid parameter to update: "'.concat(e,'". Updatable params are listed here: https://github.com/sweetalert2/sweetalert2/blob/master/src/utils/params.js\n\nIf you think this parameter should be updatable, request it here: https://github.com/sweetalert2/sweetalert2/issues/new?template=02_feature_request.md'))}),n=Object.assign({},n,o),Oe(this,n),he.innerParams.set(this,n),Object.defineProperties(this,{params:{value:Object.assign({},this.params,t),writable:!1,enumerable:!0}})},_destroy:function(){var e=he.domCache.get(this);const t=he.innerParams.get(this);t&&(e.popup&&Me.swalCloseEventFinishedCallback&&(Me.swalCloseEventFinishedCallback(),delete Me.swalCloseEventFinishedCallback),Me.deferDisposalTimer&&(clearTimeout(Me.deferDisposalTimer),delete Me.deferDisposalTimer),"function"==typeof t.didDestroy&&t.didDestroy(),delete this.params,delete Me.keydownHandler,delete Me.keydownTarget,sn(he),sn(it),delete Me.currentInstance)}});let rn;class cn{constructor(...e){"undefined"!=typeof window&&(rn=this,e=Object.freeze(this.constructor.argsToParams(e)),Object.defineProperties(this,{params:{value:e,writable:!1,enumerable:!0,configurable:!0}}),e=this._main(this.params),he.promise.set(this,e))}then(e){const t=he.promise.get(this);return t.then(e)}finally(e){const t=he.promise.get(this);return t.finally(e)}}Object.assign(cn.prototype,e),Object.assign(cn,Je),Object.keys(e).forEach(t=>{cn[t]=function(...e){if(rn)return rn[t](...e)}}),cn.DismissReason=l,cn.version="11.1.5";const ln=cn;return ln.default=ln,ln}),void 0!==this&&this.Sweetalert2&&(this.swal=this.sweetAlert=this.Swal=this.SweetAlert=this.Sweetalert2); \ No newline at end of file diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/CmsKitWebUnifiedModule.cs b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/CmsKitWebUnifiedModule.cs index 40ac74d788..bfa436984b 100644 --- a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/CmsKitWebUnifiedModule.cs +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/CmsKitWebUnifiedModule.cs @@ -40,6 +40,7 @@ using Volo.Abp.VirtualFileSystem; using Volo.CmsKit.Admin.Web; using Volo.CmsKit.Public.Web; using System; +using Volo.Abp.PermissionManagement.HttpApi; using Volo.CmsKit.Tags; using Volo.CmsKit.Comments; using Volo.CmsKit.MediaDescriptors; @@ -51,24 +52,30 @@ namespace Volo.CmsKit [DependsOn( typeof(CmsKitWebModule), typeof(CmsKitApplicationModule), + typeof(CmsKitHttpApiModule), typeof(CmsKitEntityFrameworkCoreModule), typeof(AbpAuditLoggingEntityFrameworkCoreModule), typeof(AbpAutofacModule), typeof(AbpAccountWebModule), typeof(AbpAccountApplicationModule), + typeof(AbpAccountHttpApiModule), typeof(AbpEntityFrameworkCoreSqlServerModule), typeof(AbpSettingManagementEntityFrameworkCoreModule), typeof(AbpPermissionManagementEntityFrameworkCoreModule), typeof(AbpPermissionManagementApplicationModule), + typeof(AbpPermissionManagementHttpApiModule), typeof(AbpIdentityWebModule), typeof(AbpIdentityApplicationModule), + typeof(AbpIdentityHttpApiModule), typeof(AbpIdentityEntityFrameworkCoreModule), typeof(AbpPermissionManagementDomainIdentityModule), typeof(AbpFeatureManagementApplicationModule), + typeof(AbpFeatureManagementHttpApiModule), typeof(AbpFeatureManagementEntityFrameworkCoreModule), typeof(AbpFeatureManagementWebModule), typeof(AbpTenantManagementWebModule), typeof(AbpTenantManagementApplicationModule), + typeof(AbpTenantManagementHttpApiModule), typeof(AbpTenantManagementEntityFrameworkCoreModule), typeof(AbpAspNetCoreMvcUiBasicThemeModule), typeof(AbpAspNetCoreSerilogModule), @@ -161,11 +168,11 @@ namespace Volo.CmsKit { options.EntityTypes.Add(new MediaDescriptorDefinition("quote")); }); - + Configure(options => { options.EntityTypes.Add( - new ReactionEntityTypeDefinition("quote", + new ReactionEntityTypeDefinition("quote", reactions: new[] { new ReactionDefinition(StandardReactions.ThumbsUp), diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Volo.CmsKit.Web.Unified.csproj b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Volo.CmsKit.Web.Unified.csproj index bd172561ca..8f49a165cd 100644 --- a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Volo.CmsKit.Web.Unified.csproj +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Volo.CmsKit.Web.Unified.csproj @@ -19,17 +19,22 @@ + + + + + @@ -37,6 +42,7 @@ + diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/wwwroot/libs/sweetalert2/sweetalert2.all.js b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/wwwroot/libs/sweetalert2/sweetalert2.all.js new file mode 100644 index 0000000000..8cbddafe42 --- /dev/null +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/wwwroot/libs/sweetalert2/sweetalert2.all.js @@ -0,0 +1,3123 @@ +/*! +* sweetalert2 v11.1.5 +* Released under the MIT License. +*/ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : + typeof define === 'function' && define.amd ? define(factory) : + (global = global || self, global.Sweetalert2 = factory()); +}(this, function () { 'use strict'; + + const DismissReason = Object.freeze({ + cancel: 'cancel', + backdrop: 'backdrop', + close: 'close', + esc: 'esc', + timer: 'timer' + }); + + const consolePrefix = 'SweetAlert2:'; + /** + * Filter the unique values into a new array + * @param arr + */ + + const uniqueArray = arr => { + const result = []; + + for (let i = 0; i < arr.length; i++) { + if (result.indexOf(arr[i]) === -1) { + result.push(arr[i]); + } + } + + return result; + }; + /** + * Capitalize the first letter of a string + * @param str + */ + + const capitalizeFirstLetter = str => str.charAt(0).toUpperCase() + str.slice(1); + /** + * Convert NodeList to Array + * @param nodeList + */ + + const toArray = nodeList => Array.prototype.slice.call(nodeList); + /** + * Standardise console warnings + * @param message + */ + + const warn = message => { + console.warn("".concat(consolePrefix, " ").concat(typeof message === 'object' ? message.join(' ') : message)); + }; + /** + * Standardise console errors + * @param message + */ + + const error = message => { + console.error("".concat(consolePrefix, " ").concat(message)); + }; + /** + * Private global state for `warnOnce` + * @type {Array} + * @private + */ + + const previousWarnOnceMessages = []; + /** + * Show a console warning, but only if it hasn't already been shown + * @param message + */ + + const warnOnce = message => { + if (!previousWarnOnceMessages.includes(message)) { + previousWarnOnceMessages.push(message); + warn(message); + } + }; + /** + * Show a one-time console warning about deprecated params/methods + */ + + const warnAboutDeprecation = (deprecatedParam, useInstead) => { + warnOnce("\"".concat(deprecatedParam, "\" is deprecated and will be removed in the next major release. Please use \"").concat(useInstead, "\" instead.")); + }; + /** + * If `arg` is a function, call it (with no arguments or context) and return the result. + * Otherwise, just pass the value through + * @param arg + */ + + const callIfFunction = arg => typeof arg === 'function' ? arg() : arg; + const hasToPromiseFn = arg => arg && typeof arg.toPromise === 'function'; + const asPromise = arg => hasToPromiseFn(arg) ? arg.toPromise() : Promise.resolve(arg); + const isPromise = arg => arg && Promise.resolve(arg) === arg; + + const isJqueryElement = elem => typeof elem === 'object' && elem.jquery; + + const isElement = elem => elem instanceof Element || isJqueryElement(elem); + + const argsToParams = args => { + const params = {}; + + if (typeof args[0] === 'object' && !isElement(args[0])) { + Object.assign(params, args[0]); + } else { + ['title', 'html', 'icon'].forEach((name, index) => { + const arg = args[index]; + + if (typeof arg === 'string' || isElement(arg)) { + params[name] = arg; + } else if (arg !== undefined) { + error("Unexpected type of ".concat(name, "! Expected \"string\" or \"Element\", got ").concat(typeof arg)); + } + }); + } + + return params; + }; + + const swalPrefix = 'swal2-'; + const prefix = items => { + const result = {}; + + for (const i in items) { + result[items[i]] = swalPrefix + items[i]; + } + + return result; + }; + const swalClasses = prefix(['container', 'shown', 'height-auto', 'iosfix', 'popup', 'modal', 'no-backdrop', 'no-transition', 'toast', 'toast-shown', 'show', 'hide', 'close', 'title', 'html-container', 'actions', 'confirm', 'deny', 'cancel', 'default-outline', 'footer', 'icon', 'icon-content', 'image', 'input', 'file', 'range', 'select', 'radio', 'checkbox', 'label', 'textarea', 'inputerror', 'input-label', 'validation-message', 'progress-steps', 'active-progress-step', 'progress-step', 'progress-step-line', 'loader', 'loading', 'styled', 'top', 'top-start', 'top-end', 'top-left', 'top-right', 'center', 'center-start', 'center-end', 'center-left', 'center-right', 'bottom', 'bottom-start', 'bottom-end', 'bottom-left', 'bottom-right', 'grow-row', 'grow-column', 'grow-fullscreen', 'rtl', 'timer-progress-bar', 'timer-progress-bar-container', 'scrollbar-measure', 'icon-success', 'icon-warning', 'icon-info', 'icon-question', 'icon-error']); + const iconTypes = prefix(['success', 'warning', 'info', 'question', 'error']); + + const getContainer = () => document.body.querySelector(".".concat(swalClasses.container)); + const elementBySelector = selectorString => { + const container = getContainer(); + return container ? container.querySelector(selectorString) : null; + }; + + const elementByClass = className => { + return elementBySelector(".".concat(className)); + }; + + const getPopup = () => elementByClass(swalClasses.popup); + const getIcon = () => elementByClass(swalClasses.icon); + const getTitle = () => elementByClass(swalClasses.title); + const getHtmlContainer = () => elementByClass(swalClasses['html-container']); + const getImage = () => elementByClass(swalClasses.image); + const getProgressSteps = () => elementByClass(swalClasses['progress-steps']); + const getValidationMessage = () => elementByClass(swalClasses['validation-message']); + const getConfirmButton = () => elementBySelector(".".concat(swalClasses.actions, " .").concat(swalClasses.confirm)); + const getDenyButton = () => elementBySelector(".".concat(swalClasses.actions, " .").concat(swalClasses.deny)); + const getInputLabel = () => elementByClass(swalClasses['input-label']); + const getLoader = () => elementBySelector(".".concat(swalClasses.loader)); + const getCancelButton = () => elementBySelector(".".concat(swalClasses.actions, " .").concat(swalClasses.cancel)); + const getActions = () => elementByClass(swalClasses.actions); + const getFooter = () => elementByClass(swalClasses.footer); + const getTimerProgressBar = () => elementByClass(swalClasses['timer-progress-bar']); + const getCloseButton = () => elementByClass(swalClasses.close); // https://github.com/jkup/focusable/blob/master/index.js + + const focusable = "\n a[href],\n area[href],\n input:not([disabled]),\n select:not([disabled]),\n textarea:not([disabled]),\n button:not([disabled]),\n iframe,\n object,\n embed,\n [tabindex=\"0\"],\n [contenteditable],\n audio[controls],\n video[controls],\n summary\n"; + const getFocusableElements = () => { + const focusableElementsWithTabindex = toArray(getPopup().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')) // sort according to tabindex + .sort((a, b) => { + a = parseInt(a.getAttribute('tabindex')); + b = parseInt(b.getAttribute('tabindex')); + + if (a > b) { + return 1; + } else if (a < b) { + return -1; + } + + return 0; + }); + const otherFocusableElements = toArray(getPopup().querySelectorAll(focusable)).filter(el => el.getAttribute('tabindex') !== '-1'); + return uniqueArray(focusableElementsWithTabindex.concat(otherFocusableElements)).filter(el => isVisible(el)); + }; + const isModal = () => { + return !isToast() && !document.body.classList.contains(swalClasses['no-backdrop']); + }; + const isToast = () => { + return document.body.classList.contains(swalClasses['toast-shown']); + }; + const isLoading = () => { + return getPopup().hasAttribute('data-loading'); + }; + + const states = { + previousBodyPadding: null + }; + const setInnerHtml = (elem, html) => { + // #1926 + elem.textContent = ''; + + if (html) { + const parser = new DOMParser(); + const parsed = parser.parseFromString(html, "text/html"); + toArray(parsed.querySelector('head').childNodes).forEach(child => { + elem.appendChild(child); + }); + toArray(parsed.querySelector('body').childNodes).forEach(child => { + elem.appendChild(child); + }); + } + }; + const hasClass = (elem, className) => { + if (!className) { + return false; + } + + const classList = className.split(/\s+/); + + for (let i = 0; i < classList.length; i++) { + if (!elem.classList.contains(classList[i])) { + return false; + } + } + + return true; + }; + + const removeCustomClasses = (elem, params) => { + toArray(elem.classList).forEach(className => { + if (!Object.values(swalClasses).includes(className) && !Object.values(iconTypes).includes(className) && !Object.values(params.showClass).includes(className)) { + elem.classList.remove(className); + } + }); + }; + + const applyCustomClass = (elem, params, className) => { + removeCustomClasses(elem, params); + + if (params.customClass && params.customClass[className]) { + if (typeof params.customClass[className] !== 'string' && !params.customClass[className].forEach) { + return warn("Invalid type of customClass.".concat(className, "! Expected string or iterable object, got \"").concat(typeof params.customClass[className], "\"")); + } + + addClass(elem, params.customClass[className]); + } + }; + const getInput = (popup, inputType) => { + if (!inputType) { + return null; + } + + switch (inputType) { + case 'select': + case 'textarea': + case 'file': + return getChildByClass(popup, swalClasses[inputType]); + + case 'checkbox': + return popup.querySelector(".".concat(swalClasses.checkbox, " input")); + + case 'radio': + return popup.querySelector(".".concat(swalClasses.radio, " input:checked")) || popup.querySelector(".".concat(swalClasses.radio, " input:first-child")); + + case 'range': + return popup.querySelector(".".concat(swalClasses.range, " input")); + + default: + return getChildByClass(popup, swalClasses.input); + } + }; + const focusInput = input => { + input.focus(); // place cursor at end of text in text input + + if (input.type !== 'file') { + // http://stackoverflow.com/a/2345915 + const val = input.value; + input.value = ''; + input.value = val; + } + }; + const toggleClass = (target, classList, condition) => { + if (!target || !classList) { + return; + } + + if (typeof classList === 'string') { + classList = classList.split(/\s+/).filter(Boolean); + } + + classList.forEach(className => { + if (target.forEach) { + target.forEach(elem => { + condition ? elem.classList.add(className) : elem.classList.remove(className); + }); + } else { + condition ? target.classList.add(className) : target.classList.remove(className); + } + }); + }; + const addClass = (target, classList) => { + toggleClass(target, classList, true); + }; + const removeClass = (target, classList) => { + toggleClass(target, classList, false); + }; + const getChildByClass = (elem, className) => { + for (let i = 0; i < elem.childNodes.length; i++) { + if (hasClass(elem.childNodes[i], className)) { + return elem.childNodes[i]; + } + } + }; + const applyNumericalStyle = (elem, property, value) => { + if (value === "".concat(parseInt(value))) { + value = parseInt(value); + } + + if (value || parseInt(value) === 0) { + elem.style[property] = typeof value === 'number' ? "".concat(value, "px") : value; + } else { + elem.style.removeProperty(property); + } + }; + const show = (elem, display = 'flex') => { + elem.style.display = display; + }; + const hide = elem => { + elem.style.display = 'none'; + }; + const setStyle = (parent, selector, property, value) => { + const el = parent.querySelector(selector); + + if (el) { + el.style[property] = value; + } + }; + const toggle = (elem, condition, display) => { + condition ? show(elem, display) : hide(elem); + }; // borrowed from jquery $(elem).is(':visible') implementation + + const isVisible = elem => !!(elem && (elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length)); + const allButtonsAreHidden = () => !isVisible(getConfirmButton()) && !isVisible(getDenyButton()) && !isVisible(getCancelButton()); + const isScrollable = elem => !!(elem.scrollHeight > elem.clientHeight); // borrowed from https://stackoverflow.com/a/46352119 + + const hasCssAnimation = elem => { + const style = window.getComputedStyle(elem); + const animDuration = parseFloat(style.getPropertyValue('animation-duration') || '0'); + const transDuration = parseFloat(style.getPropertyValue('transition-duration') || '0'); + return animDuration > 0 || transDuration > 0; + }; + const animateTimerProgressBar = (timer, reset = false) => { + const timerProgressBar = getTimerProgressBar(); + + if (isVisible(timerProgressBar)) { + if (reset) { + timerProgressBar.style.transition = 'none'; + timerProgressBar.style.width = '100%'; + } + + setTimeout(() => { + timerProgressBar.style.transition = "width ".concat(timer / 1000, "s linear"); + timerProgressBar.style.width = '0%'; + }, 10); + } + }; + const stopTimerProgressBar = () => { + const timerProgressBar = getTimerProgressBar(); + const timerProgressBarWidth = parseInt(window.getComputedStyle(timerProgressBar).width); + timerProgressBar.style.removeProperty('transition'); + timerProgressBar.style.width = '100%'; + const timerProgressBarFullWidth = parseInt(window.getComputedStyle(timerProgressBar).width); + const timerProgressBarPercent = parseInt(timerProgressBarWidth / timerProgressBarFullWidth * 100); + timerProgressBar.style.removeProperty('transition'); + timerProgressBar.style.width = "".concat(timerProgressBarPercent, "%"); + }; + + // Detect Node env + const isNodeEnv = () => typeof window === 'undefined' || typeof document === 'undefined'; + + const sweetHTML = "\n
                          \n \n
                            \n
                            \n \n

                            \n
                            \n \n \n
                            \n \n \n
                            \n \n
                            \n \n \n
                            \n
                            \n
                            \n \n \n \n
                            \n
                            \n
                            \n
                            \n
                            \n
                            \n").replace(/(^|\n)\s*/g, ''); + + const resetOldContainer = () => { + const oldContainer = getContainer(); + + if (!oldContainer) { + return false; + } + + oldContainer.remove(); + removeClass([document.documentElement, document.body], [swalClasses['no-backdrop'], swalClasses['toast-shown'], swalClasses['has-column']]); + return true; + }; + + const resetValidationMessage = () => { + if (Swal.isVisible()) { + Swal.resetValidationMessage(); + } + }; + + const addInputChangeListeners = () => { + const popup = getPopup(); + const input = getChildByClass(popup, swalClasses.input); + const file = getChildByClass(popup, swalClasses.file); + const range = popup.querySelector(".".concat(swalClasses.range, " input")); + const rangeOutput = popup.querySelector(".".concat(swalClasses.range, " output")); + const select = getChildByClass(popup, swalClasses.select); + const checkbox = popup.querySelector(".".concat(swalClasses.checkbox, " input")); + const textarea = getChildByClass(popup, swalClasses.textarea); + input.oninput = resetValidationMessage; + file.onchange = resetValidationMessage; + select.onchange = resetValidationMessage; + checkbox.onchange = resetValidationMessage; + textarea.oninput = resetValidationMessage; + + range.oninput = () => { + resetValidationMessage(); + rangeOutput.value = range.value; + }; + + range.onchange = () => { + resetValidationMessage(); + range.nextSibling.value = range.value; + }; + }; + + const getTarget = target => typeof target === 'string' ? document.querySelector(target) : target; + + const setupAccessibility = params => { + const popup = getPopup(); + popup.setAttribute('role', params.toast ? 'alert' : 'dialog'); + popup.setAttribute('aria-live', params.toast ? 'polite' : 'assertive'); + + if (!params.toast) { + popup.setAttribute('aria-modal', 'true'); + } + }; + + const setupRTL = targetElement => { + if (window.getComputedStyle(targetElement).direction === 'rtl') { + addClass(getContainer(), swalClasses.rtl); + } + }; + /* + * Add modal + backdrop to DOM + */ + + + const init = params => { + // Clean up the old popup container if it exists + const oldContainerExisted = resetOldContainer(); + /* istanbul ignore if */ + + if (isNodeEnv()) { + error('SweetAlert2 requires document to initialize'); + return; + } + + const container = document.createElement('div'); + container.className = swalClasses.container; + + if (oldContainerExisted) { + addClass(container, swalClasses['no-transition']); + } + + setInnerHtml(container, sweetHTML); + const targetElement = getTarget(params.target); + targetElement.appendChild(container); + setupAccessibility(params); + setupRTL(targetElement); + addInputChangeListeners(); + }; + + const parseHtmlToContainer = (param, target) => { + // DOM element + if (param instanceof HTMLElement) { + target.appendChild(param); // Object + } else if (typeof param === 'object') { + handleObject(param, target); // Plain string + } else if (param) { + setInnerHtml(target, param); + } + }; + + const handleObject = (param, target) => { + // JQuery element(s) + if (param.jquery) { + handleJqueryElem(target, param); // For other objects use their string representation + } else { + setInnerHtml(target, param.toString()); + } + }; + + const handleJqueryElem = (target, elem) => { + target.textContent = ''; + + if (0 in elem) { + for (let i = 0; (i in elem); i++) { + target.appendChild(elem[i].cloneNode(true)); + } + } else { + target.appendChild(elem.cloneNode(true)); + } + }; + + const animationEndEvent = (() => { + // Prevent run in Node env + + /* istanbul ignore if */ + if (isNodeEnv()) { + return false; + } + + const testEl = document.createElement('div'); + const transEndEventNames = { + WebkitAnimation: 'webkitAnimationEnd', + OAnimation: 'oAnimationEnd oanimationend', + animation: 'animationend' + }; + + for (const i in transEndEventNames) { + if (Object.prototype.hasOwnProperty.call(transEndEventNames, i) && typeof testEl.style[i] !== 'undefined') { + return transEndEventNames[i]; + } + } + + return false; + })(); + + // https://github.com/twbs/bootstrap/blob/master/js/src/modal.js + + const measureScrollbar = () => { + const scrollDiv = document.createElement('div'); + scrollDiv.className = swalClasses['scrollbar-measure']; + document.body.appendChild(scrollDiv); + const scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth; + document.body.removeChild(scrollDiv); + return scrollbarWidth; + }; + + const renderActions = (instance, params) => { + const actions = getActions(); + const loader = getLoader(); + const confirmButton = getConfirmButton(); + const denyButton = getDenyButton(); + const cancelButton = getCancelButton(); // Actions (buttons) wrapper + + if (!params.showConfirmButton && !params.showDenyButton && !params.showCancelButton) { + hide(actions); + } else { + show(actions); + } // Custom class + + + applyCustomClass(actions, params, 'actions'); // Render buttons + + renderButton(confirmButton, 'confirm', params); + renderButton(denyButton, 'deny', params); + renderButton(cancelButton, 'cancel', params); + handleButtonsStyling(confirmButton, denyButton, cancelButton, params); + + if (params.reverseButtons) { + actions.insertBefore(cancelButton, loader); + actions.insertBefore(denyButton, loader); + actions.insertBefore(confirmButton, loader); + } // Loader + + + setInnerHtml(loader, params.loaderHtml); + applyCustomClass(loader, params, 'loader'); + }; + + function handleButtonsStyling(confirmButton, denyButton, cancelButton, params) { + if (!params.buttonsStyling) { + return removeClass([confirmButton, denyButton, cancelButton], swalClasses.styled); + } + + addClass([confirmButton, denyButton, cancelButton], swalClasses.styled); // Buttons background colors + + if (params.confirmButtonColor) { + confirmButton.style.backgroundColor = params.confirmButtonColor; + addClass(confirmButton, swalClasses['default-outline']); + } + + if (params.denyButtonColor) { + denyButton.style.backgroundColor = params.denyButtonColor; + addClass(denyButton, swalClasses['default-outline']); + } + + if (params.cancelButtonColor) { + cancelButton.style.backgroundColor = params.cancelButtonColor; + addClass(cancelButton, swalClasses['default-outline']); + } + } + + function renderButton(button, buttonType, params) { + toggle(button, params["show".concat(capitalizeFirstLetter(buttonType), "Button")], 'inline-block'); + setInnerHtml(button, params["".concat(buttonType, "ButtonText")]); // Set caption text + + button.setAttribute('aria-label', params["".concat(buttonType, "ButtonAriaLabel")]); // ARIA label + // Add buttons custom classes + + button.className = swalClasses[buttonType]; + applyCustomClass(button, params, "".concat(buttonType, "Button")); + addClass(button, params["".concat(buttonType, "ButtonClass")]); + } + + function handleBackdropParam(container, backdrop) { + if (typeof backdrop === 'string') { + container.style.background = backdrop; + } else if (!backdrop) { + addClass([document.documentElement, document.body], swalClasses['no-backdrop']); + } + } + + function handlePositionParam(container, position) { + if (position in swalClasses) { + addClass(container, swalClasses[position]); + } else { + warn('The "position" parameter is not valid, defaulting to "center"'); + addClass(container, swalClasses.center); + } + } + + function handleGrowParam(container, grow) { + if (grow && typeof grow === 'string') { + const growClass = "grow-".concat(grow); + + if (growClass in swalClasses) { + addClass(container, swalClasses[growClass]); + } + } + } + + const renderContainer = (instance, params) => { + const container = getContainer(); + + if (!container) { + return; + } + + handleBackdropParam(container, params.backdrop); + handlePositionParam(container, params.position); + handleGrowParam(container, params.grow); // Custom class + + applyCustomClass(container, params, 'container'); + }; + + /** + * This module containts `WeakMap`s for each effectively-"private property" that a `Swal` has. + * For example, to set the private property "foo" of `this` to "bar", you can `privateProps.foo.set(this, 'bar')` + * This is the approach that Babel will probably take to implement private methods/fields + * https://github.com/tc39/proposal-private-methods + * https://github.com/babel/babel/pull/7555 + * Once we have the changes from that PR in Babel, and our core class fits reasonable in *one module* + * then we can use that language feature. + */ + var privateProps = { + promise: new WeakMap(), + innerParams: new WeakMap(), + domCache: new WeakMap() + }; + + const inputTypes = ['input', 'file', 'range', 'select', 'radio', 'checkbox', 'textarea']; + const renderInput = (instance, params) => { + const popup = getPopup(); + const innerParams = privateProps.innerParams.get(instance); + const rerender = !innerParams || params.input !== innerParams.input; + inputTypes.forEach(inputType => { + const inputClass = swalClasses[inputType]; + const inputContainer = getChildByClass(popup, inputClass); // set attributes + + setAttributes(inputType, params.inputAttributes); // set class + + inputContainer.className = inputClass; + + if (rerender) { + hide(inputContainer); + } + }); + + if (params.input) { + if (rerender) { + showInput(params); + } // set custom class + + + setCustomClass(params); + } + }; + + const showInput = params => { + if (!renderInputType[params.input]) { + return error("Unexpected type of input! Expected \"text\", \"email\", \"password\", \"number\", \"tel\", \"select\", \"radio\", \"checkbox\", \"textarea\", \"file\" or \"url\", got \"".concat(params.input, "\"")); + } + + const inputContainer = getInputContainer(params.input); + const input = renderInputType[params.input](inputContainer, params); + show(input); // input autofocus + + setTimeout(() => { + focusInput(input); + }); + }; + + const removeAttributes = input => { + for (let i = 0; i < input.attributes.length; i++) { + const attrName = input.attributes[i].name; + + if (!['type', 'value', 'style'].includes(attrName)) { + input.removeAttribute(attrName); + } + } + }; + + const setAttributes = (inputType, inputAttributes) => { + const input = getInput(getPopup(), inputType); + + if (!input) { + return; + } + + removeAttributes(input); + + for (const attr in inputAttributes) { + input.setAttribute(attr, inputAttributes[attr]); + } + }; + + const setCustomClass = params => { + const inputContainer = getInputContainer(params.input); + + if (params.customClass) { + addClass(inputContainer, params.customClass.input); + } + }; + + const setInputPlaceholder = (input, params) => { + if (!input.placeholder || params.inputPlaceholder) { + input.placeholder = params.inputPlaceholder; + } + }; + + const setInputLabel = (input, prependTo, params) => { + if (params.inputLabel) { + input.id = swalClasses.input; + const label = document.createElement('label'); + const labelClass = swalClasses['input-label']; + label.setAttribute('for', input.id); + label.className = labelClass; + addClass(label, params.customClass.inputLabel); + label.innerText = params.inputLabel; + prependTo.insertAdjacentElement('beforebegin', label); + } + }; + + const getInputContainer = inputType => { + const inputClass = swalClasses[inputType] ? swalClasses[inputType] : swalClasses.input; + return getChildByClass(getPopup(), inputClass); + }; + + const renderInputType = {}; + + renderInputType.text = renderInputType.email = renderInputType.password = renderInputType.number = renderInputType.tel = renderInputType.url = (input, params) => { + if (typeof params.inputValue === 'string' || typeof params.inputValue === 'number') { + input.value = params.inputValue; + } else if (!isPromise(params.inputValue)) { + warn("Unexpected type of inputValue! Expected \"string\", \"number\" or \"Promise\", got \"".concat(typeof params.inputValue, "\"")); + } + + setInputLabel(input, input, params); + setInputPlaceholder(input, params); + input.type = params.input; + return input; + }; + + renderInputType.file = (input, params) => { + setInputLabel(input, input, params); + setInputPlaceholder(input, params); + return input; + }; + + renderInputType.range = (range, params) => { + const rangeInput = range.querySelector('input'); + const rangeOutput = range.querySelector('output'); + rangeInput.value = params.inputValue; + rangeInput.type = params.input; + rangeOutput.value = params.inputValue; + setInputLabel(rangeInput, range, params); + return range; + }; + + renderInputType.select = (select, params) => { + select.textContent = ''; + + if (params.inputPlaceholder) { + const placeholder = document.createElement('option'); + setInnerHtml(placeholder, params.inputPlaceholder); + placeholder.value = ''; + placeholder.disabled = true; + placeholder.selected = true; + select.appendChild(placeholder); + } + + setInputLabel(select, select, params); + return select; + }; + + renderInputType.radio = radio => { + radio.textContent = ''; + return radio; + }; + + renderInputType.checkbox = (checkboxContainer, params) => { + const checkbox = getInput(getPopup(), 'checkbox'); + checkbox.value = 1; + checkbox.id = swalClasses.checkbox; + checkbox.checked = Boolean(params.inputValue); + const label = checkboxContainer.querySelector('span'); + setInnerHtml(label, params.inputPlaceholder); + return checkboxContainer; + }; + + renderInputType.textarea = (textarea, params) => { + textarea.value = params.inputValue; + setInputPlaceholder(textarea, params); + setInputLabel(textarea, textarea, params); + + const getMargin = el => parseInt(window.getComputedStyle(el).marginLeft) + parseInt(window.getComputedStyle(el).marginRight); + + setTimeout(() => { + // #2291 + if ('MutationObserver' in window) { + // #1699 + const initialPopupWidth = parseInt(window.getComputedStyle(getPopup()).width); + + const textareaResizeHandler = () => { + const textareaWidth = textarea.offsetWidth + getMargin(textarea); + + if (textareaWidth > initialPopupWidth) { + getPopup().style.width = "".concat(textareaWidth, "px"); + } else { + getPopup().style.width = null; + } + }; + + new MutationObserver(textareaResizeHandler).observe(textarea, { + attributes: true, + attributeFilter: ['style'] + }); + } + }); + return textarea; + }; + + const renderContent = (instance, params) => { + const htmlContainer = getHtmlContainer(); + applyCustomClass(htmlContainer, params, 'htmlContainer'); // Content as HTML + + if (params.html) { + parseHtmlToContainer(params.html, htmlContainer); + show(htmlContainer, 'block'); // Content as plain text + } else if (params.text) { + htmlContainer.textContent = params.text; + show(htmlContainer, 'block'); // No content + } else { + hide(htmlContainer); + } + + renderInput(instance, params); + }; + + const renderFooter = (instance, params) => { + const footer = getFooter(); + toggle(footer, params.footer); + + if (params.footer) { + parseHtmlToContainer(params.footer, footer); + } // Custom class + + + applyCustomClass(footer, params, 'footer'); + }; + + const renderCloseButton = (instance, params) => { + const closeButton = getCloseButton(); + setInnerHtml(closeButton, params.closeButtonHtml); // Custom class + + applyCustomClass(closeButton, params, 'closeButton'); + toggle(closeButton, params.showCloseButton); + closeButton.setAttribute('aria-label', params.closeButtonAriaLabel); + }; + + const renderIcon = (instance, params) => { + const innerParams = privateProps.innerParams.get(instance); + const icon = getIcon(); // if the given icon already rendered, apply the styling without re-rendering the icon + + if (innerParams && params.icon === innerParams.icon) { + // Custom or default content + setContent(icon, params); + applyStyles(icon, params); + return; + } + + if (!params.icon && !params.iconHtml) { + return hide(icon); + } + + if (params.icon && Object.keys(iconTypes).indexOf(params.icon) === -1) { + error("Unknown icon! Expected \"success\", \"error\", \"warning\", \"info\" or \"question\", got \"".concat(params.icon, "\"")); + return hide(icon); + } + + show(icon); // Custom or default content + + setContent(icon, params); + applyStyles(icon, params); // Animate icon + + addClass(icon, params.showClass.icon); + }; + + const applyStyles = (icon, params) => { + for (const iconType in iconTypes) { + if (params.icon !== iconType) { + removeClass(icon, iconTypes[iconType]); + } + } + + addClass(icon, iconTypes[params.icon]); // Icon color + + setColor(icon, params); // Success icon background color + + adjustSuccessIconBackgoundColor(); // Custom class + + applyCustomClass(icon, params, 'icon'); + }; // Adjust success icon background color to match the popup background color + + + const adjustSuccessIconBackgoundColor = () => { + const popup = getPopup(); + const popupBackgroundColor = window.getComputedStyle(popup).getPropertyValue('background-color'); + const successIconParts = popup.querySelectorAll('[class^=swal2-success-circular-line], .swal2-success-fix'); + + for (let i = 0; i < successIconParts.length; i++) { + successIconParts[i].style.backgroundColor = popupBackgroundColor; + } + }; + + const setContent = (icon, params) => { + icon.textContent = ''; + + if (params.iconHtml) { + setInnerHtml(icon, iconContent(params.iconHtml)); + } else if (params.icon === 'success') { + setInnerHtml(icon, "\n
                            \n \n
                            \n
                            \n "); + } else if (params.icon === 'error') { + setInnerHtml(icon, "\n \n \n \n \n "); + } else { + const defaultIconHtml = { + question: '?', + warning: '!', + info: 'i' + }; + setInnerHtml(icon, iconContent(defaultIconHtml[params.icon])); + } + }; + + const setColor = (icon, params) => { + if (!params.iconColor) { + return; + } + + icon.style.color = params.iconColor; + icon.style.borderColor = params.iconColor; + + for (const sel of ['.swal2-success-line-tip', '.swal2-success-line-long', '.swal2-x-mark-line-left', '.swal2-x-mark-line-right']) { + setStyle(icon, sel, 'backgroundColor', params.iconColor); + } + + setStyle(icon, '.swal2-success-ring', 'borderColor', params.iconColor); + }; + + const iconContent = content => "
                            ").concat(content, "
                            "); + + const renderImage = (instance, params) => { + const image = getImage(); + + if (!params.imageUrl) { + return hide(image); + } + + show(image, ''); // Src, alt + + image.setAttribute('src', params.imageUrl); + image.setAttribute('alt', params.imageAlt); // Width, height + + applyNumericalStyle(image, 'width', params.imageWidth); + applyNumericalStyle(image, 'height', params.imageHeight); // Class + + image.className = swalClasses.image; + applyCustomClass(image, params, 'image'); + }; + + const createStepElement = step => { + const stepEl = document.createElement('li'); + addClass(stepEl, swalClasses['progress-step']); + setInnerHtml(stepEl, step); + return stepEl; + }; + + const createLineElement = params => { + const lineEl = document.createElement('li'); + addClass(lineEl, swalClasses['progress-step-line']); + + if (params.progressStepsDistance) { + lineEl.style.width = params.progressStepsDistance; + } + + return lineEl; + }; + + const renderProgressSteps = (instance, params) => { + const progressStepsContainer = getProgressSteps(); + + if (!params.progressSteps || params.progressSteps.length === 0) { + return hide(progressStepsContainer); + } + + show(progressStepsContainer); + progressStepsContainer.textContent = ''; + + if (params.currentProgressStep >= params.progressSteps.length) { + warn('Invalid currentProgressStep parameter, it should be less than progressSteps.length ' + '(currentProgressStep like JS arrays starts from 0)'); + } + + params.progressSteps.forEach((step, index) => { + const stepEl = createStepElement(step); + progressStepsContainer.appendChild(stepEl); + + if (index === params.currentProgressStep) { + addClass(stepEl, swalClasses['active-progress-step']); + } + + if (index !== params.progressSteps.length - 1) { + const lineEl = createLineElement(params); + progressStepsContainer.appendChild(lineEl); + } + }); + }; + + const renderTitle = (instance, params) => { + const title = getTitle(); + toggle(title, params.title || params.titleText, 'block'); + + if (params.title) { + parseHtmlToContainer(params.title, title); + } + + if (params.titleText) { + title.innerText = params.titleText; + } // Custom class + + + applyCustomClass(title, params, 'title'); + }; + + const renderPopup = (instance, params) => { + const container = getContainer(); + const popup = getPopup(); // Width + + if (params.toast) { + // #2170 + applyNumericalStyle(container, 'width', params.width); + popup.style.width = '100%'; + popup.insertBefore(getLoader(), getIcon()); + } else { + applyNumericalStyle(popup, 'width', params.width); + } // Padding + + + applyNumericalStyle(popup, 'padding', params.padding); // Background + + if (params.background) { + popup.style.background = params.background; + } + + hide(getValidationMessage()); // Classes + + addClasses(popup, params); + }; + + const addClasses = (popup, params) => { + // Default Class + showClass when updating Swal.update({}) + popup.className = "".concat(swalClasses.popup, " ").concat(isVisible(popup) ? params.showClass.popup : ''); + + if (params.toast) { + addClass([document.documentElement, document.body], swalClasses['toast-shown']); + addClass(popup, swalClasses.toast); + } else { + addClass(popup, swalClasses.modal); + } // Custom class + + + applyCustomClass(popup, params, 'popup'); + + if (typeof params.customClass === 'string') { + addClass(popup, params.customClass); + } // Icon class (#1842) + + + if (params.icon) { + addClass(popup, swalClasses["icon-".concat(params.icon)]); + } + }; + + const render = (instance, params) => { + renderPopup(instance, params); + renderContainer(instance, params); + renderProgressSteps(instance, params); + renderIcon(instance, params); + renderImage(instance, params); + renderTitle(instance, params); + renderCloseButton(instance, params); + renderContent(instance, params); + renderActions(instance, params); + renderFooter(instance, params); + + if (typeof params.didRender === 'function') { + params.didRender(getPopup()); + } + }; + + /* + * Global function to determine if SweetAlert2 popup is shown + */ + + const isVisible$1 = () => { + return isVisible(getPopup()); + }; + /* + * Global function to click 'Confirm' button + */ + + const clickConfirm = () => getConfirmButton() && getConfirmButton().click(); + /* + * Global function to click 'Deny' button + */ + + const clickDeny = () => getDenyButton() && getDenyButton().click(); + /* + * Global function to click 'Cancel' button + */ + + const clickCancel = () => getCancelButton() && getCancelButton().click(); + + function fire(...args) { + const Swal = this; + return new Swal(...args); + } + + /** + * Returns an extended version of `Swal` containing `params` as defaults. + * Useful for reusing Swal configuration. + * + * For example: + * + * Before: + * const textPromptOptions = { input: 'text', showCancelButton: true } + * const {value: firstName} = await Swal.fire({ ...textPromptOptions, title: 'What is your first name?' }) + * const {value: lastName} = await Swal.fire({ ...textPromptOptions, title: 'What is your last name?' }) + * + * After: + * const TextPrompt = Swal.mixin({ input: 'text', showCancelButton: true }) + * const {value: firstName} = await TextPrompt('What is your first name?') + * const {value: lastName} = await TextPrompt('What is your last name?') + * + * @param mixinParams + */ + function mixin(mixinParams) { + class MixinSwal extends this { + _main(params, priorityMixinParams) { + return super._main(params, Object.assign({}, mixinParams, priorityMixinParams)); + } + + } + + return MixinSwal; + } + + /** + * Shows loader (spinner), this is useful with AJAX requests. + * By default the loader be shown instead of the "Confirm" button. + */ + + const showLoading = buttonToReplace => { + let popup = getPopup(); + + if (!popup) { + Swal.fire(); + } + + popup = getPopup(); + const loader = getLoader(); + + if (isToast()) { + hide(getIcon()); + } else { + replaceButton(popup, buttonToReplace); + } + + show(loader); + popup.setAttribute('data-loading', true); + popup.setAttribute('aria-busy', true); + popup.focus(); + }; + + const replaceButton = (popup, buttonToReplace) => { + const actions = getActions(); + const loader = getLoader(); + + if (!buttonToReplace && isVisible(getConfirmButton())) { + buttonToReplace = getConfirmButton(); + } + + show(actions); + + if (buttonToReplace) { + hide(buttonToReplace); + loader.setAttribute('data-button-to-replace', buttonToReplace.className); + } + + loader.parentNode.insertBefore(loader, buttonToReplace); + addClass([popup, actions], swalClasses.loading); + }; + + const RESTORE_FOCUS_TIMEOUT = 100; + + const globalState = {}; + + const focusPreviousActiveElement = () => { + if (globalState.previousActiveElement && globalState.previousActiveElement.focus) { + globalState.previousActiveElement.focus(); + globalState.previousActiveElement = null; + } else if (document.body) { + document.body.focus(); + } + }; // Restore previous active (focused) element + + + const restoreActiveElement = returnFocus => { + return new Promise(resolve => { + if (!returnFocus) { + return resolve(); + } + + const x = window.scrollX; + const y = window.scrollY; + globalState.restoreFocusTimeout = setTimeout(() => { + focusPreviousActiveElement(); + resolve(); + }, RESTORE_FOCUS_TIMEOUT); // issues/900 + + window.scrollTo(x, y); + }); + }; + + /** + * If `timer` parameter is set, returns number of milliseconds of timer remained. + * Otherwise, returns undefined. + */ + + const getTimerLeft = () => { + return globalState.timeout && globalState.timeout.getTimerLeft(); + }; + /** + * Stop timer. Returns number of milliseconds of timer remained. + * If `timer` parameter isn't set, returns undefined. + */ + + const stopTimer = () => { + if (globalState.timeout) { + stopTimerProgressBar(); + return globalState.timeout.stop(); + } + }; + /** + * Resume timer. Returns number of milliseconds of timer remained. + * If `timer` parameter isn't set, returns undefined. + */ + + const resumeTimer = () => { + if (globalState.timeout) { + const remaining = globalState.timeout.start(); + animateTimerProgressBar(remaining); + return remaining; + } + }; + /** + * Resume timer. Returns number of milliseconds of timer remained. + * If `timer` parameter isn't set, returns undefined. + */ + + const toggleTimer = () => { + const timer = globalState.timeout; + return timer && (timer.running ? stopTimer() : resumeTimer()); + }; + /** + * Increase timer. Returns number of milliseconds of an updated timer. + * If `timer` parameter isn't set, returns undefined. + */ + + const increaseTimer = n => { + if (globalState.timeout) { + const remaining = globalState.timeout.increase(n); + animateTimerProgressBar(remaining, true); + return remaining; + } + }; + /** + * Check if timer is running. Returns true if timer is running + * or false if timer is paused or stopped. + * If `timer` parameter isn't set, returns undefined + */ + + const isTimerRunning = () => { + return globalState.timeout && globalState.timeout.isRunning(); + }; + + let bodyClickListenerAdded = false; + const clickHandlers = {}; + function bindClickHandler(attr = 'data-swal-template') { + clickHandlers[attr] = this; + + if (!bodyClickListenerAdded) { + document.body.addEventListener('click', bodyClickListener); + bodyClickListenerAdded = true; + } + } + + const bodyClickListener = event => { + // TODO: replace with event.composedPath() + for (let el = event.target; el && el !== document; el = el.parentNode) { + for (const attr in clickHandlers) { + const template = el.getAttribute(attr); + + if (template) { + clickHandlers[attr].fire({ + template + }); + return; + } + } + } + }; + + const defaultParams = { + title: '', + titleText: '', + text: '', + html: '', + footer: '', + icon: undefined, + iconColor: undefined, + iconHtml: undefined, + template: undefined, + toast: false, + showClass: { + popup: 'swal2-show', + backdrop: 'swal2-backdrop-show', + icon: 'swal2-icon-show' + }, + hideClass: { + popup: 'swal2-hide', + backdrop: 'swal2-backdrop-hide', + icon: 'swal2-icon-hide' + }, + customClass: {}, + target: 'body', + backdrop: true, + heightAuto: true, + allowOutsideClick: true, + allowEscapeKey: true, + allowEnterKey: true, + stopKeydownPropagation: true, + keydownListenerCapture: false, + showConfirmButton: true, + showDenyButton: false, + showCancelButton: false, + preConfirm: undefined, + preDeny: undefined, + confirmButtonText: 'OK', + confirmButtonAriaLabel: '', + confirmButtonColor: undefined, + denyButtonText: 'No', + denyButtonAriaLabel: '', + denyButtonColor: undefined, + cancelButtonText: 'Cancel', + cancelButtonAriaLabel: '', + cancelButtonColor: undefined, + buttonsStyling: true, + reverseButtons: false, + focusConfirm: true, + focusDeny: false, + focusCancel: false, + returnFocus: true, + showCloseButton: false, + closeButtonHtml: '×', + closeButtonAriaLabel: 'Close this dialog', + loaderHtml: '', + showLoaderOnConfirm: false, + showLoaderOnDeny: false, + imageUrl: undefined, + imageWidth: undefined, + imageHeight: undefined, + imageAlt: '', + timer: undefined, + timerProgressBar: false, + width: undefined, + padding: undefined, + background: undefined, + input: undefined, + inputPlaceholder: '', + inputLabel: '', + inputValue: '', + inputOptions: {}, + inputAutoTrim: true, + inputAttributes: {}, + inputValidator: undefined, + returnInputValueOnDeny: false, + validationMessage: undefined, + grow: false, + position: 'center', + progressSteps: [], + currentProgressStep: undefined, + progressStepsDistance: undefined, + willOpen: undefined, + didOpen: undefined, + didRender: undefined, + willClose: undefined, + didClose: undefined, + didDestroy: undefined, + scrollbarPadding: true + }; + const updatableParams = ['allowEscapeKey', 'allowOutsideClick', 'background', 'buttonsStyling', 'cancelButtonAriaLabel', 'cancelButtonColor', 'cancelButtonText', 'closeButtonAriaLabel', 'closeButtonHtml', 'confirmButtonAriaLabel', 'confirmButtonColor', 'confirmButtonText', 'currentProgressStep', 'customClass', 'denyButtonAriaLabel', 'denyButtonColor', 'denyButtonText', 'didClose', 'didDestroy', 'footer', 'hideClass', 'html', 'icon', 'iconColor', 'iconHtml', 'imageAlt', 'imageHeight', 'imageUrl', 'imageWidth', 'preConfirm', 'preDeny', 'progressSteps', 'returnFocus', 'reverseButtons', 'showCancelButton', 'showCloseButton', 'showConfirmButton', 'showDenyButton', 'text', 'title', 'titleText', 'willClose']; + const deprecatedParams = {}; + const toastIncompatibleParams = ['allowOutsideClick', 'allowEnterKey', 'backdrop', 'focusConfirm', 'focusDeny', 'focusCancel', 'returnFocus', 'heightAuto', 'keydownListenerCapture']; + /** + * Is valid parameter + * @param {String} paramName + */ + + const isValidParameter = paramName => { + return Object.prototype.hasOwnProperty.call(defaultParams, paramName); + }; + /** + * Is valid parameter for Swal.update() method + * @param {String} paramName + */ + + const isUpdatableParameter = paramName => { + return updatableParams.indexOf(paramName) !== -1; + }; + /** + * Is deprecated parameter + * @param {String} paramName + */ + + const isDeprecatedParameter = paramName => { + return deprecatedParams[paramName]; + }; + + const checkIfParamIsValid = param => { + if (!isValidParameter(param)) { + warn("Unknown parameter \"".concat(param, "\"")); + } + }; + + const checkIfToastParamIsValid = param => { + if (toastIncompatibleParams.includes(param)) { + warn("The parameter \"".concat(param, "\" is incompatible with toasts")); + } + }; + + const checkIfParamIsDeprecated = param => { + if (isDeprecatedParameter(param)) { + warnAboutDeprecation(param, isDeprecatedParameter(param)); + } + }; + /** + * Show relevant warnings for given params + * + * @param params + */ + + + const showWarningsForParams = params => { + if (!params.backdrop && params.allowOutsideClick) { + warn('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`'); + } + + for (const param in params) { + checkIfParamIsValid(param); + + if (params.toast) { + checkIfToastParamIsValid(param); + } + + checkIfParamIsDeprecated(param); + } + }; + + + + var staticMethods = /*#__PURE__*/Object.freeze({ + isValidParameter: isValidParameter, + isUpdatableParameter: isUpdatableParameter, + isDeprecatedParameter: isDeprecatedParameter, + argsToParams: argsToParams, + isVisible: isVisible$1, + clickConfirm: clickConfirm, + clickDeny: clickDeny, + clickCancel: clickCancel, + getContainer: getContainer, + getPopup: getPopup, + getTitle: getTitle, + getHtmlContainer: getHtmlContainer, + getImage: getImage, + getIcon: getIcon, + getInputLabel: getInputLabel, + getCloseButton: getCloseButton, + getActions: getActions, + getConfirmButton: getConfirmButton, + getDenyButton: getDenyButton, + getCancelButton: getCancelButton, + getLoader: getLoader, + getFooter: getFooter, + getTimerProgressBar: getTimerProgressBar, + getFocusableElements: getFocusableElements, + getValidationMessage: getValidationMessage, + isLoading: isLoading, + fire: fire, + mixin: mixin, + showLoading: showLoading, + enableLoading: showLoading, + getTimerLeft: getTimerLeft, + stopTimer: stopTimer, + resumeTimer: resumeTimer, + toggleTimer: toggleTimer, + increaseTimer: increaseTimer, + isTimerRunning: isTimerRunning, + bindClickHandler: bindClickHandler + }); + + /** + * Hides loader and shows back the button which was hidden by .showLoading() + */ + + function hideLoading() { + // do nothing if popup is closed + const innerParams = privateProps.innerParams.get(this); + + if (!innerParams) { + return; + } + + const domCache = privateProps.domCache.get(this); + hide(domCache.loader); + + if (isToast()) { + if (innerParams.icon) { + show(getIcon()); + } + } else { + showRelatedButton(domCache); + } + + removeClass([domCache.popup, domCache.actions], swalClasses.loading); + domCache.popup.removeAttribute('aria-busy'); + domCache.popup.removeAttribute('data-loading'); + domCache.confirmButton.disabled = false; + domCache.denyButton.disabled = false; + domCache.cancelButton.disabled = false; + } + + const showRelatedButton = domCache => { + const buttonToReplace = domCache.popup.getElementsByClassName(domCache.loader.getAttribute('data-button-to-replace')); + + if (buttonToReplace.length) { + show(buttonToReplace[0], 'inline-block'); + } else if (allButtonsAreHidden()) { + hide(domCache.actions); + } + }; + + function getInput$1(instance) { + const innerParams = privateProps.innerParams.get(instance || this); + const domCache = privateProps.domCache.get(instance || this); + + if (!domCache) { + return null; + } + + return getInput(domCache.popup, innerParams.input); + } + + const fixScrollbar = () => { + // for queues, do not do this more than once + if (states.previousBodyPadding !== null) { + return; + } // if the body has overflow + + + if (document.body.scrollHeight > window.innerHeight) { + // add padding so the content doesn't shift after removal of scrollbar + states.previousBodyPadding = parseInt(window.getComputedStyle(document.body).getPropertyValue('padding-right')); + document.body.style.paddingRight = "".concat(states.previousBodyPadding + measureScrollbar(), "px"); + } + }; + const undoScrollbar = () => { + if (states.previousBodyPadding !== null) { + document.body.style.paddingRight = "".concat(states.previousBodyPadding, "px"); + states.previousBodyPadding = null; + } + }; + + /* istanbul ignore file */ + + const iOSfix = () => { + const iOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream || navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1; + + if (iOS && !hasClass(document.body, swalClasses.iosfix)) { + const offset = document.body.scrollTop; + document.body.style.top = "".concat(offset * -1, "px"); + addClass(document.body, swalClasses.iosfix); + lockBodyScroll(); + addBottomPaddingForTallPopups(); // #1948 + } + }; + + const addBottomPaddingForTallPopups = () => { + const safari = !navigator.userAgent.match(/(CriOS|FxiOS|EdgiOS|YaBrowser|UCBrowser)/i); + + if (safari) { + const bottomPanelHeight = 44; + + if (getPopup().scrollHeight > window.innerHeight - bottomPanelHeight) { + getContainer().style.paddingBottom = "".concat(bottomPanelHeight, "px"); + } + } + }; + + const lockBodyScroll = () => { + // #1246 + const container = getContainer(); + let preventTouchMove; + + container.ontouchstart = e => { + preventTouchMove = shouldPreventTouchMove(e); + }; + + container.ontouchmove = e => { + if (preventTouchMove) { + e.preventDefault(); + e.stopPropagation(); + } + }; + }; + + const shouldPreventTouchMove = event => { + const target = event.target; + const container = getContainer(); + + if (isStylys(event) || isZoom(event)) { + return false; + } + + if (target === container) { + return true; + } + + if (!isScrollable(container) && target.tagName !== 'INPUT' && // #1603 + target.tagName !== 'TEXTAREA' && // #2266 + !(isScrollable(getHtmlContainer()) && // #1944 + getHtmlContainer().contains(target))) { + return true; + } + + return false; + }; + + const isStylys = event => { + // #1786 + return event.touches && event.touches.length && event.touches[0].touchType === 'stylus'; + }; + + const isZoom = event => { + // #1891 + return event.touches && event.touches.length > 1; + }; + + const undoIOSfix = () => { + if (hasClass(document.body, swalClasses.iosfix)) { + const offset = parseInt(document.body.style.top, 10); + removeClass(document.body, swalClasses.iosfix); + document.body.style.top = ''; + document.body.scrollTop = offset * -1; + } + }; + + // Adding aria-hidden="true" to elements outside of the active modal dialog ensures that + // elements not within the active modal dialog will not be surfaced if a user opens a screen + // reader’s list of elements (headings, form controls, landmarks, etc.) in the document. + + const setAriaHidden = () => { + const bodyChildren = toArray(document.body.children); + bodyChildren.forEach(el => { + if (el === getContainer() || el.contains(getContainer())) { + return; + } + + if (el.hasAttribute('aria-hidden')) { + el.setAttribute('data-previous-aria-hidden', el.getAttribute('aria-hidden')); + } + + el.setAttribute('aria-hidden', 'true'); + }); + }; + const unsetAriaHidden = () => { + const bodyChildren = toArray(document.body.children); + bodyChildren.forEach(el => { + if (el.hasAttribute('data-previous-aria-hidden')) { + el.setAttribute('aria-hidden', el.getAttribute('data-previous-aria-hidden')); + el.removeAttribute('data-previous-aria-hidden'); + } else { + el.removeAttribute('aria-hidden'); + } + }); + }; + + /** + * This module containts `WeakMap`s for each effectively-"private property" that a `Swal` has. + * For example, to set the private property "foo" of `this` to "bar", you can `privateProps.foo.set(this, 'bar')` + * This is the approach that Babel will probably take to implement private methods/fields + * https://github.com/tc39/proposal-private-methods + * https://github.com/babel/babel/pull/7555 + * Once we have the changes from that PR in Babel, and our core class fits reasonable in *one module* + * then we can use that language feature. + */ + var privateMethods = { + swalPromiseResolve: new WeakMap() + }; + + /* + * Instance method to close sweetAlert + */ + + function removePopupAndResetState(instance, container, returnFocus, didClose) { + if (isToast()) { + triggerDidCloseAndDispose(instance, didClose); + } else { + restoreActiveElement(returnFocus).then(() => triggerDidCloseAndDispose(instance, didClose)); + globalState.keydownTarget.removeEventListener('keydown', globalState.keydownHandler, { + capture: globalState.keydownListenerCapture + }); + globalState.keydownHandlerAdded = false; + } + + const isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent); // workaround for #2088 + // for some reason removing the container in Safari will scroll the document to bottom + + if (isSafari) { + container.setAttribute('style', 'display:none !important'); + container.removeAttribute('class'); + container.innerHTML = ''; + } else { + container.remove(); + } + + if (isModal()) { + undoScrollbar(); + undoIOSfix(); + unsetAriaHidden(); + } + + removeBodyClasses(); + } + + function removeBodyClasses() { + removeClass([document.documentElement, document.body], [swalClasses.shown, swalClasses['height-auto'], swalClasses['no-backdrop'], swalClasses['toast-shown']]); + } + + function close(resolveValue) { + const popup = getPopup(); + + if (!popup) { + return; + } + + resolveValue = prepareResolveValue(resolveValue); + const innerParams = privateProps.innerParams.get(this); + + if (!innerParams || hasClass(popup, innerParams.hideClass.popup)) { + return; + } + + const swalPromiseResolve = privateMethods.swalPromiseResolve.get(this); + removeClass(popup, innerParams.showClass.popup); + addClass(popup, innerParams.hideClass.popup); + const backdrop = getContainer(); + removeClass(backdrop, innerParams.showClass.backdrop); + addClass(backdrop, innerParams.hideClass.backdrop); + handlePopupAnimation(this, popup, innerParams); // Resolve Swal promise + + swalPromiseResolve(resolveValue); + } + + const prepareResolveValue = resolveValue => { + // When user calls Swal.close() + if (typeof resolveValue === 'undefined') { + return { + isConfirmed: false, + isDenied: false, + isDismissed: true + }; + } + + return Object.assign({ + isConfirmed: false, + isDenied: false, + isDismissed: false + }, resolveValue); + }; + + const handlePopupAnimation = (instance, popup, innerParams) => { + const container = getContainer(); // If animation is supported, animate + + const animationIsSupported = animationEndEvent && hasCssAnimation(popup); + + if (typeof innerParams.willClose === 'function') { + innerParams.willClose(popup); + } + + if (animationIsSupported) { + animatePopup(instance, popup, container, innerParams.returnFocus, innerParams.didClose); + } else { + // Otherwise, remove immediately + removePopupAndResetState(instance, container, innerParams.returnFocus, innerParams.didClose); + } + }; + + const animatePopup = (instance, popup, container, returnFocus, didClose) => { + globalState.swalCloseEventFinishedCallback = removePopupAndResetState.bind(null, instance, container, returnFocus, didClose); + popup.addEventListener(animationEndEvent, function (e) { + if (e.target === popup) { + globalState.swalCloseEventFinishedCallback(); + delete globalState.swalCloseEventFinishedCallback; + } + }); + }; + + const triggerDidCloseAndDispose = (instance, didClose) => { + setTimeout(() => { + if (typeof didClose === 'function') { + didClose.bind(instance.params)(); + } + + instance._destroy(); + }); + }; + + function setButtonsDisabled(instance, buttons, disabled) { + const domCache = privateProps.domCache.get(instance); + buttons.forEach(button => { + domCache[button].disabled = disabled; + }); + } + + function setInputDisabled(input, disabled) { + if (!input) { + return false; + } + + if (input.type === 'radio') { + const radiosContainer = input.parentNode.parentNode; + const radios = radiosContainer.querySelectorAll('input'); + + for (let i = 0; i < radios.length; i++) { + radios[i].disabled = disabled; + } + } else { + input.disabled = disabled; + } + } + + function enableButtons() { + setButtonsDisabled(this, ['confirmButton', 'denyButton', 'cancelButton'], false); + } + function disableButtons() { + setButtonsDisabled(this, ['confirmButton', 'denyButton', 'cancelButton'], true); + } + function enableInput() { + return setInputDisabled(this.getInput(), false); + } + function disableInput() { + return setInputDisabled(this.getInput(), true); + } + + function showValidationMessage(error) { + const domCache = privateProps.domCache.get(this); + const params = privateProps.innerParams.get(this); + setInnerHtml(domCache.validationMessage, error); + domCache.validationMessage.className = swalClasses['validation-message']; + + if (params.customClass && params.customClass.validationMessage) { + addClass(domCache.validationMessage, params.customClass.validationMessage); + } + + show(domCache.validationMessage); + const input = this.getInput(); + + if (input) { + input.setAttribute('aria-invalid', true); + input.setAttribute('aria-describedby', swalClasses['validation-message']); + focusInput(input); + addClass(input, swalClasses.inputerror); + } + } // Hide block with validation message + + function resetValidationMessage$1() { + const domCache = privateProps.domCache.get(this); + + if (domCache.validationMessage) { + hide(domCache.validationMessage); + } + + const input = this.getInput(); + + if (input) { + input.removeAttribute('aria-invalid'); + input.removeAttribute('aria-describedby'); + removeClass(input, swalClasses.inputerror); + } + } + + function getProgressSteps$1() { + const domCache = privateProps.domCache.get(this); + return domCache.progressSteps; + } + + class Timer { + constructor(callback, delay) { + this.callback = callback; + this.remaining = delay; + this.running = false; + this.start(); + } + + start() { + if (!this.running) { + this.running = true; + this.started = new Date(); + this.id = setTimeout(this.callback, this.remaining); + } + + return this.remaining; + } + + stop() { + if (this.running) { + this.running = false; + clearTimeout(this.id); + this.remaining -= new Date() - this.started; + } + + return this.remaining; + } + + increase(n) { + const running = this.running; + + if (running) { + this.stop(); + } + + this.remaining += n; + + if (running) { + this.start(); + } + + return this.remaining; + } + + getTimerLeft() { + if (this.running) { + this.stop(); + this.start(); + } + + return this.remaining; + } + + isRunning() { + return this.running; + } + + } + + var defaultInputValidators = { + email: (string, validationMessage) => { + return /^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]{2,24}$/.test(string) ? Promise.resolve() : Promise.resolve(validationMessage || 'Invalid email address'); + }, + url: (string, validationMessage) => { + // taken from https://stackoverflow.com/a/3809435 with a small change from #1306 and #2013 + return /^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(string) ? Promise.resolve() : Promise.resolve(validationMessage || 'Invalid URL'); + } + }; + + function setDefaultInputValidators(params) { + // Use default `inputValidator` for supported input types if not provided + if (!params.inputValidator) { + Object.keys(defaultInputValidators).forEach(key => { + if (params.input === key) { + params.inputValidator = defaultInputValidators[key]; + } + }); + } + } + + function validateCustomTargetElement(params) { + // Determine if the custom target element is valid + if (!params.target || typeof params.target === 'string' && !document.querySelector(params.target) || typeof params.target !== 'string' && !params.target.appendChild) { + warn('Target parameter is not valid, defaulting to "body"'); + params.target = 'body'; + } + } + /** + * Set type, text and actions on popup + * + * @param params + * @returns {boolean} + */ + + + function setParameters(params) { + setDefaultInputValidators(params); // showLoaderOnConfirm && preConfirm + + if (params.showLoaderOnConfirm && !params.preConfirm) { + warn('showLoaderOnConfirm is set to true, but preConfirm is not defined.\n' + 'showLoaderOnConfirm should be used together with preConfirm, see usage example:\n' + 'https://sweetalert2.github.io/#ajax-request'); + } + + validateCustomTargetElement(params); // Replace newlines with
                            in title + + if (typeof params.title === 'string') { + params.title = params.title.split('\n').join('
                            '); + } + + init(params); + } + + const swalStringParams = ['swal-title', 'swal-html', 'swal-footer']; + const getTemplateParams = params => { + const template = typeof params.template === 'string' ? document.querySelector(params.template) : params.template; + + if (!template) { + return {}; + } + + const templateContent = template.content; + showWarningsForElements(templateContent); + const result = Object.assign(getSwalParams(templateContent), getSwalButtons(templateContent), getSwalImage(templateContent), getSwalIcon(templateContent), getSwalInput(templateContent), getSwalStringParams(templateContent, swalStringParams)); + return result; + }; + + const getSwalParams = templateContent => { + const result = {}; + toArray(templateContent.querySelectorAll('swal-param')).forEach(param => { + showWarningsForAttributes(param, ['name', 'value']); + const paramName = param.getAttribute('name'); + let value = param.getAttribute('value'); + + if (typeof defaultParams[paramName] === 'boolean' && value === 'false') { + value = false; + } + + if (typeof defaultParams[paramName] === 'object') { + value = JSON.parse(value); + } + + result[paramName] = value; + }); + return result; + }; + + const getSwalButtons = templateContent => { + const result = {}; + toArray(templateContent.querySelectorAll('swal-button')).forEach(button => { + showWarningsForAttributes(button, ['type', 'color', 'aria-label']); + const type = button.getAttribute('type'); + result["".concat(type, "ButtonText")] = button.innerHTML; + result["show".concat(capitalizeFirstLetter(type), "Button")] = true; + + if (button.hasAttribute('color')) { + result["".concat(type, "ButtonColor")] = button.getAttribute('color'); + } + + if (button.hasAttribute('aria-label')) { + result["".concat(type, "ButtonAriaLabel")] = button.getAttribute('aria-label'); + } + }); + return result; + }; + + const getSwalImage = templateContent => { + const result = {}; + const image = templateContent.querySelector('swal-image'); + + if (image) { + showWarningsForAttributes(image, ['src', 'width', 'height', 'alt']); + + if (image.hasAttribute('src')) { + result.imageUrl = image.getAttribute('src'); + } + + if (image.hasAttribute('width')) { + result.imageWidth = image.getAttribute('width'); + } + + if (image.hasAttribute('height')) { + result.imageHeight = image.getAttribute('height'); + } + + if (image.hasAttribute('alt')) { + result.imageAlt = image.getAttribute('alt'); + } + } + + return result; + }; + + const getSwalIcon = templateContent => { + const result = {}; + const icon = templateContent.querySelector('swal-icon'); + + if (icon) { + showWarningsForAttributes(icon, ['type', 'color']); + + if (icon.hasAttribute('type')) { + result.icon = icon.getAttribute('type'); + } + + if (icon.hasAttribute('color')) { + result.iconColor = icon.getAttribute('color'); + } + + result.iconHtml = icon.innerHTML; + } + + return result; + }; + + const getSwalInput = templateContent => { + const result = {}; + const input = templateContent.querySelector('swal-input'); + + if (input) { + showWarningsForAttributes(input, ['type', 'label', 'placeholder', 'value']); + result.input = input.getAttribute('type') || 'text'; + + if (input.hasAttribute('label')) { + result.inputLabel = input.getAttribute('label'); + } + + if (input.hasAttribute('placeholder')) { + result.inputPlaceholder = input.getAttribute('placeholder'); + } + + if (input.hasAttribute('value')) { + result.inputValue = input.getAttribute('value'); + } + } + + const inputOptions = templateContent.querySelectorAll('swal-input-option'); + + if (inputOptions.length) { + result.inputOptions = {}; + toArray(inputOptions).forEach(option => { + showWarningsForAttributes(option, ['value']); + const optionValue = option.getAttribute('value'); + const optionName = option.innerHTML; + result.inputOptions[optionValue] = optionName; + }); + } + + return result; + }; + + const getSwalStringParams = (templateContent, paramNames) => { + const result = {}; + + for (const i in paramNames) { + const paramName = paramNames[i]; + const tag = templateContent.querySelector(paramName); + + if (tag) { + showWarningsForAttributes(tag, []); + result[paramName.replace(/^swal-/, '')] = tag.innerHTML.trim(); + } + } + + return result; + }; + + const showWarningsForElements = template => { + const allowedElements = swalStringParams.concat(['swal-param', 'swal-button', 'swal-image', 'swal-icon', 'swal-input', 'swal-input-option']); + toArray(template.children).forEach(el => { + const tagName = el.tagName.toLowerCase(); + + if (allowedElements.indexOf(tagName) === -1) { + warn("Unrecognized element <".concat(tagName, ">")); + } + }); + }; + + const showWarningsForAttributes = (el, allowedAttributes) => { + toArray(el.attributes).forEach(attribute => { + if (allowedAttributes.indexOf(attribute.name) === -1) { + warn(["Unrecognized attribute \"".concat(attribute.name, "\" on <").concat(el.tagName.toLowerCase(), ">."), "".concat(allowedAttributes.length ? "Allowed attributes are: ".concat(allowedAttributes.join(', ')) : 'To set the value, use HTML within the element.')]); + } + }); + }; + + const SHOW_CLASS_TIMEOUT = 10; + /** + * Open popup, add necessary classes and styles, fix scrollbar + * + * @param params + */ + + const openPopup = params => { + const container = getContainer(); + const popup = getPopup(); + + if (typeof params.willOpen === 'function') { + params.willOpen(popup); + } + + const bodyStyles = window.getComputedStyle(document.body); + const initialBodyOverflow = bodyStyles.overflowY; + addClasses$1(container, popup, params); // scrolling is 'hidden' until animation is done, after that 'auto' + + setTimeout(() => { + setScrollingVisibility(container, popup); + }, SHOW_CLASS_TIMEOUT); + + if (isModal()) { + fixScrollContainer(container, params.scrollbarPadding, initialBodyOverflow); + setAriaHidden(); + } + + if (!isToast() && !globalState.previousActiveElement) { + globalState.previousActiveElement = document.activeElement; + } + + if (typeof params.didOpen === 'function') { + setTimeout(() => params.didOpen(popup)); + } + + removeClass(container, swalClasses['no-transition']); + }; + + const swalOpenAnimationFinished = event => { + const popup = getPopup(); + + if (event.target !== popup) { + return; + } + + const container = getContainer(); + popup.removeEventListener(animationEndEvent, swalOpenAnimationFinished); + container.style.overflowY = 'auto'; + }; + + const setScrollingVisibility = (container, popup) => { + if (animationEndEvent && hasCssAnimation(popup)) { + container.style.overflowY = 'hidden'; + popup.addEventListener(animationEndEvent, swalOpenAnimationFinished); + } else { + container.style.overflowY = 'auto'; + } + }; + + const fixScrollContainer = (container, scrollbarPadding, initialBodyOverflow) => { + iOSfix(); + + if (scrollbarPadding && initialBodyOverflow !== 'hidden') { + fixScrollbar(); + } // sweetalert2/issues/1247 + + + setTimeout(() => { + container.scrollTop = 0; + }); + }; + + const addClasses$1 = (container, popup, params) => { + addClass(container, params.showClass.backdrop); // the workaround with setting/unsetting opacity is needed for #2019 and 2059 + + popup.style.setProperty('opacity', '0', 'important'); + show(popup, 'grid'); + setTimeout(() => { + // Animate popup right after showing it + addClass(popup, params.showClass.popup); // and remove the opacity workaround + + popup.style.removeProperty('opacity'); + }, SHOW_CLASS_TIMEOUT); // 10ms in order to fix #2062 + + addClass([document.documentElement, document.body], swalClasses.shown); + + if (params.heightAuto && params.backdrop && !params.toast) { + addClass([document.documentElement, document.body], swalClasses['height-auto']); + } + }; + + const handleInputOptionsAndValue = (instance, params) => { + if (params.input === 'select' || params.input === 'radio') { + handleInputOptions(instance, params); + } else if (['text', 'email', 'number', 'tel', 'textarea'].includes(params.input) && (hasToPromiseFn(params.inputValue) || isPromise(params.inputValue))) { + showLoading(getConfirmButton()); + handleInputValue(instance, params); + } + }; + const getInputValue = (instance, innerParams) => { + const input = instance.getInput(); + + if (!input) { + return null; + } + + switch (innerParams.input) { + case 'checkbox': + return getCheckboxValue(input); + + case 'radio': + return getRadioValue(input); + + case 'file': + return getFileValue(input); + + default: + return innerParams.inputAutoTrim ? input.value.trim() : input.value; + } + }; + + const getCheckboxValue = input => input.checked ? 1 : 0; + + const getRadioValue = input => input.checked ? input.value : null; + + const getFileValue = input => input.files.length ? input.getAttribute('multiple') !== null ? input.files : input.files[0] : null; + + const handleInputOptions = (instance, params) => { + const popup = getPopup(); + + const processInputOptions = inputOptions => populateInputOptions[params.input](popup, formatInputOptions(inputOptions), params); + + if (hasToPromiseFn(params.inputOptions) || isPromise(params.inputOptions)) { + showLoading(getConfirmButton()); + asPromise(params.inputOptions).then(inputOptions => { + instance.hideLoading(); + processInputOptions(inputOptions); + }); + } else if (typeof params.inputOptions === 'object') { + processInputOptions(params.inputOptions); + } else { + error("Unexpected type of inputOptions! Expected object, Map or Promise, got ".concat(typeof params.inputOptions)); + } + }; + + const handleInputValue = (instance, params) => { + const input = instance.getInput(); + hide(input); + asPromise(params.inputValue).then(inputValue => { + input.value = params.input === 'number' ? parseFloat(inputValue) || 0 : "".concat(inputValue); + show(input); + input.focus(); + instance.hideLoading(); + }).catch(err => { + error("Error in inputValue promise: ".concat(err)); + input.value = ''; + show(input); + input.focus(); + instance.hideLoading(); + }); + }; + + const populateInputOptions = { + select: (popup, inputOptions, params) => { + const select = getChildByClass(popup, swalClasses.select); + + const renderOption = (parent, optionLabel, optionValue) => { + const option = document.createElement('option'); + option.value = optionValue; + setInnerHtml(option, optionLabel); + option.selected = isSelected(optionValue, params.inputValue); + parent.appendChild(option); + }; + + inputOptions.forEach(inputOption => { + const optionValue = inputOption[0]; + const optionLabel = inputOption[1]; // spec: + // https://www.w3.org/TR/html401/interact/forms.html#h-17.6 + // "...all OPTGROUP elements must be specified directly within a SELECT element (i.e., groups may not be nested)..." + // check whether this is a + + if (Array.isArray(optionLabel)) { + // if it is an array, then it is an + const optgroup = document.createElement('optgroup'); + optgroup.label = optionValue; + optgroup.disabled = false; // not configurable for now + + select.appendChild(optgroup); + optionLabel.forEach(o => renderOption(optgroup, o[1], o[0])); + } else { + // case of + valueFormatted = formatInputOptions(valueFormatted); + } + + result.push([key, valueFormatted]); + }); + } else { + Object.keys(inputOptions).forEach(key => { + let valueFormatted = inputOptions[key]; + + if (typeof valueFormatted === 'object') { + // case of + valueFormatted = formatInputOptions(valueFormatted); + } + + result.push([key, valueFormatted]); + }); + } + + return result; + }; + + const isSelected = (optionValue, inputValue) => { + return inputValue && inputValue.toString() === optionValue.toString(); + }; + + const handleConfirmButtonClick = instance => { + const innerParams = privateProps.innerParams.get(instance); + instance.disableButtons(); + + if (innerParams.input) { + handleConfirmOrDenyWithInput(instance, 'confirm'); + } else { + confirm(instance, true); + } + }; + const handleDenyButtonClick = instance => { + const innerParams = privateProps.innerParams.get(instance); + instance.disableButtons(); + + if (innerParams.returnInputValueOnDeny) { + handleConfirmOrDenyWithInput(instance, 'deny'); + } else { + deny(instance, false); + } + }; + const handleCancelButtonClick = (instance, dismissWith) => { + instance.disableButtons(); + dismissWith(DismissReason.cancel); + }; + + const handleConfirmOrDenyWithInput = (instance, type + /* 'confirm' | 'deny' */ + ) => { + const innerParams = privateProps.innerParams.get(instance); + const inputValue = getInputValue(instance, innerParams); + + if (innerParams.inputValidator) { + handleInputValidator(instance, inputValue, type); + } else if (!instance.getInput().checkValidity()) { + instance.enableButtons(); + instance.showValidationMessage(innerParams.validationMessage); + } else if (type === 'deny') { + deny(instance, inputValue); + } else { + confirm(instance, inputValue); + } + }; + + const handleInputValidator = (instance, inputValue, type + /* 'confirm' | 'deny' */ + ) => { + const innerParams = privateProps.innerParams.get(instance); + instance.disableInput(); + const validationPromise = Promise.resolve().then(() => asPromise(innerParams.inputValidator(inputValue, innerParams.validationMessage))); + validationPromise.then(validationMessage => { + instance.enableButtons(); + instance.enableInput(); + + if (validationMessage) { + instance.showValidationMessage(validationMessage); + } else if (type === 'deny') { + deny(instance, inputValue); + } else { + confirm(instance, inputValue); + } + }); + }; + + const deny = (instance, value) => { + const innerParams = privateProps.innerParams.get(instance || undefined); + + if (innerParams.showLoaderOnDeny) { + showLoading(getDenyButton()); + } + + if (innerParams.preDeny) { + const preDenyPromise = Promise.resolve().then(() => asPromise(innerParams.preDeny(value, innerParams.validationMessage))); + preDenyPromise.then(preDenyValue => { + if (preDenyValue === false) { + instance.hideLoading(); + } else { + instance.closePopup({ + isDenied: true, + value: typeof preDenyValue === 'undefined' ? value : preDenyValue + }); + } + }); + } else { + instance.closePopup({ + isDenied: true, + value + }); + } + }; + + const succeedWith = (instance, value) => { + instance.closePopup({ + isConfirmed: true, + value + }); + }; + + const confirm = (instance, value) => { + const innerParams = privateProps.innerParams.get(instance || undefined); + + if (innerParams.showLoaderOnConfirm) { + showLoading(); // TODO: make showLoading an *instance* method + } + + if (innerParams.preConfirm) { + instance.resetValidationMessage(); + const preConfirmPromise = Promise.resolve().then(() => asPromise(innerParams.preConfirm(value, innerParams.validationMessage))); + preConfirmPromise.then(preConfirmValue => { + if (isVisible(getValidationMessage()) || preConfirmValue === false) { + instance.hideLoading(); + } else { + succeedWith(instance, typeof preConfirmValue === 'undefined' ? value : preConfirmValue); + } + }); + } else { + succeedWith(instance, value); + } + }; + + const addKeydownHandler = (instance, globalState, innerParams, dismissWith) => { + if (globalState.keydownTarget && globalState.keydownHandlerAdded) { + globalState.keydownTarget.removeEventListener('keydown', globalState.keydownHandler, { + capture: globalState.keydownListenerCapture + }); + globalState.keydownHandlerAdded = false; + } + + if (!innerParams.toast) { + globalState.keydownHandler = e => keydownHandler(instance, e, dismissWith); + + globalState.keydownTarget = innerParams.keydownListenerCapture ? window : getPopup(); + globalState.keydownListenerCapture = innerParams.keydownListenerCapture; + globalState.keydownTarget.addEventListener('keydown', globalState.keydownHandler, { + capture: globalState.keydownListenerCapture + }); + globalState.keydownHandlerAdded = true; + } + }; // Focus handling + + const setFocus = (innerParams, index, increment) => { + const focusableElements = getFocusableElements(); // search for visible elements and select the next possible match + + if (focusableElements.length) { + index = index + increment; // rollover to first item + + if (index === focusableElements.length) { + index = 0; // go to last item + } else if (index === -1) { + index = focusableElements.length - 1; + } + + return focusableElements[index].focus(); + } // no visible focusable elements, focus the popup + + + getPopup().focus(); + }; + const arrowKeysNextButton = ['ArrowRight', 'ArrowDown']; + const arrowKeysPreviousButton = ['ArrowLeft', 'ArrowUp']; + + const keydownHandler = (instance, e, dismissWith) => { + const innerParams = privateProps.innerParams.get(instance); + + if (!innerParams) { + return; // This instance has already been destroyed + } + + if (innerParams.stopKeydownPropagation) { + e.stopPropagation(); + } // ENTER + + + if (e.key === 'Enter') { + handleEnter(instance, e, innerParams); // TAB + } else if (e.key === 'Tab') { + handleTab(e, innerParams); // ARROWS - switch focus between buttons + } else if ([...arrowKeysNextButton, ...arrowKeysPreviousButton].includes(e.key)) { + handleArrows(e.key); // ESC + } else if (e.key === 'Escape') { + handleEsc(e, innerParams, dismissWith); + } + }; + + const handleEnter = (instance, e, innerParams) => { + // #720 #721 + if (e.isComposing) { + return; + } + + if (e.target && instance.getInput() && e.target.outerHTML === instance.getInput().outerHTML) { + if (['textarea', 'file'].includes(innerParams.input)) { + return; // do not submit + } + + clickConfirm(); + e.preventDefault(); + } + }; + + const handleTab = (e, innerParams) => { + const targetElement = e.target; + const focusableElements = getFocusableElements(); + let btnIndex = -1; + + for (let i = 0; i < focusableElements.length; i++) { + if (targetElement === focusableElements[i]) { + btnIndex = i; + break; + } + } + + if (!e.shiftKey) { + // Cycle to the next button + setFocus(innerParams, btnIndex, 1); + } else { + // Cycle to the prev button + setFocus(innerParams, btnIndex, -1); + } + + e.stopPropagation(); + e.preventDefault(); + }; + + const handleArrows = key => { + const confirmButton = getConfirmButton(); + const denyButton = getDenyButton(); + const cancelButton = getCancelButton(); + + if (![confirmButton, denyButton, cancelButton].includes(document.activeElement)) { + return; + } + + const sibling = arrowKeysNextButton.includes(key) ? 'nextElementSibling' : 'previousElementSibling'; + const buttonToFocus = document.activeElement[sibling]; + + if (buttonToFocus) { + buttonToFocus.focus(); + } + }; + + const handleEsc = (e, innerParams, dismissWith) => { + if (callIfFunction(innerParams.allowEscapeKey)) { + e.preventDefault(); + dismissWith(DismissReason.esc); + } + }; + + const handlePopupClick = (instance, domCache, dismissWith) => { + const innerParams = privateProps.innerParams.get(instance); + + if (innerParams.toast) { + handleToastClick(instance, domCache, dismissWith); + } else { + // Ignore click events that had mousedown on the popup but mouseup on the container + // This can happen when the user drags a slider + handleModalMousedown(domCache); // Ignore click events that had mousedown on the container but mouseup on the popup + + handleContainerMousedown(domCache); + handleModalClick(instance, domCache, dismissWith); + } + }; + + const handleToastClick = (instance, domCache, dismissWith) => { + // Closing toast by internal click + domCache.popup.onclick = () => { + const innerParams = privateProps.innerParams.get(instance); + + if (innerParams.showConfirmButton || innerParams.showDenyButton || innerParams.showCancelButton || innerParams.showCloseButton || innerParams.timer || innerParams.input) { + return; + } + + dismissWith(DismissReason.close); + }; + }; + + let ignoreOutsideClick = false; + + const handleModalMousedown = domCache => { + domCache.popup.onmousedown = () => { + domCache.container.onmouseup = function (e) { + domCache.container.onmouseup = undefined; // We only check if the mouseup target is the container because usually it doesn't + // have any other direct children aside of the popup + + if (e.target === domCache.container) { + ignoreOutsideClick = true; + } + }; + }; + }; + + const handleContainerMousedown = domCache => { + domCache.container.onmousedown = () => { + domCache.popup.onmouseup = function (e) { + domCache.popup.onmouseup = undefined; // We also need to check if the mouseup target is a child of the popup + + if (e.target === domCache.popup || domCache.popup.contains(e.target)) { + ignoreOutsideClick = true; + } + }; + }; + }; + + const handleModalClick = (instance, domCache, dismissWith) => { + domCache.container.onclick = e => { + const innerParams = privateProps.innerParams.get(instance); + + if (ignoreOutsideClick) { + ignoreOutsideClick = false; + return; + } + + if (e.target === domCache.container && callIfFunction(innerParams.allowOutsideClick)) { + dismissWith(DismissReason.backdrop); + } + }; + }; + + function _main(userParams, mixinParams = {}) { + showWarningsForParams(Object.assign({}, mixinParams, userParams)); + + if (globalState.currentInstance) { + globalState.currentInstance._destroy(); + + if (isModal()) { + unsetAriaHidden(); + } + } + + globalState.currentInstance = this; + const innerParams = prepareParams(userParams, mixinParams); + setParameters(innerParams); + Object.freeze(innerParams); // clear the previous timer + + if (globalState.timeout) { + globalState.timeout.stop(); + delete globalState.timeout; + } // clear the restore focus timeout + + + clearTimeout(globalState.restoreFocusTimeout); + const domCache = populateDomCache(this); + render(this, innerParams); + privateProps.innerParams.set(this, innerParams); + return swalPromise(this, domCache, innerParams); + } + + const prepareParams = (userParams, mixinParams) => { + const templateParams = getTemplateParams(userParams); + const params = Object.assign({}, defaultParams, mixinParams, templateParams, userParams); // precedence is described in #2131 + + params.showClass = Object.assign({}, defaultParams.showClass, params.showClass); + params.hideClass = Object.assign({}, defaultParams.hideClass, params.hideClass); + return params; + }; + + const swalPromise = (instance, domCache, innerParams) => { + return new Promise(resolve => { + // functions to handle all closings/dismissals + const dismissWith = dismiss => { + instance.closePopup({ + isDismissed: true, + dismiss + }); + }; + + privateMethods.swalPromiseResolve.set(instance, resolve); + + domCache.confirmButton.onclick = () => handleConfirmButtonClick(instance); + + domCache.denyButton.onclick = () => handleDenyButtonClick(instance); + + domCache.cancelButton.onclick = () => handleCancelButtonClick(instance, dismissWith); + + domCache.closeButton.onclick = () => dismissWith(DismissReason.close); + + handlePopupClick(instance, domCache, dismissWith); + addKeydownHandler(instance, globalState, innerParams, dismissWith); + handleInputOptionsAndValue(instance, innerParams); + openPopup(innerParams); + setupTimer(globalState, innerParams, dismissWith); + initFocus(domCache, innerParams); // Scroll container to top on open (#1247, #1946) + + setTimeout(() => { + domCache.container.scrollTop = 0; + }); + }); + }; + + const populateDomCache = instance => { + const domCache = { + popup: getPopup(), + container: getContainer(), + actions: getActions(), + confirmButton: getConfirmButton(), + denyButton: getDenyButton(), + cancelButton: getCancelButton(), + loader: getLoader(), + closeButton: getCloseButton(), + validationMessage: getValidationMessage(), + progressSteps: getProgressSteps() + }; + privateProps.domCache.set(instance, domCache); + return domCache; + }; + + const setupTimer = (globalState$$1, innerParams, dismissWith) => { + const timerProgressBar = getTimerProgressBar(); + hide(timerProgressBar); + + if (innerParams.timer) { + globalState$$1.timeout = new Timer(() => { + dismissWith('timer'); + delete globalState$$1.timeout; + }, innerParams.timer); + + if (innerParams.timerProgressBar) { + show(timerProgressBar); + setTimeout(() => { + if (globalState$$1.timeout && globalState$$1.timeout.running) { + // timer can be already stopped or unset at this point + animateTimerProgressBar(innerParams.timer); + } + }); + } + } + }; + + const initFocus = (domCache, innerParams) => { + if (innerParams.toast) { + return; + } + + if (!callIfFunction(innerParams.allowEnterKey)) { + return blurActiveElement(); + } + + if (!focusButton(domCache, innerParams)) { + setFocus(innerParams, -1, 1); + } + }; + + const focusButton = (domCache, innerParams) => { + if (innerParams.focusDeny && isVisible(domCache.denyButton)) { + domCache.denyButton.focus(); + return true; + } + + if (innerParams.focusCancel && isVisible(domCache.cancelButton)) { + domCache.cancelButton.focus(); + return true; + } + + if (innerParams.focusConfirm && isVisible(domCache.confirmButton)) { + domCache.confirmButton.focus(); + return true; + } + + return false; + }; + + const blurActiveElement = () => { + if (document.activeElement && typeof document.activeElement.blur === 'function') { + document.activeElement.blur(); + } + }; + + /** + * Updates popup parameters. + */ + + function update(params) { + const popup = getPopup(); + const innerParams = privateProps.innerParams.get(this); + + if (!popup || hasClass(popup, innerParams.hideClass.popup)) { + return warn("You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup."); + } + + const validUpdatableParams = {}; // assign valid params from `params` to `defaults` + + Object.keys(params).forEach(param => { + if (Swal.isUpdatableParameter(param)) { + validUpdatableParams[param] = params[param]; + } else { + warn("Invalid parameter to update: \"".concat(param, "\". Updatable params are listed here: https://github.com/sweetalert2/sweetalert2/blob/master/src/utils/params.js\n\nIf you think this parameter should be updatable, request it here: https://github.com/sweetalert2/sweetalert2/issues/new?template=02_feature_request.md")); + } + }); + const updatedParams = Object.assign({}, innerParams, validUpdatableParams); + render(this, updatedParams); + privateProps.innerParams.set(this, updatedParams); + Object.defineProperties(this, { + params: { + value: Object.assign({}, this.params, params), + writable: false, + enumerable: true + } + }); + } + + function _destroy() { + const domCache = privateProps.domCache.get(this); + const innerParams = privateProps.innerParams.get(this); + + if (!innerParams) { + return; // This instance has already been destroyed + } // Check if there is another Swal closing + + + if (domCache.popup && globalState.swalCloseEventFinishedCallback) { + globalState.swalCloseEventFinishedCallback(); + delete globalState.swalCloseEventFinishedCallback; + } // Check if there is a swal disposal defer timer + + + if (globalState.deferDisposalTimer) { + clearTimeout(globalState.deferDisposalTimer); + delete globalState.deferDisposalTimer; + } + + if (typeof innerParams.didDestroy === 'function') { + innerParams.didDestroy(); + } + + disposeSwal(this); + } + + const disposeSwal = instance => { + // Unset this.params so GC will dispose it (#1569) + delete instance.params; // Unset globalState props so GC will dispose globalState (#1569) + + delete globalState.keydownHandler; + delete globalState.keydownTarget; // Unset WeakMaps so GC will be able to dispose them (#1569) + + unsetWeakMaps(privateProps); + unsetWeakMaps(privateMethods); // Unset currentInstance + + delete globalState.currentInstance; + }; + + const unsetWeakMaps = obj => { + for (const i in obj) { + obj[i] = new WeakMap(); + } + }; + + + + var instanceMethods = /*#__PURE__*/Object.freeze({ + hideLoading: hideLoading, + disableLoading: hideLoading, + getInput: getInput$1, + close: close, + closePopup: close, + closeModal: close, + closeToast: close, + enableButtons: enableButtons, + disableButtons: disableButtons, + enableInput: enableInput, + disableInput: disableInput, + showValidationMessage: showValidationMessage, + resetValidationMessage: resetValidationMessage$1, + getProgressSteps: getProgressSteps$1, + _main: _main, + update: update, + _destroy: _destroy + }); + + let currentInstance; + + class SweetAlert { + constructor(...args) { + // Prevent run in Node env + if (typeof window === 'undefined') { + return; + } + + currentInstance = this; + const outerParams = Object.freeze(this.constructor.argsToParams(args)); + Object.defineProperties(this, { + params: { + value: outerParams, + writable: false, + enumerable: true, + configurable: true + } + }); + + const promise = this._main(this.params); + + privateProps.promise.set(this, promise); + } // `catch` cannot be the name of a module export, so we define our thenable methods here instead + + + then(onFulfilled) { + const promise = privateProps.promise.get(this); + return promise.then(onFulfilled); + } + + finally(onFinally) { + const promise = privateProps.promise.get(this); + return promise.finally(onFinally); + } + + } // Assign instance methods from src/instanceMethods/*.js to prototype + + + Object.assign(SweetAlert.prototype, instanceMethods); // Assign static methods from src/staticMethods/*.js to constructor + + Object.assign(SweetAlert, staticMethods); // Proxy to instance methods to constructor, for now, for backwards compatibility + + Object.keys(instanceMethods).forEach(key => { + SweetAlert[key] = function (...args) { + if (currentInstance) { + return currentInstance[key](...args); + } + }; + }); + SweetAlert.DismissReason = DismissReason; + SweetAlert.version = '11.1.5'; + + const Swal = SweetAlert; + Swal.default = Swal; + + return Swal; + +})); +if (typeof this !== 'undefined' && this.Sweetalert2){ this.swal = this.sweetAlert = this.Swal = this.SweetAlert = this.Sweetalert2} + +"undefined"!=typeof document&&function(e,t){var n=e.createElement("style");if(e.getElementsByTagName("head")[0].appendChild(n),n.styleSheet)n.styleSheet.disabled||(n.styleSheet.cssText=t);else try{n.innerHTML=t}catch(e){n.innerText=t}}(document,".swal2-popup.swal2-toast{box-sizing:border-box;grid-column:1/4!important;grid-row:1/4!important;grid-template-columns:1fr 99fr 1fr;padding:1em;overflow-y:hidden;background:#fff;box-shadow:0 0 .625em #d9d9d9;pointer-events:all}.swal2-popup.swal2-toast>*{grid-column:2}.swal2-popup.swal2-toast .swal2-title{margin:1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-loading{justify-content:center}.swal2-popup.swal2-toast .swal2-input{height:2em;margin:.5em;font-size:1em}.swal2-popup.swal2-toast .swal2-validation-message{font-size:1em}.swal2-popup.swal2-toast .swal2-footer{margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-popup.swal2-toast .swal2-close{grid-column:3/3;grid-row:1/99;align-self:center;width:.8em;height:.8em;margin:0;font-size:2em}.swal2-popup.swal2-toast .swal2-html-container{margin:1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-html-container:empty{padding:0}.swal2-popup.swal2-toast .swal2-loader{grid-column:1;grid-row:1/99;align-self:center;width:2em;height:2em;margin:.25em}.swal2-popup.swal2-toast .swal2-icon{grid-column:1;grid-row:1/99;align-self:center;width:2em;min-width:2em;height:2em;margin:0 .5em 0 0}.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:700}.swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-popup.swal2-toast .swal2-actions{justify-content:flex-start;height:auto;margin:0;margin-top:.3125em;padding:0}.swal2-popup.swal2-toast .swal2-styled{margin:.25em .5em;padding:.4em .6em;font-size:1em}.swal2-popup.swal2-toast .swal2-styled:focus{box-shadow:0 0 0 1px #fff,0 0 0 3px rgba(100,150,200,.5)}.swal2-popup.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;transform:rotate(45deg);border-radius:50%}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.8em;left:-.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.25em;left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-popup.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{-webkit-animation:swal2-toast-animate-success-line-tip .75s;animation:swal2-toast-animate-success-line-tip .75s}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{-webkit-animation:swal2-toast-animate-success-line-long .75s;animation:swal2-toast-animate-success-line-long .75s}.swal2-popup.swal2-toast.swal2-show{-webkit-animation:swal2-toast-show .5s;animation:swal2-toast-show .5s}.swal2-popup.swal2-toast.swal2-hide{-webkit-animation:swal2-toast-hide .1s forwards;animation:swal2-toast-hide .1s forwards}.swal2-container{display:grid;position:fixed;z-index:1060;top:0;right:0;bottom:0;left:0;box-sizing:border-box;grid-template-areas:\"top-start top top-end\" \"center-start center center-end\" \"bottom-start bottom-center bottom-end\";grid-template-rows:minmax(-webkit-min-content,auto) minmax(-webkit-min-content,auto) minmax(-webkit-min-content,auto);grid-template-rows:minmax(min-content,auto) minmax(min-content,auto) minmax(min-content,auto);height:100%;padding:.625em;overflow-x:hidden;transition:background-color .1s;-webkit-overflow-scrolling:touch}.swal2-container.swal2-backdrop-show,.swal2-container.swal2-noanimation{background:rgba(0,0,0,.4)}.swal2-container.swal2-backdrop-hide{background:0 0!important}.swal2-container.swal2-bottom-start,.swal2-container.swal2-center-start,.swal2-container.swal2-top-start{grid-template-columns:minmax(0,1fr) auto auto}.swal2-container.swal2-bottom,.swal2-container.swal2-center,.swal2-container.swal2-top{grid-template-columns:auto minmax(0,1fr) auto}.swal2-container.swal2-bottom-end,.swal2-container.swal2-center-end,.swal2-container.swal2-top-end{grid-template-columns:auto auto minmax(0,1fr)}.swal2-container.swal2-top-start>.swal2-popup{align-self:start}.swal2-container.swal2-top>.swal2-popup{grid-column:2;align-self:start;justify-self:center}.swal2-container.swal2-top-end>.swal2-popup,.swal2-container.swal2-top-right>.swal2-popup{grid-column:3;align-self:start;justify-self:end}.swal2-container.swal2-center-left>.swal2-popup,.swal2-container.swal2-center-start>.swal2-popup{grid-row:2;align-self:center}.swal2-container.swal2-center>.swal2-popup{grid-column:2;grid-row:2;align-self:center;justify-self:center}.swal2-container.swal2-center-end>.swal2-popup,.swal2-container.swal2-center-right>.swal2-popup{grid-column:3;grid-row:2;align-self:center;justify-self:end}.swal2-container.swal2-bottom-left>.swal2-popup,.swal2-container.swal2-bottom-start>.swal2-popup{grid-column:1;grid-row:3;align-self:end}.swal2-container.swal2-bottom>.swal2-popup{grid-column:2;grid-row:3;justify-self:center;align-self:end}.swal2-container.swal2-bottom-end>.swal2-popup,.swal2-container.swal2-bottom-right>.swal2-popup{grid-column:3;grid-row:3;align-self:end;justify-self:end}.swal2-container.swal2-grow-fullscreen>.swal2-popup,.swal2-container.swal2-grow-row>.swal2-popup{grid-column:1/4;width:100%}.swal2-container.swal2-grow-column>.swal2-popup,.swal2-container.swal2-grow-fullscreen>.swal2-popup{grid-row:1/4;align-self:stretch}.swal2-container.swal2-no-transition{transition:none!important}.swal2-popup{display:none;position:relative;box-sizing:border-box;grid-template-columns:minmax(0,100%);width:32em;max-width:100%;padding:0 0 1.25em;border:none;border-radius:5px;background:#fff;color:#545454;font-family:inherit;font-size:1rem}.swal2-popup:focus{outline:0}.swal2-popup.swal2-loading{overflow-y:hidden}.swal2-title{position:relative;max-width:100%;margin:0;padding:.8em 1em 0;color:#595959;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;word-wrap:break-word}.swal2-actions{display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:center;width:auto;margin:1.25em auto 0;padding:0}.swal2-actions:not(.swal2-loading) .swal2-styled[disabled]{opacity:.4}.swal2-actions:not(.swal2-loading) .swal2-styled:hover{background-image:linear-gradient(rgba(0,0,0,.1),rgba(0,0,0,.1))}.swal2-actions:not(.swal2-loading) .swal2-styled:active{background-image:linear-gradient(rgba(0,0,0,.2),rgba(0,0,0,.2))}.swal2-loader{display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;-webkit-animation:swal2-rotate-loading 1.5s linear 0s infinite normal;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 transparent #2778c4 transparent}.swal2-styled{margin:.3125em;padding:.625em 1.1em;transition:box-shadow .1s;box-shadow:0 0 0 3px transparent;font-weight:500}.swal2-styled:not([disabled]){cursor:pointer}.swal2-styled.swal2-confirm{border:0;border-radius:.25em;background:initial;background-color:#7367f0;color:#fff;font-size:1em}.swal2-styled.swal2-confirm:focus{box-shadow:0 0 0 3px rgba(115,103,240,.5)}.swal2-styled.swal2-deny{border:0;border-radius:.25em;background:initial;background-color:#ea5455;color:#fff;font-size:1em}.swal2-styled.swal2-deny:focus{box-shadow:0 0 0 3px rgba(234,84,85,.5)}.swal2-styled.swal2-cancel{border:0;border-radius:.25em;background:initial;background-color:#6e7d88;color:#fff;font-size:1em}.swal2-styled.swal2-cancel:focus{box-shadow:0 0 0 3px rgba(110,125,136,.5)}.swal2-styled.swal2-default-outline:focus{box-shadow:0 0 0 3px rgba(100,150,200,.5)}.swal2-styled:focus{outline:0}.swal2-styled::-moz-focus-inner{border:0}.swal2-footer{justify-content:center;margin:1em 0 0;padding:1em 1em 0;border-top:1px solid #eee;color:#545454;font-size:1em}.swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;grid-column:auto!important;height:.25em;overflow:hidden;border-bottom-right-radius:5px;border-bottom-left-radius:5px}.swal2-timer-progress-bar{width:100%;height:.25em;background:rgba(0,0,0,.2)}.swal2-image{max-width:100%;margin:2em auto 1em}.swal2-close{z-index:2;align-items:center;justify-content:center;width:1.2em;height:1.2em;margin-top:0;margin-right:0;margin-bottom:-1.2em;padding:0;overflow:hidden;transition:color .1s,box-shadow .1s;border:none;border-radius:5px;background:0 0;color:#ccc;font-family:serif;font-family:monospace;font-size:2.5em;cursor:pointer;justify-self:end}.swal2-close:hover{transform:none;background:0 0;color:#f27474}.swal2-close:focus{outline:0;box-shadow:inset 0 0 0 3px rgba(100,150,200,.5)}.swal2-close::-moz-focus-inner{border:0}.swal2-html-container{z-index:1;justify-content:center;margin:1em 1.6em .3em;padding:0;overflow:auto;color:#545454;font-size:1.125em;font-weight:400;line-height:normal;text-align:center;word-wrap:break-word;word-break:break-word}.swal2-checkbox,.swal2-file,.swal2-input,.swal2-radio,.swal2-select,.swal2-textarea{margin:1em 2em 0}.swal2-file,.swal2-input,.swal2-textarea{box-sizing:border-box;width:auto;transition:border-color .1s,box-shadow .1s;border:1px solid #d9d9d9;border-radius:.1875em;background:inherit;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px transparent;color:inherit;font-size:1.125em}.swal2-file.swal2-inputerror,.swal2-input.swal2-inputerror,.swal2-textarea.swal2-inputerror{border-color:#f27474!important;box-shadow:0 0 2px #f27474!important}.swal2-file:focus,.swal2-input:focus,.swal2-textarea:focus{border:1px solid #b4dbed;outline:0;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(100,150,200,.5)}.swal2-file::-moz-placeholder,.swal2-input::-moz-placeholder,.swal2-textarea::-moz-placeholder{color:#ccc}.swal2-file:-ms-input-placeholder,.swal2-input:-ms-input-placeholder,.swal2-textarea:-ms-input-placeholder{color:#ccc}.swal2-file::placeholder,.swal2-input::placeholder,.swal2-textarea::placeholder{color:#ccc}.swal2-range{margin:1em 2em 0;background:#fff}.swal2-range input{width:80%}.swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}.swal2-range input,.swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}.swal2-input{height:2.625em;padding:0 .75em}.swal2-file{width:75%;margin-right:auto;margin-left:auto;background:inherit;font-size:1.125em}.swal2-textarea{height:6.75em;padding:.75em}.swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:inherit;color:inherit;font-size:1.125em}.swal2-checkbox,.swal2-radio{align-items:center;justify-content:center;background:#fff;color:inherit}.swal2-checkbox label,.swal2-radio label{margin:0 .6em;font-size:1.125em}.swal2-checkbox input,.swal2-radio input{flex-shrink:0;margin:0 .4em}.swal2-input-label{display:flex;justify-content:center;margin:1em auto 0}.swal2-validation-message{align-items:center;justify-content:center;margin:1em 0 0;padding:.625em;overflow:hidden;background:#f0f0f0;color:#666;font-size:1em;font-weight:300}.swal2-validation-message::before{content:\"!\";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}.swal2-icon{position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:2.5em auto .6em;border:.25em solid transparent;border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}.swal2-icon.swal2-error{border-color:#f27474;color:#f27474}.swal2-icon.swal2-error .swal2-x-mark{position:relative;flex-grow:1}.swal2-icon.swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}.swal2-icon.swal2-error.swal2-icon-show{-webkit-animation:swal2-animate-error-icon .5s;animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-error.swal2-icon-show .swal2-x-mark{-webkit-animation:swal2-animate-error-x-mark .5s;animation:swal2-animate-error-x-mark .5s}.swal2-icon.swal2-warning{border-color:#facea8;color:#f8bb86}.swal2-icon.swal2-info{border-color:#9de0f6;color:#3fc3ee}.swal2-icon.swal2-question{border-color:#c9dae1;color:#87adbd}.swal2-icon.swal2-success{border-color:#a5dc86;color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;transform:rotate(45deg);border-radius:50%}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}.swal2-icon.swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-.25em;left:-.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}.swal2-icon.swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}.swal2-icon.swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}.swal2-icon.swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-tip{-webkit-animation:swal2-animate-success-line-tip .75s;animation:swal2-animate-success-line-tip .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-long{-webkit-animation:swal2-animate-success-line-long .75s;animation:swal2-animate-success-line-long .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-circular-line-right{-webkit-animation:swal2-rotate-success-circular-line 4.25s ease-in;animation:swal2-rotate-success-circular-line 4.25s ease-in}.swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:1.25em auto;padding:0;background:inherit;font-weight:600}.swal2-progress-steps li{display:inline-block;position:relative}.swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:#add8e6;color:#fff}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:#add8e6}.swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}[class^=swal2]{-webkit-tap-highlight-color:transparent}.swal2-show{-webkit-animation:swal2-show .3s;animation:swal2-show .3s}.swal2-hide{-webkit-animation:swal2-hide .15s forwards;animation:swal2-hide .15s forwards}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{margin-right:initial;margin-left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}@-webkit-keyframes swal2-toast-show{0%{transform:translateY(-.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0)}}@keyframes swal2-toast-show{0%{transform:translateY(-.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0)}}@-webkit-keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@-webkit-keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@-webkit-keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@-webkit-keyframes swal2-show{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}100%{transform:scale(1)}}@keyframes swal2-show{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}100%{transform:scale(1)}}@-webkit-keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(.5);opacity:0}}@keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(.5);opacity:0}}@-webkit-keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@-webkit-keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@-webkit-keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@-webkit-keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@-webkit-keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0);opacity:1}}@-webkit-keyframes swal2-rotate-loading{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes swal2-rotate-loading{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto!important}body.swal2-no-backdrop .swal2-container{background-color:transparent!important;pointer-events:none}body.swal2-no-backdrop .swal2-container .swal2-popup{pointer-events:all}body.swal2-no-backdrop .swal2-container .swal2-modal{box-shadow:0 0 10px rgba(0,0,0,.4)}@media print{body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow-y:scroll!important}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .swal2-container{position:static!important}}body.swal2-toast-shown .swal2-container{box-sizing:border-box;width:360px;max-width:100%;background-color:transparent;pointer-events:none}body.swal2-toast-shown .swal2-container.swal2-top{top:0;right:auto;bottom:auto;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{top:0;right:0;bottom:auto;left:auto}body.swal2-toast-shown .swal2-container.swal2-top-left,body.swal2-toast-shown .swal2-container.swal2-top-start{top:0;right:auto;bottom:auto;left:0}body.swal2-toast-shown .swal2-container.swal2-center-left,body.swal2-toast-shown .swal2-container.swal2-center-start{top:50%;right:auto;bottom:auto;left:0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{top:50%;right:auto;bottom:auto;left:50%;transform:translate(-50%,-50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{top:50%;right:0;bottom:auto;left:auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-left,body.swal2-toast-shown .swal2-container.swal2-bottom-start{top:auto;right:auto;bottom:0;left:0}body.swal2-toast-shown .swal2-container.swal2-bottom{top:auto;right:auto;bottom:0;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{top:auto;right:0;bottom:0;left:auto}"); \ No newline at end of file diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/wwwroot/libs/sweetalert2/sweetalert2.all.min.js b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/wwwroot/libs/sweetalert2/sweetalert2.all.min.js new file mode 100644 index 0000000000..57ff7ff176 --- /dev/null +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/wwwroot/libs/sweetalert2/sweetalert2.all.min.js @@ -0,0 +1,2 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).Sweetalert2=t()}(this,function(){"use strict";const l=Object.freeze({cancel:"cancel",backdrop:"backdrop",close:"close",esc:"esc",timer:"timer"}),t="SweetAlert2:",o=e=>e.charAt(0).toUpperCase()+e.slice(1),a=e=>Array.prototype.slice.call(e),s=e=>{console.warn("".concat(t," ").concat("object"==typeof e?e.join(" "):e))},r=e=>{console.error("".concat(t," ").concat(e))},n=[],i=(e,t)=>{t='"'.concat(e,'" is deprecated and will be removed in the next major release. Please use "').concat(t,'" instead.'),n.includes(t)||(n.push(t),s(t))},c=e=>"function"==typeof e?e():e,u=e=>e&&"function"==typeof e.toPromise,d=e=>u(e)?e.toPromise():Promise.resolve(e),p=e=>e&&Promise.resolve(e)===e,m=e=>e instanceof Element||(e=>"object"==typeof e&&e.jquery)(e);var e=e=>{const t={};for(const n in e)t[e[n]]="swal2-"+e[n];return t};const h=e(["container","shown","height-auto","iosfix","popup","modal","no-backdrop","no-transition","toast","toast-shown","show","hide","close","title","html-container","actions","confirm","deny","cancel","default-outline","footer","icon","icon-content","image","input","file","range","select","radio","checkbox","label","textarea","inputerror","input-label","validation-message","progress-steps","active-progress-step","progress-step","progress-step-line","loader","loading","styled","top","top-start","top-end","top-left","top-right","center","center-start","center-end","center-left","center-right","bottom","bottom-start","bottom-end","bottom-left","bottom-right","grow-row","grow-column","grow-fullscreen","rtl","timer-progress-bar","timer-progress-bar-container","scrollbar-measure","icon-success","icon-warning","icon-info","icon-question","icon-error"]),g=e(["success","warning","info","question","error"]),b=()=>document.body.querySelector(".".concat(h.container)),f=e=>{const t=b();return t?t.querySelector(e):null},y=e=>f(".".concat(e)),v=()=>y(h.popup),w=()=>y(h.icon),C=()=>y(h.title),k=()=>y(h["html-container"]),A=()=>y(h.image),B=()=>y(h["progress-steps"]),x=()=>y(h["validation-message"]),P=()=>f(".".concat(h.actions," .").concat(h.confirm)),E=()=>f(".".concat(h.actions," .").concat(h.deny));const S=()=>f(".".concat(h.loader)),T=()=>f(".".concat(h.actions," .").concat(h.cancel)),L=()=>y(h.actions),O=()=>y(h.footer),j=()=>y(h["timer-progress-bar"]),D=()=>y(h.close),I=()=>{const e=a(v().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')).sort((e,t)=>(e=parseInt(e.getAttribute("tabindex")),(t=parseInt(t.getAttribute("tabindex")))"-1"!==e.getAttribute("tabindex"));return(t=>{const n=[];for(let e=0;eG(e))},M=()=>!H()&&!document.body.classList.contains(h["no-backdrop"]),H=()=>document.body.classList.contains(h["toast-shown"]);const q={previousBodyPadding:null},V=(t,e)=>{if(t.textContent="",e){const n=new DOMParser,o=n.parseFromString(e,"text/html");a(o.querySelector("head").childNodes).forEach(e=>{t.appendChild(e)}),a(o.querySelector("body").childNodes).forEach(e=>{t.appendChild(e)})}},N=(t,e)=>{if(!e)return!1;var n=e.split(/\s+/);for(let e=0;e{var o,i;if(o=e,i=t,a(o.classList).forEach(e=>{Object.values(h).includes(e)||Object.values(g).includes(e)||Object.values(i.showClass).includes(e)||o.classList.remove(e)}),t.customClass&&t.customClass[n]){if("string"!=typeof t.customClass[n]&&!t.customClass[n].forEach)return s("Invalid type of customClass.".concat(n,'! Expected string or iterable object, got "').concat(typeof t.customClass[n],'"'));W(e,t.customClass[n])}},F=(e,t)=>{if(!t)return null;switch(t){case"select":case"textarea":case"file":return K(e,h[t]);case"checkbox":return e.querySelector(".".concat(h.checkbox," input"));case"radio":return e.querySelector(".".concat(h.radio," input:checked"))||e.querySelector(".".concat(h.radio," input:first-child"));case"range":return e.querySelector(".".concat(h.range," input"));default:return K(e,h.input)}},R=e=>{var t;e.focus(),"file"!==e.type&&(t=e.value,e.value="",e.value=t)},z=(e,t,n)=>{e&&t&&(t="string"==typeof t?t.split(/\s+/).filter(Boolean):t).forEach(t=>{e.forEach?e.forEach(e=>{n?e.classList.add(t):e.classList.remove(t)}):n?e.classList.add(t):e.classList.remove(t)})},W=(e,t)=>{z(e,t,!0)},_=(e,t)=>{z(e,t,!1)},K=(t,n)=>{for(let e=0;e{(n=n==="".concat(parseInt(n))?parseInt(n):n)||0===parseInt(n)?e.style[t]="number"==typeof n?"".concat(n,"px"):n:e.style.removeProperty(t)},Z=(e,t="flex")=>{e.style.display=t},J=e=>{e.style.display="none"},X=(e,t,n,o)=>{const i=e.querySelector(t);i&&(i.style[n]=o)},$=(e,t,n)=>{t?Z(e,n):J(e)},G=e=>!(!e||!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)),Q=()=>!G(P())&&!G(E())&&!G(T()),ee=e=>!!(e.scrollHeight>e.clientHeight),te=e=>{const t=window.getComputedStyle(e);var n=parseFloat(t.getPropertyValue("animation-duration")||"0"),e=parseFloat(t.getPropertyValue("transition-duration")||"0");return 0{const n=j();G(n)&&(t&&(n.style.transition="none",n.style.width="100%"),setTimeout(()=>{n.style.transition="width ".concat(e/1e3,"s linear"),n.style.width="0%"},10))},oe=()=>"undefined"==typeof window||"undefined"==typeof document,ie='\n
                            \n \n
                              \n
                              \n \n

                              \n
                              \n \n \n
                              \n \n \n
                              \n \n
                              \n \n \n
                              \n
                              \n
                              \n \n \n \n
                              \n
                              \n
                              \n
                              \n
                              \n
                              \n').replace(/(^|\n)\s*/g,""),ae=()=>{ln.isVisible()&&ln.resetValidationMessage()},se=e=>{var t=(()=>{const e=b();return!!e&&(e.remove(),_([document.documentElement,document.body],[h["no-backdrop"],h["toast-shown"],h["has-column"]]),!0)})();if(oe())r("SweetAlert2 requires document to initialize");else{const n=document.createElement("div");n.className=h.container,t&&W(n,h["no-transition"]),V(n,ie);const o="string"==typeof(t=e.target)?document.querySelector(t):t;o.appendChild(n),(e=>{const t=v();t.setAttribute("role",e.toast?"alert":"dialog"),t.setAttribute("aria-live",e.toast?"polite":"assertive"),e.toast||t.setAttribute("aria-modal","true")})(e),e=o,"rtl"===window.getComputedStyle(e).direction&&W(b(),h.rtl),(()=>{const e=v(),t=K(e,h.input),n=K(e,h.file),o=e.querySelector(".".concat(h.range," input")),i=e.querySelector(".".concat(h.range," output")),a=K(e,h.select),s=e.querySelector(".".concat(h.checkbox," input")),r=K(e,h.textarea);t.oninput=ae,n.onchange=ae,a.onchange=ae,s.onchange=ae,r.oninput=ae,o.oninput=()=>{ae(),i.value=o.value},o.onchange=()=>{ae(),o.nextSibling.value=o.value}})()}},re=(e,t)=>{e instanceof HTMLElement?t.appendChild(e):"object"==typeof e?ce(e,t):e&&V(t,e)},ce=(e,t)=>{e.jquery?le(t,e):V(t,e.toString())},le=(t,n)=>{if(t.textContent="",0 in n)for(let e=0;e in n;e++)t.appendChild(n[e].cloneNode(!0));else t.appendChild(n.cloneNode(!0))},ue=(()=>{if(oe())return!1;var e=document.createElement("div"),t={WebkitAnimation:"webkitAnimationEnd",OAnimation:"oAnimationEnd oanimationend",animation:"animationend"};for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&void 0!==e.style[n])return t[n];return!1})(),de=(e,t)=>{const n=L();var o=S(),i=P(),a=E(),s=T();(t.showConfirmButton||t.showDenyButton||t.showCancelButton?Z:J)(n),U(n,t,"actions"),pe(i,"confirm",t),pe(a,"deny",t),pe(s,"cancel",t),function(e,t,n,o){if(!o.buttonsStyling)return _([e,t,n],h.styled);W([e,t,n],h.styled),o.confirmButtonColor&&(e.style.backgroundColor=o.confirmButtonColor,W(e,h["default-outline"]));o.denyButtonColor&&(t.style.backgroundColor=o.denyButtonColor,W(t,h["default-outline"]));o.cancelButtonColor&&(n.style.backgroundColor=o.cancelButtonColor,W(n,h["default-outline"]))}(i,a,s,t),t.reverseButtons&&(n.insertBefore(s,o),n.insertBefore(a,o),n.insertBefore(i,o)),V(o,t.loaderHtml),U(o,t,"loader")};function pe(e,t,n){$(e,n["show".concat(o(t),"Button")],"inline-block"),V(e,n["".concat(t,"ButtonText")]),e.setAttribute("aria-label",n["".concat(t,"ButtonAriaLabel")]),e.className=h[t],U(e,n,"".concat(t,"Button")),W(e,n["".concat(t,"ButtonClass")])}const me=(e,t)=>{var n,o,i=b();i&&(o=i,"string"==typeof(n=t.backdrop)?o.style.background=n:n||W([document.documentElement,document.body],h["no-backdrop"]),o=i,(n=t.position)in h?W(o,h[n]):(s('The "position" parameter is not valid, defaulting to "center"'),W(o,h.center)),n=i,!(o=t.grow)||"string"!=typeof o||(o="grow-".concat(o))in h&&W(n,h[o]),U(i,t,"container"))};var he={promise:new WeakMap,innerParams:new WeakMap,domCache:new WeakMap};const ge=["input","file","range","select","radio","checkbox","textarea"],be=e=>{if(!ke[e.input])return r('Unexpected type of input! Expected "text", "email", "password", "number", "tel", "select", "radio", "checkbox", "textarea", "file" or "url", got "'.concat(e.input,'"'));var t=Ce(e.input);const n=ke[e.input](t,e);Z(n),setTimeout(()=>{R(n)})},fe=(e,t)=>{const n=F(v(),e);if(n){(t=>{for(let e=0;e{var t=Ce(e.input);e.customClass&&W(t,e.customClass.input)},ve=(e,t)=>{e.placeholder&&!t.inputPlaceholder||(e.placeholder=t.inputPlaceholder)},we=(e,t,n)=>{if(n.inputLabel){e.id=h.input;const i=document.createElement("label");var o=h["input-label"];i.setAttribute("for",e.id),i.className=o,W(i,n.customClass.inputLabel),i.innerText=n.inputLabel,t.insertAdjacentElement("beforebegin",i)}},Ce=e=>{e=h[e]||h.input;return K(v(),e)},ke={};ke.text=ke.email=ke.password=ke.number=ke.tel=ke.url=(e,t)=>("string"==typeof t.inputValue||"number"==typeof t.inputValue?e.value=t.inputValue:p(t.inputValue)||s('Unexpected type of inputValue! Expected "string", "number" or "Promise", got "'.concat(typeof t.inputValue,'"')),we(e,e,t),ve(e,t),e.type=t.input,e),ke.file=(e,t)=>(we(e,e,t),ve(e,t),e),ke.range=(e,t)=>{const n=e.querySelector("input"),o=e.querySelector("output");return n.value=t.inputValue,n.type=t.input,o.value=t.inputValue,we(n,e,t),e},ke.select=(e,t)=>{if(e.textContent="",t.inputPlaceholder){const n=document.createElement("option");V(n,t.inputPlaceholder),n.value="",n.disabled=!0,n.selected=!0,e.appendChild(n)}return we(e,e,t),e},ke.radio=e=>(e.textContent="",e),ke.checkbox=(e,t)=>{const n=F(v(),"checkbox");n.value=1,n.id=h.checkbox,n.checked=Boolean(t.inputValue);var o=e.querySelector("span");return V(o,t.inputPlaceholder),e},ke.textarea=(n,e)=>{n.value=e.inputValue,ve(n,e),we(n,n,e);return setTimeout(()=>{if("MutationObserver"in window){const t=parseInt(window.getComputedStyle(v()).width);new MutationObserver(()=>{var e,e=n.offsetWidth+(e=n,parseInt(window.getComputedStyle(e).marginLeft)+parseInt(window.getComputedStyle(e).marginRight));e>t?v().style.width="".concat(e,"px"):v().style.width=null}).observe(n,{attributes:!0,attributeFilter:["style"]})}}),n};const Ae=(e,t)=>{const n=k();U(n,t,"htmlContainer"),t.html?(re(t.html,n),Z(n,"block")):t.text?(n.textContent=t.text,Z(n,"block")):J(n),((e,o)=>{const i=v();e=he.innerParams.get(e);const a=!e||o.input!==e.input;ge.forEach(e=>{var t=h[e];const n=K(i,t);fe(e,o.inputAttributes),n.className=t,a&&J(n)}),o.input&&(a&&be(o),ye(o))})(e,t)},Be=(e,t)=>{for(const n in g)t.icon!==n&&_(e,g[n]);W(e,g[t.icon]),Ee(e,t),xe(),U(e,t,"icon")},xe=()=>{const e=v();var t=window.getComputedStyle(e).getPropertyValue("background-color");const n=e.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix");for(let e=0;e{var n;e.textContent="",t.iconHtml?V(e,Se(t.iconHtml)):"success"===t.icon?V(e,'\n
                              \n \n
                              \n
                              \n '):"error"===t.icon?V(e,'\n \n \n \n \n '):(n={question:"?",warning:"!",info:"i"},V(e,Se(n[t.icon])))},Ee=(e,t)=>{if(t.iconColor){e.style.color=t.iconColor,e.style.borderColor=t.iconColor;for(const n of[".swal2-success-line-tip",".swal2-success-line-long",".swal2-x-mark-line-left",".swal2-x-mark-line-right"])X(e,n,"backgroundColor",t.iconColor);X(e,".swal2-success-ring","borderColor",t.iconColor)}},Se=e=>'
                              ').concat(e,"
                              "),Te=(e,o)=>{const i=B();if(!o.progressSteps||0===o.progressSteps.length)return J(i);Z(i),i.textContent="",o.currentProgressStep>=o.progressSteps.length&&s("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),o.progressSteps.forEach((e,t)=>{var n,e=(n=e,e=document.createElement("li"),W(e,h["progress-step"]),V(e,n),e);i.appendChild(e),t===o.currentProgressStep&&W(e,h["active-progress-step"]),t!==o.progressSteps.length-1&&(t=(e=>{const t=document.createElement("li");return W(t,h["progress-step-line"]),e.progressStepsDistance&&(t.style.width=e.progressStepsDistance),t})(o),i.appendChild(t))})},Le=(e,t)=>{e.className="".concat(h.popup," ").concat(G(e)?t.showClass.popup:""),t.toast?(W([document.documentElement,document.body],h["toast-shown"]),W(e,h.toast)):W(e,h.modal),U(e,t,"popup"),"string"==typeof t.customClass&&W(e,t.customClass),t.icon&&W(e,h["icon-".concat(t.icon)])},Oe=(e,t)=>{var n,o,i;(e=>{var t=b();const n=v();e.toast?(Y(t,"width",e.width),n.style.width="100%",n.insertBefore(S(),w())):Y(n,"width",e.width),Y(n,"padding",e.padding),e.background&&(n.style.background=e.background),J(x()),Le(n,e)})(t),me(0,t),Te(0,t),i=e,n=t,o=he.innerParams.get(i),i=w(),o&&n.icon===o.icon?(Pe(i,n),Be(i,n)):n.icon||n.iconHtml?n.icon&&-1===Object.keys(g).indexOf(n.icon)?(r('Unknown icon! Expected "success", "error", "warning", "info" or "question", got "'.concat(n.icon,'"')),J(i)):(Z(i),Pe(i,n),Be(i,n),W(i,n.showClass.icon)):J(i),(e=>{const t=A();if(!e.imageUrl)return J(t);Z(t,""),t.setAttribute("src",e.imageUrl),t.setAttribute("alt",e.imageAlt),Y(t,"width",e.imageWidth),Y(t,"height",e.imageHeight),t.className=h.image,U(t,e,"image")})(t),(e=>{const t=C();$(t,e.title||e.titleText,"block"),e.title&&re(e.title,t),e.titleText&&(t.innerText=e.titleText),U(t,e,"title")})(t),(e=>{const t=D();V(t,e.closeButtonHtml),U(t,e,"closeButton"),$(t,e.showCloseButton),t.setAttribute("aria-label",e.closeButtonAriaLabel)})(t),Ae(e,t),de(0,t),i=t,e=O(),$(e,i.footer),i.footer&&re(i.footer,e),U(e,i,"footer"),"function"==typeof t.didRender&&t.didRender(v())};const je=()=>P()&&P().click();const De=e=>{let t=v();t||ln.fire(),t=v();var n=S();H()?J(w()):Ie(t,e),Z(n),t.setAttribute("data-loading",!0),t.setAttribute("aria-busy",!0),t.focus()},Ie=(e,t)=>{var n=L();const o=S();!t&&G(P())&&(t=P()),Z(n),t&&(J(t),o.setAttribute("data-button-to-replace",t.className)),o.parentNode.insertBefore(o,t),W([e,n],h.loading)},Me={},He=o=>new Promise(e=>{if(!o)return e();var t=window.scrollX,n=window.scrollY;Me.restoreFocusTimeout=setTimeout(()=>{Me.previousActiveElement&&Me.previousActiveElement.focus?(Me.previousActiveElement.focus(),Me.previousActiveElement=null):document.body&&document.body.focus(),e()},100),window.scrollTo(t,n)});const qe=()=>{if(Me.timeout)return(()=>{const e=j();var t=parseInt(window.getComputedStyle(e).width);e.style.removeProperty("transition"),e.style.width="100%";var n=parseInt(window.getComputedStyle(e).width),n=parseInt(t/n*100);e.style.removeProperty("transition"),e.style.width="".concat(n,"%")})(),Me.timeout.stop()},Ve=()=>{if(Me.timeout){var e=Me.timeout.start();return ne(e),e}};let Ne=!1;const Ue={};const Fe=t=>{for(let e=t.target;e&&e!==document;e=e.parentNode)for(const o in Ue){var n=e.getAttribute(o);if(n)return void Ue[o].fire({template:n})}},Re={title:"",titleText:"",text:"",html:"",footer:"",icon:void 0,iconColor:void 0,iconHtml:void 0,template:void 0,toast:!1,showClass:{popup:"swal2-show",backdrop:"swal2-backdrop-show",icon:"swal2-icon-show"},hideClass:{popup:"swal2-hide",backdrop:"swal2-backdrop-hide",icon:"swal2-icon-hide"},customClass:{},target:"body",backdrop:!0,heightAuto:!0,allowOutsideClick:!0,allowEscapeKey:!0,allowEnterKey:!0,stopKeydownPropagation:!0,keydownListenerCapture:!1,showConfirmButton:!0,showDenyButton:!1,showCancelButton:!1,preConfirm:void 0,preDeny:void 0,confirmButtonText:"OK",confirmButtonAriaLabel:"",confirmButtonColor:void 0,denyButtonText:"No",denyButtonAriaLabel:"",denyButtonColor:void 0,cancelButtonText:"Cancel",cancelButtonAriaLabel:"",cancelButtonColor:void 0,buttonsStyling:!0,reverseButtons:!1,focusConfirm:!0,focusDeny:!1,focusCancel:!1,returnFocus:!0,showCloseButton:!1,closeButtonHtml:"×",closeButtonAriaLabel:"Close this dialog",loaderHtml:"",showLoaderOnConfirm:!1,showLoaderOnDeny:!1,imageUrl:void 0,imageWidth:void 0,imageHeight:void 0,imageAlt:"",timer:void 0,timerProgressBar:!1,width:void 0,padding:void 0,background:void 0,input:void 0,inputPlaceholder:"",inputLabel:"",inputValue:"",inputOptions:{},inputAutoTrim:!0,inputAttributes:{},inputValidator:void 0,returnInputValueOnDeny:!1,validationMessage:void 0,grow:!1,position:"center",progressSteps:[],currentProgressStep:void 0,progressStepsDistance:void 0,willOpen:void 0,didOpen:void 0,didRender:void 0,willClose:void 0,didClose:void 0,didDestroy:void 0,scrollbarPadding:!0},ze=["allowEscapeKey","allowOutsideClick","background","buttonsStyling","cancelButtonAriaLabel","cancelButtonColor","cancelButtonText","closeButtonAriaLabel","closeButtonHtml","confirmButtonAriaLabel","confirmButtonColor","confirmButtonText","currentProgressStep","customClass","denyButtonAriaLabel","denyButtonColor","denyButtonText","didClose","didDestroy","footer","hideClass","html","icon","iconColor","iconHtml","imageAlt","imageHeight","imageUrl","imageWidth","preConfirm","preDeny","progressSteps","returnFocus","reverseButtons","showCancelButton","showCloseButton","showConfirmButton","showDenyButton","text","title","titleText","willClose"],We={},_e=["allowOutsideClick","allowEnterKey","backdrop","focusConfirm","focusDeny","focusCancel","returnFocus","heightAuto","keydownListenerCapture"],Ke=e=>Object.prototype.hasOwnProperty.call(Re,e);const Ye=e=>We[e],Ze=e=>{!e.backdrop&&e.allowOutsideClick&&s('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`');for(const o in e)n=o,Ke(n)||s('Unknown parameter "'.concat(n,'"')),e.toast&&(t=o,_e.includes(t)&&s('The parameter "'.concat(t,'" is incompatible with toasts'))),t=o,Ye(t)&&i(t,Ye(t));var t,n};var Je=Object.freeze({isValidParameter:Ke,isUpdatableParameter:e=>-1!==ze.indexOf(e),isDeprecatedParameter:Ye,argsToParams:n=>{const o={};return"object"!=typeof n[0]||m(n[0])?["title","html","icon"].forEach((e,t)=>{t=n[t];"string"==typeof t||m(t)?o[e]=t:void 0!==t&&r("Unexpected type of ".concat(e,'! Expected "string" or "Element", got ').concat(typeof t))}):Object.assign(o,n[0]),o},isVisible:()=>G(v()),clickConfirm:je,clickDeny:()=>E()&&E().click(),clickCancel:()=>T()&&T().click(),getContainer:b,getPopup:v,getTitle:C,getHtmlContainer:k,getImage:A,getIcon:w,getInputLabel:()=>y(h["input-label"]),getCloseButton:D,getActions:L,getConfirmButton:P,getDenyButton:E,getCancelButton:T,getLoader:S,getFooter:O,getTimerProgressBar:j,getFocusableElements:I,getValidationMessage:x,isLoading:()=>v().hasAttribute("data-loading"),fire:function(...e){return new this(...e)},mixin:function(n){class e extends this{_main(e,t){return super._main(e,Object.assign({},n,t))}}return e},showLoading:De,enableLoading:De,getTimerLeft:()=>Me.timeout&&Me.timeout.getTimerLeft(),stopTimer:qe,resumeTimer:Ve,toggleTimer:()=>{var e=Me.timeout;return e&&(e.running?qe:Ve)()},increaseTimer:e=>{if(Me.timeout){e=Me.timeout.increase(e);return ne(e,!0),e}},isTimerRunning:()=>Me.timeout&&Me.timeout.isRunning(),bindClickHandler:function(e="data-swal-template"){Ue[e]=this,Ne||(document.body.addEventListener("click",Fe),Ne=!0)}});function Xe(){var e=he.innerParams.get(this);if(e){const t=he.domCache.get(this);J(t.loader),H()?e.icon&&Z(w()):(e=>{const t=e.popup.getElementsByClassName(e.loader.getAttribute("data-button-to-replace"));if(t.length)Z(t[0],"inline-block");else if(Q())J(e.actions)})(t),_([t.popup,t.actions],h.loading),t.popup.removeAttribute("aria-busy"),t.popup.removeAttribute("data-loading"),t.confirmButton.disabled=!1,t.denyButton.disabled=!1,t.cancelButton.disabled=!1}}const $e=()=>{null===q.previousBodyPadding&&document.body.scrollHeight>window.innerHeight&&(q.previousBodyPadding=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight="".concat(q.previousBodyPadding+(()=>{const e=document.createElement("div");e.className=h["scrollbar-measure"],document.body.appendChild(e);var t=e.getBoundingClientRect().width-e.clientWidth;return document.body.removeChild(e),t})(),"px"))},Ge=()=>{navigator.userAgent.match(/(CriOS|FxiOS|EdgiOS|YaBrowser|UCBrowser)/i)||v().scrollHeight>window.innerHeight-44&&(b().style.paddingBottom="".concat(44,"px"))},Qe=()=>{const e=b();let t;e.ontouchstart=e=>{t=et(e)},e.ontouchmove=e=>{t&&(e.preventDefault(),e.stopPropagation())}},et=e=>{var t=e.target,n=b();return!tt(e)&&!nt(e)&&(t===n||!(ee(n)||"INPUT"===t.tagName||"TEXTAREA"===t.tagName||ee(k())&&k().contains(t)))},tt=e=>e.touches&&e.touches.length&&"stylus"===e.touches[0].touchType,nt=e=>e.touches&&1{const e=a(document.body.children);e.forEach(e=>{e.hasAttribute("data-previous-aria-hidden")?(e.setAttribute("aria-hidden",e.getAttribute("data-previous-aria-hidden")),e.removeAttribute("data-previous-aria-hidden")):e.removeAttribute("aria-hidden")})};var it={swalPromiseResolve:new WeakMap};function at(e,t,n,o){H()?ct(e,o):(He(n).then(()=>ct(e,o)),Me.keydownTarget.removeEventListener("keydown",Me.keydownHandler,{capture:Me.keydownListenerCapture}),Me.keydownHandlerAdded=!1),/^((?!chrome|android).)*safari/i.test(navigator.userAgent)?(t.setAttribute("style","display:none !important"),t.removeAttribute("class"),t.innerHTML=""):t.remove(),M()&&(null!==q.previousBodyPadding&&(document.body.style.paddingRight="".concat(q.previousBodyPadding,"px"),q.previousBodyPadding=null),N(document.body,h.iosfix)&&(t=parseInt(document.body.style.top,10),_(document.body,h.iosfix),document.body.style.top="",document.body.scrollTop=-1*t),ot()),_([document.documentElement,document.body],[h.shown,h["height-auto"],h["no-backdrop"],h["toast-shown"]])}function st(e){var t=v();if(t){e=void 0!==(o=e)?Object.assign({isConfirmed:!1,isDenied:!1,isDismissed:!1},o):{isConfirmed:!1,isDenied:!1,isDismissed:!0};var n=he.innerParams.get(this);if(n&&!N(t,n.hideClass.popup)){const i=it.swalPromiseResolve.get(this);_(t,n.showClass.popup),W(t,n.hideClass.popup);var o=b();_(o,n.showClass.backdrop),W(o,n.hideClass.backdrop),((e,t,n)=>{const o=b(),i=ue&&te(t);if(typeof n.willClose==="function")n.willClose(t);if(i)rt(e,t,o,n.returnFocus,n.didClose);else at(e,o,n.returnFocus,n.didClose)})(this,t,n),i(e)}}}const rt=(e,t,n,o,i)=>{Me.swalCloseEventFinishedCallback=at.bind(null,e,n,o,i),t.addEventListener(ue,function(e){e.target===t&&(Me.swalCloseEventFinishedCallback(),delete Me.swalCloseEventFinishedCallback)})},ct=(e,t)=>{setTimeout(()=>{"function"==typeof t&&t.bind(e.params)(),e._destroy()})};function lt(e,t,n){const o=he.domCache.get(e);t.forEach(e=>{o[e].disabled=n})}function ut(e,t){if(!e)return!1;if("radio"===e.type){const n=e.parentNode.parentNode,o=n.querySelectorAll("input");for(let e=0;e/^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]{2,24}$/.test(e)?Promise.resolve():Promise.resolve(t||"Invalid email address"),url:(e,t)=>/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(e)?Promise.resolve():Promise.resolve(t||"Invalid URL")};function mt(e){var t,n;(t=e).inputValidator||Object.keys(pt).forEach(e=>{t.input===e&&(t.inputValidator=pt[e])}),e.showLoaderOnConfirm&&!e.preConfirm&&s("showLoaderOnConfirm is set to true, but preConfirm is not defined.\nshowLoaderOnConfirm should be used together with preConfirm, see usage example:\nhttps://sweetalert2.github.io/#ajax-request"),(n=e).target&&("string"!=typeof n.target||document.querySelector(n.target))&&("string"==typeof n.target||n.target.appendChild)||(s('Target parameter is not valid, defaulting to "body"'),n.target="body"),"string"==typeof e.title&&(e.title=e.title.split("\n").join("
                              ")),se(e)}const ht=["swal-title","swal-html","swal-footer"],gt=e=>{e="string"==typeof e.template?document.querySelector(e.template):e.template;if(!e)return{};e=e.content;return kt(e),Object.assign(bt(e),ft(e),yt(e),vt(e),wt(e),Ct(e,ht))},bt=e=>{const o={};return a(e.querySelectorAll("swal-param")).forEach(e=>{At(e,["name","value"]);var t=e.getAttribute("name");let n=e.getAttribute("value");"boolean"==typeof Re[t]&&"false"===n&&(n=!1),"object"==typeof Re[t]&&(n=JSON.parse(n)),o[t]=n}),o},ft=e=>{const n={};return a(e.querySelectorAll("swal-button")).forEach(e=>{At(e,["type","color","aria-label"]);var t=e.getAttribute("type");n["".concat(t,"ButtonText")]=e.innerHTML,n["show".concat(o(t),"Button")]=!0,e.hasAttribute("color")&&(n["".concat(t,"ButtonColor")]=e.getAttribute("color")),e.hasAttribute("aria-label")&&(n["".concat(t,"ButtonAriaLabel")]=e.getAttribute("aria-label"))}),n},yt=e=>{const t={},n=e.querySelector("swal-image");return n&&(At(n,["src","width","height","alt"]),n.hasAttribute("src")&&(t.imageUrl=n.getAttribute("src")),n.hasAttribute("width")&&(t.imageWidth=n.getAttribute("width")),n.hasAttribute("height")&&(t.imageHeight=n.getAttribute("height")),n.hasAttribute("alt")&&(t.imageAlt=n.getAttribute("alt"))),t},vt=e=>{const t={},n=e.querySelector("swal-icon");return n&&(At(n,["type","color"]),n.hasAttribute("type")&&(t.icon=n.getAttribute("type")),n.hasAttribute("color")&&(t.iconColor=n.getAttribute("color")),t.iconHtml=n.innerHTML),t},wt=e=>{const n={},t=e.querySelector("swal-input");t&&(At(t,["type","label","placeholder","value"]),n.input=t.getAttribute("type")||"text",t.hasAttribute("label")&&(n.inputLabel=t.getAttribute("label")),t.hasAttribute("placeholder")&&(n.inputPlaceholder=t.getAttribute("placeholder")),t.hasAttribute("value")&&(n.inputValue=t.getAttribute("value")));e=e.querySelectorAll("swal-input-option");return e.length&&(n.inputOptions={},a(e).forEach(e=>{At(e,["value"]);var t=e.getAttribute("value"),e=e.innerHTML;n.inputOptions[t]=e})),n},Ct=(e,t)=>{const n={};for(const o in t){const i=t[o],a=e.querySelector(i);a&&(At(a,[]),n[i.replace(/^swal-/,"")]=a.innerHTML.trim())}return n},kt=e=>{const t=ht.concat(["swal-param","swal-button","swal-image","swal-icon","swal-input","swal-input-option"]);a(e.children).forEach(e=>{e=e.tagName.toLowerCase();-1===t.indexOf(e)&&s("Unrecognized element <".concat(e,">"))})},At=(t,n)=>{a(t.attributes).forEach(e=>{-1===n.indexOf(e.name)&&s(['Unrecognized attribute "'.concat(e.name,'" on <').concat(t.tagName.toLowerCase(),">."),"".concat(n.length?"Allowed attributes are: ".concat(n.join(", ")):"To set the value, use HTML within the element.")])})},Bt=e=>{const t=b(),n=v();"function"==typeof e.willOpen&&e.willOpen(n);var o=window.getComputedStyle(document.body).overflowY;St(t,n,e),setTimeout(()=>{Pt(t,n)},10),M()&&(Et(t,e.scrollbarPadding,o),(()=>{const e=a(document.body.children);e.forEach(e=>{e===b()||e.contains(b())||(e.hasAttribute("aria-hidden")&&e.setAttribute("data-previous-aria-hidden",e.getAttribute("aria-hidden")),e.setAttribute("aria-hidden","true"))})})()),H()||Me.previousActiveElement||(Me.previousActiveElement=document.activeElement),"function"==typeof e.didOpen&&setTimeout(()=>e.didOpen(n)),_(t,h["no-transition"])},xt=e=>{const t=v();if(e.target===t){const n=b();t.removeEventListener(ue,xt),n.style.overflowY="auto"}},Pt=(e,t)=>{ue&&te(t)?(e.style.overflowY="hidden",t.addEventListener(ue,xt)):e.style.overflowY="auto"},Et=(e,t,n)=>{var o;(/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream||"MacIntel"===navigator.platform&&1{e.scrollTop=0})},St=(e,t,n)=>{W(e,n.showClass.backdrop),t.style.setProperty("opacity","0","important"),Z(t,"grid"),setTimeout(()=>{W(t,n.showClass.popup),t.style.removeProperty("opacity")},10),W([document.documentElement,document.body],h.shown),n.heightAuto&&n.backdrop&&!n.toast&&W([document.documentElement,document.body],h["height-auto"])},Tt=e=>e.checked?1:0,Lt=e=>e.checked?e.value:null,Ot=e=>e.files.length?null!==e.getAttribute("multiple")?e.files:e.files[0]:null,jt=(t,n)=>{const o=v(),i=e=>It[n.input](o,Mt(e),n);u(n.inputOptions)||p(n.inputOptions)?(De(P()),d(n.inputOptions).then(e=>{t.hideLoading(),i(e)})):"object"==typeof n.inputOptions?i(n.inputOptions):r("Unexpected type of inputOptions! Expected object, Map or Promise, got ".concat(typeof n.inputOptions))},Dt=(t,n)=>{const o=t.getInput();J(o),d(n.inputValue).then(e=>{o.value="number"===n.input?parseFloat(e)||0:"".concat(e),Z(o),o.focus(),t.hideLoading()}).catch(e=>{r("Error in inputValue promise: ".concat(e)),o.value="",Z(o),o.focus(),t.hideLoading()})},It={select:(e,t,i)=>{const a=K(e,h.select),s=(e,t,n)=>{const o=document.createElement("option");o.value=n,V(o,t),o.selected=Ht(n,i.inputValue),e.appendChild(o)};t.forEach(e=>{var t=e[0];const n=e[1];if(Array.isArray(n)){const o=document.createElement("optgroup");o.label=t,o.disabled=!1,a.appendChild(o),n.forEach(e=>s(o,e[1],e[0]))}else s(a,n,t)}),a.focus()},radio:(e,t,a)=>{const s=K(e,h.radio);t.forEach(e=>{var t=e[0],e=e[1];const n=document.createElement("input"),o=document.createElement("label");n.type="radio",n.name=h.radio,n.value=t,Ht(t,a.inputValue)&&(n.checked=!0);const i=document.createElement("span");V(i,e),i.className=h.label,o.appendChild(n),o.appendChild(i),s.appendChild(o)});const n=s.querySelectorAll("input");n.length&&n[0].focus()}},Mt=n=>{const o=[];return"undefined"!=typeof Map&&n instanceof Map?n.forEach((e,t)=>{let n=e;"object"==typeof n&&(n=Mt(n)),o.push([t,n])}):Object.keys(n).forEach(e=>{let t=n[e];"object"==typeof t&&(t=Mt(t)),o.push([e,t])}),o},Ht=(e,t)=>t&&t.toString()===e.toString(),qt=(e,t)=>{var n=he.innerParams.get(e),o=((e,t)=>{const n=e.getInput();if(!n)return null;switch(t.input){case"checkbox":return Tt(n);case"radio":return Lt(n);case"file":return Ot(n);default:return t.inputAutoTrim?n.value.trim():n.value}})(e,n);n.inputValidator?Vt(e,o,t):e.getInput().checkValidity()?("deny"===t?Nt:Ft)(e,o):(e.enableButtons(),e.showValidationMessage(n.validationMessage))},Vt=(t,n,o)=>{const e=he.innerParams.get(t);t.disableInput();const i=Promise.resolve().then(()=>d(e.inputValidator(n,e.validationMessage)));i.then(e=>{t.enableButtons(),t.enableInput(),e?t.showValidationMessage(e):("deny"===o?Nt:Ft)(t,n)})},Nt=(t,n)=>{const e=he.innerParams.get(t||void 0);if(e.showLoaderOnDeny&&De(E()),e.preDeny){const o=Promise.resolve().then(()=>d(e.preDeny(n,e.validationMessage)));o.then(e=>{!1===e?t.hideLoading():t.closePopup({isDenied:!0,value:void 0===e?n:e})})}else t.closePopup({isDenied:!0,value:n})},Ut=(e,t)=>{e.closePopup({isConfirmed:!0,value:t})},Ft=(t,n)=>{const e=he.innerParams.get(t||void 0);if(e.showLoaderOnConfirm&&De(),e.preConfirm){t.resetValidationMessage();const o=Promise.resolve().then(()=>d(e.preConfirm(n,e.validationMessage)));o.then(e=>{G(x())||!1===e?t.hideLoading():Ut(t,void 0===e?n:e)})}else Ut(t,n)},Rt=(e,t,n)=>{const o=I();if(o.length)return(t+=n)===o.length?t=0:-1===t&&(t=o.length-1),o[t].focus();v().focus()},zt=["ArrowRight","ArrowDown"],Wt=["ArrowLeft","ArrowUp"],_t=(e,t,n)=>{var o=he.innerParams.get(e);o&&(o.stopKeydownPropagation&&t.stopPropagation(),"Enter"===t.key?Kt(e,t,o):"Tab"===t.key?Yt(t,o):[...zt,...Wt].includes(t.key)?Zt(t.key):"Escape"===t.key&&Jt(t,o,n))},Kt=(e,t,n)=>{t.isComposing||t.target&&e.getInput()&&t.target.outerHTML===e.getInput().outerHTML&&(["textarea","file"].includes(n.input)||(je(),t.preventDefault()))},Yt=(e,t)=>{var n=e.target,o=I();let i=-1;for(let e=0;e{const t=P(),n=E(),o=T();if([t,n,o].includes(document.activeElement)){e=zt.includes(e)?"nextElementSibling":"previousElementSibling";const i=document.activeElement[e];i&&i.focus()}},Jt=(e,t,n)=>{c(t.allowEscapeKey)&&(e.preventDefault(),n(l.esc))},Xt=(t,e,n)=>{e.popup.onclick=()=>{var e=he.innerParams.get(t);e.showConfirmButton||e.showDenyButton||e.showCancelButton||e.showCloseButton||e.timer||e.input||n(l.close)}};let $t=!1;const Gt=t=>{t.popup.onmousedown=()=>{t.container.onmouseup=function(e){t.container.onmouseup=void 0,e.target===t.container&&($t=!0)}}},Qt=t=>{t.container.onmousedown=()=>{t.popup.onmouseup=function(e){t.popup.onmouseup=void 0,e.target!==t.popup&&!t.popup.contains(e.target)||($t=!0)}}},en=(n,o,i)=>{o.container.onclick=e=>{var t=he.innerParams.get(n);$t?$t=!1:e.target===o.container&&c(t.allowOutsideClick)&&i(l.backdrop)}};const tn=(e,t,n)=>{var o=j();J(o),t.timer&&(e.timeout=new dt(()=>{n("timer"),delete e.timeout},t.timer),t.timerProgressBar&&(Z(o),setTimeout(()=>{e.timeout&&e.timeout.running&&ne(t.timer)})))},nn=(e,t)=>{if(!t.toast)return c(t.allowEnterKey)?void(on(e,t)||Rt(0,-1,1)):an()},on=(e,t)=>t.focusDeny&&G(e.denyButton)?(e.denyButton.focus(),!0):t.focusCancel&&G(e.cancelButton)?(e.cancelButton.focus(),!0):!(!t.focusConfirm||!G(e.confirmButton))&&(e.confirmButton.focus(),!0),an=()=>{document.activeElement&&"function"==typeof document.activeElement.blur&&document.activeElement.blur()};const sn=e=>{for(const t in e)e[t]=new WeakMap};e=Object.freeze({hideLoading:Xe,disableLoading:Xe,getInput:function(e){var t=he.innerParams.get(e||this);return(e=he.domCache.get(e||this))?F(e.popup,t.input):null},close:st,closePopup:st,closeModal:st,closeToast:st,enableButtons:function(){lt(this,["confirmButton","denyButton","cancelButton"],!1)},disableButtons:function(){lt(this,["confirmButton","denyButton","cancelButton"],!0)},enableInput:function(){return ut(this.getInput(),!1)},disableInput:function(){return ut(this.getInput(),!0)},showValidationMessage:function(e){const t=he.domCache.get(this);var n=he.innerParams.get(this);V(t.validationMessage,e),t.validationMessage.className=h["validation-message"],n.customClass&&n.customClass.validationMessage&&W(t.validationMessage,n.customClass.validationMessage),Z(t.validationMessage);const o=this.getInput();o&&(o.setAttribute("aria-invalid",!0),o.setAttribute("aria-describedby",h["validation-message"]),R(o),W(o,h.inputerror))},resetValidationMessage:function(){var e=he.domCache.get(this);e.validationMessage&&J(e.validationMessage);const t=this.getInput();t&&(t.removeAttribute("aria-invalid"),t.removeAttribute("aria-describedby"),_(t,h.inputerror))},getProgressSteps:function(){return he.domCache.get(this).progressSteps},_main:function(e,t={}){Ze(Object.assign({},t,e)),Me.currentInstance&&(Me.currentInstance._destroy(),M()&&ot()),Me.currentInstance=this,mt(e=((e,t)=>{const n=gt(e),o=Object.assign({},Re,t,n,e);return o.showClass=Object.assign({},Re.showClass,o.showClass),o.hideClass=Object.assign({},Re.hideClass,o.hideClass),o})(e,t)),Object.freeze(e),Me.timeout&&(Me.timeout.stop(),delete Me.timeout),clearTimeout(Me.restoreFocusTimeout);var s,r,c,t=(e=>{const t={popup:v(),container:b(),actions:L(),confirmButton:P(),denyButton:E(),cancelButton:T(),loader:S(),closeButton:D(),validationMessage:x(),progressSteps:B()};return he.domCache.set(e,t),t})(this);return Oe(this,e),he.innerParams.set(this,e),s=this,r=t,c=e,new Promise(e=>{const t=e=>{s.closePopup({isDismissed:!0,dismiss:e})};var n,o,i,a;it.swalPromiseResolve.set(s,e),r.confirmButton.onclick=()=>(e=>{var t=he.innerParams.get(e);e.disableButtons(),t.input?qt(e,"confirm"):Ft(e,!0)})(s),r.denyButton.onclick=()=>(e=>{var t=he.innerParams.get(e);e.disableButtons(),t.returnInputValueOnDeny?qt(e,"deny"):Nt(e,!1)})(s),r.cancelButton.onclick=()=>((e,t)=>{e.disableButtons(),t(l.cancel)})(s,t),r.closeButton.onclick=()=>t(l.close),n=s,a=r,e=t,he.innerParams.get(n).toast?Xt(n,a,e):(Gt(a),Qt(a),en(n,a,e)),o=s,a=Me,e=c,i=t,a.keydownTarget&&a.keydownHandlerAdded&&(a.keydownTarget.removeEventListener("keydown",a.keydownHandler,{capture:a.keydownListenerCapture}),a.keydownHandlerAdded=!1),e.toast||(a.keydownHandler=e=>_t(o,e,i),a.keydownTarget=e.keydownListenerCapture?window:v(),a.keydownListenerCapture=e.keydownListenerCapture,a.keydownTarget.addEventListener("keydown",a.keydownHandler,{capture:a.keydownListenerCapture}),a.keydownHandlerAdded=!0),e=s,"select"===(a=c).input||"radio"===a.input?jt(e,a):["text","email","number","tel","textarea"].includes(a.input)&&(u(a.inputValue)||p(a.inputValue))&&(De(P()),Dt(e,a)),Bt(c),tn(Me,c,t),nn(r,c),setTimeout(()=>{r.container.scrollTop=0})})},update:function(t){var e=v(),n=he.innerParams.get(this);if(!e||N(e,n.hideClass.popup))return s("You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup.");const o={};Object.keys(t).forEach(e=>{ln.isUpdatableParameter(e)?o[e]=t[e]:s('Invalid parameter to update: "'.concat(e,'". Updatable params are listed here: https://github.com/sweetalert2/sweetalert2/blob/master/src/utils/params.js\n\nIf you think this parameter should be updatable, request it here: https://github.com/sweetalert2/sweetalert2/issues/new?template=02_feature_request.md'))}),n=Object.assign({},n,o),Oe(this,n),he.innerParams.set(this,n),Object.defineProperties(this,{params:{value:Object.assign({},this.params,t),writable:!1,enumerable:!0}})},_destroy:function(){var e=he.domCache.get(this);const t=he.innerParams.get(this);t&&(e.popup&&Me.swalCloseEventFinishedCallback&&(Me.swalCloseEventFinishedCallback(),delete Me.swalCloseEventFinishedCallback),Me.deferDisposalTimer&&(clearTimeout(Me.deferDisposalTimer),delete Me.deferDisposalTimer),"function"==typeof t.didDestroy&&t.didDestroy(),delete this.params,delete Me.keydownHandler,delete Me.keydownTarget,sn(he),sn(it),delete Me.currentInstance)}});let rn;class cn{constructor(...e){"undefined"!=typeof window&&(rn=this,e=Object.freeze(this.constructor.argsToParams(e)),Object.defineProperties(this,{params:{value:e,writable:!1,enumerable:!0,configurable:!0}}),e=this._main(this.params),he.promise.set(this,e))}then(e){const t=he.promise.get(this);return t.then(e)}finally(e){const t=he.promise.get(this);return t.finally(e)}}Object.assign(cn.prototype,e),Object.assign(cn,Je),Object.keys(e).forEach(t=>{cn[t]=function(...e){if(rn)return rn[t](...e)}}),cn.DismissReason=l,cn.version="11.1.5";const ln=cn;return ln.default=ln,ln}),void 0!==this&&this.Sweetalert2&&(this.swal=this.sweetAlert=this.Swal=this.SweetAlert=this.Sweetalert2); +"undefined"!=typeof document&&function(e,t){var n=e.createElement("style");if(e.getElementsByTagName("head")[0].appendChild(n),n.styleSheet)n.styleSheet.disabled||(n.styleSheet.cssText=t);else try{n.innerHTML=t}catch(e){n.innerText=t}}(document,".swal2-popup.swal2-toast{box-sizing:border-box;grid-column:1/4!important;grid-row:1/4!important;grid-template-columns:1fr 99fr 1fr;padding:1em;overflow-y:hidden;background:#fff;box-shadow:0 0 .625em #d9d9d9;pointer-events:all}.swal2-popup.swal2-toast>*{grid-column:2}.swal2-popup.swal2-toast .swal2-title{margin:1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-loading{justify-content:center}.swal2-popup.swal2-toast .swal2-input{height:2em;margin:.5em;font-size:1em}.swal2-popup.swal2-toast .swal2-validation-message{font-size:1em}.swal2-popup.swal2-toast .swal2-footer{margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-popup.swal2-toast .swal2-close{grid-column:3/3;grid-row:1/99;align-self:center;width:.8em;height:.8em;margin:0;font-size:2em}.swal2-popup.swal2-toast .swal2-html-container{margin:1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-html-container:empty{padding:0}.swal2-popup.swal2-toast .swal2-loader{grid-column:1;grid-row:1/99;align-self:center;width:2em;height:2em;margin:.25em}.swal2-popup.swal2-toast .swal2-icon{grid-column:1;grid-row:1/99;align-self:center;width:2em;min-width:2em;height:2em;margin:0 .5em 0 0}.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:700}.swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-popup.swal2-toast .swal2-actions{justify-content:flex-start;height:auto;margin:0;margin-top:.3125em;padding:0}.swal2-popup.swal2-toast .swal2-styled{margin:.25em .5em;padding:.4em .6em;font-size:1em}.swal2-popup.swal2-toast .swal2-styled:focus{box-shadow:0 0 0 1px #fff,0 0 0 3px rgba(100,150,200,.5)}.swal2-popup.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;transform:rotate(45deg);border-radius:50%}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.8em;left:-.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.25em;left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-popup.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{-webkit-animation:swal2-toast-animate-success-line-tip .75s;animation:swal2-toast-animate-success-line-tip .75s}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{-webkit-animation:swal2-toast-animate-success-line-long .75s;animation:swal2-toast-animate-success-line-long .75s}.swal2-popup.swal2-toast.swal2-show{-webkit-animation:swal2-toast-show .5s;animation:swal2-toast-show .5s}.swal2-popup.swal2-toast.swal2-hide{-webkit-animation:swal2-toast-hide .1s forwards;animation:swal2-toast-hide .1s forwards}.swal2-container{display:grid;position:fixed;z-index:1060;top:0;right:0;bottom:0;left:0;box-sizing:border-box;grid-template-areas:\"top-start top top-end\" \"center-start center center-end\" \"bottom-start bottom-center bottom-end\";grid-template-rows:minmax(-webkit-min-content,auto) minmax(-webkit-min-content,auto) minmax(-webkit-min-content,auto);grid-template-rows:minmax(min-content,auto) minmax(min-content,auto) minmax(min-content,auto);height:100%;padding:.625em;overflow-x:hidden;transition:background-color .1s;-webkit-overflow-scrolling:touch}.swal2-container.swal2-backdrop-show,.swal2-container.swal2-noanimation{background:rgba(0,0,0,.4)}.swal2-container.swal2-backdrop-hide{background:0 0!important}.swal2-container.swal2-bottom-start,.swal2-container.swal2-center-start,.swal2-container.swal2-top-start{grid-template-columns:minmax(0,1fr) auto auto}.swal2-container.swal2-bottom,.swal2-container.swal2-center,.swal2-container.swal2-top{grid-template-columns:auto minmax(0,1fr) auto}.swal2-container.swal2-bottom-end,.swal2-container.swal2-center-end,.swal2-container.swal2-top-end{grid-template-columns:auto auto minmax(0,1fr)}.swal2-container.swal2-top-start>.swal2-popup{align-self:start}.swal2-container.swal2-top>.swal2-popup{grid-column:2;align-self:start;justify-self:center}.swal2-container.swal2-top-end>.swal2-popup,.swal2-container.swal2-top-right>.swal2-popup{grid-column:3;align-self:start;justify-self:end}.swal2-container.swal2-center-left>.swal2-popup,.swal2-container.swal2-center-start>.swal2-popup{grid-row:2;align-self:center}.swal2-container.swal2-center>.swal2-popup{grid-column:2;grid-row:2;align-self:center;justify-self:center}.swal2-container.swal2-center-end>.swal2-popup,.swal2-container.swal2-center-right>.swal2-popup{grid-column:3;grid-row:2;align-self:center;justify-self:end}.swal2-container.swal2-bottom-left>.swal2-popup,.swal2-container.swal2-bottom-start>.swal2-popup{grid-column:1;grid-row:3;align-self:end}.swal2-container.swal2-bottom>.swal2-popup{grid-column:2;grid-row:3;justify-self:center;align-self:end}.swal2-container.swal2-bottom-end>.swal2-popup,.swal2-container.swal2-bottom-right>.swal2-popup{grid-column:3;grid-row:3;align-self:end;justify-self:end}.swal2-container.swal2-grow-fullscreen>.swal2-popup,.swal2-container.swal2-grow-row>.swal2-popup{grid-column:1/4;width:100%}.swal2-container.swal2-grow-column>.swal2-popup,.swal2-container.swal2-grow-fullscreen>.swal2-popup{grid-row:1/4;align-self:stretch}.swal2-container.swal2-no-transition{transition:none!important}.swal2-popup{display:none;position:relative;box-sizing:border-box;grid-template-columns:minmax(0,100%);width:32em;max-width:100%;padding:0 0 1.25em;border:none;border-radius:5px;background:#fff;color:#545454;font-family:inherit;font-size:1rem}.swal2-popup:focus{outline:0}.swal2-popup.swal2-loading{overflow-y:hidden}.swal2-title{position:relative;max-width:100%;margin:0;padding:.8em 1em 0;color:#595959;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;word-wrap:break-word}.swal2-actions{display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:center;width:auto;margin:1.25em auto 0;padding:0}.swal2-actions:not(.swal2-loading) .swal2-styled[disabled]{opacity:.4}.swal2-actions:not(.swal2-loading) .swal2-styled:hover{background-image:linear-gradient(rgba(0,0,0,.1),rgba(0,0,0,.1))}.swal2-actions:not(.swal2-loading) .swal2-styled:active{background-image:linear-gradient(rgba(0,0,0,.2),rgba(0,0,0,.2))}.swal2-loader{display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;-webkit-animation:swal2-rotate-loading 1.5s linear 0s infinite normal;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 transparent #2778c4 transparent}.swal2-styled{margin:.3125em;padding:.625em 1.1em;transition:box-shadow .1s;box-shadow:0 0 0 3px transparent;font-weight:500}.swal2-styled:not([disabled]){cursor:pointer}.swal2-styled.swal2-confirm{border:0;border-radius:.25em;background:initial;background-color:#7367f0;color:#fff;font-size:1em}.swal2-styled.swal2-confirm:focus{box-shadow:0 0 0 3px rgba(115,103,240,.5)}.swal2-styled.swal2-deny{border:0;border-radius:.25em;background:initial;background-color:#ea5455;color:#fff;font-size:1em}.swal2-styled.swal2-deny:focus{box-shadow:0 0 0 3px rgba(234,84,85,.5)}.swal2-styled.swal2-cancel{border:0;border-radius:.25em;background:initial;background-color:#6e7d88;color:#fff;font-size:1em}.swal2-styled.swal2-cancel:focus{box-shadow:0 0 0 3px rgba(110,125,136,.5)}.swal2-styled.swal2-default-outline:focus{box-shadow:0 0 0 3px rgba(100,150,200,.5)}.swal2-styled:focus{outline:0}.swal2-styled::-moz-focus-inner{border:0}.swal2-footer{justify-content:center;margin:1em 0 0;padding:1em 1em 0;border-top:1px solid #eee;color:#545454;font-size:1em}.swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;grid-column:auto!important;height:.25em;overflow:hidden;border-bottom-right-radius:5px;border-bottom-left-radius:5px}.swal2-timer-progress-bar{width:100%;height:.25em;background:rgba(0,0,0,.2)}.swal2-image{max-width:100%;margin:2em auto 1em}.swal2-close{z-index:2;align-items:center;justify-content:center;width:1.2em;height:1.2em;margin-top:0;margin-right:0;margin-bottom:-1.2em;padding:0;overflow:hidden;transition:color .1s,box-shadow .1s;border:none;border-radius:5px;background:0 0;color:#ccc;font-family:serif;font-family:monospace;font-size:2.5em;cursor:pointer;justify-self:end}.swal2-close:hover{transform:none;background:0 0;color:#f27474}.swal2-close:focus{outline:0;box-shadow:inset 0 0 0 3px rgba(100,150,200,.5)}.swal2-close::-moz-focus-inner{border:0}.swal2-html-container{z-index:1;justify-content:center;margin:1em 1.6em .3em;padding:0;overflow:auto;color:#545454;font-size:1.125em;font-weight:400;line-height:normal;text-align:center;word-wrap:break-word;word-break:break-word}.swal2-checkbox,.swal2-file,.swal2-input,.swal2-radio,.swal2-select,.swal2-textarea{margin:1em 2em 0}.swal2-file,.swal2-input,.swal2-textarea{box-sizing:border-box;width:auto;transition:border-color .1s,box-shadow .1s;border:1px solid #d9d9d9;border-radius:.1875em;background:inherit;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px transparent;color:inherit;font-size:1.125em}.swal2-file.swal2-inputerror,.swal2-input.swal2-inputerror,.swal2-textarea.swal2-inputerror{border-color:#f27474!important;box-shadow:0 0 2px #f27474!important}.swal2-file:focus,.swal2-input:focus,.swal2-textarea:focus{border:1px solid #b4dbed;outline:0;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(100,150,200,.5)}.swal2-file::-moz-placeholder,.swal2-input::-moz-placeholder,.swal2-textarea::-moz-placeholder{color:#ccc}.swal2-file:-ms-input-placeholder,.swal2-input:-ms-input-placeholder,.swal2-textarea:-ms-input-placeholder{color:#ccc}.swal2-file::placeholder,.swal2-input::placeholder,.swal2-textarea::placeholder{color:#ccc}.swal2-range{margin:1em 2em 0;background:#fff}.swal2-range input{width:80%}.swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}.swal2-range input,.swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}.swal2-input{height:2.625em;padding:0 .75em}.swal2-file{width:75%;margin-right:auto;margin-left:auto;background:inherit;font-size:1.125em}.swal2-textarea{height:6.75em;padding:.75em}.swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:inherit;color:inherit;font-size:1.125em}.swal2-checkbox,.swal2-radio{align-items:center;justify-content:center;background:#fff;color:inherit}.swal2-checkbox label,.swal2-radio label{margin:0 .6em;font-size:1.125em}.swal2-checkbox input,.swal2-radio input{flex-shrink:0;margin:0 .4em}.swal2-input-label{display:flex;justify-content:center;margin:1em auto 0}.swal2-validation-message{align-items:center;justify-content:center;margin:1em 0 0;padding:.625em;overflow:hidden;background:#f0f0f0;color:#666;font-size:1em;font-weight:300}.swal2-validation-message::before{content:\"!\";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}.swal2-icon{position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:2.5em auto .6em;border:.25em solid transparent;border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}.swal2-icon.swal2-error{border-color:#f27474;color:#f27474}.swal2-icon.swal2-error .swal2-x-mark{position:relative;flex-grow:1}.swal2-icon.swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}.swal2-icon.swal2-error.swal2-icon-show{-webkit-animation:swal2-animate-error-icon .5s;animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-error.swal2-icon-show .swal2-x-mark{-webkit-animation:swal2-animate-error-x-mark .5s;animation:swal2-animate-error-x-mark .5s}.swal2-icon.swal2-warning{border-color:#facea8;color:#f8bb86}.swal2-icon.swal2-info{border-color:#9de0f6;color:#3fc3ee}.swal2-icon.swal2-question{border-color:#c9dae1;color:#87adbd}.swal2-icon.swal2-success{border-color:#a5dc86;color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;transform:rotate(45deg);border-radius:50%}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}.swal2-icon.swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-.25em;left:-.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}.swal2-icon.swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}.swal2-icon.swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}.swal2-icon.swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-tip{-webkit-animation:swal2-animate-success-line-tip .75s;animation:swal2-animate-success-line-tip .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-long{-webkit-animation:swal2-animate-success-line-long .75s;animation:swal2-animate-success-line-long .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-circular-line-right{-webkit-animation:swal2-rotate-success-circular-line 4.25s ease-in;animation:swal2-rotate-success-circular-line 4.25s ease-in}.swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:1.25em auto;padding:0;background:inherit;font-weight:600}.swal2-progress-steps li{display:inline-block;position:relative}.swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:#add8e6;color:#fff}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:#add8e6}.swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}[class^=swal2]{-webkit-tap-highlight-color:transparent}.swal2-show{-webkit-animation:swal2-show .3s;animation:swal2-show .3s}.swal2-hide{-webkit-animation:swal2-hide .15s forwards;animation:swal2-hide .15s forwards}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{margin-right:initial;margin-left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}@-webkit-keyframes swal2-toast-show{0%{transform:translateY(-.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0)}}@keyframes swal2-toast-show{0%{transform:translateY(-.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0)}}@-webkit-keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@-webkit-keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@-webkit-keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@-webkit-keyframes swal2-show{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}100%{transform:scale(1)}}@keyframes swal2-show{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}100%{transform:scale(1)}}@-webkit-keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(.5);opacity:0}}@keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(.5);opacity:0}}@-webkit-keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@-webkit-keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@-webkit-keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@-webkit-keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@-webkit-keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0);opacity:1}}@-webkit-keyframes swal2-rotate-loading{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes swal2-rotate-loading{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto!important}body.swal2-no-backdrop .swal2-container{background-color:transparent!important;pointer-events:none}body.swal2-no-backdrop .swal2-container .swal2-popup{pointer-events:all}body.swal2-no-backdrop .swal2-container .swal2-modal{box-shadow:0 0 10px rgba(0,0,0,.4)}@media print{body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow-y:scroll!important}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .swal2-container{position:static!important}}body.swal2-toast-shown .swal2-container{box-sizing:border-box;width:360px;max-width:100%;background-color:transparent;pointer-events:none}body.swal2-toast-shown .swal2-container.swal2-top{top:0;right:auto;bottom:auto;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{top:0;right:0;bottom:auto;left:auto}body.swal2-toast-shown .swal2-container.swal2-top-left,body.swal2-toast-shown .swal2-container.swal2-top-start{top:0;right:auto;bottom:auto;left:0}body.swal2-toast-shown .swal2-container.swal2-center-left,body.swal2-toast-shown .swal2-container.swal2-center-start{top:50%;right:auto;bottom:auto;left:0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{top:50%;right:auto;bottom:auto;left:50%;transform:translate(-50%,-50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{top:50%;right:0;bottom:auto;left:auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-left,body.swal2-toast-shown .swal2-container.swal2-bottom-start{top:auto;right:auto;bottom:0;left:0}body.swal2-toast-shown .swal2-container.swal2-bottom{top:auto;right:auto;bottom:0;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{top:auto;right:0;bottom:0;left:auto}"); \ No newline at end of file diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/wwwroot/libs/sweetalert2/sweetalert2.css b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/wwwroot/libs/sweetalert2/sweetalert2.css new file mode 100644 index 0000000000..1feb7a5581 --- /dev/null +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/wwwroot/libs/sweetalert2/sweetalert2.css @@ -0,0 +1,1319 @@ +.swal2-popup.swal2-toast { + box-sizing: border-box; + grid-column: 1/4 !important; + grid-row: 1/4 !important; + grid-template-columns: 1fr 99fr 1fr; + padding: 1em; + overflow-y: hidden; + background: #fff; + box-shadow: 0 0 0.625em #d9d9d9; + pointer-events: all; +} +.swal2-popup.swal2-toast > * { + grid-column: 2; +} +.swal2-popup.swal2-toast .swal2-title { + margin: 1em; + padding: 0; + font-size: 1em; + text-align: initial; +} +.swal2-popup.swal2-toast .swal2-loading { + justify-content: center; +} +.swal2-popup.swal2-toast .swal2-input { + height: 2em; + margin: 0.5em; + font-size: 1em; +} +.swal2-popup.swal2-toast .swal2-validation-message { + font-size: 1em; +} +.swal2-popup.swal2-toast .swal2-footer { + margin: 0.5em 0 0; + padding: 0.5em 0 0; + font-size: 0.8em; +} +.swal2-popup.swal2-toast .swal2-close { + grid-column: 3/3; + grid-row: 1/99; + align-self: center; + width: 0.8em; + height: 0.8em; + margin: 0; + font-size: 2em; +} +.swal2-popup.swal2-toast .swal2-html-container { + margin: 1em; + padding: 0; + font-size: 1em; + text-align: initial; +} +.swal2-popup.swal2-toast .swal2-html-container:empty { + padding: 0; +} +.swal2-popup.swal2-toast .swal2-loader { + grid-column: 1; + grid-row: 1/99; + align-self: center; + width: 2em; + height: 2em; + margin: 0.25em; +} +.swal2-popup.swal2-toast .swal2-icon { + grid-column: 1; + grid-row: 1/99; + align-self: center; + width: 2em; + min-width: 2em; + height: 2em; + margin: 0 0.5em 0 0; +} +.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content { + display: flex; + align-items: center; + font-size: 1.8em; + font-weight: bold; +} +.swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring { + width: 2em; + height: 2em; +} +.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line] { + top: 0.875em; + width: 1.375em; +} +.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left] { + left: 0.3125em; +} +.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right] { + right: 0.3125em; +} +.swal2-popup.swal2-toast .swal2-actions { + justify-content: flex-start; + height: auto; + margin: 0; + margin-top: 0.3125em; + padding: 0; +} +.swal2-popup.swal2-toast .swal2-styled { + margin: 0.25em 0.5em; + padding: 0.4em 0.6em; + font-size: 1em; +} +.swal2-popup.swal2-toast .swal2-styled:focus { + box-shadow: 0 0 0 1px #fff, 0 0 0 3px rgba(100, 150, 200, 0.5); +} +.swal2-popup.swal2-toast .swal2-success { + border-color: #a5dc86; +} +.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line] { + position: absolute; + width: 1.6em; + height: 3em; + transform: rotate(45deg); + border-radius: 50%; +} +.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left] { + top: -0.8em; + left: -0.5em; + transform: rotate(-45deg); + transform-origin: 2em 2em; + border-radius: 4em 0 0 4em; +} +.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right] { + top: -0.25em; + left: 0.9375em; + transform-origin: 0 1.5em; + border-radius: 0 4em 4em 0; +} +.swal2-popup.swal2-toast .swal2-success .swal2-success-ring { + width: 2em; + height: 2em; +} +.swal2-popup.swal2-toast .swal2-success .swal2-success-fix { + top: 0; + left: 0.4375em; + width: 0.4375em; + height: 2.6875em; +} +.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line] { + height: 0.3125em; +} +.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip] { + top: 1.125em; + left: 0.1875em; + width: 0.75em; +} +.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=long] { + top: 0.9375em; + right: 0.1875em; + width: 1.375em; +} +.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip { + -webkit-animation: swal2-toast-animate-success-line-tip 0.75s; + animation: swal2-toast-animate-success-line-tip 0.75s; +} +.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long { + -webkit-animation: swal2-toast-animate-success-line-long 0.75s; + animation: swal2-toast-animate-success-line-long 0.75s; +} +.swal2-popup.swal2-toast.swal2-show { + -webkit-animation: swal2-toast-show 0.5s; + animation: swal2-toast-show 0.5s; +} +.swal2-popup.swal2-toast.swal2-hide { + -webkit-animation: swal2-toast-hide 0.1s forwards; + animation: swal2-toast-hide 0.1s forwards; +} + +.swal2-container { + display: grid; + position: fixed; + z-index: 1060; + top: 0; + right: 0; + bottom: 0; + left: 0; + box-sizing: border-box; + grid-template-areas: "top-start top top-end" "center-start center center-end" "bottom-start bottom-center bottom-end"; + grid-template-rows: minmax(-webkit-min-content, auto) minmax(-webkit-min-content, auto) minmax(-webkit-min-content, auto); + grid-template-rows: minmax(min-content, auto) minmax(min-content, auto) minmax(min-content, auto); + height: 100%; + padding: 0.625em; + overflow-x: hidden; + transition: background-color 0.1s; + -webkit-overflow-scrolling: touch; +} +.swal2-container.swal2-backdrop-show, .swal2-container.swal2-noanimation { + background: rgba(0, 0, 0, 0.4); +} +.swal2-container.swal2-backdrop-hide { + background: transparent !important; +} +.swal2-container.swal2-top-start, .swal2-container.swal2-center-start, .swal2-container.swal2-bottom-start { + grid-template-columns: minmax(0, 1fr) auto auto; +} +.swal2-container.swal2-top, .swal2-container.swal2-center, .swal2-container.swal2-bottom { + grid-template-columns: auto minmax(0, 1fr) auto; +} +.swal2-container.swal2-top-end, .swal2-container.swal2-center-end, .swal2-container.swal2-bottom-end { + grid-template-columns: auto auto minmax(0, 1fr); +} +.swal2-container.swal2-top-start > .swal2-popup { + align-self: start; +} +.swal2-container.swal2-top > .swal2-popup { + grid-column: 2; + align-self: start; + justify-self: center; +} +.swal2-container.swal2-top-end > .swal2-popup, .swal2-container.swal2-top-right > .swal2-popup { + grid-column: 3; + align-self: start; + justify-self: end; +} +.swal2-container.swal2-center-start > .swal2-popup, .swal2-container.swal2-center-left > .swal2-popup { + grid-row: 2; + align-self: center; +} +.swal2-container.swal2-center > .swal2-popup { + grid-column: 2; + grid-row: 2; + align-self: center; + justify-self: center; +} +.swal2-container.swal2-center-end > .swal2-popup, .swal2-container.swal2-center-right > .swal2-popup { + grid-column: 3; + grid-row: 2; + align-self: center; + justify-self: end; +} +.swal2-container.swal2-bottom-start > .swal2-popup, .swal2-container.swal2-bottom-left > .swal2-popup { + grid-column: 1; + grid-row: 3; + align-self: end; +} +.swal2-container.swal2-bottom > .swal2-popup { + grid-column: 2; + grid-row: 3; + justify-self: center; + align-self: end; +} +.swal2-container.swal2-bottom-end > .swal2-popup, .swal2-container.swal2-bottom-right > .swal2-popup { + grid-column: 3; + grid-row: 3; + align-self: end; + justify-self: end; +} +.swal2-container.swal2-grow-row > .swal2-popup, .swal2-container.swal2-grow-fullscreen > .swal2-popup { + grid-column: 1/4; + width: 100%; +} +.swal2-container.swal2-grow-column > .swal2-popup, .swal2-container.swal2-grow-fullscreen > .swal2-popup { + grid-row: 1/4; + align-self: stretch; +} +.swal2-container.swal2-no-transition { + transition: none !important; +} + +.swal2-popup { + display: none; + position: relative; + box-sizing: border-box; + grid-template-columns: minmax(0, 100%); + width: 32em; + max-width: 100%; + padding: 0 0 1.25em; + border: none; + border-radius: 5px; + background: #fff; + color: #545454; + font-family: inherit; + font-size: 1rem; +} +.swal2-popup:focus { + outline: none; +} +.swal2-popup.swal2-loading { + overflow-y: hidden; +} + +.swal2-title { + position: relative; + max-width: 100%; + margin: 0; + padding: 0.8em 1em 0; + color: #595959; + font-size: 1.875em; + font-weight: 600; + text-align: center; + text-transform: none; + word-wrap: break-word; +} + +.swal2-actions { + display: flex; + z-index: 1; + box-sizing: border-box; + flex-wrap: wrap; + align-items: center; + justify-content: center; + width: auto; + margin: 1.25em auto 0; + padding: 0; +} +.swal2-actions:not(.swal2-loading) .swal2-styled[disabled] { + opacity: 0.4; +} +.swal2-actions:not(.swal2-loading) .swal2-styled:hover { + background-image: linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1)); +} +.swal2-actions:not(.swal2-loading) .swal2-styled:active { + background-image: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)); +} + +.swal2-loader { + display: none; + align-items: center; + justify-content: center; + width: 2.2em; + height: 2.2em; + margin: 0 1.875em; + -webkit-animation: swal2-rotate-loading 1.5s linear 0s infinite normal; + animation: swal2-rotate-loading 1.5s linear 0s infinite normal; + border-width: 0.25em; + border-style: solid; + border-radius: 100%; + border-color: #2778c4 transparent #2778c4 transparent; +} + +.swal2-styled { + margin: 0.3125em; + padding: 0.625em 1.1em; + transition: box-shadow 0.1s; + box-shadow: 0 0 0 3px transparent; + font-weight: 500; +} +.swal2-styled:not([disabled]) { + cursor: pointer; +} +.swal2-styled.swal2-confirm { + border: 0; + border-radius: 0.25em; + background: initial; + background-color: #7367f0; + color: #fff; + font-size: 1em; +} +.swal2-styled.swal2-confirm:focus { + box-shadow: 0 0 0 3px rgba(115, 103, 240, 0.5); +} +.swal2-styled.swal2-deny { + border: 0; + border-radius: 0.25em; + background: initial; + background-color: #ea5455; + color: #fff; + font-size: 1em; +} +.swal2-styled.swal2-deny:focus { + box-shadow: 0 0 0 3px rgba(234, 84, 85, 0.5); +} +.swal2-styled.swal2-cancel { + border: 0; + border-radius: 0.25em; + background: initial; + background-color: #6e7d88; + color: #fff; + font-size: 1em; +} +.swal2-styled.swal2-cancel:focus { + box-shadow: 0 0 0 3px rgba(110, 125, 136, 0.5); +} +.swal2-styled.swal2-default-outline:focus { + box-shadow: 0 0 0 3px rgba(100, 150, 200, 0.5); +} +.swal2-styled:focus { + outline: none; +} +.swal2-styled::-moz-focus-inner { + border: 0; +} + +.swal2-footer { + justify-content: center; + margin: 1em 0 0; + padding: 1em 1em 0; + border-top: 1px solid #eee; + color: #545454; + font-size: 1em; +} + +.swal2-timer-progress-bar-container { + position: absolute; + right: 0; + bottom: 0; + left: 0; + grid-column: auto !important; + height: 0.25em; + overflow: hidden; + border-bottom-right-radius: 5px; + border-bottom-left-radius: 5px; +} + +.swal2-timer-progress-bar { + width: 100%; + height: 0.25em; + background: rgba(0, 0, 0, 0.2); +} + +.swal2-image { + max-width: 100%; + margin: 2em auto 1em; +} + +.swal2-close { + z-index: 2; + align-items: center; + justify-content: center; + width: 1.2em; + height: 1.2em; + margin-top: 0; + margin-right: 0; + margin-bottom: -1.2em; + padding: 0; + overflow: hidden; + transition: color 0.1s, box-shadow 0.1s; + border: none; + border-radius: 5px; + background: transparent; + color: #ccc; + font-family: serif; + font-family: monospace; + font-size: 2.5em; + cursor: pointer; + justify-self: end; +} +.swal2-close:hover { + transform: none; + background: transparent; + color: #f27474; +} +.swal2-close:focus { + outline: none; + box-shadow: inset 0 0 0 3px rgba(100, 150, 200, 0.5); +} +.swal2-close::-moz-focus-inner { + border: 0; +} + +.swal2-html-container { + z-index: 1; + justify-content: center; + margin: 1em 1.6em 0.3em; + padding: 0; + overflow: auto; + color: #545454; + font-size: 1.125em; + font-weight: normal; + line-height: normal; + text-align: center; + word-wrap: break-word; + word-break: break-word; +} + +.swal2-input, +.swal2-file, +.swal2-textarea, +.swal2-select, +.swal2-radio, +.swal2-checkbox { + margin: 1em 2em 0; +} + +.swal2-input, +.swal2-file, +.swal2-textarea { + box-sizing: border-box; + width: auto; + transition: border-color 0.1s, box-shadow 0.1s; + border: 1px solid #d9d9d9; + border-radius: 0.1875em; + background: inherit; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06), 0 0 0 3px transparent; + color: inherit; + font-size: 1.125em; +} +.swal2-input.swal2-inputerror, +.swal2-file.swal2-inputerror, +.swal2-textarea.swal2-inputerror { + border-color: #f27474 !important; + box-shadow: 0 0 2px #f27474 !important; +} +.swal2-input:focus, +.swal2-file:focus, +.swal2-textarea:focus { + border: 1px solid #b4dbed; + outline: none; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06), 0 0 0 3px rgba(100, 150, 200, 0.5); +} +.swal2-input::-moz-placeholder, .swal2-file::-moz-placeholder, .swal2-textarea::-moz-placeholder { + color: #ccc; +} +.swal2-input:-ms-input-placeholder, .swal2-file:-ms-input-placeholder, .swal2-textarea:-ms-input-placeholder { + color: #ccc; +} +.swal2-input::placeholder, +.swal2-file::placeholder, +.swal2-textarea::placeholder { + color: #ccc; +} + +.swal2-range { + margin: 1em 2em 0; + background: #fff; +} +.swal2-range input { + width: 80%; +} +.swal2-range output { + width: 20%; + color: inherit; + font-weight: 600; + text-align: center; +} +.swal2-range input, +.swal2-range output { + height: 2.625em; + padding: 0; + font-size: 1.125em; + line-height: 2.625em; +} + +.swal2-input { + height: 2.625em; + padding: 0 0.75em; +} + +.swal2-file { + width: 75%; + margin-right: auto; + margin-left: auto; + background: inherit; + font-size: 1.125em; +} + +.swal2-textarea { + height: 6.75em; + padding: 0.75em; +} + +.swal2-select { + min-width: 50%; + max-width: 100%; + padding: 0.375em 0.625em; + background: inherit; + color: inherit; + font-size: 1.125em; +} + +.swal2-radio, +.swal2-checkbox { + align-items: center; + justify-content: center; + background: #fff; + color: inherit; +} +.swal2-radio label, +.swal2-checkbox label { + margin: 0 0.6em; + font-size: 1.125em; +} +.swal2-radio input, +.swal2-checkbox input { + flex-shrink: 0; + margin: 0 0.4em; +} + +.swal2-input-label { + display: flex; + justify-content: center; + margin: 1em auto 0; +} + +.swal2-validation-message { + align-items: center; + justify-content: center; + margin: 1em 0 0; + padding: 0.625em; + overflow: hidden; + background: #f0f0f0; + color: #666666; + font-size: 1em; + font-weight: 300; +} +.swal2-validation-message::before { + content: "!"; + display: inline-block; + width: 1.5em; + min-width: 1.5em; + height: 1.5em; + margin: 0 0.625em; + border-radius: 50%; + background-color: #f27474; + color: #fff; + font-weight: 600; + line-height: 1.5em; + text-align: center; +} + +.swal2-icon { + position: relative; + box-sizing: content-box; + justify-content: center; + width: 5em; + height: 5em; + margin: 2.5em auto 0.6em; + border: 0.25em solid transparent; + border-radius: 50%; + border-color: #000; + font-family: inherit; + line-height: 5em; + cursor: default; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} +.swal2-icon .swal2-icon-content { + display: flex; + align-items: center; + font-size: 3.75em; +} +.swal2-icon.swal2-error { + border-color: #f27474; + color: #f27474; +} +.swal2-icon.swal2-error .swal2-x-mark { + position: relative; + flex-grow: 1; +} +.swal2-icon.swal2-error [class^=swal2-x-mark-line] { + display: block; + position: absolute; + top: 2.3125em; + width: 2.9375em; + height: 0.3125em; + border-radius: 0.125em; + background-color: #f27474; +} +.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left] { + left: 1.0625em; + transform: rotate(45deg); +} +.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right] { + right: 1em; + transform: rotate(-45deg); +} +.swal2-icon.swal2-error.swal2-icon-show { + -webkit-animation: swal2-animate-error-icon 0.5s; + animation: swal2-animate-error-icon 0.5s; +} +.swal2-icon.swal2-error.swal2-icon-show .swal2-x-mark { + -webkit-animation: swal2-animate-error-x-mark 0.5s; + animation: swal2-animate-error-x-mark 0.5s; +} +.swal2-icon.swal2-warning { + border-color: #facea8; + color: #f8bb86; +} +.swal2-icon.swal2-info { + border-color: #9de0f6; + color: #3fc3ee; +} +.swal2-icon.swal2-question { + border-color: #c9dae1; + color: #87adbd; +} +.swal2-icon.swal2-success { + border-color: #a5dc86; + color: #a5dc86; +} +.swal2-icon.swal2-success [class^=swal2-success-circular-line] { + position: absolute; + width: 3.75em; + height: 7.5em; + transform: rotate(45deg); + border-radius: 50%; +} +.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=left] { + top: -0.4375em; + left: -2.0635em; + transform: rotate(-45deg); + transform-origin: 3.75em 3.75em; + border-radius: 7.5em 0 0 7.5em; +} +.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=right] { + top: -0.6875em; + left: 1.875em; + transform: rotate(-45deg); + transform-origin: 0 3.75em; + border-radius: 0 7.5em 7.5em 0; +} +.swal2-icon.swal2-success .swal2-success-ring { + position: absolute; + z-index: 2; + top: -0.25em; + left: -0.25em; + box-sizing: content-box; + width: 100%; + height: 100%; + border: 0.25em solid rgba(165, 220, 134, 0.3); + border-radius: 50%; +} +.swal2-icon.swal2-success .swal2-success-fix { + position: absolute; + z-index: 1; + top: 0.5em; + left: 1.625em; + width: 0.4375em; + height: 5.625em; + transform: rotate(-45deg); +} +.swal2-icon.swal2-success [class^=swal2-success-line] { + display: block; + position: absolute; + z-index: 2; + height: 0.3125em; + border-radius: 0.125em; + background-color: #a5dc86; +} +.swal2-icon.swal2-success [class^=swal2-success-line][class$=tip] { + top: 2.875em; + left: 0.8125em; + width: 1.5625em; + transform: rotate(45deg); +} +.swal2-icon.swal2-success [class^=swal2-success-line][class$=long] { + top: 2.375em; + right: 0.5em; + width: 2.9375em; + transform: rotate(-45deg); +} +.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-tip { + -webkit-animation: swal2-animate-success-line-tip 0.75s; + animation: swal2-animate-success-line-tip 0.75s; +} +.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-long { + -webkit-animation: swal2-animate-success-line-long 0.75s; + animation: swal2-animate-success-line-long 0.75s; +} +.swal2-icon.swal2-success.swal2-icon-show .swal2-success-circular-line-right { + -webkit-animation: swal2-rotate-success-circular-line 4.25s ease-in; + animation: swal2-rotate-success-circular-line 4.25s ease-in; +} + +.swal2-progress-steps { + flex-wrap: wrap; + align-items: center; + max-width: 100%; + margin: 1.25em auto; + padding: 0; + background: inherit; + font-weight: 600; +} +.swal2-progress-steps li { + display: inline-block; + position: relative; +} +.swal2-progress-steps .swal2-progress-step { + z-index: 20; + flex-shrink: 0; + width: 2em; + height: 2em; + border-radius: 2em; + background: #2778c4; + color: #fff; + line-height: 2em; + text-align: center; +} +.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step { + background: #2778c4; +} +.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step ~ .swal2-progress-step { + background: #add8e6; + color: #fff; +} +.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step ~ .swal2-progress-step-line { + background: #add8e6; +} +.swal2-progress-steps .swal2-progress-step-line { + z-index: 10; + flex-shrink: 0; + width: 2.5em; + height: 0.4em; + margin: 0 -1px; + background: #2778c4; +} + +[class^=swal2] { + -webkit-tap-highlight-color: transparent; +} + +.swal2-show { + -webkit-animation: swal2-show 0.3s; + animation: swal2-show 0.3s; +} + +.swal2-hide { + -webkit-animation: swal2-hide 0.15s forwards; + animation: swal2-hide 0.15s forwards; +} + +.swal2-noanimation { + transition: none; +} + +.swal2-scrollbar-measure { + position: absolute; + top: -9999px; + width: 50px; + height: 50px; + overflow: scroll; +} + +.swal2-rtl .swal2-close { + margin-right: initial; + margin-left: 0; +} +.swal2-rtl .swal2-timer-progress-bar { + right: 0; + left: auto; +} + +@-webkit-keyframes swal2-toast-show { + 0% { + transform: translateY(-0.625em) rotateZ(2deg); + } + 33% { + transform: translateY(0) rotateZ(-2deg); + } + 66% { + transform: translateY(0.3125em) rotateZ(2deg); + } + 100% { + transform: translateY(0) rotateZ(0deg); + } +} + +@keyframes swal2-toast-show { + 0% { + transform: translateY(-0.625em) rotateZ(2deg); + } + 33% { + transform: translateY(0) rotateZ(-2deg); + } + 66% { + transform: translateY(0.3125em) rotateZ(2deg); + } + 100% { + transform: translateY(0) rotateZ(0deg); + } +} +@-webkit-keyframes swal2-toast-hide { + 100% { + transform: rotateZ(1deg); + opacity: 0; + } +} +@keyframes swal2-toast-hide { + 100% { + transform: rotateZ(1deg); + opacity: 0; + } +} +@-webkit-keyframes swal2-toast-animate-success-line-tip { + 0% { + top: 0.5625em; + left: 0.0625em; + width: 0; + } + 54% { + top: 0.125em; + left: 0.125em; + width: 0; + } + 70% { + top: 0.625em; + left: -0.25em; + width: 1.625em; + } + 84% { + top: 1.0625em; + left: 0.75em; + width: 0.5em; + } + 100% { + top: 1.125em; + left: 0.1875em; + width: 0.75em; + } +} +@keyframes swal2-toast-animate-success-line-tip { + 0% { + top: 0.5625em; + left: 0.0625em; + width: 0; + } + 54% { + top: 0.125em; + left: 0.125em; + width: 0; + } + 70% { + top: 0.625em; + left: -0.25em; + width: 1.625em; + } + 84% { + top: 1.0625em; + left: 0.75em; + width: 0.5em; + } + 100% { + top: 1.125em; + left: 0.1875em; + width: 0.75em; + } +} +@-webkit-keyframes swal2-toast-animate-success-line-long { + 0% { + top: 1.625em; + right: 1.375em; + width: 0; + } + 65% { + top: 1.25em; + right: 0.9375em; + width: 0; + } + 84% { + top: 0.9375em; + right: 0; + width: 1.125em; + } + 100% { + top: 0.9375em; + right: 0.1875em; + width: 1.375em; + } +} +@keyframes swal2-toast-animate-success-line-long { + 0% { + top: 1.625em; + right: 1.375em; + width: 0; + } + 65% { + top: 1.25em; + right: 0.9375em; + width: 0; + } + 84% { + top: 0.9375em; + right: 0; + width: 1.125em; + } + 100% { + top: 0.9375em; + right: 0.1875em; + width: 1.375em; + } +} +@-webkit-keyframes swal2-show { + 0% { + transform: scale(0.7); + } + 45% { + transform: scale(1.05); + } + 80% { + transform: scale(0.95); + } + 100% { + transform: scale(1); + } +} +@keyframes swal2-show { + 0% { + transform: scale(0.7); + } + 45% { + transform: scale(1.05); + } + 80% { + transform: scale(0.95); + } + 100% { + transform: scale(1); + } +} +@-webkit-keyframes swal2-hide { + 0% { + transform: scale(1); + opacity: 1; + } + 100% { + transform: scale(0.5); + opacity: 0; + } +} +@keyframes swal2-hide { + 0% { + transform: scale(1); + opacity: 1; + } + 100% { + transform: scale(0.5); + opacity: 0; + } +} +@-webkit-keyframes swal2-animate-success-line-tip { + 0% { + top: 1.1875em; + left: 0.0625em; + width: 0; + } + 54% { + top: 1.0625em; + left: 0.125em; + width: 0; + } + 70% { + top: 2.1875em; + left: -0.375em; + width: 3.125em; + } + 84% { + top: 3em; + left: 1.3125em; + width: 1.0625em; + } + 100% { + top: 2.8125em; + left: 0.8125em; + width: 1.5625em; + } +} +@keyframes swal2-animate-success-line-tip { + 0% { + top: 1.1875em; + left: 0.0625em; + width: 0; + } + 54% { + top: 1.0625em; + left: 0.125em; + width: 0; + } + 70% { + top: 2.1875em; + left: -0.375em; + width: 3.125em; + } + 84% { + top: 3em; + left: 1.3125em; + width: 1.0625em; + } + 100% { + top: 2.8125em; + left: 0.8125em; + width: 1.5625em; + } +} +@-webkit-keyframes swal2-animate-success-line-long { + 0% { + top: 3.375em; + right: 2.875em; + width: 0; + } + 65% { + top: 3.375em; + right: 2.875em; + width: 0; + } + 84% { + top: 2.1875em; + right: 0; + width: 3.4375em; + } + 100% { + top: 2.375em; + right: 0.5em; + width: 2.9375em; + } +} +@keyframes swal2-animate-success-line-long { + 0% { + top: 3.375em; + right: 2.875em; + width: 0; + } + 65% { + top: 3.375em; + right: 2.875em; + width: 0; + } + 84% { + top: 2.1875em; + right: 0; + width: 3.4375em; + } + 100% { + top: 2.375em; + right: 0.5em; + width: 2.9375em; + } +} +@-webkit-keyframes swal2-rotate-success-circular-line { + 0% { + transform: rotate(-45deg); + } + 5% { + transform: rotate(-45deg); + } + 12% { + transform: rotate(-405deg); + } + 100% { + transform: rotate(-405deg); + } +} +@keyframes swal2-rotate-success-circular-line { + 0% { + transform: rotate(-45deg); + } + 5% { + transform: rotate(-45deg); + } + 12% { + transform: rotate(-405deg); + } + 100% { + transform: rotate(-405deg); + } +} +@-webkit-keyframes swal2-animate-error-x-mark { + 0% { + margin-top: 1.625em; + transform: scale(0.4); + opacity: 0; + } + 50% { + margin-top: 1.625em; + transform: scale(0.4); + opacity: 0; + } + 80% { + margin-top: -0.375em; + transform: scale(1.15); + } + 100% { + margin-top: 0; + transform: scale(1); + opacity: 1; + } +} +@keyframes swal2-animate-error-x-mark { + 0% { + margin-top: 1.625em; + transform: scale(0.4); + opacity: 0; + } + 50% { + margin-top: 1.625em; + transform: scale(0.4); + opacity: 0; + } + 80% { + margin-top: -0.375em; + transform: scale(1.15); + } + 100% { + margin-top: 0; + transform: scale(1); + opacity: 1; + } +} +@-webkit-keyframes swal2-animate-error-icon { + 0% { + transform: rotateX(100deg); + opacity: 0; + } + 100% { + transform: rotateX(0deg); + opacity: 1; + } +} +@keyframes swal2-animate-error-icon { + 0% { + transform: rotateX(100deg); + opacity: 0; + } + 100% { + transform: rotateX(0deg); + opacity: 1; + } +} +@-webkit-keyframes swal2-rotate-loading { + 0% { + transform: rotate(0deg); + } + 100% { + transform: rotate(360deg); + } +} +@keyframes swal2-rotate-loading { + 0% { + transform: rotate(0deg); + } + 100% { + transform: rotate(360deg); + } +} +body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) { + overflow: hidden; +} +body.swal2-height-auto { + height: auto !important; +} +body.swal2-no-backdrop .swal2-container { + background-color: transparent !important; + pointer-events: none; +} +body.swal2-no-backdrop .swal2-container .swal2-popup { + pointer-events: all; +} +body.swal2-no-backdrop .swal2-container .swal2-modal { + box-shadow: 0 0 10px rgba(0, 0, 0, 0.4); +} +@media print { + body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) { + overflow-y: scroll !important; + } + body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) > [aria-hidden=true] { + display: none; + } + body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .swal2-container { + position: static !important; + } +} +body.swal2-toast-shown .swal2-container { + box-sizing: border-box; + width: 360px; + max-width: 100%; + background-color: transparent; + pointer-events: none; +} +body.swal2-toast-shown .swal2-container.swal2-top { + top: 0; + right: auto; + bottom: auto; + left: 50%; + transform: translateX(-50%); +} +body.swal2-toast-shown .swal2-container.swal2-top-end, body.swal2-toast-shown .swal2-container.swal2-top-right { + top: 0; + right: 0; + bottom: auto; + left: auto; +} +body.swal2-toast-shown .swal2-container.swal2-top-start, body.swal2-toast-shown .swal2-container.swal2-top-left { + top: 0; + right: auto; + bottom: auto; + left: 0; +} +body.swal2-toast-shown .swal2-container.swal2-center-start, body.swal2-toast-shown .swal2-container.swal2-center-left { + top: 50%; + right: auto; + bottom: auto; + left: 0; + transform: translateY(-50%); +} +body.swal2-toast-shown .swal2-container.swal2-center { + top: 50%; + right: auto; + bottom: auto; + left: 50%; + transform: translate(-50%, -50%); +} +body.swal2-toast-shown .swal2-container.swal2-center-end, body.swal2-toast-shown .swal2-container.swal2-center-right { + top: 50%; + right: 0; + bottom: auto; + left: auto; + transform: translateY(-50%); +} +body.swal2-toast-shown .swal2-container.swal2-bottom-start, body.swal2-toast-shown .swal2-container.swal2-bottom-left { + top: auto; + right: auto; + bottom: 0; + left: 0; +} +body.swal2-toast-shown .swal2-container.swal2-bottom { + top: auto; + right: auto; + bottom: 0; + left: 50%; + transform: translateX(-50%); +} +body.swal2-toast-shown .swal2-container.swal2-bottom-end, body.swal2-toast-shown .swal2-container.swal2-bottom-right { + top: auto; + right: 0; + bottom: 0; + left: auto; +} \ No newline at end of file diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/wwwroot/libs/sweetalert2/sweetalert2.js b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/wwwroot/libs/sweetalert2/sweetalert2.js new file mode 100644 index 0000000000..e9c254f064 --- /dev/null +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/wwwroot/libs/sweetalert2/sweetalert2.js @@ -0,0 +1,3121 @@ +/*! +* sweetalert2 v11.1.5 +* Released under the MIT License. +*/ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : + typeof define === 'function' && define.amd ? define(factory) : + (global = global || self, global.Sweetalert2 = factory()); +}(this, function () { 'use strict'; + + const DismissReason = Object.freeze({ + cancel: 'cancel', + backdrop: 'backdrop', + close: 'close', + esc: 'esc', + timer: 'timer' + }); + + const consolePrefix = 'SweetAlert2:'; + /** + * Filter the unique values into a new array + * @param arr + */ + + const uniqueArray = arr => { + const result = []; + + for (let i = 0; i < arr.length; i++) { + if (result.indexOf(arr[i]) === -1) { + result.push(arr[i]); + } + } + + return result; + }; + /** + * Capitalize the first letter of a string + * @param str + */ + + const capitalizeFirstLetter = str => str.charAt(0).toUpperCase() + str.slice(1); + /** + * Convert NodeList to Array + * @param nodeList + */ + + const toArray = nodeList => Array.prototype.slice.call(nodeList); + /** + * Standardise console warnings + * @param message + */ + + const warn = message => { + console.warn("".concat(consolePrefix, " ").concat(typeof message === 'object' ? message.join(' ') : message)); + }; + /** + * Standardise console errors + * @param message + */ + + const error = message => { + console.error("".concat(consolePrefix, " ").concat(message)); + }; + /** + * Private global state for `warnOnce` + * @type {Array} + * @private + */ + + const previousWarnOnceMessages = []; + /** + * Show a console warning, but only if it hasn't already been shown + * @param message + */ + + const warnOnce = message => { + if (!previousWarnOnceMessages.includes(message)) { + previousWarnOnceMessages.push(message); + warn(message); + } + }; + /** + * Show a one-time console warning about deprecated params/methods + */ + + const warnAboutDeprecation = (deprecatedParam, useInstead) => { + warnOnce("\"".concat(deprecatedParam, "\" is deprecated and will be removed in the next major release. Please use \"").concat(useInstead, "\" instead.")); + }; + /** + * If `arg` is a function, call it (with no arguments or context) and return the result. + * Otherwise, just pass the value through + * @param arg + */ + + const callIfFunction = arg => typeof arg === 'function' ? arg() : arg; + const hasToPromiseFn = arg => arg && typeof arg.toPromise === 'function'; + const asPromise = arg => hasToPromiseFn(arg) ? arg.toPromise() : Promise.resolve(arg); + const isPromise = arg => arg && Promise.resolve(arg) === arg; + + const isJqueryElement = elem => typeof elem === 'object' && elem.jquery; + + const isElement = elem => elem instanceof Element || isJqueryElement(elem); + + const argsToParams = args => { + const params = {}; + + if (typeof args[0] === 'object' && !isElement(args[0])) { + Object.assign(params, args[0]); + } else { + ['title', 'html', 'icon'].forEach((name, index) => { + const arg = args[index]; + + if (typeof arg === 'string' || isElement(arg)) { + params[name] = arg; + } else if (arg !== undefined) { + error("Unexpected type of ".concat(name, "! Expected \"string\" or \"Element\", got ").concat(typeof arg)); + } + }); + } + + return params; + }; + + const swalPrefix = 'swal2-'; + const prefix = items => { + const result = {}; + + for (const i in items) { + result[items[i]] = swalPrefix + items[i]; + } + + return result; + }; + const swalClasses = prefix(['container', 'shown', 'height-auto', 'iosfix', 'popup', 'modal', 'no-backdrop', 'no-transition', 'toast', 'toast-shown', 'show', 'hide', 'close', 'title', 'html-container', 'actions', 'confirm', 'deny', 'cancel', 'default-outline', 'footer', 'icon', 'icon-content', 'image', 'input', 'file', 'range', 'select', 'radio', 'checkbox', 'label', 'textarea', 'inputerror', 'input-label', 'validation-message', 'progress-steps', 'active-progress-step', 'progress-step', 'progress-step-line', 'loader', 'loading', 'styled', 'top', 'top-start', 'top-end', 'top-left', 'top-right', 'center', 'center-start', 'center-end', 'center-left', 'center-right', 'bottom', 'bottom-start', 'bottom-end', 'bottom-left', 'bottom-right', 'grow-row', 'grow-column', 'grow-fullscreen', 'rtl', 'timer-progress-bar', 'timer-progress-bar-container', 'scrollbar-measure', 'icon-success', 'icon-warning', 'icon-info', 'icon-question', 'icon-error']); + const iconTypes = prefix(['success', 'warning', 'info', 'question', 'error']); + + const getContainer = () => document.body.querySelector(".".concat(swalClasses.container)); + const elementBySelector = selectorString => { + const container = getContainer(); + return container ? container.querySelector(selectorString) : null; + }; + + const elementByClass = className => { + return elementBySelector(".".concat(className)); + }; + + const getPopup = () => elementByClass(swalClasses.popup); + const getIcon = () => elementByClass(swalClasses.icon); + const getTitle = () => elementByClass(swalClasses.title); + const getHtmlContainer = () => elementByClass(swalClasses['html-container']); + const getImage = () => elementByClass(swalClasses.image); + const getProgressSteps = () => elementByClass(swalClasses['progress-steps']); + const getValidationMessage = () => elementByClass(swalClasses['validation-message']); + const getConfirmButton = () => elementBySelector(".".concat(swalClasses.actions, " .").concat(swalClasses.confirm)); + const getDenyButton = () => elementBySelector(".".concat(swalClasses.actions, " .").concat(swalClasses.deny)); + const getInputLabel = () => elementByClass(swalClasses['input-label']); + const getLoader = () => elementBySelector(".".concat(swalClasses.loader)); + const getCancelButton = () => elementBySelector(".".concat(swalClasses.actions, " .").concat(swalClasses.cancel)); + const getActions = () => elementByClass(swalClasses.actions); + const getFooter = () => elementByClass(swalClasses.footer); + const getTimerProgressBar = () => elementByClass(swalClasses['timer-progress-bar']); + const getCloseButton = () => elementByClass(swalClasses.close); // https://github.com/jkup/focusable/blob/master/index.js + + const focusable = "\n a[href],\n area[href],\n input:not([disabled]),\n select:not([disabled]),\n textarea:not([disabled]),\n button:not([disabled]),\n iframe,\n object,\n embed,\n [tabindex=\"0\"],\n [contenteditable],\n audio[controls],\n video[controls],\n summary\n"; + const getFocusableElements = () => { + const focusableElementsWithTabindex = toArray(getPopup().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')) // sort according to tabindex + .sort((a, b) => { + a = parseInt(a.getAttribute('tabindex')); + b = parseInt(b.getAttribute('tabindex')); + + if (a > b) { + return 1; + } else if (a < b) { + return -1; + } + + return 0; + }); + const otherFocusableElements = toArray(getPopup().querySelectorAll(focusable)).filter(el => el.getAttribute('tabindex') !== '-1'); + return uniqueArray(focusableElementsWithTabindex.concat(otherFocusableElements)).filter(el => isVisible(el)); + }; + const isModal = () => { + return !isToast() && !document.body.classList.contains(swalClasses['no-backdrop']); + }; + const isToast = () => { + return document.body.classList.contains(swalClasses['toast-shown']); + }; + const isLoading = () => { + return getPopup().hasAttribute('data-loading'); + }; + + const states = { + previousBodyPadding: null + }; + const setInnerHtml = (elem, html) => { + // #1926 + elem.textContent = ''; + + if (html) { + const parser = new DOMParser(); + const parsed = parser.parseFromString(html, "text/html"); + toArray(parsed.querySelector('head').childNodes).forEach(child => { + elem.appendChild(child); + }); + toArray(parsed.querySelector('body').childNodes).forEach(child => { + elem.appendChild(child); + }); + } + }; + const hasClass = (elem, className) => { + if (!className) { + return false; + } + + const classList = className.split(/\s+/); + + for (let i = 0; i < classList.length; i++) { + if (!elem.classList.contains(classList[i])) { + return false; + } + } + + return true; + }; + + const removeCustomClasses = (elem, params) => { + toArray(elem.classList).forEach(className => { + if (!Object.values(swalClasses).includes(className) && !Object.values(iconTypes).includes(className) && !Object.values(params.showClass).includes(className)) { + elem.classList.remove(className); + } + }); + }; + + const applyCustomClass = (elem, params, className) => { + removeCustomClasses(elem, params); + + if (params.customClass && params.customClass[className]) { + if (typeof params.customClass[className] !== 'string' && !params.customClass[className].forEach) { + return warn("Invalid type of customClass.".concat(className, "! Expected string or iterable object, got \"").concat(typeof params.customClass[className], "\"")); + } + + addClass(elem, params.customClass[className]); + } + }; + const getInput = (popup, inputType) => { + if (!inputType) { + return null; + } + + switch (inputType) { + case 'select': + case 'textarea': + case 'file': + return getChildByClass(popup, swalClasses[inputType]); + + case 'checkbox': + return popup.querySelector(".".concat(swalClasses.checkbox, " input")); + + case 'radio': + return popup.querySelector(".".concat(swalClasses.radio, " input:checked")) || popup.querySelector(".".concat(swalClasses.radio, " input:first-child")); + + case 'range': + return popup.querySelector(".".concat(swalClasses.range, " input")); + + default: + return getChildByClass(popup, swalClasses.input); + } + }; + const focusInput = input => { + input.focus(); // place cursor at end of text in text input + + if (input.type !== 'file') { + // http://stackoverflow.com/a/2345915 + const val = input.value; + input.value = ''; + input.value = val; + } + }; + const toggleClass = (target, classList, condition) => { + if (!target || !classList) { + return; + } + + if (typeof classList === 'string') { + classList = classList.split(/\s+/).filter(Boolean); + } + + classList.forEach(className => { + if (target.forEach) { + target.forEach(elem => { + condition ? elem.classList.add(className) : elem.classList.remove(className); + }); + } else { + condition ? target.classList.add(className) : target.classList.remove(className); + } + }); + }; + const addClass = (target, classList) => { + toggleClass(target, classList, true); + }; + const removeClass = (target, classList) => { + toggleClass(target, classList, false); + }; + const getChildByClass = (elem, className) => { + for (let i = 0; i < elem.childNodes.length; i++) { + if (hasClass(elem.childNodes[i], className)) { + return elem.childNodes[i]; + } + } + }; + const applyNumericalStyle = (elem, property, value) => { + if (value === "".concat(parseInt(value))) { + value = parseInt(value); + } + + if (value || parseInt(value) === 0) { + elem.style[property] = typeof value === 'number' ? "".concat(value, "px") : value; + } else { + elem.style.removeProperty(property); + } + }; + const show = (elem, display = 'flex') => { + elem.style.display = display; + }; + const hide = elem => { + elem.style.display = 'none'; + }; + const setStyle = (parent, selector, property, value) => { + const el = parent.querySelector(selector); + + if (el) { + el.style[property] = value; + } + }; + const toggle = (elem, condition, display) => { + condition ? show(elem, display) : hide(elem); + }; // borrowed from jquery $(elem).is(':visible') implementation + + const isVisible = elem => !!(elem && (elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length)); + const allButtonsAreHidden = () => !isVisible(getConfirmButton()) && !isVisible(getDenyButton()) && !isVisible(getCancelButton()); + const isScrollable = elem => !!(elem.scrollHeight > elem.clientHeight); // borrowed from https://stackoverflow.com/a/46352119 + + const hasCssAnimation = elem => { + const style = window.getComputedStyle(elem); + const animDuration = parseFloat(style.getPropertyValue('animation-duration') || '0'); + const transDuration = parseFloat(style.getPropertyValue('transition-duration') || '0'); + return animDuration > 0 || transDuration > 0; + }; + const animateTimerProgressBar = (timer, reset = false) => { + const timerProgressBar = getTimerProgressBar(); + + if (isVisible(timerProgressBar)) { + if (reset) { + timerProgressBar.style.transition = 'none'; + timerProgressBar.style.width = '100%'; + } + + setTimeout(() => { + timerProgressBar.style.transition = "width ".concat(timer / 1000, "s linear"); + timerProgressBar.style.width = '0%'; + }, 10); + } + }; + const stopTimerProgressBar = () => { + const timerProgressBar = getTimerProgressBar(); + const timerProgressBarWidth = parseInt(window.getComputedStyle(timerProgressBar).width); + timerProgressBar.style.removeProperty('transition'); + timerProgressBar.style.width = '100%'; + const timerProgressBarFullWidth = parseInt(window.getComputedStyle(timerProgressBar).width); + const timerProgressBarPercent = parseInt(timerProgressBarWidth / timerProgressBarFullWidth * 100); + timerProgressBar.style.removeProperty('transition'); + timerProgressBar.style.width = "".concat(timerProgressBarPercent, "%"); + }; + + // Detect Node env + const isNodeEnv = () => typeof window === 'undefined' || typeof document === 'undefined'; + + const sweetHTML = "\n
                              \n \n
                                \n
                                \n \n

                                \n
                                \n \n \n
                                \n \n \n
                                \n \n
                                \n \n \n
                                \n
                                \n
                                \n \n \n \n
                                \n
                                \n
                                \n
                                \n
                                \n
                                \n").replace(/(^|\n)\s*/g, ''); + + const resetOldContainer = () => { + const oldContainer = getContainer(); + + if (!oldContainer) { + return false; + } + + oldContainer.remove(); + removeClass([document.documentElement, document.body], [swalClasses['no-backdrop'], swalClasses['toast-shown'], swalClasses['has-column']]); + return true; + }; + + const resetValidationMessage = () => { + if (Swal.isVisible()) { + Swal.resetValidationMessage(); + } + }; + + const addInputChangeListeners = () => { + const popup = getPopup(); + const input = getChildByClass(popup, swalClasses.input); + const file = getChildByClass(popup, swalClasses.file); + const range = popup.querySelector(".".concat(swalClasses.range, " input")); + const rangeOutput = popup.querySelector(".".concat(swalClasses.range, " output")); + const select = getChildByClass(popup, swalClasses.select); + const checkbox = popup.querySelector(".".concat(swalClasses.checkbox, " input")); + const textarea = getChildByClass(popup, swalClasses.textarea); + input.oninput = resetValidationMessage; + file.onchange = resetValidationMessage; + select.onchange = resetValidationMessage; + checkbox.onchange = resetValidationMessage; + textarea.oninput = resetValidationMessage; + + range.oninput = () => { + resetValidationMessage(); + rangeOutput.value = range.value; + }; + + range.onchange = () => { + resetValidationMessage(); + range.nextSibling.value = range.value; + }; + }; + + const getTarget = target => typeof target === 'string' ? document.querySelector(target) : target; + + const setupAccessibility = params => { + const popup = getPopup(); + popup.setAttribute('role', params.toast ? 'alert' : 'dialog'); + popup.setAttribute('aria-live', params.toast ? 'polite' : 'assertive'); + + if (!params.toast) { + popup.setAttribute('aria-modal', 'true'); + } + }; + + const setupRTL = targetElement => { + if (window.getComputedStyle(targetElement).direction === 'rtl') { + addClass(getContainer(), swalClasses.rtl); + } + }; + /* + * Add modal + backdrop to DOM + */ + + + const init = params => { + // Clean up the old popup container if it exists + const oldContainerExisted = resetOldContainer(); + /* istanbul ignore if */ + + if (isNodeEnv()) { + error('SweetAlert2 requires document to initialize'); + return; + } + + const container = document.createElement('div'); + container.className = swalClasses.container; + + if (oldContainerExisted) { + addClass(container, swalClasses['no-transition']); + } + + setInnerHtml(container, sweetHTML); + const targetElement = getTarget(params.target); + targetElement.appendChild(container); + setupAccessibility(params); + setupRTL(targetElement); + addInputChangeListeners(); + }; + + const parseHtmlToContainer = (param, target) => { + // DOM element + if (param instanceof HTMLElement) { + target.appendChild(param); // Object + } else if (typeof param === 'object') { + handleObject(param, target); // Plain string + } else if (param) { + setInnerHtml(target, param); + } + }; + + const handleObject = (param, target) => { + // JQuery element(s) + if (param.jquery) { + handleJqueryElem(target, param); // For other objects use their string representation + } else { + setInnerHtml(target, param.toString()); + } + }; + + const handleJqueryElem = (target, elem) => { + target.textContent = ''; + + if (0 in elem) { + for (let i = 0; (i in elem); i++) { + target.appendChild(elem[i].cloneNode(true)); + } + } else { + target.appendChild(elem.cloneNode(true)); + } + }; + + const animationEndEvent = (() => { + // Prevent run in Node env + + /* istanbul ignore if */ + if (isNodeEnv()) { + return false; + } + + const testEl = document.createElement('div'); + const transEndEventNames = { + WebkitAnimation: 'webkitAnimationEnd', + OAnimation: 'oAnimationEnd oanimationend', + animation: 'animationend' + }; + + for (const i in transEndEventNames) { + if (Object.prototype.hasOwnProperty.call(transEndEventNames, i) && typeof testEl.style[i] !== 'undefined') { + return transEndEventNames[i]; + } + } + + return false; + })(); + + // https://github.com/twbs/bootstrap/blob/master/js/src/modal.js + + const measureScrollbar = () => { + const scrollDiv = document.createElement('div'); + scrollDiv.className = swalClasses['scrollbar-measure']; + document.body.appendChild(scrollDiv); + const scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth; + document.body.removeChild(scrollDiv); + return scrollbarWidth; + }; + + const renderActions = (instance, params) => { + const actions = getActions(); + const loader = getLoader(); + const confirmButton = getConfirmButton(); + const denyButton = getDenyButton(); + const cancelButton = getCancelButton(); // Actions (buttons) wrapper + + if (!params.showConfirmButton && !params.showDenyButton && !params.showCancelButton) { + hide(actions); + } else { + show(actions); + } // Custom class + + + applyCustomClass(actions, params, 'actions'); // Render buttons + + renderButton(confirmButton, 'confirm', params); + renderButton(denyButton, 'deny', params); + renderButton(cancelButton, 'cancel', params); + handleButtonsStyling(confirmButton, denyButton, cancelButton, params); + + if (params.reverseButtons) { + actions.insertBefore(cancelButton, loader); + actions.insertBefore(denyButton, loader); + actions.insertBefore(confirmButton, loader); + } // Loader + + + setInnerHtml(loader, params.loaderHtml); + applyCustomClass(loader, params, 'loader'); + }; + + function handleButtonsStyling(confirmButton, denyButton, cancelButton, params) { + if (!params.buttonsStyling) { + return removeClass([confirmButton, denyButton, cancelButton], swalClasses.styled); + } + + addClass([confirmButton, denyButton, cancelButton], swalClasses.styled); // Buttons background colors + + if (params.confirmButtonColor) { + confirmButton.style.backgroundColor = params.confirmButtonColor; + addClass(confirmButton, swalClasses['default-outline']); + } + + if (params.denyButtonColor) { + denyButton.style.backgroundColor = params.denyButtonColor; + addClass(denyButton, swalClasses['default-outline']); + } + + if (params.cancelButtonColor) { + cancelButton.style.backgroundColor = params.cancelButtonColor; + addClass(cancelButton, swalClasses['default-outline']); + } + } + + function renderButton(button, buttonType, params) { + toggle(button, params["show".concat(capitalizeFirstLetter(buttonType), "Button")], 'inline-block'); + setInnerHtml(button, params["".concat(buttonType, "ButtonText")]); // Set caption text + + button.setAttribute('aria-label', params["".concat(buttonType, "ButtonAriaLabel")]); // ARIA label + // Add buttons custom classes + + button.className = swalClasses[buttonType]; + applyCustomClass(button, params, "".concat(buttonType, "Button")); + addClass(button, params["".concat(buttonType, "ButtonClass")]); + } + + function handleBackdropParam(container, backdrop) { + if (typeof backdrop === 'string') { + container.style.background = backdrop; + } else if (!backdrop) { + addClass([document.documentElement, document.body], swalClasses['no-backdrop']); + } + } + + function handlePositionParam(container, position) { + if (position in swalClasses) { + addClass(container, swalClasses[position]); + } else { + warn('The "position" parameter is not valid, defaulting to "center"'); + addClass(container, swalClasses.center); + } + } + + function handleGrowParam(container, grow) { + if (grow && typeof grow === 'string') { + const growClass = "grow-".concat(grow); + + if (growClass in swalClasses) { + addClass(container, swalClasses[growClass]); + } + } + } + + const renderContainer = (instance, params) => { + const container = getContainer(); + + if (!container) { + return; + } + + handleBackdropParam(container, params.backdrop); + handlePositionParam(container, params.position); + handleGrowParam(container, params.grow); // Custom class + + applyCustomClass(container, params, 'container'); + }; + + /** + * This module containts `WeakMap`s for each effectively-"private property" that a `Swal` has. + * For example, to set the private property "foo" of `this` to "bar", you can `privateProps.foo.set(this, 'bar')` + * This is the approach that Babel will probably take to implement private methods/fields + * https://github.com/tc39/proposal-private-methods + * https://github.com/babel/babel/pull/7555 + * Once we have the changes from that PR in Babel, and our core class fits reasonable in *one module* + * then we can use that language feature. + */ + var privateProps = { + promise: new WeakMap(), + innerParams: new WeakMap(), + domCache: new WeakMap() + }; + + const inputTypes = ['input', 'file', 'range', 'select', 'radio', 'checkbox', 'textarea']; + const renderInput = (instance, params) => { + const popup = getPopup(); + const innerParams = privateProps.innerParams.get(instance); + const rerender = !innerParams || params.input !== innerParams.input; + inputTypes.forEach(inputType => { + const inputClass = swalClasses[inputType]; + const inputContainer = getChildByClass(popup, inputClass); // set attributes + + setAttributes(inputType, params.inputAttributes); // set class + + inputContainer.className = inputClass; + + if (rerender) { + hide(inputContainer); + } + }); + + if (params.input) { + if (rerender) { + showInput(params); + } // set custom class + + + setCustomClass(params); + } + }; + + const showInput = params => { + if (!renderInputType[params.input]) { + return error("Unexpected type of input! Expected \"text\", \"email\", \"password\", \"number\", \"tel\", \"select\", \"radio\", \"checkbox\", \"textarea\", \"file\" or \"url\", got \"".concat(params.input, "\"")); + } + + const inputContainer = getInputContainer(params.input); + const input = renderInputType[params.input](inputContainer, params); + show(input); // input autofocus + + setTimeout(() => { + focusInput(input); + }); + }; + + const removeAttributes = input => { + for (let i = 0; i < input.attributes.length; i++) { + const attrName = input.attributes[i].name; + + if (!['type', 'value', 'style'].includes(attrName)) { + input.removeAttribute(attrName); + } + } + }; + + const setAttributes = (inputType, inputAttributes) => { + const input = getInput(getPopup(), inputType); + + if (!input) { + return; + } + + removeAttributes(input); + + for (const attr in inputAttributes) { + input.setAttribute(attr, inputAttributes[attr]); + } + }; + + const setCustomClass = params => { + const inputContainer = getInputContainer(params.input); + + if (params.customClass) { + addClass(inputContainer, params.customClass.input); + } + }; + + const setInputPlaceholder = (input, params) => { + if (!input.placeholder || params.inputPlaceholder) { + input.placeholder = params.inputPlaceholder; + } + }; + + const setInputLabel = (input, prependTo, params) => { + if (params.inputLabel) { + input.id = swalClasses.input; + const label = document.createElement('label'); + const labelClass = swalClasses['input-label']; + label.setAttribute('for', input.id); + label.className = labelClass; + addClass(label, params.customClass.inputLabel); + label.innerText = params.inputLabel; + prependTo.insertAdjacentElement('beforebegin', label); + } + }; + + const getInputContainer = inputType => { + const inputClass = swalClasses[inputType] ? swalClasses[inputType] : swalClasses.input; + return getChildByClass(getPopup(), inputClass); + }; + + const renderInputType = {}; + + renderInputType.text = renderInputType.email = renderInputType.password = renderInputType.number = renderInputType.tel = renderInputType.url = (input, params) => { + if (typeof params.inputValue === 'string' || typeof params.inputValue === 'number') { + input.value = params.inputValue; + } else if (!isPromise(params.inputValue)) { + warn("Unexpected type of inputValue! Expected \"string\", \"number\" or \"Promise\", got \"".concat(typeof params.inputValue, "\"")); + } + + setInputLabel(input, input, params); + setInputPlaceholder(input, params); + input.type = params.input; + return input; + }; + + renderInputType.file = (input, params) => { + setInputLabel(input, input, params); + setInputPlaceholder(input, params); + return input; + }; + + renderInputType.range = (range, params) => { + const rangeInput = range.querySelector('input'); + const rangeOutput = range.querySelector('output'); + rangeInput.value = params.inputValue; + rangeInput.type = params.input; + rangeOutput.value = params.inputValue; + setInputLabel(rangeInput, range, params); + return range; + }; + + renderInputType.select = (select, params) => { + select.textContent = ''; + + if (params.inputPlaceholder) { + const placeholder = document.createElement('option'); + setInnerHtml(placeholder, params.inputPlaceholder); + placeholder.value = ''; + placeholder.disabled = true; + placeholder.selected = true; + select.appendChild(placeholder); + } + + setInputLabel(select, select, params); + return select; + }; + + renderInputType.radio = radio => { + radio.textContent = ''; + return radio; + }; + + renderInputType.checkbox = (checkboxContainer, params) => { + const checkbox = getInput(getPopup(), 'checkbox'); + checkbox.value = 1; + checkbox.id = swalClasses.checkbox; + checkbox.checked = Boolean(params.inputValue); + const label = checkboxContainer.querySelector('span'); + setInnerHtml(label, params.inputPlaceholder); + return checkboxContainer; + }; + + renderInputType.textarea = (textarea, params) => { + textarea.value = params.inputValue; + setInputPlaceholder(textarea, params); + setInputLabel(textarea, textarea, params); + + const getMargin = el => parseInt(window.getComputedStyle(el).marginLeft) + parseInt(window.getComputedStyle(el).marginRight); + + setTimeout(() => { + // #2291 + if ('MutationObserver' in window) { + // #1699 + const initialPopupWidth = parseInt(window.getComputedStyle(getPopup()).width); + + const textareaResizeHandler = () => { + const textareaWidth = textarea.offsetWidth + getMargin(textarea); + + if (textareaWidth > initialPopupWidth) { + getPopup().style.width = "".concat(textareaWidth, "px"); + } else { + getPopup().style.width = null; + } + }; + + new MutationObserver(textareaResizeHandler).observe(textarea, { + attributes: true, + attributeFilter: ['style'] + }); + } + }); + return textarea; + }; + + const renderContent = (instance, params) => { + const htmlContainer = getHtmlContainer(); + applyCustomClass(htmlContainer, params, 'htmlContainer'); // Content as HTML + + if (params.html) { + parseHtmlToContainer(params.html, htmlContainer); + show(htmlContainer, 'block'); // Content as plain text + } else if (params.text) { + htmlContainer.textContent = params.text; + show(htmlContainer, 'block'); // No content + } else { + hide(htmlContainer); + } + + renderInput(instance, params); + }; + + const renderFooter = (instance, params) => { + const footer = getFooter(); + toggle(footer, params.footer); + + if (params.footer) { + parseHtmlToContainer(params.footer, footer); + } // Custom class + + + applyCustomClass(footer, params, 'footer'); + }; + + const renderCloseButton = (instance, params) => { + const closeButton = getCloseButton(); + setInnerHtml(closeButton, params.closeButtonHtml); // Custom class + + applyCustomClass(closeButton, params, 'closeButton'); + toggle(closeButton, params.showCloseButton); + closeButton.setAttribute('aria-label', params.closeButtonAriaLabel); + }; + + const renderIcon = (instance, params) => { + const innerParams = privateProps.innerParams.get(instance); + const icon = getIcon(); // if the given icon already rendered, apply the styling without re-rendering the icon + + if (innerParams && params.icon === innerParams.icon) { + // Custom or default content + setContent(icon, params); + applyStyles(icon, params); + return; + } + + if (!params.icon && !params.iconHtml) { + return hide(icon); + } + + if (params.icon && Object.keys(iconTypes).indexOf(params.icon) === -1) { + error("Unknown icon! Expected \"success\", \"error\", \"warning\", \"info\" or \"question\", got \"".concat(params.icon, "\"")); + return hide(icon); + } + + show(icon); // Custom or default content + + setContent(icon, params); + applyStyles(icon, params); // Animate icon + + addClass(icon, params.showClass.icon); + }; + + const applyStyles = (icon, params) => { + for (const iconType in iconTypes) { + if (params.icon !== iconType) { + removeClass(icon, iconTypes[iconType]); + } + } + + addClass(icon, iconTypes[params.icon]); // Icon color + + setColor(icon, params); // Success icon background color + + adjustSuccessIconBackgoundColor(); // Custom class + + applyCustomClass(icon, params, 'icon'); + }; // Adjust success icon background color to match the popup background color + + + const adjustSuccessIconBackgoundColor = () => { + const popup = getPopup(); + const popupBackgroundColor = window.getComputedStyle(popup).getPropertyValue('background-color'); + const successIconParts = popup.querySelectorAll('[class^=swal2-success-circular-line], .swal2-success-fix'); + + for (let i = 0; i < successIconParts.length; i++) { + successIconParts[i].style.backgroundColor = popupBackgroundColor; + } + }; + + const setContent = (icon, params) => { + icon.textContent = ''; + + if (params.iconHtml) { + setInnerHtml(icon, iconContent(params.iconHtml)); + } else if (params.icon === 'success') { + setInnerHtml(icon, "\n
                                \n \n
                                \n
                                \n "); + } else if (params.icon === 'error') { + setInnerHtml(icon, "\n \n \n \n \n "); + } else { + const defaultIconHtml = { + question: '?', + warning: '!', + info: 'i' + }; + setInnerHtml(icon, iconContent(defaultIconHtml[params.icon])); + } + }; + + const setColor = (icon, params) => { + if (!params.iconColor) { + return; + } + + icon.style.color = params.iconColor; + icon.style.borderColor = params.iconColor; + + for (const sel of ['.swal2-success-line-tip', '.swal2-success-line-long', '.swal2-x-mark-line-left', '.swal2-x-mark-line-right']) { + setStyle(icon, sel, 'backgroundColor', params.iconColor); + } + + setStyle(icon, '.swal2-success-ring', 'borderColor', params.iconColor); + }; + + const iconContent = content => "
                                ").concat(content, "
                                "); + + const renderImage = (instance, params) => { + const image = getImage(); + + if (!params.imageUrl) { + return hide(image); + } + + show(image, ''); // Src, alt + + image.setAttribute('src', params.imageUrl); + image.setAttribute('alt', params.imageAlt); // Width, height + + applyNumericalStyle(image, 'width', params.imageWidth); + applyNumericalStyle(image, 'height', params.imageHeight); // Class + + image.className = swalClasses.image; + applyCustomClass(image, params, 'image'); + }; + + const createStepElement = step => { + const stepEl = document.createElement('li'); + addClass(stepEl, swalClasses['progress-step']); + setInnerHtml(stepEl, step); + return stepEl; + }; + + const createLineElement = params => { + const lineEl = document.createElement('li'); + addClass(lineEl, swalClasses['progress-step-line']); + + if (params.progressStepsDistance) { + lineEl.style.width = params.progressStepsDistance; + } + + return lineEl; + }; + + const renderProgressSteps = (instance, params) => { + const progressStepsContainer = getProgressSteps(); + + if (!params.progressSteps || params.progressSteps.length === 0) { + return hide(progressStepsContainer); + } + + show(progressStepsContainer); + progressStepsContainer.textContent = ''; + + if (params.currentProgressStep >= params.progressSteps.length) { + warn('Invalid currentProgressStep parameter, it should be less than progressSteps.length ' + '(currentProgressStep like JS arrays starts from 0)'); + } + + params.progressSteps.forEach((step, index) => { + const stepEl = createStepElement(step); + progressStepsContainer.appendChild(stepEl); + + if (index === params.currentProgressStep) { + addClass(stepEl, swalClasses['active-progress-step']); + } + + if (index !== params.progressSteps.length - 1) { + const lineEl = createLineElement(params); + progressStepsContainer.appendChild(lineEl); + } + }); + }; + + const renderTitle = (instance, params) => { + const title = getTitle(); + toggle(title, params.title || params.titleText, 'block'); + + if (params.title) { + parseHtmlToContainer(params.title, title); + } + + if (params.titleText) { + title.innerText = params.titleText; + } // Custom class + + + applyCustomClass(title, params, 'title'); + }; + + const renderPopup = (instance, params) => { + const container = getContainer(); + const popup = getPopup(); // Width + + if (params.toast) { + // #2170 + applyNumericalStyle(container, 'width', params.width); + popup.style.width = '100%'; + popup.insertBefore(getLoader(), getIcon()); + } else { + applyNumericalStyle(popup, 'width', params.width); + } // Padding + + + applyNumericalStyle(popup, 'padding', params.padding); // Background + + if (params.background) { + popup.style.background = params.background; + } + + hide(getValidationMessage()); // Classes + + addClasses(popup, params); + }; + + const addClasses = (popup, params) => { + // Default Class + showClass when updating Swal.update({}) + popup.className = "".concat(swalClasses.popup, " ").concat(isVisible(popup) ? params.showClass.popup : ''); + + if (params.toast) { + addClass([document.documentElement, document.body], swalClasses['toast-shown']); + addClass(popup, swalClasses.toast); + } else { + addClass(popup, swalClasses.modal); + } // Custom class + + + applyCustomClass(popup, params, 'popup'); + + if (typeof params.customClass === 'string') { + addClass(popup, params.customClass); + } // Icon class (#1842) + + + if (params.icon) { + addClass(popup, swalClasses["icon-".concat(params.icon)]); + } + }; + + const render = (instance, params) => { + renderPopup(instance, params); + renderContainer(instance, params); + renderProgressSteps(instance, params); + renderIcon(instance, params); + renderImage(instance, params); + renderTitle(instance, params); + renderCloseButton(instance, params); + renderContent(instance, params); + renderActions(instance, params); + renderFooter(instance, params); + + if (typeof params.didRender === 'function') { + params.didRender(getPopup()); + } + }; + + /* + * Global function to determine if SweetAlert2 popup is shown + */ + + const isVisible$1 = () => { + return isVisible(getPopup()); + }; + /* + * Global function to click 'Confirm' button + */ + + const clickConfirm = () => getConfirmButton() && getConfirmButton().click(); + /* + * Global function to click 'Deny' button + */ + + const clickDeny = () => getDenyButton() && getDenyButton().click(); + /* + * Global function to click 'Cancel' button + */ + + const clickCancel = () => getCancelButton() && getCancelButton().click(); + + function fire(...args) { + const Swal = this; + return new Swal(...args); + } + + /** + * Returns an extended version of `Swal` containing `params` as defaults. + * Useful for reusing Swal configuration. + * + * For example: + * + * Before: + * const textPromptOptions = { input: 'text', showCancelButton: true } + * const {value: firstName} = await Swal.fire({ ...textPromptOptions, title: 'What is your first name?' }) + * const {value: lastName} = await Swal.fire({ ...textPromptOptions, title: 'What is your last name?' }) + * + * After: + * const TextPrompt = Swal.mixin({ input: 'text', showCancelButton: true }) + * const {value: firstName} = await TextPrompt('What is your first name?') + * const {value: lastName} = await TextPrompt('What is your last name?') + * + * @param mixinParams + */ + function mixin(mixinParams) { + class MixinSwal extends this { + _main(params, priorityMixinParams) { + return super._main(params, Object.assign({}, mixinParams, priorityMixinParams)); + } + + } + + return MixinSwal; + } + + /** + * Shows loader (spinner), this is useful with AJAX requests. + * By default the loader be shown instead of the "Confirm" button. + */ + + const showLoading = buttonToReplace => { + let popup = getPopup(); + + if (!popup) { + Swal.fire(); + } + + popup = getPopup(); + const loader = getLoader(); + + if (isToast()) { + hide(getIcon()); + } else { + replaceButton(popup, buttonToReplace); + } + + show(loader); + popup.setAttribute('data-loading', true); + popup.setAttribute('aria-busy', true); + popup.focus(); + }; + + const replaceButton = (popup, buttonToReplace) => { + const actions = getActions(); + const loader = getLoader(); + + if (!buttonToReplace && isVisible(getConfirmButton())) { + buttonToReplace = getConfirmButton(); + } + + show(actions); + + if (buttonToReplace) { + hide(buttonToReplace); + loader.setAttribute('data-button-to-replace', buttonToReplace.className); + } + + loader.parentNode.insertBefore(loader, buttonToReplace); + addClass([popup, actions], swalClasses.loading); + }; + + const RESTORE_FOCUS_TIMEOUT = 100; + + const globalState = {}; + + const focusPreviousActiveElement = () => { + if (globalState.previousActiveElement && globalState.previousActiveElement.focus) { + globalState.previousActiveElement.focus(); + globalState.previousActiveElement = null; + } else if (document.body) { + document.body.focus(); + } + }; // Restore previous active (focused) element + + + const restoreActiveElement = returnFocus => { + return new Promise(resolve => { + if (!returnFocus) { + return resolve(); + } + + const x = window.scrollX; + const y = window.scrollY; + globalState.restoreFocusTimeout = setTimeout(() => { + focusPreviousActiveElement(); + resolve(); + }, RESTORE_FOCUS_TIMEOUT); // issues/900 + + window.scrollTo(x, y); + }); + }; + + /** + * If `timer` parameter is set, returns number of milliseconds of timer remained. + * Otherwise, returns undefined. + */ + + const getTimerLeft = () => { + return globalState.timeout && globalState.timeout.getTimerLeft(); + }; + /** + * Stop timer. Returns number of milliseconds of timer remained. + * If `timer` parameter isn't set, returns undefined. + */ + + const stopTimer = () => { + if (globalState.timeout) { + stopTimerProgressBar(); + return globalState.timeout.stop(); + } + }; + /** + * Resume timer. Returns number of milliseconds of timer remained. + * If `timer` parameter isn't set, returns undefined. + */ + + const resumeTimer = () => { + if (globalState.timeout) { + const remaining = globalState.timeout.start(); + animateTimerProgressBar(remaining); + return remaining; + } + }; + /** + * Resume timer. Returns number of milliseconds of timer remained. + * If `timer` parameter isn't set, returns undefined. + */ + + const toggleTimer = () => { + const timer = globalState.timeout; + return timer && (timer.running ? stopTimer() : resumeTimer()); + }; + /** + * Increase timer. Returns number of milliseconds of an updated timer. + * If `timer` parameter isn't set, returns undefined. + */ + + const increaseTimer = n => { + if (globalState.timeout) { + const remaining = globalState.timeout.increase(n); + animateTimerProgressBar(remaining, true); + return remaining; + } + }; + /** + * Check if timer is running. Returns true if timer is running + * or false if timer is paused or stopped. + * If `timer` parameter isn't set, returns undefined + */ + + const isTimerRunning = () => { + return globalState.timeout && globalState.timeout.isRunning(); + }; + + let bodyClickListenerAdded = false; + const clickHandlers = {}; + function bindClickHandler(attr = 'data-swal-template') { + clickHandlers[attr] = this; + + if (!bodyClickListenerAdded) { + document.body.addEventListener('click', bodyClickListener); + bodyClickListenerAdded = true; + } + } + + const bodyClickListener = event => { + // TODO: replace with event.composedPath() + for (let el = event.target; el && el !== document; el = el.parentNode) { + for (const attr in clickHandlers) { + const template = el.getAttribute(attr); + + if (template) { + clickHandlers[attr].fire({ + template + }); + return; + } + } + } + }; + + const defaultParams = { + title: '', + titleText: '', + text: '', + html: '', + footer: '', + icon: undefined, + iconColor: undefined, + iconHtml: undefined, + template: undefined, + toast: false, + showClass: { + popup: 'swal2-show', + backdrop: 'swal2-backdrop-show', + icon: 'swal2-icon-show' + }, + hideClass: { + popup: 'swal2-hide', + backdrop: 'swal2-backdrop-hide', + icon: 'swal2-icon-hide' + }, + customClass: {}, + target: 'body', + backdrop: true, + heightAuto: true, + allowOutsideClick: true, + allowEscapeKey: true, + allowEnterKey: true, + stopKeydownPropagation: true, + keydownListenerCapture: false, + showConfirmButton: true, + showDenyButton: false, + showCancelButton: false, + preConfirm: undefined, + preDeny: undefined, + confirmButtonText: 'OK', + confirmButtonAriaLabel: '', + confirmButtonColor: undefined, + denyButtonText: 'No', + denyButtonAriaLabel: '', + denyButtonColor: undefined, + cancelButtonText: 'Cancel', + cancelButtonAriaLabel: '', + cancelButtonColor: undefined, + buttonsStyling: true, + reverseButtons: false, + focusConfirm: true, + focusDeny: false, + focusCancel: false, + returnFocus: true, + showCloseButton: false, + closeButtonHtml: '×', + closeButtonAriaLabel: 'Close this dialog', + loaderHtml: '', + showLoaderOnConfirm: false, + showLoaderOnDeny: false, + imageUrl: undefined, + imageWidth: undefined, + imageHeight: undefined, + imageAlt: '', + timer: undefined, + timerProgressBar: false, + width: undefined, + padding: undefined, + background: undefined, + input: undefined, + inputPlaceholder: '', + inputLabel: '', + inputValue: '', + inputOptions: {}, + inputAutoTrim: true, + inputAttributes: {}, + inputValidator: undefined, + returnInputValueOnDeny: false, + validationMessage: undefined, + grow: false, + position: 'center', + progressSteps: [], + currentProgressStep: undefined, + progressStepsDistance: undefined, + willOpen: undefined, + didOpen: undefined, + didRender: undefined, + willClose: undefined, + didClose: undefined, + didDestroy: undefined, + scrollbarPadding: true + }; + const updatableParams = ['allowEscapeKey', 'allowOutsideClick', 'background', 'buttonsStyling', 'cancelButtonAriaLabel', 'cancelButtonColor', 'cancelButtonText', 'closeButtonAriaLabel', 'closeButtonHtml', 'confirmButtonAriaLabel', 'confirmButtonColor', 'confirmButtonText', 'currentProgressStep', 'customClass', 'denyButtonAriaLabel', 'denyButtonColor', 'denyButtonText', 'didClose', 'didDestroy', 'footer', 'hideClass', 'html', 'icon', 'iconColor', 'iconHtml', 'imageAlt', 'imageHeight', 'imageUrl', 'imageWidth', 'preConfirm', 'preDeny', 'progressSteps', 'returnFocus', 'reverseButtons', 'showCancelButton', 'showCloseButton', 'showConfirmButton', 'showDenyButton', 'text', 'title', 'titleText', 'willClose']; + const deprecatedParams = {}; + const toastIncompatibleParams = ['allowOutsideClick', 'allowEnterKey', 'backdrop', 'focusConfirm', 'focusDeny', 'focusCancel', 'returnFocus', 'heightAuto', 'keydownListenerCapture']; + /** + * Is valid parameter + * @param {String} paramName + */ + + const isValidParameter = paramName => { + return Object.prototype.hasOwnProperty.call(defaultParams, paramName); + }; + /** + * Is valid parameter for Swal.update() method + * @param {String} paramName + */ + + const isUpdatableParameter = paramName => { + return updatableParams.indexOf(paramName) !== -1; + }; + /** + * Is deprecated parameter + * @param {String} paramName + */ + + const isDeprecatedParameter = paramName => { + return deprecatedParams[paramName]; + }; + + const checkIfParamIsValid = param => { + if (!isValidParameter(param)) { + warn("Unknown parameter \"".concat(param, "\"")); + } + }; + + const checkIfToastParamIsValid = param => { + if (toastIncompatibleParams.includes(param)) { + warn("The parameter \"".concat(param, "\" is incompatible with toasts")); + } + }; + + const checkIfParamIsDeprecated = param => { + if (isDeprecatedParameter(param)) { + warnAboutDeprecation(param, isDeprecatedParameter(param)); + } + }; + /** + * Show relevant warnings for given params + * + * @param params + */ + + + const showWarningsForParams = params => { + if (!params.backdrop && params.allowOutsideClick) { + warn('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`'); + } + + for (const param in params) { + checkIfParamIsValid(param); + + if (params.toast) { + checkIfToastParamIsValid(param); + } + + checkIfParamIsDeprecated(param); + } + }; + + + + var staticMethods = /*#__PURE__*/Object.freeze({ + isValidParameter: isValidParameter, + isUpdatableParameter: isUpdatableParameter, + isDeprecatedParameter: isDeprecatedParameter, + argsToParams: argsToParams, + isVisible: isVisible$1, + clickConfirm: clickConfirm, + clickDeny: clickDeny, + clickCancel: clickCancel, + getContainer: getContainer, + getPopup: getPopup, + getTitle: getTitle, + getHtmlContainer: getHtmlContainer, + getImage: getImage, + getIcon: getIcon, + getInputLabel: getInputLabel, + getCloseButton: getCloseButton, + getActions: getActions, + getConfirmButton: getConfirmButton, + getDenyButton: getDenyButton, + getCancelButton: getCancelButton, + getLoader: getLoader, + getFooter: getFooter, + getTimerProgressBar: getTimerProgressBar, + getFocusableElements: getFocusableElements, + getValidationMessage: getValidationMessage, + isLoading: isLoading, + fire: fire, + mixin: mixin, + showLoading: showLoading, + enableLoading: showLoading, + getTimerLeft: getTimerLeft, + stopTimer: stopTimer, + resumeTimer: resumeTimer, + toggleTimer: toggleTimer, + increaseTimer: increaseTimer, + isTimerRunning: isTimerRunning, + bindClickHandler: bindClickHandler + }); + + /** + * Hides loader and shows back the button which was hidden by .showLoading() + */ + + function hideLoading() { + // do nothing if popup is closed + const innerParams = privateProps.innerParams.get(this); + + if (!innerParams) { + return; + } + + const domCache = privateProps.domCache.get(this); + hide(domCache.loader); + + if (isToast()) { + if (innerParams.icon) { + show(getIcon()); + } + } else { + showRelatedButton(domCache); + } + + removeClass([domCache.popup, domCache.actions], swalClasses.loading); + domCache.popup.removeAttribute('aria-busy'); + domCache.popup.removeAttribute('data-loading'); + domCache.confirmButton.disabled = false; + domCache.denyButton.disabled = false; + domCache.cancelButton.disabled = false; + } + + const showRelatedButton = domCache => { + const buttonToReplace = domCache.popup.getElementsByClassName(domCache.loader.getAttribute('data-button-to-replace')); + + if (buttonToReplace.length) { + show(buttonToReplace[0], 'inline-block'); + } else if (allButtonsAreHidden()) { + hide(domCache.actions); + } + }; + + function getInput$1(instance) { + const innerParams = privateProps.innerParams.get(instance || this); + const domCache = privateProps.domCache.get(instance || this); + + if (!domCache) { + return null; + } + + return getInput(domCache.popup, innerParams.input); + } + + const fixScrollbar = () => { + // for queues, do not do this more than once + if (states.previousBodyPadding !== null) { + return; + } // if the body has overflow + + + if (document.body.scrollHeight > window.innerHeight) { + // add padding so the content doesn't shift after removal of scrollbar + states.previousBodyPadding = parseInt(window.getComputedStyle(document.body).getPropertyValue('padding-right')); + document.body.style.paddingRight = "".concat(states.previousBodyPadding + measureScrollbar(), "px"); + } + }; + const undoScrollbar = () => { + if (states.previousBodyPadding !== null) { + document.body.style.paddingRight = "".concat(states.previousBodyPadding, "px"); + states.previousBodyPadding = null; + } + }; + + /* istanbul ignore file */ + + const iOSfix = () => { + const iOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream || navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1; + + if (iOS && !hasClass(document.body, swalClasses.iosfix)) { + const offset = document.body.scrollTop; + document.body.style.top = "".concat(offset * -1, "px"); + addClass(document.body, swalClasses.iosfix); + lockBodyScroll(); + addBottomPaddingForTallPopups(); // #1948 + } + }; + + const addBottomPaddingForTallPopups = () => { + const safari = !navigator.userAgent.match(/(CriOS|FxiOS|EdgiOS|YaBrowser|UCBrowser)/i); + + if (safari) { + const bottomPanelHeight = 44; + + if (getPopup().scrollHeight > window.innerHeight - bottomPanelHeight) { + getContainer().style.paddingBottom = "".concat(bottomPanelHeight, "px"); + } + } + }; + + const lockBodyScroll = () => { + // #1246 + const container = getContainer(); + let preventTouchMove; + + container.ontouchstart = e => { + preventTouchMove = shouldPreventTouchMove(e); + }; + + container.ontouchmove = e => { + if (preventTouchMove) { + e.preventDefault(); + e.stopPropagation(); + } + }; + }; + + const shouldPreventTouchMove = event => { + const target = event.target; + const container = getContainer(); + + if (isStylys(event) || isZoom(event)) { + return false; + } + + if (target === container) { + return true; + } + + if (!isScrollable(container) && target.tagName !== 'INPUT' && // #1603 + target.tagName !== 'TEXTAREA' && // #2266 + !(isScrollable(getHtmlContainer()) && // #1944 + getHtmlContainer().contains(target))) { + return true; + } + + return false; + }; + + const isStylys = event => { + // #1786 + return event.touches && event.touches.length && event.touches[0].touchType === 'stylus'; + }; + + const isZoom = event => { + // #1891 + return event.touches && event.touches.length > 1; + }; + + const undoIOSfix = () => { + if (hasClass(document.body, swalClasses.iosfix)) { + const offset = parseInt(document.body.style.top, 10); + removeClass(document.body, swalClasses.iosfix); + document.body.style.top = ''; + document.body.scrollTop = offset * -1; + } + }; + + // Adding aria-hidden="true" to elements outside of the active modal dialog ensures that + // elements not within the active modal dialog will not be surfaced if a user opens a screen + // reader’s list of elements (headings, form controls, landmarks, etc.) in the document. + + const setAriaHidden = () => { + const bodyChildren = toArray(document.body.children); + bodyChildren.forEach(el => { + if (el === getContainer() || el.contains(getContainer())) { + return; + } + + if (el.hasAttribute('aria-hidden')) { + el.setAttribute('data-previous-aria-hidden', el.getAttribute('aria-hidden')); + } + + el.setAttribute('aria-hidden', 'true'); + }); + }; + const unsetAriaHidden = () => { + const bodyChildren = toArray(document.body.children); + bodyChildren.forEach(el => { + if (el.hasAttribute('data-previous-aria-hidden')) { + el.setAttribute('aria-hidden', el.getAttribute('data-previous-aria-hidden')); + el.removeAttribute('data-previous-aria-hidden'); + } else { + el.removeAttribute('aria-hidden'); + } + }); + }; + + /** + * This module containts `WeakMap`s for each effectively-"private property" that a `Swal` has. + * For example, to set the private property "foo" of `this` to "bar", you can `privateProps.foo.set(this, 'bar')` + * This is the approach that Babel will probably take to implement private methods/fields + * https://github.com/tc39/proposal-private-methods + * https://github.com/babel/babel/pull/7555 + * Once we have the changes from that PR in Babel, and our core class fits reasonable in *one module* + * then we can use that language feature. + */ + var privateMethods = { + swalPromiseResolve: new WeakMap() + }; + + /* + * Instance method to close sweetAlert + */ + + function removePopupAndResetState(instance, container, returnFocus, didClose) { + if (isToast()) { + triggerDidCloseAndDispose(instance, didClose); + } else { + restoreActiveElement(returnFocus).then(() => triggerDidCloseAndDispose(instance, didClose)); + globalState.keydownTarget.removeEventListener('keydown', globalState.keydownHandler, { + capture: globalState.keydownListenerCapture + }); + globalState.keydownHandlerAdded = false; + } + + const isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent); // workaround for #2088 + // for some reason removing the container in Safari will scroll the document to bottom + + if (isSafari) { + container.setAttribute('style', 'display:none !important'); + container.removeAttribute('class'); + container.innerHTML = ''; + } else { + container.remove(); + } + + if (isModal()) { + undoScrollbar(); + undoIOSfix(); + unsetAriaHidden(); + } + + removeBodyClasses(); + } + + function removeBodyClasses() { + removeClass([document.documentElement, document.body], [swalClasses.shown, swalClasses['height-auto'], swalClasses['no-backdrop'], swalClasses['toast-shown']]); + } + + function close(resolveValue) { + const popup = getPopup(); + + if (!popup) { + return; + } + + resolveValue = prepareResolveValue(resolveValue); + const innerParams = privateProps.innerParams.get(this); + + if (!innerParams || hasClass(popup, innerParams.hideClass.popup)) { + return; + } + + const swalPromiseResolve = privateMethods.swalPromiseResolve.get(this); + removeClass(popup, innerParams.showClass.popup); + addClass(popup, innerParams.hideClass.popup); + const backdrop = getContainer(); + removeClass(backdrop, innerParams.showClass.backdrop); + addClass(backdrop, innerParams.hideClass.backdrop); + handlePopupAnimation(this, popup, innerParams); // Resolve Swal promise + + swalPromiseResolve(resolveValue); + } + + const prepareResolveValue = resolveValue => { + // When user calls Swal.close() + if (typeof resolveValue === 'undefined') { + return { + isConfirmed: false, + isDenied: false, + isDismissed: true + }; + } + + return Object.assign({ + isConfirmed: false, + isDenied: false, + isDismissed: false + }, resolveValue); + }; + + const handlePopupAnimation = (instance, popup, innerParams) => { + const container = getContainer(); // If animation is supported, animate + + const animationIsSupported = animationEndEvent && hasCssAnimation(popup); + + if (typeof innerParams.willClose === 'function') { + innerParams.willClose(popup); + } + + if (animationIsSupported) { + animatePopup(instance, popup, container, innerParams.returnFocus, innerParams.didClose); + } else { + // Otherwise, remove immediately + removePopupAndResetState(instance, container, innerParams.returnFocus, innerParams.didClose); + } + }; + + const animatePopup = (instance, popup, container, returnFocus, didClose) => { + globalState.swalCloseEventFinishedCallback = removePopupAndResetState.bind(null, instance, container, returnFocus, didClose); + popup.addEventListener(animationEndEvent, function (e) { + if (e.target === popup) { + globalState.swalCloseEventFinishedCallback(); + delete globalState.swalCloseEventFinishedCallback; + } + }); + }; + + const triggerDidCloseAndDispose = (instance, didClose) => { + setTimeout(() => { + if (typeof didClose === 'function') { + didClose.bind(instance.params)(); + } + + instance._destroy(); + }); + }; + + function setButtonsDisabled(instance, buttons, disabled) { + const domCache = privateProps.domCache.get(instance); + buttons.forEach(button => { + domCache[button].disabled = disabled; + }); + } + + function setInputDisabled(input, disabled) { + if (!input) { + return false; + } + + if (input.type === 'radio') { + const radiosContainer = input.parentNode.parentNode; + const radios = radiosContainer.querySelectorAll('input'); + + for (let i = 0; i < radios.length; i++) { + radios[i].disabled = disabled; + } + } else { + input.disabled = disabled; + } + } + + function enableButtons() { + setButtonsDisabled(this, ['confirmButton', 'denyButton', 'cancelButton'], false); + } + function disableButtons() { + setButtonsDisabled(this, ['confirmButton', 'denyButton', 'cancelButton'], true); + } + function enableInput() { + return setInputDisabled(this.getInput(), false); + } + function disableInput() { + return setInputDisabled(this.getInput(), true); + } + + function showValidationMessage(error) { + const domCache = privateProps.domCache.get(this); + const params = privateProps.innerParams.get(this); + setInnerHtml(domCache.validationMessage, error); + domCache.validationMessage.className = swalClasses['validation-message']; + + if (params.customClass && params.customClass.validationMessage) { + addClass(domCache.validationMessage, params.customClass.validationMessage); + } + + show(domCache.validationMessage); + const input = this.getInput(); + + if (input) { + input.setAttribute('aria-invalid', true); + input.setAttribute('aria-describedby', swalClasses['validation-message']); + focusInput(input); + addClass(input, swalClasses.inputerror); + } + } // Hide block with validation message + + function resetValidationMessage$1() { + const domCache = privateProps.domCache.get(this); + + if (domCache.validationMessage) { + hide(domCache.validationMessage); + } + + const input = this.getInput(); + + if (input) { + input.removeAttribute('aria-invalid'); + input.removeAttribute('aria-describedby'); + removeClass(input, swalClasses.inputerror); + } + } + + function getProgressSteps$1() { + const domCache = privateProps.domCache.get(this); + return domCache.progressSteps; + } + + class Timer { + constructor(callback, delay) { + this.callback = callback; + this.remaining = delay; + this.running = false; + this.start(); + } + + start() { + if (!this.running) { + this.running = true; + this.started = new Date(); + this.id = setTimeout(this.callback, this.remaining); + } + + return this.remaining; + } + + stop() { + if (this.running) { + this.running = false; + clearTimeout(this.id); + this.remaining -= new Date() - this.started; + } + + return this.remaining; + } + + increase(n) { + const running = this.running; + + if (running) { + this.stop(); + } + + this.remaining += n; + + if (running) { + this.start(); + } + + return this.remaining; + } + + getTimerLeft() { + if (this.running) { + this.stop(); + this.start(); + } + + return this.remaining; + } + + isRunning() { + return this.running; + } + + } + + var defaultInputValidators = { + email: (string, validationMessage) => { + return /^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]{2,24}$/.test(string) ? Promise.resolve() : Promise.resolve(validationMessage || 'Invalid email address'); + }, + url: (string, validationMessage) => { + // taken from https://stackoverflow.com/a/3809435 with a small change from #1306 and #2013 + return /^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(string) ? Promise.resolve() : Promise.resolve(validationMessage || 'Invalid URL'); + } + }; + + function setDefaultInputValidators(params) { + // Use default `inputValidator` for supported input types if not provided + if (!params.inputValidator) { + Object.keys(defaultInputValidators).forEach(key => { + if (params.input === key) { + params.inputValidator = defaultInputValidators[key]; + } + }); + } + } + + function validateCustomTargetElement(params) { + // Determine if the custom target element is valid + if (!params.target || typeof params.target === 'string' && !document.querySelector(params.target) || typeof params.target !== 'string' && !params.target.appendChild) { + warn('Target parameter is not valid, defaulting to "body"'); + params.target = 'body'; + } + } + /** + * Set type, text and actions on popup + * + * @param params + * @returns {boolean} + */ + + + function setParameters(params) { + setDefaultInputValidators(params); // showLoaderOnConfirm && preConfirm + + if (params.showLoaderOnConfirm && !params.preConfirm) { + warn('showLoaderOnConfirm is set to true, but preConfirm is not defined.\n' + 'showLoaderOnConfirm should be used together with preConfirm, see usage example:\n' + 'https://sweetalert2.github.io/#ajax-request'); + } + + validateCustomTargetElement(params); // Replace newlines with
                                in title + + if (typeof params.title === 'string') { + params.title = params.title.split('\n').join('
                                '); + } + + init(params); + } + + const swalStringParams = ['swal-title', 'swal-html', 'swal-footer']; + const getTemplateParams = params => { + const template = typeof params.template === 'string' ? document.querySelector(params.template) : params.template; + + if (!template) { + return {}; + } + + const templateContent = template.content; + showWarningsForElements(templateContent); + const result = Object.assign(getSwalParams(templateContent), getSwalButtons(templateContent), getSwalImage(templateContent), getSwalIcon(templateContent), getSwalInput(templateContent), getSwalStringParams(templateContent, swalStringParams)); + return result; + }; + + const getSwalParams = templateContent => { + const result = {}; + toArray(templateContent.querySelectorAll('swal-param')).forEach(param => { + showWarningsForAttributes(param, ['name', 'value']); + const paramName = param.getAttribute('name'); + let value = param.getAttribute('value'); + + if (typeof defaultParams[paramName] === 'boolean' && value === 'false') { + value = false; + } + + if (typeof defaultParams[paramName] === 'object') { + value = JSON.parse(value); + } + + result[paramName] = value; + }); + return result; + }; + + const getSwalButtons = templateContent => { + const result = {}; + toArray(templateContent.querySelectorAll('swal-button')).forEach(button => { + showWarningsForAttributes(button, ['type', 'color', 'aria-label']); + const type = button.getAttribute('type'); + result["".concat(type, "ButtonText")] = button.innerHTML; + result["show".concat(capitalizeFirstLetter(type), "Button")] = true; + + if (button.hasAttribute('color')) { + result["".concat(type, "ButtonColor")] = button.getAttribute('color'); + } + + if (button.hasAttribute('aria-label')) { + result["".concat(type, "ButtonAriaLabel")] = button.getAttribute('aria-label'); + } + }); + return result; + }; + + const getSwalImage = templateContent => { + const result = {}; + const image = templateContent.querySelector('swal-image'); + + if (image) { + showWarningsForAttributes(image, ['src', 'width', 'height', 'alt']); + + if (image.hasAttribute('src')) { + result.imageUrl = image.getAttribute('src'); + } + + if (image.hasAttribute('width')) { + result.imageWidth = image.getAttribute('width'); + } + + if (image.hasAttribute('height')) { + result.imageHeight = image.getAttribute('height'); + } + + if (image.hasAttribute('alt')) { + result.imageAlt = image.getAttribute('alt'); + } + } + + return result; + }; + + const getSwalIcon = templateContent => { + const result = {}; + const icon = templateContent.querySelector('swal-icon'); + + if (icon) { + showWarningsForAttributes(icon, ['type', 'color']); + + if (icon.hasAttribute('type')) { + result.icon = icon.getAttribute('type'); + } + + if (icon.hasAttribute('color')) { + result.iconColor = icon.getAttribute('color'); + } + + result.iconHtml = icon.innerHTML; + } + + return result; + }; + + const getSwalInput = templateContent => { + const result = {}; + const input = templateContent.querySelector('swal-input'); + + if (input) { + showWarningsForAttributes(input, ['type', 'label', 'placeholder', 'value']); + result.input = input.getAttribute('type') || 'text'; + + if (input.hasAttribute('label')) { + result.inputLabel = input.getAttribute('label'); + } + + if (input.hasAttribute('placeholder')) { + result.inputPlaceholder = input.getAttribute('placeholder'); + } + + if (input.hasAttribute('value')) { + result.inputValue = input.getAttribute('value'); + } + } + + const inputOptions = templateContent.querySelectorAll('swal-input-option'); + + if (inputOptions.length) { + result.inputOptions = {}; + toArray(inputOptions).forEach(option => { + showWarningsForAttributes(option, ['value']); + const optionValue = option.getAttribute('value'); + const optionName = option.innerHTML; + result.inputOptions[optionValue] = optionName; + }); + } + + return result; + }; + + const getSwalStringParams = (templateContent, paramNames) => { + const result = {}; + + for (const i in paramNames) { + const paramName = paramNames[i]; + const tag = templateContent.querySelector(paramName); + + if (tag) { + showWarningsForAttributes(tag, []); + result[paramName.replace(/^swal-/, '')] = tag.innerHTML.trim(); + } + } + + return result; + }; + + const showWarningsForElements = template => { + const allowedElements = swalStringParams.concat(['swal-param', 'swal-button', 'swal-image', 'swal-icon', 'swal-input', 'swal-input-option']); + toArray(template.children).forEach(el => { + const tagName = el.tagName.toLowerCase(); + + if (allowedElements.indexOf(tagName) === -1) { + warn("Unrecognized element <".concat(tagName, ">")); + } + }); + }; + + const showWarningsForAttributes = (el, allowedAttributes) => { + toArray(el.attributes).forEach(attribute => { + if (allowedAttributes.indexOf(attribute.name) === -1) { + warn(["Unrecognized attribute \"".concat(attribute.name, "\" on <").concat(el.tagName.toLowerCase(), ">."), "".concat(allowedAttributes.length ? "Allowed attributes are: ".concat(allowedAttributes.join(', ')) : 'To set the value, use HTML within the element.')]); + } + }); + }; + + const SHOW_CLASS_TIMEOUT = 10; + /** + * Open popup, add necessary classes and styles, fix scrollbar + * + * @param params + */ + + const openPopup = params => { + const container = getContainer(); + const popup = getPopup(); + + if (typeof params.willOpen === 'function') { + params.willOpen(popup); + } + + const bodyStyles = window.getComputedStyle(document.body); + const initialBodyOverflow = bodyStyles.overflowY; + addClasses$1(container, popup, params); // scrolling is 'hidden' until animation is done, after that 'auto' + + setTimeout(() => { + setScrollingVisibility(container, popup); + }, SHOW_CLASS_TIMEOUT); + + if (isModal()) { + fixScrollContainer(container, params.scrollbarPadding, initialBodyOverflow); + setAriaHidden(); + } + + if (!isToast() && !globalState.previousActiveElement) { + globalState.previousActiveElement = document.activeElement; + } + + if (typeof params.didOpen === 'function') { + setTimeout(() => params.didOpen(popup)); + } + + removeClass(container, swalClasses['no-transition']); + }; + + const swalOpenAnimationFinished = event => { + const popup = getPopup(); + + if (event.target !== popup) { + return; + } + + const container = getContainer(); + popup.removeEventListener(animationEndEvent, swalOpenAnimationFinished); + container.style.overflowY = 'auto'; + }; + + const setScrollingVisibility = (container, popup) => { + if (animationEndEvent && hasCssAnimation(popup)) { + container.style.overflowY = 'hidden'; + popup.addEventListener(animationEndEvent, swalOpenAnimationFinished); + } else { + container.style.overflowY = 'auto'; + } + }; + + const fixScrollContainer = (container, scrollbarPadding, initialBodyOverflow) => { + iOSfix(); + + if (scrollbarPadding && initialBodyOverflow !== 'hidden') { + fixScrollbar(); + } // sweetalert2/issues/1247 + + + setTimeout(() => { + container.scrollTop = 0; + }); + }; + + const addClasses$1 = (container, popup, params) => { + addClass(container, params.showClass.backdrop); // the workaround with setting/unsetting opacity is needed for #2019 and 2059 + + popup.style.setProperty('opacity', '0', 'important'); + show(popup, 'grid'); + setTimeout(() => { + // Animate popup right after showing it + addClass(popup, params.showClass.popup); // and remove the opacity workaround + + popup.style.removeProperty('opacity'); + }, SHOW_CLASS_TIMEOUT); // 10ms in order to fix #2062 + + addClass([document.documentElement, document.body], swalClasses.shown); + + if (params.heightAuto && params.backdrop && !params.toast) { + addClass([document.documentElement, document.body], swalClasses['height-auto']); + } + }; + + const handleInputOptionsAndValue = (instance, params) => { + if (params.input === 'select' || params.input === 'radio') { + handleInputOptions(instance, params); + } else if (['text', 'email', 'number', 'tel', 'textarea'].includes(params.input) && (hasToPromiseFn(params.inputValue) || isPromise(params.inputValue))) { + showLoading(getConfirmButton()); + handleInputValue(instance, params); + } + }; + const getInputValue = (instance, innerParams) => { + const input = instance.getInput(); + + if (!input) { + return null; + } + + switch (innerParams.input) { + case 'checkbox': + return getCheckboxValue(input); + + case 'radio': + return getRadioValue(input); + + case 'file': + return getFileValue(input); + + default: + return innerParams.inputAutoTrim ? input.value.trim() : input.value; + } + }; + + const getCheckboxValue = input => input.checked ? 1 : 0; + + const getRadioValue = input => input.checked ? input.value : null; + + const getFileValue = input => input.files.length ? input.getAttribute('multiple') !== null ? input.files : input.files[0] : null; + + const handleInputOptions = (instance, params) => { + const popup = getPopup(); + + const processInputOptions = inputOptions => populateInputOptions[params.input](popup, formatInputOptions(inputOptions), params); + + if (hasToPromiseFn(params.inputOptions) || isPromise(params.inputOptions)) { + showLoading(getConfirmButton()); + asPromise(params.inputOptions).then(inputOptions => { + instance.hideLoading(); + processInputOptions(inputOptions); + }); + } else if (typeof params.inputOptions === 'object') { + processInputOptions(params.inputOptions); + } else { + error("Unexpected type of inputOptions! Expected object, Map or Promise, got ".concat(typeof params.inputOptions)); + } + }; + + const handleInputValue = (instance, params) => { + const input = instance.getInput(); + hide(input); + asPromise(params.inputValue).then(inputValue => { + input.value = params.input === 'number' ? parseFloat(inputValue) || 0 : "".concat(inputValue); + show(input); + input.focus(); + instance.hideLoading(); + }).catch(err => { + error("Error in inputValue promise: ".concat(err)); + input.value = ''; + show(input); + input.focus(); + instance.hideLoading(); + }); + }; + + const populateInputOptions = { + select: (popup, inputOptions, params) => { + const select = getChildByClass(popup, swalClasses.select); + + const renderOption = (parent, optionLabel, optionValue) => { + const option = document.createElement('option'); + option.value = optionValue; + setInnerHtml(option, optionLabel); + option.selected = isSelected(optionValue, params.inputValue); + parent.appendChild(option); + }; + + inputOptions.forEach(inputOption => { + const optionValue = inputOption[0]; + const optionLabel = inputOption[1]; // spec: + // https://www.w3.org/TR/html401/interact/forms.html#h-17.6 + // "...all OPTGROUP elements must be specified directly within a SELECT element (i.e., groups may not be nested)..." + // check whether this is a + + if (Array.isArray(optionLabel)) { + // if it is an array, then it is an + const optgroup = document.createElement('optgroup'); + optgroup.label = optionValue; + optgroup.disabled = false; // not configurable for now + + select.appendChild(optgroup); + optionLabel.forEach(o => renderOption(optgroup, o[1], o[0])); + } else { + // case of + valueFormatted = formatInputOptions(valueFormatted); + } + + result.push([key, valueFormatted]); + }); + } else { + Object.keys(inputOptions).forEach(key => { + let valueFormatted = inputOptions[key]; + + if (typeof valueFormatted === 'object') { + // case of + valueFormatted = formatInputOptions(valueFormatted); + } + + result.push([key, valueFormatted]); + }); + } + + return result; + }; + + const isSelected = (optionValue, inputValue) => { + return inputValue && inputValue.toString() === optionValue.toString(); + }; + + const handleConfirmButtonClick = instance => { + const innerParams = privateProps.innerParams.get(instance); + instance.disableButtons(); + + if (innerParams.input) { + handleConfirmOrDenyWithInput(instance, 'confirm'); + } else { + confirm(instance, true); + } + }; + const handleDenyButtonClick = instance => { + const innerParams = privateProps.innerParams.get(instance); + instance.disableButtons(); + + if (innerParams.returnInputValueOnDeny) { + handleConfirmOrDenyWithInput(instance, 'deny'); + } else { + deny(instance, false); + } + }; + const handleCancelButtonClick = (instance, dismissWith) => { + instance.disableButtons(); + dismissWith(DismissReason.cancel); + }; + + const handleConfirmOrDenyWithInput = (instance, type + /* 'confirm' | 'deny' */ + ) => { + const innerParams = privateProps.innerParams.get(instance); + const inputValue = getInputValue(instance, innerParams); + + if (innerParams.inputValidator) { + handleInputValidator(instance, inputValue, type); + } else if (!instance.getInput().checkValidity()) { + instance.enableButtons(); + instance.showValidationMessage(innerParams.validationMessage); + } else if (type === 'deny') { + deny(instance, inputValue); + } else { + confirm(instance, inputValue); + } + }; + + const handleInputValidator = (instance, inputValue, type + /* 'confirm' | 'deny' */ + ) => { + const innerParams = privateProps.innerParams.get(instance); + instance.disableInput(); + const validationPromise = Promise.resolve().then(() => asPromise(innerParams.inputValidator(inputValue, innerParams.validationMessage))); + validationPromise.then(validationMessage => { + instance.enableButtons(); + instance.enableInput(); + + if (validationMessage) { + instance.showValidationMessage(validationMessage); + } else if (type === 'deny') { + deny(instance, inputValue); + } else { + confirm(instance, inputValue); + } + }); + }; + + const deny = (instance, value) => { + const innerParams = privateProps.innerParams.get(instance || undefined); + + if (innerParams.showLoaderOnDeny) { + showLoading(getDenyButton()); + } + + if (innerParams.preDeny) { + const preDenyPromise = Promise.resolve().then(() => asPromise(innerParams.preDeny(value, innerParams.validationMessage))); + preDenyPromise.then(preDenyValue => { + if (preDenyValue === false) { + instance.hideLoading(); + } else { + instance.closePopup({ + isDenied: true, + value: typeof preDenyValue === 'undefined' ? value : preDenyValue + }); + } + }); + } else { + instance.closePopup({ + isDenied: true, + value + }); + } + }; + + const succeedWith = (instance, value) => { + instance.closePopup({ + isConfirmed: true, + value + }); + }; + + const confirm = (instance, value) => { + const innerParams = privateProps.innerParams.get(instance || undefined); + + if (innerParams.showLoaderOnConfirm) { + showLoading(); // TODO: make showLoading an *instance* method + } + + if (innerParams.preConfirm) { + instance.resetValidationMessage(); + const preConfirmPromise = Promise.resolve().then(() => asPromise(innerParams.preConfirm(value, innerParams.validationMessage))); + preConfirmPromise.then(preConfirmValue => { + if (isVisible(getValidationMessage()) || preConfirmValue === false) { + instance.hideLoading(); + } else { + succeedWith(instance, typeof preConfirmValue === 'undefined' ? value : preConfirmValue); + } + }); + } else { + succeedWith(instance, value); + } + }; + + const addKeydownHandler = (instance, globalState, innerParams, dismissWith) => { + if (globalState.keydownTarget && globalState.keydownHandlerAdded) { + globalState.keydownTarget.removeEventListener('keydown', globalState.keydownHandler, { + capture: globalState.keydownListenerCapture + }); + globalState.keydownHandlerAdded = false; + } + + if (!innerParams.toast) { + globalState.keydownHandler = e => keydownHandler(instance, e, dismissWith); + + globalState.keydownTarget = innerParams.keydownListenerCapture ? window : getPopup(); + globalState.keydownListenerCapture = innerParams.keydownListenerCapture; + globalState.keydownTarget.addEventListener('keydown', globalState.keydownHandler, { + capture: globalState.keydownListenerCapture + }); + globalState.keydownHandlerAdded = true; + } + }; // Focus handling + + const setFocus = (innerParams, index, increment) => { + const focusableElements = getFocusableElements(); // search for visible elements and select the next possible match + + if (focusableElements.length) { + index = index + increment; // rollover to first item + + if (index === focusableElements.length) { + index = 0; // go to last item + } else if (index === -1) { + index = focusableElements.length - 1; + } + + return focusableElements[index].focus(); + } // no visible focusable elements, focus the popup + + + getPopup().focus(); + }; + const arrowKeysNextButton = ['ArrowRight', 'ArrowDown']; + const arrowKeysPreviousButton = ['ArrowLeft', 'ArrowUp']; + + const keydownHandler = (instance, e, dismissWith) => { + const innerParams = privateProps.innerParams.get(instance); + + if (!innerParams) { + return; // This instance has already been destroyed + } + + if (innerParams.stopKeydownPropagation) { + e.stopPropagation(); + } // ENTER + + + if (e.key === 'Enter') { + handleEnter(instance, e, innerParams); // TAB + } else if (e.key === 'Tab') { + handleTab(e, innerParams); // ARROWS - switch focus between buttons + } else if ([...arrowKeysNextButton, ...arrowKeysPreviousButton].includes(e.key)) { + handleArrows(e.key); // ESC + } else if (e.key === 'Escape') { + handleEsc(e, innerParams, dismissWith); + } + }; + + const handleEnter = (instance, e, innerParams) => { + // #720 #721 + if (e.isComposing) { + return; + } + + if (e.target && instance.getInput() && e.target.outerHTML === instance.getInput().outerHTML) { + if (['textarea', 'file'].includes(innerParams.input)) { + return; // do not submit + } + + clickConfirm(); + e.preventDefault(); + } + }; + + const handleTab = (e, innerParams) => { + const targetElement = e.target; + const focusableElements = getFocusableElements(); + let btnIndex = -1; + + for (let i = 0; i < focusableElements.length; i++) { + if (targetElement === focusableElements[i]) { + btnIndex = i; + break; + } + } + + if (!e.shiftKey) { + // Cycle to the next button + setFocus(innerParams, btnIndex, 1); + } else { + // Cycle to the prev button + setFocus(innerParams, btnIndex, -1); + } + + e.stopPropagation(); + e.preventDefault(); + }; + + const handleArrows = key => { + const confirmButton = getConfirmButton(); + const denyButton = getDenyButton(); + const cancelButton = getCancelButton(); + + if (![confirmButton, denyButton, cancelButton].includes(document.activeElement)) { + return; + } + + const sibling = arrowKeysNextButton.includes(key) ? 'nextElementSibling' : 'previousElementSibling'; + const buttonToFocus = document.activeElement[sibling]; + + if (buttonToFocus) { + buttonToFocus.focus(); + } + }; + + const handleEsc = (e, innerParams, dismissWith) => { + if (callIfFunction(innerParams.allowEscapeKey)) { + e.preventDefault(); + dismissWith(DismissReason.esc); + } + }; + + const handlePopupClick = (instance, domCache, dismissWith) => { + const innerParams = privateProps.innerParams.get(instance); + + if (innerParams.toast) { + handleToastClick(instance, domCache, dismissWith); + } else { + // Ignore click events that had mousedown on the popup but mouseup on the container + // This can happen when the user drags a slider + handleModalMousedown(domCache); // Ignore click events that had mousedown on the container but mouseup on the popup + + handleContainerMousedown(domCache); + handleModalClick(instance, domCache, dismissWith); + } + }; + + const handleToastClick = (instance, domCache, dismissWith) => { + // Closing toast by internal click + domCache.popup.onclick = () => { + const innerParams = privateProps.innerParams.get(instance); + + if (innerParams.showConfirmButton || innerParams.showDenyButton || innerParams.showCancelButton || innerParams.showCloseButton || innerParams.timer || innerParams.input) { + return; + } + + dismissWith(DismissReason.close); + }; + }; + + let ignoreOutsideClick = false; + + const handleModalMousedown = domCache => { + domCache.popup.onmousedown = () => { + domCache.container.onmouseup = function (e) { + domCache.container.onmouseup = undefined; // We only check if the mouseup target is the container because usually it doesn't + // have any other direct children aside of the popup + + if (e.target === domCache.container) { + ignoreOutsideClick = true; + } + }; + }; + }; + + const handleContainerMousedown = domCache => { + domCache.container.onmousedown = () => { + domCache.popup.onmouseup = function (e) { + domCache.popup.onmouseup = undefined; // We also need to check if the mouseup target is a child of the popup + + if (e.target === domCache.popup || domCache.popup.contains(e.target)) { + ignoreOutsideClick = true; + } + }; + }; + }; + + const handleModalClick = (instance, domCache, dismissWith) => { + domCache.container.onclick = e => { + const innerParams = privateProps.innerParams.get(instance); + + if (ignoreOutsideClick) { + ignoreOutsideClick = false; + return; + } + + if (e.target === domCache.container && callIfFunction(innerParams.allowOutsideClick)) { + dismissWith(DismissReason.backdrop); + } + }; + }; + + function _main(userParams, mixinParams = {}) { + showWarningsForParams(Object.assign({}, mixinParams, userParams)); + + if (globalState.currentInstance) { + globalState.currentInstance._destroy(); + + if (isModal()) { + unsetAriaHidden(); + } + } + + globalState.currentInstance = this; + const innerParams = prepareParams(userParams, mixinParams); + setParameters(innerParams); + Object.freeze(innerParams); // clear the previous timer + + if (globalState.timeout) { + globalState.timeout.stop(); + delete globalState.timeout; + } // clear the restore focus timeout + + + clearTimeout(globalState.restoreFocusTimeout); + const domCache = populateDomCache(this); + render(this, innerParams); + privateProps.innerParams.set(this, innerParams); + return swalPromise(this, domCache, innerParams); + } + + const prepareParams = (userParams, mixinParams) => { + const templateParams = getTemplateParams(userParams); + const params = Object.assign({}, defaultParams, mixinParams, templateParams, userParams); // precedence is described in #2131 + + params.showClass = Object.assign({}, defaultParams.showClass, params.showClass); + params.hideClass = Object.assign({}, defaultParams.hideClass, params.hideClass); + return params; + }; + + const swalPromise = (instance, domCache, innerParams) => { + return new Promise(resolve => { + // functions to handle all closings/dismissals + const dismissWith = dismiss => { + instance.closePopup({ + isDismissed: true, + dismiss + }); + }; + + privateMethods.swalPromiseResolve.set(instance, resolve); + + domCache.confirmButton.onclick = () => handleConfirmButtonClick(instance); + + domCache.denyButton.onclick = () => handleDenyButtonClick(instance); + + domCache.cancelButton.onclick = () => handleCancelButtonClick(instance, dismissWith); + + domCache.closeButton.onclick = () => dismissWith(DismissReason.close); + + handlePopupClick(instance, domCache, dismissWith); + addKeydownHandler(instance, globalState, innerParams, dismissWith); + handleInputOptionsAndValue(instance, innerParams); + openPopup(innerParams); + setupTimer(globalState, innerParams, dismissWith); + initFocus(domCache, innerParams); // Scroll container to top on open (#1247, #1946) + + setTimeout(() => { + domCache.container.scrollTop = 0; + }); + }); + }; + + const populateDomCache = instance => { + const domCache = { + popup: getPopup(), + container: getContainer(), + actions: getActions(), + confirmButton: getConfirmButton(), + denyButton: getDenyButton(), + cancelButton: getCancelButton(), + loader: getLoader(), + closeButton: getCloseButton(), + validationMessage: getValidationMessage(), + progressSteps: getProgressSteps() + }; + privateProps.domCache.set(instance, domCache); + return domCache; + }; + + const setupTimer = (globalState$$1, innerParams, dismissWith) => { + const timerProgressBar = getTimerProgressBar(); + hide(timerProgressBar); + + if (innerParams.timer) { + globalState$$1.timeout = new Timer(() => { + dismissWith('timer'); + delete globalState$$1.timeout; + }, innerParams.timer); + + if (innerParams.timerProgressBar) { + show(timerProgressBar); + setTimeout(() => { + if (globalState$$1.timeout && globalState$$1.timeout.running) { + // timer can be already stopped or unset at this point + animateTimerProgressBar(innerParams.timer); + } + }); + } + } + }; + + const initFocus = (domCache, innerParams) => { + if (innerParams.toast) { + return; + } + + if (!callIfFunction(innerParams.allowEnterKey)) { + return blurActiveElement(); + } + + if (!focusButton(domCache, innerParams)) { + setFocus(innerParams, -1, 1); + } + }; + + const focusButton = (domCache, innerParams) => { + if (innerParams.focusDeny && isVisible(domCache.denyButton)) { + domCache.denyButton.focus(); + return true; + } + + if (innerParams.focusCancel && isVisible(domCache.cancelButton)) { + domCache.cancelButton.focus(); + return true; + } + + if (innerParams.focusConfirm && isVisible(domCache.confirmButton)) { + domCache.confirmButton.focus(); + return true; + } + + return false; + }; + + const blurActiveElement = () => { + if (document.activeElement && typeof document.activeElement.blur === 'function') { + document.activeElement.blur(); + } + }; + + /** + * Updates popup parameters. + */ + + function update(params) { + const popup = getPopup(); + const innerParams = privateProps.innerParams.get(this); + + if (!popup || hasClass(popup, innerParams.hideClass.popup)) { + return warn("You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup."); + } + + const validUpdatableParams = {}; // assign valid params from `params` to `defaults` + + Object.keys(params).forEach(param => { + if (Swal.isUpdatableParameter(param)) { + validUpdatableParams[param] = params[param]; + } else { + warn("Invalid parameter to update: \"".concat(param, "\". Updatable params are listed here: https://github.com/sweetalert2/sweetalert2/blob/master/src/utils/params.js\n\nIf you think this parameter should be updatable, request it here: https://github.com/sweetalert2/sweetalert2/issues/new?template=02_feature_request.md")); + } + }); + const updatedParams = Object.assign({}, innerParams, validUpdatableParams); + render(this, updatedParams); + privateProps.innerParams.set(this, updatedParams); + Object.defineProperties(this, { + params: { + value: Object.assign({}, this.params, params), + writable: false, + enumerable: true + } + }); + } + + function _destroy() { + const domCache = privateProps.domCache.get(this); + const innerParams = privateProps.innerParams.get(this); + + if (!innerParams) { + return; // This instance has already been destroyed + } // Check if there is another Swal closing + + + if (domCache.popup && globalState.swalCloseEventFinishedCallback) { + globalState.swalCloseEventFinishedCallback(); + delete globalState.swalCloseEventFinishedCallback; + } // Check if there is a swal disposal defer timer + + + if (globalState.deferDisposalTimer) { + clearTimeout(globalState.deferDisposalTimer); + delete globalState.deferDisposalTimer; + } + + if (typeof innerParams.didDestroy === 'function') { + innerParams.didDestroy(); + } + + disposeSwal(this); + } + + const disposeSwal = instance => { + // Unset this.params so GC will dispose it (#1569) + delete instance.params; // Unset globalState props so GC will dispose globalState (#1569) + + delete globalState.keydownHandler; + delete globalState.keydownTarget; // Unset WeakMaps so GC will be able to dispose them (#1569) + + unsetWeakMaps(privateProps); + unsetWeakMaps(privateMethods); // Unset currentInstance + + delete globalState.currentInstance; + }; + + const unsetWeakMaps = obj => { + for (const i in obj) { + obj[i] = new WeakMap(); + } + }; + + + + var instanceMethods = /*#__PURE__*/Object.freeze({ + hideLoading: hideLoading, + disableLoading: hideLoading, + getInput: getInput$1, + close: close, + closePopup: close, + closeModal: close, + closeToast: close, + enableButtons: enableButtons, + disableButtons: disableButtons, + enableInput: enableInput, + disableInput: disableInput, + showValidationMessage: showValidationMessage, + resetValidationMessage: resetValidationMessage$1, + getProgressSteps: getProgressSteps$1, + _main: _main, + update: update, + _destroy: _destroy + }); + + let currentInstance; + + class SweetAlert { + constructor(...args) { + // Prevent run in Node env + if (typeof window === 'undefined') { + return; + } + + currentInstance = this; + const outerParams = Object.freeze(this.constructor.argsToParams(args)); + Object.defineProperties(this, { + params: { + value: outerParams, + writable: false, + enumerable: true, + configurable: true + } + }); + + const promise = this._main(this.params); + + privateProps.promise.set(this, promise); + } // `catch` cannot be the name of a module export, so we define our thenable methods here instead + + + then(onFulfilled) { + const promise = privateProps.promise.get(this); + return promise.then(onFulfilled); + } + + finally(onFinally) { + const promise = privateProps.promise.get(this); + return promise.finally(onFinally); + } + + } // Assign instance methods from src/instanceMethods/*.js to prototype + + + Object.assign(SweetAlert.prototype, instanceMethods); // Assign static methods from src/staticMethods/*.js to constructor + + Object.assign(SweetAlert, staticMethods); // Proxy to instance methods to constructor, for now, for backwards compatibility + + Object.keys(instanceMethods).forEach(key => { + SweetAlert[key] = function (...args) { + if (currentInstance) { + return currentInstance[key](...args); + } + }; + }); + SweetAlert.DismissReason = DismissReason; + SweetAlert.version = '11.1.5'; + + const Swal = SweetAlert; + Swal.default = Swal; + + return Swal; + +})); +if (typeof this !== 'undefined' && this.Sweetalert2){ this.swal = this.sweetAlert = this.Swal = this.SweetAlert = this.Sweetalert2} diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/wwwroot/libs/sweetalert2/sweetalert2.min.css b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/wwwroot/libs/sweetalert2/sweetalert2.min.css new file mode 100644 index 0000000000..25eb26f1c0 --- /dev/null +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/wwwroot/libs/sweetalert2/sweetalert2.min.css @@ -0,0 +1 @@ +.swal2-popup.swal2-toast{box-sizing:border-box;grid-column:1/4!important;grid-row:1/4!important;grid-template-columns:1fr 99fr 1fr;padding:1em;overflow-y:hidden;background:#fff;box-shadow:0 0 .625em #d9d9d9;pointer-events:all}.swal2-popup.swal2-toast>*{grid-column:2}.swal2-popup.swal2-toast .swal2-title{margin:1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-loading{justify-content:center}.swal2-popup.swal2-toast .swal2-input{height:2em;margin:.5em;font-size:1em}.swal2-popup.swal2-toast .swal2-validation-message{font-size:1em}.swal2-popup.swal2-toast .swal2-footer{margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-popup.swal2-toast .swal2-close{grid-column:3/3;grid-row:1/99;align-self:center;width:.8em;height:.8em;margin:0;font-size:2em}.swal2-popup.swal2-toast .swal2-html-container{margin:1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-html-container:empty{padding:0}.swal2-popup.swal2-toast .swal2-loader{grid-column:1;grid-row:1/99;align-self:center;width:2em;height:2em;margin:.25em}.swal2-popup.swal2-toast .swal2-icon{grid-column:1;grid-row:1/99;align-self:center;width:2em;min-width:2em;height:2em;margin:0 .5em 0 0}.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:700}.swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-popup.swal2-toast .swal2-actions{justify-content:flex-start;height:auto;margin:0;margin-top:.3125em;padding:0}.swal2-popup.swal2-toast .swal2-styled{margin:.25em .5em;padding:.4em .6em;font-size:1em}.swal2-popup.swal2-toast .swal2-styled:focus{box-shadow:0 0 0 1px #fff,0 0 0 3px rgba(100,150,200,.5)}.swal2-popup.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;transform:rotate(45deg);border-radius:50%}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.8em;left:-.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.25em;left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-popup.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{-webkit-animation:swal2-toast-animate-success-line-tip .75s;animation:swal2-toast-animate-success-line-tip .75s}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{-webkit-animation:swal2-toast-animate-success-line-long .75s;animation:swal2-toast-animate-success-line-long .75s}.swal2-popup.swal2-toast.swal2-show{-webkit-animation:swal2-toast-show .5s;animation:swal2-toast-show .5s}.swal2-popup.swal2-toast.swal2-hide{-webkit-animation:swal2-toast-hide .1s forwards;animation:swal2-toast-hide .1s forwards}.swal2-container{display:grid;position:fixed;z-index:1060;top:0;right:0;bottom:0;left:0;box-sizing:border-box;grid-template-areas:"top-start top top-end" "center-start center center-end" "bottom-start bottom-center bottom-end";grid-template-rows:minmax(-webkit-min-content,auto) minmax(-webkit-min-content,auto) minmax(-webkit-min-content,auto);grid-template-rows:minmax(min-content,auto) minmax(min-content,auto) minmax(min-content,auto);height:100%;padding:.625em;overflow-x:hidden;transition:background-color .1s;-webkit-overflow-scrolling:touch}.swal2-container.swal2-backdrop-show,.swal2-container.swal2-noanimation{background:rgba(0,0,0,.4)}.swal2-container.swal2-backdrop-hide{background:0 0!important}.swal2-container.swal2-bottom-start,.swal2-container.swal2-center-start,.swal2-container.swal2-top-start{grid-template-columns:minmax(0,1fr) auto auto}.swal2-container.swal2-bottom,.swal2-container.swal2-center,.swal2-container.swal2-top{grid-template-columns:auto minmax(0,1fr) auto}.swal2-container.swal2-bottom-end,.swal2-container.swal2-center-end,.swal2-container.swal2-top-end{grid-template-columns:auto auto minmax(0,1fr)}.swal2-container.swal2-top-start>.swal2-popup{align-self:start}.swal2-container.swal2-top>.swal2-popup{grid-column:2;align-self:start;justify-self:center}.swal2-container.swal2-top-end>.swal2-popup,.swal2-container.swal2-top-right>.swal2-popup{grid-column:3;align-self:start;justify-self:end}.swal2-container.swal2-center-left>.swal2-popup,.swal2-container.swal2-center-start>.swal2-popup{grid-row:2;align-self:center}.swal2-container.swal2-center>.swal2-popup{grid-column:2;grid-row:2;align-self:center;justify-self:center}.swal2-container.swal2-center-end>.swal2-popup,.swal2-container.swal2-center-right>.swal2-popup{grid-column:3;grid-row:2;align-self:center;justify-self:end}.swal2-container.swal2-bottom-left>.swal2-popup,.swal2-container.swal2-bottom-start>.swal2-popup{grid-column:1;grid-row:3;align-self:end}.swal2-container.swal2-bottom>.swal2-popup{grid-column:2;grid-row:3;justify-self:center;align-self:end}.swal2-container.swal2-bottom-end>.swal2-popup,.swal2-container.swal2-bottom-right>.swal2-popup{grid-column:3;grid-row:3;align-self:end;justify-self:end}.swal2-container.swal2-grow-fullscreen>.swal2-popup,.swal2-container.swal2-grow-row>.swal2-popup{grid-column:1/4;width:100%}.swal2-container.swal2-grow-column>.swal2-popup,.swal2-container.swal2-grow-fullscreen>.swal2-popup{grid-row:1/4;align-self:stretch}.swal2-container.swal2-no-transition{transition:none!important}.swal2-popup{display:none;position:relative;box-sizing:border-box;grid-template-columns:minmax(0,100%);width:32em;max-width:100%;padding:0 0 1.25em;border:none;border-radius:5px;background:#fff;color:#545454;font-family:inherit;font-size:1rem}.swal2-popup:focus{outline:0}.swal2-popup.swal2-loading{overflow-y:hidden}.swal2-title{position:relative;max-width:100%;margin:0;padding:.8em 1em 0;color:#595959;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;word-wrap:break-word}.swal2-actions{display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:center;width:auto;margin:1.25em auto 0;padding:0}.swal2-actions:not(.swal2-loading) .swal2-styled[disabled]{opacity:.4}.swal2-actions:not(.swal2-loading) .swal2-styled:hover{background-image:linear-gradient(rgba(0,0,0,.1),rgba(0,0,0,.1))}.swal2-actions:not(.swal2-loading) .swal2-styled:active{background-image:linear-gradient(rgba(0,0,0,.2),rgba(0,0,0,.2))}.swal2-loader{display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;-webkit-animation:swal2-rotate-loading 1.5s linear 0s infinite normal;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 transparent #2778c4 transparent}.swal2-styled{margin:.3125em;padding:.625em 1.1em;transition:box-shadow .1s;box-shadow:0 0 0 3px transparent;font-weight:500}.swal2-styled:not([disabled]){cursor:pointer}.swal2-styled.swal2-confirm{border:0;border-radius:.25em;background:initial;background-color:#7367f0;color:#fff;font-size:1em}.swal2-styled.swal2-confirm:focus{box-shadow:0 0 0 3px rgba(115,103,240,.5)}.swal2-styled.swal2-deny{border:0;border-radius:.25em;background:initial;background-color:#ea5455;color:#fff;font-size:1em}.swal2-styled.swal2-deny:focus{box-shadow:0 0 0 3px rgba(234,84,85,.5)}.swal2-styled.swal2-cancel{border:0;border-radius:.25em;background:initial;background-color:#6e7d88;color:#fff;font-size:1em}.swal2-styled.swal2-cancel:focus{box-shadow:0 0 0 3px rgba(110,125,136,.5)}.swal2-styled.swal2-default-outline:focus{box-shadow:0 0 0 3px rgba(100,150,200,.5)}.swal2-styled:focus{outline:0}.swal2-styled::-moz-focus-inner{border:0}.swal2-footer{justify-content:center;margin:1em 0 0;padding:1em 1em 0;border-top:1px solid #eee;color:#545454;font-size:1em}.swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;grid-column:auto!important;height:.25em;overflow:hidden;border-bottom-right-radius:5px;border-bottom-left-radius:5px}.swal2-timer-progress-bar{width:100%;height:.25em;background:rgba(0,0,0,.2)}.swal2-image{max-width:100%;margin:2em auto 1em}.swal2-close{z-index:2;align-items:center;justify-content:center;width:1.2em;height:1.2em;margin-top:0;margin-right:0;margin-bottom:-1.2em;padding:0;overflow:hidden;transition:color .1s,box-shadow .1s;border:none;border-radius:5px;background:0 0;color:#ccc;font-family:serif;font-family:monospace;font-size:2.5em;cursor:pointer;justify-self:end}.swal2-close:hover{transform:none;background:0 0;color:#f27474}.swal2-close:focus{outline:0;box-shadow:inset 0 0 0 3px rgba(100,150,200,.5)}.swal2-close::-moz-focus-inner{border:0}.swal2-html-container{z-index:1;justify-content:center;margin:1em 1.6em .3em;padding:0;overflow:auto;color:#545454;font-size:1.125em;font-weight:400;line-height:normal;text-align:center;word-wrap:break-word;word-break:break-word}.swal2-checkbox,.swal2-file,.swal2-input,.swal2-radio,.swal2-select,.swal2-textarea{margin:1em 2em 0}.swal2-file,.swal2-input,.swal2-textarea{box-sizing:border-box;width:auto;transition:border-color .1s,box-shadow .1s;border:1px solid #d9d9d9;border-radius:.1875em;background:inherit;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px transparent;color:inherit;font-size:1.125em}.swal2-file.swal2-inputerror,.swal2-input.swal2-inputerror,.swal2-textarea.swal2-inputerror{border-color:#f27474!important;box-shadow:0 0 2px #f27474!important}.swal2-file:focus,.swal2-input:focus,.swal2-textarea:focus{border:1px solid #b4dbed;outline:0;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(100,150,200,.5)}.swal2-file::-moz-placeholder,.swal2-input::-moz-placeholder,.swal2-textarea::-moz-placeholder{color:#ccc}.swal2-file:-ms-input-placeholder,.swal2-input:-ms-input-placeholder,.swal2-textarea:-ms-input-placeholder{color:#ccc}.swal2-file::placeholder,.swal2-input::placeholder,.swal2-textarea::placeholder{color:#ccc}.swal2-range{margin:1em 2em 0;background:#fff}.swal2-range input{width:80%}.swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}.swal2-range input,.swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}.swal2-input{height:2.625em;padding:0 .75em}.swal2-file{width:75%;margin-right:auto;margin-left:auto;background:inherit;font-size:1.125em}.swal2-textarea{height:6.75em;padding:.75em}.swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:inherit;color:inherit;font-size:1.125em}.swal2-checkbox,.swal2-radio{align-items:center;justify-content:center;background:#fff;color:inherit}.swal2-checkbox label,.swal2-radio label{margin:0 .6em;font-size:1.125em}.swal2-checkbox input,.swal2-radio input{flex-shrink:0;margin:0 .4em}.swal2-input-label{display:flex;justify-content:center;margin:1em auto 0}.swal2-validation-message{align-items:center;justify-content:center;margin:1em 0 0;padding:.625em;overflow:hidden;background:#f0f0f0;color:#666;font-size:1em;font-weight:300}.swal2-validation-message::before{content:"!";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}.swal2-icon{position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:2.5em auto .6em;border:.25em solid transparent;border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}.swal2-icon.swal2-error{border-color:#f27474;color:#f27474}.swal2-icon.swal2-error .swal2-x-mark{position:relative;flex-grow:1}.swal2-icon.swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}.swal2-icon.swal2-error.swal2-icon-show{-webkit-animation:swal2-animate-error-icon .5s;animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-error.swal2-icon-show .swal2-x-mark{-webkit-animation:swal2-animate-error-x-mark .5s;animation:swal2-animate-error-x-mark .5s}.swal2-icon.swal2-warning{border-color:#facea8;color:#f8bb86}.swal2-icon.swal2-info{border-color:#9de0f6;color:#3fc3ee}.swal2-icon.swal2-question{border-color:#c9dae1;color:#87adbd}.swal2-icon.swal2-success{border-color:#a5dc86;color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;transform:rotate(45deg);border-radius:50%}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}.swal2-icon.swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-.25em;left:-.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}.swal2-icon.swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}.swal2-icon.swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}.swal2-icon.swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-tip{-webkit-animation:swal2-animate-success-line-tip .75s;animation:swal2-animate-success-line-tip .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-long{-webkit-animation:swal2-animate-success-line-long .75s;animation:swal2-animate-success-line-long .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-circular-line-right{-webkit-animation:swal2-rotate-success-circular-line 4.25s ease-in;animation:swal2-rotate-success-circular-line 4.25s ease-in}.swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:1.25em auto;padding:0;background:inherit;font-weight:600}.swal2-progress-steps li{display:inline-block;position:relative}.swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:#add8e6;color:#fff}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:#add8e6}.swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}[class^=swal2]{-webkit-tap-highlight-color:transparent}.swal2-show{-webkit-animation:swal2-show .3s;animation:swal2-show .3s}.swal2-hide{-webkit-animation:swal2-hide .15s forwards;animation:swal2-hide .15s forwards}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{margin-right:initial;margin-left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}@-webkit-keyframes swal2-toast-show{0%{transform:translateY(-.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0)}}@keyframes swal2-toast-show{0%{transform:translateY(-.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0)}}@-webkit-keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@-webkit-keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@-webkit-keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@-webkit-keyframes swal2-show{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}100%{transform:scale(1)}}@keyframes swal2-show{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}100%{transform:scale(1)}}@-webkit-keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(.5);opacity:0}}@keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(.5);opacity:0}}@-webkit-keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@-webkit-keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@-webkit-keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@-webkit-keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@-webkit-keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0);opacity:1}}@-webkit-keyframes swal2-rotate-loading{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes swal2-rotate-loading{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto!important}body.swal2-no-backdrop .swal2-container{background-color:transparent!important;pointer-events:none}body.swal2-no-backdrop .swal2-container .swal2-popup{pointer-events:all}body.swal2-no-backdrop .swal2-container .swal2-modal{box-shadow:0 0 10px rgba(0,0,0,.4)}@media print{body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow-y:scroll!important}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .swal2-container{position:static!important}}body.swal2-toast-shown .swal2-container{box-sizing:border-box;width:360px;max-width:100%;background-color:transparent;pointer-events:none}body.swal2-toast-shown .swal2-container.swal2-top{top:0;right:auto;bottom:auto;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{top:0;right:0;bottom:auto;left:auto}body.swal2-toast-shown .swal2-container.swal2-top-left,body.swal2-toast-shown .swal2-container.swal2-top-start{top:0;right:auto;bottom:auto;left:0}body.swal2-toast-shown .swal2-container.swal2-center-left,body.swal2-toast-shown .swal2-container.swal2-center-start{top:50%;right:auto;bottom:auto;left:0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{top:50%;right:auto;bottom:auto;left:50%;transform:translate(-50%,-50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{top:50%;right:0;bottom:auto;left:auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-left,body.swal2-toast-shown .swal2-container.swal2-bottom-start{top:auto;right:auto;bottom:0;left:0}body.swal2-toast-shown .swal2-container.swal2-bottom{top:auto;right:auto;bottom:0;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{top:auto;right:0;bottom:0;left:auto} \ No newline at end of file diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/wwwroot/libs/sweetalert2/sweetalert2.min.js b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/wwwroot/libs/sweetalert2/sweetalert2.min.js new file mode 100644 index 0000000000..9a383d5289 --- /dev/null +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/wwwroot/libs/sweetalert2/sweetalert2.min.js @@ -0,0 +1 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).Sweetalert2=t()}(this,function(){"use strict";const l=Object.freeze({cancel:"cancel",backdrop:"backdrop",close:"close",esc:"esc",timer:"timer"}),t="SweetAlert2:",o=e=>e.charAt(0).toUpperCase()+e.slice(1),a=e=>Array.prototype.slice.call(e),s=e=>{console.warn("".concat(t," ").concat("object"==typeof e?e.join(" "):e))},r=e=>{console.error("".concat(t," ").concat(e))},n=[],i=(e,t)=>{t='"'.concat(e,'" is deprecated and will be removed in the next major release. Please use "').concat(t,'" instead.'),n.includes(t)||(n.push(t),s(t))},c=e=>"function"==typeof e?e():e,u=e=>e&&"function"==typeof e.toPromise,d=e=>u(e)?e.toPromise():Promise.resolve(e),p=e=>e&&Promise.resolve(e)===e,m=e=>e instanceof Element||(e=>"object"==typeof e&&e.jquery)(e);var e=e=>{const t={};for(const n in e)t[e[n]]="swal2-"+e[n];return t};const h=e(["container","shown","height-auto","iosfix","popup","modal","no-backdrop","no-transition","toast","toast-shown","show","hide","close","title","html-container","actions","confirm","deny","cancel","default-outline","footer","icon","icon-content","image","input","file","range","select","radio","checkbox","label","textarea","inputerror","input-label","validation-message","progress-steps","active-progress-step","progress-step","progress-step-line","loader","loading","styled","top","top-start","top-end","top-left","top-right","center","center-start","center-end","center-left","center-right","bottom","bottom-start","bottom-end","bottom-left","bottom-right","grow-row","grow-column","grow-fullscreen","rtl","timer-progress-bar","timer-progress-bar-container","scrollbar-measure","icon-success","icon-warning","icon-info","icon-question","icon-error"]),g=e(["success","warning","info","question","error"]),b=()=>document.body.querySelector(".".concat(h.container)),f=e=>{const t=b();return t?t.querySelector(e):null},y=e=>f(".".concat(e)),v=()=>y(h.popup),w=()=>y(h.icon),C=()=>y(h.title),k=()=>y(h["html-container"]),A=()=>y(h.image),B=()=>y(h["progress-steps"]),x=()=>y(h["validation-message"]),P=()=>f(".".concat(h.actions," .").concat(h.confirm)),E=()=>f(".".concat(h.actions," .").concat(h.deny));const S=()=>f(".".concat(h.loader)),T=()=>f(".".concat(h.actions," .").concat(h.cancel)),L=()=>y(h.actions),O=()=>y(h.footer),j=()=>y(h["timer-progress-bar"]),D=()=>y(h.close),I=()=>{const e=a(v().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')).sort((e,t)=>(e=parseInt(e.getAttribute("tabindex")),(t=parseInt(t.getAttribute("tabindex")))"-1"!==e.getAttribute("tabindex"));return(t=>{const n=[];for(let e=0;eG(e))},M=()=>!H()&&!document.body.classList.contains(h["no-backdrop"]),H=()=>document.body.classList.contains(h["toast-shown"]);const q={previousBodyPadding:null},V=(t,e)=>{if(t.textContent="",e){const n=new DOMParser,o=n.parseFromString(e,"text/html");a(o.querySelector("head").childNodes).forEach(e=>{t.appendChild(e)}),a(o.querySelector("body").childNodes).forEach(e=>{t.appendChild(e)})}},N=(t,e)=>{if(!e)return!1;var n=e.split(/\s+/);for(let e=0;e{var o,i;if(o=e,i=t,a(o.classList).forEach(e=>{Object.values(h).includes(e)||Object.values(g).includes(e)||Object.values(i.showClass).includes(e)||o.classList.remove(e)}),t.customClass&&t.customClass[n]){if("string"!=typeof t.customClass[n]&&!t.customClass[n].forEach)return s("Invalid type of customClass.".concat(n,'! Expected string or iterable object, got "').concat(typeof t.customClass[n],'"'));W(e,t.customClass[n])}},F=(e,t)=>{if(!t)return null;switch(t){case"select":case"textarea":case"file":return K(e,h[t]);case"checkbox":return e.querySelector(".".concat(h.checkbox," input"));case"radio":return e.querySelector(".".concat(h.radio," input:checked"))||e.querySelector(".".concat(h.radio," input:first-child"));case"range":return e.querySelector(".".concat(h.range," input"));default:return K(e,h.input)}},R=e=>{var t;e.focus(),"file"!==e.type&&(t=e.value,e.value="",e.value=t)},z=(e,t,n)=>{e&&t&&(t="string"==typeof t?t.split(/\s+/).filter(Boolean):t).forEach(t=>{e.forEach?e.forEach(e=>{n?e.classList.add(t):e.classList.remove(t)}):n?e.classList.add(t):e.classList.remove(t)})},W=(e,t)=>{z(e,t,!0)},_=(e,t)=>{z(e,t,!1)},K=(t,n)=>{for(let e=0;e{(n=n==="".concat(parseInt(n))?parseInt(n):n)||0===parseInt(n)?e.style[t]="number"==typeof n?"".concat(n,"px"):n:e.style.removeProperty(t)},Z=(e,t="flex")=>{e.style.display=t},J=e=>{e.style.display="none"},X=(e,t,n,o)=>{const i=e.querySelector(t);i&&(i.style[n]=o)},$=(e,t,n)=>{t?Z(e,n):J(e)},G=e=>!(!e||!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)),Q=()=>!G(P())&&!G(E())&&!G(T()),ee=e=>!!(e.scrollHeight>e.clientHeight),te=e=>{const t=window.getComputedStyle(e);var n=parseFloat(t.getPropertyValue("animation-duration")||"0"),e=parseFloat(t.getPropertyValue("transition-duration")||"0");return 0{const n=j();G(n)&&(t&&(n.style.transition="none",n.style.width="100%"),setTimeout(()=>{n.style.transition="width ".concat(e/1e3,"s linear"),n.style.width="0%"},10))},oe=()=>"undefined"==typeof window||"undefined"==typeof document,ie='\n
                                \n \n
                                  \n
                                  \n \n

                                  \n
                                  \n \n \n
                                  \n \n \n
                                  \n \n
                                  \n \n \n
                                  \n
                                  \n
                                  \n \n \n \n
                                  \n
                                  \n
                                  \n
                                  \n
                                  \n
                                  \n').replace(/(^|\n)\s*/g,""),ae=()=>{ln.isVisible()&&ln.resetValidationMessage()},se=e=>{var t=(()=>{const e=b();return!!e&&(e.remove(),_([document.documentElement,document.body],[h["no-backdrop"],h["toast-shown"],h["has-column"]]),!0)})();if(oe())r("SweetAlert2 requires document to initialize");else{const n=document.createElement("div");n.className=h.container,t&&W(n,h["no-transition"]),V(n,ie);const o="string"==typeof(t=e.target)?document.querySelector(t):t;o.appendChild(n),(e=>{const t=v();t.setAttribute("role",e.toast?"alert":"dialog"),t.setAttribute("aria-live",e.toast?"polite":"assertive"),e.toast||t.setAttribute("aria-modal","true")})(e),e=o,"rtl"===window.getComputedStyle(e).direction&&W(b(),h.rtl),(()=>{const e=v(),t=K(e,h.input),n=K(e,h.file),o=e.querySelector(".".concat(h.range," input")),i=e.querySelector(".".concat(h.range," output")),a=K(e,h.select),s=e.querySelector(".".concat(h.checkbox," input")),r=K(e,h.textarea);t.oninput=ae,n.onchange=ae,a.onchange=ae,s.onchange=ae,r.oninput=ae,o.oninput=()=>{ae(),i.value=o.value},o.onchange=()=>{ae(),o.nextSibling.value=o.value}})()}},re=(e,t)=>{e instanceof HTMLElement?t.appendChild(e):"object"==typeof e?ce(e,t):e&&V(t,e)},ce=(e,t)=>{e.jquery?le(t,e):V(t,e.toString())},le=(t,n)=>{if(t.textContent="",0 in n)for(let e=0;e in n;e++)t.appendChild(n[e].cloneNode(!0));else t.appendChild(n.cloneNode(!0))},ue=(()=>{if(oe())return!1;var e=document.createElement("div"),t={WebkitAnimation:"webkitAnimationEnd",OAnimation:"oAnimationEnd oanimationend",animation:"animationend"};for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&void 0!==e.style[n])return t[n];return!1})(),de=(e,t)=>{const n=L();var o=S(),i=P(),a=E(),s=T();(t.showConfirmButton||t.showDenyButton||t.showCancelButton?Z:J)(n),U(n,t,"actions"),pe(i,"confirm",t),pe(a,"deny",t),pe(s,"cancel",t),function(e,t,n,o){if(!o.buttonsStyling)return _([e,t,n],h.styled);W([e,t,n],h.styled),o.confirmButtonColor&&(e.style.backgroundColor=o.confirmButtonColor,W(e,h["default-outline"]));o.denyButtonColor&&(t.style.backgroundColor=o.denyButtonColor,W(t,h["default-outline"]));o.cancelButtonColor&&(n.style.backgroundColor=o.cancelButtonColor,W(n,h["default-outline"]))}(i,a,s,t),t.reverseButtons&&(n.insertBefore(s,o),n.insertBefore(a,o),n.insertBefore(i,o)),V(o,t.loaderHtml),U(o,t,"loader")};function pe(e,t,n){$(e,n["show".concat(o(t),"Button")],"inline-block"),V(e,n["".concat(t,"ButtonText")]),e.setAttribute("aria-label",n["".concat(t,"ButtonAriaLabel")]),e.className=h[t],U(e,n,"".concat(t,"Button")),W(e,n["".concat(t,"ButtonClass")])}const me=(e,t)=>{var n,o,i=b();i&&(o=i,"string"==typeof(n=t.backdrop)?o.style.background=n:n||W([document.documentElement,document.body],h["no-backdrop"]),o=i,(n=t.position)in h?W(o,h[n]):(s('The "position" parameter is not valid, defaulting to "center"'),W(o,h.center)),n=i,!(o=t.grow)||"string"!=typeof o||(o="grow-".concat(o))in h&&W(n,h[o]),U(i,t,"container"))};var he={promise:new WeakMap,innerParams:new WeakMap,domCache:new WeakMap};const ge=["input","file","range","select","radio","checkbox","textarea"],be=e=>{if(!ke[e.input])return r('Unexpected type of input! Expected "text", "email", "password", "number", "tel", "select", "radio", "checkbox", "textarea", "file" or "url", got "'.concat(e.input,'"'));var t=Ce(e.input);const n=ke[e.input](t,e);Z(n),setTimeout(()=>{R(n)})},fe=(e,t)=>{const n=F(v(),e);if(n){(t=>{for(let e=0;e{var t=Ce(e.input);e.customClass&&W(t,e.customClass.input)},ve=(e,t)=>{e.placeholder&&!t.inputPlaceholder||(e.placeholder=t.inputPlaceholder)},we=(e,t,n)=>{if(n.inputLabel){e.id=h.input;const i=document.createElement("label");var o=h["input-label"];i.setAttribute("for",e.id),i.className=o,W(i,n.customClass.inputLabel),i.innerText=n.inputLabel,t.insertAdjacentElement("beforebegin",i)}},Ce=e=>{e=h[e]||h.input;return K(v(),e)},ke={};ke.text=ke.email=ke.password=ke.number=ke.tel=ke.url=(e,t)=>("string"==typeof t.inputValue||"number"==typeof t.inputValue?e.value=t.inputValue:p(t.inputValue)||s('Unexpected type of inputValue! Expected "string", "number" or "Promise", got "'.concat(typeof t.inputValue,'"')),we(e,e,t),ve(e,t),e.type=t.input,e),ke.file=(e,t)=>(we(e,e,t),ve(e,t),e),ke.range=(e,t)=>{const n=e.querySelector("input"),o=e.querySelector("output");return n.value=t.inputValue,n.type=t.input,o.value=t.inputValue,we(n,e,t),e},ke.select=(e,t)=>{if(e.textContent="",t.inputPlaceholder){const n=document.createElement("option");V(n,t.inputPlaceholder),n.value="",n.disabled=!0,n.selected=!0,e.appendChild(n)}return we(e,e,t),e},ke.radio=e=>(e.textContent="",e),ke.checkbox=(e,t)=>{const n=F(v(),"checkbox");n.value=1,n.id=h.checkbox,n.checked=Boolean(t.inputValue);var o=e.querySelector("span");return V(o,t.inputPlaceholder),e},ke.textarea=(n,e)=>{n.value=e.inputValue,ve(n,e),we(n,n,e);return setTimeout(()=>{if("MutationObserver"in window){const t=parseInt(window.getComputedStyle(v()).width);new MutationObserver(()=>{var e,e=n.offsetWidth+(e=n,parseInt(window.getComputedStyle(e).marginLeft)+parseInt(window.getComputedStyle(e).marginRight));e>t?v().style.width="".concat(e,"px"):v().style.width=null}).observe(n,{attributes:!0,attributeFilter:["style"]})}}),n};const Ae=(e,t)=>{const n=k();U(n,t,"htmlContainer"),t.html?(re(t.html,n),Z(n,"block")):t.text?(n.textContent=t.text,Z(n,"block")):J(n),((e,o)=>{const i=v();e=he.innerParams.get(e);const a=!e||o.input!==e.input;ge.forEach(e=>{var t=h[e];const n=K(i,t);fe(e,o.inputAttributes),n.className=t,a&&J(n)}),o.input&&(a&&be(o),ye(o))})(e,t)},Be=(e,t)=>{for(const n in g)t.icon!==n&&_(e,g[n]);W(e,g[t.icon]),Ee(e,t),xe(),U(e,t,"icon")},xe=()=>{const e=v();var t=window.getComputedStyle(e).getPropertyValue("background-color");const n=e.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix");for(let e=0;e{var n;e.textContent="",t.iconHtml?V(e,Se(t.iconHtml)):"success"===t.icon?V(e,'\n
                                  \n \n
                                  \n
                                  \n '):"error"===t.icon?V(e,'\n \n \n \n \n '):(n={question:"?",warning:"!",info:"i"},V(e,Se(n[t.icon])))},Ee=(e,t)=>{if(t.iconColor){e.style.color=t.iconColor,e.style.borderColor=t.iconColor;for(const n of[".swal2-success-line-tip",".swal2-success-line-long",".swal2-x-mark-line-left",".swal2-x-mark-line-right"])X(e,n,"backgroundColor",t.iconColor);X(e,".swal2-success-ring","borderColor",t.iconColor)}},Se=e=>'
                                  ').concat(e,"
                                  "),Te=(e,o)=>{const i=B();if(!o.progressSteps||0===o.progressSteps.length)return J(i);Z(i),i.textContent="",o.currentProgressStep>=o.progressSteps.length&&s("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),o.progressSteps.forEach((e,t)=>{var n,e=(n=e,e=document.createElement("li"),W(e,h["progress-step"]),V(e,n),e);i.appendChild(e),t===o.currentProgressStep&&W(e,h["active-progress-step"]),t!==o.progressSteps.length-1&&(t=(e=>{const t=document.createElement("li");return W(t,h["progress-step-line"]),e.progressStepsDistance&&(t.style.width=e.progressStepsDistance),t})(o),i.appendChild(t))})},Le=(e,t)=>{e.className="".concat(h.popup," ").concat(G(e)?t.showClass.popup:""),t.toast?(W([document.documentElement,document.body],h["toast-shown"]),W(e,h.toast)):W(e,h.modal),U(e,t,"popup"),"string"==typeof t.customClass&&W(e,t.customClass),t.icon&&W(e,h["icon-".concat(t.icon)])},Oe=(e,t)=>{var n,o,i;(e=>{var t=b();const n=v();e.toast?(Y(t,"width",e.width),n.style.width="100%",n.insertBefore(S(),w())):Y(n,"width",e.width),Y(n,"padding",e.padding),e.background&&(n.style.background=e.background),J(x()),Le(n,e)})(t),me(0,t),Te(0,t),i=e,n=t,o=he.innerParams.get(i),i=w(),o&&n.icon===o.icon?(Pe(i,n),Be(i,n)):n.icon||n.iconHtml?n.icon&&-1===Object.keys(g).indexOf(n.icon)?(r('Unknown icon! Expected "success", "error", "warning", "info" or "question", got "'.concat(n.icon,'"')),J(i)):(Z(i),Pe(i,n),Be(i,n),W(i,n.showClass.icon)):J(i),(e=>{const t=A();if(!e.imageUrl)return J(t);Z(t,""),t.setAttribute("src",e.imageUrl),t.setAttribute("alt",e.imageAlt),Y(t,"width",e.imageWidth),Y(t,"height",e.imageHeight),t.className=h.image,U(t,e,"image")})(t),(e=>{const t=C();$(t,e.title||e.titleText,"block"),e.title&&re(e.title,t),e.titleText&&(t.innerText=e.titleText),U(t,e,"title")})(t),(e=>{const t=D();V(t,e.closeButtonHtml),U(t,e,"closeButton"),$(t,e.showCloseButton),t.setAttribute("aria-label",e.closeButtonAriaLabel)})(t),Ae(e,t),de(0,t),i=t,e=O(),$(e,i.footer),i.footer&&re(i.footer,e),U(e,i,"footer"),"function"==typeof t.didRender&&t.didRender(v())};const je=()=>P()&&P().click();const De=e=>{let t=v();t||ln.fire(),t=v();var n=S();H()?J(w()):Ie(t,e),Z(n),t.setAttribute("data-loading",!0),t.setAttribute("aria-busy",!0),t.focus()},Ie=(e,t)=>{var n=L();const o=S();!t&&G(P())&&(t=P()),Z(n),t&&(J(t),o.setAttribute("data-button-to-replace",t.className)),o.parentNode.insertBefore(o,t),W([e,n],h.loading)},Me={},He=o=>new Promise(e=>{if(!o)return e();var t=window.scrollX,n=window.scrollY;Me.restoreFocusTimeout=setTimeout(()=>{Me.previousActiveElement&&Me.previousActiveElement.focus?(Me.previousActiveElement.focus(),Me.previousActiveElement=null):document.body&&document.body.focus(),e()},100),window.scrollTo(t,n)});const qe=()=>{if(Me.timeout)return(()=>{const e=j();var t=parseInt(window.getComputedStyle(e).width);e.style.removeProperty("transition"),e.style.width="100%";var n=parseInt(window.getComputedStyle(e).width),n=parseInt(t/n*100);e.style.removeProperty("transition"),e.style.width="".concat(n,"%")})(),Me.timeout.stop()},Ve=()=>{if(Me.timeout){var e=Me.timeout.start();return ne(e),e}};let Ne=!1;const Ue={};const Fe=t=>{for(let e=t.target;e&&e!==document;e=e.parentNode)for(const o in Ue){var n=e.getAttribute(o);if(n)return void Ue[o].fire({template:n})}},Re={title:"",titleText:"",text:"",html:"",footer:"",icon:void 0,iconColor:void 0,iconHtml:void 0,template:void 0,toast:!1,showClass:{popup:"swal2-show",backdrop:"swal2-backdrop-show",icon:"swal2-icon-show"},hideClass:{popup:"swal2-hide",backdrop:"swal2-backdrop-hide",icon:"swal2-icon-hide"},customClass:{},target:"body",backdrop:!0,heightAuto:!0,allowOutsideClick:!0,allowEscapeKey:!0,allowEnterKey:!0,stopKeydownPropagation:!0,keydownListenerCapture:!1,showConfirmButton:!0,showDenyButton:!1,showCancelButton:!1,preConfirm:void 0,preDeny:void 0,confirmButtonText:"OK",confirmButtonAriaLabel:"",confirmButtonColor:void 0,denyButtonText:"No",denyButtonAriaLabel:"",denyButtonColor:void 0,cancelButtonText:"Cancel",cancelButtonAriaLabel:"",cancelButtonColor:void 0,buttonsStyling:!0,reverseButtons:!1,focusConfirm:!0,focusDeny:!1,focusCancel:!1,returnFocus:!0,showCloseButton:!1,closeButtonHtml:"×",closeButtonAriaLabel:"Close this dialog",loaderHtml:"",showLoaderOnConfirm:!1,showLoaderOnDeny:!1,imageUrl:void 0,imageWidth:void 0,imageHeight:void 0,imageAlt:"",timer:void 0,timerProgressBar:!1,width:void 0,padding:void 0,background:void 0,input:void 0,inputPlaceholder:"",inputLabel:"",inputValue:"",inputOptions:{},inputAutoTrim:!0,inputAttributes:{},inputValidator:void 0,returnInputValueOnDeny:!1,validationMessage:void 0,grow:!1,position:"center",progressSteps:[],currentProgressStep:void 0,progressStepsDistance:void 0,willOpen:void 0,didOpen:void 0,didRender:void 0,willClose:void 0,didClose:void 0,didDestroy:void 0,scrollbarPadding:!0},ze=["allowEscapeKey","allowOutsideClick","background","buttonsStyling","cancelButtonAriaLabel","cancelButtonColor","cancelButtonText","closeButtonAriaLabel","closeButtonHtml","confirmButtonAriaLabel","confirmButtonColor","confirmButtonText","currentProgressStep","customClass","denyButtonAriaLabel","denyButtonColor","denyButtonText","didClose","didDestroy","footer","hideClass","html","icon","iconColor","iconHtml","imageAlt","imageHeight","imageUrl","imageWidth","preConfirm","preDeny","progressSteps","returnFocus","reverseButtons","showCancelButton","showCloseButton","showConfirmButton","showDenyButton","text","title","titleText","willClose"],We={},_e=["allowOutsideClick","allowEnterKey","backdrop","focusConfirm","focusDeny","focusCancel","returnFocus","heightAuto","keydownListenerCapture"],Ke=e=>Object.prototype.hasOwnProperty.call(Re,e);const Ye=e=>We[e],Ze=e=>{!e.backdrop&&e.allowOutsideClick&&s('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`');for(const o in e)n=o,Ke(n)||s('Unknown parameter "'.concat(n,'"')),e.toast&&(t=o,_e.includes(t)&&s('The parameter "'.concat(t,'" is incompatible with toasts'))),t=o,Ye(t)&&i(t,Ye(t));var t,n};var Je=Object.freeze({isValidParameter:Ke,isUpdatableParameter:e=>-1!==ze.indexOf(e),isDeprecatedParameter:Ye,argsToParams:n=>{const o={};return"object"!=typeof n[0]||m(n[0])?["title","html","icon"].forEach((e,t)=>{t=n[t];"string"==typeof t||m(t)?o[e]=t:void 0!==t&&r("Unexpected type of ".concat(e,'! Expected "string" or "Element", got ').concat(typeof t))}):Object.assign(o,n[0]),o},isVisible:()=>G(v()),clickConfirm:je,clickDeny:()=>E()&&E().click(),clickCancel:()=>T()&&T().click(),getContainer:b,getPopup:v,getTitle:C,getHtmlContainer:k,getImage:A,getIcon:w,getInputLabel:()=>y(h["input-label"]),getCloseButton:D,getActions:L,getConfirmButton:P,getDenyButton:E,getCancelButton:T,getLoader:S,getFooter:O,getTimerProgressBar:j,getFocusableElements:I,getValidationMessage:x,isLoading:()=>v().hasAttribute("data-loading"),fire:function(...e){return new this(...e)},mixin:function(n){class e extends this{_main(e,t){return super._main(e,Object.assign({},n,t))}}return e},showLoading:De,enableLoading:De,getTimerLeft:()=>Me.timeout&&Me.timeout.getTimerLeft(),stopTimer:qe,resumeTimer:Ve,toggleTimer:()=>{var e=Me.timeout;return e&&(e.running?qe:Ve)()},increaseTimer:e=>{if(Me.timeout){e=Me.timeout.increase(e);return ne(e,!0),e}},isTimerRunning:()=>Me.timeout&&Me.timeout.isRunning(),bindClickHandler:function(e="data-swal-template"){Ue[e]=this,Ne||(document.body.addEventListener("click",Fe),Ne=!0)}});function Xe(){var e=he.innerParams.get(this);if(e){const t=he.domCache.get(this);J(t.loader),H()?e.icon&&Z(w()):(e=>{const t=e.popup.getElementsByClassName(e.loader.getAttribute("data-button-to-replace"));if(t.length)Z(t[0],"inline-block");else if(Q())J(e.actions)})(t),_([t.popup,t.actions],h.loading),t.popup.removeAttribute("aria-busy"),t.popup.removeAttribute("data-loading"),t.confirmButton.disabled=!1,t.denyButton.disabled=!1,t.cancelButton.disabled=!1}}const $e=()=>{null===q.previousBodyPadding&&document.body.scrollHeight>window.innerHeight&&(q.previousBodyPadding=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight="".concat(q.previousBodyPadding+(()=>{const e=document.createElement("div");e.className=h["scrollbar-measure"],document.body.appendChild(e);var t=e.getBoundingClientRect().width-e.clientWidth;return document.body.removeChild(e),t})(),"px"))},Ge=()=>{navigator.userAgent.match(/(CriOS|FxiOS|EdgiOS|YaBrowser|UCBrowser)/i)||v().scrollHeight>window.innerHeight-44&&(b().style.paddingBottom="".concat(44,"px"))},Qe=()=>{const e=b();let t;e.ontouchstart=e=>{t=et(e)},e.ontouchmove=e=>{t&&(e.preventDefault(),e.stopPropagation())}},et=e=>{var t=e.target,n=b();return!tt(e)&&!nt(e)&&(t===n||!(ee(n)||"INPUT"===t.tagName||"TEXTAREA"===t.tagName||ee(k())&&k().contains(t)))},tt=e=>e.touches&&e.touches.length&&"stylus"===e.touches[0].touchType,nt=e=>e.touches&&1{const e=a(document.body.children);e.forEach(e=>{e.hasAttribute("data-previous-aria-hidden")?(e.setAttribute("aria-hidden",e.getAttribute("data-previous-aria-hidden")),e.removeAttribute("data-previous-aria-hidden")):e.removeAttribute("aria-hidden")})};var it={swalPromiseResolve:new WeakMap};function at(e,t,n,o){H()?ct(e,o):(He(n).then(()=>ct(e,o)),Me.keydownTarget.removeEventListener("keydown",Me.keydownHandler,{capture:Me.keydownListenerCapture}),Me.keydownHandlerAdded=!1),/^((?!chrome|android).)*safari/i.test(navigator.userAgent)?(t.setAttribute("style","display:none !important"),t.removeAttribute("class"),t.innerHTML=""):t.remove(),M()&&(null!==q.previousBodyPadding&&(document.body.style.paddingRight="".concat(q.previousBodyPadding,"px"),q.previousBodyPadding=null),N(document.body,h.iosfix)&&(t=parseInt(document.body.style.top,10),_(document.body,h.iosfix),document.body.style.top="",document.body.scrollTop=-1*t),ot()),_([document.documentElement,document.body],[h.shown,h["height-auto"],h["no-backdrop"],h["toast-shown"]])}function st(e){var t=v();if(t){e=void 0!==(o=e)?Object.assign({isConfirmed:!1,isDenied:!1,isDismissed:!1},o):{isConfirmed:!1,isDenied:!1,isDismissed:!0};var n=he.innerParams.get(this);if(n&&!N(t,n.hideClass.popup)){const i=it.swalPromiseResolve.get(this);_(t,n.showClass.popup),W(t,n.hideClass.popup);var o=b();_(o,n.showClass.backdrop),W(o,n.hideClass.backdrop),((e,t,n)=>{const o=b(),i=ue&&te(t);if(typeof n.willClose==="function")n.willClose(t);if(i)rt(e,t,o,n.returnFocus,n.didClose);else at(e,o,n.returnFocus,n.didClose)})(this,t,n),i(e)}}}const rt=(e,t,n,o,i)=>{Me.swalCloseEventFinishedCallback=at.bind(null,e,n,o,i),t.addEventListener(ue,function(e){e.target===t&&(Me.swalCloseEventFinishedCallback(),delete Me.swalCloseEventFinishedCallback)})},ct=(e,t)=>{setTimeout(()=>{"function"==typeof t&&t.bind(e.params)(),e._destroy()})};function lt(e,t,n){const o=he.domCache.get(e);t.forEach(e=>{o[e].disabled=n})}function ut(e,t){if(!e)return!1;if("radio"===e.type){const n=e.parentNode.parentNode,o=n.querySelectorAll("input");for(let e=0;e/^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]{2,24}$/.test(e)?Promise.resolve():Promise.resolve(t||"Invalid email address"),url:(e,t)=>/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(e)?Promise.resolve():Promise.resolve(t||"Invalid URL")};function mt(e){var t,n;(t=e).inputValidator||Object.keys(pt).forEach(e=>{t.input===e&&(t.inputValidator=pt[e])}),e.showLoaderOnConfirm&&!e.preConfirm&&s("showLoaderOnConfirm is set to true, but preConfirm is not defined.\nshowLoaderOnConfirm should be used together with preConfirm, see usage example:\nhttps://sweetalert2.github.io/#ajax-request"),(n=e).target&&("string"!=typeof n.target||document.querySelector(n.target))&&("string"==typeof n.target||n.target.appendChild)||(s('Target parameter is not valid, defaulting to "body"'),n.target="body"),"string"==typeof e.title&&(e.title=e.title.split("\n").join("
                                  ")),se(e)}const ht=["swal-title","swal-html","swal-footer"],gt=e=>{e="string"==typeof e.template?document.querySelector(e.template):e.template;if(!e)return{};e=e.content;return kt(e),Object.assign(bt(e),ft(e),yt(e),vt(e),wt(e),Ct(e,ht))},bt=e=>{const o={};return a(e.querySelectorAll("swal-param")).forEach(e=>{At(e,["name","value"]);var t=e.getAttribute("name");let n=e.getAttribute("value");"boolean"==typeof Re[t]&&"false"===n&&(n=!1),"object"==typeof Re[t]&&(n=JSON.parse(n)),o[t]=n}),o},ft=e=>{const n={};return a(e.querySelectorAll("swal-button")).forEach(e=>{At(e,["type","color","aria-label"]);var t=e.getAttribute("type");n["".concat(t,"ButtonText")]=e.innerHTML,n["show".concat(o(t),"Button")]=!0,e.hasAttribute("color")&&(n["".concat(t,"ButtonColor")]=e.getAttribute("color")),e.hasAttribute("aria-label")&&(n["".concat(t,"ButtonAriaLabel")]=e.getAttribute("aria-label"))}),n},yt=e=>{const t={},n=e.querySelector("swal-image");return n&&(At(n,["src","width","height","alt"]),n.hasAttribute("src")&&(t.imageUrl=n.getAttribute("src")),n.hasAttribute("width")&&(t.imageWidth=n.getAttribute("width")),n.hasAttribute("height")&&(t.imageHeight=n.getAttribute("height")),n.hasAttribute("alt")&&(t.imageAlt=n.getAttribute("alt"))),t},vt=e=>{const t={},n=e.querySelector("swal-icon");return n&&(At(n,["type","color"]),n.hasAttribute("type")&&(t.icon=n.getAttribute("type")),n.hasAttribute("color")&&(t.iconColor=n.getAttribute("color")),t.iconHtml=n.innerHTML),t},wt=e=>{const n={},t=e.querySelector("swal-input");t&&(At(t,["type","label","placeholder","value"]),n.input=t.getAttribute("type")||"text",t.hasAttribute("label")&&(n.inputLabel=t.getAttribute("label")),t.hasAttribute("placeholder")&&(n.inputPlaceholder=t.getAttribute("placeholder")),t.hasAttribute("value")&&(n.inputValue=t.getAttribute("value")));e=e.querySelectorAll("swal-input-option");return e.length&&(n.inputOptions={},a(e).forEach(e=>{At(e,["value"]);var t=e.getAttribute("value"),e=e.innerHTML;n.inputOptions[t]=e})),n},Ct=(e,t)=>{const n={};for(const o in t){const i=t[o],a=e.querySelector(i);a&&(At(a,[]),n[i.replace(/^swal-/,"")]=a.innerHTML.trim())}return n},kt=e=>{const t=ht.concat(["swal-param","swal-button","swal-image","swal-icon","swal-input","swal-input-option"]);a(e.children).forEach(e=>{e=e.tagName.toLowerCase();-1===t.indexOf(e)&&s("Unrecognized element <".concat(e,">"))})},At=(t,n)=>{a(t.attributes).forEach(e=>{-1===n.indexOf(e.name)&&s(['Unrecognized attribute "'.concat(e.name,'" on <').concat(t.tagName.toLowerCase(),">."),"".concat(n.length?"Allowed attributes are: ".concat(n.join(", ")):"To set the value, use HTML within the element.")])})},Bt=e=>{const t=b(),n=v();"function"==typeof e.willOpen&&e.willOpen(n);var o=window.getComputedStyle(document.body).overflowY;St(t,n,e),setTimeout(()=>{Pt(t,n)},10),M()&&(Et(t,e.scrollbarPadding,o),(()=>{const e=a(document.body.children);e.forEach(e=>{e===b()||e.contains(b())||(e.hasAttribute("aria-hidden")&&e.setAttribute("data-previous-aria-hidden",e.getAttribute("aria-hidden")),e.setAttribute("aria-hidden","true"))})})()),H()||Me.previousActiveElement||(Me.previousActiveElement=document.activeElement),"function"==typeof e.didOpen&&setTimeout(()=>e.didOpen(n)),_(t,h["no-transition"])},xt=e=>{const t=v();if(e.target===t){const n=b();t.removeEventListener(ue,xt),n.style.overflowY="auto"}},Pt=(e,t)=>{ue&&te(t)?(e.style.overflowY="hidden",t.addEventListener(ue,xt)):e.style.overflowY="auto"},Et=(e,t,n)=>{var o;(/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream||"MacIntel"===navigator.platform&&1{e.scrollTop=0})},St=(e,t,n)=>{W(e,n.showClass.backdrop),t.style.setProperty("opacity","0","important"),Z(t,"grid"),setTimeout(()=>{W(t,n.showClass.popup),t.style.removeProperty("opacity")},10),W([document.documentElement,document.body],h.shown),n.heightAuto&&n.backdrop&&!n.toast&&W([document.documentElement,document.body],h["height-auto"])},Tt=e=>e.checked?1:0,Lt=e=>e.checked?e.value:null,Ot=e=>e.files.length?null!==e.getAttribute("multiple")?e.files:e.files[0]:null,jt=(t,n)=>{const o=v(),i=e=>It[n.input](o,Mt(e),n);u(n.inputOptions)||p(n.inputOptions)?(De(P()),d(n.inputOptions).then(e=>{t.hideLoading(),i(e)})):"object"==typeof n.inputOptions?i(n.inputOptions):r("Unexpected type of inputOptions! Expected object, Map or Promise, got ".concat(typeof n.inputOptions))},Dt=(t,n)=>{const o=t.getInput();J(o),d(n.inputValue).then(e=>{o.value="number"===n.input?parseFloat(e)||0:"".concat(e),Z(o),o.focus(),t.hideLoading()}).catch(e=>{r("Error in inputValue promise: ".concat(e)),o.value="",Z(o),o.focus(),t.hideLoading()})},It={select:(e,t,i)=>{const a=K(e,h.select),s=(e,t,n)=>{const o=document.createElement("option");o.value=n,V(o,t),o.selected=Ht(n,i.inputValue),e.appendChild(o)};t.forEach(e=>{var t=e[0];const n=e[1];if(Array.isArray(n)){const o=document.createElement("optgroup");o.label=t,o.disabled=!1,a.appendChild(o),n.forEach(e=>s(o,e[1],e[0]))}else s(a,n,t)}),a.focus()},radio:(e,t,a)=>{const s=K(e,h.radio);t.forEach(e=>{var t=e[0],e=e[1];const n=document.createElement("input"),o=document.createElement("label");n.type="radio",n.name=h.radio,n.value=t,Ht(t,a.inputValue)&&(n.checked=!0);const i=document.createElement("span");V(i,e),i.className=h.label,o.appendChild(n),o.appendChild(i),s.appendChild(o)});const n=s.querySelectorAll("input");n.length&&n[0].focus()}},Mt=n=>{const o=[];return"undefined"!=typeof Map&&n instanceof Map?n.forEach((e,t)=>{let n=e;"object"==typeof n&&(n=Mt(n)),o.push([t,n])}):Object.keys(n).forEach(e=>{let t=n[e];"object"==typeof t&&(t=Mt(t)),o.push([e,t])}),o},Ht=(e,t)=>t&&t.toString()===e.toString(),qt=(e,t)=>{var n=he.innerParams.get(e),o=((e,t)=>{const n=e.getInput();if(!n)return null;switch(t.input){case"checkbox":return Tt(n);case"radio":return Lt(n);case"file":return Ot(n);default:return t.inputAutoTrim?n.value.trim():n.value}})(e,n);n.inputValidator?Vt(e,o,t):e.getInput().checkValidity()?("deny"===t?Nt:Ft)(e,o):(e.enableButtons(),e.showValidationMessage(n.validationMessage))},Vt=(t,n,o)=>{const e=he.innerParams.get(t);t.disableInput();const i=Promise.resolve().then(()=>d(e.inputValidator(n,e.validationMessage)));i.then(e=>{t.enableButtons(),t.enableInput(),e?t.showValidationMessage(e):("deny"===o?Nt:Ft)(t,n)})},Nt=(t,n)=>{const e=he.innerParams.get(t||void 0);if(e.showLoaderOnDeny&&De(E()),e.preDeny){const o=Promise.resolve().then(()=>d(e.preDeny(n,e.validationMessage)));o.then(e=>{!1===e?t.hideLoading():t.closePopup({isDenied:!0,value:void 0===e?n:e})})}else t.closePopup({isDenied:!0,value:n})},Ut=(e,t)=>{e.closePopup({isConfirmed:!0,value:t})},Ft=(t,n)=>{const e=he.innerParams.get(t||void 0);if(e.showLoaderOnConfirm&&De(),e.preConfirm){t.resetValidationMessage();const o=Promise.resolve().then(()=>d(e.preConfirm(n,e.validationMessage)));o.then(e=>{G(x())||!1===e?t.hideLoading():Ut(t,void 0===e?n:e)})}else Ut(t,n)},Rt=(e,t,n)=>{const o=I();if(o.length)return(t+=n)===o.length?t=0:-1===t&&(t=o.length-1),o[t].focus();v().focus()},zt=["ArrowRight","ArrowDown"],Wt=["ArrowLeft","ArrowUp"],_t=(e,t,n)=>{var o=he.innerParams.get(e);o&&(o.stopKeydownPropagation&&t.stopPropagation(),"Enter"===t.key?Kt(e,t,o):"Tab"===t.key?Yt(t,o):[...zt,...Wt].includes(t.key)?Zt(t.key):"Escape"===t.key&&Jt(t,o,n))},Kt=(e,t,n)=>{t.isComposing||t.target&&e.getInput()&&t.target.outerHTML===e.getInput().outerHTML&&(["textarea","file"].includes(n.input)||(je(),t.preventDefault()))},Yt=(e,t)=>{var n=e.target,o=I();let i=-1;for(let e=0;e{const t=P(),n=E(),o=T();if([t,n,o].includes(document.activeElement)){e=zt.includes(e)?"nextElementSibling":"previousElementSibling";const i=document.activeElement[e];i&&i.focus()}},Jt=(e,t,n)=>{c(t.allowEscapeKey)&&(e.preventDefault(),n(l.esc))},Xt=(t,e,n)=>{e.popup.onclick=()=>{var e=he.innerParams.get(t);e.showConfirmButton||e.showDenyButton||e.showCancelButton||e.showCloseButton||e.timer||e.input||n(l.close)}};let $t=!1;const Gt=t=>{t.popup.onmousedown=()=>{t.container.onmouseup=function(e){t.container.onmouseup=void 0,e.target===t.container&&($t=!0)}}},Qt=t=>{t.container.onmousedown=()=>{t.popup.onmouseup=function(e){t.popup.onmouseup=void 0,e.target!==t.popup&&!t.popup.contains(e.target)||($t=!0)}}},en=(n,o,i)=>{o.container.onclick=e=>{var t=he.innerParams.get(n);$t?$t=!1:e.target===o.container&&c(t.allowOutsideClick)&&i(l.backdrop)}};const tn=(e,t,n)=>{var o=j();J(o),t.timer&&(e.timeout=new dt(()=>{n("timer"),delete e.timeout},t.timer),t.timerProgressBar&&(Z(o),setTimeout(()=>{e.timeout&&e.timeout.running&&ne(t.timer)})))},nn=(e,t)=>{if(!t.toast)return c(t.allowEnterKey)?void(on(e,t)||Rt(0,-1,1)):an()},on=(e,t)=>t.focusDeny&&G(e.denyButton)?(e.denyButton.focus(),!0):t.focusCancel&&G(e.cancelButton)?(e.cancelButton.focus(),!0):!(!t.focusConfirm||!G(e.confirmButton))&&(e.confirmButton.focus(),!0),an=()=>{document.activeElement&&"function"==typeof document.activeElement.blur&&document.activeElement.blur()};const sn=e=>{for(const t in e)e[t]=new WeakMap};e=Object.freeze({hideLoading:Xe,disableLoading:Xe,getInput:function(e){var t=he.innerParams.get(e||this);return(e=he.domCache.get(e||this))?F(e.popup,t.input):null},close:st,closePopup:st,closeModal:st,closeToast:st,enableButtons:function(){lt(this,["confirmButton","denyButton","cancelButton"],!1)},disableButtons:function(){lt(this,["confirmButton","denyButton","cancelButton"],!0)},enableInput:function(){return ut(this.getInput(),!1)},disableInput:function(){return ut(this.getInput(),!0)},showValidationMessage:function(e){const t=he.domCache.get(this);var n=he.innerParams.get(this);V(t.validationMessage,e),t.validationMessage.className=h["validation-message"],n.customClass&&n.customClass.validationMessage&&W(t.validationMessage,n.customClass.validationMessage),Z(t.validationMessage);const o=this.getInput();o&&(o.setAttribute("aria-invalid",!0),o.setAttribute("aria-describedby",h["validation-message"]),R(o),W(o,h.inputerror))},resetValidationMessage:function(){var e=he.domCache.get(this);e.validationMessage&&J(e.validationMessage);const t=this.getInput();t&&(t.removeAttribute("aria-invalid"),t.removeAttribute("aria-describedby"),_(t,h.inputerror))},getProgressSteps:function(){return he.domCache.get(this).progressSteps},_main:function(e,t={}){Ze(Object.assign({},t,e)),Me.currentInstance&&(Me.currentInstance._destroy(),M()&&ot()),Me.currentInstance=this,mt(e=((e,t)=>{const n=gt(e),o=Object.assign({},Re,t,n,e);return o.showClass=Object.assign({},Re.showClass,o.showClass),o.hideClass=Object.assign({},Re.hideClass,o.hideClass),o})(e,t)),Object.freeze(e),Me.timeout&&(Me.timeout.stop(),delete Me.timeout),clearTimeout(Me.restoreFocusTimeout);var s,r,c,t=(e=>{const t={popup:v(),container:b(),actions:L(),confirmButton:P(),denyButton:E(),cancelButton:T(),loader:S(),closeButton:D(),validationMessage:x(),progressSteps:B()};return he.domCache.set(e,t),t})(this);return Oe(this,e),he.innerParams.set(this,e),s=this,r=t,c=e,new Promise(e=>{const t=e=>{s.closePopup({isDismissed:!0,dismiss:e})};var n,o,i,a;it.swalPromiseResolve.set(s,e),r.confirmButton.onclick=()=>(e=>{var t=he.innerParams.get(e);e.disableButtons(),t.input?qt(e,"confirm"):Ft(e,!0)})(s),r.denyButton.onclick=()=>(e=>{var t=he.innerParams.get(e);e.disableButtons(),t.returnInputValueOnDeny?qt(e,"deny"):Nt(e,!1)})(s),r.cancelButton.onclick=()=>((e,t)=>{e.disableButtons(),t(l.cancel)})(s,t),r.closeButton.onclick=()=>t(l.close),n=s,a=r,e=t,he.innerParams.get(n).toast?Xt(n,a,e):(Gt(a),Qt(a),en(n,a,e)),o=s,a=Me,e=c,i=t,a.keydownTarget&&a.keydownHandlerAdded&&(a.keydownTarget.removeEventListener("keydown",a.keydownHandler,{capture:a.keydownListenerCapture}),a.keydownHandlerAdded=!1),e.toast||(a.keydownHandler=e=>_t(o,e,i),a.keydownTarget=e.keydownListenerCapture?window:v(),a.keydownListenerCapture=e.keydownListenerCapture,a.keydownTarget.addEventListener("keydown",a.keydownHandler,{capture:a.keydownListenerCapture}),a.keydownHandlerAdded=!0),e=s,"select"===(a=c).input||"radio"===a.input?jt(e,a):["text","email","number","tel","textarea"].includes(a.input)&&(u(a.inputValue)||p(a.inputValue))&&(De(P()),Dt(e,a)),Bt(c),tn(Me,c,t),nn(r,c),setTimeout(()=>{r.container.scrollTop=0})})},update:function(t){var e=v(),n=he.innerParams.get(this);if(!e||N(e,n.hideClass.popup))return s("You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup.");const o={};Object.keys(t).forEach(e=>{ln.isUpdatableParameter(e)?o[e]=t[e]:s('Invalid parameter to update: "'.concat(e,'". Updatable params are listed here: https://github.com/sweetalert2/sweetalert2/blob/master/src/utils/params.js\n\nIf you think this parameter should be updatable, request it here: https://github.com/sweetalert2/sweetalert2/issues/new?template=02_feature_request.md'))}),n=Object.assign({},n,o),Oe(this,n),he.innerParams.set(this,n),Object.defineProperties(this,{params:{value:Object.assign({},this.params,t),writable:!1,enumerable:!0}})},_destroy:function(){var e=he.domCache.get(this);const t=he.innerParams.get(this);t&&(e.popup&&Me.swalCloseEventFinishedCallback&&(Me.swalCloseEventFinishedCallback(),delete Me.swalCloseEventFinishedCallback),Me.deferDisposalTimer&&(clearTimeout(Me.deferDisposalTimer),delete Me.deferDisposalTimer),"function"==typeof t.didDestroy&&t.didDestroy(),delete this.params,delete Me.keydownHandler,delete Me.keydownTarget,sn(he),sn(it),delete Me.currentInstance)}});let rn;class cn{constructor(...e){"undefined"!=typeof window&&(rn=this,e=Object.freeze(this.constructor.argsToParams(e)),Object.defineProperties(this,{params:{value:e,writable:!1,enumerable:!0,configurable:!0}}),e=this._main(this.params),he.promise.set(this,e))}then(e){const t=he.promise.get(this);return t.then(e)}finally(e){const t=he.promise.get(this);return t.finally(e)}}Object.assign(cn.prototype,e),Object.assign(cn,Je),Object.keys(e).forEach(t=>{cn[t]=function(...e){if(rn)return rn[t](...e)}}),cn.DismissReason=l,cn.version="11.1.5";const ln=cn;return ln.default=ln,ln}),void 0!==this&&this.Sweetalert2&&(this.swal=this.sweetAlert=this.Swal=this.SweetAlert=this.Sweetalert2); \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Menus/MenuItemAdminAppService.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Menus/MenuItemAdminAppService.cs index f3fadf56fb..7fb783cdc1 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Menus/MenuItemAdminAppService.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/Menus/MenuItemAdminAppService.cs @@ -60,9 +60,15 @@ namespace Volo.CmsKit.Admin.Menus input.Order, input.Target, input.ElementId, - input.CssClass + input.CssClass, + CurrentTenant.Id ); + if (input.PageId.HasValue) + { + MenuManager.SetPageUrl(menuItem, await PageRepository.GetAsync(input.PageId.Value)); + } + await MenuItemRepository.InsertAsync(menuItem); return ObjectMapper.Map(menuItem); diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/BlogAdminClientProxy.Generated.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/BlogAdminClientProxy.Generated.cs index df328f38d9..132a53a4eb 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/BlogAdminClientProxy.Generated.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/BlogAdminClientProxy.Generated.cs @@ -17,27 +17,43 @@ namespace Volo.CmsKit.Admin.Blogs.ClientProxies { public virtual async Task GetAsync(Guid id) { - return await RequestAsync(nameof(GetAsync), id); + return await RequestAsync(nameof(GetAsync), new ClientProxyRequestTypeValue + { + { typeof(Guid), id } + }); } public virtual async Task> GetListAsync(BlogGetListInput input) { - return await RequestAsync>(nameof(GetListAsync), input); + return await RequestAsync>(nameof(GetListAsync), new ClientProxyRequestTypeValue + { + { typeof(BlogGetListInput), input } + }); } public virtual async Task CreateAsync(CreateBlogDto input) { - return await RequestAsync(nameof(CreateAsync), input); + return await RequestAsync(nameof(CreateAsync), new ClientProxyRequestTypeValue + { + { typeof(CreateBlogDto), input } + }); } public virtual async Task UpdateAsync(Guid id, UpdateBlogDto input) { - return await RequestAsync(nameof(UpdateAsync), id, input); + return await RequestAsync(nameof(UpdateAsync), new ClientProxyRequestTypeValue + { + { typeof(Guid), id }, + { typeof(UpdateBlogDto), input } + }); } public virtual async Task DeleteAsync(Guid id) { - await RequestAsync(nameof(DeleteAsync), id); + await RequestAsync(nameof(DeleteAsync), new ClientProxyRequestTypeValue + { + { typeof(Guid), id } + }); } } } diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/BlogFeatureAdminClientProxy.Generated.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/BlogFeatureAdminClientProxy.Generated.cs index 9449270499..a94158fc14 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/BlogFeatureAdminClientProxy.Generated.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/BlogFeatureAdminClientProxy.Generated.cs @@ -19,12 +19,19 @@ namespace Volo.CmsKit.Admin.Blogs.ClientProxies { public virtual async Task> GetListAsync(Guid blogId) { - return await RequestAsync>(nameof(GetListAsync), blogId); + return await RequestAsync>(nameof(GetListAsync), new ClientProxyRequestTypeValue + { + { typeof(Guid), blogId } + }); } public virtual async Task SetAsync(Guid blogId, BlogFeatureInputDto dto) { - await RequestAsync(nameof(SetAsync), blogId, dto); + await RequestAsync(nameof(SetAsync), new ClientProxyRequestTypeValue + { + { typeof(Guid), blogId }, + { typeof(BlogFeatureInputDto), dto } + }); } } } diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/BlogPostAdminClientProxy.Generated.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/BlogPostAdminClientProxy.Generated.cs index 47bf77459c..66cbcc8c65 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/BlogPostAdminClientProxy.Generated.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/BlogPostAdminClientProxy.Generated.cs @@ -17,27 +17,43 @@ namespace Volo.CmsKit.Admin.Blogs.ClientProxies { public virtual async Task CreateAsync(CreateBlogPostDto input) { - return await RequestAsync(nameof(CreateAsync), input); + return await RequestAsync(nameof(CreateAsync), new ClientProxyRequestTypeValue + { + { typeof(CreateBlogPostDto), input } + }); } public virtual async Task DeleteAsync(Guid id) { - await RequestAsync(nameof(DeleteAsync), id); + await RequestAsync(nameof(DeleteAsync), new ClientProxyRequestTypeValue + { + { typeof(Guid), id } + }); } public virtual async Task GetAsync(Guid id) { - return await RequestAsync(nameof(GetAsync), id); + return await RequestAsync(nameof(GetAsync), new ClientProxyRequestTypeValue + { + { typeof(Guid), id } + }); } public virtual async Task> GetListAsync(BlogPostGetListInput input) { - return await RequestAsync>(nameof(GetListAsync), input); + return await RequestAsync>(nameof(GetListAsync), new ClientProxyRequestTypeValue + { + { typeof(BlogPostGetListInput), input } + }); } public virtual async Task UpdateAsync(Guid id, UpdateBlogPostDto input) { - return await RequestAsync(nameof(UpdateAsync), id, input); + return await RequestAsync(nameof(UpdateAsync), new ClientProxyRequestTypeValue + { + { typeof(Guid), id }, + { typeof(UpdateBlogPostDto), input } + }); } } } diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/CommentAdminClientProxy.Generated.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/CommentAdminClientProxy.Generated.cs index 9bab1d6f5f..70714febc9 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/CommentAdminClientProxy.Generated.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/CommentAdminClientProxy.Generated.cs @@ -17,17 +17,26 @@ namespace Volo.CmsKit.Admin.Comments.ClientProxies { public virtual async Task> GetListAsync(CommentGetListInput input) { - return await RequestAsync>(nameof(GetListAsync), input); + return await RequestAsync>(nameof(GetListAsync), new ClientProxyRequestTypeValue + { + { typeof(CommentGetListInput), input } + }); } public virtual async Task GetAsync(Guid id) { - return await RequestAsync(nameof(GetAsync), id); + return await RequestAsync(nameof(GetAsync), new ClientProxyRequestTypeValue + { + { typeof(Guid), id } + }); } public virtual async Task DeleteAsync(Guid id) { - await RequestAsync(nameof(DeleteAsync), id); + await RequestAsync(nameof(DeleteAsync), new ClientProxyRequestTypeValue + { + { typeof(Guid), id } + }); } } } diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/EntityTagAdminClientProxy.Generated.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/EntityTagAdminClientProxy.Generated.cs index 80099abad4..45e81f4fae 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/EntityTagAdminClientProxy.Generated.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/EntityTagAdminClientProxy.Generated.cs @@ -17,17 +17,26 @@ namespace Volo.CmsKit.Admin.Tags.ClientProxies { public virtual async Task AddTagToEntityAsync(EntityTagCreateDto input) { - await RequestAsync(nameof(AddTagToEntityAsync), input); + await RequestAsync(nameof(AddTagToEntityAsync), new ClientProxyRequestTypeValue + { + { typeof(EntityTagCreateDto), input } + }); } public virtual async Task RemoveTagFromEntityAsync(EntityTagRemoveDto input) { - await RequestAsync(nameof(RemoveTagFromEntityAsync), input); + await RequestAsync(nameof(RemoveTagFromEntityAsync), new ClientProxyRequestTypeValue + { + { typeof(EntityTagRemoveDto), input } + }); } public virtual async Task SetEntityTagsAsync(EntityTagSetDto input) { - await RequestAsync(nameof(SetEntityTagsAsync), input); + await RequestAsync(nameof(SetEntityTagsAsync), new ClientProxyRequestTypeValue + { + { typeof(EntityTagSetDto), input } + }); } } } diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/MediaDescriptorAdminClientProxy.Generated.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/MediaDescriptorAdminClientProxy.Generated.cs index 4bff5ab073..08bad64e4b 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/MediaDescriptorAdminClientProxy.Generated.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/MediaDescriptorAdminClientProxy.Generated.cs @@ -17,12 +17,19 @@ namespace Volo.CmsKit.Admin.MediaDescriptors.ClientProxies { public virtual async Task CreateAsync(string entityType, CreateMediaInputWithStream inputStream) { - return await RequestAsync(nameof(CreateAsync), entityType, inputStream); + return await RequestAsync(nameof(CreateAsync), new ClientProxyRequestTypeValue + { + { typeof(string), entityType }, + { typeof(CreateMediaInputWithStream), inputStream } + }); } public virtual async Task DeleteAsync(Guid id) { - await RequestAsync(nameof(DeleteAsync), id); + await RequestAsync(nameof(DeleteAsync), new ClientProxyRequestTypeValue + { + { typeof(Guid), id } + }); } } } diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/MenuItemAdminClientProxy.Generated.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/MenuItemAdminClientProxy.Generated.cs index 59407b4718..90b997a120 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/MenuItemAdminClientProxy.Generated.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/MenuItemAdminClientProxy.Generated.cs @@ -23,32 +23,52 @@ namespace Volo.CmsKit.Admin.Menus.ClientProxies public virtual async Task GetAsync(Guid id) { - return await RequestAsync(nameof(GetAsync), id); + return await RequestAsync(nameof(GetAsync), new ClientProxyRequestTypeValue + { + { typeof(Guid), id } + }); } public virtual async Task CreateAsync(MenuItemCreateInput input) { - return await RequestAsync(nameof(CreateAsync), input); + return await RequestAsync(nameof(CreateAsync), new ClientProxyRequestTypeValue + { + { typeof(MenuItemCreateInput), input } + }); } public virtual async Task UpdateAsync(Guid id, MenuItemUpdateInput input) { - return await RequestAsync(nameof(UpdateAsync), id, input); + return await RequestAsync(nameof(UpdateAsync), new ClientProxyRequestTypeValue + { + { typeof(Guid), id }, + { typeof(MenuItemUpdateInput), input } + }); } public virtual async Task DeleteAsync(Guid id) { - await RequestAsync(nameof(DeleteAsync), id); + await RequestAsync(nameof(DeleteAsync), new ClientProxyRequestTypeValue + { + { typeof(Guid), id } + }); } public virtual async Task MoveMenuItemAsync(Guid id, MenuItemMoveInput input) { - await RequestAsync(nameof(MoveMenuItemAsync), id, input); + await RequestAsync(nameof(MoveMenuItemAsync), new ClientProxyRequestTypeValue + { + { typeof(Guid), id }, + { typeof(MenuItemMoveInput), input } + }); } public virtual async Task> GetPageLookupAsync(PageLookupInputDto input) { - return await RequestAsync>(nameof(GetPageLookupAsync), input); + return await RequestAsync>(nameof(GetPageLookupAsync), new ClientProxyRequestTypeValue + { + { typeof(PageLookupInputDto), input } + }); } } } diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/PageAdminClientProxy.Generated.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/PageAdminClientProxy.Generated.cs index 255e8290ce..e65f9d0587 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/PageAdminClientProxy.Generated.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/PageAdminClientProxy.Generated.cs @@ -17,27 +17,43 @@ namespace Volo.CmsKit.Admin.Pages.ClientProxies { public virtual async Task GetAsync(Guid id) { - return await RequestAsync(nameof(GetAsync), id); + return await RequestAsync(nameof(GetAsync), new ClientProxyRequestTypeValue + { + { typeof(Guid), id } + }); } public virtual async Task> GetListAsync(GetPagesInputDto input) { - return await RequestAsync>(nameof(GetListAsync), input); + return await RequestAsync>(nameof(GetListAsync), new ClientProxyRequestTypeValue + { + { typeof(GetPagesInputDto), input } + }); } public virtual async Task CreateAsync(CreatePageInputDto input) { - return await RequestAsync(nameof(CreateAsync), input); + return await RequestAsync(nameof(CreateAsync), new ClientProxyRequestTypeValue + { + { typeof(CreatePageInputDto), input } + }); } public virtual async Task UpdateAsync(Guid id, UpdatePageInputDto input) { - return await RequestAsync(nameof(UpdateAsync), id, input); + return await RequestAsync(nameof(UpdateAsync), new ClientProxyRequestTypeValue + { + { typeof(Guid), id }, + { typeof(UpdatePageInputDto), input } + }); } public virtual async Task DeleteAsync(Guid id) { - await RequestAsync(nameof(DeleteAsync), id); + await RequestAsync(nameof(DeleteAsync), new ClientProxyRequestTypeValue + { + { typeof(Guid), id } + }); } } } diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/TagAdminClientProxy.Generated.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/TagAdminClientProxy.Generated.cs index a679b1e935..c141040804 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/TagAdminClientProxy.Generated.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.HttpApi.Client/ClientProxies/TagAdminClientProxy.Generated.cs @@ -19,27 +19,43 @@ namespace Volo.CmsKit.Admin.Tags.ClientProxies { public virtual async Task CreateAsync(TagCreateDto input) { - return await RequestAsync(nameof(CreateAsync), input); + return await RequestAsync(nameof(CreateAsync), new ClientProxyRequestTypeValue + { + { typeof(TagCreateDto), input } + }); } public virtual async Task DeleteAsync(Guid id) { - await RequestAsync(nameof(DeleteAsync), id); + await RequestAsync(nameof(DeleteAsync), new ClientProxyRequestTypeValue + { + { typeof(Guid), id } + }); } public virtual async Task GetAsync(Guid id) { - return await RequestAsync(nameof(GetAsync), id); + return await RequestAsync(nameof(GetAsync), new ClientProxyRequestTypeValue + { + { typeof(Guid), id } + }); } public virtual async Task> GetListAsync(TagGetListInput input) { - return await RequestAsync>(nameof(GetListAsync), input); + return await RequestAsync>(nameof(GetListAsync), new ClientProxyRequestTypeValue + { + { typeof(TagGetListInput), input } + }); } public virtual async Task UpdateAsync(Guid id, TagUpdateDto input) { - return await RequestAsync(nameof(UpdateAsync), id, input); + return await RequestAsync(nameof(UpdateAsync), new ClientProxyRequestTypeValue + { + { typeof(Guid), id }, + { typeof(TagUpdateDto), input } + }); } public virtual async Task> GetTagDefinitionsAsync() diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.HttpApi.Client/ClientProxies/BlogFeatureClientProxy.Generated.cs b/modules/cms-kit/src/Volo.CmsKit.Common.HttpApi.Client/ClientProxies/BlogFeatureClientProxy.Generated.cs index 3370cb52da..494e4aaed4 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Common.HttpApi.Client/ClientProxies/BlogFeatureClientProxy.Generated.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Common.HttpApi.Client/ClientProxies/BlogFeatureClientProxy.Generated.cs @@ -17,7 +17,11 @@ namespace Volo.CmsKit.Blogs.ClientProxies { public virtual async Task GetOrDefaultAsync(Guid blogId, string featureName) { - return await RequestAsync(nameof(GetOrDefaultAsync), blogId, featureName); + return await RequestAsync(nameof(GetOrDefaultAsync), new ClientProxyRequestTypeValue + { + { typeof(Guid), blogId }, + { typeof(string), featureName } + }); } } } diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.HttpApi.Client/ClientProxies/MediaDescriptorClientProxy.Generated.cs b/modules/cms-kit/src/Volo.CmsKit.Common.HttpApi.Client/ClientProxies/MediaDescriptorClientProxy.Generated.cs index da5f7ae99e..39f4e1eb82 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Common.HttpApi.Client/ClientProxies/MediaDescriptorClientProxy.Generated.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Common.HttpApi.Client/ClientProxies/MediaDescriptorClientProxy.Generated.cs @@ -18,7 +18,10 @@ namespace Volo.CmsKit.MediaDescriptors.ClientProxies { public virtual async Task DownloadAsync(Guid id) { - return await RequestAsync(nameof(DownloadAsync), id); + return await RequestAsync(nameof(DownloadAsync), new ClientProxyRequestTypeValue + { + { typeof(Guid), id } + }); } } } diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Menus/MenuItem.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Menus/MenuItem.cs index 65d6b0e1ca..34b986b4d1 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Menus/MenuItem.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Menus/MenuItem.cs @@ -23,7 +23,7 @@ namespace Volo.CmsKit.Menus public string DisplayName { get; protected set; } public bool IsActive { get; set; } - + [NotNull] public string Url { get; protected set; } @@ -39,7 +39,7 @@ namespace Volo.CmsKit.Menus public Guid? PageId { get; protected set; } - public Guid? TenantId { get; protected set; } + public Guid? TenantId { get; protected set; } public MenuItem(Guid id, [NotNull] string displayName, @@ -50,8 +50,9 @@ namespace Volo.CmsKit.Menus int order = 0, [CanBeNull] string target = null, [CanBeNull] string elementId = null, - [CanBeNull] string cssClass = null) - :base(id) + [CanBeNull] string cssClass = null, + [CanBeNull] Guid? tenantId = null) + : base(id) { SetDisplayName(displayName); IsActive = isActive; @@ -62,6 +63,7 @@ namespace Volo.CmsKit.Menus Target = target; ElementId = elementId; CssClass = cssClass; + TenantId = tenantId; } public void SetDisplayName([NotNull] string displayName) @@ -69,7 +71,7 @@ namespace Volo.CmsKit.Menus DisplayName = Check.NotNullOrEmpty(displayName, nameof(displayName), MenuItemConsts.MaxDisplayNameLength); } - public void SetUrl([NotNull]string url) + public void SetUrl([NotNull] string url) { Url = Check.NotNullOrEmpty(url, nameof(url), MenuItemConsts.MaxUrlLength); } diff --git a/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/EntityFrameworkCore/CmsKitDbContextModelCreatingExtensions.cs b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/EntityFrameworkCore/CmsKitDbContextModelCreatingExtensions.cs index f7964c1711..14a242a9de 100644 --- a/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/EntityFrameworkCore/CmsKitDbContextModelCreatingExtensions.cs +++ b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/EntityFrameworkCore/CmsKitDbContextModelCreatingExtensions.cs @@ -1,5 +1,4 @@ using Microsoft.EntityFrameworkCore; -using System; using Volo.Abp; using Volo.Abp.EntityFrameworkCore.Modeling; using Volo.Abp.GlobalFeatures; @@ -20,23 +19,15 @@ namespace Volo.CmsKit.EntityFrameworkCore public static class CmsKitDbContextModelCreatingExtensions { public static void ConfigureCmsKit( - this ModelBuilder builder, - Action optionsAction = null) + this ModelBuilder builder) { Check.NotNull(builder, nameof(builder)); - var options = new CmsKitModelBuilderConfigurationOptions( - CmsKitDbProperties.DbTablePrefix, - CmsKitDbProperties.DbSchema - ); - - optionsAction?.Invoke(options); - if (GlobalFeatureManager.Instance.IsEnabled()) { builder.Entity(b => { - b.ToTable(options.TablePrefix + "Users", options.Schema); + b.ToTable(CmsKitDbProperties.DbTablePrefix + "Users", CmsKitDbProperties.DbSchema); b.ConfigureByConvention(); b.ConfigureAbpUser(); @@ -56,7 +47,7 @@ namespace Volo.CmsKit.EntityFrameworkCore { builder.Entity(b => { - b.ToTable(options.TablePrefix + "UserReactions", options.Schema); + b.ToTable(CmsKitDbProperties.DbTablePrefix + "UserReactions", CmsKitDbProperties.DbSchema); b.ConfigureByConvention(); @@ -79,7 +70,7 @@ namespace Volo.CmsKit.EntityFrameworkCore { builder.Entity(b => { - b.ToTable(options.TablePrefix + "Comments", options.Schema); + b.ToTable(CmsKitDbProperties.DbTablePrefix + "Comments", CmsKitDbProperties.DbSchema); b.ConfigureByConvention(); @@ -103,7 +94,7 @@ namespace Volo.CmsKit.EntityFrameworkCore { builder.Entity(r => { - r.ToTable(options.TablePrefix + "Ratings", options.Schema); + r.ToTable(CmsKitDbProperties.DbTablePrefix + "Ratings", CmsKitDbProperties.DbSchema); r.ConfigureByConvention(); @@ -125,7 +116,7 @@ namespace Volo.CmsKit.EntityFrameworkCore { builder.Entity(b => { - b.ToTable(options.TablePrefix + "Tags", options.Schema); + b.ToTable(CmsKitDbProperties.DbTablePrefix + "Tags", CmsKitDbProperties.DbSchema); b.ConfigureByConvention(); @@ -143,7 +134,7 @@ namespace Volo.CmsKit.EntityFrameworkCore builder.Entity(b => { - b.ToTable(options.TablePrefix + "EntityTags", options.Schema); + b.ToTable(CmsKitDbProperties.DbTablePrefix + "EntityTags", CmsKitDbProperties.DbSchema); b.ConfigureByConvention(); @@ -167,7 +158,7 @@ namespace Volo.CmsKit.EntityFrameworkCore { builder.Entity(b => { - b.ToTable(options.TablePrefix + "Pages", options.Schema); + b.ToTable(CmsKitDbProperties.DbTablePrefix + "Pages", CmsKitDbProperties.DbSchema); b.ConfigureByConvention(); @@ -189,7 +180,7 @@ namespace Volo.CmsKit.EntityFrameworkCore { builder.Entity(b => { - b.ToTable(options.TablePrefix + "Blogs", options.Schema); + b.ToTable(CmsKitDbProperties.DbTablePrefix + "Blogs", CmsKitDbProperties.DbSchema); b.ConfigureByConvention(); @@ -202,7 +193,7 @@ namespace Volo.CmsKit.EntityFrameworkCore builder.Entity(b => { - b.ToTable(options.TablePrefix + "BlogPosts", options.Schema); + b.ToTable(CmsKitDbProperties.DbTablePrefix + "BlogPosts", CmsKitDbProperties.DbSchema); b.ConfigureByConvention(); @@ -219,7 +210,7 @@ namespace Volo.CmsKit.EntityFrameworkCore builder.Entity(b => { - b.ToTable(options.TablePrefix + "BlogFeatures", options.Schema); + b.ToTable(CmsKitDbProperties.DbTablePrefix + "BlogFeatures", CmsKitDbProperties.DbSchema); b.ConfigureByConvention(); @@ -239,7 +230,7 @@ namespace Volo.CmsKit.EntityFrameworkCore { builder.Entity(b => { - b.ToTable(options.TablePrefix + "MediaDescriptors", options.Schema); + b.ToTable(CmsKitDbProperties.DbTablePrefix + "MediaDescriptors", CmsKitDbProperties.DbSchema); b.ConfigureByConvention(); @@ -260,7 +251,7 @@ namespace Volo.CmsKit.EntityFrameworkCore { builder.Entity(b => { - b.ToTable(options.TablePrefix + "MenuItems", options.Schema); + b.ToTable(CmsKitDbProperties.DbTablePrefix + "MenuItems", CmsKitDbProperties.DbSchema); b.ConfigureByConvention(); diff --git a/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/EntityFrameworkCore/CmsKitModelBuilderConfigurationOptions.cs b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/EntityFrameworkCore/CmsKitModelBuilderConfigurationOptions.cs deleted file mode 100644 index c62b36792c..0000000000 --- a/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/EntityFrameworkCore/CmsKitModelBuilderConfigurationOptions.cs +++ /dev/null @@ -1,18 +0,0 @@ -using JetBrains.Annotations; -using Volo.Abp.EntityFrameworkCore.Modeling; - -namespace Volo.CmsKit.EntityFrameworkCore -{ - public class CmsKitModelBuilderConfigurationOptions : AbpModelBuilderConfigurationOptions - { - public CmsKitModelBuilderConfigurationOptions( - [NotNull] string tablePrefix = "", - [CanBeNull] string schema = null) - : base( - tablePrefix, - schema) - { - - } - } -} \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/CmsKitMongoDbContextExtensions.cs b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/CmsKitMongoDbContextExtensions.cs index 9ff9ff8797..a7dbbda5c4 100644 --- a/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/CmsKitMongoDbContextExtensions.cs +++ b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/CmsKitMongoDbContextExtensions.cs @@ -1,5 +1,4 @@ -using System; -using Volo.Abp; +using Volo.Abp; using Volo.Abp.MongoDB; using Volo.CmsKit.Blogs; using Volo.CmsKit.Comments; @@ -16,17 +15,10 @@ namespace Volo.CmsKit.MongoDB public static class CmsKitMongoDbContextExtensions { public static void ConfigureCmsKit( - this IMongoModelBuilder builder, - Action optionsAction = null) + this IMongoModelBuilder builder) { Check.NotNull(builder, nameof(builder)); - var options = new CmsKitMongoModelBuilderConfigurationOptions( - CmsKitDbProperties.DbTablePrefix - ); - - optionsAction?.Invoke(options); - builder.Entity(x => { x.CollectionName = CmsKitDbProperties.DbTablePrefix + "Users"; diff --git a/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/CmsKitMongoModelBuilderConfigurationOptions.cs b/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/CmsKitMongoModelBuilderConfigurationOptions.cs deleted file mode 100644 index 70f21e758f..0000000000 --- a/modules/cms-kit/src/Volo.CmsKit.MongoDB/Volo/CmsKit/MongoDB/CmsKitMongoModelBuilderConfigurationOptions.cs +++ /dev/null @@ -1,14 +0,0 @@ -using JetBrains.Annotations; -using Volo.Abp.MongoDB; - -namespace Volo.CmsKit.MongoDB -{ - public class CmsKitMongoModelBuilderConfigurationOptions : AbpMongoModelBuilderConfigurationOptions - { - public CmsKitMongoModelBuilderConfigurationOptions( - [NotNull] string collectionPrefix = "") - : base(collectionPrefix) - { - } - } -} \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/BlogPostPublicClientProxy.Generated.cs b/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/BlogPostPublicClientProxy.Generated.cs index d87cf38286..9d917e844d 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/BlogPostPublicClientProxy.Generated.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/BlogPostPublicClientProxy.Generated.cs @@ -17,12 +17,20 @@ namespace Volo.CmsKit.Public.Blogs.ClientProxies { public virtual async Task GetAsync(string blogSlug, string blogPostSlug) { - return await RequestAsync(nameof(GetAsync), blogSlug, blogPostSlug); + return await RequestAsync(nameof(GetAsync), new ClientProxyRequestTypeValue + { + { typeof(string), blogSlug }, + { typeof(string), blogPostSlug } + }); } public virtual async Task> GetListAsync(string blogSlug, PagedAndSortedResultRequestDto input) { - return await RequestAsync>(nameof(GetListAsync), blogSlug, input); + return await RequestAsync>(nameof(GetListAsync), new ClientProxyRequestTypeValue + { + { typeof(string), blogSlug }, + { typeof(PagedAndSortedResultRequestDto), input } + }); } } } diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/CommentPublicClientProxy.Generated.cs b/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/CommentPublicClientProxy.Generated.cs index a5bfff4ee5..208cf561e4 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/CommentPublicClientProxy.Generated.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/CommentPublicClientProxy.Generated.cs @@ -17,22 +17,38 @@ namespace Volo.CmsKit.Public.Comments.ClientProxies { public virtual async Task> GetListAsync(string entityType, string entityId) { - return await RequestAsync>(nameof(GetListAsync), entityType, entityId); + return await RequestAsync>(nameof(GetListAsync), new ClientProxyRequestTypeValue + { + { typeof(string), entityType }, + { typeof(string), entityId } + }); } public virtual async Task CreateAsync(string entityType, string entityId, CreateCommentInput input) { - return await RequestAsync(nameof(CreateAsync), entityType, entityId, input); + return await RequestAsync(nameof(CreateAsync), new ClientProxyRequestTypeValue + { + { typeof(string), entityType }, + { typeof(string), entityId }, + { typeof(CreateCommentInput), input } + }); } public virtual async Task UpdateAsync(Guid id, UpdateCommentInput input) { - return await RequestAsync(nameof(UpdateAsync), id, input); + return await RequestAsync(nameof(UpdateAsync), new ClientProxyRequestTypeValue + { + { typeof(Guid), id }, + { typeof(UpdateCommentInput), input } + }); } public virtual async Task DeleteAsync(Guid id) { - await RequestAsync(nameof(DeleteAsync), id); + await RequestAsync(nameof(DeleteAsync), new ClientProxyRequestTypeValue + { + { typeof(Guid), id } + }); } } } diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/PagesPublicClientProxy.Generated.cs b/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/PagesPublicClientProxy.Generated.cs index 5ebaa3a0eb..cd206f0fc9 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/PagesPublicClientProxy.Generated.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/PagesPublicClientProxy.Generated.cs @@ -17,7 +17,10 @@ namespace Volo.CmsKit.Public.Pages.ClientProxies { public virtual async Task FindBySlugAsync(string slug) { - return await RequestAsync(nameof(FindBySlugAsync), slug); + return await RequestAsync(nameof(FindBySlugAsync), new ClientProxyRequestTypeValue + { + { typeof(string), slug } + }); } } } diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/RatingPublicClientProxy.Generated.cs b/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/RatingPublicClientProxy.Generated.cs index 5895de111d..19386e7602 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/RatingPublicClientProxy.Generated.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/RatingPublicClientProxy.Generated.cs @@ -18,17 +18,30 @@ namespace Volo.CmsKit.Public.Ratings.ClientProxies { public virtual async Task CreateAsync(string entityType, string entityId, CreateUpdateRatingInput input) { - return await RequestAsync(nameof(CreateAsync), entityType, entityId, input); + return await RequestAsync(nameof(CreateAsync), new ClientProxyRequestTypeValue + { + { typeof(string), entityType }, + { typeof(string), entityId }, + { typeof(CreateUpdateRatingInput), input } + }); } public virtual async Task DeleteAsync(string entityType, string entityId) { - await RequestAsync(nameof(DeleteAsync), entityType, entityId); + await RequestAsync(nameof(DeleteAsync), new ClientProxyRequestTypeValue + { + { typeof(string), entityType }, + { typeof(string), entityId } + }); } public virtual async Task> GetGroupedStarCountsAsync(string entityType, string entityId) { - return await RequestAsync>(nameof(GetGroupedStarCountsAsync), entityType, entityId); + return await RequestAsync>(nameof(GetGroupedStarCountsAsync), new ClientProxyRequestTypeValue + { + { typeof(string), entityType }, + { typeof(string), entityId } + }); } } } diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/ReactionPublicClientProxy.Generated.cs b/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/ReactionPublicClientProxy.Generated.cs index 84e08ee9fa..ef7018c014 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/ReactionPublicClientProxy.Generated.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/ReactionPublicClientProxy.Generated.cs @@ -17,17 +17,31 @@ namespace Volo.CmsKit.Public.Reactions.ClientProxies { public virtual async Task> GetForSelectionAsync(string entityType, string entityId) { - return await RequestAsync>(nameof(GetForSelectionAsync), entityType, entityId); + return await RequestAsync>(nameof(GetForSelectionAsync), new ClientProxyRequestTypeValue + { + { typeof(string), entityType }, + { typeof(string), entityId } + }); } public virtual async Task CreateAsync(string entityType, string entityId, string reaction) { - await RequestAsync(nameof(CreateAsync), entityType, entityId, reaction); + await RequestAsync(nameof(CreateAsync), new ClientProxyRequestTypeValue + { + { typeof(string), entityType }, + { typeof(string), entityId }, + { typeof(string), reaction } + }); } public virtual async Task DeleteAsync(string entityType, string entityId, string reaction) { - await RequestAsync(nameof(DeleteAsync), entityType, entityId, reaction); + await RequestAsync(nameof(DeleteAsync), new ClientProxyRequestTypeValue + { + { typeof(string), entityType }, + { typeof(string), entityId }, + { typeof(string), reaction } + }); } } } diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/TagPublicClientProxy.Generated.cs b/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/TagPublicClientProxy.Generated.cs index da7fe9c4e2..43a54a3857 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/TagPublicClientProxy.Generated.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Public.HttpApi.Client/ClientProxies/TagPublicClientProxy.Generated.cs @@ -18,7 +18,11 @@ namespace Volo.CmsKit.Public.Tags.ClientProxies { public virtual async Task> GetAllRelatedTagsAsync(string entityType, string entityId) { - return await RequestAsync>(nameof(GetAllRelatedTagsAsync), entityType, entityId); + return await RequestAsync>(nameof(GetAllRelatedTagsAsync), new ClientProxyRequestTypeValue + { + { typeof(string), entityType }, + { typeof(string), entityId } + }); } } } diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/Public/CmsKit/_ViewStart.cshtml b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/Public/CmsKit/_ViewStart.cshtml new file mode 100644 index 0000000000..932987dfd3 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/Public/CmsKit/_ViewStart.cshtml @@ -0,0 +1,5 @@ +@using Volo.Abp.AspNetCore.Mvc.UI.Theming +@inject IThemeManager ThemeManager +@{ + Layout = ThemeManager.CurrentTheme.GetPublicLayout(); +} diff --git a/modules/docs/app/VoloDocs.Web/VoloDocs.Web.csproj b/modules/docs/app/VoloDocs.Web/VoloDocs.Web.csproj index d557d273c9..e77d6a36ed 100644 --- a/modules/docs/app/VoloDocs.Web/VoloDocs.Web.csproj +++ b/modules/docs/app/VoloDocs.Web/VoloDocs.Web.csproj @@ -24,18 +24,23 @@ + + + + + diff --git a/modules/docs/app/VoloDocs.Web/VoloDocsWebModule.cs b/modules/docs/app/VoloDocs.Web/VoloDocsWebModule.cs index 8f9cdc7e0d..1602f55267 100644 --- a/modules/docs/app/VoloDocs.Web/VoloDocsWebModule.cs +++ b/modules/docs/app/VoloDocs.Web/VoloDocsWebModule.cs @@ -32,6 +32,7 @@ using Localization.Resources.AbpUi; using Microsoft.AspNetCore.Http; using Microsoft.Extensions.Hosting; using Volo.Abp.Account; +using Volo.Abp.PermissionManagement.HttpApi; using Volo.Abp.Validation.Localization; using Volo.Docs.Documents.FullSearch.Elastic; @@ -41,15 +42,20 @@ namespace VoloDocs.Web typeof(DocsWebModule), typeof(DocsAdminWebModule), typeof(DocsApplicationModule), + typeof(DocsHttpApiModule), typeof(DocsAdminApplicationModule), + typeof(DocsAdminHttpApiModule), typeof(VoloDocsEntityFrameworkCoreModule), typeof(AbpAutofacModule), typeof(AbpAccountWebModule), typeof(AbpAccountApplicationModule), + typeof(AbpAccountHttpApiModule), typeof(AbpIdentityWebModule), typeof(AbpIdentityApplicationModule), + typeof(AbpIdentityHttpApiModule), typeof(AbpPermissionManagementDomainIdentityModule), typeof(AbpPermissionManagementApplicationModule), + typeof(AbpPermissionManagementHttpApiModule), typeof(AbpAspNetCoreMvcUiBasicThemeModule) )] public class VoloDocsWebModule : AbpModule @@ -113,7 +119,7 @@ namespace VoloDocs.Web options.DocInclusionPredicate((docName, description) => true); options.CustomSchemaIds(type => type.FullName); }); - + Configure(options => { options.FileSets.AddEmbedded("VoloDocs.Web"); @@ -170,7 +176,7 @@ namespace VoloDocs.Web }); app.UseStatusCodePagesWithReExecute("/error/{0}"); - + //app.UseMiddleware(); app.UseConfiguredEndpoints(); diff --git a/modules/docs/app/VoloDocs.Web/wwwroot/libs/sweetalert2/sweetalert2.all.js b/modules/docs/app/VoloDocs.Web/wwwroot/libs/sweetalert2/sweetalert2.all.js new file mode 100644 index 0000000000..8cbddafe42 --- /dev/null +++ b/modules/docs/app/VoloDocs.Web/wwwroot/libs/sweetalert2/sweetalert2.all.js @@ -0,0 +1,3123 @@ +/*! +* sweetalert2 v11.1.5 +* Released under the MIT License. +*/ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : + typeof define === 'function' && define.amd ? define(factory) : + (global = global || self, global.Sweetalert2 = factory()); +}(this, function () { 'use strict'; + + const DismissReason = Object.freeze({ + cancel: 'cancel', + backdrop: 'backdrop', + close: 'close', + esc: 'esc', + timer: 'timer' + }); + + const consolePrefix = 'SweetAlert2:'; + /** + * Filter the unique values into a new array + * @param arr + */ + + const uniqueArray = arr => { + const result = []; + + for (let i = 0; i < arr.length; i++) { + if (result.indexOf(arr[i]) === -1) { + result.push(arr[i]); + } + } + + return result; + }; + /** + * Capitalize the first letter of a string + * @param str + */ + + const capitalizeFirstLetter = str => str.charAt(0).toUpperCase() + str.slice(1); + /** + * Convert NodeList to Array + * @param nodeList + */ + + const toArray = nodeList => Array.prototype.slice.call(nodeList); + /** + * Standardise console warnings + * @param message + */ + + const warn = message => { + console.warn("".concat(consolePrefix, " ").concat(typeof message === 'object' ? message.join(' ') : message)); + }; + /** + * Standardise console errors + * @param message + */ + + const error = message => { + console.error("".concat(consolePrefix, " ").concat(message)); + }; + /** + * Private global state for `warnOnce` + * @type {Array} + * @private + */ + + const previousWarnOnceMessages = []; + /** + * Show a console warning, but only if it hasn't already been shown + * @param message + */ + + const warnOnce = message => { + if (!previousWarnOnceMessages.includes(message)) { + previousWarnOnceMessages.push(message); + warn(message); + } + }; + /** + * Show a one-time console warning about deprecated params/methods + */ + + const warnAboutDeprecation = (deprecatedParam, useInstead) => { + warnOnce("\"".concat(deprecatedParam, "\" is deprecated and will be removed in the next major release. Please use \"").concat(useInstead, "\" instead.")); + }; + /** + * If `arg` is a function, call it (with no arguments or context) and return the result. + * Otherwise, just pass the value through + * @param arg + */ + + const callIfFunction = arg => typeof arg === 'function' ? arg() : arg; + const hasToPromiseFn = arg => arg && typeof arg.toPromise === 'function'; + const asPromise = arg => hasToPromiseFn(arg) ? arg.toPromise() : Promise.resolve(arg); + const isPromise = arg => arg && Promise.resolve(arg) === arg; + + const isJqueryElement = elem => typeof elem === 'object' && elem.jquery; + + const isElement = elem => elem instanceof Element || isJqueryElement(elem); + + const argsToParams = args => { + const params = {}; + + if (typeof args[0] === 'object' && !isElement(args[0])) { + Object.assign(params, args[0]); + } else { + ['title', 'html', 'icon'].forEach((name, index) => { + const arg = args[index]; + + if (typeof arg === 'string' || isElement(arg)) { + params[name] = arg; + } else if (arg !== undefined) { + error("Unexpected type of ".concat(name, "! Expected \"string\" or \"Element\", got ").concat(typeof arg)); + } + }); + } + + return params; + }; + + const swalPrefix = 'swal2-'; + const prefix = items => { + const result = {}; + + for (const i in items) { + result[items[i]] = swalPrefix + items[i]; + } + + return result; + }; + const swalClasses = prefix(['container', 'shown', 'height-auto', 'iosfix', 'popup', 'modal', 'no-backdrop', 'no-transition', 'toast', 'toast-shown', 'show', 'hide', 'close', 'title', 'html-container', 'actions', 'confirm', 'deny', 'cancel', 'default-outline', 'footer', 'icon', 'icon-content', 'image', 'input', 'file', 'range', 'select', 'radio', 'checkbox', 'label', 'textarea', 'inputerror', 'input-label', 'validation-message', 'progress-steps', 'active-progress-step', 'progress-step', 'progress-step-line', 'loader', 'loading', 'styled', 'top', 'top-start', 'top-end', 'top-left', 'top-right', 'center', 'center-start', 'center-end', 'center-left', 'center-right', 'bottom', 'bottom-start', 'bottom-end', 'bottom-left', 'bottom-right', 'grow-row', 'grow-column', 'grow-fullscreen', 'rtl', 'timer-progress-bar', 'timer-progress-bar-container', 'scrollbar-measure', 'icon-success', 'icon-warning', 'icon-info', 'icon-question', 'icon-error']); + const iconTypes = prefix(['success', 'warning', 'info', 'question', 'error']); + + const getContainer = () => document.body.querySelector(".".concat(swalClasses.container)); + const elementBySelector = selectorString => { + const container = getContainer(); + return container ? container.querySelector(selectorString) : null; + }; + + const elementByClass = className => { + return elementBySelector(".".concat(className)); + }; + + const getPopup = () => elementByClass(swalClasses.popup); + const getIcon = () => elementByClass(swalClasses.icon); + const getTitle = () => elementByClass(swalClasses.title); + const getHtmlContainer = () => elementByClass(swalClasses['html-container']); + const getImage = () => elementByClass(swalClasses.image); + const getProgressSteps = () => elementByClass(swalClasses['progress-steps']); + const getValidationMessage = () => elementByClass(swalClasses['validation-message']); + const getConfirmButton = () => elementBySelector(".".concat(swalClasses.actions, " .").concat(swalClasses.confirm)); + const getDenyButton = () => elementBySelector(".".concat(swalClasses.actions, " .").concat(swalClasses.deny)); + const getInputLabel = () => elementByClass(swalClasses['input-label']); + const getLoader = () => elementBySelector(".".concat(swalClasses.loader)); + const getCancelButton = () => elementBySelector(".".concat(swalClasses.actions, " .").concat(swalClasses.cancel)); + const getActions = () => elementByClass(swalClasses.actions); + const getFooter = () => elementByClass(swalClasses.footer); + const getTimerProgressBar = () => elementByClass(swalClasses['timer-progress-bar']); + const getCloseButton = () => elementByClass(swalClasses.close); // https://github.com/jkup/focusable/blob/master/index.js + + const focusable = "\n a[href],\n area[href],\n input:not([disabled]),\n select:not([disabled]),\n textarea:not([disabled]),\n button:not([disabled]),\n iframe,\n object,\n embed,\n [tabindex=\"0\"],\n [contenteditable],\n audio[controls],\n video[controls],\n summary\n"; + const getFocusableElements = () => { + const focusableElementsWithTabindex = toArray(getPopup().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')) // sort according to tabindex + .sort((a, b) => { + a = parseInt(a.getAttribute('tabindex')); + b = parseInt(b.getAttribute('tabindex')); + + if (a > b) { + return 1; + } else if (a < b) { + return -1; + } + + return 0; + }); + const otherFocusableElements = toArray(getPopup().querySelectorAll(focusable)).filter(el => el.getAttribute('tabindex') !== '-1'); + return uniqueArray(focusableElementsWithTabindex.concat(otherFocusableElements)).filter(el => isVisible(el)); + }; + const isModal = () => { + return !isToast() && !document.body.classList.contains(swalClasses['no-backdrop']); + }; + const isToast = () => { + return document.body.classList.contains(swalClasses['toast-shown']); + }; + const isLoading = () => { + return getPopup().hasAttribute('data-loading'); + }; + + const states = { + previousBodyPadding: null + }; + const setInnerHtml = (elem, html) => { + // #1926 + elem.textContent = ''; + + if (html) { + const parser = new DOMParser(); + const parsed = parser.parseFromString(html, "text/html"); + toArray(parsed.querySelector('head').childNodes).forEach(child => { + elem.appendChild(child); + }); + toArray(parsed.querySelector('body').childNodes).forEach(child => { + elem.appendChild(child); + }); + } + }; + const hasClass = (elem, className) => { + if (!className) { + return false; + } + + const classList = className.split(/\s+/); + + for (let i = 0; i < classList.length; i++) { + if (!elem.classList.contains(classList[i])) { + return false; + } + } + + return true; + }; + + const removeCustomClasses = (elem, params) => { + toArray(elem.classList).forEach(className => { + if (!Object.values(swalClasses).includes(className) && !Object.values(iconTypes).includes(className) && !Object.values(params.showClass).includes(className)) { + elem.classList.remove(className); + } + }); + }; + + const applyCustomClass = (elem, params, className) => { + removeCustomClasses(elem, params); + + if (params.customClass && params.customClass[className]) { + if (typeof params.customClass[className] !== 'string' && !params.customClass[className].forEach) { + return warn("Invalid type of customClass.".concat(className, "! Expected string or iterable object, got \"").concat(typeof params.customClass[className], "\"")); + } + + addClass(elem, params.customClass[className]); + } + }; + const getInput = (popup, inputType) => { + if (!inputType) { + return null; + } + + switch (inputType) { + case 'select': + case 'textarea': + case 'file': + return getChildByClass(popup, swalClasses[inputType]); + + case 'checkbox': + return popup.querySelector(".".concat(swalClasses.checkbox, " input")); + + case 'radio': + return popup.querySelector(".".concat(swalClasses.radio, " input:checked")) || popup.querySelector(".".concat(swalClasses.radio, " input:first-child")); + + case 'range': + return popup.querySelector(".".concat(swalClasses.range, " input")); + + default: + return getChildByClass(popup, swalClasses.input); + } + }; + const focusInput = input => { + input.focus(); // place cursor at end of text in text input + + if (input.type !== 'file') { + // http://stackoverflow.com/a/2345915 + const val = input.value; + input.value = ''; + input.value = val; + } + }; + const toggleClass = (target, classList, condition) => { + if (!target || !classList) { + return; + } + + if (typeof classList === 'string') { + classList = classList.split(/\s+/).filter(Boolean); + } + + classList.forEach(className => { + if (target.forEach) { + target.forEach(elem => { + condition ? elem.classList.add(className) : elem.classList.remove(className); + }); + } else { + condition ? target.classList.add(className) : target.classList.remove(className); + } + }); + }; + const addClass = (target, classList) => { + toggleClass(target, classList, true); + }; + const removeClass = (target, classList) => { + toggleClass(target, classList, false); + }; + const getChildByClass = (elem, className) => { + for (let i = 0; i < elem.childNodes.length; i++) { + if (hasClass(elem.childNodes[i], className)) { + return elem.childNodes[i]; + } + } + }; + const applyNumericalStyle = (elem, property, value) => { + if (value === "".concat(parseInt(value))) { + value = parseInt(value); + } + + if (value || parseInt(value) === 0) { + elem.style[property] = typeof value === 'number' ? "".concat(value, "px") : value; + } else { + elem.style.removeProperty(property); + } + }; + const show = (elem, display = 'flex') => { + elem.style.display = display; + }; + const hide = elem => { + elem.style.display = 'none'; + }; + const setStyle = (parent, selector, property, value) => { + const el = parent.querySelector(selector); + + if (el) { + el.style[property] = value; + } + }; + const toggle = (elem, condition, display) => { + condition ? show(elem, display) : hide(elem); + }; // borrowed from jquery $(elem).is(':visible') implementation + + const isVisible = elem => !!(elem && (elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length)); + const allButtonsAreHidden = () => !isVisible(getConfirmButton()) && !isVisible(getDenyButton()) && !isVisible(getCancelButton()); + const isScrollable = elem => !!(elem.scrollHeight > elem.clientHeight); // borrowed from https://stackoverflow.com/a/46352119 + + const hasCssAnimation = elem => { + const style = window.getComputedStyle(elem); + const animDuration = parseFloat(style.getPropertyValue('animation-duration') || '0'); + const transDuration = parseFloat(style.getPropertyValue('transition-duration') || '0'); + return animDuration > 0 || transDuration > 0; + }; + const animateTimerProgressBar = (timer, reset = false) => { + const timerProgressBar = getTimerProgressBar(); + + if (isVisible(timerProgressBar)) { + if (reset) { + timerProgressBar.style.transition = 'none'; + timerProgressBar.style.width = '100%'; + } + + setTimeout(() => { + timerProgressBar.style.transition = "width ".concat(timer / 1000, "s linear"); + timerProgressBar.style.width = '0%'; + }, 10); + } + }; + const stopTimerProgressBar = () => { + const timerProgressBar = getTimerProgressBar(); + const timerProgressBarWidth = parseInt(window.getComputedStyle(timerProgressBar).width); + timerProgressBar.style.removeProperty('transition'); + timerProgressBar.style.width = '100%'; + const timerProgressBarFullWidth = parseInt(window.getComputedStyle(timerProgressBar).width); + const timerProgressBarPercent = parseInt(timerProgressBarWidth / timerProgressBarFullWidth * 100); + timerProgressBar.style.removeProperty('transition'); + timerProgressBar.style.width = "".concat(timerProgressBarPercent, "%"); + }; + + // Detect Node env + const isNodeEnv = () => typeof window === 'undefined' || typeof document === 'undefined'; + + const sweetHTML = "\n
                                  \n \n
                                    \n
                                    \n \n

                                    \n
                                    \n \n \n
                                    \n \n \n
                                    \n \n
                                    \n \n \n
                                    \n
                                    \n
                                    \n \n \n \n
                                    \n
                                    \n
                                    \n
                                    \n
                                    \n
                                    \n").replace(/(^|\n)\s*/g, ''); + + const resetOldContainer = () => { + const oldContainer = getContainer(); + + if (!oldContainer) { + return false; + } + + oldContainer.remove(); + removeClass([document.documentElement, document.body], [swalClasses['no-backdrop'], swalClasses['toast-shown'], swalClasses['has-column']]); + return true; + }; + + const resetValidationMessage = () => { + if (Swal.isVisible()) { + Swal.resetValidationMessage(); + } + }; + + const addInputChangeListeners = () => { + const popup = getPopup(); + const input = getChildByClass(popup, swalClasses.input); + const file = getChildByClass(popup, swalClasses.file); + const range = popup.querySelector(".".concat(swalClasses.range, " input")); + const rangeOutput = popup.querySelector(".".concat(swalClasses.range, " output")); + const select = getChildByClass(popup, swalClasses.select); + const checkbox = popup.querySelector(".".concat(swalClasses.checkbox, " input")); + const textarea = getChildByClass(popup, swalClasses.textarea); + input.oninput = resetValidationMessage; + file.onchange = resetValidationMessage; + select.onchange = resetValidationMessage; + checkbox.onchange = resetValidationMessage; + textarea.oninput = resetValidationMessage; + + range.oninput = () => { + resetValidationMessage(); + rangeOutput.value = range.value; + }; + + range.onchange = () => { + resetValidationMessage(); + range.nextSibling.value = range.value; + }; + }; + + const getTarget = target => typeof target === 'string' ? document.querySelector(target) : target; + + const setupAccessibility = params => { + const popup = getPopup(); + popup.setAttribute('role', params.toast ? 'alert' : 'dialog'); + popup.setAttribute('aria-live', params.toast ? 'polite' : 'assertive'); + + if (!params.toast) { + popup.setAttribute('aria-modal', 'true'); + } + }; + + const setupRTL = targetElement => { + if (window.getComputedStyle(targetElement).direction === 'rtl') { + addClass(getContainer(), swalClasses.rtl); + } + }; + /* + * Add modal + backdrop to DOM + */ + + + const init = params => { + // Clean up the old popup container if it exists + const oldContainerExisted = resetOldContainer(); + /* istanbul ignore if */ + + if (isNodeEnv()) { + error('SweetAlert2 requires document to initialize'); + return; + } + + const container = document.createElement('div'); + container.className = swalClasses.container; + + if (oldContainerExisted) { + addClass(container, swalClasses['no-transition']); + } + + setInnerHtml(container, sweetHTML); + const targetElement = getTarget(params.target); + targetElement.appendChild(container); + setupAccessibility(params); + setupRTL(targetElement); + addInputChangeListeners(); + }; + + const parseHtmlToContainer = (param, target) => { + // DOM element + if (param instanceof HTMLElement) { + target.appendChild(param); // Object + } else if (typeof param === 'object') { + handleObject(param, target); // Plain string + } else if (param) { + setInnerHtml(target, param); + } + }; + + const handleObject = (param, target) => { + // JQuery element(s) + if (param.jquery) { + handleJqueryElem(target, param); // For other objects use their string representation + } else { + setInnerHtml(target, param.toString()); + } + }; + + const handleJqueryElem = (target, elem) => { + target.textContent = ''; + + if (0 in elem) { + for (let i = 0; (i in elem); i++) { + target.appendChild(elem[i].cloneNode(true)); + } + } else { + target.appendChild(elem.cloneNode(true)); + } + }; + + const animationEndEvent = (() => { + // Prevent run in Node env + + /* istanbul ignore if */ + if (isNodeEnv()) { + return false; + } + + const testEl = document.createElement('div'); + const transEndEventNames = { + WebkitAnimation: 'webkitAnimationEnd', + OAnimation: 'oAnimationEnd oanimationend', + animation: 'animationend' + }; + + for (const i in transEndEventNames) { + if (Object.prototype.hasOwnProperty.call(transEndEventNames, i) && typeof testEl.style[i] !== 'undefined') { + return transEndEventNames[i]; + } + } + + return false; + })(); + + // https://github.com/twbs/bootstrap/blob/master/js/src/modal.js + + const measureScrollbar = () => { + const scrollDiv = document.createElement('div'); + scrollDiv.className = swalClasses['scrollbar-measure']; + document.body.appendChild(scrollDiv); + const scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth; + document.body.removeChild(scrollDiv); + return scrollbarWidth; + }; + + const renderActions = (instance, params) => { + const actions = getActions(); + const loader = getLoader(); + const confirmButton = getConfirmButton(); + const denyButton = getDenyButton(); + const cancelButton = getCancelButton(); // Actions (buttons) wrapper + + if (!params.showConfirmButton && !params.showDenyButton && !params.showCancelButton) { + hide(actions); + } else { + show(actions); + } // Custom class + + + applyCustomClass(actions, params, 'actions'); // Render buttons + + renderButton(confirmButton, 'confirm', params); + renderButton(denyButton, 'deny', params); + renderButton(cancelButton, 'cancel', params); + handleButtonsStyling(confirmButton, denyButton, cancelButton, params); + + if (params.reverseButtons) { + actions.insertBefore(cancelButton, loader); + actions.insertBefore(denyButton, loader); + actions.insertBefore(confirmButton, loader); + } // Loader + + + setInnerHtml(loader, params.loaderHtml); + applyCustomClass(loader, params, 'loader'); + }; + + function handleButtonsStyling(confirmButton, denyButton, cancelButton, params) { + if (!params.buttonsStyling) { + return removeClass([confirmButton, denyButton, cancelButton], swalClasses.styled); + } + + addClass([confirmButton, denyButton, cancelButton], swalClasses.styled); // Buttons background colors + + if (params.confirmButtonColor) { + confirmButton.style.backgroundColor = params.confirmButtonColor; + addClass(confirmButton, swalClasses['default-outline']); + } + + if (params.denyButtonColor) { + denyButton.style.backgroundColor = params.denyButtonColor; + addClass(denyButton, swalClasses['default-outline']); + } + + if (params.cancelButtonColor) { + cancelButton.style.backgroundColor = params.cancelButtonColor; + addClass(cancelButton, swalClasses['default-outline']); + } + } + + function renderButton(button, buttonType, params) { + toggle(button, params["show".concat(capitalizeFirstLetter(buttonType), "Button")], 'inline-block'); + setInnerHtml(button, params["".concat(buttonType, "ButtonText")]); // Set caption text + + button.setAttribute('aria-label', params["".concat(buttonType, "ButtonAriaLabel")]); // ARIA label + // Add buttons custom classes + + button.className = swalClasses[buttonType]; + applyCustomClass(button, params, "".concat(buttonType, "Button")); + addClass(button, params["".concat(buttonType, "ButtonClass")]); + } + + function handleBackdropParam(container, backdrop) { + if (typeof backdrop === 'string') { + container.style.background = backdrop; + } else if (!backdrop) { + addClass([document.documentElement, document.body], swalClasses['no-backdrop']); + } + } + + function handlePositionParam(container, position) { + if (position in swalClasses) { + addClass(container, swalClasses[position]); + } else { + warn('The "position" parameter is not valid, defaulting to "center"'); + addClass(container, swalClasses.center); + } + } + + function handleGrowParam(container, grow) { + if (grow && typeof grow === 'string') { + const growClass = "grow-".concat(grow); + + if (growClass in swalClasses) { + addClass(container, swalClasses[growClass]); + } + } + } + + const renderContainer = (instance, params) => { + const container = getContainer(); + + if (!container) { + return; + } + + handleBackdropParam(container, params.backdrop); + handlePositionParam(container, params.position); + handleGrowParam(container, params.grow); // Custom class + + applyCustomClass(container, params, 'container'); + }; + + /** + * This module containts `WeakMap`s for each effectively-"private property" that a `Swal` has. + * For example, to set the private property "foo" of `this` to "bar", you can `privateProps.foo.set(this, 'bar')` + * This is the approach that Babel will probably take to implement private methods/fields + * https://github.com/tc39/proposal-private-methods + * https://github.com/babel/babel/pull/7555 + * Once we have the changes from that PR in Babel, and our core class fits reasonable in *one module* + * then we can use that language feature. + */ + var privateProps = { + promise: new WeakMap(), + innerParams: new WeakMap(), + domCache: new WeakMap() + }; + + const inputTypes = ['input', 'file', 'range', 'select', 'radio', 'checkbox', 'textarea']; + const renderInput = (instance, params) => { + const popup = getPopup(); + const innerParams = privateProps.innerParams.get(instance); + const rerender = !innerParams || params.input !== innerParams.input; + inputTypes.forEach(inputType => { + const inputClass = swalClasses[inputType]; + const inputContainer = getChildByClass(popup, inputClass); // set attributes + + setAttributes(inputType, params.inputAttributes); // set class + + inputContainer.className = inputClass; + + if (rerender) { + hide(inputContainer); + } + }); + + if (params.input) { + if (rerender) { + showInput(params); + } // set custom class + + + setCustomClass(params); + } + }; + + const showInput = params => { + if (!renderInputType[params.input]) { + return error("Unexpected type of input! Expected \"text\", \"email\", \"password\", \"number\", \"tel\", \"select\", \"radio\", \"checkbox\", \"textarea\", \"file\" or \"url\", got \"".concat(params.input, "\"")); + } + + const inputContainer = getInputContainer(params.input); + const input = renderInputType[params.input](inputContainer, params); + show(input); // input autofocus + + setTimeout(() => { + focusInput(input); + }); + }; + + const removeAttributes = input => { + for (let i = 0; i < input.attributes.length; i++) { + const attrName = input.attributes[i].name; + + if (!['type', 'value', 'style'].includes(attrName)) { + input.removeAttribute(attrName); + } + } + }; + + const setAttributes = (inputType, inputAttributes) => { + const input = getInput(getPopup(), inputType); + + if (!input) { + return; + } + + removeAttributes(input); + + for (const attr in inputAttributes) { + input.setAttribute(attr, inputAttributes[attr]); + } + }; + + const setCustomClass = params => { + const inputContainer = getInputContainer(params.input); + + if (params.customClass) { + addClass(inputContainer, params.customClass.input); + } + }; + + const setInputPlaceholder = (input, params) => { + if (!input.placeholder || params.inputPlaceholder) { + input.placeholder = params.inputPlaceholder; + } + }; + + const setInputLabel = (input, prependTo, params) => { + if (params.inputLabel) { + input.id = swalClasses.input; + const label = document.createElement('label'); + const labelClass = swalClasses['input-label']; + label.setAttribute('for', input.id); + label.className = labelClass; + addClass(label, params.customClass.inputLabel); + label.innerText = params.inputLabel; + prependTo.insertAdjacentElement('beforebegin', label); + } + }; + + const getInputContainer = inputType => { + const inputClass = swalClasses[inputType] ? swalClasses[inputType] : swalClasses.input; + return getChildByClass(getPopup(), inputClass); + }; + + const renderInputType = {}; + + renderInputType.text = renderInputType.email = renderInputType.password = renderInputType.number = renderInputType.tel = renderInputType.url = (input, params) => { + if (typeof params.inputValue === 'string' || typeof params.inputValue === 'number') { + input.value = params.inputValue; + } else if (!isPromise(params.inputValue)) { + warn("Unexpected type of inputValue! Expected \"string\", \"number\" or \"Promise\", got \"".concat(typeof params.inputValue, "\"")); + } + + setInputLabel(input, input, params); + setInputPlaceholder(input, params); + input.type = params.input; + return input; + }; + + renderInputType.file = (input, params) => { + setInputLabel(input, input, params); + setInputPlaceholder(input, params); + return input; + }; + + renderInputType.range = (range, params) => { + const rangeInput = range.querySelector('input'); + const rangeOutput = range.querySelector('output'); + rangeInput.value = params.inputValue; + rangeInput.type = params.input; + rangeOutput.value = params.inputValue; + setInputLabel(rangeInput, range, params); + return range; + }; + + renderInputType.select = (select, params) => { + select.textContent = ''; + + if (params.inputPlaceholder) { + const placeholder = document.createElement('option'); + setInnerHtml(placeholder, params.inputPlaceholder); + placeholder.value = ''; + placeholder.disabled = true; + placeholder.selected = true; + select.appendChild(placeholder); + } + + setInputLabel(select, select, params); + return select; + }; + + renderInputType.radio = radio => { + radio.textContent = ''; + return radio; + }; + + renderInputType.checkbox = (checkboxContainer, params) => { + const checkbox = getInput(getPopup(), 'checkbox'); + checkbox.value = 1; + checkbox.id = swalClasses.checkbox; + checkbox.checked = Boolean(params.inputValue); + const label = checkboxContainer.querySelector('span'); + setInnerHtml(label, params.inputPlaceholder); + return checkboxContainer; + }; + + renderInputType.textarea = (textarea, params) => { + textarea.value = params.inputValue; + setInputPlaceholder(textarea, params); + setInputLabel(textarea, textarea, params); + + const getMargin = el => parseInt(window.getComputedStyle(el).marginLeft) + parseInt(window.getComputedStyle(el).marginRight); + + setTimeout(() => { + // #2291 + if ('MutationObserver' in window) { + // #1699 + const initialPopupWidth = parseInt(window.getComputedStyle(getPopup()).width); + + const textareaResizeHandler = () => { + const textareaWidth = textarea.offsetWidth + getMargin(textarea); + + if (textareaWidth > initialPopupWidth) { + getPopup().style.width = "".concat(textareaWidth, "px"); + } else { + getPopup().style.width = null; + } + }; + + new MutationObserver(textareaResizeHandler).observe(textarea, { + attributes: true, + attributeFilter: ['style'] + }); + } + }); + return textarea; + }; + + const renderContent = (instance, params) => { + const htmlContainer = getHtmlContainer(); + applyCustomClass(htmlContainer, params, 'htmlContainer'); // Content as HTML + + if (params.html) { + parseHtmlToContainer(params.html, htmlContainer); + show(htmlContainer, 'block'); // Content as plain text + } else if (params.text) { + htmlContainer.textContent = params.text; + show(htmlContainer, 'block'); // No content + } else { + hide(htmlContainer); + } + + renderInput(instance, params); + }; + + const renderFooter = (instance, params) => { + const footer = getFooter(); + toggle(footer, params.footer); + + if (params.footer) { + parseHtmlToContainer(params.footer, footer); + } // Custom class + + + applyCustomClass(footer, params, 'footer'); + }; + + const renderCloseButton = (instance, params) => { + const closeButton = getCloseButton(); + setInnerHtml(closeButton, params.closeButtonHtml); // Custom class + + applyCustomClass(closeButton, params, 'closeButton'); + toggle(closeButton, params.showCloseButton); + closeButton.setAttribute('aria-label', params.closeButtonAriaLabel); + }; + + const renderIcon = (instance, params) => { + const innerParams = privateProps.innerParams.get(instance); + const icon = getIcon(); // if the given icon already rendered, apply the styling without re-rendering the icon + + if (innerParams && params.icon === innerParams.icon) { + // Custom or default content + setContent(icon, params); + applyStyles(icon, params); + return; + } + + if (!params.icon && !params.iconHtml) { + return hide(icon); + } + + if (params.icon && Object.keys(iconTypes).indexOf(params.icon) === -1) { + error("Unknown icon! Expected \"success\", \"error\", \"warning\", \"info\" or \"question\", got \"".concat(params.icon, "\"")); + return hide(icon); + } + + show(icon); // Custom or default content + + setContent(icon, params); + applyStyles(icon, params); // Animate icon + + addClass(icon, params.showClass.icon); + }; + + const applyStyles = (icon, params) => { + for (const iconType in iconTypes) { + if (params.icon !== iconType) { + removeClass(icon, iconTypes[iconType]); + } + } + + addClass(icon, iconTypes[params.icon]); // Icon color + + setColor(icon, params); // Success icon background color + + adjustSuccessIconBackgoundColor(); // Custom class + + applyCustomClass(icon, params, 'icon'); + }; // Adjust success icon background color to match the popup background color + + + const adjustSuccessIconBackgoundColor = () => { + const popup = getPopup(); + const popupBackgroundColor = window.getComputedStyle(popup).getPropertyValue('background-color'); + const successIconParts = popup.querySelectorAll('[class^=swal2-success-circular-line], .swal2-success-fix'); + + for (let i = 0; i < successIconParts.length; i++) { + successIconParts[i].style.backgroundColor = popupBackgroundColor; + } + }; + + const setContent = (icon, params) => { + icon.textContent = ''; + + if (params.iconHtml) { + setInnerHtml(icon, iconContent(params.iconHtml)); + } else if (params.icon === 'success') { + setInnerHtml(icon, "\n
                                    \n \n
                                    \n
                                    \n "); + } else if (params.icon === 'error') { + setInnerHtml(icon, "\n \n \n \n \n "); + } else { + const defaultIconHtml = { + question: '?', + warning: '!', + info: 'i' + }; + setInnerHtml(icon, iconContent(defaultIconHtml[params.icon])); + } + }; + + const setColor = (icon, params) => { + if (!params.iconColor) { + return; + } + + icon.style.color = params.iconColor; + icon.style.borderColor = params.iconColor; + + for (const sel of ['.swal2-success-line-tip', '.swal2-success-line-long', '.swal2-x-mark-line-left', '.swal2-x-mark-line-right']) { + setStyle(icon, sel, 'backgroundColor', params.iconColor); + } + + setStyle(icon, '.swal2-success-ring', 'borderColor', params.iconColor); + }; + + const iconContent = content => "
                                    ").concat(content, "
                                    "); + + const renderImage = (instance, params) => { + const image = getImage(); + + if (!params.imageUrl) { + return hide(image); + } + + show(image, ''); // Src, alt + + image.setAttribute('src', params.imageUrl); + image.setAttribute('alt', params.imageAlt); // Width, height + + applyNumericalStyle(image, 'width', params.imageWidth); + applyNumericalStyle(image, 'height', params.imageHeight); // Class + + image.className = swalClasses.image; + applyCustomClass(image, params, 'image'); + }; + + const createStepElement = step => { + const stepEl = document.createElement('li'); + addClass(stepEl, swalClasses['progress-step']); + setInnerHtml(stepEl, step); + return stepEl; + }; + + const createLineElement = params => { + const lineEl = document.createElement('li'); + addClass(lineEl, swalClasses['progress-step-line']); + + if (params.progressStepsDistance) { + lineEl.style.width = params.progressStepsDistance; + } + + return lineEl; + }; + + const renderProgressSteps = (instance, params) => { + const progressStepsContainer = getProgressSteps(); + + if (!params.progressSteps || params.progressSteps.length === 0) { + return hide(progressStepsContainer); + } + + show(progressStepsContainer); + progressStepsContainer.textContent = ''; + + if (params.currentProgressStep >= params.progressSteps.length) { + warn('Invalid currentProgressStep parameter, it should be less than progressSteps.length ' + '(currentProgressStep like JS arrays starts from 0)'); + } + + params.progressSteps.forEach((step, index) => { + const stepEl = createStepElement(step); + progressStepsContainer.appendChild(stepEl); + + if (index === params.currentProgressStep) { + addClass(stepEl, swalClasses['active-progress-step']); + } + + if (index !== params.progressSteps.length - 1) { + const lineEl = createLineElement(params); + progressStepsContainer.appendChild(lineEl); + } + }); + }; + + const renderTitle = (instance, params) => { + const title = getTitle(); + toggle(title, params.title || params.titleText, 'block'); + + if (params.title) { + parseHtmlToContainer(params.title, title); + } + + if (params.titleText) { + title.innerText = params.titleText; + } // Custom class + + + applyCustomClass(title, params, 'title'); + }; + + const renderPopup = (instance, params) => { + const container = getContainer(); + const popup = getPopup(); // Width + + if (params.toast) { + // #2170 + applyNumericalStyle(container, 'width', params.width); + popup.style.width = '100%'; + popup.insertBefore(getLoader(), getIcon()); + } else { + applyNumericalStyle(popup, 'width', params.width); + } // Padding + + + applyNumericalStyle(popup, 'padding', params.padding); // Background + + if (params.background) { + popup.style.background = params.background; + } + + hide(getValidationMessage()); // Classes + + addClasses(popup, params); + }; + + const addClasses = (popup, params) => { + // Default Class + showClass when updating Swal.update({}) + popup.className = "".concat(swalClasses.popup, " ").concat(isVisible(popup) ? params.showClass.popup : ''); + + if (params.toast) { + addClass([document.documentElement, document.body], swalClasses['toast-shown']); + addClass(popup, swalClasses.toast); + } else { + addClass(popup, swalClasses.modal); + } // Custom class + + + applyCustomClass(popup, params, 'popup'); + + if (typeof params.customClass === 'string') { + addClass(popup, params.customClass); + } // Icon class (#1842) + + + if (params.icon) { + addClass(popup, swalClasses["icon-".concat(params.icon)]); + } + }; + + const render = (instance, params) => { + renderPopup(instance, params); + renderContainer(instance, params); + renderProgressSteps(instance, params); + renderIcon(instance, params); + renderImage(instance, params); + renderTitle(instance, params); + renderCloseButton(instance, params); + renderContent(instance, params); + renderActions(instance, params); + renderFooter(instance, params); + + if (typeof params.didRender === 'function') { + params.didRender(getPopup()); + } + }; + + /* + * Global function to determine if SweetAlert2 popup is shown + */ + + const isVisible$1 = () => { + return isVisible(getPopup()); + }; + /* + * Global function to click 'Confirm' button + */ + + const clickConfirm = () => getConfirmButton() && getConfirmButton().click(); + /* + * Global function to click 'Deny' button + */ + + const clickDeny = () => getDenyButton() && getDenyButton().click(); + /* + * Global function to click 'Cancel' button + */ + + const clickCancel = () => getCancelButton() && getCancelButton().click(); + + function fire(...args) { + const Swal = this; + return new Swal(...args); + } + + /** + * Returns an extended version of `Swal` containing `params` as defaults. + * Useful for reusing Swal configuration. + * + * For example: + * + * Before: + * const textPromptOptions = { input: 'text', showCancelButton: true } + * const {value: firstName} = await Swal.fire({ ...textPromptOptions, title: 'What is your first name?' }) + * const {value: lastName} = await Swal.fire({ ...textPromptOptions, title: 'What is your last name?' }) + * + * After: + * const TextPrompt = Swal.mixin({ input: 'text', showCancelButton: true }) + * const {value: firstName} = await TextPrompt('What is your first name?') + * const {value: lastName} = await TextPrompt('What is your last name?') + * + * @param mixinParams + */ + function mixin(mixinParams) { + class MixinSwal extends this { + _main(params, priorityMixinParams) { + return super._main(params, Object.assign({}, mixinParams, priorityMixinParams)); + } + + } + + return MixinSwal; + } + + /** + * Shows loader (spinner), this is useful with AJAX requests. + * By default the loader be shown instead of the "Confirm" button. + */ + + const showLoading = buttonToReplace => { + let popup = getPopup(); + + if (!popup) { + Swal.fire(); + } + + popup = getPopup(); + const loader = getLoader(); + + if (isToast()) { + hide(getIcon()); + } else { + replaceButton(popup, buttonToReplace); + } + + show(loader); + popup.setAttribute('data-loading', true); + popup.setAttribute('aria-busy', true); + popup.focus(); + }; + + const replaceButton = (popup, buttonToReplace) => { + const actions = getActions(); + const loader = getLoader(); + + if (!buttonToReplace && isVisible(getConfirmButton())) { + buttonToReplace = getConfirmButton(); + } + + show(actions); + + if (buttonToReplace) { + hide(buttonToReplace); + loader.setAttribute('data-button-to-replace', buttonToReplace.className); + } + + loader.parentNode.insertBefore(loader, buttonToReplace); + addClass([popup, actions], swalClasses.loading); + }; + + const RESTORE_FOCUS_TIMEOUT = 100; + + const globalState = {}; + + const focusPreviousActiveElement = () => { + if (globalState.previousActiveElement && globalState.previousActiveElement.focus) { + globalState.previousActiveElement.focus(); + globalState.previousActiveElement = null; + } else if (document.body) { + document.body.focus(); + } + }; // Restore previous active (focused) element + + + const restoreActiveElement = returnFocus => { + return new Promise(resolve => { + if (!returnFocus) { + return resolve(); + } + + const x = window.scrollX; + const y = window.scrollY; + globalState.restoreFocusTimeout = setTimeout(() => { + focusPreviousActiveElement(); + resolve(); + }, RESTORE_FOCUS_TIMEOUT); // issues/900 + + window.scrollTo(x, y); + }); + }; + + /** + * If `timer` parameter is set, returns number of milliseconds of timer remained. + * Otherwise, returns undefined. + */ + + const getTimerLeft = () => { + return globalState.timeout && globalState.timeout.getTimerLeft(); + }; + /** + * Stop timer. Returns number of milliseconds of timer remained. + * If `timer` parameter isn't set, returns undefined. + */ + + const stopTimer = () => { + if (globalState.timeout) { + stopTimerProgressBar(); + return globalState.timeout.stop(); + } + }; + /** + * Resume timer. Returns number of milliseconds of timer remained. + * If `timer` parameter isn't set, returns undefined. + */ + + const resumeTimer = () => { + if (globalState.timeout) { + const remaining = globalState.timeout.start(); + animateTimerProgressBar(remaining); + return remaining; + } + }; + /** + * Resume timer. Returns number of milliseconds of timer remained. + * If `timer` parameter isn't set, returns undefined. + */ + + const toggleTimer = () => { + const timer = globalState.timeout; + return timer && (timer.running ? stopTimer() : resumeTimer()); + }; + /** + * Increase timer. Returns number of milliseconds of an updated timer. + * If `timer` parameter isn't set, returns undefined. + */ + + const increaseTimer = n => { + if (globalState.timeout) { + const remaining = globalState.timeout.increase(n); + animateTimerProgressBar(remaining, true); + return remaining; + } + }; + /** + * Check if timer is running. Returns true if timer is running + * or false if timer is paused or stopped. + * If `timer` parameter isn't set, returns undefined + */ + + const isTimerRunning = () => { + return globalState.timeout && globalState.timeout.isRunning(); + }; + + let bodyClickListenerAdded = false; + const clickHandlers = {}; + function bindClickHandler(attr = 'data-swal-template') { + clickHandlers[attr] = this; + + if (!bodyClickListenerAdded) { + document.body.addEventListener('click', bodyClickListener); + bodyClickListenerAdded = true; + } + } + + const bodyClickListener = event => { + // TODO: replace with event.composedPath() + for (let el = event.target; el && el !== document; el = el.parentNode) { + for (const attr in clickHandlers) { + const template = el.getAttribute(attr); + + if (template) { + clickHandlers[attr].fire({ + template + }); + return; + } + } + } + }; + + const defaultParams = { + title: '', + titleText: '', + text: '', + html: '', + footer: '', + icon: undefined, + iconColor: undefined, + iconHtml: undefined, + template: undefined, + toast: false, + showClass: { + popup: 'swal2-show', + backdrop: 'swal2-backdrop-show', + icon: 'swal2-icon-show' + }, + hideClass: { + popup: 'swal2-hide', + backdrop: 'swal2-backdrop-hide', + icon: 'swal2-icon-hide' + }, + customClass: {}, + target: 'body', + backdrop: true, + heightAuto: true, + allowOutsideClick: true, + allowEscapeKey: true, + allowEnterKey: true, + stopKeydownPropagation: true, + keydownListenerCapture: false, + showConfirmButton: true, + showDenyButton: false, + showCancelButton: false, + preConfirm: undefined, + preDeny: undefined, + confirmButtonText: 'OK', + confirmButtonAriaLabel: '', + confirmButtonColor: undefined, + denyButtonText: 'No', + denyButtonAriaLabel: '', + denyButtonColor: undefined, + cancelButtonText: 'Cancel', + cancelButtonAriaLabel: '', + cancelButtonColor: undefined, + buttonsStyling: true, + reverseButtons: false, + focusConfirm: true, + focusDeny: false, + focusCancel: false, + returnFocus: true, + showCloseButton: false, + closeButtonHtml: '×', + closeButtonAriaLabel: 'Close this dialog', + loaderHtml: '', + showLoaderOnConfirm: false, + showLoaderOnDeny: false, + imageUrl: undefined, + imageWidth: undefined, + imageHeight: undefined, + imageAlt: '', + timer: undefined, + timerProgressBar: false, + width: undefined, + padding: undefined, + background: undefined, + input: undefined, + inputPlaceholder: '', + inputLabel: '', + inputValue: '', + inputOptions: {}, + inputAutoTrim: true, + inputAttributes: {}, + inputValidator: undefined, + returnInputValueOnDeny: false, + validationMessage: undefined, + grow: false, + position: 'center', + progressSteps: [], + currentProgressStep: undefined, + progressStepsDistance: undefined, + willOpen: undefined, + didOpen: undefined, + didRender: undefined, + willClose: undefined, + didClose: undefined, + didDestroy: undefined, + scrollbarPadding: true + }; + const updatableParams = ['allowEscapeKey', 'allowOutsideClick', 'background', 'buttonsStyling', 'cancelButtonAriaLabel', 'cancelButtonColor', 'cancelButtonText', 'closeButtonAriaLabel', 'closeButtonHtml', 'confirmButtonAriaLabel', 'confirmButtonColor', 'confirmButtonText', 'currentProgressStep', 'customClass', 'denyButtonAriaLabel', 'denyButtonColor', 'denyButtonText', 'didClose', 'didDestroy', 'footer', 'hideClass', 'html', 'icon', 'iconColor', 'iconHtml', 'imageAlt', 'imageHeight', 'imageUrl', 'imageWidth', 'preConfirm', 'preDeny', 'progressSteps', 'returnFocus', 'reverseButtons', 'showCancelButton', 'showCloseButton', 'showConfirmButton', 'showDenyButton', 'text', 'title', 'titleText', 'willClose']; + const deprecatedParams = {}; + const toastIncompatibleParams = ['allowOutsideClick', 'allowEnterKey', 'backdrop', 'focusConfirm', 'focusDeny', 'focusCancel', 'returnFocus', 'heightAuto', 'keydownListenerCapture']; + /** + * Is valid parameter + * @param {String} paramName + */ + + const isValidParameter = paramName => { + return Object.prototype.hasOwnProperty.call(defaultParams, paramName); + }; + /** + * Is valid parameter for Swal.update() method + * @param {String} paramName + */ + + const isUpdatableParameter = paramName => { + return updatableParams.indexOf(paramName) !== -1; + }; + /** + * Is deprecated parameter + * @param {String} paramName + */ + + const isDeprecatedParameter = paramName => { + return deprecatedParams[paramName]; + }; + + const checkIfParamIsValid = param => { + if (!isValidParameter(param)) { + warn("Unknown parameter \"".concat(param, "\"")); + } + }; + + const checkIfToastParamIsValid = param => { + if (toastIncompatibleParams.includes(param)) { + warn("The parameter \"".concat(param, "\" is incompatible with toasts")); + } + }; + + const checkIfParamIsDeprecated = param => { + if (isDeprecatedParameter(param)) { + warnAboutDeprecation(param, isDeprecatedParameter(param)); + } + }; + /** + * Show relevant warnings for given params + * + * @param params + */ + + + const showWarningsForParams = params => { + if (!params.backdrop && params.allowOutsideClick) { + warn('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`'); + } + + for (const param in params) { + checkIfParamIsValid(param); + + if (params.toast) { + checkIfToastParamIsValid(param); + } + + checkIfParamIsDeprecated(param); + } + }; + + + + var staticMethods = /*#__PURE__*/Object.freeze({ + isValidParameter: isValidParameter, + isUpdatableParameter: isUpdatableParameter, + isDeprecatedParameter: isDeprecatedParameter, + argsToParams: argsToParams, + isVisible: isVisible$1, + clickConfirm: clickConfirm, + clickDeny: clickDeny, + clickCancel: clickCancel, + getContainer: getContainer, + getPopup: getPopup, + getTitle: getTitle, + getHtmlContainer: getHtmlContainer, + getImage: getImage, + getIcon: getIcon, + getInputLabel: getInputLabel, + getCloseButton: getCloseButton, + getActions: getActions, + getConfirmButton: getConfirmButton, + getDenyButton: getDenyButton, + getCancelButton: getCancelButton, + getLoader: getLoader, + getFooter: getFooter, + getTimerProgressBar: getTimerProgressBar, + getFocusableElements: getFocusableElements, + getValidationMessage: getValidationMessage, + isLoading: isLoading, + fire: fire, + mixin: mixin, + showLoading: showLoading, + enableLoading: showLoading, + getTimerLeft: getTimerLeft, + stopTimer: stopTimer, + resumeTimer: resumeTimer, + toggleTimer: toggleTimer, + increaseTimer: increaseTimer, + isTimerRunning: isTimerRunning, + bindClickHandler: bindClickHandler + }); + + /** + * Hides loader and shows back the button which was hidden by .showLoading() + */ + + function hideLoading() { + // do nothing if popup is closed + const innerParams = privateProps.innerParams.get(this); + + if (!innerParams) { + return; + } + + const domCache = privateProps.domCache.get(this); + hide(domCache.loader); + + if (isToast()) { + if (innerParams.icon) { + show(getIcon()); + } + } else { + showRelatedButton(domCache); + } + + removeClass([domCache.popup, domCache.actions], swalClasses.loading); + domCache.popup.removeAttribute('aria-busy'); + domCache.popup.removeAttribute('data-loading'); + domCache.confirmButton.disabled = false; + domCache.denyButton.disabled = false; + domCache.cancelButton.disabled = false; + } + + const showRelatedButton = domCache => { + const buttonToReplace = domCache.popup.getElementsByClassName(domCache.loader.getAttribute('data-button-to-replace')); + + if (buttonToReplace.length) { + show(buttonToReplace[0], 'inline-block'); + } else if (allButtonsAreHidden()) { + hide(domCache.actions); + } + }; + + function getInput$1(instance) { + const innerParams = privateProps.innerParams.get(instance || this); + const domCache = privateProps.domCache.get(instance || this); + + if (!domCache) { + return null; + } + + return getInput(domCache.popup, innerParams.input); + } + + const fixScrollbar = () => { + // for queues, do not do this more than once + if (states.previousBodyPadding !== null) { + return; + } // if the body has overflow + + + if (document.body.scrollHeight > window.innerHeight) { + // add padding so the content doesn't shift after removal of scrollbar + states.previousBodyPadding = parseInt(window.getComputedStyle(document.body).getPropertyValue('padding-right')); + document.body.style.paddingRight = "".concat(states.previousBodyPadding + measureScrollbar(), "px"); + } + }; + const undoScrollbar = () => { + if (states.previousBodyPadding !== null) { + document.body.style.paddingRight = "".concat(states.previousBodyPadding, "px"); + states.previousBodyPadding = null; + } + }; + + /* istanbul ignore file */ + + const iOSfix = () => { + const iOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream || navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1; + + if (iOS && !hasClass(document.body, swalClasses.iosfix)) { + const offset = document.body.scrollTop; + document.body.style.top = "".concat(offset * -1, "px"); + addClass(document.body, swalClasses.iosfix); + lockBodyScroll(); + addBottomPaddingForTallPopups(); // #1948 + } + }; + + const addBottomPaddingForTallPopups = () => { + const safari = !navigator.userAgent.match(/(CriOS|FxiOS|EdgiOS|YaBrowser|UCBrowser)/i); + + if (safari) { + const bottomPanelHeight = 44; + + if (getPopup().scrollHeight > window.innerHeight - bottomPanelHeight) { + getContainer().style.paddingBottom = "".concat(bottomPanelHeight, "px"); + } + } + }; + + const lockBodyScroll = () => { + // #1246 + const container = getContainer(); + let preventTouchMove; + + container.ontouchstart = e => { + preventTouchMove = shouldPreventTouchMove(e); + }; + + container.ontouchmove = e => { + if (preventTouchMove) { + e.preventDefault(); + e.stopPropagation(); + } + }; + }; + + const shouldPreventTouchMove = event => { + const target = event.target; + const container = getContainer(); + + if (isStylys(event) || isZoom(event)) { + return false; + } + + if (target === container) { + return true; + } + + if (!isScrollable(container) && target.tagName !== 'INPUT' && // #1603 + target.tagName !== 'TEXTAREA' && // #2266 + !(isScrollable(getHtmlContainer()) && // #1944 + getHtmlContainer().contains(target))) { + return true; + } + + return false; + }; + + const isStylys = event => { + // #1786 + return event.touches && event.touches.length && event.touches[0].touchType === 'stylus'; + }; + + const isZoom = event => { + // #1891 + return event.touches && event.touches.length > 1; + }; + + const undoIOSfix = () => { + if (hasClass(document.body, swalClasses.iosfix)) { + const offset = parseInt(document.body.style.top, 10); + removeClass(document.body, swalClasses.iosfix); + document.body.style.top = ''; + document.body.scrollTop = offset * -1; + } + }; + + // Adding aria-hidden="true" to elements outside of the active modal dialog ensures that + // elements not within the active modal dialog will not be surfaced if a user opens a screen + // reader’s list of elements (headings, form controls, landmarks, etc.) in the document. + + const setAriaHidden = () => { + const bodyChildren = toArray(document.body.children); + bodyChildren.forEach(el => { + if (el === getContainer() || el.contains(getContainer())) { + return; + } + + if (el.hasAttribute('aria-hidden')) { + el.setAttribute('data-previous-aria-hidden', el.getAttribute('aria-hidden')); + } + + el.setAttribute('aria-hidden', 'true'); + }); + }; + const unsetAriaHidden = () => { + const bodyChildren = toArray(document.body.children); + bodyChildren.forEach(el => { + if (el.hasAttribute('data-previous-aria-hidden')) { + el.setAttribute('aria-hidden', el.getAttribute('data-previous-aria-hidden')); + el.removeAttribute('data-previous-aria-hidden'); + } else { + el.removeAttribute('aria-hidden'); + } + }); + }; + + /** + * This module containts `WeakMap`s for each effectively-"private property" that a `Swal` has. + * For example, to set the private property "foo" of `this` to "bar", you can `privateProps.foo.set(this, 'bar')` + * This is the approach that Babel will probably take to implement private methods/fields + * https://github.com/tc39/proposal-private-methods + * https://github.com/babel/babel/pull/7555 + * Once we have the changes from that PR in Babel, and our core class fits reasonable in *one module* + * then we can use that language feature. + */ + var privateMethods = { + swalPromiseResolve: new WeakMap() + }; + + /* + * Instance method to close sweetAlert + */ + + function removePopupAndResetState(instance, container, returnFocus, didClose) { + if (isToast()) { + triggerDidCloseAndDispose(instance, didClose); + } else { + restoreActiveElement(returnFocus).then(() => triggerDidCloseAndDispose(instance, didClose)); + globalState.keydownTarget.removeEventListener('keydown', globalState.keydownHandler, { + capture: globalState.keydownListenerCapture + }); + globalState.keydownHandlerAdded = false; + } + + const isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent); // workaround for #2088 + // for some reason removing the container in Safari will scroll the document to bottom + + if (isSafari) { + container.setAttribute('style', 'display:none !important'); + container.removeAttribute('class'); + container.innerHTML = ''; + } else { + container.remove(); + } + + if (isModal()) { + undoScrollbar(); + undoIOSfix(); + unsetAriaHidden(); + } + + removeBodyClasses(); + } + + function removeBodyClasses() { + removeClass([document.documentElement, document.body], [swalClasses.shown, swalClasses['height-auto'], swalClasses['no-backdrop'], swalClasses['toast-shown']]); + } + + function close(resolveValue) { + const popup = getPopup(); + + if (!popup) { + return; + } + + resolveValue = prepareResolveValue(resolveValue); + const innerParams = privateProps.innerParams.get(this); + + if (!innerParams || hasClass(popup, innerParams.hideClass.popup)) { + return; + } + + const swalPromiseResolve = privateMethods.swalPromiseResolve.get(this); + removeClass(popup, innerParams.showClass.popup); + addClass(popup, innerParams.hideClass.popup); + const backdrop = getContainer(); + removeClass(backdrop, innerParams.showClass.backdrop); + addClass(backdrop, innerParams.hideClass.backdrop); + handlePopupAnimation(this, popup, innerParams); // Resolve Swal promise + + swalPromiseResolve(resolveValue); + } + + const prepareResolveValue = resolveValue => { + // When user calls Swal.close() + if (typeof resolveValue === 'undefined') { + return { + isConfirmed: false, + isDenied: false, + isDismissed: true + }; + } + + return Object.assign({ + isConfirmed: false, + isDenied: false, + isDismissed: false + }, resolveValue); + }; + + const handlePopupAnimation = (instance, popup, innerParams) => { + const container = getContainer(); // If animation is supported, animate + + const animationIsSupported = animationEndEvent && hasCssAnimation(popup); + + if (typeof innerParams.willClose === 'function') { + innerParams.willClose(popup); + } + + if (animationIsSupported) { + animatePopup(instance, popup, container, innerParams.returnFocus, innerParams.didClose); + } else { + // Otherwise, remove immediately + removePopupAndResetState(instance, container, innerParams.returnFocus, innerParams.didClose); + } + }; + + const animatePopup = (instance, popup, container, returnFocus, didClose) => { + globalState.swalCloseEventFinishedCallback = removePopupAndResetState.bind(null, instance, container, returnFocus, didClose); + popup.addEventListener(animationEndEvent, function (e) { + if (e.target === popup) { + globalState.swalCloseEventFinishedCallback(); + delete globalState.swalCloseEventFinishedCallback; + } + }); + }; + + const triggerDidCloseAndDispose = (instance, didClose) => { + setTimeout(() => { + if (typeof didClose === 'function') { + didClose.bind(instance.params)(); + } + + instance._destroy(); + }); + }; + + function setButtonsDisabled(instance, buttons, disabled) { + const domCache = privateProps.domCache.get(instance); + buttons.forEach(button => { + domCache[button].disabled = disabled; + }); + } + + function setInputDisabled(input, disabled) { + if (!input) { + return false; + } + + if (input.type === 'radio') { + const radiosContainer = input.parentNode.parentNode; + const radios = radiosContainer.querySelectorAll('input'); + + for (let i = 0; i < radios.length; i++) { + radios[i].disabled = disabled; + } + } else { + input.disabled = disabled; + } + } + + function enableButtons() { + setButtonsDisabled(this, ['confirmButton', 'denyButton', 'cancelButton'], false); + } + function disableButtons() { + setButtonsDisabled(this, ['confirmButton', 'denyButton', 'cancelButton'], true); + } + function enableInput() { + return setInputDisabled(this.getInput(), false); + } + function disableInput() { + return setInputDisabled(this.getInput(), true); + } + + function showValidationMessage(error) { + const domCache = privateProps.domCache.get(this); + const params = privateProps.innerParams.get(this); + setInnerHtml(domCache.validationMessage, error); + domCache.validationMessage.className = swalClasses['validation-message']; + + if (params.customClass && params.customClass.validationMessage) { + addClass(domCache.validationMessage, params.customClass.validationMessage); + } + + show(domCache.validationMessage); + const input = this.getInput(); + + if (input) { + input.setAttribute('aria-invalid', true); + input.setAttribute('aria-describedby', swalClasses['validation-message']); + focusInput(input); + addClass(input, swalClasses.inputerror); + } + } // Hide block with validation message + + function resetValidationMessage$1() { + const domCache = privateProps.domCache.get(this); + + if (domCache.validationMessage) { + hide(domCache.validationMessage); + } + + const input = this.getInput(); + + if (input) { + input.removeAttribute('aria-invalid'); + input.removeAttribute('aria-describedby'); + removeClass(input, swalClasses.inputerror); + } + } + + function getProgressSteps$1() { + const domCache = privateProps.domCache.get(this); + return domCache.progressSteps; + } + + class Timer { + constructor(callback, delay) { + this.callback = callback; + this.remaining = delay; + this.running = false; + this.start(); + } + + start() { + if (!this.running) { + this.running = true; + this.started = new Date(); + this.id = setTimeout(this.callback, this.remaining); + } + + return this.remaining; + } + + stop() { + if (this.running) { + this.running = false; + clearTimeout(this.id); + this.remaining -= new Date() - this.started; + } + + return this.remaining; + } + + increase(n) { + const running = this.running; + + if (running) { + this.stop(); + } + + this.remaining += n; + + if (running) { + this.start(); + } + + return this.remaining; + } + + getTimerLeft() { + if (this.running) { + this.stop(); + this.start(); + } + + return this.remaining; + } + + isRunning() { + return this.running; + } + + } + + var defaultInputValidators = { + email: (string, validationMessage) => { + return /^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]{2,24}$/.test(string) ? Promise.resolve() : Promise.resolve(validationMessage || 'Invalid email address'); + }, + url: (string, validationMessage) => { + // taken from https://stackoverflow.com/a/3809435 with a small change from #1306 and #2013 + return /^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(string) ? Promise.resolve() : Promise.resolve(validationMessage || 'Invalid URL'); + } + }; + + function setDefaultInputValidators(params) { + // Use default `inputValidator` for supported input types if not provided + if (!params.inputValidator) { + Object.keys(defaultInputValidators).forEach(key => { + if (params.input === key) { + params.inputValidator = defaultInputValidators[key]; + } + }); + } + } + + function validateCustomTargetElement(params) { + // Determine if the custom target element is valid + if (!params.target || typeof params.target === 'string' && !document.querySelector(params.target) || typeof params.target !== 'string' && !params.target.appendChild) { + warn('Target parameter is not valid, defaulting to "body"'); + params.target = 'body'; + } + } + /** + * Set type, text and actions on popup + * + * @param params + * @returns {boolean} + */ + + + function setParameters(params) { + setDefaultInputValidators(params); // showLoaderOnConfirm && preConfirm + + if (params.showLoaderOnConfirm && !params.preConfirm) { + warn('showLoaderOnConfirm is set to true, but preConfirm is not defined.\n' + 'showLoaderOnConfirm should be used together with preConfirm, see usage example:\n' + 'https://sweetalert2.github.io/#ajax-request'); + } + + validateCustomTargetElement(params); // Replace newlines with
                                    in title + + if (typeof params.title === 'string') { + params.title = params.title.split('\n').join('
                                    '); + } + + init(params); + } + + const swalStringParams = ['swal-title', 'swal-html', 'swal-footer']; + const getTemplateParams = params => { + const template = typeof params.template === 'string' ? document.querySelector(params.template) : params.template; + + if (!template) { + return {}; + } + + const templateContent = template.content; + showWarningsForElements(templateContent); + const result = Object.assign(getSwalParams(templateContent), getSwalButtons(templateContent), getSwalImage(templateContent), getSwalIcon(templateContent), getSwalInput(templateContent), getSwalStringParams(templateContent, swalStringParams)); + return result; + }; + + const getSwalParams = templateContent => { + const result = {}; + toArray(templateContent.querySelectorAll('swal-param')).forEach(param => { + showWarningsForAttributes(param, ['name', 'value']); + const paramName = param.getAttribute('name'); + let value = param.getAttribute('value'); + + if (typeof defaultParams[paramName] === 'boolean' && value === 'false') { + value = false; + } + + if (typeof defaultParams[paramName] === 'object') { + value = JSON.parse(value); + } + + result[paramName] = value; + }); + return result; + }; + + const getSwalButtons = templateContent => { + const result = {}; + toArray(templateContent.querySelectorAll('swal-button')).forEach(button => { + showWarningsForAttributes(button, ['type', 'color', 'aria-label']); + const type = button.getAttribute('type'); + result["".concat(type, "ButtonText")] = button.innerHTML; + result["show".concat(capitalizeFirstLetter(type), "Button")] = true; + + if (button.hasAttribute('color')) { + result["".concat(type, "ButtonColor")] = button.getAttribute('color'); + } + + if (button.hasAttribute('aria-label')) { + result["".concat(type, "ButtonAriaLabel")] = button.getAttribute('aria-label'); + } + }); + return result; + }; + + const getSwalImage = templateContent => { + const result = {}; + const image = templateContent.querySelector('swal-image'); + + if (image) { + showWarningsForAttributes(image, ['src', 'width', 'height', 'alt']); + + if (image.hasAttribute('src')) { + result.imageUrl = image.getAttribute('src'); + } + + if (image.hasAttribute('width')) { + result.imageWidth = image.getAttribute('width'); + } + + if (image.hasAttribute('height')) { + result.imageHeight = image.getAttribute('height'); + } + + if (image.hasAttribute('alt')) { + result.imageAlt = image.getAttribute('alt'); + } + } + + return result; + }; + + const getSwalIcon = templateContent => { + const result = {}; + const icon = templateContent.querySelector('swal-icon'); + + if (icon) { + showWarningsForAttributes(icon, ['type', 'color']); + + if (icon.hasAttribute('type')) { + result.icon = icon.getAttribute('type'); + } + + if (icon.hasAttribute('color')) { + result.iconColor = icon.getAttribute('color'); + } + + result.iconHtml = icon.innerHTML; + } + + return result; + }; + + const getSwalInput = templateContent => { + const result = {}; + const input = templateContent.querySelector('swal-input'); + + if (input) { + showWarningsForAttributes(input, ['type', 'label', 'placeholder', 'value']); + result.input = input.getAttribute('type') || 'text'; + + if (input.hasAttribute('label')) { + result.inputLabel = input.getAttribute('label'); + } + + if (input.hasAttribute('placeholder')) { + result.inputPlaceholder = input.getAttribute('placeholder'); + } + + if (input.hasAttribute('value')) { + result.inputValue = input.getAttribute('value'); + } + } + + const inputOptions = templateContent.querySelectorAll('swal-input-option'); + + if (inputOptions.length) { + result.inputOptions = {}; + toArray(inputOptions).forEach(option => { + showWarningsForAttributes(option, ['value']); + const optionValue = option.getAttribute('value'); + const optionName = option.innerHTML; + result.inputOptions[optionValue] = optionName; + }); + } + + return result; + }; + + const getSwalStringParams = (templateContent, paramNames) => { + const result = {}; + + for (const i in paramNames) { + const paramName = paramNames[i]; + const tag = templateContent.querySelector(paramName); + + if (tag) { + showWarningsForAttributes(tag, []); + result[paramName.replace(/^swal-/, '')] = tag.innerHTML.trim(); + } + } + + return result; + }; + + const showWarningsForElements = template => { + const allowedElements = swalStringParams.concat(['swal-param', 'swal-button', 'swal-image', 'swal-icon', 'swal-input', 'swal-input-option']); + toArray(template.children).forEach(el => { + const tagName = el.tagName.toLowerCase(); + + if (allowedElements.indexOf(tagName) === -1) { + warn("Unrecognized element <".concat(tagName, ">")); + } + }); + }; + + const showWarningsForAttributes = (el, allowedAttributes) => { + toArray(el.attributes).forEach(attribute => { + if (allowedAttributes.indexOf(attribute.name) === -1) { + warn(["Unrecognized attribute \"".concat(attribute.name, "\" on <").concat(el.tagName.toLowerCase(), ">."), "".concat(allowedAttributes.length ? "Allowed attributes are: ".concat(allowedAttributes.join(', ')) : 'To set the value, use HTML within the element.')]); + } + }); + }; + + const SHOW_CLASS_TIMEOUT = 10; + /** + * Open popup, add necessary classes and styles, fix scrollbar + * + * @param params + */ + + const openPopup = params => { + const container = getContainer(); + const popup = getPopup(); + + if (typeof params.willOpen === 'function') { + params.willOpen(popup); + } + + const bodyStyles = window.getComputedStyle(document.body); + const initialBodyOverflow = bodyStyles.overflowY; + addClasses$1(container, popup, params); // scrolling is 'hidden' until animation is done, after that 'auto' + + setTimeout(() => { + setScrollingVisibility(container, popup); + }, SHOW_CLASS_TIMEOUT); + + if (isModal()) { + fixScrollContainer(container, params.scrollbarPadding, initialBodyOverflow); + setAriaHidden(); + } + + if (!isToast() && !globalState.previousActiveElement) { + globalState.previousActiveElement = document.activeElement; + } + + if (typeof params.didOpen === 'function') { + setTimeout(() => params.didOpen(popup)); + } + + removeClass(container, swalClasses['no-transition']); + }; + + const swalOpenAnimationFinished = event => { + const popup = getPopup(); + + if (event.target !== popup) { + return; + } + + const container = getContainer(); + popup.removeEventListener(animationEndEvent, swalOpenAnimationFinished); + container.style.overflowY = 'auto'; + }; + + const setScrollingVisibility = (container, popup) => { + if (animationEndEvent && hasCssAnimation(popup)) { + container.style.overflowY = 'hidden'; + popup.addEventListener(animationEndEvent, swalOpenAnimationFinished); + } else { + container.style.overflowY = 'auto'; + } + }; + + const fixScrollContainer = (container, scrollbarPadding, initialBodyOverflow) => { + iOSfix(); + + if (scrollbarPadding && initialBodyOverflow !== 'hidden') { + fixScrollbar(); + } // sweetalert2/issues/1247 + + + setTimeout(() => { + container.scrollTop = 0; + }); + }; + + const addClasses$1 = (container, popup, params) => { + addClass(container, params.showClass.backdrop); // the workaround with setting/unsetting opacity is needed for #2019 and 2059 + + popup.style.setProperty('opacity', '0', 'important'); + show(popup, 'grid'); + setTimeout(() => { + // Animate popup right after showing it + addClass(popup, params.showClass.popup); // and remove the opacity workaround + + popup.style.removeProperty('opacity'); + }, SHOW_CLASS_TIMEOUT); // 10ms in order to fix #2062 + + addClass([document.documentElement, document.body], swalClasses.shown); + + if (params.heightAuto && params.backdrop && !params.toast) { + addClass([document.documentElement, document.body], swalClasses['height-auto']); + } + }; + + const handleInputOptionsAndValue = (instance, params) => { + if (params.input === 'select' || params.input === 'radio') { + handleInputOptions(instance, params); + } else if (['text', 'email', 'number', 'tel', 'textarea'].includes(params.input) && (hasToPromiseFn(params.inputValue) || isPromise(params.inputValue))) { + showLoading(getConfirmButton()); + handleInputValue(instance, params); + } + }; + const getInputValue = (instance, innerParams) => { + const input = instance.getInput(); + + if (!input) { + return null; + } + + switch (innerParams.input) { + case 'checkbox': + return getCheckboxValue(input); + + case 'radio': + return getRadioValue(input); + + case 'file': + return getFileValue(input); + + default: + return innerParams.inputAutoTrim ? input.value.trim() : input.value; + } + }; + + const getCheckboxValue = input => input.checked ? 1 : 0; + + const getRadioValue = input => input.checked ? input.value : null; + + const getFileValue = input => input.files.length ? input.getAttribute('multiple') !== null ? input.files : input.files[0] : null; + + const handleInputOptions = (instance, params) => { + const popup = getPopup(); + + const processInputOptions = inputOptions => populateInputOptions[params.input](popup, formatInputOptions(inputOptions), params); + + if (hasToPromiseFn(params.inputOptions) || isPromise(params.inputOptions)) { + showLoading(getConfirmButton()); + asPromise(params.inputOptions).then(inputOptions => { + instance.hideLoading(); + processInputOptions(inputOptions); + }); + } else if (typeof params.inputOptions === 'object') { + processInputOptions(params.inputOptions); + } else { + error("Unexpected type of inputOptions! Expected object, Map or Promise, got ".concat(typeof params.inputOptions)); + } + }; + + const handleInputValue = (instance, params) => { + const input = instance.getInput(); + hide(input); + asPromise(params.inputValue).then(inputValue => { + input.value = params.input === 'number' ? parseFloat(inputValue) || 0 : "".concat(inputValue); + show(input); + input.focus(); + instance.hideLoading(); + }).catch(err => { + error("Error in inputValue promise: ".concat(err)); + input.value = ''; + show(input); + input.focus(); + instance.hideLoading(); + }); + }; + + const populateInputOptions = { + select: (popup, inputOptions, params) => { + const select = getChildByClass(popup, swalClasses.select); + + const renderOption = (parent, optionLabel, optionValue) => { + const option = document.createElement('option'); + option.value = optionValue; + setInnerHtml(option, optionLabel); + option.selected = isSelected(optionValue, params.inputValue); + parent.appendChild(option); + }; + + inputOptions.forEach(inputOption => { + const optionValue = inputOption[0]; + const optionLabel = inputOption[1]; // spec: + // https://www.w3.org/TR/html401/interact/forms.html#h-17.6 + // "...all OPTGROUP elements must be specified directly within a SELECT element (i.e., groups may not be nested)..." + // check whether this is a + + if (Array.isArray(optionLabel)) { + // if it is an array, then it is an + const optgroup = document.createElement('optgroup'); + optgroup.label = optionValue; + optgroup.disabled = false; // not configurable for now + + select.appendChild(optgroup); + optionLabel.forEach(o => renderOption(optgroup, o[1], o[0])); + } else { + // case of + valueFormatted = formatInputOptions(valueFormatted); + } + + result.push([key, valueFormatted]); + }); + } else { + Object.keys(inputOptions).forEach(key => { + let valueFormatted = inputOptions[key]; + + if (typeof valueFormatted === 'object') { + // case of + valueFormatted = formatInputOptions(valueFormatted); + } + + result.push([key, valueFormatted]); + }); + } + + return result; + }; + + const isSelected = (optionValue, inputValue) => { + return inputValue && inputValue.toString() === optionValue.toString(); + }; + + const handleConfirmButtonClick = instance => { + const innerParams = privateProps.innerParams.get(instance); + instance.disableButtons(); + + if (innerParams.input) { + handleConfirmOrDenyWithInput(instance, 'confirm'); + } else { + confirm(instance, true); + } + }; + const handleDenyButtonClick = instance => { + const innerParams = privateProps.innerParams.get(instance); + instance.disableButtons(); + + if (innerParams.returnInputValueOnDeny) { + handleConfirmOrDenyWithInput(instance, 'deny'); + } else { + deny(instance, false); + } + }; + const handleCancelButtonClick = (instance, dismissWith) => { + instance.disableButtons(); + dismissWith(DismissReason.cancel); + }; + + const handleConfirmOrDenyWithInput = (instance, type + /* 'confirm' | 'deny' */ + ) => { + const innerParams = privateProps.innerParams.get(instance); + const inputValue = getInputValue(instance, innerParams); + + if (innerParams.inputValidator) { + handleInputValidator(instance, inputValue, type); + } else if (!instance.getInput().checkValidity()) { + instance.enableButtons(); + instance.showValidationMessage(innerParams.validationMessage); + } else if (type === 'deny') { + deny(instance, inputValue); + } else { + confirm(instance, inputValue); + } + }; + + const handleInputValidator = (instance, inputValue, type + /* 'confirm' | 'deny' */ + ) => { + const innerParams = privateProps.innerParams.get(instance); + instance.disableInput(); + const validationPromise = Promise.resolve().then(() => asPromise(innerParams.inputValidator(inputValue, innerParams.validationMessage))); + validationPromise.then(validationMessage => { + instance.enableButtons(); + instance.enableInput(); + + if (validationMessage) { + instance.showValidationMessage(validationMessage); + } else if (type === 'deny') { + deny(instance, inputValue); + } else { + confirm(instance, inputValue); + } + }); + }; + + const deny = (instance, value) => { + const innerParams = privateProps.innerParams.get(instance || undefined); + + if (innerParams.showLoaderOnDeny) { + showLoading(getDenyButton()); + } + + if (innerParams.preDeny) { + const preDenyPromise = Promise.resolve().then(() => asPromise(innerParams.preDeny(value, innerParams.validationMessage))); + preDenyPromise.then(preDenyValue => { + if (preDenyValue === false) { + instance.hideLoading(); + } else { + instance.closePopup({ + isDenied: true, + value: typeof preDenyValue === 'undefined' ? value : preDenyValue + }); + } + }); + } else { + instance.closePopup({ + isDenied: true, + value + }); + } + }; + + const succeedWith = (instance, value) => { + instance.closePopup({ + isConfirmed: true, + value + }); + }; + + const confirm = (instance, value) => { + const innerParams = privateProps.innerParams.get(instance || undefined); + + if (innerParams.showLoaderOnConfirm) { + showLoading(); // TODO: make showLoading an *instance* method + } + + if (innerParams.preConfirm) { + instance.resetValidationMessage(); + const preConfirmPromise = Promise.resolve().then(() => asPromise(innerParams.preConfirm(value, innerParams.validationMessage))); + preConfirmPromise.then(preConfirmValue => { + if (isVisible(getValidationMessage()) || preConfirmValue === false) { + instance.hideLoading(); + } else { + succeedWith(instance, typeof preConfirmValue === 'undefined' ? value : preConfirmValue); + } + }); + } else { + succeedWith(instance, value); + } + }; + + const addKeydownHandler = (instance, globalState, innerParams, dismissWith) => { + if (globalState.keydownTarget && globalState.keydownHandlerAdded) { + globalState.keydownTarget.removeEventListener('keydown', globalState.keydownHandler, { + capture: globalState.keydownListenerCapture + }); + globalState.keydownHandlerAdded = false; + } + + if (!innerParams.toast) { + globalState.keydownHandler = e => keydownHandler(instance, e, dismissWith); + + globalState.keydownTarget = innerParams.keydownListenerCapture ? window : getPopup(); + globalState.keydownListenerCapture = innerParams.keydownListenerCapture; + globalState.keydownTarget.addEventListener('keydown', globalState.keydownHandler, { + capture: globalState.keydownListenerCapture + }); + globalState.keydownHandlerAdded = true; + } + }; // Focus handling + + const setFocus = (innerParams, index, increment) => { + const focusableElements = getFocusableElements(); // search for visible elements and select the next possible match + + if (focusableElements.length) { + index = index + increment; // rollover to first item + + if (index === focusableElements.length) { + index = 0; // go to last item + } else if (index === -1) { + index = focusableElements.length - 1; + } + + return focusableElements[index].focus(); + } // no visible focusable elements, focus the popup + + + getPopup().focus(); + }; + const arrowKeysNextButton = ['ArrowRight', 'ArrowDown']; + const arrowKeysPreviousButton = ['ArrowLeft', 'ArrowUp']; + + const keydownHandler = (instance, e, dismissWith) => { + const innerParams = privateProps.innerParams.get(instance); + + if (!innerParams) { + return; // This instance has already been destroyed + } + + if (innerParams.stopKeydownPropagation) { + e.stopPropagation(); + } // ENTER + + + if (e.key === 'Enter') { + handleEnter(instance, e, innerParams); // TAB + } else if (e.key === 'Tab') { + handleTab(e, innerParams); // ARROWS - switch focus between buttons + } else if ([...arrowKeysNextButton, ...arrowKeysPreviousButton].includes(e.key)) { + handleArrows(e.key); // ESC + } else if (e.key === 'Escape') { + handleEsc(e, innerParams, dismissWith); + } + }; + + const handleEnter = (instance, e, innerParams) => { + // #720 #721 + if (e.isComposing) { + return; + } + + if (e.target && instance.getInput() && e.target.outerHTML === instance.getInput().outerHTML) { + if (['textarea', 'file'].includes(innerParams.input)) { + return; // do not submit + } + + clickConfirm(); + e.preventDefault(); + } + }; + + const handleTab = (e, innerParams) => { + const targetElement = e.target; + const focusableElements = getFocusableElements(); + let btnIndex = -1; + + for (let i = 0; i < focusableElements.length; i++) { + if (targetElement === focusableElements[i]) { + btnIndex = i; + break; + } + } + + if (!e.shiftKey) { + // Cycle to the next button + setFocus(innerParams, btnIndex, 1); + } else { + // Cycle to the prev button + setFocus(innerParams, btnIndex, -1); + } + + e.stopPropagation(); + e.preventDefault(); + }; + + const handleArrows = key => { + const confirmButton = getConfirmButton(); + const denyButton = getDenyButton(); + const cancelButton = getCancelButton(); + + if (![confirmButton, denyButton, cancelButton].includes(document.activeElement)) { + return; + } + + const sibling = arrowKeysNextButton.includes(key) ? 'nextElementSibling' : 'previousElementSibling'; + const buttonToFocus = document.activeElement[sibling]; + + if (buttonToFocus) { + buttonToFocus.focus(); + } + }; + + const handleEsc = (e, innerParams, dismissWith) => { + if (callIfFunction(innerParams.allowEscapeKey)) { + e.preventDefault(); + dismissWith(DismissReason.esc); + } + }; + + const handlePopupClick = (instance, domCache, dismissWith) => { + const innerParams = privateProps.innerParams.get(instance); + + if (innerParams.toast) { + handleToastClick(instance, domCache, dismissWith); + } else { + // Ignore click events that had mousedown on the popup but mouseup on the container + // This can happen when the user drags a slider + handleModalMousedown(domCache); // Ignore click events that had mousedown on the container but mouseup on the popup + + handleContainerMousedown(domCache); + handleModalClick(instance, domCache, dismissWith); + } + }; + + const handleToastClick = (instance, domCache, dismissWith) => { + // Closing toast by internal click + domCache.popup.onclick = () => { + const innerParams = privateProps.innerParams.get(instance); + + if (innerParams.showConfirmButton || innerParams.showDenyButton || innerParams.showCancelButton || innerParams.showCloseButton || innerParams.timer || innerParams.input) { + return; + } + + dismissWith(DismissReason.close); + }; + }; + + let ignoreOutsideClick = false; + + const handleModalMousedown = domCache => { + domCache.popup.onmousedown = () => { + domCache.container.onmouseup = function (e) { + domCache.container.onmouseup = undefined; // We only check if the mouseup target is the container because usually it doesn't + // have any other direct children aside of the popup + + if (e.target === domCache.container) { + ignoreOutsideClick = true; + } + }; + }; + }; + + const handleContainerMousedown = domCache => { + domCache.container.onmousedown = () => { + domCache.popup.onmouseup = function (e) { + domCache.popup.onmouseup = undefined; // We also need to check if the mouseup target is a child of the popup + + if (e.target === domCache.popup || domCache.popup.contains(e.target)) { + ignoreOutsideClick = true; + } + }; + }; + }; + + const handleModalClick = (instance, domCache, dismissWith) => { + domCache.container.onclick = e => { + const innerParams = privateProps.innerParams.get(instance); + + if (ignoreOutsideClick) { + ignoreOutsideClick = false; + return; + } + + if (e.target === domCache.container && callIfFunction(innerParams.allowOutsideClick)) { + dismissWith(DismissReason.backdrop); + } + }; + }; + + function _main(userParams, mixinParams = {}) { + showWarningsForParams(Object.assign({}, mixinParams, userParams)); + + if (globalState.currentInstance) { + globalState.currentInstance._destroy(); + + if (isModal()) { + unsetAriaHidden(); + } + } + + globalState.currentInstance = this; + const innerParams = prepareParams(userParams, mixinParams); + setParameters(innerParams); + Object.freeze(innerParams); // clear the previous timer + + if (globalState.timeout) { + globalState.timeout.stop(); + delete globalState.timeout; + } // clear the restore focus timeout + + + clearTimeout(globalState.restoreFocusTimeout); + const domCache = populateDomCache(this); + render(this, innerParams); + privateProps.innerParams.set(this, innerParams); + return swalPromise(this, domCache, innerParams); + } + + const prepareParams = (userParams, mixinParams) => { + const templateParams = getTemplateParams(userParams); + const params = Object.assign({}, defaultParams, mixinParams, templateParams, userParams); // precedence is described in #2131 + + params.showClass = Object.assign({}, defaultParams.showClass, params.showClass); + params.hideClass = Object.assign({}, defaultParams.hideClass, params.hideClass); + return params; + }; + + const swalPromise = (instance, domCache, innerParams) => { + return new Promise(resolve => { + // functions to handle all closings/dismissals + const dismissWith = dismiss => { + instance.closePopup({ + isDismissed: true, + dismiss + }); + }; + + privateMethods.swalPromiseResolve.set(instance, resolve); + + domCache.confirmButton.onclick = () => handleConfirmButtonClick(instance); + + domCache.denyButton.onclick = () => handleDenyButtonClick(instance); + + domCache.cancelButton.onclick = () => handleCancelButtonClick(instance, dismissWith); + + domCache.closeButton.onclick = () => dismissWith(DismissReason.close); + + handlePopupClick(instance, domCache, dismissWith); + addKeydownHandler(instance, globalState, innerParams, dismissWith); + handleInputOptionsAndValue(instance, innerParams); + openPopup(innerParams); + setupTimer(globalState, innerParams, dismissWith); + initFocus(domCache, innerParams); // Scroll container to top on open (#1247, #1946) + + setTimeout(() => { + domCache.container.scrollTop = 0; + }); + }); + }; + + const populateDomCache = instance => { + const domCache = { + popup: getPopup(), + container: getContainer(), + actions: getActions(), + confirmButton: getConfirmButton(), + denyButton: getDenyButton(), + cancelButton: getCancelButton(), + loader: getLoader(), + closeButton: getCloseButton(), + validationMessage: getValidationMessage(), + progressSteps: getProgressSteps() + }; + privateProps.domCache.set(instance, domCache); + return domCache; + }; + + const setupTimer = (globalState$$1, innerParams, dismissWith) => { + const timerProgressBar = getTimerProgressBar(); + hide(timerProgressBar); + + if (innerParams.timer) { + globalState$$1.timeout = new Timer(() => { + dismissWith('timer'); + delete globalState$$1.timeout; + }, innerParams.timer); + + if (innerParams.timerProgressBar) { + show(timerProgressBar); + setTimeout(() => { + if (globalState$$1.timeout && globalState$$1.timeout.running) { + // timer can be already stopped or unset at this point + animateTimerProgressBar(innerParams.timer); + } + }); + } + } + }; + + const initFocus = (domCache, innerParams) => { + if (innerParams.toast) { + return; + } + + if (!callIfFunction(innerParams.allowEnterKey)) { + return blurActiveElement(); + } + + if (!focusButton(domCache, innerParams)) { + setFocus(innerParams, -1, 1); + } + }; + + const focusButton = (domCache, innerParams) => { + if (innerParams.focusDeny && isVisible(domCache.denyButton)) { + domCache.denyButton.focus(); + return true; + } + + if (innerParams.focusCancel && isVisible(domCache.cancelButton)) { + domCache.cancelButton.focus(); + return true; + } + + if (innerParams.focusConfirm && isVisible(domCache.confirmButton)) { + domCache.confirmButton.focus(); + return true; + } + + return false; + }; + + const blurActiveElement = () => { + if (document.activeElement && typeof document.activeElement.blur === 'function') { + document.activeElement.blur(); + } + }; + + /** + * Updates popup parameters. + */ + + function update(params) { + const popup = getPopup(); + const innerParams = privateProps.innerParams.get(this); + + if (!popup || hasClass(popup, innerParams.hideClass.popup)) { + return warn("You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup."); + } + + const validUpdatableParams = {}; // assign valid params from `params` to `defaults` + + Object.keys(params).forEach(param => { + if (Swal.isUpdatableParameter(param)) { + validUpdatableParams[param] = params[param]; + } else { + warn("Invalid parameter to update: \"".concat(param, "\". Updatable params are listed here: https://github.com/sweetalert2/sweetalert2/blob/master/src/utils/params.js\n\nIf you think this parameter should be updatable, request it here: https://github.com/sweetalert2/sweetalert2/issues/new?template=02_feature_request.md")); + } + }); + const updatedParams = Object.assign({}, innerParams, validUpdatableParams); + render(this, updatedParams); + privateProps.innerParams.set(this, updatedParams); + Object.defineProperties(this, { + params: { + value: Object.assign({}, this.params, params), + writable: false, + enumerable: true + } + }); + } + + function _destroy() { + const domCache = privateProps.domCache.get(this); + const innerParams = privateProps.innerParams.get(this); + + if (!innerParams) { + return; // This instance has already been destroyed + } // Check if there is another Swal closing + + + if (domCache.popup && globalState.swalCloseEventFinishedCallback) { + globalState.swalCloseEventFinishedCallback(); + delete globalState.swalCloseEventFinishedCallback; + } // Check if there is a swal disposal defer timer + + + if (globalState.deferDisposalTimer) { + clearTimeout(globalState.deferDisposalTimer); + delete globalState.deferDisposalTimer; + } + + if (typeof innerParams.didDestroy === 'function') { + innerParams.didDestroy(); + } + + disposeSwal(this); + } + + const disposeSwal = instance => { + // Unset this.params so GC will dispose it (#1569) + delete instance.params; // Unset globalState props so GC will dispose globalState (#1569) + + delete globalState.keydownHandler; + delete globalState.keydownTarget; // Unset WeakMaps so GC will be able to dispose them (#1569) + + unsetWeakMaps(privateProps); + unsetWeakMaps(privateMethods); // Unset currentInstance + + delete globalState.currentInstance; + }; + + const unsetWeakMaps = obj => { + for (const i in obj) { + obj[i] = new WeakMap(); + } + }; + + + + var instanceMethods = /*#__PURE__*/Object.freeze({ + hideLoading: hideLoading, + disableLoading: hideLoading, + getInput: getInput$1, + close: close, + closePopup: close, + closeModal: close, + closeToast: close, + enableButtons: enableButtons, + disableButtons: disableButtons, + enableInput: enableInput, + disableInput: disableInput, + showValidationMessage: showValidationMessage, + resetValidationMessage: resetValidationMessage$1, + getProgressSteps: getProgressSteps$1, + _main: _main, + update: update, + _destroy: _destroy + }); + + let currentInstance; + + class SweetAlert { + constructor(...args) { + // Prevent run in Node env + if (typeof window === 'undefined') { + return; + } + + currentInstance = this; + const outerParams = Object.freeze(this.constructor.argsToParams(args)); + Object.defineProperties(this, { + params: { + value: outerParams, + writable: false, + enumerable: true, + configurable: true + } + }); + + const promise = this._main(this.params); + + privateProps.promise.set(this, promise); + } // `catch` cannot be the name of a module export, so we define our thenable methods here instead + + + then(onFulfilled) { + const promise = privateProps.promise.get(this); + return promise.then(onFulfilled); + } + + finally(onFinally) { + const promise = privateProps.promise.get(this); + return promise.finally(onFinally); + } + + } // Assign instance methods from src/instanceMethods/*.js to prototype + + + Object.assign(SweetAlert.prototype, instanceMethods); // Assign static methods from src/staticMethods/*.js to constructor + + Object.assign(SweetAlert, staticMethods); // Proxy to instance methods to constructor, for now, for backwards compatibility + + Object.keys(instanceMethods).forEach(key => { + SweetAlert[key] = function (...args) { + if (currentInstance) { + return currentInstance[key](...args); + } + }; + }); + SweetAlert.DismissReason = DismissReason; + SweetAlert.version = '11.1.5'; + + const Swal = SweetAlert; + Swal.default = Swal; + + return Swal; + +})); +if (typeof this !== 'undefined' && this.Sweetalert2){ this.swal = this.sweetAlert = this.Swal = this.SweetAlert = this.Sweetalert2} + +"undefined"!=typeof document&&function(e,t){var n=e.createElement("style");if(e.getElementsByTagName("head")[0].appendChild(n),n.styleSheet)n.styleSheet.disabled||(n.styleSheet.cssText=t);else try{n.innerHTML=t}catch(e){n.innerText=t}}(document,".swal2-popup.swal2-toast{box-sizing:border-box;grid-column:1/4!important;grid-row:1/4!important;grid-template-columns:1fr 99fr 1fr;padding:1em;overflow-y:hidden;background:#fff;box-shadow:0 0 .625em #d9d9d9;pointer-events:all}.swal2-popup.swal2-toast>*{grid-column:2}.swal2-popup.swal2-toast .swal2-title{margin:1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-loading{justify-content:center}.swal2-popup.swal2-toast .swal2-input{height:2em;margin:.5em;font-size:1em}.swal2-popup.swal2-toast .swal2-validation-message{font-size:1em}.swal2-popup.swal2-toast .swal2-footer{margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-popup.swal2-toast .swal2-close{grid-column:3/3;grid-row:1/99;align-self:center;width:.8em;height:.8em;margin:0;font-size:2em}.swal2-popup.swal2-toast .swal2-html-container{margin:1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-html-container:empty{padding:0}.swal2-popup.swal2-toast .swal2-loader{grid-column:1;grid-row:1/99;align-self:center;width:2em;height:2em;margin:.25em}.swal2-popup.swal2-toast .swal2-icon{grid-column:1;grid-row:1/99;align-self:center;width:2em;min-width:2em;height:2em;margin:0 .5em 0 0}.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:700}.swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-popup.swal2-toast .swal2-actions{justify-content:flex-start;height:auto;margin:0;margin-top:.3125em;padding:0}.swal2-popup.swal2-toast .swal2-styled{margin:.25em .5em;padding:.4em .6em;font-size:1em}.swal2-popup.swal2-toast .swal2-styled:focus{box-shadow:0 0 0 1px #fff,0 0 0 3px rgba(100,150,200,.5)}.swal2-popup.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;transform:rotate(45deg);border-radius:50%}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.8em;left:-.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.25em;left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-popup.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{-webkit-animation:swal2-toast-animate-success-line-tip .75s;animation:swal2-toast-animate-success-line-tip .75s}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{-webkit-animation:swal2-toast-animate-success-line-long .75s;animation:swal2-toast-animate-success-line-long .75s}.swal2-popup.swal2-toast.swal2-show{-webkit-animation:swal2-toast-show .5s;animation:swal2-toast-show .5s}.swal2-popup.swal2-toast.swal2-hide{-webkit-animation:swal2-toast-hide .1s forwards;animation:swal2-toast-hide .1s forwards}.swal2-container{display:grid;position:fixed;z-index:1060;top:0;right:0;bottom:0;left:0;box-sizing:border-box;grid-template-areas:\"top-start top top-end\" \"center-start center center-end\" \"bottom-start bottom-center bottom-end\";grid-template-rows:minmax(-webkit-min-content,auto) minmax(-webkit-min-content,auto) minmax(-webkit-min-content,auto);grid-template-rows:minmax(min-content,auto) minmax(min-content,auto) minmax(min-content,auto);height:100%;padding:.625em;overflow-x:hidden;transition:background-color .1s;-webkit-overflow-scrolling:touch}.swal2-container.swal2-backdrop-show,.swal2-container.swal2-noanimation{background:rgba(0,0,0,.4)}.swal2-container.swal2-backdrop-hide{background:0 0!important}.swal2-container.swal2-bottom-start,.swal2-container.swal2-center-start,.swal2-container.swal2-top-start{grid-template-columns:minmax(0,1fr) auto auto}.swal2-container.swal2-bottom,.swal2-container.swal2-center,.swal2-container.swal2-top{grid-template-columns:auto minmax(0,1fr) auto}.swal2-container.swal2-bottom-end,.swal2-container.swal2-center-end,.swal2-container.swal2-top-end{grid-template-columns:auto auto minmax(0,1fr)}.swal2-container.swal2-top-start>.swal2-popup{align-self:start}.swal2-container.swal2-top>.swal2-popup{grid-column:2;align-self:start;justify-self:center}.swal2-container.swal2-top-end>.swal2-popup,.swal2-container.swal2-top-right>.swal2-popup{grid-column:3;align-self:start;justify-self:end}.swal2-container.swal2-center-left>.swal2-popup,.swal2-container.swal2-center-start>.swal2-popup{grid-row:2;align-self:center}.swal2-container.swal2-center>.swal2-popup{grid-column:2;grid-row:2;align-self:center;justify-self:center}.swal2-container.swal2-center-end>.swal2-popup,.swal2-container.swal2-center-right>.swal2-popup{grid-column:3;grid-row:2;align-self:center;justify-self:end}.swal2-container.swal2-bottom-left>.swal2-popup,.swal2-container.swal2-bottom-start>.swal2-popup{grid-column:1;grid-row:3;align-self:end}.swal2-container.swal2-bottom>.swal2-popup{grid-column:2;grid-row:3;justify-self:center;align-self:end}.swal2-container.swal2-bottom-end>.swal2-popup,.swal2-container.swal2-bottom-right>.swal2-popup{grid-column:3;grid-row:3;align-self:end;justify-self:end}.swal2-container.swal2-grow-fullscreen>.swal2-popup,.swal2-container.swal2-grow-row>.swal2-popup{grid-column:1/4;width:100%}.swal2-container.swal2-grow-column>.swal2-popup,.swal2-container.swal2-grow-fullscreen>.swal2-popup{grid-row:1/4;align-self:stretch}.swal2-container.swal2-no-transition{transition:none!important}.swal2-popup{display:none;position:relative;box-sizing:border-box;grid-template-columns:minmax(0,100%);width:32em;max-width:100%;padding:0 0 1.25em;border:none;border-radius:5px;background:#fff;color:#545454;font-family:inherit;font-size:1rem}.swal2-popup:focus{outline:0}.swal2-popup.swal2-loading{overflow-y:hidden}.swal2-title{position:relative;max-width:100%;margin:0;padding:.8em 1em 0;color:#595959;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;word-wrap:break-word}.swal2-actions{display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:center;width:auto;margin:1.25em auto 0;padding:0}.swal2-actions:not(.swal2-loading) .swal2-styled[disabled]{opacity:.4}.swal2-actions:not(.swal2-loading) .swal2-styled:hover{background-image:linear-gradient(rgba(0,0,0,.1),rgba(0,0,0,.1))}.swal2-actions:not(.swal2-loading) .swal2-styled:active{background-image:linear-gradient(rgba(0,0,0,.2),rgba(0,0,0,.2))}.swal2-loader{display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;-webkit-animation:swal2-rotate-loading 1.5s linear 0s infinite normal;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 transparent #2778c4 transparent}.swal2-styled{margin:.3125em;padding:.625em 1.1em;transition:box-shadow .1s;box-shadow:0 0 0 3px transparent;font-weight:500}.swal2-styled:not([disabled]){cursor:pointer}.swal2-styled.swal2-confirm{border:0;border-radius:.25em;background:initial;background-color:#7367f0;color:#fff;font-size:1em}.swal2-styled.swal2-confirm:focus{box-shadow:0 0 0 3px rgba(115,103,240,.5)}.swal2-styled.swal2-deny{border:0;border-radius:.25em;background:initial;background-color:#ea5455;color:#fff;font-size:1em}.swal2-styled.swal2-deny:focus{box-shadow:0 0 0 3px rgba(234,84,85,.5)}.swal2-styled.swal2-cancel{border:0;border-radius:.25em;background:initial;background-color:#6e7d88;color:#fff;font-size:1em}.swal2-styled.swal2-cancel:focus{box-shadow:0 0 0 3px rgba(110,125,136,.5)}.swal2-styled.swal2-default-outline:focus{box-shadow:0 0 0 3px rgba(100,150,200,.5)}.swal2-styled:focus{outline:0}.swal2-styled::-moz-focus-inner{border:0}.swal2-footer{justify-content:center;margin:1em 0 0;padding:1em 1em 0;border-top:1px solid #eee;color:#545454;font-size:1em}.swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;grid-column:auto!important;height:.25em;overflow:hidden;border-bottom-right-radius:5px;border-bottom-left-radius:5px}.swal2-timer-progress-bar{width:100%;height:.25em;background:rgba(0,0,0,.2)}.swal2-image{max-width:100%;margin:2em auto 1em}.swal2-close{z-index:2;align-items:center;justify-content:center;width:1.2em;height:1.2em;margin-top:0;margin-right:0;margin-bottom:-1.2em;padding:0;overflow:hidden;transition:color .1s,box-shadow .1s;border:none;border-radius:5px;background:0 0;color:#ccc;font-family:serif;font-family:monospace;font-size:2.5em;cursor:pointer;justify-self:end}.swal2-close:hover{transform:none;background:0 0;color:#f27474}.swal2-close:focus{outline:0;box-shadow:inset 0 0 0 3px rgba(100,150,200,.5)}.swal2-close::-moz-focus-inner{border:0}.swal2-html-container{z-index:1;justify-content:center;margin:1em 1.6em .3em;padding:0;overflow:auto;color:#545454;font-size:1.125em;font-weight:400;line-height:normal;text-align:center;word-wrap:break-word;word-break:break-word}.swal2-checkbox,.swal2-file,.swal2-input,.swal2-radio,.swal2-select,.swal2-textarea{margin:1em 2em 0}.swal2-file,.swal2-input,.swal2-textarea{box-sizing:border-box;width:auto;transition:border-color .1s,box-shadow .1s;border:1px solid #d9d9d9;border-radius:.1875em;background:inherit;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px transparent;color:inherit;font-size:1.125em}.swal2-file.swal2-inputerror,.swal2-input.swal2-inputerror,.swal2-textarea.swal2-inputerror{border-color:#f27474!important;box-shadow:0 0 2px #f27474!important}.swal2-file:focus,.swal2-input:focus,.swal2-textarea:focus{border:1px solid #b4dbed;outline:0;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(100,150,200,.5)}.swal2-file::-moz-placeholder,.swal2-input::-moz-placeholder,.swal2-textarea::-moz-placeholder{color:#ccc}.swal2-file:-ms-input-placeholder,.swal2-input:-ms-input-placeholder,.swal2-textarea:-ms-input-placeholder{color:#ccc}.swal2-file::placeholder,.swal2-input::placeholder,.swal2-textarea::placeholder{color:#ccc}.swal2-range{margin:1em 2em 0;background:#fff}.swal2-range input{width:80%}.swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}.swal2-range input,.swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}.swal2-input{height:2.625em;padding:0 .75em}.swal2-file{width:75%;margin-right:auto;margin-left:auto;background:inherit;font-size:1.125em}.swal2-textarea{height:6.75em;padding:.75em}.swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:inherit;color:inherit;font-size:1.125em}.swal2-checkbox,.swal2-radio{align-items:center;justify-content:center;background:#fff;color:inherit}.swal2-checkbox label,.swal2-radio label{margin:0 .6em;font-size:1.125em}.swal2-checkbox input,.swal2-radio input{flex-shrink:0;margin:0 .4em}.swal2-input-label{display:flex;justify-content:center;margin:1em auto 0}.swal2-validation-message{align-items:center;justify-content:center;margin:1em 0 0;padding:.625em;overflow:hidden;background:#f0f0f0;color:#666;font-size:1em;font-weight:300}.swal2-validation-message::before{content:\"!\";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}.swal2-icon{position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:2.5em auto .6em;border:.25em solid transparent;border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}.swal2-icon.swal2-error{border-color:#f27474;color:#f27474}.swal2-icon.swal2-error .swal2-x-mark{position:relative;flex-grow:1}.swal2-icon.swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}.swal2-icon.swal2-error.swal2-icon-show{-webkit-animation:swal2-animate-error-icon .5s;animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-error.swal2-icon-show .swal2-x-mark{-webkit-animation:swal2-animate-error-x-mark .5s;animation:swal2-animate-error-x-mark .5s}.swal2-icon.swal2-warning{border-color:#facea8;color:#f8bb86}.swal2-icon.swal2-info{border-color:#9de0f6;color:#3fc3ee}.swal2-icon.swal2-question{border-color:#c9dae1;color:#87adbd}.swal2-icon.swal2-success{border-color:#a5dc86;color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;transform:rotate(45deg);border-radius:50%}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}.swal2-icon.swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-.25em;left:-.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}.swal2-icon.swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}.swal2-icon.swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}.swal2-icon.swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-tip{-webkit-animation:swal2-animate-success-line-tip .75s;animation:swal2-animate-success-line-tip .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-long{-webkit-animation:swal2-animate-success-line-long .75s;animation:swal2-animate-success-line-long .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-circular-line-right{-webkit-animation:swal2-rotate-success-circular-line 4.25s ease-in;animation:swal2-rotate-success-circular-line 4.25s ease-in}.swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:1.25em auto;padding:0;background:inherit;font-weight:600}.swal2-progress-steps li{display:inline-block;position:relative}.swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:#add8e6;color:#fff}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:#add8e6}.swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}[class^=swal2]{-webkit-tap-highlight-color:transparent}.swal2-show{-webkit-animation:swal2-show .3s;animation:swal2-show .3s}.swal2-hide{-webkit-animation:swal2-hide .15s forwards;animation:swal2-hide .15s forwards}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{margin-right:initial;margin-left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}@-webkit-keyframes swal2-toast-show{0%{transform:translateY(-.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0)}}@keyframes swal2-toast-show{0%{transform:translateY(-.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0)}}@-webkit-keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@-webkit-keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@-webkit-keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@-webkit-keyframes swal2-show{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}100%{transform:scale(1)}}@keyframes swal2-show{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}100%{transform:scale(1)}}@-webkit-keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(.5);opacity:0}}@keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(.5);opacity:0}}@-webkit-keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@-webkit-keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@-webkit-keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@-webkit-keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@-webkit-keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0);opacity:1}}@-webkit-keyframes swal2-rotate-loading{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes swal2-rotate-loading{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto!important}body.swal2-no-backdrop .swal2-container{background-color:transparent!important;pointer-events:none}body.swal2-no-backdrop .swal2-container .swal2-popup{pointer-events:all}body.swal2-no-backdrop .swal2-container .swal2-modal{box-shadow:0 0 10px rgba(0,0,0,.4)}@media print{body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow-y:scroll!important}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .swal2-container{position:static!important}}body.swal2-toast-shown .swal2-container{box-sizing:border-box;width:360px;max-width:100%;background-color:transparent;pointer-events:none}body.swal2-toast-shown .swal2-container.swal2-top{top:0;right:auto;bottom:auto;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{top:0;right:0;bottom:auto;left:auto}body.swal2-toast-shown .swal2-container.swal2-top-left,body.swal2-toast-shown .swal2-container.swal2-top-start{top:0;right:auto;bottom:auto;left:0}body.swal2-toast-shown .swal2-container.swal2-center-left,body.swal2-toast-shown .swal2-container.swal2-center-start{top:50%;right:auto;bottom:auto;left:0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{top:50%;right:auto;bottom:auto;left:50%;transform:translate(-50%,-50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{top:50%;right:0;bottom:auto;left:auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-left,body.swal2-toast-shown .swal2-container.swal2-bottom-start{top:auto;right:auto;bottom:0;left:0}body.swal2-toast-shown .swal2-container.swal2-bottom{top:auto;right:auto;bottom:0;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{top:auto;right:0;bottom:0;left:auto}"); \ No newline at end of file diff --git a/modules/docs/app/VoloDocs.Web/wwwroot/libs/sweetalert2/sweetalert2.all.min.js b/modules/docs/app/VoloDocs.Web/wwwroot/libs/sweetalert2/sweetalert2.all.min.js new file mode 100644 index 0000000000..57ff7ff176 --- /dev/null +++ b/modules/docs/app/VoloDocs.Web/wwwroot/libs/sweetalert2/sweetalert2.all.min.js @@ -0,0 +1,2 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).Sweetalert2=t()}(this,function(){"use strict";const l=Object.freeze({cancel:"cancel",backdrop:"backdrop",close:"close",esc:"esc",timer:"timer"}),t="SweetAlert2:",o=e=>e.charAt(0).toUpperCase()+e.slice(1),a=e=>Array.prototype.slice.call(e),s=e=>{console.warn("".concat(t," ").concat("object"==typeof e?e.join(" "):e))},r=e=>{console.error("".concat(t," ").concat(e))},n=[],i=(e,t)=>{t='"'.concat(e,'" is deprecated and will be removed in the next major release. Please use "').concat(t,'" instead.'),n.includes(t)||(n.push(t),s(t))},c=e=>"function"==typeof e?e():e,u=e=>e&&"function"==typeof e.toPromise,d=e=>u(e)?e.toPromise():Promise.resolve(e),p=e=>e&&Promise.resolve(e)===e,m=e=>e instanceof Element||(e=>"object"==typeof e&&e.jquery)(e);var e=e=>{const t={};for(const n in e)t[e[n]]="swal2-"+e[n];return t};const h=e(["container","shown","height-auto","iosfix","popup","modal","no-backdrop","no-transition","toast","toast-shown","show","hide","close","title","html-container","actions","confirm","deny","cancel","default-outline","footer","icon","icon-content","image","input","file","range","select","radio","checkbox","label","textarea","inputerror","input-label","validation-message","progress-steps","active-progress-step","progress-step","progress-step-line","loader","loading","styled","top","top-start","top-end","top-left","top-right","center","center-start","center-end","center-left","center-right","bottom","bottom-start","bottom-end","bottom-left","bottom-right","grow-row","grow-column","grow-fullscreen","rtl","timer-progress-bar","timer-progress-bar-container","scrollbar-measure","icon-success","icon-warning","icon-info","icon-question","icon-error"]),g=e(["success","warning","info","question","error"]),b=()=>document.body.querySelector(".".concat(h.container)),f=e=>{const t=b();return t?t.querySelector(e):null},y=e=>f(".".concat(e)),v=()=>y(h.popup),w=()=>y(h.icon),C=()=>y(h.title),k=()=>y(h["html-container"]),A=()=>y(h.image),B=()=>y(h["progress-steps"]),x=()=>y(h["validation-message"]),P=()=>f(".".concat(h.actions," .").concat(h.confirm)),E=()=>f(".".concat(h.actions," .").concat(h.deny));const S=()=>f(".".concat(h.loader)),T=()=>f(".".concat(h.actions," .").concat(h.cancel)),L=()=>y(h.actions),O=()=>y(h.footer),j=()=>y(h["timer-progress-bar"]),D=()=>y(h.close),I=()=>{const e=a(v().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')).sort((e,t)=>(e=parseInt(e.getAttribute("tabindex")),(t=parseInt(t.getAttribute("tabindex")))"-1"!==e.getAttribute("tabindex"));return(t=>{const n=[];for(let e=0;eG(e))},M=()=>!H()&&!document.body.classList.contains(h["no-backdrop"]),H=()=>document.body.classList.contains(h["toast-shown"]);const q={previousBodyPadding:null},V=(t,e)=>{if(t.textContent="",e){const n=new DOMParser,o=n.parseFromString(e,"text/html");a(o.querySelector("head").childNodes).forEach(e=>{t.appendChild(e)}),a(o.querySelector("body").childNodes).forEach(e=>{t.appendChild(e)})}},N=(t,e)=>{if(!e)return!1;var n=e.split(/\s+/);for(let e=0;e{var o,i;if(o=e,i=t,a(o.classList).forEach(e=>{Object.values(h).includes(e)||Object.values(g).includes(e)||Object.values(i.showClass).includes(e)||o.classList.remove(e)}),t.customClass&&t.customClass[n]){if("string"!=typeof t.customClass[n]&&!t.customClass[n].forEach)return s("Invalid type of customClass.".concat(n,'! Expected string or iterable object, got "').concat(typeof t.customClass[n],'"'));W(e,t.customClass[n])}},F=(e,t)=>{if(!t)return null;switch(t){case"select":case"textarea":case"file":return K(e,h[t]);case"checkbox":return e.querySelector(".".concat(h.checkbox," input"));case"radio":return e.querySelector(".".concat(h.radio," input:checked"))||e.querySelector(".".concat(h.radio," input:first-child"));case"range":return e.querySelector(".".concat(h.range," input"));default:return K(e,h.input)}},R=e=>{var t;e.focus(),"file"!==e.type&&(t=e.value,e.value="",e.value=t)},z=(e,t,n)=>{e&&t&&(t="string"==typeof t?t.split(/\s+/).filter(Boolean):t).forEach(t=>{e.forEach?e.forEach(e=>{n?e.classList.add(t):e.classList.remove(t)}):n?e.classList.add(t):e.classList.remove(t)})},W=(e,t)=>{z(e,t,!0)},_=(e,t)=>{z(e,t,!1)},K=(t,n)=>{for(let e=0;e{(n=n==="".concat(parseInt(n))?parseInt(n):n)||0===parseInt(n)?e.style[t]="number"==typeof n?"".concat(n,"px"):n:e.style.removeProperty(t)},Z=(e,t="flex")=>{e.style.display=t},J=e=>{e.style.display="none"},X=(e,t,n,o)=>{const i=e.querySelector(t);i&&(i.style[n]=o)},$=(e,t,n)=>{t?Z(e,n):J(e)},G=e=>!(!e||!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)),Q=()=>!G(P())&&!G(E())&&!G(T()),ee=e=>!!(e.scrollHeight>e.clientHeight),te=e=>{const t=window.getComputedStyle(e);var n=parseFloat(t.getPropertyValue("animation-duration")||"0"),e=parseFloat(t.getPropertyValue("transition-duration")||"0");return 0{const n=j();G(n)&&(t&&(n.style.transition="none",n.style.width="100%"),setTimeout(()=>{n.style.transition="width ".concat(e/1e3,"s linear"),n.style.width="0%"},10))},oe=()=>"undefined"==typeof window||"undefined"==typeof document,ie='\n
                                    \n \n
                                      \n
                                      \n \n

                                      \n
                                      \n \n \n
                                      \n \n \n
                                      \n \n
                                      \n \n \n
                                      \n
                                      \n
                                      \n \n \n \n
                                      \n
                                      \n
                                      \n
                                      \n
                                      \n
                                      \n').replace(/(^|\n)\s*/g,""),ae=()=>{ln.isVisible()&&ln.resetValidationMessage()},se=e=>{var t=(()=>{const e=b();return!!e&&(e.remove(),_([document.documentElement,document.body],[h["no-backdrop"],h["toast-shown"],h["has-column"]]),!0)})();if(oe())r("SweetAlert2 requires document to initialize");else{const n=document.createElement("div");n.className=h.container,t&&W(n,h["no-transition"]),V(n,ie);const o="string"==typeof(t=e.target)?document.querySelector(t):t;o.appendChild(n),(e=>{const t=v();t.setAttribute("role",e.toast?"alert":"dialog"),t.setAttribute("aria-live",e.toast?"polite":"assertive"),e.toast||t.setAttribute("aria-modal","true")})(e),e=o,"rtl"===window.getComputedStyle(e).direction&&W(b(),h.rtl),(()=>{const e=v(),t=K(e,h.input),n=K(e,h.file),o=e.querySelector(".".concat(h.range," input")),i=e.querySelector(".".concat(h.range," output")),a=K(e,h.select),s=e.querySelector(".".concat(h.checkbox," input")),r=K(e,h.textarea);t.oninput=ae,n.onchange=ae,a.onchange=ae,s.onchange=ae,r.oninput=ae,o.oninput=()=>{ae(),i.value=o.value},o.onchange=()=>{ae(),o.nextSibling.value=o.value}})()}},re=(e,t)=>{e instanceof HTMLElement?t.appendChild(e):"object"==typeof e?ce(e,t):e&&V(t,e)},ce=(e,t)=>{e.jquery?le(t,e):V(t,e.toString())},le=(t,n)=>{if(t.textContent="",0 in n)for(let e=0;e in n;e++)t.appendChild(n[e].cloneNode(!0));else t.appendChild(n.cloneNode(!0))},ue=(()=>{if(oe())return!1;var e=document.createElement("div"),t={WebkitAnimation:"webkitAnimationEnd",OAnimation:"oAnimationEnd oanimationend",animation:"animationend"};for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&void 0!==e.style[n])return t[n];return!1})(),de=(e,t)=>{const n=L();var o=S(),i=P(),a=E(),s=T();(t.showConfirmButton||t.showDenyButton||t.showCancelButton?Z:J)(n),U(n,t,"actions"),pe(i,"confirm",t),pe(a,"deny",t),pe(s,"cancel",t),function(e,t,n,o){if(!o.buttonsStyling)return _([e,t,n],h.styled);W([e,t,n],h.styled),o.confirmButtonColor&&(e.style.backgroundColor=o.confirmButtonColor,W(e,h["default-outline"]));o.denyButtonColor&&(t.style.backgroundColor=o.denyButtonColor,W(t,h["default-outline"]));o.cancelButtonColor&&(n.style.backgroundColor=o.cancelButtonColor,W(n,h["default-outline"]))}(i,a,s,t),t.reverseButtons&&(n.insertBefore(s,o),n.insertBefore(a,o),n.insertBefore(i,o)),V(o,t.loaderHtml),U(o,t,"loader")};function pe(e,t,n){$(e,n["show".concat(o(t),"Button")],"inline-block"),V(e,n["".concat(t,"ButtonText")]),e.setAttribute("aria-label",n["".concat(t,"ButtonAriaLabel")]),e.className=h[t],U(e,n,"".concat(t,"Button")),W(e,n["".concat(t,"ButtonClass")])}const me=(e,t)=>{var n,o,i=b();i&&(o=i,"string"==typeof(n=t.backdrop)?o.style.background=n:n||W([document.documentElement,document.body],h["no-backdrop"]),o=i,(n=t.position)in h?W(o,h[n]):(s('The "position" parameter is not valid, defaulting to "center"'),W(o,h.center)),n=i,!(o=t.grow)||"string"!=typeof o||(o="grow-".concat(o))in h&&W(n,h[o]),U(i,t,"container"))};var he={promise:new WeakMap,innerParams:new WeakMap,domCache:new WeakMap};const ge=["input","file","range","select","radio","checkbox","textarea"],be=e=>{if(!ke[e.input])return r('Unexpected type of input! Expected "text", "email", "password", "number", "tel", "select", "radio", "checkbox", "textarea", "file" or "url", got "'.concat(e.input,'"'));var t=Ce(e.input);const n=ke[e.input](t,e);Z(n),setTimeout(()=>{R(n)})},fe=(e,t)=>{const n=F(v(),e);if(n){(t=>{for(let e=0;e{var t=Ce(e.input);e.customClass&&W(t,e.customClass.input)},ve=(e,t)=>{e.placeholder&&!t.inputPlaceholder||(e.placeholder=t.inputPlaceholder)},we=(e,t,n)=>{if(n.inputLabel){e.id=h.input;const i=document.createElement("label");var o=h["input-label"];i.setAttribute("for",e.id),i.className=o,W(i,n.customClass.inputLabel),i.innerText=n.inputLabel,t.insertAdjacentElement("beforebegin",i)}},Ce=e=>{e=h[e]||h.input;return K(v(),e)},ke={};ke.text=ke.email=ke.password=ke.number=ke.tel=ke.url=(e,t)=>("string"==typeof t.inputValue||"number"==typeof t.inputValue?e.value=t.inputValue:p(t.inputValue)||s('Unexpected type of inputValue! Expected "string", "number" or "Promise", got "'.concat(typeof t.inputValue,'"')),we(e,e,t),ve(e,t),e.type=t.input,e),ke.file=(e,t)=>(we(e,e,t),ve(e,t),e),ke.range=(e,t)=>{const n=e.querySelector("input"),o=e.querySelector("output");return n.value=t.inputValue,n.type=t.input,o.value=t.inputValue,we(n,e,t),e},ke.select=(e,t)=>{if(e.textContent="",t.inputPlaceholder){const n=document.createElement("option");V(n,t.inputPlaceholder),n.value="",n.disabled=!0,n.selected=!0,e.appendChild(n)}return we(e,e,t),e},ke.radio=e=>(e.textContent="",e),ke.checkbox=(e,t)=>{const n=F(v(),"checkbox");n.value=1,n.id=h.checkbox,n.checked=Boolean(t.inputValue);var o=e.querySelector("span");return V(o,t.inputPlaceholder),e},ke.textarea=(n,e)=>{n.value=e.inputValue,ve(n,e),we(n,n,e);return setTimeout(()=>{if("MutationObserver"in window){const t=parseInt(window.getComputedStyle(v()).width);new MutationObserver(()=>{var e,e=n.offsetWidth+(e=n,parseInt(window.getComputedStyle(e).marginLeft)+parseInt(window.getComputedStyle(e).marginRight));e>t?v().style.width="".concat(e,"px"):v().style.width=null}).observe(n,{attributes:!0,attributeFilter:["style"]})}}),n};const Ae=(e,t)=>{const n=k();U(n,t,"htmlContainer"),t.html?(re(t.html,n),Z(n,"block")):t.text?(n.textContent=t.text,Z(n,"block")):J(n),((e,o)=>{const i=v();e=he.innerParams.get(e);const a=!e||o.input!==e.input;ge.forEach(e=>{var t=h[e];const n=K(i,t);fe(e,o.inputAttributes),n.className=t,a&&J(n)}),o.input&&(a&&be(o),ye(o))})(e,t)},Be=(e,t)=>{for(const n in g)t.icon!==n&&_(e,g[n]);W(e,g[t.icon]),Ee(e,t),xe(),U(e,t,"icon")},xe=()=>{const e=v();var t=window.getComputedStyle(e).getPropertyValue("background-color");const n=e.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix");for(let e=0;e{var n;e.textContent="",t.iconHtml?V(e,Se(t.iconHtml)):"success"===t.icon?V(e,'\n
                                      \n \n
                                      \n
                                      \n '):"error"===t.icon?V(e,'\n \n \n \n \n '):(n={question:"?",warning:"!",info:"i"},V(e,Se(n[t.icon])))},Ee=(e,t)=>{if(t.iconColor){e.style.color=t.iconColor,e.style.borderColor=t.iconColor;for(const n of[".swal2-success-line-tip",".swal2-success-line-long",".swal2-x-mark-line-left",".swal2-x-mark-line-right"])X(e,n,"backgroundColor",t.iconColor);X(e,".swal2-success-ring","borderColor",t.iconColor)}},Se=e=>'
                                      ').concat(e,"
                                      "),Te=(e,o)=>{const i=B();if(!o.progressSteps||0===o.progressSteps.length)return J(i);Z(i),i.textContent="",o.currentProgressStep>=o.progressSteps.length&&s("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),o.progressSteps.forEach((e,t)=>{var n,e=(n=e,e=document.createElement("li"),W(e,h["progress-step"]),V(e,n),e);i.appendChild(e),t===o.currentProgressStep&&W(e,h["active-progress-step"]),t!==o.progressSteps.length-1&&(t=(e=>{const t=document.createElement("li");return W(t,h["progress-step-line"]),e.progressStepsDistance&&(t.style.width=e.progressStepsDistance),t})(o),i.appendChild(t))})},Le=(e,t)=>{e.className="".concat(h.popup," ").concat(G(e)?t.showClass.popup:""),t.toast?(W([document.documentElement,document.body],h["toast-shown"]),W(e,h.toast)):W(e,h.modal),U(e,t,"popup"),"string"==typeof t.customClass&&W(e,t.customClass),t.icon&&W(e,h["icon-".concat(t.icon)])},Oe=(e,t)=>{var n,o,i;(e=>{var t=b();const n=v();e.toast?(Y(t,"width",e.width),n.style.width="100%",n.insertBefore(S(),w())):Y(n,"width",e.width),Y(n,"padding",e.padding),e.background&&(n.style.background=e.background),J(x()),Le(n,e)})(t),me(0,t),Te(0,t),i=e,n=t,o=he.innerParams.get(i),i=w(),o&&n.icon===o.icon?(Pe(i,n),Be(i,n)):n.icon||n.iconHtml?n.icon&&-1===Object.keys(g).indexOf(n.icon)?(r('Unknown icon! Expected "success", "error", "warning", "info" or "question", got "'.concat(n.icon,'"')),J(i)):(Z(i),Pe(i,n),Be(i,n),W(i,n.showClass.icon)):J(i),(e=>{const t=A();if(!e.imageUrl)return J(t);Z(t,""),t.setAttribute("src",e.imageUrl),t.setAttribute("alt",e.imageAlt),Y(t,"width",e.imageWidth),Y(t,"height",e.imageHeight),t.className=h.image,U(t,e,"image")})(t),(e=>{const t=C();$(t,e.title||e.titleText,"block"),e.title&&re(e.title,t),e.titleText&&(t.innerText=e.titleText),U(t,e,"title")})(t),(e=>{const t=D();V(t,e.closeButtonHtml),U(t,e,"closeButton"),$(t,e.showCloseButton),t.setAttribute("aria-label",e.closeButtonAriaLabel)})(t),Ae(e,t),de(0,t),i=t,e=O(),$(e,i.footer),i.footer&&re(i.footer,e),U(e,i,"footer"),"function"==typeof t.didRender&&t.didRender(v())};const je=()=>P()&&P().click();const De=e=>{let t=v();t||ln.fire(),t=v();var n=S();H()?J(w()):Ie(t,e),Z(n),t.setAttribute("data-loading",!0),t.setAttribute("aria-busy",!0),t.focus()},Ie=(e,t)=>{var n=L();const o=S();!t&&G(P())&&(t=P()),Z(n),t&&(J(t),o.setAttribute("data-button-to-replace",t.className)),o.parentNode.insertBefore(o,t),W([e,n],h.loading)},Me={},He=o=>new Promise(e=>{if(!o)return e();var t=window.scrollX,n=window.scrollY;Me.restoreFocusTimeout=setTimeout(()=>{Me.previousActiveElement&&Me.previousActiveElement.focus?(Me.previousActiveElement.focus(),Me.previousActiveElement=null):document.body&&document.body.focus(),e()},100),window.scrollTo(t,n)});const qe=()=>{if(Me.timeout)return(()=>{const e=j();var t=parseInt(window.getComputedStyle(e).width);e.style.removeProperty("transition"),e.style.width="100%";var n=parseInt(window.getComputedStyle(e).width),n=parseInt(t/n*100);e.style.removeProperty("transition"),e.style.width="".concat(n,"%")})(),Me.timeout.stop()},Ve=()=>{if(Me.timeout){var e=Me.timeout.start();return ne(e),e}};let Ne=!1;const Ue={};const Fe=t=>{for(let e=t.target;e&&e!==document;e=e.parentNode)for(const o in Ue){var n=e.getAttribute(o);if(n)return void Ue[o].fire({template:n})}},Re={title:"",titleText:"",text:"",html:"",footer:"",icon:void 0,iconColor:void 0,iconHtml:void 0,template:void 0,toast:!1,showClass:{popup:"swal2-show",backdrop:"swal2-backdrop-show",icon:"swal2-icon-show"},hideClass:{popup:"swal2-hide",backdrop:"swal2-backdrop-hide",icon:"swal2-icon-hide"},customClass:{},target:"body",backdrop:!0,heightAuto:!0,allowOutsideClick:!0,allowEscapeKey:!0,allowEnterKey:!0,stopKeydownPropagation:!0,keydownListenerCapture:!1,showConfirmButton:!0,showDenyButton:!1,showCancelButton:!1,preConfirm:void 0,preDeny:void 0,confirmButtonText:"OK",confirmButtonAriaLabel:"",confirmButtonColor:void 0,denyButtonText:"No",denyButtonAriaLabel:"",denyButtonColor:void 0,cancelButtonText:"Cancel",cancelButtonAriaLabel:"",cancelButtonColor:void 0,buttonsStyling:!0,reverseButtons:!1,focusConfirm:!0,focusDeny:!1,focusCancel:!1,returnFocus:!0,showCloseButton:!1,closeButtonHtml:"×",closeButtonAriaLabel:"Close this dialog",loaderHtml:"",showLoaderOnConfirm:!1,showLoaderOnDeny:!1,imageUrl:void 0,imageWidth:void 0,imageHeight:void 0,imageAlt:"",timer:void 0,timerProgressBar:!1,width:void 0,padding:void 0,background:void 0,input:void 0,inputPlaceholder:"",inputLabel:"",inputValue:"",inputOptions:{},inputAutoTrim:!0,inputAttributes:{},inputValidator:void 0,returnInputValueOnDeny:!1,validationMessage:void 0,grow:!1,position:"center",progressSteps:[],currentProgressStep:void 0,progressStepsDistance:void 0,willOpen:void 0,didOpen:void 0,didRender:void 0,willClose:void 0,didClose:void 0,didDestroy:void 0,scrollbarPadding:!0},ze=["allowEscapeKey","allowOutsideClick","background","buttonsStyling","cancelButtonAriaLabel","cancelButtonColor","cancelButtonText","closeButtonAriaLabel","closeButtonHtml","confirmButtonAriaLabel","confirmButtonColor","confirmButtonText","currentProgressStep","customClass","denyButtonAriaLabel","denyButtonColor","denyButtonText","didClose","didDestroy","footer","hideClass","html","icon","iconColor","iconHtml","imageAlt","imageHeight","imageUrl","imageWidth","preConfirm","preDeny","progressSteps","returnFocus","reverseButtons","showCancelButton","showCloseButton","showConfirmButton","showDenyButton","text","title","titleText","willClose"],We={},_e=["allowOutsideClick","allowEnterKey","backdrop","focusConfirm","focusDeny","focusCancel","returnFocus","heightAuto","keydownListenerCapture"],Ke=e=>Object.prototype.hasOwnProperty.call(Re,e);const Ye=e=>We[e],Ze=e=>{!e.backdrop&&e.allowOutsideClick&&s('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`');for(const o in e)n=o,Ke(n)||s('Unknown parameter "'.concat(n,'"')),e.toast&&(t=o,_e.includes(t)&&s('The parameter "'.concat(t,'" is incompatible with toasts'))),t=o,Ye(t)&&i(t,Ye(t));var t,n};var Je=Object.freeze({isValidParameter:Ke,isUpdatableParameter:e=>-1!==ze.indexOf(e),isDeprecatedParameter:Ye,argsToParams:n=>{const o={};return"object"!=typeof n[0]||m(n[0])?["title","html","icon"].forEach((e,t)=>{t=n[t];"string"==typeof t||m(t)?o[e]=t:void 0!==t&&r("Unexpected type of ".concat(e,'! Expected "string" or "Element", got ').concat(typeof t))}):Object.assign(o,n[0]),o},isVisible:()=>G(v()),clickConfirm:je,clickDeny:()=>E()&&E().click(),clickCancel:()=>T()&&T().click(),getContainer:b,getPopup:v,getTitle:C,getHtmlContainer:k,getImage:A,getIcon:w,getInputLabel:()=>y(h["input-label"]),getCloseButton:D,getActions:L,getConfirmButton:P,getDenyButton:E,getCancelButton:T,getLoader:S,getFooter:O,getTimerProgressBar:j,getFocusableElements:I,getValidationMessage:x,isLoading:()=>v().hasAttribute("data-loading"),fire:function(...e){return new this(...e)},mixin:function(n){class e extends this{_main(e,t){return super._main(e,Object.assign({},n,t))}}return e},showLoading:De,enableLoading:De,getTimerLeft:()=>Me.timeout&&Me.timeout.getTimerLeft(),stopTimer:qe,resumeTimer:Ve,toggleTimer:()=>{var e=Me.timeout;return e&&(e.running?qe:Ve)()},increaseTimer:e=>{if(Me.timeout){e=Me.timeout.increase(e);return ne(e,!0),e}},isTimerRunning:()=>Me.timeout&&Me.timeout.isRunning(),bindClickHandler:function(e="data-swal-template"){Ue[e]=this,Ne||(document.body.addEventListener("click",Fe),Ne=!0)}});function Xe(){var e=he.innerParams.get(this);if(e){const t=he.domCache.get(this);J(t.loader),H()?e.icon&&Z(w()):(e=>{const t=e.popup.getElementsByClassName(e.loader.getAttribute("data-button-to-replace"));if(t.length)Z(t[0],"inline-block");else if(Q())J(e.actions)})(t),_([t.popup,t.actions],h.loading),t.popup.removeAttribute("aria-busy"),t.popup.removeAttribute("data-loading"),t.confirmButton.disabled=!1,t.denyButton.disabled=!1,t.cancelButton.disabled=!1}}const $e=()=>{null===q.previousBodyPadding&&document.body.scrollHeight>window.innerHeight&&(q.previousBodyPadding=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight="".concat(q.previousBodyPadding+(()=>{const e=document.createElement("div");e.className=h["scrollbar-measure"],document.body.appendChild(e);var t=e.getBoundingClientRect().width-e.clientWidth;return document.body.removeChild(e),t})(),"px"))},Ge=()=>{navigator.userAgent.match(/(CriOS|FxiOS|EdgiOS|YaBrowser|UCBrowser)/i)||v().scrollHeight>window.innerHeight-44&&(b().style.paddingBottom="".concat(44,"px"))},Qe=()=>{const e=b();let t;e.ontouchstart=e=>{t=et(e)},e.ontouchmove=e=>{t&&(e.preventDefault(),e.stopPropagation())}},et=e=>{var t=e.target,n=b();return!tt(e)&&!nt(e)&&(t===n||!(ee(n)||"INPUT"===t.tagName||"TEXTAREA"===t.tagName||ee(k())&&k().contains(t)))},tt=e=>e.touches&&e.touches.length&&"stylus"===e.touches[0].touchType,nt=e=>e.touches&&1{const e=a(document.body.children);e.forEach(e=>{e.hasAttribute("data-previous-aria-hidden")?(e.setAttribute("aria-hidden",e.getAttribute("data-previous-aria-hidden")),e.removeAttribute("data-previous-aria-hidden")):e.removeAttribute("aria-hidden")})};var it={swalPromiseResolve:new WeakMap};function at(e,t,n,o){H()?ct(e,o):(He(n).then(()=>ct(e,o)),Me.keydownTarget.removeEventListener("keydown",Me.keydownHandler,{capture:Me.keydownListenerCapture}),Me.keydownHandlerAdded=!1),/^((?!chrome|android).)*safari/i.test(navigator.userAgent)?(t.setAttribute("style","display:none !important"),t.removeAttribute("class"),t.innerHTML=""):t.remove(),M()&&(null!==q.previousBodyPadding&&(document.body.style.paddingRight="".concat(q.previousBodyPadding,"px"),q.previousBodyPadding=null),N(document.body,h.iosfix)&&(t=parseInt(document.body.style.top,10),_(document.body,h.iosfix),document.body.style.top="",document.body.scrollTop=-1*t),ot()),_([document.documentElement,document.body],[h.shown,h["height-auto"],h["no-backdrop"],h["toast-shown"]])}function st(e){var t=v();if(t){e=void 0!==(o=e)?Object.assign({isConfirmed:!1,isDenied:!1,isDismissed:!1},o):{isConfirmed:!1,isDenied:!1,isDismissed:!0};var n=he.innerParams.get(this);if(n&&!N(t,n.hideClass.popup)){const i=it.swalPromiseResolve.get(this);_(t,n.showClass.popup),W(t,n.hideClass.popup);var o=b();_(o,n.showClass.backdrop),W(o,n.hideClass.backdrop),((e,t,n)=>{const o=b(),i=ue&&te(t);if(typeof n.willClose==="function")n.willClose(t);if(i)rt(e,t,o,n.returnFocus,n.didClose);else at(e,o,n.returnFocus,n.didClose)})(this,t,n),i(e)}}}const rt=(e,t,n,o,i)=>{Me.swalCloseEventFinishedCallback=at.bind(null,e,n,o,i),t.addEventListener(ue,function(e){e.target===t&&(Me.swalCloseEventFinishedCallback(),delete Me.swalCloseEventFinishedCallback)})},ct=(e,t)=>{setTimeout(()=>{"function"==typeof t&&t.bind(e.params)(),e._destroy()})};function lt(e,t,n){const o=he.domCache.get(e);t.forEach(e=>{o[e].disabled=n})}function ut(e,t){if(!e)return!1;if("radio"===e.type){const n=e.parentNode.parentNode,o=n.querySelectorAll("input");for(let e=0;e/^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]{2,24}$/.test(e)?Promise.resolve():Promise.resolve(t||"Invalid email address"),url:(e,t)=>/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(e)?Promise.resolve():Promise.resolve(t||"Invalid URL")};function mt(e){var t,n;(t=e).inputValidator||Object.keys(pt).forEach(e=>{t.input===e&&(t.inputValidator=pt[e])}),e.showLoaderOnConfirm&&!e.preConfirm&&s("showLoaderOnConfirm is set to true, but preConfirm is not defined.\nshowLoaderOnConfirm should be used together with preConfirm, see usage example:\nhttps://sweetalert2.github.io/#ajax-request"),(n=e).target&&("string"!=typeof n.target||document.querySelector(n.target))&&("string"==typeof n.target||n.target.appendChild)||(s('Target parameter is not valid, defaulting to "body"'),n.target="body"),"string"==typeof e.title&&(e.title=e.title.split("\n").join("
                                      ")),se(e)}const ht=["swal-title","swal-html","swal-footer"],gt=e=>{e="string"==typeof e.template?document.querySelector(e.template):e.template;if(!e)return{};e=e.content;return kt(e),Object.assign(bt(e),ft(e),yt(e),vt(e),wt(e),Ct(e,ht))},bt=e=>{const o={};return a(e.querySelectorAll("swal-param")).forEach(e=>{At(e,["name","value"]);var t=e.getAttribute("name");let n=e.getAttribute("value");"boolean"==typeof Re[t]&&"false"===n&&(n=!1),"object"==typeof Re[t]&&(n=JSON.parse(n)),o[t]=n}),o},ft=e=>{const n={};return a(e.querySelectorAll("swal-button")).forEach(e=>{At(e,["type","color","aria-label"]);var t=e.getAttribute("type");n["".concat(t,"ButtonText")]=e.innerHTML,n["show".concat(o(t),"Button")]=!0,e.hasAttribute("color")&&(n["".concat(t,"ButtonColor")]=e.getAttribute("color")),e.hasAttribute("aria-label")&&(n["".concat(t,"ButtonAriaLabel")]=e.getAttribute("aria-label"))}),n},yt=e=>{const t={},n=e.querySelector("swal-image");return n&&(At(n,["src","width","height","alt"]),n.hasAttribute("src")&&(t.imageUrl=n.getAttribute("src")),n.hasAttribute("width")&&(t.imageWidth=n.getAttribute("width")),n.hasAttribute("height")&&(t.imageHeight=n.getAttribute("height")),n.hasAttribute("alt")&&(t.imageAlt=n.getAttribute("alt"))),t},vt=e=>{const t={},n=e.querySelector("swal-icon");return n&&(At(n,["type","color"]),n.hasAttribute("type")&&(t.icon=n.getAttribute("type")),n.hasAttribute("color")&&(t.iconColor=n.getAttribute("color")),t.iconHtml=n.innerHTML),t},wt=e=>{const n={},t=e.querySelector("swal-input");t&&(At(t,["type","label","placeholder","value"]),n.input=t.getAttribute("type")||"text",t.hasAttribute("label")&&(n.inputLabel=t.getAttribute("label")),t.hasAttribute("placeholder")&&(n.inputPlaceholder=t.getAttribute("placeholder")),t.hasAttribute("value")&&(n.inputValue=t.getAttribute("value")));e=e.querySelectorAll("swal-input-option");return e.length&&(n.inputOptions={},a(e).forEach(e=>{At(e,["value"]);var t=e.getAttribute("value"),e=e.innerHTML;n.inputOptions[t]=e})),n},Ct=(e,t)=>{const n={};for(const o in t){const i=t[o],a=e.querySelector(i);a&&(At(a,[]),n[i.replace(/^swal-/,"")]=a.innerHTML.trim())}return n},kt=e=>{const t=ht.concat(["swal-param","swal-button","swal-image","swal-icon","swal-input","swal-input-option"]);a(e.children).forEach(e=>{e=e.tagName.toLowerCase();-1===t.indexOf(e)&&s("Unrecognized element <".concat(e,">"))})},At=(t,n)=>{a(t.attributes).forEach(e=>{-1===n.indexOf(e.name)&&s(['Unrecognized attribute "'.concat(e.name,'" on <').concat(t.tagName.toLowerCase(),">."),"".concat(n.length?"Allowed attributes are: ".concat(n.join(", ")):"To set the value, use HTML within the element.")])})},Bt=e=>{const t=b(),n=v();"function"==typeof e.willOpen&&e.willOpen(n);var o=window.getComputedStyle(document.body).overflowY;St(t,n,e),setTimeout(()=>{Pt(t,n)},10),M()&&(Et(t,e.scrollbarPadding,o),(()=>{const e=a(document.body.children);e.forEach(e=>{e===b()||e.contains(b())||(e.hasAttribute("aria-hidden")&&e.setAttribute("data-previous-aria-hidden",e.getAttribute("aria-hidden")),e.setAttribute("aria-hidden","true"))})})()),H()||Me.previousActiveElement||(Me.previousActiveElement=document.activeElement),"function"==typeof e.didOpen&&setTimeout(()=>e.didOpen(n)),_(t,h["no-transition"])},xt=e=>{const t=v();if(e.target===t){const n=b();t.removeEventListener(ue,xt),n.style.overflowY="auto"}},Pt=(e,t)=>{ue&&te(t)?(e.style.overflowY="hidden",t.addEventListener(ue,xt)):e.style.overflowY="auto"},Et=(e,t,n)=>{var o;(/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream||"MacIntel"===navigator.platform&&1{e.scrollTop=0})},St=(e,t,n)=>{W(e,n.showClass.backdrop),t.style.setProperty("opacity","0","important"),Z(t,"grid"),setTimeout(()=>{W(t,n.showClass.popup),t.style.removeProperty("opacity")},10),W([document.documentElement,document.body],h.shown),n.heightAuto&&n.backdrop&&!n.toast&&W([document.documentElement,document.body],h["height-auto"])},Tt=e=>e.checked?1:0,Lt=e=>e.checked?e.value:null,Ot=e=>e.files.length?null!==e.getAttribute("multiple")?e.files:e.files[0]:null,jt=(t,n)=>{const o=v(),i=e=>It[n.input](o,Mt(e),n);u(n.inputOptions)||p(n.inputOptions)?(De(P()),d(n.inputOptions).then(e=>{t.hideLoading(),i(e)})):"object"==typeof n.inputOptions?i(n.inputOptions):r("Unexpected type of inputOptions! Expected object, Map or Promise, got ".concat(typeof n.inputOptions))},Dt=(t,n)=>{const o=t.getInput();J(o),d(n.inputValue).then(e=>{o.value="number"===n.input?parseFloat(e)||0:"".concat(e),Z(o),o.focus(),t.hideLoading()}).catch(e=>{r("Error in inputValue promise: ".concat(e)),o.value="",Z(o),o.focus(),t.hideLoading()})},It={select:(e,t,i)=>{const a=K(e,h.select),s=(e,t,n)=>{const o=document.createElement("option");o.value=n,V(o,t),o.selected=Ht(n,i.inputValue),e.appendChild(o)};t.forEach(e=>{var t=e[0];const n=e[1];if(Array.isArray(n)){const o=document.createElement("optgroup");o.label=t,o.disabled=!1,a.appendChild(o),n.forEach(e=>s(o,e[1],e[0]))}else s(a,n,t)}),a.focus()},radio:(e,t,a)=>{const s=K(e,h.radio);t.forEach(e=>{var t=e[0],e=e[1];const n=document.createElement("input"),o=document.createElement("label");n.type="radio",n.name=h.radio,n.value=t,Ht(t,a.inputValue)&&(n.checked=!0);const i=document.createElement("span");V(i,e),i.className=h.label,o.appendChild(n),o.appendChild(i),s.appendChild(o)});const n=s.querySelectorAll("input");n.length&&n[0].focus()}},Mt=n=>{const o=[];return"undefined"!=typeof Map&&n instanceof Map?n.forEach((e,t)=>{let n=e;"object"==typeof n&&(n=Mt(n)),o.push([t,n])}):Object.keys(n).forEach(e=>{let t=n[e];"object"==typeof t&&(t=Mt(t)),o.push([e,t])}),o},Ht=(e,t)=>t&&t.toString()===e.toString(),qt=(e,t)=>{var n=he.innerParams.get(e),o=((e,t)=>{const n=e.getInput();if(!n)return null;switch(t.input){case"checkbox":return Tt(n);case"radio":return Lt(n);case"file":return Ot(n);default:return t.inputAutoTrim?n.value.trim():n.value}})(e,n);n.inputValidator?Vt(e,o,t):e.getInput().checkValidity()?("deny"===t?Nt:Ft)(e,o):(e.enableButtons(),e.showValidationMessage(n.validationMessage))},Vt=(t,n,o)=>{const e=he.innerParams.get(t);t.disableInput();const i=Promise.resolve().then(()=>d(e.inputValidator(n,e.validationMessage)));i.then(e=>{t.enableButtons(),t.enableInput(),e?t.showValidationMessage(e):("deny"===o?Nt:Ft)(t,n)})},Nt=(t,n)=>{const e=he.innerParams.get(t||void 0);if(e.showLoaderOnDeny&&De(E()),e.preDeny){const o=Promise.resolve().then(()=>d(e.preDeny(n,e.validationMessage)));o.then(e=>{!1===e?t.hideLoading():t.closePopup({isDenied:!0,value:void 0===e?n:e})})}else t.closePopup({isDenied:!0,value:n})},Ut=(e,t)=>{e.closePopup({isConfirmed:!0,value:t})},Ft=(t,n)=>{const e=he.innerParams.get(t||void 0);if(e.showLoaderOnConfirm&&De(),e.preConfirm){t.resetValidationMessage();const o=Promise.resolve().then(()=>d(e.preConfirm(n,e.validationMessage)));o.then(e=>{G(x())||!1===e?t.hideLoading():Ut(t,void 0===e?n:e)})}else Ut(t,n)},Rt=(e,t,n)=>{const o=I();if(o.length)return(t+=n)===o.length?t=0:-1===t&&(t=o.length-1),o[t].focus();v().focus()},zt=["ArrowRight","ArrowDown"],Wt=["ArrowLeft","ArrowUp"],_t=(e,t,n)=>{var o=he.innerParams.get(e);o&&(o.stopKeydownPropagation&&t.stopPropagation(),"Enter"===t.key?Kt(e,t,o):"Tab"===t.key?Yt(t,o):[...zt,...Wt].includes(t.key)?Zt(t.key):"Escape"===t.key&&Jt(t,o,n))},Kt=(e,t,n)=>{t.isComposing||t.target&&e.getInput()&&t.target.outerHTML===e.getInput().outerHTML&&(["textarea","file"].includes(n.input)||(je(),t.preventDefault()))},Yt=(e,t)=>{var n=e.target,o=I();let i=-1;for(let e=0;e{const t=P(),n=E(),o=T();if([t,n,o].includes(document.activeElement)){e=zt.includes(e)?"nextElementSibling":"previousElementSibling";const i=document.activeElement[e];i&&i.focus()}},Jt=(e,t,n)=>{c(t.allowEscapeKey)&&(e.preventDefault(),n(l.esc))},Xt=(t,e,n)=>{e.popup.onclick=()=>{var e=he.innerParams.get(t);e.showConfirmButton||e.showDenyButton||e.showCancelButton||e.showCloseButton||e.timer||e.input||n(l.close)}};let $t=!1;const Gt=t=>{t.popup.onmousedown=()=>{t.container.onmouseup=function(e){t.container.onmouseup=void 0,e.target===t.container&&($t=!0)}}},Qt=t=>{t.container.onmousedown=()=>{t.popup.onmouseup=function(e){t.popup.onmouseup=void 0,e.target!==t.popup&&!t.popup.contains(e.target)||($t=!0)}}},en=(n,o,i)=>{o.container.onclick=e=>{var t=he.innerParams.get(n);$t?$t=!1:e.target===o.container&&c(t.allowOutsideClick)&&i(l.backdrop)}};const tn=(e,t,n)=>{var o=j();J(o),t.timer&&(e.timeout=new dt(()=>{n("timer"),delete e.timeout},t.timer),t.timerProgressBar&&(Z(o),setTimeout(()=>{e.timeout&&e.timeout.running&&ne(t.timer)})))},nn=(e,t)=>{if(!t.toast)return c(t.allowEnterKey)?void(on(e,t)||Rt(0,-1,1)):an()},on=(e,t)=>t.focusDeny&&G(e.denyButton)?(e.denyButton.focus(),!0):t.focusCancel&&G(e.cancelButton)?(e.cancelButton.focus(),!0):!(!t.focusConfirm||!G(e.confirmButton))&&(e.confirmButton.focus(),!0),an=()=>{document.activeElement&&"function"==typeof document.activeElement.blur&&document.activeElement.blur()};const sn=e=>{for(const t in e)e[t]=new WeakMap};e=Object.freeze({hideLoading:Xe,disableLoading:Xe,getInput:function(e){var t=he.innerParams.get(e||this);return(e=he.domCache.get(e||this))?F(e.popup,t.input):null},close:st,closePopup:st,closeModal:st,closeToast:st,enableButtons:function(){lt(this,["confirmButton","denyButton","cancelButton"],!1)},disableButtons:function(){lt(this,["confirmButton","denyButton","cancelButton"],!0)},enableInput:function(){return ut(this.getInput(),!1)},disableInput:function(){return ut(this.getInput(),!0)},showValidationMessage:function(e){const t=he.domCache.get(this);var n=he.innerParams.get(this);V(t.validationMessage,e),t.validationMessage.className=h["validation-message"],n.customClass&&n.customClass.validationMessage&&W(t.validationMessage,n.customClass.validationMessage),Z(t.validationMessage);const o=this.getInput();o&&(o.setAttribute("aria-invalid",!0),o.setAttribute("aria-describedby",h["validation-message"]),R(o),W(o,h.inputerror))},resetValidationMessage:function(){var e=he.domCache.get(this);e.validationMessage&&J(e.validationMessage);const t=this.getInput();t&&(t.removeAttribute("aria-invalid"),t.removeAttribute("aria-describedby"),_(t,h.inputerror))},getProgressSteps:function(){return he.domCache.get(this).progressSteps},_main:function(e,t={}){Ze(Object.assign({},t,e)),Me.currentInstance&&(Me.currentInstance._destroy(),M()&&ot()),Me.currentInstance=this,mt(e=((e,t)=>{const n=gt(e),o=Object.assign({},Re,t,n,e);return o.showClass=Object.assign({},Re.showClass,o.showClass),o.hideClass=Object.assign({},Re.hideClass,o.hideClass),o})(e,t)),Object.freeze(e),Me.timeout&&(Me.timeout.stop(),delete Me.timeout),clearTimeout(Me.restoreFocusTimeout);var s,r,c,t=(e=>{const t={popup:v(),container:b(),actions:L(),confirmButton:P(),denyButton:E(),cancelButton:T(),loader:S(),closeButton:D(),validationMessage:x(),progressSteps:B()};return he.domCache.set(e,t),t})(this);return Oe(this,e),he.innerParams.set(this,e),s=this,r=t,c=e,new Promise(e=>{const t=e=>{s.closePopup({isDismissed:!0,dismiss:e})};var n,o,i,a;it.swalPromiseResolve.set(s,e),r.confirmButton.onclick=()=>(e=>{var t=he.innerParams.get(e);e.disableButtons(),t.input?qt(e,"confirm"):Ft(e,!0)})(s),r.denyButton.onclick=()=>(e=>{var t=he.innerParams.get(e);e.disableButtons(),t.returnInputValueOnDeny?qt(e,"deny"):Nt(e,!1)})(s),r.cancelButton.onclick=()=>((e,t)=>{e.disableButtons(),t(l.cancel)})(s,t),r.closeButton.onclick=()=>t(l.close),n=s,a=r,e=t,he.innerParams.get(n).toast?Xt(n,a,e):(Gt(a),Qt(a),en(n,a,e)),o=s,a=Me,e=c,i=t,a.keydownTarget&&a.keydownHandlerAdded&&(a.keydownTarget.removeEventListener("keydown",a.keydownHandler,{capture:a.keydownListenerCapture}),a.keydownHandlerAdded=!1),e.toast||(a.keydownHandler=e=>_t(o,e,i),a.keydownTarget=e.keydownListenerCapture?window:v(),a.keydownListenerCapture=e.keydownListenerCapture,a.keydownTarget.addEventListener("keydown",a.keydownHandler,{capture:a.keydownListenerCapture}),a.keydownHandlerAdded=!0),e=s,"select"===(a=c).input||"radio"===a.input?jt(e,a):["text","email","number","tel","textarea"].includes(a.input)&&(u(a.inputValue)||p(a.inputValue))&&(De(P()),Dt(e,a)),Bt(c),tn(Me,c,t),nn(r,c),setTimeout(()=>{r.container.scrollTop=0})})},update:function(t){var e=v(),n=he.innerParams.get(this);if(!e||N(e,n.hideClass.popup))return s("You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup.");const o={};Object.keys(t).forEach(e=>{ln.isUpdatableParameter(e)?o[e]=t[e]:s('Invalid parameter to update: "'.concat(e,'". Updatable params are listed here: https://github.com/sweetalert2/sweetalert2/blob/master/src/utils/params.js\n\nIf you think this parameter should be updatable, request it here: https://github.com/sweetalert2/sweetalert2/issues/new?template=02_feature_request.md'))}),n=Object.assign({},n,o),Oe(this,n),he.innerParams.set(this,n),Object.defineProperties(this,{params:{value:Object.assign({},this.params,t),writable:!1,enumerable:!0}})},_destroy:function(){var e=he.domCache.get(this);const t=he.innerParams.get(this);t&&(e.popup&&Me.swalCloseEventFinishedCallback&&(Me.swalCloseEventFinishedCallback(),delete Me.swalCloseEventFinishedCallback),Me.deferDisposalTimer&&(clearTimeout(Me.deferDisposalTimer),delete Me.deferDisposalTimer),"function"==typeof t.didDestroy&&t.didDestroy(),delete this.params,delete Me.keydownHandler,delete Me.keydownTarget,sn(he),sn(it),delete Me.currentInstance)}});let rn;class cn{constructor(...e){"undefined"!=typeof window&&(rn=this,e=Object.freeze(this.constructor.argsToParams(e)),Object.defineProperties(this,{params:{value:e,writable:!1,enumerable:!0,configurable:!0}}),e=this._main(this.params),he.promise.set(this,e))}then(e){const t=he.promise.get(this);return t.then(e)}finally(e){const t=he.promise.get(this);return t.finally(e)}}Object.assign(cn.prototype,e),Object.assign(cn,Je),Object.keys(e).forEach(t=>{cn[t]=function(...e){if(rn)return rn[t](...e)}}),cn.DismissReason=l,cn.version="11.1.5";const ln=cn;return ln.default=ln,ln}),void 0!==this&&this.Sweetalert2&&(this.swal=this.sweetAlert=this.Swal=this.SweetAlert=this.Sweetalert2); +"undefined"!=typeof document&&function(e,t){var n=e.createElement("style");if(e.getElementsByTagName("head")[0].appendChild(n),n.styleSheet)n.styleSheet.disabled||(n.styleSheet.cssText=t);else try{n.innerHTML=t}catch(e){n.innerText=t}}(document,".swal2-popup.swal2-toast{box-sizing:border-box;grid-column:1/4!important;grid-row:1/4!important;grid-template-columns:1fr 99fr 1fr;padding:1em;overflow-y:hidden;background:#fff;box-shadow:0 0 .625em #d9d9d9;pointer-events:all}.swal2-popup.swal2-toast>*{grid-column:2}.swal2-popup.swal2-toast .swal2-title{margin:1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-loading{justify-content:center}.swal2-popup.swal2-toast .swal2-input{height:2em;margin:.5em;font-size:1em}.swal2-popup.swal2-toast .swal2-validation-message{font-size:1em}.swal2-popup.swal2-toast .swal2-footer{margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-popup.swal2-toast .swal2-close{grid-column:3/3;grid-row:1/99;align-self:center;width:.8em;height:.8em;margin:0;font-size:2em}.swal2-popup.swal2-toast .swal2-html-container{margin:1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-html-container:empty{padding:0}.swal2-popup.swal2-toast .swal2-loader{grid-column:1;grid-row:1/99;align-self:center;width:2em;height:2em;margin:.25em}.swal2-popup.swal2-toast .swal2-icon{grid-column:1;grid-row:1/99;align-self:center;width:2em;min-width:2em;height:2em;margin:0 .5em 0 0}.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:700}.swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-popup.swal2-toast .swal2-actions{justify-content:flex-start;height:auto;margin:0;margin-top:.3125em;padding:0}.swal2-popup.swal2-toast .swal2-styled{margin:.25em .5em;padding:.4em .6em;font-size:1em}.swal2-popup.swal2-toast .swal2-styled:focus{box-shadow:0 0 0 1px #fff,0 0 0 3px rgba(100,150,200,.5)}.swal2-popup.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;transform:rotate(45deg);border-radius:50%}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.8em;left:-.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.25em;left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-popup.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{-webkit-animation:swal2-toast-animate-success-line-tip .75s;animation:swal2-toast-animate-success-line-tip .75s}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{-webkit-animation:swal2-toast-animate-success-line-long .75s;animation:swal2-toast-animate-success-line-long .75s}.swal2-popup.swal2-toast.swal2-show{-webkit-animation:swal2-toast-show .5s;animation:swal2-toast-show .5s}.swal2-popup.swal2-toast.swal2-hide{-webkit-animation:swal2-toast-hide .1s forwards;animation:swal2-toast-hide .1s forwards}.swal2-container{display:grid;position:fixed;z-index:1060;top:0;right:0;bottom:0;left:0;box-sizing:border-box;grid-template-areas:\"top-start top top-end\" \"center-start center center-end\" \"bottom-start bottom-center bottom-end\";grid-template-rows:minmax(-webkit-min-content,auto) minmax(-webkit-min-content,auto) minmax(-webkit-min-content,auto);grid-template-rows:minmax(min-content,auto) minmax(min-content,auto) minmax(min-content,auto);height:100%;padding:.625em;overflow-x:hidden;transition:background-color .1s;-webkit-overflow-scrolling:touch}.swal2-container.swal2-backdrop-show,.swal2-container.swal2-noanimation{background:rgba(0,0,0,.4)}.swal2-container.swal2-backdrop-hide{background:0 0!important}.swal2-container.swal2-bottom-start,.swal2-container.swal2-center-start,.swal2-container.swal2-top-start{grid-template-columns:minmax(0,1fr) auto auto}.swal2-container.swal2-bottom,.swal2-container.swal2-center,.swal2-container.swal2-top{grid-template-columns:auto minmax(0,1fr) auto}.swal2-container.swal2-bottom-end,.swal2-container.swal2-center-end,.swal2-container.swal2-top-end{grid-template-columns:auto auto minmax(0,1fr)}.swal2-container.swal2-top-start>.swal2-popup{align-self:start}.swal2-container.swal2-top>.swal2-popup{grid-column:2;align-self:start;justify-self:center}.swal2-container.swal2-top-end>.swal2-popup,.swal2-container.swal2-top-right>.swal2-popup{grid-column:3;align-self:start;justify-self:end}.swal2-container.swal2-center-left>.swal2-popup,.swal2-container.swal2-center-start>.swal2-popup{grid-row:2;align-self:center}.swal2-container.swal2-center>.swal2-popup{grid-column:2;grid-row:2;align-self:center;justify-self:center}.swal2-container.swal2-center-end>.swal2-popup,.swal2-container.swal2-center-right>.swal2-popup{grid-column:3;grid-row:2;align-self:center;justify-self:end}.swal2-container.swal2-bottom-left>.swal2-popup,.swal2-container.swal2-bottom-start>.swal2-popup{grid-column:1;grid-row:3;align-self:end}.swal2-container.swal2-bottom>.swal2-popup{grid-column:2;grid-row:3;justify-self:center;align-self:end}.swal2-container.swal2-bottom-end>.swal2-popup,.swal2-container.swal2-bottom-right>.swal2-popup{grid-column:3;grid-row:3;align-self:end;justify-self:end}.swal2-container.swal2-grow-fullscreen>.swal2-popup,.swal2-container.swal2-grow-row>.swal2-popup{grid-column:1/4;width:100%}.swal2-container.swal2-grow-column>.swal2-popup,.swal2-container.swal2-grow-fullscreen>.swal2-popup{grid-row:1/4;align-self:stretch}.swal2-container.swal2-no-transition{transition:none!important}.swal2-popup{display:none;position:relative;box-sizing:border-box;grid-template-columns:minmax(0,100%);width:32em;max-width:100%;padding:0 0 1.25em;border:none;border-radius:5px;background:#fff;color:#545454;font-family:inherit;font-size:1rem}.swal2-popup:focus{outline:0}.swal2-popup.swal2-loading{overflow-y:hidden}.swal2-title{position:relative;max-width:100%;margin:0;padding:.8em 1em 0;color:#595959;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;word-wrap:break-word}.swal2-actions{display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:center;width:auto;margin:1.25em auto 0;padding:0}.swal2-actions:not(.swal2-loading) .swal2-styled[disabled]{opacity:.4}.swal2-actions:not(.swal2-loading) .swal2-styled:hover{background-image:linear-gradient(rgba(0,0,0,.1),rgba(0,0,0,.1))}.swal2-actions:not(.swal2-loading) .swal2-styled:active{background-image:linear-gradient(rgba(0,0,0,.2),rgba(0,0,0,.2))}.swal2-loader{display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;-webkit-animation:swal2-rotate-loading 1.5s linear 0s infinite normal;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 transparent #2778c4 transparent}.swal2-styled{margin:.3125em;padding:.625em 1.1em;transition:box-shadow .1s;box-shadow:0 0 0 3px transparent;font-weight:500}.swal2-styled:not([disabled]){cursor:pointer}.swal2-styled.swal2-confirm{border:0;border-radius:.25em;background:initial;background-color:#7367f0;color:#fff;font-size:1em}.swal2-styled.swal2-confirm:focus{box-shadow:0 0 0 3px rgba(115,103,240,.5)}.swal2-styled.swal2-deny{border:0;border-radius:.25em;background:initial;background-color:#ea5455;color:#fff;font-size:1em}.swal2-styled.swal2-deny:focus{box-shadow:0 0 0 3px rgba(234,84,85,.5)}.swal2-styled.swal2-cancel{border:0;border-radius:.25em;background:initial;background-color:#6e7d88;color:#fff;font-size:1em}.swal2-styled.swal2-cancel:focus{box-shadow:0 0 0 3px rgba(110,125,136,.5)}.swal2-styled.swal2-default-outline:focus{box-shadow:0 0 0 3px rgba(100,150,200,.5)}.swal2-styled:focus{outline:0}.swal2-styled::-moz-focus-inner{border:0}.swal2-footer{justify-content:center;margin:1em 0 0;padding:1em 1em 0;border-top:1px solid #eee;color:#545454;font-size:1em}.swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;grid-column:auto!important;height:.25em;overflow:hidden;border-bottom-right-radius:5px;border-bottom-left-radius:5px}.swal2-timer-progress-bar{width:100%;height:.25em;background:rgba(0,0,0,.2)}.swal2-image{max-width:100%;margin:2em auto 1em}.swal2-close{z-index:2;align-items:center;justify-content:center;width:1.2em;height:1.2em;margin-top:0;margin-right:0;margin-bottom:-1.2em;padding:0;overflow:hidden;transition:color .1s,box-shadow .1s;border:none;border-radius:5px;background:0 0;color:#ccc;font-family:serif;font-family:monospace;font-size:2.5em;cursor:pointer;justify-self:end}.swal2-close:hover{transform:none;background:0 0;color:#f27474}.swal2-close:focus{outline:0;box-shadow:inset 0 0 0 3px rgba(100,150,200,.5)}.swal2-close::-moz-focus-inner{border:0}.swal2-html-container{z-index:1;justify-content:center;margin:1em 1.6em .3em;padding:0;overflow:auto;color:#545454;font-size:1.125em;font-weight:400;line-height:normal;text-align:center;word-wrap:break-word;word-break:break-word}.swal2-checkbox,.swal2-file,.swal2-input,.swal2-radio,.swal2-select,.swal2-textarea{margin:1em 2em 0}.swal2-file,.swal2-input,.swal2-textarea{box-sizing:border-box;width:auto;transition:border-color .1s,box-shadow .1s;border:1px solid #d9d9d9;border-radius:.1875em;background:inherit;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px transparent;color:inherit;font-size:1.125em}.swal2-file.swal2-inputerror,.swal2-input.swal2-inputerror,.swal2-textarea.swal2-inputerror{border-color:#f27474!important;box-shadow:0 0 2px #f27474!important}.swal2-file:focus,.swal2-input:focus,.swal2-textarea:focus{border:1px solid #b4dbed;outline:0;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(100,150,200,.5)}.swal2-file::-moz-placeholder,.swal2-input::-moz-placeholder,.swal2-textarea::-moz-placeholder{color:#ccc}.swal2-file:-ms-input-placeholder,.swal2-input:-ms-input-placeholder,.swal2-textarea:-ms-input-placeholder{color:#ccc}.swal2-file::placeholder,.swal2-input::placeholder,.swal2-textarea::placeholder{color:#ccc}.swal2-range{margin:1em 2em 0;background:#fff}.swal2-range input{width:80%}.swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}.swal2-range input,.swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}.swal2-input{height:2.625em;padding:0 .75em}.swal2-file{width:75%;margin-right:auto;margin-left:auto;background:inherit;font-size:1.125em}.swal2-textarea{height:6.75em;padding:.75em}.swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:inherit;color:inherit;font-size:1.125em}.swal2-checkbox,.swal2-radio{align-items:center;justify-content:center;background:#fff;color:inherit}.swal2-checkbox label,.swal2-radio label{margin:0 .6em;font-size:1.125em}.swal2-checkbox input,.swal2-radio input{flex-shrink:0;margin:0 .4em}.swal2-input-label{display:flex;justify-content:center;margin:1em auto 0}.swal2-validation-message{align-items:center;justify-content:center;margin:1em 0 0;padding:.625em;overflow:hidden;background:#f0f0f0;color:#666;font-size:1em;font-weight:300}.swal2-validation-message::before{content:\"!\";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}.swal2-icon{position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:2.5em auto .6em;border:.25em solid transparent;border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}.swal2-icon.swal2-error{border-color:#f27474;color:#f27474}.swal2-icon.swal2-error .swal2-x-mark{position:relative;flex-grow:1}.swal2-icon.swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}.swal2-icon.swal2-error.swal2-icon-show{-webkit-animation:swal2-animate-error-icon .5s;animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-error.swal2-icon-show .swal2-x-mark{-webkit-animation:swal2-animate-error-x-mark .5s;animation:swal2-animate-error-x-mark .5s}.swal2-icon.swal2-warning{border-color:#facea8;color:#f8bb86}.swal2-icon.swal2-info{border-color:#9de0f6;color:#3fc3ee}.swal2-icon.swal2-question{border-color:#c9dae1;color:#87adbd}.swal2-icon.swal2-success{border-color:#a5dc86;color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;transform:rotate(45deg);border-radius:50%}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}.swal2-icon.swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-.25em;left:-.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}.swal2-icon.swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}.swal2-icon.swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}.swal2-icon.swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-tip{-webkit-animation:swal2-animate-success-line-tip .75s;animation:swal2-animate-success-line-tip .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-long{-webkit-animation:swal2-animate-success-line-long .75s;animation:swal2-animate-success-line-long .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-circular-line-right{-webkit-animation:swal2-rotate-success-circular-line 4.25s ease-in;animation:swal2-rotate-success-circular-line 4.25s ease-in}.swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:1.25em auto;padding:0;background:inherit;font-weight:600}.swal2-progress-steps li{display:inline-block;position:relative}.swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:#add8e6;color:#fff}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:#add8e6}.swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}[class^=swal2]{-webkit-tap-highlight-color:transparent}.swal2-show{-webkit-animation:swal2-show .3s;animation:swal2-show .3s}.swal2-hide{-webkit-animation:swal2-hide .15s forwards;animation:swal2-hide .15s forwards}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{margin-right:initial;margin-left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}@-webkit-keyframes swal2-toast-show{0%{transform:translateY(-.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0)}}@keyframes swal2-toast-show{0%{transform:translateY(-.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0)}}@-webkit-keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@-webkit-keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@-webkit-keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@-webkit-keyframes swal2-show{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}100%{transform:scale(1)}}@keyframes swal2-show{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}100%{transform:scale(1)}}@-webkit-keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(.5);opacity:0}}@keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(.5);opacity:0}}@-webkit-keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@-webkit-keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@-webkit-keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@-webkit-keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@-webkit-keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0);opacity:1}}@-webkit-keyframes swal2-rotate-loading{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes swal2-rotate-loading{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto!important}body.swal2-no-backdrop .swal2-container{background-color:transparent!important;pointer-events:none}body.swal2-no-backdrop .swal2-container .swal2-popup{pointer-events:all}body.swal2-no-backdrop .swal2-container .swal2-modal{box-shadow:0 0 10px rgba(0,0,0,.4)}@media print{body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow-y:scroll!important}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .swal2-container{position:static!important}}body.swal2-toast-shown .swal2-container{box-sizing:border-box;width:360px;max-width:100%;background-color:transparent;pointer-events:none}body.swal2-toast-shown .swal2-container.swal2-top{top:0;right:auto;bottom:auto;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{top:0;right:0;bottom:auto;left:auto}body.swal2-toast-shown .swal2-container.swal2-top-left,body.swal2-toast-shown .swal2-container.swal2-top-start{top:0;right:auto;bottom:auto;left:0}body.swal2-toast-shown .swal2-container.swal2-center-left,body.swal2-toast-shown .swal2-container.swal2-center-start{top:50%;right:auto;bottom:auto;left:0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{top:50%;right:auto;bottom:auto;left:50%;transform:translate(-50%,-50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{top:50%;right:0;bottom:auto;left:auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-left,body.swal2-toast-shown .swal2-container.swal2-bottom-start{top:auto;right:auto;bottom:0;left:0}body.swal2-toast-shown .swal2-container.swal2-bottom{top:auto;right:auto;bottom:0;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{top:auto;right:0;bottom:0;left:auto}"); \ No newline at end of file diff --git a/modules/docs/app/VoloDocs.Web/wwwroot/libs/sweetalert2/sweetalert2.css b/modules/docs/app/VoloDocs.Web/wwwroot/libs/sweetalert2/sweetalert2.css new file mode 100644 index 0000000000..1feb7a5581 --- /dev/null +++ b/modules/docs/app/VoloDocs.Web/wwwroot/libs/sweetalert2/sweetalert2.css @@ -0,0 +1,1319 @@ +.swal2-popup.swal2-toast { + box-sizing: border-box; + grid-column: 1/4 !important; + grid-row: 1/4 !important; + grid-template-columns: 1fr 99fr 1fr; + padding: 1em; + overflow-y: hidden; + background: #fff; + box-shadow: 0 0 0.625em #d9d9d9; + pointer-events: all; +} +.swal2-popup.swal2-toast > * { + grid-column: 2; +} +.swal2-popup.swal2-toast .swal2-title { + margin: 1em; + padding: 0; + font-size: 1em; + text-align: initial; +} +.swal2-popup.swal2-toast .swal2-loading { + justify-content: center; +} +.swal2-popup.swal2-toast .swal2-input { + height: 2em; + margin: 0.5em; + font-size: 1em; +} +.swal2-popup.swal2-toast .swal2-validation-message { + font-size: 1em; +} +.swal2-popup.swal2-toast .swal2-footer { + margin: 0.5em 0 0; + padding: 0.5em 0 0; + font-size: 0.8em; +} +.swal2-popup.swal2-toast .swal2-close { + grid-column: 3/3; + grid-row: 1/99; + align-self: center; + width: 0.8em; + height: 0.8em; + margin: 0; + font-size: 2em; +} +.swal2-popup.swal2-toast .swal2-html-container { + margin: 1em; + padding: 0; + font-size: 1em; + text-align: initial; +} +.swal2-popup.swal2-toast .swal2-html-container:empty { + padding: 0; +} +.swal2-popup.swal2-toast .swal2-loader { + grid-column: 1; + grid-row: 1/99; + align-self: center; + width: 2em; + height: 2em; + margin: 0.25em; +} +.swal2-popup.swal2-toast .swal2-icon { + grid-column: 1; + grid-row: 1/99; + align-self: center; + width: 2em; + min-width: 2em; + height: 2em; + margin: 0 0.5em 0 0; +} +.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content { + display: flex; + align-items: center; + font-size: 1.8em; + font-weight: bold; +} +.swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring { + width: 2em; + height: 2em; +} +.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line] { + top: 0.875em; + width: 1.375em; +} +.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left] { + left: 0.3125em; +} +.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right] { + right: 0.3125em; +} +.swal2-popup.swal2-toast .swal2-actions { + justify-content: flex-start; + height: auto; + margin: 0; + margin-top: 0.3125em; + padding: 0; +} +.swal2-popup.swal2-toast .swal2-styled { + margin: 0.25em 0.5em; + padding: 0.4em 0.6em; + font-size: 1em; +} +.swal2-popup.swal2-toast .swal2-styled:focus { + box-shadow: 0 0 0 1px #fff, 0 0 0 3px rgba(100, 150, 200, 0.5); +} +.swal2-popup.swal2-toast .swal2-success { + border-color: #a5dc86; +} +.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line] { + position: absolute; + width: 1.6em; + height: 3em; + transform: rotate(45deg); + border-radius: 50%; +} +.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left] { + top: -0.8em; + left: -0.5em; + transform: rotate(-45deg); + transform-origin: 2em 2em; + border-radius: 4em 0 0 4em; +} +.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right] { + top: -0.25em; + left: 0.9375em; + transform-origin: 0 1.5em; + border-radius: 0 4em 4em 0; +} +.swal2-popup.swal2-toast .swal2-success .swal2-success-ring { + width: 2em; + height: 2em; +} +.swal2-popup.swal2-toast .swal2-success .swal2-success-fix { + top: 0; + left: 0.4375em; + width: 0.4375em; + height: 2.6875em; +} +.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line] { + height: 0.3125em; +} +.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip] { + top: 1.125em; + left: 0.1875em; + width: 0.75em; +} +.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=long] { + top: 0.9375em; + right: 0.1875em; + width: 1.375em; +} +.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip { + -webkit-animation: swal2-toast-animate-success-line-tip 0.75s; + animation: swal2-toast-animate-success-line-tip 0.75s; +} +.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long { + -webkit-animation: swal2-toast-animate-success-line-long 0.75s; + animation: swal2-toast-animate-success-line-long 0.75s; +} +.swal2-popup.swal2-toast.swal2-show { + -webkit-animation: swal2-toast-show 0.5s; + animation: swal2-toast-show 0.5s; +} +.swal2-popup.swal2-toast.swal2-hide { + -webkit-animation: swal2-toast-hide 0.1s forwards; + animation: swal2-toast-hide 0.1s forwards; +} + +.swal2-container { + display: grid; + position: fixed; + z-index: 1060; + top: 0; + right: 0; + bottom: 0; + left: 0; + box-sizing: border-box; + grid-template-areas: "top-start top top-end" "center-start center center-end" "bottom-start bottom-center bottom-end"; + grid-template-rows: minmax(-webkit-min-content, auto) minmax(-webkit-min-content, auto) minmax(-webkit-min-content, auto); + grid-template-rows: minmax(min-content, auto) minmax(min-content, auto) minmax(min-content, auto); + height: 100%; + padding: 0.625em; + overflow-x: hidden; + transition: background-color 0.1s; + -webkit-overflow-scrolling: touch; +} +.swal2-container.swal2-backdrop-show, .swal2-container.swal2-noanimation { + background: rgba(0, 0, 0, 0.4); +} +.swal2-container.swal2-backdrop-hide { + background: transparent !important; +} +.swal2-container.swal2-top-start, .swal2-container.swal2-center-start, .swal2-container.swal2-bottom-start { + grid-template-columns: minmax(0, 1fr) auto auto; +} +.swal2-container.swal2-top, .swal2-container.swal2-center, .swal2-container.swal2-bottom { + grid-template-columns: auto minmax(0, 1fr) auto; +} +.swal2-container.swal2-top-end, .swal2-container.swal2-center-end, .swal2-container.swal2-bottom-end { + grid-template-columns: auto auto minmax(0, 1fr); +} +.swal2-container.swal2-top-start > .swal2-popup { + align-self: start; +} +.swal2-container.swal2-top > .swal2-popup { + grid-column: 2; + align-self: start; + justify-self: center; +} +.swal2-container.swal2-top-end > .swal2-popup, .swal2-container.swal2-top-right > .swal2-popup { + grid-column: 3; + align-self: start; + justify-self: end; +} +.swal2-container.swal2-center-start > .swal2-popup, .swal2-container.swal2-center-left > .swal2-popup { + grid-row: 2; + align-self: center; +} +.swal2-container.swal2-center > .swal2-popup { + grid-column: 2; + grid-row: 2; + align-self: center; + justify-self: center; +} +.swal2-container.swal2-center-end > .swal2-popup, .swal2-container.swal2-center-right > .swal2-popup { + grid-column: 3; + grid-row: 2; + align-self: center; + justify-self: end; +} +.swal2-container.swal2-bottom-start > .swal2-popup, .swal2-container.swal2-bottom-left > .swal2-popup { + grid-column: 1; + grid-row: 3; + align-self: end; +} +.swal2-container.swal2-bottom > .swal2-popup { + grid-column: 2; + grid-row: 3; + justify-self: center; + align-self: end; +} +.swal2-container.swal2-bottom-end > .swal2-popup, .swal2-container.swal2-bottom-right > .swal2-popup { + grid-column: 3; + grid-row: 3; + align-self: end; + justify-self: end; +} +.swal2-container.swal2-grow-row > .swal2-popup, .swal2-container.swal2-grow-fullscreen > .swal2-popup { + grid-column: 1/4; + width: 100%; +} +.swal2-container.swal2-grow-column > .swal2-popup, .swal2-container.swal2-grow-fullscreen > .swal2-popup { + grid-row: 1/4; + align-self: stretch; +} +.swal2-container.swal2-no-transition { + transition: none !important; +} + +.swal2-popup { + display: none; + position: relative; + box-sizing: border-box; + grid-template-columns: minmax(0, 100%); + width: 32em; + max-width: 100%; + padding: 0 0 1.25em; + border: none; + border-radius: 5px; + background: #fff; + color: #545454; + font-family: inherit; + font-size: 1rem; +} +.swal2-popup:focus { + outline: none; +} +.swal2-popup.swal2-loading { + overflow-y: hidden; +} + +.swal2-title { + position: relative; + max-width: 100%; + margin: 0; + padding: 0.8em 1em 0; + color: #595959; + font-size: 1.875em; + font-weight: 600; + text-align: center; + text-transform: none; + word-wrap: break-word; +} + +.swal2-actions { + display: flex; + z-index: 1; + box-sizing: border-box; + flex-wrap: wrap; + align-items: center; + justify-content: center; + width: auto; + margin: 1.25em auto 0; + padding: 0; +} +.swal2-actions:not(.swal2-loading) .swal2-styled[disabled] { + opacity: 0.4; +} +.swal2-actions:not(.swal2-loading) .swal2-styled:hover { + background-image: linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1)); +} +.swal2-actions:not(.swal2-loading) .swal2-styled:active { + background-image: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)); +} + +.swal2-loader { + display: none; + align-items: center; + justify-content: center; + width: 2.2em; + height: 2.2em; + margin: 0 1.875em; + -webkit-animation: swal2-rotate-loading 1.5s linear 0s infinite normal; + animation: swal2-rotate-loading 1.5s linear 0s infinite normal; + border-width: 0.25em; + border-style: solid; + border-radius: 100%; + border-color: #2778c4 transparent #2778c4 transparent; +} + +.swal2-styled { + margin: 0.3125em; + padding: 0.625em 1.1em; + transition: box-shadow 0.1s; + box-shadow: 0 0 0 3px transparent; + font-weight: 500; +} +.swal2-styled:not([disabled]) { + cursor: pointer; +} +.swal2-styled.swal2-confirm { + border: 0; + border-radius: 0.25em; + background: initial; + background-color: #7367f0; + color: #fff; + font-size: 1em; +} +.swal2-styled.swal2-confirm:focus { + box-shadow: 0 0 0 3px rgba(115, 103, 240, 0.5); +} +.swal2-styled.swal2-deny { + border: 0; + border-radius: 0.25em; + background: initial; + background-color: #ea5455; + color: #fff; + font-size: 1em; +} +.swal2-styled.swal2-deny:focus { + box-shadow: 0 0 0 3px rgba(234, 84, 85, 0.5); +} +.swal2-styled.swal2-cancel { + border: 0; + border-radius: 0.25em; + background: initial; + background-color: #6e7d88; + color: #fff; + font-size: 1em; +} +.swal2-styled.swal2-cancel:focus { + box-shadow: 0 0 0 3px rgba(110, 125, 136, 0.5); +} +.swal2-styled.swal2-default-outline:focus { + box-shadow: 0 0 0 3px rgba(100, 150, 200, 0.5); +} +.swal2-styled:focus { + outline: none; +} +.swal2-styled::-moz-focus-inner { + border: 0; +} + +.swal2-footer { + justify-content: center; + margin: 1em 0 0; + padding: 1em 1em 0; + border-top: 1px solid #eee; + color: #545454; + font-size: 1em; +} + +.swal2-timer-progress-bar-container { + position: absolute; + right: 0; + bottom: 0; + left: 0; + grid-column: auto !important; + height: 0.25em; + overflow: hidden; + border-bottom-right-radius: 5px; + border-bottom-left-radius: 5px; +} + +.swal2-timer-progress-bar { + width: 100%; + height: 0.25em; + background: rgba(0, 0, 0, 0.2); +} + +.swal2-image { + max-width: 100%; + margin: 2em auto 1em; +} + +.swal2-close { + z-index: 2; + align-items: center; + justify-content: center; + width: 1.2em; + height: 1.2em; + margin-top: 0; + margin-right: 0; + margin-bottom: -1.2em; + padding: 0; + overflow: hidden; + transition: color 0.1s, box-shadow 0.1s; + border: none; + border-radius: 5px; + background: transparent; + color: #ccc; + font-family: serif; + font-family: monospace; + font-size: 2.5em; + cursor: pointer; + justify-self: end; +} +.swal2-close:hover { + transform: none; + background: transparent; + color: #f27474; +} +.swal2-close:focus { + outline: none; + box-shadow: inset 0 0 0 3px rgba(100, 150, 200, 0.5); +} +.swal2-close::-moz-focus-inner { + border: 0; +} + +.swal2-html-container { + z-index: 1; + justify-content: center; + margin: 1em 1.6em 0.3em; + padding: 0; + overflow: auto; + color: #545454; + font-size: 1.125em; + font-weight: normal; + line-height: normal; + text-align: center; + word-wrap: break-word; + word-break: break-word; +} + +.swal2-input, +.swal2-file, +.swal2-textarea, +.swal2-select, +.swal2-radio, +.swal2-checkbox { + margin: 1em 2em 0; +} + +.swal2-input, +.swal2-file, +.swal2-textarea { + box-sizing: border-box; + width: auto; + transition: border-color 0.1s, box-shadow 0.1s; + border: 1px solid #d9d9d9; + border-radius: 0.1875em; + background: inherit; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06), 0 0 0 3px transparent; + color: inherit; + font-size: 1.125em; +} +.swal2-input.swal2-inputerror, +.swal2-file.swal2-inputerror, +.swal2-textarea.swal2-inputerror { + border-color: #f27474 !important; + box-shadow: 0 0 2px #f27474 !important; +} +.swal2-input:focus, +.swal2-file:focus, +.swal2-textarea:focus { + border: 1px solid #b4dbed; + outline: none; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06), 0 0 0 3px rgba(100, 150, 200, 0.5); +} +.swal2-input::-moz-placeholder, .swal2-file::-moz-placeholder, .swal2-textarea::-moz-placeholder { + color: #ccc; +} +.swal2-input:-ms-input-placeholder, .swal2-file:-ms-input-placeholder, .swal2-textarea:-ms-input-placeholder { + color: #ccc; +} +.swal2-input::placeholder, +.swal2-file::placeholder, +.swal2-textarea::placeholder { + color: #ccc; +} + +.swal2-range { + margin: 1em 2em 0; + background: #fff; +} +.swal2-range input { + width: 80%; +} +.swal2-range output { + width: 20%; + color: inherit; + font-weight: 600; + text-align: center; +} +.swal2-range input, +.swal2-range output { + height: 2.625em; + padding: 0; + font-size: 1.125em; + line-height: 2.625em; +} + +.swal2-input { + height: 2.625em; + padding: 0 0.75em; +} + +.swal2-file { + width: 75%; + margin-right: auto; + margin-left: auto; + background: inherit; + font-size: 1.125em; +} + +.swal2-textarea { + height: 6.75em; + padding: 0.75em; +} + +.swal2-select { + min-width: 50%; + max-width: 100%; + padding: 0.375em 0.625em; + background: inherit; + color: inherit; + font-size: 1.125em; +} + +.swal2-radio, +.swal2-checkbox { + align-items: center; + justify-content: center; + background: #fff; + color: inherit; +} +.swal2-radio label, +.swal2-checkbox label { + margin: 0 0.6em; + font-size: 1.125em; +} +.swal2-radio input, +.swal2-checkbox input { + flex-shrink: 0; + margin: 0 0.4em; +} + +.swal2-input-label { + display: flex; + justify-content: center; + margin: 1em auto 0; +} + +.swal2-validation-message { + align-items: center; + justify-content: center; + margin: 1em 0 0; + padding: 0.625em; + overflow: hidden; + background: #f0f0f0; + color: #666666; + font-size: 1em; + font-weight: 300; +} +.swal2-validation-message::before { + content: "!"; + display: inline-block; + width: 1.5em; + min-width: 1.5em; + height: 1.5em; + margin: 0 0.625em; + border-radius: 50%; + background-color: #f27474; + color: #fff; + font-weight: 600; + line-height: 1.5em; + text-align: center; +} + +.swal2-icon { + position: relative; + box-sizing: content-box; + justify-content: center; + width: 5em; + height: 5em; + margin: 2.5em auto 0.6em; + border: 0.25em solid transparent; + border-radius: 50%; + border-color: #000; + font-family: inherit; + line-height: 5em; + cursor: default; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} +.swal2-icon .swal2-icon-content { + display: flex; + align-items: center; + font-size: 3.75em; +} +.swal2-icon.swal2-error { + border-color: #f27474; + color: #f27474; +} +.swal2-icon.swal2-error .swal2-x-mark { + position: relative; + flex-grow: 1; +} +.swal2-icon.swal2-error [class^=swal2-x-mark-line] { + display: block; + position: absolute; + top: 2.3125em; + width: 2.9375em; + height: 0.3125em; + border-radius: 0.125em; + background-color: #f27474; +} +.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left] { + left: 1.0625em; + transform: rotate(45deg); +} +.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right] { + right: 1em; + transform: rotate(-45deg); +} +.swal2-icon.swal2-error.swal2-icon-show { + -webkit-animation: swal2-animate-error-icon 0.5s; + animation: swal2-animate-error-icon 0.5s; +} +.swal2-icon.swal2-error.swal2-icon-show .swal2-x-mark { + -webkit-animation: swal2-animate-error-x-mark 0.5s; + animation: swal2-animate-error-x-mark 0.5s; +} +.swal2-icon.swal2-warning { + border-color: #facea8; + color: #f8bb86; +} +.swal2-icon.swal2-info { + border-color: #9de0f6; + color: #3fc3ee; +} +.swal2-icon.swal2-question { + border-color: #c9dae1; + color: #87adbd; +} +.swal2-icon.swal2-success { + border-color: #a5dc86; + color: #a5dc86; +} +.swal2-icon.swal2-success [class^=swal2-success-circular-line] { + position: absolute; + width: 3.75em; + height: 7.5em; + transform: rotate(45deg); + border-radius: 50%; +} +.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=left] { + top: -0.4375em; + left: -2.0635em; + transform: rotate(-45deg); + transform-origin: 3.75em 3.75em; + border-radius: 7.5em 0 0 7.5em; +} +.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=right] { + top: -0.6875em; + left: 1.875em; + transform: rotate(-45deg); + transform-origin: 0 3.75em; + border-radius: 0 7.5em 7.5em 0; +} +.swal2-icon.swal2-success .swal2-success-ring { + position: absolute; + z-index: 2; + top: -0.25em; + left: -0.25em; + box-sizing: content-box; + width: 100%; + height: 100%; + border: 0.25em solid rgba(165, 220, 134, 0.3); + border-radius: 50%; +} +.swal2-icon.swal2-success .swal2-success-fix { + position: absolute; + z-index: 1; + top: 0.5em; + left: 1.625em; + width: 0.4375em; + height: 5.625em; + transform: rotate(-45deg); +} +.swal2-icon.swal2-success [class^=swal2-success-line] { + display: block; + position: absolute; + z-index: 2; + height: 0.3125em; + border-radius: 0.125em; + background-color: #a5dc86; +} +.swal2-icon.swal2-success [class^=swal2-success-line][class$=tip] { + top: 2.875em; + left: 0.8125em; + width: 1.5625em; + transform: rotate(45deg); +} +.swal2-icon.swal2-success [class^=swal2-success-line][class$=long] { + top: 2.375em; + right: 0.5em; + width: 2.9375em; + transform: rotate(-45deg); +} +.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-tip { + -webkit-animation: swal2-animate-success-line-tip 0.75s; + animation: swal2-animate-success-line-tip 0.75s; +} +.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-long { + -webkit-animation: swal2-animate-success-line-long 0.75s; + animation: swal2-animate-success-line-long 0.75s; +} +.swal2-icon.swal2-success.swal2-icon-show .swal2-success-circular-line-right { + -webkit-animation: swal2-rotate-success-circular-line 4.25s ease-in; + animation: swal2-rotate-success-circular-line 4.25s ease-in; +} + +.swal2-progress-steps { + flex-wrap: wrap; + align-items: center; + max-width: 100%; + margin: 1.25em auto; + padding: 0; + background: inherit; + font-weight: 600; +} +.swal2-progress-steps li { + display: inline-block; + position: relative; +} +.swal2-progress-steps .swal2-progress-step { + z-index: 20; + flex-shrink: 0; + width: 2em; + height: 2em; + border-radius: 2em; + background: #2778c4; + color: #fff; + line-height: 2em; + text-align: center; +} +.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step { + background: #2778c4; +} +.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step ~ .swal2-progress-step { + background: #add8e6; + color: #fff; +} +.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step ~ .swal2-progress-step-line { + background: #add8e6; +} +.swal2-progress-steps .swal2-progress-step-line { + z-index: 10; + flex-shrink: 0; + width: 2.5em; + height: 0.4em; + margin: 0 -1px; + background: #2778c4; +} + +[class^=swal2] { + -webkit-tap-highlight-color: transparent; +} + +.swal2-show { + -webkit-animation: swal2-show 0.3s; + animation: swal2-show 0.3s; +} + +.swal2-hide { + -webkit-animation: swal2-hide 0.15s forwards; + animation: swal2-hide 0.15s forwards; +} + +.swal2-noanimation { + transition: none; +} + +.swal2-scrollbar-measure { + position: absolute; + top: -9999px; + width: 50px; + height: 50px; + overflow: scroll; +} + +.swal2-rtl .swal2-close { + margin-right: initial; + margin-left: 0; +} +.swal2-rtl .swal2-timer-progress-bar { + right: 0; + left: auto; +} + +@-webkit-keyframes swal2-toast-show { + 0% { + transform: translateY(-0.625em) rotateZ(2deg); + } + 33% { + transform: translateY(0) rotateZ(-2deg); + } + 66% { + transform: translateY(0.3125em) rotateZ(2deg); + } + 100% { + transform: translateY(0) rotateZ(0deg); + } +} + +@keyframes swal2-toast-show { + 0% { + transform: translateY(-0.625em) rotateZ(2deg); + } + 33% { + transform: translateY(0) rotateZ(-2deg); + } + 66% { + transform: translateY(0.3125em) rotateZ(2deg); + } + 100% { + transform: translateY(0) rotateZ(0deg); + } +} +@-webkit-keyframes swal2-toast-hide { + 100% { + transform: rotateZ(1deg); + opacity: 0; + } +} +@keyframes swal2-toast-hide { + 100% { + transform: rotateZ(1deg); + opacity: 0; + } +} +@-webkit-keyframes swal2-toast-animate-success-line-tip { + 0% { + top: 0.5625em; + left: 0.0625em; + width: 0; + } + 54% { + top: 0.125em; + left: 0.125em; + width: 0; + } + 70% { + top: 0.625em; + left: -0.25em; + width: 1.625em; + } + 84% { + top: 1.0625em; + left: 0.75em; + width: 0.5em; + } + 100% { + top: 1.125em; + left: 0.1875em; + width: 0.75em; + } +} +@keyframes swal2-toast-animate-success-line-tip { + 0% { + top: 0.5625em; + left: 0.0625em; + width: 0; + } + 54% { + top: 0.125em; + left: 0.125em; + width: 0; + } + 70% { + top: 0.625em; + left: -0.25em; + width: 1.625em; + } + 84% { + top: 1.0625em; + left: 0.75em; + width: 0.5em; + } + 100% { + top: 1.125em; + left: 0.1875em; + width: 0.75em; + } +} +@-webkit-keyframes swal2-toast-animate-success-line-long { + 0% { + top: 1.625em; + right: 1.375em; + width: 0; + } + 65% { + top: 1.25em; + right: 0.9375em; + width: 0; + } + 84% { + top: 0.9375em; + right: 0; + width: 1.125em; + } + 100% { + top: 0.9375em; + right: 0.1875em; + width: 1.375em; + } +} +@keyframes swal2-toast-animate-success-line-long { + 0% { + top: 1.625em; + right: 1.375em; + width: 0; + } + 65% { + top: 1.25em; + right: 0.9375em; + width: 0; + } + 84% { + top: 0.9375em; + right: 0; + width: 1.125em; + } + 100% { + top: 0.9375em; + right: 0.1875em; + width: 1.375em; + } +} +@-webkit-keyframes swal2-show { + 0% { + transform: scale(0.7); + } + 45% { + transform: scale(1.05); + } + 80% { + transform: scale(0.95); + } + 100% { + transform: scale(1); + } +} +@keyframes swal2-show { + 0% { + transform: scale(0.7); + } + 45% { + transform: scale(1.05); + } + 80% { + transform: scale(0.95); + } + 100% { + transform: scale(1); + } +} +@-webkit-keyframes swal2-hide { + 0% { + transform: scale(1); + opacity: 1; + } + 100% { + transform: scale(0.5); + opacity: 0; + } +} +@keyframes swal2-hide { + 0% { + transform: scale(1); + opacity: 1; + } + 100% { + transform: scale(0.5); + opacity: 0; + } +} +@-webkit-keyframes swal2-animate-success-line-tip { + 0% { + top: 1.1875em; + left: 0.0625em; + width: 0; + } + 54% { + top: 1.0625em; + left: 0.125em; + width: 0; + } + 70% { + top: 2.1875em; + left: -0.375em; + width: 3.125em; + } + 84% { + top: 3em; + left: 1.3125em; + width: 1.0625em; + } + 100% { + top: 2.8125em; + left: 0.8125em; + width: 1.5625em; + } +} +@keyframes swal2-animate-success-line-tip { + 0% { + top: 1.1875em; + left: 0.0625em; + width: 0; + } + 54% { + top: 1.0625em; + left: 0.125em; + width: 0; + } + 70% { + top: 2.1875em; + left: -0.375em; + width: 3.125em; + } + 84% { + top: 3em; + left: 1.3125em; + width: 1.0625em; + } + 100% { + top: 2.8125em; + left: 0.8125em; + width: 1.5625em; + } +} +@-webkit-keyframes swal2-animate-success-line-long { + 0% { + top: 3.375em; + right: 2.875em; + width: 0; + } + 65% { + top: 3.375em; + right: 2.875em; + width: 0; + } + 84% { + top: 2.1875em; + right: 0; + width: 3.4375em; + } + 100% { + top: 2.375em; + right: 0.5em; + width: 2.9375em; + } +} +@keyframes swal2-animate-success-line-long { + 0% { + top: 3.375em; + right: 2.875em; + width: 0; + } + 65% { + top: 3.375em; + right: 2.875em; + width: 0; + } + 84% { + top: 2.1875em; + right: 0; + width: 3.4375em; + } + 100% { + top: 2.375em; + right: 0.5em; + width: 2.9375em; + } +} +@-webkit-keyframes swal2-rotate-success-circular-line { + 0% { + transform: rotate(-45deg); + } + 5% { + transform: rotate(-45deg); + } + 12% { + transform: rotate(-405deg); + } + 100% { + transform: rotate(-405deg); + } +} +@keyframes swal2-rotate-success-circular-line { + 0% { + transform: rotate(-45deg); + } + 5% { + transform: rotate(-45deg); + } + 12% { + transform: rotate(-405deg); + } + 100% { + transform: rotate(-405deg); + } +} +@-webkit-keyframes swal2-animate-error-x-mark { + 0% { + margin-top: 1.625em; + transform: scale(0.4); + opacity: 0; + } + 50% { + margin-top: 1.625em; + transform: scale(0.4); + opacity: 0; + } + 80% { + margin-top: -0.375em; + transform: scale(1.15); + } + 100% { + margin-top: 0; + transform: scale(1); + opacity: 1; + } +} +@keyframes swal2-animate-error-x-mark { + 0% { + margin-top: 1.625em; + transform: scale(0.4); + opacity: 0; + } + 50% { + margin-top: 1.625em; + transform: scale(0.4); + opacity: 0; + } + 80% { + margin-top: -0.375em; + transform: scale(1.15); + } + 100% { + margin-top: 0; + transform: scale(1); + opacity: 1; + } +} +@-webkit-keyframes swal2-animate-error-icon { + 0% { + transform: rotateX(100deg); + opacity: 0; + } + 100% { + transform: rotateX(0deg); + opacity: 1; + } +} +@keyframes swal2-animate-error-icon { + 0% { + transform: rotateX(100deg); + opacity: 0; + } + 100% { + transform: rotateX(0deg); + opacity: 1; + } +} +@-webkit-keyframes swal2-rotate-loading { + 0% { + transform: rotate(0deg); + } + 100% { + transform: rotate(360deg); + } +} +@keyframes swal2-rotate-loading { + 0% { + transform: rotate(0deg); + } + 100% { + transform: rotate(360deg); + } +} +body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) { + overflow: hidden; +} +body.swal2-height-auto { + height: auto !important; +} +body.swal2-no-backdrop .swal2-container { + background-color: transparent !important; + pointer-events: none; +} +body.swal2-no-backdrop .swal2-container .swal2-popup { + pointer-events: all; +} +body.swal2-no-backdrop .swal2-container .swal2-modal { + box-shadow: 0 0 10px rgba(0, 0, 0, 0.4); +} +@media print { + body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) { + overflow-y: scroll !important; + } + body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) > [aria-hidden=true] { + display: none; + } + body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .swal2-container { + position: static !important; + } +} +body.swal2-toast-shown .swal2-container { + box-sizing: border-box; + width: 360px; + max-width: 100%; + background-color: transparent; + pointer-events: none; +} +body.swal2-toast-shown .swal2-container.swal2-top { + top: 0; + right: auto; + bottom: auto; + left: 50%; + transform: translateX(-50%); +} +body.swal2-toast-shown .swal2-container.swal2-top-end, body.swal2-toast-shown .swal2-container.swal2-top-right { + top: 0; + right: 0; + bottom: auto; + left: auto; +} +body.swal2-toast-shown .swal2-container.swal2-top-start, body.swal2-toast-shown .swal2-container.swal2-top-left { + top: 0; + right: auto; + bottom: auto; + left: 0; +} +body.swal2-toast-shown .swal2-container.swal2-center-start, body.swal2-toast-shown .swal2-container.swal2-center-left { + top: 50%; + right: auto; + bottom: auto; + left: 0; + transform: translateY(-50%); +} +body.swal2-toast-shown .swal2-container.swal2-center { + top: 50%; + right: auto; + bottom: auto; + left: 50%; + transform: translate(-50%, -50%); +} +body.swal2-toast-shown .swal2-container.swal2-center-end, body.swal2-toast-shown .swal2-container.swal2-center-right { + top: 50%; + right: 0; + bottom: auto; + left: auto; + transform: translateY(-50%); +} +body.swal2-toast-shown .swal2-container.swal2-bottom-start, body.swal2-toast-shown .swal2-container.swal2-bottom-left { + top: auto; + right: auto; + bottom: 0; + left: 0; +} +body.swal2-toast-shown .swal2-container.swal2-bottom { + top: auto; + right: auto; + bottom: 0; + left: 50%; + transform: translateX(-50%); +} +body.swal2-toast-shown .swal2-container.swal2-bottom-end, body.swal2-toast-shown .swal2-container.swal2-bottom-right { + top: auto; + right: 0; + bottom: 0; + left: auto; +} \ No newline at end of file diff --git a/modules/docs/app/VoloDocs.Web/wwwroot/libs/sweetalert2/sweetalert2.js b/modules/docs/app/VoloDocs.Web/wwwroot/libs/sweetalert2/sweetalert2.js new file mode 100644 index 0000000000..e9c254f064 --- /dev/null +++ b/modules/docs/app/VoloDocs.Web/wwwroot/libs/sweetalert2/sweetalert2.js @@ -0,0 +1,3121 @@ +/*! +* sweetalert2 v11.1.5 +* Released under the MIT License. +*/ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : + typeof define === 'function' && define.amd ? define(factory) : + (global = global || self, global.Sweetalert2 = factory()); +}(this, function () { 'use strict'; + + const DismissReason = Object.freeze({ + cancel: 'cancel', + backdrop: 'backdrop', + close: 'close', + esc: 'esc', + timer: 'timer' + }); + + const consolePrefix = 'SweetAlert2:'; + /** + * Filter the unique values into a new array + * @param arr + */ + + const uniqueArray = arr => { + const result = []; + + for (let i = 0; i < arr.length; i++) { + if (result.indexOf(arr[i]) === -1) { + result.push(arr[i]); + } + } + + return result; + }; + /** + * Capitalize the first letter of a string + * @param str + */ + + const capitalizeFirstLetter = str => str.charAt(0).toUpperCase() + str.slice(1); + /** + * Convert NodeList to Array + * @param nodeList + */ + + const toArray = nodeList => Array.prototype.slice.call(nodeList); + /** + * Standardise console warnings + * @param message + */ + + const warn = message => { + console.warn("".concat(consolePrefix, " ").concat(typeof message === 'object' ? message.join(' ') : message)); + }; + /** + * Standardise console errors + * @param message + */ + + const error = message => { + console.error("".concat(consolePrefix, " ").concat(message)); + }; + /** + * Private global state for `warnOnce` + * @type {Array} + * @private + */ + + const previousWarnOnceMessages = []; + /** + * Show a console warning, but only if it hasn't already been shown + * @param message + */ + + const warnOnce = message => { + if (!previousWarnOnceMessages.includes(message)) { + previousWarnOnceMessages.push(message); + warn(message); + } + }; + /** + * Show a one-time console warning about deprecated params/methods + */ + + const warnAboutDeprecation = (deprecatedParam, useInstead) => { + warnOnce("\"".concat(deprecatedParam, "\" is deprecated and will be removed in the next major release. Please use \"").concat(useInstead, "\" instead.")); + }; + /** + * If `arg` is a function, call it (with no arguments or context) and return the result. + * Otherwise, just pass the value through + * @param arg + */ + + const callIfFunction = arg => typeof arg === 'function' ? arg() : arg; + const hasToPromiseFn = arg => arg && typeof arg.toPromise === 'function'; + const asPromise = arg => hasToPromiseFn(arg) ? arg.toPromise() : Promise.resolve(arg); + const isPromise = arg => arg && Promise.resolve(arg) === arg; + + const isJqueryElement = elem => typeof elem === 'object' && elem.jquery; + + const isElement = elem => elem instanceof Element || isJqueryElement(elem); + + const argsToParams = args => { + const params = {}; + + if (typeof args[0] === 'object' && !isElement(args[0])) { + Object.assign(params, args[0]); + } else { + ['title', 'html', 'icon'].forEach((name, index) => { + const arg = args[index]; + + if (typeof arg === 'string' || isElement(arg)) { + params[name] = arg; + } else if (arg !== undefined) { + error("Unexpected type of ".concat(name, "! Expected \"string\" or \"Element\", got ").concat(typeof arg)); + } + }); + } + + return params; + }; + + const swalPrefix = 'swal2-'; + const prefix = items => { + const result = {}; + + for (const i in items) { + result[items[i]] = swalPrefix + items[i]; + } + + return result; + }; + const swalClasses = prefix(['container', 'shown', 'height-auto', 'iosfix', 'popup', 'modal', 'no-backdrop', 'no-transition', 'toast', 'toast-shown', 'show', 'hide', 'close', 'title', 'html-container', 'actions', 'confirm', 'deny', 'cancel', 'default-outline', 'footer', 'icon', 'icon-content', 'image', 'input', 'file', 'range', 'select', 'radio', 'checkbox', 'label', 'textarea', 'inputerror', 'input-label', 'validation-message', 'progress-steps', 'active-progress-step', 'progress-step', 'progress-step-line', 'loader', 'loading', 'styled', 'top', 'top-start', 'top-end', 'top-left', 'top-right', 'center', 'center-start', 'center-end', 'center-left', 'center-right', 'bottom', 'bottom-start', 'bottom-end', 'bottom-left', 'bottom-right', 'grow-row', 'grow-column', 'grow-fullscreen', 'rtl', 'timer-progress-bar', 'timer-progress-bar-container', 'scrollbar-measure', 'icon-success', 'icon-warning', 'icon-info', 'icon-question', 'icon-error']); + const iconTypes = prefix(['success', 'warning', 'info', 'question', 'error']); + + const getContainer = () => document.body.querySelector(".".concat(swalClasses.container)); + const elementBySelector = selectorString => { + const container = getContainer(); + return container ? container.querySelector(selectorString) : null; + }; + + const elementByClass = className => { + return elementBySelector(".".concat(className)); + }; + + const getPopup = () => elementByClass(swalClasses.popup); + const getIcon = () => elementByClass(swalClasses.icon); + const getTitle = () => elementByClass(swalClasses.title); + const getHtmlContainer = () => elementByClass(swalClasses['html-container']); + const getImage = () => elementByClass(swalClasses.image); + const getProgressSteps = () => elementByClass(swalClasses['progress-steps']); + const getValidationMessage = () => elementByClass(swalClasses['validation-message']); + const getConfirmButton = () => elementBySelector(".".concat(swalClasses.actions, " .").concat(swalClasses.confirm)); + const getDenyButton = () => elementBySelector(".".concat(swalClasses.actions, " .").concat(swalClasses.deny)); + const getInputLabel = () => elementByClass(swalClasses['input-label']); + const getLoader = () => elementBySelector(".".concat(swalClasses.loader)); + const getCancelButton = () => elementBySelector(".".concat(swalClasses.actions, " .").concat(swalClasses.cancel)); + const getActions = () => elementByClass(swalClasses.actions); + const getFooter = () => elementByClass(swalClasses.footer); + const getTimerProgressBar = () => elementByClass(swalClasses['timer-progress-bar']); + const getCloseButton = () => elementByClass(swalClasses.close); // https://github.com/jkup/focusable/blob/master/index.js + + const focusable = "\n a[href],\n area[href],\n input:not([disabled]),\n select:not([disabled]),\n textarea:not([disabled]),\n button:not([disabled]),\n iframe,\n object,\n embed,\n [tabindex=\"0\"],\n [contenteditable],\n audio[controls],\n video[controls],\n summary\n"; + const getFocusableElements = () => { + const focusableElementsWithTabindex = toArray(getPopup().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')) // sort according to tabindex + .sort((a, b) => { + a = parseInt(a.getAttribute('tabindex')); + b = parseInt(b.getAttribute('tabindex')); + + if (a > b) { + return 1; + } else if (a < b) { + return -1; + } + + return 0; + }); + const otherFocusableElements = toArray(getPopup().querySelectorAll(focusable)).filter(el => el.getAttribute('tabindex') !== '-1'); + return uniqueArray(focusableElementsWithTabindex.concat(otherFocusableElements)).filter(el => isVisible(el)); + }; + const isModal = () => { + return !isToast() && !document.body.classList.contains(swalClasses['no-backdrop']); + }; + const isToast = () => { + return document.body.classList.contains(swalClasses['toast-shown']); + }; + const isLoading = () => { + return getPopup().hasAttribute('data-loading'); + }; + + const states = { + previousBodyPadding: null + }; + const setInnerHtml = (elem, html) => { + // #1926 + elem.textContent = ''; + + if (html) { + const parser = new DOMParser(); + const parsed = parser.parseFromString(html, "text/html"); + toArray(parsed.querySelector('head').childNodes).forEach(child => { + elem.appendChild(child); + }); + toArray(parsed.querySelector('body').childNodes).forEach(child => { + elem.appendChild(child); + }); + } + }; + const hasClass = (elem, className) => { + if (!className) { + return false; + } + + const classList = className.split(/\s+/); + + for (let i = 0; i < classList.length; i++) { + if (!elem.classList.contains(classList[i])) { + return false; + } + } + + return true; + }; + + const removeCustomClasses = (elem, params) => { + toArray(elem.classList).forEach(className => { + if (!Object.values(swalClasses).includes(className) && !Object.values(iconTypes).includes(className) && !Object.values(params.showClass).includes(className)) { + elem.classList.remove(className); + } + }); + }; + + const applyCustomClass = (elem, params, className) => { + removeCustomClasses(elem, params); + + if (params.customClass && params.customClass[className]) { + if (typeof params.customClass[className] !== 'string' && !params.customClass[className].forEach) { + return warn("Invalid type of customClass.".concat(className, "! Expected string or iterable object, got \"").concat(typeof params.customClass[className], "\"")); + } + + addClass(elem, params.customClass[className]); + } + }; + const getInput = (popup, inputType) => { + if (!inputType) { + return null; + } + + switch (inputType) { + case 'select': + case 'textarea': + case 'file': + return getChildByClass(popup, swalClasses[inputType]); + + case 'checkbox': + return popup.querySelector(".".concat(swalClasses.checkbox, " input")); + + case 'radio': + return popup.querySelector(".".concat(swalClasses.radio, " input:checked")) || popup.querySelector(".".concat(swalClasses.radio, " input:first-child")); + + case 'range': + return popup.querySelector(".".concat(swalClasses.range, " input")); + + default: + return getChildByClass(popup, swalClasses.input); + } + }; + const focusInput = input => { + input.focus(); // place cursor at end of text in text input + + if (input.type !== 'file') { + // http://stackoverflow.com/a/2345915 + const val = input.value; + input.value = ''; + input.value = val; + } + }; + const toggleClass = (target, classList, condition) => { + if (!target || !classList) { + return; + } + + if (typeof classList === 'string') { + classList = classList.split(/\s+/).filter(Boolean); + } + + classList.forEach(className => { + if (target.forEach) { + target.forEach(elem => { + condition ? elem.classList.add(className) : elem.classList.remove(className); + }); + } else { + condition ? target.classList.add(className) : target.classList.remove(className); + } + }); + }; + const addClass = (target, classList) => { + toggleClass(target, classList, true); + }; + const removeClass = (target, classList) => { + toggleClass(target, classList, false); + }; + const getChildByClass = (elem, className) => { + for (let i = 0; i < elem.childNodes.length; i++) { + if (hasClass(elem.childNodes[i], className)) { + return elem.childNodes[i]; + } + } + }; + const applyNumericalStyle = (elem, property, value) => { + if (value === "".concat(parseInt(value))) { + value = parseInt(value); + } + + if (value || parseInt(value) === 0) { + elem.style[property] = typeof value === 'number' ? "".concat(value, "px") : value; + } else { + elem.style.removeProperty(property); + } + }; + const show = (elem, display = 'flex') => { + elem.style.display = display; + }; + const hide = elem => { + elem.style.display = 'none'; + }; + const setStyle = (parent, selector, property, value) => { + const el = parent.querySelector(selector); + + if (el) { + el.style[property] = value; + } + }; + const toggle = (elem, condition, display) => { + condition ? show(elem, display) : hide(elem); + }; // borrowed from jquery $(elem).is(':visible') implementation + + const isVisible = elem => !!(elem && (elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length)); + const allButtonsAreHidden = () => !isVisible(getConfirmButton()) && !isVisible(getDenyButton()) && !isVisible(getCancelButton()); + const isScrollable = elem => !!(elem.scrollHeight > elem.clientHeight); // borrowed from https://stackoverflow.com/a/46352119 + + const hasCssAnimation = elem => { + const style = window.getComputedStyle(elem); + const animDuration = parseFloat(style.getPropertyValue('animation-duration') || '0'); + const transDuration = parseFloat(style.getPropertyValue('transition-duration') || '0'); + return animDuration > 0 || transDuration > 0; + }; + const animateTimerProgressBar = (timer, reset = false) => { + const timerProgressBar = getTimerProgressBar(); + + if (isVisible(timerProgressBar)) { + if (reset) { + timerProgressBar.style.transition = 'none'; + timerProgressBar.style.width = '100%'; + } + + setTimeout(() => { + timerProgressBar.style.transition = "width ".concat(timer / 1000, "s linear"); + timerProgressBar.style.width = '0%'; + }, 10); + } + }; + const stopTimerProgressBar = () => { + const timerProgressBar = getTimerProgressBar(); + const timerProgressBarWidth = parseInt(window.getComputedStyle(timerProgressBar).width); + timerProgressBar.style.removeProperty('transition'); + timerProgressBar.style.width = '100%'; + const timerProgressBarFullWidth = parseInt(window.getComputedStyle(timerProgressBar).width); + const timerProgressBarPercent = parseInt(timerProgressBarWidth / timerProgressBarFullWidth * 100); + timerProgressBar.style.removeProperty('transition'); + timerProgressBar.style.width = "".concat(timerProgressBarPercent, "%"); + }; + + // Detect Node env + const isNodeEnv = () => typeof window === 'undefined' || typeof document === 'undefined'; + + const sweetHTML = "\n
                                      \n \n
                                        \n
                                        \n \n

                                        \n
                                        \n \n \n
                                        \n \n \n
                                        \n \n
                                        \n \n \n
                                        \n
                                        \n
                                        \n \n \n \n
                                        \n
                                        \n
                                        \n
                                        \n
                                        \n
                                        \n").replace(/(^|\n)\s*/g, ''); + + const resetOldContainer = () => { + const oldContainer = getContainer(); + + if (!oldContainer) { + return false; + } + + oldContainer.remove(); + removeClass([document.documentElement, document.body], [swalClasses['no-backdrop'], swalClasses['toast-shown'], swalClasses['has-column']]); + return true; + }; + + const resetValidationMessage = () => { + if (Swal.isVisible()) { + Swal.resetValidationMessage(); + } + }; + + const addInputChangeListeners = () => { + const popup = getPopup(); + const input = getChildByClass(popup, swalClasses.input); + const file = getChildByClass(popup, swalClasses.file); + const range = popup.querySelector(".".concat(swalClasses.range, " input")); + const rangeOutput = popup.querySelector(".".concat(swalClasses.range, " output")); + const select = getChildByClass(popup, swalClasses.select); + const checkbox = popup.querySelector(".".concat(swalClasses.checkbox, " input")); + const textarea = getChildByClass(popup, swalClasses.textarea); + input.oninput = resetValidationMessage; + file.onchange = resetValidationMessage; + select.onchange = resetValidationMessage; + checkbox.onchange = resetValidationMessage; + textarea.oninput = resetValidationMessage; + + range.oninput = () => { + resetValidationMessage(); + rangeOutput.value = range.value; + }; + + range.onchange = () => { + resetValidationMessage(); + range.nextSibling.value = range.value; + }; + }; + + const getTarget = target => typeof target === 'string' ? document.querySelector(target) : target; + + const setupAccessibility = params => { + const popup = getPopup(); + popup.setAttribute('role', params.toast ? 'alert' : 'dialog'); + popup.setAttribute('aria-live', params.toast ? 'polite' : 'assertive'); + + if (!params.toast) { + popup.setAttribute('aria-modal', 'true'); + } + }; + + const setupRTL = targetElement => { + if (window.getComputedStyle(targetElement).direction === 'rtl') { + addClass(getContainer(), swalClasses.rtl); + } + }; + /* + * Add modal + backdrop to DOM + */ + + + const init = params => { + // Clean up the old popup container if it exists + const oldContainerExisted = resetOldContainer(); + /* istanbul ignore if */ + + if (isNodeEnv()) { + error('SweetAlert2 requires document to initialize'); + return; + } + + const container = document.createElement('div'); + container.className = swalClasses.container; + + if (oldContainerExisted) { + addClass(container, swalClasses['no-transition']); + } + + setInnerHtml(container, sweetHTML); + const targetElement = getTarget(params.target); + targetElement.appendChild(container); + setupAccessibility(params); + setupRTL(targetElement); + addInputChangeListeners(); + }; + + const parseHtmlToContainer = (param, target) => { + // DOM element + if (param instanceof HTMLElement) { + target.appendChild(param); // Object + } else if (typeof param === 'object') { + handleObject(param, target); // Plain string + } else if (param) { + setInnerHtml(target, param); + } + }; + + const handleObject = (param, target) => { + // JQuery element(s) + if (param.jquery) { + handleJqueryElem(target, param); // For other objects use their string representation + } else { + setInnerHtml(target, param.toString()); + } + }; + + const handleJqueryElem = (target, elem) => { + target.textContent = ''; + + if (0 in elem) { + for (let i = 0; (i in elem); i++) { + target.appendChild(elem[i].cloneNode(true)); + } + } else { + target.appendChild(elem.cloneNode(true)); + } + }; + + const animationEndEvent = (() => { + // Prevent run in Node env + + /* istanbul ignore if */ + if (isNodeEnv()) { + return false; + } + + const testEl = document.createElement('div'); + const transEndEventNames = { + WebkitAnimation: 'webkitAnimationEnd', + OAnimation: 'oAnimationEnd oanimationend', + animation: 'animationend' + }; + + for (const i in transEndEventNames) { + if (Object.prototype.hasOwnProperty.call(transEndEventNames, i) && typeof testEl.style[i] !== 'undefined') { + return transEndEventNames[i]; + } + } + + return false; + })(); + + // https://github.com/twbs/bootstrap/blob/master/js/src/modal.js + + const measureScrollbar = () => { + const scrollDiv = document.createElement('div'); + scrollDiv.className = swalClasses['scrollbar-measure']; + document.body.appendChild(scrollDiv); + const scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth; + document.body.removeChild(scrollDiv); + return scrollbarWidth; + }; + + const renderActions = (instance, params) => { + const actions = getActions(); + const loader = getLoader(); + const confirmButton = getConfirmButton(); + const denyButton = getDenyButton(); + const cancelButton = getCancelButton(); // Actions (buttons) wrapper + + if (!params.showConfirmButton && !params.showDenyButton && !params.showCancelButton) { + hide(actions); + } else { + show(actions); + } // Custom class + + + applyCustomClass(actions, params, 'actions'); // Render buttons + + renderButton(confirmButton, 'confirm', params); + renderButton(denyButton, 'deny', params); + renderButton(cancelButton, 'cancel', params); + handleButtonsStyling(confirmButton, denyButton, cancelButton, params); + + if (params.reverseButtons) { + actions.insertBefore(cancelButton, loader); + actions.insertBefore(denyButton, loader); + actions.insertBefore(confirmButton, loader); + } // Loader + + + setInnerHtml(loader, params.loaderHtml); + applyCustomClass(loader, params, 'loader'); + }; + + function handleButtonsStyling(confirmButton, denyButton, cancelButton, params) { + if (!params.buttonsStyling) { + return removeClass([confirmButton, denyButton, cancelButton], swalClasses.styled); + } + + addClass([confirmButton, denyButton, cancelButton], swalClasses.styled); // Buttons background colors + + if (params.confirmButtonColor) { + confirmButton.style.backgroundColor = params.confirmButtonColor; + addClass(confirmButton, swalClasses['default-outline']); + } + + if (params.denyButtonColor) { + denyButton.style.backgroundColor = params.denyButtonColor; + addClass(denyButton, swalClasses['default-outline']); + } + + if (params.cancelButtonColor) { + cancelButton.style.backgroundColor = params.cancelButtonColor; + addClass(cancelButton, swalClasses['default-outline']); + } + } + + function renderButton(button, buttonType, params) { + toggle(button, params["show".concat(capitalizeFirstLetter(buttonType), "Button")], 'inline-block'); + setInnerHtml(button, params["".concat(buttonType, "ButtonText")]); // Set caption text + + button.setAttribute('aria-label', params["".concat(buttonType, "ButtonAriaLabel")]); // ARIA label + // Add buttons custom classes + + button.className = swalClasses[buttonType]; + applyCustomClass(button, params, "".concat(buttonType, "Button")); + addClass(button, params["".concat(buttonType, "ButtonClass")]); + } + + function handleBackdropParam(container, backdrop) { + if (typeof backdrop === 'string') { + container.style.background = backdrop; + } else if (!backdrop) { + addClass([document.documentElement, document.body], swalClasses['no-backdrop']); + } + } + + function handlePositionParam(container, position) { + if (position in swalClasses) { + addClass(container, swalClasses[position]); + } else { + warn('The "position" parameter is not valid, defaulting to "center"'); + addClass(container, swalClasses.center); + } + } + + function handleGrowParam(container, grow) { + if (grow && typeof grow === 'string') { + const growClass = "grow-".concat(grow); + + if (growClass in swalClasses) { + addClass(container, swalClasses[growClass]); + } + } + } + + const renderContainer = (instance, params) => { + const container = getContainer(); + + if (!container) { + return; + } + + handleBackdropParam(container, params.backdrop); + handlePositionParam(container, params.position); + handleGrowParam(container, params.grow); // Custom class + + applyCustomClass(container, params, 'container'); + }; + + /** + * This module containts `WeakMap`s for each effectively-"private property" that a `Swal` has. + * For example, to set the private property "foo" of `this` to "bar", you can `privateProps.foo.set(this, 'bar')` + * This is the approach that Babel will probably take to implement private methods/fields + * https://github.com/tc39/proposal-private-methods + * https://github.com/babel/babel/pull/7555 + * Once we have the changes from that PR in Babel, and our core class fits reasonable in *one module* + * then we can use that language feature. + */ + var privateProps = { + promise: new WeakMap(), + innerParams: new WeakMap(), + domCache: new WeakMap() + }; + + const inputTypes = ['input', 'file', 'range', 'select', 'radio', 'checkbox', 'textarea']; + const renderInput = (instance, params) => { + const popup = getPopup(); + const innerParams = privateProps.innerParams.get(instance); + const rerender = !innerParams || params.input !== innerParams.input; + inputTypes.forEach(inputType => { + const inputClass = swalClasses[inputType]; + const inputContainer = getChildByClass(popup, inputClass); // set attributes + + setAttributes(inputType, params.inputAttributes); // set class + + inputContainer.className = inputClass; + + if (rerender) { + hide(inputContainer); + } + }); + + if (params.input) { + if (rerender) { + showInput(params); + } // set custom class + + + setCustomClass(params); + } + }; + + const showInput = params => { + if (!renderInputType[params.input]) { + return error("Unexpected type of input! Expected \"text\", \"email\", \"password\", \"number\", \"tel\", \"select\", \"radio\", \"checkbox\", \"textarea\", \"file\" or \"url\", got \"".concat(params.input, "\"")); + } + + const inputContainer = getInputContainer(params.input); + const input = renderInputType[params.input](inputContainer, params); + show(input); // input autofocus + + setTimeout(() => { + focusInput(input); + }); + }; + + const removeAttributes = input => { + for (let i = 0; i < input.attributes.length; i++) { + const attrName = input.attributes[i].name; + + if (!['type', 'value', 'style'].includes(attrName)) { + input.removeAttribute(attrName); + } + } + }; + + const setAttributes = (inputType, inputAttributes) => { + const input = getInput(getPopup(), inputType); + + if (!input) { + return; + } + + removeAttributes(input); + + for (const attr in inputAttributes) { + input.setAttribute(attr, inputAttributes[attr]); + } + }; + + const setCustomClass = params => { + const inputContainer = getInputContainer(params.input); + + if (params.customClass) { + addClass(inputContainer, params.customClass.input); + } + }; + + const setInputPlaceholder = (input, params) => { + if (!input.placeholder || params.inputPlaceholder) { + input.placeholder = params.inputPlaceholder; + } + }; + + const setInputLabel = (input, prependTo, params) => { + if (params.inputLabel) { + input.id = swalClasses.input; + const label = document.createElement('label'); + const labelClass = swalClasses['input-label']; + label.setAttribute('for', input.id); + label.className = labelClass; + addClass(label, params.customClass.inputLabel); + label.innerText = params.inputLabel; + prependTo.insertAdjacentElement('beforebegin', label); + } + }; + + const getInputContainer = inputType => { + const inputClass = swalClasses[inputType] ? swalClasses[inputType] : swalClasses.input; + return getChildByClass(getPopup(), inputClass); + }; + + const renderInputType = {}; + + renderInputType.text = renderInputType.email = renderInputType.password = renderInputType.number = renderInputType.tel = renderInputType.url = (input, params) => { + if (typeof params.inputValue === 'string' || typeof params.inputValue === 'number') { + input.value = params.inputValue; + } else if (!isPromise(params.inputValue)) { + warn("Unexpected type of inputValue! Expected \"string\", \"number\" or \"Promise\", got \"".concat(typeof params.inputValue, "\"")); + } + + setInputLabel(input, input, params); + setInputPlaceholder(input, params); + input.type = params.input; + return input; + }; + + renderInputType.file = (input, params) => { + setInputLabel(input, input, params); + setInputPlaceholder(input, params); + return input; + }; + + renderInputType.range = (range, params) => { + const rangeInput = range.querySelector('input'); + const rangeOutput = range.querySelector('output'); + rangeInput.value = params.inputValue; + rangeInput.type = params.input; + rangeOutput.value = params.inputValue; + setInputLabel(rangeInput, range, params); + return range; + }; + + renderInputType.select = (select, params) => { + select.textContent = ''; + + if (params.inputPlaceholder) { + const placeholder = document.createElement('option'); + setInnerHtml(placeholder, params.inputPlaceholder); + placeholder.value = ''; + placeholder.disabled = true; + placeholder.selected = true; + select.appendChild(placeholder); + } + + setInputLabel(select, select, params); + return select; + }; + + renderInputType.radio = radio => { + radio.textContent = ''; + return radio; + }; + + renderInputType.checkbox = (checkboxContainer, params) => { + const checkbox = getInput(getPopup(), 'checkbox'); + checkbox.value = 1; + checkbox.id = swalClasses.checkbox; + checkbox.checked = Boolean(params.inputValue); + const label = checkboxContainer.querySelector('span'); + setInnerHtml(label, params.inputPlaceholder); + return checkboxContainer; + }; + + renderInputType.textarea = (textarea, params) => { + textarea.value = params.inputValue; + setInputPlaceholder(textarea, params); + setInputLabel(textarea, textarea, params); + + const getMargin = el => parseInt(window.getComputedStyle(el).marginLeft) + parseInt(window.getComputedStyle(el).marginRight); + + setTimeout(() => { + // #2291 + if ('MutationObserver' in window) { + // #1699 + const initialPopupWidth = parseInt(window.getComputedStyle(getPopup()).width); + + const textareaResizeHandler = () => { + const textareaWidth = textarea.offsetWidth + getMargin(textarea); + + if (textareaWidth > initialPopupWidth) { + getPopup().style.width = "".concat(textareaWidth, "px"); + } else { + getPopup().style.width = null; + } + }; + + new MutationObserver(textareaResizeHandler).observe(textarea, { + attributes: true, + attributeFilter: ['style'] + }); + } + }); + return textarea; + }; + + const renderContent = (instance, params) => { + const htmlContainer = getHtmlContainer(); + applyCustomClass(htmlContainer, params, 'htmlContainer'); // Content as HTML + + if (params.html) { + parseHtmlToContainer(params.html, htmlContainer); + show(htmlContainer, 'block'); // Content as plain text + } else if (params.text) { + htmlContainer.textContent = params.text; + show(htmlContainer, 'block'); // No content + } else { + hide(htmlContainer); + } + + renderInput(instance, params); + }; + + const renderFooter = (instance, params) => { + const footer = getFooter(); + toggle(footer, params.footer); + + if (params.footer) { + parseHtmlToContainer(params.footer, footer); + } // Custom class + + + applyCustomClass(footer, params, 'footer'); + }; + + const renderCloseButton = (instance, params) => { + const closeButton = getCloseButton(); + setInnerHtml(closeButton, params.closeButtonHtml); // Custom class + + applyCustomClass(closeButton, params, 'closeButton'); + toggle(closeButton, params.showCloseButton); + closeButton.setAttribute('aria-label', params.closeButtonAriaLabel); + }; + + const renderIcon = (instance, params) => { + const innerParams = privateProps.innerParams.get(instance); + const icon = getIcon(); // if the given icon already rendered, apply the styling without re-rendering the icon + + if (innerParams && params.icon === innerParams.icon) { + // Custom or default content + setContent(icon, params); + applyStyles(icon, params); + return; + } + + if (!params.icon && !params.iconHtml) { + return hide(icon); + } + + if (params.icon && Object.keys(iconTypes).indexOf(params.icon) === -1) { + error("Unknown icon! Expected \"success\", \"error\", \"warning\", \"info\" or \"question\", got \"".concat(params.icon, "\"")); + return hide(icon); + } + + show(icon); // Custom or default content + + setContent(icon, params); + applyStyles(icon, params); // Animate icon + + addClass(icon, params.showClass.icon); + }; + + const applyStyles = (icon, params) => { + for (const iconType in iconTypes) { + if (params.icon !== iconType) { + removeClass(icon, iconTypes[iconType]); + } + } + + addClass(icon, iconTypes[params.icon]); // Icon color + + setColor(icon, params); // Success icon background color + + adjustSuccessIconBackgoundColor(); // Custom class + + applyCustomClass(icon, params, 'icon'); + }; // Adjust success icon background color to match the popup background color + + + const adjustSuccessIconBackgoundColor = () => { + const popup = getPopup(); + const popupBackgroundColor = window.getComputedStyle(popup).getPropertyValue('background-color'); + const successIconParts = popup.querySelectorAll('[class^=swal2-success-circular-line], .swal2-success-fix'); + + for (let i = 0; i < successIconParts.length; i++) { + successIconParts[i].style.backgroundColor = popupBackgroundColor; + } + }; + + const setContent = (icon, params) => { + icon.textContent = ''; + + if (params.iconHtml) { + setInnerHtml(icon, iconContent(params.iconHtml)); + } else if (params.icon === 'success') { + setInnerHtml(icon, "\n
                                        \n \n
                                        \n
                                        \n "); + } else if (params.icon === 'error') { + setInnerHtml(icon, "\n \n \n \n \n "); + } else { + const defaultIconHtml = { + question: '?', + warning: '!', + info: 'i' + }; + setInnerHtml(icon, iconContent(defaultIconHtml[params.icon])); + } + }; + + const setColor = (icon, params) => { + if (!params.iconColor) { + return; + } + + icon.style.color = params.iconColor; + icon.style.borderColor = params.iconColor; + + for (const sel of ['.swal2-success-line-tip', '.swal2-success-line-long', '.swal2-x-mark-line-left', '.swal2-x-mark-line-right']) { + setStyle(icon, sel, 'backgroundColor', params.iconColor); + } + + setStyle(icon, '.swal2-success-ring', 'borderColor', params.iconColor); + }; + + const iconContent = content => "
                                        ").concat(content, "
                                        "); + + const renderImage = (instance, params) => { + const image = getImage(); + + if (!params.imageUrl) { + return hide(image); + } + + show(image, ''); // Src, alt + + image.setAttribute('src', params.imageUrl); + image.setAttribute('alt', params.imageAlt); // Width, height + + applyNumericalStyle(image, 'width', params.imageWidth); + applyNumericalStyle(image, 'height', params.imageHeight); // Class + + image.className = swalClasses.image; + applyCustomClass(image, params, 'image'); + }; + + const createStepElement = step => { + const stepEl = document.createElement('li'); + addClass(stepEl, swalClasses['progress-step']); + setInnerHtml(stepEl, step); + return stepEl; + }; + + const createLineElement = params => { + const lineEl = document.createElement('li'); + addClass(lineEl, swalClasses['progress-step-line']); + + if (params.progressStepsDistance) { + lineEl.style.width = params.progressStepsDistance; + } + + return lineEl; + }; + + const renderProgressSteps = (instance, params) => { + const progressStepsContainer = getProgressSteps(); + + if (!params.progressSteps || params.progressSteps.length === 0) { + return hide(progressStepsContainer); + } + + show(progressStepsContainer); + progressStepsContainer.textContent = ''; + + if (params.currentProgressStep >= params.progressSteps.length) { + warn('Invalid currentProgressStep parameter, it should be less than progressSteps.length ' + '(currentProgressStep like JS arrays starts from 0)'); + } + + params.progressSteps.forEach((step, index) => { + const stepEl = createStepElement(step); + progressStepsContainer.appendChild(stepEl); + + if (index === params.currentProgressStep) { + addClass(stepEl, swalClasses['active-progress-step']); + } + + if (index !== params.progressSteps.length - 1) { + const lineEl = createLineElement(params); + progressStepsContainer.appendChild(lineEl); + } + }); + }; + + const renderTitle = (instance, params) => { + const title = getTitle(); + toggle(title, params.title || params.titleText, 'block'); + + if (params.title) { + parseHtmlToContainer(params.title, title); + } + + if (params.titleText) { + title.innerText = params.titleText; + } // Custom class + + + applyCustomClass(title, params, 'title'); + }; + + const renderPopup = (instance, params) => { + const container = getContainer(); + const popup = getPopup(); // Width + + if (params.toast) { + // #2170 + applyNumericalStyle(container, 'width', params.width); + popup.style.width = '100%'; + popup.insertBefore(getLoader(), getIcon()); + } else { + applyNumericalStyle(popup, 'width', params.width); + } // Padding + + + applyNumericalStyle(popup, 'padding', params.padding); // Background + + if (params.background) { + popup.style.background = params.background; + } + + hide(getValidationMessage()); // Classes + + addClasses(popup, params); + }; + + const addClasses = (popup, params) => { + // Default Class + showClass when updating Swal.update({}) + popup.className = "".concat(swalClasses.popup, " ").concat(isVisible(popup) ? params.showClass.popup : ''); + + if (params.toast) { + addClass([document.documentElement, document.body], swalClasses['toast-shown']); + addClass(popup, swalClasses.toast); + } else { + addClass(popup, swalClasses.modal); + } // Custom class + + + applyCustomClass(popup, params, 'popup'); + + if (typeof params.customClass === 'string') { + addClass(popup, params.customClass); + } // Icon class (#1842) + + + if (params.icon) { + addClass(popup, swalClasses["icon-".concat(params.icon)]); + } + }; + + const render = (instance, params) => { + renderPopup(instance, params); + renderContainer(instance, params); + renderProgressSteps(instance, params); + renderIcon(instance, params); + renderImage(instance, params); + renderTitle(instance, params); + renderCloseButton(instance, params); + renderContent(instance, params); + renderActions(instance, params); + renderFooter(instance, params); + + if (typeof params.didRender === 'function') { + params.didRender(getPopup()); + } + }; + + /* + * Global function to determine if SweetAlert2 popup is shown + */ + + const isVisible$1 = () => { + return isVisible(getPopup()); + }; + /* + * Global function to click 'Confirm' button + */ + + const clickConfirm = () => getConfirmButton() && getConfirmButton().click(); + /* + * Global function to click 'Deny' button + */ + + const clickDeny = () => getDenyButton() && getDenyButton().click(); + /* + * Global function to click 'Cancel' button + */ + + const clickCancel = () => getCancelButton() && getCancelButton().click(); + + function fire(...args) { + const Swal = this; + return new Swal(...args); + } + + /** + * Returns an extended version of `Swal` containing `params` as defaults. + * Useful for reusing Swal configuration. + * + * For example: + * + * Before: + * const textPromptOptions = { input: 'text', showCancelButton: true } + * const {value: firstName} = await Swal.fire({ ...textPromptOptions, title: 'What is your first name?' }) + * const {value: lastName} = await Swal.fire({ ...textPromptOptions, title: 'What is your last name?' }) + * + * After: + * const TextPrompt = Swal.mixin({ input: 'text', showCancelButton: true }) + * const {value: firstName} = await TextPrompt('What is your first name?') + * const {value: lastName} = await TextPrompt('What is your last name?') + * + * @param mixinParams + */ + function mixin(mixinParams) { + class MixinSwal extends this { + _main(params, priorityMixinParams) { + return super._main(params, Object.assign({}, mixinParams, priorityMixinParams)); + } + + } + + return MixinSwal; + } + + /** + * Shows loader (spinner), this is useful with AJAX requests. + * By default the loader be shown instead of the "Confirm" button. + */ + + const showLoading = buttonToReplace => { + let popup = getPopup(); + + if (!popup) { + Swal.fire(); + } + + popup = getPopup(); + const loader = getLoader(); + + if (isToast()) { + hide(getIcon()); + } else { + replaceButton(popup, buttonToReplace); + } + + show(loader); + popup.setAttribute('data-loading', true); + popup.setAttribute('aria-busy', true); + popup.focus(); + }; + + const replaceButton = (popup, buttonToReplace) => { + const actions = getActions(); + const loader = getLoader(); + + if (!buttonToReplace && isVisible(getConfirmButton())) { + buttonToReplace = getConfirmButton(); + } + + show(actions); + + if (buttonToReplace) { + hide(buttonToReplace); + loader.setAttribute('data-button-to-replace', buttonToReplace.className); + } + + loader.parentNode.insertBefore(loader, buttonToReplace); + addClass([popup, actions], swalClasses.loading); + }; + + const RESTORE_FOCUS_TIMEOUT = 100; + + const globalState = {}; + + const focusPreviousActiveElement = () => { + if (globalState.previousActiveElement && globalState.previousActiveElement.focus) { + globalState.previousActiveElement.focus(); + globalState.previousActiveElement = null; + } else if (document.body) { + document.body.focus(); + } + }; // Restore previous active (focused) element + + + const restoreActiveElement = returnFocus => { + return new Promise(resolve => { + if (!returnFocus) { + return resolve(); + } + + const x = window.scrollX; + const y = window.scrollY; + globalState.restoreFocusTimeout = setTimeout(() => { + focusPreviousActiveElement(); + resolve(); + }, RESTORE_FOCUS_TIMEOUT); // issues/900 + + window.scrollTo(x, y); + }); + }; + + /** + * If `timer` parameter is set, returns number of milliseconds of timer remained. + * Otherwise, returns undefined. + */ + + const getTimerLeft = () => { + return globalState.timeout && globalState.timeout.getTimerLeft(); + }; + /** + * Stop timer. Returns number of milliseconds of timer remained. + * If `timer` parameter isn't set, returns undefined. + */ + + const stopTimer = () => { + if (globalState.timeout) { + stopTimerProgressBar(); + return globalState.timeout.stop(); + } + }; + /** + * Resume timer. Returns number of milliseconds of timer remained. + * If `timer` parameter isn't set, returns undefined. + */ + + const resumeTimer = () => { + if (globalState.timeout) { + const remaining = globalState.timeout.start(); + animateTimerProgressBar(remaining); + return remaining; + } + }; + /** + * Resume timer. Returns number of milliseconds of timer remained. + * If `timer` parameter isn't set, returns undefined. + */ + + const toggleTimer = () => { + const timer = globalState.timeout; + return timer && (timer.running ? stopTimer() : resumeTimer()); + }; + /** + * Increase timer. Returns number of milliseconds of an updated timer. + * If `timer` parameter isn't set, returns undefined. + */ + + const increaseTimer = n => { + if (globalState.timeout) { + const remaining = globalState.timeout.increase(n); + animateTimerProgressBar(remaining, true); + return remaining; + } + }; + /** + * Check if timer is running. Returns true if timer is running + * or false if timer is paused or stopped. + * If `timer` parameter isn't set, returns undefined + */ + + const isTimerRunning = () => { + return globalState.timeout && globalState.timeout.isRunning(); + }; + + let bodyClickListenerAdded = false; + const clickHandlers = {}; + function bindClickHandler(attr = 'data-swal-template') { + clickHandlers[attr] = this; + + if (!bodyClickListenerAdded) { + document.body.addEventListener('click', bodyClickListener); + bodyClickListenerAdded = true; + } + } + + const bodyClickListener = event => { + // TODO: replace with event.composedPath() + for (let el = event.target; el && el !== document; el = el.parentNode) { + for (const attr in clickHandlers) { + const template = el.getAttribute(attr); + + if (template) { + clickHandlers[attr].fire({ + template + }); + return; + } + } + } + }; + + const defaultParams = { + title: '', + titleText: '', + text: '', + html: '', + footer: '', + icon: undefined, + iconColor: undefined, + iconHtml: undefined, + template: undefined, + toast: false, + showClass: { + popup: 'swal2-show', + backdrop: 'swal2-backdrop-show', + icon: 'swal2-icon-show' + }, + hideClass: { + popup: 'swal2-hide', + backdrop: 'swal2-backdrop-hide', + icon: 'swal2-icon-hide' + }, + customClass: {}, + target: 'body', + backdrop: true, + heightAuto: true, + allowOutsideClick: true, + allowEscapeKey: true, + allowEnterKey: true, + stopKeydownPropagation: true, + keydownListenerCapture: false, + showConfirmButton: true, + showDenyButton: false, + showCancelButton: false, + preConfirm: undefined, + preDeny: undefined, + confirmButtonText: 'OK', + confirmButtonAriaLabel: '', + confirmButtonColor: undefined, + denyButtonText: 'No', + denyButtonAriaLabel: '', + denyButtonColor: undefined, + cancelButtonText: 'Cancel', + cancelButtonAriaLabel: '', + cancelButtonColor: undefined, + buttonsStyling: true, + reverseButtons: false, + focusConfirm: true, + focusDeny: false, + focusCancel: false, + returnFocus: true, + showCloseButton: false, + closeButtonHtml: '×', + closeButtonAriaLabel: 'Close this dialog', + loaderHtml: '', + showLoaderOnConfirm: false, + showLoaderOnDeny: false, + imageUrl: undefined, + imageWidth: undefined, + imageHeight: undefined, + imageAlt: '', + timer: undefined, + timerProgressBar: false, + width: undefined, + padding: undefined, + background: undefined, + input: undefined, + inputPlaceholder: '', + inputLabel: '', + inputValue: '', + inputOptions: {}, + inputAutoTrim: true, + inputAttributes: {}, + inputValidator: undefined, + returnInputValueOnDeny: false, + validationMessage: undefined, + grow: false, + position: 'center', + progressSteps: [], + currentProgressStep: undefined, + progressStepsDistance: undefined, + willOpen: undefined, + didOpen: undefined, + didRender: undefined, + willClose: undefined, + didClose: undefined, + didDestroy: undefined, + scrollbarPadding: true + }; + const updatableParams = ['allowEscapeKey', 'allowOutsideClick', 'background', 'buttonsStyling', 'cancelButtonAriaLabel', 'cancelButtonColor', 'cancelButtonText', 'closeButtonAriaLabel', 'closeButtonHtml', 'confirmButtonAriaLabel', 'confirmButtonColor', 'confirmButtonText', 'currentProgressStep', 'customClass', 'denyButtonAriaLabel', 'denyButtonColor', 'denyButtonText', 'didClose', 'didDestroy', 'footer', 'hideClass', 'html', 'icon', 'iconColor', 'iconHtml', 'imageAlt', 'imageHeight', 'imageUrl', 'imageWidth', 'preConfirm', 'preDeny', 'progressSteps', 'returnFocus', 'reverseButtons', 'showCancelButton', 'showCloseButton', 'showConfirmButton', 'showDenyButton', 'text', 'title', 'titleText', 'willClose']; + const deprecatedParams = {}; + const toastIncompatibleParams = ['allowOutsideClick', 'allowEnterKey', 'backdrop', 'focusConfirm', 'focusDeny', 'focusCancel', 'returnFocus', 'heightAuto', 'keydownListenerCapture']; + /** + * Is valid parameter + * @param {String} paramName + */ + + const isValidParameter = paramName => { + return Object.prototype.hasOwnProperty.call(defaultParams, paramName); + }; + /** + * Is valid parameter for Swal.update() method + * @param {String} paramName + */ + + const isUpdatableParameter = paramName => { + return updatableParams.indexOf(paramName) !== -1; + }; + /** + * Is deprecated parameter + * @param {String} paramName + */ + + const isDeprecatedParameter = paramName => { + return deprecatedParams[paramName]; + }; + + const checkIfParamIsValid = param => { + if (!isValidParameter(param)) { + warn("Unknown parameter \"".concat(param, "\"")); + } + }; + + const checkIfToastParamIsValid = param => { + if (toastIncompatibleParams.includes(param)) { + warn("The parameter \"".concat(param, "\" is incompatible with toasts")); + } + }; + + const checkIfParamIsDeprecated = param => { + if (isDeprecatedParameter(param)) { + warnAboutDeprecation(param, isDeprecatedParameter(param)); + } + }; + /** + * Show relevant warnings for given params + * + * @param params + */ + + + const showWarningsForParams = params => { + if (!params.backdrop && params.allowOutsideClick) { + warn('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`'); + } + + for (const param in params) { + checkIfParamIsValid(param); + + if (params.toast) { + checkIfToastParamIsValid(param); + } + + checkIfParamIsDeprecated(param); + } + }; + + + + var staticMethods = /*#__PURE__*/Object.freeze({ + isValidParameter: isValidParameter, + isUpdatableParameter: isUpdatableParameter, + isDeprecatedParameter: isDeprecatedParameter, + argsToParams: argsToParams, + isVisible: isVisible$1, + clickConfirm: clickConfirm, + clickDeny: clickDeny, + clickCancel: clickCancel, + getContainer: getContainer, + getPopup: getPopup, + getTitle: getTitle, + getHtmlContainer: getHtmlContainer, + getImage: getImage, + getIcon: getIcon, + getInputLabel: getInputLabel, + getCloseButton: getCloseButton, + getActions: getActions, + getConfirmButton: getConfirmButton, + getDenyButton: getDenyButton, + getCancelButton: getCancelButton, + getLoader: getLoader, + getFooter: getFooter, + getTimerProgressBar: getTimerProgressBar, + getFocusableElements: getFocusableElements, + getValidationMessage: getValidationMessage, + isLoading: isLoading, + fire: fire, + mixin: mixin, + showLoading: showLoading, + enableLoading: showLoading, + getTimerLeft: getTimerLeft, + stopTimer: stopTimer, + resumeTimer: resumeTimer, + toggleTimer: toggleTimer, + increaseTimer: increaseTimer, + isTimerRunning: isTimerRunning, + bindClickHandler: bindClickHandler + }); + + /** + * Hides loader and shows back the button which was hidden by .showLoading() + */ + + function hideLoading() { + // do nothing if popup is closed + const innerParams = privateProps.innerParams.get(this); + + if (!innerParams) { + return; + } + + const domCache = privateProps.domCache.get(this); + hide(domCache.loader); + + if (isToast()) { + if (innerParams.icon) { + show(getIcon()); + } + } else { + showRelatedButton(domCache); + } + + removeClass([domCache.popup, domCache.actions], swalClasses.loading); + domCache.popup.removeAttribute('aria-busy'); + domCache.popup.removeAttribute('data-loading'); + domCache.confirmButton.disabled = false; + domCache.denyButton.disabled = false; + domCache.cancelButton.disabled = false; + } + + const showRelatedButton = domCache => { + const buttonToReplace = domCache.popup.getElementsByClassName(domCache.loader.getAttribute('data-button-to-replace')); + + if (buttonToReplace.length) { + show(buttonToReplace[0], 'inline-block'); + } else if (allButtonsAreHidden()) { + hide(domCache.actions); + } + }; + + function getInput$1(instance) { + const innerParams = privateProps.innerParams.get(instance || this); + const domCache = privateProps.domCache.get(instance || this); + + if (!domCache) { + return null; + } + + return getInput(domCache.popup, innerParams.input); + } + + const fixScrollbar = () => { + // for queues, do not do this more than once + if (states.previousBodyPadding !== null) { + return; + } // if the body has overflow + + + if (document.body.scrollHeight > window.innerHeight) { + // add padding so the content doesn't shift after removal of scrollbar + states.previousBodyPadding = parseInt(window.getComputedStyle(document.body).getPropertyValue('padding-right')); + document.body.style.paddingRight = "".concat(states.previousBodyPadding + measureScrollbar(), "px"); + } + }; + const undoScrollbar = () => { + if (states.previousBodyPadding !== null) { + document.body.style.paddingRight = "".concat(states.previousBodyPadding, "px"); + states.previousBodyPadding = null; + } + }; + + /* istanbul ignore file */ + + const iOSfix = () => { + const iOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream || navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1; + + if (iOS && !hasClass(document.body, swalClasses.iosfix)) { + const offset = document.body.scrollTop; + document.body.style.top = "".concat(offset * -1, "px"); + addClass(document.body, swalClasses.iosfix); + lockBodyScroll(); + addBottomPaddingForTallPopups(); // #1948 + } + }; + + const addBottomPaddingForTallPopups = () => { + const safari = !navigator.userAgent.match(/(CriOS|FxiOS|EdgiOS|YaBrowser|UCBrowser)/i); + + if (safari) { + const bottomPanelHeight = 44; + + if (getPopup().scrollHeight > window.innerHeight - bottomPanelHeight) { + getContainer().style.paddingBottom = "".concat(bottomPanelHeight, "px"); + } + } + }; + + const lockBodyScroll = () => { + // #1246 + const container = getContainer(); + let preventTouchMove; + + container.ontouchstart = e => { + preventTouchMove = shouldPreventTouchMove(e); + }; + + container.ontouchmove = e => { + if (preventTouchMove) { + e.preventDefault(); + e.stopPropagation(); + } + }; + }; + + const shouldPreventTouchMove = event => { + const target = event.target; + const container = getContainer(); + + if (isStylys(event) || isZoom(event)) { + return false; + } + + if (target === container) { + return true; + } + + if (!isScrollable(container) && target.tagName !== 'INPUT' && // #1603 + target.tagName !== 'TEXTAREA' && // #2266 + !(isScrollable(getHtmlContainer()) && // #1944 + getHtmlContainer().contains(target))) { + return true; + } + + return false; + }; + + const isStylys = event => { + // #1786 + return event.touches && event.touches.length && event.touches[0].touchType === 'stylus'; + }; + + const isZoom = event => { + // #1891 + return event.touches && event.touches.length > 1; + }; + + const undoIOSfix = () => { + if (hasClass(document.body, swalClasses.iosfix)) { + const offset = parseInt(document.body.style.top, 10); + removeClass(document.body, swalClasses.iosfix); + document.body.style.top = ''; + document.body.scrollTop = offset * -1; + } + }; + + // Adding aria-hidden="true" to elements outside of the active modal dialog ensures that + // elements not within the active modal dialog will not be surfaced if a user opens a screen + // reader’s list of elements (headings, form controls, landmarks, etc.) in the document. + + const setAriaHidden = () => { + const bodyChildren = toArray(document.body.children); + bodyChildren.forEach(el => { + if (el === getContainer() || el.contains(getContainer())) { + return; + } + + if (el.hasAttribute('aria-hidden')) { + el.setAttribute('data-previous-aria-hidden', el.getAttribute('aria-hidden')); + } + + el.setAttribute('aria-hidden', 'true'); + }); + }; + const unsetAriaHidden = () => { + const bodyChildren = toArray(document.body.children); + bodyChildren.forEach(el => { + if (el.hasAttribute('data-previous-aria-hidden')) { + el.setAttribute('aria-hidden', el.getAttribute('data-previous-aria-hidden')); + el.removeAttribute('data-previous-aria-hidden'); + } else { + el.removeAttribute('aria-hidden'); + } + }); + }; + + /** + * This module containts `WeakMap`s for each effectively-"private property" that a `Swal` has. + * For example, to set the private property "foo" of `this` to "bar", you can `privateProps.foo.set(this, 'bar')` + * This is the approach that Babel will probably take to implement private methods/fields + * https://github.com/tc39/proposal-private-methods + * https://github.com/babel/babel/pull/7555 + * Once we have the changes from that PR in Babel, and our core class fits reasonable in *one module* + * then we can use that language feature. + */ + var privateMethods = { + swalPromiseResolve: new WeakMap() + }; + + /* + * Instance method to close sweetAlert + */ + + function removePopupAndResetState(instance, container, returnFocus, didClose) { + if (isToast()) { + triggerDidCloseAndDispose(instance, didClose); + } else { + restoreActiveElement(returnFocus).then(() => triggerDidCloseAndDispose(instance, didClose)); + globalState.keydownTarget.removeEventListener('keydown', globalState.keydownHandler, { + capture: globalState.keydownListenerCapture + }); + globalState.keydownHandlerAdded = false; + } + + const isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent); // workaround for #2088 + // for some reason removing the container in Safari will scroll the document to bottom + + if (isSafari) { + container.setAttribute('style', 'display:none !important'); + container.removeAttribute('class'); + container.innerHTML = ''; + } else { + container.remove(); + } + + if (isModal()) { + undoScrollbar(); + undoIOSfix(); + unsetAriaHidden(); + } + + removeBodyClasses(); + } + + function removeBodyClasses() { + removeClass([document.documentElement, document.body], [swalClasses.shown, swalClasses['height-auto'], swalClasses['no-backdrop'], swalClasses['toast-shown']]); + } + + function close(resolveValue) { + const popup = getPopup(); + + if (!popup) { + return; + } + + resolveValue = prepareResolveValue(resolveValue); + const innerParams = privateProps.innerParams.get(this); + + if (!innerParams || hasClass(popup, innerParams.hideClass.popup)) { + return; + } + + const swalPromiseResolve = privateMethods.swalPromiseResolve.get(this); + removeClass(popup, innerParams.showClass.popup); + addClass(popup, innerParams.hideClass.popup); + const backdrop = getContainer(); + removeClass(backdrop, innerParams.showClass.backdrop); + addClass(backdrop, innerParams.hideClass.backdrop); + handlePopupAnimation(this, popup, innerParams); // Resolve Swal promise + + swalPromiseResolve(resolveValue); + } + + const prepareResolveValue = resolveValue => { + // When user calls Swal.close() + if (typeof resolveValue === 'undefined') { + return { + isConfirmed: false, + isDenied: false, + isDismissed: true + }; + } + + return Object.assign({ + isConfirmed: false, + isDenied: false, + isDismissed: false + }, resolveValue); + }; + + const handlePopupAnimation = (instance, popup, innerParams) => { + const container = getContainer(); // If animation is supported, animate + + const animationIsSupported = animationEndEvent && hasCssAnimation(popup); + + if (typeof innerParams.willClose === 'function') { + innerParams.willClose(popup); + } + + if (animationIsSupported) { + animatePopup(instance, popup, container, innerParams.returnFocus, innerParams.didClose); + } else { + // Otherwise, remove immediately + removePopupAndResetState(instance, container, innerParams.returnFocus, innerParams.didClose); + } + }; + + const animatePopup = (instance, popup, container, returnFocus, didClose) => { + globalState.swalCloseEventFinishedCallback = removePopupAndResetState.bind(null, instance, container, returnFocus, didClose); + popup.addEventListener(animationEndEvent, function (e) { + if (e.target === popup) { + globalState.swalCloseEventFinishedCallback(); + delete globalState.swalCloseEventFinishedCallback; + } + }); + }; + + const triggerDidCloseAndDispose = (instance, didClose) => { + setTimeout(() => { + if (typeof didClose === 'function') { + didClose.bind(instance.params)(); + } + + instance._destroy(); + }); + }; + + function setButtonsDisabled(instance, buttons, disabled) { + const domCache = privateProps.domCache.get(instance); + buttons.forEach(button => { + domCache[button].disabled = disabled; + }); + } + + function setInputDisabled(input, disabled) { + if (!input) { + return false; + } + + if (input.type === 'radio') { + const radiosContainer = input.parentNode.parentNode; + const radios = radiosContainer.querySelectorAll('input'); + + for (let i = 0; i < radios.length; i++) { + radios[i].disabled = disabled; + } + } else { + input.disabled = disabled; + } + } + + function enableButtons() { + setButtonsDisabled(this, ['confirmButton', 'denyButton', 'cancelButton'], false); + } + function disableButtons() { + setButtonsDisabled(this, ['confirmButton', 'denyButton', 'cancelButton'], true); + } + function enableInput() { + return setInputDisabled(this.getInput(), false); + } + function disableInput() { + return setInputDisabled(this.getInput(), true); + } + + function showValidationMessage(error) { + const domCache = privateProps.domCache.get(this); + const params = privateProps.innerParams.get(this); + setInnerHtml(domCache.validationMessage, error); + domCache.validationMessage.className = swalClasses['validation-message']; + + if (params.customClass && params.customClass.validationMessage) { + addClass(domCache.validationMessage, params.customClass.validationMessage); + } + + show(domCache.validationMessage); + const input = this.getInput(); + + if (input) { + input.setAttribute('aria-invalid', true); + input.setAttribute('aria-describedby', swalClasses['validation-message']); + focusInput(input); + addClass(input, swalClasses.inputerror); + } + } // Hide block with validation message + + function resetValidationMessage$1() { + const domCache = privateProps.domCache.get(this); + + if (domCache.validationMessage) { + hide(domCache.validationMessage); + } + + const input = this.getInput(); + + if (input) { + input.removeAttribute('aria-invalid'); + input.removeAttribute('aria-describedby'); + removeClass(input, swalClasses.inputerror); + } + } + + function getProgressSteps$1() { + const domCache = privateProps.domCache.get(this); + return domCache.progressSteps; + } + + class Timer { + constructor(callback, delay) { + this.callback = callback; + this.remaining = delay; + this.running = false; + this.start(); + } + + start() { + if (!this.running) { + this.running = true; + this.started = new Date(); + this.id = setTimeout(this.callback, this.remaining); + } + + return this.remaining; + } + + stop() { + if (this.running) { + this.running = false; + clearTimeout(this.id); + this.remaining -= new Date() - this.started; + } + + return this.remaining; + } + + increase(n) { + const running = this.running; + + if (running) { + this.stop(); + } + + this.remaining += n; + + if (running) { + this.start(); + } + + return this.remaining; + } + + getTimerLeft() { + if (this.running) { + this.stop(); + this.start(); + } + + return this.remaining; + } + + isRunning() { + return this.running; + } + + } + + var defaultInputValidators = { + email: (string, validationMessage) => { + return /^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]{2,24}$/.test(string) ? Promise.resolve() : Promise.resolve(validationMessage || 'Invalid email address'); + }, + url: (string, validationMessage) => { + // taken from https://stackoverflow.com/a/3809435 with a small change from #1306 and #2013 + return /^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(string) ? Promise.resolve() : Promise.resolve(validationMessage || 'Invalid URL'); + } + }; + + function setDefaultInputValidators(params) { + // Use default `inputValidator` for supported input types if not provided + if (!params.inputValidator) { + Object.keys(defaultInputValidators).forEach(key => { + if (params.input === key) { + params.inputValidator = defaultInputValidators[key]; + } + }); + } + } + + function validateCustomTargetElement(params) { + // Determine if the custom target element is valid + if (!params.target || typeof params.target === 'string' && !document.querySelector(params.target) || typeof params.target !== 'string' && !params.target.appendChild) { + warn('Target parameter is not valid, defaulting to "body"'); + params.target = 'body'; + } + } + /** + * Set type, text and actions on popup + * + * @param params + * @returns {boolean} + */ + + + function setParameters(params) { + setDefaultInputValidators(params); // showLoaderOnConfirm && preConfirm + + if (params.showLoaderOnConfirm && !params.preConfirm) { + warn('showLoaderOnConfirm is set to true, but preConfirm is not defined.\n' + 'showLoaderOnConfirm should be used together with preConfirm, see usage example:\n' + 'https://sweetalert2.github.io/#ajax-request'); + } + + validateCustomTargetElement(params); // Replace newlines with
                                        in title + + if (typeof params.title === 'string') { + params.title = params.title.split('\n').join('
                                        '); + } + + init(params); + } + + const swalStringParams = ['swal-title', 'swal-html', 'swal-footer']; + const getTemplateParams = params => { + const template = typeof params.template === 'string' ? document.querySelector(params.template) : params.template; + + if (!template) { + return {}; + } + + const templateContent = template.content; + showWarningsForElements(templateContent); + const result = Object.assign(getSwalParams(templateContent), getSwalButtons(templateContent), getSwalImage(templateContent), getSwalIcon(templateContent), getSwalInput(templateContent), getSwalStringParams(templateContent, swalStringParams)); + return result; + }; + + const getSwalParams = templateContent => { + const result = {}; + toArray(templateContent.querySelectorAll('swal-param')).forEach(param => { + showWarningsForAttributes(param, ['name', 'value']); + const paramName = param.getAttribute('name'); + let value = param.getAttribute('value'); + + if (typeof defaultParams[paramName] === 'boolean' && value === 'false') { + value = false; + } + + if (typeof defaultParams[paramName] === 'object') { + value = JSON.parse(value); + } + + result[paramName] = value; + }); + return result; + }; + + const getSwalButtons = templateContent => { + const result = {}; + toArray(templateContent.querySelectorAll('swal-button')).forEach(button => { + showWarningsForAttributes(button, ['type', 'color', 'aria-label']); + const type = button.getAttribute('type'); + result["".concat(type, "ButtonText")] = button.innerHTML; + result["show".concat(capitalizeFirstLetter(type), "Button")] = true; + + if (button.hasAttribute('color')) { + result["".concat(type, "ButtonColor")] = button.getAttribute('color'); + } + + if (button.hasAttribute('aria-label')) { + result["".concat(type, "ButtonAriaLabel")] = button.getAttribute('aria-label'); + } + }); + return result; + }; + + const getSwalImage = templateContent => { + const result = {}; + const image = templateContent.querySelector('swal-image'); + + if (image) { + showWarningsForAttributes(image, ['src', 'width', 'height', 'alt']); + + if (image.hasAttribute('src')) { + result.imageUrl = image.getAttribute('src'); + } + + if (image.hasAttribute('width')) { + result.imageWidth = image.getAttribute('width'); + } + + if (image.hasAttribute('height')) { + result.imageHeight = image.getAttribute('height'); + } + + if (image.hasAttribute('alt')) { + result.imageAlt = image.getAttribute('alt'); + } + } + + return result; + }; + + const getSwalIcon = templateContent => { + const result = {}; + const icon = templateContent.querySelector('swal-icon'); + + if (icon) { + showWarningsForAttributes(icon, ['type', 'color']); + + if (icon.hasAttribute('type')) { + result.icon = icon.getAttribute('type'); + } + + if (icon.hasAttribute('color')) { + result.iconColor = icon.getAttribute('color'); + } + + result.iconHtml = icon.innerHTML; + } + + return result; + }; + + const getSwalInput = templateContent => { + const result = {}; + const input = templateContent.querySelector('swal-input'); + + if (input) { + showWarningsForAttributes(input, ['type', 'label', 'placeholder', 'value']); + result.input = input.getAttribute('type') || 'text'; + + if (input.hasAttribute('label')) { + result.inputLabel = input.getAttribute('label'); + } + + if (input.hasAttribute('placeholder')) { + result.inputPlaceholder = input.getAttribute('placeholder'); + } + + if (input.hasAttribute('value')) { + result.inputValue = input.getAttribute('value'); + } + } + + const inputOptions = templateContent.querySelectorAll('swal-input-option'); + + if (inputOptions.length) { + result.inputOptions = {}; + toArray(inputOptions).forEach(option => { + showWarningsForAttributes(option, ['value']); + const optionValue = option.getAttribute('value'); + const optionName = option.innerHTML; + result.inputOptions[optionValue] = optionName; + }); + } + + return result; + }; + + const getSwalStringParams = (templateContent, paramNames) => { + const result = {}; + + for (const i in paramNames) { + const paramName = paramNames[i]; + const tag = templateContent.querySelector(paramName); + + if (tag) { + showWarningsForAttributes(tag, []); + result[paramName.replace(/^swal-/, '')] = tag.innerHTML.trim(); + } + } + + return result; + }; + + const showWarningsForElements = template => { + const allowedElements = swalStringParams.concat(['swal-param', 'swal-button', 'swal-image', 'swal-icon', 'swal-input', 'swal-input-option']); + toArray(template.children).forEach(el => { + const tagName = el.tagName.toLowerCase(); + + if (allowedElements.indexOf(tagName) === -1) { + warn("Unrecognized element <".concat(tagName, ">")); + } + }); + }; + + const showWarningsForAttributes = (el, allowedAttributes) => { + toArray(el.attributes).forEach(attribute => { + if (allowedAttributes.indexOf(attribute.name) === -1) { + warn(["Unrecognized attribute \"".concat(attribute.name, "\" on <").concat(el.tagName.toLowerCase(), ">."), "".concat(allowedAttributes.length ? "Allowed attributes are: ".concat(allowedAttributes.join(', ')) : 'To set the value, use HTML within the element.')]); + } + }); + }; + + const SHOW_CLASS_TIMEOUT = 10; + /** + * Open popup, add necessary classes and styles, fix scrollbar + * + * @param params + */ + + const openPopup = params => { + const container = getContainer(); + const popup = getPopup(); + + if (typeof params.willOpen === 'function') { + params.willOpen(popup); + } + + const bodyStyles = window.getComputedStyle(document.body); + const initialBodyOverflow = bodyStyles.overflowY; + addClasses$1(container, popup, params); // scrolling is 'hidden' until animation is done, after that 'auto' + + setTimeout(() => { + setScrollingVisibility(container, popup); + }, SHOW_CLASS_TIMEOUT); + + if (isModal()) { + fixScrollContainer(container, params.scrollbarPadding, initialBodyOverflow); + setAriaHidden(); + } + + if (!isToast() && !globalState.previousActiveElement) { + globalState.previousActiveElement = document.activeElement; + } + + if (typeof params.didOpen === 'function') { + setTimeout(() => params.didOpen(popup)); + } + + removeClass(container, swalClasses['no-transition']); + }; + + const swalOpenAnimationFinished = event => { + const popup = getPopup(); + + if (event.target !== popup) { + return; + } + + const container = getContainer(); + popup.removeEventListener(animationEndEvent, swalOpenAnimationFinished); + container.style.overflowY = 'auto'; + }; + + const setScrollingVisibility = (container, popup) => { + if (animationEndEvent && hasCssAnimation(popup)) { + container.style.overflowY = 'hidden'; + popup.addEventListener(animationEndEvent, swalOpenAnimationFinished); + } else { + container.style.overflowY = 'auto'; + } + }; + + const fixScrollContainer = (container, scrollbarPadding, initialBodyOverflow) => { + iOSfix(); + + if (scrollbarPadding && initialBodyOverflow !== 'hidden') { + fixScrollbar(); + } // sweetalert2/issues/1247 + + + setTimeout(() => { + container.scrollTop = 0; + }); + }; + + const addClasses$1 = (container, popup, params) => { + addClass(container, params.showClass.backdrop); // the workaround with setting/unsetting opacity is needed for #2019 and 2059 + + popup.style.setProperty('opacity', '0', 'important'); + show(popup, 'grid'); + setTimeout(() => { + // Animate popup right after showing it + addClass(popup, params.showClass.popup); // and remove the opacity workaround + + popup.style.removeProperty('opacity'); + }, SHOW_CLASS_TIMEOUT); // 10ms in order to fix #2062 + + addClass([document.documentElement, document.body], swalClasses.shown); + + if (params.heightAuto && params.backdrop && !params.toast) { + addClass([document.documentElement, document.body], swalClasses['height-auto']); + } + }; + + const handleInputOptionsAndValue = (instance, params) => { + if (params.input === 'select' || params.input === 'radio') { + handleInputOptions(instance, params); + } else if (['text', 'email', 'number', 'tel', 'textarea'].includes(params.input) && (hasToPromiseFn(params.inputValue) || isPromise(params.inputValue))) { + showLoading(getConfirmButton()); + handleInputValue(instance, params); + } + }; + const getInputValue = (instance, innerParams) => { + const input = instance.getInput(); + + if (!input) { + return null; + } + + switch (innerParams.input) { + case 'checkbox': + return getCheckboxValue(input); + + case 'radio': + return getRadioValue(input); + + case 'file': + return getFileValue(input); + + default: + return innerParams.inputAutoTrim ? input.value.trim() : input.value; + } + }; + + const getCheckboxValue = input => input.checked ? 1 : 0; + + const getRadioValue = input => input.checked ? input.value : null; + + const getFileValue = input => input.files.length ? input.getAttribute('multiple') !== null ? input.files : input.files[0] : null; + + const handleInputOptions = (instance, params) => { + const popup = getPopup(); + + const processInputOptions = inputOptions => populateInputOptions[params.input](popup, formatInputOptions(inputOptions), params); + + if (hasToPromiseFn(params.inputOptions) || isPromise(params.inputOptions)) { + showLoading(getConfirmButton()); + asPromise(params.inputOptions).then(inputOptions => { + instance.hideLoading(); + processInputOptions(inputOptions); + }); + } else if (typeof params.inputOptions === 'object') { + processInputOptions(params.inputOptions); + } else { + error("Unexpected type of inputOptions! Expected object, Map or Promise, got ".concat(typeof params.inputOptions)); + } + }; + + const handleInputValue = (instance, params) => { + const input = instance.getInput(); + hide(input); + asPromise(params.inputValue).then(inputValue => { + input.value = params.input === 'number' ? parseFloat(inputValue) || 0 : "".concat(inputValue); + show(input); + input.focus(); + instance.hideLoading(); + }).catch(err => { + error("Error in inputValue promise: ".concat(err)); + input.value = ''; + show(input); + input.focus(); + instance.hideLoading(); + }); + }; + + const populateInputOptions = { + select: (popup, inputOptions, params) => { + const select = getChildByClass(popup, swalClasses.select); + + const renderOption = (parent, optionLabel, optionValue) => { + const option = document.createElement('option'); + option.value = optionValue; + setInnerHtml(option, optionLabel); + option.selected = isSelected(optionValue, params.inputValue); + parent.appendChild(option); + }; + + inputOptions.forEach(inputOption => { + const optionValue = inputOption[0]; + const optionLabel = inputOption[1]; // spec: + // https://www.w3.org/TR/html401/interact/forms.html#h-17.6 + // "...all OPTGROUP elements must be specified directly within a SELECT element (i.e., groups may not be nested)..." + // check whether this is a + + if (Array.isArray(optionLabel)) { + // if it is an array, then it is an + const optgroup = document.createElement('optgroup'); + optgroup.label = optionValue; + optgroup.disabled = false; // not configurable for now + + select.appendChild(optgroup); + optionLabel.forEach(o => renderOption(optgroup, o[1], o[0])); + } else { + // case of + valueFormatted = formatInputOptions(valueFormatted); + } + + result.push([key, valueFormatted]); + }); + } else { + Object.keys(inputOptions).forEach(key => { + let valueFormatted = inputOptions[key]; + + if (typeof valueFormatted === 'object') { + // case of + valueFormatted = formatInputOptions(valueFormatted); + } + + result.push([key, valueFormatted]); + }); + } + + return result; + }; + + const isSelected = (optionValue, inputValue) => { + return inputValue && inputValue.toString() === optionValue.toString(); + }; + + const handleConfirmButtonClick = instance => { + const innerParams = privateProps.innerParams.get(instance); + instance.disableButtons(); + + if (innerParams.input) { + handleConfirmOrDenyWithInput(instance, 'confirm'); + } else { + confirm(instance, true); + } + }; + const handleDenyButtonClick = instance => { + const innerParams = privateProps.innerParams.get(instance); + instance.disableButtons(); + + if (innerParams.returnInputValueOnDeny) { + handleConfirmOrDenyWithInput(instance, 'deny'); + } else { + deny(instance, false); + } + }; + const handleCancelButtonClick = (instance, dismissWith) => { + instance.disableButtons(); + dismissWith(DismissReason.cancel); + }; + + const handleConfirmOrDenyWithInput = (instance, type + /* 'confirm' | 'deny' */ + ) => { + const innerParams = privateProps.innerParams.get(instance); + const inputValue = getInputValue(instance, innerParams); + + if (innerParams.inputValidator) { + handleInputValidator(instance, inputValue, type); + } else if (!instance.getInput().checkValidity()) { + instance.enableButtons(); + instance.showValidationMessage(innerParams.validationMessage); + } else if (type === 'deny') { + deny(instance, inputValue); + } else { + confirm(instance, inputValue); + } + }; + + const handleInputValidator = (instance, inputValue, type + /* 'confirm' | 'deny' */ + ) => { + const innerParams = privateProps.innerParams.get(instance); + instance.disableInput(); + const validationPromise = Promise.resolve().then(() => asPromise(innerParams.inputValidator(inputValue, innerParams.validationMessage))); + validationPromise.then(validationMessage => { + instance.enableButtons(); + instance.enableInput(); + + if (validationMessage) { + instance.showValidationMessage(validationMessage); + } else if (type === 'deny') { + deny(instance, inputValue); + } else { + confirm(instance, inputValue); + } + }); + }; + + const deny = (instance, value) => { + const innerParams = privateProps.innerParams.get(instance || undefined); + + if (innerParams.showLoaderOnDeny) { + showLoading(getDenyButton()); + } + + if (innerParams.preDeny) { + const preDenyPromise = Promise.resolve().then(() => asPromise(innerParams.preDeny(value, innerParams.validationMessage))); + preDenyPromise.then(preDenyValue => { + if (preDenyValue === false) { + instance.hideLoading(); + } else { + instance.closePopup({ + isDenied: true, + value: typeof preDenyValue === 'undefined' ? value : preDenyValue + }); + } + }); + } else { + instance.closePopup({ + isDenied: true, + value + }); + } + }; + + const succeedWith = (instance, value) => { + instance.closePopup({ + isConfirmed: true, + value + }); + }; + + const confirm = (instance, value) => { + const innerParams = privateProps.innerParams.get(instance || undefined); + + if (innerParams.showLoaderOnConfirm) { + showLoading(); // TODO: make showLoading an *instance* method + } + + if (innerParams.preConfirm) { + instance.resetValidationMessage(); + const preConfirmPromise = Promise.resolve().then(() => asPromise(innerParams.preConfirm(value, innerParams.validationMessage))); + preConfirmPromise.then(preConfirmValue => { + if (isVisible(getValidationMessage()) || preConfirmValue === false) { + instance.hideLoading(); + } else { + succeedWith(instance, typeof preConfirmValue === 'undefined' ? value : preConfirmValue); + } + }); + } else { + succeedWith(instance, value); + } + }; + + const addKeydownHandler = (instance, globalState, innerParams, dismissWith) => { + if (globalState.keydownTarget && globalState.keydownHandlerAdded) { + globalState.keydownTarget.removeEventListener('keydown', globalState.keydownHandler, { + capture: globalState.keydownListenerCapture + }); + globalState.keydownHandlerAdded = false; + } + + if (!innerParams.toast) { + globalState.keydownHandler = e => keydownHandler(instance, e, dismissWith); + + globalState.keydownTarget = innerParams.keydownListenerCapture ? window : getPopup(); + globalState.keydownListenerCapture = innerParams.keydownListenerCapture; + globalState.keydownTarget.addEventListener('keydown', globalState.keydownHandler, { + capture: globalState.keydownListenerCapture + }); + globalState.keydownHandlerAdded = true; + } + }; // Focus handling + + const setFocus = (innerParams, index, increment) => { + const focusableElements = getFocusableElements(); // search for visible elements and select the next possible match + + if (focusableElements.length) { + index = index + increment; // rollover to first item + + if (index === focusableElements.length) { + index = 0; // go to last item + } else if (index === -1) { + index = focusableElements.length - 1; + } + + return focusableElements[index].focus(); + } // no visible focusable elements, focus the popup + + + getPopup().focus(); + }; + const arrowKeysNextButton = ['ArrowRight', 'ArrowDown']; + const arrowKeysPreviousButton = ['ArrowLeft', 'ArrowUp']; + + const keydownHandler = (instance, e, dismissWith) => { + const innerParams = privateProps.innerParams.get(instance); + + if (!innerParams) { + return; // This instance has already been destroyed + } + + if (innerParams.stopKeydownPropagation) { + e.stopPropagation(); + } // ENTER + + + if (e.key === 'Enter') { + handleEnter(instance, e, innerParams); // TAB + } else if (e.key === 'Tab') { + handleTab(e, innerParams); // ARROWS - switch focus between buttons + } else if ([...arrowKeysNextButton, ...arrowKeysPreviousButton].includes(e.key)) { + handleArrows(e.key); // ESC + } else if (e.key === 'Escape') { + handleEsc(e, innerParams, dismissWith); + } + }; + + const handleEnter = (instance, e, innerParams) => { + // #720 #721 + if (e.isComposing) { + return; + } + + if (e.target && instance.getInput() && e.target.outerHTML === instance.getInput().outerHTML) { + if (['textarea', 'file'].includes(innerParams.input)) { + return; // do not submit + } + + clickConfirm(); + e.preventDefault(); + } + }; + + const handleTab = (e, innerParams) => { + const targetElement = e.target; + const focusableElements = getFocusableElements(); + let btnIndex = -1; + + for (let i = 0; i < focusableElements.length; i++) { + if (targetElement === focusableElements[i]) { + btnIndex = i; + break; + } + } + + if (!e.shiftKey) { + // Cycle to the next button + setFocus(innerParams, btnIndex, 1); + } else { + // Cycle to the prev button + setFocus(innerParams, btnIndex, -1); + } + + e.stopPropagation(); + e.preventDefault(); + }; + + const handleArrows = key => { + const confirmButton = getConfirmButton(); + const denyButton = getDenyButton(); + const cancelButton = getCancelButton(); + + if (![confirmButton, denyButton, cancelButton].includes(document.activeElement)) { + return; + } + + const sibling = arrowKeysNextButton.includes(key) ? 'nextElementSibling' : 'previousElementSibling'; + const buttonToFocus = document.activeElement[sibling]; + + if (buttonToFocus) { + buttonToFocus.focus(); + } + }; + + const handleEsc = (e, innerParams, dismissWith) => { + if (callIfFunction(innerParams.allowEscapeKey)) { + e.preventDefault(); + dismissWith(DismissReason.esc); + } + }; + + const handlePopupClick = (instance, domCache, dismissWith) => { + const innerParams = privateProps.innerParams.get(instance); + + if (innerParams.toast) { + handleToastClick(instance, domCache, dismissWith); + } else { + // Ignore click events that had mousedown on the popup but mouseup on the container + // This can happen when the user drags a slider + handleModalMousedown(domCache); // Ignore click events that had mousedown on the container but mouseup on the popup + + handleContainerMousedown(domCache); + handleModalClick(instance, domCache, dismissWith); + } + }; + + const handleToastClick = (instance, domCache, dismissWith) => { + // Closing toast by internal click + domCache.popup.onclick = () => { + const innerParams = privateProps.innerParams.get(instance); + + if (innerParams.showConfirmButton || innerParams.showDenyButton || innerParams.showCancelButton || innerParams.showCloseButton || innerParams.timer || innerParams.input) { + return; + } + + dismissWith(DismissReason.close); + }; + }; + + let ignoreOutsideClick = false; + + const handleModalMousedown = domCache => { + domCache.popup.onmousedown = () => { + domCache.container.onmouseup = function (e) { + domCache.container.onmouseup = undefined; // We only check if the mouseup target is the container because usually it doesn't + // have any other direct children aside of the popup + + if (e.target === domCache.container) { + ignoreOutsideClick = true; + } + }; + }; + }; + + const handleContainerMousedown = domCache => { + domCache.container.onmousedown = () => { + domCache.popup.onmouseup = function (e) { + domCache.popup.onmouseup = undefined; // We also need to check if the mouseup target is a child of the popup + + if (e.target === domCache.popup || domCache.popup.contains(e.target)) { + ignoreOutsideClick = true; + } + }; + }; + }; + + const handleModalClick = (instance, domCache, dismissWith) => { + domCache.container.onclick = e => { + const innerParams = privateProps.innerParams.get(instance); + + if (ignoreOutsideClick) { + ignoreOutsideClick = false; + return; + } + + if (e.target === domCache.container && callIfFunction(innerParams.allowOutsideClick)) { + dismissWith(DismissReason.backdrop); + } + }; + }; + + function _main(userParams, mixinParams = {}) { + showWarningsForParams(Object.assign({}, mixinParams, userParams)); + + if (globalState.currentInstance) { + globalState.currentInstance._destroy(); + + if (isModal()) { + unsetAriaHidden(); + } + } + + globalState.currentInstance = this; + const innerParams = prepareParams(userParams, mixinParams); + setParameters(innerParams); + Object.freeze(innerParams); // clear the previous timer + + if (globalState.timeout) { + globalState.timeout.stop(); + delete globalState.timeout; + } // clear the restore focus timeout + + + clearTimeout(globalState.restoreFocusTimeout); + const domCache = populateDomCache(this); + render(this, innerParams); + privateProps.innerParams.set(this, innerParams); + return swalPromise(this, domCache, innerParams); + } + + const prepareParams = (userParams, mixinParams) => { + const templateParams = getTemplateParams(userParams); + const params = Object.assign({}, defaultParams, mixinParams, templateParams, userParams); // precedence is described in #2131 + + params.showClass = Object.assign({}, defaultParams.showClass, params.showClass); + params.hideClass = Object.assign({}, defaultParams.hideClass, params.hideClass); + return params; + }; + + const swalPromise = (instance, domCache, innerParams) => { + return new Promise(resolve => { + // functions to handle all closings/dismissals + const dismissWith = dismiss => { + instance.closePopup({ + isDismissed: true, + dismiss + }); + }; + + privateMethods.swalPromiseResolve.set(instance, resolve); + + domCache.confirmButton.onclick = () => handleConfirmButtonClick(instance); + + domCache.denyButton.onclick = () => handleDenyButtonClick(instance); + + domCache.cancelButton.onclick = () => handleCancelButtonClick(instance, dismissWith); + + domCache.closeButton.onclick = () => dismissWith(DismissReason.close); + + handlePopupClick(instance, domCache, dismissWith); + addKeydownHandler(instance, globalState, innerParams, dismissWith); + handleInputOptionsAndValue(instance, innerParams); + openPopup(innerParams); + setupTimer(globalState, innerParams, dismissWith); + initFocus(domCache, innerParams); // Scroll container to top on open (#1247, #1946) + + setTimeout(() => { + domCache.container.scrollTop = 0; + }); + }); + }; + + const populateDomCache = instance => { + const domCache = { + popup: getPopup(), + container: getContainer(), + actions: getActions(), + confirmButton: getConfirmButton(), + denyButton: getDenyButton(), + cancelButton: getCancelButton(), + loader: getLoader(), + closeButton: getCloseButton(), + validationMessage: getValidationMessage(), + progressSteps: getProgressSteps() + }; + privateProps.domCache.set(instance, domCache); + return domCache; + }; + + const setupTimer = (globalState$$1, innerParams, dismissWith) => { + const timerProgressBar = getTimerProgressBar(); + hide(timerProgressBar); + + if (innerParams.timer) { + globalState$$1.timeout = new Timer(() => { + dismissWith('timer'); + delete globalState$$1.timeout; + }, innerParams.timer); + + if (innerParams.timerProgressBar) { + show(timerProgressBar); + setTimeout(() => { + if (globalState$$1.timeout && globalState$$1.timeout.running) { + // timer can be already stopped or unset at this point + animateTimerProgressBar(innerParams.timer); + } + }); + } + } + }; + + const initFocus = (domCache, innerParams) => { + if (innerParams.toast) { + return; + } + + if (!callIfFunction(innerParams.allowEnterKey)) { + return blurActiveElement(); + } + + if (!focusButton(domCache, innerParams)) { + setFocus(innerParams, -1, 1); + } + }; + + const focusButton = (domCache, innerParams) => { + if (innerParams.focusDeny && isVisible(domCache.denyButton)) { + domCache.denyButton.focus(); + return true; + } + + if (innerParams.focusCancel && isVisible(domCache.cancelButton)) { + domCache.cancelButton.focus(); + return true; + } + + if (innerParams.focusConfirm && isVisible(domCache.confirmButton)) { + domCache.confirmButton.focus(); + return true; + } + + return false; + }; + + const blurActiveElement = () => { + if (document.activeElement && typeof document.activeElement.blur === 'function') { + document.activeElement.blur(); + } + }; + + /** + * Updates popup parameters. + */ + + function update(params) { + const popup = getPopup(); + const innerParams = privateProps.innerParams.get(this); + + if (!popup || hasClass(popup, innerParams.hideClass.popup)) { + return warn("You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup."); + } + + const validUpdatableParams = {}; // assign valid params from `params` to `defaults` + + Object.keys(params).forEach(param => { + if (Swal.isUpdatableParameter(param)) { + validUpdatableParams[param] = params[param]; + } else { + warn("Invalid parameter to update: \"".concat(param, "\". Updatable params are listed here: https://github.com/sweetalert2/sweetalert2/blob/master/src/utils/params.js\n\nIf you think this parameter should be updatable, request it here: https://github.com/sweetalert2/sweetalert2/issues/new?template=02_feature_request.md")); + } + }); + const updatedParams = Object.assign({}, innerParams, validUpdatableParams); + render(this, updatedParams); + privateProps.innerParams.set(this, updatedParams); + Object.defineProperties(this, { + params: { + value: Object.assign({}, this.params, params), + writable: false, + enumerable: true + } + }); + } + + function _destroy() { + const domCache = privateProps.domCache.get(this); + const innerParams = privateProps.innerParams.get(this); + + if (!innerParams) { + return; // This instance has already been destroyed + } // Check if there is another Swal closing + + + if (domCache.popup && globalState.swalCloseEventFinishedCallback) { + globalState.swalCloseEventFinishedCallback(); + delete globalState.swalCloseEventFinishedCallback; + } // Check if there is a swal disposal defer timer + + + if (globalState.deferDisposalTimer) { + clearTimeout(globalState.deferDisposalTimer); + delete globalState.deferDisposalTimer; + } + + if (typeof innerParams.didDestroy === 'function') { + innerParams.didDestroy(); + } + + disposeSwal(this); + } + + const disposeSwal = instance => { + // Unset this.params so GC will dispose it (#1569) + delete instance.params; // Unset globalState props so GC will dispose globalState (#1569) + + delete globalState.keydownHandler; + delete globalState.keydownTarget; // Unset WeakMaps so GC will be able to dispose them (#1569) + + unsetWeakMaps(privateProps); + unsetWeakMaps(privateMethods); // Unset currentInstance + + delete globalState.currentInstance; + }; + + const unsetWeakMaps = obj => { + for (const i in obj) { + obj[i] = new WeakMap(); + } + }; + + + + var instanceMethods = /*#__PURE__*/Object.freeze({ + hideLoading: hideLoading, + disableLoading: hideLoading, + getInput: getInput$1, + close: close, + closePopup: close, + closeModal: close, + closeToast: close, + enableButtons: enableButtons, + disableButtons: disableButtons, + enableInput: enableInput, + disableInput: disableInput, + showValidationMessage: showValidationMessage, + resetValidationMessage: resetValidationMessage$1, + getProgressSteps: getProgressSteps$1, + _main: _main, + update: update, + _destroy: _destroy + }); + + let currentInstance; + + class SweetAlert { + constructor(...args) { + // Prevent run in Node env + if (typeof window === 'undefined') { + return; + } + + currentInstance = this; + const outerParams = Object.freeze(this.constructor.argsToParams(args)); + Object.defineProperties(this, { + params: { + value: outerParams, + writable: false, + enumerable: true, + configurable: true + } + }); + + const promise = this._main(this.params); + + privateProps.promise.set(this, promise); + } // `catch` cannot be the name of a module export, so we define our thenable methods here instead + + + then(onFulfilled) { + const promise = privateProps.promise.get(this); + return promise.then(onFulfilled); + } + + finally(onFinally) { + const promise = privateProps.promise.get(this); + return promise.finally(onFinally); + } + + } // Assign instance methods from src/instanceMethods/*.js to prototype + + + Object.assign(SweetAlert.prototype, instanceMethods); // Assign static methods from src/staticMethods/*.js to constructor + + Object.assign(SweetAlert, staticMethods); // Proxy to instance methods to constructor, for now, for backwards compatibility + + Object.keys(instanceMethods).forEach(key => { + SweetAlert[key] = function (...args) { + if (currentInstance) { + return currentInstance[key](...args); + } + }; + }); + SweetAlert.DismissReason = DismissReason; + SweetAlert.version = '11.1.5'; + + const Swal = SweetAlert; + Swal.default = Swal; + + return Swal; + +})); +if (typeof this !== 'undefined' && this.Sweetalert2){ this.swal = this.sweetAlert = this.Swal = this.SweetAlert = this.Sweetalert2} diff --git a/modules/docs/app/VoloDocs.Web/wwwroot/libs/sweetalert2/sweetalert2.min.css b/modules/docs/app/VoloDocs.Web/wwwroot/libs/sweetalert2/sweetalert2.min.css new file mode 100644 index 0000000000..25eb26f1c0 --- /dev/null +++ b/modules/docs/app/VoloDocs.Web/wwwroot/libs/sweetalert2/sweetalert2.min.css @@ -0,0 +1 @@ +.swal2-popup.swal2-toast{box-sizing:border-box;grid-column:1/4!important;grid-row:1/4!important;grid-template-columns:1fr 99fr 1fr;padding:1em;overflow-y:hidden;background:#fff;box-shadow:0 0 .625em #d9d9d9;pointer-events:all}.swal2-popup.swal2-toast>*{grid-column:2}.swal2-popup.swal2-toast .swal2-title{margin:1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-loading{justify-content:center}.swal2-popup.swal2-toast .swal2-input{height:2em;margin:.5em;font-size:1em}.swal2-popup.swal2-toast .swal2-validation-message{font-size:1em}.swal2-popup.swal2-toast .swal2-footer{margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-popup.swal2-toast .swal2-close{grid-column:3/3;grid-row:1/99;align-self:center;width:.8em;height:.8em;margin:0;font-size:2em}.swal2-popup.swal2-toast .swal2-html-container{margin:1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-html-container:empty{padding:0}.swal2-popup.swal2-toast .swal2-loader{grid-column:1;grid-row:1/99;align-self:center;width:2em;height:2em;margin:.25em}.swal2-popup.swal2-toast .swal2-icon{grid-column:1;grid-row:1/99;align-self:center;width:2em;min-width:2em;height:2em;margin:0 .5em 0 0}.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:700}.swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-popup.swal2-toast .swal2-actions{justify-content:flex-start;height:auto;margin:0;margin-top:.3125em;padding:0}.swal2-popup.swal2-toast .swal2-styled{margin:.25em .5em;padding:.4em .6em;font-size:1em}.swal2-popup.swal2-toast .swal2-styled:focus{box-shadow:0 0 0 1px #fff,0 0 0 3px rgba(100,150,200,.5)}.swal2-popup.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;transform:rotate(45deg);border-radius:50%}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.8em;left:-.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.25em;left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-popup.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{-webkit-animation:swal2-toast-animate-success-line-tip .75s;animation:swal2-toast-animate-success-line-tip .75s}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{-webkit-animation:swal2-toast-animate-success-line-long .75s;animation:swal2-toast-animate-success-line-long .75s}.swal2-popup.swal2-toast.swal2-show{-webkit-animation:swal2-toast-show .5s;animation:swal2-toast-show .5s}.swal2-popup.swal2-toast.swal2-hide{-webkit-animation:swal2-toast-hide .1s forwards;animation:swal2-toast-hide .1s forwards}.swal2-container{display:grid;position:fixed;z-index:1060;top:0;right:0;bottom:0;left:0;box-sizing:border-box;grid-template-areas:"top-start top top-end" "center-start center center-end" "bottom-start bottom-center bottom-end";grid-template-rows:minmax(-webkit-min-content,auto) minmax(-webkit-min-content,auto) minmax(-webkit-min-content,auto);grid-template-rows:minmax(min-content,auto) minmax(min-content,auto) minmax(min-content,auto);height:100%;padding:.625em;overflow-x:hidden;transition:background-color .1s;-webkit-overflow-scrolling:touch}.swal2-container.swal2-backdrop-show,.swal2-container.swal2-noanimation{background:rgba(0,0,0,.4)}.swal2-container.swal2-backdrop-hide{background:0 0!important}.swal2-container.swal2-bottom-start,.swal2-container.swal2-center-start,.swal2-container.swal2-top-start{grid-template-columns:minmax(0,1fr) auto auto}.swal2-container.swal2-bottom,.swal2-container.swal2-center,.swal2-container.swal2-top{grid-template-columns:auto minmax(0,1fr) auto}.swal2-container.swal2-bottom-end,.swal2-container.swal2-center-end,.swal2-container.swal2-top-end{grid-template-columns:auto auto minmax(0,1fr)}.swal2-container.swal2-top-start>.swal2-popup{align-self:start}.swal2-container.swal2-top>.swal2-popup{grid-column:2;align-self:start;justify-self:center}.swal2-container.swal2-top-end>.swal2-popup,.swal2-container.swal2-top-right>.swal2-popup{grid-column:3;align-self:start;justify-self:end}.swal2-container.swal2-center-left>.swal2-popup,.swal2-container.swal2-center-start>.swal2-popup{grid-row:2;align-self:center}.swal2-container.swal2-center>.swal2-popup{grid-column:2;grid-row:2;align-self:center;justify-self:center}.swal2-container.swal2-center-end>.swal2-popup,.swal2-container.swal2-center-right>.swal2-popup{grid-column:3;grid-row:2;align-self:center;justify-self:end}.swal2-container.swal2-bottom-left>.swal2-popup,.swal2-container.swal2-bottom-start>.swal2-popup{grid-column:1;grid-row:3;align-self:end}.swal2-container.swal2-bottom>.swal2-popup{grid-column:2;grid-row:3;justify-self:center;align-self:end}.swal2-container.swal2-bottom-end>.swal2-popup,.swal2-container.swal2-bottom-right>.swal2-popup{grid-column:3;grid-row:3;align-self:end;justify-self:end}.swal2-container.swal2-grow-fullscreen>.swal2-popup,.swal2-container.swal2-grow-row>.swal2-popup{grid-column:1/4;width:100%}.swal2-container.swal2-grow-column>.swal2-popup,.swal2-container.swal2-grow-fullscreen>.swal2-popup{grid-row:1/4;align-self:stretch}.swal2-container.swal2-no-transition{transition:none!important}.swal2-popup{display:none;position:relative;box-sizing:border-box;grid-template-columns:minmax(0,100%);width:32em;max-width:100%;padding:0 0 1.25em;border:none;border-radius:5px;background:#fff;color:#545454;font-family:inherit;font-size:1rem}.swal2-popup:focus{outline:0}.swal2-popup.swal2-loading{overflow-y:hidden}.swal2-title{position:relative;max-width:100%;margin:0;padding:.8em 1em 0;color:#595959;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;word-wrap:break-word}.swal2-actions{display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:center;width:auto;margin:1.25em auto 0;padding:0}.swal2-actions:not(.swal2-loading) .swal2-styled[disabled]{opacity:.4}.swal2-actions:not(.swal2-loading) .swal2-styled:hover{background-image:linear-gradient(rgba(0,0,0,.1),rgba(0,0,0,.1))}.swal2-actions:not(.swal2-loading) .swal2-styled:active{background-image:linear-gradient(rgba(0,0,0,.2),rgba(0,0,0,.2))}.swal2-loader{display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;-webkit-animation:swal2-rotate-loading 1.5s linear 0s infinite normal;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 transparent #2778c4 transparent}.swal2-styled{margin:.3125em;padding:.625em 1.1em;transition:box-shadow .1s;box-shadow:0 0 0 3px transparent;font-weight:500}.swal2-styled:not([disabled]){cursor:pointer}.swal2-styled.swal2-confirm{border:0;border-radius:.25em;background:initial;background-color:#7367f0;color:#fff;font-size:1em}.swal2-styled.swal2-confirm:focus{box-shadow:0 0 0 3px rgba(115,103,240,.5)}.swal2-styled.swal2-deny{border:0;border-radius:.25em;background:initial;background-color:#ea5455;color:#fff;font-size:1em}.swal2-styled.swal2-deny:focus{box-shadow:0 0 0 3px rgba(234,84,85,.5)}.swal2-styled.swal2-cancel{border:0;border-radius:.25em;background:initial;background-color:#6e7d88;color:#fff;font-size:1em}.swal2-styled.swal2-cancel:focus{box-shadow:0 0 0 3px rgba(110,125,136,.5)}.swal2-styled.swal2-default-outline:focus{box-shadow:0 0 0 3px rgba(100,150,200,.5)}.swal2-styled:focus{outline:0}.swal2-styled::-moz-focus-inner{border:0}.swal2-footer{justify-content:center;margin:1em 0 0;padding:1em 1em 0;border-top:1px solid #eee;color:#545454;font-size:1em}.swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;grid-column:auto!important;height:.25em;overflow:hidden;border-bottom-right-radius:5px;border-bottom-left-radius:5px}.swal2-timer-progress-bar{width:100%;height:.25em;background:rgba(0,0,0,.2)}.swal2-image{max-width:100%;margin:2em auto 1em}.swal2-close{z-index:2;align-items:center;justify-content:center;width:1.2em;height:1.2em;margin-top:0;margin-right:0;margin-bottom:-1.2em;padding:0;overflow:hidden;transition:color .1s,box-shadow .1s;border:none;border-radius:5px;background:0 0;color:#ccc;font-family:serif;font-family:monospace;font-size:2.5em;cursor:pointer;justify-self:end}.swal2-close:hover{transform:none;background:0 0;color:#f27474}.swal2-close:focus{outline:0;box-shadow:inset 0 0 0 3px rgba(100,150,200,.5)}.swal2-close::-moz-focus-inner{border:0}.swal2-html-container{z-index:1;justify-content:center;margin:1em 1.6em .3em;padding:0;overflow:auto;color:#545454;font-size:1.125em;font-weight:400;line-height:normal;text-align:center;word-wrap:break-word;word-break:break-word}.swal2-checkbox,.swal2-file,.swal2-input,.swal2-radio,.swal2-select,.swal2-textarea{margin:1em 2em 0}.swal2-file,.swal2-input,.swal2-textarea{box-sizing:border-box;width:auto;transition:border-color .1s,box-shadow .1s;border:1px solid #d9d9d9;border-radius:.1875em;background:inherit;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px transparent;color:inherit;font-size:1.125em}.swal2-file.swal2-inputerror,.swal2-input.swal2-inputerror,.swal2-textarea.swal2-inputerror{border-color:#f27474!important;box-shadow:0 0 2px #f27474!important}.swal2-file:focus,.swal2-input:focus,.swal2-textarea:focus{border:1px solid #b4dbed;outline:0;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(100,150,200,.5)}.swal2-file::-moz-placeholder,.swal2-input::-moz-placeholder,.swal2-textarea::-moz-placeholder{color:#ccc}.swal2-file:-ms-input-placeholder,.swal2-input:-ms-input-placeholder,.swal2-textarea:-ms-input-placeholder{color:#ccc}.swal2-file::placeholder,.swal2-input::placeholder,.swal2-textarea::placeholder{color:#ccc}.swal2-range{margin:1em 2em 0;background:#fff}.swal2-range input{width:80%}.swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}.swal2-range input,.swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}.swal2-input{height:2.625em;padding:0 .75em}.swal2-file{width:75%;margin-right:auto;margin-left:auto;background:inherit;font-size:1.125em}.swal2-textarea{height:6.75em;padding:.75em}.swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:inherit;color:inherit;font-size:1.125em}.swal2-checkbox,.swal2-radio{align-items:center;justify-content:center;background:#fff;color:inherit}.swal2-checkbox label,.swal2-radio label{margin:0 .6em;font-size:1.125em}.swal2-checkbox input,.swal2-radio input{flex-shrink:0;margin:0 .4em}.swal2-input-label{display:flex;justify-content:center;margin:1em auto 0}.swal2-validation-message{align-items:center;justify-content:center;margin:1em 0 0;padding:.625em;overflow:hidden;background:#f0f0f0;color:#666;font-size:1em;font-weight:300}.swal2-validation-message::before{content:"!";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}.swal2-icon{position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:2.5em auto .6em;border:.25em solid transparent;border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}.swal2-icon.swal2-error{border-color:#f27474;color:#f27474}.swal2-icon.swal2-error .swal2-x-mark{position:relative;flex-grow:1}.swal2-icon.swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}.swal2-icon.swal2-error.swal2-icon-show{-webkit-animation:swal2-animate-error-icon .5s;animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-error.swal2-icon-show .swal2-x-mark{-webkit-animation:swal2-animate-error-x-mark .5s;animation:swal2-animate-error-x-mark .5s}.swal2-icon.swal2-warning{border-color:#facea8;color:#f8bb86}.swal2-icon.swal2-info{border-color:#9de0f6;color:#3fc3ee}.swal2-icon.swal2-question{border-color:#c9dae1;color:#87adbd}.swal2-icon.swal2-success{border-color:#a5dc86;color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;transform:rotate(45deg);border-radius:50%}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}.swal2-icon.swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-.25em;left:-.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}.swal2-icon.swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}.swal2-icon.swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}.swal2-icon.swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-tip{-webkit-animation:swal2-animate-success-line-tip .75s;animation:swal2-animate-success-line-tip .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-long{-webkit-animation:swal2-animate-success-line-long .75s;animation:swal2-animate-success-line-long .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-circular-line-right{-webkit-animation:swal2-rotate-success-circular-line 4.25s ease-in;animation:swal2-rotate-success-circular-line 4.25s ease-in}.swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:1.25em auto;padding:0;background:inherit;font-weight:600}.swal2-progress-steps li{display:inline-block;position:relative}.swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:#add8e6;color:#fff}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:#add8e6}.swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}[class^=swal2]{-webkit-tap-highlight-color:transparent}.swal2-show{-webkit-animation:swal2-show .3s;animation:swal2-show .3s}.swal2-hide{-webkit-animation:swal2-hide .15s forwards;animation:swal2-hide .15s forwards}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{margin-right:initial;margin-left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}@-webkit-keyframes swal2-toast-show{0%{transform:translateY(-.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0)}}@keyframes swal2-toast-show{0%{transform:translateY(-.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0)}}@-webkit-keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@-webkit-keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@-webkit-keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@-webkit-keyframes swal2-show{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}100%{transform:scale(1)}}@keyframes swal2-show{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}100%{transform:scale(1)}}@-webkit-keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(.5);opacity:0}}@keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(.5);opacity:0}}@-webkit-keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@-webkit-keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@-webkit-keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@-webkit-keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@-webkit-keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0);opacity:1}}@-webkit-keyframes swal2-rotate-loading{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes swal2-rotate-loading{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto!important}body.swal2-no-backdrop .swal2-container{background-color:transparent!important;pointer-events:none}body.swal2-no-backdrop .swal2-container .swal2-popup{pointer-events:all}body.swal2-no-backdrop .swal2-container .swal2-modal{box-shadow:0 0 10px rgba(0,0,0,.4)}@media print{body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow-y:scroll!important}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .swal2-container{position:static!important}}body.swal2-toast-shown .swal2-container{box-sizing:border-box;width:360px;max-width:100%;background-color:transparent;pointer-events:none}body.swal2-toast-shown .swal2-container.swal2-top{top:0;right:auto;bottom:auto;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{top:0;right:0;bottom:auto;left:auto}body.swal2-toast-shown .swal2-container.swal2-top-left,body.swal2-toast-shown .swal2-container.swal2-top-start{top:0;right:auto;bottom:auto;left:0}body.swal2-toast-shown .swal2-container.swal2-center-left,body.swal2-toast-shown .swal2-container.swal2-center-start{top:50%;right:auto;bottom:auto;left:0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{top:50%;right:auto;bottom:auto;left:50%;transform:translate(-50%,-50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{top:50%;right:0;bottom:auto;left:auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-left,body.swal2-toast-shown .swal2-container.swal2-bottom-start{top:auto;right:auto;bottom:0;left:0}body.swal2-toast-shown .swal2-container.swal2-bottom{top:auto;right:auto;bottom:0;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{top:auto;right:0;bottom:0;left:auto} \ No newline at end of file diff --git a/modules/docs/app/VoloDocs.Web/wwwroot/libs/sweetalert2/sweetalert2.min.js b/modules/docs/app/VoloDocs.Web/wwwroot/libs/sweetalert2/sweetalert2.min.js new file mode 100644 index 0000000000..9a383d5289 --- /dev/null +++ b/modules/docs/app/VoloDocs.Web/wwwroot/libs/sweetalert2/sweetalert2.min.js @@ -0,0 +1 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).Sweetalert2=t()}(this,function(){"use strict";const l=Object.freeze({cancel:"cancel",backdrop:"backdrop",close:"close",esc:"esc",timer:"timer"}),t="SweetAlert2:",o=e=>e.charAt(0).toUpperCase()+e.slice(1),a=e=>Array.prototype.slice.call(e),s=e=>{console.warn("".concat(t," ").concat("object"==typeof e?e.join(" "):e))},r=e=>{console.error("".concat(t," ").concat(e))},n=[],i=(e,t)=>{t='"'.concat(e,'" is deprecated and will be removed in the next major release. Please use "').concat(t,'" instead.'),n.includes(t)||(n.push(t),s(t))},c=e=>"function"==typeof e?e():e,u=e=>e&&"function"==typeof e.toPromise,d=e=>u(e)?e.toPromise():Promise.resolve(e),p=e=>e&&Promise.resolve(e)===e,m=e=>e instanceof Element||(e=>"object"==typeof e&&e.jquery)(e);var e=e=>{const t={};for(const n in e)t[e[n]]="swal2-"+e[n];return t};const h=e(["container","shown","height-auto","iosfix","popup","modal","no-backdrop","no-transition","toast","toast-shown","show","hide","close","title","html-container","actions","confirm","deny","cancel","default-outline","footer","icon","icon-content","image","input","file","range","select","radio","checkbox","label","textarea","inputerror","input-label","validation-message","progress-steps","active-progress-step","progress-step","progress-step-line","loader","loading","styled","top","top-start","top-end","top-left","top-right","center","center-start","center-end","center-left","center-right","bottom","bottom-start","bottom-end","bottom-left","bottom-right","grow-row","grow-column","grow-fullscreen","rtl","timer-progress-bar","timer-progress-bar-container","scrollbar-measure","icon-success","icon-warning","icon-info","icon-question","icon-error"]),g=e(["success","warning","info","question","error"]),b=()=>document.body.querySelector(".".concat(h.container)),f=e=>{const t=b();return t?t.querySelector(e):null},y=e=>f(".".concat(e)),v=()=>y(h.popup),w=()=>y(h.icon),C=()=>y(h.title),k=()=>y(h["html-container"]),A=()=>y(h.image),B=()=>y(h["progress-steps"]),x=()=>y(h["validation-message"]),P=()=>f(".".concat(h.actions," .").concat(h.confirm)),E=()=>f(".".concat(h.actions," .").concat(h.deny));const S=()=>f(".".concat(h.loader)),T=()=>f(".".concat(h.actions," .").concat(h.cancel)),L=()=>y(h.actions),O=()=>y(h.footer),j=()=>y(h["timer-progress-bar"]),D=()=>y(h.close),I=()=>{const e=a(v().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')).sort((e,t)=>(e=parseInt(e.getAttribute("tabindex")),(t=parseInt(t.getAttribute("tabindex")))"-1"!==e.getAttribute("tabindex"));return(t=>{const n=[];for(let e=0;eG(e))},M=()=>!H()&&!document.body.classList.contains(h["no-backdrop"]),H=()=>document.body.classList.contains(h["toast-shown"]);const q={previousBodyPadding:null},V=(t,e)=>{if(t.textContent="",e){const n=new DOMParser,o=n.parseFromString(e,"text/html");a(o.querySelector("head").childNodes).forEach(e=>{t.appendChild(e)}),a(o.querySelector("body").childNodes).forEach(e=>{t.appendChild(e)})}},N=(t,e)=>{if(!e)return!1;var n=e.split(/\s+/);for(let e=0;e{var o,i;if(o=e,i=t,a(o.classList).forEach(e=>{Object.values(h).includes(e)||Object.values(g).includes(e)||Object.values(i.showClass).includes(e)||o.classList.remove(e)}),t.customClass&&t.customClass[n]){if("string"!=typeof t.customClass[n]&&!t.customClass[n].forEach)return s("Invalid type of customClass.".concat(n,'! Expected string or iterable object, got "').concat(typeof t.customClass[n],'"'));W(e,t.customClass[n])}},F=(e,t)=>{if(!t)return null;switch(t){case"select":case"textarea":case"file":return K(e,h[t]);case"checkbox":return e.querySelector(".".concat(h.checkbox," input"));case"radio":return e.querySelector(".".concat(h.radio," input:checked"))||e.querySelector(".".concat(h.radio," input:first-child"));case"range":return e.querySelector(".".concat(h.range," input"));default:return K(e,h.input)}},R=e=>{var t;e.focus(),"file"!==e.type&&(t=e.value,e.value="",e.value=t)},z=(e,t,n)=>{e&&t&&(t="string"==typeof t?t.split(/\s+/).filter(Boolean):t).forEach(t=>{e.forEach?e.forEach(e=>{n?e.classList.add(t):e.classList.remove(t)}):n?e.classList.add(t):e.classList.remove(t)})},W=(e,t)=>{z(e,t,!0)},_=(e,t)=>{z(e,t,!1)},K=(t,n)=>{for(let e=0;e{(n=n==="".concat(parseInt(n))?parseInt(n):n)||0===parseInt(n)?e.style[t]="number"==typeof n?"".concat(n,"px"):n:e.style.removeProperty(t)},Z=(e,t="flex")=>{e.style.display=t},J=e=>{e.style.display="none"},X=(e,t,n,o)=>{const i=e.querySelector(t);i&&(i.style[n]=o)},$=(e,t,n)=>{t?Z(e,n):J(e)},G=e=>!(!e||!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)),Q=()=>!G(P())&&!G(E())&&!G(T()),ee=e=>!!(e.scrollHeight>e.clientHeight),te=e=>{const t=window.getComputedStyle(e);var n=parseFloat(t.getPropertyValue("animation-duration")||"0"),e=parseFloat(t.getPropertyValue("transition-duration")||"0");return 0{const n=j();G(n)&&(t&&(n.style.transition="none",n.style.width="100%"),setTimeout(()=>{n.style.transition="width ".concat(e/1e3,"s linear"),n.style.width="0%"},10))},oe=()=>"undefined"==typeof window||"undefined"==typeof document,ie='\n
                                        \n \n
                                          \n
                                          \n \n

                                          \n
                                          \n \n \n
                                          \n \n \n
                                          \n \n
                                          \n \n \n
                                          \n
                                          \n
                                          \n \n \n \n
                                          \n
                                          \n
                                          \n
                                          \n
                                          \n
                                          \n').replace(/(^|\n)\s*/g,""),ae=()=>{ln.isVisible()&&ln.resetValidationMessage()},se=e=>{var t=(()=>{const e=b();return!!e&&(e.remove(),_([document.documentElement,document.body],[h["no-backdrop"],h["toast-shown"],h["has-column"]]),!0)})();if(oe())r("SweetAlert2 requires document to initialize");else{const n=document.createElement("div");n.className=h.container,t&&W(n,h["no-transition"]),V(n,ie);const o="string"==typeof(t=e.target)?document.querySelector(t):t;o.appendChild(n),(e=>{const t=v();t.setAttribute("role",e.toast?"alert":"dialog"),t.setAttribute("aria-live",e.toast?"polite":"assertive"),e.toast||t.setAttribute("aria-modal","true")})(e),e=o,"rtl"===window.getComputedStyle(e).direction&&W(b(),h.rtl),(()=>{const e=v(),t=K(e,h.input),n=K(e,h.file),o=e.querySelector(".".concat(h.range," input")),i=e.querySelector(".".concat(h.range," output")),a=K(e,h.select),s=e.querySelector(".".concat(h.checkbox," input")),r=K(e,h.textarea);t.oninput=ae,n.onchange=ae,a.onchange=ae,s.onchange=ae,r.oninput=ae,o.oninput=()=>{ae(),i.value=o.value},o.onchange=()=>{ae(),o.nextSibling.value=o.value}})()}},re=(e,t)=>{e instanceof HTMLElement?t.appendChild(e):"object"==typeof e?ce(e,t):e&&V(t,e)},ce=(e,t)=>{e.jquery?le(t,e):V(t,e.toString())},le=(t,n)=>{if(t.textContent="",0 in n)for(let e=0;e in n;e++)t.appendChild(n[e].cloneNode(!0));else t.appendChild(n.cloneNode(!0))},ue=(()=>{if(oe())return!1;var e=document.createElement("div"),t={WebkitAnimation:"webkitAnimationEnd",OAnimation:"oAnimationEnd oanimationend",animation:"animationend"};for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&void 0!==e.style[n])return t[n];return!1})(),de=(e,t)=>{const n=L();var o=S(),i=P(),a=E(),s=T();(t.showConfirmButton||t.showDenyButton||t.showCancelButton?Z:J)(n),U(n,t,"actions"),pe(i,"confirm",t),pe(a,"deny",t),pe(s,"cancel",t),function(e,t,n,o){if(!o.buttonsStyling)return _([e,t,n],h.styled);W([e,t,n],h.styled),o.confirmButtonColor&&(e.style.backgroundColor=o.confirmButtonColor,W(e,h["default-outline"]));o.denyButtonColor&&(t.style.backgroundColor=o.denyButtonColor,W(t,h["default-outline"]));o.cancelButtonColor&&(n.style.backgroundColor=o.cancelButtonColor,W(n,h["default-outline"]))}(i,a,s,t),t.reverseButtons&&(n.insertBefore(s,o),n.insertBefore(a,o),n.insertBefore(i,o)),V(o,t.loaderHtml),U(o,t,"loader")};function pe(e,t,n){$(e,n["show".concat(o(t),"Button")],"inline-block"),V(e,n["".concat(t,"ButtonText")]),e.setAttribute("aria-label",n["".concat(t,"ButtonAriaLabel")]),e.className=h[t],U(e,n,"".concat(t,"Button")),W(e,n["".concat(t,"ButtonClass")])}const me=(e,t)=>{var n,o,i=b();i&&(o=i,"string"==typeof(n=t.backdrop)?o.style.background=n:n||W([document.documentElement,document.body],h["no-backdrop"]),o=i,(n=t.position)in h?W(o,h[n]):(s('The "position" parameter is not valid, defaulting to "center"'),W(o,h.center)),n=i,!(o=t.grow)||"string"!=typeof o||(o="grow-".concat(o))in h&&W(n,h[o]),U(i,t,"container"))};var he={promise:new WeakMap,innerParams:new WeakMap,domCache:new WeakMap};const ge=["input","file","range","select","radio","checkbox","textarea"],be=e=>{if(!ke[e.input])return r('Unexpected type of input! Expected "text", "email", "password", "number", "tel", "select", "radio", "checkbox", "textarea", "file" or "url", got "'.concat(e.input,'"'));var t=Ce(e.input);const n=ke[e.input](t,e);Z(n),setTimeout(()=>{R(n)})},fe=(e,t)=>{const n=F(v(),e);if(n){(t=>{for(let e=0;e{var t=Ce(e.input);e.customClass&&W(t,e.customClass.input)},ve=(e,t)=>{e.placeholder&&!t.inputPlaceholder||(e.placeholder=t.inputPlaceholder)},we=(e,t,n)=>{if(n.inputLabel){e.id=h.input;const i=document.createElement("label");var o=h["input-label"];i.setAttribute("for",e.id),i.className=o,W(i,n.customClass.inputLabel),i.innerText=n.inputLabel,t.insertAdjacentElement("beforebegin",i)}},Ce=e=>{e=h[e]||h.input;return K(v(),e)},ke={};ke.text=ke.email=ke.password=ke.number=ke.tel=ke.url=(e,t)=>("string"==typeof t.inputValue||"number"==typeof t.inputValue?e.value=t.inputValue:p(t.inputValue)||s('Unexpected type of inputValue! Expected "string", "number" or "Promise", got "'.concat(typeof t.inputValue,'"')),we(e,e,t),ve(e,t),e.type=t.input,e),ke.file=(e,t)=>(we(e,e,t),ve(e,t),e),ke.range=(e,t)=>{const n=e.querySelector("input"),o=e.querySelector("output");return n.value=t.inputValue,n.type=t.input,o.value=t.inputValue,we(n,e,t),e},ke.select=(e,t)=>{if(e.textContent="",t.inputPlaceholder){const n=document.createElement("option");V(n,t.inputPlaceholder),n.value="",n.disabled=!0,n.selected=!0,e.appendChild(n)}return we(e,e,t),e},ke.radio=e=>(e.textContent="",e),ke.checkbox=(e,t)=>{const n=F(v(),"checkbox");n.value=1,n.id=h.checkbox,n.checked=Boolean(t.inputValue);var o=e.querySelector("span");return V(o,t.inputPlaceholder),e},ke.textarea=(n,e)=>{n.value=e.inputValue,ve(n,e),we(n,n,e);return setTimeout(()=>{if("MutationObserver"in window){const t=parseInt(window.getComputedStyle(v()).width);new MutationObserver(()=>{var e,e=n.offsetWidth+(e=n,parseInt(window.getComputedStyle(e).marginLeft)+parseInt(window.getComputedStyle(e).marginRight));e>t?v().style.width="".concat(e,"px"):v().style.width=null}).observe(n,{attributes:!0,attributeFilter:["style"]})}}),n};const Ae=(e,t)=>{const n=k();U(n,t,"htmlContainer"),t.html?(re(t.html,n),Z(n,"block")):t.text?(n.textContent=t.text,Z(n,"block")):J(n),((e,o)=>{const i=v();e=he.innerParams.get(e);const a=!e||o.input!==e.input;ge.forEach(e=>{var t=h[e];const n=K(i,t);fe(e,o.inputAttributes),n.className=t,a&&J(n)}),o.input&&(a&&be(o),ye(o))})(e,t)},Be=(e,t)=>{for(const n in g)t.icon!==n&&_(e,g[n]);W(e,g[t.icon]),Ee(e,t),xe(),U(e,t,"icon")},xe=()=>{const e=v();var t=window.getComputedStyle(e).getPropertyValue("background-color");const n=e.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix");for(let e=0;e{var n;e.textContent="",t.iconHtml?V(e,Se(t.iconHtml)):"success"===t.icon?V(e,'\n
                                          \n \n
                                          \n
                                          \n '):"error"===t.icon?V(e,'\n \n \n \n \n '):(n={question:"?",warning:"!",info:"i"},V(e,Se(n[t.icon])))},Ee=(e,t)=>{if(t.iconColor){e.style.color=t.iconColor,e.style.borderColor=t.iconColor;for(const n of[".swal2-success-line-tip",".swal2-success-line-long",".swal2-x-mark-line-left",".swal2-x-mark-line-right"])X(e,n,"backgroundColor",t.iconColor);X(e,".swal2-success-ring","borderColor",t.iconColor)}},Se=e=>'
                                          ').concat(e,"
                                          "),Te=(e,o)=>{const i=B();if(!o.progressSteps||0===o.progressSteps.length)return J(i);Z(i),i.textContent="",o.currentProgressStep>=o.progressSteps.length&&s("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),o.progressSteps.forEach((e,t)=>{var n,e=(n=e,e=document.createElement("li"),W(e,h["progress-step"]),V(e,n),e);i.appendChild(e),t===o.currentProgressStep&&W(e,h["active-progress-step"]),t!==o.progressSteps.length-1&&(t=(e=>{const t=document.createElement("li");return W(t,h["progress-step-line"]),e.progressStepsDistance&&(t.style.width=e.progressStepsDistance),t})(o),i.appendChild(t))})},Le=(e,t)=>{e.className="".concat(h.popup," ").concat(G(e)?t.showClass.popup:""),t.toast?(W([document.documentElement,document.body],h["toast-shown"]),W(e,h.toast)):W(e,h.modal),U(e,t,"popup"),"string"==typeof t.customClass&&W(e,t.customClass),t.icon&&W(e,h["icon-".concat(t.icon)])},Oe=(e,t)=>{var n,o,i;(e=>{var t=b();const n=v();e.toast?(Y(t,"width",e.width),n.style.width="100%",n.insertBefore(S(),w())):Y(n,"width",e.width),Y(n,"padding",e.padding),e.background&&(n.style.background=e.background),J(x()),Le(n,e)})(t),me(0,t),Te(0,t),i=e,n=t,o=he.innerParams.get(i),i=w(),o&&n.icon===o.icon?(Pe(i,n),Be(i,n)):n.icon||n.iconHtml?n.icon&&-1===Object.keys(g).indexOf(n.icon)?(r('Unknown icon! Expected "success", "error", "warning", "info" or "question", got "'.concat(n.icon,'"')),J(i)):(Z(i),Pe(i,n),Be(i,n),W(i,n.showClass.icon)):J(i),(e=>{const t=A();if(!e.imageUrl)return J(t);Z(t,""),t.setAttribute("src",e.imageUrl),t.setAttribute("alt",e.imageAlt),Y(t,"width",e.imageWidth),Y(t,"height",e.imageHeight),t.className=h.image,U(t,e,"image")})(t),(e=>{const t=C();$(t,e.title||e.titleText,"block"),e.title&&re(e.title,t),e.titleText&&(t.innerText=e.titleText),U(t,e,"title")})(t),(e=>{const t=D();V(t,e.closeButtonHtml),U(t,e,"closeButton"),$(t,e.showCloseButton),t.setAttribute("aria-label",e.closeButtonAriaLabel)})(t),Ae(e,t),de(0,t),i=t,e=O(),$(e,i.footer),i.footer&&re(i.footer,e),U(e,i,"footer"),"function"==typeof t.didRender&&t.didRender(v())};const je=()=>P()&&P().click();const De=e=>{let t=v();t||ln.fire(),t=v();var n=S();H()?J(w()):Ie(t,e),Z(n),t.setAttribute("data-loading",!0),t.setAttribute("aria-busy",!0),t.focus()},Ie=(e,t)=>{var n=L();const o=S();!t&&G(P())&&(t=P()),Z(n),t&&(J(t),o.setAttribute("data-button-to-replace",t.className)),o.parentNode.insertBefore(o,t),W([e,n],h.loading)},Me={},He=o=>new Promise(e=>{if(!o)return e();var t=window.scrollX,n=window.scrollY;Me.restoreFocusTimeout=setTimeout(()=>{Me.previousActiveElement&&Me.previousActiveElement.focus?(Me.previousActiveElement.focus(),Me.previousActiveElement=null):document.body&&document.body.focus(),e()},100),window.scrollTo(t,n)});const qe=()=>{if(Me.timeout)return(()=>{const e=j();var t=parseInt(window.getComputedStyle(e).width);e.style.removeProperty("transition"),e.style.width="100%";var n=parseInt(window.getComputedStyle(e).width),n=parseInt(t/n*100);e.style.removeProperty("transition"),e.style.width="".concat(n,"%")})(),Me.timeout.stop()},Ve=()=>{if(Me.timeout){var e=Me.timeout.start();return ne(e),e}};let Ne=!1;const Ue={};const Fe=t=>{for(let e=t.target;e&&e!==document;e=e.parentNode)for(const o in Ue){var n=e.getAttribute(o);if(n)return void Ue[o].fire({template:n})}},Re={title:"",titleText:"",text:"",html:"",footer:"",icon:void 0,iconColor:void 0,iconHtml:void 0,template:void 0,toast:!1,showClass:{popup:"swal2-show",backdrop:"swal2-backdrop-show",icon:"swal2-icon-show"},hideClass:{popup:"swal2-hide",backdrop:"swal2-backdrop-hide",icon:"swal2-icon-hide"},customClass:{},target:"body",backdrop:!0,heightAuto:!0,allowOutsideClick:!0,allowEscapeKey:!0,allowEnterKey:!0,stopKeydownPropagation:!0,keydownListenerCapture:!1,showConfirmButton:!0,showDenyButton:!1,showCancelButton:!1,preConfirm:void 0,preDeny:void 0,confirmButtonText:"OK",confirmButtonAriaLabel:"",confirmButtonColor:void 0,denyButtonText:"No",denyButtonAriaLabel:"",denyButtonColor:void 0,cancelButtonText:"Cancel",cancelButtonAriaLabel:"",cancelButtonColor:void 0,buttonsStyling:!0,reverseButtons:!1,focusConfirm:!0,focusDeny:!1,focusCancel:!1,returnFocus:!0,showCloseButton:!1,closeButtonHtml:"×",closeButtonAriaLabel:"Close this dialog",loaderHtml:"",showLoaderOnConfirm:!1,showLoaderOnDeny:!1,imageUrl:void 0,imageWidth:void 0,imageHeight:void 0,imageAlt:"",timer:void 0,timerProgressBar:!1,width:void 0,padding:void 0,background:void 0,input:void 0,inputPlaceholder:"",inputLabel:"",inputValue:"",inputOptions:{},inputAutoTrim:!0,inputAttributes:{},inputValidator:void 0,returnInputValueOnDeny:!1,validationMessage:void 0,grow:!1,position:"center",progressSteps:[],currentProgressStep:void 0,progressStepsDistance:void 0,willOpen:void 0,didOpen:void 0,didRender:void 0,willClose:void 0,didClose:void 0,didDestroy:void 0,scrollbarPadding:!0},ze=["allowEscapeKey","allowOutsideClick","background","buttonsStyling","cancelButtonAriaLabel","cancelButtonColor","cancelButtonText","closeButtonAriaLabel","closeButtonHtml","confirmButtonAriaLabel","confirmButtonColor","confirmButtonText","currentProgressStep","customClass","denyButtonAriaLabel","denyButtonColor","denyButtonText","didClose","didDestroy","footer","hideClass","html","icon","iconColor","iconHtml","imageAlt","imageHeight","imageUrl","imageWidth","preConfirm","preDeny","progressSteps","returnFocus","reverseButtons","showCancelButton","showCloseButton","showConfirmButton","showDenyButton","text","title","titleText","willClose"],We={},_e=["allowOutsideClick","allowEnterKey","backdrop","focusConfirm","focusDeny","focusCancel","returnFocus","heightAuto","keydownListenerCapture"],Ke=e=>Object.prototype.hasOwnProperty.call(Re,e);const Ye=e=>We[e],Ze=e=>{!e.backdrop&&e.allowOutsideClick&&s('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`');for(const o in e)n=o,Ke(n)||s('Unknown parameter "'.concat(n,'"')),e.toast&&(t=o,_e.includes(t)&&s('The parameter "'.concat(t,'" is incompatible with toasts'))),t=o,Ye(t)&&i(t,Ye(t));var t,n};var Je=Object.freeze({isValidParameter:Ke,isUpdatableParameter:e=>-1!==ze.indexOf(e),isDeprecatedParameter:Ye,argsToParams:n=>{const o={};return"object"!=typeof n[0]||m(n[0])?["title","html","icon"].forEach((e,t)=>{t=n[t];"string"==typeof t||m(t)?o[e]=t:void 0!==t&&r("Unexpected type of ".concat(e,'! Expected "string" or "Element", got ').concat(typeof t))}):Object.assign(o,n[0]),o},isVisible:()=>G(v()),clickConfirm:je,clickDeny:()=>E()&&E().click(),clickCancel:()=>T()&&T().click(),getContainer:b,getPopup:v,getTitle:C,getHtmlContainer:k,getImage:A,getIcon:w,getInputLabel:()=>y(h["input-label"]),getCloseButton:D,getActions:L,getConfirmButton:P,getDenyButton:E,getCancelButton:T,getLoader:S,getFooter:O,getTimerProgressBar:j,getFocusableElements:I,getValidationMessage:x,isLoading:()=>v().hasAttribute("data-loading"),fire:function(...e){return new this(...e)},mixin:function(n){class e extends this{_main(e,t){return super._main(e,Object.assign({},n,t))}}return e},showLoading:De,enableLoading:De,getTimerLeft:()=>Me.timeout&&Me.timeout.getTimerLeft(),stopTimer:qe,resumeTimer:Ve,toggleTimer:()=>{var e=Me.timeout;return e&&(e.running?qe:Ve)()},increaseTimer:e=>{if(Me.timeout){e=Me.timeout.increase(e);return ne(e,!0),e}},isTimerRunning:()=>Me.timeout&&Me.timeout.isRunning(),bindClickHandler:function(e="data-swal-template"){Ue[e]=this,Ne||(document.body.addEventListener("click",Fe),Ne=!0)}});function Xe(){var e=he.innerParams.get(this);if(e){const t=he.domCache.get(this);J(t.loader),H()?e.icon&&Z(w()):(e=>{const t=e.popup.getElementsByClassName(e.loader.getAttribute("data-button-to-replace"));if(t.length)Z(t[0],"inline-block");else if(Q())J(e.actions)})(t),_([t.popup,t.actions],h.loading),t.popup.removeAttribute("aria-busy"),t.popup.removeAttribute("data-loading"),t.confirmButton.disabled=!1,t.denyButton.disabled=!1,t.cancelButton.disabled=!1}}const $e=()=>{null===q.previousBodyPadding&&document.body.scrollHeight>window.innerHeight&&(q.previousBodyPadding=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight="".concat(q.previousBodyPadding+(()=>{const e=document.createElement("div");e.className=h["scrollbar-measure"],document.body.appendChild(e);var t=e.getBoundingClientRect().width-e.clientWidth;return document.body.removeChild(e),t})(),"px"))},Ge=()=>{navigator.userAgent.match(/(CriOS|FxiOS|EdgiOS|YaBrowser|UCBrowser)/i)||v().scrollHeight>window.innerHeight-44&&(b().style.paddingBottom="".concat(44,"px"))},Qe=()=>{const e=b();let t;e.ontouchstart=e=>{t=et(e)},e.ontouchmove=e=>{t&&(e.preventDefault(),e.stopPropagation())}},et=e=>{var t=e.target,n=b();return!tt(e)&&!nt(e)&&(t===n||!(ee(n)||"INPUT"===t.tagName||"TEXTAREA"===t.tagName||ee(k())&&k().contains(t)))},tt=e=>e.touches&&e.touches.length&&"stylus"===e.touches[0].touchType,nt=e=>e.touches&&1{const e=a(document.body.children);e.forEach(e=>{e.hasAttribute("data-previous-aria-hidden")?(e.setAttribute("aria-hidden",e.getAttribute("data-previous-aria-hidden")),e.removeAttribute("data-previous-aria-hidden")):e.removeAttribute("aria-hidden")})};var it={swalPromiseResolve:new WeakMap};function at(e,t,n,o){H()?ct(e,o):(He(n).then(()=>ct(e,o)),Me.keydownTarget.removeEventListener("keydown",Me.keydownHandler,{capture:Me.keydownListenerCapture}),Me.keydownHandlerAdded=!1),/^((?!chrome|android).)*safari/i.test(navigator.userAgent)?(t.setAttribute("style","display:none !important"),t.removeAttribute("class"),t.innerHTML=""):t.remove(),M()&&(null!==q.previousBodyPadding&&(document.body.style.paddingRight="".concat(q.previousBodyPadding,"px"),q.previousBodyPadding=null),N(document.body,h.iosfix)&&(t=parseInt(document.body.style.top,10),_(document.body,h.iosfix),document.body.style.top="",document.body.scrollTop=-1*t),ot()),_([document.documentElement,document.body],[h.shown,h["height-auto"],h["no-backdrop"],h["toast-shown"]])}function st(e){var t=v();if(t){e=void 0!==(o=e)?Object.assign({isConfirmed:!1,isDenied:!1,isDismissed:!1},o):{isConfirmed:!1,isDenied:!1,isDismissed:!0};var n=he.innerParams.get(this);if(n&&!N(t,n.hideClass.popup)){const i=it.swalPromiseResolve.get(this);_(t,n.showClass.popup),W(t,n.hideClass.popup);var o=b();_(o,n.showClass.backdrop),W(o,n.hideClass.backdrop),((e,t,n)=>{const o=b(),i=ue&&te(t);if(typeof n.willClose==="function")n.willClose(t);if(i)rt(e,t,o,n.returnFocus,n.didClose);else at(e,o,n.returnFocus,n.didClose)})(this,t,n),i(e)}}}const rt=(e,t,n,o,i)=>{Me.swalCloseEventFinishedCallback=at.bind(null,e,n,o,i),t.addEventListener(ue,function(e){e.target===t&&(Me.swalCloseEventFinishedCallback(),delete Me.swalCloseEventFinishedCallback)})},ct=(e,t)=>{setTimeout(()=>{"function"==typeof t&&t.bind(e.params)(),e._destroy()})};function lt(e,t,n){const o=he.domCache.get(e);t.forEach(e=>{o[e].disabled=n})}function ut(e,t){if(!e)return!1;if("radio"===e.type){const n=e.parentNode.parentNode,o=n.querySelectorAll("input");for(let e=0;e/^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]{2,24}$/.test(e)?Promise.resolve():Promise.resolve(t||"Invalid email address"),url:(e,t)=>/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(e)?Promise.resolve():Promise.resolve(t||"Invalid URL")};function mt(e){var t,n;(t=e).inputValidator||Object.keys(pt).forEach(e=>{t.input===e&&(t.inputValidator=pt[e])}),e.showLoaderOnConfirm&&!e.preConfirm&&s("showLoaderOnConfirm is set to true, but preConfirm is not defined.\nshowLoaderOnConfirm should be used together with preConfirm, see usage example:\nhttps://sweetalert2.github.io/#ajax-request"),(n=e).target&&("string"!=typeof n.target||document.querySelector(n.target))&&("string"==typeof n.target||n.target.appendChild)||(s('Target parameter is not valid, defaulting to "body"'),n.target="body"),"string"==typeof e.title&&(e.title=e.title.split("\n").join("
                                          ")),se(e)}const ht=["swal-title","swal-html","swal-footer"],gt=e=>{e="string"==typeof e.template?document.querySelector(e.template):e.template;if(!e)return{};e=e.content;return kt(e),Object.assign(bt(e),ft(e),yt(e),vt(e),wt(e),Ct(e,ht))},bt=e=>{const o={};return a(e.querySelectorAll("swal-param")).forEach(e=>{At(e,["name","value"]);var t=e.getAttribute("name");let n=e.getAttribute("value");"boolean"==typeof Re[t]&&"false"===n&&(n=!1),"object"==typeof Re[t]&&(n=JSON.parse(n)),o[t]=n}),o},ft=e=>{const n={};return a(e.querySelectorAll("swal-button")).forEach(e=>{At(e,["type","color","aria-label"]);var t=e.getAttribute("type");n["".concat(t,"ButtonText")]=e.innerHTML,n["show".concat(o(t),"Button")]=!0,e.hasAttribute("color")&&(n["".concat(t,"ButtonColor")]=e.getAttribute("color")),e.hasAttribute("aria-label")&&(n["".concat(t,"ButtonAriaLabel")]=e.getAttribute("aria-label"))}),n},yt=e=>{const t={},n=e.querySelector("swal-image");return n&&(At(n,["src","width","height","alt"]),n.hasAttribute("src")&&(t.imageUrl=n.getAttribute("src")),n.hasAttribute("width")&&(t.imageWidth=n.getAttribute("width")),n.hasAttribute("height")&&(t.imageHeight=n.getAttribute("height")),n.hasAttribute("alt")&&(t.imageAlt=n.getAttribute("alt"))),t},vt=e=>{const t={},n=e.querySelector("swal-icon");return n&&(At(n,["type","color"]),n.hasAttribute("type")&&(t.icon=n.getAttribute("type")),n.hasAttribute("color")&&(t.iconColor=n.getAttribute("color")),t.iconHtml=n.innerHTML),t},wt=e=>{const n={},t=e.querySelector("swal-input");t&&(At(t,["type","label","placeholder","value"]),n.input=t.getAttribute("type")||"text",t.hasAttribute("label")&&(n.inputLabel=t.getAttribute("label")),t.hasAttribute("placeholder")&&(n.inputPlaceholder=t.getAttribute("placeholder")),t.hasAttribute("value")&&(n.inputValue=t.getAttribute("value")));e=e.querySelectorAll("swal-input-option");return e.length&&(n.inputOptions={},a(e).forEach(e=>{At(e,["value"]);var t=e.getAttribute("value"),e=e.innerHTML;n.inputOptions[t]=e})),n},Ct=(e,t)=>{const n={};for(const o in t){const i=t[o],a=e.querySelector(i);a&&(At(a,[]),n[i.replace(/^swal-/,"")]=a.innerHTML.trim())}return n},kt=e=>{const t=ht.concat(["swal-param","swal-button","swal-image","swal-icon","swal-input","swal-input-option"]);a(e.children).forEach(e=>{e=e.tagName.toLowerCase();-1===t.indexOf(e)&&s("Unrecognized element <".concat(e,">"))})},At=(t,n)=>{a(t.attributes).forEach(e=>{-1===n.indexOf(e.name)&&s(['Unrecognized attribute "'.concat(e.name,'" on <').concat(t.tagName.toLowerCase(),">."),"".concat(n.length?"Allowed attributes are: ".concat(n.join(", ")):"To set the value, use HTML within the element.")])})},Bt=e=>{const t=b(),n=v();"function"==typeof e.willOpen&&e.willOpen(n);var o=window.getComputedStyle(document.body).overflowY;St(t,n,e),setTimeout(()=>{Pt(t,n)},10),M()&&(Et(t,e.scrollbarPadding,o),(()=>{const e=a(document.body.children);e.forEach(e=>{e===b()||e.contains(b())||(e.hasAttribute("aria-hidden")&&e.setAttribute("data-previous-aria-hidden",e.getAttribute("aria-hidden")),e.setAttribute("aria-hidden","true"))})})()),H()||Me.previousActiveElement||(Me.previousActiveElement=document.activeElement),"function"==typeof e.didOpen&&setTimeout(()=>e.didOpen(n)),_(t,h["no-transition"])},xt=e=>{const t=v();if(e.target===t){const n=b();t.removeEventListener(ue,xt),n.style.overflowY="auto"}},Pt=(e,t)=>{ue&&te(t)?(e.style.overflowY="hidden",t.addEventListener(ue,xt)):e.style.overflowY="auto"},Et=(e,t,n)=>{var o;(/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream||"MacIntel"===navigator.platform&&1{e.scrollTop=0})},St=(e,t,n)=>{W(e,n.showClass.backdrop),t.style.setProperty("opacity","0","important"),Z(t,"grid"),setTimeout(()=>{W(t,n.showClass.popup),t.style.removeProperty("opacity")},10),W([document.documentElement,document.body],h.shown),n.heightAuto&&n.backdrop&&!n.toast&&W([document.documentElement,document.body],h["height-auto"])},Tt=e=>e.checked?1:0,Lt=e=>e.checked?e.value:null,Ot=e=>e.files.length?null!==e.getAttribute("multiple")?e.files:e.files[0]:null,jt=(t,n)=>{const o=v(),i=e=>It[n.input](o,Mt(e),n);u(n.inputOptions)||p(n.inputOptions)?(De(P()),d(n.inputOptions).then(e=>{t.hideLoading(),i(e)})):"object"==typeof n.inputOptions?i(n.inputOptions):r("Unexpected type of inputOptions! Expected object, Map or Promise, got ".concat(typeof n.inputOptions))},Dt=(t,n)=>{const o=t.getInput();J(o),d(n.inputValue).then(e=>{o.value="number"===n.input?parseFloat(e)||0:"".concat(e),Z(o),o.focus(),t.hideLoading()}).catch(e=>{r("Error in inputValue promise: ".concat(e)),o.value="",Z(o),o.focus(),t.hideLoading()})},It={select:(e,t,i)=>{const a=K(e,h.select),s=(e,t,n)=>{const o=document.createElement("option");o.value=n,V(o,t),o.selected=Ht(n,i.inputValue),e.appendChild(o)};t.forEach(e=>{var t=e[0];const n=e[1];if(Array.isArray(n)){const o=document.createElement("optgroup");o.label=t,o.disabled=!1,a.appendChild(o),n.forEach(e=>s(o,e[1],e[0]))}else s(a,n,t)}),a.focus()},radio:(e,t,a)=>{const s=K(e,h.radio);t.forEach(e=>{var t=e[0],e=e[1];const n=document.createElement("input"),o=document.createElement("label");n.type="radio",n.name=h.radio,n.value=t,Ht(t,a.inputValue)&&(n.checked=!0);const i=document.createElement("span");V(i,e),i.className=h.label,o.appendChild(n),o.appendChild(i),s.appendChild(o)});const n=s.querySelectorAll("input");n.length&&n[0].focus()}},Mt=n=>{const o=[];return"undefined"!=typeof Map&&n instanceof Map?n.forEach((e,t)=>{let n=e;"object"==typeof n&&(n=Mt(n)),o.push([t,n])}):Object.keys(n).forEach(e=>{let t=n[e];"object"==typeof t&&(t=Mt(t)),o.push([e,t])}),o},Ht=(e,t)=>t&&t.toString()===e.toString(),qt=(e,t)=>{var n=he.innerParams.get(e),o=((e,t)=>{const n=e.getInput();if(!n)return null;switch(t.input){case"checkbox":return Tt(n);case"radio":return Lt(n);case"file":return Ot(n);default:return t.inputAutoTrim?n.value.trim():n.value}})(e,n);n.inputValidator?Vt(e,o,t):e.getInput().checkValidity()?("deny"===t?Nt:Ft)(e,o):(e.enableButtons(),e.showValidationMessage(n.validationMessage))},Vt=(t,n,o)=>{const e=he.innerParams.get(t);t.disableInput();const i=Promise.resolve().then(()=>d(e.inputValidator(n,e.validationMessage)));i.then(e=>{t.enableButtons(),t.enableInput(),e?t.showValidationMessage(e):("deny"===o?Nt:Ft)(t,n)})},Nt=(t,n)=>{const e=he.innerParams.get(t||void 0);if(e.showLoaderOnDeny&&De(E()),e.preDeny){const o=Promise.resolve().then(()=>d(e.preDeny(n,e.validationMessage)));o.then(e=>{!1===e?t.hideLoading():t.closePopup({isDenied:!0,value:void 0===e?n:e})})}else t.closePopup({isDenied:!0,value:n})},Ut=(e,t)=>{e.closePopup({isConfirmed:!0,value:t})},Ft=(t,n)=>{const e=he.innerParams.get(t||void 0);if(e.showLoaderOnConfirm&&De(),e.preConfirm){t.resetValidationMessage();const o=Promise.resolve().then(()=>d(e.preConfirm(n,e.validationMessage)));o.then(e=>{G(x())||!1===e?t.hideLoading():Ut(t,void 0===e?n:e)})}else Ut(t,n)},Rt=(e,t,n)=>{const o=I();if(o.length)return(t+=n)===o.length?t=0:-1===t&&(t=o.length-1),o[t].focus();v().focus()},zt=["ArrowRight","ArrowDown"],Wt=["ArrowLeft","ArrowUp"],_t=(e,t,n)=>{var o=he.innerParams.get(e);o&&(o.stopKeydownPropagation&&t.stopPropagation(),"Enter"===t.key?Kt(e,t,o):"Tab"===t.key?Yt(t,o):[...zt,...Wt].includes(t.key)?Zt(t.key):"Escape"===t.key&&Jt(t,o,n))},Kt=(e,t,n)=>{t.isComposing||t.target&&e.getInput()&&t.target.outerHTML===e.getInput().outerHTML&&(["textarea","file"].includes(n.input)||(je(),t.preventDefault()))},Yt=(e,t)=>{var n=e.target,o=I();let i=-1;for(let e=0;e{const t=P(),n=E(),o=T();if([t,n,o].includes(document.activeElement)){e=zt.includes(e)?"nextElementSibling":"previousElementSibling";const i=document.activeElement[e];i&&i.focus()}},Jt=(e,t,n)=>{c(t.allowEscapeKey)&&(e.preventDefault(),n(l.esc))},Xt=(t,e,n)=>{e.popup.onclick=()=>{var e=he.innerParams.get(t);e.showConfirmButton||e.showDenyButton||e.showCancelButton||e.showCloseButton||e.timer||e.input||n(l.close)}};let $t=!1;const Gt=t=>{t.popup.onmousedown=()=>{t.container.onmouseup=function(e){t.container.onmouseup=void 0,e.target===t.container&&($t=!0)}}},Qt=t=>{t.container.onmousedown=()=>{t.popup.onmouseup=function(e){t.popup.onmouseup=void 0,e.target!==t.popup&&!t.popup.contains(e.target)||($t=!0)}}},en=(n,o,i)=>{o.container.onclick=e=>{var t=he.innerParams.get(n);$t?$t=!1:e.target===o.container&&c(t.allowOutsideClick)&&i(l.backdrop)}};const tn=(e,t,n)=>{var o=j();J(o),t.timer&&(e.timeout=new dt(()=>{n("timer"),delete e.timeout},t.timer),t.timerProgressBar&&(Z(o),setTimeout(()=>{e.timeout&&e.timeout.running&&ne(t.timer)})))},nn=(e,t)=>{if(!t.toast)return c(t.allowEnterKey)?void(on(e,t)||Rt(0,-1,1)):an()},on=(e,t)=>t.focusDeny&&G(e.denyButton)?(e.denyButton.focus(),!0):t.focusCancel&&G(e.cancelButton)?(e.cancelButton.focus(),!0):!(!t.focusConfirm||!G(e.confirmButton))&&(e.confirmButton.focus(),!0),an=()=>{document.activeElement&&"function"==typeof document.activeElement.blur&&document.activeElement.blur()};const sn=e=>{for(const t in e)e[t]=new WeakMap};e=Object.freeze({hideLoading:Xe,disableLoading:Xe,getInput:function(e){var t=he.innerParams.get(e||this);return(e=he.domCache.get(e||this))?F(e.popup,t.input):null},close:st,closePopup:st,closeModal:st,closeToast:st,enableButtons:function(){lt(this,["confirmButton","denyButton","cancelButton"],!1)},disableButtons:function(){lt(this,["confirmButton","denyButton","cancelButton"],!0)},enableInput:function(){return ut(this.getInput(),!1)},disableInput:function(){return ut(this.getInput(),!0)},showValidationMessage:function(e){const t=he.domCache.get(this);var n=he.innerParams.get(this);V(t.validationMessage,e),t.validationMessage.className=h["validation-message"],n.customClass&&n.customClass.validationMessage&&W(t.validationMessage,n.customClass.validationMessage),Z(t.validationMessage);const o=this.getInput();o&&(o.setAttribute("aria-invalid",!0),o.setAttribute("aria-describedby",h["validation-message"]),R(o),W(o,h.inputerror))},resetValidationMessage:function(){var e=he.domCache.get(this);e.validationMessage&&J(e.validationMessage);const t=this.getInput();t&&(t.removeAttribute("aria-invalid"),t.removeAttribute("aria-describedby"),_(t,h.inputerror))},getProgressSteps:function(){return he.domCache.get(this).progressSteps},_main:function(e,t={}){Ze(Object.assign({},t,e)),Me.currentInstance&&(Me.currentInstance._destroy(),M()&&ot()),Me.currentInstance=this,mt(e=((e,t)=>{const n=gt(e),o=Object.assign({},Re,t,n,e);return o.showClass=Object.assign({},Re.showClass,o.showClass),o.hideClass=Object.assign({},Re.hideClass,o.hideClass),o})(e,t)),Object.freeze(e),Me.timeout&&(Me.timeout.stop(),delete Me.timeout),clearTimeout(Me.restoreFocusTimeout);var s,r,c,t=(e=>{const t={popup:v(),container:b(),actions:L(),confirmButton:P(),denyButton:E(),cancelButton:T(),loader:S(),closeButton:D(),validationMessage:x(),progressSteps:B()};return he.domCache.set(e,t),t})(this);return Oe(this,e),he.innerParams.set(this,e),s=this,r=t,c=e,new Promise(e=>{const t=e=>{s.closePopup({isDismissed:!0,dismiss:e})};var n,o,i,a;it.swalPromiseResolve.set(s,e),r.confirmButton.onclick=()=>(e=>{var t=he.innerParams.get(e);e.disableButtons(),t.input?qt(e,"confirm"):Ft(e,!0)})(s),r.denyButton.onclick=()=>(e=>{var t=he.innerParams.get(e);e.disableButtons(),t.returnInputValueOnDeny?qt(e,"deny"):Nt(e,!1)})(s),r.cancelButton.onclick=()=>((e,t)=>{e.disableButtons(),t(l.cancel)})(s,t),r.closeButton.onclick=()=>t(l.close),n=s,a=r,e=t,he.innerParams.get(n).toast?Xt(n,a,e):(Gt(a),Qt(a),en(n,a,e)),o=s,a=Me,e=c,i=t,a.keydownTarget&&a.keydownHandlerAdded&&(a.keydownTarget.removeEventListener("keydown",a.keydownHandler,{capture:a.keydownListenerCapture}),a.keydownHandlerAdded=!1),e.toast||(a.keydownHandler=e=>_t(o,e,i),a.keydownTarget=e.keydownListenerCapture?window:v(),a.keydownListenerCapture=e.keydownListenerCapture,a.keydownTarget.addEventListener("keydown",a.keydownHandler,{capture:a.keydownListenerCapture}),a.keydownHandlerAdded=!0),e=s,"select"===(a=c).input||"radio"===a.input?jt(e,a):["text","email","number","tel","textarea"].includes(a.input)&&(u(a.inputValue)||p(a.inputValue))&&(De(P()),Dt(e,a)),Bt(c),tn(Me,c,t),nn(r,c),setTimeout(()=>{r.container.scrollTop=0})})},update:function(t){var e=v(),n=he.innerParams.get(this);if(!e||N(e,n.hideClass.popup))return s("You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup.");const o={};Object.keys(t).forEach(e=>{ln.isUpdatableParameter(e)?o[e]=t[e]:s('Invalid parameter to update: "'.concat(e,'". Updatable params are listed here: https://github.com/sweetalert2/sweetalert2/blob/master/src/utils/params.js\n\nIf you think this parameter should be updatable, request it here: https://github.com/sweetalert2/sweetalert2/issues/new?template=02_feature_request.md'))}),n=Object.assign({},n,o),Oe(this,n),he.innerParams.set(this,n),Object.defineProperties(this,{params:{value:Object.assign({},this.params,t),writable:!1,enumerable:!0}})},_destroy:function(){var e=he.domCache.get(this);const t=he.innerParams.get(this);t&&(e.popup&&Me.swalCloseEventFinishedCallback&&(Me.swalCloseEventFinishedCallback(),delete Me.swalCloseEventFinishedCallback),Me.deferDisposalTimer&&(clearTimeout(Me.deferDisposalTimer),delete Me.deferDisposalTimer),"function"==typeof t.didDestroy&&t.didDestroy(),delete this.params,delete Me.keydownHandler,delete Me.keydownTarget,sn(he),sn(it),delete Me.currentInstance)}});let rn;class cn{constructor(...e){"undefined"!=typeof window&&(rn=this,e=Object.freeze(this.constructor.argsToParams(e)),Object.defineProperties(this,{params:{value:e,writable:!1,enumerable:!0,configurable:!0}}),e=this._main(this.params),he.promise.set(this,e))}then(e){const t=he.promise.get(this);return t.then(e)}finally(e){const t=he.promise.get(this);return t.finally(e)}}Object.assign(cn.prototype,e),Object.assign(cn,Je),Object.keys(e).forEach(t=>{cn[t]=function(...e){if(rn)return rn[t](...e)}}),cn.DismissReason=l,cn.version="11.1.5";const ln=cn;return ln.default=ln,ln}),void 0!==this&&this.Sweetalert2&&(this.swal=this.sweetAlert=this.Swal=this.SweetAlert=this.Sweetalert2); \ No newline at end of file diff --git a/modules/docs/src/Volo.Docs.Admin.HttpApi.Client/ClientProxies/DocumentsAdminClientProxy.Generated.cs b/modules/docs/src/Volo.Docs.Admin.HttpApi.Client/ClientProxies/DocumentsAdminClientProxy.Generated.cs index e715ceddc4..642e1808c6 100644 --- a/modules/docs/src/Volo.Docs.Admin.HttpApi.Client/ClientProxies/DocumentsAdminClientProxy.Generated.cs +++ b/modules/docs/src/Volo.Docs.Admin.HttpApi.Client/ClientProxies/DocumentsAdminClientProxy.Generated.cs @@ -17,32 +17,50 @@ namespace Volo.Docs.Admin.ClientProxies { public virtual async Task ClearCacheAsync(ClearCacheInput input) { - await RequestAsync(nameof(ClearCacheAsync), input); + await RequestAsync(nameof(ClearCacheAsync), new ClientProxyRequestTypeValue + { + { typeof(ClearCacheInput), input } + }); } public virtual async Task PullAllAsync(PullAllDocumentInput input) { - await RequestAsync(nameof(PullAllAsync), input); + await RequestAsync(nameof(PullAllAsync), new ClientProxyRequestTypeValue + { + { typeof(PullAllDocumentInput), input } + }); } public virtual async Task PullAsync(PullDocumentInput input) { - await RequestAsync(nameof(PullAsync), input); + await RequestAsync(nameof(PullAsync), new ClientProxyRequestTypeValue + { + { typeof(PullDocumentInput), input } + }); } public virtual async Task> GetAllAsync(GetAllInput input) { - return await RequestAsync>(nameof(GetAllAsync), input); + return await RequestAsync>(nameof(GetAllAsync), new ClientProxyRequestTypeValue + { + { typeof(GetAllInput), input } + }); } public virtual async Task RemoveFromCacheAsync(Guid documentId) { - await RequestAsync(nameof(RemoveFromCacheAsync), documentId); + await RequestAsync(nameof(RemoveFromCacheAsync), new ClientProxyRequestTypeValue + { + { typeof(Guid), documentId } + }); } public virtual async Task ReindexAsync(Guid documentId) { - await RequestAsync(nameof(ReindexAsync), documentId); + await RequestAsync(nameof(ReindexAsync), new ClientProxyRequestTypeValue + { + { typeof(Guid), documentId } + }); } } } diff --git a/modules/docs/src/Volo.Docs.Admin.HttpApi.Client/ClientProxies/ProjectsAdminClientProxy.Generated.cs b/modules/docs/src/Volo.Docs.Admin.HttpApi.Client/ClientProxies/ProjectsAdminClientProxy.Generated.cs index 9ffe72edd7..66180b158c 100644 --- a/modules/docs/src/Volo.Docs.Admin.HttpApi.Client/ClientProxies/ProjectsAdminClientProxy.Generated.cs +++ b/modules/docs/src/Volo.Docs.Admin.HttpApi.Client/ClientProxies/ProjectsAdminClientProxy.Generated.cs @@ -17,27 +17,43 @@ namespace Volo.Docs.Admin.ClientProxies { public virtual async Task> GetListAsync(PagedAndSortedResultRequestDto input) { - return await RequestAsync>(nameof(GetListAsync), input); + return await RequestAsync>(nameof(GetListAsync), new ClientProxyRequestTypeValue + { + { typeof(PagedAndSortedResultRequestDto), input } + }); } public virtual async Task GetAsync(Guid id) { - return await RequestAsync(nameof(GetAsync), id); + return await RequestAsync(nameof(GetAsync), new ClientProxyRequestTypeValue + { + { typeof(Guid), id } + }); } public virtual async Task CreateAsync(CreateProjectDto input) { - return await RequestAsync(nameof(CreateAsync), input); + return await RequestAsync(nameof(CreateAsync), new ClientProxyRequestTypeValue + { + { typeof(CreateProjectDto), input } + }); } public virtual async Task UpdateAsync(Guid id, UpdateProjectDto input) { - return await RequestAsync(nameof(UpdateAsync), id, input); + return await RequestAsync(nameof(UpdateAsync), new ClientProxyRequestTypeValue + { + { typeof(Guid), id }, + { typeof(UpdateProjectDto), input } + }); } public virtual async Task DeleteAsync(Guid id) { - await RequestAsync(nameof(DeleteAsync), id); + await RequestAsync(nameof(DeleteAsync), new ClientProxyRequestTypeValue + { + { typeof(Guid), id } + }); } public virtual async Task ReindexAllAsync() @@ -47,7 +63,10 @@ namespace Volo.Docs.Admin.ClientProxies public virtual async Task ReindexAsync(ReindexInput input) { - await RequestAsync(nameof(ReindexAsync), input); + await RequestAsync(nameof(ReindexAsync), new ClientProxyRequestTypeValue + { + { typeof(ReindexInput), input } + }); } } } diff --git a/modules/docs/src/Volo.Docs.EntityFrameworkCore/Volo/Docs/EntityFrameworkCore/DocsDbContextModelBuilderExtensions.cs b/modules/docs/src/Volo.Docs.EntityFrameworkCore/Volo/Docs/EntityFrameworkCore/DocsDbContextModelBuilderExtensions.cs index 6f7c7d1a89..f3a5997048 100644 --- a/modules/docs/src/Volo.Docs.EntityFrameworkCore/Volo/Docs/EntityFrameworkCore/DocsDbContextModelBuilderExtensions.cs +++ b/modules/docs/src/Volo.Docs.EntityFrameworkCore/Volo/Docs/EntityFrameworkCore/DocsDbContextModelBuilderExtensions.cs @@ -1,5 +1,4 @@ -using System; -using JetBrains.Annotations; +using JetBrains.Annotations; using Microsoft.EntityFrameworkCore; using Volo.Abp; using Volo.Abp.EntityFrameworkCore.Modeling; @@ -11,8 +10,7 @@ namespace Volo.Docs.EntityFrameworkCore public static class DocsDbContextModelBuilderExtensions { public static void ConfigureDocs( - [NotNull] this ModelBuilder builder, - Action optionsAction = null) + [NotNull] this ModelBuilder builder) { Check.NotNull(builder, nameof(builder)); @@ -21,16 +19,9 @@ namespace Volo.Docs.EntityFrameworkCore return; } - var options = new DocsModelBuilderConfigurationOptions( - DocsDbProperties.DbTablePrefix, - DocsDbProperties.DbSchema - ); - - optionsAction?.Invoke(options); - builder.Entity(b => { - b.ToTable(options.TablePrefix + "Projects", options.Schema); + b.ToTable(DocsDbProperties.DbTablePrefix + "Projects", DocsDbProperties.DbSchema); b.ConfigureByConvention(); @@ -46,7 +37,7 @@ namespace Volo.Docs.EntityFrameworkCore builder.Entity(b => { - b.ToTable(options.TablePrefix + "Documents", options.Schema); + b.ToTable(DocsDbProperties.DbTablePrefix + "Documents", DocsDbProperties.DbSchema); b.ConfigureByConvention(); @@ -70,7 +61,7 @@ namespace Volo.Docs.EntityFrameworkCore builder.Entity(b => { - b.ToTable(options.TablePrefix + "DocumentContributors", options.Schema); + b.ToTable(DocsDbProperties.DbTablePrefix + "DocumentContributors", DocsDbProperties.DbSchema); b.ConfigureByConvention(); diff --git a/modules/docs/src/Volo.Docs.EntityFrameworkCore/Volo/Docs/EntityFrameworkCore/DocsModelBuilderConfigurationOptions.cs b/modules/docs/src/Volo.Docs.EntityFrameworkCore/Volo/Docs/EntityFrameworkCore/DocsModelBuilderConfigurationOptions.cs deleted file mode 100644 index 0baf8b4afe..0000000000 --- a/modules/docs/src/Volo.Docs.EntityFrameworkCore/Volo/Docs/EntityFrameworkCore/DocsModelBuilderConfigurationOptions.cs +++ /dev/null @@ -1,15 +0,0 @@ -using JetBrains.Annotations; -using Volo.Abp.EntityFrameworkCore.Modeling; - -namespace Volo.Docs.EntityFrameworkCore -{ - public class DocsModelBuilderConfigurationOptions : AbpModelBuilderConfigurationOptions - { - public DocsModelBuilderConfigurationOptions( - [NotNull] string tablePrefix, - [CanBeNull] string schema) - : base(tablePrefix, schema) - { - } - } -} \ No newline at end of file diff --git a/modules/docs/src/Volo.Docs.HttpApi.Client/ClientProxies/DocsDocumentClientProxy.Generated.cs b/modules/docs/src/Volo.Docs.HttpApi.Client/ClientProxies/DocsDocumentClientProxy.Generated.cs index be359b0126..5892e9a31f 100644 --- a/modules/docs/src/Volo.Docs.HttpApi.Client/ClientProxies/DocsDocumentClientProxy.Generated.cs +++ b/modules/docs/src/Volo.Docs.HttpApi.Client/ClientProxies/DocsDocumentClientProxy.Generated.cs @@ -18,27 +18,42 @@ namespace Volo.Docs.Documents.ClientProxies { public virtual async Task GetAsync(GetDocumentInput input) { - return await RequestAsync(nameof(GetAsync), input); + return await RequestAsync(nameof(GetAsync), new ClientProxyRequestTypeValue + { + { typeof(GetDocumentInput), input } + }); } public virtual async Task GetDefaultAsync(GetDefaultDocumentInput input) { - return await RequestAsync(nameof(GetDefaultAsync), input); + return await RequestAsync(nameof(GetDefaultAsync), new ClientProxyRequestTypeValue + { + { typeof(GetDefaultDocumentInput), input } + }); } public virtual async Task GetNavigationAsync(GetNavigationDocumentInput input) { - return await RequestAsync(nameof(GetNavigationAsync), input); + return await RequestAsync(nameof(GetNavigationAsync), new ClientProxyRequestTypeValue + { + { typeof(GetNavigationDocumentInput), input } + }); } public virtual async Task GetResourceAsync(GetDocumentResourceInput input) { - return await RequestAsync(nameof(GetResourceAsync), input); + return await RequestAsync(nameof(GetResourceAsync), new ClientProxyRequestTypeValue + { + { typeof(GetDocumentResourceInput), input } + }); } public virtual async Task> SearchAsync(DocumentSearchInput input) { - return await RequestAsync>(nameof(SearchAsync), input); + return await RequestAsync>(nameof(SearchAsync), new ClientProxyRequestTypeValue + { + { typeof(DocumentSearchInput), input } + }); } public virtual async Task FullSearchEnabledAsync() @@ -48,12 +63,18 @@ namespace Volo.Docs.Documents.ClientProxies public virtual async Task> GetUrlsAsync(string prefix) { - return await RequestAsync>(nameof(GetUrlsAsync), prefix); + return await RequestAsync>(nameof(GetUrlsAsync), new ClientProxyRequestTypeValue + { + { typeof(string), prefix } + }); } public virtual async Task GetParametersAsync(GetParametersDocumentInput input) { - return await RequestAsync(nameof(GetParametersAsync), input); + return await RequestAsync(nameof(GetParametersAsync), new ClientProxyRequestTypeValue + { + { typeof(GetParametersDocumentInput), input } + }); } } } diff --git a/modules/docs/src/Volo.Docs.HttpApi.Client/ClientProxies/DocsProjectClientProxy.Generated.cs b/modules/docs/src/Volo.Docs.HttpApi.Client/ClientProxies/DocsProjectClientProxy.Generated.cs index de74e6ef29..ec0bb50688 100644 --- a/modules/docs/src/Volo.Docs.HttpApi.Client/ClientProxies/DocsProjectClientProxy.Generated.cs +++ b/modules/docs/src/Volo.Docs.HttpApi.Client/ClientProxies/DocsProjectClientProxy.Generated.cs @@ -23,22 +23,36 @@ namespace Volo.Docs.Projects.ClientProxies public virtual async Task GetAsync(string shortName) { - return await RequestAsync(nameof(GetAsync), shortName); + return await RequestAsync(nameof(GetAsync), new ClientProxyRequestTypeValue + { + { typeof(string), shortName } + }); } public virtual async Task GetDefaultLanguageCodeAsync(string shortName, string version) { - return await RequestAsync(nameof(GetDefaultLanguageCodeAsync), shortName, version); + return await RequestAsync(nameof(GetDefaultLanguageCodeAsync), new ClientProxyRequestTypeValue + { + { typeof(string), shortName }, + { typeof(string), version } + }); } public virtual async Task> GetVersionsAsync(string shortName) { - return await RequestAsync>(nameof(GetVersionsAsync), shortName); + return await RequestAsync>(nameof(GetVersionsAsync), new ClientProxyRequestTypeValue + { + { typeof(string), shortName } + }); } public virtual async Task GetLanguageListAsync(string shortName, string version) { - return await RequestAsync(nameof(GetLanguageListAsync), shortName, version); + return await RequestAsync(nameof(GetLanguageListAsync), new ClientProxyRequestTypeValue + { + { typeof(string), shortName }, + { typeof(string), version } + }); } } } diff --git a/modules/docs/src/Volo.Docs.MongoDB/Volo/Docs/MongoDB/DocsMongoDbContextExtensions.cs b/modules/docs/src/Volo.Docs.MongoDB/Volo/Docs/MongoDB/DocsMongoDbContextExtensions.cs index c1645885d2..56d367c651 100644 --- a/modules/docs/src/Volo.Docs.MongoDB/Volo/Docs/MongoDB/DocsMongoDbContextExtensions.cs +++ b/modules/docs/src/Volo.Docs.MongoDB/Volo/Docs/MongoDB/DocsMongoDbContextExtensions.cs @@ -1,5 +1,4 @@ -using System; -using Volo.Abp; +using Volo.Abp; using Volo.Abp.MongoDB; using Volo.Docs.Documents; using Volo.Docs.Projects; @@ -9,25 +8,18 @@ namespace Volo.Docs.MongoDB public static class DocsMongoDbContextExtensions { public static void ConfigureDocs( - this IMongoModelBuilder builder, - Action optionsAction = null) + this IMongoModelBuilder builder) { Check.NotNull(builder, nameof(builder)); - var options = new DocsMongoModelBuilderConfigurationOptions( - DocsDbProperties.DbTablePrefix - ); - - optionsAction?.Invoke(options); - builder.Entity(b => { - b.CollectionName = options.CollectionPrefix + "Projects"; + b.CollectionName = DocsDbProperties.DbTablePrefix + "Projects"; }); builder.Entity(b => { - b.CollectionName = options.CollectionPrefix + "DocumentS"; + b.CollectionName = DocsDbProperties.DbTablePrefix + "DocumentS"; }); } } diff --git a/modules/docs/src/Volo.Docs.MongoDB/Volo/Docs/MongoDB/DocsMongoModelBuilderConfigurationOptions.cs b/modules/docs/src/Volo.Docs.MongoDB/Volo/Docs/MongoDB/DocsMongoModelBuilderConfigurationOptions.cs deleted file mode 100644 index 4bb1c76372..0000000000 --- a/modules/docs/src/Volo.Docs.MongoDB/Volo/Docs/MongoDB/DocsMongoModelBuilderConfigurationOptions.cs +++ /dev/null @@ -1,14 +0,0 @@ -using JetBrains.Annotations; -using Volo.Abp.MongoDB; - -namespace Volo.Docs.MongoDB -{ - public class DocsMongoModelBuilderConfigurationOptions : AbpMongoModelBuilderConfigurationOptions - { - public DocsMongoModelBuilderConfigurationOptions( - [NotNull] string collectionPrefix) - : base(collectionPrefix) - { - } - } -} diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.EntityFrameworkCore/Volo/Abp/FeatureManagement/EntityFrameworkCore/FeatureManagementDbContextModelCreatingExtensions.cs b/modules/feature-management/src/Volo.Abp.FeatureManagement.EntityFrameworkCore/Volo/Abp/FeatureManagement/EntityFrameworkCore/FeatureManagementDbContextModelCreatingExtensions.cs index b482788e49..084e677214 100644 --- a/modules/feature-management/src/Volo.Abp.FeatureManagement.EntityFrameworkCore/Volo/Abp/FeatureManagement/EntityFrameworkCore/FeatureManagementDbContextModelCreatingExtensions.cs +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.EntityFrameworkCore/Volo/Abp/FeatureManagement/EntityFrameworkCore/FeatureManagementDbContextModelCreatingExtensions.cs @@ -7,8 +7,7 @@ namespace Volo.Abp.FeatureManagement.EntityFrameworkCore public static class FeatureManagementDbContextModelCreatingExtensions { public static void ConfigureFeatureManagement( - this ModelBuilder builder, - Action optionsAction = null) + this ModelBuilder builder) { Check.NotNull(builder, nameof(builder)); @@ -17,16 +16,9 @@ namespace Volo.Abp.FeatureManagement.EntityFrameworkCore return; } - var options = new FeatureManagementModelBuilderConfigurationOptions( - FeatureManagementDbProperties.DbTablePrefix, - FeatureManagementDbProperties.DbSchema - ); - - optionsAction?.Invoke(options); - builder.Entity(b => { - b.ToTable(options.TablePrefix + "FeatureValues", options.Schema); + b.ToTable(FeatureManagementDbProperties.DbTablePrefix + "FeatureValues", FeatureManagementDbProperties.DbSchema); b.ConfigureByConvention(); diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.EntityFrameworkCore/Volo/Abp/FeatureManagement/EntityFrameworkCore/FeatureManagementModelBuilderConfigurationOptions.cs b/modules/feature-management/src/Volo.Abp.FeatureManagement.EntityFrameworkCore/Volo/Abp/FeatureManagement/EntityFrameworkCore/FeatureManagementModelBuilderConfigurationOptions.cs deleted file mode 100644 index ba8e38bd61..0000000000 --- a/modules/feature-management/src/Volo.Abp.FeatureManagement.EntityFrameworkCore/Volo/Abp/FeatureManagement/EntityFrameworkCore/FeatureManagementModelBuilderConfigurationOptions.cs +++ /dev/null @@ -1,18 +0,0 @@ -using JetBrains.Annotations; -using Volo.Abp.EntityFrameworkCore.Modeling; - -namespace Volo.Abp.FeatureManagement.EntityFrameworkCore -{ - public class FeatureManagementModelBuilderConfigurationOptions : AbpModelBuilderConfigurationOptions - { - public FeatureManagementModelBuilderConfigurationOptions( - [NotNull] string tablePrefix = "", - [CanBeNull] string schema = null) - : base( - tablePrefix, - schema) - { - - } - } -} \ No newline at end of file diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.HttpApi.Client/ClientProxies/FeaturesClientProxy.Generated.cs b/modules/feature-management/src/Volo.Abp.FeatureManagement.HttpApi.Client/ClientProxies/FeaturesClientProxy.Generated.cs index cfe81acc64..8e14682460 100644 --- a/modules/feature-management/src/Volo.Abp.FeatureManagement.HttpApi.Client/ClientProxies/FeaturesClientProxy.Generated.cs +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.HttpApi.Client/ClientProxies/FeaturesClientProxy.Generated.cs @@ -17,12 +17,21 @@ namespace Volo.Abp.FeatureManagement.ClientProxies { public virtual async Task GetAsync(string providerName, string providerKey) { - return await RequestAsync(nameof(GetAsync), providerName, providerKey); + return await RequestAsync(nameof(GetAsync), new ClientProxyRequestTypeValue + { + { typeof(string), providerName }, + { typeof(string), providerKey } + }); } public virtual async Task UpdateAsync(string providerName, string providerKey, UpdateFeaturesDto input) { - await RequestAsync(nameof(UpdateAsync), providerName, providerKey, input); + await RequestAsync(nameof(UpdateAsync), new ClientProxyRequestTypeValue + { + { typeof(string), providerName }, + { typeof(string), providerKey }, + { typeof(UpdateFeaturesDto), input } + }); } } } diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.MongoDB/Volo/Abp/FeatureManagement/MongoDB/FeatureManagementMongoDbContextExtensions.cs b/modules/feature-management/src/Volo.Abp.FeatureManagement.MongoDB/Volo/Abp/FeatureManagement/MongoDB/FeatureManagementMongoDbContextExtensions.cs index 55ef3b616a..5988c1d57d 100644 --- a/modules/feature-management/src/Volo.Abp.FeatureManagement.MongoDB/Volo/Abp/FeatureManagement/MongoDB/FeatureManagementMongoDbContextExtensions.cs +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.MongoDB/Volo/Abp/FeatureManagement/MongoDB/FeatureManagementMongoDbContextExtensions.cs @@ -1,25 +1,17 @@ -using System; -using Volo.Abp.MongoDB; +using Volo.Abp.MongoDB; namespace Volo.Abp.FeatureManagement.MongoDB { public static class FeatureManagementMongoDbContextExtensions { public static void ConfigureFeatureManagement( - this IMongoModelBuilder builder, - Action optionsAction = null) + this IMongoModelBuilder builder) { Check.NotNull(builder, nameof(builder)); - var options = new FeatureManagementMongoModelBuilderConfigurationOptions( - FeatureManagementDbProperties.DbTablePrefix - ); - - optionsAction?.Invoke(options); - builder.Entity(b => { - b.CollectionName = options.CollectionPrefix + "FeatureValues"; + b.CollectionName = FeatureManagementDbProperties.DbTablePrefix + "FeatureValues"; }); } } diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.MongoDB/Volo/Abp/FeatureManagement/MongoDB/FeatureManagementMongoModelBuilderConfigurationOptions.cs b/modules/feature-management/src/Volo.Abp.FeatureManagement.MongoDB/Volo/Abp/FeatureManagement/MongoDB/FeatureManagementMongoModelBuilderConfigurationOptions.cs deleted file mode 100644 index edb486e906..0000000000 --- a/modules/feature-management/src/Volo.Abp.FeatureManagement.MongoDB/Volo/Abp/FeatureManagement/MongoDB/FeatureManagementMongoModelBuilderConfigurationOptions.cs +++ /dev/null @@ -1,15 +0,0 @@ -using JetBrains.Annotations; -using Volo.Abp.MongoDB; - -namespace Volo.Abp.FeatureManagement.MongoDB -{ - public class FeatureManagementMongoModelBuilderConfigurationOptions : AbpMongoModelBuilderConfigurationOptions - { - public FeatureManagementMongoModelBuilderConfigurationOptions( - [NotNull] string collectionPrefix = "") - : base(collectionPrefix) - { - - } - } -} \ No newline at end of file diff --git a/modules/identity/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/ProfileAppService.cs b/modules/identity/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/ProfileAppService.cs index cdc96d92aa..c722a43904 100644 --- a/modules/identity/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/ProfileAppService.cs +++ b/modules/identity/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/ProfileAppService.cs @@ -39,6 +39,8 @@ namespace Volo.Abp.Identity var user = await UserManager.GetByIdAsync(CurrentUser.GetId()); + user.SetConcurrencyStampIfNotNull(input.ConcurrencyStamp); + if (!string.Equals(user.UserName, input.UserName, StringComparison.InvariantCultureIgnoreCase)) { if (await SettingProvider.IsTrueAsync(IdentitySettingNames.User.IsUserNameUpdateEnabled)) @@ -63,8 +65,6 @@ namespace Volo.Abp.Identity user.Name = input.Name; user.Surname = input.Surname; - user.SetConcurrencyStampIfNotNull(input.ConcurrencyStamp); - input.MapExtraPropertiesTo(user); (await UserManager.UpdateAsync(user)).CheckErrors(); diff --git a/modules/identity/src/Volo.Abp.Identity.HttpApi.Client/ClientProxies/IdentityRoleClientProxy.Generated.cs b/modules/identity/src/Volo.Abp.Identity.HttpApi.Client/ClientProxies/IdentityRoleClientProxy.Generated.cs index d018365c15..0cda6cb043 100644 --- a/modules/identity/src/Volo.Abp.Identity.HttpApi.Client/ClientProxies/IdentityRoleClientProxy.Generated.cs +++ b/modules/identity/src/Volo.Abp.Identity.HttpApi.Client/ClientProxies/IdentityRoleClientProxy.Generated.cs @@ -22,27 +22,43 @@ namespace Volo.Abp.Identity.ClientProxies public virtual async Task> GetListAsync(GetIdentityRolesInput input) { - return await RequestAsync>(nameof(GetListAsync), input); + return await RequestAsync>(nameof(GetListAsync), new ClientProxyRequestTypeValue + { + { typeof(GetIdentityRolesInput), input } + }); } public virtual async Task GetAsync(Guid id) { - return await RequestAsync(nameof(GetAsync), id); + return await RequestAsync(nameof(GetAsync), new ClientProxyRequestTypeValue + { + { typeof(Guid), id } + }); } public virtual async Task CreateAsync(IdentityRoleCreateDto input) { - return await RequestAsync(nameof(CreateAsync), input); + return await RequestAsync(nameof(CreateAsync), new ClientProxyRequestTypeValue + { + { typeof(IdentityRoleCreateDto), input } + }); } public virtual async Task UpdateAsync(Guid id, IdentityRoleUpdateDto input) { - return await RequestAsync(nameof(UpdateAsync), id, input); + return await RequestAsync(nameof(UpdateAsync), new ClientProxyRequestTypeValue + { + { typeof(Guid), id }, + { typeof(IdentityRoleUpdateDto), input } + }); } public virtual async Task DeleteAsync(Guid id) { - await RequestAsync(nameof(DeleteAsync), id); + await RequestAsync(nameof(DeleteAsync), new ClientProxyRequestTypeValue + { + { typeof(Guid), id } + }); } } } diff --git a/modules/identity/src/Volo.Abp.Identity.HttpApi.Client/ClientProxies/IdentityUserClientProxy.Generated.cs b/modules/identity/src/Volo.Abp.Identity.HttpApi.Client/ClientProxies/IdentityUserClientProxy.Generated.cs index 4b489c2e73..773c7edcd8 100644 --- a/modules/identity/src/Volo.Abp.Identity.HttpApi.Client/ClientProxies/IdentityUserClientProxy.Generated.cs +++ b/modules/identity/src/Volo.Abp.Identity.HttpApi.Client/ClientProxies/IdentityUserClientProxy.Generated.cs @@ -17,32 +17,51 @@ namespace Volo.Abp.Identity.ClientProxies { public virtual async Task GetAsync(Guid id) { - return await RequestAsync(nameof(GetAsync), id); + return await RequestAsync(nameof(GetAsync), new ClientProxyRequestTypeValue + { + { typeof(Guid), id } + }); } public virtual async Task> GetListAsync(GetIdentityUsersInput input) { - return await RequestAsync>(nameof(GetListAsync), input); + return await RequestAsync>(nameof(GetListAsync), new ClientProxyRequestTypeValue + { + { typeof(GetIdentityUsersInput), input } + }); } public virtual async Task CreateAsync(IdentityUserCreateDto input) { - return await RequestAsync(nameof(CreateAsync), input); + return await RequestAsync(nameof(CreateAsync), new ClientProxyRequestTypeValue + { + { typeof(IdentityUserCreateDto), input } + }); } public virtual async Task UpdateAsync(Guid id, IdentityUserUpdateDto input) { - return await RequestAsync(nameof(UpdateAsync), id, input); + return await RequestAsync(nameof(UpdateAsync), new ClientProxyRequestTypeValue + { + { typeof(Guid), id }, + { typeof(IdentityUserUpdateDto), input } + }); } public virtual async Task DeleteAsync(Guid id) { - await RequestAsync(nameof(DeleteAsync), id); + await RequestAsync(nameof(DeleteAsync), new ClientProxyRequestTypeValue + { + { typeof(Guid), id } + }); } public virtual async Task> GetRolesAsync(Guid id) { - return await RequestAsync>(nameof(GetRolesAsync), id); + return await RequestAsync>(nameof(GetRolesAsync), new ClientProxyRequestTypeValue + { + { typeof(Guid), id } + }); } public virtual async Task> GetAssignableRolesAsync() @@ -52,17 +71,27 @@ namespace Volo.Abp.Identity.ClientProxies public virtual async Task UpdateRolesAsync(Guid id, IdentityUserUpdateRolesDto input) { - await RequestAsync(nameof(UpdateRolesAsync), id, input); + await RequestAsync(nameof(UpdateRolesAsync), new ClientProxyRequestTypeValue + { + { typeof(Guid), id }, + { typeof(IdentityUserUpdateRolesDto), input } + }); } public virtual async Task FindByUsernameAsync(string userName) { - return await RequestAsync(nameof(FindByUsernameAsync), userName); + return await RequestAsync(nameof(FindByUsernameAsync), new ClientProxyRequestTypeValue + { + { typeof(string), userName } + }); } public virtual async Task FindByEmailAsync(string email) { - return await RequestAsync(nameof(FindByEmailAsync), email); + return await RequestAsync(nameof(FindByEmailAsync), new ClientProxyRequestTypeValue + { + { typeof(string), email } + }); } } } diff --git a/modules/identity/src/Volo.Abp.Identity.HttpApi.Client/ClientProxies/IdentityUserLookupClientProxy.Generated.cs b/modules/identity/src/Volo.Abp.Identity.HttpApi.Client/ClientProxies/IdentityUserLookupClientProxy.Generated.cs index 1f864ab858..9f71ed2a50 100644 --- a/modules/identity/src/Volo.Abp.Identity.HttpApi.Client/ClientProxies/IdentityUserLookupClientProxy.Generated.cs +++ b/modules/identity/src/Volo.Abp.Identity.HttpApi.Client/ClientProxies/IdentityUserLookupClientProxy.Generated.cs @@ -18,22 +18,34 @@ namespace Volo.Abp.Identity.ClientProxies { public virtual async Task FindByIdAsync(Guid id) { - return await RequestAsync(nameof(FindByIdAsync), id); + return await RequestAsync(nameof(FindByIdAsync), new ClientProxyRequestTypeValue + { + { typeof(Guid), id } + }); } public virtual async Task FindByUserNameAsync(string userName) { - return await RequestAsync(nameof(FindByUserNameAsync), userName); + return await RequestAsync(nameof(FindByUserNameAsync), new ClientProxyRequestTypeValue + { + { typeof(string), userName } + }); } public virtual async Task> SearchAsync(UserLookupSearchInputDto input) { - return await RequestAsync>(nameof(SearchAsync), input); + return await RequestAsync>(nameof(SearchAsync), new ClientProxyRequestTypeValue + { + { typeof(UserLookupSearchInputDto), input } + }); } public virtual async Task GetCountAsync(UserLookupCountInputDto input) { - return await RequestAsync(nameof(GetCountAsync), input); + return await RequestAsync(nameof(GetCountAsync), new ClientProxyRequestTypeValue + { + { typeof(UserLookupCountInputDto), input } + }); } } } diff --git a/modules/identity/src/Volo.Abp.Identity.HttpApi.Client/ClientProxies/ProfileClientProxy.Generated.cs b/modules/identity/src/Volo.Abp.Identity.HttpApi.Client/ClientProxies/ProfileClientProxy.Generated.cs index 6595fcedff..aac071ecb2 100644 --- a/modules/identity/src/Volo.Abp.Identity.HttpApi.Client/ClientProxies/ProfileClientProxy.Generated.cs +++ b/modules/identity/src/Volo.Abp.Identity.HttpApi.Client/ClientProxies/ProfileClientProxy.Generated.cs @@ -22,12 +22,18 @@ namespace Volo.Abp.Identity.ClientProxies public virtual async Task UpdateAsync(UpdateProfileDto input) { - return await RequestAsync(nameof(UpdateAsync), input); + return await RequestAsync(nameof(UpdateAsync), new ClientProxyRequestTypeValue + { + { typeof(UpdateProfileDto), input } + }); } public virtual async Task ChangePasswordAsync(ChangePasswordInput input) { - await RequestAsync(nameof(ChangePasswordAsync), input); + await RequestAsync(nameof(ChangePasswordAsync), new ClientProxyRequestTypeValue + { + { typeof(ChangePasswordInput), input } + }); } } } diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiResource.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiResource.cs index 90725c3f6a..0b682a632d 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiResource.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiResource.cs @@ -36,11 +36,10 @@ namespace Volo.Abp.IdentityServer.ApiResources } public ApiResource(Guid id, [NotNull] string name, string displayName = null, string description = null) + : base(id) { Check.NotNull(name, nameof(name)); - Id = id; - Name = name; DisplayName = displayName; @@ -124,7 +123,15 @@ namespace Volo.Abp.IdentityServer.ApiResources public virtual void AddProperty([NotNull] string key, string value) { - Properties.Add(new ApiResourceProperty(Id, key, value)); + var property = FindProperty(key); + if (property == null) + { + Properties.Add(new ApiResourceProperty(Id, key, value)); + } + else + { + property.Value = value; + } } public virtual void RemoveAllProperties() diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiScopes/ApiScope.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiScopes/ApiScope.cs index 27f8ad1d58..60945195d9 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiScopes/ApiScope.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiScopes/ApiScope.cs @@ -40,11 +40,11 @@ namespace Volo.Abp.IdentityServer.ApiScopes bool required = false, bool emphasize = false, bool showInDiscoveryDocument = true, - bool enabled = true) + bool enabled = true + ) : base(id) { Check.NotNull(name, nameof(name)); - Id = id; Name = name; DisplayName = displayName ?? name; Description = description; @@ -79,7 +79,15 @@ namespace Volo.Abp.IdentityServer.ApiScopes public virtual void AddProperty([NotNull] string key, string value) { - Properties.Add(new ApiScopeProperty(Id, key, value)); + var property = FindProperty(key); + if (property == null) + { + Properties.Add(new ApiScopeProperty(Id, key, value)); + } + else + { + property.Value = value; + } } public virtual void RemoveAllProperties() diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiScopes/IApiScopeRepository.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiScopes/IApiScopeRepository.cs index a6736bdda6..6748b0e106 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiScopes/IApiScopeRepository.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiScopes/IApiScopeRepository.cs @@ -8,7 +8,7 @@ namespace Volo.Abp.IdentityServer.ApiScopes { public interface IApiScopeRepository : IBasicRepository { - Task GetByNameAsync( + Task FindByNameAsync( string scopeName, bool includeDetails = true, CancellationToken cancellationToken = default diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Clients/Client.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Clients/Client.cs index 82ba75a5fb..07f9eec153 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Clients/Client.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Clients/Client.cs @@ -266,7 +266,15 @@ namespace Volo.Abp.IdentityServer.Clients public virtual void AddProperty([NotNull] string key, [NotNull] string value) { - Properties.Add(new ClientProperty(Id, key,value)); + var property = FindProperty(key); + if (property == null) + { + Properties.Add(new ClientProperty(Id, key, value)); + } + else + { + property.Value = value; + } } public virtual void RemoveAllProperties() @@ -274,17 +282,17 @@ namespace Volo.Abp.IdentityServer.Clients Properties.Clear(); } - public virtual void RemoveProperty(string key, string value) + public virtual void RemoveProperty(string key) { - Properties.RemoveAll(c => c.Value == value && c.Key == key); + Properties.RemoveAll(c => c.Key == key); } - public virtual ClientProperty FindProperty(string key, string value) + public virtual ClientProperty FindProperty(string key) { - return Properties.FirstOrDefault(c => c.Key == key && c.Value == value); + return Properties.FirstOrDefault(c => c.Key == key); } - public virtual void AddClaim([NotNull] string value, string type) + public virtual void AddClaim([NotNull] string type, [NotNull] string value) { Claims.Add(new ClientClaim(Id, type, value)); } @@ -294,12 +302,22 @@ namespace Volo.Abp.IdentityServer.Clients Claims.Clear(); } - public virtual void RemoveClaim(string value, string type) + public virtual void RemoveClaim(string type) { - Claims.RemoveAll(c => c.Value == value && c.Type == type); + Claims.RemoveAll(c => c.Type == type); } - public virtual ClientClaim FindClaim(string value, string type) + public virtual void RemoveClaim(string type, string value) + { + Claims.RemoveAll(c => c.Type == type && c.Value == value); + } + + public virtual List FindClaims(string type) + { + return Claims.Where(c => c.Type == type).ToList(); + } + + public virtual ClientClaim FindClaim(string type, string value) { return Claims.FirstOrDefault(c => c.Type == type && c.Value == value); } diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Clients/ClientClaim.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Clients/ClientClaim.cs index f0b35d772a..6faf585ee0 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Clients/ClientClaim.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Clients/ClientClaim.cs @@ -1,4 +1,4 @@ -using System; +using System; using JetBrains.Annotations; using Volo.Abp.Domain.Entities; @@ -17,11 +17,6 @@ namespace Volo.Abp.IdentityServer.Clients } - public virtual bool Equals(Guid clientId, string value, string type) - { - return ClientId == clientId && Type == type && Value == value; - } - protected internal ClientClaim(Guid clientId, [NotNull] string type, string value) { Check.NotNull(type, nameof(type)); @@ -31,9 +26,14 @@ namespace Volo.Abp.IdentityServer.Clients Value = value; } + public virtual bool Equals(Guid clientId, string type, string value) + { + return ClientId == clientId && Type == type && Value == value; + } + public override object[] GetKeys() { return new object[] { ClientId, Type, Value }; } } -} \ No newline at end of file +} diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Devices/DeviceFlowStore.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Devices/DeviceFlowStore.cs index 25432e2d58..90c9b9b9e6 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Devices/DeviceFlowStore.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Devices/DeviceFlowStore.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Threading.Tasks; using IdentityModel; using IdentityServer4.Models; @@ -38,7 +38,7 @@ namespace Volo.Abp.IdentityServer.Devices DeviceCode = deviceCode, UserCode = userCode, ClientId = data.ClientId, - SubjectId = data.Subject?.FindFirst(JwtClaimTypes.Subject).Value, + SubjectId = data.Subject?.FindFirst(JwtClaimTypes.Subject)?.Value, CreationTime = data.CreationTime, Expiration = data.CreationTime.AddSeconds(data.Lifetime), Data = Serialize(data) @@ -93,7 +93,7 @@ namespace Volo.Abp.IdentityServer.Devices throw new InvalidOperationException($"Could not update device code by the given userCode: {userCode}"); } - deviceCodes.SubjectId = data.Subject?.FindFirst(JwtClaimTypes.Subject).Value; + deviceCodes.SubjectId = data.Subject?.FindFirst(JwtClaimTypes.Subject)?.Value; deviceCodes.Data = Serialize(data); await DeviceFlowCodesRepository diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Grants/PersistedGrant.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Grants/PersistedGrant.cs index 1865ec748b..907e2cbff8 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Grants/PersistedGrant.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Grants/PersistedGrant.cs @@ -27,12 +27,11 @@ namespace Volo.Abp.IdentityServer.Grants protected PersistedGrant() { - } public PersistedGrant(Guid id) + : base(id) { - Id = id; } } } diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/IdentityResources/IdentityResource.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/IdentityResources/IdentityResource.cs index b5812da7e2..4b8782b455 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/IdentityResources/IdentityResource.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/IdentityResources/IdentityResource.cs @@ -39,11 +39,11 @@ namespace Volo.Abp.IdentityServer.IdentityResources bool enabled = true, bool required = false, bool emphasize = false, - bool showInDiscoveryDocument = true) + bool showInDiscoveryDocument = true + ) : base(id) { Check.NotNull(name, nameof(name)); - Id = id; Name = name; DisplayName = displayName; Description = description; @@ -57,8 +57,8 @@ namespace Volo.Abp.IdentityServer.IdentityResources } public IdentityResource(Guid id, IdentityServer4.Models.IdentityResource resource) + : base(id) { - Id = id; Name = resource.Name; DisplayName = resource.DisplayName; Description = resource.Description; @@ -92,7 +92,15 @@ namespace Volo.Abp.IdentityServer.IdentityResources public virtual void AddProperty([NotNull] string key, string value) { - Properties.Add(new IdentityResourceProperty(Id, key, value)); + var property = FindProperty(key); + if (property == null) + { + Properties.Add(new IdentityResourceProperty(Id, key, value)); + } + else + { + property.Value = value; + } } public virtual void RemoveAllProperties() diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/ApiResources/ApiResourceRepository.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/ApiResources/ApiResourceRepository.cs index bac7fc4c71..077f5ef25f 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/ApiResources/ApiResourceRepository.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/ApiResources/ApiResourceRepository.cs @@ -20,23 +20,20 @@ namespace Volo.Abp.IdentityServer.ApiResources public async Task FindByNameAsync(string apiResourceName, bool includeDetails = true, CancellationToken cancellationToken = default) { - var query = from apiResource in (await GetDbSetAsync()).IncludeDetails(includeDetails) - where apiResource.Name == apiResourceName - orderby apiResource.Id - select apiResource; - - return await query.FirstOrDefaultAsync(GetCancellationToken(cancellationToken)); + return await (await GetDbSetAsync()) + .IncludeDetails(includeDetails) + .OrderBy(apiResource => apiResource.Id) + .FirstOrDefaultAsync(apiResource => apiResource.Name == apiResourceName, GetCancellationToken(cancellationToken)); } public async Task> FindByNameAsync(string[] apiResourceNames, bool includeDetails = true, CancellationToken cancellationToken = default) { - var query = from apiResource in (await GetDbSetAsync()).IncludeDetails(includeDetails) - where apiResourceNames.Contains(apiResource.Name) - orderby apiResource.Name - select apiResource; - - return await query.ToListAsync(GetCancellationToken(cancellationToken)); + return await (await GetDbSetAsync()) + .IncludeDetails(includeDetails) + .Where(apiResource => apiResourceNames.Contains(apiResource.Name)) + .OrderBy(apiResource => apiResource.Name) + .ToListAsync(GetCancellationToken(cancellationToken)); } public virtual async Task> GetListByScopesAsync( @@ -44,11 +41,10 @@ namespace Volo.Abp.IdentityServer.ApiResources bool includeDetails = false, CancellationToken cancellationToken = default) { - var query = from api in (await GetDbSetAsync()).IncludeDetails(includeDetails) - where api.Scopes.Any(x => scopeNames.Contains(x.Scope)) - select api; - - return await query.ToListAsync(GetCancellationToken(cancellationToken)); + return await (await GetDbSetAsync()) + .IncludeDetails(includeDetails) + .Where(api => api.Scopes.Any(x => scopeNames.Contains(x.Scope))) + .ToListAsync(GetCancellationToken(cancellationToken)); } public virtual async Task> GetListAsync( diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/ApiScopes/ApiScopeRepository.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/ApiScopes/ApiScopeRepository.cs index c4222bb03e..ccd59fc359 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/ApiScopes/ApiScopeRepository.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/ApiScopes/ApiScopeRepository.cs @@ -18,9 +18,10 @@ namespace Volo.Abp.IdentityServer.ApiScopes { } - public async Task GetByNameAsync(string scopeName, bool includeDetails = true, CancellationToken cancellationToken = default) + public async Task FindByNameAsync(string scopeName, bool includeDetails = true, CancellationToken cancellationToken = default) { return await (await GetDbSetAsync()) + .IncludeDetails(includeDetails) .OrderBy(x=>x.Id) .FirstOrDefaultAsync(x => x.Name == scopeName, GetCancellationToken(cancellationToken)); } @@ -28,12 +29,11 @@ namespace Volo.Abp.IdentityServer.ApiScopes public async Task> GetListByNameAsync(string[] scopeNames, bool includeDetails = false, CancellationToken cancellationToken = default) { - var query = from scope in (await GetDbSetAsync()).IncludeDetails(includeDetails) - where scopeNames.Contains(scope.Name) - orderby scope.Id - select scope; - - return await query.ToListAsync(GetCancellationToken(cancellationToken)); + return await (await GetDbSetAsync()) + .IncludeDetails(includeDetails) + .Where(scope => scopeNames.Contains(scope.Name)) + .OrderBy(scope => scope.Id) + .ToListAsync(GetCancellationToken(cancellationToken)); } public async Task> GetListAsync(string sorting, int skipCount, int maxResultCount, string filter = null, bool includeDetails = false, CancellationToken cancellationToken = default) diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/Clients/ClientRepository.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/Clients/ClientRepository.cs index 4587168ad0..a8d9abb76f 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/Clients/ClientRepository.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/Clients/ClientRepository.cs @@ -58,7 +58,7 @@ namespace Volo.Abp.IdentityServer.Clients public virtual async Task CheckClientIdExistAsync(string clientId, Guid? expectedId = null, CancellationToken cancellationToken = default) { - return await (await GetDbSetAsync()).AnyAsync(c => c.Id != expectedId && c.ClientId == clientId, cancellationToken: cancellationToken); + return await (await GetDbSetAsync()).AnyAsync(c => c.Id != expectedId && c.ClientId == clientId, GetCancellationToken(cancellationToken)); } public async override Task DeleteAsync(Guid id, bool autoSave = false, CancellationToken cancellationToken = default) diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/Devices/DeviceFlowCodesRepository.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/Devices/DeviceFlowCodesRepository.cs index a6fd6e196b..e8c0a5e189 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/Devices/DeviceFlowCodesRepository.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/Devices/DeviceFlowCodesRepository.cs @@ -24,9 +24,8 @@ namespace Volo.Abp.IdentityServer.Devices CancellationToken cancellationToken = default) { return await (await GetDbSetAsync()) - .Where(d => d.UserCode == userCode) .OrderBy(d => d.Id) - .FirstOrDefaultAsync(GetCancellationToken(cancellationToken)); + .FirstOrDefaultAsync(d => d.UserCode == userCode, GetCancellationToken(cancellationToken)); } public virtual async Task FindByDeviceCodeAsync( @@ -34,9 +33,8 @@ namespace Volo.Abp.IdentityServer.Devices CancellationToken cancellationToken = default) { return await (await GetDbSetAsync()) - .Where(d => d.DeviceCode == deviceCode) .OrderBy(d => d.Id) - .FirstOrDefaultAsync(GetCancellationToken(cancellationToken)); + .FirstOrDefaultAsync(d => d.DeviceCode == deviceCode, GetCancellationToken(cancellationToken)); } public virtual async Task> GetListByExpirationAsync(DateTime maxExpirationDate, int maxResultCount, diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IdentityServerDbContextModelCreatingExtensions.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IdentityServerDbContextModelCreatingExtensions.cs index c8b0dc0682..609ebebf2c 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IdentityServerDbContextModelCreatingExtensions.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IdentityServerDbContextModelCreatingExtensions.cs @@ -1,5 +1,4 @@ -using System; -using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; using Volo.Abp.EntityFrameworkCore; using Volo.Abp.EntityFrameworkCore.Modeling; using Volo.Abp.IdentityServer.ApiResources; @@ -14,8 +13,7 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore public static class IdentityServerDbContextModelCreatingExtensions { public static void ConfigureIdentityServer( - this ModelBuilder builder, - Action optionsAction = null) + this ModelBuilder builder) { Check.NotNull(builder, nameof(builder)); @@ -24,18 +22,11 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore return; } - var options = new IdentityServerModelBuilderConfigurationOptions( - AbpIdentityServerDbProperties.DbTablePrefix, - AbpIdentityServerDbProperties.DbSchema - ); - - optionsAction?.Invoke(options); - #region Client builder.Entity(b => { - b.ToTable(options.TablePrefix + "Clients", options.Schema); + b.ToTable(AbpIdentityServerDbProperties.DbTablePrefix + "Clients", AbpIdentityServerDbProperties.DbSchema); b.ConfigureByConvention(); @@ -69,7 +60,7 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore builder.Entity(b => { - b.ToTable(options.TablePrefix + "ClientGrantTypes", options.Schema); + b.ToTable(AbpIdentityServerDbProperties.DbTablePrefix + "ClientGrantTypes", AbpIdentityServerDbProperties.DbSchema); b.ConfigureByConvention(); @@ -82,13 +73,13 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore builder.Entity(b => { - b.ToTable(options.TablePrefix + "ClientRedirectUris", options.Schema); + b.ToTable(AbpIdentityServerDbProperties.DbTablePrefix + "ClientRedirectUris", AbpIdentityServerDbProperties.DbSchema); b.ConfigureByConvention(); b.HasKey(x => new {x.ClientId, x.RedirectUri}); - if (IsDatabaseProvider(builder, options, EfCoreDatabaseProvider.MySql)) + if (IsDatabaseProvider(builder, EfCoreDatabaseProvider.MySql)) { ClientRedirectUriConsts.RedirectUriMaxLengthValue = 300; } @@ -100,13 +91,13 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore builder.Entity(b => { - b.ToTable(options.TablePrefix + "ClientPostLogoutRedirectUris", options.Schema); + b.ToTable(AbpIdentityServerDbProperties.DbTablePrefix + "ClientPostLogoutRedirectUris", AbpIdentityServerDbProperties.DbSchema); b.ConfigureByConvention(); b.HasKey(x => new {x.ClientId, x.PostLogoutRedirectUri}); - if (IsDatabaseProvider(builder, options, EfCoreDatabaseProvider.MySql)) + if (IsDatabaseProvider(builder, EfCoreDatabaseProvider.MySql)) { ClientPostLogoutRedirectUriConsts.PostLogoutRedirectUriMaxLengthValue = 300; } @@ -120,7 +111,7 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore builder.Entity(b => { - b.ToTable(options.TablePrefix + "ClientScopes", options.Schema); + b.ToTable(AbpIdentityServerDbProperties.DbTablePrefix + "ClientScopes", AbpIdentityServerDbProperties.DbSchema); b.ConfigureByConvention(); @@ -133,14 +124,14 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore builder.Entity(b => { - b.ToTable(options.TablePrefix + "ClientSecrets", options.Schema); + b.ToTable(AbpIdentityServerDbProperties.DbTablePrefix + "ClientSecrets", AbpIdentityServerDbProperties.DbSchema); b.ConfigureByConvention(); b.HasKey(x => new {x.ClientId, x.Type, x.Value}); b.Property(x => x.Type).HasMaxLength(ClientSecretConsts.TypeMaxLength).IsRequired(); - if (IsDatabaseProvider(builder, options, EfCoreDatabaseProvider.MySql, EfCoreDatabaseProvider.Oracle)) + if (IsDatabaseProvider(builder, EfCoreDatabaseProvider.MySql, EfCoreDatabaseProvider.Oracle)) { ClientSecretConsts.ValueMaxLength = 300; } @@ -152,7 +143,7 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore builder.Entity(b => { - b.ToTable(options.TablePrefix + "ClientClaims", options.Schema); + b.ToTable(AbpIdentityServerDbProperties.DbTablePrefix + "ClientClaims", AbpIdentityServerDbProperties.DbSchema); b.ConfigureByConvention(); @@ -166,7 +157,7 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore builder.Entity(b => { - b.ToTable(options.TablePrefix + "ClientIdPRestrictions", options.Schema); + b.ToTable(AbpIdentityServerDbProperties.DbTablePrefix + "ClientIdPRestrictions", AbpIdentityServerDbProperties.DbSchema); b.ConfigureByConvention(); @@ -179,7 +170,7 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore builder.Entity(b => { - b.ToTable(options.TablePrefix + "ClientCorsOrigins", options.Schema); + b.ToTable(AbpIdentityServerDbProperties.DbTablePrefix + "ClientCorsOrigins", AbpIdentityServerDbProperties.DbSchema); b.ConfigureByConvention(); @@ -192,14 +183,14 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore builder.Entity(b => { - b.ToTable(options.TablePrefix + "ClientProperties", options.Schema); + b.ToTable(AbpIdentityServerDbProperties.DbTablePrefix + "ClientProperties", AbpIdentityServerDbProperties.DbSchema); b.ConfigureByConvention(); b.HasKey(x => new {x.ClientId, x.Key, x.Value}); b.Property(x => x.Key).HasMaxLength(ClientPropertyConsts.KeyMaxLength).IsRequired(); - if (IsDatabaseProvider(builder, options, EfCoreDatabaseProvider.MySql)) + if (IsDatabaseProvider(builder, EfCoreDatabaseProvider.MySql)) { ClientPropertyConsts.ValueMaxLength = 300; } @@ -214,7 +205,7 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore builder.Entity(b => { - b.ToTable(options.TablePrefix + "IdentityResources", options.Schema); + b.ToTable(AbpIdentityServerDbProperties.DbTablePrefix + "IdentityResources", AbpIdentityServerDbProperties.DbSchema); b.ConfigureByConvention(); @@ -230,7 +221,7 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore builder.Entity(b => { - b.ToTable(options.TablePrefix + "IdentityResourceClaims", options.Schema); + b.ToTable(AbpIdentityServerDbProperties.DbTablePrefix + "IdentityResourceClaims", AbpIdentityServerDbProperties.DbSchema); b.ConfigureByConvention(); @@ -243,14 +234,14 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore builder.Entity(b => { - b.ToTable(options.TablePrefix + "IdentityResourceProperties", options.Schema); + b.ToTable(AbpIdentityServerDbProperties.DbTablePrefix + "IdentityResourceProperties", AbpIdentityServerDbProperties.DbSchema); b.ConfigureByConvention(); b.HasKey(x => new {x.IdentityResourceId, x.Key, x.Value}); b.Property(x => x.Key).HasMaxLength(IdentityResourcePropertyConsts.KeyMaxLength).IsRequired(); - if (IsDatabaseProvider(builder, options, EfCoreDatabaseProvider.MySql, EfCoreDatabaseProvider.Oracle)) + if (IsDatabaseProvider(builder, EfCoreDatabaseProvider.MySql, EfCoreDatabaseProvider.Oracle)) { IdentityResourcePropertyConsts.ValueMaxLength = 300; } @@ -265,7 +256,7 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore builder.Entity(b => { - b.ToTable(options.TablePrefix + "ApiResources", options.Schema); + b.ToTable(AbpIdentityServerDbProperties.DbTablePrefix + "ApiResources", AbpIdentityServerDbProperties.DbSchema); b.ConfigureByConvention(); @@ -284,7 +275,7 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore builder.Entity(b => { - b.ToTable(options.TablePrefix + "ApiResourceSecrets", options.Schema); + b.ToTable(AbpIdentityServerDbProperties.DbTablePrefix + "ApiResourceSecrets", AbpIdentityServerDbProperties.DbSchema); b.ConfigureByConvention(); @@ -292,7 +283,7 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore b.Property(x => x.Type).HasMaxLength(ApiResourceSecretConsts.TypeMaxLength).IsRequired(); - if (IsDatabaseProvider(builder, options, EfCoreDatabaseProvider.MySql, EfCoreDatabaseProvider.Oracle)) + if (IsDatabaseProvider(builder, EfCoreDatabaseProvider.MySql, EfCoreDatabaseProvider.Oracle)) { ApiResourceSecretConsts.ValueMaxLength = 300; } @@ -305,7 +296,7 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore builder.Entity(b => { - b.ToTable(options.TablePrefix + "ApiResourceClaims", options.Schema); + b.ToTable(AbpIdentityServerDbProperties.DbTablePrefix + "ApiResourceClaims", AbpIdentityServerDbProperties.DbSchema); b.ConfigureByConvention(); @@ -318,7 +309,7 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore builder.Entity(b => { - b.ToTable(options.TablePrefix + "ApiResourceScopes", options.Schema); + b.ToTable(AbpIdentityServerDbProperties.DbTablePrefix + "ApiResourceScopes", AbpIdentityServerDbProperties.DbSchema); b.ConfigureByConvention(); @@ -331,14 +322,14 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore builder.Entity(b => { - b.ToTable(options.TablePrefix + "ApiResourceProperties", options.Schema); + b.ToTable(AbpIdentityServerDbProperties.DbTablePrefix + "ApiResourceProperties", AbpIdentityServerDbProperties.DbSchema); b.ConfigureByConvention(); b.HasKey(x => new {x.ApiResourceId, x.Key, x.Value}); b.Property(x => x.Key).HasMaxLength(ApiResourcePropertyConsts.KeyMaxLength).IsRequired(); - if (IsDatabaseProvider(builder, options, EfCoreDatabaseProvider.MySql, EfCoreDatabaseProvider.Oracle)) + if (IsDatabaseProvider(builder, EfCoreDatabaseProvider.MySql, EfCoreDatabaseProvider.Oracle)) { ApiResourcePropertyConsts.ValueMaxLength = 300; } @@ -353,7 +344,7 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore builder.Entity(b => { - b.ToTable(options.TablePrefix + "ApiScopes", options.Schema); + b.ToTable(AbpIdentityServerDbProperties.DbTablePrefix + "ApiScopes", AbpIdentityServerDbProperties.DbSchema); b.ConfigureByConvention(); @@ -369,7 +360,7 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore builder.Entity(b => { - b.ToTable(options.TablePrefix + "ApiScopeClaims", options.Schema); + b.ToTable(AbpIdentityServerDbProperties.DbTablePrefix + "ApiScopeClaims", AbpIdentityServerDbProperties.DbSchema); b.ConfigureByConvention(); @@ -382,14 +373,14 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore builder.Entity(b => { - b.ToTable(options.TablePrefix + "ApiScopeProperties", options.Schema); + b.ToTable(AbpIdentityServerDbProperties.DbTablePrefix + "ApiScopeProperties", AbpIdentityServerDbProperties.DbSchema); b.ConfigureByConvention(); b.HasKey(x => new {x.ApiScopeId, x.Key, x.Value}); b.Property(x => x.Key).HasMaxLength(ApiScopePropertyConsts.KeyMaxLength).IsRequired(); - if (IsDatabaseProvider(builder, options, EfCoreDatabaseProvider.MySql, EfCoreDatabaseProvider.Oracle)) + if (IsDatabaseProvider(builder, EfCoreDatabaseProvider.MySql, EfCoreDatabaseProvider.Oracle)) { ApiScopePropertyConsts.ValueMaxLength = 300; } @@ -404,7 +395,7 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore builder.Entity(b => { - b.ToTable(options.TablePrefix + "PersistedGrants", options.Schema); + b.ToTable(AbpIdentityServerDbProperties.DbTablePrefix + "PersistedGrants", AbpIdentityServerDbProperties.DbSchema); b.ConfigureByConvention(); @@ -416,7 +407,7 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore b.Property(x => x.Description).HasMaxLength(PersistedGrantConsts.DescriptionMaxLength); b.Property(x => x.CreationTime).IsRequired(); - if (IsDatabaseProvider(builder, options, EfCoreDatabaseProvider.MySql)) + if (IsDatabaseProvider(builder, EfCoreDatabaseProvider.MySql)) { PersistedGrantConsts.DataMaxLengthValue = 10000; //TODO: MySQL accepts 20.000. We can consider to change in v3.0. } @@ -438,7 +429,7 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore builder.Entity(b => { - b.ToTable(options.TablePrefix + "DeviceFlowCodes", options.Schema); + b.ToTable(AbpIdentityServerDbProperties.DbTablePrefix + "DeviceFlowCodes", AbpIdentityServerDbProperties.DbSchema); b.ConfigureByConvention(); @@ -451,7 +442,7 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore b.Property(x => x.CreationTime).IsRequired(); b.Property(x => x.Expiration).IsRequired(); - if (IsDatabaseProvider(builder, options, EfCoreDatabaseProvider.MySql)) + if (IsDatabaseProvider(builder, EfCoreDatabaseProvider.MySql)) { DeviceFlowCodesConsts.DataMaxLength = 10000; //TODO: MySQL accepts 20.000. We can consider to change in v3.0. } @@ -471,13 +462,11 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore private static bool IsDatabaseProvider( ModelBuilder modelBuilder, - IdentityServerModelBuilderConfigurationOptions options, params EfCoreDatabaseProvider[] providers) { foreach (var provider in providers) { - if (options.DatabaseProvider == EfCoreDatabaseProvider.MySql || - modelBuilder.GetDatabaseProvider() == provider) + if (modelBuilder.GetDatabaseProvider() == provider) { return true; } diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IdentityServerModelBuilderConfigurationOptions.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IdentityServerModelBuilderConfigurationOptions.cs deleted file mode 100644 index 41a645bcd6..0000000000 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IdentityServerModelBuilderConfigurationOptions.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System; -using JetBrains.Annotations; -using Volo.Abp.EntityFrameworkCore; -using Volo.Abp.EntityFrameworkCore.Modeling; - -namespace Volo.Abp.IdentityServer.EntityFrameworkCore -{ - public class IdentityServerModelBuilderConfigurationOptions : AbpModelBuilderConfigurationOptions - { - [Obsolete("No need to manually set database provider after v2.9+. If it doesn't set automatically, use modelBuilder.UseXXX() in the OnModelCreating method of your DbContext (XXX is your database provider name).")] - public EfCoreDatabaseProvider? DatabaseProvider { get; set; } - - public IdentityServerModelBuilderConfigurationOptions( - [NotNull] string tablePrefix, - [CanBeNull] string schema) - : base( - tablePrefix, - schema) - { - - } - } -} \ No newline at end of file diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/Grants/PersistentGrantRepository.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/Grants/PersistentGrantRepository.cs index 2dbdfc1a3b..8c19d43181 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/Grants/PersistentGrantRepository.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/Grants/PersistentGrantRepository.cs @@ -30,9 +30,8 @@ namespace Volo.Abp.IdentityServer.Grants CancellationToken cancellationToken = default) { return await (await GetDbSetAsync()) - .Where(x => x.Key == key) .OrderBy(x => x.Id) - .FirstOrDefaultAsync(GetCancellationToken(cancellationToken)); + .FirstOrDefaultAsync(x => x.Key == key, GetCancellationToken(cancellationToken)); } public virtual async Task> GetListBySubjectIdAsync( diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/IdentityResources/IdentityResourceRepository.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/IdentityResources/IdentityResourceRepository.cs index 32faa09792..27000c48c4 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/IdentityResources/IdentityResourceRepository.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/IdentityResources/IdentityResourceRepository.cs @@ -24,11 +24,10 @@ namespace Volo.Abp.IdentityServer.IdentityResources bool includeDetails = false, CancellationToken cancellationToken = default) { - var query = from identityResource in (await GetDbSetAsync()).IncludeDetails(includeDetails) - where scopeNames.Contains(identityResource.Name) - select identityResource; - - return await query.ToListAsync(GetCancellationToken(cancellationToken)); + return await (await GetDbSetAsync()) + .IncludeDetails(includeDetails) + .Where(identityResource => scopeNames.Contains(identityResource.Name)) + .ToListAsync(GetCancellationToken(cancellationToken)); } [Obsolete("Use WithDetailsAsync method.")] @@ -72,14 +71,13 @@ namespace Volo.Abp.IdentityServer.IdentityResources { return await (await GetDbSetAsync()) .IncludeDetails(includeDetails) - .Where(x => x.Name == name) .OrderBy(x => x.Id) - .FirstOrDefaultAsync(GetCancellationToken(cancellationToken)); + .FirstOrDefaultAsync(x => x.Name == name, GetCancellationToken(cancellationToken)); } public virtual async Task CheckNameExistAsync(string name, Guid? expectedId = null, CancellationToken cancellationToken = default) { - return await (await GetDbSetAsync()).AnyAsync(ir => ir.Id != expectedId && ir.Name == name, cancellationToken: cancellationToken); + return await (await GetDbSetAsync()).AnyAsync(ir => ir.Id != expectedId && ir.Name == name, GetCancellationToken(cancellationToken)); } } } diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/AbpIdentityServerMongoDbContextExtensions.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/AbpIdentityServerMongoDbContextExtensions.cs index 6abfc0618d..ea3d2e40c9 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/AbpIdentityServerMongoDbContextExtensions.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/AbpIdentityServerMongoDbContextExtensions.cs @@ -1,5 +1,4 @@ -using System; -using Volo.Abp.IdentityServer.ApiResources; +using Volo.Abp.IdentityServer.ApiResources; using Volo.Abp.IdentityServer.ApiScopes; using Volo.Abp.IdentityServer.Clients; using Volo.Abp.IdentityServer.Devices; @@ -12,45 +11,38 @@ namespace Volo.Abp.IdentityServer.MongoDB public static class AbpIdentityServerMongoDbContextExtensions { public static void ConfigureIdentityServer( - this IMongoModelBuilder builder, - Action optionsAction = null) + this IMongoModelBuilder builder) { Check.NotNull(builder, nameof(builder)); - var options = new IdentityServerMongoModelBuilderConfigurationOptions( - AbpIdentityServerDbProperties.DbTablePrefix - ); - - optionsAction?.Invoke(options); - builder.Entity(b => { - b.CollectionName = options.CollectionPrefix + "ApiResources"; + b.CollectionName = AbpIdentityServerDbProperties.DbTablePrefix + "ApiResources"; }); builder.Entity(b => { - b.CollectionName = options.CollectionPrefix + "ApiScopes"; + b.CollectionName = AbpIdentityServerDbProperties.DbTablePrefix + "ApiScopes"; }); builder.Entity(b => { - b.CollectionName = options.CollectionPrefix + "IdentityResources"; + b.CollectionName = AbpIdentityServerDbProperties.DbTablePrefix + "IdentityResources"; }); builder.Entity(b => { - b.CollectionName = options.CollectionPrefix + "Clients"; + b.CollectionName = AbpIdentityServerDbProperties.DbTablePrefix + "Clients"; }); builder.Entity(b => { - b.CollectionName = options.CollectionPrefix + "PersistedGrants"; + b.CollectionName = AbpIdentityServerDbProperties.DbTablePrefix + "PersistedGrants"; }); builder.Entity(b => { - b.CollectionName = options.CollectionPrefix + "DeviceFlowCodes"; + b.CollectionName = AbpIdentityServerDbProperties.DbTablePrefix + "DeviceFlowCodes"; }); } } diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/IdentityServerMongoModelBuilderConfigurationOptions.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/IdentityServerMongoModelBuilderConfigurationOptions.cs deleted file mode 100644 index 55556e105b..0000000000 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/IdentityServerMongoModelBuilderConfigurationOptions.cs +++ /dev/null @@ -1,13 +0,0 @@ -using JetBrains.Annotations; -using Volo.Abp.MongoDB; - -namespace Volo.Abp.IdentityServer.MongoDB -{ - public class IdentityServerMongoModelBuilderConfigurationOptions : AbpMongoModelBuilderConfigurationOptions - { - public IdentityServerMongoModelBuilderConfigurationOptions([NotNull] string collectionPrefix = "") - : base(collectionPrefix) - { - } - } -} diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoApiResourceRepository.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoApiResourceRepository.cs index 60625a5a4a..56b58d674d 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoApiResourceRepository.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoApiResourceRepository.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Threading; @@ -21,9 +21,8 @@ namespace Volo.Abp.IdentityServer.MongoDB public async Task FindByNameAsync(string apiResourceName, bool includeDetails = true, CancellationToken cancellationToken = default) { return await (await GetMongoQueryableAsync(cancellationToken)) - .Where(ar => ar.Name == apiResourceName) .OrderBy(ar => ar.Id) - .FirstOrDefaultAsync(GetCancellationToken(cancellationToken)); + .FirstOrDefaultAsync(ar => ar.Name == apiResourceName, GetCancellationToken(cancellationToken)); } public async Task> FindByNameAsync(string[] apiResourceNames, bool includeDetails = true, diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoApiScopeRepository.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoApiScopeRepository.cs index dd5b8a27f0..da78505c82 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoApiScopeRepository.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoApiScopeRepository.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Threading; @@ -20,23 +20,20 @@ namespace Volo.Abp.IdentityServer.MongoDB { } - public async Task GetByNameAsync(string scopeName, bool includeDetails = true, CancellationToken cancellationToken = default) + public async Task FindByNameAsync(string scopeName, bool includeDetails = true, CancellationToken cancellationToken = default) { return await (await GetMongoQueryableAsync(cancellationToken)) - .Where(x => x.Name == scopeName) .OrderBy(x => x.Id) - .FirstOrDefaultAsync(GetCancellationToken(cancellationToken)); + .FirstOrDefaultAsync(x => x.Name == scopeName, GetCancellationToken(cancellationToken)); } public async Task> GetListByNameAsync(string[] scopeNames, bool includeDetails = false, CancellationToken cancellationToken = default) { - var query = from scope in (await GetMongoQueryableAsync(cancellationToken)) - where scopeNames.Contains(scope.Name) - orderby scope.Id - select scope; - - return await query.ToListAsync(GetCancellationToken(cancellationToken)); + return await (await GetMongoQueryableAsync(cancellationToken)) + .Where(scope => scopeNames.Contains(scope.Name)) + .OrderBy(scope => scope.Id) + .ToListAsync(GetCancellationToken(cancellationToken)); } public async Task> GetListAsync(string sorting, int skipCount, int maxResultCount, string filter = null, bool includeDetails = false, diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoClientRepository.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoClientRepository.cs index 356a144692..694f5ace25 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoClientRepository.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoClientRepository.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Threading; @@ -27,9 +27,8 @@ namespace Volo.Abp.IdentityServer.MongoDB CancellationToken cancellationToken = default) { return await (await GetMongoQueryableAsync(cancellationToken)) - .Where(x => x.ClientId == clientId) .OrderBy(x => x.Id) - .FirstOrDefaultAsync(GetCancellationToken(cancellationToken)); + .FirstOrDefaultAsync(x => x.ClientId == clientId, GetCancellationToken(cancellationToken)); } public virtual async Task> GetListAsync( @@ -69,7 +68,7 @@ namespace Volo.Abp.IdentityServer.MongoDB public virtual async Task CheckClientIdExistAsync(string clientId, Guid? expectedId = null, CancellationToken cancellationToken = default) { return await (await GetMongoQueryableAsync(cancellationToken)) - .AnyAsync(c => c.Id != expectedId && c.ClientId == clientId, cancellationToken: cancellationToken); + .AnyAsync(c => c.Id != expectedId && c.ClientId == clientId, GetCancellationToken(cancellationToken)); } } } diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoIdentityResourceRepository.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoIdentityResourceRepository.cs index e2e46a921b..e63ca82188 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoIdentityResourceRepository.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoIdentityResourceRepository.cs @@ -62,7 +62,7 @@ namespace Volo.Abp.IdentityServer.MongoDB public virtual async Task CheckNameExistAsync(string name, Guid? expectedId = null, CancellationToken cancellationToken = default) { return await (await GetMongoQueryableAsync(cancellationToken)) - .AnyAsync(ir => ir.Id != expectedId && ir.Name == name, cancellationToken: cancellationToken); + .AnyAsync(ir => ir.Id != expectedId && ir.Name == name, GetCancellationToken(cancellationToken)); } } } diff --git a/modules/identityserver/test/Volo.Abp.IdentityServer.Domain.Tests/Volo/Abp/IdentityServer/Cache/IdentityServerCacheItemInvalidator_Tests.cs b/modules/identityserver/test/Volo.Abp.IdentityServer.Domain.Tests/Volo/Abp/IdentityServer/Cache/IdentityServerCacheItemInvalidator_Tests.cs index 2d5498061a..ba1b026fa0 100644 --- a/modules/identityserver/test/Volo.Abp.IdentityServer.Domain.Tests/Volo/Abp/IdentityServer/Cache/IdentityServerCacheItemInvalidator_Tests.cs +++ b/modules/identityserver/test/Volo.Abp.IdentityServer.Domain.Tests/Volo/Abp/IdentityServer/Cache/IdentityServerCacheItemInvalidator_Tests.cs @@ -121,7 +121,7 @@ namespace Volo.Abp.IdentityServer.Cache await _resourceStore.FindApiScopesByNameAsync(testApiScopeNames); (await _apiScopeCache.GetAsync(testApiScopeName)).ShouldNotBeNull(); - var testApiScope = await _apiScopeRepository.GetByNameAsync(testApiScopeName); + var testApiScope = await _apiScopeRepository.FindByNameAsync(testApiScopeName); await _apiScopeRepository.DeleteAsync(testApiScope); (await _apiScopeCache.GetAsync(testApiScopeName)).ShouldBeNull(); diff --git a/modules/identityserver/test/Volo.Abp.IdentityServer.TestBase/Volo/Abp/IdentityServer/AbpIdentityServerTestDataBuilder.cs b/modules/identityserver/test/Volo.Abp.IdentityServer.TestBase/Volo/Abp/IdentityServer/AbpIdentityServerTestDataBuilder.cs index e2bd202ec1..38c32af64d 100644 --- a/modules/identityserver/test/Volo.Abp.IdentityServer.TestBase/Volo/Abp/IdentityServer/AbpIdentityServerTestDataBuilder.cs +++ b/modules/identityserver/test/Volo.Abp.IdentityServer.TestBase/Volo/Abp/IdentityServer/AbpIdentityServerTestDataBuilder.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Threading.Tasks; using Volo.Abp.DependencyInjection; using Volo.Abp.Guids; @@ -149,7 +149,7 @@ namespace Volo.Abp.IdentityServer client.AddCorsOrigin("https://client1-origin.com"); client.AddCorsOrigin("https://{0}.abp.io"); - client.AddClaim(nameof(ClientClaim.Value), nameof(ClientClaim.Type)); + client.AddClaim(nameof(ClientClaim.Type), nameof(ClientClaim.Value)); client.AddGrantType(nameof(ClientGrantType.GrantType)); client.AddIdentityProviderRestriction(nameof(ClientIdPRestriction.Provider)); client.AddPostLogoutRedirectUri(nameof(ClientPostLogoutRedirectUri.PostLogoutRedirectUri)); diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.EntityFrameworkCore/Volo/Abp/PermissionManagement/EntityFrameworkCore/AbpPermissionManagementDbContextModelBuilderExtensions.cs b/modules/permission-management/src/Volo.Abp.PermissionManagement.EntityFrameworkCore/Volo/Abp/PermissionManagement/EntityFrameworkCore/AbpPermissionManagementDbContextModelBuilderExtensions.cs index 8810f4a0bc..100143e033 100644 --- a/modules/permission-management/src/Volo.Abp.PermissionManagement.EntityFrameworkCore/Volo/Abp/PermissionManagement/EntityFrameworkCore/AbpPermissionManagementDbContextModelBuilderExtensions.cs +++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.EntityFrameworkCore/Volo/Abp/PermissionManagement/EntityFrameworkCore/AbpPermissionManagementDbContextModelBuilderExtensions.cs @@ -1,5 +1,4 @@ -using System; -using JetBrains.Annotations; +using JetBrains.Annotations; using Microsoft.EntityFrameworkCore; using Volo.Abp.EntityFrameworkCore.Modeling; @@ -8,21 +7,13 @@ namespace Volo.Abp.PermissionManagement.EntityFrameworkCore public static class AbpPermissionManagementDbContextModelBuilderExtensions { public static void ConfigurePermissionManagement( - [NotNull] this ModelBuilder builder, - [CanBeNull] Action optionsAction = null) + [NotNull] this ModelBuilder builder) { Check.NotNull(builder, nameof(builder)); - var options = new AbpPermissionManagementModelBuilderConfigurationOptions( - AbpPermissionManagementDbProperties.DbTablePrefix, - AbpPermissionManagementDbProperties.DbSchema - ); - - optionsAction?.Invoke(options); - builder.Entity(b => { - b.ToTable(options.TablePrefix + "PermissionGrants", options.Schema); + b.ToTable(AbpPermissionManagementDbProperties.DbTablePrefix + "PermissionGrants", AbpPermissionManagementDbProperties.DbSchema); b.ConfigureByConvention(); diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.EntityFrameworkCore/Volo/Abp/PermissionManagement/EntityFrameworkCore/AbpPermissionManagementModelBuilderConfigurationOptions.cs b/modules/permission-management/src/Volo.Abp.PermissionManagement.EntityFrameworkCore/Volo/Abp/PermissionManagement/EntityFrameworkCore/AbpPermissionManagementModelBuilderConfigurationOptions.cs deleted file mode 100644 index 1ddfcc9a8f..0000000000 --- a/modules/permission-management/src/Volo.Abp.PermissionManagement.EntityFrameworkCore/Volo/Abp/PermissionManagement/EntityFrameworkCore/AbpPermissionManagementModelBuilderConfigurationOptions.cs +++ /dev/null @@ -1,18 +0,0 @@ -using JetBrains.Annotations; -using Volo.Abp.EntityFrameworkCore.Modeling; - -namespace Volo.Abp.PermissionManagement.EntityFrameworkCore -{ - public class AbpPermissionManagementModelBuilderConfigurationOptions : AbpModelBuilderConfigurationOptions - { - public AbpPermissionManagementModelBuilderConfigurationOptions( - [NotNull] string tablePrefix, - [CanBeNull] string schema) - : base( - tablePrefix, - schema) - { - - } - } -} \ No newline at end of file diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.HttpApi.Client/ClientProxies/PermissionsClientProxy.Generated.cs b/modules/permission-management/src/Volo.Abp.PermissionManagement.HttpApi.Client/ClientProxies/PermissionsClientProxy.Generated.cs index b21c3a6585..adb04a8feb 100644 --- a/modules/permission-management/src/Volo.Abp.PermissionManagement.HttpApi.Client/ClientProxies/PermissionsClientProxy.Generated.cs +++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.HttpApi.Client/ClientProxies/PermissionsClientProxy.Generated.cs @@ -17,12 +17,21 @@ namespace Volo.Abp.PermissionManagement.ClientProxies { public virtual async Task GetAsync(string providerName, string providerKey) { - return await RequestAsync(nameof(GetAsync), providerName, providerKey); + return await RequestAsync(nameof(GetAsync), new ClientProxyRequestTypeValue + { + { typeof(string), providerName }, + { typeof(string), providerKey } + }); } public virtual async Task UpdateAsync(string providerName, string providerKey, UpdatePermissionsDto input) { - await RequestAsync(nameof(UpdateAsync), providerName, providerKey, input); + await RequestAsync(nameof(UpdateAsync), new ClientProxyRequestTypeValue + { + { typeof(string), providerName }, + { typeof(string), providerKey }, + { typeof(UpdatePermissionsDto), input } + }); } } } diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.MongoDB/Volo/Abp/PermissionManagement/MongoDb/AbpPermissionManagementMongoDbContextExtensions.cs b/modules/permission-management/src/Volo.Abp.PermissionManagement.MongoDB/Volo/Abp/PermissionManagement/MongoDb/AbpPermissionManagementMongoDbContextExtensions.cs index cf81d69a19..7ed0a60d26 100644 --- a/modules/permission-management/src/Volo.Abp.PermissionManagement.MongoDB/Volo/Abp/PermissionManagement/MongoDb/AbpPermissionManagementMongoDbContextExtensions.cs +++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.MongoDB/Volo/Abp/PermissionManagement/MongoDb/AbpPermissionManagementMongoDbContextExtensions.cs @@ -1,25 +1,17 @@ -using System; -using Volo.Abp.MongoDB; +using Volo.Abp.MongoDB; namespace Volo.Abp.PermissionManagement.MongoDB { public static class AbpPermissionManagementMongoDbContextExtensions { public static void ConfigurePermissionManagement( - this IMongoModelBuilder builder, - Action optionsAction = null) + this IMongoModelBuilder builder) { Check.NotNull(builder, nameof(builder)); - var options = new PermissionManagementMongoModelBuilderConfigurationOptions( - AbpPermissionManagementDbProperties.DbTablePrefix - ); - - optionsAction?.Invoke(options); - builder.Entity(b => { - b.CollectionName = options.CollectionPrefix + "PermissionGrants"; + b.CollectionName = AbpPermissionManagementDbProperties.DbTablePrefix + "PermissionGrants"; }); } } diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.MongoDB/Volo/Abp/PermissionManagement/MongoDb/PermissionManagementMongoModelBuilderConfigurationOptions.cs b/modules/permission-management/src/Volo.Abp.PermissionManagement.MongoDB/Volo/Abp/PermissionManagement/MongoDb/PermissionManagementMongoModelBuilderConfigurationOptions.cs deleted file mode 100644 index acc7d5cb84..0000000000 --- a/modules/permission-management/src/Volo.Abp.PermissionManagement.MongoDB/Volo/Abp/PermissionManagement/MongoDb/PermissionManagementMongoModelBuilderConfigurationOptions.cs +++ /dev/null @@ -1,14 +0,0 @@ -using JetBrains.Annotations; -using Volo.Abp.MongoDB; - -namespace Volo.Abp.PermissionManagement.MongoDB -{ - public class PermissionManagementMongoModelBuilderConfigurationOptions : AbpMongoModelBuilderConfigurationOptions - { - public PermissionManagementMongoModelBuilderConfigurationOptions( - [NotNull] string tablePrefix = "") - : base(tablePrefix) - { - } - } -} \ No newline at end of file diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.Web/Pages/AbpPermissionManagement/PermissionManagementModal.cshtml b/modules/permission-management/src/Volo.Abp.PermissionManagement.Web/Pages/AbpPermissionManagement/PermissionManagementModal.cshtml index 62c3a286fc..c5dfed0c20 100644 --- a/modules/permission-management/src/Volo.Abp.PermissionManagement.Web/Pages/AbpPermissionManagement/PermissionManagementModal.cshtml +++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.Web/Pages/AbpPermissionManagement/PermissionManagementModal.cshtml @@ -24,7 +24,7 @@

                                          @group.DisplayName


                                          -
                                          +
                                          + + + + diff --git a/modules/setting-management/app/Volo.Abp.SettingManagement.DemoApp/wwwroot/libs/sweetalert2/sweetalert2.all.js b/modules/setting-management/app/Volo.Abp.SettingManagement.DemoApp/wwwroot/libs/sweetalert2/sweetalert2.all.js new file mode 100644 index 0000000000..8cbddafe42 --- /dev/null +++ b/modules/setting-management/app/Volo.Abp.SettingManagement.DemoApp/wwwroot/libs/sweetalert2/sweetalert2.all.js @@ -0,0 +1,3123 @@ +/*! +* sweetalert2 v11.1.5 +* Released under the MIT License. +*/ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : + typeof define === 'function' && define.amd ? define(factory) : + (global = global || self, global.Sweetalert2 = factory()); +}(this, function () { 'use strict'; + + const DismissReason = Object.freeze({ + cancel: 'cancel', + backdrop: 'backdrop', + close: 'close', + esc: 'esc', + timer: 'timer' + }); + + const consolePrefix = 'SweetAlert2:'; + /** + * Filter the unique values into a new array + * @param arr + */ + + const uniqueArray = arr => { + const result = []; + + for (let i = 0; i < arr.length; i++) { + if (result.indexOf(arr[i]) === -1) { + result.push(arr[i]); + } + } + + return result; + }; + /** + * Capitalize the first letter of a string + * @param str + */ + + const capitalizeFirstLetter = str => str.charAt(0).toUpperCase() + str.slice(1); + /** + * Convert NodeList to Array + * @param nodeList + */ + + const toArray = nodeList => Array.prototype.slice.call(nodeList); + /** + * Standardise console warnings + * @param message + */ + + const warn = message => { + console.warn("".concat(consolePrefix, " ").concat(typeof message === 'object' ? message.join(' ') : message)); + }; + /** + * Standardise console errors + * @param message + */ + + const error = message => { + console.error("".concat(consolePrefix, " ").concat(message)); + }; + /** + * Private global state for `warnOnce` + * @type {Array} + * @private + */ + + const previousWarnOnceMessages = []; + /** + * Show a console warning, but only if it hasn't already been shown + * @param message + */ + + const warnOnce = message => { + if (!previousWarnOnceMessages.includes(message)) { + previousWarnOnceMessages.push(message); + warn(message); + } + }; + /** + * Show a one-time console warning about deprecated params/methods + */ + + const warnAboutDeprecation = (deprecatedParam, useInstead) => { + warnOnce("\"".concat(deprecatedParam, "\" is deprecated and will be removed in the next major release. Please use \"").concat(useInstead, "\" instead.")); + }; + /** + * If `arg` is a function, call it (with no arguments or context) and return the result. + * Otherwise, just pass the value through + * @param arg + */ + + const callIfFunction = arg => typeof arg === 'function' ? arg() : arg; + const hasToPromiseFn = arg => arg && typeof arg.toPromise === 'function'; + const asPromise = arg => hasToPromiseFn(arg) ? arg.toPromise() : Promise.resolve(arg); + const isPromise = arg => arg && Promise.resolve(arg) === arg; + + const isJqueryElement = elem => typeof elem === 'object' && elem.jquery; + + const isElement = elem => elem instanceof Element || isJqueryElement(elem); + + const argsToParams = args => { + const params = {}; + + if (typeof args[0] === 'object' && !isElement(args[0])) { + Object.assign(params, args[0]); + } else { + ['title', 'html', 'icon'].forEach((name, index) => { + const arg = args[index]; + + if (typeof arg === 'string' || isElement(arg)) { + params[name] = arg; + } else if (arg !== undefined) { + error("Unexpected type of ".concat(name, "! Expected \"string\" or \"Element\", got ").concat(typeof arg)); + } + }); + } + + return params; + }; + + const swalPrefix = 'swal2-'; + const prefix = items => { + const result = {}; + + for (const i in items) { + result[items[i]] = swalPrefix + items[i]; + } + + return result; + }; + const swalClasses = prefix(['container', 'shown', 'height-auto', 'iosfix', 'popup', 'modal', 'no-backdrop', 'no-transition', 'toast', 'toast-shown', 'show', 'hide', 'close', 'title', 'html-container', 'actions', 'confirm', 'deny', 'cancel', 'default-outline', 'footer', 'icon', 'icon-content', 'image', 'input', 'file', 'range', 'select', 'radio', 'checkbox', 'label', 'textarea', 'inputerror', 'input-label', 'validation-message', 'progress-steps', 'active-progress-step', 'progress-step', 'progress-step-line', 'loader', 'loading', 'styled', 'top', 'top-start', 'top-end', 'top-left', 'top-right', 'center', 'center-start', 'center-end', 'center-left', 'center-right', 'bottom', 'bottom-start', 'bottom-end', 'bottom-left', 'bottom-right', 'grow-row', 'grow-column', 'grow-fullscreen', 'rtl', 'timer-progress-bar', 'timer-progress-bar-container', 'scrollbar-measure', 'icon-success', 'icon-warning', 'icon-info', 'icon-question', 'icon-error']); + const iconTypes = prefix(['success', 'warning', 'info', 'question', 'error']); + + const getContainer = () => document.body.querySelector(".".concat(swalClasses.container)); + const elementBySelector = selectorString => { + const container = getContainer(); + return container ? container.querySelector(selectorString) : null; + }; + + const elementByClass = className => { + return elementBySelector(".".concat(className)); + }; + + const getPopup = () => elementByClass(swalClasses.popup); + const getIcon = () => elementByClass(swalClasses.icon); + const getTitle = () => elementByClass(swalClasses.title); + const getHtmlContainer = () => elementByClass(swalClasses['html-container']); + const getImage = () => elementByClass(swalClasses.image); + const getProgressSteps = () => elementByClass(swalClasses['progress-steps']); + const getValidationMessage = () => elementByClass(swalClasses['validation-message']); + const getConfirmButton = () => elementBySelector(".".concat(swalClasses.actions, " .").concat(swalClasses.confirm)); + const getDenyButton = () => elementBySelector(".".concat(swalClasses.actions, " .").concat(swalClasses.deny)); + const getInputLabel = () => elementByClass(swalClasses['input-label']); + const getLoader = () => elementBySelector(".".concat(swalClasses.loader)); + const getCancelButton = () => elementBySelector(".".concat(swalClasses.actions, " .").concat(swalClasses.cancel)); + const getActions = () => elementByClass(swalClasses.actions); + const getFooter = () => elementByClass(swalClasses.footer); + const getTimerProgressBar = () => elementByClass(swalClasses['timer-progress-bar']); + const getCloseButton = () => elementByClass(swalClasses.close); // https://github.com/jkup/focusable/blob/master/index.js + + const focusable = "\n a[href],\n area[href],\n input:not([disabled]),\n select:not([disabled]),\n textarea:not([disabled]),\n button:not([disabled]),\n iframe,\n object,\n embed,\n [tabindex=\"0\"],\n [contenteditable],\n audio[controls],\n video[controls],\n summary\n"; + const getFocusableElements = () => { + const focusableElementsWithTabindex = toArray(getPopup().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')) // sort according to tabindex + .sort((a, b) => { + a = parseInt(a.getAttribute('tabindex')); + b = parseInt(b.getAttribute('tabindex')); + + if (a > b) { + return 1; + } else if (a < b) { + return -1; + } + + return 0; + }); + const otherFocusableElements = toArray(getPopup().querySelectorAll(focusable)).filter(el => el.getAttribute('tabindex') !== '-1'); + return uniqueArray(focusableElementsWithTabindex.concat(otherFocusableElements)).filter(el => isVisible(el)); + }; + const isModal = () => { + return !isToast() && !document.body.classList.contains(swalClasses['no-backdrop']); + }; + const isToast = () => { + return document.body.classList.contains(swalClasses['toast-shown']); + }; + const isLoading = () => { + return getPopup().hasAttribute('data-loading'); + }; + + const states = { + previousBodyPadding: null + }; + const setInnerHtml = (elem, html) => { + // #1926 + elem.textContent = ''; + + if (html) { + const parser = new DOMParser(); + const parsed = parser.parseFromString(html, "text/html"); + toArray(parsed.querySelector('head').childNodes).forEach(child => { + elem.appendChild(child); + }); + toArray(parsed.querySelector('body').childNodes).forEach(child => { + elem.appendChild(child); + }); + } + }; + const hasClass = (elem, className) => { + if (!className) { + return false; + } + + const classList = className.split(/\s+/); + + for (let i = 0; i < classList.length; i++) { + if (!elem.classList.contains(classList[i])) { + return false; + } + } + + return true; + }; + + const removeCustomClasses = (elem, params) => { + toArray(elem.classList).forEach(className => { + if (!Object.values(swalClasses).includes(className) && !Object.values(iconTypes).includes(className) && !Object.values(params.showClass).includes(className)) { + elem.classList.remove(className); + } + }); + }; + + const applyCustomClass = (elem, params, className) => { + removeCustomClasses(elem, params); + + if (params.customClass && params.customClass[className]) { + if (typeof params.customClass[className] !== 'string' && !params.customClass[className].forEach) { + return warn("Invalid type of customClass.".concat(className, "! Expected string or iterable object, got \"").concat(typeof params.customClass[className], "\"")); + } + + addClass(elem, params.customClass[className]); + } + }; + const getInput = (popup, inputType) => { + if (!inputType) { + return null; + } + + switch (inputType) { + case 'select': + case 'textarea': + case 'file': + return getChildByClass(popup, swalClasses[inputType]); + + case 'checkbox': + return popup.querySelector(".".concat(swalClasses.checkbox, " input")); + + case 'radio': + return popup.querySelector(".".concat(swalClasses.radio, " input:checked")) || popup.querySelector(".".concat(swalClasses.radio, " input:first-child")); + + case 'range': + return popup.querySelector(".".concat(swalClasses.range, " input")); + + default: + return getChildByClass(popup, swalClasses.input); + } + }; + const focusInput = input => { + input.focus(); // place cursor at end of text in text input + + if (input.type !== 'file') { + // http://stackoverflow.com/a/2345915 + const val = input.value; + input.value = ''; + input.value = val; + } + }; + const toggleClass = (target, classList, condition) => { + if (!target || !classList) { + return; + } + + if (typeof classList === 'string') { + classList = classList.split(/\s+/).filter(Boolean); + } + + classList.forEach(className => { + if (target.forEach) { + target.forEach(elem => { + condition ? elem.classList.add(className) : elem.classList.remove(className); + }); + } else { + condition ? target.classList.add(className) : target.classList.remove(className); + } + }); + }; + const addClass = (target, classList) => { + toggleClass(target, classList, true); + }; + const removeClass = (target, classList) => { + toggleClass(target, classList, false); + }; + const getChildByClass = (elem, className) => { + for (let i = 0; i < elem.childNodes.length; i++) { + if (hasClass(elem.childNodes[i], className)) { + return elem.childNodes[i]; + } + } + }; + const applyNumericalStyle = (elem, property, value) => { + if (value === "".concat(parseInt(value))) { + value = parseInt(value); + } + + if (value || parseInt(value) === 0) { + elem.style[property] = typeof value === 'number' ? "".concat(value, "px") : value; + } else { + elem.style.removeProperty(property); + } + }; + const show = (elem, display = 'flex') => { + elem.style.display = display; + }; + const hide = elem => { + elem.style.display = 'none'; + }; + const setStyle = (parent, selector, property, value) => { + const el = parent.querySelector(selector); + + if (el) { + el.style[property] = value; + } + }; + const toggle = (elem, condition, display) => { + condition ? show(elem, display) : hide(elem); + }; // borrowed from jquery $(elem).is(':visible') implementation + + const isVisible = elem => !!(elem && (elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length)); + const allButtonsAreHidden = () => !isVisible(getConfirmButton()) && !isVisible(getDenyButton()) && !isVisible(getCancelButton()); + const isScrollable = elem => !!(elem.scrollHeight > elem.clientHeight); // borrowed from https://stackoverflow.com/a/46352119 + + const hasCssAnimation = elem => { + const style = window.getComputedStyle(elem); + const animDuration = parseFloat(style.getPropertyValue('animation-duration') || '0'); + const transDuration = parseFloat(style.getPropertyValue('transition-duration') || '0'); + return animDuration > 0 || transDuration > 0; + }; + const animateTimerProgressBar = (timer, reset = false) => { + const timerProgressBar = getTimerProgressBar(); + + if (isVisible(timerProgressBar)) { + if (reset) { + timerProgressBar.style.transition = 'none'; + timerProgressBar.style.width = '100%'; + } + + setTimeout(() => { + timerProgressBar.style.transition = "width ".concat(timer / 1000, "s linear"); + timerProgressBar.style.width = '0%'; + }, 10); + } + }; + const stopTimerProgressBar = () => { + const timerProgressBar = getTimerProgressBar(); + const timerProgressBarWidth = parseInt(window.getComputedStyle(timerProgressBar).width); + timerProgressBar.style.removeProperty('transition'); + timerProgressBar.style.width = '100%'; + const timerProgressBarFullWidth = parseInt(window.getComputedStyle(timerProgressBar).width); + const timerProgressBarPercent = parseInt(timerProgressBarWidth / timerProgressBarFullWidth * 100); + timerProgressBar.style.removeProperty('transition'); + timerProgressBar.style.width = "".concat(timerProgressBarPercent, "%"); + }; + + // Detect Node env + const isNodeEnv = () => typeof window === 'undefined' || typeof document === 'undefined'; + + const sweetHTML = "\n
                                          \n \n
                                            \n
                                            \n \n

                                            \n
                                            \n \n \n
                                            \n \n \n
                                            \n \n
                                            \n \n \n
                                            \n
                                            \n
                                            \n \n \n \n
                                            \n
                                            \n
                                            \n
                                            \n
                                            \n
                                            \n").replace(/(^|\n)\s*/g, ''); + + const resetOldContainer = () => { + const oldContainer = getContainer(); + + if (!oldContainer) { + return false; + } + + oldContainer.remove(); + removeClass([document.documentElement, document.body], [swalClasses['no-backdrop'], swalClasses['toast-shown'], swalClasses['has-column']]); + return true; + }; + + const resetValidationMessage = () => { + if (Swal.isVisible()) { + Swal.resetValidationMessage(); + } + }; + + const addInputChangeListeners = () => { + const popup = getPopup(); + const input = getChildByClass(popup, swalClasses.input); + const file = getChildByClass(popup, swalClasses.file); + const range = popup.querySelector(".".concat(swalClasses.range, " input")); + const rangeOutput = popup.querySelector(".".concat(swalClasses.range, " output")); + const select = getChildByClass(popup, swalClasses.select); + const checkbox = popup.querySelector(".".concat(swalClasses.checkbox, " input")); + const textarea = getChildByClass(popup, swalClasses.textarea); + input.oninput = resetValidationMessage; + file.onchange = resetValidationMessage; + select.onchange = resetValidationMessage; + checkbox.onchange = resetValidationMessage; + textarea.oninput = resetValidationMessage; + + range.oninput = () => { + resetValidationMessage(); + rangeOutput.value = range.value; + }; + + range.onchange = () => { + resetValidationMessage(); + range.nextSibling.value = range.value; + }; + }; + + const getTarget = target => typeof target === 'string' ? document.querySelector(target) : target; + + const setupAccessibility = params => { + const popup = getPopup(); + popup.setAttribute('role', params.toast ? 'alert' : 'dialog'); + popup.setAttribute('aria-live', params.toast ? 'polite' : 'assertive'); + + if (!params.toast) { + popup.setAttribute('aria-modal', 'true'); + } + }; + + const setupRTL = targetElement => { + if (window.getComputedStyle(targetElement).direction === 'rtl') { + addClass(getContainer(), swalClasses.rtl); + } + }; + /* + * Add modal + backdrop to DOM + */ + + + const init = params => { + // Clean up the old popup container if it exists + const oldContainerExisted = resetOldContainer(); + /* istanbul ignore if */ + + if (isNodeEnv()) { + error('SweetAlert2 requires document to initialize'); + return; + } + + const container = document.createElement('div'); + container.className = swalClasses.container; + + if (oldContainerExisted) { + addClass(container, swalClasses['no-transition']); + } + + setInnerHtml(container, sweetHTML); + const targetElement = getTarget(params.target); + targetElement.appendChild(container); + setupAccessibility(params); + setupRTL(targetElement); + addInputChangeListeners(); + }; + + const parseHtmlToContainer = (param, target) => { + // DOM element + if (param instanceof HTMLElement) { + target.appendChild(param); // Object + } else if (typeof param === 'object') { + handleObject(param, target); // Plain string + } else if (param) { + setInnerHtml(target, param); + } + }; + + const handleObject = (param, target) => { + // JQuery element(s) + if (param.jquery) { + handleJqueryElem(target, param); // For other objects use their string representation + } else { + setInnerHtml(target, param.toString()); + } + }; + + const handleJqueryElem = (target, elem) => { + target.textContent = ''; + + if (0 in elem) { + for (let i = 0; (i in elem); i++) { + target.appendChild(elem[i].cloneNode(true)); + } + } else { + target.appendChild(elem.cloneNode(true)); + } + }; + + const animationEndEvent = (() => { + // Prevent run in Node env + + /* istanbul ignore if */ + if (isNodeEnv()) { + return false; + } + + const testEl = document.createElement('div'); + const transEndEventNames = { + WebkitAnimation: 'webkitAnimationEnd', + OAnimation: 'oAnimationEnd oanimationend', + animation: 'animationend' + }; + + for (const i in transEndEventNames) { + if (Object.prototype.hasOwnProperty.call(transEndEventNames, i) && typeof testEl.style[i] !== 'undefined') { + return transEndEventNames[i]; + } + } + + return false; + })(); + + // https://github.com/twbs/bootstrap/blob/master/js/src/modal.js + + const measureScrollbar = () => { + const scrollDiv = document.createElement('div'); + scrollDiv.className = swalClasses['scrollbar-measure']; + document.body.appendChild(scrollDiv); + const scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth; + document.body.removeChild(scrollDiv); + return scrollbarWidth; + }; + + const renderActions = (instance, params) => { + const actions = getActions(); + const loader = getLoader(); + const confirmButton = getConfirmButton(); + const denyButton = getDenyButton(); + const cancelButton = getCancelButton(); // Actions (buttons) wrapper + + if (!params.showConfirmButton && !params.showDenyButton && !params.showCancelButton) { + hide(actions); + } else { + show(actions); + } // Custom class + + + applyCustomClass(actions, params, 'actions'); // Render buttons + + renderButton(confirmButton, 'confirm', params); + renderButton(denyButton, 'deny', params); + renderButton(cancelButton, 'cancel', params); + handleButtonsStyling(confirmButton, denyButton, cancelButton, params); + + if (params.reverseButtons) { + actions.insertBefore(cancelButton, loader); + actions.insertBefore(denyButton, loader); + actions.insertBefore(confirmButton, loader); + } // Loader + + + setInnerHtml(loader, params.loaderHtml); + applyCustomClass(loader, params, 'loader'); + }; + + function handleButtonsStyling(confirmButton, denyButton, cancelButton, params) { + if (!params.buttonsStyling) { + return removeClass([confirmButton, denyButton, cancelButton], swalClasses.styled); + } + + addClass([confirmButton, denyButton, cancelButton], swalClasses.styled); // Buttons background colors + + if (params.confirmButtonColor) { + confirmButton.style.backgroundColor = params.confirmButtonColor; + addClass(confirmButton, swalClasses['default-outline']); + } + + if (params.denyButtonColor) { + denyButton.style.backgroundColor = params.denyButtonColor; + addClass(denyButton, swalClasses['default-outline']); + } + + if (params.cancelButtonColor) { + cancelButton.style.backgroundColor = params.cancelButtonColor; + addClass(cancelButton, swalClasses['default-outline']); + } + } + + function renderButton(button, buttonType, params) { + toggle(button, params["show".concat(capitalizeFirstLetter(buttonType), "Button")], 'inline-block'); + setInnerHtml(button, params["".concat(buttonType, "ButtonText")]); // Set caption text + + button.setAttribute('aria-label', params["".concat(buttonType, "ButtonAriaLabel")]); // ARIA label + // Add buttons custom classes + + button.className = swalClasses[buttonType]; + applyCustomClass(button, params, "".concat(buttonType, "Button")); + addClass(button, params["".concat(buttonType, "ButtonClass")]); + } + + function handleBackdropParam(container, backdrop) { + if (typeof backdrop === 'string') { + container.style.background = backdrop; + } else if (!backdrop) { + addClass([document.documentElement, document.body], swalClasses['no-backdrop']); + } + } + + function handlePositionParam(container, position) { + if (position in swalClasses) { + addClass(container, swalClasses[position]); + } else { + warn('The "position" parameter is not valid, defaulting to "center"'); + addClass(container, swalClasses.center); + } + } + + function handleGrowParam(container, grow) { + if (grow && typeof grow === 'string') { + const growClass = "grow-".concat(grow); + + if (growClass in swalClasses) { + addClass(container, swalClasses[growClass]); + } + } + } + + const renderContainer = (instance, params) => { + const container = getContainer(); + + if (!container) { + return; + } + + handleBackdropParam(container, params.backdrop); + handlePositionParam(container, params.position); + handleGrowParam(container, params.grow); // Custom class + + applyCustomClass(container, params, 'container'); + }; + + /** + * This module containts `WeakMap`s for each effectively-"private property" that a `Swal` has. + * For example, to set the private property "foo" of `this` to "bar", you can `privateProps.foo.set(this, 'bar')` + * This is the approach that Babel will probably take to implement private methods/fields + * https://github.com/tc39/proposal-private-methods + * https://github.com/babel/babel/pull/7555 + * Once we have the changes from that PR in Babel, and our core class fits reasonable in *one module* + * then we can use that language feature. + */ + var privateProps = { + promise: new WeakMap(), + innerParams: new WeakMap(), + domCache: new WeakMap() + }; + + const inputTypes = ['input', 'file', 'range', 'select', 'radio', 'checkbox', 'textarea']; + const renderInput = (instance, params) => { + const popup = getPopup(); + const innerParams = privateProps.innerParams.get(instance); + const rerender = !innerParams || params.input !== innerParams.input; + inputTypes.forEach(inputType => { + const inputClass = swalClasses[inputType]; + const inputContainer = getChildByClass(popup, inputClass); // set attributes + + setAttributes(inputType, params.inputAttributes); // set class + + inputContainer.className = inputClass; + + if (rerender) { + hide(inputContainer); + } + }); + + if (params.input) { + if (rerender) { + showInput(params); + } // set custom class + + + setCustomClass(params); + } + }; + + const showInput = params => { + if (!renderInputType[params.input]) { + return error("Unexpected type of input! Expected \"text\", \"email\", \"password\", \"number\", \"tel\", \"select\", \"radio\", \"checkbox\", \"textarea\", \"file\" or \"url\", got \"".concat(params.input, "\"")); + } + + const inputContainer = getInputContainer(params.input); + const input = renderInputType[params.input](inputContainer, params); + show(input); // input autofocus + + setTimeout(() => { + focusInput(input); + }); + }; + + const removeAttributes = input => { + for (let i = 0; i < input.attributes.length; i++) { + const attrName = input.attributes[i].name; + + if (!['type', 'value', 'style'].includes(attrName)) { + input.removeAttribute(attrName); + } + } + }; + + const setAttributes = (inputType, inputAttributes) => { + const input = getInput(getPopup(), inputType); + + if (!input) { + return; + } + + removeAttributes(input); + + for (const attr in inputAttributes) { + input.setAttribute(attr, inputAttributes[attr]); + } + }; + + const setCustomClass = params => { + const inputContainer = getInputContainer(params.input); + + if (params.customClass) { + addClass(inputContainer, params.customClass.input); + } + }; + + const setInputPlaceholder = (input, params) => { + if (!input.placeholder || params.inputPlaceholder) { + input.placeholder = params.inputPlaceholder; + } + }; + + const setInputLabel = (input, prependTo, params) => { + if (params.inputLabel) { + input.id = swalClasses.input; + const label = document.createElement('label'); + const labelClass = swalClasses['input-label']; + label.setAttribute('for', input.id); + label.className = labelClass; + addClass(label, params.customClass.inputLabel); + label.innerText = params.inputLabel; + prependTo.insertAdjacentElement('beforebegin', label); + } + }; + + const getInputContainer = inputType => { + const inputClass = swalClasses[inputType] ? swalClasses[inputType] : swalClasses.input; + return getChildByClass(getPopup(), inputClass); + }; + + const renderInputType = {}; + + renderInputType.text = renderInputType.email = renderInputType.password = renderInputType.number = renderInputType.tel = renderInputType.url = (input, params) => { + if (typeof params.inputValue === 'string' || typeof params.inputValue === 'number') { + input.value = params.inputValue; + } else if (!isPromise(params.inputValue)) { + warn("Unexpected type of inputValue! Expected \"string\", \"number\" or \"Promise\", got \"".concat(typeof params.inputValue, "\"")); + } + + setInputLabel(input, input, params); + setInputPlaceholder(input, params); + input.type = params.input; + return input; + }; + + renderInputType.file = (input, params) => { + setInputLabel(input, input, params); + setInputPlaceholder(input, params); + return input; + }; + + renderInputType.range = (range, params) => { + const rangeInput = range.querySelector('input'); + const rangeOutput = range.querySelector('output'); + rangeInput.value = params.inputValue; + rangeInput.type = params.input; + rangeOutput.value = params.inputValue; + setInputLabel(rangeInput, range, params); + return range; + }; + + renderInputType.select = (select, params) => { + select.textContent = ''; + + if (params.inputPlaceholder) { + const placeholder = document.createElement('option'); + setInnerHtml(placeholder, params.inputPlaceholder); + placeholder.value = ''; + placeholder.disabled = true; + placeholder.selected = true; + select.appendChild(placeholder); + } + + setInputLabel(select, select, params); + return select; + }; + + renderInputType.radio = radio => { + radio.textContent = ''; + return radio; + }; + + renderInputType.checkbox = (checkboxContainer, params) => { + const checkbox = getInput(getPopup(), 'checkbox'); + checkbox.value = 1; + checkbox.id = swalClasses.checkbox; + checkbox.checked = Boolean(params.inputValue); + const label = checkboxContainer.querySelector('span'); + setInnerHtml(label, params.inputPlaceholder); + return checkboxContainer; + }; + + renderInputType.textarea = (textarea, params) => { + textarea.value = params.inputValue; + setInputPlaceholder(textarea, params); + setInputLabel(textarea, textarea, params); + + const getMargin = el => parseInt(window.getComputedStyle(el).marginLeft) + parseInt(window.getComputedStyle(el).marginRight); + + setTimeout(() => { + // #2291 + if ('MutationObserver' in window) { + // #1699 + const initialPopupWidth = parseInt(window.getComputedStyle(getPopup()).width); + + const textareaResizeHandler = () => { + const textareaWidth = textarea.offsetWidth + getMargin(textarea); + + if (textareaWidth > initialPopupWidth) { + getPopup().style.width = "".concat(textareaWidth, "px"); + } else { + getPopup().style.width = null; + } + }; + + new MutationObserver(textareaResizeHandler).observe(textarea, { + attributes: true, + attributeFilter: ['style'] + }); + } + }); + return textarea; + }; + + const renderContent = (instance, params) => { + const htmlContainer = getHtmlContainer(); + applyCustomClass(htmlContainer, params, 'htmlContainer'); // Content as HTML + + if (params.html) { + parseHtmlToContainer(params.html, htmlContainer); + show(htmlContainer, 'block'); // Content as plain text + } else if (params.text) { + htmlContainer.textContent = params.text; + show(htmlContainer, 'block'); // No content + } else { + hide(htmlContainer); + } + + renderInput(instance, params); + }; + + const renderFooter = (instance, params) => { + const footer = getFooter(); + toggle(footer, params.footer); + + if (params.footer) { + parseHtmlToContainer(params.footer, footer); + } // Custom class + + + applyCustomClass(footer, params, 'footer'); + }; + + const renderCloseButton = (instance, params) => { + const closeButton = getCloseButton(); + setInnerHtml(closeButton, params.closeButtonHtml); // Custom class + + applyCustomClass(closeButton, params, 'closeButton'); + toggle(closeButton, params.showCloseButton); + closeButton.setAttribute('aria-label', params.closeButtonAriaLabel); + }; + + const renderIcon = (instance, params) => { + const innerParams = privateProps.innerParams.get(instance); + const icon = getIcon(); // if the given icon already rendered, apply the styling without re-rendering the icon + + if (innerParams && params.icon === innerParams.icon) { + // Custom or default content + setContent(icon, params); + applyStyles(icon, params); + return; + } + + if (!params.icon && !params.iconHtml) { + return hide(icon); + } + + if (params.icon && Object.keys(iconTypes).indexOf(params.icon) === -1) { + error("Unknown icon! Expected \"success\", \"error\", \"warning\", \"info\" or \"question\", got \"".concat(params.icon, "\"")); + return hide(icon); + } + + show(icon); // Custom or default content + + setContent(icon, params); + applyStyles(icon, params); // Animate icon + + addClass(icon, params.showClass.icon); + }; + + const applyStyles = (icon, params) => { + for (const iconType in iconTypes) { + if (params.icon !== iconType) { + removeClass(icon, iconTypes[iconType]); + } + } + + addClass(icon, iconTypes[params.icon]); // Icon color + + setColor(icon, params); // Success icon background color + + adjustSuccessIconBackgoundColor(); // Custom class + + applyCustomClass(icon, params, 'icon'); + }; // Adjust success icon background color to match the popup background color + + + const adjustSuccessIconBackgoundColor = () => { + const popup = getPopup(); + const popupBackgroundColor = window.getComputedStyle(popup).getPropertyValue('background-color'); + const successIconParts = popup.querySelectorAll('[class^=swal2-success-circular-line], .swal2-success-fix'); + + for (let i = 0; i < successIconParts.length; i++) { + successIconParts[i].style.backgroundColor = popupBackgroundColor; + } + }; + + const setContent = (icon, params) => { + icon.textContent = ''; + + if (params.iconHtml) { + setInnerHtml(icon, iconContent(params.iconHtml)); + } else if (params.icon === 'success') { + setInnerHtml(icon, "\n
                                            \n \n
                                            \n
                                            \n "); + } else if (params.icon === 'error') { + setInnerHtml(icon, "\n \n \n \n \n "); + } else { + const defaultIconHtml = { + question: '?', + warning: '!', + info: 'i' + }; + setInnerHtml(icon, iconContent(defaultIconHtml[params.icon])); + } + }; + + const setColor = (icon, params) => { + if (!params.iconColor) { + return; + } + + icon.style.color = params.iconColor; + icon.style.borderColor = params.iconColor; + + for (const sel of ['.swal2-success-line-tip', '.swal2-success-line-long', '.swal2-x-mark-line-left', '.swal2-x-mark-line-right']) { + setStyle(icon, sel, 'backgroundColor', params.iconColor); + } + + setStyle(icon, '.swal2-success-ring', 'borderColor', params.iconColor); + }; + + const iconContent = content => "
                                            ").concat(content, "
                                            "); + + const renderImage = (instance, params) => { + const image = getImage(); + + if (!params.imageUrl) { + return hide(image); + } + + show(image, ''); // Src, alt + + image.setAttribute('src', params.imageUrl); + image.setAttribute('alt', params.imageAlt); // Width, height + + applyNumericalStyle(image, 'width', params.imageWidth); + applyNumericalStyle(image, 'height', params.imageHeight); // Class + + image.className = swalClasses.image; + applyCustomClass(image, params, 'image'); + }; + + const createStepElement = step => { + const stepEl = document.createElement('li'); + addClass(stepEl, swalClasses['progress-step']); + setInnerHtml(stepEl, step); + return stepEl; + }; + + const createLineElement = params => { + const lineEl = document.createElement('li'); + addClass(lineEl, swalClasses['progress-step-line']); + + if (params.progressStepsDistance) { + lineEl.style.width = params.progressStepsDistance; + } + + return lineEl; + }; + + const renderProgressSteps = (instance, params) => { + const progressStepsContainer = getProgressSteps(); + + if (!params.progressSteps || params.progressSteps.length === 0) { + return hide(progressStepsContainer); + } + + show(progressStepsContainer); + progressStepsContainer.textContent = ''; + + if (params.currentProgressStep >= params.progressSteps.length) { + warn('Invalid currentProgressStep parameter, it should be less than progressSteps.length ' + '(currentProgressStep like JS arrays starts from 0)'); + } + + params.progressSteps.forEach((step, index) => { + const stepEl = createStepElement(step); + progressStepsContainer.appendChild(stepEl); + + if (index === params.currentProgressStep) { + addClass(stepEl, swalClasses['active-progress-step']); + } + + if (index !== params.progressSteps.length - 1) { + const lineEl = createLineElement(params); + progressStepsContainer.appendChild(lineEl); + } + }); + }; + + const renderTitle = (instance, params) => { + const title = getTitle(); + toggle(title, params.title || params.titleText, 'block'); + + if (params.title) { + parseHtmlToContainer(params.title, title); + } + + if (params.titleText) { + title.innerText = params.titleText; + } // Custom class + + + applyCustomClass(title, params, 'title'); + }; + + const renderPopup = (instance, params) => { + const container = getContainer(); + const popup = getPopup(); // Width + + if (params.toast) { + // #2170 + applyNumericalStyle(container, 'width', params.width); + popup.style.width = '100%'; + popup.insertBefore(getLoader(), getIcon()); + } else { + applyNumericalStyle(popup, 'width', params.width); + } // Padding + + + applyNumericalStyle(popup, 'padding', params.padding); // Background + + if (params.background) { + popup.style.background = params.background; + } + + hide(getValidationMessage()); // Classes + + addClasses(popup, params); + }; + + const addClasses = (popup, params) => { + // Default Class + showClass when updating Swal.update({}) + popup.className = "".concat(swalClasses.popup, " ").concat(isVisible(popup) ? params.showClass.popup : ''); + + if (params.toast) { + addClass([document.documentElement, document.body], swalClasses['toast-shown']); + addClass(popup, swalClasses.toast); + } else { + addClass(popup, swalClasses.modal); + } // Custom class + + + applyCustomClass(popup, params, 'popup'); + + if (typeof params.customClass === 'string') { + addClass(popup, params.customClass); + } // Icon class (#1842) + + + if (params.icon) { + addClass(popup, swalClasses["icon-".concat(params.icon)]); + } + }; + + const render = (instance, params) => { + renderPopup(instance, params); + renderContainer(instance, params); + renderProgressSteps(instance, params); + renderIcon(instance, params); + renderImage(instance, params); + renderTitle(instance, params); + renderCloseButton(instance, params); + renderContent(instance, params); + renderActions(instance, params); + renderFooter(instance, params); + + if (typeof params.didRender === 'function') { + params.didRender(getPopup()); + } + }; + + /* + * Global function to determine if SweetAlert2 popup is shown + */ + + const isVisible$1 = () => { + return isVisible(getPopup()); + }; + /* + * Global function to click 'Confirm' button + */ + + const clickConfirm = () => getConfirmButton() && getConfirmButton().click(); + /* + * Global function to click 'Deny' button + */ + + const clickDeny = () => getDenyButton() && getDenyButton().click(); + /* + * Global function to click 'Cancel' button + */ + + const clickCancel = () => getCancelButton() && getCancelButton().click(); + + function fire(...args) { + const Swal = this; + return new Swal(...args); + } + + /** + * Returns an extended version of `Swal` containing `params` as defaults. + * Useful for reusing Swal configuration. + * + * For example: + * + * Before: + * const textPromptOptions = { input: 'text', showCancelButton: true } + * const {value: firstName} = await Swal.fire({ ...textPromptOptions, title: 'What is your first name?' }) + * const {value: lastName} = await Swal.fire({ ...textPromptOptions, title: 'What is your last name?' }) + * + * After: + * const TextPrompt = Swal.mixin({ input: 'text', showCancelButton: true }) + * const {value: firstName} = await TextPrompt('What is your first name?') + * const {value: lastName} = await TextPrompt('What is your last name?') + * + * @param mixinParams + */ + function mixin(mixinParams) { + class MixinSwal extends this { + _main(params, priorityMixinParams) { + return super._main(params, Object.assign({}, mixinParams, priorityMixinParams)); + } + + } + + return MixinSwal; + } + + /** + * Shows loader (spinner), this is useful with AJAX requests. + * By default the loader be shown instead of the "Confirm" button. + */ + + const showLoading = buttonToReplace => { + let popup = getPopup(); + + if (!popup) { + Swal.fire(); + } + + popup = getPopup(); + const loader = getLoader(); + + if (isToast()) { + hide(getIcon()); + } else { + replaceButton(popup, buttonToReplace); + } + + show(loader); + popup.setAttribute('data-loading', true); + popup.setAttribute('aria-busy', true); + popup.focus(); + }; + + const replaceButton = (popup, buttonToReplace) => { + const actions = getActions(); + const loader = getLoader(); + + if (!buttonToReplace && isVisible(getConfirmButton())) { + buttonToReplace = getConfirmButton(); + } + + show(actions); + + if (buttonToReplace) { + hide(buttonToReplace); + loader.setAttribute('data-button-to-replace', buttonToReplace.className); + } + + loader.parentNode.insertBefore(loader, buttonToReplace); + addClass([popup, actions], swalClasses.loading); + }; + + const RESTORE_FOCUS_TIMEOUT = 100; + + const globalState = {}; + + const focusPreviousActiveElement = () => { + if (globalState.previousActiveElement && globalState.previousActiveElement.focus) { + globalState.previousActiveElement.focus(); + globalState.previousActiveElement = null; + } else if (document.body) { + document.body.focus(); + } + }; // Restore previous active (focused) element + + + const restoreActiveElement = returnFocus => { + return new Promise(resolve => { + if (!returnFocus) { + return resolve(); + } + + const x = window.scrollX; + const y = window.scrollY; + globalState.restoreFocusTimeout = setTimeout(() => { + focusPreviousActiveElement(); + resolve(); + }, RESTORE_FOCUS_TIMEOUT); // issues/900 + + window.scrollTo(x, y); + }); + }; + + /** + * If `timer` parameter is set, returns number of milliseconds of timer remained. + * Otherwise, returns undefined. + */ + + const getTimerLeft = () => { + return globalState.timeout && globalState.timeout.getTimerLeft(); + }; + /** + * Stop timer. Returns number of milliseconds of timer remained. + * If `timer` parameter isn't set, returns undefined. + */ + + const stopTimer = () => { + if (globalState.timeout) { + stopTimerProgressBar(); + return globalState.timeout.stop(); + } + }; + /** + * Resume timer. Returns number of milliseconds of timer remained. + * If `timer` parameter isn't set, returns undefined. + */ + + const resumeTimer = () => { + if (globalState.timeout) { + const remaining = globalState.timeout.start(); + animateTimerProgressBar(remaining); + return remaining; + } + }; + /** + * Resume timer. Returns number of milliseconds of timer remained. + * If `timer` parameter isn't set, returns undefined. + */ + + const toggleTimer = () => { + const timer = globalState.timeout; + return timer && (timer.running ? stopTimer() : resumeTimer()); + }; + /** + * Increase timer. Returns number of milliseconds of an updated timer. + * If `timer` parameter isn't set, returns undefined. + */ + + const increaseTimer = n => { + if (globalState.timeout) { + const remaining = globalState.timeout.increase(n); + animateTimerProgressBar(remaining, true); + return remaining; + } + }; + /** + * Check if timer is running. Returns true if timer is running + * or false if timer is paused or stopped. + * If `timer` parameter isn't set, returns undefined + */ + + const isTimerRunning = () => { + return globalState.timeout && globalState.timeout.isRunning(); + }; + + let bodyClickListenerAdded = false; + const clickHandlers = {}; + function bindClickHandler(attr = 'data-swal-template') { + clickHandlers[attr] = this; + + if (!bodyClickListenerAdded) { + document.body.addEventListener('click', bodyClickListener); + bodyClickListenerAdded = true; + } + } + + const bodyClickListener = event => { + // TODO: replace with event.composedPath() + for (let el = event.target; el && el !== document; el = el.parentNode) { + for (const attr in clickHandlers) { + const template = el.getAttribute(attr); + + if (template) { + clickHandlers[attr].fire({ + template + }); + return; + } + } + } + }; + + const defaultParams = { + title: '', + titleText: '', + text: '', + html: '', + footer: '', + icon: undefined, + iconColor: undefined, + iconHtml: undefined, + template: undefined, + toast: false, + showClass: { + popup: 'swal2-show', + backdrop: 'swal2-backdrop-show', + icon: 'swal2-icon-show' + }, + hideClass: { + popup: 'swal2-hide', + backdrop: 'swal2-backdrop-hide', + icon: 'swal2-icon-hide' + }, + customClass: {}, + target: 'body', + backdrop: true, + heightAuto: true, + allowOutsideClick: true, + allowEscapeKey: true, + allowEnterKey: true, + stopKeydownPropagation: true, + keydownListenerCapture: false, + showConfirmButton: true, + showDenyButton: false, + showCancelButton: false, + preConfirm: undefined, + preDeny: undefined, + confirmButtonText: 'OK', + confirmButtonAriaLabel: '', + confirmButtonColor: undefined, + denyButtonText: 'No', + denyButtonAriaLabel: '', + denyButtonColor: undefined, + cancelButtonText: 'Cancel', + cancelButtonAriaLabel: '', + cancelButtonColor: undefined, + buttonsStyling: true, + reverseButtons: false, + focusConfirm: true, + focusDeny: false, + focusCancel: false, + returnFocus: true, + showCloseButton: false, + closeButtonHtml: '×', + closeButtonAriaLabel: 'Close this dialog', + loaderHtml: '', + showLoaderOnConfirm: false, + showLoaderOnDeny: false, + imageUrl: undefined, + imageWidth: undefined, + imageHeight: undefined, + imageAlt: '', + timer: undefined, + timerProgressBar: false, + width: undefined, + padding: undefined, + background: undefined, + input: undefined, + inputPlaceholder: '', + inputLabel: '', + inputValue: '', + inputOptions: {}, + inputAutoTrim: true, + inputAttributes: {}, + inputValidator: undefined, + returnInputValueOnDeny: false, + validationMessage: undefined, + grow: false, + position: 'center', + progressSteps: [], + currentProgressStep: undefined, + progressStepsDistance: undefined, + willOpen: undefined, + didOpen: undefined, + didRender: undefined, + willClose: undefined, + didClose: undefined, + didDestroy: undefined, + scrollbarPadding: true + }; + const updatableParams = ['allowEscapeKey', 'allowOutsideClick', 'background', 'buttonsStyling', 'cancelButtonAriaLabel', 'cancelButtonColor', 'cancelButtonText', 'closeButtonAriaLabel', 'closeButtonHtml', 'confirmButtonAriaLabel', 'confirmButtonColor', 'confirmButtonText', 'currentProgressStep', 'customClass', 'denyButtonAriaLabel', 'denyButtonColor', 'denyButtonText', 'didClose', 'didDestroy', 'footer', 'hideClass', 'html', 'icon', 'iconColor', 'iconHtml', 'imageAlt', 'imageHeight', 'imageUrl', 'imageWidth', 'preConfirm', 'preDeny', 'progressSteps', 'returnFocus', 'reverseButtons', 'showCancelButton', 'showCloseButton', 'showConfirmButton', 'showDenyButton', 'text', 'title', 'titleText', 'willClose']; + const deprecatedParams = {}; + const toastIncompatibleParams = ['allowOutsideClick', 'allowEnterKey', 'backdrop', 'focusConfirm', 'focusDeny', 'focusCancel', 'returnFocus', 'heightAuto', 'keydownListenerCapture']; + /** + * Is valid parameter + * @param {String} paramName + */ + + const isValidParameter = paramName => { + return Object.prototype.hasOwnProperty.call(defaultParams, paramName); + }; + /** + * Is valid parameter for Swal.update() method + * @param {String} paramName + */ + + const isUpdatableParameter = paramName => { + return updatableParams.indexOf(paramName) !== -1; + }; + /** + * Is deprecated parameter + * @param {String} paramName + */ + + const isDeprecatedParameter = paramName => { + return deprecatedParams[paramName]; + }; + + const checkIfParamIsValid = param => { + if (!isValidParameter(param)) { + warn("Unknown parameter \"".concat(param, "\"")); + } + }; + + const checkIfToastParamIsValid = param => { + if (toastIncompatibleParams.includes(param)) { + warn("The parameter \"".concat(param, "\" is incompatible with toasts")); + } + }; + + const checkIfParamIsDeprecated = param => { + if (isDeprecatedParameter(param)) { + warnAboutDeprecation(param, isDeprecatedParameter(param)); + } + }; + /** + * Show relevant warnings for given params + * + * @param params + */ + + + const showWarningsForParams = params => { + if (!params.backdrop && params.allowOutsideClick) { + warn('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`'); + } + + for (const param in params) { + checkIfParamIsValid(param); + + if (params.toast) { + checkIfToastParamIsValid(param); + } + + checkIfParamIsDeprecated(param); + } + }; + + + + var staticMethods = /*#__PURE__*/Object.freeze({ + isValidParameter: isValidParameter, + isUpdatableParameter: isUpdatableParameter, + isDeprecatedParameter: isDeprecatedParameter, + argsToParams: argsToParams, + isVisible: isVisible$1, + clickConfirm: clickConfirm, + clickDeny: clickDeny, + clickCancel: clickCancel, + getContainer: getContainer, + getPopup: getPopup, + getTitle: getTitle, + getHtmlContainer: getHtmlContainer, + getImage: getImage, + getIcon: getIcon, + getInputLabel: getInputLabel, + getCloseButton: getCloseButton, + getActions: getActions, + getConfirmButton: getConfirmButton, + getDenyButton: getDenyButton, + getCancelButton: getCancelButton, + getLoader: getLoader, + getFooter: getFooter, + getTimerProgressBar: getTimerProgressBar, + getFocusableElements: getFocusableElements, + getValidationMessage: getValidationMessage, + isLoading: isLoading, + fire: fire, + mixin: mixin, + showLoading: showLoading, + enableLoading: showLoading, + getTimerLeft: getTimerLeft, + stopTimer: stopTimer, + resumeTimer: resumeTimer, + toggleTimer: toggleTimer, + increaseTimer: increaseTimer, + isTimerRunning: isTimerRunning, + bindClickHandler: bindClickHandler + }); + + /** + * Hides loader and shows back the button which was hidden by .showLoading() + */ + + function hideLoading() { + // do nothing if popup is closed + const innerParams = privateProps.innerParams.get(this); + + if (!innerParams) { + return; + } + + const domCache = privateProps.domCache.get(this); + hide(domCache.loader); + + if (isToast()) { + if (innerParams.icon) { + show(getIcon()); + } + } else { + showRelatedButton(domCache); + } + + removeClass([domCache.popup, domCache.actions], swalClasses.loading); + domCache.popup.removeAttribute('aria-busy'); + domCache.popup.removeAttribute('data-loading'); + domCache.confirmButton.disabled = false; + domCache.denyButton.disabled = false; + domCache.cancelButton.disabled = false; + } + + const showRelatedButton = domCache => { + const buttonToReplace = domCache.popup.getElementsByClassName(domCache.loader.getAttribute('data-button-to-replace')); + + if (buttonToReplace.length) { + show(buttonToReplace[0], 'inline-block'); + } else if (allButtonsAreHidden()) { + hide(domCache.actions); + } + }; + + function getInput$1(instance) { + const innerParams = privateProps.innerParams.get(instance || this); + const domCache = privateProps.domCache.get(instance || this); + + if (!domCache) { + return null; + } + + return getInput(domCache.popup, innerParams.input); + } + + const fixScrollbar = () => { + // for queues, do not do this more than once + if (states.previousBodyPadding !== null) { + return; + } // if the body has overflow + + + if (document.body.scrollHeight > window.innerHeight) { + // add padding so the content doesn't shift after removal of scrollbar + states.previousBodyPadding = parseInt(window.getComputedStyle(document.body).getPropertyValue('padding-right')); + document.body.style.paddingRight = "".concat(states.previousBodyPadding + measureScrollbar(), "px"); + } + }; + const undoScrollbar = () => { + if (states.previousBodyPadding !== null) { + document.body.style.paddingRight = "".concat(states.previousBodyPadding, "px"); + states.previousBodyPadding = null; + } + }; + + /* istanbul ignore file */ + + const iOSfix = () => { + const iOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream || navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1; + + if (iOS && !hasClass(document.body, swalClasses.iosfix)) { + const offset = document.body.scrollTop; + document.body.style.top = "".concat(offset * -1, "px"); + addClass(document.body, swalClasses.iosfix); + lockBodyScroll(); + addBottomPaddingForTallPopups(); // #1948 + } + }; + + const addBottomPaddingForTallPopups = () => { + const safari = !navigator.userAgent.match(/(CriOS|FxiOS|EdgiOS|YaBrowser|UCBrowser)/i); + + if (safari) { + const bottomPanelHeight = 44; + + if (getPopup().scrollHeight > window.innerHeight - bottomPanelHeight) { + getContainer().style.paddingBottom = "".concat(bottomPanelHeight, "px"); + } + } + }; + + const lockBodyScroll = () => { + // #1246 + const container = getContainer(); + let preventTouchMove; + + container.ontouchstart = e => { + preventTouchMove = shouldPreventTouchMove(e); + }; + + container.ontouchmove = e => { + if (preventTouchMove) { + e.preventDefault(); + e.stopPropagation(); + } + }; + }; + + const shouldPreventTouchMove = event => { + const target = event.target; + const container = getContainer(); + + if (isStylys(event) || isZoom(event)) { + return false; + } + + if (target === container) { + return true; + } + + if (!isScrollable(container) && target.tagName !== 'INPUT' && // #1603 + target.tagName !== 'TEXTAREA' && // #2266 + !(isScrollable(getHtmlContainer()) && // #1944 + getHtmlContainer().contains(target))) { + return true; + } + + return false; + }; + + const isStylys = event => { + // #1786 + return event.touches && event.touches.length && event.touches[0].touchType === 'stylus'; + }; + + const isZoom = event => { + // #1891 + return event.touches && event.touches.length > 1; + }; + + const undoIOSfix = () => { + if (hasClass(document.body, swalClasses.iosfix)) { + const offset = parseInt(document.body.style.top, 10); + removeClass(document.body, swalClasses.iosfix); + document.body.style.top = ''; + document.body.scrollTop = offset * -1; + } + }; + + // Adding aria-hidden="true" to elements outside of the active modal dialog ensures that + // elements not within the active modal dialog will not be surfaced if a user opens a screen + // reader’s list of elements (headings, form controls, landmarks, etc.) in the document. + + const setAriaHidden = () => { + const bodyChildren = toArray(document.body.children); + bodyChildren.forEach(el => { + if (el === getContainer() || el.contains(getContainer())) { + return; + } + + if (el.hasAttribute('aria-hidden')) { + el.setAttribute('data-previous-aria-hidden', el.getAttribute('aria-hidden')); + } + + el.setAttribute('aria-hidden', 'true'); + }); + }; + const unsetAriaHidden = () => { + const bodyChildren = toArray(document.body.children); + bodyChildren.forEach(el => { + if (el.hasAttribute('data-previous-aria-hidden')) { + el.setAttribute('aria-hidden', el.getAttribute('data-previous-aria-hidden')); + el.removeAttribute('data-previous-aria-hidden'); + } else { + el.removeAttribute('aria-hidden'); + } + }); + }; + + /** + * This module containts `WeakMap`s for each effectively-"private property" that a `Swal` has. + * For example, to set the private property "foo" of `this` to "bar", you can `privateProps.foo.set(this, 'bar')` + * This is the approach that Babel will probably take to implement private methods/fields + * https://github.com/tc39/proposal-private-methods + * https://github.com/babel/babel/pull/7555 + * Once we have the changes from that PR in Babel, and our core class fits reasonable in *one module* + * then we can use that language feature. + */ + var privateMethods = { + swalPromiseResolve: new WeakMap() + }; + + /* + * Instance method to close sweetAlert + */ + + function removePopupAndResetState(instance, container, returnFocus, didClose) { + if (isToast()) { + triggerDidCloseAndDispose(instance, didClose); + } else { + restoreActiveElement(returnFocus).then(() => triggerDidCloseAndDispose(instance, didClose)); + globalState.keydownTarget.removeEventListener('keydown', globalState.keydownHandler, { + capture: globalState.keydownListenerCapture + }); + globalState.keydownHandlerAdded = false; + } + + const isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent); // workaround for #2088 + // for some reason removing the container in Safari will scroll the document to bottom + + if (isSafari) { + container.setAttribute('style', 'display:none !important'); + container.removeAttribute('class'); + container.innerHTML = ''; + } else { + container.remove(); + } + + if (isModal()) { + undoScrollbar(); + undoIOSfix(); + unsetAriaHidden(); + } + + removeBodyClasses(); + } + + function removeBodyClasses() { + removeClass([document.documentElement, document.body], [swalClasses.shown, swalClasses['height-auto'], swalClasses['no-backdrop'], swalClasses['toast-shown']]); + } + + function close(resolveValue) { + const popup = getPopup(); + + if (!popup) { + return; + } + + resolveValue = prepareResolveValue(resolveValue); + const innerParams = privateProps.innerParams.get(this); + + if (!innerParams || hasClass(popup, innerParams.hideClass.popup)) { + return; + } + + const swalPromiseResolve = privateMethods.swalPromiseResolve.get(this); + removeClass(popup, innerParams.showClass.popup); + addClass(popup, innerParams.hideClass.popup); + const backdrop = getContainer(); + removeClass(backdrop, innerParams.showClass.backdrop); + addClass(backdrop, innerParams.hideClass.backdrop); + handlePopupAnimation(this, popup, innerParams); // Resolve Swal promise + + swalPromiseResolve(resolveValue); + } + + const prepareResolveValue = resolveValue => { + // When user calls Swal.close() + if (typeof resolveValue === 'undefined') { + return { + isConfirmed: false, + isDenied: false, + isDismissed: true + }; + } + + return Object.assign({ + isConfirmed: false, + isDenied: false, + isDismissed: false + }, resolveValue); + }; + + const handlePopupAnimation = (instance, popup, innerParams) => { + const container = getContainer(); // If animation is supported, animate + + const animationIsSupported = animationEndEvent && hasCssAnimation(popup); + + if (typeof innerParams.willClose === 'function') { + innerParams.willClose(popup); + } + + if (animationIsSupported) { + animatePopup(instance, popup, container, innerParams.returnFocus, innerParams.didClose); + } else { + // Otherwise, remove immediately + removePopupAndResetState(instance, container, innerParams.returnFocus, innerParams.didClose); + } + }; + + const animatePopup = (instance, popup, container, returnFocus, didClose) => { + globalState.swalCloseEventFinishedCallback = removePopupAndResetState.bind(null, instance, container, returnFocus, didClose); + popup.addEventListener(animationEndEvent, function (e) { + if (e.target === popup) { + globalState.swalCloseEventFinishedCallback(); + delete globalState.swalCloseEventFinishedCallback; + } + }); + }; + + const triggerDidCloseAndDispose = (instance, didClose) => { + setTimeout(() => { + if (typeof didClose === 'function') { + didClose.bind(instance.params)(); + } + + instance._destroy(); + }); + }; + + function setButtonsDisabled(instance, buttons, disabled) { + const domCache = privateProps.domCache.get(instance); + buttons.forEach(button => { + domCache[button].disabled = disabled; + }); + } + + function setInputDisabled(input, disabled) { + if (!input) { + return false; + } + + if (input.type === 'radio') { + const radiosContainer = input.parentNode.parentNode; + const radios = radiosContainer.querySelectorAll('input'); + + for (let i = 0; i < radios.length; i++) { + radios[i].disabled = disabled; + } + } else { + input.disabled = disabled; + } + } + + function enableButtons() { + setButtonsDisabled(this, ['confirmButton', 'denyButton', 'cancelButton'], false); + } + function disableButtons() { + setButtonsDisabled(this, ['confirmButton', 'denyButton', 'cancelButton'], true); + } + function enableInput() { + return setInputDisabled(this.getInput(), false); + } + function disableInput() { + return setInputDisabled(this.getInput(), true); + } + + function showValidationMessage(error) { + const domCache = privateProps.domCache.get(this); + const params = privateProps.innerParams.get(this); + setInnerHtml(domCache.validationMessage, error); + domCache.validationMessage.className = swalClasses['validation-message']; + + if (params.customClass && params.customClass.validationMessage) { + addClass(domCache.validationMessage, params.customClass.validationMessage); + } + + show(domCache.validationMessage); + const input = this.getInput(); + + if (input) { + input.setAttribute('aria-invalid', true); + input.setAttribute('aria-describedby', swalClasses['validation-message']); + focusInput(input); + addClass(input, swalClasses.inputerror); + } + } // Hide block with validation message + + function resetValidationMessage$1() { + const domCache = privateProps.domCache.get(this); + + if (domCache.validationMessage) { + hide(domCache.validationMessage); + } + + const input = this.getInput(); + + if (input) { + input.removeAttribute('aria-invalid'); + input.removeAttribute('aria-describedby'); + removeClass(input, swalClasses.inputerror); + } + } + + function getProgressSteps$1() { + const domCache = privateProps.domCache.get(this); + return domCache.progressSteps; + } + + class Timer { + constructor(callback, delay) { + this.callback = callback; + this.remaining = delay; + this.running = false; + this.start(); + } + + start() { + if (!this.running) { + this.running = true; + this.started = new Date(); + this.id = setTimeout(this.callback, this.remaining); + } + + return this.remaining; + } + + stop() { + if (this.running) { + this.running = false; + clearTimeout(this.id); + this.remaining -= new Date() - this.started; + } + + return this.remaining; + } + + increase(n) { + const running = this.running; + + if (running) { + this.stop(); + } + + this.remaining += n; + + if (running) { + this.start(); + } + + return this.remaining; + } + + getTimerLeft() { + if (this.running) { + this.stop(); + this.start(); + } + + return this.remaining; + } + + isRunning() { + return this.running; + } + + } + + var defaultInputValidators = { + email: (string, validationMessage) => { + return /^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]{2,24}$/.test(string) ? Promise.resolve() : Promise.resolve(validationMessage || 'Invalid email address'); + }, + url: (string, validationMessage) => { + // taken from https://stackoverflow.com/a/3809435 with a small change from #1306 and #2013 + return /^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(string) ? Promise.resolve() : Promise.resolve(validationMessage || 'Invalid URL'); + } + }; + + function setDefaultInputValidators(params) { + // Use default `inputValidator` for supported input types if not provided + if (!params.inputValidator) { + Object.keys(defaultInputValidators).forEach(key => { + if (params.input === key) { + params.inputValidator = defaultInputValidators[key]; + } + }); + } + } + + function validateCustomTargetElement(params) { + // Determine if the custom target element is valid + if (!params.target || typeof params.target === 'string' && !document.querySelector(params.target) || typeof params.target !== 'string' && !params.target.appendChild) { + warn('Target parameter is not valid, defaulting to "body"'); + params.target = 'body'; + } + } + /** + * Set type, text and actions on popup + * + * @param params + * @returns {boolean} + */ + + + function setParameters(params) { + setDefaultInputValidators(params); // showLoaderOnConfirm && preConfirm + + if (params.showLoaderOnConfirm && !params.preConfirm) { + warn('showLoaderOnConfirm is set to true, but preConfirm is not defined.\n' + 'showLoaderOnConfirm should be used together with preConfirm, see usage example:\n' + 'https://sweetalert2.github.io/#ajax-request'); + } + + validateCustomTargetElement(params); // Replace newlines with
                                            in title + + if (typeof params.title === 'string') { + params.title = params.title.split('\n').join('
                                            '); + } + + init(params); + } + + const swalStringParams = ['swal-title', 'swal-html', 'swal-footer']; + const getTemplateParams = params => { + const template = typeof params.template === 'string' ? document.querySelector(params.template) : params.template; + + if (!template) { + return {}; + } + + const templateContent = template.content; + showWarningsForElements(templateContent); + const result = Object.assign(getSwalParams(templateContent), getSwalButtons(templateContent), getSwalImage(templateContent), getSwalIcon(templateContent), getSwalInput(templateContent), getSwalStringParams(templateContent, swalStringParams)); + return result; + }; + + const getSwalParams = templateContent => { + const result = {}; + toArray(templateContent.querySelectorAll('swal-param')).forEach(param => { + showWarningsForAttributes(param, ['name', 'value']); + const paramName = param.getAttribute('name'); + let value = param.getAttribute('value'); + + if (typeof defaultParams[paramName] === 'boolean' && value === 'false') { + value = false; + } + + if (typeof defaultParams[paramName] === 'object') { + value = JSON.parse(value); + } + + result[paramName] = value; + }); + return result; + }; + + const getSwalButtons = templateContent => { + const result = {}; + toArray(templateContent.querySelectorAll('swal-button')).forEach(button => { + showWarningsForAttributes(button, ['type', 'color', 'aria-label']); + const type = button.getAttribute('type'); + result["".concat(type, "ButtonText")] = button.innerHTML; + result["show".concat(capitalizeFirstLetter(type), "Button")] = true; + + if (button.hasAttribute('color')) { + result["".concat(type, "ButtonColor")] = button.getAttribute('color'); + } + + if (button.hasAttribute('aria-label')) { + result["".concat(type, "ButtonAriaLabel")] = button.getAttribute('aria-label'); + } + }); + return result; + }; + + const getSwalImage = templateContent => { + const result = {}; + const image = templateContent.querySelector('swal-image'); + + if (image) { + showWarningsForAttributes(image, ['src', 'width', 'height', 'alt']); + + if (image.hasAttribute('src')) { + result.imageUrl = image.getAttribute('src'); + } + + if (image.hasAttribute('width')) { + result.imageWidth = image.getAttribute('width'); + } + + if (image.hasAttribute('height')) { + result.imageHeight = image.getAttribute('height'); + } + + if (image.hasAttribute('alt')) { + result.imageAlt = image.getAttribute('alt'); + } + } + + return result; + }; + + const getSwalIcon = templateContent => { + const result = {}; + const icon = templateContent.querySelector('swal-icon'); + + if (icon) { + showWarningsForAttributes(icon, ['type', 'color']); + + if (icon.hasAttribute('type')) { + result.icon = icon.getAttribute('type'); + } + + if (icon.hasAttribute('color')) { + result.iconColor = icon.getAttribute('color'); + } + + result.iconHtml = icon.innerHTML; + } + + return result; + }; + + const getSwalInput = templateContent => { + const result = {}; + const input = templateContent.querySelector('swal-input'); + + if (input) { + showWarningsForAttributes(input, ['type', 'label', 'placeholder', 'value']); + result.input = input.getAttribute('type') || 'text'; + + if (input.hasAttribute('label')) { + result.inputLabel = input.getAttribute('label'); + } + + if (input.hasAttribute('placeholder')) { + result.inputPlaceholder = input.getAttribute('placeholder'); + } + + if (input.hasAttribute('value')) { + result.inputValue = input.getAttribute('value'); + } + } + + const inputOptions = templateContent.querySelectorAll('swal-input-option'); + + if (inputOptions.length) { + result.inputOptions = {}; + toArray(inputOptions).forEach(option => { + showWarningsForAttributes(option, ['value']); + const optionValue = option.getAttribute('value'); + const optionName = option.innerHTML; + result.inputOptions[optionValue] = optionName; + }); + } + + return result; + }; + + const getSwalStringParams = (templateContent, paramNames) => { + const result = {}; + + for (const i in paramNames) { + const paramName = paramNames[i]; + const tag = templateContent.querySelector(paramName); + + if (tag) { + showWarningsForAttributes(tag, []); + result[paramName.replace(/^swal-/, '')] = tag.innerHTML.trim(); + } + } + + return result; + }; + + const showWarningsForElements = template => { + const allowedElements = swalStringParams.concat(['swal-param', 'swal-button', 'swal-image', 'swal-icon', 'swal-input', 'swal-input-option']); + toArray(template.children).forEach(el => { + const tagName = el.tagName.toLowerCase(); + + if (allowedElements.indexOf(tagName) === -1) { + warn("Unrecognized element <".concat(tagName, ">")); + } + }); + }; + + const showWarningsForAttributes = (el, allowedAttributes) => { + toArray(el.attributes).forEach(attribute => { + if (allowedAttributes.indexOf(attribute.name) === -1) { + warn(["Unrecognized attribute \"".concat(attribute.name, "\" on <").concat(el.tagName.toLowerCase(), ">."), "".concat(allowedAttributes.length ? "Allowed attributes are: ".concat(allowedAttributes.join(', ')) : 'To set the value, use HTML within the element.')]); + } + }); + }; + + const SHOW_CLASS_TIMEOUT = 10; + /** + * Open popup, add necessary classes and styles, fix scrollbar + * + * @param params + */ + + const openPopup = params => { + const container = getContainer(); + const popup = getPopup(); + + if (typeof params.willOpen === 'function') { + params.willOpen(popup); + } + + const bodyStyles = window.getComputedStyle(document.body); + const initialBodyOverflow = bodyStyles.overflowY; + addClasses$1(container, popup, params); // scrolling is 'hidden' until animation is done, after that 'auto' + + setTimeout(() => { + setScrollingVisibility(container, popup); + }, SHOW_CLASS_TIMEOUT); + + if (isModal()) { + fixScrollContainer(container, params.scrollbarPadding, initialBodyOverflow); + setAriaHidden(); + } + + if (!isToast() && !globalState.previousActiveElement) { + globalState.previousActiveElement = document.activeElement; + } + + if (typeof params.didOpen === 'function') { + setTimeout(() => params.didOpen(popup)); + } + + removeClass(container, swalClasses['no-transition']); + }; + + const swalOpenAnimationFinished = event => { + const popup = getPopup(); + + if (event.target !== popup) { + return; + } + + const container = getContainer(); + popup.removeEventListener(animationEndEvent, swalOpenAnimationFinished); + container.style.overflowY = 'auto'; + }; + + const setScrollingVisibility = (container, popup) => { + if (animationEndEvent && hasCssAnimation(popup)) { + container.style.overflowY = 'hidden'; + popup.addEventListener(animationEndEvent, swalOpenAnimationFinished); + } else { + container.style.overflowY = 'auto'; + } + }; + + const fixScrollContainer = (container, scrollbarPadding, initialBodyOverflow) => { + iOSfix(); + + if (scrollbarPadding && initialBodyOverflow !== 'hidden') { + fixScrollbar(); + } // sweetalert2/issues/1247 + + + setTimeout(() => { + container.scrollTop = 0; + }); + }; + + const addClasses$1 = (container, popup, params) => { + addClass(container, params.showClass.backdrop); // the workaround with setting/unsetting opacity is needed for #2019 and 2059 + + popup.style.setProperty('opacity', '0', 'important'); + show(popup, 'grid'); + setTimeout(() => { + // Animate popup right after showing it + addClass(popup, params.showClass.popup); // and remove the opacity workaround + + popup.style.removeProperty('opacity'); + }, SHOW_CLASS_TIMEOUT); // 10ms in order to fix #2062 + + addClass([document.documentElement, document.body], swalClasses.shown); + + if (params.heightAuto && params.backdrop && !params.toast) { + addClass([document.documentElement, document.body], swalClasses['height-auto']); + } + }; + + const handleInputOptionsAndValue = (instance, params) => { + if (params.input === 'select' || params.input === 'radio') { + handleInputOptions(instance, params); + } else if (['text', 'email', 'number', 'tel', 'textarea'].includes(params.input) && (hasToPromiseFn(params.inputValue) || isPromise(params.inputValue))) { + showLoading(getConfirmButton()); + handleInputValue(instance, params); + } + }; + const getInputValue = (instance, innerParams) => { + const input = instance.getInput(); + + if (!input) { + return null; + } + + switch (innerParams.input) { + case 'checkbox': + return getCheckboxValue(input); + + case 'radio': + return getRadioValue(input); + + case 'file': + return getFileValue(input); + + default: + return innerParams.inputAutoTrim ? input.value.trim() : input.value; + } + }; + + const getCheckboxValue = input => input.checked ? 1 : 0; + + const getRadioValue = input => input.checked ? input.value : null; + + const getFileValue = input => input.files.length ? input.getAttribute('multiple') !== null ? input.files : input.files[0] : null; + + const handleInputOptions = (instance, params) => { + const popup = getPopup(); + + const processInputOptions = inputOptions => populateInputOptions[params.input](popup, formatInputOptions(inputOptions), params); + + if (hasToPromiseFn(params.inputOptions) || isPromise(params.inputOptions)) { + showLoading(getConfirmButton()); + asPromise(params.inputOptions).then(inputOptions => { + instance.hideLoading(); + processInputOptions(inputOptions); + }); + } else if (typeof params.inputOptions === 'object') { + processInputOptions(params.inputOptions); + } else { + error("Unexpected type of inputOptions! Expected object, Map or Promise, got ".concat(typeof params.inputOptions)); + } + }; + + const handleInputValue = (instance, params) => { + const input = instance.getInput(); + hide(input); + asPromise(params.inputValue).then(inputValue => { + input.value = params.input === 'number' ? parseFloat(inputValue) || 0 : "".concat(inputValue); + show(input); + input.focus(); + instance.hideLoading(); + }).catch(err => { + error("Error in inputValue promise: ".concat(err)); + input.value = ''; + show(input); + input.focus(); + instance.hideLoading(); + }); + }; + + const populateInputOptions = { + select: (popup, inputOptions, params) => { + const select = getChildByClass(popup, swalClasses.select); + + const renderOption = (parent, optionLabel, optionValue) => { + const option = document.createElement('option'); + option.value = optionValue; + setInnerHtml(option, optionLabel); + option.selected = isSelected(optionValue, params.inputValue); + parent.appendChild(option); + }; + + inputOptions.forEach(inputOption => { + const optionValue = inputOption[0]; + const optionLabel = inputOption[1]; // spec: + // https://www.w3.org/TR/html401/interact/forms.html#h-17.6 + // "...all OPTGROUP elements must be specified directly within a SELECT element (i.e., groups may not be nested)..." + // check whether this is a + + if (Array.isArray(optionLabel)) { + // if it is an array, then it is an + const optgroup = document.createElement('optgroup'); + optgroup.label = optionValue; + optgroup.disabled = false; // not configurable for now + + select.appendChild(optgroup); + optionLabel.forEach(o => renderOption(optgroup, o[1], o[0])); + } else { + // case of + valueFormatted = formatInputOptions(valueFormatted); + } + + result.push([key, valueFormatted]); + }); + } else { + Object.keys(inputOptions).forEach(key => { + let valueFormatted = inputOptions[key]; + + if (typeof valueFormatted === 'object') { + // case of + valueFormatted = formatInputOptions(valueFormatted); + } + + result.push([key, valueFormatted]); + }); + } + + return result; + }; + + const isSelected = (optionValue, inputValue) => { + return inputValue && inputValue.toString() === optionValue.toString(); + }; + + const handleConfirmButtonClick = instance => { + const innerParams = privateProps.innerParams.get(instance); + instance.disableButtons(); + + if (innerParams.input) { + handleConfirmOrDenyWithInput(instance, 'confirm'); + } else { + confirm(instance, true); + } + }; + const handleDenyButtonClick = instance => { + const innerParams = privateProps.innerParams.get(instance); + instance.disableButtons(); + + if (innerParams.returnInputValueOnDeny) { + handleConfirmOrDenyWithInput(instance, 'deny'); + } else { + deny(instance, false); + } + }; + const handleCancelButtonClick = (instance, dismissWith) => { + instance.disableButtons(); + dismissWith(DismissReason.cancel); + }; + + const handleConfirmOrDenyWithInput = (instance, type + /* 'confirm' | 'deny' */ + ) => { + const innerParams = privateProps.innerParams.get(instance); + const inputValue = getInputValue(instance, innerParams); + + if (innerParams.inputValidator) { + handleInputValidator(instance, inputValue, type); + } else if (!instance.getInput().checkValidity()) { + instance.enableButtons(); + instance.showValidationMessage(innerParams.validationMessage); + } else if (type === 'deny') { + deny(instance, inputValue); + } else { + confirm(instance, inputValue); + } + }; + + const handleInputValidator = (instance, inputValue, type + /* 'confirm' | 'deny' */ + ) => { + const innerParams = privateProps.innerParams.get(instance); + instance.disableInput(); + const validationPromise = Promise.resolve().then(() => asPromise(innerParams.inputValidator(inputValue, innerParams.validationMessage))); + validationPromise.then(validationMessage => { + instance.enableButtons(); + instance.enableInput(); + + if (validationMessage) { + instance.showValidationMessage(validationMessage); + } else if (type === 'deny') { + deny(instance, inputValue); + } else { + confirm(instance, inputValue); + } + }); + }; + + const deny = (instance, value) => { + const innerParams = privateProps.innerParams.get(instance || undefined); + + if (innerParams.showLoaderOnDeny) { + showLoading(getDenyButton()); + } + + if (innerParams.preDeny) { + const preDenyPromise = Promise.resolve().then(() => asPromise(innerParams.preDeny(value, innerParams.validationMessage))); + preDenyPromise.then(preDenyValue => { + if (preDenyValue === false) { + instance.hideLoading(); + } else { + instance.closePopup({ + isDenied: true, + value: typeof preDenyValue === 'undefined' ? value : preDenyValue + }); + } + }); + } else { + instance.closePopup({ + isDenied: true, + value + }); + } + }; + + const succeedWith = (instance, value) => { + instance.closePopup({ + isConfirmed: true, + value + }); + }; + + const confirm = (instance, value) => { + const innerParams = privateProps.innerParams.get(instance || undefined); + + if (innerParams.showLoaderOnConfirm) { + showLoading(); // TODO: make showLoading an *instance* method + } + + if (innerParams.preConfirm) { + instance.resetValidationMessage(); + const preConfirmPromise = Promise.resolve().then(() => asPromise(innerParams.preConfirm(value, innerParams.validationMessage))); + preConfirmPromise.then(preConfirmValue => { + if (isVisible(getValidationMessage()) || preConfirmValue === false) { + instance.hideLoading(); + } else { + succeedWith(instance, typeof preConfirmValue === 'undefined' ? value : preConfirmValue); + } + }); + } else { + succeedWith(instance, value); + } + }; + + const addKeydownHandler = (instance, globalState, innerParams, dismissWith) => { + if (globalState.keydownTarget && globalState.keydownHandlerAdded) { + globalState.keydownTarget.removeEventListener('keydown', globalState.keydownHandler, { + capture: globalState.keydownListenerCapture + }); + globalState.keydownHandlerAdded = false; + } + + if (!innerParams.toast) { + globalState.keydownHandler = e => keydownHandler(instance, e, dismissWith); + + globalState.keydownTarget = innerParams.keydownListenerCapture ? window : getPopup(); + globalState.keydownListenerCapture = innerParams.keydownListenerCapture; + globalState.keydownTarget.addEventListener('keydown', globalState.keydownHandler, { + capture: globalState.keydownListenerCapture + }); + globalState.keydownHandlerAdded = true; + } + }; // Focus handling + + const setFocus = (innerParams, index, increment) => { + const focusableElements = getFocusableElements(); // search for visible elements and select the next possible match + + if (focusableElements.length) { + index = index + increment; // rollover to first item + + if (index === focusableElements.length) { + index = 0; // go to last item + } else if (index === -1) { + index = focusableElements.length - 1; + } + + return focusableElements[index].focus(); + } // no visible focusable elements, focus the popup + + + getPopup().focus(); + }; + const arrowKeysNextButton = ['ArrowRight', 'ArrowDown']; + const arrowKeysPreviousButton = ['ArrowLeft', 'ArrowUp']; + + const keydownHandler = (instance, e, dismissWith) => { + const innerParams = privateProps.innerParams.get(instance); + + if (!innerParams) { + return; // This instance has already been destroyed + } + + if (innerParams.stopKeydownPropagation) { + e.stopPropagation(); + } // ENTER + + + if (e.key === 'Enter') { + handleEnter(instance, e, innerParams); // TAB + } else if (e.key === 'Tab') { + handleTab(e, innerParams); // ARROWS - switch focus between buttons + } else if ([...arrowKeysNextButton, ...arrowKeysPreviousButton].includes(e.key)) { + handleArrows(e.key); // ESC + } else if (e.key === 'Escape') { + handleEsc(e, innerParams, dismissWith); + } + }; + + const handleEnter = (instance, e, innerParams) => { + // #720 #721 + if (e.isComposing) { + return; + } + + if (e.target && instance.getInput() && e.target.outerHTML === instance.getInput().outerHTML) { + if (['textarea', 'file'].includes(innerParams.input)) { + return; // do not submit + } + + clickConfirm(); + e.preventDefault(); + } + }; + + const handleTab = (e, innerParams) => { + const targetElement = e.target; + const focusableElements = getFocusableElements(); + let btnIndex = -1; + + for (let i = 0; i < focusableElements.length; i++) { + if (targetElement === focusableElements[i]) { + btnIndex = i; + break; + } + } + + if (!e.shiftKey) { + // Cycle to the next button + setFocus(innerParams, btnIndex, 1); + } else { + // Cycle to the prev button + setFocus(innerParams, btnIndex, -1); + } + + e.stopPropagation(); + e.preventDefault(); + }; + + const handleArrows = key => { + const confirmButton = getConfirmButton(); + const denyButton = getDenyButton(); + const cancelButton = getCancelButton(); + + if (![confirmButton, denyButton, cancelButton].includes(document.activeElement)) { + return; + } + + const sibling = arrowKeysNextButton.includes(key) ? 'nextElementSibling' : 'previousElementSibling'; + const buttonToFocus = document.activeElement[sibling]; + + if (buttonToFocus) { + buttonToFocus.focus(); + } + }; + + const handleEsc = (e, innerParams, dismissWith) => { + if (callIfFunction(innerParams.allowEscapeKey)) { + e.preventDefault(); + dismissWith(DismissReason.esc); + } + }; + + const handlePopupClick = (instance, domCache, dismissWith) => { + const innerParams = privateProps.innerParams.get(instance); + + if (innerParams.toast) { + handleToastClick(instance, domCache, dismissWith); + } else { + // Ignore click events that had mousedown on the popup but mouseup on the container + // This can happen when the user drags a slider + handleModalMousedown(domCache); // Ignore click events that had mousedown on the container but mouseup on the popup + + handleContainerMousedown(domCache); + handleModalClick(instance, domCache, dismissWith); + } + }; + + const handleToastClick = (instance, domCache, dismissWith) => { + // Closing toast by internal click + domCache.popup.onclick = () => { + const innerParams = privateProps.innerParams.get(instance); + + if (innerParams.showConfirmButton || innerParams.showDenyButton || innerParams.showCancelButton || innerParams.showCloseButton || innerParams.timer || innerParams.input) { + return; + } + + dismissWith(DismissReason.close); + }; + }; + + let ignoreOutsideClick = false; + + const handleModalMousedown = domCache => { + domCache.popup.onmousedown = () => { + domCache.container.onmouseup = function (e) { + domCache.container.onmouseup = undefined; // We only check if the mouseup target is the container because usually it doesn't + // have any other direct children aside of the popup + + if (e.target === domCache.container) { + ignoreOutsideClick = true; + } + }; + }; + }; + + const handleContainerMousedown = domCache => { + domCache.container.onmousedown = () => { + domCache.popup.onmouseup = function (e) { + domCache.popup.onmouseup = undefined; // We also need to check if the mouseup target is a child of the popup + + if (e.target === domCache.popup || domCache.popup.contains(e.target)) { + ignoreOutsideClick = true; + } + }; + }; + }; + + const handleModalClick = (instance, domCache, dismissWith) => { + domCache.container.onclick = e => { + const innerParams = privateProps.innerParams.get(instance); + + if (ignoreOutsideClick) { + ignoreOutsideClick = false; + return; + } + + if (e.target === domCache.container && callIfFunction(innerParams.allowOutsideClick)) { + dismissWith(DismissReason.backdrop); + } + }; + }; + + function _main(userParams, mixinParams = {}) { + showWarningsForParams(Object.assign({}, mixinParams, userParams)); + + if (globalState.currentInstance) { + globalState.currentInstance._destroy(); + + if (isModal()) { + unsetAriaHidden(); + } + } + + globalState.currentInstance = this; + const innerParams = prepareParams(userParams, mixinParams); + setParameters(innerParams); + Object.freeze(innerParams); // clear the previous timer + + if (globalState.timeout) { + globalState.timeout.stop(); + delete globalState.timeout; + } // clear the restore focus timeout + + + clearTimeout(globalState.restoreFocusTimeout); + const domCache = populateDomCache(this); + render(this, innerParams); + privateProps.innerParams.set(this, innerParams); + return swalPromise(this, domCache, innerParams); + } + + const prepareParams = (userParams, mixinParams) => { + const templateParams = getTemplateParams(userParams); + const params = Object.assign({}, defaultParams, mixinParams, templateParams, userParams); // precedence is described in #2131 + + params.showClass = Object.assign({}, defaultParams.showClass, params.showClass); + params.hideClass = Object.assign({}, defaultParams.hideClass, params.hideClass); + return params; + }; + + const swalPromise = (instance, domCache, innerParams) => { + return new Promise(resolve => { + // functions to handle all closings/dismissals + const dismissWith = dismiss => { + instance.closePopup({ + isDismissed: true, + dismiss + }); + }; + + privateMethods.swalPromiseResolve.set(instance, resolve); + + domCache.confirmButton.onclick = () => handleConfirmButtonClick(instance); + + domCache.denyButton.onclick = () => handleDenyButtonClick(instance); + + domCache.cancelButton.onclick = () => handleCancelButtonClick(instance, dismissWith); + + domCache.closeButton.onclick = () => dismissWith(DismissReason.close); + + handlePopupClick(instance, domCache, dismissWith); + addKeydownHandler(instance, globalState, innerParams, dismissWith); + handleInputOptionsAndValue(instance, innerParams); + openPopup(innerParams); + setupTimer(globalState, innerParams, dismissWith); + initFocus(domCache, innerParams); // Scroll container to top on open (#1247, #1946) + + setTimeout(() => { + domCache.container.scrollTop = 0; + }); + }); + }; + + const populateDomCache = instance => { + const domCache = { + popup: getPopup(), + container: getContainer(), + actions: getActions(), + confirmButton: getConfirmButton(), + denyButton: getDenyButton(), + cancelButton: getCancelButton(), + loader: getLoader(), + closeButton: getCloseButton(), + validationMessage: getValidationMessage(), + progressSteps: getProgressSteps() + }; + privateProps.domCache.set(instance, domCache); + return domCache; + }; + + const setupTimer = (globalState$$1, innerParams, dismissWith) => { + const timerProgressBar = getTimerProgressBar(); + hide(timerProgressBar); + + if (innerParams.timer) { + globalState$$1.timeout = new Timer(() => { + dismissWith('timer'); + delete globalState$$1.timeout; + }, innerParams.timer); + + if (innerParams.timerProgressBar) { + show(timerProgressBar); + setTimeout(() => { + if (globalState$$1.timeout && globalState$$1.timeout.running) { + // timer can be already stopped or unset at this point + animateTimerProgressBar(innerParams.timer); + } + }); + } + } + }; + + const initFocus = (domCache, innerParams) => { + if (innerParams.toast) { + return; + } + + if (!callIfFunction(innerParams.allowEnterKey)) { + return blurActiveElement(); + } + + if (!focusButton(domCache, innerParams)) { + setFocus(innerParams, -1, 1); + } + }; + + const focusButton = (domCache, innerParams) => { + if (innerParams.focusDeny && isVisible(domCache.denyButton)) { + domCache.denyButton.focus(); + return true; + } + + if (innerParams.focusCancel && isVisible(domCache.cancelButton)) { + domCache.cancelButton.focus(); + return true; + } + + if (innerParams.focusConfirm && isVisible(domCache.confirmButton)) { + domCache.confirmButton.focus(); + return true; + } + + return false; + }; + + const blurActiveElement = () => { + if (document.activeElement && typeof document.activeElement.blur === 'function') { + document.activeElement.blur(); + } + }; + + /** + * Updates popup parameters. + */ + + function update(params) { + const popup = getPopup(); + const innerParams = privateProps.innerParams.get(this); + + if (!popup || hasClass(popup, innerParams.hideClass.popup)) { + return warn("You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup."); + } + + const validUpdatableParams = {}; // assign valid params from `params` to `defaults` + + Object.keys(params).forEach(param => { + if (Swal.isUpdatableParameter(param)) { + validUpdatableParams[param] = params[param]; + } else { + warn("Invalid parameter to update: \"".concat(param, "\". Updatable params are listed here: https://github.com/sweetalert2/sweetalert2/blob/master/src/utils/params.js\n\nIf you think this parameter should be updatable, request it here: https://github.com/sweetalert2/sweetalert2/issues/new?template=02_feature_request.md")); + } + }); + const updatedParams = Object.assign({}, innerParams, validUpdatableParams); + render(this, updatedParams); + privateProps.innerParams.set(this, updatedParams); + Object.defineProperties(this, { + params: { + value: Object.assign({}, this.params, params), + writable: false, + enumerable: true + } + }); + } + + function _destroy() { + const domCache = privateProps.domCache.get(this); + const innerParams = privateProps.innerParams.get(this); + + if (!innerParams) { + return; // This instance has already been destroyed + } // Check if there is another Swal closing + + + if (domCache.popup && globalState.swalCloseEventFinishedCallback) { + globalState.swalCloseEventFinishedCallback(); + delete globalState.swalCloseEventFinishedCallback; + } // Check if there is a swal disposal defer timer + + + if (globalState.deferDisposalTimer) { + clearTimeout(globalState.deferDisposalTimer); + delete globalState.deferDisposalTimer; + } + + if (typeof innerParams.didDestroy === 'function') { + innerParams.didDestroy(); + } + + disposeSwal(this); + } + + const disposeSwal = instance => { + // Unset this.params so GC will dispose it (#1569) + delete instance.params; // Unset globalState props so GC will dispose globalState (#1569) + + delete globalState.keydownHandler; + delete globalState.keydownTarget; // Unset WeakMaps so GC will be able to dispose them (#1569) + + unsetWeakMaps(privateProps); + unsetWeakMaps(privateMethods); // Unset currentInstance + + delete globalState.currentInstance; + }; + + const unsetWeakMaps = obj => { + for (const i in obj) { + obj[i] = new WeakMap(); + } + }; + + + + var instanceMethods = /*#__PURE__*/Object.freeze({ + hideLoading: hideLoading, + disableLoading: hideLoading, + getInput: getInput$1, + close: close, + closePopup: close, + closeModal: close, + closeToast: close, + enableButtons: enableButtons, + disableButtons: disableButtons, + enableInput: enableInput, + disableInput: disableInput, + showValidationMessage: showValidationMessage, + resetValidationMessage: resetValidationMessage$1, + getProgressSteps: getProgressSteps$1, + _main: _main, + update: update, + _destroy: _destroy + }); + + let currentInstance; + + class SweetAlert { + constructor(...args) { + // Prevent run in Node env + if (typeof window === 'undefined') { + return; + } + + currentInstance = this; + const outerParams = Object.freeze(this.constructor.argsToParams(args)); + Object.defineProperties(this, { + params: { + value: outerParams, + writable: false, + enumerable: true, + configurable: true + } + }); + + const promise = this._main(this.params); + + privateProps.promise.set(this, promise); + } // `catch` cannot be the name of a module export, so we define our thenable methods here instead + + + then(onFulfilled) { + const promise = privateProps.promise.get(this); + return promise.then(onFulfilled); + } + + finally(onFinally) { + const promise = privateProps.promise.get(this); + return promise.finally(onFinally); + } + + } // Assign instance methods from src/instanceMethods/*.js to prototype + + + Object.assign(SweetAlert.prototype, instanceMethods); // Assign static methods from src/staticMethods/*.js to constructor + + Object.assign(SweetAlert, staticMethods); // Proxy to instance methods to constructor, for now, for backwards compatibility + + Object.keys(instanceMethods).forEach(key => { + SweetAlert[key] = function (...args) { + if (currentInstance) { + return currentInstance[key](...args); + } + }; + }); + SweetAlert.DismissReason = DismissReason; + SweetAlert.version = '11.1.5'; + + const Swal = SweetAlert; + Swal.default = Swal; + + return Swal; + +})); +if (typeof this !== 'undefined' && this.Sweetalert2){ this.swal = this.sweetAlert = this.Swal = this.SweetAlert = this.Sweetalert2} + +"undefined"!=typeof document&&function(e,t){var n=e.createElement("style");if(e.getElementsByTagName("head")[0].appendChild(n),n.styleSheet)n.styleSheet.disabled||(n.styleSheet.cssText=t);else try{n.innerHTML=t}catch(e){n.innerText=t}}(document,".swal2-popup.swal2-toast{box-sizing:border-box;grid-column:1/4!important;grid-row:1/4!important;grid-template-columns:1fr 99fr 1fr;padding:1em;overflow-y:hidden;background:#fff;box-shadow:0 0 .625em #d9d9d9;pointer-events:all}.swal2-popup.swal2-toast>*{grid-column:2}.swal2-popup.swal2-toast .swal2-title{margin:1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-loading{justify-content:center}.swal2-popup.swal2-toast .swal2-input{height:2em;margin:.5em;font-size:1em}.swal2-popup.swal2-toast .swal2-validation-message{font-size:1em}.swal2-popup.swal2-toast .swal2-footer{margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-popup.swal2-toast .swal2-close{grid-column:3/3;grid-row:1/99;align-self:center;width:.8em;height:.8em;margin:0;font-size:2em}.swal2-popup.swal2-toast .swal2-html-container{margin:1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-html-container:empty{padding:0}.swal2-popup.swal2-toast .swal2-loader{grid-column:1;grid-row:1/99;align-self:center;width:2em;height:2em;margin:.25em}.swal2-popup.swal2-toast .swal2-icon{grid-column:1;grid-row:1/99;align-self:center;width:2em;min-width:2em;height:2em;margin:0 .5em 0 0}.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:700}.swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-popup.swal2-toast .swal2-actions{justify-content:flex-start;height:auto;margin:0;margin-top:.3125em;padding:0}.swal2-popup.swal2-toast .swal2-styled{margin:.25em .5em;padding:.4em .6em;font-size:1em}.swal2-popup.swal2-toast .swal2-styled:focus{box-shadow:0 0 0 1px #fff,0 0 0 3px rgba(100,150,200,.5)}.swal2-popup.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;transform:rotate(45deg);border-radius:50%}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.8em;left:-.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.25em;left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-popup.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{-webkit-animation:swal2-toast-animate-success-line-tip .75s;animation:swal2-toast-animate-success-line-tip .75s}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{-webkit-animation:swal2-toast-animate-success-line-long .75s;animation:swal2-toast-animate-success-line-long .75s}.swal2-popup.swal2-toast.swal2-show{-webkit-animation:swal2-toast-show .5s;animation:swal2-toast-show .5s}.swal2-popup.swal2-toast.swal2-hide{-webkit-animation:swal2-toast-hide .1s forwards;animation:swal2-toast-hide .1s forwards}.swal2-container{display:grid;position:fixed;z-index:1060;top:0;right:0;bottom:0;left:0;box-sizing:border-box;grid-template-areas:\"top-start top top-end\" \"center-start center center-end\" \"bottom-start bottom-center bottom-end\";grid-template-rows:minmax(-webkit-min-content,auto) minmax(-webkit-min-content,auto) minmax(-webkit-min-content,auto);grid-template-rows:minmax(min-content,auto) minmax(min-content,auto) minmax(min-content,auto);height:100%;padding:.625em;overflow-x:hidden;transition:background-color .1s;-webkit-overflow-scrolling:touch}.swal2-container.swal2-backdrop-show,.swal2-container.swal2-noanimation{background:rgba(0,0,0,.4)}.swal2-container.swal2-backdrop-hide{background:0 0!important}.swal2-container.swal2-bottom-start,.swal2-container.swal2-center-start,.swal2-container.swal2-top-start{grid-template-columns:minmax(0,1fr) auto auto}.swal2-container.swal2-bottom,.swal2-container.swal2-center,.swal2-container.swal2-top{grid-template-columns:auto minmax(0,1fr) auto}.swal2-container.swal2-bottom-end,.swal2-container.swal2-center-end,.swal2-container.swal2-top-end{grid-template-columns:auto auto minmax(0,1fr)}.swal2-container.swal2-top-start>.swal2-popup{align-self:start}.swal2-container.swal2-top>.swal2-popup{grid-column:2;align-self:start;justify-self:center}.swal2-container.swal2-top-end>.swal2-popup,.swal2-container.swal2-top-right>.swal2-popup{grid-column:3;align-self:start;justify-self:end}.swal2-container.swal2-center-left>.swal2-popup,.swal2-container.swal2-center-start>.swal2-popup{grid-row:2;align-self:center}.swal2-container.swal2-center>.swal2-popup{grid-column:2;grid-row:2;align-self:center;justify-self:center}.swal2-container.swal2-center-end>.swal2-popup,.swal2-container.swal2-center-right>.swal2-popup{grid-column:3;grid-row:2;align-self:center;justify-self:end}.swal2-container.swal2-bottom-left>.swal2-popup,.swal2-container.swal2-bottom-start>.swal2-popup{grid-column:1;grid-row:3;align-self:end}.swal2-container.swal2-bottom>.swal2-popup{grid-column:2;grid-row:3;justify-self:center;align-self:end}.swal2-container.swal2-bottom-end>.swal2-popup,.swal2-container.swal2-bottom-right>.swal2-popup{grid-column:3;grid-row:3;align-self:end;justify-self:end}.swal2-container.swal2-grow-fullscreen>.swal2-popup,.swal2-container.swal2-grow-row>.swal2-popup{grid-column:1/4;width:100%}.swal2-container.swal2-grow-column>.swal2-popup,.swal2-container.swal2-grow-fullscreen>.swal2-popup{grid-row:1/4;align-self:stretch}.swal2-container.swal2-no-transition{transition:none!important}.swal2-popup{display:none;position:relative;box-sizing:border-box;grid-template-columns:minmax(0,100%);width:32em;max-width:100%;padding:0 0 1.25em;border:none;border-radius:5px;background:#fff;color:#545454;font-family:inherit;font-size:1rem}.swal2-popup:focus{outline:0}.swal2-popup.swal2-loading{overflow-y:hidden}.swal2-title{position:relative;max-width:100%;margin:0;padding:.8em 1em 0;color:#595959;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;word-wrap:break-word}.swal2-actions{display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:center;width:auto;margin:1.25em auto 0;padding:0}.swal2-actions:not(.swal2-loading) .swal2-styled[disabled]{opacity:.4}.swal2-actions:not(.swal2-loading) .swal2-styled:hover{background-image:linear-gradient(rgba(0,0,0,.1),rgba(0,0,0,.1))}.swal2-actions:not(.swal2-loading) .swal2-styled:active{background-image:linear-gradient(rgba(0,0,0,.2),rgba(0,0,0,.2))}.swal2-loader{display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;-webkit-animation:swal2-rotate-loading 1.5s linear 0s infinite normal;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 transparent #2778c4 transparent}.swal2-styled{margin:.3125em;padding:.625em 1.1em;transition:box-shadow .1s;box-shadow:0 0 0 3px transparent;font-weight:500}.swal2-styled:not([disabled]){cursor:pointer}.swal2-styled.swal2-confirm{border:0;border-radius:.25em;background:initial;background-color:#7367f0;color:#fff;font-size:1em}.swal2-styled.swal2-confirm:focus{box-shadow:0 0 0 3px rgba(115,103,240,.5)}.swal2-styled.swal2-deny{border:0;border-radius:.25em;background:initial;background-color:#ea5455;color:#fff;font-size:1em}.swal2-styled.swal2-deny:focus{box-shadow:0 0 0 3px rgba(234,84,85,.5)}.swal2-styled.swal2-cancel{border:0;border-radius:.25em;background:initial;background-color:#6e7d88;color:#fff;font-size:1em}.swal2-styled.swal2-cancel:focus{box-shadow:0 0 0 3px rgba(110,125,136,.5)}.swal2-styled.swal2-default-outline:focus{box-shadow:0 0 0 3px rgba(100,150,200,.5)}.swal2-styled:focus{outline:0}.swal2-styled::-moz-focus-inner{border:0}.swal2-footer{justify-content:center;margin:1em 0 0;padding:1em 1em 0;border-top:1px solid #eee;color:#545454;font-size:1em}.swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;grid-column:auto!important;height:.25em;overflow:hidden;border-bottom-right-radius:5px;border-bottom-left-radius:5px}.swal2-timer-progress-bar{width:100%;height:.25em;background:rgba(0,0,0,.2)}.swal2-image{max-width:100%;margin:2em auto 1em}.swal2-close{z-index:2;align-items:center;justify-content:center;width:1.2em;height:1.2em;margin-top:0;margin-right:0;margin-bottom:-1.2em;padding:0;overflow:hidden;transition:color .1s,box-shadow .1s;border:none;border-radius:5px;background:0 0;color:#ccc;font-family:serif;font-family:monospace;font-size:2.5em;cursor:pointer;justify-self:end}.swal2-close:hover{transform:none;background:0 0;color:#f27474}.swal2-close:focus{outline:0;box-shadow:inset 0 0 0 3px rgba(100,150,200,.5)}.swal2-close::-moz-focus-inner{border:0}.swal2-html-container{z-index:1;justify-content:center;margin:1em 1.6em .3em;padding:0;overflow:auto;color:#545454;font-size:1.125em;font-weight:400;line-height:normal;text-align:center;word-wrap:break-word;word-break:break-word}.swal2-checkbox,.swal2-file,.swal2-input,.swal2-radio,.swal2-select,.swal2-textarea{margin:1em 2em 0}.swal2-file,.swal2-input,.swal2-textarea{box-sizing:border-box;width:auto;transition:border-color .1s,box-shadow .1s;border:1px solid #d9d9d9;border-radius:.1875em;background:inherit;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px transparent;color:inherit;font-size:1.125em}.swal2-file.swal2-inputerror,.swal2-input.swal2-inputerror,.swal2-textarea.swal2-inputerror{border-color:#f27474!important;box-shadow:0 0 2px #f27474!important}.swal2-file:focus,.swal2-input:focus,.swal2-textarea:focus{border:1px solid #b4dbed;outline:0;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(100,150,200,.5)}.swal2-file::-moz-placeholder,.swal2-input::-moz-placeholder,.swal2-textarea::-moz-placeholder{color:#ccc}.swal2-file:-ms-input-placeholder,.swal2-input:-ms-input-placeholder,.swal2-textarea:-ms-input-placeholder{color:#ccc}.swal2-file::placeholder,.swal2-input::placeholder,.swal2-textarea::placeholder{color:#ccc}.swal2-range{margin:1em 2em 0;background:#fff}.swal2-range input{width:80%}.swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}.swal2-range input,.swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}.swal2-input{height:2.625em;padding:0 .75em}.swal2-file{width:75%;margin-right:auto;margin-left:auto;background:inherit;font-size:1.125em}.swal2-textarea{height:6.75em;padding:.75em}.swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:inherit;color:inherit;font-size:1.125em}.swal2-checkbox,.swal2-radio{align-items:center;justify-content:center;background:#fff;color:inherit}.swal2-checkbox label,.swal2-radio label{margin:0 .6em;font-size:1.125em}.swal2-checkbox input,.swal2-radio input{flex-shrink:0;margin:0 .4em}.swal2-input-label{display:flex;justify-content:center;margin:1em auto 0}.swal2-validation-message{align-items:center;justify-content:center;margin:1em 0 0;padding:.625em;overflow:hidden;background:#f0f0f0;color:#666;font-size:1em;font-weight:300}.swal2-validation-message::before{content:\"!\";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}.swal2-icon{position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:2.5em auto .6em;border:.25em solid transparent;border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}.swal2-icon.swal2-error{border-color:#f27474;color:#f27474}.swal2-icon.swal2-error .swal2-x-mark{position:relative;flex-grow:1}.swal2-icon.swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}.swal2-icon.swal2-error.swal2-icon-show{-webkit-animation:swal2-animate-error-icon .5s;animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-error.swal2-icon-show .swal2-x-mark{-webkit-animation:swal2-animate-error-x-mark .5s;animation:swal2-animate-error-x-mark .5s}.swal2-icon.swal2-warning{border-color:#facea8;color:#f8bb86}.swal2-icon.swal2-info{border-color:#9de0f6;color:#3fc3ee}.swal2-icon.swal2-question{border-color:#c9dae1;color:#87adbd}.swal2-icon.swal2-success{border-color:#a5dc86;color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;transform:rotate(45deg);border-radius:50%}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}.swal2-icon.swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-.25em;left:-.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}.swal2-icon.swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}.swal2-icon.swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}.swal2-icon.swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-tip{-webkit-animation:swal2-animate-success-line-tip .75s;animation:swal2-animate-success-line-tip .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-long{-webkit-animation:swal2-animate-success-line-long .75s;animation:swal2-animate-success-line-long .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-circular-line-right{-webkit-animation:swal2-rotate-success-circular-line 4.25s ease-in;animation:swal2-rotate-success-circular-line 4.25s ease-in}.swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:1.25em auto;padding:0;background:inherit;font-weight:600}.swal2-progress-steps li{display:inline-block;position:relative}.swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:#add8e6;color:#fff}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:#add8e6}.swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}[class^=swal2]{-webkit-tap-highlight-color:transparent}.swal2-show{-webkit-animation:swal2-show .3s;animation:swal2-show .3s}.swal2-hide{-webkit-animation:swal2-hide .15s forwards;animation:swal2-hide .15s forwards}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{margin-right:initial;margin-left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}@-webkit-keyframes swal2-toast-show{0%{transform:translateY(-.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0)}}@keyframes swal2-toast-show{0%{transform:translateY(-.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0)}}@-webkit-keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@-webkit-keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@-webkit-keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@-webkit-keyframes swal2-show{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}100%{transform:scale(1)}}@keyframes swal2-show{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}100%{transform:scale(1)}}@-webkit-keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(.5);opacity:0}}@keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(.5);opacity:0}}@-webkit-keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@-webkit-keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@-webkit-keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@-webkit-keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@-webkit-keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0);opacity:1}}@-webkit-keyframes swal2-rotate-loading{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes swal2-rotate-loading{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto!important}body.swal2-no-backdrop .swal2-container{background-color:transparent!important;pointer-events:none}body.swal2-no-backdrop .swal2-container .swal2-popup{pointer-events:all}body.swal2-no-backdrop .swal2-container .swal2-modal{box-shadow:0 0 10px rgba(0,0,0,.4)}@media print{body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow-y:scroll!important}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .swal2-container{position:static!important}}body.swal2-toast-shown .swal2-container{box-sizing:border-box;width:360px;max-width:100%;background-color:transparent;pointer-events:none}body.swal2-toast-shown .swal2-container.swal2-top{top:0;right:auto;bottom:auto;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{top:0;right:0;bottom:auto;left:auto}body.swal2-toast-shown .swal2-container.swal2-top-left,body.swal2-toast-shown .swal2-container.swal2-top-start{top:0;right:auto;bottom:auto;left:0}body.swal2-toast-shown .swal2-container.swal2-center-left,body.swal2-toast-shown .swal2-container.swal2-center-start{top:50%;right:auto;bottom:auto;left:0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{top:50%;right:auto;bottom:auto;left:50%;transform:translate(-50%,-50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{top:50%;right:0;bottom:auto;left:auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-left,body.swal2-toast-shown .swal2-container.swal2-bottom-start{top:auto;right:auto;bottom:0;left:0}body.swal2-toast-shown .swal2-container.swal2-bottom{top:auto;right:auto;bottom:0;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{top:auto;right:0;bottom:0;left:auto}"); \ No newline at end of file diff --git a/modules/setting-management/app/Volo.Abp.SettingManagement.DemoApp/wwwroot/libs/sweetalert2/sweetalert2.all.min.js b/modules/setting-management/app/Volo.Abp.SettingManagement.DemoApp/wwwroot/libs/sweetalert2/sweetalert2.all.min.js new file mode 100644 index 0000000000..57ff7ff176 --- /dev/null +++ b/modules/setting-management/app/Volo.Abp.SettingManagement.DemoApp/wwwroot/libs/sweetalert2/sweetalert2.all.min.js @@ -0,0 +1,2 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).Sweetalert2=t()}(this,function(){"use strict";const l=Object.freeze({cancel:"cancel",backdrop:"backdrop",close:"close",esc:"esc",timer:"timer"}),t="SweetAlert2:",o=e=>e.charAt(0).toUpperCase()+e.slice(1),a=e=>Array.prototype.slice.call(e),s=e=>{console.warn("".concat(t," ").concat("object"==typeof e?e.join(" "):e))},r=e=>{console.error("".concat(t," ").concat(e))},n=[],i=(e,t)=>{t='"'.concat(e,'" is deprecated and will be removed in the next major release. Please use "').concat(t,'" instead.'),n.includes(t)||(n.push(t),s(t))},c=e=>"function"==typeof e?e():e,u=e=>e&&"function"==typeof e.toPromise,d=e=>u(e)?e.toPromise():Promise.resolve(e),p=e=>e&&Promise.resolve(e)===e,m=e=>e instanceof Element||(e=>"object"==typeof e&&e.jquery)(e);var e=e=>{const t={};for(const n in e)t[e[n]]="swal2-"+e[n];return t};const h=e(["container","shown","height-auto","iosfix","popup","modal","no-backdrop","no-transition","toast","toast-shown","show","hide","close","title","html-container","actions","confirm","deny","cancel","default-outline","footer","icon","icon-content","image","input","file","range","select","radio","checkbox","label","textarea","inputerror","input-label","validation-message","progress-steps","active-progress-step","progress-step","progress-step-line","loader","loading","styled","top","top-start","top-end","top-left","top-right","center","center-start","center-end","center-left","center-right","bottom","bottom-start","bottom-end","bottom-left","bottom-right","grow-row","grow-column","grow-fullscreen","rtl","timer-progress-bar","timer-progress-bar-container","scrollbar-measure","icon-success","icon-warning","icon-info","icon-question","icon-error"]),g=e(["success","warning","info","question","error"]),b=()=>document.body.querySelector(".".concat(h.container)),f=e=>{const t=b();return t?t.querySelector(e):null},y=e=>f(".".concat(e)),v=()=>y(h.popup),w=()=>y(h.icon),C=()=>y(h.title),k=()=>y(h["html-container"]),A=()=>y(h.image),B=()=>y(h["progress-steps"]),x=()=>y(h["validation-message"]),P=()=>f(".".concat(h.actions," .").concat(h.confirm)),E=()=>f(".".concat(h.actions," .").concat(h.deny));const S=()=>f(".".concat(h.loader)),T=()=>f(".".concat(h.actions," .").concat(h.cancel)),L=()=>y(h.actions),O=()=>y(h.footer),j=()=>y(h["timer-progress-bar"]),D=()=>y(h.close),I=()=>{const e=a(v().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')).sort((e,t)=>(e=parseInt(e.getAttribute("tabindex")),(t=parseInt(t.getAttribute("tabindex")))"-1"!==e.getAttribute("tabindex"));return(t=>{const n=[];for(let e=0;eG(e))},M=()=>!H()&&!document.body.classList.contains(h["no-backdrop"]),H=()=>document.body.classList.contains(h["toast-shown"]);const q={previousBodyPadding:null},V=(t,e)=>{if(t.textContent="",e){const n=new DOMParser,o=n.parseFromString(e,"text/html");a(o.querySelector("head").childNodes).forEach(e=>{t.appendChild(e)}),a(o.querySelector("body").childNodes).forEach(e=>{t.appendChild(e)})}},N=(t,e)=>{if(!e)return!1;var n=e.split(/\s+/);for(let e=0;e{var o,i;if(o=e,i=t,a(o.classList).forEach(e=>{Object.values(h).includes(e)||Object.values(g).includes(e)||Object.values(i.showClass).includes(e)||o.classList.remove(e)}),t.customClass&&t.customClass[n]){if("string"!=typeof t.customClass[n]&&!t.customClass[n].forEach)return s("Invalid type of customClass.".concat(n,'! Expected string or iterable object, got "').concat(typeof t.customClass[n],'"'));W(e,t.customClass[n])}},F=(e,t)=>{if(!t)return null;switch(t){case"select":case"textarea":case"file":return K(e,h[t]);case"checkbox":return e.querySelector(".".concat(h.checkbox," input"));case"radio":return e.querySelector(".".concat(h.radio," input:checked"))||e.querySelector(".".concat(h.radio," input:first-child"));case"range":return e.querySelector(".".concat(h.range," input"));default:return K(e,h.input)}},R=e=>{var t;e.focus(),"file"!==e.type&&(t=e.value,e.value="",e.value=t)},z=(e,t,n)=>{e&&t&&(t="string"==typeof t?t.split(/\s+/).filter(Boolean):t).forEach(t=>{e.forEach?e.forEach(e=>{n?e.classList.add(t):e.classList.remove(t)}):n?e.classList.add(t):e.classList.remove(t)})},W=(e,t)=>{z(e,t,!0)},_=(e,t)=>{z(e,t,!1)},K=(t,n)=>{for(let e=0;e{(n=n==="".concat(parseInt(n))?parseInt(n):n)||0===parseInt(n)?e.style[t]="number"==typeof n?"".concat(n,"px"):n:e.style.removeProperty(t)},Z=(e,t="flex")=>{e.style.display=t},J=e=>{e.style.display="none"},X=(e,t,n,o)=>{const i=e.querySelector(t);i&&(i.style[n]=o)},$=(e,t,n)=>{t?Z(e,n):J(e)},G=e=>!(!e||!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)),Q=()=>!G(P())&&!G(E())&&!G(T()),ee=e=>!!(e.scrollHeight>e.clientHeight),te=e=>{const t=window.getComputedStyle(e);var n=parseFloat(t.getPropertyValue("animation-duration")||"0"),e=parseFloat(t.getPropertyValue("transition-duration")||"0");return 0{const n=j();G(n)&&(t&&(n.style.transition="none",n.style.width="100%"),setTimeout(()=>{n.style.transition="width ".concat(e/1e3,"s linear"),n.style.width="0%"},10))},oe=()=>"undefined"==typeof window||"undefined"==typeof document,ie='\n
                                            \n \n
                                              \n
                                              \n \n

                                              \n
                                              \n \n \n
                                              \n \n \n
                                              \n \n
                                              \n \n \n
                                              \n
                                              \n
                                              \n \n \n \n
                                              \n
                                              \n
                                              \n
                                              \n
                                              \n
                                              \n').replace(/(^|\n)\s*/g,""),ae=()=>{ln.isVisible()&&ln.resetValidationMessage()},se=e=>{var t=(()=>{const e=b();return!!e&&(e.remove(),_([document.documentElement,document.body],[h["no-backdrop"],h["toast-shown"],h["has-column"]]),!0)})();if(oe())r("SweetAlert2 requires document to initialize");else{const n=document.createElement("div");n.className=h.container,t&&W(n,h["no-transition"]),V(n,ie);const o="string"==typeof(t=e.target)?document.querySelector(t):t;o.appendChild(n),(e=>{const t=v();t.setAttribute("role",e.toast?"alert":"dialog"),t.setAttribute("aria-live",e.toast?"polite":"assertive"),e.toast||t.setAttribute("aria-modal","true")})(e),e=o,"rtl"===window.getComputedStyle(e).direction&&W(b(),h.rtl),(()=>{const e=v(),t=K(e,h.input),n=K(e,h.file),o=e.querySelector(".".concat(h.range," input")),i=e.querySelector(".".concat(h.range," output")),a=K(e,h.select),s=e.querySelector(".".concat(h.checkbox," input")),r=K(e,h.textarea);t.oninput=ae,n.onchange=ae,a.onchange=ae,s.onchange=ae,r.oninput=ae,o.oninput=()=>{ae(),i.value=o.value},o.onchange=()=>{ae(),o.nextSibling.value=o.value}})()}},re=(e,t)=>{e instanceof HTMLElement?t.appendChild(e):"object"==typeof e?ce(e,t):e&&V(t,e)},ce=(e,t)=>{e.jquery?le(t,e):V(t,e.toString())},le=(t,n)=>{if(t.textContent="",0 in n)for(let e=0;e in n;e++)t.appendChild(n[e].cloneNode(!0));else t.appendChild(n.cloneNode(!0))},ue=(()=>{if(oe())return!1;var e=document.createElement("div"),t={WebkitAnimation:"webkitAnimationEnd",OAnimation:"oAnimationEnd oanimationend",animation:"animationend"};for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&void 0!==e.style[n])return t[n];return!1})(),de=(e,t)=>{const n=L();var o=S(),i=P(),a=E(),s=T();(t.showConfirmButton||t.showDenyButton||t.showCancelButton?Z:J)(n),U(n,t,"actions"),pe(i,"confirm",t),pe(a,"deny",t),pe(s,"cancel",t),function(e,t,n,o){if(!o.buttonsStyling)return _([e,t,n],h.styled);W([e,t,n],h.styled),o.confirmButtonColor&&(e.style.backgroundColor=o.confirmButtonColor,W(e,h["default-outline"]));o.denyButtonColor&&(t.style.backgroundColor=o.denyButtonColor,W(t,h["default-outline"]));o.cancelButtonColor&&(n.style.backgroundColor=o.cancelButtonColor,W(n,h["default-outline"]))}(i,a,s,t),t.reverseButtons&&(n.insertBefore(s,o),n.insertBefore(a,o),n.insertBefore(i,o)),V(o,t.loaderHtml),U(o,t,"loader")};function pe(e,t,n){$(e,n["show".concat(o(t),"Button")],"inline-block"),V(e,n["".concat(t,"ButtonText")]),e.setAttribute("aria-label",n["".concat(t,"ButtonAriaLabel")]),e.className=h[t],U(e,n,"".concat(t,"Button")),W(e,n["".concat(t,"ButtonClass")])}const me=(e,t)=>{var n,o,i=b();i&&(o=i,"string"==typeof(n=t.backdrop)?o.style.background=n:n||W([document.documentElement,document.body],h["no-backdrop"]),o=i,(n=t.position)in h?W(o,h[n]):(s('The "position" parameter is not valid, defaulting to "center"'),W(o,h.center)),n=i,!(o=t.grow)||"string"!=typeof o||(o="grow-".concat(o))in h&&W(n,h[o]),U(i,t,"container"))};var he={promise:new WeakMap,innerParams:new WeakMap,domCache:new WeakMap};const ge=["input","file","range","select","radio","checkbox","textarea"],be=e=>{if(!ke[e.input])return r('Unexpected type of input! Expected "text", "email", "password", "number", "tel", "select", "radio", "checkbox", "textarea", "file" or "url", got "'.concat(e.input,'"'));var t=Ce(e.input);const n=ke[e.input](t,e);Z(n),setTimeout(()=>{R(n)})},fe=(e,t)=>{const n=F(v(),e);if(n){(t=>{for(let e=0;e{var t=Ce(e.input);e.customClass&&W(t,e.customClass.input)},ve=(e,t)=>{e.placeholder&&!t.inputPlaceholder||(e.placeholder=t.inputPlaceholder)},we=(e,t,n)=>{if(n.inputLabel){e.id=h.input;const i=document.createElement("label");var o=h["input-label"];i.setAttribute("for",e.id),i.className=o,W(i,n.customClass.inputLabel),i.innerText=n.inputLabel,t.insertAdjacentElement("beforebegin",i)}},Ce=e=>{e=h[e]||h.input;return K(v(),e)},ke={};ke.text=ke.email=ke.password=ke.number=ke.tel=ke.url=(e,t)=>("string"==typeof t.inputValue||"number"==typeof t.inputValue?e.value=t.inputValue:p(t.inputValue)||s('Unexpected type of inputValue! Expected "string", "number" or "Promise", got "'.concat(typeof t.inputValue,'"')),we(e,e,t),ve(e,t),e.type=t.input,e),ke.file=(e,t)=>(we(e,e,t),ve(e,t),e),ke.range=(e,t)=>{const n=e.querySelector("input"),o=e.querySelector("output");return n.value=t.inputValue,n.type=t.input,o.value=t.inputValue,we(n,e,t),e},ke.select=(e,t)=>{if(e.textContent="",t.inputPlaceholder){const n=document.createElement("option");V(n,t.inputPlaceholder),n.value="",n.disabled=!0,n.selected=!0,e.appendChild(n)}return we(e,e,t),e},ke.radio=e=>(e.textContent="",e),ke.checkbox=(e,t)=>{const n=F(v(),"checkbox");n.value=1,n.id=h.checkbox,n.checked=Boolean(t.inputValue);var o=e.querySelector("span");return V(o,t.inputPlaceholder),e},ke.textarea=(n,e)=>{n.value=e.inputValue,ve(n,e),we(n,n,e);return setTimeout(()=>{if("MutationObserver"in window){const t=parseInt(window.getComputedStyle(v()).width);new MutationObserver(()=>{var e,e=n.offsetWidth+(e=n,parseInt(window.getComputedStyle(e).marginLeft)+parseInt(window.getComputedStyle(e).marginRight));e>t?v().style.width="".concat(e,"px"):v().style.width=null}).observe(n,{attributes:!0,attributeFilter:["style"]})}}),n};const Ae=(e,t)=>{const n=k();U(n,t,"htmlContainer"),t.html?(re(t.html,n),Z(n,"block")):t.text?(n.textContent=t.text,Z(n,"block")):J(n),((e,o)=>{const i=v();e=he.innerParams.get(e);const a=!e||o.input!==e.input;ge.forEach(e=>{var t=h[e];const n=K(i,t);fe(e,o.inputAttributes),n.className=t,a&&J(n)}),o.input&&(a&&be(o),ye(o))})(e,t)},Be=(e,t)=>{for(const n in g)t.icon!==n&&_(e,g[n]);W(e,g[t.icon]),Ee(e,t),xe(),U(e,t,"icon")},xe=()=>{const e=v();var t=window.getComputedStyle(e).getPropertyValue("background-color");const n=e.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix");for(let e=0;e{var n;e.textContent="",t.iconHtml?V(e,Se(t.iconHtml)):"success"===t.icon?V(e,'\n
                                              \n \n
                                              \n
                                              \n '):"error"===t.icon?V(e,'\n \n \n \n \n '):(n={question:"?",warning:"!",info:"i"},V(e,Se(n[t.icon])))},Ee=(e,t)=>{if(t.iconColor){e.style.color=t.iconColor,e.style.borderColor=t.iconColor;for(const n of[".swal2-success-line-tip",".swal2-success-line-long",".swal2-x-mark-line-left",".swal2-x-mark-line-right"])X(e,n,"backgroundColor",t.iconColor);X(e,".swal2-success-ring","borderColor",t.iconColor)}},Se=e=>'
                                              ').concat(e,"
                                              "),Te=(e,o)=>{const i=B();if(!o.progressSteps||0===o.progressSteps.length)return J(i);Z(i),i.textContent="",o.currentProgressStep>=o.progressSteps.length&&s("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),o.progressSteps.forEach((e,t)=>{var n,e=(n=e,e=document.createElement("li"),W(e,h["progress-step"]),V(e,n),e);i.appendChild(e),t===o.currentProgressStep&&W(e,h["active-progress-step"]),t!==o.progressSteps.length-1&&(t=(e=>{const t=document.createElement("li");return W(t,h["progress-step-line"]),e.progressStepsDistance&&(t.style.width=e.progressStepsDistance),t})(o),i.appendChild(t))})},Le=(e,t)=>{e.className="".concat(h.popup," ").concat(G(e)?t.showClass.popup:""),t.toast?(W([document.documentElement,document.body],h["toast-shown"]),W(e,h.toast)):W(e,h.modal),U(e,t,"popup"),"string"==typeof t.customClass&&W(e,t.customClass),t.icon&&W(e,h["icon-".concat(t.icon)])},Oe=(e,t)=>{var n,o,i;(e=>{var t=b();const n=v();e.toast?(Y(t,"width",e.width),n.style.width="100%",n.insertBefore(S(),w())):Y(n,"width",e.width),Y(n,"padding",e.padding),e.background&&(n.style.background=e.background),J(x()),Le(n,e)})(t),me(0,t),Te(0,t),i=e,n=t,o=he.innerParams.get(i),i=w(),o&&n.icon===o.icon?(Pe(i,n),Be(i,n)):n.icon||n.iconHtml?n.icon&&-1===Object.keys(g).indexOf(n.icon)?(r('Unknown icon! Expected "success", "error", "warning", "info" or "question", got "'.concat(n.icon,'"')),J(i)):(Z(i),Pe(i,n),Be(i,n),W(i,n.showClass.icon)):J(i),(e=>{const t=A();if(!e.imageUrl)return J(t);Z(t,""),t.setAttribute("src",e.imageUrl),t.setAttribute("alt",e.imageAlt),Y(t,"width",e.imageWidth),Y(t,"height",e.imageHeight),t.className=h.image,U(t,e,"image")})(t),(e=>{const t=C();$(t,e.title||e.titleText,"block"),e.title&&re(e.title,t),e.titleText&&(t.innerText=e.titleText),U(t,e,"title")})(t),(e=>{const t=D();V(t,e.closeButtonHtml),U(t,e,"closeButton"),$(t,e.showCloseButton),t.setAttribute("aria-label",e.closeButtonAriaLabel)})(t),Ae(e,t),de(0,t),i=t,e=O(),$(e,i.footer),i.footer&&re(i.footer,e),U(e,i,"footer"),"function"==typeof t.didRender&&t.didRender(v())};const je=()=>P()&&P().click();const De=e=>{let t=v();t||ln.fire(),t=v();var n=S();H()?J(w()):Ie(t,e),Z(n),t.setAttribute("data-loading",!0),t.setAttribute("aria-busy",!0),t.focus()},Ie=(e,t)=>{var n=L();const o=S();!t&&G(P())&&(t=P()),Z(n),t&&(J(t),o.setAttribute("data-button-to-replace",t.className)),o.parentNode.insertBefore(o,t),W([e,n],h.loading)},Me={},He=o=>new Promise(e=>{if(!o)return e();var t=window.scrollX,n=window.scrollY;Me.restoreFocusTimeout=setTimeout(()=>{Me.previousActiveElement&&Me.previousActiveElement.focus?(Me.previousActiveElement.focus(),Me.previousActiveElement=null):document.body&&document.body.focus(),e()},100),window.scrollTo(t,n)});const qe=()=>{if(Me.timeout)return(()=>{const e=j();var t=parseInt(window.getComputedStyle(e).width);e.style.removeProperty("transition"),e.style.width="100%";var n=parseInt(window.getComputedStyle(e).width),n=parseInt(t/n*100);e.style.removeProperty("transition"),e.style.width="".concat(n,"%")})(),Me.timeout.stop()},Ve=()=>{if(Me.timeout){var e=Me.timeout.start();return ne(e),e}};let Ne=!1;const Ue={};const Fe=t=>{for(let e=t.target;e&&e!==document;e=e.parentNode)for(const o in Ue){var n=e.getAttribute(o);if(n)return void Ue[o].fire({template:n})}},Re={title:"",titleText:"",text:"",html:"",footer:"",icon:void 0,iconColor:void 0,iconHtml:void 0,template:void 0,toast:!1,showClass:{popup:"swal2-show",backdrop:"swal2-backdrop-show",icon:"swal2-icon-show"},hideClass:{popup:"swal2-hide",backdrop:"swal2-backdrop-hide",icon:"swal2-icon-hide"},customClass:{},target:"body",backdrop:!0,heightAuto:!0,allowOutsideClick:!0,allowEscapeKey:!0,allowEnterKey:!0,stopKeydownPropagation:!0,keydownListenerCapture:!1,showConfirmButton:!0,showDenyButton:!1,showCancelButton:!1,preConfirm:void 0,preDeny:void 0,confirmButtonText:"OK",confirmButtonAriaLabel:"",confirmButtonColor:void 0,denyButtonText:"No",denyButtonAriaLabel:"",denyButtonColor:void 0,cancelButtonText:"Cancel",cancelButtonAriaLabel:"",cancelButtonColor:void 0,buttonsStyling:!0,reverseButtons:!1,focusConfirm:!0,focusDeny:!1,focusCancel:!1,returnFocus:!0,showCloseButton:!1,closeButtonHtml:"×",closeButtonAriaLabel:"Close this dialog",loaderHtml:"",showLoaderOnConfirm:!1,showLoaderOnDeny:!1,imageUrl:void 0,imageWidth:void 0,imageHeight:void 0,imageAlt:"",timer:void 0,timerProgressBar:!1,width:void 0,padding:void 0,background:void 0,input:void 0,inputPlaceholder:"",inputLabel:"",inputValue:"",inputOptions:{},inputAutoTrim:!0,inputAttributes:{},inputValidator:void 0,returnInputValueOnDeny:!1,validationMessage:void 0,grow:!1,position:"center",progressSteps:[],currentProgressStep:void 0,progressStepsDistance:void 0,willOpen:void 0,didOpen:void 0,didRender:void 0,willClose:void 0,didClose:void 0,didDestroy:void 0,scrollbarPadding:!0},ze=["allowEscapeKey","allowOutsideClick","background","buttonsStyling","cancelButtonAriaLabel","cancelButtonColor","cancelButtonText","closeButtonAriaLabel","closeButtonHtml","confirmButtonAriaLabel","confirmButtonColor","confirmButtonText","currentProgressStep","customClass","denyButtonAriaLabel","denyButtonColor","denyButtonText","didClose","didDestroy","footer","hideClass","html","icon","iconColor","iconHtml","imageAlt","imageHeight","imageUrl","imageWidth","preConfirm","preDeny","progressSteps","returnFocus","reverseButtons","showCancelButton","showCloseButton","showConfirmButton","showDenyButton","text","title","titleText","willClose"],We={},_e=["allowOutsideClick","allowEnterKey","backdrop","focusConfirm","focusDeny","focusCancel","returnFocus","heightAuto","keydownListenerCapture"],Ke=e=>Object.prototype.hasOwnProperty.call(Re,e);const Ye=e=>We[e],Ze=e=>{!e.backdrop&&e.allowOutsideClick&&s('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`');for(const o in e)n=o,Ke(n)||s('Unknown parameter "'.concat(n,'"')),e.toast&&(t=o,_e.includes(t)&&s('The parameter "'.concat(t,'" is incompatible with toasts'))),t=o,Ye(t)&&i(t,Ye(t));var t,n};var Je=Object.freeze({isValidParameter:Ke,isUpdatableParameter:e=>-1!==ze.indexOf(e),isDeprecatedParameter:Ye,argsToParams:n=>{const o={};return"object"!=typeof n[0]||m(n[0])?["title","html","icon"].forEach((e,t)=>{t=n[t];"string"==typeof t||m(t)?o[e]=t:void 0!==t&&r("Unexpected type of ".concat(e,'! Expected "string" or "Element", got ').concat(typeof t))}):Object.assign(o,n[0]),o},isVisible:()=>G(v()),clickConfirm:je,clickDeny:()=>E()&&E().click(),clickCancel:()=>T()&&T().click(),getContainer:b,getPopup:v,getTitle:C,getHtmlContainer:k,getImage:A,getIcon:w,getInputLabel:()=>y(h["input-label"]),getCloseButton:D,getActions:L,getConfirmButton:P,getDenyButton:E,getCancelButton:T,getLoader:S,getFooter:O,getTimerProgressBar:j,getFocusableElements:I,getValidationMessage:x,isLoading:()=>v().hasAttribute("data-loading"),fire:function(...e){return new this(...e)},mixin:function(n){class e extends this{_main(e,t){return super._main(e,Object.assign({},n,t))}}return e},showLoading:De,enableLoading:De,getTimerLeft:()=>Me.timeout&&Me.timeout.getTimerLeft(),stopTimer:qe,resumeTimer:Ve,toggleTimer:()=>{var e=Me.timeout;return e&&(e.running?qe:Ve)()},increaseTimer:e=>{if(Me.timeout){e=Me.timeout.increase(e);return ne(e,!0),e}},isTimerRunning:()=>Me.timeout&&Me.timeout.isRunning(),bindClickHandler:function(e="data-swal-template"){Ue[e]=this,Ne||(document.body.addEventListener("click",Fe),Ne=!0)}});function Xe(){var e=he.innerParams.get(this);if(e){const t=he.domCache.get(this);J(t.loader),H()?e.icon&&Z(w()):(e=>{const t=e.popup.getElementsByClassName(e.loader.getAttribute("data-button-to-replace"));if(t.length)Z(t[0],"inline-block");else if(Q())J(e.actions)})(t),_([t.popup,t.actions],h.loading),t.popup.removeAttribute("aria-busy"),t.popup.removeAttribute("data-loading"),t.confirmButton.disabled=!1,t.denyButton.disabled=!1,t.cancelButton.disabled=!1}}const $e=()=>{null===q.previousBodyPadding&&document.body.scrollHeight>window.innerHeight&&(q.previousBodyPadding=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight="".concat(q.previousBodyPadding+(()=>{const e=document.createElement("div");e.className=h["scrollbar-measure"],document.body.appendChild(e);var t=e.getBoundingClientRect().width-e.clientWidth;return document.body.removeChild(e),t})(),"px"))},Ge=()=>{navigator.userAgent.match(/(CriOS|FxiOS|EdgiOS|YaBrowser|UCBrowser)/i)||v().scrollHeight>window.innerHeight-44&&(b().style.paddingBottom="".concat(44,"px"))},Qe=()=>{const e=b();let t;e.ontouchstart=e=>{t=et(e)},e.ontouchmove=e=>{t&&(e.preventDefault(),e.stopPropagation())}},et=e=>{var t=e.target,n=b();return!tt(e)&&!nt(e)&&(t===n||!(ee(n)||"INPUT"===t.tagName||"TEXTAREA"===t.tagName||ee(k())&&k().contains(t)))},tt=e=>e.touches&&e.touches.length&&"stylus"===e.touches[0].touchType,nt=e=>e.touches&&1{const e=a(document.body.children);e.forEach(e=>{e.hasAttribute("data-previous-aria-hidden")?(e.setAttribute("aria-hidden",e.getAttribute("data-previous-aria-hidden")),e.removeAttribute("data-previous-aria-hidden")):e.removeAttribute("aria-hidden")})};var it={swalPromiseResolve:new WeakMap};function at(e,t,n,o){H()?ct(e,o):(He(n).then(()=>ct(e,o)),Me.keydownTarget.removeEventListener("keydown",Me.keydownHandler,{capture:Me.keydownListenerCapture}),Me.keydownHandlerAdded=!1),/^((?!chrome|android).)*safari/i.test(navigator.userAgent)?(t.setAttribute("style","display:none !important"),t.removeAttribute("class"),t.innerHTML=""):t.remove(),M()&&(null!==q.previousBodyPadding&&(document.body.style.paddingRight="".concat(q.previousBodyPadding,"px"),q.previousBodyPadding=null),N(document.body,h.iosfix)&&(t=parseInt(document.body.style.top,10),_(document.body,h.iosfix),document.body.style.top="",document.body.scrollTop=-1*t),ot()),_([document.documentElement,document.body],[h.shown,h["height-auto"],h["no-backdrop"],h["toast-shown"]])}function st(e){var t=v();if(t){e=void 0!==(o=e)?Object.assign({isConfirmed:!1,isDenied:!1,isDismissed:!1},o):{isConfirmed:!1,isDenied:!1,isDismissed:!0};var n=he.innerParams.get(this);if(n&&!N(t,n.hideClass.popup)){const i=it.swalPromiseResolve.get(this);_(t,n.showClass.popup),W(t,n.hideClass.popup);var o=b();_(o,n.showClass.backdrop),W(o,n.hideClass.backdrop),((e,t,n)=>{const o=b(),i=ue&&te(t);if(typeof n.willClose==="function")n.willClose(t);if(i)rt(e,t,o,n.returnFocus,n.didClose);else at(e,o,n.returnFocus,n.didClose)})(this,t,n),i(e)}}}const rt=(e,t,n,o,i)=>{Me.swalCloseEventFinishedCallback=at.bind(null,e,n,o,i),t.addEventListener(ue,function(e){e.target===t&&(Me.swalCloseEventFinishedCallback(),delete Me.swalCloseEventFinishedCallback)})},ct=(e,t)=>{setTimeout(()=>{"function"==typeof t&&t.bind(e.params)(),e._destroy()})};function lt(e,t,n){const o=he.domCache.get(e);t.forEach(e=>{o[e].disabled=n})}function ut(e,t){if(!e)return!1;if("radio"===e.type){const n=e.parentNode.parentNode,o=n.querySelectorAll("input");for(let e=0;e/^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]{2,24}$/.test(e)?Promise.resolve():Promise.resolve(t||"Invalid email address"),url:(e,t)=>/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(e)?Promise.resolve():Promise.resolve(t||"Invalid URL")};function mt(e){var t,n;(t=e).inputValidator||Object.keys(pt).forEach(e=>{t.input===e&&(t.inputValidator=pt[e])}),e.showLoaderOnConfirm&&!e.preConfirm&&s("showLoaderOnConfirm is set to true, but preConfirm is not defined.\nshowLoaderOnConfirm should be used together with preConfirm, see usage example:\nhttps://sweetalert2.github.io/#ajax-request"),(n=e).target&&("string"!=typeof n.target||document.querySelector(n.target))&&("string"==typeof n.target||n.target.appendChild)||(s('Target parameter is not valid, defaulting to "body"'),n.target="body"),"string"==typeof e.title&&(e.title=e.title.split("\n").join("
                                              ")),se(e)}const ht=["swal-title","swal-html","swal-footer"],gt=e=>{e="string"==typeof e.template?document.querySelector(e.template):e.template;if(!e)return{};e=e.content;return kt(e),Object.assign(bt(e),ft(e),yt(e),vt(e),wt(e),Ct(e,ht))},bt=e=>{const o={};return a(e.querySelectorAll("swal-param")).forEach(e=>{At(e,["name","value"]);var t=e.getAttribute("name");let n=e.getAttribute("value");"boolean"==typeof Re[t]&&"false"===n&&(n=!1),"object"==typeof Re[t]&&(n=JSON.parse(n)),o[t]=n}),o},ft=e=>{const n={};return a(e.querySelectorAll("swal-button")).forEach(e=>{At(e,["type","color","aria-label"]);var t=e.getAttribute("type");n["".concat(t,"ButtonText")]=e.innerHTML,n["show".concat(o(t),"Button")]=!0,e.hasAttribute("color")&&(n["".concat(t,"ButtonColor")]=e.getAttribute("color")),e.hasAttribute("aria-label")&&(n["".concat(t,"ButtonAriaLabel")]=e.getAttribute("aria-label"))}),n},yt=e=>{const t={},n=e.querySelector("swal-image");return n&&(At(n,["src","width","height","alt"]),n.hasAttribute("src")&&(t.imageUrl=n.getAttribute("src")),n.hasAttribute("width")&&(t.imageWidth=n.getAttribute("width")),n.hasAttribute("height")&&(t.imageHeight=n.getAttribute("height")),n.hasAttribute("alt")&&(t.imageAlt=n.getAttribute("alt"))),t},vt=e=>{const t={},n=e.querySelector("swal-icon");return n&&(At(n,["type","color"]),n.hasAttribute("type")&&(t.icon=n.getAttribute("type")),n.hasAttribute("color")&&(t.iconColor=n.getAttribute("color")),t.iconHtml=n.innerHTML),t},wt=e=>{const n={},t=e.querySelector("swal-input");t&&(At(t,["type","label","placeholder","value"]),n.input=t.getAttribute("type")||"text",t.hasAttribute("label")&&(n.inputLabel=t.getAttribute("label")),t.hasAttribute("placeholder")&&(n.inputPlaceholder=t.getAttribute("placeholder")),t.hasAttribute("value")&&(n.inputValue=t.getAttribute("value")));e=e.querySelectorAll("swal-input-option");return e.length&&(n.inputOptions={},a(e).forEach(e=>{At(e,["value"]);var t=e.getAttribute("value"),e=e.innerHTML;n.inputOptions[t]=e})),n},Ct=(e,t)=>{const n={};for(const o in t){const i=t[o],a=e.querySelector(i);a&&(At(a,[]),n[i.replace(/^swal-/,"")]=a.innerHTML.trim())}return n},kt=e=>{const t=ht.concat(["swal-param","swal-button","swal-image","swal-icon","swal-input","swal-input-option"]);a(e.children).forEach(e=>{e=e.tagName.toLowerCase();-1===t.indexOf(e)&&s("Unrecognized element <".concat(e,">"))})},At=(t,n)=>{a(t.attributes).forEach(e=>{-1===n.indexOf(e.name)&&s(['Unrecognized attribute "'.concat(e.name,'" on <').concat(t.tagName.toLowerCase(),">."),"".concat(n.length?"Allowed attributes are: ".concat(n.join(", ")):"To set the value, use HTML within the element.")])})},Bt=e=>{const t=b(),n=v();"function"==typeof e.willOpen&&e.willOpen(n);var o=window.getComputedStyle(document.body).overflowY;St(t,n,e),setTimeout(()=>{Pt(t,n)},10),M()&&(Et(t,e.scrollbarPadding,o),(()=>{const e=a(document.body.children);e.forEach(e=>{e===b()||e.contains(b())||(e.hasAttribute("aria-hidden")&&e.setAttribute("data-previous-aria-hidden",e.getAttribute("aria-hidden")),e.setAttribute("aria-hidden","true"))})})()),H()||Me.previousActiveElement||(Me.previousActiveElement=document.activeElement),"function"==typeof e.didOpen&&setTimeout(()=>e.didOpen(n)),_(t,h["no-transition"])},xt=e=>{const t=v();if(e.target===t){const n=b();t.removeEventListener(ue,xt),n.style.overflowY="auto"}},Pt=(e,t)=>{ue&&te(t)?(e.style.overflowY="hidden",t.addEventListener(ue,xt)):e.style.overflowY="auto"},Et=(e,t,n)=>{var o;(/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream||"MacIntel"===navigator.platform&&1{e.scrollTop=0})},St=(e,t,n)=>{W(e,n.showClass.backdrop),t.style.setProperty("opacity","0","important"),Z(t,"grid"),setTimeout(()=>{W(t,n.showClass.popup),t.style.removeProperty("opacity")},10),W([document.documentElement,document.body],h.shown),n.heightAuto&&n.backdrop&&!n.toast&&W([document.documentElement,document.body],h["height-auto"])},Tt=e=>e.checked?1:0,Lt=e=>e.checked?e.value:null,Ot=e=>e.files.length?null!==e.getAttribute("multiple")?e.files:e.files[0]:null,jt=(t,n)=>{const o=v(),i=e=>It[n.input](o,Mt(e),n);u(n.inputOptions)||p(n.inputOptions)?(De(P()),d(n.inputOptions).then(e=>{t.hideLoading(),i(e)})):"object"==typeof n.inputOptions?i(n.inputOptions):r("Unexpected type of inputOptions! Expected object, Map or Promise, got ".concat(typeof n.inputOptions))},Dt=(t,n)=>{const o=t.getInput();J(o),d(n.inputValue).then(e=>{o.value="number"===n.input?parseFloat(e)||0:"".concat(e),Z(o),o.focus(),t.hideLoading()}).catch(e=>{r("Error in inputValue promise: ".concat(e)),o.value="",Z(o),o.focus(),t.hideLoading()})},It={select:(e,t,i)=>{const a=K(e,h.select),s=(e,t,n)=>{const o=document.createElement("option");o.value=n,V(o,t),o.selected=Ht(n,i.inputValue),e.appendChild(o)};t.forEach(e=>{var t=e[0];const n=e[1];if(Array.isArray(n)){const o=document.createElement("optgroup");o.label=t,o.disabled=!1,a.appendChild(o),n.forEach(e=>s(o,e[1],e[0]))}else s(a,n,t)}),a.focus()},radio:(e,t,a)=>{const s=K(e,h.radio);t.forEach(e=>{var t=e[0],e=e[1];const n=document.createElement("input"),o=document.createElement("label");n.type="radio",n.name=h.radio,n.value=t,Ht(t,a.inputValue)&&(n.checked=!0);const i=document.createElement("span");V(i,e),i.className=h.label,o.appendChild(n),o.appendChild(i),s.appendChild(o)});const n=s.querySelectorAll("input");n.length&&n[0].focus()}},Mt=n=>{const o=[];return"undefined"!=typeof Map&&n instanceof Map?n.forEach((e,t)=>{let n=e;"object"==typeof n&&(n=Mt(n)),o.push([t,n])}):Object.keys(n).forEach(e=>{let t=n[e];"object"==typeof t&&(t=Mt(t)),o.push([e,t])}),o},Ht=(e,t)=>t&&t.toString()===e.toString(),qt=(e,t)=>{var n=he.innerParams.get(e),o=((e,t)=>{const n=e.getInput();if(!n)return null;switch(t.input){case"checkbox":return Tt(n);case"radio":return Lt(n);case"file":return Ot(n);default:return t.inputAutoTrim?n.value.trim():n.value}})(e,n);n.inputValidator?Vt(e,o,t):e.getInput().checkValidity()?("deny"===t?Nt:Ft)(e,o):(e.enableButtons(),e.showValidationMessage(n.validationMessage))},Vt=(t,n,o)=>{const e=he.innerParams.get(t);t.disableInput();const i=Promise.resolve().then(()=>d(e.inputValidator(n,e.validationMessage)));i.then(e=>{t.enableButtons(),t.enableInput(),e?t.showValidationMessage(e):("deny"===o?Nt:Ft)(t,n)})},Nt=(t,n)=>{const e=he.innerParams.get(t||void 0);if(e.showLoaderOnDeny&&De(E()),e.preDeny){const o=Promise.resolve().then(()=>d(e.preDeny(n,e.validationMessage)));o.then(e=>{!1===e?t.hideLoading():t.closePopup({isDenied:!0,value:void 0===e?n:e})})}else t.closePopup({isDenied:!0,value:n})},Ut=(e,t)=>{e.closePopup({isConfirmed:!0,value:t})},Ft=(t,n)=>{const e=he.innerParams.get(t||void 0);if(e.showLoaderOnConfirm&&De(),e.preConfirm){t.resetValidationMessage();const o=Promise.resolve().then(()=>d(e.preConfirm(n,e.validationMessage)));o.then(e=>{G(x())||!1===e?t.hideLoading():Ut(t,void 0===e?n:e)})}else Ut(t,n)},Rt=(e,t,n)=>{const o=I();if(o.length)return(t+=n)===o.length?t=0:-1===t&&(t=o.length-1),o[t].focus();v().focus()},zt=["ArrowRight","ArrowDown"],Wt=["ArrowLeft","ArrowUp"],_t=(e,t,n)=>{var o=he.innerParams.get(e);o&&(o.stopKeydownPropagation&&t.stopPropagation(),"Enter"===t.key?Kt(e,t,o):"Tab"===t.key?Yt(t,o):[...zt,...Wt].includes(t.key)?Zt(t.key):"Escape"===t.key&&Jt(t,o,n))},Kt=(e,t,n)=>{t.isComposing||t.target&&e.getInput()&&t.target.outerHTML===e.getInput().outerHTML&&(["textarea","file"].includes(n.input)||(je(),t.preventDefault()))},Yt=(e,t)=>{var n=e.target,o=I();let i=-1;for(let e=0;e{const t=P(),n=E(),o=T();if([t,n,o].includes(document.activeElement)){e=zt.includes(e)?"nextElementSibling":"previousElementSibling";const i=document.activeElement[e];i&&i.focus()}},Jt=(e,t,n)=>{c(t.allowEscapeKey)&&(e.preventDefault(),n(l.esc))},Xt=(t,e,n)=>{e.popup.onclick=()=>{var e=he.innerParams.get(t);e.showConfirmButton||e.showDenyButton||e.showCancelButton||e.showCloseButton||e.timer||e.input||n(l.close)}};let $t=!1;const Gt=t=>{t.popup.onmousedown=()=>{t.container.onmouseup=function(e){t.container.onmouseup=void 0,e.target===t.container&&($t=!0)}}},Qt=t=>{t.container.onmousedown=()=>{t.popup.onmouseup=function(e){t.popup.onmouseup=void 0,e.target!==t.popup&&!t.popup.contains(e.target)||($t=!0)}}},en=(n,o,i)=>{o.container.onclick=e=>{var t=he.innerParams.get(n);$t?$t=!1:e.target===o.container&&c(t.allowOutsideClick)&&i(l.backdrop)}};const tn=(e,t,n)=>{var o=j();J(o),t.timer&&(e.timeout=new dt(()=>{n("timer"),delete e.timeout},t.timer),t.timerProgressBar&&(Z(o),setTimeout(()=>{e.timeout&&e.timeout.running&&ne(t.timer)})))},nn=(e,t)=>{if(!t.toast)return c(t.allowEnterKey)?void(on(e,t)||Rt(0,-1,1)):an()},on=(e,t)=>t.focusDeny&&G(e.denyButton)?(e.denyButton.focus(),!0):t.focusCancel&&G(e.cancelButton)?(e.cancelButton.focus(),!0):!(!t.focusConfirm||!G(e.confirmButton))&&(e.confirmButton.focus(),!0),an=()=>{document.activeElement&&"function"==typeof document.activeElement.blur&&document.activeElement.blur()};const sn=e=>{for(const t in e)e[t]=new WeakMap};e=Object.freeze({hideLoading:Xe,disableLoading:Xe,getInput:function(e){var t=he.innerParams.get(e||this);return(e=he.domCache.get(e||this))?F(e.popup,t.input):null},close:st,closePopup:st,closeModal:st,closeToast:st,enableButtons:function(){lt(this,["confirmButton","denyButton","cancelButton"],!1)},disableButtons:function(){lt(this,["confirmButton","denyButton","cancelButton"],!0)},enableInput:function(){return ut(this.getInput(),!1)},disableInput:function(){return ut(this.getInput(),!0)},showValidationMessage:function(e){const t=he.domCache.get(this);var n=he.innerParams.get(this);V(t.validationMessage,e),t.validationMessage.className=h["validation-message"],n.customClass&&n.customClass.validationMessage&&W(t.validationMessage,n.customClass.validationMessage),Z(t.validationMessage);const o=this.getInput();o&&(o.setAttribute("aria-invalid",!0),o.setAttribute("aria-describedby",h["validation-message"]),R(o),W(o,h.inputerror))},resetValidationMessage:function(){var e=he.domCache.get(this);e.validationMessage&&J(e.validationMessage);const t=this.getInput();t&&(t.removeAttribute("aria-invalid"),t.removeAttribute("aria-describedby"),_(t,h.inputerror))},getProgressSteps:function(){return he.domCache.get(this).progressSteps},_main:function(e,t={}){Ze(Object.assign({},t,e)),Me.currentInstance&&(Me.currentInstance._destroy(),M()&&ot()),Me.currentInstance=this,mt(e=((e,t)=>{const n=gt(e),o=Object.assign({},Re,t,n,e);return o.showClass=Object.assign({},Re.showClass,o.showClass),o.hideClass=Object.assign({},Re.hideClass,o.hideClass),o})(e,t)),Object.freeze(e),Me.timeout&&(Me.timeout.stop(),delete Me.timeout),clearTimeout(Me.restoreFocusTimeout);var s,r,c,t=(e=>{const t={popup:v(),container:b(),actions:L(),confirmButton:P(),denyButton:E(),cancelButton:T(),loader:S(),closeButton:D(),validationMessage:x(),progressSteps:B()};return he.domCache.set(e,t),t})(this);return Oe(this,e),he.innerParams.set(this,e),s=this,r=t,c=e,new Promise(e=>{const t=e=>{s.closePopup({isDismissed:!0,dismiss:e})};var n,o,i,a;it.swalPromiseResolve.set(s,e),r.confirmButton.onclick=()=>(e=>{var t=he.innerParams.get(e);e.disableButtons(),t.input?qt(e,"confirm"):Ft(e,!0)})(s),r.denyButton.onclick=()=>(e=>{var t=he.innerParams.get(e);e.disableButtons(),t.returnInputValueOnDeny?qt(e,"deny"):Nt(e,!1)})(s),r.cancelButton.onclick=()=>((e,t)=>{e.disableButtons(),t(l.cancel)})(s,t),r.closeButton.onclick=()=>t(l.close),n=s,a=r,e=t,he.innerParams.get(n).toast?Xt(n,a,e):(Gt(a),Qt(a),en(n,a,e)),o=s,a=Me,e=c,i=t,a.keydownTarget&&a.keydownHandlerAdded&&(a.keydownTarget.removeEventListener("keydown",a.keydownHandler,{capture:a.keydownListenerCapture}),a.keydownHandlerAdded=!1),e.toast||(a.keydownHandler=e=>_t(o,e,i),a.keydownTarget=e.keydownListenerCapture?window:v(),a.keydownListenerCapture=e.keydownListenerCapture,a.keydownTarget.addEventListener("keydown",a.keydownHandler,{capture:a.keydownListenerCapture}),a.keydownHandlerAdded=!0),e=s,"select"===(a=c).input||"radio"===a.input?jt(e,a):["text","email","number","tel","textarea"].includes(a.input)&&(u(a.inputValue)||p(a.inputValue))&&(De(P()),Dt(e,a)),Bt(c),tn(Me,c,t),nn(r,c),setTimeout(()=>{r.container.scrollTop=0})})},update:function(t){var e=v(),n=he.innerParams.get(this);if(!e||N(e,n.hideClass.popup))return s("You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup.");const o={};Object.keys(t).forEach(e=>{ln.isUpdatableParameter(e)?o[e]=t[e]:s('Invalid parameter to update: "'.concat(e,'". Updatable params are listed here: https://github.com/sweetalert2/sweetalert2/blob/master/src/utils/params.js\n\nIf you think this parameter should be updatable, request it here: https://github.com/sweetalert2/sweetalert2/issues/new?template=02_feature_request.md'))}),n=Object.assign({},n,o),Oe(this,n),he.innerParams.set(this,n),Object.defineProperties(this,{params:{value:Object.assign({},this.params,t),writable:!1,enumerable:!0}})},_destroy:function(){var e=he.domCache.get(this);const t=he.innerParams.get(this);t&&(e.popup&&Me.swalCloseEventFinishedCallback&&(Me.swalCloseEventFinishedCallback(),delete Me.swalCloseEventFinishedCallback),Me.deferDisposalTimer&&(clearTimeout(Me.deferDisposalTimer),delete Me.deferDisposalTimer),"function"==typeof t.didDestroy&&t.didDestroy(),delete this.params,delete Me.keydownHandler,delete Me.keydownTarget,sn(he),sn(it),delete Me.currentInstance)}});let rn;class cn{constructor(...e){"undefined"!=typeof window&&(rn=this,e=Object.freeze(this.constructor.argsToParams(e)),Object.defineProperties(this,{params:{value:e,writable:!1,enumerable:!0,configurable:!0}}),e=this._main(this.params),he.promise.set(this,e))}then(e){const t=he.promise.get(this);return t.then(e)}finally(e){const t=he.promise.get(this);return t.finally(e)}}Object.assign(cn.prototype,e),Object.assign(cn,Je),Object.keys(e).forEach(t=>{cn[t]=function(...e){if(rn)return rn[t](...e)}}),cn.DismissReason=l,cn.version="11.1.5";const ln=cn;return ln.default=ln,ln}),void 0!==this&&this.Sweetalert2&&(this.swal=this.sweetAlert=this.Swal=this.SweetAlert=this.Sweetalert2); +"undefined"!=typeof document&&function(e,t){var n=e.createElement("style");if(e.getElementsByTagName("head")[0].appendChild(n),n.styleSheet)n.styleSheet.disabled||(n.styleSheet.cssText=t);else try{n.innerHTML=t}catch(e){n.innerText=t}}(document,".swal2-popup.swal2-toast{box-sizing:border-box;grid-column:1/4!important;grid-row:1/4!important;grid-template-columns:1fr 99fr 1fr;padding:1em;overflow-y:hidden;background:#fff;box-shadow:0 0 .625em #d9d9d9;pointer-events:all}.swal2-popup.swal2-toast>*{grid-column:2}.swal2-popup.swal2-toast .swal2-title{margin:1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-loading{justify-content:center}.swal2-popup.swal2-toast .swal2-input{height:2em;margin:.5em;font-size:1em}.swal2-popup.swal2-toast .swal2-validation-message{font-size:1em}.swal2-popup.swal2-toast .swal2-footer{margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-popup.swal2-toast .swal2-close{grid-column:3/3;grid-row:1/99;align-self:center;width:.8em;height:.8em;margin:0;font-size:2em}.swal2-popup.swal2-toast .swal2-html-container{margin:1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-html-container:empty{padding:0}.swal2-popup.swal2-toast .swal2-loader{grid-column:1;grid-row:1/99;align-self:center;width:2em;height:2em;margin:.25em}.swal2-popup.swal2-toast .swal2-icon{grid-column:1;grid-row:1/99;align-self:center;width:2em;min-width:2em;height:2em;margin:0 .5em 0 0}.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:700}.swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-popup.swal2-toast .swal2-actions{justify-content:flex-start;height:auto;margin:0;margin-top:.3125em;padding:0}.swal2-popup.swal2-toast .swal2-styled{margin:.25em .5em;padding:.4em .6em;font-size:1em}.swal2-popup.swal2-toast .swal2-styled:focus{box-shadow:0 0 0 1px #fff,0 0 0 3px rgba(100,150,200,.5)}.swal2-popup.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;transform:rotate(45deg);border-radius:50%}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.8em;left:-.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.25em;left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-popup.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{-webkit-animation:swal2-toast-animate-success-line-tip .75s;animation:swal2-toast-animate-success-line-tip .75s}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{-webkit-animation:swal2-toast-animate-success-line-long .75s;animation:swal2-toast-animate-success-line-long .75s}.swal2-popup.swal2-toast.swal2-show{-webkit-animation:swal2-toast-show .5s;animation:swal2-toast-show .5s}.swal2-popup.swal2-toast.swal2-hide{-webkit-animation:swal2-toast-hide .1s forwards;animation:swal2-toast-hide .1s forwards}.swal2-container{display:grid;position:fixed;z-index:1060;top:0;right:0;bottom:0;left:0;box-sizing:border-box;grid-template-areas:\"top-start top top-end\" \"center-start center center-end\" \"bottom-start bottom-center bottom-end\";grid-template-rows:minmax(-webkit-min-content,auto) minmax(-webkit-min-content,auto) minmax(-webkit-min-content,auto);grid-template-rows:minmax(min-content,auto) minmax(min-content,auto) minmax(min-content,auto);height:100%;padding:.625em;overflow-x:hidden;transition:background-color .1s;-webkit-overflow-scrolling:touch}.swal2-container.swal2-backdrop-show,.swal2-container.swal2-noanimation{background:rgba(0,0,0,.4)}.swal2-container.swal2-backdrop-hide{background:0 0!important}.swal2-container.swal2-bottom-start,.swal2-container.swal2-center-start,.swal2-container.swal2-top-start{grid-template-columns:minmax(0,1fr) auto auto}.swal2-container.swal2-bottom,.swal2-container.swal2-center,.swal2-container.swal2-top{grid-template-columns:auto minmax(0,1fr) auto}.swal2-container.swal2-bottom-end,.swal2-container.swal2-center-end,.swal2-container.swal2-top-end{grid-template-columns:auto auto minmax(0,1fr)}.swal2-container.swal2-top-start>.swal2-popup{align-self:start}.swal2-container.swal2-top>.swal2-popup{grid-column:2;align-self:start;justify-self:center}.swal2-container.swal2-top-end>.swal2-popup,.swal2-container.swal2-top-right>.swal2-popup{grid-column:3;align-self:start;justify-self:end}.swal2-container.swal2-center-left>.swal2-popup,.swal2-container.swal2-center-start>.swal2-popup{grid-row:2;align-self:center}.swal2-container.swal2-center>.swal2-popup{grid-column:2;grid-row:2;align-self:center;justify-self:center}.swal2-container.swal2-center-end>.swal2-popup,.swal2-container.swal2-center-right>.swal2-popup{grid-column:3;grid-row:2;align-self:center;justify-self:end}.swal2-container.swal2-bottom-left>.swal2-popup,.swal2-container.swal2-bottom-start>.swal2-popup{grid-column:1;grid-row:3;align-self:end}.swal2-container.swal2-bottom>.swal2-popup{grid-column:2;grid-row:3;justify-self:center;align-self:end}.swal2-container.swal2-bottom-end>.swal2-popup,.swal2-container.swal2-bottom-right>.swal2-popup{grid-column:3;grid-row:3;align-self:end;justify-self:end}.swal2-container.swal2-grow-fullscreen>.swal2-popup,.swal2-container.swal2-grow-row>.swal2-popup{grid-column:1/4;width:100%}.swal2-container.swal2-grow-column>.swal2-popup,.swal2-container.swal2-grow-fullscreen>.swal2-popup{grid-row:1/4;align-self:stretch}.swal2-container.swal2-no-transition{transition:none!important}.swal2-popup{display:none;position:relative;box-sizing:border-box;grid-template-columns:minmax(0,100%);width:32em;max-width:100%;padding:0 0 1.25em;border:none;border-radius:5px;background:#fff;color:#545454;font-family:inherit;font-size:1rem}.swal2-popup:focus{outline:0}.swal2-popup.swal2-loading{overflow-y:hidden}.swal2-title{position:relative;max-width:100%;margin:0;padding:.8em 1em 0;color:#595959;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;word-wrap:break-word}.swal2-actions{display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:center;width:auto;margin:1.25em auto 0;padding:0}.swal2-actions:not(.swal2-loading) .swal2-styled[disabled]{opacity:.4}.swal2-actions:not(.swal2-loading) .swal2-styled:hover{background-image:linear-gradient(rgba(0,0,0,.1),rgba(0,0,0,.1))}.swal2-actions:not(.swal2-loading) .swal2-styled:active{background-image:linear-gradient(rgba(0,0,0,.2),rgba(0,0,0,.2))}.swal2-loader{display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;-webkit-animation:swal2-rotate-loading 1.5s linear 0s infinite normal;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 transparent #2778c4 transparent}.swal2-styled{margin:.3125em;padding:.625em 1.1em;transition:box-shadow .1s;box-shadow:0 0 0 3px transparent;font-weight:500}.swal2-styled:not([disabled]){cursor:pointer}.swal2-styled.swal2-confirm{border:0;border-radius:.25em;background:initial;background-color:#7367f0;color:#fff;font-size:1em}.swal2-styled.swal2-confirm:focus{box-shadow:0 0 0 3px rgba(115,103,240,.5)}.swal2-styled.swal2-deny{border:0;border-radius:.25em;background:initial;background-color:#ea5455;color:#fff;font-size:1em}.swal2-styled.swal2-deny:focus{box-shadow:0 0 0 3px rgba(234,84,85,.5)}.swal2-styled.swal2-cancel{border:0;border-radius:.25em;background:initial;background-color:#6e7d88;color:#fff;font-size:1em}.swal2-styled.swal2-cancel:focus{box-shadow:0 0 0 3px rgba(110,125,136,.5)}.swal2-styled.swal2-default-outline:focus{box-shadow:0 0 0 3px rgba(100,150,200,.5)}.swal2-styled:focus{outline:0}.swal2-styled::-moz-focus-inner{border:0}.swal2-footer{justify-content:center;margin:1em 0 0;padding:1em 1em 0;border-top:1px solid #eee;color:#545454;font-size:1em}.swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;grid-column:auto!important;height:.25em;overflow:hidden;border-bottom-right-radius:5px;border-bottom-left-radius:5px}.swal2-timer-progress-bar{width:100%;height:.25em;background:rgba(0,0,0,.2)}.swal2-image{max-width:100%;margin:2em auto 1em}.swal2-close{z-index:2;align-items:center;justify-content:center;width:1.2em;height:1.2em;margin-top:0;margin-right:0;margin-bottom:-1.2em;padding:0;overflow:hidden;transition:color .1s,box-shadow .1s;border:none;border-radius:5px;background:0 0;color:#ccc;font-family:serif;font-family:monospace;font-size:2.5em;cursor:pointer;justify-self:end}.swal2-close:hover{transform:none;background:0 0;color:#f27474}.swal2-close:focus{outline:0;box-shadow:inset 0 0 0 3px rgba(100,150,200,.5)}.swal2-close::-moz-focus-inner{border:0}.swal2-html-container{z-index:1;justify-content:center;margin:1em 1.6em .3em;padding:0;overflow:auto;color:#545454;font-size:1.125em;font-weight:400;line-height:normal;text-align:center;word-wrap:break-word;word-break:break-word}.swal2-checkbox,.swal2-file,.swal2-input,.swal2-radio,.swal2-select,.swal2-textarea{margin:1em 2em 0}.swal2-file,.swal2-input,.swal2-textarea{box-sizing:border-box;width:auto;transition:border-color .1s,box-shadow .1s;border:1px solid #d9d9d9;border-radius:.1875em;background:inherit;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px transparent;color:inherit;font-size:1.125em}.swal2-file.swal2-inputerror,.swal2-input.swal2-inputerror,.swal2-textarea.swal2-inputerror{border-color:#f27474!important;box-shadow:0 0 2px #f27474!important}.swal2-file:focus,.swal2-input:focus,.swal2-textarea:focus{border:1px solid #b4dbed;outline:0;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(100,150,200,.5)}.swal2-file::-moz-placeholder,.swal2-input::-moz-placeholder,.swal2-textarea::-moz-placeholder{color:#ccc}.swal2-file:-ms-input-placeholder,.swal2-input:-ms-input-placeholder,.swal2-textarea:-ms-input-placeholder{color:#ccc}.swal2-file::placeholder,.swal2-input::placeholder,.swal2-textarea::placeholder{color:#ccc}.swal2-range{margin:1em 2em 0;background:#fff}.swal2-range input{width:80%}.swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}.swal2-range input,.swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}.swal2-input{height:2.625em;padding:0 .75em}.swal2-file{width:75%;margin-right:auto;margin-left:auto;background:inherit;font-size:1.125em}.swal2-textarea{height:6.75em;padding:.75em}.swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:inherit;color:inherit;font-size:1.125em}.swal2-checkbox,.swal2-radio{align-items:center;justify-content:center;background:#fff;color:inherit}.swal2-checkbox label,.swal2-radio label{margin:0 .6em;font-size:1.125em}.swal2-checkbox input,.swal2-radio input{flex-shrink:0;margin:0 .4em}.swal2-input-label{display:flex;justify-content:center;margin:1em auto 0}.swal2-validation-message{align-items:center;justify-content:center;margin:1em 0 0;padding:.625em;overflow:hidden;background:#f0f0f0;color:#666;font-size:1em;font-weight:300}.swal2-validation-message::before{content:\"!\";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}.swal2-icon{position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:2.5em auto .6em;border:.25em solid transparent;border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}.swal2-icon.swal2-error{border-color:#f27474;color:#f27474}.swal2-icon.swal2-error .swal2-x-mark{position:relative;flex-grow:1}.swal2-icon.swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}.swal2-icon.swal2-error.swal2-icon-show{-webkit-animation:swal2-animate-error-icon .5s;animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-error.swal2-icon-show .swal2-x-mark{-webkit-animation:swal2-animate-error-x-mark .5s;animation:swal2-animate-error-x-mark .5s}.swal2-icon.swal2-warning{border-color:#facea8;color:#f8bb86}.swal2-icon.swal2-info{border-color:#9de0f6;color:#3fc3ee}.swal2-icon.swal2-question{border-color:#c9dae1;color:#87adbd}.swal2-icon.swal2-success{border-color:#a5dc86;color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;transform:rotate(45deg);border-radius:50%}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}.swal2-icon.swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-.25em;left:-.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}.swal2-icon.swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}.swal2-icon.swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}.swal2-icon.swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-tip{-webkit-animation:swal2-animate-success-line-tip .75s;animation:swal2-animate-success-line-tip .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-long{-webkit-animation:swal2-animate-success-line-long .75s;animation:swal2-animate-success-line-long .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-circular-line-right{-webkit-animation:swal2-rotate-success-circular-line 4.25s ease-in;animation:swal2-rotate-success-circular-line 4.25s ease-in}.swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:1.25em auto;padding:0;background:inherit;font-weight:600}.swal2-progress-steps li{display:inline-block;position:relative}.swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:#add8e6;color:#fff}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:#add8e6}.swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}[class^=swal2]{-webkit-tap-highlight-color:transparent}.swal2-show{-webkit-animation:swal2-show .3s;animation:swal2-show .3s}.swal2-hide{-webkit-animation:swal2-hide .15s forwards;animation:swal2-hide .15s forwards}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{margin-right:initial;margin-left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}@-webkit-keyframes swal2-toast-show{0%{transform:translateY(-.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0)}}@keyframes swal2-toast-show{0%{transform:translateY(-.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0)}}@-webkit-keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@-webkit-keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@-webkit-keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@-webkit-keyframes swal2-show{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}100%{transform:scale(1)}}@keyframes swal2-show{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}100%{transform:scale(1)}}@-webkit-keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(.5);opacity:0}}@keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(.5);opacity:0}}@-webkit-keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@-webkit-keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@-webkit-keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@-webkit-keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@-webkit-keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0);opacity:1}}@-webkit-keyframes swal2-rotate-loading{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes swal2-rotate-loading{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto!important}body.swal2-no-backdrop .swal2-container{background-color:transparent!important;pointer-events:none}body.swal2-no-backdrop .swal2-container .swal2-popup{pointer-events:all}body.swal2-no-backdrop .swal2-container .swal2-modal{box-shadow:0 0 10px rgba(0,0,0,.4)}@media print{body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow-y:scroll!important}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .swal2-container{position:static!important}}body.swal2-toast-shown .swal2-container{box-sizing:border-box;width:360px;max-width:100%;background-color:transparent;pointer-events:none}body.swal2-toast-shown .swal2-container.swal2-top{top:0;right:auto;bottom:auto;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{top:0;right:0;bottom:auto;left:auto}body.swal2-toast-shown .swal2-container.swal2-top-left,body.swal2-toast-shown .swal2-container.swal2-top-start{top:0;right:auto;bottom:auto;left:0}body.swal2-toast-shown .swal2-container.swal2-center-left,body.swal2-toast-shown .swal2-container.swal2-center-start{top:50%;right:auto;bottom:auto;left:0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{top:50%;right:auto;bottom:auto;left:50%;transform:translate(-50%,-50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{top:50%;right:0;bottom:auto;left:auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-left,body.swal2-toast-shown .swal2-container.swal2-bottom-start{top:auto;right:auto;bottom:0;left:0}body.swal2-toast-shown .swal2-container.swal2-bottom{top:auto;right:auto;bottom:0;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{top:auto;right:0;bottom:0;left:auto}"); \ No newline at end of file diff --git a/modules/setting-management/app/Volo.Abp.SettingManagement.DemoApp/wwwroot/libs/sweetalert2/sweetalert2.css b/modules/setting-management/app/Volo.Abp.SettingManagement.DemoApp/wwwroot/libs/sweetalert2/sweetalert2.css new file mode 100644 index 0000000000..1feb7a5581 --- /dev/null +++ b/modules/setting-management/app/Volo.Abp.SettingManagement.DemoApp/wwwroot/libs/sweetalert2/sweetalert2.css @@ -0,0 +1,1319 @@ +.swal2-popup.swal2-toast { + box-sizing: border-box; + grid-column: 1/4 !important; + grid-row: 1/4 !important; + grid-template-columns: 1fr 99fr 1fr; + padding: 1em; + overflow-y: hidden; + background: #fff; + box-shadow: 0 0 0.625em #d9d9d9; + pointer-events: all; +} +.swal2-popup.swal2-toast > * { + grid-column: 2; +} +.swal2-popup.swal2-toast .swal2-title { + margin: 1em; + padding: 0; + font-size: 1em; + text-align: initial; +} +.swal2-popup.swal2-toast .swal2-loading { + justify-content: center; +} +.swal2-popup.swal2-toast .swal2-input { + height: 2em; + margin: 0.5em; + font-size: 1em; +} +.swal2-popup.swal2-toast .swal2-validation-message { + font-size: 1em; +} +.swal2-popup.swal2-toast .swal2-footer { + margin: 0.5em 0 0; + padding: 0.5em 0 0; + font-size: 0.8em; +} +.swal2-popup.swal2-toast .swal2-close { + grid-column: 3/3; + grid-row: 1/99; + align-self: center; + width: 0.8em; + height: 0.8em; + margin: 0; + font-size: 2em; +} +.swal2-popup.swal2-toast .swal2-html-container { + margin: 1em; + padding: 0; + font-size: 1em; + text-align: initial; +} +.swal2-popup.swal2-toast .swal2-html-container:empty { + padding: 0; +} +.swal2-popup.swal2-toast .swal2-loader { + grid-column: 1; + grid-row: 1/99; + align-self: center; + width: 2em; + height: 2em; + margin: 0.25em; +} +.swal2-popup.swal2-toast .swal2-icon { + grid-column: 1; + grid-row: 1/99; + align-self: center; + width: 2em; + min-width: 2em; + height: 2em; + margin: 0 0.5em 0 0; +} +.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content { + display: flex; + align-items: center; + font-size: 1.8em; + font-weight: bold; +} +.swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring { + width: 2em; + height: 2em; +} +.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line] { + top: 0.875em; + width: 1.375em; +} +.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left] { + left: 0.3125em; +} +.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right] { + right: 0.3125em; +} +.swal2-popup.swal2-toast .swal2-actions { + justify-content: flex-start; + height: auto; + margin: 0; + margin-top: 0.3125em; + padding: 0; +} +.swal2-popup.swal2-toast .swal2-styled { + margin: 0.25em 0.5em; + padding: 0.4em 0.6em; + font-size: 1em; +} +.swal2-popup.swal2-toast .swal2-styled:focus { + box-shadow: 0 0 0 1px #fff, 0 0 0 3px rgba(100, 150, 200, 0.5); +} +.swal2-popup.swal2-toast .swal2-success { + border-color: #a5dc86; +} +.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line] { + position: absolute; + width: 1.6em; + height: 3em; + transform: rotate(45deg); + border-radius: 50%; +} +.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left] { + top: -0.8em; + left: -0.5em; + transform: rotate(-45deg); + transform-origin: 2em 2em; + border-radius: 4em 0 0 4em; +} +.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right] { + top: -0.25em; + left: 0.9375em; + transform-origin: 0 1.5em; + border-radius: 0 4em 4em 0; +} +.swal2-popup.swal2-toast .swal2-success .swal2-success-ring { + width: 2em; + height: 2em; +} +.swal2-popup.swal2-toast .swal2-success .swal2-success-fix { + top: 0; + left: 0.4375em; + width: 0.4375em; + height: 2.6875em; +} +.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line] { + height: 0.3125em; +} +.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip] { + top: 1.125em; + left: 0.1875em; + width: 0.75em; +} +.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=long] { + top: 0.9375em; + right: 0.1875em; + width: 1.375em; +} +.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip { + -webkit-animation: swal2-toast-animate-success-line-tip 0.75s; + animation: swal2-toast-animate-success-line-tip 0.75s; +} +.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long { + -webkit-animation: swal2-toast-animate-success-line-long 0.75s; + animation: swal2-toast-animate-success-line-long 0.75s; +} +.swal2-popup.swal2-toast.swal2-show { + -webkit-animation: swal2-toast-show 0.5s; + animation: swal2-toast-show 0.5s; +} +.swal2-popup.swal2-toast.swal2-hide { + -webkit-animation: swal2-toast-hide 0.1s forwards; + animation: swal2-toast-hide 0.1s forwards; +} + +.swal2-container { + display: grid; + position: fixed; + z-index: 1060; + top: 0; + right: 0; + bottom: 0; + left: 0; + box-sizing: border-box; + grid-template-areas: "top-start top top-end" "center-start center center-end" "bottom-start bottom-center bottom-end"; + grid-template-rows: minmax(-webkit-min-content, auto) minmax(-webkit-min-content, auto) minmax(-webkit-min-content, auto); + grid-template-rows: minmax(min-content, auto) minmax(min-content, auto) minmax(min-content, auto); + height: 100%; + padding: 0.625em; + overflow-x: hidden; + transition: background-color 0.1s; + -webkit-overflow-scrolling: touch; +} +.swal2-container.swal2-backdrop-show, .swal2-container.swal2-noanimation { + background: rgba(0, 0, 0, 0.4); +} +.swal2-container.swal2-backdrop-hide { + background: transparent !important; +} +.swal2-container.swal2-top-start, .swal2-container.swal2-center-start, .swal2-container.swal2-bottom-start { + grid-template-columns: minmax(0, 1fr) auto auto; +} +.swal2-container.swal2-top, .swal2-container.swal2-center, .swal2-container.swal2-bottom { + grid-template-columns: auto minmax(0, 1fr) auto; +} +.swal2-container.swal2-top-end, .swal2-container.swal2-center-end, .swal2-container.swal2-bottom-end { + grid-template-columns: auto auto minmax(0, 1fr); +} +.swal2-container.swal2-top-start > .swal2-popup { + align-self: start; +} +.swal2-container.swal2-top > .swal2-popup { + grid-column: 2; + align-self: start; + justify-self: center; +} +.swal2-container.swal2-top-end > .swal2-popup, .swal2-container.swal2-top-right > .swal2-popup { + grid-column: 3; + align-self: start; + justify-self: end; +} +.swal2-container.swal2-center-start > .swal2-popup, .swal2-container.swal2-center-left > .swal2-popup { + grid-row: 2; + align-self: center; +} +.swal2-container.swal2-center > .swal2-popup { + grid-column: 2; + grid-row: 2; + align-self: center; + justify-self: center; +} +.swal2-container.swal2-center-end > .swal2-popup, .swal2-container.swal2-center-right > .swal2-popup { + grid-column: 3; + grid-row: 2; + align-self: center; + justify-self: end; +} +.swal2-container.swal2-bottom-start > .swal2-popup, .swal2-container.swal2-bottom-left > .swal2-popup { + grid-column: 1; + grid-row: 3; + align-self: end; +} +.swal2-container.swal2-bottom > .swal2-popup { + grid-column: 2; + grid-row: 3; + justify-self: center; + align-self: end; +} +.swal2-container.swal2-bottom-end > .swal2-popup, .swal2-container.swal2-bottom-right > .swal2-popup { + grid-column: 3; + grid-row: 3; + align-self: end; + justify-self: end; +} +.swal2-container.swal2-grow-row > .swal2-popup, .swal2-container.swal2-grow-fullscreen > .swal2-popup { + grid-column: 1/4; + width: 100%; +} +.swal2-container.swal2-grow-column > .swal2-popup, .swal2-container.swal2-grow-fullscreen > .swal2-popup { + grid-row: 1/4; + align-self: stretch; +} +.swal2-container.swal2-no-transition { + transition: none !important; +} + +.swal2-popup { + display: none; + position: relative; + box-sizing: border-box; + grid-template-columns: minmax(0, 100%); + width: 32em; + max-width: 100%; + padding: 0 0 1.25em; + border: none; + border-radius: 5px; + background: #fff; + color: #545454; + font-family: inherit; + font-size: 1rem; +} +.swal2-popup:focus { + outline: none; +} +.swal2-popup.swal2-loading { + overflow-y: hidden; +} + +.swal2-title { + position: relative; + max-width: 100%; + margin: 0; + padding: 0.8em 1em 0; + color: #595959; + font-size: 1.875em; + font-weight: 600; + text-align: center; + text-transform: none; + word-wrap: break-word; +} + +.swal2-actions { + display: flex; + z-index: 1; + box-sizing: border-box; + flex-wrap: wrap; + align-items: center; + justify-content: center; + width: auto; + margin: 1.25em auto 0; + padding: 0; +} +.swal2-actions:not(.swal2-loading) .swal2-styled[disabled] { + opacity: 0.4; +} +.swal2-actions:not(.swal2-loading) .swal2-styled:hover { + background-image: linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1)); +} +.swal2-actions:not(.swal2-loading) .swal2-styled:active { + background-image: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)); +} + +.swal2-loader { + display: none; + align-items: center; + justify-content: center; + width: 2.2em; + height: 2.2em; + margin: 0 1.875em; + -webkit-animation: swal2-rotate-loading 1.5s linear 0s infinite normal; + animation: swal2-rotate-loading 1.5s linear 0s infinite normal; + border-width: 0.25em; + border-style: solid; + border-radius: 100%; + border-color: #2778c4 transparent #2778c4 transparent; +} + +.swal2-styled { + margin: 0.3125em; + padding: 0.625em 1.1em; + transition: box-shadow 0.1s; + box-shadow: 0 0 0 3px transparent; + font-weight: 500; +} +.swal2-styled:not([disabled]) { + cursor: pointer; +} +.swal2-styled.swal2-confirm { + border: 0; + border-radius: 0.25em; + background: initial; + background-color: #7367f0; + color: #fff; + font-size: 1em; +} +.swal2-styled.swal2-confirm:focus { + box-shadow: 0 0 0 3px rgba(115, 103, 240, 0.5); +} +.swal2-styled.swal2-deny { + border: 0; + border-radius: 0.25em; + background: initial; + background-color: #ea5455; + color: #fff; + font-size: 1em; +} +.swal2-styled.swal2-deny:focus { + box-shadow: 0 0 0 3px rgba(234, 84, 85, 0.5); +} +.swal2-styled.swal2-cancel { + border: 0; + border-radius: 0.25em; + background: initial; + background-color: #6e7d88; + color: #fff; + font-size: 1em; +} +.swal2-styled.swal2-cancel:focus { + box-shadow: 0 0 0 3px rgba(110, 125, 136, 0.5); +} +.swal2-styled.swal2-default-outline:focus { + box-shadow: 0 0 0 3px rgba(100, 150, 200, 0.5); +} +.swal2-styled:focus { + outline: none; +} +.swal2-styled::-moz-focus-inner { + border: 0; +} + +.swal2-footer { + justify-content: center; + margin: 1em 0 0; + padding: 1em 1em 0; + border-top: 1px solid #eee; + color: #545454; + font-size: 1em; +} + +.swal2-timer-progress-bar-container { + position: absolute; + right: 0; + bottom: 0; + left: 0; + grid-column: auto !important; + height: 0.25em; + overflow: hidden; + border-bottom-right-radius: 5px; + border-bottom-left-radius: 5px; +} + +.swal2-timer-progress-bar { + width: 100%; + height: 0.25em; + background: rgba(0, 0, 0, 0.2); +} + +.swal2-image { + max-width: 100%; + margin: 2em auto 1em; +} + +.swal2-close { + z-index: 2; + align-items: center; + justify-content: center; + width: 1.2em; + height: 1.2em; + margin-top: 0; + margin-right: 0; + margin-bottom: -1.2em; + padding: 0; + overflow: hidden; + transition: color 0.1s, box-shadow 0.1s; + border: none; + border-radius: 5px; + background: transparent; + color: #ccc; + font-family: serif; + font-family: monospace; + font-size: 2.5em; + cursor: pointer; + justify-self: end; +} +.swal2-close:hover { + transform: none; + background: transparent; + color: #f27474; +} +.swal2-close:focus { + outline: none; + box-shadow: inset 0 0 0 3px rgba(100, 150, 200, 0.5); +} +.swal2-close::-moz-focus-inner { + border: 0; +} + +.swal2-html-container { + z-index: 1; + justify-content: center; + margin: 1em 1.6em 0.3em; + padding: 0; + overflow: auto; + color: #545454; + font-size: 1.125em; + font-weight: normal; + line-height: normal; + text-align: center; + word-wrap: break-word; + word-break: break-word; +} + +.swal2-input, +.swal2-file, +.swal2-textarea, +.swal2-select, +.swal2-radio, +.swal2-checkbox { + margin: 1em 2em 0; +} + +.swal2-input, +.swal2-file, +.swal2-textarea { + box-sizing: border-box; + width: auto; + transition: border-color 0.1s, box-shadow 0.1s; + border: 1px solid #d9d9d9; + border-radius: 0.1875em; + background: inherit; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06), 0 0 0 3px transparent; + color: inherit; + font-size: 1.125em; +} +.swal2-input.swal2-inputerror, +.swal2-file.swal2-inputerror, +.swal2-textarea.swal2-inputerror { + border-color: #f27474 !important; + box-shadow: 0 0 2px #f27474 !important; +} +.swal2-input:focus, +.swal2-file:focus, +.swal2-textarea:focus { + border: 1px solid #b4dbed; + outline: none; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06), 0 0 0 3px rgba(100, 150, 200, 0.5); +} +.swal2-input::-moz-placeholder, .swal2-file::-moz-placeholder, .swal2-textarea::-moz-placeholder { + color: #ccc; +} +.swal2-input:-ms-input-placeholder, .swal2-file:-ms-input-placeholder, .swal2-textarea:-ms-input-placeholder { + color: #ccc; +} +.swal2-input::placeholder, +.swal2-file::placeholder, +.swal2-textarea::placeholder { + color: #ccc; +} + +.swal2-range { + margin: 1em 2em 0; + background: #fff; +} +.swal2-range input { + width: 80%; +} +.swal2-range output { + width: 20%; + color: inherit; + font-weight: 600; + text-align: center; +} +.swal2-range input, +.swal2-range output { + height: 2.625em; + padding: 0; + font-size: 1.125em; + line-height: 2.625em; +} + +.swal2-input { + height: 2.625em; + padding: 0 0.75em; +} + +.swal2-file { + width: 75%; + margin-right: auto; + margin-left: auto; + background: inherit; + font-size: 1.125em; +} + +.swal2-textarea { + height: 6.75em; + padding: 0.75em; +} + +.swal2-select { + min-width: 50%; + max-width: 100%; + padding: 0.375em 0.625em; + background: inherit; + color: inherit; + font-size: 1.125em; +} + +.swal2-radio, +.swal2-checkbox { + align-items: center; + justify-content: center; + background: #fff; + color: inherit; +} +.swal2-radio label, +.swal2-checkbox label { + margin: 0 0.6em; + font-size: 1.125em; +} +.swal2-radio input, +.swal2-checkbox input { + flex-shrink: 0; + margin: 0 0.4em; +} + +.swal2-input-label { + display: flex; + justify-content: center; + margin: 1em auto 0; +} + +.swal2-validation-message { + align-items: center; + justify-content: center; + margin: 1em 0 0; + padding: 0.625em; + overflow: hidden; + background: #f0f0f0; + color: #666666; + font-size: 1em; + font-weight: 300; +} +.swal2-validation-message::before { + content: "!"; + display: inline-block; + width: 1.5em; + min-width: 1.5em; + height: 1.5em; + margin: 0 0.625em; + border-radius: 50%; + background-color: #f27474; + color: #fff; + font-weight: 600; + line-height: 1.5em; + text-align: center; +} + +.swal2-icon { + position: relative; + box-sizing: content-box; + justify-content: center; + width: 5em; + height: 5em; + margin: 2.5em auto 0.6em; + border: 0.25em solid transparent; + border-radius: 50%; + border-color: #000; + font-family: inherit; + line-height: 5em; + cursor: default; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} +.swal2-icon .swal2-icon-content { + display: flex; + align-items: center; + font-size: 3.75em; +} +.swal2-icon.swal2-error { + border-color: #f27474; + color: #f27474; +} +.swal2-icon.swal2-error .swal2-x-mark { + position: relative; + flex-grow: 1; +} +.swal2-icon.swal2-error [class^=swal2-x-mark-line] { + display: block; + position: absolute; + top: 2.3125em; + width: 2.9375em; + height: 0.3125em; + border-radius: 0.125em; + background-color: #f27474; +} +.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left] { + left: 1.0625em; + transform: rotate(45deg); +} +.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right] { + right: 1em; + transform: rotate(-45deg); +} +.swal2-icon.swal2-error.swal2-icon-show { + -webkit-animation: swal2-animate-error-icon 0.5s; + animation: swal2-animate-error-icon 0.5s; +} +.swal2-icon.swal2-error.swal2-icon-show .swal2-x-mark { + -webkit-animation: swal2-animate-error-x-mark 0.5s; + animation: swal2-animate-error-x-mark 0.5s; +} +.swal2-icon.swal2-warning { + border-color: #facea8; + color: #f8bb86; +} +.swal2-icon.swal2-info { + border-color: #9de0f6; + color: #3fc3ee; +} +.swal2-icon.swal2-question { + border-color: #c9dae1; + color: #87adbd; +} +.swal2-icon.swal2-success { + border-color: #a5dc86; + color: #a5dc86; +} +.swal2-icon.swal2-success [class^=swal2-success-circular-line] { + position: absolute; + width: 3.75em; + height: 7.5em; + transform: rotate(45deg); + border-radius: 50%; +} +.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=left] { + top: -0.4375em; + left: -2.0635em; + transform: rotate(-45deg); + transform-origin: 3.75em 3.75em; + border-radius: 7.5em 0 0 7.5em; +} +.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=right] { + top: -0.6875em; + left: 1.875em; + transform: rotate(-45deg); + transform-origin: 0 3.75em; + border-radius: 0 7.5em 7.5em 0; +} +.swal2-icon.swal2-success .swal2-success-ring { + position: absolute; + z-index: 2; + top: -0.25em; + left: -0.25em; + box-sizing: content-box; + width: 100%; + height: 100%; + border: 0.25em solid rgba(165, 220, 134, 0.3); + border-radius: 50%; +} +.swal2-icon.swal2-success .swal2-success-fix { + position: absolute; + z-index: 1; + top: 0.5em; + left: 1.625em; + width: 0.4375em; + height: 5.625em; + transform: rotate(-45deg); +} +.swal2-icon.swal2-success [class^=swal2-success-line] { + display: block; + position: absolute; + z-index: 2; + height: 0.3125em; + border-radius: 0.125em; + background-color: #a5dc86; +} +.swal2-icon.swal2-success [class^=swal2-success-line][class$=tip] { + top: 2.875em; + left: 0.8125em; + width: 1.5625em; + transform: rotate(45deg); +} +.swal2-icon.swal2-success [class^=swal2-success-line][class$=long] { + top: 2.375em; + right: 0.5em; + width: 2.9375em; + transform: rotate(-45deg); +} +.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-tip { + -webkit-animation: swal2-animate-success-line-tip 0.75s; + animation: swal2-animate-success-line-tip 0.75s; +} +.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-long { + -webkit-animation: swal2-animate-success-line-long 0.75s; + animation: swal2-animate-success-line-long 0.75s; +} +.swal2-icon.swal2-success.swal2-icon-show .swal2-success-circular-line-right { + -webkit-animation: swal2-rotate-success-circular-line 4.25s ease-in; + animation: swal2-rotate-success-circular-line 4.25s ease-in; +} + +.swal2-progress-steps { + flex-wrap: wrap; + align-items: center; + max-width: 100%; + margin: 1.25em auto; + padding: 0; + background: inherit; + font-weight: 600; +} +.swal2-progress-steps li { + display: inline-block; + position: relative; +} +.swal2-progress-steps .swal2-progress-step { + z-index: 20; + flex-shrink: 0; + width: 2em; + height: 2em; + border-radius: 2em; + background: #2778c4; + color: #fff; + line-height: 2em; + text-align: center; +} +.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step { + background: #2778c4; +} +.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step ~ .swal2-progress-step { + background: #add8e6; + color: #fff; +} +.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step ~ .swal2-progress-step-line { + background: #add8e6; +} +.swal2-progress-steps .swal2-progress-step-line { + z-index: 10; + flex-shrink: 0; + width: 2.5em; + height: 0.4em; + margin: 0 -1px; + background: #2778c4; +} + +[class^=swal2] { + -webkit-tap-highlight-color: transparent; +} + +.swal2-show { + -webkit-animation: swal2-show 0.3s; + animation: swal2-show 0.3s; +} + +.swal2-hide { + -webkit-animation: swal2-hide 0.15s forwards; + animation: swal2-hide 0.15s forwards; +} + +.swal2-noanimation { + transition: none; +} + +.swal2-scrollbar-measure { + position: absolute; + top: -9999px; + width: 50px; + height: 50px; + overflow: scroll; +} + +.swal2-rtl .swal2-close { + margin-right: initial; + margin-left: 0; +} +.swal2-rtl .swal2-timer-progress-bar { + right: 0; + left: auto; +} + +@-webkit-keyframes swal2-toast-show { + 0% { + transform: translateY(-0.625em) rotateZ(2deg); + } + 33% { + transform: translateY(0) rotateZ(-2deg); + } + 66% { + transform: translateY(0.3125em) rotateZ(2deg); + } + 100% { + transform: translateY(0) rotateZ(0deg); + } +} + +@keyframes swal2-toast-show { + 0% { + transform: translateY(-0.625em) rotateZ(2deg); + } + 33% { + transform: translateY(0) rotateZ(-2deg); + } + 66% { + transform: translateY(0.3125em) rotateZ(2deg); + } + 100% { + transform: translateY(0) rotateZ(0deg); + } +} +@-webkit-keyframes swal2-toast-hide { + 100% { + transform: rotateZ(1deg); + opacity: 0; + } +} +@keyframes swal2-toast-hide { + 100% { + transform: rotateZ(1deg); + opacity: 0; + } +} +@-webkit-keyframes swal2-toast-animate-success-line-tip { + 0% { + top: 0.5625em; + left: 0.0625em; + width: 0; + } + 54% { + top: 0.125em; + left: 0.125em; + width: 0; + } + 70% { + top: 0.625em; + left: -0.25em; + width: 1.625em; + } + 84% { + top: 1.0625em; + left: 0.75em; + width: 0.5em; + } + 100% { + top: 1.125em; + left: 0.1875em; + width: 0.75em; + } +} +@keyframes swal2-toast-animate-success-line-tip { + 0% { + top: 0.5625em; + left: 0.0625em; + width: 0; + } + 54% { + top: 0.125em; + left: 0.125em; + width: 0; + } + 70% { + top: 0.625em; + left: -0.25em; + width: 1.625em; + } + 84% { + top: 1.0625em; + left: 0.75em; + width: 0.5em; + } + 100% { + top: 1.125em; + left: 0.1875em; + width: 0.75em; + } +} +@-webkit-keyframes swal2-toast-animate-success-line-long { + 0% { + top: 1.625em; + right: 1.375em; + width: 0; + } + 65% { + top: 1.25em; + right: 0.9375em; + width: 0; + } + 84% { + top: 0.9375em; + right: 0; + width: 1.125em; + } + 100% { + top: 0.9375em; + right: 0.1875em; + width: 1.375em; + } +} +@keyframes swal2-toast-animate-success-line-long { + 0% { + top: 1.625em; + right: 1.375em; + width: 0; + } + 65% { + top: 1.25em; + right: 0.9375em; + width: 0; + } + 84% { + top: 0.9375em; + right: 0; + width: 1.125em; + } + 100% { + top: 0.9375em; + right: 0.1875em; + width: 1.375em; + } +} +@-webkit-keyframes swal2-show { + 0% { + transform: scale(0.7); + } + 45% { + transform: scale(1.05); + } + 80% { + transform: scale(0.95); + } + 100% { + transform: scale(1); + } +} +@keyframes swal2-show { + 0% { + transform: scale(0.7); + } + 45% { + transform: scale(1.05); + } + 80% { + transform: scale(0.95); + } + 100% { + transform: scale(1); + } +} +@-webkit-keyframes swal2-hide { + 0% { + transform: scale(1); + opacity: 1; + } + 100% { + transform: scale(0.5); + opacity: 0; + } +} +@keyframes swal2-hide { + 0% { + transform: scale(1); + opacity: 1; + } + 100% { + transform: scale(0.5); + opacity: 0; + } +} +@-webkit-keyframes swal2-animate-success-line-tip { + 0% { + top: 1.1875em; + left: 0.0625em; + width: 0; + } + 54% { + top: 1.0625em; + left: 0.125em; + width: 0; + } + 70% { + top: 2.1875em; + left: -0.375em; + width: 3.125em; + } + 84% { + top: 3em; + left: 1.3125em; + width: 1.0625em; + } + 100% { + top: 2.8125em; + left: 0.8125em; + width: 1.5625em; + } +} +@keyframes swal2-animate-success-line-tip { + 0% { + top: 1.1875em; + left: 0.0625em; + width: 0; + } + 54% { + top: 1.0625em; + left: 0.125em; + width: 0; + } + 70% { + top: 2.1875em; + left: -0.375em; + width: 3.125em; + } + 84% { + top: 3em; + left: 1.3125em; + width: 1.0625em; + } + 100% { + top: 2.8125em; + left: 0.8125em; + width: 1.5625em; + } +} +@-webkit-keyframes swal2-animate-success-line-long { + 0% { + top: 3.375em; + right: 2.875em; + width: 0; + } + 65% { + top: 3.375em; + right: 2.875em; + width: 0; + } + 84% { + top: 2.1875em; + right: 0; + width: 3.4375em; + } + 100% { + top: 2.375em; + right: 0.5em; + width: 2.9375em; + } +} +@keyframes swal2-animate-success-line-long { + 0% { + top: 3.375em; + right: 2.875em; + width: 0; + } + 65% { + top: 3.375em; + right: 2.875em; + width: 0; + } + 84% { + top: 2.1875em; + right: 0; + width: 3.4375em; + } + 100% { + top: 2.375em; + right: 0.5em; + width: 2.9375em; + } +} +@-webkit-keyframes swal2-rotate-success-circular-line { + 0% { + transform: rotate(-45deg); + } + 5% { + transform: rotate(-45deg); + } + 12% { + transform: rotate(-405deg); + } + 100% { + transform: rotate(-405deg); + } +} +@keyframes swal2-rotate-success-circular-line { + 0% { + transform: rotate(-45deg); + } + 5% { + transform: rotate(-45deg); + } + 12% { + transform: rotate(-405deg); + } + 100% { + transform: rotate(-405deg); + } +} +@-webkit-keyframes swal2-animate-error-x-mark { + 0% { + margin-top: 1.625em; + transform: scale(0.4); + opacity: 0; + } + 50% { + margin-top: 1.625em; + transform: scale(0.4); + opacity: 0; + } + 80% { + margin-top: -0.375em; + transform: scale(1.15); + } + 100% { + margin-top: 0; + transform: scale(1); + opacity: 1; + } +} +@keyframes swal2-animate-error-x-mark { + 0% { + margin-top: 1.625em; + transform: scale(0.4); + opacity: 0; + } + 50% { + margin-top: 1.625em; + transform: scale(0.4); + opacity: 0; + } + 80% { + margin-top: -0.375em; + transform: scale(1.15); + } + 100% { + margin-top: 0; + transform: scale(1); + opacity: 1; + } +} +@-webkit-keyframes swal2-animate-error-icon { + 0% { + transform: rotateX(100deg); + opacity: 0; + } + 100% { + transform: rotateX(0deg); + opacity: 1; + } +} +@keyframes swal2-animate-error-icon { + 0% { + transform: rotateX(100deg); + opacity: 0; + } + 100% { + transform: rotateX(0deg); + opacity: 1; + } +} +@-webkit-keyframes swal2-rotate-loading { + 0% { + transform: rotate(0deg); + } + 100% { + transform: rotate(360deg); + } +} +@keyframes swal2-rotate-loading { + 0% { + transform: rotate(0deg); + } + 100% { + transform: rotate(360deg); + } +} +body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) { + overflow: hidden; +} +body.swal2-height-auto { + height: auto !important; +} +body.swal2-no-backdrop .swal2-container { + background-color: transparent !important; + pointer-events: none; +} +body.swal2-no-backdrop .swal2-container .swal2-popup { + pointer-events: all; +} +body.swal2-no-backdrop .swal2-container .swal2-modal { + box-shadow: 0 0 10px rgba(0, 0, 0, 0.4); +} +@media print { + body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) { + overflow-y: scroll !important; + } + body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) > [aria-hidden=true] { + display: none; + } + body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .swal2-container { + position: static !important; + } +} +body.swal2-toast-shown .swal2-container { + box-sizing: border-box; + width: 360px; + max-width: 100%; + background-color: transparent; + pointer-events: none; +} +body.swal2-toast-shown .swal2-container.swal2-top { + top: 0; + right: auto; + bottom: auto; + left: 50%; + transform: translateX(-50%); +} +body.swal2-toast-shown .swal2-container.swal2-top-end, body.swal2-toast-shown .swal2-container.swal2-top-right { + top: 0; + right: 0; + bottom: auto; + left: auto; +} +body.swal2-toast-shown .swal2-container.swal2-top-start, body.swal2-toast-shown .swal2-container.swal2-top-left { + top: 0; + right: auto; + bottom: auto; + left: 0; +} +body.swal2-toast-shown .swal2-container.swal2-center-start, body.swal2-toast-shown .swal2-container.swal2-center-left { + top: 50%; + right: auto; + bottom: auto; + left: 0; + transform: translateY(-50%); +} +body.swal2-toast-shown .swal2-container.swal2-center { + top: 50%; + right: auto; + bottom: auto; + left: 50%; + transform: translate(-50%, -50%); +} +body.swal2-toast-shown .swal2-container.swal2-center-end, body.swal2-toast-shown .swal2-container.swal2-center-right { + top: 50%; + right: 0; + bottom: auto; + left: auto; + transform: translateY(-50%); +} +body.swal2-toast-shown .swal2-container.swal2-bottom-start, body.swal2-toast-shown .swal2-container.swal2-bottom-left { + top: auto; + right: auto; + bottom: 0; + left: 0; +} +body.swal2-toast-shown .swal2-container.swal2-bottom { + top: auto; + right: auto; + bottom: 0; + left: 50%; + transform: translateX(-50%); +} +body.swal2-toast-shown .swal2-container.swal2-bottom-end, body.swal2-toast-shown .swal2-container.swal2-bottom-right { + top: auto; + right: 0; + bottom: 0; + left: auto; +} \ No newline at end of file diff --git a/modules/setting-management/app/Volo.Abp.SettingManagement.DemoApp/wwwroot/libs/sweetalert2/sweetalert2.js b/modules/setting-management/app/Volo.Abp.SettingManagement.DemoApp/wwwroot/libs/sweetalert2/sweetalert2.js new file mode 100644 index 0000000000..e9c254f064 --- /dev/null +++ b/modules/setting-management/app/Volo.Abp.SettingManagement.DemoApp/wwwroot/libs/sweetalert2/sweetalert2.js @@ -0,0 +1,3121 @@ +/*! +* sweetalert2 v11.1.5 +* Released under the MIT License. +*/ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : + typeof define === 'function' && define.amd ? define(factory) : + (global = global || self, global.Sweetalert2 = factory()); +}(this, function () { 'use strict'; + + const DismissReason = Object.freeze({ + cancel: 'cancel', + backdrop: 'backdrop', + close: 'close', + esc: 'esc', + timer: 'timer' + }); + + const consolePrefix = 'SweetAlert2:'; + /** + * Filter the unique values into a new array + * @param arr + */ + + const uniqueArray = arr => { + const result = []; + + for (let i = 0; i < arr.length; i++) { + if (result.indexOf(arr[i]) === -1) { + result.push(arr[i]); + } + } + + return result; + }; + /** + * Capitalize the first letter of a string + * @param str + */ + + const capitalizeFirstLetter = str => str.charAt(0).toUpperCase() + str.slice(1); + /** + * Convert NodeList to Array + * @param nodeList + */ + + const toArray = nodeList => Array.prototype.slice.call(nodeList); + /** + * Standardise console warnings + * @param message + */ + + const warn = message => { + console.warn("".concat(consolePrefix, " ").concat(typeof message === 'object' ? message.join(' ') : message)); + }; + /** + * Standardise console errors + * @param message + */ + + const error = message => { + console.error("".concat(consolePrefix, " ").concat(message)); + }; + /** + * Private global state for `warnOnce` + * @type {Array} + * @private + */ + + const previousWarnOnceMessages = []; + /** + * Show a console warning, but only if it hasn't already been shown + * @param message + */ + + const warnOnce = message => { + if (!previousWarnOnceMessages.includes(message)) { + previousWarnOnceMessages.push(message); + warn(message); + } + }; + /** + * Show a one-time console warning about deprecated params/methods + */ + + const warnAboutDeprecation = (deprecatedParam, useInstead) => { + warnOnce("\"".concat(deprecatedParam, "\" is deprecated and will be removed in the next major release. Please use \"").concat(useInstead, "\" instead.")); + }; + /** + * If `arg` is a function, call it (with no arguments or context) and return the result. + * Otherwise, just pass the value through + * @param arg + */ + + const callIfFunction = arg => typeof arg === 'function' ? arg() : arg; + const hasToPromiseFn = arg => arg && typeof arg.toPromise === 'function'; + const asPromise = arg => hasToPromiseFn(arg) ? arg.toPromise() : Promise.resolve(arg); + const isPromise = arg => arg && Promise.resolve(arg) === arg; + + const isJqueryElement = elem => typeof elem === 'object' && elem.jquery; + + const isElement = elem => elem instanceof Element || isJqueryElement(elem); + + const argsToParams = args => { + const params = {}; + + if (typeof args[0] === 'object' && !isElement(args[0])) { + Object.assign(params, args[0]); + } else { + ['title', 'html', 'icon'].forEach((name, index) => { + const arg = args[index]; + + if (typeof arg === 'string' || isElement(arg)) { + params[name] = arg; + } else if (arg !== undefined) { + error("Unexpected type of ".concat(name, "! Expected \"string\" or \"Element\", got ").concat(typeof arg)); + } + }); + } + + return params; + }; + + const swalPrefix = 'swal2-'; + const prefix = items => { + const result = {}; + + for (const i in items) { + result[items[i]] = swalPrefix + items[i]; + } + + return result; + }; + const swalClasses = prefix(['container', 'shown', 'height-auto', 'iosfix', 'popup', 'modal', 'no-backdrop', 'no-transition', 'toast', 'toast-shown', 'show', 'hide', 'close', 'title', 'html-container', 'actions', 'confirm', 'deny', 'cancel', 'default-outline', 'footer', 'icon', 'icon-content', 'image', 'input', 'file', 'range', 'select', 'radio', 'checkbox', 'label', 'textarea', 'inputerror', 'input-label', 'validation-message', 'progress-steps', 'active-progress-step', 'progress-step', 'progress-step-line', 'loader', 'loading', 'styled', 'top', 'top-start', 'top-end', 'top-left', 'top-right', 'center', 'center-start', 'center-end', 'center-left', 'center-right', 'bottom', 'bottom-start', 'bottom-end', 'bottom-left', 'bottom-right', 'grow-row', 'grow-column', 'grow-fullscreen', 'rtl', 'timer-progress-bar', 'timer-progress-bar-container', 'scrollbar-measure', 'icon-success', 'icon-warning', 'icon-info', 'icon-question', 'icon-error']); + const iconTypes = prefix(['success', 'warning', 'info', 'question', 'error']); + + const getContainer = () => document.body.querySelector(".".concat(swalClasses.container)); + const elementBySelector = selectorString => { + const container = getContainer(); + return container ? container.querySelector(selectorString) : null; + }; + + const elementByClass = className => { + return elementBySelector(".".concat(className)); + }; + + const getPopup = () => elementByClass(swalClasses.popup); + const getIcon = () => elementByClass(swalClasses.icon); + const getTitle = () => elementByClass(swalClasses.title); + const getHtmlContainer = () => elementByClass(swalClasses['html-container']); + const getImage = () => elementByClass(swalClasses.image); + const getProgressSteps = () => elementByClass(swalClasses['progress-steps']); + const getValidationMessage = () => elementByClass(swalClasses['validation-message']); + const getConfirmButton = () => elementBySelector(".".concat(swalClasses.actions, " .").concat(swalClasses.confirm)); + const getDenyButton = () => elementBySelector(".".concat(swalClasses.actions, " .").concat(swalClasses.deny)); + const getInputLabel = () => elementByClass(swalClasses['input-label']); + const getLoader = () => elementBySelector(".".concat(swalClasses.loader)); + const getCancelButton = () => elementBySelector(".".concat(swalClasses.actions, " .").concat(swalClasses.cancel)); + const getActions = () => elementByClass(swalClasses.actions); + const getFooter = () => elementByClass(swalClasses.footer); + const getTimerProgressBar = () => elementByClass(swalClasses['timer-progress-bar']); + const getCloseButton = () => elementByClass(swalClasses.close); // https://github.com/jkup/focusable/blob/master/index.js + + const focusable = "\n a[href],\n area[href],\n input:not([disabled]),\n select:not([disabled]),\n textarea:not([disabled]),\n button:not([disabled]),\n iframe,\n object,\n embed,\n [tabindex=\"0\"],\n [contenteditable],\n audio[controls],\n video[controls],\n summary\n"; + const getFocusableElements = () => { + const focusableElementsWithTabindex = toArray(getPopup().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')) // sort according to tabindex + .sort((a, b) => { + a = parseInt(a.getAttribute('tabindex')); + b = parseInt(b.getAttribute('tabindex')); + + if (a > b) { + return 1; + } else if (a < b) { + return -1; + } + + return 0; + }); + const otherFocusableElements = toArray(getPopup().querySelectorAll(focusable)).filter(el => el.getAttribute('tabindex') !== '-1'); + return uniqueArray(focusableElementsWithTabindex.concat(otherFocusableElements)).filter(el => isVisible(el)); + }; + const isModal = () => { + return !isToast() && !document.body.classList.contains(swalClasses['no-backdrop']); + }; + const isToast = () => { + return document.body.classList.contains(swalClasses['toast-shown']); + }; + const isLoading = () => { + return getPopup().hasAttribute('data-loading'); + }; + + const states = { + previousBodyPadding: null + }; + const setInnerHtml = (elem, html) => { + // #1926 + elem.textContent = ''; + + if (html) { + const parser = new DOMParser(); + const parsed = parser.parseFromString(html, "text/html"); + toArray(parsed.querySelector('head').childNodes).forEach(child => { + elem.appendChild(child); + }); + toArray(parsed.querySelector('body').childNodes).forEach(child => { + elem.appendChild(child); + }); + } + }; + const hasClass = (elem, className) => { + if (!className) { + return false; + } + + const classList = className.split(/\s+/); + + for (let i = 0; i < classList.length; i++) { + if (!elem.classList.contains(classList[i])) { + return false; + } + } + + return true; + }; + + const removeCustomClasses = (elem, params) => { + toArray(elem.classList).forEach(className => { + if (!Object.values(swalClasses).includes(className) && !Object.values(iconTypes).includes(className) && !Object.values(params.showClass).includes(className)) { + elem.classList.remove(className); + } + }); + }; + + const applyCustomClass = (elem, params, className) => { + removeCustomClasses(elem, params); + + if (params.customClass && params.customClass[className]) { + if (typeof params.customClass[className] !== 'string' && !params.customClass[className].forEach) { + return warn("Invalid type of customClass.".concat(className, "! Expected string or iterable object, got \"").concat(typeof params.customClass[className], "\"")); + } + + addClass(elem, params.customClass[className]); + } + }; + const getInput = (popup, inputType) => { + if (!inputType) { + return null; + } + + switch (inputType) { + case 'select': + case 'textarea': + case 'file': + return getChildByClass(popup, swalClasses[inputType]); + + case 'checkbox': + return popup.querySelector(".".concat(swalClasses.checkbox, " input")); + + case 'radio': + return popup.querySelector(".".concat(swalClasses.radio, " input:checked")) || popup.querySelector(".".concat(swalClasses.radio, " input:first-child")); + + case 'range': + return popup.querySelector(".".concat(swalClasses.range, " input")); + + default: + return getChildByClass(popup, swalClasses.input); + } + }; + const focusInput = input => { + input.focus(); // place cursor at end of text in text input + + if (input.type !== 'file') { + // http://stackoverflow.com/a/2345915 + const val = input.value; + input.value = ''; + input.value = val; + } + }; + const toggleClass = (target, classList, condition) => { + if (!target || !classList) { + return; + } + + if (typeof classList === 'string') { + classList = classList.split(/\s+/).filter(Boolean); + } + + classList.forEach(className => { + if (target.forEach) { + target.forEach(elem => { + condition ? elem.classList.add(className) : elem.classList.remove(className); + }); + } else { + condition ? target.classList.add(className) : target.classList.remove(className); + } + }); + }; + const addClass = (target, classList) => { + toggleClass(target, classList, true); + }; + const removeClass = (target, classList) => { + toggleClass(target, classList, false); + }; + const getChildByClass = (elem, className) => { + for (let i = 0; i < elem.childNodes.length; i++) { + if (hasClass(elem.childNodes[i], className)) { + return elem.childNodes[i]; + } + } + }; + const applyNumericalStyle = (elem, property, value) => { + if (value === "".concat(parseInt(value))) { + value = parseInt(value); + } + + if (value || parseInt(value) === 0) { + elem.style[property] = typeof value === 'number' ? "".concat(value, "px") : value; + } else { + elem.style.removeProperty(property); + } + }; + const show = (elem, display = 'flex') => { + elem.style.display = display; + }; + const hide = elem => { + elem.style.display = 'none'; + }; + const setStyle = (parent, selector, property, value) => { + const el = parent.querySelector(selector); + + if (el) { + el.style[property] = value; + } + }; + const toggle = (elem, condition, display) => { + condition ? show(elem, display) : hide(elem); + }; // borrowed from jquery $(elem).is(':visible') implementation + + const isVisible = elem => !!(elem && (elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length)); + const allButtonsAreHidden = () => !isVisible(getConfirmButton()) && !isVisible(getDenyButton()) && !isVisible(getCancelButton()); + const isScrollable = elem => !!(elem.scrollHeight > elem.clientHeight); // borrowed from https://stackoverflow.com/a/46352119 + + const hasCssAnimation = elem => { + const style = window.getComputedStyle(elem); + const animDuration = parseFloat(style.getPropertyValue('animation-duration') || '0'); + const transDuration = parseFloat(style.getPropertyValue('transition-duration') || '0'); + return animDuration > 0 || transDuration > 0; + }; + const animateTimerProgressBar = (timer, reset = false) => { + const timerProgressBar = getTimerProgressBar(); + + if (isVisible(timerProgressBar)) { + if (reset) { + timerProgressBar.style.transition = 'none'; + timerProgressBar.style.width = '100%'; + } + + setTimeout(() => { + timerProgressBar.style.transition = "width ".concat(timer / 1000, "s linear"); + timerProgressBar.style.width = '0%'; + }, 10); + } + }; + const stopTimerProgressBar = () => { + const timerProgressBar = getTimerProgressBar(); + const timerProgressBarWidth = parseInt(window.getComputedStyle(timerProgressBar).width); + timerProgressBar.style.removeProperty('transition'); + timerProgressBar.style.width = '100%'; + const timerProgressBarFullWidth = parseInt(window.getComputedStyle(timerProgressBar).width); + const timerProgressBarPercent = parseInt(timerProgressBarWidth / timerProgressBarFullWidth * 100); + timerProgressBar.style.removeProperty('transition'); + timerProgressBar.style.width = "".concat(timerProgressBarPercent, "%"); + }; + + // Detect Node env + const isNodeEnv = () => typeof window === 'undefined' || typeof document === 'undefined'; + + const sweetHTML = "\n
                                              \n \n
                                                \n
                                                \n \n

                                                \n
                                                \n \n \n
                                                \n \n \n
                                                \n \n
                                                \n \n \n
                                                \n
                                                \n
                                                \n \n \n \n
                                                \n
                                                \n
                                                \n
                                                \n
                                                \n
                                                \n").replace(/(^|\n)\s*/g, ''); + + const resetOldContainer = () => { + const oldContainer = getContainer(); + + if (!oldContainer) { + return false; + } + + oldContainer.remove(); + removeClass([document.documentElement, document.body], [swalClasses['no-backdrop'], swalClasses['toast-shown'], swalClasses['has-column']]); + return true; + }; + + const resetValidationMessage = () => { + if (Swal.isVisible()) { + Swal.resetValidationMessage(); + } + }; + + const addInputChangeListeners = () => { + const popup = getPopup(); + const input = getChildByClass(popup, swalClasses.input); + const file = getChildByClass(popup, swalClasses.file); + const range = popup.querySelector(".".concat(swalClasses.range, " input")); + const rangeOutput = popup.querySelector(".".concat(swalClasses.range, " output")); + const select = getChildByClass(popup, swalClasses.select); + const checkbox = popup.querySelector(".".concat(swalClasses.checkbox, " input")); + const textarea = getChildByClass(popup, swalClasses.textarea); + input.oninput = resetValidationMessage; + file.onchange = resetValidationMessage; + select.onchange = resetValidationMessage; + checkbox.onchange = resetValidationMessage; + textarea.oninput = resetValidationMessage; + + range.oninput = () => { + resetValidationMessage(); + rangeOutput.value = range.value; + }; + + range.onchange = () => { + resetValidationMessage(); + range.nextSibling.value = range.value; + }; + }; + + const getTarget = target => typeof target === 'string' ? document.querySelector(target) : target; + + const setupAccessibility = params => { + const popup = getPopup(); + popup.setAttribute('role', params.toast ? 'alert' : 'dialog'); + popup.setAttribute('aria-live', params.toast ? 'polite' : 'assertive'); + + if (!params.toast) { + popup.setAttribute('aria-modal', 'true'); + } + }; + + const setupRTL = targetElement => { + if (window.getComputedStyle(targetElement).direction === 'rtl') { + addClass(getContainer(), swalClasses.rtl); + } + }; + /* + * Add modal + backdrop to DOM + */ + + + const init = params => { + // Clean up the old popup container if it exists + const oldContainerExisted = resetOldContainer(); + /* istanbul ignore if */ + + if (isNodeEnv()) { + error('SweetAlert2 requires document to initialize'); + return; + } + + const container = document.createElement('div'); + container.className = swalClasses.container; + + if (oldContainerExisted) { + addClass(container, swalClasses['no-transition']); + } + + setInnerHtml(container, sweetHTML); + const targetElement = getTarget(params.target); + targetElement.appendChild(container); + setupAccessibility(params); + setupRTL(targetElement); + addInputChangeListeners(); + }; + + const parseHtmlToContainer = (param, target) => { + // DOM element + if (param instanceof HTMLElement) { + target.appendChild(param); // Object + } else if (typeof param === 'object') { + handleObject(param, target); // Plain string + } else if (param) { + setInnerHtml(target, param); + } + }; + + const handleObject = (param, target) => { + // JQuery element(s) + if (param.jquery) { + handleJqueryElem(target, param); // For other objects use their string representation + } else { + setInnerHtml(target, param.toString()); + } + }; + + const handleJqueryElem = (target, elem) => { + target.textContent = ''; + + if (0 in elem) { + for (let i = 0; (i in elem); i++) { + target.appendChild(elem[i].cloneNode(true)); + } + } else { + target.appendChild(elem.cloneNode(true)); + } + }; + + const animationEndEvent = (() => { + // Prevent run in Node env + + /* istanbul ignore if */ + if (isNodeEnv()) { + return false; + } + + const testEl = document.createElement('div'); + const transEndEventNames = { + WebkitAnimation: 'webkitAnimationEnd', + OAnimation: 'oAnimationEnd oanimationend', + animation: 'animationend' + }; + + for (const i in transEndEventNames) { + if (Object.prototype.hasOwnProperty.call(transEndEventNames, i) && typeof testEl.style[i] !== 'undefined') { + return transEndEventNames[i]; + } + } + + return false; + })(); + + // https://github.com/twbs/bootstrap/blob/master/js/src/modal.js + + const measureScrollbar = () => { + const scrollDiv = document.createElement('div'); + scrollDiv.className = swalClasses['scrollbar-measure']; + document.body.appendChild(scrollDiv); + const scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth; + document.body.removeChild(scrollDiv); + return scrollbarWidth; + }; + + const renderActions = (instance, params) => { + const actions = getActions(); + const loader = getLoader(); + const confirmButton = getConfirmButton(); + const denyButton = getDenyButton(); + const cancelButton = getCancelButton(); // Actions (buttons) wrapper + + if (!params.showConfirmButton && !params.showDenyButton && !params.showCancelButton) { + hide(actions); + } else { + show(actions); + } // Custom class + + + applyCustomClass(actions, params, 'actions'); // Render buttons + + renderButton(confirmButton, 'confirm', params); + renderButton(denyButton, 'deny', params); + renderButton(cancelButton, 'cancel', params); + handleButtonsStyling(confirmButton, denyButton, cancelButton, params); + + if (params.reverseButtons) { + actions.insertBefore(cancelButton, loader); + actions.insertBefore(denyButton, loader); + actions.insertBefore(confirmButton, loader); + } // Loader + + + setInnerHtml(loader, params.loaderHtml); + applyCustomClass(loader, params, 'loader'); + }; + + function handleButtonsStyling(confirmButton, denyButton, cancelButton, params) { + if (!params.buttonsStyling) { + return removeClass([confirmButton, denyButton, cancelButton], swalClasses.styled); + } + + addClass([confirmButton, denyButton, cancelButton], swalClasses.styled); // Buttons background colors + + if (params.confirmButtonColor) { + confirmButton.style.backgroundColor = params.confirmButtonColor; + addClass(confirmButton, swalClasses['default-outline']); + } + + if (params.denyButtonColor) { + denyButton.style.backgroundColor = params.denyButtonColor; + addClass(denyButton, swalClasses['default-outline']); + } + + if (params.cancelButtonColor) { + cancelButton.style.backgroundColor = params.cancelButtonColor; + addClass(cancelButton, swalClasses['default-outline']); + } + } + + function renderButton(button, buttonType, params) { + toggle(button, params["show".concat(capitalizeFirstLetter(buttonType), "Button")], 'inline-block'); + setInnerHtml(button, params["".concat(buttonType, "ButtonText")]); // Set caption text + + button.setAttribute('aria-label', params["".concat(buttonType, "ButtonAriaLabel")]); // ARIA label + // Add buttons custom classes + + button.className = swalClasses[buttonType]; + applyCustomClass(button, params, "".concat(buttonType, "Button")); + addClass(button, params["".concat(buttonType, "ButtonClass")]); + } + + function handleBackdropParam(container, backdrop) { + if (typeof backdrop === 'string') { + container.style.background = backdrop; + } else if (!backdrop) { + addClass([document.documentElement, document.body], swalClasses['no-backdrop']); + } + } + + function handlePositionParam(container, position) { + if (position in swalClasses) { + addClass(container, swalClasses[position]); + } else { + warn('The "position" parameter is not valid, defaulting to "center"'); + addClass(container, swalClasses.center); + } + } + + function handleGrowParam(container, grow) { + if (grow && typeof grow === 'string') { + const growClass = "grow-".concat(grow); + + if (growClass in swalClasses) { + addClass(container, swalClasses[growClass]); + } + } + } + + const renderContainer = (instance, params) => { + const container = getContainer(); + + if (!container) { + return; + } + + handleBackdropParam(container, params.backdrop); + handlePositionParam(container, params.position); + handleGrowParam(container, params.grow); // Custom class + + applyCustomClass(container, params, 'container'); + }; + + /** + * This module containts `WeakMap`s for each effectively-"private property" that a `Swal` has. + * For example, to set the private property "foo" of `this` to "bar", you can `privateProps.foo.set(this, 'bar')` + * This is the approach that Babel will probably take to implement private methods/fields + * https://github.com/tc39/proposal-private-methods + * https://github.com/babel/babel/pull/7555 + * Once we have the changes from that PR in Babel, and our core class fits reasonable in *one module* + * then we can use that language feature. + */ + var privateProps = { + promise: new WeakMap(), + innerParams: new WeakMap(), + domCache: new WeakMap() + }; + + const inputTypes = ['input', 'file', 'range', 'select', 'radio', 'checkbox', 'textarea']; + const renderInput = (instance, params) => { + const popup = getPopup(); + const innerParams = privateProps.innerParams.get(instance); + const rerender = !innerParams || params.input !== innerParams.input; + inputTypes.forEach(inputType => { + const inputClass = swalClasses[inputType]; + const inputContainer = getChildByClass(popup, inputClass); // set attributes + + setAttributes(inputType, params.inputAttributes); // set class + + inputContainer.className = inputClass; + + if (rerender) { + hide(inputContainer); + } + }); + + if (params.input) { + if (rerender) { + showInput(params); + } // set custom class + + + setCustomClass(params); + } + }; + + const showInput = params => { + if (!renderInputType[params.input]) { + return error("Unexpected type of input! Expected \"text\", \"email\", \"password\", \"number\", \"tel\", \"select\", \"radio\", \"checkbox\", \"textarea\", \"file\" or \"url\", got \"".concat(params.input, "\"")); + } + + const inputContainer = getInputContainer(params.input); + const input = renderInputType[params.input](inputContainer, params); + show(input); // input autofocus + + setTimeout(() => { + focusInput(input); + }); + }; + + const removeAttributes = input => { + for (let i = 0; i < input.attributes.length; i++) { + const attrName = input.attributes[i].name; + + if (!['type', 'value', 'style'].includes(attrName)) { + input.removeAttribute(attrName); + } + } + }; + + const setAttributes = (inputType, inputAttributes) => { + const input = getInput(getPopup(), inputType); + + if (!input) { + return; + } + + removeAttributes(input); + + for (const attr in inputAttributes) { + input.setAttribute(attr, inputAttributes[attr]); + } + }; + + const setCustomClass = params => { + const inputContainer = getInputContainer(params.input); + + if (params.customClass) { + addClass(inputContainer, params.customClass.input); + } + }; + + const setInputPlaceholder = (input, params) => { + if (!input.placeholder || params.inputPlaceholder) { + input.placeholder = params.inputPlaceholder; + } + }; + + const setInputLabel = (input, prependTo, params) => { + if (params.inputLabel) { + input.id = swalClasses.input; + const label = document.createElement('label'); + const labelClass = swalClasses['input-label']; + label.setAttribute('for', input.id); + label.className = labelClass; + addClass(label, params.customClass.inputLabel); + label.innerText = params.inputLabel; + prependTo.insertAdjacentElement('beforebegin', label); + } + }; + + const getInputContainer = inputType => { + const inputClass = swalClasses[inputType] ? swalClasses[inputType] : swalClasses.input; + return getChildByClass(getPopup(), inputClass); + }; + + const renderInputType = {}; + + renderInputType.text = renderInputType.email = renderInputType.password = renderInputType.number = renderInputType.tel = renderInputType.url = (input, params) => { + if (typeof params.inputValue === 'string' || typeof params.inputValue === 'number') { + input.value = params.inputValue; + } else if (!isPromise(params.inputValue)) { + warn("Unexpected type of inputValue! Expected \"string\", \"number\" or \"Promise\", got \"".concat(typeof params.inputValue, "\"")); + } + + setInputLabel(input, input, params); + setInputPlaceholder(input, params); + input.type = params.input; + return input; + }; + + renderInputType.file = (input, params) => { + setInputLabel(input, input, params); + setInputPlaceholder(input, params); + return input; + }; + + renderInputType.range = (range, params) => { + const rangeInput = range.querySelector('input'); + const rangeOutput = range.querySelector('output'); + rangeInput.value = params.inputValue; + rangeInput.type = params.input; + rangeOutput.value = params.inputValue; + setInputLabel(rangeInput, range, params); + return range; + }; + + renderInputType.select = (select, params) => { + select.textContent = ''; + + if (params.inputPlaceholder) { + const placeholder = document.createElement('option'); + setInnerHtml(placeholder, params.inputPlaceholder); + placeholder.value = ''; + placeholder.disabled = true; + placeholder.selected = true; + select.appendChild(placeholder); + } + + setInputLabel(select, select, params); + return select; + }; + + renderInputType.radio = radio => { + radio.textContent = ''; + return radio; + }; + + renderInputType.checkbox = (checkboxContainer, params) => { + const checkbox = getInput(getPopup(), 'checkbox'); + checkbox.value = 1; + checkbox.id = swalClasses.checkbox; + checkbox.checked = Boolean(params.inputValue); + const label = checkboxContainer.querySelector('span'); + setInnerHtml(label, params.inputPlaceholder); + return checkboxContainer; + }; + + renderInputType.textarea = (textarea, params) => { + textarea.value = params.inputValue; + setInputPlaceholder(textarea, params); + setInputLabel(textarea, textarea, params); + + const getMargin = el => parseInt(window.getComputedStyle(el).marginLeft) + parseInt(window.getComputedStyle(el).marginRight); + + setTimeout(() => { + // #2291 + if ('MutationObserver' in window) { + // #1699 + const initialPopupWidth = parseInt(window.getComputedStyle(getPopup()).width); + + const textareaResizeHandler = () => { + const textareaWidth = textarea.offsetWidth + getMargin(textarea); + + if (textareaWidth > initialPopupWidth) { + getPopup().style.width = "".concat(textareaWidth, "px"); + } else { + getPopup().style.width = null; + } + }; + + new MutationObserver(textareaResizeHandler).observe(textarea, { + attributes: true, + attributeFilter: ['style'] + }); + } + }); + return textarea; + }; + + const renderContent = (instance, params) => { + const htmlContainer = getHtmlContainer(); + applyCustomClass(htmlContainer, params, 'htmlContainer'); // Content as HTML + + if (params.html) { + parseHtmlToContainer(params.html, htmlContainer); + show(htmlContainer, 'block'); // Content as plain text + } else if (params.text) { + htmlContainer.textContent = params.text; + show(htmlContainer, 'block'); // No content + } else { + hide(htmlContainer); + } + + renderInput(instance, params); + }; + + const renderFooter = (instance, params) => { + const footer = getFooter(); + toggle(footer, params.footer); + + if (params.footer) { + parseHtmlToContainer(params.footer, footer); + } // Custom class + + + applyCustomClass(footer, params, 'footer'); + }; + + const renderCloseButton = (instance, params) => { + const closeButton = getCloseButton(); + setInnerHtml(closeButton, params.closeButtonHtml); // Custom class + + applyCustomClass(closeButton, params, 'closeButton'); + toggle(closeButton, params.showCloseButton); + closeButton.setAttribute('aria-label', params.closeButtonAriaLabel); + }; + + const renderIcon = (instance, params) => { + const innerParams = privateProps.innerParams.get(instance); + const icon = getIcon(); // if the given icon already rendered, apply the styling without re-rendering the icon + + if (innerParams && params.icon === innerParams.icon) { + // Custom or default content + setContent(icon, params); + applyStyles(icon, params); + return; + } + + if (!params.icon && !params.iconHtml) { + return hide(icon); + } + + if (params.icon && Object.keys(iconTypes).indexOf(params.icon) === -1) { + error("Unknown icon! Expected \"success\", \"error\", \"warning\", \"info\" or \"question\", got \"".concat(params.icon, "\"")); + return hide(icon); + } + + show(icon); // Custom or default content + + setContent(icon, params); + applyStyles(icon, params); // Animate icon + + addClass(icon, params.showClass.icon); + }; + + const applyStyles = (icon, params) => { + for (const iconType in iconTypes) { + if (params.icon !== iconType) { + removeClass(icon, iconTypes[iconType]); + } + } + + addClass(icon, iconTypes[params.icon]); // Icon color + + setColor(icon, params); // Success icon background color + + adjustSuccessIconBackgoundColor(); // Custom class + + applyCustomClass(icon, params, 'icon'); + }; // Adjust success icon background color to match the popup background color + + + const adjustSuccessIconBackgoundColor = () => { + const popup = getPopup(); + const popupBackgroundColor = window.getComputedStyle(popup).getPropertyValue('background-color'); + const successIconParts = popup.querySelectorAll('[class^=swal2-success-circular-line], .swal2-success-fix'); + + for (let i = 0; i < successIconParts.length; i++) { + successIconParts[i].style.backgroundColor = popupBackgroundColor; + } + }; + + const setContent = (icon, params) => { + icon.textContent = ''; + + if (params.iconHtml) { + setInnerHtml(icon, iconContent(params.iconHtml)); + } else if (params.icon === 'success') { + setInnerHtml(icon, "\n
                                                \n \n
                                                \n
                                                \n "); + } else if (params.icon === 'error') { + setInnerHtml(icon, "\n \n \n \n \n "); + } else { + const defaultIconHtml = { + question: '?', + warning: '!', + info: 'i' + }; + setInnerHtml(icon, iconContent(defaultIconHtml[params.icon])); + } + }; + + const setColor = (icon, params) => { + if (!params.iconColor) { + return; + } + + icon.style.color = params.iconColor; + icon.style.borderColor = params.iconColor; + + for (const sel of ['.swal2-success-line-tip', '.swal2-success-line-long', '.swal2-x-mark-line-left', '.swal2-x-mark-line-right']) { + setStyle(icon, sel, 'backgroundColor', params.iconColor); + } + + setStyle(icon, '.swal2-success-ring', 'borderColor', params.iconColor); + }; + + const iconContent = content => "
                                                ").concat(content, "
                                                "); + + const renderImage = (instance, params) => { + const image = getImage(); + + if (!params.imageUrl) { + return hide(image); + } + + show(image, ''); // Src, alt + + image.setAttribute('src', params.imageUrl); + image.setAttribute('alt', params.imageAlt); // Width, height + + applyNumericalStyle(image, 'width', params.imageWidth); + applyNumericalStyle(image, 'height', params.imageHeight); // Class + + image.className = swalClasses.image; + applyCustomClass(image, params, 'image'); + }; + + const createStepElement = step => { + const stepEl = document.createElement('li'); + addClass(stepEl, swalClasses['progress-step']); + setInnerHtml(stepEl, step); + return stepEl; + }; + + const createLineElement = params => { + const lineEl = document.createElement('li'); + addClass(lineEl, swalClasses['progress-step-line']); + + if (params.progressStepsDistance) { + lineEl.style.width = params.progressStepsDistance; + } + + return lineEl; + }; + + const renderProgressSteps = (instance, params) => { + const progressStepsContainer = getProgressSteps(); + + if (!params.progressSteps || params.progressSteps.length === 0) { + return hide(progressStepsContainer); + } + + show(progressStepsContainer); + progressStepsContainer.textContent = ''; + + if (params.currentProgressStep >= params.progressSteps.length) { + warn('Invalid currentProgressStep parameter, it should be less than progressSteps.length ' + '(currentProgressStep like JS arrays starts from 0)'); + } + + params.progressSteps.forEach((step, index) => { + const stepEl = createStepElement(step); + progressStepsContainer.appendChild(stepEl); + + if (index === params.currentProgressStep) { + addClass(stepEl, swalClasses['active-progress-step']); + } + + if (index !== params.progressSteps.length - 1) { + const lineEl = createLineElement(params); + progressStepsContainer.appendChild(lineEl); + } + }); + }; + + const renderTitle = (instance, params) => { + const title = getTitle(); + toggle(title, params.title || params.titleText, 'block'); + + if (params.title) { + parseHtmlToContainer(params.title, title); + } + + if (params.titleText) { + title.innerText = params.titleText; + } // Custom class + + + applyCustomClass(title, params, 'title'); + }; + + const renderPopup = (instance, params) => { + const container = getContainer(); + const popup = getPopup(); // Width + + if (params.toast) { + // #2170 + applyNumericalStyle(container, 'width', params.width); + popup.style.width = '100%'; + popup.insertBefore(getLoader(), getIcon()); + } else { + applyNumericalStyle(popup, 'width', params.width); + } // Padding + + + applyNumericalStyle(popup, 'padding', params.padding); // Background + + if (params.background) { + popup.style.background = params.background; + } + + hide(getValidationMessage()); // Classes + + addClasses(popup, params); + }; + + const addClasses = (popup, params) => { + // Default Class + showClass when updating Swal.update({}) + popup.className = "".concat(swalClasses.popup, " ").concat(isVisible(popup) ? params.showClass.popup : ''); + + if (params.toast) { + addClass([document.documentElement, document.body], swalClasses['toast-shown']); + addClass(popup, swalClasses.toast); + } else { + addClass(popup, swalClasses.modal); + } // Custom class + + + applyCustomClass(popup, params, 'popup'); + + if (typeof params.customClass === 'string') { + addClass(popup, params.customClass); + } // Icon class (#1842) + + + if (params.icon) { + addClass(popup, swalClasses["icon-".concat(params.icon)]); + } + }; + + const render = (instance, params) => { + renderPopup(instance, params); + renderContainer(instance, params); + renderProgressSteps(instance, params); + renderIcon(instance, params); + renderImage(instance, params); + renderTitle(instance, params); + renderCloseButton(instance, params); + renderContent(instance, params); + renderActions(instance, params); + renderFooter(instance, params); + + if (typeof params.didRender === 'function') { + params.didRender(getPopup()); + } + }; + + /* + * Global function to determine if SweetAlert2 popup is shown + */ + + const isVisible$1 = () => { + return isVisible(getPopup()); + }; + /* + * Global function to click 'Confirm' button + */ + + const clickConfirm = () => getConfirmButton() && getConfirmButton().click(); + /* + * Global function to click 'Deny' button + */ + + const clickDeny = () => getDenyButton() && getDenyButton().click(); + /* + * Global function to click 'Cancel' button + */ + + const clickCancel = () => getCancelButton() && getCancelButton().click(); + + function fire(...args) { + const Swal = this; + return new Swal(...args); + } + + /** + * Returns an extended version of `Swal` containing `params` as defaults. + * Useful for reusing Swal configuration. + * + * For example: + * + * Before: + * const textPromptOptions = { input: 'text', showCancelButton: true } + * const {value: firstName} = await Swal.fire({ ...textPromptOptions, title: 'What is your first name?' }) + * const {value: lastName} = await Swal.fire({ ...textPromptOptions, title: 'What is your last name?' }) + * + * After: + * const TextPrompt = Swal.mixin({ input: 'text', showCancelButton: true }) + * const {value: firstName} = await TextPrompt('What is your first name?') + * const {value: lastName} = await TextPrompt('What is your last name?') + * + * @param mixinParams + */ + function mixin(mixinParams) { + class MixinSwal extends this { + _main(params, priorityMixinParams) { + return super._main(params, Object.assign({}, mixinParams, priorityMixinParams)); + } + + } + + return MixinSwal; + } + + /** + * Shows loader (spinner), this is useful with AJAX requests. + * By default the loader be shown instead of the "Confirm" button. + */ + + const showLoading = buttonToReplace => { + let popup = getPopup(); + + if (!popup) { + Swal.fire(); + } + + popup = getPopup(); + const loader = getLoader(); + + if (isToast()) { + hide(getIcon()); + } else { + replaceButton(popup, buttonToReplace); + } + + show(loader); + popup.setAttribute('data-loading', true); + popup.setAttribute('aria-busy', true); + popup.focus(); + }; + + const replaceButton = (popup, buttonToReplace) => { + const actions = getActions(); + const loader = getLoader(); + + if (!buttonToReplace && isVisible(getConfirmButton())) { + buttonToReplace = getConfirmButton(); + } + + show(actions); + + if (buttonToReplace) { + hide(buttonToReplace); + loader.setAttribute('data-button-to-replace', buttonToReplace.className); + } + + loader.parentNode.insertBefore(loader, buttonToReplace); + addClass([popup, actions], swalClasses.loading); + }; + + const RESTORE_FOCUS_TIMEOUT = 100; + + const globalState = {}; + + const focusPreviousActiveElement = () => { + if (globalState.previousActiveElement && globalState.previousActiveElement.focus) { + globalState.previousActiveElement.focus(); + globalState.previousActiveElement = null; + } else if (document.body) { + document.body.focus(); + } + }; // Restore previous active (focused) element + + + const restoreActiveElement = returnFocus => { + return new Promise(resolve => { + if (!returnFocus) { + return resolve(); + } + + const x = window.scrollX; + const y = window.scrollY; + globalState.restoreFocusTimeout = setTimeout(() => { + focusPreviousActiveElement(); + resolve(); + }, RESTORE_FOCUS_TIMEOUT); // issues/900 + + window.scrollTo(x, y); + }); + }; + + /** + * If `timer` parameter is set, returns number of milliseconds of timer remained. + * Otherwise, returns undefined. + */ + + const getTimerLeft = () => { + return globalState.timeout && globalState.timeout.getTimerLeft(); + }; + /** + * Stop timer. Returns number of milliseconds of timer remained. + * If `timer` parameter isn't set, returns undefined. + */ + + const stopTimer = () => { + if (globalState.timeout) { + stopTimerProgressBar(); + return globalState.timeout.stop(); + } + }; + /** + * Resume timer. Returns number of milliseconds of timer remained. + * If `timer` parameter isn't set, returns undefined. + */ + + const resumeTimer = () => { + if (globalState.timeout) { + const remaining = globalState.timeout.start(); + animateTimerProgressBar(remaining); + return remaining; + } + }; + /** + * Resume timer. Returns number of milliseconds of timer remained. + * If `timer` parameter isn't set, returns undefined. + */ + + const toggleTimer = () => { + const timer = globalState.timeout; + return timer && (timer.running ? stopTimer() : resumeTimer()); + }; + /** + * Increase timer. Returns number of milliseconds of an updated timer. + * If `timer` parameter isn't set, returns undefined. + */ + + const increaseTimer = n => { + if (globalState.timeout) { + const remaining = globalState.timeout.increase(n); + animateTimerProgressBar(remaining, true); + return remaining; + } + }; + /** + * Check if timer is running. Returns true if timer is running + * or false if timer is paused or stopped. + * If `timer` parameter isn't set, returns undefined + */ + + const isTimerRunning = () => { + return globalState.timeout && globalState.timeout.isRunning(); + }; + + let bodyClickListenerAdded = false; + const clickHandlers = {}; + function bindClickHandler(attr = 'data-swal-template') { + clickHandlers[attr] = this; + + if (!bodyClickListenerAdded) { + document.body.addEventListener('click', bodyClickListener); + bodyClickListenerAdded = true; + } + } + + const bodyClickListener = event => { + // TODO: replace with event.composedPath() + for (let el = event.target; el && el !== document; el = el.parentNode) { + for (const attr in clickHandlers) { + const template = el.getAttribute(attr); + + if (template) { + clickHandlers[attr].fire({ + template + }); + return; + } + } + } + }; + + const defaultParams = { + title: '', + titleText: '', + text: '', + html: '', + footer: '', + icon: undefined, + iconColor: undefined, + iconHtml: undefined, + template: undefined, + toast: false, + showClass: { + popup: 'swal2-show', + backdrop: 'swal2-backdrop-show', + icon: 'swal2-icon-show' + }, + hideClass: { + popup: 'swal2-hide', + backdrop: 'swal2-backdrop-hide', + icon: 'swal2-icon-hide' + }, + customClass: {}, + target: 'body', + backdrop: true, + heightAuto: true, + allowOutsideClick: true, + allowEscapeKey: true, + allowEnterKey: true, + stopKeydownPropagation: true, + keydownListenerCapture: false, + showConfirmButton: true, + showDenyButton: false, + showCancelButton: false, + preConfirm: undefined, + preDeny: undefined, + confirmButtonText: 'OK', + confirmButtonAriaLabel: '', + confirmButtonColor: undefined, + denyButtonText: 'No', + denyButtonAriaLabel: '', + denyButtonColor: undefined, + cancelButtonText: 'Cancel', + cancelButtonAriaLabel: '', + cancelButtonColor: undefined, + buttonsStyling: true, + reverseButtons: false, + focusConfirm: true, + focusDeny: false, + focusCancel: false, + returnFocus: true, + showCloseButton: false, + closeButtonHtml: '×', + closeButtonAriaLabel: 'Close this dialog', + loaderHtml: '', + showLoaderOnConfirm: false, + showLoaderOnDeny: false, + imageUrl: undefined, + imageWidth: undefined, + imageHeight: undefined, + imageAlt: '', + timer: undefined, + timerProgressBar: false, + width: undefined, + padding: undefined, + background: undefined, + input: undefined, + inputPlaceholder: '', + inputLabel: '', + inputValue: '', + inputOptions: {}, + inputAutoTrim: true, + inputAttributes: {}, + inputValidator: undefined, + returnInputValueOnDeny: false, + validationMessage: undefined, + grow: false, + position: 'center', + progressSteps: [], + currentProgressStep: undefined, + progressStepsDistance: undefined, + willOpen: undefined, + didOpen: undefined, + didRender: undefined, + willClose: undefined, + didClose: undefined, + didDestroy: undefined, + scrollbarPadding: true + }; + const updatableParams = ['allowEscapeKey', 'allowOutsideClick', 'background', 'buttonsStyling', 'cancelButtonAriaLabel', 'cancelButtonColor', 'cancelButtonText', 'closeButtonAriaLabel', 'closeButtonHtml', 'confirmButtonAriaLabel', 'confirmButtonColor', 'confirmButtonText', 'currentProgressStep', 'customClass', 'denyButtonAriaLabel', 'denyButtonColor', 'denyButtonText', 'didClose', 'didDestroy', 'footer', 'hideClass', 'html', 'icon', 'iconColor', 'iconHtml', 'imageAlt', 'imageHeight', 'imageUrl', 'imageWidth', 'preConfirm', 'preDeny', 'progressSteps', 'returnFocus', 'reverseButtons', 'showCancelButton', 'showCloseButton', 'showConfirmButton', 'showDenyButton', 'text', 'title', 'titleText', 'willClose']; + const deprecatedParams = {}; + const toastIncompatibleParams = ['allowOutsideClick', 'allowEnterKey', 'backdrop', 'focusConfirm', 'focusDeny', 'focusCancel', 'returnFocus', 'heightAuto', 'keydownListenerCapture']; + /** + * Is valid parameter + * @param {String} paramName + */ + + const isValidParameter = paramName => { + return Object.prototype.hasOwnProperty.call(defaultParams, paramName); + }; + /** + * Is valid parameter for Swal.update() method + * @param {String} paramName + */ + + const isUpdatableParameter = paramName => { + return updatableParams.indexOf(paramName) !== -1; + }; + /** + * Is deprecated parameter + * @param {String} paramName + */ + + const isDeprecatedParameter = paramName => { + return deprecatedParams[paramName]; + }; + + const checkIfParamIsValid = param => { + if (!isValidParameter(param)) { + warn("Unknown parameter \"".concat(param, "\"")); + } + }; + + const checkIfToastParamIsValid = param => { + if (toastIncompatibleParams.includes(param)) { + warn("The parameter \"".concat(param, "\" is incompatible with toasts")); + } + }; + + const checkIfParamIsDeprecated = param => { + if (isDeprecatedParameter(param)) { + warnAboutDeprecation(param, isDeprecatedParameter(param)); + } + }; + /** + * Show relevant warnings for given params + * + * @param params + */ + + + const showWarningsForParams = params => { + if (!params.backdrop && params.allowOutsideClick) { + warn('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`'); + } + + for (const param in params) { + checkIfParamIsValid(param); + + if (params.toast) { + checkIfToastParamIsValid(param); + } + + checkIfParamIsDeprecated(param); + } + }; + + + + var staticMethods = /*#__PURE__*/Object.freeze({ + isValidParameter: isValidParameter, + isUpdatableParameter: isUpdatableParameter, + isDeprecatedParameter: isDeprecatedParameter, + argsToParams: argsToParams, + isVisible: isVisible$1, + clickConfirm: clickConfirm, + clickDeny: clickDeny, + clickCancel: clickCancel, + getContainer: getContainer, + getPopup: getPopup, + getTitle: getTitle, + getHtmlContainer: getHtmlContainer, + getImage: getImage, + getIcon: getIcon, + getInputLabel: getInputLabel, + getCloseButton: getCloseButton, + getActions: getActions, + getConfirmButton: getConfirmButton, + getDenyButton: getDenyButton, + getCancelButton: getCancelButton, + getLoader: getLoader, + getFooter: getFooter, + getTimerProgressBar: getTimerProgressBar, + getFocusableElements: getFocusableElements, + getValidationMessage: getValidationMessage, + isLoading: isLoading, + fire: fire, + mixin: mixin, + showLoading: showLoading, + enableLoading: showLoading, + getTimerLeft: getTimerLeft, + stopTimer: stopTimer, + resumeTimer: resumeTimer, + toggleTimer: toggleTimer, + increaseTimer: increaseTimer, + isTimerRunning: isTimerRunning, + bindClickHandler: bindClickHandler + }); + + /** + * Hides loader and shows back the button which was hidden by .showLoading() + */ + + function hideLoading() { + // do nothing if popup is closed + const innerParams = privateProps.innerParams.get(this); + + if (!innerParams) { + return; + } + + const domCache = privateProps.domCache.get(this); + hide(domCache.loader); + + if (isToast()) { + if (innerParams.icon) { + show(getIcon()); + } + } else { + showRelatedButton(domCache); + } + + removeClass([domCache.popup, domCache.actions], swalClasses.loading); + domCache.popup.removeAttribute('aria-busy'); + domCache.popup.removeAttribute('data-loading'); + domCache.confirmButton.disabled = false; + domCache.denyButton.disabled = false; + domCache.cancelButton.disabled = false; + } + + const showRelatedButton = domCache => { + const buttonToReplace = domCache.popup.getElementsByClassName(domCache.loader.getAttribute('data-button-to-replace')); + + if (buttonToReplace.length) { + show(buttonToReplace[0], 'inline-block'); + } else if (allButtonsAreHidden()) { + hide(domCache.actions); + } + }; + + function getInput$1(instance) { + const innerParams = privateProps.innerParams.get(instance || this); + const domCache = privateProps.domCache.get(instance || this); + + if (!domCache) { + return null; + } + + return getInput(domCache.popup, innerParams.input); + } + + const fixScrollbar = () => { + // for queues, do not do this more than once + if (states.previousBodyPadding !== null) { + return; + } // if the body has overflow + + + if (document.body.scrollHeight > window.innerHeight) { + // add padding so the content doesn't shift after removal of scrollbar + states.previousBodyPadding = parseInt(window.getComputedStyle(document.body).getPropertyValue('padding-right')); + document.body.style.paddingRight = "".concat(states.previousBodyPadding + measureScrollbar(), "px"); + } + }; + const undoScrollbar = () => { + if (states.previousBodyPadding !== null) { + document.body.style.paddingRight = "".concat(states.previousBodyPadding, "px"); + states.previousBodyPadding = null; + } + }; + + /* istanbul ignore file */ + + const iOSfix = () => { + const iOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream || navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1; + + if (iOS && !hasClass(document.body, swalClasses.iosfix)) { + const offset = document.body.scrollTop; + document.body.style.top = "".concat(offset * -1, "px"); + addClass(document.body, swalClasses.iosfix); + lockBodyScroll(); + addBottomPaddingForTallPopups(); // #1948 + } + }; + + const addBottomPaddingForTallPopups = () => { + const safari = !navigator.userAgent.match(/(CriOS|FxiOS|EdgiOS|YaBrowser|UCBrowser)/i); + + if (safari) { + const bottomPanelHeight = 44; + + if (getPopup().scrollHeight > window.innerHeight - bottomPanelHeight) { + getContainer().style.paddingBottom = "".concat(bottomPanelHeight, "px"); + } + } + }; + + const lockBodyScroll = () => { + // #1246 + const container = getContainer(); + let preventTouchMove; + + container.ontouchstart = e => { + preventTouchMove = shouldPreventTouchMove(e); + }; + + container.ontouchmove = e => { + if (preventTouchMove) { + e.preventDefault(); + e.stopPropagation(); + } + }; + }; + + const shouldPreventTouchMove = event => { + const target = event.target; + const container = getContainer(); + + if (isStylys(event) || isZoom(event)) { + return false; + } + + if (target === container) { + return true; + } + + if (!isScrollable(container) && target.tagName !== 'INPUT' && // #1603 + target.tagName !== 'TEXTAREA' && // #2266 + !(isScrollable(getHtmlContainer()) && // #1944 + getHtmlContainer().contains(target))) { + return true; + } + + return false; + }; + + const isStylys = event => { + // #1786 + return event.touches && event.touches.length && event.touches[0].touchType === 'stylus'; + }; + + const isZoom = event => { + // #1891 + return event.touches && event.touches.length > 1; + }; + + const undoIOSfix = () => { + if (hasClass(document.body, swalClasses.iosfix)) { + const offset = parseInt(document.body.style.top, 10); + removeClass(document.body, swalClasses.iosfix); + document.body.style.top = ''; + document.body.scrollTop = offset * -1; + } + }; + + // Adding aria-hidden="true" to elements outside of the active modal dialog ensures that + // elements not within the active modal dialog will not be surfaced if a user opens a screen + // reader’s list of elements (headings, form controls, landmarks, etc.) in the document. + + const setAriaHidden = () => { + const bodyChildren = toArray(document.body.children); + bodyChildren.forEach(el => { + if (el === getContainer() || el.contains(getContainer())) { + return; + } + + if (el.hasAttribute('aria-hidden')) { + el.setAttribute('data-previous-aria-hidden', el.getAttribute('aria-hidden')); + } + + el.setAttribute('aria-hidden', 'true'); + }); + }; + const unsetAriaHidden = () => { + const bodyChildren = toArray(document.body.children); + bodyChildren.forEach(el => { + if (el.hasAttribute('data-previous-aria-hidden')) { + el.setAttribute('aria-hidden', el.getAttribute('data-previous-aria-hidden')); + el.removeAttribute('data-previous-aria-hidden'); + } else { + el.removeAttribute('aria-hidden'); + } + }); + }; + + /** + * This module containts `WeakMap`s for each effectively-"private property" that a `Swal` has. + * For example, to set the private property "foo" of `this` to "bar", you can `privateProps.foo.set(this, 'bar')` + * This is the approach that Babel will probably take to implement private methods/fields + * https://github.com/tc39/proposal-private-methods + * https://github.com/babel/babel/pull/7555 + * Once we have the changes from that PR in Babel, and our core class fits reasonable in *one module* + * then we can use that language feature. + */ + var privateMethods = { + swalPromiseResolve: new WeakMap() + }; + + /* + * Instance method to close sweetAlert + */ + + function removePopupAndResetState(instance, container, returnFocus, didClose) { + if (isToast()) { + triggerDidCloseAndDispose(instance, didClose); + } else { + restoreActiveElement(returnFocus).then(() => triggerDidCloseAndDispose(instance, didClose)); + globalState.keydownTarget.removeEventListener('keydown', globalState.keydownHandler, { + capture: globalState.keydownListenerCapture + }); + globalState.keydownHandlerAdded = false; + } + + const isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent); // workaround for #2088 + // for some reason removing the container in Safari will scroll the document to bottom + + if (isSafari) { + container.setAttribute('style', 'display:none !important'); + container.removeAttribute('class'); + container.innerHTML = ''; + } else { + container.remove(); + } + + if (isModal()) { + undoScrollbar(); + undoIOSfix(); + unsetAriaHidden(); + } + + removeBodyClasses(); + } + + function removeBodyClasses() { + removeClass([document.documentElement, document.body], [swalClasses.shown, swalClasses['height-auto'], swalClasses['no-backdrop'], swalClasses['toast-shown']]); + } + + function close(resolveValue) { + const popup = getPopup(); + + if (!popup) { + return; + } + + resolveValue = prepareResolveValue(resolveValue); + const innerParams = privateProps.innerParams.get(this); + + if (!innerParams || hasClass(popup, innerParams.hideClass.popup)) { + return; + } + + const swalPromiseResolve = privateMethods.swalPromiseResolve.get(this); + removeClass(popup, innerParams.showClass.popup); + addClass(popup, innerParams.hideClass.popup); + const backdrop = getContainer(); + removeClass(backdrop, innerParams.showClass.backdrop); + addClass(backdrop, innerParams.hideClass.backdrop); + handlePopupAnimation(this, popup, innerParams); // Resolve Swal promise + + swalPromiseResolve(resolveValue); + } + + const prepareResolveValue = resolveValue => { + // When user calls Swal.close() + if (typeof resolveValue === 'undefined') { + return { + isConfirmed: false, + isDenied: false, + isDismissed: true + }; + } + + return Object.assign({ + isConfirmed: false, + isDenied: false, + isDismissed: false + }, resolveValue); + }; + + const handlePopupAnimation = (instance, popup, innerParams) => { + const container = getContainer(); // If animation is supported, animate + + const animationIsSupported = animationEndEvent && hasCssAnimation(popup); + + if (typeof innerParams.willClose === 'function') { + innerParams.willClose(popup); + } + + if (animationIsSupported) { + animatePopup(instance, popup, container, innerParams.returnFocus, innerParams.didClose); + } else { + // Otherwise, remove immediately + removePopupAndResetState(instance, container, innerParams.returnFocus, innerParams.didClose); + } + }; + + const animatePopup = (instance, popup, container, returnFocus, didClose) => { + globalState.swalCloseEventFinishedCallback = removePopupAndResetState.bind(null, instance, container, returnFocus, didClose); + popup.addEventListener(animationEndEvent, function (e) { + if (e.target === popup) { + globalState.swalCloseEventFinishedCallback(); + delete globalState.swalCloseEventFinishedCallback; + } + }); + }; + + const triggerDidCloseAndDispose = (instance, didClose) => { + setTimeout(() => { + if (typeof didClose === 'function') { + didClose.bind(instance.params)(); + } + + instance._destroy(); + }); + }; + + function setButtonsDisabled(instance, buttons, disabled) { + const domCache = privateProps.domCache.get(instance); + buttons.forEach(button => { + domCache[button].disabled = disabled; + }); + } + + function setInputDisabled(input, disabled) { + if (!input) { + return false; + } + + if (input.type === 'radio') { + const radiosContainer = input.parentNode.parentNode; + const radios = radiosContainer.querySelectorAll('input'); + + for (let i = 0; i < radios.length; i++) { + radios[i].disabled = disabled; + } + } else { + input.disabled = disabled; + } + } + + function enableButtons() { + setButtonsDisabled(this, ['confirmButton', 'denyButton', 'cancelButton'], false); + } + function disableButtons() { + setButtonsDisabled(this, ['confirmButton', 'denyButton', 'cancelButton'], true); + } + function enableInput() { + return setInputDisabled(this.getInput(), false); + } + function disableInput() { + return setInputDisabled(this.getInput(), true); + } + + function showValidationMessage(error) { + const domCache = privateProps.domCache.get(this); + const params = privateProps.innerParams.get(this); + setInnerHtml(domCache.validationMessage, error); + domCache.validationMessage.className = swalClasses['validation-message']; + + if (params.customClass && params.customClass.validationMessage) { + addClass(domCache.validationMessage, params.customClass.validationMessage); + } + + show(domCache.validationMessage); + const input = this.getInput(); + + if (input) { + input.setAttribute('aria-invalid', true); + input.setAttribute('aria-describedby', swalClasses['validation-message']); + focusInput(input); + addClass(input, swalClasses.inputerror); + } + } // Hide block with validation message + + function resetValidationMessage$1() { + const domCache = privateProps.domCache.get(this); + + if (domCache.validationMessage) { + hide(domCache.validationMessage); + } + + const input = this.getInput(); + + if (input) { + input.removeAttribute('aria-invalid'); + input.removeAttribute('aria-describedby'); + removeClass(input, swalClasses.inputerror); + } + } + + function getProgressSteps$1() { + const domCache = privateProps.domCache.get(this); + return domCache.progressSteps; + } + + class Timer { + constructor(callback, delay) { + this.callback = callback; + this.remaining = delay; + this.running = false; + this.start(); + } + + start() { + if (!this.running) { + this.running = true; + this.started = new Date(); + this.id = setTimeout(this.callback, this.remaining); + } + + return this.remaining; + } + + stop() { + if (this.running) { + this.running = false; + clearTimeout(this.id); + this.remaining -= new Date() - this.started; + } + + return this.remaining; + } + + increase(n) { + const running = this.running; + + if (running) { + this.stop(); + } + + this.remaining += n; + + if (running) { + this.start(); + } + + return this.remaining; + } + + getTimerLeft() { + if (this.running) { + this.stop(); + this.start(); + } + + return this.remaining; + } + + isRunning() { + return this.running; + } + + } + + var defaultInputValidators = { + email: (string, validationMessage) => { + return /^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]{2,24}$/.test(string) ? Promise.resolve() : Promise.resolve(validationMessage || 'Invalid email address'); + }, + url: (string, validationMessage) => { + // taken from https://stackoverflow.com/a/3809435 with a small change from #1306 and #2013 + return /^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(string) ? Promise.resolve() : Promise.resolve(validationMessage || 'Invalid URL'); + } + }; + + function setDefaultInputValidators(params) { + // Use default `inputValidator` for supported input types if not provided + if (!params.inputValidator) { + Object.keys(defaultInputValidators).forEach(key => { + if (params.input === key) { + params.inputValidator = defaultInputValidators[key]; + } + }); + } + } + + function validateCustomTargetElement(params) { + // Determine if the custom target element is valid + if (!params.target || typeof params.target === 'string' && !document.querySelector(params.target) || typeof params.target !== 'string' && !params.target.appendChild) { + warn('Target parameter is not valid, defaulting to "body"'); + params.target = 'body'; + } + } + /** + * Set type, text and actions on popup + * + * @param params + * @returns {boolean} + */ + + + function setParameters(params) { + setDefaultInputValidators(params); // showLoaderOnConfirm && preConfirm + + if (params.showLoaderOnConfirm && !params.preConfirm) { + warn('showLoaderOnConfirm is set to true, but preConfirm is not defined.\n' + 'showLoaderOnConfirm should be used together with preConfirm, see usage example:\n' + 'https://sweetalert2.github.io/#ajax-request'); + } + + validateCustomTargetElement(params); // Replace newlines with
                                                in title + + if (typeof params.title === 'string') { + params.title = params.title.split('\n').join('
                                                '); + } + + init(params); + } + + const swalStringParams = ['swal-title', 'swal-html', 'swal-footer']; + const getTemplateParams = params => { + const template = typeof params.template === 'string' ? document.querySelector(params.template) : params.template; + + if (!template) { + return {}; + } + + const templateContent = template.content; + showWarningsForElements(templateContent); + const result = Object.assign(getSwalParams(templateContent), getSwalButtons(templateContent), getSwalImage(templateContent), getSwalIcon(templateContent), getSwalInput(templateContent), getSwalStringParams(templateContent, swalStringParams)); + return result; + }; + + const getSwalParams = templateContent => { + const result = {}; + toArray(templateContent.querySelectorAll('swal-param')).forEach(param => { + showWarningsForAttributes(param, ['name', 'value']); + const paramName = param.getAttribute('name'); + let value = param.getAttribute('value'); + + if (typeof defaultParams[paramName] === 'boolean' && value === 'false') { + value = false; + } + + if (typeof defaultParams[paramName] === 'object') { + value = JSON.parse(value); + } + + result[paramName] = value; + }); + return result; + }; + + const getSwalButtons = templateContent => { + const result = {}; + toArray(templateContent.querySelectorAll('swal-button')).forEach(button => { + showWarningsForAttributes(button, ['type', 'color', 'aria-label']); + const type = button.getAttribute('type'); + result["".concat(type, "ButtonText")] = button.innerHTML; + result["show".concat(capitalizeFirstLetter(type), "Button")] = true; + + if (button.hasAttribute('color')) { + result["".concat(type, "ButtonColor")] = button.getAttribute('color'); + } + + if (button.hasAttribute('aria-label')) { + result["".concat(type, "ButtonAriaLabel")] = button.getAttribute('aria-label'); + } + }); + return result; + }; + + const getSwalImage = templateContent => { + const result = {}; + const image = templateContent.querySelector('swal-image'); + + if (image) { + showWarningsForAttributes(image, ['src', 'width', 'height', 'alt']); + + if (image.hasAttribute('src')) { + result.imageUrl = image.getAttribute('src'); + } + + if (image.hasAttribute('width')) { + result.imageWidth = image.getAttribute('width'); + } + + if (image.hasAttribute('height')) { + result.imageHeight = image.getAttribute('height'); + } + + if (image.hasAttribute('alt')) { + result.imageAlt = image.getAttribute('alt'); + } + } + + return result; + }; + + const getSwalIcon = templateContent => { + const result = {}; + const icon = templateContent.querySelector('swal-icon'); + + if (icon) { + showWarningsForAttributes(icon, ['type', 'color']); + + if (icon.hasAttribute('type')) { + result.icon = icon.getAttribute('type'); + } + + if (icon.hasAttribute('color')) { + result.iconColor = icon.getAttribute('color'); + } + + result.iconHtml = icon.innerHTML; + } + + return result; + }; + + const getSwalInput = templateContent => { + const result = {}; + const input = templateContent.querySelector('swal-input'); + + if (input) { + showWarningsForAttributes(input, ['type', 'label', 'placeholder', 'value']); + result.input = input.getAttribute('type') || 'text'; + + if (input.hasAttribute('label')) { + result.inputLabel = input.getAttribute('label'); + } + + if (input.hasAttribute('placeholder')) { + result.inputPlaceholder = input.getAttribute('placeholder'); + } + + if (input.hasAttribute('value')) { + result.inputValue = input.getAttribute('value'); + } + } + + const inputOptions = templateContent.querySelectorAll('swal-input-option'); + + if (inputOptions.length) { + result.inputOptions = {}; + toArray(inputOptions).forEach(option => { + showWarningsForAttributes(option, ['value']); + const optionValue = option.getAttribute('value'); + const optionName = option.innerHTML; + result.inputOptions[optionValue] = optionName; + }); + } + + return result; + }; + + const getSwalStringParams = (templateContent, paramNames) => { + const result = {}; + + for (const i in paramNames) { + const paramName = paramNames[i]; + const tag = templateContent.querySelector(paramName); + + if (tag) { + showWarningsForAttributes(tag, []); + result[paramName.replace(/^swal-/, '')] = tag.innerHTML.trim(); + } + } + + return result; + }; + + const showWarningsForElements = template => { + const allowedElements = swalStringParams.concat(['swal-param', 'swal-button', 'swal-image', 'swal-icon', 'swal-input', 'swal-input-option']); + toArray(template.children).forEach(el => { + const tagName = el.tagName.toLowerCase(); + + if (allowedElements.indexOf(tagName) === -1) { + warn("Unrecognized element <".concat(tagName, ">")); + } + }); + }; + + const showWarningsForAttributes = (el, allowedAttributes) => { + toArray(el.attributes).forEach(attribute => { + if (allowedAttributes.indexOf(attribute.name) === -1) { + warn(["Unrecognized attribute \"".concat(attribute.name, "\" on <").concat(el.tagName.toLowerCase(), ">."), "".concat(allowedAttributes.length ? "Allowed attributes are: ".concat(allowedAttributes.join(', ')) : 'To set the value, use HTML within the element.')]); + } + }); + }; + + const SHOW_CLASS_TIMEOUT = 10; + /** + * Open popup, add necessary classes and styles, fix scrollbar + * + * @param params + */ + + const openPopup = params => { + const container = getContainer(); + const popup = getPopup(); + + if (typeof params.willOpen === 'function') { + params.willOpen(popup); + } + + const bodyStyles = window.getComputedStyle(document.body); + const initialBodyOverflow = bodyStyles.overflowY; + addClasses$1(container, popup, params); // scrolling is 'hidden' until animation is done, after that 'auto' + + setTimeout(() => { + setScrollingVisibility(container, popup); + }, SHOW_CLASS_TIMEOUT); + + if (isModal()) { + fixScrollContainer(container, params.scrollbarPadding, initialBodyOverflow); + setAriaHidden(); + } + + if (!isToast() && !globalState.previousActiveElement) { + globalState.previousActiveElement = document.activeElement; + } + + if (typeof params.didOpen === 'function') { + setTimeout(() => params.didOpen(popup)); + } + + removeClass(container, swalClasses['no-transition']); + }; + + const swalOpenAnimationFinished = event => { + const popup = getPopup(); + + if (event.target !== popup) { + return; + } + + const container = getContainer(); + popup.removeEventListener(animationEndEvent, swalOpenAnimationFinished); + container.style.overflowY = 'auto'; + }; + + const setScrollingVisibility = (container, popup) => { + if (animationEndEvent && hasCssAnimation(popup)) { + container.style.overflowY = 'hidden'; + popup.addEventListener(animationEndEvent, swalOpenAnimationFinished); + } else { + container.style.overflowY = 'auto'; + } + }; + + const fixScrollContainer = (container, scrollbarPadding, initialBodyOverflow) => { + iOSfix(); + + if (scrollbarPadding && initialBodyOverflow !== 'hidden') { + fixScrollbar(); + } // sweetalert2/issues/1247 + + + setTimeout(() => { + container.scrollTop = 0; + }); + }; + + const addClasses$1 = (container, popup, params) => { + addClass(container, params.showClass.backdrop); // the workaround with setting/unsetting opacity is needed for #2019 and 2059 + + popup.style.setProperty('opacity', '0', 'important'); + show(popup, 'grid'); + setTimeout(() => { + // Animate popup right after showing it + addClass(popup, params.showClass.popup); // and remove the opacity workaround + + popup.style.removeProperty('opacity'); + }, SHOW_CLASS_TIMEOUT); // 10ms in order to fix #2062 + + addClass([document.documentElement, document.body], swalClasses.shown); + + if (params.heightAuto && params.backdrop && !params.toast) { + addClass([document.documentElement, document.body], swalClasses['height-auto']); + } + }; + + const handleInputOptionsAndValue = (instance, params) => { + if (params.input === 'select' || params.input === 'radio') { + handleInputOptions(instance, params); + } else if (['text', 'email', 'number', 'tel', 'textarea'].includes(params.input) && (hasToPromiseFn(params.inputValue) || isPromise(params.inputValue))) { + showLoading(getConfirmButton()); + handleInputValue(instance, params); + } + }; + const getInputValue = (instance, innerParams) => { + const input = instance.getInput(); + + if (!input) { + return null; + } + + switch (innerParams.input) { + case 'checkbox': + return getCheckboxValue(input); + + case 'radio': + return getRadioValue(input); + + case 'file': + return getFileValue(input); + + default: + return innerParams.inputAutoTrim ? input.value.trim() : input.value; + } + }; + + const getCheckboxValue = input => input.checked ? 1 : 0; + + const getRadioValue = input => input.checked ? input.value : null; + + const getFileValue = input => input.files.length ? input.getAttribute('multiple') !== null ? input.files : input.files[0] : null; + + const handleInputOptions = (instance, params) => { + const popup = getPopup(); + + const processInputOptions = inputOptions => populateInputOptions[params.input](popup, formatInputOptions(inputOptions), params); + + if (hasToPromiseFn(params.inputOptions) || isPromise(params.inputOptions)) { + showLoading(getConfirmButton()); + asPromise(params.inputOptions).then(inputOptions => { + instance.hideLoading(); + processInputOptions(inputOptions); + }); + } else if (typeof params.inputOptions === 'object') { + processInputOptions(params.inputOptions); + } else { + error("Unexpected type of inputOptions! Expected object, Map or Promise, got ".concat(typeof params.inputOptions)); + } + }; + + const handleInputValue = (instance, params) => { + const input = instance.getInput(); + hide(input); + asPromise(params.inputValue).then(inputValue => { + input.value = params.input === 'number' ? parseFloat(inputValue) || 0 : "".concat(inputValue); + show(input); + input.focus(); + instance.hideLoading(); + }).catch(err => { + error("Error in inputValue promise: ".concat(err)); + input.value = ''; + show(input); + input.focus(); + instance.hideLoading(); + }); + }; + + const populateInputOptions = { + select: (popup, inputOptions, params) => { + const select = getChildByClass(popup, swalClasses.select); + + const renderOption = (parent, optionLabel, optionValue) => { + const option = document.createElement('option'); + option.value = optionValue; + setInnerHtml(option, optionLabel); + option.selected = isSelected(optionValue, params.inputValue); + parent.appendChild(option); + }; + + inputOptions.forEach(inputOption => { + const optionValue = inputOption[0]; + const optionLabel = inputOption[1]; // spec: + // https://www.w3.org/TR/html401/interact/forms.html#h-17.6 + // "...all OPTGROUP elements must be specified directly within a SELECT element (i.e., groups may not be nested)..." + // check whether this is a + + if (Array.isArray(optionLabel)) { + // if it is an array, then it is an + const optgroup = document.createElement('optgroup'); + optgroup.label = optionValue; + optgroup.disabled = false; // not configurable for now + + select.appendChild(optgroup); + optionLabel.forEach(o => renderOption(optgroup, o[1], o[0])); + } else { + // case of + valueFormatted = formatInputOptions(valueFormatted); + } + + result.push([key, valueFormatted]); + }); + } else { + Object.keys(inputOptions).forEach(key => { + let valueFormatted = inputOptions[key]; + + if (typeof valueFormatted === 'object') { + // case of + valueFormatted = formatInputOptions(valueFormatted); + } + + result.push([key, valueFormatted]); + }); + } + + return result; + }; + + const isSelected = (optionValue, inputValue) => { + return inputValue && inputValue.toString() === optionValue.toString(); + }; + + const handleConfirmButtonClick = instance => { + const innerParams = privateProps.innerParams.get(instance); + instance.disableButtons(); + + if (innerParams.input) { + handleConfirmOrDenyWithInput(instance, 'confirm'); + } else { + confirm(instance, true); + } + }; + const handleDenyButtonClick = instance => { + const innerParams = privateProps.innerParams.get(instance); + instance.disableButtons(); + + if (innerParams.returnInputValueOnDeny) { + handleConfirmOrDenyWithInput(instance, 'deny'); + } else { + deny(instance, false); + } + }; + const handleCancelButtonClick = (instance, dismissWith) => { + instance.disableButtons(); + dismissWith(DismissReason.cancel); + }; + + const handleConfirmOrDenyWithInput = (instance, type + /* 'confirm' | 'deny' */ + ) => { + const innerParams = privateProps.innerParams.get(instance); + const inputValue = getInputValue(instance, innerParams); + + if (innerParams.inputValidator) { + handleInputValidator(instance, inputValue, type); + } else if (!instance.getInput().checkValidity()) { + instance.enableButtons(); + instance.showValidationMessage(innerParams.validationMessage); + } else if (type === 'deny') { + deny(instance, inputValue); + } else { + confirm(instance, inputValue); + } + }; + + const handleInputValidator = (instance, inputValue, type + /* 'confirm' | 'deny' */ + ) => { + const innerParams = privateProps.innerParams.get(instance); + instance.disableInput(); + const validationPromise = Promise.resolve().then(() => asPromise(innerParams.inputValidator(inputValue, innerParams.validationMessage))); + validationPromise.then(validationMessage => { + instance.enableButtons(); + instance.enableInput(); + + if (validationMessage) { + instance.showValidationMessage(validationMessage); + } else if (type === 'deny') { + deny(instance, inputValue); + } else { + confirm(instance, inputValue); + } + }); + }; + + const deny = (instance, value) => { + const innerParams = privateProps.innerParams.get(instance || undefined); + + if (innerParams.showLoaderOnDeny) { + showLoading(getDenyButton()); + } + + if (innerParams.preDeny) { + const preDenyPromise = Promise.resolve().then(() => asPromise(innerParams.preDeny(value, innerParams.validationMessage))); + preDenyPromise.then(preDenyValue => { + if (preDenyValue === false) { + instance.hideLoading(); + } else { + instance.closePopup({ + isDenied: true, + value: typeof preDenyValue === 'undefined' ? value : preDenyValue + }); + } + }); + } else { + instance.closePopup({ + isDenied: true, + value + }); + } + }; + + const succeedWith = (instance, value) => { + instance.closePopup({ + isConfirmed: true, + value + }); + }; + + const confirm = (instance, value) => { + const innerParams = privateProps.innerParams.get(instance || undefined); + + if (innerParams.showLoaderOnConfirm) { + showLoading(); // TODO: make showLoading an *instance* method + } + + if (innerParams.preConfirm) { + instance.resetValidationMessage(); + const preConfirmPromise = Promise.resolve().then(() => asPromise(innerParams.preConfirm(value, innerParams.validationMessage))); + preConfirmPromise.then(preConfirmValue => { + if (isVisible(getValidationMessage()) || preConfirmValue === false) { + instance.hideLoading(); + } else { + succeedWith(instance, typeof preConfirmValue === 'undefined' ? value : preConfirmValue); + } + }); + } else { + succeedWith(instance, value); + } + }; + + const addKeydownHandler = (instance, globalState, innerParams, dismissWith) => { + if (globalState.keydownTarget && globalState.keydownHandlerAdded) { + globalState.keydownTarget.removeEventListener('keydown', globalState.keydownHandler, { + capture: globalState.keydownListenerCapture + }); + globalState.keydownHandlerAdded = false; + } + + if (!innerParams.toast) { + globalState.keydownHandler = e => keydownHandler(instance, e, dismissWith); + + globalState.keydownTarget = innerParams.keydownListenerCapture ? window : getPopup(); + globalState.keydownListenerCapture = innerParams.keydownListenerCapture; + globalState.keydownTarget.addEventListener('keydown', globalState.keydownHandler, { + capture: globalState.keydownListenerCapture + }); + globalState.keydownHandlerAdded = true; + } + }; // Focus handling + + const setFocus = (innerParams, index, increment) => { + const focusableElements = getFocusableElements(); // search for visible elements and select the next possible match + + if (focusableElements.length) { + index = index + increment; // rollover to first item + + if (index === focusableElements.length) { + index = 0; // go to last item + } else if (index === -1) { + index = focusableElements.length - 1; + } + + return focusableElements[index].focus(); + } // no visible focusable elements, focus the popup + + + getPopup().focus(); + }; + const arrowKeysNextButton = ['ArrowRight', 'ArrowDown']; + const arrowKeysPreviousButton = ['ArrowLeft', 'ArrowUp']; + + const keydownHandler = (instance, e, dismissWith) => { + const innerParams = privateProps.innerParams.get(instance); + + if (!innerParams) { + return; // This instance has already been destroyed + } + + if (innerParams.stopKeydownPropagation) { + e.stopPropagation(); + } // ENTER + + + if (e.key === 'Enter') { + handleEnter(instance, e, innerParams); // TAB + } else if (e.key === 'Tab') { + handleTab(e, innerParams); // ARROWS - switch focus between buttons + } else if ([...arrowKeysNextButton, ...arrowKeysPreviousButton].includes(e.key)) { + handleArrows(e.key); // ESC + } else if (e.key === 'Escape') { + handleEsc(e, innerParams, dismissWith); + } + }; + + const handleEnter = (instance, e, innerParams) => { + // #720 #721 + if (e.isComposing) { + return; + } + + if (e.target && instance.getInput() && e.target.outerHTML === instance.getInput().outerHTML) { + if (['textarea', 'file'].includes(innerParams.input)) { + return; // do not submit + } + + clickConfirm(); + e.preventDefault(); + } + }; + + const handleTab = (e, innerParams) => { + const targetElement = e.target; + const focusableElements = getFocusableElements(); + let btnIndex = -1; + + for (let i = 0; i < focusableElements.length; i++) { + if (targetElement === focusableElements[i]) { + btnIndex = i; + break; + } + } + + if (!e.shiftKey) { + // Cycle to the next button + setFocus(innerParams, btnIndex, 1); + } else { + // Cycle to the prev button + setFocus(innerParams, btnIndex, -1); + } + + e.stopPropagation(); + e.preventDefault(); + }; + + const handleArrows = key => { + const confirmButton = getConfirmButton(); + const denyButton = getDenyButton(); + const cancelButton = getCancelButton(); + + if (![confirmButton, denyButton, cancelButton].includes(document.activeElement)) { + return; + } + + const sibling = arrowKeysNextButton.includes(key) ? 'nextElementSibling' : 'previousElementSibling'; + const buttonToFocus = document.activeElement[sibling]; + + if (buttonToFocus) { + buttonToFocus.focus(); + } + }; + + const handleEsc = (e, innerParams, dismissWith) => { + if (callIfFunction(innerParams.allowEscapeKey)) { + e.preventDefault(); + dismissWith(DismissReason.esc); + } + }; + + const handlePopupClick = (instance, domCache, dismissWith) => { + const innerParams = privateProps.innerParams.get(instance); + + if (innerParams.toast) { + handleToastClick(instance, domCache, dismissWith); + } else { + // Ignore click events that had mousedown on the popup but mouseup on the container + // This can happen when the user drags a slider + handleModalMousedown(domCache); // Ignore click events that had mousedown on the container but mouseup on the popup + + handleContainerMousedown(domCache); + handleModalClick(instance, domCache, dismissWith); + } + }; + + const handleToastClick = (instance, domCache, dismissWith) => { + // Closing toast by internal click + domCache.popup.onclick = () => { + const innerParams = privateProps.innerParams.get(instance); + + if (innerParams.showConfirmButton || innerParams.showDenyButton || innerParams.showCancelButton || innerParams.showCloseButton || innerParams.timer || innerParams.input) { + return; + } + + dismissWith(DismissReason.close); + }; + }; + + let ignoreOutsideClick = false; + + const handleModalMousedown = domCache => { + domCache.popup.onmousedown = () => { + domCache.container.onmouseup = function (e) { + domCache.container.onmouseup = undefined; // We only check if the mouseup target is the container because usually it doesn't + // have any other direct children aside of the popup + + if (e.target === domCache.container) { + ignoreOutsideClick = true; + } + }; + }; + }; + + const handleContainerMousedown = domCache => { + domCache.container.onmousedown = () => { + domCache.popup.onmouseup = function (e) { + domCache.popup.onmouseup = undefined; // We also need to check if the mouseup target is a child of the popup + + if (e.target === domCache.popup || domCache.popup.contains(e.target)) { + ignoreOutsideClick = true; + } + }; + }; + }; + + const handleModalClick = (instance, domCache, dismissWith) => { + domCache.container.onclick = e => { + const innerParams = privateProps.innerParams.get(instance); + + if (ignoreOutsideClick) { + ignoreOutsideClick = false; + return; + } + + if (e.target === domCache.container && callIfFunction(innerParams.allowOutsideClick)) { + dismissWith(DismissReason.backdrop); + } + }; + }; + + function _main(userParams, mixinParams = {}) { + showWarningsForParams(Object.assign({}, mixinParams, userParams)); + + if (globalState.currentInstance) { + globalState.currentInstance._destroy(); + + if (isModal()) { + unsetAriaHidden(); + } + } + + globalState.currentInstance = this; + const innerParams = prepareParams(userParams, mixinParams); + setParameters(innerParams); + Object.freeze(innerParams); // clear the previous timer + + if (globalState.timeout) { + globalState.timeout.stop(); + delete globalState.timeout; + } // clear the restore focus timeout + + + clearTimeout(globalState.restoreFocusTimeout); + const domCache = populateDomCache(this); + render(this, innerParams); + privateProps.innerParams.set(this, innerParams); + return swalPromise(this, domCache, innerParams); + } + + const prepareParams = (userParams, mixinParams) => { + const templateParams = getTemplateParams(userParams); + const params = Object.assign({}, defaultParams, mixinParams, templateParams, userParams); // precedence is described in #2131 + + params.showClass = Object.assign({}, defaultParams.showClass, params.showClass); + params.hideClass = Object.assign({}, defaultParams.hideClass, params.hideClass); + return params; + }; + + const swalPromise = (instance, domCache, innerParams) => { + return new Promise(resolve => { + // functions to handle all closings/dismissals + const dismissWith = dismiss => { + instance.closePopup({ + isDismissed: true, + dismiss + }); + }; + + privateMethods.swalPromiseResolve.set(instance, resolve); + + domCache.confirmButton.onclick = () => handleConfirmButtonClick(instance); + + domCache.denyButton.onclick = () => handleDenyButtonClick(instance); + + domCache.cancelButton.onclick = () => handleCancelButtonClick(instance, dismissWith); + + domCache.closeButton.onclick = () => dismissWith(DismissReason.close); + + handlePopupClick(instance, domCache, dismissWith); + addKeydownHandler(instance, globalState, innerParams, dismissWith); + handleInputOptionsAndValue(instance, innerParams); + openPopup(innerParams); + setupTimer(globalState, innerParams, dismissWith); + initFocus(domCache, innerParams); // Scroll container to top on open (#1247, #1946) + + setTimeout(() => { + domCache.container.scrollTop = 0; + }); + }); + }; + + const populateDomCache = instance => { + const domCache = { + popup: getPopup(), + container: getContainer(), + actions: getActions(), + confirmButton: getConfirmButton(), + denyButton: getDenyButton(), + cancelButton: getCancelButton(), + loader: getLoader(), + closeButton: getCloseButton(), + validationMessage: getValidationMessage(), + progressSteps: getProgressSteps() + }; + privateProps.domCache.set(instance, domCache); + return domCache; + }; + + const setupTimer = (globalState$$1, innerParams, dismissWith) => { + const timerProgressBar = getTimerProgressBar(); + hide(timerProgressBar); + + if (innerParams.timer) { + globalState$$1.timeout = new Timer(() => { + dismissWith('timer'); + delete globalState$$1.timeout; + }, innerParams.timer); + + if (innerParams.timerProgressBar) { + show(timerProgressBar); + setTimeout(() => { + if (globalState$$1.timeout && globalState$$1.timeout.running) { + // timer can be already stopped or unset at this point + animateTimerProgressBar(innerParams.timer); + } + }); + } + } + }; + + const initFocus = (domCache, innerParams) => { + if (innerParams.toast) { + return; + } + + if (!callIfFunction(innerParams.allowEnterKey)) { + return blurActiveElement(); + } + + if (!focusButton(domCache, innerParams)) { + setFocus(innerParams, -1, 1); + } + }; + + const focusButton = (domCache, innerParams) => { + if (innerParams.focusDeny && isVisible(domCache.denyButton)) { + domCache.denyButton.focus(); + return true; + } + + if (innerParams.focusCancel && isVisible(domCache.cancelButton)) { + domCache.cancelButton.focus(); + return true; + } + + if (innerParams.focusConfirm && isVisible(domCache.confirmButton)) { + domCache.confirmButton.focus(); + return true; + } + + return false; + }; + + const blurActiveElement = () => { + if (document.activeElement && typeof document.activeElement.blur === 'function') { + document.activeElement.blur(); + } + }; + + /** + * Updates popup parameters. + */ + + function update(params) { + const popup = getPopup(); + const innerParams = privateProps.innerParams.get(this); + + if (!popup || hasClass(popup, innerParams.hideClass.popup)) { + return warn("You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup."); + } + + const validUpdatableParams = {}; // assign valid params from `params` to `defaults` + + Object.keys(params).forEach(param => { + if (Swal.isUpdatableParameter(param)) { + validUpdatableParams[param] = params[param]; + } else { + warn("Invalid parameter to update: \"".concat(param, "\". Updatable params are listed here: https://github.com/sweetalert2/sweetalert2/blob/master/src/utils/params.js\n\nIf you think this parameter should be updatable, request it here: https://github.com/sweetalert2/sweetalert2/issues/new?template=02_feature_request.md")); + } + }); + const updatedParams = Object.assign({}, innerParams, validUpdatableParams); + render(this, updatedParams); + privateProps.innerParams.set(this, updatedParams); + Object.defineProperties(this, { + params: { + value: Object.assign({}, this.params, params), + writable: false, + enumerable: true + } + }); + } + + function _destroy() { + const domCache = privateProps.domCache.get(this); + const innerParams = privateProps.innerParams.get(this); + + if (!innerParams) { + return; // This instance has already been destroyed + } // Check if there is another Swal closing + + + if (domCache.popup && globalState.swalCloseEventFinishedCallback) { + globalState.swalCloseEventFinishedCallback(); + delete globalState.swalCloseEventFinishedCallback; + } // Check if there is a swal disposal defer timer + + + if (globalState.deferDisposalTimer) { + clearTimeout(globalState.deferDisposalTimer); + delete globalState.deferDisposalTimer; + } + + if (typeof innerParams.didDestroy === 'function') { + innerParams.didDestroy(); + } + + disposeSwal(this); + } + + const disposeSwal = instance => { + // Unset this.params so GC will dispose it (#1569) + delete instance.params; // Unset globalState props so GC will dispose globalState (#1569) + + delete globalState.keydownHandler; + delete globalState.keydownTarget; // Unset WeakMaps so GC will be able to dispose them (#1569) + + unsetWeakMaps(privateProps); + unsetWeakMaps(privateMethods); // Unset currentInstance + + delete globalState.currentInstance; + }; + + const unsetWeakMaps = obj => { + for (const i in obj) { + obj[i] = new WeakMap(); + } + }; + + + + var instanceMethods = /*#__PURE__*/Object.freeze({ + hideLoading: hideLoading, + disableLoading: hideLoading, + getInput: getInput$1, + close: close, + closePopup: close, + closeModal: close, + closeToast: close, + enableButtons: enableButtons, + disableButtons: disableButtons, + enableInput: enableInput, + disableInput: disableInput, + showValidationMessage: showValidationMessage, + resetValidationMessage: resetValidationMessage$1, + getProgressSteps: getProgressSteps$1, + _main: _main, + update: update, + _destroy: _destroy + }); + + let currentInstance; + + class SweetAlert { + constructor(...args) { + // Prevent run in Node env + if (typeof window === 'undefined') { + return; + } + + currentInstance = this; + const outerParams = Object.freeze(this.constructor.argsToParams(args)); + Object.defineProperties(this, { + params: { + value: outerParams, + writable: false, + enumerable: true, + configurable: true + } + }); + + const promise = this._main(this.params); + + privateProps.promise.set(this, promise); + } // `catch` cannot be the name of a module export, so we define our thenable methods here instead + + + then(onFulfilled) { + const promise = privateProps.promise.get(this); + return promise.then(onFulfilled); + } + + finally(onFinally) { + const promise = privateProps.promise.get(this); + return promise.finally(onFinally); + } + + } // Assign instance methods from src/instanceMethods/*.js to prototype + + + Object.assign(SweetAlert.prototype, instanceMethods); // Assign static methods from src/staticMethods/*.js to constructor + + Object.assign(SweetAlert, staticMethods); // Proxy to instance methods to constructor, for now, for backwards compatibility + + Object.keys(instanceMethods).forEach(key => { + SweetAlert[key] = function (...args) { + if (currentInstance) { + return currentInstance[key](...args); + } + }; + }); + SweetAlert.DismissReason = DismissReason; + SweetAlert.version = '11.1.5'; + + const Swal = SweetAlert; + Swal.default = Swal; + + return Swal; + +})); +if (typeof this !== 'undefined' && this.Sweetalert2){ this.swal = this.sweetAlert = this.Swal = this.SweetAlert = this.Sweetalert2} diff --git a/modules/setting-management/app/Volo.Abp.SettingManagement.DemoApp/wwwroot/libs/sweetalert2/sweetalert2.min.css b/modules/setting-management/app/Volo.Abp.SettingManagement.DemoApp/wwwroot/libs/sweetalert2/sweetalert2.min.css new file mode 100644 index 0000000000..25eb26f1c0 --- /dev/null +++ b/modules/setting-management/app/Volo.Abp.SettingManagement.DemoApp/wwwroot/libs/sweetalert2/sweetalert2.min.css @@ -0,0 +1 @@ +.swal2-popup.swal2-toast{box-sizing:border-box;grid-column:1/4!important;grid-row:1/4!important;grid-template-columns:1fr 99fr 1fr;padding:1em;overflow-y:hidden;background:#fff;box-shadow:0 0 .625em #d9d9d9;pointer-events:all}.swal2-popup.swal2-toast>*{grid-column:2}.swal2-popup.swal2-toast .swal2-title{margin:1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-loading{justify-content:center}.swal2-popup.swal2-toast .swal2-input{height:2em;margin:.5em;font-size:1em}.swal2-popup.swal2-toast .swal2-validation-message{font-size:1em}.swal2-popup.swal2-toast .swal2-footer{margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-popup.swal2-toast .swal2-close{grid-column:3/3;grid-row:1/99;align-self:center;width:.8em;height:.8em;margin:0;font-size:2em}.swal2-popup.swal2-toast .swal2-html-container{margin:1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-html-container:empty{padding:0}.swal2-popup.swal2-toast .swal2-loader{grid-column:1;grid-row:1/99;align-self:center;width:2em;height:2em;margin:.25em}.swal2-popup.swal2-toast .swal2-icon{grid-column:1;grid-row:1/99;align-self:center;width:2em;min-width:2em;height:2em;margin:0 .5em 0 0}.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:700}.swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-popup.swal2-toast .swal2-actions{justify-content:flex-start;height:auto;margin:0;margin-top:.3125em;padding:0}.swal2-popup.swal2-toast .swal2-styled{margin:.25em .5em;padding:.4em .6em;font-size:1em}.swal2-popup.swal2-toast .swal2-styled:focus{box-shadow:0 0 0 1px #fff,0 0 0 3px rgba(100,150,200,.5)}.swal2-popup.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;transform:rotate(45deg);border-radius:50%}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.8em;left:-.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.25em;left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-popup.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{-webkit-animation:swal2-toast-animate-success-line-tip .75s;animation:swal2-toast-animate-success-line-tip .75s}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{-webkit-animation:swal2-toast-animate-success-line-long .75s;animation:swal2-toast-animate-success-line-long .75s}.swal2-popup.swal2-toast.swal2-show{-webkit-animation:swal2-toast-show .5s;animation:swal2-toast-show .5s}.swal2-popup.swal2-toast.swal2-hide{-webkit-animation:swal2-toast-hide .1s forwards;animation:swal2-toast-hide .1s forwards}.swal2-container{display:grid;position:fixed;z-index:1060;top:0;right:0;bottom:0;left:0;box-sizing:border-box;grid-template-areas:"top-start top top-end" "center-start center center-end" "bottom-start bottom-center bottom-end";grid-template-rows:minmax(-webkit-min-content,auto) minmax(-webkit-min-content,auto) minmax(-webkit-min-content,auto);grid-template-rows:minmax(min-content,auto) minmax(min-content,auto) minmax(min-content,auto);height:100%;padding:.625em;overflow-x:hidden;transition:background-color .1s;-webkit-overflow-scrolling:touch}.swal2-container.swal2-backdrop-show,.swal2-container.swal2-noanimation{background:rgba(0,0,0,.4)}.swal2-container.swal2-backdrop-hide{background:0 0!important}.swal2-container.swal2-bottom-start,.swal2-container.swal2-center-start,.swal2-container.swal2-top-start{grid-template-columns:minmax(0,1fr) auto auto}.swal2-container.swal2-bottom,.swal2-container.swal2-center,.swal2-container.swal2-top{grid-template-columns:auto minmax(0,1fr) auto}.swal2-container.swal2-bottom-end,.swal2-container.swal2-center-end,.swal2-container.swal2-top-end{grid-template-columns:auto auto minmax(0,1fr)}.swal2-container.swal2-top-start>.swal2-popup{align-self:start}.swal2-container.swal2-top>.swal2-popup{grid-column:2;align-self:start;justify-self:center}.swal2-container.swal2-top-end>.swal2-popup,.swal2-container.swal2-top-right>.swal2-popup{grid-column:3;align-self:start;justify-self:end}.swal2-container.swal2-center-left>.swal2-popup,.swal2-container.swal2-center-start>.swal2-popup{grid-row:2;align-self:center}.swal2-container.swal2-center>.swal2-popup{grid-column:2;grid-row:2;align-self:center;justify-self:center}.swal2-container.swal2-center-end>.swal2-popup,.swal2-container.swal2-center-right>.swal2-popup{grid-column:3;grid-row:2;align-self:center;justify-self:end}.swal2-container.swal2-bottom-left>.swal2-popup,.swal2-container.swal2-bottom-start>.swal2-popup{grid-column:1;grid-row:3;align-self:end}.swal2-container.swal2-bottom>.swal2-popup{grid-column:2;grid-row:3;justify-self:center;align-self:end}.swal2-container.swal2-bottom-end>.swal2-popup,.swal2-container.swal2-bottom-right>.swal2-popup{grid-column:3;grid-row:3;align-self:end;justify-self:end}.swal2-container.swal2-grow-fullscreen>.swal2-popup,.swal2-container.swal2-grow-row>.swal2-popup{grid-column:1/4;width:100%}.swal2-container.swal2-grow-column>.swal2-popup,.swal2-container.swal2-grow-fullscreen>.swal2-popup{grid-row:1/4;align-self:stretch}.swal2-container.swal2-no-transition{transition:none!important}.swal2-popup{display:none;position:relative;box-sizing:border-box;grid-template-columns:minmax(0,100%);width:32em;max-width:100%;padding:0 0 1.25em;border:none;border-radius:5px;background:#fff;color:#545454;font-family:inherit;font-size:1rem}.swal2-popup:focus{outline:0}.swal2-popup.swal2-loading{overflow-y:hidden}.swal2-title{position:relative;max-width:100%;margin:0;padding:.8em 1em 0;color:#595959;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;word-wrap:break-word}.swal2-actions{display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:center;width:auto;margin:1.25em auto 0;padding:0}.swal2-actions:not(.swal2-loading) .swal2-styled[disabled]{opacity:.4}.swal2-actions:not(.swal2-loading) .swal2-styled:hover{background-image:linear-gradient(rgba(0,0,0,.1),rgba(0,0,0,.1))}.swal2-actions:not(.swal2-loading) .swal2-styled:active{background-image:linear-gradient(rgba(0,0,0,.2),rgba(0,0,0,.2))}.swal2-loader{display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;-webkit-animation:swal2-rotate-loading 1.5s linear 0s infinite normal;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 transparent #2778c4 transparent}.swal2-styled{margin:.3125em;padding:.625em 1.1em;transition:box-shadow .1s;box-shadow:0 0 0 3px transparent;font-weight:500}.swal2-styled:not([disabled]){cursor:pointer}.swal2-styled.swal2-confirm{border:0;border-radius:.25em;background:initial;background-color:#7367f0;color:#fff;font-size:1em}.swal2-styled.swal2-confirm:focus{box-shadow:0 0 0 3px rgba(115,103,240,.5)}.swal2-styled.swal2-deny{border:0;border-radius:.25em;background:initial;background-color:#ea5455;color:#fff;font-size:1em}.swal2-styled.swal2-deny:focus{box-shadow:0 0 0 3px rgba(234,84,85,.5)}.swal2-styled.swal2-cancel{border:0;border-radius:.25em;background:initial;background-color:#6e7d88;color:#fff;font-size:1em}.swal2-styled.swal2-cancel:focus{box-shadow:0 0 0 3px rgba(110,125,136,.5)}.swal2-styled.swal2-default-outline:focus{box-shadow:0 0 0 3px rgba(100,150,200,.5)}.swal2-styled:focus{outline:0}.swal2-styled::-moz-focus-inner{border:0}.swal2-footer{justify-content:center;margin:1em 0 0;padding:1em 1em 0;border-top:1px solid #eee;color:#545454;font-size:1em}.swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;grid-column:auto!important;height:.25em;overflow:hidden;border-bottom-right-radius:5px;border-bottom-left-radius:5px}.swal2-timer-progress-bar{width:100%;height:.25em;background:rgba(0,0,0,.2)}.swal2-image{max-width:100%;margin:2em auto 1em}.swal2-close{z-index:2;align-items:center;justify-content:center;width:1.2em;height:1.2em;margin-top:0;margin-right:0;margin-bottom:-1.2em;padding:0;overflow:hidden;transition:color .1s,box-shadow .1s;border:none;border-radius:5px;background:0 0;color:#ccc;font-family:serif;font-family:monospace;font-size:2.5em;cursor:pointer;justify-self:end}.swal2-close:hover{transform:none;background:0 0;color:#f27474}.swal2-close:focus{outline:0;box-shadow:inset 0 0 0 3px rgba(100,150,200,.5)}.swal2-close::-moz-focus-inner{border:0}.swal2-html-container{z-index:1;justify-content:center;margin:1em 1.6em .3em;padding:0;overflow:auto;color:#545454;font-size:1.125em;font-weight:400;line-height:normal;text-align:center;word-wrap:break-word;word-break:break-word}.swal2-checkbox,.swal2-file,.swal2-input,.swal2-radio,.swal2-select,.swal2-textarea{margin:1em 2em 0}.swal2-file,.swal2-input,.swal2-textarea{box-sizing:border-box;width:auto;transition:border-color .1s,box-shadow .1s;border:1px solid #d9d9d9;border-radius:.1875em;background:inherit;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px transparent;color:inherit;font-size:1.125em}.swal2-file.swal2-inputerror,.swal2-input.swal2-inputerror,.swal2-textarea.swal2-inputerror{border-color:#f27474!important;box-shadow:0 0 2px #f27474!important}.swal2-file:focus,.swal2-input:focus,.swal2-textarea:focus{border:1px solid #b4dbed;outline:0;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(100,150,200,.5)}.swal2-file::-moz-placeholder,.swal2-input::-moz-placeholder,.swal2-textarea::-moz-placeholder{color:#ccc}.swal2-file:-ms-input-placeholder,.swal2-input:-ms-input-placeholder,.swal2-textarea:-ms-input-placeholder{color:#ccc}.swal2-file::placeholder,.swal2-input::placeholder,.swal2-textarea::placeholder{color:#ccc}.swal2-range{margin:1em 2em 0;background:#fff}.swal2-range input{width:80%}.swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}.swal2-range input,.swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}.swal2-input{height:2.625em;padding:0 .75em}.swal2-file{width:75%;margin-right:auto;margin-left:auto;background:inherit;font-size:1.125em}.swal2-textarea{height:6.75em;padding:.75em}.swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:inherit;color:inherit;font-size:1.125em}.swal2-checkbox,.swal2-radio{align-items:center;justify-content:center;background:#fff;color:inherit}.swal2-checkbox label,.swal2-radio label{margin:0 .6em;font-size:1.125em}.swal2-checkbox input,.swal2-radio input{flex-shrink:0;margin:0 .4em}.swal2-input-label{display:flex;justify-content:center;margin:1em auto 0}.swal2-validation-message{align-items:center;justify-content:center;margin:1em 0 0;padding:.625em;overflow:hidden;background:#f0f0f0;color:#666;font-size:1em;font-weight:300}.swal2-validation-message::before{content:"!";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}.swal2-icon{position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:2.5em auto .6em;border:.25em solid transparent;border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}.swal2-icon.swal2-error{border-color:#f27474;color:#f27474}.swal2-icon.swal2-error .swal2-x-mark{position:relative;flex-grow:1}.swal2-icon.swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}.swal2-icon.swal2-error.swal2-icon-show{-webkit-animation:swal2-animate-error-icon .5s;animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-error.swal2-icon-show .swal2-x-mark{-webkit-animation:swal2-animate-error-x-mark .5s;animation:swal2-animate-error-x-mark .5s}.swal2-icon.swal2-warning{border-color:#facea8;color:#f8bb86}.swal2-icon.swal2-info{border-color:#9de0f6;color:#3fc3ee}.swal2-icon.swal2-question{border-color:#c9dae1;color:#87adbd}.swal2-icon.swal2-success{border-color:#a5dc86;color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;transform:rotate(45deg);border-radius:50%}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}.swal2-icon.swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-.25em;left:-.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}.swal2-icon.swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}.swal2-icon.swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}.swal2-icon.swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-tip{-webkit-animation:swal2-animate-success-line-tip .75s;animation:swal2-animate-success-line-tip .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-long{-webkit-animation:swal2-animate-success-line-long .75s;animation:swal2-animate-success-line-long .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-circular-line-right{-webkit-animation:swal2-rotate-success-circular-line 4.25s ease-in;animation:swal2-rotate-success-circular-line 4.25s ease-in}.swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:1.25em auto;padding:0;background:inherit;font-weight:600}.swal2-progress-steps li{display:inline-block;position:relative}.swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:#add8e6;color:#fff}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:#add8e6}.swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}[class^=swal2]{-webkit-tap-highlight-color:transparent}.swal2-show{-webkit-animation:swal2-show .3s;animation:swal2-show .3s}.swal2-hide{-webkit-animation:swal2-hide .15s forwards;animation:swal2-hide .15s forwards}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{margin-right:initial;margin-left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}@-webkit-keyframes swal2-toast-show{0%{transform:translateY(-.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0)}}@keyframes swal2-toast-show{0%{transform:translateY(-.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0)}}@-webkit-keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@-webkit-keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@-webkit-keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@-webkit-keyframes swal2-show{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}100%{transform:scale(1)}}@keyframes swal2-show{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}100%{transform:scale(1)}}@-webkit-keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(.5);opacity:0}}@keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(.5);opacity:0}}@-webkit-keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@-webkit-keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@-webkit-keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@-webkit-keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@-webkit-keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0);opacity:1}}@-webkit-keyframes swal2-rotate-loading{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes swal2-rotate-loading{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto!important}body.swal2-no-backdrop .swal2-container{background-color:transparent!important;pointer-events:none}body.swal2-no-backdrop .swal2-container .swal2-popup{pointer-events:all}body.swal2-no-backdrop .swal2-container .swal2-modal{box-shadow:0 0 10px rgba(0,0,0,.4)}@media print{body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow-y:scroll!important}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .swal2-container{position:static!important}}body.swal2-toast-shown .swal2-container{box-sizing:border-box;width:360px;max-width:100%;background-color:transparent;pointer-events:none}body.swal2-toast-shown .swal2-container.swal2-top{top:0;right:auto;bottom:auto;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{top:0;right:0;bottom:auto;left:auto}body.swal2-toast-shown .swal2-container.swal2-top-left,body.swal2-toast-shown .swal2-container.swal2-top-start{top:0;right:auto;bottom:auto;left:0}body.swal2-toast-shown .swal2-container.swal2-center-left,body.swal2-toast-shown .swal2-container.swal2-center-start{top:50%;right:auto;bottom:auto;left:0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{top:50%;right:auto;bottom:auto;left:50%;transform:translate(-50%,-50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{top:50%;right:0;bottom:auto;left:auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-left,body.swal2-toast-shown .swal2-container.swal2-bottom-start{top:auto;right:auto;bottom:0;left:0}body.swal2-toast-shown .swal2-container.swal2-bottom{top:auto;right:auto;bottom:0;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{top:auto;right:0;bottom:0;left:auto} \ No newline at end of file diff --git a/modules/setting-management/app/Volo.Abp.SettingManagement.DemoApp/wwwroot/libs/sweetalert2/sweetalert2.min.js b/modules/setting-management/app/Volo.Abp.SettingManagement.DemoApp/wwwroot/libs/sweetalert2/sweetalert2.min.js new file mode 100644 index 0000000000..9a383d5289 --- /dev/null +++ b/modules/setting-management/app/Volo.Abp.SettingManagement.DemoApp/wwwroot/libs/sweetalert2/sweetalert2.min.js @@ -0,0 +1 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).Sweetalert2=t()}(this,function(){"use strict";const l=Object.freeze({cancel:"cancel",backdrop:"backdrop",close:"close",esc:"esc",timer:"timer"}),t="SweetAlert2:",o=e=>e.charAt(0).toUpperCase()+e.slice(1),a=e=>Array.prototype.slice.call(e),s=e=>{console.warn("".concat(t," ").concat("object"==typeof e?e.join(" "):e))},r=e=>{console.error("".concat(t," ").concat(e))},n=[],i=(e,t)=>{t='"'.concat(e,'" is deprecated and will be removed in the next major release. Please use "').concat(t,'" instead.'),n.includes(t)||(n.push(t),s(t))},c=e=>"function"==typeof e?e():e,u=e=>e&&"function"==typeof e.toPromise,d=e=>u(e)?e.toPromise():Promise.resolve(e),p=e=>e&&Promise.resolve(e)===e,m=e=>e instanceof Element||(e=>"object"==typeof e&&e.jquery)(e);var e=e=>{const t={};for(const n in e)t[e[n]]="swal2-"+e[n];return t};const h=e(["container","shown","height-auto","iosfix","popup","modal","no-backdrop","no-transition","toast","toast-shown","show","hide","close","title","html-container","actions","confirm","deny","cancel","default-outline","footer","icon","icon-content","image","input","file","range","select","radio","checkbox","label","textarea","inputerror","input-label","validation-message","progress-steps","active-progress-step","progress-step","progress-step-line","loader","loading","styled","top","top-start","top-end","top-left","top-right","center","center-start","center-end","center-left","center-right","bottom","bottom-start","bottom-end","bottom-left","bottom-right","grow-row","grow-column","grow-fullscreen","rtl","timer-progress-bar","timer-progress-bar-container","scrollbar-measure","icon-success","icon-warning","icon-info","icon-question","icon-error"]),g=e(["success","warning","info","question","error"]),b=()=>document.body.querySelector(".".concat(h.container)),f=e=>{const t=b();return t?t.querySelector(e):null},y=e=>f(".".concat(e)),v=()=>y(h.popup),w=()=>y(h.icon),C=()=>y(h.title),k=()=>y(h["html-container"]),A=()=>y(h.image),B=()=>y(h["progress-steps"]),x=()=>y(h["validation-message"]),P=()=>f(".".concat(h.actions," .").concat(h.confirm)),E=()=>f(".".concat(h.actions," .").concat(h.deny));const S=()=>f(".".concat(h.loader)),T=()=>f(".".concat(h.actions," .").concat(h.cancel)),L=()=>y(h.actions),O=()=>y(h.footer),j=()=>y(h["timer-progress-bar"]),D=()=>y(h.close),I=()=>{const e=a(v().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')).sort((e,t)=>(e=parseInt(e.getAttribute("tabindex")),(t=parseInt(t.getAttribute("tabindex")))"-1"!==e.getAttribute("tabindex"));return(t=>{const n=[];for(let e=0;eG(e))},M=()=>!H()&&!document.body.classList.contains(h["no-backdrop"]),H=()=>document.body.classList.contains(h["toast-shown"]);const q={previousBodyPadding:null},V=(t,e)=>{if(t.textContent="",e){const n=new DOMParser,o=n.parseFromString(e,"text/html");a(o.querySelector("head").childNodes).forEach(e=>{t.appendChild(e)}),a(o.querySelector("body").childNodes).forEach(e=>{t.appendChild(e)})}},N=(t,e)=>{if(!e)return!1;var n=e.split(/\s+/);for(let e=0;e{var o,i;if(o=e,i=t,a(o.classList).forEach(e=>{Object.values(h).includes(e)||Object.values(g).includes(e)||Object.values(i.showClass).includes(e)||o.classList.remove(e)}),t.customClass&&t.customClass[n]){if("string"!=typeof t.customClass[n]&&!t.customClass[n].forEach)return s("Invalid type of customClass.".concat(n,'! Expected string or iterable object, got "').concat(typeof t.customClass[n],'"'));W(e,t.customClass[n])}},F=(e,t)=>{if(!t)return null;switch(t){case"select":case"textarea":case"file":return K(e,h[t]);case"checkbox":return e.querySelector(".".concat(h.checkbox," input"));case"radio":return e.querySelector(".".concat(h.radio," input:checked"))||e.querySelector(".".concat(h.radio," input:first-child"));case"range":return e.querySelector(".".concat(h.range," input"));default:return K(e,h.input)}},R=e=>{var t;e.focus(),"file"!==e.type&&(t=e.value,e.value="",e.value=t)},z=(e,t,n)=>{e&&t&&(t="string"==typeof t?t.split(/\s+/).filter(Boolean):t).forEach(t=>{e.forEach?e.forEach(e=>{n?e.classList.add(t):e.classList.remove(t)}):n?e.classList.add(t):e.classList.remove(t)})},W=(e,t)=>{z(e,t,!0)},_=(e,t)=>{z(e,t,!1)},K=(t,n)=>{for(let e=0;e{(n=n==="".concat(parseInt(n))?parseInt(n):n)||0===parseInt(n)?e.style[t]="number"==typeof n?"".concat(n,"px"):n:e.style.removeProperty(t)},Z=(e,t="flex")=>{e.style.display=t},J=e=>{e.style.display="none"},X=(e,t,n,o)=>{const i=e.querySelector(t);i&&(i.style[n]=o)},$=(e,t,n)=>{t?Z(e,n):J(e)},G=e=>!(!e||!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)),Q=()=>!G(P())&&!G(E())&&!G(T()),ee=e=>!!(e.scrollHeight>e.clientHeight),te=e=>{const t=window.getComputedStyle(e);var n=parseFloat(t.getPropertyValue("animation-duration")||"0"),e=parseFloat(t.getPropertyValue("transition-duration")||"0");return 0{const n=j();G(n)&&(t&&(n.style.transition="none",n.style.width="100%"),setTimeout(()=>{n.style.transition="width ".concat(e/1e3,"s linear"),n.style.width="0%"},10))},oe=()=>"undefined"==typeof window||"undefined"==typeof document,ie='\n
                                                \n \n
                                                  \n
                                                  \n \n

                                                  \n
                                                  \n \n \n
                                                  \n \n \n
                                                  \n \n
                                                  \n \n \n
                                                  \n
                                                  \n
                                                  \n \n \n \n
                                                  \n
                                                  \n
                                                  \n
                                                  \n
                                                  \n
                                                  \n').replace(/(^|\n)\s*/g,""),ae=()=>{ln.isVisible()&&ln.resetValidationMessage()},se=e=>{var t=(()=>{const e=b();return!!e&&(e.remove(),_([document.documentElement,document.body],[h["no-backdrop"],h["toast-shown"],h["has-column"]]),!0)})();if(oe())r("SweetAlert2 requires document to initialize");else{const n=document.createElement("div");n.className=h.container,t&&W(n,h["no-transition"]),V(n,ie);const o="string"==typeof(t=e.target)?document.querySelector(t):t;o.appendChild(n),(e=>{const t=v();t.setAttribute("role",e.toast?"alert":"dialog"),t.setAttribute("aria-live",e.toast?"polite":"assertive"),e.toast||t.setAttribute("aria-modal","true")})(e),e=o,"rtl"===window.getComputedStyle(e).direction&&W(b(),h.rtl),(()=>{const e=v(),t=K(e,h.input),n=K(e,h.file),o=e.querySelector(".".concat(h.range," input")),i=e.querySelector(".".concat(h.range," output")),a=K(e,h.select),s=e.querySelector(".".concat(h.checkbox," input")),r=K(e,h.textarea);t.oninput=ae,n.onchange=ae,a.onchange=ae,s.onchange=ae,r.oninput=ae,o.oninput=()=>{ae(),i.value=o.value},o.onchange=()=>{ae(),o.nextSibling.value=o.value}})()}},re=(e,t)=>{e instanceof HTMLElement?t.appendChild(e):"object"==typeof e?ce(e,t):e&&V(t,e)},ce=(e,t)=>{e.jquery?le(t,e):V(t,e.toString())},le=(t,n)=>{if(t.textContent="",0 in n)for(let e=0;e in n;e++)t.appendChild(n[e].cloneNode(!0));else t.appendChild(n.cloneNode(!0))},ue=(()=>{if(oe())return!1;var e=document.createElement("div"),t={WebkitAnimation:"webkitAnimationEnd",OAnimation:"oAnimationEnd oanimationend",animation:"animationend"};for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&void 0!==e.style[n])return t[n];return!1})(),de=(e,t)=>{const n=L();var o=S(),i=P(),a=E(),s=T();(t.showConfirmButton||t.showDenyButton||t.showCancelButton?Z:J)(n),U(n,t,"actions"),pe(i,"confirm",t),pe(a,"deny",t),pe(s,"cancel",t),function(e,t,n,o){if(!o.buttonsStyling)return _([e,t,n],h.styled);W([e,t,n],h.styled),o.confirmButtonColor&&(e.style.backgroundColor=o.confirmButtonColor,W(e,h["default-outline"]));o.denyButtonColor&&(t.style.backgroundColor=o.denyButtonColor,W(t,h["default-outline"]));o.cancelButtonColor&&(n.style.backgroundColor=o.cancelButtonColor,W(n,h["default-outline"]))}(i,a,s,t),t.reverseButtons&&(n.insertBefore(s,o),n.insertBefore(a,o),n.insertBefore(i,o)),V(o,t.loaderHtml),U(o,t,"loader")};function pe(e,t,n){$(e,n["show".concat(o(t),"Button")],"inline-block"),V(e,n["".concat(t,"ButtonText")]),e.setAttribute("aria-label",n["".concat(t,"ButtonAriaLabel")]),e.className=h[t],U(e,n,"".concat(t,"Button")),W(e,n["".concat(t,"ButtonClass")])}const me=(e,t)=>{var n,o,i=b();i&&(o=i,"string"==typeof(n=t.backdrop)?o.style.background=n:n||W([document.documentElement,document.body],h["no-backdrop"]),o=i,(n=t.position)in h?W(o,h[n]):(s('The "position" parameter is not valid, defaulting to "center"'),W(o,h.center)),n=i,!(o=t.grow)||"string"!=typeof o||(o="grow-".concat(o))in h&&W(n,h[o]),U(i,t,"container"))};var he={promise:new WeakMap,innerParams:new WeakMap,domCache:new WeakMap};const ge=["input","file","range","select","radio","checkbox","textarea"],be=e=>{if(!ke[e.input])return r('Unexpected type of input! Expected "text", "email", "password", "number", "tel", "select", "radio", "checkbox", "textarea", "file" or "url", got "'.concat(e.input,'"'));var t=Ce(e.input);const n=ke[e.input](t,e);Z(n),setTimeout(()=>{R(n)})},fe=(e,t)=>{const n=F(v(),e);if(n){(t=>{for(let e=0;e{var t=Ce(e.input);e.customClass&&W(t,e.customClass.input)},ve=(e,t)=>{e.placeholder&&!t.inputPlaceholder||(e.placeholder=t.inputPlaceholder)},we=(e,t,n)=>{if(n.inputLabel){e.id=h.input;const i=document.createElement("label");var o=h["input-label"];i.setAttribute("for",e.id),i.className=o,W(i,n.customClass.inputLabel),i.innerText=n.inputLabel,t.insertAdjacentElement("beforebegin",i)}},Ce=e=>{e=h[e]||h.input;return K(v(),e)},ke={};ke.text=ke.email=ke.password=ke.number=ke.tel=ke.url=(e,t)=>("string"==typeof t.inputValue||"number"==typeof t.inputValue?e.value=t.inputValue:p(t.inputValue)||s('Unexpected type of inputValue! Expected "string", "number" or "Promise", got "'.concat(typeof t.inputValue,'"')),we(e,e,t),ve(e,t),e.type=t.input,e),ke.file=(e,t)=>(we(e,e,t),ve(e,t),e),ke.range=(e,t)=>{const n=e.querySelector("input"),o=e.querySelector("output");return n.value=t.inputValue,n.type=t.input,o.value=t.inputValue,we(n,e,t),e},ke.select=(e,t)=>{if(e.textContent="",t.inputPlaceholder){const n=document.createElement("option");V(n,t.inputPlaceholder),n.value="",n.disabled=!0,n.selected=!0,e.appendChild(n)}return we(e,e,t),e},ke.radio=e=>(e.textContent="",e),ke.checkbox=(e,t)=>{const n=F(v(),"checkbox");n.value=1,n.id=h.checkbox,n.checked=Boolean(t.inputValue);var o=e.querySelector("span");return V(o,t.inputPlaceholder),e},ke.textarea=(n,e)=>{n.value=e.inputValue,ve(n,e),we(n,n,e);return setTimeout(()=>{if("MutationObserver"in window){const t=parseInt(window.getComputedStyle(v()).width);new MutationObserver(()=>{var e,e=n.offsetWidth+(e=n,parseInt(window.getComputedStyle(e).marginLeft)+parseInt(window.getComputedStyle(e).marginRight));e>t?v().style.width="".concat(e,"px"):v().style.width=null}).observe(n,{attributes:!0,attributeFilter:["style"]})}}),n};const Ae=(e,t)=>{const n=k();U(n,t,"htmlContainer"),t.html?(re(t.html,n),Z(n,"block")):t.text?(n.textContent=t.text,Z(n,"block")):J(n),((e,o)=>{const i=v();e=he.innerParams.get(e);const a=!e||o.input!==e.input;ge.forEach(e=>{var t=h[e];const n=K(i,t);fe(e,o.inputAttributes),n.className=t,a&&J(n)}),o.input&&(a&&be(o),ye(o))})(e,t)},Be=(e,t)=>{for(const n in g)t.icon!==n&&_(e,g[n]);W(e,g[t.icon]),Ee(e,t),xe(),U(e,t,"icon")},xe=()=>{const e=v();var t=window.getComputedStyle(e).getPropertyValue("background-color");const n=e.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix");for(let e=0;e{var n;e.textContent="",t.iconHtml?V(e,Se(t.iconHtml)):"success"===t.icon?V(e,'\n
                                                  \n \n
                                                  \n
                                                  \n '):"error"===t.icon?V(e,'\n \n \n \n \n '):(n={question:"?",warning:"!",info:"i"},V(e,Se(n[t.icon])))},Ee=(e,t)=>{if(t.iconColor){e.style.color=t.iconColor,e.style.borderColor=t.iconColor;for(const n of[".swal2-success-line-tip",".swal2-success-line-long",".swal2-x-mark-line-left",".swal2-x-mark-line-right"])X(e,n,"backgroundColor",t.iconColor);X(e,".swal2-success-ring","borderColor",t.iconColor)}},Se=e=>'
                                                  ').concat(e,"
                                                  "),Te=(e,o)=>{const i=B();if(!o.progressSteps||0===o.progressSteps.length)return J(i);Z(i),i.textContent="",o.currentProgressStep>=o.progressSteps.length&&s("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),o.progressSteps.forEach((e,t)=>{var n,e=(n=e,e=document.createElement("li"),W(e,h["progress-step"]),V(e,n),e);i.appendChild(e),t===o.currentProgressStep&&W(e,h["active-progress-step"]),t!==o.progressSteps.length-1&&(t=(e=>{const t=document.createElement("li");return W(t,h["progress-step-line"]),e.progressStepsDistance&&(t.style.width=e.progressStepsDistance),t})(o),i.appendChild(t))})},Le=(e,t)=>{e.className="".concat(h.popup," ").concat(G(e)?t.showClass.popup:""),t.toast?(W([document.documentElement,document.body],h["toast-shown"]),W(e,h.toast)):W(e,h.modal),U(e,t,"popup"),"string"==typeof t.customClass&&W(e,t.customClass),t.icon&&W(e,h["icon-".concat(t.icon)])},Oe=(e,t)=>{var n,o,i;(e=>{var t=b();const n=v();e.toast?(Y(t,"width",e.width),n.style.width="100%",n.insertBefore(S(),w())):Y(n,"width",e.width),Y(n,"padding",e.padding),e.background&&(n.style.background=e.background),J(x()),Le(n,e)})(t),me(0,t),Te(0,t),i=e,n=t,o=he.innerParams.get(i),i=w(),o&&n.icon===o.icon?(Pe(i,n),Be(i,n)):n.icon||n.iconHtml?n.icon&&-1===Object.keys(g).indexOf(n.icon)?(r('Unknown icon! Expected "success", "error", "warning", "info" or "question", got "'.concat(n.icon,'"')),J(i)):(Z(i),Pe(i,n),Be(i,n),W(i,n.showClass.icon)):J(i),(e=>{const t=A();if(!e.imageUrl)return J(t);Z(t,""),t.setAttribute("src",e.imageUrl),t.setAttribute("alt",e.imageAlt),Y(t,"width",e.imageWidth),Y(t,"height",e.imageHeight),t.className=h.image,U(t,e,"image")})(t),(e=>{const t=C();$(t,e.title||e.titleText,"block"),e.title&&re(e.title,t),e.titleText&&(t.innerText=e.titleText),U(t,e,"title")})(t),(e=>{const t=D();V(t,e.closeButtonHtml),U(t,e,"closeButton"),$(t,e.showCloseButton),t.setAttribute("aria-label",e.closeButtonAriaLabel)})(t),Ae(e,t),de(0,t),i=t,e=O(),$(e,i.footer),i.footer&&re(i.footer,e),U(e,i,"footer"),"function"==typeof t.didRender&&t.didRender(v())};const je=()=>P()&&P().click();const De=e=>{let t=v();t||ln.fire(),t=v();var n=S();H()?J(w()):Ie(t,e),Z(n),t.setAttribute("data-loading",!0),t.setAttribute("aria-busy",!0),t.focus()},Ie=(e,t)=>{var n=L();const o=S();!t&&G(P())&&(t=P()),Z(n),t&&(J(t),o.setAttribute("data-button-to-replace",t.className)),o.parentNode.insertBefore(o,t),W([e,n],h.loading)},Me={},He=o=>new Promise(e=>{if(!o)return e();var t=window.scrollX,n=window.scrollY;Me.restoreFocusTimeout=setTimeout(()=>{Me.previousActiveElement&&Me.previousActiveElement.focus?(Me.previousActiveElement.focus(),Me.previousActiveElement=null):document.body&&document.body.focus(),e()},100),window.scrollTo(t,n)});const qe=()=>{if(Me.timeout)return(()=>{const e=j();var t=parseInt(window.getComputedStyle(e).width);e.style.removeProperty("transition"),e.style.width="100%";var n=parseInt(window.getComputedStyle(e).width),n=parseInt(t/n*100);e.style.removeProperty("transition"),e.style.width="".concat(n,"%")})(),Me.timeout.stop()},Ve=()=>{if(Me.timeout){var e=Me.timeout.start();return ne(e),e}};let Ne=!1;const Ue={};const Fe=t=>{for(let e=t.target;e&&e!==document;e=e.parentNode)for(const o in Ue){var n=e.getAttribute(o);if(n)return void Ue[o].fire({template:n})}},Re={title:"",titleText:"",text:"",html:"",footer:"",icon:void 0,iconColor:void 0,iconHtml:void 0,template:void 0,toast:!1,showClass:{popup:"swal2-show",backdrop:"swal2-backdrop-show",icon:"swal2-icon-show"},hideClass:{popup:"swal2-hide",backdrop:"swal2-backdrop-hide",icon:"swal2-icon-hide"},customClass:{},target:"body",backdrop:!0,heightAuto:!0,allowOutsideClick:!0,allowEscapeKey:!0,allowEnterKey:!0,stopKeydownPropagation:!0,keydownListenerCapture:!1,showConfirmButton:!0,showDenyButton:!1,showCancelButton:!1,preConfirm:void 0,preDeny:void 0,confirmButtonText:"OK",confirmButtonAriaLabel:"",confirmButtonColor:void 0,denyButtonText:"No",denyButtonAriaLabel:"",denyButtonColor:void 0,cancelButtonText:"Cancel",cancelButtonAriaLabel:"",cancelButtonColor:void 0,buttonsStyling:!0,reverseButtons:!1,focusConfirm:!0,focusDeny:!1,focusCancel:!1,returnFocus:!0,showCloseButton:!1,closeButtonHtml:"×",closeButtonAriaLabel:"Close this dialog",loaderHtml:"",showLoaderOnConfirm:!1,showLoaderOnDeny:!1,imageUrl:void 0,imageWidth:void 0,imageHeight:void 0,imageAlt:"",timer:void 0,timerProgressBar:!1,width:void 0,padding:void 0,background:void 0,input:void 0,inputPlaceholder:"",inputLabel:"",inputValue:"",inputOptions:{},inputAutoTrim:!0,inputAttributes:{},inputValidator:void 0,returnInputValueOnDeny:!1,validationMessage:void 0,grow:!1,position:"center",progressSteps:[],currentProgressStep:void 0,progressStepsDistance:void 0,willOpen:void 0,didOpen:void 0,didRender:void 0,willClose:void 0,didClose:void 0,didDestroy:void 0,scrollbarPadding:!0},ze=["allowEscapeKey","allowOutsideClick","background","buttonsStyling","cancelButtonAriaLabel","cancelButtonColor","cancelButtonText","closeButtonAriaLabel","closeButtonHtml","confirmButtonAriaLabel","confirmButtonColor","confirmButtonText","currentProgressStep","customClass","denyButtonAriaLabel","denyButtonColor","denyButtonText","didClose","didDestroy","footer","hideClass","html","icon","iconColor","iconHtml","imageAlt","imageHeight","imageUrl","imageWidth","preConfirm","preDeny","progressSteps","returnFocus","reverseButtons","showCancelButton","showCloseButton","showConfirmButton","showDenyButton","text","title","titleText","willClose"],We={},_e=["allowOutsideClick","allowEnterKey","backdrop","focusConfirm","focusDeny","focusCancel","returnFocus","heightAuto","keydownListenerCapture"],Ke=e=>Object.prototype.hasOwnProperty.call(Re,e);const Ye=e=>We[e],Ze=e=>{!e.backdrop&&e.allowOutsideClick&&s('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`');for(const o in e)n=o,Ke(n)||s('Unknown parameter "'.concat(n,'"')),e.toast&&(t=o,_e.includes(t)&&s('The parameter "'.concat(t,'" is incompatible with toasts'))),t=o,Ye(t)&&i(t,Ye(t));var t,n};var Je=Object.freeze({isValidParameter:Ke,isUpdatableParameter:e=>-1!==ze.indexOf(e),isDeprecatedParameter:Ye,argsToParams:n=>{const o={};return"object"!=typeof n[0]||m(n[0])?["title","html","icon"].forEach((e,t)=>{t=n[t];"string"==typeof t||m(t)?o[e]=t:void 0!==t&&r("Unexpected type of ".concat(e,'! Expected "string" or "Element", got ').concat(typeof t))}):Object.assign(o,n[0]),o},isVisible:()=>G(v()),clickConfirm:je,clickDeny:()=>E()&&E().click(),clickCancel:()=>T()&&T().click(),getContainer:b,getPopup:v,getTitle:C,getHtmlContainer:k,getImage:A,getIcon:w,getInputLabel:()=>y(h["input-label"]),getCloseButton:D,getActions:L,getConfirmButton:P,getDenyButton:E,getCancelButton:T,getLoader:S,getFooter:O,getTimerProgressBar:j,getFocusableElements:I,getValidationMessage:x,isLoading:()=>v().hasAttribute("data-loading"),fire:function(...e){return new this(...e)},mixin:function(n){class e extends this{_main(e,t){return super._main(e,Object.assign({},n,t))}}return e},showLoading:De,enableLoading:De,getTimerLeft:()=>Me.timeout&&Me.timeout.getTimerLeft(),stopTimer:qe,resumeTimer:Ve,toggleTimer:()=>{var e=Me.timeout;return e&&(e.running?qe:Ve)()},increaseTimer:e=>{if(Me.timeout){e=Me.timeout.increase(e);return ne(e,!0),e}},isTimerRunning:()=>Me.timeout&&Me.timeout.isRunning(),bindClickHandler:function(e="data-swal-template"){Ue[e]=this,Ne||(document.body.addEventListener("click",Fe),Ne=!0)}});function Xe(){var e=he.innerParams.get(this);if(e){const t=he.domCache.get(this);J(t.loader),H()?e.icon&&Z(w()):(e=>{const t=e.popup.getElementsByClassName(e.loader.getAttribute("data-button-to-replace"));if(t.length)Z(t[0],"inline-block");else if(Q())J(e.actions)})(t),_([t.popup,t.actions],h.loading),t.popup.removeAttribute("aria-busy"),t.popup.removeAttribute("data-loading"),t.confirmButton.disabled=!1,t.denyButton.disabled=!1,t.cancelButton.disabled=!1}}const $e=()=>{null===q.previousBodyPadding&&document.body.scrollHeight>window.innerHeight&&(q.previousBodyPadding=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight="".concat(q.previousBodyPadding+(()=>{const e=document.createElement("div");e.className=h["scrollbar-measure"],document.body.appendChild(e);var t=e.getBoundingClientRect().width-e.clientWidth;return document.body.removeChild(e),t})(),"px"))},Ge=()=>{navigator.userAgent.match(/(CriOS|FxiOS|EdgiOS|YaBrowser|UCBrowser)/i)||v().scrollHeight>window.innerHeight-44&&(b().style.paddingBottom="".concat(44,"px"))},Qe=()=>{const e=b();let t;e.ontouchstart=e=>{t=et(e)},e.ontouchmove=e=>{t&&(e.preventDefault(),e.stopPropagation())}},et=e=>{var t=e.target,n=b();return!tt(e)&&!nt(e)&&(t===n||!(ee(n)||"INPUT"===t.tagName||"TEXTAREA"===t.tagName||ee(k())&&k().contains(t)))},tt=e=>e.touches&&e.touches.length&&"stylus"===e.touches[0].touchType,nt=e=>e.touches&&1{const e=a(document.body.children);e.forEach(e=>{e.hasAttribute("data-previous-aria-hidden")?(e.setAttribute("aria-hidden",e.getAttribute("data-previous-aria-hidden")),e.removeAttribute("data-previous-aria-hidden")):e.removeAttribute("aria-hidden")})};var it={swalPromiseResolve:new WeakMap};function at(e,t,n,o){H()?ct(e,o):(He(n).then(()=>ct(e,o)),Me.keydownTarget.removeEventListener("keydown",Me.keydownHandler,{capture:Me.keydownListenerCapture}),Me.keydownHandlerAdded=!1),/^((?!chrome|android).)*safari/i.test(navigator.userAgent)?(t.setAttribute("style","display:none !important"),t.removeAttribute("class"),t.innerHTML=""):t.remove(),M()&&(null!==q.previousBodyPadding&&(document.body.style.paddingRight="".concat(q.previousBodyPadding,"px"),q.previousBodyPadding=null),N(document.body,h.iosfix)&&(t=parseInt(document.body.style.top,10),_(document.body,h.iosfix),document.body.style.top="",document.body.scrollTop=-1*t),ot()),_([document.documentElement,document.body],[h.shown,h["height-auto"],h["no-backdrop"],h["toast-shown"]])}function st(e){var t=v();if(t){e=void 0!==(o=e)?Object.assign({isConfirmed:!1,isDenied:!1,isDismissed:!1},o):{isConfirmed:!1,isDenied:!1,isDismissed:!0};var n=he.innerParams.get(this);if(n&&!N(t,n.hideClass.popup)){const i=it.swalPromiseResolve.get(this);_(t,n.showClass.popup),W(t,n.hideClass.popup);var o=b();_(o,n.showClass.backdrop),W(o,n.hideClass.backdrop),((e,t,n)=>{const o=b(),i=ue&&te(t);if(typeof n.willClose==="function")n.willClose(t);if(i)rt(e,t,o,n.returnFocus,n.didClose);else at(e,o,n.returnFocus,n.didClose)})(this,t,n),i(e)}}}const rt=(e,t,n,o,i)=>{Me.swalCloseEventFinishedCallback=at.bind(null,e,n,o,i),t.addEventListener(ue,function(e){e.target===t&&(Me.swalCloseEventFinishedCallback(),delete Me.swalCloseEventFinishedCallback)})},ct=(e,t)=>{setTimeout(()=>{"function"==typeof t&&t.bind(e.params)(),e._destroy()})};function lt(e,t,n){const o=he.domCache.get(e);t.forEach(e=>{o[e].disabled=n})}function ut(e,t){if(!e)return!1;if("radio"===e.type){const n=e.parentNode.parentNode,o=n.querySelectorAll("input");for(let e=0;e/^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]{2,24}$/.test(e)?Promise.resolve():Promise.resolve(t||"Invalid email address"),url:(e,t)=>/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(e)?Promise.resolve():Promise.resolve(t||"Invalid URL")};function mt(e){var t,n;(t=e).inputValidator||Object.keys(pt).forEach(e=>{t.input===e&&(t.inputValidator=pt[e])}),e.showLoaderOnConfirm&&!e.preConfirm&&s("showLoaderOnConfirm is set to true, but preConfirm is not defined.\nshowLoaderOnConfirm should be used together with preConfirm, see usage example:\nhttps://sweetalert2.github.io/#ajax-request"),(n=e).target&&("string"!=typeof n.target||document.querySelector(n.target))&&("string"==typeof n.target||n.target.appendChild)||(s('Target parameter is not valid, defaulting to "body"'),n.target="body"),"string"==typeof e.title&&(e.title=e.title.split("\n").join("
                                                  ")),se(e)}const ht=["swal-title","swal-html","swal-footer"],gt=e=>{e="string"==typeof e.template?document.querySelector(e.template):e.template;if(!e)return{};e=e.content;return kt(e),Object.assign(bt(e),ft(e),yt(e),vt(e),wt(e),Ct(e,ht))},bt=e=>{const o={};return a(e.querySelectorAll("swal-param")).forEach(e=>{At(e,["name","value"]);var t=e.getAttribute("name");let n=e.getAttribute("value");"boolean"==typeof Re[t]&&"false"===n&&(n=!1),"object"==typeof Re[t]&&(n=JSON.parse(n)),o[t]=n}),o},ft=e=>{const n={};return a(e.querySelectorAll("swal-button")).forEach(e=>{At(e,["type","color","aria-label"]);var t=e.getAttribute("type");n["".concat(t,"ButtonText")]=e.innerHTML,n["show".concat(o(t),"Button")]=!0,e.hasAttribute("color")&&(n["".concat(t,"ButtonColor")]=e.getAttribute("color")),e.hasAttribute("aria-label")&&(n["".concat(t,"ButtonAriaLabel")]=e.getAttribute("aria-label"))}),n},yt=e=>{const t={},n=e.querySelector("swal-image");return n&&(At(n,["src","width","height","alt"]),n.hasAttribute("src")&&(t.imageUrl=n.getAttribute("src")),n.hasAttribute("width")&&(t.imageWidth=n.getAttribute("width")),n.hasAttribute("height")&&(t.imageHeight=n.getAttribute("height")),n.hasAttribute("alt")&&(t.imageAlt=n.getAttribute("alt"))),t},vt=e=>{const t={},n=e.querySelector("swal-icon");return n&&(At(n,["type","color"]),n.hasAttribute("type")&&(t.icon=n.getAttribute("type")),n.hasAttribute("color")&&(t.iconColor=n.getAttribute("color")),t.iconHtml=n.innerHTML),t},wt=e=>{const n={},t=e.querySelector("swal-input");t&&(At(t,["type","label","placeholder","value"]),n.input=t.getAttribute("type")||"text",t.hasAttribute("label")&&(n.inputLabel=t.getAttribute("label")),t.hasAttribute("placeholder")&&(n.inputPlaceholder=t.getAttribute("placeholder")),t.hasAttribute("value")&&(n.inputValue=t.getAttribute("value")));e=e.querySelectorAll("swal-input-option");return e.length&&(n.inputOptions={},a(e).forEach(e=>{At(e,["value"]);var t=e.getAttribute("value"),e=e.innerHTML;n.inputOptions[t]=e})),n},Ct=(e,t)=>{const n={};for(const o in t){const i=t[o],a=e.querySelector(i);a&&(At(a,[]),n[i.replace(/^swal-/,"")]=a.innerHTML.trim())}return n},kt=e=>{const t=ht.concat(["swal-param","swal-button","swal-image","swal-icon","swal-input","swal-input-option"]);a(e.children).forEach(e=>{e=e.tagName.toLowerCase();-1===t.indexOf(e)&&s("Unrecognized element <".concat(e,">"))})},At=(t,n)=>{a(t.attributes).forEach(e=>{-1===n.indexOf(e.name)&&s(['Unrecognized attribute "'.concat(e.name,'" on <').concat(t.tagName.toLowerCase(),">."),"".concat(n.length?"Allowed attributes are: ".concat(n.join(", ")):"To set the value, use HTML within the element.")])})},Bt=e=>{const t=b(),n=v();"function"==typeof e.willOpen&&e.willOpen(n);var o=window.getComputedStyle(document.body).overflowY;St(t,n,e),setTimeout(()=>{Pt(t,n)},10),M()&&(Et(t,e.scrollbarPadding,o),(()=>{const e=a(document.body.children);e.forEach(e=>{e===b()||e.contains(b())||(e.hasAttribute("aria-hidden")&&e.setAttribute("data-previous-aria-hidden",e.getAttribute("aria-hidden")),e.setAttribute("aria-hidden","true"))})})()),H()||Me.previousActiveElement||(Me.previousActiveElement=document.activeElement),"function"==typeof e.didOpen&&setTimeout(()=>e.didOpen(n)),_(t,h["no-transition"])},xt=e=>{const t=v();if(e.target===t){const n=b();t.removeEventListener(ue,xt),n.style.overflowY="auto"}},Pt=(e,t)=>{ue&&te(t)?(e.style.overflowY="hidden",t.addEventListener(ue,xt)):e.style.overflowY="auto"},Et=(e,t,n)=>{var o;(/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream||"MacIntel"===navigator.platform&&1{e.scrollTop=0})},St=(e,t,n)=>{W(e,n.showClass.backdrop),t.style.setProperty("opacity","0","important"),Z(t,"grid"),setTimeout(()=>{W(t,n.showClass.popup),t.style.removeProperty("opacity")},10),W([document.documentElement,document.body],h.shown),n.heightAuto&&n.backdrop&&!n.toast&&W([document.documentElement,document.body],h["height-auto"])},Tt=e=>e.checked?1:0,Lt=e=>e.checked?e.value:null,Ot=e=>e.files.length?null!==e.getAttribute("multiple")?e.files:e.files[0]:null,jt=(t,n)=>{const o=v(),i=e=>It[n.input](o,Mt(e),n);u(n.inputOptions)||p(n.inputOptions)?(De(P()),d(n.inputOptions).then(e=>{t.hideLoading(),i(e)})):"object"==typeof n.inputOptions?i(n.inputOptions):r("Unexpected type of inputOptions! Expected object, Map or Promise, got ".concat(typeof n.inputOptions))},Dt=(t,n)=>{const o=t.getInput();J(o),d(n.inputValue).then(e=>{o.value="number"===n.input?parseFloat(e)||0:"".concat(e),Z(o),o.focus(),t.hideLoading()}).catch(e=>{r("Error in inputValue promise: ".concat(e)),o.value="",Z(o),o.focus(),t.hideLoading()})},It={select:(e,t,i)=>{const a=K(e,h.select),s=(e,t,n)=>{const o=document.createElement("option");o.value=n,V(o,t),o.selected=Ht(n,i.inputValue),e.appendChild(o)};t.forEach(e=>{var t=e[0];const n=e[1];if(Array.isArray(n)){const o=document.createElement("optgroup");o.label=t,o.disabled=!1,a.appendChild(o),n.forEach(e=>s(o,e[1],e[0]))}else s(a,n,t)}),a.focus()},radio:(e,t,a)=>{const s=K(e,h.radio);t.forEach(e=>{var t=e[0],e=e[1];const n=document.createElement("input"),o=document.createElement("label");n.type="radio",n.name=h.radio,n.value=t,Ht(t,a.inputValue)&&(n.checked=!0);const i=document.createElement("span");V(i,e),i.className=h.label,o.appendChild(n),o.appendChild(i),s.appendChild(o)});const n=s.querySelectorAll("input");n.length&&n[0].focus()}},Mt=n=>{const o=[];return"undefined"!=typeof Map&&n instanceof Map?n.forEach((e,t)=>{let n=e;"object"==typeof n&&(n=Mt(n)),o.push([t,n])}):Object.keys(n).forEach(e=>{let t=n[e];"object"==typeof t&&(t=Mt(t)),o.push([e,t])}),o},Ht=(e,t)=>t&&t.toString()===e.toString(),qt=(e,t)=>{var n=he.innerParams.get(e),o=((e,t)=>{const n=e.getInput();if(!n)return null;switch(t.input){case"checkbox":return Tt(n);case"radio":return Lt(n);case"file":return Ot(n);default:return t.inputAutoTrim?n.value.trim():n.value}})(e,n);n.inputValidator?Vt(e,o,t):e.getInput().checkValidity()?("deny"===t?Nt:Ft)(e,o):(e.enableButtons(),e.showValidationMessage(n.validationMessage))},Vt=(t,n,o)=>{const e=he.innerParams.get(t);t.disableInput();const i=Promise.resolve().then(()=>d(e.inputValidator(n,e.validationMessage)));i.then(e=>{t.enableButtons(),t.enableInput(),e?t.showValidationMessage(e):("deny"===o?Nt:Ft)(t,n)})},Nt=(t,n)=>{const e=he.innerParams.get(t||void 0);if(e.showLoaderOnDeny&&De(E()),e.preDeny){const o=Promise.resolve().then(()=>d(e.preDeny(n,e.validationMessage)));o.then(e=>{!1===e?t.hideLoading():t.closePopup({isDenied:!0,value:void 0===e?n:e})})}else t.closePopup({isDenied:!0,value:n})},Ut=(e,t)=>{e.closePopup({isConfirmed:!0,value:t})},Ft=(t,n)=>{const e=he.innerParams.get(t||void 0);if(e.showLoaderOnConfirm&&De(),e.preConfirm){t.resetValidationMessage();const o=Promise.resolve().then(()=>d(e.preConfirm(n,e.validationMessage)));o.then(e=>{G(x())||!1===e?t.hideLoading():Ut(t,void 0===e?n:e)})}else Ut(t,n)},Rt=(e,t,n)=>{const o=I();if(o.length)return(t+=n)===o.length?t=0:-1===t&&(t=o.length-1),o[t].focus();v().focus()},zt=["ArrowRight","ArrowDown"],Wt=["ArrowLeft","ArrowUp"],_t=(e,t,n)=>{var o=he.innerParams.get(e);o&&(o.stopKeydownPropagation&&t.stopPropagation(),"Enter"===t.key?Kt(e,t,o):"Tab"===t.key?Yt(t,o):[...zt,...Wt].includes(t.key)?Zt(t.key):"Escape"===t.key&&Jt(t,o,n))},Kt=(e,t,n)=>{t.isComposing||t.target&&e.getInput()&&t.target.outerHTML===e.getInput().outerHTML&&(["textarea","file"].includes(n.input)||(je(),t.preventDefault()))},Yt=(e,t)=>{var n=e.target,o=I();let i=-1;for(let e=0;e{const t=P(),n=E(),o=T();if([t,n,o].includes(document.activeElement)){e=zt.includes(e)?"nextElementSibling":"previousElementSibling";const i=document.activeElement[e];i&&i.focus()}},Jt=(e,t,n)=>{c(t.allowEscapeKey)&&(e.preventDefault(),n(l.esc))},Xt=(t,e,n)=>{e.popup.onclick=()=>{var e=he.innerParams.get(t);e.showConfirmButton||e.showDenyButton||e.showCancelButton||e.showCloseButton||e.timer||e.input||n(l.close)}};let $t=!1;const Gt=t=>{t.popup.onmousedown=()=>{t.container.onmouseup=function(e){t.container.onmouseup=void 0,e.target===t.container&&($t=!0)}}},Qt=t=>{t.container.onmousedown=()=>{t.popup.onmouseup=function(e){t.popup.onmouseup=void 0,e.target!==t.popup&&!t.popup.contains(e.target)||($t=!0)}}},en=(n,o,i)=>{o.container.onclick=e=>{var t=he.innerParams.get(n);$t?$t=!1:e.target===o.container&&c(t.allowOutsideClick)&&i(l.backdrop)}};const tn=(e,t,n)=>{var o=j();J(o),t.timer&&(e.timeout=new dt(()=>{n("timer"),delete e.timeout},t.timer),t.timerProgressBar&&(Z(o),setTimeout(()=>{e.timeout&&e.timeout.running&&ne(t.timer)})))},nn=(e,t)=>{if(!t.toast)return c(t.allowEnterKey)?void(on(e,t)||Rt(0,-1,1)):an()},on=(e,t)=>t.focusDeny&&G(e.denyButton)?(e.denyButton.focus(),!0):t.focusCancel&&G(e.cancelButton)?(e.cancelButton.focus(),!0):!(!t.focusConfirm||!G(e.confirmButton))&&(e.confirmButton.focus(),!0),an=()=>{document.activeElement&&"function"==typeof document.activeElement.blur&&document.activeElement.blur()};const sn=e=>{for(const t in e)e[t]=new WeakMap};e=Object.freeze({hideLoading:Xe,disableLoading:Xe,getInput:function(e){var t=he.innerParams.get(e||this);return(e=he.domCache.get(e||this))?F(e.popup,t.input):null},close:st,closePopup:st,closeModal:st,closeToast:st,enableButtons:function(){lt(this,["confirmButton","denyButton","cancelButton"],!1)},disableButtons:function(){lt(this,["confirmButton","denyButton","cancelButton"],!0)},enableInput:function(){return ut(this.getInput(),!1)},disableInput:function(){return ut(this.getInput(),!0)},showValidationMessage:function(e){const t=he.domCache.get(this);var n=he.innerParams.get(this);V(t.validationMessage,e),t.validationMessage.className=h["validation-message"],n.customClass&&n.customClass.validationMessage&&W(t.validationMessage,n.customClass.validationMessage),Z(t.validationMessage);const o=this.getInput();o&&(o.setAttribute("aria-invalid",!0),o.setAttribute("aria-describedby",h["validation-message"]),R(o),W(o,h.inputerror))},resetValidationMessage:function(){var e=he.domCache.get(this);e.validationMessage&&J(e.validationMessage);const t=this.getInput();t&&(t.removeAttribute("aria-invalid"),t.removeAttribute("aria-describedby"),_(t,h.inputerror))},getProgressSteps:function(){return he.domCache.get(this).progressSteps},_main:function(e,t={}){Ze(Object.assign({},t,e)),Me.currentInstance&&(Me.currentInstance._destroy(),M()&&ot()),Me.currentInstance=this,mt(e=((e,t)=>{const n=gt(e),o=Object.assign({},Re,t,n,e);return o.showClass=Object.assign({},Re.showClass,o.showClass),o.hideClass=Object.assign({},Re.hideClass,o.hideClass),o})(e,t)),Object.freeze(e),Me.timeout&&(Me.timeout.stop(),delete Me.timeout),clearTimeout(Me.restoreFocusTimeout);var s,r,c,t=(e=>{const t={popup:v(),container:b(),actions:L(),confirmButton:P(),denyButton:E(),cancelButton:T(),loader:S(),closeButton:D(),validationMessage:x(),progressSteps:B()};return he.domCache.set(e,t),t})(this);return Oe(this,e),he.innerParams.set(this,e),s=this,r=t,c=e,new Promise(e=>{const t=e=>{s.closePopup({isDismissed:!0,dismiss:e})};var n,o,i,a;it.swalPromiseResolve.set(s,e),r.confirmButton.onclick=()=>(e=>{var t=he.innerParams.get(e);e.disableButtons(),t.input?qt(e,"confirm"):Ft(e,!0)})(s),r.denyButton.onclick=()=>(e=>{var t=he.innerParams.get(e);e.disableButtons(),t.returnInputValueOnDeny?qt(e,"deny"):Nt(e,!1)})(s),r.cancelButton.onclick=()=>((e,t)=>{e.disableButtons(),t(l.cancel)})(s,t),r.closeButton.onclick=()=>t(l.close),n=s,a=r,e=t,he.innerParams.get(n).toast?Xt(n,a,e):(Gt(a),Qt(a),en(n,a,e)),o=s,a=Me,e=c,i=t,a.keydownTarget&&a.keydownHandlerAdded&&(a.keydownTarget.removeEventListener("keydown",a.keydownHandler,{capture:a.keydownListenerCapture}),a.keydownHandlerAdded=!1),e.toast||(a.keydownHandler=e=>_t(o,e,i),a.keydownTarget=e.keydownListenerCapture?window:v(),a.keydownListenerCapture=e.keydownListenerCapture,a.keydownTarget.addEventListener("keydown",a.keydownHandler,{capture:a.keydownListenerCapture}),a.keydownHandlerAdded=!0),e=s,"select"===(a=c).input||"radio"===a.input?jt(e,a):["text","email","number","tel","textarea"].includes(a.input)&&(u(a.inputValue)||p(a.inputValue))&&(De(P()),Dt(e,a)),Bt(c),tn(Me,c,t),nn(r,c),setTimeout(()=>{r.container.scrollTop=0})})},update:function(t){var e=v(),n=he.innerParams.get(this);if(!e||N(e,n.hideClass.popup))return s("You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup.");const o={};Object.keys(t).forEach(e=>{ln.isUpdatableParameter(e)?o[e]=t[e]:s('Invalid parameter to update: "'.concat(e,'". Updatable params are listed here: https://github.com/sweetalert2/sweetalert2/blob/master/src/utils/params.js\n\nIf you think this parameter should be updatable, request it here: https://github.com/sweetalert2/sweetalert2/issues/new?template=02_feature_request.md'))}),n=Object.assign({},n,o),Oe(this,n),he.innerParams.set(this,n),Object.defineProperties(this,{params:{value:Object.assign({},this.params,t),writable:!1,enumerable:!0}})},_destroy:function(){var e=he.domCache.get(this);const t=he.innerParams.get(this);t&&(e.popup&&Me.swalCloseEventFinishedCallback&&(Me.swalCloseEventFinishedCallback(),delete Me.swalCloseEventFinishedCallback),Me.deferDisposalTimer&&(clearTimeout(Me.deferDisposalTimer),delete Me.deferDisposalTimer),"function"==typeof t.didDestroy&&t.didDestroy(),delete this.params,delete Me.keydownHandler,delete Me.keydownTarget,sn(he),sn(it),delete Me.currentInstance)}});let rn;class cn{constructor(...e){"undefined"!=typeof window&&(rn=this,e=Object.freeze(this.constructor.argsToParams(e)),Object.defineProperties(this,{params:{value:e,writable:!1,enumerable:!0,configurable:!0}}),e=this._main(this.params),he.promise.set(this,e))}then(e){const t=he.promise.get(this);return t.then(e)}finally(e){const t=he.promise.get(this);return t.finally(e)}}Object.assign(cn.prototype,e),Object.assign(cn,Je),Object.keys(e).forEach(t=>{cn[t]=function(...e){if(rn)return rn[t](...e)}}),cn.DismissReason=l,cn.version="11.1.5";const ln=cn;return ln.default=ln,ln}),void 0!==this&&this.Sweetalert2&&(this.swal=this.sweetAlert=this.Swal=this.SweetAlert=this.Sweetalert2); \ No newline at end of file diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Application.Contracts/Volo/Abp/SettingManagement/AllowTenantsToChangeEmailSettingsFeatureSimpleStateChecker.cs b/modules/setting-management/src/Volo.Abp.SettingManagement.Application.Contracts/Volo/Abp/SettingManagement/AllowTenantsToChangeEmailSettingsFeatureSimpleStateChecker.cs new file mode 100644 index 0000000000..30d6ffcf79 --- /dev/null +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Application.Contracts/Volo/Abp/SettingManagement/AllowTenantsToChangeEmailSettingsFeatureSimpleStateChecker.cs @@ -0,0 +1,25 @@ +using System.Threading.Tasks; +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp.Authorization.Permissions; +using Volo.Abp.Features; +using Volo.Abp.MultiTenancy; +using Volo.Abp.SimpleStateChecking; + +namespace Volo.Abp.SettingManagement +{ + public class AllowTenantsToChangeEmailSettingsFeatureSimpleStateChecker : ISimpleStateChecker + { + public async Task IsEnabledAsync(SimpleStateCheckerContext context) + { + var currentTenant = context.ServiceProvider.GetRequiredService(); + + if (!currentTenant.IsAvailable) + { + return true; + } + + var featureChecker = context.ServiceProvider.GetRequiredService(); + return await featureChecker.IsEnabledAsync(SettingManagementFeatures.AllowTenantsToChangeEmailSettings); + } + } +} diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Application.Contracts/Volo/Abp/SettingManagement/SettingManagementPermissionDefinitionProvider.cs b/modules/setting-management/src/Volo.Abp.SettingManagement.Application.Contracts/Volo/Abp/SettingManagement/SettingManagementPermissionDefinitionProvider.cs index 7550c44c6a..06ca852da1 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Application.Contracts/Volo/Abp/SettingManagement/SettingManagementPermissionDefinitionProvider.cs +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Application.Contracts/Volo/Abp/SettingManagement/SettingManagementPermissionDefinitionProvider.cs @@ -1,6 +1,5 @@ using Volo.Abp.Authorization.Permissions; using Volo.Abp.Localization; -using Volo.Abp.MultiTenancy; using Volo.Abp.SettingManagement.Localization; namespace Volo.Abp.SettingManagement @@ -10,7 +9,10 @@ namespace Volo.Abp.SettingManagement public override void Define(IPermissionDefinitionContext context) { var moduleGroup = context.AddGroup(SettingManagementPermissions.GroupName, L("Permission:SettingManagement")); - moduleGroup.AddPermission(SettingManagementPermissions.Emailing, L("Permission:Emailing"), multiTenancySide: MultiTenancySides.Host); + + moduleGroup + .AddPermission(SettingManagementPermissions.Emailing, L("Permission:Emailing")) + .StateCheckers.Add(new AllowTenantsToChangeEmailSettingsFeatureSimpleStateChecker()); } private static LocalizableString L(string name) diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Application/Volo/Abp/SettingManagement/EmailSettingsAppService.cs b/modules/setting-management/src/Volo.Abp.SettingManagement.Application/Volo/Abp/SettingManagement/EmailSettingsAppService.cs index 5d4cf1fbca..35266c4306 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Application/Volo/Abp/SettingManagement/EmailSettingsAppService.cs +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Application/Volo/Abp/SettingManagement/EmailSettingsAppService.cs @@ -2,6 +2,8 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Authorization; using Volo.Abp.Emailing; +using Volo.Abp.MultiTenancy; +using Volo.Abp.Features; namespace Volo.Abp.SettingManagement { @@ -17,30 +19,53 @@ namespace Volo.Abp.SettingManagement public virtual async Task GetAsync() { - return new EmailSettingsDto { - SmtpHost = await SettingManager.GetOrNullGlobalAsync(EmailSettingNames.Smtp.Host), - SmtpPort = Convert.ToInt32(await SettingManager.GetOrNullGlobalAsync(EmailSettingNames.Smtp.Port)), - SmtpUserName = await SettingManager.GetOrNullGlobalAsync(EmailSettingNames.Smtp.UserName), - SmtpPassword = await SettingManager.GetOrNullGlobalAsync(EmailSettingNames.Smtp.Password), - SmtpDomain = await SettingManager.GetOrNullGlobalAsync(EmailSettingNames.Smtp.Domain), - SmtpEnableSsl = Convert.ToBoolean(await SettingManager.GetOrNullGlobalAsync(EmailSettingNames.Smtp.EnableSsl)), - SmtpUseDefaultCredentials = Convert.ToBoolean(await SettingManager.GetOrNullGlobalAsync(EmailSettingNames.Smtp.UseDefaultCredentials)), - DefaultFromAddress = await SettingManager.GetOrNullGlobalAsync(EmailSettingNames.DefaultFromAddress), - DefaultFromDisplayName = await SettingManager.GetOrNullGlobalAsync(EmailSettingNames.DefaultFromDisplayName), + await CheckFeatureAsync(); + + var settingsDto = new EmailSettingsDto { + SmtpHost = await SettingProvider.GetOrNullAsync(EmailSettingNames.Smtp.Host), + SmtpPort = Convert.ToInt32(await SettingProvider.GetOrNullAsync(EmailSettingNames.Smtp.Port)), + SmtpUserName = await SettingProvider.GetOrNullAsync(EmailSettingNames.Smtp.UserName), + SmtpPassword = await SettingProvider.GetOrNullAsync(EmailSettingNames.Smtp.Password), + SmtpDomain = await SettingProvider.GetOrNullAsync(EmailSettingNames.Smtp.Domain), + SmtpEnableSsl = Convert.ToBoolean(await SettingProvider.GetOrNullAsync(EmailSettingNames.Smtp.EnableSsl)), + SmtpUseDefaultCredentials = Convert.ToBoolean(await SettingProvider.GetOrNullAsync(EmailSettingNames.Smtp.UseDefaultCredentials)), + DefaultFromAddress = await SettingProvider.GetOrNullAsync(EmailSettingNames.DefaultFromAddress), + DefaultFromDisplayName = await SettingProvider.GetOrNullAsync(EmailSettingNames.DefaultFromDisplayName), }; + + if (CurrentTenant.IsAvailable) + { + settingsDto.SmtpHost = await SettingManager.GetOrNullForTenantAsync(EmailSettingNames.Smtp.Host, CurrentTenant.GetId(), false); + settingsDto.SmtpUserName = await SettingManager.GetOrNullForTenantAsync(EmailSettingNames.Smtp.UserName, CurrentTenant.GetId(), false); + settingsDto.SmtpPassword = await SettingManager.GetOrNullForTenantAsync(EmailSettingNames.Smtp.Password, CurrentTenant.GetId(), false); + settingsDto.SmtpDomain = await SettingManager.GetOrNullForTenantAsync(EmailSettingNames.Smtp.Domain, CurrentTenant.GetId(), false); + } + + return settingsDto; } public virtual async Task UpdateAsync(UpdateEmailSettingsDto input) { - await SettingManager.SetGlobalAsync(EmailSettingNames.Smtp.Host, input.SmtpHost); - await SettingManager.SetGlobalAsync(EmailSettingNames.Smtp.Port, input.SmtpPort.ToString()); - await SettingManager.SetGlobalAsync(EmailSettingNames.Smtp.UserName, input.SmtpUserName); - await SettingManager.SetGlobalAsync(EmailSettingNames.Smtp.Password, input.SmtpPassword); - await SettingManager.SetGlobalAsync(EmailSettingNames.Smtp.Domain, input.SmtpDomain); - await SettingManager.SetGlobalAsync(EmailSettingNames.Smtp.EnableSsl, input.SmtpEnableSsl.ToString()); - await SettingManager.SetGlobalAsync(EmailSettingNames.Smtp.UseDefaultCredentials, input.SmtpUseDefaultCredentials.ToString().ToLowerInvariant()); - await SettingManager.SetGlobalAsync(EmailSettingNames.DefaultFromAddress, input.DefaultFromAddress); - await SettingManager.SetGlobalAsync(EmailSettingNames.DefaultFromDisplayName, input.DefaultFromDisplayName); + await CheckFeatureAsync(); + + await SettingManager.SetForTenantOrGlobalAsync(CurrentTenant.Id, EmailSettingNames.Smtp.Host, input.SmtpHost); + await SettingManager.SetForTenantOrGlobalAsync(CurrentTenant.Id, EmailSettingNames.Smtp.Port, input.SmtpPort.ToString()); + await SettingManager.SetForTenantOrGlobalAsync(CurrentTenant.Id, EmailSettingNames.Smtp.UserName, input.SmtpUserName); + await SettingManager.SetForTenantOrGlobalAsync(CurrentTenant.Id, EmailSettingNames.Smtp.Password, input.SmtpPassword); + await SettingManager.SetForTenantOrGlobalAsync(CurrentTenant.Id, EmailSettingNames.Smtp.Domain, input.SmtpDomain); + await SettingManager.SetForTenantOrGlobalAsync(CurrentTenant.Id, EmailSettingNames.Smtp.EnableSsl, input.SmtpEnableSsl.ToString()); + await SettingManager.SetForTenantOrGlobalAsync(CurrentTenant.Id, EmailSettingNames.Smtp.UseDefaultCredentials, input.SmtpUseDefaultCredentials.ToString().ToLowerInvariant()); + await SettingManager.SetForTenantOrGlobalAsync(CurrentTenant.Id, EmailSettingNames.DefaultFromAddress, input.DefaultFromAddress); + await SettingManager.SetForTenantOrGlobalAsync(CurrentTenant.Id, EmailSettingNames.DefaultFromDisplayName, input.DefaultFromDisplayName); + } + + protected virtual async Task CheckFeatureAsync() + { + await FeatureChecker.CheckEnabledAsync(SettingManagementFeatures.Enable); + if (CurrentTenant.IsAvailable) + { + await FeatureChecker.CheckEnabledAsync(SettingManagementFeatures.AllowTenantsToChangeEmailSettings); + } } } } diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Blazor/Settings/EmailingPageContributor.cs b/modules/setting-management/src/Volo.Abp.SettingManagement.Blazor/Settings/EmailingPageContributor.cs index 5176c393c7..e0336bda4d 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Blazor/Settings/EmailingPageContributor.cs +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Blazor/Settings/EmailingPageContributor.cs @@ -2,6 +2,8 @@ using Microsoft.AspNetCore.Authorization; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Localization; +using Volo.Abp.Features; +using Volo.Abp.MultiTenancy; using Volo.Abp.SettingManagement.Blazor.Pages.SettingManagement.EmailSettingGroup; using Volo.Abp.SettingManagement.Localization; @@ -33,9 +35,29 @@ namespace Volo.Abp.SettingManagement.Blazor.Settings private async Task CheckPermissionsInternalAsync(SettingComponentCreationContext context) { + if (!await CheckFeatureAsync(context)) + { + return false; + } + var authorizationService = context.ServiceProvider.GetRequiredService(); return await authorizationService.IsGrantedAsync(SettingManagementPermissions.Emailing); } + + private async Task CheckFeatureAsync(SettingComponentCreationContext context) + { + var currentTenant = context.ServiceProvider.GetRequiredService(); + + if (!currentTenant.IsAvailable) + { + return true; + } + + var featureCheck = context.ServiceProvider.GetRequiredService(); + + return await featureCheck.IsEnabledAsync(SettingManagementFeatures.AllowTenantsToChangeEmailSettings); + + } } } diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/en.json b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/en.json index a58714bf0f..bec50ed27e 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/en.json +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/en.json @@ -17,6 +17,8 @@ "DefaultFromDisplayName": "Default from display name", "Feature:SettingManagementGroup": "Setting Management", "Feature:SettingManagementEnable": "Enable setting management", - "Feature:SettingManagementEnableDescription": "Enable setting management system in the application." + "Feature:SettingManagementEnableDescription": "Enable setting management system in the application.", + "Feature:AllowTenantsToChangeEmailSettings": "Allow tenants to change email settings.", + "Feature:AllowTenantsToChangeEmailSettingsDescription": "Allow tenants to change email settings." } } diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/zh-Hans.json b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/zh-Hans.json index b9763644c4..8606c7da83 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/zh-Hans.json +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/zh-Hans.json @@ -17,6 +17,8 @@ "DefaultFromDisplayName": "默认显示名称", "Feature:SettingManagementGroup": "设置管理", "Feature:SettingManagementEnable": "启用设置管理", - "Feature:SettingManagementEnableDescription": "在应用程序中启用设置管理系统." + "Feature:SettingManagementEnableDescription": "在应用程序中启用设置管理系统.", + "Feature:AllowTenantsToChangeEmailSettings": "允许租户更改邮件设置.", + "Feature:AllowTenantsToChangeEmailSettingsDescription": "允许租户更改邮件设置." } } diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/SettingManagementFeatureDefinitionProvider.cs b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/SettingManagementFeatureDefinitionProvider.cs index 19248e85b1..80a955bb23 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/SettingManagementFeatureDefinitionProvider.cs +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/SettingManagementFeatureDefinitionProvider.cs @@ -5,18 +5,27 @@ using Volo.Abp.Validation.StringValues; namespace Volo.Abp.SettingManagement { - public class SettingManagementFeatureDefinitionProvider: FeatureDefinitionProvider + public class SettingManagementFeatureDefinitionProvider : FeatureDefinitionProvider { public override void Define(IFeatureDefinitionContext context) { var group = context.AddGroup(SettingManagementFeatures.GroupName, L("Feature:SettingManagementGroup")); - group.AddFeature(SettingManagementFeatures.Enable, + var settingEnableFeature = group.AddFeature( + SettingManagementFeatures.Enable, "true", L("Feature:SettingManagementEnable"), L("Feature:SettingManagementEnableDescription"), new ToggleStringValueType()); + + settingEnableFeature.CreateChild( + SettingManagementFeatures.AllowTenantsToChangeEmailSettings, + "false", + L("Feature:AllowTenantsToChangeEmailSettings"), + L("AllowTenantsToChangeEmailSettingsDescription"), + new ToggleStringValueType(), + isAvailableToHost: false); } private static LocalizableString L(string name) diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/SettingManagementFeatures.cs b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/SettingManagementFeatures.cs index e478efc0e3..fd7578dc86 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/SettingManagementFeatures.cs +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/SettingManagementFeatures.cs @@ -5,5 +5,7 @@ public const string GroupName = "SettingManagement"; public const string Enable = GroupName + ".Enable"; + + public const string AllowTenantsToChangeEmailSettings = GroupName + ".AllowTenantsToChangeEmailSettings"; } } diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain/Volo/Abp/SettingManagement/TenantSettingManagerExtensions.cs b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain/Volo/Abp/SettingManagement/TenantSettingManagerExtensions.cs index f5cc345931..fa6139e51b 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain/Volo/Abp/SettingManagement/TenantSettingManagerExtensions.cs +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain/Volo/Abp/SettingManagement/TenantSettingManagerExtensions.cs @@ -37,5 +37,15 @@ namespace Volo.Abp.SettingManagement { return settingManager.SetAsync(name, value, TenantSettingValueProvider.ProviderName, null, forceToSet); } + + public static Task SetForTenantOrGlobalAsync(this ISettingManager settingManager, Guid? tenantId, [NotNull] string name, [CanBeNull] string value, bool forceToSet = false) + { + if (tenantId.HasValue) + { + return settingManager.SetForTenantAsync(tenantId.Value, name, value, forceToSet); + } + + return settingManager.SetGlobalAsync(name, value); + } } } diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.EntityFrameworkCore/Volo/Abp/SettingManagement/EntityFrameworkCore/SettingManagementDbContextModelBuilderExtensions.cs b/modules/setting-management/src/Volo.Abp.SettingManagement.EntityFrameworkCore/Volo/Abp/SettingManagement/EntityFrameworkCore/SettingManagementDbContextModelBuilderExtensions.cs index 5e9f75eefa..aafc18f8de 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.EntityFrameworkCore/Volo/Abp/SettingManagement/EntityFrameworkCore/SettingManagementDbContextModelBuilderExtensions.cs +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.EntityFrameworkCore/Volo/Abp/SettingManagement/EntityFrameworkCore/SettingManagementDbContextModelBuilderExtensions.cs @@ -1,29 +1,14 @@ -using System; -using JetBrains.Annotations; +using JetBrains.Annotations; using Microsoft.EntityFrameworkCore; using Volo.Abp.EntityFrameworkCore.Modeling; namespace Volo.Abp.SettingManagement.EntityFrameworkCore { - public class SettingManagementModelBuilderConfigurationOptions : AbpModelBuilderConfigurationOptions - { - public SettingManagementModelBuilderConfigurationOptions( - [NotNull] string tablePrefix, - [CanBeNull] string schema) - : base( - tablePrefix, - schema) - { - - } - } - public static class SettingManagementDbContextModelBuilderExtensions { //TODO: Instead of getting parameters, get a action of SettingManagementModelBuilderConfigurationOptions like other modules public static void ConfigureSettingManagement( - [NotNull] this ModelBuilder builder, - [CanBeNull] Action optionsAction = null) + [NotNull] this ModelBuilder builder) { Check.NotNull(builder, nameof(builder)); @@ -32,16 +17,9 @@ namespace Volo.Abp.SettingManagement.EntityFrameworkCore return; } - var options = new SettingManagementModelBuilderConfigurationOptions( - AbpSettingManagementDbProperties.DbTablePrefix, - AbpSettingManagementDbProperties.DbSchema - ); - - optionsAction?.Invoke(options); - builder.Entity(b => { - b.ToTable(options.TablePrefix + "Settings", options.Schema); + b.ToTable(AbpSettingManagementDbProperties.DbTablePrefix + "Settings", AbpSettingManagementDbProperties.DbSchema); b.ConfigureByConvention(); diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.HttpApi.Client/ClientProxies/EmailSettingsClientProxy.Generated.cs b/modules/setting-management/src/Volo.Abp.SettingManagement.HttpApi.Client/ClientProxies/EmailSettingsClientProxy.Generated.cs index b1f7965afe..30340ab831 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.HttpApi.Client/ClientProxies/EmailSettingsClientProxy.Generated.cs +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.HttpApi.Client/ClientProxies/EmailSettingsClientProxy.Generated.cs @@ -22,7 +22,10 @@ namespace Volo.Abp.SettingManagement.ClientProxies public virtual async Task UpdateAsync(UpdateEmailSettingsDto input) { - await RequestAsync(nameof(UpdateAsync), input); + await RequestAsync(nameof(UpdateAsync), new ClientProxyRequestTypeValue + { + { typeof(UpdateEmailSettingsDto), input } + }); } } } diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.MongoDB/Volo/Abp/SettingManagement/MongoDB/SettingManagementMongoDbContextExtensions.cs b/modules/setting-management/src/Volo.Abp.SettingManagement.MongoDB/Volo/Abp/SettingManagement/MongoDB/SettingManagementMongoDbContextExtensions.cs index 349341b5d3..71199ecd3e 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.MongoDB/Volo/Abp/SettingManagement/MongoDB/SettingManagementMongoDbContextExtensions.cs +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.MongoDB/Volo/Abp/SettingManagement/MongoDB/SettingManagementMongoDbContextExtensions.cs @@ -1,4 +1,3 @@ -using System; using Volo.Abp.MongoDB; namespace Volo.Abp.SettingManagement.MongoDB @@ -6,20 +5,13 @@ namespace Volo.Abp.SettingManagement.MongoDB public static class SettingManagementMongoDbContextExtensions { public static void ConfigureSettingManagement( - this IMongoModelBuilder builder, - Action optionsAction = null) + this IMongoModelBuilder builder) { Check.NotNull(builder, nameof(builder)); - var options = new SettingManagementMongoModelBuilderConfigurationOptions( - AbpSettingManagementDbProperties.DbTablePrefix - ); - - optionsAction?.Invoke(options); - builder.Entity(b => { - b.CollectionName = options.CollectionPrefix + "Settings"; + b.CollectionName = AbpSettingManagementDbProperties.DbTablePrefix + "Settings"; }); } } diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.MongoDB/Volo/Abp/SettingManagement/MongoDB/SettingManagementMongoModelBuilderConfigurationOptions.cs b/modules/setting-management/src/Volo.Abp.SettingManagement.MongoDB/Volo/Abp/SettingManagement/MongoDB/SettingManagementMongoModelBuilderConfigurationOptions.cs deleted file mode 100644 index bdc423f8a1..0000000000 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.MongoDB/Volo/Abp/SettingManagement/MongoDB/SettingManagementMongoModelBuilderConfigurationOptions.cs +++ /dev/null @@ -1,14 +0,0 @@ -using JetBrains.Annotations; -using Volo.Abp.MongoDB; - -namespace Volo.Abp.SettingManagement.MongoDB -{ - public class SettingManagementMongoModelBuilderConfigurationOptions : AbpMongoModelBuilderConfigurationOptions - { - public SettingManagementMongoModelBuilderConfigurationOptions( - [NotNull] string tablePrefix = "") - : base(tablePrefix) - { - } - } -} \ No newline at end of file diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Settings/EmailingPageContributor.cs b/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Settings/EmailingPageContributor.cs index e940d0467b..dd596cab16 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Settings/EmailingPageContributor.cs +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Settings/EmailingPageContributor.cs @@ -2,6 +2,8 @@ using Microsoft.AspNetCore.Authorization; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Localization; +using Volo.Abp.Features; +using Volo.Abp.MultiTenancy; using Volo.Abp.SettingManagement.Localization; using Volo.Abp.SettingManagement.Web.Pages.SettingManagement; using Volo.Abp.SettingManagement.Web.Pages.SettingManagement.Components.EmailSettingGroup; @@ -34,9 +36,30 @@ namespace Volo.Abp.SettingManagement.Web.Settings private async Task CheckPermissionsInternalAsync(SettingPageCreationContext context) { + if (!await CheckFeatureAsync(context)) + { + return false; + } + var authorizationService = context.ServiceProvider.GetRequiredService(); return await authorizationService.IsGrantedAsync(SettingManagementPermissions.Emailing); } + + private async Task CheckFeatureAsync(SettingPageCreationContext context) + { + var featureCheck = context.ServiceProvider.GetRequiredService(); + if (!await featureCheck.IsEnabledAsync(SettingManagementFeatures.Enable)) + { + return false; + } + + if (context.ServiceProvider.GetRequiredService().IsAvailable) + { + return await featureCheck.IsEnabledAsync(SettingManagementFeatures.AllowTenantsToChangeEmailSettings); + } + + return true; + } } } diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.EntityFrameworkCore/Volo/Abp/TenantManagement/EntityFrameworkCore/AbpTenantManagementDbContextModelCreatingExtensions.cs b/modules/tenant-management/src/Volo.Abp.TenantManagement.EntityFrameworkCore/Volo/Abp/TenantManagement/EntityFrameworkCore/AbpTenantManagementDbContextModelCreatingExtensions.cs index 398dc66fe5..95364c3901 100644 --- a/modules/tenant-management/src/Volo.Abp.TenantManagement.EntityFrameworkCore/Volo/Abp/TenantManagement/EntityFrameworkCore/AbpTenantManagementDbContextModelCreatingExtensions.cs +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.EntityFrameworkCore/Volo/Abp/TenantManagement/EntityFrameworkCore/AbpTenantManagementDbContextModelCreatingExtensions.cs @@ -1,4 +1,3 @@ -using System; using JetBrains.Annotations; using Microsoft.EntityFrameworkCore; using Volo.Abp.EntityFrameworkCore.Modeling; @@ -8,8 +7,7 @@ namespace Volo.Abp.TenantManagement.EntityFrameworkCore public static class AbpTenantManagementDbContextModelCreatingExtensions { public static void ConfigureTenantManagement( - this ModelBuilder builder, - [CanBeNull] Action optionsAction = null) + this ModelBuilder builder) { Check.NotNull(builder, nameof(builder)); @@ -18,16 +16,9 @@ namespace Volo.Abp.TenantManagement.EntityFrameworkCore return; } - var options = new AbpTenantManagementModelBuilderConfigurationOptions( - AbpTenantManagementDbProperties.DbTablePrefix, - AbpTenantManagementDbProperties.DbSchema - ); - - optionsAction?.Invoke(options); - builder.Entity(b => { - b.ToTable(options.TablePrefix + "Tenants", options.Schema); + b.ToTable(AbpTenantManagementDbProperties.DbTablePrefix + "Tenants", AbpTenantManagementDbProperties.DbSchema); b.ConfigureByConvention(); @@ -42,7 +33,7 @@ namespace Volo.Abp.TenantManagement.EntityFrameworkCore builder.Entity(b => { - b.ToTable(options.TablePrefix + "TenantConnectionStrings", options.Schema); + b.ToTable(AbpTenantManagementDbProperties.DbTablePrefix + "TenantConnectionStrings", AbpTenantManagementDbProperties.DbSchema); b.ConfigureByConvention(); diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.EntityFrameworkCore/Volo/Abp/TenantManagement/EntityFrameworkCore/AbpTenantManagementModelBuilderConfigurationOptions.cs b/modules/tenant-management/src/Volo.Abp.TenantManagement.EntityFrameworkCore/Volo/Abp/TenantManagement/EntityFrameworkCore/AbpTenantManagementModelBuilderConfigurationOptions.cs deleted file mode 100644 index 849ed68bae..0000000000 --- a/modules/tenant-management/src/Volo.Abp.TenantManagement.EntityFrameworkCore/Volo/Abp/TenantManagement/EntityFrameworkCore/AbpTenantManagementModelBuilderConfigurationOptions.cs +++ /dev/null @@ -1,18 +0,0 @@ -using JetBrains.Annotations; -using Volo.Abp.EntityFrameworkCore.Modeling; - -namespace Volo.Abp.TenantManagement.EntityFrameworkCore -{ - public class AbpTenantManagementModelBuilderConfigurationOptions : AbpModelBuilderConfigurationOptions - { - public AbpTenantManagementModelBuilderConfigurationOptions( - [NotNull] string tablePrefix, - [CanBeNull] string schema) - : base( - tablePrefix, - schema) - { - - } - } -} \ No newline at end of file diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.HttpApi.Client/ClientProxies/TenantClientProxy.Generated.cs b/modules/tenant-management/src/Volo.Abp.TenantManagement.HttpApi.Client/ClientProxies/TenantClientProxy.Generated.cs index b28767ef19..c067cf66be 100644 --- a/modules/tenant-management/src/Volo.Abp.TenantManagement.HttpApi.Client/ClientProxies/TenantClientProxy.Generated.cs +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.HttpApi.Client/ClientProxies/TenantClientProxy.Generated.cs @@ -17,42 +17,68 @@ namespace Volo.Abp.TenantManagement.ClientProxies { public virtual async Task GetAsync(Guid id) { - return await RequestAsync(nameof(GetAsync), id); + return await RequestAsync(nameof(GetAsync), new ClientProxyRequestTypeValue + { + { typeof(Guid), id } + }); } public virtual async Task> GetListAsync(GetTenantsInput input) { - return await RequestAsync>(nameof(GetListAsync), input); + return await RequestAsync>(nameof(GetListAsync), new ClientProxyRequestTypeValue + { + { typeof(GetTenantsInput), input } + }); } public virtual async Task CreateAsync(TenantCreateDto input) { - return await RequestAsync(nameof(CreateAsync), input); + return await RequestAsync(nameof(CreateAsync), new ClientProxyRequestTypeValue + { + { typeof(TenantCreateDto), input } + }); } public virtual async Task UpdateAsync(Guid id, TenantUpdateDto input) { - return await RequestAsync(nameof(UpdateAsync), id, input); + return await RequestAsync(nameof(UpdateAsync), new ClientProxyRequestTypeValue + { + { typeof(Guid), id }, + { typeof(TenantUpdateDto), input } + }); } public virtual async Task DeleteAsync(Guid id) { - await RequestAsync(nameof(DeleteAsync), id); + await RequestAsync(nameof(DeleteAsync), new ClientProxyRequestTypeValue + { + { typeof(Guid), id } + }); } public virtual async Task GetDefaultConnectionStringAsync(Guid id) { - return await RequestAsync(nameof(GetDefaultConnectionStringAsync), id); + return await RequestAsync(nameof(GetDefaultConnectionStringAsync), new ClientProxyRequestTypeValue + { + { typeof(Guid), id } + }); } public virtual async Task UpdateDefaultConnectionStringAsync(Guid id, string defaultConnectionString) { - await RequestAsync(nameof(UpdateDefaultConnectionStringAsync), id, defaultConnectionString); + await RequestAsync(nameof(UpdateDefaultConnectionStringAsync), new ClientProxyRequestTypeValue + { + { typeof(Guid), id }, + { typeof(string), defaultConnectionString } + }); } public virtual async Task DeleteDefaultConnectionStringAsync(Guid id) { - await RequestAsync(nameof(DeleteDefaultConnectionStringAsync), id); + await RequestAsync(nameof(DeleteDefaultConnectionStringAsync), new ClientProxyRequestTypeValue + { + { typeof(Guid), id } + }); } } } diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.MongoDB/Volo/Abp/TenantManagement/MongoDb/AbpTenantManagementMongoDbContextExtensions.cs b/modules/tenant-management/src/Volo.Abp.TenantManagement.MongoDB/Volo/Abp/TenantManagement/MongoDb/AbpTenantManagementMongoDbContextExtensions.cs index 18b2049450..92f6db2d95 100644 --- a/modules/tenant-management/src/Volo.Abp.TenantManagement.MongoDB/Volo/Abp/TenantManagement/MongoDb/AbpTenantManagementMongoDbContextExtensions.cs +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.MongoDB/Volo/Abp/TenantManagement/MongoDb/AbpTenantManagementMongoDbContextExtensions.cs @@ -1,25 +1,17 @@ -using System; -using Volo.Abp.MongoDB; +using Volo.Abp.MongoDB; namespace Volo.Abp.TenantManagement.MongoDB { public static class AbpTenantManagementMongoDbContextExtensions { public static void ConfigureTenantManagement( - this IMongoModelBuilder builder, - Action optionsAction = null) + this IMongoModelBuilder builder) { Check.NotNull(builder, nameof(builder)); - var options = new TenantManagementMongoModelBuilderConfigurationOptions( - AbpTenantManagementDbProperties.DbTablePrefix - ); - - optionsAction?.Invoke(options); - builder.Entity(b => { - b.CollectionName = options.CollectionPrefix + "Tenants"; + b.CollectionName = AbpTenantManagementDbProperties.DbTablePrefix + "Tenants"; }); } } diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.MongoDB/Volo/Abp/TenantManagement/MongoDb/TenantManagementMongoModelBuilderConfigurationOptions.cs b/modules/tenant-management/src/Volo.Abp.TenantManagement.MongoDB/Volo/Abp/TenantManagement/MongoDb/TenantManagementMongoModelBuilderConfigurationOptions.cs deleted file mode 100644 index 09f54572b2..0000000000 --- a/modules/tenant-management/src/Volo.Abp.TenantManagement.MongoDB/Volo/Abp/TenantManagement/MongoDb/TenantManagementMongoModelBuilderConfigurationOptions.cs +++ /dev/null @@ -1,14 +0,0 @@ -using JetBrains.Annotations; -using Volo.Abp.MongoDB; - -namespace Volo.Abp.TenantManagement.MongoDB -{ - public class TenantManagementMongoModelBuilderConfigurationOptions : AbpMongoModelBuilderConfigurationOptions - { - public TenantManagementMongoModelBuilderConfigurationOptions( - [NotNull] string tablePrefix = "") - : base(tablePrefix) - { - } - } -} \ No newline at end of file diff --git a/modules/virtual-file-explorer/app/Volo.Abp.VirtualFileExplorer.DemoApp/wwwroot/libs/sweetalert2/sweetalert2.all.js b/modules/virtual-file-explorer/app/Volo.Abp.VirtualFileExplorer.DemoApp/wwwroot/libs/sweetalert2/sweetalert2.all.js new file mode 100644 index 0000000000..8cbddafe42 --- /dev/null +++ b/modules/virtual-file-explorer/app/Volo.Abp.VirtualFileExplorer.DemoApp/wwwroot/libs/sweetalert2/sweetalert2.all.js @@ -0,0 +1,3123 @@ +/*! +* sweetalert2 v11.1.5 +* Released under the MIT License. +*/ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : + typeof define === 'function' && define.amd ? define(factory) : + (global = global || self, global.Sweetalert2 = factory()); +}(this, function () { 'use strict'; + + const DismissReason = Object.freeze({ + cancel: 'cancel', + backdrop: 'backdrop', + close: 'close', + esc: 'esc', + timer: 'timer' + }); + + const consolePrefix = 'SweetAlert2:'; + /** + * Filter the unique values into a new array + * @param arr + */ + + const uniqueArray = arr => { + const result = []; + + for (let i = 0; i < arr.length; i++) { + if (result.indexOf(arr[i]) === -1) { + result.push(arr[i]); + } + } + + return result; + }; + /** + * Capitalize the first letter of a string + * @param str + */ + + const capitalizeFirstLetter = str => str.charAt(0).toUpperCase() + str.slice(1); + /** + * Convert NodeList to Array + * @param nodeList + */ + + const toArray = nodeList => Array.prototype.slice.call(nodeList); + /** + * Standardise console warnings + * @param message + */ + + const warn = message => { + console.warn("".concat(consolePrefix, " ").concat(typeof message === 'object' ? message.join(' ') : message)); + }; + /** + * Standardise console errors + * @param message + */ + + const error = message => { + console.error("".concat(consolePrefix, " ").concat(message)); + }; + /** + * Private global state for `warnOnce` + * @type {Array} + * @private + */ + + const previousWarnOnceMessages = []; + /** + * Show a console warning, but only if it hasn't already been shown + * @param message + */ + + const warnOnce = message => { + if (!previousWarnOnceMessages.includes(message)) { + previousWarnOnceMessages.push(message); + warn(message); + } + }; + /** + * Show a one-time console warning about deprecated params/methods + */ + + const warnAboutDeprecation = (deprecatedParam, useInstead) => { + warnOnce("\"".concat(deprecatedParam, "\" is deprecated and will be removed in the next major release. Please use \"").concat(useInstead, "\" instead.")); + }; + /** + * If `arg` is a function, call it (with no arguments or context) and return the result. + * Otherwise, just pass the value through + * @param arg + */ + + const callIfFunction = arg => typeof arg === 'function' ? arg() : arg; + const hasToPromiseFn = arg => arg && typeof arg.toPromise === 'function'; + const asPromise = arg => hasToPromiseFn(arg) ? arg.toPromise() : Promise.resolve(arg); + const isPromise = arg => arg && Promise.resolve(arg) === arg; + + const isJqueryElement = elem => typeof elem === 'object' && elem.jquery; + + const isElement = elem => elem instanceof Element || isJqueryElement(elem); + + const argsToParams = args => { + const params = {}; + + if (typeof args[0] === 'object' && !isElement(args[0])) { + Object.assign(params, args[0]); + } else { + ['title', 'html', 'icon'].forEach((name, index) => { + const arg = args[index]; + + if (typeof arg === 'string' || isElement(arg)) { + params[name] = arg; + } else if (arg !== undefined) { + error("Unexpected type of ".concat(name, "! Expected \"string\" or \"Element\", got ").concat(typeof arg)); + } + }); + } + + return params; + }; + + const swalPrefix = 'swal2-'; + const prefix = items => { + const result = {}; + + for (const i in items) { + result[items[i]] = swalPrefix + items[i]; + } + + return result; + }; + const swalClasses = prefix(['container', 'shown', 'height-auto', 'iosfix', 'popup', 'modal', 'no-backdrop', 'no-transition', 'toast', 'toast-shown', 'show', 'hide', 'close', 'title', 'html-container', 'actions', 'confirm', 'deny', 'cancel', 'default-outline', 'footer', 'icon', 'icon-content', 'image', 'input', 'file', 'range', 'select', 'radio', 'checkbox', 'label', 'textarea', 'inputerror', 'input-label', 'validation-message', 'progress-steps', 'active-progress-step', 'progress-step', 'progress-step-line', 'loader', 'loading', 'styled', 'top', 'top-start', 'top-end', 'top-left', 'top-right', 'center', 'center-start', 'center-end', 'center-left', 'center-right', 'bottom', 'bottom-start', 'bottom-end', 'bottom-left', 'bottom-right', 'grow-row', 'grow-column', 'grow-fullscreen', 'rtl', 'timer-progress-bar', 'timer-progress-bar-container', 'scrollbar-measure', 'icon-success', 'icon-warning', 'icon-info', 'icon-question', 'icon-error']); + const iconTypes = prefix(['success', 'warning', 'info', 'question', 'error']); + + const getContainer = () => document.body.querySelector(".".concat(swalClasses.container)); + const elementBySelector = selectorString => { + const container = getContainer(); + return container ? container.querySelector(selectorString) : null; + }; + + const elementByClass = className => { + return elementBySelector(".".concat(className)); + }; + + const getPopup = () => elementByClass(swalClasses.popup); + const getIcon = () => elementByClass(swalClasses.icon); + const getTitle = () => elementByClass(swalClasses.title); + const getHtmlContainer = () => elementByClass(swalClasses['html-container']); + const getImage = () => elementByClass(swalClasses.image); + const getProgressSteps = () => elementByClass(swalClasses['progress-steps']); + const getValidationMessage = () => elementByClass(swalClasses['validation-message']); + const getConfirmButton = () => elementBySelector(".".concat(swalClasses.actions, " .").concat(swalClasses.confirm)); + const getDenyButton = () => elementBySelector(".".concat(swalClasses.actions, " .").concat(swalClasses.deny)); + const getInputLabel = () => elementByClass(swalClasses['input-label']); + const getLoader = () => elementBySelector(".".concat(swalClasses.loader)); + const getCancelButton = () => elementBySelector(".".concat(swalClasses.actions, " .").concat(swalClasses.cancel)); + const getActions = () => elementByClass(swalClasses.actions); + const getFooter = () => elementByClass(swalClasses.footer); + const getTimerProgressBar = () => elementByClass(swalClasses['timer-progress-bar']); + const getCloseButton = () => elementByClass(swalClasses.close); // https://github.com/jkup/focusable/blob/master/index.js + + const focusable = "\n a[href],\n area[href],\n input:not([disabled]),\n select:not([disabled]),\n textarea:not([disabled]),\n button:not([disabled]),\n iframe,\n object,\n embed,\n [tabindex=\"0\"],\n [contenteditable],\n audio[controls],\n video[controls],\n summary\n"; + const getFocusableElements = () => { + const focusableElementsWithTabindex = toArray(getPopup().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')) // sort according to tabindex + .sort((a, b) => { + a = parseInt(a.getAttribute('tabindex')); + b = parseInt(b.getAttribute('tabindex')); + + if (a > b) { + return 1; + } else if (a < b) { + return -1; + } + + return 0; + }); + const otherFocusableElements = toArray(getPopup().querySelectorAll(focusable)).filter(el => el.getAttribute('tabindex') !== '-1'); + return uniqueArray(focusableElementsWithTabindex.concat(otherFocusableElements)).filter(el => isVisible(el)); + }; + const isModal = () => { + return !isToast() && !document.body.classList.contains(swalClasses['no-backdrop']); + }; + const isToast = () => { + return document.body.classList.contains(swalClasses['toast-shown']); + }; + const isLoading = () => { + return getPopup().hasAttribute('data-loading'); + }; + + const states = { + previousBodyPadding: null + }; + const setInnerHtml = (elem, html) => { + // #1926 + elem.textContent = ''; + + if (html) { + const parser = new DOMParser(); + const parsed = parser.parseFromString(html, "text/html"); + toArray(parsed.querySelector('head').childNodes).forEach(child => { + elem.appendChild(child); + }); + toArray(parsed.querySelector('body').childNodes).forEach(child => { + elem.appendChild(child); + }); + } + }; + const hasClass = (elem, className) => { + if (!className) { + return false; + } + + const classList = className.split(/\s+/); + + for (let i = 0; i < classList.length; i++) { + if (!elem.classList.contains(classList[i])) { + return false; + } + } + + return true; + }; + + const removeCustomClasses = (elem, params) => { + toArray(elem.classList).forEach(className => { + if (!Object.values(swalClasses).includes(className) && !Object.values(iconTypes).includes(className) && !Object.values(params.showClass).includes(className)) { + elem.classList.remove(className); + } + }); + }; + + const applyCustomClass = (elem, params, className) => { + removeCustomClasses(elem, params); + + if (params.customClass && params.customClass[className]) { + if (typeof params.customClass[className] !== 'string' && !params.customClass[className].forEach) { + return warn("Invalid type of customClass.".concat(className, "! Expected string or iterable object, got \"").concat(typeof params.customClass[className], "\"")); + } + + addClass(elem, params.customClass[className]); + } + }; + const getInput = (popup, inputType) => { + if (!inputType) { + return null; + } + + switch (inputType) { + case 'select': + case 'textarea': + case 'file': + return getChildByClass(popup, swalClasses[inputType]); + + case 'checkbox': + return popup.querySelector(".".concat(swalClasses.checkbox, " input")); + + case 'radio': + return popup.querySelector(".".concat(swalClasses.radio, " input:checked")) || popup.querySelector(".".concat(swalClasses.radio, " input:first-child")); + + case 'range': + return popup.querySelector(".".concat(swalClasses.range, " input")); + + default: + return getChildByClass(popup, swalClasses.input); + } + }; + const focusInput = input => { + input.focus(); // place cursor at end of text in text input + + if (input.type !== 'file') { + // http://stackoverflow.com/a/2345915 + const val = input.value; + input.value = ''; + input.value = val; + } + }; + const toggleClass = (target, classList, condition) => { + if (!target || !classList) { + return; + } + + if (typeof classList === 'string') { + classList = classList.split(/\s+/).filter(Boolean); + } + + classList.forEach(className => { + if (target.forEach) { + target.forEach(elem => { + condition ? elem.classList.add(className) : elem.classList.remove(className); + }); + } else { + condition ? target.classList.add(className) : target.classList.remove(className); + } + }); + }; + const addClass = (target, classList) => { + toggleClass(target, classList, true); + }; + const removeClass = (target, classList) => { + toggleClass(target, classList, false); + }; + const getChildByClass = (elem, className) => { + for (let i = 0; i < elem.childNodes.length; i++) { + if (hasClass(elem.childNodes[i], className)) { + return elem.childNodes[i]; + } + } + }; + const applyNumericalStyle = (elem, property, value) => { + if (value === "".concat(parseInt(value))) { + value = parseInt(value); + } + + if (value || parseInt(value) === 0) { + elem.style[property] = typeof value === 'number' ? "".concat(value, "px") : value; + } else { + elem.style.removeProperty(property); + } + }; + const show = (elem, display = 'flex') => { + elem.style.display = display; + }; + const hide = elem => { + elem.style.display = 'none'; + }; + const setStyle = (parent, selector, property, value) => { + const el = parent.querySelector(selector); + + if (el) { + el.style[property] = value; + } + }; + const toggle = (elem, condition, display) => { + condition ? show(elem, display) : hide(elem); + }; // borrowed from jquery $(elem).is(':visible') implementation + + const isVisible = elem => !!(elem && (elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length)); + const allButtonsAreHidden = () => !isVisible(getConfirmButton()) && !isVisible(getDenyButton()) && !isVisible(getCancelButton()); + const isScrollable = elem => !!(elem.scrollHeight > elem.clientHeight); // borrowed from https://stackoverflow.com/a/46352119 + + const hasCssAnimation = elem => { + const style = window.getComputedStyle(elem); + const animDuration = parseFloat(style.getPropertyValue('animation-duration') || '0'); + const transDuration = parseFloat(style.getPropertyValue('transition-duration') || '0'); + return animDuration > 0 || transDuration > 0; + }; + const animateTimerProgressBar = (timer, reset = false) => { + const timerProgressBar = getTimerProgressBar(); + + if (isVisible(timerProgressBar)) { + if (reset) { + timerProgressBar.style.transition = 'none'; + timerProgressBar.style.width = '100%'; + } + + setTimeout(() => { + timerProgressBar.style.transition = "width ".concat(timer / 1000, "s linear"); + timerProgressBar.style.width = '0%'; + }, 10); + } + }; + const stopTimerProgressBar = () => { + const timerProgressBar = getTimerProgressBar(); + const timerProgressBarWidth = parseInt(window.getComputedStyle(timerProgressBar).width); + timerProgressBar.style.removeProperty('transition'); + timerProgressBar.style.width = '100%'; + const timerProgressBarFullWidth = parseInt(window.getComputedStyle(timerProgressBar).width); + const timerProgressBarPercent = parseInt(timerProgressBarWidth / timerProgressBarFullWidth * 100); + timerProgressBar.style.removeProperty('transition'); + timerProgressBar.style.width = "".concat(timerProgressBarPercent, "%"); + }; + + // Detect Node env + const isNodeEnv = () => typeof window === 'undefined' || typeof document === 'undefined'; + + const sweetHTML = "\n
                                                  \n \n
                                                    \n
                                                    \n \n

                                                    \n
                                                    \n \n \n
                                                    \n \n \n
                                                    \n \n
                                                    \n \n \n
                                                    \n
                                                    \n
                                                    \n \n \n \n
                                                    \n
                                                    \n
                                                    \n
                                                    \n
                                                    \n
                                                    \n").replace(/(^|\n)\s*/g, ''); + + const resetOldContainer = () => { + const oldContainer = getContainer(); + + if (!oldContainer) { + return false; + } + + oldContainer.remove(); + removeClass([document.documentElement, document.body], [swalClasses['no-backdrop'], swalClasses['toast-shown'], swalClasses['has-column']]); + return true; + }; + + const resetValidationMessage = () => { + if (Swal.isVisible()) { + Swal.resetValidationMessage(); + } + }; + + const addInputChangeListeners = () => { + const popup = getPopup(); + const input = getChildByClass(popup, swalClasses.input); + const file = getChildByClass(popup, swalClasses.file); + const range = popup.querySelector(".".concat(swalClasses.range, " input")); + const rangeOutput = popup.querySelector(".".concat(swalClasses.range, " output")); + const select = getChildByClass(popup, swalClasses.select); + const checkbox = popup.querySelector(".".concat(swalClasses.checkbox, " input")); + const textarea = getChildByClass(popup, swalClasses.textarea); + input.oninput = resetValidationMessage; + file.onchange = resetValidationMessage; + select.onchange = resetValidationMessage; + checkbox.onchange = resetValidationMessage; + textarea.oninput = resetValidationMessage; + + range.oninput = () => { + resetValidationMessage(); + rangeOutput.value = range.value; + }; + + range.onchange = () => { + resetValidationMessage(); + range.nextSibling.value = range.value; + }; + }; + + const getTarget = target => typeof target === 'string' ? document.querySelector(target) : target; + + const setupAccessibility = params => { + const popup = getPopup(); + popup.setAttribute('role', params.toast ? 'alert' : 'dialog'); + popup.setAttribute('aria-live', params.toast ? 'polite' : 'assertive'); + + if (!params.toast) { + popup.setAttribute('aria-modal', 'true'); + } + }; + + const setupRTL = targetElement => { + if (window.getComputedStyle(targetElement).direction === 'rtl') { + addClass(getContainer(), swalClasses.rtl); + } + }; + /* + * Add modal + backdrop to DOM + */ + + + const init = params => { + // Clean up the old popup container if it exists + const oldContainerExisted = resetOldContainer(); + /* istanbul ignore if */ + + if (isNodeEnv()) { + error('SweetAlert2 requires document to initialize'); + return; + } + + const container = document.createElement('div'); + container.className = swalClasses.container; + + if (oldContainerExisted) { + addClass(container, swalClasses['no-transition']); + } + + setInnerHtml(container, sweetHTML); + const targetElement = getTarget(params.target); + targetElement.appendChild(container); + setupAccessibility(params); + setupRTL(targetElement); + addInputChangeListeners(); + }; + + const parseHtmlToContainer = (param, target) => { + // DOM element + if (param instanceof HTMLElement) { + target.appendChild(param); // Object + } else if (typeof param === 'object') { + handleObject(param, target); // Plain string + } else if (param) { + setInnerHtml(target, param); + } + }; + + const handleObject = (param, target) => { + // JQuery element(s) + if (param.jquery) { + handleJqueryElem(target, param); // For other objects use their string representation + } else { + setInnerHtml(target, param.toString()); + } + }; + + const handleJqueryElem = (target, elem) => { + target.textContent = ''; + + if (0 in elem) { + for (let i = 0; (i in elem); i++) { + target.appendChild(elem[i].cloneNode(true)); + } + } else { + target.appendChild(elem.cloneNode(true)); + } + }; + + const animationEndEvent = (() => { + // Prevent run in Node env + + /* istanbul ignore if */ + if (isNodeEnv()) { + return false; + } + + const testEl = document.createElement('div'); + const transEndEventNames = { + WebkitAnimation: 'webkitAnimationEnd', + OAnimation: 'oAnimationEnd oanimationend', + animation: 'animationend' + }; + + for (const i in transEndEventNames) { + if (Object.prototype.hasOwnProperty.call(transEndEventNames, i) && typeof testEl.style[i] !== 'undefined') { + return transEndEventNames[i]; + } + } + + return false; + })(); + + // https://github.com/twbs/bootstrap/blob/master/js/src/modal.js + + const measureScrollbar = () => { + const scrollDiv = document.createElement('div'); + scrollDiv.className = swalClasses['scrollbar-measure']; + document.body.appendChild(scrollDiv); + const scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth; + document.body.removeChild(scrollDiv); + return scrollbarWidth; + }; + + const renderActions = (instance, params) => { + const actions = getActions(); + const loader = getLoader(); + const confirmButton = getConfirmButton(); + const denyButton = getDenyButton(); + const cancelButton = getCancelButton(); // Actions (buttons) wrapper + + if (!params.showConfirmButton && !params.showDenyButton && !params.showCancelButton) { + hide(actions); + } else { + show(actions); + } // Custom class + + + applyCustomClass(actions, params, 'actions'); // Render buttons + + renderButton(confirmButton, 'confirm', params); + renderButton(denyButton, 'deny', params); + renderButton(cancelButton, 'cancel', params); + handleButtonsStyling(confirmButton, denyButton, cancelButton, params); + + if (params.reverseButtons) { + actions.insertBefore(cancelButton, loader); + actions.insertBefore(denyButton, loader); + actions.insertBefore(confirmButton, loader); + } // Loader + + + setInnerHtml(loader, params.loaderHtml); + applyCustomClass(loader, params, 'loader'); + }; + + function handleButtonsStyling(confirmButton, denyButton, cancelButton, params) { + if (!params.buttonsStyling) { + return removeClass([confirmButton, denyButton, cancelButton], swalClasses.styled); + } + + addClass([confirmButton, denyButton, cancelButton], swalClasses.styled); // Buttons background colors + + if (params.confirmButtonColor) { + confirmButton.style.backgroundColor = params.confirmButtonColor; + addClass(confirmButton, swalClasses['default-outline']); + } + + if (params.denyButtonColor) { + denyButton.style.backgroundColor = params.denyButtonColor; + addClass(denyButton, swalClasses['default-outline']); + } + + if (params.cancelButtonColor) { + cancelButton.style.backgroundColor = params.cancelButtonColor; + addClass(cancelButton, swalClasses['default-outline']); + } + } + + function renderButton(button, buttonType, params) { + toggle(button, params["show".concat(capitalizeFirstLetter(buttonType), "Button")], 'inline-block'); + setInnerHtml(button, params["".concat(buttonType, "ButtonText")]); // Set caption text + + button.setAttribute('aria-label', params["".concat(buttonType, "ButtonAriaLabel")]); // ARIA label + // Add buttons custom classes + + button.className = swalClasses[buttonType]; + applyCustomClass(button, params, "".concat(buttonType, "Button")); + addClass(button, params["".concat(buttonType, "ButtonClass")]); + } + + function handleBackdropParam(container, backdrop) { + if (typeof backdrop === 'string') { + container.style.background = backdrop; + } else if (!backdrop) { + addClass([document.documentElement, document.body], swalClasses['no-backdrop']); + } + } + + function handlePositionParam(container, position) { + if (position in swalClasses) { + addClass(container, swalClasses[position]); + } else { + warn('The "position" parameter is not valid, defaulting to "center"'); + addClass(container, swalClasses.center); + } + } + + function handleGrowParam(container, grow) { + if (grow && typeof grow === 'string') { + const growClass = "grow-".concat(grow); + + if (growClass in swalClasses) { + addClass(container, swalClasses[growClass]); + } + } + } + + const renderContainer = (instance, params) => { + const container = getContainer(); + + if (!container) { + return; + } + + handleBackdropParam(container, params.backdrop); + handlePositionParam(container, params.position); + handleGrowParam(container, params.grow); // Custom class + + applyCustomClass(container, params, 'container'); + }; + + /** + * This module containts `WeakMap`s for each effectively-"private property" that a `Swal` has. + * For example, to set the private property "foo" of `this` to "bar", you can `privateProps.foo.set(this, 'bar')` + * This is the approach that Babel will probably take to implement private methods/fields + * https://github.com/tc39/proposal-private-methods + * https://github.com/babel/babel/pull/7555 + * Once we have the changes from that PR in Babel, and our core class fits reasonable in *one module* + * then we can use that language feature. + */ + var privateProps = { + promise: new WeakMap(), + innerParams: new WeakMap(), + domCache: new WeakMap() + }; + + const inputTypes = ['input', 'file', 'range', 'select', 'radio', 'checkbox', 'textarea']; + const renderInput = (instance, params) => { + const popup = getPopup(); + const innerParams = privateProps.innerParams.get(instance); + const rerender = !innerParams || params.input !== innerParams.input; + inputTypes.forEach(inputType => { + const inputClass = swalClasses[inputType]; + const inputContainer = getChildByClass(popup, inputClass); // set attributes + + setAttributes(inputType, params.inputAttributes); // set class + + inputContainer.className = inputClass; + + if (rerender) { + hide(inputContainer); + } + }); + + if (params.input) { + if (rerender) { + showInput(params); + } // set custom class + + + setCustomClass(params); + } + }; + + const showInput = params => { + if (!renderInputType[params.input]) { + return error("Unexpected type of input! Expected \"text\", \"email\", \"password\", \"number\", \"tel\", \"select\", \"radio\", \"checkbox\", \"textarea\", \"file\" or \"url\", got \"".concat(params.input, "\"")); + } + + const inputContainer = getInputContainer(params.input); + const input = renderInputType[params.input](inputContainer, params); + show(input); // input autofocus + + setTimeout(() => { + focusInput(input); + }); + }; + + const removeAttributes = input => { + for (let i = 0; i < input.attributes.length; i++) { + const attrName = input.attributes[i].name; + + if (!['type', 'value', 'style'].includes(attrName)) { + input.removeAttribute(attrName); + } + } + }; + + const setAttributes = (inputType, inputAttributes) => { + const input = getInput(getPopup(), inputType); + + if (!input) { + return; + } + + removeAttributes(input); + + for (const attr in inputAttributes) { + input.setAttribute(attr, inputAttributes[attr]); + } + }; + + const setCustomClass = params => { + const inputContainer = getInputContainer(params.input); + + if (params.customClass) { + addClass(inputContainer, params.customClass.input); + } + }; + + const setInputPlaceholder = (input, params) => { + if (!input.placeholder || params.inputPlaceholder) { + input.placeholder = params.inputPlaceholder; + } + }; + + const setInputLabel = (input, prependTo, params) => { + if (params.inputLabel) { + input.id = swalClasses.input; + const label = document.createElement('label'); + const labelClass = swalClasses['input-label']; + label.setAttribute('for', input.id); + label.className = labelClass; + addClass(label, params.customClass.inputLabel); + label.innerText = params.inputLabel; + prependTo.insertAdjacentElement('beforebegin', label); + } + }; + + const getInputContainer = inputType => { + const inputClass = swalClasses[inputType] ? swalClasses[inputType] : swalClasses.input; + return getChildByClass(getPopup(), inputClass); + }; + + const renderInputType = {}; + + renderInputType.text = renderInputType.email = renderInputType.password = renderInputType.number = renderInputType.tel = renderInputType.url = (input, params) => { + if (typeof params.inputValue === 'string' || typeof params.inputValue === 'number') { + input.value = params.inputValue; + } else if (!isPromise(params.inputValue)) { + warn("Unexpected type of inputValue! Expected \"string\", \"number\" or \"Promise\", got \"".concat(typeof params.inputValue, "\"")); + } + + setInputLabel(input, input, params); + setInputPlaceholder(input, params); + input.type = params.input; + return input; + }; + + renderInputType.file = (input, params) => { + setInputLabel(input, input, params); + setInputPlaceholder(input, params); + return input; + }; + + renderInputType.range = (range, params) => { + const rangeInput = range.querySelector('input'); + const rangeOutput = range.querySelector('output'); + rangeInput.value = params.inputValue; + rangeInput.type = params.input; + rangeOutput.value = params.inputValue; + setInputLabel(rangeInput, range, params); + return range; + }; + + renderInputType.select = (select, params) => { + select.textContent = ''; + + if (params.inputPlaceholder) { + const placeholder = document.createElement('option'); + setInnerHtml(placeholder, params.inputPlaceholder); + placeholder.value = ''; + placeholder.disabled = true; + placeholder.selected = true; + select.appendChild(placeholder); + } + + setInputLabel(select, select, params); + return select; + }; + + renderInputType.radio = radio => { + radio.textContent = ''; + return radio; + }; + + renderInputType.checkbox = (checkboxContainer, params) => { + const checkbox = getInput(getPopup(), 'checkbox'); + checkbox.value = 1; + checkbox.id = swalClasses.checkbox; + checkbox.checked = Boolean(params.inputValue); + const label = checkboxContainer.querySelector('span'); + setInnerHtml(label, params.inputPlaceholder); + return checkboxContainer; + }; + + renderInputType.textarea = (textarea, params) => { + textarea.value = params.inputValue; + setInputPlaceholder(textarea, params); + setInputLabel(textarea, textarea, params); + + const getMargin = el => parseInt(window.getComputedStyle(el).marginLeft) + parseInt(window.getComputedStyle(el).marginRight); + + setTimeout(() => { + // #2291 + if ('MutationObserver' in window) { + // #1699 + const initialPopupWidth = parseInt(window.getComputedStyle(getPopup()).width); + + const textareaResizeHandler = () => { + const textareaWidth = textarea.offsetWidth + getMargin(textarea); + + if (textareaWidth > initialPopupWidth) { + getPopup().style.width = "".concat(textareaWidth, "px"); + } else { + getPopup().style.width = null; + } + }; + + new MutationObserver(textareaResizeHandler).observe(textarea, { + attributes: true, + attributeFilter: ['style'] + }); + } + }); + return textarea; + }; + + const renderContent = (instance, params) => { + const htmlContainer = getHtmlContainer(); + applyCustomClass(htmlContainer, params, 'htmlContainer'); // Content as HTML + + if (params.html) { + parseHtmlToContainer(params.html, htmlContainer); + show(htmlContainer, 'block'); // Content as plain text + } else if (params.text) { + htmlContainer.textContent = params.text; + show(htmlContainer, 'block'); // No content + } else { + hide(htmlContainer); + } + + renderInput(instance, params); + }; + + const renderFooter = (instance, params) => { + const footer = getFooter(); + toggle(footer, params.footer); + + if (params.footer) { + parseHtmlToContainer(params.footer, footer); + } // Custom class + + + applyCustomClass(footer, params, 'footer'); + }; + + const renderCloseButton = (instance, params) => { + const closeButton = getCloseButton(); + setInnerHtml(closeButton, params.closeButtonHtml); // Custom class + + applyCustomClass(closeButton, params, 'closeButton'); + toggle(closeButton, params.showCloseButton); + closeButton.setAttribute('aria-label', params.closeButtonAriaLabel); + }; + + const renderIcon = (instance, params) => { + const innerParams = privateProps.innerParams.get(instance); + const icon = getIcon(); // if the given icon already rendered, apply the styling without re-rendering the icon + + if (innerParams && params.icon === innerParams.icon) { + // Custom or default content + setContent(icon, params); + applyStyles(icon, params); + return; + } + + if (!params.icon && !params.iconHtml) { + return hide(icon); + } + + if (params.icon && Object.keys(iconTypes).indexOf(params.icon) === -1) { + error("Unknown icon! Expected \"success\", \"error\", \"warning\", \"info\" or \"question\", got \"".concat(params.icon, "\"")); + return hide(icon); + } + + show(icon); // Custom or default content + + setContent(icon, params); + applyStyles(icon, params); // Animate icon + + addClass(icon, params.showClass.icon); + }; + + const applyStyles = (icon, params) => { + for (const iconType in iconTypes) { + if (params.icon !== iconType) { + removeClass(icon, iconTypes[iconType]); + } + } + + addClass(icon, iconTypes[params.icon]); // Icon color + + setColor(icon, params); // Success icon background color + + adjustSuccessIconBackgoundColor(); // Custom class + + applyCustomClass(icon, params, 'icon'); + }; // Adjust success icon background color to match the popup background color + + + const adjustSuccessIconBackgoundColor = () => { + const popup = getPopup(); + const popupBackgroundColor = window.getComputedStyle(popup).getPropertyValue('background-color'); + const successIconParts = popup.querySelectorAll('[class^=swal2-success-circular-line], .swal2-success-fix'); + + for (let i = 0; i < successIconParts.length; i++) { + successIconParts[i].style.backgroundColor = popupBackgroundColor; + } + }; + + const setContent = (icon, params) => { + icon.textContent = ''; + + if (params.iconHtml) { + setInnerHtml(icon, iconContent(params.iconHtml)); + } else if (params.icon === 'success') { + setInnerHtml(icon, "\n
                                                    \n \n
                                                    \n
                                                    \n "); + } else if (params.icon === 'error') { + setInnerHtml(icon, "\n \n \n \n \n "); + } else { + const defaultIconHtml = { + question: '?', + warning: '!', + info: 'i' + }; + setInnerHtml(icon, iconContent(defaultIconHtml[params.icon])); + } + }; + + const setColor = (icon, params) => { + if (!params.iconColor) { + return; + } + + icon.style.color = params.iconColor; + icon.style.borderColor = params.iconColor; + + for (const sel of ['.swal2-success-line-tip', '.swal2-success-line-long', '.swal2-x-mark-line-left', '.swal2-x-mark-line-right']) { + setStyle(icon, sel, 'backgroundColor', params.iconColor); + } + + setStyle(icon, '.swal2-success-ring', 'borderColor', params.iconColor); + }; + + const iconContent = content => "
                                                    ").concat(content, "
                                                    "); + + const renderImage = (instance, params) => { + const image = getImage(); + + if (!params.imageUrl) { + return hide(image); + } + + show(image, ''); // Src, alt + + image.setAttribute('src', params.imageUrl); + image.setAttribute('alt', params.imageAlt); // Width, height + + applyNumericalStyle(image, 'width', params.imageWidth); + applyNumericalStyle(image, 'height', params.imageHeight); // Class + + image.className = swalClasses.image; + applyCustomClass(image, params, 'image'); + }; + + const createStepElement = step => { + const stepEl = document.createElement('li'); + addClass(stepEl, swalClasses['progress-step']); + setInnerHtml(stepEl, step); + return stepEl; + }; + + const createLineElement = params => { + const lineEl = document.createElement('li'); + addClass(lineEl, swalClasses['progress-step-line']); + + if (params.progressStepsDistance) { + lineEl.style.width = params.progressStepsDistance; + } + + return lineEl; + }; + + const renderProgressSteps = (instance, params) => { + const progressStepsContainer = getProgressSteps(); + + if (!params.progressSteps || params.progressSteps.length === 0) { + return hide(progressStepsContainer); + } + + show(progressStepsContainer); + progressStepsContainer.textContent = ''; + + if (params.currentProgressStep >= params.progressSteps.length) { + warn('Invalid currentProgressStep parameter, it should be less than progressSteps.length ' + '(currentProgressStep like JS arrays starts from 0)'); + } + + params.progressSteps.forEach((step, index) => { + const stepEl = createStepElement(step); + progressStepsContainer.appendChild(stepEl); + + if (index === params.currentProgressStep) { + addClass(stepEl, swalClasses['active-progress-step']); + } + + if (index !== params.progressSteps.length - 1) { + const lineEl = createLineElement(params); + progressStepsContainer.appendChild(lineEl); + } + }); + }; + + const renderTitle = (instance, params) => { + const title = getTitle(); + toggle(title, params.title || params.titleText, 'block'); + + if (params.title) { + parseHtmlToContainer(params.title, title); + } + + if (params.titleText) { + title.innerText = params.titleText; + } // Custom class + + + applyCustomClass(title, params, 'title'); + }; + + const renderPopup = (instance, params) => { + const container = getContainer(); + const popup = getPopup(); // Width + + if (params.toast) { + // #2170 + applyNumericalStyle(container, 'width', params.width); + popup.style.width = '100%'; + popup.insertBefore(getLoader(), getIcon()); + } else { + applyNumericalStyle(popup, 'width', params.width); + } // Padding + + + applyNumericalStyle(popup, 'padding', params.padding); // Background + + if (params.background) { + popup.style.background = params.background; + } + + hide(getValidationMessage()); // Classes + + addClasses(popup, params); + }; + + const addClasses = (popup, params) => { + // Default Class + showClass when updating Swal.update({}) + popup.className = "".concat(swalClasses.popup, " ").concat(isVisible(popup) ? params.showClass.popup : ''); + + if (params.toast) { + addClass([document.documentElement, document.body], swalClasses['toast-shown']); + addClass(popup, swalClasses.toast); + } else { + addClass(popup, swalClasses.modal); + } // Custom class + + + applyCustomClass(popup, params, 'popup'); + + if (typeof params.customClass === 'string') { + addClass(popup, params.customClass); + } // Icon class (#1842) + + + if (params.icon) { + addClass(popup, swalClasses["icon-".concat(params.icon)]); + } + }; + + const render = (instance, params) => { + renderPopup(instance, params); + renderContainer(instance, params); + renderProgressSteps(instance, params); + renderIcon(instance, params); + renderImage(instance, params); + renderTitle(instance, params); + renderCloseButton(instance, params); + renderContent(instance, params); + renderActions(instance, params); + renderFooter(instance, params); + + if (typeof params.didRender === 'function') { + params.didRender(getPopup()); + } + }; + + /* + * Global function to determine if SweetAlert2 popup is shown + */ + + const isVisible$1 = () => { + return isVisible(getPopup()); + }; + /* + * Global function to click 'Confirm' button + */ + + const clickConfirm = () => getConfirmButton() && getConfirmButton().click(); + /* + * Global function to click 'Deny' button + */ + + const clickDeny = () => getDenyButton() && getDenyButton().click(); + /* + * Global function to click 'Cancel' button + */ + + const clickCancel = () => getCancelButton() && getCancelButton().click(); + + function fire(...args) { + const Swal = this; + return new Swal(...args); + } + + /** + * Returns an extended version of `Swal` containing `params` as defaults. + * Useful for reusing Swal configuration. + * + * For example: + * + * Before: + * const textPromptOptions = { input: 'text', showCancelButton: true } + * const {value: firstName} = await Swal.fire({ ...textPromptOptions, title: 'What is your first name?' }) + * const {value: lastName} = await Swal.fire({ ...textPromptOptions, title: 'What is your last name?' }) + * + * After: + * const TextPrompt = Swal.mixin({ input: 'text', showCancelButton: true }) + * const {value: firstName} = await TextPrompt('What is your first name?') + * const {value: lastName} = await TextPrompt('What is your last name?') + * + * @param mixinParams + */ + function mixin(mixinParams) { + class MixinSwal extends this { + _main(params, priorityMixinParams) { + return super._main(params, Object.assign({}, mixinParams, priorityMixinParams)); + } + + } + + return MixinSwal; + } + + /** + * Shows loader (spinner), this is useful with AJAX requests. + * By default the loader be shown instead of the "Confirm" button. + */ + + const showLoading = buttonToReplace => { + let popup = getPopup(); + + if (!popup) { + Swal.fire(); + } + + popup = getPopup(); + const loader = getLoader(); + + if (isToast()) { + hide(getIcon()); + } else { + replaceButton(popup, buttonToReplace); + } + + show(loader); + popup.setAttribute('data-loading', true); + popup.setAttribute('aria-busy', true); + popup.focus(); + }; + + const replaceButton = (popup, buttonToReplace) => { + const actions = getActions(); + const loader = getLoader(); + + if (!buttonToReplace && isVisible(getConfirmButton())) { + buttonToReplace = getConfirmButton(); + } + + show(actions); + + if (buttonToReplace) { + hide(buttonToReplace); + loader.setAttribute('data-button-to-replace', buttonToReplace.className); + } + + loader.parentNode.insertBefore(loader, buttonToReplace); + addClass([popup, actions], swalClasses.loading); + }; + + const RESTORE_FOCUS_TIMEOUT = 100; + + const globalState = {}; + + const focusPreviousActiveElement = () => { + if (globalState.previousActiveElement && globalState.previousActiveElement.focus) { + globalState.previousActiveElement.focus(); + globalState.previousActiveElement = null; + } else if (document.body) { + document.body.focus(); + } + }; // Restore previous active (focused) element + + + const restoreActiveElement = returnFocus => { + return new Promise(resolve => { + if (!returnFocus) { + return resolve(); + } + + const x = window.scrollX; + const y = window.scrollY; + globalState.restoreFocusTimeout = setTimeout(() => { + focusPreviousActiveElement(); + resolve(); + }, RESTORE_FOCUS_TIMEOUT); // issues/900 + + window.scrollTo(x, y); + }); + }; + + /** + * If `timer` parameter is set, returns number of milliseconds of timer remained. + * Otherwise, returns undefined. + */ + + const getTimerLeft = () => { + return globalState.timeout && globalState.timeout.getTimerLeft(); + }; + /** + * Stop timer. Returns number of milliseconds of timer remained. + * If `timer` parameter isn't set, returns undefined. + */ + + const stopTimer = () => { + if (globalState.timeout) { + stopTimerProgressBar(); + return globalState.timeout.stop(); + } + }; + /** + * Resume timer. Returns number of milliseconds of timer remained. + * If `timer` parameter isn't set, returns undefined. + */ + + const resumeTimer = () => { + if (globalState.timeout) { + const remaining = globalState.timeout.start(); + animateTimerProgressBar(remaining); + return remaining; + } + }; + /** + * Resume timer. Returns number of milliseconds of timer remained. + * If `timer` parameter isn't set, returns undefined. + */ + + const toggleTimer = () => { + const timer = globalState.timeout; + return timer && (timer.running ? stopTimer() : resumeTimer()); + }; + /** + * Increase timer. Returns number of milliseconds of an updated timer. + * If `timer` parameter isn't set, returns undefined. + */ + + const increaseTimer = n => { + if (globalState.timeout) { + const remaining = globalState.timeout.increase(n); + animateTimerProgressBar(remaining, true); + return remaining; + } + }; + /** + * Check if timer is running. Returns true if timer is running + * or false if timer is paused or stopped. + * If `timer` parameter isn't set, returns undefined + */ + + const isTimerRunning = () => { + return globalState.timeout && globalState.timeout.isRunning(); + }; + + let bodyClickListenerAdded = false; + const clickHandlers = {}; + function bindClickHandler(attr = 'data-swal-template') { + clickHandlers[attr] = this; + + if (!bodyClickListenerAdded) { + document.body.addEventListener('click', bodyClickListener); + bodyClickListenerAdded = true; + } + } + + const bodyClickListener = event => { + // TODO: replace with event.composedPath() + for (let el = event.target; el && el !== document; el = el.parentNode) { + for (const attr in clickHandlers) { + const template = el.getAttribute(attr); + + if (template) { + clickHandlers[attr].fire({ + template + }); + return; + } + } + } + }; + + const defaultParams = { + title: '', + titleText: '', + text: '', + html: '', + footer: '', + icon: undefined, + iconColor: undefined, + iconHtml: undefined, + template: undefined, + toast: false, + showClass: { + popup: 'swal2-show', + backdrop: 'swal2-backdrop-show', + icon: 'swal2-icon-show' + }, + hideClass: { + popup: 'swal2-hide', + backdrop: 'swal2-backdrop-hide', + icon: 'swal2-icon-hide' + }, + customClass: {}, + target: 'body', + backdrop: true, + heightAuto: true, + allowOutsideClick: true, + allowEscapeKey: true, + allowEnterKey: true, + stopKeydownPropagation: true, + keydownListenerCapture: false, + showConfirmButton: true, + showDenyButton: false, + showCancelButton: false, + preConfirm: undefined, + preDeny: undefined, + confirmButtonText: 'OK', + confirmButtonAriaLabel: '', + confirmButtonColor: undefined, + denyButtonText: 'No', + denyButtonAriaLabel: '', + denyButtonColor: undefined, + cancelButtonText: 'Cancel', + cancelButtonAriaLabel: '', + cancelButtonColor: undefined, + buttonsStyling: true, + reverseButtons: false, + focusConfirm: true, + focusDeny: false, + focusCancel: false, + returnFocus: true, + showCloseButton: false, + closeButtonHtml: '×', + closeButtonAriaLabel: 'Close this dialog', + loaderHtml: '', + showLoaderOnConfirm: false, + showLoaderOnDeny: false, + imageUrl: undefined, + imageWidth: undefined, + imageHeight: undefined, + imageAlt: '', + timer: undefined, + timerProgressBar: false, + width: undefined, + padding: undefined, + background: undefined, + input: undefined, + inputPlaceholder: '', + inputLabel: '', + inputValue: '', + inputOptions: {}, + inputAutoTrim: true, + inputAttributes: {}, + inputValidator: undefined, + returnInputValueOnDeny: false, + validationMessage: undefined, + grow: false, + position: 'center', + progressSteps: [], + currentProgressStep: undefined, + progressStepsDistance: undefined, + willOpen: undefined, + didOpen: undefined, + didRender: undefined, + willClose: undefined, + didClose: undefined, + didDestroy: undefined, + scrollbarPadding: true + }; + const updatableParams = ['allowEscapeKey', 'allowOutsideClick', 'background', 'buttonsStyling', 'cancelButtonAriaLabel', 'cancelButtonColor', 'cancelButtonText', 'closeButtonAriaLabel', 'closeButtonHtml', 'confirmButtonAriaLabel', 'confirmButtonColor', 'confirmButtonText', 'currentProgressStep', 'customClass', 'denyButtonAriaLabel', 'denyButtonColor', 'denyButtonText', 'didClose', 'didDestroy', 'footer', 'hideClass', 'html', 'icon', 'iconColor', 'iconHtml', 'imageAlt', 'imageHeight', 'imageUrl', 'imageWidth', 'preConfirm', 'preDeny', 'progressSteps', 'returnFocus', 'reverseButtons', 'showCancelButton', 'showCloseButton', 'showConfirmButton', 'showDenyButton', 'text', 'title', 'titleText', 'willClose']; + const deprecatedParams = {}; + const toastIncompatibleParams = ['allowOutsideClick', 'allowEnterKey', 'backdrop', 'focusConfirm', 'focusDeny', 'focusCancel', 'returnFocus', 'heightAuto', 'keydownListenerCapture']; + /** + * Is valid parameter + * @param {String} paramName + */ + + const isValidParameter = paramName => { + return Object.prototype.hasOwnProperty.call(defaultParams, paramName); + }; + /** + * Is valid parameter for Swal.update() method + * @param {String} paramName + */ + + const isUpdatableParameter = paramName => { + return updatableParams.indexOf(paramName) !== -1; + }; + /** + * Is deprecated parameter + * @param {String} paramName + */ + + const isDeprecatedParameter = paramName => { + return deprecatedParams[paramName]; + }; + + const checkIfParamIsValid = param => { + if (!isValidParameter(param)) { + warn("Unknown parameter \"".concat(param, "\"")); + } + }; + + const checkIfToastParamIsValid = param => { + if (toastIncompatibleParams.includes(param)) { + warn("The parameter \"".concat(param, "\" is incompatible with toasts")); + } + }; + + const checkIfParamIsDeprecated = param => { + if (isDeprecatedParameter(param)) { + warnAboutDeprecation(param, isDeprecatedParameter(param)); + } + }; + /** + * Show relevant warnings for given params + * + * @param params + */ + + + const showWarningsForParams = params => { + if (!params.backdrop && params.allowOutsideClick) { + warn('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`'); + } + + for (const param in params) { + checkIfParamIsValid(param); + + if (params.toast) { + checkIfToastParamIsValid(param); + } + + checkIfParamIsDeprecated(param); + } + }; + + + + var staticMethods = /*#__PURE__*/Object.freeze({ + isValidParameter: isValidParameter, + isUpdatableParameter: isUpdatableParameter, + isDeprecatedParameter: isDeprecatedParameter, + argsToParams: argsToParams, + isVisible: isVisible$1, + clickConfirm: clickConfirm, + clickDeny: clickDeny, + clickCancel: clickCancel, + getContainer: getContainer, + getPopup: getPopup, + getTitle: getTitle, + getHtmlContainer: getHtmlContainer, + getImage: getImage, + getIcon: getIcon, + getInputLabel: getInputLabel, + getCloseButton: getCloseButton, + getActions: getActions, + getConfirmButton: getConfirmButton, + getDenyButton: getDenyButton, + getCancelButton: getCancelButton, + getLoader: getLoader, + getFooter: getFooter, + getTimerProgressBar: getTimerProgressBar, + getFocusableElements: getFocusableElements, + getValidationMessage: getValidationMessage, + isLoading: isLoading, + fire: fire, + mixin: mixin, + showLoading: showLoading, + enableLoading: showLoading, + getTimerLeft: getTimerLeft, + stopTimer: stopTimer, + resumeTimer: resumeTimer, + toggleTimer: toggleTimer, + increaseTimer: increaseTimer, + isTimerRunning: isTimerRunning, + bindClickHandler: bindClickHandler + }); + + /** + * Hides loader and shows back the button which was hidden by .showLoading() + */ + + function hideLoading() { + // do nothing if popup is closed + const innerParams = privateProps.innerParams.get(this); + + if (!innerParams) { + return; + } + + const domCache = privateProps.domCache.get(this); + hide(domCache.loader); + + if (isToast()) { + if (innerParams.icon) { + show(getIcon()); + } + } else { + showRelatedButton(domCache); + } + + removeClass([domCache.popup, domCache.actions], swalClasses.loading); + domCache.popup.removeAttribute('aria-busy'); + domCache.popup.removeAttribute('data-loading'); + domCache.confirmButton.disabled = false; + domCache.denyButton.disabled = false; + domCache.cancelButton.disabled = false; + } + + const showRelatedButton = domCache => { + const buttonToReplace = domCache.popup.getElementsByClassName(domCache.loader.getAttribute('data-button-to-replace')); + + if (buttonToReplace.length) { + show(buttonToReplace[0], 'inline-block'); + } else if (allButtonsAreHidden()) { + hide(domCache.actions); + } + }; + + function getInput$1(instance) { + const innerParams = privateProps.innerParams.get(instance || this); + const domCache = privateProps.domCache.get(instance || this); + + if (!domCache) { + return null; + } + + return getInput(domCache.popup, innerParams.input); + } + + const fixScrollbar = () => { + // for queues, do not do this more than once + if (states.previousBodyPadding !== null) { + return; + } // if the body has overflow + + + if (document.body.scrollHeight > window.innerHeight) { + // add padding so the content doesn't shift after removal of scrollbar + states.previousBodyPadding = parseInt(window.getComputedStyle(document.body).getPropertyValue('padding-right')); + document.body.style.paddingRight = "".concat(states.previousBodyPadding + measureScrollbar(), "px"); + } + }; + const undoScrollbar = () => { + if (states.previousBodyPadding !== null) { + document.body.style.paddingRight = "".concat(states.previousBodyPadding, "px"); + states.previousBodyPadding = null; + } + }; + + /* istanbul ignore file */ + + const iOSfix = () => { + const iOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream || navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1; + + if (iOS && !hasClass(document.body, swalClasses.iosfix)) { + const offset = document.body.scrollTop; + document.body.style.top = "".concat(offset * -1, "px"); + addClass(document.body, swalClasses.iosfix); + lockBodyScroll(); + addBottomPaddingForTallPopups(); // #1948 + } + }; + + const addBottomPaddingForTallPopups = () => { + const safari = !navigator.userAgent.match(/(CriOS|FxiOS|EdgiOS|YaBrowser|UCBrowser)/i); + + if (safari) { + const bottomPanelHeight = 44; + + if (getPopup().scrollHeight > window.innerHeight - bottomPanelHeight) { + getContainer().style.paddingBottom = "".concat(bottomPanelHeight, "px"); + } + } + }; + + const lockBodyScroll = () => { + // #1246 + const container = getContainer(); + let preventTouchMove; + + container.ontouchstart = e => { + preventTouchMove = shouldPreventTouchMove(e); + }; + + container.ontouchmove = e => { + if (preventTouchMove) { + e.preventDefault(); + e.stopPropagation(); + } + }; + }; + + const shouldPreventTouchMove = event => { + const target = event.target; + const container = getContainer(); + + if (isStylys(event) || isZoom(event)) { + return false; + } + + if (target === container) { + return true; + } + + if (!isScrollable(container) && target.tagName !== 'INPUT' && // #1603 + target.tagName !== 'TEXTAREA' && // #2266 + !(isScrollable(getHtmlContainer()) && // #1944 + getHtmlContainer().contains(target))) { + return true; + } + + return false; + }; + + const isStylys = event => { + // #1786 + return event.touches && event.touches.length && event.touches[0].touchType === 'stylus'; + }; + + const isZoom = event => { + // #1891 + return event.touches && event.touches.length > 1; + }; + + const undoIOSfix = () => { + if (hasClass(document.body, swalClasses.iosfix)) { + const offset = parseInt(document.body.style.top, 10); + removeClass(document.body, swalClasses.iosfix); + document.body.style.top = ''; + document.body.scrollTop = offset * -1; + } + }; + + // Adding aria-hidden="true" to elements outside of the active modal dialog ensures that + // elements not within the active modal dialog will not be surfaced if a user opens a screen + // reader’s list of elements (headings, form controls, landmarks, etc.) in the document. + + const setAriaHidden = () => { + const bodyChildren = toArray(document.body.children); + bodyChildren.forEach(el => { + if (el === getContainer() || el.contains(getContainer())) { + return; + } + + if (el.hasAttribute('aria-hidden')) { + el.setAttribute('data-previous-aria-hidden', el.getAttribute('aria-hidden')); + } + + el.setAttribute('aria-hidden', 'true'); + }); + }; + const unsetAriaHidden = () => { + const bodyChildren = toArray(document.body.children); + bodyChildren.forEach(el => { + if (el.hasAttribute('data-previous-aria-hidden')) { + el.setAttribute('aria-hidden', el.getAttribute('data-previous-aria-hidden')); + el.removeAttribute('data-previous-aria-hidden'); + } else { + el.removeAttribute('aria-hidden'); + } + }); + }; + + /** + * This module containts `WeakMap`s for each effectively-"private property" that a `Swal` has. + * For example, to set the private property "foo" of `this` to "bar", you can `privateProps.foo.set(this, 'bar')` + * This is the approach that Babel will probably take to implement private methods/fields + * https://github.com/tc39/proposal-private-methods + * https://github.com/babel/babel/pull/7555 + * Once we have the changes from that PR in Babel, and our core class fits reasonable in *one module* + * then we can use that language feature. + */ + var privateMethods = { + swalPromiseResolve: new WeakMap() + }; + + /* + * Instance method to close sweetAlert + */ + + function removePopupAndResetState(instance, container, returnFocus, didClose) { + if (isToast()) { + triggerDidCloseAndDispose(instance, didClose); + } else { + restoreActiveElement(returnFocus).then(() => triggerDidCloseAndDispose(instance, didClose)); + globalState.keydownTarget.removeEventListener('keydown', globalState.keydownHandler, { + capture: globalState.keydownListenerCapture + }); + globalState.keydownHandlerAdded = false; + } + + const isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent); // workaround for #2088 + // for some reason removing the container in Safari will scroll the document to bottom + + if (isSafari) { + container.setAttribute('style', 'display:none !important'); + container.removeAttribute('class'); + container.innerHTML = ''; + } else { + container.remove(); + } + + if (isModal()) { + undoScrollbar(); + undoIOSfix(); + unsetAriaHidden(); + } + + removeBodyClasses(); + } + + function removeBodyClasses() { + removeClass([document.documentElement, document.body], [swalClasses.shown, swalClasses['height-auto'], swalClasses['no-backdrop'], swalClasses['toast-shown']]); + } + + function close(resolveValue) { + const popup = getPopup(); + + if (!popup) { + return; + } + + resolveValue = prepareResolveValue(resolveValue); + const innerParams = privateProps.innerParams.get(this); + + if (!innerParams || hasClass(popup, innerParams.hideClass.popup)) { + return; + } + + const swalPromiseResolve = privateMethods.swalPromiseResolve.get(this); + removeClass(popup, innerParams.showClass.popup); + addClass(popup, innerParams.hideClass.popup); + const backdrop = getContainer(); + removeClass(backdrop, innerParams.showClass.backdrop); + addClass(backdrop, innerParams.hideClass.backdrop); + handlePopupAnimation(this, popup, innerParams); // Resolve Swal promise + + swalPromiseResolve(resolveValue); + } + + const prepareResolveValue = resolveValue => { + // When user calls Swal.close() + if (typeof resolveValue === 'undefined') { + return { + isConfirmed: false, + isDenied: false, + isDismissed: true + }; + } + + return Object.assign({ + isConfirmed: false, + isDenied: false, + isDismissed: false + }, resolveValue); + }; + + const handlePopupAnimation = (instance, popup, innerParams) => { + const container = getContainer(); // If animation is supported, animate + + const animationIsSupported = animationEndEvent && hasCssAnimation(popup); + + if (typeof innerParams.willClose === 'function') { + innerParams.willClose(popup); + } + + if (animationIsSupported) { + animatePopup(instance, popup, container, innerParams.returnFocus, innerParams.didClose); + } else { + // Otherwise, remove immediately + removePopupAndResetState(instance, container, innerParams.returnFocus, innerParams.didClose); + } + }; + + const animatePopup = (instance, popup, container, returnFocus, didClose) => { + globalState.swalCloseEventFinishedCallback = removePopupAndResetState.bind(null, instance, container, returnFocus, didClose); + popup.addEventListener(animationEndEvent, function (e) { + if (e.target === popup) { + globalState.swalCloseEventFinishedCallback(); + delete globalState.swalCloseEventFinishedCallback; + } + }); + }; + + const triggerDidCloseAndDispose = (instance, didClose) => { + setTimeout(() => { + if (typeof didClose === 'function') { + didClose.bind(instance.params)(); + } + + instance._destroy(); + }); + }; + + function setButtonsDisabled(instance, buttons, disabled) { + const domCache = privateProps.domCache.get(instance); + buttons.forEach(button => { + domCache[button].disabled = disabled; + }); + } + + function setInputDisabled(input, disabled) { + if (!input) { + return false; + } + + if (input.type === 'radio') { + const radiosContainer = input.parentNode.parentNode; + const radios = radiosContainer.querySelectorAll('input'); + + for (let i = 0; i < radios.length; i++) { + radios[i].disabled = disabled; + } + } else { + input.disabled = disabled; + } + } + + function enableButtons() { + setButtonsDisabled(this, ['confirmButton', 'denyButton', 'cancelButton'], false); + } + function disableButtons() { + setButtonsDisabled(this, ['confirmButton', 'denyButton', 'cancelButton'], true); + } + function enableInput() { + return setInputDisabled(this.getInput(), false); + } + function disableInput() { + return setInputDisabled(this.getInput(), true); + } + + function showValidationMessage(error) { + const domCache = privateProps.domCache.get(this); + const params = privateProps.innerParams.get(this); + setInnerHtml(domCache.validationMessage, error); + domCache.validationMessage.className = swalClasses['validation-message']; + + if (params.customClass && params.customClass.validationMessage) { + addClass(domCache.validationMessage, params.customClass.validationMessage); + } + + show(domCache.validationMessage); + const input = this.getInput(); + + if (input) { + input.setAttribute('aria-invalid', true); + input.setAttribute('aria-describedby', swalClasses['validation-message']); + focusInput(input); + addClass(input, swalClasses.inputerror); + } + } // Hide block with validation message + + function resetValidationMessage$1() { + const domCache = privateProps.domCache.get(this); + + if (domCache.validationMessage) { + hide(domCache.validationMessage); + } + + const input = this.getInput(); + + if (input) { + input.removeAttribute('aria-invalid'); + input.removeAttribute('aria-describedby'); + removeClass(input, swalClasses.inputerror); + } + } + + function getProgressSteps$1() { + const domCache = privateProps.domCache.get(this); + return domCache.progressSteps; + } + + class Timer { + constructor(callback, delay) { + this.callback = callback; + this.remaining = delay; + this.running = false; + this.start(); + } + + start() { + if (!this.running) { + this.running = true; + this.started = new Date(); + this.id = setTimeout(this.callback, this.remaining); + } + + return this.remaining; + } + + stop() { + if (this.running) { + this.running = false; + clearTimeout(this.id); + this.remaining -= new Date() - this.started; + } + + return this.remaining; + } + + increase(n) { + const running = this.running; + + if (running) { + this.stop(); + } + + this.remaining += n; + + if (running) { + this.start(); + } + + return this.remaining; + } + + getTimerLeft() { + if (this.running) { + this.stop(); + this.start(); + } + + return this.remaining; + } + + isRunning() { + return this.running; + } + + } + + var defaultInputValidators = { + email: (string, validationMessage) => { + return /^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]{2,24}$/.test(string) ? Promise.resolve() : Promise.resolve(validationMessage || 'Invalid email address'); + }, + url: (string, validationMessage) => { + // taken from https://stackoverflow.com/a/3809435 with a small change from #1306 and #2013 + return /^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(string) ? Promise.resolve() : Promise.resolve(validationMessage || 'Invalid URL'); + } + }; + + function setDefaultInputValidators(params) { + // Use default `inputValidator` for supported input types if not provided + if (!params.inputValidator) { + Object.keys(defaultInputValidators).forEach(key => { + if (params.input === key) { + params.inputValidator = defaultInputValidators[key]; + } + }); + } + } + + function validateCustomTargetElement(params) { + // Determine if the custom target element is valid + if (!params.target || typeof params.target === 'string' && !document.querySelector(params.target) || typeof params.target !== 'string' && !params.target.appendChild) { + warn('Target parameter is not valid, defaulting to "body"'); + params.target = 'body'; + } + } + /** + * Set type, text and actions on popup + * + * @param params + * @returns {boolean} + */ + + + function setParameters(params) { + setDefaultInputValidators(params); // showLoaderOnConfirm && preConfirm + + if (params.showLoaderOnConfirm && !params.preConfirm) { + warn('showLoaderOnConfirm is set to true, but preConfirm is not defined.\n' + 'showLoaderOnConfirm should be used together with preConfirm, see usage example:\n' + 'https://sweetalert2.github.io/#ajax-request'); + } + + validateCustomTargetElement(params); // Replace newlines with
                                                    in title + + if (typeof params.title === 'string') { + params.title = params.title.split('\n').join('
                                                    '); + } + + init(params); + } + + const swalStringParams = ['swal-title', 'swal-html', 'swal-footer']; + const getTemplateParams = params => { + const template = typeof params.template === 'string' ? document.querySelector(params.template) : params.template; + + if (!template) { + return {}; + } + + const templateContent = template.content; + showWarningsForElements(templateContent); + const result = Object.assign(getSwalParams(templateContent), getSwalButtons(templateContent), getSwalImage(templateContent), getSwalIcon(templateContent), getSwalInput(templateContent), getSwalStringParams(templateContent, swalStringParams)); + return result; + }; + + const getSwalParams = templateContent => { + const result = {}; + toArray(templateContent.querySelectorAll('swal-param')).forEach(param => { + showWarningsForAttributes(param, ['name', 'value']); + const paramName = param.getAttribute('name'); + let value = param.getAttribute('value'); + + if (typeof defaultParams[paramName] === 'boolean' && value === 'false') { + value = false; + } + + if (typeof defaultParams[paramName] === 'object') { + value = JSON.parse(value); + } + + result[paramName] = value; + }); + return result; + }; + + const getSwalButtons = templateContent => { + const result = {}; + toArray(templateContent.querySelectorAll('swal-button')).forEach(button => { + showWarningsForAttributes(button, ['type', 'color', 'aria-label']); + const type = button.getAttribute('type'); + result["".concat(type, "ButtonText")] = button.innerHTML; + result["show".concat(capitalizeFirstLetter(type), "Button")] = true; + + if (button.hasAttribute('color')) { + result["".concat(type, "ButtonColor")] = button.getAttribute('color'); + } + + if (button.hasAttribute('aria-label')) { + result["".concat(type, "ButtonAriaLabel")] = button.getAttribute('aria-label'); + } + }); + return result; + }; + + const getSwalImage = templateContent => { + const result = {}; + const image = templateContent.querySelector('swal-image'); + + if (image) { + showWarningsForAttributes(image, ['src', 'width', 'height', 'alt']); + + if (image.hasAttribute('src')) { + result.imageUrl = image.getAttribute('src'); + } + + if (image.hasAttribute('width')) { + result.imageWidth = image.getAttribute('width'); + } + + if (image.hasAttribute('height')) { + result.imageHeight = image.getAttribute('height'); + } + + if (image.hasAttribute('alt')) { + result.imageAlt = image.getAttribute('alt'); + } + } + + return result; + }; + + const getSwalIcon = templateContent => { + const result = {}; + const icon = templateContent.querySelector('swal-icon'); + + if (icon) { + showWarningsForAttributes(icon, ['type', 'color']); + + if (icon.hasAttribute('type')) { + result.icon = icon.getAttribute('type'); + } + + if (icon.hasAttribute('color')) { + result.iconColor = icon.getAttribute('color'); + } + + result.iconHtml = icon.innerHTML; + } + + return result; + }; + + const getSwalInput = templateContent => { + const result = {}; + const input = templateContent.querySelector('swal-input'); + + if (input) { + showWarningsForAttributes(input, ['type', 'label', 'placeholder', 'value']); + result.input = input.getAttribute('type') || 'text'; + + if (input.hasAttribute('label')) { + result.inputLabel = input.getAttribute('label'); + } + + if (input.hasAttribute('placeholder')) { + result.inputPlaceholder = input.getAttribute('placeholder'); + } + + if (input.hasAttribute('value')) { + result.inputValue = input.getAttribute('value'); + } + } + + const inputOptions = templateContent.querySelectorAll('swal-input-option'); + + if (inputOptions.length) { + result.inputOptions = {}; + toArray(inputOptions).forEach(option => { + showWarningsForAttributes(option, ['value']); + const optionValue = option.getAttribute('value'); + const optionName = option.innerHTML; + result.inputOptions[optionValue] = optionName; + }); + } + + return result; + }; + + const getSwalStringParams = (templateContent, paramNames) => { + const result = {}; + + for (const i in paramNames) { + const paramName = paramNames[i]; + const tag = templateContent.querySelector(paramName); + + if (tag) { + showWarningsForAttributes(tag, []); + result[paramName.replace(/^swal-/, '')] = tag.innerHTML.trim(); + } + } + + return result; + }; + + const showWarningsForElements = template => { + const allowedElements = swalStringParams.concat(['swal-param', 'swal-button', 'swal-image', 'swal-icon', 'swal-input', 'swal-input-option']); + toArray(template.children).forEach(el => { + const tagName = el.tagName.toLowerCase(); + + if (allowedElements.indexOf(tagName) === -1) { + warn("Unrecognized element <".concat(tagName, ">")); + } + }); + }; + + const showWarningsForAttributes = (el, allowedAttributes) => { + toArray(el.attributes).forEach(attribute => { + if (allowedAttributes.indexOf(attribute.name) === -1) { + warn(["Unrecognized attribute \"".concat(attribute.name, "\" on <").concat(el.tagName.toLowerCase(), ">."), "".concat(allowedAttributes.length ? "Allowed attributes are: ".concat(allowedAttributes.join(', ')) : 'To set the value, use HTML within the element.')]); + } + }); + }; + + const SHOW_CLASS_TIMEOUT = 10; + /** + * Open popup, add necessary classes and styles, fix scrollbar + * + * @param params + */ + + const openPopup = params => { + const container = getContainer(); + const popup = getPopup(); + + if (typeof params.willOpen === 'function') { + params.willOpen(popup); + } + + const bodyStyles = window.getComputedStyle(document.body); + const initialBodyOverflow = bodyStyles.overflowY; + addClasses$1(container, popup, params); // scrolling is 'hidden' until animation is done, after that 'auto' + + setTimeout(() => { + setScrollingVisibility(container, popup); + }, SHOW_CLASS_TIMEOUT); + + if (isModal()) { + fixScrollContainer(container, params.scrollbarPadding, initialBodyOverflow); + setAriaHidden(); + } + + if (!isToast() && !globalState.previousActiveElement) { + globalState.previousActiveElement = document.activeElement; + } + + if (typeof params.didOpen === 'function') { + setTimeout(() => params.didOpen(popup)); + } + + removeClass(container, swalClasses['no-transition']); + }; + + const swalOpenAnimationFinished = event => { + const popup = getPopup(); + + if (event.target !== popup) { + return; + } + + const container = getContainer(); + popup.removeEventListener(animationEndEvent, swalOpenAnimationFinished); + container.style.overflowY = 'auto'; + }; + + const setScrollingVisibility = (container, popup) => { + if (animationEndEvent && hasCssAnimation(popup)) { + container.style.overflowY = 'hidden'; + popup.addEventListener(animationEndEvent, swalOpenAnimationFinished); + } else { + container.style.overflowY = 'auto'; + } + }; + + const fixScrollContainer = (container, scrollbarPadding, initialBodyOverflow) => { + iOSfix(); + + if (scrollbarPadding && initialBodyOverflow !== 'hidden') { + fixScrollbar(); + } // sweetalert2/issues/1247 + + + setTimeout(() => { + container.scrollTop = 0; + }); + }; + + const addClasses$1 = (container, popup, params) => { + addClass(container, params.showClass.backdrop); // the workaround with setting/unsetting opacity is needed for #2019 and 2059 + + popup.style.setProperty('opacity', '0', 'important'); + show(popup, 'grid'); + setTimeout(() => { + // Animate popup right after showing it + addClass(popup, params.showClass.popup); // and remove the opacity workaround + + popup.style.removeProperty('opacity'); + }, SHOW_CLASS_TIMEOUT); // 10ms in order to fix #2062 + + addClass([document.documentElement, document.body], swalClasses.shown); + + if (params.heightAuto && params.backdrop && !params.toast) { + addClass([document.documentElement, document.body], swalClasses['height-auto']); + } + }; + + const handleInputOptionsAndValue = (instance, params) => { + if (params.input === 'select' || params.input === 'radio') { + handleInputOptions(instance, params); + } else if (['text', 'email', 'number', 'tel', 'textarea'].includes(params.input) && (hasToPromiseFn(params.inputValue) || isPromise(params.inputValue))) { + showLoading(getConfirmButton()); + handleInputValue(instance, params); + } + }; + const getInputValue = (instance, innerParams) => { + const input = instance.getInput(); + + if (!input) { + return null; + } + + switch (innerParams.input) { + case 'checkbox': + return getCheckboxValue(input); + + case 'radio': + return getRadioValue(input); + + case 'file': + return getFileValue(input); + + default: + return innerParams.inputAutoTrim ? input.value.trim() : input.value; + } + }; + + const getCheckboxValue = input => input.checked ? 1 : 0; + + const getRadioValue = input => input.checked ? input.value : null; + + const getFileValue = input => input.files.length ? input.getAttribute('multiple') !== null ? input.files : input.files[0] : null; + + const handleInputOptions = (instance, params) => { + const popup = getPopup(); + + const processInputOptions = inputOptions => populateInputOptions[params.input](popup, formatInputOptions(inputOptions), params); + + if (hasToPromiseFn(params.inputOptions) || isPromise(params.inputOptions)) { + showLoading(getConfirmButton()); + asPromise(params.inputOptions).then(inputOptions => { + instance.hideLoading(); + processInputOptions(inputOptions); + }); + } else if (typeof params.inputOptions === 'object') { + processInputOptions(params.inputOptions); + } else { + error("Unexpected type of inputOptions! Expected object, Map or Promise, got ".concat(typeof params.inputOptions)); + } + }; + + const handleInputValue = (instance, params) => { + const input = instance.getInput(); + hide(input); + asPromise(params.inputValue).then(inputValue => { + input.value = params.input === 'number' ? parseFloat(inputValue) || 0 : "".concat(inputValue); + show(input); + input.focus(); + instance.hideLoading(); + }).catch(err => { + error("Error in inputValue promise: ".concat(err)); + input.value = ''; + show(input); + input.focus(); + instance.hideLoading(); + }); + }; + + const populateInputOptions = { + select: (popup, inputOptions, params) => { + const select = getChildByClass(popup, swalClasses.select); + + const renderOption = (parent, optionLabel, optionValue) => { + const option = document.createElement('option'); + option.value = optionValue; + setInnerHtml(option, optionLabel); + option.selected = isSelected(optionValue, params.inputValue); + parent.appendChild(option); + }; + + inputOptions.forEach(inputOption => { + const optionValue = inputOption[0]; + const optionLabel = inputOption[1]; // spec: + // https://www.w3.org/TR/html401/interact/forms.html#h-17.6 + // "...all OPTGROUP elements must be specified directly within a SELECT element (i.e., groups may not be nested)..." + // check whether this is a + + if (Array.isArray(optionLabel)) { + // if it is an array, then it is an + const optgroup = document.createElement('optgroup'); + optgroup.label = optionValue; + optgroup.disabled = false; // not configurable for now + + select.appendChild(optgroup); + optionLabel.forEach(o => renderOption(optgroup, o[1], o[0])); + } else { + // case of + valueFormatted = formatInputOptions(valueFormatted); + } + + result.push([key, valueFormatted]); + }); + } else { + Object.keys(inputOptions).forEach(key => { + let valueFormatted = inputOptions[key]; + + if (typeof valueFormatted === 'object') { + // case of + valueFormatted = formatInputOptions(valueFormatted); + } + + result.push([key, valueFormatted]); + }); + } + + return result; + }; + + const isSelected = (optionValue, inputValue) => { + return inputValue && inputValue.toString() === optionValue.toString(); + }; + + const handleConfirmButtonClick = instance => { + const innerParams = privateProps.innerParams.get(instance); + instance.disableButtons(); + + if (innerParams.input) { + handleConfirmOrDenyWithInput(instance, 'confirm'); + } else { + confirm(instance, true); + } + }; + const handleDenyButtonClick = instance => { + const innerParams = privateProps.innerParams.get(instance); + instance.disableButtons(); + + if (innerParams.returnInputValueOnDeny) { + handleConfirmOrDenyWithInput(instance, 'deny'); + } else { + deny(instance, false); + } + }; + const handleCancelButtonClick = (instance, dismissWith) => { + instance.disableButtons(); + dismissWith(DismissReason.cancel); + }; + + const handleConfirmOrDenyWithInput = (instance, type + /* 'confirm' | 'deny' */ + ) => { + const innerParams = privateProps.innerParams.get(instance); + const inputValue = getInputValue(instance, innerParams); + + if (innerParams.inputValidator) { + handleInputValidator(instance, inputValue, type); + } else if (!instance.getInput().checkValidity()) { + instance.enableButtons(); + instance.showValidationMessage(innerParams.validationMessage); + } else if (type === 'deny') { + deny(instance, inputValue); + } else { + confirm(instance, inputValue); + } + }; + + const handleInputValidator = (instance, inputValue, type + /* 'confirm' | 'deny' */ + ) => { + const innerParams = privateProps.innerParams.get(instance); + instance.disableInput(); + const validationPromise = Promise.resolve().then(() => asPromise(innerParams.inputValidator(inputValue, innerParams.validationMessage))); + validationPromise.then(validationMessage => { + instance.enableButtons(); + instance.enableInput(); + + if (validationMessage) { + instance.showValidationMessage(validationMessage); + } else if (type === 'deny') { + deny(instance, inputValue); + } else { + confirm(instance, inputValue); + } + }); + }; + + const deny = (instance, value) => { + const innerParams = privateProps.innerParams.get(instance || undefined); + + if (innerParams.showLoaderOnDeny) { + showLoading(getDenyButton()); + } + + if (innerParams.preDeny) { + const preDenyPromise = Promise.resolve().then(() => asPromise(innerParams.preDeny(value, innerParams.validationMessage))); + preDenyPromise.then(preDenyValue => { + if (preDenyValue === false) { + instance.hideLoading(); + } else { + instance.closePopup({ + isDenied: true, + value: typeof preDenyValue === 'undefined' ? value : preDenyValue + }); + } + }); + } else { + instance.closePopup({ + isDenied: true, + value + }); + } + }; + + const succeedWith = (instance, value) => { + instance.closePopup({ + isConfirmed: true, + value + }); + }; + + const confirm = (instance, value) => { + const innerParams = privateProps.innerParams.get(instance || undefined); + + if (innerParams.showLoaderOnConfirm) { + showLoading(); // TODO: make showLoading an *instance* method + } + + if (innerParams.preConfirm) { + instance.resetValidationMessage(); + const preConfirmPromise = Promise.resolve().then(() => asPromise(innerParams.preConfirm(value, innerParams.validationMessage))); + preConfirmPromise.then(preConfirmValue => { + if (isVisible(getValidationMessage()) || preConfirmValue === false) { + instance.hideLoading(); + } else { + succeedWith(instance, typeof preConfirmValue === 'undefined' ? value : preConfirmValue); + } + }); + } else { + succeedWith(instance, value); + } + }; + + const addKeydownHandler = (instance, globalState, innerParams, dismissWith) => { + if (globalState.keydownTarget && globalState.keydownHandlerAdded) { + globalState.keydownTarget.removeEventListener('keydown', globalState.keydownHandler, { + capture: globalState.keydownListenerCapture + }); + globalState.keydownHandlerAdded = false; + } + + if (!innerParams.toast) { + globalState.keydownHandler = e => keydownHandler(instance, e, dismissWith); + + globalState.keydownTarget = innerParams.keydownListenerCapture ? window : getPopup(); + globalState.keydownListenerCapture = innerParams.keydownListenerCapture; + globalState.keydownTarget.addEventListener('keydown', globalState.keydownHandler, { + capture: globalState.keydownListenerCapture + }); + globalState.keydownHandlerAdded = true; + } + }; // Focus handling + + const setFocus = (innerParams, index, increment) => { + const focusableElements = getFocusableElements(); // search for visible elements and select the next possible match + + if (focusableElements.length) { + index = index + increment; // rollover to first item + + if (index === focusableElements.length) { + index = 0; // go to last item + } else if (index === -1) { + index = focusableElements.length - 1; + } + + return focusableElements[index].focus(); + } // no visible focusable elements, focus the popup + + + getPopup().focus(); + }; + const arrowKeysNextButton = ['ArrowRight', 'ArrowDown']; + const arrowKeysPreviousButton = ['ArrowLeft', 'ArrowUp']; + + const keydownHandler = (instance, e, dismissWith) => { + const innerParams = privateProps.innerParams.get(instance); + + if (!innerParams) { + return; // This instance has already been destroyed + } + + if (innerParams.stopKeydownPropagation) { + e.stopPropagation(); + } // ENTER + + + if (e.key === 'Enter') { + handleEnter(instance, e, innerParams); // TAB + } else if (e.key === 'Tab') { + handleTab(e, innerParams); // ARROWS - switch focus between buttons + } else if ([...arrowKeysNextButton, ...arrowKeysPreviousButton].includes(e.key)) { + handleArrows(e.key); // ESC + } else if (e.key === 'Escape') { + handleEsc(e, innerParams, dismissWith); + } + }; + + const handleEnter = (instance, e, innerParams) => { + // #720 #721 + if (e.isComposing) { + return; + } + + if (e.target && instance.getInput() && e.target.outerHTML === instance.getInput().outerHTML) { + if (['textarea', 'file'].includes(innerParams.input)) { + return; // do not submit + } + + clickConfirm(); + e.preventDefault(); + } + }; + + const handleTab = (e, innerParams) => { + const targetElement = e.target; + const focusableElements = getFocusableElements(); + let btnIndex = -1; + + for (let i = 0; i < focusableElements.length; i++) { + if (targetElement === focusableElements[i]) { + btnIndex = i; + break; + } + } + + if (!e.shiftKey) { + // Cycle to the next button + setFocus(innerParams, btnIndex, 1); + } else { + // Cycle to the prev button + setFocus(innerParams, btnIndex, -1); + } + + e.stopPropagation(); + e.preventDefault(); + }; + + const handleArrows = key => { + const confirmButton = getConfirmButton(); + const denyButton = getDenyButton(); + const cancelButton = getCancelButton(); + + if (![confirmButton, denyButton, cancelButton].includes(document.activeElement)) { + return; + } + + const sibling = arrowKeysNextButton.includes(key) ? 'nextElementSibling' : 'previousElementSibling'; + const buttonToFocus = document.activeElement[sibling]; + + if (buttonToFocus) { + buttonToFocus.focus(); + } + }; + + const handleEsc = (e, innerParams, dismissWith) => { + if (callIfFunction(innerParams.allowEscapeKey)) { + e.preventDefault(); + dismissWith(DismissReason.esc); + } + }; + + const handlePopupClick = (instance, domCache, dismissWith) => { + const innerParams = privateProps.innerParams.get(instance); + + if (innerParams.toast) { + handleToastClick(instance, domCache, dismissWith); + } else { + // Ignore click events that had mousedown on the popup but mouseup on the container + // This can happen when the user drags a slider + handleModalMousedown(domCache); // Ignore click events that had mousedown on the container but mouseup on the popup + + handleContainerMousedown(domCache); + handleModalClick(instance, domCache, dismissWith); + } + }; + + const handleToastClick = (instance, domCache, dismissWith) => { + // Closing toast by internal click + domCache.popup.onclick = () => { + const innerParams = privateProps.innerParams.get(instance); + + if (innerParams.showConfirmButton || innerParams.showDenyButton || innerParams.showCancelButton || innerParams.showCloseButton || innerParams.timer || innerParams.input) { + return; + } + + dismissWith(DismissReason.close); + }; + }; + + let ignoreOutsideClick = false; + + const handleModalMousedown = domCache => { + domCache.popup.onmousedown = () => { + domCache.container.onmouseup = function (e) { + domCache.container.onmouseup = undefined; // We only check if the mouseup target is the container because usually it doesn't + // have any other direct children aside of the popup + + if (e.target === domCache.container) { + ignoreOutsideClick = true; + } + }; + }; + }; + + const handleContainerMousedown = domCache => { + domCache.container.onmousedown = () => { + domCache.popup.onmouseup = function (e) { + domCache.popup.onmouseup = undefined; // We also need to check if the mouseup target is a child of the popup + + if (e.target === domCache.popup || domCache.popup.contains(e.target)) { + ignoreOutsideClick = true; + } + }; + }; + }; + + const handleModalClick = (instance, domCache, dismissWith) => { + domCache.container.onclick = e => { + const innerParams = privateProps.innerParams.get(instance); + + if (ignoreOutsideClick) { + ignoreOutsideClick = false; + return; + } + + if (e.target === domCache.container && callIfFunction(innerParams.allowOutsideClick)) { + dismissWith(DismissReason.backdrop); + } + }; + }; + + function _main(userParams, mixinParams = {}) { + showWarningsForParams(Object.assign({}, mixinParams, userParams)); + + if (globalState.currentInstance) { + globalState.currentInstance._destroy(); + + if (isModal()) { + unsetAriaHidden(); + } + } + + globalState.currentInstance = this; + const innerParams = prepareParams(userParams, mixinParams); + setParameters(innerParams); + Object.freeze(innerParams); // clear the previous timer + + if (globalState.timeout) { + globalState.timeout.stop(); + delete globalState.timeout; + } // clear the restore focus timeout + + + clearTimeout(globalState.restoreFocusTimeout); + const domCache = populateDomCache(this); + render(this, innerParams); + privateProps.innerParams.set(this, innerParams); + return swalPromise(this, domCache, innerParams); + } + + const prepareParams = (userParams, mixinParams) => { + const templateParams = getTemplateParams(userParams); + const params = Object.assign({}, defaultParams, mixinParams, templateParams, userParams); // precedence is described in #2131 + + params.showClass = Object.assign({}, defaultParams.showClass, params.showClass); + params.hideClass = Object.assign({}, defaultParams.hideClass, params.hideClass); + return params; + }; + + const swalPromise = (instance, domCache, innerParams) => { + return new Promise(resolve => { + // functions to handle all closings/dismissals + const dismissWith = dismiss => { + instance.closePopup({ + isDismissed: true, + dismiss + }); + }; + + privateMethods.swalPromiseResolve.set(instance, resolve); + + domCache.confirmButton.onclick = () => handleConfirmButtonClick(instance); + + domCache.denyButton.onclick = () => handleDenyButtonClick(instance); + + domCache.cancelButton.onclick = () => handleCancelButtonClick(instance, dismissWith); + + domCache.closeButton.onclick = () => dismissWith(DismissReason.close); + + handlePopupClick(instance, domCache, dismissWith); + addKeydownHandler(instance, globalState, innerParams, dismissWith); + handleInputOptionsAndValue(instance, innerParams); + openPopup(innerParams); + setupTimer(globalState, innerParams, dismissWith); + initFocus(domCache, innerParams); // Scroll container to top on open (#1247, #1946) + + setTimeout(() => { + domCache.container.scrollTop = 0; + }); + }); + }; + + const populateDomCache = instance => { + const domCache = { + popup: getPopup(), + container: getContainer(), + actions: getActions(), + confirmButton: getConfirmButton(), + denyButton: getDenyButton(), + cancelButton: getCancelButton(), + loader: getLoader(), + closeButton: getCloseButton(), + validationMessage: getValidationMessage(), + progressSteps: getProgressSteps() + }; + privateProps.domCache.set(instance, domCache); + return domCache; + }; + + const setupTimer = (globalState$$1, innerParams, dismissWith) => { + const timerProgressBar = getTimerProgressBar(); + hide(timerProgressBar); + + if (innerParams.timer) { + globalState$$1.timeout = new Timer(() => { + dismissWith('timer'); + delete globalState$$1.timeout; + }, innerParams.timer); + + if (innerParams.timerProgressBar) { + show(timerProgressBar); + setTimeout(() => { + if (globalState$$1.timeout && globalState$$1.timeout.running) { + // timer can be already stopped or unset at this point + animateTimerProgressBar(innerParams.timer); + } + }); + } + } + }; + + const initFocus = (domCache, innerParams) => { + if (innerParams.toast) { + return; + } + + if (!callIfFunction(innerParams.allowEnterKey)) { + return blurActiveElement(); + } + + if (!focusButton(domCache, innerParams)) { + setFocus(innerParams, -1, 1); + } + }; + + const focusButton = (domCache, innerParams) => { + if (innerParams.focusDeny && isVisible(domCache.denyButton)) { + domCache.denyButton.focus(); + return true; + } + + if (innerParams.focusCancel && isVisible(domCache.cancelButton)) { + domCache.cancelButton.focus(); + return true; + } + + if (innerParams.focusConfirm && isVisible(domCache.confirmButton)) { + domCache.confirmButton.focus(); + return true; + } + + return false; + }; + + const blurActiveElement = () => { + if (document.activeElement && typeof document.activeElement.blur === 'function') { + document.activeElement.blur(); + } + }; + + /** + * Updates popup parameters. + */ + + function update(params) { + const popup = getPopup(); + const innerParams = privateProps.innerParams.get(this); + + if (!popup || hasClass(popup, innerParams.hideClass.popup)) { + return warn("You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup."); + } + + const validUpdatableParams = {}; // assign valid params from `params` to `defaults` + + Object.keys(params).forEach(param => { + if (Swal.isUpdatableParameter(param)) { + validUpdatableParams[param] = params[param]; + } else { + warn("Invalid parameter to update: \"".concat(param, "\". Updatable params are listed here: https://github.com/sweetalert2/sweetalert2/blob/master/src/utils/params.js\n\nIf you think this parameter should be updatable, request it here: https://github.com/sweetalert2/sweetalert2/issues/new?template=02_feature_request.md")); + } + }); + const updatedParams = Object.assign({}, innerParams, validUpdatableParams); + render(this, updatedParams); + privateProps.innerParams.set(this, updatedParams); + Object.defineProperties(this, { + params: { + value: Object.assign({}, this.params, params), + writable: false, + enumerable: true + } + }); + } + + function _destroy() { + const domCache = privateProps.domCache.get(this); + const innerParams = privateProps.innerParams.get(this); + + if (!innerParams) { + return; // This instance has already been destroyed + } // Check if there is another Swal closing + + + if (domCache.popup && globalState.swalCloseEventFinishedCallback) { + globalState.swalCloseEventFinishedCallback(); + delete globalState.swalCloseEventFinishedCallback; + } // Check if there is a swal disposal defer timer + + + if (globalState.deferDisposalTimer) { + clearTimeout(globalState.deferDisposalTimer); + delete globalState.deferDisposalTimer; + } + + if (typeof innerParams.didDestroy === 'function') { + innerParams.didDestroy(); + } + + disposeSwal(this); + } + + const disposeSwal = instance => { + // Unset this.params so GC will dispose it (#1569) + delete instance.params; // Unset globalState props so GC will dispose globalState (#1569) + + delete globalState.keydownHandler; + delete globalState.keydownTarget; // Unset WeakMaps so GC will be able to dispose them (#1569) + + unsetWeakMaps(privateProps); + unsetWeakMaps(privateMethods); // Unset currentInstance + + delete globalState.currentInstance; + }; + + const unsetWeakMaps = obj => { + for (const i in obj) { + obj[i] = new WeakMap(); + } + }; + + + + var instanceMethods = /*#__PURE__*/Object.freeze({ + hideLoading: hideLoading, + disableLoading: hideLoading, + getInput: getInput$1, + close: close, + closePopup: close, + closeModal: close, + closeToast: close, + enableButtons: enableButtons, + disableButtons: disableButtons, + enableInput: enableInput, + disableInput: disableInput, + showValidationMessage: showValidationMessage, + resetValidationMessage: resetValidationMessage$1, + getProgressSteps: getProgressSteps$1, + _main: _main, + update: update, + _destroy: _destroy + }); + + let currentInstance; + + class SweetAlert { + constructor(...args) { + // Prevent run in Node env + if (typeof window === 'undefined') { + return; + } + + currentInstance = this; + const outerParams = Object.freeze(this.constructor.argsToParams(args)); + Object.defineProperties(this, { + params: { + value: outerParams, + writable: false, + enumerable: true, + configurable: true + } + }); + + const promise = this._main(this.params); + + privateProps.promise.set(this, promise); + } // `catch` cannot be the name of a module export, so we define our thenable methods here instead + + + then(onFulfilled) { + const promise = privateProps.promise.get(this); + return promise.then(onFulfilled); + } + + finally(onFinally) { + const promise = privateProps.promise.get(this); + return promise.finally(onFinally); + } + + } // Assign instance methods from src/instanceMethods/*.js to prototype + + + Object.assign(SweetAlert.prototype, instanceMethods); // Assign static methods from src/staticMethods/*.js to constructor + + Object.assign(SweetAlert, staticMethods); // Proxy to instance methods to constructor, for now, for backwards compatibility + + Object.keys(instanceMethods).forEach(key => { + SweetAlert[key] = function (...args) { + if (currentInstance) { + return currentInstance[key](...args); + } + }; + }); + SweetAlert.DismissReason = DismissReason; + SweetAlert.version = '11.1.5'; + + const Swal = SweetAlert; + Swal.default = Swal; + + return Swal; + +})); +if (typeof this !== 'undefined' && this.Sweetalert2){ this.swal = this.sweetAlert = this.Swal = this.SweetAlert = this.Sweetalert2} + +"undefined"!=typeof document&&function(e,t){var n=e.createElement("style");if(e.getElementsByTagName("head")[0].appendChild(n),n.styleSheet)n.styleSheet.disabled||(n.styleSheet.cssText=t);else try{n.innerHTML=t}catch(e){n.innerText=t}}(document,".swal2-popup.swal2-toast{box-sizing:border-box;grid-column:1/4!important;grid-row:1/4!important;grid-template-columns:1fr 99fr 1fr;padding:1em;overflow-y:hidden;background:#fff;box-shadow:0 0 .625em #d9d9d9;pointer-events:all}.swal2-popup.swal2-toast>*{grid-column:2}.swal2-popup.swal2-toast .swal2-title{margin:1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-loading{justify-content:center}.swal2-popup.swal2-toast .swal2-input{height:2em;margin:.5em;font-size:1em}.swal2-popup.swal2-toast .swal2-validation-message{font-size:1em}.swal2-popup.swal2-toast .swal2-footer{margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-popup.swal2-toast .swal2-close{grid-column:3/3;grid-row:1/99;align-self:center;width:.8em;height:.8em;margin:0;font-size:2em}.swal2-popup.swal2-toast .swal2-html-container{margin:1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-html-container:empty{padding:0}.swal2-popup.swal2-toast .swal2-loader{grid-column:1;grid-row:1/99;align-self:center;width:2em;height:2em;margin:.25em}.swal2-popup.swal2-toast .swal2-icon{grid-column:1;grid-row:1/99;align-self:center;width:2em;min-width:2em;height:2em;margin:0 .5em 0 0}.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:700}.swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-popup.swal2-toast .swal2-actions{justify-content:flex-start;height:auto;margin:0;margin-top:.3125em;padding:0}.swal2-popup.swal2-toast .swal2-styled{margin:.25em .5em;padding:.4em .6em;font-size:1em}.swal2-popup.swal2-toast .swal2-styled:focus{box-shadow:0 0 0 1px #fff,0 0 0 3px rgba(100,150,200,.5)}.swal2-popup.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;transform:rotate(45deg);border-radius:50%}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.8em;left:-.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.25em;left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-popup.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{-webkit-animation:swal2-toast-animate-success-line-tip .75s;animation:swal2-toast-animate-success-line-tip .75s}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{-webkit-animation:swal2-toast-animate-success-line-long .75s;animation:swal2-toast-animate-success-line-long .75s}.swal2-popup.swal2-toast.swal2-show{-webkit-animation:swal2-toast-show .5s;animation:swal2-toast-show .5s}.swal2-popup.swal2-toast.swal2-hide{-webkit-animation:swal2-toast-hide .1s forwards;animation:swal2-toast-hide .1s forwards}.swal2-container{display:grid;position:fixed;z-index:1060;top:0;right:0;bottom:0;left:0;box-sizing:border-box;grid-template-areas:\"top-start top top-end\" \"center-start center center-end\" \"bottom-start bottom-center bottom-end\";grid-template-rows:minmax(-webkit-min-content,auto) minmax(-webkit-min-content,auto) minmax(-webkit-min-content,auto);grid-template-rows:minmax(min-content,auto) minmax(min-content,auto) minmax(min-content,auto);height:100%;padding:.625em;overflow-x:hidden;transition:background-color .1s;-webkit-overflow-scrolling:touch}.swal2-container.swal2-backdrop-show,.swal2-container.swal2-noanimation{background:rgba(0,0,0,.4)}.swal2-container.swal2-backdrop-hide{background:0 0!important}.swal2-container.swal2-bottom-start,.swal2-container.swal2-center-start,.swal2-container.swal2-top-start{grid-template-columns:minmax(0,1fr) auto auto}.swal2-container.swal2-bottom,.swal2-container.swal2-center,.swal2-container.swal2-top{grid-template-columns:auto minmax(0,1fr) auto}.swal2-container.swal2-bottom-end,.swal2-container.swal2-center-end,.swal2-container.swal2-top-end{grid-template-columns:auto auto minmax(0,1fr)}.swal2-container.swal2-top-start>.swal2-popup{align-self:start}.swal2-container.swal2-top>.swal2-popup{grid-column:2;align-self:start;justify-self:center}.swal2-container.swal2-top-end>.swal2-popup,.swal2-container.swal2-top-right>.swal2-popup{grid-column:3;align-self:start;justify-self:end}.swal2-container.swal2-center-left>.swal2-popup,.swal2-container.swal2-center-start>.swal2-popup{grid-row:2;align-self:center}.swal2-container.swal2-center>.swal2-popup{grid-column:2;grid-row:2;align-self:center;justify-self:center}.swal2-container.swal2-center-end>.swal2-popup,.swal2-container.swal2-center-right>.swal2-popup{grid-column:3;grid-row:2;align-self:center;justify-self:end}.swal2-container.swal2-bottom-left>.swal2-popup,.swal2-container.swal2-bottom-start>.swal2-popup{grid-column:1;grid-row:3;align-self:end}.swal2-container.swal2-bottom>.swal2-popup{grid-column:2;grid-row:3;justify-self:center;align-self:end}.swal2-container.swal2-bottom-end>.swal2-popup,.swal2-container.swal2-bottom-right>.swal2-popup{grid-column:3;grid-row:3;align-self:end;justify-self:end}.swal2-container.swal2-grow-fullscreen>.swal2-popup,.swal2-container.swal2-grow-row>.swal2-popup{grid-column:1/4;width:100%}.swal2-container.swal2-grow-column>.swal2-popup,.swal2-container.swal2-grow-fullscreen>.swal2-popup{grid-row:1/4;align-self:stretch}.swal2-container.swal2-no-transition{transition:none!important}.swal2-popup{display:none;position:relative;box-sizing:border-box;grid-template-columns:minmax(0,100%);width:32em;max-width:100%;padding:0 0 1.25em;border:none;border-radius:5px;background:#fff;color:#545454;font-family:inherit;font-size:1rem}.swal2-popup:focus{outline:0}.swal2-popup.swal2-loading{overflow-y:hidden}.swal2-title{position:relative;max-width:100%;margin:0;padding:.8em 1em 0;color:#595959;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;word-wrap:break-word}.swal2-actions{display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:center;width:auto;margin:1.25em auto 0;padding:0}.swal2-actions:not(.swal2-loading) .swal2-styled[disabled]{opacity:.4}.swal2-actions:not(.swal2-loading) .swal2-styled:hover{background-image:linear-gradient(rgba(0,0,0,.1),rgba(0,0,0,.1))}.swal2-actions:not(.swal2-loading) .swal2-styled:active{background-image:linear-gradient(rgba(0,0,0,.2),rgba(0,0,0,.2))}.swal2-loader{display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;-webkit-animation:swal2-rotate-loading 1.5s linear 0s infinite normal;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 transparent #2778c4 transparent}.swal2-styled{margin:.3125em;padding:.625em 1.1em;transition:box-shadow .1s;box-shadow:0 0 0 3px transparent;font-weight:500}.swal2-styled:not([disabled]){cursor:pointer}.swal2-styled.swal2-confirm{border:0;border-radius:.25em;background:initial;background-color:#7367f0;color:#fff;font-size:1em}.swal2-styled.swal2-confirm:focus{box-shadow:0 0 0 3px rgba(115,103,240,.5)}.swal2-styled.swal2-deny{border:0;border-radius:.25em;background:initial;background-color:#ea5455;color:#fff;font-size:1em}.swal2-styled.swal2-deny:focus{box-shadow:0 0 0 3px rgba(234,84,85,.5)}.swal2-styled.swal2-cancel{border:0;border-radius:.25em;background:initial;background-color:#6e7d88;color:#fff;font-size:1em}.swal2-styled.swal2-cancel:focus{box-shadow:0 0 0 3px rgba(110,125,136,.5)}.swal2-styled.swal2-default-outline:focus{box-shadow:0 0 0 3px rgba(100,150,200,.5)}.swal2-styled:focus{outline:0}.swal2-styled::-moz-focus-inner{border:0}.swal2-footer{justify-content:center;margin:1em 0 0;padding:1em 1em 0;border-top:1px solid #eee;color:#545454;font-size:1em}.swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;grid-column:auto!important;height:.25em;overflow:hidden;border-bottom-right-radius:5px;border-bottom-left-radius:5px}.swal2-timer-progress-bar{width:100%;height:.25em;background:rgba(0,0,0,.2)}.swal2-image{max-width:100%;margin:2em auto 1em}.swal2-close{z-index:2;align-items:center;justify-content:center;width:1.2em;height:1.2em;margin-top:0;margin-right:0;margin-bottom:-1.2em;padding:0;overflow:hidden;transition:color .1s,box-shadow .1s;border:none;border-radius:5px;background:0 0;color:#ccc;font-family:serif;font-family:monospace;font-size:2.5em;cursor:pointer;justify-self:end}.swal2-close:hover{transform:none;background:0 0;color:#f27474}.swal2-close:focus{outline:0;box-shadow:inset 0 0 0 3px rgba(100,150,200,.5)}.swal2-close::-moz-focus-inner{border:0}.swal2-html-container{z-index:1;justify-content:center;margin:1em 1.6em .3em;padding:0;overflow:auto;color:#545454;font-size:1.125em;font-weight:400;line-height:normal;text-align:center;word-wrap:break-word;word-break:break-word}.swal2-checkbox,.swal2-file,.swal2-input,.swal2-radio,.swal2-select,.swal2-textarea{margin:1em 2em 0}.swal2-file,.swal2-input,.swal2-textarea{box-sizing:border-box;width:auto;transition:border-color .1s,box-shadow .1s;border:1px solid #d9d9d9;border-radius:.1875em;background:inherit;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px transparent;color:inherit;font-size:1.125em}.swal2-file.swal2-inputerror,.swal2-input.swal2-inputerror,.swal2-textarea.swal2-inputerror{border-color:#f27474!important;box-shadow:0 0 2px #f27474!important}.swal2-file:focus,.swal2-input:focus,.swal2-textarea:focus{border:1px solid #b4dbed;outline:0;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(100,150,200,.5)}.swal2-file::-moz-placeholder,.swal2-input::-moz-placeholder,.swal2-textarea::-moz-placeholder{color:#ccc}.swal2-file:-ms-input-placeholder,.swal2-input:-ms-input-placeholder,.swal2-textarea:-ms-input-placeholder{color:#ccc}.swal2-file::placeholder,.swal2-input::placeholder,.swal2-textarea::placeholder{color:#ccc}.swal2-range{margin:1em 2em 0;background:#fff}.swal2-range input{width:80%}.swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}.swal2-range input,.swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}.swal2-input{height:2.625em;padding:0 .75em}.swal2-file{width:75%;margin-right:auto;margin-left:auto;background:inherit;font-size:1.125em}.swal2-textarea{height:6.75em;padding:.75em}.swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:inherit;color:inherit;font-size:1.125em}.swal2-checkbox,.swal2-radio{align-items:center;justify-content:center;background:#fff;color:inherit}.swal2-checkbox label,.swal2-radio label{margin:0 .6em;font-size:1.125em}.swal2-checkbox input,.swal2-radio input{flex-shrink:0;margin:0 .4em}.swal2-input-label{display:flex;justify-content:center;margin:1em auto 0}.swal2-validation-message{align-items:center;justify-content:center;margin:1em 0 0;padding:.625em;overflow:hidden;background:#f0f0f0;color:#666;font-size:1em;font-weight:300}.swal2-validation-message::before{content:\"!\";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}.swal2-icon{position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:2.5em auto .6em;border:.25em solid transparent;border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}.swal2-icon.swal2-error{border-color:#f27474;color:#f27474}.swal2-icon.swal2-error .swal2-x-mark{position:relative;flex-grow:1}.swal2-icon.swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}.swal2-icon.swal2-error.swal2-icon-show{-webkit-animation:swal2-animate-error-icon .5s;animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-error.swal2-icon-show .swal2-x-mark{-webkit-animation:swal2-animate-error-x-mark .5s;animation:swal2-animate-error-x-mark .5s}.swal2-icon.swal2-warning{border-color:#facea8;color:#f8bb86}.swal2-icon.swal2-info{border-color:#9de0f6;color:#3fc3ee}.swal2-icon.swal2-question{border-color:#c9dae1;color:#87adbd}.swal2-icon.swal2-success{border-color:#a5dc86;color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;transform:rotate(45deg);border-radius:50%}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}.swal2-icon.swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-.25em;left:-.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}.swal2-icon.swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}.swal2-icon.swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}.swal2-icon.swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-tip{-webkit-animation:swal2-animate-success-line-tip .75s;animation:swal2-animate-success-line-tip .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-long{-webkit-animation:swal2-animate-success-line-long .75s;animation:swal2-animate-success-line-long .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-circular-line-right{-webkit-animation:swal2-rotate-success-circular-line 4.25s ease-in;animation:swal2-rotate-success-circular-line 4.25s ease-in}.swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:1.25em auto;padding:0;background:inherit;font-weight:600}.swal2-progress-steps li{display:inline-block;position:relative}.swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:#add8e6;color:#fff}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:#add8e6}.swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}[class^=swal2]{-webkit-tap-highlight-color:transparent}.swal2-show{-webkit-animation:swal2-show .3s;animation:swal2-show .3s}.swal2-hide{-webkit-animation:swal2-hide .15s forwards;animation:swal2-hide .15s forwards}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{margin-right:initial;margin-left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}@-webkit-keyframes swal2-toast-show{0%{transform:translateY(-.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0)}}@keyframes swal2-toast-show{0%{transform:translateY(-.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0)}}@-webkit-keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@-webkit-keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@-webkit-keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@-webkit-keyframes swal2-show{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}100%{transform:scale(1)}}@keyframes swal2-show{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}100%{transform:scale(1)}}@-webkit-keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(.5);opacity:0}}@keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(.5);opacity:0}}@-webkit-keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@-webkit-keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@-webkit-keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@-webkit-keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@-webkit-keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0);opacity:1}}@-webkit-keyframes swal2-rotate-loading{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes swal2-rotate-loading{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto!important}body.swal2-no-backdrop .swal2-container{background-color:transparent!important;pointer-events:none}body.swal2-no-backdrop .swal2-container .swal2-popup{pointer-events:all}body.swal2-no-backdrop .swal2-container .swal2-modal{box-shadow:0 0 10px rgba(0,0,0,.4)}@media print{body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow-y:scroll!important}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .swal2-container{position:static!important}}body.swal2-toast-shown .swal2-container{box-sizing:border-box;width:360px;max-width:100%;background-color:transparent;pointer-events:none}body.swal2-toast-shown .swal2-container.swal2-top{top:0;right:auto;bottom:auto;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{top:0;right:0;bottom:auto;left:auto}body.swal2-toast-shown .swal2-container.swal2-top-left,body.swal2-toast-shown .swal2-container.swal2-top-start{top:0;right:auto;bottom:auto;left:0}body.swal2-toast-shown .swal2-container.swal2-center-left,body.swal2-toast-shown .swal2-container.swal2-center-start{top:50%;right:auto;bottom:auto;left:0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{top:50%;right:auto;bottom:auto;left:50%;transform:translate(-50%,-50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{top:50%;right:0;bottom:auto;left:auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-left,body.swal2-toast-shown .swal2-container.swal2-bottom-start{top:auto;right:auto;bottom:0;left:0}body.swal2-toast-shown .swal2-container.swal2-bottom{top:auto;right:auto;bottom:0;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{top:auto;right:0;bottom:0;left:auto}"); \ No newline at end of file diff --git a/modules/virtual-file-explorer/app/Volo.Abp.VirtualFileExplorer.DemoApp/wwwroot/libs/sweetalert2/sweetalert2.all.min.js b/modules/virtual-file-explorer/app/Volo.Abp.VirtualFileExplorer.DemoApp/wwwroot/libs/sweetalert2/sweetalert2.all.min.js new file mode 100644 index 0000000000..57ff7ff176 --- /dev/null +++ b/modules/virtual-file-explorer/app/Volo.Abp.VirtualFileExplorer.DemoApp/wwwroot/libs/sweetalert2/sweetalert2.all.min.js @@ -0,0 +1,2 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).Sweetalert2=t()}(this,function(){"use strict";const l=Object.freeze({cancel:"cancel",backdrop:"backdrop",close:"close",esc:"esc",timer:"timer"}),t="SweetAlert2:",o=e=>e.charAt(0).toUpperCase()+e.slice(1),a=e=>Array.prototype.slice.call(e),s=e=>{console.warn("".concat(t," ").concat("object"==typeof e?e.join(" "):e))},r=e=>{console.error("".concat(t," ").concat(e))},n=[],i=(e,t)=>{t='"'.concat(e,'" is deprecated and will be removed in the next major release. Please use "').concat(t,'" instead.'),n.includes(t)||(n.push(t),s(t))},c=e=>"function"==typeof e?e():e,u=e=>e&&"function"==typeof e.toPromise,d=e=>u(e)?e.toPromise():Promise.resolve(e),p=e=>e&&Promise.resolve(e)===e,m=e=>e instanceof Element||(e=>"object"==typeof e&&e.jquery)(e);var e=e=>{const t={};for(const n in e)t[e[n]]="swal2-"+e[n];return t};const h=e(["container","shown","height-auto","iosfix","popup","modal","no-backdrop","no-transition","toast","toast-shown","show","hide","close","title","html-container","actions","confirm","deny","cancel","default-outline","footer","icon","icon-content","image","input","file","range","select","radio","checkbox","label","textarea","inputerror","input-label","validation-message","progress-steps","active-progress-step","progress-step","progress-step-line","loader","loading","styled","top","top-start","top-end","top-left","top-right","center","center-start","center-end","center-left","center-right","bottom","bottom-start","bottom-end","bottom-left","bottom-right","grow-row","grow-column","grow-fullscreen","rtl","timer-progress-bar","timer-progress-bar-container","scrollbar-measure","icon-success","icon-warning","icon-info","icon-question","icon-error"]),g=e(["success","warning","info","question","error"]),b=()=>document.body.querySelector(".".concat(h.container)),f=e=>{const t=b();return t?t.querySelector(e):null},y=e=>f(".".concat(e)),v=()=>y(h.popup),w=()=>y(h.icon),C=()=>y(h.title),k=()=>y(h["html-container"]),A=()=>y(h.image),B=()=>y(h["progress-steps"]),x=()=>y(h["validation-message"]),P=()=>f(".".concat(h.actions," .").concat(h.confirm)),E=()=>f(".".concat(h.actions," .").concat(h.deny));const S=()=>f(".".concat(h.loader)),T=()=>f(".".concat(h.actions," .").concat(h.cancel)),L=()=>y(h.actions),O=()=>y(h.footer),j=()=>y(h["timer-progress-bar"]),D=()=>y(h.close),I=()=>{const e=a(v().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')).sort((e,t)=>(e=parseInt(e.getAttribute("tabindex")),(t=parseInt(t.getAttribute("tabindex")))"-1"!==e.getAttribute("tabindex"));return(t=>{const n=[];for(let e=0;eG(e))},M=()=>!H()&&!document.body.classList.contains(h["no-backdrop"]),H=()=>document.body.classList.contains(h["toast-shown"]);const q={previousBodyPadding:null},V=(t,e)=>{if(t.textContent="",e){const n=new DOMParser,o=n.parseFromString(e,"text/html");a(o.querySelector("head").childNodes).forEach(e=>{t.appendChild(e)}),a(o.querySelector("body").childNodes).forEach(e=>{t.appendChild(e)})}},N=(t,e)=>{if(!e)return!1;var n=e.split(/\s+/);for(let e=0;e{var o,i;if(o=e,i=t,a(o.classList).forEach(e=>{Object.values(h).includes(e)||Object.values(g).includes(e)||Object.values(i.showClass).includes(e)||o.classList.remove(e)}),t.customClass&&t.customClass[n]){if("string"!=typeof t.customClass[n]&&!t.customClass[n].forEach)return s("Invalid type of customClass.".concat(n,'! Expected string or iterable object, got "').concat(typeof t.customClass[n],'"'));W(e,t.customClass[n])}},F=(e,t)=>{if(!t)return null;switch(t){case"select":case"textarea":case"file":return K(e,h[t]);case"checkbox":return e.querySelector(".".concat(h.checkbox," input"));case"radio":return e.querySelector(".".concat(h.radio," input:checked"))||e.querySelector(".".concat(h.radio," input:first-child"));case"range":return e.querySelector(".".concat(h.range," input"));default:return K(e,h.input)}},R=e=>{var t;e.focus(),"file"!==e.type&&(t=e.value,e.value="",e.value=t)},z=(e,t,n)=>{e&&t&&(t="string"==typeof t?t.split(/\s+/).filter(Boolean):t).forEach(t=>{e.forEach?e.forEach(e=>{n?e.classList.add(t):e.classList.remove(t)}):n?e.classList.add(t):e.classList.remove(t)})},W=(e,t)=>{z(e,t,!0)},_=(e,t)=>{z(e,t,!1)},K=(t,n)=>{for(let e=0;e{(n=n==="".concat(parseInt(n))?parseInt(n):n)||0===parseInt(n)?e.style[t]="number"==typeof n?"".concat(n,"px"):n:e.style.removeProperty(t)},Z=(e,t="flex")=>{e.style.display=t},J=e=>{e.style.display="none"},X=(e,t,n,o)=>{const i=e.querySelector(t);i&&(i.style[n]=o)},$=(e,t,n)=>{t?Z(e,n):J(e)},G=e=>!(!e||!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)),Q=()=>!G(P())&&!G(E())&&!G(T()),ee=e=>!!(e.scrollHeight>e.clientHeight),te=e=>{const t=window.getComputedStyle(e);var n=parseFloat(t.getPropertyValue("animation-duration")||"0"),e=parseFloat(t.getPropertyValue("transition-duration")||"0");return 0{const n=j();G(n)&&(t&&(n.style.transition="none",n.style.width="100%"),setTimeout(()=>{n.style.transition="width ".concat(e/1e3,"s linear"),n.style.width="0%"},10))},oe=()=>"undefined"==typeof window||"undefined"==typeof document,ie='\n
                                                    \n \n
                                                      \n
                                                      \n \n

                                                      \n
                                                      \n \n \n
                                                      \n \n \n
                                                      \n \n
                                                      \n \n \n
                                                      \n
                                                      \n
                                                      \n \n \n \n
                                                      \n
                                                      \n
                                                      \n
                                                      \n
                                                      \n
                                                      \n').replace(/(^|\n)\s*/g,""),ae=()=>{ln.isVisible()&&ln.resetValidationMessage()},se=e=>{var t=(()=>{const e=b();return!!e&&(e.remove(),_([document.documentElement,document.body],[h["no-backdrop"],h["toast-shown"],h["has-column"]]),!0)})();if(oe())r("SweetAlert2 requires document to initialize");else{const n=document.createElement("div");n.className=h.container,t&&W(n,h["no-transition"]),V(n,ie);const o="string"==typeof(t=e.target)?document.querySelector(t):t;o.appendChild(n),(e=>{const t=v();t.setAttribute("role",e.toast?"alert":"dialog"),t.setAttribute("aria-live",e.toast?"polite":"assertive"),e.toast||t.setAttribute("aria-modal","true")})(e),e=o,"rtl"===window.getComputedStyle(e).direction&&W(b(),h.rtl),(()=>{const e=v(),t=K(e,h.input),n=K(e,h.file),o=e.querySelector(".".concat(h.range," input")),i=e.querySelector(".".concat(h.range," output")),a=K(e,h.select),s=e.querySelector(".".concat(h.checkbox," input")),r=K(e,h.textarea);t.oninput=ae,n.onchange=ae,a.onchange=ae,s.onchange=ae,r.oninput=ae,o.oninput=()=>{ae(),i.value=o.value},o.onchange=()=>{ae(),o.nextSibling.value=o.value}})()}},re=(e,t)=>{e instanceof HTMLElement?t.appendChild(e):"object"==typeof e?ce(e,t):e&&V(t,e)},ce=(e,t)=>{e.jquery?le(t,e):V(t,e.toString())},le=(t,n)=>{if(t.textContent="",0 in n)for(let e=0;e in n;e++)t.appendChild(n[e].cloneNode(!0));else t.appendChild(n.cloneNode(!0))},ue=(()=>{if(oe())return!1;var e=document.createElement("div"),t={WebkitAnimation:"webkitAnimationEnd",OAnimation:"oAnimationEnd oanimationend",animation:"animationend"};for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&void 0!==e.style[n])return t[n];return!1})(),de=(e,t)=>{const n=L();var o=S(),i=P(),a=E(),s=T();(t.showConfirmButton||t.showDenyButton||t.showCancelButton?Z:J)(n),U(n,t,"actions"),pe(i,"confirm",t),pe(a,"deny",t),pe(s,"cancel",t),function(e,t,n,o){if(!o.buttonsStyling)return _([e,t,n],h.styled);W([e,t,n],h.styled),o.confirmButtonColor&&(e.style.backgroundColor=o.confirmButtonColor,W(e,h["default-outline"]));o.denyButtonColor&&(t.style.backgroundColor=o.denyButtonColor,W(t,h["default-outline"]));o.cancelButtonColor&&(n.style.backgroundColor=o.cancelButtonColor,W(n,h["default-outline"]))}(i,a,s,t),t.reverseButtons&&(n.insertBefore(s,o),n.insertBefore(a,o),n.insertBefore(i,o)),V(o,t.loaderHtml),U(o,t,"loader")};function pe(e,t,n){$(e,n["show".concat(o(t),"Button")],"inline-block"),V(e,n["".concat(t,"ButtonText")]),e.setAttribute("aria-label",n["".concat(t,"ButtonAriaLabel")]),e.className=h[t],U(e,n,"".concat(t,"Button")),W(e,n["".concat(t,"ButtonClass")])}const me=(e,t)=>{var n,o,i=b();i&&(o=i,"string"==typeof(n=t.backdrop)?o.style.background=n:n||W([document.documentElement,document.body],h["no-backdrop"]),o=i,(n=t.position)in h?W(o,h[n]):(s('The "position" parameter is not valid, defaulting to "center"'),W(o,h.center)),n=i,!(o=t.grow)||"string"!=typeof o||(o="grow-".concat(o))in h&&W(n,h[o]),U(i,t,"container"))};var he={promise:new WeakMap,innerParams:new WeakMap,domCache:new WeakMap};const ge=["input","file","range","select","radio","checkbox","textarea"],be=e=>{if(!ke[e.input])return r('Unexpected type of input! Expected "text", "email", "password", "number", "tel", "select", "radio", "checkbox", "textarea", "file" or "url", got "'.concat(e.input,'"'));var t=Ce(e.input);const n=ke[e.input](t,e);Z(n),setTimeout(()=>{R(n)})},fe=(e,t)=>{const n=F(v(),e);if(n){(t=>{for(let e=0;e{var t=Ce(e.input);e.customClass&&W(t,e.customClass.input)},ve=(e,t)=>{e.placeholder&&!t.inputPlaceholder||(e.placeholder=t.inputPlaceholder)},we=(e,t,n)=>{if(n.inputLabel){e.id=h.input;const i=document.createElement("label");var o=h["input-label"];i.setAttribute("for",e.id),i.className=o,W(i,n.customClass.inputLabel),i.innerText=n.inputLabel,t.insertAdjacentElement("beforebegin",i)}},Ce=e=>{e=h[e]||h.input;return K(v(),e)},ke={};ke.text=ke.email=ke.password=ke.number=ke.tel=ke.url=(e,t)=>("string"==typeof t.inputValue||"number"==typeof t.inputValue?e.value=t.inputValue:p(t.inputValue)||s('Unexpected type of inputValue! Expected "string", "number" or "Promise", got "'.concat(typeof t.inputValue,'"')),we(e,e,t),ve(e,t),e.type=t.input,e),ke.file=(e,t)=>(we(e,e,t),ve(e,t),e),ke.range=(e,t)=>{const n=e.querySelector("input"),o=e.querySelector("output");return n.value=t.inputValue,n.type=t.input,o.value=t.inputValue,we(n,e,t),e},ke.select=(e,t)=>{if(e.textContent="",t.inputPlaceholder){const n=document.createElement("option");V(n,t.inputPlaceholder),n.value="",n.disabled=!0,n.selected=!0,e.appendChild(n)}return we(e,e,t),e},ke.radio=e=>(e.textContent="",e),ke.checkbox=(e,t)=>{const n=F(v(),"checkbox");n.value=1,n.id=h.checkbox,n.checked=Boolean(t.inputValue);var o=e.querySelector("span");return V(o,t.inputPlaceholder),e},ke.textarea=(n,e)=>{n.value=e.inputValue,ve(n,e),we(n,n,e);return setTimeout(()=>{if("MutationObserver"in window){const t=parseInt(window.getComputedStyle(v()).width);new MutationObserver(()=>{var e,e=n.offsetWidth+(e=n,parseInt(window.getComputedStyle(e).marginLeft)+parseInt(window.getComputedStyle(e).marginRight));e>t?v().style.width="".concat(e,"px"):v().style.width=null}).observe(n,{attributes:!0,attributeFilter:["style"]})}}),n};const Ae=(e,t)=>{const n=k();U(n,t,"htmlContainer"),t.html?(re(t.html,n),Z(n,"block")):t.text?(n.textContent=t.text,Z(n,"block")):J(n),((e,o)=>{const i=v();e=he.innerParams.get(e);const a=!e||o.input!==e.input;ge.forEach(e=>{var t=h[e];const n=K(i,t);fe(e,o.inputAttributes),n.className=t,a&&J(n)}),o.input&&(a&&be(o),ye(o))})(e,t)},Be=(e,t)=>{for(const n in g)t.icon!==n&&_(e,g[n]);W(e,g[t.icon]),Ee(e,t),xe(),U(e,t,"icon")},xe=()=>{const e=v();var t=window.getComputedStyle(e).getPropertyValue("background-color");const n=e.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix");for(let e=0;e{var n;e.textContent="",t.iconHtml?V(e,Se(t.iconHtml)):"success"===t.icon?V(e,'\n
                                                      \n \n
                                                      \n
                                                      \n '):"error"===t.icon?V(e,'\n \n \n \n \n '):(n={question:"?",warning:"!",info:"i"},V(e,Se(n[t.icon])))},Ee=(e,t)=>{if(t.iconColor){e.style.color=t.iconColor,e.style.borderColor=t.iconColor;for(const n of[".swal2-success-line-tip",".swal2-success-line-long",".swal2-x-mark-line-left",".swal2-x-mark-line-right"])X(e,n,"backgroundColor",t.iconColor);X(e,".swal2-success-ring","borderColor",t.iconColor)}},Se=e=>'
                                                      ').concat(e,"
                                                      "),Te=(e,o)=>{const i=B();if(!o.progressSteps||0===o.progressSteps.length)return J(i);Z(i),i.textContent="",o.currentProgressStep>=o.progressSteps.length&&s("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),o.progressSteps.forEach((e,t)=>{var n,e=(n=e,e=document.createElement("li"),W(e,h["progress-step"]),V(e,n),e);i.appendChild(e),t===o.currentProgressStep&&W(e,h["active-progress-step"]),t!==o.progressSteps.length-1&&(t=(e=>{const t=document.createElement("li");return W(t,h["progress-step-line"]),e.progressStepsDistance&&(t.style.width=e.progressStepsDistance),t})(o),i.appendChild(t))})},Le=(e,t)=>{e.className="".concat(h.popup," ").concat(G(e)?t.showClass.popup:""),t.toast?(W([document.documentElement,document.body],h["toast-shown"]),W(e,h.toast)):W(e,h.modal),U(e,t,"popup"),"string"==typeof t.customClass&&W(e,t.customClass),t.icon&&W(e,h["icon-".concat(t.icon)])},Oe=(e,t)=>{var n,o,i;(e=>{var t=b();const n=v();e.toast?(Y(t,"width",e.width),n.style.width="100%",n.insertBefore(S(),w())):Y(n,"width",e.width),Y(n,"padding",e.padding),e.background&&(n.style.background=e.background),J(x()),Le(n,e)})(t),me(0,t),Te(0,t),i=e,n=t,o=he.innerParams.get(i),i=w(),o&&n.icon===o.icon?(Pe(i,n),Be(i,n)):n.icon||n.iconHtml?n.icon&&-1===Object.keys(g).indexOf(n.icon)?(r('Unknown icon! Expected "success", "error", "warning", "info" or "question", got "'.concat(n.icon,'"')),J(i)):(Z(i),Pe(i,n),Be(i,n),W(i,n.showClass.icon)):J(i),(e=>{const t=A();if(!e.imageUrl)return J(t);Z(t,""),t.setAttribute("src",e.imageUrl),t.setAttribute("alt",e.imageAlt),Y(t,"width",e.imageWidth),Y(t,"height",e.imageHeight),t.className=h.image,U(t,e,"image")})(t),(e=>{const t=C();$(t,e.title||e.titleText,"block"),e.title&&re(e.title,t),e.titleText&&(t.innerText=e.titleText),U(t,e,"title")})(t),(e=>{const t=D();V(t,e.closeButtonHtml),U(t,e,"closeButton"),$(t,e.showCloseButton),t.setAttribute("aria-label",e.closeButtonAriaLabel)})(t),Ae(e,t),de(0,t),i=t,e=O(),$(e,i.footer),i.footer&&re(i.footer,e),U(e,i,"footer"),"function"==typeof t.didRender&&t.didRender(v())};const je=()=>P()&&P().click();const De=e=>{let t=v();t||ln.fire(),t=v();var n=S();H()?J(w()):Ie(t,e),Z(n),t.setAttribute("data-loading",!0),t.setAttribute("aria-busy",!0),t.focus()},Ie=(e,t)=>{var n=L();const o=S();!t&&G(P())&&(t=P()),Z(n),t&&(J(t),o.setAttribute("data-button-to-replace",t.className)),o.parentNode.insertBefore(o,t),W([e,n],h.loading)},Me={},He=o=>new Promise(e=>{if(!o)return e();var t=window.scrollX,n=window.scrollY;Me.restoreFocusTimeout=setTimeout(()=>{Me.previousActiveElement&&Me.previousActiveElement.focus?(Me.previousActiveElement.focus(),Me.previousActiveElement=null):document.body&&document.body.focus(),e()},100),window.scrollTo(t,n)});const qe=()=>{if(Me.timeout)return(()=>{const e=j();var t=parseInt(window.getComputedStyle(e).width);e.style.removeProperty("transition"),e.style.width="100%";var n=parseInt(window.getComputedStyle(e).width),n=parseInt(t/n*100);e.style.removeProperty("transition"),e.style.width="".concat(n,"%")})(),Me.timeout.stop()},Ve=()=>{if(Me.timeout){var e=Me.timeout.start();return ne(e),e}};let Ne=!1;const Ue={};const Fe=t=>{for(let e=t.target;e&&e!==document;e=e.parentNode)for(const o in Ue){var n=e.getAttribute(o);if(n)return void Ue[o].fire({template:n})}},Re={title:"",titleText:"",text:"",html:"",footer:"",icon:void 0,iconColor:void 0,iconHtml:void 0,template:void 0,toast:!1,showClass:{popup:"swal2-show",backdrop:"swal2-backdrop-show",icon:"swal2-icon-show"},hideClass:{popup:"swal2-hide",backdrop:"swal2-backdrop-hide",icon:"swal2-icon-hide"},customClass:{},target:"body",backdrop:!0,heightAuto:!0,allowOutsideClick:!0,allowEscapeKey:!0,allowEnterKey:!0,stopKeydownPropagation:!0,keydownListenerCapture:!1,showConfirmButton:!0,showDenyButton:!1,showCancelButton:!1,preConfirm:void 0,preDeny:void 0,confirmButtonText:"OK",confirmButtonAriaLabel:"",confirmButtonColor:void 0,denyButtonText:"No",denyButtonAriaLabel:"",denyButtonColor:void 0,cancelButtonText:"Cancel",cancelButtonAriaLabel:"",cancelButtonColor:void 0,buttonsStyling:!0,reverseButtons:!1,focusConfirm:!0,focusDeny:!1,focusCancel:!1,returnFocus:!0,showCloseButton:!1,closeButtonHtml:"×",closeButtonAriaLabel:"Close this dialog",loaderHtml:"",showLoaderOnConfirm:!1,showLoaderOnDeny:!1,imageUrl:void 0,imageWidth:void 0,imageHeight:void 0,imageAlt:"",timer:void 0,timerProgressBar:!1,width:void 0,padding:void 0,background:void 0,input:void 0,inputPlaceholder:"",inputLabel:"",inputValue:"",inputOptions:{},inputAutoTrim:!0,inputAttributes:{},inputValidator:void 0,returnInputValueOnDeny:!1,validationMessage:void 0,grow:!1,position:"center",progressSteps:[],currentProgressStep:void 0,progressStepsDistance:void 0,willOpen:void 0,didOpen:void 0,didRender:void 0,willClose:void 0,didClose:void 0,didDestroy:void 0,scrollbarPadding:!0},ze=["allowEscapeKey","allowOutsideClick","background","buttonsStyling","cancelButtonAriaLabel","cancelButtonColor","cancelButtonText","closeButtonAriaLabel","closeButtonHtml","confirmButtonAriaLabel","confirmButtonColor","confirmButtonText","currentProgressStep","customClass","denyButtonAriaLabel","denyButtonColor","denyButtonText","didClose","didDestroy","footer","hideClass","html","icon","iconColor","iconHtml","imageAlt","imageHeight","imageUrl","imageWidth","preConfirm","preDeny","progressSteps","returnFocus","reverseButtons","showCancelButton","showCloseButton","showConfirmButton","showDenyButton","text","title","titleText","willClose"],We={},_e=["allowOutsideClick","allowEnterKey","backdrop","focusConfirm","focusDeny","focusCancel","returnFocus","heightAuto","keydownListenerCapture"],Ke=e=>Object.prototype.hasOwnProperty.call(Re,e);const Ye=e=>We[e],Ze=e=>{!e.backdrop&&e.allowOutsideClick&&s('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`');for(const o in e)n=o,Ke(n)||s('Unknown parameter "'.concat(n,'"')),e.toast&&(t=o,_e.includes(t)&&s('The parameter "'.concat(t,'" is incompatible with toasts'))),t=o,Ye(t)&&i(t,Ye(t));var t,n};var Je=Object.freeze({isValidParameter:Ke,isUpdatableParameter:e=>-1!==ze.indexOf(e),isDeprecatedParameter:Ye,argsToParams:n=>{const o={};return"object"!=typeof n[0]||m(n[0])?["title","html","icon"].forEach((e,t)=>{t=n[t];"string"==typeof t||m(t)?o[e]=t:void 0!==t&&r("Unexpected type of ".concat(e,'! Expected "string" or "Element", got ').concat(typeof t))}):Object.assign(o,n[0]),o},isVisible:()=>G(v()),clickConfirm:je,clickDeny:()=>E()&&E().click(),clickCancel:()=>T()&&T().click(),getContainer:b,getPopup:v,getTitle:C,getHtmlContainer:k,getImage:A,getIcon:w,getInputLabel:()=>y(h["input-label"]),getCloseButton:D,getActions:L,getConfirmButton:P,getDenyButton:E,getCancelButton:T,getLoader:S,getFooter:O,getTimerProgressBar:j,getFocusableElements:I,getValidationMessage:x,isLoading:()=>v().hasAttribute("data-loading"),fire:function(...e){return new this(...e)},mixin:function(n){class e extends this{_main(e,t){return super._main(e,Object.assign({},n,t))}}return e},showLoading:De,enableLoading:De,getTimerLeft:()=>Me.timeout&&Me.timeout.getTimerLeft(),stopTimer:qe,resumeTimer:Ve,toggleTimer:()=>{var e=Me.timeout;return e&&(e.running?qe:Ve)()},increaseTimer:e=>{if(Me.timeout){e=Me.timeout.increase(e);return ne(e,!0),e}},isTimerRunning:()=>Me.timeout&&Me.timeout.isRunning(),bindClickHandler:function(e="data-swal-template"){Ue[e]=this,Ne||(document.body.addEventListener("click",Fe),Ne=!0)}});function Xe(){var e=he.innerParams.get(this);if(e){const t=he.domCache.get(this);J(t.loader),H()?e.icon&&Z(w()):(e=>{const t=e.popup.getElementsByClassName(e.loader.getAttribute("data-button-to-replace"));if(t.length)Z(t[0],"inline-block");else if(Q())J(e.actions)})(t),_([t.popup,t.actions],h.loading),t.popup.removeAttribute("aria-busy"),t.popup.removeAttribute("data-loading"),t.confirmButton.disabled=!1,t.denyButton.disabled=!1,t.cancelButton.disabled=!1}}const $e=()=>{null===q.previousBodyPadding&&document.body.scrollHeight>window.innerHeight&&(q.previousBodyPadding=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight="".concat(q.previousBodyPadding+(()=>{const e=document.createElement("div");e.className=h["scrollbar-measure"],document.body.appendChild(e);var t=e.getBoundingClientRect().width-e.clientWidth;return document.body.removeChild(e),t})(),"px"))},Ge=()=>{navigator.userAgent.match(/(CriOS|FxiOS|EdgiOS|YaBrowser|UCBrowser)/i)||v().scrollHeight>window.innerHeight-44&&(b().style.paddingBottom="".concat(44,"px"))},Qe=()=>{const e=b();let t;e.ontouchstart=e=>{t=et(e)},e.ontouchmove=e=>{t&&(e.preventDefault(),e.stopPropagation())}},et=e=>{var t=e.target,n=b();return!tt(e)&&!nt(e)&&(t===n||!(ee(n)||"INPUT"===t.tagName||"TEXTAREA"===t.tagName||ee(k())&&k().contains(t)))},tt=e=>e.touches&&e.touches.length&&"stylus"===e.touches[0].touchType,nt=e=>e.touches&&1{const e=a(document.body.children);e.forEach(e=>{e.hasAttribute("data-previous-aria-hidden")?(e.setAttribute("aria-hidden",e.getAttribute("data-previous-aria-hidden")),e.removeAttribute("data-previous-aria-hidden")):e.removeAttribute("aria-hidden")})};var it={swalPromiseResolve:new WeakMap};function at(e,t,n,o){H()?ct(e,o):(He(n).then(()=>ct(e,o)),Me.keydownTarget.removeEventListener("keydown",Me.keydownHandler,{capture:Me.keydownListenerCapture}),Me.keydownHandlerAdded=!1),/^((?!chrome|android).)*safari/i.test(navigator.userAgent)?(t.setAttribute("style","display:none !important"),t.removeAttribute("class"),t.innerHTML=""):t.remove(),M()&&(null!==q.previousBodyPadding&&(document.body.style.paddingRight="".concat(q.previousBodyPadding,"px"),q.previousBodyPadding=null),N(document.body,h.iosfix)&&(t=parseInt(document.body.style.top,10),_(document.body,h.iosfix),document.body.style.top="",document.body.scrollTop=-1*t),ot()),_([document.documentElement,document.body],[h.shown,h["height-auto"],h["no-backdrop"],h["toast-shown"]])}function st(e){var t=v();if(t){e=void 0!==(o=e)?Object.assign({isConfirmed:!1,isDenied:!1,isDismissed:!1},o):{isConfirmed:!1,isDenied:!1,isDismissed:!0};var n=he.innerParams.get(this);if(n&&!N(t,n.hideClass.popup)){const i=it.swalPromiseResolve.get(this);_(t,n.showClass.popup),W(t,n.hideClass.popup);var o=b();_(o,n.showClass.backdrop),W(o,n.hideClass.backdrop),((e,t,n)=>{const o=b(),i=ue&&te(t);if(typeof n.willClose==="function")n.willClose(t);if(i)rt(e,t,o,n.returnFocus,n.didClose);else at(e,o,n.returnFocus,n.didClose)})(this,t,n),i(e)}}}const rt=(e,t,n,o,i)=>{Me.swalCloseEventFinishedCallback=at.bind(null,e,n,o,i),t.addEventListener(ue,function(e){e.target===t&&(Me.swalCloseEventFinishedCallback(),delete Me.swalCloseEventFinishedCallback)})},ct=(e,t)=>{setTimeout(()=>{"function"==typeof t&&t.bind(e.params)(),e._destroy()})};function lt(e,t,n){const o=he.domCache.get(e);t.forEach(e=>{o[e].disabled=n})}function ut(e,t){if(!e)return!1;if("radio"===e.type){const n=e.parentNode.parentNode,o=n.querySelectorAll("input");for(let e=0;e/^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]{2,24}$/.test(e)?Promise.resolve():Promise.resolve(t||"Invalid email address"),url:(e,t)=>/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(e)?Promise.resolve():Promise.resolve(t||"Invalid URL")};function mt(e){var t,n;(t=e).inputValidator||Object.keys(pt).forEach(e=>{t.input===e&&(t.inputValidator=pt[e])}),e.showLoaderOnConfirm&&!e.preConfirm&&s("showLoaderOnConfirm is set to true, but preConfirm is not defined.\nshowLoaderOnConfirm should be used together with preConfirm, see usage example:\nhttps://sweetalert2.github.io/#ajax-request"),(n=e).target&&("string"!=typeof n.target||document.querySelector(n.target))&&("string"==typeof n.target||n.target.appendChild)||(s('Target parameter is not valid, defaulting to "body"'),n.target="body"),"string"==typeof e.title&&(e.title=e.title.split("\n").join("
                                                      ")),se(e)}const ht=["swal-title","swal-html","swal-footer"],gt=e=>{e="string"==typeof e.template?document.querySelector(e.template):e.template;if(!e)return{};e=e.content;return kt(e),Object.assign(bt(e),ft(e),yt(e),vt(e),wt(e),Ct(e,ht))},bt=e=>{const o={};return a(e.querySelectorAll("swal-param")).forEach(e=>{At(e,["name","value"]);var t=e.getAttribute("name");let n=e.getAttribute("value");"boolean"==typeof Re[t]&&"false"===n&&(n=!1),"object"==typeof Re[t]&&(n=JSON.parse(n)),o[t]=n}),o},ft=e=>{const n={};return a(e.querySelectorAll("swal-button")).forEach(e=>{At(e,["type","color","aria-label"]);var t=e.getAttribute("type");n["".concat(t,"ButtonText")]=e.innerHTML,n["show".concat(o(t),"Button")]=!0,e.hasAttribute("color")&&(n["".concat(t,"ButtonColor")]=e.getAttribute("color")),e.hasAttribute("aria-label")&&(n["".concat(t,"ButtonAriaLabel")]=e.getAttribute("aria-label"))}),n},yt=e=>{const t={},n=e.querySelector("swal-image");return n&&(At(n,["src","width","height","alt"]),n.hasAttribute("src")&&(t.imageUrl=n.getAttribute("src")),n.hasAttribute("width")&&(t.imageWidth=n.getAttribute("width")),n.hasAttribute("height")&&(t.imageHeight=n.getAttribute("height")),n.hasAttribute("alt")&&(t.imageAlt=n.getAttribute("alt"))),t},vt=e=>{const t={},n=e.querySelector("swal-icon");return n&&(At(n,["type","color"]),n.hasAttribute("type")&&(t.icon=n.getAttribute("type")),n.hasAttribute("color")&&(t.iconColor=n.getAttribute("color")),t.iconHtml=n.innerHTML),t},wt=e=>{const n={},t=e.querySelector("swal-input");t&&(At(t,["type","label","placeholder","value"]),n.input=t.getAttribute("type")||"text",t.hasAttribute("label")&&(n.inputLabel=t.getAttribute("label")),t.hasAttribute("placeholder")&&(n.inputPlaceholder=t.getAttribute("placeholder")),t.hasAttribute("value")&&(n.inputValue=t.getAttribute("value")));e=e.querySelectorAll("swal-input-option");return e.length&&(n.inputOptions={},a(e).forEach(e=>{At(e,["value"]);var t=e.getAttribute("value"),e=e.innerHTML;n.inputOptions[t]=e})),n},Ct=(e,t)=>{const n={};for(const o in t){const i=t[o],a=e.querySelector(i);a&&(At(a,[]),n[i.replace(/^swal-/,"")]=a.innerHTML.trim())}return n},kt=e=>{const t=ht.concat(["swal-param","swal-button","swal-image","swal-icon","swal-input","swal-input-option"]);a(e.children).forEach(e=>{e=e.tagName.toLowerCase();-1===t.indexOf(e)&&s("Unrecognized element <".concat(e,">"))})},At=(t,n)=>{a(t.attributes).forEach(e=>{-1===n.indexOf(e.name)&&s(['Unrecognized attribute "'.concat(e.name,'" on <').concat(t.tagName.toLowerCase(),">."),"".concat(n.length?"Allowed attributes are: ".concat(n.join(", ")):"To set the value, use HTML within the element.")])})},Bt=e=>{const t=b(),n=v();"function"==typeof e.willOpen&&e.willOpen(n);var o=window.getComputedStyle(document.body).overflowY;St(t,n,e),setTimeout(()=>{Pt(t,n)},10),M()&&(Et(t,e.scrollbarPadding,o),(()=>{const e=a(document.body.children);e.forEach(e=>{e===b()||e.contains(b())||(e.hasAttribute("aria-hidden")&&e.setAttribute("data-previous-aria-hidden",e.getAttribute("aria-hidden")),e.setAttribute("aria-hidden","true"))})})()),H()||Me.previousActiveElement||(Me.previousActiveElement=document.activeElement),"function"==typeof e.didOpen&&setTimeout(()=>e.didOpen(n)),_(t,h["no-transition"])},xt=e=>{const t=v();if(e.target===t){const n=b();t.removeEventListener(ue,xt),n.style.overflowY="auto"}},Pt=(e,t)=>{ue&&te(t)?(e.style.overflowY="hidden",t.addEventListener(ue,xt)):e.style.overflowY="auto"},Et=(e,t,n)=>{var o;(/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream||"MacIntel"===navigator.platform&&1{e.scrollTop=0})},St=(e,t,n)=>{W(e,n.showClass.backdrop),t.style.setProperty("opacity","0","important"),Z(t,"grid"),setTimeout(()=>{W(t,n.showClass.popup),t.style.removeProperty("opacity")},10),W([document.documentElement,document.body],h.shown),n.heightAuto&&n.backdrop&&!n.toast&&W([document.documentElement,document.body],h["height-auto"])},Tt=e=>e.checked?1:0,Lt=e=>e.checked?e.value:null,Ot=e=>e.files.length?null!==e.getAttribute("multiple")?e.files:e.files[0]:null,jt=(t,n)=>{const o=v(),i=e=>It[n.input](o,Mt(e),n);u(n.inputOptions)||p(n.inputOptions)?(De(P()),d(n.inputOptions).then(e=>{t.hideLoading(),i(e)})):"object"==typeof n.inputOptions?i(n.inputOptions):r("Unexpected type of inputOptions! Expected object, Map or Promise, got ".concat(typeof n.inputOptions))},Dt=(t,n)=>{const o=t.getInput();J(o),d(n.inputValue).then(e=>{o.value="number"===n.input?parseFloat(e)||0:"".concat(e),Z(o),o.focus(),t.hideLoading()}).catch(e=>{r("Error in inputValue promise: ".concat(e)),o.value="",Z(o),o.focus(),t.hideLoading()})},It={select:(e,t,i)=>{const a=K(e,h.select),s=(e,t,n)=>{const o=document.createElement("option");o.value=n,V(o,t),o.selected=Ht(n,i.inputValue),e.appendChild(o)};t.forEach(e=>{var t=e[0];const n=e[1];if(Array.isArray(n)){const o=document.createElement("optgroup");o.label=t,o.disabled=!1,a.appendChild(o),n.forEach(e=>s(o,e[1],e[0]))}else s(a,n,t)}),a.focus()},radio:(e,t,a)=>{const s=K(e,h.radio);t.forEach(e=>{var t=e[0],e=e[1];const n=document.createElement("input"),o=document.createElement("label");n.type="radio",n.name=h.radio,n.value=t,Ht(t,a.inputValue)&&(n.checked=!0);const i=document.createElement("span");V(i,e),i.className=h.label,o.appendChild(n),o.appendChild(i),s.appendChild(o)});const n=s.querySelectorAll("input");n.length&&n[0].focus()}},Mt=n=>{const o=[];return"undefined"!=typeof Map&&n instanceof Map?n.forEach((e,t)=>{let n=e;"object"==typeof n&&(n=Mt(n)),o.push([t,n])}):Object.keys(n).forEach(e=>{let t=n[e];"object"==typeof t&&(t=Mt(t)),o.push([e,t])}),o},Ht=(e,t)=>t&&t.toString()===e.toString(),qt=(e,t)=>{var n=he.innerParams.get(e),o=((e,t)=>{const n=e.getInput();if(!n)return null;switch(t.input){case"checkbox":return Tt(n);case"radio":return Lt(n);case"file":return Ot(n);default:return t.inputAutoTrim?n.value.trim():n.value}})(e,n);n.inputValidator?Vt(e,o,t):e.getInput().checkValidity()?("deny"===t?Nt:Ft)(e,o):(e.enableButtons(),e.showValidationMessage(n.validationMessage))},Vt=(t,n,o)=>{const e=he.innerParams.get(t);t.disableInput();const i=Promise.resolve().then(()=>d(e.inputValidator(n,e.validationMessage)));i.then(e=>{t.enableButtons(),t.enableInput(),e?t.showValidationMessage(e):("deny"===o?Nt:Ft)(t,n)})},Nt=(t,n)=>{const e=he.innerParams.get(t||void 0);if(e.showLoaderOnDeny&&De(E()),e.preDeny){const o=Promise.resolve().then(()=>d(e.preDeny(n,e.validationMessage)));o.then(e=>{!1===e?t.hideLoading():t.closePopup({isDenied:!0,value:void 0===e?n:e})})}else t.closePopup({isDenied:!0,value:n})},Ut=(e,t)=>{e.closePopup({isConfirmed:!0,value:t})},Ft=(t,n)=>{const e=he.innerParams.get(t||void 0);if(e.showLoaderOnConfirm&&De(),e.preConfirm){t.resetValidationMessage();const o=Promise.resolve().then(()=>d(e.preConfirm(n,e.validationMessage)));o.then(e=>{G(x())||!1===e?t.hideLoading():Ut(t,void 0===e?n:e)})}else Ut(t,n)},Rt=(e,t,n)=>{const o=I();if(o.length)return(t+=n)===o.length?t=0:-1===t&&(t=o.length-1),o[t].focus();v().focus()},zt=["ArrowRight","ArrowDown"],Wt=["ArrowLeft","ArrowUp"],_t=(e,t,n)=>{var o=he.innerParams.get(e);o&&(o.stopKeydownPropagation&&t.stopPropagation(),"Enter"===t.key?Kt(e,t,o):"Tab"===t.key?Yt(t,o):[...zt,...Wt].includes(t.key)?Zt(t.key):"Escape"===t.key&&Jt(t,o,n))},Kt=(e,t,n)=>{t.isComposing||t.target&&e.getInput()&&t.target.outerHTML===e.getInput().outerHTML&&(["textarea","file"].includes(n.input)||(je(),t.preventDefault()))},Yt=(e,t)=>{var n=e.target,o=I();let i=-1;for(let e=0;e{const t=P(),n=E(),o=T();if([t,n,o].includes(document.activeElement)){e=zt.includes(e)?"nextElementSibling":"previousElementSibling";const i=document.activeElement[e];i&&i.focus()}},Jt=(e,t,n)=>{c(t.allowEscapeKey)&&(e.preventDefault(),n(l.esc))},Xt=(t,e,n)=>{e.popup.onclick=()=>{var e=he.innerParams.get(t);e.showConfirmButton||e.showDenyButton||e.showCancelButton||e.showCloseButton||e.timer||e.input||n(l.close)}};let $t=!1;const Gt=t=>{t.popup.onmousedown=()=>{t.container.onmouseup=function(e){t.container.onmouseup=void 0,e.target===t.container&&($t=!0)}}},Qt=t=>{t.container.onmousedown=()=>{t.popup.onmouseup=function(e){t.popup.onmouseup=void 0,e.target!==t.popup&&!t.popup.contains(e.target)||($t=!0)}}},en=(n,o,i)=>{o.container.onclick=e=>{var t=he.innerParams.get(n);$t?$t=!1:e.target===o.container&&c(t.allowOutsideClick)&&i(l.backdrop)}};const tn=(e,t,n)=>{var o=j();J(o),t.timer&&(e.timeout=new dt(()=>{n("timer"),delete e.timeout},t.timer),t.timerProgressBar&&(Z(o),setTimeout(()=>{e.timeout&&e.timeout.running&&ne(t.timer)})))},nn=(e,t)=>{if(!t.toast)return c(t.allowEnterKey)?void(on(e,t)||Rt(0,-1,1)):an()},on=(e,t)=>t.focusDeny&&G(e.denyButton)?(e.denyButton.focus(),!0):t.focusCancel&&G(e.cancelButton)?(e.cancelButton.focus(),!0):!(!t.focusConfirm||!G(e.confirmButton))&&(e.confirmButton.focus(),!0),an=()=>{document.activeElement&&"function"==typeof document.activeElement.blur&&document.activeElement.blur()};const sn=e=>{for(const t in e)e[t]=new WeakMap};e=Object.freeze({hideLoading:Xe,disableLoading:Xe,getInput:function(e){var t=he.innerParams.get(e||this);return(e=he.domCache.get(e||this))?F(e.popup,t.input):null},close:st,closePopup:st,closeModal:st,closeToast:st,enableButtons:function(){lt(this,["confirmButton","denyButton","cancelButton"],!1)},disableButtons:function(){lt(this,["confirmButton","denyButton","cancelButton"],!0)},enableInput:function(){return ut(this.getInput(),!1)},disableInput:function(){return ut(this.getInput(),!0)},showValidationMessage:function(e){const t=he.domCache.get(this);var n=he.innerParams.get(this);V(t.validationMessage,e),t.validationMessage.className=h["validation-message"],n.customClass&&n.customClass.validationMessage&&W(t.validationMessage,n.customClass.validationMessage),Z(t.validationMessage);const o=this.getInput();o&&(o.setAttribute("aria-invalid",!0),o.setAttribute("aria-describedby",h["validation-message"]),R(o),W(o,h.inputerror))},resetValidationMessage:function(){var e=he.domCache.get(this);e.validationMessage&&J(e.validationMessage);const t=this.getInput();t&&(t.removeAttribute("aria-invalid"),t.removeAttribute("aria-describedby"),_(t,h.inputerror))},getProgressSteps:function(){return he.domCache.get(this).progressSteps},_main:function(e,t={}){Ze(Object.assign({},t,e)),Me.currentInstance&&(Me.currentInstance._destroy(),M()&&ot()),Me.currentInstance=this,mt(e=((e,t)=>{const n=gt(e),o=Object.assign({},Re,t,n,e);return o.showClass=Object.assign({},Re.showClass,o.showClass),o.hideClass=Object.assign({},Re.hideClass,o.hideClass),o})(e,t)),Object.freeze(e),Me.timeout&&(Me.timeout.stop(),delete Me.timeout),clearTimeout(Me.restoreFocusTimeout);var s,r,c,t=(e=>{const t={popup:v(),container:b(),actions:L(),confirmButton:P(),denyButton:E(),cancelButton:T(),loader:S(),closeButton:D(),validationMessage:x(),progressSteps:B()};return he.domCache.set(e,t),t})(this);return Oe(this,e),he.innerParams.set(this,e),s=this,r=t,c=e,new Promise(e=>{const t=e=>{s.closePopup({isDismissed:!0,dismiss:e})};var n,o,i,a;it.swalPromiseResolve.set(s,e),r.confirmButton.onclick=()=>(e=>{var t=he.innerParams.get(e);e.disableButtons(),t.input?qt(e,"confirm"):Ft(e,!0)})(s),r.denyButton.onclick=()=>(e=>{var t=he.innerParams.get(e);e.disableButtons(),t.returnInputValueOnDeny?qt(e,"deny"):Nt(e,!1)})(s),r.cancelButton.onclick=()=>((e,t)=>{e.disableButtons(),t(l.cancel)})(s,t),r.closeButton.onclick=()=>t(l.close),n=s,a=r,e=t,he.innerParams.get(n).toast?Xt(n,a,e):(Gt(a),Qt(a),en(n,a,e)),o=s,a=Me,e=c,i=t,a.keydownTarget&&a.keydownHandlerAdded&&(a.keydownTarget.removeEventListener("keydown",a.keydownHandler,{capture:a.keydownListenerCapture}),a.keydownHandlerAdded=!1),e.toast||(a.keydownHandler=e=>_t(o,e,i),a.keydownTarget=e.keydownListenerCapture?window:v(),a.keydownListenerCapture=e.keydownListenerCapture,a.keydownTarget.addEventListener("keydown",a.keydownHandler,{capture:a.keydownListenerCapture}),a.keydownHandlerAdded=!0),e=s,"select"===(a=c).input||"radio"===a.input?jt(e,a):["text","email","number","tel","textarea"].includes(a.input)&&(u(a.inputValue)||p(a.inputValue))&&(De(P()),Dt(e,a)),Bt(c),tn(Me,c,t),nn(r,c),setTimeout(()=>{r.container.scrollTop=0})})},update:function(t){var e=v(),n=he.innerParams.get(this);if(!e||N(e,n.hideClass.popup))return s("You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup.");const o={};Object.keys(t).forEach(e=>{ln.isUpdatableParameter(e)?o[e]=t[e]:s('Invalid parameter to update: "'.concat(e,'". Updatable params are listed here: https://github.com/sweetalert2/sweetalert2/blob/master/src/utils/params.js\n\nIf you think this parameter should be updatable, request it here: https://github.com/sweetalert2/sweetalert2/issues/new?template=02_feature_request.md'))}),n=Object.assign({},n,o),Oe(this,n),he.innerParams.set(this,n),Object.defineProperties(this,{params:{value:Object.assign({},this.params,t),writable:!1,enumerable:!0}})},_destroy:function(){var e=he.domCache.get(this);const t=he.innerParams.get(this);t&&(e.popup&&Me.swalCloseEventFinishedCallback&&(Me.swalCloseEventFinishedCallback(),delete Me.swalCloseEventFinishedCallback),Me.deferDisposalTimer&&(clearTimeout(Me.deferDisposalTimer),delete Me.deferDisposalTimer),"function"==typeof t.didDestroy&&t.didDestroy(),delete this.params,delete Me.keydownHandler,delete Me.keydownTarget,sn(he),sn(it),delete Me.currentInstance)}});let rn;class cn{constructor(...e){"undefined"!=typeof window&&(rn=this,e=Object.freeze(this.constructor.argsToParams(e)),Object.defineProperties(this,{params:{value:e,writable:!1,enumerable:!0,configurable:!0}}),e=this._main(this.params),he.promise.set(this,e))}then(e){const t=he.promise.get(this);return t.then(e)}finally(e){const t=he.promise.get(this);return t.finally(e)}}Object.assign(cn.prototype,e),Object.assign(cn,Je),Object.keys(e).forEach(t=>{cn[t]=function(...e){if(rn)return rn[t](...e)}}),cn.DismissReason=l,cn.version="11.1.5";const ln=cn;return ln.default=ln,ln}),void 0!==this&&this.Sweetalert2&&(this.swal=this.sweetAlert=this.Swal=this.SweetAlert=this.Sweetalert2); +"undefined"!=typeof document&&function(e,t){var n=e.createElement("style");if(e.getElementsByTagName("head")[0].appendChild(n),n.styleSheet)n.styleSheet.disabled||(n.styleSheet.cssText=t);else try{n.innerHTML=t}catch(e){n.innerText=t}}(document,".swal2-popup.swal2-toast{box-sizing:border-box;grid-column:1/4!important;grid-row:1/4!important;grid-template-columns:1fr 99fr 1fr;padding:1em;overflow-y:hidden;background:#fff;box-shadow:0 0 .625em #d9d9d9;pointer-events:all}.swal2-popup.swal2-toast>*{grid-column:2}.swal2-popup.swal2-toast .swal2-title{margin:1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-loading{justify-content:center}.swal2-popup.swal2-toast .swal2-input{height:2em;margin:.5em;font-size:1em}.swal2-popup.swal2-toast .swal2-validation-message{font-size:1em}.swal2-popup.swal2-toast .swal2-footer{margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-popup.swal2-toast .swal2-close{grid-column:3/3;grid-row:1/99;align-self:center;width:.8em;height:.8em;margin:0;font-size:2em}.swal2-popup.swal2-toast .swal2-html-container{margin:1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-html-container:empty{padding:0}.swal2-popup.swal2-toast .swal2-loader{grid-column:1;grid-row:1/99;align-self:center;width:2em;height:2em;margin:.25em}.swal2-popup.swal2-toast .swal2-icon{grid-column:1;grid-row:1/99;align-self:center;width:2em;min-width:2em;height:2em;margin:0 .5em 0 0}.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:700}.swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-popup.swal2-toast .swal2-actions{justify-content:flex-start;height:auto;margin:0;margin-top:.3125em;padding:0}.swal2-popup.swal2-toast .swal2-styled{margin:.25em .5em;padding:.4em .6em;font-size:1em}.swal2-popup.swal2-toast .swal2-styled:focus{box-shadow:0 0 0 1px #fff,0 0 0 3px rgba(100,150,200,.5)}.swal2-popup.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;transform:rotate(45deg);border-radius:50%}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.8em;left:-.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.25em;left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-popup.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{-webkit-animation:swal2-toast-animate-success-line-tip .75s;animation:swal2-toast-animate-success-line-tip .75s}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{-webkit-animation:swal2-toast-animate-success-line-long .75s;animation:swal2-toast-animate-success-line-long .75s}.swal2-popup.swal2-toast.swal2-show{-webkit-animation:swal2-toast-show .5s;animation:swal2-toast-show .5s}.swal2-popup.swal2-toast.swal2-hide{-webkit-animation:swal2-toast-hide .1s forwards;animation:swal2-toast-hide .1s forwards}.swal2-container{display:grid;position:fixed;z-index:1060;top:0;right:0;bottom:0;left:0;box-sizing:border-box;grid-template-areas:\"top-start top top-end\" \"center-start center center-end\" \"bottom-start bottom-center bottom-end\";grid-template-rows:minmax(-webkit-min-content,auto) minmax(-webkit-min-content,auto) minmax(-webkit-min-content,auto);grid-template-rows:minmax(min-content,auto) minmax(min-content,auto) minmax(min-content,auto);height:100%;padding:.625em;overflow-x:hidden;transition:background-color .1s;-webkit-overflow-scrolling:touch}.swal2-container.swal2-backdrop-show,.swal2-container.swal2-noanimation{background:rgba(0,0,0,.4)}.swal2-container.swal2-backdrop-hide{background:0 0!important}.swal2-container.swal2-bottom-start,.swal2-container.swal2-center-start,.swal2-container.swal2-top-start{grid-template-columns:minmax(0,1fr) auto auto}.swal2-container.swal2-bottom,.swal2-container.swal2-center,.swal2-container.swal2-top{grid-template-columns:auto minmax(0,1fr) auto}.swal2-container.swal2-bottom-end,.swal2-container.swal2-center-end,.swal2-container.swal2-top-end{grid-template-columns:auto auto minmax(0,1fr)}.swal2-container.swal2-top-start>.swal2-popup{align-self:start}.swal2-container.swal2-top>.swal2-popup{grid-column:2;align-self:start;justify-self:center}.swal2-container.swal2-top-end>.swal2-popup,.swal2-container.swal2-top-right>.swal2-popup{grid-column:3;align-self:start;justify-self:end}.swal2-container.swal2-center-left>.swal2-popup,.swal2-container.swal2-center-start>.swal2-popup{grid-row:2;align-self:center}.swal2-container.swal2-center>.swal2-popup{grid-column:2;grid-row:2;align-self:center;justify-self:center}.swal2-container.swal2-center-end>.swal2-popup,.swal2-container.swal2-center-right>.swal2-popup{grid-column:3;grid-row:2;align-self:center;justify-self:end}.swal2-container.swal2-bottom-left>.swal2-popup,.swal2-container.swal2-bottom-start>.swal2-popup{grid-column:1;grid-row:3;align-self:end}.swal2-container.swal2-bottom>.swal2-popup{grid-column:2;grid-row:3;justify-self:center;align-self:end}.swal2-container.swal2-bottom-end>.swal2-popup,.swal2-container.swal2-bottom-right>.swal2-popup{grid-column:3;grid-row:3;align-self:end;justify-self:end}.swal2-container.swal2-grow-fullscreen>.swal2-popup,.swal2-container.swal2-grow-row>.swal2-popup{grid-column:1/4;width:100%}.swal2-container.swal2-grow-column>.swal2-popup,.swal2-container.swal2-grow-fullscreen>.swal2-popup{grid-row:1/4;align-self:stretch}.swal2-container.swal2-no-transition{transition:none!important}.swal2-popup{display:none;position:relative;box-sizing:border-box;grid-template-columns:minmax(0,100%);width:32em;max-width:100%;padding:0 0 1.25em;border:none;border-radius:5px;background:#fff;color:#545454;font-family:inherit;font-size:1rem}.swal2-popup:focus{outline:0}.swal2-popup.swal2-loading{overflow-y:hidden}.swal2-title{position:relative;max-width:100%;margin:0;padding:.8em 1em 0;color:#595959;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;word-wrap:break-word}.swal2-actions{display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:center;width:auto;margin:1.25em auto 0;padding:0}.swal2-actions:not(.swal2-loading) .swal2-styled[disabled]{opacity:.4}.swal2-actions:not(.swal2-loading) .swal2-styled:hover{background-image:linear-gradient(rgba(0,0,0,.1),rgba(0,0,0,.1))}.swal2-actions:not(.swal2-loading) .swal2-styled:active{background-image:linear-gradient(rgba(0,0,0,.2),rgba(0,0,0,.2))}.swal2-loader{display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;-webkit-animation:swal2-rotate-loading 1.5s linear 0s infinite normal;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 transparent #2778c4 transparent}.swal2-styled{margin:.3125em;padding:.625em 1.1em;transition:box-shadow .1s;box-shadow:0 0 0 3px transparent;font-weight:500}.swal2-styled:not([disabled]){cursor:pointer}.swal2-styled.swal2-confirm{border:0;border-radius:.25em;background:initial;background-color:#7367f0;color:#fff;font-size:1em}.swal2-styled.swal2-confirm:focus{box-shadow:0 0 0 3px rgba(115,103,240,.5)}.swal2-styled.swal2-deny{border:0;border-radius:.25em;background:initial;background-color:#ea5455;color:#fff;font-size:1em}.swal2-styled.swal2-deny:focus{box-shadow:0 0 0 3px rgba(234,84,85,.5)}.swal2-styled.swal2-cancel{border:0;border-radius:.25em;background:initial;background-color:#6e7d88;color:#fff;font-size:1em}.swal2-styled.swal2-cancel:focus{box-shadow:0 0 0 3px rgba(110,125,136,.5)}.swal2-styled.swal2-default-outline:focus{box-shadow:0 0 0 3px rgba(100,150,200,.5)}.swal2-styled:focus{outline:0}.swal2-styled::-moz-focus-inner{border:0}.swal2-footer{justify-content:center;margin:1em 0 0;padding:1em 1em 0;border-top:1px solid #eee;color:#545454;font-size:1em}.swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;grid-column:auto!important;height:.25em;overflow:hidden;border-bottom-right-radius:5px;border-bottom-left-radius:5px}.swal2-timer-progress-bar{width:100%;height:.25em;background:rgba(0,0,0,.2)}.swal2-image{max-width:100%;margin:2em auto 1em}.swal2-close{z-index:2;align-items:center;justify-content:center;width:1.2em;height:1.2em;margin-top:0;margin-right:0;margin-bottom:-1.2em;padding:0;overflow:hidden;transition:color .1s,box-shadow .1s;border:none;border-radius:5px;background:0 0;color:#ccc;font-family:serif;font-family:monospace;font-size:2.5em;cursor:pointer;justify-self:end}.swal2-close:hover{transform:none;background:0 0;color:#f27474}.swal2-close:focus{outline:0;box-shadow:inset 0 0 0 3px rgba(100,150,200,.5)}.swal2-close::-moz-focus-inner{border:0}.swal2-html-container{z-index:1;justify-content:center;margin:1em 1.6em .3em;padding:0;overflow:auto;color:#545454;font-size:1.125em;font-weight:400;line-height:normal;text-align:center;word-wrap:break-word;word-break:break-word}.swal2-checkbox,.swal2-file,.swal2-input,.swal2-radio,.swal2-select,.swal2-textarea{margin:1em 2em 0}.swal2-file,.swal2-input,.swal2-textarea{box-sizing:border-box;width:auto;transition:border-color .1s,box-shadow .1s;border:1px solid #d9d9d9;border-radius:.1875em;background:inherit;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px transparent;color:inherit;font-size:1.125em}.swal2-file.swal2-inputerror,.swal2-input.swal2-inputerror,.swal2-textarea.swal2-inputerror{border-color:#f27474!important;box-shadow:0 0 2px #f27474!important}.swal2-file:focus,.swal2-input:focus,.swal2-textarea:focus{border:1px solid #b4dbed;outline:0;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(100,150,200,.5)}.swal2-file::-moz-placeholder,.swal2-input::-moz-placeholder,.swal2-textarea::-moz-placeholder{color:#ccc}.swal2-file:-ms-input-placeholder,.swal2-input:-ms-input-placeholder,.swal2-textarea:-ms-input-placeholder{color:#ccc}.swal2-file::placeholder,.swal2-input::placeholder,.swal2-textarea::placeholder{color:#ccc}.swal2-range{margin:1em 2em 0;background:#fff}.swal2-range input{width:80%}.swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}.swal2-range input,.swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}.swal2-input{height:2.625em;padding:0 .75em}.swal2-file{width:75%;margin-right:auto;margin-left:auto;background:inherit;font-size:1.125em}.swal2-textarea{height:6.75em;padding:.75em}.swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:inherit;color:inherit;font-size:1.125em}.swal2-checkbox,.swal2-radio{align-items:center;justify-content:center;background:#fff;color:inherit}.swal2-checkbox label,.swal2-radio label{margin:0 .6em;font-size:1.125em}.swal2-checkbox input,.swal2-radio input{flex-shrink:0;margin:0 .4em}.swal2-input-label{display:flex;justify-content:center;margin:1em auto 0}.swal2-validation-message{align-items:center;justify-content:center;margin:1em 0 0;padding:.625em;overflow:hidden;background:#f0f0f0;color:#666;font-size:1em;font-weight:300}.swal2-validation-message::before{content:\"!\";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}.swal2-icon{position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:2.5em auto .6em;border:.25em solid transparent;border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}.swal2-icon.swal2-error{border-color:#f27474;color:#f27474}.swal2-icon.swal2-error .swal2-x-mark{position:relative;flex-grow:1}.swal2-icon.swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}.swal2-icon.swal2-error.swal2-icon-show{-webkit-animation:swal2-animate-error-icon .5s;animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-error.swal2-icon-show .swal2-x-mark{-webkit-animation:swal2-animate-error-x-mark .5s;animation:swal2-animate-error-x-mark .5s}.swal2-icon.swal2-warning{border-color:#facea8;color:#f8bb86}.swal2-icon.swal2-info{border-color:#9de0f6;color:#3fc3ee}.swal2-icon.swal2-question{border-color:#c9dae1;color:#87adbd}.swal2-icon.swal2-success{border-color:#a5dc86;color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;transform:rotate(45deg);border-radius:50%}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}.swal2-icon.swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-.25em;left:-.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}.swal2-icon.swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}.swal2-icon.swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}.swal2-icon.swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-tip{-webkit-animation:swal2-animate-success-line-tip .75s;animation:swal2-animate-success-line-tip .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-long{-webkit-animation:swal2-animate-success-line-long .75s;animation:swal2-animate-success-line-long .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-circular-line-right{-webkit-animation:swal2-rotate-success-circular-line 4.25s ease-in;animation:swal2-rotate-success-circular-line 4.25s ease-in}.swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:1.25em auto;padding:0;background:inherit;font-weight:600}.swal2-progress-steps li{display:inline-block;position:relative}.swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:#add8e6;color:#fff}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:#add8e6}.swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}[class^=swal2]{-webkit-tap-highlight-color:transparent}.swal2-show{-webkit-animation:swal2-show .3s;animation:swal2-show .3s}.swal2-hide{-webkit-animation:swal2-hide .15s forwards;animation:swal2-hide .15s forwards}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{margin-right:initial;margin-left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}@-webkit-keyframes swal2-toast-show{0%{transform:translateY(-.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0)}}@keyframes swal2-toast-show{0%{transform:translateY(-.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0)}}@-webkit-keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@-webkit-keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@-webkit-keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@-webkit-keyframes swal2-show{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}100%{transform:scale(1)}}@keyframes swal2-show{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}100%{transform:scale(1)}}@-webkit-keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(.5);opacity:0}}@keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(.5);opacity:0}}@-webkit-keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@-webkit-keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@-webkit-keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@-webkit-keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@-webkit-keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0);opacity:1}}@-webkit-keyframes swal2-rotate-loading{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes swal2-rotate-loading{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto!important}body.swal2-no-backdrop .swal2-container{background-color:transparent!important;pointer-events:none}body.swal2-no-backdrop .swal2-container .swal2-popup{pointer-events:all}body.swal2-no-backdrop .swal2-container .swal2-modal{box-shadow:0 0 10px rgba(0,0,0,.4)}@media print{body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow-y:scroll!important}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .swal2-container{position:static!important}}body.swal2-toast-shown .swal2-container{box-sizing:border-box;width:360px;max-width:100%;background-color:transparent;pointer-events:none}body.swal2-toast-shown .swal2-container.swal2-top{top:0;right:auto;bottom:auto;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{top:0;right:0;bottom:auto;left:auto}body.swal2-toast-shown .swal2-container.swal2-top-left,body.swal2-toast-shown .swal2-container.swal2-top-start{top:0;right:auto;bottom:auto;left:0}body.swal2-toast-shown .swal2-container.swal2-center-left,body.swal2-toast-shown .swal2-container.swal2-center-start{top:50%;right:auto;bottom:auto;left:0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{top:50%;right:auto;bottom:auto;left:50%;transform:translate(-50%,-50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{top:50%;right:0;bottom:auto;left:auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-left,body.swal2-toast-shown .swal2-container.swal2-bottom-start{top:auto;right:auto;bottom:0;left:0}body.swal2-toast-shown .swal2-container.swal2-bottom{top:auto;right:auto;bottom:0;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{top:auto;right:0;bottom:0;left:auto}"); \ No newline at end of file diff --git a/modules/virtual-file-explorer/app/Volo.Abp.VirtualFileExplorer.DemoApp/wwwroot/libs/sweetalert2/sweetalert2.css b/modules/virtual-file-explorer/app/Volo.Abp.VirtualFileExplorer.DemoApp/wwwroot/libs/sweetalert2/sweetalert2.css new file mode 100644 index 0000000000..1feb7a5581 --- /dev/null +++ b/modules/virtual-file-explorer/app/Volo.Abp.VirtualFileExplorer.DemoApp/wwwroot/libs/sweetalert2/sweetalert2.css @@ -0,0 +1,1319 @@ +.swal2-popup.swal2-toast { + box-sizing: border-box; + grid-column: 1/4 !important; + grid-row: 1/4 !important; + grid-template-columns: 1fr 99fr 1fr; + padding: 1em; + overflow-y: hidden; + background: #fff; + box-shadow: 0 0 0.625em #d9d9d9; + pointer-events: all; +} +.swal2-popup.swal2-toast > * { + grid-column: 2; +} +.swal2-popup.swal2-toast .swal2-title { + margin: 1em; + padding: 0; + font-size: 1em; + text-align: initial; +} +.swal2-popup.swal2-toast .swal2-loading { + justify-content: center; +} +.swal2-popup.swal2-toast .swal2-input { + height: 2em; + margin: 0.5em; + font-size: 1em; +} +.swal2-popup.swal2-toast .swal2-validation-message { + font-size: 1em; +} +.swal2-popup.swal2-toast .swal2-footer { + margin: 0.5em 0 0; + padding: 0.5em 0 0; + font-size: 0.8em; +} +.swal2-popup.swal2-toast .swal2-close { + grid-column: 3/3; + grid-row: 1/99; + align-self: center; + width: 0.8em; + height: 0.8em; + margin: 0; + font-size: 2em; +} +.swal2-popup.swal2-toast .swal2-html-container { + margin: 1em; + padding: 0; + font-size: 1em; + text-align: initial; +} +.swal2-popup.swal2-toast .swal2-html-container:empty { + padding: 0; +} +.swal2-popup.swal2-toast .swal2-loader { + grid-column: 1; + grid-row: 1/99; + align-self: center; + width: 2em; + height: 2em; + margin: 0.25em; +} +.swal2-popup.swal2-toast .swal2-icon { + grid-column: 1; + grid-row: 1/99; + align-self: center; + width: 2em; + min-width: 2em; + height: 2em; + margin: 0 0.5em 0 0; +} +.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content { + display: flex; + align-items: center; + font-size: 1.8em; + font-weight: bold; +} +.swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring { + width: 2em; + height: 2em; +} +.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line] { + top: 0.875em; + width: 1.375em; +} +.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left] { + left: 0.3125em; +} +.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right] { + right: 0.3125em; +} +.swal2-popup.swal2-toast .swal2-actions { + justify-content: flex-start; + height: auto; + margin: 0; + margin-top: 0.3125em; + padding: 0; +} +.swal2-popup.swal2-toast .swal2-styled { + margin: 0.25em 0.5em; + padding: 0.4em 0.6em; + font-size: 1em; +} +.swal2-popup.swal2-toast .swal2-styled:focus { + box-shadow: 0 0 0 1px #fff, 0 0 0 3px rgba(100, 150, 200, 0.5); +} +.swal2-popup.swal2-toast .swal2-success { + border-color: #a5dc86; +} +.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line] { + position: absolute; + width: 1.6em; + height: 3em; + transform: rotate(45deg); + border-radius: 50%; +} +.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left] { + top: -0.8em; + left: -0.5em; + transform: rotate(-45deg); + transform-origin: 2em 2em; + border-radius: 4em 0 0 4em; +} +.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right] { + top: -0.25em; + left: 0.9375em; + transform-origin: 0 1.5em; + border-radius: 0 4em 4em 0; +} +.swal2-popup.swal2-toast .swal2-success .swal2-success-ring { + width: 2em; + height: 2em; +} +.swal2-popup.swal2-toast .swal2-success .swal2-success-fix { + top: 0; + left: 0.4375em; + width: 0.4375em; + height: 2.6875em; +} +.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line] { + height: 0.3125em; +} +.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip] { + top: 1.125em; + left: 0.1875em; + width: 0.75em; +} +.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=long] { + top: 0.9375em; + right: 0.1875em; + width: 1.375em; +} +.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip { + -webkit-animation: swal2-toast-animate-success-line-tip 0.75s; + animation: swal2-toast-animate-success-line-tip 0.75s; +} +.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long { + -webkit-animation: swal2-toast-animate-success-line-long 0.75s; + animation: swal2-toast-animate-success-line-long 0.75s; +} +.swal2-popup.swal2-toast.swal2-show { + -webkit-animation: swal2-toast-show 0.5s; + animation: swal2-toast-show 0.5s; +} +.swal2-popup.swal2-toast.swal2-hide { + -webkit-animation: swal2-toast-hide 0.1s forwards; + animation: swal2-toast-hide 0.1s forwards; +} + +.swal2-container { + display: grid; + position: fixed; + z-index: 1060; + top: 0; + right: 0; + bottom: 0; + left: 0; + box-sizing: border-box; + grid-template-areas: "top-start top top-end" "center-start center center-end" "bottom-start bottom-center bottom-end"; + grid-template-rows: minmax(-webkit-min-content, auto) minmax(-webkit-min-content, auto) minmax(-webkit-min-content, auto); + grid-template-rows: minmax(min-content, auto) minmax(min-content, auto) minmax(min-content, auto); + height: 100%; + padding: 0.625em; + overflow-x: hidden; + transition: background-color 0.1s; + -webkit-overflow-scrolling: touch; +} +.swal2-container.swal2-backdrop-show, .swal2-container.swal2-noanimation { + background: rgba(0, 0, 0, 0.4); +} +.swal2-container.swal2-backdrop-hide { + background: transparent !important; +} +.swal2-container.swal2-top-start, .swal2-container.swal2-center-start, .swal2-container.swal2-bottom-start { + grid-template-columns: minmax(0, 1fr) auto auto; +} +.swal2-container.swal2-top, .swal2-container.swal2-center, .swal2-container.swal2-bottom { + grid-template-columns: auto minmax(0, 1fr) auto; +} +.swal2-container.swal2-top-end, .swal2-container.swal2-center-end, .swal2-container.swal2-bottom-end { + grid-template-columns: auto auto minmax(0, 1fr); +} +.swal2-container.swal2-top-start > .swal2-popup { + align-self: start; +} +.swal2-container.swal2-top > .swal2-popup { + grid-column: 2; + align-self: start; + justify-self: center; +} +.swal2-container.swal2-top-end > .swal2-popup, .swal2-container.swal2-top-right > .swal2-popup { + grid-column: 3; + align-self: start; + justify-self: end; +} +.swal2-container.swal2-center-start > .swal2-popup, .swal2-container.swal2-center-left > .swal2-popup { + grid-row: 2; + align-self: center; +} +.swal2-container.swal2-center > .swal2-popup { + grid-column: 2; + grid-row: 2; + align-self: center; + justify-self: center; +} +.swal2-container.swal2-center-end > .swal2-popup, .swal2-container.swal2-center-right > .swal2-popup { + grid-column: 3; + grid-row: 2; + align-self: center; + justify-self: end; +} +.swal2-container.swal2-bottom-start > .swal2-popup, .swal2-container.swal2-bottom-left > .swal2-popup { + grid-column: 1; + grid-row: 3; + align-self: end; +} +.swal2-container.swal2-bottom > .swal2-popup { + grid-column: 2; + grid-row: 3; + justify-self: center; + align-self: end; +} +.swal2-container.swal2-bottom-end > .swal2-popup, .swal2-container.swal2-bottom-right > .swal2-popup { + grid-column: 3; + grid-row: 3; + align-self: end; + justify-self: end; +} +.swal2-container.swal2-grow-row > .swal2-popup, .swal2-container.swal2-grow-fullscreen > .swal2-popup { + grid-column: 1/4; + width: 100%; +} +.swal2-container.swal2-grow-column > .swal2-popup, .swal2-container.swal2-grow-fullscreen > .swal2-popup { + grid-row: 1/4; + align-self: stretch; +} +.swal2-container.swal2-no-transition { + transition: none !important; +} + +.swal2-popup { + display: none; + position: relative; + box-sizing: border-box; + grid-template-columns: minmax(0, 100%); + width: 32em; + max-width: 100%; + padding: 0 0 1.25em; + border: none; + border-radius: 5px; + background: #fff; + color: #545454; + font-family: inherit; + font-size: 1rem; +} +.swal2-popup:focus { + outline: none; +} +.swal2-popup.swal2-loading { + overflow-y: hidden; +} + +.swal2-title { + position: relative; + max-width: 100%; + margin: 0; + padding: 0.8em 1em 0; + color: #595959; + font-size: 1.875em; + font-weight: 600; + text-align: center; + text-transform: none; + word-wrap: break-word; +} + +.swal2-actions { + display: flex; + z-index: 1; + box-sizing: border-box; + flex-wrap: wrap; + align-items: center; + justify-content: center; + width: auto; + margin: 1.25em auto 0; + padding: 0; +} +.swal2-actions:not(.swal2-loading) .swal2-styled[disabled] { + opacity: 0.4; +} +.swal2-actions:not(.swal2-loading) .swal2-styled:hover { + background-image: linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1)); +} +.swal2-actions:not(.swal2-loading) .swal2-styled:active { + background-image: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)); +} + +.swal2-loader { + display: none; + align-items: center; + justify-content: center; + width: 2.2em; + height: 2.2em; + margin: 0 1.875em; + -webkit-animation: swal2-rotate-loading 1.5s linear 0s infinite normal; + animation: swal2-rotate-loading 1.5s linear 0s infinite normal; + border-width: 0.25em; + border-style: solid; + border-radius: 100%; + border-color: #2778c4 transparent #2778c4 transparent; +} + +.swal2-styled { + margin: 0.3125em; + padding: 0.625em 1.1em; + transition: box-shadow 0.1s; + box-shadow: 0 0 0 3px transparent; + font-weight: 500; +} +.swal2-styled:not([disabled]) { + cursor: pointer; +} +.swal2-styled.swal2-confirm { + border: 0; + border-radius: 0.25em; + background: initial; + background-color: #7367f0; + color: #fff; + font-size: 1em; +} +.swal2-styled.swal2-confirm:focus { + box-shadow: 0 0 0 3px rgba(115, 103, 240, 0.5); +} +.swal2-styled.swal2-deny { + border: 0; + border-radius: 0.25em; + background: initial; + background-color: #ea5455; + color: #fff; + font-size: 1em; +} +.swal2-styled.swal2-deny:focus { + box-shadow: 0 0 0 3px rgba(234, 84, 85, 0.5); +} +.swal2-styled.swal2-cancel { + border: 0; + border-radius: 0.25em; + background: initial; + background-color: #6e7d88; + color: #fff; + font-size: 1em; +} +.swal2-styled.swal2-cancel:focus { + box-shadow: 0 0 0 3px rgba(110, 125, 136, 0.5); +} +.swal2-styled.swal2-default-outline:focus { + box-shadow: 0 0 0 3px rgba(100, 150, 200, 0.5); +} +.swal2-styled:focus { + outline: none; +} +.swal2-styled::-moz-focus-inner { + border: 0; +} + +.swal2-footer { + justify-content: center; + margin: 1em 0 0; + padding: 1em 1em 0; + border-top: 1px solid #eee; + color: #545454; + font-size: 1em; +} + +.swal2-timer-progress-bar-container { + position: absolute; + right: 0; + bottom: 0; + left: 0; + grid-column: auto !important; + height: 0.25em; + overflow: hidden; + border-bottom-right-radius: 5px; + border-bottom-left-radius: 5px; +} + +.swal2-timer-progress-bar { + width: 100%; + height: 0.25em; + background: rgba(0, 0, 0, 0.2); +} + +.swal2-image { + max-width: 100%; + margin: 2em auto 1em; +} + +.swal2-close { + z-index: 2; + align-items: center; + justify-content: center; + width: 1.2em; + height: 1.2em; + margin-top: 0; + margin-right: 0; + margin-bottom: -1.2em; + padding: 0; + overflow: hidden; + transition: color 0.1s, box-shadow 0.1s; + border: none; + border-radius: 5px; + background: transparent; + color: #ccc; + font-family: serif; + font-family: monospace; + font-size: 2.5em; + cursor: pointer; + justify-self: end; +} +.swal2-close:hover { + transform: none; + background: transparent; + color: #f27474; +} +.swal2-close:focus { + outline: none; + box-shadow: inset 0 0 0 3px rgba(100, 150, 200, 0.5); +} +.swal2-close::-moz-focus-inner { + border: 0; +} + +.swal2-html-container { + z-index: 1; + justify-content: center; + margin: 1em 1.6em 0.3em; + padding: 0; + overflow: auto; + color: #545454; + font-size: 1.125em; + font-weight: normal; + line-height: normal; + text-align: center; + word-wrap: break-word; + word-break: break-word; +} + +.swal2-input, +.swal2-file, +.swal2-textarea, +.swal2-select, +.swal2-radio, +.swal2-checkbox { + margin: 1em 2em 0; +} + +.swal2-input, +.swal2-file, +.swal2-textarea { + box-sizing: border-box; + width: auto; + transition: border-color 0.1s, box-shadow 0.1s; + border: 1px solid #d9d9d9; + border-radius: 0.1875em; + background: inherit; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06), 0 0 0 3px transparent; + color: inherit; + font-size: 1.125em; +} +.swal2-input.swal2-inputerror, +.swal2-file.swal2-inputerror, +.swal2-textarea.swal2-inputerror { + border-color: #f27474 !important; + box-shadow: 0 0 2px #f27474 !important; +} +.swal2-input:focus, +.swal2-file:focus, +.swal2-textarea:focus { + border: 1px solid #b4dbed; + outline: none; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06), 0 0 0 3px rgba(100, 150, 200, 0.5); +} +.swal2-input::-moz-placeholder, .swal2-file::-moz-placeholder, .swal2-textarea::-moz-placeholder { + color: #ccc; +} +.swal2-input:-ms-input-placeholder, .swal2-file:-ms-input-placeholder, .swal2-textarea:-ms-input-placeholder { + color: #ccc; +} +.swal2-input::placeholder, +.swal2-file::placeholder, +.swal2-textarea::placeholder { + color: #ccc; +} + +.swal2-range { + margin: 1em 2em 0; + background: #fff; +} +.swal2-range input { + width: 80%; +} +.swal2-range output { + width: 20%; + color: inherit; + font-weight: 600; + text-align: center; +} +.swal2-range input, +.swal2-range output { + height: 2.625em; + padding: 0; + font-size: 1.125em; + line-height: 2.625em; +} + +.swal2-input { + height: 2.625em; + padding: 0 0.75em; +} + +.swal2-file { + width: 75%; + margin-right: auto; + margin-left: auto; + background: inherit; + font-size: 1.125em; +} + +.swal2-textarea { + height: 6.75em; + padding: 0.75em; +} + +.swal2-select { + min-width: 50%; + max-width: 100%; + padding: 0.375em 0.625em; + background: inherit; + color: inherit; + font-size: 1.125em; +} + +.swal2-radio, +.swal2-checkbox { + align-items: center; + justify-content: center; + background: #fff; + color: inherit; +} +.swal2-radio label, +.swal2-checkbox label { + margin: 0 0.6em; + font-size: 1.125em; +} +.swal2-radio input, +.swal2-checkbox input { + flex-shrink: 0; + margin: 0 0.4em; +} + +.swal2-input-label { + display: flex; + justify-content: center; + margin: 1em auto 0; +} + +.swal2-validation-message { + align-items: center; + justify-content: center; + margin: 1em 0 0; + padding: 0.625em; + overflow: hidden; + background: #f0f0f0; + color: #666666; + font-size: 1em; + font-weight: 300; +} +.swal2-validation-message::before { + content: "!"; + display: inline-block; + width: 1.5em; + min-width: 1.5em; + height: 1.5em; + margin: 0 0.625em; + border-radius: 50%; + background-color: #f27474; + color: #fff; + font-weight: 600; + line-height: 1.5em; + text-align: center; +} + +.swal2-icon { + position: relative; + box-sizing: content-box; + justify-content: center; + width: 5em; + height: 5em; + margin: 2.5em auto 0.6em; + border: 0.25em solid transparent; + border-radius: 50%; + border-color: #000; + font-family: inherit; + line-height: 5em; + cursor: default; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} +.swal2-icon .swal2-icon-content { + display: flex; + align-items: center; + font-size: 3.75em; +} +.swal2-icon.swal2-error { + border-color: #f27474; + color: #f27474; +} +.swal2-icon.swal2-error .swal2-x-mark { + position: relative; + flex-grow: 1; +} +.swal2-icon.swal2-error [class^=swal2-x-mark-line] { + display: block; + position: absolute; + top: 2.3125em; + width: 2.9375em; + height: 0.3125em; + border-radius: 0.125em; + background-color: #f27474; +} +.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left] { + left: 1.0625em; + transform: rotate(45deg); +} +.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right] { + right: 1em; + transform: rotate(-45deg); +} +.swal2-icon.swal2-error.swal2-icon-show { + -webkit-animation: swal2-animate-error-icon 0.5s; + animation: swal2-animate-error-icon 0.5s; +} +.swal2-icon.swal2-error.swal2-icon-show .swal2-x-mark { + -webkit-animation: swal2-animate-error-x-mark 0.5s; + animation: swal2-animate-error-x-mark 0.5s; +} +.swal2-icon.swal2-warning { + border-color: #facea8; + color: #f8bb86; +} +.swal2-icon.swal2-info { + border-color: #9de0f6; + color: #3fc3ee; +} +.swal2-icon.swal2-question { + border-color: #c9dae1; + color: #87adbd; +} +.swal2-icon.swal2-success { + border-color: #a5dc86; + color: #a5dc86; +} +.swal2-icon.swal2-success [class^=swal2-success-circular-line] { + position: absolute; + width: 3.75em; + height: 7.5em; + transform: rotate(45deg); + border-radius: 50%; +} +.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=left] { + top: -0.4375em; + left: -2.0635em; + transform: rotate(-45deg); + transform-origin: 3.75em 3.75em; + border-radius: 7.5em 0 0 7.5em; +} +.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=right] { + top: -0.6875em; + left: 1.875em; + transform: rotate(-45deg); + transform-origin: 0 3.75em; + border-radius: 0 7.5em 7.5em 0; +} +.swal2-icon.swal2-success .swal2-success-ring { + position: absolute; + z-index: 2; + top: -0.25em; + left: -0.25em; + box-sizing: content-box; + width: 100%; + height: 100%; + border: 0.25em solid rgba(165, 220, 134, 0.3); + border-radius: 50%; +} +.swal2-icon.swal2-success .swal2-success-fix { + position: absolute; + z-index: 1; + top: 0.5em; + left: 1.625em; + width: 0.4375em; + height: 5.625em; + transform: rotate(-45deg); +} +.swal2-icon.swal2-success [class^=swal2-success-line] { + display: block; + position: absolute; + z-index: 2; + height: 0.3125em; + border-radius: 0.125em; + background-color: #a5dc86; +} +.swal2-icon.swal2-success [class^=swal2-success-line][class$=tip] { + top: 2.875em; + left: 0.8125em; + width: 1.5625em; + transform: rotate(45deg); +} +.swal2-icon.swal2-success [class^=swal2-success-line][class$=long] { + top: 2.375em; + right: 0.5em; + width: 2.9375em; + transform: rotate(-45deg); +} +.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-tip { + -webkit-animation: swal2-animate-success-line-tip 0.75s; + animation: swal2-animate-success-line-tip 0.75s; +} +.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-long { + -webkit-animation: swal2-animate-success-line-long 0.75s; + animation: swal2-animate-success-line-long 0.75s; +} +.swal2-icon.swal2-success.swal2-icon-show .swal2-success-circular-line-right { + -webkit-animation: swal2-rotate-success-circular-line 4.25s ease-in; + animation: swal2-rotate-success-circular-line 4.25s ease-in; +} + +.swal2-progress-steps { + flex-wrap: wrap; + align-items: center; + max-width: 100%; + margin: 1.25em auto; + padding: 0; + background: inherit; + font-weight: 600; +} +.swal2-progress-steps li { + display: inline-block; + position: relative; +} +.swal2-progress-steps .swal2-progress-step { + z-index: 20; + flex-shrink: 0; + width: 2em; + height: 2em; + border-radius: 2em; + background: #2778c4; + color: #fff; + line-height: 2em; + text-align: center; +} +.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step { + background: #2778c4; +} +.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step ~ .swal2-progress-step { + background: #add8e6; + color: #fff; +} +.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step ~ .swal2-progress-step-line { + background: #add8e6; +} +.swal2-progress-steps .swal2-progress-step-line { + z-index: 10; + flex-shrink: 0; + width: 2.5em; + height: 0.4em; + margin: 0 -1px; + background: #2778c4; +} + +[class^=swal2] { + -webkit-tap-highlight-color: transparent; +} + +.swal2-show { + -webkit-animation: swal2-show 0.3s; + animation: swal2-show 0.3s; +} + +.swal2-hide { + -webkit-animation: swal2-hide 0.15s forwards; + animation: swal2-hide 0.15s forwards; +} + +.swal2-noanimation { + transition: none; +} + +.swal2-scrollbar-measure { + position: absolute; + top: -9999px; + width: 50px; + height: 50px; + overflow: scroll; +} + +.swal2-rtl .swal2-close { + margin-right: initial; + margin-left: 0; +} +.swal2-rtl .swal2-timer-progress-bar { + right: 0; + left: auto; +} + +@-webkit-keyframes swal2-toast-show { + 0% { + transform: translateY(-0.625em) rotateZ(2deg); + } + 33% { + transform: translateY(0) rotateZ(-2deg); + } + 66% { + transform: translateY(0.3125em) rotateZ(2deg); + } + 100% { + transform: translateY(0) rotateZ(0deg); + } +} + +@keyframes swal2-toast-show { + 0% { + transform: translateY(-0.625em) rotateZ(2deg); + } + 33% { + transform: translateY(0) rotateZ(-2deg); + } + 66% { + transform: translateY(0.3125em) rotateZ(2deg); + } + 100% { + transform: translateY(0) rotateZ(0deg); + } +} +@-webkit-keyframes swal2-toast-hide { + 100% { + transform: rotateZ(1deg); + opacity: 0; + } +} +@keyframes swal2-toast-hide { + 100% { + transform: rotateZ(1deg); + opacity: 0; + } +} +@-webkit-keyframes swal2-toast-animate-success-line-tip { + 0% { + top: 0.5625em; + left: 0.0625em; + width: 0; + } + 54% { + top: 0.125em; + left: 0.125em; + width: 0; + } + 70% { + top: 0.625em; + left: -0.25em; + width: 1.625em; + } + 84% { + top: 1.0625em; + left: 0.75em; + width: 0.5em; + } + 100% { + top: 1.125em; + left: 0.1875em; + width: 0.75em; + } +} +@keyframes swal2-toast-animate-success-line-tip { + 0% { + top: 0.5625em; + left: 0.0625em; + width: 0; + } + 54% { + top: 0.125em; + left: 0.125em; + width: 0; + } + 70% { + top: 0.625em; + left: -0.25em; + width: 1.625em; + } + 84% { + top: 1.0625em; + left: 0.75em; + width: 0.5em; + } + 100% { + top: 1.125em; + left: 0.1875em; + width: 0.75em; + } +} +@-webkit-keyframes swal2-toast-animate-success-line-long { + 0% { + top: 1.625em; + right: 1.375em; + width: 0; + } + 65% { + top: 1.25em; + right: 0.9375em; + width: 0; + } + 84% { + top: 0.9375em; + right: 0; + width: 1.125em; + } + 100% { + top: 0.9375em; + right: 0.1875em; + width: 1.375em; + } +} +@keyframes swal2-toast-animate-success-line-long { + 0% { + top: 1.625em; + right: 1.375em; + width: 0; + } + 65% { + top: 1.25em; + right: 0.9375em; + width: 0; + } + 84% { + top: 0.9375em; + right: 0; + width: 1.125em; + } + 100% { + top: 0.9375em; + right: 0.1875em; + width: 1.375em; + } +} +@-webkit-keyframes swal2-show { + 0% { + transform: scale(0.7); + } + 45% { + transform: scale(1.05); + } + 80% { + transform: scale(0.95); + } + 100% { + transform: scale(1); + } +} +@keyframes swal2-show { + 0% { + transform: scale(0.7); + } + 45% { + transform: scale(1.05); + } + 80% { + transform: scale(0.95); + } + 100% { + transform: scale(1); + } +} +@-webkit-keyframes swal2-hide { + 0% { + transform: scale(1); + opacity: 1; + } + 100% { + transform: scale(0.5); + opacity: 0; + } +} +@keyframes swal2-hide { + 0% { + transform: scale(1); + opacity: 1; + } + 100% { + transform: scale(0.5); + opacity: 0; + } +} +@-webkit-keyframes swal2-animate-success-line-tip { + 0% { + top: 1.1875em; + left: 0.0625em; + width: 0; + } + 54% { + top: 1.0625em; + left: 0.125em; + width: 0; + } + 70% { + top: 2.1875em; + left: -0.375em; + width: 3.125em; + } + 84% { + top: 3em; + left: 1.3125em; + width: 1.0625em; + } + 100% { + top: 2.8125em; + left: 0.8125em; + width: 1.5625em; + } +} +@keyframes swal2-animate-success-line-tip { + 0% { + top: 1.1875em; + left: 0.0625em; + width: 0; + } + 54% { + top: 1.0625em; + left: 0.125em; + width: 0; + } + 70% { + top: 2.1875em; + left: -0.375em; + width: 3.125em; + } + 84% { + top: 3em; + left: 1.3125em; + width: 1.0625em; + } + 100% { + top: 2.8125em; + left: 0.8125em; + width: 1.5625em; + } +} +@-webkit-keyframes swal2-animate-success-line-long { + 0% { + top: 3.375em; + right: 2.875em; + width: 0; + } + 65% { + top: 3.375em; + right: 2.875em; + width: 0; + } + 84% { + top: 2.1875em; + right: 0; + width: 3.4375em; + } + 100% { + top: 2.375em; + right: 0.5em; + width: 2.9375em; + } +} +@keyframes swal2-animate-success-line-long { + 0% { + top: 3.375em; + right: 2.875em; + width: 0; + } + 65% { + top: 3.375em; + right: 2.875em; + width: 0; + } + 84% { + top: 2.1875em; + right: 0; + width: 3.4375em; + } + 100% { + top: 2.375em; + right: 0.5em; + width: 2.9375em; + } +} +@-webkit-keyframes swal2-rotate-success-circular-line { + 0% { + transform: rotate(-45deg); + } + 5% { + transform: rotate(-45deg); + } + 12% { + transform: rotate(-405deg); + } + 100% { + transform: rotate(-405deg); + } +} +@keyframes swal2-rotate-success-circular-line { + 0% { + transform: rotate(-45deg); + } + 5% { + transform: rotate(-45deg); + } + 12% { + transform: rotate(-405deg); + } + 100% { + transform: rotate(-405deg); + } +} +@-webkit-keyframes swal2-animate-error-x-mark { + 0% { + margin-top: 1.625em; + transform: scale(0.4); + opacity: 0; + } + 50% { + margin-top: 1.625em; + transform: scale(0.4); + opacity: 0; + } + 80% { + margin-top: -0.375em; + transform: scale(1.15); + } + 100% { + margin-top: 0; + transform: scale(1); + opacity: 1; + } +} +@keyframes swal2-animate-error-x-mark { + 0% { + margin-top: 1.625em; + transform: scale(0.4); + opacity: 0; + } + 50% { + margin-top: 1.625em; + transform: scale(0.4); + opacity: 0; + } + 80% { + margin-top: -0.375em; + transform: scale(1.15); + } + 100% { + margin-top: 0; + transform: scale(1); + opacity: 1; + } +} +@-webkit-keyframes swal2-animate-error-icon { + 0% { + transform: rotateX(100deg); + opacity: 0; + } + 100% { + transform: rotateX(0deg); + opacity: 1; + } +} +@keyframes swal2-animate-error-icon { + 0% { + transform: rotateX(100deg); + opacity: 0; + } + 100% { + transform: rotateX(0deg); + opacity: 1; + } +} +@-webkit-keyframes swal2-rotate-loading { + 0% { + transform: rotate(0deg); + } + 100% { + transform: rotate(360deg); + } +} +@keyframes swal2-rotate-loading { + 0% { + transform: rotate(0deg); + } + 100% { + transform: rotate(360deg); + } +} +body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) { + overflow: hidden; +} +body.swal2-height-auto { + height: auto !important; +} +body.swal2-no-backdrop .swal2-container { + background-color: transparent !important; + pointer-events: none; +} +body.swal2-no-backdrop .swal2-container .swal2-popup { + pointer-events: all; +} +body.swal2-no-backdrop .swal2-container .swal2-modal { + box-shadow: 0 0 10px rgba(0, 0, 0, 0.4); +} +@media print { + body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) { + overflow-y: scroll !important; + } + body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) > [aria-hidden=true] { + display: none; + } + body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .swal2-container { + position: static !important; + } +} +body.swal2-toast-shown .swal2-container { + box-sizing: border-box; + width: 360px; + max-width: 100%; + background-color: transparent; + pointer-events: none; +} +body.swal2-toast-shown .swal2-container.swal2-top { + top: 0; + right: auto; + bottom: auto; + left: 50%; + transform: translateX(-50%); +} +body.swal2-toast-shown .swal2-container.swal2-top-end, body.swal2-toast-shown .swal2-container.swal2-top-right { + top: 0; + right: 0; + bottom: auto; + left: auto; +} +body.swal2-toast-shown .swal2-container.swal2-top-start, body.swal2-toast-shown .swal2-container.swal2-top-left { + top: 0; + right: auto; + bottom: auto; + left: 0; +} +body.swal2-toast-shown .swal2-container.swal2-center-start, body.swal2-toast-shown .swal2-container.swal2-center-left { + top: 50%; + right: auto; + bottom: auto; + left: 0; + transform: translateY(-50%); +} +body.swal2-toast-shown .swal2-container.swal2-center { + top: 50%; + right: auto; + bottom: auto; + left: 50%; + transform: translate(-50%, -50%); +} +body.swal2-toast-shown .swal2-container.swal2-center-end, body.swal2-toast-shown .swal2-container.swal2-center-right { + top: 50%; + right: 0; + bottom: auto; + left: auto; + transform: translateY(-50%); +} +body.swal2-toast-shown .swal2-container.swal2-bottom-start, body.swal2-toast-shown .swal2-container.swal2-bottom-left { + top: auto; + right: auto; + bottom: 0; + left: 0; +} +body.swal2-toast-shown .swal2-container.swal2-bottom { + top: auto; + right: auto; + bottom: 0; + left: 50%; + transform: translateX(-50%); +} +body.swal2-toast-shown .swal2-container.swal2-bottom-end, body.swal2-toast-shown .swal2-container.swal2-bottom-right { + top: auto; + right: 0; + bottom: 0; + left: auto; +} \ No newline at end of file diff --git a/modules/virtual-file-explorer/app/Volo.Abp.VirtualFileExplorer.DemoApp/wwwroot/libs/sweetalert2/sweetalert2.js b/modules/virtual-file-explorer/app/Volo.Abp.VirtualFileExplorer.DemoApp/wwwroot/libs/sweetalert2/sweetalert2.js new file mode 100644 index 0000000000..e9c254f064 --- /dev/null +++ b/modules/virtual-file-explorer/app/Volo.Abp.VirtualFileExplorer.DemoApp/wwwroot/libs/sweetalert2/sweetalert2.js @@ -0,0 +1,3121 @@ +/*! +* sweetalert2 v11.1.5 +* Released under the MIT License. +*/ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : + typeof define === 'function' && define.amd ? define(factory) : + (global = global || self, global.Sweetalert2 = factory()); +}(this, function () { 'use strict'; + + const DismissReason = Object.freeze({ + cancel: 'cancel', + backdrop: 'backdrop', + close: 'close', + esc: 'esc', + timer: 'timer' + }); + + const consolePrefix = 'SweetAlert2:'; + /** + * Filter the unique values into a new array + * @param arr + */ + + const uniqueArray = arr => { + const result = []; + + for (let i = 0; i < arr.length; i++) { + if (result.indexOf(arr[i]) === -1) { + result.push(arr[i]); + } + } + + return result; + }; + /** + * Capitalize the first letter of a string + * @param str + */ + + const capitalizeFirstLetter = str => str.charAt(0).toUpperCase() + str.slice(1); + /** + * Convert NodeList to Array + * @param nodeList + */ + + const toArray = nodeList => Array.prototype.slice.call(nodeList); + /** + * Standardise console warnings + * @param message + */ + + const warn = message => { + console.warn("".concat(consolePrefix, " ").concat(typeof message === 'object' ? message.join(' ') : message)); + }; + /** + * Standardise console errors + * @param message + */ + + const error = message => { + console.error("".concat(consolePrefix, " ").concat(message)); + }; + /** + * Private global state for `warnOnce` + * @type {Array} + * @private + */ + + const previousWarnOnceMessages = []; + /** + * Show a console warning, but only if it hasn't already been shown + * @param message + */ + + const warnOnce = message => { + if (!previousWarnOnceMessages.includes(message)) { + previousWarnOnceMessages.push(message); + warn(message); + } + }; + /** + * Show a one-time console warning about deprecated params/methods + */ + + const warnAboutDeprecation = (deprecatedParam, useInstead) => { + warnOnce("\"".concat(deprecatedParam, "\" is deprecated and will be removed in the next major release. Please use \"").concat(useInstead, "\" instead.")); + }; + /** + * If `arg` is a function, call it (with no arguments or context) and return the result. + * Otherwise, just pass the value through + * @param arg + */ + + const callIfFunction = arg => typeof arg === 'function' ? arg() : arg; + const hasToPromiseFn = arg => arg && typeof arg.toPromise === 'function'; + const asPromise = arg => hasToPromiseFn(arg) ? arg.toPromise() : Promise.resolve(arg); + const isPromise = arg => arg && Promise.resolve(arg) === arg; + + const isJqueryElement = elem => typeof elem === 'object' && elem.jquery; + + const isElement = elem => elem instanceof Element || isJqueryElement(elem); + + const argsToParams = args => { + const params = {}; + + if (typeof args[0] === 'object' && !isElement(args[0])) { + Object.assign(params, args[0]); + } else { + ['title', 'html', 'icon'].forEach((name, index) => { + const arg = args[index]; + + if (typeof arg === 'string' || isElement(arg)) { + params[name] = arg; + } else if (arg !== undefined) { + error("Unexpected type of ".concat(name, "! Expected \"string\" or \"Element\", got ").concat(typeof arg)); + } + }); + } + + return params; + }; + + const swalPrefix = 'swal2-'; + const prefix = items => { + const result = {}; + + for (const i in items) { + result[items[i]] = swalPrefix + items[i]; + } + + return result; + }; + const swalClasses = prefix(['container', 'shown', 'height-auto', 'iosfix', 'popup', 'modal', 'no-backdrop', 'no-transition', 'toast', 'toast-shown', 'show', 'hide', 'close', 'title', 'html-container', 'actions', 'confirm', 'deny', 'cancel', 'default-outline', 'footer', 'icon', 'icon-content', 'image', 'input', 'file', 'range', 'select', 'radio', 'checkbox', 'label', 'textarea', 'inputerror', 'input-label', 'validation-message', 'progress-steps', 'active-progress-step', 'progress-step', 'progress-step-line', 'loader', 'loading', 'styled', 'top', 'top-start', 'top-end', 'top-left', 'top-right', 'center', 'center-start', 'center-end', 'center-left', 'center-right', 'bottom', 'bottom-start', 'bottom-end', 'bottom-left', 'bottom-right', 'grow-row', 'grow-column', 'grow-fullscreen', 'rtl', 'timer-progress-bar', 'timer-progress-bar-container', 'scrollbar-measure', 'icon-success', 'icon-warning', 'icon-info', 'icon-question', 'icon-error']); + const iconTypes = prefix(['success', 'warning', 'info', 'question', 'error']); + + const getContainer = () => document.body.querySelector(".".concat(swalClasses.container)); + const elementBySelector = selectorString => { + const container = getContainer(); + return container ? container.querySelector(selectorString) : null; + }; + + const elementByClass = className => { + return elementBySelector(".".concat(className)); + }; + + const getPopup = () => elementByClass(swalClasses.popup); + const getIcon = () => elementByClass(swalClasses.icon); + const getTitle = () => elementByClass(swalClasses.title); + const getHtmlContainer = () => elementByClass(swalClasses['html-container']); + const getImage = () => elementByClass(swalClasses.image); + const getProgressSteps = () => elementByClass(swalClasses['progress-steps']); + const getValidationMessage = () => elementByClass(swalClasses['validation-message']); + const getConfirmButton = () => elementBySelector(".".concat(swalClasses.actions, " .").concat(swalClasses.confirm)); + const getDenyButton = () => elementBySelector(".".concat(swalClasses.actions, " .").concat(swalClasses.deny)); + const getInputLabel = () => elementByClass(swalClasses['input-label']); + const getLoader = () => elementBySelector(".".concat(swalClasses.loader)); + const getCancelButton = () => elementBySelector(".".concat(swalClasses.actions, " .").concat(swalClasses.cancel)); + const getActions = () => elementByClass(swalClasses.actions); + const getFooter = () => elementByClass(swalClasses.footer); + const getTimerProgressBar = () => elementByClass(swalClasses['timer-progress-bar']); + const getCloseButton = () => elementByClass(swalClasses.close); // https://github.com/jkup/focusable/blob/master/index.js + + const focusable = "\n a[href],\n area[href],\n input:not([disabled]),\n select:not([disabled]),\n textarea:not([disabled]),\n button:not([disabled]),\n iframe,\n object,\n embed,\n [tabindex=\"0\"],\n [contenteditable],\n audio[controls],\n video[controls],\n summary\n"; + const getFocusableElements = () => { + const focusableElementsWithTabindex = toArray(getPopup().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')) // sort according to tabindex + .sort((a, b) => { + a = parseInt(a.getAttribute('tabindex')); + b = parseInt(b.getAttribute('tabindex')); + + if (a > b) { + return 1; + } else if (a < b) { + return -1; + } + + return 0; + }); + const otherFocusableElements = toArray(getPopup().querySelectorAll(focusable)).filter(el => el.getAttribute('tabindex') !== '-1'); + return uniqueArray(focusableElementsWithTabindex.concat(otherFocusableElements)).filter(el => isVisible(el)); + }; + const isModal = () => { + return !isToast() && !document.body.classList.contains(swalClasses['no-backdrop']); + }; + const isToast = () => { + return document.body.classList.contains(swalClasses['toast-shown']); + }; + const isLoading = () => { + return getPopup().hasAttribute('data-loading'); + }; + + const states = { + previousBodyPadding: null + }; + const setInnerHtml = (elem, html) => { + // #1926 + elem.textContent = ''; + + if (html) { + const parser = new DOMParser(); + const parsed = parser.parseFromString(html, "text/html"); + toArray(parsed.querySelector('head').childNodes).forEach(child => { + elem.appendChild(child); + }); + toArray(parsed.querySelector('body').childNodes).forEach(child => { + elem.appendChild(child); + }); + } + }; + const hasClass = (elem, className) => { + if (!className) { + return false; + } + + const classList = className.split(/\s+/); + + for (let i = 0; i < classList.length; i++) { + if (!elem.classList.contains(classList[i])) { + return false; + } + } + + return true; + }; + + const removeCustomClasses = (elem, params) => { + toArray(elem.classList).forEach(className => { + if (!Object.values(swalClasses).includes(className) && !Object.values(iconTypes).includes(className) && !Object.values(params.showClass).includes(className)) { + elem.classList.remove(className); + } + }); + }; + + const applyCustomClass = (elem, params, className) => { + removeCustomClasses(elem, params); + + if (params.customClass && params.customClass[className]) { + if (typeof params.customClass[className] !== 'string' && !params.customClass[className].forEach) { + return warn("Invalid type of customClass.".concat(className, "! Expected string or iterable object, got \"").concat(typeof params.customClass[className], "\"")); + } + + addClass(elem, params.customClass[className]); + } + }; + const getInput = (popup, inputType) => { + if (!inputType) { + return null; + } + + switch (inputType) { + case 'select': + case 'textarea': + case 'file': + return getChildByClass(popup, swalClasses[inputType]); + + case 'checkbox': + return popup.querySelector(".".concat(swalClasses.checkbox, " input")); + + case 'radio': + return popup.querySelector(".".concat(swalClasses.radio, " input:checked")) || popup.querySelector(".".concat(swalClasses.radio, " input:first-child")); + + case 'range': + return popup.querySelector(".".concat(swalClasses.range, " input")); + + default: + return getChildByClass(popup, swalClasses.input); + } + }; + const focusInput = input => { + input.focus(); // place cursor at end of text in text input + + if (input.type !== 'file') { + // http://stackoverflow.com/a/2345915 + const val = input.value; + input.value = ''; + input.value = val; + } + }; + const toggleClass = (target, classList, condition) => { + if (!target || !classList) { + return; + } + + if (typeof classList === 'string') { + classList = classList.split(/\s+/).filter(Boolean); + } + + classList.forEach(className => { + if (target.forEach) { + target.forEach(elem => { + condition ? elem.classList.add(className) : elem.classList.remove(className); + }); + } else { + condition ? target.classList.add(className) : target.classList.remove(className); + } + }); + }; + const addClass = (target, classList) => { + toggleClass(target, classList, true); + }; + const removeClass = (target, classList) => { + toggleClass(target, classList, false); + }; + const getChildByClass = (elem, className) => { + for (let i = 0; i < elem.childNodes.length; i++) { + if (hasClass(elem.childNodes[i], className)) { + return elem.childNodes[i]; + } + } + }; + const applyNumericalStyle = (elem, property, value) => { + if (value === "".concat(parseInt(value))) { + value = parseInt(value); + } + + if (value || parseInt(value) === 0) { + elem.style[property] = typeof value === 'number' ? "".concat(value, "px") : value; + } else { + elem.style.removeProperty(property); + } + }; + const show = (elem, display = 'flex') => { + elem.style.display = display; + }; + const hide = elem => { + elem.style.display = 'none'; + }; + const setStyle = (parent, selector, property, value) => { + const el = parent.querySelector(selector); + + if (el) { + el.style[property] = value; + } + }; + const toggle = (elem, condition, display) => { + condition ? show(elem, display) : hide(elem); + }; // borrowed from jquery $(elem).is(':visible') implementation + + const isVisible = elem => !!(elem && (elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length)); + const allButtonsAreHidden = () => !isVisible(getConfirmButton()) && !isVisible(getDenyButton()) && !isVisible(getCancelButton()); + const isScrollable = elem => !!(elem.scrollHeight > elem.clientHeight); // borrowed from https://stackoverflow.com/a/46352119 + + const hasCssAnimation = elem => { + const style = window.getComputedStyle(elem); + const animDuration = parseFloat(style.getPropertyValue('animation-duration') || '0'); + const transDuration = parseFloat(style.getPropertyValue('transition-duration') || '0'); + return animDuration > 0 || transDuration > 0; + }; + const animateTimerProgressBar = (timer, reset = false) => { + const timerProgressBar = getTimerProgressBar(); + + if (isVisible(timerProgressBar)) { + if (reset) { + timerProgressBar.style.transition = 'none'; + timerProgressBar.style.width = '100%'; + } + + setTimeout(() => { + timerProgressBar.style.transition = "width ".concat(timer / 1000, "s linear"); + timerProgressBar.style.width = '0%'; + }, 10); + } + }; + const stopTimerProgressBar = () => { + const timerProgressBar = getTimerProgressBar(); + const timerProgressBarWidth = parseInt(window.getComputedStyle(timerProgressBar).width); + timerProgressBar.style.removeProperty('transition'); + timerProgressBar.style.width = '100%'; + const timerProgressBarFullWidth = parseInt(window.getComputedStyle(timerProgressBar).width); + const timerProgressBarPercent = parseInt(timerProgressBarWidth / timerProgressBarFullWidth * 100); + timerProgressBar.style.removeProperty('transition'); + timerProgressBar.style.width = "".concat(timerProgressBarPercent, "%"); + }; + + // Detect Node env + const isNodeEnv = () => typeof window === 'undefined' || typeof document === 'undefined'; + + const sweetHTML = "\n
                                                      \n \n
                                                        \n
                                                        \n \n

                                                        \n
                                                        \n \n \n
                                                        \n \n \n
                                                        \n \n
                                                        \n \n \n
                                                        \n
                                                        \n
                                                        \n \n \n \n
                                                        \n
                                                        \n
                                                        \n
                                                        \n
                                                        \n
                                                        \n").replace(/(^|\n)\s*/g, ''); + + const resetOldContainer = () => { + const oldContainer = getContainer(); + + if (!oldContainer) { + return false; + } + + oldContainer.remove(); + removeClass([document.documentElement, document.body], [swalClasses['no-backdrop'], swalClasses['toast-shown'], swalClasses['has-column']]); + return true; + }; + + const resetValidationMessage = () => { + if (Swal.isVisible()) { + Swal.resetValidationMessage(); + } + }; + + const addInputChangeListeners = () => { + const popup = getPopup(); + const input = getChildByClass(popup, swalClasses.input); + const file = getChildByClass(popup, swalClasses.file); + const range = popup.querySelector(".".concat(swalClasses.range, " input")); + const rangeOutput = popup.querySelector(".".concat(swalClasses.range, " output")); + const select = getChildByClass(popup, swalClasses.select); + const checkbox = popup.querySelector(".".concat(swalClasses.checkbox, " input")); + const textarea = getChildByClass(popup, swalClasses.textarea); + input.oninput = resetValidationMessage; + file.onchange = resetValidationMessage; + select.onchange = resetValidationMessage; + checkbox.onchange = resetValidationMessage; + textarea.oninput = resetValidationMessage; + + range.oninput = () => { + resetValidationMessage(); + rangeOutput.value = range.value; + }; + + range.onchange = () => { + resetValidationMessage(); + range.nextSibling.value = range.value; + }; + }; + + const getTarget = target => typeof target === 'string' ? document.querySelector(target) : target; + + const setupAccessibility = params => { + const popup = getPopup(); + popup.setAttribute('role', params.toast ? 'alert' : 'dialog'); + popup.setAttribute('aria-live', params.toast ? 'polite' : 'assertive'); + + if (!params.toast) { + popup.setAttribute('aria-modal', 'true'); + } + }; + + const setupRTL = targetElement => { + if (window.getComputedStyle(targetElement).direction === 'rtl') { + addClass(getContainer(), swalClasses.rtl); + } + }; + /* + * Add modal + backdrop to DOM + */ + + + const init = params => { + // Clean up the old popup container if it exists + const oldContainerExisted = resetOldContainer(); + /* istanbul ignore if */ + + if (isNodeEnv()) { + error('SweetAlert2 requires document to initialize'); + return; + } + + const container = document.createElement('div'); + container.className = swalClasses.container; + + if (oldContainerExisted) { + addClass(container, swalClasses['no-transition']); + } + + setInnerHtml(container, sweetHTML); + const targetElement = getTarget(params.target); + targetElement.appendChild(container); + setupAccessibility(params); + setupRTL(targetElement); + addInputChangeListeners(); + }; + + const parseHtmlToContainer = (param, target) => { + // DOM element + if (param instanceof HTMLElement) { + target.appendChild(param); // Object + } else if (typeof param === 'object') { + handleObject(param, target); // Plain string + } else if (param) { + setInnerHtml(target, param); + } + }; + + const handleObject = (param, target) => { + // JQuery element(s) + if (param.jquery) { + handleJqueryElem(target, param); // For other objects use their string representation + } else { + setInnerHtml(target, param.toString()); + } + }; + + const handleJqueryElem = (target, elem) => { + target.textContent = ''; + + if (0 in elem) { + for (let i = 0; (i in elem); i++) { + target.appendChild(elem[i].cloneNode(true)); + } + } else { + target.appendChild(elem.cloneNode(true)); + } + }; + + const animationEndEvent = (() => { + // Prevent run in Node env + + /* istanbul ignore if */ + if (isNodeEnv()) { + return false; + } + + const testEl = document.createElement('div'); + const transEndEventNames = { + WebkitAnimation: 'webkitAnimationEnd', + OAnimation: 'oAnimationEnd oanimationend', + animation: 'animationend' + }; + + for (const i in transEndEventNames) { + if (Object.prototype.hasOwnProperty.call(transEndEventNames, i) && typeof testEl.style[i] !== 'undefined') { + return transEndEventNames[i]; + } + } + + return false; + })(); + + // https://github.com/twbs/bootstrap/blob/master/js/src/modal.js + + const measureScrollbar = () => { + const scrollDiv = document.createElement('div'); + scrollDiv.className = swalClasses['scrollbar-measure']; + document.body.appendChild(scrollDiv); + const scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth; + document.body.removeChild(scrollDiv); + return scrollbarWidth; + }; + + const renderActions = (instance, params) => { + const actions = getActions(); + const loader = getLoader(); + const confirmButton = getConfirmButton(); + const denyButton = getDenyButton(); + const cancelButton = getCancelButton(); // Actions (buttons) wrapper + + if (!params.showConfirmButton && !params.showDenyButton && !params.showCancelButton) { + hide(actions); + } else { + show(actions); + } // Custom class + + + applyCustomClass(actions, params, 'actions'); // Render buttons + + renderButton(confirmButton, 'confirm', params); + renderButton(denyButton, 'deny', params); + renderButton(cancelButton, 'cancel', params); + handleButtonsStyling(confirmButton, denyButton, cancelButton, params); + + if (params.reverseButtons) { + actions.insertBefore(cancelButton, loader); + actions.insertBefore(denyButton, loader); + actions.insertBefore(confirmButton, loader); + } // Loader + + + setInnerHtml(loader, params.loaderHtml); + applyCustomClass(loader, params, 'loader'); + }; + + function handleButtonsStyling(confirmButton, denyButton, cancelButton, params) { + if (!params.buttonsStyling) { + return removeClass([confirmButton, denyButton, cancelButton], swalClasses.styled); + } + + addClass([confirmButton, denyButton, cancelButton], swalClasses.styled); // Buttons background colors + + if (params.confirmButtonColor) { + confirmButton.style.backgroundColor = params.confirmButtonColor; + addClass(confirmButton, swalClasses['default-outline']); + } + + if (params.denyButtonColor) { + denyButton.style.backgroundColor = params.denyButtonColor; + addClass(denyButton, swalClasses['default-outline']); + } + + if (params.cancelButtonColor) { + cancelButton.style.backgroundColor = params.cancelButtonColor; + addClass(cancelButton, swalClasses['default-outline']); + } + } + + function renderButton(button, buttonType, params) { + toggle(button, params["show".concat(capitalizeFirstLetter(buttonType), "Button")], 'inline-block'); + setInnerHtml(button, params["".concat(buttonType, "ButtonText")]); // Set caption text + + button.setAttribute('aria-label', params["".concat(buttonType, "ButtonAriaLabel")]); // ARIA label + // Add buttons custom classes + + button.className = swalClasses[buttonType]; + applyCustomClass(button, params, "".concat(buttonType, "Button")); + addClass(button, params["".concat(buttonType, "ButtonClass")]); + } + + function handleBackdropParam(container, backdrop) { + if (typeof backdrop === 'string') { + container.style.background = backdrop; + } else if (!backdrop) { + addClass([document.documentElement, document.body], swalClasses['no-backdrop']); + } + } + + function handlePositionParam(container, position) { + if (position in swalClasses) { + addClass(container, swalClasses[position]); + } else { + warn('The "position" parameter is not valid, defaulting to "center"'); + addClass(container, swalClasses.center); + } + } + + function handleGrowParam(container, grow) { + if (grow && typeof grow === 'string') { + const growClass = "grow-".concat(grow); + + if (growClass in swalClasses) { + addClass(container, swalClasses[growClass]); + } + } + } + + const renderContainer = (instance, params) => { + const container = getContainer(); + + if (!container) { + return; + } + + handleBackdropParam(container, params.backdrop); + handlePositionParam(container, params.position); + handleGrowParam(container, params.grow); // Custom class + + applyCustomClass(container, params, 'container'); + }; + + /** + * This module containts `WeakMap`s for each effectively-"private property" that a `Swal` has. + * For example, to set the private property "foo" of `this` to "bar", you can `privateProps.foo.set(this, 'bar')` + * This is the approach that Babel will probably take to implement private methods/fields + * https://github.com/tc39/proposal-private-methods + * https://github.com/babel/babel/pull/7555 + * Once we have the changes from that PR in Babel, and our core class fits reasonable in *one module* + * then we can use that language feature. + */ + var privateProps = { + promise: new WeakMap(), + innerParams: new WeakMap(), + domCache: new WeakMap() + }; + + const inputTypes = ['input', 'file', 'range', 'select', 'radio', 'checkbox', 'textarea']; + const renderInput = (instance, params) => { + const popup = getPopup(); + const innerParams = privateProps.innerParams.get(instance); + const rerender = !innerParams || params.input !== innerParams.input; + inputTypes.forEach(inputType => { + const inputClass = swalClasses[inputType]; + const inputContainer = getChildByClass(popup, inputClass); // set attributes + + setAttributes(inputType, params.inputAttributes); // set class + + inputContainer.className = inputClass; + + if (rerender) { + hide(inputContainer); + } + }); + + if (params.input) { + if (rerender) { + showInput(params); + } // set custom class + + + setCustomClass(params); + } + }; + + const showInput = params => { + if (!renderInputType[params.input]) { + return error("Unexpected type of input! Expected \"text\", \"email\", \"password\", \"number\", \"tel\", \"select\", \"radio\", \"checkbox\", \"textarea\", \"file\" or \"url\", got \"".concat(params.input, "\"")); + } + + const inputContainer = getInputContainer(params.input); + const input = renderInputType[params.input](inputContainer, params); + show(input); // input autofocus + + setTimeout(() => { + focusInput(input); + }); + }; + + const removeAttributes = input => { + for (let i = 0; i < input.attributes.length; i++) { + const attrName = input.attributes[i].name; + + if (!['type', 'value', 'style'].includes(attrName)) { + input.removeAttribute(attrName); + } + } + }; + + const setAttributes = (inputType, inputAttributes) => { + const input = getInput(getPopup(), inputType); + + if (!input) { + return; + } + + removeAttributes(input); + + for (const attr in inputAttributes) { + input.setAttribute(attr, inputAttributes[attr]); + } + }; + + const setCustomClass = params => { + const inputContainer = getInputContainer(params.input); + + if (params.customClass) { + addClass(inputContainer, params.customClass.input); + } + }; + + const setInputPlaceholder = (input, params) => { + if (!input.placeholder || params.inputPlaceholder) { + input.placeholder = params.inputPlaceholder; + } + }; + + const setInputLabel = (input, prependTo, params) => { + if (params.inputLabel) { + input.id = swalClasses.input; + const label = document.createElement('label'); + const labelClass = swalClasses['input-label']; + label.setAttribute('for', input.id); + label.className = labelClass; + addClass(label, params.customClass.inputLabel); + label.innerText = params.inputLabel; + prependTo.insertAdjacentElement('beforebegin', label); + } + }; + + const getInputContainer = inputType => { + const inputClass = swalClasses[inputType] ? swalClasses[inputType] : swalClasses.input; + return getChildByClass(getPopup(), inputClass); + }; + + const renderInputType = {}; + + renderInputType.text = renderInputType.email = renderInputType.password = renderInputType.number = renderInputType.tel = renderInputType.url = (input, params) => { + if (typeof params.inputValue === 'string' || typeof params.inputValue === 'number') { + input.value = params.inputValue; + } else if (!isPromise(params.inputValue)) { + warn("Unexpected type of inputValue! Expected \"string\", \"number\" or \"Promise\", got \"".concat(typeof params.inputValue, "\"")); + } + + setInputLabel(input, input, params); + setInputPlaceholder(input, params); + input.type = params.input; + return input; + }; + + renderInputType.file = (input, params) => { + setInputLabel(input, input, params); + setInputPlaceholder(input, params); + return input; + }; + + renderInputType.range = (range, params) => { + const rangeInput = range.querySelector('input'); + const rangeOutput = range.querySelector('output'); + rangeInput.value = params.inputValue; + rangeInput.type = params.input; + rangeOutput.value = params.inputValue; + setInputLabel(rangeInput, range, params); + return range; + }; + + renderInputType.select = (select, params) => { + select.textContent = ''; + + if (params.inputPlaceholder) { + const placeholder = document.createElement('option'); + setInnerHtml(placeholder, params.inputPlaceholder); + placeholder.value = ''; + placeholder.disabled = true; + placeholder.selected = true; + select.appendChild(placeholder); + } + + setInputLabel(select, select, params); + return select; + }; + + renderInputType.radio = radio => { + radio.textContent = ''; + return radio; + }; + + renderInputType.checkbox = (checkboxContainer, params) => { + const checkbox = getInput(getPopup(), 'checkbox'); + checkbox.value = 1; + checkbox.id = swalClasses.checkbox; + checkbox.checked = Boolean(params.inputValue); + const label = checkboxContainer.querySelector('span'); + setInnerHtml(label, params.inputPlaceholder); + return checkboxContainer; + }; + + renderInputType.textarea = (textarea, params) => { + textarea.value = params.inputValue; + setInputPlaceholder(textarea, params); + setInputLabel(textarea, textarea, params); + + const getMargin = el => parseInt(window.getComputedStyle(el).marginLeft) + parseInt(window.getComputedStyle(el).marginRight); + + setTimeout(() => { + // #2291 + if ('MutationObserver' in window) { + // #1699 + const initialPopupWidth = parseInt(window.getComputedStyle(getPopup()).width); + + const textareaResizeHandler = () => { + const textareaWidth = textarea.offsetWidth + getMargin(textarea); + + if (textareaWidth > initialPopupWidth) { + getPopup().style.width = "".concat(textareaWidth, "px"); + } else { + getPopup().style.width = null; + } + }; + + new MutationObserver(textareaResizeHandler).observe(textarea, { + attributes: true, + attributeFilter: ['style'] + }); + } + }); + return textarea; + }; + + const renderContent = (instance, params) => { + const htmlContainer = getHtmlContainer(); + applyCustomClass(htmlContainer, params, 'htmlContainer'); // Content as HTML + + if (params.html) { + parseHtmlToContainer(params.html, htmlContainer); + show(htmlContainer, 'block'); // Content as plain text + } else if (params.text) { + htmlContainer.textContent = params.text; + show(htmlContainer, 'block'); // No content + } else { + hide(htmlContainer); + } + + renderInput(instance, params); + }; + + const renderFooter = (instance, params) => { + const footer = getFooter(); + toggle(footer, params.footer); + + if (params.footer) { + parseHtmlToContainer(params.footer, footer); + } // Custom class + + + applyCustomClass(footer, params, 'footer'); + }; + + const renderCloseButton = (instance, params) => { + const closeButton = getCloseButton(); + setInnerHtml(closeButton, params.closeButtonHtml); // Custom class + + applyCustomClass(closeButton, params, 'closeButton'); + toggle(closeButton, params.showCloseButton); + closeButton.setAttribute('aria-label', params.closeButtonAriaLabel); + }; + + const renderIcon = (instance, params) => { + const innerParams = privateProps.innerParams.get(instance); + const icon = getIcon(); // if the given icon already rendered, apply the styling without re-rendering the icon + + if (innerParams && params.icon === innerParams.icon) { + // Custom or default content + setContent(icon, params); + applyStyles(icon, params); + return; + } + + if (!params.icon && !params.iconHtml) { + return hide(icon); + } + + if (params.icon && Object.keys(iconTypes).indexOf(params.icon) === -1) { + error("Unknown icon! Expected \"success\", \"error\", \"warning\", \"info\" or \"question\", got \"".concat(params.icon, "\"")); + return hide(icon); + } + + show(icon); // Custom or default content + + setContent(icon, params); + applyStyles(icon, params); // Animate icon + + addClass(icon, params.showClass.icon); + }; + + const applyStyles = (icon, params) => { + for (const iconType in iconTypes) { + if (params.icon !== iconType) { + removeClass(icon, iconTypes[iconType]); + } + } + + addClass(icon, iconTypes[params.icon]); // Icon color + + setColor(icon, params); // Success icon background color + + adjustSuccessIconBackgoundColor(); // Custom class + + applyCustomClass(icon, params, 'icon'); + }; // Adjust success icon background color to match the popup background color + + + const adjustSuccessIconBackgoundColor = () => { + const popup = getPopup(); + const popupBackgroundColor = window.getComputedStyle(popup).getPropertyValue('background-color'); + const successIconParts = popup.querySelectorAll('[class^=swal2-success-circular-line], .swal2-success-fix'); + + for (let i = 0; i < successIconParts.length; i++) { + successIconParts[i].style.backgroundColor = popupBackgroundColor; + } + }; + + const setContent = (icon, params) => { + icon.textContent = ''; + + if (params.iconHtml) { + setInnerHtml(icon, iconContent(params.iconHtml)); + } else if (params.icon === 'success') { + setInnerHtml(icon, "\n
                                                        \n \n
                                                        \n
                                                        \n "); + } else if (params.icon === 'error') { + setInnerHtml(icon, "\n \n \n \n \n "); + } else { + const defaultIconHtml = { + question: '?', + warning: '!', + info: 'i' + }; + setInnerHtml(icon, iconContent(defaultIconHtml[params.icon])); + } + }; + + const setColor = (icon, params) => { + if (!params.iconColor) { + return; + } + + icon.style.color = params.iconColor; + icon.style.borderColor = params.iconColor; + + for (const sel of ['.swal2-success-line-tip', '.swal2-success-line-long', '.swal2-x-mark-line-left', '.swal2-x-mark-line-right']) { + setStyle(icon, sel, 'backgroundColor', params.iconColor); + } + + setStyle(icon, '.swal2-success-ring', 'borderColor', params.iconColor); + }; + + const iconContent = content => "
                                                        ").concat(content, "
                                                        "); + + const renderImage = (instance, params) => { + const image = getImage(); + + if (!params.imageUrl) { + return hide(image); + } + + show(image, ''); // Src, alt + + image.setAttribute('src', params.imageUrl); + image.setAttribute('alt', params.imageAlt); // Width, height + + applyNumericalStyle(image, 'width', params.imageWidth); + applyNumericalStyle(image, 'height', params.imageHeight); // Class + + image.className = swalClasses.image; + applyCustomClass(image, params, 'image'); + }; + + const createStepElement = step => { + const stepEl = document.createElement('li'); + addClass(stepEl, swalClasses['progress-step']); + setInnerHtml(stepEl, step); + return stepEl; + }; + + const createLineElement = params => { + const lineEl = document.createElement('li'); + addClass(lineEl, swalClasses['progress-step-line']); + + if (params.progressStepsDistance) { + lineEl.style.width = params.progressStepsDistance; + } + + return lineEl; + }; + + const renderProgressSteps = (instance, params) => { + const progressStepsContainer = getProgressSteps(); + + if (!params.progressSteps || params.progressSteps.length === 0) { + return hide(progressStepsContainer); + } + + show(progressStepsContainer); + progressStepsContainer.textContent = ''; + + if (params.currentProgressStep >= params.progressSteps.length) { + warn('Invalid currentProgressStep parameter, it should be less than progressSteps.length ' + '(currentProgressStep like JS arrays starts from 0)'); + } + + params.progressSteps.forEach((step, index) => { + const stepEl = createStepElement(step); + progressStepsContainer.appendChild(stepEl); + + if (index === params.currentProgressStep) { + addClass(stepEl, swalClasses['active-progress-step']); + } + + if (index !== params.progressSteps.length - 1) { + const lineEl = createLineElement(params); + progressStepsContainer.appendChild(lineEl); + } + }); + }; + + const renderTitle = (instance, params) => { + const title = getTitle(); + toggle(title, params.title || params.titleText, 'block'); + + if (params.title) { + parseHtmlToContainer(params.title, title); + } + + if (params.titleText) { + title.innerText = params.titleText; + } // Custom class + + + applyCustomClass(title, params, 'title'); + }; + + const renderPopup = (instance, params) => { + const container = getContainer(); + const popup = getPopup(); // Width + + if (params.toast) { + // #2170 + applyNumericalStyle(container, 'width', params.width); + popup.style.width = '100%'; + popup.insertBefore(getLoader(), getIcon()); + } else { + applyNumericalStyle(popup, 'width', params.width); + } // Padding + + + applyNumericalStyle(popup, 'padding', params.padding); // Background + + if (params.background) { + popup.style.background = params.background; + } + + hide(getValidationMessage()); // Classes + + addClasses(popup, params); + }; + + const addClasses = (popup, params) => { + // Default Class + showClass when updating Swal.update({}) + popup.className = "".concat(swalClasses.popup, " ").concat(isVisible(popup) ? params.showClass.popup : ''); + + if (params.toast) { + addClass([document.documentElement, document.body], swalClasses['toast-shown']); + addClass(popup, swalClasses.toast); + } else { + addClass(popup, swalClasses.modal); + } // Custom class + + + applyCustomClass(popup, params, 'popup'); + + if (typeof params.customClass === 'string') { + addClass(popup, params.customClass); + } // Icon class (#1842) + + + if (params.icon) { + addClass(popup, swalClasses["icon-".concat(params.icon)]); + } + }; + + const render = (instance, params) => { + renderPopup(instance, params); + renderContainer(instance, params); + renderProgressSteps(instance, params); + renderIcon(instance, params); + renderImage(instance, params); + renderTitle(instance, params); + renderCloseButton(instance, params); + renderContent(instance, params); + renderActions(instance, params); + renderFooter(instance, params); + + if (typeof params.didRender === 'function') { + params.didRender(getPopup()); + } + }; + + /* + * Global function to determine if SweetAlert2 popup is shown + */ + + const isVisible$1 = () => { + return isVisible(getPopup()); + }; + /* + * Global function to click 'Confirm' button + */ + + const clickConfirm = () => getConfirmButton() && getConfirmButton().click(); + /* + * Global function to click 'Deny' button + */ + + const clickDeny = () => getDenyButton() && getDenyButton().click(); + /* + * Global function to click 'Cancel' button + */ + + const clickCancel = () => getCancelButton() && getCancelButton().click(); + + function fire(...args) { + const Swal = this; + return new Swal(...args); + } + + /** + * Returns an extended version of `Swal` containing `params` as defaults. + * Useful for reusing Swal configuration. + * + * For example: + * + * Before: + * const textPromptOptions = { input: 'text', showCancelButton: true } + * const {value: firstName} = await Swal.fire({ ...textPromptOptions, title: 'What is your first name?' }) + * const {value: lastName} = await Swal.fire({ ...textPromptOptions, title: 'What is your last name?' }) + * + * After: + * const TextPrompt = Swal.mixin({ input: 'text', showCancelButton: true }) + * const {value: firstName} = await TextPrompt('What is your first name?') + * const {value: lastName} = await TextPrompt('What is your last name?') + * + * @param mixinParams + */ + function mixin(mixinParams) { + class MixinSwal extends this { + _main(params, priorityMixinParams) { + return super._main(params, Object.assign({}, mixinParams, priorityMixinParams)); + } + + } + + return MixinSwal; + } + + /** + * Shows loader (spinner), this is useful with AJAX requests. + * By default the loader be shown instead of the "Confirm" button. + */ + + const showLoading = buttonToReplace => { + let popup = getPopup(); + + if (!popup) { + Swal.fire(); + } + + popup = getPopup(); + const loader = getLoader(); + + if (isToast()) { + hide(getIcon()); + } else { + replaceButton(popup, buttonToReplace); + } + + show(loader); + popup.setAttribute('data-loading', true); + popup.setAttribute('aria-busy', true); + popup.focus(); + }; + + const replaceButton = (popup, buttonToReplace) => { + const actions = getActions(); + const loader = getLoader(); + + if (!buttonToReplace && isVisible(getConfirmButton())) { + buttonToReplace = getConfirmButton(); + } + + show(actions); + + if (buttonToReplace) { + hide(buttonToReplace); + loader.setAttribute('data-button-to-replace', buttonToReplace.className); + } + + loader.parentNode.insertBefore(loader, buttonToReplace); + addClass([popup, actions], swalClasses.loading); + }; + + const RESTORE_FOCUS_TIMEOUT = 100; + + const globalState = {}; + + const focusPreviousActiveElement = () => { + if (globalState.previousActiveElement && globalState.previousActiveElement.focus) { + globalState.previousActiveElement.focus(); + globalState.previousActiveElement = null; + } else if (document.body) { + document.body.focus(); + } + }; // Restore previous active (focused) element + + + const restoreActiveElement = returnFocus => { + return new Promise(resolve => { + if (!returnFocus) { + return resolve(); + } + + const x = window.scrollX; + const y = window.scrollY; + globalState.restoreFocusTimeout = setTimeout(() => { + focusPreviousActiveElement(); + resolve(); + }, RESTORE_FOCUS_TIMEOUT); // issues/900 + + window.scrollTo(x, y); + }); + }; + + /** + * If `timer` parameter is set, returns number of milliseconds of timer remained. + * Otherwise, returns undefined. + */ + + const getTimerLeft = () => { + return globalState.timeout && globalState.timeout.getTimerLeft(); + }; + /** + * Stop timer. Returns number of milliseconds of timer remained. + * If `timer` parameter isn't set, returns undefined. + */ + + const stopTimer = () => { + if (globalState.timeout) { + stopTimerProgressBar(); + return globalState.timeout.stop(); + } + }; + /** + * Resume timer. Returns number of milliseconds of timer remained. + * If `timer` parameter isn't set, returns undefined. + */ + + const resumeTimer = () => { + if (globalState.timeout) { + const remaining = globalState.timeout.start(); + animateTimerProgressBar(remaining); + return remaining; + } + }; + /** + * Resume timer. Returns number of milliseconds of timer remained. + * If `timer` parameter isn't set, returns undefined. + */ + + const toggleTimer = () => { + const timer = globalState.timeout; + return timer && (timer.running ? stopTimer() : resumeTimer()); + }; + /** + * Increase timer. Returns number of milliseconds of an updated timer. + * If `timer` parameter isn't set, returns undefined. + */ + + const increaseTimer = n => { + if (globalState.timeout) { + const remaining = globalState.timeout.increase(n); + animateTimerProgressBar(remaining, true); + return remaining; + } + }; + /** + * Check if timer is running. Returns true if timer is running + * or false if timer is paused or stopped. + * If `timer` parameter isn't set, returns undefined + */ + + const isTimerRunning = () => { + return globalState.timeout && globalState.timeout.isRunning(); + }; + + let bodyClickListenerAdded = false; + const clickHandlers = {}; + function bindClickHandler(attr = 'data-swal-template') { + clickHandlers[attr] = this; + + if (!bodyClickListenerAdded) { + document.body.addEventListener('click', bodyClickListener); + bodyClickListenerAdded = true; + } + } + + const bodyClickListener = event => { + // TODO: replace with event.composedPath() + for (let el = event.target; el && el !== document; el = el.parentNode) { + for (const attr in clickHandlers) { + const template = el.getAttribute(attr); + + if (template) { + clickHandlers[attr].fire({ + template + }); + return; + } + } + } + }; + + const defaultParams = { + title: '', + titleText: '', + text: '', + html: '', + footer: '', + icon: undefined, + iconColor: undefined, + iconHtml: undefined, + template: undefined, + toast: false, + showClass: { + popup: 'swal2-show', + backdrop: 'swal2-backdrop-show', + icon: 'swal2-icon-show' + }, + hideClass: { + popup: 'swal2-hide', + backdrop: 'swal2-backdrop-hide', + icon: 'swal2-icon-hide' + }, + customClass: {}, + target: 'body', + backdrop: true, + heightAuto: true, + allowOutsideClick: true, + allowEscapeKey: true, + allowEnterKey: true, + stopKeydownPropagation: true, + keydownListenerCapture: false, + showConfirmButton: true, + showDenyButton: false, + showCancelButton: false, + preConfirm: undefined, + preDeny: undefined, + confirmButtonText: 'OK', + confirmButtonAriaLabel: '', + confirmButtonColor: undefined, + denyButtonText: 'No', + denyButtonAriaLabel: '', + denyButtonColor: undefined, + cancelButtonText: 'Cancel', + cancelButtonAriaLabel: '', + cancelButtonColor: undefined, + buttonsStyling: true, + reverseButtons: false, + focusConfirm: true, + focusDeny: false, + focusCancel: false, + returnFocus: true, + showCloseButton: false, + closeButtonHtml: '×', + closeButtonAriaLabel: 'Close this dialog', + loaderHtml: '', + showLoaderOnConfirm: false, + showLoaderOnDeny: false, + imageUrl: undefined, + imageWidth: undefined, + imageHeight: undefined, + imageAlt: '', + timer: undefined, + timerProgressBar: false, + width: undefined, + padding: undefined, + background: undefined, + input: undefined, + inputPlaceholder: '', + inputLabel: '', + inputValue: '', + inputOptions: {}, + inputAutoTrim: true, + inputAttributes: {}, + inputValidator: undefined, + returnInputValueOnDeny: false, + validationMessage: undefined, + grow: false, + position: 'center', + progressSteps: [], + currentProgressStep: undefined, + progressStepsDistance: undefined, + willOpen: undefined, + didOpen: undefined, + didRender: undefined, + willClose: undefined, + didClose: undefined, + didDestroy: undefined, + scrollbarPadding: true + }; + const updatableParams = ['allowEscapeKey', 'allowOutsideClick', 'background', 'buttonsStyling', 'cancelButtonAriaLabel', 'cancelButtonColor', 'cancelButtonText', 'closeButtonAriaLabel', 'closeButtonHtml', 'confirmButtonAriaLabel', 'confirmButtonColor', 'confirmButtonText', 'currentProgressStep', 'customClass', 'denyButtonAriaLabel', 'denyButtonColor', 'denyButtonText', 'didClose', 'didDestroy', 'footer', 'hideClass', 'html', 'icon', 'iconColor', 'iconHtml', 'imageAlt', 'imageHeight', 'imageUrl', 'imageWidth', 'preConfirm', 'preDeny', 'progressSteps', 'returnFocus', 'reverseButtons', 'showCancelButton', 'showCloseButton', 'showConfirmButton', 'showDenyButton', 'text', 'title', 'titleText', 'willClose']; + const deprecatedParams = {}; + const toastIncompatibleParams = ['allowOutsideClick', 'allowEnterKey', 'backdrop', 'focusConfirm', 'focusDeny', 'focusCancel', 'returnFocus', 'heightAuto', 'keydownListenerCapture']; + /** + * Is valid parameter + * @param {String} paramName + */ + + const isValidParameter = paramName => { + return Object.prototype.hasOwnProperty.call(defaultParams, paramName); + }; + /** + * Is valid parameter for Swal.update() method + * @param {String} paramName + */ + + const isUpdatableParameter = paramName => { + return updatableParams.indexOf(paramName) !== -1; + }; + /** + * Is deprecated parameter + * @param {String} paramName + */ + + const isDeprecatedParameter = paramName => { + return deprecatedParams[paramName]; + }; + + const checkIfParamIsValid = param => { + if (!isValidParameter(param)) { + warn("Unknown parameter \"".concat(param, "\"")); + } + }; + + const checkIfToastParamIsValid = param => { + if (toastIncompatibleParams.includes(param)) { + warn("The parameter \"".concat(param, "\" is incompatible with toasts")); + } + }; + + const checkIfParamIsDeprecated = param => { + if (isDeprecatedParameter(param)) { + warnAboutDeprecation(param, isDeprecatedParameter(param)); + } + }; + /** + * Show relevant warnings for given params + * + * @param params + */ + + + const showWarningsForParams = params => { + if (!params.backdrop && params.allowOutsideClick) { + warn('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`'); + } + + for (const param in params) { + checkIfParamIsValid(param); + + if (params.toast) { + checkIfToastParamIsValid(param); + } + + checkIfParamIsDeprecated(param); + } + }; + + + + var staticMethods = /*#__PURE__*/Object.freeze({ + isValidParameter: isValidParameter, + isUpdatableParameter: isUpdatableParameter, + isDeprecatedParameter: isDeprecatedParameter, + argsToParams: argsToParams, + isVisible: isVisible$1, + clickConfirm: clickConfirm, + clickDeny: clickDeny, + clickCancel: clickCancel, + getContainer: getContainer, + getPopup: getPopup, + getTitle: getTitle, + getHtmlContainer: getHtmlContainer, + getImage: getImage, + getIcon: getIcon, + getInputLabel: getInputLabel, + getCloseButton: getCloseButton, + getActions: getActions, + getConfirmButton: getConfirmButton, + getDenyButton: getDenyButton, + getCancelButton: getCancelButton, + getLoader: getLoader, + getFooter: getFooter, + getTimerProgressBar: getTimerProgressBar, + getFocusableElements: getFocusableElements, + getValidationMessage: getValidationMessage, + isLoading: isLoading, + fire: fire, + mixin: mixin, + showLoading: showLoading, + enableLoading: showLoading, + getTimerLeft: getTimerLeft, + stopTimer: stopTimer, + resumeTimer: resumeTimer, + toggleTimer: toggleTimer, + increaseTimer: increaseTimer, + isTimerRunning: isTimerRunning, + bindClickHandler: bindClickHandler + }); + + /** + * Hides loader and shows back the button which was hidden by .showLoading() + */ + + function hideLoading() { + // do nothing if popup is closed + const innerParams = privateProps.innerParams.get(this); + + if (!innerParams) { + return; + } + + const domCache = privateProps.domCache.get(this); + hide(domCache.loader); + + if (isToast()) { + if (innerParams.icon) { + show(getIcon()); + } + } else { + showRelatedButton(domCache); + } + + removeClass([domCache.popup, domCache.actions], swalClasses.loading); + domCache.popup.removeAttribute('aria-busy'); + domCache.popup.removeAttribute('data-loading'); + domCache.confirmButton.disabled = false; + domCache.denyButton.disabled = false; + domCache.cancelButton.disabled = false; + } + + const showRelatedButton = domCache => { + const buttonToReplace = domCache.popup.getElementsByClassName(domCache.loader.getAttribute('data-button-to-replace')); + + if (buttonToReplace.length) { + show(buttonToReplace[0], 'inline-block'); + } else if (allButtonsAreHidden()) { + hide(domCache.actions); + } + }; + + function getInput$1(instance) { + const innerParams = privateProps.innerParams.get(instance || this); + const domCache = privateProps.domCache.get(instance || this); + + if (!domCache) { + return null; + } + + return getInput(domCache.popup, innerParams.input); + } + + const fixScrollbar = () => { + // for queues, do not do this more than once + if (states.previousBodyPadding !== null) { + return; + } // if the body has overflow + + + if (document.body.scrollHeight > window.innerHeight) { + // add padding so the content doesn't shift after removal of scrollbar + states.previousBodyPadding = parseInt(window.getComputedStyle(document.body).getPropertyValue('padding-right')); + document.body.style.paddingRight = "".concat(states.previousBodyPadding + measureScrollbar(), "px"); + } + }; + const undoScrollbar = () => { + if (states.previousBodyPadding !== null) { + document.body.style.paddingRight = "".concat(states.previousBodyPadding, "px"); + states.previousBodyPadding = null; + } + }; + + /* istanbul ignore file */ + + const iOSfix = () => { + const iOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream || navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1; + + if (iOS && !hasClass(document.body, swalClasses.iosfix)) { + const offset = document.body.scrollTop; + document.body.style.top = "".concat(offset * -1, "px"); + addClass(document.body, swalClasses.iosfix); + lockBodyScroll(); + addBottomPaddingForTallPopups(); // #1948 + } + }; + + const addBottomPaddingForTallPopups = () => { + const safari = !navigator.userAgent.match(/(CriOS|FxiOS|EdgiOS|YaBrowser|UCBrowser)/i); + + if (safari) { + const bottomPanelHeight = 44; + + if (getPopup().scrollHeight > window.innerHeight - bottomPanelHeight) { + getContainer().style.paddingBottom = "".concat(bottomPanelHeight, "px"); + } + } + }; + + const lockBodyScroll = () => { + // #1246 + const container = getContainer(); + let preventTouchMove; + + container.ontouchstart = e => { + preventTouchMove = shouldPreventTouchMove(e); + }; + + container.ontouchmove = e => { + if (preventTouchMove) { + e.preventDefault(); + e.stopPropagation(); + } + }; + }; + + const shouldPreventTouchMove = event => { + const target = event.target; + const container = getContainer(); + + if (isStylys(event) || isZoom(event)) { + return false; + } + + if (target === container) { + return true; + } + + if (!isScrollable(container) && target.tagName !== 'INPUT' && // #1603 + target.tagName !== 'TEXTAREA' && // #2266 + !(isScrollable(getHtmlContainer()) && // #1944 + getHtmlContainer().contains(target))) { + return true; + } + + return false; + }; + + const isStylys = event => { + // #1786 + return event.touches && event.touches.length && event.touches[0].touchType === 'stylus'; + }; + + const isZoom = event => { + // #1891 + return event.touches && event.touches.length > 1; + }; + + const undoIOSfix = () => { + if (hasClass(document.body, swalClasses.iosfix)) { + const offset = parseInt(document.body.style.top, 10); + removeClass(document.body, swalClasses.iosfix); + document.body.style.top = ''; + document.body.scrollTop = offset * -1; + } + }; + + // Adding aria-hidden="true" to elements outside of the active modal dialog ensures that + // elements not within the active modal dialog will not be surfaced if a user opens a screen + // reader’s list of elements (headings, form controls, landmarks, etc.) in the document. + + const setAriaHidden = () => { + const bodyChildren = toArray(document.body.children); + bodyChildren.forEach(el => { + if (el === getContainer() || el.contains(getContainer())) { + return; + } + + if (el.hasAttribute('aria-hidden')) { + el.setAttribute('data-previous-aria-hidden', el.getAttribute('aria-hidden')); + } + + el.setAttribute('aria-hidden', 'true'); + }); + }; + const unsetAriaHidden = () => { + const bodyChildren = toArray(document.body.children); + bodyChildren.forEach(el => { + if (el.hasAttribute('data-previous-aria-hidden')) { + el.setAttribute('aria-hidden', el.getAttribute('data-previous-aria-hidden')); + el.removeAttribute('data-previous-aria-hidden'); + } else { + el.removeAttribute('aria-hidden'); + } + }); + }; + + /** + * This module containts `WeakMap`s for each effectively-"private property" that a `Swal` has. + * For example, to set the private property "foo" of `this` to "bar", you can `privateProps.foo.set(this, 'bar')` + * This is the approach that Babel will probably take to implement private methods/fields + * https://github.com/tc39/proposal-private-methods + * https://github.com/babel/babel/pull/7555 + * Once we have the changes from that PR in Babel, and our core class fits reasonable in *one module* + * then we can use that language feature. + */ + var privateMethods = { + swalPromiseResolve: new WeakMap() + }; + + /* + * Instance method to close sweetAlert + */ + + function removePopupAndResetState(instance, container, returnFocus, didClose) { + if (isToast()) { + triggerDidCloseAndDispose(instance, didClose); + } else { + restoreActiveElement(returnFocus).then(() => triggerDidCloseAndDispose(instance, didClose)); + globalState.keydownTarget.removeEventListener('keydown', globalState.keydownHandler, { + capture: globalState.keydownListenerCapture + }); + globalState.keydownHandlerAdded = false; + } + + const isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent); // workaround for #2088 + // for some reason removing the container in Safari will scroll the document to bottom + + if (isSafari) { + container.setAttribute('style', 'display:none !important'); + container.removeAttribute('class'); + container.innerHTML = ''; + } else { + container.remove(); + } + + if (isModal()) { + undoScrollbar(); + undoIOSfix(); + unsetAriaHidden(); + } + + removeBodyClasses(); + } + + function removeBodyClasses() { + removeClass([document.documentElement, document.body], [swalClasses.shown, swalClasses['height-auto'], swalClasses['no-backdrop'], swalClasses['toast-shown']]); + } + + function close(resolveValue) { + const popup = getPopup(); + + if (!popup) { + return; + } + + resolveValue = prepareResolveValue(resolveValue); + const innerParams = privateProps.innerParams.get(this); + + if (!innerParams || hasClass(popup, innerParams.hideClass.popup)) { + return; + } + + const swalPromiseResolve = privateMethods.swalPromiseResolve.get(this); + removeClass(popup, innerParams.showClass.popup); + addClass(popup, innerParams.hideClass.popup); + const backdrop = getContainer(); + removeClass(backdrop, innerParams.showClass.backdrop); + addClass(backdrop, innerParams.hideClass.backdrop); + handlePopupAnimation(this, popup, innerParams); // Resolve Swal promise + + swalPromiseResolve(resolveValue); + } + + const prepareResolveValue = resolveValue => { + // When user calls Swal.close() + if (typeof resolveValue === 'undefined') { + return { + isConfirmed: false, + isDenied: false, + isDismissed: true + }; + } + + return Object.assign({ + isConfirmed: false, + isDenied: false, + isDismissed: false + }, resolveValue); + }; + + const handlePopupAnimation = (instance, popup, innerParams) => { + const container = getContainer(); // If animation is supported, animate + + const animationIsSupported = animationEndEvent && hasCssAnimation(popup); + + if (typeof innerParams.willClose === 'function') { + innerParams.willClose(popup); + } + + if (animationIsSupported) { + animatePopup(instance, popup, container, innerParams.returnFocus, innerParams.didClose); + } else { + // Otherwise, remove immediately + removePopupAndResetState(instance, container, innerParams.returnFocus, innerParams.didClose); + } + }; + + const animatePopup = (instance, popup, container, returnFocus, didClose) => { + globalState.swalCloseEventFinishedCallback = removePopupAndResetState.bind(null, instance, container, returnFocus, didClose); + popup.addEventListener(animationEndEvent, function (e) { + if (e.target === popup) { + globalState.swalCloseEventFinishedCallback(); + delete globalState.swalCloseEventFinishedCallback; + } + }); + }; + + const triggerDidCloseAndDispose = (instance, didClose) => { + setTimeout(() => { + if (typeof didClose === 'function') { + didClose.bind(instance.params)(); + } + + instance._destroy(); + }); + }; + + function setButtonsDisabled(instance, buttons, disabled) { + const domCache = privateProps.domCache.get(instance); + buttons.forEach(button => { + domCache[button].disabled = disabled; + }); + } + + function setInputDisabled(input, disabled) { + if (!input) { + return false; + } + + if (input.type === 'radio') { + const radiosContainer = input.parentNode.parentNode; + const radios = radiosContainer.querySelectorAll('input'); + + for (let i = 0; i < radios.length; i++) { + radios[i].disabled = disabled; + } + } else { + input.disabled = disabled; + } + } + + function enableButtons() { + setButtonsDisabled(this, ['confirmButton', 'denyButton', 'cancelButton'], false); + } + function disableButtons() { + setButtonsDisabled(this, ['confirmButton', 'denyButton', 'cancelButton'], true); + } + function enableInput() { + return setInputDisabled(this.getInput(), false); + } + function disableInput() { + return setInputDisabled(this.getInput(), true); + } + + function showValidationMessage(error) { + const domCache = privateProps.domCache.get(this); + const params = privateProps.innerParams.get(this); + setInnerHtml(domCache.validationMessage, error); + domCache.validationMessage.className = swalClasses['validation-message']; + + if (params.customClass && params.customClass.validationMessage) { + addClass(domCache.validationMessage, params.customClass.validationMessage); + } + + show(domCache.validationMessage); + const input = this.getInput(); + + if (input) { + input.setAttribute('aria-invalid', true); + input.setAttribute('aria-describedby', swalClasses['validation-message']); + focusInput(input); + addClass(input, swalClasses.inputerror); + } + } // Hide block with validation message + + function resetValidationMessage$1() { + const domCache = privateProps.domCache.get(this); + + if (domCache.validationMessage) { + hide(domCache.validationMessage); + } + + const input = this.getInput(); + + if (input) { + input.removeAttribute('aria-invalid'); + input.removeAttribute('aria-describedby'); + removeClass(input, swalClasses.inputerror); + } + } + + function getProgressSteps$1() { + const domCache = privateProps.domCache.get(this); + return domCache.progressSteps; + } + + class Timer { + constructor(callback, delay) { + this.callback = callback; + this.remaining = delay; + this.running = false; + this.start(); + } + + start() { + if (!this.running) { + this.running = true; + this.started = new Date(); + this.id = setTimeout(this.callback, this.remaining); + } + + return this.remaining; + } + + stop() { + if (this.running) { + this.running = false; + clearTimeout(this.id); + this.remaining -= new Date() - this.started; + } + + return this.remaining; + } + + increase(n) { + const running = this.running; + + if (running) { + this.stop(); + } + + this.remaining += n; + + if (running) { + this.start(); + } + + return this.remaining; + } + + getTimerLeft() { + if (this.running) { + this.stop(); + this.start(); + } + + return this.remaining; + } + + isRunning() { + return this.running; + } + + } + + var defaultInputValidators = { + email: (string, validationMessage) => { + return /^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]{2,24}$/.test(string) ? Promise.resolve() : Promise.resolve(validationMessage || 'Invalid email address'); + }, + url: (string, validationMessage) => { + // taken from https://stackoverflow.com/a/3809435 with a small change from #1306 and #2013 + return /^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(string) ? Promise.resolve() : Promise.resolve(validationMessage || 'Invalid URL'); + } + }; + + function setDefaultInputValidators(params) { + // Use default `inputValidator` for supported input types if not provided + if (!params.inputValidator) { + Object.keys(defaultInputValidators).forEach(key => { + if (params.input === key) { + params.inputValidator = defaultInputValidators[key]; + } + }); + } + } + + function validateCustomTargetElement(params) { + // Determine if the custom target element is valid + if (!params.target || typeof params.target === 'string' && !document.querySelector(params.target) || typeof params.target !== 'string' && !params.target.appendChild) { + warn('Target parameter is not valid, defaulting to "body"'); + params.target = 'body'; + } + } + /** + * Set type, text and actions on popup + * + * @param params + * @returns {boolean} + */ + + + function setParameters(params) { + setDefaultInputValidators(params); // showLoaderOnConfirm && preConfirm + + if (params.showLoaderOnConfirm && !params.preConfirm) { + warn('showLoaderOnConfirm is set to true, but preConfirm is not defined.\n' + 'showLoaderOnConfirm should be used together with preConfirm, see usage example:\n' + 'https://sweetalert2.github.io/#ajax-request'); + } + + validateCustomTargetElement(params); // Replace newlines with
                                                        in title + + if (typeof params.title === 'string') { + params.title = params.title.split('\n').join('
                                                        '); + } + + init(params); + } + + const swalStringParams = ['swal-title', 'swal-html', 'swal-footer']; + const getTemplateParams = params => { + const template = typeof params.template === 'string' ? document.querySelector(params.template) : params.template; + + if (!template) { + return {}; + } + + const templateContent = template.content; + showWarningsForElements(templateContent); + const result = Object.assign(getSwalParams(templateContent), getSwalButtons(templateContent), getSwalImage(templateContent), getSwalIcon(templateContent), getSwalInput(templateContent), getSwalStringParams(templateContent, swalStringParams)); + return result; + }; + + const getSwalParams = templateContent => { + const result = {}; + toArray(templateContent.querySelectorAll('swal-param')).forEach(param => { + showWarningsForAttributes(param, ['name', 'value']); + const paramName = param.getAttribute('name'); + let value = param.getAttribute('value'); + + if (typeof defaultParams[paramName] === 'boolean' && value === 'false') { + value = false; + } + + if (typeof defaultParams[paramName] === 'object') { + value = JSON.parse(value); + } + + result[paramName] = value; + }); + return result; + }; + + const getSwalButtons = templateContent => { + const result = {}; + toArray(templateContent.querySelectorAll('swal-button')).forEach(button => { + showWarningsForAttributes(button, ['type', 'color', 'aria-label']); + const type = button.getAttribute('type'); + result["".concat(type, "ButtonText")] = button.innerHTML; + result["show".concat(capitalizeFirstLetter(type), "Button")] = true; + + if (button.hasAttribute('color')) { + result["".concat(type, "ButtonColor")] = button.getAttribute('color'); + } + + if (button.hasAttribute('aria-label')) { + result["".concat(type, "ButtonAriaLabel")] = button.getAttribute('aria-label'); + } + }); + return result; + }; + + const getSwalImage = templateContent => { + const result = {}; + const image = templateContent.querySelector('swal-image'); + + if (image) { + showWarningsForAttributes(image, ['src', 'width', 'height', 'alt']); + + if (image.hasAttribute('src')) { + result.imageUrl = image.getAttribute('src'); + } + + if (image.hasAttribute('width')) { + result.imageWidth = image.getAttribute('width'); + } + + if (image.hasAttribute('height')) { + result.imageHeight = image.getAttribute('height'); + } + + if (image.hasAttribute('alt')) { + result.imageAlt = image.getAttribute('alt'); + } + } + + return result; + }; + + const getSwalIcon = templateContent => { + const result = {}; + const icon = templateContent.querySelector('swal-icon'); + + if (icon) { + showWarningsForAttributes(icon, ['type', 'color']); + + if (icon.hasAttribute('type')) { + result.icon = icon.getAttribute('type'); + } + + if (icon.hasAttribute('color')) { + result.iconColor = icon.getAttribute('color'); + } + + result.iconHtml = icon.innerHTML; + } + + return result; + }; + + const getSwalInput = templateContent => { + const result = {}; + const input = templateContent.querySelector('swal-input'); + + if (input) { + showWarningsForAttributes(input, ['type', 'label', 'placeholder', 'value']); + result.input = input.getAttribute('type') || 'text'; + + if (input.hasAttribute('label')) { + result.inputLabel = input.getAttribute('label'); + } + + if (input.hasAttribute('placeholder')) { + result.inputPlaceholder = input.getAttribute('placeholder'); + } + + if (input.hasAttribute('value')) { + result.inputValue = input.getAttribute('value'); + } + } + + const inputOptions = templateContent.querySelectorAll('swal-input-option'); + + if (inputOptions.length) { + result.inputOptions = {}; + toArray(inputOptions).forEach(option => { + showWarningsForAttributes(option, ['value']); + const optionValue = option.getAttribute('value'); + const optionName = option.innerHTML; + result.inputOptions[optionValue] = optionName; + }); + } + + return result; + }; + + const getSwalStringParams = (templateContent, paramNames) => { + const result = {}; + + for (const i in paramNames) { + const paramName = paramNames[i]; + const tag = templateContent.querySelector(paramName); + + if (tag) { + showWarningsForAttributes(tag, []); + result[paramName.replace(/^swal-/, '')] = tag.innerHTML.trim(); + } + } + + return result; + }; + + const showWarningsForElements = template => { + const allowedElements = swalStringParams.concat(['swal-param', 'swal-button', 'swal-image', 'swal-icon', 'swal-input', 'swal-input-option']); + toArray(template.children).forEach(el => { + const tagName = el.tagName.toLowerCase(); + + if (allowedElements.indexOf(tagName) === -1) { + warn("Unrecognized element <".concat(tagName, ">")); + } + }); + }; + + const showWarningsForAttributes = (el, allowedAttributes) => { + toArray(el.attributes).forEach(attribute => { + if (allowedAttributes.indexOf(attribute.name) === -1) { + warn(["Unrecognized attribute \"".concat(attribute.name, "\" on <").concat(el.tagName.toLowerCase(), ">."), "".concat(allowedAttributes.length ? "Allowed attributes are: ".concat(allowedAttributes.join(', ')) : 'To set the value, use HTML within the element.')]); + } + }); + }; + + const SHOW_CLASS_TIMEOUT = 10; + /** + * Open popup, add necessary classes and styles, fix scrollbar + * + * @param params + */ + + const openPopup = params => { + const container = getContainer(); + const popup = getPopup(); + + if (typeof params.willOpen === 'function') { + params.willOpen(popup); + } + + const bodyStyles = window.getComputedStyle(document.body); + const initialBodyOverflow = bodyStyles.overflowY; + addClasses$1(container, popup, params); // scrolling is 'hidden' until animation is done, after that 'auto' + + setTimeout(() => { + setScrollingVisibility(container, popup); + }, SHOW_CLASS_TIMEOUT); + + if (isModal()) { + fixScrollContainer(container, params.scrollbarPadding, initialBodyOverflow); + setAriaHidden(); + } + + if (!isToast() && !globalState.previousActiveElement) { + globalState.previousActiveElement = document.activeElement; + } + + if (typeof params.didOpen === 'function') { + setTimeout(() => params.didOpen(popup)); + } + + removeClass(container, swalClasses['no-transition']); + }; + + const swalOpenAnimationFinished = event => { + const popup = getPopup(); + + if (event.target !== popup) { + return; + } + + const container = getContainer(); + popup.removeEventListener(animationEndEvent, swalOpenAnimationFinished); + container.style.overflowY = 'auto'; + }; + + const setScrollingVisibility = (container, popup) => { + if (animationEndEvent && hasCssAnimation(popup)) { + container.style.overflowY = 'hidden'; + popup.addEventListener(animationEndEvent, swalOpenAnimationFinished); + } else { + container.style.overflowY = 'auto'; + } + }; + + const fixScrollContainer = (container, scrollbarPadding, initialBodyOverflow) => { + iOSfix(); + + if (scrollbarPadding && initialBodyOverflow !== 'hidden') { + fixScrollbar(); + } // sweetalert2/issues/1247 + + + setTimeout(() => { + container.scrollTop = 0; + }); + }; + + const addClasses$1 = (container, popup, params) => { + addClass(container, params.showClass.backdrop); // the workaround with setting/unsetting opacity is needed for #2019 and 2059 + + popup.style.setProperty('opacity', '0', 'important'); + show(popup, 'grid'); + setTimeout(() => { + // Animate popup right after showing it + addClass(popup, params.showClass.popup); // and remove the opacity workaround + + popup.style.removeProperty('opacity'); + }, SHOW_CLASS_TIMEOUT); // 10ms in order to fix #2062 + + addClass([document.documentElement, document.body], swalClasses.shown); + + if (params.heightAuto && params.backdrop && !params.toast) { + addClass([document.documentElement, document.body], swalClasses['height-auto']); + } + }; + + const handleInputOptionsAndValue = (instance, params) => { + if (params.input === 'select' || params.input === 'radio') { + handleInputOptions(instance, params); + } else if (['text', 'email', 'number', 'tel', 'textarea'].includes(params.input) && (hasToPromiseFn(params.inputValue) || isPromise(params.inputValue))) { + showLoading(getConfirmButton()); + handleInputValue(instance, params); + } + }; + const getInputValue = (instance, innerParams) => { + const input = instance.getInput(); + + if (!input) { + return null; + } + + switch (innerParams.input) { + case 'checkbox': + return getCheckboxValue(input); + + case 'radio': + return getRadioValue(input); + + case 'file': + return getFileValue(input); + + default: + return innerParams.inputAutoTrim ? input.value.trim() : input.value; + } + }; + + const getCheckboxValue = input => input.checked ? 1 : 0; + + const getRadioValue = input => input.checked ? input.value : null; + + const getFileValue = input => input.files.length ? input.getAttribute('multiple') !== null ? input.files : input.files[0] : null; + + const handleInputOptions = (instance, params) => { + const popup = getPopup(); + + const processInputOptions = inputOptions => populateInputOptions[params.input](popup, formatInputOptions(inputOptions), params); + + if (hasToPromiseFn(params.inputOptions) || isPromise(params.inputOptions)) { + showLoading(getConfirmButton()); + asPromise(params.inputOptions).then(inputOptions => { + instance.hideLoading(); + processInputOptions(inputOptions); + }); + } else if (typeof params.inputOptions === 'object') { + processInputOptions(params.inputOptions); + } else { + error("Unexpected type of inputOptions! Expected object, Map or Promise, got ".concat(typeof params.inputOptions)); + } + }; + + const handleInputValue = (instance, params) => { + const input = instance.getInput(); + hide(input); + asPromise(params.inputValue).then(inputValue => { + input.value = params.input === 'number' ? parseFloat(inputValue) || 0 : "".concat(inputValue); + show(input); + input.focus(); + instance.hideLoading(); + }).catch(err => { + error("Error in inputValue promise: ".concat(err)); + input.value = ''; + show(input); + input.focus(); + instance.hideLoading(); + }); + }; + + const populateInputOptions = { + select: (popup, inputOptions, params) => { + const select = getChildByClass(popup, swalClasses.select); + + const renderOption = (parent, optionLabel, optionValue) => { + const option = document.createElement('option'); + option.value = optionValue; + setInnerHtml(option, optionLabel); + option.selected = isSelected(optionValue, params.inputValue); + parent.appendChild(option); + }; + + inputOptions.forEach(inputOption => { + const optionValue = inputOption[0]; + const optionLabel = inputOption[1]; // spec: + // https://www.w3.org/TR/html401/interact/forms.html#h-17.6 + // "...all OPTGROUP elements must be specified directly within a SELECT element (i.e., groups may not be nested)..." + // check whether this is a + + if (Array.isArray(optionLabel)) { + // if it is an array, then it is an + const optgroup = document.createElement('optgroup'); + optgroup.label = optionValue; + optgroup.disabled = false; // not configurable for now + + select.appendChild(optgroup); + optionLabel.forEach(o => renderOption(optgroup, o[1], o[0])); + } else { + // case of + valueFormatted = formatInputOptions(valueFormatted); + } + + result.push([key, valueFormatted]); + }); + } else { + Object.keys(inputOptions).forEach(key => { + let valueFormatted = inputOptions[key]; + + if (typeof valueFormatted === 'object') { + // case of + valueFormatted = formatInputOptions(valueFormatted); + } + + result.push([key, valueFormatted]); + }); + } + + return result; + }; + + const isSelected = (optionValue, inputValue) => { + return inputValue && inputValue.toString() === optionValue.toString(); + }; + + const handleConfirmButtonClick = instance => { + const innerParams = privateProps.innerParams.get(instance); + instance.disableButtons(); + + if (innerParams.input) { + handleConfirmOrDenyWithInput(instance, 'confirm'); + } else { + confirm(instance, true); + } + }; + const handleDenyButtonClick = instance => { + const innerParams = privateProps.innerParams.get(instance); + instance.disableButtons(); + + if (innerParams.returnInputValueOnDeny) { + handleConfirmOrDenyWithInput(instance, 'deny'); + } else { + deny(instance, false); + } + }; + const handleCancelButtonClick = (instance, dismissWith) => { + instance.disableButtons(); + dismissWith(DismissReason.cancel); + }; + + const handleConfirmOrDenyWithInput = (instance, type + /* 'confirm' | 'deny' */ + ) => { + const innerParams = privateProps.innerParams.get(instance); + const inputValue = getInputValue(instance, innerParams); + + if (innerParams.inputValidator) { + handleInputValidator(instance, inputValue, type); + } else if (!instance.getInput().checkValidity()) { + instance.enableButtons(); + instance.showValidationMessage(innerParams.validationMessage); + } else if (type === 'deny') { + deny(instance, inputValue); + } else { + confirm(instance, inputValue); + } + }; + + const handleInputValidator = (instance, inputValue, type + /* 'confirm' | 'deny' */ + ) => { + const innerParams = privateProps.innerParams.get(instance); + instance.disableInput(); + const validationPromise = Promise.resolve().then(() => asPromise(innerParams.inputValidator(inputValue, innerParams.validationMessage))); + validationPromise.then(validationMessage => { + instance.enableButtons(); + instance.enableInput(); + + if (validationMessage) { + instance.showValidationMessage(validationMessage); + } else if (type === 'deny') { + deny(instance, inputValue); + } else { + confirm(instance, inputValue); + } + }); + }; + + const deny = (instance, value) => { + const innerParams = privateProps.innerParams.get(instance || undefined); + + if (innerParams.showLoaderOnDeny) { + showLoading(getDenyButton()); + } + + if (innerParams.preDeny) { + const preDenyPromise = Promise.resolve().then(() => asPromise(innerParams.preDeny(value, innerParams.validationMessage))); + preDenyPromise.then(preDenyValue => { + if (preDenyValue === false) { + instance.hideLoading(); + } else { + instance.closePopup({ + isDenied: true, + value: typeof preDenyValue === 'undefined' ? value : preDenyValue + }); + } + }); + } else { + instance.closePopup({ + isDenied: true, + value + }); + } + }; + + const succeedWith = (instance, value) => { + instance.closePopup({ + isConfirmed: true, + value + }); + }; + + const confirm = (instance, value) => { + const innerParams = privateProps.innerParams.get(instance || undefined); + + if (innerParams.showLoaderOnConfirm) { + showLoading(); // TODO: make showLoading an *instance* method + } + + if (innerParams.preConfirm) { + instance.resetValidationMessage(); + const preConfirmPromise = Promise.resolve().then(() => asPromise(innerParams.preConfirm(value, innerParams.validationMessage))); + preConfirmPromise.then(preConfirmValue => { + if (isVisible(getValidationMessage()) || preConfirmValue === false) { + instance.hideLoading(); + } else { + succeedWith(instance, typeof preConfirmValue === 'undefined' ? value : preConfirmValue); + } + }); + } else { + succeedWith(instance, value); + } + }; + + const addKeydownHandler = (instance, globalState, innerParams, dismissWith) => { + if (globalState.keydownTarget && globalState.keydownHandlerAdded) { + globalState.keydownTarget.removeEventListener('keydown', globalState.keydownHandler, { + capture: globalState.keydownListenerCapture + }); + globalState.keydownHandlerAdded = false; + } + + if (!innerParams.toast) { + globalState.keydownHandler = e => keydownHandler(instance, e, dismissWith); + + globalState.keydownTarget = innerParams.keydownListenerCapture ? window : getPopup(); + globalState.keydownListenerCapture = innerParams.keydownListenerCapture; + globalState.keydownTarget.addEventListener('keydown', globalState.keydownHandler, { + capture: globalState.keydownListenerCapture + }); + globalState.keydownHandlerAdded = true; + } + }; // Focus handling + + const setFocus = (innerParams, index, increment) => { + const focusableElements = getFocusableElements(); // search for visible elements and select the next possible match + + if (focusableElements.length) { + index = index + increment; // rollover to first item + + if (index === focusableElements.length) { + index = 0; // go to last item + } else if (index === -1) { + index = focusableElements.length - 1; + } + + return focusableElements[index].focus(); + } // no visible focusable elements, focus the popup + + + getPopup().focus(); + }; + const arrowKeysNextButton = ['ArrowRight', 'ArrowDown']; + const arrowKeysPreviousButton = ['ArrowLeft', 'ArrowUp']; + + const keydownHandler = (instance, e, dismissWith) => { + const innerParams = privateProps.innerParams.get(instance); + + if (!innerParams) { + return; // This instance has already been destroyed + } + + if (innerParams.stopKeydownPropagation) { + e.stopPropagation(); + } // ENTER + + + if (e.key === 'Enter') { + handleEnter(instance, e, innerParams); // TAB + } else if (e.key === 'Tab') { + handleTab(e, innerParams); // ARROWS - switch focus between buttons + } else if ([...arrowKeysNextButton, ...arrowKeysPreviousButton].includes(e.key)) { + handleArrows(e.key); // ESC + } else if (e.key === 'Escape') { + handleEsc(e, innerParams, dismissWith); + } + }; + + const handleEnter = (instance, e, innerParams) => { + // #720 #721 + if (e.isComposing) { + return; + } + + if (e.target && instance.getInput() && e.target.outerHTML === instance.getInput().outerHTML) { + if (['textarea', 'file'].includes(innerParams.input)) { + return; // do not submit + } + + clickConfirm(); + e.preventDefault(); + } + }; + + const handleTab = (e, innerParams) => { + const targetElement = e.target; + const focusableElements = getFocusableElements(); + let btnIndex = -1; + + for (let i = 0; i < focusableElements.length; i++) { + if (targetElement === focusableElements[i]) { + btnIndex = i; + break; + } + } + + if (!e.shiftKey) { + // Cycle to the next button + setFocus(innerParams, btnIndex, 1); + } else { + // Cycle to the prev button + setFocus(innerParams, btnIndex, -1); + } + + e.stopPropagation(); + e.preventDefault(); + }; + + const handleArrows = key => { + const confirmButton = getConfirmButton(); + const denyButton = getDenyButton(); + const cancelButton = getCancelButton(); + + if (![confirmButton, denyButton, cancelButton].includes(document.activeElement)) { + return; + } + + const sibling = arrowKeysNextButton.includes(key) ? 'nextElementSibling' : 'previousElementSibling'; + const buttonToFocus = document.activeElement[sibling]; + + if (buttonToFocus) { + buttonToFocus.focus(); + } + }; + + const handleEsc = (e, innerParams, dismissWith) => { + if (callIfFunction(innerParams.allowEscapeKey)) { + e.preventDefault(); + dismissWith(DismissReason.esc); + } + }; + + const handlePopupClick = (instance, domCache, dismissWith) => { + const innerParams = privateProps.innerParams.get(instance); + + if (innerParams.toast) { + handleToastClick(instance, domCache, dismissWith); + } else { + // Ignore click events that had mousedown on the popup but mouseup on the container + // This can happen when the user drags a slider + handleModalMousedown(domCache); // Ignore click events that had mousedown on the container but mouseup on the popup + + handleContainerMousedown(domCache); + handleModalClick(instance, domCache, dismissWith); + } + }; + + const handleToastClick = (instance, domCache, dismissWith) => { + // Closing toast by internal click + domCache.popup.onclick = () => { + const innerParams = privateProps.innerParams.get(instance); + + if (innerParams.showConfirmButton || innerParams.showDenyButton || innerParams.showCancelButton || innerParams.showCloseButton || innerParams.timer || innerParams.input) { + return; + } + + dismissWith(DismissReason.close); + }; + }; + + let ignoreOutsideClick = false; + + const handleModalMousedown = domCache => { + domCache.popup.onmousedown = () => { + domCache.container.onmouseup = function (e) { + domCache.container.onmouseup = undefined; // We only check if the mouseup target is the container because usually it doesn't + // have any other direct children aside of the popup + + if (e.target === domCache.container) { + ignoreOutsideClick = true; + } + }; + }; + }; + + const handleContainerMousedown = domCache => { + domCache.container.onmousedown = () => { + domCache.popup.onmouseup = function (e) { + domCache.popup.onmouseup = undefined; // We also need to check if the mouseup target is a child of the popup + + if (e.target === domCache.popup || domCache.popup.contains(e.target)) { + ignoreOutsideClick = true; + } + }; + }; + }; + + const handleModalClick = (instance, domCache, dismissWith) => { + domCache.container.onclick = e => { + const innerParams = privateProps.innerParams.get(instance); + + if (ignoreOutsideClick) { + ignoreOutsideClick = false; + return; + } + + if (e.target === domCache.container && callIfFunction(innerParams.allowOutsideClick)) { + dismissWith(DismissReason.backdrop); + } + }; + }; + + function _main(userParams, mixinParams = {}) { + showWarningsForParams(Object.assign({}, mixinParams, userParams)); + + if (globalState.currentInstance) { + globalState.currentInstance._destroy(); + + if (isModal()) { + unsetAriaHidden(); + } + } + + globalState.currentInstance = this; + const innerParams = prepareParams(userParams, mixinParams); + setParameters(innerParams); + Object.freeze(innerParams); // clear the previous timer + + if (globalState.timeout) { + globalState.timeout.stop(); + delete globalState.timeout; + } // clear the restore focus timeout + + + clearTimeout(globalState.restoreFocusTimeout); + const domCache = populateDomCache(this); + render(this, innerParams); + privateProps.innerParams.set(this, innerParams); + return swalPromise(this, domCache, innerParams); + } + + const prepareParams = (userParams, mixinParams) => { + const templateParams = getTemplateParams(userParams); + const params = Object.assign({}, defaultParams, mixinParams, templateParams, userParams); // precedence is described in #2131 + + params.showClass = Object.assign({}, defaultParams.showClass, params.showClass); + params.hideClass = Object.assign({}, defaultParams.hideClass, params.hideClass); + return params; + }; + + const swalPromise = (instance, domCache, innerParams) => { + return new Promise(resolve => { + // functions to handle all closings/dismissals + const dismissWith = dismiss => { + instance.closePopup({ + isDismissed: true, + dismiss + }); + }; + + privateMethods.swalPromiseResolve.set(instance, resolve); + + domCache.confirmButton.onclick = () => handleConfirmButtonClick(instance); + + domCache.denyButton.onclick = () => handleDenyButtonClick(instance); + + domCache.cancelButton.onclick = () => handleCancelButtonClick(instance, dismissWith); + + domCache.closeButton.onclick = () => dismissWith(DismissReason.close); + + handlePopupClick(instance, domCache, dismissWith); + addKeydownHandler(instance, globalState, innerParams, dismissWith); + handleInputOptionsAndValue(instance, innerParams); + openPopup(innerParams); + setupTimer(globalState, innerParams, dismissWith); + initFocus(domCache, innerParams); // Scroll container to top on open (#1247, #1946) + + setTimeout(() => { + domCache.container.scrollTop = 0; + }); + }); + }; + + const populateDomCache = instance => { + const domCache = { + popup: getPopup(), + container: getContainer(), + actions: getActions(), + confirmButton: getConfirmButton(), + denyButton: getDenyButton(), + cancelButton: getCancelButton(), + loader: getLoader(), + closeButton: getCloseButton(), + validationMessage: getValidationMessage(), + progressSteps: getProgressSteps() + }; + privateProps.domCache.set(instance, domCache); + return domCache; + }; + + const setupTimer = (globalState$$1, innerParams, dismissWith) => { + const timerProgressBar = getTimerProgressBar(); + hide(timerProgressBar); + + if (innerParams.timer) { + globalState$$1.timeout = new Timer(() => { + dismissWith('timer'); + delete globalState$$1.timeout; + }, innerParams.timer); + + if (innerParams.timerProgressBar) { + show(timerProgressBar); + setTimeout(() => { + if (globalState$$1.timeout && globalState$$1.timeout.running) { + // timer can be already stopped or unset at this point + animateTimerProgressBar(innerParams.timer); + } + }); + } + } + }; + + const initFocus = (domCache, innerParams) => { + if (innerParams.toast) { + return; + } + + if (!callIfFunction(innerParams.allowEnterKey)) { + return blurActiveElement(); + } + + if (!focusButton(domCache, innerParams)) { + setFocus(innerParams, -1, 1); + } + }; + + const focusButton = (domCache, innerParams) => { + if (innerParams.focusDeny && isVisible(domCache.denyButton)) { + domCache.denyButton.focus(); + return true; + } + + if (innerParams.focusCancel && isVisible(domCache.cancelButton)) { + domCache.cancelButton.focus(); + return true; + } + + if (innerParams.focusConfirm && isVisible(domCache.confirmButton)) { + domCache.confirmButton.focus(); + return true; + } + + return false; + }; + + const blurActiveElement = () => { + if (document.activeElement && typeof document.activeElement.blur === 'function') { + document.activeElement.blur(); + } + }; + + /** + * Updates popup parameters. + */ + + function update(params) { + const popup = getPopup(); + const innerParams = privateProps.innerParams.get(this); + + if (!popup || hasClass(popup, innerParams.hideClass.popup)) { + return warn("You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup."); + } + + const validUpdatableParams = {}; // assign valid params from `params` to `defaults` + + Object.keys(params).forEach(param => { + if (Swal.isUpdatableParameter(param)) { + validUpdatableParams[param] = params[param]; + } else { + warn("Invalid parameter to update: \"".concat(param, "\". Updatable params are listed here: https://github.com/sweetalert2/sweetalert2/blob/master/src/utils/params.js\n\nIf you think this parameter should be updatable, request it here: https://github.com/sweetalert2/sweetalert2/issues/new?template=02_feature_request.md")); + } + }); + const updatedParams = Object.assign({}, innerParams, validUpdatableParams); + render(this, updatedParams); + privateProps.innerParams.set(this, updatedParams); + Object.defineProperties(this, { + params: { + value: Object.assign({}, this.params, params), + writable: false, + enumerable: true + } + }); + } + + function _destroy() { + const domCache = privateProps.domCache.get(this); + const innerParams = privateProps.innerParams.get(this); + + if (!innerParams) { + return; // This instance has already been destroyed + } // Check if there is another Swal closing + + + if (domCache.popup && globalState.swalCloseEventFinishedCallback) { + globalState.swalCloseEventFinishedCallback(); + delete globalState.swalCloseEventFinishedCallback; + } // Check if there is a swal disposal defer timer + + + if (globalState.deferDisposalTimer) { + clearTimeout(globalState.deferDisposalTimer); + delete globalState.deferDisposalTimer; + } + + if (typeof innerParams.didDestroy === 'function') { + innerParams.didDestroy(); + } + + disposeSwal(this); + } + + const disposeSwal = instance => { + // Unset this.params so GC will dispose it (#1569) + delete instance.params; // Unset globalState props so GC will dispose globalState (#1569) + + delete globalState.keydownHandler; + delete globalState.keydownTarget; // Unset WeakMaps so GC will be able to dispose them (#1569) + + unsetWeakMaps(privateProps); + unsetWeakMaps(privateMethods); // Unset currentInstance + + delete globalState.currentInstance; + }; + + const unsetWeakMaps = obj => { + for (const i in obj) { + obj[i] = new WeakMap(); + } + }; + + + + var instanceMethods = /*#__PURE__*/Object.freeze({ + hideLoading: hideLoading, + disableLoading: hideLoading, + getInput: getInput$1, + close: close, + closePopup: close, + closeModal: close, + closeToast: close, + enableButtons: enableButtons, + disableButtons: disableButtons, + enableInput: enableInput, + disableInput: disableInput, + showValidationMessage: showValidationMessage, + resetValidationMessage: resetValidationMessage$1, + getProgressSteps: getProgressSteps$1, + _main: _main, + update: update, + _destroy: _destroy + }); + + let currentInstance; + + class SweetAlert { + constructor(...args) { + // Prevent run in Node env + if (typeof window === 'undefined') { + return; + } + + currentInstance = this; + const outerParams = Object.freeze(this.constructor.argsToParams(args)); + Object.defineProperties(this, { + params: { + value: outerParams, + writable: false, + enumerable: true, + configurable: true + } + }); + + const promise = this._main(this.params); + + privateProps.promise.set(this, promise); + } // `catch` cannot be the name of a module export, so we define our thenable methods here instead + + + then(onFulfilled) { + const promise = privateProps.promise.get(this); + return promise.then(onFulfilled); + } + + finally(onFinally) { + const promise = privateProps.promise.get(this); + return promise.finally(onFinally); + } + + } // Assign instance methods from src/instanceMethods/*.js to prototype + + + Object.assign(SweetAlert.prototype, instanceMethods); // Assign static methods from src/staticMethods/*.js to constructor + + Object.assign(SweetAlert, staticMethods); // Proxy to instance methods to constructor, for now, for backwards compatibility + + Object.keys(instanceMethods).forEach(key => { + SweetAlert[key] = function (...args) { + if (currentInstance) { + return currentInstance[key](...args); + } + }; + }); + SweetAlert.DismissReason = DismissReason; + SweetAlert.version = '11.1.5'; + + const Swal = SweetAlert; + Swal.default = Swal; + + return Swal; + +})); +if (typeof this !== 'undefined' && this.Sweetalert2){ this.swal = this.sweetAlert = this.Swal = this.SweetAlert = this.Sweetalert2} diff --git a/modules/virtual-file-explorer/app/Volo.Abp.VirtualFileExplorer.DemoApp/wwwroot/libs/sweetalert2/sweetalert2.min.css b/modules/virtual-file-explorer/app/Volo.Abp.VirtualFileExplorer.DemoApp/wwwroot/libs/sweetalert2/sweetalert2.min.css new file mode 100644 index 0000000000..25eb26f1c0 --- /dev/null +++ b/modules/virtual-file-explorer/app/Volo.Abp.VirtualFileExplorer.DemoApp/wwwroot/libs/sweetalert2/sweetalert2.min.css @@ -0,0 +1 @@ +.swal2-popup.swal2-toast{box-sizing:border-box;grid-column:1/4!important;grid-row:1/4!important;grid-template-columns:1fr 99fr 1fr;padding:1em;overflow-y:hidden;background:#fff;box-shadow:0 0 .625em #d9d9d9;pointer-events:all}.swal2-popup.swal2-toast>*{grid-column:2}.swal2-popup.swal2-toast .swal2-title{margin:1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-loading{justify-content:center}.swal2-popup.swal2-toast .swal2-input{height:2em;margin:.5em;font-size:1em}.swal2-popup.swal2-toast .swal2-validation-message{font-size:1em}.swal2-popup.swal2-toast .swal2-footer{margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-popup.swal2-toast .swal2-close{grid-column:3/3;grid-row:1/99;align-self:center;width:.8em;height:.8em;margin:0;font-size:2em}.swal2-popup.swal2-toast .swal2-html-container{margin:1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-html-container:empty{padding:0}.swal2-popup.swal2-toast .swal2-loader{grid-column:1;grid-row:1/99;align-self:center;width:2em;height:2em;margin:.25em}.swal2-popup.swal2-toast .swal2-icon{grid-column:1;grid-row:1/99;align-self:center;width:2em;min-width:2em;height:2em;margin:0 .5em 0 0}.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:700}.swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-popup.swal2-toast .swal2-actions{justify-content:flex-start;height:auto;margin:0;margin-top:.3125em;padding:0}.swal2-popup.swal2-toast .swal2-styled{margin:.25em .5em;padding:.4em .6em;font-size:1em}.swal2-popup.swal2-toast .swal2-styled:focus{box-shadow:0 0 0 1px #fff,0 0 0 3px rgba(100,150,200,.5)}.swal2-popup.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;transform:rotate(45deg);border-radius:50%}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.8em;left:-.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.25em;left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-popup.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{-webkit-animation:swal2-toast-animate-success-line-tip .75s;animation:swal2-toast-animate-success-line-tip .75s}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{-webkit-animation:swal2-toast-animate-success-line-long .75s;animation:swal2-toast-animate-success-line-long .75s}.swal2-popup.swal2-toast.swal2-show{-webkit-animation:swal2-toast-show .5s;animation:swal2-toast-show .5s}.swal2-popup.swal2-toast.swal2-hide{-webkit-animation:swal2-toast-hide .1s forwards;animation:swal2-toast-hide .1s forwards}.swal2-container{display:grid;position:fixed;z-index:1060;top:0;right:0;bottom:0;left:0;box-sizing:border-box;grid-template-areas:"top-start top top-end" "center-start center center-end" "bottom-start bottom-center bottom-end";grid-template-rows:minmax(-webkit-min-content,auto) minmax(-webkit-min-content,auto) minmax(-webkit-min-content,auto);grid-template-rows:minmax(min-content,auto) minmax(min-content,auto) minmax(min-content,auto);height:100%;padding:.625em;overflow-x:hidden;transition:background-color .1s;-webkit-overflow-scrolling:touch}.swal2-container.swal2-backdrop-show,.swal2-container.swal2-noanimation{background:rgba(0,0,0,.4)}.swal2-container.swal2-backdrop-hide{background:0 0!important}.swal2-container.swal2-bottom-start,.swal2-container.swal2-center-start,.swal2-container.swal2-top-start{grid-template-columns:minmax(0,1fr) auto auto}.swal2-container.swal2-bottom,.swal2-container.swal2-center,.swal2-container.swal2-top{grid-template-columns:auto minmax(0,1fr) auto}.swal2-container.swal2-bottom-end,.swal2-container.swal2-center-end,.swal2-container.swal2-top-end{grid-template-columns:auto auto minmax(0,1fr)}.swal2-container.swal2-top-start>.swal2-popup{align-self:start}.swal2-container.swal2-top>.swal2-popup{grid-column:2;align-self:start;justify-self:center}.swal2-container.swal2-top-end>.swal2-popup,.swal2-container.swal2-top-right>.swal2-popup{grid-column:3;align-self:start;justify-self:end}.swal2-container.swal2-center-left>.swal2-popup,.swal2-container.swal2-center-start>.swal2-popup{grid-row:2;align-self:center}.swal2-container.swal2-center>.swal2-popup{grid-column:2;grid-row:2;align-self:center;justify-self:center}.swal2-container.swal2-center-end>.swal2-popup,.swal2-container.swal2-center-right>.swal2-popup{grid-column:3;grid-row:2;align-self:center;justify-self:end}.swal2-container.swal2-bottom-left>.swal2-popup,.swal2-container.swal2-bottom-start>.swal2-popup{grid-column:1;grid-row:3;align-self:end}.swal2-container.swal2-bottom>.swal2-popup{grid-column:2;grid-row:3;justify-self:center;align-self:end}.swal2-container.swal2-bottom-end>.swal2-popup,.swal2-container.swal2-bottom-right>.swal2-popup{grid-column:3;grid-row:3;align-self:end;justify-self:end}.swal2-container.swal2-grow-fullscreen>.swal2-popup,.swal2-container.swal2-grow-row>.swal2-popup{grid-column:1/4;width:100%}.swal2-container.swal2-grow-column>.swal2-popup,.swal2-container.swal2-grow-fullscreen>.swal2-popup{grid-row:1/4;align-self:stretch}.swal2-container.swal2-no-transition{transition:none!important}.swal2-popup{display:none;position:relative;box-sizing:border-box;grid-template-columns:minmax(0,100%);width:32em;max-width:100%;padding:0 0 1.25em;border:none;border-radius:5px;background:#fff;color:#545454;font-family:inherit;font-size:1rem}.swal2-popup:focus{outline:0}.swal2-popup.swal2-loading{overflow-y:hidden}.swal2-title{position:relative;max-width:100%;margin:0;padding:.8em 1em 0;color:#595959;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;word-wrap:break-word}.swal2-actions{display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:center;width:auto;margin:1.25em auto 0;padding:0}.swal2-actions:not(.swal2-loading) .swal2-styled[disabled]{opacity:.4}.swal2-actions:not(.swal2-loading) .swal2-styled:hover{background-image:linear-gradient(rgba(0,0,0,.1),rgba(0,0,0,.1))}.swal2-actions:not(.swal2-loading) .swal2-styled:active{background-image:linear-gradient(rgba(0,0,0,.2),rgba(0,0,0,.2))}.swal2-loader{display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;-webkit-animation:swal2-rotate-loading 1.5s linear 0s infinite normal;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 transparent #2778c4 transparent}.swal2-styled{margin:.3125em;padding:.625em 1.1em;transition:box-shadow .1s;box-shadow:0 0 0 3px transparent;font-weight:500}.swal2-styled:not([disabled]){cursor:pointer}.swal2-styled.swal2-confirm{border:0;border-radius:.25em;background:initial;background-color:#7367f0;color:#fff;font-size:1em}.swal2-styled.swal2-confirm:focus{box-shadow:0 0 0 3px rgba(115,103,240,.5)}.swal2-styled.swal2-deny{border:0;border-radius:.25em;background:initial;background-color:#ea5455;color:#fff;font-size:1em}.swal2-styled.swal2-deny:focus{box-shadow:0 0 0 3px rgba(234,84,85,.5)}.swal2-styled.swal2-cancel{border:0;border-radius:.25em;background:initial;background-color:#6e7d88;color:#fff;font-size:1em}.swal2-styled.swal2-cancel:focus{box-shadow:0 0 0 3px rgba(110,125,136,.5)}.swal2-styled.swal2-default-outline:focus{box-shadow:0 0 0 3px rgba(100,150,200,.5)}.swal2-styled:focus{outline:0}.swal2-styled::-moz-focus-inner{border:0}.swal2-footer{justify-content:center;margin:1em 0 0;padding:1em 1em 0;border-top:1px solid #eee;color:#545454;font-size:1em}.swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;grid-column:auto!important;height:.25em;overflow:hidden;border-bottom-right-radius:5px;border-bottom-left-radius:5px}.swal2-timer-progress-bar{width:100%;height:.25em;background:rgba(0,0,0,.2)}.swal2-image{max-width:100%;margin:2em auto 1em}.swal2-close{z-index:2;align-items:center;justify-content:center;width:1.2em;height:1.2em;margin-top:0;margin-right:0;margin-bottom:-1.2em;padding:0;overflow:hidden;transition:color .1s,box-shadow .1s;border:none;border-radius:5px;background:0 0;color:#ccc;font-family:serif;font-family:monospace;font-size:2.5em;cursor:pointer;justify-self:end}.swal2-close:hover{transform:none;background:0 0;color:#f27474}.swal2-close:focus{outline:0;box-shadow:inset 0 0 0 3px rgba(100,150,200,.5)}.swal2-close::-moz-focus-inner{border:0}.swal2-html-container{z-index:1;justify-content:center;margin:1em 1.6em .3em;padding:0;overflow:auto;color:#545454;font-size:1.125em;font-weight:400;line-height:normal;text-align:center;word-wrap:break-word;word-break:break-word}.swal2-checkbox,.swal2-file,.swal2-input,.swal2-radio,.swal2-select,.swal2-textarea{margin:1em 2em 0}.swal2-file,.swal2-input,.swal2-textarea{box-sizing:border-box;width:auto;transition:border-color .1s,box-shadow .1s;border:1px solid #d9d9d9;border-radius:.1875em;background:inherit;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px transparent;color:inherit;font-size:1.125em}.swal2-file.swal2-inputerror,.swal2-input.swal2-inputerror,.swal2-textarea.swal2-inputerror{border-color:#f27474!important;box-shadow:0 0 2px #f27474!important}.swal2-file:focus,.swal2-input:focus,.swal2-textarea:focus{border:1px solid #b4dbed;outline:0;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(100,150,200,.5)}.swal2-file::-moz-placeholder,.swal2-input::-moz-placeholder,.swal2-textarea::-moz-placeholder{color:#ccc}.swal2-file:-ms-input-placeholder,.swal2-input:-ms-input-placeholder,.swal2-textarea:-ms-input-placeholder{color:#ccc}.swal2-file::placeholder,.swal2-input::placeholder,.swal2-textarea::placeholder{color:#ccc}.swal2-range{margin:1em 2em 0;background:#fff}.swal2-range input{width:80%}.swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}.swal2-range input,.swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}.swal2-input{height:2.625em;padding:0 .75em}.swal2-file{width:75%;margin-right:auto;margin-left:auto;background:inherit;font-size:1.125em}.swal2-textarea{height:6.75em;padding:.75em}.swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:inherit;color:inherit;font-size:1.125em}.swal2-checkbox,.swal2-radio{align-items:center;justify-content:center;background:#fff;color:inherit}.swal2-checkbox label,.swal2-radio label{margin:0 .6em;font-size:1.125em}.swal2-checkbox input,.swal2-radio input{flex-shrink:0;margin:0 .4em}.swal2-input-label{display:flex;justify-content:center;margin:1em auto 0}.swal2-validation-message{align-items:center;justify-content:center;margin:1em 0 0;padding:.625em;overflow:hidden;background:#f0f0f0;color:#666;font-size:1em;font-weight:300}.swal2-validation-message::before{content:"!";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}.swal2-icon{position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:2.5em auto .6em;border:.25em solid transparent;border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}.swal2-icon.swal2-error{border-color:#f27474;color:#f27474}.swal2-icon.swal2-error .swal2-x-mark{position:relative;flex-grow:1}.swal2-icon.swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}.swal2-icon.swal2-error.swal2-icon-show{-webkit-animation:swal2-animate-error-icon .5s;animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-error.swal2-icon-show .swal2-x-mark{-webkit-animation:swal2-animate-error-x-mark .5s;animation:swal2-animate-error-x-mark .5s}.swal2-icon.swal2-warning{border-color:#facea8;color:#f8bb86}.swal2-icon.swal2-info{border-color:#9de0f6;color:#3fc3ee}.swal2-icon.swal2-question{border-color:#c9dae1;color:#87adbd}.swal2-icon.swal2-success{border-color:#a5dc86;color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;transform:rotate(45deg);border-radius:50%}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}.swal2-icon.swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-.25em;left:-.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}.swal2-icon.swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}.swal2-icon.swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}.swal2-icon.swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-tip{-webkit-animation:swal2-animate-success-line-tip .75s;animation:swal2-animate-success-line-tip .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-long{-webkit-animation:swal2-animate-success-line-long .75s;animation:swal2-animate-success-line-long .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-circular-line-right{-webkit-animation:swal2-rotate-success-circular-line 4.25s ease-in;animation:swal2-rotate-success-circular-line 4.25s ease-in}.swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:1.25em auto;padding:0;background:inherit;font-weight:600}.swal2-progress-steps li{display:inline-block;position:relative}.swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:#add8e6;color:#fff}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:#add8e6}.swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}[class^=swal2]{-webkit-tap-highlight-color:transparent}.swal2-show{-webkit-animation:swal2-show .3s;animation:swal2-show .3s}.swal2-hide{-webkit-animation:swal2-hide .15s forwards;animation:swal2-hide .15s forwards}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{margin-right:initial;margin-left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}@-webkit-keyframes swal2-toast-show{0%{transform:translateY(-.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0)}}@keyframes swal2-toast-show{0%{transform:translateY(-.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0)}}@-webkit-keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@-webkit-keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@-webkit-keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@-webkit-keyframes swal2-show{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}100%{transform:scale(1)}}@keyframes swal2-show{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}100%{transform:scale(1)}}@-webkit-keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(.5);opacity:0}}@keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(.5);opacity:0}}@-webkit-keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@-webkit-keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@-webkit-keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@-webkit-keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@-webkit-keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0);opacity:1}}@-webkit-keyframes swal2-rotate-loading{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes swal2-rotate-loading{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto!important}body.swal2-no-backdrop .swal2-container{background-color:transparent!important;pointer-events:none}body.swal2-no-backdrop .swal2-container .swal2-popup{pointer-events:all}body.swal2-no-backdrop .swal2-container .swal2-modal{box-shadow:0 0 10px rgba(0,0,0,.4)}@media print{body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow-y:scroll!important}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .swal2-container{position:static!important}}body.swal2-toast-shown .swal2-container{box-sizing:border-box;width:360px;max-width:100%;background-color:transparent;pointer-events:none}body.swal2-toast-shown .swal2-container.swal2-top{top:0;right:auto;bottom:auto;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{top:0;right:0;bottom:auto;left:auto}body.swal2-toast-shown .swal2-container.swal2-top-left,body.swal2-toast-shown .swal2-container.swal2-top-start{top:0;right:auto;bottom:auto;left:0}body.swal2-toast-shown .swal2-container.swal2-center-left,body.swal2-toast-shown .swal2-container.swal2-center-start{top:50%;right:auto;bottom:auto;left:0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{top:50%;right:auto;bottom:auto;left:50%;transform:translate(-50%,-50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{top:50%;right:0;bottom:auto;left:auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-left,body.swal2-toast-shown .swal2-container.swal2-bottom-start{top:auto;right:auto;bottom:0;left:0}body.swal2-toast-shown .swal2-container.swal2-bottom{top:auto;right:auto;bottom:0;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{top:auto;right:0;bottom:0;left:auto} \ No newline at end of file diff --git a/modules/virtual-file-explorer/app/Volo.Abp.VirtualFileExplorer.DemoApp/wwwroot/libs/sweetalert2/sweetalert2.min.js b/modules/virtual-file-explorer/app/Volo.Abp.VirtualFileExplorer.DemoApp/wwwroot/libs/sweetalert2/sweetalert2.min.js new file mode 100644 index 0000000000..9a383d5289 --- /dev/null +++ b/modules/virtual-file-explorer/app/Volo.Abp.VirtualFileExplorer.DemoApp/wwwroot/libs/sweetalert2/sweetalert2.min.js @@ -0,0 +1 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).Sweetalert2=t()}(this,function(){"use strict";const l=Object.freeze({cancel:"cancel",backdrop:"backdrop",close:"close",esc:"esc",timer:"timer"}),t="SweetAlert2:",o=e=>e.charAt(0).toUpperCase()+e.slice(1),a=e=>Array.prototype.slice.call(e),s=e=>{console.warn("".concat(t," ").concat("object"==typeof e?e.join(" "):e))},r=e=>{console.error("".concat(t," ").concat(e))},n=[],i=(e,t)=>{t='"'.concat(e,'" is deprecated and will be removed in the next major release. Please use "').concat(t,'" instead.'),n.includes(t)||(n.push(t),s(t))},c=e=>"function"==typeof e?e():e,u=e=>e&&"function"==typeof e.toPromise,d=e=>u(e)?e.toPromise():Promise.resolve(e),p=e=>e&&Promise.resolve(e)===e,m=e=>e instanceof Element||(e=>"object"==typeof e&&e.jquery)(e);var e=e=>{const t={};for(const n in e)t[e[n]]="swal2-"+e[n];return t};const h=e(["container","shown","height-auto","iosfix","popup","modal","no-backdrop","no-transition","toast","toast-shown","show","hide","close","title","html-container","actions","confirm","deny","cancel","default-outline","footer","icon","icon-content","image","input","file","range","select","radio","checkbox","label","textarea","inputerror","input-label","validation-message","progress-steps","active-progress-step","progress-step","progress-step-line","loader","loading","styled","top","top-start","top-end","top-left","top-right","center","center-start","center-end","center-left","center-right","bottom","bottom-start","bottom-end","bottom-left","bottom-right","grow-row","grow-column","grow-fullscreen","rtl","timer-progress-bar","timer-progress-bar-container","scrollbar-measure","icon-success","icon-warning","icon-info","icon-question","icon-error"]),g=e(["success","warning","info","question","error"]),b=()=>document.body.querySelector(".".concat(h.container)),f=e=>{const t=b();return t?t.querySelector(e):null},y=e=>f(".".concat(e)),v=()=>y(h.popup),w=()=>y(h.icon),C=()=>y(h.title),k=()=>y(h["html-container"]),A=()=>y(h.image),B=()=>y(h["progress-steps"]),x=()=>y(h["validation-message"]),P=()=>f(".".concat(h.actions," .").concat(h.confirm)),E=()=>f(".".concat(h.actions," .").concat(h.deny));const S=()=>f(".".concat(h.loader)),T=()=>f(".".concat(h.actions," .").concat(h.cancel)),L=()=>y(h.actions),O=()=>y(h.footer),j=()=>y(h["timer-progress-bar"]),D=()=>y(h.close),I=()=>{const e=a(v().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')).sort((e,t)=>(e=parseInt(e.getAttribute("tabindex")),(t=parseInt(t.getAttribute("tabindex")))"-1"!==e.getAttribute("tabindex"));return(t=>{const n=[];for(let e=0;eG(e))},M=()=>!H()&&!document.body.classList.contains(h["no-backdrop"]),H=()=>document.body.classList.contains(h["toast-shown"]);const q={previousBodyPadding:null},V=(t,e)=>{if(t.textContent="",e){const n=new DOMParser,o=n.parseFromString(e,"text/html");a(o.querySelector("head").childNodes).forEach(e=>{t.appendChild(e)}),a(o.querySelector("body").childNodes).forEach(e=>{t.appendChild(e)})}},N=(t,e)=>{if(!e)return!1;var n=e.split(/\s+/);for(let e=0;e{var o,i;if(o=e,i=t,a(o.classList).forEach(e=>{Object.values(h).includes(e)||Object.values(g).includes(e)||Object.values(i.showClass).includes(e)||o.classList.remove(e)}),t.customClass&&t.customClass[n]){if("string"!=typeof t.customClass[n]&&!t.customClass[n].forEach)return s("Invalid type of customClass.".concat(n,'! Expected string or iterable object, got "').concat(typeof t.customClass[n],'"'));W(e,t.customClass[n])}},F=(e,t)=>{if(!t)return null;switch(t){case"select":case"textarea":case"file":return K(e,h[t]);case"checkbox":return e.querySelector(".".concat(h.checkbox," input"));case"radio":return e.querySelector(".".concat(h.radio," input:checked"))||e.querySelector(".".concat(h.radio," input:first-child"));case"range":return e.querySelector(".".concat(h.range," input"));default:return K(e,h.input)}},R=e=>{var t;e.focus(),"file"!==e.type&&(t=e.value,e.value="",e.value=t)},z=(e,t,n)=>{e&&t&&(t="string"==typeof t?t.split(/\s+/).filter(Boolean):t).forEach(t=>{e.forEach?e.forEach(e=>{n?e.classList.add(t):e.classList.remove(t)}):n?e.classList.add(t):e.classList.remove(t)})},W=(e,t)=>{z(e,t,!0)},_=(e,t)=>{z(e,t,!1)},K=(t,n)=>{for(let e=0;e{(n=n==="".concat(parseInt(n))?parseInt(n):n)||0===parseInt(n)?e.style[t]="number"==typeof n?"".concat(n,"px"):n:e.style.removeProperty(t)},Z=(e,t="flex")=>{e.style.display=t},J=e=>{e.style.display="none"},X=(e,t,n,o)=>{const i=e.querySelector(t);i&&(i.style[n]=o)},$=(e,t,n)=>{t?Z(e,n):J(e)},G=e=>!(!e||!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)),Q=()=>!G(P())&&!G(E())&&!G(T()),ee=e=>!!(e.scrollHeight>e.clientHeight),te=e=>{const t=window.getComputedStyle(e);var n=parseFloat(t.getPropertyValue("animation-duration")||"0"),e=parseFloat(t.getPropertyValue("transition-duration")||"0");return 0{const n=j();G(n)&&(t&&(n.style.transition="none",n.style.width="100%"),setTimeout(()=>{n.style.transition="width ".concat(e/1e3,"s linear"),n.style.width="0%"},10))},oe=()=>"undefined"==typeof window||"undefined"==typeof document,ie='\n
                                                        \n \n
                                                          \n
                                                          \n \n

                                                          \n
                                                          \n \n \n
                                                          \n \n \n
                                                          \n \n
                                                          \n \n \n
                                                          \n
                                                          \n
                                                          \n \n \n \n
                                                          \n
                                                          \n
                                                          \n
                                                          \n
                                                          \n
                                                          \n').replace(/(^|\n)\s*/g,""),ae=()=>{ln.isVisible()&&ln.resetValidationMessage()},se=e=>{var t=(()=>{const e=b();return!!e&&(e.remove(),_([document.documentElement,document.body],[h["no-backdrop"],h["toast-shown"],h["has-column"]]),!0)})();if(oe())r("SweetAlert2 requires document to initialize");else{const n=document.createElement("div");n.className=h.container,t&&W(n,h["no-transition"]),V(n,ie);const o="string"==typeof(t=e.target)?document.querySelector(t):t;o.appendChild(n),(e=>{const t=v();t.setAttribute("role",e.toast?"alert":"dialog"),t.setAttribute("aria-live",e.toast?"polite":"assertive"),e.toast||t.setAttribute("aria-modal","true")})(e),e=o,"rtl"===window.getComputedStyle(e).direction&&W(b(),h.rtl),(()=>{const e=v(),t=K(e,h.input),n=K(e,h.file),o=e.querySelector(".".concat(h.range," input")),i=e.querySelector(".".concat(h.range," output")),a=K(e,h.select),s=e.querySelector(".".concat(h.checkbox," input")),r=K(e,h.textarea);t.oninput=ae,n.onchange=ae,a.onchange=ae,s.onchange=ae,r.oninput=ae,o.oninput=()=>{ae(),i.value=o.value},o.onchange=()=>{ae(),o.nextSibling.value=o.value}})()}},re=(e,t)=>{e instanceof HTMLElement?t.appendChild(e):"object"==typeof e?ce(e,t):e&&V(t,e)},ce=(e,t)=>{e.jquery?le(t,e):V(t,e.toString())},le=(t,n)=>{if(t.textContent="",0 in n)for(let e=0;e in n;e++)t.appendChild(n[e].cloneNode(!0));else t.appendChild(n.cloneNode(!0))},ue=(()=>{if(oe())return!1;var e=document.createElement("div"),t={WebkitAnimation:"webkitAnimationEnd",OAnimation:"oAnimationEnd oanimationend",animation:"animationend"};for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&void 0!==e.style[n])return t[n];return!1})(),de=(e,t)=>{const n=L();var o=S(),i=P(),a=E(),s=T();(t.showConfirmButton||t.showDenyButton||t.showCancelButton?Z:J)(n),U(n,t,"actions"),pe(i,"confirm",t),pe(a,"deny",t),pe(s,"cancel",t),function(e,t,n,o){if(!o.buttonsStyling)return _([e,t,n],h.styled);W([e,t,n],h.styled),o.confirmButtonColor&&(e.style.backgroundColor=o.confirmButtonColor,W(e,h["default-outline"]));o.denyButtonColor&&(t.style.backgroundColor=o.denyButtonColor,W(t,h["default-outline"]));o.cancelButtonColor&&(n.style.backgroundColor=o.cancelButtonColor,W(n,h["default-outline"]))}(i,a,s,t),t.reverseButtons&&(n.insertBefore(s,o),n.insertBefore(a,o),n.insertBefore(i,o)),V(o,t.loaderHtml),U(o,t,"loader")};function pe(e,t,n){$(e,n["show".concat(o(t),"Button")],"inline-block"),V(e,n["".concat(t,"ButtonText")]),e.setAttribute("aria-label",n["".concat(t,"ButtonAriaLabel")]),e.className=h[t],U(e,n,"".concat(t,"Button")),W(e,n["".concat(t,"ButtonClass")])}const me=(e,t)=>{var n,o,i=b();i&&(o=i,"string"==typeof(n=t.backdrop)?o.style.background=n:n||W([document.documentElement,document.body],h["no-backdrop"]),o=i,(n=t.position)in h?W(o,h[n]):(s('The "position" parameter is not valid, defaulting to "center"'),W(o,h.center)),n=i,!(o=t.grow)||"string"!=typeof o||(o="grow-".concat(o))in h&&W(n,h[o]),U(i,t,"container"))};var he={promise:new WeakMap,innerParams:new WeakMap,domCache:new WeakMap};const ge=["input","file","range","select","radio","checkbox","textarea"],be=e=>{if(!ke[e.input])return r('Unexpected type of input! Expected "text", "email", "password", "number", "tel", "select", "radio", "checkbox", "textarea", "file" or "url", got "'.concat(e.input,'"'));var t=Ce(e.input);const n=ke[e.input](t,e);Z(n),setTimeout(()=>{R(n)})},fe=(e,t)=>{const n=F(v(),e);if(n){(t=>{for(let e=0;e{var t=Ce(e.input);e.customClass&&W(t,e.customClass.input)},ve=(e,t)=>{e.placeholder&&!t.inputPlaceholder||(e.placeholder=t.inputPlaceholder)},we=(e,t,n)=>{if(n.inputLabel){e.id=h.input;const i=document.createElement("label");var o=h["input-label"];i.setAttribute("for",e.id),i.className=o,W(i,n.customClass.inputLabel),i.innerText=n.inputLabel,t.insertAdjacentElement("beforebegin",i)}},Ce=e=>{e=h[e]||h.input;return K(v(),e)},ke={};ke.text=ke.email=ke.password=ke.number=ke.tel=ke.url=(e,t)=>("string"==typeof t.inputValue||"number"==typeof t.inputValue?e.value=t.inputValue:p(t.inputValue)||s('Unexpected type of inputValue! Expected "string", "number" or "Promise", got "'.concat(typeof t.inputValue,'"')),we(e,e,t),ve(e,t),e.type=t.input,e),ke.file=(e,t)=>(we(e,e,t),ve(e,t),e),ke.range=(e,t)=>{const n=e.querySelector("input"),o=e.querySelector("output");return n.value=t.inputValue,n.type=t.input,o.value=t.inputValue,we(n,e,t),e},ke.select=(e,t)=>{if(e.textContent="",t.inputPlaceholder){const n=document.createElement("option");V(n,t.inputPlaceholder),n.value="",n.disabled=!0,n.selected=!0,e.appendChild(n)}return we(e,e,t),e},ke.radio=e=>(e.textContent="",e),ke.checkbox=(e,t)=>{const n=F(v(),"checkbox");n.value=1,n.id=h.checkbox,n.checked=Boolean(t.inputValue);var o=e.querySelector("span");return V(o,t.inputPlaceholder),e},ke.textarea=(n,e)=>{n.value=e.inputValue,ve(n,e),we(n,n,e);return setTimeout(()=>{if("MutationObserver"in window){const t=parseInt(window.getComputedStyle(v()).width);new MutationObserver(()=>{var e,e=n.offsetWidth+(e=n,parseInt(window.getComputedStyle(e).marginLeft)+parseInt(window.getComputedStyle(e).marginRight));e>t?v().style.width="".concat(e,"px"):v().style.width=null}).observe(n,{attributes:!0,attributeFilter:["style"]})}}),n};const Ae=(e,t)=>{const n=k();U(n,t,"htmlContainer"),t.html?(re(t.html,n),Z(n,"block")):t.text?(n.textContent=t.text,Z(n,"block")):J(n),((e,o)=>{const i=v();e=he.innerParams.get(e);const a=!e||o.input!==e.input;ge.forEach(e=>{var t=h[e];const n=K(i,t);fe(e,o.inputAttributes),n.className=t,a&&J(n)}),o.input&&(a&&be(o),ye(o))})(e,t)},Be=(e,t)=>{for(const n in g)t.icon!==n&&_(e,g[n]);W(e,g[t.icon]),Ee(e,t),xe(),U(e,t,"icon")},xe=()=>{const e=v();var t=window.getComputedStyle(e).getPropertyValue("background-color");const n=e.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix");for(let e=0;e{var n;e.textContent="",t.iconHtml?V(e,Se(t.iconHtml)):"success"===t.icon?V(e,'\n
                                                          \n \n
                                                          \n
                                                          \n '):"error"===t.icon?V(e,'\n \n \n \n \n '):(n={question:"?",warning:"!",info:"i"},V(e,Se(n[t.icon])))},Ee=(e,t)=>{if(t.iconColor){e.style.color=t.iconColor,e.style.borderColor=t.iconColor;for(const n of[".swal2-success-line-tip",".swal2-success-line-long",".swal2-x-mark-line-left",".swal2-x-mark-line-right"])X(e,n,"backgroundColor",t.iconColor);X(e,".swal2-success-ring","borderColor",t.iconColor)}},Se=e=>'
                                                          ').concat(e,"
                                                          "),Te=(e,o)=>{const i=B();if(!o.progressSteps||0===o.progressSteps.length)return J(i);Z(i),i.textContent="",o.currentProgressStep>=o.progressSteps.length&&s("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),o.progressSteps.forEach((e,t)=>{var n,e=(n=e,e=document.createElement("li"),W(e,h["progress-step"]),V(e,n),e);i.appendChild(e),t===o.currentProgressStep&&W(e,h["active-progress-step"]),t!==o.progressSteps.length-1&&(t=(e=>{const t=document.createElement("li");return W(t,h["progress-step-line"]),e.progressStepsDistance&&(t.style.width=e.progressStepsDistance),t})(o),i.appendChild(t))})},Le=(e,t)=>{e.className="".concat(h.popup," ").concat(G(e)?t.showClass.popup:""),t.toast?(W([document.documentElement,document.body],h["toast-shown"]),W(e,h.toast)):W(e,h.modal),U(e,t,"popup"),"string"==typeof t.customClass&&W(e,t.customClass),t.icon&&W(e,h["icon-".concat(t.icon)])},Oe=(e,t)=>{var n,o,i;(e=>{var t=b();const n=v();e.toast?(Y(t,"width",e.width),n.style.width="100%",n.insertBefore(S(),w())):Y(n,"width",e.width),Y(n,"padding",e.padding),e.background&&(n.style.background=e.background),J(x()),Le(n,e)})(t),me(0,t),Te(0,t),i=e,n=t,o=he.innerParams.get(i),i=w(),o&&n.icon===o.icon?(Pe(i,n),Be(i,n)):n.icon||n.iconHtml?n.icon&&-1===Object.keys(g).indexOf(n.icon)?(r('Unknown icon! Expected "success", "error", "warning", "info" or "question", got "'.concat(n.icon,'"')),J(i)):(Z(i),Pe(i,n),Be(i,n),W(i,n.showClass.icon)):J(i),(e=>{const t=A();if(!e.imageUrl)return J(t);Z(t,""),t.setAttribute("src",e.imageUrl),t.setAttribute("alt",e.imageAlt),Y(t,"width",e.imageWidth),Y(t,"height",e.imageHeight),t.className=h.image,U(t,e,"image")})(t),(e=>{const t=C();$(t,e.title||e.titleText,"block"),e.title&&re(e.title,t),e.titleText&&(t.innerText=e.titleText),U(t,e,"title")})(t),(e=>{const t=D();V(t,e.closeButtonHtml),U(t,e,"closeButton"),$(t,e.showCloseButton),t.setAttribute("aria-label",e.closeButtonAriaLabel)})(t),Ae(e,t),de(0,t),i=t,e=O(),$(e,i.footer),i.footer&&re(i.footer,e),U(e,i,"footer"),"function"==typeof t.didRender&&t.didRender(v())};const je=()=>P()&&P().click();const De=e=>{let t=v();t||ln.fire(),t=v();var n=S();H()?J(w()):Ie(t,e),Z(n),t.setAttribute("data-loading",!0),t.setAttribute("aria-busy",!0),t.focus()},Ie=(e,t)=>{var n=L();const o=S();!t&&G(P())&&(t=P()),Z(n),t&&(J(t),o.setAttribute("data-button-to-replace",t.className)),o.parentNode.insertBefore(o,t),W([e,n],h.loading)},Me={},He=o=>new Promise(e=>{if(!o)return e();var t=window.scrollX,n=window.scrollY;Me.restoreFocusTimeout=setTimeout(()=>{Me.previousActiveElement&&Me.previousActiveElement.focus?(Me.previousActiveElement.focus(),Me.previousActiveElement=null):document.body&&document.body.focus(),e()},100),window.scrollTo(t,n)});const qe=()=>{if(Me.timeout)return(()=>{const e=j();var t=parseInt(window.getComputedStyle(e).width);e.style.removeProperty("transition"),e.style.width="100%";var n=parseInt(window.getComputedStyle(e).width),n=parseInt(t/n*100);e.style.removeProperty("transition"),e.style.width="".concat(n,"%")})(),Me.timeout.stop()},Ve=()=>{if(Me.timeout){var e=Me.timeout.start();return ne(e),e}};let Ne=!1;const Ue={};const Fe=t=>{for(let e=t.target;e&&e!==document;e=e.parentNode)for(const o in Ue){var n=e.getAttribute(o);if(n)return void Ue[o].fire({template:n})}},Re={title:"",titleText:"",text:"",html:"",footer:"",icon:void 0,iconColor:void 0,iconHtml:void 0,template:void 0,toast:!1,showClass:{popup:"swal2-show",backdrop:"swal2-backdrop-show",icon:"swal2-icon-show"},hideClass:{popup:"swal2-hide",backdrop:"swal2-backdrop-hide",icon:"swal2-icon-hide"},customClass:{},target:"body",backdrop:!0,heightAuto:!0,allowOutsideClick:!0,allowEscapeKey:!0,allowEnterKey:!0,stopKeydownPropagation:!0,keydownListenerCapture:!1,showConfirmButton:!0,showDenyButton:!1,showCancelButton:!1,preConfirm:void 0,preDeny:void 0,confirmButtonText:"OK",confirmButtonAriaLabel:"",confirmButtonColor:void 0,denyButtonText:"No",denyButtonAriaLabel:"",denyButtonColor:void 0,cancelButtonText:"Cancel",cancelButtonAriaLabel:"",cancelButtonColor:void 0,buttonsStyling:!0,reverseButtons:!1,focusConfirm:!0,focusDeny:!1,focusCancel:!1,returnFocus:!0,showCloseButton:!1,closeButtonHtml:"×",closeButtonAriaLabel:"Close this dialog",loaderHtml:"",showLoaderOnConfirm:!1,showLoaderOnDeny:!1,imageUrl:void 0,imageWidth:void 0,imageHeight:void 0,imageAlt:"",timer:void 0,timerProgressBar:!1,width:void 0,padding:void 0,background:void 0,input:void 0,inputPlaceholder:"",inputLabel:"",inputValue:"",inputOptions:{},inputAutoTrim:!0,inputAttributes:{},inputValidator:void 0,returnInputValueOnDeny:!1,validationMessage:void 0,grow:!1,position:"center",progressSteps:[],currentProgressStep:void 0,progressStepsDistance:void 0,willOpen:void 0,didOpen:void 0,didRender:void 0,willClose:void 0,didClose:void 0,didDestroy:void 0,scrollbarPadding:!0},ze=["allowEscapeKey","allowOutsideClick","background","buttonsStyling","cancelButtonAriaLabel","cancelButtonColor","cancelButtonText","closeButtonAriaLabel","closeButtonHtml","confirmButtonAriaLabel","confirmButtonColor","confirmButtonText","currentProgressStep","customClass","denyButtonAriaLabel","denyButtonColor","denyButtonText","didClose","didDestroy","footer","hideClass","html","icon","iconColor","iconHtml","imageAlt","imageHeight","imageUrl","imageWidth","preConfirm","preDeny","progressSteps","returnFocus","reverseButtons","showCancelButton","showCloseButton","showConfirmButton","showDenyButton","text","title","titleText","willClose"],We={},_e=["allowOutsideClick","allowEnterKey","backdrop","focusConfirm","focusDeny","focusCancel","returnFocus","heightAuto","keydownListenerCapture"],Ke=e=>Object.prototype.hasOwnProperty.call(Re,e);const Ye=e=>We[e],Ze=e=>{!e.backdrop&&e.allowOutsideClick&&s('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`');for(const o in e)n=o,Ke(n)||s('Unknown parameter "'.concat(n,'"')),e.toast&&(t=o,_e.includes(t)&&s('The parameter "'.concat(t,'" is incompatible with toasts'))),t=o,Ye(t)&&i(t,Ye(t));var t,n};var Je=Object.freeze({isValidParameter:Ke,isUpdatableParameter:e=>-1!==ze.indexOf(e),isDeprecatedParameter:Ye,argsToParams:n=>{const o={};return"object"!=typeof n[0]||m(n[0])?["title","html","icon"].forEach((e,t)=>{t=n[t];"string"==typeof t||m(t)?o[e]=t:void 0!==t&&r("Unexpected type of ".concat(e,'! Expected "string" or "Element", got ').concat(typeof t))}):Object.assign(o,n[0]),o},isVisible:()=>G(v()),clickConfirm:je,clickDeny:()=>E()&&E().click(),clickCancel:()=>T()&&T().click(),getContainer:b,getPopup:v,getTitle:C,getHtmlContainer:k,getImage:A,getIcon:w,getInputLabel:()=>y(h["input-label"]),getCloseButton:D,getActions:L,getConfirmButton:P,getDenyButton:E,getCancelButton:T,getLoader:S,getFooter:O,getTimerProgressBar:j,getFocusableElements:I,getValidationMessage:x,isLoading:()=>v().hasAttribute("data-loading"),fire:function(...e){return new this(...e)},mixin:function(n){class e extends this{_main(e,t){return super._main(e,Object.assign({},n,t))}}return e},showLoading:De,enableLoading:De,getTimerLeft:()=>Me.timeout&&Me.timeout.getTimerLeft(),stopTimer:qe,resumeTimer:Ve,toggleTimer:()=>{var e=Me.timeout;return e&&(e.running?qe:Ve)()},increaseTimer:e=>{if(Me.timeout){e=Me.timeout.increase(e);return ne(e,!0),e}},isTimerRunning:()=>Me.timeout&&Me.timeout.isRunning(),bindClickHandler:function(e="data-swal-template"){Ue[e]=this,Ne||(document.body.addEventListener("click",Fe),Ne=!0)}});function Xe(){var e=he.innerParams.get(this);if(e){const t=he.domCache.get(this);J(t.loader),H()?e.icon&&Z(w()):(e=>{const t=e.popup.getElementsByClassName(e.loader.getAttribute("data-button-to-replace"));if(t.length)Z(t[0],"inline-block");else if(Q())J(e.actions)})(t),_([t.popup,t.actions],h.loading),t.popup.removeAttribute("aria-busy"),t.popup.removeAttribute("data-loading"),t.confirmButton.disabled=!1,t.denyButton.disabled=!1,t.cancelButton.disabled=!1}}const $e=()=>{null===q.previousBodyPadding&&document.body.scrollHeight>window.innerHeight&&(q.previousBodyPadding=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight="".concat(q.previousBodyPadding+(()=>{const e=document.createElement("div");e.className=h["scrollbar-measure"],document.body.appendChild(e);var t=e.getBoundingClientRect().width-e.clientWidth;return document.body.removeChild(e),t})(),"px"))},Ge=()=>{navigator.userAgent.match(/(CriOS|FxiOS|EdgiOS|YaBrowser|UCBrowser)/i)||v().scrollHeight>window.innerHeight-44&&(b().style.paddingBottom="".concat(44,"px"))},Qe=()=>{const e=b();let t;e.ontouchstart=e=>{t=et(e)},e.ontouchmove=e=>{t&&(e.preventDefault(),e.stopPropagation())}},et=e=>{var t=e.target,n=b();return!tt(e)&&!nt(e)&&(t===n||!(ee(n)||"INPUT"===t.tagName||"TEXTAREA"===t.tagName||ee(k())&&k().contains(t)))},tt=e=>e.touches&&e.touches.length&&"stylus"===e.touches[0].touchType,nt=e=>e.touches&&1{const e=a(document.body.children);e.forEach(e=>{e.hasAttribute("data-previous-aria-hidden")?(e.setAttribute("aria-hidden",e.getAttribute("data-previous-aria-hidden")),e.removeAttribute("data-previous-aria-hidden")):e.removeAttribute("aria-hidden")})};var it={swalPromiseResolve:new WeakMap};function at(e,t,n,o){H()?ct(e,o):(He(n).then(()=>ct(e,o)),Me.keydownTarget.removeEventListener("keydown",Me.keydownHandler,{capture:Me.keydownListenerCapture}),Me.keydownHandlerAdded=!1),/^((?!chrome|android).)*safari/i.test(navigator.userAgent)?(t.setAttribute("style","display:none !important"),t.removeAttribute("class"),t.innerHTML=""):t.remove(),M()&&(null!==q.previousBodyPadding&&(document.body.style.paddingRight="".concat(q.previousBodyPadding,"px"),q.previousBodyPadding=null),N(document.body,h.iosfix)&&(t=parseInt(document.body.style.top,10),_(document.body,h.iosfix),document.body.style.top="",document.body.scrollTop=-1*t),ot()),_([document.documentElement,document.body],[h.shown,h["height-auto"],h["no-backdrop"],h["toast-shown"]])}function st(e){var t=v();if(t){e=void 0!==(o=e)?Object.assign({isConfirmed:!1,isDenied:!1,isDismissed:!1},o):{isConfirmed:!1,isDenied:!1,isDismissed:!0};var n=he.innerParams.get(this);if(n&&!N(t,n.hideClass.popup)){const i=it.swalPromiseResolve.get(this);_(t,n.showClass.popup),W(t,n.hideClass.popup);var o=b();_(o,n.showClass.backdrop),W(o,n.hideClass.backdrop),((e,t,n)=>{const o=b(),i=ue&&te(t);if(typeof n.willClose==="function")n.willClose(t);if(i)rt(e,t,o,n.returnFocus,n.didClose);else at(e,o,n.returnFocus,n.didClose)})(this,t,n),i(e)}}}const rt=(e,t,n,o,i)=>{Me.swalCloseEventFinishedCallback=at.bind(null,e,n,o,i),t.addEventListener(ue,function(e){e.target===t&&(Me.swalCloseEventFinishedCallback(),delete Me.swalCloseEventFinishedCallback)})},ct=(e,t)=>{setTimeout(()=>{"function"==typeof t&&t.bind(e.params)(),e._destroy()})};function lt(e,t,n){const o=he.domCache.get(e);t.forEach(e=>{o[e].disabled=n})}function ut(e,t){if(!e)return!1;if("radio"===e.type){const n=e.parentNode.parentNode,o=n.querySelectorAll("input");for(let e=0;e/^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]{2,24}$/.test(e)?Promise.resolve():Promise.resolve(t||"Invalid email address"),url:(e,t)=>/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(e)?Promise.resolve():Promise.resolve(t||"Invalid URL")};function mt(e){var t,n;(t=e).inputValidator||Object.keys(pt).forEach(e=>{t.input===e&&(t.inputValidator=pt[e])}),e.showLoaderOnConfirm&&!e.preConfirm&&s("showLoaderOnConfirm is set to true, but preConfirm is not defined.\nshowLoaderOnConfirm should be used together with preConfirm, see usage example:\nhttps://sweetalert2.github.io/#ajax-request"),(n=e).target&&("string"!=typeof n.target||document.querySelector(n.target))&&("string"==typeof n.target||n.target.appendChild)||(s('Target parameter is not valid, defaulting to "body"'),n.target="body"),"string"==typeof e.title&&(e.title=e.title.split("\n").join("
                                                          ")),se(e)}const ht=["swal-title","swal-html","swal-footer"],gt=e=>{e="string"==typeof e.template?document.querySelector(e.template):e.template;if(!e)return{};e=e.content;return kt(e),Object.assign(bt(e),ft(e),yt(e),vt(e),wt(e),Ct(e,ht))},bt=e=>{const o={};return a(e.querySelectorAll("swal-param")).forEach(e=>{At(e,["name","value"]);var t=e.getAttribute("name");let n=e.getAttribute("value");"boolean"==typeof Re[t]&&"false"===n&&(n=!1),"object"==typeof Re[t]&&(n=JSON.parse(n)),o[t]=n}),o},ft=e=>{const n={};return a(e.querySelectorAll("swal-button")).forEach(e=>{At(e,["type","color","aria-label"]);var t=e.getAttribute("type");n["".concat(t,"ButtonText")]=e.innerHTML,n["show".concat(o(t),"Button")]=!0,e.hasAttribute("color")&&(n["".concat(t,"ButtonColor")]=e.getAttribute("color")),e.hasAttribute("aria-label")&&(n["".concat(t,"ButtonAriaLabel")]=e.getAttribute("aria-label"))}),n},yt=e=>{const t={},n=e.querySelector("swal-image");return n&&(At(n,["src","width","height","alt"]),n.hasAttribute("src")&&(t.imageUrl=n.getAttribute("src")),n.hasAttribute("width")&&(t.imageWidth=n.getAttribute("width")),n.hasAttribute("height")&&(t.imageHeight=n.getAttribute("height")),n.hasAttribute("alt")&&(t.imageAlt=n.getAttribute("alt"))),t},vt=e=>{const t={},n=e.querySelector("swal-icon");return n&&(At(n,["type","color"]),n.hasAttribute("type")&&(t.icon=n.getAttribute("type")),n.hasAttribute("color")&&(t.iconColor=n.getAttribute("color")),t.iconHtml=n.innerHTML),t},wt=e=>{const n={},t=e.querySelector("swal-input");t&&(At(t,["type","label","placeholder","value"]),n.input=t.getAttribute("type")||"text",t.hasAttribute("label")&&(n.inputLabel=t.getAttribute("label")),t.hasAttribute("placeholder")&&(n.inputPlaceholder=t.getAttribute("placeholder")),t.hasAttribute("value")&&(n.inputValue=t.getAttribute("value")));e=e.querySelectorAll("swal-input-option");return e.length&&(n.inputOptions={},a(e).forEach(e=>{At(e,["value"]);var t=e.getAttribute("value"),e=e.innerHTML;n.inputOptions[t]=e})),n},Ct=(e,t)=>{const n={};for(const o in t){const i=t[o],a=e.querySelector(i);a&&(At(a,[]),n[i.replace(/^swal-/,"")]=a.innerHTML.trim())}return n},kt=e=>{const t=ht.concat(["swal-param","swal-button","swal-image","swal-icon","swal-input","swal-input-option"]);a(e.children).forEach(e=>{e=e.tagName.toLowerCase();-1===t.indexOf(e)&&s("Unrecognized element <".concat(e,">"))})},At=(t,n)=>{a(t.attributes).forEach(e=>{-1===n.indexOf(e.name)&&s(['Unrecognized attribute "'.concat(e.name,'" on <').concat(t.tagName.toLowerCase(),">."),"".concat(n.length?"Allowed attributes are: ".concat(n.join(", ")):"To set the value, use HTML within the element.")])})},Bt=e=>{const t=b(),n=v();"function"==typeof e.willOpen&&e.willOpen(n);var o=window.getComputedStyle(document.body).overflowY;St(t,n,e),setTimeout(()=>{Pt(t,n)},10),M()&&(Et(t,e.scrollbarPadding,o),(()=>{const e=a(document.body.children);e.forEach(e=>{e===b()||e.contains(b())||(e.hasAttribute("aria-hidden")&&e.setAttribute("data-previous-aria-hidden",e.getAttribute("aria-hidden")),e.setAttribute("aria-hidden","true"))})})()),H()||Me.previousActiveElement||(Me.previousActiveElement=document.activeElement),"function"==typeof e.didOpen&&setTimeout(()=>e.didOpen(n)),_(t,h["no-transition"])},xt=e=>{const t=v();if(e.target===t){const n=b();t.removeEventListener(ue,xt),n.style.overflowY="auto"}},Pt=(e,t)=>{ue&&te(t)?(e.style.overflowY="hidden",t.addEventListener(ue,xt)):e.style.overflowY="auto"},Et=(e,t,n)=>{var o;(/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream||"MacIntel"===navigator.platform&&1{e.scrollTop=0})},St=(e,t,n)=>{W(e,n.showClass.backdrop),t.style.setProperty("opacity","0","important"),Z(t,"grid"),setTimeout(()=>{W(t,n.showClass.popup),t.style.removeProperty("opacity")},10),W([document.documentElement,document.body],h.shown),n.heightAuto&&n.backdrop&&!n.toast&&W([document.documentElement,document.body],h["height-auto"])},Tt=e=>e.checked?1:0,Lt=e=>e.checked?e.value:null,Ot=e=>e.files.length?null!==e.getAttribute("multiple")?e.files:e.files[0]:null,jt=(t,n)=>{const o=v(),i=e=>It[n.input](o,Mt(e),n);u(n.inputOptions)||p(n.inputOptions)?(De(P()),d(n.inputOptions).then(e=>{t.hideLoading(),i(e)})):"object"==typeof n.inputOptions?i(n.inputOptions):r("Unexpected type of inputOptions! Expected object, Map or Promise, got ".concat(typeof n.inputOptions))},Dt=(t,n)=>{const o=t.getInput();J(o),d(n.inputValue).then(e=>{o.value="number"===n.input?parseFloat(e)||0:"".concat(e),Z(o),o.focus(),t.hideLoading()}).catch(e=>{r("Error in inputValue promise: ".concat(e)),o.value="",Z(o),o.focus(),t.hideLoading()})},It={select:(e,t,i)=>{const a=K(e,h.select),s=(e,t,n)=>{const o=document.createElement("option");o.value=n,V(o,t),o.selected=Ht(n,i.inputValue),e.appendChild(o)};t.forEach(e=>{var t=e[0];const n=e[1];if(Array.isArray(n)){const o=document.createElement("optgroup");o.label=t,o.disabled=!1,a.appendChild(o),n.forEach(e=>s(o,e[1],e[0]))}else s(a,n,t)}),a.focus()},radio:(e,t,a)=>{const s=K(e,h.radio);t.forEach(e=>{var t=e[0],e=e[1];const n=document.createElement("input"),o=document.createElement("label");n.type="radio",n.name=h.radio,n.value=t,Ht(t,a.inputValue)&&(n.checked=!0);const i=document.createElement("span");V(i,e),i.className=h.label,o.appendChild(n),o.appendChild(i),s.appendChild(o)});const n=s.querySelectorAll("input");n.length&&n[0].focus()}},Mt=n=>{const o=[];return"undefined"!=typeof Map&&n instanceof Map?n.forEach((e,t)=>{let n=e;"object"==typeof n&&(n=Mt(n)),o.push([t,n])}):Object.keys(n).forEach(e=>{let t=n[e];"object"==typeof t&&(t=Mt(t)),o.push([e,t])}),o},Ht=(e,t)=>t&&t.toString()===e.toString(),qt=(e,t)=>{var n=he.innerParams.get(e),o=((e,t)=>{const n=e.getInput();if(!n)return null;switch(t.input){case"checkbox":return Tt(n);case"radio":return Lt(n);case"file":return Ot(n);default:return t.inputAutoTrim?n.value.trim():n.value}})(e,n);n.inputValidator?Vt(e,o,t):e.getInput().checkValidity()?("deny"===t?Nt:Ft)(e,o):(e.enableButtons(),e.showValidationMessage(n.validationMessage))},Vt=(t,n,o)=>{const e=he.innerParams.get(t);t.disableInput();const i=Promise.resolve().then(()=>d(e.inputValidator(n,e.validationMessage)));i.then(e=>{t.enableButtons(),t.enableInput(),e?t.showValidationMessage(e):("deny"===o?Nt:Ft)(t,n)})},Nt=(t,n)=>{const e=he.innerParams.get(t||void 0);if(e.showLoaderOnDeny&&De(E()),e.preDeny){const o=Promise.resolve().then(()=>d(e.preDeny(n,e.validationMessage)));o.then(e=>{!1===e?t.hideLoading():t.closePopup({isDenied:!0,value:void 0===e?n:e})})}else t.closePopup({isDenied:!0,value:n})},Ut=(e,t)=>{e.closePopup({isConfirmed:!0,value:t})},Ft=(t,n)=>{const e=he.innerParams.get(t||void 0);if(e.showLoaderOnConfirm&&De(),e.preConfirm){t.resetValidationMessage();const o=Promise.resolve().then(()=>d(e.preConfirm(n,e.validationMessage)));o.then(e=>{G(x())||!1===e?t.hideLoading():Ut(t,void 0===e?n:e)})}else Ut(t,n)},Rt=(e,t,n)=>{const o=I();if(o.length)return(t+=n)===o.length?t=0:-1===t&&(t=o.length-1),o[t].focus();v().focus()},zt=["ArrowRight","ArrowDown"],Wt=["ArrowLeft","ArrowUp"],_t=(e,t,n)=>{var o=he.innerParams.get(e);o&&(o.stopKeydownPropagation&&t.stopPropagation(),"Enter"===t.key?Kt(e,t,o):"Tab"===t.key?Yt(t,o):[...zt,...Wt].includes(t.key)?Zt(t.key):"Escape"===t.key&&Jt(t,o,n))},Kt=(e,t,n)=>{t.isComposing||t.target&&e.getInput()&&t.target.outerHTML===e.getInput().outerHTML&&(["textarea","file"].includes(n.input)||(je(),t.preventDefault()))},Yt=(e,t)=>{var n=e.target,o=I();let i=-1;for(let e=0;e{const t=P(),n=E(),o=T();if([t,n,o].includes(document.activeElement)){e=zt.includes(e)?"nextElementSibling":"previousElementSibling";const i=document.activeElement[e];i&&i.focus()}},Jt=(e,t,n)=>{c(t.allowEscapeKey)&&(e.preventDefault(),n(l.esc))},Xt=(t,e,n)=>{e.popup.onclick=()=>{var e=he.innerParams.get(t);e.showConfirmButton||e.showDenyButton||e.showCancelButton||e.showCloseButton||e.timer||e.input||n(l.close)}};let $t=!1;const Gt=t=>{t.popup.onmousedown=()=>{t.container.onmouseup=function(e){t.container.onmouseup=void 0,e.target===t.container&&($t=!0)}}},Qt=t=>{t.container.onmousedown=()=>{t.popup.onmouseup=function(e){t.popup.onmouseup=void 0,e.target!==t.popup&&!t.popup.contains(e.target)||($t=!0)}}},en=(n,o,i)=>{o.container.onclick=e=>{var t=he.innerParams.get(n);$t?$t=!1:e.target===o.container&&c(t.allowOutsideClick)&&i(l.backdrop)}};const tn=(e,t,n)=>{var o=j();J(o),t.timer&&(e.timeout=new dt(()=>{n("timer"),delete e.timeout},t.timer),t.timerProgressBar&&(Z(o),setTimeout(()=>{e.timeout&&e.timeout.running&&ne(t.timer)})))},nn=(e,t)=>{if(!t.toast)return c(t.allowEnterKey)?void(on(e,t)||Rt(0,-1,1)):an()},on=(e,t)=>t.focusDeny&&G(e.denyButton)?(e.denyButton.focus(),!0):t.focusCancel&&G(e.cancelButton)?(e.cancelButton.focus(),!0):!(!t.focusConfirm||!G(e.confirmButton))&&(e.confirmButton.focus(),!0),an=()=>{document.activeElement&&"function"==typeof document.activeElement.blur&&document.activeElement.blur()};const sn=e=>{for(const t in e)e[t]=new WeakMap};e=Object.freeze({hideLoading:Xe,disableLoading:Xe,getInput:function(e){var t=he.innerParams.get(e||this);return(e=he.domCache.get(e||this))?F(e.popup,t.input):null},close:st,closePopup:st,closeModal:st,closeToast:st,enableButtons:function(){lt(this,["confirmButton","denyButton","cancelButton"],!1)},disableButtons:function(){lt(this,["confirmButton","denyButton","cancelButton"],!0)},enableInput:function(){return ut(this.getInput(),!1)},disableInput:function(){return ut(this.getInput(),!0)},showValidationMessage:function(e){const t=he.domCache.get(this);var n=he.innerParams.get(this);V(t.validationMessage,e),t.validationMessage.className=h["validation-message"],n.customClass&&n.customClass.validationMessage&&W(t.validationMessage,n.customClass.validationMessage),Z(t.validationMessage);const o=this.getInput();o&&(o.setAttribute("aria-invalid",!0),o.setAttribute("aria-describedby",h["validation-message"]),R(o),W(o,h.inputerror))},resetValidationMessage:function(){var e=he.domCache.get(this);e.validationMessage&&J(e.validationMessage);const t=this.getInput();t&&(t.removeAttribute("aria-invalid"),t.removeAttribute("aria-describedby"),_(t,h.inputerror))},getProgressSteps:function(){return he.domCache.get(this).progressSteps},_main:function(e,t={}){Ze(Object.assign({},t,e)),Me.currentInstance&&(Me.currentInstance._destroy(),M()&&ot()),Me.currentInstance=this,mt(e=((e,t)=>{const n=gt(e),o=Object.assign({},Re,t,n,e);return o.showClass=Object.assign({},Re.showClass,o.showClass),o.hideClass=Object.assign({},Re.hideClass,o.hideClass),o})(e,t)),Object.freeze(e),Me.timeout&&(Me.timeout.stop(),delete Me.timeout),clearTimeout(Me.restoreFocusTimeout);var s,r,c,t=(e=>{const t={popup:v(),container:b(),actions:L(),confirmButton:P(),denyButton:E(),cancelButton:T(),loader:S(),closeButton:D(),validationMessage:x(),progressSteps:B()};return he.domCache.set(e,t),t})(this);return Oe(this,e),he.innerParams.set(this,e),s=this,r=t,c=e,new Promise(e=>{const t=e=>{s.closePopup({isDismissed:!0,dismiss:e})};var n,o,i,a;it.swalPromiseResolve.set(s,e),r.confirmButton.onclick=()=>(e=>{var t=he.innerParams.get(e);e.disableButtons(),t.input?qt(e,"confirm"):Ft(e,!0)})(s),r.denyButton.onclick=()=>(e=>{var t=he.innerParams.get(e);e.disableButtons(),t.returnInputValueOnDeny?qt(e,"deny"):Nt(e,!1)})(s),r.cancelButton.onclick=()=>((e,t)=>{e.disableButtons(),t(l.cancel)})(s,t),r.closeButton.onclick=()=>t(l.close),n=s,a=r,e=t,he.innerParams.get(n).toast?Xt(n,a,e):(Gt(a),Qt(a),en(n,a,e)),o=s,a=Me,e=c,i=t,a.keydownTarget&&a.keydownHandlerAdded&&(a.keydownTarget.removeEventListener("keydown",a.keydownHandler,{capture:a.keydownListenerCapture}),a.keydownHandlerAdded=!1),e.toast||(a.keydownHandler=e=>_t(o,e,i),a.keydownTarget=e.keydownListenerCapture?window:v(),a.keydownListenerCapture=e.keydownListenerCapture,a.keydownTarget.addEventListener("keydown",a.keydownHandler,{capture:a.keydownListenerCapture}),a.keydownHandlerAdded=!0),e=s,"select"===(a=c).input||"radio"===a.input?jt(e,a):["text","email","number","tel","textarea"].includes(a.input)&&(u(a.inputValue)||p(a.inputValue))&&(De(P()),Dt(e,a)),Bt(c),tn(Me,c,t),nn(r,c),setTimeout(()=>{r.container.scrollTop=0})})},update:function(t){var e=v(),n=he.innerParams.get(this);if(!e||N(e,n.hideClass.popup))return s("You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup.");const o={};Object.keys(t).forEach(e=>{ln.isUpdatableParameter(e)?o[e]=t[e]:s('Invalid parameter to update: "'.concat(e,'". Updatable params are listed here: https://github.com/sweetalert2/sweetalert2/blob/master/src/utils/params.js\n\nIf you think this parameter should be updatable, request it here: https://github.com/sweetalert2/sweetalert2/issues/new?template=02_feature_request.md'))}),n=Object.assign({},n,o),Oe(this,n),he.innerParams.set(this,n),Object.defineProperties(this,{params:{value:Object.assign({},this.params,t),writable:!1,enumerable:!0}})},_destroy:function(){var e=he.domCache.get(this);const t=he.innerParams.get(this);t&&(e.popup&&Me.swalCloseEventFinishedCallback&&(Me.swalCloseEventFinishedCallback(),delete Me.swalCloseEventFinishedCallback),Me.deferDisposalTimer&&(clearTimeout(Me.deferDisposalTimer),delete Me.deferDisposalTimer),"function"==typeof t.didDestroy&&t.didDestroy(),delete this.params,delete Me.keydownHandler,delete Me.keydownTarget,sn(he),sn(it),delete Me.currentInstance)}});let rn;class cn{constructor(...e){"undefined"!=typeof window&&(rn=this,e=Object.freeze(this.constructor.argsToParams(e)),Object.defineProperties(this,{params:{value:e,writable:!1,enumerable:!0,configurable:!0}}),e=this._main(this.params),he.promise.set(this,e))}then(e){const t=he.promise.get(this);return t.then(e)}finally(e){const t=he.promise.get(this);return t.finally(e)}}Object.assign(cn.prototype,e),Object.assign(cn,Je),Object.keys(e).forEach(t=>{cn[t]=function(...e){if(rn)return rn[t](...e)}}),cn.DismissReason=l,cn.version="11.1.5";const ln=cn;return ln.default=ln,ln}),void 0!==this&&this.Sweetalert2&&(this.swal=this.sweetAlert=this.Swal=this.SweetAlert=this.Sweetalert2); \ No newline at end of file diff --git a/npm/ng-packs/.eslintrc.json b/npm/ng-packs/.eslintrc.json index a3173a8a48..34bef07100 100644 --- a/npm/ng-packs/.eslintrc.json +++ b/npm/ng-packs/.eslintrc.json @@ -10,7 +10,7 @@ "error", { "enforceBuildableLibDependency": true, - "allow": [], + "allow": ["@abp/**/proxy"], "depConstraints": [ { "sourceTag": "*", @@ -20,7 +20,7 @@ } ] } - }, + }, { "files": ["*.ts", "*.tsx"], "extends": ["plugin:@nrwl/nx/typescript"], diff --git a/npm/ng-packs/apps/dev-app-e2e/tsconfig.json b/npm/ng-packs/apps/dev-app-e2e/tsconfig.json index 08841a7f56..ae9c474004 100644 --- a/npm/ng-packs/apps/dev-app-e2e/tsconfig.json +++ b/npm/ng-packs/apps/dev-app-e2e/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../tsconfig.json", "files": [], "include": [], "references": [ diff --git a/npm/ng-packs/apps/dev-app/tsconfig.json b/npm/ng-packs/apps/dev-app/tsconfig.json index 54586174b3..13552f8b6a 100644 --- a/npm/ng-packs/apps/dev-app/tsconfig.json +++ b/npm/ng-packs/apps/dev-app/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../tsconfig.json", "files": [], "include": [], "references": [ diff --git a/npm/ng-packs/nx.json b/npm/ng-packs/nx.json index 9e5e5a77da..f874c6bcab 100644 --- a/npm/ng-packs/nx.json +++ b/npm/ng-packs/nx.json @@ -31,13 +31,13 @@ "appsDir": "" }, "projects": { - "account": { + "account-core": { "tags": [], "implicitDependencies": ["core", "theme-shared"] }, - "account-core": { + "account": { "tags": [], - "implicitDependencies": ["core", "theme-shared"] + "implicitDependencies": ["core", "theme-shared", "account-core", "identity"] }, "components": { "tags": [], diff --git a/npm/ng-packs/package.json b/npm/ng-packs/package.json index da4d291dcd..6ba0a57603 100644 --- a/npm/ng-packs/package.json +++ b/npm/ng-packs/package.json @@ -48,7 +48,7 @@ "@abp/ng.tenant-management": "~4.4.2", "@abp/ng.theme.basic": "~4.4.2", "@abp/ng.theme.shared": "~4.4.2", - "@abp/utils": "^4.4.2", + "@abp/utils": "~4.4.2", "@angular-devkit/build-angular": "~12.2.0", "@angular-devkit/build-ng-packagr": "^0.1002.0", "@angular-devkit/schematics-cli": "~12.2.0", @@ -86,7 +86,7 @@ "@typescript-eslint/parser": "~4.28.3", "angular-oauth2-oidc": "^12.1.0", "bootstrap": "^4.5.0", - "chart.js": "^2.9.3", + "chart.js": "^3.5.1", "cypress": "^7.3.0", "dotenv": "~10.0.0", "eslint": "7.22.0", @@ -115,4 +115,4 @@ "typescript": "~4.3.5", "zone.js": "~0.11.4" } -} +} \ No newline at end of file diff --git a/npm/ng-packs/packages/account-core/proxy/ng-package.json b/npm/ng-packs/packages/account-core/proxy/ng-package.json new file mode 100644 index 0000000000..c764c8239c --- /dev/null +++ b/npm/ng-packs/packages/account-core/proxy/ng-package.json @@ -0,0 +1,7 @@ +{ + "$schema": "../../../node_modules/ng-packagr/ng-package.schema.json", + "dest": "../../../dist/packages/account-core/proxy", + "lib": { + "entryFile": "src/public-api.ts" + } +} diff --git a/npm/ng-packs/packages/account-core/proxy/src/lib/index.ts b/npm/ng-packs/packages/account-core/proxy/src/lib/index.ts new file mode 100644 index 0000000000..ba141bc403 --- /dev/null +++ b/npm/ng-packs/packages/account-core/proxy/src/lib/index.ts @@ -0,0 +1,2 @@ +export * from './proxy/account'; +export * from './proxy/identity'; diff --git a/npm/ng-packs/packages/account/src/lib/proxy/README.md b/npm/ng-packs/packages/account-core/proxy/src/lib/proxy/README.md similarity index 100% rename from npm/ng-packs/packages/account/src/lib/proxy/README.md rename to npm/ng-packs/packages/account-core/proxy/src/lib/proxy/README.md diff --git a/npm/ng-packs/packages/account-core/proxy/src/lib/proxy/account/account.service.ts b/npm/ng-packs/packages/account-core/proxy/src/lib/proxy/account/account.service.ts new file mode 100644 index 0000000000..adeb2ee5c9 --- /dev/null +++ b/npm/ng-packs/packages/account-core/proxy/src/lib/proxy/account/account.service.ts @@ -0,0 +1,37 @@ +import type { RegisterDto, ResetPasswordDto, SendPasswordResetCodeDto } from './models'; +import { RestService } from '@abp/ng.core'; +import { Injectable } from '@angular/core'; +import type { IdentityUserDto } from '../identity/models'; + +@Injectable({ + providedIn: 'root', +}) +export class AccountService { + apiName = 'AbpAccount'; + + register = (input: RegisterDto) => + this.restService.request({ + method: 'POST', + url: '/api/account/register', + body: input, + }, + { apiName: this.apiName }); + + resetPassword = (input: ResetPasswordDto) => + this.restService.request({ + method: 'POST', + url: '/api/account/reset-password', + body: input, + }, + { apiName: this.apiName }); + + sendPasswordResetCode = (input: SendPasswordResetCodeDto) => + this.restService.request({ + method: 'POST', + url: '/api/account/send-password-reset-code', + body: input, + }, + { apiName: this.apiName }); + + constructor(private restService: RestService) {} +} diff --git a/npm/ng-packs/packages/account/src/lib/proxy/account/index.ts b/npm/ng-packs/packages/account-core/proxy/src/lib/proxy/account/index.ts similarity index 100% rename from npm/ng-packs/packages/account/src/lib/proxy/account/index.ts rename to npm/ng-packs/packages/account-core/proxy/src/lib/proxy/account/index.ts diff --git a/npm/ng-packs/packages/account/src/lib/proxy/account/models.ts b/npm/ng-packs/packages/account-core/proxy/src/lib/proxy/account/models.ts similarity index 100% rename from npm/ng-packs/packages/account/src/lib/proxy/account/models.ts rename to npm/ng-packs/packages/account-core/proxy/src/lib/proxy/account/models.ts diff --git a/npm/ng-packs/packages/account-core/proxy/src/lib/proxy/account/web/areas/account/controllers/account.service.ts b/npm/ng-packs/packages/account-core/proxy/src/lib/proxy/account/web/areas/account/controllers/account.service.ts new file mode 100644 index 0000000000..8adf5385b0 --- /dev/null +++ b/npm/ng-packs/packages/account-core/proxy/src/lib/proxy/account/web/areas/account/controllers/account.service.ts @@ -0,0 +1,35 @@ +import type { AbpLoginResult, UserLoginInfo } from './models/models'; +import { RestService } from '@abp/ng.core'; +import { Injectable } from '@angular/core'; + +@Injectable({ + providedIn: 'root', +}) +export class AccountService { + apiName = 'AbpAccount'; + + checkPasswordByLogin = (login: UserLoginInfo) => + this.restService.request({ + method: 'POST', + url: '/api/account/check-password', + body: login, + }, + { apiName: this.apiName }); + + loginByLogin = (login: UserLoginInfo) => + this.restService.request({ + method: 'POST', + url: '/api/account/login', + body: login, + }, + { apiName: this.apiName }); + + logout = () => + this.restService.request({ + method: 'GET', + url: '/api/account/logout', + }, + { apiName: this.apiName }); + + constructor(private restService: RestService) {} +} diff --git a/npm/ng-packs/packages/account/src/lib/proxy/account/web/areas/account/controllers/index.ts b/npm/ng-packs/packages/account-core/proxy/src/lib/proxy/account/web/areas/account/controllers/index.ts similarity index 100% rename from npm/ng-packs/packages/account/src/lib/proxy/account/web/areas/account/controllers/index.ts rename to npm/ng-packs/packages/account-core/proxy/src/lib/proxy/account/web/areas/account/controllers/index.ts diff --git a/npm/ng-packs/packages/account/src/lib/proxy/account/web/areas/account/controllers/models/index.ts b/npm/ng-packs/packages/account-core/proxy/src/lib/proxy/account/web/areas/account/controllers/models/index.ts similarity index 100% rename from npm/ng-packs/packages/account/src/lib/proxy/account/web/areas/account/controllers/models/index.ts rename to npm/ng-packs/packages/account-core/proxy/src/lib/proxy/account/web/areas/account/controllers/models/index.ts diff --git a/npm/ng-packs/packages/account/src/lib/proxy/account/web/areas/account/controllers/models/login-result-type.enum.ts b/npm/ng-packs/packages/account-core/proxy/src/lib/proxy/account/web/areas/account/controllers/models/login-result-type.enum.ts similarity index 100% rename from npm/ng-packs/packages/account/src/lib/proxy/account/web/areas/account/controllers/models/login-result-type.enum.ts rename to npm/ng-packs/packages/account-core/proxy/src/lib/proxy/account/web/areas/account/controllers/models/login-result-type.enum.ts diff --git a/npm/ng-packs/packages/account/src/lib/proxy/account/web/areas/account/controllers/models/models.ts b/npm/ng-packs/packages/account-core/proxy/src/lib/proxy/account/web/areas/account/controllers/models/models.ts similarity index 100% rename from npm/ng-packs/packages/account/src/lib/proxy/account/web/areas/account/controllers/models/models.ts rename to npm/ng-packs/packages/account-core/proxy/src/lib/proxy/account/web/areas/account/controllers/models/models.ts diff --git a/npm/ng-packs/packages/account/src/lib/proxy/account/web/areas/account/index.ts b/npm/ng-packs/packages/account-core/proxy/src/lib/proxy/account/web/areas/account/index.ts similarity index 100% rename from npm/ng-packs/packages/account/src/lib/proxy/account/web/areas/account/index.ts rename to npm/ng-packs/packages/account-core/proxy/src/lib/proxy/account/web/areas/account/index.ts diff --git a/npm/ng-packs/packages/account/src/lib/proxy/account/web/areas/index.ts b/npm/ng-packs/packages/account-core/proxy/src/lib/proxy/account/web/areas/index.ts similarity index 100% rename from npm/ng-packs/packages/account/src/lib/proxy/account/web/areas/index.ts rename to npm/ng-packs/packages/account-core/proxy/src/lib/proxy/account/web/areas/index.ts diff --git a/npm/ng-packs/packages/account/src/lib/proxy/account/web/index.ts b/npm/ng-packs/packages/account-core/proxy/src/lib/proxy/account/web/index.ts similarity index 100% rename from npm/ng-packs/packages/account/src/lib/proxy/account/web/index.ts rename to npm/ng-packs/packages/account-core/proxy/src/lib/proxy/account/web/index.ts diff --git a/npm/ng-packs/packages/account/src/lib/proxy/generate-proxy.json b/npm/ng-packs/packages/account-core/proxy/src/lib/proxy/generate-proxy.json similarity index 95% rename from npm/ng-packs/packages/account/src/lib/proxy/generate-proxy.json rename to npm/ng-packs/packages/account-core/proxy/src/lib/proxy/generate-proxy.json index ff7a22c89b..5c24149a66 100644 --- a/npm/ng-packs/packages/account/src/lib/proxy/generate-proxy.json +++ b/npm/ng-packs/packages/account-core/proxy/src/lib/proxy/generate-proxy.json @@ -3,56 +3,140 @@ "account" ], "modules": { - "settingManagement": { - "rootPath": "settingManagement", - "remoteServiceName": "SettingManagement", + "featureManagement": { + "rootPath": "featureManagement", + "remoteServiceName": "AbpFeatureManagement", "controllers": { - "Volo.Abp.SettingManagement.EmailSettingsController": { - "controllerName": "EmailSettings", - "type": "Volo.Abp.SettingManagement.EmailSettingsController", + "Volo.Abp.FeatureManagement.FeaturesController": { + "controllerName": "Features", + "controllerGroupName": "Features", + "type": "Volo.Abp.FeatureManagement.FeaturesController", "interfaces": [ { - "type": "Volo.Abp.SettingManagement.IEmailSettingsAppService" + "type": "Volo.Abp.FeatureManagement.IFeatureAppService" } ], "actions": { - "GetAsync": { - "uniqueName": "GetAsync", + "GetAsyncByProviderNameAndProviderKey": { + "uniqueName": "GetAsyncByProviderNameAndProviderKey", "name": "GetAsync", "httpMethod": "GET", - "url": "api/setting-management/emailing", + "url": "api/feature-management/features", "supportedVersions": [], - "parametersOnMethod": [], - "parameters": [], + "parametersOnMethod": [ + { + "name": "providerName", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "providerKey", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "providerName", + "name": "providerName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "" + }, + { + "nameOnMethod": "providerKey", + "name": "providerKey", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "" + } + ], "returnValue": { - "type": "Volo.Abp.SettingManagement.EmailSettingsDto", - "typeSimple": "Volo.Abp.SettingManagement.EmailSettingsDto" + "type": "Volo.Abp.FeatureManagement.GetFeatureListResultDto", + "typeSimple": "Volo.Abp.FeatureManagement.GetFeatureListResultDto" }, - "allowAnonymous": null + "allowAnonymous": null, + "implementFrom": "Volo.Abp.FeatureManagement.IFeatureAppService" }, - "UpdateAsyncByInput": { - "uniqueName": "UpdateAsyncByInput", + "UpdateAsyncByProviderNameAndProviderKeyAndInput": { + "uniqueName": "UpdateAsyncByProviderNameAndProviderKeyAndInput", "name": "UpdateAsync", - "httpMethod": "POST", - "url": "api/setting-management/emailing", + "httpMethod": "PUT", + "url": "api/feature-management/features", "supportedVersions": [], "parametersOnMethod": [ + { + "name": "providerName", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "providerKey", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, { "name": "input", - "typeAsString": "Volo.Abp.SettingManagement.UpdateEmailSettingsDto, Volo.Abp.SettingManagement.Application.Contracts", - "type": "Volo.Abp.SettingManagement.UpdateEmailSettingsDto", - "typeSimple": "Volo.Abp.SettingManagement.UpdateEmailSettingsDto", + "typeAsString": "Volo.Abp.FeatureManagement.UpdateFeaturesDto, Volo.Abp.FeatureManagement.Application.Contracts", + "type": "Volo.Abp.FeatureManagement.UpdateFeaturesDto", + "typeSimple": "Volo.Abp.FeatureManagement.UpdateFeaturesDto", "isOptional": false, "defaultValue": null } ], "parameters": [ + { + "nameOnMethod": "providerName", + "name": "providerName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "" + }, + { + "nameOnMethod": "providerKey", + "name": "providerKey", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "" + }, { "nameOnMethod": "input", "name": "input", "jsonName": null, - "type": "Volo.Abp.SettingManagement.UpdateEmailSettingsDto", - "typeSimple": "Volo.Abp.SettingManagement.UpdateEmailSettingsDto", + "type": "Volo.Abp.FeatureManagement.UpdateFeaturesDto", + "typeSimple": "Volo.Abp.FeatureManagement.UpdateFeaturesDto", "isOptional": false, "defaultValue": null, "constraintTypes": null, @@ -64,36 +148,38 @@ "type": "System.Void", "typeSimple": "System.Void" }, - "allowAnonymous": null + "allowAnonymous": null, + "implementFrom": "Volo.Abp.FeatureManagement.IFeatureAppService" } } } } }, - "abp": { - "rootPath": "abp", - "remoteServiceName": "abp", + "multi-tenancy": { + "rootPath": "multi-tenancy", + "remoteServiceName": "AbpTenantManagement", "controllers": { - "Pages.Abp.MultiTenancy.AbpTenantController": { - "controllerName": "AbpTenant", - "type": "Pages.Abp.MultiTenancy.AbpTenantController", + "Volo.Abp.TenantManagement.TenantController": { + "controllerName": "Tenant", + "controllerGroupName": "Tenant", + "type": "Volo.Abp.TenantManagement.TenantController", "interfaces": [ { - "type": "Volo.Abp.AspNetCore.Mvc.MultiTenancy.IAbpTenantAppService" + "type": "Volo.Abp.TenantManagement.ITenantAppService" } ], "actions": { - "FindTenantByNameAsyncByName": { - "uniqueName": "FindTenantByNameAsyncByName", - "name": "FindTenantByNameAsync", + "GetAsyncById": { + "uniqueName": "GetAsyncById", + "name": "GetAsync", "httpMethod": "GET", - "url": "api/abp/multi-tenancy/tenants/by-name/{name}", + "url": "api/multi-tenancy/tenants/{id}", "supportedVersions": [], "parametersOnMethod": [ { - "name": "name", - "typeAsString": "System.String, System.Private.CoreLib", - "type": "System.String", + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", "typeSimple": "string", "isOptional": false, "defaultValue": null @@ -101,10 +187,10 @@ ], "parameters": [ { - "nameOnMethod": "name", - "name": "name", + "nameOnMethod": "id", + "name": "id", "jsonName": null, - "type": "System.String", + "type": "System.Guid", "typeSimple": "string", "isOptional": false, "defaultValue": null, @@ -114,16 +200,127 @@ } ], "returnValue": { - "type": "Volo.Abp.AspNetCore.Mvc.MultiTenancy.FindTenantResultDto", - "typeSimple": "Volo.Abp.AspNetCore.Mvc.MultiTenancy.FindTenantResultDto" + "type": "Volo.Abp.TenantManagement.TenantDto", + "typeSimple": "Volo.Abp.TenantManagement.TenantDto" }, - "allowAnonymous": null + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.IReadOnlyAppService" }, - "FindTenantByIdAsyncById": { - "uniqueName": "FindTenantByIdAsyncById", - "name": "FindTenantByIdAsync", + "GetListAsyncByInput": { + "uniqueName": "GetListAsyncByInput", + "name": "GetListAsync", "httpMethod": "GET", - "url": "api/abp/multi-tenancy/tenants/by-id/{id}", + "url": "api/multi-tenancy/tenants", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "Volo.Abp.TenantManagement.GetTenantsInput, Volo.Abp.TenantManagement.Application.Contracts", + "type": "Volo.Abp.TenantManagement.GetTenantsInput", + "typeSimple": "Volo.Abp.TenantManagement.GetTenantsInput", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "input", + "name": "Filter", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "Sorting", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "SkipCount", + "jsonName": null, + "type": "System.Int32", + "typeSimple": "number", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "MaxResultCount", + "jsonName": null, + "type": "System.Int32", + "typeSimple": "number", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + } + ], + "returnValue": { + "type": "Volo.Abp.Application.Dtos.PagedResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.IReadOnlyAppService" + }, + "CreateAsyncByInput": { + "uniqueName": "CreateAsyncByInput", + "name": "CreateAsync", + "httpMethod": "POST", + "url": "api/multi-tenancy/tenants", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "Volo.Abp.TenantManagement.TenantCreateDto, Volo.Abp.TenantManagement.Application.Contracts", + "type": "Volo.Abp.TenantManagement.TenantCreateDto", + "typeSimple": "Volo.Abp.TenantManagement.TenantCreateDto", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Volo.Abp.TenantManagement.TenantCreateDto", + "typeSimple": "Volo.Abp.TenantManagement.TenantCreateDto", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.Abp.TenantManagement.TenantDto", + "typeSimple": "Volo.Abp.TenantManagement.TenantDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.ICreateAppService" + }, + "UpdateAsyncByIdAndInput": { + "uniqueName": "UpdateAsyncByIdAndInput", + "name": "UpdateAsync", + "httpMethod": "PUT", + "url": "api/multi-tenancy/tenants/{id}", "supportedVersions": [], "parametersOnMethod": [ { @@ -133,6 +330,14 @@ "typeSimple": "string", "isOptional": false, "defaultValue": null + }, + { + "name": "input", + "typeAsString": "Volo.Abp.TenantManagement.TenantUpdateDto, Volo.Abp.TenantManagement.Application.Contracts", + "type": "Volo.Abp.TenantManagement.TenantUpdateDto", + "typeSimple": "Volo.Abp.TenantManagement.TenantUpdateDto", + "isOptional": false, + "defaultValue": null } ], "parameters": [ @@ -147,185 +352,206 @@ "constraintTypes": [], "bindingSourceId": "Path", "descriptorName": "" + }, + { + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Volo.Abp.TenantManagement.TenantUpdateDto", + "typeSimple": "Volo.Abp.TenantManagement.TenantUpdateDto", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" } ], "returnValue": { - "type": "Volo.Abp.AspNetCore.Mvc.MultiTenancy.FindTenantResultDto", - "typeSimple": "Volo.Abp.AspNetCore.Mvc.MultiTenancy.FindTenantResultDto" + "type": "Volo.Abp.TenantManagement.TenantDto", + "typeSimple": "Volo.Abp.TenantManagement.TenantDto" }, - "allowAnonymous": null - } - } - }, - "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationController": { - "controllerName": "AbpApplicationConfiguration", - "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationController", - "interfaces": [ - { - "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.IAbpApplicationConfigurationAppService" - } - ], - "actions": { - "GetAsync": { - "uniqueName": "GetAsync", - "name": "GetAsync", - "httpMethod": "GET", - "url": "api/abp/application-configuration", + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.IUpdateAppService" + }, + "DeleteAsyncById": { + "uniqueName": "DeleteAsyncById", + "name": "DeleteAsync", + "httpMethod": "DELETE", + "url": "api/multi-tenancy/tenants/{id}", "supportedVersions": [], - "parametersOnMethod": [], - "parameters": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], "returnValue": { - "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationConfigurationDto", - "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationConfigurationDto" + "type": "System.Void", + "typeSimple": "System.Void" }, - "allowAnonymous": null - } - } - }, - "Volo.Abp.AspNetCore.Mvc.ApiExploring.AbpApiDefinitionController": { - "controllerName": "AbpApiDefinition", - "type": "Volo.Abp.AspNetCore.Mvc.ApiExploring.AbpApiDefinitionController", - "interfaces": [], - "actions": { - "GetByModel": { - "uniqueName": "GetByModel", - "name": "Get", + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.IDeleteAppService" + }, + "GetDefaultConnectionStringAsyncById": { + "uniqueName": "GetDefaultConnectionStringAsyncById", + "name": "GetDefaultConnectionStringAsync", "httpMethod": "GET", - "url": "api/abp/api-definition", + "url": "api/multi-tenancy/tenants/{id}/default-connection-string", "supportedVersions": [], "parametersOnMethod": [ { - "name": "model", - "typeAsString": "Volo.Abp.Http.Modeling.ApplicationApiDescriptionModelRequestDto, Volo.Abp.Http", - "type": "Volo.Abp.Http.Modeling.ApplicationApiDescriptionModelRequestDto", - "typeSimple": "Volo.Abp.Http.Modeling.ApplicationApiDescriptionModelRequestDto", + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", "isOptional": false, "defaultValue": null } ], "parameters": [ { - "nameOnMethod": "model", - "name": "IncludeTypes", + "nameOnMethod": "id", + "name": "id", "jsonName": null, - "type": "System.Boolean", - "typeSimple": "boolean", + "type": "System.Guid", + "typeSimple": "string", "isOptional": false, "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "model" + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" } ], "returnValue": { - "type": "Volo.Abp.Http.Modeling.ApplicationApiDescriptionModel", - "typeSimple": "Volo.Abp.Http.Modeling.ApplicationApiDescriptionModel" + "type": "System.String", + "typeSimple": "string" }, - "allowAnonymous": null - } - } - } - } - }, - "account": { - "rootPath": "account", - "remoteServiceName": "AbpAccount", - "controllers": { - "Volo.Abp.Account.Web.Areas.Account.Controllers.AccountController": { - "controllerName": "Account", - "type": "Volo.Abp.Account.Web.Areas.Account.Controllers.AccountController", - "interfaces": [], - "actions": { - "LoginByLogin": { - "uniqueName": "LoginByLogin", - "name": "Login", - "httpMethod": "POST", - "url": "api/account/login", + "allowAnonymous": null, + "implementFrom": "Volo.Abp.TenantManagement.ITenantAppService" + }, + "UpdateDefaultConnectionStringAsyncByIdAndDefaultConnectionString": { + "uniqueName": "UpdateDefaultConnectionStringAsyncByIdAndDefaultConnectionString", + "name": "UpdateDefaultConnectionStringAsync", + "httpMethod": "PUT", + "url": "api/multi-tenancy/tenants/{id}/default-connection-string", "supportedVersions": [], "parametersOnMethod": [ { - "name": "login", - "typeAsString": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo, Volo.Abp.Account.Web", - "type": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo", - "typeSimple": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo", + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "defaultConnectionString", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", "isOptional": false, "defaultValue": null } ], "parameters": [ { - "nameOnMethod": "login", - "name": "login", + "nameOnMethod": "id", + "name": "id", "jsonName": null, - "type": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo", - "typeSimple": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + }, + { + "nameOnMethod": "defaultConnectionString", + "name": "defaultConnectionString", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", "isOptional": false, "defaultValue": null, "constraintTypes": null, - "bindingSourceId": "Body", + "bindingSourceId": "ModelBinding", "descriptorName": "" } ], - "returnValue": { - "type": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.AbpLoginResult", - "typeSimple": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.AbpLoginResult" - }, - "allowAnonymous": null - }, - "Logout": { - "uniqueName": "Logout", - "name": "Logout", - "httpMethod": "GET", - "url": "api/account/logout", - "supportedVersions": [], - "parametersOnMethod": [], - "parameters": [], "returnValue": { "type": "System.Void", "typeSimple": "System.Void" }, - "allowAnonymous": null + "allowAnonymous": null, + "implementFrom": "Volo.Abp.TenantManagement.ITenantAppService" }, - "CheckPasswordByLogin": { - "uniqueName": "CheckPasswordByLogin", - "name": "CheckPassword", - "httpMethod": "POST", - "url": "api/account/check-password", + "DeleteDefaultConnectionStringAsyncById": { + "uniqueName": "DeleteDefaultConnectionStringAsyncById", + "name": "DeleteDefaultConnectionStringAsync", + "httpMethod": "DELETE", + "url": "api/multi-tenancy/tenants/{id}/default-connection-string", "supportedVersions": [], "parametersOnMethod": [ { - "name": "login", - "typeAsString": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo, Volo.Abp.Account.Web", - "type": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo", - "typeSimple": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo", + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", "isOptional": false, "defaultValue": null } ], "parameters": [ { - "nameOnMethod": "login", - "name": "login", + "nameOnMethod": "id", + "name": "id", "jsonName": null, - "type": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo", - "typeSimple": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo", + "type": "System.Guid", + "typeSimple": "string", "isOptional": false, "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Body", + "constraintTypes": [], + "bindingSourceId": "Path", "descriptorName": "" } ], "returnValue": { - "type": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.AbpLoginResult", - "typeSimple": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.AbpLoginResult" + "type": "System.Void", + "typeSimple": "System.Void" }, - "allowAnonymous": null + "allowAnonymous": null, + "implementFrom": "Volo.Abp.TenantManagement.ITenantAppService" } } - }, + } + } + }, + "account": { + "rootPath": "account", + "remoteServiceName": "AbpAccount", + "controllers": { "Volo.Abp.Account.AccountController": { "controllerName": "Account", + "controllerGroupName": "Account", "type": "Volo.Abp.Account.AccountController", "interfaces": [ { @@ -367,7 +593,8 @@ "type": "Volo.Abp.Identity.IdentityUserDto", "typeSimple": "Volo.Abp.Identity.IdentityUserDto" }, - "allowAnonymous": null + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Account.IAccountAppService" }, "SendPasswordResetCodeAsyncByInput": { "uniqueName": "SendPasswordResetCodeAsyncByInput", @@ -403,7 +630,8 @@ "type": "System.Void", "typeSimple": "System.Void" }, - "allowAnonymous": null + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Account.IAccountAppService" }, "ResetPasswordAsyncByInput": { "uniqueName": "ResetPasswordAsyncByInput", @@ -439,144 +667,162 @@ "type": "System.Void", "typeSimple": "System.Void" }, - "allowAnonymous": null + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Account.IAccountAppService" } } - } - } - }, - "permissionManagement": { - "rootPath": "permissionManagement", - "remoteServiceName": "AbpPermissionManagement", - "controllers": { - "Volo.Abp.PermissionManagement.PermissionsController": { - "controllerName": "Permissions", - "type": "Volo.Abp.PermissionManagement.PermissionsController", - "interfaces": [ - { - "type": "Volo.Abp.PermissionManagement.IPermissionAppService" - } - ], + }, + "Volo.Abp.Account.Web.Areas.Account.Controllers.AccountController": { + "controllerName": "Account", + "controllerGroupName": "Login", + "type": "Volo.Abp.Account.Web.Areas.Account.Controllers.AccountController", + "interfaces": [], "actions": { - "GetAsyncByProviderNameAndProviderKey": { - "uniqueName": "GetAsyncByProviderNameAndProviderKey", - "name": "GetAsync", - "httpMethod": "GET", - "url": "api/permission-management/permissions", + "LoginByLogin": { + "uniqueName": "LoginByLogin", + "name": "Login", + "httpMethod": "POST", + "url": "api/account/login", "supportedVersions": [], "parametersOnMethod": [ { - "name": "providerName", - "typeAsString": "System.String, System.Private.CoreLib", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - }, - { - "name": "providerKey", - "typeAsString": "System.String, System.Private.CoreLib", - "type": "System.String", - "typeSimple": "string", + "name": "login", + "typeAsString": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo, Volo.Abp.Account.Web", + "type": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo", + "typeSimple": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo", "isOptional": false, "defaultValue": null } ], "parameters": [ { - "nameOnMethod": "providerName", - "name": "providerName", - "jsonName": null, - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "" - }, - { - "nameOnMethod": "providerKey", - "name": "providerKey", + "nameOnMethod": "login", + "name": "login", "jsonName": null, - "type": "System.String", - "typeSimple": "string", + "type": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo", + "typeSimple": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo", "isOptional": false, "defaultValue": null, "constraintTypes": null, - "bindingSourceId": "ModelBinding", + "bindingSourceId": "Body", "descriptorName": "" } ], "returnValue": { - "type": "Volo.Abp.PermissionManagement.GetPermissionListResultDto", - "typeSimple": "Volo.Abp.PermissionManagement.GetPermissionListResultDto" + "type": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.AbpLoginResult", + "typeSimple": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.AbpLoginResult" }, - "allowAnonymous": null + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Account.Web.Areas.Account.Controllers.AccountController" }, - "UpdateAsyncByProviderNameAndProviderKeyAndInput": { - "uniqueName": "UpdateAsyncByProviderNameAndProviderKeyAndInput", - "name": "UpdateAsync", - "httpMethod": "PUT", - "url": "api/permission-management/permissions", + "Logout": { + "uniqueName": "Logout", + "name": "Logout", + "httpMethod": "GET", + "url": "api/account/logout", + "supportedVersions": [], + "parametersOnMethod": [], + "parameters": [], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Account.Web.Areas.Account.Controllers.AccountController" + }, + "CheckPasswordByLogin": { + "uniqueName": "CheckPasswordByLogin", + "name": "CheckPassword", + "httpMethod": "POST", + "url": "api/account/check-password", "supportedVersions": [], "parametersOnMethod": [ { - "name": "providerName", - "typeAsString": "System.String, System.Private.CoreLib", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - }, - { - "name": "providerKey", - "typeAsString": "System.String, System.Private.CoreLib", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - }, - { - "name": "input", - "typeAsString": "Volo.Abp.PermissionManagement.UpdatePermissionsDto, Volo.Abp.PermissionManagement.Application.Contracts", - "type": "Volo.Abp.PermissionManagement.UpdatePermissionsDto", - "typeSimple": "Volo.Abp.PermissionManagement.UpdatePermissionsDto", + "name": "login", + "typeAsString": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo, Volo.Abp.Account.Web", + "type": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo", + "typeSimple": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo", "isOptional": false, "defaultValue": null } ], "parameters": [ { - "nameOnMethod": "providerName", - "name": "providerName", + "nameOnMethod": "login", + "name": "login", "jsonName": null, - "type": "System.String", - "typeSimple": "string", + "type": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo", + "typeSimple": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo", "isOptional": false, "defaultValue": null, "constraintTypes": null, - "bindingSourceId": "ModelBinding", + "bindingSourceId": "Body", "descriptorName": "" - }, + } + ], + "returnValue": { + "type": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.AbpLoginResult", + "typeSimple": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.AbpLoginResult" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Account.Web.Areas.Account.Controllers.AccountController" + } + } + } + } + }, + "settingManagement": { + "rootPath": "settingManagement", + "remoteServiceName": "SettingManagement", + "controllers": { + "Volo.Abp.SettingManagement.EmailSettingsController": { + "controllerName": "EmailSettings", + "controllerGroupName": "EmailSettings", + "type": "Volo.Abp.SettingManagement.EmailSettingsController", + "interfaces": [ + { + "type": "Volo.Abp.SettingManagement.IEmailSettingsAppService" + } + ], + "actions": { + "GetAsync": { + "uniqueName": "GetAsync", + "name": "GetAsync", + "httpMethod": "GET", + "url": "api/setting-management/emailing", + "supportedVersions": [], + "parametersOnMethod": [], + "parameters": [], + "returnValue": { + "type": "Volo.Abp.SettingManagement.EmailSettingsDto", + "typeSimple": "Volo.Abp.SettingManagement.EmailSettingsDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.SettingManagement.IEmailSettingsAppService" + }, + "UpdateAsyncByInput": { + "uniqueName": "UpdateAsyncByInput", + "name": "UpdateAsync", + "httpMethod": "POST", + "url": "api/setting-management/emailing", + "supportedVersions": [], + "parametersOnMethod": [ { - "nameOnMethod": "providerKey", - "name": "providerKey", - "jsonName": null, - "type": "System.String", - "typeSimple": "string", + "name": "input", + "typeAsString": "Volo.Abp.SettingManagement.UpdateEmailSettingsDto, Volo.Abp.SettingManagement.Application.Contracts", + "type": "Volo.Abp.SettingManagement.UpdateEmailSettingsDto", + "typeSimple": "Volo.Abp.SettingManagement.UpdateEmailSettingsDto", "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "" - }, + "defaultValue": null + } + ], + "parameters": [ { "nameOnMethod": "input", "name": "input", "jsonName": null, - "type": "Volo.Abp.PermissionManagement.UpdatePermissionsDto", - "typeSimple": "Volo.Abp.PermissionManagement.UpdatePermissionsDto", + "type": "Volo.Abp.SettingManagement.UpdateEmailSettingsDto", + "typeSimple": "Volo.Abp.SettingManagement.UpdateEmailSettingsDto", "isOptional": false, "defaultValue": null, "constraintTypes": null, @@ -588,59 +834,55 @@ "type": "System.Void", "typeSimple": "System.Void" }, - "allowAnonymous": null + "allowAnonymous": null, + "implementFrom": "Volo.Abp.SettingManagement.IEmailSettingsAppService" } } } } }, - "identity": { - "rootPath": "identity", - "remoteServiceName": "AbpIdentity", + "permissionManagement": { + "rootPath": "permissionManagement", + "remoteServiceName": "AbpPermissionManagement", "controllers": { - "Volo.Abp.Identity.IdentityRoleController": { - "controllerName": "IdentityRole", - "type": "Volo.Abp.Identity.IdentityRoleController", + "Volo.Abp.PermissionManagement.PermissionsController": { + "controllerName": "Permissions", + "controllerGroupName": "Permissions", + "type": "Volo.Abp.PermissionManagement.PermissionsController", "interfaces": [ { - "type": "Volo.Abp.Identity.IIdentityRoleAppService" + "type": "Volo.Abp.PermissionManagement.IPermissionAppService" } ], "actions": { - "GetAllListAsync": { - "uniqueName": "GetAllListAsync", - "name": "GetAllListAsync", - "httpMethod": "GET", - "url": "api/identity/roles/all", - "supportedVersions": [], - "parametersOnMethod": [], - "parameters": [], - "returnValue": { - "type": "Volo.Abp.Application.Dtos.ListResultDto", - "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" - }, - "allowAnonymous": null - }, - "GetListAsyncByInput": { - "uniqueName": "GetListAsyncByInput", - "name": "GetListAsync", + "GetAsyncByProviderNameAndProviderKey": { + "uniqueName": "GetAsyncByProviderNameAndProviderKey", + "name": "GetAsync", "httpMethod": "GET", - "url": "api/identity/roles", + "url": "api/permission-management/permissions", "supportedVersions": [], "parametersOnMethod": [ { - "name": "input", - "typeAsString": "Volo.Abp.Identity.GetIdentityRolesInput, Volo.Abp.Identity.Application.Contracts", - "type": "Volo.Abp.Identity.GetIdentityRolesInput", - "typeSimple": "Volo.Abp.Identity.GetIdentityRolesInput", + "name": "providerName", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "providerKey", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", "isOptional": false, "defaultValue": null } ], "parameters": [ { - "nameOnMethod": "input", - "name": "Filter", + "nameOnMethod": "providerName", + "name": "providerName", "jsonName": null, "type": "System.String", "typeSimple": "string", @@ -648,11 +890,11 @@ "defaultValue": null, "constraintTypes": null, "bindingSourceId": "ModelBinding", - "descriptorName": "input" + "descriptorName": "" }, { - "nameOnMethod": "input", - "name": "Sorting", + "nameOnMethod": "providerKey", + "name": "providerKey", "jsonName": null, "type": "System.String", "typeSimple": "string", @@ -660,98 +902,79 @@ "defaultValue": null, "constraintTypes": null, "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "SkipCount", - "jsonName": null, - "type": "System.Int32", - "typeSimple": "number", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "MaxResultCount", - "jsonName": null, - "type": "System.Int32", - "typeSimple": "number", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" + "descriptorName": "" } ], "returnValue": { - "type": "Volo.Abp.Application.Dtos.PagedResultDto", - "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" + "type": "Volo.Abp.PermissionManagement.GetPermissionListResultDto", + "typeSimple": "Volo.Abp.PermissionManagement.GetPermissionListResultDto" }, - "allowAnonymous": null + "allowAnonymous": null, + "implementFrom": "Volo.Abp.PermissionManagement.IPermissionAppService" }, - "GetAsyncById": { - "uniqueName": "GetAsyncById", - "name": "GetAsync", - "httpMethod": "GET", - "url": "api/identity/roles/{id}", + "UpdateAsyncByProviderNameAndProviderKeyAndInput": { + "uniqueName": "UpdateAsyncByProviderNameAndProviderKeyAndInput", + "name": "UpdateAsync", + "httpMethod": "PUT", + "url": "api/permission-management/permissions", "supportedVersions": [], "parametersOnMethod": [ { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", + "name": "providerName", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "providerKey", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", "typeSimple": "string", "isOptional": false, "defaultValue": null + }, + { + "name": "input", + "typeAsString": "Volo.Abp.PermissionManagement.UpdatePermissionsDto, Volo.Abp.PermissionManagement.Application.Contracts", + "type": "Volo.Abp.PermissionManagement.UpdatePermissionsDto", + "typeSimple": "Volo.Abp.PermissionManagement.UpdatePermissionsDto", + "isOptional": false, + "defaultValue": null } ], "parameters": [ { - "nameOnMethod": "id", - "name": "id", + "nameOnMethod": "providerName", + "name": "providerName", "jsonName": null, - "type": "System.Guid", + "type": "System.String", "typeSimple": "string", "isOptional": false, "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", + "constraintTypes": null, + "bindingSourceId": "ModelBinding", "descriptorName": "" - } - ], - "returnValue": { - "type": "Volo.Abp.Identity.IdentityRoleDto", - "typeSimple": "Volo.Abp.Identity.IdentityRoleDto" - }, - "allowAnonymous": null - }, - "CreateAsyncByInput": { - "uniqueName": "CreateAsyncByInput", - "name": "CreateAsync", - "httpMethod": "POST", - "url": "api/identity/roles", - "supportedVersions": [], - "parametersOnMethod": [ + }, { - "name": "input", - "typeAsString": "Volo.Abp.Identity.IdentityRoleCreateDto, Volo.Abp.Identity.Application.Contracts", - "type": "Volo.Abp.Identity.IdentityRoleCreateDto", - "typeSimple": "Volo.Abp.Identity.IdentityRoleCreateDto", + "nameOnMethod": "providerKey", + "name": "providerKey", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "" + }, { "nameOnMethod": "input", "name": "input", "jsonName": null, - "type": "Volo.Abp.Identity.IdentityRoleCreateDto", - "typeSimple": "Volo.Abp.Identity.IdentityRoleCreateDto", + "type": "Volo.Abp.PermissionManagement.UpdatePermissionsDto", + "typeSimple": "Volo.Abp.PermissionManagement.UpdatePermissionsDto", "isOptional": false, "defaultValue": null, "constraintTypes": null, @@ -760,72 +983,72 @@ } ], "returnValue": { - "type": "Volo.Abp.Identity.IdentityRoleDto", - "typeSimple": "Volo.Abp.Identity.IdentityRoleDto" + "type": "System.Void", + "typeSimple": "System.Void" }, - "allowAnonymous": null - }, - "UpdateAsyncByIdAndInput": { - "uniqueName": "UpdateAsyncByIdAndInput", - "name": "UpdateAsync", - "httpMethod": "PUT", - "url": "api/identity/roles/{id}", + "allowAnonymous": null, + "implementFrom": "Volo.Abp.PermissionManagement.IPermissionAppService" + } + } + } + } + }, + "abp": { + "rootPath": "abp", + "remoteServiceName": "abp", + "controllers": { + "Pages.Abp.MultiTenancy.AbpTenantController": { + "controllerName": "AbpTenant", + "controllerGroupName": "AbpTenant", + "type": "Pages.Abp.MultiTenancy.AbpTenantController", + "interfaces": [ + { + "type": "Volo.Abp.AspNetCore.Mvc.MultiTenancy.IAbpTenantAppService" + } + ], + "actions": { + "FindTenantByNameAsyncByName": { + "uniqueName": "FindTenantByNameAsyncByName", + "name": "FindTenantByNameAsync", + "httpMethod": "GET", + "url": "api/abp/multi-tenancy/tenants/by-name/{name}", "supportedVersions": [], "parametersOnMethod": [ { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", + "name": "name", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", "typeSimple": "string", "isOptional": false, "defaultValue": null - }, - { - "name": "input", - "typeAsString": "Volo.Abp.Identity.IdentityRoleUpdateDto, Volo.Abp.Identity.Application.Contracts", - "type": "Volo.Abp.Identity.IdentityRoleUpdateDto", - "typeSimple": "Volo.Abp.Identity.IdentityRoleUpdateDto", - "isOptional": false, - "defaultValue": null } ], "parameters": [ { - "nameOnMethod": "id", - "name": "id", + "nameOnMethod": "name", + "name": "name", "jsonName": null, - "type": "System.Guid", + "type": "System.String", "typeSimple": "string", "isOptional": false, "defaultValue": null, "constraintTypes": [], "bindingSourceId": "Path", "descriptorName": "" - }, - { - "nameOnMethod": "input", - "name": "input", - "jsonName": null, - "type": "Volo.Abp.Identity.IdentityRoleUpdateDto", - "typeSimple": "Volo.Abp.Identity.IdentityRoleUpdateDto", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Body", - "descriptorName": "" } ], "returnValue": { - "type": "Volo.Abp.Identity.IdentityRoleDto", - "typeSimple": "Volo.Abp.Identity.IdentityRoleDto" + "type": "Volo.Abp.AspNetCore.Mvc.MultiTenancy.FindTenantResultDto", + "typeSimple": "Volo.Abp.AspNetCore.Mvc.MultiTenancy.FindTenantResultDto" }, - "allowAnonymous": null + "allowAnonymous": null, + "implementFrom": "Volo.Abp.AspNetCore.Mvc.MultiTenancy.IAbpTenantAppService" }, - "DeleteAsyncById": { - "uniqueName": "DeleteAsyncById", - "name": "DeleteAsync", - "httpMethod": "DELETE", - "url": "api/identity/roles/{id}", + "FindTenantByIdAsyncById": { + "uniqueName": "FindTenantByIdAsyncById", + "name": "FindTenantByIdAsync", + "httpMethod": "GET", + "url": "api/abp/multi-tenancy/tenants/by-id/{id}", "supportedVersions": [], "parametersOnMethod": [ { @@ -852,70 +1075,129 @@ } ], "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" + "type": "Volo.Abp.AspNetCore.Mvc.MultiTenancy.FindTenantResultDto", + "typeSimple": "Volo.Abp.AspNetCore.Mvc.MultiTenancy.FindTenantResultDto" }, - "allowAnonymous": null + "allowAnonymous": null, + "implementFrom": "Volo.Abp.AspNetCore.Mvc.MultiTenancy.IAbpTenantAppService" } } }, - "Volo.Abp.Identity.IdentityUserController": { - "controllerName": "IdentityUser", - "type": "Volo.Abp.Identity.IdentityUserController", + "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationController": { + "controllerName": "AbpApplicationConfiguration", + "controllerGroupName": "AbpApplicationConfiguration", + "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationController", "interfaces": [ { - "type": "Volo.Abp.Identity.IIdentityUserAppService" + "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.IAbpApplicationConfigurationAppService" } ], "actions": { - "GetAsyncById": { - "uniqueName": "GetAsyncById", + "GetAsync": { + "uniqueName": "GetAsync", "name": "GetAsync", "httpMethod": "GET", - "url": "api/identity/users/{id}", + "url": "api/abp/application-configuration", + "supportedVersions": [], + "parametersOnMethod": [], + "parameters": [], + "returnValue": { + "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationConfigurationDto", + "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationConfigurationDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.IAbpApplicationConfigurationAppService" + } + } + }, + "Volo.Abp.AspNetCore.Mvc.ApiExploring.AbpApiDefinitionController": { + "controllerName": "AbpApiDefinition", + "controllerGroupName": "AbpApiDefinition", + "type": "Volo.Abp.AspNetCore.Mvc.ApiExploring.AbpApiDefinitionController", + "interfaces": [], + "actions": { + "GetByModel": { + "uniqueName": "GetByModel", + "name": "Get", + "httpMethod": "GET", + "url": "api/abp/api-definition", "supportedVersions": [], "parametersOnMethod": [ { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", + "name": "model", + "typeAsString": "Volo.Abp.Http.Modeling.ApplicationApiDescriptionModelRequestDto, Volo.Abp.Http", + "type": "Volo.Abp.Http.Modeling.ApplicationApiDescriptionModelRequestDto", + "typeSimple": "Volo.Abp.Http.Modeling.ApplicationApiDescriptionModelRequestDto", "isOptional": false, "defaultValue": null } ], "parameters": [ { - "nameOnMethod": "id", - "name": "id", + "nameOnMethod": "model", + "name": "IncludeTypes", "jsonName": null, - "type": "System.Guid", - "typeSimple": "string", + "type": "System.Boolean", + "typeSimple": "boolean", "isOptional": false, "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "model" } ], "returnValue": { - "type": "Volo.Abp.Identity.IdentityUserDto", - "typeSimple": "Volo.Abp.Identity.IdentityUserDto" + "type": "Volo.Abp.Http.Modeling.ApplicationApiDescriptionModel", + "typeSimple": "Volo.Abp.Http.Modeling.ApplicationApiDescriptionModel" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.AspNetCore.Mvc.ApiExploring.AbpApiDefinitionController" + } + } + } + } + }, + "identity": { + "rootPath": "identity", + "remoteServiceName": "AbpIdentity", + "controllers": { + "Volo.Abp.Identity.IdentityRoleController": { + "controllerName": "IdentityRole", + "controllerGroupName": "Role", + "type": "Volo.Abp.Identity.IdentityRoleController", + "interfaces": [ + { + "type": "Volo.Abp.Identity.IIdentityRoleAppService" + } + ], + "actions": { + "GetAllListAsync": { + "uniqueName": "GetAllListAsync", + "name": "GetAllListAsync", + "httpMethod": "GET", + "url": "api/identity/roles/all", + "supportedVersions": [], + "parametersOnMethod": [], + "parameters": [], + "returnValue": { + "type": "Volo.Abp.Application.Dtos.ListResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" }, - "allowAnonymous": null + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Identity.IIdentityRoleAppService" }, "GetListAsyncByInput": { "uniqueName": "GetListAsyncByInput", "name": "GetListAsync", "httpMethod": "GET", - "url": "api/identity/users", + "url": "api/identity/roles", "supportedVersions": [], "parametersOnMethod": [ { "name": "input", - "typeAsString": "Volo.Abp.Identity.GetIdentityUsersInput, Volo.Abp.Identity.Application.Contracts", - "type": "Volo.Abp.Identity.GetIdentityUsersInput", - "typeSimple": "Volo.Abp.Identity.GetIdentityUsersInput", + "typeAsString": "Volo.Abp.Identity.GetIdentityRolesInput, Volo.Abp.Identity.Application.Contracts", + "type": "Volo.Abp.Identity.GetIdentityRolesInput", + "typeSimple": "Volo.Abp.Identity.GetIdentityRolesInput", "isOptional": false, "defaultValue": null } @@ -971,144 +1253,17 @@ } ], "returnValue": { - "type": "Volo.Abp.Application.Dtos.PagedResultDto", - "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" - }, - "allowAnonymous": null - }, - "CreateAsyncByInput": { - "uniqueName": "CreateAsyncByInput", - "name": "CreateAsync", - "httpMethod": "POST", - "url": "api/identity/users", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "input", - "typeAsString": "Volo.Abp.Identity.IdentityUserCreateDto, Volo.Abp.Identity.Application.Contracts", - "type": "Volo.Abp.Identity.IdentityUserCreateDto", - "typeSimple": "Volo.Abp.Identity.IdentityUserCreateDto", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "input", - "name": "input", - "jsonName": null, - "type": "Volo.Abp.Identity.IdentityUserCreateDto", - "typeSimple": "Volo.Abp.Identity.IdentityUserCreateDto", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Body", - "descriptorName": "" - } - ], - "returnValue": { - "type": "Volo.Abp.Identity.IdentityUserDto", - "typeSimple": "Volo.Abp.Identity.IdentityUserDto" - }, - "allowAnonymous": null - }, - "UpdateAsyncByIdAndInput": { - "uniqueName": "UpdateAsyncByIdAndInput", - "name": "UpdateAsync", - "httpMethod": "PUT", - "url": "api/identity/users/{id}", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - }, - { - "name": "input", - "typeAsString": "Volo.Abp.Identity.IdentityUserUpdateDto, Volo.Abp.Identity.Application.Contracts", - "type": "Volo.Abp.Identity.IdentityUserUpdateDto", - "typeSimple": "Volo.Abp.Identity.IdentityUserUpdateDto", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "id", - "name": "id", - "jsonName": null, - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - }, - { - "nameOnMethod": "input", - "name": "input", - "jsonName": null, - "type": "Volo.Abp.Identity.IdentityUserUpdateDto", - "typeSimple": "Volo.Abp.Identity.IdentityUserUpdateDto", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Body", - "descriptorName": "" - } - ], - "returnValue": { - "type": "Volo.Abp.Identity.IdentityUserDto", - "typeSimple": "Volo.Abp.Identity.IdentityUserDto" - }, - "allowAnonymous": null - }, - "DeleteAsyncById": { - "uniqueName": "DeleteAsyncById", - "name": "DeleteAsync", - "httpMethod": "DELETE", - "url": "api/identity/users/{id}", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "id", - "name": "id", - "jsonName": null, - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - } - ], - "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" + "type": "Volo.Abp.Application.Dtos.PagedResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" }, - "allowAnonymous": null + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.IReadOnlyAppService" }, - "GetRolesAsyncById": { - "uniqueName": "GetRolesAsyncById", - "name": "GetRolesAsync", + "GetAsyncById": { + "uniqueName": "GetAsyncById", + "name": "GetAsync", "httpMethod": "GET", - "url": "api/identity/users/{id}/roles", + "url": "api/identity/roles/{id}", "supportedVersions": [], "parametersOnMethod": [ { @@ -1135,68 +1290,35 @@ } ], "returnValue": { - "type": "Volo.Abp.Application.Dtos.ListResultDto", - "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" - }, - "allowAnonymous": null - }, - "GetAssignableRolesAsync": { - "uniqueName": "GetAssignableRolesAsync", - "name": "GetAssignableRolesAsync", - "httpMethod": "GET", - "url": "api/identity/users/assignable-roles", - "supportedVersions": [], - "parametersOnMethod": [], - "parameters": [], - "returnValue": { - "type": "Volo.Abp.Application.Dtos.ListResultDto", - "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" + "type": "Volo.Abp.Identity.IdentityRoleDto", + "typeSimple": "Volo.Abp.Identity.IdentityRoleDto" }, - "allowAnonymous": null + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.IReadOnlyAppService" }, - "UpdateRolesAsyncByIdAndInput": { - "uniqueName": "UpdateRolesAsyncByIdAndInput", - "name": "UpdateRolesAsync", - "httpMethod": "PUT", - "url": "api/identity/users/{id}/roles", + "CreateAsyncByInput": { + "uniqueName": "CreateAsyncByInput", + "name": "CreateAsync", + "httpMethod": "POST", + "url": "api/identity/roles", "supportedVersions": [], "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - }, { "name": "input", - "typeAsString": "Volo.Abp.Identity.IdentityUserUpdateRolesDto, Volo.Abp.Identity.Application.Contracts", - "type": "Volo.Abp.Identity.IdentityUserUpdateRolesDto", - "typeSimple": "Volo.Abp.Identity.IdentityUserUpdateRolesDto", + "typeAsString": "Volo.Abp.Identity.IdentityRoleCreateDto, Volo.Abp.Identity.Application.Contracts", + "type": "Volo.Abp.Identity.IdentityRoleCreateDto", + "typeSimple": "Volo.Abp.Identity.IdentityRoleCreateDto", "isOptional": false, "defaultValue": null } ], "parameters": [ - { - "nameOnMethod": "id", - "name": "id", - "jsonName": null, - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - }, { "nameOnMethod": "input", "name": "input", "jsonName": null, - "type": "Volo.Abp.Identity.IdentityUserUpdateRolesDto", - "typeSimple": "Volo.Abp.Identity.IdentityUserUpdateRolesDto", + "type": "Volo.Abp.Identity.IdentityRoleCreateDto", + "typeSimple": "Volo.Abp.Identity.IdentityRoleCreateDto", "isOptional": false, "defaultValue": null, "constraintTypes": null, @@ -1205,58 +1327,80 @@ } ], "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" + "type": "Volo.Abp.Identity.IdentityRoleDto", + "typeSimple": "Volo.Abp.Identity.IdentityRoleDto" }, - "allowAnonymous": null + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.ICreateAppService" }, - "FindByUsernameAsyncByUserName": { - "uniqueName": "FindByUsernameAsyncByUserName", - "name": "FindByUsernameAsync", - "httpMethod": "GET", - "url": "api/identity/users/by-username/{userName}", + "UpdateAsyncByIdAndInput": { + "uniqueName": "UpdateAsyncByIdAndInput", + "name": "UpdateAsync", + "httpMethod": "PUT", + "url": "api/identity/roles/{id}", "supportedVersions": [], "parametersOnMethod": [ { - "name": "userName", - "typeAsString": "System.String, System.Private.CoreLib", - "type": "System.String", + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", "typeSimple": "string", "isOptional": false, "defaultValue": null + }, + { + "name": "input", + "typeAsString": "Volo.Abp.Identity.IdentityRoleUpdateDto, Volo.Abp.Identity.Application.Contracts", + "type": "Volo.Abp.Identity.IdentityRoleUpdateDto", + "typeSimple": "Volo.Abp.Identity.IdentityRoleUpdateDto", + "isOptional": false, + "defaultValue": null } ], "parameters": [ { - "nameOnMethod": "userName", - "name": "userName", + "nameOnMethod": "id", + "name": "id", "jsonName": null, - "type": "System.String", + "type": "System.Guid", "typeSimple": "string", "isOptional": false, "defaultValue": null, "constraintTypes": [], "bindingSourceId": "Path", "descriptorName": "" + }, + { + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Volo.Abp.Identity.IdentityRoleUpdateDto", + "typeSimple": "Volo.Abp.Identity.IdentityRoleUpdateDto", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" } ], "returnValue": { - "type": "Volo.Abp.Identity.IdentityUserDto", - "typeSimple": "Volo.Abp.Identity.IdentityUserDto" + "type": "Volo.Abp.Identity.IdentityRoleDto", + "typeSimple": "Volo.Abp.Identity.IdentityRoleDto" }, - "allowAnonymous": null + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.IUpdateAppService" }, - "FindByEmailAsyncByEmail": { - "uniqueName": "FindByEmailAsyncByEmail", - "name": "FindByEmailAsync", - "httpMethod": "GET", - "url": "api/identity/users/by-email/{email}", + "DeleteAsyncById": { + "uniqueName": "DeleteAsyncById", + "name": "DeleteAsync", + "httpMethod": "DELETE", + "url": "api/identity/roles/{id}", "supportedVersions": [], "parametersOnMethod": [ { - "name": "email", - "typeAsString": "System.String, System.Private.CoreLib", - "type": "System.String", + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", "typeSimple": "string", "isOptional": false, "defaultValue": null @@ -1264,10 +1408,10 @@ ], "parameters": [ { - "nameOnMethod": "email", - "name": "email", + "nameOnMethod": "id", + "name": "id", "jsonName": null, - "type": "System.String", + "type": "System.Guid", "typeSimple": "string", "isOptional": false, "defaultValue": null, @@ -1277,27 +1421,29 @@ } ], "returnValue": { - "type": "Volo.Abp.Identity.IdentityUserDto", - "typeSimple": "Volo.Abp.Identity.IdentityUserDto" + "type": "System.Void", + "typeSimple": "System.Void" }, - "allowAnonymous": null + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.IDeleteAppService" } } }, - "Volo.Abp.Identity.IdentityUserLookupController": { - "controllerName": "IdentityUserLookup", - "type": "Volo.Abp.Identity.IdentityUserLookupController", + "Volo.Abp.Identity.IdentityUserController": { + "controllerName": "IdentityUser", + "controllerGroupName": "User", + "type": "Volo.Abp.Identity.IdentityUserController", "interfaces": [ { - "type": "Volo.Abp.Identity.IIdentityUserLookupAppService" + "type": "Volo.Abp.Identity.IIdentityUserAppService" } ], "actions": { - "FindByIdAsyncById": { - "uniqueName": "FindByIdAsyncById", - "name": "FindByIdAsync", + "GetAsyncById": { + "uniqueName": "GetAsyncById", + "name": "GetAsync", "httpMethod": "GET", - "url": "api/identity/users/lookup/{id}", + "url": "api/identity/users/{id}", "supportedVersions": [], "parametersOnMethod": [ { @@ -1324,59 +1470,24 @@ } ], "returnValue": { - "type": "Volo.Abp.Users.UserData", - "typeSimple": "Volo.Abp.Users.UserData" - }, - "allowAnonymous": null - }, - "FindByUserNameAsyncByUserName": { - "uniqueName": "FindByUserNameAsyncByUserName", - "name": "FindByUserNameAsync", - "httpMethod": "GET", - "url": "api/identity/users/lookup/by-username/{userName}", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "userName", - "typeAsString": "System.String, System.Private.CoreLib", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "userName", - "name": "userName", - "jsonName": null, - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - } - ], - "returnValue": { - "type": "Volo.Abp.Users.UserData", - "typeSimple": "Volo.Abp.Users.UserData" + "type": "Volo.Abp.Identity.IdentityUserDto", + "typeSimple": "Volo.Abp.Identity.IdentityUserDto" }, - "allowAnonymous": null + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.IReadOnlyAppService" }, - "SearchAsyncByInput": { - "uniqueName": "SearchAsyncByInput", - "name": "SearchAsync", + "GetListAsyncByInput": { + "uniqueName": "GetListAsyncByInput", + "name": "GetListAsync", "httpMethod": "GET", - "url": "api/identity/users/lookup/search", + "url": "api/identity/users", "supportedVersions": [], "parametersOnMethod": [ { "name": "input", - "typeAsString": "Volo.Abp.Identity.UserLookupSearchInputDto, Volo.Abp.Identity.Application.Contracts", - "type": "Volo.Abp.Identity.UserLookupSearchInputDto", - "typeSimple": "Volo.Abp.Identity.UserLookupSearchInputDto", + "typeAsString": "Volo.Abp.Identity.GetIdentityUsersInput, Volo.Abp.Identity.Application.Contracts", + "type": "Volo.Abp.Identity.GetIdentityUsersInput", + "typeSimple": "Volo.Abp.Identity.GetIdentityUsersInput", "isOptional": false, "defaultValue": null } @@ -1432,131 +1543,238 @@ } ], "returnValue": { - "type": "Volo.Abp.Application.Dtos.ListResultDto", - "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" + "type": "Volo.Abp.Application.Dtos.PagedResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.IReadOnlyAppService" + }, + "CreateAsyncByInput": { + "uniqueName": "CreateAsyncByInput", + "name": "CreateAsync", + "httpMethod": "POST", + "url": "api/identity/users", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "Volo.Abp.Identity.IdentityUserCreateDto, Volo.Abp.Identity.Application.Contracts", + "type": "Volo.Abp.Identity.IdentityUserCreateDto", + "typeSimple": "Volo.Abp.Identity.IdentityUserCreateDto", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Volo.Abp.Identity.IdentityUserCreateDto", + "typeSimple": "Volo.Abp.Identity.IdentityUserCreateDto", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.Abp.Identity.IdentityUserDto", + "typeSimple": "Volo.Abp.Identity.IdentityUserDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.ICreateAppService" + }, + "UpdateAsyncByIdAndInput": { + "uniqueName": "UpdateAsyncByIdAndInput", + "name": "UpdateAsync", + "httpMethod": "PUT", + "url": "api/identity/users/{id}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "input", + "typeAsString": "Volo.Abp.Identity.IdentityUserUpdateDto, Volo.Abp.Identity.Application.Contracts", + "type": "Volo.Abp.Identity.IdentityUserUpdateDto", + "typeSimple": "Volo.Abp.Identity.IdentityUserUpdateDto", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + }, + { + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Volo.Abp.Identity.IdentityUserUpdateDto", + "typeSimple": "Volo.Abp.Identity.IdentityUserUpdateDto", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.Abp.Identity.IdentityUserDto", + "typeSimple": "Volo.Abp.Identity.IdentityUserDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.IUpdateAppService" + }, + "DeleteAsyncById": { + "uniqueName": "DeleteAsyncById", + "name": "DeleteAsync", + "httpMethod": "DELETE", + "url": "api/identity/users/{id}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" }, - "allowAnonymous": null + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.IDeleteAppService" }, - "GetCountAsyncByInput": { - "uniqueName": "GetCountAsyncByInput", - "name": "GetCountAsync", + "GetRolesAsyncById": { + "uniqueName": "GetRolesAsyncById", + "name": "GetRolesAsync", "httpMethod": "GET", - "url": "api/identity/users/lookup/count", + "url": "api/identity/users/{id}/roles", "supportedVersions": [], "parametersOnMethod": [ { - "name": "input", - "typeAsString": "Volo.Abp.Identity.UserLookupCountInputDto, Volo.Abp.Identity.Application.Contracts", - "type": "Volo.Abp.Identity.UserLookupCountInputDto", - "typeSimple": "Volo.Abp.Identity.UserLookupCountInputDto", + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", "isOptional": false, "defaultValue": null } ], "parameters": [ { - "nameOnMethod": "input", - "name": "Filter", + "nameOnMethod": "id", + "name": "id", "jsonName": null, - "type": "System.String", + "type": "System.Guid", "typeSimple": "string", "isOptional": false, "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" } ], "returnValue": { - "type": "System.Int64", - "typeSimple": "number" + "type": "Volo.Abp.Application.Dtos.ListResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" }, - "allowAnonymous": null - } - } - }, - "Volo.Abp.Identity.ProfileController": { - "controllerName": "Profile", - "type": "Volo.Abp.Identity.ProfileController", - "interfaces": [ - { - "type": "Volo.Abp.Identity.IProfileAppService" - } - ], - "actions": { - "GetAsync": { - "uniqueName": "GetAsync", - "name": "GetAsync", + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Identity.IIdentityUserAppService" + }, + "GetAssignableRolesAsync": { + "uniqueName": "GetAssignableRolesAsync", + "name": "GetAssignableRolesAsync", "httpMethod": "GET", - "url": "api/identity/my-profile", + "url": "api/identity/users/assignable-roles", "supportedVersions": [], "parametersOnMethod": [], "parameters": [], "returnValue": { - "type": "Volo.Abp.Identity.ProfileDto", - "typeSimple": "Volo.Abp.Identity.ProfileDto" + "type": "Volo.Abp.Application.Dtos.ListResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" }, - "allowAnonymous": null + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Identity.IIdentityUserAppService" }, - "UpdateAsyncByInput": { - "uniqueName": "UpdateAsyncByInput", - "name": "UpdateAsync", + "UpdateRolesAsyncByIdAndInput": { + "uniqueName": "UpdateRolesAsyncByIdAndInput", + "name": "UpdateRolesAsync", "httpMethod": "PUT", - "url": "api/identity/my-profile", + "url": "api/identity/users/{id}/roles", "supportedVersions": [], "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, { "name": "input", - "typeAsString": "Volo.Abp.Identity.UpdateProfileDto, Volo.Abp.Identity.Application.Contracts", - "type": "Volo.Abp.Identity.UpdateProfileDto", - "typeSimple": "Volo.Abp.Identity.UpdateProfileDto", + "typeAsString": "Volo.Abp.Identity.IdentityUserUpdateRolesDto, Volo.Abp.Identity.Application.Contracts", + "type": "Volo.Abp.Identity.IdentityUserUpdateRolesDto", + "typeSimple": "Volo.Abp.Identity.IdentityUserUpdateRolesDto", "isOptional": false, "defaultValue": null } ], "parameters": [ { - "nameOnMethod": "input", - "name": "input", + "nameOnMethod": "id", + "name": "id", "jsonName": null, - "type": "Volo.Abp.Identity.UpdateProfileDto", - "typeSimple": "Volo.Abp.Identity.UpdateProfileDto", + "type": "System.Guid", + "typeSimple": "string", "isOptional": false, "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Body", + "constraintTypes": [], + "bindingSourceId": "Path", "descriptorName": "" - } - ], - "returnValue": { - "type": "Volo.Abp.Identity.ProfileDto", - "typeSimple": "Volo.Abp.Identity.ProfileDto" - }, - "allowAnonymous": null - }, - "ChangePasswordAsyncByInput": { - "uniqueName": "ChangePasswordAsyncByInput", - "name": "ChangePasswordAsync", - "httpMethod": "POST", - "url": "api/identity/my-profile/change-password", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "input", - "typeAsString": "Volo.Abp.Identity.ChangePasswordInput, Volo.Abp.Identity.Application.Contracts", - "type": "Volo.Abp.Identity.ChangePasswordInput", - "typeSimple": "Volo.Abp.Identity.ChangePasswordInput", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ + }, { "nameOnMethod": "input", "name": "input", "jsonName": null, - "type": "Volo.Abp.Identity.ChangePasswordInput", - "typeSimple": "Volo.Abp.Identity.ChangePasswordInput", + "type": "Volo.Abp.Identity.IdentityUserUpdateRolesDto", + "typeSimple": "Volo.Abp.Identity.IdentityUserUpdateRolesDto", "isOptional": false, "defaultValue": null, "constraintTypes": null, @@ -1568,42 +1786,18 @@ "type": "System.Void", "typeSimple": "System.Void" }, - "allowAnonymous": null - } - } - } - } - }, - "featureManagement": { - "rootPath": "featureManagement", - "remoteServiceName": "AbpFeatureManagement", - "controllers": { - "Volo.Abp.FeatureManagement.FeaturesController": { - "controllerName": "Features", - "type": "Volo.Abp.FeatureManagement.FeaturesController", - "interfaces": [ - { - "type": "Volo.Abp.FeatureManagement.IFeatureAppService" - } - ], - "actions": { - "GetAsyncByProviderNameAndProviderKey": { - "uniqueName": "GetAsyncByProviderNameAndProviderKey", - "name": "GetAsync", + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Identity.IIdentityUserAppService" + }, + "FindByUsernameAsyncByUserName": { + "uniqueName": "FindByUsernameAsyncByUserName", + "name": "FindByUsernameAsync", "httpMethod": "GET", - "url": "api/feature-management/features", + "url": "api/identity/users/by-username/{userName}", "supportedVersions": [], "parametersOnMethod": [ { - "name": "providerName", - "typeAsString": "System.String, System.Private.CoreLib", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - }, - { - "name": "providerKey", + "name": "userName", "typeAsString": "System.String, System.Private.CoreLib", "type": "System.String", "typeSimple": "string", @@ -1613,134 +1807,79 @@ ], "parameters": [ { - "nameOnMethod": "providerName", - "name": "providerName", - "jsonName": null, - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "" - }, - { - "nameOnMethod": "providerKey", - "name": "providerKey", + "nameOnMethod": "userName", + "name": "userName", "jsonName": null, "type": "System.String", "typeSimple": "string", "isOptional": false, "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", + "constraintTypes": [], + "bindingSourceId": "Path", "descriptorName": "" } ], "returnValue": { - "type": "Volo.Abp.FeatureManagement.GetFeatureListResultDto", - "typeSimple": "Volo.Abp.FeatureManagement.GetFeatureListResultDto" + "type": "Volo.Abp.Identity.IdentityUserDto", + "typeSimple": "Volo.Abp.Identity.IdentityUserDto" }, - "allowAnonymous": null + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Identity.IIdentityUserAppService" }, - "UpdateAsyncByProviderNameAndProviderKeyAndInput": { - "uniqueName": "UpdateAsyncByProviderNameAndProviderKeyAndInput", - "name": "UpdateAsync", - "httpMethod": "PUT", - "url": "api/feature-management/features", + "FindByEmailAsyncByEmail": { + "uniqueName": "FindByEmailAsyncByEmail", + "name": "FindByEmailAsync", + "httpMethod": "GET", + "url": "api/identity/users/by-email/{email}", "supportedVersions": [], "parametersOnMethod": [ { - "name": "providerName", - "typeAsString": "System.String, System.Private.CoreLib", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - }, - { - "name": "providerKey", + "name": "email", "typeAsString": "System.String, System.Private.CoreLib", "type": "System.String", "typeSimple": "string", "isOptional": false, "defaultValue": null - }, - { - "name": "input", - "typeAsString": "Volo.Abp.FeatureManagement.UpdateFeaturesDto, Volo.Abp.FeatureManagement.Application.Contracts", - "type": "Volo.Abp.FeatureManagement.UpdateFeaturesDto", - "typeSimple": "Volo.Abp.FeatureManagement.UpdateFeaturesDto", - "isOptional": false, - "defaultValue": null } ], "parameters": [ { - "nameOnMethod": "providerName", - "name": "providerName", - "jsonName": null, - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "" - }, - { - "nameOnMethod": "providerKey", - "name": "providerKey", + "nameOnMethod": "email", + "name": "email", "jsonName": null, "type": "System.String", "typeSimple": "string", "isOptional": false, "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "" - }, - { - "nameOnMethod": "input", - "name": "input", - "jsonName": null, - "type": "Volo.Abp.FeatureManagement.UpdateFeaturesDto", - "typeSimple": "Volo.Abp.FeatureManagement.UpdateFeaturesDto", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Body", + "constraintTypes": [], + "bindingSourceId": "Path", "descriptorName": "" } ], "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" + "type": "Volo.Abp.Identity.IdentityUserDto", + "typeSimple": "Volo.Abp.Identity.IdentityUserDto" }, - "allowAnonymous": null + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Identity.IIdentityUserAppService" } } - } - } - }, - "multi-tenancy": { - "rootPath": "multi-tenancy", - "remoteServiceName": "AbpTenantManagement", - "controllers": { - "Volo.Abp.TenantManagement.TenantController": { - "controllerName": "Tenant", - "type": "Volo.Abp.TenantManagement.TenantController", + }, + "Volo.Abp.Identity.IdentityUserLookupController": { + "controllerName": "IdentityUserLookup", + "controllerGroupName": "UserLookup", + "type": "Volo.Abp.Identity.IdentityUserLookupController", "interfaces": [ { - "type": "Volo.Abp.TenantManagement.ITenantAppService" + "type": "Volo.Abp.Identity.IIdentityUserLookupAppService" } ], "actions": { - "GetAsyncById": { - "uniqueName": "GetAsyncById", - "name": "GetAsync", + "FindByIdAsyncById": { + "uniqueName": "FindByIdAsyncById", + "name": "FindByIdAsync", "httpMethod": "GET", - "url": "api/multi-tenancy/tenants/{id}", + "url": "api/identity/users/lookup/{id}", "supportedVersions": [], "parametersOnMethod": [ { @@ -1767,23 +1906,61 @@ } ], "returnValue": { - "type": "Volo.Abp.TenantManagement.TenantDto", - "typeSimple": "Volo.Abp.TenantManagement.TenantDto" + "type": "Volo.Abp.Users.UserData", + "typeSimple": "Volo.Abp.Users.UserData" }, - "allowAnonymous": null + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Identity.IIdentityUserLookupAppService" }, - "GetListAsyncByInput": { - "uniqueName": "GetListAsyncByInput", - "name": "GetListAsync", + "FindByUserNameAsyncByUserName": { + "uniqueName": "FindByUserNameAsyncByUserName", + "name": "FindByUserNameAsync", "httpMethod": "GET", - "url": "api/multi-tenancy/tenants", + "url": "api/identity/users/lookup/by-username/{userName}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "userName", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "userName", + "name": "userName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.Abp.Users.UserData", + "typeSimple": "Volo.Abp.Users.UserData" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Identity.IIdentityUserLookupAppService" + }, + "SearchAsyncByInput": { + "uniqueName": "SearchAsyncByInput", + "name": "SearchAsync", + "httpMethod": "GET", + "url": "api/identity/users/lookup/search", "supportedVersions": [], "parametersOnMethod": [ { "name": "input", - "typeAsString": "Volo.Abp.TenantManagement.GetTenantsInput, Volo.Abp.TenantManagement.Application.Contracts", - "type": "Volo.Abp.TenantManagement.GetTenantsInput", - "typeSimple": "Volo.Abp.TenantManagement.GetTenantsInput", + "typeAsString": "Volo.Abp.Identity.UserLookupSearchInputDto, Volo.Abp.Identity.Application.Contracts", + "type": "Volo.Abp.Identity.UserLookupSearchInputDto", + "typeSimple": "Volo.Abp.Identity.UserLookupSearchInputDto", "isOptional": false, "defaultValue": null } @@ -1839,23 +2016,24 @@ } ], "returnValue": { - "type": "Volo.Abp.Application.Dtos.PagedResultDto", - "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" + "type": "Volo.Abp.Application.Dtos.ListResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" }, - "allowAnonymous": null + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Identity.IIdentityUserLookupAppService" }, - "CreateAsyncByInput": { - "uniqueName": "CreateAsyncByInput", - "name": "CreateAsync", - "httpMethod": "POST", - "url": "api/multi-tenancy/tenants", + "GetCountAsyncByInput": { + "uniqueName": "GetCountAsyncByInput", + "name": "GetCountAsync", + "httpMethod": "GET", + "url": "api/identity/users/lookup/count", "supportedVersions": [], "parametersOnMethod": [ { "name": "input", - "typeAsString": "Volo.Abp.TenantManagement.TenantCreateDto, Volo.Abp.TenantManagement.Application.Contracts", - "type": "Volo.Abp.TenantManagement.TenantCreateDto", - "typeSimple": "Volo.Abp.TenantManagement.TenantCreateDto", + "typeAsString": "Volo.Abp.Identity.UserLookupCountInputDto, Volo.Abp.Identity.Application.Contracts", + "type": "Volo.Abp.Identity.UserLookupCountInputDto", + "typeSimple": "Volo.Abp.Identity.UserLookupCountInputDto", "isOptional": false, "defaultValue": null } @@ -1863,234 +2041,115 @@ "parameters": [ { "nameOnMethod": "input", - "name": "input", - "jsonName": null, - "type": "Volo.Abp.TenantManagement.TenantCreateDto", - "typeSimple": "Volo.Abp.TenantManagement.TenantCreateDto", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Body", - "descriptorName": "" - } - ], - "returnValue": { - "type": "Volo.Abp.TenantManagement.TenantDto", - "typeSimple": "Volo.Abp.TenantManagement.TenantDto" - }, - "allowAnonymous": null - }, - "UpdateAsyncByIdAndInput": { - "uniqueName": "UpdateAsyncByIdAndInput", - "name": "UpdateAsync", - "httpMethod": "PUT", - "url": "api/multi-tenancy/tenants/{id}", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - }, - { - "name": "input", - "typeAsString": "Volo.Abp.TenantManagement.TenantUpdateDto, Volo.Abp.TenantManagement.Application.Contracts", - "type": "Volo.Abp.TenantManagement.TenantUpdateDto", - "typeSimple": "Volo.Abp.TenantManagement.TenantUpdateDto", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "id", - "name": "id", + "name": "Filter", "jsonName": null, - "type": "System.Guid", + "type": "System.String", "typeSimple": "string", "isOptional": false, "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - }, - { - "nameOnMethod": "input", - "name": "input", - "jsonName": null, - "type": "Volo.Abp.TenantManagement.TenantUpdateDto", - "typeSimple": "Volo.Abp.TenantManagement.TenantUpdateDto", - "isOptional": false, - "defaultValue": null, "constraintTypes": null, - "bindingSourceId": "Body", - "descriptorName": "" - } - ], - "returnValue": { - "type": "Volo.Abp.TenantManagement.TenantDto", - "typeSimple": "Volo.Abp.TenantManagement.TenantDto" - }, - "allowAnonymous": null - }, - "DeleteAsyncById": { - "uniqueName": "DeleteAsyncById", - "name": "DeleteAsync", - "httpMethod": "DELETE", - "url": "api/multi-tenancy/tenants/{id}", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "id", - "name": "id", - "jsonName": null, - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" + "bindingSourceId": "ModelBinding", + "descriptorName": "input" } ], "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" + "type": "System.Int64", + "typeSimple": "number" }, - "allowAnonymous": null - }, - "GetDefaultConnectionStringAsyncById": { - "uniqueName": "GetDefaultConnectionStringAsyncById", - "name": "GetDefaultConnectionStringAsync", + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Identity.IIdentityUserLookupAppService" + } + } + }, + "Volo.Abp.Identity.ProfileController": { + "controllerName": "Profile", + "controllerGroupName": "Profile", + "type": "Volo.Abp.Identity.ProfileController", + "interfaces": [ + { + "type": "Volo.Abp.Identity.IProfileAppService" + } + ], + "actions": { + "GetAsync": { + "uniqueName": "GetAsync", + "name": "GetAsync", "httpMethod": "GET", - "url": "api/multi-tenancy/tenants/{id}/default-connection-string", + "url": "api/identity/my-profile", "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "id", - "name": "id", - "jsonName": null, - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - } - ], + "parametersOnMethod": [], + "parameters": [], "returnValue": { - "type": "System.String", - "typeSimple": "string" + "type": "Volo.Abp.Identity.ProfileDto", + "typeSimple": "Volo.Abp.Identity.ProfileDto" }, - "allowAnonymous": null + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Identity.IProfileAppService" }, - "UpdateDefaultConnectionStringAsyncByIdAndDefaultConnectionString": { - "uniqueName": "UpdateDefaultConnectionStringAsyncByIdAndDefaultConnectionString", - "name": "UpdateDefaultConnectionStringAsync", + "UpdateAsyncByInput": { + "uniqueName": "UpdateAsyncByInput", + "name": "UpdateAsync", "httpMethod": "PUT", - "url": "api/multi-tenancy/tenants/{id}/default-connection-string", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - }, + "url": "api/identity/my-profile", + "supportedVersions": [], + "parametersOnMethod": [ { - "name": "defaultConnectionString", - "typeAsString": "System.String, System.Private.CoreLib", - "type": "System.String", - "typeSimple": "string", + "name": "input", + "typeAsString": "Volo.Abp.Identity.UpdateProfileDto, Volo.Abp.Identity.Application.Contracts", + "type": "Volo.Abp.Identity.UpdateProfileDto", + "typeSimple": "Volo.Abp.Identity.UpdateProfileDto", "isOptional": false, "defaultValue": null } ], "parameters": [ { - "nameOnMethod": "id", - "name": "id", - "jsonName": null, - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - }, - { - "nameOnMethod": "defaultConnectionString", - "name": "defaultConnectionString", + "nameOnMethod": "input", + "name": "input", "jsonName": null, - "type": "System.String", - "typeSimple": "string", + "type": "Volo.Abp.Identity.UpdateProfileDto", + "typeSimple": "Volo.Abp.Identity.UpdateProfileDto", "isOptional": false, "defaultValue": null, "constraintTypes": null, - "bindingSourceId": "ModelBinding", + "bindingSourceId": "Body", "descriptorName": "" } ], "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" + "type": "Volo.Abp.Identity.ProfileDto", + "typeSimple": "Volo.Abp.Identity.ProfileDto" }, - "allowAnonymous": null + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Identity.IProfileAppService" }, - "DeleteDefaultConnectionStringAsyncById": { - "uniqueName": "DeleteDefaultConnectionStringAsyncById", - "name": "DeleteDefaultConnectionStringAsync", - "httpMethod": "DELETE", - "url": "api/multi-tenancy/tenants/{id}/default-connection-string", + "ChangePasswordAsyncByInput": { + "uniqueName": "ChangePasswordAsyncByInput", + "name": "ChangePasswordAsync", + "httpMethod": "POST", + "url": "api/identity/my-profile/change-password", "supportedVersions": [], "parametersOnMethod": [ { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", + "name": "input", + "typeAsString": "Volo.Abp.Identity.ChangePasswordInput, Volo.Abp.Identity.Application.Contracts", + "type": "Volo.Abp.Identity.ChangePasswordInput", + "typeSimple": "Volo.Abp.Identity.ChangePasswordInput", "isOptional": false, "defaultValue": null } ], "parameters": [ { - "nameOnMethod": "id", - "name": "id", + "nameOnMethod": "input", + "name": "input", "jsonName": null, - "type": "System.Guid", - "typeSimple": "string", + "type": "Volo.Abp.Identity.ChangePasswordInput", + "typeSimple": "Volo.Abp.Identity.ChangePasswordInput", "isOptional": false, "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", + "constraintTypes": null, + "bindingSourceId": "Body", "descriptorName": "" } ], @@ -2098,7 +2157,8 @@ "type": "System.Void", "typeSimple": "System.Void" }, - "allowAnonymous": null + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Identity.IProfileAppService" } } } @@ -2106,79 +2166,6 @@ } }, "types": { - "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "UserNameOrEmailAddress", - "jsonName": null, - "type": "System.String", - "typeSimple": "string", - "isRequired": true - }, - { - "name": "Password", - "jsonName": null, - "type": "System.String", - "typeSimple": "string", - "isRequired": true - }, - { - "name": "RememberMe", - "jsonName": null, - "type": "System.Boolean", - "typeSimple": "boolean", - "isRequired": false - } - ] - }, - "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.AbpLoginResult": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "Result", - "jsonName": null, - "type": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.LoginResultType", - "typeSimple": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.LoginResultType", - "isRequired": false - }, - { - "name": "Description", - "jsonName": null, - "type": "System.String", - "typeSimple": "string", - "isRequired": false - } - ] - }, - "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.LoginResultType": { - "baseType": "System.Enum", - "isEnum": true, - "enumNames": [ - "Success", - "InvalidUserNameOrPassword", - "NotAllowed", - "LockedOut", - "RequiresTwoFactor" - ], - "enumValues": [ - 1, - 2, - 3, - 4, - 5 - ], - "genericArguments": null, - "properties": null - }, "Volo.Abp.Account.RegisterDto": { "baseType": "Volo.Abp.ObjectExtending.ExtensibleObject", "isEnum": false, @@ -2485,6 +2472,79 @@ } ] }, + "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo": { + "baseType": null, + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "UserNameOrEmailAddress", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": true + }, + { + "name": "Password", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": true + }, + { + "name": "RememberMe", + "jsonName": null, + "type": "System.Boolean", + "typeSimple": "boolean", + "isRequired": false + } + ] + }, + "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.AbpLoginResult": { + "baseType": null, + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "Result", + "jsonName": null, + "type": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.LoginResultType", + "typeSimple": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.LoginResultType", + "isRequired": false + }, + { + "name": "Description", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + } + ] + }, + "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.LoginResultType": { + "baseType": "System.Enum", + "isEnum": true, + "enumNames": [ + "Success", + "InvalidUserNameOrPassword", + "NotAllowed", + "LockedOut", + "RequiresTwoFactor" + ], + "enumValues": [ + 1, + 2, + 3, + 4, + 5 + ], + "genericArguments": null, + "properties": null + }, "Volo.Abp.AspNetCore.Mvc.MultiTenancy.FindTenantResultDto": { "baseType": null, "isEnum": false, @@ -3022,6 +3082,13 @@ "type": "System.Boolean", "typeSimple": "boolean", "isRequired": false + }, + { + "name": "ConcurrencyStamp", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false } ] }, @@ -3066,6 +3133,13 @@ "type": "System.String", "typeSimple": "string", "isRequired": false + }, + { + "name": "ConcurrencyStamp", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false } ] }, @@ -3415,6 +3489,13 @@ "type": "System.String", "typeSimple": "string", "isRequired": false + }, + { + "name": "ConcurrencyStamp", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false } ] }, @@ -3479,7 +3560,15 @@ "enumNames": null, "enumValues": null, "genericArguments": null, - "properties": [] + "properties": [ + { + "name": "ConcurrencyStamp", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + } + ] }, "Volo.Abp.FeatureManagement.GetFeatureListResultDto": { "baseType": null, @@ -4839,6 +4928,13 @@ "typeSimple": "string", "isRequired": false }, + { + "name": "ControllerGroupName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, { "name": "Type", "jsonName": null, @@ -4947,6 +5043,13 @@ "type": "System.Boolean?", "typeSimple": "boolean?", "isRequired": false + }, + { + "name": "ImplementFrom", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false } ] }, diff --git a/npm/ng-packs/packages/account/src/lib/proxy/identity/index.ts b/npm/ng-packs/packages/account-core/proxy/src/lib/proxy/identity/index.ts similarity index 100% rename from npm/ng-packs/packages/account/src/lib/proxy/identity/index.ts rename to npm/ng-packs/packages/account-core/proxy/src/lib/proxy/identity/index.ts diff --git a/npm/ng-packs/packages/account/src/lib/proxy/identity/models.ts b/npm/ng-packs/packages/account-core/proxy/src/lib/proxy/identity/models.ts similarity index 100% rename from npm/ng-packs/packages/account/src/lib/proxy/identity/models.ts rename to npm/ng-packs/packages/account-core/proxy/src/lib/proxy/identity/models.ts diff --git a/npm/ng-packs/packages/account/src/lib/proxy/index.ts b/npm/ng-packs/packages/account-core/proxy/src/lib/proxy/index.ts similarity index 100% rename from npm/ng-packs/packages/account/src/lib/proxy/index.ts rename to npm/ng-packs/packages/account-core/proxy/src/lib/proxy/index.ts diff --git a/npm/ng-packs/packages/account-core/proxy/src/public-api.ts b/npm/ng-packs/packages/account-core/proxy/src/public-api.ts new file mode 100644 index 0000000000..11aece60c4 --- /dev/null +++ b/npm/ng-packs/packages/account-core/proxy/src/public-api.ts @@ -0,0 +1 @@ +export * from './lib/index'; diff --git a/npm/ng-packs/packages/account-core/src/lib/tenant-box.service.ts b/npm/ng-packs/packages/account-core/src/lib/tenant-box.service.ts index ef0a71a245..d8212b39e8 100644 --- a/npm/ng-packs/packages/account-core/src/lib/tenant-box.service.ts +++ b/npm/ng-packs/packages/account-core/src/lib/tenant-box.service.ts @@ -1,12 +1,11 @@ -import { Injectable } from '@angular/core'; -import { ToasterService } from '@abp/ng.theme.shared'; import { - AbpApplicationConfigurationService, AbpTenantService, ConfigStateService, CurrentTenantDto, SessionStateService, } from '@abp/ng.core'; +import { ToasterService } from '@abp/ng.theme.shared'; +import { Injectable } from '@angular/core'; import { finalize } from 'rxjs/operators'; @Injectable() @@ -24,7 +23,6 @@ export class TenantBoxService { private tenantService: AbpTenantService, private sessionState: SessionStateService, private configState: ConfigStateService, - private appConfigService: AbpApplicationConfigurationService, ) {} onSwitch() { @@ -57,7 +55,7 @@ export class TenantBoxService { private setTenant(tenant: CurrentTenantDto) { this.sessionState.setTenant(tenant); - this.appConfigService.get().subscribe(res => this.configState.setState(res)); + this.configState.refreshAppState(); } private showError() { diff --git a/npm/ng-packs/packages/account-core/tsconfig.json b/npm/ng-packs/packages/account-core/tsconfig.json index 62ebbd9464..546e940e20 100644 --- a/npm/ng-packs/packages/account-core/tsconfig.json +++ b/npm/ng-packs/packages/account-core/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../tsconfig.json", "files": [], "include": [], "references": [ diff --git a/npm/ng-packs/packages/account/ng-package.json b/npm/ng-packs/packages/account/ng-package.json index 9c91cced40..834aba2a1c 100644 --- a/npm/ng-packs/packages/account/ng-package.json +++ b/npm/ng-packs/packages/account/ng-package.json @@ -4,5 +4,5 @@ "lib": { "entryFile": "src/public-api.ts" }, - "allowedNonPeerDependencies": ["@abp/ng.theme.shared"] + "allowedNonPeerDependencies": ["@abp/ng.theme.shared", "@abp/ng.identity", "@abp/ng.account.core"] } diff --git a/npm/ng-packs/packages/account/package.json b/npm/ng-packs/packages/account/package.json index ff29532904..4584c47fa5 100644 --- a/npm/ng-packs/packages/account/package.json +++ b/npm/ng-packs/packages/account/package.json @@ -8,6 +8,8 @@ }, "dependencies": { "@abp/ng.theme.shared": "~4.4.2", + "@abp/ng.identity": "~4.4.2", + "@abp/ng.account.core": "~4.4.2", "tslib": "^2.0.0" }, "publishConfig": { diff --git a/npm/ng-packs/packages/account/src/lib/components/change-password/change-password.component.ts b/npm/ng-packs/packages/account/src/lib/components/change-password/change-password.component.ts index 0feb091f81..9fb3901eb8 100644 --- a/npm/ng-packs/packages/account/src/lib/components/change-password/change-password.component.ts +++ b/npm/ng-packs/packages/account/src/lib/components/change-password/change-password.component.ts @@ -1,4 +1,4 @@ -import { ProfileService } from '@abp/ng.core'; +import { ProfileService } from '@abp/ng.identity/proxy'; import { getPasswordValidators, ToasterService } from '@abp/ng.theme.shared'; import { Component, Injector, OnInit } from '@angular/core'; import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms'; diff --git a/npm/ng-packs/packages/account/src/lib/components/forgot-password/forgot-password.component.ts b/npm/ng-packs/packages/account/src/lib/components/forgot-password/forgot-password.component.ts index 830749ac21..fe63aa76f9 100644 --- a/npm/ng-packs/packages/account/src/lib/components/forgot-password/forgot-password.component.ts +++ b/npm/ng-packs/packages/account/src/lib/components/forgot-password/forgot-password.component.ts @@ -1,7 +1,7 @@ +import { AccountService } from '@abp/ng.account.core/proxy'; import { Component } from '@angular/core'; import { FormBuilder, FormGroup, Validators } from '@angular/forms'; import { finalize } from 'rxjs/operators'; -import { AccountService } from '../../proxy/account/account.service'; @Component({ selector: 'abp-forgot-password', diff --git a/npm/ng-packs/packages/account/src/lib/components/manage-profile/manage-profile.component.ts b/npm/ng-packs/packages/account/src/lib/components/manage-profile/manage-profile.component.ts index b316ddc8fe..4953a453bb 100644 --- a/npm/ng-packs/packages/account/src/lib/components/manage-profile/manage-profile.component.ts +++ b/npm/ng-packs/packages/account/src/lib/components/manage-profile/manage-profile.component.ts @@ -1,4 +1,4 @@ -import { ProfileService } from '@abp/ng.core'; +import { ProfileService } from '@abp/ng.identity/proxy'; import { fadeIn } from '@abp/ng.theme.shared'; import { transition, trigger, useAnimation } from '@angular/animations'; import { Component, OnInit } from '@angular/core'; diff --git a/npm/ng-packs/packages/account/src/lib/components/personal-settings/personal-settings.component.ts b/npm/ng-packs/packages/account/src/lib/components/personal-settings/personal-settings.component.ts index 67db73a5a6..85e21cc637 100644 --- a/npm/ng-packs/packages/account/src/lib/components/personal-settings/personal-settings.component.ts +++ b/npm/ng-packs/packages/account/src/lib/components/personal-settings/personal-settings.component.ts @@ -1,4 +1,4 @@ -import { ProfileService } from '@abp/ng.core'; +import { ProfileService } from '@abp/ng.identity/proxy'; import { ToasterService } from '@abp/ng.theme.shared'; import { Component, OnInit } from '@angular/core'; import { FormBuilder, FormGroup, Validators } from '@angular/forms'; diff --git a/npm/ng-packs/packages/account/src/lib/components/register/register.component.ts b/npm/ng-packs/packages/account/src/lib/components/register/register.component.ts index 0e45f36b0c..2933865d4d 100644 --- a/npm/ng-packs/packages/account/src/lib/components/register/register.component.ts +++ b/npm/ng-packs/packages/account/src/lib/components/register/register.component.ts @@ -1,3 +1,4 @@ +import { AccountService, RegisterDto } from '@abp/ng.account.core/proxy'; import { AuthService, ConfigStateService } from '@abp/ng.core'; import { getPasswordValidators, ToasterService } from '@abp/ng.theme.shared'; import { Component, Injector, OnInit } from '@angular/core'; @@ -5,9 +6,8 @@ import { FormBuilder, FormGroup, Validators } from '@angular/forms'; import { throwError } from 'rxjs'; import { catchError, finalize, switchMap } from 'rxjs/operators'; import { eAccountComponents } from '../../enums/components'; -import { AccountService } from '../../proxy/account/account.service'; -import { RegisterDto } from '../../proxy/account/models'; import { getRedirectUrl } from '../../utils/auth-utils'; + const { maxLength, required, email } = Validators; @Component({ diff --git a/npm/ng-packs/packages/account/src/lib/components/reset-password/reset-password.component.ts b/npm/ng-packs/packages/account/src/lib/components/reset-password/reset-password.component.ts index 5e311e7b83..54a9ed556b 100644 --- a/npm/ng-packs/packages/account/src/lib/components/reset-password/reset-password.component.ts +++ b/npm/ng-packs/packages/account/src/lib/components/reset-password/reset-password.component.ts @@ -1,10 +1,10 @@ +import { AccountService } from '@abp/ng.account.core/proxy'; import { getPasswordValidators } from '@abp/ng.theme.shared'; import { Component, Injector, OnInit } from '@angular/core'; import { FormBuilder, FormGroup, Validators } from '@angular/forms'; import { ActivatedRoute, Router } from '@angular/router'; import { comparePasswords, Validation } from '@ngx-validate/core'; import { finalize } from 'rxjs/operators'; -import { AccountService } from '../../proxy/account/account.service'; const PASSWORD_FIELDS = ['password', 'confirmPassword']; diff --git a/npm/ng-packs/packages/account/src/lib/proxy/account/account.service.ts b/npm/ng-packs/packages/account/src/lib/proxy/account/account.service.ts deleted file mode 100644 index 4d62086f7f..0000000000 --- a/npm/ng-packs/packages/account/src/lib/proxy/account/account.service.ts +++ /dev/null @@ -1,43 +0,0 @@ -import type { RegisterDto, ResetPasswordDto, SendPasswordResetCodeDto } from './models'; -import { RestService } from '@abp/ng.core'; -import { Injectable } from '@angular/core'; -import type { IdentityUserDto } from '../identity/models'; - -@Injectable({ - providedIn: 'root', -}) -export class AccountService { - apiName = 'AbpAccount'; - - register = (input: RegisterDto) => - this.restService.request( - { - method: 'POST', - url: '/api/account/register', - body: input, - }, - { apiName: this.apiName }, - ); - - resetPassword = (input: ResetPasswordDto) => - this.restService.request( - { - method: 'POST', - url: '/api/account/reset-password', - body: input, - }, - { apiName: this.apiName }, - ); - - sendPasswordResetCode = (input: SendPasswordResetCodeDto) => - this.restService.request( - { - method: 'POST', - url: '/api/account/send-password-reset-code', - body: input, - }, - { apiName: this.apiName }, - ); - - constructor(private restService: RestService) {} -} diff --git a/npm/ng-packs/packages/account/src/lib/proxy/account/web/areas/account/controllers/account.service.ts b/npm/ng-packs/packages/account/src/lib/proxy/account/web/areas/account/controllers/account.service.ts deleted file mode 100644 index 75b07bf963..0000000000 --- a/npm/ng-packs/packages/account/src/lib/proxy/account/web/areas/account/controllers/account.service.ts +++ /dev/null @@ -1,41 +0,0 @@ -import type { AbpLoginResult, UserLoginInfo } from './models/models'; -import { RestService } from '@abp/ng.core'; -import { Injectable } from '@angular/core'; - -@Injectable({ - providedIn: 'root', -}) -export class AccountService { - apiName = 'AbpAccount'; - - checkPasswordByLogin = (login: UserLoginInfo) => - this.restService.request( - { - method: 'POST', - url: '/api/account/check-password', - body: login, - }, - { apiName: this.apiName }, - ); - - loginByLogin = (login: UserLoginInfo) => - this.restService.request( - { - method: 'POST', - url: '/api/account/login', - body: login, - }, - { apiName: this.apiName }, - ); - - logout = () => - this.restService.request( - { - method: 'GET', - url: '/api/account/logout', - }, - { apiName: this.apiName }, - ); - - constructor(private restService: RestService) {} -} diff --git a/npm/ng-packs/packages/account/src/lib/services/manage-profile.state.service.ts b/npm/ng-packs/packages/account/src/lib/services/manage-profile.state.service.ts index c276f29fc0..6617a698d7 100644 --- a/npm/ng-packs/packages/account/src/lib/services/manage-profile.state.service.ts +++ b/npm/ng-packs/packages/account/src/lib/services/manage-profile.state.service.ts @@ -1,4 +1,5 @@ -import { InternalStore, ProfileDto } from '@abp/ng.core'; +import { InternalStore } from '@abp/ng.core'; +import { ProfileDto } from '@abp/ng.identity/proxy'; import { Injectable } from '@angular/core'; import { Observable } from 'rxjs'; diff --git a/npm/ng-packs/packages/account/src/public-api.ts b/npm/ng-packs/packages/account/src/public-api.ts index c3e80345c5..aebccb74cc 100644 --- a/npm/ng-packs/packages/account/src/public-api.ts +++ b/npm/ng-packs/packages/account/src/public-api.ts @@ -5,5 +5,3 @@ export * from './lib/guards'; export * from './lib/models'; export * from './lib/services'; export * from './lib/tokens'; -export * from './lib/proxy/account'; -export * from './lib/proxy/identity'; diff --git a/npm/ng-packs/packages/account/tsconfig.json b/npm/ng-packs/packages/account/tsconfig.json index 62ebbd9464..546e940e20 100644 --- a/npm/ng-packs/packages/account/tsconfig.json +++ b/npm/ng-packs/packages/account/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../tsconfig.json", "files": [], "include": [], "references": [ diff --git a/npm/ng-packs/packages/components/chart.js/ng-package.json b/npm/ng-packs/packages/components/chart.js/ng-package.json new file mode 100644 index 0000000000..cc98fd4e36 --- /dev/null +++ b/npm/ng-packs/packages/components/chart.js/ng-package.json @@ -0,0 +1,7 @@ +{ + "$schema": "../../../node_modules/ng-packagr/ng-package.schema.json", + "dest": "../../../dist/packages/components/chart.js", + "lib": { + "entryFile": "src/public-api.ts" + } +} diff --git a/npm/ng-packs/packages/theme-shared/src/lib/tests/chart.component.spec.ts b/npm/ng-packs/packages/components/chart.js/src/chart.component.spec.ts similarity index 59% rename from npm/ng-packs/packages/theme-shared/src/lib/tests/chart.component.spec.ts rename to npm/ng-packs/packages/components/chart.js/src/chart.component.spec.ts index 083d810043..578e757fc3 100644 --- a/npm/ng-packs/packages/theme-shared/src/lib/tests/chart.component.spec.ts +++ b/npm/ng-packs/packages/components/chart.js/src/chart.component.spec.ts @@ -1,10 +1,8 @@ import { createHostFactory, SpectatorHost } from '@ngneat/spectator/jest'; import { ReplaySubject } from 'rxjs'; -import { ChartComponent } from '../components'; -import * as widgetUtils from '../utils/widget-utils'; -import { chartJsLoaded$ } from '../utils/widget-utils'; -// import 'chart.js'; -declare const Chart; +import { ChartComponent } from './chart.component'; +import * as widgetUtils from './widget-utils'; + Object.defineProperty(window, 'getComputedStyle', { value: () => ({ @@ -34,19 +32,18 @@ describe('ChartComponent', () => { }, }, }); - }); - test('should throw error when chart.js is not loaded', () => { - try { - spectator.component.testChartJs(); - } catch (error) { - expect(error.message).toContain('Chart is not found'); - } + window.ResizeObserver = + window.ResizeObserver || + jest.fn().mockImplementation(() => ({ + disconnect: jest.fn(), + observe: jest.fn(), + unobserve: jest.fn(), + })); }); test('should have a success class by default', done => { - import('chart.js').then(() => { - chartJsLoaded$.next(); + import('chart.js/auto').then(() => { setTimeout(() => { expect(spectator.component.chart).toBeTruthy(); done(); @@ -56,7 +53,6 @@ describe('ChartComponent', () => { describe('#reinit', () => { it('should call the destroy method', done => { - chartJsLoaded$.next(); const spy = jest.spyOn(spectator.component.chart, 'destroy'); spectator.setHostInput({ data: { @@ -79,7 +75,6 @@ describe('ChartComponent', () => { describe('#refresh', () => { it('should call the update method', done => { - chartJsLoaded$.next(); const spy = jest.spyOn(spectator.component.chart, 'update'); spectator.component.refresh(); setTimeout(() => { @@ -89,38 +84,11 @@ describe('ChartComponent', () => { }); }); - describe('#generateLegend', () => { - it('should call the generateLegend method', done => { - chartJsLoaded$.next(); - const spy = jest.spyOn(spectator.component.chart, 'generateLegend'); - spectator.component.generateLegend(); - setTimeout(() => { - expect(spy).toHaveBeenCalled(); - done(); - }, 0); - }); - }); - - describe('#onCanvasClick', () => { - it('should emit the onDataSelect', done => { - spectator.component.onDataSelect.subscribe(() => { - done(); - }); - - chartJsLoaded$.next(); - jest - .spyOn(spectator.component.chart, 'getElementAtEvent') - .mockReturnValue([document.createElement('div')]); - spectator.click('canvas'); - }); - }); - describe('#base64Image', () => { it('should return the base64 image', done => { - chartJsLoaded$.next(); setTimeout(() => { - expect(spectator.component.base64Image).toContain('base64'); + expect(spectator.component.getBase64Image()).toContain('base64'); done(); }, 0); }); diff --git a/npm/ng-packs/packages/components/chart.js/src/chart.component.ts b/npm/ng-packs/packages/components/chart.js/src/chart.component.ts new file mode 100644 index 0000000000..670ba01f42 --- /dev/null +++ b/npm/ng-packs/packages/components/chart.js/src/chart.component.ts @@ -0,0 +1,149 @@ +import { + AfterViewInit, + ChangeDetectionStrategy, + ChangeDetectorRef, + Component, + ElementRef, + EventEmitter, + Input, + OnChanges, + OnDestroy, + Output, + SimpleChanges, + ViewChild, +} from '@angular/core'; + +let Chart: any; + +@Component({ + selector: 'abp-chart', + template: ` +
                                                          + +
                                                          + `, + changeDetection: ChangeDetectionStrategy.OnPush, + exportAs: 'abpChart', +}) +export class ChartComponent implements AfterViewInit, OnDestroy, OnChanges { + @Input() type: string; + + @Input() data: any = {}; + + @Input() options: any = {}; + + @Input() plugins: any[] = []; + + @Input() width: string; + + @Input() height: string; + + @Input() responsive = true; + + @Output() dataSelect = new EventEmitter(); + + @Output() initialized = new EventEmitter(); + + @ViewChild('canvas') canvas: ElementRef; + + chart: any; + + constructor(public el: ElementRef, private cdr: ChangeDetectorRef) {} + + ngAfterViewInit() { + import('chart.js/auto').then(module => { + Chart = module.default; + this.initChart(); + this.initialized.emit(true); + }); + } + + onCanvasClick(event) { + if (this.chart) { + const element = this.chart.getElementsAtEventForMode( + event, + 'nearest', + { intersect: true }, + false, + ); + const dataset = this.chart.getElementsAtEventForMode( + event, + 'dataset', + { intersect: true }, + false, + ); + + if (element && element[0] && dataset) { + this.dataSelect.emit({ originalEvent: event, element: element[0], dataset: dataset }); + } + } + } + + initChart = () => { + const opts = this.options || {}; + opts.responsive = this.responsive; + + // allows chart to resize in responsive mode + if (opts.responsive && (this.height || this.width)) { + opts.maintainAspectRatio = false; + } + + this.chart = new Chart(this.canvas.nativeElement, { + type: this.type as any, + data: this.data, + options: this.options, + }); + }; + + getCanvas = () => { + return this.canvas.nativeElement; + }; + + getBase64Image = () => { + return this.chart.toBase64Image(); + }; + + generateLegend = () => { + if (this.chart) { + return this.chart.generateLegend(); + } + }; + + refresh = () => { + if (this.chart) { + this.chart.update(); + this.cdr.detectChanges(); + } + }; + + reinit = () => { + if (!this.chart) return; + this.chart.destroy(); + this.initChart(); + }; + + ngOnDestroy() { + if (this.chart) { + this.chart.destroy(); + this.chart = null; + } + } + + ngOnChanges(changes: SimpleChanges) { + if (!this.chart) return; + + if (changes.data?.currentValue || changes.options?.currentValue) { + this.chart.destroy(); + this.initChart(); + } + } +} diff --git a/npm/ng-packs/packages/components/chart.js/src/chart.module.ts b/npm/ng-packs/packages/components/chart.js/src/chart.module.ts new file mode 100644 index 0000000000..a34570dc84 --- /dev/null +++ b/npm/ng-packs/packages/components/chart.js/src/chart.module.ts @@ -0,0 +1,11 @@ +import { CommonModule } from '@angular/common'; +import { NgModule } from '@angular/core'; +import { ChartComponent } from './chart.component'; + +@NgModule({ + imports: [CommonModule], + exports: [ChartComponent], + declarations: [ChartComponent], + providers: [], +}) +export class ChartModule {} diff --git a/npm/ng-packs/packages/components/chart.js/src/public-api.ts b/npm/ng-packs/packages/components/chart.js/src/public-api.ts new file mode 100644 index 0000000000..399f89f358 --- /dev/null +++ b/npm/ng-packs/packages/components/chart.js/src/public-api.ts @@ -0,0 +1,4 @@ +export * from './chart.component'; +export * from './chart.module'; +export * from './widget-utils'; + diff --git a/npm/ng-packs/packages/theme-shared/src/lib/utils/widget-utils.ts b/npm/ng-packs/packages/components/chart.js/src/widget-utils.ts similarity index 78% rename from npm/ng-packs/packages/theme-shared/src/lib/utils/widget-utils.ts rename to npm/ng-packs/packages/components/chart.js/src/widget-utils.ts index dfe81c973c..6e70e2cac5 100644 --- a/npm/ng-packs/packages/theme-shared/src/lib/utils/widget-utils.ts +++ b/npm/ng-packs/packages/components/chart.js/src/widget-utils.ts @@ -1,5 +1,3 @@ -import { ReplaySubject } from 'rxjs'; - export function getRandomBackgroundColor(count) { const colors = []; @@ -12,5 +10,3 @@ export function getRandomBackgroundColor(count) { return colors; } - -export const chartJsLoaded$ = new ReplaySubject(1); diff --git a/npm/ng-packs/packages/components/ng-package.json b/npm/ng-packs/packages/components/ng-package.json index a5343f978a..76a155d16f 100644 --- a/npm/ng-packs/packages/components/ng-package.json +++ b/npm/ng-packs/packages/components/ng-package.json @@ -4,5 +4,5 @@ "lib": { "entryFile": "src/public-api.ts" }, - "allowedNonPeerDependencies": ["ng-zorro-antd"] + "allowedNonPeerDependencies": ["ng-zorro-antd", "chart.js"] } diff --git a/npm/ng-packs/packages/components/package.json b/npm/ng-packs/packages/components/package.json index 3cf84dd6db..681f5080b9 100644 --- a/npm/ng-packs/packages/components/package.json +++ b/npm/ng-packs/packages/components/package.json @@ -13,6 +13,7 @@ }, "dependencies": { "ng-zorro-antd": "^12.0.1", + "chart.js": "^3.5.1", "tslib": "^2.0.0" }, "publishConfig": { diff --git a/npm/ng-packs/packages/components/src/test-setup.ts b/npm/ng-packs/packages/components/src/test-setup.ts index 1100b3e8a6..b2f7487191 100644 --- a/npm/ng-packs/packages/components/src/test-setup.ts +++ b/npm/ng-packs/packages/components/src/test-setup.ts @@ -1 +1,3 @@ +import 'jest-canvas-mock'; import 'jest-preset-angular/setup-jest'; + diff --git a/npm/ng-packs/packages/components/tsconfig.json b/npm/ng-packs/packages/components/tsconfig.json index 62ebbd9464..546e940e20 100644 --- a/npm/ng-packs/packages/components/tsconfig.json +++ b/npm/ng-packs/packages/components/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../tsconfig.json", "files": [], "include": [], "references": [ diff --git a/npm/ng-packs/packages/core/src/lib/core.module.ts b/npm/ng-packs/packages/core/src/lib/core.module.ts index c2408116d8..d951f965ee 100644 --- a/npm/ng-packs/packages/core/src/lib/core.module.ts +++ b/npm/ng-packs/packages/core/src/lib/core.module.ts @@ -16,7 +16,6 @@ import { InitDirective } from './directives/init.directive'; import { PermissionDirective } from './directives/permission.directive'; import { ReplaceableTemplateDirective } from './directives/replaceable-template.directive'; import { StopPropagationDirective } from './directives/stop-propagation.directive'; -import { VisibilityDirective } from './directives/visibility.directive'; import { OAuthConfigurationHandler } from './handlers/oauth-configuration.handler'; import { RoutesHandler } from './handlers/routes.handler'; import { ApiInterceptor } from './interceptors/api.interceptor'; @@ -24,6 +23,7 @@ import { LocalizationModule } from './localization.module'; import { ABP } from './models/common'; import { LocalizationPipe } from './pipes/localization.pipe'; import { SortPipe } from './pipes/sort.pipe'; +import { CookieLanguageProvider } from './providers/cookie-language.provider'; import { LocaleProvider } from './providers/locale.provider'; import { LocalizationService } from './services/localization.service'; import { oAuthStorage } from './strategies/auth-flow.strategy'; @@ -64,7 +64,6 @@ export function storageFactory(): OAuthStorage { RouterOutletComponent, SortPipe, StopPropagationDirective, - VisibilityDirective, ], imports: [ OAuthModule, @@ -89,7 +88,6 @@ export function storageFactory(): OAuthStorage { RouterOutletComponent, SortPipe, StopPropagationDirective, - VisibilityDirective, ], providers: [LocalizationPipe], entryComponents: [ @@ -131,6 +129,7 @@ export class CoreModule { ngModule: RootCoreModule, providers: [ LocaleProvider, + CookieLanguageProvider, { provide: 'CORE_OPTIONS', useValue: options, diff --git a/npm/ng-packs/packages/core/src/lib/directives/index.ts b/npm/ng-packs/packages/core/src/lib/directives/index.ts index 3322b14257..8f05e2daae 100644 --- a/npm/ng-packs/packages/core/src/lib/directives/index.ts +++ b/npm/ng-packs/packages/core/src/lib/directives/index.ts @@ -6,4 +6,3 @@ export * from './init.directive'; export * from './permission.directive'; export * from './replaceable-template.directive'; export * from './stop-propagation.directive'; -export * from './visibility.directive'; diff --git a/npm/ng-packs/packages/core/src/lib/directives/permission.directive.ts b/npm/ng-packs/packages/core/src/lib/directives/permission.directive.ts index 2e16cc0f2f..891c4c6e8c 100644 --- a/npm/ng-packs/packages/core/src/lib/directives/permission.directive.ts +++ b/npm/ng-packs/packages/core/src/lib/directives/permission.directive.ts @@ -40,28 +40,12 @@ export class PermissionDirective implements OnDestroy, OnChanges { .getGrantedPolicy$(this.condition) .pipe(distinctUntilChanged()) .subscribe(isGranted => { - if (this.templateRef) this.initStructural(isGranted); - else this.initAttribute(isGranted); - + this.vcRef.clear(); + if (isGranted) this.vcRef.createEmbeddedView(this.templateRef); this.cdRef.detectChanges(); }); } - private initStructural(isGranted: boolean) { - this.vcRef.clear(); - - if (isGranted) this.vcRef.createEmbeddedView(this.templateRef); - } - - /** - * @deprecated Will be deleted in v5.0 - */ - private initAttribute(isGranted: boolean) { - if (!isGranted) { - this.renderer.removeChild(this.elRef.nativeElement.parentElement, this.elRef.nativeElement); - } - } - ngOnDestroy(): void { if (this.subscription) this.subscription.unsubscribe(); } diff --git a/npm/ng-packs/packages/core/src/lib/directives/visibility.directive.ts b/npm/ng-packs/packages/core/src/lib/directives/visibility.directive.ts deleted file mode 100644 index 20d341b36d..0000000000 --- a/npm/ng-packs/packages/core/src/lib/directives/visibility.directive.ts +++ /dev/null @@ -1,66 +0,0 @@ -import { AfterViewInit, Directive, ElementRef, Input, Optional, Renderer2 } from '@angular/core'; -import { Subject } from 'rxjs'; - -/** - * - * @deprecated To be deleted in v5.0 - */ -@Directive({ - selector: '[abpVisibility]', -}) -export class VisibilityDirective implements AfterViewInit { - @Input('abpVisibility') - focusedElement: HTMLElement; - - completed$ = new Subject(); - - constructor(@Optional() private elRef: ElementRef, private renderer: Renderer2) {} - - ngAfterViewInit() { - if (!this.focusedElement && this.elRef) { - this.focusedElement = this.elRef.nativeElement; - } - - const observer = new MutationObserver(mutations => { - mutations.forEach(mutation => { - if (!mutation.target) return; - - const htmlNodes = - Array.from(mutation.target.childNodes || []).filter( - node => node instanceof HTMLElement, - ) || []; - - if (!htmlNodes.length) { - this.removeFromDOM(); - } - }); - }); - - observer.observe(this.focusedElement, { - childList: true, - }); - - setTimeout(() => { - const htmlNodes = - Array.from(this.focusedElement.childNodes || []).filter( - node => node instanceof HTMLElement, - ) || []; - - if (!htmlNodes.length) this.removeFromDOM(); - }, 0); - - this.completed$.subscribe(() => observer.disconnect()); - } - - disconnect() { - this.completed$.next(); - this.completed$.complete(); - } - - removeFromDOM() { - if (!this.elRef.nativeElement) return; - - this.renderer.removeChild(this.elRef.nativeElement.parentElement, this.elRef.nativeElement); - this.disconnect(); - } -} diff --git a/npm/ng-packs/packages/core/src/lib/models/application-configuration.ts b/npm/ng-packs/packages/core/src/lib/models/application-configuration.ts deleted file mode 100644 index eecc4874b9..0000000000 --- a/npm/ng-packs/packages/core/src/lib/models/application-configuration.ts +++ /dev/null @@ -1,117 +0,0 @@ -import { ABP } from './common'; - -export namespace ApplicationConfiguration { - /** - * @deprecated Use the ApplicationConfigurationDto interface instead. To be deleted in v5.0. - */ - export interface Response { - localization: Localization; - auth: Auth; - setting: Value; - currentUser: CurrentUser; - currentTenant: CurrentTenant; - features: Value; - } - - /** - * @deprecated Use the ApplicationLocalizationConfigurationDto interface instead. To be deleted in v5.0. - */ - export interface Localization { - currentCulture: CurrentCulture; - defaultResourceName: string; - languages: Language[]; - values: LocalizationValue; - } - - /** - * @deprecated Use the Record> type instead. To be deleted in v5.0. - */ - export interface LocalizationValue { - [key: string]: { [key: string]: string }; - } - - /** - * @deprecated Use the LanguageInfo interface instead. To be deleted in v5.0. - */ - export interface Language { - cultureName: string; - uiCultureName: string; - displayName: string; - flagIcon: string; - } - - /** - * @deprecated Use the CurrentCultureDto interface instead. To be deleted in v5.0. - */ - export interface CurrentCulture { - cultureName: string; - dateTimeFormat: DateTimeFormat; - displayName: string; - englishName: string; - isRightToLeft: boolean; - name: string; - nativeName: string; - threeLetterIsoLanguageName: string; - twoLetterIsoLanguageName: string; - } - - /** - * @deprecated Use the DateTimeFormatDto interface instead. To be deleted in v5.0. - */ - export interface DateTimeFormat { - calendarAlgorithmType: string; - dateSeparator: string; - fullDateTimePattern: string; - longTimePattern: string; - shortDatePattern: string; - shortTimePattern: string; - } - - /** - * @deprecated Use the ApplicationAuthConfigurationDto interface instead. To be deleted in v5.0. - */ - export interface Auth { - policies: Policy; - grantedPolicies: Policy; - } - - /** - * @deprecated Use the Record type instead. To be deleted in v5.0. - */ - export interface Policy { - [key: string]: boolean; - } - - /** - * @deprecated To be deleted in v5.0. - */ - export interface Value { - values: ABP.Dictionary; - } - - /** - * @deprecated Use the CurrentUserDto interface instead. To be deleted in v5.0. - */ - export interface CurrentUser { - email: string; - emailVerified: false; - id: string; - isAuthenticated: boolean; - roles: string[]; - tenantId: string; - userName: string; - name: string; - phoneNumber: string; - phoneNumberVerified: boolean; - surName: string; - } - - /** - * @deprecated Use the CurrentTenantDto interface instead. To be deleted in v5.0. - */ - export interface CurrentTenant { - id: string; - name: string; - isAvailable?: boolean; - } -} diff --git a/npm/ng-packs/packages/core/src/lib/models/index.ts b/npm/ng-packs/packages/core/src/lib/models/index.ts index f41e208924..67e1c4ed38 100644 --- a/npm/ng-packs/packages/core/src/lib/models/index.ts +++ b/npm/ng-packs/packages/core/src/lib/models/index.ts @@ -1,10 +1,8 @@ -export * from './application-configuration'; export * from './auth'; export * from './common'; export * from './dtos'; export * from './environment'; export * from './localization'; -export * from './profile'; export * from './replaceable-components'; export * from './rest'; export * from './session'; diff --git a/npm/ng-packs/packages/core/src/lib/models/profile.ts b/npm/ng-packs/packages/core/src/lib/models/profile.ts deleted file mode 100644 index adccbecc03..0000000000 --- a/npm/ng-packs/packages/core/src/lib/models/profile.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { ExtensibleObject } from './dtos'; - -export interface ChangePasswordInput { - currentPassword: string; - newPassword: string; -} - -export interface ProfileDto extends ExtensibleObject { - userName: string; - email: string; - name: string; - surname: string; - phoneNumber: string; - isExternal?: boolean; - hasPassword?: boolean; - emailConfirmed?: boolean; - phoneNumberConfirmed?: boolean; -} - -export interface UpdateProfileDto extends ExtensibleObject { - userName: string; - email: string; - name: string; - surname: string; - phoneNumber: string; -} diff --git a/npm/ng-packs/packages/core/src/lib/models/session.ts b/npm/ng-packs/packages/core/src/lib/models/session.ts index 7ce516a180..e86e0a2616 100644 --- a/npm/ng-packs/packages/core/src/lib/models/session.ts +++ b/npm/ng-packs/packages/core/src/lib/models/session.ts @@ -4,20 +4,5 @@ export namespace Session { export interface State { language: string; tenant: CurrentTenantDto; - /** - * - * @deprecated To be deleted in v5.0 - */ - sessionDetail: SessionDetail; - } - - /** - * - * @deprecated To be deleted in v5.0 - */ - export interface SessionDetail { - openedTabCount: number; - lastExitTime: number; - remember: boolean; } } diff --git a/npm/ng-packs/packages/core/src/lib/providers/cookie-language.provider.ts b/npm/ng-packs/packages/core/src/lib/providers/cookie-language.provider.ts new file mode 100644 index 0000000000..03f99a7db8 --- /dev/null +++ b/npm/ng-packs/packages/core/src/lib/providers/cookie-language.provider.ts @@ -0,0 +1,23 @@ +import { APP_INITIALIZER, Injector, Provider } from '@angular/core'; +import { DOCUMENT } from '@angular/common'; +import { SessionStateService } from '../services/session-state.service'; +import { COOKIE_LANGUAGE_KEY } from '../tokens/cookie-language-key.token'; + +export function setLanguageToCookie(injector: Injector) { + return () => { + const sessionState = injector.get(SessionStateService); + const document = injector.get(DOCUMENT); + const cookieLanguageKey = injector.get(COOKIE_LANGUAGE_KEY); + sessionState.getLanguage$().subscribe(language => { + const cookieValue = encodeURIComponent(`c=${language}|uic=${language}`); + document.cookie = `${cookieLanguageKey}=${cookieValue}`; + }); + }; +} + +export const CookieLanguageProvider: Provider = { + provide: APP_INITIALIZER, + useFactory: setLanguageToCookie, + deps: [Injector], + multi: true, +}; diff --git a/npm/ng-packs/packages/core/src/lib/providers/index.ts b/npm/ng-packs/packages/core/src/lib/providers/index.ts index fcbdb58be2..f7310ef146 100644 --- a/npm/ng-packs/packages/core/src/lib/providers/index.ts +++ b/npm/ng-packs/packages/core/src/lib/providers/index.ts @@ -1 +1,2 @@ +export * from './cookie-language.provider'; export * from './locale.provider'; diff --git a/npm/ng-packs/packages/core/src/lib/services/application-configuration.service.ts b/npm/ng-packs/packages/core/src/lib/services/application-configuration.service.ts deleted file mode 100644 index cda78e79f3..0000000000 --- a/npm/ng-packs/packages/core/src/lib/services/application-configuration.service.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { Injectable } from '@angular/core'; -import { Observable } from 'rxjs'; -import { Rest } from '../models/rest'; -import { ApplicationConfigurationDto } from '../proxy/volo/abp/asp-net-core/mvc/application-configurations/models'; -import { RestService } from './rest.service'; - -/** - * @deprecated Use AbpApplicationConfigurationService instead. To be deleted in v5.0. - */ -@Injectable({ - providedIn: 'root', -}) -export class ApplicationConfigurationService { - constructor(private rest: RestService) {} - - getConfiguration(): Observable { - const request: Rest.Request = { - method: 'GET', - url: '/api/abp/application-configuration', - }; - - return this.rest.request(request, {}); - } -} diff --git a/npm/ng-packs/packages/core/src/lib/services/auth.service.ts b/npm/ng-packs/packages/core/src/lib/services/auth.service.ts index 816e5a5905..aa920c1633 100644 --- a/npm/ng-packs/packages/core/src/lib/services/auth.service.ts +++ b/npm/ng-packs/packages/core/src/lib/services/auth.service.ts @@ -42,13 +42,6 @@ export class AuthService { return this.strategy.logout(queryParams); } - /** - * @deprecated Use navigateToLogin method instead. To be deleted in v5.0 - */ - initLogin() { - this.strategy.navigateToLogin(); - } - navigateToLogin(queryParams?: Params) { this.strategy.navigateToLogin(queryParams); } diff --git a/npm/ng-packs/packages/core/src/lib/services/config-state.service.ts b/npm/ng-packs/packages/core/src/lib/services/config-state.service.ts index 69cf23e8a4..3aadfa898b 100644 --- a/npm/ng-packs/packages/core/src/lib/services/config-state.service.ts +++ b/npm/ng-packs/packages/core/src/lib/services/config-state.service.ts @@ -1,9 +1,9 @@ import { Injectable } from '@angular/core'; import { Observable, Subject } from 'rxjs'; -import { map, take, switchMap } from 'rxjs/operators'; +import { map, switchMap, take } from 'rxjs/operators'; +import { AbpApplicationConfigurationService } from '../proxy/volo/abp/asp-net-core/mvc/application-configurations/abp-application-configuration.service'; import { ApplicationConfigurationDto } from '../proxy/volo/abp/asp-net-core/mvc/application-configurations/models'; import { InternalStore } from '../utils/internal-store-utils'; -import { AbpApplicationConfigurationService } from '../proxy/volo/abp/asp-net-core/mvc/application-configurations/abp-application-configuration.service'; @Injectable({ providedIn: 'root', @@ -24,15 +24,7 @@ export class ConfigStateService { private initUpdateStream() { this.updateSubject .pipe(switchMap(() => this.abpConfigService.get())) - .subscribe(res => this.setState(res)); - } - - /** - * @deprecated do not use this method directly, instead call refreshAppState - * This method will be private in v5.0 - */ - setState(state: ApplicationConfigurationDto) { - this.store.set(state); + .subscribe(res => this.store.set(res)); } refreshAppState() { diff --git a/npm/ng-packs/packages/core/src/lib/services/index.ts b/npm/ng-packs/packages/core/src/lib/services/index.ts index e79fb59e4f..6f20399fce 100644 --- a/npm/ng-packs/packages/core/src/lib/services/index.ts +++ b/npm/ng-packs/packages/core/src/lib/services/index.ts @@ -1,4 +1,3 @@ -export * from './application-configuration.service'; export * from './auth.service'; export * from './config-state.service'; export * from './content-projection.service'; @@ -11,7 +10,6 @@ export * from './list.service'; export * from './localization.service'; export * from './multi-tenancy.service'; export * from './permission.service'; -export * from './profile.service'; export * from './replaceable-components.service'; export * from './resource-wait.service'; export * from './rest.service'; diff --git a/npm/ng-packs/packages/core/src/lib/services/multi-tenancy.service.ts b/npm/ng-packs/packages/core/src/lib/services/multi-tenancy.service.ts index 99371f91e7..00b056ec8c 100644 --- a/npm/ng-packs/packages/core/src/lib/services/multi-tenancy.service.ts +++ b/npm/ng-packs/packages/core/src/lib/services/multi-tenancy.service.ts @@ -1,16 +1,14 @@ -import { Injectable, Inject } from '@angular/core'; -import { switchMap, map } from 'rxjs/operators'; -import { Observable } from 'rxjs'; -import { ABP } from '../models/common'; +import { Inject, Injectable } from '@angular/core'; +import { map, switchMap } from 'rxjs/operators'; +import { AbpTenantService } from '../proxy/pages/abp/multi-tenancy'; import { - FindTenantResultDto, CurrentTenantDto, + FindTenantResultDto, } from '../proxy/volo/abp/asp-net-core/mvc/multi-tenancy/models'; -import { RestService } from './rest.service'; -import { AbpTenantService } from '../proxy/pages/abp/multi-tenancy'; +import { TENANT_KEY } from '../tokens/tenant-key.token'; import { ConfigStateService } from './config-state.service'; +import { RestService } from './rest.service'; import { SessionStateService } from './session-state.service'; -import { TENANT_KEY } from '../tokens/tenant-key.token'; @Injectable({ providedIn: 'root' }) export class MultiTenancyService { @@ -33,30 +31,6 @@ export class MultiTenancyService { @Inject(TENANT_KEY) public tenantKey: string, ) {} - /** - * @deprecated Use AbpTenantService.findTenantByName method instead. To be deleted in v5.0. - */ - findTenantByName(name: string, headers: ABP.Dictionary): Observable { - return this.restService.request( - { - url: `/api/abp/multi-tenancy/tenants/by-name/${name}`, - method: 'GET', - headers, - }, - { apiName: this.apiName }, - ); - } - - /** - * @deprecated Use AbpTenantService.findTenantById method instead. To be deleted in v5.0. - */ - findTenantById(id: string, headers: ABP.Dictionary): Observable { - return this.restService.request( - { url: `/api/abp/multi-tenancy/tenants/by-id/${id}`, method: 'GET', headers }, - { apiName: this.apiName }, - ); - } - setTenantByName(tenantName: string) { return this.tenantService .findTenantByName(tenantName, { [this.tenantKey]: '' }) diff --git a/npm/ng-packs/packages/core/src/lib/services/profile.service.ts b/npm/ng-packs/packages/core/src/lib/services/profile.service.ts deleted file mode 100644 index 24293cb525..0000000000 --- a/npm/ng-packs/packages/core/src/lib/services/profile.service.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { Injectable } from '@angular/core'; -import { ChangePasswordInput, ProfileDto, UpdateProfileDto } from '../models/profile'; -import { RestService } from './rest.service'; - -@Injectable({ - providedIn: 'root', -}) -export class ProfileService { - apiName = 'AbpIdentity'; - - changePassword = (input: ChangePasswordInput, skipHandleError = false) => - this.restService.request( - { - method: 'POST', - url: '/api/identity/my-profile/change-password', - body: input, - }, - { apiName: this.apiName, skipHandleError }, - ); - - get = () => - this.restService.request( - { - method: 'GET', - url: '/api/identity/my-profile', - }, - { apiName: this.apiName }, - ); - - update = (input: UpdateProfileDto) => - this.restService.request( - { - method: 'PUT', - url: '/api/identity/my-profile', - body: input, - }, - { apiName: this.apiName }, - ); - - constructor(protected restService: RestService) {} -} diff --git a/npm/ng-packs/packages/core/src/lib/tests/application-configuration.service.spec.ts b/npm/ng-packs/packages/core/src/lib/tests/application-configuration.service.spec.ts deleted file mode 100644 index 43b6218697..0000000000 --- a/npm/ng-packs/packages/core/src/lib/tests/application-configuration.service.spec.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { createServiceFactory, SpectatorService } from '@ngneat/spectator/jest'; -import { of } from 'rxjs'; -import { ApplicationConfigurationService, RestService } from '../services'; - -describe('ApplicationConfigurationService', () => { - let spectator: SpectatorService; - const createService = createServiceFactory({ - service: ApplicationConfigurationService, - mocks: [RestService], - }); - - beforeEach(() => (spectator = createService())); - - it('should send a GET to application-configuration API', () => { - const rest = spectator.inject(RestService); - - const requestSpy = jest.spyOn(rest, 'request'); - requestSpy.mockReturnValue(of(null)); - - spectator.service.getConfiguration().subscribe(); - - expect(requestSpy).toHaveBeenCalledWith( - { method: 'GET', url: '/api/abp/application-configuration' }, - {}, - ); - }); -}); diff --git a/npm/ng-packs/packages/core/src/lib/tests/config-state.service.spec.ts b/npm/ng-packs/packages/core/src/lib/tests/config-state.service.spec.ts index a123f65ae3..3dc1b45732 100644 --- a/npm/ng-packs/packages/core/src/lib/tests/config-state.service.spec.ts +++ b/npm/ng-packs/packages/core/src/lib/tests/config-state.service.spec.ts @@ -1,5 +1,7 @@ import { HttpClientTestingModule } from '@angular/common/http/testing'; import { createServiceFactory, SpectatorService } from '@ngneat/spectator/jest'; +import { of } from 'rxjs'; +import { AbpApplicationConfigurationService } from '../proxy/volo/abp/asp-net-core/mvc/application-configurations/abp-application-configuration.service'; import { ApplicationConfigurationDto, CurrentUserDto, @@ -107,14 +109,20 @@ describe('ConfigStateService', () => { const createService = createServiceFactory({ service: ConfigStateService, imports: [HttpClientTestingModule], - providers: [{ provide: CORE_OPTIONS, useValue: { skipGetAppConfiguration: true } }], + providers: [ + { provide: CORE_OPTIONS, useValue: { skipGetAppConfiguration: true } }, + { + provide: AbpApplicationConfigurationService, + useValue: { get: () => of(CONFIG_STATE_DATA) }, + }, + ], }); beforeEach(() => { spectator = createService(); configState = spectator.service; - configState.setState(CONFIG_STATE_DATA); + configState.refreshAppState(); }); describe('#getAll', () => { diff --git a/npm/ng-packs/packages/core/src/lib/tests/localization.service.spec.ts b/npm/ng-packs/packages/core/src/lib/tests/localization.service.spec.ts index c8d89f54e4..b531b1bf23 100644 --- a/npm/ng-packs/packages/core/src/lib/tests/localization.service.spec.ts +++ b/npm/ng-packs/packages/core/src/lib/tests/localization.service.spec.ts @@ -1,13 +1,15 @@ import { Injector } from '@angular/core'; import { Router } from '@angular/router'; import { createServiceFactory, SpectatorService, SpyObject } from '@ngneat/spectator/jest'; -import { of } from 'rxjs'; +import { BehaviorSubject } from 'rxjs'; import { AbpApplicationConfigurationService } from '../proxy/volo/abp/asp-net-core/mvc/application-configurations/abp-application-configuration.service'; import { ConfigStateService, SessionStateService } from '../services'; import { LocalizationService } from '../services/localization.service'; import { CORE_OPTIONS } from '../tokens/options.token'; import { CONFIG_STATE_DATA } from './config-state.service.spec'; +const appConfigData$ = new BehaviorSubject(CONFIG_STATE_DATA); + describe('LocalizationService', () => { let spectator: SpectatorService; let sessionState: SpyObject; @@ -25,7 +27,7 @@ describe('LocalizationService', () => { }, { provide: AbpApplicationConfigurationService, - useValue: { get: () => of(CONFIG_STATE_DATA) }, + useValue: { get: () => appConfigData$ }, }, ], }); @@ -36,8 +38,9 @@ describe('LocalizationService', () => { configState = spectator.inject(ConfigStateService); service = spectator.service; - configState.setState(CONFIG_STATE_DATA); + configState.refreshAppState(); sessionState.setLanguage('tr'); + appConfigData$.next(CONFIG_STATE_DATA); }); describe('#currentLang', () => { @@ -108,12 +111,13 @@ describe('LocalizationService', () => { `( 'should return observable $expected when resource name is $resource and key is $key', async ({ resource, key, defaultValue, expected }) => { - configState.setState({ + appConfigData$.next({ localization: { values: { foo: { bar: 'baz' }, x: { y: 'z' } }, defaultResourceName: 'x', }, - }); + } as any); + configState.refreshAppState(); service.localize(resource, key, defaultValue).subscribe(result => { expect(result).toBe(expected); @@ -149,12 +153,13 @@ describe('LocalizationService', () => { `( 'should return $expected when resource name is $resource and key is $key', ({ resource, key, defaultValue, expected }) => { - configState.setState({ + appConfigData$.next({ localization: { values: { foo: { bar: 'baz' }, x: { y: 'z' } }, defaultResourceName: 'x', }, - }); + } as any); + configState.refreshAppState(); const result = service.localizeSync(resource, key, defaultValue); @@ -195,12 +200,13 @@ describe('LocalizationService', () => { `( 'should return observable $expected when resource names are $resources and keys are $keys', async ({ resources, keys, defaultValue, expected }) => { - configState.setState({ + appConfigData$.next({ localization: { values: { foo: { bar: 'baz' }, x: { y: 'z' } }, defaultResourceName: 'x', }, - }); + } as any); + configState.refreshAppState(); service.localizeWithFallback(resources, keys, defaultValue).subscribe(result => { expect(result).toBe(expected); @@ -241,12 +247,13 @@ describe('LocalizationService', () => { `( 'should return $expected when resource names are $resources and keys are $keys', ({ resources, keys, defaultValue, expected }) => { - configState.setState({ + appConfigData$.next({ localization: { values: { foo: { bar: 'baz' }, x: { y: 'z' } }, defaultResourceName: 'x', }, - }); + } as any); + configState.refreshAppState(); const result = service.localizeWithFallbackSync(resources, keys, defaultValue); diff --git a/npm/ng-packs/packages/core/src/lib/tests/permission.directive.spec.ts b/npm/ng-packs/packages/core/src/lib/tests/permission.directive.spec.ts index 7b65a4a9db..d465a60fa3 100644 --- a/npm/ng-packs/packages/core/src/lib/tests/permission.directive.spec.ts +++ b/npm/ng-packs/packages/core/src/lib/tests/permission.directive.spec.ts @@ -17,7 +17,7 @@ describe('PermissionDirective', () => { describe('with condition', () => { beforeEach(() => { spectator = createDirective( - `
                                                          Testing Permission Directive
                                                          `, + `
                                                          Testing Permission Directive
                                                          `, ); directive = spectator.directive; }); diff --git a/npm/ng-packs/packages/core/src/lib/tests/profile.service.spec.ts b/npm/ng-packs/packages/core/src/lib/tests/profile.service.spec.ts deleted file mode 100644 index 4fb8480b2d..0000000000 --- a/npm/ng-packs/packages/core/src/lib/tests/profile.service.spec.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { createHttpFactory, HttpMethod, SpectatorHttp, SpyObject } from '@ngneat/spectator/jest'; -import { UpdateProfileDto } from '../models'; -import { - EnvironmentService, - HttpErrorReporterService, - ProfileService, - RestService, -} from '../services'; -import { CORE_OPTIONS } from '../tokens'; - -describe('ProfileService', () => { - let spectator: SpectatorHttp; - let environmentService: SpyObject; - - const createHttp = createHttpFactory({ - service: ProfileService, - providers: [RestService, HttpErrorReporterService, { provide: CORE_OPTIONS, useValue: {} }], - mocks: [EnvironmentService], - }); - - beforeEach(() => { - spectator = createHttp(); - environmentService = spectator.inject(EnvironmentService); - const getApiUrlSpy = jest.spyOn(environmentService, 'getApiUrl'); - getApiUrlSpy.mockReturnValue('https://abp.io'); - }); - - it('should send a GET to my-profile API', () => { - spectator.service.get().subscribe(); - spectator.expectOne('https://abp.io/api/identity/my-profile', HttpMethod.GET); - }); - - it('should send a POST to change-password API', () => { - const mock = { currentPassword: 'test', newPassword: 'test' }; - spectator.service.changePassword(mock).subscribe(); - const req = spectator.expectOne( - 'https://abp.io/api/identity/my-profile/change-password', - HttpMethod.POST, - ); - expect(req.request.body).toEqual(mock); - }); - - it('should send a PUT to my-profile API', () => { - const mock = { - email: 'info@volosoft.com', - userName: 'admin', - name: 'John', - surname: 'Doe', - phoneNumber: '+123456', - isExternal: false, - hasPassword: false, - extraProperties: {}, - } as UpdateProfileDto; - - spectator.service.update(mock).subscribe(); - const req = spectator.expectOne('https://abp.io/api/identity/my-profile', HttpMethod.PUT); - expect(req.request.body).toEqual(mock); - }); -}); diff --git a/npm/ng-packs/packages/core/src/lib/tests/visibility.directive.spec.ts b/npm/ng-packs/packages/core/src/lib/tests/visibility.directive.spec.ts deleted file mode 100644 index 04c217eed5..0000000000 --- a/npm/ng-packs/packages/core/src/lib/tests/visibility.directive.spec.ts +++ /dev/null @@ -1,126 +0,0 @@ -import { SpectatorDirective, createDirectiveFactory } from '@ngneat/spectator/jest'; -import { VisibilityDirective } from '../directives/visibility.directive'; - -describe('VisibilityDirective', () => { - let spectator: SpectatorDirective; - let directive: VisibilityDirective; - const createDirective = createDirectiveFactory({ - directive: VisibilityDirective, - }); - - describe('without content', () => { - beforeEach(() => { - spectator = createDirective('
                                                          '); - directive = spectator.directive; - }); - - it('should be created', () => { - expect(directive).toBeTruthy(); - }); - - xit('should be removed', done => { - setTimeout(() => { - expect(spectator.query('div')).toBeFalsy(); - done(); - }, 0); - }); - }); - - describe('without mutation observer and with content', () => { - beforeEach(() => { - spectator = createDirective('

                                                          Content

                                                          '); - directive = spectator.directive; - }); - - it('should not removed', done => { - setTimeout(() => { - expect(spectator.query('div')).toBeTruthy(); - done(); - }, 0); - }); - }); - - describe('without mutation observer and with focused element', () => { - beforeEach(() => { - spectator = createDirective( - '

                                                          Content

                                                          ', - ); - directive = spectator.directive; - }); - - it('should not removed', done => { - setTimeout(() => { - expect(spectator.query('#main')).toBeTruthy(); - done(); - }, 0); - }); - }); - - describe('without content and with focused element', () => { - beforeEach(() => { - spectator = createDirective( - '
                                                          ', - ); - directive = spectator.directive; - }); - - xit('should be removed', done => { - setTimeout(() => { - expect(spectator.query('#main')).toBeFalsy(); - done(); - }, 0); - }); - }); - - describe('with mutation observer and with content', () => { - beforeEach(() => { - spectator = createDirective('
                                                          Content
                                                          '); - directive = spectator.directive; - }); - - xit('should remove the main div element when content removed', done => { - spectator.query('#content').remove(); - - setTimeout(() => { - expect(spectator.query('div')).toBeFalsy(); - done(); - }, 0); - }); - - it('should not remove the main div element', done => { - spectator.query('div').appendChild(document.createElement('div')); - - setTimeout(() => { - expect(spectator.query('div')).toBeTruthy(); - done(); - }, 100); - }); - }); - - describe('with mutation observer and with focused element', () => { - beforeEach(() => { - spectator = createDirective( - '

                                                          Content

                                                          ', - ); - directive = spectator.directive; - }); - - xit('should remove the main div element when content removed', done => { - spectator.query('#content').remove(); - - setTimeout(() => { - expect(spectator.query('#main')).toBeFalsy(); - done(); - }, 0); - }); - - it('should not remove the main div element', done => { - spectator.query('#content').appendChild(document.createElement('div')); - - setTimeout(() => { - expect(spectator.query('#main')).toBeTruthy(); - done(); - }, 100); - }); - }); -}); diff --git a/npm/ng-packs/packages/core/src/lib/tokens/cookie-language-key.token.ts b/npm/ng-packs/packages/core/src/lib/tokens/cookie-language-key.token.ts new file mode 100644 index 0000000000..b14ad142bc --- /dev/null +++ b/npm/ng-packs/packages/core/src/lib/tokens/cookie-language-key.token.ts @@ -0,0 +1,5 @@ +import { InjectionToken } from '@angular/core'; + +export const COOKIE_LANGUAGE_KEY = new InjectionToken('COOKIE_LANGUAGE_KEY', { + factory: () => '.AspNetCore.Culture', +}); diff --git a/npm/ng-packs/packages/core/src/lib/tokens/index.ts b/npm/ng-packs/packages/core/src/lib/tokens/index.ts index 4d102ee8b4..2b7028ce53 100644 --- a/npm/ng-packs/packages/core/src/lib/tokens/index.ts +++ b/npm/ng-packs/packages/core/src/lib/tokens/index.ts @@ -1,6 +1,7 @@ +export * from './app-config.token'; +export * from './cookie-language-key.token'; export * from './list.token'; export * from './lodaer-delay.token'; export * from './manage-profile.token'; export * from './options.token'; -export * from './app-config.token'; export * from './tenant-key.token'; diff --git a/npm/ng-packs/packages/core/src/lib/utils/date-utils.ts b/npm/ng-packs/packages/core/src/lib/utils/date-utils.ts index 6c4793f895..2144bf69a1 100644 --- a/npm/ng-packs/packages/core/src/lib/utils/date-utils.ts +++ b/npm/ng-packs/packages/core/src/lib/utils/date-utils.ts @@ -1,4 +1,3 @@ -import { ApplicationConfiguration } from '../models/application-configuration'; import { DateTimeFormatDto } from '../proxy/volo/abp/asp-net-core/mvc/application-configurations/models'; import { ConfigStateService } from '../services'; diff --git a/npm/ng-packs/packages/core/src/lib/utils/index.ts b/npm/ng-packs/packages/core/src/lib/utils/index.ts index e7fe63deb0..56378f664f 100644 --- a/npm/ng-packs/packages/core/src/lib/utils/index.ts +++ b/npm/ng-packs/packages/core/src/lib/utils/index.ts @@ -16,6 +16,5 @@ export * from './multi-tenancy-utils'; export * from './number-utils'; export * from './object-utils'; export * from './route-utils'; -export * from './rxjs-utils'; export * from './string-utils'; export * from './tree-utils'; diff --git a/npm/ng-packs/packages/core/src/lib/utils/rxjs-utils.ts b/npm/ng-packs/packages/core/src/lib/utils/rxjs-utils.ts deleted file mode 100644 index 4a237abbfc..0000000000 --- a/npm/ng-packs/packages/core/src/lib/utils/rxjs-utils.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { Observable, Subject } from 'rxjs'; -import { takeUntil } from 'rxjs/operators'; - -function isFunction(value) { - return typeof value === 'function'; -} - -/** - * @deprecated no longer working, please use SubscriptionService (https://docs.abp.io/en/abp/latest/UI/Angular/Subscription-Service) instead. - */ -export const takeUntilDestroy = - (componentInstance, destroyMethodName = 'ngOnDestroy') => - (source: Observable) => { - const originalDestroy = componentInstance[destroyMethodName]; - if (isFunction(originalDestroy) === false) { - throw new Error( - `${componentInstance.constructor.name} is using untilDestroyed but doesn't implement ${destroyMethodName}`, - ); - } - if (!componentInstance['__takeUntilDestroy']) { - componentInstance['__takeUntilDestroy'] = new Subject(); - - componentInstance[destroyMethodName] = function () { - // eslint-disable-next-line prefer-rest-params - isFunction(originalDestroy) && originalDestroy.apply(this, arguments); - componentInstance['__takeUntilDestroy'].next(true); - componentInstance['__takeUntilDestroy'].complete(); - }; - } - return source.pipe(takeUntil(componentInstance['__takeUntilDestroy'])); - }; diff --git a/npm/ng-packs/packages/core/tsconfig.json b/npm/ng-packs/packages/core/tsconfig.json index 692cc17b32..f34e44326c 100644 --- a/npm/ng-packs/packages/core/tsconfig.json +++ b/npm/ng-packs/packages/core/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../tsconfig.json", "files": [], "include": [], "references": [ diff --git a/npm/ng-packs/packages/feature-management/proxy/ng-package.json b/npm/ng-packs/packages/feature-management/proxy/ng-package.json new file mode 100644 index 0000000000..6356198c97 --- /dev/null +++ b/npm/ng-packs/packages/feature-management/proxy/ng-package.json @@ -0,0 +1,7 @@ +{ + "$schema": "../../../node_modules/ng-packagr/ng-package.schema.json", + "dest": "../../../dist/packages/feature-management/proxy", + "lib": { + "entryFile": "src/public-api.ts" + } +} diff --git a/npm/ng-packs/packages/feature-management/proxy/src/lib/index.ts b/npm/ng-packs/packages/feature-management/proxy/src/lib/index.ts new file mode 100644 index 0000000000..e41dc91c32 --- /dev/null +++ b/npm/ng-packs/packages/feature-management/proxy/src/lib/index.ts @@ -0,0 +1,2 @@ +export * from './proxy/feature-management'; +export * from './proxy/validation'; diff --git a/npm/ng-packs/packages/permission-management/src/lib/proxy/README.md b/npm/ng-packs/packages/feature-management/proxy/src/lib/proxy/README.md similarity index 100% rename from npm/ng-packs/packages/permission-management/src/lib/proxy/README.md rename to npm/ng-packs/packages/feature-management/proxy/src/lib/proxy/README.md diff --git a/npm/ng-packs/packages/feature-management/proxy/src/lib/proxy/feature-management/features.service.ts b/npm/ng-packs/packages/feature-management/proxy/src/lib/proxy/feature-management/features.service.ts new file mode 100644 index 0000000000..c1ff025b1b --- /dev/null +++ b/npm/ng-packs/packages/feature-management/proxy/src/lib/proxy/feature-management/features.service.ts @@ -0,0 +1,29 @@ +import type { GetFeatureListResultDto, UpdateFeaturesDto } from './models'; +import { RestService } from '@abp/ng.core'; +import { Injectable } from '@angular/core'; + +@Injectable({ + providedIn: 'root', +}) +export class FeaturesService { + apiName = 'AbpFeatureManagement'; + + get = (providerName: string, providerKey: string) => + this.restService.request({ + method: 'GET', + url: '/api/feature-management/features', + params: { providerName, providerKey }, + }, + { apiName: this.apiName }); + + update = (providerName: string, providerKey: string, input: UpdateFeaturesDto) => + this.restService.request({ + method: 'PUT', + url: '/api/feature-management/features', + params: { providerName, providerKey }, + body: input, + }, + { apiName: this.apiName }); + + constructor(private restService: RestService) {} +} diff --git a/npm/ng-packs/packages/feature-management/src/lib/proxy/feature-management/index.ts b/npm/ng-packs/packages/feature-management/proxy/src/lib/proxy/feature-management/index.ts similarity index 100% rename from npm/ng-packs/packages/feature-management/src/lib/proxy/feature-management/index.ts rename to npm/ng-packs/packages/feature-management/proxy/src/lib/proxy/feature-management/index.ts diff --git a/npm/ng-packs/packages/feature-management/src/lib/proxy/feature-management/models.ts b/npm/ng-packs/packages/feature-management/proxy/src/lib/proxy/feature-management/models.ts similarity index 69% rename from npm/ng-packs/packages/feature-management/src/lib/proxy/feature-management/models.ts rename to npm/ng-packs/packages/feature-management/proxy/src/lib/proxy/feature-management/models.ts index 8ea2d73164..b79a0112cb 100644 --- a/npm/ng-packs/packages/feature-management/src/lib/proxy/feature-management/models.ts +++ b/npm/ng-packs/packages/feature-management/proxy/src/lib/proxy/feature-management/models.ts @@ -1,25 +1,25 @@ import type { IStringValueType } from '../validation/string-values/models'; export interface FeatureDto { - name: string; - displayName: string; - value: string; + name?: string; + displayName?: string; + value?: string; provider: FeatureProviderDto; - description: string; + description?: string; valueType: IStringValueType; depth: number; - parentName: string; + parentName?: string; } export interface FeatureGroupDto { - name: string; - displayName: string; + name?: string; + displayName?: string; features: FeatureDto[]; } export interface FeatureProviderDto { - name: string; - key: string; + name?: string; + key?: string; } export interface GetFeatureListResultDto { @@ -27,8 +27,8 @@ export interface GetFeatureListResultDto { } export interface UpdateFeatureDto { - name: string; - value: string; + name?: string; + value?: string; } export interface UpdateFeaturesDto { diff --git a/npm/ng-packs/packages/feature-management/proxy/src/lib/proxy/generate-proxy.json b/npm/ng-packs/packages/feature-management/proxy/src/lib/proxy/generate-proxy.json new file mode 100644 index 0000000000..f85f0045c6 --- /dev/null +++ b/npm/ng-packs/packages/feature-management/proxy/src/lib/proxy/generate-proxy.json @@ -0,0 +1,5305 @@ +{ + "generated": [ + "featureManagement" + ], + "modules": { + "featureManagement": { + "rootPath": "featureManagement", + "remoteServiceName": "AbpFeatureManagement", + "controllers": { + "Volo.Abp.FeatureManagement.FeaturesController": { + "controllerName": "Features", + "controllerGroupName": "Features", + "type": "Volo.Abp.FeatureManagement.FeaturesController", + "interfaces": [ + { + "type": "Volo.Abp.FeatureManagement.IFeatureAppService" + } + ], + "actions": { + "GetAsyncByProviderNameAndProviderKey": { + "uniqueName": "GetAsyncByProviderNameAndProviderKey", + "name": "GetAsync", + "httpMethod": "GET", + "url": "api/feature-management/features", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "providerName", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "providerKey", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "providerName", + "name": "providerName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "" + }, + { + "nameOnMethod": "providerKey", + "name": "providerKey", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.Abp.FeatureManagement.GetFeatureListResultDto", + "typeSimple": "Volo.Abp.FeatureManagement.GetFeatureListResultDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.FeatureManagement.IFeatureAppService" + }, + "UpdateAsyncByProviderNameAndProviderKeyAndInput": { + "uniqueName": "UpdateAsyncByProviderNameAndProviderKeyAndInput", + "name": "UpdateAsync", + "httpMethod": "PUT", + "url": "api/feature-management/features", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "providerName", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "providerKey", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "input", + "typeAsString": "Volo.Abp.FeatureManagement.UpdateFeaturesDto, Volo.Abp.FeatureManagement.Application.Contracts", + "type": "Volo.Abp.FeatureManagement.UpdateFeaturesDto", + "typeSimple": "Volo.Abp.FeatureManagement.UpdateFeaturesDto", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "providerName", + "name": "providerName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "" + }, + { + "nameOnMethod": "providerKey", + "name": "providerKey", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "" + }, + { + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Volo.Abp.FeatureManagement.UpdateFeaturesDto", + "typeSimple": "Volo.Abp.FeatureManagement.UpdateFeaturesDto", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.FeatureManagement.IFeatureAppService" + } + } + } + } + }, + "multi-tenancy": { + "rootPath": "multi-tenancy", + "remoteServiceName": "AbpTenantManagement", + "controllers": { + "Volo.Abp.TenantManagement.TenantController": { + "controllerName": "Tenant", + "controllerGroupName": "Tenant", + "type": "Volo.Abp.TenantManagement.TenantController", + "interfaces": [ + { + "type": "Volo.Abp.TenantManagement.ITenantAppService" + } + ], + "actions": { + "GetAsyncById": { + "uniqueName": "GetAsyncById", + "name": "GetAsync", + "httpMethod": "GET", + "url": "api/multi-tenancy/tenants/{id}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.Abp.TenantManagement.TenantDto", + "typeSimple": "Volo.Abp.TenantManagement.TenantDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.IReadOnlyAppService" + }, + "GetListAsyncByInput": { + "uniqueName": "GetListAsyncByInput", + "name": "GetListAsync", + "httpMethod": "GET", + "url": "api/multi-tenancy/tenants", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "Volo.Abp.TenantManagement.GetTenantsInput, Volo.Abp.TenantManagement.Application.Contracts", + "type": "Volo.Abp.TenantManagement.GetTenantsInput", + "typeSimple": "Volo.Abp.TenantManagement.GetTenantsInput", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "input", + "name": "Filter", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "Sorting", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "SkipCount", + "jsonName": null, + "type": "System.Int32", + "typeSimple": "number", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "MaxResultCount", + "jsonName": null, + "type": "System.Int32", + "typeSimple": "number", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + } + ], + "returnValue": { + "type": "Volo.Abp.Application.Dtos.PagedResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.IReadOnlyAppService" + }, + "CreateAsyncByInput": { + "uniqueName": "CreateAsyncByInput", + "name": "CreateAsync", + "httpMethod": "POST", + "url": "api/multi-tenancy/tenants", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "Volo.Abp.TenantManagement.TenantCreateDto, Volo.Abp.TenantManagement.Application.Contracts", + "type": "Volo.Abp.TenantManagement.TenantCreateDto", + "typeSimple": "Volo.Abp.TenantManagement.TenantCreateDto", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Volo.Abp.TenantManagement.TenantCreateDto", + "typeSimple": "Volo.Abp.TenantManagement.TenantCreateDto", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.Abp.TenantManagement.TenantDto", + "typeSimple": "Volo.Abp.TenantManagement.TenantDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.ICreateAppService" + }, + "UpdateAsyncByIdAndInput": { + "uniqueName": "UpdateAsyncByIdAndInput", + "name": "UpdateAsync", + "httpMethod": "PUT", + "url": "api/multi-tenancy/tenants/{id}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "input", + "typeAsString": "Volo.Abp.TenantManagement.TenantUpdateDto, Volo.Abp.TenantManagement.Application.Contracts", + "type": "Volo.Abp.TenantManagement.TenantUpdateDto", + "typeSimple": "Volo.Abp.TenantManagement.TenantUpdateDto", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + }, + { + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Volo.Abp.TenantManagement.TenantUpdateDto", + "typeSimple": "Volo.Abp.TenantManagement.TenantUpdateDto", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.Abp.TenantManagement.TenantDto", + "typeSimple": "Volo.Abp.TenantManagement.TenantDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.IUpdateAppService" + }, + "DeleteAsyncById": { + "uniqueName": "DeleteAsyncById", + "name": "DeleteAsync", + "httpMethod": "DELETE", + "url": "api/multi-tenancy/tenants/{id}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.IDeleteAppService" + }, + "GetDefaultConnectionStringAsyncById": { + "uniqueName": "GetDefaultConnectionStringAsyncById", + "name": "GetDefaultConnectionStringAsync", + "httpMethod": "GET", + "url": "api/multi-tenancy/tenants/{id}/default-connection-string", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.String", + "typeSimple": "string" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.TenantManagement.ITenantAppService" + }, + "UpdateDefaultConnectionStringAsyncByIdAndDefaultConnectionString": { + "uniqueName": "UpdateDefaultConnectionStringAsyncByIdAndDefaultConnectionString", + "name": "UpdateDefaultConnectionStringAsync", + "httpMethod": "PUT", + "url": "api/multi-tenancy/tenants/{id}/default-connection-string", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "defaultConnectionString", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + }, + { + "nameOnMethod": "defaultConnectionString", + "name": "defaultConnectionString", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.TenantManagement.ITenantAppService" + }, + "DeleteDefaultConnectionStringAsyncById": { + "uniqueName": "DeleteDefaultConnectionStringAsyncById", + "name": "DeleteDefaultConnectionStringAsync", + "httpMethod": "DELETE", + "url": "api/multi-tenancy/tenants/{id}/default-connection-string", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.TenantManagement.ITenantAppService" + } + } + } + } + }, + "account": { + "rootPath": "account", + "remoteServiceName": "AbpAccount", + "controllers": { + "Volo.Abp.Account.AccountController": { + "controllerName": "Account", + "controllerGroupName": "Account", + "type": "Volo.Abp.Account.AccountController", + "interfaces": [ + { + "type": "Volo.Abp.Account.IAccountAppService" + } + ], + "actions": { + "RegisterAsyncByInput": { + "uniqueName": "RegisterAsyncByInput", + "name": "RegisterAsync", + "httpMethod": "POST", + "url": "api/account/register", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "Volo.Abp.Account.RegisterDto, Volo.Abp.Account.Application.Contracts", + "type": "Volo.Abp.Account.RegisterDto", + "typeSimple": "Volo.Abp.Account.RegisterDto", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Volo.Abp.Account.RegisterDto", + "typeSimple": "Volo.Abp.Account.RegisterDto", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.Abp.Identity.IdentityUserDto", + "typeSimple": "Volo.Abp.Identity.IdentityUserDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Account.IAccountAppService" + }, + "SendPasswordResetCodeAsyncByInput": { + "uniqueName": "SendPasswordResetCodeAsyncByInput", + "name": "SendPasswordResetCodeAsync", + "httpMethod": "POST", + "url": "api/account/send-password-reset-code", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "Volo.Abp.Account.SendPasswordResetCodeDto, Volo.Abp.Account.Application.Contracts", + "type": "Volo.Abp.Account.SendPasswordResetCodeDto", + "typeSimple": "Volo.Abp.Account.SendPasswordResetCodeDto", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Volo.Abp.Account.SendPasswordResetCodeDto", + "typeSimple": "Volo.Abp.Account.SendPasswordResetCodeDto", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Account.IAccountAppService" + }, + "ResetPasswordAsyncByInput": { + "uniqueName": "ResetPasswordAsyncByInput", + "name": "ResetPasswordAsync", + "httpMethod": "POST", + "url": "api/account/reset-password", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "Volo.Abp.Account.ResetPasswordDto, Volo.Abp.Account.Application.Contracts", + "type": "Volo.Abp.Account.ResetPasswordDto", + "typeSimple": "Volo.Abp.Account.ResetPasswordDto", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Volo.Abp.Account.ResetPasswordDto", + "typeSimple": "Volo.Abp.Account.ResetPasswordDto", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Account.IAccountAppService" + } + } + }, + "Volo.Abp.Account.Web.Areas.Account.Controllers.AccountController": { + "controllerName": "Account", + "controllerGroupName": "Login", + "type": "Volo.Abp.Account.Web.Areas.Account.Controllers.AccountController", + "interfaces": [], + "actions": { + "LoginByLogin": { + "uniqueName": "LoginByLogin", + "name": "Login", + "httpMethod": "POST", + "url": "api/account/login", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "login", + "typeAsString": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo, Volo.Abp.Account.Web", + "type": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo", + "typeSimple": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "login", + "name": "login", + "jsonName": null, + "type": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo", + "typeSimple": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.AbpLoginResult", + "typeSimple": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.AbpLoginResult" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Account.Web.Areas.Account.Controllers.AccountController" + }, + "Logout": { + "uniqueName": "Logout", + "name": "Logout", + "httpMethod": "GET", + "url": "api/account/logout", + "supportedVersions": [], + "parametersOnMethod": [], + "parameters": [], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Account.Web.Areas.Account.Controllers.AccountController" + }, + "CheckPasswordByLogin": { + "uniqueName": "CheckPasswordByLogin", + "name": "CheckPassword", + "httpMethod": "POST", + "url": "api/account/check-password", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "login", + "typeAsString": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo, Volo.Abp.Account.Web", + "type": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo", + "typeSimple": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "login", + "name": "login", + "jsonName": null, + "type": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo", + "typeSimple": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.AbpLoginResult", + "typeSimple": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.AbpLoginResult" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Account.Web.Areas.Account.Controllers.AccountController" + } + } + } + } + }, + "settingManagement": { + "rootPath": "settingManagement", + "remoteServiceName": "SettingManagement", + "controllers": { + "Volo.Abp.SettingManagement.EmailSettingsController": { + "controllerName": "EmailSettings", + "controllerGroupName": "EmailSettings", + "type": "Volo.Abp.SettingManagement.EmailSettingsController", + "interfaces": [ + { + "type": "Volo.Abp.SettingManagement.IEmailSettingsAppService" + } + ], + "actions": { + "GetAsync": { + "uniqueName": "GetAsync", + "name": "GetAsync", + "httpMethod": "GET", + "url": "api/setting-management/emailing", + "supportedVersions": [], + "parametersOnMethod": [], + "parameters": [], + "returnValue": { + "type": "Volo.Abp.SettingManagement.EmailSettingsDto", + "typeSimple": "Volo.Abp.SettingManagement.EmailSettingsDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.SettingManagement.IEmailSettingsAppService" + }, + "UpdateAsyncByInput": { + "uniqueName": "UpdateAsyncByInput", + "name": "UpdateAsync", + "httpMethod": "POST", + "url": "api/setting-management/emailing", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "Volo.Abp.SettingManagement.UpdateEmailSettingsDto, Volo.Abp.SettingManagement.Application.Contracts", + "type": "Volo.Abp.SettingManagement.UpdateEmailSettingsDto", + "typeSimple": "Volo.Abp.SettingManagement.UpdateEmailSettingsDto", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Volo.Abp.SettingManagement.UpdateEmailSettingsDto", + "typeSimple": "Volo.Abp.SettingManagement.UpdateEmailSettingsDto", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.SettingManagement.IEmailSettingsAppService" + } + } + } + } + }, + "permissionManagement": { + "rootPath": "permissionManagement", + "remoteServiceName": "AbpPermissionManagement", + "controllers": { + "Volo.Abp.PermissionManagement.PermissionsController": { + "controllerName": "Permissions", + "controllerGroupName": "Permissions", + "type": "Volo.Abp.PermissionManagement.PermissionsController", + "interfaces": [ + { + "type": "Volo.Abp.PermissionManagement.IPermissionAppService" + } + ], + "actions": { + "GetAsyncByProviderNameAndProviderKey": { + "uniqueName": "GetAsyncByProviderNameAndProviderKey", + "name": "GetAsync", + "httpMethod": "GET", + "url": "api/permission-management/permissions", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "providerName", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "providerKey", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "providerName", + "name": "providerName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "" + }, + { + "nameOnMethod": "providerKey", + "name": "providerKey", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.Abp.PermissionManagement.GetPermissionListResultDto", + "typeSimple": "Volo.Abp.PermissionManagement.GetPermissionListResultDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.PermissionManagement.IPermissionAppService" + }, + "UpdateAsyncByProviderNameAndProviderKeyAndInput": { + "uniqueName": "UpdateAsyncByProviderNameAndProviderKeyAndInput", + "name": "UpdateAsync", + "httpMethod": "PUT", + "url": "api/permission-management/permissions", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "providerName", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "providerKey", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "input", + "typeAsString": "Volo.Abp.PermissionManagement.UpdatePermissionsDto, Volo.Abp.PermissionManagement.Application.Contracts", + "type": "Volo.Abp.PermissionManagement.UpdatePermissionsDto", + "typeSimple": "Volo.Abp.PermissionManagement.UpdatePermissionsDto", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "providerName", + "name": "providerName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "" + }, + { + "nameOnMethod": "providerKey", + "name": "providerKey", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "" + }, + { + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Volo.Abp.PermissionManagement.UpdatePermissionsDto", + "typeSimple": "Volo.Abp.PermissionManagement.UpdatePermissionsDto", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.PermissionManagement.IPermissionAppService" + } + } + } + } + }, + "abp": { + "rootPath": "abp", + "remoteServiceName": "abp", + "controllers": { + "Pages.Abp.MultiTenancy.AbpTenantController": { + "controllerName": "AbpTenant", + "controllerGroupName": "AbpTenant", + "type": "Pages.Abp.MultiTenancy.AbpTenantController", + "interfaces": [ + { + "type": "Volo.Abp.AspNetCore.Mvc.MultiTenancy.IAbpTenantAppService" + } + ], + "actions": { + "FindTenantByNameAsyncByName": { + "uniqueName": "FindTenantByNameAsyncByName", + "name": "FindTenantByNameAsync", + "httpMethod": "GET", + "url": "api/abp/multi-tenancy/tenants/by-name/{name}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "name", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "name", + "name": "name", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.Abp.AspNetCore.Mvc.MultiTenancy.FindTenantResultDto", + "typeSimple": "Volo.Abp.AspNetCore.Mvc.MultiTenancy.FindTenantResultDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.AspNetCore.Mvc.MultiTenancy.IAbpTenantAppService" + }, + "FindTenantByIdAsyncById": { + "uniqueName": "FindTenantByIdAsyncById", + "name": "FindTenantByIdAsync", + "httpMethod": "GET", + "url": "api/abp/multi-tenancy/tenants/by-id/{id}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.Abp.AspNetCore.Mvc.MultiTenancy.FindTenantResultDto", + "typeSimple": "Volo.Abp.AspNetCore.Mvc.MultiTenancy.FindTenantResultDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.AspNetCore.Mvc.MultiTenancy.IAbpTenantAppService" + } + } + }, + "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationController": { + "controllerName": "AbpApplicationConfiguration", + "controllerGroupName": "AbpApplicationConfiguration", + "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationController", + "interfaces": [ + { + "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.IAbpApplicationConfigurationAppService" + } + ], + "actions": { + "GetAsync": { + "uniqueName": "GetAsync", + "name": "GetAsync", + "httpMethod": "GET", + "url": "api/abp/application-configuration", + "supportedVersions": [], + "parametersOnMethod": [], + "parameters": [], + "returnValue": { + "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationConfigurationDto", + "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationConfigurationDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.IAbpApplicationConfigurationAppService" + } + } + }, + "Volo.Abp.AspNetCore.Mvc.ApiExploring.AbpApiDefinitionController": { + "controllerName": "AbpApiDefinition", + "controllerGroupName": "AbpApiDefinition", + "type": "Volo.Abp.AspNetCore.Mvc.ApiExploring.AbpApiDefinitionController", + "interfaces": [], + "actions": { + "GetByModel": { + "uniqueName": "GetByModel", + "name": "Get", + "httpMethod": "GET", + "url": "api/abp/api-definition", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "model", + "typeAsString": "Volo.Abp.Http.Modeling.ApplicationApiDescriptionModelRequestDto, Volo.Abp.Http", + "type": "Volo.Abp.Http.Modeling.ApplicationApiDescriptionModelRequestDto", + "typeSimple": "Volo.Abp.Http.Modeling.ApplicationApiDescriptionModelRequestDto", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "model", + "name": "IncludeTypes", + "jsonName": null, + "type": "System.Boolean", + "typeSimple": "boolean", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "model" + } + ], + "returnValue": { + "type": "Volo.Abp.Http.Modeling.ApplicationApiDescriptionModel", + "typeSimple": "Volo.Abp.Http.Modeling.ApplicationApiDescriptionModel" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.AspNetCore.Mvc.ApiExploring.AbpApiDefinitionController" + } + } + } + } + }, + "identity": { + "rootPath": "identity", + "remoteServiceName": "AbpIdentity", + "controllers": { + "Volo.Abp.Identity.IdentityRoleController": { + "controllerName": "IdentityRole", + "controllerGroupName": "Role", + "type": "Volo.Abp.Identity.IdentityRoleController", + "interfaces": [ + { + "type": "Volo.Abp.Identity.IIdentityRoleAppService" + } + ], + "actions": { + "GetAllListAsync": { + "uniqueName": "GetAllListAsync", + "name": "GetAllListAsync", + "httpMethod": "GET", + "url": "api/identity/roles/all", + "supportedVersions": [], + "parametersOnMethod": [], + "parameters": [], + "returnValue": { + "type": "Volo.Abp.Application.Dtos.ListResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Identity.IIdentityRoleAppService" + }, + "GetListAsyncByInput": { + "uniqueName": "GetListAsyncByInput", + "name": "GetListAsync", + "httpMethod": "GET", + "url": "api/identity/roles", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "Volo.Abp.Identity.GetIdentityRolesInput, Volo.Abp.Identity.Application.Contracts", + "type": "Volo.Abp.Identity.GetIdentityRolesInput", + "typeSimple": "Volo.Abp.Identity.GetIdentityRolesInput", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "input", + "name": "Filter", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "Sorting", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "SkipCount", + "jsonName": null, + "type": "System.Int32", + "typeSimple": "number", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "MaxResultCount", + "jsonName": null, + "type": "System.Int32", + "typeSimple": "number", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + } + ], + "returnValue": { + "type": "Volo.Abp.Application.Dtos.PagedResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.IReadOnlyAppService" + }, + "GetAsyncById": { + "uniqueName": "GetAsyncById", + "name": "GetAsync", + "httpMethod": "GET", + "url": "api/identity/roles/{id}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.Abp.Identity.IdentityRoleDto", + "typeSimple": "Volo.Abp.Identity.IdentityRoleDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.IReadOnlyAppService" + }, + "CreateAsyncByInput": { + "uniqueName": "CreateAsyncByInput", + "name": "CreateAsync", + "httpMethod": "POST", + "url": "api/identity/roles", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "Volo.Abp.Identity.IdentityRoleCreateDto, Volo.Abp.Identity.Application.Contracts", + "type": "Volo.Abp.Identity.IdentityRoleCreateDto", + "typeSimple": "Volo.Abp.Identity.IdentityRoleCreateDto", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Volo.Abp.Identity.IdentityRoleCreateDto", + "typeSimple": "Volo.Abp.Identity.IdentityRoleCreateDto", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.Abp.Identity.IdentityRoleDto", + "typeSimple": "Volo.Abp.Identity.IdentityRoleDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.ICreateAppService" + }, + "UpdateAsyncByIdAndInput": { + "uniqueName": "UpdateAsyncByIdAndInput", + "name": "UpdateAsync", + "httpMethod": "PUT", + "url": "api/identity/roles/{id}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "input", + "typeAsString": "Volo.Abp.Identity.IdentityRoleUpdateDto, Volo.Abp.Identity.Application.Contracts", + "type": "Volo.Abp.Identity.IdentityRoleUpdateDto", + "typeSimple": "Volo.Abp.Identity.IdentityRoleUpdateDto", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + }, + { + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Volo.Abp.Identity.IdentityRoleUpdateDto", + "typeSimple": "Volo.Abp.Identity.IdentityRoleUpdateDto", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.Abp.Identity.IdentityRoleDto", + "typeSimple": "Volo.Abp.Identity.IdentityRoleDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.IUpdateAppService" + }, + "DeleteAsyncById": { + "uniqueName": "DeleteAsyncById", + "name": "DeleteAsync", + "httpMethod": "DELETE", + "url": "api/identity/roles/{id}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.IDeleteAppService" + } + } + }, + "Volo.Abp.Identity.IdentityUserController": { + "controllerName": "IdentityUser", + "controllerGroupName": "User", + "type": "Volo.Abp.Identity.IdentityUserController", + "interfaces": [ + { + "type": "Volo.Abp.Identity.IIdentityUserAppService" + } + ], + "actions": { + "GetAsyncById": { + "uniqueName": "GetAsyncById", + "name": "GetAsync", + "httpMethod": "GET", + "url": "api/identity/users/{id}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.Abp.Identity.IdentityUserDto", + "typeSimple": "Volo.Abp.Identity.IdentityUserDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.IReadOnlyAppService" + }, + "GetListAsyncByInput": { + "uniqueName": "GetListAsyncByInput", + "name": "GetListAsync", + "httpMethod": "GET", + "url": "api/identity/users", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "Volo.Abp.Identity.GetIdentityUsersInput, Volo.Abp.Identity.Application.Contracts", + "type": "Volo.Abp.Identity.GetIdentityUsersInput", + "typeSimple": "Volo.Abp.Identity.GetIdentityUsersInput", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "input", + "name": "Filter", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "Sorting", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "SkipCount", + "jsonName": null, + "type": "System.Int32", + "typeSimple": "number", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "MaxResultCount", + "jsonName": null, + "type": "System.Int32", + "typeSimple": "number", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + } + ], + "returnValue": { + "type": "Volo.Abp.Application.Dtos.PagedResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.IReadOnlyAppService" + }, + "CreateAsyncByInput": { + "uniqueName": "CreateAsyncByInput", + "name": "CreateAsync", + "httpMethod": "POST", + "url": "api/identity/users", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "Volo.Abp.Identity.IdentityUserCreateDto, Volo.Abp.Identity.Application.Contracts", + "type": "Volo.Abp.Identity.IdentityUserCreateDto", + "typeSimple": "Volo.Abp.Identity.IdentityUserCreateDto", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Volo.Abp.Identity.IdentityUserCreateDto", + "typeSimple": "Volo.Abp.Identity.IdentityUserCreateDto", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.Abp.Identity.IdentityUserDto", + "typeSimple": "Volo.Abp.Identity.IdentityUserDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.ICreateAppService" + }, + "UpdateAsyncByIdAndInput": { + "uniqueName": "UpdateAsyncByIdAndInput", + "name": "UpdateAsync", + "httpMethod": "PUT", + "url": "api/identity/users/{id}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "input", + "typeAsString": "Volo.Abp.Identity.IdentityUserUpdateDto, Volo.Abp.Identity.Application.Contracts", + "type": "Volo.Abp.Identity.IdentityUserUpdateDto", + "typeSimple": "Volo.Abp.Identity.IdentityUserUpdateDto", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + }, + { + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Volo.Abp.Identity.IdentityUserUpdateDto", + "typeSimple": "Volo.Abp.Identity.IdentityUserUpdateDto", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.Abp.Identity.IdentityUserDto", + "typeSimple": "Volo.Abp.Identity.IdentityUserDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.IUpdateAppService" + }, + "DeleteAsyncById": { + "uniqueName": "DeleteAsyncById", + "name": "DeleteAsync", + "httpMethod": "DELETE", + "url": "api/identity/users/{id}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.IDeleteAppService" + }, + "GetRolesAsyncById": { + "uniqueName": "GetRolesAsyncById", + "name": "GetRolesAsync", + "httpMethod": "GET", + "url": "api/identity/users/{id}/roles", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.Abp.Application.Dtos.ListResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Identity.IIdentityUserAppService" + }, + "GetAssignableRolesAsync": { + "uniqueName": "GetAssignableRolesAsync", + "name": "GetAssignableRolesAsync", + "httpMethod": "GET", + "url": "api/identity/users/assignable-roles", + "supportedVersions": [], + "parametersOnMethod": [], + "parameters": [], + "returnValue": { + "type": "Volo.Abp.Application.Dtos.ListResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Identity.IIdentityUserAppService" + }, + "UpdateRolesAsyncByIdAndInput": { + "uniqueName": "UpdateRolesAsyncByIdAndInput", + "name": "UpdateRolesAsync", + "httpMethod": "PUT", + "url": "api/identity/users/{id}/roles", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "input", + "typeAsString": "Volo.Abp.Identity.IdentityUserUpdateRolesDto, Volo.Abp.Identity.Application.Contracts", + "type": "Volo.Abp.Identity.IdentityUserUpdateRolesDto", + "typeSimple": "Volo.Abp.Identity.IdentityUserUpdateRolesDto", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + }, + { + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Volo.Abp.Identity.IdentityUserUpdateRolesDto", + "typeSimple": "Volo.Abp.Identity.IdentityUserUpdateRolesDto", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Identity.IIdentityUserAppService" + }, + "FindByUsernameAsyncByUserName": { + "uniqueName": "FindByUsernameAsyncByUserName", + "name": "FindByUsernameAsync", + "httpMethod": "GET", + "url": "api/identity/users/by-username/{userName}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "userName", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "userName", + "name": "userName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.Abp.Identity.IdentityUserDto", + "typeSimple": "Volo.Abp.Identity.IdentityUserDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Identity.IIdentityUserAppService" + }, + "FindByEmailAsyncByEmail": { + "uniqueName": "FindByEmailAsyncByEmail", + "name": "FindByEmailAsync", + "httpMethod": "GET", + "url": "api/identity/users/by-email/{email}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "email", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "email", + "name": "email", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.Abp.Identity.IdentityUserDto", + "typeSimple": "Volo.Abp.Identity.IdentityUserDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Identity.IIdentityUserAppService" + } + } + }, + "Volo.Abp.Identity.IdentityUserLookupController": { + "controllerName": "IdentityUserLookup", + "controllerGroupName": "UserLookup", + "type": "Volo.Abp.Identity.IdentityUserLookupController", + "interfaces": [ + { + "type": "Volo.Abp.Identity.IIdentityUserLookupAppService" + } + ], + "actions": { + "FindByIdAsyncById": { + "uniqueName": "FindByIdAsyncById", + "name": "FindByIdAsync", + "httpMethod": "GET", + "url": "api/identity/users/lookup/{id}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.Abp.Users.UserData", + "typeSimple": "Volo.Abp.Users.UserData" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Identity.IIdentityUserLookupAppService" + }, + "FindByUserNameAsyncByUserName": { + "uniqueName": "FindByUserNameAsyncByUserName", + "name": "FindByUserNameAsync", + "httpMethod": "GET", + "url": "api/identity/users/lookup/by-username/{userName}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "userName", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "userName", + "name": "userName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.Abp.Users.UserData", + "typeSimple": "Volo.Abp.Users.UserData" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Identity.IIdentityUserLookupAppService" + }, + "SearchAsyncByInput": { + "uniqueName": "SearchAsyncByInput", + "name": "SearchAsync", + "httpMethod": "GET", + "url": "api/identity/users/lookup/search", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "Volo.Abp.Identity.UserLookupSearchInputDto, Volo.Abp.Identity.Application.Contracts", + "type": "Volo.Abp.Identity.UserLookupSearchInputDto", + "typeSimple": "Volo.Abp.Identity.UserLookupSearchInputDto", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "input", + "name": "Filter", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "Sorting", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "SkipCount", + "jsonName": null, + "type": "System.Int32", + "typeSimple": "number", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "MaxResultCount", + "jsonName": null, + "type": "System.Int32", + "typeSimple": "number", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + } + ], + "returnValue": { + "type": "Volo.Abp.Application.Dtos.ListResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Identity.IIdentityUserLookupAppService" + }, + "GetCountAsyncByInput": { + "uniqueName": "GetCountAsyncByInput", + "name": "GetCountAsync", + "httpMethod": "GET", + "url": "api/identity/users/lookup/count", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "Volo.Abp.Identity.UserLookupCountInputDto, Volo.Abp.Identity.Application.Contracts", + "type": "Volo.Abp.Identity.UserLookupCountInputDto", + "typeSimple": "Volo.Abp.Identity.UserLookupCountInputDto", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "input", + "name": "Filter", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + } + ], + "returnValue": { + "type": "System.Int64", + "typeSimple": "number" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Identity.IIdentityUserLookupAppService" + } + } + }, + "Volo.Abp.Identity.ProfileController": { + "controllerName": "Profile", + "controllerGroupName": "Profile", + "type": "Volo.Abp.Identity.ProfileController", + "interfaces": [ + { + "type": "Volo.Abp.Identity.IProfileAppService" + } + ], + "actions": { + "GetAsync": { + "uniqueName": "GetAsync", + "name": "GetAsync", + "httpMethod": "GET", + "url": "api/identity/my-profile", + "supportedVersions": [], + "parametersOnMethod": [], + "parameters": [], + "returnValue": { + "type": "Volo.Abp.Identity.ProfileDto", + "typeSimple": "Volo.Abp.Identity.ProfileDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Identity.IProfileAppService" + }, + "UpdateAsyncByInput": { + "uniqueName": "UpdateAsyncByInput", + "name": "UpdateAsync", + "httpMethod": "PUT", + "url": "api/identity/my-profile", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "Volo.Abp.Identity.UpdateProfileDto, Volo.Abp.Identity.Application.Contracts", + "type": "Volo.Abp.Identity.UpdateProfileDto", + "typeSimple": "Volo.Abp.Identity.UpdateProfileDto", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Volo.Abp.Identity.UpdateProfileDto", + "typeSimple": "Volo.Abp.Identity.UpdateProfileDto", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.Abp.Identity.ProfileDto", + "typeSimple": "Volo.Abp.Identity.ProfileDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Identity.IProfileAppService" + }, + "ChangePasswordAsyncByInput": { + "uniqueName": "ChangePasswordAsyncByInput", + "name": "ChangePasswordAsync", + "httpMethod": "POST", + "url": "api/identity/my-profile/change-password", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "Volo.Abp.Identity.ChangePasswordInput, Volo.Abp.Identity.Application.Contracts", + "type": "Volo.Abp.Identity.ChangePasswordInput", + "typeSimple": "Volo.Abp.Identity.ChangePasswordInput", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Volo.Abp.Identity.ChangePasswordInput", + "typeSimple": "Volo.Abp.Identity.ChangePasswordInput", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Identity.IProfileAppService" + } + } + } + } + } + }, + "types": { + "Volo.Abp.Account.RegisterDto": { + "baseType": "Volo.Abp.ObjectExtending.ExtensibleObject", + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "UserName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": true + }, + { + "name": "EmailAddress", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": true + }, + { + "name": "Password", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": true + }, + { + "name": "AppName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": true + } + ] + }, + "Volo.Abp.ObjectExtending.ExtensibleObject": { + "baseType": null, + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "ExtraProperties", + "jsonName": null, + "type": "{System.String:System.Object}", + "typeSimple": "{string:object}", + "isRequired": false + } + ] + }, + "Volo.Abp.Identity.IdentityUserDto": { + "baseType": "Volo.Abp.Application.Dtos.ExtensibleFullAuditedEntityDto", + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "TenantId", + "jsonName": null, + "type": "System.Guid?", + "typeSimple": "string?", + "isRequired": false + }, + { + "name": "UserName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "Name", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "Surname", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "Email", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "EmailConfirmed", + "jsonName": null, + "type": "System.Boolean", + "typeSimple": "boolean", + "isRequired": false + }, + { + "name": "PhoneNumber", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "PhoneNumberConfirmed", + "jsonName": null, + "type": "System.Boolean", + "typeSimple": "boolean", + "isRequired": false + }, + { + "name": "LockoutEnabled", + "jsonName": null, + "type": "System.Boolean", + "typeSimple": "boolean", + "isRequired": false + }, + { + "name": "LockoutEnd", + "jsonName": null, + "type": "System.DateTimeOffset?", + "typeSimple": "string?", + "isRequired": false + }, + { + "name": "ConcurrencyStamp", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + } + ] + }, + "Volo.Abp.Application.Dtos.ExtensibleFullAuditedEntityDto": { + "baseType": "Volo.Abp.Application.Dtos.ExtensibleAuditedEntityDto", + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": [ + "TPrimaryKey" + ], + "properties": [ + { + "name": "IsDeleted", + "jsonName": null, + "type": "System.Boolean", + "typeSimple": "boolean", + "isRequired": false + }, + { + "name": "DeleterId", + "jsonName": null, + "type": "System.Guid?", + "typeSimple": "string?", + "isRequired": false + }, + { + "name": "DeletionTime", + "jsonName": null, + "type": "System.DateTime?", + "typeSimple": "string?", + "isRequired": false + } + ] + }, + "Volo.Abp.Application.Dtos.ExtensibleAuditedEntityDto": { + "baseType": "Volo.Abp.Application.Dtos.ExtensibleCreationAuditedEntityDto", + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": [ + "TPrimaryKey" + ], + "properties": [ + { + "name": "LastModificationTime", + "jsonName": null, + "type": "System.DateTime?", + "typeSimple": "string?", + "isRequired": false + }, + { + "name": "LastModifierId", + "jsonName": null, + "type": "System.Guid?", + "typeSimple": "string?", + "isRequired": false + } + ] + }, + "Volo.Abp.Application.Dtos.ExtensibleCreationAuditedEntityDto": { + "baseType": "Volo.Abp.Application.Dtos.ExtensibleEntityDto", + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": [ + "TPrimaryKey" + ], + "properties": [ + { + "name": "CreationTime", + "jsonName": null, + "type": "System.DateTime", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "CreatorId", + "jsonName": null, + "type": "System.Guid?", + "typeSimple": "string?", + "isRequired": false + } + ] + }, + "Volo.Abp.Application.Dtos.ExtensibleEntityDto": { + "baseType": "Volo.Abp.ObjectExtending.ExtensibleObject", + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": [ + "TKey" + ], + "properties": [ + { + "name": "Id", + "jsonName": null, + "type": "TKey", + "typeSimple": "TKey", + "isRequired": false + } + ] + }, + "Volo.Abp.Account.SendPasswordResetCodeDto": { + "baseType": null, + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "Email", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": true + }, + { + "name": "AppName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": true + }, + { + "name": "ReturnUrl", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "ReturnUrlHash", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + } + ] + }, + "Volo.Abp.Account.ResetPasswordDto": { + "baseType": null, + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "UserId", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "ResetToken", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": true + }, + { + "name": "Password", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": true + } + ] + }, + "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo": { + "baseType": null, + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "UserNameOrEmailAddress", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": true + }, + { + "name": "Password", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": true + }, + { + "name": "RememberMe", + "jsonName": null, + "type": "System.Boolean", + "typeSimple": "boolean", + "isRequired": false + } + ] + }, + "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.AbpLoginResult": { + "baseType": null, + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "Result", + "jsonName": null, + "type": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.LoginResultType", + "typeSimple": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.LoginResultType", + "isRequired": false + }, + { + "name": "Description", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + } + ] + }, + "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.LoginResultType": { + "baseType": "System.Enum", + "isEnum": true, + "enumNames": [ + "Success", + "InvalidUserNameOrPassword", + "NotAllowed", + "LockedOut", + "RequiresTwoFactor" + ], + "enumValues": [ + 1, + 2, + 3, + 4, + 5 + ], + "genericArguments": null, + "properties": null + }, + "Volo.Abp.AspNetCore.Mvc.MultiTenancy.FindTenantResultDto": { + "baseType": null, + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "Success", + "jsonName": null, + "type": "System.Boolean", + "typeSimple": "boolean", + "isRequired": false + }, + { + "name": "TenantId", + "jsonName": null, + "type": "System.Guid?", + "typeSimple": "string?", + "isRequired": false + }, + { + "name": "Name", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "IsActive", + "jsonName": null, + "type": "System.Boolean", + "typeSimple": "boolean", + "isRequired": false + } + ] + }, + "Volo.Abp.Application.Dtos.ListResultDto": { + "baseType": null, + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": [ + "T" + ], + "properties": [ + { + "name": "Items", + "jsonName": null, + "type": "[T]", + "typeSimple": "[T]", + "isRequired": false + } + ] + }, + "Volo.Abp.Identity.IdentityRoleDto": { + "baseType": "Volo.Abp.Application.Dtos.ExtensibleEntityDto", + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "Name", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "IsDefault", + "jsonName": null, + "type": "System.Boolean", + "typeSimple": "boolean", + "isRequired": false + }, + { + "name": "IsStatic", + "jsonName": null, + "type": "System.Boolean", + "typeSimple": "boolean", + "isRequired": false + }, + { + "name": "IsPublic", + "jsonName": null, + "type": "System.Boolean", + "typeSimple": "boolean", + "isRequired": false + }, + { + "name": "ConcurrencyStamp", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + } + ] + }, + "Volo.Abp.Identity.GetIdentityRolesInput": { + "baseType": "Volo.Abp.Application.Dtos.PagedAndSortedResultRequestDto", + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "Filter", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + } + ] + }, + "Volo.Abp.Application.Dtos.PagedAndSortedResultRequestDto": { + "baseType": "Volo.Abp.Application.Dtos.PagedResultRequestDto", + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "Sorting", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + } + ] + }, + "Volo.Abp.Application.Dtos.PagedResultRequestDto": { + "baseType": "Volo.Abp.Application.Dtos.LimitedResultRequestDto", + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "SkipCount", + "jsonName": null, + "type": "System.Int32", + "typeSimple": "number", + "isRequired": false + } + ] + }, + "Volo.Abp.Application.Dtos.LimitedResultRequestDto": { + "baseType": null, + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "DefaultMaxResultCount", + "jsonName": null, + "type": "System.Int32", + "typeSimple": "number", + "isRequired": false + }, + { + "name": "MaxMaxResultCount", + "jsonName": null, + "type": "System.Int32", + "typeSimple": "number", + "isRequired": false + }, + { + "name": "MaxResultCount", + "jsonName": null, + "type": "System.Int32", + "typeSimple": "number", + "isRequired": false + } + ] + }, + "Volo.Abp.Application.Dtos.PagedResultDto": { + "baseType": "Volo.Abp.Application.Dtos.ListResultDto", + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": [ + "T" + ], + "properties": [ + { + "name": "TotalCount", + "jsonName": null, + "type": "System.Int64", + "typeSimple": "number", + "isRequired": false + } + ] + }, + "Volo.Abp.Identity.IdentityRoleCreateDto": { + "baseType": "Volo.Abp.Identity.IdentityRoleCreateOrUpdateDtoBase", + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [] + }, + "Volo.Abp.Identity.IdentityRoleCreateOrUpdateDtoBase": { + "baseType": "Volo.Abp.ObjectExtending.ExtensibleObject", + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "Name", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": true + }, + { + "name": "IsDefault", + "jsonName": null, + "type": "System.Boolean", + "typeSimple": "boolean", + "isRequired": false + }, + { + "name": "IsPublic", + "jsonName": null, + "type": "System.Boolean", + "typeSimple": "boolean", + "isRequired": false + } + ] + }, + "Volo.Abp.Identity.IdentityRoleUpdateDto": { + "baseType": "Volo.Abp.Identity.IdentityRoleCreateOrUpdateDtoBase", + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "ConcurrencyStamp", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + } + ] + }, + "Volo.Abp.Identity.GetIdentityUsersInput": { + "baseType": "Volo.Abp.Application.Dtos.PagedAndSortedResultRequestDto", + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "Filter", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + } + ] + }, + "Volo.Abp.Identity.IdentityUserCreateDto": { + "baseType": "Volo.Abp.Identity.IdentityUserCreateOrUpdateDtoBase", + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "Password", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": true + } + ] + }, + "Volo.Abp.Identity.IdentityUserCreateOrUpdateDtoBase": { + "baseType": "Volo.Abp.ObjectExtending.ExtensibleObject", + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "UserName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": true + }, + { + "name": "Name", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "Surname", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "Email", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": true + }, + { + "name": "PhoneNumber", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "LockoutEnabled", + "jsonName": null, + "type": "System.Boolean", + "typeSimple": "boolean", + "isRequired": false + }, + { + "name": "RoleNames", + "jsonName": null, + "type": "[System.String]", + "typeSimple": "[string]", + "isRequired": false + } + ] + }, + "Volo.Abp.Identity.IdentityUserUpdateDto": { + "baseType": "Volo.Abp.Identity.IdentityUserCreateOrUpdateDtoBase", + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "Password", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "ConcurrencyStamp", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + } + ] + }, + "Volo.Abp.Identity.IdentityUserUpdateRolesDto": { + "baseType": null, + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "RoleNames", + "jsonName": null, + "type": "[System.String]", + "typeSimple": "[string]", + "isRequired": true + } + ] + }, + "Volo.Abp.Users.UserData": { + "baseType": null, + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "Id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "TenantId", + "jsonName": null, + "type": "System.Guid?", + "typeSimple": "string?", + "isRequired": false + }, + { + "name": "UserName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "Name", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "Surname", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "Email", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "EmailConfirmed", + "jsonName": null, + "type": "System.Boolean", + "typeSimple": "boolean", + "isRequired": false + }, + { + "name": "PhoneNumber", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "PhoneNumberConfirmed", + "jsonName": null, + "type": "System.Boolean", + "typeSimple": "boolean", + "isRequired": false + } + ] + }, + "Volo.Abp.Identity.UserLookupSearchInputDto": { + "baseType": "Volo.Abp.Application.Dtos.PagedAndSortedResultRequestDto", + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "Filter", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + } + ] + }, + "Volo.Abp.Identity.UserLookupCountInputDto": { + "baseType": null, + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "Filter", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + } + ] + }, + "Volo.Abp.Identity.ProfileDto": { + "baseType": "Volo.Abp.ObjectExtending.ExtensibleObject", + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "UserName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "Email", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "Name", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "Surname", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "PhoneNumber", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "IsExternal", + "jsonName": null, + "type": "System.Boolean", + "typeSimple": "boolean", + "isRequired": false + }, + { + "name": "HasPassword", + "jsonName": null, + "type": "System.Boolean", + "typeSimple": "boolean", + "isRequired": false + }, + { + "name": "ConcurrencyStamp", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + } + ] + }, + "Volo.Abp.Identity.UpdateProfileDto": { + "baseType": "Volo.Abp.ObjectExtending.ExtensibleObject", + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "UserName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "Email", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "Name", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "Surname", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "PhoneNumber", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "ConcurrencyStamp", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + } + ] + }, + "Volo.Abp.Identity.ChangePasswordInput": { + "baseType": null, + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "CurrentPassword", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "NewPassword", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": true + } + ] + }, + "Volo.Abp.PermissionManagement.GetPermissionListResultDto": { + "baseType": null, + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "EntityDisplayName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "Groups", + "jsonName": null, + "type": "[Volo.Abp.PermissionManagement.PermissionGroupDto]", + "typeSimple": "[Volo.Abp.PermissionManagement.PermissionGroupDto]", + "isRequired": false + } + ] + }, + "Volo.Abp.PermissionManagement.PermissionGroupDto": { + "baseType": null, + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "Name", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "DisplayName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "Permissions", + "jsonName": null, + "type": "[Volo.Abp.PermissionManagement.PermissionGrantInfoDto]", + "typeSimple": "[Volo.Abp.PermissionManagement.PermissionGrantInfoDto]", + "isRequired": false + } + ] + }, + "Volo.Abp.PermissionManagement.PermissionGrantInfoDto": { + "baseType": null, + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "Name", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "DisplayName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "ParentName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "IsGranted", + "jsonName": null, + "type": "System.Boolean", + "typeSimple": "boolean", + "isRequired": false + }, + { + "name": "AllowedProviders", + "jsonName": null, + "type": "[System.String]", + "typeSimple": "[string]", + "isRequired": false + }, + { + "name": "GrantedProviders", + "jsonName": null, + "type": "[Volo.Abp.PermissionManagement.ProviderInfoDto]", + "typeSimple": "[Volo.Abp.PermissionManagement.ProviderInfoDto]", + "isRequired": false + } + ] + }, + "Volo.Abp.PermissionManagement.ProviderInfoDto": { + "baseType": null, + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "ProviderName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "ProviderKey", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + } + ] + }, + "Volo.Abp.PermissionManagement.UpdatePermissionsDto": { + "baseType": null, + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "Permissions", + "jsonName": null, + "type": "[Volo.Abp.PermissionManagement.UpdatePermissionDto]", + "typeSimple": "[Volo.Abp.PermissionManagement.UpdatePermissionDto]", + "isRequired": false + } + ] + }, + "Volo.Abp.PermissionManagement.UpdatePermissionDto": { + "baseType": null, + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "Name", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "IsGranted", + "jsonName": null, + "type": "System.Boolean", + "typeSimple": "boolean", + "isRequired": false + } + ] + }, + "Volo.Abp.SettingManagement.EmailSettingsDto": { + "baseType": null, + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "SmtpHost", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "SmtpPort", + "jsonName": null, + "type": "System.Int32", + "typeSimple": "number", + "isRequired": false + }, + { + "name": "SmtpUserName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "SmtpPassword", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "SmtpDomain", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "SmtpEnableSsl", + "jsonName": null, + "type": "System.Boolean", + "typeSimple": "boolean", + "isRequired": false + }, + { + "name": "SmtpUseDefaultCredentials", + "jsonName": null, + "type": "System.Boolean", + "typeSimple": "boolean", + "isRequired": false + }, + { + "name": "DefaultFromAddress", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "DefaultFromDisplayName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + } + ] + }, + "Volo.Abp.SettingManagement.UpdateEmailSettingsDto": { + "baseType": null, + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "SmtpHost", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "SmtpPort", + "jsonName": null, + "type": "System.Int32", + "typeSimple": "number", + "isRequired": false + }, + { + "name": "SmtpUserName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "SmtpPassword", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "SmtpDomain", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "SmtpEnableSsl", + "jsonName": null, + "type": "System.Boolean", + "typeSimple": "boolean", + "isRequired": false + }, + { + "name": "SmtpUseDefaultCredentials", + "jsonName": null, + "type": "System.Boolean", + "typeSimple": "boolean", + "isRequired": false + }, + { + "name": "DefaultFromAddress", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": true + }, + { + "name": "DefaultFromDisplayName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": true + } + ] + }, + "Volo.Abp.TenantManagement.TenantDto": { + "baseType": "Volo.Abp.Application.Dtos.ExtensibleEntityDto", + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "Name", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "ConcurrencyStamp", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + } + ] + }, + "Volo.Abp.TenantManagement.GetTenantsInput": { + "baseType": "Volo.Abp.Application.Dtos.PagedAndSortedResultRequestDto", + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "Filter", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + } + ] + }, + "Volo.Abp.TenantManagement.TenantCreateDto": { + "baseType": "Volo.Abp.TenantManagement.TenantCreateOrUpdateDtoBase", + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "AdminEmailAddress", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": true + }, + { + "name": "AdminPassword", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": true + } + ] + }, + "Volo.Abp.TenantManagement.TenantCreateOrUpdateDtoBase": { + "baseType": "Volo.Abp.ObjectExtending.ExtensibleObject", + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "Name", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": true + } + ] + }, + "Volo.Abp.TenantManagement.TenantUpdateDto": { + "baseType": "Volo.Abp.TenantManagement.TenantCreateOrUpdateDtoBase", + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "ConcurrencyStamp", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + } + ] + }, + "Volo.Abp.FeatureManagement.GetFeatureListResultDto": { + "baseType": null, + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "Groups", + "jsonName": null, + "type": "[Volo.Abp.FeatureManagement.FeatureGroupDto]", + "typeSimple": "[Volo.Abp.FeatureManagement.FeatureGroupDto]", + "isRequired": false + } + ] + }, + "Volo.Abp.FeatureManagement.FeatureGroupDto": { + "baseType": null, + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "Name", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "DisplayName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "Features", + "jsonName": null, + "type": "[Volo.Abp.FeatureManagement.FeatureDto]", + "typeSimple": "[Volo.Abp.FeatureManagement.FeatureDto]", + "isRequired": false + } + ] + }, + "Volo.Abp.FeatureManagement.FeatureDto": { + "baseType": null, + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "Name", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "DisplayName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "Value", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "Provider", + "jsonName": null, + "type": "Volo.Abp.FeatureManagement.FeatureProviderDto", + "typeSimple": "Volo.Abp.FeatureManagement.FeatureProviderDto", + "isRequired": false + }, + { + "name": "Description", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "ValueType", + "jsonName": null, + "type": "Volo.Abp.Validation.StringValues.IStringValueType", + "typeSimple": "Volo.Abp.Validation.StringValues.IStringValueType", + "isRequired": false + }, + { + "name": "Depth", + "jsonName": null, + "type": "System.Int32", + "typeSimple": "number", + "isRequired": false + }, + { + "name": "ParentName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + } + ] + }, + "Volo.Abp.FeatureManagement.FeatureProviderDto": { + "baseType": null, + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "Name", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "Key", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + } + ] + }, + "Volo.Abp.Validation.StringValues.IStringValueType": { + "baseType": null, + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "Name", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "Item", + "jsonName": null, + "type": "System.Object", + "typeSimple": "object", + "isRequired": false + }, + { + "name": "Properties", + "jsonName": null, + "type": "{System.String:System.Object}", + "typeSimple": "{string:object}", + "isRequired": false + }, + { + "name": "Validator", + "jsonName": null, + "type": "Volo.Abp.Validation.StringValues.IValueValidator", + "typeSimple": "Volo.Abp.Validation.StringValues.IValueValidator", + "isRequired": false + } + ] + }, + "Volo.Abp.Validation.StringValues.IValueValidator": { + "baseType": null, + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "Name", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "Item", + "jsonName": null, + "type": "System.Object", + "typeSimple": "object", + "isRequired": false + }, + { + "name": "Properties", + "jsonName": null, + "type": "{System.String:System.Object}", + "typeSimple": "{string:object}", + "isRequired": false + } + ] + }, + "Volo.Abp.FeatureManagement.UpdateFeaturesDto": { + "baseType": null, + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "Features", + "jsonName": null, + "type": "[Volo.Abp.FeatureManagement.UpdateFeatureDto]", + "typeSimple": "[Volo.Abp.FeatureManagement.UpdateFeatureDto]", + "isRequired": false + } + ] + }, + "Volo.Abp.FeatureManagement.UpdateFeatureDto": { + "baseType": null, + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "Name", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "Value", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + } + ] + }, + "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationConfigurationDto": { + "baseType": null, + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "Localization", + "jsonName": null, + "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationLocalizationConfigurationDto", + "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationLocalizationConfigurationDto", + "isRequired": false + }, + { + "name": "Auth", + "jsonName": null, + "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationAuthConfigurationDto", + "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationAuthConfigurationDto", + "isRequired": false + }, + { + "name": "Setting", + "jsonName": null, + "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationSettingConfigurationDto", + "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationSettingConfigurationDto", + "isRequired": false + }, + { + "name": "CurrentUser", + "jsonName": null, + "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.CurrentUserDto", + "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.CurrentUserDto", + "isRequired": false + }, + { + "name": "Features", + "jsonName": null, + "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationFeatureConfigurationDto", + "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationFeatureConfigurationDto", + "isRequired": false + }, + { + "name": "MultiTenancy", + "jsonName": null, + "type": "Volo.Abp.AspNetCore.Mvc.MultiTenancy.MultiTenancyInfoDto", + "typeSimple": "Volo.Abp.AspNetCore.Mvc.MultiTenancy.MultiTenancyInfoDto", + "isRequired": false + }, + { + "name": "CurrentTenant", + "jsonName": null, + "type": "Volo.Abp.AspNetCore.Mvc.MultiTenancy.CurrentTenantDto", + "typeSimple": "Volo.Abp.AspNetCore.Mvc.MultiTenancy.CurrentTenantDto", + "isRequired": false + }, + { + "name": "Timing", + "jsonName": null, + "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.TimingDto", + "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.TimingDto", + "isRequired": false + }, + { + "name": "Clock", + "jsonName": null, + "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ClockDto", + "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ClockDto", + "isRequired": false + }, + { + "name": "ObjectExtensions", + "jsonName": null, + "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ObjectExtensionsDto", + "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ObjectExtensionsDto", + "isRequired": false + } + ] + }, + "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationLocalizationConfigurationDto": { + "baseType": null, + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "Values", + "jsonName": null, + "type": "{System.String:System.Collections.Generic.Dictionary}", + "typeSimple": "{string:System.Collections.Generic.Dictionary}", + "isRequired": false + }, + { + "name": "Languages", + "jsonName": null, + "type": "[Volo.Abp.Localization.LanguageInfo]", + "typeSimple": "[Volo.Abp.Localization.LanguageInfo]", + "isRequired": false + }, + { + "name": "CurrentCulture", + "jsonName": null, + "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.CurrentCultureDto", + "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.CurrentCultureDto", + "isRequired": false + }, + { + "name": "DefaultResourceName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "LanguagesMap", + "jsonName": null, + "type": "{System.String:[Volo.Abp.NameValue]}", + "typeSimple": "{string:[Volo.Abp.NameValue]}", + "isRequired": false + }, + { + "name": "LanguageFilesMap", + "jsonName": null, + "type": "{System.String:[Volo.Abp.NameValue]}", + "typeSimple": "{string:[Volo.Abp.NameValue]}", + "isRequired": false + } + ] + }, + "Volo.Abp.Localization.LanguageInfo": { + "baseType": null, + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "CultureName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "UiCultureName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "DisplayName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "FlagIcon", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + } + ] + }, + "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.CurrentCultureDto": { + "baseType": null, + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "DisplayName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "EnglishName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "ThreeLetterIsoLanguageName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "TwoLetterIsoLanguageName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "IsRightToLeft", + "jsonName": null, + "type": "System.Boolean", + "typeSimple": "boolean", + "isRequired": false + }, + { + "name": "CultureName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "Name", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "NativeName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "DateTimeFormat", + "jsonName": null, + "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.DateTimeFormatDto", + "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.DateTimeFormatDto", + "isRequired": false + } + ] + }, + "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.DateTimeFormatDto": { + "baseType": null, + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "CalendarAlgorithmType", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "DateTimeFormatLong", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "ShortDatePattern", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "FullDateTimePattern", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "DateSeparator", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "ShortTimePattern", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "LongTimePattern", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + } + ] + }, + "Volo.Abp.NameValue": { + "baseType": "Volo.Abp.NameValue", + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [] + }, + "Volo.Abp.NameValue": { + "baseType": null, + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": [ + "T" + ], + "properties": [ + { + "name": "Name", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "Value", + "jsonName": null, + "type": "T", + "typeSimple": "T", + "isRequired": false + } + ] + }, + "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationAuthConfigurationDto": { + "baseType": null, + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "Policies", + "jsonName": null, + "type": "{System.String:System.Boolean}", + "typeSimple": "{string:boolean}", + "isRequired": false + }, + { + "name": "GrantedPolicies", + "jsonName": null, + "type": "{System.String:System.Boolean}", + "typeSimple": "{string:boolean}", + "isRequired": false + } + ] + }, + "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationSettingConfigurationDto": { + "baseType": null, + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "Values", + "jsonName": null, + "type": "{System.String:System.String}", + "typeSimple": "{string:string}", + "isRequired": false + } + ] + }, + "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.CurrentUserDto": { + "baseType": null, + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "IsAuthenticated", + "jsonName": null, + "type": "System.Boolean", + "typeSimple": "boolean", + "isRequired": false + }, + { + "name": "Id", + "jsonName": null, + "type": "System.Guid?", + "typeSimple": "string?", + "isRequired": false + }, + { + "name": "TenantId", + "jsonName": null, + "type": "System.Guid?", + "typeSimple": "string?", + "isRequired": false + }, + { + "name": "ImpersonatorUserId", + "jsonName": null, + "type": "System.Guid?", + "typeSimple": "string?", + "isRequired": false + }, + { + "name": "ImpersonatorTenantId", + "jsonName": null, + "type": "System.Guid?", + "typeSimple": "string?", + "isRequired": false + }, + { + "name": "UserName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "Name", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "SurName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "Email", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "EmailVerified", + "jsonName": null, + "type": "System.Boolean", + "typeSimple": "boolean", + "isRequired": false + }, + { + "name": "PhoneNumber", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "PhoneNumberVerified", + "jsonName": null, + "type": "System.Boolean", + "typeSimple": "boolean", + "isRequired": false + }, + { + "name": "Roles", + "jsonName": null, + "type": "[System.String]", + "typeSimple": "[string]", + "isRequired": false + } + ] + }, + "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationFeatureConfigurationDto": { + "baseType": null, + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "Values", + "jsonName": null, + "type": "{System.String:System.String}", + "typeSimple": "{string:string}", + "isRequired": false + } + ] + }, + "Volo.Abp.AspNetCore.Mvc.MultiTenancy.MultiTenancyInfoDto": { + "baseType": null, + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "IsEnabled", + "jsonName": null, + "type": "System.Boolean", + "typeSimple": "boolean", + "isRequired": false + } + ] + }, + "Volo.Abp.AspNetCore.Mvc.MultiTenancy.CurrentTenantDto": { + "baseType": null, + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "Id", + "jsonName": null, + "type": "System.Guid?", + "typeSimple": "string?", + "isRequired": false + }, + { + "name": "Name", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "IsAvailable", + "jsonName": null, + "type": "System.Boolean", + "typeSimple": "boolean", + "isRequired": false + } + ] + }, + "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.TimingDto": { + "baseType": null, + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "TimeZone", + "jsonName": null, + "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.TimeZone", + "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.TimeZone", + "isRequired": false + } + ] + }, + "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.TimeZone": { + "baseType": null, + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "Iana", + "jsonName": null, + "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.IanaTimeZone", + "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.IanaTimeZone", + "isRequired": false + }, + { + "name": "Windows", + "jsonName": null, + "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.WindowsTimeZone", + "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.WindowsTimeZone", + "isRequired": false + } + ] + }, + "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.IanaTimeZone": { + "baseType": null, + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "TimeZoneName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + } + ] + }, + "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.WindowsTimeZone": { + "baseType": null, + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "TimeZoneId", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + } + ] + }, + "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ClockDto": { + "baseType": null, + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "Kind", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + } + ] + }, + "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ObjectExtensionsDto": { + "baseType": null, + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "Modules", + "jsonName": null, + "type": "{System.String:Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ModuleExtensionDto}", + "typeSimple": "{string:Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ModuleExtensionDto}", + "isRequired": false + }, + { + "name": "Enums", + "jsonName": null, + "type": "{System.String:Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionEnumDto}", + "typeSimple": "{string:Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionEnumDto}", + "isRequired": false + } + ] + }, + "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ModuleExtensionDto": { + "baseType": null, + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "Entities", + "jsonName": null, + "type": "{System.String:Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.EntityExtensionDto}", + "typeSimple": "{string:Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.EntityExtensionDto}", + "isRequired": false + }, + { + "name": "Configuration", + "jsonName": null, + "type": "{System.String:System.Object}", + "typeSimple": "{string:object}", + "isRequired": false + } + ] + }, + "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.EntityExtensionDto": { + "baseType": null, + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "Properties", + "jsonName": null, + "type": "{System.String:Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyDto}", + "typeSimple": "{string:Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyDto}", + "isRequired": false + }, + { + "name": "Configuration", + "jsonName": null, + "type": "{System.String:System.Object}", + "typeSimple": "{string:object}", + "isRequired": false + } + ] + }, + "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyDto": { + "baseType": null, + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "Type", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "TypeSimple", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "DisplayName", + "jsonName": null, + "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.LocalizableStringDto", + "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.LocalizableStringDto", + "isRequired": false + }, + { + "name": "Api", + "jsonName": null, + "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyApiDto", + "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyApiDto", + "isRequired": false + }, + { + "name": "Ui", + "jsonName": null, + "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyUiDto", + "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyUiDto", + "isRequired": false + }, + { + "name": "Attributes", + "jsonName": null, + "type": "[Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyAttributeDto]", + "typeSimple": "[Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyAttributeDto]", + "isRequired": false + }, + { + "name": "Configuration", + "jsonName": null, + "type": "{System.String:System.Object}", + "typeSimple": "{string:object}", + "isRequired": false + }, + { + "name": "DefaultValue", + "jsonName": null, + "type": "System.Object", + "typeSimple": "object", + "isRequired": false + } + ] + }, + "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.LocalizableStringDto": { + "baseType": null, + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "Name", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "Resource", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + } + ] + }, + "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyApiDto": { + "baseType": null, + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "OnGet", + "jsonName": null, + "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyApiGetDto", + "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyApiGetDto", + "isRequired": false + }, + { + "name": "OnCreate", + "jsonName": null, + "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyApiCreateDto", + "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyApiCreateDto", + "isRequired": false + }, + { + "name": "OnUpdate", + "jsonName": null, + "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyApiUpdateDto", + "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyApiUpdateDto", + "isRequired": false + } + ] + }, + "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyApiGetDto": { + "baseType": null, + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "IsAvailable", + "jsonName": null, + "type": "System.Boolean", + "typeSimple": "boolean", + "isRequired": false + } + ] + }, + "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyApiCreateDto": { + "baseType": null, + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "IsAvailable", + "jsonName": null, + "type": "System.Boolean", + "typeSimple": "boolean", + "isRequired": false + } + ] + }, + "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyApiUpdateDto": { + "baseType": null, + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "IsAvailable", + "jsonName": null, + "type": "System.Boolean", + "typeSimple": "boolean", + "isRequired": false + } + ] + }, + "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyUiDto": { + "baseType": null, + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "OnTable", + "jsonName": null, + "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyUiTableDto", + "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyUiTableDto", + "isRequired": false + }, + { + "name": "OnCreateForm", + "jsonName": null, + "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyUiFormDto", + "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyUiFormDto", + "isRequired": false + }, + { + "name": "OnEditForm", + "jsonName": null, + "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyUiFormDto", + "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyUiFormDto", + "isRequired": false + }, + { + "name": "Lookup", + "jsonName": null, + "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyUiLookupDto", + "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyUiLookupDto", + "isRequired": false + } + ] + }, + "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyUiTableDto": { + "baseType": null, + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "IsVisible", + "jsonName": null, + "type": "System.Boolean", + "typeSimple": "boolean", + "isRequired": false + } + ] + }, + "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyUiFormDto": { + "baseType": null, + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "IsVisible", + "jsonName": null, + "type": "System.Boolean", + "typeSimple": "boolean", + "isRequired": false + } + ] + }, + "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyUiLookupDto": { + "baseType": null, + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "Url", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "ResultListPropertyName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "DisplayPropertyName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "ValuePropertyName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "FilterParamName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + } + ] + }, + "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyAttributeDto": { + "baseType": null, + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "TypeSimple", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "Config", + "jsonName": null, + "type": "{System.String:System.Object}", + "typeSimple": "{string:object}", + "isRequired": false + } + ] + }, + "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionEnumDto": { + "baseType": null, + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "Fields", + "jsonName": null, + "type": "[Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionEnumFieldDto]", + "typeSimple": "[Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionEnumFieldDto]", + "isRequired": false + }, + { + "name": "LocalizationResource", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + } + ] + }, + "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionEnumFieldDto": { + "baseType": null, + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "Name", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "Value", + "jsonName": null, + "type": "System.Object", + "typeSimple": "object", + "isRequired": false + } + ] + }, + "Volo.Abp.Http.Modeling.ApplicationApiDescriptionModelRequestDto": { + "baseType": null, + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "IncludeTypes", + "jsonName": null, + "type": "System.Boolean", + "typeSimple": "boolean", + "isRequired": false + } + ] + }, + "Volo.Abp.Http.Modeling.ApplicationApiDescriptionModel": { + "baseType": null, + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "Modules", + "jsonName": null, + "type": "{System.String:Volo.Abp.Http.Modeling.ModuleApiDescriptionModel}", + "typeSimple": "{string:Volo.Abp.Http.Modeling.ModuleApiDescriptionModel}", + "isRequired": false + }, + { + "name": "Types", + "jsonName": null, + "type": "{System.String:Volo.Abp.Http.Modeling.TypeApiDescriptionModel}", + "typeSimple": "{string:Volo.Abp.Http.Modeling.TypeApiDescriptionModel}", + "isRequired": false + } + ] + }, + "Volo.Abp.Http.Modeling.ModuleApiDescriptionModel": { + "baseType": null, + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "RootPath", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "RemoteServiceName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "Controllers", + "jsonName": null, + "type": "{System.String:Volo.Abp.Http.Modeling.ControllerApiDescriptionModel}", + "typeSimple": "{string:Volo.Abp.Http.Modeling.ControllerApiDescriptionModel}", + "isRequired": false + } + ] + }, + "Volo.Abp.Http.Modeling.ControllerApiDescriptionModel": { + "baseType": null, + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "ControllerName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "ControllerGroupName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "Type", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "Interfaces", + "jsonName": null, + "type": "[Volo.Abp.Http.Modeling.ControllerInterfaceApiDescriptionModel]", + "typeSimple": "[Volo.Abp.Http.Modeling.ControllerInterfaceApiDescriptionModel]", + "isRequired": false + }, + { + "name": "Actions", + "jsonName": null, + "type": "{System.String:Volo.Abp.Http.Modeling.ActionApiDescriptionModel}", + "typeSimple": "{string:Volo.Abp.Http.Modeling.ActionApiDescriptionModel}", + "isRequired": false + } + ] + }, + "Volo.Abp.Http.Modeling.ControllerInterfaceApiDescriptionModel": { + "baseType": null, + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "Type", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + } + ] + }, + "Volo.Abp.Http.Modeling.ActionApiDescriptionModel": { + "baseType": null, + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "UniqueName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "Name", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "HttpMethod", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "Url", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "SupportedVersions", + "jsonName": null, + "type": "[System.String]", + "typeSimple": "[string]", + "isRequired": false + }, + { + "name": "ParametersOnMethod", + "jsonName": null, + "type": "[Volo.Abp.Http.Modeling.MethodParameterApiDescriptionModel]", + "typeSimple": "[Volo.Abp.Http.Modeling.MethodParameterApiDescriptionModel]", + "isRequired": false + }, + { + "name": "Parameters", + "jsonName": null, + "type": "[Volo.Abp.Http.Modeling.ParameterApiDescriptionModel]", + "typeSimple": "[Volo.Abp.Http.Modeling.ParameterApiDescriptionModel]", + "isRequired": false + }, + { + "name": "ReturnValue", + "jsonName": null, + "type": "Volo.Abp.Http.Modeling.ReturnValueApiDescriptionModel", + "typeSimple": "Volo.Abp.Http.Modeling.ReturnValueApiDescriptionModel", + "isRequired": false + }, + { + "name": "AllowAnonymous", + "jsonName": null, + "type": "System.Boolean?", + "typeSimple": "boolean?", + "isRequired": false + }, + { + "name": "ImplementFrom", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + } + ] + }, + "Volo.Abp.Http.Modeling.MethodParameterApiDescriptionModel": { + "baseType": null, + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "Name", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "TypeAsString", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "Type", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "TypeSimple", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "IsOptional", + "jsonName": null, + "type": "System.Boolean", + "typeSimple": "boolean", + "isRequired": false + }, + { + "name": "DefaultValue", + "jsonName": null, + "type": "System.Object", + "typeSimple": "object", + "isRequired": false + } + ] + }, + "Volo.Abp.Http.Modeling.ParameterApiDescriptionModel": { + "baseType": null, + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "NameOnMethod", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "Name", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "JsonName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "Type", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "TypeSimple", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "IsOptional", + "jsonName": null, + "type": "System.Boolean", + "typeSimple": "boolean", + "isRequired": false + }, + { + "name": "DefaultValue", + "jsonName": null, + "type": "System.Object", + "typeSimple": "object", + "isRequired": false + }, + { + "name": "ConstraintTypes", + "jsonName": null, + "type": "[System.String]", + "typeSimple": "[string]", + "isRequired": false + }, + { + "name": "BindingSourceId", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "DescriptorName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + } + ] + }, + "Volo.Abp.Http.Modeling.ReturnValueApiDescriptionModel": { + "baseType": null, + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "Type", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "TypeSimple", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + } + ] + }, + "Volo.Abp.Http.Modeling.TypeApiDescriptionModel": { + "baseType": null, + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "BaseType", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "IsEnum", + "jsonName": null, + "type": "System.Boolean", + "typeSimple": "boolean", + "isRequired": false + }, + { + "name": "EnumNames", + "jsonName": null, + "type": "[System.String]", + "typeSimple": "[string]", + "isRequired": false + }, + { + "name": "EnumValues", + "jsonName": null, + "type": "[System.Object]", + "typeSimple": "[object]", + "isRequired": false + }, + { + "name": "GenericArguments", + "jsonName": null, + "type": "[System.String]", + "typeSimple": "[string]", + "isRequired": false + }, + { + "name": "Properties", + "jsonName": null, + "type": "[Volo.Abp.Http.Modeling.PropertyApiDescriptionModel]", + "typeSimple": "[Volo.Abp.Http.Modeling.PropertyApiDescriptionModel]", + "isRequired": false + } + ] + }, + "Volo.Abp.Http.Modeling.PropertyApiDescriptionModel": { + "baseType": null, + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "Name", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "JsonName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "Type", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "TypeSimple", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "IsRequired", + "jsonName": null, + "type": "System.Boolean", + "typeSimple": "boolean", + "isRequired": false + } + ] + } + } +} \ No newline at end of file diff --git a/npm/ng-packs/packages/feature-management/proxy/src/lib/proxy/index.ts b/npm/ng-packs/packages/feature-management/proxy/src/lib/proxy/index.ts new file mode 100644 index 0000000000..e28d9b723a --- /dev/null +++ b/npm/ng-packs/packages/feature-management/proxy/src/lib/proxy/index.ts @@ -0,0 +1,3 @@ +import * as FeatureManagement from './feature-management'; +import * as Validation from './validation'; +export { FeatureManagement, Validation }; diff --git a/npm/ng-packs/packages/feature-management/proxy/src/lib/proxy/validation/index.ts b/npm/ng-packs/packages/feature-management/proxy/src/lib/proxy/validation/index.ts new file mode 100644 index 0000000000..fb73bcebf4 --- /dev/null +++ b/npm/ng-packs/packages/feature-management/proxy/src/lib/proxy/validation/index.ts @@ -0,0 +1,2 @@ +import * as StringValues from './string-values'; +export { StringValues }; diff --git a/npm/ng-packs/packages/feature-management/src/lib/proxy/validation/string-values/index.ts b/npm/ng-packs/packages/feature-management/proxy/src/lib/proxy/validation/string-values/index.ts similarity index 100% rename from npm/ng-packs/packages/feature-management/src/lib/proxy/validation/string-values/index.ts rename to npm/ng-packs/packages/feature-management/proxy/src/lib/proxy/validation/string-values/index.ts diff --git a/npm/ng-packs/packages/feature-management/src/lib/proxy/validation/string-values/models.ts b/npm/ng-packs/packages/feature-management/proxy/src/lib/proxy/validation/string-values/models.ts similarity index 72% rename from npm/ng-packs/packages/feature-management/src/lib/proxy/validation/string-values/models.ts rename to npm/ng-packs/packages/feature-management/proxy/src/lib/proxy/validation/string-values/models.ts index 215effbe2e..7b00edc604 100644 --- a/npm/ng-packs/packages/feature-management/src/lib/proxy/validation/string-values/models.ts +++ b/npm/ng-packs/packages/feature-management/proxy/src/lib/proxy/validation/string-values/models.ts @@ -1,14 +1,13 @@ -/* eslint-disable @typescript-eslint/ban-types */ export interface IStringValueType { - name: string; + name?: string; item: object; properties: Record; validator: IValueValidator; } export interface IValueValidator { - name: string; + name?: string; item: object; properties: Record; } diff --git a/npm/ng-packs/packages/feature-management/proxy/src/public-api.ts b/npm/ng-packs/packages/feature-management/proxy/src/public-api.ts new file mode 100644 index 0000000000..11aece60c4 --- /dev/null +++ b/npm/ng-packs/packages/feature-management/proxy/src/public-api.ts @@ -0,0 +1 @@ +export * from './lib/index'; diff --git a/npm/ng-packs/packages/feature-management/src/lib/components/feature-management/feature-management.component.html b/npm/ng-packs/packages/feature-management/src/lib/components/feature-management/feature-management.component.html index 126fb9638c..a9c8032e4d 100644 --- a/npm/ng-packs/packages/feature-management/src/lib/components/feature-management/feature-management.component.html +++ b/npm/ng-packs/packages/feature-management/src/lib/components/feature-management/feature-management.component.html @@ -1,4 +1,4 @@ - +

                                                          {{ 'AbpFeatureManagement::Features' | abpLocalization }}

                                                          diff --git a/npm/ng-packs/packages/feature-management/src/lib/components/feature-management/feature-management.component.ts b/npm/ng-packs/packages/feature-management/src/lib/components/feature-management/feature-management.component.ts index d4f7fc962e..eb339b0b94 100644 --- a/npm/ng-packs/packages/feature-management/src/lib/components/feature-management/feature-management.component.ts +++ b/npm/ng-packs/packages/feature-management/src/lib/components/feature-management/feature-management.component.ts @@ -1,14 +1,14 @@ import { ConfigStateService, TrackByService } from '@abp/ng.core'; -import { LocaleDirection } from '@abp/ng.theme.shared'; -import { Component, EventEmitter, Input, Output } from '@angular/core'; -import { finalize } from 'rxjs/operators'; -import { FeatureManagement } from '../../models/feature-management'; -import { FeaturesService } from '../../proxy/feature-management/features.service'; import { FeatureDto, FeatureGroupDto, + FeaturesService, UpdateFeatureDto, -} from '../../proxy/feature-management/models'; +} from '@abp/ng.feature-management/proxy'; +import { LocaleDirection } from '@abp/ng.theme.shared'; +import { Component, EventEmitter, Input, Output } from '@angular/core'; +import { finalize } from 'rxjs/operators'; +import { FeatureManagement } from '../../models/feature-management'; enum ValueTypes { ToggleStringValueType = 'ToggleStringValueType', diff --git a/npm/ng-packs/packages/feature-management/src/lib/proxy/feature-management/features.service.ts b/npm/ng-packs/packages/feature-management/src/lib/proxy/feature-management/features.service.ts deleted file mode 100644 index cdc12ad36d..0000000000 --- a/npm/ng-packs/packages/feature-management/src/lib/proxy/feature-management/features.service.ts +++ /dev/null @@ -1,33 +0,0 @@ -import type { GetFeatureListResultDto, UpdateFeaturesDto } from './models'; -import { RestService } from '@abp/ng.core'; -import { Injectable } from '@angular/core'; - -@Injectable({ - providedIn: 'root', -}) -export class FeaturesService { - apiName = 'AbpFeatureManagement'; - - get = (providerName: string, providerKey: string) => - this.restService.request( - { - method: 'GET', - url: '/api/feature-management/features', - params: { providerName, providerKey }, - }, - { apiName: this.apiName }, - ); - - update = (providerName: string, providerKey: string, input: UpdateFeaturesDto) => - this.restService.request( - { - method: 'PUT', - url: '/api/feature-management/features', - params: { providerName, providerKey }, - body: input, - }, - { apiName: this.apiName }, - ); - - constructor(private restService: RestService) {} -} diff --git a/npm/ng-packs/packages/feature-management/src/lib/proxy/generate-proxy.json b/npm/ng-packs/packages/feature-management/src/lib/proxy/generate-proxy.json deleted file mode 100644 index e022e5ea1f..0000000000 --- a/npm/ng-packs/packages/feature-management/src/lib/proxy/generate-proxy.json +++ /dev/null @@ -1,12547 +0,0 @@ -{ - "generated": [ - "featureManagement" - ], - "modules": { - "accountAdmin": { - "rootPath": "accountAdmin", - "remoteServiceName": "AbpAccountAdmin", - "controllers": { - "Volo.Abp.Account.AccountSettingsController": { - "controllerName": "AccountSettings", - "type": "Volo.Abp.Account.AccountSettingsController", - "interfaces": [ - { - "type": "Volo.Abp.Account.IAccountSettingsAppService" - } - ], - "actions": { - "GetAsync": { - "uniqueName": "GetAsync", - "name": "GetAsync", - "httpMethod": "GET", - "url": "api/account-admin/settings", - "supportedVersions": [], - "parametersOnMethod": [], - "parameters": [], - "returnValue": { - "type": "Volo.Abp.Account.AccountSettingsDto", - "typeSimple": "Volo.Abp.Account.AccountSettingsDto" - } - }, - "UpdateAsyncByInput": { - "uniqueName": "UpdateAsyncByInput", - "name": "UpdateAsync", - "httpMethod": "PUT", - "url": "api/account-admin/settings", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "input", - "typeAsString": "Volo.Abp.Account.AccountSettingsDto, Volo.Abp.Account.Pro.Admin.Application.Contracts", - "type": "Volo.Abp.Account.AccountSettingsDto", - "typeSimple": "Volo.Abp.Account.AccountSettingsDto", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "input", - "name": "input", - "type": "Volo.Abp.Account.AccountSettingsDto", - "typeSimple": "Volo.Abp.Account.AccountSettingsDto", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Body", - "descriptorName": "" - } - ], - "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" - } - }, - "GetLdapAsync": { - "uniqueName": "GetLdapAsync", - "name": "GetLdapAsync", - "httpMethod": "GET", - "url": "api/account-admin/settings/ldap", - "supportedVersions": [], - "parametersOnMethod": [], - "parameters": [], - "returnValue": { - "type": "Volo.Abp.Account.AccountLdapSettingsDto", - "typeSimple": "Volo.Abp.Account.AccountLdapSettingsDto" - } - }, - "UpdateLdapAsyncByInput": { - "uniqueName": "UpdateLdapAsyncByInput", - "name": "UpdateLdapAsync", - "httpMethod": "PUT", - "url": "api/account-admin/settings/ldap", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "input", - "typeAsString": "Volo.Abp.Account.AccountLdapSettingsDto, Volo.Abp.Account.Pro.Admin.Application.Contracts", - "type": "Volo.Abp.Account.AccountLdapSettingsDto", - "typeSimple": "Volo.Abp.Account.AccountLdapSettingsDto", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "input", - "name": "input", - "type": "Volo.Abp.Account.AccountLdapSettingsDto", - "typeSimple": "Volo.Abp.Account.AccountLdapSettingsDto", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Body", - "descriptorName": "" - } - ], - "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" - } - }, - "GetTwoFactorAsync": { - "uniqueName": "GetTwoFactorAsync", - "name": "GetTwoFactorAsync", - "httpMethod": "GET", - "url": "api/account-admin/settings/two-factor", - "supportedVersions": [], - "parametersOnMethod": [], - "parameters": [], - "returnValue": { - "type": "Volo.Abp.Account.AccountTwoFactorSettingsDto", - "typeSimple": "Volo.Abp.Account.AccountTwoFactorSettingsDto" - } - }, - "UpdateTwoFactorAsyncByInput": { - "uniqueName": "UpdateTwoFactorAsyncByInput", - "name": "UpdateTwoFactorAsync", - "httpMethod": "PUT", - "url": "api/account-admin/settings/two-factor", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "input", - "typeAsString": "Volo.Abp.Account.AccountTwoFactorSettingsDto, Volo.Abp.Account.Pro.Admin.Application.Contracts", - "type": "Volo.Abp.Account.AccountTwoFactorSettingsDto", - "typeSimple": "Volo.Abp.Account.AccountTwoFactorSettingsDto", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "input", - "name": "input", - "type": "Volo.Abp.Account.AccountTwoFactorSettingsDto", - "typeSimple": "Volo.Abp.Account.AccountTwoFactorSettingsDto", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Body", - "descriptorName": "" - } - ], - "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" - } - } - } - } - } - }, - "leptonThemeManagement": { - "rootPath": "leptonThemeManagement", - "remoteServiceName": "LeptonThemeManagement", - "controllers": { - "Volo.Abp.LeptonTheme.LeptonThemeSettingsController": { - "controllerName": "LeptonThemeSettings", - "type": "Volo.Abp.LeptonTheme.LeptonThemeSettingsController", - "interfaces": [ - { - "type": "Volo.Abp.LeptonTheme.Management.ILeptonThemeSettingsAppService" - } - ], - "actions": { - "GetAsync": { - "uniqueName": "GetAsync", - "name": "GetAsync", - "httpMethod": "GET", - "url": "api/lepton-theme-management/settings", - "supportedVersions": [], - "parametersOnMethod": [], - "parameters": [], - "returnValue": { - "type": "Volo.Abp.LeptonTheme.Management.LeptonThemeSettingsDto", - "typeSimple": "Volo.Abp.LeptonTheme.Management.LeptonThemeSettingsDto" - } - }, - "UpdateAsyncByInput": { - "uniqueName": "UpdateAsyncByInput", - "name": "UpdateAsync", - "httpMethod": "PUT", - "url": "api/lepton-theme-management/settings", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "input", - "typeAsString": "Volo.Abp.LeptonTheme.Management.UpdateLeptonThemeSettingsDto, Volo.Abp.LeptonTheme.Management.Application.Contracts", - "type": "Volo.Abp.LeptonTheme.Management.UpdateLeptonThemeSettingsDto", - "typeSimple": "Volo.Abp.LeptonTheme.Management.UpdateLeptonThemeSettingsDto", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "input", - "name": "input", - "type": "Volo.Abp.LeptonTheme.Management.UpdateLeptonThemeSettingsDto", - "typeSimple": "Volo.Abp.LeptonTheme.Management.UpdateLeptonThemeSettingsDto", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Body", - "descriptorName": "" - } - ], - "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" - } - } - } - } - } - }, - "identityServer": { - "rootPath": "identityServer", - "remoteServiceName": "AbpIdentityServer", - "controllers": { - "Volo.Abp.IdentityServer.ApiResourcesController": { - "controllerName": "ApiResources", - "type": "Volo.Abp.IdentityServer.ApiResourcesController", - "interfaces": [ - { - "type": "Volo.Abp.IdentityServer.ApiResource.IApiResourceAppService" - } - ], - "actions": { - "GetListAsyncByInput": { - "uniqueName": "GetListAsyncByInput", - "name": "GetListAsync", - "httpMethod": "GET", - "url": "api/identity-server/api-resources", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "input", - "typeAsString": "Volo.Abp.IdentityServer.ApiResource.Dtos.GetApiResourceListInput, Volo.Abp.IdentityServer.Application.Contracts", - "type": "Volo.Abp.IdentityServer.ApiResource.Dtos.GetApiResourceListInput", - "typeSimple": "Volo.Abp.IdentityServer.ApiResource.Dtos.GetApiResourceListInput", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "input", - "name": "Filter", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "Sorting", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "SkipCount", - "type": "System.Int32", - "typeSimple": "number", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "MaxResultCount", - "type": "System.Int32", - "typeSimple": "number", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - } - ], - "returnValue": { - "type": "Volo.Abp.Application.Dtos.PagedResultDto", - "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" - } - }, - "GetAllListAsync": { - "uniqueName": "GetAllListAsync", - "name": "GetAllListAsync", - "httpMethod": "GET", - "url": "api/identity-server/api-resources/all", - "supportedVersions": [], - "parametersOnMethod": [], - "parameters": [], - "returnValue": { - "type": "System.Collections.Generic.List", - "typeSimple": "[Volo.Abp.IdentityServer.ApiResource.Dtos.ApiResourceWithDetailsDto]" - } - }, - "GetAsyncById": { - "uniqueName": "GetAsyncById", - "name": "GetAsync", - "httpMethod": "GET", - "url": "api/identity-server/api-resources/{id}", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "id", - "name": "id", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - } - ], - "returnValue": { - "type": "Volo.Abp.IdentityServer.ApiResource.Dtos.ApiResourceWithDetailsDto", - "typeSimple": "Volo.Abp.IdentityServer.ApiResource.Dtos.ApiResourceWithDetailsDto" - } - }, - "CreateAsyncByInput": { - "uniqueName": "CreateAsyncByInput", - "name": "CreateAsync", - "httpMethod": "POST", - "url": "api/identity-server/api-resources", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "input", - "typeAsString": "Volo.Abp.IdentityServer.ApiResource.Dtos.CreateApiResourceDto, Volo.Abp.IdentityServer.Application.Contracts", - "type": "Volo.Abp.IdentityServer.ApiResource.Dtos.CreateApiResourceDto", - "typeSimple": "Volo.Abp.IdentityServer.ApiResource.Dtos.CreateApiResourceDto", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "input", - "name": "input", - "type": "Volo.Abp.IdentityServer.ApiResource.Dtos.CreateApiResourceDto", - "typeSimple": "Volo.Abp.IdentityServer.ApiResource.Dtos.CreateApiResourceDto", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Body", - "descriptorName": "" - } - ], - "returnValue": { - "type": "Volo.Abp.IdentityServer.ApiResource.Dtos.ApiResourceWithDetailsDto", - "typeSimple": "Volo.Abp.IdentityServer.ApiResource.Dtos.ApiResourceWithDetailsDto" - } - }, - "UpdateAsyncByIdAndInput": { - "uniqueName": "UpdateAsyncByIdAndInput", - "name": "UpdateAsync", - "httpMethod": "PUT", - "url": "api/identity-server/api-resources/{id}", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - }, - { - "name": "input", - "typeAsString": "Volo.Abp.IdentityServer.ApiResource.Dtos.UpdateApiResourceDto, Volo.Abp.IdentityServer.Application.Contracts", - "type": "Volo.Abp.IdentityServer.ApiResource.Dtos.UpdateApiResourceDto", - "typeSimple": "Volo.Abp.IdentityServer.ApiResource.Dtos.UpdateApiResourceDto", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "id", - "name": "id", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - }, - { - "nameOnMethod": "input", - "name": "input", - "type": "Volo.Abp.IdentityServer.ApiResource.Dtos.UpdateApiResourceDto", - "typeSimple": "Volo.Abp.IdentityServer.ApiResource.Dtos.UpdateApiResourceDto", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Body", - "descriptorName": "" - } - ], - "returnValue": { - "type": "Volo.Abp.IdentityServer.ApiResource.Dtos.ApiResourceWithDetailsDto", - "typeSimple": "Volo.Abp.IdentityServer.ApiResource.Dtos.ApiResourceWithDetailsDto" - } - }, - "DeleteAsyncById": { - "uniqueName": "DeleteAsyncById", - "name": "DeleteAsync", - "httpMethod": "DELETE", - "url": "api/identity-server/api-resources", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "id", - "name": "id", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "" - } - ], - "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" - } - } - } - }, - "Volo.Abp.IdentityServer.ClientsController": { - "controllerName": "Clients", - "type": "Volo.Abp.IdentityServer.ClientsController", - "interfaces": [ - { - "type": "Volo.Abp.IdentityServer.Client.IClientAppService" - } - ], - "actions": { - "GetListAsyncByInput": { - "uniqueName": "GetListAsyncByInput", - "name": "GetListAsync", - "httpMethod": "GET", - "url": "api/identity-server/clients", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "input", - "typeAsString": "Volo.Abp.IdentityServer.Client.Dtos.GetClientListInput, Volo.Abp.IdentityServer.Application.Contracts", - "type": "Volo.Abp.IdentityServer.Client.Dtos.GetClientListInput", - "typeSimple": "Volo.Abp.IdentityServer.Client.Dtos.GetClientListInput", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "input", - "name": "Filter", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "Sorting", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "SkipCount", - "type": "System.Int32", - "typeSimple": "number", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "MaxResultCount", - "type": "System.Int32", - "typeSimple": "number", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - } - ], - "returnValue": { - "type": "Volo.Abp.Application.Dtos.PagedResultDto", - "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" - } - }, - "GetAsyncById": { - "uniqueName": "GetAsyncById", - "name": "GetAsync", - "httpMethod": "GET", - "url": "api/identity-server/clients/{id}", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "id", - "name": "id", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - } - ], - "returnValue": { - "type": "Volo.Abp.IdentityServer.Client.Dtos.ClientWithDetailsDto", - "typeSimple": "Volo.Abp.IdentityServer.Client.Dtos.ClientWithDetailsDto" - } - }, - "CreateAsyncByInput": { - "uniqueName": "CreateAsyncByInput", - "name": "CreateAsync", - "httpMethod": "POST", - "url": "api/identity-server/clients", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "input", - "typeAsString": "Volo.Abp.IdentityServer.Client.Dtos.CreateClientDto, Volo.Abp.IdentityServer.Application.Contracts", - "type": "Volo.Abp.IdentityServer.Client.Dtos.CreateClientDto", - "typeSimple": "Volo.Abp.IdentityServer.Client.Dtos.CreateClientDto", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "input", - "name": "input", - "type": "Volo.Abp.IdentityServer.Client.Dtos.CreateClientDto", - "typeSimple": "Volo.Abp.IdentityServer.Client.Dtos.CreateClientDto", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Body", - "descriptorName": "" - } - ], - "returnValue": { - "type": "Volo.Abp.IdentityServer.Client.Dtos.ClientWithDetailsDto", - "typeSimple": "Volo.Abp.IdentityServer.Client.Dtos.ClientWithDetailsDto" - } - }, - "UpdateAsyncByIdAndInput": { - "uniqueName": "UpdateAsyncByIdAndInput", - "name": "UpdateAsync", - "httpMethod": "PUT", - "url": "api/identity-server/clients/{id}", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - }, - { - "name": "input", - "typeAsString": "Volo.Abp.IdentityServer.Client.Dtos.UpdateClientDto, Volo.Abp.IdentityServer.Application.Contracts", - "type": "Volo.Abp.IdentityServer.Client.Dtos.UpdateClientDto", - "typeSimple": "Volo.Abp.IdentityServer.Client.Dtos.UpdateClientDto", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "id", - "name": "id", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - }, - { - "nameOnMethod": "input", - "name": "input", - "type": "Volo.Abp.IdentityServer.Client.Dtos.UpdateClientDto", - "typeSimple": "Volo.Abp.IdentityServer.Client.Dtos.UpdateClientDto", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Body", - "descriptorName": "" - } - ], - "returnValue": { - "type": "Volo.Abp.IdentityServer.Client.Dtos.ClientWithDetailsDto", - "typeSimple": "Volo.Abp.IdentityServer.Client.Dtos.ClientWithDetailsDto" - } - }, - "DeleteAsyncById": { - "uniqueName": "DeleteAsyncById", - "name": "DeleteAsync", - "httpMethod": "DELETE", - "url": "api/identity-server/clients", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "id", - "name": "id", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "" - } - ], - "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" - } - } - } - }, - "Volo.Abp.IdentityServer.IdentityResourcesController": { - "controllerName": "IdentityResources", - "type": "Volo.Abp.IdentityServer.IdentityResourcesController", - "interfaces": [ - { - "type": "Volo.Abp.IdentityServer.IdentityResource.IIdentityResourceAppService" - } - ], - "actions": { - "GetListAsyncByInput": { - "uniqueName": "GetListAsyncByInput", - "name": "GetListAsync", - "httpMethod": "GET", - "url": "api/identity-server/identity-resources", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "input", - "typeAsString": "Volo.Abp.IdentityServer.IdentityResource.Dtos.GetIdentityResourceListInput, Volo.Abp.IdentityServer.Application.Contracts", - "type": "Volo.Abp.IdentityServer.IdentityResource.Dtos.GetIdentityResourceListInput", - "typeSimple": "Volo.Abp.IdentityServer.IdentityResource.Dtos.GetIdentityResourceListInput", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "input", - "name": "Filter", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "Sorting", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "SkipCount", - "type": "System.Int32", - "typeSimple": "number", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "MaxResultCount", - "type": "System.Int32", - "typeSimple": "number", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - } - ], - "returnValue": { - "type": "Volo.Abp.Application.Dtos.PagedResultDto", - "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" - } - }, - "GetAllListAsync": { - "uniqueName": "GetAllListAsync", - "name": "GetAllListAsync", - "httpMethod": "GET", - "url": "api/identity-server/identity-resources/all", - "supportedVersions": [], - "parametersOnMethod": [], - "parameters": [], - "returnValue": { - "type": "System.Collections.Generic.List", - "typeSimple": "[Volo.Abp.IdentityServer.IdentityResource.Dtos.IdentityResourceWithDetailsDto]" - } - }, - "GetAsyncById": { - "uniqueName": "GetAsyncById", - "name": "GetAsync", - "httpMethod": "GET", - "url": "api/identity-server/identity-resources/{id}", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "id", - "name": "id", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - } - ], - "returnValue": { - "type": "Volo.Abp.IdentityServer.IdentityResource.Dtos.IdentityResourceWithDetailsDto", - "typeSimple": "Volo.Abp.IdentityServer.IdentityResource.Dtos.IdentityResourceWithDetailsDto" - } - }, - "CreateAsyncByInput": { - "uniqueName": "CreateAsyncByInput", - "name": "CreateAsync", - "httpMethod": "POST", - "url": "api/identity-server/identity-resources", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "input", - "typeAsString": "Volo.Abp.IdentityServer.IdentityResource.Dtos.CreateIdentityResourceDto, Volo.Abp.IdentityServer.Application.Contracts", - "type": "Volo.Abp.IdentityServer.IdentityResource.Dtos.CreateIdentityResourceDto", - "typeSimple": "Volo.Abp.IdentityServer.IdentityResource.Dtos.CreateIdentityResourceDto", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "input", - "name": "input", - "type": "Volo.Abp.IdentityServer.IdentityResource.Dtos.CreateIdentityResourceDto", - "typeSimple": "Volo.Abp.IdentityServer.IdentityResource.Dtos.CreateIdentityResourceDto", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Body", - "descriptorName": "" - } - ], - "returnValue": { - "type": "Volo.Abp.IdentityServer.IdentityResource.Dtos.IdentityResourceWithDetailsDto", - "typeSimple": "Volo.Abp.IdentityServer.IdentityResource.Dtos.IdentityResourceWithDetailsDto" - } - }, - "UpdateAsyncByIdAndInput": { - "uniqueName": "UpdateAsyncByIdAndInput", - "name": "UpdateAsync", - "httpMethod": "PUT", - "url": "api/identity-server/identity-resources/{id}", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - }, - { - "name": "input", - "typeAsString": "Volo.Abp.IdentityServer.IdentityResource.Dtos.UpdateIdentityResourceDto, Volo.Abp.IdentityServer.Application.Contracts", - "type": "Volo.Abp.IdentityServer.IdentityResource.Dtos.UpdateIdentityResourceDto", - "typeSimple": "Volo.Abp.IdentityServer.IdentityResource.Dtos.UpdateIdentityResourceDto", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "id", - "name": "id", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - }, - { - "nameOnMethod": "input", - "name": "input", - "type": "Volo.Abp.IdentityServer.IdentityResource.Dtos.UpdateIdentityResourceDto", - "typeSimple": "Volo.Abp.IdentityServer.IdentityResource.Dtos.UpdateIdentityResourceDto", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Body", - "descriptorName": "" - } - ], - "returnValue": { - "type": "Volo.Abp.IdentityServer.IdentityResource.Dtos.IdentityResourceWithDetailsDto", - "typeSimple": "Volo.Abp.IdentityServer.IdentityResource.Dtos.IdentityResourceWithDetailsDto" - } - }, - "DeleteAsyncById": { - "uniqueName": "DeleteAsyncById", - "name": "DeleteAsync", - "httpMethod": "DELETE", - "url": "api/identity-server/identity-resources", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "id", - "name": "id", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "" - } - ], - "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" - } - }, - "CreateStandardResourcesAsync": { - "uniqueName": "CreateStandardResourcesAsync", - "name": "CreateStandardResourcesAsync", - "httpMethod": "POST", - "url": "api/identity-server/identity-resources/create-standard-resources", - "supportedVersions": [], - "parametersOnMethod": [], - "parameters": [], - "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" - } - } - } - }, - "Volo.Abp.IdentityServer.IdentityServerClaimTypesController": { - "controllerName": "IdentityServerClaimTypes", - "type": "Volo.Abp.IdentityServer.IdentityServerClaimTypesController", - "interfaces": [ - { - "type": "Volo.Abp.IdentityServer.ClaimType.IIdentityServerClaimTypeAppService" - } - ], - "actions": { - "GetListAsync": { - "uniqueName": "GetListAsync", - "name": "GetListAsync", - "httpMethod": "GET", - "url": "api/identity-server/claim-types", - "supportedVersions": [], - "parametersOnMethod": [], - "parameters": [], - "returnValue": { - "type": "System.Collections.Generic.List", - "typeSimple": "[Volo.Abp.IdentityServer.ClaimType.Dtos.IdentityClaimTypeDto]" - } - } - } - } - } - }, - "featureManagement": { - "rootPath": "featureManagement", - "remoteServiceName": "AbpFeatureManagement", - "controllers": { - "Volo.Abp.FeatureManagement.FeaturesController": { - "controllerName": "Features", - "type": "Volo.Abp.FeatureManagement.FeaturesController", - "interfaces": [ - { - "type": "Volo.Abp.FeatureManagement.IFeatureAppService" - } - ], - "actions": { - "GetAsyncByProviderNameAndProviderKey": { - "uniqueName": "GetAsyncByProviderNameAndProviderKey", - "name": "GetAsync", - "httpMethod": "GET", - "url": "api/feature-management/features", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "providerName", - "typeAsString": "System.String, System.Private.CoreLib", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - }, - { - "name": "providerKey", - "typeAsString": "System.String, System.Private.CoreLib", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "providerName", - "name": "providerName", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "" - }, - { - "nameOnMethod": "providerKey", - "name": "providerKey", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "" - } - ], - "returnValue": { - "type": "Volo.Abp.FeatureManagement.GetFeatureListResultDto", - "typeSimple": "Volo.Abp.FeatureManagement.GetFeatureListResultDto" - } - }, - "UpdateAsyncByProviderNameAndProviderKeyAndInput": { - "uniqueName": "UpdateAsyncByProviderNameAndProviderKeyAndInput", - "name": "UpdateAsync", - "httpMethod": "PUT", - "url": "api/feature-management/features", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "providerName", - "typeAsString": "System.String, System.Private.CoreLib", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - }, - { - "name": "providerKey", - "typeAsString": "System.String, System.Private.CoreLib", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - }, - { - "name": "input", - "typeAsString": "Volo.Abp.FeatureManagement.UpdateFeaturesDto, Volo.Abp.FeatureManagement.Application.Contracts", - "type": "Volo.Abp.FeatureManagement.UpdateFeaturesDto", - "typeSimple": "Volo.Abp.FeatureManagement.UpdateFeaturesDto", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "providerName", - "name": "providerName", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "" - }, - { - "nameOnMethod": "providerKey", - "name": "providerKey", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "" - }, - { - "nameOnMethod": "input", - "name": "input", - "type": "Volo.Abp.FeatureManagement.UpdateFeaturesDto", - "typeSimple": "Volo.Abp.FeatureManagement.UpdateFeaturesDto", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Body", - "descriptorName": "" - } - ], - "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" - } - } - } - } - } - }, - "textTemplateManagement": { - "rootPath": "textTemplateManagement", - "remoteServiceName": "TextTemplateManagement", - "controllers": { - "Volo.Abp.TextTemplateManagement.TextTemplates.TemplateContentController": { - "controllerName": "TemplateContent", - "type": "Volo.Abp.TextTemplateManagement.TextTemplates.TemplateContentController", - "interfaces": [ - { - "type": "Volo.Abp.TextTemplateManagement.TextTemplates.ITemplateContentAppService" - } - ], - "actions": { - "GetAsyncByInput": { - "uniqueName": "GetAsyncByInput", - "name": "GetAsync", - "httpMethod": "GET", - "url": "api/text-template-management/template-contents", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "input", - "typeAsString": "Volo.Abp.TextTemplateManagement.TextTemplates.GetTemplateContentInput, Volo.Abp.TextTemplateManagement.Application.Contracts", - "type": "Volo.Abp.TextTemplateManagement.TextTemplates.GetTemplateContentInput", - "typeSimple": "Volo.Abp.TextTemplateManagement.TextTemplates.GetTemplateContentInput", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "input", - "name": "TemplateName", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "CultureName", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - } - ], - "returnValue": { - "type": "Volo.Abp.TextTemplateManagement.TextTemplates.TextTemplateContentDto", - "typeSimple": "Volo.Abp.TextTemplateManagement.TextTemplates.TextTemplateContentDto" - } - }, - "RestoreToDefaultAsyncByInput": { - "uniqueName": "RestoreToDefaultAsyncByInput", - "name": "RestoreToDefaultAsync", - "httpMethod": "PUT", - "url": "api/text-template-management/template-contents/restore-to-default", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "input", - "typeAsString": "Volo.Abp.TextTemplateManagement.TextTemplates.RestoreTemplateContentInput, Volo.Abp.TextTemplateManagement.Application.Contracts", - "type": "Volo.Abp.TextTemplateManagement.TextTemplates.RestoreTemplateContentInput", - "typeSimple": "Volo.Abp.TextTemplateManagement.TextTemplates.RestoreTemplateContentInput", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "input", - "name": "input", - "type": "Volo.Abp.TextTemplateManagement.TextTemplates.RestoreTemplateContentInput", - "typeSimple": "Volo.Abp.TextTemplateManagement.TextTemplates.RestoreTemplateContentInput", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Body", - "descriptorName": "" - } - ], - "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" - } - }, - "UpdateAsyncByInput": { - "uniqueName": "UpdateAsyncByInput", - "name": "UpdateAsync", - "httpMethod": "PUT", - "url": "api/text-template-management/template-contents", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "input", - "typeAsString": "Volo.Abp.TextTemplateManagement.TextTemplates.UpdateTemplateContentInput, Volo.Abp.TextTemplateManagement.Application.Contracts", - "type": "Volo.Abp.TextTemplateManagement.TextTemplates.UpdateTemplateContentInput", - "typeSimple": "Volo.Abp.TextTemplateManagement.TextTemplates.UpdateTemplateContentInput", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "input", - "name": "input", - "type": "Volo.Abp.TextTemplateManagement.TextTemplates.UpdateTemplateContentInput", - "typeSimple": "Volo.Abp.TextTemplateManagement.TextTemplates.UpdateTemplateContentInput", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Body", - "descriptorName": "" - } - ], - "returnValue": { - "type": "Volo.Abp.TextTemplateManagement.TextTemplates.TextTemplateContentDto", - "typeSimple": "Volo.Abp.TextTemplateManagement.TextTemplates.TextTemplateContentDto" - } - } - } - }, - "Volo.Abp.TextTemplateManagement.TextTemplates.TemplateDefinitionController": { - "controllerName": "TemplateDefinition", - "type": "Volo.Abp.TextTemplateManagement.TextTemplates.TemplateDefinitionController", - "interfaces": [ - { - "type": "Volo.Abp.TextTemplateManagement.TextTemplates.ITemplateDefinitionAppService" - } - ], - "actions": { - "GetListAsyncByInput": { - "uniqueName": "GetListAsyncByInput", - "name": "GetListAsync", - "httpMethod": "GET", - "url": "api/text-template-management/template-definitions", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "input", - "typeAsString": "Volo.Abp.TextTemplateManagement.TextTemplates.GetTemplateDefinitionListInput, Volo.Abp.TextTemplateManagement.Application.Contracts", - "type": "Volo.Abp.TextTemplateManagement.TextTemplates.GetTemplateDefinitionListInput", - "typeSimple": "Volo.Abp.TextTemplateManagement.TextTemplates.GetTemplateDefinitionListInput", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "input", - "name": "FilterText", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "Sorting", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "SkipCount", - "type": "System.Int32", - "typeSimple": "number", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "MaxResultCount", - "type": "System.Int32", - "typeSimple": "number", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - } - ], - "returnValue": { - "type": "Volo.Abp.Application.Dtos.PagedResultDto", - "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" - } - }, - "GetAsyncByName": { - "uniqueName": "GetAsyncByName", - "name": "GetAsync", - "httpMethod": "GET", - "url": "api/text-template-management/template-definitions/{name}", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "name", - "typeAsString": "System.String, System.Private.CoreLib", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "name", - "name": "name", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - } - ], - "returnValue": { - "type": "Volo.Abp.TextTemplateManagement.TextTemplates.TemplateDefinitionDto", - "typeSimple": "Volo.Abp.TextTemplateManagement.TextTemplates.TemplateDefinitionDto" - } - } - } - } - } - }, - "permissionManagement": { - "rootPath": "permissionManagement", - "remoteServiceName": "AbpPermissionManagement", - "controllers": { - "Volo.Abp.PermissionManagement.PermissionsController": { - "controllerName": "Permissions", - "type": "Volo.Abp.PermissionManagement.PermissionsController", - "interfaces": [ - { - "type": "Volo.Abp.PermissionManagement.IPermissionAppService" - } - ], - "actions": { - "GetAsyncByProviderNameAndProviderKey": { - "uniqueName": "GetAsyncByProviderNameAndProviderKey", - "name": "GetAsync", - "httpMethod": "GET", - "url": "api/permission-management/permissions", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "providerName", - "typeAsString": "System.String, System.Private.CoreLib", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - }, - { - "name": "providerKey", - "typeAsString": "System.String, System.Private.CoreLib", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "providerName", - "name": "providerName", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "" - }, - { - "nameOnMethod": "providerKey", - "name": "providerKey", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "" - } - ], - "returnValue": { - "type": "Volo.Abp.PermissionManagement.GetPermissionListResultDto", - "typeSimple": "Volo.Abp.PermissionManagement.GetPermissionListResultDto" - } - }, - "UpdateAsyncByProviderNameAndProviderKeyAndInput": { - "uniqueName": "UpdateAsyncByProviderNameAndProviderKeyAndInput", - "name": "UpdateAsync", - "httpMethod": "PUT", - "url": "api/permission-management/permissions", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "providerName", - "typeAsString": "System.String, System.Private.CoreLib", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - }, - { - "name": "providerKey", - "typeAsString": "System.String, System.Private.CoreLib", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - }, - { - "name": "input", - "typeAsString": "Volo.Abp.PermissionManagement.UpdatePermissionsDto, Volo.Abp.PermissionManagement.Application.Contracts", - "type": "Volo.Abp.PermissionManagement.UpdatePermissionsDto", - "typeSimple": "Volo.Abp.PermissionManagement.UpdatePermissionsDto", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "providerName", - "name": "providerName", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "" - }, - { - "nameOnMethod": "providerKey", - "name": "providerKey", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "" - }, - { - "nameOnMethod": "input", - "name": "input", - "type": "Volo.Abp.PermissionManagement.UpdatePermissionsDto", - "typeSimple": "Volo.Abp.PermissionManagement.UpdatePermissionsDto", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Body", - "descriptorName": "" - } - ], - "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" - } - } - } - } - } - }, - "languageManagement": { - "rootPath": "languageManagement", - "remoteServiceName": "LanguageManagement", - "controllers": { - "Volo.Abp.LanguageManagement.LanguageController": { - "controllerName": "Language", - "type": "Volo.Abp.LanguageManagement.LanguageController", - "interfaces": [ - { - "type": "Volo.Abp.LanguageManagement.ILanguageAppService" - } - ], - "actions": { - "GetAllListAsync": { - "uniqueName": "GetAllListAsync", - "name": "GetAllListAsync", - "httpMethod": "GET", - "url": "api/language-management/languages/all", - "supportedVersions": [], - "parametersOnMethod": [], - "parameters": [], - "returnValue": { - "type": "Volo.Abp.Application.Dtos.ListResultDto", - "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" - } - }, - "GetListAsyncByInput": { - "uniqueName": "GetListAsyncByInput", - "name": "GetListAsync", - "httpMethod": "GET", - "url": "api/language-management/languages", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "input", - "typeAsString": "Volo.Abp.LanguageManagement.Dto.GetLanguagesTextsInput, Volo.Abp.LanguageManagement.Application.Contracts", - "type": "Volo.Abp.LanguageManagement.Dto.GetLanguagesTextsInput", - "typeSimple": "Volo.Abp.LanguageManagement.Dto.GetLanguagesTextsInput", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "input", - "name": "Filter", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "ResourceName", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "BaseCultureName", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "TargetCultureName", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "GetOnlyEmptyValues", - "type": "System.Boolean", - "typeSimple": "boolean", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "Sorting", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "SkipCount", - "type": "System.Int32", - "typeSimple": "number", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "MaxResultCount", - "type": "System.Int32", - "typeSimple": "number", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - } - ], - "returnValue": { - "type": "Volo.Abp.Application.Dtos.ListResultDto", - "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" - } - }, - "GetAsyncById": { - "uniqueName": "GetAsyncById", - "name": "GetAsync", - "httpMethod": "GET", - "url": "api/language-management/languages/{id}", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "id", - "name": "id", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - } - ], - "returnValue": { - "type": "Volo.Abp.LanguageManagement.Dto.LanguageDto", - "typeSimple": "Volo.Abp.LanguageManagement.Dto.LanguageDto" - } - }, - "CreateAsyncByInput": { - "uniqueName": "CreateAsyncByInput", - "name": "CreateAsync", - "httpMethod": "POST", - "url": "api/language-management/languages", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "input", - "typeAsString": "Volo.Abp.LanguageManagement.Dto.CreateLanguageDto, Volo.Abp.LanguageManagement.Application.Contracts", - "type": "Volo.Abp.LanguageManagement.Dto.CreateLanguageDto", - "typeSimple": "Volo.Abp.LanguageManagement.Dto.CreateLanguageDto", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "input", - "name": "input", - "type": "Volo.Abp.LanguageManagement.Dto.CreateLanguageDto", - "typeSimple": "Volo.Abp.LanguageManagement.Dto.CreateLanguageDto", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Body", - "descriptorName": "" - } - ], - "returnValue": { - "type": "Volo.Abp.LanguageManagement.Dto.LanguageDto", - "typeSimple": "Volo.Abp.LanguageManagement.Dto.LanguageDto" - } - }, - "UpdateAsyncByIdAndInput": { - "uniqueName": "UpdateAsyncByIdAndInput", - "name": "UpdateAsync", - "httpMethod": "PUT", - "url": "api/language-management/languages/{id}", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - }, - { - "name": "input", - "typeAsString": "Volo.Abp.LanguageManagement.Dto.UpdateLanguageDto, Volo.Abp.LanguageManagement.Application.Contracts", - "type": "Volo.Abp.LanguageManagement.Dto.UpdateLanguageDto", - "typeSimple": "Volo.Abp.LanguageManagement.Dto.UpdateLanguageDto", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "id", - "name": "id", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - }, - { - "nameOnMethod": "input", - "name": "input", - "type": "Volo.Abp.LanguageManagement.Dto.UpdateLanguageDto", - "typeSimple": "Volo.Abp.LanguageManagement.Dto.UpdateLanguageDto", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Body", - "descriptorName": "" - } - ], - "returnValue": { - "type": "Volo.Abp.LanguageManagement.Dto.LanguageDto", - "typeSimple": "Volo.Abp.LanguageManagement.Dto.LanguageDto" - } - }, - "DeleteAsyncById": { - "uniqueName": "DeleteAsyncById", - "name": "DeleteAsync", - "httpMethod": "DELETE", - "url": "api/language-management/languages/{id}", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "id", - "name": "id", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - } - ], - "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" - } - }, - "SetAsDefaultAsyncById": { - "uniqueName": "SetAsDefaultAsyncById", - "name": "SetAsDefaultAsync", - "httpMethod": "PUT", - "url": "api/language-management/languages/{id}/set-as-default", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "id", - "name": "id", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - } - ], - "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" - } - }, - "GetResourcesAsync": { - "uniqueName": "GetResourcesAsync", - "name": "GetResourcesAsync", - "httpMethod": "GET", - "url": "api/language-management/languages/resources", - "supportedVersions": [], - "parametersOnMethod": [], - "parameters": [], - "returnValue": { - "type": "System.Collections.Generic.List", - "typeSimple": "[Volo.Abp.LanguageManagement.Dto.LanguageResourceDto]" - } - }, - "GetCulturelistAsync": { - "uniqueName": "GetCulturelistAsync", - "name": "GetCulturelistAsync", - "httpMethod": "GET", - "url": "api/language-management/languages/culture-list", - "supportedVersions": [], - "parametersOnMethod": [], - "parameters": [], - "returnValue": { - "type": "System.Collections.Generic.List", - "typeSimple": "[Volo.Abp.LanguageManagement.Dto.CultureInfoDto]" - } - } - } - }, - "Volo.Abp.LanguageManagement.LanguageTextController": { - "controllerName": "LanguageText", - "type": "Volo.Abp.LanguageManagement.LanguageTextController", - "interfaces": [ - { - "type": "Volo.Abp.LanguageManagement.ILanguageTextAppService" - } - ], - "actions": { - "GetListAsyncByInput": { - "uniqueName": "GetListAsyncByInput", - "name": "GetListAsync", - "httpMethod": "GET", - "url": "api/language-management/language-texts", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "input", - "typeAsString": "Volo.Abp.LanguageManagement.Dto.GetLanguagesTextsInput, Volo.Abp.LanguageManagement.Application.Contracts", - "type": "Volo.Abp.LanguageManagement.Dto.GetLanguagesTextsInput", - "typeSimple": "Volo.Abp.LanguageManagement.Dto.GetLanguagesTextsInput", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "input", - "name": "Filter", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "ResourceName", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "BaseCultureName", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "TargetCultureName", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "GetOnlyEmptyValues", - "type": "System.Boolean", - "typeSimple": "boolean", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "Sorting", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "SkipCount", - "type": "System.Int32", - "typeSimple": "number", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "MaxResultCount", - "type": "System.Int32", - "typeSimple": "number", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - } - ], - "returnValue": { - "type": "Volo.Abp.Application.Dtos.PagedResultDto", - "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" - } - }, - "GetAsyncByResourceNameAndCultureNameAndNameAndBaseCultureName": { - "uniqueName": "GetAsyncByResourceNameAndCultureNameAndNameAndBaseCultureName", - "name": "GetAsync", - "httpMethod": "GET", - "url": "api/language-management/language-texts/{resourceName}/{cultureName}/{name}", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "resourceName", - "typeAsString": "System.String, System.Private.CoreLib", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - }, - { - "name": "cultureName", - "typeAsString": "System.String, System.Private.CoreLib", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - }, - { - "name": "name", - "typeAsString": "System.String, System.Private.CoreLib", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - }, - { - "name": "baseCultureName", - "typeAsString": "System.String, System.Private.CoreLib", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "resourceName", - "name": "resourceName", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - }, - { - "nameOnMethod": "cultureName", - "name": "cultureName", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - }, - { - "nameOnMethod": "name", - "name": "name", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - }, - { - "nameOnMethod": "baseCultureName", - "name": "baseCultureName", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "" - } - ], - "returnValue": { - "type": "Volo.Abp.LanguageManagement.Dto.LanguageTextDto", - "typeSimple": "Volo.Abp.LanguageManagement.Dto.LanguageTextDto" - } - }, - "UpdateAsyncByResourceNameAndCultureNameAndNameAndValue": { - "uniqueName": "UpdateAsyncByResourceNameAndCultureNameAndNameAndValue", - "name": "UpdateAsync", - "httpMethod": "PUT", - "url": "api/language-management/language-texts/{resourceName}/{cultureName}/{name}", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "resourceName", - "typeAsString": "System.String, System.Private.CoreLib", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - }, - { - "name": "cultureName", - "typeAsString": "System.String, System.Private.CoreLib", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - }, - { - "name": "name", - "typeAsString": "System.String, System.Private.CoreLib", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - }, - { - "name": "value", - "typeAsString": "System.String, System.Private.CoreLib", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "resourceName", - "name": "resourceName", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - }, - { - "nameOnMethod": "cultureName", - "name": "cultureName", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - }, - { - "nameOnMethod": "name", - "name": "name", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - }, - { - "nameOnMethod": "value", - "name": "value", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "" - } - ], - "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" - } - }, - "RestoreToDefaultAsyncByResourceNameAndCultureNameAndName": { - "uniqueName": "RestoreToDefaultAsyncByResourceNameAndCultureNameAndName", - "name": "RestoreToDefaultAsync", - "httpMethod": "PUT", - "url": "api/language-management/language-texts/{resourceName}/{cultureName}/{name}/restore", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "resourceName", - "typeAsString": "System.String, System.Private.CoreLib", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - }, - { - "name": "cultureName", - "typeAsString": "System.String, System.Private.CoreLib", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - }, - { - "name": "name", - "typeAsString": "System.String, System.Private.CoreLib", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "resourceName", - "name": "resourceName", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - }, - { - "nameOnMethod": "cultureName", - "name": "cultureName", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - }, - { - "nameOnMethod": "name", - "name": "name", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - } - ], - "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" - } - } - } - } - } - }, - "auditLogging": { - "rootPath": "auditLogging", - "remoteServiceName": "AbpAuditLogging", - "controllers": { - "Volo.Abp.AuditLogging.AuditLogsController": { - "controllerName": "AuditLogs", - "type": "Volo.Abp.AuditLogging.AuditLogsController", - "interfaces": [ - { - "type": "Volo.Abp.AuditLogging.IAuditLogsAppService" - } - ], - "actions": { - "GetListAsyncByInput": { - "uniqueName": "GetListAsyncByInput", - "name": "GetListAsync", - "httpMethod": "GET", - "url": "api/audit-logging/audit-logs", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "input", - "typeAsString": "Volo.Abp.AuditLogging.GetAuditLogListDto, Volo.Abp.AuditLogging.Application.Contracts", - "type": "Volo.Abp.AuditLogging.GetAuditLogListDto", - "typeSimple": "Volo.Abp.AuditLogging.GetAuditLogListDto", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "input", - "name": "Url", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "UserName", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "ApplicationName", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "CorrelationId", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "HttpMethod", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "HttpStatusCode", - "type": "System.Net.HttpStatusCode?", - "typeSimple": "System.Net.HttpStatusCode?", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "MaxExecutionDuration", - "type": "System.Int32?", - "typeSimple": "number?", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "MinExecutionDuration", - "type": "System.Int32?", - "typeSimple": "number?", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "HasException", - "type": "System.Boolean?", - "typeSimple": "boolean?", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "Sorting", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "SkipCount", - "type": "System.Int32", - "typeSimple": "number", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "MaxResultCount", - "type": "System.Int32", - "typeSimple": "number", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - } - ], - "returnValue": { - "type": "Volo.Abp.Application.Dtos.PagedResultDto", - "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" - } - }, - "GetAsyncById": { - "uniqueName": "GetAsyncById", - "name": "GetAsync", - "httpMethod": "GET", - "url": "api/audit-logging/audit-logs/{id}", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "id", - "name": "id", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - } - ], - "returnValue": { - "type": "Volo.Abp.AuditLogging.AuditLogDto", - "typeSimple": "Volo.Abp.AuditLogging.AuditLogDto" - } - }, - "GetErrorRateAsyncByFilter": { - "uniqueName": "GetErrorRateAsyncByFilter", - "name": "GetErrorRateAsync", - "httpMethod": "GET", - "url": "api/audit-logging/audit-logs/statistics/error-rate", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "filter", - "typeAsString": "Volo.Abp.AuditLogging.GetErrorRateFilter, Volo.Abp.AuditLogging.Application.Contracts", - "type": "Volo.Abp.AuditLogging.GetErrorRateFilter", - "typeSimple": "Volo.Abp.AuditLogging.GetErrorRateFilter", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "filter", - "name": "StartDate", - "type": "System.DateTime", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "filter" - }, - { - "nameOnMethod": "filter", - "name": "EndDate", - "type": "System.DateTime", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "filter" - } - ], - "returnValue": { - "type": "Volo.Abp.AuditLogging.GetErrorRateOutput", - "typeSimple": "Volo.Abp.AuditLogging.GetErrorRateOutput" - } - }, - "GetAverageExecutionDurationPerDayAsyncByFilter": { - "uniqueName": "GetAverageExecutionDurationPerDayAsyncByFilter", - "name": "GetAverageExecutionDurationPerDayAsync", - "httpMethod": "GET", - "url": "api/audit-logging/audit-logs/statistics/average-execution-duration-per-day", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "filter", - "typeAsString": "Volo.Abp.AuditLogging.GetAverageExecutionDurationPerDayInput, Volo.Abp.AuditLogging.Application.Contracts", - "type": "Volo.Abp.AuditLogging.GetAverageExecutionDurationPerDayInput", - "typeSimple": "Volo.Abp.AuditLogging.GetAverageExecutionDurationPerDayInput", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "filter", - "name": "StartDate", - "type": "System.DateTime", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "filter" - }, - { - "nameOnMethod": "filter", - "name": "EndDate", - "type": "System.DateTime", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "filter" - } - ], - "returnValue": { - "type": "Volo.Abp.AuditLogging.GetAverageExecutionDurationPerDayOutput", - "typeSimple": "Volo.Abp.AuditLogging.GetAverageExecutionDurationPerDayOutput" - } - }, - "GetEntityChangesAsyncByInput": { - "uniqueName": "GetEntityChangesAsyncByInput", - "name": "GetEntityChangesAsync", - "httpMethod": "GET", - "url": "api/audit-logging/audit-logs/entity-changes", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "input", - "typeAsString": "Volo.Abp.AuditLogging.GetEntityChangesDto, Volo.Abp.AuditLogging.Application.Contracts", - "type": "Volo.Abp.AuditLogging.GetEntityChangesDto", - "typeSimple": "Volo.Abp.AuditLogging.GetEntityChangesDto", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "input", - "name": "AuditLogId", - "type": "System.Guid?", - "typeSimple": "string?", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "EntityChangeType", - "type": "Volo.Abp.Auditing.EntityChangeType?", - "typeSimple": "Volo.Abp.Auditing.EntityChangeType?", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "EntityId", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "EntityTypeFullName", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "StartDate", - "type": "System.DateTime?", - "typeSimple": "string?", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "EndDate", - "type": "System.DateTime?", - "typeSimple": "string?", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "Sorting", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "SkipCount", - "type": "System.Int32", - "typeSimple": "number", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "MaxResultCount", - "type": "System.Int32", - "typeSimple": "number", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - } - ], - "returnValue": { - "type": "Volo.Abp.Application.Dtos.PagedResultDto", - "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" - } - }, - "GetEntityChangesWithUsernameAsyncByInput": { - "uniqueName": "GetEntityChangesWithUsernameAsyncByInput", - "name": "GetEntityChangesWithUsernameAsync", - "httpMethod": "GET", - "url": "api/audit-logging/audit-logs/entity-changes-with-username", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "input", - "typeAsString": "Volo.Abp.AuditLogging.EntityChangeFilter, Volo.Abp.AuditLogging.Application.Contracts", - "type": "Volo.Abp.AuditLogging.EntityChangeFilter", - "typeSimple": "Volo.Abp.AuditLogging.EntityChangeFilter", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "input", - "name": "EntityId", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "EntityTypeFullName", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - } - ], - "returnValue": { - "type": "System.Collections.Generic.List", - "typeSimple": "[Volo.Abp.AuditLogging.EntityChangeWithUsernameDto]" - } - }, - "GetEntityChangeWithUsernameAsyncByEntityChangeId": { - "uniqueName": "GetEntityChangeWithUsernameAsyncByEntityChangeId", - "name": "GetEntityChangeWithUsernameAsync", - "httpMethod": "GET", - "url": "api/audit-logging/audit-logs/entity-change-with-username/{entityChangeId}", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "entityChangeId", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "entityChangeId", - "name": "entityChangeId", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - } - ], - "returnValue": { - "type": "Volo.Abp.AuditLogging.EntityChangeWithUsernameDto", - "typeSimple": "Volo.Abp.AuditLogging.EntityChangeWithUsernameDto" - } - }, - "GetEntityChangeAsyncByEntityChangeId": { - "uniqueName": "GetEntityChangeAsyncByEntityChangeId", - "name": "GetEntityChangeAsync", - "httpMethod": "GET", - "url": "api/audit-logging/audit-logs/entity-changes/{entityChangeId}", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "entityChangeId", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "entityChangeId", - "name": "entityChangeId", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - } - ], - "returnValue": { - "type": "Volo.Abp.AuditLogging.EntityChangeDto", - "typeSimple": "Volo.Abp.AuditLogging.EntityChangeDto" - } - } - } - } - } - }, - "saas": { - "rootPath": "saas", - "remoteServiceName": "SaasHost", - "controllers": { - "Volo.Saas.Host.EditionController": { - "controllerName": "Edition", - "type": "Volo.Saas.Host.EditionController", - "interfaces": [ - { - "type": "Volo.Saas.Host.IEditionAppService" - } - ], - "actions": { - "GetAsyncById": { - "uniqueName": "GetAsyncById", - "name": "GetAsync", - "httpMethod": "GET", - "url": "api/saas/editions/{id}", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "id", - "name": "id", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - } - ], - "returnValue": { - "type": "Volo.Saas.Host.Dtos.EditionDto", - "typeSimple": "Volo.Saas.Host.Dtos.EditionDto" - } - }, - "GetListAsyncByInput": { - "uniqueName": "GetListAsyncByInput", - "name": "GetListAsync", - "httpMethod": "GET", - "url": "api/saas/editions", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "input", - "typeAsString": "Volo.Saas.Host.Dtos.GetEditionsInput, Volo.Saas.Host.Application.Contracts", - "type": "Volo.Saas.Host.Dtos.GetEditionsInput", - "typeSimple": "Volo.Saas.Host.Dtos.GetEditionsInput", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "input", - "name": "Filter", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "Sorting", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "SkipCount", - "type": "System.Int32", - "typeSimple": "number", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "MaxResultCount", - "type": "System.Int32", - "typeSimple": "number", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - } - ], - "returnValue": { - "type": "Volo.Abp.Application.Dtos.PagedResultDto", - "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" - } - }, - "CreateAsyncByInput": { - "uniqueName": "CreateAsyncByInput", - "name": "CreateAsync", - "httpMethod": "POST", - "url": "api/saas/editions", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "input", - "typeAsString": "Volo.Saas.Host.Dtos.EditionCreateDto, Volo.Saas.Host.Application.Contracts", - "type": "Volo.Saas.Host.Dtos.EditionCreateDto", - "typeSimple": "Volo.Saas.Host.Dtos.EditionCreateDto", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "input", - "name": "input", - "type": "Volo.Saas.Host.Dtos.EditionCreateDto", - "typeSimple": "Volo.Saas.Host.Dtos.EditionCreateDto", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Body", - "descriptorName": "" - } - ], - "returnValue": { - "type": "Volo.Saas.Host.Dtos.EditionDto", - "typeSimple": "Volo.Saas.Host.Dtos.EditionDto" - } - }, - "UpdateAsyncByIdAndInput": { - "uniqueName": "UpdateAsyncByIdAndInput", - "name": "UpdateAsync", - "httpMethod": "PUT", - "url": "api/saas/editions/{id}", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - }, - { - "name": "input", - "typeAsString": "Volo.Saas.Host.Dtos.EditionUpdateDto, Volo.Saas.Host.Application.Contracts", - "type": "Volo.Saas.Host.Dtos.EditionUpdateDto", - "typeSimple": "Volo.Saas.Host.Dtos.EditionUpdateDto", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "id", - "name": "id", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - }, - { - "nameOnMethod": "input", - "name": "input", - "type": "Volo.Saas.Host.Dtos.EditionUpdateDto", - "typeSimple": "Volo.Saas.Host.Dtos.EditionUpdateDto", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Body", - "descriptorName": "" - } - ], - "returnValue": { - "type": "Volo.Saas.Host.Dtos.EditionDto", - "typeSimple": "Volo.Saas.Host.Dtos.EditionDto" - } - }, - "DeleteAsyncById": { - "uniqueName": "DeleteAsyncById", - "name": "DeleteAsync", - "httpMethod": "DELETE", - "url": "api/saas/editions/{id}", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "id", - "name": "id", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - } - ], - "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" - } - }, - "GetUsageStatistics": { - "uniqueName": "GetUsageStatistics", - "name": "GetUsageStatistics", - "httpMethod": "GET", - "url": "api/saas/editions/statistics/usage-statistic", - "supportedVersions": [], - "parametersOnMethod": [], - "parameters": [], - "returnValue": { - "type": "Volo.Saas.Host.GetEditionUsageStatisticsResult", - "typeSimple": "Volo.Saas.Host.GetEditionUsageStatisticsResult" - } - } - } - }, - "Volo.Saas.Host.TenantController": { - "controllerName": "Tenant", - "type": "Volo.Saas.Host.TenantController", - "interfaces": [ - { - "type": "Volo.Saas.Host.ITenantAppService" - } - ], - "actions": { - "GetAsyncById": { - "uniqueName": "GetAsyncById", - "name": "GetAsync", - "httpMethod": "GET", - "url": "api/saas/tenants/{id}", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "id", - "name": "id", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - } - ], - "returnValue": { - "type": "Volo.Saas.Host.Dtos.SaasTenantDto", - "typeSimple": "Volo.Saas.Host.Dtos.SaasTenantDto" - } - }, - "GetListAsyncByInput": { - "uniqueName": "GetListAsyncByInput", - "name": "GetListAsync", - "httpMethod": "GET", - "url": "api/saas/tenants", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "input", - "typeAsString": "Volo.Saas.Host.Dtos.GetTenantsInput, Volo.Saas.Host.Application.Contracts", - "type": "Volo.Saas.Host.Dtos.GetTenantsInput", - "typeSimple": "Volo.Saas.Host.Dtos.GetTenantsInput", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "input", - "name": "Filter", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "GetEditionNames", - "type": "System.Boolean", - "typeSimple": "boolean", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "Sorting", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "SkipCount", - "type": "System.Int32", - "typeSimple": "number", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "MaxResultCount", - "type": "System.Int32", - "typeSimple": "number", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - } - ], - "returnValue": { - "type": "Volo.Abp.Application.Dtos.PagedResultDto", - "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" - } - }, - "CreateAsyncByInput": { - "uniqueName": "CreateAsyncByInput", - "name": "CreateAsync", - "httpMethod": "POST", - "url": "api/saas/tenants", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "input", - "typeAsString": "Volo.Saas.Host.Dtos.SaasTenantCreateDto, Volo.Saas.Host.Application.Contracts", - "type": "Volo.Saas.Host.Dtos.SaasTenantCreateDto", - "typeSimple": "Volo.Saas.Host.Dtos.SaasTenantCreateDto", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "input", - "name": "input", - "type": "Volo.Saas.Host.Dtos.SaasTenantCreateDto", - "typeSimple": "Volo.Saas.Host.Dtos.SaasTenantCreateDto", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Body", - "descriptorName": "" - } - ], - "returnValue": { - "type": "Volo.Saas.Host.Dtos.SaasTenantDto", - "typeSimple": "Volo.Saas.Host.Dtos.SaasTenantDto" - } - }, - "UpdateAsyncByIdAndInput": { - "uniqueName": "UpdateAsyncByIdAndInput", - "name": "UpdateAsync", - "httpMethod": "PUT", - "url": "api/saas/tenants/{id}", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - }, - { - "name": "input", - "typeAsString": "Volo.Saas.Host.Dtos.SaasTenantUpdateDto, Volo.Saas.Host.Application.Contracts", - "type": "Volo.Saas.Host.Dtos.SaasTenantUpdateDto", - "typeSimple": "Volo.Saas.Host.Dtos.SaasTenantUpdateDto", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "id", - "name": "id", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - }, - { - "nameOnMethod": "input", - "name": "input", - "type": "Volo.Saas.Host.Dtos.SaasTenantUpdateDto", - "typeSimple": "Volo.Saas.Host.Dtos.SaasTenantUpdateDto", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Body", - "descriptorName": "" - } - ], - "returnValue": { - "type": "Volo.Saas.Host.Dtos.SaasTenantDto", - "typeSimple": "Volo.Saas.Host.Dtos.SaasTenantDto" - } - }, - "DeleteAsyncById": { - "uniqueName": "DeleteAsyncById", - "name": "DeleteAsync", - "httpMethod": "DELETE", - "url": "api/saas/tenants/{id}", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "id", - "name": "id", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - } - ], - "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" - } - }, - "GetDefaultConnectionStringAsyncById": { - "uniqueName": "GetDefaultConnectionStringAsyncById", - "name": "GetDefaultConnectionStringAsync", - "httpMethod": "GET", - "url": "api/saas/tenants/{id}/default-connection-string", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "id", - "name": "id", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - } - ], - "returnValue": { - "type": "System.String", - "typeSimple": "string" - } - }, - "UpdateDefaultConnectionStringAsyncByIdAndDefaultConnectionString": { - "uniqueName": "UpdateDefaultConnectionStringAsyncByIdAndDefaultConnectionString", - "name": "UpdateDefaultConnectionStringAsync", - "httpMethod": "PUT", - "url": "api/saas/tenants/{id}/default-connection-string", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - }, - { - "name": "defaultConnectionString", - "typeAsString": "System.String, System.Private.CoreLib", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "id", - "name": "id", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - }, - { - "nameOnMethod": "defaultConnectionString", - "name": "defaultConnectionString", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "" - } - ], - "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" - } - }, - "DeleteDefaultConnectionStringAsyncById": { - "uniqueName": "DeleteDefaultConnectionStringAsyncById", - "name": "DeleteDefaultConnectionStringAsync", - "httpMethod": "DELETE", - "url": "api/saas/tenants/{id}/default-connection-string", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "id", - "name": "id", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - } - ], - "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" - } - } - } - } - } - }, - "identity": { - "rootPath": "identity", - "remoteServiceName": "AbpIdentity", - "controllers": { - "Volo.Abp.Identity.IdentityClaimTypeController": { - "controllerName": "IdentityClaimType", - "type": "Volo.Abp.Identity.IdentityClaimTypeController", - "interfaces": [ - { - "type": "Volo.Abp.Identity.IIdentityClaimTypeAppService" - } - ], - "actions": { - "GetListAsyncByInput": { - "uniqueName": "GetListAsyncByInput", - "name": "GetListAsync", - "httpMethod": "GET", - "url": "api/identity/claim-types", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "input", - "typeAsString": "Volo.Abp.Identity.GetIdentityClaimTypesInput, Volo.Abp.Identity.Pro.Application.Contracts", - "type": "Volo.Abp.Identity.GetIdentityClaimTypesInput", - "typeSimple": "Volo.Abp.Identity.GetIdentityClaimTypesInput", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "input", - "name": "Filter", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "Sorting", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "SkipCount", - "type": "System.Int32", - "typeSimple": "number", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "MaxResultCount", - "type": "System.Int32", - "typeSimple": "number", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - } - ], - "returnValue": { - "type": "Volo.Abp.Application.Dtos.PagedResultDto", - "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" - } - }, - "GetAsyncById": { - "uniqueName": "GetAsyncById", - "name": "GetAsync", - "httpMethod": "GET", - "url": "api/identity/claim-types/{id}", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "id", - "name": "id", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - } - ], - "returnValue": { - "type": "Volo.Abp.Identity.ClaimTypeDto", - "typeSimple": "Volo.Abp.Identity.ClaimTypeDto" - } - }, - "CreateAsyncByInput": { - "uniqueName": "CreateAsyncByInput", - "name": "CreateAsync", - "httpMethod": "POST", - "url": "api/identity/claim-types", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "input", - "typeAsString": "Volo.Abp.Identity.CreateClaimTypeDto, Volo.Abp.Identity.Pro.Application.Contracts", - "type": "Volo.Abp.Identity.CreateClaimTypeDto", - "typeSimple": "Volo.Abp.Identity.CreateClaimTypeDto", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "input", - "name": "input", - "type": "Volo.Abp.Identity.CreateClaimTypeDto", - "typeSimple": "Volo.Abp.Identity.CreateClaimTypeDto", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Body", - "descriptorName": "" - } - ], - "returnValue": { - "type": "Volo.Abp.Identity.ClaimTypeDto", - "typeSimple": "Volo.Abp.Identity.ClaimTypeDto" - } - }, - "UpdateAsyncByIdAndInput": { - "uniqueName": "UpdateAsyncByIdAndInput", - "name": "UpdateAsync", - "httpMethod": "PUT", - "url": "api/identity/claim-types/{id}", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - }, - { - "name": "input", - "typeAsString": "Volo.Abp.Identity.UpdateClaimTypeDto, Volo.Abp.Identity.Pro.Application.Contracts", - "type": "Volo.Abp.Identity.UpdateClaimTypeDto", - "typeSimple": "Volo.Abp.Identity.UpdateClaimTypeDto", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "id", - "name": "id", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - }, - { - "nameOnMethod": "input", - "name": "input", - "type": "Volo.Abp.Identity.UpdateClaimTypeDto", - "typeSimple": "Volo.Abp.Identity.UpdateClaimTypeDto", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Body", - "descriptorName": "" - } - ], - "returnValue": { - "type": "Volo.Abp.Identity.ClaimTypeDto", - "typeSimple": "Volo.Abp.Identity.ClaimTypeDto" - } - }, - "DeleteAsyncById": { - "uniqueName": "DeleteAsyncById", - "name": "DeleteAsync", - "httpMethod": "DELETE", - "url": "api/identity/claim-types/{id}", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "id", - "name": "id", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - } - ], - "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" - } - } - } - }, - "Volo.Abp.Identity.IdentityRoleController": { - "controllerName": "IdentityRole", - "type": "Volo.Abp.Identity.IdentityRoleController", - "interfaces": [ - { - "type": "Volo.Abp.Identity.IIdentityRoleAppService" - } - ], - "actions": { - "GetAsyncById": { - "uniqueName": "GetAsyncById", - "name": "GetAsync", - "httpMethod": "GET", - "url": "api/identity/roles/{id}", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "id", - "name": "id", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - } - ], - "returnValue": { - "type": "Volo.Abp.Identity.IdentityRoleDto", - "typeSimple": "Volo.Abp.Identity.IdentityRoleDto" - } - }, - "CreateAsyncByInput": { - "uniqueName": "CreateAsyncByInput", - "name": "CreateAsync", - "httpMethod": "POST", - "url": "api/identity/roles", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "input", - "typeAsString": "Volo.Abp.Identity.IdentityRoleCreateDto, Volo.Abp.Identity.Pro.Application.Contracts", - "type": "Volo.Abp.Identity.IdentityRoleCreateDto", - "typeSimple": "Volo.Abp.Identity.IdentityRoleCreateDto", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "input", - "name": "input", - "type": "Volo.Abp.Identity.IdentityRoleCreateDto", - "typeSimple": "Volo.Abp.Identity.IdentityRoleCreateDto", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Body", - "descriptorName": "" - } - ], - "returnValue": { - "type": "Volo.Abp.Identity.IdentityRoleDto", - "typeSimple": "Volo.Abp.Identity.IdentityRoleDto" - } - }, - "UpdateAsyncByIdAndInput": { - "uniqueName": "UpdateAsyncByIdAndInput", - "name": "UpdateAsync", - "httpMethod": "PUT", - "url": "api/identity/roles/{id}", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - }, - { - "name": "input", - "typeAsString": "Volo.Abp.Identity.IdentityRoleUpdateDto, Volo.Abp.Identity.Pro.Application.Contracts", - "type": "Volo.Abp.Identity.IdentityRoleUpdateDto", - "typeSimple": "Volo.Abp.Identity.IdentityRoleUpdateDto", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "id", - "name": "id", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - }, - { - "nameOnMethod": "input", - "name": "input", - "type": "Volo.Abp.Identity.IdentityRoleUpdateDto", - "typeSimple": "Volo.Abp.Identity.IdentityRoleUpdateDto", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Body", - "descriptorName": "" - } - ], - "returnValue": { - "type": "Volo.Abp.Identity.IdentityRoleDto", - "typeSimple": "Volo.Abp.Identity.IdentityRoleDto" - } - }, - "DeleteAsyncById": { - "uniqueName": "DeleteAsyncById", - "name": "DeleteAsync", - "httpMethod": "DELETE", - "url": "api/identity/roles/{id}", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "id", - "name": "id", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - } - ], - "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" - } - }, - "GetAllListAsync": { - "uniqueName": "GetAllListAsync", - "name": "GetAllListAsync", - "httpMethod": "GET", - "url": "api/identity/roles/all", - "supportedVersions": [], - "parametersOnMethod": [], - "parameters": [], - "returnValue": { - "type": "Volo.Abp.Application.Dtos.ListResultDto", - "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" - } - }, - "GetListAsyncByInput": { - "uniqueName": "GetListAsyncByInput", - "name": "GetListAsync", - "httpMethod": "GET", - "url": "api/identity/roles", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "input", - "typeAsString": "Volo.Abp.Identity.GetIdentityRoleListInput, Volo.Abp.Identity.Pro.Application.Contracts", - "type": "Volo.Abp.Identity.GetIdentityRoleListInput", - "typeSimple": "Volo.Abp.Identity.GetIdentityRoleListInput", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "input", - "name": "Filter", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "Sorting", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "SkipCount", - "type": "System.Int32", - "typeSimple": "number", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "MaxResultCount", - "type": "System.Int32", - "typeSimple": "number", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - } - ], - "returnValue": { - "type": "Volo.Abp.Application.Dtos.PagedResultDto", - "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" - } - }, - "UpdateClaimsAsyncByIdAndInput": { - "uniqueName": "UpdateClaimsAsyncByIdAndInput", - "name": "UpdateClaimsAsync", - "httpMethod": "PUT", - "url": "api/identity/roles/{id}/claims", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - }, - { - "name": "input", - "typeAsString": "System.Collections.Generic.List`1[[Volo.Abp.Identity.IdentityRoleClaimDto, Volo.Abp.Identity.Pro.Application.Contracts, Version=3.2.0.0, Culture=neutral, PublicKeyToken=null]], System.Private.CoreLib", - "type": "System.Collections.Generic.List", - "typeSimple": "[Volo.Abp.Identity.IdentityRoleClaimDto]", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "id", - "name": "id", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - }, - { - "nameOnMethod": "input", - "name": "input", - "type": "System.Collections.Generic.List", - "typeSimple": "[Volo.Abp.Identity.IdentityRoleClaimDto]", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Body", - "descriptorName": "" - } - ], - "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" - } - }, - "GetClaimsAsyncById": { - "uniqueName": "GetClaimsAsyncById", - "name": "GetClaimsAsync", - "httpMethod": "GET", - "url": "api/identity/roles/{id}/claims", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "id", - "name": "id", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - } - ], - "returnValue": { - "type": "System.Collections.Generic.List", - "typeSimple": "[Volo.Abp.Identity.IdentityRoleClaimDto]" - } - }, - "GetAllClaimTypesAsync": { - "uniqueName": "GetAllClaimTypesAsync", - "name": "GetAllClaimTypesAsync", - "httpMethod": "GET", - "url": "api/identity/roles/all-claim-types", - "supportedVersions": [], - "parametersOnMethod": [], - "parameters": [], - "returnValue": { - "type": "System.Collections.Generic.List", - "typeSimple": "[Volo.Abp.Identity.ClaimTypeDto]" - } - } - } - }, - "Volo.Abp.Identity.IdentitySecurityLogController": { - "controllerName": "IdentitySecurityLog", - "type": "Volo.Abp.Identity.IdentitySecurityLogController", - "interfaces": [ - { - "type": "Volo.Abp.Identity.IIdentitySecurityLogAppService" - } - ], - "actions": { - "GetListAsyncByInput": { - "uniqueName": "GetListAsyncByInput", - "name": "GetListAsync", - "httpMethod": "GET", - "url": "api/identity/security-logs", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "input", - "typeAsString": "Volo.Abp.Identity.GetIdentitySecurityLogListInput, Volo.Abp.Identity.Pro.Application.Contracts", - "type": "Volo.Abp.Identity.GetIdentitySecurityLogListInput", - "typeSimple": "Volo.Abp.Identity.GetIdentitySecurityLogListInput", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "input", - "name": "StartTime", - "type": "System.DateTime?", - "typeSimple": "string?", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Query", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "EndTime", - "type": "System.DateTime?", - "typeSimple": "string?", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Query", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "ApplicationName", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Query", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "Identity", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Query", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "Action", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Query", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "UserName", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Query", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "ClientId", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Query", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "CorrelationId", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Query", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "Sorting", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Query", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "SkipCount", - "type": "System.Int32", - "typeSimple": "number", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Query", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "MaxResultCount", - "type": "System.Int32", - "typeSimple": "number", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Query", - "descriptorName": "input" - } - ], - "returnValue": { - "type": "Volo.Abp.Application.Dtos.PagedResultDto", - "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" - } - }, - "GetAsyncById": { - "uniqueName": "GetAsyncById", - "name": "GetAsync", - "httpMethod": "GET", - "url": "api/identity/security-logs/{id}", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "id", - "name": "id", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - } - ], - "returnValue": { - "type": "Volo.Abp.Identity.IdentitySecurityLogDto", - "typeSimple": "Volo.Abp.Identity.IdentitySecurityLogDto" - } - }, - "GetMyListAsyncByInput": { - "uniqueName": "GetMyListAsyncByInput", - "name": "GetMyListAsync", - "httpMethod": "GET", - "url": "api/identity/security-logs/my", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "input", - "typeAsString": "Volo.Abp.Identity.GetIdentitySecurityLogListInput, Volo.Abp.Identity.Pro.Application.Contracts", - "type": "Volo.Abp.Identity.GetIdentitySecurityLogListInput", - "typeSimple": "Volo.Abp.Identity.GetIdentitySecurityLogListInput", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "input", - "name": "StartTime", - "type": "System.DateTime?", - "typeSimple": "string?", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Query", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "EndTime", - "type": "System.DateTime?", - "typeSimple": "string?", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Query", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "ApplicationName", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Query", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "Identity", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Query", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "Action", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Query", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "UserName", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Query", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "ClientId", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Query", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "CorrelationId", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Query", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "Sorting", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Query", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "SkipCount", - "type": "System.Int32", - "typeSimple": "number", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Query", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "MaxResultCount", - "type": "System.Int32", - "typeSimple": "number", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Query", - "descriptorName": "input" - } - ], - "returnValue": { - "type": "Volo.Abp.Application.Dtos.PagedResultDto", - "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" - } - }, - "GetMyAsyncById": { - "uniqueName": "GetMyAsyncById", - "name": "GetMyAsync", - "httpMethod": "GET", - "url": "api/identity/security-logs/my/{id}", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "id", - "name": "id", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - } - ], - "returnValue": { - "type": "Volo.Abp.Identity.IdentitySecurityLogDto", - "typeSimple": "Volo.Abp.Identity.IdentitySecurityLogDto" - } - } - } - }, - "Volo.Abp.Identity.IdentitySettingsController": { - "controllerName": "IdentitySettings", - "type": "Volo.Abp.Identity.IdentitySettingsController", - "interfaces": [ - { - "type": "Volo.Abp.Identity.IIdentitySettingsAppService" - } - ], - "actions": { - "GetAsync": { - "uniqueName": "GetAsync", - "name": "GetAsync", - "httpMethod": "GET", - "url": "api/identity/settings", - "supportedVersions": [], - "parametersOnMethod": [], - "parameters": [], - "returnValue": { - "type": "Volo.Abp.Identity.IdentitySettingsDto", - "typeSimple": "Volo.Abp.Identity.IdentitySettingsDto" - } - }, - "UpdateAsyncByInput": { - "uniqueName": "UpdateAsyncByInput", - "name": "UpdateAsync", - "httpMethod": "PUT", - "url": "api/identity/settings", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "input", - "typeAsString": "Volo.Abp.Identity.IdentitySettingsDto, Volo.Abp.Identity.Pro.Application.Contracts", - "type": "Volo.Abp.Identity.IdentitySettingsDto", - "typeSimple": "Volo.Abp.Identity.IdentitySettingsDto", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "input", - "name": "input", - "type": "Volo.Abp.Identity.IdentitySettingsDto", - "typeSimple": "Volo.Abp.Identity.IdentitySettingsDto", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Body", - "descriptorName": "" - } - ], - "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" - } - } - } - }, - "Volo.Abp.Identity.IdentityUserController": { - "controllerName": "IdentityUser", - "type": "Volo.Abp.Identity.IdentityUserController", - "interfaces": [ - { - "type": "Volo.Abp.Identity.IIdentityUserAppService" - } - ], - "actions": { - "GetAsyncById": { - "uniqueName": "GetAsyncById", - "name": "GetAsync", - "httpMethod": "GET", - "url": "api/identity/users/{id}", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "id", - "name": "id", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - } - ], - "returnValue": { - "type": "Volo.Abp.Identity.IdentityUserDto", - "typeSimple": "Volo.Abp.Identity.IdentityUserDto" - } - }, - "GetListAsyncByInput": { - "uniqueName": "GetListAsyncByInput", - "name": "GetListAsync", - "httpMethod": "GET", - "url": "api/identity/users", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "input", - "typeAsString": "Volo.Abp.Identity.GetIdentityUsersInput, Volo.Abp.Identity.Pro.Application.Contracts", - "type": "Volo.Abp.Identity.GetIdentityUsersInput", - "typeSimple": "Volo.Abp.Identity.GetIdentityUsersInput", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "input", - "name": "Filter", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "Sorting", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "SkipCount", - "type": "System.Int32", - "typeSimple": "number", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "MaxResultCount", - "type": "System.Int32", - "typeSimple": "number", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - } - ], - "returnValue": { - "type": "Volo.Abp.Application.Dtos.PagedResultDto", - "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" - } - }, - "CreateAsyncByInput": { - "uniqueName": "CreateAsyncByInput", - "name": "CreateAsync", - "httpMethod": "POST", - "url": "api/identity/users", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "input", - "typeAsString": "Volo.Abp.Identity.IdentityUserCreateDto, Volo.Abp.Identity.Pro.Application.Contracts", - "type": "Volo.Abp.Identity.IdentityUserCreateDto", - "typeSimple": "Volo.Abp.Identity.IdentityUserCreateDto", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "input", - "name": "input", - "type": "Volo.Abp.Identity.IdentityUserCreateDto", - "typeSimple": "Volo.Abp.Identity.IdentityUserCreateDto", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Body", - "descriptorName": "" - } - ], - "returnValue": { - "type": "Volo.Abp.Identity.IdentityUserDto", - "typeSimple": "Volo.Abp.Identity.IdentityUserDto" - } - }, - "UpdateAsyncByIdAndInput": { - "uniqueName": "UpdateAsyncByIdAndInput", - "name": "UpdateAsync", - "httpMethod": "PUT", - "url": "api/identity/users/{id}", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - }, - { - "name": "input", - "typeAsString": "Volo.Abp.Identity.IdentityUserUpdateDto, Volo.Abp.Identity.Pro.Application.Contracts", - "type": "Volo.Abp.Identity.IdentityUserUpdateDto", - "typeSimple": "Volo.Abp.Identity.IdentityUserUpdateDto", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "id", - "name": "id", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - }, - { - "nameOnMethod": "input", - "name": "input", - "type": "Volo.Abp.Identity.IdentityUserUpdateDto", - "typeSimple": "Volo.Abp.Identity.IdentityUserUpdateDto", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Body", - "descriptorName": "" - } - ], - "returnValue": { - "type": "Volo.Abp.Identity.IdentityUserDto", - "typeSimple": "Volo.Abp.Identity.IdentityUserDto" - } - }, - "DeleteAsyncById": { - "uniqueName": "DeleteAsyncById", - "name": "DeleteAsync", - "httpMethod": "DELETE", - "url": "api/identity/users/{id}", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "id", - "name": "id", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - } - ], - "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" - } - }, - "GetRolesAsyncById": { - "uniqueName": "GetRolesAsyncById", - "name": "GetRolesAsync", - "httpMethod": "GET", - "url": "api/identity/users/{id}/roles", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "id", - "name": "id", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - } - ], - "returnValue": { - "type": "Volo.Abp.Application.Dtos.ListResultDto", - "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" - } - }, - "GetAssignableRolesAsync": { - "uniqueName": "GetAssignableRolesAsync", - "name": "GetAssignableRolesAsync", - "httpMethod": "GET", - "url": "api/identity/users/assignable-roles", - "supportedVersions": [], - "parametersOnMethod": [], - "parameters": [], - "returnValue": { - "type": "Volo.Abp.Application.Dtos.ListResultDto", - "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" - } - }, - "GetAvailableOrganizationUnitsAsync": { - "uniqueName": "GetAvailableOrganizationUnitsAsync", - "name": "GetAvailableOrganizationUnitsAsync", - "httpMethod": "GET", - "url": "api/identity/users/available-organization-units", - "supportedVersions": [], - "parametersOnMethod": [], - "parameters": [], - "returnValue": { - "type": "Volo.Abp.Application.Dtos.ListResultDto", - "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" - } - }, - "GetAllClaimTypesAsync": { - "uniqueName": "GetAllClaimTypesAsync", - "name": "GetAllClaimTypesAsync", - "httpMethod": "GET", - "url": "api/identity/users/all-claim-types", - "supportedVersions": [], - "parametersOnMethod": [], - "parameters": [], - "returnValue": { - "type": "System.Collections.Generic.List", - "typeSimple": "[Volo.Abp.Identity.ClaimTypeDto]" - } - }, - "GetClaimsAsyncById": { - "uniqueName": "GetClaimsAsyncById", - "name": "GetClaimsAsync", - "httpMethod": "GET", - "url": "api/identity/users/{id}/claims", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "id", - "name": "id", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - } - ], - "returnValue": { - "type": "System.Collections.Generic.List", - "typeSimple": "[Volo.Abp.Identity.IdentityUserClaimDto]" - } - }, - "GetOrganizationUnitsAsyncById": { - "uniqueName": "GetOrganizationUnitsAsyncById", - "name": "GetOrganizationUnitsAsync", - "httpMethod": "GET", - "url": "api/identity/users/{id}/organization-units", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "id", - "name": "id", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - } - ], - "returnValue": { - "type": "System.Collections.Generic.List", - "typeSimple": "[Volo.Abp.Identity.OrganizationUnitDto]" - } - }, - "UpdateRolesAsyncByIdAndInput": { - "uniqueName": "UpdateRolesAsyncByIdAndInput", - "name": "UpdateRolesAsync", - "httpMethod": "PUT", - "url": "api/identity/users/{id}/roles", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - }, - { - "name": "input", - "typeAsString": "Volo.Abp.Identity.IdentityUserUpdateRolesDto, Volo.Abp.Identity.Pro.Application.Contracts", - "type": "Volo.Abp.Identity.IdentityUserUpdateRolesDto", - "typeSimple": "Volo.Abp.Identity.IdentityUserUpdateRolesDto", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "id", - "name": "id", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - }, - { - "nameOnMethod": "input", - "name": "input", - "type": "Volo.Abp.Identity.IdentityUserUpdateRolesDto", - "typeSimple": "Volo.Abp.Identity.IdentityUserUpdateRolesDto", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Body", - "descriptorName": "" - } - ], - "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" - } - }, - "UpdateClaimsAsyncByIdAndInput": { - "uniqueName": "UpdateClaimsAsyncByIdAndInput", - "name": "UpdateClaimsAsync", - "httpMethod": "PUT", - "url": "api/identity/users/{id}/claims", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - }, - { - "name": "input", - "typeAsString": "System.Collections.Generic.List`1[[Volo.Abp.Identity.IdentityUserClaimDto, Volo.Abp.Identity.Pro.Application.Contracts, Version=3.2.0.0, Culture=neutral, PublicKeyToken=null]], System.Private.CoreLib", - "type": "System.Collections.Generic.List", - "typeSimple": "[Volo.Abp.Identity.IdentityUserClaimDto]", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "id", - "name": "id", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - }, - { - "nameOnMethod": "input", - "name": "input", - "type": "System.Collections.Generic.List", - "typeSimple": "[Volo.Abp.Identity.IdentityUserClaimDto]", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Body", - "descriptorName": "" - } - ], - "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" - } - }, - "LockAsyncByIdAndLockoutDuration": { - "uniqueName": "LockAsyncByIdAndLockoutDuration", - "name": "LockAsync", - "httpMethod": "PUT", - "url": "api/identity/users/{id}/lock/{lockoutDuration}", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - }, - { - "name": "lockoutDuration", - "typeAsString": "System.Int32, System.Private.CoreLib", - "type": "System.Int32", - "typeSimple": "number", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "id", - "name": "id", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - }, - { - "nameOnMethod": "lockoutDuration", - "name": "lockoutDuration", - "type": "System.Int32", - "typeSimple": "number", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - } - ], - "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" - } - }, - "UnlockAsyncById": { - "uniqueName": "UnlockAsyncById", - "name": "UnlockAsync", - "httpMethod": "PUT", - "url": "api/identity/users/{id}/unlock", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "id", - "name": "id", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - } - ], - "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" - } - }, - "FindByUsernameAsyncByUsername": { - "uniqueName": "FindByUsernameAsyncByUsername", - "name": "FindByUsernameAsync", - "httpMethod": "GET", - "url": "api/identity/users/by-username/{username}", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "username", - "typeAsString": "System.String, System.Private.CoreLib", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "username", - "name": "username", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - } - ], - "returnValue": { - "type": "Volo.Abp.Identity.IdentityUserDto", - "typeSimple": "Volo.Abp.Identity.IdentityUserDto" - } - }, - "FindByEmailAsyncByEmail": { - "uniqueName": "FindByEmailAsyncByEmail", - "name": "FindByEmailAsync", - "httpMethod": "GET", - "url": "api/identity/users/by-email/{email}", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "email", - "typeAsString": "System.String, System.Private.CoreLib", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "email", - "name": "email", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - } - ], - "returnValue": { - "type": "Volo.Abp.Identity.IdentityUserDto", - "typeSimple": "Volo.Abp.Identity.IdentityUserDto" - } - }, - "GetTwoFactorEnabledAsyncById": { - "uniqueName": "GetTwoFactorEnabledAsyncById", - "name": "GetTwoFactorEnabledAsync", - "httpMethod": "GET", - "url": "api/identity/users/{id}/two-factor-enabled", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "id", - "name": "id", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - } - ], - "returnValue": { - "type": "System.Boolean", - "typeSimple": "boolean" - } - }, - "SetTwoFactorEnabledAsyncByIdAndEnabled": { - "uniqueName": "SetTwoFactorEnabledAsyncByIdAndEnabled", - "name": "SetTwoFactorEnabledAsync", - "httpMethod": "PUT", - "url": "api/identity/users/{id}/two-factor/{enabled}", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - }, - { - "name": "enabled", - "typeAsString": "System.Boolean, System.Private.CoreLib", - "type": "System.Boolean", - "typeSimple": "boolean", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "id", - "name": "id", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - }, - { - "nameOnMethod": "enabled", - "name": "enabled", - "type": "System.Boolean", - "typeSimple": "boolean", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - } - ], - "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" - } - }, - "UpdatePasswordAsyncByIdAndInput": { - "uniqueName": "UpdatePasswordAsyncByIdAndInput", - "name": "UpdatePasswordAsync", - "httpMethod": "PUT", - "url": "api/identity/users/{id}/change-password", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - }, - { - "name": "input", - "typeAsString": "Volo.Abp.Identity.IdentityUserUpdatePasswordInput, Volo.Abp.Identity.Pro.Application.Contracts", - "type": "Volo.Abp.Identity.IdentityUserUpdatePasswordInput", - "typeSimple": "Volo.Abp.Identity.IdentityUserUpdatePasswordInput", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "id", - "name": "id", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - }, - { - "nameOnMethod": "input", - "name": "input", - "type": "Volo.Abp.Identity.IdentityUserUpdatePasswordInput", - "typeSimple": "Volo.Abp.Identity.IdentityUserUpdatePasswordInput", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Body", - "descriptorName": "" - } - ], - "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" - } - } - } - }, - "Volo.Abp.Identity.IdentityUserLookupController": { - "controllerName": "IdentityUserLookup", - "type": "Volo.Abp.Identity.IdentityUserLookupController", - "interfaces": [ - { - "type": "Volo.Abp.Identity.IIdentityUserLookupAppService" - } - ], - "actions": { - "FindByIdAsyncById": { - "uniqueName": "FindByIdAsyncById", - "name": "FindByIdAsync", - "httpMethod": "GET", - "url": "api/identity/users/lookup/{id}", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "id", - "name": "id", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - } - ], - "returnValue": { - "type": "Volo.Abp.Users.UserData", - "typeSimple": "Volo.Abp.Users.UserData" - } - }, - "FindByUserNameAsyncByUserName": { - "uniqueName": "FindByUserNameAsyncByUserName", - "name": "FindByUserNameAsync", - "httpMethod": "GET", - "url": "api/identity/users/lookup/by-username/{userName}", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "userName", - "typeAsString": "System.String, System.Private.CoreLib", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "userName", - "name": "userName", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - } - ], - "returnValue": { - "type": "Volo.Abp.Users.UserData", - "typeSimple": "Volo.Abp.Users.UserData" - } - }, - "SearchAsyncByInput": { - "uniqueName": "SearchAsyncByInput", - "name": "SearchAsync", - "httpMethod": "GET", - "url": "api/identity/users/lookup/search", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "input", - "typeAsString": "Volo.Abp.Identity.UserLookupSearchInputDto, Volo.Abp.Identity.Pro.Application.Contracts", - "type": "Volo.Abp.Identity.UserLookupSearchInputDto", - "typeSimple": "Volo.Abp.Identity.UserLookupSearchInputDto", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "input", - "name": "Sorting", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "Filter", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "SkipCount", - "type": "System.Int32", - "typeSimple": "number", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "MaxResultCount", - "type": "System.Int32", - "typeSimple": "number", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - } - ], - "returnValue": { - "type": "Volo.Abp.Application.Dtos.ListResultDto", - "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" - } - }, - "GetCountAsyncByInput": { - "uniqueName": "GetCountAsyncByInput", - "name": "GetCountAsync", - "httpMethod": "GET", - "url": "api/identity/users/lookup/count", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "input", - "typeAsString": "Volo.Abp.Identity.UserLookupCountInputDto, Volo.Abp.Identity.Pro.Application.Contracts", - "type": "Volo.Abp.Identity.UserLookupCountInputDto", - "typeSimple": "Volo.Abp.Identity.UserLookupCountInputDto", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "input", - "name": "Filter", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - } - ], - "returnValue": { - "type": "System.Int64", - "typeSimple": "number" - } - } - } - }, - "Volo.Abp.Identity.OrganizationUnitController": { - "controllerName": "OrganizationUnit", - "type": "Volo.Abp.Identity.OrganizationUnitController", - "interfaces": [ - { - "type": "Volo.Abp.Identity.IOrganizationUnitAppService" - } - ], - "actions": { - "AddRolesAsyncByIdAndInput": { - "uniqueName": "AddRolesAsyncByIdAndInput", - "name": "AddRolesAsync", - "httpMethod": "PUT", - "url": "api/identity/organization-units/{id}/roles", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - }, - { - "name": "input", - "typeAsString": "Volo.Abp.Identity.OrganizationUnitRoleInput, Volo.Abp.Identity.Pro.Application.Contracts", - "type": "Volo.Abp.Identity.OrganizationUnitRoleInput", - "typeSimple": "Volo.Abp.Identity.OrganizationUnitRoleInput", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "id", - "name": "id", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - }, - { - "nameOnMethod": "input", - "name": "input", - "type": "Volo.Abp.Identity.OrganizationUnitRoleInput", - "typeSimple": "Volo.Abp.Identity.OrganizationUnitRoleInput", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Body", - "descriptorName": "" - } - ], - "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" - } - }, - "AddMembersAsyncByIdAndInput": { - "uniqueName": "AddMembersAsyncByIdAndInput", - "name": "AddMembersAsync", - "httpMethod": "PUT", - "url": "api/identity/organization-units/{id}/members", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - }, - { - "name": "input", - "typeAsString": "Volo.Abp.Identity.OrganizationUnitUserInput, Volo.Abp.Identity.Pro.Application.Contracts", - "type": "Volo.Abp.Identity.OrganizationUnitUserInput", - "typeSimple": "Volo.Abp.Identity.OrganizationUnitUserInput", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "id", - "name": "id", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - }, - { - "nameOnMethod": "input", - "name": "input", - "type": "Volo.Abp.Identity.OrganizationUnitUserInput", - "typeSimple": "Volo.Abp.Identity.OrganizationUnitUserInput", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Body", - "descriptorName": "" - } - ], - "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" - } - }, - "CreateAsyncByInput": { - "uniqueName": "CreateAsyncByInput", - "name": "CreateAsync", - "httpMethod": "POST", - "url": "api/identity/organization-units", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "input", - "typeAsString": "Volo.Abp.Identity.OrganizationUnitCreateDto, Volo.Abp.Identity.Pro.Application.Contracts", - "type": "Volo.Abp.Identity.OrganizationUnitCreateDto", - "typeSimple": "Volo.Abp.Identity.OrganizationUnitCreateDto", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "input", - "name": "input", - "type": "Volo.Abp.Identity.OrganizationUnitCreateDto", - "typeSimple": "Volo.Abp.Identity.OrganizationUnitCreateDto", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Body", - "descriptorName": "" - } - ], - "returnValue": { - "type": "Volo.Abp.Identity.OrganizationUnitWithDetailsDto", - "typeSimple": "Volo.Abp.Identity.OrganizationUnitWithDetailsDto" - } - }, - "DeleteAsyncById": { - "uniqueName": "DeleteAsyncById", - "name": "DeleteAsync", - "httpMethod": "DELETE", - "url": "api/identity/organization-units", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "id", - "name": "id", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "" - } - ], - "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" - } - }, - "GetAsyncById": { - "uniqueName": "GetAsyncById", - "name": "GetAsync", - "httpMethod": "GET", - "url": "api/identity/organization-units/{id}", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "id", - "name": "id", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - } - ], - "returnValue": { - "type": "Volo.Abp.Identity.OrganizationUnitWithDetailsDto", - "typeSimple": "Volo.Abp.Identity.OrganizationUnitWithDetailsDto" - } - }, - "GetListAsyncByInput": { - "uniqueName": "GetListAsyncByInput", - "name": "GetListAsync", - "httpMethod": "GET", - "url": "api/identity/organization-units", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "input", - "typeAsString": "Volo.Abp.Identity.GetOrganizationUnitInput, Volo.Abp.Identity.Pro.Application.Contracts", - "type": "Volo.Abp.Identity.GetOrganizationUnitInput", - "typeSimple": "Volo.Abp.Identity.GetOrganizationUnitInput", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "input", - "name": "Filter", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "Sorting", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "SkipCount", - "type": "System.Int32", - "typeSimple": "number", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "MaxResultCount", - "type": "System.Int32", - "typeSimple": "number", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - } - ], - "returnValue": { - "type": "Volo.Abp.Application.Dtos.PagedResultDto", - "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" - } - }, - "GetListAllAsync": { - "uniqueName": "GetListAllAsync", - "name": "GetListAllAsync", - "httpMethod": "GET", - "url": "api/identity/organization-units/all", - "supportedVersions": [], - "parametersOnMethod": [], - "parameters": [], - "returnValue": { - "type": "Volo.Abp.Application.Dtos.ListResultDto", - "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" - } - }, - "GetRolesAsyncByIdAndInput": { - "uniqueName": "GetRolesAsyncByIdAndInput", - "name": "GetRolesAsync", - "httpMethod": "GET", - "url": "api/identity/organization-units/{id}/roles", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - }, - { - "name": "input", - "typeAsString": "Volo.Abp.Application.Dtos.PagedAndSortedResultRequestDto, Volo.Abp.Ddd.Application.Contracts", - "type": "Volo.Abp.Application.Dtos.PagedAndSortedResultRequestDto", - "typeSimple": "Volo.Abp.Application.Dtos.PagedAndSortedResultRequestDto", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "id", - "name": "id", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - }, - { - "nameOnMethod": "input", - "name": "SkipCount", - "type": "System.Int32", - "typeSimple": "number", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "MaxResultCount", - "type": "System.Int32", - "typeSimple": "number", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "Sorting", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - } - ], - "returnValue": { - "type": "Volo.Abp.Application.Dtos.PagedResultDto", - "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" - } - }, - "GetMembersAsyncByIdAndInput": { - "uniqueName": "GetMembersAsyncByIdAndInput", - "name": "GetMembersAsync", - "httpMethod": "GET", - "url": "api/identity/organization-units/{id}/members", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - }, - { - "name": "input", - "typeAsString": "Volo.Abp.Identity.GetIdentityUsersInput, Volo.Abp.Identity.Pro.Application.Contracts", - "type": "Volo.Abp.Identity.GetIdentityUsersInput", - "typeSimple": "Volo.Abp.Identity.GetIdentityUsersInput", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "id", - "name": "id", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - }, - { - "nameOnMethod": "input", - "name": "Filter", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "Sorting", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "SkipCount", - "type": "System.Int32", - "typeSimple": "number", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "MaxResultCount", - "type": "System.Int32", - "typeSimple": "number", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - } - ], - "returnValue": { - "type": "Volo.Abp.Application.Dtos.PagedResultDto", - "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" - } - }, - "MoveAsyncByIdAndInput": { - "uniqueName": "MoveAsyncByIdAndInput", - "name": "MoveAsync", - "httpMethod": "PUT", - "url": "api/identity/organization-units/{id}/move", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - }, - { - "name": "input", - "typeAsString": "Volo.Abp.Identity.OrganizationUnitMoveInput, Volo.Abp.Identity.Pro.Application.Contracts", - "type": "Volo.Abp.Identity.OrganizationUnitMoveInput", - "typeSimple": "Volo.Abp.Identity.OrganizationUnitMoveInput", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "id", - "name": "id", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - }, - { - "nameOnMethod": "input", - "name": "input", - "type": "Volo.Abp.Identity.OrganizationUnitMoveInput", - "typeSimple": "Volo.Abp.Identity.OrganizationUnitMoveInput", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Body", - "descriptorName": "" - } - ], - "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" - } - }, - "GetAvailableUsersAsyncByInput": { - "uniqueName": "GetAvailableUsersAsyncByInput", - "name": "GetAvailableUsersAsync", - "httpMethod": "GET", - "url": "api/identity/organization-units/available-users", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "input", - "typeAsString": "Volo.Abp.Identity.GetAvailableUsersInput, Volo.Abp.Identity.Pro.Application.Contracts", - "type": "Volo.Abp.Identity.GetAvailableUsersInput", - "typeSimple": "Volo.Abp.Identity.GetAvailableUsersInput", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "input", - "name": "Filter", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "Id", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "Sorting", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "SkipCount", - "type": "System.Int32", - "typeSimple": "number", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "MaxResultCount", - "type": "System.Int32", - "typeSimple": "number", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - } - ], - "returnValue": { - "type": "Volo.Abp.Application.Dtos.PagedResultDto", - "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" - } - }, - "GetAvailableRolesAsyncByInput": { - "uniqueName": "GetAvailableRolesAsyncByInput", - "name": "GetAvailableRolesAsync", - "httpMethod": "GET", - "url": "api/identity/organization-units/available-roles", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "input", - "typeAsString": "Volo.Abp.Identity.GetAvailableRolesInput, Volo.Abp.Identity.Pro.Application.Contracts", - "type": "Volo.Abp.Identity.GetAvailableRolesInput", - "typeSimple": "Volo.Abp.Identity.GetAvailableRolesInput", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "input", - "name": "Filter", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "Id", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "Sorting", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "SkipCount", - "type": "System.Int32", - "typeSimple": "number", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "MaxResultCount", - "type": "System.Int32", - "typeSimple": "number", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - } - ], - "returnValue": { - "type": "Volo.Abp.Application.Dtos.PagedResultDto", - "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" - } - }, - "UpdateAsyncByIdAndInput": { - "uniqueName": "UpdateAsyncByIdAndInput", - "name": "UpdateAsync", - "httpMethod": "PUT", - "url": "api/identity/organization-units/{id}", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - }, - { - "name": "input", - "typeAsString": "Volo.Abp.Identity.OrganizationUnitUpdateDto, Volo.Abp.Identity.Pro.Application.Contracts", - "type": "Volo.Abp.Identity.OrganizationUnitUpdateDto", - "typeSimple": "Volo.Abp.Identity.OrganizationUnitUpdateDto", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "id", - "name": "id", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - }, - { - "nameOnMethod": "input", - "name": "input", - "type": "Volo.Abp.Identity.OrganizationUnitUpdateDto", - "typeSimple": "Volo.Abp.Identity.OrganizationUnitUpdateDto", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Body", - "descriptorName": "" - } - ], - "returnValue": { - "type": "Volo.Abp.Identity.OrganizationUnitWithDetailsDto", - "typeSimple": "Volo.Abp.Identity.OrganizationUnitWithDetailsDto" - } - }, - "RemoveMemberAsyncByIdAndMemberId": { - "uniqueName": "RemoveMemberAsyncByIdAndMemberId", - "name": "RemoveMemberAsync", - "httpMethod": "DELETE", - "url": "api/identity/organization-units/{id}/members/{memberId}", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - }, - { - "name": "memberId", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "id", - "name": "id", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - }, - { - "nameOnMethod": "memberId", - "name": "memberId", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - } - ], - "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" - } - }, - "RemoveRoleAsyncByIdAndRoleId": { - "uniqueName": "RemoveRoleAsyncByIdAndRoleId", - "name": "RemoveRoleAsync", - "httpMethod": "DELETE", - "url": "api/identity/organization-units/{id}/roles/{roleId}", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - }, - { - "name": "roleId", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "id", - "name": "id", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - }, - { - "nameOnMethod": "roleId", - "name": "roleId", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - } - ], - "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" - } - } - } - }, - "Volo.Abp.Identity.ProfileController": { - "controllerName": "Profile", - "type": "Volo.Abp.Identity.ProfileController", - "interfaces": [ - { - "type": "Volo.Abp.Identity.IProfileAppService" - } - ], - "actions": { - "GetAsync": { - "uniqueName": "GetAsync", - "name": "GetAsync", - "httpMethod": "GET", - "url": "api/identity/my-profile", - "supportedVersions": [], - "parametersOnMethod": [], - "parameters": [], - "returnValue": { - "type": "Volo.Abp.Identity.ProfileDto", - "typeSimple": "Volo.Abp.Identity.ProfileDto" - } - }, - "UpdateAsyncByInput": { - "uniqueName": "UpdateAsyncByInput", - "name": "UpdateAsync", - "httpMethod": "PUT", - "url": "api/identity/my-profile", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "input", - "typeAsString": "Volo.Abp.Identity.UpdateProfileDto, Volo.Abp.Identity.Pro.Application.Contracts", - "type": "Volo.Abp.Identity.UpdateProfileDto", - "typeSimple": "Volo.Abp.Identity.UpdateProfileDto", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "input", - "name": "input", - "type": "Volo.Abp.Identity.UpdateProfileDto", - "typeSimple": "Volo.Abp.Identity.UpdateProfileDto", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Body", - "descriptorName": "" - } - ], - "returnValue": { - "type": "Volo.Abp.Identity.ProfileDto", - "typeSimple": "Volo.Abp.Identity.ProfileDto" - } - }, - "ChangePasswordAsyncByInput": { - "uniqueName": "ChangePasswordAsyncByInput", - "name": "ChangePasswordAsync", - "httpMethod": "POST", - "url": "api/identity/my-profile/change-password", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "input", - "typeAsString": "Volo.Abp.Identity.ChangePasswordInput, Volo.Abp.Identity.Pro.Application.Contracts", - "type": "Volo.Abp.Identity.ChangePasswordInput", - "typeSimple": "Volo.Abp.Identity.ChangePasswordInput", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "input", - "name": "input", - "type": "Volo.Abp.Identity.ChangePasswordInput", - "typeSimple": "Volo.Abp.Identity.ChangePasswordInput", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Body", - "descriptorName": "" - } - ], - "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" - } - }, - "GetTwoFactorEnabledAsync": { - "uniqueName": "GetTwoFactorEnabledAsync", - "name": "GetTwoFactorEnabledAsync", - "httpMethod": "GET", - "url": "api/identity/my-profile/two-factor-enabled", - "supportedVersions": [], - "parametersOnMethod": [], - "parameters": [], - "returnValue": { - "type": "System.Boolean", - "typeSimple": "boolean" - } - }, - "SetTwoFactorEnabledAsyncByEnabled": { - "uniqueName": "SetTwoFactorEnabledAsyncByEnabled", - "name": "SetTwoFactorEnabledAsync", - "httpMethod": "POST", - "url": "api/identity/my-profile/set-two-factor-enabled", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "enabled", - "typeAsString": "System.Boolean, System.Private.CoreLib", - "type": "System.Boolean", - "typeSimple": "boolean", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "enabled", - "name": "enabled", - "type": "System.Boolean", - "typeSimple": "boolean", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "" - } - ], - "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" - } - } - } - } - } - }, - "account": { - "rootPath": "account", - "remoteServiceName": "AbpAccountPublic", - "controllers": { - "Volo.Abp.Account.Public.Web.Areas.Account.Controllers.AccountController": { - "controllerName": "Account", - "type": "Volo.Abp.Account.Public.Web.Areas.Account.Controllers.AccountController", - "interfaces": [], - "actions": { - "LoginByLogin": { - "uniqueName": "LoginByLogin", - "name": "Login", - "httpMethod": "POST", - "url": "api/account/login", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "login", - "typeAsString": "Volo.Abp.Account.Public.Web.Areas.Account.Controllers.Models.UserLoginInfo, Volo.Abp.Account.Pro.Public.Web", - "type": "Volo.Abp.Account.Public.Web.Areas.Account.Controllers.Models.UserLoginInfo", - "typeSimple": "Volo.Abp.Account.Public.Web.Areas.Account.Controllers.Models.UserLoginInfo", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "login", - "name": "login", - "type": "Volo.Abp.Account.Public.Web.Areas.Account.Controllers.Models.UserLoginInfo", - "typeSimple": "Volo.Abp.Account.Public.Web.Areas.Account.Controllers.Models.UserLoginInfo", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Body", - "descriptorName": "" - } - ], - "returnValue": { - "type": "Volo.Abp.Account.Public.Web.Areas.Account.Controllers.Models.AbpLoginResult", - "typeSimple": "Volo.Abp.Account.Public.Web.Areas.Account.Controllers.Models.AbpLoginResult" - } - }, - "Logout": { - "uniqueName": "Logout", - "name": "Logout", - "httpMethod": "GET", - "url": "api/account/logout", - "supportedVersions": [], - "parametersOnMethod": [], - "parameters": [], - "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" - } - }, - "CheckPasswordByLogin": { - "uniqueName": "CheckPasswordByLogin", - "name": "CheckPassword", - "httpMethod": "POST", - "url": "api/account/checkPassword", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "login", - "typeAsString": "Volo.Abp.Account.Public.Web.Areas.Account.Controllers.Models.UserLoginInfo, Volo.Abp.Account.Pro.Public.Web", - "type": "Volo.Abp.Account.Public.Web.Areas.Account.Controllers.Models.UserLoginInfo", - "typeSimple": "Volo.Abp.Account.Public.Web.Areas.Account.Controllers.Models.UserLoginInfo", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "login", - "name": "login", - "type": "Volo.Abp.Account.Public.Web.Areas.Account.Controllers.Models.UserLoginInfo", - "typeSimple": "Volo.Abp.Account.Public.Web.Areas.Account.Controllers.Models.UserLoginInfo", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Body", - "descriptorName": "" - } - ], - "returnValue": { - "type": "Volo.Abp.Account.Public.Web.Areas.Account.Controllers.Models.AbpLoginResult", - "typeSimple": "Volo.Abp.Account.Public.Web.Areas.Account.Controllers.Models.AbpLoginResult" - } - } - } - }, - "Volo.Abp.Account.AccountController": { - "controllerName": "Account", - "type": "Volo.Abp.Account.AccountController", - "interfaces": [ - { - "type": "Volo.Abp.Account.IAccountAppService" - } - ], - "actions": { - "RegisterAsyncByInput": { - "uniqueName": "RegisterAsyncByInput", - "name": "RegisterAsync", - "httpMethod": "POST", - "url": "api/account/register", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "input", - "typeAsString": "Volo.Abp.Account.RegisterDto, Volo.Abp.Account.Pro.Public.Application.Contracts", - "type": "Volo.Abp.Account.RegisterDto", - "typeSimple": "Volo.Abp.Account.RegisterDto", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "input", - "name": "input", - "type": "Volo.Abp.Account.RegisterDto", - "typeSimple": "Volo.Abp.Account.RegisterDto", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Body", - "descriptorName": "" - } - ], - "returnValue": { - "type": "Volo.Abp.Identity.IdentityUserDto", - "typeSimple": "Volo.Abp.Identity.IdentityUserDto" - } - }, - "SendPasswordResetCodeAsyncByInput": { - "uniqueName": "SendPasswordResetCodeAsyncByInput", - "name": "SendPasswordResetCodeAsync", - "httpMethod": "POST", - "url": "api/account/send-password-reset-code", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "input", - "typeAsString": "Volo.Abp.Account.SendPasswordResetCodeDto, Volo.Abp.Account.Pro.Public.Application.Contracts", - "type": "Volo.Abp.Account.SendPasswordResetCodeDto", - "typeSimple": "Volo.Abp.Account.SendPasswordResetCodeDto", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "input", - "name": "input", - "type": "Volo.Abp.Account.SendPasswordResetCodeDto", - "typeSimple": "Volo.Abp.Account.SendPasswordResetCodeDto", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Body", - "descriptorName": "" - } - ], - "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" - } - }, - "ResetPasswordAsyncByInput": { - "uniqueName": "ResetPasswordAsyncByInput", - "name": "ResetPasswordAsync", - "httpMethod": "POST", - "url": "api/account/reset-password", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "input", - "typeAsString": "Volo.Abp.Account.ResetPasswordDto, Volo.Abp.Account.Pro.Public.Application.Contracts", - "type": "Volo.Abp.Account.ResetPasswordDto", - "typeSimple": "Volo.Abp.Account.ResetPasswordDto", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "input", - "name": "input", - "type": "Volo.Abp.Account.ResetPasswordDto", - "typeSimple": "Volo.Abp.Account.ResetPasswordDto", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Body", - "descriptorName": "" - } - ], - "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" - } - }, - "SendPhoneNumberConfirmationTokenAsync": { - "uniqueName": "SendPhoneNumberConfirmationTokenAsync", - "name": "SendPhoneNumberConfirmationTokenAsync", - "httpMethod": "POST", - "url": "api/account/send-phone-number-confirmation-token", - "supportedVersions": [], - "parametersOnMethod": [], - "parameters": [], - "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" - } - }, - "SendEmailConfirmationTokenAsyncByInput": { - "uniqueName": "SendEmailConfirmationTokenAsyncByInput", - "name": "SendEmailConfirmationTokenAsync", - "httpMethod": "POST", - "url": "api/account/send-email-confirmation-token", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "input", - "typeAsString": "Volo.Abp.Account.SendEmailConfirmationTokenDto, Volo.Abp.Account.Pro.Public.Application.Contracts", - "type": "Volo.Abp.Account.SendEmailConfirmationTokenDto", - "typeSimple": "Volo.Abp.Account.SendEmailConfirmationTokenDto", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "input", - "name": "input", - "type": "Volo.Abp.Account.SendEmailConfirmationTokenDto", - "typeSimple": "Volo.Abp.Account.SendEmailConfirmationTokenDto", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Body", - "descriptorName": "" - } - ], - "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" - } - }, - "ConfirmPhoneNumberAsyncByInput": { - "uniqueName": "ConfirmPhoneNumberAsyncByInput", - "name": "ConfirmPhoneNumberAsync", - "httpMethod": "POST", - "url": "api/account/confirm-phone-number", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "input", - "typeAsString": "Volo.Abp.Account.ConfirmPhoneNumberInput, Volo.Abp.Account.Pro.Public.Application.Contracts", - "type": "Volo.Abp.Account.ConfirmPhoneNumberInput", - "typeSimple": "Volo.Abp.Account.ConfirmPhoneNumberInput", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "input", - "name": "input", - "type": "Volo.Abp.Account.ConfirmPhoneNumberInput", - "typeSimple": "Volo.Abp.Account.ConfirmPhoneNumberInput", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Body", - "descriptorName": "" - } - ], - "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" - } - }, - "ConfirmEmailAsyncByInput": { - "uniqueName": "ConfirmEmailAsyncByInput", - "name": "ConfirmEmailAsync", - "httpMethod": "POST", - "url": "api/account/confirm-email", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "input", - "typeAsString": "Volo.Abp.Account.ConfirmEmailInput, Volo.Abp.Account.Pro.Public.Application.Contracts", - "type": "Volo.Abp.Account.ConfirmEmailInput", - "typeSimple": "Volo.Abp.Account.ConfirmEmailInput", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "input", - "name": "input", - "type": "Volo.Abp.Account.ConfirmEmailInput", - "typeSimple": "Volo.Abp.Account.ConfirmEmailInput", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Body", - "descriptorName": "" - } - ], - "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" - } - }, - "SetProfilePictureAsyncByInput": { - "uniqueName": "SetProfilePictureAsyncByInput", - "name": "SetProfilePictureAsync", - "httpMethod": "POST", - "url": "api/account/profile-picture", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "input", - "typeAsString": "Volo.Abp.Account.ProfilePictureInput, Volo.Abp.Account.Pro.Public.Application.Contracts", - "type": "Volo.Abp.Account.ProfilePictureInput", - "typeSimple": "Volo.Abp.Account.ProfilePictureInput", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "input", - "name": "input", - "type": "Volo.Abp.Account.ProfilePictureInput", - "typeSimple": "Volo.Abp.Account.ProfilePictureInput", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Body", - "descriptorName": "" - } - ], - "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" - } - }, - "GetProfilePictureAsyncById": { - "uniqueName": "GetProfilePictureAsyncById", - "name": "GetProfilePictureAsync", - "httpMethod": "GET", - "url": "api/account/profile-picture/{id}", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "id", - "name": "id", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - } - ], - "returnValue": { - "type": "Volo.Abp.Account.ProfilePictureSourceDto", - "typeSimple": "Volo.Abp.Account.ProfilePictureSourceDto" - } - }, - "UploadProfilePictureFileAsyncByImage": { - "uniqueName": "UploadProfilePictureFileAsyncByImage", - "name": "UploadProfilePictureFileAsync", - "httpMethod": "POST", - "url": "api/account/profile-picture-file", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "image", - "typeAsString": "Microsoft.AspNetCore.Http.IFormFile, Microsoft.AspNetCore.Http.Features", - "type": "Microsoft.AspNetCore.Http.IFormFile", - "typeSimple": "Microsoft.AspNetCore.Http.IFormFile", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "image", - "name": "image", - "type": "Microsoft.AspNetCore.Http.IFormFile", - "typeSimple": "Microsoft.AspNetCore.Http.IFormFile", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "FormFile", - "descriptorName": "" - } - ], - "returnValue": { - "type": "Microsoft.AspNetCore.Mvc.IActionResult", - "typeSimple": "Microsoft.AspNetCore.Mvc.IActionResult" - } - }, - "GetProfilePictureFileAsyncById": { - "uniqueName": "GetProfilePictureFileAsyncById", - "name": "GetProfilePictureFileAsync", - "httpMethod": "GET", - "url": "api/account/profile-picture-file/{id}", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "id", - "name": "id", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - } - ], - "returnValue": { - "type": "Microsoft.AspNetCore.Mvc.IActionResult", - "typeSimple": "Microsoft.AspNetCore.Mvc.IActionResult" - } - } - } - } - } - }, - "abp": { - "rootPath": "abp", - "remoteServiceName": "abp", - "controllers": { - "Pages.Abp.MultiTenancy.AbpTenantController": { - "controllerName": "AbpTenant", - "type": "Pages.Abp.MultiTenancy.AbpTenantController", - "interfaces": [ - { - "type": "Volo.Abp.AspNetCore.Mvc.MultiTenancy.IAbpTenantAppService" - } - ], - "actions": { - "FindTenantByNameAsyncByName": { - "uniqueName": "FindTenantByNameAsyncByName", - "name": "FindTenantByNameAsync", - "httpMethod": "GET", - "url": "api/abp/multi-tenancy/tenants/by-name/{name}", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "name", - "typeAsString": "System.String, System.Private.CoreLib", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "name", - "name": "name", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - } - ], - "returnValue": { - "type": "Volo.Abp.AspNetCore.Mvc.MultiTenancy.FindTenantResultDto", - "typeSimple": "Volo.Abp.AspNetCore.Mvc.MultiTenancy.FindTenantResultDto" - } - }, - "FindTenantByIdAsyncById": { - "uniqueName": "FindTenantByIdAsyncById", - "name": "FindTenantByIdAsync", - "httpMethod": "GET", - "url": "api/abp/multi-tenancy/tenants/by-id/{id}", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "id", - "name": "id", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - } - ], - "returnValue": { - "type": "Volo.Abp.AspNetCore.Mvc.MultiTenancy.FindTenantResultDto", - "typeSimple": "Volo.Abp.AspNetCore.Mvc.MultiTenancy.FindTenantResultDto" - } - } - } - }, - "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationController": { - "controllerName": "AbpApplicationConfiguration", - "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationController", - "interfaces": [ - { - "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.IAbpApplicationConfigurationAppService" - } - ], - "actions": { - "GetAsync": { - "uniqueName": "GetAsync", - "name": "GetAsync", - "httpMethod": "GET", - "url": "api/abp/application-configuration", - "supportedVersions": [], - "parametersOnMethod": [], - "parameters": [], - "returnValue": { - "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationConfigurationDto", - "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationConfigurationDto" - } - } - } - }, - "Volo.Abp.AspNetCore.Mvc.ApiExploring.AbpApiDefinitionController": { - "controllerName": "AbpApiDefinition", - "type": "Volo.Abp.AspNetCore.Mvc.ApiExploring.AbpApiDefinitionController", - "interfaces": [], - "actions": { - "GetByModel": { - "uniqueName": "GetByModel", - "name": "Get", - "httpMethod": "GET", - "url": "api/abp/api-definition", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "model", - "typeAsString": "Volo.Abp.Http.Modeling.ApplicationApiDescriptionModelRequestDto, Volo.Abp.Http", - "type": "Volo.Abp.Http.Modeling.ApplicationApiDescriptionModelRequestDto", - "typeSimple": "Volo.Abp.Http.Modeling.ApplicationApiDescriptionModelRequestDto", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "model", - "name": "IncludeTypes", - "type": "System.Boolean", - "typeSimple": "boolean", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "model" - } - ], - "returnValue": { - "type": "Volo.Abp.Http.Modeling.ApplicationApiDescriptionModel", - "typeSimple": "Volo.Abp.Http.Modeling.ApplicationApiDescriptionModel" - } - } - } - } - } - } - }, - "types": { - "Volo.Abp.Account.AccountSettingsDto": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "IsSelfRegistrationEnabled", - "type": "System.Boolean", - "typeSimple": "boolean" - }, - { - "name": "EnableLocalLogin", - "type": "System.Boolean", - "typeSimple": "boolean" - } - ] - }, - "Volo.Abp.Account.AccountLdapSettingsDto": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "EnableLdapLogin", - "type": "System.Boolean", - "typeSimple": "boolean" - }, - { - "name": "LdapServerHost", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "LdapServerPort", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "LdapBaseDc", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "LdapUserName", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "LdapPassword", - "type": "System.String", - "typeSimple": "string" - } - ] - }, - "Volo.Abp.Account.AccountTwoFactorSettingsDto": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "TwoFactorBehaviour", - "type": "Volo.Abp.Identity.Features.IdentityTwoFactorBehaviour", - "typeSimple": "Volo.Abp.Identity.Features.IdentityTwoFactorBehaviour" - }, - { - "name": "IsRememberBrowserEnabled", - "type": "System.Boolean", - "typeSimple": "boolean" - }, - { - "name": "UsersCanChange", - "type": "System.Boolean", - "typeSimple": "boolean" - } - ] - }, - "Volo.Abp.Identity.Features.IdentityTwoFactorBehaviour": { - "baseType": "System.Enum", - "isEnum": true, - "enumNames": [ - "Optional", - "Disabled", - "Forced" - ], - "enumValues": [ - 0, - 1, - 2 - ], - "genericArguments": null, - "properties": null - }, - "Volo.Abp.Account.Public.Web.Areas.Account.Controllers.Models.UserLoginInfo": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "UserNameOrEmailAddress", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Password", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "RememberMe", - "type": "System.Boolean", - "typeSimple": "boolean" - }, - { - "name": "TenanId", - "type": "System.Guid?", - "typeSimple": "string?" - } - ] - }, - "Volo.Abp.Account.Public.Web.Areas.Account.Controllers.Models.AbpLoginResult": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "Result", - "type": "Volo.Abp.Account.Public.Web.Areas.Account.Controllers.Models.LoginResultType", - "typeSimple": "Volo.Abp.Account.Public.Web.Areas.Account.Controllers.Models.LoginResultType" - }, - { - "name": "Description", - "type": "System.String", - "typeSimple": "string" - } - ] - }, - "Volo.Abp.Account.Public.Web.Areas.Account.Controllers.Models.LoginResultType": { - "baseType": "System.Enum", - "isEnum": true, - "enumNames": [ - "Success", - "InvalidUserNameOrPassword", - "NotAllowed", - "LockedOut", - "RequiresTwoFactor" - ], - "enumValues": [ - 1, - 2, - 3, - 4, - 5 - ], - "genericArguments": null, - "properties": null - }, - "Volo.Abp.Account.RegisterDto": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "UserName", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "EmailAddress", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Password", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "AppName", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "ReturnUrl", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "ReturnUrlHash", - "type": "System.String", - "typeSimple": "string" - } - ] - }, - "Volo.Abp.Identity.IdentityUserDto": { - "baseType": "Volo.Abp.Application.Dtos.ExtensibleEntityDto", - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "TenantId", - "type": "System.Guid?", - "typeSimple": "string?" - }, - { - "name": "UserName", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Email", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Name", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Surname", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "EmailConfirmed", - "type": "System.Boolean", - "typeSimple": "boolean" - }, - { - "name": "PhoneNumber", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "PhoneNumberConfirmed", - "type": "System.Boolean", - "typeSimple": "boolean" - }, - { - "name": "SupportTwoFactor", - "type": "System.Boolean", - "typeSimple": "boolean" - }, - { - "name": "LockoutEnabled", - "type": "System.Boolean", - "typeSimple": "boolean" - }, - { - "name": "IsLockedOut", - "type": "System.Boolean", - "typeSimple": "boolean" - }, - { - "name": "ConcurrencyStamp", - "type": "System.String", - "typeSimple": "string" - } - ] - }, - "Volo.Abp.Application.Dtos.ExtensibleEntityDto": { - "baseType": "Volo.Abp.ObjectExtending.ExtensibleObject", - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": [ - "TKey" - ], - "properties": [ - { - "name": "Id", - "type": "TKey", - "typeSimple": "TKey" - } - ] - }, - "Volo.Abp.ObjectExtending.ExtensibleObject": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "ExtraProperties", - "type": "{System.String:System.Object}", - "typeSimple": "{string:object}" - } - ] - }, - "Volo.Abp.Account.SendPasswordResetCodeDto": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "Email", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "AppName", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "ReturnUrl", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "ReturnUrlHash", - "type": "System.String", - "typeSimple": "string" - } - ] - }, - "Volo.Abp.Account.ResetPasswordDto": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "UserId", - "type": "System.Guid", - "typeSimple": "string" - }, - { - "name": "ResetToken", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Password", - "type": "System.String", - "typeSimple": "string" - } - ] - }, - "Volo.Abp.Account.SendEmailConfirmationTokenDto": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "AppName", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Email", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "ReturnUrl", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "ReturnUrlHash", - "type": "System.String", - "typeSimple": "string" - } - ] - }, - "Volo.Abp.Account.ConfirmPhoneNumberInput": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "Token", - "type": "System.String", - "typeSimple": "string" - } - ] - }, - "Volo.Abp.Account.ConfirmEmailInput": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "UserId", - "type": "System.Guid", - "typeSimple": "string" - }, - { - "name": "Token", - "type": "System.String", - "typeSimple": "string" - } - ] - }, - "Volo.Abp.Account.ProfilePictureInput": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "Type", - "type": "Volo.Abp.Account.ProfilePictureType", - "typeSimple": "Volo.Abp.Account.ProfilePictureType" - }, - { - "name": "ImageContent", - "type": "[System.Byte]", - "typeSimple": "[number]" - } - ] - }, - "Volo.Abp.Account.ProfilePictureType": { - "baseType": "System.Enum", - "isEnum": true, - "enumNames": [ - "None", - "Gravatar", - "Image" - ], - "enumValues": [ - 0, - 1, - 2 - ], - "genericArguments": null, - "properties": null - }, - "Volo.Abp.Account.ProfilePictureSourceDto": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "Type", - "type": "Volo.Abp.Account.ProfilePictureType", - "typeSimple": "Volo.Abp.Account.ProfilePictureType" - }, - { - "name": "Source", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "FileContent", - "type": "[System.Byte]", - "typeSimple": "[number]" - } - ] - }, - "Microsoft.AspNetCore.Http.IFormFile": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "ContentType", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "ContentDisposition", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Headers", - "type": "{System.String:[System.String]}", - "typeSimple": "{string:[string]}" - }, - { - "name": "Length", - "type": "System.Int64", - "typeSimple": "number" - }, - { - "name": "Name", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "FileName", - "type": "System.String", - "typeSimple": "string" - } - ] - }, - "Microsoft.AspNetCore.Mvc.IActionResult": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [] - }, - "Volo.Abp.AspNetCore.Mvc.MultiTenancy.FindTenantResultDto": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "Success", - "type": "System.Boolean", - "typeSimple": "boolean" - }, - { - "name": "TenantId", - "type": "System.Guid?", - "typeSimple": "string?" - }, - { - "name": "Name", - "type": "System.String", - "typeSimple": "string" - } - ] - }, - "Volo.Abp.AuditLogging.GetAuditLogListDto": { - "baseType": "Volo.Abp.Application.Dtos.PagedAndSortedResultRequestDto", - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "Url", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "UserName", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "ApplicationName", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "CorrelationId", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "HttpMethod", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "HttpStatusCode", - "type": "System.Net.HttpStatusCode?", - "typeSimple": "System.Net.HttpStatusCode?" - }, - { - "name": "MaxExecutionDuration", - "type": "System.Int32?", - "typeSimple": "number?" - }, - { - "name": "MinExecutionDuration", - "type": "System.Int32?", - "typeSimple": "number?" - }, - { - "name": "HasException", - "type": "System.Boolean?", - "typeSimple": "boolean?" - } - ] - }, - "Volo.Abp.Application.Dtos.PagedAndSortedResultRequestDto": { - "baseType": "Volo.Abp.Application.Dtos.PagedResultRequestDto", - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "Sorting", - "type": "System.String", - "typeSimple": "string" - } - ] - }, - "Volo.Abp.Application.Dtos.PagedResultRequestDto": { - "baseType": "Volo.Abp.Application.Dtos.LimitedResultRequestDto", - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "SkipCount", - "type": "System.Int32", - "typeSimple": "number" - } - ] - }, - "Volo.Abp.Application.Dtos.LimitedResultRequestDto": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "DefaultMaxResultCount", - "type": "System.Int32", - "typeSimple": "number" - }, - { - "name": "MaxMaxResultCount", - "type": "System.Int32", - "typeSimple": "number" - }, - { - "name": "MaxResultCount", - "type": "System.Int32", - "typeSimple": "number" - } - ] - }, - "System.Nullable": { - "baseType": "System.ValueType", - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": [ - "T" - ], - "properties": [ - { - "name": "HasValue", - "type": "System.Boolean", - "typeSimple": "boolean" - }, - { - "name": "Value", - "type": "T", - "typeSimple": "T" - } - ] - }, - "System.Net.HttpStatusCode": { - "baseType": "System.Enum", - "isEnum": true, - "enumNames": [ - "Continue", - "SwitchingProtocols", - "Processing", - "EarlyHints", - "OK", - "Created", - "Accepted", - "NonAuthoritativeInformation", - "NoContent", - "ResetContent", - "PartialContent", - "MultiStatus", - "AlreadyReported", - "IMUsed", - "MultipleChoices", - "Ambiguous", - "MovedPermanently", - "Moved", - "Found", - "Redirect", - "SeeOther", - "RedirectMethod", - "NotModified", - "UseProxy", - "Unused", - "TemporaryRedirect", - "RedirectKeepVerb", - "PermanentRedirect", - "BadRequest", - "Unauthorized", - "PaymentRequired", - "Forbidden", - "NotFound", - "MethodNotAllowed", - "NotAcceptable", - "ProxyAuthenticationRequired", - "RequestTimeout", - "Conflict", - "Gone", - "LengthRequired", - "PreconditionFailed", - "RequestEntityTooLarge", - "RequestUriTooLong", - "UnsupportedMediaType", - "RequestedRangeNotSatisfiable", - "ExpectationFailed", - "MisdirectedRequest", - "UnprocessableEntity", - "Locked", - "FailedDependency", - "UpgradeRequired", - "PreconditionRequired", - "TooManyRequests", - "RequestHeaderFieldsTooLarge", - "UnavailableForLegalReasons", - "InternalServerError", - "NotImplemented", - "BadGateway", - "ServiceUnavailable", - "GatewayTimeout", - "HttpVersionNotSupported", - "VariantAlsoNegotiates", - "InsufficientStorage", - "LoopDetected", - "NotExtended", - "NetworkAuthenticationRequired" - ], - "enumValues": [ - 100, - 101, - 102, - 103, - 200, - 201, - 202, - 203, - 204, - 205, - 206, - 207, - 208, - 226, - 300, - 300, - 301, - 301, - 302, - 302, - 303, - 303, - 304, - 305, - 306, - 307, - 307, - 308, - 400, - 401, - 402, - 403, - 404, - 405, - 406, - 407, - 408, - 409, - 410, - 411, - 412, - 413, - 414, - 415, - 416, - 417, - 421, - 422, - 423, - 424, - 426, - 428, - 429, - 431, - 451, - 500, - 501, - 502, - 503, - 504, - 505, - 506, - 507, - 508, - 510, - 511 - ], - "genericArguments": null, - "properties": null - }, - "Volo.Abp.Application.Dtos.PagedResultDto": { - "baseType": "Volo.Abp.Application.Dtos.ListResultDto", - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": [ - "T" - ], - "properties": [ - { - "name": "TotalCount", - "type": "System.Int64", - "typeSimple": "number" - } - ] - }, - "Volo.Abp.Application.Dtos.ListResultDto": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": [ - "T" - ], - "properties": [ - { - "name": "Items", - "type": "[T]", - "typeSimple": "[T]" - } - ] - }, - "Volo.Abp.AuditLogging.AuditLogDto": { - "baseType": "Volo.Abp.Application.Dtos.ExtensibleEntityDto", - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "UserId", - "type": "System.Guid?", - "typeSimple": "string?" - }, - { - "name": "UserName", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "TenantId", - "type": "System.Guid?", - "typeSimple": "string?" - }, - { - "name": "ImpersonatorUserId", - "type": "System.Guid?", - "typeSimple": "string?" - }, - { - "name": "ImpersonatorTenantId", - "type": "System.Guid?", - "typeSimple": "string?" - }, - { - "name": "ExecutionTime", - "type": "System.DateTime", - "typeSimple": "string" - }, - { - "name": "ExecutionDuration", - "type": "System.Int32", - "typeSimple": "number" - }, - { - "name": "ClientIpAddress", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "ClientName", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "BrowserInfo", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "HttpMethod", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Url", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Exceptions", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Comments", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "HttpStatusCode", - "type": "System.Int32?", - "typeSimple": "number?" - }, - { - "name": "ApplicationName", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "CorrelationId", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "EntityChanges", - "type": "[Volo.Abp.AuditLogging.EntityChangeDto]", - "typeSimple": "[Volo.Abp.AuditLogging.EntityChangeDto]" - }, - { - "name": "Actions", - "type": "[Volo.Abp.AuditLogging.AuditLogActionDto]", - "typeSimple": "[Volo.Abp.AuditLogging.AuditLogActionDto]" - } - ] - }, - "Volo.Abp.AuditLogging.EntityChangeDto": { - "baseType": "Volo.Abp.Application.Dtos.ExtensibleEntityDto", - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "AuditLogId", - "type": "System.Guid", - "typeSimple": "string" - }, - { - "name": "TenantId", - "type": "System.Guid?", - "typeSimple": "string?" - }, - { - "name": "ChangeTime", - "type": "System.DateTime", - "typeSimple": "string" - }, - { - "name": "ChangeType", - "type": "Volo.Abp.Auditing.EntityChangeType", - "typeSimple": "Volo.Abp.Auditing.EntityChangeType" - }, - { - "name": "EntityId", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "EntityTypeFullName", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "PropertyChanges", - "type": "[Volo.Abp.AuditLogging.EntityPropertyChangeDto]", - "typeSimple": "[Volo.Abp.AuditLogging.EntityPropertyChangeDto]" - } - ] - }, - "Volo.Abp.Auditing.EntityChangeType": { - "baseType": "System.Enum", - "isEnum": true, - "enumNames": [ - "Created", - "Updated", - "Deleted" - ], - "enumValues": [ - 0, - 1, - 2 - ], - "genericArguments": null, - "properties": null - }, - "Volo.Abp.AuditLogging.EntityPropertyChangeDto": { - "baseType": "Volo.Abp.Application.Dtos.EntityDto", - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "TenantId", - "type": "System.Guid?", - "typeSimple": "string?" - }, - { - "name": "EntityChangeId", - "type": "System.Guid", - "typeSimple": "string" - }, - { - "name": "NewValue", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "OriginalValue", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "PropertyName", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "PropertyTypeFullName", - "type": "System.String", - "typeSimple": "string" - } - ] - }, - "Volo.Abp.Application.Dtos.EntityDto": { - "baseType": "Volo.Abp.Application.Dtos.EntityDto", - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": [ - "TKey" - ], - "properties": [ - { - "name": "Id", - "type": "TKey", - "typeSimple": "TKey" - } - ] - }, - "Volo.Abp.Application.Dtos.EntityDto": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [] - }, - "Volo.Abp.AuditLogging.AuditLogActionDto": { - "baseType": "Volo.Abp.Application.Dtos.ExtensibleEntityDto", - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "TenantId", - "type": "System.Guid?", - "typeSimple": "string?" - }, - { - "name": "AuditLogId", - "type": "System.Guid", - "typeSimple": "string" - }, - { - "name": "ServiceName", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "MethodName", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Parameters", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "ExecutionTime", - "type": "System.DateTime", - "typeSimple": "string" - }, - { - "name": "ExecutionDuration", - "type": "System.Int32", - "typeSimple": "number" - } - ] - }, - "Volo.Abp.AuditLogging.GetErrorRateFilter": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "StartDate", - "type": "System.DateTime", - "typeSimple": "string" - }, - { - "name": "EndDate", - "type": "System.DateTime", - "typeSimple": "string" - } - ] - }, - "Volo.Abp.AuditLogging.GetErrorRateOutput": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "Data", - "type": "{System.String:System.Int64}", - "typeSimple": "{string:number}" - } - ] - }, - "Volo.Abp.AuditLogging.GetAverageExecutionDurationPerDayInput": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "StartDate", - "type": "System.DateTime", - "typeSimple": "string" - }, - { - "name": "EndDate", - "type": "System.DateTime", - "typeSimple": "string" - } - ] - }, - "Volo.Abp.AuditLogging.GetAverageExecutionDurationPerDayOutput": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "Data", - "type": "{System.String:System.Double}", - "typeSimple": "{string:number}" - } - ] - }, - "Volo.Abp.AuditLogging.GetEntityChangesDto": { - "baseType": "Volo.Abp.Application.Dtos.PagedAndSortedResultRequestDto", - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "AuditLogId", - "type": "System.Guid?", - "typeSimple": "string?" - }, - { - "name": "EntityChangeType", - "type": "Volo.Abp.Auditing.EntityChangeType?", - "typeSimple": "Volo.Abp.Auditing.EntityChangeType?" - }, - { - "name": "EntityId", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "EntityTypeFullName", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "StartDate", - "type": "System.DateTime?", - "typeSimple": "string?" - }, - { - "name": "EndDate", - "type": "System.DateTime?", - "typeSimple": "string?" - } - ] - }, - "Volo.Abp.AuditLogging.EntityChangeFilter": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "EntityId", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "EntityTypeFullName", - "type": "System.String", - "typeSimple": "string" - } - ] - }, - "Volo.Abp.AuditLogging.EntityChangeWithUsernameDto": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "EntityChange", - "type": "Volo.Abp.AuditLogging.EntityChangeDto", - "typeSimple": "Volo.Abp.AuditLogging.EntityChangeDto" - }, - { - "name": "UserName", - "type": "System.String", - "typeSimple": "string" - } - ] - }, - "Volo.Abp.Identity.GetIdentityClaimTypesInput": { - "baseType": "Volo.Abp.Application.Dtos.PagedAndSortedResultRequestDto", - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "Filter", - "type": "System.String", - "typeSimple": "string" - } - ] - }, - "Volo.Abp.Identity.ClaimTypeDto": { - "baseType": "Volo.Abp.Application.Dtos.ExtensibleEntityDto", - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "Name", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Required", - "type": "System.Boolean", - "typeSimple": "boolean" - }, - { - "name": "IsStatic", - "type": "System.Boolean", - "typeSimple": "boolean" - }, - { - "name": "Regex", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "RegexDescription", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Description", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "ValueType", - "type": "Volo.Abp.Identity.IdentityClaimValueType", - "typeSimple": "Volo.Abp.Identity.IdentityClaimValueType" - }, - { - "name": "ValueTypeAsString", - "type": "System.String", - "typeSimple": "string" - } - ] - }, - "Volo.Abp.Identity.IdentityClaimValueType": { - "baseType": "System.Enum", - "isEnum": true, - "enumNames": [ - "String", - "Int", - "Boolean", - "DateTime" - ], - "enumValues": [ - 0, - 1, - 2, - 3 - ], - "genericArguments": null, - "properties": null - }, - "Volo.Abp.Identity.CreateClaimTypeDto": { - "baseType": "Volo.Abp.ObjectExtending.ExtensibleObject", - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "Name", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Required", - "type": "System.Boolean", - "typeSimple": "boolean" - }, - { - "name": "Regex", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "RegexDescription", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Description", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "ValueType", - "type": "Volo.Abp.Identity.IdentityClaimValueType", - "typeSimple": "Volo.Abp.Identity.IdentityClaimValueType" - } - ] - }, - "Volo.Abp.Identity.UpdateClaimTypeDto": { - "baseType": "Volo.Abp.ObjectExtending.ExtensibleObject", - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "Name", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Required", - "type": "System.Boolean", - "typeSimple": "boolean" - }, - { - "name": "Regex", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "RegexDescription", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Description", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "ValueType", - "type": "Volo.Abp.Identity.IdentityClaimValueType", - "typeSimple": "Volo.Abp.Identity.IdentityClaimValueType" - } - ] - }, - "Volo.Abp.Identity.IdentityRoleDto": { - "baseType": "Volo.Abp.Application.Dtos.ExtensibleEntityDto", - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "Name", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "IsDefault", - "type": "System.Boolean", - "typeSimple": "boolean" - }, - { - "name": "IsStatic", - "type": "System.Boolean", - "typeSimple": "boolean" - }, - { - "name": "IsPublic", - "type": "System.Boolean", - "typeSimple": "boolean" - }, - { - "name": "ConcurrencyStamp", - "type": "System.String", - "typeSimple": "string" - } - ] - }, - "Volo.Abp.Identity.IdentityRoleCreateDto": { - "baseType": "Volo.Abp.Identity.IdentityRoleCreateOrUpdateDtoBase", - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [] - }, - "Volo.Abp.Identity.IdentityRoleCreateOrUpdateDtoBase": { - "baseType": "Volo.Abp.ObjectExtending.ExtensibleObject", - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "Name", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "IsDefault", - "type": "System.Boolean", - "typeSimple": "boolean" - }, - { - "name": "IsPublic", - "type": "System.Boolean", - "typeSimple": "boolean" - } - ] - }, - "Volo.Abp.Identity.IdentityRoleUpdateDto": { - "baseType": "Volo.Abp.Identity.IdentityRoleCreateOrUpdateDtoBase", - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "ConcurrencyStamp", - "type": "System.String", - "typeSimple": "string" - } - ] - }, - "Volo.Abp.Identity.GetIdentityRoleListInput": { - "baseType": "Volo.Abp.Application.Dtos.PagedAndSortedResultRequestDto", - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "Filter", - "type": "System.String", - "typeSimple": "string" - } - ] - }, - "Volo.Abp.Identity.IdentityRoleClaimDto": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "RoleId", - "type": "System.Guid", - "typeSimple": "string" - }, - { - "name": "ClaimType", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "ClaimValue", - "type": "System.String", - "typeSimple": "string" - } - ] - }, - "Volo.Abp.Identity.GetIdentitySecurityLogListInput": { - "baseType": "Volo.Abp.Application.Dtos.PagedAndSortedResultRequestDto", - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "StartTime", - "type": "System.DateTime?", - "typeSimple": "string?" - }, - { - "name": "EndTime", - "type": "System.DateTime?", - "typeSimple": "string?" - }, - { - "name": "ApplicationName", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Identity", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Action", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "UserName", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "ClientId", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "CorrelationId", - "type": "System.String", - "typeSimple": "string" - } - ] - }, - "Volo.Abp.Identity.IdentitySecurityLogDto": { - "baseType": "Volo.Abp.Application.Dtos.EntityDto", - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "TenantId", - "type": "System.Guid?", - "typeSimple": "string?" - }, - { - "name": "ApplicationName", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Identity", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Action", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "UserId", - "type": "System.Guid?", - "typeSimple": "string?" - }, - { - "name": "UserName", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "TenantName", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "ClientId", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "CorrelationId", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "ClientIpAddress", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "BrowserInfo", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "CreationTime", - "type": "System.DateTime", - "typeSimple": "string" - }, - { - "name": "ExtraProperties", - "type": "{System.String:System.Object}", - "typeSimple": "{string:object}" - } - ] - }, - "Volo.Abp.Identity.IdentitySettingsDto": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "Password", - "type": "Volo.Abp.Identity.IdentityPasswordSettingsDto", - "typeSimple": "Volo.Abp.Identity.IdentityPasswordSettingsDto" - }, - { - "name": "Lockout", - "type": "Volo.Abp.Identity.IdentityLockoutSettingsDto", - "typeSimple": "Volo.Abp.Identity.IdentityLockoutSettingsDto" - }, - { - "name": "SignIn", - "type": "Volo.Abp.Identity.IdentitySignInSettingsDto", - "typeSimple": "Volo.Abp.Identity.IdentitySignInSettingsDto" - }, - { - "name": "User", - "type": "Volo.Abp.Identity.IdentityUserSettingsDto", - "typeSimple": "Volo.Abp.Identity.IdentityUserSettingsDto" - } - ] - }, - "Volo.Abp.Identity.IdentityPasswordSettingsDto": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "RequiredLength", - "type": "System.Int32", - "typeSimple": "number" - }, - { - "name": "RequiredUniqueChars", - "type": "System.Int32", - "typeSimple": "number" - }, - { - "name": "RequireNonAlphanumeric", - "type": "System.Boolean", - "typeSimple": "boolean" - }, - { - "name": "RequireLowercase", - "type": "System.Boolean", - "typeSimple": "boolean" - }, - { - "name": "RequireUppercase", - "type": "System.Boolean", - "typeSimple": "boolean" - }, - { - "name": "RequireDigit", - "type": "System.Boolean", - "typeSimple": "boolean" - } - ] - }, - "Volo.Abp.Identity.IdentityLockoutSettingsDto": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "AllowedForNewUsers", - "type": "System.Boolean", - "typeSimple": "boolean" - }, - { - "name": "LockoutDuration", - "type": "System.Int32", - "typeSimple": "number" - }, - { - "name": "MaxFailedAccessAttempts", - "type": "System.Int32", - "typeSimple": "number" - } - ] - }, - "Volo.Abp.Identity.IdentitySignInSettingsDto": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "RequireConfirmedEmail", - "type": "System.Boolean", - "typeSimple": "boolean" - }, - { - "name": "EnablePhoneNumberConfirmation", - "type": "System.Boolean", - "typeSimple": "boolean" - }, - { - "name": "RequireConfirmedPhoneNumber", - "type": "System.Boolean", - "typeSimple": "boolean" - } - ] - }, - "Volo.Abp.Identity.IdentityUserSettingsDto": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "IsUserNameUpdateEnabled", - "type": "System.Boolean", - "typeSimple": "boolean" - }, - { - "name": "IsEmailUpdateEnabled", - "type": "System.Boolean", - "typeSimple": "boolean" - } - ] - }, - "Volo.Abp.Identity.GetIdentityUsersInput": { - "baseType": "Volo.Abp.Application.Dtos.PagedAndSortedResultRequestDto", - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "Filter", - "type": "System.String", - "typeSimple": "string" - } - ] - }, - "Volo.Abp.Identity.IdentityUserCreateDto": { - "baseType": "Volo.Abp.Identity.IdentityUserCreateOrUpdateDtoBase", - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "Password", - "type": "System.String", - "typeSimple": "string" - } - ] - }, - "Volo.Abp.Identity.IdentityUserCreateOrUpdateDtoBase": { - "baseType": "Volo.Abp.ObjectExtending.ExtensibleObject", - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "UserName", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Name", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Surname", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Email", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "PhoneNumber", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "LockoutEnabled", - "type": "System.Boolean", - "typeSimple": "boolean" - }, - { - "name": "RoleNames", - "type": "[System.String]", - "typeSimple": "[string]" - }, - { - "name": "OrganizationUnitIds", - "type": "[System.Guid]", - "typeSimple": "[string]" - } - ] - }, - "Volo.Abp.Identity.IdentityUserUpdateDto": { - "baseType": "Volo.Abp.Identity.IdentityUserCreateOrUpdateDtoBase", - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "ConcurrencyStamp", - "type": "System.String", - "typeSimple": "string" - } - ] - }, - "Volo.Abp.Identity.OrganizationUnitWithDetailsDto": { - "baseType": "Volo.Abp.Application.Dtos.ExtensibleFullAuditedEntityDto", - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "ParentId", - "type": "System.Guid?", - "typeSimple": "string?" - }, - { - "name": "Code", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "DisplayName", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Roles", - "type": "[Volo.Abp.Identity.IdentityRoleDto]", - "typeSimple": "[Volo.Abp.Identity.IdentityRoleDto]" - } - ] - }, - "Volo.Abp.Application.Dtos.ExtensibleFullAuditedEntityDto": { - "baseType": "Volo.Abp.Application.Dtos.ExtensibleAuditedEntityDto", - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": [ - "TPrimaryKey" - ], - "properties": [ - { - "name": "IsDeleted", - "type": "System.Boolean", - "typeSimple": "boolean" - }, - { - "name": "DeleterId", - "type": "System.Guid?", - "typeSimple": "string?" - }, - { - "name": "DeletionTime", - "type": "System.DateTime?", - "typeSimple": "string?" - } - ] - }, - "Volo.Abp.Application.Dtos.ExtensibleAuditedEntityDto": { - "baseType": "Volo.Abp.Application.Dtos.ExtensibleCreationAuditedEntityDto", - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": [ - "TPrimaryKey" - ], - "properties": [ - { - "name": "LastModificationTime", - "type": "System.DateTime?", - "typeSimple": "string?" - }, - { - "name": "LastModifierId", - "type": "System.Guid?", - "typeSimple": "string?" - } - ] - }, - "Volo.Abp.Application.Dtos.ExtensibleCreationAuditedEntityDto": { - "baseType": "Volo.Abp.Application.Dtos.ExtensibleEntityDto", - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": [ - "TPrimaryKey" - ], - "properties": [ - { - "name": "CreationTime", - "type": "System.DateTime", - "typeSimple": "string" - }, - { - "name": "CreatorId", - "type": "System.Guid?", - "typeSimple": "string?" - } - ] - }, - "Volo.Abp.Identity.IdentityUserClaimDto": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "UserId", - "type": "System.Guid", - "typeSimple": "string" - }, - { - "name": "ClaimType", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "ClaimValue", - "type": "System.String", - "typeSimple": "string" - } - ] - }, - "Volo.Abp.Identity.OrganizationUnitDto": { - "baseType": "Volo.Abp.Application.Dtos.ExtensibleFullAuditedEntityDto", - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "ParentId", - "type": "System.Guid?", - "typeSimple": "string?" - }, - { - "name": "Code", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "DisplayName", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Roles", - "type": "[Volo.Abp.Identity.OrganizationUnitRoleDto]", - "typeSimple": "[Volo.Abp.Identity.OrganizationUnitRoleDto]" - } - ] - }, - "Volo.Abp.Identity.OrganizationUnitRoleDto": { - "baseType": "Volo.Abp.Application.Dtos.CreationAuditedEntityDto", - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "OrganizationUnitId", - "type": "System.Guid", - "typeSimple": "string" - }, - { - "name": "RoleId", - "type": "System.Guid", - "typeSimple": "string" - } - ] - }, - "Volo.Abp.Application.Dtos.CreationAuditedEntityDto": { - "baseType": "Volo.Abp.Application.Dtos.EntityDto", - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "CreationTime", - "type": "System.DateTime", - "typeSimple": "string" - }, - { - "name": "CreatorId", - "type": "System.Guid?", - "typeSimple": "string?" - } - ] - }, - "Volo.Abp.Identity.IdentityUserUpdateRolesDto": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "RoleNames", - "type": "[System.String]", - "typeSimple": "[string]" - } - ] - }, - "Volo.Abp.Identity.IdentityUserUpdatePasswordInput": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "NewPassword", - "type": "System.String", - "typeSimple": "string" - } - ] - }, - "Volo.Abp.Users.UserData": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "Id", - "type": "System.Guid", - "typeSimple": "string" - }, - { - "name": "TenantId", - "type": "System.Guid?", - "typeSimple": "string?" - }, - { - "name": "UserName", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Name", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Surname", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Email", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "EmailConfirmed", - "type": "System.Boolean", - "typeSimple": "boolean" - }, - { - "name": "PhoneNumber", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "PhoneNumberConfirmed", - "type": "System.Boolean", - "typeSimple": "boolean" - } - ] - }, - "Volo.Abp.Identity.UserLookupSearchInputDto": { - "baseType": "Volo.Abp.Application.Dtos.PagedResultRequestDto", - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "Sorting", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Filter", - "type": "System.String", - "typeSimple": "string" - } - ] - }, - "Volo.Abp.Identity.UserLookupCountInputDto": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "Filter", - "type": "System.String", - "typeSimple": "string" - } - ] - }, - "Volo.Abp.Identity.OrganizationUnitRoleInput": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "RoleIds", - "type": "[System.Guid]", - "typeSimple": "[string]" - } - ] - }, - "Volo.Abp.Identity.OrganizationUnitUserInput": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "UserIds", - "type": "[System.Guid]", - "typeSimple": "[string]" - } - ] - }, - "Volo.Abp.Identity.OrganizationUnitCreateDto": { - "baseType": "Volo.Abp.Identity.OrganizationUnitCreateOrUpdateDtoBase", - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "ParentId", - "type": "System.Guid?", - "typeSimple": "string?" - } - ] - }, - "Volo.Abp.Identity.OrganizationUnitCreateOrUpdateDtoBase": { - "baseType": "Volo.Abp.ObjectExtending.ExtensibleObject", - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "DisplayName", - "type": "System.String", - "typeSimple": "string" - } - ] - }, - "Volo.Abp.Identity.GetOrganizationUnitInput": { - "baseType": "Volo.Abp.Application.Dtos.PagedAndSortedResultRequestDto", - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "Filter", - "type": "System.String", - "typeSimple": "string" - } - ] - }, - "Volo.Abp.Identity.OrganizationUnitMoveInput": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "NewParentId", - "type": "System.Guid?", - "typeSimple": "string?" - } - ] - }, - "Volo.Abp.Identity.GetAvailableUsersInput": { - "baseType": "Volo.Abp.Application.Dtos.PagedAndSortedResultRequestDto", - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "Filter", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Id", - "type": "System.Guid", - "typeSimple": "string" - } - ] - }, - "Volo.Abp.Identity.GetAvailableRolesInput": { - "baseType": "Volo.Abp.Application.Dtos.PagedAndSortedResultRequestDto", - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "Filter", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Id", - "type": "System.Guid", - "typeSimple": "string" - } - ] - }, - "Volo.Abp.Identity.OrganizationUnitUpdateDto": { - "baseType": "Volo.Abp.Identity.OrganizationUnitCreateOrUpdateDtoBase", - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [] - }, - "Volo.Abp.Identity.ProfileDto": { - "baseType": "Volo.Abp.ObjectExtending.ExtensibleObject", - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "UserName", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Email", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "EmailConfirmed", - "type": "System.Boolean", - "typeSimple": "boolean" - }, - { - "name": "Name", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Surname", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "PhoneNumber", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "PhoneNumberConfirmed", - "type": "System.Boolean", - "typeSimple": "boolean" - }, - { - "name": "IsExternal", - "type": "System.Boolean", - "typeSimple": "boolean" - }, - { - "name": "HasPassword", - "type": "System.Boolean", - "typeSimple": "boolean" - } - ] - }, - "Volo.Abp.Identity.UpdateProfileDto": { - "baseType": "Volo.Abp.ObjectExtending.ExtensibleObject", - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "UserName", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Email", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Name", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Surname", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "PhoneNumber", - "type": "System.String", - "typeSimple": "string" - } - ] - }, - "Volo.Abp.Identity.ChangePasswordInput": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "CurrentPassword", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "NewPassword", - "type": "System.String", - "typeSimple": "string" - } - ] - }, - "Volo.Abp.IdentityServer.ApiResource.Dtos.GetApiResourceListInput": { - "baseType": "Volo.Abp.Application.Dtos.PagedAndSortedResultRequestDto", - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "Filter", - "type": "System.String", - "typeSimple": "string" - } - ] - }, - "Volo.Abp.IdentityServer.ApiResource.Dtos.ApiResourceWithDetailsDto": { - "baseType": "Volo.Abp.Application.Dtos.ExtensibleEntityDto", - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "Name", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "DisplayName", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Description", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Enabled", - "type": "System.Boolean", - "typeSimple": "boolean" - }, - { - "name": "UserClaims", - "type": "[Volo.Abp.IdentityServer.ApiResource.Dtos.ApiResourceClaimClaimDto]", - "typeSimple": "[Volo.Abp.IdentityServer.ApiResource.Dtos.ApiResourceClaimClaimDto]" - }, - { - "name": "Properties", - "type": "{System.String:System.String}", - "typeSimple": "{string:string}" - }, - { - "name": "Scopes", - "type": "[Volo.Abp.IdentityServer.ApiResource.Dtos.ApiScopeDto]", - "typeSimple": "[Volo.Abp.IdentityServer.ApiResource.Dtos.ApiScopeDto]" - }, - { - "name": "Secrets", - "type": "[Volo.Abp.IdentityServer.ApiResource.Dtos.ApiSecretDto]", - "typeSimple": "[Volo.Abp.IdentityServer.ApiResource.Dtos.ApiSecretDto]" - } - ] - }, - "Volo.Abp.IdentityServer.ApiResource.Dtos.ApiResourceClaimClaimDto": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "ApiResourceId", - "type": "System.Guid", - "typeSimple": "string" - }, - { - "name": "Type", - "type": "System.String", - "typeSimple": "string" - } - ] - }, - "Volo.Abp.IdentityServer.ApiResource.Dtos.ApiScopeDto": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "ApiResourceId", - "type": "System.Guid", - "typeSimple": "string" - }, - { - "name": "Name", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "DisplayName", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Description", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Required", - "type": "System.Boolean", - "typeSimple": "boolean" - }, - { - "name": "Emphasize", - "type": "System.Boolean", - "typeSimple": "boolean" - }, - { - "name": "ShowInDiscoveryDocument", - "type": "System.Boolean", - "typeSimple": "boolean" - }, - { - "name": "UserClaims", - "type": "[Volo.Abp.IdentityServer.ApiResource.Dtos.ApiScopeClaimDto]", - "typeSimple": "[Volo.Abp.IdentityServer.ApiResource.Dtos.ApiScopeClaimDto]" - } - ] - }, - "Volo.Abp.IdentityServer.ApiResource.Dtos.ApiScopeClaimDto": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "ApiResourceId", - "type": "System.Guid", - "typeSimple": "string" - }, - { - "name": "Name", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Type", - "type": "System.String", - "typeSimple": "string" - } - ] - }, - "Volo.Abp.IdentityServer.ApiResource.Dtos.ApiSecretDto": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "ApiResourceId", - "type": "System.Guid", - "typeSimple": "string" - }, - { - "name": "Type", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Value", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Description", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Expiration", - "type": "System.DateTime?", - "typeSimple": "string?" - } - ] - }, - "Volo.Abp.IdentityServer.ApiResource.Dtos.CreateApiResourceDto": { - "baseType": "Volo.Abp.ObjectExtending.ExtensibleObject", - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "Name", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "DisplayName", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Description", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Claims", - "type": "[System.String]", - "typeSimple": "[string]" - } - ] - }, - "Volo.Abp.IdentityServer.ApiResource.Dtos.UpdateApiResourceDto": { - "baseType": "Volo.Abp.ObjectExtending.ExtensibleObject", - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "DisplayName", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Description", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Enabled", - "type": "System.Boolean", - "typeSimple": "boolean" - }, - { - "name": "Claims", - "type": "[System.String]", - "typeSimple": "[string]" - }, - { - "name": "Scopes", - "type": "[Volo.Abp.IdentityServer.ApiResource.Dtos.ApiScopeDto]", - "typeSimple": "[Volo.Abp.IdentityServer.ApiResource.Dtos.ApiScopeDto]" - }, - { - "name": "Secrets", - "type": "[Volo.Abp.IdentityServer.ApiResource.Dtos.ApiSecretDto]", - "typeSimple": "[Volo.Abp.IdentityServer.ApiResource.Dtos.ApiSecretDto]" - } - ] - }, - "Volo.Abp.IdentityServer.Client.Dtos.GetClientListInput": { - "baseType": "Volo.Abp.Application.Dtos.PagedAndSortedResultRequestDto", - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "Filter", - "type": "System.String", - "typeSimple": "string" - } - ] - }, - "Volo.Abp.IdentityServer.Client.Dtos.ClientWithDetailsDto": { - "baseType": "Volo.Abp.Application.Dtos.ExtensibleEntityDto", - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "ClientId", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "ClientName", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Description", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "ClientUri", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "LogoUri", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Enabled", - "type": "System.Boolean", - "typeSimple": "boolean" - }, - { - "name": "ProtocolType", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "RequireClientSecret", - "type": "System.Boolean", - "typeSimple": "boolean" - }, - { - "name": "RequireConsent", - "type": "System.Boolean", - "typeSimple": "boolean" - }, - { - "name": "AllowRememberConsent", - "type": "System.Boolean", - "typeSimple": "boolean" - }, - { - "name": "AlwaysIncludeUserClaimsInIdToken", - "type": "System.Boolean", - "typeSimple": "boolean" - }, - { - "name": "RequirePkce", - "type": "System.Boolean", - "typeSimple": "boolean" - }, - { - "name": "AllowPlainTextPkce", - "type": "System.Boolean", - "typeSimple": "boolean" - }, - { - "name": "AllowAccessTokensViaBrowser", - "type": "System.Boolean", - "typeSimple": "boolean" - }, - { - "name": "FrontChannelLogoutUri", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "FrontChannelLogoutSessionRequired", - "type": "System.Boolean", - "typeSimple": "boolean" - }, - { - "name": "BackChannelLogoutUri", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "BackChannelLogoutSessionRequired", - "type": "System.Boolean", - "typeSimple": "boolean" - }, - { - "name": "AllowOfflineAccess", - "type": "System.Boolean", - "typeSimple": "boolean" - }, - { - "name": "IdentityTokenLifetime", - "type": "System.Int32", - "typeSimple": "number" - }, - { - "name": "AccessTokenLifetime", - "type": "System.Int32", - "typeSimple": "number" - }, - { - "name": "AuthorizationCodeLifetime", - "type": "System.Int32", - "typeSimple": "number" - }, - { - "name": "ConsentLifetime", - "type": "System.Int32?", - "typeSimple": "number?" - }, - { - "name": "AbsoluteRefreshTokenLifetime", - "type": "System.Int32", - "typeSimple": "number" - }, - { - "name": "SlidingRefreshTokenLifetime", - "type": "System.Int32", - "typeSimple": "number" - }, - { - "name": "RefreshTokenUsage", - "type": "System.Int32", - "typeSimple": "number" - }, - { - "name": "UpdateAccessTokenClaimsOnRefresh", - "type": "System.Boolean", - "typeSimple": "boolean" - }, - { - "name": "RefreshTokenExpiration", - "type": "System.Int32", - "typeSimple": "number" - }, - { - "name": "AccessTokenType", - "type": "System.Int32", - "typeSimple": "number" - }, - { - "name": "EnableLocalLogin", - "type": "System.Boolean", - "typeSimple": "boolean" - }, - { - "name": "IncludeJwtId", - "type": "System.Boolean", - "typeSimple": "boolean" - }, - { - "name": "AlwaysSendClientClaims", - "type": "System.Boolean", - "typeSimple": "boolean" - }, - { - "name": "ClientClaimsPrefix", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "PairWiseSubjectSalt", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "UserSsoLifetime", - "type": "System.Int32?", - "typeSimple": "number?" - }, - { - "name": "UserCodeType", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "DeviceCodeLifetime", - "type": "System.Int32", - "typeSimple": "number" - }, - { - "name": "ClientSecrets", - "type": "[Volo.Abp.IdentityServer.Client.Dtos.ClientSecretDto]", - "typeSimple": "[Volo.Abp.IdentityServer.Client.Dtos.ClientSecretDto]" - }, - { - "name": "AllowedScopes", - "type": "[Volo.Abp.IdentityServer.Client.Dtos.ClientScopeDto]", - "typeSimple": "[Volo.Abp.IdentityServer.Client.Dtos.ClientScopeDto]" - }, - { - "name": "Claims", - "type": "[Volo.Abp.IdentityServer.Client.Dtos.ClientClaimDto]", - "typeSimple": "[Volo.Abp.IdentityServer.Client.Dtos.ClientClaimDto]" - }, - { - "name": "AllowedGrantTypes", - "type": "[Volo.Abp.IdentityServer.Client.Dtos.ClientGrantTypeDto]", - "typeSimple": "[Volo.Abp.IdentityServer.Client.Dtos.ClientGrantTypeDto]" - }, - { - "name": "IdentityProviderRestrictions", - "type": "[Volo.Abp.IdentityServer.Client.Dtos.ClientIdentityProviderRestrictionDto]", - "typeSimple": "[Volo.Abp.IdentityServer.Client.Dtos.ClientIdentityProviderRestrictionDto]" - }, - { - "name": "Properties", - "type": "[Volo.Abp.IdentityServer.Client.Dtos.ClientPropertyDto]", - "typeSimple": "[Volo.Abp.IdentityServer.Client.Dtos.ClientPropertyDto]" - }, - { - "name": "AllowedCorsOrigins", - "type": "[Volo.Abp.IdentityServer.Client.Dtos.ClientCorsOriginDto]", - "typeSimple": "[Volo.Abp.IdentityServer.Client.Dtos.ClientCorsOriginDto]" - }, - { - "name": "RedirectUris", - "type": "[Volo.Abp.IdentityServer.Client.Dtos.ClientRedirectUriDto]", - "typeSimple": "[Volo.Abp.IdentityServer.Client.Dtos.ClientRedirectUriDto]" - }, - { - "name": "PostLogoutRedirectUris", - "type": "[Volo.Abp.IdentityServer.Client.Dtos.ClientPostLogoutRedirectUriDto]", - "typeSimple": "[Volo.Abp.IdentityServer.Client.Dtos.ClientPostLogoutRedirectUriDto]" - } - ] - }, - "Volo.Abp.IdentityServer.Client.Dtos.ClientSecretDto": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "ClientId", - "type": "System.Guid", - "typeSimple": "string" - }, - { - "name": "Type", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Value", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Description", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Expiration", - "type": "System.DateTime?", - "typeSimple": "string?" - } - ] - }, - "Volo.Abp.IdentityServer.Client.Dtos.ClientScopeDto": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "ClientId", - "type": "System.Guid", - "typeSimple": "string" - }, - { - "name": "Scope", - "type": "System.String", - "typeSimple": "string" - } - ] - }, - "Volo.Abp.IdentityServer.Client.Dtos.ClientClaimDto": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "Type", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Value", - "type": "System.String", - "typeSimple": "string" - } - ] - }, - "Volo.Abp.IdentityServer.Client.Dtos.ClientGrantTypeDto": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "ClientId", - "type": "System.Guid", - "typeSimple": "string" - }, - { - "name": "GrantType", - "type": "System.String", - "typeSimple": "string" - } - ] - }, - "Volo.Abp.IdentityServer.Client.Dtos.ClientIdentityProviderRestrictionDto": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "ClientId", - "type": "System.Guid", - "typeSimple": "string" - }, - { - "name": "Provider", - "type": "System.String", - "typeSimple": "string" - } - ] - }, - "Volo.Abp.IdentityServer.Client.Dtos.ClientPropertyDto": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "ClientId", - "type": "System.Guid", - "typeSimple": "string" - }, - { - "name": "Key", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Value", - "type": "System.String", - "typeSimple": "string" - } - ] - }, - "Volo.Abp.IdentityServer.Client.Dtos.ClientCorsOriginDto": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "ClientId", - "type": "System.Guid", - "typeSimple": "string" - }, - { - "name": "Origin", - "type": "System.String", - "typeSimple": "string" - } - ] - }, - "Volo.Abp.IdentityServer.Client.Dtos.ClientRedirectUriDto": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "ClientId", - "type": "System.Guid", - "typeSimple": "string" - }, - { - "name": "RedirectUri", - "type": "System.String", - "typeSimple": "string" - } - ] - }, - "Volo.Abp.IdentityServer.Client.Dtos.ClientPostLogoutRedirectUriDto": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "ClientId", - "type": "System.Guid", - "typeSimple": "string" - }, - { - "name": "PostLogoutRedirectUri", - "type": "System.String", - "typeSimple": "string" - } - ] - }, - "Volo.Abp.IdentityServer.Client.Dtos.CreateClientDto": { - "baseType": "Volo.Abp.ObjectExtending.ExtensibleObject", - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "ClientId", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "ClientName", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Description", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "ClientUri", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "LogoUri", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "RequireConsent", - "type": "System.Boolean", - "typeSimple": "boolean" - }, - { - "name": "CallbackUrl", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "LogoutUrl", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Secrets", - "type": "[Volo.Abp.IdentityServer.Client.Dtos.ClientSecretDto]", - "typeSimple": "[Volo.Abp.IdentityServer.Client.Dtos.ClientSecretDto]" - }, - { - "name": "Scopes", - "type": "[System.String]", - "typeSimple": "[string]" - } - ] - }, - "Volo.Abp.IdentityServer.Client.Dtos.UpdateClientDto": { - "baseType": "Volo.Abp.ObjectExtending.ExtensibleObject", - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "ClientName", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Description", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "ClientUri", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "LogoUri", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Enabled", - "type": "System.Boolean", - "typeSimple": "boolean" - }, - { - "name": "RequireConsent", - "type": "System.Boolean", - "typeSimple": "boolean" - }, - { - "name": "AllowOfflineAccess", - "type": "System.Boolean", - "typeSimple": "boolean" - }, - { - "name": "AllowRememberConsent", - "type": "System.Boolean", - "typeSimple": "boolean" - }, - { - "name": "RequirePkce", - "type": "System.Boolean", - "typeSimple": "boolean" - }, - { - "name": "RequireClientSecret", - "type": "System.Boolean", - "typeSimple": "boolean" - }, - { - "name": "AccessTokenLifetime", - "type": "System.Int32", - "typeSimple": "number" - }, - { - "name": "ConsentLifetime", - "type": "System.Int32?", - "typeSimple": "number?" - }, - { - "name": "AccessTokenType", - "type": "System.Int32", - "typeSimple": "number" - }, - { - "name": "EnableLocalLogin", - "type": "System.Boolean", - "typeSimple": "boolean" - }, - { - "name": "FrontChannelLogoutUri", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "FrontChannelLogoutSessionRequired", - "type": "System.Boolean", - "typeSimple": "boolean" - }, - { - "name": "BackChannelLogoutUri", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "BackChannelLogoutSessionRequired", - "type": "System.Boolean", - "typeSimple": "boolean" - }, - { - "name": "IncludeJwtId", - "type": "System.Boolean", - "typeSimple": "boolean" - }, - { - "name": "AlwaysSendClientClaims", - "type": "System.Boolean", - "typeSimple": "boolean" - }, - { - "name": "PairWiseSubjectSalt", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "UserSsoLifetime", - "type": "System.Int32?", - "typeSimple": "number?" - }, - { - "name": "UserCodeType", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "DeviceCodeLifetime", - "type": "System.Int32", - "typeSimple": "number" - }, - { - "name": "ClientSecrets", - "type": "[Volo.Abp.IdentityServer.Client.Dtos.ClientSecretDto]", - "typeSimple": "[Volo.Abp.IdentityServer.Client.Dtos.ClientSecretDto]" - }, - { - "name": "Claims", - "type": "[Volo.Abp.IdentityServer.Client.Dtos.ClientClaimDto]", - "typeSimple": "[Volo.Abp.IdentityServer.Client.Dtos.ClientClaimDto]" - }, - { - "name": "Properties", - "type": "[Volo.Abp.IdentityServer.Client.Dtos.ClientPropertyDto]", - "typeSimple": "[Volo.Abp.IdentityServer.Client.Dtos.ClientPropertyDto]" - }, - { - "name": "AllowedGrantTypes", - "type": "[System.String]", - "typeSimple": "[string]" - }, - { - "name": "IdentityProviderRestrictions", - "type": "[System.String]", - "typeSimple": "[string]" - }, - { - "name": "Scopes", - "type": "[System.String]", - "typeSimple": "[string]" - }, - { - "name": "AllowedCorsOrigins", - "type": "[System.String]", - "typeSimple": "[string]" - }, - { - "name": "RedirectUris", - "type": "[System.String]", - "typeSimple": "[string]" - }, - { - "name": "PostLogoutRedirectUris", - "type": "[System.String]", - "typeSimple": "[string]" - } - ] - }, - "Volo.Abp.IdentityServer.IdentityResource.Dtos.GetIdentityResourceListInput": { - "baseType": "Volo.Abp.Application.Dtos.PagedAndSortedResultRequestDto", - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "Filter", - "type": "System.String", - "typeSimple": "string" - } - ] - }, - "Volo.Abp.IdentityServer.IdentityResource.Dtos.IdentityResourceWithDetailsDto": { - "baseType": "Volo.Abp.Application.Dtos.ExtensibleEntityDto", - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "Name", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "DisplayName", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Description", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Enabled", - "type": "System.Boolean", - "typeSimple": "boolean" - }, - { - "name": "Required", - "type": "System.Boolean", - "typeSimple": "boolean" - }, - { - "name": "Emphasize", - "type": "System.Boolean", - "typeSimple": "boolean" - }, - { - "name": "ShowInDiscoveryDocument", - "type": "System.Boolean", - "typeSimple": "boolean" - }, - { - "name": "UserClaims", - "type": "[Volo.Abp.IdentityServer.IdentityResource.Dtos.IdentityClaimDto]", - "typeSimple": "[Volo.Abp.IdentityServer.IdentityResource.Dtos.IdentityClaimDto]" - }, - { - "name": "Properties", - "type": "{System.String:System.String}", - "typeSimple": "{string:string}" - } - ] - }, - "Volo.Abp.IdentityServer.IdentityResource.Dtos.IdentityClaimDto": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "IdentityResourceId", - "type": "System.Guid", - "typeSimple": "string" - }, - { - "name": "Type", - "type": "System.String", - "typeSimple": "string" - } - ] - }, - "Volo.Abp.IdentityServer.IdentityResource.Dtos.CreateIdentityResourceDto": { - "baseType": "Volo.Abp.ObjectExtending.ExtensibleObject", - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "Name", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "DisplayName", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Description", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Enabled", - "type": "System.Boolean", - "typeSimple": "boolean" - }, - { - "name": "Required", - "type": "System.Boolean", - "typeSimple": "boolean" - }, - { - "name": "Emphasize", - "type": "System.Boolean", - "typeSimple": "boolean" - }, - { - "name": "ShowInDiscoveryDocument", - "type": "System.Boolean", - "typeSimple": "boolean" - }, - { - "name": "Claims", - "type": "[System.String]", - "typeSimple": "[string]" - } - ] - }, - "Volo.Abp.IdentityServer.IdentityResource.Dtos.UpdateIdentityResourceDto": { - "baseType": "Volo.Abp.ObjectExtending.ExtensibleObject", - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "Name", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "DisplayName", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Description", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Enabled", - "type": "System.Boolean", - "typeSimple": "boolean" - }, - { - "name": "Required", - "type": "System.Boolean", - "typeSimple": "boolean" - }, - { - "name": "Emphasize", - "type": "System.Boolean", - "typeSimple": "boolean" - }, - { - "name": "ShowInDiscoveryDocument", - "type": "System.Boolean", - "typeSimple": "boolean" - }, - { - "name": "Claims", - "type": "[System.String]", - "typeSimple": "[string]" - } - ] - }, - "Volo.Abp.IdentityServer.ClaimType.Dtos.IdentityClaimTypeDto": { - "baseType": "Volo.Abp.Application.Dtos.ExtensibleEntityDto", - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "Name", - "type": "System.String", - "typeSimple": "string" - } - ] - }, - "Volo.Abp.LanguageManagement.Dto.LanguageDto": { - "baseType": "Volo.Abp.Application.Dtos.ExtensibleCreationAuditedEntityDto", - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "CultureName", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "UiCultureName", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "DisplayName", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "FlagIcon", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "IsEnabled", - "type": "System.Boolean", - "typeSimple": "boolean" - }, - { - "name": "IsDefaultLanguage", - "type": "System.Boolean", - "typeSimple": "boolean" - } - ] - }, - "Volo.Abp.LanguageManagement.Dto.GetLanguagesTextsInput": { - "baseType": "Volo.Abp.Application.Dtos.PagedAndSortedResultRequestDto", - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "Filter", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "ResourceName", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "BaseCultureName", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "TargetCultureName", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "GetOnlyEmptyValues", - "type": "System.Boolean", - "typeSimple": "boolean" - } - ] - }, - "Volo.Abp.LanguageManagement.Dto.CreateLanguageDto": { - "baseType": "Volo.Abp.ObjectExtending.ExtensibleObject", - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "DisplayName", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "CultureName", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "UiCultureName", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "FlagIcon", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "IsEnabled", - "type": "System.Boolean", - "typeSimple": "boolean" - } - ] - }, - "Volo.Abp.LanguageManagement.Dto.UpdateLanguageDto": { - "baseType": "Volo.Abp.ObjectExtending.ExtensibleObject", - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "DisplayName", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "FlagIcon", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "IsEnabled", - "type": "System.Boolean", - "typeSimple": "boolean" - } - ] - }, - "Volo.Abp.LanguageManagement.Dto.LanguageResourceDto": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "Name", - "type": "System.String", - "typeSimple": "string" - } - ] - }, - "Volo.Abp.LanguageManagement.Dto.CultureInfoDto": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "DisplayName", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Name", - "type": "System.String", - "typeSimple": "string" - } - ] - }, - "Volo.Abp.LanguageManagement.Dto.LanguageTextDto": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "ResourceName", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "CultureName", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "BaseCultureName", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "BaseValue", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Name", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Value", - "type": "System.String", - "typeSimple": "string" - } - ] - }, - "Volo.Abp.LeptonTheme.Management.LeptonThemeSettingsDto": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "BoxedLayout", - "type": "System.Boolean", - "typeSimple": "boolean" - }, - { - "name": "MenuPlacement", - "type": "Volo.Abp.LeptonTheme.Management.MenuPlacement", - "typeSimple": "Volo.Abp.LeptonTheme.Management.MenuPlacement" - }, - { - "name": "MenuStatus", - "type": "Volo.Abp.LeptonTheme.Management.MenuStatus", - "typeSimple": "Volo.Abp.LeptonTheme.Management.MenuStatus" - }, - { - "name": "Style", - "type": "Volo.Abp.LeptonTheme.Management.LeptonStyle", - "typeSimple": "Volo.Abp.LeptonTheme.Management.LeptonStyle" - } - ] - }, - "Volo.Abp.LeptonTheme.Management.MenuPlacement": { - "baseType": "System.Enum", - "isEnum": true, - "enumNames": [ - "Left", - "Top" - ], - "enumValues": [ - 0, - 1 - ], - "genericArguments": null, - "properties": null - }, - "Volo.Abp.LeptonTheme.Management.MenuStatus": { - "baseType": "System.Enum", - "isEnum": true, - "enumNames": [ - "AlwaysOpened", - "OpenOnHover" - ], - "enumValues": [ - 0, - 1 - ], - "genericArguments": null, - "properties": null - }, - "Volo.Abp.LeptonTheme.Management.LeptonStyle": { - "baseType": "System.Enum", - "isEnum": true, - "enumNames": [ - "Style1", - "Style2", - "Style3", - "Style4", - "Style5", - "Style6" - ], - "enumValues": [ - 0, - 1, - 2, - 3, - 4, - 5 - ], - "genericArguments": null, - "properties": null - }, - "Volo.Abp.LeptonTheme.Management.UpdateLeptonThemeSettingsDto": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "BoxedLayout", - "type": "System.Boolean", - "typeSimple": "boolean" - }, - { - "name": "MenuPlacement", - "type": "Volo.Abp.LeptonTheme.Management.MenuPlacement", - "typeSimple": "Volo.Abp.LeptonTheme.Management.MenuPlacement" - }, - { - "name": "MenuStatus", - "type": "Volo.Abp.LeptonTheme.Management.MenuStatus", - "typeSimple": "Volo.Abp.LeptonTheme.Management.MenuStatus" - }, - { - "name": "Style", - "type": "Volo.Abp.LeptonTheme.Management.LeptonStyle", - "typeSimple": "Volo.Abp.LeptonTheme.Management.LeptonStyle" - } - ] - }, - "Volo.Abp.PermissionManagement.GetPermissionListResultDto": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "EntityDisplayName", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Groups", - "type": "[Volo.Abp.PermissionManagement.PermissionGroupDto]", - "typeSimple": "[Volo.Abp.PermissionManagement.PermissionGroupDto]" - } - ] - }, - "Volo.Abp.PermissionManagement.PermissionGroupDto": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "Name", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "DisplayName", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Permissions", - "type": "[Volo.Abp.PermissionManagement.PermissionGrantInfoDto]", - "typeSimple": "[Volo.Abp.PermissionManagement.PermissionGrantInfoDto]" - } - ] - }, - "Volo.Abp.PermissionManagement.PermissionGrantInfoDto": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "Name", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "DisplayName", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "ParentName", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "IsGranted", - "type": "System.Boolean", - "typeSimple": "boolean" - }, - { - "name": "AllowedProviders", - "type": "[System.String]", - "typeSimple": "[string]" - }, - { - "name": "GrantedProviders", - "type": "[Volo.Abp.PermissionManagement.ProviderInfoDto]", - "typeSimple": "[Volo.Abp.PermissionManagement.ProviderInfoDto]" - } - ] - }, - "Volo.Abp.PermissionManagement.ProviderInfoDto": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "ProviderName", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "ProviderKey", - "type": "System.String", - "typeSimple": "string" - } - ] - }, - "Volo.Abp.PermissionManagement.UpdatePermissionsDto": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "Permissions", - "type": "[Volo.Abp.PermissionManagement.UpdatePermissionDto]", - "typeSimple": "[Volo.Abp.PermissionManagement.UpdatePermissionDto]" - } - ] - }, - "Volo.Abp.PermissionManagement.UpdatePermissionDto": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "Name", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "IsGranted", - "type": "System.Boolean", - "typeSimple": "boolean" - } - ] - }, - "Volo.Abp.TextTemplateManagement.TextTemplates.GetTemplateContentInput": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "TemplateName", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "CultureName", - "type": "System.String", - "typeSimple": "string" - } - ] - }, - "Volo.Abp.TextTemplateManagement.TextTemplates.TextTemplateContentDto": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "Name", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "CultureName", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Content", - "type": "System.String", - "typeSimple": "string" - } - ] - }, - "Volo.Abp.TextTemplateManagement.TextTemplates.RestoreTemplateContentInput": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "TemplateName", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "CultureName", - "type": "System.String", - "typeSimple": "string" - } - ] - }, - "Volo.Abp.TextTemplateManagement.TextTemplates.UpdateTemplateContentInput": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "TemplateName", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "CultureName", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Content", - "type": "System.String", - "typeSimple": "string" - } - ] - }, - "Volo.Abp.TextTemplateManagement.TextTemplates.GetTemplateDefinitionListInput": { - "baseType": "Volo.Abp.Application.Dtos.PagedAndSortedResultRequestDto", - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "FilterText", - "type": "System.String", - "typeSimple": "string" - } - ] - }, - "Volo.Abp.TextTemplateManagement.TextTemplates.TemplateDefinitionDto": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "Name", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "DisplayName", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "IsLayout", - "type": "System.Boolean", - "typeSimple": "boolean" - }, - { - "name": "Layout", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "IsInlineLocalized", - "type": "System.Boolean", - "typeSimple": "boolean" - }, - { - "name": "DefaultCultureName", - "type": "System.String", - "typeSimple": "string" - } - ] - }, - "Volo.Saas.Host.Dtos.EditionDto": { - "baseType": "Volo.Abp.Application.Dtos.ExtensibleEntityDto", - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "DisplayName", - "type": "System.String", - "typeSimple": "string" - } - ] - }, - "Volo.Saas.Host.Dtos.GetEditionsInput": { - "baseType": "Volo.Abp.Application.Dtos.PagedAndSortedResultRequestDto", - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "Filter", - "type": "System.String", - "typeSimple": "string" - } - ] - }, - "Volo.Saas.Host.Dtos.EditionCreateDto": { - "baseType": "Volo.Saas.Host.Dtos.EditionCreateOrUpdateDtoBase", - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [] - }, - "Volo.Saas.Host.Dtos.EditionCreateOrUpdateDtoBase": { - "baseType": "Volo.Abp.ObjectExtending.ExtensibleObject", - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "DisplayName", - "type": "System.String", - "typeSimple": "string" - } - ] - }, - "Volo.Saas.Host.Dtos.EditionUpdateDto": { - "baseType": "Volo.Saas.Host.Dtos.EditionCreateOrUpdateDtoBase", - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [] - }, - "Volo.Saas.Host.GetEditionUsageStatisticsResult": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "Data", - "type": "{System.String:System.Int32}", - "typeSimple": "{string:number}" - } - ] - }, - "Volo.Saas.Host.Dtos.SaasTenantDto": { - "baseType": "Volo.Abp.Application.Dtos.ExtensibleEntityDto", - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "Name", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "EditionId", - "type": "System.Guid?", - "typeSimple": "string?" - }, - { - "name": "EditionName", - "type": "System.String", - "typeSimple": "string" - } - ] - }, - "Volo.Saas.Host.Dtos.GetTenantsInput": { - "baseType": "Volo.Abp.Application.Dtos.PagedAndSortedResultRequestDto", - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "Filter", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "GetEditionNames", - "type": "System.Boolean", - "typeSimple": "boolean" - } - ] - }, - "Volo.Saas.Host.Dtos.SaasTenantCreateDto": { - "baseType": "Volo.Saas.Host.Dtos.SaasTenantCreateOrUpdateDtoBase", - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "AdminEmailAddress", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "AdminPassword", - "type": "System.String", - "typeSimple": "string" - } - ] - }, - "Volo.Saas.Host.Dtos.SaasTenantCreateOrUpdateDtoBase": { - "baseType": "Volo.Abp.ObjectExtending.ExtensibleObject", - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "Name", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "EditionId", - "type": "System.Guid?", - "typeSimple": "string?" - } - ] - }, - "Volo.Saas.Host.Dtos.SaasTenantUpdateDto": { - "baseType": "Volo.Saas.Host.Dtos.SaasTenantCreateOrUpdateDtoBase", - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [] - }, - "Volo.Abp.FeatureManagement.GetFeatureListResultDto": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "Groups", - "type": "[Volo.Abp.FeatureManagement.FeatureGroupDto]", - "typeSimple": "[Volo.Abp.FeatureManagement.FeatureGroupDto]" - } - ] - }, - "Volo.Abp.FeatureManagement.FeatureGroupDto": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "Name", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "DisplayName", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Features", - "type": "[Volo.Abp.FeatureManagement.FeatureDto]", - "typeSimple": "[Volo.Abp.FeatureManagement.FeatureDto]" - } - ] - }, - "Volo.Abp.FeatureManagement.FeatureDto": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "Name", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "DisplayName", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Value", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Provider", - "type": "Volo.Abp.FeatureManagement.FeatureProviderDto", - "typeSimple": "Volo.Abp.FeatureManagement.FeatureProviderDto" - }, - { - "name": "Description", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "ValueType", - "type": "Volo.Abp.Validation.StringValues.IStringValueType", - "typeSimple": "Volo.Abp.Validation.StringValues.IStringValueType" - }, - { - "name": "Depth", - "type": "System.Int32", - "typeSimple": "number" - }, - { - "name": "ParentName", - "type": "System.String", - "typeSimple": "string" - } - ] - }, - "Volo.Abp.FeatureManagement.FeatureProviderDto": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "Name", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Key", - "type": "System.String", - "typeSimple": "string" - } - ] - }, - "Volo.Abp.Validation.StringValues.IStringValueType": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "Name", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Item", - "type": "System.Object", - "typeSimple": "object" - }, - { - "name": "Properties", - "type": "{System.String:System.Object}", - "typeSimple": "{string:object}" - }, - { - "name": "Validator", - "type": "Volo.Abp.Validation.StringValues.IValueValidator", - "typeSimple": "Volo.Abp.Validation.StringValues.IValueValidator" - } - ] - }, - "Volo.Abp.Validation.StringValues.IValueValidator": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "Name", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Item", - "type": "System.Object", - "typeSimple": "object" - }, - { - "name": "Properties", - "type": "{System.String:System.Object}", - "typeSimple": "{string:object}" - } - ] - }, - "Volo.Abp.FeatureManagement.UpdateFeaturesDto": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "Features", - "type": "[Volo.Abp.FeatureManagement.UpdateFeatureDto]", - "typeSimple": "[Volo.Abp.FeatureManagement.UpdateFeatureDto]" - } - ] - }, - "Volo.Abp.FeatureManagement.UpdateFeatureDto": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "Name", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Value", - "type": "System.String", - "typeSimple": "string" - } - ] - }, - "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationConfigurationDto": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "Localization", - "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationLocalizationConfigurationDto", - "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationLocalizationConfigurationDto" - }, - { - "name": "Auth", - "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationAuthConfigurationDto", - "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationAuthConfigurationDto" - }, - { - "name": "Setting", - "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationSettingConfigurationDto", - "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationSettingConfigurationDto" - }, - { - "name": "CurrentUser", - "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.CurrentUserDto", - "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.CurrentUserDto" - }, - { - "name": "Features", - "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationFeatureConfigurationDto", - "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationFeatureConfigurationDto" - }, - { - "name": "MultiTenancy", - "type": "Volo.Abp.AspNetCore.Mvc.MultiTenancy.MultiTenancyInfoDto", - "typeSimple": "Volo.Abp.AspNetCore.Mvc.MultiTenancy.MultiTenancyInfoDto" - }, - { - "name": "CurrentTenant", - "type": "Volo.Abp.AspNetCore.Mvc.MultiTenancy.CurrentTenantDto", - "typeSimple": "Volo.Abp.AspNetCore.Mvc.MultiTenancy.CurrentTenantDto" - }, - { - "name": "Timing", - "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.TimingDto", - "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.TimingDto" - }, - { - "name": "Clock", - "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ClockDto", - "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ClockDto" - }, - { - "name": "ObjectExtensions", - "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ObjectExtensionsDto", - "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ObjectExtensionsDto" - } - ] - }, - "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationLocalizationConfigurationDto": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "Values", - "type": "{System.String:{System.String:System.String}}", - "typeSimple": "{string:{string:string}}" - }, - { - "name": "Languages", - "type": "[Volo.Abp.Localization.LanguageInfo]", - "typeSimple": "[Volo.Abp.Localization.LanguageInfo]" - }, - { - "name": "CurrentCulture", - "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.CurrentCultureDto", - "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.CurrentCultureDto" - }, - { - "name": "DefaultResourceName", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "LanguagesMap", - "type": "{System.String:[Volo.Abp.NameValue]}", - "typeSimple": "{string:[Volo.Abp.NameValue]}" - }, - { - "name": "LanguageFilesMap", - "type": "{System.String:[Volo.Abp.NameValue]}", - "typeSimple": "{string:[Volo.Abp.NameValue]}" - } - ] - }, - "Volo.Abp.Localization.LanguageInfo": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "CultureName", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "UiCultureName", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "DisplayName", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "FlagIcon", - "type": "System.String", - "typeSimple": "string" - } - ] - }, - "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.CurrentCultureDto": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "DisplayName", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "EnglishName", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "ThreeLetterIsoLanguageName", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "TwoLetterIsoLanguageName", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "IsRightToLeft", - "type": "System.Boolean", - "typeSimple": "boolean" - }, - { - "name": "CultureName", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Name", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "NativeName", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "DateTimeFormat", - "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.DateTimeFormatDto", - "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.DateTimeFormatDto" - } - ] - }, - "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.DateTimeFormatDto": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "CalendarAlgorithmType", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "DateTimeFormatLong", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "ShortDatePattern", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "FullDateTimePattern", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "DateSeparator", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "ShortTimePattern", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "LongTimePattern", - "type": "System.String", - "typeSimple": "string" - } - ] - }, - "Volo.Abp.NameValue": { - "baseType": "Volo.Abp.NameValue", - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [] - }, - "Volo.Abp.NameValue": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": [ - "T" - ], - "properties": [ - { - "name": "Name", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Value", - "type": "T", - "typeSimple": "T" - } - ] - }, - "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationAuthConfigurationDto": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "Policies", - "type": "{System.String:System.Boolean}", - "typeSimple": "{string:boolean}" - }, - { - "name": "GrantedPolicies", - "type": "{System.String:System.Boolean}", - "typeSimple": "{string:boolean}" - } - ] - }, - "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationSettingConfigurationDto": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "Values", - "type": "{System.String:System.String}", - "typeSimple": "{string:string}" - } - ] - }, - "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.CurrentUserDto": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "IsAuthenticated", - "type": "System.Boolean", - "typeSimple": "boolean" - }, - { - "name": "Id", - "type": "System.Guid?", - "typeSimple": "string?" - }, - { - "name": "TenantId", - "type": "System.Guid?", - "typeSimple": "string?" - }, - { - "name": "UserName", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Name", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "SurName", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Email", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "EmailVerified", - "type": "System.Boolean", - "typeSimple": "boolean" - }, - { - "name": "PhoneNumber", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "PhoneNumberVerified", - "type": "System.Boolean", - "typeSimple": "boolean" - }, - { - "name": "Roles", - "type": "[System.String]", - "typeSimple": "[string]" - } - ] - }, - "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationFeatureConfigurationDto": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "Values", - "type": "{System.String:System.String}", - "typeSimple": "{string:string}" - } - ] - }, - "Volo.Abp.AspNetCore.Mvc.MultiTenancy.MultiTenancyInfoDto": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "IsEnabled", - "type": "System.Boolean", - "typeSimple": "boolean" - } - ] - }, - "Volo.Abp.AspNetCore.Mvc.MultiTenancy.CurrentTenantDto": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "Id", - "type": "System.Guid?", - "typeSimple": "string?" - }, - { - "name": "Name", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "IsAvailable", - "type": "System.Boolean", - "typeSimple": "boolean" - } - ] - }, - "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.TimingDto": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "TimeZone", - "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.TimeZone", - "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.TimeZone" - } - ] - }, - "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.TimeZone": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "Iana", - "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.IanaTimeZone", - "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.IanaTimeZone" - }, - { - "name": "Windows", - "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.WindowsTimeZone", - "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.WindowsTimeZone" - } - ] - }, - "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.IanaTimeZone": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "TimeZoneName", - "type": "System.String", - "typeSimple": "string" - } - ] - }, - "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.WindowsTimeZone": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "TimeZoneId", - "type": "System.String", - "typeSimple": "string" - } - ] - }, - "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ClockDto": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "Kind", - "type": "System.String", - "typeSimple": "string" - } - ] - }, - "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ObjectExtensionsDto": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "Modules", - "type": "{System.String:Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ModuleExtensionDto}", - "typeSimple": "{string:Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ModuleExtensionDto}" - }, - { - "name": "Enums", - "type": "{System.String:Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionEnumDto}", - "typeSimple": "{string:Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionEnumDto}" - } - ] - }, - "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ModuleExtensionDto": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "Entities", - "type": "{System.String:Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.EntityExtensionDto}", - "typeSimple": "{string:Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.EntityExtensionDto}" - }, - { - "name": "Configuration", - "type": "{System.String:System.Object}", - "typeSimple": "{string:object}" - } - ] - }, - "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.EntityExtensionDto": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "Properties", - "type": "{System.String:Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyDto}", - "typeSimple": "{string:Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyDto}" - }, - { - "name": "Configuration", - "type": "{System.String:System.Object}", - "typeSimple": "{string:object}" - } - ] - }, - "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyDto": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "Type", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "TypeSimple", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "DisplayName", - "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.LocalizableStringDto", - "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.LocalizableStringDto" - }, - { - "name": "Api", - "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyApiDto", - "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyApiDto" - }, - { - "name": "Ui", - "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyUiDto", - "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyUiDto" - }, - { - "name": "Attributes", - "type": "[Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyAttributeDto]", - "typeSimple": "[Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyAttributeDto]" - }, - { - "name": "Configuration", - "type": "{System.String:System.Object}", - "typeSimple": "{string:object}" - }, - { - "name": "DefaultValue", - "type": "System.Object", - "typeSimple": "object" - } - ] - }, - "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.LocalizableStringDto": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "Name", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Resource", - "type": "System.String", - "typeSimple": "string" - } - ] - }, - "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyApiDto": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "OnGet", - "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyApiGetDto", - "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyApiGetDto" - }, - { - "name": "OnCreate", - "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyApiCreateDto", - "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyApiCreateDto" - }, - { - "name": "OnUpdate", - "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyApiUpdateDto", - "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyApiUpdateDto" - } - ] - }, - "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyApiGetDto": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "IsAvailable", - "type": "System.Boolean", - "typeSimple": "boolean" - } - ] - }, - "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyApiCreateDto": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "IsAvailable", - "type": "System.Boolean", - "typeSimple": "boolean" - } - ] - }, - "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyApiUpdateDto": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "IsAvailable", - "type": "System.Boolean", - "typeSimple": "boolean" - } - ] - }, - "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyUiDto": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "OnTable", - "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyUiTableDto", - "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyUiTableDto" - }, - { - "name": "OnCreateForm", - "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyUiFormDto", - "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyUiFormDto" - }, - { - "name": "OnEditForm", - "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyUiFormDto", - "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyUiFormDto" - } - ] - }, - "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyUiTableDto": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "IsVisible", - "type": "System.Boolean", - "typeSimple": "boolean" - } - ] - }, - "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyUiFormDto": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "IsVisible", - "type": "System.Boolean", - "typeSimple": "boolean" - } - ] - }, - "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyAttributeDto": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "TypeSimple", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Config", - "type": "{System.String:System.Object}", - "typeSimple": "{string:object}" - } - ] - }, - "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionEnumDto": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "Fields", - "type": "[Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionEnumFieldDto]", - "typeSimple": "[Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionEnumFieldDto]" - }, - { - "name": "LocalizationResource", - "type": "System.String", - "typeSimple": "string" - } - ] - }, - "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionEnumFieldDto": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "Name", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Value", - "type": "System.Object", - "typeSimple": "object" - } - ] - }, - "Volo.Abp.Http.Modeling.ApplicationApiDescriptionModelRequestDto": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "IncludeTypes", - "type": "System.Boolean", - "typeSimple": "boolean" - } - ] - }, - "Volo.Abp.Http.Modeling.ApplicationApiDescriptionModel": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "Modules", - "type": "{System.String:Volo.Abp.Http.Modeling.ModuleApiDescriptionModel}", - "typeSimple": "{string:Volo.Abp.Http.Modeling.ModuleApiDescriptionModel}" - }, - { - "name": "Types", - "type": "{System.String:Volo.Abp.Http.Modeling.TypeApiDescriptionModel}", - "typeSimple": "{string:Volo.Abp.Http.Modeling.TypeApiDescriptionModel}" - } - ] - }, - "Volo.Abp.Http.Modeling.ModuleApiDescriptionModel": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "RootPath", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "RemoteServiceName", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Controllers", - "type": "{System.String:Volo.Abp.Http.Modeling.ControllerApiDescriptionModel}", - "typeSimple": "{string:Volo.Abp.Http.Modeling.ControllerApiDescriptionModel}" - } - ] - }, - "Volo.Abp.Http.Modeling.ControllerApiDescriptionModel": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "ControllerName", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Type", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Interfaces", - "type": "[Volo.Abp.Http.Modeling.ControllerInterfaceApiDescriptionModel]", - "typeSimple": "[Volo.Abp.Http.Modeling.ControllerInterfaceApiDescriptionModel]" - }, - { - "name": "Actions", - "type": "{System.String:Volo.Abp.Http.Modeling.ActionApiDescriptionModel}", - "typeSimple": "{string:Volo.Abp.Http.Modeling.ActionApiDescriptionModel}" - } - ] - }, - "Volo.Abp.Http.Modeling.ControllerInterfaceApiDescriptionModel": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "Type", - "type": "System.String", - "typeSimple": "string" - } - ] - }, - "Volo.Abp.Http.Modeling.ActionApiDescriptionModel": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "UniqueName", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Name", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "HttpMethod", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Url", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "SupportedVersions", - "type": "[System.String]", - "typeSimple": "[string]" - }, - { - "name": "ParametersOnMethod", - "type": "[Volo.Abp.Http.Modeling.MethodParameterApiDescriptionModel]", - "typeSimple": "[Volo.Abp.Http.Modeling.MethodParameterApiDescriptionModel]" - }, - { - "name": "Parameters", - "type": "[Volo.Abp.Http.Modeling.ParameterApiDescriptionModel]", - "typeSimple": "[Volo.Abp.Http.Modeling.ParameterApiDescriptionModel]" - }, - { - "name": "ReturnValue", - "type": "Volo.Abp.Http.Modeling.ReturnValueApiDescriptionModel", - "typeSimple": "Volo.Abp.Http.Modeling.ReturnValueApiDescriptionModel" - } - ] - }, - "Volo.Abp.Http.Modeling.MethodParameterApiDescriptionModel": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "Name", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "TypeAsString", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Type", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "TypeSimple", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "IsOptional", - "type": "System.Boolean", - "typeSimple": "boolean" - }, - { - "name": "DefaultValue", - "type": "System.Object", - "typeSimple": "object" - } - ] - }, - "Volo.Abp.Http.Modeling.ParameterApiDescriptionModel": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "NameOnMethod", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Name", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Type", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "TypeSimple", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "IsOptional", - "type": "System.Boolean", - "typeSimple": "boolean" - }, - { - "name": "DefaultValue", - "type": "System.Object", - "typeSimple": "object" - }, - { - "name": "ConstraintTypes", - "type": "[System.String]", - "typeSimple": "[string]" - }, - { - "name": "BindingSourceId", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "DescriptorName", - "type": "System.String", - "typeSimple": "string" - } - ] - }, - "Volo.Abp.Http.Modeling.ReturnValueApiDescriptionModel": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "Type", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "TypeSimple", - "type": "System.String", - "typeSimple": "string" - } - ] - }, - "Volo.Abp.Http.Modeling.TypeApiDescriptionModel": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "BaseType", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "IsEnum", - "type": "System.Boolean", - "typeSimple": "boolean" - }, - { - "name": "EnumNames", - "type": "[System.String]", - "typeSimple": "[string]" - }, - { - "name": "EnumValues", - "type": "[System.Object]", - "typeSimple": "[object]" - }, - { - "name": "GenericArguments", - "type": "[System.String]", - "typeSimple": "[string]" - }, - { - "name": "Properties", - "type": "[Volo.Abp.Http.Modeling.PropertyApiDescriptionModel]", - "typeSimple": "[Volo.Abp.Http.Modeling.PropertyApiDescriptionModel]" - } - ] - }, - "Volo.Abp.Http.Modeling.PropertyApiDescriptionModel": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "Name", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Type", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "TypeSimple", - "type": "System.String", - "typeSimple": "string" - } - ] - } - } -} \ No newline at end of file diff --git a/npm/ng-packs/packages/feature-management/src/lib/proxy/index.ts b/npm/ng-packs/packages/feature-management/src/lib/proxy/index.ts deleted file mode 100644 index 68eb7e2964..0000000000 --- a/npm/ng-packs/packages/feature-management/src/lib/proxy/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * as FeatureManagement from './feature-management'; -export * as Validation from './validation'; diff --git a/npm/ng-packs/packages/feature-management/src/lib/proxy/validation/index.ts b/npm/ng-packs/packages/feature-management/src/lib/proxy/validation/index.ts deleted file mode 100644 index bcd4535b81..0000000000 --- a/npm/ng-packs/packages/feature-management/src/lib/proxy/validation/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * as StringValues from './string-values'; diff --git a/npm/ng-packs/packages/feature-management/src/public-api.ts b/npm/ng-packs/packages/feature-management/src/public-api.ts index 10c71be72a..c52b944e86 100644 --- a/npm/ng-packs/packages/feature-management/src/public-api.ts +++ b/npm/ng-packs/packages/feature-management/src/public-api.ts @@ -2,5 +2,3 @@ export * from './lib/components'; export * from './lib/directives'; export * from './lib/enums/components'; export * from './lib/feature-management.module'; -export * from './lib/proxy/feature-management'; -export * from './lib/proxy/validation/string-values'; diff --git a/npm/ng-packs/packages/feature-management/tsconfig.json b/npm/ng-packs/packages/feature-management/tsconfig.json index 62ebbd9464..546e940e20 100644 --- a/npm/ng-packs/packages/feature-management/tsconfig.json +++ b/npm/ng-packs/packages/feature-management/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../tsconfig.json", "files": [], "include": [], "references": [ diff --git a/npm/ng-packs/packages/identity/proxy/ng-package.json b/npm/ng-packs/packages/identity/proxy/ng-package.json new file mode 100644 index 0000000000..358d3ad820 --- /dev/null +++ b/npm/ng-packs/packages/identity/proxy/ng-package.json @@ -0,0 +1,7 @@ +{ + "$schema": "../../../node_modules/ng-packagr/ng-package.schema.json", + "dest": "../../../dist/packages/identity/proxy", + "lib": { + "entryFile": "src/public-api.ts" + } +} diff --git a/npm/ng-packs/packages/identity/proxy/src/lib/index.ts b/npm/ng-packs/packages/identity/proxy/src/lib/index.ts new file mode 100644 index 0000000000..5ecaafbcfd --- /dev/null +++ b/npm/ng-packs/packages/identity/proxy/src/lib/index.ts @@ -0,0 +1,2 @@ +export * from './proxy/identity'; +export * from './proxy/users'; diff --git a/npm/ng-packs/packages/tenant-management/src/lib/proxy/README.md b/npm/ng-packs/packages/identity/proxy/src/lib/proxy/README.md similarity index 100% rename from npm/ng-packs/packages/tenant-management/src/lib/proxy/README.md rename to npm/ng-packs/packages/identity/proxy/src/lib/proxy/README.md diff --git a/npm/ng-packs/packages/identity/src/lib/proxy/generate-proxy.json b/npm/ng-packs/packages/identity/proxy/src/lib/proxy/generate-proxy.json similarity index 72% rename from npm/ng-packs/packages/identity/src/lib/proxy/generate-proxy.json rename to npm/ng-packs/packages/identity/proxy/src/lib/proxy/generate-proxy.json index 22d15ae64c..5018ccbc24 100644 --- a/npm/ng-packs/packages/identity/src/lib/proxy/generate-proxy.json +++ b/npm/ng-packs/packages/identity/proxy/src/lib/proxy/generate-proxy.json @@ -3,197 +3,140 @@ "identity" ], "modules": { - "identity": { - "rootPath": "identity", - "remoteServiceName": "AbpIdentity", + "featureManagement": { + "rootPath": "featureManagement", + "remoteServiceName": "AbpFeatureManagement", "controllers": { - "Volo.Abp.Identity.IdentityRoleController": { - "controllerName": "IdentityRole", - "type": "Volo.Abp.Identity.IdentityRoleController", + "Volo.Abp.FeatureManagement.FeaturesController": { + "controllerName": "Features", + "controllerGroupName": "Features", + "type": "Volo.Abp.FeatureManagement.FeaturesController", "interfaces": [ { - "type": "Volo.Abp.Identity.IIdentityRoleAppService" + "type": "Volo.Abp.FeatureManagement.IFeatureAppService" } ], "actions": { - "GetAllListAsync": { - "uniqueName": "GetAllListAsync", - "name": "GetAllListAsync", - "httpMethod": "GET", - "url": "api/identity/roles/all", - "supportedVersions": [], - "parametersOnMethod": [], - "parameters": [], - "returnValue": { - "type": "Volo.Abp.Application.Dtos.ListResultDto", - "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" - } - }, - "GetListAsyncByInput": { - "uniqueName": "GetListAsyncByInput", - "name": "GetListAsync", + "GetAsyncByProviderNameAndProviderKey": { + "uniqueName": "GetAsyncByProviderNameAndProviderKey", + "name": "GetAsync", "httpMethod": "GET", - "url": "api/identity/roles", + "url": "api/feature-management/features", "supportedVersions": [], "parametersOnMethod": [ { - "name": "input", - "typeAsString": "Volo.Abp.Application.Dtos.PagedAndSortedResultRequestDto, Volo.Abp.Ddd.Application.Contracts", - "type": "Volo.Abp.Application.Dtos.PagedAndSortedResultRequestDto", - "typeSimple": "Volo.Abp.Application.Dtos.PagedAndSortedResultRequestDto", + "name": "providerName", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "providerKey", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", "isOptional": false, "defaultValue": null } ], "parameters": [ { - "nameOnMethod": "input", - "name": "Sorting", + "nameOnMethod": "providerName", + "name": "providerName", + "jsonName": null, "type": "System.String", "typeSimple": "string", "isOptional": false, "defaultValue": null, "constraintTypes": null, "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "SkipCount", - "type": "System.Int32", - "typeSimple": "number", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" + "descriptorName": "" }, { - "nameOnMethod": "input", - "name": "MaxResultCount", - "type": "System.Int32", - "typeSimple": "number", + "nameOnMethod": "providerKey", + "name": "providerKey", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", "isOptional": false, "defaultValue": null, "constraintTypes": null, "bindingSourceId": "ModelBinding", - "descriptorName": "input" + "descriptorName": "" } ], "returnValue": { - "type": "Volo.Abp.Application.Dtos.PagedResultDto", - "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" - } + "type": "Volo.Abp.FeatureManagement.GetFeatureListResultDto", + "typeSimple": "Volo.Abp.FeatureManagement.GetFeatureListResultDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.FeatureManagement.IFeatureAppService" }, - "GetAsyncById": { - "uniqueName": "GetAsyncById", - "name": "GetAsync", - "httpMethod": "GET", - "url": "api/identity/roles/{id}", + "UpdateAsyncByProviderNameAndProviderKeyAndInput": { + "uniqueName": "UpdateAsyncByProviderNameAndProviderKeyAndInput", + "name": "UpdateAsync", + "httpMethod": "PUT", + "url": "api/feature-management/features", "supportedVersions": [], "parametersOnMethod": [ { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", + "name": "providerName", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", "typeSimple": "string", "isOptional": false, "defaultValue": null - } - ], - "parameters": [ + }, { - "nameOnMethod": "id", - "name": "id", - "type": "System.Guid", + "name": "providerKey", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", "typeSimple": "string", "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - } - ], - "returnValue": { - "type": "Volo.Abp.Identity.IdentityRoleDto", - "typeSimple": "Volo.Abp.Identity.IdentityRoleDto" - } - }, - "CreateAsyncByInput": { - "uniqueName": "CreateAsyncByInput", - "name": "CreateAsync", - "httpMethod": "POST", - "url": "api/identity/roles", - "supportedVersions": [], - "parametersOnMethod": [ + "defaultValue": null + }, { "name": "input", - "typeAsString": "Volo.Abp.Identity.IdentityRoleCreateDto, Volo.Abp.Identity.Application.Contracts", - "type": "Volo.Abp.Identity.IdentityRoleCreateDto", - "typeSimple": "Volo.Abp.Identity.IdentityRoleCreateDto", + "typeAsString": "Volo.Abp.FeatureManagement.UpdateFeaturesDto, Volo.Abp.FeatureManagement.Application.Contracts", + "type": "Volo.Abp.FeatureManagement.UpdateFeaturesDto", + "typeSimple": "Volo.Abp.FeatureManagement.UpdateFeaturesDto", "isOptional": false, "defaultValue": null } ], "parameters": [ { - "nameOnMethod": "input", - "name": "input", - "type": "Volo.Abp.Identity.IdentityRoleCreateDto", - "typeSimple": "Volo.Abp.Identity.IdentityRoleCreateDto", + "nameOnMethod": "providerName", + "name": "providerName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", "isOptional": false, "defaultValue": null, "constraintTypes": null, - "bindingSourceId": "Body", + "bindingSourceId": "ModelBinding", "descriptorName": "" - } - ], - "returnValue": { - "type": "Volo.Abp.Identity.IdentityRoleDto", - "typeSimple": "Volo.Abp.Identity.IdentityRoleDto" - } - }, - "UpdateAsyncByIdAndInput": { - "uniqueName": "UpdateAsyncByIdAndInput", - "name": "UpdateAsync", - "httpMethod": "PUT", - "url": "api/identity/roles/{id}", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null }, { - "name": "input", - "typeAsString": "Volo.Abp.Identity.IdentityRoleUpdateDto, Volo.Abp.Identity.Application.Contracts", - "type": "Volo.Abp.Identity.IdentityRoleUpdateDto", - "typeSimple": "Volo.Abp.Identity.IdentityRoleUpdateDto", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "id", - "name": "id", - "type": "System.Guid", + "nameOnMethod": "providerKey", + "name": "providerKey", + "jsonName": null, + "type": "System.String", "typeSimple": "string", "isOptional": false, "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", + "constraintTypes": null, + "bindingSourceId": "ModelBinding", "descriptorName": "" }, { "nameOnMethod": "input", "name": "input", - "type": "Volo.Abp.Identity.IdentityRoleUpdateDto", - "typeSimple": "Volo.Abp.Identity.IdentityRoleUpdateDto", + "jsonName": null, + "type": "Volo.Abp.FeatureManagement.UpdateFeaturesDto", + "typeSimple": "Volo.Abp.FeatureManagement.UpdateFeaturesDto", "isOptional": false, "defaultValue": null, "constraintTypes": null, @@ -201,53 +144,28 @@ "descriptorName": "" } ], - "returnValue": { - "type": "Volo.Abp.Identity.IdentityRoleDto", - "typeSimple": "Volo.Abp.Identity.IdentityRoleDto" - } - }, - "DeleteAsyncById": { - "uniqueName": "DeleteAsyncById", - "name": "DeleteAsync", - "httpMethod": "DELETE", - "url": "api/identity/roles/{id}", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "id", - "name": "id", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - } - ], "returnValue": { "type": "System.Void", "typeSimple": "System.Void" - } + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.FeatureManagement.IFeatureAppService" } } - }, - "Volo.Abp.Identity.IdentityUserController": { - "controllerName": "IdentityUser", - "type": "Volo.Abp.Identity.IdentityUserController", + } + } + }, + "multi-tenancy": { + "rootPath": "multi-tenancy", + "remoteServiceName": "AbpTenantManagement", + "controllers": { + "Volo.Abp.TenantManagement.TenantController": { + "controllerName": "Tenant", + "controllerGroupName": "Tenant", + "type": "Volo.Abp.TenantManagement.TenantController", "interfaces": [ { - "type": "Volo.Abp.Identity.IIdentityUserAppService" + "type": "Volo.Abp.TenantManagement.ITenantAppService" } ], "actions": { @@ -255,7 +173,7 @@ "uniqueName": "GetAsyncById", "name": "GetAsync", "httpMethod": "GET", - "url": "api/identity/users/{id}", + "url": "api/multi-tenancy/tenants/{id}", "supportedVersions": [], "parametersOnMethod": [ { @@ -271,6 +189,7 @@ { "nameOnMethod": "id", "name": "id", + "jsonName": null, "type": "System.Guid", "typeSimple": "string", "isOptional": false, @@ -281,22 +200,24 @@ } ], "returnValue": { - "type": "Volo.Abp.Identity.IdentityUserDto", - "typeSimple": "Volo.Abp.Identity.IdentityUserDto" - } + "type": "Volo.Abp.TenantManagement.TenantDto", + "typeSimple": "Volo.Abp.TenantManagement.TenantDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.IReadOnlyAppService" }, "GetListAsyncByInput": { "uniqueName": "GetListAsyncByInput", "name": "GetListAsync", "httpMethod": "GET", - "url": "api/identity/users", + "url": "api/multi-tenancy/tenants", "supportedVersions": [], "parametersOnMethod": [ { "name": "input", - "typeAsString": "Volo.Abp.Identity.GetIdentityUsersInput, Volo.Abp.Identity.Application.Contracts", - "type": "Volo.Abp.Identity.GetIdentityUsersInput", - "typeSimple": "Volo.Abp.Identity.GetIdentityUsersInput", + "typeAsString": "Volo.Abp.TenantManagement.GetTenantsInput, Volo.Abp.TenantManagement.Application.Contracts", + "type": "Volo.Abp.TenantManagement.GetTenantsInput", + "typeSimple": "Volo.Abp.TenantManagement.GetTenantsInput", "isOptional": false, "defaultValue": null } @@ -305,6 +226,7 @@ { "nameOnMethod": "input", "name": "Filter", + "jsonName": null, "type": "System.String", "typeSimple": "string", "isOptional": false, @@ -316,6 +238,7 @@ { "nameOnMethod": "input", "name": "Sorting", + "jsonName": null, "type": "System.String", "typeSimple": "string", "isOptional": false, @@ -327,6 +250,7 @@ { "nameOnMethod": "input", "name": "SkipCount", + "jsonName": null, "type": "System.Int32", "typeSimple": "number", "isOptional": false, @@ -338,6 +262,7 @@ { "nameOnMethod": "input", "name": "MaxResultCount", + "jsonName": null, "type": "System.Int32", "typeSimple": "number", "isOptional": false, @@ -348,23 +273,25 @@ } ], "returnValue": { - "type": "Volo.Abp.Application.Dtos.PagedResultDto", - "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" - } + "type": "Volo.Abp.Application.Dtos.PagedResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.IReadOnlyAppService" }, "CreateAsyncByInput": { "uniqueName": "CreateAsyncByInput", "name": "CreateAsync", "httpMethod": "POST", - "url": "api/identity/users", + "url": "api/multi-tenancy/tenants", "supportedVersions": [], "parametersOnMethod": [ { "name": "input", - "typeAsString": "Volo.Abp.Identity.IdentityUserCreateDto, Volo.Abp.Identity.Application.Contracts", - "type": "Volo.Abp.Identity.IdentityUserCreateDto", - "typeSimple": "Volo.Abp.Identity.IdentityUserCreateDto", - "isOptional": false, + "typeAsString": "Volo.Abp.TenantManagement.TenantCreateDto, Volo.Abp.TenantManagement.Application.Contracts", + "type": "Volo.Abp.TenantManagement.TenantCreateDto", + "typeSimple": "Volo.Abp.TenantManagement.TenantCreateDto", + "isOptional": false, "defaultValue": null } ], @@ -372,8 +299,9 @@ { "nameOnMethod": "input", "name": "input", - "type": "Volo.Abp.Identity.IdentityUserCreateDto", - "typeSimple": "Volo.Abp.Identity.IdentityUserCreateDto", + "jsonName": null, + "type": "Volo.Abp.TenantManagement.TenantCreateDto", + "typeSimple": "Volo.Abp.TenantManagement.TenantCreateDto", "isOptional": false, "defaultValue": null, "constraintTypes": null, @@ -382,15 +310,17 @@ } ], "returnValue": { - "type": "Volo.Abp.Identity.IdentityUserDto", - "typeSimple": "Volo.Abp.Identity.IdentityUserDto" - } + "type": "Volo.Abp.TenantManagement.TenantDto", + "typeSimple": "Volo.Abp.TenantManagement.TenantDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.ICreateAppService" }, "UpdateAsyncByIdAndInput": { "uniqueName": "UpdateAsyncByIdAndInput", "name": "UpdateAsync", "httpMethod": "PUT", - "url": "api/identity/users/{id}", + "url": "api/multi-tenancy/tenants/{id}", "supportedVersions": [], "parametersOnMethod": [ { @@ -403,9 +333,9 @@ }, { "name": "input", - "typeAsString": "Volo.Abp.Identity.IdentityUserUpdateDto, Volo.Abp.Identity.Application.Contracts", - "type": "Volo.Abp.Identity.IdentityUserUpdateDto", - "typeSimple": "Volo.Abp.Identity.IdentityUserUpdateDto", + "typeAsString": "Volo.Abp.TenantManagement.TenantUpdateDto, Volo.Abp.TenantManagement.Application.Contracts", + "type": "Volo.Abp.TenantManagement.TenantUpdateDto", + "typeSimple": "Volo.Abp.TenantManagement.TenantUpdateDto", "isOptional": false, "defaultValue": null } @@ -414,6 +344,7 @@ { "nameOnMethod": "id", "name": "id", + "jsonName": null, "type": "System.Guid", "typeSimple": "string", "isOptional": false, @@ -425,8 +356,9 @@ { "nameOnMethod": "input", "name": "input", - "type": "Volo.Abp.Identity.IdentityUserUpdateDto", - "typeSimple": "Volo.Abp.Identity.IdentityUserUpdateDto", + "jsonName": null, + "type": "Volo.Abp.TenantManagement.TenantUpdateDto", + "typeSimple": "Volo.Abp.TenantManagement.TenantUpdateDto", "isOptional": false, "defaultValue": null, "constraintTypes": null, @@ -435,15 +367,17 @@ } ], "returnValue": { - "type": "Volo.Abp.Identity.IdentityUserDto", - "typeSimple": "Volo.Abp.Identity.IdentityUserDto" - } + "type": "Volo.Abp.TenantManagement.TenantDto", + "typeSimple": "Volo.Abp.TenantManagement.TenantDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.IUpdateAppService" }, "DeleteAsyncById": { "uniqueName": "DeleteAsyncById", "name": "DeleteAsync", "httpMethod": "DELETE", - "url": "api/identity/users/{id}", + "url": "api/multi-tenancy/tenants/{id}", "supportedVersions": [], "parametersOnMethod": [ { @@ -459,6 +393,7 @@ { "nameOnMethod": "id", "name": "id", + "jsonName": null, "type": "System.Guid", "typeSimple": "string", "isOptional": false, @@ -471,13 +406,15 @@ "returnValue": { "type": "System.Void", "typeSimple": "System.Void" - } + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.IDeleteAppService" }, - "GetRolesAsyncById": { - "uniqueName": "GetRolesAsyncById", - "name": "GetRolesAsync", + "GetDefaultConnectionStringAsyncById": { + "uniqueName": "GetDefaultConnectionStringAsyncById", + "name": "GetDefaultConnectionStringAsync", "httpMethod": "GET", - "url": "api/identity/users/{id}/roles", + "url": "api/multi-tenancy/tenants/{id}/default-connection-string", "supportedVersions": [], "parametersOnMethod": [ { @@ -493,6 +430,7 @@ { "nameOnMethod": "id", "name": "id", + "jsonName": null, "type": "System.Guid", "typeSimple": "string", "isOptional": false, @@ -503,28 +441,17 @@ } ], "returnValue": { - "type": "Volo.Abp.Application.Dtos.ListResultDto", - "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" - } - }, - "GetAssignableRolesAsync": { - "uniqueName": "GetAssignableRolesAsync", - "name": "GetAssignableRolesAsync", - "httpMethod": "GET", - "url": "api/identity/users/assignable-roles", - "supportedVersions": [], - "parametersOnMethod": [], - "parameters": [], - "returnValue": { - "type": "Volo.Abp.Application.Dtos.ListResultDto", - "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" - } + "type": "System.String", + "typeSimple": "string" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.TenantManagement.ITenantAppService" }, - "UpdateRolesAsyncByIdAndInput": { - "uniqueName": "UpdateRolesAsyncByIdAndInput", - "name": "UpdateRolesAsync", + "UpdateDefaultConnectionStringAsyncByIdAndDefaultConnectionString": { + "uniqueName": "UpdateDefaultConnectionStringAsyncByIdAndDefaultConnectionString", + "name": "UpdateDefaultConnectionStringAsync", "httpMethod": "PUT", - "url": "api/identity/users/{id}/roles", + "url": "api/multi-tenancy/tenants/{id}/default-connection-string", "supportedVersions": [], "parametersOnMethod": [ { @@ -536,10 +463,10 @@ "defaultValue": null }, { - "name": "input", - "typeAsString": "Volo.Abp.Identity.IdentityUserUpdateRolesDto, Volo.Abp.Identity.Application.Contracts", - "type": "Volo.Abp.Identity.IdentityUserUpdateRolesDto", - "typeSimple": "Volo.Abp.Identity.IdentityUserUpdateRolesDto", + "name": "defaultConnectionString", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", "isOptional": false, "defaultValue": null } @@ -548,6 +475,7 @@ { "nameOnMethod": "id", "name": "id", + "jsonName": null, "type": "System.Guid", "typeSimple": "string", "isOptional": false, @@ -557,67 +485,36 @@ "descriptorName": "" }, { - "nameOnMethod": "input", - "name": "input", - "type": "Volo.Abp.Identity.IdentityUserUpdateRolesDto", - "typeSimple": "Volo.Abp.Identity.IdentityUserUpdateRolesDto", + "nameOnMethod": "defaultConnectionString", + "name": "defaultConnectionString", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", "isOptional": false, "defaultValue": null, "constraintTypes": null, - "bindingSourceId": "Body", + "bindingSourceId": "ModelBinding", "descriptorName": "" } ], "returnValue": { "type": "System.Void", "typeSimple": "System.Void" - } - }, - "FindByUsernameAsyncByUsername": { - "uniqueName": "FindByUsernameAsyncByUsername", - "name": "FindByUsernameAsync", - "httpMethod": "GET", - "url": "api/identity/users/by-username/{userName}", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "username", - "typeAsString": "System.String, System.Private.CoreLib", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "username", - "name": "username", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - } - ], - "returnValue": { - "type": "Volo.Abp.Identity.IdentityUserDto", - "typeSimple": "Volo.Abp.Identity.IdentityUserDto" - } + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.TenantManagement.ITenantAppService" }, - "FindByEmailAsyncByEmail": { - "uniqueName": "FindByEmailAsyncByEmail", - "name": "FindByEmailAsync", - "httpMethod": "GET", - "url": "api/identity/users/by-email/{email}", + "DeleteDefaultConnectionStringAsyncById": { + "uniqueName": "DeleteDefaultConnectionStringAsyncById", + "name": "DeleteDefaultConnectionStringAsync", + "httpMethod": "DELETE", + "url": "api/multi-tenancy/tenants/{id}/default-connection-string", "supportedVersions": [], "parametersOnMethod": [ { - "name": "email", - "typeAsString": "System.String, System.Private.CoreLib", - "type": "System.String", + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", "typeSimple": "string", "isOptional": false, "defaultValue": null @@ -625,9 +522,10 @@ ], "parameters": [ { - "nameOnMethod": "email", - "name": "email", - "type": "System.String", + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", "typeSimple": "string", "isOptional": false, "defaultValue": null, @@ -637,101 +535,116 @@ } ], "returnValue": { - "type": "Volo.Abp.Identity.IdentityUserDto", - "typeSimple": "Volo.Abp.Identity.IdentityUserDto" - } + "type": "System.Void", + "typeSimple": "System.Void" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.TenantManagement.ITenantAppService" } } - }, - "Volo.Abp.Identity.IdentityUserLookupController": { - "controllerName": "IdentityUserLookup", - "type": "Volo.Abp.Identity.IdentityUserLookupController", + } + } + }, + "account": { + "rootPath": "account", + "remoteServiceName": "AbpAccount", + "controllers": { + "Volo.Abp.Account.AccountController": { + "controllerName": "Account", + "controllerGroupName": "Account", + "type": "Volo.Abp.Account.AccountController", "interfaces": [ { - "type": "Volo.Abp.Identity.IIdentityUserLookupAppService" + "type": "Volo.Abp.Account.IAccountAppService" } ], "actions": { - "FindByIdAsyncById": { - "uniqueName": "FindByIdAsyncById", - "name": "FindByIdAsync", - "httpMethod": "GET", - "url": "api/identity/users/lookup/{id}", + "RegisterAsyncByInput": { + "uniqueName": "RegisterAsyncByInput", + "name": "RegisterAsync", + "httpMethod": "POST", + "url": "api/account/register", "supportedVersions": [], "parametersOnMethod": [ { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", + "name": "input", + "typeAsString": "Volo.Abp.Account.RegisterDto, Volo.Abp.Account.Application.Contracts", + "type": "Volo.Abp.Account.RegisterDto", + "typeSimple": "Volo.Abp.Account.RegisterDto", "isOptional": false, "defaultValue": null } ], "parameters": [ { - "nameOnMethod": "id", - "name": "id", - "type": "System.Guid", - "typeSimple": "string", + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Volo.Abp.Account.RegisterDto", + "typeSimple": "Volo.Abp.Account.RegisterDto", "isOptional": false, "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", + "constraintTypes": null, + "bindingSourceId": "Body", "descriptorName": "" } ], "returnValue": { - "type": "Volo.Abp.Users.UserData", - "typeSimple": "Volo.Abp.Users.UserData" - } + "type": "Volo.Abp.Identity.IdentityUserDto", + "typeSimple": "Volo.Abp.Identity.IdentityUserDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Account.IAccountAppService" }, - "FindByUserNameAsyncByUserName": { - "uniqueName": "FindByUserNameAsyncByUserName", - "name": "FindByUserNameAsync", - "httpMethod": "GET", - "url": "api/identity/users/lookup/by-username/{userName}", + "SendPasswordResetCodeAsyncByInput": { + "uniqueName": "SendPasswordResetCodeAsyncByInput", + "name": "SendPasswordResetCodeAsync", + "httpMethod": "POST", + "url": "api/account/send-password-reset-code", "supportedVersions": [], "parametersOnMethod": [ { - "name": "userName", - "typeAsString": "System.String, System.Private.CoreLib", - "type": "System.String", - "typeSimple": "string", + "name": "input", + "typeAsString": "Volo.Abp.Account.SendPasswordResetCodeDto, Volo.Abp.Account.Application.Contracts", + "type": "Volo.Abp.Account.SendPasswordResetCodeDto", + "typeSimple": "Volo.Abp.Account.SendPasswordResetCodeDto", "isOptional": false, "defaultValue": null } ], "parameters": [ { - "nameOnMethod": "userName", - "name": "userName", - "type": "System.String", - "typeSimple": "string", + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Volo.Abp.Account.SendPasswordResetCodeDto", + "typeSimple": "Volo.Abp.Account.SendPasswordResetCodeDto", "isOptional": false, "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", + "constraintTypes": null, + "bindingSourceId": "Body", "descriptorName": "" } ], "returnValue": { - "type": "Volo.Abp.Users.UserData", - "typeSimple": "Volo.Abp.Users.UserData" - } + "type": "System.Void", + "typeSimple": "System.Void" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Account.IAccountAppService" }, - "SearchAsyncByInput": { - "uniqueName": "SearchAsyncByInput", - "name": "SearchAsync", - "httpMethod": "GET", - "url": "api/identity/users/lookup/search", + "ResetPasswordAsyncByInput": { + "uniqueName": "ResetPasswordAsyncByInput", + "name": "ResetPasswordAsync", + "httpMethod": "POST", + "url": "api/account/reset-password", "supportedVersions": [], "parametersOnMethod": [ { "name": "input", - "typeAsString": "Volo.Abp.Identity.UserLookupSearchInputDto, Volo.Abp.Identity.Application.Contracts", - "type": "Volo.Abp.Identity.UserLookupSearchInputDto", - "typeSimple": "Volo.Abp.Identity.UserLookupSearchInputDto", + "typeAsString": "Volo.Abp.Account.ResetPasswordDto, Volo.Abp.Account.Application.Contracts", + "type": "Volo.Abp.Account.ResetPasswordDto", + "typeSimple": "Volo.Abp.Account.ResetPasswordDto", "isOptional": false, "defaultValue": null } @@ -739,96 +652,136 @@ "parameters": [ { "nameOnMethod": "input", - "name": "Filter", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "Sorting", - "type": "System.String", - "typeSimple": "string", + "name": "input", + "jsonName": null, + "type": "Volo.Abp.Account.ResetPasswordDto", + "typeSimple": "Volo.Abp.Account.ResetPasswordDto", "isOptional": false, "defaultValue": null, "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "SkipCount", - "type": "System.Int32", - "typeSimple": "number", + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Account.IAccountAppService" + } + } + }, + "Volo.Abp.Account.Web.Areas.Account.Controllers.AccountController": { + "controllerName": "Account", + "controllerGroupName": "Login", + "type": "Volo.Abp.Account.Web.Areas.Account.Controllers.AccountController", + "interfaces": [], + "actions": { + "LoginByLogin": { + "uniqueName": "LoginByLogin", + "name": "Login", + "httpMethod": "POST", + "url": "api/account/login", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "login", + "typeAsString": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo, Volo.Abp.Account.Web", + "type": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo", + "typeSimple": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo", "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, + "defaultValue": null + } + ], + "parameters": [ { - "nameOnMethod": "input", - "name": "MaxResultCount", - "type": "System.Int32", - "typeSimple": "number", + "nameOnMethod": "login", + "name": "login", + "jsonName": null, + "type": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo", + "typeSimple": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo", "isOptional": false, "defaultValue": null, "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" + "bindingSourceId": "Body", + "descriptorName": "" } ], "returnValue": { - "type": "Volo.Abp.Application.Dtos.ListResultDto", - "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" - } + "type": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.AbpLoginResult", + "typeSimple": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.AbpLoginResult" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Account.Web.Areas.Account.Controllers.AccountController" }, - "GetCountAsyncByInput": { - "uniqueName": "GetCountAsyncByInput", - "name": "GetCountAsync", + "Logout": { + "uniqueName": "Logout", + "name": "Logout", "httpMethod": "GET", - "url": "api/identity/users/lookup/count", + "url": "api/account/logout", + "supportedVersions": [], + "parametersOnMethod": [], + "parameters": [], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Account.Web.Areas.Account.Controllers.AccountController" + }, + "CheckPasswordByLogin": { + "uniqueName": "CheckPasswordByLogin", + "name": "CheckPassword", + "httpMethod": "POST", + "url": "api/account/check-password", "supportedVersions": [], "parametersOnMethod": [ { - "name": "input", - "typeAsString": "Volo.Abp.Identity.UserLookupCountInputDto, Volo.Abp.Identity.Application.Contracts", - "type": "Volo.Abp.Identity.UserLookupCountInputDto", - "typeSimple": "Volo.Abp.Identity.UserLookupCountInputDto", + "name": "login", + "typeAsString": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo, Volo.Abp.Account.Web", + "type": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo", + "typeSimple": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo", "isOptional": false, "defaultValue": null } ], "parameters": [ { - "nameOnMethod": "input", - "name": "Filter", - "type": "System.String", - "typeSimple": "string", + "nameOnMethod": "login", + "name": "login", + "jsonName": null, + "type": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo", + "typeSimple": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo", "isOptional": false, "defaultValue": null, "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" + "bindingSourceId": "Body", + "descriptorName": "" } ], "returnValue": { - "type": "System.Int64", - "typeSimple": "number" - } + "type": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.AbpLoginResult", + "typeSimple": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.AbpLoginResult" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Account.Web.Areas.Account.Controllers.AccountController" } } - }, - "Volo.Abp.Identity.ProfileController": { - "controllerName": "Profile", - "type": "Volo.Abp.Identity.ProfileController", + } + } + }, + "settingManagement": { + "rootPath": "settingManagement", + "remoteServiceName": "SettingManagement", + "controllers": { + "Volo.Abp.SettingManagement.EmailSettingsController": { + "controllerName": "EmailSettings", + "controllerGroupName": "EmailSettings", + "type": "Volo.Abp.SettingManagement.EmailSettingsController", "interfaces": [ { - "type": "Volo.Abp.Identity.IProfileAppService" + "type": "Volo.Abp.SettingManagement.IEmailSettingsAppService" } ], "actions": { @@ -836,61 +789,29 @@ "uniqueName": "GetAsync", "name": "GetAsync", "httpMethod": "GET", - "url": "api/identity/my-profile", + "url": "api/setting-management/emailing", "supportedVersions": [], "parametersOnMethod": [], "parameters": [], "returnValue": { - "type": "Volo.Abp.Identity.ProfileDto", - "typeSimple": "Volo.Abp.Identity.ProfileDto" - } + "type": "Volo.Abp.SettingManagement.EmailSettingsDto", + "typeSimple": "Volo.Abp.SettingManagement.EmailSettingsDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.SettingManagement.IEmailSettingsAppService" }, "UpdateAsyncByInput": { "uniqueName": "UpdateAsyncByInput", "name": "UpdateAsync", - "httpMethod": "PUT", - "url": "api/identity/my-profile", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "input", - "typeAsString": "Volo.Abp.Identity.UpdateProfileDto, Volo.Abp.Identity.Application.Contracts", - "type": "Volo.Abp.Identity.UpdateProfileDto", - "typeSimple": "Volo.Abp.Identity.UpdateProfileDto", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "input", - "name": "input", - "type": "Volo.Abp.Identity.UpdateProfileDto", - "typeSimple": "Volo.Abp.Identity.UpdateProfileDto", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Body", - "descriptorName": "" - } - ], - "returnValue": { - "type": "Volo.Abp.Identity.ProfileDto", - "typeSimple": "Volo.Abp.Identity.ProfileDto" - } - }, - "ChangePasswordAsyncByInput": { - "uniqueName": "ChangePasswordAsyncByInput", - "name": "ChangePasswordAsync", "httpMethod": "POST", - "url": "api/identity/my-profile/change-password", + "url": "api/setting-management/emailing", "supportedVersions": [], "parametersOnMethod": [ { "name": "input", - "typeAsString": "Volo.Abp.Identity.ChangePasswordInput, Volo.Abp.Identity.Application.Contracts", - "type": "Volo.Abp.Identity.ChangePasswordInput", - "typeSimple": "Volo.Abp.Identity.ChangePasswordInput", + "typeAsString": "Volo.Abp.SettingManagement.UpdateEmailSettingsDto, Volo.Abp.SettingManagement.Application.Contracts", + "type": "Volo.Abp.SettingManagement.UpdateEmailSettingsDto", + "typeSimple": "Volo.Abp.SettingManagement.UpdateEmailSettingsDto", "isOptional": false, "defaultValue": null } @@ -899,8 +820,9 @@ { "nameOnMethod": "input", "name": "input", - "type": "Volo.Abp.Identity.ChangePasswordInput", - "typeSimple": "Volo.Abp.Identity.ChangePasswordInput", + "jsonName": null, + "type": "Volo.Abp.SettingManagement.UpdateEmailSettingsDto", + "typeSimple": "Volo.Abp.SettingManagement.UpdateEmailSettingsDto", "isOptional": false, "defaultValue": null, "constraintTypes": null, @@ -911,22 +833,25 @@ "returnValue": { "type": "System.Void", "typeSimple": "System.Void" - } + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.SettingManagement.IEmailSettingsAppService" } } } } }, - "featureManagement": { - "rootPath": "featureManagement", - "remoteServiceName": "AbpFeatureManagement", + "permissionManagement": { + "rootPath": "permissionManagement", + "remoteServiceName": "AbpPermissionManagement", "controllers": { - "Volo.Abp.FeatureManagement.FeaturesController": { - "controllerName": "Features", - "type": "Volo.Abp.FeatureManagement.FeaturesController", + "Volo.Abp.PermissionManagement.PermissionsController": { + "controllerName": "Permissions", + "controllerGroupName": "Permissions", + "type": "Volo.Abp.PermissionManagement.PermissionsController", "interfaces": [ { - "type": "Volo.Abp.FeatureManagement.IFeatureAppService" + "type": "Volo.Abp.PermissionManagement.IPermissionAppService" } ], "actions": { @@ -934,7 +859,7 @@ "uniqueName": "GetAsyncByProviderNameAndProviderKey", "name": "GetAsync", "httpMethod": "GET", - "url": "api/feature-management/features", + "url": "api/permission-management/permissions", "supportedVersions": [], "parametersOnMethod": [ { @@ -958,6 +883,7 @@ { "nameOnMethod": "providerName", "name": "providerName", + "jsonName": null, "type": "System.String", "typeSimple": "string", "isOptional": false, @@ -969,6 +895,7 @@ { "nameOnMethod": "providerKey", "name": "providerKey", + "jsonName": null, "type": "System.String", "typeSimple": "string", "isOptional": false, @@ -979,15 +906,17 @@ } ], "returnValue": { - "type": "Volo.Abp.FeatureManagement.GetFeatureListResultDto", - "typeSimple": "Volo.Abp.FeatureManagement.GetFeatureListResultDto" - } + "type": "Volo.Abp.PermissionManagement.GetPermissionListResultDto", + "typeSimple": "Volo.Abp.PermissionManagement.GetPermissionListResultDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.PermissionManagement.IPermissionAppService" }, "UpdateAsyncByProviderNameAndProviderKeyAndInput": { "uniqueName": "UpdateAsyncByProviderNameAndProviderKeyAndInput", "name": "UpdateAsync", "httpMethod": "PUT", - "url": "api/feature-management/features", + "url": "api/permission-management/permissions", "supportedVersions": [], "parametersOnMethod": [ { @@ -1008,9 +937,9 @@ }, { "name": "input", - "typeAsString": "Volo.Abp.FeatureManagement.UpdateFeaturesDto, Volo.Abp.FeatureManagement.Application.Contracts", - "type": "Volo.Abp.FeatureManagement.UpdateFeaturesDto", - "typeSimple": "Volo.Abp.FeatureManagement.UpdateFeaturesDto", + "typeAsString": "Volo.Abp.PermissionManagement.UpdatePermissionsDto, Volo.Abp.PermissionManagement.Application.Contracts", + "type": "Volo.Abp.PermissionManagement.UpdatePermissionsDto", + "typeSimple": "Volo.Abp.PermissionManagement.UpdatePermissionsDto", "isOptional": false, "defaultValue": null } @@ -1019,6 +948,7 @@ { "nameOnMethod": "providerName", "name": "providerName", + "jsonName": null, "type": "System.String", "typeSimple": "string", "isOptional": false, @@ -1030,6 +960,7 @@ { "nameOnMethod": "providerKey", "name": "providerKey", + "jsonName": null, "type": "System.String", "typeSimple": "string", "isOptional": false, @@ -1041,8 +972,9 @@ { "nameOnMethod": "input", "name": "input", - "type": "Volo.Abp.FeatureManagement.UpdateFeaturesDto", - "typeSimple": "Volo.Abp.FeatureManagement.UpdateFeaturesDto", + "jsonName": null, + "type": "Volo.Abp.PermissionManagement.UpdatePermissionsDto", + "typeSimple": "Volo.Abp.PermissionManagement.UpdatePermissionsDto", "isOptional": false, "defaultValue": null, "constraintTypes": null, @@ -1053,7 +985,9 @@ "returnValue": { "type": "System.Void", "typeSimple": "System.Void" - } + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.PermissionManagement.IPermissionAppService" } } } @@ -1065,6 +999,7 @@ "controllers": { "Pages.Abp.MultiTenancy.AbpTenantController": { "controllerName": "AbpTenant", + "controllerGroupName": "AbpTenant", "type": "Pages.Abp.MultiTenancy.AbpTenantController", "interfaces": [ { @@ -1092,6 +1027,7 @@ { "nameOnMethod": "name", "name": "name", + "jsonName": null, "type": "System.String", "typeSimple": "string", "isOptional": false, @@ -1104,7 +1040,9 @@ "returnValue": { "type": "Volo.Abp.AspNetCore.Mvc.MultiTenancy.FindTenantResultDto", "typeSimple": "Volo.Abp.AspNetCore.Mvc.MultiTenancy.FindTenantResultDto" - } + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.AspNetCore.Mvc.MultiTenancy.IAbpTenantAppService" }, "FindTenantByIdAsyncById": { "uniqueName": "FindTenantByIdAsyncById", @@ -1126,6 +1064,7 @@ { "nameOnMethod": "id", "name": "id", + "jsonName": null, "type": "System.Guid", "typeSimple": "string", "isOptional": false, @@ -1138,12 +1077,15 @@ "returnValue": { "type": "Volo.Abp.AspNetCore.Mvc.MultiTenancy.FindTenantResultDto", "typeSimple": "Volo.Abp.AspNetCore.Mvc.MultiTenancy.FindTenantResultDto" - } + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.AspNetCore.Mvc.MultiTenancy.IAbpTenantAppService" } } }, "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationController": { "controllerName": "AbpApplicationConfiguration", + "controllerGroupName": "AbpApplicationConfiguration", "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationController", "interfaces": [ { @@ -1162,12 +1104,15 @@ "returnValue": { "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationConfigurationDto", "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationConfigurationDto" - } + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.IAbpApplicationConfigurationAppService" } } }, "Volo.Abp.AspNetCore.Mvc.ApiExploring.AbpApiDefinitionController": { "controllerName": "AbpApiDefinition", + "controllerGroupName": "AbpApiDefinition", "type": "Volo.Abp.AspNetCore.Mvc.ApiExploring.AbpApiDefinitionController", "interfaces": [], "actions": { @@ -1191,6 +1136,7 @@ { "nameOnMethod": "model", "name": "IncludeTypes", + "jsonName": null, "type": "System.Boolean", "typeSimple": "boolean", "isOptional": false, @@ -1203,125 +1149,165 @@ "returnValue": { "type": "Volo.Abp.Http.Modeling.ApplicationApiDescriptionModel", "typeSimple": "Volo.Abp.Http.Modeling.ApplicationApiDescriptionModel" - } + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.AspNetCore.Mvc.ApiExploring.AbpApiDefinitionController" } } } } }, - "account": { - "rootPath": "account", - "remoteServiceName": "AbpAccount", + "identity": { + "rootPath": "identity", + "remoteServiceName": "AbpIdentity", "controllers": { - "Volo.Abp.Account.Web.Areas.Account.Controllers.AccountController": { - "controllerName": "Account", - "type": "Volo.Abp.Account.Web.Areas.Account.Controllers.AccountController", - "interfaces": [], + "Volo.Abp.Identity.IdentityRoleController": { + "controllerName": "IdentityRole", + "controllerGroupName": "Role", + "type": "Volo.Abp.Identity.IdentityRoleController", + "interfaces": [ + { + "type": "Volo.Abp.Identity.IIdentityRoleAppService" + } + ], "actions": { - "LoginByLogin": { - "uniqueName": "LoginByLogin", - "name": "Login", - "httpMethod": "POST", - "url": "api/account/login", + "GetAllListAsync": { + "uniqueName": "GetAllListAsync", + "name": "GetAllListAsync", + "httpMethod": "GET", + "url": "api/identity/roles/all", + "supportedVersions": [], + "parametersOnMethod": [], + "parameters": [], + "returnValue": { + "type": "Volo.Abp.Application.Dtos.ListResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Identity.IIdentityRoleAppService" + }, + "GetListAsyncByInput": { + "uniqueName": "GetListAsyncByInput", + "name": "GetListAsync", + "httpMethod": "GET", + "url": "api/identity/roles", "supportedVersions": [], "parametersOnMethod": [ { - "name": "login", - "typeAsString": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo, Volo.Abp.Account.Web", - "type": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo", - "typeSimple": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo", + "name": "input", + "typeAsString": "Volo.Abp.Identity.GetIdentityRolesInput, Volo.Abp.Identity.Application.Contracts", + "type": "Volo.Abp.Identity.GetIdentityRolesInput", + "typeSimple": "Volo.Abp.Identity.GetIdentityRolesInput", "isOptional": false, "defaultValue": null } ], "parameters": [ { - "nameOnMethod": "login", - "name": "login", - "type": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo", - "typeSimple": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo", + "nameOnMethod": "input", + "name": "Filter", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", "isOptional": false, "defaultValue": null, "constraintTypes": null, - "bindingSourceId": "Body", - "descriptorName": "" - } - ], - "returnValue": { - "type": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.AbpLoginResult", - "typeSimple": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.AbpLoginResult" - } - }, - "Logout": { - "uniqueName": "Logout", - "name": "Logout", - "httpMethod": "GET", - "url": "api/account/logout", - "supportedVersions": [], - "parametersOnMethod": [], - "parameters": [], - "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" - } - }, - "CheckPasswordByLogin": { - "uniqueName": "CheckPasswordByLogin", - "name": "CheckPassword", - "httpMethod": "POST", - "url": "api/account/checkPassword", + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "Sorting", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "SkipCount", + "jsonName": null, + "type": "System.Int32", + "typeSimple": "number", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "MaxResultCount", + "jsonName": null, + "type": "System.Int32", + "typeSimple": "number", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + } + ], + "returnValue": { + "type": "Volo.Abp.Application.Dtos.PagedResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.IReadOnlyAppService" + }, + "GetAsyncById": { + "uniqueName": "GetAsyncById", + "name": "GetAsync", + "httpMethod": "GET", + "url": "api/identity/roles/{id}", "supportedVersions": [], "parametersOnMethod": [ { - "name": "login", - "typeAsString": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo, Volo.Abp.Account.Web", - "type": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo", - "typeSimple": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo", + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", "isOptional": false, "defaultValue": null } ], "parameters": [ { - "nameOnMethod": "login", - "name": "login", - "type": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo", - "typeSimple": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo", + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", "isOptional": false, "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Body", + "constraintTypes": [], + "bindingSourceId": "Path", "descriptorName": "" } ], "returnValue": { - "type": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.AbpLoginResult", - "typeSimple": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.AbpLoginResult" - } - } - } - }, - "Volo.Abp.Account.AccountController": { - "controllerName": "Account", - "type": "Volo.Abp.Account.AccountController", - "interfaces": [ - { - "type": "Volo.Abp.Account.IAccountAppService" - } - ], - "actions": { - "RegisterAsyncByInput": { - "uniqueName": "RegisterAsyncByInput", - "name": "RegisterAsync", + "type": "Volo.Abp.Identity.IdentityRoleDto", + "typeSimple": "Volo.Abp.Identity.IdentityRoleDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.IReadOnlyAppService" + }, + "CreateAsyncByInput": { + "uniqueName": "CreateAsyncByInput", + "name": "CreateAsync", "httpMethod": "POST", - "url": "api/account/register", + "url": "api/identity/roles", "supportedVersions": [], "parametersOnMethod": [ { "name": "input", - "typeAsString": "Volo.Abp.Account.RegisterDto, Volo.Abp.Account.Application.Contracts", - "type": "Volo.Abp.Account.RegisterDto", - "typeSimple": "Volo.Abp.Account.RegisterDto", + "typeAsString": "Volo.Abp.Identity.IdentityRoleCreateDto, Volo.Abp.Identity.Application.Contracts", + "type": "Volo.Abp.Identity.IdentityRoleCreateDto", + "typeSimple": "Volo.Abp.Identity.IdentityRoleCreateDto", "isOptional": false, "defaultValue": null } @@ -1330,8 +1316,9 @@ { "nameOnMethod": "input", "name": "input", - "type": "Volo.Abp.Account.RegisterDto", - "typeSimple": "Volo.Abp.Account.RegisterDto", + "jsonName": null, + "type": "Volo.Abp.Identity.IdentityRoleCreateDto", + "typeSimple": "Volo.Abp.Identity.IdentityRoleCreateDto", "isOptional": false, "defaultValue": null, "constraintTypes": null, @@ -1340,32 +1327,55 @@ } ], "returnValue": { - "type": "Volo.Abp.Identity.IdentityUserDto", - "typeSimple": "Volo.Abp.Identity.IdentityUserDto" - } + "type": "Volo.Abp.Identity.IdentityRoleDto", + "typeSimple": "Volo.Abp.Identity.IdentityRoleDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.ICreateAppService" }, - "SendPasswordResetCodeAsyncByInput": { - "uniqueName": "SendPasswordResetCodeAsyncByInput", - "name": "SendPasswordResetCodeAsync", - "httpMethod": "POST", - "url": "api/account/send-password-reset-code", + "UpdateAsyncByIdAndInput": { + "uniqueName": "UpdateAsyncByIdAndInput", + "name": "UpdateAsync", + "httpMethod": "PUT", + "url": "api/identity/roles/{id}", "supportedVersions": [], "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, { "name": "input", - "typeAsString": "Volo.Abp.Account.SendPasswordResetCodeDto, Volo.Abp.Account.Application.Contracts", - "type": "Volo.Abp.Account.SendPasswordResetCodeDto", - "typeSimple": "Volo.Abp.Account.SendPasswordResetCodeDto", + "typeAsString": "Volo.Abp.Identity.IdentityRoleUpdateDto, Volo.Abp.Identity.Application.Contracts", + "type": "Volo.Abp.Identity.IdentityRoleUpdateDto", + "typeSimple": "Volo.Abp.Identity.IdentityRoleUpdateDto", "isOptional": false, "defaultValue": null } ], "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + }, { "nameOnMethod": "input", "name": "input", - "type": "Volo.Abp.Account.SendPasswordResetCodeDto", - "typeSimple": "Volo.Abp.Account.SendPasswordResetCodeDto", + "jsonName": null, + "type": "Volo.Abp.Identity.IdentityRoleUpdateDto", + "typeSimple": "Volo.Abp.Identity.IdentityRoleUpdateDto", "isOptional": false, "defaultValue": null, "constraintTypes": null, @@ -1374,58 +1384,58 @@ } ], "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" - } + "type": "Volo.Abp.Identity.IdentityRoleDto", + "typeSimple": "Volo.Abp.Identity.IdentityRoleDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.IUpdateAppService" }, - "ResetPasswordAsyncByInput": { - "uniqueName": "ResetPasswordAsyncByInput", - "name": "ResetPasswordAsync", - "httpMethod": "POST", - "url": "api/account/reset-password", + "DeleteAsyncById": { + "uniqueName": "DeleteAsyncById", + "name": "DeleteAsync", + "httpMethod": "DELETE", + "url": "api/identity/roles/{id}", "supportedVersions": [], "parametersOnMethod": [ { - "name": "input", - "typeAsString": "Volo.Abp.Account.ResetPasswordDto, Volo.Abp.Account.Application.Contracts", - "type": "Volo.Abp.Account.ResetPasswordDto", - "typeSimple": "Volo.Abp.Account.ResetPasswordDto", + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", "isOptional": false, "defaultValue": null } ], "parameters": [ { - "nameOnMethod": "input", - "name": "input", - "type": "Volo.Abp.Account.ResetPasswordDto", - "typeSimple": "Volo.Abp.Account.ResetPasswordDto", + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", "isOptional": false, "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Body", + "constraintTypes": [], + "bindingSourceId": "Path", "descriptorName": "" } ], "returnValue": { "type": "System.Void", "typeSimple": "System.Void" - } + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.IDeleteAppService" } } - } - } - }, - "multi-tenancy": { - "rootPath": "multi-tenancy", - "remoteServiceName": "AbpTenantManagement", - "controllers": { - "Volo.Abp.TenantManagement.TenantController": { - "controllerName": "Tenant", - "type": "Volo.Abp.TenantManagement.TenantController", + }, + "Volo.Abp.Identity.IdentityUserController": { + "controllerName": "IdentityUser", + "controllerGroupName": "User", + "type": "Volo.Abp.Identity.IdentityUserController", "interfaces": [ { - "type": "Volo.Abp.TenantManagement.ITenantAppService" + "type": "Volo.Abp.Identity.IIdentityUserAppService" } ], "actions": { @@ -1433,7 +1443,7 @@ "uniqueName": "GetAsyncById", "name": "GetAsync", "httpMethod": "GET", - "url": "api/multi-tenancy/tenants/{id}", + "url": "api/identity/users/{id}", "supportedVersions": [], "parametersOnMethod": [ { @@ -1449,6 +1459,7 @@ { "nameOnMethod": "id", "name": "id", + "jsonName": null, "type": "System.Guid", "typeSimple": "string", "isOptional": false, @@ -1459,22 +1470,24 @@ } ], "returnValue": { - "type": "Volo.Abp.TenantManagement.TenantDto", - "typeSimple": "Volo.Abp.TenantManagement.TenantDto" - } + "type": "Volo.Abp.Identity.IdentityUserDto", + "typeSimple": "Volo.Abp.Identity.IdentityUserDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.IReadOnlyAppService" }, "GetListAsyncByInput": { "uniqueName": "GetListAsyncByInput", "name": "GetListAsync", "httpMethod": "GET", - "url": "api/multi-tenancy/tenants", + "url": "api/identity/users", "supportedVersions": [], "parametersOnMethod": [ { "name": "input", - "typeAsString": "Volo.Abp.TenantManagement.GetTenantsInput, Volo.Abp.TenantManagement.Application.Contracts", - "type": "Volo.Abp.TenantManagement.GetTenantsInput", - "typeSimple": "Volo.Abp.TenantManagement.GetTenantsInput", + "typeAsString": "Volo.Abp.Identity.GetIdentityUsersInput, Volo.Abp.Identity.Application.Contracts", + "type": "Volo.Abp.Identity.GetIdentityUsersInput", + "typeSimple": "Volo.Abp.Identity.GetIdentityUsersInput", "isOptional": false, "defaultValue": null } @@ -1483,6 +1496,7 @@ { "nameOnMethod": "input", "name": "Filter", + "jsonName": null, "type": "System.String", "typeSimple": "string", "isOptional": false, @@ -1494,6 +1508,7 @@ { "nameOnMethod": "input", "name": "Sorting", + "jsonName": null, "type": "System.String", "typeSimple": "string", "isOptional": false, @@ -1505,6 +1520,7 @@ { "nameOnMethod": "input", "name": "SkipCount", + "jsonName": null, "type": "System.Int32", "typeSimple": "number", "isOptional": false, @@ -1516,6 +1532,7 @@ { "nameOnMethod": "input", "name": "MaxResultCount", + "jsonName": null, "type": "System.Int32", "typeSimple": "number", "isOptional": false, @@ -1526,22 +1543,24 @@ } ], "returnValue": { - "type": "Volo.Abp.Application.Dtos.PagedResultDto", - "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" - } + "type": "Volo.Abp.Application.Dtos.PagedResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.IReadOnlyAppService" }, "CreateAsyncByInput": { "uniqueName": "CreateAsyncByInput", "name": "CreateAsync", "httpMethod": "POST", - "url": "api/multi-tenancy/tenants", + "url": "api/identity/users", "supportedVersions": [], "parametersOnMethod": [ { "name": "input", - "typeAsString": "Volo.Abp.TenantManagement.TenantCreateDto, Volo.Abp.TenantManagement.Application.Contracts", - "type": "Volo.Abp.TenantManagement.TenantCreateDto", - "typeSimple": "Volo.Abp.TenantManagement.TenantCreateDto", + "typeAsString": "Volo.Abp.Identity.IdentityUserCreateDto, Volo.Abp.Identity.Application.Contracts", + "type": "Volo.Abp.Identity.IdentityUserCreateDto", + "typeSimple": "Volo.Abp.Identity.IdentityUserCreateDto", "isOptional": false, "defaultValue": null } @@ -1550,8 +1569,9 @@ { "nameOnMethod": "input", "name": "input", - "type": "Volo.Abp.TenantManagement.TenantCreateDto", - "typeSimple": "Volo.Abp.TenantManagement.TenantCreateDto", + "jsonName": null, + "type": "Volo.Abp.Identity.IdentityUserCreateDto", + "typeSimple": "Volo.Abp.Identity.IdentityUserCreateDto", "isOptional": false, "defaultValue": null, "constraintTypes": null, @@ -1560,15 +1580,17 @@ } ], "returnValue": { - "type": "Volo.Abp.TenantManagement.TenantDto", - "typeSimple": "Volo.Abp.TenantManagement.TenantDto" - } + "type": "Volo.Abp.Identity.IdentityUserDto", + "typeSimple": "Volo.Abp.Identity.IdentityUserDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.ICreateAppService" }, "UpdateAsyncByIdAndInput": { "uniqueName": "UpdateAsyncByIdAndInput", "name": "UpdateAsync", "httpMethod": "PUT", - "url": "api/multi-tenancy/tenants/{id}", + "url": "api/identity/users/{id}", "supportedVersions": [], "parametersOnMethod": [ { @@ -1581,9 +1603,9 @@ }, { "name": "input", - "typeAsString": "Volo.Abp.TenantManagement.TenantUpdateDto, Volo.Abp.TenantManagement.Application.Contracts", - "type": "Volo.Abp.TenantManagement.TenantUpdateDto", - "typeSimple": "Volo.Abp.TenantManagement.TenantUpdateDto", + "typeAsString": "Volo.Abp.Identity.IdentityUserUpdateDto, Volo.Abp.Identity.Application.Contracts", + "type": "Volo.Abp.Identity.IdentityUserUpdateDto", + "typeSimple": "Volo.Abp.Identity.IdentityUserUpdateDto", "isOptional": false, "defaultValue": null } @@ -1592,6 +1614,7 @@ { "nameOnMethod": "id", "name": "id", + "jsonName": null, "type": "System.Guid", "typeSimple": "string", "isOptional": false, @@ -1603,8 +1626,9 @@ { "nameOnMethod": "input", "name": "input", - "type": "Volo.Abp.TenantManagement.TenantUpdateDto", - "typeSimple": "Volo.Abp.TenantManagement.TenantUpdateDto", + "jsonName": null, + "type": "Volo.Abp.Identity.IdentityUserUpdateDto", + "typeSimple": "Volo.Abp.Identity.IdentityUserUpdateDto", "isOptional": false, "defaultValue": null, "constraintTypes": null, @@ -1613,15 +1637,17 @@ } ], "returnValue": { - "type": "Volo.Abp.TenantManagement.TenantDto", - "typeSimple": "Volo.Abp.TenantManagement.TenantDto" - } + "type": "Volo.Abp.Identity.IdentityUserDto", + "typeSimple": "Volo.Abp.Identity.IdentityUserDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.IUpdateAppService" }, "DeleteAsyncById": { "uniqueName": "DeleteAsyncById", "name": "DeleteAsync", "httpMethod": "DELETE", - "url": "api/multi-tenancy/tenants/{id}", + "url": "api/identity/users/{id}", "supportedVersions": [], "parametersOnMethod": [ { @@ -1637,6 +1663,7 @@ { "nameOnMethod": "id", "name": "id", + "jsonName": null, "type": "System.Guid", "typeSimple": "string", "isOptional": false, @@ -1649,13 +1676,15 @@ "returnValue": { "type": "System.Void", "typeSimple": "System.Void" - } + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.IDeleteAppService" }, - "GetDefaultConnectionStringAsyncById": { - "uniqueName": "GetDefaultConnectionStringAsyncById", - "name": "GetDefaultConnectionStringAsync", + "GetRolesAsyncById": { + "uniqueName": "GetRolesAsyncById", + "name": "GetRolesAsync", "httpMethod": "GET", - "url": "api/multi-tenancy/tenants/{id}/default-connection-string", + "url": "api/identity/users/{id}/roles", "supportedVersions": [], "parametersOnMethod": [ { @@ -1671,6 +1700,7 @@ { "nameOnMethod": "id", "name": "id", + "jsonName": null, "type": "System.Guid", "typeSimple": "string", "isOptional": false, @@ -1681,15 +1711,32 @@ } ], "returnValue": { - "type": "System.String", - "typeSimple": "string" - } + "type": "Volo.Abp.Application.Dtos.ListResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Identity.IIdentityUserAppService" }, - "UpdateDefaultConnectionStringAsyncByIdAndDefaultConnectionString": { - "uniqueName": "UpdateDefaultConnectionStringAsyncByIdAndDefaultConnectionString", - "name": "UpdateDefaultConnectionStringAsync", + "GetAssignableRolesAsync": { + "uniqueName": "GetAssignableRolesAsync", + "name": "GetAssignableRolesAsync", + "httpMethod": "GET", + "url": "api/identity/users/assignable-roles", + "supportedVersions": [], + "parametersOnMethod": [], + "parameters": [], + "returnValue": { + "type": "Volo.Abp.Application.Dtos.ListResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Identity.IIdentityUserAppService" + }, + "UpdateRolesAsyncByIdAndInput": { + "uniqueName": "UpdateRolesAsyncByIdAndInput", + "name": "UpdateRolesAsync", "httpMethod": "PUT", - "url": "api/multi-tenancy/tenants/{id}/default-connection-string", + "url": "api/identity/users/{id}/roles", "supportedVersions": [], "parametersOnMethod": [ { @@ -1701,10 +1748,10 @@ "defaultValue": null }, { - "name": "defaultConnectionString", - "typeAsString": "System.String, System.Private.CoreLib", - "type": "System.String", - "typeSimple": "string", + "name": "input", + "typeAsString": "Volo.Abp.Identity.IdentityUserUpdateRolesDto, Volo.Abp.Identity.Application.Contracts", + "type": "Volo.Abp.Identity.IdentityUserUpdateRolesDto", + "typeSimple": "Volo.Abp.Identity.IdentityUserUpdateRolesDto", "isOptional": false, "defaultValue": null } @@ -1713,6 +1760,7 @@ { "nameOnMethod": "id", "name": "id", + "jsonName": null, "type": "System.Guid", "typeSimple": "string", "isOptional": false, @@ -1722,33 +1770,36 @@ "descriptorName": "" }, { - "nameOnMethod": "defaultConnectionString", - "name": "defaultConnectionString", - "type": "System.String", - "typeSimple": "string", + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Volo.Abp.Identity.IdentityUserUpdateRolesDto", + "typeSimple": "Volo.Abp.Identity.IdentityUserUpdateRolesDto", "isOptional": false, "defaultValue": null, "constraintTypes": null, - "bindingSourceId": "ModelBinding", + "bindingSourceId": "Body", "descriptorName": "" } ], "returnValue": { "type": "System.Void", "typeSimple": "System.Void" - } + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Identity.IIdentityUserAppService" }, - "DeleteDefaultConnectionStringAsyncById": { - "uniqueName": "DeleteDefaultConnectionStringAsyncById", - "name": "DeleteDefaultConnectionStringAsync", - "httpMethod": "DELETE", - "url": "api/multi-tenancy/tenants/{id}/default-connection-string", + "FindByUsernameAsyncByUserName": { + "uniqueName": "FindByUsernameAsyncByUserName", + "name": "FindByUsernameAsync", + "httpMethod": "GET", + "url": "api/identity/users/by-username/{userName}", "supportedVersions": [], "parametersOnMethod": [ { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", + "name": "userName", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", "typeSimple": "string", "isOptional": false, "defaultValue": null @@ -1756,9 +1807,10 @@ ], "parameters": [ { - "nameOnMethod": "id", - "name": "id", - "type": "System.Guid", + "nameOnMethod": "userName", + "name": "userName", + "jsonName": null, + "type": "System.String", "typeSimple": "string", "isOptional": false, "defaultValue": null, @@ -1768,223 +1820,354 @@ } ], "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" - } + "type": "Volo.Abp.Identity.IdentityUserDto", + "typeSimple": "Volo.Abp.Identity.IdentityUserDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Identity.IIdentityUserAppService" + }, + "FindByEmailAsyncByEmail": { + "uniqueName": "FindByEmailAsyncByEmail", + "name": "FindByEmailAsync", + "httpMethod": "GET", + "url": "api/identity/users/by-email/{email}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "email", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "email", + "name": "email", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.Abp.Identity.IdentityUserDto", + "typeSimple": "Volo.Abp.Identity.IdentityUserDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Identity.IIdentityUserAppService" } } - } - } - }, - "permissionManagement": { - "rootPath": "permissionManagement", - "remoteServiceName": "AbpPermissionManagement", - "controllers": { - "Volo.Abp.PermissionManagement.PermissionsController": { - "controllerName": "Permissions", - "type": "Volo.Abp.PermissionManagement.PermissionsController", + }, + "Volo.Abp.Identity.IdentityUserLookupController": { + "controllerName": "IdentityUserLookup", + "controllerGroupName": "UserLookup", + "type": "Volo.Abp.Identity.IdentityUserLookupController", "interfaces": [ { - "type": "Volo.Abp.PermissionManagement.IPermissionAppService" + "type": "Volo.Abp.Identity.IIdentityUserLookupAppService" } ], "actions": { - "GetAsyncByProviderNameAndProviderKey": { - "uniqueName": "GetAsyncByProviderNameAndProviderKey", - "name": "GetAsync", + "FindByIdAsyncById": { + "uniqueName": "FindByIdAsyncById", + "name": "FindByIdAsync", "httpMethod": "GET", - "url": "api/permission-management/permissions", + "url": "api/identity/users/lookup/{id}", "supportedVersions": [], "parametersOnMethod": [ { - "name": "providerName", + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.Abp.Users.UserData", + "typeSimple": "Volo.Abp.Users.UserData" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Identity.IIdentityUserLookupAppService" + }, + "FindByUserNameAsyncByUserName": { + "uniqueName": "FindByUserNameAsyncByUserName", + "name": "FindByUserNameAsync", + "httpMethod": "GET", + "url": "api/identity/users/lookup/by-username/{userName}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "userName", "typeAsString": "System.String, System.Private.CoreLib", "type": "System.String", "typeSimple": "string", "isOptional": false, "defaultValue": null - }, + } + ], + "parameters": [ { - "name": "providerKey", - "typeAsString": "System.String, System.Private.CoreLib", + "nameOnMethod": "userName", + "name": "userName", + "jsonName": null, "type": "System.String", "typeSimple": "string", "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.Abp.Users.UserData", + "typeSimple": "Volo.Abp.Users.UserData" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Identity.IIdentityUserLookupAppService" + }, + "SearchAsyncByInput": { + "uniqueName": "SearchAsyncByInput", + "name": "SearchAsync", + "httpMethod": "GET", + "url": "api/identity/users/lookup/search", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "Volo.Abp.Identity.UserLookupSearchInputDto, Volo.Abp.Identity.Application.Contracts", + "type": "Volo.Abp.Identity.UserLookupSearchInputDto", + "typeSimple": "Volo.Abp.Identity.UserLookupSearchInputDto", + "isOptional": false, "defaultValue": null } ], "parameters": [ { - "nameOnMethod": "providerName", - "name": "providerName", + "nameOnMethod": "input", + "name": "Filter", + "jsonName": null, "type": "System.String", "typeSimple": "string", "isOptional": false, "defaultValue": null, "constraintTypes": null, "bindingSourceId": "ModelBinding", - "descriptorName": "" + "descriptorName": "input" }, { - "nameOnMethod": "providerKey", - "name": "providerKey", + "nameOnMethod": "input", + "name": "Sorting", + "jsonName": null, "type": "System.String", "typeSimple": "string", "isOptional": false, "defaultValue": null, "constraintTypes": null, "bindingSourceId": "ModelBinding", - "descriptorName": "" + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "SkipCount", + "jsonName": null, + "type": "System.Int32", + "typeSimple": "number", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "MaxResultCount", + "jsonName": null, + "type": "System.Int32", + "typeSimple": "number", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" } ], "returnValue": { - "type": "Volo.Abp.PermissionManagement.GetPermissionListResultDto", - "typeSimple": "Volo.Abp.PermissionManagement.GetPermissionListResultDto" - } + "type": "Volo.Abp.Application.Dtos.ListResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Identity.IIdentityUserLookupAppService" }, - "UpdateAsyncByProviderNameAndProviderKeyAndInput": { - "uniqueName": "UpdateAsyncByProviderNameAndProviderKeyAndInput", - "name": "UpdateAsync", - "httpMethod": "PUT", - "url": "api/permission-management/permissions", + "GetCountAsyncByInput": { + "uniqueName": "GetCountAsyncByInput", + "name": "GetCountAsync", + "httpMethod": "GET", + "url": "api/identity/users/lookup/count", "supportedVersions": [], "parametersOnMethod": [ { - "name": "providerName", - "typeAsString": "System.String, System.Private.CoreLib", - "type": "System.String", - "typeSimple": "string", + "name": "input", + "typeAsString": "Volo.Abp.Identity.UserLookupCountInputDto, Volo.Abp.Identity.Application.Contracts", + "type": "Volo.Abp.Identity.UserLookupCountInputDto", + "typeSimple": "Volo.Abp.Identity.UserLookupCountInputDto", "isOptional": false, "defaultValue": null - }, + } + ], + "parameters": [ { - "name": "providerKey", - "typeAsString": "System.String, System.Private.CoreLib", + "nameOnMethod": "input", + "name": "Filter", + "jsonName": null, "type": "System.String", "typeSimple": "string", "isOptional": false, - "defaultValue": null - }, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + } + ], + "returnValue": { + "type": "System.Int64", + "typeSimple": "number" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Identity.IIdentityUserLookupAppService" + } + } + }, + "Volo.Abp.Identity.ProfileController": { + "controllerName": "Profile", + "controllerGroupName": "Profile", + "type": "Volo.Abp.Identity.ProfileController", + "interfaces": [ + { + "type": "Volo.Abp.Identity.IProfileAppService" + } + ], + "actions": { + "GetAsync": { + "uniqueName": "GetAsync", + "name": "GetAsync", + "httpMethod": "GET", + "url": "api/identity/my-profile", + "supportedVersions": [], + "parametersOnMethod": [], + "parameters": [], + "returnValue": { + "type": "Volo.Abp.Identity.ProfileDto", + "typeSimple": "Volo.Abp.Identity.ProfileDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Identity.IProfileAppService" + }, + "UpdateAsyncByInput": { + "uniqueName": "UpdateAsyncByInput", + "name": "UpdateAsync", + "httpMethod": "PUT", + "url": "api/identity/my-profile", + "supportedVersions": [], + "parametersOnMethod": [ { "name": "input", - "typeAsString": "Volo.Abp.PermissionManagement.UpdatePermissionsDto, Volo.Abp.PermissionManagement.Application.Contracts", - "type": "Volo.Abp.PermissionManagement.UpdatePermissionsDto", - "typeSimple": "Volo.Abp.PermissionManagement.UpdatePermissionsDto", + "typeAsString": "Volo.Abp.Identity.UpdateProfileDto, Volo.Abp.Identity.Application.Contracts", + "type": "Volo.Abp.Identity.UpdateProfileDto", + "typeSimple": "Volo.Abp.Identity.UpdateProfileDto", "isOptional": false, "defaultValue": null } ], "parameters": [ { - "nameOnMethod": "providerName", - "name": "providerName", - "type": "System.String", - "typeSimple": "string", + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Volo.Abp.Identity.UpdateProfileDto", + "typeSimple": "Volo.Abp.Identity.UpdateProfileDto", "isOptional": false, "defaultValue": null, "constraintTypes": null, - "bindingSourceId": "ModelBinding", + "bindingSourceId": "Body", "descriptorName": "" - }, + } + ], + "returnValue": { + "type": "Volo.Abp.Identity.ProfileDto", + "typeSimple": "Volo.Abp.Identity.ProfileDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Identity.IProfileAppService" + }, + "ChangePasswordAsyncByInput": { + "uniqueName": "ChangePasswordAsyncByInput", + "name": "ChangePasswordAsync", + "httpMethod": "POST", + "url": "api/identity/my-profile/change-password", + "supportedVersions": [], + "parametersOnMethod": [ { - "nameOnMethod": "providerKey", - "name": "providerKey", - "type": "System.String", - "typeSimple": "string", + "name": "input", + "typeAsString": "Volo.Abp.Identity.ChangePasswordInput, Volo.Abp.Identity.Application.Contracts", + "type": "Volo.Abp.Identity.ChangePasswordInput", + "typeSimple": "Volo.Abp.Identity.ChangePasswordInput", "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "" - }, + "defaultValue": null + } + ], + "parameters": [ { "nameOnMethod": "input", "name": "input", - "type": "Volo.Abp.PermissionManagement.UpdatePermissionsDto", - "typeSimple": "Volo.Abp.PermissionManagement.UpdatePermissionsDto", + "jsonName": null, + "type": "Volo.Abp.Identity.ChangePasswordInput", + "typeSimple": "Volo.Abp.Identity.ChangePasswordInput", "isOptional": false, "defaultValue": null, "constraintTypes": null, "bindingSourceId": "Body", "descriptorName": "" } - ], - "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" - } - } - } - } - } - } - }, - "types": { - "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "UserNameOrEmailAddress", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Password", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "RememberMe", - "type": "System.Boolean", - "typeSimple": "boolean" - } - ] - }, - "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.AbpLoginResult": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "Result", - "type": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.LoginResultType", - "typeSimple": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.LoginResultType" - }, - { - "name": "Description", - "type": "System.String", - "typeSimple": "string" - } - ] - }, - "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.LoginResultType": { - "baseType": "System.Enum", - "isEnum": true, - "enumNames": [ - "Success", - "InvalidUserNameOrPassword", - "NotAllowed", - "LockedOut", - "RequiresTwoFactor" - ], - "enumValues": [ - 1, - 2, - 3, - 4, - 5 - ], - "genericArguments": null, - "properties": null - }, + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Identity.IProfileAppService" + } + } + } + } + } + }, + "types": { "Volo.Abp.Account.RegisterDto": { - "baseType": null, + "baseType": "Volo.Abp.ObjectExtending.ExtensibleObject", "isEnum": false, "enumNames": null, "enumValues": null, @@ -1992,23 +2175,47 @@ "properties": [ { "name": "UserName", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": true }, { "name": "EmailAddress", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": true }, { "name": "Password", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": true }, { "name": "AppName", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": true + } + ] + }, + "Volo.Abp.ObjectExtending.ExtensibleObject": { + "baseType": null, + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "ExtraProperties", + "jsonName": null, + "type": "{System.String:System.Object}", + "typeSimple": "{string:object}", + "isRequired": false } ] }, @@ -2021,63 +2228,80 @@ "properties": [ { "name": "TenantId", + "jsonName": null, "type": "System.Guid?", - "typeSimple": "string?" + "typeSimple": "string?", + "isRequired": false }, { "name": "UserName", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "Name", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "Surname", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "Email", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "EmailConfirmed", + "jsonName": null, "type": "System.Boolean", - "typeSimple": "boolean" + "typeSimple": "boolean", + "isRequired": false }, { "name": "PhoneNumber", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "PhoneNumberConfirmed", + "jsonName": null, "type": "System.Boolean", - "typeSimple": "boolean" - }, - { - "name": "TwoFactorEnabled", - "type": "System.Boolean", - "typeSimple": "boolean" + "typeSimple": "boolean", + "isRequired": false }, { "name": "LockoutEnabled", + "jsonName": null, "type": "System.Boolean", - "typeSimple": "boolean" + "typeSimple": "boolean", + "isRequired": false }, { "name": "LockoutEnd", + "jsonName": null, "type": "System.DateTimeOffset?", - "typeSimple": "string?" + "typeSimple": "string?", + "isRequired": false }, { "name": "ConcurrencyStamp", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false } ] }, @@ -2092,18 +2316,24 @@ "properties": [ { "name": "IsDeleted", + "jsonName": null, "type": "System.Boolean", - "typeSimple": "boolean" + "typeSimple": "boolean", + "isRequired": false }, { "name": "DeleterId", + "jsonName": null, "type": "System.Guid?", - "typeSimple": "string?" + "typeSimple": "string?", + "isRequired": false }, { "name": "DeletionTime", + "jsonName": null, "type": "System.DateTime?", - "typeSimple": "string?" + "typeSimple": "string?", + "isRequired": false } ] }, @@ -2118,13 +2348,17 @@ "properties": [ { "name": "LastModificationTime", + "jsonName": null, "type": "System.DateTime?", - "typeSimple": "string?" + "typeSimple": "string?", + "isRequired": false }, { "name": "LastModifierId", + "jsonName": null, "type": "System.Guid?", - "typeSimple": "string?" + "typeSimple": "string?", + "isRequired": false } ] }, @@ -2139,13 +2373,17 @@ "properties": [ { "name": "CreationTime", + "jsonName": null, "type": "System.DateTime", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "CreatorId", + "jsonName": null, "type": "System.Guid?", - "typeSimple": "string?" + "typeSimple": "string?", + "isRequired": false } ] }, @@ -2160,22 +2398,10 @@ "properties": [ { "name": "Id", + "jsonName": null, "type": "TKey", - "typeSimple": "TKey" - } - ] - }, - "Volo.Abp.ObjectExtending.ExtensibleObject": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "ExtraProperties", - "type": "{System.String:System.Object}", - "typeSimple": "{string:object}" + "typeSimple": "TKey", + "isRequired": false } ] }, @@ -2188,23 +2414,31 @@ "properties": [ { "name": "Email", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": true }, { "name": "AppName", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": true }, { "name": "ReturnUrl", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "ReturnUrlHash", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false } ] }, @@ -2217,21 +2451,100 @@ "properties": [ { "name": "UserId", + "jsonName": null, "type": "System.Guid", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "ResetToken", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": true + }, + { + "name": "Password", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": true + } + ] + }, + "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo": { + "baseType": null, + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "UserNameOrEmailAddress", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": true }, { "name": "Password", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": true + }, + { + "name": "RememberMe", + "jsonName": null, + "type": "System.Boolean", + "typeSimple": "boolean", + "isRequired": false + } + ] + }, + "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.AbpLoginResult": { + "baseType": null, + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "Result", + "jsonName": null, + "type": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.LoginResultType", + "typeSimple": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.LoginResultType", + "isRequired": false + }, + { + "name": "Description", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false } ] }, + "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.LoginResultType": { + "baseType": "System.Enum", + "isEnum": true, + "enumNames": [ + "Success", + "InvalidUserNameOrPassword", + "NotAllowed", + "LockedOut", + "RequiresTwoFactor" + ], + "enumValues": [ + 1, + 2, + 3, + 4, + 5 + ], + "genericArguments": null, + "properties": null + }, "Volo.Abp.AspNetCore.Mvc.MultiTenancy.FindTenantResultDto": { "baseType": null, "isEnum": false, @@ -2241,18 +2554,31 @@ "properties": [ { "name": "Success", + "jsonName": null, "type": "System.Boolean", - "typeSimple": "boolean" + "typeSimple": "boolean", + "isRequired": false }, { "name": "TenantId", + "jsonName": null, "type": "System.Guid?", - "typeSimple": "string?" + "typeSimple": "string?", + "isRequired": false }, { "name": "Name", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false + }, + { + "name": "IsActive", + "jsonName": null, + "type": "System.Boolean", + "typeSimple": "boolean", + "isRequired": false } ] }, @@ -2267,8 +2593,10 @@ "properties": [ { "name": "Items", + "jsonName": null, "type": "[T]", - "typeSimple": "[T]" + "typeSimple": "[T]", + "isRequired": false } ] }, @@ -2281,28 +2609,54 @@ "properties": [ { "name": "Name", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "IsDefault", + "jsonName": null, "type": "System.Boolean", - "typeSimple": "boolean" + "typeSimple": "boolean", + "isRequired": false }, { "name": "IsStatic", + "jsonName": null, "type": "System.Boolean", - "typeSimple": "boolean" + "typeSimple": "boolean", + "isRequired": false }, { "name": "IsPublic", + "jsonName": null, "type": "System.Boolean", - "typeSimple": "boolean" + "typeSimple": "boolean", + "isRequired": false }, { "name": "ConcurrencyStamp", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + } + ] + }, + "Volo.Abp.Identity.GetIdentityRolesInput": { + "baseType": "Volo.Abp.Application.Dtos.PagedAndSortedResultRequestDto", + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "Filter", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false } ] }, @@ -2315,8 +2669,10 @@ "properties": [ { "name": "Sorting", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false } ] }, @@ -2329,8 +2685,10 @@ "properties": [ { "name": "SkipCount", + "jsonName": null, "type": "System.Int32", - "typeSimple": "number" + "typeSimple": "number", + "isRequired": false } ] }, @@ -2343,18 +2701,24 @@ "properties": [ { "name": "DefaultMaxResultCount", + "jsonName": null, "type": "System.Int32", - "typeSimple": "number" + "typeSimple": "number", + "isRequired": false }, { "name": "MaxMaxResultCount", + "jsonName": null, "type": "System.Int32", - "typeSimple": "number" + "typeSimple": "number", + "isRequired": false }, { "name": "MaxResultCount", + "jsonName": null, "type": "System.Int32", - "typeSimple": "number" + "typeSimple": "number", + "isRequired": false } ] }, @@ -2369,8 +2733,10 @@ "properties": [ { "name": "TotalCount", + "jsonName": null, "type": "System.Int64", - "typeSimple": "number" + "typeSimple": "number", + "isRequired": false } ] }, @@ -2391,18 +2757,24 @@ "properties": [ { "name": "Name", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": true }, { "name": "IsDefault", + "jsonName": null, "type": "System.Boolean", - "typeSimple": "boolean" + "typeSimple": "boolean", + "isRequired": false }, { "name": "IsPublic", + "jsonName": null, "type": "System.Boolean", - "typeSimple": "boolean" + "typeSimple": "boolean", + "isRequired": false } ] }, @@ -2415,8 +2787,10 @@ "properties": [ { "name": "ConcurrencyStamp", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false } ] }, @@ -2429,8 +2803,10 @@ "properties": [ { "name": "Filter", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false } ] }, @@ -2443,8 +2819,10 @@ "properties": [ { "name": "Password", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": true } ] }, @@ -2457,43 +2835,52 @@ "properties": [ { "name": "UserName", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": true }, { "name": "Name", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "Surname", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "Email", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": true }, { "name": "PhoneNumber", + "jsonName": null, "type": "System.String", - "typeSimple": "string" - }, - { - "name": "TwoFactorEnabled", - "type": "System.Boolean", - "typeSimple": "boolean" + "typeSimple": "string", + "isRequired": false }, { "name": "LockoutEnabled", + "jsonName": null, "type": "System.Boolean", - "typeSimple": "boolean" + "typeSimple": "boolean", + "isRequired": false }, { "name": "RoleNames", + "jsonName": null, "type": "[System.String]", - "typeSimple": "[string]" + "typeSimple": "[string]", + "isRequired": false } ] }, @@ -2506,13 +2893,17 @@ "properties": [ { "name": "Password", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "ConcurrencyStamp", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false } ] }, @@ -2525,8 +2916,10 @@ "properties": [ { "name": "RoleNames", + "jsonName": null, "type": "[System.String]", - "typeSimple": "[string]" + "typeSimple": "[string]", + "isRequired": true } ] }, @@ -2539,48 +2932,66 @@ "properties": [ { "name": "Id", + "jsonName": null, "type": "System.Guid", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "TenantId", + "jsonName": null, "type": "System.Guid?", - "typeSimple": "string?" + "typeSimple": "string?", + "isRequired": false }, { "name": "UserName", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "Name", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "Surname", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "Email", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "EmailConfirmed", + "jsonName": null, "type": "System.Boolean", - "typeSimple": "boolean" + "typeSimple": "boolean", + "isRequired": false }, { "name": "PhoneNumber", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "PhoneNumberConfirmed", + "jsonName": null, "type": "System.Boolean", - "typeSimple": "boolean" + "typeSimple": "boolean", + "isRequired": false } ] }, @@ -2593,8 +3004,10 @@ "properties": [ { "name": "Filter", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false } ] }, @@ -2607,8 +3020,10 @@ "properties": [ { "name": "Filter", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false } ] }, @@ -2621,38 +3036,59 @@ "properties": [ { "name": "UserName", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "Email", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "Name", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "Surname", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "PhoneNumber", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "IsExternal", + "jsonName": null, "type": "System.Boolean", - "typeSimple": "boolean" + "typeSimple": "boolean", + "isRequired": false }, { "name": "HasPassword", + "jsonName": null, "type": "System.Boolean", - "typeSimple": "boolean" + "typeSimple": "boolean", + "isRequired": false + }, + { + "name": "ConcurrencyStamp", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false } ] }, @@ -2665,28 +3101,45 @@ "properties": [ { "name": "UserName", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "Email", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "Name", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "Surname", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "PhoneNumber", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "ConcurrencyStamp", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false } ] }, @@ -2699,13 +3152,17 @@ "properties": [ { "name": "CurrentPassword", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "NewPassword", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": true } ] }, @@ -2718,13 +3175,17 @@ "properties": [ { "name": "EntityDisplayName", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "Groups", + "jsonName": null, "type": "[Volo.Abp.PermissionManagement.PermissionGroupDto]", - "typeSimple": "[Volo.Abp.PermissionManagement.PermissionGroupDto]" + "typeSimple": "[Volo.Abp.PermissionManagement.PermissionGroupDto]", + "isRequired": false } ] }, @@ -2737,18 +3198,24 @@ "properties": [ { "name": "Name", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "DisplayName", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "Permissions", + "jsonName": null, "type": "[Volo.Abp.PermissionManagement.PermissionGrantInfoDto]", - "typeSimple": "[Volo.Abp.PermissionManagement.PermissionGrantInfoDto]" + "typeSimple": "[Volo.Abp.PermissionManagement.PermissionGrantInfoDto]", + "isRequired": false } ] }, @@ -2761,33 +3228,45 @@ "properties": [ { "name": "Name", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "DisplayName", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "ParentName", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "IsGranted", + "jsonName": null, "type": "System.Boolean", - "typeSimple": "boolean" + "typeSimple": "boolean", + "isRequired": false }, { "name": "AllowedProviders", + "jsonName": null, "type": "[System.String]", - "typeSimple": "[string]" + "typeSimple": "[string]", + "isRequired": false }, { "name": "GrantedProviders", + "jsonName": null, "type": "[Volo.Abp.PermissionManagement.ProviderInfoDto]", - "typeSimple": "[Volo.Abp.PermissionManagement.ProviderInfoDto]" + "typeSimple": "[Volo.Abp.PermissionManagement.ProviderInfoDto]", + "isRequired": false } ] }, @@ -2800,13 +3279,17 @@ "properties": [ { "name": "ProviderName", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "ProviderKey", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false } ] }, @@ -2819,8 +3302,10 @@ "properties": [ { "name": "Permissions", + "jsonName": null, "type": "[Volo.Abp.PermissionManagement.UpdatePermissionDto]", - "typeSimple": "[Volo.Abp.PermissionManagement.UpdatePermissionDto]" + "typeSimple": "[Volo.Abp.PermissionManagement.UpdatePermissionDto]", + "isRequired": false } ] }, @@ -2833,13 +3318,161 @@ "properties": [ { "name": "Name", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "IsGranted", + "jsonName": null, + "type": "System.Boolean", + "typeSimple": "boolean", + "isRequired": false + } + ] + }, + "Volo.Abp.SettingManagement.EmailSettingsDto": { + "baseType": null, + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "SmtpHost", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "SmtpPort", + "jsonName": null, + "type": "System.Int32", + "typeSimple": "number", + "isRequired": false + }, + { + "name": "SmtpUserName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "SmtpPassword", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "SmtpDomain", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "SmtpEnableSsl", + "jsonName": null, + "type": "System.Boolean", + "typeSimple": "boolean", + "isRequired": false + }, + { + "name": "SmtpUseDefaultCredentials", + "jsonName": null, + "type": "System.Boolean", + "typeSimple": "boolean", + "isRequired": false + }, + { + "name": "DefaultFromAddress", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "DefaultFromDisplayName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + } + ] + }, + "Volo.Abp.SettingManagement.UpdateEmailSettingsDto": { + "baseType": null, + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "SmtpHost", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "SmtpPort", + "jsonName": null, + "type": "System.Int32", + "typeSimple": "number", + "isRequired": false + }, + { + "name": "SmtpUserName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "SmtpPassword", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "SmtpDomain", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "SmtpEnableSsl", + "jsonName": null, + "type": "System.Boolean", + "typeSimple": "boolean", + "isRequired": false + }, + { + "name": "SmtpUseDefaultCredentials", + "jsonName": null, "type": "System.Boolean", - "typeSimple": "boolean" + "typeSimple": "boolean", + "isRequired": false + }, + { + "name": "DefaultFromAddress", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": true + }, + { + "name": "DefaultFromDisplayName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": true } ] }, @@ -2852,8 +3485,17 @@ "properties": [ { "name": "Name", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "ConcurrencyStamp", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false } ] }, @@ -2866,8 +3508,10 @@ "properties": [ { "name": "Filter", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false } ] }, @@ -2880,13 +3524,17 @@ "properties": [ { "name": "AdminEmailAddress", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": true }, { "name": "AdminPassword", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": true } ] }, @@ -2899,8 +3547,10 @@ "properties": [ { "name": "Name", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": true } ] }, @@ -2910,7 +3560,15 @@ "enumNames": null, "enumValues": null, "genericArguments": null, - "properties": [] + "properties": [ + { + "name": "ConcurrencyStamp", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + } + ] }, "Volo.Abp.FeatureManagement.GetFeatureListResultDto": { "baseType": null, @@ -2921,8 +3579,10 @@ "properties": [ { "name": "Groups", + "jsonName": null, "type": "[Volo.Abp.FeatureManagement.FeatureGroupDto]", - "typeSimple": "[Volo.Abp.FeatureManagement.FeatureGroupDto]" + "typeSimple": "[Volo.Abp.FeatureManagement.FeatureGroupDto]", + "isRequired": false } ] }, @@ -2935,18 +3595,24 @@ "properties": [ { "name": "Name", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "DisplayName", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "Features", + "jsonName": null, "type": "[Volo.Abp.FeatureManagement.FeatureDto]", - "typeSimple": "[Volo.Abp.FeatureManagement.FeatureDto]" + "typeSimple": "[Volo.Abp.FeatureManagement.FeatureDto]", + "isRequired": false } ] }, @@ -2959,43 +3625,59 @@ "properties": [ { "name": "Name", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "DisplayName", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "Value", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "Provider", + "jsonName": null, "type": "Volo.Abp.FeatureManagement.FeatureProviderDto", - "typeSimple": "Volo.Abp.FeatureManagement.FeatureProviderDto" + "typeSimple": "Volo.Abp.FeatureManagement.FeatureProviderDto", + "isRequired": false }, { "name": "Description", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "ValueType", + "jsonName": null, "type": "Volo.Abp.Validation.StringValues.IStringValueType", - "typeSimple": "Volo.Abp.Validation.StringValues.IStringValueType" + "typeSimple": "Volo.Abp.Validation.StringValues.IStringValueType", + "isRequired": false }, { "name": "Depth", + "jsonName": null, "type": "System.Int32", - "typeSimple": "number" + "typeSimple": "number", + "isRequired": false }, { "name": "ParentName", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false } ] }, @@ -3008,13 +3690,17 @@ "properties": [ { "name": "Name", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "Key", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false } ] }, @@ -3027,23 +3713,31 @@ "properties": [ { "name": "Name", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "Item", + "jsonName": null, "type": "System.Object", - "typeSimple": "object" + "typeSimple": "object", + "isRequired": false }, { "name": "Properties", + "jsonName": null, "type": "{System.String:System.Object}", - "typeSimple": "{string:object}" + "typeSimple": "{string:object}", + "isRequired": false }, { "name": "Validator", + "jsonName": null, "type": "Volo.Abp.Validation.StringValues.IValueValidator", - "typeSimple": "Volo.Abp.Validation.StringValues.IValueValidator" + "typeSimple": "Volo.Abp.Validation.StringValues.IValueValidator", + "isRequired": false } ] }, @@ -3056,18 +3750,24 @@ "properties": [ { "name": "Name", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "Item", + "jsonName": null, "type": "System.Object", - "typeSimple": "object" + "typeSimple": "object", + "isRequired": false }, { "name": "Properties", + "jsonName": null, "type": "{System.String:System.Object}", - "typeSimple": "{string:object}" + "typeSimple": "{string:object}", + "isRequired": false } ] }, @@ -3080,8 +3780,10 @@ "properties": [ { "name": "Features", + "jsonName": null, "type": "[Volo.Abp.FeatureManagement.UpdateFeatureDto]", - "typeSimple": "[Volo.Abp.FeatureManagement.UpdateFeatureDto]" + "typeSimple": "[Volo.Abp.FeatureManagement.UpdateFeatureDto]", + "isRequired": false } ] }, @@ -3094,13 +3796,17 @@ "properties": [ { "name": "Name", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "Value", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false } ] }, @@ -3113,53 +3819,73 @@ "properties": [ { "name": "Localization", + "jsonName": null, "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationLocalizationConfigurationDto", - "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationLocalizationConfigurationDto" + "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationLocalizationConfigurationDto", + "isRequired": false }, { "name": "Auth", + "jsonName": null, "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationAuthConfigurationDto", - "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationAuthConfigurationDto" + "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationAuthConfigurationDto", + "isRequired": false }, { "name": "Setting", + "jsonName": null, "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationSettingConfigurationDto", - "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationSettingConfigurationDto" + "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationSettingConfigurationDto", + "isRequired": false }, { "name": "CurrentUser", + "jsonName": null, "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.CurrentUserDto", - "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.CurrentUserDto" + "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.CurrentUserDto", + "isRequired": false }, { "name": "Features", + "jsonName": null, "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationFeatureConfigurationDto", - "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationFeatureConfigurationDto" + "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationFeatureConfigurationDto", + "isRequired": false }, { "name": "MultiTenancy", + "jsonName": null, "type": "Volo.Abp.AspNetCore.Mvc.MultiTenancy.MultiTenancyInfoDto", - "typeSimple": "Volo.Abp.AspNetCore.Mvc.MultiTenancy.MultiTenancyInfoDto" + "typeSimple": "Volo.Abp.AspNetCore.Mvc.MultiTenancy.MultiTenancyInfoDto", + "isRequired": false }, { "name": "CurrentTenant", + "jsonName": null, "type": "Volo.Abp.AspNetCore.Mvc.MultiTenancy.CurrentTenantDto", - "typeSimple": "Volo.Abp.AspNetCore.Mvc.MultiTenancy.CurrentTenantDto" + "typeSimple": "Volo.Abp.AspNetCore.Mvc.MultiTenancy.CurrentTenantDto", + "isRequired": false }, { "name": "Timing", + "jsonName": null, "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.TimingDto", - "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.TimingDto" + "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.TimingDto", + "isRequired": false }, { "name": "Clock", + "jsonName": null, "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ClockDto", - "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ClockDto" + "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ClockDto", + "isRequired": false }, { "name": "ObjectExtensions", + "jsonName": null, "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ObjectExtensionsDto", - "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ObjectExtensionsDto" + "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ObjectExtensionsDto", + "isRequired": false } ] }, @@ -3172,33 +3898,45 @@ "properties": [ { "name": "Values", - "type": "{System.String:{System.String:System.String}}", - "typeSimple": "{string:{string:string}}" + "jsonName": null, + "type": "{System.String:System.Collections.Generic.Dictionary}", + "typeSimple": "{string:System.Collections.Generic.Dictionary}", + "isRequired": false }, { "name": "Languages", + "jsonName": null, "type": "[Volo.Abp.Localization.LanguageInfo]", - "typeSimple": "[Volo.Abp.Localization.LanguageInfo]" + "typeSimple": "[Volo.Abp.Localization.LanguageInfo]", + "isRequired": false }, { "name": "CurrentCulture", + "jsonName": null, "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.CurrentCultureDto", - "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.CurrentCultureDto" + "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.CurrentCultureDto", + "isRequired": false }, { "name": "DefaultResourceName", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "LanguagesMap", + "jsonName": null, "type": "{System.String:[Volo.Abp.NameValue]}", - "typeSimple": "{string:[Volo.Abp.NameValue]}" + "typeSimple": "{string:[Volo.Abp.NameValue]}", + "isRequired": false }, { "name": "LanguageFilesMap", + "jsonName": null, "type": "{System.String:[Volo.Abp.NameValue]}", - "typeSimple": "{string:[Volo.Abp.NameValue]}" + "typeSimple": "{string:[Volo.Abp.NameValue]}", + "isRequired": false } ] }, @@ -3211,23 +3949,31 @@ "properties": [ { "name": "CultureName", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "UiCultureName", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "DisplayName", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "FlagIcon", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false } ] }, @@ -3240,48 +3986,66 @@ "properties": [ { "name": "DisplayName", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "EnglishName", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "ThreeLetterIsoLanguageName", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "TwoLetterIsoLanguageName", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "IsRightToLeft", + "jsonName": null, "type": "System.Boolean", - "typeSimple": "boolean" + "typeSimple": "boolean", + "isRequired": false }, { "name": "CultureName", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "Name", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "NativeName", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "DateTimeFormat", + "jsonName": null, "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.DateTimeFormatDto", - "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.DateTimeFormatDto" + "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.DateTimeFormatDto", + "isRequired": false } ] }, @@ -3294,38 +4058,52 @@ "properties": [ { "name": "CalendarAlgorithmType", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "DateTimeFormatLong", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "ShortDatePattern", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "FullDateTimePattern", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "DateSeparator", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "ShortTimePattern", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "LongTimePattern", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false } ] }, @@ -3348,13 +4126,17 @@ "properties": [ { "name": "Name", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "Value", + "jsonName": null, "type": "T", - "typeSimple": "T" + "typeSimple": "T", + "isRequired": false } ] }, @@ -3367,13 +4149,17 @@ "properties": [ { "name": "Policies", + "jsonName": null, "type": "{System.String:System.Boolean}", - "typeSimple": "{string:boolean}" + "typeSimple": "{string:boolean}", + "isRequired": false }, { "name": "GrantedPolicies", + "jsonName": null, "type": "{System.String:System.Boolean}", - "typeSimple": "{string:boolean}" + "typeSimple": "{string:boolean}", + "isRequired": false } ] }, @@ -3386,8 +4172,10 @@ "properties": [ { "name": "Values", + "jsonName": null, "type": "{System.String:System.String}", - "typeSimple": "{string:string}" + "typeSimple": "{string:string}", + "isRequired": false } ] }, @@ -3400,58 +4188,94 @@ "properties": [ { "name": "IsAuthenticated", + "jsonName": null, "type": "System.Boolean", - "typeSimple": "boolean" + "typeSimple": "boolean", + "isRequired": false }, { "name": "Id", + "jsonName": null, "type": "System.Guid?", - "typeSimple": "string?" + "typeSimple": "string?", + "isRequired": false }, { "name": "TenantId", + "jsonName": null, + "type": "System.Guid?", + "typeSimple": "string?", + "isRequired": false + }, + { + "name": "ImpersonatorUserId", + "jsonName": null, + "type": "System.Guid?", + "typeSimple": "string?", + "isRequired": false + }, + { + "name": "ImpersonatorTenantId", + "jsonName": null, "type": "System.Guid?", - "typeSimple": "string?" + "typeSimple": "string?", + "isRequired": false }, { "name": "UserName", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "Name", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "SurName", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "Email", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "EmailVerified", + "jsonName": null, "type": "System.Boolean", - "typeSimple": "boolean" + "typeSimple": "boolean", + "isRequired": false }, { "name": "PhoneNumber", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "PhoneNumberVerified", + "jsonName": null, "type": "System.Boolean", - "typeSimple": "boolean" + "typeSimple": "boolean", + "isRequired": false }, { "name": "Roles", + "jsonName": null, "type": "[System.String]", - "typeSimple": "[string]" + "typeSimple": "[string]", + "isRequired": false } ] }, @@ -3464,8 +4288,10 @@ "properties": [ { "name": "Values", + "jsonName": null, "type": "{System.String:System.String}", - "typeSimple": "{string:string}" + "typeSimple": "{string:string}", + "isRequired": false } ] }, @@ -3478,8 +4304,10 @@ "properties": [ { "name": "IsEnabled", + "jsonName": null, "type": "System.Boolean", - "typeSimple": "boolean" + "typeSimple": "boolean", + "isRequired": false } ] }, @@ -3492,18 +4320,24 @@ "properties": [ { "name": "Id", + "jsonName": null, "type": "System.Guid?", - "typeSimple": "string?" + "typeSimple": "string?", + "isRequired": false }, { "name": "Name", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "IsAvailable", + "jsonName": null, "type": "System.Boolean", - "typeSimple": "boolean" + "typeSimple": "boolean", + "isRequired": false } ] }, @@ -3516,8 +4350,10 @@ "properties": [ { "name": "TimeZone", + "jsonName": null, "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.TimeZone", - "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.TimeZone" + "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.TimeZone", + "isRequired": false } ] }, @@ -3530,13 +4366,17 @@ "properties": [ { "name": "Iana", + "jsonName": null, "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.IanaTimeZone", - "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.IanaTimeZone" + "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.IanaTimeZone", + "isRequired": false }, { "name": "Windows", + "jsonName": null, "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.WindowsTimeZone", - "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.WindowsTimeZone" + "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.WindowsTimeZone", + "isRequired": false } ] }, @@ -3549,8 +4389,10 @@ "properties": [ { "name": "TimeZoneName", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false } ] }, @@ -3563,8 +4405,10 @@ "properties": [ { "name": "TimeZoneId", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false } ] }, @@ -3577,8 +4421,10 @@ "properties": [ { "name": "Kind", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false } ] }, @@ -3591,13 +4437,17 @@ "properties": [ { "name": "Modules", + "jsonName": null, "type": "{System.String:Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ModuleExtensionDto}", - "typeSimple": "{string:Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ModuleExtensionDto}" + "typeSimple": "{string:Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ModuleExtensionDto}", + "isRequired": false }, { "name": "Enums", + "jsonName": null, "type": "{System.String:Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionEnumDto}", - "typeSimple": "{string:Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionEnumDto}" + "typeSimple": "{string:Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionEnumDto}", + "isRequired": false } ] }, @@ -3610,13 +4460,17 @@ "properties": [ { "name": "Entities", + "jsonName": null, "type": "{System.String:Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.EntityExtensionDto}", - "typeSimple": "{string:Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.EntityExtensionDto}" + "typeSimple": "{string:Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.EntityExtensionDto}", + "isRequired": false }, { "name": "Configuration", + "jsonName": null, "type": "{System.String:System.Object}", - "typeSimple": "{string:object}" + "typeSimple": "{string:object}", + "isRequired": false } ] }, @@ -3629,13 +4483,17 @@ "properties": [ { "name": "Properties", + "jsonName": null, "type": "{System.String:Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyDto}", - "typeSimple": "{string:Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyDto}" + "typeSimple": "{string:Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyDto}", + "isRequired": false }, { "name": "Configuration", + "jsonName": null, "type": "{System.String:System.Object}", - "typeSimple": "{string:object}" + "typeSimple": "{string:object}", + "isRequired": false } ] }, @@ -3648,43 +4506,59 @@ "properties": [ { "name": "Type", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "TypeSimple", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "DisplayName", + "jsonName": null, "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.LocalizableStringDto", - "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.LocalizableStringDto" + "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.LocalizableStringDto", + "isRequired": false }, { "name": "Api", + "jsonName": null, "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyApiDto", - "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyApiDto" + "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyApiDto", + "isRequired": false }, { "name": "Ui", + "jsonName": null, "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyUiDto", - "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyUiDto" + "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyUiDto", + "isRequired": false }, { "name": "Attributes", + "jsonName": null, "type": "[Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyAttributeDto]", - "typeSimple": "[Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyAttributeDto]" + "typeSimple": "[Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyAttributeDto]", + "isRequired": false }, { "name": "Configuration", + "jsonName": null, "type": "{System.String:System.Object}", - "typeSimple": "{string:object}" + "typeSimple": "{string:object}", + "isRequired": false }, { "name": "DefaultValue", + "jsonName": null, "type": "System.Object", - "typeSimple": "object" + "typeSimple": "object", + "isRequired": false } ] }, @@ -3697,13 +4571,17 @@ "properties": [ { "name": "Name", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "Resource", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false } ] }, @@ -3716,18 +4594,24 @@ "properties": [ { "name": "OnGet", + "jsonName": null, "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyApiGetDto", - "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyApiGetDto" + "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyApiGetDto", + "isRequired": false }, { "name": "OnCreate", + "jsonName": null, "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyApiCreateDto", - "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyApiCreateDto" + "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyApiCreateDto", + "isRequired": false }, { "name": "OnUpdate", + "jsonName": null, "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyApiUpdateDto", - "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyApiUpdateDto" + "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyApiUpdateDto", + "isRequired": false } ] }, @@ -3740,8 +4624,10 @@ "properties": [ { "name": "IsAvailable", + "jsonName": null, "type": "System.Boolean", - "typeSimple": "boolean" + "typeSimple": "boolean", + "isRequired": false } ] }, @@ -3754,8 +4640,10 @@ "properties": [ { "name": "IsAvailable", + "jsonName": null, "type": "System.Boolean", - "typeSimple": "boolean" + "typeSimple": "boolean", + "isRequired": false } ] }, @@ -3768,8 +4656,10 @@ "properties": [ { "name": "IsAvailable", + "jsonName": null, "type": "System.Boolean", - "typeSimple": "boolean" + "typeSimple": "boolean", + "isRequired": false } ] }, @@ -3782,18 +4672,31 @@ "properties": [ { "name": "OnTable", + "jsonName": null, "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyUiTableDto", - "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyUiTableDto" + "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyUiTableDto", + "isRequired": false }, { "name": "OnCreateForm", + "jsonName": null, "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyUiFormDto", - "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyUiFormDto" + "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyUiFormDto", + "isRequired": false }, { "name": "OnEditForm", + "jsonName": null, "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyUiFormDto", - "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyUiFormDto" + "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyUiFormDto", + "isRequired": false + }, + { + "name": "Lookup", + "jsonName": null, + "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyUiLookupDto", + "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyUiLookupDto", + "isRequired": false } ] }, @@ -3806,8 +4709,10 @@ "properties": [ { "name": "IsVisible", + "jsonName": null, "type": "System.Boolean", - "typeSimple": "boolean" + "typeSimple": "boolean", + "isRequired": false } ] }, @@ -3820,8 +4725,54 @@ "properties": [ { "name": "IsVisible", + "jsonName": null, "type": "System.Boolean", - "typeSimple": "boolean" + "typeSimple": "boolean", + "isRequired": false + } + ] + }, + "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyUiLookupDto": { + "baseType": null, + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "Url", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "ResultListPropertyName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "DisplayPropertyName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "ValuePropertyName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "FilterParamName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false } ] }, @@ -3834,13 +4785,17 @@ "properties": [ { "name": "TypeSimple", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "Config", + "jsonName": null, "type": "{System.String:System.Object}", - "typeSimple": "{string:object}" + "typeSimple": "{string:object}", + "isRequired": false } ] }, @@ -3853,13 +4808,17 @@ "properties": [ { "name": "Fields", + "jsonName": null, "type": "[Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionEnumFieldDto]", - "typeSimple": "[Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionEnumFieldDto]" + "typeSimple": "[Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionEnumFieldDto]", + "isRequired": false }, { "name": "LocalizationResource", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false } ] }, @@ -3872,13 +4831,17 @@ "properties": [ { "name": "Name", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "Value", + "jsonName": null, "type": "System.Object", - "typeSimple": "object" + "typeSimple": "object", + "isRequired": false } ] }, @@ -3891,8 +4854,10 @@ "properties": [ { "name": "IncludeTypes", + "jsonName": null, "type": "System.Boolean", - "typeSimple": "boolean" + "typeSimple": "boolean", + "isRequired": false } ] }, @@ -3905,13 +4870,17 @@ "properties": [ { "name": "Modules", + "jsonName": null, "type": "{System.String:Volo.Abp.Http.Modeling.ModuleApiDescriptionModel}", - "typeSimple": "{string:Volo.Abp.Http.Modeling.ModuleApiDescriptionModel}" + "typeSimple": "{string:Volo.Abp.Http.Modeling.ModuleApiDescriptionModel}", + "isRequired": false }, { "name": "Types", + "jsonName": null, "type": "{System.String:Volo.Abp.Http.Modeling.TypeApiDescriptionModel}", - "typeSimple": "{string:Volo.Abp.Http.Modeling.TypeApiDescriptionModel}" + "typeSimple": "{string:Volo.Abp.Http.Modeling.TypeApiDescriptionModel}", + "isRequired": false } ] }, @@ -3924,18 +4893,24 @@ "properties": [ { "name": "RootPath", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "RemoteServiceName", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "Controllers", + "jsonName": null, "type": "{System.String:Volo.Abp.Http.Modeling.ControllerApiDescriptionModel}", - "typeSimple": "{string:Volo.Abp.Http.Modeling.ControllerApiDescriptionModel}" + "typeSimple": "{string:Volo.Abp.Http.Modeling.ControllerApiDescriptionModel}", + "isRequired": false } ] }, @@ -3948,23 +4923,38 @@ "properties": [ { "name": "ControllerName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "ControllerGroupName", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "Type", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "Interfaces", + "jsonName": null, "type": "[Volo.Abp.Http.Modeling.ControllerInterfaceApiDescriptionModel]", - "typeSimple": "[Volo.Abp.Http.Modeling.ControllerInterfaceApiDescriptionModel]" + "typeSimple": "[Volo.Abp.Http.Modeling.ControllerInterfaceApiDescriptionModel]", + "isRequired": false }, { "name": "Actions", + "jsonName": null, "type": "{System.String:Volo.Abp.Http.Modeling.ActionApiDescriptionModel}", - "typeSimple": "{string:Volo.Abp.Http.Modeling.ActionApiDescriptionModel}" + "typeSimple": "{string:Volo.Abp.Http.Modeling.ActionApiDescriptionModel}", + "isRequired": false } ] }, @@ -3977,8 +4967,10 @@ "properties": [ { "name": "Type", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false } ] }, @@ -3991,43 +4983,73 @@ "properties": [ { "name": "UniqueName", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "Name", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "HttpMethod", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "Url", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "SupportedVersions", + "jsonName": null, "type": "[System.String]", - "typeSimple": "[string]" + "typeSimple": "[string]", + "isRequired": false }, { "name": "ParametersOnMethod", + "jsonName": null, "type": "[Volo.Abp.Http.Modeling.MethodParameterApiDescriptionModel]", - "typeSimple": "[Volo.Abp.Http.Modeling.MethodParameterApiDescriptionModel]" + "typeSimple": "[Volo.Abp.Http.Modeling.MethodParameterApiDescriptionModel]", + "isRequired": false }, { "name": "Parameters", + "jsonName": null, "type": "[Volo.Abp.Http.Modeling.ParameterApiDescriptionModel]", - "typeSimple": "[Volo.Abp.Http.Modeling.ParameterApiDescriptionModel]" + "typeSimple": "[Volo.Abp.Http.Modeling.ParameterApiDescriptionModel]", + "isRequired": false }, { "name": "ReturnValue", + "jsonName": null, "type": "Volo.Abp.Http.Modeling.ReturnValueApiDescriptionModel", - "typeSimple": "Volo.Abp.Http.Modeling.ReturnValueApiDescriptionModel" + "typeSimple": "Volo.Abp.Http.Modeling.ReturnValueApiDescriptionModel", + "isRequired": false + }, + { + "name": "AllowAnonymous", + "jsonName": null, + "type": "System.Boolean?", + "typeSimple": "boolean?", + "isRequired": false + }, + { + "name": "ImplementFrom", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false } ] }, @@ -4040,33 +5062,45 @@ "properties": [ { "name": "Name", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "TypeAsString", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "Type", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "TypeSimple", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "IsOptional", + "jsonName": null, "type": "System.Boolean", - "typeSimple": "boolean" + "typeSimple": "boolean", + "isRequired": false }, { "name": "DefaultValue", + "jsonName": null, "type": "System.Object", - "typeSimple": "object" + "typeSimple": "object", + "isRequired": false } ] }, @@ -4079,48 +5113,73 @@ "properties": [ { "name": "NameOnMethod", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "Name", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "JsonName", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "Type", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "TypeSimple", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "IsOptional", + "jsonName": null, "type": "System.Boolean", - "typeSimple": "boolean" + "typeSimple": "boolean", + "isRequired": false }, { "name": "DefaultValue", + "jsonName": null, "type": "System.Object", - "typeSimple": "object" + "typeSimple": "object", + "isRequired": false }, { "name": "ConstraintTypes", + "jsonName": null, "type": "[System.String]", - "typeSimple": "[string]" + "typeSimple": "[string]", + "isRequired": false }, { "name": "BindingSourceId", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "DescriptorName", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false } ] }, @@ -4133,13 +5192,17 @@ "properties": [ { "name": "Type", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "TypeSimple", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false } ] }, @@ -4152,33 +5215,45 @@ "properties": [ { "name": "BaseType", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "IsEnum", + "jsonName": null, "type": "System.Boolean", - "typeSimple": "boolean" + "typeSimple": "boolean", + "isRequired": false }, { "name": "EnumNames", + "jsonName": null, "type": "[System.String]", - "typeSimple": "[string]" + "typeSimple": "[string]", + "isRequired": false }, { "name": "EnumValues", + "jsonName": null, "type": "[System.Object]", - "typeSimple": "[object]" + "typeSimple": "[object]", + "isRequired": false }, { "name": "GenericArguments", + "jsonName": null, "type": "[System.String]", - "typeSimple": "[string]" + "typeSimple": "[string]", + "isRequired": false }, { "name": "Properties", + "jsonName": null, "type": "[Volo.Abp.Http.Modeling.PropertyApiDescriptionModel]", - "typeSimple": "[Volo.Abp.Http.Modeling.PropertyApiDescriptionModel]" + "typeSimple": "[Volo.Abp.Http.Modeling.PropertyApiDescriptionModel]", + "isRequired": false } ] }, @@ -4191,18 +5266,38 @@ "properties": [ { "name": "Name", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "JsonName", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "Type", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "TypeSimple", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false + }, + { + "name": "IsRequired", + "jsonName": null, + "type": "System.Boolean", + "typeSimple": "boolean", + "isRequired": false } ] } diff --git a/npm/ng-packs/packages/identity/proxy/src/lib/proxy/identity/identity-role.service.ts b/npm/ng-packs/packages/identity/proxy/src/lib/proxy/identity/identity-role.service.ts new file mode 100644 index 0000000000..6e296c171b --- /dev/null +++ b/npm/ng-packs/packages/identity/proxy/src/lib/proxy/identity/identity-role.service.ts @@ -0,0 +1,58 @@ +import type { GetIdentityRolesInput, IdentityRoleCreateDto, IdentityRoleDto, IdentityRoleUpdateDto } from './models'; +import { RestService } from '@abp/ng.core'; +import type { ListResultDto, PagedResultDto } from '@abp/ng.core'; +import { Injectable } from '@angular/core'; + +@Injectable({ + providedIn: 'root', +}) +export class IdentityRoleService { + apiName = 'AbpIdentity'; + + create = (input: IdentityRoleCreateDto) => + this.restService.request({ + method: 'POST', + url: '/api/identity/roles', + body: input, + }, + { apiName: this.apiName }); + + delete = (id: string) => + this.restService.request({ + method: 'DELETE', + url: `/api/identity/roles/${id}`, + }, + { apiName: this.apiName }); + + get = (id: string) => + this.restService.request({ + method: 'GET', + url: `/api/identity/roles/${id}`, + }, + { apiName: this.apiName }); + + getAllList = () => + this.restService.request>({ + method: 'GET', + url: '/api/identity/roles/all', + }, + { apiName: this.apiName }); + + getList = (input: GetIdentityRolesInput) => + this.restService.request>({ + method: 'GET', + url: '/api/identity/roles', + params: { filter: input.filter, sorting: input.sorting, skipCount: input.skipCount, maxResultCount: input.maxResultCount }, + }, + { apiName: this.apiName }); + + update = (id: string, input: IdentityRoleUpdateDto) => + this.restService.request({ + method: 'PUT', + url: `/api/identity/roles/${id}`, + body: input, + }, + { apiName: this.apiName }); + + constructor(private restService: RestService) {} +} diff --git a/npm/ng-packs/packages/identity/proxy/src/lib/proxy/identity/identity-user-lookup.service.ts b/npm/ng-packs/packages/identity/proxy/src/lib/proxy/identity/identity-user-lookup.service.ts new file mode 100644 index 0000000000..af4583aa28 --- /dev/null +++ b/npm/ng-packs/packages/identity/proxy/src/lib/proxy/identity/identity-user-lookup.service.ts @@ -0,0 +1,44 @@ +import type { UserLookupCountInputDto, UserLookupSearchInputDto } from './models'; +import { RestService } from '@abp/ng.core'; +import type { ListResultDto } from '@abp/ng.core'; +import { Injectable } from '@angular/core'; +import type { UserData } from '../users/models'; + +@Injectable({ + providedIn: 'root', +}) +export class IdentityUserLookupService { + apiName = 'AbpIdentity'; + + findById = (id: string) => + this.restService.request({ + method: 'GET', + url: `/api/identity/users/lookup/${id}`, + }, + { apiName: this.apiName }); + + findByUserName = (userName: string) => + this.restService.request({ + method: 'GET', + url: `/api/identity/users/lookup/by-username/${userName}`, + }, + { apiName: this.apiName }); + + getCount = (input: UserLookupCountInputDto) => + this.restService.request({ + method: 'GET', + url: '/api/identity/users/lookup/count', + params: { filter: input.filter }, + }, + { apiName: this.apiName }); + + search = (input: UserLookupSearchInputDto) => + this.restService.request>({ + method: 'GET', + url: '/api/identity/users/lookup/search', + params: { filter: input.filter, sorting: input.sorting, skipCount: input.skipCount, maxResultCount: input.maxResultCount }, + }, + { apiName: this.apiName }); + + constructor(private restService: RestService) {} +} diff --git a/npm/ng-packs/packages/identity/proxy/src/lib/proxy/identity/identity-user.service.ts b/npm/ng-packs/packages/identity/proxy/src/lib/proxy/identity/identity-user.service.ts new file mode 100644 index 0000000000..1d36c7a2e7 --- /dev/null +++ b/npm/ng-packs/packages/identity/proxy/src/lib/proxy/identity/identity-user.service.ts @@ -0,0 +1,87 @@ +import type { GetIdentityUsersInput, IdentityRoleDto, IdentityUserCreateDto, IdentityUserDto, IdentityUserUpdateDto, IdentityUserUpdateRolesDto } from './models'; +import { RestService } from '@abp/ng.core'; +import type { ListResultDto, PagedResultDto } from '@abp/ng.core'; +import { Injectable } from '@angular/core'; + +@Injectable({ + providedIn: 'root', +}) +export class IdentityUserService { + apiName = 'AbpIdentity'; + + create = (input: IdentityUserCreateDto) => + this.restService.request({ + method: 'POST', + url: '/api/identity/users', + body: input, + }, + { apiName: this.apiName }); + + delete = (id: string) => + this.restService.request({ + method: 'DELETE', + url: `/api/identity/users/${id}`, + }, + { apiName: this.apiName }); + + findByEmail = (email: string) => + this.restService.request({ + method: 'GET', + url: `/api/identity/users/by-email/${email}`, + }, + { apiName: this.apiName }); + + findByUsername = (userName: string) => + this.restService.request({ + method: 'GET', + url: `/api/identity/users/by-username/${userName}`, + }, + { apiName: this.apiName }); + + get = (id: string) => + this.restService.request({ + method: 'GET', + url: `/api/identity/users/${id}`, + }, + { apiName: this.apiName }); + + getAssignableRoles = () => + this.restService.request>({ + method: 'GET', + url: '/api/identity/users/assignable-roles', + }, + { apiName: this.apiName }); + + getList = (input: GetIdentityUsersInput) => + this.restService.request>({ + method: 'GET', + url: '/api/identity/users', + params: { filter: input.filter, sorting: input.sorting, skipCount: input.skipCount, maxResultCount: input.maxResultCount }, + }, + { apiName: this.apiName }); + + getRoles = (id: string) => + this.restService.request>({ + method: 'GET', + url: `/api/identity/users/${id}/roles`, + }, + { apiName: this.apiName }); + + update = (id: string, input: IdentityUserUpdateDto) => + this.restService.request({ + method: 'PUT', + url: `/api/identity/users/${id}`, + body: input, + }, + { apiName: this.apiName }); + + updateRoles = (id: string, input: IdentityUserUpdateRolesDto) => + this.restService.request({ + method: 'PUT', + url: `/api/identity/users/${id}/roles`, + body: input, + }, + { apiName: this.apiName }); + + constructor(private restService: RestService) {} +} diff --git a/npm/ng-packs/packages/identity/src/lib/proxy/identity/index.ts b/npm/ng-packs/packages/identity/proxy/src/lib/proxy/identity/index.ts similarity index 100% rename from npm/ng-packs/packages/identity/src/lib/proxy/identity/index.ts rename to npm/ng-packs/packages/identity/proxy/src/lib/proxy/identity/index.ts diff --git a/npm/ng-packs/packages/identity/src/lib/proxy/identity/models.ts b/npm/ng-packs/packages/identity/proxy/src/lib/proxy/identity/models.ts similarity index 62% rename from npm/ng-packs/packages/identity/src/lib/proxy/identity/models.ts rename to npm/ng-packs/packages/identity/proxy/src/lib/proxy/identity/models.ts index 185fcc8b4a..8a4339eed4 100644 --- a/npm/ng-packs/packages/identity/src/lib/proxy/identity/models.ts +++ b/npm/ng-packs/packages/identity/proxy/src/lib/proxy/identity/models.ts @@ -1,21 +1,20 @@ -import type { - ExtensibleEntityDto, - ExtensibleFullAuditedEntityDto, - ExtensibleObject, - PagedAndSortedResultRequestDto, -} from '@abp/ng.core'; +import type { ExtensibleEntityDto, ExtensibleFullAuditedEntityDto, ExtensibleObject, PagedAndSortedResultRequestDto } from '@abp/ng.core'; export interface ChangePasswordInput { - currentPassword: string; + currentPassword?: string; newPassword: string; } +export interface GetIdentityRolesInput extends PagedAndSortedResultRequestDto { + filter?: string; +} + export interface GetIdentityUsersInput extends PagedAndSortedResultRequestDto { - filter: string; + filter?: string; } -// eslint-disable-next-line @typescript-eslint/no-empty-interface -export interface IdentityRoleCreateDto extends IdentityRoleCreateOrUpdateDtoBase {} +export interface IdentityRoleCreateDto extends IdentityRoleCreateOrUpdateDtoBase { +} export interface IdentityRoleCreateOrUpdateDtoBase extends ExtensibleObject { name: string; @@ -24,15 +23,15 @@ export interface IdentityRoleCreateOrUpdateDtoBase extends ExtensibleObject { } export interface IdentityRoleDto extends ExtensibleEntityDto { - name: string; + name?: string; isDefault: boolean; isStatic: boolean; isPublic: boolean; - concurrencyStamp: string; + concurrencyStamp?: string; } export interface IdentityRoleUpdateDto extends IdentityRoleCreateOrUpdateDtoBase { - concurrencyStamp: string; + concurrencyStamp?: string; } export interface IdentityUserCreateDto extends IdentityUserCreateOrUpdateDtoBase { @@ -41,31 +40,31 @@ export interface IdentityUserCreateDto extends IdentityUserCreateOrUpdateDtoBase export interface IdentityUserCreateOrUpdateDtoBase extends ExtensibleObject { userName: string; - name: string; - surname: string; + name?: string; + surname?: string; email: string; - phoneNumber: string; + phoneNumber?: string; lockoutEnabled: boolean; roleNames: string[]; } export interface IdentityUserDto extends ExtensibleFullAuditedEntityDto { tenantId?: string; - userName: string; - name: string; - surname: string; - email: string; + userName?: string; + name?: string; + surname?: string; + email?: string; emailConfirmed: boolean; - phoneNumber: string; + phoneNumber?: string; phoneNumberConfirmed: boolean; lockoutEnabled: boolean; lockoutEnd?: string; - concurrencyStamp: string; + concurrencyStamp?: string; } export interface IdentityUserUpdateDto extends IdentityUserCreateOrUpdateDtoBase { - password: string; - concurrencyStamp: string; + password?: string; + concurrencyStamp?: string; } export interface IdentityUserUpdateRolesDto { @@ -73,27 +72,29 @@ export interface IdentityUserUpdateRolesDto { } export interface ProfileDto extends ExtensibleObject { - userName: string; - email: string; - name: string; - surname: string; - phoneNumber: string; + userName?: string; + email?: string; + name?: string; + surname?: string; + phoneNumber?: string; isExternal: boolean; hasPassword: boolean; + concurrencyStamp?: string; } export interface UpdateProfileDto extends ExtensibleObject { - userName: string; - email: string; - name: string; - surname: string; - phoneNumber: string; + userName?: string; + email?: string; + name?: string; + surname?: string; + phoneNumber?: string; + concurrencyStamp?: string; } export interface UserLookupCountInputDto { - filter: string; + filter?: string; } export interface UserLookupSearchInputDto extends PagedAndSortedResultRequestDto { - filter: string; + filter?: string; } diff --git a/npm/ng-packs/packages/identity/proxy/src/lib/proxy/identity/profile.service.ts b/npm/ng-packs/packages/identity/proxy/src/lib/proxy/identity/profile.service.ts new file mode 100644 index 0000000000..4b8460d03b --- /dev/null +++ b/npm/ng-packs/packages/identity/proxy/src/lib/proxy/identity/profile.service.ts @@ -0,0 +1,35 @@ +import type { ChangePasswordInput, ProfileDto, UpdateProfileDto } from './models'; +import { RestService } from '@abp/ng.core'; +import { Injectable } from '@angular/core'; + +@Injectable({ + providedIn: 'root', +}) +export class ProfileService { + apiName = 'AbpIdentity'; + + changePassword = (input: ChangePasswordInput) => + this.restService.request({ + method: 'POST', + url: '/api/identity/my-profile/change-password', + body: input, + }, + { apiName: this.apiName }); + + get = () => + this.restService.request({ + method: 'GET', + url: '/api/identity/my-profile', + }, + { apiName: this.apiName }); + + update = (input: UpdateProfileDto) => + this.restService.request({ + method: 'PUT', + url: '/api/identity/my-profile', + body: input, + }, + { apiName: this.apiName }); + + constructor(private restService: RestService) {} +} diff --git a/npm/ng-packs/packages/identity/proxy/src/lib/proxy/index.ts b/npm/ng-packs/packages/identity/proxy/src/lib/proxy/index.ts new file mode 100644 index 0000000000..cbb26fdf98 --- /dev/null +++ b/npm/ng-packs/packages/identity/proxy/src/lib/proxy/index.ts @@ -0,0 +1,3 @@ +import * as Identity from './identity'; +import * as Users from './users'; +export { Identity, Users }; diff --git a/npm/ng-packs/packages/identity/src/lib/proxy/users/index.ts b/npm/ng-packs/packages/identity/proxy/src/lib/proxy/users/index.ts similarity index 100% rename from npm/ng-packs/packages/identity/src/lib/proxy/users/index.ts rename to npm/ng-packs/packages/identity/proxy/src/lib/proxy/users/index.ts diff --git a/npm/ng-packs/packages/identity/proxy/src/lib/proxy/users/models.ts b/npm/ng-packs/packages/identity/proxy/src/lib/proxy/users/models.ts new file mode 100644 index 0000000000..beecb38a64 --- /dev/null +++ b/npm/ng-packs/packages/identity/proxy/src/lib/proxy/users/models.ts @@ -0,0 +1,12 @@ + +export interface UserData { + id?: string; + tenantId?: string; + userName?: string; + name?: string; + surname?: string; + email?: string; + emailConfirmed: boolean; + phoneNumber?: string; + phoneNumberConfirmed: boolean; +} diff --git a/npm/ng-packs/packages/identity/proxy/src/public-api.ts b/npm/ng-packs/packages/identity/proxy/src/public-api.ts new file mode 100644 index 0000000000..11aece60c4 --- /dev/null +++ b/npm/ng-packs/packages/identity/proxy/src/public-api.ts @@ -0,0 +1 @@ +export * from './lib/index'; diff --git a/npm/ng-packs/packages/identity/src/lib/components/roles/roles.component.html b/npm/ng-packs/packages/identity/src/lib/components/roles/roles.component.html index d010fe1983..79c516d8b7 100644 --- a/npm/ng-packs/packages/identity/src/lib/components/roles/roles.component.html +++ b/npm/ng-packs/packages/identity/src/lib/components/roles/roles.component.html @@ -19,7 +19,7 @@
                                                          - +

                                                          {{ (selected?.id ? 'AbpIdentity::Edit' : 'AbpIdentity::NewRole') | abpLocalization }}

                                                          diff --git a/npm/ng-packs/packages/identity/src/lib/components/roles/roles.component.ts b/npm/ng-packs/packages/identity/src/lib/components/roles/roles.component.ts index 2879b038ce..57f33c11da 100644 --- a/npm/ng-packs/packages/identity/src/lib/components/roles/roles.component.ts +++ b/npm/ng-packs/packages/identity/src/lib/components/roles/roles.component.ts @@ -1,4 +1,5 @@ import { ListService, PagedAndSortedResultRequestDto, PagedResultDto } from '@abp/ng.core'; +import { IdentityRoleDto, IdentityRoleService } from '@abp/ng.identity/proxy'; import { ePermissionManagementComponents } from '@abp/ng.permission-management'; import { Confirmation, ConfirmationService } from '@abp/ng.theme.shared'; import { @@ -10,8 +11,6 @@ import { Component, Injector, OnInit } from '@angular/core'; import { FormGroup } from '@angular/forms'; import { finalize } from 'rxjs/operators'; import { eIdentityComponents } from '../../enums/components'; -import { IdentityRoleService } from '../../proxy/identity/identity-role.service'; -import { IdentityRoleDto } from '../../proxy/identity/models'; @Component({ selector: 'abp-roles', diff --git a/npm/ng-packs/packages/identity/src/lib/components/users/users.component.html b/npm/ng-packs/packages/identity/src/lib/components/users/users.component.html index 881726d490..64ad0dcd06 100644 --- a/npm/ng-packs/packages/identity/src/lib/components/users/users.component.html +++ b/npm/ng-packs/packages/identity/src/lib/components/users/users.component.html @@ -29,7 +29,7 @@
                                                          - +

                                                          {{ (selected?.id ? 'AbpIdentity::Edit' : 'AbpIdentity::NewUser') | abpLocalization }}

                                                          diff --git a/npm/ng-packs/packages/identity/src/lib/components/users/users.component.ts b/npm/ng-packs/packages/identity/src/lib/components/users/users.component.ts index e6483981c8..6f458a781b 100644 --- a/npm/ng-packs/packages/identity/src/lib/components/users/users.component.ts +++ b/npm/ng-packs/packages/identity/src/lib/components/users/users.component.ts @@ -1,4 +1,10 @@ import { ListService, PagedResultDto } from '@abp/ng.core'; +import { + GetIdentityUsersInput, + IdentityRoleDto, + IdentityUserDto, + IdentityUserService, +} from '@abp/ng.identity/proxy'; import { ePermissionManagementComponents } from '@abp/ng.permission-management'; import { Confirmation, ConfirmationService } from '@abp/ng.theme.shared'; import { @@ -17,12 +23,6 @@ import { import { AbstractControl, FormArray, FormBuilder, FormGroup } from '@angular/forms'; import { finalize, switchMap, tap } from 'rxjs/operators'; import { eIdentityComponents } from '../../enums/components'; -import { IdentityUserService } from '../../proxy/identity/identity-user.service'; -import { - GetIdentityUsersInput, - IdentityRoleDto, - IdentityUserDto, -} from '../../proxy/identity/models'; @Component({ selector: 'abp-users', diff --git a/npm/ng-packs/packages/identity/src/lib/defaults/default-roles-entity-actions.ts b/npm/ng-packs/packages/identity/src/lib/defaults/default-roles-entity-actions.ts index 2a2822c62e..ac48cce799 100644 --- a/npm/ng-packs/packages/identity/src/lib/defaults/default-roles-entity-actions.ts +++ b/npm/ng-packs/packages/identity/src/lib/defaults/default-roles-entity-actions.ts @@ -1,6 +1,6 @@ +import { IdentityRoleDto } from '@abp/ng.identity/proxy'; import { EntityAction } from '@abp/ng.theme.shared/extensions'; import { RolesComponent } from '../components/roles/roles.component'; -import { IdentityRoleDto } from '../proxy/identity/models'; export const DEFAULT_ROLES_ENTITY_ACTIONS = EntityAction.createMany([ { diff --git a/npm/ng-packs/packages/identity/src/lib/defaults/default-roles-entity-props.ts b/npm/ng-packs/packages/identity/src/lib/defaults/default-roles-entity-props.ts index bd3a49def2..3fe06cfa22 100644 --- a/npm/ng-packs/packages/identity/src/lib/defaults/default-roles-entity-props.ts +++ b/npm/ng-packs/packages/identity/src/lib/defaults/default-roles-entity-props.ts @@ -1,7 +1,7 @@ import { LocalizationService } from '@abp/ng.core'; +import { IdentityRoleDto } from '@abp/ng.identity/proxy'; import { EntityProp, ePropType } from '@abp/ng.theme.shared/extensions'; import { of } from 'rxjs'; -import { IdentityRoleDto } from '../proxy/identity/models'; export const DEFAULT_ROLES_ENTITY_PROPS = EntityProp.createMany([ { diff --git a/npm/ng-packs/packages/identity/src/lib/defaults/default-roles-form-props.ts b/npm/ng-packs/packages/identity/src/lib/defaults/default-roles-form-props.ts index a9cf966257..52fc33d218 100644 --- a/npm/ng-packs/packages/identity/src/lib/defaults/default-roles-form-props.ts +++ b/npm/ng-packs/packages/identity/src/lib/defaults/default-roles-form-props.ts @@ -1,6 +1,6 @@ +import { IdentityRoleDto } from '@abp/ng.identity/proxy'; import { ePropType, FormProp, PropData } from '@abp/ng.theme.shared/extensions'; import { Validators } from '@angular/forms'; -import { IdentityRoleDto } from '../proxy/identity/models'; export const DEFAULT_ROLES_CREATE_FORM_PROPS = FormProp.createMany([ { diff --git a/npm/ng-packs/packages/identity/src/lib/defaults/default-roles-toolbar-actions.ts b/npm/ng-packs/packages/identity/src/lib/defaults/default-roles-toolbar-actions.ts index 271aced701..e31e444669 100644 --- a/npm/ng-packs/packages/identity/src/lib/defaults/default-roles-toolbar-actions.ts +++ b/npm/ng-packs/packages/identity/src/lib/defaults/default-roles-toolbar-actions.ts @@ -1,6 +1,6 @@ +import { IdentityRoleDto } from '@abp/ng.identity/proxy'; import { ToolbarAction } from '@abp/ng.theme.shared/extensions'; import { RolesComponent } from '../components/roles/roles.component'; -import { IdentityRoleDto } from '../proxy/identity/models'; export const DEFAULT_ROLES_TOOLBAR_ACTIONS = ToolbarAction.createMany([ { diff --git a/npm/ng-packs/packages/identity/src/lib/defaults/default-users-entity-actions.ts b/npm/ng-packs/packages/identity/src/lib/defaults/default-users-entity-actions.ts index f8be7740ff..13f058dd37 100644 --- a/npm/ng-packs/packages/identity/src/lib/defaults/default-users-entity-actions.ts +++ b/npm/ng-packs/packages/identity/src/lib/defaults/default-users-entity-actions.ts @@ -1,6 +1,6 @@ +import { IdentityUserDto } from '@abp/ng.identity/proxy'; import { EntityAction } from '@abp/ng.theme.shared/extensions'; import { UsersComponent } from '../components/users/users.component'; -import { IdentityUserDto } from '../proxy/identity/models'; export const DEFAULT_USERS_ENTITY_ACTIONS = EntityAction.createMany([ { diff --git a/npm/ng-packs/packages/identity/src/lib/defaults/default-users-entity-props.ts b/npm/ng-packs/packages/identity/src/lib/defaults/default-users-entity-props.ts index f9d7c217be..73235215ba 100644 --- a/npm/ng-packs/packages/identity/src/lib/defaults/default-users-entity-props.ts +++ b/npm/ng-packs/packages/identity/src/lib/defaults/default-users-entity-props.ts @@ -1,5 +1,5 @@ +import { IdentityUserDto } from '@abp/ng.identity/proxy'; import { EntityProp, ePropType } from '@abp/ng.theme.shared/extensions'; -import { IdentityUserDto } from '../proxy/identity/models'; export const DEFAULT_USERS_ENTITY_PROPS = EntityProp.createMany([ { diff --git a/npm/ng-packs/packages/identity/src/lib/defaults/default-users-form-props.ts b/npm/ng-packs/packages/identity/src/lib/defaults/default-users-form-props.ts index 3092bdf7e8..27f0471ae9 100644 --- a/npm/ng-packs/packages/identity/src/lib/defaults/default-users-form-props.ts +++ b/npm/ng-packs/packages/identity/src/lib/defaults/default-users-form-props.ts @@ -1,7 +1,7 @@ +import { IdentityUserDto } from '@abp/ng.identity/proxy'; import { getPasswordValidators } from '@abp/ng.theme.shared'; import { ePropType, FormProp } from '@abp/ng.theme.shared/extensions'; import { Validators } from '@angular/forms'; -import { IdentityUserDto } from '../proxy/identity/models'; export const DEFAULT_USERS_CREATE_FORM_PROPS = FormProp.createMany([ { diff --git a/npm/ng-packs/packages/identity/src/lib/defaults/default-users-toolbar-actions.ts b/npm/ng-packs/packages/identity/src/lib/defaults/default-users-toolbar-actions.ts index b1e62a9e18..72092cbb1a 100644 --- a/npm/ng-packs/packages/identity/src/lib/defaults/default-users-toolbar-actions.ts +++ b/npm/ng-packs/packages/identity/src/lib/defaults/default-users-toolbar-actions.ts @@ -1,6 +1,6 @@ +import { IdentityUserDto } from '@abp/ng.identity/proxy'; import { ToolbarAction } from '@abp/ng.theme.shared/extensions'; import { UsersComponent } from '../components/users/users.component'; -import { IdentityUserDto } from '../proxy/identity/models'; export const DEFAULT_USERS_TOOLBAR_ACTIONS = ToolbarAction.createMany([ { diff --git a/npm/ng-packs/packages/identity/src/lib/models/config-options.ts b/npm/ng-packs/packages/identity/src/lib/models/config-options.ts index 6a1fc29a00..b244a1a51a 100644 --- a/npm/ng-packs/packages/identity/src/lib/models/config-options.ts +++ b/npm/ng-packs/packages/identity/src/lib/models/config-options.ts @@ -1,3 +1,4 @@ +import { IdentityRoleDto, IdentityUserDto } from '@abp/ng.identity/proxy'; import { CreateFormPropContributorCallback, EditFormPropContributorCallback, @@ -6,7 +7,6 @@ import { ToolbarActionContributorCallback, } from '@abp/ng.theme.shared/extensions'; import { eIdentityComponents } from '../enums/components'; -import { IdentityRoleDto, IdentityUserDto } from '../proxy/identity/models'; export type IdentityEntityActionContributors = Partial<{ [eIdentityComponents.Roles]: EntityActionContributorCallback[]; diff --git a/npm/ng-packs/packages/identity/src/lib/proxy/identity/identity-role.service.ts b/npm/ng-packs/packages/identity/src/lib/proxy/identity/identity-role.service.ts deleted file mode 100644 index edbc094037..0000000000 --- a/npm/ng-packs/packages/identity/src/lib/proxy/identity/identity-role.service.ts +++ /dev/null @@ -1,74 +0,0 @@ -import type { ListResultDto, PagedAndSortedResultRequestDto, PagedResultDto } from '@abp/ng.core'; -import { RestService } from '@abp/ng.core'; -import { Injectable } from '@angular/core'; -import type { IdentityRoleCreateDto, IdentityRoleDto, IdentityRoleUpdateDto } from './models'; - -@Injectable({ - providedIn: 'root', -}) -export class IdentityRoleService { - apiName = 'AbpIdentity'; - - create = (input: IdentityRoleCreateDto) => - this.restService.request( - { - method: 'POST', - url: '/api/identity/roles', - body: input, - }, - { apiName: this.apiName }, - ); - - delete = (id: string) => - this.restService.request( - { - method: 'DELETE', - url: `/api/identity/roles/${id}`, - }, - { apiName: this.apiName }, - ); - - get = (id: string) => - this.restService.request( - { - method: 'GET', - url: `/api/identity/roles/${id}`, - }, - { apiName: this.apiName }, - ); - - getAllList = () => - this.restService.request>( - { - method: 'GET', - url: '/api/identity/roles/all', - }, - { apiName: this.apiName }, - ); - - getList = (input: PagedAndSortedResultRequestDto) => - this.restService.request>( - { - method: 'GET', - url: '/api/identity/roles', - params: { - sorting: input.sorting, - skipCount: input.skipCount, - maxResultCount: input.maxResultCount, - }, - }, - { apiName: this.apiName }, - ); - - update = (id: string, input: IdentityRoleUpdateDto) => - this.restService.request( - { - method: 'PUT', - url: `/api/identity/roles/${id}`, - body: input, - }, - { apiName: this.apiName }, - ); - - constructor(private restService: RestService) {} -} diff --git a/npm/ng-packs/packages/identity/src/lib/proxy/identity/identity-user-lookup.service.ts b/npm/ng-packs/packages/identity/src/lib/proxy/identity/identity-user-lookup.service.ts deleted file mode 100644 index 50eeef604e..0000000000 --- a/npm/ng-packs/packages/identity/src/lib/proxy/identity/identity-user-lookup.service.ts +++ /dev/null @@ -1,57 +0,0 @@ -import type { UserLookupCountInputDto, UserLookupSearchInputDto } from './models'; -import { RestService } from '@abp/ng.core'; -import type { ListResultDto } from '@abp/ng.core'; -import { Injectable } from '@angular/core'; -import type { UserData } from '../users/models'; - -@Injectable({ - providedIn: 'root', -}) -export class IdentityUserLookupService { - apiName = 'AbpIdentity'; - - findById = (id: string) => - this.restService.request( - { - method: 'GET', - url: `/api/identity/users/lookup/${id}`, - }, - { apiName: this.apiName }, - ); - - findByUserName = (userName: string) => - this.restService.request( - { - method: 'GET', - url: `/api/identity/users/lookup/by-username/${userName}`, - }, - { apiName: this.apiName }, - ); - - getCount = (input: UserLookupCountInputDto) => - this.restService.request( - { - method: 'GET', - url: '/api/identity/users/lookup/count', - params: { filter: input.filter }, - }, - { apiName: this.apiName }, - ); - - search = (input: UserLookupSearchInputDto) => - this.restService.request>( - { - method: 'GET', - url: '/api/identity/users/lookup/search', - params: { - filter: input.filter, - sorting: input.sorting, - skipCount: input.skipCount, - maxResultCount: input.maxResultCount, - }, - }, - { apiName: this.apiName }, - ); - - constructor(private restService: RestService) {} -} diff --git a/npm/ng-packs/packages/identity/src/lib/proxy/identity/identity-user.service.ts b/npm/ng-packs/packages/identity/src/lib/proxy/identity/identity-user.service.ts deleted file mode 100644 index 7e3b22a96a..0000000000 --- a/npm/ng-packs/packages/identity/src/lib/proxy/identity/identity-user.service.ts +++ /dev/null @@ -1,119 +0,0 @@ -import type { - GetIdentityUsersInput, - IdentityRoleDto, - IdentityUserCreateDto, - IdentityUserDto, - IdentityUserUpdateDto, - IdentityUserUpdateRolesDto, -} from './models'; -import { RestService } from '@abp/ng.core'; -import type { ListResultDto, PagedResultDto } from '@abp/ng.core'; -import { Injectable } from '@angular/core'; - -@Injectable({ - providedIn: 'root', -}) -export class IdentityUserService { - apiName = 'AbpIdentity'; - - create = (input: IdentityUserCreateDto) => - this.restService.request( - { - method: 'POST', - url: '/api/identity/users', - body: input, - }, - { apiName: this.apiName }, - ); - - delete = (id: string) => - this.restService.request( - { - method: 'DELETE', - url: `/api/identity/users/${id}`, - }, - { apiName: this.apiName }, - ); - - findByEmail = (email: string) => - this.restService.request( - { - method: 'GET', - url: `/api/identity/users/by-email/${email}`, - }, - { apiName: this.apiName }, - ); - - findByUsername = (username: string) => - this.restService.request( - { - method: 'GET', - url: '/api/identity/users/by-username/{userName}', - }, - { apiName: this.apiName }, - ); - - get = (id: string) => - this.restService.request( - { - method: 'GET', - url: `/api/identity/users/${id}`, - }, - { apiName: this.apiName }, - ); - - getAssignableRoles = () => - this.restService.request>( - { - method: 'GET', - url: '/api/identity/users/assignable-roles', - }, - { apiName: this.apiName }, - ); - - getList = (input: GetIdentityUsersInput) => - this.restService.request>( - { - method: 'GET', - url: '/api/identity/users', - params: { - filter: input.filter, - sorting: input.sorting, - skipCount: input.skipCount, - maxResultCount: input.maxResultCount, - }, - }, - { apiName: this.apiName }, - ); - - getRoles = (id: string) => - this.restService.request>( - { - method: 'GET', - url: `/api/identity/users/${id}/roles`, - }, - { apiName: this.apiName }, - ); - - update = (id: string, input: IdentityUserUpdateDto) => - this.restService.request( - { - method: 'PUT', - url: `/api/identity/users/${id}`, - body: input, - }, - { apiName: this.apiName }, - ); - - updateRoles = (id: string, input: IdentityUserUpdateRolesDto) => - this.restService.request( - { - method: 'PUT', - url: `/api/identity/users/${id}/roles`, - body: input, - }, - { apiName: this.apiName }, - ); - - constructor(private restService: RestService) {} -} diff --git a/npm/ng-packs/packages/identity/src/lib/proxy/identity/profile.service.ts b/npm/ng-packs/packages/identity/src/lib/proxy/identity/profile.service.ts deleted file mode 100644 index d40f7d9aca..0000000000 --- a/npm/ng-packs/packages/identity/src/lib/proxy/identity/profile.service.ts +++ /dev/null @@ -1,41 +0,0 @@ -import type { ChangePasswordInput, ProfileDto, UpdateProfileDto } from './models'; -import { RestService } from '@abp/ng.core'; -import { Injectable } from '@angular/core'; - -@Injectable({ - providedIn: 'root', -}) -export class ProfileService { - apiName = 'AbpIdentity'; - - changePassword = (input: ChangePasswordInput) => - this.restService.request( - { - method: 'POST', - url: '/api/identity/my-profile/change-password', - body: input, - }, - { apiName: this.apiName }, - ); - - get = () => - this.restService.request( - { - method: 'GET', - url: '/api/identity/my-profile', - }, - { apiName: this.apiName }, - ); - - update = (input: UpdateProfileDto) => - this.restService.request( - { - method: 'PUT', - url: '/api/identity/my-profile', - body: input, - }, - { apiName: this.apiName }, - ); - - constructor(private restService: RestService) {} -} diff --git a/npm/ng-packs/packages/identity/src/lib/proxy/users/models.ts b/npm/ng-packs/packages/identity/src/lib/proxy/users/models.ts deleted file mode 100644 index 5273ed9522..0000000000 --- a/npm/ng-packs/packages/identity/src/lib/proxy/users/models.ts +++ /dev/null @@ -1,11 +0,0 @@ -export interface UserData { - id: string; - tenantId?: string; - userName: string; - name: string; - surname: string; - email: string; - emailConfirmed: boolean; - phoneNumber: string; - phoneNumberConfirmed: boolean; -} diff --git a/npm/ng-packs/packages/identity/src/lib/tokens/extensions.token.ts b/npm/ng-packs/packages/identity/src/lib/tokens/extensions.token.ts index 771f896aea..3a91d38c27 100644 --- a/npm/ng-packs/packages/identity/src/lib/tokens/extensions.token.ts +++ b/npm/ng-packs/packages/identity/src/lib/tokens/extensions.token.ts @@ -1,3 +1,4 @@ +import { IdentityRoleDto, IdentityUserDto } from '@abp/ng.identity/proxy'; import { CreateFormPropContributorCallback, EditFormPropContributorCallback, @@ -21,7 +22,6 @@ import { } from '../defaults/default-users-form-props'; import { DEFAULT_USERS_TOOLBAR_ACTIONS } from '../defaults/default-users-toolbar-actions'; import { eIdentityComponents } from '../enums/components'; -import { IdentityRoleDto, IdentityUserDto } from '../proxy/identity/models'; export const DEFAULT_IDENTITY_ENTITY_ACTIONS = { [eIdentityComponents.Roles]: DEFAULT_ROLES_ENTITY_ACTIONS, diff --git a/npm/ng-packs/packages/identity/src/public-api.ts b/npm/ng-packs/packages/identity/src/public-api.ts index d75f19d324..7e85188004 100644 --- a/npm/ng-packs/packages/identity/src/public-api.ts +++ b/npm/ng-packs/packages/identity/src/public-api.ts @@ -3,6 +3,4 @@ export * from './lib/enums'; export * from './lib/guards'; export * from './lib/identity.module'; export * from './lib/models'; -export * from './lib/proxy/identity'; -export * from './lib/proxy/users'; export * from './lib/tokens'; diff --git a/npm/ng-packs/packages/identity/tsconfig.json b/npm/ng-packs/packages/identity/tsconfig.json index 62ebbd9464..546e940e20 100644 --- a/npm/ng-packs/packages/identity/tsconfig.json +++ b/npm/ng-packs/packages/identity/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../tsconfig.json", "files": [], "include": [], "references": [ diff --git a/npm/ng-packs/packages/permission-management/proxy/ng-package.json b/npm/ng-packs/packages/permission-management/proxy/ng-package.json new file mode 100644 index 0000000000..64981c613f --- /dev/null +++ b/npm/ng-packs/packages/permission-management/proxy/ng-package.json @@ -0,0 +1,7 @@ +{ + "$schema": "../../../node_modules/ng-packagr/ng-package.schema.json", + "dest": "../../../dist/packages/permission-management/proxy", + "lib": { + "entryFile": "src/public-api.ts" + } +} diff --git a/npm/ng-packs/packages/permission-management/proxy/src/lib/index.ts b/npm/ng-packs/packages/permission-management/proxy/src/lib/index.ts new file mode 100644 index 0000000000..9bcd868901 --- /dev/null +++ b/npm/ng-packs/packages/permission-management/proxy/src/lib/index.ts @@ -0,0 +1 @@ +export * from './proxy'; diff --git a/npm/ng-packs/packages/feature-management/src/lib/proxy/README.md b/npm/ng-packs/packages/permission-management/proxy/src/lib/proxy/README.md similarity index 65% rename from npm/ng-packs/packages/feature-management/src/lib/proxy/README.md rename to npm/ng-packs/packages/permission-management/proxy/src/lib/proxy/README.md index 09967f7e3a..767dfd0f7c 100644 --- a/npm/ng-packs/packages/feature-management/src/lib/proxy/README.md +++ b/npm/ng-packs/packages/permission-management/proxy/src/lib/proxy/README.md @@ -11,3 +11,7 @@ Finally, the name of the files and folders should not be changed for two reasons - Proxy generator will keep creating them at those paths and you will have multiple copies of the same content. - ABP Suite generates files which include imports from this folder. +> **Important Notice:** If you are building a module and are planning to publish to npm, +> some of the generated proxies are likely to be exported from public-api.ts file. In such a case, +> please make sure you export files directly and not from barrel exports. In other words, +> do not include index.ts exports in your public-api.ts exports. diff --git a/npm/ng-packs/packages/permission-management/src/lib/proxy/generate-proxy.json b/npm/ng-packs/packages/permission-management/proxy/src/lib/proxy/generate-proxy.json similarity index 72% rename from npm/ng-packs/packages/permission-management/src/lib/proxy/generate-proxy.json rename to npm/ng-packs/packages/permission-management/proxy/src/lib/proxy/generate-proxy.json index 09a73e5c3c..dbdc934ed9 100644 --- a/npm/ng-packs/packages/permission-management/src/lib/proxy/generate-proxy.json +++ b/npm/ng-packs/packages/permission-management/proxy/src/lib/proxy/generate-proxy.json @@ -3,197 +3,140 @@ "permissionManagement" ], "modules": { - "identity": { - "rootPath": "identity", - "remoteServiceName": "AbpIdentity", + "featureManagement": { + "rootPath": "featureManagement", + "remoteServiceName": "AbpFeatureManagement", "controllers": { - "Volo.Abp.Identity.IdentityRoleController": { - "controllerName": "IdentityRole", - "type": "Volo.Abp.Identity.IdentityRoleController", + "Volo.Abp.FeatureManagement.FeaturesController": { + "controllerName": "Features", + "controllerGroupName": "Features", + "type": "Volo.Abp.FeatureManagement.FeaturesController", "interfaces": [ { - "type": "Volo.Abp.Identity.IIdentityRoleAppService" + "type": "Volo.Abp.FeatureManagement.IFeatureAppService" } ], "actions": { - "GetAllListAsync": { - "uniqueName": "GetAllListAsync", - "name": "GetAllListAsync", - "httpMethod": "GET", - "url": "api/identity/roles/all", - "supportedVersions": [], - "parametersOnMethod": [], - "parameters": [], - "returnValue": { - "type": "Volo.Abp.Application.Dtos.ListResultDto", - "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" - } - }, - "GetListAsyncByInput": { - "uniqueName": "GetListAsyncByInput", - "name": "GetListAsync", + "GetAsyncByProviderNameAndProviderKey": { + "uniqueName": "GetAsyncByProviderNameAndProviderKey", + "name": "GetAsync", "httpMethod": "GET", - "url": "api/identity/roles", + "url": "api/feature-management/features", "supportedVersions": [], "parametersOnMethod": [ { - "name": "input", - "typeAsString": "Volo.Abp.Application.Dtos.PagedAndSortedResultRequestDto, Volo.Abp.Ddd.Application.Contracts", - "type": "Volo.Abp.Application.Dtos.PagedAndSortedResultRequestDto", - "typeSimple": "Volo.Abp.Application.Dtos.PagedAndSortedResultRequestDto", + "name": "providerName", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "providerKey", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", "isOptional": false, "defaultValue": null } ], "parameters": [ { - "nameOnMethod": "input", - "name": "Sorting", + "nameOnMethod": "providerName", + "name": "providerName", + "jsonName": null, "type": "System.String", "typeSimple": "string", "isOptional": false, "defaultValue": null, "constraintTypes": null, "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "SkipCount", - "type": "System.Int32", - "typeSimple": "number", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" + "descriptorName": "" }, { - "nameOnMethod": "input", - "name": "MaxResultCount", - "type": "System.Int32", - "typeSimple": "number", + "nameOnMethod": "providerKey", + "name": "providerKey", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", "isOptional": false, "defaultValue": null, "constraintTypes": null, "bindingSourceId": "ModelBinding", - "descriptorName": "input" + "descriptorName": "" } ], "returnValue": { - "type": "Volo.Abp.Application.Dtos.PagedResultDto", - "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" - } + "type": "Volo.Abp.FeatureManagement.GetFeatureListResultDto", + "typeSimple": "Volo.Abp.FeatureManagement.GetFeatureListResultDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.FeatureManagement.IFeatureAppService" }, - "GetAsyncById": { - "uniqueName": "GetAsyncById", - "name": "GetAsync", - "httpMethod": "GET", - "url": "api/identity/roles/{id}", + "UpdateAsyncByProviderNameAndProviderKeyAndInput": { + "uniqueName": "UpdateAsyncByProviderNameAndProviderKeyAndInput", + "name": "UpdateAsync", + "httpMethod": "PUT", + "url": "api/feature-management/features", "supportedVersions": [], "parametersOnMethod": [ { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", + "name": "providerName", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", "typeSimple": "string", "isOptional": false, "defaultValue": null - } - ], - "parameters": [ + }, { - "nameOnMethod": "id", - "name": "id", - "type": "System.Guid", + "name": "providerKey", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", "typeSimple": "string", "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - } - ], - "returnValue": { - "type": "Volo.Abp.Identity.IdentityRoleDto", - "typeSimple": "Volo.Abp.Identity.IdentityRoleDto" - } - }, - "CreateAsyncByInput": { - "uniqueName": "CreateAsyncByInput", - "name": "CreateAsync", - "httpMethod": "POST", - "url": "api/identity/roles", - "supportedVersions": [], - "parametersOnMethod": [ + "defaultValue": null + }, { "name": "input", - "typeAsString": "Volo.Abp.Identity.IdentityRoleCreateDto, Volo.Abp.Identity.Application.Contracts", - "type": "Volo.Abp.Identity.IdentityRoleCreateDto", - "typeSimple": "Volo.Abp.Identity.IdentityRoleCreateDto", + "typeAsString": "Volo.Abp.FeatureManagement.UpdateFeaturesDto, Volo.Abp.FeatureManagement.Application.Contracts", + "type": "Volo.Abp.FeatureManagement.UpdateFeaturesDto", + "typeSimple": "Volo.Abp.FeatureManagement.UpdateFeaturesDto", "isOptional": false, "defaultValue": null } ], "parameters": [ { - "nameOnMethod": "input", - "name": "input", - "type": "Volo.Abp.Identity.IdentityRoleCreateDto", - "typeSimple": "Volo.Abp.Identity.IdentityRoleCreateDto", + "nameOnMethod": "providerName", + "name": "providerName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", "isOptional": false, "defaultValue": null, "constraintTypes": null, - "bindingSourceId": "Body", + "bindingSourceId": "ModelBinding", "descriptorName": "" - } - ], - "returnValue": { - "type": "Volo.Abp.Identity.IdentityRoleDto", - "typeSimple": "Volo.Abp.Identity.IdentityRoleDto" - } - }, - "UpdateAsyncByIdAndInput": { - "uniqueName": "UpdateAsyncByIdAndInput", - "name": "UpdateAsync", - "httpMethod": "PUT", - "url": "api/identity/roles/{id}", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null }, { - "name": "input", - "typeAsString": "Volo.Abp.Identity.IdentityRoleUpdateDto, Volo.Abp.Identity.Application.Contracts", - "type": "Volo.Abp.Identity.IdentityRoleUpdateDto", - "typeSimple": "Volo.Abp.Identity.IdentityRoleUpdateDto", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "id", - "name": "id", - "type": "System.Guid", + "nameOnMethod": "providerKey", + "name": "providerKey", + "jsonName": null, + "type": "System.String", "typeSimple": "string", "isOptional": false, "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", + "constraintTypes": null, + "bindingSourceId": "ModelBinding", "descriptorName": "" }, { "nameOnMethod": "input", "name": "input", - "type": "Volo.Abp.Identity.IdentityRoleUpdateDto", - "typeSimple": "Volo.Abp.Identity.IdentityRoleUpdateDto", + "jsonName": null, + "type": "Volo.Abp.FeatureManagement.UpdateFeaturesDto", + "typeSimple": "Volo.Abp.FeatureManagement.UpdateFeaturesDto", "isOptional": false, "defaultValue": null, "constraintTypes": null, @@ -201,53 +144,28 @@ "descriptorName": "" } ], - "returnValue": { - "type": "Volo.Abp.Identity.IdentityRoleDto", - "typeSimple": "Volo.Abp.Identity.IdentityRoleDto" - } - }, - "DeleteAsyncById": { - "uniqueName": "DeleteAsyncById", - "name": "DeleteAsync", - "httpMethod": "DELETE", - "url": "api/identity/roles/{id}", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "id", - "name": "id", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - } - ], "returnValue": { "type": "System.Void", "typeSimple": "System.Void" - } + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.FeatureManagement.IFeatureAppService" } } - }, - "Volo.Abp.Identity.IdentityUserController": { - "controllerName": "IdentityUser", - "type": "Volo.Abp.Identity.IdentityUserController", + } + } + }, + "multi-tenancy": { + "rootPath": "multi-tenancy", + "remoteServiceName": "AbpTenantManagement", + "controllers": { + "Volo.Abp.TenantManagement.TenantController": { + "controllerName": "Tenant", + "controllerGroupName": "Tenant", + "type": "Volo.Abp.TenantManagement.TenantController", "interfaces": [ { - "type": "Volo.Abp.Identity.IIdentityUserAppService" + "type": "Volo.Abp.TenantManagement.ITenantAppService" } ], "actions": { @@ -255,7 +173,7 @@ "uniqueName": "GetAsyncById", "name": "GetAsync", "httpMethod": "GET", - "url": "api/identity/users/{id}", + "url": "api/multi-tenancy/tenants/{id}", "supportedVersions": [], "parametersOnMethod": [ { @@ -271,6 +189,7 @@ { "nameOnMethod": "id", "name": "id", + "jsonName": null, "type": "System.Guid", "typeSimple": "string", "isOptional": false, @@ -281,22 +200,24 @@ } ], "returnValue": { - "type": "Volo.Abp.Identity.IdentityUserDto", - "typeSimple": "Volo.Abp.Identity.IdentityUserDto" - } + "type": "Volo.Abp.TenantManagement.TenantDto", + "typeSimple": "Volo.Abp.TenantManagement.TenantDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.IReadOnlyAppService" }, "GetListAsyncByInput": { "uniqueName": "GetListAsyncByInput", "name": "GetListAsync", "httpMethod": "GET", - "url": "api/identity/users", + "url": "api/multi-tenancy/tenants", "supportedVersions": [], "parametersOnMethod": [ { "name": "input", - "typeAsString": "Volo.Abp.Identity.GetIdentityUsersInput, Volo.Abp.Identity.Application.Contracts", - "type": "Volo.Abp.Identity.GetIdentityUsersInput", - "typeSimple": "Volo.Abp.Identity.GetIdentityUsersInput", + "typeAsString": "Volo.Abp.TenantManagement.GetTenantsInput, Volo.Abp.TenantManagement.Application.Contracts", + "type": "Volo.Abp.TenantManagement.GetTenantsInput", + "typeSimple": "Volo.Abp.TenantManagement.GetTenantsInput", "isOptional": false, "defaultValue": null } @@ -305,6 +226,7 @@ { "nameOnMethod": "input", "name": "Filter", + "jsonName": null, "type": "System.String", "typeSimple": "string", "isOptional": false, @@ -316,6 +238,7 @@ { "nameOnMethod": "input", "name": "Sorting", + "jsonName": null, "type": "System.String", "typeSimple": "string", "isOptional": false, @@ -327,6 +250,7 @@ { "nameOnMethod": "input", "name": "SkipCount", + "jsonName": null, "type": "System.Int32", "typeSimple": "number", "isOptional": false, @@ -338,6 +262,7 @@ { "nameOnMethod": "input", "name": "MaxResultCount", + "jsonName": null, "type": "System.Int32", "typeSimple": "number", "isOptional": false, @@ -348,23 +273,25 @@ } ], "returnValue": { - "type": "Volo.Abp.Application.Dtos.PagedResultDto", - "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" - } + "type": "Volo.Abp.Application.Dtos.PagedResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.IReadOnlyAppService" }, "CreateAsyncByInput": { "uniqueName": "CreateAsyncByInput", "name": "CreateAsync", "httpMethod": "POST", - "url": "api/identity/users", + "url": "api/multi-tenancy/tenants", "supportedVersions": [], "parametersOnMethod": [ { "name": "input", - "typeAsString": "Volo.Abp.Identity.IdentityUserCreateDto, Volo.Abp.Identity.Application.Contracts", - "type": "Volo.Abp.Identity.IdentityUserCreateDto", - "typeSimple": "Volo.Abp.Identity.IdentityUserCreateDto", - "isOptional": false, + "typeAsString": "Volo.Abp.TenantManagement.TenantCreateDto, Volo.Abp.TenantManagement.Application.Contracts", + "type": "Volo.Abp.TenantManagement.TenantCreateDto", + "typeSimple": "Volo.Abp.TenantManagement.TenantCreateDto", + "isOptional": false, "defaultValue": null } ], @@ -372,8 +299,9 @@ { "nameOnMethod": "input", "name": "input", - "type": "Volo.Abp.Identity.IdentityUserCreateDto", - "typeSimple": "Volo.Abp.Identity.IdentityUserCreateDto", + "jsonName": null, + "type": "Volo.Abp.TenantManagement.TenantCreateDto", + "typeSimple": "Volo.Abp.TenantManagement.TenantCreateDto", "isOptional": false, "defaultValue": null, "constraintTypes": null, @@ -382,15 +310,17 @@ } ], "returnValue": { - "type": "Volo.Abp.Identity.IdentityUserDto", - "typeSimple": "Volo.Abp.Identity.IdentityUserDto" - } + "type": "Volo.Abp.TenantManagement.TenantDto", + "typeSimple": "Volo.Abp.TenantManagement.TenantDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.ICreateAppService" }, "UpdateAsyncByIdAndInput": { "uniqueName": "UpdateAsyncByIdAndInput", "name": "UpdateAsync", "httpMethod": "PUT", - "url": "api/identity/users/{id}", + "url": "api/multi-tenancy/tenants/{id}", "supportedVersions": [], "parametersOnMethod": [ { @@ -403,9 +333,9 @@ }, { "name": "input", - "typeAsString": "Volo.Abp.Identity.IdentityUserUpdateDto, Volo.Abp.Identity.Application.Contracts", - "type": "Volo.Abp.Identity.IdentityUserUpdateDto", - "typeSimple": "Volo.Abp.Identity.IdentityUserUpdateDto", + "typeAsString": "Volo.Abp.TenantManagement.TenantUpdateDto, Volo.Abp.TenantManagement.Application.Contracts", + "type": "Volo.Abp.TenantManagement.TenantUpdateDto", + "typeSimple": "Volo.Abp.TenantManagement.TenantUpdateDto", "isOptional": false, "defaultValue": null } @@ -414,6 +344,7 @@ { "nameOnMethod": "id", "name": "id", + "jsonName": null, "type": "System.Guid", "typeSimple": "string", "isOptional": false, @@ -425,8 +356,9 @@ { "nameOnMethod": "input", "name": "input", - "type": "Volo.Abp.Identity.IdentityUserUpdateDto", - "typeSimple": "Volo.Abp.Identity.IdentityUserUpdateDto", + "jsonName": null, + "type": "Volo.Abp.TenantManagement.TenantUpdateDto", + "typeSimple": "Volo.Abp.TenantManagement.TenantUpdateDto", "isOptional": false, "defaultValue": null, "constraintTypes": null, @@ -435,15 +367,17 @@ } ], "returnValue": { - "type": "Volo.Abp.Identity.IdentityUserDto", - "typeSimple": "Volo.Abp.Identity.IdentityUserDto" - } + "type": "Volo.Abp.TenantManagement.TenantDto", + "typeSimple": "Volo.Abp.TenantManagement.TenantDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.IUpdateAppService" }, "DeleteAsyncById": { "uniqueName": "DeleteAsyncById", "name": "DeleteAsync", "httpMethod": "DELETE", - "url": "api/identity/users/{id}", + "url": "api/multi-tenancy/tenants/{id}", "supportedVersions": [], "parametersOnMethod": [ { @@ -459,6 +393,7 @@ { "nameOnMethod": "id", "name": "id", + "jsonName": null, "type": "System.Guid", "typeSimple": "string", "isOptional": false, @@ -471,13 +406,15 @@ "returnValue": { "type": "System.Void", "typeSimple": "System.Void" - } + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.IDeleteAppService" }, - "GetRolesAsyncById": { - "uniqueName": "GetRolesAsyncById", - "name": "GetRolesAsync", + "GetDefaultConnectionStringAsyncById": { + "uniqueName": "GetDefaultConnectionStringAsyncById", + "name": "GetDefaultConnectionStringAsync", "httpMethod": "GET", - "url": "api/identity/users/{id}/roles", + "url": "api/multi-tenancy/tenants/{id}/default-connection-string", "supportedVersions": [], "parametersOnMethod": [ { @@ -493,6 +430,7 @@ { "nameOnMethod": "id", "name": "id", + "jsonName": null, "type": "System.Guid", "typeSimple": "string", "isOptional": false, @@ -503,28 +441,17 @@ } ], "returnValue": { - "type": "Volo.Abp.Application.Dtos.ListResultDto", - "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" - } - }, - "GetAssignableRolesAsync": { - "uniqueName": "GetAssignableRolesAsync", - "name": "GetAssignableRolesAsync", - "httpMethod": "GET", - "url": "api/identity/users/assignable-roles", - "supportedVersions": [], - "parametersOnMethod": [], - "parameters": [], - "returnValue": { - "type": "Volo.Abp.Application.Dtos.ListResultDto", - "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" - } + "type": "System.String", + "typeSimple": "string" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.TenantManagement.ITenantAppService" }, - "UpdateRolesAsyncByIdAndInput": { - "uniqueName": "UpdateRolesAsyncByIdAndInput", - "name": "UpdateRolesAsync", + "UpdateDefaultConnectionStringAsyncByIdAndDefaultConnectionString": { + "uniqueName": "UpdateDefaultConnectionStringAsyncByIdAndDefaultConnectionString", + "name": "UpdateDefaultConnectionStringAsync", "httpMethod": "PUT", - "url": "api/identity/users/{id}/roles", + "url": "api/multi-tenancy/tenants/{id}/default-connection-string", "supportedVersions": [], "parametersOnMethod": [ { @@ -536,10 +463,10 @@ "defaultValue": null }, { - "name": "input", - "typeAsString": "Volo.Abp.Identity.IdentityUserUpdateRolesDto, Volo.Abp.Identity.Application.Contracts", - "type": "Volo.Abp.Identity.IdentityUserUpdateRolesDto", - "typeSimple": "Volo.Abp.Identity.IdentityUserUpdateRolesDto", + "name": "defaultConnectionString", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", "isOptional": false, "defaultValue": null } @@ -548,6 +475,7 @@ { "nameOnMethod": "id", "name": "id", + "jsonName": null, "type": "System.Guid", "typeSimple": "string", "isOptional": false, @@ -557,67 +485,36 @@ "descriptorName": "" }, { - "nameOnMethod": "input", - "name": "input", - "type": "Volo.Abp.Identity.IdentityUserUpdateRolesDto", - "typeSimple": "Volo.Abp.Identity.IdentityUserUpdateRolesDto", + "nameOnMethod": "defaultConnectionString", + "name": "defaultConnectionString", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", "isOptional": false, "defaultValue": null, "constraintTypes": null, - "bindingSourceId": "Body", + "bindingSourceId": "ModelBinding", "descriptorName": "" } ], "returnValue": { "type": "System.Void", "typeSimple": "System.Void" - } - }, - "FindByUsernameAsyncByUsername": { - "uniqueName": "FindByUsernameAsyncByUsername", - "name": "FindByUsernameAsync", - "httpMethod": "GET", - "url": "api/identity/users/by-username/{userName}", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "username", - "typeAsString": "System.String, System.Private.CoreLib", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "username", - "name": "username", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - } - ], - "returnValue": { - "type": "Volo.Abp.Identity.IdentityUserDto", - "typeSimple": "Volo.Abp.Identity.IdentityUserDto" - } + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.TenantManagement.ITenantAppService" }, - "FindByEmailAsyncByEmail": { - "uniqueName": "FindByEmailAsyncByEmail", - "name": "FindByEmailAsync", - "httpMethod": "GET", - "url": "api/identity/users/by-email/{email}", + "DeleteDefaultConnectionStringAsyncById": { + "uniqueName": "DeleteDefaultConnectionStringAsyncById", + "name": "DeleteDefaultConnectionStringAsync", + "httpMethod": "DELETE", + "url": "api/multi-tenancy/tenants/{id}/default-connection-string", "supportedVersions": [], "parametersOnMethod": [ { - "name": "email", - "typeAsString": "System.String, System.Private.CoreLib", - "type": "System.String", + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", "typeSimple": "string", "isOptional": false, "defaultValue": null @@ -625,9 +522,10 @@ ], "parameters": [ { - "nameOnMethod": "email", - "name": "email", - "type": "System.String", + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", "typeSimple": "string", "isOptional": false, "defaultValue": null, @@ -637,101 +535,116 @@ } ], "returnValue": { - "type": "Volo.Abp.Identity.IdentityUserDto", - "typeSimple": "Volo.Abp.Identity.IdentityUserDto" - } + "type": "System.Void", + "typeSimple": "System.Void" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.TenantManagement.ITenantAppService" } } - }, - "Volo.Abp.Identity.IdentityUserLookupController": { - "controllerName": "IdentityUserLookup", - "type": "Volo.Abp.Identity.IdentityUserLookupController", + } + } + }, + "account": { + "rootPath": "account", + "remoteServiceName": "AbpAccount", + "controllers": { + "Volo.Abp.Account.AccountController": { + "controllerName": "Account", + "controllerGroupName": "Account", + "type": "Volo.Abp.Account.AccountController", "interfaces": [ { - "type": "Volo.Abp.Identity.IIdentityUserLookupAppService" + "type": "Volo.Abp.Account.IAccountAppService" } ], "actions": { - "FindByIdAsyncById": { - "uniqueName": "FindByIdAsyncById", - "name": "FindByIdAsync", - "httpMethod": "GET", - "url": "api/identity/users/lookup/{id}", + "RegisterAsyncByInput": { + "uniqueName": "RegisterAsyncByInput", + "name": "RegisterAsync", + "httpMethod": "POST", + "url": "api/account/register", "supportedVersions": [], "parametersOnMethod": [ { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", + "name": "input", + "typeAsString": "Volo.Abp.Account.RegisterDto, Volo.Abp.Account.Application.Contracts", + "type": "Volo.Abp.Account.RegisterDto", + "typeSimple": "Volo.Abp.Account.RegisterDto", "isOptional": false, "defaultValue": null } ], "parameters": [ { - "nameOnMethod": "id", - "name": "id", - "type": "System.Guid", - "typeSimple": "string", + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Volo.Abp.Account.RegisterDto", + "typeSimple": "Volo.Abp.Account.RegisterDto", "isOptional": false, "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", + "constraintTypes": null, + "bindingSourceId": "Body", "descriptorName": "" } ], "returnValue": { - "type": "Volo.Abp.Users.UserData", - "typeSimple": "Volo.Abp.Users.UserData" - } + "type": "Volo.Abp.Identity.IdentityUserDto", + "typeSimple": "Volo.Abp.Identity.IdentityUserDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Account.IAccountAppService" }, - "FindByUserNameAsyncByUserName": { - "uniqueName": "FindByUserNameAsyncByUserName", - "name": "FindByUserNameAsync", - "httpMethod": "GET", - "url": "api/identity/users/lookup/by-username/{userName}", + "SendPasswordResetCodeAsyncByInput": { + "uniqueName": "SendPasswordResetCodeAsyncByInput", + "name": "SendPasswordResetCodeAsync", + "httpMethod": "POST", + "url": "api/account/send-password-reset-code", "supportedVersions": [], "parametersOnMethod": [ { - "name": "userName", - "typeAsString": "System.String, System.Private.CoreLib", - "type": "System.String", - "typeSimple": "string", + "name": "input", + "typeAsString": "Volo.Abp.Account.SendPasswordResetCodeDto, Volo.Abp.Account.Application.Contracts", + "type": "Volo.Abp.Account.SendPasswordResetCodeDto", + "typeSimple": "Volo.Abp.Account.SendPasswordResetCodeDto", "isOptional": false, "defaultValue": null } ], "parameters": [ { - "nameOnMethod": "userName", - "name": "userName", - "type": "System.String", - "typeSimple": "string", + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Volo.Abp.Account.SendPasswordResetCodeDto", + "typeSimple": "Volo.Abp.Account.SendPasswordResetCodeDto", "isOptional": false, "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", + "constraintTypes": null, + "bindingSourceId": "Body", "descriptorName": "" } ], "returnValue": { - "type": "Volo.Abp.Users.UserData", - "typeSimple": "Volo.Abp.Users.UserData" - } + "type": "System.Void", + "typeSimple": "System.Void" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Account.IAccountAppService" }, - "SearchAsyncByInput": { - "uniqueName": "SearchAsyncByInput", - "name": "SearchAsync", - "httpMethod": "GET", - "url": "api/identity/users/lookup/search", + "ResetPasswordAsyncByInput": { + "uniqueName": "ResetPasswordAsyncByInput", + "name": "ResetPasswordAsync", + "httpMethod": "POST", + "url": "api/account/reset-password", "supportedVersions": [], "parametersOnMethod": [ { "name": "input", - "typeAsString": "Volo.Abp.Identity.UserLookupSearchInputDto, Volo.Abp.Identity.Application.Contracts", - "type": "Volo.Abp.Identity.UserLookupSearchInputDto", - "typeSimple": "Volo.Abp.Identity.UserLookupSearchInputDto", + "typeAsString": "Volo.Abp.Account.ResetPasswordDto, Volo.Abp.Account.Application.Contracts", + "type": "Volo.Abp.Account.ResetPasswordDto", + "typeSimple": "Volo.Abp.Account.ResetPasswordDto", "isOptional": false, "defaultValue": null } @@ -739,96 +652,136 @@ "parameters": [ { "nameOnMethod": "input", - "name": "Filter", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "Sorting", - "type": "System.String", - "typeSimple": "string", + "name": "input", + "jsonName": null, + "type": "Volo.Abp.Account.ResetPasswordDto", + "typeSimple": "Volo.Abp.Account.ResetPasswordDto", "isOptional": false, "defaultValue": null, "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, - { - "nameOnMethod": "input", - "name": "SkipCount", - "type": "System.Int32", - "typeSimple": "number", + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Account.IAccountAppService" + } + } + }, + "Volo.Abp.Account.Web.Areas.Account.Controllers.AccountController": { + "controllerName": "Account", + "controllerGroupName": "Login", + "type": "Volo.Abp.Account.Web.Areas.Account.Controllers.AccountController", + "interfaces": [], + "actions": { + "LoginByLogin": { + "uniqueName": "LoginByLogin", + "name": "Login", + "httpMethod": "POST", + "url": "api/account/login", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "login", + "typeAsString": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo, Volo.Abp.Account.Web", + "type": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo", + "typeSimple": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo", "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - }, + "defaultValue": null + } + ], + "parameters": [ { - "nameOnMethod": "input", - "name": "MaxResultCount", - "type": "System.Int32", - "typeSimple": "number", + "nameOnMethod": "login", + "name": "login", + "jsonName": null, + "type": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo", + "typeSimple": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo", "isOptional": false, "defaultValue": null, "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" + "bindingSourceId": "Body", + "descriptorName": "" } ], "returnValue": { - "type": "Volo.Abp.Application.Dtos.ListResultDto", - "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" - } + "type": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.AbpLoginResult", + "typeSimple": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.AbpLoginResult" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Account.Web.Areas.Account.Controllers.AccountController" }, - "GetCountAsyncByInput": { - "uniqueName": "GetCountAsyncByInput", - "name": "GetCountAsync", + "Logout": { + "uniqueName": "Logout", + "name": "Logout", "httpMethod": "GET", - "url": "api/identity/users/lookup/count", + "url": "api/account/logout", + "supportedVersions": [], + "parametersOnMethod": [], + "parameters": [], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Account.Web.Areas.Account.Controllers.AccountController" + }, + "CheckPasswordByLogin": { + "uniqueName": "CheckPasswordByLogin", + "name": "CheckPassword", + "httpMethod": "POST", + "url": "api/account/check-password", "supportedVersions": [], "parametersOnMethod": [ { - "name": "input", - "typeAsString": "Volo.Abp.Identity.UserLookupCountInputDto, Volo.Abp.Identity.Application.Contracts", - "type": "Volo.Abp.Identity.UserLookupCountInputDto", - "typeSimple": "Volo.Abp.Identity.UserLookupCountInputDto", + "name": "login", + "typeAsString": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo, Volo.Abp.Account.Web", + "type": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo", + "typeSimple": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo", "isOptional": false, "defaultValue": null } ], "parameters": [ { - "nameOnMethod": "input", - "name": "Filter", - "type": "System.String", - "typeSimple": "string", + "nameOnMethod": "login", + "name": "login", + "jsonName": null, + "type": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo", + "typeSimple": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo", "isOptional": false, "defaultValue": null, "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" + "bindingSourceId": "Body", + "descriptorName": "" } ], "returnValue": { - "type": "System.Int64", - "typeSimple": "number" - } + "type": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.AbpLoginResult", + "typeSimple": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.AbpLoginResult" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Account.Web.Areas.Account.Controllers.AccountController" } } - }, - "Volo.Abp.Identity.ProfileController": { - "controllerName": "Profile", - "type": "Volo.Abp.Identity.ProfileController", + } + } + }, + "settingManagement": { + "rootPath": "settingManagement", + "remoteServiceName": "SettingManagement", + "controllers": { + "Volo.Abp.SettingManagement.EmailSettingsController": { + "controllerName": "EmailSettings", + "controllerGroupName": "EmailSettings", + "type": "Volo.Abp.SettingManagement.EmailSettingsController", "interfaces": [ { - "type": "Volo.Abp.Identity.IProfileAppService" + "type": "Volo.Abp.SettingManagement.IEmailSettingsAppService" } ], "actions": { @@ -836,61 +789,29 @@ "uniqueName": "GetAsync", "name": "GetAsync", "httpMethod": "GET", - "url": "api/identity/my-profile", + "url": "api/setting-management/emailing", "supportedVersions": [], "parametersOnMethod": [], "parameters": [], "returnValue": { - "type": "Volo.Abp.Identity.ProfileDto", - "typeSimple": "Volo.Abp.Identity.ProfileDto" - } + "type": "Volo.Abp.SettingManagement.EmailSettingsDto", + "typeSimple": "Volo.Abp.SettingManagement.EmailSettingsDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.SettingManagement.IEmailSettingsAppService" }, "UpdateAsyncByInput": { "uniqueName": "UpdateAsyncByInput", "name": "UpdateAsync", - "httpMethod": "PUT", - "url": "api/identity/my-profile", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "input", - "typeAsString": "Volo.Abp.Identity.UpdateProfileDto, Volo.Abp.Identity.Application.Contracts", - "type": "Volo.Abp.Identity.UpdateProfileDto", - "typeSimple": "Volo.Abp.Identity.UpdateProfileDto", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "input", - "name": "input", - "type": "Volo.Abp.Identity.UpdateProfileDto", - "typeSimple": "Volo.Abp.Identity.UpdateProfileDto", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Body", - "descriptorName": "" - } - ], - "returnValue": { - "type": "Volo.Abp.Identity.ProfileDto", - "typeSimple": "Volo.Abp.Identity.ProfileDto" - } - }, - "ChangePasswordAsyncByInput": { - "uniqueName": "ChangePasswordAsyncByInput", - "name": "ChangePasswordAsync", "httpMethod": "POST", - "url": "api/identity/my-profile/change-password", + "url": "api/setting-management/emailing", "supportedVersions": [], "parametersOnMethod": [ { "name": "input", - "typeAsString": "Volo.Abp.Identity.ChangePasswordInput, Volo.Abp.Identity.Application.Contracts", - "type": "Volo.Abp.Identity.ChangePasswordInput", - "typeSimple": "Volo.Abp.Identity.ChangePasswordInput", + "typeAsString": "Volo.Abp.SettingManagement.UpdateEmailSettingsDto, Volo.Abp.SettingManagement.Application.Contracts", + "type": "Volo.Abp.SettingManagement.UpdateEmailSettingsDto", + "typeSimple": "Volo.Abp.SettingManagement.UpdateEmailSettingsDto", "isOptional": false, "defaultValue": null } @@ -899,8 +820,9 @@ { "nameOnMethod": "input", "name": "input", - "type": "Volo.Abp.Identity.ChangePasswordInput", - "typeSimple": "Volo.Abp.Identity.ChangePasswordInput", + "jsonName": null, + "type": "Volo.Abp.SettingManagement.UpdateEmailSettingsDto", + "typeSimple": "Volo.Abp.SettingManagement.UpdateEmailSettingsDto", "isOptional": false, "defaultValue": null, "constraintTypes": null, @@ -911,22 +833,25 @@ "returnValue": { "type": "System.Void", "typeSimple": "System.Void" - } + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.SettingManagement.IEmailSettingsAppService" } } } } }, - "featureManagement": { - "rootPath": "featureManagement", - "remoteServiceName": "AbpFeatureManagement", + "permissionManagement": { + "rootPath": "permissionManagement", + "remoteServiceName": "AbpPermissionManagement", "controllers": { - "Volo.Abp.FeatureManagement.FeaturesController": { - "controllerName": "Features", - "type": "Volo.Abp.FeatureManagement.FeaturesController", + "Volo.Abp.PermissionManagement.PermissionsController": { + "controllerName": "Permissions", + "controllerGroupName": "Permissions", + "type": "Volo.Abp.PermissionManagement.PermissionsController", "interfaces": [ { - "type": "Volo.Abp.FeatureManagement.IFeatureAppService" + "type": "Volo.Abp.PermissionManagement.IPermissionAppService" } ], "actions": { @@ -934,7 +859,7 @@ "uniqueName": "GetAsyncByProviderNameAndProviderKey", "name": "GetAsync", "httpMethod": "GET", - "url": "api/feature-management/features", + "url": "api/permission-management/permissions", "supportedVersions": [], "parametersOnMethod": [ { @@ -958,6 +883,7 @@ { "nameOnMethod": "providerName", "name": "providerName", + "jsonName": null, "type": "System.String", "typeSimple": "string", "isOptional": false, @@ -969,6 +895,7 @@ { "nameOnMethod": "providerKey", "name": "providerKey", + "jsonName": null, "type": "System.String", "typeSimple": "string", "isOptional": false, @@ -979,15 +906,17 @@ } ], "returnValue": { - "type": "Volo.Abp.FeatureManagement.GetFeatureListResultDto", - "typeSimple": "Volo.Abp.FeatureManagement.GetFeatureListResultDto" - } + "type": "Volo.Abp.PermissionManagement.GetPermissionListResultDto", + "typeSimple": "Volo.Abp.PermissionManagement.GetPermissionListResultDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.PermissionManagement.IPermissionAppService" }, "UpdateAsyncByProviderNameAndProviderKeyAndInput": { "uniqueName": "UpdateAsyncByProviderNameAndProviderKeyAndInput", "name": "UpdateAsync", "httpMethod": "PUT", - "url": "api/feature-management/features", + "url": "api/permission-management/permissions", "supportedVersions": [], "parametersOnMethod": [ { @@ -1008,9 +937,9 @@ }, { "name": "input", - "typeAsString": "Volo.Abp.FeatureManagement.UpdateFeaturesDto, Volo.Abp.FeatureManagement.Application.Contracts", - "type": "Volo.Abp.FeatureManagement.UpdateFeaturesDto", - "typeSimple": "Volo.Abp.FeatureManagement.UpdateFeaturesDto", + "typeAsString": "Volo.Abp.PermissionManagement.UpdatePermissionsDto, Volo.Abp.PermissionManagement.Application.Contracts", + "type": "Volo.Abp.PermissionManagement.UpdatePermissionsDto", + "typeSimple": "Volo.Abp.PermissionManagement.UpdatePermissionsDto", "isOptional": false, "defaultValue": null } @@ -1019,6 +948,7 @@ { "nameOnMethod": "providerName", "name": "providerName", + "jsonName": null, "type": "System.String", "typeSimple": "string", "isOptional": false, @@ -1030,6 +960,7 @@ { "nameOnMethod": "providerKey", "name": "providerKey", + "jsonName": null, "type": "System.String", "typeSimple": "string", "isOptional": false, @@ -1041,8 +972,9 @@ { "nameOnMethod": "input", "name": "input", - "type": "Volo.Abp.FeatureManagement.UpdateFeaturesDto", - "typeSimple": "Volo.Abp.FeatureManagement.UpdateFeaturesDto", + "jsonName": null, + "type": "Volo.Abp.PermissionManagement.UpdatePermissionsDto", + "typeSimple": "Volo.Abp.PermissionManagement.UpdatePermissionsDto", "isOptional": false, "defaultValue": null, "constraintTypes": null, @@ -1053,278 +985,219 @@ "returnValue": { "type": "System.Void", "typeSimple": "System.Void" - } + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.PermissionManagement.IPermissionAppService" } } } } }, - "account": { - "rootPath": "account", - "remoteServiceName": "AbpAccount", + "abp": { + "rootPath": "abp", + "remoteServiceName": "abp", "controllers": { - "Volo.Abp.Account.Web.Areas.Account.Controllers.AccountController": { - "controllerName": "Account", - "type": "Volo.Abp.Account.Web.Areas.Account.Controllers.AccountController", - "interfaces": [], + "Pages.Abp.MultiTenancy.AbpTenantController": { + "controllerName": "AbpTenant", + "controllerGroupName": "AbpTenant", + "type": "Pages.Abp.MultiTenancy.AbpTenantController", + "interfaces": [ + { + "type": "Volo.Abp.AspNetCore.Mvc.MultiTenancy.IAbpTenantAppService" + } + ], "actions": { - "LoginByLogin": { - "uniqueName": "LoginByLogin", - "name": "Login", - "httpMethod": "POST", - "url": "api/account/login", + "FindTenantByNameAsyncByName": { + "uniqueName": "FindTenantByNameAsyncByName", + "name": "FindTenantByNameAsync", + "httpMethod": "GET", + "url": "api/abp/multi-tenancy/tenants/by-name/{name}", "supportedVersions": [], "parametersOnMethod": [ { - "name": "login", - "typeAsString": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo, Volo.Abp.Account.Web", - "type": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo", - "typeSimple": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo", + "name": "name", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", "isOptional": false, "defaultValue": null } ], "parameters": [ { - "nameOnMethod": "login", - "name": "login", - "type": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo", - "typeSimple": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo", + "nameOnMethod": "name", + "name": "name", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", "isOptional": false, "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Body", + "constraintTypes": [], + "bindingSourceId": "Path", "descriptorName": "" } ], "returnValue": { - "type": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.AbpLoginResult", - "typeSimple": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.AbpLoginResult" - } + "type": "Volo.Abp.AspNetCore.Mvc.MultiTenancy.FindTenantResultDto", + "typeSimple": "Volo.Abp.AspNetCore.Mvc.MultiTenancy.FindTenantResultDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.AspNetCore.Mvc.MultiTenancy.IAbpTenantAppService" }, - "Logout": { - "uniqueName": "Logout", - "name": "Logout", + "FindTenantByIdAsyncById": { + "uniqueName": "FindTenantByIdAsyncById", + "name": "FindTenantByIdAsync", "httpMethod": "GET", - "url": "api/account/logout", - "supportedVersions": [], - "parametersOnMethod": [], - "parameters": [], - "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" - } - }, - "CheckPasswordByLogin": { - "uniqueName": "CheckPasswordByLogin", - "name": "CheckPassword", - "httpMethod": "POST", - "url": "api/account/checkPassword", + "url": "api/abp/multi-tenancy/tenants/by-id/{id}", "supportedVersions": [], "parametersOnMethod": [ { - "name": "login", - "typeAsString": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo, Volo.Abp.Account.Web", - "type": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo", - "typeSimple": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo", + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", "isOptional": false, "defaultValue": null } ], "parameters": [ { - "nameOnMethod": "login", - "name": "login", - "type": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo", - "typeSimple": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo", + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", "isOptional": false, "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Body", + "constraintTypes": [], + "bindingSourceId": "Path", "descriptorName": "" } ], "returnValue": { - "type": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.AbpLoginResult", - "typeSimple": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.AbpLoginResult" - } + "type": "Volo.Abp.AspNetCore.Mvc.MultiTenancy.FindTenantResultDto", + "typeSimple": "Volo.Abp.AspNetCore.Mvc.MultiTenancy.FindTenantResultDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.AspNetCore.Mvc.MultiTenancy.IAbpTenantAppService" } } }, - "Volo.Abp.Account.AccountController": { - "controllerName": "Account", - "type": "Volo.Abp.Account.AccountController", + "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationController": { + "controllerName": "AbpApplicationConfiguration", + "controllerGroupName": "AbpApplicationConfiguration", + "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationController", "interfaces": [ { - "type": "Volo.Abp.Account.IAccountAppService" + "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.IAbpApplicationConfigurationAppService" } ], "actions": { - "RegisterAsyncByInput": { - "uniqueName": "RegisterAsyncByInput", - "name": "RegisterAsync", - "httpMethod": "POST", - "url": "api/account/register", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "input", - "typeAsString": "Volo.Abp.Account.RegisterDto, Volo.Abp.Account.Application.Contracts", - "type": "Volo.Abp.Account.RegisterDto", - "typeSimple": "Volo.Abp.Account.RegisterDto", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "input", - "name": "input", - "type": "Volo.Abp.Account.RegisterDto", - "typeSimple": "Volo.Abp.Account.RegisterDto", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Body", - "descriptorName": "" - } - ], - "returnValue": { - "type": "Volo.Abp.Identity.IdentityUserDto", - "typeSimple": "Volo.Abp.Identity.IdentityUserDto" - } - }, - "SendPasswordResetCodeAsyncByInput": { - "uniqueName": "SendPasswordResetCodeAsyncByInput", - "name": "SendPasswordResetCodeAsync", - "httpMethod": "POST", - "url": "api/account/send-password-reset-code", + "GetAsync": { + "uniqueName": "GetAsync", + "name": "GetAsync", + "httpMethod": "GET", + "url": "api/abp/application-configuration", "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "input", - "typeAsString": "Volo.Abp.Account.SendPasswordResetCodeDto, Volo.Abp.Account.Application.Contracts", - "type": "Volo.Abp.Account.SendPasswordResetCodeDto", - "typeSimple": "Volo.Abp.Account.SendPasswordResetCodeDto", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "input", - "name": "input", - "type": "Volo.Abp.Account.SendPasswordResetCodeDto", - "typeSimple": "Volo.Abp.Account.SendPasswordResetCodeDto", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Body", - "descriptorName": "" - } - ], + "parametersOnMethod": [], + "parameters": [], "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" - } - }, - "ResetPasswordAsyncByInput": { - "uniqueName": "ResetPasswordAsyncByInput", - "name": "ResetPasswordAsync", - "httpMethod": "POST", - "url": "api/account/reset-password", + "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationConfigurationDto", + "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationConfigurationDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.IAbpApplicationConfigurationAppService" + } + } + }, + "Volo.Abp.AspNetCore.Mvc.ApiExploring.AbpApiDefinitionController": { + "controllerName": "AbpApiDefinition", + "controllerGroupName": "AbpApiDefinition", + "type": "Volo.Abp.AspNetCore.Mvc.ApiExploring.AbpApiDefinitionController", + "interfaces": [], + "actions": { + "GetByModel": { + "uniqueName": "GetByModel", + "name": "Get", + "httpMethod": "GET", + "url": "api/abp/api-definition", "supportedVersions": [], "parametersOnMethod": [ { - "name": "input", - "typeAsString": "Volo.Abp.Account.ResetPasswordDto, Volo.Abp.Account.Application.Contracts", - "type": "Volo.Abp.Account.ResetPasswordDto", - "typeSimple": "Volo.Abp.Account.ResetPasswordDto", + "name": "model", + "typeAsString": "Volo.Abp.Http.Modeling.ApplicationApiDescriptionModelRequestDto, Volo.Abp.Http", + "type": "Volo.Abp.Http.Modeling.ApplicationApiDescriptionModelRequestDto", + "typeSimple": "Volo.Abp.Http.Modeling.ApplicationApiDescriptionModelRequestDto", "isOptional": false, "defaultValue": null } ], "parameters": [ { - "nameOnMethod": "input", - "name": "input", - "type": "Volo.Abp.Account.ResetPasswordDto", - "typeSimple": "Volo.Abp.Account.ResetPasswordDto", + "nameOnMethod": "model", + "name": "IncludeTypes", + "jsonName": null, + "type": "System.Boolean", + "typeSimple": "boolean", "isOptional": false, "defaultValue": null, "constraintTypes": null, - "bindingSourceId": "Body", - "descriptorName": "" + "bindingSourceId": "ModelBinding", + "descriptorName": "model" } ], "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" - } + "type": "Volo.Abp.Http.Modeling.ApplicationApiDescriptionModel", + "typeSimple": "Volo.Abp.Http.Modeling.ApplicationApiDescriptionModel" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.AspNetCore.Mvc.ApiExploring.AbpApiDefinitionController" } } } } }, - "multi-tenancy": { - "rootPath": "multi-tenancy", - "remoteServiceName": "AbpTenantManagement", + "identity": { + "rootPath": "identity", + "remoteServiceName": "AbpIdentity", "controllers": { - "Volo.Abp.TenantManagement.TenantController": { - "controllerName": "Tenant", - "type": "Volo.Abp.TenantManagement.TenantController", + "Volo.Abp.Identity.IdentityRoleController": { + "controllerName": "IdentityRole", + "controllerGroupName": "Role", + "type": "Volo.Abp.Identity.IdentityRoleController", "interfaces": [ { - "type": "Volo.Abp.TenantManagement.ITenantAppService" + "type": "Volo.Abp.Identity.IIdentityRoleAppService" } ], "actions": { - "GetAsyncById": { - "uniqueName": "GetAsyncById", - "name": "GetAsync", + "GetAllListAsync": { + "uniqueName": "GetAllListAsync", + "name": "GetAllListAsync", "httpMethod": "GET", - "url": "api/multi-tenancy/tenants/{id}", + "url": "api/identity/roles/all", "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "id", - "typeAsString": "System.Guid, System.Private.CoreLib", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "id", - "name": "id", - "type": "System.Guid", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": [], - "bindingSourceId": "Path", - "descriptorName": "" - } - ], + "parametersOnMethod": [], + "parameters": [], "returnValue": { - "type": "Volo.Abp.TenantManagement.TenantDto", - "typeSimple": "Volo.Abp.TenantManagement.TenantDto" - } + "type": "Volo.Abp.Application.Dtos.ListResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Identity.IIdentityRoleAppService" }, "GetListAsyncByInput": { "uniqueName": "GetListAsyncByInput", "name": "GetListAsync", "httpMethod": "GET", - "url": "api/multi-tenancy/tenants", + "url": "api/identity/roles", "supportedVersions": [], "parametersOnMethod": [ { "name": "input", - "typeAsString": "Volo.Abp.TenantManagement.GetTenantsInput, Volo.Abp.TenantManagement.Application.Contracts", - "type": "Volo.Abp.TenantManagement.GetTenantsInput", - "typeSimple": "Volo.Abp.TenantManagement.GetTenantsInput", + "typeAsString": "Volo.Abp.Identity.GetIdentityRolesInput, Volo.Abp.Identity.Application.Contracts", + "type": "Volo.Abp.Identity.GetIdentityRolesInput", + "typeSimple": "Volo.Abp.Identity.GetIdentityRolesInput", "isOptional": false, "defaultValue": null } @@ -1333,6 +1206,7 @@ { "nameOnMethod": "input", "name": "Filter", + "jsonName": null, "type": "System.String", "typeSimple": "string", "isOptional": false, @@ -1344,6 +1218,7 @@ { "nameOnMethod": "input", "name": "Sorting", + "jsonName": null, "type": "System.String", "typeSimple": "string", "isOptional": false, @@ -1355,6 +1230,7 @@ { "nameOnMethod": "input", "name": "SkipCount", + "jsonName": null, "type": "System.Int32", "typeSimple": "number", "isOptional": false, @@ -1366,6 +1242,7 @@ { "nameOnMethod": "input", "name": "MaxResultCount", + "jsonName": null, "type": "System.Int32", "typeSimple": "number", "isOptional": false, @@ -1376,22 +1253,61 @@ } ], "returnValue": { - "type": "Volo.Abp.Application.Dtos.PagedResultDto", - "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" - } + "type": "Volo.Abp.Application.Dtos.PagedResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.IReadOnlyAppService" + }, + "GetAsyncById": { + "uniqueName": "GetAsyncById", + "name": "GetAsync", + "httpMethod": "GET", + "url": "api/identity/roles/{id}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.Abp.Identity.IdentityRoleDto", + "typeSimple": "Volo.Abp.Identity.IdentityRoleDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.IReadOnlyAppService" }, "CreateAsyncByInput": { "uniqueName": "CreateAsyncByInput", "name": "CreateAsync", "httpMethod": "POST", - "url": "api/multi-tenancy/tenants", + "url": "api/identity/roles", "supportedVersions": [], "parametersOnMethod": [ { "name": "input", - "typeAsString": "Volo.Abp.TenantManagement.TenantCreateDto, Volo.Abp.TenantManagement.Application.Contracts", - "type": "Volo.Abp.TenantManagement.TenantCreateDto", - "typeSimple": "Volo.Abp.TenantManagement.TenantCreateDto", + "typeAsString": "Volo.Abp.Identity.IdentityRoleCreateDto, Volo.Abp.Identity.Application.Contracts", + "type": "Volo.Abp.Identity.IdentityRoleCreateDto", + "typeSimple": "Volo.Abp.Identity.IdentityRoleCreateDto", "isOptional": false, "defaultValue": null } @@ -1400,8 +1316,9 @@ { "nameOnMethod": "input", "name": "input", - "type": "Volo.Abp.TenantManagement.TenantCreateDto", - "typeSimple": "Volo.Abp.TenantManagement.TenantCreateDto", + "jsonName": null, + "type": "Volo.Abp.Identity.IdentityRoleCreateDto", + "typeSimple": "Volo.Abp.Identity.IdentityRoleCreateDto", "isOptional": false, "defaultValue": null, "constraintTypes": null, @@ -1410,15 +1327,17 @@ } ], "returnValue": { - "type": "Volo.Abp.TenantManagement.TenantDto", - "typeSimple": "Volo.Abp.TenantManagement.TenantDto" - } + "type": "Volo.Abp.Identity.IdentityRoleDto", + "typeSimple": "Volo.Abp.Identity.IdentityRoleDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.ICreateAppService" }, "UpdateAsyncByIdAndInput": { "uniqueName": "UpdateAsyncByIdAndInput", "name": "UpdateAsync", "httpMethod": "PUT", - "url": "api/multi-tenancy/tenants/{id}", + "url": "api/identity/roles/{id}", "supportedVersions": [], "parametersOnMethod": [ { @@ -1431,9 +1350,9 @@ }, { "name": "input", - "typeAsString": "Volo.Abp.TenantManagement.TenantUpdateDto, Volo.Abp.TenantManagement.Application.Contracts", - "type": "Volo.Abp.TenantManagement.TenantUpdateDto", - "typeSimple": "Volo.Abp.TenantManagement.TenantUpdateDto", + "typeAsString": "Volo.Abp.Identity.IdentityRoleUpdateDto, Volo.Abp.Identity.Application.Contracts", + "type": "Volo.Abp.Identity.IdentityRoleUpdateDto", + "typeSimple": "Volo.Abp.Identity.IdentityRoleUpdateDto", "isOptional": false, "defaultValue": null } @@ -1442,6 +1361,7 @@ { "nameOnMethod": "id", "name": "id", + "jsonName": null, "type": "System.Guid", "typeSimple": "string", "isOptional": false, @@ -1453,8 +1373,9 @@ { "nameOnMethod": "input", "name": "input", - "type": "Volo.Abp.TenantManagement.TenantUpdateDto", - "typeSimple": "Volo.Abp.TenantManagement.TenantUpdateDto", + "jsonName": null, + "type": "Volo.Abp.Identity.IdentityRoleUpdateDto", + "typeSimple": "Volo.Abp.Identity.IdentityRoleUpdateDto", "isOptional": false, "defaultValue": null, "constraintTypes": null, @@ -1463,15 +1384,17 @@ } ], "returnValue": { - "type": "Volo.Abp.TenantManagement.TenantDto", - "typeSimple": "Volo.Abp.TenantManagement.TenantDto" - } + "type": "Volo.Abp.Identity.IdentityRoleDto", + "typeSimple": "Volo.Abp.Identity.IdentityRoleDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.IUpdateAppService" }, "DeleteAsyncById": { "uniqueName": "DeleteAsyncById", "name": "DeleteAsync", "httpMethod": "DELETE", - "url": "api/multi-tenancy/tenants/{id}", + "url": "api/identity/roles/{id}", "supportedVersions": [], "parametersOnMethod": [ { @@ -1487,6 +1410,7 @@ { "nameOnMethod": "id", "name": "id", + "jsonName": null, "type": "System.Guid", "typeSimple": "string", "isOptional": false, @@ -1499,13 +1423,27 @@ "returnValue": { "type": "System.Void", "typeSimple": "System.Void" - } - }, - "GetDefaultConnectionStringAsyncById": { - "uniqueName": "GetDefaultConnectionStringAsyncById", - "name": "GetDefaultConnectionStringAsync", + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.IDeleteAppService" + } + } + }, + "Volo.Abp.Identity.IdentityUserController": { + "controllerName": "IdentityUser", + "controllerGroupName": "User", + "type": "Volo.Abp.Identity.IdentityUserController", + "interfaces": [ + { + "type": "Volo.Abp.Identity.IIdentityUserAppService" + } + ], + "actions": { + "GetAsyncById": { + "uniqueName": "GetAsyncById", + "name": "GetAsync", "httpMethod": "GET", - "url": "api/multi-tenancy/tenants/{id}/default-connection-string", + "url": "api/identity/users/{id}", "supportedVersions": [], "parametersOnMethod": [ { @@ -1521,6 +1459,7 @@ { "nameOnMethod": "id", "name": "id", + "jsonName": null, "type": "System.Guid", "typeSimple": "string", "isOptional": false, @@ -1531,15 +1470,127 @@ } ], "returnValue": { - "type": "System.String", - "typeSimple": "string" - } + "type": "Volo.Abp.Identity.IdentityUserDto", + "typeSimple": "Volo.Abp.Identity.IdentityUserDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.IReadOnlyAppService" }, - "UpdateDefaultConnectionStringAsyncByIdAndDefaultConnectionString": { - "uniqueName": "UpdateDefaultConnectionStringAsyncByIdAndDefaultConnectionString", - "name": "UpdateDefaultConnectionStringAsync", + "GetListAsyncByInput": { + "uniqueName": "GetListAsyncByInput", + "name": "GetListAsync", + "httpMethod": "GET", + "url": "api/identity/users", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "Volo.Abp.Identity.GetIdentityUsersInput, Volo.Abp.Identity.Application.Contracts", + "type": "Volo.Abp.Identity.GetIdentityUsersInput", + "typeSimple": "Volo.Abp.Identity.GetIdentityUsersInput", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "input", + "name": "Filter", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "Sorting", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "SkipCount", + "jsonName": null, + "type": "System.Int32", + "typeSimple": "number", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "MaxResultCount", + "jsonName": null, + "type": "System.Int32", + "typeSimple": "number", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + } + ], + "returnValue": { + "type": "Volo.Abp.Application.Dtos.PagedResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.IReadOnlyAppService" + }, + "CreateAsyncByInput": { + "uniqueName": "CreateAsyncByInput", + "name": "CreateAsync", + "httpMethod": "POST", + "url": "api/identity/users", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "Volo.Abp.Identity.IdentityUserCreateDto, Volo.Abp.Identity.Application.Contracts", + "type": "Volo.Abp.Identity.IdentityUserCreateDto", + "typeSimple": "Volo.Abp.Identity.IdentityUserCreateDto", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Volo.Abp.Identity.IdentityUserCreateDto", + "typeSimple": "Volo.Abp.Identity.IdentityUserCreateDto", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.Abp.Identity.IdentityUserDto", + "typeSimple": "Volo.Abp.Identity.IdentityUserDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.ICreateAppService" + }, + "UpdateAsyncByIdAndInput": { + "uniqueName": "UpdateAsyncByIdAndInput", + "name": "UpdateAsync", "httpMethod": "PUT", - "url": "api/multi-tenancy/tenants/{id}/default-connection-string", + "url": "api/identity/users/{id}", "supportedVersions": [], "parametersOnMethod": [ { @@ -1551,10 +1602,10 @@ "defaultValue": null }, { - "name": "defaultConnectionString", - "typeAsString": "System.String, System.Private.CoreLib", - "type": "System.String", - "typeSimple": "string", + "name": "input", + "typeAsString": "Volo.Abp.Identity.IdentityUserUpdateDto, Volo.Abp.Identity.Application.Contracts", + "type": "Volo.Abp.Identity.IdentityUserUpdateDto", + "typeSimple": "Volo.Abp.Identity.IdentityUserUpdateDto", "isOptional": false, "defaultValue": null } @@ -1563,6 +1614,7 @@ { "nameOnMethod": "id", "name": "id", + "jsonName": null, "type": "System.Guid", "typeSimple": "string", "isOptional": false, @@ -1572,27 +1624,30 @@ "descriptorName": "" }, { - "nameOnMethod": "defaultConnectionString", - "name": "defaultConnectionString", - "type": "System.String", - "typeSimple": "string", + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Volo.Abp.Identity.IdentityUserUpdateDto", + "typeSimple": "Volo.Abp.Identity.IdentityUserUpdateDto", "isOptional": false, "defaultValue": null, "constraintTypes": null, - "bindingSourceId": "ModelBinding", + "bindingSourceId": "Body", "descriptorName": "" } ], "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" - } + "type": "Volo.Abp.Identity.IdentityUserDto", + "typeSimple": "Volo.Abp.Identity.IdentityUserDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.IUpdateAppService" }, - "DeleteDefaultConnectionStringAsyncById": { - "uniqueName": "DeleteDefaultConnectionStringAsyncById", - "name": "DeleteDefaultConnectionStringAsync", + "DeleteAsyncById": { + "uniqueName": "DeleteAsyncById", + "name": "DeleteAsync", "httpMethod": "DELETE", - "url": "api/multi-tenancy/tenants/{id}/default-connection-string", + "url": "api/identity/users/{id}", "supportedVersions": [], "parametersOnMethod": [ { @@ -1608,6 +1663,7 @@ { "nameOnMethod": "id", "name": "id", + "jsonName": null, "type": "System.Guid", "typeSimple": "string", "isOptional": false, @@ -1620,36 +1676,21 @@ "returnValue": { "type": "System.Void", "typeSimple": "System.Void" - } - } - } - } - } - }, - "abp": { - "rootPath": "abp", - "remoteServiceName": "abp", - "controllers": { - "Pages.Abp.MultiTenancy.AbpTenantController": { - "controllerName": "AbpTenant", - "type": "Pages.Abp.MultiTenancy.AbpTenantController", - "interfaces": [ - { - "type": "Volo.Abp.AspNetCore.Mvc.MultiTenancy.IAbpTenantAppService" - } - ], - "actions": { - "FindTenantByNameAsyncByName": { - "uniqueName": "FindTenantByNameAsyncByName", - "name": "FindTenantByNameAsync", + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.IDeleteAppService" + }, + "GetRolesAsyncById": { + "uniqueName": "GetRolesAsyncById", + "name": "GetRolesAsync", "httpMethod": "GET", - "url": "api/abp/multi-tenancy/tenants/by-name/{name}", + "url": "api/identity/users/{id}/roles", "supportedVersions": [], "parametersOnMethod": [ { - "name": "name", - "typeAsString": "System.String, System.Private.CoreLib", - "type": "System.String", + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", "typeSimple": "string", "isOptional": false, "defaultValue": null @@ -1657,9 +1698,10 @@ ], "parameters": [ { - "nameOnMethod": "name", - "name": "name", - "type": "System.String", + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", "typeSimple": "string", "isOptional": false, "defaultValue": null, @@ -1669,15 +1711,32 @@ } ], "returnValue": { - "type": "Volo.Abp.AspNetCore.Mvc.MultiTenancy.FindTenantResultDto", - "typeSimple": "Volo.Abp.AspNetCore.Mvc.MultiTenancy.FindTenantResultDto" - } + "type": "Volo.Abp.Application.Dtos.ListResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Identity.IIdentityUserAppService" }, - "FindTenantByIdAsyncById": { - "uniqueName": "FindTenantByIdAsyncById", - "name": "FindTenantByIdAsync", + "GetAssignableRolesAsync": { + "uniqueName": "GetAssignableRolesAsync", + "name": "GetAssignableRolesAsync", "httpMethod": "GET", - "url": "api/abp/multi-tenancy/tenants/by-id/{id}", + "url": "api/identity/users/assignable-roles", + "supportedVersions": [], + "parametersOnMethod": [], + "parameters": [], + "returnValue": { + "type": "Volo.Abp.Application.Dtos.ListResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Identity.IIdentityUserAppService" + }, + "UpdateRolesAsyncByIdAndInput": { + "uniqueName": "UpdateRolesAsyncByIdAndInput", + "name": "UpdateRolesAsync", + "httpMethod": "PUT", + "url": "api/identity/users/{id}/roles", "supportedVersions": [], "parametersOnMethod": [ { @@ -1687,12 +1746,21 @@ "typeSimple": "string", "isOptional": false, "defaultValue": null + }, + { + "name": "input", + "typeAsString": "Volo.Abp.Identity.IdentityUserUpdateRolesDto, Volo.Abp.Identity.Application.Contracts", + "type": "Volo.Abp.Identity.IdentityUserUpdateRolesDto", + "typeSimple": "Volo.Abp.Identity.IdentityUserUpdateRolesDto", + "isOptional": false, + "defaultValue": null } ], "parameters": [ { "nameOnMethod": "id", "name": "id", + "jsonName": null, "type": "System.Guid", "typeSimple": "string", "isOptional": false, @@ -1700,291 +1768,406 @@ "constraintTypes": [], "bindingSourceId": "Path", "descriptorName": "" - } - ], - "returnValue": { - "type": "Volo.Abp.AspNetCore.Mvc.MultiTenancy.FindTenantResultDto", - "typeSimple": "Volo.Abp.AspNetCore.Mvc.MultiTenancy.FindTenantResultDto" - } - } - } - }, - "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationController": { - "controllerName": "AbpApplicationConfiguration", - "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationController", - "interfaces": [ - { - "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.IAbpApplicationConfigurationAppService" - } - ], - "actions": { - "GetAsync": { - "uniqueName": "GetAsync", - "name": "GetAsync", + }, + { + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Volo.Abp.Identity.IdentityUserUpdateRolesDto", + "typeSimple": "Volo.Abp.Identity.IdentityUserUpdateRolesDto", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Identity.IIdentityUserAppService" + }, + "FindByUsernameAsyncByUserName": { + "uniqueName": "FindByUsernameAsyncByUserName", + "name": "FindByUsernameAsync", "httpMethod": "GET", - "url": "api/abp/application-configuration", + "url": "api/identity/users/by-username/{userName}", "supportedVersions": [], - "parametersOnMethod": [], - "parameters": [], + "parametersOnMethod": [ + { + "name": "userName", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "userName", + "name": "userName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], "returnValue": { - "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationConfigurationDto", - "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationConfigurationDto" - } - } - } - }, - "Volo.Abp.AspNetCore.Mvc.ApiExploring.AbpApiDefinitionController": { - "controllerName": "AbpApiDefinition", - "type": "Volo.Abp.AspNetCore.Mvc.ApiExploring.AbpApiDefinitionController", - "interfaces": [], - "actions": { - "GetByModel": { - "uniqueName": "GetByModel", - "name": "Get", + "type": "Volo.Abp.Identity.IdentityUserDto", + "typeSimple": "Volo.Abp.Identity.IdentityUserDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Identity.IIdentityUserAppService" + }, + "FindByEmailAsyncByEmail": { + "uniqueName": "FindByEmailAsyncByEmail", + "name": "FindByEmailAsync", "httpMethod": "GET", - "url": "api/abp/api-definition", + "url": "api/identity/users/by-email/{email}", "supportedVersions": [], "parametersOnMethod": [ { - "name": "model", - "typeAsString": "Volo.Abp.Http.Modeling.ApplicationApiDescriptionModelRequestDto, Volo.Abp.Http", - "type": "Volo.Abp.Http.Modeling.ApplicationApiDescriptionModelRequestDto", - "typeSimple": "Volo.Abp.Http.Modeling.ApplicationApiDescriptionModelRequestDto", + "name": "email", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", "isOptional": false, "defaultValue": null } ], "parameters": [ { - "nameOnMethod": "model", - "name": "IncludeTypes", - "type": "System.Boolean", - "typeSimple": "boolean", + "nameOnMethod": "email", + "name": "email", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", "isOptional": false, "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "model" + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" } ], "returnValue": { - "type": "Volo.Abp.Http.Modeling.ApplicationApiDescriptionModel", - "typeSimple": "Volo.Abp.Http.Modeling.ApplicationApiDescriptionModel" - } + "type": "Volo.Abp.Identity.IdentityUserDto", + "typeSimple": "Volo.Abp.Identity.IdentityUserDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Identity.IIdentityUserAppService" } } - } - } - }, - "permissionManagement": { - "rootPath": "permissionManagement", - "remoteServiceName": "AbpPermissionManagement", - "controllers": { - "Volo.Abp.PermissionManagement.PermissionsController": { - "controllerName": "Permissions", - "type": "Volo.Abp.PermissionManagement.PermissionsController", + }, + "Volo.Abp.Identity.IdentityUserLookupController": { + "controllerName": "IdentityUserLookup", + "controllerGroupName": "UserLookup", + "type": "Volo.Abp.Identity.IdentityUserLookupController", "interfaces": [ { - "type": "Volo.Abp.PermissionManagement.IPermissionAppService" + "type": "Volo.Abp.Identity.IIdentityUserLookupAppService" } ], "actions": { - "GetAsyncByProviderNameAndProviderKey": { - "uniqueName": "GetAsyncByProviderNameAndProviderKey", - "name": "GetAsync", + "FindByIdAsyncById": { + "uniqueName": "FindByIdAsyncById", + "name": "FindByIdAsync", "httpMethod": "GET", - "url": "api/permission-management/permissions", + "url": "api/identity/users/lookup/{id}", "supportedVersions": [], "parametersOnMethod": [ { - "name": "providerName", + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.Abp.Users.UserData", + "typeSimple": "Volo.Abp.Users.UserData" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Identity.IIdentityUserLookupAppService" + }, + "FindByUserNameAsyncByUserName": { + "uniqueName": "FindByUserNameAsyncByUserName", + "name": "FindByUserNameAsync", + "httpMethod": "GET", + "url": "api/identity/users/lookup/by-username/{userName}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "userName", "typeAsString": "System.String, System.Private.CoreLib", "type": "System.String", "typeSimple": "string", "isOptional": false, "defaultValue": null - }, + } + ], + "parameters": [ { - "name": "providerKey", - "typeAsString": "System.String, System.Private.CoreLib", + "nameOnMethod": "userName", + "name": "userName", + "jsonName": null, "type": "System.String", "typeSimple": "string", "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.Abp.Users.UserData", + "typeSimple": "Volo.Abp.Users.UserData" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Identity.IIdentityUserLookupAppService" + }, + "SearchAsyncByInput": { + "uniqueName": "SearchAsyncByInput", + "name": "SearchAsync", + "httpMethod": "GET", + "url": "api/identity/users/lookup/search", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "Volo.Abp.Identity.UserLookupSearchInputDto, Volo.Abp.Identity.Application.Contracts", + "type": "Volo.Abp.Identity.UserLookupSearchInputDto", + "typeSimple": "Volo.Abp.Identity.UserLookupSearchInputDto", + "isOptional": false, "defaultValue": null } ], "parameters": [ { - "nameOnMethod": "providerName", - "name": "providerName", + "nameOnMethod": "input", + "name": "Filter", + "jsonName": null, "type": "System.String", "typeSimple": "string", "isOptional": false, "defaultValue": null, "constraintTypes": null, "bindingSourceId": "ModelBinding", - "descriptorName": "" + "descriptorName": "input" }, { - "nameOnMethod": "providerKey", - "name": "providerKey", + "nameOnMethod": "input", + "name": "Sorting", + "jsonName": null, "type": "System.String", "typeSimple": "string", "isOptional": false, "defaultValue": null, "constraintTypes": null, "bindingSourceId": "ModelBinding", - "descriptorName": "" + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "SkipCount", + "jsonName": null, + "type": "System.Int32", + "typeSimple": "number", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "MaxResultCount", + "jsonName": null, + "type": "System.Int32", + "typeSimple": "number", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" } ], "returnValue": { - "type": "Volo.Abp.PermissionManagement.GetPermissionListResultDto", - "typeSimple": "Volo.Abp.PermissionManagement.GetPermissionListResultDto" - } + "type": "Volo.Abp.Application.Dtos.ListResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Identity.IIdentityUserLookupAppService" }, - "UpdateAsyncByProviderNameAndProviderKeyAndInput": { - "uniqueName": "UpdateAsyncByProviderNameAndProviderKeyAndInput", - "name": "UpdateAsync", - "httpMethod": "PUT", - "url": "api/permission-management/permissions", + "GetCountAsyncByInput": { + "uniqueName": "GetCountAsyncByInput", + "name": "GetCountAsync", + "httpMethod": "GET", + "url": "api/identity/users/lookup/count", "supportedVersions": [], "parametersOnMethod": [ { - "name": "providerName", - "typeAsString": "System.String, System.Private.CoreLib", - "type": "System.String", - "typeSimple": "string", + "name": "input", + "typeAsString": "Volo.Abp.Identity.UserLookupCountInputDto, Volo.Abp.Identity.Application.Contracts", + "type": "Volo.Abp.Identity.UserLookupCountInputDto", + "typeSimple": "Volo.Abp.Identity.UserLookupCountInputDto", "isOptional": false, "defaultValue": null - }, + } + ], + "parameters": [ { - "name": "providerKey", - "typeAsString": "System.String, System.Private.CoreLib", + "nameOnMethod": "input", + "name": "Filter", + "jsonName": null, "type": "System.String", "typeSimple": "string", "isOptional": false, - "defaultValue": null - }, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + } + ], + "returnValue": { + "type": "System.Int64", + "typeSimple": "number" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Identity.IIdentityUserLookupAppService" + } + } + }, + "Volo.Abp.Identity.ProfileController": { + "controllerName": "Profile", + "controllerGroupName": "Profile", + "type": "Volo.Abp.Identity.ProfileController", + "interfaces": [ + { + "type": "Volo.Abp.Identity.IProfileAppService" + } + ], + "actions": { + "GetAsync": { + "uniqueName": "GetAsync", + "name": "GetAsync", + "httpMethod": "GET", + "url": "api/identity/my-profile", + "supportedVersions": [], + "parametersOnMethod": [], + "parameters": [], + "returnValue": { + "type": "Volo.Abp.Identity.ProfileDto", + "typeSimple": "Volo.Abp.Identity.ProfileDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Identity.IProfileAppService" + }, + "UpdateAsyncByInput": { + "uniqueName": "UpdateAsyncByInput", + "name": "UpdateAsync", + "httpMethod": "PUT", + "url": "api/identity/my-profile", + "supportedVersions": [], + "parametersOnMethod": [ { "name": "input", - "typeAsString": "Volo.Abp.PermissionManagement.UpdatePermissionsDto, Volo.Abp.PermissionManagement.Application.Contracts", - "type": "Volo.Abp.PermissionManagement.UpdatePermissionsDto", - "typeSimple": "Volo.Abp.PermissionManagement.UpdatePermissionsDto", + "typeAsString": "Volo.Abp.Identity.UpdateProfileDto, Volo.Abp.Identity.Application.Contracts", + "type": "Volo.Abp.Identity.UpdateProfileDto", + "typeSimple": "Volo.Abp.Identity.UpdateProfileDto", "isOptional": false, "defaultValue": null } ], "parameters": [ { - "nameOnMethod": "providerName", - "name": "providerName", - "type": "System.String", - "typeSimple": "string", + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Volo.Abp.Identity.UpdateProfileDto", + "typeSimple": "Volo.Abp.Identity.UpdateProfileDto", "isOptional": false, "defaultValue": null, "constraintTypes": null, - "bindingSourceId": "ModelBinding", + "bindingSourceId": "Body", "descriptorName": "" - }, + } + ], + "returnValue": { + "type": "Volo.Abp.Identity.ProfileDto", + "typeSimple": "Volo.Abp.Identity.ProfileDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Identity.IProfileAppService" + }, + "ChangePasswordAsyncByInput": { + "uniqueName": "ChangePasswordAsyncByInput", + "name": "ChangePasswordAsync", + "httpMethod": "POST", + "url": "api/identity/my-profile/change-password", + "supportedVersions": [], + "parametersOnMethod": [ { - "nameOnMethod": "providerKey", - "name": "providerKey", - "type": "System.String", - "typeSimple": "string", + "name": "input", + "typeAsString": "Volo.Abp.Identity.ChangePasswordInput, Volo.Abp.Identity.Application.Contracts", + "type": "Volo.Abp.Identity.ChangePasswordInput", + "typeSimple": "Volo.Abp.Identity.ChangePasswordInput", "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "" - }, + "defaultValue": null + } + ], + "parameters": [ { "nameOnMethod": "input", "name": "input", - "type": "Volo.Abp.PermissionManagement.UpdatePermissionsDto", - "typeSimple": "Volo.Abp.PermissionManagement.UpdatePermissionsDto", + "jsonName": null, + "type": "Volo.Abp.Identity.ChangePasswordInput", + "typeSimple": "Volo.Abp.Identity.ChangePasswordInput", "isOptional": false, "defaultValue": null, "constraintTypes": null, "bindingSourceId": "Body", "descriptorName": "" } - ], - "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" - } - } - } - } - } - } - }, - "types": { - "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "UserNameOrEmailAddress", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "Password", - "type": "System.String", - "typeSimple": "string" - }, - { - "name": "RememberMe", - "type": "System.Boolean", - "typeSimple": "boolean" - } - ] - }, - "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.AbpLoginResult": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "Result", - "type": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.LoginResultType", - "typeSimple": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.LoginResultType" - }, - { - "name": "Description", - "type": "System.String", - "typeSimple": "string" - } - ] - }, - "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.LoginResultType": { - "baseType": "System.Enum", - "isEnum": true, - "enumNames": [ - "Success", - "InvalidUserNameOrPassword", - "NotAllowed", - "LockedOut", - "RequiresTwoFactor" - ], - "enumValues": [ - 1, - 2, - 3, - 4, - 5 - ], - "genericArguments": null, - "properties": null - }, + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Identity.IProfileAppService" + } + } + } + } + } + }, + "types": { "Volo.Abp.Account.RegisterDto": { - "baseType": null, + "baseType": "Volo.Abp.ObjectExtending.ExtensibleObject", "isEnum": false, "enumNames": null, "enumValues": null, @@ -1992,23 +2175,47 @@ "properties": [ { "name": "UserName", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": true }, { "name": "EmailAddress", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": true }, { "name": "Password", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": true }, { "name": "AppName", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": true + } + ] + }, + "Volo.Abp.ObjectExtending.ExtensibleObject": { + "baseType": null, + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "ExtraProperties", + "jsonName": null, + "type": "{System.String:System.Object}", + "typeSimple": "{string:object}", + "isRequired": false } ] }, @@ -2021,63 +2228,80 @@ "properties": [ { "name": "TenantId", + "jsonName": null, "type": "System.Guid?", - "typeSimple": "string?" + "typeSimple": "string?", + "isRequired": false }, { "name": "UserName", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "Name", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "Surname", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "Email", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "EmailConfirmed", + "jsonName": null, "type": "System.Boolean", - "typeSimple": "boolean" + "typeSimple": "boolean", + "isRequired": false }, { "name": "PhoneNumber", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "PhoneNumberConfirmed", + "jsonName": null, "type": "System.Boolean", - "typeSimple": "boolean" - }, - { - "name": "TwoFactorEnabled", - "type": "System.Boolean", - "typeSimple": "boolean" + "typeSimple": "boolean", + "isRequired": false }, { "name": "LockoutEnabled", + "jsonName": null, "type": "System.Boolean", - "typeSimple": "boolean" + "typeSimple": "boolean", + "isRequired": false }, { "name": "LockoutEnd", + "jsonName": null, "type": "System.DateTimeOffset?", - "typeSimple": "string?" + "typeSimple": "string?", + "isRequired": false }, { "name": "ConcurrencyStamp", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false } ] }, @@ -2092,18 +2316,24 @@ "properties": [ { "name": "IsDeleted", + "jsonName": null, "type": "System.Boolean", - "typeSimple": "boolean" + "typeSimple": "boolean", + "isRequired": false }, { "name": "DeleterId", + "jsonName": null, "type": "System.Guid?", - "typeSimple": "string?" + "typeSimple": "string?", + "isRequired": false }, { "name": "DeletionTime", + "jsonName": null, "type": "System.DateTime?", - "typeSimple": "string?" + "typeSimple": "string?", + "isRequired": false } ] }, @@ -2118,13 +2348,17 @@ "properties": [ { "name": "LastModificationTime", + "jsonName": null, "type": "System.DateTime?", - "typeSimple": "string?" + "typeSimple": "string?", + "isRequired": false }, { "name": "LastModifierId", + "jsonName": null, "type": "System.Guid?", - "typeSimple": "string?" + "typeSimple": "string?", + "isRequired": false } ] }, @@ -2139,13 +2373,17 @@ "properties": [ { "name": "CreationTime", + "jsonName": null, "type": "System.DateTime", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "CreatorId", + "jsonName": null, "type": "System.Guid?", - "typeSimple": "string?" + "typeSimple": "string?", + "isRequired": false } ] }, @@ -2160,22 +2398,10 @@ "properties": [ { "name": "Id", + "jsonName": null, "type": "TKey", - "typeSimple": "TKey" - } - ] - }, - "Volo.Abp.ObjectExtending.ExtensibleObject": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "ExtraProperties", - "type": "{System.String:System.Object}", - "typeSimple": "{string:object}" + "typeSimple": "TKey", + "isRequired": false } ] }, @@ -2188,23 +2414,31 @@ "properties": [ { "name": "Email", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": true }, { "name": "AppName", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": true }, { "name": "ReturnUrl", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "ReturnUrlHash", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false } ] }, @@ -2217,21 +2451,100 @@ "properties": [ { "name": "UserId", + "jsonName": null, "type": "System.Guid", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "ResetToken", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": true + }, + { + "name": "Password", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": true + } + ] + }, + "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo": { + "baseType": null, + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "UserNameOrEmailAddress", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": true }, { "name": "Password", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": true + }, + { + "name": "RememberMe", + "jsonName": null, + "type": "System.Boolean", + "typeSimple": "boolean", + "isRequired": false + } + ] + }, + "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.AbpLoginResult": { + "baseType": null, + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "Result", + "jsonName": null, + "type": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.LoginResultType", + "typeSimple": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.LoginResultType", + "isRequired": false + }, + { + "name": "Description", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false } ] }, + "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.LoginResultType": { + "baseType": "System.Enum", + "isEnum": true, + "enumNames": [ + "Success", + "InvalidUserNameOrPassword", + "NotAllowed", + "LockedOut", + "RequiresTwoFactor" + ], + "enumValues": [ + 1, + 2, + 3, + 4, + 5 + ], + "genericArguments": null, + "properties": null + }, "Volo.Abp.AspNetCore.Mvc.MultiTenancy.FindTenantResultDto": { "baseType": null, "isEnum": false, @@ -2241,18 +2554,31 @@ "properties": [ { "name": "Success", + "jsonName": null, "type": "System.Boolean", - "typeSimple": "boolean" + "typeSimple": "boolean", + "isRequired": false }, { "name": "TenantId", + "jsonName": null, "type": "System.Guid?", - "typeSimple": "string?" + "typeSimple": "string?", + "isRequired": false }, { "name": "Name", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false + }, + { + "name": "IsActive", + "jsonName": null, + "type": "System.Boolean", + "typeSimple": "boolean", + "isRequired": false } ] }, @@ -2267,8 +2593,10 @@ "properties": [ { "name": "Items", + "jsonName": null, "type": "[T]", - "typeSimple": "[T]" + "typeSimple": "[T]", + "isRequired": false } ] }, @@ -2281,28 +2609,54 @@ "properties": [ { "name": "Name", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "IsDefault", + "jsonName": null, "type": "System.Boolean", - "typeSimple": "boolean" + "typeSimple": "boolean", + "isRequired": false }, { "name": "IsStatic", + "jsonName": null, "type": "System.Boolean", - "typeSimple": "boolean" + "typeSimple": "boolean", + "isRequired": false }, { "name": "IsPublic", + "jsonName": null, "type": "System.Boolean", - "typeSimple": "boolean" + "typeSimple": "boolean", + "isRequired": false }, { "name": "ConcurrencyStamp", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + } + ] + }, + "Volo.Abp.Identity.GetIdentityRolesInput": { + "baseType": "Volo.Abp.Application.Dtos.PagedAndSortedResultRequestDto", + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "Filter", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false } ] }, @@ -2315,8 +2669,10 @@ "properties": [ { "name": "Sorting", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false } ] }, @@ -2329,8 +2685,10 @@ "properties": [ { "name": "SkipCount", + "jsonName": null, "type": "System.Int32", - "typeSimple": "number" + "typeSimple": "number", + "isRequired": false } ] }, @@ -2343,18 +2701,24 @@ "properties": [ { "name": "DefaultMaxResultCount", + "jsonName": null, "type": "System.Int32", - "typeSimple": "number" + "typeSimple": "number", + "isRequired": false }, { "name": "MaxMaxResultCount", + "jsonName": null, "type": "System.Int32", - "typeSimple": "number" + "typeSimple": "number", + "isRequired": false }, { "name": "MaxResultCount", + "jsonName": null, "type": "System.Int32", - "typeSimple": "number" + "typeSimple": "number", + "isRequired": false } ] }, @@ -2369,8 +2733,10 @@ "properties": [ { "name": "TotalCount", + "jsonName": null, "type": "System.Int64", - "typeSimple": "number" + "typeSimple": "number", + "isRequired": false } ] }, @@ -2391,18 +2757,24 @@ "properties": [ { "name": "Name", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": true }, { "name": "IsDefault", + "jsonName": null, "type": "System.Boolean", - "typeSimple": "boolean" + "typeSimple": "boolean", + "isRequired": false }, { "name": "IsPublic", + "jsonName": null, "type": "System.Boolean", - "typeSimple": "boolean" + "typeSimple": "boolean", + "isRequired": false } ] }, @@ -2415,8 +2787,10 @@ "properties": [ { "name": "ConcurrencyStamp", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false } ] }, @@ -2429,8 +2803,10 @@ "properties": [ { "name": "Filter", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false } ] }, @@ -2443,8 +2819,10 @@ "properties": [ { "name": "Password", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": true } ] }, @@ -2457,43 +2835,52 @@ "properties": [ { "name": "UserName", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": true }, { "name": "Name", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "Surname", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "Email", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": true }, { "name": "PhoneNumber", + "jsonName": null, "type": "System.String", - "typeSimple": "string" - }, - { - "name": "TwoFactorEnabled", - "type": "System.Boolean", - "typeSimple": "boolean" + "typeSimple": "string", + "isRequired": false }, { "name": "LockoutEnabled", + "jsonName": null, "type": "System.Boolean", - "typeSimple": "boolean" + "typeSimple": "boolean", + "isRequired": false }, { "name": "RoleNames", + "jsonName": null, "type": "[System.String]", - "typeSimple": "[string]" + "typeSimple": "[string]", + "isRequired": false } ] }, @@ -2506,13 +2893,17 @@ "properties": [ { "name": "Password", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "ConcurrencyStamp", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false } ] }, @@ -2525,8 +2916,10 @@ "properties": [ { "name": "RoleNames", + "jsonName": null, "type": "[System.String]", - "typeSimple": "[string]" + "typeSimple": "[string]", + "isRequired": true } ] }, @@ -2539,48 +2932,66 @@ "properties": [ { "name": "Id", + "jsonName": null, "type": "System.Guid", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "TenantId", + "jsonName": null, "type": "System.Guid?", - "typeSimple": "string?" + "typeSimple": "string?", + "isRequired": false }, { "name": "UserName", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "Name", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "Surname", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "Email", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "EmailConfirmed", + "jsonName": null, "type": "System.Boolean", - "typeSimple": "boolean" + "typeSimple": "boolean", + "isRequired": false }, { "name": "PhoneNumber", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "PhoneNumberConfirmed", + "jsonName": null, "type": "System.Boolean", - "typeSimple": "boolean" + "typeSimple": "boolean", + "isRequired": false } ] }, @@ -2593,8 +3004,10 @@ "properties": [ { "name": "Filter", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false } ] }, @@ -2607,8 +3020,10 @@ "properties": [ { "name": "Filter", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false } ] }, @@ -2621,38 +3036,59 @@ "properties": [ { "name": "UserName", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "Email", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "Name", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "Surname", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "PhoneNumber", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "IsExternal", + "jsonName": null, "type": "System.Boolean", - "typeSimple": "boolean" + "typeSimple": "boolean", + "isRequired": false }, { "name": "HasPassword", + "jsonName": null, "type": "System.Boolean", - "typeSimple": "boolean" + "typeSimple": "boolean", + "isRequired": false + }, + { + "name": "ConcurrencyStamp", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false } ] }, @@ -2665,28 +3101,45 @@ "properties": [ { "name": "UserName", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "Email", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "Name", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "Surname", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "PhoneNumber", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "ConcurrencyStamp", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false } ] }, @@ -2699,13 +3152,17 @@ "properties": [ { "name": "CurrentPassword", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "NewPassword", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": true } ] }, @@ -2718,13 +3175,17 @@ "properties": [ { "name": "EntityDisplayName", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "Groups", + "jsonName": null, "type": "[Volo.Abp.PermissionManagement.PermissionGroupDto]", - "typeSimple": "[Volo.Abp.PermissionManagement.PermissionGroupDto]" + "typeSimple": "[Volo.Abp.PermissionManagement.PermissionGroupDto]", + "isRequired": false } ] }, @@ -2737,18 +3198,24 @@ "properties": [ { "name": "Name", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "DisplayName", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "Permissions", + "jsonName": null, "type": "[Volo.Abp.PermissionManagement.PermissionGrantInfoDto]", - "typeSimple": "[Volo.Abp.PermissionManagement.PermissionGrantInfoDto]" + "typeSimple": "[Volo.Abp.PermissionManagement.PermissionGrantInfoDto]", + "isRequired": false } ] }, @@ -2761,33 +3228,45 @@ "properties": [ { "name": "Name", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "DisplayName", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "ParentName", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "IsGranted", + "jsonName": null, "type": "System.Boolean", - "typeSimple": "boolean" + "typeSimple": "boolean", + "isRequired": false }, { "name": "AllowedProviders", + "jsonName": null, "type": "[System.String]", - "typeSimple": "[string]" + "typeSimple": "[string]", + "isRequired": false }, { "name": "GrantedProviders", + "jsonName": null, "type": "[Volo.Abp.PermissionManagement.ProviderInfoDto]", - "typeSimple": "[Volo.Abp.PermissionManagement.ProviderInfoDto]" + "typeSimple": "[Volo.Abp.PermissionManagement.ProviderInfoDto]", + "isRequired": false } ] }, @@ -2800,13 +3279,17 @@ "properties": [ { "name": "ProviderName", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "ProviderKey", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false } ] }, @@ -2819,8 +3302,10 @@ "properties": [ { "name": "Permissions", + "jsonName": null, "type": "[Volo.Abp.PermissionManagement.UpdatePermissionDto]", - "typeSimple": "[Volo.Abp.PermissionManagement.UpdatePermissionDto]" + "typeSimple": "[Volo.Abp.PermissionManagement.UpdatePermissionDto]", + "isRequired": false } ] }, @@ -2833,13 +3318,161 @@ "properties": [ { "name": "Name", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "IsGranted", + "jsonName": null, + "type": "System.Boolean", + "typeSimple": "boolean", + "isRequired": false + } + ] + }, + "Volo.Abp.SettingManagement.EmailSettingsDto": { + "baseType": null, + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "SmtpHost", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "SmtpPort", + "jsonName": null, + "type": "System.Int32", + "typeSimple": "number", + "isRequired": false + }, + { + "name": "SmtpUserName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "SmtpPassword", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "SmtpDomain", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "SmtpEnableSsl", + "jsonName": null, + "type": "System.Boolean", + "typeSimple": "boolean", + "isRequired": false + }, + { + "name": "SmtpUseDefaultCredentials", + "jsonName": null, + "type": "System.Boolean", + "typeSimple": "boolean", + "isRequired": false + }, + { + "name": "DefaultFromAddress", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "DefaultFromDisplayName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + } + ] + }, + "Volo.Abp.SettingManagement.UpdateEmailSettingsDto": { + "baseType": null, + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "SmtpHost", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "SmtpPort", + "jsonName": null, + "type": "System.Int32", + "typeSimple": "number", + "isRequired": false + }, + { + "name": "SmtpUserName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "SmtpPassword", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "SmtpDomain", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "SmtpEnableSsl", + "jsonName": null, + "type": "System.Boolean", + "typeSimple": "boolean", + "isRequired": false + }, + { + "name": "SmtpUseDefaultCredentials", + "jsonName": null, "type": "System.Boolean", - "typeSimple": "boolean" + "typeSimple": "boolean", + "isRequired": false + }, + { + "name": "DefaultFromAddress", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": true + }, + { + "name": "DefaultFromDisplayName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": true } ] }, @@ -2852,8 +3485,17 @@ "properties": [ { "name": "Name", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "ConcurrencyStamp", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false } ] }, @@ -2866,8 +3508,10 @@ "properties": [ { "name": "Filter", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false } ] }, @@ -2880,13 +3524,17 @@ "properties": [ { "name": "AdminEmailAddress", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": true }, { "name": "AdminPassword", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": true } ] }, @@ -2899,8 +3547,10 @@ "properties": [ { "name": "Name", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": true } ] }, @@ -2910,7 +3560,15 @@ "enumNames": null, "enumValues": null, "genericArguments": null, - "properties": [] + "properties": [ + { + "name": "ConcurrencyStamp", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + } + ] }, "Volo.Abp.FeatureManagement.GetFeatureListResultDto": { "baseType": null, @@ -2921,8 +3579,10 @@ "properties": [ { "name": "Groups", + "jsonName": null, "type": "[Volo.Abp.FeatureManagement.FeatureGroupDto]", - "typeSimple": "[Volo.Abp.FeatureManagement.FeatureGroupDto]" + "typeSimple": "[Volo.Abp.FeatureManagement.FeatureGroupDto]", + "isRequired": false } ] }, @@ -2935,18 +3595,24 @@ "properties": [ { "name": "Name", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "DisplayName", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "Features", + "jsonName": null, "type": "[Volo.Abp.FeatureManagement.FeatureDto]", - "typeSimple": "[Volo.Abp.FeatureManagement.FeatureDto]" + "typeSimple": "[Volo.Abp.FeatureManagement.FeatureDto]", + "isRequired": false } ] }, @@ -2959,43 +3625,59 @@ "properties": [ { "name": "Name", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "DisplayName", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "Value", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "Provider", + "jsonName": null, "type": "Volo.Abp.FeatureManagement.FeatureProviderDto", - "typeSimple": "Volo.Abp.FeatureManagement.FeatureProviderDto" + "typeSimple": "Volo.Abp.FeatureManagement.FeatureProviderDto", + "isRequired": false }, { "name": "Description", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "ValueType", + "jsonName": null, "type": "Volo.Abp.Validation.StringValues.IStringValueType", - "typeSimple": "Volo.Abp.Validation.StringValues.IStringValueType" + "typeSimple": "Volo.Abp.Validation.StringValues.IStringValueType", + "isRequired": false }, { "name": "Depth", + "jsonName": null, "type": "System.Int32", - "typeSimple": "number" + "typeSimple": "number", + "isRequired": false }, { "name": "ParentName", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false } ] }, @@ -3008,13 +3690,17 @@ "properties": [ { "name": "Name", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "Key", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false } ] }, @@ -3027,23 +3713,31 @@ "properties": [ { "name": "Name", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "Item", + "jsonName": null, "type": "System.Object", - "typeSimple": "object" + "typeSimple": "object", + "isRequired": false }, { "name": "Properties", + "jsonName": null, "type": "{System.String:System.Object}", - "typeSimple": "{string:object}" + "typeSimple": "{string:object}", + "isRequired": false }, { "name": "Validator", + "jsonName": null, "type": "Volo.Abp.Validation.StringValues.IValueValidator", - "typeSimple": "Volo.Abp.Validation.StringValues.IValueValidator" + "typeSimple": "Volo.Abp.Validation.StringValues.IValueValidator", + "isRequired": false } ] }, @@ -3056,18 +3750,24 @@ "properties": [ { "name": "Name", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "Item", + "jsonName": null, "type": "System.Object", - "typeSimple": "object" + "typeSimple": "object", + "isRequired": false }, { "name": "Properties", + "jsonName": null, "type": "{System.String:System.Object}", - "typeSimple": "{string:object}" + "typeSimple": "{string:object}", + "isRequired": false } ] }, @@ -3080,8 +3780,10 @@ "properties": [ { "name": "Features", + "jsonName": null, "type": "[Volo.Abp.FeatureManagement.UpdateFeatureDto]", - "typeSimple": "[Volo.Abp.FeatureManagement.UpdateFeatureDto]" + "typeSimple": "[Volo.Abp.FeatureManagement.UpdateFeatureDto]", + "isRequired": false } ] }, @@ -3094,13 +3796,17 @@ "properties": [ { "name": "Name", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "Value", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false } ] }, @@ -3113,53 +3819,73 @@ "properties": [ { "name": "Localization", + "jsonName": null, "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationLocalizationConfigurationDto", - "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationLocalizationConfigurationDto" + "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationLocalizationConfigurationDto", + "isRequired": false }, { "name": "Auth", + "jsonName": null, "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationAuthConfigurationDto", - "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationAuthConfigurationDto" + "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationAuthConfigurationDto", + "isRequired": false }, { "name": "Setting", + "jsonName": null, "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationSettingConfigurationDto", - "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationSettingConfigurationDto" + "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationSettingConfigurationDto", + "isRequired": false }, { "name": "CurrentUser", + "jsonName": null, "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.CurrentUserDto", - "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.CurrentUserDto" + "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.CurrentUserDto", + "isRequired": false }, { "name": "Features", + "jsonName": null, "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationFeatureConfigurationDto", - "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationFeatureConfigurationDto" + "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationFeatureConfigurationDto", + "isRequired": false }, { "name": "MultiTenancy", + "jsonName": null, "type": "Volo.Abp.AspNetCore.Mvc.MultiTenancy.MultiTenancyInfoDto", - "typeSimple": "Volo.Abp.AspNetCore.Mvc.MultiTenancy.MultiTenancyInfoDto" + "typeSimple": "Volo.Abp.AspNetCore.Mvc.MultiTenancy.MultiTenancyInfoDto", + "isRequired": false }, { "name": "CurrentTenant", + "jsonName": null, "type": "Volo.Abp.AspNetCore.Mvc.MultiTenancy.CurrentTenantDto", - "typeSimple": "Volo.Abp.AspNetCore.Mvc.MultiTenancy.CurrentTenantDto" + "typeSimple": "Volo.Abp.AspNetCore.Mvc.MultiTenancy.CurrentTenantDto", + "isRequired": false }, { "name": "Timing", + "jsonName": null, "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.TimingDto", - "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.TimingDto" + "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.TimingDto", + "isRequired": false }, { "name": "Clock", + "jsonName": null, "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ClockDto", - "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ClockDto" + "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ClockDto", + "isRequired": false }, { "name": "ObjectExtensions", + "jsonName": null, "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ObjectExtensionsDto", - "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ObjectExtensionsDto" + "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ObjectExtensionsDto", + "isRequired": false } ] }, @@ -3172,33 +3898,45 @@ "properties": [ { "name": "Values", - "type": "{System.String:{System.String:System.String}}", - "typeSimple": "{string:{string:string}}" + "jsonName": null, + "type": "{System.String:System.Collections.Generic.Dictionary}", + "typeSimple": "{string:System.Collections.Generic.Dictionary}", + "isRequired": false }, { "name": "Languages", + "jsonName": null, "type": "[Volo.Abp.Localization.LanguageInfo]", - "typeSimple": "[Volo.Abp.Localization.LanguageInfo]" + "typeSimple": "[Volo.Abp.Localization.LanguageInfo]", + "isRequired": false }, { "name": "CurrentCulture", + "jsonName": null, "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.CurrentCultureDto", - "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.CurrentCultureDto" + "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.CurrentCultureDto", + "isRequired": false }, { "name": "DefaultResourceName", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "LanguagesMap", + "jsonName": null, "type": "{System.String:[Volo.Abp.NameValue]}", - "typeSimple": "{string:[Volo.Abp.NameValue]}" + "typeSimple": "{string:[Volo.Abp.NameValue]}", + "isRequired": false }, { "name": "LanguageFilesMap", + "jsonName": null, "type": "{System.String:[Volo.Abp.NameValue]}", - "typeSimple": "{string:[Volo.Abp.NameValue]}" + "typeSimple": "{string:[Volo.Abp.NameValue]}", + "isRequired": false } ] }, @@ -3211,23 +3949,31 @@ "properties": [ { "name": "CultureName", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "UiCultureName", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "DisplayName", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "FlagIcon", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false } ] }, @@ -3240,48 +3986,66 @@ "properties": [ { "name": "DisplayName", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "EnglishName", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "ThreeLetterIsoLanguageName", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "TwoLetterIsoLanguageName", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "IsRightToLeft", + "jsonName": null, "type": "System.Boolean", - "typeSimple": "boolean" + "typeSimple": "boolean", + "isRequired": false }, { "name": "CultureName", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "Name", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "NativeName", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "DateTimeFormat", + "jsonName": null, "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.DateTimeFormatDto", - "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.DateTimeFormatDto" + "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.DateTimeFormatDto", + "isRequired": false } ] }, @@ -3294,38 +4058,52 @@ "properties": [ { "name": "CalendarAlgorithmType", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "DateTimeFormatLong", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "ShortDatePattern", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "FullDateTimePattern", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "DateSeparator", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "ShortTimePattern", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "LongTimePattern", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false } ] }, @@ -3348,13 +4126,17 @@ "properties": [ { "name": "Name", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "Value", + "jsonName": null, "type": "T", - "typeSimple": "T" + "typeSimple": "T", + "isRequired": false } ] }, @@ -3367,13 +4149,17 @@ "properties": [ { "name": "Policies", + "jsonName": null, "type": "{System.String:System.Boolean}", - "typeSimple": "{string:boolean}" + "typeSimple": "{string:boolean}", + "isRequired": false }, { "name": "GrantedPolicies", + "jsonName": null, "type": "{System.String:System.Boolean}", - "typeSimple": "{string:boolean}" + "typeSimple": "{string:boolean}", + "isRequired": false } ] }, @@ -3386,8 +4172,10 @@ "properties": [ { "name": "Values", + "jsonName": null, "type": "{System.String:System.String}", - "typeSimple": "{string:string}" + "typeSimple": "{string:string}", + "isRequired": false } ] }, @@ -3400,58 +4188,94 @@ "properties": [ { "name": "IsAuthenticated", + "jsonName": null, "type": "System.Boolean", - "typeSimple": "boolean" + "typeSimple": "boolean", + "isRequired": false }, { "name": "Id", + "jsonName": null, "type": "System.Guid?", - "typeSimple": "string?" + "typeSimple": "string?", + "isRequired": false }, { "name": "TenantId", + "jsonName": null, + "type": "System.Guid?", + "typeSimple": "string?", + "isRequired": false + }, + { + "name": "ImpersonatorUserId", + "jsonName": null, + "type": "System.Guid?", + "typeSimple": "string?", + "isRequired": false + }, + { + "name": "ImpersonatorTenantId", + "jsonName": null, "type": "System.Guid?", - "typeSimple": "string?" + "typeSimple": "string?", + "isRequired": false }, { "name": "UserName", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "Name", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "SurName", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "Email", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "EmailVerified", + "jsonName": null, "type": "System.Boolean", - "typeSimple": "boolean" + "typeSimple": "boolean", + "isRequired": false }, { "name": "PhoneNumber", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "PhoneNumberVerified", + "jsonName": null, "type": "System.Boolean", - "typeSimple": "boolean" + "typeSimple": "boolean", + "isRequired": false }, { "name": "Roles", + "jsonName": null, "type": "[System.String]", - "typeSimple": "[string]" + "typeSimple": "[string]", + "isRequired": false } ] }, @@ -3464,8 +4288,10 @@ "properties": [ { "name": "Values", + "jsonName": null, "type": "{System.String:System.String}", - "typeSimple": "{string:string}" + "typeSimple": "{string:string}", + "isRequired": false } ] }, @@ -3478,8 +4304,10 @@ "properties": [ { "name": "IsEnabled", + "jsonName": null, "type": "System.Boolean", - "typeSimple": "boolean" + "typeSimple": "boolean", + "isRequired": false } ] }, @@ -3492,18 +4320,24 @@ "properties": [ { "name": "Id", + "jsonName": null, "type": "System.Guid?", - "typeSimple": "string?" + "typeSimple": "string?", + "isRequired": false }, { "name": "Name", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "IsAvailable", + "jsonName": null, "type": "System.Boolean", - "typeSimple": "boolean" + "typeSimple": "boolean", + "isRequired": false } ] }, @@ -3516,8 +4350,10 @@ "properties": [ { "name": "TimeZone", + "jsonName": null, "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.TimeZone", - "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.TimeZone" + "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.TimeZone", + "isRequired": false } ] }, @@ -3530,13 +4366,17 @@ "properties": [ { "name": "Iana", + "jsonName": null, "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.IanaTimeZone", - "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.IanaTimeZone" + "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.IanaTimeZone", + "isRequired": false }, { "name": "Windows", + "jsonName": null, "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.WindowsTimeZone", - "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.WindowsTimeZone" + "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.WindowsTimeZone", + "isRequired": false } ] }, @@ -3549,8 +4389,10 @@ "properties": [ { "name": "TimeZoneName", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false } ] }, @@ -3563,8 +4405,10 @@ "properties": [ { "name": "TimeZoneId", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false } ] }, @@ -3577,8 +4421,10 @@ "properties": [ { "name": "Kind", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false } ] }, @@ -3591,13 +4437,17 @@ "properties": [ { "name": "Modules", + "jsonName": null, "type": "{System.String:Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ModuleExtensionDto}", - "typeSimple": "{string:Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ModuleExtensionDto}" + "typeSimple": "{string:Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ModuleExtensionDto}", + "isRequired": false }, { "name": "Enums", + "jsonName": null, "type": "{System.String:Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionEnumDto}", - "typeSimple": "{string:Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionEnumDto}" + "typeSimple": "{string:Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionEnumDto}", + "isRequired": false } ] }, @@ -3610,13 +4460,17 @@ "properties": [ { "name": "Entities", + "jsonName": null, "type": "{System.String:Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.EntityExtensionDto}", - "typeSimple": "{string:Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.EntityExtensionDto}" + "typeSimple": "{string:Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.EntityExtensionDto}", + "isRequired": false }, { "name": "Configuration", + "jsonName": null, "type": "{System.String:System.Object}", - "typeSimple": "{string:object}" + "typeSimple": "{string:object}", + "isRequired": false } ] }, @@ -3629,13 +4483,17 @@ "properties": [ { "name": "Properties", + "jsonName": null, "type": "{System.String:Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyDto}", - "typeSimple": "{string:Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyDto}" + "typeSimple": "{string:Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyDto}", + "isRequired": false }, { "name": "Configuration", + "jsonName": null, "type": "{System.String:System.Object}", - "typeSimple": "{string:object}" + "typeSimple": "{string:object}", + "isRequired": false } ] }, @@ -3648,43 +4506,59 @@ "properties": [ { "name": "Type", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "TypeSimple", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "DisplayName", + "jsonName": null, "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.LocalizableStringDto", - "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.LocalizableStringDto" + "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.LocalizableStringDto", + "isRequired": false }, { "name": "Api", + "jsonName": null, "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyApiDto", - "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyApiDto" + "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyApiDto", + "isRequired": false }, { "name": "Ui", + "jsonName": null, "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyUiDto", - "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyUiDto" + "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyUiDto", + "isRequired": false }, { "name": "Attributes", + "jsonName": null, "type": "[Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyAttributeDto]", - "typeSimple": "[Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyAttributeDto]" + "typeSimple": "[Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyAttributeDto]", + "isRequired": false }, { "name": "Configuration", + "jsonName": null, "type": "{System.String:System.Object}", - "typeSimple": "{string:object}" + "typeSimple": "{string:object}", + "isRequired": false }, { "name": "DefaultValue", + "jsonName": null, "type": "System.Object", - "typeSimple": "object" + "typeSimple": "object", + "isRequired": false } ] }, @@ -3697,13 +4571,17 @@ "properties": [ { "name": "Name", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "Resource", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false } ] }, @@ -3716,18 +4594,24 @@ "properties": [ { "name": "OnGet", + "jsonName": null, "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyApiGetDto", - "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyApiGetDto" + "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyApiGetDto", + "isRequired": false }, { "name": "OnCreate", + "jsonName": null, "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyApiCreateDto", - "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyApiCreateDto" + "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyApiCreateDto", + "isRequired": false }, { "name": "OnUpdate", + "jsonName": null, "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyApiUpdateDto", - "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyApiUpdateDto" + "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyApiUpdateDto", + "isRequired": false } ] }, @@ -3740,8 +4624,10 @@ "properties": [ { "name": "IsAvailable", + "jsonName": null, "type": "System.Boolean", - "typeSimple": "boolean" + "typeSimple": "boolean", + "isRequired": false } ] }, @@ -3754,8 +4640,10 @@ "properties": [ { "name": "IsAvailable", + "jsonName": null, "type": "System.Boolean", - "typeSimple": "boolean" + "typeSimple": "boolean", + "isRequired": false } ] }, @@ -3768,8 +4656,10 @@ "properties": [ { "name": "IsAvailable", + "jsonName": null, "type": "System.Boolean", - "typeSimple": "boolean" + "typeSimple": "boolean", + "isRequired": false } ] }, @@ -3782,18 +4672,31 @@ "properties": [ { "name": "OnTable", + "jsonName": null, "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyUiTableDto", - "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyUiTableDto" + "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyUiTableDto", + "isRequired": false }, { "name": "OnCreateForm", + "jsonName": null, "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyUiFormDto", - "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyUiFormDto" + "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyUiFormDto", + "isRequired": false }, { "name": "OnEditForm", + "jsonName": null, "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyUiFormDto", - "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyUiFormDto" + "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyUiFormDto", + "isRequired": false + }, + { + "name": "Lookup", + "jsonName": null, + "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyUiLookupDto", + "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyUiLookupDto", + "isRequired": false } ] }, @@ -3806,8 +4709,10 @@ "properties": [ { "name": "IsVisible", + "jsonName": null, "type": "System.Boolean", - "typeSimple": "boolean" + "typeSimple": "boolean", + "isRequired": false } ] }, @@ -3820,8 +4725,54 @@ "properties": [ { "name": "IsVisible", + "jsonName": null, "type": "System.Boolean", - "typeSimple": "boolean" + "typeSimple": "boolean", + "isRequired": false + } + ] + }, + "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionPropertyUiLookupDto": { + "baseType": null, + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "Url", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "ResultListPropertyName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "DisplayPropertyName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "ValuePropertyName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "FilterParamName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false } ] }, @@ -3834,13 +4785,17 @@ "properties": [ { "name": "TypeSimple", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "Config", + "jsonName": null, "type": "{System.String:System.Object}", - "typeSimple": "{string:object}" + "typeSimple": "{string:object}", + "isRequired": false } ] }, @@ -3853,13 +4808,17 @@ "properties": [ { "name": "Fields", + "jsonName": null, "type": "[Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionEnumFieldDto]", - "typeSimple": "[Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionEnumFieldDto]" + "typeSimple": "[Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending.ExtensionEnumFieldDto]", + "isRequired": false }, { "name": "LocalizationResource", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false } ] }, @@ -3872,13 +4831,17 @@ "properties": [ { "name": "Name", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "Value", + "jsonName": null, "type": "System.Object", - "typeSimple": "object" + "typeSimple": "object", + "isRequired": false } ] }, @@ -3891,8 +4854,10 @@ "properties": [ { "name": "IncludeTypes", + "jsonName": null, "type": "System.Boolean", - "typeSimple": "boolean" + "typeSimple": "boolean", + "isRequired": false } ] }, @@ -3905,13 +4870,17 @@ "properties": [ { "name": "Modules", + "jsonName": null, "type": "{System.String:Volo.Abp.Http.Modeling.ModuleApiDescriptionModel}", - "typeSimple": "{string:Volo.Abp.Http.Modeling.ModuleApiDescriptionModel}" + "typeSimple": "{string:Volo.Abp.Http.Modeling.ModuleApiDescriptionModel}", + "isRequired": false }, { "name": "Types", + "jsonName": null, "type": "{System.String:Volo.Abp.Http.Modeling.TypeApiDescriptionModel}", - "typeSimple": "{string:Volo.Abp.Http.Modeling.TypeApiDescriptionModel}" + "typeSimple": "{string:Volo.Abp.Http.Modeling.TypeApiDescriptionModel}", + "isRequired": false } ] }, @@ -3924,18 +4893,24 @@ "properties": [ { "name": "RootPath", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "RemoteServiceName", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "Controllers", + "jsonName": null, "type": "{System.String:Volo.Abp.Http.Modeling.ControllerApiDescriptionModel}", - "typeSimple": "{string:Volo.Abp.Http.Modeling.ControllerApiDescriptionModel}" + "typeSimple": "{string:Volo.Abp.Http.Modeling.ControllerApiDescriptionModel}", + "isRequired": false } ] }, @@ -3948,23 +4923,38 @@ "properties": [ { "name": "ControllerName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "ControllerGroupName", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "Type", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "Interfaces", + "jsonName": null, "type": "[Volo.Abp.Http.Modeling.ControllerInterfaceApiDescriptionModel]", - "typeSimple": "[Volo.Abp.Http.Modeling.ControllerInterfaceApiDescriptionModel]" + "typeSimple": "[Volo.Abp.Http.Modeling.ControllerInterfaceApiDescriptionModel]", + "isRequired": false }, { "name": "Actions", + "jsonName": null, "type": "{System.String:Volo.Abp.Http.Modeling.ActionApiDescriptionModel}", - "typeSimple": "{string:Volo.Abp.Http.Modeling.ActionApiDescriptionModel}" + "typeSimple": "{string:Volo.Abp.Http.Modeling.ActionApiDescriptionModel}", + "isRequired": false } ] }, @@ -3977,8 +4967,10 @@ "properties": [ { "name": "Type", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false } ] }, @@ -3991,43 +4983,73 @@ "properties": [ { "name": "UniqueName", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "Name", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "HttpMethod", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "Url", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "SupportedVersions", + "jsonName": null, "type": "[System.String]", - "typeSimple": "[string]" + "typeSimple": "[string]", + "isRequired": false }, { "name": "ParametersOnMethod", + "jsonName": null, "type": "[Volo.Abp.Http.Modeling.MethodParameterApiDescriptionModel]", - "typeSimple": "[Volo.Abp.Http.Modeling.MethodParameterApiDescriptionModel]" + "typeSimple": "[Volo.Abp.Http.Modeling.MethodParameterApiDescriptionModel]", + "isRequired": false }, { "name": "Parameters", + "jsonName": null, "type": "[Volo.Abp.Http.Modeling.ParameterApiDescriptionModel]", - "typeSimple": "[Volo.Abp.Http.Modeling.ParameterApiDescriptionModel]" + "typeSimple": "[Volo.Abp.Http.Modeling.ParameterApiDescriptionModel]", + "isRequired": false }, { "name": "ReturnValue", + "jsonName": null, "type": "Volo.Abp.Http.Modeling.ReturnValueApiDescriptionModel", - "typeSimple": "Volo.Abp.Http.Modeling.ReturnValueApiDescriptionModel" + "typeSimple": "Volo.Abp.Http.Modeling.ReturnValueApiDescriptionModel", + "isRequired": false + }, + { + "name": "AllowAnonymous", + "jsonName": null, + "type": "System.Boolean?", + "typeSimple": "boolean?", + "isRequired": false + }, + { + "name": "ImplementFrom", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false } ] }, @@ -4040,33 +5062,45 @@ "properties": [ { "name": "Name", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "TypeAsString", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "Type", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "TypeSimple", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "IsOptional", + "jsonName": null, "type": "System.Boolean", - "typeSimple": "boolean" + "typeSimple": "boolean", + "isRequired": false }, { "name": "DefaultValue", + "jsonName": null, "type": "System.Object", - "typeSimple": "object" + "typeSimple": "object", + "isRequired": false } ] }, @@ -4079,48 +5113,73 @@ "properties": [ { "name": "NameOnMethod", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "Name", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "JsonName", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "Type", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "TypeSimple", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "IsOptional", + "jsonName": null, "type": "System.Boolean", - "typeSimple": "boolean" + "typeSimple": "boolean", + "isRequired": false }, { "name": "DefaultValue", + "jsonName": null, "type": "System.Object", - "typeSimple": "object" + "typeSimple": "object", + "isRequired": false }, { "name": "ConstraintTypes", + "jsonName": null, "type": "[System.String]", - "typeSimple": "[string]" + "typeSimple": "[string]", + "isRequired": false }, { "name": "BindingSourceId", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "DescriptorName", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false } ] }, @@ -4133,13 +5192,17 @@ "properties": [ { "name": "Type", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "TypeSimple", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false } ] }, @@ -4152,33 +5215,45 @@ "properties": [ { "name": "BaseType", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "IsEnum", + "jsonName": null, "type": "System.Boolean", - "typeSimple": "boolean" + "typeSimple": "boolean", + "isRequired": false }, { "name": "EnumNames", + "jsonName": null, "type": "[System.String]", - "typeSimple": "[string]" + "typeSimple": "[string]", + "isRequired": false }, { "name": "EnumValues", + "jsonName": null, "type": "[System.Object]", - "typeSimple": "[object]" + "typeSimple": "[object]", + "isRequired": false }, { "name": "GenericArguments", + "jsonName": null, "type": "[System.String]", - "typeSimple": "[string]" + "typeSimple": "[string]", + "isRequired": false }, { "name": "Properties", + "jsonName": null, "type": "[Volo.Abp.Http.Modeling.PropertyApiDescriptionModel]", - "typeSimple": "[Volo.Abp.Http.Modeling.PropertyApiDescriptionModel]" + "typeSimple": "[Volo.Abp.Http.Modeling.PropertyApiDescriptionModel]", + "isRequired": false } ] }, @@ -4191,18 +5266,38 @@ "properties": [ { "name": "Name", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, + { + "name": "JsonName", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "Type", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false }, { "name": "TypeSimple", + "jsonName": null, "type": "System.String", - "typeSimple": "string" + "typeSimple": "string", + "isRequired": false + }, + { + "name": "IsRequired", + "jsonName": null, + "type": "System.Boolean", + "typeSimple": "boolean", + "isRequired": false } ] } diff --git a/npm/ng-packs/packages/permission-management/src/lib/proxy/index.ts b/npm/ng-packs/packages/permission-management/proxy/src/lib/proxy/index.ts similarity index 100% rename from npm/ng-packs/packages/permission-management/src/lib/proxy/index.ts rename to npm/ng-packs/packages/permission-management/proxy/src/lib/proxy/index.ts diff --git a/npm/ng-packs/packages/permission-management/src/lib/proxy/models.ts b/npm/ng-packs/packages/permission-management/proxy/src/lib/proxy/models.ts similarity index 70% rename from npm/ng-packs/packages/permission-management/src/lib/proxy/models.ts rename to npm/ng-packs/packages/permission-management/proxy/src/lib/proxy/models.ts index 36b6a89bd9..cbba2214ec 100644 --- a/npm/ng-packs/packages/permission-management/src/lib/proxy/models.ts +++ b/npm/ng-packs/packages/permission-management/proxy/src/lib/proxy/models.ts @@ -1,30 +1,31 @@ + export interface GetPermissionListResultDto { - entityDisplayName: string; + entityDisplayName?: string; groups: PermissionGroupDto[]; } export interface PermissionGrantInfoDto { - name: string; - displayName: string; - parentName: string; + name?: string; + displayName?: string; + parentName?: string; isGranted: boolean; allowedProviders: string[]; grantedProviders: ProviderInfoDto[]; } export interface PermissionGroupDto { - name: string; - displayName: string; + name?: string; + displayName?: string; permissions: PermissionGrantInfoDto[]; } export interface ProviderInfoDto { - providerName: string; - providerKey: string; + providerName?: string; + providerKey?: string; } export interface UpdatePermissionDto { - name: string; + name?: string; isGranted: boolean; } diff --git a/npm/ng-packs/packages/permission-management/proxy/src/lib/proxy/permissions.service.ts b/npm/ng-packs/packages/permission-management/proxy/src/lib/proxy/permissions.service.ts new file mode 100644 index 0000000000..45ac0b40e1 --- /dev/null +++ b/npm/ng-packs/packages/permission-management/proxy/src/lib/proxy/permissions.service.ts @@ -0,0 +1,29 @@ +import type { GetPermissionListResultDto, UpdatePermissionsDto } from './models'; +import { RestService } from '@abp/ng.core'; +import { Injectable } from '@angular/core'; + +@Injectable({ + providedIn: 'root', +}) +export class PermissionsService { + apiName = 'AbpPermissionManagement'; + + get = (providerName: string, providerKey: string) => + this.restService.request({ + method: 'GET', + url: '/api/permission-management/permissions', + params: { providerName, providerKey }, + }, + { apiName: this.apiName }); + + update = (providerName: string, providerKey: string, input: UpdatePermissionsDto) => + this.restService.request({ + method: 'PUT', + url: '/api/permission-management/permissions', + params: { providerName, providerKey }, + body: input, + }, + { apiName: this.apiName }); + + constructor(private restService: RestService) {} +} diff --git a/npm/ng-packs/packages/permission-management/proxy/src/public-api.ts b/npm/ng-packs/packages/permission-management/proxy/src/public-api.ts new file mode 100644 index 0000000000..11aece60c4 --- /dev/null +++ b/npm/ng-packs/packages/permission-management/proxy/src/public-api.ts @@ -0,0 +1 @@ +export * from './lib/index'; diff --git a/npm/ng-packs/packages/permission-management/src/lib/components/permission-management.component.ts b/npm/ng-packs/packages/permission-management/src/lib/components/permission-management.component.ts index 0e8a44bc53..c6dd19f795 100644 --- a/npm/ng-packs/packages/permission-management/src/lib/components/permission-management.component.ts +++ b/npm/ng-packs/packages/permission-management/src/lib/components/permission-management.component.ts @@ -1,17 +1,17 @@ import { ConfigStateService, CurrentUserDto } from '@abp/ng.core'; -import { LocaleDirection } from '@abp/ng.theme.shared'; -import { Component, EventEmitter, Input, Output, TrackByFunction } from '@angular/core'; -import { of } from 'rxjs'; -import { finalize, switchMap, tap } from 'rxjs/operators'; -import { PermissionManagement } from '../models/permission-management'; import { GetPermissionListResultDto, PermissionGrantInfoDto, PermissionGroupDto, + PermissionsService, ProviderInfoDto, UpdatePermissionDto, -} from '../proxy/models'; -import { PermissionsService } from '../proxy/permissions.service'; +} from '@abp/ng.permission-management/proxy'; +import { LocaleDirection } from '@abp/ng.theme.shared'; +import { Component, EventEmitter, Input, Output, TrackByFunction } from '@angular/core'; +import { of } from 'rxjs'; +import { finalize, switchMap, tap } from 'rxjs/operators'; +import { PermissionManagement } from '../models/permission-management'; type PermissionWithStyle = PermissionGrantInfoDto & { style: string; diff --git a/npm/ng-packs/packages/permission-management/src/lib/models/permission-management.ts b/npm/ng-packs/packages/permission-management/src/lib/models/permission-management.ts index 2202d14b48..7909de0db9 100644 --- a/npm/ng-packs/packages/permission-management/src/lib/models/permission-management.ts +++ b/npm/ng-packs/packages/permission-management/src/lib/models/permission-management.ts @@ -1,5 +1,5 @@ +import { GetPermissionListResultDto } from '@abp/ng.permission-management/proxy'; import { EventEmitter } from '@angular/core'; -import { GetPermissionListResultDto } from '../proxy/models'; export namespace PermissionManagement { export interface State { diff --git a/npm/ng-packs/packages/permission-management/src/lib/proxy/permissions.service.ts b/npm/ng-packs/packages/permission-management/src/lib/proxy/permissions.service.ts deleted file mode 100644 index 381fd952f5..0000000000 --- a/npm/ng-packs/packages/permission-management/src/lib/proxy/permissions.service.ts +++ /dev/null @@ -1,33 +0,0 @@ -import type { GetPermissionListResultDto, UpdatePermissionsDto } from './models'; -import { RestService } from '@abp/ng.core'; -import { Injectable } from '@angular/core'; - -@Injectable({ - providedIn: 'root', -}) -export class PermissionsService { - apiName = 'AbpPermissionManagement'; - - get = (providerName: string, providerKey: string) => - this.restService.request( - { - method: 'GET', - url: '/api/permission-management/permissions', - params: { providerName, providerKey }, - }, - { apiName: this.apiName }, - ); - - update = (providerName: string, providerKey: string, input: UpdatePermissionsDto) => - this.restService.request( - { - method: 'PUT', - url: '/api/permission-management/permissions', - params: { providerName, providerKey }, - body: input, - }, - { apiName: this.apiName }, - ); - - constructor(private restService: RestService) {} -} diff --git a/npm/ng-packs/packages/permission-management/src/public-api.ts b/npm/ng-packs/packages/permission-management/src/public-api.ts index 9a59591cf2..9af00990fd 100644 --- a/npm/ng-packs/packages/permission-management/src/public-api.ts +++ b/npm/ng-packs/packages/permission-management/src/public-api.ts @@ -2,4 +2,3 @@ export * from './lib/components'; export * from './lib/enums/components'; export * from './lib/models'; export * from './lib/permission-management.module'; -export * from './lib/proxy'; diff --git a/npm/ng-packs/packages/permission-management/tsconfig.json b/npm/ng-packs/packages/permission-management/tsconfig.json index 62ebbd9464..546e940e20 100644 --- a/npm/ng-packs/packages/permission-management/tsconfig.json +++ b/npm/ng-packs/packages/permission-management/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../tsconfig.json", "files": [], "include": [], "references": [ diff --git a/npm/ng-packs/packages/schematics/src/utils/angular/tsconfig.ts b/npm/ng-packs/packages/schematics/src/utils/angular/tsconfig.ts index 290312f3f2..ae9075d94b 100644 --- a/npm/ng-packs/packages/schematics/src/utils/angular/tsconfig.ts +++ b/npm/ng-packs/packages/schematics/src/utils/angular/tsconfig.ts @@ -66,11 +66,11 @@ export function addTsConfigProjectReferences(paths: string[]): Rule { * Throws an exception when the base tsconfig doesn't exists. */ export function verifyBaseTsConfigExists(host: Tree): void { - if (host.exists('tsconfig.base.json')) { + if (host.exists('tsconfig.json')) { return; } throw new SchematicsException( - `Cannot find base TypeScript configuration file 'tsconfig.base.json'.`, + `Cannot find base TypeScript configuration file 'tsconfig.json'.`, ); } diff --git a/npm/ng-packs/packages/setting-management/tsconfig.json b/npm/ng-packs/packages/setting-management/tsconfig.json index 62ebbd9464..546e940e20 100644 --- a/npm/ng-packs/packages/setting-management/tsconfig.json +++ b/npm/ng-packs/packages/setting-management/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../tsconfig.json", "files": [], "include": [], "references": [ diff --git a/npm/ng-packs/packages/tenant-management/proxy/ng-package.json b/npm/ng-packs/packages/tenant-management/proxy/ng-package.json new file mode 100644 index 0000000000..579be9e362 --- /dev/null +++ b/npm/ng-packs/packages/tenant-management/proxy/ng-package.json @@ -0,0 +1,7 @@ +{ + "$schema": "../../../node_modules/ng-packagr/ng-package.schema.json", + "dest": "../../../dist/packages/tenant-management/proxy", + "lib": { + "entryFile": "src/public-api.ts" + } +} diff --git a/npm/ng-packs/packages/tenant-management/proxy/src/lib/index.ts b/npm/ng-packs/packages/tenant-management/proxy/src/lib/index.ts new file mode 100644 index 0000000000..203b903eeb --- /dev/null +++ b/npm/ng-packs/packages/tenant-management/proxy/src/lib/index.ts @@ -0,0 +1,2 @@ +export * from './proxy'; + diff --git a/npm/ng-packs/packages/tenant-management/proxy/src/lib/proxy/README.md b/npm/ng-packs/packages/tenant-management/proxy/src/lib/proxy/README.md new file mode 100644 index 0000000000..767dfd0f7c --- /dev/null +++ b/npm/ng-packs/packages/tenant-management/proxy/src/lib/proxy/README.md @@ -0,0 +1,17 @@ +# Proxy Generation Output + +This directory includes the output of the latest proxy generation. +The files and folders in it will be overwritten when proxy generation is run again. +Therefore, please do not place your own content in this folder. + +In addition, `generate-proxy.json` works like a lock file. +It includes information used by the proxy generator, so please do not delete or modify it. + +Finally, the name of the files and folders should not be changed for two reasons: +- Proxy generator will keep creating them at those paths and you will have multiple copies of the same content. +- ABP Suite generates files which include imports from this folder. + +> **Important Notice:** If you are building a module and are planning to publish to npm, +> some of the generated proxies are likely to be exported from public-api.ts file. In such a case, +> please make sure you export files directly and not from barrel exports. In other words, +> do not include index.ts exports in your public-api.ts exports. diff --git a/npm/ng-packs/packages/tenant-management/src/lib/proxy/generate-proxy.json b/npm/ng-packs/packages/tenant-management/proxy/src/lib/proxy/generate-proxy.json similarity index 95% rename from npm/ng-packs/packages/tenant-management/src/lib/proxy/generate-proxy.json rename to npm/ng-packs/packages/tenant-management/proxy/src/lib/proxy/generate-proxy.json index b32dacad03..bb4cf82675 100644 --- a/npm/ng-packs/packages/tenant-management/src/lib/proxy/generate-proxy.json +++ b/npm/ng-packs/packages/tenant-management/proxy/src/lib/proxy/generate-proxy.json @@ -3,12 +3,165 @@ "multi-tenancy" ], "modules": { + "featureManagement": { + "rootPath": "featureManagement", + "remoteServiceName": "AbpFeatureManagement", + "controllers": { + "Volo.Abp.FeatureManagement.FeaturesController": { + "controllerName": "Features", + "controllerGroupName": "Features", + "type": "Volo.Abp.FeatureManagement.FeaturesController", + "interfaces": [ + { + "type": "Volo.Abp.FeatureManagement.IFeatureAppService" + } + ], + "actions": { + "GetAsyncByProviderNameAndProviderKey": { + "uniqueName": "GetAsyncByProviderNameAndProviderKey", + "name": "GetAsync", + "httpMethod": "GET", + "url": "api/feature-management/features", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "providerName", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "providerKey", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "providerName", + "name": "providerName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "" + }, + { + "nameOnMethod": "providerKey", + "name": "providerKey", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.Abp.FeatureManagement.GetFeatureListResultDto", + "typeSimple": "Volo.Abp.FeatureManagement.GetFeatureListResultDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.FeatureManagement.IFeatureAppService" + }, + "UpdateAsyncByProviderNameAndProviderKeyAndInput": { + "uniqueName": "UpdateAsyncByProviderNameAndProviderKeyAndInput", + "name": "UpdateAsync", + "httpMethod": "PUT", + "url": "api/feature-management/features", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "providerName", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "providerKey", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "input", + "typeAsString": "Volo.Abp.FeatureManagement.UpdateFeaturesDto, Volo.Abp.FeatureManagement.Application.Contracts", + "type": "Volo.Abp.FeatureManagement.UpdateFeaturesDto", + "typeSimple": "Volo.Abp.FeatureManagement.UpdateFeaturesDto", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "providerName", + "name": "providerName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "" + }, + { + "nameOnMethod": "providerKey", + "name": "providerKey", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "" + }, + { + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Volo.Abp.FeatureManagement.UpdateFeaturesDto", + "typeSimple": "Volo.Abp.FeatureManagement.UpdateFeaturesDto", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.FeatureManagement.IFeatureAppService" + } + } + } + } + }, "multi-tenancy": { "rootPath": "multi-tenancy", "remoteServiceName": "AbpTenantManagement", "controllers": { "Volo.Abp.TenantManagement.TenantController": { "controllerName": "Tenant", + "controllerGroupName": "Tenant", "type": "Volo.Abp.TenantManagement.TenantController", "interfaces": [ { @@ -50,7 +203,8 @@ "type": "Volo.Abp.TenantManagement.TenantDto", "typeSimple": "Volo.Abp.TenantManagement.TenantDto" }, - "allowAnonymous": null + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.IReadOnlyAppService" }, "GetListAsyncByInput": { "uniqueName": "GetListAsyncByInput", @@ -122,7 +276,8 @@ "type": "Volo.Abp.Application.Dtos.PagedResultDto", "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" }, - "allowAnonymous": null + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.IReadOnlyAppService" }, "CreateAsyncByInput": { "uniqueName": "CreateAsyncByInput", @@ -158,7 +313,8 @@ "type": "Volo.Abp.TenantManagement.TenantDto", "typeSimple": "Volo.Abp.TenantManagement.TenantDto" }, - "allowAnonymous": null + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.ICreateAppService" }, "UpdateAsyncByIdAndInput": { "uniqueName": "UpdateAsyncByIdAndInput", @@ -214,7 +370,8 @@ "type": "Volo.Abp.TenantManagement.TenantDto", "typeSimple": "Volo.Abp.TenantManagement.TenantDto" }, - "allowAnonymous": null + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.IUpdateAppService" }, "DeleteAsyncById": { "uniqueName": "DeleteAsyncById", @@ -250,7 +407,8 @@ "type": "System.Void", "typeSimple": "System.Void" }, - "allowAnonymous": null + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.IDeleteAppService" }, "GetDefaultConnectionStringAsyncById": { "uniqueName": "GetDefaultConnectionStringAsyncById", @@ -286,7 +444,8 @@ "type": "System.String", "typeSimple": "string" }, - "allowAnonymous": null + "allowAnonymous": null, + "implementFrom": "Volo.Abp.TenantManagement.ITenantAppService" }, "UpdateDefaultConnectionStringAsyncByIdAndDefaultConnectionString": { "uniqueName": "UpdateDefaultConnectionStringAsyncByIdAndDefaultConnectionString", @@ -342,7 +501,8 @@ "type": "System.Void", "typeSimple": "System.Void" }, - "allowAnonymous": null + "allowAnonymous": null, + "implementFrom": "Volo.Abp.TenantManagement.ITenantAppService" }, "DeleteDefaultConnectionStringAsyncById": { "uniqueName": "DeleteDefaultConnectionStringAsyncById", @@ -378,144 +538,291 @@ "type": "System.Void", "typeSimple": "System.Void" }, - "allowAnonymous": null + "allowAnonymous": null, + "implementFrom": "Volo.Abp.TenantManagement.ITenantAppService" } } } } }, - "featureManagement": { - "rootPath": "featureManagement", - "remoteServiceName": "AbpFeatureManagement", + "account": { + "rootPath": "account", + "remoteServiceName": "AbpAccount", "controllers": { - "Volo.Abp.FeatureManagement.FeaturesController": { - "controllerName": "Features", - "type": "Volo.Abp.FeatureManagement.FeaturesController", + "Volo.Abp.Account.AccountController": { + "controllerName": "Account", + "controllerGroupName": "Account", + "type": "Volo.Abp.Account.AccountController", "interfaces": [ { - "type": "Volo.Abp.FeatureManagement.IFeatureAppService" + "type": "Volo.Abp.Account.IAccountAppService" } ], "actions": { - "GetAsyncByProviderNameAndProviderKey": { - "uniqueName": "GetAsyncByProviderNameAndProviderKey", - "name": "GetAsync", - "httpMethod": "GET", - "url": "api/feature-management/features", + "RegisterAsyncByInput": { + "uniqueName": "RegisterAsyncByInput", + "name": "RegisterAsync", + "httpMethod": "POST", + "url": "api/account/register", "supportedVersions": [], "parametersOnMethod": [ { - "name": "providerName", - "typeAsString": "System.String, System.Private.CoreLib", - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null - }, - { - "name": "providerKey", - "typeAsString": "System.String, System.Private.CoreLib", - "type": "System.String", - "typeSimple": "string", + "name": "input", + "typeAsString": "Volo.Abp.Account.RegisterDto, Volo.Abp.Account.Application.Contracts", + "type": "Volo.Abp.Account.RegisterDto", + "typeSimple": "Volo.Abp.Account.RegisterDto", "isOptional": false, "defaultValue": null } ], "parameters": [ { - "nameOnMethod": "providerName", - "name": "providerName", + "nameOnMethod": "input", + "name": "input", "jsonName": null, - "type": "System.String", - "typeSimple": "string", + "type": "Volo.Abp.Account.RegisterDto", + "typeSimple": "Volo.Abp.Account.RegisterDto", "isOptional": false, "defaultValue": null, "constraintTypes": null, - "bindingSourceId": "ModelBinding", + "bindingSourceId": "Body", "descriptorName": "" - }, + } + ], + "returnValue": { + "type": "Volo.Abp.Identity.IdentityUserDto", + "typeSimple": "Volo.Abp.Identity.IdentityUserDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Account.IAccountAppService" + }, + "SendPasswordResetCodeAsyncByInput": { + "uniqueName": "SendPasswordResetCodeAsyncByInput", + "name": "SendPasswordResetCodeAsync", + "httpMethod": "POST", + "url": "api/account/send-password-reset-code", + "supportedVersions": [], + "parametersOnMethod": [ { - "nameOnMethod": "providerKey", - "name": "providerKey", + "name": "input", + "typeAsString": "Volo.Abp.Account.SendPasswordResetCodeDto, Volo.Abp.Account.Application.Contracts", + "type": "Volo.Abp.Account.SendPasswordResetCodeDto", + "typeSimple": "Volo.Abp.Account.SendPasswordResetCodeDto", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "input", + "name": "input", "jsonName": null, - "type": "System.String", - "typeSimple": "string", + "type": "Volo.Abp.Account.SendPasswordResetCodeDto", + "typeSimple": "Volo.Abp.Account.SendPasswordResetCodeDto", "isOptional": false, "defaultValue": null, "constraintTypes": null, - "bindingSourceId": "ModelBinding", + "bindingSourceId": "Body", "descriptorName": "" } ], "returnValue": { - "type": "Volo.Abp.FeatureManagement.GetFeatureListResultDto", - "typeSimple": "Volo.Abp.FeatureManagement.GetFeatureListResultDto" + "type": "System.Void", + "typeSimple": "System.Void" }, - "allowAnonymous": null + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Account.IAccountAppService" }, - "UpdateAsyncByProviderNameAndProviderKeyAndInput": { - "uniqueName": "UpdateAsyncByProviderNameAndProviderKeyAndInput", - "name": "UpdateAsync", - "httpMethod": "PUT", - "url": "api/feature-management/features", + "ResetPasswordAsyncByInput": { + "uniqueName": "ResetPasswordAsyncByInput", + "name": "ResetPasswordAsync", + "httpMethod": "POST", + "url": "api/account/reset-password", "supportedVersions": [], "parametersOnMethod": [ { - "name": "providerName", - "typeAsString": "System.String, System.Private.CoreLib", - "type": "System.String", - "typeSimple": "string", + "name": "input", + "typeAsString": "Volo.Abp.Account.ResetPasswordDto, Volo.Abp.Account.Application.Contracts", + "type": "Volo.Abp.Account.ResetPasswordDto", + "typeSimple": "Volo.Abp.Account.ResetPasswordDto", "isOptional": false, "defaultValue": null - }, + } + ], + "parameters": [ { - "name": "providerKey", - "typeAsString": "System.String, System.Private.CoreLib", - "type": "System.String", - "typeSimple": "string", + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Volo.Abp.Account.ResetPasswordDto", + "typeSimple": "Volo.Abp.Account.ResetPasswordDto", "isOptional": false, - "defaultValue": null - }, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Account.IAccountAppService" + } + } + }, + "Volo.Abp.Account.Web.Areas.Account.Controllers.AccountController": { + "controllerName": "Account", + "controllerGroupName": "Login", + "type": "Volo.Abp.Account.Web.Areas.Account.Controllers.AccountController", + "interfaces": [], + "actions": { + "LoginByLogin": { + "uniqueName": "LoginByLogin", + "name": "Login", + "httpMethod": "POST", + "url": "api/account/login", + "supportedVersions": [], + "parametersOnMethod": [ { - "name": "input", - "typeAsString": "Volo.Abp.FeatureManagement.UpdateFeaturesDto, Volo.Abp.FeatureManagement.Application.Contracts", - "type": "Volo.Abp.FeatureManagement.UpdateFeaturesDto", - "typeSimple": "Volo.Abp.FeatureManagement.UpdateFeaturesDto", + "name": "login", + "typeAsString": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo, Volo.Abp.Account.Web", + "type": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo", + "typeSimple": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo", "isOptional": false, "defaultValue": null } ], "parameters": [ { - "nameOnMethod": "providerName", - "name": "providerName", + "nameOnMethod": "login", + "name": "login", "jsonName": null, - "type": "System.String", - "typeSimple": "string", + "type": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo", + "typeSimple": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo", "isOptional": false, "defaultValue": null, "constraintTypes": null, - "bindingSourceId": "ModelBinding", + "bindingSourceId": "Body", "descriptorName": "" - }, + } + ], + "returnValue": { + "type": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.AbpLoginResult", + "typeSimple": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.AbpLoginResult" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Account.Web.Areas.Account.Controllers.AccountController" + }, + "Logout": { + "uniqueName": "Logout", + "name": "Logout", + "httpMethod": "GET", + "url": "api/account/logout", + "supportedVersions": [], + "parametersOnMethod": [], + "parameters": [], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Account.Web.Areas.Account.Controllers.AccountController" + }, + "CheckPasswordByLogin": { + "uniqueName": "CheckPasswordByLogin", + "name": "CheckPassword", + "httpMethod": "POST", + "url": "api/account/check-password", + "supportedVersions": [], + "parametersOnMethod": [ { - "nameOnMethod": "providerKey", - "name": "providerKey", + "name": "login", + "typeAsString": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo, Volo.Abp.Account.Web", + "type": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo", + "typeSimple": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "login", + "name": "login", "jsonName": null, - "type": "System.String", - "typeSimple": "string", + "type": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo", + "typeSimple": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo", "isOptional": false, "defaultValue": null, "constraintTypes": null, - "bindingSourceId": "ModelBinding", + "bindingSourceId": "Body", "descriptorName": "" - }, + } + ], + "returnValue": { + "type": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.AbpLoginResult", + "typeSimple": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.AbpLoginResult" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Account.Web.Areas.Account.Controllers.AccountController" + } + } + } + } + }, + "settingManagement": { + "rootPath": "settingManagement", + "remoteServiceName": "SettingManagement", + "controllers": { + "Volo.Abp.SettingManagement.EmailSettingsController": { + "controllerName": "EmailSettings", + "controllerGroupName": "EmailSettings", + "type": "Volo.Abp.SettingManagement.EmailSettingsController", + "interfaces": [ + { + "type": "Volo.Abp.SettingManagement.IEmailSettingsAppService" + } + ], + "actions": { + "GetAsync": { + "uniqueName": "GetAsync", + "name": "GetAsync", + "httpMethod": "GET", + "url": "api/setting-management/emailing", + "supportedVersions": [], + "parametersOnMethod": [], + "parameters": [], + "returnValue": { + "type": "Volo.Abp.SettingManagement.EmailSettingsDto", + "typeSimple": "Volo.Abp.SettingManagement.EmailSettingsDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.SettingManagement.IEmailSettingsAppService" + }, + "UpdateAsyncByInput": { + "uniqueName": "UpdateAsyncByInput", + "name": "UpdateAsync", + "httpMethod": "POST", + "url": "api/setting-management/emailing", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "Volo.Abp.SettingManagement.UpdateEmailSettingsDto, Volo.Abp.SettingManagement.Application.Contracts", + "type": "Volo.Abp.SettingManagement.UpdateEmailSettingsDto", + "typeSimple": "Volo.Abp.SettingManagement.UpdateEmailSettingsDto", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ { "nameOnMethod": "input", "name": "input", "jsonName": null, - "type": "Volo.Abp.FeatureManagement.UpdateFeaturesDto", - "typeSimple": "Volo.Abp.FeatureManagement.UpdateFeaturesDto", + "type": "Volo.Abp.SettingManagement.UpdateEmailSettingsDto", + "typeSimple": "Volo.Abp.SettingManagement.UpdateEmailSettingsDto", "isOptional": false, "defaultValue": null, "constraintTypes": null, @@ -527,7 +834,8 @@ "type": "System.Void", "typeSimple": "System.Void" }, - "allowAnonymous": null + "allowAnonymous": null, + "implementFrom": "Volo.Abp.SettingManagement.IEmailSettingsAppService" } } } @@ -539,6 +847,7 @@ "controllers": { "Volo.Abp.PermissionManagement.PermissionsController": { "controllerName": "Permissions", + "controllerGroupName": "Permissions", "type": "Volo.Abp.PermissionManagement.PermissionsController", "interfaces": [ { @@ -600,7 +909,8 @@ "type": "Volo.Abp.PermissionManagement.GetPermissionListResultDto", "typeSimple": "Volo.Abp.PermissionManagement.GetPermissionListResultDto" }, - "allowAnonymous": null + "allowAnonymous": null, + "implementFrom": "Volo.Abp.PermissionManagement.IPermissionAppService" }, "UpdateAsyncByProviderNameAndProviderKeyAndInput": { "uniqueName": "UpdateAsyncByProviderNameAndProviderKeyAndInput", @@ -676,7 +986,8 @@ "type": "System.Void", "typeSimple": "System.Void" }, - "allowAnonymous": null + "allowAnonymous": null, + "implementFrom": "Volo.Abp.PermissionManagement.IPermissionAppService" } } } @@ -688,6 +999,7 @@ "controllers": { "Pages.Abp.MultiTenancy.AbpTenantController": { "controllerName": "AbpTenant", + "controllerGroupName": "AbpTenant", "type": "Pages.Abp.MultiTenancy.AbpTenantController", "interfaces": [ { @@ -729,7 +1041,8 @@ "type": "Volo.Abp.AspNetCore.Mvc.MultiTenancy.FindTenantResultDto", "typeSimple": "Volo.Abp.AspNetCore.Mvc.MultiTenancy.FindTenantResultDto" }, - "allowAnonymous": null + "allowAnonymous": null, + "implementFrom": "Volo.Abp.AspNetCore.Mvc.MultiTenancy.IAbpTenantAppService" }, "FindTenantByIdAsyncById": { "uniqueName": "FindTenantByIdAsyncById", @@ -765,12 +1078,14 @@ "type": "Volo.Abp.AspNetCore.Mvc.MultiTenancy.FindTenantResultDto", "typeSimple": "Volo.Abp.AspNetCore.Mvc.MultiTenancy.FindTenantResultDto" }, - "allowAnonymous": null + "allowAnonymous": null, + "implementFrom": "Volo.Abp.AspNetCore.Mvc.MultiTenancy.IAbpTenantAppService" } } }, "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationController": { "controllerName": "AbpApplicationConfiguration", + "controllerGroupName": "AbpApplicationConfiguration", "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationController", "interfaces": [ { @@ -790,12 +1105,14 @@ "type": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationConfigurationDto", "typeSimple": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationConfigurationDto" }, - "allowAnonymous": null + "allowAnonymous": null, + "implementFrom": "Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.IAbpApplicationConfigurationAppService" } } }, "Volo.Abp.AspNetCore.Mvc.ApiExploring.AbpApiDefinitionController": { "controllerName": "AbpApiDefinition", + "controllerGroupName": "AbpApiDefinition", "type": "Volo.Abp.AspNetCore.Mvc.ApiExploring.AbpApiDefinitionController", "interfaces": [], "actions": { @@ -825,82 +1142,16 @@ "isOptional": false, "defaultValue": null, "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "model" - } - ], - "returnValue": { - "type": "Volo.Abp.Http.Modeling.ApplicationApiDescriptionModel", - "typeSimple": "Volo.Abp.Http.Modeling.ApplicationApiDescriptionModel" - }, - "allowAnonymous": null - } - } - } - } - }, - "settingManagement": { - "rootPath": "settingManagement", - "remoteServiceName": "SettingManagement", - "controllers": { - "Volo.Abp.SettingManagement.EmailSettingsController": { - "controllerName": "EmailSettings", - "type": "Volo.Abp.SettingManagement.EmailSettingsController", - "interfaces": [ - { - "type": "Volo.Abp.SettingManagement.IEmailSettingsAppService" - } - ], - "actions": { - "GetAsync": { - "uniqueName": "GetAsync", - "name": "GetAsync", - "httpMethod": "GET", - "url": "api/setting-management/emailing", - "supportedVersions": [], - "parametersOnMethod": [], - "parameters": [], - "returnValue": { - "type": "Volo.Abp.SettingManagement.EmailSettingsDto", - "typeSimple": "Volo.Abp.SettingManagement.EmailSettingsDto" - }, - "allowAnonymous": null - }, - "UpdateAsyncByInput": { - "uniqueName": "UpdateAsyncByInput", - "name": "UpdateAsync", - "httpMethod": "POST", - "url": "api/setting-management/emailing", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "input", - "typeAsString": "Volo.Abp.SettingManagement.UpdateEmailSettingsDto, Volo.Abp.SettingManagement.Application.Contracts", - "type": "Volo.Abp.SettingManagement.UpdateEmailSettingsDto", - "typeSimple": "Volo.Abp.SettingManagement.UpdateEmailSettingsDto", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "input", - "name": "input", - "jsonName": null, - "type": "Volo.Abp.SettingManagement.UpdateEmailSettingsDto", - "typeSimple": "Volo.Abp.SettingManagement.UpdateEmailSettingsDto", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Body", - "descriptorName": "" + "bindingSourceId": "ModelBinding", + "descriptorName": "model" } ], "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" + "type": "Volo.Abp.Http.Modeling.ApplicationApiDescriptionModel", + "typeSimple": "Volo.Abp.Http.Modeling.ApplicationApiDescriptionModel" }, - "allowAnonymous": null + "allowAnonymous": null, + "implementFrom": "Volo.Abp.AspNetCore.Mvc.ApiExploring.AbpApiDefinitionController" } } } @@ -912,6 +1163,7 @@ "controllers": { "Volo.Abp.Identity.IdentityRoleController": { "controllerName": "IdentityRole", + "controllerGroupName": "Role", "type": "Volo.Abp.Identity.IdentityRoleController", "interfaces": [ { @@ -931,7 +1183,8 @@ "type": "Volo.Abp.Application.Dtos.ListResultDto", "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" }, - "allowAnonymous": null + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Identity.IIdentityRoleAppService" }, "GetListAsyncByInput": { "uniqueName": "GetListAsyncByInput", @@ -1003,7 +1256,8 @@ "type": "Volo.Abp.Application.Dtos.PagedResultDto", "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" }, - "allowAnonymous": null + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.IReadOnlyAppService" }, "GetAsyncById": { "uniqueName": "GetAsyncById", @@ -1039,7 +1293,8 @@ "type": "Volo.Abp.Identity.IdentityRoleDto", "typeSimple": "Volo.Abp.Identity.IdentityRoleDto" }, - "allowAnonymous": null + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.IReadOnlyAppService" }, "CreateAsyncByInput": { "uniqueName": "CreateAsyncByInput", @@ -1075,7 +1330,8 @@ "type": "Volo.Abp.Identity.IdentityRoleDto", "typeSimple": "Volo.Abp.Identity.IdentityRoleDto" }, - "allowAnonymous": null + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.ICreateAppService" }, "UpdateAsyncByIdAndInput": { "uniqueName": "UpdateAsyncByIdAndInput", @@ -1131,7 +1387,8 @@ "type": "Volo.Abp.Identity.IdentityRoleDto", "typeSimple": "Volo.Abp.Identity.IdentityRoleDto" }, - "allowAnonymous": null + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.IUpdateAppService" }, "DeleteAsyncById": { "uniqueName": "DeleteAsyncById", @@ -1167,12 +1424,14 @@ "type": "System.Void", "typeSimple": "System.Void" }, - "allowAnonymous": null + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.IDeleteAppService" } } }, "Volo.Abp.Identity.IdentityUserController": { "controllerName": "IdentityUser", + "controllerGroupName": "User", "type": "Volo.Abp.Identity.IdentityUserController", "interfaces": [ { @@ -1214,7 +1473,8 @@ "type": "Volo.Abp.Identity.IdentityUserDto", "typeSimple": "Volo.Abp.Identity.IdentityUserDto" }, - "allowAnonymous": null + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.IReadOnlyAppService" }, "GetListAsyncByInput": { "uniqueName": "GetListAsyncByInput", @@ -1286,7 +1546,8 @@ "type": "Volo.Abp.Application.Dtos.PagedResultDto", "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" }, - "allowAnonymous": null + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.IReadOnlyAppService" }, "CreateAsyncByInput": { "uniqueName": "CreateAsyncByInput", @@ -1322,7 +1583,8 @@ "type": "Volo.Abp.Identity.IdentityUserDto", "typeSimple": "Volo.Abp.Identity.IdentityUserDto" }, - "allowAnonymous": null + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.ICreateAppService" }, "UpdateAsyncByIdAndInput": { "uniqueName": "UpdateAsyncByIdAndInput", @@ -1378,7 +1640,8 @@ "type": "Volo.Abp.Identity.IdentityUserDto", "typeSimple": "Volo.Abp.Identity.IdentityUserDto" }, - "allowAnonymous": null + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.IUpdateAppService" }, "DeleteAsyncById": { "uniqueName": "DeleteAsyncById", @@ -1414,7 +1677,8 @@ "type": "System.Void", "typeSimple": "System.Void" }, - "allowAnonymous": null + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Application.Services.IDeleteAppService" }, "GetRolesAsyncById": { "uniqueName": "GetRolesAsyncById", @@ -1450,7 +1714,8 @@ "type": "Volo.Abp.Application.Dtos.ListResultDto", "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" }, - "allowAnonymous": null + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Identity.IIdentityUserAppService" }, "GetAssignableRolesAsync": { "uniqueName": "GetAssignableRolesAsync", @@ -1464,7 +1729,8 @@ "type": "Volo.Abp.Application.Dtos.ListResultDto", "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" }, - "allowAnonymous": null + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Identity.IIdentityUserAppService" }, "UpdateRolesAsyncByIdAndInput": { "uniqueName": "UpdateRolesAsyncByIdAndInput", @@ -1520,7 +1786,8 @@ "type": "System.Void", "typeSimple": "System.Void" }, - "allowAnonymous": null + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Identity.IIdentityUserAppService" }, "FindByUsernameAsyncByUserName": { "uniqueName": "FindByUsernameAsyncByUserName", @@ -1556,7 +1823,8 @@ "type": "Volo.Abp.Identity.IdentityUserDto", "typeSimple": "Volo.Abp.Identity.IdentityUserDto" }, - "allowAnonymous": null + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Identity.IIdentityUserAppService" }, "FindByEmailAsyncByEmail": { "uniqueName": "FindByEmailAsyncByEmail", @@ -1592,12 +1860,14 @@ "type": "Volo.Abp.Identity.IdentityUserDto", "typeSimple": "Volo.Abp.Identity.IdentityUserDto" }, - "allowAnonymous": null + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Identity.IIdentityUserAppService" } } }, "Volo.Abp.Identity.IdentityUserLookupController": { "controllerName": "IdentityUserLookup", + "controllerGroupName": "UserLookup", "type": "Volo.Abp.Identity.IdentityUserLookupController", "interfaces": [ { @@ -1639,7 +1909,8 @@ "type": "Volo.Abp.Users.UserData", "typeSimple": "Volo.Abp.Users.UserData" }, - "allowAnonymous": null + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Identity.IIdentityUserLookupAppService" }, "FindByUserNameAsyncByUserName": { "uniqueName": "FindByUserNameAsyncByUserName", @@ -1675,7 +1946,8 @@ "type": "Volo.Abp.Users.UserData", "typeSimple": "Volo.Abp.Users.UserData" }, - "allowAnonymous": null + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Identity.IIdentityUserLookupAppService" }, "SearchAsyncByInput": { "uniqueName": "SearchAsyncByInput", @@ -1741,269 +2013,27 @@ "constraintTypes": null, "bindingSourceId": "ModelBinding", "descriptorName": "input" - } - ], - "returnValue": { - "type": "Volo.Abp.Application.Dtos.ListResultDto", - "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" - }, - "allowAnonymous": null - }, - "GetCountAsyncByInput": { - "uniqueName": "GetCountAsyncByInput", - "name": "GetCountAsync", - "httpMethod": "GET", - "url": "api/identity/users/lookup/count", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "input", - "typeAsString": "Volo.Abp.Identity.UserLookupCountInputDto, Volo.Abp.Identity.Application.Contracts", - "type": "Volo.Abp.Identity.UserLookupCountInputDto", - "typeSimple": "Volo.Abp.Identity.UserLookupCountInputDto", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "input", - "name": "Filter", - "jsonName": null, - "type": "System.String", - "typeSimple": "string", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "ModelBinding", - "descriptorName": "input" - } - ], - "returnValue": { - "type": "System.Int64", - "typeSimple": "number" - }, - "allowAnonymous": null - } - } - }, - "Volo.Abp.Identity.ProfileController": { - "controllerName": "Profile", - "type": "Volo.Abp.Identity.ProfileController", - "interfaces": [ - { - "type": "Volo.Abp.Identity.IProfileAppService" - } - ], - "actions": { - "GetAsync": { - "uniqueName": "GetAsync", - "name": "GetAsync", - "httpMethod": "GET", - "url": "api/identity/my-profile", - "supportedVersions": [], - "parametersOnMethod": [], - "parameters": [], - "returnValue": { - "type": "Volo.Abp.Identity.ProfileDto", - "typeSimple": "Volo.Abp.Identity.ProfileDto" - }, - "allowAnonymous": null - }, - "UpdateAsyncByInput": { - "uniqueName": "UpdateAsyncByInput", - "name": "UpdateAsync", - "httpMethod": "PUT", - "url": "api/identity/my-profile", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "input", - "typeAsString": "Volo.Abp.Identity.UpdateProfileDto, Volo.Abp.Identity.Application.Contracts", - "type": "Volo.Abp.Identity.UpdateProfileDto", - "typeSimple": "Volo.Abp.Identity.UpdateProfileDto", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "input", - "name": "input", - "jsonName": null, - "type": "Volo.Abp.Identity.UpdateProfileDto", - "typeSimple": "Volo.Abp.Identity.UpdateProfileDto", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Body", - "descriptorName": "" - } - ], - "returnValue": { - "type": "Volo.Abp.Identity.ProfileDto", - "typeSimple": "Volo.Abp.Identity.ProfileDto" - }, - "allowAnonymous": null - }, - "ChangePasswordAsyncByInput": { - "uniqueName": "ChangePasswordAsyncByInput", - "name": "ChangePasswordAsync", - "httpMethod": "POST", - "url": "api/identity/my-profile/change-password", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "input", - "typeAsString": "Volo.Abp.Identity.ChangePasswordInput, Volo.Abp.Identity.Application.Contracts", - "type": "Volo.Abp.Identity.ChangePasswordInput", - "typeSimple": "Volo.Abp.Identity.ChangePasswordInput", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "input", - "name": "input", - "jsonName": null, - "type": "Volo.Abp.Identity.ChangePasswordInput", - "typeSimple": "Volo.Abp.Identity.ChangePasswordInput", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Body", - "descriptorName": "" - } - ], - "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" - }, - "allowAnonymous": null - } - } - } - } - }, - "account": { - "rootPath": "account", - "remoteServiceName": "AbpAccount", - "controllers": { - "Volo.Abp.Account.Web.Areas.Account.Controllers.AccountController": { - "controllerName": "Account", - "type": "Volo.Abp.Account.Web.Areas.Account.Controllers.AccountController", - "interfaces": [], - "actions": { - "LoginByLogin": { - "uniqueName": "LoginByLogin", - "name": "Login", - "httpMethod": "POST", - "url": "api/account/login", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "login", - "typeAsString": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo, Volo.Abp.Account.Web", - "type": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo", - "typeSimple": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "login", - "name": "login", - "jsonName": null, - "type": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo", - "typeSimple": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Body", - "descriptorName": "" - } - ], - "returnValue": { - "type": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.AbpLoginResult", - "typeSimple": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.AbpLoginResult" - }, - "allowAnonymous": null - }, - "Logout": { - "uniqueName": "Logout", - "name": "Logout", - "httpMethod": "GET", - "url": "api/account/logout", - "supportedVersions": [], - "parametersOnMethod": [], - "parameters": [], - "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" - }, - "allowAnonymous": null - }, - "CheckPasswordByLogin": { - "uniqueName": "CheckPasswordByLogin", - "name": "CheckPassword", - "httpMethod": "POST", - "url": "api/account/check-password", - "supportedVersions": [], - "parametersOnMethod": [ - { - "name": "login", - "typeAsString": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo, Volo.Abp.Account.Web", - "type": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo", - "typeSimple": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo", - "isOptional": false, - "defaultValue": null - } - ], - "parameters": [ - { - "nameOnMethod": "login", - "name": "login", - "jsonName": null, - "type": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo", - "typeSimple": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo", - "isOptional": false, - "defaultValue": null, - "constraintTypes": null, - "bindingSourceId": "Body", - "descriptorName": "" - } - ], - "returnValue": { - "type": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.AbpLoginResult", - "typeSimple": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.AbpLoginResult" - }, - "allowAnonymous": null - } - } - }, - "Volo.Abp.Account.AccountController": { - "controllerName": "Account", - "type": "Volo.Abp.Account.AccountController", - "interfaces": [ - { - "type": "Volo.Abp.Account.IAccountAppService" - } - ], - "actions": { - "RegisterAsyncByInput": { - "uniqueName": "RegisterAsyncByInput", - "name": "RegisterAsync", - "httpMethod": "POST", - "url": "api/account/register", + } + ], + "returnValue": { + "type": "Volo.Abp.Application.Dtos.ListResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Identity.IIdentityUserLookupAppService" + }, + "GetCountAsyncByInput": { + "uniqueName": "GetCountAsyncByInput", + "name": "GetCountAsync", + "httpMethod": "GET", + "url": "api/identity/users/lookup/count", "supportedVersions": [], "parametersOnMethod": [ { "name": "input", - "typeAsString": "Volo.Abp.Account.RegisterDto, Volo.Abp.Account.Application.Contracts", - "type": "Volo.Abp.Account.RegisterDto", - "typeSimple": "Volo.Abp.Account.RegisterDto", + "typeAsString": "Volo.Abp.Identity.UserLookupCountInputDto, Volo.Abp.Identity.Application.Contracts", + "type": "Volo.Abp.Identity.UserLookupCountInputDto", + "typeSimple": "Volo.Abp.Identity.UserLookupCountInputDto", "isOptional": false, "defaultValue": null } @@ -2011,35 +2041,63 @@ "parameters": [ { "nameOnMethod": "input", - "name": "input", + "name": "Filter", "jsonName": null, - "type": "Volo.Abp.Account.RegisterDto", - "typeSimple": "Volo.Abp.Account.RegisterDto", + "type": "System.String", + "typeSimple": "string", "isOptional": false, "defaultValue": null, "constraintTypes": null, - "bindingSourceId": "Body", - "descriptorName": "" + "bindingSourceId": "ModelBinding", + "descriptorName": "input" } ], "returnValue": { - "type": "Volo.Abp.Identity.IdentityUserDto", - "typeSimple": "Volo.Abp.Identity.IdentityUserDto" + "type": "System.Int64", + "typeSimple": "number" }, - "allowAnonymous": null + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Identity.IIdentityUserLookupAppService" + } + } + }, + "Volo.Abp.Identity.ProfileController": { + "controllerName": "Profile", + "controllerGroupName": "Profile", + "type": "Volo.Abp.Identity.ProfileController", + "interfaces": [ + { + "type": "Volo.Abp.Identity.IProfileAppService" + } + ], + "actions": { + "GetAsync": { + "uniqueName": "GetAsync", + "name": "GetAsync", + "httpMethod": "GET", + "url": "api/identity/my-profile", + "supportedVersions": [], + "parametersOnMethod": [], + "parameters": [], + "returnValue": { + "type": "Volo.Abp.Identity.ProfileDto", + "typeSimple": "Volo.Abp.Identity.ProfileDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Identity.IProfileAppService" }, - "SendPasswordResetCodeAsyncByInput": { - "uniqueName": "SendPasswordResetCodeAsyncByInput", - "name": "SendPasswordResetCodeAsync", - "httpMethod": "POST", - "url": "api/account/send-password-reset-code", + "UpdateAsyncByInput": { + "uniqueName": "UpdateAsyncByInput", + "name": "UpdateAsync", + "httpMethod": "PUT", + "url": "api/identity/my-profile", "supportedVersions": [], "parametersOnMethod": [ { "name": "input", - "typeAsString": "Volo.Abp.Account.SendPasswordResetCodeDto, Volo.Abp.Account.Application.Contracts", - "type": "Volo.Abp.Account.SendPasswordResetCodeDto", - "typeSimple": "Volo.Abp.Account.SendPasswordResetCodeDto", + "typeAsString": "Volo.Abp.Identity.UpdateProfileDto, Volo.Abp.Identity.Application.Contracts", + "type": "Volo.Abp.Identity.UpdateProfileDto", + "typeSimple": "Volo.Abp.Identity.UpdateProfileDto", "isOptional": false, "defaultValue": null } @@ -2049,8 +2107,8 @@ "nameOnMethod": "input", "name": "input", "jsonName": null, - "type": "Volo.Abp.Account.SendPasswordResetCodeDto", - "typeSimple": "Volo.Abp.Account.SendPasswordResetCodeDto", + "type": "Volo.Abp.Identity.UpdateProfileDto", + "typeSimple": "Volo.Abp.Identity.UpdateProfileDto", "isOptional": false, "defaultValue": null, "constraintTypes": null, @@ -2059,23 +2117,24 @@ } ], "returnValue": { - "type": "System.Void", - "typeSimple": "System.Void" + "type": "Volo.Abp.Identity.ProfileDto", + "typeSimple": "Volo.Abp.Identity.ProfileDto" }, - "allowAnonymous": null + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Identity.IProfileAppService" }, - "ResetPasswordAsyncByInput": { - "uniqueName": "ResetPasswordAsyncByInput", - "name": "ResetPasswordAsync", + "ChangePasswordAsyncByInput": { + "uniqueName": "ChangePasswordAsyncByInput", + "name": "ChangePasswordAsync", "httpMethod": "POST", - "url": "api/account/reset-password", + "url": "api/identity/my-profile/change-password", "supportedVersions": [], "parametersOnMethod": [ { "name": "input", - "typeAsString": "Volo.Abp.Account.ResetPasswordDto, Volo.Abp.Account.Application.Contracts", - "type": "Volo.Abp.Account.ResetPasswordDto", - "typeSimple": "Volo.Abp.Account.ResetPasswordDto", + "typeAsString": "Volo.Abp.Identity.ChangePasswordInput, Volo.Abp.Identity.Application.Contracts", + "type": "Volo.Abp.Identity.ChangePasswordInput", + "typeSimple": "Volo.Abp.Identity.ChangePasswordInput", "isOptional": false, "defaultValue": null } @@ -2085,8 +2144,8 @@ "nameOnMethod": "input", "name": "input", "jsonName": null, - "type": "Volo.Abp.Account.ResetPasswordDto", - "typeSimple": "Volo.Abp.Account.ResetPasswordDto", + "type": "Volo.Abp.Identity.ChangePasswordInput", + "typeSimple": "Volo.Abp.Identity.ChangePasswordInput", "isOptional": false, "defaultValue": null, "constraintTypes": null, @@ -2098,7 +2157,8 @@ "type": "System.Void", "typeSimple": "System.Void" }, - "allowAnonymous": null + "allowAnonymous": null, + "implementFrom": "Volo.Abp.Identity.IProfileAppService" } } } @@ -2106,79 +2166,6 @@ } }, "types": { - "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "UserNameOrEmailAddress", - "jsonName": null, - "type": "System.String", - "typeSimple": "string", - "isRequired": true - }, - { - "name": "Password", - "jsonName": null, - "type": "System.String", - "typeSimple": "string", - "isRequired": true - }, - { - "name": "RememberMe", - "jsonName": null, - "type": "System.Boolean", - "typeSimple": "boolean", - "isRequired": false - } - ] - }, - "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.AbpLoginResult": { - "baseType": null, - "isEnum": false, - "enumNames": null, - "enumValues": null, - "genericArguments": null, - "properties": [ - { - "name": "Result", - "jsonName": null, - "type": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.LoginResultType", - "typeSimple": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.LoginResultType", - "isRequired": false - }, - { - "name": "Description", - "jsonName": null, - "type": "System.String", - "typeSimple": "string", - "isRequired": false - } - ] - }, - "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.LoginResultType": { - "baseType": "System.Enum", - "isEnum": true, - "enumNames": [ - "Success", - "InvalidUserNameOrPassword", - "NotAllowed", - "LockedOut", - "RequiresTwoFactor" - ], - "enumValues": [ - 1, - 2, - 3, - 4, - 5 - ], - "genericArguments": null, - "properties": null - }, "Volo.Abp.Account.RegisterDto": { "baseType": "Volo.Abp.ObjectExtending.ExtensibleObject", "isEnum": false, @@ -2485,6 +2472,79 @@ } ] }, + "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo": { + "baseType": null, + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "UserNameOrEmailAddress", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": true + }, + { + "name": "Password", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": true + }, + { + "name": "RememberMe", + "jsonName": null, + "type": "System.Boolean", + "typeSimple": "boolean", + "isRequired": false + } + ] + }, + "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.AbpLoginResult": { + "baseType": null, + "isEnum": false, + "enumNames": null, + "enumValues": null, + "genericArguments": null, + "properties": [ + { + "name": "Result", + "jsonName": null, + "type": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.LoginResultType", + "typeSimple": "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.LoginResultType", + "isRequired": false + }, + { + "name": "Description", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + } + ] + }, + "Volo.Abp.Account.Web.Areas.Account.Controllers.Models.LoginResultType": { + "baseType": "System.Enum", + "isEnum": true, + "enumNames": [ + "Success", + "InvalidUserNameOrPassword", + "NotAllowed", + "LockedOut", + "RequiresTwoFactor" + ], + "enumValues": [ + 1, + 2, + 3, + 4, + 5 + ], + "genericArguments": null, + "properties": null + }, "Volo.Abp.AspNetCore.Mvc.MultiTenancy.FindTenantResultDto": { "baseType": null, "isEnum": false, @@ -4868,6 +4928,13 @@ "typeSimple": "string", "isRequired": false }, + { + "name": "ControllerGroupName", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false + }, { "name": "Type", "jsonName": null, @@ -4976,6 +5043,13 @@ "type": "System.Boolean?", "typeSimple": "boolean?", "isRequired": false + }, + { + "name": "ImplementFrom", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isRequired": false } ] }, diff --git a/npm/ng-packs/packages/tenant-management/src/lib/proxy/index.ts b/npm/ng-packs/packages/tenant-management/proxy/src/lib/proxy/index.ts similarity index 100% rename from npm/ng-packs/packages/tenant-management/src/lib/proxy/index.ts rename to npm/ng-packs/packages/tenant-management/proxy/src/lib/proxy/index.ts diff --git a/npm/ng-packs/packages/tenant-management/src/lib/proxy/models.ts b/npm/ng-packs/packages/tenant-management/proxy/src/lib/proxy/models.ts similarity index 100% rename from npm/ng-packs/packages/tenant-management/src/lib/proxy/models.ts rename to npm/ng-packs/packages/tenant-management/proxy/src/lib/proxy/models.ts diff --git a/npm/ng-packs/packages/tenant-management/proxy/src/lib/proxy/tenant.service.ts b/npm/ng-packs/packages/tenant-management/proxy/src/lib/proxy/tenant.service.ts new file mode 100644 index 0000000000..61d1667be4 --- /dev/null +++ b/npm/ng-packs/packages/tenant-management/proxy/src/lib/proxy/tenant.service.ts @@ -0,0 +1,74 @@ +import type { GetTenantsInput, TenantCreateDto, TenantDto, TenantUpdateDto } from './models'; +import { RestService } from '@abp/ng.core'; +import type { PagedResultDto } from '@abp/ng.core'; +import { Injectable } from '@angular/core'; + +@Injectable({ + providedIn: 'root', +}) +export class TenantService { + apiName = 'AbpTenantManagement'; + + create = (input: TenantCreateDto) => + this.restService.request({ + method: 'POST', + url: '/api/multi-tenancy/tenants', + body: input, + }, + { apiName: this.apiName }); + + delete = (id: string) => + this.restService.request({ + method: 'DELETE', + url: `/api/multi-tenancy/tenants/${id}`, + }, + { apiName: this.apiName }); + + deleteDefaultConnectionString = (id: string) => + this.restService.request({ + method: 'DELETE', + url: `/api/multi-tenancy/tenants/${id}/default-connection-string`, + }, + { apiName: this.apiName }); + + get = (id: string) => + this.restService.request({ + method: 'GET', + url: `/api/multi-tenancy/tenants/${id}`, + }, + { apiName: this.apiName }); + + getDefaultConnectionString = (id: string) => + this.restService.request({ + method: 'GET', + responseType: 'text', + url: `/api/multi-tenancy/tenants/${id}/default-connection-string`, + }, + { apiName: this.apiName }); + + getList = (input: GetTenantsInput) => + this.restService.request>({ + method: 'GET', + url: '/api/multi-tenancy/tenants', + params: { filter: input.filter, sorting: input.sorting, skipCount: input.skipCount, maxResultCount: input.maxResultCount }, + }, + { apiName: this.apiName }); + + update = (id: string, input: TenantUpdateDto) => + this.restService.request({ + method: 'PUT', + url: `/api/multi-tenancy/tenants/${id}`, + body: input, + }, + { apiName: this.apiName }); + + updateDefaultConnectionString = (id: string, defaultConnectionString: string) => + this.restService.request({ + method: 'PUT', + url: `/api/multi-tenancy/tenants/${id}/default-connection-string`, + params: { defaultConnectionString }, + }, + { apiName: this.apiName }); + + constructor(private restService: RestService) {} +} diff --git a/npm/ng-packs/packages/tenant-management/proxy/src/public-api.ts b/npm/ng-packs/packages/tenant-management/proxy/src/public-api.ts new file mode 100644 index 0000000000..11aece60c4 --- /dev/null +++ b/npm/ng-packs/packages/tenant-management/proxy/src/public-api.ts @@ -0,0 +1 @@ +export * from './lib/index'; diff --git a/npm/ng-packs/packages/tenant-management/src/lib/components/tenants/tenants.component.html b/npm/ng-packs/packages/tenant-management/src/lib/components/tenants/tenants.component.html index ff2703a2e7..1fe64b0f91 100644 --- a/npm/ng-packs/packages/tenant-management/src/lib/components/tenants/tenants.component.html +++ b/npm/ng-packs/packages/tenant-management/src/lib/components/tenants/tenants.component.html @@ -30,13 +30,12 @@ - +

                                                          {{ - selected?.id - ? 'AbpTenantManagement::Edit' - : ('AbpTenantManagement::NewTenant' | abpLocalization) + (selected?.id ? 'AbpTenantManagement::Edit' : 'AbpTenantManagement::NewTenant') + | abpLocalization }}

                                                          diff --git a/npm/ng-packs/packages/tenant-management/src/lib/components/tenants/tenants.component.ts b/npm/ng-packs/packages/tenant-management/src/lib/components/tenants/tenants.component.ts index 991354103c..b3ebca01b1 100644 --- a/npm/ng-packs/packages/tenant-management/src/lib/components/tenants/tenants.component.ts +++ b/npm/ng-packs/packages/tenant-management/src/lib/components/tenants/tenants.component.ts @@ -1,5 +1,6 @@ import { ListService, PagedResultDto } from '@abp/ng.core'; import { eFeatureManagementComponents } from '@abp/ng.feature-management'; +import { GetTenantsInput, TenantDto, TenantService } from '@abp/ng.tenant-management/proxy'; import { Confirmation, ConfirmationService } from '@abp/ng.theme.shared'; import { EXTENSIONS_IDENTIFIER, @@ -10,8 +11,6 @@ import { Component, Injector, OnInit } from '@angular/core'; import { FormBuilder, FormGroup } from '@angular/forms'; import { finalize } from 'rxjs/operators'; import { eTenantManagementComponents } from '../../enums/components'; -import { GetTenantsInput, TenantDto } from '../../proxy/models'; -import { TenantService } from '../../proxy/tenant.service'; @Component({ selector: 'abp-tenants', diff --git a/npm/ng-packs/packages/tenant-management/src/lib/defaults/default-tenants-entity-actions.ts b/npm/ng-packs/packages/tenant-management/src/lib/defaults/default-tenants-entity-actions.ts index 715dbd1a1b..6cb5fe7d26 100644 --- a/npm/ng-packs/packages/tenant-management/src/lib/defaults/default-tenants-entity-actions.ts +++ b/npm/ng-packs/packages/tenant-management/src/lib/defaults/default-tenants-entity-actions.ts @@ -1,6 +1,6 @@ +import { TenantDto } from '@abp/ng.tenant-management/proxy'; import { EntityAction } from '@abp/ng.theme.shared/extensions'; import { TenantsComponent } from '../components/tenants/tenants.component'; -import { TenantDto } from '../proxy/models'; export const DEFAULT_TENANTS_ENTITY_ACTIONS = EntityAction.createMany([ { diff --git a/npm/ng-packs/packages/tenant-management/src/lib/defaults/default-tenants-entity-props.ts b/npm/ng-packs/packages/tenant-management/src/lib/defaults/default-tenants-entity-props.ts index 31de557fde..8eacec5623 100644 --- a/npm/ng-packs/packages/tenant-management/src/lib/defaults/default-tenants-entity-props.ts +++ b/npm/ng-packs/packages/tenant-management/src/lib/defaults/default-tenants-entity-props.ts @@ -1,5 +1,5 @@ +import { TenantDto } from '@abp/ng.tenant-management/proxy'; import { EntityProp, ePropType } from '@abp/ng.theme.shared/extensions'; -import { TenantDto } from '../proxy/models'; export const DEFAULT_TENANTS_ENTITY_PROPS = EntityProp.createMany([ { diff --git a/npm/ng-packs/packages/tenant-management/src/lib/defaults/default-tenants-form-props.ts b/npm/ng-packs/packages/tenant-management/src/lib/defaults/default-tenants-form-props.ts index a17832113a..4086bdb5ef 100644 --- a/npm/ng-packs/packages/tenant-management/src/lib/defaults/default-tenants-form-props.ts +++ b/npm/ng-packs/packages/tenant-management/src/lib/defaults/default-tenants-form-props.ts @@ -1,7 +1,7 @@ +import { TenantCreateDto, TenantUpdateDto } from '@abp/ng.tenant-management/proxy'; import { getPasswordValidators } from '@abp/ng.theme.shared'; import { ePropType, FormProp } from '@abp/ng.theme.shared/extensions'; import { Validators } from '@angular/forms'; -import { TenantCreateDto, TenantUpdateDto } from '../proxy/models'; export const DEFAULT_TENANTS_CREATE_FORM_PROPS = FormProp.createMany< TenantCreateDto | TenantUpdateDto diff --git a/npm/ng-packs/packages/tenant-management/src/lib/defaults/default-tenants-toolbar-actions.ts b/npm/ng-packs/packages/tenant-management/src/lib/defaults/default-tenants-toolbar-actions.ts index 948294894d..e305186276 100644 --- a/npm/ng-packs/packages/tenant-management/src/lib/defaults/default-tenants-toolbar-actions.ts +++ b/npm/ng-packs/packages/tenant-management/src/lib/defaults/default-tenants-toolbar-actions.ts @@ -1,6 +1,6 @@ +import { TenantDto } from '@abp/ng.tenant-management/proxy'; import { ToolbarAction } from '@abp/ng.theme.shared/extensions'; import { TenantsComponent } from '../components/tenants/tenants.component'; -import { TenantDto } from '../proxy/models'; export const DEFAULT_TENANTS_TOOLBAR_ACTIONS = ToolbarAction.createMany([ { diff --git a/npm/ng-packs/packages/tenant-management/src/lib/models/config-options.ts b/npm/ng-packs/packages/tenant-management/src/lib/models/config-options.ts index 306162f6c5..684d7c49ea 100644 --- a/npm/ng-packs/packages/tenant-management/src/lib/models/config-options.ts +++ b/npm/ng-packs/packages/tenant-management/src/lib/models/config-options.ts @@ -1,3 +1,4 @@ +import { TenantCreateDto, TenantDto, TenantUpdateDto } from '@abp/ng.tenant-management/proxy'; import { CreateFormPropContributorCallback, EditFormPropContributorCallback, @@ -6,7 +7,6 @@ import { ToolbarActionContributorCallback, } from '@abp/ng.theme.shared/extensions'; import { eTenantManagementComponents } from '../enums/components'; -import { TenantCreateDto, TenantDto, TenantUpdateDto } from '../proxy/models'; export type TenantManagementEntityActionContributors = Partial<{ [eTenantManagementComponents.Tenants]: EntityActionContributorCallback[]; diff --git a/npm/ng-packs/packages/tenant-management/src/lib/models/tenant-management.ts b/npm/ng-packs/packages/tenant-management/src/lib/models/tenant-management.ts index 3771d94e23..5460df9cea 100644 --- a/npm/ng-packs/packages/tenant-management/src/lib/models/tenant-management.ts +++ b/npm/ng-packs/packages/tenant-management/src/lib/models/tenant-management.ts @@ -1,5 +1,5 @@ import { PagedResultDto } from '@abp/ng.core'; -import { TenantDto } from '../proxy/models'; +import { TenantDto } from '@abp/ng.tenant-management/proxy'; export namespace TenantManagement { export interface State { diff --git a/npm/ng-packs/packages/tenant-management/src/lib/proxy/tenant.service.ts b/npm/ng-packs/packages/tenant-management/src/lib/proxy/tenant.service.ts deleted file mode 100644 index 947a33957b..0000000000 --- a/npm/ng-packs/packages/tenant-management/src/lib/proxy/tenant.service.ts +++ /dev/null @@ -1,95 +0,0 @@ -import type { PagedResultDto } from '@abp/ng.core'; -import { RestService } from '@abp/ng.core'; -import { Injectable } from '@angular/core'; -import type { GetTenantsInput, TenantCreateDto, TenantDto, TenantUpdateDto } from './models'; - -@Injectable({ - providedIn: 'root', -}) -export class TenantService { - apiName = 'AbpTenantManagement'; - - create = (input: TenantCreateDto) => - this.restService.request( - { - method: 'POST', - url: '/api/multi-tenancy/tenants', - body: input, - }, - { apiName: this.apiName }, - ); - - delete = (id: string) => - this.restService.request( - { - method: 'DELETE', - url: `/api/multi-tenancy/tenants/${id}`, - }, - { apiName: this.apiName }, - ); - - deleteDefaultConnectionString = (id: string) => - this.restService.request( - { - method: 'DELETE', - url: `/api/multi-tenancy/tenants/${id}/default-connection-string`, - }, - { apiName: this.apiName }, - ); - - get = (id: string) => - this.restService.request( - { - method: 'GET', - url: `/api/multi-tenancy/tenants/${id}`, - }, - { apiName: this.apiName }, - ); - - getDefaultConnectionString = (id: string) => - this.restService.request( - { - method: 'GET', - responseType: 'text', - url: `/api/multi-tenancy/tenants/${id}/default-connection-string`, - }, - { apiName: this.apiName }, - ); - - getList = (input: GetTenantsInput) => - this.restService.request>( - { - method: 'GET', - url: '/api/multi-tenancy/tenants', - params: { - filter: input.filter, - sorting: input.sorting, - skipCount: input.skipCount, - maxResultCount: input.maxResultCount, - }, - }, - { apiName: this.apiName }, - ); - - update = (id: string, input: TenantUpdateDto) => - this.restService.request( - { - method: 'PUT', - url: `/api/multi-tenancy/tenants/${id}`, - body: input, - }, - { apiName: this.apiName }, - ); - - updateDefaultConnectionString = (id: string, defaultConnectionString: string) => - this.restService.request( - { - method: 'PUT', - url: `/api/multi-tenancy/tenants/${id}/default-connection-string`, - params: { defaultConnectionString }, - }, - { apiName: this.apiName }, - ); - - constructor(private restService: RestService) {} -} diff --git a/npm/ng-packs/packages/tenant-management/src/lib/tokens/extensions.token.ts b/npm/ng-packs/packages/tenant-management/src/lib/tokens/extensions.token.ts index fec18d94fc..666183fbaa 100644 --- a/npm/ng-packs/packages/tenant-management/src/lib/tokens/extensions.token.ts +++ b/npm/ng-packs/packages/tenant-management/src/lib/tokens/extensions.token.ts @@ -1,3 +1,4 @@ +import { TenantCreateDto, TenantDto, TenantUpdateDto } from '@abp/ng.tenant-management/proxy'; import { CreateFormPropContributorCallback, EditFormPropContributorCallback, @@ -14,7 +15,6 @@ import { } from '../defaults/default-tenants-form-props'; import { DEFAULT_TENANTS_TOOLBAR_ACTIONS } from '../defaults/default-tenants-toolbar-actions'; import { eTenantManagementComponents } from '../enums/components'; -import { TenantCreateDto, TenantDto, TenantUpdateDto } from '../proxy/models'; export const DEFAULT_TENANT_MANAGEMENT_ENTITY_ACTIONS = { [eTenantManagementComponents.Tenants]: DEFAULT_TENANTS_ENTITY_ACTIONS, diff --git a/npm/ng-packs/packages/tenant-management/src/public-api.ts b/npm/ng-packs/packages/tenant-management/src/public-api.ts index 55c8340e49..6321ce8fae 100644 --- a/npm/ng-packs/packages/tenant-management/src/public-api.ts +++ b/npm/ng-packs/packages/tenant-management/src/public-api.ts @@ -2,6 +2,5 @@ export * from './lib/components'; export * from './lib/enums'; export * from './lib/guards'; export * from './lib/models'; -export * from './lib/proxy'; export * from './lib/tenant-management.module'; export * from './lib/tokens'; diff --git a/npm/ng-packs/packages/tenant-management/tsconfig.json b/npm/ng-packs/packages/tenant-management/tsconfig.json index 62ebbd9464..546e940e20 100644 --- a/npm/ng-packs/packages/tenant-management/tsconfig.json +++ b/npm/ng-packs/packages/tenant-management/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../tsconfig.json", "files": [], "include": [], "references": [ diff --git a/npm/ng-packs/packages/theme-basic/src/lib/components/account-layout/tenant-box/tenant-box.component.html b/npm/ng-packs/packages/theme-basic/src/lib/components/account-layout/tenant-box/tenant-box.component.html index e4381b7b05..ef74c61bc1 100644 --- a/npm/ng-packs/packages/theme-basic/src/lib/components/account-layout/tenant-box/tenant-box.component.html +++ b/npm/ng-packs/packages/theme-basic/src/lib/components/account-layout/tenant-box/tenant-box.component.html @@ -24,7 +24,7 @@ - +
                                                          Switch Tenant
                                                          diff --git a/npm/ng-packs/packages/theme-basic/tsconfig.json b/npm/ng-packs/packages/theme-basic/tsconfig.json index 692cc17b32..f34e44326c 100644 --- a/npm/ng-packs/packages/theme-basic/tsconfig.json +++ b/npm/ng-packs/packages/theme-basic/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../tsconfig.json", "files": [], "include": [], "references": [ diff --git a/npm/ng-packs/packages/theme-shared/extensions/src/tests/enum.util.spec.ts b/npm/ng-packs/packages/theme-shared/extensions/src/tests/enum.util.spec.ts index ffdc6224a5..9a292541f1 100644 --- a/npm/ng-packs/packages/theme-shared/extensions/src/tests/enum.util.spec.ts +++ b/npm/ng-packs/packages/theme-shared/extensions/src/tests/enum.util.spec.ts @@ -1,5 +1,5 @@ import { ConfigStateService, LocalizationService } from '@abp/ng.core'; -import { BehaviorSubject } from 'rxjs'; +import { BehaviorSubject, of } from 'rxjs'; import { take } from 'rxjs/operators'; import { PropData } from '../lib/models/props'; import { createEnum, createEnumOptions, createEnumValueResolver } from '../lib/utils/enum.util'; @@ -109,8 +109,9 @@ describe('Enum Utils', () => { }); function createMockLocalizationService() { - const configState = new ConfigStateService(null); - configState.setState({ localization: mockL10n } as any); + const fakeAppConfigService = { get: () => of({ localization: mockL10n }) } as any; + const configState = new ConfigStateService(fakeAppConfigService); + configState.refreshAppState(); return new LocalizationService(mockSessionState, null, null, configState); } diff --git a/npm/ng-packs/packages/theme-shared/extensions/src/tests/state.util.spec.ts b/npm/ng-packs/packages/theme-shared/extensions/src/tests/state.util.spec.ts index 000b4b4255..cedd632165 100644 --- a/npm/ng-packs/packages/theme-shared/extensions/src/tests/state.util.spec.ts +++ b/npm/ng-packs/packages/theme-shared/extensions/src/tests/state.util.spec.ts @@ -10,8 +10,9 @@ import { mapEntitiesToContributors, } from '../lib/utils/state.util'; -const configState = new ConfigStateService(null); -configState.setState(createMockState() as any); +const fakeAppConfigService = { get: () => of(createMockState()) } as any; +const configState = new ConfigStateService(fakeAppConfigService); +configState.refreshAppState(); describe('State Utils', () => { describe('#getObjectExtensionEntitiesFromStore', () => { diff --git a/npm/ng-packs/packages/theme-shared/ng-package.json b/npm/ng-packs/packages/theme-shared/ng-package.json index b9a2dcad73..6ed0e095ce 100644 --- a/npm/ng-packs/packages/theme-shared/ng-package.json +++ b/npm/ng-packs/packages/theme-shared/ng-package.json @@ -11,7 +11,6 @@ "@ng-bootstrap/ng-bootstrap", "@ngx-validate/core", "@swimlane/ngx-datatable", - "bootstrap", - "chart.js" + "bootstrap" ] } diff --git a/npm/ng-packs/packages/theme-shared/package.json b/npm/ng-packs/packages/theme-shared/package.json index a4ac8c14b9..dbd53909b5 100644 --- a/npm/ng-packs/packages/theme-shared/package.json +++ b/npm/ng-packs/packages/theme-shared/package.json @@ -13,7 +13,6 @@ "@ngx-validate/core": "^0.0.13", "@swimlane/ngx-datatable": "^19.0.0", "bootstrap": "~4.6.0", - "chart.js": "^2.9.3", "tslib": "^2.0.0" }, "publishConfig": { diff --git a/npm/ng-packs/packages/theme-shared/src/lib/components/chart/chart.component.html b/npm/ng-packs/packages/theme-shared/src/lib/components/chart/chart.component.html deleted file mode 100644 index 211614c90d..0000000000 --- a/npm/ng-packs/packages/theme-shared/src/lib/components/chart/chart.component.html +++ /dev/null @@ -1,11 +0,0 @@ -
                                                          - -
                                                          diff --git a/npm/ng-packs/packages/theme-shared/src/lib/components/chart/chart.component.ts b/npm/ng-packs/packages/theme-shared/src/lib/components/chart/chart.component.ts deleted file mode 100644 index 16fe78d661..0000000000 --- a/npm/ng-packs/packages/theme-shared/src/lib/components/chart/chart.component.ts +++ /dev/null @@ -1,141 +0,0 @@ -import { - AfterViewInit, - ChangeDetectorRef, - Component, - ElementRef, - EventEmitter, - Input, - OnDestroy, - Output, -} from '@angular/core'; -import { BehaviorSubject } from 'rxjs'; -import { chartJsLoaded$ } from '../../utils/widget-utils'; -declare const Chart: any; - -@Component({ - selector: 'abp-chart', - templateUrl: './chart.component.html', -}) -export class ChartComponent implements AfterViewInit, OnDestroy { - @Input() type: string; - - @Input() options: any = {}; - - @Input() plugins: any[] = []; - - @Input() width: string; - - @Input() height: string; - - @Input() responsive = true; - - // eslint-disable-next-line @angular-eslint/no-output-on-prefix - @Output() readonly onDataSelect: EventEmitter = new EventEmitter(); - - @Output() readonly initialized = new BehaviorSubject(this); - - private _initialized: boolean; - - _data: any; - - chart: any; - - constructor(public el: ElementRef, private cdRef: ChangeDetectorRef) {} - - @Input() get data(): any { - return this._data; - } - - set data(val: any) { - this._data = val; - this.reinit(); - } - - get canvas() { - return this.el.nativeElement.children[0].children[0]; - } - - get base64Image() { - return this.chart.toBase64Image(); - } - - ngAfterViewInit() { - chartJsLoaded$.subscribe(() => { - this.testChartJs(); - - this.initChart(); - this._initialized = true; - }); - } - - testChartJs() { - try { - Chart; - } catch (error) { - throw new Error(`Chart is not found. Import the Chart from app.module like shown below: - import('chart.js'); - `); - } - } - - onCanvasClick = event => { - if (this.chart) { - const element = this.chart.getElementAtEvent(event); - const dataset = this.chart.getDatasetAtEvent(event); - if (element && element.length && dataset) { - this.onDataSelect.emit({ - originalEvent: event, - element: element[0], - dataset, - }); - } - } - }; - - initChart = () => { - const opts = this.options || {}; - opts.responsive = this.responsive; - - // allows chart to resize in responsive mode - if (opts.responsive && (this.height || this.width)) { - opts.maintainAspectRatio = false; - } - - this.chart = new Chart(this.canvas, { - type: this.type, - data: this.data, - options: this.options, - plugins: this.plugins, - }); - - this.cdRef.detectChanges(); - }; - - generateLegend = () => { - if (this.chart) { - return this.chart.generateLegend(); - } - }; - - refresh = () => { - if (this.chart) { - this.chart.update(); - this.cdRef.detectChanges(); - } - }; - - reinit = () => { - if (this.chart) { - this.chart.destroy(); - this.initChart(); - } - }; - - ngOnDestroy() { - if (this.chart) { - this.chart.destroy(); - this._initialized = false; - this.chart = null; - } - } -} diff --git a/npm/ng-packs/packages/theme-shared/src/lib/components/index.ts b/npm/ng-packs/packages/theme-shared/src/lib/components/index.ts index 45036680be..c131167685 100644 --- a/npm/ng-packs/packages/theme-shared/src/lib/components/index.ts +++ b/npm/ng-packs/packages/theme-shared/src/lib/components/index.ts @@ -1,15 +1,11 @@ export * from './breadcrumb/breadcrumb.component'; export * from './button/button.component'; -export * from './chart/chart.component'; export * from './confirmation/confirmation.component'; export * from './http-error-wrapper/http-error-wrapper.component'; export * from './loader-bar/loader-bar.component'; export * from './loading/loading.component'; -export * from './modal/modal.component'; export * from './modal/modal-close.directive'; export * from './modal/modal-ref.service'; -export * from './sort-order-icon/sort-order-icon.component'; -export * from './table-empty-message/table-empty-message.component'; -export * from './table/table.component'; +export * from './modal/modal.component'; export * from './toast-container/toast-container.component'; export * from './toast/toast.component'; diff --git a/npm/ng-packs/packages/theme-shared/src/lib/components/modal/modal-container.component.ts b/npm/ng-packs/packages/theme-shared/src/lib/components/modal/modal-container.component.ts deleted file mode 100644 index 1b07955270..0000000000 --- a/npm/ng-packs/packages/theme-shared/src/lib/components/modal/modal-container.component.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { Component, ViewChild, ViewContainerRef } from '@angular/core'; - -/** - * @deprecated To be removed in v5.0 - */ -@Component({ - selector: 'abp-modal-container', - template: '', -}) -export class ModalContainerComponent { - @ViewChild('container', { static: true, read: ViewContainerRef }) - container: ViewContainerRef; -} diff --git a/npm/ng-packs/packages/theme-shared/src/lib/components/modal/modal.component.ts b/npm/ng-packs/packages/theme-shared/src/lib/components/modal/modal.component.ts index 44aea4d9f7..2cbf09c7f3 100644 --- a/npm/ng-packs/packages/theme-shared/src/lib/components/modal/modal.component.ts +++ b/npm/ng-packs/packages/theme-shared/src/lib/components/modal/modal.component.ts @@ -2,11 +2,9 @@ import { SubscriptionService, uuid } from '@abp/ng.core'; import { Component, ContentChild, - ElementRef, EventEmitter, Inject, Input, - isDevMode, OnDestroy, OnInit, Optional, @@ -32,19 +30,6 @@ export type ModalSize = 'sm' | 'md' | 'lg' | 'xl'; providers: [SubscriptionService], }) export class ModalComponent implements OnInit, OnDestroy, DismissableModal { - /** - * @deprecated Use centered property of options input instead. To be deleted in v5.0. - */ - @Input() centered = false; - /** - * @deprecated Use windowClass property of options input instead. To be deleted in v5.0. - */ - @Input() modalClass = ''; - /** - * @deprecated Use size property of options input instead. To be deleted in v5.0. - */ - @Input() size: ModalSize = 'lg'; - @Input() get visible(): boolean { return this._visible; @@ -81,12 +66,6 @@ export class ModalComponent implements OnInit, OnDestroy, DismissableModal { @ContentChild(ButtonComponent, { static: false, read: ButtonComponent }) abpSubmit: ButtonComponent; - /** - * @deprecated will be removed in v5.0 - */ - @ContentChild('abpClose', { static: false, read: ElementRef }) - abpClose: ElementRef; - @Output() readonly visibleChange = new EventEmitter(); @Output() readonly init = new EventEmitter(); @@ -164,9 +143,8 @@ export class ModalComponent implements OnInit, OnDestroy, DismissableModal { setTimeout(() => this.listen(), 0); this.modalRef = this.modal.open(this.modalContent, { - // TODO: set size to 'lg' when removed the size variable - size: this.size, - centered: this.centered, + size: 'md', + centered: false, keyboard: false, scrollable: true, beforeDismiss: () => { @@ -176,7 +154,7 @@ export class ModalComponent implements OnInit, OnDestroy, DismissableModal { return !this.visible; }, ...this.options, - windowClass: `${this.modalClass} ${this.options.windowClass || ''} ${this.modalIdentifier}`, + windowClass: `${this.options.windowClass || ''} ${this.modalIdentifier}`, }); this.appear.emit(); @@ -232,22 +210,6 @@ export class ModalComponent implements OnInit, OnDestroy, DismissableModal { } }); - setTimeout(() => { - if (!this.abpClose) return; - this.warnForDeprecatedClose(); - fromEvent(this.abpClose.nativeElement, 'click') - .pipe(takeUntil(this.destroy$)) - .subscribe(() => this.close()); - }, 0); - this.init.emit(); } - - private warnForDeprecatedClose() { - if (isDevMode()) { - console.warn( - 'Please use abpClose directive instead of #abpClose template variable. #abpClose will be removed in v5.0', - ); - } - } } diff --git a/npm/ng-packs/packages/theme-shared/src/lib/components/sort-order-icon/sort-order-icon.component.html b/npm/ng-packs/packages/theme-shared/src/lib/components/sort-order-icon/sort-order-icon.component.html deleted file mode 100644 index a3a142cc01..0000000000 --- a/npm/ng-packs/packages/theme-shared/src/lib/components/sort-order-icon/sort-order-icon.component.html +++ /dev/null @@ -1,3 +0,0 @@ -
                                                          - -
                                                          diff --git a/npm/ng-packs/packages/theme-shared/src/lib/components/sort-order-icon/sort-order-icon.component.ts b/npm/ng-packs/packages/theme-shared/src/lib/components/sort-order-icon/sort-order-icon.component.ts deleted file mode 100644 index 439989ef73..0000000000 --- a/npm/ng-packs/packages/theme-shared/src/lib/components/sort-order-icon/sort-order-icon.component.ts +++ /dev/null @@ -1,63 +0,0 @@ -import { Component, EventEmitter, Input, Output } from '@angular/core'; - -/** - * @deprecated To be deleted in v5.0. Use ngx-datatale instead. - */ -@Component({ - selector: 'abp-sort-order-icon', - templateUrl: './sort-order-icon.component.html', -}) -export class SortOrderIconComponent { - private _order: 'asc' | 'desc' | ''; - private _selectedSortKey: string; - - @Input() - sortKey: string; - - @Input() - set selectedSortKey(value: string) { - this._selectedSortKey = value; - this.selectedSortKeyChange.emit(value); - } - get selectedSortKey(): string { - return this._selectedSortKey; - } - - @Input() - set order(value: 'asc' | 'desc' | '') { - this._order = value; - this.orderChange.emit(value); - } - get order(): 'asc' | 'desc' | '' { - return this._order; - } - - @Output() readonly orderChange = new EventEmitter(); - @Output() readonly selectedSortKeyChange = new EventEmitter(); - - @Input() - iconClass: string; - - get icon(): string { - if (this.selectedSortKey === this.sortKey) return `sorting_${this.order}`; - else return 'sorting'; - } - - sort(key: string) { - this.selectedSortKey = key; - switch (this.order) { - case '': - this.order = 'asc'; - this.orderChange.emit('asc'); - break; - case 'asc': - this.order = 'desc'; - this.orderChange.emit('desc'); - break; - case 'desc': - this.order = ''; - this.orderChange.emit(''); - break; - } - } -} diff --git a/npm/ng-packs/packages/theme-shared/src/lib/components/table-empty-message/table-empty-message.component.ts b/npm/ng-packs/packages/theme-shared/src/lib/components/table-empty-message/table-empty-message.component.ts deleted file mode 100644 index d5e20cf568..0000000000 --- a/npm/ng-packs/packages/theme-shared/src/lib/components/table-empty-message/table-empty-message.component.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { Component, Input } from '@angular/core'; - -@Component({ - // eslint-disable-next-line @angular-eslint/component-selector - selector: '[abp-table-empty-message]', - template: ` - - {{ emptyMessage | abpLocalization }} - - `, -}) -export class TableEmptyMessageComponent { - @Input() - colspan = 2; - - @Input() - message: string; - - @Input() - localizationResource = 'AbpAccount'; - - @Input() - localizationProp = 'NoDataAvailableInDatatable'; - - get emptyMessage(): string { - return this.message || `${this.localizationResource}::${this.localizationProp}`; - } -} diff --git a/npm/ng-packs/packages/theme-shared/src/lib/components/table/table.component.html b/npm/ng-packs/packages/theme-shared/src/lib/components/table/table.component.html deleted file mode 100644 index 6cbea56304..0000000000 --- a/npm/ng-packs/packages/theme-shared/src/lib/components/table/table.component.html +++ /dev/null @@ -1,81 +0,0 @@ -
                                                          -
                                                          - -
                                                          - -
                                                          -
                                                          -
                                                          - - -
                                                          -
                                                          -
                                                          -
                                                          - - - - -
                                                          -
                                                          -
                                                          -
                                                          - - - -
                                                          -
                                                          -
                                                          -
                                                          - - - - - - -
                                                          -
                                                          - - - - - - - - - - - - - - - - - - - - {{ - emptyMessage | abpLocalization - }} - - diff --git a/npm/ng-packs/packages/theme-shared/src/lib/components/table/table.component.scss b/npm/ng-packs/packages/theme-shared/src/lib/components/table/table.component.scss deleted file mode 100644 index 98d4eb5811..0000000000 --- a/npm/ng-packs/packages/theme-shared/src/lib/components/table/table.component.scss +++ /dev/null @@ -1,337 +0,0 @@ -.ui-table { - position: relative; - - .ui-table-tbody > tr:nth-child(even):hover, - .ui-table-tbody > tr:hover { - filter: brightness(90%); - } - - .ui-table-empty { - padding: 20px 0; - text-align: center; - border: 1px solid #e0e0e0; - border-top-width: 0; - } - - .ui-table-caption, - .ui-table-summary { - background-color: #f4f4f4; - color: #333333; - border: 1px solid #c8c8c8; - padding: 0.571em 1em; - text-align: center; - } - .ui-table-caption { - border-bottom: 0 none; - font-weight: 700; - } - .ui-table-summary { - border-top: 0 none; - font-weight: 700; - } - .ui-table-thead > tr > th { - padding: 0.571em 0.857em; - border: 1px solid #c8c8c8; - font-weight: 700; - color: #333333; - background-color: #f4f4f4; - } - .ui-table-tbody > tr > td { - padding: 0.571em 0.857em; - } - .ui-table-tfoot > tr > td { - padding: 0.571em 0.857em; - border: 1px solid #c8c8c8; - font-weight: 700; - color: #333333; - background-color: #ffffff; - } - .ui-sortable-column { - -moz-transition: box-shadow 0.2s; - -o-transition: box-shadow 0.2s; - -webkit-transition: box-shadow 0.2s; - transition: box-shadow 0.2s; - } - .ui-sortable-column:focus { - outline: 0 none; - outline-offset: 0; - -webkit-box-shadow: inset 0 0 0 0.2em #8dcdff; - -moz-box-shadow: inset 0 0 0 0.2em #8dcdff; - box-shadow: inset 0 0 0 0.2em #8dcdff; - } - .ui-sortable-column .ui-sortable-column-icon { - color: #848484; - } - .ui-sortable-column:not(.ui-state-highlight):hover { - background-color: #e0e0e0; - color: #333333; - } - .ui-sortable-column:not(.ui-state-highlight):hover .ui-sortable-column-icon { - color: #333333; - } - .ui-sortable-column.ui-state-highlight { - background-color: #007ad9; - color: #ffffff; - } - .ui-sortable-column.ui-state-highlight .ui-sortable-column-icon { - color: #ffffff; - } - .ui-editable-column input { - font-size: 14px; - font-family: 'Open Sans', 'Helvetica Neue', sans-serif; - } - .ui-editable-column input:focus { - outline: 1px solid #007ad9; - outline-offset: 2px; - } - .ui-table-tbody > tr { - background-color: #ffffff; - color: #333333; - } - .ui-table-tbody > tr > td { - background-color: inherit; - border: 1px solid #c8c8c8; - } - .ui-table-tbody > tr.ui-state-highlight { - background-color: #007ad9; - color: #ffffff; - } - .ui-table-tbody > tr.ui-state-highlight a { - color: #ffffff; - } - .ui-table-tbody > tr.ui-contextmenu-selected { - background-color: #007ad9; - color: #ffffff; - } - .ui-table-tbody > tr.ui-table-dragpoint-top > td { - -webkit-box-shadow: inset 0 2px 0 0 #007ad9; - -moz-box-shadow: inset 0 2px 0 0 #007ad9; - box-shadow: inset 0 2px 0 0 #007ad9; - } - .ui-table-tbody > tr.ui-table-dragpoint-bottom > td { - -webkit-box-shadow: inset 0 -2px 0 0 #007ad9; - -moz-box-shadow: inset 0 -2px 0 0 #007ad9; - box-shadow: inset 0 -2px 0 0 #007ad9; - } - .ui-table-tbody > tr:nth-child(even) { - background-color: #f9f9f9; - } - .ui-table-tbody > tr:nth-child(even).ui-state-highlight { - background-color: #007ad9; - color: #ffffff; - } - .ui-table-tbody > tr:nth-child(even).ui-state-highlight a { - color: #ffffff; - } - .ui-table-tbody > tr:nth-child(even).ui-contextmenu-selected { - background-color: #007ad9; - color: #ffffff; - } - - &.ui-table-hoverable-rows - .ui-table-tbody - > tr.ui-selectable-row:not(.ui-state-highlight):not(.ui-contextmenu-selected):hover { - cursor: pointer; - background-color: #eaeaea; - color: #333333; - } - .ui-column-resizer-helper { - background-color: #007ad9; - } - @media screen and (max-width: 40em) { - &.ui-table-responsive .ui-table-tbody > tr > td { - border: 0 none; - } - } - - table { - border-collapse: collapse; - width: 100%; - table-layout: fixed; - } - - .ui-table-tbody > tr > td, - .ui-table-tfoot > tr > td, - .ui-table-thead > tr > th { - padding: 0.571em 0.857em; - } - - .ui-sortable-column { - cursor: pointer; - } - - p-sorticon { - vertical-align: middle; - } - - .ui-table-auto-layout > .ui-table-wrapper { - overflow-x: auto; - } - - .ui-table-auto-layout > .ui-table-wrapper > table { - table-layout: auto; - } - - .ui-table-caption, - .ui-table-summary { - padding: 0.25em 0.5em; - text-align: center; - font-weight: 700; - } - - .ui-table-caption { - border-bottom: 0; - } - - .ui-table-summary { - border-top: 0; - } - - .ui-table-scrollable-wrapper { - position: relative; - } - - .ui-table-scrollable-footer, - .ui-table-scrollable-header { - overflow: hidden; - border: 0; - } - - .ui-table-scrollable-body { - overflow: auto; - position: relative; - } - - .ui-table-virtual-table { - position: absolute; - } - - .ui-table-loading-virtual-table { - display: none; - } - - .ui-table-frozen-view .ui-table-scrollable-body { - overflow: hidden; - } - - .ui-table-frozen-view > .ui-table-scrollable-body > table > .ui-table-tbody > tr > td:last-child { - border-right: 0; - } - - .ui-table-unfrozen-view { - position: absolute; - top: 0; - } - - .ui-table-resizable > .ui-table-wrapper { - overflow-x: auto; - } - - .ui-table-resizable .ui-table-tbody > tr > td, - .ui-table-resizable .ui-table-tfoot > tr > td, - .ui-table-resizable .ui-table-thead > tr > th { - overflow: hidden; - } - - .ui-table-resizable .ui-resizable-column { - background-clip: padding-box; - position: relative; - } - - .ui-table-resizable-fit .ui-resizable-column:last-child .ui-column-resizer { - display: none; - } - - .ui-column-resizer { - display: block; - position: absolute !important; - top: 0; - right: 0; - margin: 0; - width: 0.5em; - height: 100%; - padding: 0; - cursor: col-resize; - border: 1px solid rgba(0, 0, 0, 0); - } - - .ui-column-resizer-helper { - width: 1px; - position: absolute; - z-index: 10; - display: none; - } - - .ui-table-tbody > tr > td.ui-editing-cell { - padding: 0; - } - - .ui-table-tbody > tr > td.ui-editing-cell p-celleditor > * { - width: 100%; - } - - .ui-table-reorder-indicator-down, - .ui-table-reorder-indicator-up { - position: absolute; - display: none; - } - - .ui-table-responsive .ui-table-tbody > tr > td .ui-column-title { - display: none; - } - - @media screen and (max-width: 40em) { - .ui-table-responsive .ui-table-tfoot > tr > td, - .ui-table-responsive .ui-table-thead > tr > th, - .ui-table-responsive colgroup { - display: none !important; - } - .ui-table-responsive .ui-table-tbody > tr > td { - text-align: left; - display: block; - border: 0; - width: 100% !important; - box-sizing: border-box; - float: left; - clear: left; - } - .ui-table-responsive .ui-table-tbody > tr > td .ui-column-title { - padding: 0.4em; - min-width: 30%; - display: inline-block; - margin: -0.4em 1em -0.4em -0.4em; - font-weight: 700; - } - } - - .ui-widget { - font-family: 'Open Sans', 'Helvetica Neue', sans-serif; - font-size: 14px; - text-decoration: none; - } - - .page-item.disabled .page-link, - .page-link { - background-color: transparent; - border: none; - } - - .page-item.disabled .page-link { - box-shadow: none; - } - - .pagination { - margin-bottom: 0; - } - - .pagination-wrapper { - display: flex; - justify-content: center; - border-top: 0; - padding: 0; - } - - .op-0 { - opacity: 0; - } -} diff --git a/npm/ng-packs/packages/theme-shared/src/lib/components/table/table.component.ts b/npm/ng-packs/packages/theme-shared/src/lib/components/table/table.component.ts deleted file mode 100644 index 0baf78f883..0000000000 --- a/npm/ng-packs/packages/theme-shared/src/lib/components/table/table.component.ts +++ /dev/null @@ -1,110 +0,0 @@ -import { - Component, - ElementRef, - EventEmitter, - Input, - OnInit, - Output, - TemplateRef, - TrackByFunction, - ViewChild, - ViewEncapsulation, -} from '@angular/core'; - -/** - * - * @deprecated To be deleted in v5.0. Use ngx-datatale instead. - */ -@Component({ - selector: 'abp-table', - templateUrl: 'table.component.html', - styleUrls: ['table.component.scss'], - encapsulation: ViewEncapsulation.None, -}) -export class TableComponent implements OnInit { - private _totalRecords: number; - bodyScrollLeft = 0; - - @Input() - value: any[]; - - @Input() - headerTemplate: TemplateRef; - - @Input() - bodyTemplate: TemplateRef; - - @Input() - colgroupTemplate: TemplateRef; - - @Input() - scrollHeight: string; - - @Input() - scrollable: boolean; - - @Input() - rows: number; - - @Input() - page = 1; - - @Input() - trackingProp = 'id'; - - @Input() - emptyMessage = 'AbpAccount::NoDataAvailableInDatatable'; - - @Output() - readonly pageChange = new EventEmitter(); - - @ViewChild('wrapper', { read: ElementRef }) - wrapperRef: ElementRef; - - @Input() - get totalRecords(): number { - return this._totalRecords || this.value.length; - } - set totalRecords(newValue: number) { - if (newValue < 0) this._totalRecords = 0; - - this._totalRecords = newValue; - } - - get totalPages(): number { - if (!this.rows) { - return; - } - - return Math.ceil(this.totalRecords / this.rows); - } - - get slicedValue(): any[] { - if (!this.rows || this.rows >= this.value.length) { - return this.value; - } - - const start = (this.page - 1) * this.rows; - return this.value.slice(start, start + this.rows); - } - - marginCalculator: MarginCalculator; - - trackByFn: TrackByFunction = (_, value) => { - return typeof value === 'object' ? value[this.trackingProp] || value : value; - }; - - ngOnInit() { - this.marginCalculator = document.body.dir === 'rtl' ? rtlCalculator : ltrCalculator; - } -} - -function ltrCalculator(div: HTMLDivElement): string { - return `0 auto 0 -${div.scrollLeft}px`; -} - -function rtlCalculator(div: HTMLDivElement): string { - return `0 ${-(div.scrollWidth - div.clientWidth - div.scrollLeft)}px 0 auto`; -} - -type MarginCalculator = (div: HTMLDivElement) => string; diff --git a/npm/ng-packs/packages/theme-shared/src/lib/directives/index.ts b/npm/ng-packs/packages/theme-shared/src/lib/directives/index.ts index 64b849d4fe..b0a79877fe 100644 --- a/npm/ng-packs/packages/theme-shared/src/lib/directives/index.ts +++ b/npm/ng-packs/packages/theme-shared/src/lib/directives/index.ts @@ -1,5 +1,4 @@ +export * from './ellipsis.directive'; export * from './loading.directive'; export * from './ngx-datatable-default.directive'; export * from './ngx-datatable-list.directive'; -export * from './table-sort.directive'; -export * from './ellipsis.directive'; diff --git a/npm/ng-packs/packages/theme-shared/src/lib/directives/table-sort.directive.ts b/npm/ng-packs/packages/theme-shared/src/lib/directives/table-sort.directive.ts deleted file mode 100644 index 90e8b5e6e1..0000000000 --- a/npm/ng-packs/packages/theme-shared/src/lib/directives/table-sort.directive.ts +++ /dev/null @@ -1,57 +0,0 @@ -import { SortOrder, SortPipe } from '@abp/ng.core'; -import { - ChangeDetectorRef, - Directive, - Host, - Input, - OnChanges, - Optional, - Self, - SimpleChanges, -} from '@angular/core'; -import clone from 'just-clone'; -import { TableComponent } from '../components/table/table.component'; - -export interface TableSortOptions { - key: string; - order: SortOrder; -} - -/** - * - * @deprecated To be deleted in v5.0 - */ -@Directive({ - selector: '[abpTableSort]', - providers: [SortPipe], -}) -export class TableSortDirective implements OnChanges { - @Input() - abpTableSort: TableSortOptions; - - @Input() - value: any[] = []; - - get table(): TableComponent | any { - return ( - this.abpTable || this.cdRef['_view'].component || this.cdRef['context'] // 'context' for ivy - ); - } - - constructor( - @Host() @Optional() @Self() private abpTable: TableComponent, - private sortPipe: SortPipe, - private cdRef: ChangeDetectorRef, - ) {} - - ngOnChanges({ value, abpTableSort }: SimpleChanges) { - if (this.table && (value || abpTableSort)) { - this.abpTableSort = this.abpTableSort || ({} as TableSortOptions); - this.table.value = this.sortPipe.transform( - clone(this.value), - this.abpTableSort.order, - this.abpTableSort.key, - ); - } - } -} diff --git a/npm/ng-packs/packages/theme-shared/src/lib/services/index.ts b/npm/ng-packs/packages/theme-shared/src/lib/services/index.ts index 1b39fcc0f0..5b97363917 100644 --- a/npm/ng-packs/packages/theme-shared/src/lib/services/index.ts +++ b/npm/ng-packs/packages/theme-shared/src/lib/services/index.ts @@ -1,5 +1,4 @@ export * from './confirmation.service'; -export * from './modal.service'; -export * from './toaster.service'; export * from './nav-items.service'; export * from './page-alert.service'; +export * from './toaster.service'; diff --git a/npm/ng-packs/packages/theme-shared/src/lib/services/modal.service.ts b/npm/ng-packs/packages/theme-shared/src/lib/services/modal.service.ts deleted file mode 100644 index a75cfe5089..0000000000 --- a/npm/ng-packs/packages/theme-shared/src/lib/services/modal.service.ts +++ /dev/null @@ -1,54 +0,0 @@ -import { ContentProjectionService, PROJECTION_STRATEGY } from '@abp/ng.core'; -import { ComponentRef, Injectable, TemplateRef, ViewContainerRef, OnDestroy } from '@angular/core'; -import { ModalContainerComponent } from '../components/modal/modal-container.component'; - -/** - * @deprecated Use ng-bootstrap modal. To be deleted in v5.0. - */ -@Injectable({ - providedIn: 'root', -}) -export class ModalService implements OnDestroy { - private containerComponentRef: ComponentRef; - - constructor(private contentProjectionService: ContentProjectionService) { - this.setContainer(); - } - - private setContainer() { - this.containerComponentRef = this.contentProjectionService.projectContent( - PROJECTION_STRATEGY.AppendComponentToBody(ModalContainerComponent), - ); - - this.containerComponentRef.changeDetectorRef.detectChanges(); - } - - clearModal() { - this.getContainer().clear(); - this.detectChanges(); - } - - detectChanges() { - this.containerComponentRef.changeDetectorRef.detectChanges(); - } - - getContainer(): ViewContainerRef { - return this.containerComponentRef.instance.container; - } - - renderTemplate(template: TemplateRef, context?: T) { - const containerRef = this.getContainer(); - - const strategy = PROJECTION_STRATEGY.ProjectTemplateToContainer( - template, - containerRef, - context, - ); - - this.contentProjectionService.projectContent(strategy); - } - - ngOnDestroy() { - this.containerComponentRef.destroy(); - } -} diff --git a/npm/ng-packs/packages/theme-shared/src/lib/tests/append-content.token.spec.ts b/npm/ng-packs/packages/theme-shared/src/lib/tests/append-content.token.spec.ts index fe3b0ac37c..286218efa0 100644 --- a/npm/ng-packs/packages/theme-shared/src/lib/tests/append-content.token.spec.ts +++ b/npm/ng-packs/packages/theme-shared/src/lib/tests/append-content.token.spec.ts @@ -1,9 +1,8 @@ +import { DomInsertionService } from '@abp/ng.core'; import { Component } from '@angular/core'; import { createComponentFactory, Spectator } from '@ngneat/spectator'; -import { THEME_SHARED_APPEND_CONTENT } from '../tokens/append-content.token'; -import { DomInsertionService } from '@abp/ng.core'; -import { chartJsLoaded$ } from '../utils'; import styles from '../constants/styles'; +import { THEME_SHARED_APPEND_CONTENT } from '../tokens/append-content.token'; @Component({ selector: 'abp-dummy', template: '' }) class DummyComponent {} @@ -18,13 +17,4 @@ describe('AppendContentToken', () => { spectator.inject(THEME_SHARED_APPEND_CONTENT); expect(spectator.inject(DomInsertionService).has(styles)).toBe(true); }); - - it('should be loaded the chart.js', done => { - chartJsLoaded$.subscribe(loaded => { - expect(loaded).toBe(true); - done(); - }); - - spectator.inject(THEME_SHARED_APPEND_CONTENT); - }); }); diff --git a/npm/ng-packs/packages/theme-shared/src/lib/tests/modal-container.component.spec.ts b/npm/ng-packs/packages/theme-shared/src/lib/tests/modal-container.component.spec.ts deleted file mode 100644 index 9cb45127e5..0000000000 --- a/npm/ng-packs/packages/theme-shared/src/lib/tests/modal-container.component.spec.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { Component, ComponentFactoryResolver, ComponentRef } from '@angular/core'; -import { createComponentFactory, Spectator } from '@ngneat/spectator/jest'; -import { ModalContainerComponent } from '../components/modal/modal-container.component'; - -describe('ModalContainerComponent', () => { - @Component({ template: '
                                                          bar
                                                          ' }) - class TestComponent {} - - let componentRef: ComponentRef; - let spectator: Spectator; - - const createComponent = createComponentFactory({ - component: ModalContainerComponent, - entryComponents: [TestComponent], - }); - - beforeEach(() => (spectator = createComponent())); - - afterEach(() => componentRef.destroy()); - - describe('#container', () => { - it('should be a ViewContainerRef', () => { - let foo = document.querySelector('div.foo'); - expect(foo).toBeNull(); - - const cfResolver = spectator.inject(ComponentFactoryResolver); - const factory = cfResolver.resolveComponentFactory(TestComponent); - componentRef = spectator.component.container.createComponent(factory); - - foo = document.querySelector('div.foo'); - expect(foo.textContent).toBe('bar'); - }); - }); -}); diff --git a/npm/ng-packs/packages/theme-shared/src/lib/tests/modal.component.spec.ts b/npm/ng-packs/packages/theme-shared/src/lib/tests/modal.component.spec.ts index 88ec95c700..e1f15db581 100644 --- a/npm/ng-packs/packages/theme-shared/src/lib/tests/modal.component.spec.ts +++ b/npm/ng-packs/packages/theme-shared/src/lib/tests/modal.component.spec.ts @@ -103,7 +103,7 @@ describe('ModalComponent', () => { xit('should close with the abpClose', async () => { await wait0ms(); - spectator.dispatchMouseEvent(spectator.component.abpClose, 'click'); + spectator.dispatchMouseEvent(spectator.query('[abpClose]'), 'click'); await wait0ms(); diff --git a/npm/ng-packs/packages/theme-shared/src/lib/tests/modal.service.spec.ts b/npm/ng-packs/packages/theme-shared/src/lib/tests/modal.service.spec.ts deleted file mode 100644 index 0c383bc7cf..0000000000 --- a/npm/ng-packs/packages/theme-shared/src/lib/tests/modal.service.spec.ts +++ /dev/null @@ -1,87 +0,0 @@ -import { Component, TemplateRef, ViewChild } from '@angular/core'; -import { createComponentFactory, Spectator } from '@ngneat/spectator/jest'; -import { ModalContainerComponent } from '../components/modal/modal-container.component'; -import { ModalService } from '../services'; - -describe('ModalContainerComponent', () => { - @Component({ - template: ` - -
                                                          bar
                                                          -
                                                          - `, - }) - class TestComponent { - @ViewChild('ref', { static: true }) - template: TemplateRef; - - constructor(public modalService: ModalService) {} - } - - let spectator: Spectator; - let service: ModalService; - - const createComponent = createComponentFactory({ - component: TestComponent, - entryComponents: [ModalContainerComponent], - }); - - beforeEach(() => { - spectator = createComponent(); - service = spectator.component.modalService; - }); - - afterEach(() => { - service.getContainer().clear(); - service['containerComponentRef'].changeDetectorRef.detectChanges(); - service['containerComponentRef'].destroy(); - }); - - describe('#getContainer', () => { - it('should return the ViewContainerRef of ModalContainerComponent', () => { - let foo = document.querySelector('div.foo'); - expect(foo).toBeNull(); - - const containerRef = service.getContainer(); - const embeddedViewRef = containerRef.createEmbeddedView(spectator.component.template); - - foo = document.querySelector('div.foo'); - expect(foo).toBe(embeddedViewRef.rootNodes[0]); - expect(foo.textContent).toBe('bar'); - }); - }); - - describe('#renderTemplate', () => { - it('should render given template using the ViewContainerRef of ModalContainerComponent', () => { - let foo = document.querySelector('div.foo'); - expect(foo).toBeNull(); - - service.renderTemplate(spectator.component.template); - - foo = document.querySelector('div.foo'); - expect(foo.textContent).toBe('bar'); - }); - }); - - describe('#detectChanges', () => { - it('should call detectChanges on the containerComponentRef', () => { - const spy = jest.spyOn(service['containerComponentRef'].changeDetectorRef, 'detectChanges'); - - service.detectChanges(); - - expect(spy).toHaveBeenCalledTimes(1); - }); - }); - - describe('#clearModal', () => { - it('should call clear on the ViewContainerRef and detectChanges', () => { - const clear = jest.spyOn(service.getContainer(), 'clear'); - const detectChanges = jest.spyOn(service, 'detectChanges'); - - service.clearModal(); - - expect(clear).toHaveBeenCalledTimes(1); - expect(detectChanges).toHaveBeenCalledTimes(1); - }); - }); -}); diff --git a/npm/ng-packs/packages/theme-shared/src/lib/tests/sort-order-icon.component.spec.ts b/npm/ng-packs/packages/theme-shared/src/lib/tests/sort-order-icon.component.spec.ts deleted file mode 100644 index a91f5b76c1..0000000000 --- a/npm/ng-packs/packages/theme-shared/src/lib/tests/sort-order-icon.component.spec.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { createHostFactory, SpectatorHost } from '@ngneat/spectator/jest'; -import { SortOrderIconComponent } from '../components/sort-order-icon/sort-order-icon.component'; - -describe('SortOrderIconComponent', () => { - let spectator: SpectatorHost; - let component: SortOrderIconComponent; - const createHost = createHostFactory(SortOrderIconComponent); - - beforeEach(() => { - spectator = createHost( - '', - { - hostProps: { - selectedSortKey: '', - order: '', - }, - }, - ); - component = spectator.component; - }); - - test('should have correct icon class when selectedSortKey and sortKey are the same', () => { - const newKey = 'testKey'; - component.sort(newKey); - expect(component.selectedSortKey).toBe(newKey); - expect(component.order).toBe('asc'); - expect(component.icon).toBe('sorting_asc'); - }); - - test("shouldn't have any icon class when sortKey and selectedSortKey are different", () => { - const newKey = 'otherKey'; - component.sort(newKey); - expect(component.selectedSortKey).toBe(newKey); - expect(component.order).toBe('asc'); - expect(component.icon).toBe('sorting'); - }); - - test('should change order correctly when sort function called', () => { - component.sort('testKey'); - expect(component.order).toBe('asc'); - component.sort('testKey'); - expect(component.order).toBe('desc'); - component.sort('testKey'); - expect(component.order).toBe(''); - }); -}); diff --git a/npm/ng-packs/packages/theme-shared/src/lib/tests/validation-utils.spec.ts b/npm/ng-packs/packages/theme-shared/src/lib/tests/validation-utils.spec.ts index be212ac8dc..54e828036c 100644 --- a/npm/ng-packs/packages/theme-shared/src/lib/tests/validation-utils.spec.ts +++ b/npm/ng-packs/packages/theme-shared/src/lib/tests/validation-utils.spec.ts @@ -1,4 +1,4 @@ -import { ConfigStateService } from '@abp/ng.core'; +import { AbpApplicationConfigurationService, ConfigStateService } from '@abp/ng.core'; import { CoreTestingModule } from '@abp/ng.core/testing'; import { HttpClient } from '@angular/common/http'; import { Component, Injector } from '@angular/core'; @@ -6,6 +6,7 @@ import { Validators } from '@angular/forms'; import { createComponentFactory, Spectator } from '@ngneat/spectator/jest'; import { NgxValidateCoreModule, validatePassword } from '@ngx-validate/core'; import { OAuthService } from 'angular-oauth2-oidc'; +import { of } from 'rxjs'; import { getPasswordValidators } from '../utils'; @Component({ template: '', selector: 'abp-dummy' }) class DummyComponent {} @@ -16,6 +17,26 @@ describe('ValidationUtils', () => { component: DummyComponent, imports: [CoreTestingModule.withConfig(), NgxValidateCoreModule.forRoot()], mocks: [HttpClient, OAuthService], + providers: [ + { + provide: AbpApplicationConfigurationService, + useValue: { + get: () => + of({ + setting: { + values: { + 'Abp.Identity.Password.RequiredLength': '6', + 'Abp.Identity.Password.RequiredUniqueChars': '1', + 'Abp.Identity.Password.RequireNonAlphanumeric': 'True', + 'Abp.Identity.Password.RequireLowercase': 'True', + 'Abp.Identity.Password.RequireUppercase': 'True', + 'Abp.Identity.Password.RequireDigit': 'True', + }, + }, + }), + }, + }, + ], }); beforeEach(() => (spectator = createComponent())); @@ -23,18 +44,7 @@ describe('ValidationUtils', () => { describe('#getPasswordValidators', () => { it('should return password valdiators', () => { const configState = spectator.inject(ConfigStateService); - configState.setState({ - setting: { - values: { - 'Abp.Identity.Password.RequiredLength': '6', - 'Abp.Identity.Password.RequiredUniqueChars': '1', - 'Abp.Identity.Password.RequireNonAlphanumeric': 'True', - 'Abp.Identity.Password.RequireLowercase': 'True', - 'Abp.Identity.Password.RequireUppercase': 'True', - 'Abp.Identity.Password.RequireDigit': 'True', - }, - }, - }); + configState.refreshAppState(); const validators = getPasswordValidators(spectator.inject(Injector)); const expectedValidators = [ diff --git a/npm/ng-packs/packages/theme-shared/src/lib/theme-shared.module.ts b/npm/ng-packs/packages/theme-shared/src/lib/theme-shared.module.ts index 11a2ce3493..8575e834ed 100644 --- a/npm/ng-packs/packages/theme-shared/src/lib/theme-shared.module.ts +++ b/npm/ng-packs/packages/theme-shared/src/lib/theme-shared.module.ts @@ -12,17 +12,12 @@ import { import { NgxDatatableModule } from '@swimlane/ngx-datatable'; import { BreadcrumbComponent } from './components/breadcrumb/breadcrumb.component'; import { ButtonComponent } from './components/button/button.component'; -import { ChartComponent } from './components/chart/chart.component'; import { ConfirmationComponent } from './components/confirmation/confirmation.component'; import { HttpErrorWrapperComponent } from './components/http-error-wrapper/http-error-wrapper.component'; import { LoaderBarComponent } from './components/loader-bar/loader-bar.component'; import { LoadingComponent } from './components/loading/loading.component'; import { ModalCloseDirective } from './components/modal/modal-close.directive'; -import { ModalContainerComponent } from './components/modal/modal-container.component'; import { ModalComponent } from './components/modal/modal.component'; -import { SortOrderIconComponent } from './components/sort-order-icon/sort-order-icon.component'; -import { TableEmptyMessageComponent } from './components/table-empty-message/table-empty-message.component'; -import { TableComponent } from './components/table/table.component'; import { ToastContainerComponent } from './components/toast-container/toast-container.component'; import { ToastComponent } from './components/toast/toast.component'; import { DEFAULT_VALIDATION_BLUEPRINTS } from './constants/validation'; @@ -30,7 +25,6 @@ import { EllipsisModule } from './directives/ellipsis.directive'; import { LoadingDirective } from './directives/loading.directive'; import { NgxDatatableDefaultDirective } from './directives/ngx-datatable-default.directive'; import { NgxDatatableListDirective } from './directives/ngx-datatable-list.directive'; -import { TableSortDirective } from './directives/table-sort.directive'; import { ErrorHandler } from './handlers/error.handler'; import { initLazyStyleHandler } from './handlers/lazy-style.handler'; import { RootParams } from './models/common'; @@ -43,20 +37,15 @@ import { DateParserFormatter } from './utils/date-parser-formatter'; const declarationsWithExports = [ BreadcrumbComponent, ButtonComponent, - ChartComponent, ConfirmationComponent, LoaderBarComponent, LoadingComponent, ModalComponent, - TableComponent, - TableEmptyMessageComponent, ToastComponent, ToastContainerComponent, - SortOrderIconComponent, NgxDatatableDefaultDirective, NgxDatatableListDirective, LoadingDirective, - TableSortDirective, ModalCloseDirective, ]; @@ -68,13 +57,12 @@ const declarationsWithExports = [ NgbPaginationModule, EllipsisModule, ], - declarations: [...declarationsWithExports, HttpErrorWrapperComponent, ModalContainerComponent], + declarations: [...declarationsWithExports, HttpErrorWrapperComponent], exports: [NgxDatatableModule, EllipsisModule, ...declarationsWithExports], providers: [DatePipe], entryComponents: [ HttpErrorWrapperComponent, LoadingComponent, - ModalContainerComponent, ToastContainerComponent, ConfirmationComponent, ], diff --git a/npm/ng-packs/packages/theme-shared/src/lib/tokens/append-content.token.ts b/npm/ng-packs/packages/theme-shared/src/lib/tokens/append-content.token.ts index 2ba7898480..ac05d7e6fe 100644 --- a/npm/ng-packs/packages/theme-shared/src/lib/tokens/append-content.token.ts +++ b/npm/ng-packs/packages/theme-shared/src/lib/tokens/append-content.token.ts @@ -1,7 +1,6 @@ import { CONTENT_STRATEGY, DomInsertionService } from '@abp/ng.core'; import { inject, InjectionToken } from '@angular/core'; import styles from '../constants/styles'; -import { chartJsLoaded$ } from '../utils/widget-utils'; export const THEME_SHARED_APPEND_CONTENT = new InjectionToken('THEME_SHARED_APPEND_CONTENT', { providedIn: 'root', @@ -9,7 +8,5 @@ export const THEME_SHARED_APPEND_CONTENT = new InjectionToken('THEME_SHARE const domInsertion: DomInsertionService = inject(DomInsertionService); domInsertion.insertContent(CONTENT_STRATEGY.AppendStyleToHead(styles)); - - import('chart.js').then(() => chartJsLoaded$.next(true)); }, }); diff --git a/npm/ng-packs/packages/theme-shared/src/lib/tokens/suppress-unsaved-changes-warning.token.ts b/npm/ng-packs/packages/theme-shared/src/lib/tokens/suppress-unsaved-changes-warning.token.ts index af68c8130c..b76a18706c 100644 --- a/npm/ng-packs/packages/theme-shared/src/lib/tokens/suppress-unsaved-changes-warning.token.ts +++ b/npm/ng-packs/packages/theme-shared/src/lib/tokens/suppress-unsaved-changes-warning.token.ts @@ -1,6 +1,5 @@ import { InjectionToken } from '@angular/core'; -// TODO: Should be documented export const SUPPRESS_UNSAVED_CHANGES_WARNING = new InjectionToken( 'SUPPRESS_UNSAVED_CHANGES_WARNING', ); diff --git a/npm/ng-packs/packages/theme-shared/src/lib/utils/index.ts b/npm/ng-packs/packages/theme-shared/src/lib/utils/index.ts index 9f290b5ca3..8f159e0a49 100644 --- a/npm/ng-packs/packages/theme-shared/src/lib/utils/index.ts +++ b/npm/ng-packs/packages/theme-shared/src/lib/utils/index.ts @@ -1,3 +1,2 @@ export * from './date-parser-formatter'; export * from './validation-utils'; -export * from './widget-utils'; diff --git a/npm/ng-packs/packages/theme-shared/src/test-setup.ts b/npm/ng-packs/packages/theme-shared/src/test-setup.ts index 713f967b86..ab68e1eb87 100644 --- a/npm/ng-packs/packages/theme-shared/src/test-setup.ts +++ b/npm/ng-packs/packages/theme-shared/src/test-setup.ts @@ -1,2 +1,2 @@ -import 'jest-canvas-mock'; import 'jest-preset-angular/setup-jest'; + diff --git a/npm/ng-packs/packages/theme-shared/tsconfig.json b/npm/ng-packs/packages/theme-shared/tsconfig.json index 692cc17b32..f34e44326c 100644 --- a/npm/ng-packs/packages/theme-shared/tsconfig.json +++ b/npm/ng-packs/packages/theme-shared/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../tsconfig.json", "files": [], "include": [], "references": [ diff --git a/npm/ng-packs/scripts/package.json b/npm/ng-packs/scripts/package.json index 3984a00b14..b0961239bb 100644 --- a/npm/ng-packs/scripts/package.json +++ b/npm/ng-packs/scripts/package.json @@ -17,7 +17,8 @@ "execa": "^2.0.3", "fs-extra": "^8.1.0", "glob": "^7.1.6", - "prompt-confirm": "^2.0.4" + "prompt-confirm": "^2.0.4", + "semver": "^7.3.5" }, "devDependencies": { "@types/fs-extra": "^8.0.1", diff --git a/npm/ng-packs/scripts/prod-build.ts b/npm/ng-packs/scripts/prod-build.ts index 33f2aa2c44..2f189020f4 100644 --- a/npm/ng-packs/scripts/prod-build.ts +++ b/npm/ng-packs/scripts/prod-build.ts @@ -17,15 +17,6 @@ import fse from 'fs-extra'; overwrite: true, }); - // TODO: Will be removed in v3.1, it is added to fix the prod build error - await fse.copy( - '../node_modules/@swimlane', - '../../../templates/app/angular/node_modules/@swimlane', - { - overwrite: true, - }, - ); - await execa('yarn', ['ng', 'build', '--prod'], { stdout: 'inherit', cwd: '../../../templates/app/angular', diff --git a/npm/ng-packs/scripts/publish.ts b/npm/ng-packs/scripts/publish.ts index 75f677b4b9..ecc0408f2b 100644 --- a/npm/ng-packs/scripts/publish.ts +++ b/npm/ng-packs/scripts/publish.ts @@ -2,6 +2,7 @@ import program from 'commander'; import execa from 'execa'; import fse from 'fs-extra'; import replaceWithPreview from './replace-with-preview'; +const semverParse = require('semver/functions/parse'); program .option( @@ -10,7 +11,6 @@ program ) .option('-r, --registry ', 'target npm server registry') .option('-p, --preview', 'publishes with preview tag') - .option('-r, --rc', 'publishes with next tag') .option('-g, --skipGit', 'skips git push'); program.parse(process.argv); @@ -50,7 +50,7 @@ program.parse(process.argv); let tag: string; if (program.preview) tag = 'preview'; - if (program.rc) tag = 'next'; + else if (semverParse(program.nextVersion).prerelease?.length) tag = 'next'; await execa( 'yarn', diff --git a/npm/ng-packs/scripts/yarn.lock b/npm/ng-packs/scripts/yarn.lock index 975620872f..0bee64a70e 100644 --- a/npm/ng-packs/scripts/yarn.lock +++ b/npm/ng-packs/scripts/yarn.lock @@ -834,6 +834,13 @@ loose-envify@^1.0.0: dependencies: js-tokens "^3.0.0 || ^4.0.0" +lru-cache@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" + integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== + dependencies: + yallist "^4.0.0" + make-error@^1.1.1: version "1.3.6" resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" @@ -1060,6 +1067,13 @@ regenerator-runtime@^0.11.0: resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9" integrity sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg== +semver@^7.3.5: + version "7.3.5" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.5.tgz#0b621c879348d8998e4b0e4be94b3f12e6018ef7" + integrity sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ== + dependencies: + lru-cache "^6.0.0" + set-getter@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/set-getter/-/set-getter-0.1.1.tgz#a3110e1b461d31a9cfc8c5c9ee2e9737ad447102" @@ -1263,6 +1277,11 @@ wrappy@1: resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= +yallist@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" + integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== + yn@3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" diff --git a/npm/ng-packs/tsconfig.base.json b/npm/ng-packs/tsconfig.json similarity index 77% rename from npm/ng-packs/tsconfig.base.json rename to npm/ng-packs/tsconfig.json index 415fcd2ce5..ba76bae351 100644 --- a/npm/ng-packs/tsconfig.base.json +++ b/npm/ng-packs/tsconfig.json @@ -15,20 +15,28 @@ "paths": { "@abp/ng.account": ["packages/account/src/public-api.ts"], "@abp/ng.account.core": ["packages/account-core/src/public-api.ts"], + "@abp/ng.account.core/proxy": ["packages/account-core/proxy/src/public-api.ts"], "@abp/ng.account/config": ["packages/account/config/src/public-api.ts"], "@abp/ng.components": ["packages/components/src/public-api.ts"], + "@abp/ng.components/chart.js": ["packages/components/chart.js/src/public-api.ts"], "@abp/ng.components/page": ["packages/components/page/src/public-api.ts"], "@abp/ng.components/tree": ["packages/components/tree/src/public-api.ts"], "@abp/ng.core": ["packages/core/src/public-api.ts"], "@abp/ng.core/locale": ["packages/core/locale/src/public-api.ts"], "@abp/ng.core/testing": ["packages/core/testing/src/public-api.ts"], "@abp/ng.feature-management": ["packages/feature-management/src/public-api.ts"], - "@abp/ng.identity": ["packages/identity//src/public-api.ts"], + "@abp/ng.feature-management/proxy": ["packages/feature-management/proxy/src/public-api.ts"], + "@abp/ng.identity": ["packages/identity/src/public-api.ts"], "@abp/ng.identity/config": ["packages/identity/config/src/public-api.ts"], + "@abp/ng.identity/proxy": ["packages/identity/proxy/src/public-api.ts"], "@abp/ng.permission-management": ["packages/permission-management/src/public-api.ts"], + "@abp/ng.permission-management/proxy": [ + "packages/permission-management/proxy/src/public-api.ts" + ], "@abp/ng.setting-management": ["packages/setting-management/src/public-api.ts"], "@abp/ng.setting-management/config": ["packages/setting-management/config/src/public-api.ts"], "@abp/ng.tenant-management": ["packages/tenant-management/src/public-api.ts"], + "@abp/ng.tenant-management/proxy": ["packages/tenant-management/proxy/src/public-api.ts"], "@abp/ng.tenant-management/config": ["packages/tenant-management/config/src/public-api.ts"], "@abp/ng.theme.basic": ["packages/theme-basic/src/public-api.ts"], "@abp/ng.theme.basic/testing": ["packages/theme-basic/testing/src/public-api.ts"], diff --git a/npm/ng-packs/yarn.lock b/npm/ng-packs/yarn.lock index dbc51cc020..1d605fa81a 100644 --- a/npm/ng-packs/yarn.lock +++ b/npm/ng-packs/yarn.lock @@ -118,7 +118,7 @@ chart.js "^2.9.3" tslib "^2.0.0" -"@abp/utils@^4.4.2": +"@abp/utils@^4.4.2", "@abp/utils@~4.4.2": version "4.4.2" resolved "https://registry.yarnpkg.com/@abp/utils/-/utils-4.4.2.tgz#33d1a8c1199241e0c926fb3fd2f439d2925d5db1" integrity sha512-o/1XGKSOPB+yQH6c+yyMNSr/r8rzb3PoHkxKqDNEGEf79L6EwJ8Wm+4wKaoHjVrYQtn+d/40PLEdvGEwQxVvCw== @@ -141,24 +141,24 @@ "@angular-devkit/core" "10.2.0" rxjs "6.6.2" -"@angular-devkit/architect@0.1202.5": - version "0.1202.5" - resolved "https://registry.yarnpkg.com/@angular-devkit/architect/-/architect-0.1202.5.tgz#6e08b4b5d629a37479fb7aacda08e755541809ae" - integrity sha512-HiF8RceDrvP7m8Qm53KWVpekESX0UIK4/tOg9mgFMcS/2utRnPzuu4WbfrcY9DRrsoMWLXQs6j/UVXqf8PzXJw== +"@angular-devkit/architect@0.1202.6": + version "0.1202.6" + resolved "https://registry.yarnpkg.com/@angular-devkit/architect/-/architect-0.1202.6.tgz#0e6e671e616dba5aad2dc5d6f1db906ca6268fa4" + integrity sha512-DQHK5VGfPof1TuSmRmt2Usw2BuNVLzxKSSy7+tEJbYzqf8N/wQO+1M67ye8qf8gAU88xGo378dD9++DFc/PJZA== dependencies: - "@angular-devkit/core" "12.2.5" + "@angular-devkit/core" "12.2.6" rxjs "6.6.7" "@angular-devkit/build-angular@~12.2.0": - version "12.2.5" - resolved "https://registry.yarnpkg.com/@angular-devkit/build-angular/-/build-angular-12.2.5.tgz#800c79e56b6f473c8fc0a2465e242f0b490c3854" - integrity sha512-v44FAFMGSXJLKx25REXdoTdW/WzNXV3BDJam9ZKHFOrdtwJek4D/tEdtNHiQP4HberOHzmVjvKffa5VYXzZ40g== + version "12.2.6" + resolved "https://registry.yarnpkg.com/@angular-devkit/build-angular/-/build-angular-12.2.6.tgz#a6185ce4495dd9f3949a4cb64022c5e3a651752c" + integrity sha512-FMmN7tuDtAqeCqUv65vzOSnwIG0MOLraZRUOXFqTN10jAE7DCqR97QSNNOhBPuqJcbv9IFxGMVbL1KLpsGwgcA== dependencies: "@ampproject/remapping" "1.0.1" - "@angular-devkit/architect" "0.1202.5" - "@angular-devkit/build-optimizer" "0.1202.5" - "@angular-devkit/build-webpack" "0.1202.5" - "@angular-devkit/core" "12.2.5" + "@angular-devkit/architect" "0.1202.6" + "@angular-devkit/build-optimizer" "0.1202.6" + "@angular-devkit/build-webpack" "0.1202.6" + "@angular-devkit/core" "12.2.6" "@babel/core" "7.14.8" "@babel/generator" "7.14.8" "@babel/helper-annotate-as-pure" "7.14.5" @@ -170,7 +170,7 @@ "@babel/template" "7.14.5" "@discoveryjs/json-ext" "0.5.3" "@jsdevtools/coverage-istanbul-loader" "3.0.5" - "@ngtools/webpack" "12.2.5" + "@ngtools/webpack" "12.2.6" ansi-colors "4.1.1" babel-loader "8.2.2" browserslist "^4.9.1" @@ -232,21 +232,21 @@ "@angular-devkit/architect" "0.1002.0" rxjs "6.6.2" -"@angular-devkit/build-optimizer@0.1202.5": - version "0.1202.5" - resolved "https://registry.yarnpkg.com/@angular-devkit/build-optimizer/-/build-optimizer-0.1202.5.tgz#c5eb6a5f453750fdf50af92df33dea65884ea835" - integrity sha512-ni3OyBQq7y1Jk9U7CtwWMRoI+1TWjQYVdGRWt5JgqvLk0hZcaLoapGwUypBV+CdKvC0/0V+k84RiO5wvs5XpFQ== +"@angular-devkit/build-optimizer@0.1202.6": + version "0.1202.6" + resolved "https://registry.yarnpkg.com/@angular-devkit/build-optimizer/-/build-optimizer-0.1202.6.tgz#53b25036a0a87d1a5944a053bab207740956ecc7" + integrity sha512-r9BZon2hriHVDoAcnYmsL9Rs84Nh7YUuioiDeJhk1qyuIVHL3akFTndl+ISQQIbNvb/kgZZ93DlYFw4D6DZ/NQ== dependencies: source-map "0.7.3" tslib "2.3.0" typescript "4.3.5" -"@angular-devkit/build-webpack@0.1202.5": - version "0.1202.5" - resolved "https://registry.yarnpkg.com/@angular-devkit/build-webpack/-/build-webpack-0.1202.5.tgz#96f345e78f71744b22e1c64ddfda9c93c98cc3e3" - integrity sha512-wqU2t2zUCZi+fjhuZzFko3eTyqXP6vjdqA3BZQwr3pEhL7IEOvlN4EUYqWAi+h+4SrTtAhk6vZ7m41Hr0y2Ykw== +"@angular-devkit/build-webpack@0.1202.6": + version "0.1202.6" + resolved "https://registry.yarnpkg.com/@angular-devkit/build-webpack/-/build-webpack-0.1202.6.tgz#2cd4ee1654adbdddceb62a35a3fe50f3f2e3107c" + integrity sha512-SEOIRmfv3KvoDqp9/n0d/99mDVRFxtkAOEkYlzylf4IUb6eP6Oux2+FcAGCIWXiWeedYImt+oK9q9l5iryfAOg== dependencies: - "@angular-devkit/architect" "0.1202.5" + "@angular-devkit/architect" "0.1202.6" rxjs "6.6.7" "@angular-devkit/core@10.2.0": @@ -283,10 +283,10 @@ rxjs "6.6.7" source-map "0.7.3" -"@angular-devkit/core@12.2.5": - version "12.2.5" - resolved "https://registry.yarnpkg.com/@angular-devkit/core/-/core-12.2.5.tgz#928fc35b28e1ed84243b0c09db97be1a9c85acdb" - integrity sha512-UBo0Q9nVGPxC+C1PONSzaczPLv5++5Q7PC2orZepDbWmY0jUDwe9VVJrmp8EhLZbzVKFpyCIs1ZE8h0s0LP1zA== +"@angular-devkit/core@12.2.6": + version "12.2.6" + resolved "https://registry.yarnpkg.com/@angular-devkit/core/-/core-12.2.6.tgz#594ef08e8441c7fef57c7949abde603faece06ce" + integrity sha512-E+OhY34Vmwyy1/PaX/nzao40XM70wOr7Urh00sAtV8sPLXMLeW0gHk4DUchCKohxQkrIL0AxYt1aeUVgIc7bSA== dependencies: ajv "8.6.2" ajv-formats "2.1.0" @@ -296,12 +296,12 @@ source-map "0.7.3" "@angular-devkit/schematics-cli@~12.2.0": - version "12.2.5" - resolved "https://registry.yarnpkg.com/@angular-devkit/schematics-cli/-/schematics-cli-12.2.5.tgz#93a264fe8e8a5fc7b1974a8da13478a8866b2c86" - integrity sha512-JJTj8DisB4jYh61G7bJauJ6TI3VQ+nngvPgH47+p0y2OhmlG8/1osIrxmUXBlFl63DwIIJaE+xFKjnBga+Apog== + version "12.2.6" + resolved "https://registry.yarnpkg.com/@angular-devkit/schematics-cli/-/schematics-cli-12.2.6.tgz#604d436870e40b62ac6dbf92c66ece3147b4feac" + integrity sha512-9w3VIux8LxKhAbqCirU4vMoO3Kvi+RTZ7pWsXRrF3oLq2VuaUdkSWqSXWnyWmUrWfPjfES6jTEKSN3zqJF4S0A== dependencies: - "@angular-devkit/core" "12.2.5" - "@angular-devkit/schematics" "12.2.5" + "@angular-devkit/core" "12.2.6" + "@angular-devkit/schematics" "12.2.6" ansi-colors "4.1.1" inquirer "8.1.2" minimist "1.2.5" @@ -316,12 +316,12 @@ ora "5.4.1" rxjs "6.6.7" -"@angular-devkit/schematics@12.2.5": - version "12.2.5" - resolved "https://registry.yarnpkg.com/@angular-devkit/schematics/-/schematics-12.2.5.tgz#2ca20be4bf5b411e1e29eceb479cb745bda50e16" - integrity sha512-8WAdZ39FZqbU1/ZQQrK+7PeRuj6QUGlxFUgoVXk5nzRbpZo/OSaKhPoC7sC1A0EU+7udLp5vT7R12sDz7Mr9vQ== +"@angular-devkit/schematics@12.2.6": + version "12.2.6" + resolved "https://registry.yarnpkg.com/@angular-devkit/schematics/-/schematics-12.2.6.tgz#5ea6bc8a0bf9194688c6dd55d2de276047cab4c5" + integrity sha512-CmDNOdJg08p5QrV8dNdg3O5ErYM1hJT06PLnVZzTWkShAL0y/3zxXAP/Wwdg0vAvt9Kh38jvMtC3YTCOThR/hA== dependencies: - "@angular-devkit/core" "12.2.5" + "@angular-devkit/core" "12.2.6" ora "5.4.1" rxjs "6.6.7" @@ -358,9 +358,9 @@ eslint-scope "^5.1.0" "@angular/animations@~12.2.0": - version "12.2.5" - resolved "https://registry.yarnpkg.com/@angular/animations/-/animations-12.2.5.tgz#b5b534f9f6ba65d1249d937bbad01de6cc9adcac" - integrity sha512-a8jRimgrATq2CS95SO5yjsZo2d4FbfmN2SrPu6lZjWIdstXm4KQSJFslyxovhoUjGNu5cZgzfXTvWkXRxJYCxA== + version "12.2.6" + resolved "https://registry.yarnpkg.com/@angular/animations/-/animations-12.2.6.tgz#6d544ec7ff0b5f149021d82a92060d3e2a6959c9" + integrity sha512-YVAaQvhNHyeRhHRnBofuLMtpmArv01Dyo5poc1VOBNdr+0AVGo+NIFM0nbXSMscxdeVTedgPdZK88knsIojlag== dependencies: tslib "^2.2.0" @@ -374,23 +374,23 @@ parse5 "^5.0.0" "@angular/cdk@^12.1.0": - version "12.2.5" - resolved "https://registry.yarnpkg.com/@angular/cdk/-/cdk-12.2.5.tgz#005c91eba34aa015a5a67b309b046008f8e69a5d" - integrity sha512-sB+chDISuQ2orEgWumVkEaaQ2Mkf5SDBlNGMwgwUV5a2eSp0wDprZS+3+H8lHc533z2Y4GOh6Apklku8XQT5qw== + version "12.2.6" + resolved "https://registry.yarnpkg.com/@angular/cdk/-/cdk-12.2.6.tgz#12aca217e30d96625b38ab83c0ca445f074ba41b" + integrity sha512-93H08rrsxJfY3ZvHINkFmCR4C0R0vFog4+uZ6PuW1YAZGClGVfivzjvMRN5hwqbANLV5xWzgsipMc2x0gIzcpg== dependencies: tslib "^2.2.0" optionalDependencies: parse5 "^5.0.0" "@angular/cli@~12.2.0": - version "12.2.5" - resolved "https://registry.yarnpkg.com/@angular/cli/-/cli-12.2.5.tgz#72e66fd6c9b503eace1644daf49731024567d061" - integrity sha512-O/NqRaFGx2jns03oWwhWBpilV4s7B8Zie6rgo2hJty1T3douGkK5kTO38N4Lebeayw8LTiPhT/JOrQTfFgXSjw== - dependencies: - "@angular-devkit/architect" "0.1202.5" - "@angular-devkit/core" "12.2.5" - "@angular-devkit/schematics" "12.2.5" - "@schematics/angular" "12.2.5" + version "12.2.6" + resolved "https://registry.yarnpkg.com/@angular/cli/-/cli-12.2.6.tgz#8f15667721004c769f1bdcd889ac0bc4eebbd235" + integrity sha512-nBCynOi5OVVAXA4ktsVhWP+UyWjjR/7+TlEjNgEfcbtlwkE+HIki+oHETAtXKdn5nPvNum3OXPLZPLX2B8MiRA== + dependencies: + "@angular-devkit/architect" "0.1202.6" + "@angular-devkit/core" "12.2.6" + "@angular-devkit/schematics" "12.2.6" + "@schematics/angular" "12.2.6" "@yarnpkg/lockfile" "1.1.0" ansi-colors "4.1.1" debug "4.3.2" @@ -408,16 +408,16 @@ uuid "8.3.2" "@angular/common@~12.2.0": - version "12.2.5" - resolved "https://registry.yarnpkg.com/@angular/common/-/common-12.2.5.tgz#a377fb9147e68fb343a762ad0707c85c01b02e74" - integrity sha512-iwyaGPx7ILTJn91ed7VtYkvVRRezaZ0EE2V5DzVXwCsBQyzCrBYz/Uo2udVDsJ2FXXhpxa2VjnkW55Uxl9wM0g== + version "12.2.6" + resolved "https://registry.yarnpkg.com/@angular/common/-/common-12.2.6.tgz#373f0a347088f7c46d2c94d89d3281613a920644" + integrity sha512-qDFmiNt1ptz2mVqac8jCXH0kEjcuyoLQTClMtx05R0LJ7EfXU9eBhGcNxiMXsKGkkNf1s2ksPwFz0dNWyZWDcg== dependencies: tslib "^2.2.0" "@angular/compiler-cli@^12.2.0": - version "12.2.5" - resolved "https://registry.yarnpkg.com/@angular/compiler-cli/-/compiler-cli-12.2.5.tgz#4d5221d8131cffadb50e038e76f6d2b7f65a59ef" - integrity sha512-KVpgkWUGZYRPvmJOqY1CZwjvc7VE0DYDPxmvXH/S1C6rzpl/UOTxYtDynxiNzuvLeV0oOnlcOGd4/BmMZJPh/A== + version "12.2.6" + resolved "https://registry.yarnpkg.com/@angular/compiler-cli/-/compiler-cli-12.2.6.tgz#d83e39110f94c2f68cc0f947c6f3840f9969bbd6" + integrity sha512-1W7LYqSHJjXO12tR7yUA3TspXXAbTE595Hz2bUCbHISaOUOqVlN6kCd9ccNQUrRL/GEaskAgIK9tNhngMD3LOA== dependencies: "@babel/core" "^7.8.6" "@babel/types" "^7.8.6" @@ -435,30 +435,30 @@ yargs "^17.0.0" "@angular/compiler@~12.2.0": - version "12.2.5" - resolved "https://registry.yarnpkg.com/@angular/compiler/-/compiler-12.2.5.tgz#6e5b583b316fb99d8ed49ba817c031c1846b9d03" - integrity sha512-J73E3hao95T8+/+hWuCqGyXs9QCPoSsCTXmSPayFlYJW3QF5SG2vhjnf4SAgtNbUBHQWAIwGKxQTqD3VbtvP1A== + version "12.2.6" + resolved "https://registry.yarnpkg.com/@angular/compiler/-/compiler-12.2.6.tgz#6fe022ee7f6c35fb208cb834e02c4c133f3ef0a6" + integrity sha512-EhY5xuH0SNTdSDEaw6iD6R9nOb2c3W5baYnn3cSahggvXHlG1dEA7QQ4FS1SJFg32TP4IXHn21XU7KHRzaDx0w== dependencies: tslib "^2.2.0" "@angular/core@~12.2.0": - version "12.2.5" - resolved "https://registry.yarnpkg.com/@angular/core/-/core-12.2.5.tgz#52eaabb648a2335ec88ca2e9f4c947a40e2e3560" - integrity sha512-bwxxEy1UrV+hWzjT6ow/Ge8upebglJwlWuKadPdd3ZVrWKPI0saoUUBv4S8EGiIxyW821GfEbzWzmBYUSUCiGQ== + version "12.2.6" + resolved "https://registry.yarnpkg.com/@angular/core/-/core-12.2.6.tgz#061279fc7843ccab2a61460a13978d45daa25bfc" + integrity sha512-yM64SrhKbuw1/9uepz98C7H7yPK1yUc8ni0lsPmMf2JYD850xxya9+fTTc4b/FmotHHadOeRkX1H+Wd3Ylu1Gw== dependencies: tslib "^2.2.0" "@angular/forms@~12.2.0": - version "12.2.5" - resolved "https://registry.yarnpkg.com/@angular/forms/-/forms-12.2.5.tgz#c190c1873ba856101323037147a0be906817bc82" - integrity sha512-Sty4MMrmUrm7KYbYYAkA6egwIMFJ8D8G6ds5W79fN7K3B3LGYtMTRuMIBYQeSvdk8AN5+Evt6BUwlL8PMYq9Rg== + version "12.2.6" + resolved "https://registry.yarnpkg.com/@angular/forms/-/forms-12.2.6.tgz#89bb8084f15d699ddd26ba45e6feb9eb8745e8ca" + integrity sha512-lY+A1q63C+ZIpbeVp9JP921lLawn7zELslV+DMd0hix7AXCG175OayeQPLXGFbHfYDRHL8QHTT+7X99k7sd3UA== dependencies: tslib "^2.2.0" "@angular/language-service@^12.2.0": - version "12.2.5" - resolved "https://registry.yarnpkg.com/@angular/language-service/-/language-service-12.2.5.tgz#30521f85fc800eaad2dac190582dffe418e347d4" - integrity sha512-UypVxx1/ArXvYiSqzpIc/MUv+NkyQzMgZ96z2rG2ALqEVe+/m0AZEtvT/pD94Z0wlZDeMVaToD3OhRkQ4om2aA== + version "12.2.6" + resolved "https://registry.yarnpkg.com/@angular/language-service/-/language-service-12.2.6.tgz#c6b90ac820323d01d3fa4e0ce93a5fb1dcafa0e3" + integrity sha512-4oKiWgJFCFIVIdMUgyNl/SA++rYjLa+rj0fU+Coi9lwtSpBIOWdLd9KnwtaU/JbdZjx1SSogy9+T9ylT/y0CMw== "@angular/localize@~10.0.10": version "10.0.14" @@ -470,23 +470,23 @@ yargs "15.3.0" "@angular/platform-browser-dynamic@~12.2.0": - version "12.2.5" - resolved "https://registry.yarnpkg.com/@angular/platform-browser-dynamic/-/platform-browser-dynamic-12.2.5.tgz#afce4e8d4127a3f9762ee09dc1774662d35732ad" - integrity sha512-GIAMw+KFYVFFtyvC3Z6znxLCJdZx/IvpfHQVekpQumiv291cng2jSamU3FZjV3xZKXfccS4I4hIXFX85EBMRWA== + version "12.2.6" + resolved "https://registry.yarnpkg.com/@angular/platform-browser-dynamic/-/platform-browser-dynamic-12.2.6.tgz#534d7e16d41a938b868a322806975950867bd5ed" + integrity sha512-ZS/ZZJOr7D9tycw6tFsvBHDZ/PDrGS6N+LBfKwLq8gvyK0LGJ4fk2auoRrO4Y6hmGL6GeJC8BdKtrn40jt2FBQ== dependencies: tslib "^2.2.0" "@angular/platform-browser@~12.2.0": - version "12.2.5" - resolved "https://registry.yarnpkg.com/@angular/platform-browser/-/platform-browser-12.2.5.tgz#b53f1e9cad5712961e4ccec1c167364b9634f51d" - integrity sha512-2Vs+0Zx87lGYvC3Bkzy9eT0yXXvMd0e8vrEJ1oIdxfkRhbE/wTL1+LA8JlT5rROqcZwY4joOPiHC9jVFw6dDCQ== + version "12.2.6" + resolved "https://registry.yarnpkg.com/@angular/platform-browser/-/platform-browser-12.2.6.tgz#c3985894407beba09a222cdfb96ceab134613674" + integrity sha512-uB3hgFhZ6sQM41rLEfyDourzJod3j7l2zr/wuF7I+dDN65ooYz+9inS49jy5YEUMesy9SSfh2AD8A+FZFLVqLA== dependencies: tslib "^2.2.0" "@angular/router@~12.2.0": - version "12.2.5" - resolved "https://registry.yarnpkg.com/@angular/router/-/router-12.2.5.tgz#532930124fe15263bcc976dcef9d3f9a771ebd73" - integrity sha512-rfaHzi6ZrLFqdebEQTMPxVEwLuA8MBGOUzyekhLjGTvKwc7L2/m303LPIDECRFyCSik3EIxGLvzPET0l+DVgAw== + version "12.2.6" + resolved "https://registry.yarnpkg.com/@angular/router/-/router-12.2.6.tgz#67707f1963c28b124a636147c948a0950d37398f" + integrity sha512-ao7Xqvopo14bVybOE3dUmIiVeJ3wJ33xauY4oqtoHw+KoBlhFbvwIV7MVUM95yFejc+2ZbUEar/bJUOkXuTCMg== dependencies: tslib "^2.2.0" @@ -729,18 +729,18 @@ "@babel/types" "^7.15.4" "@babel/helper-module-transforms@^7.14.5", "@babel/helper-module-transforms@^7.14.8", "@babel/helper-module-transforms@^7.15.4": - version "7.15.4" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.15.4.tgz#962cc629a7f7f9a082dd62d0307fa75fe8788d7c" - integrity sha512-9fHHSGE9zTC++KuXLZcB5FKgvlV83Ox+NLUmQTawovwlJ85+QMhk1CnVk406CQVj97LaWod6KVjl2Sfgw9Aktw== + version "7.15.7" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.15.7.tgz#7da80c8cbc1f02655d83f8b79d25866afe50d226" + integrity sha512-ZNqjjQG/AuFfekFTY+7nY4RgBSklgTu970c7Rj3m/JOhIu5KPBUuTA9AY6zaKcUvk4g6EbDXdBnhi35FAssdSw== dependencies: "@babel/helper-module-imports" "^7.15.4" "@babel/helper-replace-supers" "^7.15.4" "@babel/helper-simple-access" "^7.15.4" "@babel/helper-split-export-declaration" "^7.15.4" - "@babel/helper-validator-identifier" "^7.14.9" + "@babel/helper-validator-identifier" "^7.15.7" "@babel/template" "^7.15.4" "@babel/traverse" "^7.15.4" - "@babel/types" "^7.15.4" + "@babel/types" "^7.15.6" "@babel/helper-optimise-call-expression@^7.15.4": version "7.15.4" @@ -794,10 +794,10 @@ dependencies: "@babel/types" "^7.15.4" -"@babel/helper-validator-identifier@^7.14.5", "@babel/helper-validator-identifier@^7.14.9": - version "7.14.9" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.9.tgz#6654d171b2024f6d8ee151bf2509699919131d48" - integrity sha512-pQYxPY0UP6IHISRitNe8bsijHex4TWZXi2HwKVsjPiltzlhse2znVcm9Ace510VT1kxIHjGJCZZQBX2gJDbo0g== +"@babel/helper-validator-identifier@^7.14.5", "@babel/helper-validator-identifier@^7.14.9", "@babel/helper-validator-identifier@^7.15.7": + version "7.15.7" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.15.7.tgz#220df993bfe904a4a6b02ab4f3385a5ebf6e2389" + integrity sha512-K4JvCtQqad9OY2+yTU8w+E82ywk/fe+ELNlt1G8z3bVGlZfn/hOcQQsUhGhW/N+tb3fxK800wLtKOE/aM0m72w== "@babel/helper-validator-option@^7.14.5": version "7.14.5" @@ -833,9 +833,9 @@ js-tokens "^4.0.0" "@babel/parser@^7.1.0", "@babel/parser@^7.14.5", "@babel/parser@^7.14.8", "@babel/parser@^7.15.4", "@babel/parser@^7.15.5", "@babel/parser@^7.7.2", "@babel/parser@^7.8.3": - version "7.15.6" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.15.6.tgz#043b9aa3c303c0722e5377fef9197f4cf1796549" - integrity sha512-S/TSCcsRuCkmpUuoWijua0Snt+f3ewU/8spLo+4AXJCZfT0bVCzLD5MuOKdrx0mlAptbKzn5AdgEIIKXxXkz9Q== + version "7.15.7" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.15.7.tgz#0c3ed4a2eb07b165dfa85b3cc45c727334c4edae" + integrity sha512-rycZXvQ+xS9QyIcJ9HXeDWf1uxqlbVFAUq0Rq0dbc50Zb/+wUe/ehyfzGfm9KZZF0kBejYgxltBXocP+gKdL2g== "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@^7.14.5", "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@^7.15.4": version "7.15.4" @@ -1705,27 +1705,27 @@ resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.3.tgz#e45e384e4b8ec16bce2fd903af78450f6bf7ec98" integrity sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA== -"@jest/console@^27.0.6", "@jest/console@^27.1.1": - version "27.1.1" - resolved "https://registry.yarnpkg.com/@jest/console/-/console-27.1.1.tgz#e1eb8ef8a410e75e80bb17429047ed5d43411d20" - integrity sha512-VpQJRsWSeAem0zpBjeRtDbcD6DlbNoK11dNYt+PSQ+DDORh9q2/xyEpErfwgnLjWX0EKkSZmTGx/iH9Inzs6vQ== +"@jest/console@^27.0.6", "@jest/console@^27.2.0": + version "27.2.0" + resolved "https://registry.yarnpkg.com/@jest/console/-/console-27.2.0.tgz#57f702837ec52899be58c3794dce5941c77a8b63" + integrity sha512-35z+RqsK2CCgNxn+lWyK8X4KkaDtfL4BggT7oeZ0JffIiAiEYFYPo5B67V50ZubqDS1ehBrdCR2jduFnIrZOYw== dependencies: "@jest/types" "^27.1.1" "@types/node" "*" chalk "^4.0.0" - jest-message-util "^27.1.1" - jest-util "^27.1.1" + jest-message-util "^27.2.0" + jest-util "^27.2.0" slash "^3.0.0" -"@jest/core@^27.0.3", "@jest/core@^27.1.1": - version "27.1.1" - resolved "https://registry.yarnpkg.com/@jest/core/-/core-27.1.1.tgz#d9d42214920cb96c2a6cc48517cf62d4351da3aa" - integrity sha512-oCkKeTgI0emznKcLoq5OCD0PhxCijA4l7ejDnWW3d5bgSi+zfVaLybVqa+EQOxpNejQWtTna7tmsAXjMN9N43Q== +"@jest/core@^27.0.3", "@jest/core@^27.2.0": + version "27.2.0" + resolved "https://registry.yarnpkg.com/@jest/core/-/core-27.2.0.tgz#61fc27b244e9709170ed9ffe41b006add569f1b3" + integrity sha512-E/2NHhq+VMo18DpKkoty8Sjey8Kps5Cqa88A8NP757s6JjYqPdioMuyUBhDiIOGCdQByEp0ou3jskkTszMS0nw== dependencies: - "@jest/console" "^27.1.1" - "@jest/reporters" "^27.1.1" - "@jest/test-result" "^27.1.1" - "@jest/transform" "^27.1.1" + "@jest/console" "^27.2.0" + "@jest/reporters" "^27.2.0" + "@jest/test-result" "^27.2.0" + "@jest/transform" "^27.2.0" "@jest/types" "^27.1.1" "@types/node" "*" ansi-escapes "^4.2.1" @@ -1734,54 +1734,54 @@ exit "^0.1.2" graceful-fs "^4.2.4" jest-changed-files "^27.1.1" - jest-config "^27.1.1" - jest-haste-map "^27.1.1" - jest-message-util "^27.1.1" + jest-config "^27.2.0" + jest-haste-map "^27.2.0" + jest-message-util "^27.2.0" jest-regex-util "^27.0.6" - jest-resolve "^27.1.1" - jest-resolve-dependencies "^27.1.1" - jest-runner "^27.1.1" - jest-runtime "^27.1.1" - jest-snapshot "^27.1.1" - jest-util "^27.1.1" - jest-validate "^27.1.1" - jest-watcher "^27.1.1" + jest-resolve "^27.2.0" + jest-resolve-dependencies "^27.2.0" + jest-runner "^27.2.0" + jest-runtime "^27.2.0" + jest-snapshot "^27.2.0" + jest-util "^27.2.0" + jest-validate "^27.2.0" + jest-watcher "^27.2.0" micromatch "^4.0.4" p-each-series "^2.1.0" rimraf "^3.0.0" slash "^3.0.0" strip-ansi "^6.0.0" -"@jest/environment@^27.1.1": - version "27.1.1" - resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-27.1.1.tgz#a1f7a552f7008f773988b9c0e445ede35f77bbb7" - integrity sha512-+y882/ZdxhyqF5RzxIrNIANjHj991WH7jifdcplzMDosDUOyCACFYUyVTBGbSTocbU+s1cesroRzkwi8hZ9SHg== +"@jest/environment@^27.2.0": + version "27.2.0" + resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-27.2.0.tgz#48d1dbfa65f8e4a5a5c6cbeb9c59d1a5c2776f6b" + integrity sha512-iPWmQI0wRIYSZX3wKu4FXHK4eIqkfq6n1DCDJS+v3uby7SOXrHvX4eiTBuEdSvtDRMTIH2kjrSkjHf/F9JIYyQ== dependencies: - "@jest/fake-timers" "^27.1.1" + "@jest/fake-timers" "^27.2.0" "@jest/types" "^27.1.1" "@types/node" "*" jest-mock "^27.1.1" -"@jest/fake-timers@^27.1.1": - version "27.1.1" - resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-27.1.1.tgz#557a1c0d067d33bcda4dfae9a7d8f96a15a954b5" - integrity sha512-u8TJ5VlsVYTsGFatoyIae2l25pku4Bu15QCPTx2Gs5z+R//Ee3tHN85462Vc9yGVcdDvgADbqNkhOLxbEwPjMQ== +"@jest/fake-timers@^27.2.0": + version "27.2.0" + resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-27.2.0.tgz#560841bc21ae7fbeff0cbff8de8f5cf43ad3561d" + integrity sha512-gSu3YHvQOoVaTWYGgHFB7IYFtcF2HBzX4l7s47VcjvkUgL4/FBnE20x7TNLa3W6ABERtGd5gStSwsA8bcn+c4w== dependencies: "@jest/types" "^27.1.1" "@sinonjs/fake-timers" "^7.0.2" "@types/node" "*" - jest-message-util "^27.1.1" + jest-message-util "^27.2.0" jest-mock "^27.1.1" - jest-util "^27.1.1" + jest-util "^27.2.0" -"@jest/globals@^27.1.1": - version "27.1.1" - resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-27.1.1.tgz#cfe5f4d5b37483cef62b79612128ccc7e3c951d8" - integrity sha512-Q3JcTPmY+DAEHnr4MpnBV3mwy50EGrTC6oSDTNnW7FNGGacTJAfpWNk02D7xv422T1OzK2A2BKx+26xJOvHkyw== +"@jest/globals@^27.2.0": + version "27.2.0" + resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-27.2.0.tgz#4d7085f51df5ac70c8240eb3501289676503933d" + integrity sha512-raqk9Gf9WC3hlBa57rmRmJfRl9hom2b+qEE/ifheMtwn5USH5VZxzrHHOZg0Zsd/qC2WJ8UtyTwHKQAnNlDMdg== dependencies: - "@jest/environment" "^27.1.1" + "@jest/environment" "^27.2.0" "@jest/types" "^27.1.1" - expect "^27.1.1" + expect "^27.2.0" "@jest/reporters@27.0.6": version "27.0.6" @@ -1813,15 +1813,15 @@ terminal-link "^2.0.0" v8-to-istanbul "^8.0.0" -"@jest/reporters@^27.1.1": - version "27.1.1" - resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-27.1.1.tgz#ee5724092f197bb78c60affb9c6f34b6777990c2" - integrity sha512-cEERs62n1P4Pqox9HWyNOEkP57G95aK2mBjB6D8Ruz1Yc98fKH53b58rlVEnsY5nLmkLNZk65fxNi9C0Yds/8w== +"@jest/reporters@^27.2.0": + version "27.2.0" + resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-27.2.0.tgz#629886d9a42218e504a424889a293abb27919e25" + integrity sha512-7wfkE3iRTLaT0F51h1mnxH3nQVwDCdbfgXiLuCcNkF1FnxXLH9utHqkSLIiwOTV1AtmiE0YagHbOvx4rnMP/GA== dependencies: "@bcoe/v8-coverage" "^0.2.3" - "@jest/console" "^27.1.1" - "@jest/test-result" "^27.1.1" - "@jest/transform" "^27.1.1" + "@jest/console" "^27.2.0" + "@jest/test-result" "^27.2.0" + "@jest/transform" "^27.2.0" "@jest/types" "^27.1.1" chalk "^4.0.0" collect-v8-coverage "^1.0.0" @@ -1833,10 +1833,10 @@ istanbul-lib-report "^3.0.0" istanbul-lib-source-maps "^4.0.0" istanbul-reports "^3.0.2" - jest-haste-map "^27.1.1" - jest-resolve "^27.1.1" - jest-util "^27.1.1" - jest-worker "^27.1.1" + jest-haste-map "^27.2.0" + jest-resolve "^27.2.0" + jest-util "^27.2.0" + jest-worker "^27.2.0" slash "^3.0.0" source-map "^0.6.0" string-length "^4.0.1" @@ -1862,30 +1862,30 @@ "@types/istanbul-lib-coverage" "^2.0.0" collect-v8-coverage "^1.0.0" -"@jest/test-result@^27.0.6", "@jest/test-result@^27.1.1": - version "27.1.1" - resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-27.1.1.tgz#1086b39af5040b932a55e7f1fa1bc4671bed4781" - integrity sha512-8vy75A0Jtfz9DqXFUkjC5Co/wRla+D7qRFdShUY8SbPqBS3GBx3tpba7sGKFos8mQrdbe39n+c1zgVKtarfy6A== +"@jest/test-result@^27.0.6", "@jest/test-result@^27.2.0": + version "27.2.0" + resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-27.2.0.tgz#377b46a41a6415dd4839fd0bed67b89fecea6b20" + integrity sha512-JPPqn8h0RGr4HyeY1Km+FivDIjTFzDROU46iAvzVjD42ooGwYoqYO/MQTilhfajdz6jpVnnphFrKZI5OYrBONA== dependencies: - "@jest/console" "^27.1.1" + "@jest/console" "^27.2.0" "@jest/types" "^27.1.1" "@types/istanbul-lib-coverage" "^2.0.0" collect-v8-coverage "^1.0.0" -"@jest/test-sequencer@^27.0.6", "@jest/test-sequencer@^27.1.1": - version "27.1.1" - resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-27.1.1.tgz#cea3722ec6f6330000240fd999ad3123adaf5992" - integrity sha512-l8zD3EdeixvwmLNlJoMX3hhj8iIze95okj4sqmBzOq/zW8gZLElUveH4bpKEMuR+Nweazjlwc7L6g4C26M/y6Q== +"@jest/test-sequencer@^27.0.6", "@jest/test-sequencer@^27.2.0": + version "27.2.0" + resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-27.2.0.tgz#b02b507687825af2fdc84e90c539d36fd8cf7bc9" + integrity sha512-PrqarcpzOU1KSAK7aPwfL8nnpaqTMwPe7JBPnaOYRDSe/C6AoJiL5Kbnonqf1+DregxZIRAoDg69R9/DXMGqXA== dependencies: - "@jest/test-result" "^27.1.1" + "@jest/test-result" "^27.2.0" graceful-fs "^4.2.4" - jest-haste-map "^27.1.1" - jest-runtime "^27.1.1" + jest-haste-map "^27.2.0" + jest-runtime "^27.2.0" -"@jest/transform@^27.0.6", "@jest/transform@^27.1.1": - version "27.1.1" - resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-27.1.1.tgz#51a22f5a48d55d796c02757117c02fcfe4da13d7" - integrity sha512-qM19Eu75U6Jc5zosXXVnq900Nl9JDpoGaZ4Mg6wZs7oqbu3heYSMOZS19DlwjlhWdfNRjF4UeAgkrCJCK3fEXg== +"@jest/transform@^27.0.6", "@jest/transform@^27.2.0": + version "27.2.0" + resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-27.2.0.tgz#e7e6e49d2591792db2385c33cdbb4379d407068d" + integrity sha512-Q8Q/8xXIZYllk1AF7Ou5sV3egOZsdY/Wlv09CSbcexBRcC1Qt6lVZ7jRFAZtbHsEEzvOCyFEC4PcrwKwyjXtCg== dependencies: "@babel/core" "^7.1.0" "@jest/types" "^27.1.1" @@ -1894,9 +1894,9 @@ convert-source-map "^1.4.0" fast-json-stable-stringify "^2.0.0" graceful-fs "^4.2.4" - jest-haste-map "^27.1.1" + jest-haste-map "^27.2.0" jest-regex-util "^27.0.6" - jest-util "^27.1.1" + jest-util "^27.2.0" micromatch "^4.0.4" pirates "^4.0.1" slash "^3.0.0" @@ -2629,10 +2629,10 @@ replace-in-file "6.2.0" tslib "^2.1.0" -"@ngtools/webpack@12.2.5": - version "12.2.5" - resolved "https://registry.yarnpkg.com/@ngtools/webpack/-/webpack-12.2.5.tgz#f0077e302434b00bc67924142c88a844f320f7b9" - integrity sha512-wc+ovfJucCxAjoP3ExnJll8K3nAoNCiFyDEO8dgHkriY/IWhGdwOu1eduHgfT/mWS40Awj/inJJir9oTi4YBVg== +"@ngtools/webpack@12.2.6": + version "12.2.6" + resolved "https://registry.yarnpkg.com/@ngtools/webpack/-/webpack-12.2.6.tgz#9bb1c1b9b21deceee183e5eae96db7350caefdcd" + integrity sha512-LuQXKVH0m85+GT8tldrSBmmgyHycxXkbLaJNtuYGK358dJ9tBdyOPXn7GZzHvpVL5Zdpu/ahuFN2PbFzN+qX/A== "@ngx-validate/core@^0.0.13": version "0.0.13" @@ -2891,9 +2891,9 @@ yargs-parser "20.0.0" "@octokit/auth-token@^2.4.4": - version "2.4.5" - resolved "https://registry.yarnpkg.com/@octokit/auth-token/-/auth-token-2.4.5.tgz#568ccfb8cb46f36441fac094ce34f7a875b197f3" - integrity sha512-BpGYsPgJt05M7/L/5FoE1PiAbdxXFZkX/3kDYcsvd1v6UhlnE5e96dTDr0ezX/EFwciQxf3cNV0loipsURU+WA== + version "2.5.0" + resolved "https://registry.yarnpkg.com/@octokit/auth-token/-/auth-token-2.5.0.tgz#27c37ea26c205f28443402477ffd261311f21e36" + integrity sha512-r5FVUJCOLl19AxiuZD2VRZ/ORjp/4IN98Of6YJoJOkY75CIBuYfmiNHGrDwXr+aLGG55igl9QrxX3hbiXlLb+g== dependencies: "@octokit/types" "^6.0.3" @@ -2928,10 +2928,10 @@ "@octokit/types" "^6.0.3" universal-user-agent "^6.0.0" -"@octokit/openapi-types@^10.1.0": - version "10.1.1" - resolved "https://registry.yarnpkg.com/@octokit/openapi-types/-/openapi-types-10.1.1.tgz#74607482d193e9c9cc7e23ecf04b1bde3eabb6d8" - integrity sha512-ygp/6r25Ezb1CJuVMnFfOsScEtPF0zosdTJDZ7mZ+I8IULl7DP1BS5ZvPRwglcarGPXOvS5sHdR0bjnVDDfQdQ== +"@octokit/openapi-types@^10.2.2": + version "10.2.2" + resolved "https://registry.yarnpkg.com/@octokit/openapi-types/-/openapi-types-10.2.2.tgz#6c1c839d7d169feabaf1d2a69c79439c75d979cd" + integrity sha512-EVcXQ+ZrC04cg17AMg1ofocWMxHDn17cB66ZHgYc0eUwjFtxS0oBzkyw2VqIrHBwVgtfoYrq1WMQfQmMjUwthw== "@octokit/plugin-enterprise-rest@^6.0.1": version "6.0.1" @@ -2939,11 +2939,11 @@ integrity sha512-93uGjlhUD+iNg1iWhUENAtJata6w5nE+V4urXOAlIXdco6xNZtUSfYY8dzp3Udy74aqO/B5UZL80x/YMa5PKRw== "@octokit/plugin-paginate-rest@^2.16.0": - version "2.16.0" - resolved "https://registry.yarnpkg.com/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.16.0.tgz#09dbda2e5fbca022e3cdf76b63618f7b357c9f0c" - integrity sha512-8YYzALPMvEZ35kgy5pdYvQ22Roz+BIuEaedO575GwE2vb/ACDqQn0xQrTJR4tnZCJn7pi8+AWPVjrFDaERIyXQ== + version "2.16.3" + resolved "https://registry.yarnpkg.com/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.16.3.tgz#6dbf74a12a53e04da6ca731d4c93f20c0b5c6fe9" + integrity sha512-kdc65UEsqze/9fCISq6BxLzeB9qf0vKvKojIfzgwf4tEF+Wy6c9dXnPFE6vgpoDFB1Z5Jek5WFVU6vL1w22+Iw== dependencies: - "@octokit/types" "^6.26.0" + "@octokit/types" "^6.28.1" "@octokit/plugin-request-log@^1.0.4": version "1.0.4" @@ -2951,11 +2951,11 @@ integrity sha512-mLUsMkgP7K/cnFEw07kWqXGF5LKrOkD+lhCrKvPHXWDywAwuDUeDwWBpc69XK3pNX0uKiVt8g5z96PJ6z9xCFA== "@octokit/plugin-rest-endpoint-methods@^5.9.0": - version "5.10.1" - resolved "https://registry.yarnpkg.com/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-5.10.1.tgz#9683c4cf476fb6c80f668c4b468919e69c71f66a" - integrity sha512-Rf1iMl40I0dIxjh1g32qZ6Ym/uT8QWZMm2vYGG5Vi8SX1MwZvbuxEGXYgmzTUWSD3PYWSLilE2+4L8kmdLGTMg== + version "5.10.4" + resolved "https://registry.yarnpkg.com/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-5.10.4.tgz#97e85eb7375e30b9bf193894670f9da205e79408" + integrity sha512-Dh+EAMCYR9RUHwQChH94Skl0lM8Fh99auT8ggck/xTzjJrwVzvsd0YH68oRPqp/HxICzmUjLfaQ9sy1o1sfIiA== dependencies: - "@octokit/types" "^6.27.0" + "@octokit/types" "^6.28.1" deprecation "^2.3.1" "@octokit/request-error@^2.0.5", "@octokit/request-error@^2.1.0": @@ -2989,12 +2989,12 @@ "@octokit/plugin-request-log" "^1.0.4" "@octokit/plugin-rest-endpoint-methods" "^5.9.0" -"@octokit/types@^6.0.3", "@octokit/types@^6.16.1", "@octokit/types@^6.26.0", "@octokit/types@^6.27.0": - version "6.27.0" - resolved "https://registry.yarnpkg.com/@octokit/types/-/types-6.27.0.tgz#2ffcd4d1cf344285f4151978c6fd36a2edcdf922" - integrity sha512-ha27f8DToxXBPEJdzHCCuqpw7AgKfjhWGdNf3yIlBAhAsaexBXTfWw36zNSsncALXGvJq4EjLy1p3Wz45Aqb4A== +"@octokit/types@^6.0.3", "@octokit/types@^6.16.1", "@octokit/types@^6.28.1": + version "6.28.1" + resolved "https://registry.yarnpkg.com/@octokit/types/-/types-6.28.1.tgz#ab990d1fe952226055e81c7650480e6bacfb877c" + integrity sha512-XlxDoQLFO5JnFZgKVQTYTvXRsQFfr/GwDUU108NJ9R5yFPkA2qXhTJjYuul3vE4eLXP40FA2nysOu2zd6boE+w== dependencies: - "@octokit/openapi-types" "^10.1.0" + "@octokit/openapi-types" "^10.2.2" "@phenomnomnominal/tsquery@4.1.1": version "4.1.1" @@ -3044,13 +3044,13 @@ estree-walker "^1.0.1" picomatch "^2.2.2" -"@schematics/angular@12.2.5", "@schematics/angular@~12.2.0": - version "12.2.5" - resolved "https://registry.yarnpkg.com/@schematics/angular/-/angular-12.2.5.tgz#5ff5f0fdd219a5994f9f4b94ec4f6b24f63d672b" - integrity sha512-Ln2GyO7Y00PrQKjqCONCDb4dwGzGboH3zIJvicWzFO+ZgkNLr/dsitGKm8b8OfR/UEiBcnK72xwPj9FWfXA4EQ== +"@schematics/angular@12.2.6", "@schematics/angular@~12.2.0": + version "12.2.6" + resolved "https://registry.yarnpkg.com/@schematics/angular/-/angular-12.2.6.tgz#bf48e80e9b1db406d0eb7a5200d0f8661d1d05f2" + integrity sha512-53yVIB43jPpqitJXT5IxPm9Kq1P8AyRgzrCIKAl4mESsPsOIFR6ZCpuNRlaumEinHnbMpgzZ2M+RlialzAOS6w== dependencies: - "@angular-devkit/core" "12.2.5" - "@angular-devkit/schematics" "12.2.5" + "@angular-devkit/core" "12.2.6" + "@angular-devkit/schematics" "12.2.6" jsonc-parser "3.0.0" "@schematics/angular@~12.1.0": @@ -3063,9 +3063,9 @@ jsonc-parser "3.0.0" "@sindresorhus/is@^4.0.0": - version "4.1.0" - resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-4.1.0.tgz#3853c0c48b47f0ebcdd3cd9a66fdd0d277173e78" - integrity sha512-Cgva8HxclecUCmAImsWsbZGUh6p5DSzQ8l2Uzxuj9ANiD7LVhLM1UJ2hX/R2Y+ILpvqgW9QjmTCaBkXtj8+UOg== + version "4.2.0" + resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-4.2.0.tgz#667bfc6186ae7c9e0b45a08960c551437176e1ca" + integrity sha512-VkE3KLBmJwcCaVARtQpfuKcKv8gcBmUubrfHGF84dXuuW6jgsRYxPtzcIhPyK9WAPpRt2/xY6zkD9MnRaJzSyw== "@sinonjs/commons@^1.7.0": version "1.8.3" @@ -3119,10 +3119,10 @@ resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-1.1.2.tgz#ccb91445360179a04e7fe6aff78c00ffc1eeaf82" integrity sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw== -"@trysound/sax@0.1.1": - version "0.1.1" - resolved "https://registry.yarnpkg.com/@trysound/sax/-/sax-0.1.1.tgz#3348564048e7a2d7398c935d466c0414ebb6a669" - integrity sha512-Z6DoceYb/1xSg5+e+ZlPZ9v0N16ZvZ+wYMraFue4HYrE4ttONKtsvruIRf6t9TBR0YvSOfi1hUU0fJfBLCDYow== +"@trysound/sax@0.2.0": + version "0.2.0" + resolved "https://registry.yarnpkg.com/@trysound/sax/-/sax-0.2.0.tgz#cccaab758af56761eb7bf37af6f03f326dd798ad" + integrity sha512-L7z9BgrNEcYyUYtF+HaEfiS5ebkh9jXqbszz7pC0hRBPaatV0XjSD3+eHrpqFemQfgwiFF0QPIarnIihIDn7OA== "@types/aria-query@^4.2.0": version "4.2.2" @@ -3273,9 +3273,9 @@ integrity sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ== "@types/node@*": - version "16.9.1" - resolved "https://registry.yarnpkg.com/@types/node/-/node-16.9.1.tgz#0611b37db4246c937feef529ddcc018cf8e35708" - integrity sha512-QpLcX9ZSsq3YYUUnD3nFDY8H7wctAhQj/TFKL8Ya8v5fMm3CFXxo8zStsLAl780ltoYoo1WvKUVGBQK+1ifr7g== + version "16.9.4" + resolved "https://registry.yarnpkg.com/@types/node/-/node-16.9.4.tgz#a12f0ee7847cf17a97f6fdf1093cb7a9af23cca4" + integrity sha512-KDazLNYAGIuJugdbULwFZULF9qQ13yNWEBFnfVpqlpgAAo6H/qnM9RjBgh0A0kmHf3XxAKLdN5mTIng9iUvVLA== "@types/node@14.14.33": version "14.14.33" @@ -3283,9 +3283,9 @@ integrity sha512-oJqcTrgPUF29oUP8AsUqbXGJNuPutsetaa9kTQAQce5Lx5dTYWV02ScBiT/k1BX/Z7pKeqedmvp39Wu4zR7N7g== "@types/node@^14.14.31": - version "14.17.15" - resolved "https://registry.yarnpkg.com/@types/node/-/node-14.17.15.tgz#d5ebfb62a69074ebb85cbe0529ad917bb8f2bae8" - integrity sha512-D1sdW0EcSCmNdLKBGMYb38YsHUS6JcM7yQ6sLQ9KuZ35ck7LYCKE7kYFHOO59ayFOY3zobWVZxf4KXhYHcHYFA== + version "14.17.17" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.17.17.tgz#4ec7b71bbcb01a4e55455b60b18b1b6a783fe31d" + integrity sha512-niAjcewgEYvSPCZm3OaM9y6YQrL2SEPH9PymtE6fuZAvFiP6ereCcvApGl2jKTq7copTIguX3PBvfP08LN4LvQ== "@types/normalize-package-data@^2.4.0": version "2.4.1" @@ -3937,7 +3937,7 @@ ajv@8.6.0: require-from-string "^2.0.2" uri-js "^4.2.2" -ajv@8.6.2, ajv@^8.0.0, ajv@^8.0.1: +ajv@8.6.2: version "8.6.2" resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.6.2.tgz#2fb45e0e5fcbc0813326c1c3da535d1881bb0571" integrity sha512-9807RlWAgT564wT+DjeyU5OFMPjmzxVobvDFmNAhY+5zD6A2ly3jDp6sgnfyDtlIQ+7H97oc/DGCzzfu9rjw9w== @@ -3947,6 +3947,16 @@ ajv@8.6.2, ajv@^8.0.0, ajv@^8.0.1: require-from-string "^2.0.2" uri-js "^4.2.2" +ajv@^8.0.0, ajv@^8.0.1: + version "8.6.3" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.6.3.tgz#11a66527761dc3e9a3845ea775d2d3c0414e8764" + integrity sha512-SMJOdDP6LqTkD0Uq8qLi+gMwSt0imXLSV080qFVwJCpH9U6Mb+SUGHAXM0KNbcBPguytWyvFxcHgMLe2D2XSpw== + dependencies: + fast-deep-equal "^3.1.1" + json-schema-traverse "^1.0.0" + require-from-string "^2.0.2" + uri-js "^4.2.2" + alphanum-sort@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/alphanum-sort/-/alphanum-sort-1.0.2.tgz#97a1119649b211ad33691d9f9f486a8ec9fbe0a3" @@ -4005,9 +4015,9 @@ ansi-regex@^4.1.0: integrity sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg== ansi-regex@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75" - integrity sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg== + version "5.0.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" + integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== ansi-styles@^2.2.1: version "2.2.1" @@ -4274,16 +4284,16 @@ axobject-query@^2.2.0: resolved "https://registry.yarnpkg.com/axobject-query/-/axobject-query-2.2.0.tgz#943d47e10c0b704aa42275e20edf3722648989be" integrity sha512-Td525n+iPOOyUQIeBfcASuG6uJsDOITl7Mds5gFyerkWiX7qhUTdYUBlSgNMyVqtSJqwpt1kXGLdUt6SykLMRA== -babel-jest@^27.0.6, babel-jest@^27.1.1: - version "27.1.1" - resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-27.1.1.tgz#9359c45995d0940b84d2176ab83423f9eed07617" - integrity sha512-JA+dzJl4n2RBvWQEnph6HJaTHrsIPiXGQYatt/D8nR4UpX9UG4GaDzykVVPQBbrdTebZREkRb6SOxyIXJRab6Q== +babel-jest@^27.0.6, babel-jest@^27.2.0: + version "27.2.0" + resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-27.2.0.tgz#c0f129a81f1197028aeb4447acbc04564c8bfc52" + integrity sha512-bS2p+KGGVVmWXBa8+i6SO/xzpiz2Q/2LnqLbQknPKefWXVZ67YIjA4iXup/jMOEZplga9PpWn+wrdb3UdDwRaA== dependencies: - "@jest/transform" "^27.1.1" + "@jest/transform" "^27.2.0" "@jest/types" "^27.1.1" "@types/babel__core" "^7.1.14" babel-plugin-istanbul "^6.0.0" - babel-preset-jest "^27.0.6" + babel-preset-jest "^27.2.0" chalk "^4.0.0" graceful-fs "^4.2.4" slash "^3.0.0" @@ -4316,10 +4326,10 @@ babel-plugin-istanbul@^6.0.0: istanbul-lib-instrument "^4.0.0" test-exclude "^6.0.0" -babel-plugin-jest-hoist@^27.0.6: - version "27.0.6" - resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-27.0.6.tgz#f7c6b3d764af21cb4a2a1ab6870117dbde15b456" - integrity sha512-CewFeM9Vv2gM7Yr9n5eyyLVPRSiBnk6lKZRjgwYnGKSl9M14TMn2vkN02wTF04OGuSDLEzlWiMzvjXuW9mB6Gw== +babel-plugin-jest-hoist@^27.2.0: + version "27.2.0" + resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-27.2.0.tgz#79f37d43f7e5c4fdc4b2ca3e10cc6cf545626277" + integrity sha512-TOux9khNKdi64mW+0OIhcmbAn75tTlzKhxmiNXevQaPbrBYK7YKjP1jl6NHTJ6XR5UgUrJbCnWlKVnJn29dfjw== dependencies: "@babel/template" "^7.3.3" "@babel/types" "^7.3.3" @@ -4368,12 +4378,12 @@ babel-preset-current-node-syntax@^1.0.0: "@babel/plugin-syntax-optional-chaining" "^7.8.3" "@babel/plugin-syntax-top-level-await" "^7.8.3" -babel-preset-jest@^27.0.6: - version "27.0.6" - resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-27.0.6.tgz#909ef08e9f24a4679768be2f60a3df0856843f9d" - integrity sha512-WObA0/Biw2LrVVwZkF/2GqbOdzhKD6Fkdwhoy9ASIrOWr/zodcSpQh72JOkEn6NWyjmnPDjNSqaGN4KnpKzhXw== +babel-preset-jest@^27.2.0: + version "27.2.0" + resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-27.2.0.tgz#556bbbf340608fed5670ab0ea0c8ef2449fba885" + integrity sha512-z7MgQ3peBwN5L5aCqBKnF6iqdlvZvFUQynEhu0J+X9nHLU72jO3iY331lcYrg+AssJ8q7xsv5/3AICzVmJ/wvg== dependencies: - babel-plugin-jest-hoist "^27.0.6" + babel-plugin-jest-hoist "^27.2.0" babel-preset-current-node-syntax "^1.0.0" balanced-match@^1.0.0: @@ -4877,9 +4887,9 @@ caniuse-api@^3.0.0: lodash.uniq "^4.5.0" caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000981, caniuse-lite@^1.0.30001032, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001254: - version "1.0.30001255" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001255.tgz#f3b09b59ab52e39e751a569523618f47c4298ca0" - integrity sha512-F+A3N9jTZL882f/fg/WWVnKSu6IOo3ueLz4zwaOPbPYHNmM/ZaDUyzyJwS1mZhX7Ex5jqTyW599Gdelh5PDYLQ== + version "1.0.30001258" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001258.tgz#b604eed80cc54a578e4bf5a02ae3ed49f869d252" + integrity sha512-RBByOG6xWXUp0CR2/WU2amXz3stjKpSl5J1xU49F1n2OxD//uBZO4wCKUiG+QMGf7CHGfDDcqoKriomoGVxTeA== canonical-path@1.0.0: version "1.0.0" @@ -4945,6 +4955,11 @@ chart.js@^2.9.3: chartjs-color "^2.1.0" moment "^2.10.2" +chart.js@^3.5.1: + version "3.5.1" + resolved "https://registry.yarnpkg.com/chart.js/-/chart.js-3.5.1.tgz#73e24d23a4134a70ccdb5e79a917f156b6f3644a" + integrity sha512-m5kzt72I1WQ9LILwQC4syla/LD/N413RYv2Dx2nnTkRS9iv/ey1xLTt0DnPc/eWV4zI+BgEgDYBIzbQhZHc/PQ== + chartjs-color-string@^0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/chartjs-color-string/-/chartjs-color-string-0.6.0.tgz#1df096621c0e70720a64f4135ea171d051402f71" @@ -5199,7 +5214,7 @@ colord@^2.0.1, colord@^2.6: resolved "https://registry.yarnpkg.com/colord/-/colord-2.7.0.tgz#706ea36fe0cd651b585eb142fe64b6480185270e" integrity sha512-pZJBqsHz+pYyw3zpX6ZRXWoCHM1/cvFikY9TV8G3zcejCaKE0lhankoj8iScyrrePA8C7yJ5FStfA9zbcOnw7Q== -colorette@^1.2.1, colorette@^1.2.2, colorette@^1.3.0: +colorette@^1.2.1, colorette@^1.2.2, colorette@^1.3.0, colorette@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.4.0.tgz#5190fbb87276259a86ad700bff2c6d6faa3fca40" integrity sha512-Y2oEozpomLn7Q3HFP7dpww7AtMJplbM9lGZP6RDfHqmbeRjiwRg4n6VM6j4KLmRke85uWEI7JqF17f3pqdRA0g== @@ -5494,17 +5509,17 @@ copy-webpack-plugin@9.0.1: serialize-javascript "^6.0.0" core-js-compat@^3.14.0, core-js-compat@^3.15.0, core-js-compat@^3.16.0: - version "3.17.3" - resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.17.3.tgz#b39c8e4dec71ecdc735c653ce5233466e561324e" - integrity sha512-+in61CKYs4hQERiADCJsdgewpdl/X0GhEX77pjKgbeibXviIt2oxEjTc8O2fqHX8mDdBrDvX8MYD/RYsBv4OiA== + version "3.18.0" + resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.18.0.tgz#fb360652201e8ac8da812718c008cd0482ed9b42" + integrity sha512-tRVjOJu4PxdXjRMEgbP7lqWy1TWJu9a01oBkn8d+dNrhgmBwdTkzhHZpVJnEmhISLdoJI1lX08rcBcHi3TZIWg== dependencies: browserslist "^4.17.0" semver "7.0.0" core-js-pure@^3.16.0: - version "3.17.3" - resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.17.3.tgz#98ea3587188ab7ef4695db6518eeb71aec42604a" - integrity sha512-YusrqwiOTTn8058JDa0cv9unbXdIiIgcgI9gXso0ey4WgkFLd3lYlV9rp9n7nDCsYxXsMDTjA4m1h3T348mdlQ== + version "3.18.0" + resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.18.0.tgz#e5187347bae66448c9e2d67c01c34c4df3261dc5" + integrity sha512-ZnK+9vyuMhKulIGqT/7RHGRok8RtkHMEX/BGPHkHx+ouDkq+MUvf9mfIgdqhpmPDu8+V5UtRn/CbCRc9I4lX4w== core-js@3.16.0: version "3.16.0" @@ -5512,9 +5527,9 @@ core-js@3.16.0: integrity sha512-5+5VxRFmSf97nM8Jr2wzOwLqRo6zphH2aX+7KsAUONObyzakDNq2G/bgbhinxB4PoV9L3aXQYhiDKyIKWd2c8g== core-js@^3.6.5: - version "3.17.3" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.17.3.tgz#8e8bd20e91df9951e903cabe91f9af4a0895bc1e" - integrity sha512-lyvajs+wd8N1hXfzob1LdOCCHFU4bGMbqqmLn1Q4QlCpDqWPpGf+p0nj+LNrvDDG33j0hZXw2nsvvVpHysxyNw== + version "3.18.0" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.18.0.tgz#9af3f4a6df9ba3428a3fb1b171f1503b3f40cc49" + integrity sha512-WJeQqq6jOYgVgg4NrXKL0KLQhi0CT4ZOCvFL+3CQ5o7I6J8HkT5wd53EadMfqTDp1so/MT1J+w2ujhWcCJtN7w== core-util-is@1.0.2: version "1.0.2" @@ -5926,9 +5941,9 @@ data-urls@^2.0.0: whatwg-url "^8.0.0" date-fns@^2.10.0: - version "2.23.0" - resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-2.23.0.tgz#4e886c941659af0cf7b30fafdd1eaa37e88788a9" - integrity sha512-5ycpauovVyAk0kXNZz6ZoB9AYMZB4DObse7P3BPWmyEjXNORTI8EJ6X0uaSAq4sCHzM1uajzrkr6HnsLQpxGXA== + version "2.24.0" + resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-2.24.0.tgz#7d86dc0d93c87b76b63d213b4413337cfd1c105d" + integrity sha512-6ujwvwgPID6zbI0o7UbURi2vlLDR9uP26+tW6Lg+Ji3w7dd0i3DOcjcClLjLPranT60SSEFBwdSyYwn/ZkPIuw== dateformat@^3.0.0: version "3.0.3" @@ -6343,9 +6358,9 @@ ejs@^3.1.5: jake "^10.6.1" electron-to-chromium@^1.3.830: - version "1.3.835" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.835.tgz#98fa4402ab7bc6afbe4953a8ca9b63cb3a6bf08b" - integrity sha512-rHQszGg2KLMqOWPNTpwCnlp7Kb85haJa8j089DJCreZueykoSN/in+EMlay3SSDMNKR4VGPvfskxofHV18xVJg== + version "1.3.843" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.843.tgz#671489bd2f59fd49b76adddc1aa02c88cd38a5c0" + integrity sha512-OWEwAbzaVd1Lk9MohVw8LxMXFlnYd9oYTYxfX8KS++kLLjDfbovLOcEEXwRhG612dqGQ6+44SZvim0GXuBRiKg== elliptic@^6.5.3: version "6.5.4" @@ -6513,9 +6528,9 @@ esbuild@0.12.24: integrity sha512-C0ibY+HsXzYB6L/pLWEiWjMpghKsIc58Q5yumARwBQsHl9DXPakW+5NI/Y9w4YXiz0PEP6XTGTT/OV4Nnsmb4A== esbuild@^0.12.15: - version "0.12.26" - resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.12.26.tgz#35f2d58ac3fa4629df24aa4d6fd72feb5522e94b" - integrity sha512-YmTkhPKjvTJ+G5e96NyhGf69bP+hzO0DscqaVJTi5GM34uaD4Ecj7omu5lJO+NrxCUBRhy2chONLK1h/2LwoXA== + version "0.12.28" + resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.12.28.tgz#84da0d2a0d0dee181281545271e0d65cf6fab1ef" + integrity sha512-pZ0FrWZXlvQOATlp14lRSk1N9GkeJ3vLIwOcUoo3ICQn9WNR4rWoNi81pbn6sC1iYUy7QPqNzI3+AEzokwyVcA== escalade@^3.1.1: version "3.1.1" @@ -6555,9 +6570,9 @@ eslint-config-prettier@8.1.0: integrity sha512-oKMhGv3ihGbCIimCAjqkdzx2Q+jthoqnXSP+d86M9tptwugycmTFdVR4IpLgq2c4SHifbwO90z2fQ8/Aio73yw== eslint-plugin-cypress@^2.10.3: - version "2.11.3" - resolved "https://registry.yarnpkg.com/eslint-plugin-cypress/-/eslint-plugin-cypress-2.11.3.tgz#54ee4067aa8192aa62810cd35080eb577e191ab7" - integrity sha512-hOoAid+XNFtpvOzZSNWP5LDrQBEJwbZwjib4XJ1KcRYKjeVj0mAmPmucG4Egli4j/aruv+Ow/acacoloWWCl9Q== + version "2.12.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-cypress/-/eslint-plugin-cypress-2.12.1.tgz#9aeee700708ca8c058e00cdafe215199918c2632" + integrity sha512-c2W/uPADl5kospNDihgiLc7n87t5XhUbFDoTl6CfVkmG+kDAb5Ux10V9PoLPu9N+r7znpc+iQlcmAqT1A/89HA== dependencies: globals "^11.12.0" @@ -6805,16 +6820,16 @@ expand-brackets@^2.1.4: snapdragon "^0.8.1" to-regex "^3.0.1" -expect@^27.1.1: - version "27.1.1" - resolved "https://registry.yarnpkg.com/expect/-/expect-27.1.1.tgz#020215da67d41cd6ad805fa00bd030985ca7c093" - integrity sha512-JQAzp0CJoFFHF1RnOtrMUNMdsfx/Tl0+FhRzVl8q0fa23N+JyWdPXwb3T5rkHCvyo9uttnK7lVdKCBl1b/9EDw== +expect@^27.2.0: + version "27.2.0" + resolved "https://registry.yarnpkg.com/expect/-/expect-27.2.0.tgz#40eb89a492afb726a3929ccf3611ee0799ab976f" + integrity sha512-oOTbawMQv7AK1FZURbPTgGSzmhxkjFzoARSvDjOMnOpeWuYQx1tP6rXu9MIX5mrACmyCAM7fSNP8IJO2f1p0CQ== dependencies: "@jest/types" "^27.1.1" ansi-styles "^5.0.0" jest-get-type "^27.0.6" - jest-matcher-utils "^27.1.1" - jest-message-util "^27.1.1" + jest-matcher-utils "^27.2.0" + jest-message-util "^27.2.0" jest-regex-util "^27.0.6" express@^4.17.1: @@ -6949,9 +6964,9 @@ fast-sha256@^1.3.0: integrity sha512-n11RGP/lrWEFI/bWdygLxhI+pVeo1ZYIVwvvPkW7azl/rOy+F3HYRZ2K5zeE9mmkhQppyv9sQFx0JM9UabnpPQ== fastq@^1.6.0: - version "1.12.0" - resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.12.0.tgz#ed7b6ab5d62393fb2cc591c853652a5c318bf794" - integrity sha512-VNX0QkHK3RsXVKr9KrlUv/FoTa0NdbYoHHl7uXHv2rzyHSlxjdNAKug2twd9luJxpcyNeAgf5iPPMutJO67Dfg== + version "1.13.0" + resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.13.0.tgz#616760f88a7526bdfc596b7cab8c18938c36b98c" + integrity sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw== dependencies: reusify "^1.0.4" @@ -7128,9 +7143,9 @@ flush-write-stream@^1.0.0: readable-stream "^2.3.6" follow-redirects@^1.0.0: - version "1.14.3" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.3.tgz#6ada78118d8d24caee595595accdc0ac6abd022e" - integrity sha512-3MkHxknWMUtb23apkgz/83fDoe+y+qr0TdgacGIA7bew+QLBo3vdgEN2xEsuXNivpFy4CyDhBBZnNZOtalmenw== + version "1.14.4" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.4.tgz#838fdf48a8bbdd79e52ee51fb1c94e3ed98b9379" + integrity sha512-zwGkiSXC1MUJG/qmeIFH2HBJx9u0V46QGUe3YR1fXG8bXQxq7fLj0RjLZQ5nubr9qNJUZrH+xUcwXEoXNpfS+g== for-in@^1.0.2: version "1.0.2" @@ -8642,46 +8657,46 @@ jest-changed-files@^27.1.1: execa "^5.0.0" throat "^6.0.1" -jest-circus@^27.0.6, jest-circus@^27.1.1: - version "27.1.1" - resolved "https://registry.yarnpkg.com/jest-circus/-/jest-circus-27.1.1.tgz#08dd3ec5cbaadce68ce6388ebccbe051d1b34bc6" - integrity sha512-Xed1ApiMFu/yzqGMBToHr8sp2gkX/ARZf4nXoGrHJrXrTUdVIWiVYheayfcOaPdQvQEE/uyBLgW7I7YBLIrAXQ== +jest-circus@^27.0.6, jest-circus@^27.2.0: + version "27.2.0" + resolved "https://registry.yarnpkg.com/jest-circus/-/jest-circus-27.2.0.tgz#ad0d6d75514050f539d422bae41344224d2328f9" + integrity sha512-WwENhaZwOARB1nmcboYPSv/PwHBUGRpA4MEgszjr9DLCl97MYw0qZprBwLb7rNzvMwfIvNGG7pefQ5rxyBlzIA== dependencies: - "@jest/environment" "^27.1.1" - "@jest/test-result" "^27.1.1" + "@jest/environment" "^27.2.0" + "@jest/test-result" "^27.2.0" "@jest/types" "^27.1.1" "@types/node" "*" chalk "^4.0.0" co "^4.6.0" dedent "^0.7.0" - expect "^27.1.1" + expect "^27.2.0" is-generator-fn "^2.0.0" - jest-each "^27.1.1" - jest-matcher-utils "^27.1.1" - jest-message-util "^27.1.1" - jest-runtime "^27.1.1" - jest-snapshot "^27.1.1" - jest-util "^27.1.1" - pretty-format "^27.1.1" + jest-each "^27.2.0" + jest-matcher-utils "^27.2.0" + jest-message-util "^27.2.0" + jest-runtime "^27.2.0" + jest-snapshot "^27.2.0" + jest-util "^27.2.0" + pretty-format "^27.2.0" slash "^3.0.0" stack-utils "^2.0.3" throat "^6.0.1" jest-cli@^27.0.3: - version "27.1.1" - resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-27.1.1.tgz#6491a0278231ffee61083ad468809328e96a8eb2" - integrity sha512-LCjfEYp9D3bcOeVUUpEol9Y1ijZYMWVqflSmtw/wX+6Fb7zP4IlO14/6s9v1pxsoM4Pn46+M2zABgKuQjyDpTw== + version "27.2.0" + resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-27.2.0.tgz#6da5ecca5bd757e20449f5ec1f1cad5b0303d16b" + integrity sha512-bq1X/B/b1kT9y1zIFMEW3GFRX1HEhFybiqKdbxM+j11XMMYSbU9WezfyWIhrSOmPT+iODLATVjfsCnbQs7cfIA== dependencies: - "@jest/core" "^27.1.1" - "@jest/test-result" "^27.1.1" + "@jest/core" "^27.2.0" + "@jest/test-result" "^27.2.0" "@jest/types" "^27.1.1" chalk "^4.0.0" exit "^0.1.2" graceful-fs "^4.2.4" import-local "^3.0.2" - jest-config "^27.1.1" - jest-util "^27.1.1" - jest-validate "^27.1.1" + jest-config "^27.2.0" + jest-util "^27.2.0" + jest-validate "^27.2.0" prompts "^2.0.1" yargs "^16.0.3" @@ -8712,32 +8727,32 @@ jest-config@27.0.6: micromatch "^4.0.4" pretty-format "^27.0.6" -jest-config@^27.1.1: - version "27.1.1" - resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-27.1.1.tgz#cde823ad27f7ec0b9440035eabc75d4ac1ea024c" - integrity sha512-2iSd5zoJV4MsWPcLCGwUVUY/j6pZXm4Qd3rnbCtrd9EHNTg458iHw8PZztPQXfxKBKJxLfBk7tbZqYF8MGtxJA== +jest-config@^27.2.0: + version "27.2.0" + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-27.2.0.tgz#d1c359253927005c53d11ab3e50d3b2f402a673a" + integrity sha512-Z1romHpxeNwLxQtouQ4xt07bY6HSFGKTo0xJcvOK3u6uJHveA4LB2P+ty9ArBLpTh3AqqPxsyw9l9GMnWBYS9A== dependencies: "@babel/core" "^7.1.0" - "@jest/test-sequencer" "^27.1.1" + "@jest/test-sequencer" "^27.2.0" "@jest/types" "^27.1.1" - babel-jest "^27.1.1" + babel-jest "^27.2.0" chalk "^4.0.0" deepmerge "^4.2.2" glob "^7.1.1" graceful-fs "^4.2.4" is-ci "^3.0.0" - jest-circus "^27.1.1" - jest-environment-jsdom "^27.1.1" - jest-environment-node "^27.1.1" + jest-circus "^27.2.0" + jest-environment-jsdom "^27.2.0" + jest-environment-node "^27.2.0" jest-get-type "^27.0.6" - jest-jasmine2 "^27.1.1" + jest-jasmine2 "^27.2.0" jest-regex-util "^27.0.6" - jest-resolve "^27.1.1" - jest-runner "^27.1.1" - jest-util "^27.1.1" - jest-validate "^27.1.1" + jest-resolve "^27.2.0" + jest-runner "^27.2.0" + jest-util "^27.2.0" + jest-validate "^27.2.0" micromatch "^4.0.4" - pretty-format "^27.1.1" + pretty-format "^27.2.0" jest-diff@^26.0.0: version "26.6.2" @@ -8749,15 +8764,15 @@ jest-diff@^26.0.0: jest-get-type "^26.3.0" pretty-format "^26.6.2" -jest-diff@^27.1.1: - version "27.1.1" - resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-27.1.1.tgz#1d1629ca2e3933b10cb27dc260e28e3dba182684" - integrity sha512-m/6n5158rqEriTazqHtBpOa2B/gGgXJijX6nsEgZfbJ/3pxQcdpVXBe+FP39b1dxWHyLVVmuVXddmAwtqFO4Lg== +jest-diff@^27.2.0: + version "27.2.0" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-27.2.0.tgz#bda761c360f751bab1e7a2fe2fc2b0a35ce8518c" + integrity sha512-QSO9WC6btFYWtRJ3Hac0sRrkspf7B01mGrrQEiCW6TobtViJ9RWL0EmOs/WnBsZDsI/Y2IoSHZA2x6offu0sYw== dependencies: chalk "^4.0.0" diff-sequences "^27.0.6" jest-get-type "^27.0.6" - pretty-format "^27.1.1" + pretty-format "^27.2.0" jest-docblock@^27.0.6: version "27.0.6" @@ -8766,41 +8781,41 @@ jest-docblock@^27.0.6: dependencies: detect-newline "^3.0.0" -jest-each@^27.1.1: - version "27.1.1" - resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-27.1.1.tgz#caa1e7eed77144be346eb18712885b990389348a" - integrity sha512-r6hOsTLavUBb1xN0uDa89jdDeBmJ+K49fWpbyxeGRA2pLY46PlC4z551/cWNQzrj+IUa5/gSRsCIV/01HdNPug== +jest-each@^27.2.0: + version "27.2.0" + resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-27.2.0.tgz#4c531c7223de289429fc7b2473a86e653c86d61f" + integrity sha512-biDmmUQjg+HZOB7MfY2RHSFL3j418nMoC3TK3pGAj880fQQSxvQe1y2Wy23JJJNUlk6YXiGU0yWy86Le1HBPmA== dependencies: "@jest/types" "^27.1.1" chalk "^4.0.0" jest-get-type "^27.0.6" - jest-util "^27.1.1" - pretty-format "^27.1.1" + jest-util "^27.2.0" + pretty-format "^27.2.0" -jest-environment-jsdom@^27.0.0, jest-environment-jsdom@^27.0.6, jest-environment-jsdom@^27.1.1: - version "27.1.1" - resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-27.1.1.tgz#e53e98a16e6a764b8ee8db3b29b3a8c27db06f66" - integrity sha512-6vOnoZ6IaExuw7FvnuJhA1qFYv1DDSnN0sQowzolNwxQp7bG1YhLxj2YU1sVXAYA3IR3MbH2mbnJUsLUWfyfzw== +jest-environment-jsdom@^27.0.0, jest-environment-jsdom@^27.0.6, jest-environment-jsdom@^27.2.0: + version "27.2.0" + resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-27.2.0.tgz#c654dfae50ca2272c2a2e2bb95ff0af298283a3c" + integrity sha512-wNQJi6Rd/AkUWqTc4gWhuTIFPo7tlMK0RPZXeM6AqRHZA3D3vwvTa9ktAktyVyWYmUoXdYstOfyYMG3w4jt7eA== dependencies: - "@jest/environment" "^27.1.1" - "@jest/fake-timers" "^27.1.1" + "@jest/environment" "^27.2.0" + "@jest/fake-timers" "^27.2.0" "@jest/types" "^27.1.1" "@types/node" "*" jest-mock "^27.1.1" - jest-util "^27.1.1" + jest-util "^27.2.0" jsdom "^16.6.0" -jest-environment-node@^27.0.6, jest-environment-node@^27.1.1: - version "27.1.1" - resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-27.1.1.tgz#97425d4762b2aeab15892ffba08c6cbed7653e75" - integrity sha512-OEGeZh0PwzngNIYWYgWrvTcLygopV8OJbC9HNb0j70VBKgEIsdZkYhwcFnaURX83OHACMqf1pa9Tv5Pw5jemrg== +jest-environment-node@^27.0.6, jest-environment-node@^27.2.0: + version "27.2.0" + resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-27.2.0.tgz#73ef2151cb62206669becb94cd84f33276252de5" + integrity sha512-WbW+vdM4u88iy6Q3ftUEQOSgMPtSgjm3qixYYK2AKEuqmFO2zmACTw1vFUB0qI/QN88X6hA6ZkVKIdIWWzz+yg== dependencies: - "@jest/environment" "^27.1.1" - "@jest/fake-timers" "^27.1.1" + "@jest/environment" "^27.2.0" + "@jest/fake-timers" "^27.2.0" "@jest/types" "^27.1.1" "@types/node" "*" jest-mock "^27.1.1" - jest-util "^27.1.1" + jest-util "^27.2.0" jest-get-type@^26.3.0: version "26.3.0" @@ -8812,10 +8827,10 @@ jest-get-type@^27.0.6: resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-27.0.6.tgz#0eb5c7f755854279ce9b68a9f1a4122f69047cfe" integrity sha512-XTkK5exIeUbbveehcSR8w0bhH+c0yloW/Wpl+9vZrjzztCPWrxhHwkIFpZzCt71oRBsgxmuUfxEqOYoZI2macg== -jest-haste-map@^27.0.6, jest-haste-map@^27.1.1: - version "27.1.1" - resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-27.1.1.tgz#f7c646b0e417ec29b80b96cf785b57b581384adf" - integrity sha512-NGLYVAdh5C8Ezg5QBFzrNeYsfxptDBPlhvZNaicLiZX77F/rS27a9M6u9ripWAaaD54xnWdZNZpEkdjD5Eo5aQ== +jest-haste-map@^27.0.6, jest-haste-map@^27.2.0: + version "27.2.0" + resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-27.2.0.tgz#703b3a473e3f2e27d75ab07864ffd7bbaad0d75e" + integrity sha512-laFet7QkNlWjwZtMGHCucLvF8o9PAh2cgePRck1+uadSM4E4XH9J4gnx4do+a6do8ZV5XHNEAXEkIoNg5XUH2Q== dependencies: "@jest/types" "^27.1.1" "@types/graceful-fs" "^4.1.2" @@ -8825,59 +8840,59 @@ jest-haste-map@^27.0.6, jest-haste-map@^27.1.1: graceful-fs "^4.2.4" jest-regex-util "^27.0.6" jest-serializer "^27.0.6" - jest-util "^27.1.1" - jest-worker "^27.1.1" + jest-util "^27.2.0" + jest-worker "^27.2.0" micromatch "^4.0.4" walker "^1.0.7" optionalDependencies: fsevents "^2.3.2" -jest-jasmine2@^27.0.6, jest-jasmine2@^27.1.1: - version "27.1.1" - resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-27.1.1.tgz#efb9e7b70ce834c35c91e1a2f01bb41b462fad43" - integrity sha512-0LAzUmcmvQwjIdJt0cXUVX4G5qjVXE8ELt6nbMNDzv2yAs2hYCCUtQq+Eje70GwAysWCGcS64QeYj5VPHYVxPg== +jest-jasmine2@^27.0.6, jest-jasmine2@^27.2.0: + version "27.2.0" + resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-27.2.0.tgz#1ece0ee37c348b59ed3dfcfe509fc24e3377b12d" + integrity sha512-NcPzZBk6IkDW3Z2V8orGueheGJJYfT5P0zI/vTO/Jp+R9KluUdgFrgwfvZ0A34Kw6HKgiWFILZmh3oQ/eS+UxA== dependencies: "@babel/traverse" "^7.1.0" - "@jest/environment" "^27.1.1" + "@jest/environment" "^27.2.0" "@jest/source-map" "^27.0.6" - "@jest/test-result" "^27.1.1" + "@jest/test-result" "^27.2.0" "@jest/types" "^27.1.1" "@types/node" "*" chalk "^4.0.0" co "^4.6.0" - expect "^27.1.1" + expect "^27.2.0" is-generator-fn "^2.0.0" - jest-each "^27.1.1" - jest-matcher-utils "^27.1.1" - jest-message-util "^27.1.1" - jest-runtime "^27.1.1" - jest-snapshot "^27.1.1" - jest-util "^27.1.1" - pretty-format "^27.1.1" + jest-each "^27.2.0" + jest-matcher-utils "^27.2.0" + jest-message-util "^27.2.0" + jest-runtime "^27.2.0" + jest-snapshot "^27.2.0" + jest-util "^27.2.0" + pretty-format "^27.2.0" throat "^6.0.1" -jest-leak-detector@^27.1.1: - version "27.1.1" - resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-27.1.1.tgz#8e05ec4b339814fc4202f07d875da65189e3d7d4" - integrity sha512-gwSgzmqShoeEsEVpgObymQPrM9P6557jt1EsFW5aCeJ46Cme0EdjYU7xr6llQZ5GpWDl56eOstUaPXiZOfiTKw== +jest-leak-detector@^27.2.0: + version "27.2.0" + resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-27.2.0.tgz#9a7ca2dad1a21c4e49ad2a8ad7f1214ffdb86a28" + integrity sha512-e91BIEmbZw5+MHkB4Hnrq7S86coTxUMCkz4n7DLmQYvl9pEKmRx9H/JFH87bBqbIU5B2Ju1soKxRWX6/eGFGpA== dependencies: jest-get-type "^27.0.6" - pretty-format "^27.1.1" + pretty-format "^27.2.0" -jest-matcher-utils@^27.1.1: - version "27.1.1" - resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-27.1.1.tgz#1f444d7491ccf9edca746336b056178789a59651" - integrity sha512-Q1a10w9Y4sh0wegkdP6reQOa/Dtz7nAvDqBgrat1ItZAUvk4jzXAqyhXPu/ZuEtDaXaNKpdRPRQA8bvkOh2Eaw== +jest-matcher-utils@^27.2.0: + version "27.2.0" + resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-27.2.0.tgz#b4d224ab88655d5fab64b96b989ac349e2f5da43" + integrity sha512-F+LG3iTwJ0gPjxBX6HCyrARFXq6jjiqhwBQeskkJQgSLeF1j6ui1RTV08SR7O51XTUhtc8zqpDj8iCG4RGmdKw== dependencies: chalk "^4.0.0" - jest-diff "^27.1.1" + jest-diff "^27.2.0" jest-get-type "^27.0.6" - pretty-format "^27.1.1" + pretty-format "^27.2.0" -jest-message-util@^27.1.1: - version "27.1.1" - resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-27.1.1.tgz#980110fb72fcfa711cd9a95e8f10d335207585c6" - integrity sha512-b697BOJV93+AVGvzLRtVZ0cTVRbd59OaWnbB2D75GRaIMc4I+Z9W0wHxbfjW01JWO+TqqW4yevT0aN7Fd0XWng== +jest-message-util@^27.2.0: + version "27.2.0" + resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-27.2.0.tgz#2f65c71df55267208686b1d7514e18106c91ceaf" + integrity sha512-y+sfT/94CiP8rKXgwCOzO1mUazIEdEhrLjuiu+RKmCP+8O/TJTSne9dqQRbFIHBtlR2+q7cddJlWGir8UATu5w== dependencies: "@babel/code-frame" "^7.12.13" "@jest/types" "^27.1.1" @@ -8885,7 +8900,7 @@ jest-message-util@^27.1.1: chalk "^4.0.0" graceful-fs "^4.2.4" micromatch "^4.0.4" - pretty-format "^27.1.1" + pretty-format "^27.2.0" slash "^3.0.0" stack-utils "^2.0.3" @@ -8918,14 +8933,14 @@ jest-regex-util@^27.0.6: resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-27.0.6.tgz#02e112082935ae949ce5d13b2675db3d8c87d9c5" integrity sha512-SUhPzBsGa1IKm8hx2F4NfTGGp+r7BXJ4CulsZ1k2kI+mGLG+lxGrs76veN2LF/aUdGosJBzKgXmNCw+BzFqBDQ== -jest-resolve-dependencies@^27.1.1: - version "27.1.1" - resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-27.1.1.tgz#6f3e0916c1764dd1853c6111ed9d66c66c792e40" - integrity sha512-sYZR+uBjFDCo4VhYeazZf/T+ryYItvdLKu9vHatqkUqHGjDMrdEPOykiqC2iEpaCFTS+3iL/21CYiJuKdRbniw== +jest-resolve-dependencies@^27.2.0: + version "27.2.0" + resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-27.2.0.tgz#b56a1aab95b0fd21e0a69a15fda985c05f902b8a" + integrity sha512-EY5jc/Y0oxn+oVEEldTidmmdVoZaknKPyDORA012JUdqPyqPL+lNdRyI3pGti0RCydds6coaw6xt4JQY54dKsg== dependencies: "@jest/types" "^27.1.1" jest-regex-util "^27.0.6" - jest-snapshot "^27.1.1" + jest-snapshot "^27.2.0" jest-resolve@27.0.6: version "27.0.6" @@ -8942,31 +8957,31 @@ jest-resolve@27.0.6: resolve "^1.20.0" slash "^3.0.0" -jest-resolve@^27.0.6, jest-resolve@^27.1.1: - version "27.1.1" - resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-27.1.1.tgz#3a86762f9affcad9697bc88140b0581b623add33" - integrity sha512-M41YFmWhvDVstwe7XuV21zynOiBLJB5Sk0GrIsYYgTkjfEWNLVXDjAyq1W7PHseaYNOxIc0nOGq/r5iwcZNC1A== +jest-resolve@^27.0.6, jest-resolve@^27.2.0: + version "27.2.0" + resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-27.2.0.tgz#f5d053693ab3806ec2f778e6df8b0aa4cfaef95f" + integrity sha512-v09p9Ib/VtpHM6Cz+i9lEAv1Z/M5NVxsyghRHRMEUOqwPQs3zwTdwp1xS3O/k5LocjKiGS0OTaJoBSpjbM2Jlw== dependencies: "@jest/types" "^27.1.1" chalk "^4.0.0" escalade "^3.1.1" graceful-fs "^4.2.4" - jest-haste-map "^27.1.1" + jest-haste-map "^27.2.0" jest-pnp-resolver "^1.2.2" - jest-util "^27.1.1" - jest-validate "^27.1.1" + jest-util "^27.2.0" + jest-validate "^27.2.0" resolve "^1.20.0" slash "^3.0.0" -jest-runner@^27.0.6, jest-runner@^27.1.1: - version "27.1.1" - resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-27.1.1.tgz#1991fdf13a8fe6e49cef47332db33300649357cd" - integrity sha512-lP3MBNQhg75/sQtVkC8dsAQZumvy3lHK/YIwYPfEyqGIX1qEcnYIRxP89q0ZgC5ngvi1vN2P5UFHszQxguWdng== +jest-runner@^27.0.6, jest-runner@^27.2.0: + version "27.2.0" + resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-27.2.0.tgz#281b255d88a473aebc0b5cb46e58a83a1251cab3" + integrity sha512-Cl+BHpduIc0cIVTjwoyx0pQk4Br8gn+wkr35PmKCmzEdOUnQ2wN7QVXA8vXnMQXSlFkN/+KWnk20TAVBmhgrww== dependencies: - "@jest/console" "^27.1.1" - "@jest/environment" "^27.1.1" - "@jest/test-result" "^27.1.1" - "@jest/transform" "^27.1.1" + "@jest/console" "^27.2.0" + "@jest/environment" "^27.2.0" + "@jest/test-result" "^27.2.0" + "@jest/transform" "^27.2.0" "@jest/types" "^27.1.1" "@types/node" "*" chalk "^4.0.0" @@ -8974,30 +8989,30 @@ jest-runner@^27.0.6, jest-runner@^27.1.1: exit "^0.1.2" graceful-fs "^4.2.4" jest-docblock "^27.0.6" - jest-environment-jsdom "^27.1.1" - jest-environment-node "^27.1.1" - jest-haste-map "^27.1.1" - jest-leak-detector "^27.1.1" - jest-message-util "^27.1.1" - jest-resolve "^27.1.1" - jest-runtime "^27.1.1" - jest-util "^27.1.1" - jest-worker "^27.1.1" + jest-environment-jsdom "^27.2.0" + jest-environment-node "^27.2.0" + jest-haste-map "^27.2.0" + jest-leak-detector "^27.2.0" + jest-message-util "^27.2.0" + jest-resolve "^27.2.0" + jest-runtime "^27.2.0" + jest-util "^27.2.0" + jest-worker "^27.2.0" source-map-support "^0.5.6" throat "^6.0.1" -jest-runtime@^27.1.1: - version "27.1.1" - resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-27.1.1.tgz#bd0a0958a11c2f7d94d2e5f6f71864ad1c65fe44" - integrity sha512-FEwy+tSzmsvuKaQpyYsUyk31KG5vMmA2r2BSTHgv0yNfcooQdm2Ke91LM9Ud8D3xz8CLDHJWAI24haMFTwrsPg== +jest-runtime@^27.2.0: + version "27.2.0" + resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-27.2.0.tgz#998295ccd80008b3031eeb5cc60e801e8551024b" + integrity sha512-6gRE9AVVX49hgBbWQ9PcNDeM4upMUXzTpBs0kmbrjyotyUyIJixLPsYjpeTFwAA07PVLDei1iAm2chmWycdGdQ== dependencies: - "@jest/console" "^27.1.1" - "@jest/environment" "^27.1.1" - "@jest/fake-timers" "^27.1.1" - "@jest/globals" "^27.1.1" + "@jest/console" "^27.2.0" + "@jest/environment" "^27.2.0" + "@jest/fake-timers" "^27.2.0" + "@jest/globals" "^27.2.0" "@jest/source-map" "^27.0.6" - "@jest/test-result" "^27.1.1" - "@jest/transform" "^27.1.1" + "@jest/test-result" "^27.2.0" + "@jest/transform" "^27.2.0" "@jest/types" "^27.1.1" "@types/yargs" "^16.0.0" chalk "^4.0.0" @@ -9007,14 +9022,14 @@ jest-runtime@^27.1.1: exit "^0.1.2" glob "^7.1.3" graceful-fs "^4.2.4" - jest-haste-map "^27.1.1" - jest-message-util "^27.1.1" + jest-haste-map "^27.2.0" + jest-message-util "^27.2.0" jest-mock "^27.1.1" jest-regex-util "^27.0.6" - jest-resolve "^27.1.1" - jest-snapshot "^27.1.1" - jest-util "^27.1.1" - jest-validate "^27.1.1" + jest-resolve "^27.2.0" + jest-snapshot "^27.2.0" + jest-util "^27.2.0" + jest-validate "^27.2.0" slash "^3.0.0" strip-bom "^4.0.0" yargs "^16.0.3" @@ -9027,10 +9042,10 @@ jest-serializer@^27.0.6: "@types/node" "*" graceful-fs "^4.2.4" -jest-snapshot@^27.1.1: - version "27.1.1" - resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-27.1.1.tgz#3b816e0ca4352fbbd1db48dc692e3d9641d2531b" - integrity sha512-Wi3QGiuRFo3lU+EbQmZnBOks0CJyAMPHvYoG7iJk00Do10jeOyuOEO0Jfoaoun8+8TDv+Nzl7Aswir/IK9+1jg== +jest-snapshot@^27.2.0: + version "27.2.0" + resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-27.2.0.tgz#7961e7107ac666a46fbb23e7bb48ce0b8c6a9285" + integrity sha512-MukJvy3KEqemCT2FoT3Gum37CQqso/62PKTfIzWmZVTsLsuyxQmJd2PI5KPcBYFqLlA8LgZLHM8ZlazkVt8LsQ== dependencies: "@babel/core" "^7.7.2" "@babel/generator" "^7.7.2" @@ -9038,23 +9053,23 @@ jest-snapshot@^27.1.1: "@babel/plugin-syntax-typescript" "^7.7.2" "@babel/traverse" "^7.7.2" "@babel/types" "^7.0.0" - "@jest/transform" "^27.1.1" + "@jest/transform" "^27.2.0" "@jest/types" "^27.1.1" "@types/babel__traverse" "^7.0.4" "@types/prettier" "^2.1.5" babel-preset-current-node-syntax "^1.0.0" chalk "^4.0.0" - expect "^27.1.1" + expect "^27.2.0" graceful-fs "^4.2.4" - jest-diff "^27.1.1" + jest-diff "^27.2.0" jest-get-type "^27.0.6" - jest-haste-map "^27.1.1" - jest-matcher-utils "^27.1.1" - jest-message-util "^27.1.1" - jest-resolve "^27.1.1" - jest-util "^27.1.1" + jest-haste-map "^27.2.0" + jest-matcher-utils "^27.2.0" + jest-message-util "^27.2.0" + jest-resolve "^27.2.0" + jest-util "^27.2.0" natural-compare "^1.4.0" - pretty-format "^27.1.1" + pretty-format "^27.2.0" semver "^7.3.2" jest-util@27.0.6: @@ -9069,10 +9084,10 @@ jest-util@27.0.6: is-ci "^3.0.0" picomatch "^2.2.3" -jest-util@^27.0.0, jest-util@^27.0.6, jest-util@^27.1.1: - version "27.1.1" - resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-27.1.1.tgz#2b06db1391d779ec2bd406ab3690ddc56ac728b9" - integrity sha512-zf9nEbrASWn2mC/L91nNb0K+GkhFvi4MP6XJG2HqnHzHvLYcs7ou/In68xYU1i1dSkJlrWcYfWXQE8nVR+nbOA== +jest-util@^27.0.0, jest-util@^27.0.6, jest-util@^27.2.0: + version "27.2.0" + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-27.2.0.tgz#bfccb85cfafae752257319e825a5b8d4ada470dc" + integrity sha512-T5ZJCNeFpqcLBpx+Hl9r9KoxBCUqeWlJ1Htli+vryigZVJ1vuLB9j35grEBASp4R13KFkV7jM52bBGnArpJN6A== dependencies: "@jest/types" "^27.1.1" "@types/node" "*" @@ -9081,35 +9096,35 @@ jest-util@^27.0.0, jest-util@^27.0.6, jest-util@^27.1.1: is-ci "^3.0.0" picomatch "^2.2.3" -jest-validate@^27.0.6, jest-validate@^27.1.1: - version "27.1.1" - resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-27.1.1.tgz#0783733af02c988d503995fc0a07bbdc58c7dd50" - integrity sha512-N5Er5FKav/8m2dJwn7BGnZwnoD1BSc8jx5T+diG2OvyeugvZDhPeAt5DrNaGkkaKCrSUvuE7A5E4uHyT7Vj0Mw== +jest-validate@^27.0.6, jest-validate@^27.2.0: + version "27.2.0" + resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-27.2.0.tgz#b7535f12d95dd3b4382831f4047384ca098642ab" + integrity sha512-uIEZGkFKk3+4liA81Xu0maG5aGDyPLdp+4ed244c+Ql0k3aLWQYcMbaMLXOIFcb83LPHzYzqQ8hwNnIxTqfAGQ== dependencies: "@jest/types" "^27.1.1" camelcase "^6.2.0" chalk "^4.0.0" jest-get-type "^27.0.6" leven "^3.1.0" - pretty-format "^27.1.1" + pretty-format "^27.2.0" -jest-watcher@^27.1.1: - version "27.1.1" - resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-27.1.1.tgz#a8147e18703b5d753ada4b287451f2daf40f4118" - integrity sha512-XQzyHbxziDe+lZM6Dzs40fEt4q9akOGwitJnxQasJ9WG0bv3JGiRlsBgjw13znGapeMtFaEsyhL0Cl04IbaoWQ== +jest-watcher@^27.2.0: + version "27.2.0" + resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-27.2.0.tgz#dc2eef4c13c6d41cebf3f1fc5f900a54b51c2ea0" + integrity sha512-SjRWhnr+qO8aBsrcnYIyF+qRxNZk6MZH8TIDgvi+VlsyrvOyqg0d+Rm/v9KHiTtC9mGGeFi9BFqgavyWib6xLg== dependencies: - "@jest/test-result" "^27.1.1" + "@jest/test-result" "^27.2.0" "@jest/types" "^27.1.1" "@types/node" "*" ansi-escapes "^4.2.1" chalk "^4.0.0" - jest-util "^27.1.1" + jest-util "^27.2.0" string-length "^4.0.1" -jest-worker@^27.0.2, jest-worker@^27.0.6, jest-worker@^27.1.1: - version "27.1.1" - resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-27.1.1.tgz#eb5f05c4657fdcb702c36c48b20d785bd4599378" - integrity sha512-XJKCL7tu+362IUYTWvw8+3S75U7qMiYiRU6u5yqscB48bTvzwN6i8L/7wVTXiFLwkRsxARNM7TISnTvcgv9hxA== +jest-worker@^27.0.2, jest-worker@^27.0.6, jest-worker@^27.2.0: + version "27.2.0" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-27.2.0.tgz#11eef39f1c88f41384ca235c2f48fe50bc229bc0" + integrity sha512-laB0ZVIBz+voh/QQy9dmUuuDsadixeerrKqyVpgPz+CCWiOYjOBabUXHIXZhsdvkWbLqSHbgkAHWl5cg24Q6RA== dependencies: "@types/node" "*" merge-stream "^2.0.0" @@ -9477,12 +9492,12 @@ lines-and-columns@^1.1.6: integrity sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA= listr2@^3.8.3: - version "3.11.1" - resolved "https://registry.yarnpkg.com/listr2/-/listr2-3.11.1.tgz#a9bab5cd5874fd3cb7827118dbea6fedefbcb43f" - integrity sha512-ZXQvQfmH9iWLlb4n3hh31yicXDxlzB0pE7MM1zu6kgbVL4ivEsO4H8IPh4E682sC8RjnYO9anose+zT52rrpyg== + version "3.12.1" + resolved "https://registry.yarnpkg.com/listr2/-/listr2-3.12.1.tgz#75e515b86c66b60baf253542cc0dced6b60fedaf" + integrity sha512-oB1DlXlCzGPbvWhqYBZUQEPJKqsmebQWofXG6Mpbe3uIvoNl8mctBEojyF13ZyqwQ91clCWXpwsWp+t98K4FOQ== dependencies: cli-truncate "^2.1.0" - colorette "^1.2.2" + colorette "^1.4.0" log-update "^4.0.0" p-map "^4.0.0" rxjs "^6.6.7" @@ -9762,9 +9777,9 @@ map-obj@^1.0.0: integrity sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0= map-obj@^4.0.0: - version "4.2.1" - resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-4.2.1.tgz#e4ea399dbc979ae735c83c863dd31bdf364277b7" - integrity sha512-+WA2/1sPmDj1dlvvJmB5G6JKfY9dpn7EVBUL06+y6PoljPkh+6V1QihwxNkbcGxCRjt2b0F9K0taiCuo7MbdFQ== + version "4.3.0" + resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-4.3.0.tgz#9304f906e93faae70880da102a9f1df0ea8bb05a" + integrity sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ== map-visit@^1.0.0: version "1.0.0" @@ -9801,9 +9816,9 @@ mem@^8.1.1: mimic-fn "^3.1.0" memfs@^3.1.2, memfs@^3.2.2: - version "3.2.4" - resolved "https://registry.yarnpkg.com/memfs/-/memfs-3.2.4.tgz#1108c28d2e9137daf5a5586af856c3e18c1c64b2" - integrity sha512-2mDCPhuduRPOxlfgsXF9V+uqC6Jgz8zt/bNe4d4W7d5f6pCzHrWkxLNr17jKGXd4+j2kQNsAG2HARPnt74sqVQ== + version "3.3.0" + resolved "https://registry.yarnpkg.com/memfs/-/memfs-3.3.0.tgz#4da2d1fc40a04b170a56622c7164c6be2c4cbef2" + integrity sha512-BEE62uMfKOavX3iG7GYX43QJ+hAeeWnwIAuJ/R6q96jaMtiLzhsxHJC8B1L7fK7Pt/vXDRwb3SG/yBpNGDPqzg== dependencies: fs-monkey "1.0.3" @@ -9907,11 +9922,16 @@ miller-rabin@^4.0.0: bn.js "^4.0.0" brorand "^1.0.1" -mime-db@1.49.0, "mime-db@>= 1.43.0 < 2": +mime-db@1.49.0: version "1.49.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.49.0.tgz#f3dfde60c99e9cf3bc9701d687778f537001cbed" integrity sha512-CIc8j9URtOVApSFCQIF+VBkX1RwXp/oMMOrqdyXSBXq5RWNEsRfyj1kiRnQgmNXmHxPoFIxOroKA3zcU9P+nAA== +"mime-db@>= 1.43.0 < 2": + version "1.50.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.50.0.tgz#abd4ac94e98d3c0e185016c67ab45d5fde40c11f" + integrity sha512-9tMZCDlYHqeERXEHO9f/hKfNXhre5dK2eE/krIvUjZbS2KPcqGDfNShIWS1uW9XOTKQKqK6qbeOci18rbfW77A== + mime-types@^2.1.12, mime-types@^2.1.27, mime-types@^2.1.31, mime-types@~2.1.17, mime-types@~2.1.19, mime-types@~2.1.24: version "2.1.32" resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.32.tgz#1d00e89e7de7fe02008db61001d9e02852670fd5" @@ -10048,9 +10068,9 @@ minipass@^2.6.0, minipass@^2.9.0: yallist "^3.0.0" minipass@^3.0.0, minipass@^3.1.0, minipass@^3.1.1, minipass@^3.1.3: - version "3.1.3" - resolved "https://registry.yarnpkg.com/minipass/-/minipass-3.1.3.tgz#7d42ff1f39635482e15f9cdb53184deebd5815fd" - integrity sha512-Mgd2GdMVzY+x3IJ+oHnVM+KG3lA5c8tnabyJKmHSaG2kAGpudxuOf8ToDkhumF7UzME7DecbQE9uOZhNm7PuJg== + version "3.1.5" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-3.1.5.tgz#71f6251b0a33a49c01b3cf97ff77eda030dff732" + integrity sha512-+8NzxD82XQoNKNrl1d/FSi+X8wAEWR+sbYAfIvub4Nz0d22plFG72CEVVaufV8PNf4qSslFTD8VMOxNVhHCjTw== dependencies: yallist "^4.0.0" @@ -10325,9 +10345,9 @@ node-forge@^0.10.0: integrity sha512-PPmu8eEeG9saEUvI97fm4OYxXVB6bFvyNTyiUOBichBpFG8A1Ljw3bY62+5oOjDEMHRnd0Y7HQ+x7uzxOzC6JA== node-gyp-build@^4.2.2: - version "4.2.3" - resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.2.3.tgz#ce6277f853835f718829efb47db20f3e4d9c4739" - integrity sha512-MN6ZpzmfNCRM+3t57PTJHgHyw/h4OWnZ6mR8P5j/uZtqQr46RRuDE/P+g3n0YR/AiYXeWixZZzaip77gdICfRg== + version "4.3.0" + resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.3.0.tgz#9f256b03e5826150be39c764bf51e993946d71a3" + integrity sha512-iWjXZvmboq0ja1pUGULQBexmxq8CV4xBhX7VDOTbL7ZR4FOowwY/VOtRxBN/yKxmdGoIp4j5ysNT4u3S2pDQ3Q== node-gyp@^5.0.2: version "5.1.1" @@ -10598,9 +10618,9 @@ npmlog@^4.1.2: set-blocking "~2.0.0" nth-check@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-2.0.0.tgz#1bb4f6dac70072fc313e8c9cd1417b5074c0a125" - integrity sha512-i4sc/Kj8htBrAiH1viZ0TgU8Y5XqCaV/FziYK6TBczxmeKm3AEFWqqF3195yKudrarqy7Zu80Ra5dobFjn9X/Q== + version "2.0.1" + resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-2.0.1.tgz#2efe162f5c3da06a28959fbd3db75dbeea9f0fc2" + integrity sha512-it1vE95zF6dTT9lBsYbxvqh0Soy4SPowchj0UBGj/V6cTPnXXtQOPUbhZ6CmGzAD/rW22LQK6E96pcdJXk4A4w== dependencies: boolbase "^1.0.0" @@ -11863,9 +11883,9 @@ prelude-ls@~1.1.2: integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ= prettier@^2.3.1: - version "2.4.0" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.4.0.tgz#85bdfe0f70c3e777cf13a4ffff39713ca6f64cba" - integrity sha512-DsEPLY1dE5HF3BxCRBmD4uYZ+5DCbvatnolqTqcxEgKVZnL2kUfyu7b8pPQ5+hTBkdhU9SLUmK0/pHb07RE4WQ== + version "2.4.1" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.4.1.tgz#671e11c89c14a4cfc876ce564106c4a6726c9f5c" + integrity sha512-9fbDAXSBcc6Bs1mZrDYb3XKzDLm4EXXL9sC1LqKP5rZkT6KRr/rf9amVUcODVXgguK/isJz0d0hP72WeaKWsvA== pretty-bytes@^5.3.0, pretty-bytes@^5.6.0: version "5.6.0" @@ -11882,10 +11902,10 @@ pretty-format@^26.0.0, pretty-format@^26.4.2, pretty-format@^26.6.2: ansi-styles "^4.0.0" react-is "^17.0.1" -pretty-format@^27.0.0, pretty-format@^27.0.6, pretty-format@^27.1.1: - version "27.1.1" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-27.1.1.tgz#cbaf9ec6cd7cfc3141478b6f6293c0ccdbe968e0" - integrity sha512-zdBi/xlstKJL42UH7goQti5Hip/B415w1Mfj+WWWYMBylAYtKESnXGUtVVcMVid9ReVjypCotUV6CEevYPHv2g== +pretty-format@^27.0.0, pretty-format@^27.0.6, pretty-format@^27.2.0: + version "27.2.0" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-27.2.0.tgz#ee37a94ce2a79765791a8649ae374d468c18ef19" + integrity sha512-KyJdmgBkMscLqo8A7K77omgLx5PWPiXJswtTtFV7XgVZv2+qPk6UivpXXO+5k6ZEbWIbLoKdx1pZ6ldINzbwTA== dependencies: "@jest/types" "^27.1.1" ansi-regex "^5.0.0" @@ -12306,14 +12326,14 @@ reflect-metadata@^0.1.2: resolved "https://registry.yarnpkg.com/reflect-metadata/-/reflect-metadata-0.1.13.tgz#67ae3ca57c972a2aa1642b10fe363fe32d49dc08" integrity sha512-Ts1Y/anZELhSsjMcU605fU9RE4Oi3p5ORujwbIKXfWa+0Zxs510Qrmrce5/Jowq3cHSZSJqBjypxmHarc+vEWg== -regenerate-unicode-properties@^8.2.0: - version "8.2.0" - resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-8.2.0.tgz#e5de7111d655e7ba60c057dbe9ff37c87e65cdec" - integrity sha512-F9DjY1vKLo/tPePDycuH3dn9H1OTPIkVD9Kz4LODu+F2C75mgjAJ7x/gwy6ZcSNRAAkhNlJSOHRe8k3p+K9WhA== +regenerate-unicode-properties@^9.0.0: + version "9.0.0" + resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-9.0.0.tgz#54d09c7115e1f53dc2314a974b32c1c344efe326" + integrity sha512-3E12UeNSPfjrgwjkR81m5J7Aw/T55Tu7nUyZVQYCKEOs+2dkxEY+DpPtZzO4YruuiPb7NkYLVcyJC4+zCbk5pA== dependencies: - regenerate "^1.4.0" + regenerate "^1.4.2" -regenerate@^1.4.0: +regenerate@^1.4.2: version "1.4.2" resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.2.tgz#b9346d8827e8f5a32f7ba29637d398b69014848a" integrity sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A== @@ -12357,26 +12377,26 @@ regexpp@^3.1.0: integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg== regexpu-core@^4.7.1: - version "4.7.1" - resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-4.7.1.tgz#2dea5a9a07233298fbf0db91fa9abc4c6e0f8ad6" - integrity sha512-ywH2VUraA44DZQuRKzARmw6S66mr48pQVva4LBeRhcOltJ6hExvWly5ZjFLYo67xbIxb6W1q4bAGtgfEl20zfQ== - dependencies: - regenerate "^1.4.0" - regenerate-unicode-properties "^8.2.0" - regjsgen "^0.5.1" - regjsparser "^0.6.4" - unicode-match-property-ecmascript "^1.0.4" - unicode-match-property-value-ecmascript "^1.2.0" - -regjsgen@^0.5.1: + version "4.8.0" + resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-4.8.0.tgz#e5605ba361b67b1718478501327502f4479a98f0" + integrity sha512-1F6bYsoYiz6is+oz70NWur2Vlh9KWtswuRuzJOfeYUrfPX2o8n74AnUVaOGDbUqVGO9fNHu48/pjJO4sNVwsOg== + dependencies: + regenerate "^1.4.2" + regenerate-unicode-properties "^9.0.0" + regjsgen "^0.5.2" + regjsparser "^0.7.0" + unicode-match-property-ecmascript "^2.0.0" + unicode-match-property-value-ecmascript "^2.0.0" + +regjsgen@^0.5.2: version "0.5.2" resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.5.2.tgz#92ff295fb1deecbf6ecdab2543d207e91aa33733" integrity sha512-OFFT3MfrH90xIW8OOSyUrk6QHD5E9JOTeGodiJeBS3J6IwlgzJMNE/1bZklWz5oTg+9dCMyEetclvCVXOPoN3A== -regjsparser@^0.6.4: - version "0.6.9" - resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.6.9.tgz#b489eef7c9a2ce43727627011429cf833a7183e6" - integrity sha512-ZqbNRz1SNjLAiYuwY0zoXW8Ne675IX5q+YHioAGbCw4X96Mjl2+dcX9B2ciaeyYjViDAfvIjFpQjJgLttTEERQ== +regjsparser@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.7.0.tgz#a6b667b54c885e18b52554cb4960ef71187e9968" + integrity sha512-A4pcaORqmNMDVwUjWoTzuhwMGpP+NykpfqAsEgI1FSH/EzC7lrN5TMd+kN8YCovX+jMpu8eaqXgXPCa0g8FQNQ== dependencies: jsesc "~0.5.0" @@ -12677,9 +12697,9 @@ sass@1.36.0: chokidar ">=3.0.0 <4.0.0" sass@^1.32.8: - version "1.39.2" - resolved "https://registry.yarnpkg.com/sass/-/sass-1.39.2.tgz#1681964378f58d76fc64a6a502619bd5ac99f660" - integrity sha512-4/6Vn2RPc+qNwSclUSKvssh7dqK1Ih3FfHBW16I/GfH47b3scbYeOw65UIrYG7PkweFiKbpJjgkf5CV8EMmvzw== + version "1.41.1" + resolved "https://registry.yarnpkg.com/sass/-/sass-1.41.1.tgz#bca5bed2154192779c29f48fca9c644c60c38d98" + integrity sha512-vIjX7izRxw3Wsiez7SX7D+j76v7tenfO18P59nonjr/nzCkZuoHuF7I/Fo0ZRZPKr88v29ivIdE9BqGDgQD/Nw== dependencies: chokidar ">=3.0.0 <4.0.0" @@ -12939,9 +12959,9 @@ side-channel@^1.0.4: object-inspect "^1.9.0" signal-exit@^3.0.0, signal-exit@^3.0.2, signal-exit@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c" - integrity sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA== + version "3.0.4" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.4.tgz#366a4684d175b9cab2081e3681fda3747b6c51d7" + integrity sha512-rqYhcAnZ6d/vTPGghdrw7iumdcbXpsk1b8IG/rz+VWV51DM0p7XCtMoJ3qhPLIbp3tvyt3pKRbaaEMZYpHto8Q== sisteransi@^1.0.5: version "1.0.5" @@ -13047,9 +13067,9 @@ socks-proxy-agent@^5.0.0: socks "^2.3.3" socks-proxy-agent@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-6.0.0.tgz#9f8749cdc05976505fa9f9a958b1818d0e60573b" - integrity sha512-FIgZbQWlnjVEQvMkylz64/rUggGtrKstPnx8OZyYFG0tAFR8CSBtpXxSwbFLHyeXFn/cunFL7MpuSOvDSOPo9g== + version "6.1.0" + resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-6.1.0.tgz#869cf2d7bd10fea96c7ad3111e81726855e285c3" + integrity sha512-57e7lwCN4Tzt3mXz25VxOErJKXlPfXmkMLnk310v/jwW20jWRVcgsOit+xNkN3eIEdB47GwnfAEBLacZ/wVIKg== dependencies: agent-base "^6.0.2" debug "^4.3.1" @@ -13123,7 +13143,7 @@ source-map-support@0.5.19: buffer-from "^1.0.0" source-map "^0.6.0" -source-map-support@^0.5.17, source-map-support@^0.5.5, source-map-support@^0.5.6, source-map-support@~0.5.12, source-map-support@~0.5.19: +source-map-support@^0.5.17, source-map-support@^0.5.5, source-map-support@^0.5.6, source-map-support@~0.5.12, source-map-support@~0.5.19, source-map-support@~0.5.20: version "0.5.20" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.20.tgz#12166089f8f5e5e8c56926b377633392dd2cb6c9" integrity sha512-n1lZZ8Ve4ksRqizaBQgxXDgKwttHDhyfQjA6YZZn8+AroHbsIz+JjwxQDxbp+7y5OYCI8t1Yk7etjD9CRd2hIw== @@ -13278,9 +13298,9 @@ stable@^0.1.8: integrity sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w== stack-utils@^2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-2.0.3.tgz#cd5f030126ff116b78ccb3c027fe302713b61277" - integrity sha512-gL//fkxfWUsIlFL2Tl42Cl6+HFALEaB1FU76I/Fy+oZjRreP7OPMXFlGbxM7NQsI0ZpUfw76sHnv0WNYuTb7Iw== + version "2.0.5" + resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-2.0.5.tgz#d25265fca995154659dbbfba3b49254778d2fdd5" + integrity sha512-xrQcmYhOsn/1kX+Vraq+7j4oE2j/6BFscZ0etmYg81xuM8Gq0022Pxb8+IqgOFUIaxHs0KaSb7T1+OegiNrNFA== dependencies: escape-string-regexp "^2.0.0" @@ -13563,12 +13583,12 @@ supports-hyperlinks@^2.0.0: supports-color "^7.0.0" svgo@^2.3.0: - version "2.5.0" - resolved "https://registry.yarnpkg.com/svgo/-/svgo-2.5.0.tgz#3c9051b606d85a02fcb59f459b19970d2cc2c9bf" - integrity sha512-FSdBOOo271VyF/qZnOn1PgwCdt1v4Dx0Sey+U1jgqm1vqRYjPGdip0RGrFW6ItwtkBB8rHgHk26dlVr0uCs82Q== + version "2.6.1" + resolved "https://registry.yarnpkg.com/svgo/-/svgo-2.6.1.tgz#60b613937e0081028cffc2369090e366b08f1f0e" + integrity sha512-SDo274ymyG1jJ3HtCr3hkfwS8NqWdF0fMr6xPlrJ5y2QMofsQxIEFWgR1epwb197teKGgnZbzozxvJyIeJpE2Q== dependencies: - "@trysound/sax" "0.1.1" - colorette "^1.3.0" + "@trysound/sax" "0.2.0" + colorette "^1.4.0" commander "^7.2.0" css-select "^4.1.3" css-tree "^1.1.3" @@ -13603,9 +13623,9 @@ tapable@^1.0.0, tapable@^1.1.3: integrity sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA== tapable@^2.1.1, tapable@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.0.tgz#5c373d281d9c672848213d0e037d1c4165ab426b" - integrity sha512-FBk4IesMV1rBxX2tfiK8RAmogtWn53puLOQlvO8XuwlgxcYbP4mVPS9Ph4aeamSyyVjOl24aYWAuc8U5kCVwMw== + version "2.2.1" + resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.1.tgz#1967a73ef4060a82f12ab96af86d52fdb76eeca0" + integrity sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ== tar@^4.4.12: version "4.4.19" @@ -13714,13 +13734,13 @@ terser@^4.1.2: source-map-support "~0.5.12" terser@^5.7.0, terser@^5.7.2: - version "5.7.2" - resolved "https://registry.yarnpkg.com/terser/-/terser-5.7.2.tgz#d4d95ed4f8bf735cb933e802f2a1829abf545e3f" - integrity sha512-0Omye+RD4X7X69O0eql3lC4Heh/5iLj3ggxR/B5ketZLOtLiOqukUgjw3q4PDnNQbsrkKr3UMypqStQG3XKRvw== + version "5.8.0" + resolved "https://registry.yarnpkg.com/terser/-/terser-5.8.0.tgz#c6d352f91aed85cc6171ccb5e84655b77521d947" + integrity sha512-f0JH+6yMpneYcRJN314lZrSwu9eKkUFEHLN/kNy8ceh8gaRiLgFPJqrB9HsXjhEGdv4e/ekjTOFxIlL6xlma8A== dependencies: commander "^2.20.0" source-map "~0.7.2" - source-map-support "~0.5.19" + source-map-support "~0.5.20" test-exclude@^6.0.0: version "6.0.0" @@ -14151,28 +14171,28 @@ unbox-primitive@^1.0.1: has-symbols "^1.0.2" which-boxed-primitive "^1.0.2" -unicode-canonical-property-names-ecmascript@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz#2619800c4c825800efdd8343af7dd9933cbe2818" - integrity sha512-jDrNnXWHd4oHiTZnx/ZG7gtUTVp+gCcTTKr8L0HjlwphROEW3+Him+IpvC+xcJEFegapiMZyZe02CyuOnRmbnQ== +unicode-canonical-property-names-ecmascript@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz#301acdc525631670d39f6146e0e77ff6bbdebddc" + integrity sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ== -unicode-match-property-ecmascript@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-1.0.4.tgz#8ed2a32569961bce9227d09cd3ffbb8fed5f020c" - integrity sha512-L4Qoh15vTfntsn4P1zqnHulG0LdXgjSO035fEpdtp6YxXhMT51Q6vgM5lYdG/5X3MjS+k/Y9Xw4SFCY9IkR0rg== +unicode-match-property-ecmascript@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-2.0.0.tgz#54fd16e0ecb167cf04cf1f756bdcc92eba7976c3" + integrity sha512-5kaZCrbp5mmbz5ulBkDkbY0SsPOjKqVS35VpL9ulMPfSl0J0Xsm+9Evphv9CoIZFwre7aJoa94AY6seMKGVN5Q== dependencies: - unicode-canonical-property-names-ecmascript "^1.0.4" - unicode-property-aliases-ecmascript "^1.0.4" + unicode-canonical-property-names-ecmascript "^2.0.0" + unicode-property-aliases-ecmascript "^2.0.0" -unicode-match-property-value-ecmascript@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.2.0.tgz#0d91f600eeeb3096aa962b1d6fc88876e64ea531" - integrity sha512-wjuQHGQVofmSJv1uVISKLE5zO2rNGzM/KCYZch/QQvez7C1hUhBIuZ701fYXExuufJFMPhv2SyL8CyoIfMLbIQ== +unicode-match-property-value-ecmascript@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.0.0.tgz#1a01aa57247c14c568b89775a54938788189a714" + integrity sha512-7Yhkc0Ye+t4PNYzOGKedDhXbYIBe1XEQYQxOPyhcXNMJ0WCABqqj6ckydd6pWRZTHV4GuCPKdBAUiMc60tsKVw== -unicode-property-aliases-ecmascript@^1.0.4: - version "1.1.0" - resolved "https://registry.yarnpkg.com/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.1.0.tgz#dd57a99f6207bedff4628abefb94c50db941c8f4" - integrity sha512-PqSoPh/pWetQ2phoj5RLiaqIk4kCNwoV3CI+LfGmWLKI3rE3kl1h59XpX2BjgDrmbxD9ARtQobPGU1SguCYuQg== +unicode-property-aliases-ecmascript@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.0.0.tgz#0a36cb9a585c4f6abd51ad1deddb285c165297c8" + integrity sha512-5Zfuy9q/DFr4tfO7ZPeVXb1aPoeQSdeFMLpYuFebehDAhbuevLs5yxSZmIFN1tP5F9Wl4IpJrYojg85/zgyZHQ== union-value@^1.0.0: version "1.0.1" @@ -14574,9 +14594,9 @@ webpack-sources@^1.2.0, webpack-sources@^1.3.0, webpack-sources@^1.4.0, webpack- source-map "~0.6.1" webpack-sources@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-3.2.0.tgz#b16973bcf844ebcdb3afde32eda1c04d0b90f89d" - integrity sha512-fahN08Et7P9trej8xz/Z7eRu8ltyiygEo/hnRi9KqBUs80KeDcnf96ZJo++ewWd84fEf3xSX9bp4ZS9hbw0OBw== + version "3.2.1" + resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-3.2.1.tgz#251a7d9720d75ada1469ca07dbb62f3641a05b6d" + integrity sha512-t6BMVLQ0AkjBOoRTZgqrWm7xbXMBzD+XDq2EZ96+vMfn3qKgsvdXZhbPZ4ElUOpdv4u+iiGe+w3+J75iy/bYGA== webpack-subresource-integrity@1.5.2: version "1.5.2" @@ -14645,9 +14665,9 @@ webpack@5.50.0: webpack-sources "^3.2.0" "webpack@^4.0.0 || ^5.30.0": - version "5.52.1" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.52.1.tgz#2dc1d9029ecb7acfb80da7bf67baab67baa517a7" - integrity sha512-wkGb0hLfrS7ML3n2xIKfUIwHbjB6gxwQHyLmVHoAqEQBw+nWo+G6LoHL098FEXqahqximsntjBLuewStrnJk0g== + version "5.53.0" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.53.0.tgz#f463cd9c6fc1356ae4b9b7ac911fd1f5b2df86af" + integrity sha512-RZ1Z3z3ni44snoWjfWeHFyzvd9HMVYDYC5VXmlYUT6NWgEOWdCNpad5Fve2CzzHoRED7WtsKe+FCyP5Vk4pWiQ== dependencies: "@types/eslint-scope" "^3.7.0" "@types/estree" "^0.0.50" diff --git a/npm/package-update-script.js b/npm/package-update-script.js index 58e24db554..27930f096c 100644 --- a/npm/package-update-script.js +++ b/npm/package-update-script.js @@ -4,8 +4,8 @@ const childProcess = require('child_process'); const { program } = require('commander'); program.version('0.0.1'); -program.option('-r, --rc', 'whether version is rc'); -program.option('-rg, --registry ', 'target npm server registry') +program.option('-pr, --prerelase', 'whether version is prerelase'); +program.option('-rg, --registry ', 'target npm server registry'); program.parse(process.argv); const packages = (process.argv[3] || 'abp').split(',').join('|'); @@ -15,7 +15,7 @@ const check = (pkgJsonPath) => { return childProcess .execSync( `ncu "/^@(${packages}).*$/" --packageFile ${pkgJsonPath} -u${ - program.rc ? ' --target greatest' : '' + program.prerelase ? ' --target greatest' : '' }${program.registry ? ` --registry ${program.registry}` : ''}` ) .toString(); diff --git a/npm/package.json b/npm/package.json index 724b0f7be1..2838e8eac0 100644 --- a/npm/package.json +++ b/npm/package.json @@ -16,6 +16,8 @@ "dependencies": { "commander": "^6.0.0", "execa": "^3.4.0", - "fs-extra": "^8.1.0" + "fast-glob": "^3.2.7", + "fs-extra": "^8.1.0", + "semver": "^7.3.5" } } diff --git a/npm/publish-utils.js b/npm/publish-utils.js index 395045c374..f3fb83c155 100644 --- a/npm/publish-utils.js +++ b/npm/publish-utils.js @@ -1,16 +1,18 @@ const { program } = require('commander'); const fse = require('fs-extra'); +const semverParse = require('semver/functions/parse'); program.version('0.0.1'); program.option('-n, --nextVersion', 'version in common.props'); -program.option('-r, --rc', 'whether version is rc'); +program.option('-pr, --prerelase', 'whether version is prerelase'); program.option('-cv, --customVersion ', 'set exact version'); program.parse(process.argv); if (program.nextVersion) console.log(getVersion()); -if (program.rc) console.log(getVersion().includes('rc')); +if (program.prerelase) + console.log(!!semverParse(getVersion()).prerelease?.length); function getVersion() { if (program.customVersion) return program.customVersion; diff --git a/npm/publish.ps1 b/npm/publish.ps1 index 486c6c6f4e..e563fc1fef 100644 --- a/npm/publish.ps1 +++ b/npm/publish.ps1 @@ -3,7 +3,7 @@ param( [string]$Registry ) -npm install +yarn install $NextVersion = $(node publish-utils.js --nextVersion) $RootFolder = (Get-Item -Path "./" -Verbose).FullName @@ -21,15 +21,12 @@ $PacksPublishCommand = "npm run lerna -- exec 'npm publish --registry $Registry' $UpdateGulpCommand = "npm run update-gulp" $UpdateNgPacksCommand = "yarn update --registry $Registry" -$IsRc = $(node publish-utils.js --rc --customVersion $Version) -eq "true"; +$IsPrerelase = $(node publish-utils.js --prerelase --customVersion $Version) -eq "true"; - - -if ($IsRc) { - $NgPacksPublishCommand += " --rc" - $UpdateGulpCommand += " -- --rc" +if ($IsPrerelase) { + $UpdateGulpCommand += " -- --prerelase" $PacksPublishCommand = $PacksPublishCommand.Substring(0, $PacksPublishCommand.Length - 1) + " --tag next'" - $UpdateNgPacksCommand += " --rc" + $UpdateNgPacksCommand += " --prerelase" } $commands = ( @@ -38,7 +35,7 @@ $commands = ( $PacksPublishCommand, $UpdateNgPacksCommand, "cd ng-packs\scripts", - "npm install", + "yarn install", $NgPacksPublishCommand, "cd ../../", "cd scripts", diff --git a/npm/update-gulp.js b/npm/update-gulp.js index d6076978eb..678c6a043b 100644 --- a/npm/update-gulp.js +++ b/npm/update-gulp.js @@ -1,4 +1,4 @@ -const glob = require('glob'); +const glob = require('fast-glob'); var path = require('path'); const childProcess = require('child_process'); const execa = require('execa'); @@ -6,7 +6,7 @@ const fse = require('fs-extra'); const { program } = require('commander'); program.version('0.0.1'); -program.option('-r, --rc', 'whether version is rc'); +program.option('-pr, --prerelase', 'whether version is prerelase'); program.parse(process.argv); const gulp = (folderPath) => { @@ -18,8 +18,9 @@ const gulp = (folderPath) => { } try { - execa.sync(`yarn`, ['install'], { cwd: folderPath, stdio: 'inherit' }); - execa.sync(`yarn`, ['gulp'], { cwd: folderPath, stdio: 'inherit' }); + fse.removeSync(`${folderPath}/wwwroot/libs`); + execa.sync('yarn', ['install'], { cwd: folderPath, stdio: 'inherit' }); + execa.sync('yarn', ['gulp'], { cwd: folderPath, stdio: 'inherit' }); } catch (error) { console.log('\x1b[31m', 'Error: ' + error.message); } @@ -30,7 +31,7 @@ const updatePackages = (pkgJsonPath) => { const result = childProcess .execSync( `ncu "/^@abp.*$/" --packageFile ${pkgJsonPath} -u${ - program.rc ? ' --target greatest' : '' + program.prerelase ? ' --target greatest' : '' }` ) .toString(); @@ -40,8 +41,9 @@ const updatePackages = (pkgJsonPath) => { } }; -console.time(); -glob('../**/package.json', {}, (er, files) => { +(async () => { + console.time(); + let files = await glob('../**/package.json'); files = files.filter( (f) => f && @@ -53,7 +55,9 @@ glob('../**/package.json', {}, (er, files) => { files.forEach((file) => { updatePackages(file); - gulp(file.replace('package.json', '')); + const folderPath = file.replace('package.json', ''); + gulp(folderPath); }); + console.timeEnd(); -}); +})(); diff --git a/npm/yarn.lock b/npm/yarn.lock index 5924e105bb..38e7e00716 100644 --- a/npm/yarn.lock +++ b/npm/yarn.lock @@ -2266,7 +2266,7 @@ fast-glob@^2.2.6: merge2 "^1.2.3" micromatch "^3.1.10" -fast-glob@^3.1.1: +fast-glob@^3.1.1, fast-glob@^3.2.7: version "3.2.7" resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.7.tgz#fd6cb7a2d7e9aa7a7846111e85a196d6b2f766a1" integrity sha512-rYGMRwip6lUMvYD3BTScMwT1HtAs2d71SMv66Vrxs0IekGZEjhM0pcMfjQPnknBt2zeCwQMEupiN02ZP4DiT1Q== diff --git a/nupkg/common.ps1 b/nupkg/common.ps1 index 7e357fa64b..c6bd29b578 100644 --- a/nupkg/common.ps1 +++ b/nupkg/common.ps1 @@ -112,6 +112,7 @@ $projects = ( "framework/src/Volo.Abp.HangFire", "framework/src/Volo.Abp.Http.Abstractions", "framework/src/Volo.Abp.Http.Client", + "framework/src/Volo.Abp.Http.Client.Web", "framework/src/Volo.Abp.Http.Client.IdentityModel", "framework/src/Volo.Abp.Http.Client.IdentityModel.Web", "framework/src/Volo.Abp.Http.Client.IdentityModel.WebAssembly", diff --git a/templates/app/angular/package.json b/templates/app/angular/package.json index 3314464704..fc56da87ad 100644 --- a/templates/app/angular/package.json +++ b/templates/app/angular/package.json @@ -20,40 +20,41 @@ "@abp/ng.tenant-management": "~4.4.2", "@abp/ng.theme.basic": "~4.4.2", "@abp/ng.theme.shared": "~4.4.2", - "@angular/animations": "~12.0.0", - "@angular/common": "~12.0.0", - "@angular/compiler": "~12.0.0", - "@angular/core": "~12.0.0", - "@angular/forms": "~12.0.0", - "@angular/platform-browser-dynamic": "~12.0.0", - "@angular/platform-browser": "~12.0.0", - "@angular/router": "~12.0.0", + "@angular/animations": "~12.2.6", + "@angular/common": "~12.2.6", + "@angular/compiler": "~12.2.6", + "@angular/core": "~12.2.6", + "@angular/forms": "~12.2.6", + "@angular/localize": "~12.2.6", + "@angular/platform-browser": "~12.2.6", + "@angular/platform-browser-dynamic": "~12.2.6", + "@angular/router": "~12.2.6", "rxjs": "~6.6.0", "tslib": "^2.1.0", "zone.js": "~0.11.4" }, "devDependencies": { "@abp/ng.schematics": "~4.4.2", - "@angular-devkit/build-angular": "~12.0.0", - "@angular-eslint/builder": "12.1.0", - "@angular-eslint/eslint-plugin-template": "12.1.0", - "@angular-eslint/eslint-plugin": "12.1.0", - "@angular-eslint/schematics": "12.1.0", - "@angular-eslint/template-parser": "12.1.0", - "@angular/cli": "~12.0.0", - "@angular/compiler-cli": "~12.0.0", - "@angular/language-service": "~12.0.4", + "@angular-devkit/build-angular": "~12.2.6", + "@angular-eslint/builder": "~12.5.0", + "@angular-eslint/eslint-plugin": "~12.5.0", + "@angular-eslint/eslint-plugin-template": "~12.5.0", + "@angular-eslint/schematics": "~12.5.0", + "@angular-eslint/template-parser": "~12.5.0", + "@angular/cli": "~12.2.6", + "@angular/compiler-cli": "~12.2.6", + "@angular/language-service": "~12.2.6", "@types/jasmine": "~3.6.0", "@types/node": "^12.11.1", - "@typescript-eslint/eslint-plugin": "4.23.0", - "@typescript-eslint/parser": "4.23.0", - "eslint": "^7.26.0", + "@typescript-eslint/eslint-plugin": "~4.31.2", + "@typescript-eslint/parser": "~4.31.2", + "eslint": "^7.32.0", "jasmine-core": "~3.7.0", + "karma": "~6.3.0", "karma-chrome-launcher": "~3.1.0", "karma-coverage": "~2.0.3", - "karma-jasmine-html-reporter": "^1.5.0", "karma-jasmine": "~4.0.0", - "karma": "~6.3.0", + "karma-jasmine-html-reporter": "^1.5.0", "ng-packagr": "^12.0.5", "typescript": "~4.2.3" } diff --git a/templates/app/angular/src/polyfills.ts b/templates/app/angular/src/polyfills.ts index 0cd2913442..9ba0f49439 100644 --- a/templates/app/angular/src/polyfills.ts +++ b/templates/app/angular/src/polyfills.ts @@ -57,3 +57,8 @@ import 'zone.js'; // Included with Angular CLI. /*************************************************************************************************** * APPLICATION IMPORTS */ + +/****************************************************************** + * Load `$localize` - used if i18n tags appear in Angular templates. + */ + import '@angular/localize/init'; \ No newline at end of file diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Domain/IdentityServer/IdentityServerDataSeedContributor.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Domain/IdentityServer/IdentityServerDataSeedContributor.cs index 99c1dc0160..72323efe49 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Domain/IdentityServer/IdentityServerDataSeedContributor.cs +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Domain/IdentityServer/IdentityServerDataSeedContributor.cs @@ -111,7 +111,7 @@ namespace MyCompanyName.MyProjectName.IdentityServer private async Task CreateApiScopeAsync(string name) { - var apiScope = await _apiScopeRepository.GetByNameAsync(name); + var apiScope = await _apiScopeRepository.FindByNameAsync(name); if (apiScope == null) { apiScope = await _apiScopeRepository.InsertAsync( diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/MyCompanyName.MyProjectName.Web.Host.csproj b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/MyCompanyName.MyProjectName.Web.Host.csproj index 58156811c1..25d7a9133e 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/MyCompanyName.MyProjectName.Web.Host.csproj +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/MyCompanyName.MyProjectName.Web.Host.csproj @@ -29,6 +29,7 @@ + diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/MyProjectNameWebModule.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/MyProjectNameWebModule.cs index 944fd56704..635907da3a 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/MyProjectNameWebModule.cs +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/MyProjectNameWebModule.cs @@ -29,6 +29,7 @@ using Volo.Abp.AutoMapper; using Volo.Abp.Caching; using Volo.Abp.Caching.StackExchangeRedis; using Volo.Abp.Http.Client.IdentityModel.Web; +using Volo.Abp.Http.Client.Web; using Volo.Abp.Identity.Web; using Volo.Abp.Modularity; using Volo.Abp.MultiTenancy; @@ -51,6 +52,7 @@ namespace MyCompanyName.MyProjectName.Web typeof(AbpAutofacModule), typeof(AbpCachingStackExchangeRedisModule), typeof(AbpSettingManagementWebModule), + typeof(AbpHttpClientWebModule), typeof(AbpHttpClientIdentityModelWebModule), typeof(AbpIdentityWebModule), typeof(AbpTenantManagementWebModule), diff --git a/templates/module/angular/package.json b/templates/module/angular/package.json index 6f7182950e..9d22c4fe42 100644 --- a/templates/module/angular/package.json +++ b/templates/module/angular/package.json @@ -4,9 +4,9 @@ "scripts": { "ng": "ng", "start": "ng serve dev-app --open", - "build": "ng build my-project-name --prod", - "build:app": "npm run symlink:copy -- --no-watch && ng build dev-app --prod", - "symlink:copy": "symlink copy --angular --packages @my-company-name/my-project-name --prod", + "build": "ng build my-project-name --configuration production", + "build:app": "npm run symlink:copy -- --no-watch && ng build dev-app --configuration production", + "symlink:copy": "symlink copy --angular --packages @my-company-name/my-project-name --configuration production", "test": "ng test", "lint": "ng lint", "e2e": "ng e2e", @@ -23,34 +23,35 @@ "@abp/ng.tenant-management": "~4.4.2", "@abp/ng.theme.basic": "~4.4.2", "@abp/ng.theme.shared": "~4.4.2", - "@angular/animations": "~12.0.0", - "@angular/common": "~12.0.0", - "@angular/compiler": "~12.0.0", - "@angular/core": "~12.0.0", - "@angular/forms": "~12.0.0", - "@angular/platform-browser": "~12.0.0", - "@angular/platform-browser-dynamic": "~12.0.0", - "@angular/router": "~12.0.0", + "@angular/animations": "~12.2.6", + "@angular/common": "~12.2.6", + "@angular/compiler": "~12.2.6", + "@angular/core": "~12.2.6", + "@angular/forms": "~12.2.6", + "@angular/localize": "~12.2.6", + "@angular/platform-browser": "~12.2.6", + "@angular/platform-browser-dynamic": "~12.2.6", + "@angular/router": "~12.2.6", "rxjs": "~6.6.0", "tslib": "^2.1.0", "zone.js": "~0.11.4" }, "devDependencies": { "@abp/ng.schematics": "~4.4.2", - "symlink-manager": "^1.5.0", - "@angular-devkit/build-angular": "~12.0.4", - "@angular-eslint/builder": "12.1.0", - "@angular-eslint/eslint-plugin": "12.1.0", - "@angular-eslint/eslint-plugin-template": "12.1.0", - "@angular-eslint/schematics": "12.1.0", - "@angular-eslint/template-parser": "12.1.0", - "@angular/cli": "~12.0.0", - "@angular/compiler-cli": "~12.0.0", + "@angular-devkit/build-angular": "~12.2.6", + "@angular-eslint/builder": "~12.5.0", + "@angular-eslint/eslint-plugin": "~12.5.0", + "@angular-eslint/eslint-plugin-template": "~12.5.0", + "@angular-eslint/schematics": "~12.5.0", + "@angular-eslint/template-parser": "~12.5.0", + "@angular/cli": "~12.2.6", + "@angular/compiler-cli": "~12.2.6", + "@angular/language-service": "~12.2.6", "@types/jasmine": "~3.6.0", "@types/node": "^12.11.1", - "@typescript-eslint/eslint-plugin": "4.23.0", - "@typescript-eslint/parser": "4.23.0", - "eslint": "^7.26.0", + "@typescript-eslint/eslint-plugin": "~4.31.2", + "@typescript-eslint/parser": "~4.31.2", + "eslint": "^7.32.0", "jasmine-core": "~3.7.0", "karma": "~6.3.0", "karma-chrome-launcher": "~3.1.0", @@ -58,6 +59,7 @@ "karma-jasmine": "~4.0.0", "karma-jasmine-html-reporter": "^1.5.0", "ng-packagr": "^12.0.0", + "symlink-manager": "^1.5.0", "typescript": "~4.2.3" } } diff --git a/templates/module/angular/projects/dev-app/src/polyfills.ts b/templates/module/angular/projects/dev-app/src/polyfills.ts index 0cd2913442..9ba0f49439 100644 --- a/templates/module/angular/projects/dev-app/src/polyfills.ts +++ b/templates/module/angular/projects/dev-app/src/polyfills.ts @@ -57,3 +57,8 @@ import 'zone.js'; // Included with Angular CLI. /*************************************************************************************************** * APPLICATION IMPORTS */ + +/****************************************************************** + * Load `$localize` - used if i18n tags appear in Angular templates. + */ + import '@angular/localize/init'; \ No newline at end of file diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/IdentityServer/IdentityServerDataSeedContributor.cs b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/IdentityServer/IdentityServerDataSeedContributor.cs index 8ef6404e48..259e0c9236 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/IdentityServer/IdentityServerDataSeedContributor.cs +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/IdentityServer/IdentityServerDataSeedContributor.cs @@ -111,7 +111,7 @@ namespace MyCompanyName.MyProjectName.IdentityServer private async Task CreateApiScopeAsync(string name) { - var apiScope = await _apiScopeRepository.GetByNameAsync(name); + var apiScope = await _apiScopeRepository.FindByNameAsync(name); if (apiScope == null) { apiScope = await _apiScopeRepository.InsertAsync( diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/MyCompanyName.MyProjectName.IdentityServer.csproj b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/MyCompanyName.MyProjectName.IdentityServer.csproj index c55a8af820..460d65be67 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/MyCompanyName.MyProjectName.IdentityServer.csproj +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/MyCompanyName.MyProjectName.IdentityServer.csproj @@ -28,6 +28,7 @@ + diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/MyProjectNameIdentityServerModule.cs b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/MyProjectNameIdentityServerModule.cs index 447c4e979a..de70793f38 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/MyProjectNameIdentityServerModule.cs +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/MyProjectNameIdentityServerModule.cs @@ -52,6 +52,7 @@ namespace MyCompanyName.MyProjectName [DependsOn( typeof(AbpAccountWebIdentityServerModule), typeof(AbpAccountApplicationModule), + typeof(AbpAccountHttpApiModule), typeof(AbpAspNetCoreMvcUiMultiTenancyModule), typeof(AbpAspNetCoreMvcModule), typeof(AbpAspNetCoreMvcUiBasicThemeModule), diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Host/MyCompanyName.MyProjectName.Web.Host.csproj b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Host/MyCompanyName.MyProjectName.Web.Host.csproj index 8ebd636810..a6dc611aef 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Host/MyCompanyName.MyProjectName.Web.Host.csproj +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Host/MyCompanyName.MyProjectName.Web.Host.csproj @@ -21,6 +21,7 @@ + diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Host/MyProjectNameWebHostModule.cs b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Host/MyProjectNameWebHostModule.cs index a5bc702a57..3ea5dfc03a 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Host/MyProjectNameWebHostModule.cs +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Host/MyProjectNameWebHostModule.cs @@ -34,6 +34,7 @@ using Volo.Abp.Caching; using Volo.Abp.Caching.StackExchangeRedis; using Volo.Abp.FeatureManagement; using Volo.Abp.Http.Client.IdentityModel.Web; +using Volo.Abp.Http.Client.Web; using Volo.Abp.Identity; using Volo.Abp.Identity.Web; using Volo.Abp.Modularity; @@ -59,6 +60,7 @@ namespace MyCompanyName.MyProjectName typeof(AbpAspNetCoreMvcUiBasicThemeModule), typeof(AbpAutofacModule), typeof(AbpCachingStackExchangeRedisModule), + typeof(AbpHttpClientWebModule), typeof(AbpHttpClientIdentityModelWebModule), typeof(AbpIdentityWebModule), typeof(AbpIdentityHttpApiClientModule), diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/MyCompanyName.MyProjectName.Web.Unified.csproj b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/MyCompanyName.MyProjectName.Web.Unified.csproj index 5792a83a43..5cdee8e8c6 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/MyCompanyName.MyProjectName.Web.Unified.csproj +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/MyCompanyName.MyProjectName.Web.Unified.csproj @@ -24,23 +24,29 @@ + + + + +
                                                          + diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/MyProjectNameWebUnifiedModule.cs b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/MyProjectNameWebUnifiedModule.cs index d4b6d3f310..3a7217743a 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/MyProjectNameWebUnifiedModule.cs +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/MyProjectNameWebUnifiedModule.cs @@ -29,6 +29,7 @@ using Volo.Abp.Modularity; using Volo.Abp.MultiTenancy; using Volo.Abp.PermissionManagement; using Volo.Abp.PermissionManagement.EntityFrameworkCore; +using Volo.Abp.PermissionManagement.HttpApi; using Volo.Abp.PermissionManagement.Identity; using Volo.Abp.SettingManagement.EntityFrameworkCore; using Volo.Abp.Swashbuckle; @@ -43,24 +44,30 @@ namespace MyCompanyName.MyProjectName [DependsOn( typeof(MyProjectNameWebModule), typeof(MyProjectNameApplicationModule), + typeof(MyProjectNameHttpApiModule), typeof(MyProjectNameEntityFrameworkCoreModule), typeof(AbpAuditLoggingEntityFrameworkCoreModule), typeof(AbpAutofacModule), typeof(AbpAccountWebModule), typeof(AbpAccountApplicationModule), + typeof(AbpAccountHttpApiModule), typeof(AbpEntityFrameworkCoreSqlServerModule), typeof(AbpSettingManagementEntityFrameworkCoreModule), typeof(AbpPermissionManagementEntityFrameworkCoreModule), typeof(AbpPermissionManagementApplicationModule), + typeof(AbpPermissionManagementHttpApiModule), typeof(AbpIdentityWebModule), typeof(AbpIdentityApplicationModule), + typeof(AbpIdentityHttpApiModule), typeof(AbpIdentityEntityFrameworkCoreModule), typeof(AbpPermissionManagementDomainIdentityModule), typeof(AbpFeatureManagementWebModule), typeof(AbpFeatureManagementApplicationModule), + typeof(AbpFeatureManagementHttpApiModule), typeof(AbpFeatureManagementEntityFrameworkCoreModule), typeof(AbpTenantManagementWebModule), typeof(AbpTenantManagementApplicationModule), + typeof(AbpTenantManagementHttpApiModule), typeof(AbpTenantManagementEntityFrameworkCoreModule), typeof(AbpAspNetCoreMvcUiBasicThemeModule), typeof(AbpAspNetCoreSerilogModule), diff --git a/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore/EntityFrameworkCore/MyProjectNameDbContextModelCreatingExtensions.cs b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore/EntityFrameworkCore/MyProjectNameDbContextModelCreatingExtensions.cs index 0e1e01628d..d8489151e4 100644 --- a/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore/EntityFrameworkCore/MyProjectNameDbContextModelCreatingExtensions.cs +++ b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore/EntityFrameworkCore/MyProjectNameDbContextModelCreatingExtensions.cs @@ -1,5 +1,4 @@ -using System; -using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; using Volo.Abp; namespace MyCompanyName.MyProjectName.EntityFrameworkCore @@ -7,30 +6,22 @@ namespace MyCompanyName.MyProjectName.EntityFrameworkCore public static class MyProjectNameDbContextModelCreatingExtensions { public static void ConfigureMyProjectName( - this ModelBuilder builder, - Action optionsAction = null) + this ModelBuilder builder) { Check.NotNull(builder, nameof(builder)); - var options = new MyProjectNameModelBuilderConfigurationOptions( - MyProjectNameDbProperties.DbTablePrefix, - MyProjectNameDbProperties.DbSchema - ); - - optionsAction?.Invoke(options); - /* Configure all entities here. Example: builder.Entity(b => { //Configure table & schema name - b.ToTable(options.TablePrefix + "Questions", options.Schema); - + b.ToTable(MyProjectNameDbProperties.DbTablePrefix + "Questions", MyProjectNameDbProperties.DbSchema); + b.ConfigureByConvention(); - + //Properties b.Property(q => q.Title).IsRequired().HasMaxLength(QuestionConsts.MaxTitleLength); - + //Relations b.HasMany(question => question.Tags).WithOne().HasForeignKey(qt => qt.QuestionId); @@ -40,4 +31,4 @@ namespace MyCompanyName.MyProjectName.EntityFrameworkCore */ } } -} \ No newline at end of file +} diff --git a/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore/EntityFrameworkCore/MyProjectNameModelBuilderConfigurationOptions.cs b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore/EntityFrameworkCore/MyProjectNameModelBuilderConfigurationOptions.cs deleted file mode 100644 index 8b3c2a49dd..0000000000 --- a/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore/EntityFrameworkCore/MyProjectNameModelBuilderConfigurationOptions.cs +++ /dev/null @@ -1,18 +0,0 @@ -using JetBrains.Annotations; -using Volo.Abp.EntityFrameworkCore.Modeling; - -namespace MyCompanyName.MyProjectName.EntityFrameworkCore -{ - public class MyProjectNameModelBuilderConfigurationOptions : AbpModelBuilderConfigurationOptions - { - public MyProjectNameModelBuilderConfigurationOptions( - [NotNull] string tablePrefix = "", - [CanBeNull] string schema = null) - : base( - tablePrefix, - schema) - { - - } - } -} \ No newline at end of file diff --git a/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Client/ClientProxies/MyProjectName-generate-proxy.json b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Client/ClientProxies/MyProjectName-generate-proxy.json new file mode 100644 index 0000000000..0c806b2f57 --- /dev/null +++ b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Client/ClientProxies/MyProjectName-generate-proxy.json @@ -0,0 +1,53 @@ +{ + "modules": { + "MyProjectName": { + "rootPath": "MyProjectName", + "remoteServiceName": "MyProjectName", + "controllers": { + "MyCompanyName.MyProjectName.Samples.SampleController": { + "controllerName": "Sample", + "controllerGroupName": "Sample", + "type": "MyCompanyName.MyProjectName.Samples.SampleController", + "interfaces": [ + { + "type": "MyCompanyName.MyProjectName.Samples.ISampleAppService" + } + ], + "actions": { + "GetAsync": { + "uniqueName": "GetAsync", + "name": "GetAsync", + "httpMethod": "GET", + "url": "api/MyProjectName/sample", + "supportedVersions": [], + "parametersOnMethod": [], + "parameters": [], + "returnValue": { + "type": "MyCompanyName.MyProjectName.Samples.SampleDto", + "typeSimple": "MyCompanyName.MyProjectName.Samples.SampleDto" + }, + "allowAnonymous": null, + "implementFrom": "MyCompanyName.MyProjectName.Samples.ISampleAppService" + }, + "GetAuthorizedAsync": { + "uniqueName": "GetAuthorizedAsync", + "name": "GetAuthorizedAsync", + "httpMethod": "GET", + "url": "api/MyProjectName/sample/authorized", + "supportedVersions": [], + "parametersOnMethod": [], + "parameters": [], + "returnValue": { + "type": "MyCompanyName.MyProjectName.Samples.SampleDto", + "typeSimple": "MyCompanyName.MyProjectName.Samples.SampleDto" + }, + "allowAnonymous": false, + "implementFrom": "MyCompanyName.MyProjectName.Samples.ISampleAppService" + } + } + } + } + } + }, + "types": {} +} \ No newline at end of file diff --git a/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Client/ClientProxies/SampleClientProxy.Generated.cs b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Client/ClientProxies/SampleClientProxy.Generated.cs new file mode 100644 index 0000000000..e73241ee35 --- /dev/null +++ b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Client/ClientProxies/SampleClientProxy.Generated.cs @@ -0,0 +1,28 @@ +// This file is automatically generated by ABP framework to use MVC Controllers from CSharp +using System; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Http.Client; +using Volo.Abp.Http.Modeling; +using Volo.Abp.DependencyInjection; +using Volo.Abp.Http.Client.ClientProxying; +using MyCompanyName.MyProjectName.Samples; + +// ReSharper disable once CheckNamespace +namespace MyCompanyName.MyProjectName.Samples.ClientProxies +{ + [Dependency(ReplaceServices = true)] + [ExposeServices(typeof(ISampleAppService), typeof(SampleClientProxy))] + public partial class SampleClientProxy : ClientProxyBase, ISampleAppService + { + public virtual async Task GetAsync() + { + return await RequestAsync(nameof(GetAsync)); + } + + public virtual async Task GetAuthorizedAsync() + { + return await RequestAsync(nameof(GetAuthorizedAsync)); + } + } +} diff --git a/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Client/ClientProxies/SampleClientProxy.cs b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Client/ClientProxies/SampleClientProxy.cs new file mode 100644 index 0000000000..b8b7874053 --- /dev/null +++ b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Client/ClientProxies/SampleClientProxy.cs @@ -0,0 +1,8 @@ +// This file is part of SampleClientProxy, you can customize it here +// ReSharper disable once CheckNamespace +namespace MyCompanyName.MyProjectName.Samples.ClientProxies +{ + public partial class SampleClientProxy + { + } +} diff --git a/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Client/MyProjectNameHttpApiClientModule.cs b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Client/MyProjectNameHttpApiClientModule.cs index ecf17f49e4..12929adf06 100644 --- a/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Client/MyProjectNameHttpApiClientModule.cs +++ b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Client/MyProjectNameHttpApiClientModule.cs @@ -12,7 +12,7 @@ namespace MyCompanyName.MyProjectName { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.AddHttpClientProxies( + context.Services.AddStaticHttpClientProxies( typeof(MyProjectNameApplicationContractsModule).Assembly, MyProjectNameRemoteServiceConsts.RemoteServiceName ); diff --git a/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi/Samples/SampleController.cs b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi/Samples/SampleController.cs index 9d4ef179c9..3d868495b9 100644 --- a/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi/Samples/SampleController.cs +++ b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi/Samples/SampleController.cs @@ -5,6 +5,7 @@ using Volo.Abp; namespace MyCompanyName.MyProjectName.Samples { + [Area("MyProjectName")] [RemoteService(Name = MyProjectNameRemoteServiceConsts.RemoteServiceName)] [Route("api/MyProjectName/sample")] public class SampleController : MyProjectNameController, ISampleAppService diff --git a/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.MongoDB/MongoDB/MyProjectNameMongoDbContextExtensions.cs b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.MongoDB/MongoDB/MyProjectNameMongoDbContextExtensions.cs index 4dca336b5e..a66e949d4e 100644 --- a/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.MongoDB/MongoDB/MyProjectNameMongoDbContextExtensions.cs +++ b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.MongoDB/MongoDB/MyProjectNameMongoDbContextExtensions.cs @@ -1,5 +1,4 @@ -using System; -using Volo.Abp; +using Volo.Abp; using Volo.Abp.MongoDB; namespace MyCompanyName.MyProjectName.MongoDB @@ -7,16 +6,9 @@ namespace MyCompanyName.MyProjectName.MongoDB public static class MyProjectNameMongoDbContextExtensions { public static void ConfigureMyProjectName( - this IMongoModelBuilder builder, - Action optionsAction = null) + this IMongoModelBuilder builder) { Check.NotNull(builder, nameof(builder)); - - var options = new MyProjectNameMongoModelBuilderConfigurationOptions( - MyProjectNameDbProperties.DbTablePrefix - ); - - optionsAction?.Invoke(options); } } -} \ No newline at end of file +} diff --git a/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.MongoDB/MongoDB/MyProjectNameMongoModelBuilderConfigurationOptions.cs b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.MongoDB/MongoDB/MyProjectNameMongoModelBuilderConfigurationOptions.cs deleted file mode 100644 index c40728fefa..0000000000 --- a/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.MongoDB/MongoDB/MyProjectNameMongoModelBuilderConfigurationOptions.cs +++ /dev/null @@ -1,14 +0,0 @@ -using JetBrains.Annotations; -using Volo.Abp.MongoDB; - -namespace MyCompanyName.MyProjectName.MongoDB -{ - public class MyProjectNameMongoModelBuilderConfigurationOptions : AbpMongoModelBuilderConfigurationOptions - { - public MyProjectNameMongoModelBuilderConfigurationOptions( - [NotNull] string collectionPrefix = "") - : base(collectionPrefix) - { - } - } -} \ No newline at end of file diff --git a/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Web/Pages/MyProjectName/Index.cshtml b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Web/Pages/MyProjectName/Index.cshtml index 5807d89d9a..20fecbff87 100644 --- a/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Web/Pages/MyProjectName/Index.cshtml +++ b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Web/Pages/MyProjectName/Index.cshtml @@ -1,8 +1,16 @@ @page @using Microsoft.Extensions.Localization @using MyCompanyName.MyProjectName.Localization +@using MyCompanyName.MyProjectName.Web.Pages.MyProjectName @model MyCompanyName.MyProjectName.Web.Pages.MyProjectName.IndexModel @inject IStringLocalizer L + +@section scripts { + + + +} + @{ }

                                                          MyProjectName

                                                          diff --git a/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Web/wwwroot/client-proxies/MyProjectName-proxy.js b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Web/wwwroot/client-proxies/MyProjectName-proxy.js new file mode 100644 index 0000000000..563b98a3f9 --- /dev/null +++ b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Web/wwwroot/client-proxies/MyProjectName-proxy.js @@ -0,0 +1,32 @@ +/* This file is automatically generated by ABP framework to use MVC Controllers from javascript. */ + + +// module myProjectName + +(function(){ + + // controller myCompanyName.myProjectName.samples.sample + + (function(){ + + abp.utils.createNamespace(window, 'myCompanyName.myProjectName.samples.sample'); + + myCompanyName.myProjectName.samples.sample.get = function(ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/MyProjectName/sample', + type: 'GET' + }, ajaxParams)); + }; + + myCompanyName.myProjectName.samples.sample.getAuthorized = function(ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/MyProjectName/sample/authorized', + type: 'GET' + }, ajaxParams)); + }; + + })(); + +})(); + +