diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 366972c165..062bf71d89 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -17,7 +17,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-dotnet@master with: - dotnet-version: 3.1.102 + dotnet-version: 5.0.100-rc.2.20479.15 - name: Build All run: .\build-all.ps1 diff --git a/NuGet.Config b/NuGet.Config new file mode 100644 index 0000000000..a0572030a2 --- /dev/null +++ b/NuGet.Config @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/abp_io/AbpIoLocalization/AbpIoLocalization/Community/Localization/Resources/en.json b/abp_io/AbpIoLocalization/AbpIoLocalization/Community/Localization/Resources/en.json index ea5237bc29..2544e50726 100644 --- a/abp_io/AbpIoLocalization/AbpIoLocalization/Community/Localization/Resources/en.json +++ b/abp_io/AbpIoLocalization/AbpIoLocalization/Community/Localization/Resources/en.json @@ -83,6 +83,7 @@ "LatestBlogPost": "Latest Blog Post", "Edit": "Edit", "ProfileImageChange": "Change the profile image", - "BlogItemErrorMessage": "Could not get the latest blog post details from ABP." + "BlogItemErrorMessage": "Could not get the latest blog post details from ABP.", + "PlannedReleaseDate": "Planned release date" } } diff --git a/build/common.ps1 b/build/common.ps1 index 18019a154e..830b6ce270 100644 --- a/build/common.ps1 +++ b/build/common.ps1 @@ -16,7 +16,9 @@ $solutionPaths = @( "../modules/tenant-management", "../modules/audit-logging", "../modules/background-jobs", - "../modules/account" + "../modules/account", + "../modules/cms-kit", + "../modules/blob-storing-database" ) if ($full -eq "-f") diff --git a/common.props b/common.props index 5671a3fc31..fb54e50baf 100644 --- a/common.props +++ b/common.props @@ -1,7 +1,7 @@ latest - 3.3.0 + 4.0.0 $(NoWarn);CS1591;CS0436 https://abp.io/assets/abp_nupkg.png https://abp.io/ diff --git a/docs/en/Application-Services.md b/docs/en/Application-Services.md index 9cfec614cb..f48ff9cb5b 100644 --- a/docs/en/Application-Services.md +++ b/docs/en/Application-Services.md @@ -445,6 +445,68 @@ These methods are used to convert Entities to DTOs and vice verse. They uses the * `MapToEntityAsync(TCreateInput)` is used to create an entity from `TCreateInput`. * `MapToEntityAsync(TUpdateInput, TEntity)` is used to update an existing entity from `TUpdateInput`. +## Miscellaneous + +### Working with Streams + +`Stream` object itself is not serializable. So, you may have problems if you directly use `Stream` as the parameter or the return value for your application service. ABP Framework provides a special type, `IRemoteStreamContent` to be used to get or return streams in the application services. + +**Example: Application Service Interface that can be used to get and return streams** + +````csharp +using System; +using System.Threading.Tasks; +using Volo.Abp.Application.Services; +using Volo.Abp.Content; + +namespace MyProject.Test +{ + public interface ITestAppService : IApplicationService + { + Task Upload(Guid id, IRemoteStreamContent streamContent); + Task Download(Guid id); + } +} +```` + +**Example: Application Service Implementation that can be used to get and return streams** + +````csharp +using System; +using System.IO; +using System.Threading.Tasks; +using Volo.Abp; +using Volo.Abp.Application.Services; +using Volo.Abp.Content; + +namespace MyProject.Test +{ + public class TestAppService : ApplicationService, ITestAppService + { + public Task Download(Guid id) + { + var fs = new FileStream("C:\\Temp\\" + id + ".blob", FileMode.OpenOrCreate); + return Task.FromResult( + (IRemoteStreamContent) new RemoteStreamContent(fs) { + ContentType = "application/octet-stream" + } + ); + } + + public async Task Upload(Guid id, IRemoteStreamContent streamContent) + { + using (var fs = new FileStream("C:\\Temp\\" + id + ".blob", FileMode.Create)) + { + await streamContent.GetStream().CopyToAsync(fs); + await fs.FlushAsync(); + } + } + } +} +```` + +`IRemoteStreamContent` is compatible with the [Auto API Controller](API/Auto-API-Controllers.md) and [Dynamic C# HTTP Proxy](API/Dynamic-CSharp-API-Clients.md) systems. + ## Lifetime Lifetime of application services are [transient](Dependency-Injection.md) and they are automatically registered to the dependency injection system. diff --git a/docs/en/Best-Practices/Application-Services.md b/docs/en/Best-Practices/Application-Services.md index 3332ce08ea..ff8afe81d2 100644 --- a/docs/en/Best-Practices/Application-Services.md +++ b/docs/en/Best-Practices/Application-Services.md @@ -213,6 +213,11 @@ This method votes a question and returns the current score of the question. * **Do** always get all the related entities from repositories to perform the operations on them. * **Do** call repository's Update/UpdateAsync method after updating an entity. Because, not all database APIs support change tracking & auto update. +#### Handle files + +* **Do not** use any web components like `IFormFile` or `Stream` in the application services. If you want to serve a file you can use `byte[]`. +* **Do** use a `Controller` to handle file uploading then pass the `byte[]` of the file to the application service method. + #### Using Other Application Services * **Do not** use other application services of the same module/application. Instead; diff --git a/docs/en/Blog-Posts/2020-10-15 v3_3_Preview/POST.md b/docs/en/Blog-Posts/2020-10-15 v3_3_Preview/POST.md new file mode 100644 index 0000000000..4e19a294c1 --- /dev/null +++ b/docs/en/Blog-Posts/2020-10-15 v3_3_Preview/POST.md @@ -0,0 +1,271 @@ +# ABP Framework 3.3 RC Has Been Published + +We have released the [ABP Framework](https://abp.io/) (and the [ABP Commercial](https://commercial.abp.io/)) `3.3.0-rc.1` today. This blog post introduces the new features and important changes in the new version. + +## Get Started with the 3.3 RC.1 + +If you want to try the version `3.3.0-rc.1` today, follow the steps below; + +1) **Upgrade** the ABP CLI to the version `3.3.0-rc.1` using a command line terminal: + +````bash +dotnet tool update Volo.Abp.Cli -g --version 3.3.0-rc.1 +```` + +**or install** if you haven't installed before: + +````bash +dotnet tool install Volo.Abp.Cli -g --version 3.3.0-rc.1 +```` + +2) Create a **new application** with the `--preview` option: + +````bash +abp new BookStore --preview +```` + +See the [ABP CLI documentation](https://docs.abp.io/en/abp/3.3/CLI) for all the available options. + +> You can also use the *Direct Download* tab on the [Get Started](https://abp.io/get-started) page by selecting the Preview checkbox. + +## What's new with the ABP Framework 3.3 + +### The Blazor UI + +We had released an experimental early preview version of the Blazor UI with the [previous version](https://blog.abp.io/abp/ABP-Framework-ABP-Commercial-3.2-RC-With-The-New-Blazor-UI). In this version, we've completed most of the fundamental infrastructure features and the application modules (like identity and tenant management). + +It currently has almost the same functionalities as the other UI types (Angular & MVC / Razor Pages). + +**Example screenshot**: User management page of the Blazor UI + +![abp-blazor-ui](abp-blazor-ui.png) + +> We've adapted the [Lepton Theme](https://commercial.abp.io/themes) for the ABP Commercial, see the related section below. + +We are still working on the fundamentals. So, the next version may introduce breaking changes of the Blazor UI. We will work hard to keep them with the minimal effect on your application code. + +#### Breaking Changes on the Blazor UI + +There are some breaking changes with the Blazor UI. If you've built an application and upgrade it, your application might not properly work. See [the migration guide](https://docs.abp.io/en/abp/3.3/Migration-Guides/BlazorUI-3_3) for the changes you need to do after upgrading your application. + +### Automatic Validation for AntiForgery Token for HTTP APIs + +Starting with the version 3.3, all your HTTP API endpoints are **automatically protected** against CSRF attacks, unless you disable it for your application. So, no configuration needed, just upgrade the ABP Framework. + +[See the documentation](https://docs.abp.io/en/abp/3.3/CSRF-Anti-Forgery) to if you want to understand why you need it and how ABP Framework solves the problem. + +### Rebus Integration Package for the Distributed Event Bus + +[Rebus](https://github.com/rebus-org/Rebus) describes itself as "Simple and lean service bus implementation for .NET". There are a lot of integration packages like RabbitMQ and Azure Service Bus for the Rebus. The new [Volo.Abp.EventBus.Rebus](https://www.nuget.org/packages/Volo.Abp.EventBus.Rebus) package allows you to use the Rebus as the [distributed event bus](https://docs.abp.io/en/abp/latest/Distributed-Event-Bus) for the ABP Framework. + +See [the documentation](https://docs.abp.io/en/abp/3.3/Distributed-Event-Bus-Rebus-Integration) to learn how to use Rebus with the ABP Framework. + +### Async Repository LINQ Extension Methods + +You have a problem when you want to use **Async LINQ Extension Methods** (e.g. `FirstOrDefaultAsync(...)`) in your **domain** and **application** layers. These async methods are **not included in the standard LINQ extension methods**. Those are defined by the [Microsoft.EntityFrameworkCore](https://www.nuget.org/packages/Microsoft.EntityFrameworkCore) NuGet package (see [the code](https://github.com/dotnet/efcore/blob/main/src/EFCore/Extensions/EntityFrameworkQueryableExtensions.cs)). To be able to use these `async` methods, you need to reference to the `Microsoft.EntityFrameworkCore` package. + +If you don't want to depend on the EF Core in your business layer, then ABP Framework provides the `IAsyncQueryableExecuter` service to execute your queries asynchronously without depending on the EF Core package. You can see [the documentation](https://docs.abp.io/en/abp/latest/Repositories#option-3-iasyncqueryableexecuter) to get more information about this service. + +ABP Framework version 3.3 takes this one step further and allows you to directly execute the async LINQ extension methods on the `IRepository` interface. + +**Example: Use `CountAsync` and `FirstOrDefaultAsync` methods on the repositories** + +````csharp +using System; +using System.Threading.Tasks; +using Volo.Abp.Application.Services; +using Volo.Abp.Domain.Repositories; + +namespace MyCompanyName.MyProjectName +{ + public class BookAppService : ApplicationService, IBookAppService + { + private readonly IRepository _bookRepository; + + public BookAppService(IRepository bookRepository) + { + _bookRepository = bookRepository; + } + + public async Task DemoAsync() + { + var countAll = await _bookRepository + .CountAsync(); + + var count = await _bookRepository + .CountAsync(x => x.Name.Contains("A")); + + var book1984 = await _bookRepository + .FirstOrDefaultAsync(x => x.Name == "1984"); + } + } +} +```` + +All the standard LINQ methods are supported: *AllAsync, AnyAsync, AverageAsync, ContainsAsync, CountAsync, FirstAsync, FirstOrDefaultAsync, LastAsync, LastOrDefaultAsync, LongCountAsync, MaxAsync, MinAsync, SingleAsync, SingleOrDefaultAsync, SumAsync, ToArrayAsync, ToListAsync*. + +This approach still has a limitation. You need to execute the extension method directly on the repository object. For example, the below usage is **not supported**: + +````csharp +var count = await _bookRepository.Where(x => x.Name.Contains("A")).CountAsync(); +```` + +This is because the object returned from the `Where` method is not a repository object, it is a standard `IQueryable`. In such cases, you can still use the `IAsyncQueryableExecuter`: + +````csharp +var count = await AsyncExecuter.CountAsync( + _bookRepository.Where(x => x.Name.Contains("A")) +); +```` + +`AsyncExecuter` has all the standard extension methods, so you don't have any restriction here. See [the repository documentation](https://docs.abp.io/en/abp/latest/Repositories#iqueryable-async-operations) for all the options you have. + +> ABP Framework does its best to not depend on the EF Core and still be able to use the async LINQ extension methods. However, there is no problem to depend on the EF Core for your application, you can add the `Microsoft.EntityFrameworkCore` NuGet package and use the native methods. + +### Stream Support for the Application Service Methods + +[Application services](https://docs.abp.io/en/abp/latest/Application-Services) are consumed by clients and the parameters and return values (typically [Data Transfer Objects](https://docs.abp.io/en/abp/latest/Data-Transfer-Objects)). In case of the client is a remote application, then these objects should be serialized & deserialized. + +Until the version 3.3, we hadn't suggest to use the `Stream` in the application service contracts, since it is not serializable/deserializable. However, with the version 3.3, ABP Framework properly supports this scenario by introducing the new `IRemoteStreamContent` interface. + +Example: An application service that can get or return streams + +````csharp +using System; +using System.Threading.Tasks; +using Volo.Abp.Application.Services; +using Volo.Abp.Content; + +namespace MyProject.Test +{ + public interface ITestAppService : IApplicationService + { + Task Upload(Guid id, IRemoteStreamContent streamContent); + Task Download(Guid id); + } +} +```` + +The implementation can be as shown below: + +````csharp +using System; +using System.IO; +using System.Threading.Tasks; +using Volo.Abp; +using Volo.Abp.Application.Services; +using Volo.Abp.Content; + +namespace MyProject.Test +{ + public class TestAppService : ApplicationService, ITestAppService + { + public Task Download(Guid id) + { + var fs = new FileStream("C:\\Temp\\" + id + ".blob", FileMode.OpenOrCreate); + return Task.FromResult( + (IRemoteStreamContent) new RemoteStreamContent(fs) { + ContentType = "application/octet-stream" + } + ); + } + + public async Task Upload(Guid id, IRemoteStreamContent streamContent) + { + using (var fs = new FileStream("C:\\Temp\\" + id + ".blob", FileMode.Create)) + { + await streamContent.GetStream().CopyToAsync(fs); + await fs.FlushAsync(); + } + } + } +} +```` + +> This is just a demo code. Do it better in your production code :) + +Thanks to [@alexandru-bagu](https://github.com/alexandru-bagu) for the great contribution! + +### Other Changes + +* Upgraded all the .NET Core / ASP.NET Core related packages to the version 3.1.8. If you have additional dependencies to the .NET Core / ASP.NET Core related packages, we suggest you to updates your packages to the version 3.1.8 to have the latest bug and security fixes published by Microsoft. +* The blogging module now uses the [BLOB Storing](https://docs.abp.io/en/abp/latest/Blob-Storing) system to store images & files of the blog posts. If you are using this module, then you need to manually migrate the local files to the BLOB Storing system after the upgrade. +* The Angular UI is now redirecting to the profile management page of the MVC UI instead of using its own UI, if you've configured the authorization code flow (which is default since the version 3.2.0). + +## What's new with the ABP Commercial 3.3 + +### The Blazor UI + +We have good news for the ABP Commercial Blazor UI too. We have implemented the [Lepton Theme](https://commercial.abp.io/themes) integration, so it is now available with the Blazor UI. Also, implemented most of the fundamental [modules](https://commercial.abp.io/modules). + +**A screenshot from the ABP Commercial startup template with the Blazor UI** + +![abp-commercial-blazor-ui](abp-commercial-blazor-ui.png) + +There are still missing features and modules. However, we are working on it to have a more complete version in the next release. + +#### Breaking Changes on the Blazor UI + +There are some breaking changes with the Blazor UI. If you've built an application and upgrade it, your application might not properly work. See the [ABP Commercial Blazor UI v 3.3 Migration Guide](https://docs.abp.io/en/commercial/3.3/migration-guides/blazor-ui-3_3) for the changes you need to do after upgrading your application. + +#### Known Issues + +When you create a new project, profile management doesn't work, you get an exception because it can't find the `/libs/cropperjs/css/cropper.min.css` file. To fix the issue; + +* Add `"@volo/account": "^3.3.0-rc.1"` to the `package.json` in the `.Host` project. +* Run `yarn` (or `npm install`), then `gulp` on a command line terminal in the root folder of the `.Host` project. + +### Multi-Tenant Social Logins + +[Account module](https://commercial.abp.io/modules/Volo.Account.Pro) now supports to manage the social/external logins in the UI. You can **enable/disable** and **set options** in the settings page. It also supports to use **different credentials for the tenants** and it is also **configured on the runtime**. + +![abp-commercial-setting-account-external-logins](abp-commercial-setting-account-external-logins.png) + +### Linked Accounts + +Linked user system allows you to link other accounts (including account in a different tenant) with your account, so you can switch between different accounts with a single-click. It is practical since you no longer need to logout and login again with entering the credentials of the target account. + +To manage the linked accounts, go to the profile management page from the user menu; + +![abp-commercial-linked-users](abp-commercial-linked-users.png) + +### Paypal & Stripe Integrations + +The [Payment Module](https://commercial.abp.io/modules/Volo.Payment) was supporting PayU and 2Checkout providers until the version 3.3. It's now integrated to PayPal and Stripe. See the [technical documentation](https://docs.abp.io/en/commercial/latest/modules/payment) to learn how to use it. + +### ABP Suite Improvements + +We've done a lot of small improvements for the [ABP Suite](https://commercial.abp.io/tools/suite). Some of the enhancements are; + +* Show the previously installed modules as *installed* on the module list. +* Switch between the latest stable, the latest [preview](https://docs.abp.io/en/abp/latest/Previews) and the latest [nightly build](https://docs.abp.io/en/abp/latest/Nightly-Builds) versions of the ABP related packages. +* Moved the file that stores the *previously created entities* into the solution folder to allow you to store it in your source control system. + +### Others + +* Added an option to the Account Module to show reCAPTCHA on the login & the registration forms. + +Besides the new features introduced in this post, we've done a lot of small other enhancements and bug fixes to provide a better development experience and increase the developer productivity. + +## New Articles + +The core ABP Framework team & the community continue to publish new articles on the [ABP Community](https://community.abp.io/) web site. The recently published articles are; + +* [Replacing Email Templates and Sending Emails](https://community.abp.io/articles/replacing-email-templates-and-sending-emails-jkeb8zzh) (by [@EngincanV](https://community.abp.io/members/EngincanV)) +* [How to Add Custom Properties to the User Entity](https://community.abp.io/articles/how-to-add-custom-property-to-the-user-entity-6ggxiddr) (by [@berkansasmaz](https://community.abp.io/members/berkansasmaz)) +* [Using the AdminLTE Theme with the ABP Framework MVC / Razor Pages UI](https://community.abp.io/articles/using-the-adminlte-theme-with-the-abp-framework-mvc-razor-pages-ui-gssbhb7m) (by [@mucahiddanis](https://community.abp.io/members/mucahiddanis)) +* [Using DevExtreme Angular Components With the ABP Framework](https://community.abp.io/articles/using-devextreme-angular-components-with-the-abp-framework-x5nyvj3i) (by [@bunyamin](https://community.abp.io/members/bunyamin)) + +It is appreciated if you want to [submit an article](https://community.abp.io/articles/submit) related to the ABP Framework. + +## About the Next Release + +The next version will be `4.0.0`. We are releasing a major version, since we will move the ABP Framework to .NET 5.0. We see that for most of the applications this will not be a breaking change and we hope you easily upgrade to it. + +The planned 4.0.0-rc.1 (Release Candidate) version date is **November 11**, just after the Microsoft releases the .NET 5.0 final. The planned 4.0.0 final release date is **November 26**. + +Follow the [GitHub milestones](https://github.com/abpframework/abp/milestones) for all the planned ABP Framework version release dates. + +## Feedback + +Please check out the ABP Framework 3.3.0 RC and [provide feedback](https://github.com/abpframework/abp/issues/new) to help us to release a more stable version. The planned release date for the [3.3.0 final](https://github.com/abpframework/abp/milestone/44) version is October 27th. diff --git a/docs/en/Blog-Posts/2020-10-15 v3_3_Preview/abp-blazor-ui.png b/docs/en/Blog-Posts/2020-10-15 v3_3_Preview/abp-blazor-ui.png new file mode 100644 index 0000000000..ea61f2a488 Binary files /dev/null and b/docs/en/Blog-Posts/2020-10-15 v3_3_Preview/abp-blazor-ui.png differ diff --git a/docs/en/Blog-Posts/2020-10-15 v3_3_Preview/abp-commercial-blazor-ui.png b/docs/en/Blog-Posts/2020-10-15 v3_3_Preview/abp-commercial-blazor-ui.png new file mode 100644 index 0000000000..8da48af76e Binary files /dev/null and b/docs/en/Blog-Posts/2020-10-15 v3_3_Preview/abp-commercial-blazor-ui.png differ diff --git a/docs/en/Blog-Posts/2020-10-15 v3_3_Preview/abp-commercial-linked-users.png b/docs/en/Blog-Posts/2020-10-15 v3_3_Preview/abp-commercial-linked-users.png new file mode 100644 index 0000000000..ef957aecd5 Binary files /dev/null and b/docs/en/Blog-Posts/2020-10-15 v3_3_Preview/abp-commercial-linked-users.png differ diff --git a/docs/en/Blog-Posts/2020-10-15 v3_3_Preview/abp-commercial-setting-account-external-logins.png b/docs/en/Blog-Posts/2020-10-15 v3_3_Preview/abp-commercial-setting-account-external-logins.png new file mode 100644 index 0000000000..8be08af686 Binary files /dev/null and b/docs/en/Blog-Posts/2020-10-15 v3_3_Preview/abp-commercial-setting-account-external-logins.png differ diff --git a/docs/en/CSRF-Anti-Forgery.md b/docs/en/CSRF-Anti-Forgery.md new file mode 100644 index 0000000000..ad838e3548 --- /dev/null +++ b/docs/en/CSRF-Anti-Forgery.md @@ -0,0 +1,119 @@ +# CSRF/XSRF & Anti Forgery System + +"*Cross-Site Request Forgery (CSRF) is a type of attack that occurs when a malicious web site, email, blog, instant message, or program causes a user’s web browser to perform an unwanted action on a trusted site for which the user is currently authenticated*" ([OWASP](https://www.owasp.org/index.php/Cross-Site_Request_Forgery_(CSRF)_Prevention_Cheat_Sheet)). + +**ABP Framework completely automates CSRF preventing** and works out of the box without any configuration. Read this documentation only if you want to understand it better or need to customize. + +## The Problem + +ASP.NET Core [provides infrastructure](https://docs.microsoft.com/en-us/aspnet/core/security/anti-request-forgery) to prevent CSRF attacks by providing a system to **generate** and **validate antiforgery tokens**. However, the standard implementation has a few drawbacks; + +Antiforgery token validation is only **enabled for razor pages by default** and not enabled for **HTTP APIs**. You need to enable it yourself for the Controllers. You can use the `[ValidateAntiForgeryToken]` attribute for a specific API Controller/Action or the `[AutoValidateAntiforgeryToken]` attribute to prevent attacks globally. + +Once you enable it; + +* You need to manually add an HTTP header, named `RequestVerificationToken` to every **AJAX request** made in your application. You should care about obtaining the token, saving in the client side and adding to the HTTP header on every HTTP request. +* All your clients, including **non-browser clients**, should care about obtaining and sending the antiforgery token in every request. In fact, non-browser clients has no CSRF risk and should not care about this. + +Especially, the second point is a pain for your clients and unnecessarily consumes your server resources. + +> You can read more about the ASP.NET Core antiforgery system in its own [documentation](https://docs.microsoft.com/en-us/aspnet/core/security/anti-request-forgery). + +## The Solution + +ABP Framework provides `[AbpValidateAntiForgeryToken]` and `[AbpAutoValidateAntiforgeryToken]` attributes, just like the attributes explained above. `[AbpAutoValidateAntiforgeryToken]` is already added to the global filters, so you should do nothing to enable it for your application. + +ABP Framework also automates the following infrastructure; + +* Server side sets a **special cookie**, named `XSRF-TOKEN` by default, that is used make the antiforgery token value available to the browser. This is **done automatically** (by the [application configuration](Application-Configuration.md) endpoint). Nothing to do in the client side. +* In the client side, it reads the token from the cookie and sends it in the **HTTP header** (named `RequestVerificationToken` by default). This is implemented for all the supported UI types. +* Server side validates the antiforgery token **only for same and cross site requests** made by the browser. It bypasses the validation for non-browser clients. + +That's all. The systems works smoothly. + +## Configuration / Customization + +### AbpAntiForgeryOptions + +`AbpAntiForgeryOptions` is the main [options class](Options.md) to configure the ABP Antiforgery system. It has the following properties; + +* `TokenCookie`: Can be used to configure the cookie details. This cookie is used to store the antiforgery token value in the client side, so clients can read it and sends the value as the HTTP header. Default cookie name is `XSRF-TOKEN`, expiration time is 10 years (yes, ten years! It should be a value longer than the authentication cookie max life time, for the security). +* `AuthCookieSchemaName`: The name of the authentication cookie used by your application. Default value is `Identity.Application` (which becomes `AspNetCore.Identity.Application` on runtime). The default value properly works with the ABP startup templates. **If you change the authentication cookie name, you also must change this.** +* `AutoValidate`: The single point to enable/disable the ABP automatic antiforgery validation system. Default value is `true`. +* `AutoValidateFilter`: A predicate that gets a type and returns a boolean. ABP uses this predicate to check a controller type. If it returns false for a controller type, the controller is excluded from the automatic antiforgery token validation. +* `AutoValidateIgnoredHttpMethods`: A list of HTTP Methods to ignore on automatic antiforgery validation. Default value: "GET", "HEAD", "TRACE", "OPTIONS". These HTTP Methods are safe to skip antiforgery validation since they don't change the application state. + +If you need to change these options, do it in the `ConfigureServices` method of your [module](Module-Development-Basics.md). + +**Example: Configuring the AbpAntiForgeryOptions** + +```csharp +Configure(options => +{ + options.TokenCookie.Expiration = TimeSpan.FromDays(365); + options.AutoValidateIgnoredHttpMethods.Remove("GET"); + options.AutoValidateFilter = + type => !type.Namespace.StartsWith("MyProject.MyIgnoredNamespace"); +}); +``` + +This configuration; + +* Sets the antiforgery token expiration time to ~1 year. +* Enables antiforgery token validation for GET requests too. +* Ignores the controller types in the specified namespace. + +### AntiforgeryOptions + +`AntiforgeryOptions` is the standard [options class](Options.md) of the ASP.NET Core. **You can find all the information about this class in its [own documentation](https://docs.microsoft.com/en-us/aspnet/core/security/anti-request-forgery)**. + +`HeaderName` option is especially important for the ABP Framework point of view. Default value of this value is `RequestVerificationToken` and the clients uses this name while sending the token value in the header. So, if you change this option, you should also arrange your clients to align the change. If you don't have a good reason, leave it as default. + +### AbpValidateAntiForgeryToken Attribute + +If you disable the automatic validation or want to perform the validation for an endpoint that is not validated by default (for example, an endpoint with HTTP GET Method), you can use the `[AbpValidateAntiForgeryToken]` attribute for a **controller type or method** (action). + +**Example: Add `[AbpValidateAntiForgeryToken]` to a HTTP GET method** + +```csharp +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; +using Volo.Abp.AspNetCore.Mvc; +using Volo.Abp.AspNetCore.Mvc.AntiForgery; + +namespace MyCompanyName.MyProjectName.Controllers +{ + [Route("api/products")] + public class ProductController : AbpController + { + [HttpGet] + [AbpValidateAntiForgeryToken] + public async Task GetAsync() + { + //TODO: ... + } + } +} +``` + +### Angular UI + +Angular supports CSRF Token out of box, but the token header name is `X-XSRF-TOKEN`. Since ABP Framework follows the ASP.NET Core conventions, it changes this value to `RequestVerificationToken` in the core package. + +You don't need to make anything unless you need to change the `AntiforgeryOptions.HeaderName` as explained before. If you change it, remember to change the header name for the Angular application too. To do that, add an import declaration for the `HttpClientXsrfModule` into your root module. + +**Example: Change the header name to *MyCustomHeaderName*** + +```typescript +@NgModule({ + // ... + imports: [ + //... + HttpClientXsrfModule.withOptions({ + cookieName: 'XSRF-TOKEN', + headerName: 'MyCustomHeaderName' + }) + ], +}) +export class AppModule {} +``` diff --git a/docs/en/Community-Articles/2020-09-09-Replacing-Email-Template-and-Sending-Emails/POST.md b/docs/en/Community-Articles/2020-09-09-Replacing-Email-Template-and-Sending-Emails/POST.md new file mode 100644 index 0000000000..049171731b --- /dev/null +++ b/docs/en/Community-Articles/2020-09-09-Replacing-Email-Template-and-Sending-Emails/POST.md @@ -0,0 +1,477 @@ +# Replacing Email Templates and Sending Emails + +## Introduction + +Hi, in this step by step article, we will send an email by using standard email template and then we will replace the standard email template with our new created template, thanks to [Text Templating System](https://docs.abp.io/en/abp/latest/Text-Templating#replacing-the-existing-templates) and [Virtual File System](https://docs.abp.io/en/abp/latest/Virtual-File-System). Let's start by explaining what these systems do. + +* ABP framework provides a strong and flexible [Text Templating System](https://docs.abp.io/en/abp/latest/Text-Templating). So, we can use the text templating system to create dynamic email contents on a template and a model. + +* In this article, we will use `StandardEmailTemplates.Message` as standard email template. Then we will create a new template and replace the standard email template with our new template by using [Virtual File System](https://docs.abp.io/en/abp/latest/Virtual-File-System). + +* The `Virtual File System` makes it possible to manage files that do not physically exist on the file system. That means we can override `StandardEmailTemplates.Message` template by changing it's path with our new template's path. + +## Creating the Solution + +> ABP Framework offers startup templates to get into the business faster. + +In this article, I will create a new startup template and perform the operations on this template. But if you already have a project you don't need to create a new startup template, you can implement the following steps to your existing project. (These steps can be applied to any project. (MVC, Angular etc.)) + +> If you have already a project you can skip this section. + +Before starting to development, we will create a solution named `TemplateReplace` (or whatever you want). We can create a new startup template by using [ABP CLI](https://docs.abp.io/en/abp/latest/CLI) : + +````bash +abp new TemplateReplace +```` + +Our project boilerplate will be ready after the download is finished. Then, open the solution in the Visual Studio (or your favorite IDE). + +Run the `TemplateReplace.DbMigrator` application as below to create the database and seed initial data (which creates the admin user, admin role, permissions etc.). + +![db-migrator-1](db-migrator-1.jpg) + +* Right click to `TemplateReplace.DbMigrator` and choose the `Debug`. + +![db-migrator-2](db-migrator-2.jpg) + +* After that, click the `Start new instance` option to start the database migrations. + +![db-migrator-3](db-migrator-3.jpg) + +Then we can run the `TemplateReplace.Web` project to see our application working. + +> _Default login credentials for admin: username is **admin** and password is **1q2w3E\***_ + +## Starting the Development + +First thing we need to do is, creating a email service to sending emails. ABP Framework provides `IEmailSender` service that is used to send emails. + +### Step - 1 + +Create an `Emailing` folder in the `TemplateReplace.Domain` project and add a class named `EmailService` inside of it. + +```csharp +using System.Threading.Tasks; +using Volo.Abp.DependencyInjection; +using Volo.Abp.Emailing; +using Volo.Abp.Emailing.Templates; +using Volo.Abp.TextTemplating; + +namespace TemplateReplace.Emailing +{ + public class EmailService : ITransientDependency + { + private readonly IEmailSender _emailSender; + private readonly ITemplateRenderer _templateRenderer; + + public EmailService(IEmailSender emailSender, ITemplateRenderer templateRenderer) + { + _emailSender = emailSender; + _templateRenderer = templateRenderer; + } + + public async Task SendAsync(string targetEmail) + { + var emailBody = await _templateRenderer.RenderAsync( + StandardEmailTemplates.Message, + new + { + message = "ABP Framework provides IEmailSender service that is used to send emails." + } + ); + + await _emailSender.SendAsync( + targetEmail, + "Subject", + emailBody + ); + } + } +} +``` + +* To create an email content, we need to inject `ITemplateRenderer` and use the `RenderAsync` method to render a template. + +* We've used `StandardEmailTemplates.Message` as standart email template. This provides us a standard and simple message template to send mails. + +* The resulting email body should be like shown below: + +```html + + + + + + + ABP Framework provides IEmailSender service that is used to send emails. + + +``` + +### Step - 2 (Configuring Email Settings) + +* Now, we need to configure some email settings by following [settings documentation](https://docs.abp.io/en/abp/latest/Settings#setting-values-in-the-application-configuration). For achieve this, open the `appsettings.json` file under `TemplateReplace.Web` and configure your email settings in **settings** section like below. + +![appsettings.json](settings.jpg) + +* Here, I used Google's SMTP settings to send emails via Gmail. You can change these setting values by your need. + +> **Note:** If you want to use Google's SMTP server settings and send emails via Gmail, you should confirm [this](https://myaccount.google.com/u/0/lesssecureapps). + +### Step - 3 + +* After that we need to open `TemplateReplaceDomainModule.cs` file and change its contents as below to sending real-time emails. + +```csharp +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.DependencyInjection.Extensions; +using TemplateReplace.MultiTenancy; +using Volo.Abp.AuditLogging; +using Volo.Abp.BackgroundJobs; +using Volo.Abp.Emailing; +using Volo.Abp.FeatureManagement; +using Volo.Abp.Identity; +using Volo.Abp.IdentityServer; +using Volo.Abp.Modularity; +using Volo.Abp.MultiTenancy; +using Volo.Abp.PermissionManagement.Identity; +using Volo.Abp.PermissionManagement.IdentityServer; +using Volo.Abp.SettingManagement; +using Volo.Abp.TenantManagement; + +namespace TemplateReplace +{ + [DependsOn( + typeof(TemplateReplaceDomainSharedModule), + typeof(AbpAuditLoggingDomainModule), + typeof(AbpBackgroundJobsDomainModule), + typeof(AbpFeatureManagementDomainModule), + typeof(AbpIdentityDomainModule), + typeof(AbpPermissionManagementDomainIdentityModule), + typeof(AbpIdentityServerDomainModule), + typeof(AbpPermissionManagementDomainIdentityServerModule), + typeof(AbpSettingManagementDomainModule), + typeof(AbpTenantManagementDomainModule), + typeof(AbpEmailingModule) + )] + public class TemplateReplaceDomainModule : AbpModule + { + public override void OnApplicationInitialization(ApplicationInitializationContext context) + { + var settingManager = context.ServiceProvider.GetService(); + //encrypts the password on set and decrypts on get + settingManager.SetGlobalAsync(EmailSettingNames.Smtp.Password, "your_password"); + } + + public override void ConfigureServices(ServiceConfigurationContext context) + { + Configure(options => + { + options.IsEnabled = MultiTenancyConsts.IsEnabled; + }); + + // #if DEBUG + // context.Services.Replace(ServiceDescriptor.Singleton()); + // #endif + } + } +} + +``` + +* `NullEmailSender` is a built-in class that implements the `IEmailSender`, but writes email contents to the standard log system, rather than actually sending the emails. This class can be useful especially in development time where you generally don't want to send real emails. Therefore ABP framework defined this by default. But in our case we want to send real emails, so we must remove these lines or we must take it to the comment line. + +* `Abp.Mailing.Smtp.Password` must be an encrypted value. Therefore we used `SettingManager` in here to set the password. It internally **encrypts** the values on set and **decrypts** on get. + +* After all these steps, whenever we want to send an email, we can do it by using our `EmailService` class. We can inject this class and invoke the `SendAsync` method to sending email where its needed. + +After sending the email we should see the template like below. + +![email-message](message.jpg) + +### Step - 4 (Defining New Template) + +* So far we've sent mail by using standard email template of ABP. But we may want to replace the email template with the new one. We can achieve this by following the `Text Templating` [documentation](https://docs.abp.io/en/abp/latest/Text-Templating#replacing-the-existing-templates). + +* In this article, I will create a email template by using free template generator named **Bee**. You can reach the free templates from [here](https://beefree.io/templates/free/). + +* When we find a template for our purpose, we can hover the link and click the **get started** button to edit the template. (I chose a template named "gdpr".) + +* Here, you can edit your template as below. (You can delete or add sections, edit texts, and so on.) + +![bee](bee.gif) + +> **Note:** After editing our template, we need to export it to reach our created template's content. You can see the **export** button top-right of the template editing page. + +* After choosing and editing our free template, we can create a new **email template** in our project. For this, create a folder named `Templates` under `Emailing` folder in `TemplateReplace.Domain` and add `EmailTemplate.tpl` file inside of it. And copy-paste the below content or your template's content. + +```tpl + + + + + + + + + + + + + + + + + + + +``` + +* Then we need to make the template file as "Embedded Resource". We can do this as below. + +* First right click to **EmailTemplate.tpl** and choose `Properties`. + +![embedded-resource](embedded-resource.jpg) + +* Then be sure about build action is **Embedded resource**. + +![embedded-resource-2](embedded-resource-2.jpg) + +### Step - 4 (Replacing the Email Template) + +* To replace the current email template with our new email template, we need to override it. To achieve this, create a class named `EmailTemplateDefinitionProvider` under `Emailing` folder in `TemplateReplace.Domain` and fill it with the below content. + +```csharp +using Volo.Abp.DependencyInjection; +using Volo.Abp.Emailing.Templates; +using Volo.Abp.TextTemplating; + +namespace TemplateReplace.Emailing +{ + public class EmailTemplateDefinitionProvider : TemplateDefinitionProvider, ITransientDependency + { + public override void Define(ITemplateDefinitionContext context) + { + var emailLayoutTemplate = context.GetOrNull(StandardEmailTemplates.Message); + + emailLayoutTemplate + .WithVirtualFilePath( + "/Emailing/Templates/EmailTemplate.tpl", + isInlineLocalized: true + ); + } + } +} +``` + +* In here we've created a template definition provider class that gets the email layout template and change the virtual file path for the template. + +* This approach allows us to locate templates in any folder instead of the folder defined by the depended module. For more detail, check the [Virtual File System](https://docs.abp.io/en/abp/latest/Virtual-File-System). + +### Step - 5 + +* Lastly, we need to configure the [Virtual File System](https://docs.abp.io/en/abp/latest/Virtual-File-System). To do this open your `TemplateReplaceDomainModule.cs` in `TemplateReplace.Domain` and update the content as below. + +```csharp +using TemplateReplace.MultiTenancy; +using Volo.Abp.AuditLogging; +using Volo.Abp.BackgroundJobs; +using Volo.Abp.Emailing; +using Volo.Abp.FeatureManagement; +using Volo.Abp.Identity; +using Volo.Abp.IdentityServer; +using Volo.Abp.Modularity; +using Volo.Abp.MultiTenancy; +using Volo.Abp.PermissionManagement.Identity; +using Volo.Abp.PermissionManagement.IdentityServer; +using Volo.Abp.SettingManagement; +using Volo.Abp.TenantManagement; +using Volo.Abp.VirtualFileSystem; + +namespace TemplateReplace +{ + [DependsOn( + typeof(TemplateReplaceDomainSharedModule), + typeof(AbpAuditLoggingDomainModule), + typeof(AbpBackgroundJobsDomainModule), + typeof(AbpFeatureManagementDomainModule), + typeof(AbpIdentityDomainModule), + typeof(AbpPermissionManagementDomainIdentityModule), + typeof(AbpIdentityServerDomainModule), + typeof(AbpPermissionManagementDomainIdentityServerModule), + typeof(AbpSettingManagementDomainModule), + typeof(AbpTenantManagementDomainModule), + typeof(AbpEmailingModule) + )] + public class TemplateReplaceDomainModule : AbpModule + { + public override void ConfigureServices(ServiceConfigurationContext context) + { + Configure(options => + { + options.IsEnabled = MultiTenancyConsts.IsEnabled; + }); + + //Add this configuration + Configure(options => + { + options.FileSets.AddEmbedded(); + }); + } + } +} + +``` + +* And now when we send a new email, we should see our newly defined template as the message like below. + +![email-last](email-last.jpg) + +## Text Template Management + +* Generally, more than one e-mail is required in applications. We create email templates for **"password changes"** or **"welcome"** etc in our applications. In such cases, it is necessary to create different templates for each mail. ABP Commercial allows us to perform these operations on UI in a simple way. Text Template Management provides UI to easily create and manage email templates. + +![template-definitions](template-definitions.png) + +* ABP Commercial's [Text Template Management](https://commercial.abp.io/modules/Volo.TextTemplateManagement) module is really fascinating. It makes it super easy to stores and edits template contents. We can list all templates on a page, editing them, localizing them, and so on. + +![inline-content](inline-content.png) + +* ABP Commercial's text template management module, allows us to modify a template through the UI. + +* I highly recommend you to [check it out](https://commercial.abp.io/modules/Volo.TextTemplateManagement). + +## References + +* [Text Templating](https://docs.abp.io/en/abp/latest/Text-Templating) +* [Emailing](https://docs.abp.io/en/abp/latest/Emailing) +* [Virtual File System](https://docs.abp.io/en/abp/latest/Virtual-File-System) \ No newline at end of file diff --git a/docs/en/Community-Articles/2020-09-09-Replacing-Email-Template-and-Sending-Emails/bee.gif b/docs/en/Community-Articles/2020-09-09-Replacing-Email-Template-and-Sending-Emails/bee.gif new file mode 100644 index 0000000000..15a3a01e65 Binary files /dev/null and b/docs/en/Community-Articles/2020-09-09-Replacing-Email-Template-and-Sending-Emails/bee.gif differ diff --git a/docs/en/Community-Articles/2020-09-09-Replacing-Email-Template-and-Sending-Emails/db-migrator-1.jpg b/docs/en/Community-Articles/2020-09-09-Replacing-Email-Template-and-Sending-Emails/db-migrator-1.jpg new file mode 100644 index 0000000000..8a0c4c345b Binary files /dev/null and b/docs/en/Community-Articles/2020-09-09-Replacing-Email-Template-and-Sending-Emails/db-migrator-1.jpg differ diff --git a/docs/en/Community-Articles/2020-09-09-Replacing-Email-Template-and-Sending-Emails/db-migrator-2.jpg b/docs/en/Community-Articles/2020-09-09-Replacing-Email-Template-and-Sending-Emails/db-migrator-2.jpg new file mode 100644 index 0000000000..4adc9614c3 Binary files /dev/null and b/docs/en/Community-Articles/2020-09-09-Replacing-Email-Template-and-Sending-Emails/db-migrator-2.jpg differ diff --git a/docs/en/Community-Articles/2020-09-09-Replacing-Email-Template-and-Sending-Emails/db-migrator-3.jpg b/docs/en/Community-Articles/2020-09-09-Replacing-Email-Template-and-Sending-Emails/db-migrator-3.jpg new file mode 100644 index 0000000000..16b365b8a5 Binary files /dev/null and b/docs/en/Community-Articles/2020-09-09-Replacing-Email-Template-and-Sending-Emails/db-migrator-3.jpg differ diff --git a/docs/en/Community-Articles/2020-09-09-Replacing-Email-Template-and-Sending-Emails/email-last.jpg b/docs/en/Community-Articles/2020-09-09-Replacing-Email-Template-and-Sending-Emails/email-last.jpg new file mode 100644 index 0000000000..898d75568f Binary files /dev/null and b/docs/en/Community-Articles/2020-09-09-Replacing-Email-Template-and-Sending-Emails/email-last.jpg differ diff --git a/docs/en/Community-Articles/2020-09-09-Replacing-Email-Template-and-Sending-Emails/embedded-resource-2.jpg b/docs/en/Community-Articles/2020-09-09-Replacing-Email-Template-and-Sending-Emails/embedded-resource-2.jpg new file mode 100644 index 0000000000..1abdba48cb Binary files /dev/null and b/docs/en/Community-Articles/2020-09-09-Replacing-Email-Template-and-Sending-Emails/embedded-resource-2.jpg differ diff --git a/docs/en/Community-Articles/2020-09-09-Replacing-Email-Template-and-Sending-Emails/embedded-resource.jpg b/docs/en/Community-Articles/2020-09-09-Replacing-Email-Template-and-Sending-Emails/embedded-resource.jpg new file mode 100644 index 0000000000..b03739e6c0 Binary files /dev/null and b/docs/en/Community-Articles/2020-09-09-Replacing-Email-Template-and-Sending-Emails/embedded-resource.jpg differ diff --git a/docs/en/Community-Articles/2020-09-09-Replacing-Email-Template-and-Sending-Emails/inline-content.png b/docs/en/Community-Articles/2020-09-09-Replacing-Email-Template-and-Sending-Emails/inline-content.png new file mode 100644 index 0000000000..cbbf188f37 Binary files /dev/null and b/docs/en/Community-Articles/2020-09-09-Replacing-Email-Template-and-Sending-Emails/inline-content.png differ diff --git a/docs/en/Community-Articles/2020-09-09-Replacing-Email-Template-and-Sending-Emails/message.jpg b/docs/en/Community-Articles/2020-09-09-Replacing-Email-Template-and-Sending-Emails/message.jpg new file mode 100644 index 0000000000..fe80c2ac0c Binary files /dev/null and b/docs/en/Community-Articles/2020-09-09-Replacing-Email-Template-and-Sending-Emails/message.jpg differ diff --git a/docs/en/Community-Articles/2020-09-09-Replacing-Email-Template-and-Sending-Emails/settings.jpg b/docs/en/Community-Articles/2020-09-09-Replacing-Email-Template-and-Sending-Emails/settings.jpg new file mode 100644 index 0000000000..e60fdcc2db Binary files /dev/null and b/docs/en/Community-Articles/2020-09-09-Replacing-Email-Template-and-Sending-Emails/settings.jpg differ diff --git a/docs/en/Community-Articles/2020-09-09-Replacing-Email-Template-and-Sending-Emails/template-definitions.png b/docs/en/Community-Articles/2020-09-09-Replacing-Email-Template-and-Sending-Emails/template-definitions.png new file mode 100644 index 0000000000..aaf46b353e Binary files /dev/null and b/docs/en/Community-Articles/2020-09-09-Replacing-Email-Template-and-Sending-Emails/template-definitions.png differ diff --git a/docs/en/Community-Articles/2020-10-08-How-To-Add-Custom-Property-To-The-User-Entity/How-To-Add-Custom-Property-To-The-User-Entity.md b/docs/en/Community-Articles/2020-10-08-How-To-Add-Custom-Property-To-The-User-Entity/How-To-Add-Custom-Property-To-The-User-Entity.md new file mode 100644 index 0000000000..3e8a3e9da2 --- /dev/null +++ b/docs/en/Community-Articles/2020-10-08-How-To-Add-Custom-Property-To-The-User-Entity/How-To-Add-Custom-Property-To-The-User-Entity.md @@ -0,0 +1,160 @@ +# How to Add Custom Properties to the User Entity + +## Introduction + +In this step-by-step article, I will explain how you can customize the user entity class, which is available in every web application you create using the ABP framework, according to your needs. When you read this article, you will learn how to override the services of built-in modules, extend the entities, extend data transfer objects and customize the user interface in the applications you develop using the ABP framework. + +You can see the screenshots below which we will reach at the end of the article. + +![custom-identity-user-list](./custom-identity-user-list.png) + +![new-user](./new-user.png) + +## Preparing the Project + +### Startup template and the initial run + +Abp Framework offers startup templates to get into the work faster. We can create a new startup template using Abp CLI: + +`abp new CustomizeUserDemo` + +> In this article, I will go through the MVC application, but it will work also in the [Angular](https://docs.abp.io/en/abp/latest/Getting-Started?UI=NG&DB=EF&Tiered=No) application. + +After the download is finished, we can run **CustomizeUserDemo.DbMigrator** project to create the database migrations and seed the initial data (admin user, role, etc). Then we can run `CustomizeUserDemo.Web` to see that our application is working. + +> Default admin username is **admin** and password is **1q2w3E\*** + +![initial-project](./initial-project.png) + +In this article, we will go through a scenario together and find the solutions to our questions through this scenario. However, since the scenario is not a real-life scenario, it may be strange, please don't get too about this issue :) + +## Step-1 + +Add two new properties to the `AppUser` in the Users folder of the **CustomizeUserDemo.Domain** project as follows: + +```csharp +public string Title { get; protected set; } + +public int Reputation { get; protected set; } +``` + +## Step-2 + +Create the Users folder in the **CustomizeUserDemo.Domain.Shared** project, create the class `UserConsts` inside the folder and update the class you created as below: + +```csharp +public static class UserConsts +{ + public const string TitlePropertyName = "Title"; + + public const string ReputationPropertyName = "Reputation"; + + public const int MaxTitleLength = 64; + + public const double MaxReputationValue = 1_000; + + public const double MinReputationValue = 1; +} +``` + +## Step-3 + +Update the `CustomizeUserDemoEfCoreEntityExtensionMappings` class in the **CustomizeUserDemo.EntityFramework** project in the EntityFrameworkCore folder as below: + +```csharp +public static class CustomizeUserDemoEfCoreEntityExtensionMappings +{ + private static readonly OneTimeRunner OneTimeRunner = new OneTimeRunner(); + + public static void Configure() + { + CustomizeUserDemoGlobalFeatureConfigurator.Configure(); + CustomizeUserDemoModuleExtensionConfigurator.Configure(); + + OneTimeRunner.Run(() => + { + ObjectExtensionManager.Instance + .MapEfCoreProperty( + nameof(AppUser.Title), + (entityBuilder, propertyBuilder) => + { + propertyBuilder.IsRequired(); + propertyBuilder.HasMaxLength(UserConsts.MaxTitleLength); + } + ).MapEfCoreProperty( + nameof(AppUser.Reputation), + (entityBuilder, propertyBuilder) => + { + propertyBuilder.HasDefaultValue(UserConsts.MinReputationValue); + } + ); + }); + } +} +``` + +This class can be used to map these extra properties to table fields in the database. Please read [this](https://docs.abp.io/en/abp/latest/Customizing-Application-Modules-Extending-Entities) article to improve your understanding of what we are doing. + +So far, we have added our extra features to the `User` entity and matched these features with the `ef core`. + +Now we need to add migration to see what has changed in our database. This for, open the Package Manager Console (PMC) under the menu Tools > NuGet Package Manager. + +![nuget-package-manager](./nuget-package-manager.png) + +Select the **CustomizeUserDemo.EntityFramework.DbMigrations** as the **default project** and execute the following command: + +```bash +Add-Migration "Updated-User-Entity" +``` + +![added-new-migration](./added-new-migration.png) + +This will create a new migration class inside the `Migrations` folder of the **CustomizeUserDemo.EntityFrameworkCore.DbMigrations** project. + +> If you are using another IDE than the Visual Studio, you can use `dotnet-ef` tool as [documented here](https://docs.microsoft.com/en-us/ef/core/managing-schemas/migrations/?tabs=dotnet-core-cli#create-a-migration). + +Finally, run the **CustomizeUserDemo.DbMigrator** project to update the database. + +When we updated the database, you can see that the `Title` and `Reputation` columns are added to the `Users` table. + +![user-table](./user-table.png) + +## Step-4 +Open the `CustomizeUserDemoModuleExtensionConfigurator` in the **CustomizeUserDemo.Domain.Shared** project, and change the contents of the `ConfigureExtraProperties` method as shown below: +```csharp +private static void ConfigureExtraProperties() +{ + ObjectExtensionManager.Instance.Modules().ConfigureIdentity(identity => + { + identity.ConfigureUser(user => + { + user.AddOrUpdateProperty( + UserConsts.TitlePropertyName, + options => + { + options.Attributes.Add(new RequiredAttribute()); + options.Attributes.Add( + new StringLengthAttribute(UserConsts.MaxTitleLength) + ); + } + ); + user.AddOrUpdateProperty( + UserConsts.ReputationPropertyName, + options => + { + options.DefaultValue = UserConsts.MinReputationValue; + options.Attributes.Add( + new RangeAttribute(UserConsts.MinReputationValue, UserConsts.MaxReputationValue) + ); + } + ); + }); + }); +} +``` + +That's it. Now let's run the application and look at the Identity user page. You can also try to edit and recreate a record if you want, it will work even though we haven't done anything extra. Here is the magic code behind ABP framework. + +If there is a situation you want to add, you can click the contribute button or make a comment. Also, if you like the article, don't forget to share it :) + +Happy coding :) diff --git a/docs/en/Community-Articles/2020-10-08-How-To-Add-Custom-Property-To-The-User-Entity/added-new-migration.png b/docs/en/Community-Articles/2020-10-08-How-To-Add-Custom-Property-To-The-User-Entity/added-new-migration.png new file mode 100755 index 0000000000..d459fdeed2 Binary files /dev/null and b/docs/en/Community-Articles/2020-10-08-How-To-Add-Custom-Property-To-The-User-Entity/added-new-migration.png differ diff --git a/docs/en/Community-Articles/2020-10-08-How-To-Add-Custom-Property-To-The-User-Entity/custom-identity-user-list.png b/docs/en/Community-Articles/2020-10-08-How-To-Add-Custom-Property-To-The-User-Entity/custom-identity-user-list.png new file mode 100644 index 0000000000..896ed947aa Binary files /dev/null and b/docs/en/Community-Articles/2020-10-08-How-To-Add-Custom-Property-To-The-User-Entity/custom-identity-user-list.png differ diff --git a/docs/en/Community-Articles/2020-10-08-How-To-Add-Custom-Property-To-The-User-Entity/initial-project.png b/docs/en/Community-Articles/2020-10-08-How-To-Add-Custom-Property-To-The-User-Entity/initial-project.png new file mode 100755 index 0000000000..6e08833853 Binary files /dev/null and b/docs/en/Community-Articles/2020-10-08-How-To-Add-Custom-Property-To-The-User-Entity/initial-project.png differ diff --git a/docs/en/Community-Articles/2020-10-08-How-To-Add-Custom-Property-To-The-User-Entity/new-user.png b/docs/en/Community-Articles/2020-10-08-How-To-Add-Custom-Property-To-The-User-Entity/new-user.png new file mode 100644 index 0000000000..d3a5c66198 Binary files /dev/null and b/docs/en/Community-Articles/2020-10-08-How-To-Add-Custom-Property-To-The-User-Entity/new-user.png differ diff --git a/docs/en/Community-Articles/2020-10-08-How-To-Add-Custom-Property-To-The-User-Entity/nuget-package-manager.png b/docs/en/Community-Articles/2020-10-08-How-To-Add-Custom-Property-To-The-User-Entity/nuget-package-manager.png new file mode 100755 index 0000000000..680bc9d2e7 Binary files /dev/null and b/docs/en/Community-Articles/2020-10-08-How-To-Add-Custom-Property-To-The-User-Entity/nuget-package-manager.png differ diff --git a/docs/en/Community-Articles/2020-10-08-How-To-Add-Custom-Property-To-The-User-Entity/user-table.png b/docs/en/Community-Articles/2020-10-08-How-To-Add-Custom-Property-To-The-User-Entity/user-table.png new file mode 100755 index 0000000000..5bb71b8325 Binary files /dev/null and b/docs/en/Community-Articles/2020-10-08-How-To-Add-Custom-Property-To-The-User-Entity/user-table.png differ diff --git a/docs/en/Customizing-Application-Modules-Overriding-Services.md b/docs/en/Customizing-Application-Modules-Overriding-Services.md index d0d8c8a8a1..b8706eea61 100644 --- a/docs/en/Customizing-Application-Modules-Overriding-Services.md +++ b/docs/en/Customizing-Application-Modules-Overriding-Services.md @@ -162,6 +162,41 @@ This example class inherits from the `IdentityUserManager` [domain service](Doma Check the [localization system](Localization.md) to learn how to localize the error messages. +### Example: Overriding a Controller + +````csharp +using System.Threading.Tasks; +using Microsoft.Extensions.Logging; +using Volo.Abp.Account; +using Volo.Abp.DependencyInjection; + +namespace MyProject.Controllers +{ + [Dependency(ReplaceServices = true)] + [ExposeServices(typeof(AccountController))] + public class MyAccountController : AccountController + { + public MyAccountController(IAccountAppService accountAppService) + : base(accountAppService) + { + + } + + public override async Task SendPasswordResetCodeAsync( + SendPasswordResetCodeDto input) + { + Logger.LogInformation("Your custom logic..."); + + await base.SendPasswordResetCodeAsync(input); + } + } +} +```` + +This example replaces the `AccountController` (An API Controller defined in the [Account Module](Modules/Account.md)) and overrides the `SendPasswordResetCodeAsync` method. + +**`[ExposeServices(typeof(AccountController))]` is essential** here since it registers this controller for the `AccountController` in the dependency injection system. `[Dependency(ReplaceServices = true)]` is also recommended to clear the old registration (even the ASP.NET Core DI system selects the last registered one). + ### Overriding Other Classes Overriding controllers, framework services, view component classes and any other type of classes registered to dependency injection can be overridden just like the examples above. diff --git a/docs/en/Distributed-Event-Bus-Rebus-Integration.md b/docs/en/Distributed-Event-Bus-Rebus-Integration.md new file mode 100644 index 0000000000..7499c1d837 --- /dev/null +++ b/docs/en/Distributed-Event-Bus-Rebus-Integration.md @@ -0,0 +1,65 @@ +# Distributed Event Bus Rebus Integration + +> This document explains **how to configure the [Rebus](http://mookid.dk/category/rebus/)** as the distributed event bus provider. See the [distributed event bus document](Distributed-Event-Bus.md) to learn how to use the distributed event bus system + +## Installation + +Use the ABP CLI to add [Volo.Abp.EventBus.Rebus](https://www.nuget.org/packages/Volo.Abp.EventBus.Rebus) NuGet package to your project: + +* Install the [ABP CLI](https://docs.abp.io/en/abp/latest/CLI) if you haven't installed before. +* Open a command line (terminal) in the directory of the `.csproj` file you want to add the `Volo.Abp.EventBus.Rebus` package. +* Run `abp add-package Volo.Abp.EventBus.Rebus` command. + +If you want to do it manually, install the [Volo.Abp.EventBus.Rebus](https://www.nuget.org/packages/Volo.Abp.EventBus.Rebus) NuGet package to your project and add `[DependsOn(typeof(AbpEventBusRebusModule))]` to the [ABP module](Module-Development-Basics.md) class inside your project. + +## Configuration + +You can configure using the standard [configuration system](Configuration.md), like using the [options](Options.md) classes. + +### The Options Classes + +`AbpRebusEventBusOptions` classe can be used to configure the event bus options for the Rebus. + +You can configure this options inside the `PreConfigureServices` of your [module](Module-Development-Basics.md). + +**Example: Minimize configuration** + +```csharp +PreConfigure(options => +{ + options.InputQueueName = "eventbus"; +}); +``` + +Rebus has many options, you can use the `Configurer` property of `AbpRebusEventBusOptions` class to configure. + +Default events are **stored in memory**. See the [rebus document](https://github.com/rebus-org/Rebus/wiki/Transport) for more details. + +**Example: Configure the store** + +````csharp +PreConfigure(options => +{ + options.InputQueueName = "eventbus"; + options.Configurer = rebusConfigurer => + { + rebusConfigurer.Transport(t => t.UseMsmq("eventbus")); + rebusConfigurer.Subscriptions(s => s.UseJsonFile(@"subscriptions.json")); + }; +}); +```` + +You can use the `Publish` properpty of `AbpRebusEventBusOptions` class to change the publishing method + +**Example: Configure the event publishing** + +````csharp +PreConfigure(options => +{ + options.InputQueueName = "eventbus"; + options.Publish = async (bus, type, data) => + { + await bus.Publish(data); + }; +}); +```` diff --git a/docs/en/Distributed-Event-Bus.md b/docs/en/Distributed-Event-Bus.md index b1444d8eba..d94f7e0b16 100644 --- a/docs/en/Distributed-Event-Bus.md +++ b/docs/en/Distributed-Event-Bus.md @@ -8,7 +8,8 @@ Distributed event bus system provides an **abstraction** that can be implemented * `LocalDistributedEventBus` is the default implementation that implements the distributed event bus to work as in-process. Yes! The **default implementation works just like the [local event bus](Local-Event-Bus.md)**, if you don't configure a real distributed provider. * `RabbitMqDistributedEventBus` implements the distributed event bus with the [RabbitMQ](https://www.rabbitmq.com/). See the [RabbitMQ integration document](Distributed-Event-Bus-RabbitMQ-Integration.md) to learn how to configure it. -* `KafkaDistributedEventBus` implements the distributed event bus with the [RabbitMQ](https://kafka.apache.org/). See the [Kafka integration document](Distributed-Event-Bus-Kafka-Integration.md) to learn how to configure it. +* `KafkaDistributedEventBus` implements the distributed event bus with the [Kafka](https://kafka.apache.org/). See the [Kafka integration document](Distributed-Event-Bus-Kafka-Integration.md) to learn how to configure it. +* `RebusDistributedEventBus` implements the distributed event bus with the [Rebus](http://mookid.dk/category/rebus/). See the [Rebus integration document](Distributed-Event-Bus-Rebus-Integration.md) to learn how to configure it. Using a local event bus as default has a few important advantages. The most important one is that: It allows you to write your code compatible to distributed architecture. You can write a monolithic application now that can be split into microservices later. It is a good practice to communicate between bounded contexts (or between application modules) via distributed events instead of local events. diff --git a/docs/en/Entity-Framework-Core-SQLite.md b/docs/en/Entity-Framework-Core-SQLite.md index 62a8ef815d..2a13bf530c 100644 --- a/docs/en/Entity-Framework-Core-SQLite.md +++ b/docs/en/Entity-Framework-Core-SQLite.md @@ -23,6 +23,16 @@ Find `UseSqlServer()` calls in your solution, replace with `UseSqlite()`. Check SQLite connection strings are different than SQL Server connection strings. So, check all `appsettings.json` files in your solution and replace the connection strings inside them. See the [connectionstrings.com]( https://www.connectionstrings.com/sqlite/ ) for details of SQLite connection string options. +An example connection string is + +``` +{ + "ConnectionStrings": { + "Default": "Filename=./MySQLiteDBFile.sqlite" + } +} +``` + You typically will change the `appsettings.json` inside the `.DbMigrator` and `.Web` projects, but it depends on your solution structure. ## Re-Generate the Migrations @@ -38,4 +48,4 @@ Run the `.DbMigrator` project to create the database and seed the initial data. ## Run the Application -It is ready. Just run the application and enjoy coding. \ No newline at end of file +It is ready. Just run the application and enjoy coding. diff --git a/docs/en/JavaScript/Dynamic-JavaScript-API-Clients.md b/docs/en/JavaScript/Dynamic-JavaScript-API-Clients.md deleted file mode 100644 index 539d3ac15a..0000000000 --- a/docs/en/JavaScript/Dynamic-JavaScript-API-Clients.md +++ /dev/null @@ -1,3 +0,0 @@ -## Dynamic JavaScript API Clients - -TODO \ No newline at end of file diff --git a/docs/en/Localization.md b/docs/en/Localization.md index 37104a4878..a33dff1779 100644 --- a/docs/en/Localization.md +++ b/docs/en/Localization.md @@ -100,8 +100,6 @@ Configure(options => > The [application startup template](Startup-Templates/Application.md) sets `DefaultResourceType` to the localization resource of the application. -See the *Client Side* section below for a use case. - ### Short Localization Resource Name Localization resources are also available in the client (JavaScript) side. So, setting a short name for the localization resource makes it easy to use localization texts. Example: @@ -156,13 +154,13 @@ services.Configure(options => * If an extension file defines the same localized string, it overrides the string. -## Getting Localized Texts +## Getting the Localized Texts -### Server Side +Getting the localized text is pretty standard. -Getting the localized text on the server side is pretty standard. +### Simplest Usage In A Class -#### Simplest Usage In A Class +Just inject the `IStringLocalizer` service and use it like shown below: ````C# public class MyService @@ -183,9 +181,13 @@ public class MyService ##### Format Arguments -Format arguments can be passed after the localization key. If your message is `Hello {0}, welcome!`, then you can pass the `{0}` argument to the localizer like `_localizer["HelloMessage", "John"]` +Format arguments can be passed after the localization key. If your message is `Hello {0}, welcome!`, then you can pass the `{0}` argument to the localizer like `_localizer["HelloMessage", "John"]`. + +> Refer to the [Microsoft's localization documentation](https://docs.microsoft.com/en-us/aspnet/core/fundamentals/localization) for details about using the localization. -#### Simplest Usage In A Razor View/Page +### Using In A Razor View/Page + +Use `IHtmlLocalizer` in razor views/pages; ````c# @inject IHtmlLocalizer Localizer @@ -193,54 +195,59 @@ Format arguments can be passed after the localization key. If your message is `H

@Localizer["HelloWorld"]

```` -Refer to the [Microsoft's localization documentation](https://docs.microsoft.com/en-us/aspnet/core/fundamentals/localization) for details about using localization on the server side. - -### Client Side - -ABP provides JavaScript services to use the same localized texts in the client side. - -#### getResource - -`abp.localization.getResource` function is used to get a localization resource: - -````js -var testResource = abp.localization.getResource('Test'); -```` - -Then you can localize a string based on this resource: +### Special Base Classes -````js -var str = testResource('HelloWorld'); -```` +Some ABP Framework base classes provide a `L` property to use the localizer even easier. -#### localize +**Example: Localize a text in an application service method** -`abp.localization.localize` function is a shortcut where you can both specify the text name and the resource name: +```csharp +using System.Threading.Tasks; +using MyProject.Localization; +using Volo.Abp.Application.Services; -````js -var str = abp.localization.localize('HelloWorld', 'Test'); -```` +namespace MyProject +{ + public class TestAppService : ApplicationService + { + public TestAppService() + { + LocalizationResource = typeof(MyProjectResource); + } -`HelloWorld` is the text to localize, where `Test` is the localization resource name here. + public async Task DoIt() + { + var str = L["HelloWorld"]; + } + } +} +``` -If you don't specify the localization resource name, it uses the default localization resource defined on the `AbpLocalizationOptions` (see the *Default Resource* section above). Example: +When you set the `LocalizationResource` in the constructor, the `ApplicationService` class uses that resource type when you use the `L` property, just like in the `DoIt()` method. -````js -var str = abp.localization.localize('HelloWorld'); //uses the default resource -```` +Setting `LocalizationResource` in every application service can be tedious. You can create an abstract base application service class, set it there and derive your application services from that base class. This is already implemented when you create a new project with the [startup templates](Startup-Templates/Application.md). So, you can simply inherit from the base class directly use the `L` property: -##### Format Arguments +```csharp +using System.Threading.Tasks; -If your localized string contains arguments, like `Hello {0}, welcome!`, you can pass arguments to the localization methods. Examples: +namespace MyProject +{ + public class TestAppService : MyProjectAppService + { + public async Task DoIt() + { + var str = L["HelloWorld"]; + } + } +} +``` -````js -var str1 = abp.localization.getResource('Test')('HelloWelcomeMessage', 'John'); -var str2 = abp.localization.localize('HelloWorld', 'Test', 'John'); -```` +The `L` property is also available for some other base classes like `AbpController` and `AbpPageModel`. -Both of the samples above produce the output `Hello John, welcome!`. +## The Client Side -## See Also +See the following documents to learn how to reuse the same localization texts in the JavaScript side; -* [Localization in Angular UI](UI/Angular/Localization.md) -* [Forms & Validation](UI/AspNetCore/Forms-Validation.md) for the ASP.NET Core MVC / Razor Pages UI \ No newline at end of file +* [Localization for the MVC / Razor Pages UI](UI/AspNetCore/JavaScript-API/Localization.md) +* [Localization for the Blazor UI](UI/Blazor/Localization.md) +* [Localization for the Angular UI](UI/Angular/Localization.md) \ No newline at end of file diff --git a/docs/en/Migration-Guides/BlazorUI-3_3.md b/docs/en/Migration-Guides/BlazorUI-3_3.md new file mode 100644 index 0000000000..8a14481912 --- /dev/null +++ b/docs/en/Migration-Guides/BlazorUI-3_3.md @@ -0,0 +1,13 @@ +# Migration Guide for the Blazor UI from the v3.2 to the v3.3 + +## Startup Template Changes + +* Remove `Volo.Abp.Account.Blazor` NuGet package from your `.Blazor.csproj` and add `Volo.Abp.TenantManagement.Blazor` NuGet package. +* Remove the ``typeof(AbpAccountBlazorModule)`` from the dependency list of *YourProjectBlazorModule* class and add the `typeof(AbpTenantManagementBlazorModule)`. +* Add `@using Volo.Abp.BlazoriseUI` and `@using Volo.Abp.BlazoriseUI.Components` into the `_Imports.razor` file. +* Remove the `div` with `id="blazor-error-ui"` (with its contents) from the `wwwroot/index.html ` file, since the ABP Framework now shows error messages as a better message box. + +## BlazoriseCrudPageBase to AbpCrudPageBase + +Renamed `BlazoriseCrudPageBase` to `AbpCrudPageBase`. Just update the usages. It also has some changes, you may need to update method calls/usages manually. + diff --git a/docs/en/Redis-Cache.md b/docs/en/Redis-Cache.md index 42679679c6..3e11584bce 100644 --- a/docs/en/Redis-Cache.md +++ b/docs/en/Redis-Cache.md @@ -25,9 +25,11 @@ Volo.Abp.Caching.StackExchangeRedis package automatically gets the redis [config ````js "Redis": { + "IsEnabled": "true", "Configuration": "127.0.0.1" } ```` +The setting `IsEnabled` is optional and will be considered `true` if it is not set. Alternatively you can configure the standard [RedisCacheOptions](https://docs.microsoft.com/en-us/dotnet/api/microsoft.extensions.caching.stackexchangeredis.rediscacheoptions) [options](Options.md) class in the `ConfigureServices` method of your [module](Module-Development-Basics.md): diff --git a/docs/en/Repositories.md b/docs/en/Repositories.md index a222b9d803..0fc80984e7 100644 --- a/docs/en/Repositories.md +++ b/docs/en/Repositories.md @@ -142,7 +142,7 @@ var people = _personRepository You normally want to use `.ToListAsync()`, `.CountAsync()`... instead, to be able to write a **truly async code**. -However, you see that you can't use these async extension methods in your application or domain layer when you create a new project using the standard [application startup template](Startup-Templates/Application.md), because; +However, you see that you can't use all the async extension methods in your application or domain layer when you create a new project using the standard [application startup template](Startup-Templates/Application.md), because; * These async methods **are not standard LINQ methods** and they are defined in the [Microsoft.EntityFrameworkCore](https://www.nuget.org/packages/Microsoft.EntityFrameworkCore) NuGet package. * The standard template **doesn't have a reference** to the EF Core package from the domain and application layers, to be independent from the database provider. @@ -151,9 +151,9 @@ Based on your requirements and development model, you have the following options > Using async methods is strongly suggested! Don't use sync LINQ methods while executing database queries to be able to develop a scalable application. -### Option-1: Reference to the EF Core +### Option-1: Reference to the Database Provider Package -The easiest solution is to directly add the EF Core package from the project you want to use these async methods. +**The easiest solution** is to directly add the EF Core package from the project you want to use these async methods. > Add the [Volo.Abp.EntityFrameworkCore](https://www.nuget.org/packages/Volo.Abp.EntityFrameworkCore) NuGet package to your project, which indirectly reference to the EF Core package. This ensures that you use the correct version of the EF Core compatible to the rest of your application. @@ -183,14 +183,34 @@ var people = ((IMongoQueryable)_personRepository .ToListAsync(); ```` -### Option-2: Custom Repository Methods +### Option-2: Use the IRepository Async Extension Methods -You can always create custom repository methods and use the database provider specific APIs, like async extension methods here. See [EF Core](Entity-Framework-Core.md) or [MongoDb](MongoDB.md) document for more info about the custom repositories. +ABP Framework provides async extension methods for the repositories, just similar to async LINQ extension methods. -This method is suggested; +**Example: Use `CountAsync` and `FirstOrDefaultAsync` methods on the repositories** -* If you want to **completely isolate** your domain & application layers from the database provider. -* If you develop a **reusable [application module](Modules/Index.md)** and don't want to force to a specific database provider, which should be done as a [best practice](Best-Practices/Index.md). +````csharp +var countAll = await _personRepository + .CountAsync(); + +var count = await _personRepository + .CountAsync(x => x.Name.StartsWith("A")); + +var book1984 = await _bookRepository + .FirstOrDefaultAsync(x => x.Name == "John"); +```` + +The standard LINQ extension methods are supported: *AllAsync, AnyAsync, AverageAsync, ContainsAsync, CountAsync, FirstAsync, FirstOrDefaultAsync, LastAsync, LastOrDefaultAsync, LongCountAsync, MaxAsync, MinAsync, SingleAsync, SingleOrDefaultAsync, SumAsync, ToArrayAsync, ToListAsync*. + +This approach still **has a limitation**. You need to call the extension method directly on the repository object. For example, the below usage is **not supported**: + +```csharp +var count = await _bookRepository.Where(x => x.Name.Contains("A")).CountAsync(); +``` + +This is because the object returned from the `Where` method is not a repository object, it is a standard `IQueryable` interface. See the other options for such cases. + +This method is suggested **wherever possible**. ### Option-3: IAsyncQueryableExecuter @@ -245,6 +265,17 @@ ABP Framework executes the query asynchronously using the actual database provid This method is suggested; +* If you want to develop your application code **without depending** on the database provider. * If you are building a **reusable library** that doesn't have a database provider integration package, but needs to execute an `IQueryable` object in some case. -For example, ABP Framework uses the `IAsyncQueryableExecuter` in the `CrudAppService` base class (see the [application services](Application-Services.md) document). \ No newline at end of file +For example, ABP Framework uses the `IAsyncQueryableExecuter` in the `CrudAppService` base class (see the [application services](Application-Services.md) document). + +### Option-4: Custom Repository Methods + +You can always create custom repository methods and use the database provider specific APIs, like async extension methods here. See [EF Core](Entity-Framework-Core.md) or [MongoDb](MongoDB.md) document for more info about the custom repositories. + +This method is suggested; + +* If you want to **completely isolate** your domain & application layers from the database provider. +* If you develop a **reusable [application module](Modules/Index.md)** and don't want to force to a specific database provider, which should be done as a [best practice](Best-Practices/Index.md). + diff --git a/docs/en/Settings.md b/docs/en/Settings.md index 32761ff201..567cb02c4c 100644 --- a/docs/en/Settings.md +++ b/docs/en/Settings.md @@ -2,7 +2,7 @@ [Configuration system](Configuration.md) is a good way to configure the application on startup. In addition to the configurations, ABP provides another way to set and get some application settings. -A setting is a name-value pair stored in a dynamic data source, generally in a database. Setting system is extensible and there are pre-built provides for a user, a tenant, global and default. +A setting is a name-value pair stored in a dynamic data source, generally in a database. Setting system is extensible and there are pre-built providers for a user, a tenant, global and default. ## Defining Settings @@ -67,7 +67,7 @@ public class MySettingDefinitionProvider : SettingDefinitionProvider > Using constants for the setting names is a good practice and ABP packages do it. `Abp.Mailing.Smtp.Host` setting name is a constant defined by the `EmailSettingNames` class (in the `Volo.Abp.Emailing` namespace). -## Reading Setting Values +## Reading the Setting Values ### ISettingProvider @@ -108,24 +108,15 @@ public class MyService } ```` -> `ISettingProvider` is a very common service and some base classes (like `IApplicationService`) already property-inject it. You can directly use the `SettingProvider` in such cases. +> `ISettingProvider` is a very common service and some base classes (like `IApplicationService`) already property-inject it. You can directly use the `SettingProvider` property in such cases. ### Reading Setting Values on the Client Side -If a setting is allowed to be visible on the client side, current value of the setting can also be read from the JavaScript code. Examples: +If a setting is allowed to be visible on the client side, current value of the setting can also be read from the client code. See the following documents to understand how to get the setting values in different UI types; -````js -//Gets a value as string. -var language = abp.setting.get('Abp.Localization.DefaultLanguage'); - -//Gets an integer value. -var requiredLength = abp.setting.getInt('Abp.Identity.Password.RequiredLength'); - -//Gets a boolean value. -var requireDigit = abp.setting.getBoolean('Abp.Identity.Password.RequireDigit'); -```` - -In addition, use `abp.setting.values` to get a dictionary of all the setting values. +* [MVC / Razor Pages](UI/AspNetCore/JavaScript-API/Settings.md) +* [Angular](UI/Angular/Settings.md) +* [Blazor](UI/Blazor/Settings.md) ## Setting Value Providers diff --git a/docs/en/Tutorials/Part-10.md b/docs/en/Tutorials/Part-10.md index 2e0b1c4939..53f19d93dd 100644 --- a/docs/en/Tutorials/Part-10.md +++ b/docs/en/Tutorials/Part-10.md @@ -38,7 +38,7 @@ This tutorial has multiple versions based on your **UI** and **Database** prefer We have created `Book` and `Author` functionalities for the book store application. However, currently there is no relation between these entities. -In this tutorial, we will establish a **1 to N** relation between the `Book` and the `Author`. +In this tutorial, we will establish a **1 to N** relation between the `Author` and the `Book` entities. ## Add Relation to The Book Entity diff --git a/docs/en/Tutorials/Part-2.md b/docs/en/Tutorials/Part-2.md index e52fe7a46d..f4fcf61e25 100644 --- a/docs/en/Tutorials/Part-2.md +++ b/docs/en/Tutorials/Part-2.md @@ -583,7 +583,7 @@ When you click to the Books menu item under the Book Store parent, you are being We will use the [Blazorise library](https://blazorise.com/) as the UI component kit. It is a very powerful library that supports major HTML/CSS frameworks, including the Bootstrap. -ABP Framework provides a generic base class, `BlazoriseCrudPageBase<...>`, to create CRUD style pages. This base class is compatible to the `ICrudAppService` that was used to build the `IBookAppService`. So, we can inherit from the `BlazoriseCrudPageBase` to automate the standard CRUD stuff. +ABP Framework provides a generic base class, `AbpCrudPageBase<...>`, to create CRUD style pages. This base class is compatible to the `ICrudAppService` that was used to build the `IBookAppService`. So, we can inherit from the `AbpCrudPageBase` to automate the code behind for the standard CRUD stuff. Open the `Books.razor` and replace the content as the following: @@ -595,7 +595,7 @@ Open the `Books.razor` and replace the content as the following: @using Acme.BookStore.Localization @using Microsoft.Extensions.Localization @inject IStringLocalizer L -@inherits BlazoriseCrudPageBase +@inherits AbpCrudPageBase @@ -645,15 +645,15 @@ Open the `Books.razor` and replace the content as the following: > If you see some syntax errors, you can ignore them if your application properly built and run. Visual Studio still has some bugs with Blazor. -* Inherited from the `BlazoriseCrudPageBase` which implements all the CRUD details for us. +* Inherited from the `AbpCrudPageBase` which implements all the CRUD details for us. * `Entities`, `TotalCount`, `PageSize`, `OnDataGridReadAsync` are defined in the base blass. * Injected `IStringLocalizer` (as `L` object) and used for localization. While the code above pretty easy to understand, you can check the Blazorise [Card](https://blazorise.com/docs/components/card/) and [DataGrid](https://blazorise.com/docs/extensions/datagrid/) documents to understand them better. -#### About the BlazoriseCrudPageBase +#### About the AbpCrudPageBase -We will continue to benefit from the `BlazoriseCrudPageBase` for the books page. You could just inject the `IBookAppService` and perform all the server side calls yourself (thanks to the [Dynamic C# HTTP API Client Proxy](../API/Dynamic-CSharp-API-Clients.md) system of the ABP Framework). We will do it manually for the authors page to demonstrate how to call server side HTTP APIs in your Blazor applications. +We will continue to benefit from the `AbpCrudPageBase` for the books page. You could just inject the `IBookAppService` and perform all the server side calls yourself (thanks to the [Dynamic C# HTTP API Client Proxy](../API/Dynamic-CSharp-API-Clients.md) system of the ABP Framework). We will do it manually for the authors page to demonstrate how to call server side HTTP APIs in your Blazor applications. ## Run the Final Application diff --git a/docs/en/Tutorials/Part-3.md b/docs/en/Tutorials/Part-3.md index 079b9e7cf8..dae7e4bfdb 100644 --- a/docs/en/Tutorials/Part-3.md +++ b/docs/en/Tutorials/Part-3.md @@ -1163,7 +1163,7 @@ Clicking the "Delete" action calls the `delete` method which then shows a confir ## Creating a New Book -In this section, you will learn how to create a new modal dialog form to create a new book. Since we've inherited from the `BlazoriseCrudPage`, we only need to develop the view part. +In this section, you will learn how to create a new modal dialog form to create a new book. Since we've inherited from the `AbpCrudPageBase`, we only need to develop the view part. ### Add "New Button" Button @@ -1328,7 +1328,7 @@ We can now define a modal to edit the book. Add the following code to the end of ### AutoMapper Configuration -The base `BlazoriseCrudPage` uses the [object to object mapping](../Object-To-Object-Mapping.md) system to convert an incoming `BookDto` object to a `CreateUpdateBookDto` object. So, we need to define the mapping. +The base `AbpCrudPageBase` uses the [object to object mapping](../Object-To-Object-Mapping.md) system to convert an incoming `BookDto` object to a `CreateUpdateBookDto` object. So, we need to define the mapping. Open the `BookStoreBlazorAutoMapperProfile` inside the `Acme.BookStore.Blazor` project and change the content as the following: @@ -1382,7 +1382,7 @@ Here the complete code to create the book management CRUD page, that has been de @using Acme.BookStore.Localization @using Microsoft.Extensions.Localization @inject IStringLocalizer L -@inherits BlazoriseCrudPageBase +@inherits AbpCrudPageBase @@ -1392,8 +1392,10 @@ Here the complete code to create the book management CRUD page, that has been de - + @@ -1406,10 +1408,10 @@ Here the complete code to create the book management CRUD page, that has been de ShowPager="true" PageSize="PageSize"> - @@ -1434,7 +1436,7 @@ Here the complete code to create the book management CRUD page, that has been de Field="@nameof(BookDto.Type)" Caption="@L["Type"]"> - @L[$"Enum:BookType:{(int) context.Type}"] + @L[$"Enum:BookType:{(int)context.Type}"] @L["NewBook"] + Clicked="OpenCreateModalAsync"> + @L["NewBook"] + } ```` @@ -545,7 +547,7 @@ As similar to the *New Book* button, we can use `if` blocks to conditionally sho You can run and test the permissions. Remove a book related permission from the admin role to see the related button/action disappears from the UI. -However, ABP Framework caches the permissions of the current user in the client side. So, when you change a permission for yourself, you need to manually **refresh the page** to take the effect. If you don't refresh and try to use the prohibited action you get an HTTP 403 (forbidden) response from the server. +**ABP Framework caches the permissions** of the current user in the client side. So, when you change a permission for yourself, you need to manually **refresh the page** to take the effect. If you don't refresh and try to use the prohibited action you get an HTTP 403 (forbidden) response from the server. > Changing a permission for a role or user immediately available on the server side. So, this cache system doesn't cause any security problem. diff --git a/docs/en/Tutorials/Part-7.md b/docs/en/Tutorials/Part-7.md index 32c9f6b9a4..5cae52a4b1 100644 --- a/docs/en/Tutorials/Part-7.md +++ b/docs/en/Tutorials/Part-7.md @@ -74,6 +74,10 @@ Open the **Package Manager Console** on Visual Studio and ensure that the **Defa Run the following command to create a new database migration: +````bash +Add-Migration "Added_Authors" +```` + ![bookstore-add-migration-authors](images/bookstore-add-migration-authors.png) This will create a new migration class. Then run the `Update-Database` command to create the table on the database. diff --git a/docs/en/Tutorials/Part-9.md b/docs/en/Tutorials/Part-9.md index 841d2fb3cb..374efff2b4 100644 --- a/docs/en/Tutorials/Part-9.md +++ b/docs/en/Tutorials/Part-9.md @@ -1177,6 +1177,20 @@ We should complete the localizations we've used above. Open the `en.json` file u "NewAuthor": "New author" ```` +### Run the Application + +Run and login to the application. **If you don't see the Authors menu item under the Book Store menu, that means you don't have the permission yet.** Go to the `identity/roles` page, click to the *Actions* button and select the *Permissions* action for the **admin role**: + +![bookstore-author-permissions](images/bookstore-author-permissions.png) + +As you see, the admin role has no *Author Management* permissions yet. Click to the checkboxes and save the modal to grant the necessary permissions. You will see the *Authors* menu item under the *Book Store* in the main menu, after **refreshing the page**: + +![bookstore-authors-page](images/bookstore-authors-blazor-ui.png) + +That's all! This is a fully working CRUD page, you can create, edit and delete the authors. + +> **Tip**: If you run the `.DbMigrator` console application after defining a new permission, it automatically grants these new permissions to the admin role and you don't need to manually grant the permissions yourself. + {{end}} ## The Next Part diff --git a/docs/en/Tutorials/images/bookstore-authors-blazor-ui.png b/docs/en/Tutorials/images/bookstore-authors-blazor-ui.png new file mode 100644 index 0000000000..5b9480957d Binary files /dev/null and b/docs/en/Tutorials/images/bookstore-authors-blazor-ui.png differ diff --git a/docs/en/UI/Angular/Localization.md b/docs/en/UI/Angular/Localization.md index eec4db0cb4..c8073585e1 100644 --- a/docs/en/UI/Angular/Localization.md +++ b/docs/en/UI/Angular/Localization.md @@ -219,7 +219,18 @@ If you see an error like this, you should pass the `cultureNameLocaleFileMap` pr See [all locale files in Angular](https://github.com/angular/angular/tree/master/packages/common/locales). +## Adding new culture +```js +//app.module.ts + +import { storeLocaleData } from '@abp/ng.core'; +import( +/* webpackChunkName: "_locale-your-locale-js"*/ +/* webpackMode: "eager" */ +'@angular/common/locales/your-locale.js' +).then(m => storeLocaleData(m.default, 'your-locale')); +``` ## See Also * [Localization in ASP.NET Core](../../Localization.md) diff --git a/docs/en/UI/Angular/Settings.md b/docs/en/UI/Angular/Settings.md new file mode 100644 index 0000000000..47868f2363 --- /dev/null +++ b/docs/en/UI/Angular/Settings.md @@ -0,0 +1,3 @@ +# Angular UI: Settings + +> This document explains how to get setting values in an Angular application. See the [settings document](../../Settings.md) to learn the setting system. \ No newline at end of file diff --git a/docs/en/UI/Angular/Toaster-Service.md b/docs/en/UI/Angular/Toaster-Service.md index f6d5c71e99..4d94b8cf6d 100644 --- a/docs/en/UI/Angular/Toaster-Service.md +++ b/docs/en/UI/Angular/Toaster-Service.md @@ -85,7 +85,103 @@ The all open toasts can be removed manually via the `clear` method: ```js this.toaster.clear(); ``` +## Replacing ToasterService with 3rd party toaster libraries +If you want the ABP Framework to utilize 3rd party libraries for the toasters instead of the built-in one, you can provide a service that implements `Toaster.Service` interface, and provide it as follows (ngx-toastr library used in example): + +> You can use *LocalizationService* for toaster messages translations. +```js +// your-custom-toaster.service.ts +import { Injectable } from '@angular/core'; +import { Config, LocalizationService } from '@abp/ng.core'; +import { Toaster } from '@abp/ng.theme.shared'; +import { ToastrService } from 'ngx-toastr'; + +@Injectable() +export class CustomToasterService implements Toaster.Service { + constructor(private toastr: ToastrService, private localizationService: LocalizationService) {} + + error( + message: Config.LocalizationParam, + title?: Config.LocalizationParam, + options?: Partial, + ) { + return this.show(message, title, 'error', options); + } + + clear(): void { + this.toastr.clear(); + } + + info( + message: Config.LocalizationParam, + title: Config.LocalizationParam | undefined, + options: Partial | undefined, + ): Toaster.ToasterId { + return this.show(message, title, 'info', options); + } + + remove(id: number): void { + this.toastr.remove(id); + } + + show( + message: Config.LocalizationParam, + title: Config.LocalizationParam, + severity: Toaster.Severity, + options: Partial, + ): Toaster.ToasterId { + const translatedMessage = this.localizationService.instant(message); + const translatedTitle = this.localizationService.instant(title); + const toasterOptions = { + positionClass: 'toast-bottom-right', + tapToDismiss: options.tapToDismiss, + ...(options.sticky && { + extendedTimeOut: 0, + timeOut: 0, + }), + }; + const activeToast = this.toastr.show( + translatedMessage, + translatedTitle, + toasterOptions, + `toast-${severity}`, + ); + return activeToast.toastId; + } + + success( + message: Config.LocalizationParam, + title: Config.LocalizationParam | undefined, + options: Partial | undefined, + ): Toaster.ToasterId { + return this.show(message, title, 'success', options); + } + + warn( + message: Config.LocalizationParam, + title: Config.LocalizationParam | undefined, + options: Partial | undefined, + ): Toaster.ToasterId { + return this.show(message, title, 'warning', options); + } +} +``` +```js +// app.module.ts + +import { ToasterService } from '@abp/ng.theme.shared'; + +@NgModule({ + providers: [ + // ... + { + provide: ToasterService, + useClass: CustomToasterService, + }, + ] +}) +``` ## API ### success diff --git a/docs/en/UI/AspNetCore/Client-Side-Package-Management.md b/docs/en/UI/AspNetCore/Client-Side-Package-Management.md index 63c5cec225..77dee7a383 100644 --- a/docs/en/UI/AspNetCore/Client-Side-Package-Management.md +++ b/docs/en/UI/AspNetCore/Client-Side-Package-Management.md @@ -94,7 +94,8 @@ An example mapping configuration is shown below: mappings: { "@node_modules/bootstrap/dist/css/bootstrap.css": "@libs/bootstrap/css/", "@node_modules/bootstrap/dist/js/bootstrap.bundle.js": "@libs/bootstrap/js/", - "@node_modules/bootstrap-datepicker/dist/locales/*.*": "@libs/bootstrap-datepicker/locales/" + "@node_modules/bootstrap-datepicker/dist/locales/*.*": "@libs/bootstrap-datepicker/locales/", + "@node_modules/bootstrap-v4-rtl/dist/**/*": "@libs/bootstrap-v4-rtl/dist/" } ```` diff --git a/docs/en/UI/AspNetCore/Customization-User-Interface.md b/docs/en/UI/AspNetCore/Customization-User-Interface.md index f1f0174c89..c4e196fbb9 100644 --- a/docs/en/UI/AspNetCore/Customization-User-Interface.md +++ b/docs/en/UI/AspNetCore/Customization-User-Interface.md @@ -376,7 +376,7 @@ Assume that you need to add the Google Analytics script to the layout (that will ![bookstore-google-analytics-view-component](../../images/bookstore-google-analytics-view-component.png) -**NotificationViewComponent.cs** +**GoogleAnalyticsViewComponent.cs** ````csharp public class GoogleAnalyticsViewComponent : AbpViewComponent @@ -441,7 +441,7 @@ Layout system allows themes to define standard, named layouts and allows any pag * "**Account**": This layout is used by login, register and other similar pages. It is used for the pages under the `/Pages/Account` folder by default. * "**Empty**": Empty and minimal layout. -These names are defined in the `StandardLayouts` class as constants. You can definitely create your own layouts, but these are standard layout names and implemented by all the themes out of the box. +These names are defined in the `StandardLayouts` class as constants. You can definitely create your own layouts, but these are the standard layout names and implemented by all the themes out of the box. #### Layout Location diff --git a/docs/en/UI/AspNetCore/JavaScript-API/Ajax.md b/docs/en/UI/AspNetCore/JavaScript-API/Ajax.md new file mode 100644 index 0000000000..dca3105b5c --- /dev/null +++ b/docs/en/UI/AspNetCore/JavaScript-API/Ajax.md @@ -0,0 +1,150 @@ +# ASP.NET Core MVC / Razor Pages UI JavaScript AJAX API + +`abp.ajax` API provides a convenient way of performing AJAX calls to the server. It internally uses JQuery's `$.ajax`, but automates some common tasks for you; + +* Automatically **handles & localize the errors** and informs the user (using the [abp.message](Message.md)). So you typically don't care about errors. +* Automatically adds **anti forgery** token to the HTTP header to satisfy CSRF protection validation on the server side. +* Automatically sets **default options** and allows to configure the defaults in a single place. +* Can **block** a UI part (or the full page) during the AJAX operation. +* Allows to fully customize any AJAX call, by using the standard `$.ajax` **options**. + +> While `abp.ajax` makes the AJAX call pretty easier, you typically will use the [Dynamic JavaScript Client Proxy](Dynamic-JavaScript-Client-Proxies.md) system to perform calls to your server side HTTP APIs. `abp.ajax` can be used when you need to perform low level AJAX operations. + +## Basic Usage + +`abp.ajax` accepts an options object that is accepted by the standard [$.ajax](https://api.jquery.com/jquery.ajax/#jQuery-ajax-settings). All the standard options are valid. It returns a [promise](https://api.jquery.com/category/deferred-object/) as the return value. + +**Example: Get the list of users** + +````js +abp.ajax({ + type: 'GET', + url: '/api/identity/users' +}).then(function(result){ + console.log(result); +}); +```` + +This command logs the list of users to the console, if you've **logged in** to the application and have [permission](../../../Authorization.md) for the user management page of the [Identity Module](../../../Modules/Identity.md). + +## Error Handling + +The example AJAX call above shows an **error message** if you haven't login to the application or you don't have the necessary permissions to perform this request: + +![ajax-error](../../../images/ajax-error.png) + +All kinds of errors are automatically handled by `abp.ajax`, unless you want to disable it. + +### Standard Error Response + +`abp.ajax` is compatible with the [exception handling system](../../../Exception-Handling.md) of the ABP Framework and it properly handles the standard error format returned from the server. A typical error message is a JSON as like below: + +````json +{ + "error": { + "code": "App:010042", + "message": "This topic is locked and can not add a new message", + "details": "A more detailed info about the error..." + } +} +```` + +The error message is directly shown to the user, using the `message` and `details` properties. + +### Non-Standard Error Response & HTTP Status Codes + +It also handles errors even if the standard error format was not sent by the server. This can be case if you bypass the ABP exception handling system and manually build the HTTP response on the server. In that case, **HTTP status codes** are considered. + +The following HTTP Status Codes are pre-defined; + +* **401**: Shows an error message like "*You should be authenticated (sign in) in order to perform this operation*". When the users click the OK button, they are redirected to the home page of the application to make them login again. +* **403**: Shows an error message like "*You are not allowed to perform this operation*". +* **404**: Shows an error message like "*The resource requested could not found on the server*". +* **Others**: Shows a generic error message like "*An error has occurred. Error detail not sent by server*". + +All these messages are localized based on the current user's language. + +### Manually Handling the Errors + +Since `abp.ajax` returns a promise, you can always chain a `.cactch(...)` call to register a callback that is executed if the AJAX request fails. + +**Example: Show an alert if the AJAX request fails** + +````js +abp.ajax({ + type: 'GET', + url: '/api/identity/users' +}).then(function(result){ + console.log(result); +}).catch(function(){ + alert("request failed :("); +}); +```` + +While your callback is fired, ABP still handles the error itself. If you want to disable automatic error handling, pass `abpHandleError: false` the the `abp.ajax` options. + +**Example: Disable the auto error handling** + +````js +abp.ajax({ + type: 'GET', + url: '/api/identity/users', + abpHandleError: false //DISABLE AUTO ERROR HANDLING +}).then(function(result){ + console.log(result); +}).catch(function(){ + alert("request failed :("); +}); +```` + +If you set `abpHandleError: false` and don't catch the error yourself, then the error will be hidden and the request silently fails. `abp.ajax` still logs the error to the browser console (see the *Configuration* section to override it). + +## Configuration + +`abp.ajax` has a **global configuration** that you can customize based on your requirements. + +### Default AJAX Options + +`abp.ajax.defaultOpts` object is used to configure default options used while performing an AJAX call, unless you override them. Default value of this object is shown below: + +````js +{ + dataType: 'json', + type: 'POST', + contentType: 'application/json', + headers: { + 'X-Requested-With': 'XMLHttpRequest' + } +} +```` + +So, if you want to change the default request type, you can do it as shown below: + +````js +abp.ajax.defaultOpts.type = 'GET'; +```` + +Write this code before all of your JavaScript code. You typically want to place such a configuration into a separate JavaScript file and add it to the layout using the global [bundle](../Bundling-Minification.md). + +### Log/Show Errors + +The following functions can be overridden to customize the logging and showing the error messages: + +* `abp.ajax.logError` function logs errors using the [abp.log.error(...)](Logging.md) by default. +* `abp.ajax.showError` function shows the error message using the [abp.message.error(...)](Message.md) by default. +* `abp.ajax.handleErrorStatusCode` handles different HTTP status codes and shows different messages based on the code. +* `abp.ajax.handleAbpErrorResponse` handles the errors sent with the standard ABP error format. +* `abp.ajax.handleNonAbpErrorResponse` handles the non-standard error responses. +* `abp.ajax.handleUnAuthorizedRequest` handles responses with `401` status code and redirect users to the home page of the application. + +**Example: Override the `logError` function** + +````js +abp.ajax.logError = function(error) { + //... +} +```` + +### Other Options + +* `abp.ajax.ajaxSendHandler` function is used to intercept the AJAX requests and add antiforgery token to the HTTP header. Note that this works for all AJAX requests, even if you don't use the `abp.ajax`. \ No newline at end of file diff --git a/docs/en/UI/AspNetCore/JavaScript-API/Auth.md b/docs/en/UI/AspNetCore/JavaScript-API/Auth.md new file mode 100644 index 0000000000..45af8c4b3e --- /dev/null +++ b/docs/en/UI/AspNetCore/JavaScript-API/Auth.md @@ -0,0 +1,24 @@ +# ASP.NET Core MVC / Razor Pages UI: JavaScript Auth API + +Auth API allows you to check permissions (policies) for the current user in the client side. In this way, you can conditionally show/hide UI parts or perform your client side logic based on the current permissions. + +> This document only explains the JavaScript API. See the [authorization document](../../../Authorization.md) to understand the ABP authorization & permission system. + +## Basic Usage + +`abp.auth.isGranted(...)` function is used to check if a permission/policy has granted or not: + +````js +if (abp.auth.isGranted('DeleteUsers')) { + //TODO: Delete the user +} else { + alert("You don't have permission to delete a user!"); +} +```` + +## Other Fields & Functions + +* ` abp.auth.isAnyGranted(...)`: Gets one or more permission/policy names and returns `true` if at least one of them has granted. +* `abp.auth.areAllGranted(...)`: Gets one or more permission/policy names and returns `true` if all of them of them have granted. +* `abp.auth.policies`: This is an object where its keys are the permission/policy names. You can find all permission/policy names here. +* `abp.auth.grantedPolicies`: This is an object where its keys are the permission/policy names. You can find the granted permission/policy names here. \ No newline at end of file diff --git a/docs/en/UI/AspNetCore/JavaScript-API/Block-Busy.md b/docs/en/UI/AspNetCore/JavaScript-API/Block-Busy.md new file mode 100644 index 0000000000..943a651432 --- /dev/null +++ b/docs/en/UI/AspNetCore/JavaScript-API/Block-Busy.md @@ -0,0 +1,56 @@ +# ASP.NET Core MVC / Razor Pages UI: JavaScript UI Block/Busy API + +UI Block API disables (blocks) the page or a part of the page. + +## Basic Usage + +**Example: Block (disable) the complete page** + +````js +abp.ui.block(); +```` + +**Example: Block (disable) an HTML element** + +````js +abp.ui.block('#MyContainer'); +```` + +**Example: Enables the previously blocked element or page:** + +````js +abp.ui.unblock(); +```` + +## Options + +`abp.ui.block()` method can get an options object which may contain the following fields: + +* `elm`: An optional selector to find the element to be blocked (e.g. `#MyContainerId`). If not provided, the entire page is blocked. The selector can also be directly passed to the `block()` method as shown above. +* `busy`: Set to `true` to show a progress indicator on the blocked area. +* `promise`: A promise object with `always` or `finally` callbacks. This can be helpful if you want to automatically unblock the blocked area when a deferred operation completes. + +**Example: Block an element with busy indicator** + +````js +abp.ui.block({ + elm: '#MySection', + busy: true +}); +```` + +The resulting UI will look like below: + +![ui-busy](../../../images/ui-busy.png) + +## setBusy + +`abp.ui.setBusy(...)` and `abp.ui.clearBusy()` are shortcut functions if you want to use the block with `busy` option. + +**Example: Block with busy** + +````js +abp.ui.setBusy('#MySection'); +```` + +Then you can use `abp.ui.clearBusy();` to re-enable the busy area/page. \ No newline at end of file diff --git a/docs/en/UI/AspNetCore/JavaScript-API/CurrentUser.md b/docs/en/UI/AspNetCore/JavaScript-API/CurrentUser.md new file mode 100644 index 0000000000..038bb9dff1 --- /dev/null +++ b/docs/en/UI/AspNetCore/JavaScript-API/CurrentUser.md @@ -0,0 +1,49 @@ +# ASP.NET Core MVC / Razor Pages UI: JavaScript CurrentUser API + +`abp.currentUser` is an object that contains information about the current user of the application. + +> This document only explains the JavaScript API. See the [CurrentUser document](../../../CurrentUser.md) to get information about the current user in the server side. + +## Authenticated User + +If the user was authenticated, this object will be something like below: + +````js +{ + isAuthenticated: true, + id: "34f1f4a7-13cc-4b91-84d1-b91c87afa95f", + tenantId: null, + userName: "john", + name: "John", + surName: "Nash", + email: "john.nash@abp.io", + emailVerified: true, + phoneNumber: null, + phoneNumberVerified: false, + roles: ["moderator","supporter"] +} +```` + +So, `abp.currentUser.userName` returns `john` in this case. + +## Anonymous User + +If the user was not authenticated, this object will be something like below: + +````js +{ + isAuthenticated: false, + id: null, + tenantId: null, + userName: null, + name: null, + surName: null, + email: null, + emailVerified: false, + phoneNumber: null, + phoneNumberVerified: false, + roles: [] +} +```` + +You can check `abp.currentUser.isAuthenticated` to understand if the use was authenticated or not. \ No newline at end of file diff --git a/docs/en/UI/AspNetCore/JavaScript-API/DOM.md b/docs/en/UI/AspNetCore/JavaScript-API/DOM.md new file mode 100644 index 0000000000..cdd4cef9db --- /dev/null +++ b/docs/en/UI/AspNetCore/JavaScript-API/DOM.md @@ -0,0 +1,117 @@ +# ASP.NET Core MVC / Razor Pages UI: JavaScript DOM API + +`abp.dom` (Document Object Model) provides events that you can subscribe to get notified when elements dynamically added to and removed from the page (DOM). + +It is especially helpful if you want to initialize the new loaded elements. This is generally needed when you dynamically add elements to DOM (for example, get some HTML elements via AJAX) after page initialization. + +> ABP uses the [MutationObserver](https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver) to observe the changes made on the DOM. + +## Node Events + +### onNodeAdded + +This event is triggered when an element is added to the DOM. Example: + +````js +abp.dom.onNodeAdded(function(args){ + console.log(args.$el); +}); +```` + +`args` object has the following fields; + +* `$el`: The JQuery selection to get the new element inserted to the DOM. + +### onNodeRemoved + +This event is triggered when an element is removed from the DOM. Example: + +````js +abp.dom.onNodeRemoved(function(args){ + console.log(args.$el); +}); +```` + +`args` object has the following fields; + +* `$el`: The JQuery selection to get the element removed from the DOM. + +## Pre-Build Initializers + +ABP Framework is using the DOM events to initialize some kind of HTML elements when they are added to the DOM after than the page was already initialized. + +> Note that the same initializers also work if these elements were already included in the initial DOM. So, whether they are initially or lazy loaded, they work as expected. + +### Form Initializer + +The Form initializer (defined as `abp.dom.initializers.initializeForms`) initializes the lazy loaded forms; + +* Automatically enabled the `unobtrusive` validation on the form. +* Can automatically show a confirmation message when you submit the form. To enable this feature, just add `data-confirm` attribute with a message (like `data-confirm="Are you sure?"`) to the `form` element. +* If the `form` element has `data-ajaxForm="true"` attribute, then automatically calls the `.abpAjaxForm()` on the `form` element, to make the form posted via AJAX. + +See the [Forms & Validation](../Forms-Validation.md) document for more. + +### Script Initializer + +Script initializer (`abp.dom.initializers.initializeScript`) can execute a JavaScript code for a DOM element. + +**Example: Lazy load a component and execute some code when the element has loaded** + +Assume that you've a container to load the element inside: + +````html +
+```` + +And this is the component that will be loaded via AJAX from the server and inserted into the container: + +````html +
+

Sample message

+
+```` + +`data-script-class="MyCustomClass"` indicates the JavaScript class that will be used to perform some logic on this element: + +`MyCustomClass` is a global object defined as shown below: + +````js +MyCustomClass = function(){ + + function initDom($el){ + $el.css('color', 'red'); + } + + return { + initDom: initDom + } +}; +```` + +`initDom` is the function that is called by the ABP Framework. The `$el` argument is the loaded HTML element as a JQuery selection. + +Finally, you can load the component inside the container after an AJAX call: + +````js +$(function () { + setTimeout(function(){ + $.get('/get-my-element').then(function(response){ + $('#LazyComponent').html(response); + }); + }, 2000); +}); +```` + +Script Initialization system is especially helpful if you don't know how and when the component will be loaded into the DOM. This can be possible if you've developed a reusable UI component in a library and you want the application developer shouldn't care how to initialize the component in different use cases. + +> Script initialization doesn't work if the component was loaded in the initial DOM. In this case, you are responsible to initialize it. + +### Other Initializers + +The following Bootstrap components and libraries are automatically initialized when they are added to the DOM: + +* Tooltip +* Popover +* Timeage + diff --git a/docs/en/UI/AspNetCore/JavaScript-API/Dynamic-JavaScript-Client-Proxies.md b/docs/en/UI/AspNetCore/JavaScript-API/Dynamic-JavaScript-Client-Proxies.md new file mode 100644 index 0000000000..5270852b60 --- /dev/null +++ b/docs/en/UI/AspNetCore/JavaScript-API/Dynamic-JavaScript-Client-Proxies.md @@ -0,0 +1,3 @@ +# ASP.NET Core MVC / Razor Pages UI: Dynamic JavaScript Client Proxies + +TODO \ No newline at end of file diff --git a/docs/en/UI/AspNetCore/JavaScript-API/Events.md b/docs/en/UI/AspNetCore/JavaScript-API/Events.md new file mode 100644 index 0000000000..3425355f44 --- /dev/null +++ b/docs/en/UI/AspNetCore/JavaScript-API/Events.md @@ -0,0 +1,88 @@ +# ASP.NET Core MVC / Razor Pages UI: JavaScript Events API + +`abp.event` object is a simple service that is used to publish and subscribe to global events **in the browser**. + +> This API is not related to server side local or distributed events. It works in the browser boundaries to make the UI components (code parts) communicate in a loosely coupled way. + +## Basic Usage + +### Publishing Events + +Use `abp.event.trigger` to publish events. + +**Example: Publish a *Basket Updated* event** + +````js +abp.event.trigger('basketUpdated'); +```` + +This will trigger all the subscribed callbacks. + +### Subscribing to the Events + +Use `abp.event.on` to subscribe to events. + +**Example: Consume the *Basket Updated* event** + +````js +abp.event.on('basketUpdated', function() { + console.log('Handled the basketUpdated event...'); +}); +```` + +You start to get events after you subscribe to the event. + +### Unsubscribing from the Events + +If you need to unsubscribe from a pre-subscribed event, you can use the `abp.event.off(eventName, callback)` function. In this case, you have the callback as a separate function declaration. + +**Example: Subscribe & Unsubscribe** + +````js +function onBasketUpdated() { + console.log('Handled the basketUpdated event...'); +} + +//Subscribe +abp.event.on('basketUpdated', onBasketUpdated); + +//Unsubscribe +abp.event.off('basketUpdated', onBasketUpdated); +```` + +You don't get events after you unsubscribe from the event. + +## Event Arguments + +You can pass arguments (of any count) to the `trigger` method and get them in the subscription callback. + +**Example: Add the basket as the event argument** + +````js +//Subscribe to the event +abp.event.on('basketUpdated', function(basket) { + console.log('The new basket object: '); + console.log(basket); +}); + +//Trigger the event +abp.event.trigger('basketUpdated', { + items: [ + { + "productId": "123", + "count": 2 + }, + { + "productId": "832", + "count": 1 + } + ] +}); +```` + +### Multiple Arguments + +If you want to pass multiple arguments, you can pass like `abp.event.on('basketUpdated', arg0, arg1, agr2)`. Then you can add the same argument list to the callback function on the subscriber side. + +> **Tip:** Alternatively, you can send a single object that has a separate field for each argument. This makes easier to extend/change the event arguments in the future without breaking the subscribers. + diff --git a/docs/en/UI/AspNetCore/JavaScript-API/Features.md b/docs/en/UI/AspNetCore/JavaScript-API/Features.md new file mode 100644 index 0000000000..e3cd2be445 --- /dev/null +++ b/docs/en/UI/AspNetCore/JavaScript-API/Features.md @@ -0,0 +1,15 @@ +# ASP.NET Core MVC / Razor Pages UI: JavaScript Features API + +`abp.features` API allows you to check features or get the values of the features on the client side. You can read the current value of a feature in the client side only if it is allowed by the feature definition (on the server side). + +> This document only explains the JavaScript API. See the [Features](../../../Features.md) document to understand the ABP Features system. + +## Basic Usage + +`abp.features.values` can be used to access to the all feature values. + +````js +var excelExportFeatureValue = abp.features.values["ExportingToExcel"]; +```` + +Then you can check the value of the feature to perform your logic. \ No newline at end of file diff --git a/docs/en/UI/AspNetCore/JavaScript-API/Index.md b/docs/en/UI/AspNetCore/JavaScript-API/Index.md index 9f584eacfb..3473140392 100644 --- a/docs/en/UI/AspNetCore/JavaScript-API/Index.md +++ b/docs/en/UI/AspNetCore/JavaScript-API/Index.md @@ -1,23 +1,19 @@ # JavaScript API -ABP provides some JavaScript APIs for ASP.NET Core MVC / Razor Pages applications. They can be used to perform some common application requirements in the client side. +ABP provides a set of JavaScript APIs for ASP.NET Core MVC / Razor Pages applications. They can be used to perform common application requirements easily in the client side and integrate to the server side. ## APIs -* abp.ajax -* abp.auth -* abp.currentUser -* abp.dom -* abp.event -* abp.features -* abp.localization -* abp.log -* abp.ModalManager -* abp.notify -* abp.security -* abp.setting -* abp.ui -* abp.utils -* abp.ResourceLoader -* abp.WidgetManager -* Other APIs \ No newline at end of file +* [AJAX](Ajax.md) +* [Auth](Auth.md) +* [CurrentUser](CurrentUser.md) +* [DOM](DOM.md) +* [Events](Events.md) +* [Features](Features.md) +* [Localization](Localization.md) +* [Logging](Logging.md) +* [ResourceLoader](ResourceLoader.md) +* [Settings](Settings.md) +* [UI Block/Busy](Block-Busy.md) +* [UI Message](Message.md) +* [UI Notification](Notify.md) \ No newline at end of file diff --git a/docs/en/UI/AspNetCore/JavaScript-API/Localization.md b/docs/en/UI/AspNetCore/JavaScript-API/Localization.md new file mode 100644 index 0000000000..0897b99268 --- /dev/null +++ b/docs/en/UI/AspNetCore/JavaScript-API/Localization.md @@ -0,0 +1,143 @@ +# ASP.NET Core MVC / Razor Pages UI: JavaScript Localization API + +Localization API allows you to reuse the server side localization resources in the client side. + +> This document only explains the JavaScript API. See the [localization document](../../../Localization.md) to understand the ABP localization system. + +## Basic Usage + +`abp.localization.getResource(...)` function is used to get a localization resource: + +````js +var testResource = abp.localization.getResource('Test'); +```` + +Then you can localize a string based on this resource: + +````js +var str = testResource('HelloWorld'); +```` + +`abp.localization.localize(...)` function is a shortcut where you can both specify the text name and the resource name: + +````js +var str = abp.localization.localize('HelloWorld', 'Test'); +```` + +`HelloWorld` is the text to localize, where `Test` is the localization resource name here. + +### Fallback Logic + +If given texts was not localized, localization method returns the given key as the localization result. + +### Default Localization Resource + +If you don't specify the localization resource name, it uses the **default localization resource** defined on the `AbpLocalizationOptions` (see the [localization document](../../../Localization.md)). + +**Example: Using the default localization resource** + +````js +var str = abp.localization.localize('HelloWorld'); //uses the default resource +```` + +### Format Arguments + +If your localized string contains arguments, like `Hello {0}, welcome!`, you can pass arguments to the localization methods. Examples: + +````js +var testSource = abp.localization.getResource('Test'); +var str1 = testSource('HelloWelcomeMessage', 'John'); +var str2 = abp.localization.localize('HelloWelcomeMessage', 'Test', 'John'); +```` + +Assuming the `HelloWelcomeMessage` is localized as `Hello {0}, welcome!`, both of the samples above produce the output `Hello John, welcome!`. + +## Other Properties & Methods + +### abp.localization.values + +`abp.localization.values` property stores all the localization resources, keys and their values. + +### abp.localization.isLocalized + +Returns a boolean indicating that if the given text was localized or not. + +**Example** + +````js +abp.localization.isLocalized('ProductName', 'MyResource'); +```` + +Returns `true` if the `ProductName` text was localized for the `MyResource` resource. Otherwise, returns `false`. You can leave the resource name empty to use the default localization resource. + +### abp.localization.defaultResourceName + +`abp.localization.defaultResourceName` can be set to change the default localization resource. You normally don't set this since the ABP Framework automatically sets is based on the server side configuration. + +### abp.localization.currentCulture + +`abp.localization.currentCulture` returns an object to get information about the **currently selected language**. + +An example value of this object is shown below: + +````js +{ + "displayName": "English", + "englishName": "English", + "threeLetterIsoLanguageName": "eng", + "twoLetterIsoLanguageName": "en", + "isRightToLeft": false, + "cultureName": "en", + "name": "en", + "nativeName": "English", + "dateTimeFormat": { + "calendarAlgorithmType": "SolarCalendar", + "dateTimeFormatLong": "dddd, MMMM d, yyyy", + "shortDatePattern": "M/d/yyyy", + "fullDateTimePattern": "dddd, MMMM d, yyyy h:mm:ss tt", + "dateSeparator": "/", + "shortTimePattern": "h:mm tt", + "longTimePattern": "h:mm:ss tt" + } +} +```` + +### abp.localization.languages + +Used to get list of all **available languages** in the application. An example value of this object is shown below: + +````js +[ + { + "cultureName": "en", + "uiCultureName": "en", + "displayName": "English", + "flagIcon": null + }, + { + "cultureName": "fr", + "uiCultureName": "fr", + "displayName": "Français", + "flagIcon": null + }, + { + "cultureName": "pt-BR", + "uiCultureName": "pt-BR", + "displayName": "Português", + "flagIcon": null + }, + { + "cultureName": "tr", + "uiCultureName": "tr", + "displayName": "Türkçe", + "flagIcon": null + }, + { + "cultureName": "zh-Hans", + "uiCultureName": "zh-Hans", + "displayName": "简体中文", + "flagIcon": null + } +] +```` + diff --git a/docs/en/UI/AspNetCore/JavaScript-API/Logging.md b/docs/en/UI/AspNetCore/JavaScript-API/Logging.md new file mode 100644 index 0000000000..a46203b019 --- /dev/null +++ b/docs/en/UI/AspNetCore/JavaScript-API/Logging.md @@ -0,0 +1,50 @@ +# ASP.NET Core MVC / Razor Pages UI: JavaScript Logging API + +`abp.log` API is used to write simple logs in the client side. + +> The logs are written to console, using the `console.log`, by default. + +> This document is for simple client side logging. See the [Logging](../../../Logging.md) document for server side logging system. + +## Basic Usage + +Use one of the `abp.log.xxx(...)` methods based on the severity of your log message. + +````js +abp.log.debug("Some debug log here..."); //Logging a simple debug message +abp.log.info({ name: "john", age: 42 }); //Logging an object as an information log +abp.log.warn("A warning message"); //Logging a warning message +abp.log.error('An error happens...'); //Error message +abp.log.fatal('Network connection has gone away!'); //Fatal error +```` + +## Log Levels + +There are 5 levels for a log message: + +* DEBUG = 1 +* INFO = 2 +* WARN = 3 +* ERROR = 4 +* FATAL = 5 + +These are defined in the `abp.log.levels` object (like `abp.log.levels.WARN`). + +### Changing the Current Log Level + +You can control the log level as shown below: + +````js +abp.log.level = abp.log.levels.WARN; +```` + +Default log level is `DEBUG`. + +### Logging with Specifying the Level + +Instead of calling `abp.log.info(...)` function, you can use the `abp.log.log` by specifying the log level as a parameter: + +````js +abp.log.log("log message...", abp.log.levels.INFO); +```` + diff --git a/docs/en/UI/AspNetCore/JavaScript-API/Message.md b/docs/en/UI/AspNetCore/JavaScript-API/Message.md new file mode 100644 index 0000000000..68c74914c6 --- /dev/null +++ b/docs/en/UI/AspNetCore/JavaScript-API/Message.md @@ -0,0 +1,128 @@ +# ASP.NET Core MVC / Razor Pages UI: JavaScript Message API + +Message API is used to show nice looking messages to the user as a blocking dialog. Message API is an abstraction provided by the ABP Framework and implemented using the [SweetAlert2](https://sweetalert2.github.io/) library by default. + +## Quick Example + +Use `abp.message.success(...)` function to show a success message: + +````js +abp.message.success('Your changes have been successfully saved!', 'Congratulations'); +```` + +It will show a dialog on the UI: + +![js-message-success](../../../images/js-message-success.png) + +## Informative Messages + +There are four types of informative message functions: + +* `abp.message.info(...)` +* `abp.message.success(...)` +* `abp.message.warn(...)` +* `abp.message.error(...)` + +All these methods get two parameters: + +* `message`: The message (`string`) to be shown. +* `title`: An optional (`string`) title. + +**Example: Show an error message** + +````js +abp.message.error('Your credit card number is not valid!'); +```` + +![js-message-error](../../../images/js-message-error.png) + +## Confirmation Message + +`abp.message.confirm(...)` function can be used to get a confirmation from the user. + +**Example** + +Use the following code to get a confirmation result from the user: + +````js +abp.message.confirm('Are you sure to delete the "admin" role?') +.then(function(confirmed){ + if(confirmed){ + console.log('TODO: deleting the role...'); + } +}); +```` + +The resulting UI will be like shown below: + +![js-message-confirm](../../../images/js-message-confirm.png) + +If user has clicked the `Yes` button, the `confirmed` argument in the `then` callback function will be `true`. + +> "*Are you sure?*" is the default title (localized based on the current language) and you can override it. + +### The Return Value + +The return value of the `abp.message.confirm(...)` function is a promise, so you can chain a `then` callback as shown above. + +### Parameters + +`abp.message.confirm(...)` function has the following parameters: + +* `message`: A message (string) to show to the user. +* `titleOrCallback` (optional): A title or a callback function. If you supply a string, it is shown as the title. If you supply a callback function (that gets a `bool` parameter) then it's called with the result. +* `callback` (optional): If you've passes a title to the second parameter, you can pass your callback function as the 3rd parameter. + +Passing a callback function is an alternative to the `then` callback shown above. + +**Example: Providing all the parameters and getting result with the callback function** + +````js +abp.message.confirm( + 'Are you sure to delete the "admin" role?', + 'Be careful!', + function(confirmed){ + if(confirmed){ + console.log('TODO: deleting the role...'); + } + }); +```` + +## SweetAlert Configuration + +The Message API is implemented using the [SweetAlert2](https://sweetalert2.github.io/) library by default. If you want to change its configuration, you can set the options in the `abp.libs.sweetAlert.config` object. The default configuration object is shown below: + +````js +{ + 'default': { + }, + info: { + icon: 'info' + }, + success: { + icon: 'success' + }, + warn: { + icon: 'warning' + }, + error: { + icon: 'error' + }, + confirm: { + icon: 'warning', + title: 'Are you sure?', + buttons: ['Cancel', 'Yes'] + } +} +```` + +> "Are you sure?", "Cancel" and "Yes" texts are automatically localized based on the current language. + +So, if you want to set the `warn` icon, you can set it like: + +````js +abp.libs.sweetAlert.config.warn.icon = 'error'; +```` + +See the [SweetAlert document](https://sweetalert2.github.io/) for all the configuration options. + diff --git a/docs/en/UI/AspNetCore/JavaScript-API/Notify.md b/docs/en/UI/AspNetCore/JavaScript-API/Notify.md new file mode 100644 index 0000000000..371aa8d4b9 --- /dev/null +++ b/docs/en/UI/AspNetCore/JavaScript-API/Notify.md @@ -0,0 +1,45 @@ +# ASP.NET Core MVC / Razor Pages UI: JavaScript Notify API + +Notify API is used to show toast style, auto disappearing UI notifications to the end user. It is implemented by the [Toastr](https://github.com/CodeSeven/toastr) library by default. + +## Quick Example + +Use `abp.notify.success(...)` function to show a success message: + +````js +abp.notify.success( + 'The product "Acme Atom Re-Arranger" has been successfully deleted.', + 'Deleted the Product' +); +```` + +A notification message is shown at the bottom right of the page: + +![js-message-success](../../../images/js-notify-success.png) + +## Notification Types + +There are four types of pre-defined notifications; + +* `abp.notify.success(...)` +* `abp.notify.info(...)` +* `abp.notify.warn(...)` +* `abp.notify.error(...)` + +All of the methods above gets the following parameters; + +* `message`: A message (`string`) to show to the user. +* `title`: An optional title (`string`). +* `options`: Additional options to be passed to the underlying library, to the Toastr by default. + +## Toastr Configuration + +The notification API is implemented by the [Toastr](https://github.com/CodeSeven/toastr) library by default. You can see its own configuration options. + +**Example: Show toast messages on the top right of the page** + +````js +toastr.options.positionClass = 'toast-top-right'; +```` + +> ABP sets this option to `toast-bottom-right` by default. You can override it just as shown above. \ No newline at end of file diff --git a/docs/en/UI/AspNetCore/JavaScript-API/ResourceLoader.md b/docs/en/UI/AspNetCore/JavaScript-API/ResourceLoader.md new file mode 100644 index 0000000000..10b8c36f59 --- /dev/null +++ b/docs/en/UI/AspNetCore/JavaScript-API/ResourceLoader.md @@ -0,0 +1,40 @@ +# ASP.NET Core MVC / Razor Pages UI: JavaScript Resource Loader API + +`abp.ResourceLoader` is a service that can load a JavaScript or CSS file on demand. It guarantees to load the file only once even if you request multiple times. + +## Loading Script Files + +`abp.ResourceLoader.loadScript(...)` function **loads** a JavaScript file from the server and **executes** it. + +**Example: Load a JavaScript file** + +````js +abp.ResourceLoader.loadScript('/Pages/my-script.js'); +```` + +### Parameters + +`loadScript` function can get three parameters; + +* `url` (required, `string`): The URL of the script file to be loaded. +* `loadCallback` (optional, `function`): A callback function that is called once the script is loaded & executed. In this callback you can safely use the code in the script file. This callback is called even if the file was loaded before. +* `failCallback` (optional, `function`): A callback function that is called if loading the script fails. + +**Example: Provide the `loadCallback` argument** + +````js +abp.ResourceLoader.loadScript('/Pages/my-script.js', function() { + console.log('successfully loaded :)'); +}); +```` + +## Loading Style Files + +`abp.ResourceLoader.loadStyle(...)` function adds a `link` element to the `head` of the document for the given URL, so the CSS file is automatically loaded by the browser. + +**Example: Load a CSS file** + +````js +abp.ResourceLoader.loadStyle('/Pages/my-styles.css'); +```` + diff --git a/docs/en/UI/AspNetCore/JavaScript-API/Settings.md b/docs/en/UI/AspNetCore/JavaScript-API/Settings.md new file mode 100644 index 0000000000..cf96cecdd0 --- /dev/null +++ b/docs/en/UI/AspNetCore/JavaScript-API/Settings.md @@ -0,0 +1,33 @@ +# ASP.NET Core MVC / Razor Pages UI: JavaScript Setting API + +Localization API allows you to get the values of the settings on the client side. You can read the current value of a setting in the client side only if it is allowed by the setting definition (on the server side). + +> This document only explains the JavaScript API. See the [settings document](../../../Settings.md) to understand the ABP setting system. + +## Basic Usage + +````js +//Gets a value as string. +var language = abp.setting.get('Abp.Localization.DefaultLanguage'); + +//Gets an integer value. +var requiredLength = abp.setting.getInt('Abp.Identity.Password.RequiredLength'); + +//Gets a boolean value. +var requireDigit = abp.setting.getBoolean('Abp.Identity.Password.RequireDigit'); +```` + +## All Values + +`abp.setting.values` can be used to obtain all the setting values as an object where the object properties are setting names and property values are the setting values. + +An example value of this object is shown below: + +````js +{ + Abp.Localization.DefaultLanguage: "en", + Abp.Timing.TimeZone: "UTC", + ... +} +```` + diff --git a/docs/en/UI/AspNetCore/Layout-Hooks.md b/docs/en/UI/AspNetCore/Layout-Hooks.md index 49b334c6c0..7039749142 100644 --- a/docs/en/UI/AspNetCore/Layout-Hooks.md +++ b/docs/en/UI/AspNetCore/Layout-Hooks.md @@ -1,3 +1,105 @@ -# Layout Hooks +# ASP.NET Core MVC / Razor Pages Layout Hooks -TODO \ No newline at end of file +ABP Framework theming system places the page layout into the [theme](Theming.md) NuGet packages. That means the final application doesn't include a `Layout.cshtml`, so you can't directly change the layout code to customize it. + +You copy the theme code into your solution. In this case you are completely free to customize it. However, then you won't be able to get automatic updates of the theme (by upgrading the theme NuGet package). + +ABP Framework provides different ways of [customizing the UI](Customization-User-Interface.md). + +The **Layout Hook System** allows you to **add code** at some specific parts of the layout. All layouts of all themes should implement these hooks. Finally, you can add a **view component** into a hook point. + +## Example: Add Google Analytics Script + +Assume that you need to add the Google Analytics script to the layout (that will be available for all the pages). First, **create a view component** in your project: + +![bookstore-google-analytics-view-component](../../images/bookstore-google-analytics-view-component.png) + +**NotificationViewComponent.cs** + +````csharp +public class GoogleAnalyticsViewComponent : AbpViewComponent +{ + public IViewComponentResult Invoke() + { + return View("/Pages/Shared/Components/GoogleAnalytics/Default.cshtml"); + } +} +```` + +**Default.cshtml** + +````html + +```` + +Change `UA-xxxxxx-1` with your own code. + +You can then add this component to any of the hook points in the `ConfigureServices` of your module: + +````csharp +Configure(options => +{ + options.Add( + LayoutHooks.Head.Last, //The hook name + typeof(GoogleAnalyticsViewComponent) //The component to add + ); +}); +```` + +Now, the GA code will be inserted in the `head` of the page as the last item. + +### Specifying the Layout + +The configuration above adds the `GoogleAnalyticsViewComponent` to all layouts. You may want to only add to a specific layout: + +````csharp +Configure(options => +{ + options.Add( + LayoutHooks.Head.Last, + typeof(GoogleAnalyticsViewComponent), + layout: StandardLayouts.Application //Set the layout to add + ); +}); +```` + +See the *Layouts* section below to learn more about the layout system. + +## Layout Hook Points + +There are some pre-defined layout hook points. The `LayoutHooks.Head.Last` used above was one of them. The standard hook points are; + +* `LayoutHooks.Head.First`: Used to add a component as the first item in the HTML head tag. +* `LayoutHooks.Head.Last`: Used to add a component as the last item in the HTML head tag. +* `LayoutHooks.Body.First`: Used to add a component as the first item in the HTML body tag. +* `LayoutHooks.Body.Last`: Used to add a component as the last item in the HTML body tag. +* `LayoutHooks.PageContent.First`: Used to add a component just before the page content (the `@RenderBody()` in the layout). +* `LayoutHooks.PageContent.Last`: Used to add a component just after the page content (the `@RenderBody()` in the layout). + +> You (or the modules you are using) can add **multiple items to the same hook point**. All of them will be added to the layout by the order they were added. + +## Layouts + +Layout system allows themes to define standard, named layouts and allows any page to select a proper layout for its purpose. There are three pre-defined layouts: + +* "**Application**": The main (and the default) layout for an application. It typically contains header, menu (sidebar), footer, toolbar... etc. +* "**Account**": This layout is used by login, register and other similar pages. It is used for the pages under the `/Pages/Account` folder by default. +* "**Empty**": Empty and minimal layout. + +These names are defined in the `StandardLayouts` class as constants. You can definitely create your own layouts, but these are the standard layout names and implemented by all the themes out of the box. + +### Layout Location + +You can find the layout files [here](https://github.com/abpframework/abp/tree/dev/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Layouts) for the basic theme. You can take them as references to build your own layouts or you can override them if necessary. + +## See Also + +* [Customizing the User Interface](Customization-User-Interface.md) \ No newline at end of file diff --git a/docs/en/UI/AspNetCore/Modals.md b/docs/en/UI/AspNetCore/Modals.md new file mode 100644 index 0000000000..9de9542307 --- /dev/null +++ b/docs/en/UI/AspNetCore/Modals.md @@ -0,0 +1,483 @@ +# ASP.NET Core MVC / Razor Pages UI: Modals + +While you can continue to use the standard [Bootstrap way](https://getbootstrap.com/docs/4.5/components/modal/) to create, open and manage modals in your applications, ABP Framework provides a **flexible** way to manage modals by **automating common tasks** for you. + +**Example: A modal dialog to create a new role entity** + +![modal-manager-example-modal](../../images/modal-manager-example-modal.png) + +ABP Framework provides the following benefits for such a modal with a form inside it; + +* **Lazy loads** the modal HTML into the page and **removes** it from the DOM once its closed. This makes easy to consume a reusable modal dialog. Also, every time you open the modal, it will be a fresh new modal, so you don't have to deal with resetting the modal content. +* **Auto-focuses** the first input of the form once the modal has been opened. +* Automatically determines the **form** inside a modal and posts the form via **AJAX** instead of normal page post. +* Automatically checks if the form inside the modal **has changed, but not saved**. It warns the user in this case. +* Automatically **disables the modal buttons** (save & cancel) until the AJAX operation completes. +* Makes it easy to register a **JavaScript object that is initialized** once the modal has loaded. + +So, it makes you write less code when you deal with the modals, especially the modals with a form inside. + +## Basic Usage + +### Creating a Modal as a Razor Page + +To demonstrate the usage, we are creating a simple Razor Page, named `ProductInfoModal.cshtml`, under the `/Pages/Products` folder: + +![modal-page-on-rider](../../images/modal-page-on-rider.png) + +**ProductInfoModal.cshtml Content:** + +````html +@page +@model MyProject.Web.Pages.Products.ProductInfoModalModel +@{ + Layout = null; +} + + + +

@Model.ProductName

+
+ +
+

+ @Model.ProductDescription +

+

+ Reference: https://acme.com/catalog/ +

+
+ +
+```` + +* This page sets the `Layout` to `null` since we will show this as a modal. So, no need to wrap with a layout. +* It uses [abp-modal tag helper](Tag-Helpers/Modals.md) to simplify creating the modal HTML code. You can use the standard Bootstrap modal code if you prefer it. + +**ProductInfoModalModel.cshtml.cs Content:** + +```csharp +using Volo.Abp.AspNetCore.Mvc.UI.RazorPages; + +namespace MyProject.Web.Pages.Products +{ + public class ProductInfoModalModel : AbpPageModel + { + public string ProductName { get; set; } + + public string ProductDescription { get; set; } + + public string ProductImageUrl { get; set; } + + public void OnGet() + { + ProductName = "Acme Indestructo Steel Ball"; + ProductDescription = "The ACME Indestructo Steel Ball is completely indestructible, there is nothing that can destroy it!"; + ProductImageUrl = "https://acme.com/catalog/acmeindestructo.jpg"; + } + } +} +``` + +You can surely get the product info from a database or API. We are setting the properties hard-coded for the sake of simplicity, + +### Defining the Modal Manager + +Once you have a modal, you can open it in any page using some simple **JavaScript** code. + +First, create an `abp.ModalManager` object by setting the `viewUrl`, in the JavaScript file of the page that will use the modal: + +````js +var productInfoModal = new abp.ModalManager({ + viewUrl: '/Products/ProductInfoModal' +}); +```` + +> If you only need to specify the `viewUrl`, you can directly pass it to the `ModalManager` constructor, as a shortcut. Example: `new abp.ModalManager('/Products/ProductInfoModal');` + +### Opening the Modal + +Then open the modal whenever you need: + +````js +productInfoModal.open(); +```` + +You typically want to open the modal when something happens; For example, when the user clicks a button: + +````js +$('#OpenProductInfoModal').click(function(){ + productInfoModal.open(); +}); +```` + +The resulting modal will be like that: + +![modal-example-product-info](../../images/modal-example-product-info.png) + +#### Opening the Modal with Arguments + +When you call the `open()` method, `ModalManager` loads the modal HTML by requesting it from the `viewUrl`. You can pass some **query string parameters** to this URL when you open the modal. + +**Example: Pass the product id while opening the modal** + +````js +productInfoModal.open({ + productId: 42 +}); +```` + +You can add a `productId` parameter to the get method: + +````csharp +using Volo.Abp.AspNetCore.Mvc.UI.RazorPages; + +namespace MyProject.Web.Pages.Products +{ + public class ProductInfoModalModel : AbpPageModel + { + //... + + public async Task OnGetAsync(int productId) //Add productId parameter + { + //TODO: Get the product with database with the given productId + //... + } + } +} +```` + +In this way, you can use the `productId` to query the product from a data source. + +## Modals with Forms + +`abp.ModalManager` handles various common tasks (described in the introduction) when you want to use a form inside the modal. + +### Example Modal with a Form + +This section shows an example form to create a new product. + +#### Creating the Razor Page + +For this example, creating a new Razor Page, named `ProductCreateModal.cshtml`, under the `/Pages/Products` folder: + +![product-create-modal-page-on-rider](../../images/product-create-modal-page-on-rider.png) + +**ProductCreateModal.cshtml Content:** + +````html +@page +@using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Modal +@model MyProject.Web.Pages.Products.ProductCreateModalModel +@{ + Layout = null; +} +
+ + + + + + + + + +
+```` + +* The `abp-modal` has been wrapped by the `form`. This is needed to place the `Save` and the `Cancel` buttons into the form. In this way, the `Save` button acts as the `submit` button for the `form`. +* Used the [abp-input tag helpers](Tag-Helpers/Form-Elements.md) to simplify to create the form elements. Otherwise, you need to write more HTML. + +**ProductCreateModal.cshtml.cs Content:** + +```csharp +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; +using Volo.Abp.AspNetCore.Mvc.UI.RazorPages; + +namespace MyProject.Web.Pages.Products +{ + public class ProductCreateModalModel : AbpPageModel + { + [BindProperty] + public PoductCreationDto Product { get; set; } + + public async Task OnGetAsync() + { + //TODO: Get logic, if available + } + + public async Task OnPostAsync() + { + //TODO: Save the Product... + + return NoContent(); + } + } +} +``` + +* This is a simple `PageModal` class. The `[BindProperty]` make the form binding to the model when you post (submit) the form; The standard ASP.NET Core system. +* `OnPostAsync` returns `NoContent` (this method is defined by the base `AbpPageModel` class). Because we don't need to a return value in the client side, after the form post operation. + +**PoductCreationDto:** + +`ProductCreateModalModel` uses a `PoductCreationDto` class defined as shown below: + +````csharp +using System; +using System.ComponentModel.DataAnnotations; +using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form; + +namespace MyProject.Web.Pages.Products +{ + public class PoductCreationDto + { + [Required] + [StringLength(128)] + public string Name { get; set; } + + [TextArea(Rows = 4)] + [StringLength(2000)] + public string Description { get; set; } + + [DataType(DataType.Date)] + public DateTime ReleaseDate { get; set; } + } +} +```` + +* `abp-input` Tag Helper can understand the data annotation attributes and uses them to shape and validate the form elements. See the [abp-input tag helpers](Tag-Helpers/Form-Elements.md) document to learn more. + +#### Defining the Modal Manager + +Again, create an `abp.ModalManager` object by setting the `viewUrl`, in the JavaScript file of the page that will use the modal: + +````js +var productCreateModal = new abp.ModalManager({ + viewUrl: '/Products/ProductCreateModal' +}); +```` + +#### Opening the Modal + +Then open the modal whenever you need: + +````js +productCreateModal.open(); +```` + +You typically want to open the modal when something happens; For example, when the user clicks a button: + +````js +$('#OpenProductCreateModal').click(function(){ + productCreateModal.open(); +}); +```` + +So, the complete code will be something like that (assuming you have a `button` with `id` is `OpenProductCreateModal` on the view side): + +```js +$(function () { + + var productCreateModal = new abp.ModalManager({ + viewUrl: '/Products/ProductCreateModal' + }); + + $('#OpenProductCreateModal').click(function () { + productCreateModal.open(); + }); + +}); +``` + +The resulting modal will be like that: + +![modal-example-product-create](../../images/modal-example-product-create.png) + +#### Saving the Modal + +When you click to the `Save` button, the form is posted to the server. If the server returns a **success response**, then the `onResult` event is triggered with some arguments including the server response and the modal is automatically closed. + +An example callback that logs the arguments passed to the `onResult` method: + +````js +productCreateModal.onResult(function(){ + console.log(arguments); +}); +```` + +If the server returns a failed response, it shows the error message returned from the server and keeps the modal open. + +> See the *Modal Manager Reference* section below for other modal events. + +#### Canceling the Modal + +If you click to the Cancel button with some changes made but not saved, you get such a warning message: + +![modal-manager-cancel-warning](../../images/modal-manager-cancel-warning.png) + +If you don't want such a check & message, you can add `data-check-form-on-close="false"` attribute to your `form` element. Example: + +````html +
+```` + +### Form Validation + +`ModalManager` automatically triggers the form validation when you click to the `Save` button or hit the `Enter` key on the form: + +![modal-manager-validation](../../images/modal-manager-validation.png) + +See the [Forms & Validation document](Forms-Validation.md) to learn more about the validation. + +## Modals with Script Files + +You may need to perform some logic for your modal. To do that, create a JavaScript file like below: + +````js +abp.modals.ProductInfo = function () { + + function initModal(modalManager, args) { + var $modal = modalManager.getModal(); + var $form = modalManager.getForm(); + + $modal.find('h3').css('color', 'red'); + + console.log('initialized the modal...'); + }; + + return { + initModal: initModal + }; +}; +```` + +* This code simply adds a `ProductInfo` class into the `abp.modals` namespace. The `ProductInfo` class exposes a single public function: `initModal`. +* `initModal` method is called by the `ModalManager` once the modal HTML is inserted to DOM and ready for the initialization logic. +* `modalManager` parameter is the `ModalManager` object related to this modal instance. So, you can use any function on it in your code. See the *ModalManager Reference* section. + +Then include this file to the page that you use the modal: + +````html + + +```` + +* We've use the `abp-script` Tag Helper here. See the [Bundling & Minification](Bundling-Minification.md) document if you want to understand it. You can use the standard `script` tag. It doesn't matter for this case. + +Finally, set the `modalClass` option while creating the `ModalManager` instance: + +````js +var productInfoModal = new abp.ModalManager({ + viewUrl: '/Products/ProductInfoModal', + modalClass: 'ProductInfo' //Matches to the abp.modals.ProductInfo +}); +```` + +### Lazy Loading the Script File + +Instead of adding the `ProductInfoModal.js` to the page you use the modal, you can configure it to lazy load the script file when the first time the modal is opened. + +Example: + +````js +var productInfoModal = new abp.ModalManager({ + viewUrl: '/Products/ProductInfoModal', + scriptUrl: '/Pages/Products/ProductInfoModal.js', //Lazy Load URL + modalClass: 'ProductInfo' +}); +```` + +* `scriptUrl` is used to set the URL to load the script file of the modal. +* In this case, you no longer need to include the `ProductInfoModal.js` to the page. It will be loaded on demand. + +#### Tip: Bundling & Minification + +While lazy loading seems cool at the beginning, it requires an additional call to the server when you first open the modal. + +Instead, you can use the [Bundling & Minification](Bundling-Minification.md) system to create a bundle (that is a single and minified file on production) for all the used script files for a page: + +````html + + + + +```` + +This is efficient if the script file is not large and frequently opened while users use the page. + +Alternatively, you can define the `abp.modals.ProductInfo` class in the page's main JavaScript file if the modal is only and always used in the same page. In this case, you don't need to another external script file at all. + +## ModalManager Reference + +### Options + +Options can be passed when you create a new `ModalManager` object: + +````js +var productInfoModal = new abp.ModalManager({ + viewUrl: '/Products/ProductInfoModal', + //...other options +}); +```` + +Here, the list of all available options; + +* `viewUrl` (required, `string`): The URL to lazy load the HTML of the modal. +* `scriptUrl` (optional, `string`): A URL to lazy load a JavaScript file. It is loaded only once, when the modal first opened. +* `modalClass` (optional, `string`): A JavaScript class defined in the `abp.modals` namespace that can be used to execute code related to the modal. + +### Functions + +When you create a new `ModalManager` object, you can use its functions to perform operations on the modal. Example: + +````js +var myModal = new abp.ModalManager({ + //...options +}); + +//Open the modal +myModal.open(); + +//Close the modal +myModal.close(); +```` + +Here, the list of all available functions of the `ModalManager` object; + +* `open([args])`: Opens the modal dialog. It can get an `args` object that is converted to query string while getting the `viewUrl` from the server. For example, if `args` is `{ productId: 42 }`, then the `ModalManager` passes `?productId=42` to the end of the `viewUrl` while loading the view from the server. +* `reopen()`: Opens the modal with the latest provided `args` for the `open()` method. So, it is a shortcut if you want to re-open the modal with the same `args`. +* `close()`: Closes the modal. The modal HTML is automatically removed from DOM once it has been closed. +* `getModalId()`: Gets the `id` attribute of the container that contains the view returned from the server. This is a unique id per modal and it doesn't change after you create the `ModalManager`. +* `getModal()`: Returns the modal wrapper DOM element (the HTML element with the `modal` CSS class) as a JQuery selection, so you can perform any JQuery method on it. +* `getForm()`: Returns the `form` HTML element as a JQuery selection, so you can perform any JQuery method on it. It returns `null` if the modal has no form inside it. +* `getArgs()` Gets the latest arguments object provided while opening the modal. +* `getOptions()`: Gets the options object passed to the `ModalManager` constructor. +* `setResult(...)`: Triggers the `onResult` event with the provided arguments. You can pass zero or more arguments those are directly passed to the `onResult` event. This function is generally called by the modal script to notify the page that uses the modal. + +### Events + +When you create a new `ModalManager` object, you can use its functions register to events of the modal. Examples: + +````js +var myModal = new abp.ModalManager({ + //...options +}); + +myModal.onOpen(function () { + console.log('opened the modal...'); +}); + +myModal.onClose(function () { + console.log('closed the modal...'); +}); +```` + +Here, the list of all available functions to register to events of the `ModalManager` object; + +* `onOpen(callback)`: Registers a callback function to get notified once the modal is opened. It is triggered when the modal is completely visible on the UI. +* `onClose(callback)`: Registers a callback function to get notified once the modal is closed. It is triggered when the modal is completely invisible on the UI. +* `onResult(callback)`: Registers a callback function that is triggered when the ``setResult(...)` method is called. All the parameters sent to the `setResult` method is passed to the callback. \ No newline at end of file diff --git a/docs/en/UI/AspNetCore/Tag-Helpers/Badges.md b/docs/en/UI/AspNetCore/Tag-Helpers/Badges.md index 66727cc112..c627273062 100644 --- a/docs/en/UI/AspNetCore/Tag-Helpers/Badges.md +++ b/docs/en/UI/AspNetCore/Tag-Helpers/Badges.md @@ -2,11 +2,11 @@ ## Introduction -`abp-badge` and `abp-badge-pill` are abp tags for badges. +`abp-badge` and `abp-badge-pill` are ABP Tag Helper attributes for `a` and `span` html tags. Basic usage: -````csharp +````html Primary Info Danger @@ -22,8 +22,7 @@ See the [badges demo page](https://bootstrap-taghelpers.abp.io/Components/Badges * Indicates the type of the badge. Should be one of the following values: - * `_` (default value) - * `Default` (default value) + * `Default` * `Primary` * `Secondary` * `Success` @@ -35,6 +34,7 @@ See the [badges demo page](https://bootstrap-taghelpers.abp.io/Components/Badges Example: -````csharp +````html Danger ```` + diff --git a/docs/en/UI/AspNetCore/Tag-Helpers/Blockquote.md b/docs/en/UI/AspNetCore/Tag-Helpers/Blockquote.md new file mode 100644 index 0000000000..a63187aeb3 --- /dev/null +++ b/docs/en/UI/AspNetCore/Tag-Helpers/Blockquote.md @@ -0,0 +1,18 @@ +# Blockquote + +`abp-blockquote` is the main container for blockquote items. + +Basic usages: + +````html + +

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.

+
+ + +

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.

+
Someone famous in Source Title
+
+```` + +It adds `blockquote` class to main container, also adds `blockquote-footer` class to inner `footer` element and `mb-0` class to inner `p` element. \ No newline at end of file diff --git a/docs/en/UI/AspNetCore/Tag-Helpers/Borders.md b/docs/en/UI/AspNetCore/Tag-Helpers/Borders.md index 1dc070e8ad..e1d98ac7d8 100644 --- a/docs/en/UI/AspNetCore/Tag-Helpers/Borders.md +++ b/docs/en/UI/AspNetCore/Tag-Helpers/Borders.md @@ -2,11 +2,11 @@ ## Introduction -`abp-border` is a main element for border styling. +`abp-border` is ABP Tag Helper attribute for border styling. Basic usage: -````csharp +````html @@ -124,3 +124,5 @@ A value indicates type, position and the color of the border. Should be one of t * `Bottom_Light_0` * `Bottom_Dark_0` * `Bottom_White_0` + +(Values with `_0` at the end is for [Subtractive](https://getbootstrap.com/docs/4.0/utilities/borders/#subtractive) usages) \ No newline at end of file diff --git a/docs/en/UI/AspNetCore/Tag-Helpers/Breadcrumbs.md b/docs/en/UI/AspNetCore/Tag-Helpers/Breadcrumbs.md index 59332cf8de..b7082696c5 100644 --- a/docs/en/UI/AspNetCore/Tag-Helpers/Breadcrumbs.md +++ b/docs/en/UI/AspNetCore/Tag-Helpers/Breadcrumbs.md @@ -6,7 +6,7 @@ Basic usage: -````csharp +````html diff --git a/docs/en/UI/AspNetCore/Tag-Helpers/Button-groups.md b/docs/en/UI/AspNetCore/Tag-Helpers/Button-groups.md index 93865e0d74..bfd558f89e 100644 --- a/docs/en/UI/AspNetCore/Tag-Helpers/Button-groups.md +++ b/docs/en/UI/AspNetCore/Tag-Helpers/Button-groups.md @@ -6,7 +6,7 @@ Basic usage: -````csharp +````html Left Middle diff --git a/docs/en/UI/AspNetCore/Tag-Helpers/Carousel.md b/docs/en/UI/AspNetCore/Tag-Helpers/Carousel.md index 6088977068..3b91087838 100644 --- a/docs/en/UI/AspNetCore/Tag-Helpers/Carousel.md +++ b/docs/en/UI/AspNetCore/Tag-Helpers/Carousel.md @@ -6,7 +6,7 @@ Basic usage: -````csharp +````html diff --git a/docs/en/UI/AspNetCore/Tag-Helpers/Collapse.md b/docs/en/UI/AspNetCore/Tag-Helpers/Collapse.md index 38fab4d44b..dfbe8ea248 100644 --- a/docs/en/UI/AspNetCore/Tag-Helpers/Collapse.md +++ b/docs/en/UI/AspNetCore/Tag-Helpers/Collapse.md @@ -6,7 +6,7 @@ Basic usage: -````xml +````html Link with href diff --git a/docs/en/UI/AspNetCore/Tag-Helpers/Figure.md b/docs/en/UI/AspNetCore/Tag-Helpers/Figure.md new file mode 100644 index 0000000000..e3b0e0d0a4 --- /dev/null +++ b/docs/en/UI/AspNetCore/Tag-Helpers/Figure.md @@ -0,0 +1,14 @@ +# Figures + +`abp-figure` is the main container for bootstrap figure items. + +Basic usage: + +````html + + + A caption for the above image. + +```` + +It adds `figure` class to main container, also adds `figure-img` class to inner `abp-image` element and `figure-caption` class to inner `abp-figcaption` element. \ No newline at end of file diff --git a/docs/en/UI/AspNetCore/Tag-Helpers/Index.md b/docs/en/UI/AspNetCore/Tag-Helpers/Index.md index 229460de92..54c37af688 100644 --- a/docs/en/UI/AspNetCore/Tag-Helpers/Index.md +++ b/docs/en/UI/AspNetCore/Tag-Helpers/Index.md @@ -13,19 +13,26 @@ ABP Framework also adds some **useful features** to the standard bootstrap compo Here, the list of components those are wrapped by the ABP Framework: * [Alerts](Alerts.md) +* [Badges](Badges.md)) +* [Blockquote](Blockquote.md) +* [Borders](Borders.md) +* [Breadcrumb](Breadcrumb.md) * [Buttons](Buttons.md) * [Cards](Cards.md) +* [Carousel](Carousel.md) * [Collapse](Collapse.md) * [Dropdowns](Dropdowns.md) +* [Figures](Figure.md) * [Grids](Grids.md) * [List Groups](List-Groups.md) * [Modals](Modals.md) +* [Navigation](Navs.md) * [Paginator](Paginator.md) * [Popovers](Popovers.md) * [Progress Bars](Progress-Bars.md) +* [Tables](Tables.md) * [Tabs](Tabs.md) * [Tooltips](Tooltips.md) -* ... > Until all the tag helpers are documented, you can visit https://bootstrap-taghelpers.abp.io/ to see them with live samples. diff --git a/docs/en/UI/AspNetCore/Tag-Helpers/Modals.md b/docs/en/UI/AspNetCore/Tag-Helpers/Modals.md index 9cf1258373..c811dee0bc 100644 --- a/docs/en/UI/AspNetCore/Tag-Helpers/Modals.md +++ b/docs/en/UI/AspNetCore/Tag-Helpers/Modals.md @@ -1,5 +1,7 @@ # Modals +> This document explains the details of the `abp-modal` Tag Helper, which simplifies to build the HTML markup for a modal dialog. Read [that documentation](../Modals.md) to learn how to work with modals. + ## Introduction `abp-modal` is a main element to create a modal. @@ -18,8 +20,6 @@ Basic usage: ```` - - ## Demo See the [modals demo page](https://bootstrap-taghelpers.abp.io/Components/Modals) to see it in action. diff --git a/docs/en/UI/AspNetCore/Tag-Helpers/Navs.md b/docs/en/UI/AspNetCore/Tag-Helpers/Navs.md index c7503fa51d..9c8347b831 100644 --- a/docs/en/UI/AspNetCore/Tag-Helpers/Navs.md +++ b/docs/en/UI/AspNetCore/Tag-Helpers/Navs.md @@ -6,7 +6,7 @@ Basic usage: -````csharp +````html Active @@ -78,7 +78,7 @@ See the [navs demo page](https://bootstrap-taghelpers.abp.io/Components/Navs) to Example: -````csharp +````html Navbar diff --git a/docs/en/UI/AspNetCore/Tag-Helpers/Paginator.md b/docs/en/UI/AspNetCore/Tag-Helpers/Paginator.md index 9969bcf3cc..c30e68eed9 100644 --- a/docs/en/UI/AspNetCore/Tag-Helpers/Paginator.md +++ b/docs/en/UI/AspNetCore/Tag-Helpers/Paginator.md @@ -12,7 +12,7 @@ Basic usage: Model: -````xml +````csharp using Microsoft.AspNetCore.Mvc.RazorPages; using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Pagination; diff --git a/docs/en/UI/AspNetCore/Tag-Helpers/Tables.md b/docs/en/UI/AspNetCore/Tag-Helpers/Tables.md index 50e6c3baf9..db30db6a09 100644 --- a/docs/en/UI/AspNetCore/Tag-Helpers/Tables.md +++ b/docs/en/UI/AspNetCore/Tag-Helpers/Tables.md @@ -6,7 +6,7 @@ Basic usage: -````csharp +````html diff --git a/docs/en/UI/Blazor/Localization.md b/docs/en/UI/Blazor/Localization.md new file mode 100644 index 0000000000..e6cf761ce3 --- /dev/null +++ b/docs/en/UI/Blazor/Localization.md @@ -0,0 +1,3 @@ +# Blazor UI: Localization + +Blazor applications can reuse the same `IStringLocalizer` service that is explained in the [localization document](../../Localization.md). All the localization resources and texts available in the server side are usable in the Blazor application. \ No newline at end of file diff --git a/docs/en/UI/Blazor/Settings.md b/docs/en/UI/Blazor/Settings.md new file mode 100644 index 0000000000..276462c411 --- /dev/null +++ b/docs/en/UI/Blazor/Settings.md @@ -0,0 +1,3 @@ +# Blazor UI: Settings + +Blazor applications can reuse the same `ISettingProvider` service that is explained in the [settings document](../../Settings.md). \ No newline at end of file diff --git a/docs/en/docs-nav.json b/docs/en/docs-nav.json index 7531d4e9f1..2409bbc4fc 100644 --- a/docs/en/docs-nav.json +++ b/docs/en/docs-nav.json @@ -99,11 +99,15 @@ "path": "CLI.md" }, { - "text": "Authentication", + "text": "Authentication & Security", "items": [ { "text": "Social/External Logins", "path": "Authentication/Social-External-Logins.md" + }, + { + "text": "CSRF/XSRF & Anti Forgery", + "path": "CSRF-Anti-Forgery.md" } ] }, @@ -212,6 +216,10 @@ { "text": "Kafka Integration", "path": "Distributed-Event-Bus-Kafka-Integration.md" + }, + { + "text": "Rebus Integration", + "path": "Distributed-Event-Bus-Rebus-Integration.md" } ] } @@ -394,13 +402,17 @@ { "text": "ASP.NET Core MVC / Razor Pages", "items": [ + { + "text": "Navigation / Menus", + "path": "UI/AspNetCore/Navigation-Menu.md" + }, { "text": "Forms & Validation", "path": "UI/AspNetCore/Forms-Validation.md" }, { - "text": "Navigation / Menus", - "path": "UI/AspNetCore/Navigation-Menu.md" + "text": "Modals", + "path": "UI/AspNetCore/Modals.md" }, { "text": "Page Alerts", @@ -432,10 +444,75 @@ "text": "Widgets", "path": "UI/AspNetCore/Widgets.md" }, + { + "text": "Layout Hooks", + "path": "UI/AspNetCore/Layout-Hooks.md" + }, { "text": "Theming", "path": "UI/AspNetCore/Theming.md" }, + { + "text": "JavaScript API", + "items": [ + { + "text": "Overall", + "path": "UI/AspNetCore/JavaScript-API/Index.md" + }, + { + "text": "Localization", + "path": "UI/AspNetCore/JavaScript-API/Localization.md" + }, + { + "text": "Auth", + "path": "UI/AspNetCore/JavaScript-API/Auth.md" + }, + { + "text": "Current User", + "path": "UI/AspNetCore/JavaScript-API/CurrentUser.md" + }, + { + "text": "Settings", + "path": "UI/AspNetCore/JavaScript-API/Settings.md" + }, + { + "text": "Features", + "path": "UI/AspNetCore/JavaScript-API/Features.md" + }, + { + "text": "AJAX", + "path": "UI/AspNetCore/JavaScript-API/Ajax.md" + }, + { + "text": "Message", + "path": "UI/AspNetCore/JavaScript-API/Message.md" + }, + { + "text": "Notify", + "path": "UI/AspNetCore/JavaScript-API/Notify.md" + }, + { + "text": "Block/Busy", + "path": "UI/AspNetCore/JavaScript-API/Block-Busy.md" + }, + { + "text": "Events", + "path": "UI/AspNetCore/JavaScript-API/Events.md" + }, + { + "text": "DOM", + "path": "UI/AspNetCore/JavaScript-API/DOM.md" + }, + { + "text": "Logging", + "path": "UI/AspNetCore/JavaScript-API/Logging.md" + }, + { + "text": "Resource Loader", + "path": "UI/AspNetCore/JavaScript-API/ResourceLoader.md" + } + ] + }, { "text": "Customize/Extend the UI", "path": "UI/AspNetCore/Customization-User-Interface.md" diff --git a/docs/en/images/ajax-error.png b/docs/en/images/ajax-error.png new file mode 100644 index 0000000000..2b9bc2bb37 Binary files /dev/null and b/docs/en/images/ajax-error.png differ diff --git a/docs/en/images/js-message-confirm.png b/docs/en/images/js-message-confirm.png new file mode 100644 index 0000000000..876ae8d98e Binary files /dev/null and b/docs/en/images/js-message-confirm.png differ diff --git a/docs/en/images/js-message-error.png b/docs/en/images/js-message-error.png new file mode 100644 index 0000000000..fd8abb1d7e Binary files /dev/null and b/docs/en/images/js-message-error.png differ diff --git a/docs/en/images/js-message-success.png b/docs/en/images/js-message-success.png new file mode 100644 index 0000000000..bbf418a37c Binary files /dev/null and b/docs/en/images/js-message-success.png differ diff --git a/docs/en/images/js-notify-success.png b/docs/en/images/js-notify-success.png new file mode 100644 index 0000000000..04489bc7ce Binary files /dev/null and b/docs/en/images/js-notify-success.png differ diff --git a/docs/en/images/modal-example-product-create.png b/docs/en/images/modal-example-product-create.png new file mode 100644 index 0000000000..89ea0226ef Binary files /dev/null and b/docs/en/images/modal-example-product-create.png differ diff --git a/docs/en/images/modal-example-product-info.png b/docs/en/images/modal-example-product-info.png new file mode 100644 index 0000000000..5d037c1125 Binary files /dev/null and b/docs/en/images/modal-example-product-info.png differ diff --git a/docs/en/images/modal-manager-cancel-warning.png b/docs/en/images/modal-manager-cancel-warning.png new file mode 100644 index 0000000000..fc00902e0f Binary files /dev/null and b/docs/en/images/modal-manager-cancel-warning.png differ diff --git a/docs/en/images/modal-manager-example-modal.png b/docs/en/images/modal-manager-example-modal.png new file mode 100644 index 0000000000..867c6d410e Binary files /dev/null and b/docs/en/images/modal-manager-example-modal.png differ diff --git a/docs/en/images/modal-manager-validation.png b/docs/en/images/modal-manager-validation.png new file mode 100644 index 0000000000..516a178e66 Binary files /dev/null and b/docs/en/images/modal-manager-validation.png differ diff --git a/docs/en/images/modal-page-on-rider.png b/docs/en/images/modal-page-on-rider.png new file mode 100644 index 0000000000..522885489d Binary files /dev/null and b/docs/en/images/modal-page-on-rider.png differ diff --git a/docs/en/images/product-create-modal-page-on-rider.png b/docs/en/images/product-create-modal-page-on-rider.png new file mode 100644 index 0000000000..01cf93eaf0 Binary files /dev/null and b/docs/en/images/product-create-modal-page-on-rider.png differ diff --git a/docs/en/images/ui-busy.png b/docs/en/images/ui-busy.png new file mode 100644 index 0000000000..63a1d7d74a Binary files /dev/null and b/docs/en/images/ui-busy.png differ diff --git a/docs/zh-Hans/Distributed-Event-Bus-Rebus-Integration.md b/docs/zh-Hans/Distributed-Event-Bus-Rebus-Integration.md new file mode 100644 index 0000000000..409b935ace --- /dev/null +++ b/docs/zh-Hans/Distributed-Event-Bus-Rebus-Integration.md @@ -0,0 +1,63 @@ +# 分布式事件总线Rebus集成 + +> 本文解释了**如何配置[Rebus](http://mookid.dk/category/rebus/)**做为分布式总线提供程序. 参阅[分布式事件总线文档](Distributed-Event-Bus.md)了解如何使用分布式事件总线系统. + +## 安装 + +使用ABP CLI添加[Volo.Abp.EventBus.Rebus[Volo.Abp.EventBus.Rebus](https://www.nuget.org/packages/Volo.Abp.EventBus.Rebus)NuGet包到你的项目: + +* 安装[ABP CLI](https://docs.abp.io/en/abp/latest/CLI),如果你还没有安装. +* 在你想要安装 `Volo.Abp.EventBus.Rebus` 包的 `.csproj` 文件目录打开命令行(终端). +* 运行 `abp add-package Volo.Abp.EventBus.Rebus` 命令. + +如果你想要手动安装,安装[Volo.Abp.EventBus.Rebus](https://www.nuget.org/packages/Volo.Abp.EventBus.Rebus) NuGet 包到你的项目然后添加 `[DependsOn(typeof(AbpEventBusRebusModule))]` 到你的项目[模块](Module-Development-Basics.md)类. + +## 配置 + +可以使用配置使用标准的[配置系统](Configuration.md),如[选项](Options.md)类. + +`AbpRebusEventBusOptions` 类用于配置事件总线选项. + +你可以在你的[模块](Module-Development-Basics.md)的 `PreConfigureServices` 方法配置选项. + +**示例: 最小化配置** + +```csharp +PreConfigure(options => +{ + options.InputQueueName = "eventbus"; +}); +``` + +Rebus 有很多选项,你可以使用 `AbpRebusEventBusOptions` 的 `Configurer` 属性来配置. + +默认事件**存储在内存中**. 参阅[rebus文档](https://github.com/rebus-org/Rebus/wiki/Transport)了解更多信息. + +**示例: 配置存储** + +````csharp +PreConfigure(options => +{ + options.InputQueueName = "eventbus"; + options.Configurer = rebusConfigurer => + { + rebusConfigurer.Transport(t => t.UseMsmq("eventbus")); + rebusConfigurer.Subscriptions(s => s.UseJsonFile(@"subscriptions.json")); + }; +}); +```` + +你可以使用 `AbpRebusEventBusOptions` 的 `Publish` 属性来更改发布方法. + +**示例: 配置事件发布** + +````csharp +PreConfigure(options => +{ + options.InputQueueName = "eventbus"; + options.Publish = async (bus, type, data) => + { + await bus.Publish(data); + }; +}); +```` diff --git a/docs/zh-Hans/Distributed-Event-Bus.md b/docs/zh-Hans/Distributed-Event-Bus.md index 68b7466f8a..4b4203911b 100644 --- a/docs/zh-Hans/Distributed-Event-Bus.md +++ b/docs/zh-Hans/Distributed-Event-Bus.md @@ -9,6 +9,7 @@ * `LocalDistributedEventBus` 是默认实现,实现作为进程内工作的分布式事件总线. 是的!如果没有配置真正的分布式提供程序,**默认实现的工作方式与[本地事件总线](Local-Event-Bus.md)一样**. * `RabbitMqDistributedEventBus` 通过[RabbitMQ](https://www.rabbitmq.com/)实现分布式事件总线. 请参阅[RabbitMQ集成文档](Distributed-Event-Bus-RabbitMQ-Integration.md)了解如何配置它. * `KafkaDistributedEventBus` 通过[Kafka](https://kafka.apache.org/)实现分布式事件总线. 请参阅[Kafka集成文档](Distributed-Event-Bus-Kafka-Integration.md)了解如何配置它. +* `RebusDistributedEventBus` 通过[Rebus](http://mookid.dk/category/rebus/)实现分布式事件总线. 请参阅[Rebus集成文档](Distributed-Event-Bus-Rebus-Integration.md)了解如何配置它. 使用本地事件总线作为默认具有一些重要的优点. 最重要的是:它允许你编写与分布式体系结构兼容的代码. 您现在可以编写一个整体应用程序,以后可以拆分成微服务. 最好通过分布式事件而不是本地事件在边界上下文之间(或在应用程序模块之间)进行通信. diff --git a/docs/zh-Hans/UI/AspNetCore/Customization-User-Interface.md b/docs/zh-Hans/UI/AspNetCore/Customization-User-Interface.md index 7daf6c5d4b..c94c29d27f 100644 --- a/docs/zh-Hans/UI/AspNetCore/Customization-User-Interface.md +++ b/docs/zh-Hans/UI/AspNetCore/Customization-User-Interface.md @@ -70,7 +70,7 @@ namespace Acme.BookStore.Web.Pages.Identity.Users 在这种情况下; -1. 像上面描述过的那术重写C#页面模型类,但不需要替换已存在的页面模型类. +1. 像上面描述过的那样重写C#页面模型类,但不需要替换已存在的页面模型类. 2. 像上面描述过的那样重写Razor页面,并且更改@model指向新的页面模型 #### 示例 diff --git a/docs/zh-Hans/docs-nav.json b/docs/zh-Hans/docs-nav.json index 5df3376507..9582711400 100644 --- a/docs/zh-Hans/docs-nav.json +++ b/docs/zh-Hans/docs-nav.json @@ -12,7 +12,7 @@ "path": "Startup-Templates/Console.md" }, { - "text": "空Web应用程序t", + "text": "空Web应用程序", "path": "Getting-Started-AspNetCore-Application.md" } ] @@ -175,6 +175,10 @@ { "text": "Kafka 集成", "path": "Distributed-Event-Bus-Kafka-Integration.md" + }, + { + "text": "Rebus 集成", + "path": "Distributed-Event-Bus-Rebus-Integration.md" } ] } diff --git a/framework/Volo.Abp.sln b/framework/Volo.Abp.sln index c64adcbb0f..50320b645f 100644 --- a/framework/Volo.Abp.sln +++ b/framework/Volo.Abp.sln @@ -319,33 +319,35 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.BlobStoring.Aliyun EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.BlobStoring.Aliyun.Tests", "test\Volo.Abp.BlobStoring.Aliyun.Tests\Volo.Abp.BlobStoring.Aliyun.Tests.csproj", "{8E49687A-E69F-49F2-8DB0-428D0883A937}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.BlobStoring.Aws", "src\Volo.Abp.BlobStoring.Aws\Volo.Abp.BlobStoring.Aws.csproj", "{50968CDE-1029-4051-B2E5-B69D0ECF2A18}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.BlobStoring.Aws", "src\Volo.Abp.BlobStoring.Aws\Volo.Abp.BlobStoring.Aws.csproj", "{50968CDE-1029-4051-B2E5-B69D0ECF2A18}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.BlobStoring.Aws.Tests", "test\Volo.Abp.BlobStoring.Aws.Tests\Volo.Abp.BlobStoring.Aws.Tests.csproj", "{2CD3B26A-CA81-4279-8D5D-6A594517BB3F}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.BlobStoring.Aws.Tests", "test\Volo.Abp.BlobStoring.Aws.Tests\Volo.Abp.BlobStoring.Aws.Tests.csproj", "{2CD3B26A-CA81-4279-8D5D-6A594517BB3F}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.Kafka", "src\Volo.Abp.Kafka\Volo.Abp.Kafka.csproj", "{2A864049-9CD5-4493-8CDB-C408474D43D4}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.Kafka", "src\Volo.Abp.Kafka\Volo.Abp.Kafka.csproj", "{2A864049-9CD5-4493-8CDB-C408474D43D4}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.EventBus.Kafka", "src\Volo.Abp.EventBus.Kafka\Volo.Abp.EventBus.Kafka.csproj", "{C1D891B0-AE83-42CB-987D-425A2787DE78}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.EventBus.Kafka", "src\Volo.Abp.EventBus.Kafka\Volo.Abp.EventBus.Kafka.csproj", "{C1D891B0-AE83-42CB-987D-425A2787DE78}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.GlobalFeatures", "src\Volo.Abp.GlobalFeatures\Volo.Abp.GlobalFeatures.csproj", "{04F44063-C952-403A-815F-EFB778BDA125}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.GlobalFeatures", "src\Volo.Abp.GlobalFeatures\Volo.Abp.GlobalFeatures.csproj", "{04F44063-C952-403A-815F-EFB778BDA125}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.GlobalFeatures.Tests", "test\Volo.Abp.GlobalFeatures.Tests\Volo.Abp.GlobalFeatures.Tests.csproj", "{231F1581-AA21-44C3-BF27-51EB3AD5355C}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.GlobalFeatures.Tests", "test\Volo.Abp.GlobalFeatures.Tests\Volo.Abp.GlobalFeatures.Tests.csproj", "{231F1581-AA21-44C3-BF27-51EB3AD5355C}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.Http.Client.IdentityModel.WebAssembly", "src\Volo.Abp.Http.Client.IdentityModel.WebAssembly\Volo.Abp.Http.Client.IdentityModel.WebAssembly.csproj", "{3D35A1E0-A9A1-404F-9B55-5F1A7EB6D5B8}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.Http.Client.IdentityModel.WebAssembly", "src\Volo.Abp.Http.Client.IdentityModel.WebAssembly\Volo.Abp.Http.Client.IdentityModel.WebAssembly.csproj", "{3D35A1E0-A9A1-404F-9B55-5F1A7EB6D5B8}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.AspNetCore.Mvc.Client.Common", "src\Volo.Abp.AspNetCore.Mvc.Client.Common\Volo.Abp.AspNetCore.Mvc.Client.Common.csproj", "{8A22D962-016E-474A-8BB7-F831F0ABF3AC}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.AspNetCore.Mvc.Client.Common", "src\Volo.Abp.AspNetCore.Mvc.Client.Common\Volo.Abp.AspNetCore.Mvc.Client.Common.csproj", "{8A22D962-016E-474A-8BB7-F831F0ABF3AC}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.AspNetCore.Components.WebAssembly", "src\Volo.Abp.AspNetCore.Components.WebAssembly\Volo.Abp.AspNetCore.Components.WebAssembly.csproj", "{E1A62D10-F2FB-4040-BD60-11A3934058DF}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.AspNetCore.Components.WebAssembly", "src\Volo.Abp.AspNetCore.Components.WebAssembly\Volo.Abp.AspNetCore.Components.WebAssembly.csproj", "{E1A62D10-F2FB-4040-BD60-11A3934058DF}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.BlazoriseUI", "src\Volo.Abp.BlazoriseUI\Volo.Abp.BlazoriseUI.csproj", "{4EBDDB1B-D6C5-4FAE-B5A7-2171B18CDFA5}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.BlazoriseUI", "src\Volo.Abp.BlazoriseUI\Volo.Abp.BlazoriseUI.csproj", "{4EBDDB1B-D6C5-4FAE-B5A7-2171B18CDFA5}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme", "src\Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme\Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme.csproj", "{ABC27C10-C0FF-44CB-B4FF-A09C0B79F695}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme", "src\Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme\Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme.csproj", "{ABC27C10-C0FF-44CB-B4FF-A09C0B79F695}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.AspNetCore.Components.WebAssembly.Theming", "src\Volo.Abp.AspNetCore.Components.WebAssembly.Theming\Volo.Abp.AspNetCore.Components.WebAssembly.Theming.csproj", "{29CA7471-4E3E-4E75-8B33-001DDF682F01}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.AspNetCore.Components.WebAssembly.Theming", "src\Volo.Abp.AspNetCore.Components.WebAssembly.Theming\Volo.Abp.AspNetCore.Components.WebAssembly.Theming.csproj", "{29CA7471-4E3E-4E75-8B33-001DDF682F01}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.Autofac.WebAssembly", "src\Volo.Abp.Autofac.WebAssembly\Volo.Abp.Autofac.WebAssembly.csproj", "{37F89B0B-1C6B-426F-A5EE-676D1956D9E9}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.Autofac.WebAssembly", "src\Volo.Abp.Autofac.WebAssembly\Volo.Abp.Autofac.WebAssembly.csproj", "{37F89B0B-1C6B-426F-A5EE-676D1956D9E9}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.AspNetCore.Authentication.OpenIdConnect", "src\Volo.Abp.AspNetCore.Authentication.OpenIdConnect\Volo.Abp.AspNetCore.Authentication.OpenIdConnect.csproj", "{DEFE3DB2-EA4F-4F90-87FC-B25D64427BC5}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.AspNetCore.Authentication.OpenIdConnect", "src\Volo.Abp.AspNetCore.Authentication.OpenIdConnect\Volo.Abp.AspNetCore.Authentication.OpenIdConnect.csproj", "{DEFE3DB2-EA4F-4F90-87FC-B25D64427BC5}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.EventBus.Rebus", "src\Volo.Abp.EventBus.Rebus\Volo.Abp.EventBus.Rebus.csproj", "{F689967F-1EF1-4D75-8BA4-2F2F3506B1F3}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.ExceptionHandling", "src\Volo.Abp.ExceptionHandling\Volo.Abp.ExceptionHandling.csproj", "{B9D1ADCB-D552-4626-A1F1-78FF72C1E822}" EndProject @@ -1035,6 +1037,10 @@ Global {DEFE3DB2-EA4F-4F90-87FC-B25D64427BC5}.Debug|Any CPU.Build.0 = Debug|Any CPU {DEFE3DB2-EA4F-4F90-87FC-B25D64427BC5}.Release|Any CPU.ActiveCfg = Release|Any CPU {DEFE3DB2-EA4F-4F90-87FC-B25D64427BC5}.Release|Any CPU.Build.0 = Release|Any CPU + {F689967F-1EF1-4D75-8BA4-2F2F3506B1F3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F689967F-1EF1-4D75-8BA4-2F2F3506B1F3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F689967F-1EF1-4D75-8BA4-2F2F3506B1F3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F689967F-1EF1-4D75-8BA4-2F2F3506B1F3}.Release|Any CPU.Build.0 = Release|Any CPU {B9D1ADCB-D552-4626-A1F1-78FF72C1E822}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B9D1ADCB-D552-4626-A1F1-78FF72C1E822}.Debug|Any CPU.Build.0 = Debug|Any CPU {B9D1ADCB-D552-4626-A1F1-78FF72C1E822}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -1214,6 +1220,7 @@ Global {29CA7471-4E3E-4E75-8B33-001DDF682F01} = {5DF0E140-0513-4D0D-BE2E-3D4D85CD70E6} {37F89B0B-1C6B-426F-A5EE-676D1956D9E9} = {5DF0E140-0513-4D0D-BE2E-3D4D85CD70E6} {DEFE3DB2-EA4F-4F90-87FC-B25D64427BC5} = {5DF0E140-0513-4D0D-BE2E-3D4D85CD70E6} + {F689967F-1EF1-4D75-8BA4-2F2F3506B1F3} = {5DF0E140-0513-4D0D-BE2E-3D4D85CD70E6} {B9D1ADCB-D552-4626-A1F1-78FF72C1E822} = {5DF0E140-0513-4D0D-BE2E-3D4D85CD70E6} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution diff --git a/framework/src/Volo.Abp.AspNetCore.Authentication.JwtBearer/Volo.Abp.AspNetCore.Authentication.JwtBearer.csproj b/framework/src/Volo.Abp.AspNetCore.Authentication.JwtBearer/Volo.Abp.AspNetCore.Authentication.JwtBearer.csproj index 1d30366e67..97b9c6dc0a 100644 --- a/framework/src/Volo.Abp.AspNetCore.Authentication.JwtBearer/Volo.Abp.AspNetCore.Authentication.JwtBearer.csproj +++ b/framework/src/Volo.Abp.AspNetCore.Authentication.JwtBearer/Volo.Abp.AspNetCore.Authentication.JwtBearer.csproj @@ -4,7 +4,7 @@ - netcoreapp3.1 + net5.0 Volo.Abp.AspNetCore.Authentication.JwtBearer Volo.Abp.AspNetCore.Authentication.JwtBearer $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; @@ -19,7 +19,7 @@ - + diff --git a/framework/src/Volo.Abp.AspNetCore.Authentication.OAuth/Volo.Abp.AspNetCore.Authentication.OAuth.csproj b/framework/src/Volo.Abp.AspNetCore.Authentication.OAuth/Volo.Abp.AspNetCore.Authentication.OAuth.csproj index ae032e5b9e..18e9a271dc 100644 --- a/framework/src/Volo.Abp.AspNetCore.Authentication.OAuth/Volo.Abp.AspNetCore.Authentication.OAuth.csproj +++ b/framework/src/Volo.Abp.AspNetCore.Authentication.OAuth/Volo.Abp.AspNetCore.Authentication.OAuth.csproj @@ -4,7 +4,7 @@ - netcoreapp3.1 + net5.0 Volo.Abp.AspNetCore.Authentication.OAuth Volo.Abp.AspNetCore.Authentication.OAuth $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; diff --git a/framework/src/Volo.Abp.AspNetCore.Authentication.OpenIdConnect/Volo.Abp.AspNetCore.Authentication.OpenIdConnect.csproj b/framework/src/Volo.Abp.AspNetCore.Authentication.OpenIdConnect/Volo.Abp.AspNetCore.Authentication.OpenIdConnect.csproj index 30f56491c5..bac9441f00 100644 --- a/framework/src/Volo.Abp.AspNetCore.Authentication.OpenIdConnect/Volo.Abp.AspNetCore.Authentication.OpenIdConnect.csproj +++ b/framework/src/Volo.Abp.AspNetCore.Authentication.OpenIdConnect/Volo.Abp.AspNetCore.Authentication.OpenIdConnect.csproj @@ -4,12 +4,12 @@ - netcoreapp3.1 + net5.0 - + diff --git a/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Themes/Basic/MainLayout.razor b/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Themes/Basic/MainLayout.razor index 8e64b32022..6954057142 100644 --- a/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Themes/Basic/MainLayout.razor +++ b/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Themes/Basic/MainLayout.razor @@ -11,12 +11,14 @@
@Body + +
diff --git a/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Themes/Basic/_Imports.razor b/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Themes/Basic/_Imports.razor index f1ebc76453..7d695e9344 100644 --- a/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Themes/Basic/_Imports.razor +++ b/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Themes/Basic/_Imports.razor @@ -8,3 +8,5 @@ @using Volo.Abp.AspNetCore.Components.WebAssembly @using Blazorise @using Blazorise.DataGrid +@using Volo.Abp.BlazoriseUI; +@using Volo.Abp.BlazoriseUI.Components; \ No newline at end of file diff --git a/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme.csproj b/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme.csproj index 783af0b202..4db7f0f38f 100644 --- a/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme.csproj +++ b/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme.csproj @@ -4,8 +4,7 @@ - netstandard2.1 - 3.0 + net5.0 Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme diff --git a/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/Volo.Abp.AspNetCore.Components.WebAssembly.Theming.csproj b/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/Volo.Abp.AspNetCore.Components.WebAssembly.Theming.csproj index 86902f7038..58e0c279ae 100644 --- a/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/Volo.Abp.AspNetCore.Components.WebAssembly.Theming.csproj +++ b/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/Volo.Abp.AspNetCore.Components.WebAssembly.Theming.csproj @@ -4,8 +4,7 @@ - netstandard2.1 - 3.0 + net5.0 diff --git a/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Microsoft/AspNetCore/Components/WebAssembly/Hosting/AbpWebAssemblyHostBuilderExtensions.cs b/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Microsoft/AspNetCore/Components/WebAssembly/Hosting/AbpWebAssemblyHostBuilderExtensions.cs index 5622d99cfb..20999c2646 100644 --- a/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Microsoft/AspNetCore/Components/WebAssembly/Hosting/AbpWebAssemblyHostBuilderExtensions.cs +++ b/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Microsoft/AspNetCore/Components/WebAssembly/Hosting/AbpWebAssemblyHostBuilderExtensions.cs @@ -1,6 +1,7 @@ using System; using System.Globalization; using System.Reflection; +using System.Runtime.CompilerServices; using System.Threading.Tasks; using JetBrains.Annotations; using Microsoft.Extensions.Configuration; @@ -21,6 +22,12 @@ namespace Microsoft.AspNetCore.Components.WebAssembly.Hosting { Check.NotNull(builder, nameof(builder)); + // Related this commit(https://github.com/dotnet/aspnetcore/commit/b99d805bc037fcac56afb79abeb7d5a43141c85e) + // Microsoft.AspNetCore.Blazor.BuildTools has been removed in net 5.0. + // This call may be removed when we find a suitable solution. + // System.Runtime.CompilerServices.AsyncStateMachineAttribute + Castle.DynamicProxy.Generators.AttributesToAvoidReplicating.Add(); + builder.Services.AddSingleton(builder.Configuration); builder.Services.AddSingleton(builder); diff --git a/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo.Abp.AspNetCore.Components.WebAssembly.csproj b/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo.Abp.AspNetCore.Components.WebAssembly.csproj index 89f2d08b49..44a816678c 100644 --- a/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo.Abp.AspNetCore.Components.WebAssembly.csproj +++ b/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo.Abp.AspNetCore.Components.WebAssembly.csproj @@ -4,7 +4,7 @@ - netstandard2.1 + net5.0 Volo.Abp.AspNetCore.Components.WebAssembly Volo.Abp.AspNetCore.Components.WebAssembly $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; @@ -20,8 +20,9 @@ - - + + + diff --git a/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/AbpBlazorClientHttpMessageHandler.cs b/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/AbpBlazorClientHttpMessageHandler.cs index 7d59042806..1b5c5893d5 100644 --- a/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/AbpBlazorClientHttpMessageHandler.cs +++ b/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/AbpBlazorClientHttpMessageHandler.cs @@ -17,7 +17,7 @@ namespace Volo.Abp.AspNetCore.Components.WebAssembly _jsRuntime = jsRuntime; } - protected override async Task SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) + protected async override Task SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) { await SetLanguageAsync(request, cancellationToken); diff --git a/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/ExceptionHandling/AbpExceptionHandlingLogger.cs b/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/ExceptionHandling/AbpExceptionHandlingLogger.cs index 445ccbaba0..2190489d4c 100644 --- a/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/ExceptionHandling/AbpExceptionHandlingLogger.cs +++ b/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/ExceptionHandling/AbpExceptionHandlingLogger.cs @@ -4,10 +4,9 @@ using Microsoft.Extensions.Logging; namespace Volo.Abp.AspNetCore.Components.WebAssembly.ExceptionHandling { - public class AbpExceptionHandlingLogger : ILogger, IDisposable + public class AbpExceptionHandlingLogger : ILogger { private readonly IServiceCollection _serviceCollection; - private IServiceScope _serviceScope; private IUserExceptionInformer _userExceptionInformer; public AbpExceptionHandlingLogger(IServiceCollection serviceCollection) @@ -39,7 +38,7 @@ namespace Volo.Abp.AspNetCore.Components.WebAssembly.ExceptionHandling return; } - _userExceptionInformer.InformAsync(new UserExceptionInformerContext(exception)); + _userExceptionInformer.Inform(new UserExceptionInformerContext(exception)); } protected virtual void TryInitialize() @@ -50,8 +49,7 @@ namespace Volo.Abp.AspNetCore.Components.WebAssembly.ExceptionHandling return; } - _serviceScope = serviceProvider.CreateScope(); - _userExceptionInformer = _serviceScope.ServiceProvider.GetRequiredService(); + _userExceptionInformer = serviceProvider.GetRequiredService(); } public virtual bool IsEnabled(LogLevel logLevel) @@ -63,10 +61,5 @@ namespace Volo.Abp.AspNetCore.Components.WebAssembly.ExceptionHandling { return NullDisposable.Instance; } - - public virtual void Dispose() - { - _serviceScope?.Dispose(); - } } } diff --git a/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/ExceptionHandling/AbpExceptionHandlingLoggerProvider.cs b/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/ExceptionHandling/AbpExceptionHandlingLoggerProvider.cs index d295559284..85eb021284 100644 --- a/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/ExceptionHandling/AbpExceptionHandlingLoggerProvider.cs +++ b/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/ExceptionHandling/AbpExceptionHandlingLoggerProvider.cs @@ -32,7 +32,7 @@ namespace Volo.Abp.AspNetCore.Components.WebAssembly.ExceptionHandling public void Dispose() { - _logger.Dispose(); + } } } diff --git a/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/ExceptionHandling/IUserExceptionInformer.cs b/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/ExceptionHandling/IUserExceptionInformer.cs index 4399e706ec..2abbe3667b 100644 --- a/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/ExceptionHandling/IUserExceptionInformer.cs +++ b/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/ExceptionHandling/IUserExceptionInformer.cs @@ -1,10 +1,7 @@ -using System; -using System.Threading.Tasks; - -namespace Volo.Abp.AspNetCore.Components.WebAssembly.ExceptionHandling +namespace Volo.Abp.AspNetCore.Components.WebAssembly.ExceptionHandling { public interface IUserExceptionInformer { - Task InformAsync(UserExceptionInformerContext context); + void Inform(UserExceptionInformerContext context); } } diff --git a/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/ExceptionHandling/UserExceptionInformer.cs b/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/ExceptionHandling/UserExceptionInformer.cs index 80f80c675a..c409c38319 100644 --- a/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/ExceptionHandling/UserExceptionInformer.cs +++ b/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/ExceptionHandling/UserExceptionInformer.cs @@ -1,5 +1,7 @@ using System; using System.Threading.Tasks; +using Microsoft.Extensions.Logging; +using Microsoft.Extensions.Logging.Abstractions; using Volo.Abp.AspNetCore.ExceptionHandling; using Volo.Abp.DependencyInjection; using Volo.Abp.Http; @@ -9,19 +11,32 @@ namespace Volo.Abp.AspNetCore.Components.WebAssembly.ExceptionHandling { public class UserExceptionInformer : IUserExceptionInformer, ITransientDependency { + public ILogger Logger { get; set; } protected IUiMessageService MessageService { get; } protected IExceptionToErrorInfoConverter ExceptionToErrorInfoConverter { get; } - public UserExceptionInformer(IUiMessageService messageService, IExceptionToErrorInfoConverter exceptionToErrorInfoConverter) + public UserExceptionInformer( + IUiMessageService messageService, + IExceptionToErrorInfoConverter exceptionToErrorInfoConverter) { MessageService = messageService; ExceptionToErrorInfoConverter = exceptionToErrorInfoConverter; + Logger = NullLogger.Instance; } - public virtual async Task InformAsync(UserExceptionInformerContext context) + public void Inform(UserExceptionInformerContext context) { var errorInfo = GetErrorInfo(context); - await ShowErrorInfoAsync(errorInfo); + + if (errorInfo.Details.IsNullOrEmpty()) + { + //TODO: Should we introduce MessageService.Error (sync) method instead of such a usage (without await)..? + MessageService.ErrorAsync(errorInfo.Message); + } + else + { + MessageService.ErrorAsync(errorInfo.Details, errorInfo.Message); + } } protected virtual RemoteServiceErrorInfo GetErrorInfo(UserExceptionInformerContext context) @@ -33,17 +48,5 @@ namespace Volo.Abp.AspNetCore.Components.WebAssembly.ExceptionHandling return ExceptionToErrorInfoConverter.Convert(context.Exception, false); } - - protected virtual async Task ShowErrorInfoAsync(RemoteServiceErrorInfo errorInfo) - { - if (errorInfo.Details.IsNullOrEmpty()) - { - await MessageService.ErrorAsync(errorInfo.Message); - } - else - { - await MessageService.ErrorAsync(errorInfo.Details, errorInfo.Message); - } - } } } diff --git a/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/IUiMessageService.cs b/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/IUiMessageService.cs index 2c834ddc87..fd70cc40e1 100644 --- a/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/IUiMessageService.cs +++ b/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/IUiMessageService.cs @@ -1,17 +1,18 @@ -using System.Threading.Tasks; +using System; +using System.Threading.Tasks; namespace Volo.Abp.AspNetCore.Components.WebAssembly { public interface IUiMessageService { - Task InfoAsync(string message, string title = null); - - Task SuccessAsync(string message, string title = null); - - Task WarnAsync(string message, string title = null); - - Task ErrorAsync(string message, string title = null); - - Task ConfirmAsync(string message, string title = null); + Task InfoAsync(string message, string title = null, Action options = null); + + Task SuccessAsync(string message, string title = null, Action options = null); + + Task WarnAsync(string message, string title = null, Action options = null); + + Task ErrorAsync(string message, string title = null, Action options = null); + + Task ConfirmAsync(string message, string title = null, Action options = null); } } diff --git a/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/IUiNotificationService.cs b/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/IUiNotificationService.cs index a25bf75ae0..a9816dc325 100644 --- a/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/IUiNotificationService.cs +++ b/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/IUiNotificationService.cs @@ -5,5 +5,8 @@ namespace Volo.Abp.AspNetCore.Components.WebAssembly public interface IUiNotificationService { Task Info(string message); + Task Success(string message); + Task Warn(string message); + Task Error(string message); } } diff --git a/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/WebAssemblyCurrentTenantAccessor.cs b/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/MultiTenancy/WebAssemblyCurrentTenantAccessor.cs similarity index 80% rename from framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/WebAssemblyCurrentTenantAccessor.cs rename to framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/MultiTenancy/WebAssemblyCurrentTenantAccessor.cs index eb0ee781ad..3857db2b36 100644 --- a/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/WebAssemblyCurrentTenantAccessor.cs +++ b/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/MultiTenancy/WebAssemblyCurrentTenantAccessor.cs @@ -1,7 +1,7 @@ using Volo.Abp.DependencyInjection; using Volo.Abp.MultiTenancy; -namespace Volo.Abp.AspNetCore.Components.WebAssembly +namespace Volo.Abp.AspNetCore.Components.WebAssembly.MultiTenancy { [Dependency(ReplaceServices = true)] public class WebAssemblyCurrentTenantAccessor : ICurrentTenantAccessor, ISingletonDependency diff --git a/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/WebAssemblyRemoteTenantStore.cs b/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/MultiTenancy/WebAssemblyRemoteTenantStore.cs similarity index 54% rename from framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/WebAssemblyRemoteTenantStore.cs rename to framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/MultiTenancy/WebAssemblyRemoteTenantStore.cs index ebe170cfa8..7e132db9c9 100644 --- a/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/WebAssemblyRemoteTenantStore.cs +++ b/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/MultiTenancy/WebAssemblyRemoteTenantStore.cs @@ -6,44 +6,55 @@ using Volo.Abp.Http.Client.DynamicProxying; using Volo.Abp.MultiTenancy; using Volo.Abp.Threading; -namespace Volo.Abp.AspNetCore.Components.WebAssembly +namespace Volo.Abp.AspNetCore.Components.WebAssembly.MultiTenancy { public class WebAssemblyRemoteTenantStore : ITenantStore, ITransientDependency { protected IHttpClientProxy Proxy { get; } + protected WebAssemblyRemoteTenantStoreCache Cache { get; } public WebAssemblyRemoteTenantStore( - IHttpClientProxy proxy) + IHttpClientProxy proxy, + WebAssemblyRemoteTenantStoreCache cache) { Proxy = proxy; + Cache = cache; } public async Task FindAsync(string name) { - //TODO: Cache + var cached = Cache.Find(name); + if (cached != null) + { + return cached; + } - return CreateTenantConfiguration(await Proxy.Service.FindTenantByNameAsync(name)); + var tenant = CreateTenantConfiguration(await Proxy.Service.FindTenantByNameAsync(name)); + Cache.Set(tenant); + return tenant; } public async Task FindAsync(Guid id) { - //TODO: Cache + var cached = Cache.Find(id); + if (cached != null) + { + return cached; + } - return CreateTenantConfiguration(await Proxy.Service.FindTenantByIdAsync(id)); + var tenant = CreateTenantConfiguration(await Proxy.Service.FindTenantByIdAsync(id)); + Cache.Set(tenant); + return tenant; } public TenantConfiguration Find(string name) { - //TODO: Cache - - return AsyncHelper.RunSync(async () => CreateTenantConfiguration(await Proxy.Service.FindTenantByNameAsync(name))); + return AsyncHelper.RunSync(() => FindAsync(name)); } public TenantConfiguration Find(Guid id) { - //TODO: Cache - - return AsyncHelper.RunSync(async () => CreateTenantConfiguration(await Proxy.Service.FindTenantByIdAsync(id))); + return AsyncHelper.RunSync(() => FindAsync(id)); } protected virtual TenantConfiguration CreateTenantConfiguration(FindTenantResultDto tenantResultDto) @@ -55,15 +66,5 @@ namespace Volo.Abp.AspNetCore.Components.WebAssembly return new TenantConfiguration(tenantResultDto.TenantId.Value, tenantResultDto.Name); } - - protected virtual string CreateCacheKey(string tenantName) - { - return $"RemoteTenantStore_Name_{tenantName}"; - } - - protected virtual string CreateCacheKey(Guid tenantId) - { - return $"RemoteTenantStore_Id_{tenantId:N}"; - } } } diff --git a/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/MultiTenancy/WebAssemblyRemoteTenantStoreCache.cs b/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/MultiTenancy/WebAssemblyRemoteTenantStoreCache.cs new file mode 100644 index 0000000000..e1c5112e02 --- /dev/null +++ b/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/MultiTenancy/WebAssemblyRemoteTenantStoreCache.cs @@ -0,0 +1,35 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using Volo.Abp.DependencyInjection; +using Volo.Abp.MultiTenancy; + +namespace Volo.Abp.AspNetCore.Components.WebAssembly.MultiTenancy +{ + public class WebAssemblyRemoteTenantStoreCache : IScopedDependency + { + protected readonly List CachedTenants = new List(); + + public virtual TenantConfiguration Find(string name) + { + return CachedTenants.FirstOrDefault(t => t.Name == name); + } + + public virtual TenantConfiguration Find(Guid id) + { + return CachedTenants.FirstOrDefault(t => t.Id == id); + } + + public virtual void Set(TenantConfiguration tenant) + { + var existingTenant = Find(tenant.Id); + if (existingTenant != null) + { + existingTenant.Name = tenant.Name; + return; + } + + CachedTenants.Add(tenant); + } + } +} diff --git a/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/NullUiNotificationService.cs b/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/NullUiNotificationService.cs index d93aaa8e83..85ee10287c 100644 --- a/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/NullUiNotificationService.cs +++ b/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/NullUiNotificationService.cs @@ -9,5 +9,19 @@ namespace Volo.Abp.AspNetCore.Components.WebAssembly { return Task.CompletedTask; } + + public Task Success(string message) + { + return Task.CompletedTask; + } + + public Task Warn(string message) + { + return Task.CompletedTask; + } + public Task Error(string message) + { + return Task.CompletedTask; + } } } \ No newline at end of file diff --git a/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/UiMessageService.cs b/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/SimpleUiMessageService.cs similarity index 68% rename from framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/UiMessageService.cs rename to framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/SimpleUiMessageService.cs index 16fe041de4..8f43b3fdcd 100644 --- a/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/UiMessageService.cs +++ b/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/SimpleUiMessageService.cs @@ -1,40 +1,40 @@ -using System.Threading.Tasks; +using System; +using System.Threading.Tasks; using Microsoft.JSInterop; using Volo.Abp.DependencyInjection; namespace Volo.Abp.AspNetCore.Components.WebAssembly { - //TODO: Implement with sweetalert in a new package - public class UiMessageService : IUiMessageService, ITransientDependency + public class SimpleUiMessageService : IUiMessageService, ITransientDependency { protected IJSRuntime JsRuntime { get; } - public UiMessageService(IJSRuntime jsRuntime) + public SimpleUiMessageService(IJSRuntime jsRuntime) { JsRuntime = jsRuntime; } - public async Task InfoAsync(string message, string title = null) + public async Task InfoAsync(string message, string title = null, Action options = null) { await JsRuntime.InvokeVoidAsync("alert", message); } - public async Task SuccessAsync(string message, string title = null) + public async Task SuccessAsync(string message, string title = null, Action options = null) { await JsRuntime.InvokeVoidAsync("alert", message); } - public async Task WarnAsync(string message, string title = null) + public async Task WarnAsync(string message, string title = null, Action options = null) { await JsRuntime.InvokeVoidAsync("alert", message); } - - public async Task ErrorAsync(string message, string title = null) + + public async Task ErrorAsync(string message, string title = null, Action options = null) { await JsRuntime.InvokeVoidAsync("alert", message); } - - public async Task ConfirmAsync(string message, string title = null) + + public async Task ConfirmAsync(string message, string title = null, Action options = null) { return await JsRuntime.InvokeAsync("confirm", message); } diff --git a/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/UiMessageEventArgs.cs b/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/UiMessageEventArgs.cs new file mode 100644 index 0000000000..4431d3c819 --- /dev/null +++ b/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/UiMessageEventArgs.cs @@ -0,0 +1,35 @@ +using System; +using System.Threading.Tasks; + +namespace Volo.Abp.AspNetCore.Components.WebAssembly +{ + public class UiMessageEventArgs : EventArgs + { + public UiMessageEventArgs(UiMessageType messageType, string message, string title, UiMessageOptions options) + { + MessageType = messageType; + Message = message; + Title = title; + Options = options; + } + + public UiMessageEventArgs(UiMessageType messageType, string message, string title, UiMessageOptions options, TaskCompletionSource callback) + { + MessageType = messageType; + Message = message; + Title = title; + Options = options; + Callback = callback; + } + + public UiMessageType MessageType { get; set; } + + public string Message { get; } + + public string Title { get; } + + public UiMessageOptions Options { get; } + + public TaskCompletionSource Callback { get; } + } +} diff --git a/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/UiMessageOptions.cs b/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/UiMessageOptions.cs new file mode 100644 index 0000000000..59b2e8f400 --- /dev/null +++ b/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/UiMessageOptions.cs @@ -0,0 +1,53 @@ +namespace Volo.Abp.AspNetCore.Components.WebAssembly +{ + /// + /// Options to override message dialog appearance. + /// + public class UiMessageOptions + { + /// + /// If true, the message dialogue will be centered on the screen. + /// + public bool CenterMessage { get; set; } + + /// + /// If true, the message dialogue will show the large icon for the current message type. + /// + public bool ShowMessageIcon { get; set; } + + /// + /// Overrides the build-in message icon. + /// + public object MessageIcon { get; set; } + + /// + /// Custom text for the Ok button. + /// + public string OkButtonText { get; set; } + + /// + /// Custom icon for the Ok button. + /// + public object OkButtonIcon { get; set; } + + /// + /// Custom text for the Confirmation button. + /// + public string ConfirmButtonText { get; set; } + + /// + /// Custom icon for the Confirmation button. + /// + public object ConfirmButtonIcon { get; set; } + + /// + /// Custom text for the Cancel button. + /// + public string CancelButtonText { get; set; } + + /// + /// Custom icon for the Cancel button. + /// + public object CancelButtonIcon { get; set; } + } +} diff --git a/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/UiMessageType.cs b/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/UiMessageType.cs new file mode 100644 index 0000000000..5e3a77a3c5 --- /dev/null +++ b/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/UiMessageType.cs @@ -0,0 +1,14 @@ +namespace Volo.Abp.AspNetCore.Components.WebAssembly +{ + /// + /// Defines the possible ui message types with predefined actions. + /// + public enum UiMessageType + { + Info, + Success, + Warning, + Error, + Confirmation, + } +} diff --git a/framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo.Abp.AspNetCore.MultiTenancy.csproj b/framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo.Abp.AspNetCore.MultiTenancy.csproj index e9fa75d716..5468fb91c3 100644 --- a/framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo.Abp.AspNetCore.MultiTenancy.csproj +++ b/framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo.Abp.AspNetCore.MultiTenancy.csproj @@ -4,7 +4,7 @@ - netcoreapp3.1 + net5.0 Volo.Abp.AspNetCore.MultiTenancy Volo.Abp.AspNetCore.MultiTenancy $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; diff --git a/framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo/Abp/AspNetCore/MultiTenancy/MultiTenancyMiddleware.cs b/framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo/Abp/AspNetCore/MultiTenancy/MultiTenancyMiddleware.cs index 2c82095dac..0aeb97e89d 100644 --- a/framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo/Abp/AspNetCore/MultiTenancy/MultiTenancyMiddleware.cs +++ b/framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo/Abp/AspNetCore/MultiTenancy/MultiTenancyMiddleware.cs @@ -1,5 +1,4 @@ -using System; -using System.Threading.Tasks; +using System.Threading.Tasks; using Microsoft.AspNetCore.Http; using Volo.Abp.DependencyInjection; using Volo.Abp.MultiTenancy; @@ -8,59 +7,24 @@ namespace Volo.Abp.AspNetCore.MultiTenancy { public class MultiTenancyMiddleware : IMiddleware, ITransientDependency { - private readonly ITenantResolver _tenantResolver; - private readonly ITenantStore _tenantStore; + private readonly ITenantConfigurationProvider _tenantConfigurationProvider; private readonly ICurrentTenant _currentTenant; - private readonly ITenantResolveResultAccessor _tenantResolveResultAccessor; public MultiTenancyMiddleware( - ITenantResolver tenantResolver, - ITenantStore tenantStore, - ICurrentTenant currentTenant, - ITenantResolveResultAccessor tenantResolveResultAccessor) + ITenantConfigurationProvider tenantConfigurationProvider, + ICurrentTenant currentTenant) { - _tenantResolver = tenantResolver; - _tenantStore = tenantStore; + _tenantConfigurationProvider = tenantConfigurationProvider; _currentTenant = currentTenant; - _tenantResolveResultAccessor = tenantResolveResultAccessor; } public async Task InvokeAsync(HttpContext context, RequestDelegate next) { - var resolveResult = _tenantResolver.ResolveTenantIdOrName(); - _tenantResolveResultAccessor.Result = resolveResult; - - TenantConfiguration tenant = null; - if (resolveResult.TenantIdOrName != null) - { - tenant = await FindTenantAsync(resolveResult.TenantIdOrName); - - if (tenant == null) - { - throw new BusinessException( - code: "Volo.AbpIo.MultiTenancy:010001", - message: "Tenant not found!", - details: "There is no tenant with the tenant id or name: " + resolveResult.TenantIdOrName - ); - } - } - + var tenant = await _tenantConfigurationProvider.GetAsync(saveResolveResult: true); using (_currentTenant.Change(tenant?.Id, tenant?.Name)) { await next(context); } } - - private async Task FindTenantAsync(string tenantIdOrName) - { - if (Guid.TryParse(tenantIdOrName, out var parsedTenantId)) - { - return await _tenantStore.FindAsync(parsedTenantId); - } - else - { - return await _tenantStore.FindAsync(tenantIdOrName); - } - } } } diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.Client/Volo.Abp.AspNetCore.Mvc.Client.csproj b/framework/src/Volo.Abp.AspNetCore.Mvc.Client/Volo.Abp.AspNetCore.Mvc.Client.csproj index aa11e602a1..3657e27fef 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.Client/Volo.Abp.AspNetCore.Mvc.Client.csproj +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.Client/Volo.Abp.AspNetCore.Mvc.Client.csproj @@ -4,7 +4,7 @@ - netcoreapp3.1 + net5.0 Volo.Abp.AspNetCore.Mvc.Client Volo.Abp.AspNetCore.Mvc.Client $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Button/AbpButtonTagHelperServiceBase.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Button/AbpButtonTagHelperServiceBase.cs index ab35dbe804..ff0b9dd34f 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Button/AbpButtonTagHelperServiceBase.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Button/AbpButtonTagHelperServiceBase.cs @@ -47,6 +47,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Button var icon = new TagBuilder("i"); icon.AddCssClass(GetIconClass(context, output)); output.Content.AppendHtml(icon); + output.Content.Append(" "); } protected virtual string GetIconClass(TagHelperContext context, TagHelperOutput output) @@ -80,4 +81,4 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Button } } } -} \ No newline at end of file +} diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/AbpInputTagHelperService.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/AbpInputTagHelperService.cs index 9436acbbbf..ff5b085df5 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/AbpInputTagHelperService.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/AbpInputTagHelperService.cs @@ -260,7 +260,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form var label = new TagBuilder("label"); label.Attributes.Add("for", GetIdAttributeValue(inputTag)); - label.InnerHtml.Append(TagHelper.Label); + label.InnerHtml.AppendHtml(TagHelper.Label); if (isCheckbox) { diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Modal/AbpModalFooterTagHelperService.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Modal/AbpModalFooterTagHelperService.cs index 1bc6ab2f3a..31cccf2428 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Modal/AbpModalFooterTagHelperService.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Modal/AbpModalFooterTagHelperService.cs @@ -45,12 +45,12 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Modal sb.AppendLine(GetSaveButton()); break; case AbpModalButtons.Save | AbpModalButtons.Cancel: - sb.AppendLine(GetSaveButton()); sb.AppendLine(GetCancelButton()); + sb.AppendLine(GetSaveButton()); break; case AbpModalButtons.Save | AbpModalButtons.Close: - sb.AppendLine(GetSaveButton()); sb.AppendLine(GetCloseButton()); + sb.AppendLine(GetSaveButton()); break; } @@ -72,6 +72,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Modal element.AddCssClass("btn-primary"); element.Attributes.Add("data-busy-text", _localizer["SavingWithThreeDot"]); element.InnerHtml.AppendHtml(icon); + element.InnerHtml.AppendHtml(" "); element.InnerHtml.AppendHtml(span); return element.ToHtmlString(); diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.csproj b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.csproj index 2fb94ac218..de4be2fb8c 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.csproj +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.csproj @@ -4,7 +4,7 @@ - netcoreapp3.1 + net5.0 true Volo.Abp.AspNetCore.Mvc.UI.Bootstrap Volo.Abp.AspNetCore.Mvc.UI.Bootstrap @@ -12,7 +12,7 @@ true Library - + diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo.Abp.AspNetCore.Mvc.UI.Bundling.csproj b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo.Abp.AspNetCore.Mvc.UI.Bundling.csproj index 84ea011233..ed2da41347 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo.Abp.AspNetCore.Mvc.UI.Bundling.csproj +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo.Abp.AspNetCore.Mvc.UI.Bundling.csproj @@ -4,7 +4,7 @@ - netcoreapp3.1 + net5.0 true Volo.Abp.AspNetCore.Mvc.UI.Bundling Volo.Abp.AspNetCore.Mvc.UI.Bundling diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy.csproj b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy.csproj index 437ae8c45d..54f4e62b59 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy.csproj +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy.csproj @@ -4,7 +4,7 @@ - netcoreapp3.1 + net5.0 true Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Volo/Abp/AspNetCore/Mvc/UI/MultiTenancy/Localization/es.json b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Volo/Abp/AspNetCore/Mvc/UI/MultiTenancy/Localization/es.json new file mode 100644 index 0000000000..d6fd84dcbe --- /dev/null +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Volo/Abp/AspNetCore/Mvc/UI/MultiTenancy/Localization/es.json @@ -0,0 +1,12 @@ +{ + "culture": "es", + "texts": { + "GivenTenantIsNotAvailable": "El inquilino {0} no está disponible", + "Tenant": "Inquilino", + "Switch": "cambiar", + "Name": "Nombre", + "SwitchTenant": "Cambiar inquilino", + "SwitchTenantHint": "Deje en blanco el campo nombre para cambiar el lado del host.", + "NotSelected": "No seleccionado" + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Volo/Abp/AspNetCore/Mvc/UI/MultiTenancy/Localization/hu.json b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Volo/Abp/AspNetCore/Mvc/UI/MultiTenancy/Localization/hu.json new file mode 100644 index 0000000000..057e9d2968 --- /dev/null +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Volo/Abp/AspNetCore/Mvc/UI/MultiTenancy/Localization/hu.json @@ -0,0 +1,12 @@ +{ + "culture": "hu", + "texts": { + "GivenTenantIsNotAvailable": "A megadott előfizető nem érhető el: {0}", + "Tenant": "Előfizető", + "Switch": "váltás", + "Name": "Neve", + "SwitchTenantHint": "Hagyja üresen az előfizető nevet hogy a host oldalra kapcsoljon.", + "SwitchTenant": "Előfizető váltás", + "NotSelected": "Nincs kiválasztva" + } + } \ No newline at end of file diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo.Abp.AspNetCore.Mvc.UI.Packages.csproj b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo.Abp.AspNetCore.Mvc.UI.Packages.csproj index 6cb0a02153..2c3701953e 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo.Abp.AspNetCore.Mvc.UI.Packages.csproj +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo.Abp.AspNetCore.Mvc.UI.Packages.csproj @@ -4,7 +4,7 @@ - netcoreapp3.1 + net5.0 true Volo.Abp.AspNetCore.Mvc.UI.Packages Volo.Abp.AspNetCore.Mvc.UI.Packages diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Layouts/Account.cshtml b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Layouts/Account.cshtml index 5fcd5951cd..6ab5267b72 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Layouts/Account.cshtml +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Layouts/Account.cshtml @@ -13,7 +13,6 @@ @using Volo.Abp.AspNetCore.Mvc.UI.Widgets.Components.WidgetStyles @using Volo.Abp.MultiTenancy @using Volo.Abp.Localization -@inject IAbpAntiForgeryManager AbpAntiForgeryManager @inject IBrandingProvider BrandingProvider @inject IOptions MultiTenancyOptions @inject ICurrentTenant CurrentTenant @@ -22,7 +21,6 @@ @{ Layout = null; - AbpAntiForgeryManager.SetCookie(); var containerClass = ViewBag.FluidLayout == true ? "container-fluid" : "container"; //TODO: Better and type-safe options var rtl = CultureHelper.IsRtl ? "rtl" : string.Empty; } diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Layouts/Application.cshtml b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Layouts/Application.cshtml index 7b06538510..d3ebd2f57f 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Layouts/Application.cshtml +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Layouts/Application.cshtml @@ -9,12 +9,10 @@ @using Volo.Abp.AspNetCore.Mvc.UI.Widgets.Components.WidgetScripts @using Volo.Abp.AspNetCore.Mvc.UI.Widgets.Components.WidgetStyles @using Volo.Abp.Localization -@inject IAbpAntiForgeryManager AbpAntiForgeryManager @inject IBrandingProvider BrandingProvider @inject IPageLayout PageLayout @{ Layout = null; - AbpAntiForgeryManager.SetCookie(); var containerClass = ViewBag.FluidLayout == true ? "container-fluid" : "container"; //TODO: Better and type-safe options var pageTitle = ViewBag.Title == null ? BrandingProvider.AppName : ViewBag.Title; //TODO: Discard to get from Title diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Layouts/Empty.cshtml b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Layouts/Empty.cshtml index 9871bcbb25..2176782a70 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Layouts/Empty.cshtml +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Layouts/Empty.cshtml @@ -8,12 +8,10 @@ @using Volo.Abp.AspNetCore.Mvc.UI.Widgets.Components.WidgetScripts @using Volo.Abp.AspNetCore.Mvc.UI.Widgets.Components.WidgetStyles @using Volo.Abp.Localization -@inject IAbpAntiForgeryManager AbpAntiForgeryManager @inject IBrandingProvider BrandingProvider @inject IPageLayout PageLayout @{ Layout = null; - AbpAntiForgeryManager.SetCookie(); var containerClass = ViewBag.FluidLayout == true ? "container-fluid" : "container"; //TODO: Better and type-safe options var pageTitle = ViewBag.Title == null ? BrandingProvider.AppName : ViewBag.Title; //TODO: Discard to get from Title diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.csproj b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.csproj index 206224f918..b421036ab0 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.csproj +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.csproj @@ -4,7 +4,7 @@ - netcoreapp3.1 + net5.0 true Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo.csproj b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo.csproj index 111a6a898a..3d20feea08 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo.csproj +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo.csproj @@ -4,7 +4,7 @@ - netcoreapp3.1 + net5.0 true Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo @@ -26,7 +26,7 @@
- + diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.csproj b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.csproj index 4b0fbc24cf..d26564d92b 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.csproj +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.csproj @@ -4,7 +4,7 @@ - netcoreapp3.1 + net5.0 true Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/wwwroot/libs/abp/aspnetcore-mvc-ui-theme-shared/bootstrap/modal-manager.js b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/wwwroot/libs/abp/aspnetcore-mvc-ui-theme-shared/bootstrap/modal-manager.js index cc4122a373..3e60d5f9c2 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/wwwroot/libs/abp/aspnetcore-mvc-ui-theme-shared/bootstrap/modal-manager.js +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/wwwroot/libs/abp/aspnetcore-mvc-ui-theme-shared/bootstrap/modal-manager.js @@ -1,7 +1,3 @@ -/** - * TODO: Document & prepare typescript definitions - * TODO: Refactor & test more - */ var abp = abp || {}; $.validator.defaults.ignore = ''; //TODO: Would be better if we can apply only for the form we are working on! Also this should be decided by the form itself! @@ -12,7 +8,7 @@ $.validator.defaults.ignore = ''; //TODO: Would be better if we can apply only f abp.ModalManager = (function () { - var CallbackList = function () { //TODO: To a seperated file + var CallbackList = function () { var _callbacks = []; return { @@ -67,12 +63,11 @@ $.validator.defaults.ignore = ''; //TODO: Would be better if we can apply only f _$modal = _$modalContainer.find('.modal'); _$form = _$modalContainer.find('form'); if (_$form.length) { - //TODO: data-ajaxForm comparison seems wrong! - if (_$form.attr('data-ajaxForm') === undefined || _$form.attr('data-ajaxForm') === false) { + if (_$form.attr('data-ajaxForm') !== 'false') { _$form.abpAjaxForm(); } - if (_$form.attr('data-check-form-on-close') === undefined || _$form.attr('data-check-form-on-close') != 'false') { + if (_$form.attr('data-check-form-on-close') !== 'false') { _$form.needConfirmationOnUnsavedClose(_$modal); } diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Widgets/Volo.Abp.AspNetCore.Mvc.UI.Widgets.csproj b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Widgets/Volo.Abp.AspNetCore.Mvc.UI.Widgets.csproj index 9d0f384611..6b4d98ec28 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Widgets/Volo.Abp.AspNetCore.Mvc.UI.Widgets.csproj +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Widgets/Volo.Abp.AspNetCore.Mvc.UI.Widgets.csproj @@ -4,7 +4,7 @@ - netcoreapp3.1 + net5.0 true Volo.Abp.AspNetCore.Mvc.UI.Widgets Volo.Abp.AspNetCore.Mvc.UI.Widgets diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo.Abp.AspNetCore.Mvc.UI.csproj b/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo.Abp.AspNetCore.Mvc.UI.csproj index 99a9357392..208cfa1376 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo.Abp.AspNetCore.Mvc.UI.csproj +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo.Abp.AspNetCore.Mvc.UI.csproj @@ -4,7 +4,7 @@ - netcoreapp3.1 + net5.0 true Volo.Abp.AspNetCore.Mvc.UI Volo.Abp.AspNetCore.Mvc.UI diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo.Abp.AspNetCore.Mvc.csproj b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo.Abp.AspNetCore.Mvc.csproj index e564dec738..3e691f57f3 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo.Abp.AspNetCore.Mvc.csproj +++ b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo.Abp.AspNetCore.Mvc.csproj @@ -4,7 +4,7 @@ - netcoreapp3.1 + net5.0 true Volo.Abp.AspNetCore.Mvc Volo.Abp.AspNetCore.Mvc @@ -27,9 +27,9 @@ - + - + diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AbpAspNetCoreMvcModule.cs b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AbpAspNetCoreMvcModule.cs index 88a81fa1ec..3097a3c725 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AbpAspNetCoreMvcModule.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AbpAspNetCoreMvcModule.cs @@ -22,6 +22,7 @@ using Microsoft.AspNetCore.Routing; using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Localization; using Volo.Abp.ApiVersioning; +using Volo.Abp.AspNetCore.Mvc.AntiForgery; using Volo.Abp.AspNetCore.Mvc.ApiExploring; using Volo.Abp.AspNetCore.Mvc.Conventions; using Volo.Abp.AspNetCore.Mvc.DataAnnotations; @@ -94,7 +95,10 @@ namespace Volo.Abp.AspNetCore.Mvc } }); - var mvcCoreBuilder = context.Services.AddMvcCore(); + var mvcCoreBuilder = context.Services.AddMvcCore(options => + { + options.Filters.Add(new AbpAutoValidateAntiforgeryTokenAttribute()); + }); context.Services.ExecutePreConfiguredActions(mvcCoreBuilder); var abpMvcDataAnnotationsLocalizationOptions = context.Services diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AbpMvcOptionsExtensions.cs b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AbpMvcOptionsExtensions.cs index a2f1b1b523..9ff444001b 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AbpMvcOptionsExtensions.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AbpMvcOptionsExtensions.cs @@ -1,6 +1,7 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.DependencyInjection; using Volo.Abp.AspNetCore.Mvc.Auditing; +using Volo.Abp.AspNetCore.Mvc.Content; using Volo.Abp.AspNetCore.Mvc.Conventions; using Volo.Abp.AspNetCore.Mvc.ExceptionHandling; using Volo.Abp.AspNetCore.Mvc.Features; @@ -21,6 +22,13 @@ namespace Volo.Abp.AspNetCore.Mvc AddPageFilters(options); AddModelBinders(options); AddMetadataProviders(options, services); + AddFormatters(options); + } + + private static void AddFormatters(MvcOptions options) + { + options.InputFormatters.Insert(0, new RemoteStreamContentInputFormatter()); + options.OutputFormatters.Insert(0, new RemoteStreamContentOutputFormatter()); } private static void AddConventions(MvcOptions options, IServiceCollection services) diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AntiForgery/AbpAntiForgeryCookieNameProvider.cs b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AntiForgery/AbpAntiForgeryCookieNameProvider.cs new file mode 100644 index 0000000000..66cd8701de --- /dev/null +++ b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AntiForgery/AbpAntiForgeryCookieNameProvider.cs @@ -0,0 +1,35 @@ +using Microsoft.AspNetCore.Authentication.Cookies; +using Microsoft.Extensions.Options; +using Volo.Abp.DependencyInjection; + +namespace Volo.Abp.AspNetCore.Mvc.AntiForgery +{ + public class AbpAntiForgeryCookieNameProvider : ITransientDependency + { + private readonly IOptionsSnapshot _namedOptionsAccessor; + private readonly AbpAntiForgeryOptions _abpAntiForgeryOptions; + + public AbpAntiForgeryCookieNameProvider( + IOptionsSnapshot namedOptionsAccessor, + IOptions abpAntiForgeryOptions) + { + _namedOptionsAccessor = namedOptionsAccessor; + _abpAntiForgeryOptions = abpAntiForgeryOptions.Value; + } + + public virtual string GetAuthCookieNameOrNull() + { + if (_abpAntiForgeryOptions.AuthCookieSchemaName == null) + { + return null; + } + + return _namedOptionsAccessor.Get(_abpAntiForgeryOptions.AuthCookieSchemaName)?.Cookie?.Name; + } + + public virtual string GetAntiForgeryCookieNameOrNull() + { + return _abpAntiForgeryOptions.TokenCookie.Name; + } + } +} diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AntiForgery/AbpAntiForgeryManagerAspNetCoreExtensions.cs b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AntiForgery/AbpAntiForgeryManagerAspNetCoreExtensions.cs deleted file mode 100644 index c5c992b364..0000000000 --- a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AntiForgery/AbpAntiForgeryManagerAspNetCoreExtensions.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace Volo.Abp.AspNetCore.Mvc.AntiForgery -{ - public static class AbpAntiForgeryManagerAspNetCoreExtensions - { - public static void SetCookie(this IAbpAntiForgeryManager manager) - { - manager.HttpContext.Response.Cookies.Append(manager.Options.TokenCookieName, manager.GenerateToken()); - } - } -} \ No newline at end of file diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AntiForgery/AbpAntiForgeryOptions.cs b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AntiForgery/AbpAntiForgeryOptions.cs index 0dc573fd5d..197cab8ac6 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AntiForgery/AbpAntiForgeryOptions.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AntiForgery/AbpAntiForgeryOptions.cs @@ -1,23 +1,69 @@ -namespace Volo.Abp.AspNetCore.Mvc.AntiForgery +using System; +using System.Collections.Generic; +using JetBrains.Annotations; +using Microsoft.AspNetCore.Http; + +namespace Volo.Abp.AspNetCore.Mvc.AntiForgery { public class AbpAntiForgeryOptions { /// - /// Get/sets cookie name to transfer Anti Forgery token between server and client. - /// Default value: "XSRF-TOKEN". + /// Use to set the cookie options to transfer Anti Forgery token between server and client. + /// Default name of the cookie: "XSRF-TOKEN". /// - public string TokenCookieName { get; set; } + public CookieBuilder TokenCookie { get; } /// - /// Get/sets header name to transfer Anti Forgery token from client to the server. - /// Default value: "X-XSRF-TOKEN". + /// Used to find auth cookie when validating Anti Forgery token. + /// Default value: "Identity.Application". /// - public string TokenHeaderName { get; set; } + public string AuthCookieSchemaName { get; set; } + + /// + /// Default value: true. + /// + public bool AutoValidate { get; set; } = true; + + /// + /// A predicate to filter types to auto-validate. + /// Return true to select the type to validate. + /// Default: returns true for all given types. + /// + [NotNull] + public Predicate AutoValidateFilter + { + get => _autoValidateFilter; + set => _autoValidateFilter = Check.NotNull(value, nameof(value)); + } + private Predicate _autoValidateFilter; + + /// + /// Default methods: "GET", "HEAD", "TRACE", "OPTIONS". + /// + [NotNull] + public HashSet AutoValidateIgnoredHttpMethods + { + get => _autoValidateIgnoredHttpMethods; + set => _autoValidateIgnoredHttpMethods = Check.NotNull(value, nameof(value)); + } + private HashSet _autoValidateIgnoredHttpMethods; public AbpAntiForgeryOptions() { - TokenCookieName = "XSRF-TOKEN"; - TokenHeaderName = "X-XSRF-TOKEN"; + AutoValidateFilter = type => true; + + TokenCookie = new CookieBuilder + { + Name = "XSRF-TOKEN", + HttpOnly = false, + IsEssential = true, + SameSite = SameSiteMode.None, + Expiration = TimeSpan.FromDays(3650) //10 years! + }; + + AuthCookieSchemaName = "Identity.Application"; + + AutoValidateIgnoredHttpMethods = new HashSet {"GET", "HEAD", "TRACE", "OPTIONS"}; } } -} \ No newline at end of file +} diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AntiForgery/AbpAutoValidateAntiforgeryTokenAttribute.cs b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AntiForgery/AbpAutoValidateAntiforgeryTokenAttribute.cs new file mode 100644 index 0000000000..346d5e9db4 --- /dev/null +++ b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AntiForgery/AbpAutoValidateAntiforgeryTokenAttribute.cs @@ -0,0 +1,37 @@ +using System; +using Microsoft.AspNetCore.Mvc.Filters; +using Microsoft.Extensions.DependencyInjection; + +namespace Volo.Abp.AspNetCore.Mvc.AntiForgery +{ + [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = false, Inherited = true)] + public class AbpAutoValidateAntiforgeryTokenAttribute : Attribute, IFilterFactory, IOrderedFilter + { + /// + /// Gets the order value for determining the order of execution of filters. Filters execute in + /// ascending numeric value of the property. + /// + /// + /// + /// Filters are executed in a sequence determined by an ascending sort of the property. + /// + /// + /// The default Order for this attribute is 1000 because it must run after any filter which does authentication + /// or login in order to allow them to behave as expected (ie Unauthenticated or Redirect instead of 400). + /// + /// + /// Look at for more detailed info. + /// + /// + public int Order { get; set; } = 1000; + + /// + public bool IsReusable => true; + + /// + public IFilterMetadata CreateInstance(IServiceProvider serviceProvider) + { + return serviceProvider.GetRequiredService(); + } + } +} diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AntiForgery/AbpAutoValidateAntiforgeryTokenAuthorizationFilter.cs b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AntiForgery/AbpAutoValidateAntiforgeryTokenAuthorizationFilter.cs new file mode 100644 index 0000000000..8affb3aa08 --- /dev/null +++ b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AntiForgery/AbpAutoValidateAntiforgeryTokenAuthorizationFilter.cs @@ -0,0 +1,65 @@ +using System; +using Microsoft.AspNetCore.Antiforgery; +using Microsoft.AspNetCore.Mvc.Abstractions; +using Microsoft.AspNetCore.Mvc.Filters; +using Microsoft.Extensions.Logging; +using Microsoft.Extensions.Options; +using Volo.Abp.DependencyInjection; + +namespace Volo.Abp.AspNetCore.Mvc.AntiForgery +{ + public class AbpAutoValidateAntiforgeryTokenAuthorizationFilter : AbpValidateAntiforgeryTokenAuthorizationFilter, ITransientDependency + { + private readonly AbpAntiForgeryOptions _options; + + public AbpAutoValidateAntiforgeryTokenAuthorizationFilter( + IAntiforgery antiforgery, + AbpAntiForgeryCookieNameProvider antiForgeryCookieNameProvider, + IOptions options, + ILogger logger) + : base( + antiforgery, + antiForgeryCookieNameProvider, + logger) + { + _options = options.Value; + } + + protected override bool ShouldValidate(AuthorizationFilterContext context) + { + if (!_options.AutoValidate) + { + return false; + } + + if(context.ActionDescriptor.IsControllerAction()) + { + var controllerType = context.ActionDescriptor + .AsControllerActionDescriptor() + .ControllerTypeInfo + .AsType(); + + if (!_options.AutoValidateFilter(controllerType)) + { + return false; + } + } + + if (IsIgnoredHttpMethod(context)) + { + return false; + } + + return base.ShouldValidate(context); + } + + protected virtual bool IsIgnoredHttpMethod(AuthorizationFilterContext context) + { + return context.HttpContext + .Request + .Method + .ToUpperInvariant() + .IsIn(_options.AutoValidateIgnoredHttpMethods); + } + } +} diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AntiForgery/AbpValidateAntiForgeryTokenAttribute.cs b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AntiForgery/AbpValidateAntiForgeryTokenAttribute.cs new file mode 100644 index 0000000000..853f642b29 --- /dev/null +++ b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AntiForgery/AbpValidateAntiForgeryTokenAttribute.cs @@ -0,0 +1,37 @@ +using System; +using Microsoft.AspNetCore.Mvc.Filters; +using Microsoft.Extensions.DependencyInjection; + +namespace Volo.Abp.AspNetCore.Mvc.AntiForgery +{ + [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = false, Inherited = true)] + public class AbpValidateAntiForgeryTokenAttribute : Attribute, IFilterFactory, IOrderedFilter + { + /// + /// Gets the order value for determining the order of execution of filters. Filters execute in + /// ascending numeric value of the property. + /// + /// + /// + /// Filters are executed in an ordering determined by an ascending sort of the property. + /// + /// + /// The default Order for this attribute is 1000 because it must run after any filter which does authentication + /// or login in order to allow them to behave as expected (ie Unauthenticated or Redirect instead of 400). + /// + /// + /// Look at for more detailed info. + /// + /// + public int Order { get; set; } = 1000; + + /// + public bool IsReusable => true; + + /// + public IFilterMetadata CreateInstance(IServiceProvider serviceProvider) + { + return serviceProvider.GetRequiredService(); + } + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AntiForgery/AbpValidateAntiforgeryTokenAuthorizationFilter.cs b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AntiForgery/AbpValidateAntiforgeryTokenAuthorizationFilter.cs new file mode 100644 index 0000000000..fd0c5e6a01 --- /dev/null +++ b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AntiForgery/AbpValidateAntiforgeryTokenAuthorizationFilter.cs @@ -0,0 +1,81 @@ +using System; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Antiforgery; +using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc.Filters; +using Microsoft.AspNetCore.Mvc.ViewFeatures; +using Microsoft.Extensions.Logging; +using Volo.Abp.DependencyInjection; + +namespace Volo.Abp.AspNetCore.Mvc.AntiForgery +{ + public class AbpValidateAntiforgeryTokenAuthorizationFilter : IAsyncAuthorizationFilter, IAntiforgeryPolicy, ITransientDependency + { + private IAntiforgery _antiforgery; + private readonly AbpAntiForgeryCookieNameProvider _antiForgeryCookieNameProvider; + private readonly ILogger _logger; + + public AbpValidateAntiforgeryTokenAuthorizationFilter( + IAntiforgery antiforgery, + AbpAntiForgeryCookieNameProvider antiForgeryCookieNameProvider, + ILogger logger) + { + _antiforgery = antiforgery; + _logger = logger; + _antiForgeryCookieNameProvider = antiForgeryCookieNameProvider; + } + + public async Task OnAuthorizationAsync(AuthorizationFilterContext context) + { + if (context == null) + { + throw new ArgumentNullException(nameof(context)); + } + + if (!context.IsEffectivePolicy(this)) + { + _logger.LogInformation("Skipping the execution of current filter as its not the most effective filter implementing the policy " + typeof(IAntiforgeryPolicy)); + return; + } + + if (ShouldValidate(context)) + { + try + { + await _antiforgery.ValidateRequestAsync(context.HttpContext); + } + catch (AntiforgeryValidationException exception) + { + _logger.LogError(exception.Message, exception); + context.Result = new AntiforgeryValidationFailedResult(); + } + } + } + + protected virtual bool ShouldValidate(AuthorizationFilterContext context) + { + var authCookieName = _antiForgeryCookieNameProvider.GetAuthCookieNameOrNull(); + + //Always perform antiforgery validation when request contains authentication cookie + if (authCookieName != null && + context.HttpContext.Request.Cookies.ContainsKey(authCookieName)) + { + return true; + } + + var antiForgeryCookieName = _antiForgeryCookieNameProvider.GetAntiForgeryCookieNameOrNull(); + + //No need to validate if antiforgery cookie is not sent. + //That means the request is sent from a non-browser client. + //See https://github.com/aspnet/Antiforgery/issues/115 + if (antiForgeryCookieName != null && + !context.HttpContext.Request.Cookies.ContainsKey(antiForgeryCookieName)) + { + return false; + } + + // Anything else requires a token. + return true; + } + } +} diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AntiForgery/AspNetCoreAbpAntiForgeryManager.cs b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AntiForgery/AspNetCoreAbpAntiForgeryManager.cs index f016c36671..cf8143c50a 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AntiForgery/AspNetCoreAbpAntiForgeryManager.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AntiForgery/AspNetCoreAbpAntiForgeryManager.cs @@ -7,9 +7,9 @@ namespace Volo.Abp.AspNetCore.Mvc.AntiForgery { public class AspNetCoreAbpAntiForgeryManager : IAbpAntiForgeryManager, ITransientDependency { - public AbpAntiForgeryOptions Options { get; } + protected AbpAntiForgeryOptions Options { get; } - public HttpContext HttpContext => _httpContextAccessor.HttpContext; + protected HttpContext HttpContext => _httpContextAccessor.HttpContext; private readonly IAntiforgery _antiforgery; private readonly IHttpContextAccessor _httpContextAccessor; @@ -24,14 +24,18 @@ namespace Volo.Abp.AspNetCore.Mvc.AntiForgery Options = options.Value; } - public void SetCookie() + public virtual void SetCookie() { - HttpContext.Response.Cookies.Append(Options.TokenCookieName, GenerateToken()); + HttpContext.Response.Cookies.Append( + Options.TokenCookie.Name, + GenerateToken(), + Options.TokenCookie.Build(HttpContext) + ); } - public string GenerateToken() + public virtual string GenerateToken() { return _antiforgery.GetAndStoreTokens(_httpContextAccessor.HttpContext).RequestToken; } } -} \ No newline at end of file +} diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AntiForgery/IAbpAntiForgeryManager.cs b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AntiForgery/IAbpAntiForgeryManager.cs index 359e857dcb..bd385c7538 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AntiForgery/IAbpAntiForgeryManager.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AntiForgery/IAbpAntiForgeryManager.cs @@ -1,13 +1,7 @@ -using Microsoft.AspNetCore.Http; - -namespace Volo.Abp.AspNetCore.Mvc.AntiForgery +namespace Volo.Abp.AspNetCore.Mvc.AntiForgery { public interface IAbpAntiForgeryManager { - AbpAntiForgeryOptions Options { get; } - - HttpContext HttpContext { get; } - void SetCookie(); string GenerateToken(); diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/AbpApplicationConfigurationController.cs b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/AbpApplicationConfigurationController.cs index 67c373585e..89282110b9 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/AbpApplicationConfigurationController.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/AbpApplicationConfigurationController.cs @@ -1,5 +1,6 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; +using Volo.Abp.AspNetCore.Mvc.AntiForgery; namespace Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations { @@ -9,17 +10,21 @@ namespace Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations public class AbpApplicationConfigurationController : AbpController, IAbpApplicationConfigurationAppService { private readonly IAbpApplicationConfigurationAppService _applicationConfigurationAppService; + private readonly IAbpAntiForgeryManager _antiForgeryManager; public AbpApplicationConfigurationController( - IAbpApplicationConfigurationAppService applicationConfigurationAppService) + IAbpApplicationConfigurationAppService applicationConfigurationAppService, + IAbpAntiForgeryManager antiForgeryManager) { _applicationConfigurationAppService = applicationConfigurationAppService; + _antiForgeryManager = antiForgeryManager; } [HttpGet] public async Task GetAsync() { + _antiForgeryManager.SetCookie(); return await _applicationConfigurationAppService.GetAsync(); } } -} \ No newline at end of file +} diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/AbpApplicationConfigurationScriptController.cs b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/AbpApplicationConfigurationScriptController.cs index d4ce99dc12..7a773d92eb 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/AbpApplicationConfigurationScriptController.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/AbpApplicationConfigurationScriptController.cs @@ -2,6 +2,7 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Options; +using Volo.Abp.AspNetCore.Mvc.AntiForgery; using Volo.Abp.Auditing; using Volo.Abp.Http; using Volo.Abp.Json; @@ -20,17 +21,20 @@ namespace Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations private readonly IJsonSerializer _jsonSerializer; private readonly AbpAspNetCoreMvcOptions _options; private readonly IJavascriptMinifier _javascriptMinifier; + private readonly IAbpAntiForgeryManager _antiForgeryManager; public AbpApplicationConfigurationScriptController( IAbpApplicationConfigurationAppService configurationAppService, IJsonSerializer jsonSerializer, IOptions options, - IJavascriptMinifier javascriptMinifier) + IJavascriptMinifier javascriptMinifier, + IAbpAntiForgeryManager antiForgeryManager) { _configurationAppService = configurationAppService; _jsonSerializer = jsonSerializer; _options = options.Value; _javascriptMinifier = javascriptMinifier; + _antiForgeryManager = antiForgeryManager; } [HttpGet] @@ -39,6 +43,8 @@ namespace Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations { var script = CreateAbpExtendScript(await _configurationAppService.GetAsync()); + _antiForgeryManager.SetCookie(); + return Content( _options.MinifyGeneratedScript == true ? _javascriptMinifier.Minify(script) diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AspNetCoreApiDescriptionModelProvider.cs b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AspNetCoreApiDescriptionModelProvider.cs index 617650d0e2..5cd1333f34 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AspNetCoreApiDescriptionModelProvider.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AspNetCoreApiDescriptionModelProvider.cs @@ -282,9 +282,20 @@ namespace Volo.Abp.AspNetCore.Mvc return; } + var parameterDescriptionNames = apiDescription + .ParameterDescriptions + .Select(p => p.Name) + .ToArray(); + + var methodParameterNames = method + .GetParameters() + .Where(IsNotFromServicesParameter) + .Select(GetMethodParamName) + .ToArray(); + var matchedMethodParamNames = ArrayMatcher.Match( - apiDescription.ParameterDescriptions.Select(p => p.Name).ToArray(), - method.GetParameters().Select(GetMethodParamName).ToArray() + parameterDescriptionNames, + methodParameterNames ); for (var i = 0; i < apiDescription.ParameterDescriptions.Count; i++) @@ -310,6 +321,11 @@ namespace Volo.Abp.AspNetCore.Mvc } } + private static bool IsNotFromServicesParameter(ParameterInfo parameterInfo) + { + return !parameterInfo.IsDefined(typeof(FromServicesAttribute), true); + } + public string GetMethodParamName(ParameterInfo parameterInfo) { var modelNameProvider = parameterInfo.GetCustomAttributes() diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Content/InternalRemoteStreamContent.cs b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Content/InternalRemoteStreamContent.cs new file mode 100644 index 0000000000..aaaa849f4f --- /dev/null +++ b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Content/InternalRemoteStreamContent.cs @@ -0,0 +1,25 @@ +using System.IO; +using Microsoft.AspNetCore.Http; +using Volo.Abp.Content; + +namespace Volo.Abp.AspNetCore.Mvc.Content +{ + internal class InternalRemoteStreamContent : IRemoteStreamContent + { + private readonly HttpContext _httpContext; + + public InternalRemoteStreamContent(HttpContext httpContext) + { + _httpContext = httpContext; + } + + public string ContentType => _httpContext.Request.ContentType; + + public long? ContentLength => _httpContext.Request.ContentLength; + + public Stream GetStream() + { + return _httpContext.Request.Body; + } + } +} diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Content/RemoteStreamContentInputFormatter.cs b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Content/RemoteStreamContentInputFormatter.cs new file mode 100644 index 0000000000..a4f5668b7d --- /dev/null +++ b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Content/RemoteStreamContentInputFormatter.cs @@ -0,0 +1,28 @@ +using System; +using System.Threading.Tasks; +using Microsoft.Net.Http.Headers; +using Microsoft.AspNetCore.Mvc.Formatters; +using Volo.Abp.Content; + +namespace Volo.Abp.AspNetCore.Mvc.Content +{ + public class RemoteStreamContentInputFormatter : InputFormatter + { + public RemoteStreamContentInputFormatter() + { + SupportedMediaTypes.Add(MediaTypeHeaderValue.Parse("*/*")); + } + + protected override bool CanReadType(Type type) + { + return typeof(IRemoteStreamContent) == type; + } + + public override Task ReadRequestBodyAsync(InputFormatterContext context) + { + return InputFormatterResult.SuccessAsync( + new InternalRemoteStreamContent(context.HttpContext) + ); + } + } +} diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Content/RemoteStreamContentOutputFormatter.cs b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Content/RemoteStreamContentOutputFormatter.cs new file mode 100644 index 0000000000..d3ecfaff27 --- /dev/null +++ b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Content/RemoteStreamContentOutputFormatter.cs @@ -0,0 +1,30 @@ +using System; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc.Formatters; +using Microsoft.Net.Http.Headers; +using Volo.Abp.Content; + +namespace Volo.Abp.AspNetCore.Mvc.Content +{ + public class RemoteStreamContentOutputFormatter : OutputFormatter + { + public RemoteStreamContentOutputFormatter() + { + SupportedMediaTypes.Add(MediaTypeHeaderValue.Parse("*/*")); + } + + protected override bool CanWriteType(Type type) + { + return typeof(IRemoteStreamContent).IsAssignableFrom(type); + } + + public async override Task WriteResponseBodyAsync(OutputFormatterWriteContext context) + { + var remoteStream = (IRemoteStreamContent)context.Object; + using (var stream = remoteStream.GetStream()) + { + await stream.CopyToAsync(context.HttpContext.Response.Body); + } + } + } +} diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Conventions/AbpServiceConvention.cs b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Conventions/AbpServiceConvention.cs index f19de585b9..ab2003a595 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Conventions/AbpServiceConvention.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Conventions/AbpServiceConvention.cs @@ -7,24 +7,30 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.ActionConstraints; using Microsoft.AspNetCore.Mvc.ApplicationModels; using Microsoft.AspNetCore.Mvc.ModelBinding; +using Microsoft.Extensions.Logging; +using Microsoft.Extensions.Logging.Abstractions; using Microsoft.Extensions.Options; using Volo.Abp.Application.Services; using Volo.Abp.DependencyInjection; using Volo.Abp.GlobalFeatures; using Volo.Abp.Http; using Volo.Abp.Http.Modeling; -using Volo.Abp.Http.ProxyScripting.Generators; using Volo.Abp.Reflection; namespace Volo.Abp.AspNetCore.Mvc.Conventions { public class AbpServiceConvention : IAbpServiceConvention, ITransientDependency { + public ILogger Logger { get; set; } + private readonly AbpAspNetCoreMvcOptions _options; - public AbpServiceConvention(IOptions options) + public AbpServiceConvention( + IOptions options) { _options = options.Value; + + Logger = NullLogger.Instance; } public void Apply(ApplicationModel application) @@ -34,9 +40,12 @@ namespace Volo.Abp.AspNetCore.Mvc.Conventions protected virtual void ApplyForControllers(ApplicationModel application) { + RemoveDuplicateControllers(application); + foreach (var controller in application.Controllers) { var controllerType = controller.ControllerType.AsType(); + var configuration = GetControllerSettingOrNull(controllerType); //TODO: We can remove different behaviour for ImplementsRemoteServiceInterface. If there is a configuration, then it should be applied! @@ -59,6 +68,26 @@ namespace Volo.Abp.AspNetCore.Mvc.Conventions } } + protected virtual void RemoveDuplicateControllers(ApplicationModel application) + { + var derivedControllerModels = new List(); + + foreach (var controllerModel in application.Controllers) + { + var baseControllerTypes = controllerModel.ControllerType + .GetBaseClasses(typeof(Controller), includeObject: false) + .Where(t => !t.IsAbstract) + .ToArray(); + if (baseControllerTypes.Length > 0) + { + derivedControllerModels.Add(controllerModel); + Logger.LogInformation($"Removing the controller {controllerModel.ControllerType.AssemblyQualifiedName} from the application model since it replaces the controller(s): {baseControllerTypes.Select(c => c.AssemblyQualifiedName).JoinAsString(", ")}"); + } + } + + application.Controllers.RemoveAll(derivedControllerModels); + } + protected virtual void ConfigureRemoteService(ControllerModel controller, [CanBeNull] ConventionalControllerSetting configuration) { ConfigureApiExplorer(controller); diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ModelBinding/AbpDateTimeModelBinderProvider.cs b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ModelBinding/AbpDateTimeModelBinderProvider.cs index fd55e2b61a..ddda91c8a0 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ModelBinding/AbpDateTimeModelBinderProvider.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ModelBinding/AbpDateTimeModelBinderProvider.cs @@ -6,6 +6,7 @@ using Volo.Abp.Timing; namespace Volo.Abp.AspNetCore.Mvc.ModelBinding { + public class AbpDateTimeModelBinderProvider : IModelBinderProvider { public IModelBinder GetBinder(ModelBinderProviderContext context) @@ -44,4 +45,4 @@ namespace Volo.Abp.AspNetCore.Mvc.ModelBinding return null; } } -} \ No newline at end of file +} diff --git a/framework/src/Volo.Abp.AspNetCore.Serilog/Volo.Abp.AspNetCore.Serilog.csproj b/framework/src/Volo.Abp.AspNetCore.Serilog/Volo.Abp.AspNetCore.Serilog.csproj index 348aeb0342..0015b4e237 100644 --- a/framework/src/Volo.Abp.AspNetCore.Serilog/Volo.Abp.AspNetCore.Serilog.csproj +++ b/framework/src/Volo.Abp.AspNetCore.Serilog/Volo.Abp.AspNetCore.Serilog.csproj @@ -4,7 +4,7 @@ - netcoreapp3.1 + net5.0 Volo.Abp.AspNetCore.Serilog Volo.Abp.AspNetCore.Serilog $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; diff --git a/framework/src/Volo.Abp.AspNetCore.SignalR/Volo.Abp.AspNetCore.SignalR.csproj b/framework/src/Volo.Abp.AspNetCore.SignalR/Volo.Abp.AspNetCore.SignalR.csproj index f4c833cb90..9fc69b34cc 100644 --- a/framework/src/Volo.Abp.AspNetCore.SignalR/Volo.Abp.AspNetCore.SignalR.csproj +++ b/framework/src/Volo.Abp.AspNetCore.SignalR/Volo.Abp.AspNetCore.SignalR.csproj @@ -4,7 +4,7 @@ - netcoreapp3.1 + net5.0 Volo.Abp.AspNetCore.SignalR Volo.Abp.AspNetCore.SignalR $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; diff --git a/framework/src/Volo.Abp.AspNetCore.TestBase/Volo.Abp.AspNetCore.TestBase.csproj b/framework/src/Volo.Abp.AspNetCore.TestBase/Volo.Abp.AspNetCore.TestBase.csproj index ce02e1f0a0..d571bf4d72 100644 --- a/framework/src/Volo.Abp.AspNetCore.TestBase/Volo.Abp.AspNetCore.TestBase.csproj +++ b/framework/src/Volo.Abp.AspNetCore.TestBase/Volo.Abp.AspNetCore.TestBase.csproj @@ -4,7 +4,7 @@ - netcoreapp3.1 + net5.0 Volo.Abp.AspNetCore.TestBase Volo.Abp.AspNetCore.TestBase $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; @@ -24,7 +24,7 @@ - + diff --git a/framework/src/Volo.Abp.AspNetCore/Microsoft/AspNetCore/RequestLocalization/DefaultAbpRequestLocalizationOptionsProvider.cs b/framework/src/Volo.Abp.AspNetCore/Microsoft/AspNetCore/RequestLocalization/DefaultAbpRequestLocalizationOptionsProvider.cs index 263d0532d0..001fc6a02d 100644 --- a/framework/src/Volo.Abp.AspNetCore/Microsoft/AspNetCore/RequestLocalization/DefaultAbpRequestLocalizationOptionsProvider.cs +++ b/framework/src/Volo.Abp.AspNetCore/Microsoft/AspNetCore/RequestLocalization/DefaultAbpRequestLocalizationOptionsProvider.cs @@ -5,7 +5,6 @@ using System.Linq; using System.Threading; using System.Threading.Tasks; using Microsoft.AspNetCore.Builder; -using Microsoft.AspNetCore.Identity; using Microsoft.AspNetCore.Localization; using Microsoft.Extensions.DependencyInjection; using Nito.AsyncEx; diff --git a/framework/src/Volo.Abp.AspNetCore/Volo.Abp.AspNetCore.csproj b/framework/src/Volo.Abp.AspNetCore/Volo.Abp.AspNetCore.csproj index 44458218b0..b191872339 100644 --- a/framework/src/Volo.Abp.AspNetCore/Volo.Abp.AspNetCore.csproj +++ b/framework/src/Volo.Abp.AspNetCore/Volo.Abp.AspNetCore.csproj @@ -4,7 +4,7 @@ - netcoreapp3.1 + net5.0 Volo.Abp.AspNetCore Volo.Abp.AspNetCore $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; diff --git a/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/VirtualFileSystem/AbpAspNetCoreContentOptions.cs b/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/VirtualFileSystem/AbpAspNetCoreContentOptions.cs index 92961971fb..102ac1b7c8 100644 --- a/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/VirtualFileSystem/AbpAspNetCoreContentOptions.cs +++ b/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/VirtualFileSystem/AbpAspNetCoreContentOptions.cs @@ -16,384 +16,386 @@ namespace Volo.Abp.AspNetCore.VirtualFileSystem { ContentTypeMaps = new Dictionary(StringComparer.OrdinalIgnoreCase) { - {".323", "text/h323"}, - {".3g2", "video/3gpp2"}, - {".3gp2", "video/3gpp2"}, - {".3gp", "video/3gpp"}, - {".3gpp", "video/3gpp"}, - {".aac", "audio/aac"}, - {".aaf", "application/octet-stream"}, - {".aca", "application/octet-stream"}, - {".accdb", "application/msaccess"}, - {".accde", "application/msaccess"}, - {".accdt", "application/msaccess"}, - {".acx", "application/internet-property-stream"}, - {".adt", "audio/vnd.dlna.adts"}, - {".adts", "audio/vnd.dlna.adts"}, - {".afm", "application/octet-stream"}, - {".ai", "application/postscript"}, - {".aif", "audio/x-aiff"}, - {".aifc", "audio/aiff"}, - {".aiff", "audio/aiff"}, - {".appcache", "text/cache-manifest"}, - {".application", "application/x-ms-application"}, - {".art", "image/x-jg"}, - {".asd", "application/octet-stream"}, - {".asf", "video/x-ms-asf"}, - {".asi", "application/octet-stream"}, - {".asm", "text/plain"}, - {".asr", "video/x-ms-asf"}, - {".asx", "video/x-ms-asf"}, - {".atom", "application/atom+xml"}, - {".au", "audio/basic"}, - {".avi", "video/x-msvideo"}, - {".axs", "application/olescript"}, - {".bas", "text/plain"}, - {".bcpio", "application/x-bcpio"}, - {".bin", "application/octet-stream"}, - {".bmp", "image/bmp"}, - {".c", "text/plain"}, - {".cab", "application/vnd.ms-cab-compressed"}, - {".calx", "application/vnd.ms-office.calx"}, - {".cat", "application/vnd.ms-pki.seccat"}, - {".cdf", "application/x-cdf"}, - {".chm", "application/octet-stream"}, - {".class", "application/x-java-applet"}, - {".clp", "application/x-msclip"}, - {".cmx", "image/x-cmx"}, - {".cnf", "text/plain"}, - {".cod", "image/cis-cod"}, - {".cpio", "application/x-cpio"}, - {".cpp", "text/plain"}, - {".crd", "application/x-mscardfile"}, - {".crl", "application/pkix-crl"}, - {".crt", "application/x-x509-ca-cert"}, - {".csh", "application/x-csh"}, - {".css", "text/css"}, - {".csv", "application/octet-stream"}, - {".cur", "application/octet-stream"}, - {".dcr", "application/x-director"}, - {".deploy", "application/octet-stream"}, - {".der", "application/x-x509-ca-cert"}, - {".dib", "image/bmp"}, - {".dir", "application/x-director"}, - {".disco", "text/xml"}, - {".dlm", "text/dlm"}, - {".doc", "application/msword"}, - {".docm", "application/vnd.ms-word.document.macroEnabled.12"}, - {".docx", "application/vnd.openxmlformats-officedocument.wordprocessingml.document"}, - {".dot", "application/msword"}, - {".dotm", "application/vnd.ms-word.template.macroEnabled.12"}, - {".dotx", "application/vnd.openxmlformats-officedocument.wordprocessingml.template"}, - {".dsp", "application/octet-stream"}, - {".dtd", "text/xml"}, - {".dvi", "application/x-dvi"}, - {".dvr-ms", "video/x-ms-dvr"}, - {".dwf", "drawing/x-dwf"}, - {".dwp", "application/octet-stream"}, - {".dxr", "application/x-director"}, - {".eml", "message/rfc822"}, - {".emz", "application/octet-stream"}, - {".eot", "application/vnd.ms-fontobject"}, - {".eps", "application/postscript"}, - {".etx", "text/x-setext"}, - {".evy", "application/envoy"}, - {".fdf", "application/vnd.fdf"}, - {".fif", "application/fractals"}, - {".fla", "application/octet-stream"}, - {".flr", "x-world/x-vrml"}, - {".flv", "video/x-flv"}, - {".gif", "image/gif"}, - {".gtar", "application/x-gtar"}, - {".gz", "application/x-gzip"}, - {".h", "text/plain"}, - {".hdf", "application/x-hdf"}, - {".hdml", "text/x-hdml"}, - {".hhc", "application/x-oleobject"}, - {".hhk", "application/octet-stream"}, - {".hhp", "application/octet-stream"}, - {".hlp", "application/winhlp"}, - {".hqx", "application/mac-binhex40"}, - {".hta", "application/hta"}, - {".htc", "text/x-component"}, - {".htm", "text/html"}, - {".html", "text/html"}, - {".htt", "text/webviewhtml"}, - {".hxt", "text/html"}, - {".ical", "text/calendar"}, - {".icalendar", "text/calendar"}, - {".ico", "image/x-icon"}, - {".ics", "text/calendar"}, - {".ief", "image/ief"}, - {".ifb", "text/calendar"}, - {".iii", "application/x-iphone"}, - {".inf", "application/octet-stream"}, - {".ins", "application/x-internet-signup"}, - {".isp", "application/x-internet-signup"}, - {".IVF", "video/x-ivf"}, - {".jar", "application/java-archive"}, - {".java", "application/octet-stream"}, - {".jck", "application/liquidmotion"}, - {".jcz", "application/liquidmotion"}, - {".jfif", "image/pjpeg"}, - {".jpb", "application/octet-stream"}, - {".jpe", "image/jpeg"}, - {".jpeg", "image/jpeg"}, - {".jpg", "image/jpeg"}, - {".js", "application/javascript"}, - {".json", "application/json"}, - {".jsx", "text/jscript"}, - {".latex", "application/x-latex"}, - {".lit", "application/x-ms-reader"}, - {".lpk", "application/octet-stream"}, - {".lsf", "video/x-la-asf"}, - {".lsx", "video/x-la-asf"}, - {".lzh", "application/octet-stream"}, - {".m13", "application/x-msmediaview"}, - {".m14", "application/x-msmediaview"}, - {".m1v", "video/mpeg"}, - {".m2ts", "video/vnd.dlna.mpeg-tts"}, - {".m3u", "audio/x-mpegurl"}, - {".m4a", "audio/mp4"}, - {".m4v", "video/mp4"}, - {".man", "application/x-troff-man"}, - {".manifest", "application/x-ms-manifest"}, - {".map", "text/plain"}, - {".markdown", "text/markdown"}, - {".md", "text/markdown"}, - {".mdb", "application/x-msaccess"}, - {".mdp", "application/octet-stream"}, - {".me", "application/x-troff-me"}, - {".mht", "message/rfc822"}, - {".mhtml", "message/rfc822"}, - {".mid", "audio/mid"}, - {".midi", "audio/mid"}, - {".mix", "application/octet-stream"}, - {".mmf", "application/x-smaf"}, - {".mno", "text/xml"}, - {".mny", "application/x-msmoney"}, - {".mov", "video/quicktime"}, - {".movie", "video/x-sgi-movie"}, - {".mp2", "video/mpeg"}, - {".mp3", "audio/mpeg"}, - {".mp4", "video/mp4"}, - {".mp4v", "video/mp4"}, - {".mpa", "video/mpeg"}, - {".mpe", "video/mpeg"}, - {".mpeg", "video/mpeg"}, - {".mpg", "video/mpeg"}, - {".mpp", "application/vnd.ms-project"}, - {".mpv2", "video/mpeg"}, - {".ms", "application/x-troff-ms"}, - {".msi", "application/octet-stream"}, - {".mso", "application/octet-stream"}, - {".mvb", "application/x-msmediaview"}, - {".mvc", "application/x-miva-compiled"}, - {".nc", "application/x-netcdf"}, - {".nsc", "video/x-ms-asf"}, - {".nws", "message/rfc822"}, - {".ocx", "application/octet-stream"}, - {".oda", "application/oda"}, - {".odc", "text/x-ms-odc"}, - {".ods", "application/oleobject"}, - {".oga", "audio/ogg"}, - {".ogg", "video/ogg"}, - {".ogv", "video/ogg"}, - {".ogx", "application/ogg"}, - {".one", "application/onenote"}, - {".onea", "application/onenote"}, - {".onetoc", "application/onenote"}, - {".onetoc2", "application/onenote"}, - {".onetmp", "application/onenote"}, - {".onepkg", "application/onenote"}, - {".osdx", "application/opensearchdescription+xml"}, - {".otf", "font/otf"}, - {".p10", "application/pkcs10"}, - {".p12", "application/x-pkcs12"}, - {".p7b", "application/x-pkcs7-certificates"}, - {".p7c", "application/pkcs7-mime"}, - {".p7m", "application/pkcs7-mime"}, - {".p7r", "application/x-pkcs7-certreqresp"}, - {".p7s", "application/pkcs7-signature"}, - {".pbm", "image/x-portable-bitmap"}, - {".pcx", "application/octet-stream"}, - {".pcz", "application/octet-stream"}, - {".pdf", "application/pdf"}, - {".pfb", "application/octet-stream"}, - {".pfm", "application/octet-stream"}, - {".pfx", "application/x-pkcs12"}, - {".pgm", "image/x-portable-graymap"}, - {".pko", "application/vnd.ms-pki.pko"}, - {".pma", "application/x-perfmon"}, - {".pmc", "application/x-perfmon"}, - {".pml", "application/x-perfmon"}, - {".pmr", "application/x-perfmon"}, - {".pmw", "application/x-perfmon"}, - {".png", "image/png"}, - {".pnm", "image/x-portable-anymap"}, - {".pnz", "image/png"}, - {".pot", "application/vnd.ms-powerpoint"}, - {".potm", "application/vnd.ms-powerpoint.template.macroEnabled.12"}, - {".potx", "application/vnd.openxmlformats-officedocument.presentationml.template"}, - {".ppam", "application/vnd.ms-powerpoint.addin.macroEnabled.12"}, - {".ppm", "image/x-portable-pixmap"}, - {".pps", "application/vnd.ms-powerpoint"}, - {".ppsm", "application/vnd.ms-powerpoint.slideshow.macroEnabled.12"}, - {".ppsx", "application/vnd.openxmlformats-officedocument.presentationml.slideshow"}, - {".ppt", "application/vnd.ms-powerpoint"}, - {".pptm", "application/vnd.ms-powerpoint.presentation.macroEnabled.12"}, - {".pptx", "application/vnd.openxmlformats-officedocument.presentationml.presentation"}, - {".prf", "application/pics-rules"}, - {".prm", "application/octet-stream"}, - {".prx", "application/octet-stream"}, - {".ps", "application/postscript"}, - {".psd", "application/octet-stream"}, - {".psm", "application/octet-stream"}, - {".psp", "application/octet-stream"}, - {".pub", "application/x-mspublisher"}, - {".qt", "video/quicktime"}, - {".qtl", "application/x-quicktimeplayer"}, - {".qxd", "application/octet-stream"}, - {".ra", "audio/x-pn-realaudio"}, - {".ram", "audio/x-pn-realaudio"}, - {".rar", "application/octet-stream"}, - {".ras", "image/x-cmu-raster"}, - {".rf", "image/vnd.rn-realflash"}, - {".rgb", "image/x-rgb"}, - {".rm", "application/vnd.rn-realmedia"}, - {".rmi", "audio/mid"}, - {".roff", "application/x-troff"}, - {".rpm", "audio/x-pn-realaudio-plugin"}, - {".rtf", "application/rtf"}, - {".rtx", "text/richtext"}, - {".scd", "application/x-msschedule"}, - {".sct", "text/scriptlet"}, - {".sea", "application/octet-stream"}, - {".setpay", "application/set-payment-initiation"}, - {".setreg", "application/set-registration-initiation"}, - {".sgml", "text/sgml"}, - {".sh", "application/x-sh"}, - {".shar", "application/x-shar"}, - {".sit", "application/x-stuffit"}, - {".sldm", "application/vnd.ms-powerpoint.slide.macroEnabled.12"}, - {".sldx", "application/vnd.openxmlformats-officedocument.presentationml.slide"}, - {".smd", "audio/x-smd"}, - {".smi", "application/octet-stream"}, - {".smx", "audio/x-smd"}, - {".smz", "audio/x-smd"}, - {".snd", "audio/basic"}, - {".snp", "application/octet-stream"}, - {".spc", "application/x-pkcs7-certificates"}, - {".spl", "application/futuresplash"}, - {".spx", "audio/ogg"}, - {".src", "application/x-wais-source"}, - {".ssm", "application/streamingmedia"}, - {".sst", "application/vnd.ms-pki.certstore"}, - {".stl", "application/vnd.ms-pki.stl"}, - {".sv4cpio", "application/x-sv4cpio"}, - {".sv4crc", "application/x-sv4crc"}, - {".svg", "image/svg+xml"}, - {".svgz", "image/svg+xml"}, - {".swf", "application/x-shockwave-flash"}, - {".t", "application/x-troff"}, - {".tar", "application/x-tar"}, - {".tcl", "application/x-tcl"}, - {".tex", "application/x-tex"}, - {".texi", "application/x-texinfo"}, - {".texinfo", "application/x-texinfo"}, - {".tgz", "application/x-compressed"}, - {".thmx", "application/vnd.ms-officetheme"}, - {".thn", "application/octet-stream"}, - {".tif", "image/tiff"}, - {".tiff", "image/tiff"}, - {".toc", "application/octet-stream"}, - {".tr", "application/x-troff"}, - {".trm", "application/x-msterminal"}, - {".ts", "video/vnd.dlna.mpeg-tts"}, - {".tsv", "text/tab-separated-values"}, - {".ttc", "application/x-font-ttf"}, - {".ttf", "application/x-font-ttf"}, - {".tts", "video/vnd.dlna.mpeg-tts"}, - {".txt", "text/plain"}, - {".u32", "application/octet-stream"}, - {".uls", "text/iuls"}, - {".ustar", "application/x-ustar"}, - {".vbs", "text/vbscript"}, - {".vcf", "text/x-vcard"}, - {".vcs", "text/plain"}, - {".vdx", "application/vnd.ms-visio.viewer"}, - {".vml", "text/xml"}, - {".vsd", "application/vnd.visio"}, - {".vss", "application/vnd.visio"}, - {".vst", "application/vnd.visio"}, - {".vsto", "application/x-ms-vsto"}, - {".vsw", "application/vnd.visio"}, - {".vsx", "application/vnd.visio"}, - {".vtx", "application/vnd.visio"}, - {".wasm", "application/wasm"}, - {".wav", "audio/wav"}, - {".wax", "audio/x-ms-wax"}, - {".wbmp", "image/vnd.wap.wbmp"}, - {".wcm", "application/vnd.ms-works"}, - {".wdb", "application/vnd.ms-works"}, - {".webm", "video/webm"}, - {".webp", "image/webp"}, - {".wks", "application/vnd.ms-works"}, - {".wm", "video/x-ms-wm"}, - {".wma", "audio/x-ms-wma"}, - {".wmd", "application/x-ms-wmd"}, - {".wmf", "application/x-msmetafile"}, - {".wml", "text/vnd.wap.wml"}, - {".wmlc", "application/vnd.wap.wmlc"}, - {".wmls", "text/vnd.wap.wmlscript"}, - {".wmlsc", "application/vnd.wap.wmlscriptc"}, - {".wmp", "video/x-ms-wmp"}, - {".wmv", "video/x-ms-wmv"}, - {".wmx", "video/x-ms-wmx"}, - {".wmz", "application/x-ms-wmz"}, - {".woff", "application/font-woff"}, // https://www.w3.org/TR/WOFF/#appendix-b - {".woff2", "font/woff2"}, // https://www.w3.org/TR/WOFF2/#IMT - {".wps", "application/vnd.ms-works"}, - {".wri", "application/x-mswrite"}, - {".wrl", "x-world/x-vrml"}, - {".wrz", "x-world/x-vrml"}, - {".wsdl", "text/xml"}, - {".wtv", "video/x-ms-wtv"}, - {".wvx", "video/x-ms-wvx"}, - {".x", "application/directx"}, - {".xaf", "x-world/x-vrml"}, - {".xaml", "application/xaml+xml"}, - {".xap", "application/x-silverlight-app"}, - {".xbap", "application/x-ms-xbap"}, - {".xbm", "image/x-xbitmap"}, - {".xdr", "text/plain"}, - {".xht", "application/xhtml+xml"}, - {".xhtml", "application/xhtml+xml"}, - {".xla", "application/vnd.ms-excel"}, - {".xlam", "application/vnd.ms-excel.addin.macroEnabled.12"}, - {".xlc", "application/vnd.ms-excel"}, - {".xlm", "application/vnd.ms-excel"}, - {".xls", "application/vnd.ms-excel"}, - {".xlsb", "application/vnd.ms-excel.sheet.binary.macroEnabled.12"}, - {".xlsm", "application/vnd.ms-excel.sheet.macroEnabled.12"}, - {".xlsx", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}, - {".xlt", "application/vnd.ms-excel"}, - {".xltm", "application/vnd.ms-excel.template.macroEnabled.12"}, - {".xltx", "application/vnd.openxmlformats-officedocument.spreadsheetml.template"}, - {".xlw", "application/vnd.ms-excel"}, - {".xml", "text/xml"}, - {".xof", "x-world/x-vrml"}, - {".xpm", "image/x-xpixmap"}, - {".xps", "application/vnd.ms-xpsdocument"}, - {".xsd", "text/xml"}, - {".xsf", "text/xml"}, - {".xsl", "text/xml"}, - {".xslt", "text/xml"}, - {".xsn", "application/octet-stream"}, - {".xtp", "application/octet-stream"}, - {".xwd", "image/x-xwindowdump"}, - {".z", "application/x-compress"}, - {".zip", "application/x-zip-compressed"}, + { ".323", "text/h323" }, + { ".3g2", "video/3gpp2" }, + { ".3gp2", "video/3gpp2" }, + { ".3gp", "video/3gpp" }, + { ".3gpp", "video/3gpp" }, + { ".aac", "audio/aac" }, + { ".aaf", "application/octet-stream" }, + { ".aca", "application/octet-stream" }, + { ".accdb", "application/msaccess" }, + { ".accde", "application/msaccess" }, + { ".accdt", "application/msaccess" }, + { ".acx", "application/internet-property-stream" }, + { ".adt", "audio/vnd.dlna.adts" }, + { ".adts", "audio/vnd.dlna.adts" }, + { ".afm", "application/octet-stream" }, + { ".ai", "application/postscript" }, + { ".aif", "audio/x-aiff" }, + { ".aifc", "audio/aiff" }, + { ".aiff", "audio/aiff" }, + { ".appcache", "text/cache-manifest" }, + { ".application", "application/x-ms-application" }, + { ".art", "image/x-jg" }, + { ".asd", "application/octet-stream" }, + { ".asf", "video/x-ms-asf" }, + { ".asi", "application/octet-stream" }, + { ".asm", "text/plain" }, + { ".asr", "video/x-ms-asf" }, + { ".asx", "video/x-ms-asf" }, + { ".atom", "application/atom+xml" }, + { ".au", "audio/basic" }, + { ".avi", "video/x-msvideo" }, + { ".axs", "application/olescript" }, + { ".bas", "text/plain" }, + { ".bcpio", "application/x-bcpio" }, + { ".bin", "application/octet-stream" }, + { ".bmp", "image/bmp" }, + { ".c", "text/plain" }, + { ".cab", "application/vnd.ms-cab-compressed" }, + { ".calx", "application/vnd.ms-office.calx" }, + { ".cat", "application/vnd.ms-pki.seccat" }, + { ".cdf", "application/x-cdf" }, + { ".chm", "application/octet-stream" }, + { ".class", "application/x-java-applet" }, + { ".clp", "application/x-msclip" }, + { ".cmx", "image/x-cmx" }, + { ".cnf", "text/plain" }, + { ".cod", "image/cis-cod" }, + { ".cpio", "application/x-cpio" }, + { ".cpp", "text/plain" }, + { ".crd", "application/x-mscardfile" }, + { ".crl", "application/pkix-crl" }, + { ".crt", "application/x-x509-ca-cert" }, + { ".csh", "application/x-csh" }, + { ".css", "text/css" }, + { ".csv", "text/csv" }, // https://tools.ietf.org/html/rfc7111#section-5.1 + { ".cur", "application/octet-stream" }, + { ".dcr", "application/x-director" }, + { ".deploy", "application/octet-stream" }, + { ".der", "application/x-x509-ca-cert" }, + { ".dib", "image/bmp" }, + { ".dir", "application/x-director" }, + { ".disco", "text/xml" }, + { ".dlm", "text/dlm" }, + { ".doc", "application/msword" }, + { ".docm", "application/vnd.ms-word.document.macroEnabled.12" }, + { ".docx", "application/vnd.openxmlformats-officedocument.wordprocessingml.document" }, + { ".dot", "application/msword" }, + { ".dotm", "application/vnd.ms-word.template.macroEnabled.12" }, + { ".dotx", "application/vnd.openxmlformats-officedocument.wordprocessingml.template" }, + { ".dsp", "application/octet-stream" }, + { ".dtd", "text/xml" }, + { ".dvi", "application/x-dvi" }, + { ".dvr-ms", "video/x-ms-dvr" }, + { ".dwf", "drawing/x-dwf" }, + { ".dwp", "application/octet-stream" }, + { ".dxr", "application/x-director" }, + { ".eml", "message/rfc822" }, + { ".emz", "application/octet-stream" }, + { ".eot", "application/vnd.ms-fontobject" }, + { ".eps", "application/postscript" }, + { ".etx", "text/x-setext" }, + { ".evy", "application/envoy" }, + { ".exe", "application/vnd.microsoft.portable-executable" }, // https://www.iana.org/assignments/media-types/application/vnd.microsoft.portable-executable + { ".fdf", "application/vnd.fdf" }, + { ".fif", "application/fractals" }, + { ".fla", "application/octet-stream" }, + { ".flr", "x-world/x-vrml" }, + { ".flv", "video/x-flv" }, + { ".gif", "image/gif" }, + { ".gtar", "application/x-gtar" }, + { ".gz", "application/x-gzip" }, + { ".h", "text/plain" }, + { ".hdf", "application/x-hdf" }, + { ".hdml", "text/x-hdml" }, + { ".hhc", "application/x-oleobject" }, + { ".hhk", "application/octet-stream" }, + { ".hhp", "application/octet-stream" }, + { ".hlp", "application/winhlp" }, + { ".hqx", "application/mac-binhex40" }, + { ".hta", "application/hta" }, + { ".htc", "text/x-component" }, + { ".htm", "text/html" }, + { ".html", "text/html" }, + { ".htt", "text/webviewhtml" }, + { ".hxt", "text/html" }, + { ".ical", "text/calendar" }, + { ".icalendar", "text/calendar" }, + { ".ico", "image/x-icon" }, + { ".ics", "text/calendar" }, + { ".ief", "image/ief" }, + { ".ifb", "text/calendar" }, + { ".iii", "application/x-iphone" }, + { ".inf", "application/octet-stream" }, + { ".ins", "application/x-internet-signup" }, + { ".isp", "application/x-internet-signup" }, + { ".IVF", "video/x-ivf" }, + { ".jar", "application/java-archive" }, + { ".java", "application/octet-stream" }, + { ".jck", "application/liquidmotion" }, + { ".jcz", "application/liquidmotion" }, + { ".jfif", "image/pjpeg" }, + { ".jpb", "application/octet-stream" }, + { ".jpe", "image/jpeg" }, + { ".jpeg", "image/jpeg" }, + { ".jpg", "image/jpeg" }, + { ".js", "application/javascript" }, + { ".json", "application/json" }, + { ".jsx", "text/jscript" }, + { ".latex", "application/x-latex" }, + { ".lit", "application/x-ms-reader" }, + { ".lpk", "application/octet-stream" }, + { ".lsf", "video/x-la-asf" }, + { ".lsx", "video/x-la-asf" }, + { ".lzh", "application/octet-stream" }, + { ".m13", "application/x-msmediaview" }, + { ".m14", "application/x-msmediaview" }, + { ".m1v", "video/mpeg" }, + { ".m2ts", "video/vnd.dlna.mpeg-tts" }, + { ".m3u", "audio/x-mpegurl" }, + { ".m4a", "audio/mp4" }, + { ".m4v", "video/mp4" }, + { ".man", "application/x-troff-man" }, + { ".manifest", "application/x-ms-manifest" }, + { ".map", "text/plain" }, + { ".markdown", "text/markdown" }, + { ".md", "text/markdown" }, + { ".mdb", "application/x-msaccess" }, + { ".mdp", "application/octet-stream" }, + { ".me", "application/x-troff-me" }, + { ".mht", "message/rfc822" }, + { ".mhtml", "message/rfc822" }, + { ".mid", "audio/mid" }, + { ".midi", "audio/mid" }, + { ".mix", "application/octet-stream" }, + { ".mmf", "application/x-smaf" }, + { ".mno", "text/xml" }, + { ".mny", "application/x-msmoney" }, + { ".mov", "video/quicktime" }, + { ".movie", "video/x-sgi-movie" }, + { ".mp2", "video/mpeg" }, + { ".mp3", "audio/mpeg" }, + { ".mp4", "video/mp4" }, + { ".mp4v", "video/mp4" }, + { ".mpa", "video/mpeg" }, + { ".mpe", "video/mpeg" }, + { ".mpeg", "video/mpeg" }, + { ".mpg", "video/mpeg" }, + { ".mpp", "application/vnd.ms-project" }, + { ".mpv2", "video/mpeg" }, + { ".ms", "application/x-troff-ms" }, + { ".msi", "application/octet-stream" }, + { ".mso", "application/octet-stream" }, + { ".mvb", "application/x-msmediaview" }, + { ".mvc", "application/x-miva-compiled" }, + { ".nc", "application/x-netcdf" }, + { ".nsc", "video/x-ms-asf" }, + { ".nws", "message/rfc822" }, + { ".ocx", "application/octet-stream" }, + { ".oda", "application/oda" }, + { ".odc", "text/x-ms-odc" }, + { ".ods", "application/oleobject" }, + { ".oga", "audio/ogg" }, + { ".ogg", "video/ogg" }, + { ".ogv", "video/ogg" }, + { ".ogx", "application/ogg" }, + { ".one", "application/onenote" }, + { ".onea", "application/onenote" }, + { ".onetoc", "application/onenote" }, + { ".onetoc2", "application/onenote" }, + { ".onetmp", "application/onenote" }, + { ".onepkg", "application/onenote" }, + { ".osdx", "application/opensearchdescription+xml" }, + { ".otf", "font/otf" }, + { ".p10", "application/pkcs10" }, + { ".p12", "application/x-pkcs12" }, + { ".p7b", "application/x-pkcs7-certificates" }, + { ".p7c", "application/pkcs7-mime" }, + { ".p7m", "application/pkcs7-mime" }, + { ".p7r", "application/x-pkcs7-certreqresp" }, + { ".p7s", "application/pkcs7-signature" }, + { ".pbm", "image/x-portable-bitmap" }, + { ".pcx", "application/octet-stream" }, + { ".pcz", "application/octet-stream" }, + { ".pdf", "application/pdf" }, + { ".pfb", "application/octet-stream" }, + { ".pfm", "application/octet-stream" }, + { ".pfx", "application/x-pkcs12" }, + { ".pgm", "image/x-portable-graymap" }, + { ".pko", "application/vnd.ms-pki.pko" }, + { ".pma", "application/x-perfmon" }, + { ".pmc", "application/x-perfmon" }, + { ".pml", "application/x-perfmon" }, + { ".pmr", "application/x-perfmon" }, + { ".pmw", "application/x-perfmon" }, + { ".png", "image/png" }, + { ".pnm", "image/x-portable-anymap" }, + { ".pnz", "image/png" }, + { ".pot", "application/vnd.ms-powerpoint" }, + { ".potm", "application/vnd.ms-powerpoint.template.macroEnabled.12" }, + { ".potx", "application/vnd.openxmlformats-officedocument.presentationml.template" }, + { ".ppam", "application/vnd.ms-powerpoint.addin.macroEnabled.12" }, + { ".ppm", "image/x-portable-pixmap" }, + { ".pps", "application/vnd.ms-powerpoint" }, + { ".ppsm", "application/vnd.ms-powerpoint.slideshow.macroEnabled.12" }, + { ".ppsx", "application/vnd.openxmlformats-officedocument.presentationml.slideshow" }, + { ".ppt", "application/vnd.ms-powerpoint" }, + { ".pptm", "application/vnd.ms-powerpoint.presentation.macroEnabled.12" }, + { ".pptx", "application/vnd.openxmlformats-officedocument.presentationml.presentation" }, + { ".prf", "application/pics-rules" }, + { ".prm", "application/octet-stream" }, + { ".prx", "application/octet-stream" }, + { ".ps", "application/postscript" }, + { ".psd", "application/octet-stream" }, + { ".psm", "application/octet-stream" }, + { ".psp", "application/octet-stream" }, + { ".pub", "application/x-mspublisher" }, + { ".qt", "video/quicktime" }, + { ".qtl", "application/x-quicktimeplayer" }, + { ".qxd", "application/octet-stream" }, + { ".ra", "audio/x-pn-realaudio" }, + { ".ram", "audio/x-pn-realaudio" }, + { ".rar", "application/octet-stream" }, + { ".ras", "image/x-cmu-raster" }, + { ".rf", "image/vnd.rn-realflash" }, + { ".rgb", "image/x-rgb" }, + { ".rm", "application/vnd.rn-realmedia" }, + { ".rmi", "audio/mid" }, + { ".roff", "application/x-troff" }, + { ".rpm", "audio/x-pn-realaudio-plugin" }, + { ".rtf", "application/rtf" }, + { ".rtx", "text/richtext" }, + { ".scd", "application/x-msschedule" }, + { ".sct", "text/scriptlet" }, + { ".sea", "application/octet-stream" }, + { ".setpay", "application/set-payment-initiation" }, + { ".setreg", "application/set-registration-initiation" }, + { ".sgml", "text/sgml" }, + { ".sh", "application/x-sh" }, + { ".shar", "application/x-shar" }, + { ".sit", "application/x-stuffit" }, + { ".sldm", "application/vnd.ms-powerpoint.slide.macroEnabled.12" }, + { ".sldx", "application/vnd.openxmlformats-officedocument.presentationml.slide" }, + { ".smd", "audio/x-smd" }, + { ".smi", "application/octet-stream" }, + { ".smx", "audio/x-smd" }, + { ".smz", "audio/x-smd" }, + { ".snd", "audio/basic" }, + { ".snp", "application/octet-stream" }, + { ".spc", "application/x-pkcs7-certificates" }, + { ".spl", "application/futuresplash" }, + { ".spx", "audio/ogg" }, + { ".src", "application/x-wais-source" }, + { ".ssm", "application/streamingmedia" }, + { ".sst", "application/vnd.ms-pki.certstore" }, + { ".stl", "application/vnd.ms-pki.stl" }, + { ".sv4cpio", "application/x-sv4cpio" }, + { ".sv4crc", "application/x-sv4crc" }, + { ".svg", "image/svg+xml" }, + { ".svgz", "image/svg+xml" }, + { ".swf", "application/x-shockwave-flash" }, + { ".t", "application/x-troff" }, + { ".tar", "application/x-tar" }, + { ".tcl", "application/x-tcl" }, + { ".tex", "application/x-tex" }, + { ".texi", "application/x-texinfo" }, + { ".texinfo", "application/x-texinfo" }, + { ".tgz", "application/x-compressed" }, + { ".thmx", "application/vnd.ms-officetheme" }, + { ".thn", "application/octet-stream" }, + { ".tif", "image/tiff" }, + { ".tiff", "image/tiff" }, + { ".toc", "application/octet-stream" }, + { ".tr", "application/x-troff" }, + { ".trm", "application/x-msterminal" }, + { ".ts", "video/vnd.dlna.mpeg-tts" }, + { ".tsv", "text/tab-separated-values" }, + { ".ttc", "application/x-font-ttf" }, + { ".ttf", "application/x-font-ttf" }, + { ".tts", "video/vnd.dlna.mpeg-tts" }, + { ".txt", "text/plain" }, + { ".u32", "application/octet-stream" }, + { ".uls", "text/iuls" }, + { ".ustar", "application/x-ustar" }, + { ".vbs", "text/vbscript" }, + { ".vcf", "text/x-vcard" }, + { ".vcs", "text/plain" }, + { ".vdx", "application/vnd.ms-visio.viewer" }, + { ".vml", "text/xml" }, + { ".vsd", "application/vnd.visio" }, + { ".vss", "application/vnd.visio" }, + { ".vst", "application/vnd.visio" }, + { ".vsto", "application/x-ms-vsto" }, + { ".vsw", "application/vnd.visio" }, + { ".vsx", "application/vnd.visio" }, + { ".vtx", "application/vnd.visio" }, + { ".wasm", "application/wasm" }, + { ".wav", "audio/wav" }, + { ".wax", "audio/x-ms-wax" }, + { ".wbmp", "image/vnd.wap.wbmp" }, + { ".wcm", "application/vnd.ms-works" }, + { ".wdb", "application/vnd.ms-works" }, + { ".webm", "video/webm" }, + { ".webmanifest", "application/manifest+json" }, // https://w3c.github.io/manifest/#media-type-registration + { ".webp", "image/webp" }, + { ".wks", "application/vnd.ms-works" }, + { ".wm", "video/x-ms-wm" }, + { ".wma", "audio/x-ms-wma" }, + { ".wmd", "application/x-ms-wmd" }, + { ".wmf", "application/x-msmetafile" }, + { ".wml", "text/vnd.wap.wml" }, + { ".wmlc", "application/vnd.wap.wmlc" }, + { ".wmls", "text/vnd.wap.wmlscript" }, + { ".wmlsc", "application/vnd.wap.wmlscriptc" }, + { ".wmp", "video/x-ms-wmp" }, + { ".wmv", "video/x-ms-wmv" }, + { ".wmx", "video/x-ms-wmx" }, + { ".wmz", "application/x-ms-wmz" }, + { ".woff", "application/font-woff" }, // https://www.w3.org/TR/WOFF/#appendix-b + { ".woff2", "font/woff2" }, // https://www.w3.org/TR/WOFF2/#IMT + { ".wps", "application/vnd.ms-works" }, + { ".wri", "application/x-mswrite" }, + { ".wrl", "x-world/x-vrml" }, + { ".wrz", "x-world/x-vrml" }, + { ".wsdl", "text/xml" }, + { ".wtv", "video/x-ms-wtv" }, + { ".wvx", "video/x-ms-wvx" }, + { ".x", "application/directx" }, + { ".xaf", "x-world/x-vrml" }, + { ".xaml", "application/xaml+xml" }, + { ".xap", "application/x-silverlight-app" }, + { ".xbap", "application/x-ms-xbap" }, + { ".xbm", "image/x-xbitmap" }, + { ".xdr", "text/plain" }, + { ".xht", "application/xhtml+xml" }, + { ".xhtml", "application/xhtml+xml" }, + { ".xla", "application/vnd.ms-excel" }, + { ".xlam", "application/vnd.ms-excel.addin.macroEnabled.12" }, + { ".xlc", "application/vnd.ms-excel" }, + { ".xlm", "application/vnd.ms-excel" }, + { ".xls", "application/vnd.ms-excel" }, + { ".xlsb", "application/vnd.ms-excel.sheet.binary.macroEnabled.12" }, + { ".xlsm", "application/vnd.ms-excel.sheet.macroEnabled.12" }, + { ".xlsx", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" }, + { ".xlt", "application/vnd.ms-excel" }, + { ".xltm", "application/vnd.ms-excel.template.macroEnabled.12" }, + { ".xltx", "application/vnd.openxmlformats-officedocument.spreadsheetml.template" }, + { ".xlw", "application/vnd.ms-excel" }, + { ".xml", "text/xml" }, + { ".xof", "x-world/x-vrml" }, + { ".xpm", "image/x-xpixmap" }, + { ".xps", "application/vnd.ms-xpsdocument" }, + { ".xsd", "text/xml" }, + { ".xsf", "text/xml" }, + { ".xsl", "text/xml" }, + { ".xslt", "text/xml" }, + { ".xsn", "application/octet-stream" }, + { ".xtp", "application/octet-stream" }, + { ".xwd", "image/x-xwindowdump" }, + { ".z", "application/x-compress" }, + { ".zip", "application/x-zip-compressed" } }; AllowedExtraWebContentFolders = new List diff --git a/framework/src/Volo.Abp.Authorization/Volo.Abp.Authorization.csproj b/framework/src/Volo.Abp.Authorization/Volo.Abp.Authorization.csproj index a7e76714c2..edfe716335 100644 --- a/framework/src/Volo.Abp.Authorization/Volo.Abp.Authorization.csproj +++ b/framework/src/Volo.Abp.Authorization/Volo.Abp.Authorization.csproj @@ -15,7 +15,7 @@ - + diff --git a/framework/src/Volo.Abp.Autofac.WebAssembly/Volo.Abp.Autofac.WebAssembly.csproj b/framework/src/Volo.Abp.Autofac.WebAssembly/Volo.Abp.Autofac.WebAssembly.csproj index 6d03439a85..511aac6dba 100644 --- a/framework/src/Volo.Abp.Autofac.WebAssembly/Volo.Abp.Autofac.WebAssembly.csproj +++ b/framework/src/Volo.Abp.Autofac.WebAssembly/Volo.Abp.Autofac.WebAssembly.csproj @@ -4,7 +4,7 @@ - netstandard2.1 + net5.0 diff --git a/framework/src/Volo.Abp.Autofac/Volo.Abp.Autofac.csproj b/framework/src/Volo.Abp.Autofac/Volo.Abp.Autofac.csproj index 85a8541e26..ae61d6b870 100644 --- a/framework/src/Volo.Abp.Autofac/Volo.Abp.Autofac.csproj +++ b/framework/src/Volo.Abp.Autofac/Volo.Abp.Autofac.csproj @@ -17,7 +17,7 @@ - + diff --git a/framework/src/Volo.Abp.BackgroundJobs.Quartz/Volo.Abp.BackgroundJobs.Quartz.csproj b/framework/src/Volo.Abp.BackgroundJobs.Quartz/Volo.Abp.BackgroundJobs.Quartz.csproj index 67c07f77d6..3b235be413 100644 --- a/framework/src/Volo.Abp.BackgroundJobs.Quartz/Volo.Abp.BackgroundJobs.Quartz.csproj +++ b/framework/src/Volo.Abp.BackgroundJobs.Quartz/Volo.Abp.BackgroundJobs.Quartz.csproj @@ -1,4 +1,4 @@ - + diff --git a/framework/src/Volo.Abp.BackgroundWorkers.Quartz/Volo.Abp.BackgroundWorkers.Quartz.csproj b/framework/src/Volo.Abp.BackgroundWorkers.Quartz/Volo.Abp.BackgroundWorkers.Quartz.csproj index 1a3ca4e254..4aad05aef7 100644 --- a/framework/src/Volo.Abp.BackgroundWorkers.Quartz/Volo.Abp.BackgroundWorkers.Quartz.csproj +++ b/framework/src/Volo.Abp.BackgroundWorkers.Quartz/Volo.Abp.BackgroundWorkers.Quartz.csproj @@ -1,4 +1,4 @@ - + diff --git a/framework/src/Volo.Abp.BlazoriseUI/AbpCrudPageBase.cs b/framework/src/Volo.Abp.BlazoriseUI/AbpCrudPageBase.cs index 7289ebe954..8723209c53 100644 --- a/framework/src/Volo.Abp.BlazoriseUI/AbpCrudPageBase.cs +++ b/framework/src/Volo.Abp.BlazoriseUI/AbpCrudPageBase.cs @@ -225,7 +225,7 @@ namespace Volo.Abp.BlazoriseUI { if (reference == null) { - reference = (TRef) ScopedServices.GetRequiredService(serviceType); + reference = (TRef)ScopedServices.GetRequiredService(serviceType); } return reference; @@ -266,7 +266,7 @@ namespace Volo.Abp.BlazoriseUI var input = await CreateGetListInputAsync(); var result = await AppService.GetListAsync(input); Entities = MapToListViewModel(result.Items); - TotalCount = (int?) result.TotalCount; + TotalCount = (int?)result.TotalCount; } private IReadOnlyList MapToListViewModel(IReadOnlyList dtos) diff --git a/framework/src/Volo.Abp.BlazoriseUI/BlazoriseUiMessageService.cs b/framework/src/Volo.Abp.BlazoriseUI/BlazoriseUiMessageService.cs new file mode 100644 index 0000000000..3e83166191 --- /dev/null +++ b/framework/src/Volo.Abp.BlazoriseUI/BlazoriseUiMessageService.cs @@ -0,0 +1,96 @@ +using System; +using System.Threading.Tasks; +using Localization.Resources.AbpUi; +using Microsoft.Extensions.Localization; +using Microsoft.Extensions.Logging; +using Microsoft.Extensions.Logging.Abstractions; +using Volo.Abp.AspNetCore.Components.WebAssembly; +using Volo.Abp.DependencyInjection; + +namespace Volo.Abp.BlazoriseUI +{ + [Dependency(ReplaceServices = true)] + public class BlazoriseUiMessageService : IUiMessageService, IScopedDependency + { + /// + /// An event raised after the message is received. Used to notify the message dialog. + /// + public event EventHandler MessageReceived; + + private readonly IStringLocalizer localizer; + + public ILogger Logger { get; set; } + + public BlazoriseUiMessageService( + IStringLocalizer localizer) + { + this.localizer = localizer; + + Logger = NullLogger.Instance; + } + + public Task InfoAsync(string message, string title = null, Action options = null) + { + var uiMessageOptions = CreateDefaultOptions(); + options?.Invoke(uiMessageOptions); + + MessageReceived?.Invoke(this, new UiMessageEventArgs(UiMessageType.Info, message, title, uiMessageOptions)); + + return Task.CompletedTask; + } + + public Task SuccessAsync(string message, string title = null, Action options = null) + { + var uiMessageOptions = CreateDefaultOptions(); + options?.Invoke(uiMessageOptions); + + MessageReceived?.Invoke(this, new UiMessageEventArgs(UiMessageType.Success, message, title, uiMessageOptions)); + + return Task.CompletedTask; + } + + public Task WarnAsync(string message, string title = null, Action options = null) + { + var uiMessageOptions = CreateDefaultOptions(); + options?.Invoke(uiMessageOptions); + + MessageReceived?.Invoke(this, new UiMessageEventArgs(UiMessageType.Warning, message, title, uiMessageOptions)); + + return Task.CompletedTask; + } + + public Task ErrorAsync(string message, string title = null, Action options = null) + { + var uiMessageOptions = CreateDefaultOptions(); + options?.Invoke(uiMessageOptions); + + MessageReceived?.Invoke(this, new UiMessageEventArgs(UiMessageType.Error, message, title, uiMessageOptions)); + + return Task.CompletedTask; + } + + public Task ConfirmAsync(string message, string title = null, Action options = null) + { + var uiMessageOptions = CreateDefaultOptions(); + options?.Invoke(uiMessageOptions); + + var callback = new TaskCompletionSource(); + + MessageReceived?.Invoke(this, new UiMessageEventArgs(UiMessageType.Confirmation, message, title, uiMessageOptions, callback)); + + return callback.Task; + } + + protected virtual UiMessageOptions CreateDefaultOptions() + { + return new UiMessageOptions + { + CenterMessage = true, + ShowMessageIcon = true, + OkButtonText = localizer["Ok"], + CancelButtonText = localizer["Cancel"], + ConfirmButtonText = localizer["Yes"], + }; + } + } +} diff --git a/framework/src/Volo.Abp.BlazoriseUI/BlazoriseUiNotificationService.cs b/framework/src/Volo.Abp.BlazoriseUI/BlazoriseUiNotificationService.cs index 5163e05467..549a1f4d07 100644 --- a/framework/src/Volo.Abp.BlazoriseUI/BlazoriseUiNotificationService.cs +++ b/framework/src/Volo.Abp.BlazoriseUI/BlazoriseUiNotificationService.cs @@ -21,5 +21,20 @@ namespace Volo.Abp.BlazoriseUI Logger.LogInformation(message); return Task.CompletedTask; } + + public Task Success(string message) + { + return Task.CompletedTask; + } + + public Task Warn(string message) + { + return Task.CompletedTask; + } + + public Task Error(string message) + { + return Task.CompletedTask; + } } } diff --git a/framework/src/Volo.Abp.BlazoriseUI/Components/UiMessageAlert.razor b/framework/src/Volo.Abp.BlazoriseUI/Components/UiMessageAlert.razor new file mode 100644 index 0000000000..cd8fd5cada --- /dev/null +++ b/framework/src/Volo.Abp.BlazoriseUI/Components/UiMessageAlert.razor @@ -0,0 +1,48 @@ + + + + + + @Title + + + + @if ( ShowMessageIcon ) + { + + + + } + @Message + + + @if ( IsConfirmation ) + { + + + } + else + { + + } + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.BlazoriseUI/Components/UiMessageAlert.razor.cs b/framework/src/Volo.Abp.BlazoriseUI/Components/UiMessageAlert.razor.cs new file mode 100644 index 0000000000..59e4aa3820 --- /dev/null +++ b/framework/src/Volo.Abp.BlazoriseUI/Components/UiMessageAlert.razor.cs @@ -0,0 +1,140 @@ +using System; +using System.Text; +using System.Threading.Tasks; +using Blazorise; +using Microsoft.AspNetCore.Components; +using Volo.Abp.AspNetCore.Components.WebAssembly; + +namespace Volo.Abp.BlazoriseUI.Components +{ + public partial class UiMessageAlert : ComponentBase, IDisposable + { + protected Modal ModalRef { get; set; } + + protected virtual bool IsConfirmation + => MessageType == UiMessageType.Confirmation; + + protected virtual bool CenterMessage + => Options?.CenterMessage ?? true; + + protected virtual bool ShowMessageIcon + => Options?.ShowMessageIcon ?? true; + + protected virtual object MessageIcon => Options?.MessageIcon ?? MessageType switch + { + UiMessageType.Info => IconName.Info, + UiMessageType.Success => IconName.Check, + UiMessageType.Warning => IconName.Exclamation, + UiMessageType.Error => IconName.Times, + UiMessageType.Confirmation => IconName.QuestionCircle, + _ => null, + }; + + protected virtual string MessageIconColor => MessageType switch + { + // gets the color in the order of importance: Blazorise > Bootstrap > fallback color + UiMessageType.Info => "var(--b-theme-info, var(--info, #17a2b8))", + UiMessageType.Success => "var(--b-theme-success, var(--success, #28a745))", + UiMessageType.Warning => "var(--b-theme-warning, var(--warning, #ffc107))", + UiMessageType.Error => "var(--b-theme-danger, var(--danger, #dc3545))", + UiMessageType.Confirmation => "var(--b-theme-secondary, var(--secondary, #6c757d))", + _ => null, + }; + + protected virtual string MessageIconStyle + { + get + { + var sb = new StringBuilder(); + + sb.Append($"color:{MessageIconColor}"); + + return sb.ToString(); + } + } + + protected virtual string OkButtonText + => Options?.OkButtonText ?? "OK"; + + protected virtual string ConfirmButtonText + => Options?.ConfirmButtonText ?? "Confirm"; + + protected virtual string CancelButtonText + => Options?.CancelButtonText ?? "Cancel"; + + [Parameter] public UiMessageType MessageType { get; set; } + + [Parameter] public string Title { get; set; } + + [Parameter] public string Message { get; set; } + + [Parameter] public TaskCompletionSource Callback { get; set; } + + [Parameter] public UiMessageOptions Options { get; set; } + + [Parameter] public EventCallback Okayed { get; set; } + + [Parameter] public EventCallback Confirmed { get; set; } + + [Parameter] public EventCallback Canceled { get; set; } + + [Inject] protected BlazoriseUiMessageService UiMessageService { get; set; } + + protected override void OnInitialized() + { + base.OnInitialized(); + + UiMessageService.MessageReceived += OnMessageReceived; + } + + private void OnMessageReceived(object sender, UiMessageEventArgs e) + { + MessageType = e.MessageType; + Message = e.Message; + Title = e.Title; + Options = e.Options; + Callback = e.Callback; + + ModalRef.Show(); + } + + public void Dispose() + { + if (UiMessageService != null) + { + UiMessageService.MessageReceived -= OnMessageReceived; + } + } + + protected Task OnOkClicked() + { + ModalRef.Hide(); + + return Okayed.InvokeAsync(null); + } + + protected Task OnConfirmClicked() + { + ModalRef.Hide(); + + if (IsConfirmation && Callback != null) + { + Callback.SetResult(true); + } + + return Confirmed.InvokeAsync(null); + } + + protected Task OnCancelClicked() + { + ModalRef.Hide(); + + if (IsConfirmation && Callback != null) + { + Callback.SetResult(false); + } + + return Canceled.InvokeAsync(null); + } + } +} diff --git a/framework/src/Volo.Abp.BlazoriseUI/Volo.Abp.BlazoriseUI.csproj b/framework/src/Volo.Abp.BlazoriseUI/Volo.Abp.BlazoriseUI.csproj index 12628b1440..e696a2f915 100644 --- a/framework/src/Volo.Abp.BlazoriseUI/Volo.Abp.BlazoriseUI.csproj +++ b/framework/src/Volo.Abp.BlazoriseUI/Volo.Abp.BlazoriseUI.csproj @@ -1,11 +1,10 @@ - + - netstandard2.1 - 3.0 + net5.0 @@ -13,8 +12,8 @@ - - + + diff --git a/framework/src/Volo.Abp.BlazoriseUI/_Imports.razor b/framework/src/Volo.Abp.BlazoriseUI/_Imports.razor new file mode 100644 index 0000000000..37be71828c --- /dev/null +++ b/framework/src/Volo.Abp.BlazoriseUI/_Imports.razor @@ -0,0 +1,2 @@ +@using Microsoft.AspNetCore.Components.Web +@using Blazorise \ No newline at end of file diff --git a/framework/src/Volo.Abp.BlobStoring.Aliyun/Volo.Abp.BlobStoring.Aliyun.csproj b/framework/src/Volo.Abp.BlobStoring.Aliyun/Volo.Abp.BlobStoring.Aliyun.csproj index c9b29dc83f..f3f8249f50 100644 --- a/framework/src/Volo.Abp.BlobStoring.Aliyun/Volo.Abp.BlobStoring.Aliyun.csproj +++ b/framework/src/Volo.Abp.BlobStoring.Aliyun/Volo.Abp.BlobStoring.Aliyun.csproj @@ -1,4 +1,4 @@ - + diff --git a/framework/src/Volo.Abp.BlobStoring.Aws/Volo.Abp.BlobStoring.Aws.csproj b/framework/src/Volo.Abp.BlobStoring.Aws/Volo.Abp.BlobStoring.Aws.csproj index d30601d1e8..796da8aa26 100644 --- a/framework/src/Volo.Abp.BlobStoring.Aws/Volo.Abp.BlobStoring.Aws.csproj +++ b/framework/src/Volo.Abp.BlobStoring.Aws/Volo.Abp.BlobStoring.Aws.csproj @@ -2,7 +2,7 @@ - + netstandard2.0 false diff --git a/framework/src/Volo.Abp.BlobStoring.Minio/Volo.Abp.BlobStoring.Minio.csproj b/framework/src/Volo.Abp.BlobStoring.Minio/Volo.Abp.BlobStoring.Minio.csproj index 1c080067ed..822189c677 100644 --- a/framework/src/Volo.Abp.BlobStoring.Minio/Volo.Abp.BlobStoring.Minio.csproj +++ b/framework/src/Volo.Abp.BlobStoring.Minio/Volo.Abp.BlobStoring.Minio.csproj @@ -1,7 +1,7 @@ - + - + netstandard2.0 Volo.Abp.BlobStoring.Minio diff --git a/framework/src/Volo.Abp.Caching.StackExchangeRedis/Volo.Abp.Caching.StackExchangeRedis.csproj b/framework/src/Volo.Abp.Caching.StackExchangeRedis/Volo.Abp.Caching.StackExchangeRedis.csproj index 95a15ddc8e..48304420e6 100644 --- a/framework/src/Volo.Abp.Caching.StackExchangeRedis/Volo.Abp.Caching.StackExchangeRedis.csproj +++ b/framework/src/Volo.Abp.Caching.StackExchangeRedis/Volo.Abp.Caching.StackExchangeRedis.csproj @@ -19,7 +19,7 @@ - + diff --git a/framework/src/Volo.Abp.Caching.StackExchangeRedis/Volo/Abp/Caching/StackExchangeRedis/AbpCachingStackExchangeRedisModule.cs b/framework/src/Volo.Abp.Caching.StackExchangeRedis/Volo/Abp/Caching/StackExchangeRedis/AbpCachingStackExchangeRedisModule.cs index b0f7d68ee4..0f71cbdd25 100644 --- a/framework/src/Volo.Abp.Caching.StackExchangeRedis/Volo/Abp/Caching/StackExchangeRedis/AbpCachingStackExchangeRedisModule.cs +++ b/framework/src/Volo.Abp.Caching.StackExchangeRedis/Volo/Abp/Caching/StackExchangeRedis/AbpCachingStackExchangeRedisModule.cs @@ -14,17 +14,21 @@ namespace Volo.Abp.Caching.StackExchangeRedis public override void ConfigureServices(ServiceConfigurationContext context) { var configuration = context.Services.GetConfiguration(); - - context.Services.AddStackExchangeRedisCache(options => + + var redisEnabled = configuration["Redis:IsEnabled"]; + if (redisEnabled.IsNullOrEmpty() || bool.Parse(redisEnabled)) { - var redisConfiguration = configuration["Redis:Configuration"]; - if (!redisConfiguration.IsNullOrEmpty()) + context.Services.AddStackExchangeRedisCache(options => { - options.Configuration = configuration["Redis:Configuration"]; - } - }); + var redisConfiguration = configuration["Redis:Configuration"]; + if (!redisConfiguration.IsNullOrEmpty()) + { + options.Configuration = redisConfiguration; + } + }); - context.Services.Replace(ServiceDescriptor.Singleton()); + context.Services.Replace(ServiceDescriptor.Singleton()); + } } } } \ No newline at end of file diff --git a/framework/src/Volo.Abp.Caching/Volo.Abp.Caching.csproj b/framework/src/Volo.Abp.Caching/Volo.Abp.Caching.csproj index 19d5b456ec..757d95d2bc 100644 --- a/framework/src/Volo.Abp.Caching/Volo.Abp.Caching.csproj +++ b/framework/src/Volo.Abp.Caching/Volo.Abp.Caching.csproj @@ -15,7 +15,7 @@ - + diff --git a/framework/src/Volo.Abp.Cli.Core/Volo.Abp.Cli.Core.csproj b/framework/src/Volo.Abp.Cli.Core/Volo.Abp.Cli.Core.csproj index 2dfd66f4ab..13f81e730b 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo.Abp.Cli.Core.csproj +++ b/framework/src/Volo.Abp.Cli.Core/Volo.Abp.Cli.Core.csproj @@ -14,7 +14,6 @@ - diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Templates/App/AppTemplateBase.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Templates/App/AppTemplateBase.cs index d309d4858a..8846473d96 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Templates/App/AppTemplateBase.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Templates/App/AppTemplateBase.cs @@ -25,6 +25,7 @@ namespace Volo.Abp.Cli.ProjectBuilding.Templates.App SwitchDatabaseProvider(context, steps); DeleteUnrelatedProjects(context, steps); RandomizeSslPorts(context, steps); + RandomizeStringEncryption(context, steps); UpdateNuGetConfig(context, steps); CleanupFolderHierarchy(context, steps); @@ -185,6 +186,11 @@ namespace Volo.Abp.Cli.ProjectBuilding.Templates.App ); } + private static void RandomizeStringEncryption(ProjectBuildContext context, List steps) + { + steps.Add(new RandomizeStringEncryptionStep()); + } + private static void UpdateNuGetConfig(ProjectBuildContext context, List steps) { steps.Add(new UpdateNuGetConfigStep("/aspnet-core/NuGet.Config")); diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Templates/RandomizeStringEncryptionStep.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Templates/RandomizeStringEncryptionStep.cs new file mode 100644 index 0000000000..6fc2bafc95 --- /dev/null +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Templates/RandomizeStringEncryptionStep.cs @@ -0,0 +1,47 @@ +using System; +using System.Linq; +using System.Text; +using Volo.Abp.Cli.ProjectBuilding.Building; + +namespace Volo.Abp.Cli.ProjectBuilding.Templates +{ + public class RandomizeStringEncryptionStep: ProjectBuildPipelineStep + { + public override void Execute(ProjectBuildContext context) + { + var appSettings = context.Files + .Where(x => !x.IsDirectory && x.Name.EndsWith("appSettings.json", StringComparison.InvariantCultureIgnoreCase)) + .Where(x => x.Content.IndexOf("StringEncryption", StringComparison.InvariantCultureIgnoreCase) >= 0) + .ToList(); + + const string defaultPassPhrase = "gsKnGZ041HLL4IM8"; + var randomPassPhrase = GetRandomString(defaultPassPhrase.Length); + foreach (var appSetting in appSettings) + { + appSetting.NormalizeLineEndings(); + + var appSettingLines = appSetting.GetLines(); + for (var i = 0; i < appSettingLines.Length; i++) + { + if (appSettingLines[i].Contains("DefaultPassPhrase") && appSettingLines[i].Contains(defaultPassPhrase)) + { + appSettingLines[i] = appSettingLines[i].Replace(defaultPassPhrase, randomPassPhrase); + } + } + + appSetting.SetLines(appSettingLines); + } + } + + private static string GetRandomString(int length) + { + const string letters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; + var builder = new StringBuilder(); + for (var i = 0; i < length; i++) + { + builder.Append(letters[RandomHelper.GetRandom(0, letters.Length)]); + } + return builder.ToString(); + } + } +} diff --git a/framework/src/Volo.Abp.Cli/Volo.Abp.Cli.csproj b/framework/src/Volo.Abp.Cli/Volo.Abp.Cli.csproj index 489ea99ac5..79760820d8 100644 --- a/framework/src/Volo.Abp.Cli/Volo.Abp.Cli.csproj +++ b/framework/src/Volo.Abp.Cli/Volo.Abp.Cli.csproj @@ -1,11 +1,11 @@ - + Exe - netcoreapp3.1 + net5.0 true abp @@ -18,8 +18,8 @@ - - + + diff --git a/framework/src/Volo.Abp.Core/System/AbpObjectExtensions.cs b/framework/src/Volo.Abp.Core/System/AbpObjectExtensions.cs index d1067a383f..958398e0c5 100644 --- a/framework/src/Volo.Abp.Core/System/AbpObjectExtensions.cs +++ b/framework/src/Volo.Abp.Core/System/AbpObjectExtensions.cs @@ -1,4 +1,5 @@ -using System.ComponentModel; +using System.Collections.Generic; +using System.ComponentModel; using System.Globalization; using System.Linq; @@ -49,6 +50,17 @@ namespace System return list.Contains(item); } + /// + /// Check if an item is in the given enumerable. + /// + /// Item to check + /// Items + /// Type of the items + public static bool IsIn(this T item, IEnumerable items) + { + return items.Contains(item); + } + /// /// Can be used to conditionally perform a function /// on an object and return the modified or the original object. diff --git a/framework/src/Volo.Abp.Core/System/AbpTypeExtensions.cs b/framework/src/Volo.Abp.Core/System/AbpTypeExtensions.cs index e7c600eff6..1cf60a2906 100644 --- a/framework/src/Volo.Abp.Core/System/AbpTypeExtensions.cs +++ b/framework/src/Volo.Abp.Core/System/AbpTypeExtensions.cs @@ -55,14 +55,28 @@ namespace System return types.ToArray(); } + /// + /// Gets all base classes of this type. + /// + /// The type to get its base classes. + /// A type to stop going to the deeper base classes. This type will be be included in the returned array + /// True, to include the standard type in the returned array. + public static Type[] GetBaseClasses([NotNull] this Type type, Type stoppingType, bool includeObject = true) + { + Check.NotNull(type, nameof(type)); + + var types = new List(); + AddTypeAndBaseTypesRecursively(types, type.BaseType, includeObject, stoppingType); + return types.ToArray(); + } + private static void AddTypeAndBaseTypesRecursively( [NotNull] List types, - [CanBeNull] Type type, - bool includeObject) + [CanBeNull] Type type, + bool includeObject, + [CanBeNull] Type stoppingType = null) { - Check.NotNull(types, nameof(types)); - - if (type == null) + if (type == null || type == stoppingType) { return; } @@ -72,7 +86,7 @@ namespace System return; } - AddTypeAndBaseTypesRecursively(types, type.BaseType, includeObject); + AddTypeAndBaseTypesRecursively(types, type.BaseType, includeObject, stoppingType); types.Add(type); } } diff --git a/framework/src/Volo.Abp.Core/System/Collections/Generic/AbpCollectionExtensions.cs b/framework/src/Volo.Abp.Core/System/Collections/Generic/AbpCollectionExtensions.cs index 2a858f7626..e014ee9e21 100644 --- a/framework/src/Volo.Abp.Core/System/Collections/Generic/AbpCollectionExtensions.cs +++ b/framework/src/Volo.Abp.Core/System/Collections/Generic/AbpCollectionExtensions.cs @@ -105,5 +105,19 @@ namespace System.Collections.Generic return items; } + + /// + /// Removes all items from the collection those satisfy the given . + /// + /// Type of the items in the collection + /// The collection + /// Items to be removed from the list + public static void RemoveAll([NotNull] this ICollection source, IEnumerable items) + { + foreach (var item in items) + { + source.Remove(item); + } + } } -} \ No newline at end of file +} diff --git a/framework/src/Volo.Abp.Core/System/Linq/PredicateOperator.cs b/framework/src/Volo.Abp.Core/System/Linq/PredicateOperator.cs index 0732a63110..75849b24b6 100644 --- a/framework/src/Volo.Abp.Core/System/Linq/PredicateOperator.cs +++ b/framework/src/Volo.Abp.Core/System/Linq/PredicateOperator.cs @@ -1,5 +1,8 @@ -using System.Collections.ObjectModel; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq.Expressions; +using System.Reflection.Emit; +using System.Runtime.CompilerServices; using JetBrains.Annotations; namespace System.Linq @@ -246,15 +249,6 @@ namespace System.Linq public bool TailCall => Predicate.TailCall; #endif -#if !(NET35 || WINDOWS_APP || NETSTANDARD || PORTABLE || PORTABLE40 || UAP) - /// - public void CompileToMethod(MethodBuilder method) { Predicate.CompileToMethod(method); } - - /// - public void CompileToMethod(MethodBuilder method, DebugInfoGenerator debugInfoGenerator) { Predicate.CompileToMethod(method, debugInfoGenerator); } - -#endif - #endregion #region Implement Expression methods and properties diff --git a/framework/src/Volo.Abp.Core/Volo.Abp.Core.csproj b/framework/src/Volo.Abp.Core/Volo.Abp.Core.csproj index e1842d0447..4414eed1c6 100644 --- a/framework/src/Volo.Abp.Core/Volo.Abp.Core.csproj +++ b/framework/src/Volo.Abp.Core/Volo.Abp.Core.csproj @@ -16,15 +16,15 @@ - - - - - - - - - + + + + + + + + + diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/Content/IRemoteStreamContent.cs b/framework/src/Volo.Abp.Core/Volo/Abp/Content/IRemoteStreamContent.cs new file mode 100644 index 0000000000..bca259d422 --- /dev/null +++ b/framework/src/Volo.Abp.Core/Volo/Abp/Content/IRemoteStreamContent.cs @@ -0,0 +1,13 @@ +using System.IO; + +namespace Volo.Abp.Content +{ + public interface IRemoteStreamContent + { + string ContentType { get; } + + long? ContentLength { get; } + + Stream GetStream(); + } +} diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/Content/RemoteStreamContent.cs b/framework/src/Volo.Abp.Core/Volo/Abp/Content/RemoteStreamContent.cs new file mode 100644 index 0000000000..f217101cea --- /dev/null +++ b/framework/src/Volo.Abp.Core/Volo/Abp/Content/RemoteStreamContent.cs @@ -0,0 +1,23 @@ +using System.IO; + +namespace Volo.Abp.Content +{ + public class RemoteStreamContent : IRemoteStreamContent + { + private readonly Stream _stream; + + public RemoteStreamContent(Stream stream) + { + _stream = stream; + } + + public virtual string ContentType { get; set; } + + public virtual long? ContentLength => _stream.Length; + + public virtual Stream GetStream() + { + return _stream; + } + } +} diff --git a/framework/src/Volo.Abp.Dapper/Volo.Abp.Dapper.csproj b/framework/src/Volo.Abp.Dapper/Volo.Abp.Dapper.csproj index 4feb946600..a2fd749d0e 100644 --- a/framework/src/Volo.Abp.Dapper/Volo.Abp.Dapper.csproj +++ b/framework/src/Volo.Abp.Dapper/Volo.Abp.Dapper.csproj @@ -4,7 +4,7 @@ - netstandard2.0 + netstandard2.1 Volo.Abp.Dapper Volo.Abp.Dapper $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; diff --git a/framework/src/Volo.Abp.Ddd.Application.Contracts/Volo/Abp/Application/Localization/Resources/AbpDdd/es.json b/framework/src/Volo.Abp.Ddd.Application.Contracts/Volo/Abp/Application/Localization/Resources/AbpDdd/es.json new file mode 100644 index 0000000000..4563876228 --- /dev/null +++ b/framework/src/Volo.Abp.Ddd.Application.Contracts/Volo/Abp/Application/Localization/Resources/AbpDdd/es.json @@ -0,0 +1,6 @@ +{ + "culture": "es", + "texts": { + "MaxResultCountExceededExceptionMessage": "{0} no puede tener ms de {1}! Incremente {2}.{3} en el lado del servidor para obtener ms resultados." + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Ddd.Application.Contracts/Volo/Abp/Application/Localization/Resources/AbpDdd/hu.json b/framework/src/Volo.Abp.Ddd.Application.Contracts/Volo/Abp/Application/Localization/Resources/AbpDdd/hu.json new file mode 100644 index 0000000000..6ec29c05e5 --- /dev/null +++ b/framework/src/Volo.Abp.Ddd.Application.Contracts/Volo/Abp/Application/Localization/Resources/AbpDdd/hu.json @@ -0,0 +1,6 @@ +{ + "culture": "hu", + "texts": { + "MaxResultCountExceededExceptionMessage": "{0} nem lehet több mint {1}! Csökkentse {2}.{3} a szerver oldalon, hogy több redeményt kapjon." + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Emailing/Volo/Abp/Emailing/Localization/es.json b/framework/src/Volo.Abp.Emailing/Volo/Abp/Emailing/Localization/es.json index 33c59be8b5..da1d7fde95 100644 --- a/framework/src/Volo.Abp.Emailing/Volo/Abp/Emailing/Localization/es.json +++ b/framework/src/Volo.Abp.Emailing/Volo/Abp/Emailing/Localization/es.json @@ -18,6 +18,8 @@ "Description:Abp.Mailing.Smtp.Password": "La contrasea del ususario asociado a las credenciales.", "Description:Abp.Mailing.Smtp.Domain": "El dominio o equipo que valida las credenciales.", "Description:Abp.Mailing.Smtp.EnableSsl": "Si SmtpClient usa Secure Sockets Layer (SSL) para encriptar la coneccin.", - "Description:Abp.Mailing.Smtp.UseDefaultCredentials": "Si las credenciales por defecto se envan con los request." + "Description:Abp.Mailing.Smtp.UseDefaultCredentials": "Si las credenciales por defecto se envan con los request.", + "TextTemplate:StandardEmailTemplates.Layout": "Plantilla de email por defecto", + "TextTemplate:StandardEmailTemplates.Message": "Plantilla de mensaje simple para emails" } } \ No newline at end of file diff --git a/framework/src/Volo.Abp.Emailing/Volo/Abp/Emailing/Localization/hu.json b/framework/src/Volo.Abp.Emailing/Volo/Abp/Emailing/Localization/hu.json new file mode 100644 index 0000000000..f2dbce2961 --- /dev/null +++ b/framework/src/Volo.Abp.Emailing/Volo/Abp/Emailing/Localization/hu.json @@ -0,0 +1,25 @@ +{ + "culture": "hu", + "texts": { + "DisplayName:Abp.Mailing.DefaultFromAddress": "Alapértlemezett feladó címe", + "DisplayName:Abp.Mailing.DefaultFromDisplayName": "Feladó alapértelmezett megjelenő neve", + "DisplayName:Abp.Mailing.Smtp.Host": "Kiszolgáló", + "DisplayName:Abp.Mailing.Smtp.Port": "Port", + "DisplayName:Abp.Mailing.Smtp.UserName": "Felhasználónév", + "DisplayName:Abp.Mailing.Smtp.Password": "Jelszó", + "DisplayName:Abp.Mailing.Smtp.Domain": "Domain", + "DisplayName:Abp.Mailing.Smtp.EnableSsl": "SSL engedélyezése", + "DisplayName:Abp.Mailing.Smtp.UseDefaultCredentials": "Használja az alapértelmezett hitelesítő adatokat", + "Description:Abp.Mailing.DefaultFromAddress": "Az alapértlemezett feladó címe", + "Description:Abp.Mailing.DefaultFromDisplayName": "A feladó alapértelmezett megjelenő neve", + "Description:Abp.Mailing.Smtp.Host": "Az SMTP kiszolgáló neve vagy IP címe.", + "Description:Abp.Mailing.Smtp.Port": "Az SMTP forgalomhoz használt port.", + "Description:Abp.Mailing.Smtp.UserName": "A hitelesítő adatokhoz társított felhasználói név..", + "Description:Abp.Mailing.Smtp.Password": "A hitelesítő adatokhoz társított felhasználói név jelszava.", + "Description:Abp.Mailing.Smtp.Domain": "A hitelesítő adatokat igazoló tartomány vagy számítógép neve.", + "Description:Abp.Mailing.Smtp.EnableSsl": "Engedélyezze, ha a levelező programja Secure Sockets Layer (SSL) protokollt használ a kapcsolat titkosításához.", + "Description:Abp.Mailing.Smtp.UseDefaultCredentials": "Alkalmazza, hogy a kérésekhez az alapértelmezett hitelesítést használja.", + "TextTemplate:StandardEmailTemplates.Layout": "Alapértelmezett e-mail elrendezési sablon", + "TextTemplate:StandardEmailTemplates.Message": "Egyszerű üzenet sablon az e-mailekhez" + } + } \ No newline at end of file diff --git a/framework/src/Volo.Abp.EntityFrameworkCore.MySQL/Volo.Abp.EntityFrameworkCore.MySQL.csproj b/framework/src/Volo.Abp.EntityFrameworkCore.MySQL/Volo.Abp.EntityFrameworkCore.MySQL.csproj index d565f6c114..7bf7b5d74f 100644 --- a/framework/src/Volo.Abp.EntityFrameworkCore.MySQL/Volo.Abp.EntityFrameworkCore.MySQL.csproj +++ b/framework/src/Volo.Abp.EntityFrameworkCore.MySQL/Volo.Abp.EntityFrameworkCore.MySQL.csproj @@ -2,9 +2,9 @@ - + - netstandard2.0 + netstandard2.1 Volo.Abp.EntityFrameworkCore.MySQL Volo.Abp.EntityFrameworkCore.MySQL $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; @@ -21,5 +21,5 @@ - + diff --git a/framework/src/Volo.Abp.EntityFrameworkCore.Oracle.Devart/Microsoft/EntityFrameworkCore/AbpOracleModelBuilderExtensions.cs b/framework/src/Volo.Abp.EntityFrameworkCore.Oracle.Devart/Microsoft/EntityFrameworkCore/AbpOracleModelBuilderExtensions.cs index 8feec1715b..23943873c3 100644 --- a/framework/src/Volo.Abp.EntityFrameworkCore.Oracle.Devart/Microsoft/EntityFrameworkCore/AbpOracleModelBuilderExtensions.cs +++ b/framework/src/Volo.Abp.EntityFrameworkCore.Oracle.Devart/Microsoft/EntityFrameworkCore/AbpOracleModelBuilderExtensions.cs @@ -1,13 +1,13 @@ -using Volo.Abp.EntityFrameworkCore; - -namespace Microsoft.EntityFrameworkCore -{ - public static class AbpOracleModelBuilderExtensions - { - public static void UseOracle( - this ModelBuilder modelBuilder) - { - modelBuilder.SetDatabaseProvider(EfCoreDatabaseProvider.Oracle); - } - } -} \ No newline at end of file +// using Volo.Abp.EntityFrameworkCore; +// +// namespace Microsoft.EntityFrameworkCore +// { +// public static class AbpOracleModelBuilderExtensions +// { +// public static void UseOracle( +// this ModelBuilder modelBuilder) +// { +// modelBuilder.SetDatabaseProvider(EfCoreDatabaseProvider.Oracle); +// } +// } +// } diff --git a/framework/src/Volo.Abp.EntityFrameworkCore.Oracle.Devart/Volo.Abp.EntityFrameworkCore.Oracle.Devart.csproj b/framework/src/Volo.Abp.EntityFrameworkCore.Oracle.Devart/Volo.Abp.EntityFrameworkCore.Oracle.Devart.csproj index 8043a1ff8e..f42981a9ae 100644 --- a/framework/src/Volo.Abp.EntityFrameworkCore.Oracle.Devart/Volo.Abp.EntityFrameworkCore.Oracle.Devart.csproj +++ b/framework/src/Volo.Abp.EntityFrameworkCore.Oracle.Devart/Volo.Abp.EntityFrameworkCore.Oracle.Devart.csproj @@ -19,7 +19,7 @@ - + diff --git a/framework/src/Volo.Abp.EntityFrameworkCore.Oracle.Devart/Volo/Abp/EntityFrameworkCore/AbpDbContextConfigurationContextOracleDevartExtensions.cs b/framework/src/Volo.Abp.EntityFrameworkCore.Oracle.Devart/Volo/Abp/EntityFrameworkCore/AbpDbContextConfigurationContextOracleDevartExtensions.cs index 482ee8b9a8..ba70772c9e 100644 --- a/framework/src/Volo.Abp.EntityFrameworkCore.Oracle.Devart/Volo/Abp/EntityFrameworkCore/AbpDbContextConfigurationContextOracleDevartExtensions.cs +++ b/framework/src/Volo.Abp.EntityFrameworkCore.Oracle.Devart/Volo/Abp/EntityFrameworkCore/AbpDbContextConfigurationContextOracleDevartExtensions.cs @@ -1,26 +1,26 @@ -using JetBrains.Annotations; -using Microsoft.EntityFrameworkCore; -using System; -using Devart.Data.Oracle.Entity; -using Volo.Abp.EntityFrameworkCore.DependencyInjection; - -namespace Volo.Abp.EntityFrameworkCore -{ - public static class AbpDbContextConfigurationContextOracleDevartExtensions - { - public static DbContextOptionsBuilder UseOracle( - [NotNull] this AbpDbContextConfigurationContext context, - [CanBeNull] Action oracleOptionsAction = null, - bool useExistingConnectionIfAvailable = false) - { - if (useExistingConnectionIfAvailable && context.ExistingConnection != null) - { - return context.DbContextOptions.UseOracle(context.ExistingConnection, oracleOptionsAction); - } - else - { - return context.DbContextOptions.UseOracle(context.ConnectionString, oracleOptionsAction); - } - } - } -} +// using JetBrains.Annotations; +// using Microsoft.EntityFrameworkCore; +// using System; +// using Devart.Data.Oracle.Entity; +// using Volo.Abp.EntityFrameworkCore.DependencyInjection; +// +// namespace Volo.Abp.EntityFrameworkCore +// { +// public static class AbpDbContextConfigurationContextOracleDevartExtensions +// { +// public static DbContextOptionsBuilder UseOracle( +// [NotNull] this AbpDbContextConfigurationContext context, +// [CanBeNull] Action oracleOptionsAction = null, +// bool useExistingConnectionIfAvailable = false) +// { +// if (useExistingConnectionIfAvailable && context.ExistingConnection != null) +// { +// return context.DbContextOptions.UseOracle(context.ExistingConnection, oracleOptionsAction); +// } +// else +// { +// return context.DbContextOptions.UseOracle(context.ConnectionString, oracleOptionsAction); +// } +// } +// } +// } diff --git a/framework/src/Volo.Abp.EntityFrameworkCore.Oracle.Devart/Volo/Abp/EntityFrameworkCore/AbpDbContextOptionsOracleDevartExtensions.cs b/framework/src/Volo.Abp.EntityFrameworkCore.Oracle.Devart/Volo/Abp/EntityFrameworkCore/AbpDbContextOptionsOracleDevartExtensions.cs index 20887ceb79..99cfc84b8e 100644 --- a/framework/src/Volo.Abp.EntityFrameworkCore.Oracle.Devart/Volo/Abp/EntityFrameworkCore/AbpDbContextOptionsOracleDevartExtensions.cs +++ b/framework/src/Volo.Abp.EntityFrameworkCore.Oracle.Devart/Volo/Abp/EntityFrameworkCore/AbpDbContextOptionsOracleDevartExtensions.cs @@ -1,32 +1,32 @@ -using JetBrains.Annotations; -using System; -using Devart.Data.Oracle.Entity; - -namespace Volo.Abp.EntityFrameworkCore -{ - public static class AbpDbContextOptionsOracleDevartExtensions - { - public static void UseOracle( - [NotNull] this AbpDbContextOptions options, - [CanBeNull] Action oracleOptionsAction = null, - bool useExistingConnectionIfAvailable = false) - { - options.Configure(context => - { - context.UseOracle(oracleOptionsAction, useExistingConnectionIfAvailable); - }); - } - - public static void UseOracle( - [NotNull] this AbpDbContextOptions options, - [CanBeNull] Action oracleOptionsAction = null, - bool useExistingConnectionIfAvailable = false) - where TDbContext : AbpDbContext - { - options.Configure(context => - { - context.UseOracle(oracleOptionsAction, useExistingConnectionIfAvailable); - }); - } - } -} +// using JetBrains.Annotations; +// using System; +// using Devart.Data.Oracle.Entity; +// +// namespace Volo.Abp.EntityFrameworkCore +// { +// public static class AbpDbContextOptionsOracleDevartExtensions +// { +// public static void UseOracle( +// [NotNull] this AbpDbContextOptions options, +// [CanBeNull] Action oracleOptionsAction = null, +// bool useExistingConnectionIfAvailable = false) +// { +// options.Configure(context => +// { +// context.UseOracle(oracleOptionsAction, useExistingConnectionIfAvailable); +// }); +// } +// +// public static void UseOracle( +// [NotNull] this AbpDbContextOptions options, +// [CanBeNull] Action oracleOptionsAction = null, +// bool useExistingConnectionIfAvailable = false) +// where TDbContext : AbpDbContext +// { +// options.Configure(context => +// { +// context.UseOracle(oracleOptionsAction, useExistingConnectionIfAvailable); +// }); +// } +// } +// } diff --git a/framework/src/Volo.Abp.EntityFrameworkCore.Oracle.Devart/Volo/Abp/EntityFrameworkCore/Oracle/Devart/AbpEntityFrameworkCoreOracleDevartModule.cs b/framework/src/Volo.Abp.EntityFrameworkCore.Oracle.Devart/Volo/Abp/EntityFrameworkCore/Oracle/Devart/AbpEntityFrameworkCoreOracleDevartModule.cs index 7b5970bb59..3b1b9cc337 100644 --- a/framework/src/Volo.Abp.EntityFrameworkCore.Oracle.Devart/Volo/Abp/EntityFrameworkCore/Oracle/Devart/AbpEntityFrameworkCoreOracleDevartModule.cs +++ b/framework/src/Volo.Abp.EntityFrameworkCore.Oracle.Devart/Volo/Abp/EntityFrameworkCore/Oracle/Devart/AbpEntityFrameworkCoreOracleDevartModule.cs @@ -1,22 +1,22 @@ -using Volo.Abp.Guids; -using Volo.Abp.Modularity; - -namespace Volo.Abp.EntityFrameworkCore.Oracle.Devart -{ - [DependsOn( - typeof(AbpEntityFrameworkCoreModule) - )] - public class AbpEntityFrameworkCoreOracleDevartModule : AbpModule - { - public override void ConfigureServices(ServiceConfigurationContext context) - { - Configure(options => - { - if (options.DefaultSequentialGuidType == null) - { - options.DefaultSequentialGuidType = SequentialGuidType.SequentialAsBinary; - } - }); - } - } -} \ No newline at end of file +// using Volo.Abp.Guids; +// using Volo.Abp.Modularity; +// +// namespace Volo.Abp.EntityFrameworkCore.Oracle.Devart +// { +// [DependsOn( +// typeof(AbpEntityFrameworkCoreModule) +// )] +// public class AbpEntityFrameworkCoreOracleDevartModule : AbpModule +// { +// public override void ConfigureServices(ServiceConfigurationContext context) +// { +// Configure(options => +// { +// if (options.DefaultSequentialGuidType == null) +// { +// options.DefaultSequentialGuidType = SequentialGuidType.SequentialAsBinary; +// } +// }); +// } +// } +// } diff --git a/framework/src/Volo.Abp.EntityFrameworkCore.Oracle/Volo.Abp.EntityFrameworkCore.Oracle.csproj b/framework/src/Volo.Abp.EntityFrameworkCore.Oracle/Volo.Abp.EntityFrameworkCore.Oracle.csproj index be0537ae96..7611559008 100644 --- a/framework/src/Volo.Abp.EntityFrameworkCore.Oracle/Volo.Abp.EntityFrameworkCore.Oracle.csproj +++ b/framework/src/Volo.Abp.EntityFrameworkCore.Oracle/Volo.Abp.EntityFrameworkCore.Oracle.csproj @@ -19,7 +19,7 @@ - + diff --git a/framework/src/Volo.Abp.EntityFrameworkCore.Oracle/Volo/Abp/EntityFrameworkCore/AbpDbContextConfigurationContextOracleExtensions.cs b/framework/src/Volo.Abp.EntityFrameworkCore.Oracle/Volo/Abp/EntityFrameworkCore/AbpDbContextConfigurationContextOracleExtensions.cs index a5b898b286..cb3a92d2cf 100644 --- a/framework/src/Volo.Abp.EntityFrameworkCore.Oracle/Volo/Abp/EntityFrameworkCore/AbpDbContextConfigurationContextOracleExtensions.cs +++ b/framework/src/Volo.Abp.EntityFrameworkCore.Oracle/Volo/Abp/EntityFrameworkCore/AbpDbContextConfigurationContextOracleExtensions.cs @@ -1,25 +1,25 @@ -using JetBrains.Annotations; -using Microsoft.EntityFrameworkCore; -using System; -using Oracle.EntityFrameworkCore.Infrastructure; -using Volo.Abp.EntityFrameworkCore.DependencyInjection; - -namespace Volo.Abp.EntityFrameworkCore -{ - public static class AbpDbContextConfigurationContextOracleExtensions - { - public static DbContextOptionsBuilder UseOracle( - [NotNull] this AbpDbContextConfigurationContext context, - [CanBeNull] Action oracleOptionsAction = null) - { - if (context.ExistingConnection != null) - { - return context.DbContextOptions.UseOracle(context.ExistingConnection, oracleOptionsAction); - } - else - { - return context.DbContextOptions.UseOracle(context.ConnectionString, oracleOptionsAction); - } - } - } -} +// using JetBrains.Annotations; +// using Microsoft.EntityFrameworkCore; +// using System; +// using Oracle.EntityFrameworkCore.Infrastructure; +// using Volo.Abp.EntityFrameworkCore.DependencyInjection; +// +// namespace Volo.Abp.EntityFrameworkCore +// { +// public static class AbpDbContextConfigurationContextOracleExtensions +// { +// public static DbContextOptionsBuilder UseOracle( +// [NotNull] this AbpDbContextConfigurationContext context, +// [CanBeNull] Action oracleOptionsAction = null) +// { +// if (context.ExistingConnection != null) +// { +// return context.DbContextOptions.UseOracle(context.ExistingConnection, oracleOptionsAction); +// } +// else +// { +// return context.DbContextOptions.UseOracle(context.ConnectionString, oracleOptionsAction); +// } +// } +// } +// } diff --git a/framework/src/Volo.Abp.EntityFrameworkCore.Oracle/Volo/Abp/EntityFrameworkCore/AbpDbContextOptionsOracleExtensions.cs b/framework/src/Volo.Abp.EntityFrameworkCore.Oracle/Volo/Abp/EntityFrameworkCore/AbpDbContextOptionsOracleExtensions.cs index f4817d5ab4..f5f9dc7f61 100644 --- a/framework/src/Volo.Abp.EntityFrameworkCore.Oracle/Volo/Abp/EntityFrameworkCore/AbpDbContextOptionsOracleExtensions.cs +++ b/framework/src/Volo.Abp.EntityFrameworkCore.Oracle/Volo/Abp/EntityFrameworkCore/AbpDbContextOptionsOracleExtensions.cs @@ -1,30 +1,30 @@ -using JetBrains.Annotations; -using System; -using Oracle.EntityFrameworkCore.Infrastructure; - -namespace Volo.Abp.EntityFrameworkCore -{ - public static class AbpDbContextOptionsOracleExtensions - { - public static void UseOracle( - [NotNull] this AbpDbContextOptions options, - [CanBeNull] Action oracleOptionsAction = null) - { - options.Configure(context => - { - context.UseOracle(oracleOptionsAction); - }); - } - - public static void UseOracle( - [NotNull] this AbpDbContextOptions options, - [CanBeNull] Action oracleOptionsAction = null) - where TDbContext : AbpDbContext - { - options.Configure(context => - { - context.UseOracle(oracleOptionsAction); - }); - } - } -} +// using JetBrains.Annotations; +// using System; +// using Oracle.EntityFrameworkCore.Infrastructure; +// +// namespace Volo.Abp.EntityFrameworkCore +// { +// public static class AbpDbContextOptionsOracleExtensions +// { +// public static void UseOracle( +// [NotNull] this AbpDbContextOptions options, +// [CanBeNull] Action oracleOptionsAction = null) +// { +// options.Configure(context => +// { +// context.UseOracle(oracleOptionsAction); +// }); +// } +// +// public static void UseOracle( +// [NotNull] this AbpDbContextOptions options, +// [CanBeNull] Action oracleOptionsAction = null) +// where TDbContext : AbpDbContext +// { +// options.Configure(context => +// { +// context.UseOracle(oracleOptionsAction); +// }); +// } +// } +// } diff --git a/framework/src/Volo.Abp.EntityFrameworkCore.Oracle/Volo/Abp/EntityFrameworkCore/Oracle/AbpEntityFrameworkCoreOracleModule.cs b/framework/src/Volo.Abp.EntityFrameworkCore.Oracle/Volo/Abp/EntityFrameworkCore/Oracle/AbpEntityFrameworkCoreOracleModule.cs index 3b7c801462..21fad9375a 100644 --- a/framework/src/Volo.Abp.EntityFrameworkCore.Oracle/Volo/Abp/EntityFrameworkCore/Oracle/AbpEntityFrameworkCoreOracleModule.cs +++ b/framework/src/Volo.Abp.EntityFrameworkCore.Oracle/Volo/Abp/EntityFrameworkCore/Oracle/AbpEntityFrameworkCoreOracleModule.cs @@ -1,22 +1,22 @@ -using Volo.Abp.Guids; -using Volo.Abp.Modularity; - -namespace Volo.Abp.EntityFrameworkCore.Oracle -{ - [DependsOn( - typeof(AbpEntityFrameworkCoreModule) - )] - public class AbpEntityFrameworkCoreOracleModule : AbpModule - { - public override void ConfigureServices(ServiceConfigurationContext context) - { - Configure(options => - { - if (options.DefaultSequentialGuidType == null) - { - options.DefaultSequentialGuidType = SequentialGuidType.SequentialAsBinary; - } - }); - } - } -} \ No newline at end of file +// using Volo.Abp.Guids; +// using Volo.Abp.Modularity; +// +// namespace Volo.Abp.EntityFrameworkCore.Oracle +// { +// [DependsOn( +// typeof(AbpEntityFrameworkCoreModule) +// )] +// public class AbpEntityFrameworkCoreOracleModule : AbpModule +// { +// public override void ConfigureServices(ServiceConfigurationContext context) +// { +// Configure(options => +// { +// if (options.DefaultSequentialGuidType == null) +// { +// options.DefaultSequentialGuidType = SequentialGuidType.SequentialAsBinary; +// } +// }); +// } +// } +// } diff --git a/framework/src/Volo.Abp.EntityFrameworkCore.PostgreSql/Volo.Abp.EntityFrameworkCore.PostgreSql.csproj b/framework/src/Volo.Abp.EntityFrameworkCore.PostgreSql/Volo.Abp.EntityFrameworkCore.PostgreSql.csproj index 96de9fdd1c..8e325342d4 100644 --- a/framework/src/Volo.Abp.EntityFrameworkCore.PostgreSql/Volo.Abp.EntityFrameworkCore.PostgreSql.csproj +++ b/framework/src/Volo.Abp.EntityFrameworkCore.PostgreSql/Volo.Abp.EntityFrameworkCore.PostgreSql.csproj @@ -4,7 +4,7 @@ - netstandard2.0 + netstandard2.1 Volo.Abp.EntityFrameworkCore.PostgreSql Volo.Abp.EntityFrameworkCore.PostgreSql $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; @@ -19,7 +19,7 @@ - + diff --git a/framework/src/Volo.Abp.EntityFrameworkCore.SqlServer/Volo.Abp.EntityFrameworkCore.SqlServer.csproj b/framework/src/Volo.Abp.EntityFrameworkCore.SqlServer/Volo.Abp.EntityFrameworkCore.SqlServer.csproj index 366958b213..ff0e06ebae 100644 --- a/framework/src/Volo.Abp.EntityFrameworkCore.SqlServer/Volo.Abp.EntityFrameworkCore.SqlServer.csproj +++ b/framework/src/Volo.Abp.EntityFrameworkCore.SqlServer/Volo.Abp.EntityFrameworkCore.SqlServer.csproj @@ -4,7 +4,7 @@ - netstandard2.0 + netstandard2.1 Volo.Abp.EntityFrameworkCore.SqlServer Volo.Abp.EntityFrameworkCore.SqlServer $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; @@ -19,7 +19,7 @@ - + diff --git a/framework/src/Volo.Abp.EntityFrameworkCore.Sqlite/Volo.Abp.EntityFrameworkCore.Sqlite.csproj b/framework/src/Volo.Abp.EntityFrameworkCore.Sqlite/Volo.Abp.EntityFrameworkCore.Sqlite.csproj index 6a8fd26db2..010f419374 100644 --- a/framework/src/Volo.Abp.EntityFrameworkCore.Sqlite/Volo.Abp.EntityFrameworkCore.Sqlite.csproj +++ b/framework/src/Volo.Abp.EntityFrameworkCore.Sqlite/Volo.Abp.EntityFrameworkCore.Sqlite.csproj @@ -4,7 +4,7 @@ - netstandard2.0 + netstandard2.1 Volo.Abp.EntityFrameworkCore.Sqlite Volo.Abp.EntityFrameworkCore.Sqlite $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; @@ -15,7 +15,7 @@ - + diff --git a/framework/src/Volo.Abp.EntityFrameworkCore/Volo.Abp.EntityFrameworkCore.csproj b/framework/src/Volo.Abp.EntityFrameworkCore/Volo.Abp.EntityFrameworkCore.csproj index 4c6fb7fbbc..a123570984 100644 --- a/framework/src/Volo.Abp.EntityFrameworkCore/Volo.Abp.EntityFrameworkCore.csproj +++ b/framework/src/Volo.Abp.EntityFrameworkCore/Volo.Abp.EntityFrameworkCore.csproj @@ -4,7 +4,7 @@ - netstandard2.0 + netstandard2.1 Volo.Abp.EntityFrameworkCore Volo.Abp.EntityFrameworkCore $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; @@ -20,8 +20,8 @@ - - + + diff --git a/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/Domain/Repositories/EfCoreRepositoryExtensions.cs b/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/Domain/Repositories/EfCoreRepositoryExtensions.cs index a019d29a49..2463062cde 100644 --- a/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/Domain/Repositories/EfCoreRepositoryExtensions.cs +++ b/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/Domain/Repositories/EfCoreRepositoryExtensions.cs @@ -5,32 +5,29 @@ using Volo.Abp.Domain.Repositories.EntityFrameworkCore; namespace Volo.Abp.Domain.Repositories { - //TODO: Should work for any IRepository implementation - public static class EfCoreRepositoryExtensions { - public static DbContext GetDbContext(this IReadOnlyBasicRepository repository) - where TEntity : class, IEntity + public static DbContext GetDbContext(this IReadOnlyBasicRepository repository) + where TEntity : class, IEntity { return repository.ToEfCoreRepository().DbContext; } - public static DbSet GetDbSet(this IReadOnlyBasicRepository repository) - where TEntity : class, IEntity + public static DbSet GetDbSet(this IReadOnlyBasicRepository repository) + where TEntity : class, IEntity { return repository.ToEfCoreRepository().DbSet; } - public static IEfCoreRepository ToEfCoreRepository(this IReadOnlyBasicRepository repository) - where TEntity : class, IEntity + public static IEfCoreRepository ToEfCoreRepository(this IReadOnlyBasicRepository repository) + where TEntity : class, IEntity { - var efCoreRepository = repository as IEfCoreRepository; - if (efCoreRepository == null) + if (repository is IEfCoreRepository efCoreRepository) { - throw new ArgumentException("Given repository does not implement " + typeof(IEfCoreRepository).AssemblyQualifiedName, nameof(repository)); + return efCoreRepository; } - return efCoreRepository; + throw new ArgumentException("Given repository does not implement " + typeof(IEfCoreRepository).AssemblyQualifiedName, nameof(repository)); } } } diff --git a/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/DatabaseFacadeExtensions.cs b/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/DatabaseFacadeExtensions.cs deleted file mode 100644 index 55bb9428e8..0000000000 --- a/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/DatabaseFacadeExtensions.cs +++ /dev/null @@ -1,15 +0,0 @@ -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Internal; - -namespace Volo.Abp.EntityFrameworkCore -{ - public static class DatabaseFacadeExtensions - { - public static bool IsRelational(this DatabaseFacade database) - { -#pragma warning disable EF1001 // Internal EF Core API usage. - return ((IDatabaseFacadeDependenciesAccessor)database).Dependencies is IRelationalDatabaseFacadeDependencies; -#pragma warning restore EF1001 // Internal EF Core API usage. - } - } -} diff --git a/framework/src/Volo.Abp.EventBus.Kafka/Volo.Abp.EventBus.Kafka.csproj b/framework/src/Volo.Abp.EventBus.Kafka/Volo.Abp.EventBus.Kafka.csproj index 42b0293781..cbf8d78aea 100644 --- a/framework/src/Volo.Abp.EventBus.Kafka/Volo.Abp.EventBus.Kafka.csproj +++ b/framework/src/Volo.Abp.EventBus.Kafka/Volo.Abp.EventBus.Kafka.csproj @@ -2,7 +2,7 @@ - + netstandard2.0 diff --git a/framework/src/Volo.Abp.EventBus.Rebus/FodyWeavers.xml b/framework/src/Volo.Abp.EventBus.Rebus/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/framework/src/Volo.Abp.EventBus.Rebus/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.EventBus.Rebus/FodyWeavers.xsd b/framework/src/Volo.Abp.EventBus.Rebus/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/framework/src/Volo.Abp.EventBus.Rebus/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.EventBus.Rebus/Volo.Abp.EventBus.Rebus.csproj b/framework/src/Volo.Abp.EventBus.Rebus/Volo.Abp.EventBus.Rebus.csproj new file mode 100644 index 0000000000..0a01911990 --- /dev/null +++ b/framework/src/Volo.Abp.EventBus.Rebus/Volo.Abp.EventBus.Rebus.csproj @@ -0,0 +1,26 @@ + + + + + + + netstandard2.0 + Volo.Abp.EventBus.Rebus + Volo.Abp.EventBus.Rebus + $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; + false + false + false + + + + + + + + + + + + + diff --git a/framework/src/Volo.Abp.EventBus.Rebus/Volo/Abp/EventBus/Rebus/AbpEventBusRebusModule.cs b/framework/src/Volo.Abp.EventBus.Rebus/Volo/Abp/EventBus/Rebus/AbpEventBusRebusModule.cs new file mode 100644 index 0000000000..9ebd91a6a5 --- /dev/null +++ b/framework/src/Volo.Abp.EventBus.Rebus/Volo/Abp/EventBus/Rebus/AbpEventBusRebusModule.cs @@ -0,0 +1,43 @@ +using Microsoft.Extensions.DependencyInjection; +using Rebus.Handlers; +using Rebus.ServiceProvider; +using Volo.Abp.Modularity; + +namespace Volo.Abp.EventBus.Rebus +{ + [DependsOn( + typeof(AbpEventBusModule))] + public class AbpEventBusRebusModule : AbpModule + { + public override void ConfigureServices(ServiceConfigurationContext context) + { + var options = context.Services.ExecutePreConfiguredActions(); + + context.Services.AddTransient(typeof(IHandleMessages<>), typeof(RebusDistributedEventHandlerAdapter<>)); + + Configure(rebusOptions => + { + rebusOptions.Configurer = options.Configurer; + rebusOptions.Publish = options.Publish; + rebusOptions.InputQueueName = options.InputQueueName; + }); + + context.Services.AddRebus(configurer => + { + options.Configurer?.Invoke(configurer); + return configurer; + }); + + } + + public override void OnApplicationInitialization(ApplicationInitializationContext context) + { + context.ServiceProvider.UseRebus(); + + context + .ServiceProvider + .GetRequiredService() + .Initialize(); + } + } +} diff --git a/framework/src/Volo.Abp.EventBus.Rebus/Volo/Abp/EventBus/Rebus/AbpRebusEventBusOptions.cs b/framework/src/Volo.Abp.EventBus.Rebus/Volo/Abp/EventBus/Rebus/AbpRebusEventBusOptions.cs new file mode 100644 index 0000000000..8aaee7bd63 --- /dev/null +++ b/framework/src/Volo.Abp.EventBus.Rebus/Volo/Abp/EventBus/Rebus/AbpRebusEventBusOptions.cs @@ -0,0 +1,49 @@ +using System; +using System.Threading.Tasks; +using JetBrains.Annotations; +using Rebus.Bus; +using Rebus.Config; +using Rebus.Persistence.InMem; +using Rebus.Transport.InMem; + +namespace Volo.Abp.EventBus.Rebus +{ + public class AbpRebusEventBusOptions + { + [NotNull] + public string InputQueueName { get; set; } + + [NotNull] + public Action Configurer + { + get => _configurer; + set => _configurer = Check.NotNull(value, nameof(value)); + } + private Action _configurer; + + [NotNull] + public Func Publish + { + get => _publish; + set => _publish = Check.NotNull(value, nameof(value)); + } + private Func _publish; + + public AbpRebusEventBusOptions() + { + _publish = DefaultPublish; + _configurer = DefaultConfigurer; + } + + private async Task DefaultPublish(IBus bus, Type eventType, object eventData) + { + await bus.Advanced.Routing.Send(InputQueueName, eventData); + } + + private void DefaultConfigurer(RebusConfigurer configurer) + { + configurer.Subscriptions(s => s.StoreInMemory()); + configurer.Transport(t => t.UseInMemoryTransport(new InMemNetwork(), InputQueueName)); + } + } +} diff --git a/framework/src/Volo.Abp.EventBus.Rebus/Volo/Abp/EventBus/Rebus/RebusDistributedEventBus.cs b/framework/src/Volo.Abp.EventBus.Rebus/Volo/Abp/EventBus/Rebus/RebusDistributedEventBus.cs new file mode 100644 index 0000000000..ce3549646e --- /dev/null +++ b/framework/src/Volo.Abp.EventBus.Rebus/Volo/Abp/EventBus/Rebus/RebusDistributedEventBus.cs @@ -0,0 +1,176 @@ +using System; +using System.Collections.Concurrent; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Options; +using Rebus.Bus; +using Volo.Abp.DependencyInjection; +using Volo.Abp.EventBus.Distributed; +using Volo.Abp.MultiTenancy; +using Volo.Abp.Threading; + +namespace Volo.Abp.EventBus.Rebus +{ + [Dependency(ReplaceServices = true)] + [ExposeServices(typeof(IDistributedEventBus), typeof(RebusDistributedEventBus))] + public class RebusDistributedEventBus : EventBusBase, IDistributedEventBus, ISingletonDependency + { + protected IBus Rebus { get; } + + //TODO: Accessing to the List may not be thread-safe! + protected ConcurrentDictionary> HandlerFactories { get; } + protected ConcurrentDictionary EventTypes { get; } + protected AbpDistributedEventBusOptions AbpDistributedEventBusOptions { get; } + protected AbpRebusEventBusOptions AbpRebusEventBusOptions { get; } + + public RebusDistributedEventBus( + IServiceScopeFactory serviceScopeFactory, + ICurrentTenant currentTenant, + IBus rebus, + IOptions abpDistributedEventBusOptions, + IOptions abpEventBusRebusOptions) : + base(serviceScopeFactory, currentTenant) + { + Rebus = rebus; + AbpRebusEventBusOptions = abpEventBusRebusOptions.Value; + AbpDistributedEventBusOptions = abpDistributedEventBusOptions.Value; + + HandlerFactories = new ConcurrentDictionary>(); + EventTypes = new ConcurrentDictionary(); + } + + public void Initialize() + { + SubscribeHandlers(AbpDistributedEventBusOptions.Handlers); + } + + public override IDisposable Subscribe(Type eventType, IEventHandlerFactory factory) + { + var handlerFactories = GetOrCreateHandlerFactories(eventType); + + if (factory.IsInFactories(handlerFactories)) + { + return NullDisposable.Instance; + } + + handlerFactories.Add(factory); + + if (handlerFactories.Count == 1) //TODO: Multi-threading! + { + Rebus.Subscribe(eventType); + } + + return new EventHandlerFactoryUnregistrar(this, eventType, factory); + } + + public override void Unsubscribe(Func action) + { + Check.NotNull(action, nameof(action)); + + GetOrCreateHandlerFactories(typeof(TEvent)) + .Locking(factories => + { + factories.RemoveAll( + factory => + { + if (!(factory is SingleInstanceHandlerFactory singleInstanceFactory)) + { + return false; + } + + if (!(singleInstanceFactory.HandlerInstance is ActionEventHandler actionHandler)) + { + return false; + } + + return actionHandler.Action == action; + }); + }); + + Rebus.Unsubscribe(typeof(TEvent)); + } + + public override void Unsubscribe(Type eventType, IEventHandler handler) + { + GetOrCreateHandlerFactories(eventType) + .Locking(factories => + { + factories.RemoveAll( + factory => + factory is SingleInstanceHandlerFactory handlerFactory && + handlerFactory.HandlerInstance == handler + ); + }); + + Rebus.Unsubscribe(eventType); + } + + public override void Unsubscribe(Type eventType, IEventHandlerFactory factory) + { + GetOrCreateHandlerFactories(eventType).Locking(factories => factories.Remove(factory)); + Rebus.Unsubscribe(eventType); + } + + public override void UnsubscribeAll(Type eventType) + { + GetOrCreateHandlerFactories(eventType).Locking(factories => factories.Clear()); + Rebus.Unsubscribe(eventType); + } + + public IDisposable Subscribe(IDistributedEventHandler handler) where TEvent : class + { + return Subscribe(typeof(TEvent), handler); + } + + public override async Task PublishAsync(Type eventType, object eventData) + { + await AbpRebusEventBusOptions.Publish(Rebus, eventType, eventData); + } + + private List GetOrCreateHandlerFactories(Type eventType) + { + return HandlerFactories.GetOrAdd( + eventType, + type => + { + var eventName = EventNameAttribute.GetNameOrDefault(type); + EventTypes[eventName] = type; + return new List(); + } + ); + } + + protected override IEnumerable GetHandlerFactories(Type eventType) + { + var handlerFactoryList = new List(); + + foreach (var handlerFactory in HandlerFactories.Where(hf => ShouldTriggerEventForHandler(eventType, hf.Key)) + ) + { + handlerFactoryList.Add( + new EventTypeWithEventHandlerFactories(handlerFactory.Key, handlerFactory.Value)); + } + + return handlerFactoryList.ToArray(); + } + + private static bool ShouldTriggerEventForHandler(Type targetEventType, Type handlerEventType) + { + //Should trigger same type + if (handlerEventType == targetEventType) + { + return true; + } + + //Should trigger for inherited types + if (handlerEventType.IsAssignableFrom(targetEventType)) + { + return true; + } + + return false; + } + } +} diff --git a/framework/src/Volo.Abp.EventBus.Rebus/Volo/Abp/EventBus/Rebus/RebusDistributedEventHandlerAdapter.cs b/framework/src/Volo.Abp.EventBus.Rebus/Volo/Abp/EventBus/Rebus/RebusDistributedEventHandlerAdapter.cs new file mode 100644 index 0000000000..005226b885 --- /dev/null +++ b/framework/src/Volo.Abp.EventBus.Rebus/Volo/Abp/EventBus/Rebus/RebusDistributedEventHandlerAdapter.cs @@ -0,0 +1,20 @@ +using System.Threading.Tasks; +using Rebus.Handlers; + +namespace Volo.Abp.EventBus.Rebus +{ + public class RebusDistributedEventHandlerAdapter : IHandleMessages + { + protected RebusDistributedEventBus RebusDistributedEventBus { get; } + + public RebusDistributedEventHandlerAdapter(RebusDistributedEventBus rebusDistributedEventBus) + { + RebusDistributedEventBus = rebusDistributedEventBus; + } + + public async Task Handle(TEventData message) + { + await RebusDistributedEventBus.TriggerHandlersAsync(typeof(TEventData), message); + } + } +} diff --git a/framework/src/Volo.Abp.ExceptionHandling/Volo.Abp.ExceptionHandling.csproj b/framework/src/Volo.Abp.ExceptionHandling/Volo.Abp.ExceptionHandling.csproj index 65283bbc26..d0aa06056e 100644 --- a/framework/src/Volo.Abp.ExceptionHandling/Volo.Abp.ExceptionHandling.csproj +++ b/framework/src/Volo.Abp.ExceptionHandling/Volo.Abp.ExceptionHandling.csproj @@ -19,7 +19,7 @@ - + diff --git a/framework/src/Volo.Abp.ExceptionHandling/Volo/Abp/ExceptionHandling/Localization/hu.json b/framework/src/Volo.Abp.ExceptionHandling/Volo/Abp/ExceptionHandling/Localization/hu.json new file mode 100644 index 0000000000..18ef0e4be1 --- /dev/null +++ b/framework/src/Volo.Abp.ExceptionHandling/Volo/Abp/ExceptionHandling/Localization/hu.json @@ -0,0 +1,23 @@ +{ + "culture": "hu", + "texts": { + "InternalServerErrorMessage": "Belső hiba történt a kérése során!", + "ValidationErrorMessage": "Kérése érvénytelen!", + "ValidationNarrativeErrorMessageTitle": "A validálás során a következő hibákat észleltük.", + "DefaultErrorMessage": "Hiba történt!", + "DefaultErrorMessageDetail": "A hiba részleteit nem a szerver küldte el.", + "DefaultErrorMessage401": "Nincs hitelesítve!", + "DefaultErrorMessage401Detail": "A művelet végrehajtásához be kell jelentkeznie.", + "DefaultErrorMessage403": "Ön nem jogosult!", + "DefaultErrorMessage403Detail": "Ezt a műveletet nem hajthatja végre!", + "DefaultErrorMessage404": "Az erőforrás nem található!", + "DefaultErrorMessage404Detail": "A kért erőforrás nem található a szerveren", + "EntityNotFoundErrorMessage": "Nincs {0} elem, amelynek id értéke {1}!", + "Error": "Nincs {0} elem, amelynek id értéke {1}!", + "UnhandledException": "Nem kezelt kivétel!", + "401Message": "Jogosulatlan", + "403Message": "Tiltott", + "404Message": "Az oldal nem található", + "500Message": "Belső Szerverhiba" + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Http.Client.IdentityModel.Web/Volo.Abp.Http.Client.IdentityModel.Web.csproj b/framework/src/Volo.Abp.Http.Client.IdentityModel.Web/Volo.Abp.Http.Client.IdentityModel.Web.csproj index 1518da9045..81a3d0ab9e 100644 --- a/framework/src/Volo.Abp.Http.Client.IdentityModel.Web/Volo.Abp.Http.Client.IdentityModel.Web.csproj +++ b/framework/src/Volo.Abp.Http.Client.IdentityModel.Web/Volo.Abp.Http.Client.IdentityModel.Web.csproj @@ -4,7 +4,7 @@ - netcoreapp3.1 + net5.0 Volo.Abp.Http.Client.IdentityModel.Web Volo.Abp.Http.Client.IdentityModel.Web $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; diff --git a/framework/src/Volo.Abp.Http.Client.IdentityModel.WebAssembly/Volo.Abp.Http.Client.IdentityModel.WebAssembly.csproj b/framework/src/Volo.Abp.Http.Client.IdentityModel.WebAssembly/Volo.Abp.Http.Client.IdentityModel.WebAssembly.csproj index 36838f5149..95270edc7c 100644 --- a/framework/src/Volo.Abp.Http.Client.IdentityModel.WebAssembly/Volo.Abp.Http.Client.IdentityModel.WebAssembly.csproj +++ b/framework/src/Volo.Abp.Http.Client.IdentityModel.WebAssembly/Volo.Abp.Http.Client.IdentityModel.WebAssembly.csproj @@ -4,7 +4,7 @@ - netstandard2.1 + net5.0 Volo.Abp.Http.Client.IdentityModel.WebAssembly Volo.Abp.Http.Client.IdentityModel.WebAssembly $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; @@ -15,9 +15,9 @@ - + - + diff --git a/framework/src/Volo.Abp.Http.Client.IdentityModel.WebAssembly/Volo/Abp/Http/Client/IdentityModel/WebAssembly/AccessTokenProviderIdentityModelRemoteServiceHttpClientAuthenticator.cs b/framework/src/Volo.Abp.Http.Client.IdentityModel.WebAssembly/Volo/Abp/Http/Client/IdentityModel/WebAssembly/AccessTokenProviderIdentityModelRemoteServiceHttpClientAuthenticator.cs index c86fc095c7..0e0b659ef1 100644 --- a/framework/src/Volo.Abp.Http.Client.IdentityModel.WebAssembly/Volo/Abp/Http/Client/IdentityModel/WebAssembly/AccessTokenProviderIdentityModelRemoteServiceHttpClientAuthenticator.cs +++ b/framework/src/Volo.Abp.Http.Client.IdentityModel.WebAssembly/Volo/Abp/Http/Client/IdentityModel/WebAssembly/AccessTokenProviderIdentityModelRemoteServiceHttpClientAuthenticator.cs @@ -20,7 +20,7 @@ namespace Volo.Abp.Http.Client.IdentityModel.WebAssembly AccessTokenProvider = accessTokenProvider; } - public override async Task Authenticate(RemoteServiceHttpClientAuthenticateContext context) + public async override Task Authenticate(RemoteServiceHttpClientAuthenticateContext context) { if (context.RemoteService.GetUseCurrentAccessToken() != false) { diff --git a/framework/src/Volo.Abp.Http.Client/Volo.Abp.Http.Client.csproj b/framework/src/Volo.Abp.Http.Client/Volo.Abp.Http.Client.csproj index c224811e16..a96f3afd4a 100644 --- a/framework/src/Volo.Abp.Http.Client/Volo.Abp.Http.Client.csproj +++ b/framework/src/Volo.Abp.Http.Client/Volo.Abp.Http.Client.csproj @@ -1,4 +1,4 @@ - + @@ -15,7 +15,7 @@ - + diff --git a/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/Content/ReferencedRemoteStreamContent.cs b/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/Content/ReferencedRemoteStreamContent.cs new file mode 100644 index 0000000000..b99cec8a51 --- /dev/null +++ b/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/Content/ReferencedRemoteStreamContent.cs @@ -0,0 +1,16 @@ +using System.IO; +using Volo.Abp.Content; + +namespace Volo.Abp.Http.Client.Content +{ + internal class ReferencedRemoteStreamContent : RemoteStreamContent + { + private readonly object[] _references; + + public ReferencedRemoteStreamContent(Stream stream, params object[] references) + : base(stream) + { + this._references = references; + } + } +} 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 5313457ba7..321d538044 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 @@ -10,9 +10,11 @@ using System.Threading.Tasks; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Abstractions; using Microsoft.Extensions.Options; +using Volo.Abp.Content; using Volo.Abp.DependencyInjection; using Volo.Abp.DynamicProxy; using Volo.Abp.Http.Client.Authentication; +using Volo.Abp.Http.Client.Content; using Volo.Abp.Http.Modeling; using Volo.Abp.Http.ProxyScripting.Generators; using Volo.Abp.Json; @@ -103,17 +105,26 @@ namespace Volo.Abp.Http.Client.DynamicProxying private async Task MakeRequestAndGetResultAsync(IAbpMethodInvocation invocation) { - var responseAsString = await MakeRequestAsync(invocation); + var responseContent = await MakeRequestAsync(invocation); + if (typeof(T) == typeof(IRemoteStreamContent)) + { + /* 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 ReferencedRemoteStreamContent(await responseContent.ReadAsStreamAsync(), responseContent)); + } + + var stringContent = await responseContent.ReadAsStringAsync(); if (typeof(T) == typeof(string)) { - return (T)Convert.ChangeType(responseAsString, typeof(T)); + return (T)(object)stringContent; } - return JsonSerializer.Deserialize(responseAsString); + return JsonSerializer.Deserialize(await responseContent.ReadAsStringAsync()); } - private async Task MakeRequestAsync(IAbpMethodInvocation invocation) + private async Task MakeRequestAsync(IAbpMethodInvocation invocation) { var clientConfig = ClientOptions.HttpClientProxies.GetOrDefault(typeof(TService)) ?? throw new AbpException($"Could not get DynamicHttpClientProxyConfig for {typeof(TService).FullName}."); var remoteServiceConfig = AbpRemoteServiceOptions.RemoteServices.GetConfigurationOrDefault(clientConfig.RemoteServiceName); @@ -140,14 +151,16 @@ namespace Volo.Abp.Http.Client.DynamicProxying ) ); - var response = await client.SendAsync(requestMessage, GetCancellationToken()); + var response = await client.SendAsync(requestMessage, + HttpCompletionOption.ResponseHeadersRead /*this will buffer only the headers, the content will be used as a stream*/, + GetCancellationToken()); if (!response.IsSuccessStatusCode) { await ThrowExceptionForResponseAsync(response); } - return await response.Content.ReadAsStringAsync(); + return response.Content; } private ApiVersionInfo GetApiVersionInfo(ActionApiDescriptionModel action) diff --git a/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/RequestPayloadBuilder.cs b/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/RequestPayloadBuilder.cs index afc5f9e4f0..7aacfaad02 100644 --- a/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/RequestPayloadBuilder.cs +++ b/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/RequestPayloadBuilder.cs @@ -3,6 +3,7 @@ using System.Linq; using System.Net.Http; using System.Text; using JetBrains.Annotations; +using Volo.Abp.Content; using Volo.Abp.Http.Modeling; using Volo.Abp.Http.ProxyScripting.Generators; using Volo.Abp.Json; @@ -12,24 +13,20 @@ namespace Volo.Abp.Http.Client.DynamicProxying public static class RequestPayloadBuilder { [CanBeNull] - public static HttpContent BuildContent(ActionApiDescriptionModel action,IReadOnlyDictionary methodArguments, IJsonSerializer jsonSerializer, ApiVersionInfo apiVersion) + public static HttpContent BuildContent(ActionApiDescriptionModel action, IReadOnlyDictionary methodArguments, IJsonSerializer jsonSerializer, ApiVersionInfo apiVersion) { var body = GenerateBody(action, methodArguments, jsonSerializer); if (body != null) { - return new StringContent(body, Encoding.UTF8, MimeTypes.Application.Json); + return body; } body = GenerateFormPostData(action, methodArguments); - if (body != null) - { - return new StringContent(body, Encoding.UTF8, MimeTypes.Application.XWwwFormUrlencoded); - } - return null; + return body; } - private static string GenerateBody(ActionApiDescriptionModel action, IReadOnlyDictionary methodArguments, IJsonSerializer jsonSerializer) + private static HttpContent GenerateBody(ActionApiDescriptionModel action, IReadOnlyDictionary methodArguments, IJsonSerializer jsonSerializer) { var parameters = action .Parameters @@ -54,10 +51,20 @@ namespace Volo.Abp.Http.Client.DynamicProxying return null; } - return jsonSerializer.Serialize(value); + if (value is IRemoteStreamContent remoteStreamContent) + { + var content = new StreamContent(remoteStreamContent.GetStream()); + content.Headers.ContentType = new System.Net.Http.Headers.MediaTypeHeaderValue(remoteStreamContent.ContentType); + content.Headers.ContentLength = remoteStreamContent.ContentLength; + return content; + } + else + { + return new StringContent(jsonSerializer.Serialize(value), Encoding.UTF8, MimeTypes.Application.Json); + } } - private static string GenerateFormPostData(ActionApiDescriptionModel action, IReadOnlyDictionary methodArguments) + private static HttpContent GenerateFormPostData(ActionApiDescriptionModel action, IReadOnlyDictionary methodArguments) { var parameters = action .Parameters @@ -86,7 +93,7 @@ namespace Volo.Abp.Http.Client.DynamicProxying isFirstParam = false; } - return postDataBuilder.ToString(); + return new StringContent(postDataBuilder.ToString(), Encoding.UTF8, MimeTypes.Application.XWwwFormUrlencoded); } } } diff --git a/framework/src/Volo.Abp.IdentityModel/Volo.Abp.IdentityModel.csproj b/framework/src/Volo.Abp.IdentityModel/Volo.Abp.IdentityModel.csproj index b96da9be3e..eb5bc35428 100644 --- a/framework/src/Volo.Abp.IdentityModel/Volo.Abp.IdentityModel.csproj +++ b/framework/src/Volo.Abp.IdentityModel/Volo.Abp.IdentityModel.csproj @@ -16,7 +16,7 @@ - + diff --git a/framework/src/Volo.Abp.Json/Volo.Abp.Json.csproj b/framework/src/Volo.Abp.Json/Volo.Abp.Json.csproj index 8af6ecc68f..4e891a687d 100644 --- a/framework/src/Volo.Abp.Json/Volo.Abp.Json.csproj +++ b/framework/src/Volo.Abp.Json/Volo.Abp.Json.csproj @@ -17,7 +17,7 @@ - + diff --git a/framework/src/Volo.Abp.Kafka/Volo.Abp.Kafka.csproj b/framework/src/Volo.Abp.Kafka/Volo.Abp.Kafka.csproj index e91f42d7b2..2a0b576f98 100644 --- a/framework/src/Volo.Abp.Kafka/Volo.Abp.Kafka.csproj +++ b/framework/src/Volo.Abp.Kafka/Volo.Abp.Kafka.csproj @@ -2,12 +2,12 @@ - + netstandard2.0 - + diff --git a/framework/src/Volo.Abp.Ldap/Volo.Abp.Ldap.csproj b/framework/src/Volo.Abp.Ldap/Volo.Abp.Ldap.csproj index 849fe3ce3d..277ac1c24b 100644 --- a/framework/src/Volo.Abp.Ldap/Volo.Abp.Ldap.csproj +++ b/framework/src/Volo.Abp.Ldap/Volo.Abp.Ldap.csproj @@ -17,12 +17,12 @@ - + - + diff --git a/framework/src/Volo.Abp.Ldap/Volo/Abp/Ldap/Localization/es.json b/framework/src/Volo.Abp.Ldap/Volo/Abp/Ldap/Localization/es.json new file mode 100644 index 0000000000..365856425e --- /dev/null +++ b/framework/src/Volo.Abp.Ldap/Volo/Abp/Ldap/Localization/es.json @@ -0,0 +1,19 @@ +{ + "culture": "es", + "texts": { + "DisplayName:Abp.Ldap.ServerHost": "Server host", + "Description:Abp.Ldap.ServerHost": "Servidor host", + + "DisplayName:Abp.Ldap.ServerPort": "Server port", + "Description:Abp.Ldap.ServerPort": "Puerto del servidor host", + + "DisplayName:Abp.Ldap.BaseDc": "Base domain component", + "Description:Abp.Ldap.BaseDc": "Dominio base", + + "DisplayName:Abp.Ldap.UserName": "Username", + "Description:Abp.Ldap.UserName": "Nombre de usuario", + + "DisplayName:Abp.Ldap.Password": "Password", + "Description:Abp.Ldap.Password": "Contrasea" + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Ldap/Volo/Abp/Ldap/Localization/hu.json b/framework/src/Volo.Abp.Ldap/Volo/Abp/Ldap/Localization/hu.json new file mode 100644 index 0000000000..1b240d9b29 --- /dev/null +++ b/framework/src/Volo.Abp.Ldap/Volo/Abp/Ldap/Localization/hu.json @@ -0,0 +1,20 @@ +{ + "culture": "hu", + "texts": { + "DisplayName:Abp.Ldap.ServerHost": "Szerver host", + "Description:Abp.Ldap.ServerHost": "Az LDAP ksizolgáló szerver hostneve vagy IP címe", + + "DisplayName:Abp.Ldap.ServerPort": "Szerver port", + "Description:Abp.Ldap.ServerPort": "LDAP kommunikáció portja", + + "DisplayName:Abp.Ldap.BaseDc": "Bázis tartomány-komponens", + "Description:Abp.Ldap.BaseDc": "Bázis tartomány-komponens", + + "DisplayName:Abp.Ldap.UserName": "Felhasználónév", + "Description:Abp.Ldap.UserName": "Felhasználónév", + + "DisplayName:Abp.Ldap.Password": "Jelszó", + "Description:Abp.Ldap.Password": "Jelszó" + } + } + \ No newline at end of file diff --git a/framework/src/Volo.Abp.Localization/Volo.Abp.Localization.csproj b/framework/src/Volo.Abp.Localization/Volo.Abp.Localization.csproj index 88c3bf0e81..df04ab95df 100644 --- a/framework/src/Volo.Abp.Localization/Volo.Abp.Localization.csproj +++ b/framework/src/Volo.Abp.Localization/Volo.Abp.Localization.csproj @@ -13,12 +13,12 @@ false - + - + diff --git a/framework/src/Volo.Abp.Localization/Volo/Abp/Localization/AbpDictionaryBasedStringLocalizer.cs b/framework/src/Volo.Abp.Localization/Volo/Abp/Localization/AbpDictionaryBasedStringLocalizer.cs index 7d9056ca4d..4979b87ce6 100644 --- a/framework/src/Volo.Abp.Localization/Volo/Abp/Localization/AbpDictionaryBasedStringLocalizer.cs +++ b/framework/src/Volo.Abp.Localization/Volo/Abp/Localization/AbpDictionaryBasedStringLocalizer.cs @@ -31,7 +31,7 @@ namespace Volo.Abp.Localization includeParentCultures ); } - + public IEnumerable GetAllStrings(bool includeParentCultures, bool includeBaseLocalizers) { return GetAllStrings( @@ -41,12 +41,6 @@ namespace Volo.Abp.Localization ); } - [Obsolete("This method is obsolete. Use `CurrentCulture` and `CurrentUICulture` instead.")] - public IStringLocalizer WithCulture(CultureInfo culture) - { - return new CultureWrapperStringLocalizer(culture.Name, this); - } - protected virtual LocalizedString GetLocalizedStringFormatted(string name, params object[] arguments) { return GetLocalizedStringFormatted(name, CultureInfo.CurrentUICulture.Name, arguments); @@ -126,7 +120,7 @@ namespace Volo.Abp.Localization } protected virtual IReadOnlyList GetAllStrings( - string cultureName, + string cultureName, bool includeParentCultures = true, bool includeBaseLocalizers = true) { @@ -177,7 +171,7 @@ namespace Volo.Abp.Localization return allStrings.Values.ToImmutableList(); } - + public class CultureWrapperStringLocalizer : IStringLocalizer, IStringLocalizerSupportsInheritance { private readonly string _cultureName; @@ -198,16 +192,10 @@ namespace Volo.Abp.Localization return _innerLocalizer.GetAllStrings(_cultureName, includeParentCultures); } - [Obsolete("This method is obsolete. Use `CurrentCulture` and `CurrentUICulture` instead.")] - public IStringLocalizer WithCulture(CultureInfo culture) - { - return new CultureWrapperStringLocalizer(culture.Name, _innerLocalizer); - } - public IEnumerable GetAllStrings(bool includeParentCultures, bool includeBaseLocalizers) { return _innerLocalizer.GetAllStrings(_cultureName, includeParentCultures, includeBaseLocalizers); } } } -} \ No newline at end of file +} diff --git a/framework/src/Volo.Abp.Localization/Volo/Abp/Localization/Resources/AbpLocalization/hu.json b/framework/src/Volo.Abp.Localization/Volo/Abp/Localization/Resources/AbpLocalization/hu.json new file mode 100644 index 0000000000..d355c69ee3 --- /dev/null +++ b/framework/src/Volo.Abp.Localization/Volo/Abp/Localization/Resources/AbpLocalization/hu.json @@ -0,0 +1,7 @@ +{ + "culture": "hu", + "texts": { + "DisplayName:Abp.Localization.DefaultLanguage": "Alapértelmezett nyelv", + "Description:Abp.Localization.DefaultLanguage": "Az alkalmazás alapértelmezett nyelve." + } + } \ No newline at end of file diff --git a/framework/src/Volo.Abp.MultiTenancy/Volo/Abp/MultiTenancy/CurrentTenant.cs b/framework/src/Volo.Abp.MultiTenancy/Volo/Abp/MultiTenancy/CurrentTenant.cs index 4cd6ae9527..cd5fb5c3b3 100644 --- a/framework/src/Volo.Abp.MultiTenancy/Volo/Abp/MultiTenancy/CurrentTenant.cs +++ b/framework/src/Volo.Abp.MultiTenancy/Volo/Abp/MultiTenancy/CurrentTenant.cs @@ -1,4 +1,4 @@ -using System; +using System; using Volo.Abp.DependencyInjection; namespace Volo.Abp.MultiTenancy diff --git a/framework/src/Volo.Abp.MultiTenancy/Volo/Abp/MultiTenancy/ITenantConfigurationProvider.cs b/framework/src/Volo.Abp.MultiTenancy/Volo/Abp/MultiTenancy/ITenantConfigurationProvider.cs new file mode 100644 index 0000000000..010a10791a --- /dev/null +++ b/framework/src/Volo.Abp.MultiTenancy/Volo/Abp/MultiTenancy/ITenantConfigurationProvider.cs @@ -0,0 +1,9 @@ +using System.Threading.Tasks; + +namespace Volo.Abp.MultiTenancy +{ + public interface ITenantConfigurationProvider + { + Task GetAsync(bool saveResolveResult = false); + } +} diff --git a/framework/src/Volo.Abp.MultiTenancy/Volo/Abp/MultiTenancy/TenantConfigurationProvider.cs b/framework/src/Volo.Abp.MultiTenancy/Volo/Abp/MultiTenancy/TenantConfigurationProvider.cs new file mode 100644 index 0000000000..a89c44b465 --- /dev/null +++ b/framework/src/Volo.Abp.MultiTenancy/Volo/Abp/MultiTenancy/TenantConfigurationProvider.cs @@ -0,0 +1,62 @@ +using System; +using System.Threading.Tasks; +using Volo.Abp.DependencyInjection; + +namespace Volo.Abp.MultiTenancy +{ + public class TenantConfigurationProvider : ITenantConfigurationProvider, ITransientDependency + { + protected virtual ITenantResolver TenantResolver { get; } + protected virtual ITenantStore TenantStore { get; } + protected virtual ITenantResolveResultAccessor TenantResolveResultAccessor { get; } + + public TenantConfigurationProvider( + ITenantResolver tenantResolver, + ITenantStore tenantStore, + ITenantResolveResultAccessor tenantResolveResultAccessor) + { + TenantResolver = tenantResolver; + TenantStore = tenantStore; + TenantResolveResultAccessor = tenantResolveResultAccessor; + } + + public virtual async Task GetAsync(bool saveResolveResult = false) + { + var resolveResult = TenantResolver.ResolveTenantIdOrName(); + + if (saveResolveResult) + { + TenantResolveResultAccessor.Result = resolveResult; + } + + TenantConfiguration tenant = null; + if (resolveResult.TenantIdOrName != null) + { + tenant = await FindTenantAsync(resolveResult.TenantIdOrName); + + if (tenant == null) + { + throw new BusinessException( + code: "Volo.AbpIo.MultiTenancy:010001", + message: "Tenant not found!", + details: "There is no tenant with the tenant id or name: " + resolveResult.TenantIdOrName + ); + } + } + + return tenant; + } + + protected virtual async Task FindTenantAsync(string tenantIdOrName) + { + if (Guid.TryParse(tenantIdOrName, out var parsedTenantId)) + { + return await TenantStore.FindAsync(parsedTenantId); + } + else + { + return await TenantStore.FindAsync(tenantIdOrName); + } + } + } +} diff --git a/framework/src/Volo.Abp.ObjectExtending/Volo.Abp.ObjectExtending.csproj b/framework/src/Volo.Abp.ObjectExtending/Volo.Abp.ObjectExtending.csproj index 4b8542101a..19f549b36a 100644 --- a/framework/src/Volo.Abp.ObjectExtending/Volo.Abp.ObjectExtending.csproj +++ b/framework/src/Volo.Abp.ObjectExtending/Volo.Abp.ObjectExtending.csproj @@ -1,4 +1,4 @@ - + @@ -19,4 +19,4 @@ - \ No newline at end of file + diff --git a/framework/src/Volo.Abp.Quartz/Volo.Abp.Quartz.csproj b/framework/src/Volo.Abp.Quartz/Volo.Abp.Quartz.csproj index 00da6b31b6..198d2479e4 100644 --- a/framework/src/Volo.Abp.Quartz/Volo.Abp.Quartz.csproj +++ b/framework/src/Volo.Abp.Quartz/Volo.Abp.Quartz.csproj @@ -1,4 +1,4 @@ - + diff --git a/framework/src/Volo.Abp.Security/Volo/Abp/Security/AbpSecurityModule.cs b/framework/src/Volo.Abp.Security/Volo/Abp/Security/AbpSecurityModule.cs index f62a9566c4..b1cdcb1097 100644 --- a/framework/src/Volo.Abp.Security/Volo/Abp/Security/AbpSecurityModule.cs +++ b/framework/src/Volo.Abp.Security/Volo/Abp/Security/AbpSecurityModule.cs @@ -1,9 +1,45 @@ -using Volo.Abp.Modularity; +using System; +using System.Text; +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp.Modularity; +using Volo.Abp.Security.Encryption; namespace Volo.Abp.Security { public class AbpSecurityModule : AbpModule { + public override void ConfigureServices(ServiceConfigurationContext context) + { + var configuration = context.Services.GetConfiguration(); + context.Services.Configure(options => + { + var keySize = configuration["StringEncryption:KeySize"]; + if (!keySize.IsNullOrWhiteSpace()) + { + if (int.TryParse(keySize, out var intValue)) + { + options.Keysize = intValue; + } + } + var defaultPassPhrase = configuration["StringEncryption:DefaultPassPhrase"]; + if (!defaultPassPhrase.IsNullOrWhiteSpace()) + { + options.DefaultPassPhrase = defaultPassPhrase; + } + + var initVectorBytes = configuration["StringEncryption:InitVectorBytes"]; + if (!initVectorBytes.IsNullOrWhiteSpace()) + { + options.InitVectorBytes = Encoding.ASCII.GetBytes(initVectorBytes);; + } + + var defaultSalt = configuration["StringEncryption:DefaultSalt"]; + if (!defaultSalt.IsNullOrWhiteSpace()) + { + options.DefaultSalt = Encoding.ASCII.GetBytes(defaultSalt);; + } + }); + } } } diff --git a/framework/src/Volo.Abp.Security/Volo/Abp/Security/Claims/CurrentPrincipalAccessorExtensions.cs b/framework/src/Volo.Abp.Security/Volo/Abp/Security/Claims/CurrentPrincipalAccessorExtensions.cs new file mode 100644 index 0000000000..63f83f8a5a --- /dev/null +++ b/framework/src/Volo.Abp.Security/Volo/Abp/Security/Claims/CurrentPrincipalAccessorExtensions.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Security.Claims; + +namespace Volo.Abp.Security.Claims +{ + public static class CurrentPrincipalAccessorExtensions + { + public static IDisposable Change(this ICurrentPrincipalAccessor currentPrincipalAccessor, Claim claim) + { + return currentPrincipalAccessor.Change(new[] {claim}); + } + + public static IDisposable Change(this ICurrentPrincipalAccessor currentPrincipalAccessor, IEnumerable claims) + { + return currentPrincipalAccessor.Change(new ClaimsIdentity(claims)); + } + + public static IDisposable Change(this ICurrentPrincipalAccessor currentPrincipalAccessor, ClaimsIdentity claimsIdentity) + { + return currentPrincipalAccessor.Change(new ClaimsPrincipal(claimsIdentity)); + } + } +} diff --git a/framework/src/Volo.Abp.Serialization/Volo/Abp/Serialization/Binary/BinarySerializationHelper.cs b/framework/src/Volo.Abp.Serialization/Volo/Abp/Serialization/Binary/BinarySerializationHelper.cs deleted file mode 100644 index 31a9ff280b..0000000000 --- a/framework/src/Volo.Abp.Serialization/Volo/Abp/Serialization/Binary/BinarySerializationHelper.cs +++ /dev/null @@ -1,126 +0,0 @@ -using System; -using System.IO; -using System.Runtime.Serialization; -using System.Runtime.Serialization.Formatters.Binary; - -namespace Volo.Abp.Serialization.Binary -{ - /// - /// This class is used to simplify serialization/deserialization operations. - /// Uses .NET binary serialization. - /// - public static class BinarySerializationHelper - { - /// - /// Serializes an object and returns as a byte array. - /// - /// object to be serialized - /// bytes of object - public static byte[] Serialize(object obj) - { - using (var memoryStream = new MemoryStream()) - { - Serialize(obj, memoryStream); - return memoryStream.ToArray(); - } - } - - /// - /// Serializes an object into a stream. - /// - /// object to be serialized - /// Stream to serialize in - /// bytes of object - public static void Serialize(object obj, Stream stream) - { - CreateBinaryFormatter().Serialize(stream, obj); - } - - /// - /// Deserializes an object from given byte array. - /// - /// The byte array that contains object - /// deserialized object - public static object Deserialize(byte[] bytes) - { - using (var memoryStream = new MemoryStream(bytes)) - { - return Deserialize(memoryStream); - } - } - - /// - /// Deserializes an object from given stream. - /// - /// The stream that contains object - /// deserialized object - public static object Deserialize(Stream stream) - { - return CreateBinaryFormatter().Deserialize(stream); - } - - /// - /// Deserializes an object from given byte array. - /// Difference from is that; this method can also deserialize - /// types that are defined in dynamically loaded assemblies (like PlugIns). - /// - /// The byte array that contains object - /// deserialized object - public static object DeserializeExtended(byte[] bytes) - { - using (var memoryStream = new MemoryStream(bytes)) - { - return CreateBinaryFormatter(true).Deserialize(memoryStream); - } - } - - /// - /// Deserializes an object from given stream. - /// Difference from is that; this method can also deserialize - /// types that are defined in dynamically loaded assemblies (like PlugIns). - /// - /// The stream that contains object - /// deserialized object - public static object DeserializeExtended(Stream stream) - { - return CreateBinaryFormatter(true).Deserialize(stream); - } - - private static BinaryFormatter CreateBinaryFormatter(bool extended = false) - { - if (extended) - { - return new BinaryFormatter - { - //TODO: AssemblyFormat = System.Runtime.Serialization.Formatters.FormatterAssemblyStyle.Simple, - Binder = new ExtendedSerializationBinder() - }; - } - else - { - return new BinaryFormatter(); - } - } - - /// - /// This class is used in deserializing to allow deserializing objects that are defined - /// in assemlies that are load in runtime (like PlugIns). - /// - private sealed class ExtendedSerializationBinder : SerializationBinder - { - public override Type BindToType(string assemblyName, string typeName) - { - var toAssemblyName = assemblyName.Split(',')[0]; - foreach (var assembly in AppDomain.CurrentDomain.GetAssemblies()) - { - if (assembly.FullName.Split(',')[0] == toAssemblyName) - { - return assembly.GetType(typeName); - } - } - - return Type.GetType(string.Format("{0}, {1}", typeName, assemblyName)); - } - } - } -} diff --git a/framework/src/Volo.Abp.Serialization/Volo/Abp/Serialization/DefaultObjectSerializer.cs b/framework/src/Volo.Abp.Serialization/Volo/Abp/Serialization/DefaultObjectSerializer.cs index 009fab9fb2..f016fe9773 100644 --- a/framework/src/Volo.Abp.Serialization/Volo/Abp/Serialization/DefaultObjectSerializer.cs +++ b/framework/src/Volo.Abp.Serialization/Volo/Abp/Serialization/DefaultObjectSerializer.cs @@ -1,8 +1,8 @@ using System; +using System.Text.Json; using JetBrains.Annotations; using Microsoft.Extensions.DependencyInjection; using Volo.Abp.DependencyInjection; -using Volo.Abp.Serialization.Binary; namespace Volo.Abp.Serialization { @@ -58,12 +58,12 @@ namespace Volo.Abp.Serialization protected virtual byte[] AutoSerialize(T obj) { - return BinarySerializationHelper.Serialize(obj); + return JsonSerializer.SerializeToUtf8Bytes(obj); } protected virtual T AutoDeserialize(byte[] bytes) { - return (T) BinarySerializationHelper.DeserializeExtended(bytes); + return JsonSerializer.Deserialize(bytes); } } -} \ No newline at end of file +} diff --git a/framework/src/Volo.Abp.Settings/Volo/Abp/Settings/ISettingDefinitionContext.cs b/framework/src/Volo.Abp.Settings/Volo/Abp/Settings/ISettingDefinitionContext.cs index 220e40fe59..59d7acda98 100644 --- a/framework/src/Volo.Abp.Settings/Volo/Abp/Settings/ISettingDefinitionContext.cs +++ b/framework/src/Volo.Abp.Settings/Volo/Abp/Settings/ISettingDefinitionContext.cs @@ -1,9 +1,13 @@ -namespace Volo.Abp.Settings +using System.Collections.Generic; + +namespace Volo.Abp.Settings { public interface ISettingDefinitionContext { SettingDefinition GetOrNull(string name); + + IReadOnlyList GetAll(); void Add(params SettingDefinition[] definitions); } -} \ No newline at end of file +} diff --git a/framework/src/Volo.Abp.Settings/Volo/Abp/Settings/SettingProvider.cs b/framework/src/Volo.Abp.Settings/Volo/Abp/Settings/SettingProvider.cs index 6f5372a4cf..5ef67cbc21 100644 --- a/framework/src/Volo.Abp.Settings/Volo/Abp/Settings/SettingProvider.cs +++ b/framework/src/Volo.Abp.Settings/Volo/Abp/Settings/SettingProvider.cs @@ -35,7 +35,7 @@ namespace Volo.Abp.Settings //TODO: How to implement setting.IsInherited? var value = await GetOrNullValueFromProvidersAsync(providers, setting); - if (setting.IsEncrypted) + if (value != null && setting.IsEncrypted) { value = SettingEncryptionService.Decrypt(setting, value); } @@ -84,4 +84,4 @@ namespace Volo.Abp.Settings return null; } } -} \ No newline at end of file +} diff --git a/framework/src/Volo.Abp.TextTemplating/Volo.Abp.TextTemplating.csproj b/framework/src/Volo.Abp.TextTemplating/Volo.Abp.TextTemplating.csproj index 41bba98866..7885cefbaf 100644 --- a/framework/src/Volo.Abp.TextTemplating/Volo.Abp.TextTemplating.csproj +++ b/framework/src/Volo.Abp.TextTemplating/Volo.Abp.TextTemplating.csproj @@ -1,4 +1,4 @@ - + diff --git a/framework/src/Volo.Abp.Timing/Volo/Abp/Timing/Localization/es.json b/framework/src/Volo.Abp.Timing/Volo/Abp/Timing/Localization/es.json new file mode 100644 index 0000000000..a23fccc1c4 --- /dev/null +++ b/framework/src/Volo.Abp.Timing/Volo/Abp/Timing/Localization/es.json @@ -0,0 +1,7 @@ +{ + "culture": "es", + "texts": { + "DisplayName:Abp.Timing.Timezone": "Zona horaria", + "Description:Abp.Timing.Timezone": "Zona horaria de la Aplicacion" + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Timing/Volo/Abp/Timing/Localization/hu.json b/framework/src/Volo.Abp.Timing/Volo/Abp/Timing/Localization/hu.json new file mode 100644 index 0000000000..7902d093a8 --- /dev/null +++ b/framework/src/Volo.Abp.Timing/Volo/Abp/Timing/Localization/hu.json @@ -0,0 +1,8 @@ +{ + "culture": "hu", + "texts": { + "DisplayName:Abp.Timing.Timezone": "Időzóna", + "Description:Abp.Timing.Timezone": "Alkalmazás időzónája" + } + } + \ No newline at end of file diff --git a/framework/src/Volo.Abp.UI.Navigation/Volo/Abp/Ui/Navigation/Localization/Resource/hu.json b/framework/src/Volo.Abp.UI.Navigation/Volo/Abp/Ui/Navigation/Localization/Resource/hu.json new file mode 100644 index 0000000000..c391e23db2 --- /dev/null +++ b/framework/src/Volo.Abp.UI.Navigation/Volo/Abp/Ui/Navigation/Localization/Resource/hu.json @@ -0,0 +1,6 @@ +{ + "culture": "hu", + "texts": { + "Menu:Administration": "Adminisztráció" + } + } \ No newline at end of file diff --git a/framework/src/Volo.Abp.UI/Localization/Resources/AbpUi/es.json b/framework/src/Volo.Abp.UI/Localization/Resources/AbpUi/es.json index fb0bc45903..56d6b117cf 100644 --- a/framework/src/Volo.Abp.UI/Localization/Resources/AbpUi/es.json +++ b/framework/src/Volo.Abp.UI/Localization/Resources/AbpUi/es.json @@ -4,6 +4,7 @@ "Languages": "Lenguajes", "AreYouSure": "¿Está seguro?", "Cancel": "Cancelar", + "Clear": "Limpiar", "Yes": "Si", "No": "No", "Ok": "Aceptar", @@ -34,6 +35,8 @@ "PagerInfoEmpty": "Mostrando desde 0 hasta 0 de 0 registros", "PagerInfoFiltered": "(filtrado de un total de _MAX_ registros)", "NoDataAvailableInDatatable": "No hay datos", + "Total": "total", + "Selected": "seleccionado", "PagerShowMenuEntries": "Mostrar _MENU_ registros", "DatatableActionDropdownDefaultText": "Acciones", "ChangePassword": "Cambiar contraseña", @@ -41,6 +44,9 @@ "AreYouSureYouWantToCancelEditingWarningMessage": "Tiene cambios sin guardar.", "GoHomePage": "Ir a la página principal", "GoBack": "Atras", - "Search": "Buscar" + "Search": "Buscar", + "ItemWillBeDeletedMessageWithFormat": "Se eliminarán {0}!", + "ItemWillBeDeletedMessage": "Este itém será eliminado!", + "ManageYourAccount": "Administre su cuenta" } -} +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.UI/Localization/Resources/AbpUi/hu.json b/framework/src/Volo.Abp.UI/Localization/Resources/AbpUi/hu.json new file mode 100644 index 0000000000..ed63fb50d0 --- /dev/null +++ b/framework/src/Volo.Abp.UI/Localization/Resources/AbpUi/hu.json @@ -0,0 +1,52 @@ +{ + "culture": "hu", + "texts": { + "Languages": "Nyelvek", + "AreYouSure": "Biztos benne?", + "Cancel": "Mégsem", + "Clear": "Tisztítás", + "Yes": "Igen", + "No": "Nem", + "Ok": "Rendben", + "Close": "Bezárás", + "Save": "Mentés", + "SavingWithThreeDot": "Mentés...", + "Actions": "Műveletek", + "Delete": "Törlés", + "Edit": "Szerkesztés", + "Refresh": "Frissítés", + "Language": "Nyelv", + "LoadMore": "Több betöltése", + "ProcessingWithThreeDot": "Feldolgozás...", + "LoadingWithThreeDot": "Töltés...", + "Welcome": "Üdvözlöm", + "Login": "Bejelentkezés", + "Register": "Regisztráció", + "Logout": "Kijelentkezés", + "Submit": "Beküldés", + "Back": "Vissza", + "PagerSearch": "Keresés", + "PagerNext": "Következő", + "PagerPrevious": "Előző", + "PagerFirst": "Első", + "PagerLast": "Utolsó", + "PagerInfo": "Látható _START_ -tól _END_ -ig _TOTAL_ elemből", + "PagerInfo{0}{1}{2}": "Látható {0}-tól {1}-ig {2} elemből", + "PagerInfoEmpty": "Látható 0-tól 0-ig 0 elemből", + "PagerInfoFiltered": "(szűrve _MAX_ elemből)", + "NoDataAvailableInDatatable": "Nem elérhető adat", + "Total": "összesen", + "Selected": "kiválasztott", + "PagerShowMenuEntries": "Megjelenítve _MENU_ elem", + "DatatableActionDropdownDefaultText": "Műveletek", + "ChangePassword": "Jelszó véltoztatás", + "PersonalInfo": "Saját profil", + "AreYouSureYouWantToCancelEditingWarningMessage": "Vannak mentetlen változtatásai.", + "GoHomePage": "Kezdőlapra lépés", + "GoBack": "Menjen vissza", + "Search": "Keresés", + "ItemWillBeDeletedMessageWithFormat": "{0} törlésre kerül!", + "ItemWillBeDeletedMessage": "Ez az elem törlődik!", + "ManageYourAccount": "Kezelje fiókját" + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.UI/Volo.Abp.UI.csproj b/framework/src/Volo.Abp.UI/Volo.Abp.UI.csproj index 66aa7e93ea..7cf2afccb1 100644 --- a/framework/src/Volo.Abp.UI/Volo.Abp.UI.csproj +++ b/framework/src/Volo.Abp.UI/Volo.Abp.UI.csproj @@ -18,7 +18,7 @@ - + diff --git a/framework/src/Volo.Abp.Validation.Abstractions/Volo.Abp.Validation.Abstractions.csproj b/framework/src/Volo.Abp.Validation.Abstractions/Volo.Abp.Validation.Abstractions.csproj index 2ed6955187..32ada2ce09 100644 --- a/framework/src/Volo.Abp.Validation.Abstractions/Volo.Abp.Validation.Abstractions.csproj +++ b/framework/src/Volo.Abp.Validation.Abstractions/Volo.Abp.Validation.Abstractions.csproj @@ -18,4 +18,4 @@ - \ No newline at end of file + diff --git a/framework/src/Volo.Abp.Validation/Volo/Abp/Validation/Localization/hu.json b/framework/src/Volo.Abp.Validation/Volo/Abp/Validation/Localization/hu.json new file mode 100644 index 0000000000..b956b72f96 --- /dev/null +++ b/framework/src/Volo.Abp.Validation/Volo/Abp/Validation/Localization/hu.json @@ -0,0 +1,34 @@ +{ + "culture": "hu", + "texts": { + "'{0}' and '{1}' do not match.": "'{0}' és '{1}' nem egyforma.", + "The {0} field is not a valid credit card number.": "A {0} érvényes bankkártya szám.", + "{0} is not valid.": "{0} nem érvényes.", + "The {0} field is not a valid e-mail address.": "A {0} nem érvényes email cím.", + "The {0} field only accepts files with the following extensions: {1}": "A {0} mező csak olyan fileokat tartalmazhat melynek kiterjesztése ezek: {1}", + "The field {0} must be a string or array type with a maximum length of '{1}'.": "A {0} mező szöveg vagy felsorolás típusú lehet '{1}' maximum hosszal.", + "The field {0} must be a string or array type with a minimum length of '{1}'.": "A {0} mező szöveg vagy felsorolás típusú lehet '{1}' minimum hosszal.", + "The {0} field is not a valid phone number.": "A {0} nem érvényes telefonszám.", + "The field {0} must be between {1} and {2}.": "A {0} értéke {1} és {2} között kell legyen.", + "The field {0} must match the regular expression '{1}'.": "A {0} nem megfelelő a szükséges formátumnak.", + "The {0} field is required.": "A {0} kötelező.", + "The field {0} must be a string with a maximum length of {1}.": "A {0} szövegnek kell lennie maximum {1} hosszan.", + "The field {0} must be a string with a minimum length of {2} and a maximum length of {1}.": "A {0} mezőnek szöveget kell tartalmaznia minimum {2} és maximum {1} hosszan.", + "The {0} field is not a valid fully-qualified http, https, or ftp URL.": "A {0} mező nem érvényes fully-qualified http, https, vagy ftp URL cím.", + "The field {0} is invalid.": "A {0} mező nem érvényes.", + "ThisFieldIsNotAValidCreditCardNumber.": "A mező nem érvényes bankkártya számot tartalmaz.", + "ThisFieldIsNotValid.": "A mező nem érvényes.", + "ThisFieldIsNotAValidEmailAddress.": "A mező nem érvényes email cím.", + "ThisFieldOnlyAcceptsFilesWithTheFollowingExtensions:{0}": "A mező csak fileneveket fogad a következő kiterjesztésekkel: {0}", + "ThisFieldMustBeAStringOrArrayTypeWithAMaximumLengthOf{0}": "A mezőnek szöveg vagy felsorolás tpusúnak kell lennie maximum '{0}' hosszal.", + "ThisFieldMustBeAStringOrArrayTypeWithAMinimumLengthOf{0}": "A mezőnek szöveg vagy felsorolás tpusúnak kell lennie minimum '{0}' hosszal.", + "ThisFieldIsNotAValidPhoneNumber.": "A mező nem érvényes telefonszám.", + "ThisFieldMustBeBetween{0}And{1}": "A mező értéke {0} és {1} között kell lennie.", + "ThisFieldMustMatchTheRegularExpression{0}": "A mezőnek meg kell felelnie a következő reguláris kifejezésnek '{0}'.", + "ThisFieldIsRequired.": "A mező szükséges.", + "ThisFieldMustBeAStringWithAMaximumLengthOf{0}": "A mezőnek szöveg tpusúnak kell lennie maximum {0} hosszal.", + "ThisFieldMustBeAStringWithAMinimumLengthOf{1}AndAMaximumLengthOf{0}": "A mezőnek szöveget kell tartalmaznia minimum {1} és maximum {0} hosszan.", + "ThisFieldIsNotAValidFullyQualifiedHttpHttpsOrFtpUrl": "A mező nem érvényes fully-qualified http, https, vagy ftp URL cím.", + "ThisFieldIsInvalid.": "A mező nem érvényes." + } + } \ No newline at end of file diff --git a/framework/src/Volo.Abp.Validation/Volo/Abp/Validation/Localization/zh-Hans.json b/framework/src/Volo.Abp.Validation/Volo/Abp/Validation/Localization/zh-Hans.json index 1f40a603e8..0a41ce1ed5 100644 --- a/framework/src/Volo.Abp.Validation/Volo/Abp/Validation/Localization/zh-Hans.json +++ b/framework/src/Volo.Abp.Validation/Volo/Abp/Validation/Localization/zh-Hans.json @@ -27,7 +27,7 @@ "ThisFieldMustMatchTheRegularExpression{0}": "字段必须匹配正则表达式'{0}'.", "ThisFieldIsRequired.": "字段不可为空.", "ThisFieldMustBeAStringWithAMaximumLengthOf{0}": "字段必须是长度为{0}的字符串.", - "ThisFieldMustBeAStringWithAMinimumLengthOf{1}AndAMaximumLengthOf{0}": "字段必须是最小长度为{1}并且最大长度{*}的字符串.", + "ThisFieldMustBeAStringWithAMinimumLengthOf{1}AndAMaximumLengthOf{0}": "字段必须是最小长度为{1}并且最大长度{0}的字符串.", "ThisFieldIsNotAValidFullyQualifiedHttpHttpsOrFtpUrl": "字段{0}不是有效的完全限定的http,https或ftp URL.", "ThisFieldIsInvalid.": "该字段无效." } diff --git a/framework/src/Volo.Abp.VirtualFileSystem/Volo.Abp.VirtualFileSystem.csproj b/framework/src/Volo.Abp.VirtualFileSystem/Volo.Abp.VirtualFileSystem.csproj index 09af40a2c7..748524acd2 100644 --- a/framework/src/Volo.Abp.VirtualFileSystem/Volo.Abp.VirtualFileSystem.csproj +++ b/framework/src/Volo.Abp.VirtualFileSystem/Volo.Abp.VirtualFileSystem.csproj @@ -15,9 +15,9 @@ - - - + + + diff --git a/framework/test/AbpTestBase/AbpTestBase.csproj b/framework/test/AbpTestBase/AbpTestBase.csproj index a1b2dcd89b..10e5b5d74a 100644 --- a/framework/test/AbpTestBase/AbpTestBase.csproj +++ b/framework/test/AbpTestBase/AbpTestBase.csproj @@ -3,7 +3,7 @@ - netcoreapp3.1 + net5.0 AbpTestBase AbpTestBase diff --git a/framework/test/SimpleConsoleDemo/SimpleConsoleDemo.csproj b/framework/test/SimpleConsoleDemo/SimpleConsoleDemo.csproj index 4edbb748b9..cbb90d7379 100644 --- a/framework/test/SimpleConsoleDemo/SimpleConsoleDemo.csproj +++ b/framework/test/SimpleConsoleDemo/SimpleConsoleDemo.csproj @@ -2,7 +2,7 @@ Exe - netcoreapp3.1 + net5.0 @@ -18,7 +18,7 @@ - + diff --git a/framework/test/Volo.Abp.AspNetCore.Authentication.OAuth.Tests/Volo.Abp.AspNetCore.Authentication.OAuth.Tests.csproj b/framework/test/Volo.Abp.AspNetCore.Authentication.OAuth.Tests/Volo.Abp.AspNetCore.Authentication.OAuth.Tests.csproj index 0d170148d4..0a3603d7c0 100644 --- a/framework/test/Volo.Abp.AspNetCore.Authentication.OAuth.Tests/Volo.Abp.AspNetCore.Authentication.OAuth.Tests.csproj +++ b/framework/test/Volo.Abp.AspNetCore.Authentication.OAuth.Tests/Volo.Abp.AspNetCore.Authentication.OAuth.Tests.csproj @@ -3,7 +3,7 @@ - netcoreapp3.1 + net5.0 latest Volo.Abp.AspNetCore.Authentication.OAuth.Tests Volo.Abp.AspNetCore.Authentication.OAuth.Tests diff --git a/framework/test/Volo.Abp.AspNetCore.MultiTenancy.Tests/Volo.Abp.AspNetCore.MultiTenancy.Tests.csproj b/framework/test/Volo.Abp.AspNetCore.MultiTenancy.Tests/Volo.Abp.AspNetCore.MultiTenancy.Tests.csproj index 9e7bf68457..e5c8f6a398 100644 --- a/framework/test/Volo.Abp.AspNetCore.MultiTenancy.Tests/Volo.Abp.AspNetCore.MultiTenancy.Tests.csproj +++ b/framework/test/Volo.Abp.AspNetCore.MultiTenancy.Tests/Volo.Abp.AspNetCore.MultiTenancy.Tests.csproj @@ -1,9 +1,9 @@ - + - netcoreapp3.1 + net5.0 Volo.Abp.AspNetCore.MultiTenancy.Tests Volo.Abp.AspNetCore.MultiTenancy.Tests diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo.Abp.AspNetCore.Mvc.Tests.csproj b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo.Abp.AspNetCore.Mvc.Tests.csproj index c6450e6df1..200e8e45a4 100644 --- a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo.Abp.AspNetCore.Mvc.Tests.csproj +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo.Abp.AspNetCore.Mvc.Tests.csproj @@ -3,7 +3,7 @@ - netcoreapp3.1 + net5.0 $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; Volo.Abp.AspNetCore.Mvc.Tests Volo.Abp.AspNetCore.Mvc.Tests 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 c666aeaa44..f569283415 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 @@ -87,6 +87,7 @@ namespace Volo.Abp.AspNetCore.Mvc ).AddVirtualJson("/Volo/Abp/AspNetCore/Mvc/Localization/Resource"); options.Languages.Add(new LanguageInfo("en", "en", "English")); + options.Languages.Add(new LanguageInfo("hu", "hu", "Magyar")); options.Languages.Add(new LanguageInfo("tr", "tr", "Türkçe")); }); diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Localization/Resource/es.json b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Localization/Resource/es.json new file mode 100644 index 0000000000..baf2d0c45b --- /dev/null +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Localization/Resource/es.json @@ -0,0 +1,7 @@ +{ + "culture": "es", + "texts": { + "BirthDate": "Fecha de nacimiento", + "Value1": "Valor uno" + } +} \ No newline at end of file diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Localization/Resource/hu.json b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Localization/Resource/hu.json new file mode 100644 index 0000000000..3aba5802f0 --- /dev/null +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Localization/Resource/hu.json @@ -0,0 +1,7 @@ +{ + "culture": "hu", + "texts": { + "BirthDate": "Születési dátum", + "Value1": "Első érték" + } +} \ No newline at end of file diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/ModelBinding/ModelBindingController_Tests.cs b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/ModelBinding/ModelBindingController_Tests.cs index f2ab8fd3d0..698723a34a 100644 --- a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/ModelBinding/ModelBindingController_Tests.cs +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/ModelBinding/ModelBindingController_Tests.cs @@ -43,8 +43,9 @@ namespace Volo.Abp.AspNetCore.Mvc.ModelBinding response.StatusCode.ShouldBe(HttpStatusCode.OK); var resultAsString = await response.Content.ReadAsStringAsync(); - //Time parameter(2010-01-01T00:00:00Z) with time zone information, so the default Kind is Local. - resultAsString.ShouldBe(DateTimeKind.Local.ToString().ToLower()); + //Time parameter(2010-01-01T00:00:00Z) with time zone information, so the default Kind is UTC + //https://docs.microsoft.com/en-us/aspnet/core/migration/31-to-50?view=aspnetcore-3.1&tabs=visual-studio#datetime-values-are-model-bound-as-utc-times + resultAsString.ShouldBe(DateTimeKind.Utc.ToString().ToLower()); } [Fact] @@ -56,8 +57,9 @@ namespace Volo.Abp.AspNetCore.Mvc.ModelBinding response.StatusCode.ShouldBe(HttpStatusCode.OK); var resultAsString = await response.Content.ReadAsStringAsync(); - //Time parameter(2010-01-01T00:00:00Z) with time zone information, so the default Kind is Local. - resultAsString.ShouldBe(DateTimeKind.Local.ToString().ToLower()); + //Time parameter(2010-01-01T00:00:00Z) with time zone information, so the default Kind is UTC + //https://docs.microsoft.com/en-us/aspnet/core/migration/31-to-50?view=aspnetcore-3.1&tabs=visual-studio#datetime-values-are-model-bound-as-utc-times + resultAsString.ShouldBe(DateTimeKind.Utc.ToString().ToLower()); } [Fact] @@ -71,9 +73,10 @@ namespace Volo.Abp.AspNetCore.Mvc.ModelBinding response.StatusCode.ShouldBe(HttpStatusCode.OK); var resultAsString = await response.Content.ReadAsStringAsync(); - //Time parameter(2010-01-01T00:00:00Z) with time zone information, so the default Kind is Local. + //Time parameter(2010-01-01T00:00:00Z) with time zone information, so the default Kind is UTC + //https://docs.microsoft.com/en-us/aspnet/core/migration/31-to-50?view=aspnetcore-3.1&tabs=visual-studio#datetime-values-are-model-bound-as-utc-times resultAsString.ShouldBe( - $"local_{DateTimeKind.ToString().ToLower()}_{DateTimeKind.ToString().ToLower()}_local"); + $"utc_{DateTimeKind.ToString().ToLower()}_{DateTimeKind.ToString().ToLower()}_utc"); } } diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Utils/ArrayMacther_Tests.cs b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Utils/ArrayMacther_Tests.cs index a066622748..f30dc082aa 100644 --- a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Utils/ArrayMacther_Tests.cs +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Utils/ArrayMacther_Tests.cs @@ -10,7 +10,10 @@ namespace Volo.Abp.AspNetCore.Mvc.Utils new[] { "p1", "p2", "p3", "p4", "p5" }, new[] { "p1", "p2", "p2", "p2", "p3", "p4", "p5", "p5" }) ] - public void Should_Find_Correct_Items(string[] sourceArray, string[] destinationArray, string[] expectedArray) + public void Should_Find_Correct_Items( + string[] sourceArray, + string[] destinationArray, + string[] expectedArray) { var result = ArrayMatcher.Match(sourceArray, destinationArray); Assert.Equal(expectedArray, result); diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests.csproj b/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests.csproj index f1fa33a3b3..f3976e2e1f 100644 --- a/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests.csproj +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests.csproj @@ -3,7 +3,7 @@ - netcoreapp3.1 + net5.0 $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.csproj b/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.csproj index ccbffb47f4..f4f91b2629 100644 --- a/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.csproj +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.csproj @@ -1,14 +1,14 @@ - + - netcoreapp3.1 + net5.0 true - + diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/package.json b/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/package.json index fc327ad536..7f51b3a9eb 100644 --- a/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/package.json +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/package.json @@ -3,7 +3,7 @@ "name": "asp.net", "private": true, "dependencies": { - "@abp/aspnetcore.mvc.ui.theme.shared": "^3.2.0", + "@abp/aspnetcore.mvc.ui.theme.shared": "^3.3.0-rc.1", "highlight.js": "^9.13.1" }, "devDependencies": {} diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/wwwroot/libs/abp/core/abp.js b/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/wwwroot/libs/abp/core/abp.js index 20bd92147a..72af4bd106 100644 --- a/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/wwwroot/libs/abp/core/abp.js +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/wwwroot/libs/abp/core/abp.js @@ -689,7 +689,7 @@ var abp = abp || {}; abp.security.antiForgery = abp.security.antiForgery || {}; abp.security.antiForgery.tokenCookieName = 'XSRF-TOKEN'; - abp.security.antiForgery.tokenHeaderName = 'X-XSRF-TOKEN'; + abp.security.antiForgery.tokenHeaderName = 'RequestVerificationToken'; abp.security.antiForgery.getToken = function () { return abp.utils.getCookieValue(abp.security.antiForgery.tokenCookieName); diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/yarn.lock b/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/yarn.lock index 8252be1892..77ebb00eb7 100644 --- a/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/yarn.lock +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/yarn.lock @@ -2,30 +2,30 @@ # yarn lockfile v1 -"@abp/aspnetcore.mvc.ui.theme.shared@^3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.shared/-/aspnetcore.mvc.ui.theme.shared-3.2.0.tgz#bed24c1d28f6e85d58fa963911a09e8b2998c1b6" - integrity sha512-Ap1dPCvL7r31oFyi+3YPviFkDly5FZfWbHq2bURsEbscembpc6DOSfXehvuZ2BjqsZF3n/HX0Y1lX4irUqKqjg== - dependencies: - "@abp/aspnetcore.mvc.ui" "~3.2.0" - "@abp/bootstrap" "~3.2.0" - "@abp/bootstrap-datepicker" "~3.2.0" - "@abp/datatables.net-bs4" "~3.2.0" - "@abp/font-awesome" "~3.2.0" - "@abp/jquery-form" "~3.2.0" - "@abp/jquery-validation-unobtrusive" "~3.2.0" - "@abp/lodash" "~3.2.0" - "@abp/luxon" "~3.2.0" - "@abp/malihu-custom-scrollbar-plugin" "~3.2.0" - "@abp/select2" "~3.2.0" - "@abp/sweetalert" "~3.2.0" - "@abp/timeago" "~3.2.0" - "@abp/toastr" "~3.2.0" - -"@abp/aspnetcore.mvc.ui@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui/-/aspnetcore.mvc.ui-3.2.0.tgz#01f80b9f663f4d95ceac733761833cf4648e92b5" - integrity sha512-NzH1UxEoE/FVT0LLjMNq5eSsiORLe5dE+aKr7jjbaxcuVr7QI7KI9ry6xWAZk+0cbGvsUAY0xqrMxxqiLpskxQ== +"@abp/aspnetcore.mvc.ui.theme.shared@^3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.shared/-/aspnetcore.mvc.ui.theme.shared-3.3.0-rc.1.tgz#0ebb50effe6d1d8e87d30cf0258c92074c77922f" + integrity sha512-sYmKnmy9Fsh0dT+CPhsxk5UwqUTdWIXDbRCp9ZI+9AKGHHBkuFfTPSi3TBK+Y/vQAOn68JdMVdRLdMJHHUXm+g== + dependencies: + "@abp/aspnetcore.mvc.ui" "~3.3.0-rc.1" + "@abp/bootstrap" "~3.3.0-rc.1" + "@abp/bootstrap-datepicker" "~3.3.0-rc.1" + "@abp/datatables.net-bs4" "~3.3.0-rc.1" + "@abp/font-awesome" "~3.3.0-rc.1" + "@abp/jquery-form" "~3.3.0-rc.1" + "@abp/jquery-validation-unobtrusive" "~3.3.0-rc.1" + "@abp/lodash" "~3.3.0-rc.1" + "@abp/luxon" "~3.3.0-rc.1" + "@abp/malihu-custom-scrollbar-plugin" "~3.3.0-rc.1" + "@abp/select2" "~3.3.0-rc.1" + "@abp/sweetalert" "~3.3.0-rc.1" + "@abp/timeago" "~3.3.0-rc.1" + "@abp/toastr" "~3.3.0-rc.1" + +"@abp/aspnetcore.mvc.ui@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui/-/aspnetcore.mvc.ui-3.3.0-rc.1.tgz#69e0fa91fb1a4f7424e08e076df213fea90c796b" + integrity sha512-c6xNCJlhmz8EasZZeYkC6LoOJLMnfa+JGbtfZF8FXNT4MQVyFpfQtGInGAn6A3TDZR2Y/roJbjXf/D73cxMnGA== dependencies: ansi-colors "^4.1.1" extend-object "^1.0.0" @@ -34,145 +34,145 @@ path "^0.12.7" rimraf "^3.0.2" -"@abp/bootstrap-datepicker@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/bootstrap-datepicker/-/bootstrap-datepicker-3.2.0.tgz#0a1813d8a84dd6eb6cf647244a4a91900364deb1" - integrity sha512-w7YyA5TRZqGL3qYyArwfrRc4/qWQMT0BPYDOsGMrtPJZDWeZL7WPezuiIvKNdI71BfUq6XiA1+wwMfqjcClZ2g== +"@abp/bootstrap-datepicker@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/bootstrap-datepicker/-/bootstrap-datepicker-3.3.0-rc.1.tgz#4195fa5cf5cc72420c9d87a6c75ec26c3c70b9df" + integrity sha512-6ijmKV6ySrsBwtyQxoe+/Otmhzp1XJy0uGVnY2YhmOHuKzmQeIwfzrMMuLK5XX+Gsub1dYqsawFQNzJYxY2rLA== dependencies: bootstrap-datepicker "^1.9.0" -"@abp/bootstrap@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/bootstrap/-/bootstrap-3.2.0.tgz#d249338b0151734f99b8e366aea6fc17d5ef9b37" - integrity sha512-hx9r7EGb1vJrHAdw3D8Cpudv++hrM4dKoKtOKnQbxGG+Q9vwVS6SKquVxJum+bEZWa1CgXvT6co0IDOlW3pDhg== +"@abp/bootstrap@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/bootstrap/-/bootstrap-3.3.0-rc.1.tgz#e5526e2ad9ac3e3d650d8d805708d083ce5ff6f2" + integrity sha512-TvTPt6e8cGgdH4EdWAadm/8ykE0wke0vYGWWbgNfrNuSb+/Mt/lg0U3nDaNdjDBtstkEPLHKA2lvS5Nb1mNr+w== dependencies: - "@abp/core" "~3.2.0" + "@abp/core" "~3.3.0-rc.1" bootstrap "^4.5.0" bootstrap-v4-rtl "4.4.1-2" -"@abp/core@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/core/-/core-3.2.0.tgz#e9f07bde581b07e1b904bec3b12e0ccfc2a50125" - integrity sha512-X3iWv8QxAbqKJMoTb3vfvwGYmD9uZ+p+zn5q5Hoybyq9fjEcevpkdX7OiLvO8M+NEwCKa81wtkvvM2BnEV6Igg== +"@abp/core@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/core/-/core-3.3.0-rc.1.tgz#b84bdd9526c52f5d76a356d2854256477680ef6e" + integrity sha512-6KQ9Lu/Ok0FaIIRYoUUgnV0DFcT7H080Qfr7QHOv/nI6lviFwtAi/L3IJPCwKSoP+08RklyzvD9zOIdWNWEYMQ== dependencies: - "@abp/utils" "^3.2.0" + "@abp/utils" "^3.3.0-rc.1" -"@abp/datatables.net-bs4@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/datatables.net-bs4/-/datatables.net-bs4-3.2.0.tgz#8551c0ac5e29b037a86b141f41052e7a3038be89" - integrity sha512-i2LVTKAllgzhc21rb0GQ0YHtmOMyCT+6P3ZelqkoLdp56D63rVhdAOHrqjebrEHMehsuCUV2XH908kakXWIPXA== +"@abp/datatables.net-bs4@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/datatables.net-bs4/-/datatables.net-bs4-3.3.0-rc.1.tgz#360cd4e71c8015a3b9045636ec09f11c938685a6" + integrity sha512-7DTaQfpi4bEAKBq3QR4WHYVGGuk2v7zca0Q41XuWeSkcgGwctrJnuAdotNmihDQuwNZgYO+2gFDlVa5DXPELKQ== dependencies: - "@abp/datatables.net" "~3.2.0" + "@abp/datatables.net" "~3.3.0-rc.1" datatables.net-bs4 "^1.10.21" -"@abp/datatables.net@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/datatables.net/-/datatables.net-3.2.0.tgz#effd0ec603b15c0de2d1db993d1416b46f4e3146" - integrity sha512-6UX/WqdlRfb3BQ2cw7LbUlMimDXtx7rHanTTWq44g+Wc8fn4fVcYyo9RWCYYOd2MWm9pElEvuzG1AzaOamjW9Q== +"@abp/datatables.net@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/datatables.net/-/datatables.net-3.3.0-rc.1.tgz#b4fdebc7806036d3d468453772fbc1fd3c3b443f" + integrity sha512-GqeKMFYvQ3Zfx35fKkYhYUpIEWtaW1KWo5VrA+EbyTcbhdrAuAUoDH4QgLpdhtCvNO74M8JFpMVEYHhhUkc0nQ== dependencies: - "@abp/jquery" "~3.2.0" + "@abp/jquery" "~3.3.0-rc.1" datatables.net "^1.10.21" -"@abp/font-awesome@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/font-awesome/-/font-awesome-3.2.0.tgz#ad75daf1c084c2c6a0aeccc092057627ce898652" - integrity sha512-FAWBYWwg2ZtKO+0/lS/bc4YFnR7IehQ2Y+y1srIypgSY/739X4aUWb0YDW1tE0QrrFfQ//f16AyIKPynGl0T5Q== +"@abp/font-awesome@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/font-awesome/-/font-awesome-3.3.0-rc.1.tgz#700ba64f6c8832b812d5d1bca28dd4a487bec833" + integrity sha512-fna7mw5AIuP/FZSx1Ac94ZpGJIwQCZKuiIpmW/vVsFHUSICZ9J+uKa6hg3pt5SLFMAEVvAS6ScJyTkt6Hoc0Mg== dependencies: - "@abp/core" "~3.2.0" + "@abp/core" "~3.3.0-rc.1" "@fortawesome/fontawesome-free" "^5.13.0" -"@abp/jquery-form@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/jquery-form/-/jquery-form-3.2.0.tgz#b1b408c0f380c8dfd99c063251f2f1fd86dff14c" - integrity sha512-ZC38zLqlMm67nONg+7ZSC7ExzLZApZ2nZ3/yM6J5LNa7IOgzDGPZgbDRBiwFdC3vIB04LhnNr83YrEvIaUnIzQ== +"@abp/jquery-form@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/jquery-form/-/jquery-form-3.3.0-rc.1.tgz#9fe258a926013618cd99c03aca401c4fc543a72d" + integrity sha512-qLWucASxcgCKdVeix/NXYADhGOWBAR69U/xJj4p/H5i80PuMetH/bWCb9SQbrbyza/Gp4A8JV5vBKNmZFQqSbg== dependencies: - "@abp/jquery" "~3.2.0" + "@abp/jquery" "~3.3.0-rc.1" jquery-form "^4.3.0" -"@abp/jquery-validation-unobtrusive@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-3.2.0.tgz#91b996c743e5b1423a4d01d8808788a4bf4adb32" - integrity sha512-FSkGWvIkZTd2LITbTCdyno0ml30PZZmGYCazowHprh1iuhx0C+yCd9U/kfZ3rLoZAFtWjz0ZUq1Z7G5xXHB97A== +"@abp/jquery-validation-unobtrusive@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-3.3.0-rc.1.tgz#7860d04cfdf152976d780efab88712ae58db8541" + integrity sha512-KAAhLa3MHcwf6CWcAtlW2BQ9WeN8LwzDY6qCz6IVG25zjZfHZ6HEVeMAG3eJ6NRZlAWv2zZK8i8Qma9lKD55gA== dependencies: - "@abp/jquery-validation" "~3.2.0" + "@abp/jquery-validation" "~3.3.0-rc.1" jquery-validation-unobtrusive "^3.2.11" -"@abp/jquery-validation@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/jquery-validation/-/jquery-validation-3.2.0.tgz#1de41e9167b41a956ce2f6e3d6f16d023fccd078" - integrity sha512-FlP7btUvAJfGoi0g8Hm474jlhtweyd/P6dRu2spApUOpKjMyUNFpp/nphmr0iQvx7JGeeaAaUhQJ2v5UKy/Z8w== +"@abp/jquery-validation@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/jquery-validation/-/jquery-validation-3.3.0-rc.1.tgz#ab64965232b30a6ae9ed8660fc9587792bfd619d" + integrity sha512-84ueP2TWJVTYuqIzofrwu8NpWQA/thmQzDzhSnI6dTLrrYzDHLQ7YjwG3/591ka3b6u71diE6UfeyQ4iBiPQ5Q== dependencies: - "@abp/jquery" "~3.2.0" + "@abp/jquery" "~3.3.0-rc.1" jquery-validation "^1.19.2" -"@abp/jquery@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/jquery/-/jquery-3.2.0.tgz#eabc0bafef3cf2b64f672c562bda1f1002b07b7c" - integrity sha512-tlvQ79cqyJ+tXEf17Vdwi6O8yo0+7bmicyy5A/iYyWWJUjXGkiouQHjHkoZ2jeyxwvqn85tBbfjeRumcZdYRMA== +"@abp/jquery@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/jquery/-/jquery-3.3.0-rc.1.tgz#d46f75bfbcc65d4675675c8b69d219a3276afe91" + integrity sha512-NdChW0cbsqWVkB6AvXnTfeNZm2Ai3jmYEO2HJZDYBbWHkMlvQRnQ6oVD6TJvqMDtK066ArL1KAofuSJI2l8njQ== dependencies: - "@abp/core" "~3.2.0" + "@abp/core" "~3.3.0-rc.1" jquery "~3.5.1" -"@abp/lodash@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/lodash/-/lodash-3.2.0.tgz#63e8c51fe9e760d7debca9129bfbf01be8c12d18" - integrity sha512-/rGkJMCgbA0JLkjMXenxz6q0BXRDwvYSLUu7XotNj/cbiHpT5yHHTnWQgwxVUKEVA9xtmYUH1h20J25n/VD/tg== +"@abp/lodash@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/lodash/-/lodash-3.3.0-rc.1.tgz#5cf5462e1df615af5a3f89b8eb6b5d639f134026" + integrity sha512-AXvTAHfKSkQjJ70eStqSq2sXrOHQE+O5/7/k6JuSLbhzfC1paAZeKjLyoGj1hSuyWHQl6tbqDxJQej/NxGucHw== dependencies: - "@abp/core" "~3.2.0" + "@abp/core" "~3.3.0-rc.1" lodash "^4.17.15" -"@abp/luxon@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/luxon/-/luxon-3.2.0.tgz#f94b595d15d78868a4acf73803a9da8609096d39" - integrity sha512-3FF9/W+Smp4FqRJ6F5vNxydXYraVgEUsrOBkaBexVkzT/l3zBkCmrJ8i+Eib8xBXpS6Ku4nmpqbqm1VYhlxKTQ== +"@abp/luxon@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/luxon/-/luxon-3.3.0-rc.1.tgz#e479e7e854ccb9fcd35ce15145d50a9c9581dc50" + integrity sha512-j+1cBVmGtE9Of14i7nwtn9ZSvNa+46beiyOqMVmuH5qjPQTbYUAVFOlL7jVmYswplxUdK1r52n1nOz13oADnwA== dependencies: - "@abp/core" "~3.2.0" + "@abp/core" "~3.3.0-rc.1" luxon "^1.24.1" -"@abp/malihu-custom-scrollbar-plugin@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-3.2.0.tgz#bd11a36a37ec23d38cba116934398696379158b1" - integrity sha512-BYGICB55RsYHmaICnyWdCewo0uEbopmuuUuCJlE+2IY1I4JchSWG2mV//F+jOZQmlOsjYufK70BrQQEIr+ewXw== +"@abp/malihu-custom-scrollbar-plugin@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-3.3.0-rc.1.tgz#3455730273e75ad8d81083989b4f0d4486fe6a2c" + integrity sha512-TePsuZmhX34y9OEPdyYnWuQnx8ntkMXO4gkwciT0fqen+Cs8ty1VFr7uBeFTIo/JTCBtrRehcOjCJiv/F3j1Ug== dependencies: - "@abp/core" "~3.2.0" + "@abp/core" "~3.3.0-rc.1" malihu-custom-scrollbar-plugin "^3.1.5" -"@abp/select2@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/select2/-/select2-3.2.0.tgz#729f82695bbfd7ab3d7a90059a198f338037c867" - integrity sha512-83V8jIR8RGFJ3II5G7/bitlv44OHOEENKDrT639OYIxHfgWEWm4CBhcyCnlZJqv6xB2AVDfFPgCPlDGl3x3tmw== +"@abp/select2@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/select2/-/select2-3.3.0-rc.1.tgz#f5e159e13d2b7868a2283fb58af5121f1cc439e3" + integrity sha512-+fZoOHSZMeoMhIKQFrL62B1mwH10zNwsmEfgdLEvSiGNss+yGUmCZKxz9jSbQUr81N/kgew1CMxMjPGfyvpudA== dependencies: - "@abp/core" "~3.2.0" + "@abp/core" "~3.3.0-rc.1" select2 "^4.0.13" -"@abp/sweetalert@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/sweetalert/-/sweetalert-3.2.0.tgz#05040b7276ca2ce62ffc20865d64fb6e0fdb62cb" - integrity sha512-BEgbWwWX2uOsVS/zV6OzlxRBCtSlqeAYdSkmDjQ7pzCthwZXPPFr1o8UXyp9W7GKwDg3lfWTQPkkm+2y587xEw== +"@abp/sweetalert@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/sweetalert/-/sweetalert-3.3.0-rc.1.tgz#72e926a4e44dec851cf5abbe088f27294ccea671" + integrity sha512-IxrpZwgSO6t9DGKzWN3CfBL+lA5n/5Z3JBt6plWSYFSMMNDlxIOPyKcJBUUnlHnpUiqslCIiZRlOcCLTsw13tw== dependencies: - "@abp/core" "~3.2.0" + "@abp/core" "~3.3.0-rc.1" sweetalert "^2.1.2" -"@abp/timeago@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/timeago/-/timeago-3.2.0.tgz#e4a207566c00ccb3161ee91c6f6ce26419e4bbaf" - integrity sha512-VUk8c3hITZfu5aA21XB2Qaw5fwoeAl36Piy0Cb3aUOCFjyGWg19htXxDoT7rzqZ5UJFN0VRYg9MzciXZrFN5/w== +"@abp/timeago@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/timeago/-/timeago-3.3.0-rc.1.tgz#dec80881b231757f3d53fd017631517b0fb79e65" + integrity sha512-YQTE/p5SILYkfDSDbgdScqANb1d2F9a+d1Hijy/lUK6WLUqNkU2qlF1I/aBpJJWD6h8KAVqC5ZmOXZ/WDRSZ3w== dependencies: - "@abp/jquery" "~3.2.0" + "@abp/jquery" "~3.3.0-rc.1" timeago "^1.6.7" -"@abp/toastr@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/toastr/-/toastr-3.2.0.tgz#059e1e1e998207a6f75db2bfe717bec2a0b6d955" - integrity sha512-EKikZVQDaX/uQfc0rWsW2x+UDsO4r80KC3pLvRaLXW5IEwEhTpYwZDUGReOEQ8YEk7UKOXrVJA07mxkbdOzyAw== +"@abp/toastr@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/toastr/-/toastr-3.3.0-rc.1.tgz#56d1c044c528ca12b4d3e37a19f21ec8cf3c3945" + integrity sha512-kTyzlneLWKbRDkSshch5MFIX46+t9SPoOly544KnX1erHmNJfVkBk69XmADeoltKHezbiglE81Kg2KXxVgrAqQ== dependencies: - "@abp/jquery" "~3.2.0" + "@abp/jquery" "~3.3.0-rc.1" toastr "^2.1.4" -"@abp/utils@^3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/utils/-/utils-3.2.0.tgz#084918379f2c5e43c1e52291ba6667f3ea3c1f33" - integrity sha512-DZsvF/I5o3r0D1+2B61KvJX78/tJ5uj9MaPq00Z/sxXdqsP2SQQmjhMm+Lb0FgGMK06XIoF9eDgM3Hu0y0H3cQ== +"@abp/utils@^3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/utils/-/utils-3.3.0-rc.1.tgz#2ea2806a42d31dff246478497493e6a8735b3aa3" + integrity sha512-B58plJNC9UF9kigsGLd29qa9nyfIkgV7868NmNgsPwulAhcI1dKUgmSlymN1fBK4zPOVWbzReANVLKbQx13Z1Q== dependencies: just-compare "^1.3.0" diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Tests/Volo.Abp.AspNetCore.Mvc.UI.Tests.csproj b/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Tests/Volo.Abp.AspNetCore.Mvc.UI.Tests.csproj index 92e5e21867..babe8a4650 100644 --- a/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Tests/Volo.Abp.AspNetCore.Mvc.UI.Tests.csproj +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Tests/Volo.Abp.AspNetCore.Mvc.UI.Tests.csproj @@ -3,7 +3,7 @@ - netcoreapp3.1 + net5.0 $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; Volo.Abp.AspNetCore.Mvc.UI.Tests Volo.Abp.AspNetCore.Mvc.UI.Tests diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo.csproj b/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo.csproj index 4c328a670f..606c1a5122 100644 --- a/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo.csproj +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo.csproj @@ -3,7 +3,7 @@ - netcoreapp3.1 + net5.0 true @@ -15,7 +15,7 @@ - + diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/package.json b/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/package.json index 7d6c2e8636..5282054343 100644 --- a/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/package.json +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/package.json @@ -3,8 +3,8 @@ "name": "asp.net", "private": true, "dependencies": { - "@abp/aspnetcore.mvc.ui.theme.basic": "^3.2.0", - "@abp/prismjs": "^3.2.0" + "@abp/aspnetcore.mvc.ui.theme.basic": "^3.3.0-rc.1", + "@abp/prismjs": "^3.3.0-rc.1" }, "devDependencies": {} } \ No newline at end of file diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/wwwroot/libs/abp/core/abp.js b/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/wwwroot/libs/abp/core/abp.js index 20bd92147a..72af4bd106 100644 --- a/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/wwwroot/libs/abp/core/abp.js +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/wwwroot/libs/abp/core/abp.js @@ -689,7 +689,7 @@ var abp = abp || {}; abp.security.antiForgery = abp.security.antiForgery || {}; abp.security.antiForgery.tokenCookieName = 'XSRF-TOKEN'; - abp.security.antiForgery.tokenHeaderName = 'X-XSRF-TOKEN'; + abp.security.antiForgery.tokenHeaderName = 'RequestVerificationToken'; abp.security.antiForgery.getToken = function () { return abp.utils.getCookieValue(abp.security.antiForgery.tokenCookieName); diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/yarn.lock b/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/yarn.lock index 7b0d3f4b79..75478cd6cf 100644 --- a/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/yarn.lock +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Demo/yarn.lock @@ -2,37 +2,37 @@ # yarn lockfile v1 -"@abp/aspnetcore.mvc.ui.theme.basic@^3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.basic/-/aspnetcore.mvc.ui.theme.basic-3.2.0.tgz#207277419356a14f686421de0ee320fad0d6857f" - integrity sha512-4xn4BPQu9QL3sM47QtPNwOei9/fnRw3dXCL7vlJBCU70jL8911C6D/Pj/CBqCEMMVPI6M4GE7Ls4AwKTvgFeTw== - dependencies: - "@abp/aspnetcore.mvc.ui.theme.shared" "~3.2.0" - -"@abp/aspnetcore.mvc.ui.theme.shared@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.shared/-/aspnetcore.mvc.ui.theme.shared-3.2.0.tgz#bed24c1d28f6e85d58fa963911a09e8b2998c1b6" - integrity sha512-Ap1dPCvL7r31oFyi+3YPviFkDly5FZfWbHq2bURsEbscembpc6DOSfXehvuZ2BjqsZF3n/HX0Y1lX4irUqKqjg== - dependencies: - "@abp/aspnetcore.mvc.ui" "~3.2.0" - "@abp/bootstrap" "~3.2.0" - "@abp/bootstrap-datepicker" "~3.2.0" - "@abp/datatables.net-bs4" "~3.2.0" - "@abp/font-awesome" "~3.2.0" - "@abp/jquery-form" "~3.2.0" - "@abp/jquery-validation-unobtrusive" "~3.2.0" - "@abp/lodash" "~3.2.0" - "@abp/luxon" "~3.2.0" - "@abp/malihu-custom-scrollbar-plugin" "~3.2.0" - "@abp/select2" "~3.2.0" - "@abp/sweetalert" "~3.2.0" - "@abp/timeago" "~3.2.0" - "@abp/toastr" "~3.2.0" - -"@abp/aspnetcore.mvc.ui@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui/-/aspnetcore.mvc.ui-3.2.0.tgz#01f80b9f663f4d95ceac733761833cf4648e92b5" - integrity sha512-NzH1UxEoE/FVT0LLjMNq5eSsiORLe5dE+aKr7jjbaxcuVr7QI7KI9ry6xWAZk+0cbGvsUAY0xqrMxxqiLpskxQ== +"@abp/aspnetcore.mvc.ui.theme.basic@^3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.basic/-/aspnetcore.mvc.ui.theme.basic-3.3.0-rc.1.tgz#0c088d2946f93447388f8e63313b47398fe2f792" + integrity sha512-ysmFoSrEOMn33h6Q3swefEPkT8iABLR1RNLaHzaGOp042+3xJpvnPRC0PjdtFGIx9Mic3EHU7va/by9TGaRP0A== + dependencies: + "@abp/aspnetcore.mvc.ui.theme.shared" "~3.3.0-rc.1" + +"@abp/aspnetcore.mvc.ui.theme.shared@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.shared/-/aspnetcore.mvc.ui.theme.shared-3.3.0-rc.1.tgz#0ebb50effe6d1d8e87d30cf0258c92074c77922f" + integrity sha512-sYmKnmy9Fsh0dT+CPhsxk5UwqUTdWIXDbRCp9ZI+9AKGHHBkuFfTPSi3TBK+Y/vQAOn68JdMVdRLdMJHHUXm+g== + dependencies: + "@abp/aspnetcore.mvc.ui" "~3.3.0-rc.1" + "@abp/bootstrap" "~3.3.0-rc.1" + "@abp/bootstrap-datepicker" "~3.3.0-rc.1" + "@abp/datatables.net-bs4" "~3.3.0-rc.1" + "@abp/font-awesome" "~3.3.0-rc.1" + "@abp/jquery-form" "~3.3.0-rc.1" + "@abp/jquery-validation-unobtrusive" "~3.3.0-rc.1" + "@abp/lodash" "~3.3.0-rc.1" + "@abp/luxon" "~3.3.0-rc.1" + "@abp/malihu-custom-scrollbar-plugin" "~3.3.0-rc.1" + "@abp/select2" "~3.3.0-rc.1" + "@abp/sweetalert" "~3.3.0-rc.1" + "@abp/timeago" "~3.3.0-rc.1" + "@abp/toastr" "~3.3.0-rc.1" + +"@abp/aspnetcore.mvc.ui@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui/-/aspnetcore.mvc.ui-3.3.0-rc.1.tgz#69e0fa91fb1a4f7424e08e076df213fea90c796b" + integrity sha512-c6xNCJlhmz8EasZZeYkC6LoOJLMnfa+JGbtfZF8FXNT4MQVyFpfQtGInGAn6A3TDZR2Y/roJbjXf/D73cxMnGA== dependencies: ansi-colors "^4.1.1" extend-object "^1.0.0" @@ -41,162 +41,162 @@ path "^0.12.7" rimraf "^3.0.2" -"@abp/bootstrap-datepicker@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/bootstrap-datepicker/-/bootstrap-datepicker-3.2.0.tgz#0a1813d8a84dd6eb6cf647244a4a91900364deb1" - integrity sha512-w7YyA5TRZqGL3qYyArwfrRc4/qWQMT0BPYDOsGMrtPJZDWeZL7WPezuiIvKNdI71BfUq6XiA1+wwMfqjcClZ2g== +"@abp/bootstrap-datepicker@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/bootstrap-datepicker/-/bootstrap-datepicker-3.3.0-rc.1.tgz#4195fa5cf5cc72420c9d87a6c75ec26c3c70b9df" + integrity sha512-6ijmKV6ySrsBwtyQxoe+/Otmhzp1XJy0uGVnY2YhmOHuKzmQeIwfzrMMuLK5XX+Gsub1dYqsawFQNzJYxY2rLA== dependencies: bootstrap-datepicker "^1.9.0" -"@abp/bootstrap@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/bootstrap/-/bootstrap-3.2.0.tgz#d249338b0151734f99b8e366aea6fc17d5ef9b37" - integrity sha512-hx9r7EGb1vJrHAdw3D8Cpudv++hrM4dKoKtOKnQbxGG+Q9vwVS6SKquVxJum+bEZWa1CgXvT6co0IDOlW3pDhg== +"@abp/bootstrap@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/bootstrap/-/bootstrap-3.3.0-rc.1.tgz#e5526e2ad9ac3e3d650d8d805708d083ce5ff6f2" + integrity sha512-TvTPt6e8cGgdH4EdWAadm/8ykE0wke0vYGWWbgNfrNuSb+/Mt/lg0U3nDaNdjDBtstkEPLHKA2lvS5Nb1mNr+w== dependencies: - "@abp/core" "~3.2.0" + "@abp/core" "~3.3.0-rc.1" bootstrap "^4.5.0" bootstrap-v4-rtl "4.4.1-2" -"@abp/clipboard@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/clipboard/-/clipboard-3.2.0.tgz#9c9f95c40639cabe89e6bc86ee0f33c853321225" - integrity sha512-WGonC5Hp4FCUBxevIt180QWIqOri0eO//mlRLBqj7gvo7H6zt5f4t90XKF24ZYWXjx7bCbIQQFt5t5ByeqdcJg== +"@abp/clipboard@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/clipboard/-/clipboard-3.3.0-rc.1.tgz#60e7e84352064c423831edb91e64abb17e56a878" + integrity sha512-7MoVQ0Vgn5UHfWVElO0NFUv4lJfiFRPgmrOfCQTKCFHwLxFWpOEnCp4aRHP2jWi5EgMP4cuSleDtwNSM4Fuqkw== dependencies: - "@abp/core" "~3.2.0" + "@abp/core" "~3.3.0-rc.1" clipboard "^2.0.6" -"@abp/core@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/core/-/core-3.2.0.tgz#e9f07bde581b07e1b904bec3b12e0ccfc2a50125" - integrity sha512-X3iWv8QxAbqKJMoTb3vfvwGYmD9uZ+p+zn5q5Hoybyq9fjEcevpkdX7OiLvO8M+NEwCKa81wtkvvM2BnEV6Igg== +"@abp/core@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/core/-/core-3.3.0-rc.1.tgz#b84bdd9526c52f5d76a356d2854256477680ef6e" + integrity sha512-6KQ9Lu/Ok0FaIIRYoUUgnV0DFcT7H080Qfr7QHOv/nI6lviFwtAi/L3IJPCwKSoP+08RklyzvD9zOIdWNWEYMQ== dependencies: - "@abp/utils" "^3.2.0" + "@abp/utils" "^3.3.0-rc.1" -"@abp/datatables.net-bs4@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/datatables.net-bs4/-/datatables.net-bs4-3.2.0.tgz#8551c0ac5e29b037a86b141f41052e7a3038be89" - integrity sha512-i2LVTKAllgzhc21rb0GQ0YHtmOMyCT+6P3ZelqkoLdp56D63rVhdAOHrqjebrEHMehsuCUV2XH908kakXWIPXA== +"@abp/datatables.net-bs4@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/datatables.net-bs4/-/datatables.net-bs4-3.3.0-rc.1.tgz#360cd4e71c8015a3b9045636ec09f11c938685a6" + integrity sha512-7DTaQfpi4bEAKBq3QR4WHYVGGuk2v7zca0Q41XuWeSkcgGwctrJnuAdotNmihDQuwNZgYO+2gFDlVa5DXPELKQ== dependencies: - "@abp/datatables.net" "~3.2.0" + "@abp/datatables.net" "~3.3.0-rc.1" datatables.net-bs4 "^1.10.21" -"@abp/datatables.net@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/datatables.net/-/datatables.net-3.2.0.tgz#effd0ec603b15c0de2d1db993d1416b46f4e3146" - integrity sha512-6UX/WqdlRfb3BQ2cw7LbUlMimDXtx7rHanTTWq44g+Wc8fn4fVcYyo9RWCYYOd2MWm9pElEvuzG1AzaOamjW9Q== +"@abp/datatables.net@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/datatables.net/-/datatables.net-3.3.0-rc.1.tgz#b4fdebc7806036d3d468453772fbc1fd3c3b443f" + integrity sha512-GqeKMFYvQ3Zfx35fKkYhYUpIEWtaW1KWo5VrA+EbyTcbhdrAuAUoDH4QgLpdhtCvNO74M8JFpMVEYHhhUkc0nQ== dependencies: - "@abp/jquery" "~3.2.0" + "@abp/jquery" "~3.3.0-rc.1" datatables.net "^1.10.21" -"@abp/font-awesome@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/font-awesome/-/font-awesome-3.2.0.tgz#ad75daf1c084c2c6a0aeccc092057627ce898652" - integrity sha512-FAWBYWwg2ZtKO+0/lS/bc4YFnR7IehQ2Y+y1srIypgSY/739X4aUWb0YDW1tE0QrrFfQ//f16AyIKPynGl0T5Q== +"@abp/font-awesome@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/font-awesome/-/font-awesome-3.3.0-rc.1.tgz#700ba64f6c8832b812d5d1bca28dd4a487bec833" + integrity sha512-fna7mw5AIuP/FZSx1Ac94ZpGJIwQCZKuiIpmW/vVsFHUSICZ9J+uKa6hg3pt5SLFMAEVvAS6ScJyTkt6Hoc0Mg== dependencies: - "@abp/core" "~3.2.0" + "@abp/core" "~3.3.0-rc.1" "@fortawesome/fontawesome-free" "^5.13.0" -"@abp/jquery-form@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/jquery-form/-/jquery-form-3.2.0.tgz#b1b408c0f380c8dfd99c063251f2f1fd86dff14c" - integrity sha512-ZC38zLqlMm67nONg+7ZSC7ExzLZApZ2nZ3/yM6J5LNa7IOgzDGPZgbDRBiwFdC3vIB04LhnNr83YrEvIaUnIzQ== +"@abp/jquery-form@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/jquery-form/-/jquery-form-3.3.0-rc.1.tgz#9fe258a926013618cd99c03aca401c4fc543a72d" + integrity sha512-qLWucASxcgCKdVeix/NXYADhGOWBAR69U/xJj4p/H5i80PuMetH/bWCb9SQbrbyza/Gp4A8JV5vBKNmZFQqSbg== dependencies: - "@abp/jquery" "~3.2.0" + "@abp/jquery" "~3.3.0-rc.1" jquery-form "^4.3.0" -"@abp/jquery-validation-unobtrusive@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-3.2.0.tgz#91b996c743e5b1423a4d01d8808788a4bf4adb32" - integrity sha512-FSkGWvIkZTd2LITbTCdyno0ml30PZZmGYCazowHprh1iuhx0C+yCd9U/kfZ3rLoZAFtWjz0ZUq1Z7G5xXHB97A== +"@abp/jquery-validation-unobtrusive@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-3.3.0-rc.1.tgz#7860d04cfdf152976d780efab88712ae58db8541" + integrity sha512-KAAhLa3MHcwf6CWcAtlW2BQ9WeN8LwzDY6qCz6IVG25zjZfHZ6HEVeMAG3eJ6NRZlAWv2zZK8i8Qma9lKD55gA== dependencies: - "@abp/jquery-validation" "~3.2.0" + "@abp/jquery-validation" "~3.3.0-rc.1" jquery-validation-unobtrusive "^3.2.11" -"@abp/jquery-validation@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/jquery-validation/-/jquery-validation-3.2.0.tgz#1de41e9167b41a956ce2f6e3d6f16d023fccd078" - integrity sha512-FlP7btUvAJfGoi0g8Hm474jlhtweyd/P6dRu2spApUOpKjMyUNFpp/nphmr0iQvx7JGeeaAaUhQJ2v5UKy/Z8w== +"@abp/jquery-validation@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/jquery-validation/-/jquery-validation-3.3.0-rc.1.tgz#ab64965232b30a6ae9ed8660fc9587792bfd619d" + integrity sha512-84ueP2TWJVTYuqIzofrwu8NpWQA/thmQzDzhSnI6dTLrrYzDHLQ7YjwG3/591ka3b6u71diE6UfeyQ4iBiPQ5Q== dependencies: - "@abp/jquery" "~3.2.0" + "@abp/jquery" "~3.3.0-rc.1" jquery-validation "^1.19.2" -"@abp/jquery@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/jquery/-/jquery-3.2.0.tgz#eabc0bafef3cf2b64f672c562bda1f1002b07b7c" - integrity sha512-tlvQ79cqyJ+tXEf17Vdwi6O8yo0+7bmicyy5A/iYyWWJUjXGkiouQHjHkoZ2jeyxwvqn85tBbfjeRumcZdYRMA== +"@abp/jquery@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/jquery/-/jquery-3.3.0-rc.1.tgz#d46f75bfbcc65d4675675c8b69d219a3276afe91" + integrity sha512-NdChW0cbsqWVkB6AvXnTfeNZm2Ai3jmYEO2HJZDYBbWHkMlvQRnQ6oVD6TJvqMDtK066ArL1KAofuSJI2l8njQ== dependencies: - "@abp/core" "~3.2.0" + "@abp/core" "~3.3.0-rc.1" jquery "~3.5.1" -"@abp/lodash@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/lodash/-/lodash-3.2.0.tgz#63e8c51fe9e760d7debca9129bfbf01be8c12d18" - integrity sha512-/rGkJMCgbA0JLkjMXenxz6q0BXRDwvYSLUu7XotNj/cbiHpT5yHHTnWQgwxVUKEVA9xtmYUH1h20J25n/VD/tg== +"@abp/lodash@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/lodash/-/lodash-3.3.0-rc.1.tgz#5cf5462e1df615af5a3f89b8eb6b5d639f134026" + integrity sha512-AXvTAHfKSkQjJ70eStqSq2sXrOHQE+O5/7/k6JuSLbhzfC1paAZeKjLyoGj1hSuyWHQl6tbqDxJQej/NxGucHw== dependencies: - "@abp/core" "~3.2.0" + "@abp/core" "~3.3.0-rc.1" lodash "^4.17.15" -"@abp/luxon@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/luxon/-/luxon-3.2.0.tgz#f94b595d15d78868a4acf73803a9da8609096d39" - integrity sha512-3FF9/W+Smp4FqRJ6F5vNxydXYraVgEUsrOBkaBexVkzT/l3zBkCmrJ8i+Eib8xBXpS6Ku4nmpqbqm1VYhlxKTQ== +"@abp/luxon@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/luxon/-/luxon-3.3.0-rc.1.tgz#e479e7e854ccb9fcd35ce15145d50a9c9581dc50" + integrity sha512-j+1cBVmGtE9Of14i7nwtn9ZSvNa+46beiyOqMVmuH5qjPQTbYUAVFOlL7jVmYswplxUdK1r52n1nOz13oADnwA== dependencies: - "@abp/core" "~3.2.0" + "@abp/core" "~3.3.0-rc.1" luxon "^1.24.1" -"@abp/malihu-custom-scrollbar-plugin@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-3.2.0.tgz#bd11a36a37ec23d38cba116934398696379158b1" - integrity sha512-BYGICB55RsYHmaICnyWdCewo0uEbopmuuUuCJlE+2IY1I4JchSWG2mV//F+jOZQmlOsjYufK70BrQQEIr+ewXw== +"@abp/malihu-custom-scrollbar-plugin@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-3.3.0-rc.1.tgz#3455730273e75ad8d81083989b4f0d4486fe6a2c" + integrity sha512-TePsuZmhX34y9OEPdyYnWuQnx8ntkMXO4gkwciT0fqen+Cs8ty1VFr7uBeFTIo/JTCBtrRehcOjCJiv/F3j1Ug== dependencies: - "@abp/core" "~3.2.0" + "@abp/core" "~3.3.0-rc.1" malihu-custom-scrollbar-plugin "^3.1.5" -"@abp/prismjs@^3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/prismjs/-/prismjs-3.2.0.tgz#11c7c3023f11097a3eb26d8a0c04f7fa39d9531b" - integrity sha512-OafE/K8rC7popNQDh1J97AtPuxVeAFWh/msfHE3K5nmdYABpl8U7190ITw5COcVjjFLCEONpkkhfN/9ZdAQ8fQ== +"@abp/prismjs@^3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/prismjs/-/prismjs-3.3.0-rc.1.tgz#08e95a36089a9bbccf2cac9c0667e8632b59f565" + integrity sha512-myLGoT0nrLTCtqKdkqub7gv8DOo+Ccc1FjSAUlZgianoAXYKmbqDdlplS9EVE5CU0T2h5fiN0flf7reTqBn9Vg== dependencies: - "@abp/clipboard" "~3.2.0" - "@abp/core" "~3.2.0" + "@abp/clipboard" "~3.3.0-rc.1" + "@abp/core" "~3.3.0-rc.1" prismjs "^1.20.0" -"@abp/select2@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/select2/-/select2-3.2.0.tgz#729f82695bbfd7ab3d7a90059a198f338037c867" - integrity sha512-83V8jIR8RGFJ3II5G7/bitlv44OHOEENKDrT639OYIxHfgWEWm4CBhcyCnlZJqv6xB2AVDfFPgCPlDGl3x3tmw== +"@abp/select2@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/select2/-/select2-3.3.0-rc.1.tgz#f5e159e13d2b7868a2283fb58af5121f1cc439e3" + integrity sha512-+fZoOHSZMeoMhIKQFrL62B1mwH10zNwsmEfgdLEvSiGNss+yGUmCZKxz9jSbQUr81N/kgew1CMxMjPGfyvpudA== dependencies: - "@abp/core" "~3.2.0" + "@abp/core" "~3.3.0-rc.1" select2 "^4.0.13" -"@abp/sweetalert@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/sweetalert/-/sweetalert-3.2.0.tgz#05040b7276ca2ce62ffc20865d64fb6e0fdb62cb" - integrity sha512-BEgbWwWX2uOsVS/zV6OzlxRBCtSlqeAYdSkmDjQ7pzCthwZXPPFr1o8UXyp9W7GKwDg3lfWTQPkkm+2y587xEw== +"@abp/sweetalert@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/sweetalert/-/sweetalert-3.3.0-rc.1.tgz#72e926a4e44dec851cf5abbe088f27294ccea671" + integrity sha512-IxrpZwgSO6t9DGKzWN3CfBL+lA5n/5Z3JBt6plWSYFSMMNDlxIOPyKcJBUUnlHnpUiqslCIiZRlOcCLTsw13tw== dependencies: - "@abp/core" "~3.2.0" + "@abp/core" "~3.3.0-rc.1" sweetalert "^2.1.2" -"@abp/timeago@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/timeago/-/timeago-3.2.0.tgz#e4a207566c00ccb3161ee91c6f6ce26419e4bbaf" - integrity sha512-VUk8c3hITZfu5aA21XB2Qaw5fwoeAl36Piy0Cb3aUOCFjyGWg19htXxDoT7rzqZ5UJFN0VRYg9MzciXZrFN5/w== +"@abp/timeago@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/timeago/-/timeago-3.3.0-rc.1.tgz#dec80881b231757f3d53fd017631517b0fb79e65" + integrity sha512-YQTE/p5SILYkfDSDbgdScqANb1d2F9a+d1Hijy/lUK6WLUqNkU2qlF1I/aBpJJWD6h8KAVqC5ZmOXZ/WDRSZ3w== dependencies: - "@abp/jquery" "~3.2.0" + "@abp/jquery" "~3.3.0-rc.1" timeago "^1.6.7" -"@abp/toastr@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/toastr/-/toastr-3.2.0.tgz#059e1e1e998207a6f75db2bfe717bec2a0b6d955" - integrity sha512-EKikZVQDaX/uQfc0rWsW2x+UDsO4r80KC3pLvRaLXW5IEwEhTpYwZDUGReOEQ8YEk7UKOXrVJA07mxkbdOzyAw== +"@abp/toastr@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/toastr/-/toastr-3.3.0-rc.1.tgz#56d1c044c528ca12b4d3e37a19f21ec8cf3c3945" + integrity sha512-kTyzlneLWKbRDkSshch5MFIX46+t9SPoOly544KnX1erHmNJfVkBk69XmADeoltKHezbiglE81Kg2KXxVgrAqQ== dependencies: - "@abp/jquery" "~3.2.0" + "@abp/jquery" "~3.3.0-rc.1" toastr "^2.1.4" -"@abp/utils@^3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/utils/-/utils-3.2.0.tgz#084918379f2c5e43c1e52291ba6667f3ea3c1f33" - integrity sha512-DZsvF/I5o3r0D1+2B61KvJX78/tJ5uj9MaPq00Z/sxXdqsP2SQQmjhMm+Lb0FgGMK06XIoF9eDgM3Hu0y0H3cQ== +"@abp/utils@^3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/utils/-/utils-3.3.0-rc.1.tgz#2ea2806a42d31dff246478497493e6a8735b3aa3" + integrity sha512-B58plJNC9UF9kigsGLd29qa9nyfIkgV7868NmNgsPwulAhcI1dKUgmSlymN1fBK4zPOVWbzReANVLKbQx13Z1Q== dependencies: just-compare "^1.3.0" diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Tests/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Tests.csproj b/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Tests/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Tests.csproj index 0e6ffe1e62..bedbb6a4ec 100644 --- a/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Tests/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Tests.csproj +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Tests/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Tests.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1 + net5.0 diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.Versioning.Tests/Volo.Abp.AspNetCore.Mvc.Versioning.Tests.csproj b/framework/test/Volo.Abp.AspNetCore.Mvc.Versioning.Tests/Volo.Abp.AspNetCore.Mvc.Versioning.Tests.csproj index e519e733de..0296733111 100644 --- a/framework/test/Volo.Abp.AspNetCore.Mvc.Versioning.Tests/Volo.Abp.AspNetCore.Mvc.Versioning.Tests.csproj +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.Versioning.Tests/Volo.Abp.AspNetCore.Mvc.Versioning.Tests.csproj @@ -1,9 +1,9 @@ - + - netcoreapp3.1 + net5.0 $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; Volo.Abp.AspNetCore.Mvc.Versioning.Tests Volo.Abp.AspNetCore.Mvc.Versioning.Tests diff --git a/framework/test/Volo.Abp.AspNetCore.Serilog.Tests/Volo.Abp.AspNetCore.Serilog.Tests.csproj b/framework/test/Volo.Abp.AspNetCore.Serilog.Tests/Volo.Abp.AspNetCore.Serilog.Tests.csproj index 77c291f0a0..09f3cf445f 100644 --- a/framework/test/Volo.Abp.AspNetCore.Serilog.Tests/Volo.Abp.AspNetCore.Serilog.Tests.csproj +++ b/framework/test/Volo.Abp.AspNetCore.Serilog.Tests/Volo.Abp.AspNetCore.Serilog.Tests.csproj @@ -3,7 +3,7 @@ - netcoreapp3.1 + net5.0 Volo.Abp.AspNetCore.Serilog.Tests Volo.Abp.AspNetCore.Serilog.Tests diff --git a/framework/test/Volo.Abp.AspNetCore.SignalR.Tests/Volo.Abp.AspNetCore.SignalR.Tests.csproj b/framework/test/Volo.Abp.AspNetCore.SignalR.Tests/Volo.Abp.AspNetCore.SignalR.Tests.csproj index 3bf5a6badd..4a9e2cc67b 100644 --- a/framework/test/Volo.Abp.AspNetCore.SignalR.Tests/Volo.Abp.AspNetCore.SignalR.Tests.csproj +++ b/framework/test/Volo.Abp.AspNetCore.SignalR.Tests/Volo.Abp.AspNetCore.SignalR.Tests.csproj @@ -1,9 +1,9 @@ - + - netcoreapp3.1 + net5.0 diff --git a/framework/test/Volo.Abp.AspNetCore.Tests/Volo.Abp.AspNetCore.Tests.csproj b/framework/test/Volo.Abp.AspNetCore.Tests/Volo.Abp.AspNetCore.Tests.csproj index 5becdbc672..d04ae3f37b 100644 --- a/framework/test/Volo.Abp.AspNetCore.Tests/Volo.Abp.AspNetCore.Tests.csproj +++ b/framework/test/Volo.Abp.AspNetCore.Tests/Volo.Abp.AspNetCore.Tests.csproj @@ -1,9 +1,9 @@ - + - netcoreapp3.1 + net5.0 Volo.Abp.AspNetCore.Tests Volo.Abp.AspNetCore.Tests true @@ -15,7 +15,7 @@ true - + diff --git a/framework/test/Volo.Abp.Auditing.Tests/Volo.Abp.Auditing.Tests.csproj b/framework/test/Volo.Abp.Auditing.Tests/Volo.Abp.Auditing.Tests.csproj index 2b74dd0a58..08eb55afb4 100644 --- a/framework/test/Volo.Abp.Auditing.Tests/Volo.Abp.Auditing.Tests.csproj +++ b/framework/test/Volo.Abp.Auditing.Tests/Volo.Abp.Auditing.Tests.csproj @@ -3,7 +3,7 @@ - netcoreapp3.1 + net5.0 Volo.Abp.Auditing.Tests Volo.Abp.Auditing.Tests true diff --git a/framework/test/Volo.Abp.Authorization.Tests/Volo.Abp.Authorization.Tests.csproj b/framework/test/Volo.Abp.Authorization.Tests/Volo.Abp.Authorization.Tests.csproj index 1d3e4b5dfd..8361d8b9ad 100644 --- a/framework/test/Volo.Abp.Authorization.Tests/Volo.Abp.Authorization.Tests.csproj +++ b/framework/test/Volo.Abp.Authorization.Tests/Volo.Abp.Authorization.Tests.csproj @@ -3,7 +3,7 @@ - netcoreapp3.1 + net5.0 Volo.Abp.Authorization.Tests Volo.Abp.Authorization.Tests true diff --git a/framework/test/Volo.Abp.AutoMapper.Tests/Volo.Abp.AutoMapper.Tests.csproj b/framework/test/Volo.Abp.AutoMapper.Tests/Volo.Abp.AutoMapper.Tests.csproj index 1d3d553047..36d1c41371 100644 --- a/framework/test/Volo.Abp.AutoMapper.Tests/Volo.Abp.AutoMapper.Tests.csproj +++ b/framework/test/Volo.Abp.AutoMapper.Tests/Volo.Abp.AutoMapper.Tests.csproj @@ -1,9 +1,9 @@ - + - netcoreapp3.1 + net5.0 Volo.Abp.AutoMapper.Tests Volo.Abp.AutoMapper.Tests diff --git a/framework/test/Volo.Abp.Autofac.Tests/Volo.Abp.Autofac.Tests.csproj b/framework/test/Volo.Abp.Autofac.Tests/Volo.Abp.Autofac.Tests.csproj index c8d0672d13..98ac012ef4 100644 --- a/framework/test/Volo.Abp.Autofac.Tests/Volo.Abp.Autofac.Tests.csproj +++ b/framework/test/Volo.Abp.Autofac.Tests/Volo.Abp.Autofac.Tests.csproj @@ -3,7 +3,7 @@ - netcoreapp3.1 + net5.0 Volo.Abp.Autofac.Tests Volo.Abp.Autofac.Tests true diff --git a/framework/test/Volo.Abp.BackgroundJobs.Tests/Volo.Abp.BackgroundJobs.Tests.csproj b/framework/test/Volo.Abp.BackgroundJobs.Tests/Volo.Abp.BackgroundJobs.Tests.csproj index ca7f94918d..b7263e31f5 100644 --- a/framework/test/Volo.Abp.BackgroundJobs.Tests/Volo.Abp.BackgroundJobs.Tests.csproj +++ b/framework/test/Volo.Abp.BackgroundJobs.Tests/Volo.Abp.BackgroundJobs.Tests.csproj @@ -1,9 +1,9 @@ - + - netcoreapp3.1 + net5.0 Volo.Abp.BackgroundJobs.Tests Volo.Abp.BackgroundJobs.Tests diff --git a/framework/test/Volo.Abp.BlobStoring.Aliyun.Tests/Volo.Abp.BlobStoring.Aliyun.Tests.csproj b/framework/test/Volo.Abp.BlobStoring.Aliyun.Tests/Volo.Abp.BlobStoring.Aliyun.Tests.csproj index 7d61dcecae..f400d8e552 100644 --- a/framework/test/Volo.Abp.BlobStoring.Aliyun.Tests/Volo.Abp.BlobStoring.Aliyun.Tests.csproj +++ b/framework/test/Volo.Abp.BlobStoring.Aliyun.Tests/Volo.Abp.BlobStoring.Aliyun.Tests.csproj @@ -3,7 +3,7 @@ - netcoreapp3.1 + net5.0 9f0d2c00-80c1-435b-bfab-2c39c8249091 @@ -12,7 +12,7 @@ - + diff --git a/framework/test/Volo.Abp.BlobStoring.Aws.Tests/Volo.Abp.BlobStoring.Aws.Tests.csproj b/framework/test/Volo.Abp.BlobStoring.Aws.Tests/Volo.Abp.BlobStoring.Aws.Tests.csproj index 2a4910e32c..ef6c0bf0e3 100644 --- a/framework/test/Volo.Abp.BlobStoring.Aws.Tests/Volo.Abp.BlobStoring.Aws.Tests.csproj +++ b/framework/test/Volo.Abp.BlobStoring.Aws.Tests/Volo.Abp.BlobStoring.Aws.Tests.csproj @@ -3,7 +3,7 @@ - netcoreapp3.1 + net5.0 9f0d2c00-80c1-435b-bfab-2c39c8249091 diff --git a/framework/test/Volo.Abp.BlobStoring.Azure.Tests/Volo.Abp.BlobStoring.Azure.Tests.csproj b/framework/test/Volo.Abp.BlobStoring.Azure.Tests/Volo.Abp.BlobStoring.Azure.Tests.csproj index 09a4861297..de4fa933be 100644 --- a/framework/test/Volo.Abp.BlobStoring.Azure.Tests/Volo.Abp.BlobStoring.Azure.Tests.csproj +++ b/framework/test/Volo.Abp.BlobStoring.Azure.Tests/Volo.Abp.BlobStoring.Azure.Tests.csproj @@ -3,7 +3,7 @@ - netcoreapp3.1 + net5.0 9f0d2c00-80c1-435b-bfab-2c39c8249091 diff --git a/framework/test/Volo.Abp.BlobStoring.FileSystem.Tests/Volo.Abp.BlobStoring.FileSystem.Tests.csproj b/framework/test/Volo.Abp.BlobStoring.FileSystem.Tests/Volo.Abp.BlobStoring.FileSystem.Tests.csproj index 93165fa05a..d388702a02 100644 --- a/framework/test/Volo.Abp.BlobStoring.FileSystem.Tests/Volo.Abp.BlobStoring.FileSystem.Tests.csproj +++ b/framework/test/Volo.Abp.BlobStoring.FileSystem.Tests/Volo.Abp.BlobStoring.FileSystem.Tests.csproj @@ -3,7 +3,7 @@ - netcoreapp3.1 + net5.0 diff --git a/framework/test/Volo.Abp.BlobStoring.Minio.Tests/Volo.Abp.BlobStoring.Minio.Tests.csproj b/framework/test/Volo.Abp.BlobStoring.Minio.Tests/Volo.Abp.BlobStoring.Minio.Tests.csproj index 388efc88a2..1d148054d5 100644 --- a/framework/test/Volo.Abp.BlobStoring.Minio.Tests/Volo.Abp.BlobStoring.Minio.Tests.csproj +++ b/framework/test/Volo.Abp.BlobStoring.Minio.Tests/Volo.Abp.BlobStoring.Minio.Tests.csproj @@ -1,7 +1,7 @@ - + - netcoreapp3.1 + net5.0 9f0d2c00-80c1-435b-bfab-2c39c8249091 diff --git a/framework/test/Volo.Abp.BlobStoring.Tests/Volo.Abp.BlobStoring.Tests.csproj b/framework/test/Volo.Abp.BlobStoring.Tests/Volo.Abp.BlobStoring.Tests.csproj index 130f95bb77..cbcbfd9be8 100644 --- a/framework/test/Volo.Abp.BlobStoring.Tests/Volo.Abp.BlobStoring.Tests.csproj +++ b/framework/test/Volo.Abp.BlobStoring.Tests/Volo.Abp.BlobStoring.Tests.csproj @@ -3,7 +3,7 @@ - netcoreapp3.1 + net5.0 diff --git a/framework/test/Volo.Abp.Caching.StackExchangeRedis.Tests/Volo.Abp.Caching.StackExchangeRedis.Tests.csproj b/framework/test/Volo.Abp.Caching.StackExchangeRedis.Tests/Volo.Abp.Caching.StackExchangeRedis.Tests.csproj index 15f4bc8b9d..69b6fef168 100644 --- a/framework/test/Volo.Abp.Caching.StackExchangeRedis.Tests/Volo.Abp.Caching.StackExchangeRedis.Tests.csproj +++ b/framework/test/Volo.Abp.Caching.StackExchangeRedis.Tests/Volo.Abp.Caching.StackExchangeRedis.Tests.csproj @@ -3,7 +3,7 @@ - netcoreapp3.1 + net5.0 diff --git a/framework/test/Volo.Abp.Caching.Tests/Volo.Abp.Caching.Tests.csproj b/framework/test/Volo.Abp.Caching.Tests/Volo.Abp.Caching.Tests.csproj index 1213685332..c09ea42c9f 100644 --- a/framework/test/Volo.Abp.Caching.Tests/Volo.Abp.Caching.Tests.csproj +++ b/framework/test/Volo.Abp.Caching.Tests/Volo.Abp.Caching.Tests.csproj @@ -3,7 +3,7 @@ - netcoreapp3.1 + net5.0 Volo.Abp.Caching.Tests Volo.Abp.Caching.Tests diff --git a/framework/test/Volo.Abp.Castle.Core.Tests/Volo.Abp.Castle.Core.Tests.csproj b/framework/test/Volo.Abp.Castle.Core.Tests/Volo.Abp.Castle.Core.Tests.csproj index f16f39a6eb..f89cec35e3 100644 --- a/framework/test/Volo.Abp.Castle.Core.Tests/Volo.Abp.Castle.Core.Tests.csproj +++ b/framework/test/Volo.Abp.Castle.Core.Tests/Volo.Abp.Castle.Core.Tests.csproj @@ -3,7 +3,7 @@ - netcoreapp3.1 + net5.0 diff --git a/framework/test/Volo.Abp.Cli.Core.Tests/Volo.Abp.Cli.Core.Tests.csproj b/framework/test/Volo.Abp.Cli.Core.Tests/Volo.Abp.Cli.Core.Tests.csproj index d13f50b93b..7ee53a3424 100644 --- a/framework/test/Volo.Abp.Cli.Core.Tests/Volo.Abp.Cli.Core.Tests.csproj +++ b/framework/test/Volo.Abp.Cli.Core.Tests/Volo.Abp.Cli.Core.Tests.csproj @@ -3,7 +3,7 @@ - netcoreapp3.1 + net5.0 diff --git a/framework/test/Volo.Abp.Core.Tests/System/AbpTypeExtensions_Tests.cs b/framework/test/Volo.Abp.Core.Tests/System/AbpTypeExtensions_Tests.cs index 382440a3f4..dceeda72b2 100644 --- a/framework/test/Volo.Abp.Core.Tests/System/AbpTypeExtensions_Tests.cs +++ b/framework/test/Volo.Abp.Core.Tests/System/AbpTypeExtensions_Tests.cs @@ -6,7 +6,7 @@ namespace System public class AbpTypeExtensions_Tests { [Fact] - public void GetBaseClasses() + public void GetBaseClasses_Excluding_Object() { var baseClasses = typeof(MyClass).GetBaseClasses(includeObject: false); baseClasses.Length.ShouldBe(2); @@ -14,6 +14,14 @@ namespace System baseClasses[1].ShouldBe(typeof(MyBaseClass2)); } + [Fact] + public void GetBaseClasses_With_StoppingType() + { + var baseClasses = typeof(MyClass).GetBaseClasses(typeof(MyBaseClass1)); + baseClasses.Length.ShouldBe(1); + baseClasses[0].ShouldBe(typeof(MyBaseClass2)); + } + public abstract class MyBaseClass1 { diff --git a/framework/test/Volo.Abp.Core.Tests/Volo.Abp.Core.Tests.csproj b/framework/test/Volo.Abp.Core.Tests/Volo.Abp.Core.Tests.csproj index 6be0cb02ab..7e302e93d3 100644 --- a/framework/test/Volo.Abp.Core.Tests/Volo.Abp.Core.Tests.csproj +++ b/framework/test/Volo.Abp.Core.Tests/Volo.Abp.Core.Tests.csproj @@ -3,7 +3,7 @@ - netcoreapp3.1 + net5.0 diff --git a/framework/test/Volo.Abp.Dapper.Tests/Volo.Abp.Dapper.Tests.csproj b/framework/test/Volo.Abp.Dapper.Tests/Volo.Abp.Dapper.Tests.csproj index 4402f1e9a8..8132a7c368 100644 --- a/framework/test/Volo.Abp.Dapper.Tests/Volo.Abp.Dapper.Tests.csproj +++ b/framework/test/Volo.Abp.Dapper.Tests/Volo.Abp.Dapper.Tests.csproj @@ -3,7 +3,7 @@ - netcoreapp3.1 + net5.0 diff --git a/framework/test/Volo.Abp.Data.Tests/Volo.Abp.Data.Tests.csproj b/framework/test/Volo.Abp.Data.Tests/Volo.Abp.Data.Tests.csproj index c35edc1148..4c4f7b0531 100644 --- a/framework/test/Volo.Abp.Data.Tests/Volo.Abp.Data.Tests.csproj +++ b/framework/test/Volo.Abp.Data.Tests/Volo.Abp.Data.Tests.csproj @@ -1,9 +1,9 @@ - + - netcoreapp3.1 + net5.0 diff --git a/framework/test/Volo.Abp.Ddd.Tests/Volo.Abp.Ddd.Tests.csproj b/framework/test/Volo.Abp.Ddd.Tests/Volo.Abp.Ddd.Tests.csproj index 3422dcbcf6..21bd17719f 100644 --- a/framework/test/Volo.Abp.Ddd.Tests/Volo.Abp.Ddd.Tests.csproj +++ b/framework/test/Volo.Abp.Ddd.Tests/Volo.Abp.Ddd.Tests.csproj @@ -3,7 +3,7 @@ - netcoreapp3.1 + net5.0 diff --git a/framework/test/Volo.Abp.Emailing.Tests/Volo.Abp.Emailing.Tests.csproj b/framework/test/Volo.Abp.Emailing.Tests/Volo.Abp.Emailing.Tests.csproj index 23dd953416..81c6662cdf 100644 --- a/framework/test/Volo.Abp.Emailing.Tests/Volo.Abp.Emailing.Tests.csproj +++ b/framework/test/Volo.Abp.Emailing.Tests/Volo.Abp.Emailing.Tests.csproj @@ -3,7 +3,7 @@ - netcoreapp3.1 + net5.0 diff --git a/framework/test/Volo.Abp.Emailing.Tests/Volo/Abp/Emailing/Localization/es.json b/framework/test/Volo.Abp.Emailing.Tests/Volo/Abp/Emailing/Localization/es.json new file mode 100644 index 0000000000..7cf144aab4 --- /dev/null +++ b/framework/test/Volo.Abp.Emailing.Tests/Volo/Abp/Emailing/Localization/es.json @@ -0,0 +1,6 @@ +{ + "culture": "es", + "texts": { + "hello": "Hola" + } +} \ No newline at end of file diff --git a/framework/test/Volo.Abp.Emailing.Tests/Volo/Abp/Emailing/Localization/hu.json b/framework/test/Volo.Abp.Emailing.Tests/Volo/Abp/Emailing/Localization/hu.json new file mode 100644 index 0000000000..e38fd7e4ea --- /dev/null +++ b/framework/test/Volo.Abp.Emailing.Tests/Volo/Abp/Emailing/Localization/hu.json @@ -0,0 +1,6 @@ +{ + "culture": "hu", + "texts": { + "hello": "Helló" + } +} \ No newline at end of file diff --git a/framework/test/Volo.Abp.EntityFrameworkCore.Tests.SecondContext/Volo.Abp.EntityFrameworkCore.Tests.SecondContext.csproj b/framework/test/Volo.Abp.EntityFrameworkCore.Tests.SecondContext/Volo.Abp.EntityFrameworkCore.Tests.SecondContext.csproj index e60435ce25..53b43eae64 100644 --- a/framework/test/Volo.Abp.EntityFrameworkCore.Tests.SecondContext/Volo.Abp.EntityFrameworkCore.Tests.SecondContext.csproj +++ b/framework/test/Volo.Abp.EntityFrameworkCore.Tests.SecondContext/Volo.Abp.EntityFrameworkCore.Tests.SecondContext.csproj @@ -3,7 +3,7 @@ - netcoreapp3.1 + net5.0 $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; true true @@ -15,5 +15,5 @@ - + diff --git a/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo.Abp.EntityFrameworkCore.Tests.csproj b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo.Abp.EntityFrameworkCore.Tests.csproj index 84fcc32477..48a2863bcf 100644 --- a/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo.Abp.EntityFrameworkCore.Tests.csproj +++ b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo.Abp.EntityFrameworkCore.Tests.csproj @@ -3,7 +3,7 @@ - netcoreapp3.1 + net5.0 diff --git a/framework/test/Volo.Abp.EventBus.Tests/Volo.Abp.EventBus.Tests.csproj b/framework/test/Volo.Abp.EventBus.Tests/Volo.Abp.EventBus.Tests.csproj index f45812c4a6..31ba019431 100644 --- a/framework/test/Volo.Abp.EventBus.Tests/Volo.Abp.EventBus.Tests.csproj +++ b/framework/test/Volo.Abp.EventBus.Tests/Volo.Abp.EventBus.Tests.csproj @@ -3,7 +3,7 @@ - netcoreapp3.1 + net5.0 diff --git a/framework/test/Volo.Abp.Features.Tests/Volo.Abp.Features.Tests.csproj b/framework/test/Volo.Abp.Features.Tests/Volo.Abp.Features.Tests.csproj index d5ea171e35..ed4b35cb0a 100644 --- a/framework/test/Volo.Abp.Features.Tests/Volo.Abp.Features.Tests.csproj +++ b/framework/test/Volo.Abp.Features.Tests/Volo.Abp.Features.Tests.csproj @@ -3,7 +3,7 @@ - netcoreapp3.1 + net5.0 diff --git a/framework/test/Volo.Abp.FluentValidation.Tests/Volo.Abp.FluentValidation.Tests.csproj b/framework/test/Volo.Abp.FluentValidation.Tests/Volo.Abp.FluentValidation.Tests.csproj index 2ee95269ae..1a107db3e1 100644 --- a/framework/test/Volo.Abp.FluentValidation.Tests/Volo.Abp.FluentValidation.Tests.csproj +++ b/framework/test/Volo.Abp.FluentValidation.Tests/Volo.Abp.FluentValidation.Tests.csproj @@ -3,7 +3,7 @@ - netcoreapp3.1 + net5.0 diff --git a/framework/test/Volo.Abp.GlobalFeatures.Tests/Volo.Abp.GlobalFeatures.Tests.csproj b/framework/test/Volo.Abp.GlobalFeatures.Tests/Volo.Abp.GlobalFeatures.Tests.csproj index c0a973f8a5..aa1e5d93dd 100644 --- a/framework/test/Volo.Abp.GlobalFeatures.Tests/Volo.Abp.GlobalFeatures.Tests.csproj +++ b/framework/test/Volo.Abp.GlobalFeatures.Tests/Volo.Abp.GlobalFeatures.Tests.csproj @@ -3,7 +3,7 @@ - netcoreapp3.1 + net5.0 diff --git a/framework/test/Volo.Abp.Http.Client.IdentityModel.Web.Tests/Volo.Abp.Http.Client.IdentityModel.Web.Tests.csproj b/framework/test/Volo.Abp.Http.Client.IdentityModel.Web.Tests/Volo.Abp.Http.Client.IdentityModel.Web.Tests.csproj index 78518bdda3..1a000b7b07 100644 --- a/framework/test/Volo.Abp.Http.Client.IdentityModel.Web.Tests/Volo.Abp.Http.Client.IdentityModel.Web.Tests.csproj +++ b/framework/test/Volo.Abp.Http.Client.IdentityModel.Web.Tests/Volo.Abp.Http.Client.IdentityModel.Web.Tests.csproj @@ -3,7 +3,7 @@ - netcoreapp3.1 + net5.0 diff --git a/framework/test/Volo.Abp.Http.Client.Tests/Volo.Abp.Http.Client.Tests.csproj b/framework/test/Volo.Abp.Http.Client.Tests/Volo.Abp.Http.Client.Tests.csproj index 6b4e1ce4f0..e1e8308e90 100644 --- a/framework/test/Volo.Abp.Http.Client.Tests/Volo.Abp.Http.Client.Tests.csproj +++ b/framework/test/Volo.Abp.Http.Client.Tests/Volo.Abp.Http.Client.Tests.csproj @@ -3,7 +3,7 @@ - netcoreapp3.1 + net5.0 diff --git a/framework/test/Volo.Abp.Http.Client.Tests/Volo/Abp/Http/Localization/hu.json b/framework/test/Volo.Abp.Http.Client.Tests/Volo/Abp/Http/Localization/hu.json new file mode 100644 index 0000000000..6b4126d628 --- /dev/null +++ b/framework/test/Volo.Abp.Http.Client.Tests/Volo/Abp/Http/Localization/hu.json @@ -0,0 +1,6 @@ +{ + "culture": "hu", + "texts": { + "Volo.Abp.Http.DynamicProxying:10001": "Üzleti kivétel adatokkal: {0}" + } +} \ No newline at end of file diff --git a/framework/test/Volo.Abp.Ldap.Tests/Volo.Abp.Ldap.Tests.csproj b/framework/test/Volo.Abp.Ldap.Tests/Volo.Abp.Ldap.Tests.csproj index d2db584347..245a776adf 100644 --- a/framework/test/Volo.Abp.Ldap.Tests/Volo.Abp.Ldap.Tests.csproj +++ b/framework/test/Volo.Abp.Ldap.Tests/Volo.Abp.Ldap.Tests.csproj @@ -3,7 +3,7 @@ - netcoreapp3.1 + net5.0 diff --git a/framework/test/Volo.Abp.Localization.Tests/Volo.Abp.Localization.Tests.csproj b/framework/test/Volo.Abp.Localization.Tests/Volo.Abp.Localization.Tests.csproj index 56abd36ebb..4cf02e61c9 100644 --- a/framework/test/Volo.Abp.Localization.Tests/Volo.Abp.Localization.Tests.csproj +++ b/framework/test/Volo.Abp.Localization.Tests/Volo.Abp.Localization.Tests.csproj @@ -3,7 +3,7 @@ - netcoreapp3.1 + net5.0 diff --git a/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/TestResources/Base/CountryNames/hu.json b/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/TestResources/Base/CountryNames/hu.json new file mode 100644 index 0000000000..b24e716b43 --- /dev/null +++ b/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/TestResources/Base/CountryNames/hu.json @@ -0,0 +1,7 @@ +{ + "culture": "hu", + "texts": { + "USA": "Amerikai egyesült államok", + "Brazil": "Brazília" + } +} \ No newline at end of file diff --git a/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/TestResources/Base/Validation/hu.json b/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/TestResources/Base/Validation/hu.json new file mode 100644 index 0000000000..204e26f7bf --- /dev/null +++ b/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/TestResources/Base/Validation/hu.json @@ -0,0 +1,7 @@ +{ + "culture": "hu", + "texts": { + "ThisFieldIsRequired": "Ez a mező kötelező", + "MaxLenghtErrorMessage": "Ez a mező legfeljebb „{0}” karakter lehet" + } +} \ No newline at end of file diff --git a/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/TestResources/Source/hu.json b/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/TestResources/Source/hu.json new file mode 100644 index 0000000000..dcf31962c6 --- /dev/null +++ b/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/TestResources/Source/hu.json @@ -0,0 +1,11 @@ +{ + "culture": "hu", + "texts": { + "Hello {0}.": "Helló {0}", + "Car": "Autó", + "CarPlural": "Autók", + "MaxLenghtErrorMessage": "Ennek a mezőnek a hossza legfeljebb „{0}” karakter lehet", + "Universe": "Világegyetem", + "FortyTwo": "Negyvenkettő" + } +} \ No newline at end of file diff --git a/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/TestResources/SourceExt/hu.json b/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/TestResources/SourceExt/hu.json new file mode 100644 index 0000000000..51e3778d88 --- /dev/null +++ b/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/TestResources/SourceExt/hu.json @@ -0,0 +1,6 @@ +{ + "culture": "hu", + "texts": { + "SeeYou": "Találkozunk" + } +} \ No newline at end of file diff --git a/framework/test/Volo.Abp.MailKit.Tests/Volo.Abp.MailKit.Tests.csproj b/framework/test/Volo.Abp.MailKit.Tests/Volo.Abp.MailKit.Tests.csproj index 31c7001db5..0296ddf8ef 100644 --- a/framework/test/Volo.Abp.MailKit.Tests/Volo.Abp.MailKit.Tests.csproj +++ b/framework/test/Volo.Abp.MailKit.Tests/Volo.Abp.MailKit.Tests.csproj @@ -3,7 +3,7 @@ - netcoreapp3.1 + net5.0 diff --git a/framework/test/Volo.Abp.MemoryDb.Tests/Volo.Abp.MemoryDb.Tests.csproj b/framework/test/Volo.Abp.MemoryDb.Tests/Volo.Abp.MemoryDb.Tests.csproj index 372ebd68f4..17d31643e0 100644 --- a/framework/test/Volo.Abp.MemoryDb.Tests/Volo.Abp.MemoryDb.Tests.csproj +++ b/framework/test/Volo.Abp.MemoryDb.Tests/Volo.Abp.MemoryDb.Tests.csproj @@ -3,7 +3,7 @@ - netcoreapp3.1 + net5.0 diff --git a/framework/test/Volo.Abp.Minify.Tests/Volo.Abp.Minify.Tests.csproj b/framework/test/Volo.Abp.Minify.Tests/Volo.Abp.Minify.Tests.csproj index 2c14d9fba4..9f91246546 100644 --- a/framework/test/Volo.Abp.Minify.Tests/Volo.Abp.Minify.Tests.csproj +++ b/framework/test/Volo.Abp.Minify.Tests/Volo.Abp.Minify.Tests.csproj @@ -3,7 +3,7 @@ - netcoreapp3.1 + net5.0 diff --git a/framework/test/Volo.Abp.MongoDB.Tests/Volo.Abp.MongoDB.Tests.csproj b/framework/test/Volo.Abp.MongoDB.Tests/Volo.Abp.MongoDB.Tests.csproj index 97758b7880..39cff60ed5 100644 --- a/framework/test/Volo.Abp.MongoDB.Tests/Volo.Abp.MongoDB.Tests.csproj +++ b/framework/test/Volo.Abp.MongoDB.Tests/Volo.Abp.MongoDB.Tests.csproj @@ -3,7 +3,7 @@ - netcoreapp3.1 + net5.0 diff --git a/framework/test/Volo.Abp.MultiTenancy.Tests/Volo.Abp.MultiTenancy.Tests.csproj b/framework/test/Volo.Abp.MultiTenancy.Tests/Volo.Abp.MultiTenancy.Tests.csproj index 3d95f00a8b..9bbf07d879 100644 --- a/framework/test/Volo.Abp.MultiTenancy.Tests/Volo.Abp.MultiTenancy.Tests.csproj +++ b/framework/test/Volo.Abp.MultiTenancy.Tests/Volo.Abp.MultiTenancy.Tests.csproj @@ -3,7 +3,7 @@ - netcoreapp3.1 + net5.0 diff --git a/framework/test/Volo.Abp.ObjectExtending.Tests/Volo.Abp.ObjectExtending.Tests.csproj b/framework/test/Volo.Abp.ObjectExtending.Tests/Volo.Abp.ObjectExtending.Tests.csproj index 212eeb7d5b..320f3cd6bb 100644 --- a/framework/test/Volo.Abp.ObjectExtending.Tests/Volo.Abp.ObjectExtending.Tests.csproj +++ b/framework/test/Volo.Abp.ObjectExtending.Tests/Volo.Abp.ObjectExtending.Tests.csproj @@ -1,9 +1,9 @@ - + - + - netcoreapp3.1 + net5.0 diff --git a/framework/test/Volo.Abp.ObjectMapping.Tests/Volo.Abp.ObjectMapping.Tests.csproj b/framework/test/Volo.Abp.ObjectMapping.Tests/Volo.Abp.ObjectMapping.Tests.csproj index 23c59ef064..9d9dd5eb30 100644 --- a/framework/test/Volo.Abp.ObjectMapping.Tests/Volo.Abp.ObjectMapping.Tests.csproj +++ b/framework/test/Volo.Abp.ObjectMapping.Tests/Volo.Abp.ObjectMapping.Tests.csproj @@ -3,7 +3,7 @@ - netcoreapp3.1 + net5.0 diff --git a/framework/test/Volo.Abp.Security.Tests/Volo.Abp.Security.Tests.csproj b/framework/test/Volo.Abp.Security.Tests/Volo.Abp.Security.Tests.csproj index 41d152d1cb..a64c89ac24 100644 --- a/framework/test/Volo.Abp.Security.Tests/Volo.Abp.Security.Tests.csproj +++ b/framework/test/Volo.Abp.Security.Tests/Volo.Abp.Security.Tests.csproj @@ -3,7 +3,7 @@ - netcoreapp3.1 + net5.0 diff --git a/framework/test/Volo.Abp.Serialization.Tests/Volo.Abp.Serialization.Tests.csproj b/framework/test/Volo.Abp.Serialization.Tests/Volo.Abp.Serialization.Tests.csproj index 3efd1d9db7..d6f69ebbfa 100644 --- a/framework/test/Volo.Abp.Serialization.Tests/Volo.Abp.Serialization.Tests.csproj +++ b/framework/test/Volo.Abp.Serialization.Tests/Volo.Abp.Serialization.Tests.csproj @@ -3,7 +3,7 @@ - netcoreapp3.1 + net5.0 diff --git a/framework/test/Volo.Abp.Serialization.Tests/Volo/Abp/Serialization/Objects/CarSerializer.cs b/framework/test/Volo.Abp.Serialization.Tests/Volo/Abp/Serialization/Objects/CarSerializer.cs index 4c09a3ca93..f99cc9e1f9 100644 --- a/framework/test/Volo.Abp.Serialization.Tests/Volo/Abp/Serialization/Objects/CarSerializer.cs +++ b/framework/test/Volo.Abp.Serialization.Tests/Volo/Abp/Serialization/Objects/CarSerializer.cs @@ -1,5 +1,6 @@ -using Volo.Abp.DependencyInjection; -using Volo.Abp.Serialization.Binary; +using System.Text.Json; +using Volo.Abp.DependencyInjection; + namespace Volo.Abp.Serialization.Objects { @@ -8,14 +9,14 @@ namespace Volo.Abp.Serialization.Objects public byte[] Serialize(Car obj) { obj.Name += "-serialized"; - return BinarySerializationHelper.Serialize(obj); + return JsonSerializer.SerializeToUtf8Bytes(obj); } public Car Deserialize(byte[] bytes) { - var car = (Car)BinarySerializationHelper.DeserializeExtended(bytes); + var car = JsonSerializer.Deserialize(bytes); car.Name += "-deserialized"; return car; } } -} \ No newline at end of file +} diff --git a/framework/test/Volo.Abp.Settings.Tests/Volo.Abp.Settings.Tests.csproj b/framework/test/Volo.Abp.Settings.Tests/Volo.Abp.Settings.Tests.csproj index fadf2659d0..8791851953 100644 --- a/framework/test/Volo.Abp.Settings.Tests/Volo.Abp.Settings.Tests.csproj +++ b/framework/test/Volo.Abp.Settings.Tests/Volo.Abp.Settings.Tests.csproj @@ -3,7 +3,7 @@ - netcoreapp3.1 + net5.0 diff --git a/framework/test/Volo.Abp.Specifications.Tests/Volo.Abp.Specifications.Tests.csproj b/framework/test/Volo.Abp.Specifications.Tests/Volo.Abp.Specifications.Tests.csproj index b44ee82aae..94442135e2 100644 --- a/framework/test/Volo.Abp.Specifications.Tests/Volo.Abp.Specifications.Tests.csproj +++ b/framework/test/Volo.Abp.Specifications.Tests/Volo.Abp.Specifications.Tests.csproj @@ -3,7 +3,7 @@ - netcoreapp3.1 + net5.0 diff --git a/framework/test/Volo.Abp.TestApp.Tests/Volo.Abp.TestApp.Tests.csproj b/framework/test/Volo.Abp.TestApp.Tests/Volo.Abp.TestApp.Tests.csproj index 0ff64ec1d8..6d78929c51 100644 --- a/framework/test/Volo.Abp.TestApp.Tests/Volo.Abp.TestApp.Tests.csproj +++ b/framework/test/Volo.Abp.TestApp.Tests/Volo.Abp.TestApp.Tests.csproj @@ -3,7 +3,7 @@ - netcoreapp3.1 + net5.0 diff --git a/framework/test/Volo.Abp.TestApp/Volo.Abp.TestApp.csproj b/framework/test/Volo.Abp.TestApp/Volo.Abp.TestApp.csproj index 35d5e3b71a..460b52ddc1 100644 --- a/framework/test/Volo.Abp.TestApp/Volo.Abp.TestApp.csproj +++ b/framework/test/Volo.Abp.TestApp/Volo.Abp.TestApp.csproj @@ -3,7 +3,7 @@ - netcoreapp3.1 + net5.0 diff --git a/framework/test/Volo.Abp.TextTemplating.Tests/Volo.Abp.TextTemplating.Tests.csproj b/framework/test/Volo.Abp.TextTemplating.Tests/Volo.Abp.TextTemplating.Tests.csproj index 0895567843..ec9c188503 100644 --- a/framework/test/Volo.Abp.TextTemplating.Tests/Volo.Abp.TextTemplating.Tests.csproj +++ b/framework/test/Volo.Abp.TextTemplating.Tests/Volo.Abp.TextTemplating.Tests.csproj @@ -1,9 +1,9 @@ - + - netcoreapp3.1 + net5.0 diff --git a/framework/test/Volo.Abp.TextTemplating.Tests/Volo/Abp/TextTemplating/Localization/hu.json b/framework/test/Volo.Abp.TextTemplating.Tests/Volo/Abp/TextTemplating/Localization/hu.json new file mode 100644 index 0000000000..b9614b0a20 --- /dev/null +++ b/framework/test/Volo.Abp.TextTemplating.Tests/Volo/Abp/TextTemplating/Localization/hu.json @@ -0,0 +1,7 @@ +{ + "culture": "hu", + "texts": { + "HelloText": "Helló {0}", + "HowAreYou": "hogy vagy?" + } +} \ No newline at end of file diff --git a/framework/test/Volo.Abp.UI.Navigation.Tests/Volo.Abp.UI.Navigation.Tests.csproj b/framework/test/Volo.Abp.UI.Navigation.Tests/Volo.Abp.UI.Navigation.Tests.csproj index 2ba5372364..56f9a7bb5c 100644 --- a/framework/test/Volo.Abp.UI.Navigation.Tests/Volo.Abp.UI.Navigation.Tests.csproj +++ b/framework/test/Volo.Abp.UI.Navigation.Tests/Volo.Abp.UI.Navigation.Tests.csproj @@ -3,7 +3,7 @@ - netcoreapp3.1 + net5.0 diff --git a/framework/test/Volo.Abp.Uow.Tests/Volo.Abp.Uow.Tests.csproj b/framework/test/Volo.Abp.Uow.Tests/Volo.Abp.Uow.Tests.csproj index c6b401eec1..08221039c8 100644 --- a/framework/test/Volo.Abp.Uow.Tests/Volo.Abp.Uow.Tests.csproj +++ b/framework/test/Volo.Abp.Uow.Tests/Volo.Abp.Uow.Tests.csproj @@ -3,7 +3,7 @@ - netcoreapp3.1 + net5.0 diff --git a/framework/test/Volo.Abp.Validation.Tests/Volo.Abp.Validation.Tests.csproj b/framework/test/Volo.Abp.Validation.Tests/Volo.Abp.Validation.Tests.csproj index 13f57717d5..a663b56646 100644 --- a/framework/test/Volo.Abp.Validation.Tests/Volo.Abp.Validation.Tests.csproj +++ b/framework/test/Volo.Abp.Validation.Tests/Volo.Abp.Validation.Tests.csproj @@ -3,7 +3,7 @@ - netcoreapp3.1 + net5.0 diff --git a/framework/test/Volo.Abp.VirtualFileSystem.Tests/Volo.Abp.VirtualFileSystem.Tests.csproj b/framework/test/Volo.Abp.VirtualFileSystem.Tests/Volo.Abp.VirtualFileSystem.Tests.csproj index 122f54f075..cc51ad5e35 100644 --- a/framework/test/Volo.Abp.VirtualFileSystem.Tests/Volo.Abp.VirtualFileSystem.Tests.csproj +++ b/framework/test/Volo.Abp.VirtualFileSystem.Tests/Volo.Abp.VirtualFileSystem.Tests.csproj @@ -3,7 +3,7 @@ - netcoreapp3.1 + net5.0 true @@ -16,7 +16,7 @@ - + diff --git a/global.json b/global.json index 6156170057..f87af98b74 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "3.1.102", + "version": "5.0.100-rc.2.20479.15", "rollForward": "latestFeature" } -} \ No newline at end of file +} diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo.Abp.Account.Application.Contracts.csproj b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo.Abp.Account.Application.Contracts.csproj index 722a75a22c..a15db40e48 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo.Abp.Account.Application.Contracts.csproj +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo.Abp.Account.Application.Contracts.csproj @@ -21,7 +21,7 @@ - + diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/en.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/en.json index 51abf72a1e..db38b70309 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/en.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/en.json @@ -56,6 +56,7 @@ "BackToLogin": "Back to login", "ProfileTab:Password": "Change password", "ProfileTab:PersonalInfo": "Personal info", - "ReturnToApplication": "Return to application" + "ReturnToApplication": "Return to application", + "Volo.Account:InvalidEmailAddress": "Can not find the given email address: {0}" } } diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/hu.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/hu.json new file mode 100644 index 0000000000..6d2e1c6460 --- /dev/null +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/hu.json @@ -0,0 +1,61 @@ +{ + "culture": "hu", + "texts": { + "UserName": "Felhasználónév", + "EmailAddress": "Email cím", + "UserNameOrEmailAddress": "Felhasználónév és email cím", + "Password": "Jelszó", + "RememberMe": "Emlékezz rám", + "UseAnotherServiceToLogin": "Használjon másik szolgáltatást a bejelentkezéshez", + "UserLockedOutMessage": "A felhasználói fiókot érvénytelen bejelentkezési kísérletek miatt zároltuk. Kérjük, várjon egy kicsit, és próbálja újra.", + "InvalidUserNameOrPassword": "Érvénytelen felhasználónév vagy jelszó!", + "LoginIsNotAllowed": "Ön nem léphet be! Meg kell erősítenie e-mail címét / telefonszámát.", + "SelfRegistrationDisabledMessage": "Ennél az alkalmazásnál az önregisztráció le van tiltva. Új felhasználó regisztrálásához vegye fel a kapcsolatot az alkalmazás rendszergazdájával.", + "LocalLoginDisabledMessage": "A helyi bejelentkezés le van tiltva ennél az alkalmazásnál.", + "Login": "Bejelntkezés", + "Cancel": "Mégsem", + "Register": "Regisztráció", + "AreYouANewUser": "Őn új felhasználó?", + "AlreadyRegistered": "Már regisztrált?", + "InvalidLoginRequest": "Érvénytelen bejelentkezési kérelem", + "ThereAreNoLoginSchemesConfiguredForThisClient": "Ehhez az ügyfélhez nincsenek konfigurálva bejelentkezési sémák.", + "LogInUsingYourProviderAccount": "Jelentkezzen be a(z) {0} fiókjával", + "DisplayName:CurrentPassword": "Jelenlegi jelszó", + "DisplayName:NewPassword": "Új jelszó", + "DisplayName:NewPasswordConfirm": "Erősítse meg az új jelszavát", + "PasswordChangedMessage": "Jelszavát sikeresen megváltoztattuk.", + "DisplayName:UserName": "Felhasználónév", + "DisplayName:Email": "Email", + "DisplayName:Name": "Neve", + "DisplayName:Surname": "Vezetéknév", + "DisplayName:Password": "Jelszó", + "DisplayName:EmailAddress": "Email cím", + "DisplayName:PhoneNumber": "Telefonszám", + "PersonalSettings": "Személyes beállítások", + "PersonalSettingsSaved": "Személyes beállítások mentve", + "PasswordChanged": "Jelszó megváltoztatva", + "NewPasswordConfirmFailed": "Kérjük, erősítse meg az új jelszót.", + "Manage": "Kezelés", + "ManageYourProfile": "Kezelje a profilját", + "DisplayName:Abp.Account.IsSelfRegistrationEnabled": "Engedélyezve van az önregisztráció", + "Description:Abp.Account.IsSelfRegistrationEnabled": "A felhasználó saját maga regisztrálhatja-e a fiókot.", + "DisplayName:Abp.Account.EnableLocalLogin": "Hitelesítés helyi fiókkal", + "Description:Abp.Account.EnableLocalLogin": "Jelzi, hogy a szerver engedélyezi-e a felhasználóknak a hitelesítést egy helyi fiókkal.", + "LoggedOutTitle": "Kijelentkezett", + "LoggedOutText": "Kijelentkeztünk, és hamarosan átirányítjuk.", + "ReturnToText": "Kattintson ide a(z) {0} címre történő átirányításhoz", + "OrLoginWith": "Vagy jelentkezzen be", + "ForgotPassword": "Elfelejtette a jelszavát?", + "SendPasswordResetLink_Information": "Jelszó-visszaállítási linket küldünk az e-mailre a jelszó visszaállításához. Ha néhány percen belül nem kap e-mailt, próbálkozzon újra.", + "PasswordResetMailSentMessage": "A fiók-helyreállítási e-mailt az Ön e-mail címére küldtük. Ha 15 percen belül nem látja ezt az e-mailt a beérkező levelek között, keresse meg a levélszemét mappájában. Ha ott találja, kérjük, jelölje meg: -Nem szemét-.", + "ResetPassword": "Jelszó visszaállítása", + "ConfirmPassword": "Erősítse meg (ismételje meg) a jelszót", + "ResetPassword_Information": "Kérjük, írja be új jelszavát.", + "YourPasswordIsSuccessfullyReset": "Jelszavát sikeresen visszaállította.", + "GoToTheApplication": "Lépjen az alkalmazáshoz", + "BackToLogin": "Vissza a bejelentkezéshez", + "ProfileTab:Password": "Jelszó módosítása", + "ProfileTab:PersonalInfo": "Személyes adatok", + "ReturnToApplication": "Vissza az alkalmazáshoz" + } +} \ No newline at end of file diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/sl.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/sl.json index 747cc752c7..4cd3d801fc 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/sl.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/sl.json @@ -48,6 +48,7 @@ "ConfirmPassword": "Potrditev (ponovitev) gesla", "ResetPassword_Information": "Prosimo vnesite vaše novo geslo.", "YourPasswordIsSuccessfullyReset": "Vaše geslo je uspešno ponastavljeno.", - "BackToLogin": "Nazaj na prijavo" + "BackToLogin": "Nazaj na prijavo", + "Volo.Account:InvalidEmailAddress": "Navedenega e-poštnega naslova ni mogoče najti: {0}" } } diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/tr.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/tr.json index 48e43fd6cc..9f8e765759 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/tr.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/tr.json @@ -56,6 +56,7 @@ "BackToLogin": "Girişe dön", "ProfileTab:Password": "Şifre değiştir", "ProfileTab:PersonalInfo": "Kişisel bilgiler", - "ReturnToApplication": "Uygulamaya geri dön" + "ReturnToApplication": "Uygulamaya geri dön", + "Volo.Account:InvalidEmailAddress": "Email adresi bulunamadı: {0}" } } diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/zh-Hans.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/zh-Hans.json index 340fe95f74..93174b979d 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/zh-Hans.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/zh-Hans.json @@ -55,6 +55,9 @@ "BackToLogin": "返回登录", "ProfileTab:Password": "更改密码", "ProfileTab:PersonalInfo": "个人信息", - "ReturnToApplication": "返回到应用程序" + "ReturnToApplication": "返回到应用程序", + "Volo.Account:InvalidEmailAddress": "找不到给定的电子邮件地址:{0}", + "Volo.Account:SelfRegistrationDisabled": "自我注册已禁用!", + } } diff --git a/modules/account/src/Volo.Abp.Account.Application/Volo.Abp.Account.Application.csproj b/modules/account/src/Volo.Abp.Account.Application/Volo.Abp.Account.Application.csproj index 5ee4aa8697..fd7f8f2e3c 100644 --- a/modules/account/src/Volo.Abp.Account.Application/Volo.Abp.Account.Application.csproj +++ b/modules/account/src/Volo.Abp.Account.Application/Volo.Abp.Account.Application.csproj @@ -15,9 +15,9 @@ - + - + @@ -25,7 +25,7 @@ - + diff --git a/modules/account/src/Volo.Abp.Account.Application/Volo/Abp/Account/AccountAppService.cs b/modules/account/src/Volo.Abp.Account.Application/Volo/Abp/Account/AccountAppService.cs index 066ce47f64..ac3c6c2735 100644 --- a/modules/account/src/Volo.Abp.Account.Application/Volo/Abp/Account/AccountAppService.cs +++ b/modules/account/src/Volo.Abp.Account.Application/Volo/Abp/Account/AccountAppService.cs @@ -1,7 +1,7 @@ -using System.Linq; -using System.Threading.Tasks; +using System.Threading.Tasks; using Microsoft.AspNetCore.Identity; using Volo.Abp.Account.Emailing; +using Volo.Abp.Account.Localization; using Volo.Abp.Account.Settings; using Volo.Abp.Application.Services; using Volo.Abp.Identity; @@ -26,6 +26,7 @@ namespace Volo.Abp.Account AccountEmailer = accountEmailer; IdentitySecurityLogManager = identitySecurityLogManager; UserManager = userManager; + LocalizationResource = typeof(AccountResource); } public virtual async Task RegisterAsync(RegisterDto input) @@ -66,8 +67,7 @@ namespace Volo.Abp.Account var user = await UserManager.FindByEmailAsync(email); if (user == null) { - throw new BusinessException("Volo.Account:InvalidEmailAddress") - .WithData("Email", email); + throw new UserFriendlyException(L["Volo.Account:InvalidEmailAddress", email]); } return user; diff --git a/modules/account/src/Volo.Abp.Account.Blazor/Volo.Abp.Account.Blazor.csproj b/modules/account/src/Volo.Abp.Account.Blazor/Volo.Abp.Account.Blazor.csproj index 5707bc86a4..84d4e4a7f4 100644 --- a/modules/account/src/Volo.Abp.Account.Blazor/Volo.Abp.Account.Blazor.csproj +++ b/modules/account/src/Volo.Abp.Account.Blazor/Volo.Abp.Account.Blazor.csproj @@ -1,11 +1,10 @@ - + - netstandard2.1 - 3.0 + net5.0 Volo.Abp.Account.Blazor diff --git a/modules/account/src/Volo.Abp.Account.HttpApi/Volo.Abp.Account.HttpApi.csproj b/modules/account/src/Volo.Abp.Account.HttpApi/Volo.Abp.Account.HttpApi.csproj index 2e074722b2..51cd8f0e39 100644 --- a/modules/account/src/Volo.Abp.Account.HttpApi/Volo.Abp.Account.HttpApi.csproj +++ b/modules/account/src/Volo.Abp.Account.HttpApi/Volo.Abp.Account.HttpApi.csproj @@ -4,7 +4,7 @@ - netcoreapp3.1 + net5.0 Volo.Abp.Account.HttpApi Volo.Abp.Account.HttpApi diff --git a/modules/account/src/Volo.Abp.Account.Web.IdentityServer/Volo.Abp.Account.Web.IdentityServer.csproj b/modules/account/src/Volo.Abp.Account.Web.IdentityServer/Volo.Abp.Account.Web.IdentityServer.csproj index aca9729a31..ec41402629 100644 --- a/modules/account/src/Volo.Abp.Account.Web.IdentityServer/Volo.Abp.Account.Web.IdentityServer.csproj +++ b/modules/account/src/Volo.Abp.Account.Web.IdentityServer/Volo.Abp.Account.Web.IdentityServer.csproj @@ -4,7 +4,7 @@ - netcoreapp3.1 + net5.0 Volo.Abp.Account.Web.IdentityServer Volo.Abp.Account.Web.IdentityServer true @@ -38,7 +38,7 @@ - + diff --git a/modules/account/src/Volo.Abp.Account.Web/Pages/Account/ForgotPassword.cshtml.cs b/modules/account/src/Volo.Abp.Account.Web/Pages/Account/ForgotPassword.cshtml.cs index 1f426fa80f..b66b53c913 100644 --- a/modules/account/src/Volo.Abp.Account.Web/Pages/Account/ForgotPassword.cshtml.cs +++ b/modules/account/src/Volo.Abp.Account.Web/Pages/Account/ForgotPassword.cshtml.cs @@ -29,15 +29,24 @@ namespace Volo.Abp.Account.Web.Pages.Account public virtual async Task OnPostAsync() { - await AccountAppService.SendPasswordResetCodeAsync( - new SendPasswordResetCodeDto - { - Email = Email, - AppName = "MVC", //TODO: Const! - ReturnUrl = ReturnUrl, - ReturnUrlHash = ReturnUrlHash - } - ); + try + { + await AccountAppService.SendPasswordResetCodeAsync( + new SendPasswordResetCodeDto + { + Email = Email, + AppName = "MVC", //TODO: Const! + ReturnUrl = ReturnUrl, + ReturnUrlHash = ReturnUrlHash + } + ); + } + catch (UserFriendlyException e) + { + Alerts.Danger(e.Message); + return Page(); + } + return RedirectToPage( "./PasswordResetLinkSent", diff --git a/modules/account/src/Volo.Abp.Account.Web/Volo.Abp.Account.Web.csproj b/modules/account/src/Volo.Abp.Account.Web/Volo.Abp.Account.Web.csproj index d3f7979fb1..c2053ccaff 100644 --- a/modules/account/src/Volo.Abp.Account.Web/Volo.Abp.Account.Web.csproj +++ b/modules/account/src/Volo.Abp.Account.Web/Volo.Abp.Account.Web.csproj @@ -4,7 +4,7 @@ - netcoreapp3.1 + net5.0 Volo.Abp.Account.Web Volo.Abp.Account.Web $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; @@ -40,7 +40,7 @@ - + diff --git a/modules/account/test/Volo.Abp.Account.Application.Tests/Volo.Abp.Account.Application.Tests.csproj b/modules/account/test/Volo.Abp.Account.Application.Tests/Volo.Abp.Account.Application.Tests.csproj index 84e7de1746..b48d633d96 100644 --- a/modules/account/test/Volo.Abp.Account.Application.Tests/Volo.Abp.Account.Application.Tests.csproj +++ b/modules/account/test/Volo.Abp.Account.Application.Tests/Volo.Abp.Account.Application.Tests.csproj @@ -1,13 +1,13 @@ - netcoreapp3.1 + net5.0 - + diff --git a/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain/Volo.Abp.AuditLogging.Domain.csproj b/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain/Volo.Abp.AuditLogging.Domain.csproj index 161e952593..df43919393 100644 --- a/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain/Volo.Abp.AuditLogging.Domain.csproj +++ b/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain/Volo.Abp.AuditLogging.Domain.csproj @@ -7,7 +7,7 @@ netstandard2.0 - + diff --git a/modules/audit-logging/src/Volo.Abp.AuditLogging.EntityFrameworkCore/Volo.Abp.AuditLogging.EntityFrameworkCore.csproj b/modules/audit-logging/src/Volo.Abp.AuditLogging.EntityFrameworkCore/Volo.Abp.AuditLogging.EntityFrameworkCore.csproj index d94e707ba0..01ef3be28f 100644 --- a/modules/audit-logging/src/Volo.Abp.AuditLogging.EntityFrameworkCore/Volo.Abp.AuditLogging.EntityFrameworkCore.csproj +++ b/modules/audit-logging/src/Volo.Abp.AuditLogging.EntityFrameworkCore/Volo.Abp.AuditLogging.EntityFrameworkCore.csproj @@ -4,7 +4,7 @@ - netstandard2.0 + netstandard2.1 diff --git a/modules/audit-logging/src/Volo.Abp.AuditLogging.EntityFrameworkCore/Volo/Abp/AuditLogging/AbpAuditLoggingEfCoreQueryableExtensions.cs b/modules/audit-logging/src/Volo.Abp.AuditLogging.EntityFrameworkCore/Volo/Abp/AuditLogging/AbpAuditLoggingEfCoreQueryableExtensions.cs index 6dc4bfadb8..11ba294610 100644 --- a/modules/audit-logging/src/Volo.Abp.AuditLogging.EntityFrameworkCore/Volo/Abp/AuditLogging/AbpAuditLoggingEfCoreQueryableExtensions.cs +++ b/modules/audit-logging/src/Volo.Abp.AuditLogging.EntityFrameworkCore/Volo/Abp/AuditLogging/AbpAuditLoggingEfCoreQueryableExtensions.cs @@ -15,6 +15,7 @@ namespace Volo.Abp.AuditLogging } return queryable + .AsSplitQuery() .Include(x => x.Actions) .Include(x => x.EntityChanges).ThenInclude(ec=>ec.PropertyChanges); } diff --git a/modules/audit-logging/src/Volo.Abp.AuditLogging.EntityFrameworkCore/Volo/Abp/AuditLogging/EntityFrameworkCore/EfCoreAuditLogRepository.cs b/modules/audit-logging/src/Volo.Abp.AuditLogging.EntityFrameworkCore/Volo/Abp/AuditLogging/EntityFrameworkCore/EfCoreAuditLogRepository.cs index 06dcf8ffed..9ce2bee070 100644 --- a/modules/audit-logging/src/Volo.Abp.AuditLogging.EntityFrameworkCore/Volo/Abp/AuditLogging/EntityFrameworkCore/EfCoreAuditLogRepository.cs +++ b/modules/audit-logging/src/Volo.Abp.AuditLogging.EntityFrameworkCore/Volo/Abp/AuditLogging/EntityFrameworkCore/EfCoreAuditLogRepository.cs @@ -143,7 +143,7 @@ namespace Volo.Abp.AuditLogging.EntityFrameworkCore public Task GetEntityChange(Guid entityChangeId) { - return DbContext.Set().AsNoTracking().IncludeDetails().Where(x => x.Id == entityChangeId).FirstAsync(); + return DbContext.Set().AsNoTracking().IncludeDetails().OrderBy(x => x.Id).Where(x => x.Id == entityChangeId).FirstAsync(); } public virtual async Task> GetEntityChangeListAsync( diff --git a/modules/audit-logging/test/Volo.Abp.AuditLogging.EntityFrameworkCore.Tests/Volo.Abp.AuditLogging.EntityFrameworkCore.Tests.csproj b/modules/audit-logging/test/Volo.Abp.AuditLogging.EntityFrameworkCore.Tests/Volo.Abp.AuditLogging.EntityFrameworkCore.Tests.csproj index 0a85b56d87..d98c6f01e2 100644 --- a/modules/audit-logging/test/Volo.Abp.AuditLogging.EntityFrameworkCore.Tests/Volo.Abp.AuditLogging.EntityFrameworkCore.Tests.csproj +++ b/modules/audit-logging/test/Volo.Abp.AuditLogging.EntityFrameworkCore.Tests/Volo.Abp.AuditLogging.EntityFrameworkCore.Tests.csproj @@ -3,7 +3,7 @@ - netcoreapp3.1 + net5.0 @@ -15,7 +15,7 @@ - + diff --git a/modules/audit-logging/test/Volo.Abp.AuditLogging.MongoDB.Tests/Volo.Abp.AuditLogging.MongoDB.Tests.csproj b/modules/audit-logging/test/Volo.Abp.AuditLogging.MongoDB.Tests/Volo.Abp.AuditLogging.MongoDB.Tests.csproj index 34130bfca5..dda1379793 100644 --- a/modules/audit-logging/test/Volo.Abp.AuditLogging.MongoDB.Tests/Volo.Abp.AuditLogging.MongoDB.Tests.csproj +++ b/modules/audit-logging/test/Volo.Abp.AuditLogging.MongoDB.Tests/Volo.Abp.AuditLogging.MongoDB.Tests.csproj @@ -3,7 +3,7 @@ - netcoreapp3.1 + net5.0 diff --git a/modules/audit-logging/test/Volo.Abp.AuditLogging.TestBase/Volo.Abp.AuditLogging.TestBase.csproj b/modules/audit-logging/test/Volo.Abp.AuditLogging.TestBase/Volo.Abp.AuditLogging.TestBase.csproj index e62925a488..fc8df70002 100644 --- a/modules/audit-logging/test/Volo.Abp.AuditLogging.TestBase/Volo.Abp.AuditLogging.TestBase.csproj +++ b/modules/audit-logging/test/Volo.Abp.AuditLogging.TestBase/Volo.Abp.AuditLogging.TestBase.csproj @@ -3,7 +3,7 @@ - netcoreapp3.1 + net5.0 diff --git a/modules/audit-logging/test/Volo.Abp.AuditLogging.Tests/Volo.Abp.AuditLogging.Tests.csproj b/modules/audit-logging/test/Volo.Abp.AuditLogging.Tests/Volo.Abp.AuditLogging.Tests.csproj index ab703cdca3..d60a87ced6 100644 --- a/modules/audit-logging/test/Volo.Abp.AuditLogging.Tests/Volo.Abp.AuditLogging.Tests.csproj +++ b/modules/audit-logging/test/Volo.Abp.AuditLogging.Tests/Volo.Abp.AuditLogging.Tests.csproj @@ -3,7 +3,7 @@ - netcoreapp3.1 + net5.0 diff --git a/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.HangFire/Volo.Abp.BackgroundJobs.DemoApp.HangFire.csproj b/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.HangFire/Volo.Abp.BackgroundJobs.DemoApp.HangFire.csproj index 0dede420f3..c4ea6d9eb4 100644 --- a/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.HangFire/Volo.Abp.BackgroundJobs.DemoApp.HangFire.csproj +++ b/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.HangFire/Volo.Abp.BackgroundJobs.DemoApp.HangFire.csproj @@ -1,17 +1,17 @@ - + Exe - netcoreapp3.1 + net5.0 - + - + Always diff --git a/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.Quartz/Volo.Abp.BackgroundJobs.DemoApp.Quartz.csproj b/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.Quartz/Volo.Abp.BackgroundJobs.DemoApp.Quartz.csproj index 7bd70093ee..0f5bd720a1 100644 --- a/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.Quartz/Volo.Abp.BackgroundJobs.DemoApp.Quartz.csproj +++ b/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.Quartz/Volo.Abp.BackgroundJobs.DemoApp.Quartz.csproj @@ -1,8 +1,8 @@ - + Exe - netcoreapp3.1 + net5.0 diff --git a/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.RabbitMq/Volo.Abp.BackgroundJobs.DemoApp.RabbitMq.csproj b/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.RabbitMq/Volo.Abp.BackgroundJobs.DemoApp.RabbitMq.csproj index adcf9be1aa..3b84a73bc1 100644 --- a/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.RabbitMq/Volo.Abp.BackgroundJobs.DemoApp.RabbitMq.csproj +++ b/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.RabbitMq/Volo.Abp.BackgroundJobs.DemoApp.RabbitMq.csproj @@ -1,8 +1,8 @@ - + Exe - netcoreapp3.1 + net5.0 diff --git a/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.Shared/Volo.Abp.BackgroundJobs.DemoApp.Shared.csproj b/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.Shared/Volo.Abp.BackgroundJobs.DemoApp.Shared.csproj index df4f574663..e01e0f89b5 100644 --- a/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.Shared/Volo.Abp.BackgroundJobs.DemoApp.Shared.csproj +++ b/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.Shared/Volo.Abp.BackgroundJobs.DemoApp.Shared.csproj @@ -7,7 +7,7 @@ - + diff --git a/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp/Migrations/20200810022513_Initial.Designer.cs b/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp/Migrations/20201013055401_Initial.Designer.cs similarity index 96% rename from modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp/Migrations/20200810022513_Initial.Designer.cs rename to modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp/Migrations/20201013055401_Initial.Designer.cs index cd91ca9fe9..35129e8877 100644 --- a/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp/Migrations/20200810022513_Initial.Designer.cs +++ b/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp/Migrations/20201013055401_Initial.Designer.cs @@ -11,7 +11,7 @@ using Volo.Abp.EntityFrameworkCore; namespace Volo.Abp.BackgroundJobs.DemoApp.Migrations { [DbContext(typeof(DemoAppDbContext))] - [Migration("20200810022513_Initial")] + [Migration("20201013055401_Initial")] partial class Initial { protected override void BuildTargetModel(ModelBuilder modelBuilder) @@ -19,7 +19,7 @@ namespace Volo.Abp.BackgroundJobs.DemoApp.Migrations #pragma warning disable 612, 618 modelBuilder .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) - .HasAnnotation("ProductVersion", "3.1.6") + .HasAnnotation("ProductVersion", "3.1.8") .HasAnnotation("Relational:MaxIdentifierLength", 128) .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); diff --git a/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp/Migrations/20200810022513_Initial.cs b/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp/Migrations/20201013055401_Initial.cs similarity index 100% rename from modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp/Migrations/20200810022513_Initial.cs rename to modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp/Migrations/20201013055401_Initial.cs diff --git a/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp/Migrations/DemoAppDbContextModelSnapshot.cs b/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp/Migrations/DemoAppDbContextModelSnapshot.cs index 4a5df70449..47ee56f4bb 100644 --- a/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp/Migrations/DemoAppDbContextModelSnapshot.cs +++ b/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp/Migrations/DemoAppDbContextModelSnapshot.cs @@ -17,7 +17,7 @@ namespace Volo.Abp.BackgroundJobs.DemoApp.Migrations #pragma warning disable 612, 618 modelBuilder .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) - .HasAnnotation("ProductVersion", "3.1.6") + .HasAnnotation("ProductVersion", "3.1.8") .HasAnnotation("Relational:MaxIdentifierLength", 128) .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); diff --git a/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp/Volo.Abp.BackgroundJobs.DemoApp.csproj b/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp/Volo.Abp.BackgroundJobs.DemoApp.csproj index 0faa1370a8..00ad8439b9 100644 --- a/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp/Volo.Abp.BackgroundJobs.DemoApp.csproj +++ b/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp/Volo.Abp.BackgroundJobs.DemoApp.csproj @@ -1,12 +1,12 @@ - + Exe - netcoreapp3.1 + net5.0 - + all runtime; build; native; contentfiles; analyzers diff --git a/modules/background-jobs/src/Volo.Abp.BackgroundJobs.EntityFrameworkCore/Volo.Abp.BackgroundJobs.EntityFrameworkCore.csproj b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.EntityFrameworkCore/Volo.Abp.BackgroundJobs.EntityFrameworkCore.csproj index 7103c0570e..92d8c471fd 100644 --- a/modules/background-jobs/src/Volo.Abp.BackgroundJobs.EntityFrameworkCore/Volo.Abp.BackgroundJobs.EntityFrameworkCore.csproj +++ b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.EntityFrameworkCore/Volo.Abp.BackgroundJobs.EntityFrameworkCore.csproj @@ -4,7 +4,7 @@ - netstandard2.0 + netstandard2.1 diff --git a/modules/background-jobs/test/Volo.Abp.BackgroundJobs.Domain.Tests/Volo.Abp.BackgroundJobs.Domain.Tests.csproj b/modules/background-jobs/test/Volo.Abp.BackgroundJobs.Domain.Tests/Volo.Abp.BackgroundJobs.Domain.Tests.csproj index 4c835cbd51..f6c16a3449 100644 --- a/modules/background-jobs/test/Volo.Abp.BackgroundJobs.Domain.Tests/Volo.Abp.BackgroundJobs.Domain.Tests.csproj +++ b/modules/background-jobs/test/Volo.Abp.BackgroundJobs.Domain.Tests/Volo.Abp.BackgroundJobs.Domain.Tests.csproj @@ -3,7 +3,7 @@ - netcoreapp3.1 + net5.0 diff --git a/modules/background-jobs/test/Volo.Abp.BackgroundJobs.EntityFrameworkCore.Tests/Volo.Abp.BackgroundJobs.EntityFrameworkCore.Tests.csproj b/modules/background-jobs/test/Volo.Abp.BackgroundJobs.EntityFrameworkCore.Tests/Volo.Abp.BackgroundJobs.EntityFrameworkCore.Tests.csproj index 50c8e74edb..33d81803df 100644 --- a/modules/background-jobs/test/Volo.Abp.BackgroundJobs.EntityFrameworkCore.Tests/Volo.Abp.BackgroundJobs.EntityFrameworkCore.Tests.csproj +++ b/modules/background-jobs/test/Volo.Abp.BackgroundJobs.EntityFrameworkCore.Tests/Volo.Abp.BackgroundJobs.EntityFrameworkCore.Tests.csproj @@ -3,7 +3,7 @@ - netcoreapp3.1 + net5.0 @@ -15,7 +15,7 @@ - + diff --git a/modules/background-jobs/test/Volo.Abp.BackgroundJobs.MongoDB.Tests/Volo.Abp.BackgroundJobs.MongoDB.Tests.csproj b/modules/background-jobs/test/Volo.Abp.BackgroundJobs.MongoDB.Tests/Volo.Abp.BackgroundJobs.MongoDB.Tests.csproj index 496f95b373..0f9f0bf566 100644 --- a/modules/background-jobs/test/Volo.Abp.BackgroundJobs.MongoDB.Tests/Volo.Abp.BackgroundJobs.MongoDB.Tests.csproj +++ b/modules/background-jobs/test/Volo.Abp.BackgroundJobs.MongoDB.Tests/Volo.Abp.BackgroundJobs.MongoDB.Tests.csproj @@ -3,7 +3,7 @@ - netcoreapp3.1 + net5.0 diff --git a/modules/background-jobs/test/Volo.Abp.BackgroundJobs.TestBase/Volo.Abp.BackgroundJobs.TestBase.csproj b/modules/background-jobs/test/Volo.Abp.BackgroundJobs.TestBase/Volo.Abp.BackgroundJobs.TestBase.csproj index 46d6ea7b8e..58c82e4e62 100644 --- a/modules/background-jobs/test/Volo.Abp.BackgroundJobs.TestBase/Volo.Abp.BackgroundJobs.TestBase.csproj +++ b/modules/background-jobs/test/Volo.Abp.BackgroundJobs.TestBase/Volo.Abp.BackgroundJobs.TestBase.csproj @@ -3,7 +3,7 @@ - netcoreapp3.1 + net5.0 diff --git a/modules/blob-storing-database/Volo.Abp.BlobStoring.Database.sln.DotSettings b/modules/blob-storing-database/Volo.Abp.BlobStoring.Database.sln.DotSettings index cb0b2c919f..b31951b037 100644 --- a/modules/blob-storing-database/Volo.Abp.BlobStoring.Database.sln.DotSettings +++ b/modules/blob-storing-database/Volo.Abp.BlobStoring.Database.sln.DotSettings @@ -1,4 +1,4 @@ - + True WARNING WARNING diff --git a/modules/blob-storing-database/host/BlobStoring.Database.Host.ConsoleApp/src/BlobStoring.Database.Host.ConsoleApp.ConsoleApp/BlobStoring.Database.Host.ConsoleApp.ConsoleApp.csproj b/modules/blob-storing-database/host/BlobStoring.Database.Host.ConsoleApp/src/BlobStoring.Database.Host.ConsoleApp.ConsoleApp/BlobStoring.Database.Host.ConsoleApp.ConsoleApp.csproj index 7e8d79ec68..906bb08e7e 100644 --- a/modules/blob-storing-database/host/BlobStoring.Database.Host.ConsoleApp/src/BlobStoring.Database.Host.ConsoleApp.ConsoleApp/BlobStoring.Database.Host.ConsoleApp.ConsoleApp.csproj +++ b/modules/blob-storing-database/host/BlobStoring.Database.Host.ConsoleApp/src/BlobStoring.Database.Host.ConsoleApp.ConsoleApp/BlobStoring.Database.Host.ConsoleApp.ConsoleApp.csproj @@ -1,8 +1,8 @@ - + Exe - netcoreapp3.1 + net5.0 @@ -20,13 +20,13 @@ - + - - + + diff --git a/modules/blob-storing-database/host/BlobStoring.Database.Host.ConsoleApp/src/BlobStoring.Database.Host.ConsoleApp.ConsoleApp/Migrations/20200810022447_Initial.Designer.cs b/modules/blob-storing-database/host/BlobStoring.Database.Host.ConsoleApp/src/BlobStoring.Database.Host.ConsoleApp.ConsoleApp/Migrations/20201013055337_Initial.Designer.cs similarity index 97% rename from modules/blob-storing-database/host/BlobStoring.Database.Host.ConsoleApp/src/BlobStoring.Database.Host.ConsoleApp.ConsoleApp/Migrations/20200810022447_Initial.Designer.cs rename to modules/blob-storing-database/host/BlobStoring.Database.Host.ConsoleApp/src/BlobStoring.Database.Host.ConsoleApp.ConsoleApp/Migrations/20201013055337_Initial.Designer.cs index 6d2051908a..36ea53e207 100644 --- a/modules/blob-storing-database/host/BlobStoring.Database.Host.ConsoleApp/src/BlobStoring.Database.Host.ConsoleApp.ConsoleApp/Migrations/20200810022447_Initial.Designer.cs +++ b/modules/blob-storing-database/host/BlobStoring.Database.Host.ConsoleApp/src/BlobStoring.Database.Host.ConsoleApp.ConsoleApp/Migrations/20201013055337_Initial.Designer.cs @@ -11,7 +11,7 @@ using Volo.Abp.EntityFrameworkCore; namespace BlobStoring.Database.Host.ConsoleApp.ConsoleApp.Migrations { [DbContext(typeof(BlobStoringHostDbContext))] - [Migration("20200810022447_Initial")] + [Migration("20201013055337_Initial")] partial class Initial { protected override void BuildTargetModel(ModelBuilder modelBuilder) @@ -19,7 +19,7 @@ namespace BlobStoring.Database.Host.ConsoleApp.ConsoleApp.Migrations #pragma warning disable 612, 618 modelBuilder .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) - .HasAnnotation("ProductVersion", "3.1.6") + .HasAnnotation("ProductVersion", "3.1.8") .HasAnnotation("Relational:MaxIdentifierLength", 128) .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); diff --git a/modules/blob-storing-database/host/BlobStoring.Database.Host.ConsoleApp/src/BlobStoring.Database.Host.ConsoleApp.ConsoleApp/Migrations/20200810022447_Initial.cs b/modules/blob-storing-database/host/BlobStoring.Database.Host.ConsoleApp/src/BlobStoring.Database.Host.ConsoleApp.ConsoleApp/Migrations/20201013055337_Initial.cs similarity index 100% rename from modules/blob-storing-database/host/BlobStoring.Database.Host.ConsoleApp/src/BlobStoring.Database.Host.ConsoleApp.ConsoleApp/Migrations/20200810022447_Initial.cs rename to modules/blob-storing-database/host/BlobStoring.Database.Host.ConsoleApp/src/BlobStoring.Database.Host.ConsoleApp.ConsoleApp/Migrations/20201013055337_Initial.cs diff --git a/modules/blob-storing-database/host/BlobStoring.Database.Host.ConsoleApp/src/BlobStoring.Database.Host.ConsoleApp.ConsoleApp/Migrations/BlobStoringHostDbContextModelSnapshot.cs b/modules/blob-storing-database/host/BlobStoring.Database.Host.ConsoleApp/src/BlobStoring.Database.Host.ConsoleApp.ConsoleApp/Migrations/BlobStoringHostDbContextModelSnapshot.cs index a32d6221d7..a9713903bf 100644 --- a/modules/blob-storing-database/host/BlobStoring.Database.Host.ConsoleApp/src/BlobStoring.Database.Host.ConsoleApp.ConsoleApp/Migrations/BlobStoringHostDbContextModelSnapshot.cs +++ b/modules/blob-storing-database/host/BlobStoring.Database.Host.ConsoleApp/src/BlobStoring.Database.Host.ConsoleApp.ConsoleApp/Migrations/BlobStoringHostDbContextModelSnapshot.cs @@ -17,7 +17,7 @@ namespace BlobStoring.Database.Host.ConsoleApp.ConsoleApp.Migrations #pragma warning disable 612, 618 modelBuilder .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) - .HasAnnotation("ProductVersion", "3.1.6") + .HasAnnotation("ProductVersion", "3.1.8") .HasAnnotation("Relational:MaxIdentifierLength", 128) .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); diff --git a/modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.Domain.Shared/Volo.Abp.BlobStoring.Database.Domain.Shared.csproj b/modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.Domain.Shared/Volo.Abp.BlobStoring.Database.Domain.Shared.csproj index ad171263fc..899a964810 100644 --- a/modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.Domain.Shared/Volo.Abp.BlobStoring.Database.Domain.Shared.csproj +++ b/modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.Domain.Shared/Volo.Abp.BlobStoring.Database.Domain.Shared.csproj @@ -1,4 +1,4 @@ - + diff --git a/modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.Domain.Shared/Volo/Abp/BlobStoring/Database/Localization/hu.json b/modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.Domain.Shared/Volo/Abp/BlobStoring/Database/Localization/hu.json new file mode 100644 index 0000000000..2600340ef2 --- /dev/null +++ b/modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.Domain.Shared/Volo/Abp/BlobStoring/Database/Localization/hu.json @@ -0,0 +1,6 @@ +{ + "culture": "hu", + "texts": { + "ManageYourProfile": "Kezelje a profilját" + } + } \ No newline at end of file diff --git a/modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.Domain/Volo.Abp.BlobStoring.Database.Domain.csproj b/modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.Domain/Volo.Abp.BlobStoring.Database.Domain.csproj index 09f19c0cae..c3ac872d18 100644 --- a/modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.Domain/Volo.Abp.BlobStoring.Database.Domain.csproj +++ b/modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.Domain/Volo.Abp.BlobStoring.Database.Domain.csproj @@ -1,4 +1,4 @@ - + diff --git a/modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.EntityFrameworkCore/Volo.Abp.BlobStoring.Database.EntityFrameworkCore.csproj b/modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.EntityFrameworkCore/Volo.Abp.BlobStoring.Database.EntityFrameworkCore.csproj index ac1c336f15..3d12980c79 100644 --- a/modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.EntityFrameworkCore/Volo.Abp.BlobStoring.Database.EntityFrameworkCore.csproj +++ b/modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.EntityFrameworkCore/Volo.Abp.BlobStoring.Database.EntityFrameworkCore.csproj @@ -1,10 +1,10 @@ - + - netstandard2.0 + netstandard2.1 diff --git a/modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.MongoDB/Volo.Abp.BlobStoring.Database.MongoDB.csproj b/modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.MongoDB/Volo.Abp.BlobStoring.Database.MongoDB.csproj index 2665bb6736..6b1f447f8a 100644 --- a/modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.MongoDB/Volo.Abp.BlobStoring.Database.MongoDB.csproj +++ b/modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.MongoDB/Volo.Abp.BlobStoring.Database.MongoDB.csproj @@ -1,4 +1,4 @@ - + diff --git a/modules/blob-storing-database/test/Volo.Abp.BlobStoring.Database.Domain.Tests/Volo.Abp.BlobStoring.Database.Domain.Tests.csproj b/modules/blob-storing-database/test/Volo.Abp.BlobStoring.Database.Domain.Tests/Volo.Abp.BlobStoring.Database.Domain.Tests.csproj index a6ff223c3a..3f5faacea1 100644 --- a/modules/blob-storing-database/test/Volo.Abp.BlobStoring.Database.Domain.Tests/Volo.Abp.BlobStoring.Database.Domain.Tests.csproj +++ b/modules/blob-storing-database/test/Volo.Abp.BlobStoring.Database.Domain.Tests/Volo.Abp.BlobStoring.Database.Domain.Tests.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1 + net5.0 Volo.Abp.BlobStoring.Database diff --git a/modules/blob-storing-database/test/Volo.Abp.BlobStoring.Database.EntityFrameworkCore.Tests/Volo.Abp.BlobStoring.Database.EntityFrameworkCore.Tests.csproj b/modules/blob-storing-database/test/Volo.Abp.BlobStoring.Database.EntityFrameworkCore.Tests/Volo.Abp.BlobStoring.Database.EntityFrameworkCore.Tests.csproj index fdaeecf17e..42a2defd23 100644 --- a/modules/blob-storing-database/test/Volo.Abp.BlobStoring.Database.EntityFrameworkCore.Tests/Volo.Abp.BlobStoring.Database.EntityFrameworkCore.Tests.csproj +++ b/modules/blob-storing-database/test/Volo.Abp.BlobStoring.Database.EntityFrameworkCore.Tests/Volo.Abp.BlobStoring.Database.EntityFrameworkCore.Tests.csproj @@ -1,15 +1,15 @@ - netcoreapp3.1 + net5.0 Volo.Abp.BlobStoring.Database - - - + + + diff --git a/modules/blob-storing-database/test/Volo.Abp.BlobStoring.Database.MongoDB.Tests/Volo.Abp.BlobStoring.Database.MongoDB.Tests.csproj b/modules/blob-storing-database/test/Volo.Abp.BlobStoring.Database.MongoDB.Tests/Volo.Abp.BlobStoring.Database.MongoDB.Tests.csproj index 48196ab38f..a56030ccc6 100644 --- a/modules/blob-storing-database/test/Volo.Abp.BlobStoring.Database.MongoDB.Tests/Volo.Abp.BlobStoring.Database.MongoDB.Tests.csproj +++ b/modules/blob-storing-database/test/Volo.Abp.BlobStoring.Database.MongoDB.Tests/Volo.Abp.BlobStoring.Database.MongoDB.Tests.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1 + net5.0 Volo.Abp.BlobStoring.Database diff --git a/modules/blob-storing-database/test/Volo.Abp.BlobStoring.Database.TestBase/Volo.Abp.BlobStoring.Database.TestBase.csproj b/modules/blob-storing-database/test/Volo.Abp.BlobStoring.Database.TestBase/Volo.Abp.BlobStoring.Database.TestBase.csproj index bbf0bad776..f4ddf02406 100644 --- a/modules/blob-storing-database/test/Volo.Abp.BlobStoring.Database.TestBase/Volo.Abp.BlobStoring.Database.TestBase.csproj +++ b/modules/blob-storing-database/test/Volo.Abp.BlobStoring.Database.TestBase/Volo.Abp.BlobStoring.Database.TestBase.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1 + net5.0 Volo.Abp.BlobStoring.Database diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20200813130355_Initial.Designer.cs b/modules/blogging/app/Volo.BloggingTestApp.EntityFrameworkCore/Migrations/20201013055410_AddLinkUser.Designer.cs similarity index 75% rename from modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20200813130355_Initial.Designer.cs rename to modules/blogging/app/Volo.BloggingTestApp.EntityFrameworkCore/Migrations/20201013055410_AddLinkUser.Designer.cs index 69edfcf69f..a04bce85d3 100644 --- a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20200813130355_Initial.Designer.cs +++ b/modules/blogging/app/Volo.BloggingTestApp.EntityFrameworkCore/Migrations/20201013055410_AddLinkUser.Designer.cs @@ -6,167 +6,48 @@ using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using Volo.Abp.EntityFrameworkCore; -using Volo.CmsKit.EntityFrameworkCore; +using Volo.BloggingTestApp.EntityFrameworkCore; -namespace Volo.CmsKit.Migrations +namespace Volo.BloggingTestApp.EntityFrameworkCore.Migrations { - [DbContext(typeof(UnifiedDbContext))] - [Migration("20200813130355_Initial")] - partial class Initial + [DbContext(typeof(BloggingTestAppDbContext))] + [Migration("20201013055410_AddLinkUser")] + partial class AddLinkUser { protected override void BuildTargetModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) - .HasAnnotation("ProductVersion", "3.1.6") + .HasAnnotation("ProductVersion", "3.1.8") .HasAnnotation("Relational:MaxIdentifierLength", 128) .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); - modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => + modelBuilder.Entity("Volo.Abp.BlobStoring.Database.DatabaseBlob", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); - b.Property("ApplicationName") - .HasColumnName("ApplicationName") - .HasColumnType("nvarchar(96)") - .HasMaxLength(96); - - b.Property("BrowserInfo") - .HasColumnName("BrowserInfo") - .HasColumnType("nvarchar(512)") - .HasMaxLength(512); - - b.Property("ClientId") - .HasColumnName("ClientId") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("ClientIpAddress") - .HasColumnName("ClientIpAddress") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("ClientName") - .HasColumnName("ClientName") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); - - b.Property("Comments") - .HasColumnName("Comments") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasColumnName("ConcurrencyStamp") .HasColumnType("nvarchar(40)") .HasMaxLength(40); - b.Property("CorrelationId") - .HasColumnName("CorrelationId") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("Exceptions") - .HasColumnName("Exceptions") - .HasColumnType("nvarchar(4000)") - .HasMaxLength(4000); - - b.Property("ExecutionDuration") - .HasColumnName("ExecutionDuration") - .HasColumnType("int"); - - b.Property("ExecutionTime") - .HasColumnType("datetime2"); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); - - b.Property("HttpMethod") - .HasColumnName("HttpMethod") - .HasColumnType("nvarchar(16)") - .HasMaxLength(16); - - b.Property("HttpStatusCode") - .HasColumnName("HttpStatusCode") - .HasColumnType("int"); - - b.Property("ImpersonatorTenantId") - .HasColumnName("ImpersonatorTenantId") - .HasColumnType("uniqueidentifier"); - - b.Property("ImpersonatorUserId") - .HasColumnName("ImpersonatorUserId") + b.Property("ContainerId") .HasColumnType("uniqueidentifier"); - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - b.Property("TenantName") - .HasColumnType("nvarchar(max)"); - - b.Property("Url") - .HasColumnName("Url") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property("UserId") - .HasColumnName("UserId") - .HasColumnType("uniqueidentifier"); - - b.Property("UserName") - .HasColumnName("UserName") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "ExecutionTime"); - - b.HasIndex("TenantId", "UserId", "ExecutionTime"); - - b.ToTable("AbpAuditLogs"); - }); - - modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("AuditLogId") - .HasColumnName("AuditLogId") - .HasColumnType("uniqueidentifier"); - - b.Property("ExecutionDuration") - .HasColumnName("ExecutionDuration") - .HasColumnType("int"); - - b.Property("ExecutionTime") - .HasColumnName("ExecutionTime") - .HasColumnType("datetime2"); + b.Property("Content") + .HasColumnType("varbinary(max)") + .HasMaxLength(2147483647); b.Property("ExtraProperties") .HasColumnName("ExtraProperties") .HasColumnType("nvarchar(max)"); - b.Property("MethodName") - .HasColumnName("MethodName") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); - - b.Property("Parameters") - .HasColumnName("Parameters") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); - - b.Property("ServiceName") - .HasColumnName("ServiceName") + b.Property("Name") + .IsRequired() .HasColumnType("nvarchar(256)") .HasMaxLength(256); @@ -176,103 +57,43 @@ namespace Volo.CmsKit.Migrations b.HasKey("Id"); - b.HasIndex("AuditLogId"); + b.HasIndex("ContainerId"); - b.HasIndex("TenantId", "ServiceName", "MethodName", "ExecutionTime"); + b.HasIndex("TenantId", "ContainerId", "Name"); - b.ToTable("AbpAuditLogActions"); + b.ToTable("AbpBlobs"); }); - modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => + modelBuilder.Entity("Volo.Abp.BlobStoring.Database.DatabaseBlobContainer", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); - b.Property("AuditLogId") - .HasColumnName("AuditLogId") - .HasColumnType("uniqueidentifier"); - - b.Property("ChangeTime") - .HasColumnName("ChangeTime") - .HasColumnType("datetime2"); - - b.Property("ChangeType") - .HasColumnName("ChangeType") - .HasColumnType("tinyint"); - - b.Property("EntityId") - .IsRequired() - .HasColumnName("EntityId") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); - - b.Property("EntityTenantId") - .HasColumnType("uniqueidentifier"); - - b.Property("EntityTypeFullName") - .IsRequired() - .HasColumnName("EntityTypeFullName") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(40)") + .HasMaxLength(40); b.Property("ExtraProperties") .HasColumnName("ExtraProperties") .HasColumnType("nvarchar(max)"); - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("Id"); - - b.HasIndex("AuditLogId"); - - b.HasIndex("TenantId", "EntityTypeFullName", "EntityId"); - - b.ToTable("AbpEntityChanges"); - }); - - modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("EntityChangeId") - .HasColumnType("uniqueidentifier"); - - b.Property("NewValue") - .HasColumnName("NewValue") - .HasColumnType("nvarchar(512)") - .HasMaxLength(512); - - b.Property("OriginalValue") - .HasColumnName("OriginalValue") - .HasColumnType("nvarchar(512)") - .HasMaxLength(512); - - b.Property("PropertyName") + b.Property("Name") .IsRequired() - .HasColumnName("PropertyName") .HasColumnType("nvarchar(128)") .HasMaxLength(128); - b.Property("PropertyTypeFullName") - .IsRequired() - .HasColumnName("PropertyTypeFullName") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - b.Property("TenantId") .HasColumnName("TenantId") .HasColumnType("uniqueidentifier"); b.HasKey("Id"); - b.HasIndex("EntityChangeId"); + b.HasIndex("TenantId", "Name"); - b.ToTable("AbpEntityPropertyChanges"); + b.ToTable("AbpBlobContainers"); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => @@ -322,6 +143,33 @@ namespace Volo.CmsKit.Migrations b.ToTable("AbpClaimTypes"); }); + modelBuilder.Entity("Volo.Abp.Identity.IdentityLinkUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("SourceTenantId") + .HasColumnType("uniqueidentifier"); + + b.Property("SourceUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TargetTenantId") + .HasColumnType("uniqueidentifier"); + + b.Property("TargetUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId") + .IsUnique() + .HasFilter("[SourceTenantId] IS NOT NULL AND [TargetTenantId] IS NOT NULL"); + + b.ToTable("AbpLinkUsers"); + }); + modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => { b.Property("Id") @@ -399,6 +247,81 @@ namespace Volo.CmsKit.Migrations b.ToTable("AbpRoleClaims"); }); + modelBuilder.Entity("Volo.Abp.Identity.IdentitySecurityLog", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Action") + .HasColumnType("nvarchar(96)") + .HasMaxLength(96); + + b.Property("ApplicationName") + .HasColumnType("nvarchar(96)") + .HasMaxLength(96); + + b.Property("BrowserInfo") + .HasColumnType("nvarchar(512)") + .HasMaxLength(512); + + b.Property("ClientId") + .HasColumnType("nvarchar(64)") + .HasMaxLength(64); + + b.Property("ClientIpAddress") + .HasColumnType("nvarchar(64)") + .HasMaxLength(64); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(40)") + .HasMaxLength(40); + + b.Property("CorrelationId") + .HasColumnType("nvarchar(64)") + .HasMaxLength(64); + + b.Property("CreationTime") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); + + b.Property("Identity") + .HasColumnType("nvarchar(96)") + .HasMaxLength(96); + + b.Property("TenantId") + .HasColumnName("TenantId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantName") + .HasColumnType("nvarchar(64)") + .HasMaxLength(64); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserName") + .HasColumnType("nvarchar(256)") + .HasMaxLength(256); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Action"); + + b.HasIndex("TenantId", "ApplicationName"); + + b.HasIndex("TenantId", "Identity"); + + b.HasIndex("TenantId", "UserId"); + + b.ToTable("AbpSecurityLogs"); + }); + modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => { b.Property("Id") @@ -455,6 +378,12 @@ namespace Volo.CmsKit.Migrations .HasColumnType("bit") .HasDefaultValue(false); + b.Property("IsExternal") + .ValueGeneratedOnAdd() + .HasColumnName("IsExternal") + .HasColumnType("bit") + .HasDefaultValue(false); + b.Property("LastModificationTime") .HasColumnName("LastModificationTime") .HasColumnType("datetime2"); @@ -837,7 +766,7 @@ namespace Volo.CmsKit.Migrations b.ToTable("AbpSettings"); }); - modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b => + modelBuilder.Entity("Volo.Blogging.Blogs.Blog", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -865,6 +794,11 @@ namespace Volo.CmsKit.Migrations .HasColumnName("DeletionTime") .HasColumnType("datetime2"); + b.Property("Description") + .HasColumnName("Description") + .HasColumnType("nvarchar(1024)") + .HasMaxLength(1024); + b.Property("ExtraProperties") .HasColumnName("ExtraProperties") .HasColumnType("nvarchar(max)"); @@ -885,123 +819,272 @@ namespace Volo.CmsKit.Migrations b.Property("Name") .IsRequired() - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasColumnName("Name") + .HasColumnType("nvarchar(256)") + .HasMaxLength(256); - b.HasKey("Id"); + b.Property("ShortName") + .IsRequired() + .HasColumnName("ShortName") + .HasColumnType("nvarchar(32)") + .HasMaxLength(32); - b.HasIndex("Name"); + b.HasKey("Id"); - b.ToTable("AbpTenants"); + b.ToTable("BlgBlogs"); }); - modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => + modelBuilder.Entity("Volo.Blogging.Comments.Comment", b => { - b.Property("TenantId") + b.Property("Id") + .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); - b.Property("Name") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(40)") + .HasMaxLength(40); - b.Property("Value") + b.Property("CreationTime") + .HasColumnName("CreationTime") + .HasColumnType("datetime2"); + + b.Property("CreatorId") + .HasColumnName("CreatorId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleterId") + .HasColumnName("DeleterId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletionTime") + .HasColumnName("DeletionTime") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnName("IsDeleted") + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("LastModificationTime") + .HasColumnName("LastModificationTime") + .HasColumnType("datetime2"); + + b.Property("LastModifierId") + .HasColumnName("LastModifierId") + .HasColumnType("uniqueidentifier"); + + b.Property("PostId") + .HasColumnName("PostId") + .HasColumnType("uniqueidentifier"); + + b.Property("RepliedCommentId") + .HasColumnName("RepliedCommentId") + .HasColumnType("uniqueidentifier"); + + b.Property("Text") .IsRequired() + .HasColumnName("Text") .HasColumnType("nvarchar(1024)") .HasMaxLength(1024); - b.HasKey("TenantId", "Name"); + b.HasKey("Id"); + + b.HasIndex("PostId"); - b.ToTable("AbpTenantConnectionStrings"); + b.HasIndex("RepliedCommentId"); + + b.ToTable("BlgComments"); }); - modelBuilder.Entity("Volo.CmsKit.Comments.Comment", b => + modelBuilder.Entity("Volo.Blogging.Posts.Post", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); + b.Property("BlogId") + .HasColumnName("BlogId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(40)") + .HasMaxLength(40); + + b.Property("Content") + .HasColumnName("Content") + .HasColumnType("nvarchar(max)") + .HasMaxLength(1048576); + + b.Property("CoverImage") + .IsRequired() + .HasColumnName("CoverImage") + .HasColumnType("nvarchar(max)"); + b.Property("CreationTime") .HasColumnName("CreationTime") .HasColumnType("datetime2"); - b.Property("CreatorId") + b.Property("CreatorId") .HasColumnName("CreatorId") .HasColumnType("uniqueidentifier"); - b.Property("EntityId") + b.Property("DeleterId") + .HasColumnName("DeleterId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletionTime") + .HasColumnName("DeletionTime") + .HasColumnType("datetime2"); + + b.Property("Description") + .HasColumnName("Description") + .HasColumnType("nvarchar(1000)") + .HasMaxLength(1000); + + b.Property("ExtraProperties") + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnName("IsDeleted") + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("LastModificationTime") + .HasColumnName("LastModificationTime") + .HasColumnType("datetime2"); + + b.Property("LastModifierId") + .HasColumnName("LastModifierId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReadCount") + .HasColumnType("int"); + + b.Property("Title") .IsRequired() - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + .HasColumnName("Title") + .HasColumnType("nvarchar(512)") + .HasMaxLength(512); - b.Property("EntityType") + b.Property("Url") .IsRequired() + .HasColumnName("Url") .HasColumnType("nvarchar(64)") .HasMaxLength(64); - b.Property("RepliedCommentId") + b.HasKey("Id"); + + b.HasIndex("BlogId"); + + b.ToTable("BlgPosts"); + }); + + modelBuilder.Entity("Volo.Blogging.Posts.PostTag", b => + { + b.Property("PostId") + .HasColumnName("PostId") .HasColumnType("uniqueidentifier"); - b.Property("TenantId") - .HasColumnName("TenantId") + b.Property("TagId") + .HasColumnName("TagId") .HasColumnType("uniqueidentifier"); - b.Property("Text") - .IsRequired() - .HasColumnType("nvarchar(512)") - .HasMaxLength(512); + b.Property("CreationTime") + .HasColumnName("CreationTime") + .HasColumnType("datetime2"); - b.HasKey("Id"); + b.Property("CreatorId") + .HasColumnName("CreatorId") + .HasColumnType("uniqueidentifier"); - b.HasIndex("RepliedCommentId"); + b.HasKey("PostId", "TagId"); - b.HasIndex("EntityType", "EntityId"); + b.HasIndex("TagId"); - b.ToTable("CmsComments"); + b.ToTable("BlgPostTags"); }); - modelBuilder.Entity("Volo.CmsKit.Reactions.UserReaction", b => + modelBuilder.Entity("Volo.Blogging.Tagging.Tag", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); + b.Property("BlogId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(40)") + .HasMaxLength(40); + b.Property("CreationTime") .HasColumnName("CreationTime") .HasColumnType("datetime2"); - b.Property("CreatorId") + b.Property("CreatorId") .HasColumnName("CreatorId") .HasColumnType("uniqueidentifier"); - b.Property("EntityId") - .IsRequired() - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + b.Property("DeleterId") + .HasColumnName("DeleterId") + .HasColumnType("uniqueidentifier"); - b.Property("EntityType") - .IsRequired() - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); + b.Property("DeletionTime") + .HasColumnName("DeletionTime") + .HasColumnType("datetime2"); - b.Property("ReactionName") - .IsRequired() - .HasColumnType("nvarchar(32)") - .HasMaxLength(32); + b.Property("Description") + .HasColumnName("Description") + .HasColumnType("nvarchar(512)") + .HasMaxLength(512); - b.Property("TenantId") - .HasColumnName("TenantId") + b.Property("ExtraProperties") + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnName("IsDeleted") + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("LastModificationTime") + .HasColumnName("LastModificationTime") + .HasColumnType("datetime2"); + + b.Property("LastModifierId") + .HasColumnName("LastModifierId") .HasColumnType("uniqueidentifier"); - b.HasKey("Id"); + b.Property("Name") + .IsRequired() + .HasColumnName("Name") + .HasColumnType("nvarchar(64)") + .HasMaxLength(64); - b.HasIndex("EntityType", "EntityId"); + b.Property("UsageCount") + .HasColumnName("UsageCount") + .HasColumnType("int"); - b.HasIndex("CreatorId", "EntityType", "EntityId", "ReactionName"); + b.HasKey("Id"); - b.ToTable("CmsUserReactions"); + b.ToTable("BlgTags"); }); - modelBuilder.Entity("Volo.CmsKit.Users.CmsUser", b => + modelBuilder.Entity("Volo.Blogging.Users.BlogUser", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -1062,32 +1145,14 @@ namespace Volo.CmsKit.Migrations b.HasKey("Id"); - b.ToTable("CmsUsers"); + b.ToTable("BlgUsers"); }); - modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => + modelBuilder.Entity("Volo.Abp.BlobStoring.Database.DatabaseBlob", b => { - b.HasOne("Volo.Abp.AuditLogging.AuditLog", null) - .WithMany("Actions") - .HasForeignKey("AuditLogId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => - { - b.HasOne("Volo.Abp.AuditLogging.AuditLog", null) - .WithMany("EntityChanges") - .HasForeignKey("AuditLogId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => - { - b.HasOne("Volo.Abp.AuditLogging.EntityChange", null) - .WithMany("PropertyChanges") - .HasForeignKey("EntityChangeId") + b.HasOne("Volo.Abp.BlobStoring.Database.DatabaseBlobContainer", null) + .WithMany() + .HasForeignKey("ContainerId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); @@ -1180,11 +1245,39 @@ namespace Volo.CmsKit.Migrations .IsRequired(); }); - modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => + modelBuilder.Entity("Volo.Blogging.Comments.Comment", b => { - b.HasOne("Volo.Abp.TenantManagement.Tenant", null) - .WithMany("ConnectionStrings") - .HasForeignKey("TenantId") + b.HasOne("Volo.Blogging.Posts.Post", null) + .WithMany() + .HasForeignKey("PostId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Blogging.Comments.Comment", null) + .WithMany() + .HasForeignKey("RepliedCommentId"); + }); + + modelBuilder.Entity("Volo.Blogging.Posts.Post", b => + { + b.HasOne("Volo.Blogging.Blogs.Blog", null) + .WithMany() + .HasForeignKey("BlogId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Blogging.Posts.PostTag", b => + { + b.HasOne("Volo.Blogging.Posts.Post", null) + .WithMany("Tags") + .HasForeignKey("PostId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Blogging.Tagging.Tag", null) + .WithMany() + .HasForeignKey("TagId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); diff --git a/modules/blogging/app/Volo.BloggingTestApp.EntityFrameworkCore/Migrations/20201013055410_AddLinkUser.cs b/modules/blogging/app/Volo.BloggingTestApp.EntityFrameworkCore/Migrations/20201013055410_AddLinkUser.cs new file mode 100644 index 0000000000..c06ebf187c --- /dev/null +++ b/modules/blogging/app/Volo.BloggingTestApp.EntityFrameworkCore/Migrations/20201013055410_AddLinkUser.cs @@ -0,0 +1,39 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +namespace Volo.BloggingTestApp.EntityFrameworkCore.Migrations +{ + public partial class AddLinkUser : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "AbpLinkUsers", + columns: table => new + { + Id = table.Column(nullable: false), + SourceUserId = table.Column(nullable: false), + SourceTenantId = table.Column(nullable: true), + TargetUserId = table.Column(nullable: false), + TargetTenantId = table.Column(nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AbpLinkUsers", x => x.Id); + }); + + migrationBuilder.CreateIndex( + name: "IX_AbpLinkUsers_SourceUserId_SourceTenantId_TargetUserId_TargetTenantId", + table: "AbpLinkUsers", + columns: new[] { "SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId" }, + unique: true, + filter: "[SourceTenantId] IS NOT NULL AND [TargetTenantId] IS NOT NULL"); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "AbpLinkUsers"); + } + } +} diff --git a/modules/blogging/app/Volo.BloggingTestApp.EntityFrameworkCore/Migrations/BloggingTestAppDbContextModelSnapshot.cs b/modules/blogging/app/Volo.BloggingTestApp.EntityFrameworkCore/Migrations/BloggingTestAppDbContextModelSnapshot.cs index a52f7e6b95..01be9d7266 100644 --- a/modules/blogging/app/Volo.BloggingTestApp.EntityFrameworkCore/Migrations/BloggingTestAppDbContextModelSnapshot.cs +++ b/modules/blogging/app/Volo.BloggingTestApp.EntityFrameworkCore/Migrations/BloggingTestAppDbContextModelSnapshot.cs @@ -17,7 +17,7 @@ namespace Volo.BloggingTestApp.EntityFrameworkCore.Migrations #pragma warning disable 612, 618 modelBuilder .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) - .HasAnnotation("ProductVersion", "3.1.6") + .HasAnnotation("ProductVersion", "3.1.8") .HasAnnotation("Relational:MaxIdentifierLength", 128) .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); @@ -141,6 +141,33 @@ namespace Volo.BloggingTestApp.EntityFrameworkCore.Migrations b.ToTable("AbpClaimTypes"); }); + modelBuilder.Entity("Volo.Abp.Identity.IdentityLinkUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("SourceTenantId") + .HasColumnType("uniqueidentifier"); + + b.Property("SourceUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TargetTenantId") + .HasColumnType("uniqueidentifier"); + + b.Property("TargetUserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId") + .IsUnique() + .HasFilter("[SourceTenantId] IS NOT NULL AND [TargetTenantId] IS NOT NULL"); + + b.ToTable("AbpLinkUsers"); + }); + modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => { b.Property("Id") diff --git a/modules/blogging/app/Volo.BloggingTestApp.EntityFrameworkCore/Volo.BloggingTestApp.EntityFrameworkCore.csproj b/modules/blogging/app/Volo.BloggingTestApp.EntityFrameworkCore/Volo.BloggingTestApp.EntityFrameworkCore.csproj index b6705f41c8..c20efb9ba9 100644 --- a/modules/blogging/app/Volo.BloggingTestApp.EntityFrameworkCore/Volo.BloggingTestApp.EntityFrameworkCore.csproj +++ b/modules/blogging/app/Volo.BloggingTestApp.EntityFrameworkCore/Volo.BloggingTestApp.EntityFrameworkCore.csproj @@ -3,7 +3,7 @@ - netcoreapp3.1 + net5.0 @@ -16,8 +16,8 @@ - - + + diff --git a/modules/blogging/app/Volo.BloggingTestApp/Volo.BloggingTestApp.csproj b/modules/blogging/app/Volo.BloggingTestApp/Volo.BloggingTestApp.csproj index dc8670d4b7..3e11d85aee 100644 --- a/modules/blogging/app/Volo.BloggingTestApp/Volo.BloggingTestApp.csproj +++ b/modules/blogging/app/Volo.BloggingTestApp/Volo.BloggingTestApp.csproj @@ -3,7 +3,7 @@ - netcoreapp3.1 + net5.0 InProcess diff --git a/modules/blogging/app/Volo.BloggingTestApp/package.json b/modules/blogging/app/Volo.BloggingTestApp/package.json index 759fb11760..44c12f60bd 100644 --- a/modules/blogging/app/Volo.BloggingTestApp/package.json +++ b/modules/blogging/app/Volo.BloggingTestApp/package.json @@ -3,7 +3,7 @@ "name": "volo.blogtestapp", "private": true, "dependencies": { - "@abp/aspnetcore.mvc.ui.theme.basic": "^3.2.0", - "@abp/blogging": "^3.2.0" + "@abp/aspnetcore.mvc.ui.theme.basic": "^3.3.0-rc.1", + "@abp/blogging": "^3.3.0-rc.1" } } \ No newline at end of file diff --git a/modules/blogging/app/Volo.BloggingTestApp/wwwroot/libs/abp/core/abp.js b/modules/blogging/app/Volo.BloggingTestApp/wwwroot/libs/abp/core/abp.js index 20bd92147a..72af4bd106 100644 --- a/modules/blogging/app/Volo.BloggingTestApp/wwwroot/libs/abp/core/abp.js +++ b/modules/blogging/app/Volo.BloggingTestApp/wwwroot/libs/abp/core/abp.js @@ -689,7 +689,7 @@ var abp = abp || {}; abp.security.antiForgery = abp.security.antiForgery || {}; abp.security.antiForgery.tokenCookieName = 'XSRF-TOKEN'; - abp.security.antiForgery.tokenHeaderName = 'X-XSRF-TOKEN'; + abp.security.antiForgery.tokenHeaderName = 'RequestVerificationToken'; abp.security.antiForgery.getToken = function () { return abp.utils.getCookieValue(abp.security.antiForgery.tokenCookieName); diff --git a/modules/blogging/app/Volo.BloggingTestApp/yarn.lock b/modules/blogging/app/Volo.BloggingTestApp/yarn.lock index 0b75f07db8..c72a30781d 100644 --- a/modules/blogging/app/Volo.BloggingTestApp/yarn.lock +++ b/modules/blogging/app/Volo.BloggingTestApp/yarn.lock @@ -2,37 +2,37 @@ # yarn lockfile v1 -"@abp/aspnetcore.mvc.ui.theme.basic@^3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.basic/-/aspnetcore.mvc.ui.theme.basic-3.2.0.tgz#207277419356a14f686421de0ee320fad0d6857f" - integrity sha512-4xn4BPQu9QL3sM47QtPNwOei9/fnRw3dXCL7vlJBCU70jL8911C6D/Pj/CBqCEMMVPI6M4GE7Ls4AwKTvgFeTw== - dependencies: - "@abp/aspnetcore.mvc.ui.theme.shared" "~3.2.0" - -"@abp/aspnetcore.mvc.ui.theme.shared@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.shared/-/aspnetcore.mvc.ui.theme.shared-3.2.0.tgz#bed24c1d28f6e85d58fa963911a09e8b2998c1b6" - integrity sha512-Ap1dPCvL7r31oFyi+3YPviFkDly5FZfWbHq2bURsEbscembpc6DOSfXehvuZ2BjqsZF3n/HX0Y1lX4irUqKqjg== - dependencies: - "@abp/aspnetcore.mvc.ui" "~3.2.0" - "@abp/bootstrap" "~3.2.0" - "@abp/bootstrap-datepicker" "~3.2.0" - "@abp/datatables.net-bs4" "~3.2.0" - "@abp/font-awesome" "~3.2.0" - "@abp/jquery-form" "~3.2.0" - "@abp/jquery-validation-unobtrusive" "~3.2.0" - "@abp/lodash" "~3.2.0" - "@abp/luxon" "~3.2.0" - "@abp/malihu-custom-scrollbar-plugin" "~3.2.0" - "@abp/select2" "~3.2.0" - "@abp/sweetalert" "~3.2.0" - "@abp/timeago" "~3.2.0" - "@abp/toastr" "~3.2.0" - -"@abp/aspnetcore.mvc.ui@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui/-/aspnetcore.mvc.ui-3.2.0.tgz#01f80b9f663f4d95ceac733761833cf4648e92b5" - integrity sha512-NzH1UxEoE/FVT0LLjMNq5eSsiORLe5dE+aKr7jjbaxcuVr7QI7KI9ry6xWAZk+0cbGvsUAY0xqrMxxqiLpskxQ== +"@abp/aspnetcore.mvc.ui.theme.basic@^3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.basic/-/aspnetcore.mvc.ui.theme.basic-3.3.0-rc.1.tgz#0c088d2946f93447388f8e63313b47398fe2f792" + integrity sha512-ysmFoSrEOMn33h6Q3swefEPkT8iABLR1RNLaHzaGOp042+3xJpvnPRC0PjdtFGIx9Mic3EHU7va/by9TGaRP0A== + dependencies: + "@abp/aspnetcore.mvc.ui.theme.shared" "~3.3.0-rc.1" + +"@abp/aspnetcore.mvc.ui.theme.shared@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.shared/-/aspnetcore.mvc.ui.theme.shared-3.3.0-rc.1.tgz#0ebb50effe6d1d8e87d30cf0258c92074c77922f" + integrity sha512-sYmKnmy9Fsh0dT+CPhsxk5UwqUTdWIXDbRCp9ZI+9AKGHHBkuFfTPSi3TBK+Y/vQAOn68JdMVdRLdMJHHUXm+g== + dependencies: + "@abp/aspnetcore.mvc.ui" "~3.3.0-rc.1" + "@abp/bootstrap" "~3.3.0-rc.1" + "@abp/bootstrap-datepicker" "~3.3.0-rc.1" + "@abp/datatables.net-bs4" "~3.3.0-rc.1" + "@abp/font-awesome" "~3.3.0-rc.1" + "@abp/jquery-form" "~3.3.0-rc.1" + "@abp/jquery-validation-unobtrusive" "~3.3.0-rc.1" + "@abp/lodash" "~3.3.0-rc.1" + "@abp/luxon" "~3.3.0-rc.1" + "@abp/malihu-custom-scrollbar-plugin" "~3.3.0-rc.1" + "@abp/select2" "~3.3.0-rc.1" + "@abp/sweetalert" "~3.3.0-rc.1" + "@abp/timeago" "~3.3.0-rc.1" + "@abp/toastr" "~3.3.0-rc.1" + +"@abp/aspnetcore.mvc.ui@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui/-/aspnetcore.mvc.ui-3.3.0-rc.1.tgz#69e0fa91fb1a4f7424e08e076df213fea90c796b" + integrity sha512-c6xNCJlhmz8EasZZeYkC6LoOJLMnfa+JGbtfZF8FXNT4MQVyFpfQtGInGAn6A3TDZR2Y/roJbjXf/D73cxMnGA== dependencies: ansi-colors "^4.1.1" extend-object "^1.0.0" @@ -41,214 +41,214 @@ path "^0.12.7" rimraf "^3.0.2" -"@abp/blogging@^3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/blogging/-/blogging-3.2.0.tgz#a963c128fe92666a1b0f9059c2e9fb6519545ad3" - integrity sha512-+moP5svgo7eo3vegepH9Dff66kXLojtDN/5iLXZeNQmf+7KFmB7eATzIMJgWQzgRm99lBRERiGpQcAtWgpxpVA== +"@abp/blogging@^3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/blogging/-/blogging-3.3.0-rc.1.tgz#ff9301a2df1fa92154720df4b06e15a9f73798a8" + integrity sha512-qiOQXN/APxch7xYVmwvqY3Uz0hsXKRAzvzBgdvSCBCxCIWjB3Idlji3T5vXHkWu+eUt8ZiofhhQeVTajdVAX+Q== dependencies: - "@abp/aspnetcore.mvc.ui.theme.shared" "~3.2.0" - "@abp/owl.carousel" "~3.2.0" - "@abp/prismjs" "~3.2.0" - "@abp/tui-editor" "~3.2.0" + "@abp/aspnetcore.mvc.ui.theme.shared" "~3.3.0-rc.1" + "@abp/owl.carousel" "~3.3.0-rc.1" + "@abp/prismjs" "~3.3.0-rc.1" + "@abp/tui-editor" "~3.3.0-rc.1" -"@abp/bootstrap-datepicker@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/bootstrap-datepicker/-/bootstrap-datepicker-3.2.0.tgz#0a1813d8a84dd6eb6cf647244a4a91900364deb1" - integrity sha512-w7YyA5TRZqGL3qYyArwfrRc4/qWQMT0BPYDOsGMrtPJZDWeZL7WPezuiIvKNdI71BfUq6XiA1+wwMfqjcClZ2g== +"@abp/bootstrap-datepicker@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/bootstrap-datepicker/-/bootstrap-datepicker-3.3.0-rc.1.tgz#4195fa5cf5cc72420c9d87a6c75ec26c3c70b9df" + integrity sha512-6ijmKV6ySrsBwtyQxoe+/Otmhzp1XJy0uGVnY2YhmOHuKzmQeIwfzrMMuLK5XX+Gsub1dYqsawFQNzJYxY2rLA== dependencies: bootstrap-datepicker "^1.9.0" -"@abp/bootstrap@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/bootstrap/-/bootstrap-3.2.0.tgz#d249338b0151734f99b8e366aea6fc17d5ef9b37" - integrity sha512-hx9r7EGb1vJrHAdw3D8Cpudv++hrM4dKoKtOKnQbxGG+Q9vwVS6SKquVxJum+bEZWa1CgXvT6co0IDOlW3pDhg== +"@abp/bootstrap@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/bootstrap/-/bootstrap-3.3.0-rc.1.tgz#e5526e2ad9ac3e3d650d8d805708d083ce5ff6f2" + integrity sha512-TvTPt6e8cGgdH4EdWAadm/8ykE0wke0vYGWWbgNfrNuSb+/Mt/lg0U3nDaNdjDBtstkEPLHKA2lvS5Nb1mNr+w== dependencies: - "@abp/core" "~3.2.0" + "@abp/core" "~3.3.0-rc.1" bootstrap "^4.5.0" bootstrap-v4-rtl "4.4.1-2" -"@abp/clipboard@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/clipboard/-/clipboard-3.2.0.tgz#9c9f95c40639cabe89e6bc86ee0f33c853321225" - integrity sha512-WGonC5Hp4FCUBxevIt180QWIqOri0eO//mlRLBqj7gvo7H6zt5f4t90XKF24ZYWXjx7bCbIQQFt5t5ByeqdcJg== +"@abp/clipboard@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/clipboard/-/clipboard-3.3.0-rc.1.tgz#60e7e84352064c423831edb91e64abb17e56a878" + integrity sha512-7MoVQ0Vgn5UHfWVElO0NFUv4lJfiFRPgmrOfCQTKCFHwLxFWpOEnCp4aRHP2jWi5EgMP4cuSleDtwNSM4Fuqkw== dependencies: - "@abp/core" "~3.2.0" + "@abp/core" "~3.3.0-rc.1" clipboard "^2.0.6" -"@abp/codemirror@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/codemirror/-/codemirror-3.2.0.tgz#b9604d31591522b3c3c140830444422f9742c9d7" - integrity sha512-Qv/+g6NSsv5M3puE3MgF17JPvWytkG4PDMyEX8cf8DOe2FCb3p44EbFyN6sqMY5l621S7fhjIRJfMAZ9I5FcZQ== +"@abp/codemirror@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/codemirror/-/codemirror-3.3.0-rc.1.tgz#b87bf7fd45c80ada335cc3af4bcbb6bac80fe5ed" + integrity sha512-t/9/ogrRN0qqN3pjiYQ4ipbgcuJHZc+5JUOch9jqK7dcW5vTKnDxTdiz0jXLcVIUPCVjbmQetcgtHj1rIDln0Q== dependencies: - "@abp/core" "~3.2.0" + "@abp/core" "~3.3.0-rc.1" codemirror "^5.54.0" -"@abp/core@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/core/-/core-3.2.0.tgz#e9f07bde581b07e1b904bec3b12e0ccfc2a50125" - integrity sha512-X3iWv8QxAbqKJMoTb3vfvwGYmD9uZ+p+zn5q5Hoybyq9fjEcevpkdX7OiLvO8M+NEwCKa81wtkvvM2BnEV6Igg== +"@abp/core@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/core/-/core-3.3.0-rc.1.tgz#b84bdd9526c52f5d76a356d2854256477680ef6e" + integrity sha512-6KQ9Lu/Ok0FaIIRYoUUgnV0DFcT7H080Qfr7QHOv/nI6lviFwtAi/L3IJPCwKSoP+08RklyzvD9zOIdWNWEYMQ== dependencies: - "@abp/utils" "^3.2.0" + "@abp/utils" "^3.3.0-rc.1" -"@abp/datatables.net-bs4@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/datatables.net-bs4/-/datatables.net-bs4-3.2.0.tgz#8551c0ac5e29b037a86b141f41052e7a3038be89" - integrity sha512-i2LVTKAllgzhc21rb0GQ0YHtmOMyCT+6P3ZelqkoLdp56D63rVhdAOHrqjebrEHMehsuCUV2XH908kakXWIPXA== +"@abp/datatables.net-bs4@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/datatables.net-bs4/-/datatables.net-bs4-3.3.0-rc.1.tgz#360cd4e71c8015a3b9045636ec09f11c938685a6" + integrity sha512-7DTaQfpi4bEAKBq3QR4WHYVGGuk2v7zca0Q41XuWeSkcgGwctrJnuAdotNmihDQuwNZgYO+2gFDlVa5DXPELKQ== dependencies: - "@abp/datatables.net" "~3.2.0" + "@abp/datatables.net" "~3.3.0-rc.1" datatables.net-bs4 "^1.10.21" -"@abp/datatables.net@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/datatables.net/-/datatables.net-3.2.0.tgz#effd0ec603b15c0de2d1db993d1416b46f4e3146" - integrity sha512-6UX/WqdlRfb3BQ2cw7LbUlMimDXtx7rHanTTWq44g+Wc8fn4fVcYyo9RWCYYOd2MWm9pElEvuzG1AzaOamjW9Q== +"@abp/datatables.net@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/datatables.net/-/datatables.net-3.3.0-rc.1.tgz#b4fdebc7806036d3d468453772fbc1fd3c3b443f" + integrity sha512-GqeKMFYvQ3Zfx35fKkYhYUpIEWtaW1KWo5VrA+EbyTcbhdrAuAUoDH4QgLpdhtCvNO74M8JFpMVEYHhhUkc0nQ== dependencies: - "@abp/jquery" "~3.2.0" + "@abp/jquery" "~3.3.0-rc.1" datatables.net "^1.10.21" -"@abp/font-awesome@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/font-awesome/-/font-awesome-3.2.0.tgz#ad75daf1c084c2c6a0aeccc092057627ce898652" - integrity sha512-FAWBYWwg2ZtKO+0/lS/bc4YFnR7IehQ2Y+y1srIypgSY/739X4aUWb0YDW1tE0QrrFfQ//f16AyIKPynGl0T5Q== +"@abp/font-awesome@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/font-awesome/-/font-awesome-3.3.0-rc.1.tgz#700ba64f6c8832b812d5d1bca28dd4a487bec833" + integrity sha512-fna7mw5AIuP/FZSx1Ac94ZpGJIwQCZKuiIpmW/vVsFHUSICZ9J+uKa6hg3pt5SLFMAEVvAS6ScJyTkt6Hoc0Mg== dependencies: - "@abp/core" "~3.2.0" + "@abp/core" "~3.3.0-rc.1" "@fortawesome/fontawesome-free" "^5.13.0" -"@abp/highlight.js@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/highlight.js/-/highlight.js-3.2.0.tgz#b180ef024744599a647b942c278eefd58722280e" - integrity sha512-Hcc2RbjqbmIZWaKfWs/6utpwl5Ehc/tMC9hG1m61uXwO+3ISif5MCb1GQ1i2ycFJJRumdHgfm2tFAyGXGS9Z6Q== +"@abp/highlight.js@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/highlight.js/-/highlight.js-3.3.0-rc.1.tgz#08f66a9676e64af00915df686c2817956c45f761" + integrity sha512-kVmRLeKZJ2FSuJyTBB2FkiVqYv1kAXkDn2psHKyUSisc115I+fGDOUKcqkpeQdeLWcMiU4WiWLcH38x+p8GUOg== dependencies: - "@abp/core" "~3.2.0" + "@abp/core" "~3.3.0-rc.1" -"@abp/jquery-form@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/jquery-form/-/jquery-form-3.2.0.tgz#b1b408c0f380c8dfd99c063251f2f1fd86dff14c" - integrity sha512-ZC38zLqlMm67nONg+7ZSC7ExzLZApZ2nZ3/yM6J5LNa7IOgzDGPZgbDRBiwFdC3vIB04LhnNr83YrEvIaUnIzQ== +"@abp/jquery-form@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/jquery-form/-/jquery-form-3.3.0-rc.1.tgz#9fe258a926013618cd99c03aca401c4fc543a72d" + integrity sha512-qLWucASxcgCKdVeix/NXYADhGOWBAR69U/xJj4p/H5i80PuMetH/bWCb9SQbrbyza/Gp4A8JV5vBKNmZFQqSbg== dependencies: - "@abp/jquery" "~3.2.0" + "@abp/jquery" "~3.3.0-rc.1" jquery-form "^4.3.0" -"@abp/jquery-validation-unobtrusive@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-3.2.0.tgz#91b996c743e5b1423a4d01d8808788a4bf4adb32" - integrity sha512-FSkGWvIkZTd2LITbTCdyno0ml30PZZmGYCazowHprh1iuhx0C+yCd9U/kfZ3rLoZAFtWjz0ZUq1Z7G5xXHB97A== +"@abp/jquery-validation-unobtrusive@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-3.3.0-rc.1.tgz#7860d04cfdf152976d780efab88712ae58db8541" + integrity sha512-KAAhLa3MHcwf6CWcAtlW2BQ9WeN8LwzDY6qCz6IVG25zjZfHZ6HEVeMAG3eJ6NRZlAWv2zZK8i8Qma9lKD55gA== dependencies: - "@abp/jquery-validation" "~3.2.0" + "@abp/jquery-validation" "~3.3.0-rc.1" jquery-validation-unobtrusive "^3.2.11" -"@abp/jquery-validation@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/jquery-validation/-/jquery-validation-3.2.0.tgz#1de41e9167b41a956ce2f6e3d6f16d023fccd078" - integrity sha512-FlP7btUvAJfGoi0g8Hm474jlhtweyd/P6dRu2spApUOpKjMyUNFpp/nphmr0iQvx7JGeeaAaUhQJ2v5UKy/Z8w== +"@abp/jquery-validation@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/jquery-validation/-/jquery-validation-3.3.0-rc.1.tgz#ab64965232b30a6ae9ed8660fc9587792bfd619d" + integrity sha512-84ueP2TWJVTYuqIzofrwu8NpWQA/thmQzDzhSnI6dTLrrYzDHLQ7YjwG3/591ka3b6u71diE6UfeyQ4iBiPQ5Q== dependencies: - "@abp/jquery" "~3.2.0" + "@abp/jquery" "~3.3.0-rc.1" jquery-validation "^1.19.2" -"@abp/jquery@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/jquery/-/jquery-3.2.0.tgz#eabc0bafef3cf2b64f672c562bda1f1002b07b7c" - integrity sha512-tlvQ79cqyJ+tXEf17Vdwi6O8yo0+7bmicyy5A/iYyWWJUjXGkiouQHjHkoZ2jeyxwvqn85tBbfjeRumcZdYRMA== +"@abp/jquery@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/jquery/-/jquery-3.3.0-rc.1.tgz#d46f75bfbcc65d4675675c8b69d219a3276afe91" + integrity sha512-NdChW0cbsqWVkB6AvXnTfeNZm2Ai3jmYEO2HJZDYBbWHkMlvQRnQ6oVD6TJvqMDtK066ArL1KAofuSJI2l8njQ== dependencies: - "@abp/core" "~3.2.0" + "@abp/core" "~3.3.0-rc.1" jquery "~3.5.1" -"@abp/lodash@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/lodash/-/lodash-3.2.0.tgz#63e8c51fe9e760d7debca9129bfbf01be8c12d18" - integrity sha512-/rGkJMCgbA0JLkjMXenxz6q0BXRDwvYSLUu7XotNj/cbiHpT5yHHTnWQgwxVUKEVA9xtmYUH1h20J25n/VD/tg== +"@abp/lodash@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/lodash/-/lodash-3.3.0-rc.1.tgz#5cf5462e1df615af5a3f89b8eb6b5d639f134026" + integrity sha512-AXvTAHfKSkQjJ70eStqSq2sXrOHQE+O5/7/k6JuSLbhzfC1paAZeKjLyoGj1hSuyWHQl6tbqDxJQej/NxGucHw== dependencies: - "@abp/core" "~3.2.0" + "@abp/core" "~3.3.0-rc.1" lodash "^4.17.15" -"@abp/luxon@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/luxon/-/luxon-3.2.0.tgz#f94b595d15d78868a4acf73803a9da8609096d39" - integrity sha512-3FF9/W+Smp4FqRJ6F5vNxydXYraVgEUsrOBkaBexVkzT/l3zBkCmrJ8i+Eib8xBXpS6Ku4nmpqbqm1VYhlxKTQ== +"@abp/luxon@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/luxon/-/luxon-3.3.0-rc.1.tgz#e479e7e854ccb9fcd35ce15145d50a9c9581dc50" + integrity sha512-j+1cBVmGtE9Of14i7nwtn9ZSvNa+46beiyOqMVmuH5qjPQTbYUAVFOlL7jVmYswplxUdK1r52n1nOz13oADnwA== dependencies: - "@abp/core" "~3.2.0" + "@abp/core" "~3.3.0-rc.1" luxon "^1.24.1" -"@abp/malihu-custom-scrollbar-plugin@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-3.2.0.tgz#bd11a36a37ec23d38cba116934398696379158b1" - integrity sha512-BYGICB55RsYHmaICnyWdCewo0uEbopmuuUuCJlE+2IY1I4JchSWG2mV//F+jOZQmlOsjYufK70BrQQEIr+ewXw== +"@abp/malihu-custom-scrollbar-plugin@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-3.3.0-rc.1.tgz#3455730273e75ad8d81083989b4f0d4486fe6a2c" + integrity sha512-TePsuZmhX34y9OEPdyYnWuQnx8ntkMXO4gkwciT0fqen+Cs8ty1VFr7uBeFTIo/JTCBtrRehcOjCJiv/F3j1Ug== dependencies: - "@abp/core" "~3.2.0" + "@abp/core" "~3.3.0-rc.1" malihu-custom-scrollbar-plugin "^3.1.5" -"@abp/markdown-it@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/markdown-it/-/markdown-it-3.2.0.tgz#6fdd0b7f43bffce569908ba907c85f351ff89164" - integrity sha512-dGyM9Zdj21Pf08KY/X2lYtDr+lMX8v6TPHMKQVpgkDQ3/fzWDcg0MAr4CWUpg+BGLIhpwDWyKVBI/nQtEG/ihg== +"@abp/markdown-it@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/markdown-it/-/markdown-it-3.3.0-rc.1.tgz#2c98054d88f9835ab13c7fadc4a67799ad00b1dd" + integrity sha512-+CpNxXi3heT+9okHMeTgqbPOBX+E8j23C7zf1SnDXQKudOlA8jJJl1KJ/VoQlXPXIj3ks1RTwKV2ByztGkKU6w== dependencies: - "@abp/core" "~3.2.0" + "@abp/core" "~3.3.0-rc.1" markdown-it "^11.0.0" -"@abp/owl.carousel@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/owl.carousel/-/owl.carousel-3.2.0.tgz#dd4c0c0bd9b4cc033577fd885fa10ab4670ccaf1" - integrity sha512-bxVkjkW1gWTSFuyM1iqHY8esTf+65e/tUZIDf+El0/xLbVkygeAZZtumMnwkizCAzWifBpQSd3QgGkY+wtabVw== +"@abp/owl.carousel@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/owl.carousel/-/owl.carousel-3.3.0-rc.1.tgz#83b34a169642ea9c33fea698953306fc8f05c173" + integrity sha512-SzKkiURZzokEqFL8mA/0xw4Erzj2ui5MsAaX5/q175N9NiWjYnjBxG+ax1/HaOXt/uxV+s/dxLCZJ5luzVl1WQ== dependencies: - "@abp/core" "~3.2.0" + "@abp/core" "~3.3.0-rc.1" owl.carousel "^2.3.4" -"@abp/prismjs@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/prismjs/-/prismjs-3.2.0.tgz#11c7c3023f11097a3eb26d8a0c04f7fa39d9531b" - integrity sha512-OafE/K8rC7popNQDh1J97AtPuxVeAFWh/msfHE3K5nmdYABpl8U7190ITw5COcVjjFLCEONpkkhfN/9ZdAQ8fQ== +"@abp/prismjs@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/prismjs/-/prismjs-3.3.0-rc.1.tgz#08e95a36089a9bbccf2cac9c0667e8632b59f565" + integrity sha512-myLGoT0nrLTCtqKdkqub7gv8DOo+Ccc1FjSAUlZgianoAXYKmbqDdlplS9EVE5CU0T2h5fiN0flf7reTqBn9Vg== dependencies: - "@abp/clipboard" "~3.2.0" - "@abp/core" "~3.2.0" + "@abp/clipboard" "~3.3.0-rc.1" + "@abp/core" "~3.3.0-rc.1" prismjs "^1.20.0" -"@abp/select2@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/select2/-/select2-3.2.0.tgz#729f82695bbfd7ab3d7a90059a198f338037c867" - integrity sha512-83V8jIR8RGFJ3II5G7/bitlv44OHOEENKDrT639OYIxHfgWEWm4CBhcyCnlZJqv6xB2AVDfFPgCPlDGl3x3tmw== +"@abp/select2@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/select2/-/select2-3.3.0-rc.1.tgz#f5e159e13d2b7868a2283fb58af5121f1cc439e3" + integrity sha512-+fZoOHSZMeoMhIKQFrL62B1mwH10zNwsmEfgdLEvSiGNss+yGUmCZKxz9jSbQUr81N/kgew1CMxMjPGfyvpudA== dependencies: - "@abp/core" "~3.2.0" + "@abp/core" "~3.3.0-rc.1" select2 "^4.0.13" -"@abp/sweetalert@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/sweetalert/-/sweetalert-3.2.0.tgz#05040b7276ca2ce62ffc20865d64fb6e0fdb62cb" - integrity sha512-BEgbWwWX2uOsVS/zV6OzlxRBCtSlqeAYdSkmDjQ7pzCthwZXPPFr1o8UXyp9W7GKwDg3lfWTQPkkm+2y587xEw== +"@abp/sweetalert@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/sweetalert/-/sweetalert-3.3.0-rc.1.tgz#72e926a4e44dec851cf5abbe088f27294ccea671" + integrity sha512-IxrpZwgSO6t9DGKzWN3CfBL+lA5n/5Z3JBt6plWSYFSMMNDlxIOPyKcJBUUnlHnpUiqslCIiZRlOcCLTsw13tw== dependencies: - "@abp/core" "~3.2.0" + "@abp/core" "~3.3.0-rc.1" sweetalert "^2.1.2" -"@abp/timeago@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/timeago/-/timeago-3.2.0.tgz#e4a207566c00ccb3161ee91c6f6ce26419e4bbaf" - integrity sha512-VUk8c3hITZfu5aA21XB2Qaw5fwoeAl36Piy0Cb3aUOCFjyGWg19htXxDoT7rzqZ5UJFN0VRYg9MzciXZrFN5/w== +"@abp/timeago@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/timeago/-/timeago-3.3.0-rc.1.tgz#dec80881b231757f3d53fd017631517b0fb79e65" + integrity sha512-YQTE/p5SILYkfDSDbgdScqANb1d2F9a+d1Hijy/lUK6WLUqNkU2qlF1I/aBpJJWD6h8KAVqC5ZmOXZ/WDRSZ3w== dependencies: - "@abp/jquery" "~3.2.0" + "@abp/jquery" "~3.3.0-rc.1" timeago "^1.6.7" -"@abp/toastr@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/toastr/-/toastr-3.2.0.tgz#059e1e1e998207a6f75db2bfe717bec2a0b6d955" - integrity sha512-EKikZVQDaX/uQfc0rWsW2x+UDsO4r80KC3pLvRaLXW5IEwEhTpYwZDUGReOEQ8YEk7UKOXrVJA07mxkbdOzyAw== +"@abp/toastr@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/toastr/-/toastr-3.3.0-rc.1.tgz#56d1c044c528ca12b4d3e37a19f21ec8cf3c3945" + integrity sha512-kTyzlneLWKbRDkSshch5MFIX46+t9SPoOly544KnX1erHmNJfVkBk69XmADeoltKHezbiglE81Kg2KXxVgrAqQ== dependencies: - "@abp/jquery" "~3.2.0" + "@abp/jquery" "~3.3.0-rc.1" toastr "^2.1.4" -"@abp/tui-editor@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/tui-editor/-/tui-editor-3.2.0.tgz#025d3348db0aa9f90aa01c49010a15227e029cc0" - integrity sha512-8dKALM8tRuMdoa1WNOekiwAdDwFAMjyf9wy3FiWLX/oyJOkQhRyxsT455TxQ2yt7pTDiY3DrYyF1xeqwxbGoRw== +"@abp/tui-editor@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/tui-editor/-/tui-editor-3.3.0-rc.1.tgz#ea221a6e87f5472c0d3d12e948420c6d4eb66ea2" + integrity sha512-BkD+ce0j3KkKjSzeOrHK+mu3yym/jvhccF4n2TPSx4+HyF4IENwiWR4KNMM4GxRNssSdTUj/2h9yKxPJm2NHcA== dependencies: - "@abp/codemirror" "~3.2.0" - "@abp/highlight.js" "~3.2.0" - "@abp/jquery" "~3.2.0" - "@abp/markdown-it" "~3.2.0" + "@abp/codemirror" "~3.3.0-rc.1" + "@abp/highlight.js" "~3.3.0-rc.1" + "@abp/jquery" "~3.3.0-rc.1" + "@abp/markdown-it" "~3.3.0-rc.1" tui-editor "^1.4.10" -"@abp/utils@^3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/utils/-/utils-3.2.0.tgz#084918379f2c5e43c1e52291ba6667f3ea3c1f33" - integrity sha512-DZsvF/I5o3r0D1+2B61KvJX78/tJ5uj9MaPq00Z/sxXdqsP2SQQmjhMm+Lb0FgGMK06XIoF9eDgM3Hu0y0H3cQ== +"@abp/utils@^3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/utils/-/utils-3.3.0-rc.1.tgz#2ea2806a42d31dff246478497493e6a8735b3aa3" + integrity sha512-B58plJNC9UF9kigsGLd29qa9nyfIkgV7868NmNgsPwulAhcI1dKUgmSlymN1fBK4zPOVWbzReANVLKbQx13Z1Q== dependencies: just-compare "^1.3.0" diff --git a/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/Blogs/BlogDto.cs b/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/Blogs/BlogDto.cs deleted file mode 100644 index 38b87e277c..0000000000 --- a/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/Blogs/BlogDto.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System; -using Volo.Abp.Application.Dtos; - -namespace Volo.Blogging.Admin.Blogs -{ - public class BlogDto : FullAuditedEntityDto - { - public string Name { get; set; } - - public string ShortName { get; set; } - - public string Description { get; set; } - } -} diff --git a/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/Blogs/CreateBlogDto.cs b/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/Blogs/CreateBlogDto.cs index 5f47311404..605d1b666b 100644 --- a/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/Blogs/CreateBlogDto.cs +++ b/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/Blogs/CreateBlogDto.cs @@ -1,9 +1,13 @@ +using System.ComponentModel.DataAnnotations; + namespace Volo.Blogging.Admin.Blogs { public class CreateBlogDto { + [Required] public string Name { get; set; } + [Required] public string ShortName { get; set; } public string Description { get; set; } diff --git a/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/Blogs/IBlogManagementAppService.cs b/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/Blogs/IBlogManagementAppService.cs index 3554413d5f..35d6d1c97e 100644 --- a/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/Blogs/IBlogManagementAppService.cs +++ b/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/Blogs/IBlogManagementAppService.cs @@ -2,6 +2,8 @@ using System.Threading.Tasks; using Volo.Abp.Application.Dtos; using Volo.Abp.Application.Services; +using Volo.Blogging.Blogs; +using Volo.Blogging.Blogs.Dtos; namespace Volo.Blogging.Admin.Blogs { diff --git a/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/Blogs/UpdateBlogDto.cs b/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/Blogs/UpdateBlogDto.cs index 529ace6e0d..759bdf31aa 100644 --- a/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/Blogs/UpdateBlogDto.cs +++ b/modules/blogging/src/Volo.Blogging.Admin.Application.Contracts/Volo/Blogging/Admin/Blogs/UpdateBlogDto.cs @@ -1,9 +1,13 @@ -namespace Volo.Blogging.Admin.Blogs +using System.ComponentModel.DataAnnotations; + +namespace Volo.Blogging.Admin.Blogs { public class UpdateBlogDto { + [Required] public string Name { get; set; } + [Required] public string ShortName { get; set; } public string Description { get; set; } diff --git a/modules/blogging/src/Volo.Blogging.Admin.Application/Volo/Blogging/Admin/BloggingAdminApplicationAutoMapperProfile.cs b/modules/blogging/src/Volo.Blogging.Admin.Application/Volo/Blogging/Admin/BloggingAdminApplicationAutoMapperProfile.cs index 2f2cf74563..378fc46132 100644 --- a/modules/blogging/src/Volo.Blogging.Admin.Application/Volo/Blogging/Admin/BloggingAdminApplicationAutoMapperProfile.cs +++ b/modules/blogging/src/Volo.Blogging.Admin.Application/Volo/Blogging/Admin/BloggingAdminApplicationAutoMapperProfile.cs @@ -1,6 +1,7 @@ using AutoMapper; using Volo.Blogging.Admin.Blogs; using Volo.Blogging.Blogs; +using Volo.Blogging.Blogs.Dtos; namespace Volo.Blogging.Admin { diff --git a/modules/blogging/src/Volo.Blogging.Admin.Application/Volo/Blogging/Admin/Blogs/BlogManagementAppService.cs b/modules/blogging/src/Volo.Blogging.Admin.Application/Volo/Blogging/Admin/Blogs/BlogManagementAppService.cs index 242ccb6330..b11bd481fe 100644 --- a/modules/blogging/src/Volo.Blogging.Admin.Application/Volo/Blogging/Admin/Blogs/BlogManagementAppService.cs +++ b/modules/blogging/src/Volo.Blogging.Admin.Application/Volo/Blogging/Admin/Blogs/BlogManagementAppService.cs @@ -4,6 +4,7 @@ using System.Collections.Generic; using System.Threading.Tasks; using Volo.Abp.Application.Dtos; using Volo.Blogging.Blogs; +using Volo.Blogging.Blogs.Dtos; namespace Volo.Blogging.Admin.Blogs { @@ -35,10 +36,12 @@ namespace Volo.Blogging.Admin.Blogs [Authorize(BloggingPermissions.Blogs.Create)] public async Task CreateAsync(CreateBlogDto input) { - var newBlog = await _blogRepository.InsertAsync(new Blog(GuidGenerator.Create(), input.Name, input.ShortName) + var newBlog = new Blog(GuidGenerator.Create(), input.Name, input.ShortName) { Description = input.Description - }); + }; + + newBlog = await _blogRepository.InsertAsync(newBlog); return ObjectMapper.Map(newBlog); } diff --git a/modules/blogging/src/Volo.Blogging.Admin.HttpApi/Volo.Blogging.Admin.HttpApi.csproj b/modules/blogging/src/Volo.Blogging.Admin.HttpApi/Volo.Blogging.Admin.HttpApi.csproj index e9435610df..6cef29cffb 100644 --- a/modules/blogging/src/Volo.Blogging.Admin.HttpApi/Volo.Blogging.Admin.HttpApi.csproj +++ b/modules/blogging/src/Volo.Blogging.Admin.HttpApi/Volo.Blogging.Admin.HttpApi.csproj @@ -4,7 +4,7 @@ - netcoreapp3.1 + net5.0 Volo.Blogging.Admin.HttpApi Volo.Blogging.Admin.HttpApi diff --git a/modules/blogging/src/Volo.Blogging.Admin.HttpApi/Volo/Blogging/Admin/BlogManagementController.cs b/modules/blogging/src/Volo.Blogging.Admin.HttpApi/Volo/Blogging/Admin/BlogManagementController.cs index 782a05a42e..815604e871 100644 --- a/modules/blogging/src/Volo.Blogging.Admin.HttpApi/Volo/Blogging/Admin/BlogManagementController.cs +++ b/modules/blogging/src/Volo.Blogging.Admin.HttpApi/Volo/Blogging/Admin/BlogManagementController.cs @@ -5,6 +5,8 @@ using Volo.Abp; using Volo.Abp.Application.Dtos; using Volo.Abp.AspNetCore.Mvc; using Volo.Blogging.Admin.Blogs; +using Volo.Blogging.Blogs; +using Volo.Blogging.Blogs.Dtos; namespace Volo.Blogging.Admin { diff --git a/modules/blogging/src/Volo.Blogging.Admin.Web/AbpBloggingAdminWebAutoMapperProfile.cs b/modules/blogging/src/Volo.Blogging.Admin.Web/AbpBloggingAdminWebAutoMapperProfile.cs index 082daf9bae..35f83cd480 100644 --- a/modules/blogging/src/Volo.Blogging.Admin.Web/AbpBloggingAdminWebAutoMapperProfile.cs +++ b/modules/blogging/src/Volo.Blogging.Admin.Web/AbpBloggingAdminWebAutoMapperProfile.cs @@ -1,6 +1,8 @@ using AutoMapper; using Volo.Blogging.Admin.Blogs; using Volo.Blogging.Admin.Pages.Blogging.Admin.Blogs; +using Volo.Blogging.Blogs; +using Volo.Blogging.Blogs.Dtos; using EditModel = Volo.Blogging.Admin.Pages.Blogging.Admin.Blogs.EditModel; namespace Volo.Blogging.Admin diff --git a/modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/Edit.cshtml.cs b/modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/Edit.cshtml.cs index ae275cd4e6..9c752e6c44 100644 --- a/modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/Edit.cshtml.cs +++ b/modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/Edit.cshtml.cs @@ -6,6 +6,7 @@ using Microsoft.AspNetCore.Mvc; using Volo.Abp.Validation; using Volo.Blogging.Admin.Blogs; using Volo.Blogging.Blogs; +using Volo.Blogging.Blogs.Dtos; namespace Volo.Blogging.Admin.Pages.Blogging.Admin.Blogs { diff --git a/modules/blogging/src/Volo.Blogging.Admin.Web/Volo.Blogging.Admin.Web.csproj b/modules/blogging/src/Volo.Blogging.Admin.Web/Volo.Blogging.Admin.Web.csproj index 96c7d134ba..d56298d39d 100644 --- a/modules/blogging/src/Volo.Blogging.Admin.Web/Volo.Blogging.Admin.Web.csproj +++ b/modules/blogging/src/Volo.Blogging.Admin.Web/Volo.Blogging.Admin.Web.csproj @@ -4,7 +4,7 @@ - netcoreapp3.1 + net5.0 Volo.Blogging.Admin.Web Volo.Blogging.Admin.Web 2.8 @@ -24,7 +24,7 @@ - + diff --git a/modules/blogging/src/Volo.Blogging.Application.Contracts.Shared/FodyWeavers.xml b/modules/blogging/src/Volo.Blogging.Application.Contracts.Shared/FodyWeavers.xml index 00e1d9a1c1..bc5a74a236 100644 --- a/modules/blogging/src/Volo.Blogging.Application.Contracts.Shared/FodyWeavers.xml +++ b/modules/blogging/src/Volo.Blogging.Application.Contracts.Shared/FodyWeavers.xml @@ -1,3 +1,3 @@  - - \ No newline at end of file + + diff --git a/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Blogs/Dtos/BlogDto.cs b/modules/blogging/src/Volo.Blogging.Application.Contracts.Shared/Volo/Blogging/Blogs/Dtos/BlogDto.cs similarity index 99% rename from modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Blogs/Dtos/BlogDto.cs rename to modules/blogging/src/Volo.Blogging.Application.Contracts.Shared/Volo/Blogging/Blogs/Dtos/BlogDto.cs index 45aa60e171..fc72ae0d25 100644 --- a/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Blogs/Dtos/BlogDto.cs +++ b/modules/blogging/src/Volo.Blogging.Application.Contracts.Shared/Volo/Blogging/Blogs/Dtos/BlogDto.cs @@ -11,4 +11,4 @@ namespace Volo.Blogging.Blogs.Dtos public string Description { get; set; } } -} \ No newline at end of file +} diff --git a/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Comments/Dtos/CreateCommentDto.cs b/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Comments/Dtos/CreateCommentDto.cs index 917db5a41f..d2480ecf45 100644 --- a/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Comments/Dtos/CreateCommentDto.cs +++ b/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Comments/Dtos/CreateCommentDto.cs @@ -1,4 +1,5 @@ using System; +using System.ComponentModel.DataAnnotations; namespace Volo.Blogging.Comments.Dtos { @@ -8,6 +9,7 @@ namespace Volo.Blogging.Comments.Dtos public Guid PostId { get; set; } + [Required] public string Text { get; set; } } -} \ No newline at end of file +} diff --git a/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Comments/Dtos/UpdateCommentDto.cs b/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Comments/Dtos/UpdateCommentDto.cs index d501c01bd7..0385feb9b8 100644 --- a/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Comments/Dtos/UpdateCommentDto.cs +++ b/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Comments/Dtos/UpdateCommentDto.cs @@ -1,7 +1,10 @@ -namespace Volo.Blogging.Comments.Dtos +using System.ComponentModel.DataAnnotations; + +namespace Volo.Blogging.Comments.Dtos { public class UpdateCommentDto { + [Required] public string Text { get; set; } } -} \ No newline at end of file +} diff --git a/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Posts/CreatePostDto.cs b/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Posts/CreatePostDto.cs index 96cfbd6859..43dfb02e8c 100644 --- a/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Posts/CreatePostDto.cs +++ b/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Posts/CreatePostDto.cs @@ -19,6 +19,7 @@ namespace Volo.Blogging.Posts [DynamicStringLength(typeof(PostConsts), nameof(PostConsts.MaxUrlLength))] public string Url { get; set; } + [Required] [DynamicStringLength(typeof(PostConsts), nameof(PostConsts.MaxContentLength))] public string Content { get; set; } diff --git a/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Posts/GetPostInput.cs b/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Posts/GetPostInput.cs index 3eb6ff62b0..44b2ea20ec 100644 --- a/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Posts/GetPostInput.cs +++ b/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Posts/GetPostInput.cs @@ -1,11 +1,13 @@  using System; + using System.ComponentModel.DataAnnotations; -namespace Volo.Blogging.Posts + namespace Volo.Blogging.Posts { public class GetPostInput { + [Required] public string Url { get; set; } public Guid BlogId { get; set; } } -} \ No newline at end of file +} diff --git a/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Posts/UpdatePostDto.cs b/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Posts/UpdatePostDto.cs index 16b54fedd6..988d708440 100644 --- a/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Posts/UpdatePostDto.cs +++ b/modules/blogging/src/Volo.Blogging.Application.Contracts/Volo/Blogging/Posts/UpdatePostDto.cs @@ -1,4 +1,5 @@ using System; +using System.ComponentModel.DataAnnotations; using System.Reflection; namespace Volo.Blogging.Posts @@ -7,12 +8,16 @@ namespace Volo.Blogging.Posts { public Guid BlogId { get; set; } + [Required] public string Title { get; set; } + [Required] public string CoverImage { get; set; } + [Required] public string Url { get; set; } + [Required] public string Content { get; set; } public string Description { get; set; } diff --git a/modules/blogging/src/Volo.Blogging.Application/Volo/Blogging/Blogs/BlogAppService.cs b/modules/blogging/src/Volo.Blogging.Application/Volo/Blogging/Blogs/BlogAppService.cs index 1b0a903d2e..ccc1002657 100644 --- a/modules/blogging/src/Volo.Blogging.Application/Volo/Blogging/Blogs/BlogAppService.cs +++ b/modules/blogging/src/Volo.Blogging.Application/Volo/Blogging/Blogs/BlogAppService.cs @@ -2,6 +2,7 @@ using System; using System.Collections.Generic; using System.Threading.Tasks; +using Volo.Abp; using Volo.Abp.Application.Dtos; using Volo.Abp.Domain.Entities; using Volo.Blogging.Blogs.Dtos; @@ -28,6 +29,8 @@ namespace Volo.Blogging.Blogs public async Task GetByShortNameAsync(string shortName) { + Check.NotNullOrWhiteSpace(shortName, nameof(shortName)); + var blog = await _blogRepository.FindByShortNameAsync(shortName); if (blog == null) diff --git a/modules/blogging/src/Volo.Blogging.Application/Volo/Blogging/Files/FileAppService.cs b/modules/blogging/src/Volo.Blogging.Application/Volo/Blogging/Files/FileAppService.cs index 8fdd12858d..e7cc7047e0 100644 --- a/modules/blogging/src/Volo.Blogging.Application/Volo/Blogging/Files/FileAppService.cs +++ b/modules/blogging/src/Volo.Blogging.Application/Volo/Blogging/Files/FileAppService.cs @@ -34,7 +34,7 @@ namespace Volo.Blogging.Files { if (input.Bytes.IsNullOrEmpty()) { - ThrowValidationException("Bytes can not be null or empty!", "Bytes"); + ThrowValidationException("Bytes of file can not be null or empty!", "Bytes"); } if (input.Bytes.Length > BloggingWebConsts.FileUploading.MaxFileSize) @@ -44,7 +44,7 @@ namespace Volo.Blogging.Files if (!ImageFormatHelper.IsValidImage(input.Bytes, FileUploadConsts.AllowedImageUploadFormats)) { - throw new UserFriendlyException("Not a valid image format!"); + throw new UserFriendlyException("Invalid image format!"); } var uniqueFileName = GenerateUniqueFileName(Path.GetExtension(input.Name)); diff --git a/modules/blogging/src/Volo.Blogging.Application/Volo/Blogging/Posts/PostAppService.cs b/modules/blogging/src/Volo.Blogging.Application/Volo/Blogging/Posts/PostAppService.cs index 798bf8e39f..70007a0c56 100644 --- a/modules/blogging/src/Volo.Blogging.Application/Volo/Blogging/Posts/PostAppService.cs +++ b/modules/blogging/src/Volo.Blogging.Application/Volo/Blogging/Posts/PostAppService.cs @@ -187,9 +187,7 @@ namespace Volo.Blogging.Posts private async Task RenameUrlIfItAlreadyExistAsync(Guid blogId, string url, Post existingPost = null) { - var postList = await _postRepository.GetListAsync(); - - if (postList.Where(p => p.Url == url).WhereIf(existingPost != null, p => existingPost.Id != p.Id).Any()) + if (await _postRepository.IsPostUrlInUseAsync(blogId, url, existingPost?.Id)) { return url + "-" + Guid.NewGuid().ToString().Substring(0, 5); } diff --git a/modules/blogging/src/Volo.Blogging.Domain.Shared/Volo.Blogging.Domain.Shared.csproj b/modules/blogging/src/Volo.Blogging.Domain.Shared/Volo.Blogging.Domain.Shared.csproj index ca7dcca8a2..83ba117670 100644 --- a/modules/blogging/src/Volo.Blogging.Domain.Shared/Volo.Blogging.Domain.Shared.csproj +++ b/modules/blogging/src/Volo.Blogging.Domain.Shared/Volo.Blogging.Domain.Shared.csproj @@ -21,7 +21,7 @@ - + diff --git a/modules/blogging/src/Volo.Blogging.Domain.Shared/Volo/Blogging/Localization/Resources/hu.json b/modules/blogging/src/Volo.Blogging.Domain.Shared/Volo/Blogging/Localization/Resources/hu.json new file mode 100644 index 0000000000..9422bf8bdd --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.Domain.Shared/Volo/Blogging/Localization/Resources/hu.json @@ -0,0 +1,59 @@ +{ + "culture": "hu", + "texts": { + "Menu:Blogs": "Blog", + "Menu:BlogManagement": "Blogolás", + "Permission:Management": "Menedzsment", + "Permission:Edit": "Szerkesztés", + "Permission:Create": "Létrehozás", + "Permission:Delete": "Törlés", + "Permission:Blogging": "Blog", + "Permission:Blogs": "Blogok", + "Permission:Posts": "Bejegyzések", + "Permission:Tags": "Címkék", + "Permission:Comments": "Megjelgyzések", + "Title": "Cím", + "Delete": "Törlés", + "Reply": "Válasz", + "ReplyTo": "Válasz erre: {0}", + "ContinueReading": "Olvasás folytatása", + "DaysAgo": "{0} napja", + "YearsAgo": "{0} éve", + "MonthsAgo": "{0} hónapja", + "WeeksAgo": "{0} hete", + "MinutesAgo": "{0} perce", + "SecondsAgo": "{0} másodperceo", + "HoursAgo": "{0} órája", + "Now": "most", + "Content": "Tartalom", + "SeeAll": "Összes nézése", + "PopularTags": "Népszerű címkék", + "WiewsWithCount": "{0} megtekintés", + "LastPosts": "Utolsó bejegyzés", + "LeaveComment": "Hozzászólás elhagyása", + "TagsInThisArticle": "Címkék ebben a cikkben", + "Posts": "Bejegyzések", + "Edit": "Szerkesztés", + "BLOG": "BLOG", + "CommentDeletionWarningMessage": "A megjegyzés törlésre kerül.", + "PostDeletionWarningMessage": "A bejegyzés törlődik.", + "BlogDeletionWarningMessage": "A blog törlődik.", + "AreYouSure": "Biztos ebben?", + "CommentWithCount": "{0} hozzászólás", + "Comment": "Hozzászólás", + "ShareOnTwitter": "Megosztás a Twitteren", + "CoverImage": "Borítókép", + "CreateANewPost": "Új bejegyzés létrehozása", + "CreateANewBlog": "Új blog létrehozása", + "WhatIsNew": "Milyen újdonságok vannak?", + "Name": "Név", + "ShortName": "Rövid név", + "CreationTime": "Létrehozás ideje", + "Description": "Leírás", + "Blogs": "Blogok", + "Tags": "Címkék", + "ShareOn": "Ossza meg", + "TitleLengthWarning": "A címméret 60 karakter alatt maradjon hogy SEO-barát legyen!" + } + } + \ No newline at end of file diff --git a/modules/blogging/src/Volo.Blogging.Domain/Volo/Blogging/Posts/IPostRepository.cs b/modules/blogging/src/Volo.Blogging.Domain/Volo/Blogging/Posts/IPostRepository.cs index 02bd68a6b0..9a49590015 100644 --- a/modules/blogging/src/Volo.Blogging.Domain/Volo/Blogging/Posts/IPostRepository.cs +++ b/modules/blogging/src/Volo.Blogging.Domain/Volo/Blogging/Posts/IPostRepository.cs @@ -9,8 +9,10 @@ namespace Volo.Blogging.Posts { Task> GetPostsByBlogId(Guid id); + Task IsPostUrlInUseAsync(Guid blogId, string url, Guid? excludingPostId = null); + Task GetPostByUrl(Guid blogId, string url); - + Task> GetOrderedList(Guid blogId,bool descending = false); } } diff --git a/modules/blogging/src/Volo.Blogging.EntityFrameworkCore/Volo.Blogging.EntityFrameworkCore.csproj b/modules/blogging/src/Volo.Blogging.EntityFrameworkCore/Volo.Blogging.EntityFrameworkCore.csproj index e74e255466..b8808cd8c9 100644 --- a/modules/blogging/src/Volo.Blogging.EntityFrameworkCore/Volo.Blogging.EntityFrameworkCore.csproj +++ b/modules/blogging/src/Volo.Blogging.EntityFrameworkCore/Volo.Blogging.EntityFrameworkCore.csproj @@ -4,7 +4,7 @@ - netstandard2.0 + netstandard2.1 Volo.Blogging.EntityFrameworkCore Volo.Blogging.EntityFrameworkCore diff --git a/modules/blogging/src/Volo.Blogging.EntityFrameworkCore/Volo/Blogging/Posts/EfCorePostRepository.cs b/modules/blogging/src/Volo.Blogging.EntityFrameworkCore/Volo/Blogging/Posts/EfCorePostRepository.cs index 01c5652902..b152f3ae7d 100644 --- a/modules/blogging/src/Volo.Blogging.EntityFrameworkCore/Volo/Blogging/Posts/EfCorePostRepository.cs +++ b/modules/blogging/src/Volo.Blogging.EntityFrameworkCore/Volo/Blogging/Posts/EfCorePostRepository.cs @@ -23,6 +23,18 @@ namespace Volo.Blogging.Posts return await DbSet.Where(p => p.BlogId == id).OrderByDescending(p=>p.CreationTime).ToListAsync(); } + public Task IsPostUrlInUseAsync(Guid blogId, string url, Guid? excludingPostId = null) + { + var query = DbSet.Where(p => blogId == p.BlogId && p.Url == url); + + if (excludingPostId != null) + { + query = query.Where(p => excludingPostId != p.Id); + } + + return query.AnyAsync(); + } + public async Task GetPostByUrl(Guid blogId, string url) { var post = await DbSet.FirstOrDefaultAsync(p => p.BlogId == blogId && p.Url == url); diff --git a/modules/blogging/src/Volo.Blogging.HttpApi/Volo.Blogging.HttpApi.csproj b/modules/blogging/src/Volo.Blogging.HttpApi/Volo.Blogging.HttpApi.csproj index 94181bf3fe..636faa7238 100644 --- a/modules/blogging/src/Volo.Blogging.HttpApi/Volo.Blogging.HttpApi.csproj +++ b/modules/blogging/src/Volo.Blogging.HttpApi/Volo.Blogging.HttpApi.csproj @@ -4,7 +4,7 @@ - netcoreapp3.1 + net5.0 Volo.Blogging.HttpApi Volo.Blogging.HttpApi diff --git a/modules/blogging/src/Volo.Blogging.MongoDB/Volo/Blogging/Posts/MongoPostRepository.cs b/modules/blogging/src/Volo.Blogging.MongoDB/Volo/Blogging/Posts/MongoPostRepository.cs index 2e7675a898..e12e5f29de 100644 --- a/modules/blogging/src/Volo.Blogging.MongoDB/Volo/Blogging/Posts/MongoPostRepository.cs +++ b/modules/blogging/src/Volo.Blogging.MongoDB/Volo/Blogging/Posts/MongoPostRepository.cs @@ -21,6 +21,19 @@ namespace Volo.Blogging.Posts return await GetMongoQueryable().Where(p => p.BlogId == id).OrderByDescending(p => p.CreationTime).ToListAsync(); } + + public Task IsPostUrlInUseAsync(Guid blogId, string url, Guid? excludingPostId = null) + { + var query = GetMongoQueryable().Where(p => blogId == p.BlogId && p.Url == url); + + if (excludingPostId != null) + { + query = query.Where(p => excludingPostId != p.Id); + } + + return query.AnyAsync(); + } + public async Task GetPostByUrl(Guid blogId, string url) { var post = await GetMongoQueryable().FirstOrDefaultAsync(p => p.BlogId == blogId && p.Url == url); @@ -36,12 +49,12 @@ namespace Volo.Blogging.Posts public async Task> GetOrderedList(Guid blogId, bool @descending = false) { var query = GetMongoQueryable().Where(x => x.BlogId == blogId); - + if (!descending) { return await query.OrderBy(x => x.CreationTime).ToListAsync(); } - + return await query.OrderByDescending(x => x.CreationTime).ToListAsync(); } } diff --git a/modules/blogging/src/Volo.Blogging.Web/Volo.Blogging.Web.csproj b/modules/blogging/src/Volo.Blogging.Web/Volo.Blogging.Web.csproj index 473cfb11c9..20341c2df5 100644 --- a/modules/blogging/src/Volo.Blogging.Web/Volo.Blogging.Web.csproj +++ b/modules/blogging/src/Volo.Blogging.Web/Volo.Blogging.Web.csproj @@ -1,10 +1,10 @@ - + - netcoreapp3.1 + net5.0 Volo.Blogging.Web Volo.Blogging.Web 2.8 @@ -24,7 +24,7 @@ - + diff --git a/modules/blogging/test/Volo.Blogging.Application.Tests/Volo.Blogging.Application.Tests.csproj b/modules/blogging/test/Volo.Blogging.Application.Tests/Volo.Blogging.Application.Tests.csproj index 6776e49a9c..84b74c8765 100644 --- a/modules/blogging/test/Volo.Blogging.Application.Tests/Volo.Blogging.Application.Tests.csproj +++ b/modules/blogging/test/Volo.Blogging.Application.Tests/Volo.Blogging.Application.Tests.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1 + net5.0 diff --git a/modules/blogging/test/Volo.Blogging.Domain.Tests/Volo.Blogging.Domain.Tests.csproj b/modules/blogging/test/Volo.Blogging.Domain.Tests/Volo.Blogging.Domain.Tests.csproj index 776aaf3657..c7fe644a59 100644 --- a/modules/blogging/test/Volo.Blogging.Domain.Tests/Volo.Blogging.Domain.Tests.csproj +++ b/modules/blogging/test/Volo.Blogging.Domain.Tests/Volo.Blogging.Domain.Tests.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1 + net5.0 diff --git a/modules/blogging/test/Volo.Blogging.EntityFrameworkCore.Tests/Volo.Blogging.EntityFrameworkCore.Tests.csproj b/modules/blogging/test/Volo.Blogging.EntityFrameworkCore.Tests/Volo.Blogging.EntityFrameworkCore.Tests.csproj index 01d894de88..87c20fdc04 100644 --- a/modules/blogging/test/Volo.Blogging.EntityFrameworkCore.Tests/Volo.Blogging.EntityFrameworkCore.Tests.csproj +++ b/modules/blogging/test/Volo.Blogging.EntityFrameworkCore.Tests/Volo.Blogging.EntityFrameworkCore.Tests.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1 + net5.0 @@ -10,7 +10,7 @@ - + diff --git a/modules/blogging/test/Volo.Blogging.MongoDB.Tests/Volo.Blogging.MongoDB.Tests.csproj b/modules/blogging/test/Volo.Blogging.MongoDB.Tests/Volo.Blogging.MongoDB.Tests.csproj index 8eaa145ee7..1301bbf1bd 100644 --- a/modules/blogging/test/Volo.Blogging.MongoDB.Tests/Volo.Blogging.MongoDB.Tests.csproj +++ b/modules/blogging/test/Volo.Blogging.MongoDB.Tests/Volo.Blogging.MongoDB.Tests.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1 + net5.0 diff --git a/modules/blogging/test/Volo.Blogging.TestBase/Volo.Blogging.TestBase.csproj b/modules/blogging/test/Volo.Blogging.TestBase/Volo.Blogging.TestBase.csproj index eae856530d..51f3e258b2 100644 --- a/modules/blogging/test/Volo.Blogging.TestBase/Volo.Blogging.TestBase.csproj +++ b/modules/blogging/test/Volo.Blogging.TestBase/Volo.Blogging.TestBase.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1 + net5.0 diff --git a/modules/client-simulation/demo/Volo.ClientSimulation.Demo/Volo.ClientSimulation.Demo.csproj b/modules/client-simulation/demo/Volo.ClientSimulation.Demo/Volo.ClientSimulation.Demo.csproj index 1173121c3c..cc27807686 100644 --- a/modules/client-simulation/demo/Volo.ClientSimulation.Demo/Volo.ClientSimulation.Demo.csproj +++ b/modules/client-simulation/demo/Volo.ClientSimulation.Demo/Volo.ClientSimulation.Demo.csproj @@ -4,7 +4,7 @@ - netcoreapp3.1 + net5.0 true diff --git a/modules/client-simulation/demo/Volo.ClientSimulation.Demo/package.json b/modules/client-simulation/demo/Volo.ClientSimulation.Demo/package.json index 32abffa6e8..3bdc67f5b4 100644 --- a/modules/client-simulation/demo/Volo.ClientSimulation.Demo/package.json +++ b/modules/client-simulation/demo/Volo.ClientSimulation.Demo/package.json @@ -3,6 +3,6 @@ "name": "client-simulation-web", "private": true, "dependencies": { - "@abp/aspnetcore.mvc.ui.theme.basic": "^3.2.0" + "@abp/aspnetcore.mvc.ui.theme.basic": "^3.3.0-rc.1" } } \ No newline at end of file diff --git a/modules/client-simulation/demo/Volo.ClientSimulation.Demo/wwwroot/libs/abp/core/abp.js b/modules/client-simulation/demo/Volo.ClientSimulation.Demo/wwwroot/libs/abp/core/abp.js index 20bd92147a..72af4bd106 100644 --- a/modules/client-simulation/demo/Volo.ClientSimulation.Demo/wwwroot/libs/abp/core/abp.js +++ b/modules/client-simulation/demo/Volo.ClientSimulation.Demo/wwwroot/libs/abp/core/abp.js @@ -689,7 +689,7 @@ var abp = abp || {}; abp.security.antiForgery = abp.security.antiForgery || {}; abp.security.antiForgery.tokenCookieName = 'XSRF-TOKEN'; - abp.security.antiForgery.tokenHeaderName = 'X-XSRF-TOKEN'; + abp.security.antiForgery.tokenHeaderName = 'RequestVerificationToken'; abp.security.antiForgery.getToken = function () { return abp.utils.getCookieValue(abp.security.antiForgery.tokenCookieName); diff --git a/modules/client-simulation/demo/Volo.ClientSimulation.Demo/yarn.lock b/modules/client-simulation/demo/Volo.ClientSimulation.Demo/yarn.lock index 972be20fa8..ee05b4fef3 100644 --- a/modules/client-simulation/demo/Volo.ClientSimulation.Demo/yarn.lock +++ b/modules/client-simulation/demo/Volo.ClientSimulation.Demo/yarn.lock @@ -2,37 +2,37 @@ # yarn lockfile v1 -"@abp/aspnetcore.mvc.ui.theme.basic@^3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.basic/-/aspnetcore.mvc.ui.theme.basic-3.2.0.tgz#207277419356a14f686421de0ee320fad0d6857f" - integrity sha512-4xn4BPQu9QL3sM47QtPNwOei9/fnRw3dXCL7vlJBCU70jL8911C6D/Pj/CBqCEMMVPI6M4GE7Ls4AwKTvgFeTw== - dependencies: - "@abp/aspnetcore.mvc.ui.theme.shared" "~3.2.0" - -"@abp/aspnetcore.mvc.ui.theme.shared@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.shared/-/aspnetcore.mvc.ui.theme.shared-3.2.0.tgz#bed24c1d28f6e85d58fa963911a09e8b2998c1b6" - integrity sha512-Ap1dPCvL7r31oFyi+3YPviFkDly5FZfWbHq2bURsEbscembpc6DOSfXehvuZ2BjqsZF3n/HX0Y1lX4irUqKqjg== - dependencies: - "@abp/aspnetcore.mvc.ui" "~3.2.0" - "@abp/bootstrap" "~3.2.0" - "@abp/bootstrap-datepicker" "~3.2.0" - "@abp/datatables.net-bs4" "~3.2.0" - "@abp/font-awesome" "~3.2.0" - "@abp/jquery-form" "~3.2.0" - "@abp/jquery-validation-unobtrusive" "~3.2.0" - "@abp/lodash" "~3.2.0" - "@abp/luxon" "~3.2.0" - "@abp/malihu-custom-scrollbar-plugin" "~3.2.0" - "@abp/select2" "~3.2.0" - "@abp/sweetalert" "~3.2.0" - "@abp/timeago" "~3.2.0" - "@abp/toastr" "~3.2.0" - -"@abp/aspnetcore.mvc.ui@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui/-/aspnetcore.mvc.ui-3.2.0.tgz#01f80b9f663f4d95ceac733761833cf4648e92b5" - integrity sha512-NzH1UxEoE/FVT0LLjMNq5eSsiORLe5dE+aKr7jjbaxcuVr7QI7KI9ry6xWAZk+0cbGvsUAY0xqrMxxqiLpskxQ== +"@abp/aspnetcore.mvc.ui.theme.basic@^3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.basic/-/aspnetcore.mvc.ui.theme.basic-3.3.0-rc.1.tgz#0c088d2946f93447388f8e63313b47398fe2f792" + integrity sha512-ysmFoSrEOMn33h6Q3swefEPkT8iABLR1RNLaHzaGOp042+3xJpvnPRC0PjdtFGIx9Mic3EHU7va/by9TGaRP0A== + dependencies: + "@abp/aspnetcore.mvc.ui.theme.shared" "~3.3.0-rc.1" + +"@abp/aspnetcore.mvc.ui.theme.shared@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.shared/-/aspnetcore.mvc.ui.theme.shared-3.3.0-rc.1.tgz#0ebb50effe6d1d8e87d30cf0258c92074c77922f" + integrity sha512-sYmKnmy9Fsh0dT+CPhsxk5UwqUTdWIXDbRCp9ZI+9AKGHHBkuFfTPSi3TBK+Y/vQAOn68JdMVdRLdMJHHUXm+g== + dependencies: + "@abp/aspnetcore.mvc.ui" "~3.3.0-rc.1" + "@abp/bootstrap" "~3.3.0-rc.1" + "@abp/bootstrap-datepicker" "~3.3.0-rc.1" + "@abp/datatables.net-bs4" "~3.3.0-rc.1" + "@abp/font-awesome" "~3.3.0-rc.1" + "@abp/jquery-form" "~3.3.0-rc.1" + "@abp/jquery-validation-unobtrusive" "~3.3.0-rc.1" + "@abp/lodash" "~3.3.0-rc.1" + "@abp/luxon" "~3.3.0-rc.1" + "@abp/malihu-custom-scrollbar-plugin" "~3.3.0-rc.1" + "@abp/select2" "~3.3.0-rc.1" + "@abp/sweetalert" "~3.3.0-rc.1" + "@abp/timeago" "~3.3.0-rc.1" + "@abp/toastr" "~3.3.0-rc.1" + +"@abp/aspnetcore.mvc.ui@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui/-/aspnetcore.mvc.ui-3.3.0-rc.1.tgz#69e0fa91fb1a4f7424e08e076df213fea90c796b" + integrity sha512-c6xNCJlhmz8EasZZeYkC6LoOJLMnfa+JGbtfZF8FXNT4MQVyFpfQtGInGAn6A3TDZR2Y/roJbjXf/D73cxMnGA== dependencies: ansi-colors "^4.1.1" extend-object "^1.0.0" @@ -41,145 +41,145 @@ path "^0.12.7" rimraf "^3.0.2" -"@abp/bootstrap-datepicker@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/bootstrap-datepicker/-/bootstrap-datepicker-3.2.0.tgz#0a1813d8a84dd6eb6cf647244a4a91900364deb1" - integrity sha512-w7YyA5TRZqGL3qYyArwfrRc4/qWQMT0BPYDOsGMrtPJZDWeZL7WPezuiIvKNdI71BfUq6XiA1+wwMfqjcClZ2g== +"@abp/bootstrap-datepicker@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/bootstrap-datepicker/-/bootstrap-datepicker-3.3.0-rc.1.tgz#4195fa5cf5cc72420c9d87a6c75ec26c3c70b9df" + integrity sha512-6ijmKV6ySrsBwtyQxoe+/Otmhzp1XJy0uGVnY2YhmOHuKzmQeIwfzrMMuLK5XX+Gsub1dYqsawFQNzJYxY2rLA== dependencies: bootstrap-datepicker "^1.9.0" -"@abp/bootstrap@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/bootstrap/-/bootstrap-3.2.0.tgz#d249338b0151734f99b8e366aea6fc17d5ef9b37" - integrity sha512-hx9r7EGb1vJrHAdw3D8Cpudv++hrM4dKoKtOKnQbxGG+Q9vwVS6SKquVxJum+bEZWa1CgXvT6co0IDOlW3pDhg== +"@abp/bootstrap@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/bootstrap/-/bootstrap-3.3.0-rc.1.tgz#e5526e2ad9ac3e3d650d8d805708d083ce5ff6f2" + integrity sha512-TvTPt6e8cGgdH4EdWAadm/8ykE0wke0vYGWWbgNfrNuSb+/Mt/lg0U3nDaNdjDBtstkEPLHKA2lvS5Nb1mNr+w== dependencies: - "@abp/core" "~3.2.0" + "@abp/core" "~3.3.0-rc.1" bootstrap "^4.5.0" bootstrap-v4-rtl "4.4.1-2" -"@abp/core@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/core/-/core-3.2.0.tgz#e9f07bde581b07e1b904bec3b12e0ccfc2a50125" - integrity sha512-X3iWv8QxAbqKJMoTb3vfvwGYmD9uZ+p+zn5q5Hoybyq9fjEcevpkdX7OiLvO8M+NEwCKa81wtkvvM2BnEV6Igg== +"@abp/core@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/core/-/core-3.3.0-rc.1.tgz#b84bdd9526c52f5d76a356d2854256477680ef6e" + integrity sha512-6KQ9Lu/Ok0FaIIRYoUUgnV0DFcT7H080Qfr7QHOv/nI6lviFwtAi/L3IJPCwKSoP+08RklyzvD9zOIdWNWEYMQ== dependencies: - "@abp/utils" "^3.2.0" + "@abp/utils" "^3.3.0-rc.1" -"@abp/datatables.net-bs4@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/datatables.net-bs4/-/datatables.net-bs4-3.2.0.tgz#8551c0ac5e29b037a86b141f41052e7a3038be89" - integrity sha512-i2LVTKAllgzhc21rb0GQ0YHtmOMyCT+6P3ZelqkoLdp56D63rVhdAOHrqjebrEHMehsuCUV2XH908kakXWIPXA== +"@abp/datatables.net-bs4@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/datatables.net-bs4/-/datatables.net-bs4-3.3.0-rc.1.tgz#360cd4e71c8015a3b9045636ec09f11c938685a6" + integrity sha512-7DTaQfpi4bEAKBq3QR4WHYVGGuk2v7zca0Q41XuWeSkcgGwctrJnuAdotNmihDQuwNZgYO+2gFDlVa5DXPELKQ== dependencies: - "@abp/datatables.net" "~3.2.0" + "@abp/datatables.net" "~3.3.0-rc.1" datatables.net-bs4 "^1.10.21" -"@abp/datatables.net@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/datatables.net/-/datatables.net-3.2.0.tgz#effd0ec603b15c0de2d1db993d1416b46f4e3146" - integrity sha512-6UX/WqdlRfb3BQ2cw7LbUlMimDXtx7rHanTTWq44g+Wc8fn4fVcYyo9RWCYYOd2MWm9pElEvuzG1AzaOamjW9Q== +"@abp/datatables.net@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/datatables.net/-/datatables.net-3.3.0-rc.1.tgz#b4fdebc7806036d3d468453772fbc1fd3c3b443f" + integrity sha512-GqeKMFYvQ3Zfx35fKkYhYUpIEWtaW1KWo5VrA+EbyTcbhdrAuAUoDH4QgLpdhtCvNO74M8JFpMVEYHhhUkc0nQ== dependencies: - "@abp/jquery" "~3.2.0" + "@abp/jquery" "~3.3.0-rc.1" datatables.net "^1.10.21" -"@abp/font-awesome@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/font-awesome/-/font-awesome-3.2.0.tgz#ad75daf1c084c2c6a0aeccc092057627ce898652" - integrity sha512-FAWBYWwg2ZtKO+0/lS/bc4YFnR7IehQ2Y+y1srIypgSY/739X4aUWb0YDW1tE0QrrFfQ//f16AyIKPynGl0T5Q== +"@abp/font-awesome@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/font-awesome/-/font-awesome-3.3.0-rc.1.tgz#700ba64f6c8832b812d5d1bca28dd4a487bec833" + integrity sha512-fna7mw5AIuP/FZSx1Ac94ZpGJIwQCZKuiIpmW/vVsFHUSICZ9J+uKa6hg3pt5SLFMAEVvAS6ScJyTkt6Hoc0Mg== dependencies: - "@abp/core" "~3.2.0" + "@abp/core" "~3.3.0-rc.1" "@fortawesome/fontawesome-free" "^5.13.0" -"@abp/jquery-form@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/jquery-form/-/jquery-form-3.2.0.tgz#b1b408c0f380c8dfd99c063251f2f1fd86dff14c" - integrity sha512-ZC38zLqlMm67nONg+7ZSC7ExzLZApZ2nZ3/yM6J5LNa7IOgzDGPZgbDRBiwFdC3vIB04LhnNr83YrEvIaUnIzQ== +"@abp/jquery-form@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/jquery-form/-/jquery-form-3.3.0-rc.1.tgz#9fe258a926013618cd99c03aca401c4fc543a72d" + integrity sha512-qLWucASxcgCKdVeix/NXYADhGOWBAR69U/xJj4p/H5i80PuMetH/bWCb9SQbrbyza/Gp4A8JV5vBKNmZFQqSbg== dependencies: - "@abp/jquery" "~3.2.0" + "@abp/jquery" "~3.3.0-rc.1" jquery-form "^4.3.0" -"@abp/jquery-validation-unobtrusive@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-3.2.0.tgz#91b996c743e5b1423a4d01d8808788a4bf4adb32" - integrity sha512-FSkGWvIkZTd2LITbTCdyno0ml30PZZmGYCazowHprh1iuhx0C+yCd9U/kfZ3rLoZAFtWjz0ZUq1Z7G5xXHB97A== +"@abp/jquery-validation-unobtrusive@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-3.3.0-rc.1.tgz#7860d04cfdf152976d780efab88712ae58db8541" + integrity sha512-KAAhLa3MHcwf6CWcAtlW2BQ9WeN8LwzDY6qCz6IVG25zjZfHZ6HEVeMAG3eJ6NRZlAWv2zZK8i8Qma9lKD55gA== dependencies: - "@abp/jquery-validation" "~3.2.0" + "@abp/jquery-validation" "~3.3.0-rc.1" jquery-validation-unobtrusive "^3.2.11" -"@abp/jquery-validation@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/jquery-validation/-/jquery-validation-3.2.0.tgz#1de41e9167b41a956ce2f6e3d6f16d023fccd078" - integrity sha512-FlP7btUvAJfGoi0g8Hm474jlhtweyd/P6dRu2spApUOpKjMyUNFpp/nphmr0iQvx7JGeeaAaUhQJ2v5UKy/Z8w== +"@abp/jquery-validation@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/jquery-validation/-/jquery-validation-3.3.0-rc.1.tgz#ab64965232b30a6ae9ed8660fc9587792bfd619d" + integrity sha512-84ueP2TWJVTYuqIzofrwu8NpWQA/thmQzDzhSnI6dTLrrYzDHLQ7YjwG3/591ka3b6u71diE6UfeyQ4iBiPQ5Q== dependencies: - "@abp/jquery" "~3.2.0" + "@abp/jquery" "~3.3.0-rc.1" jquery-validation "^1.19.2" -"@abp/jquery@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/jquery/-/jquery-3.2.0.tgz#eabc0bafef3cf2b64f672c562bda1f1002b07b7c" - integrity sha512-tlvQ79cqyJ+tXEf17Vdwi6O8yo0+7bmicyy5A/iYyWWJUjXGkiouQHjHkoZ2jeyxwvqn85tBbfjeRumcZdYRMA== +"@abp/jquery@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/jquery/-/jquery-3.3.0-rc.1.tgz#d46f75bfbcc65d4675675c8b69d219a3276afe91" + integrity sha512-NdChW0cbsqWVkB6AvXnTfeNZm2Ai3jmYEO2HJZDYBbWHkMlvQRnQ6oVD6TJvqMDtK066ArL1KAofuSJI2l8njQ== dependencies: - "@abp/core" "~3.2.0" + "@abp/core" "~3.3.0-rc.1" jquery "~3.5.1" -"@abp/lodash@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/lodash/-/lodash-3.2.0.tgz#63e8c51fe9e760d7debca9129bfbf01be8c12d18" - integrity sha512-/rGkJMCgbA0JLkjMXenxz6q0BXRDwvYSLUu7XotNj/cbiHpT5yHHTnWQgwxVUKEVA9xtmYUH1h20J25n/VD/tg== +"@abp/lodash@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/lodash/-/lodash-3.3.0-rc.1.tgz#5cf5462e1df615af5a3f89b8eb6b5d639f134026" + integrity sha512-AXvTAHfKSkQjJ70eStqSq2sXrOHQE+O5/7/k6JuSLbhzfC1paAZeKjLyoGj1hSuyWHQl6tbqDxJQej/NxGucHw== dependencies: - "@abp/core" "~3.2.0" + "@abp/core" "~3.3.0-rc.1" lodash "^4.17.15" -"@abp/luxon@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/luxon/-/luxon-3.2.0.tgz#f94b595d15d78868a4acf73803a9da8609096d39" - integrity sha512-3FF9/W+Smp4FqRJ6F5vNxydXYraVgEUsrOBkaBexVkzT/l3zBkCmrJ8i+Eib8xBXpS6Ku4nmpqbqm1VYhlxKTQ== +"@abp/luxon@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/luxon/-/luxon-3.3.0-rc.1.tgz#e479e7e854ccb9fcd35ce15145d50a9c9581dc50" + integrity sha512-j+1cBVmGtE9Of14i7nwtn9ZSvNa+46beiyOqMVmuH5qjPQTbYUAVFOlL7jVmYswplxUdK1r52n1nOz13oADnwA== dependencies: - "@abp/core" "~3.2.0" + "@abp/core" "~3.3.0-rc.1" luxon "^1.24.1" -"@abp/malihu-custom-scrollbar-plugin@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-3.2.0.tgz#bd11a36a37ec23d38cba116934398696379158b1" - integrity sha512-BYGICB55RsYHmaICnyWdCewo0uEbopmuuUuCJlE+2IY1I4JchSWG2mV//F+jOZQmlOsjYufK70BrQQEIr+ewXw== +"@abp/malihu-custom-scrollbar-plugin@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-3.3.0-rc.1.tgz#3455730273e75ad8d81083989b4f0d4486fe6a2c" + integrity sha512-TePsuZmhX34y9OEPdyYnWuQnx8ntkMXO4gkwciT0fqen+Cs8ty1VFr7uBeFTIo/JTCBtrRehcOjCJiv/F3j1Ug== dependencies: - "@abp/core" "~3.2.0" + "@abp/core" "~3.3.0-rc.1" malihu-custom-scrollbar-plugin "^3.1.5" -"@abp/select2@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/select2/-/select2-3.2.0.tgz#729f82695bbfd7ab3d7a90059a198f338037c867" - integrity sha512-83V8jIR8RGFJ3II5G7/bitlv44OHOEENKDrT639OYIxHfgWEWm4CBhcyCnlZJqv6xB2AVDfFPgCPlDGl3x3tmw== +"@abp/select2@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/select2/-/select2-3.3.0-rc.1.tgz#f5e159e13d2b7868a2283fb58af5121f1cc439e3" + integrity sha512-+fZoOHSZMeoMhIKQFrL62B1mwH10zNwsmEfgdLEvSiGNss+yGUmCZKxz9jSbQUr81N/kgew1CMxMjPGfyvpudA== dependencies: - "@abp/core" "~3.2.0" + "@abp/core" "~3.3.0-rc.1" select2 "^4.0.13" -"@abp/sweetalert@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/sweetalert/-/sweetalert-3.2.0.tgz#05040b7276ca2ce62ffc20865d64fb6e0fdb62cb" - integrity sha512-BEgbWwWX2uOsVS/zV6OzlxRBCtSlqeAYdSkmDjQ7pzCthwZXPPFr1o8UXyp9W7GKwDg3lfWTQPkkm+2y587xEw== +"@abp/sweetalert@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/sweetalert/-/sweetalert-3.3.0-rc.1.tgz#72e926a4e44dec851cf5abbe088f27294ccea671" + integrity sha512-IxrpZwgSO6t9DGKzWN3CfBL+lA5n/5Z3JBt6plWSYFSMMNDlxIOPyKcJBUUnlHnpUiqslCIiZRlOcCLTsw13tw== dependencies: - "@abp/core" "~3.2.0" + "@abp/core" "~3.3.0-rc.1" sweetalert "^2.1.2" -"@abp/timeago@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/timeago/-/timeago-3.2.0.tgz#e4a207566c00ccb3161ee91c6f6ce26419e4bbaf" - integrity sha512-VUk8c3hITZfu5aA21XB2Qaw5fwoeAl36Piy0Cb3aUOCFjyGWg19htXxDoT7rzqZ5UJFN0VRYg9MzciXZrFN5/w== +"@abp/timeago@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/timeago/-/timeago-3.3.0-rc.1.tgz#dec80881b231757f3d53fd017631517b0fb79e65" + integrity sha512-YQTE/p5SILYkfDSDbgdScqANb1d2F9a+d1Hijy/lUK6WLUqNkU2qlF1I/aBpJJWD6h8KAVqC5ZmOXZ/WDRSZ3w== dependencies: - "@abp/jquery" "~3.2.0" + "@abp/jquery" "~3.3.0-rc.1" timeago "^1.6.7" -"@abp/toastr@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/toastr/-/toastr-3.2.0.tgz#059e1e1e998207a6f75db2bfe717bec2a0b6d955" - integrity sha512-EKikZVQDaX/uQfc0rWsW2x+UDsO4r80KC3pLvRaLXW5IEwEhTpYwZDUGReOEQ8YEk7UKOXrVJA07mxkbdOzyAw== +"@abp/toastr@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/toastr/-/toastr-3.3.0-rc.1.tgz#56d1c044c528ca12b4d3e37a19f21ec8cf3c3945" + integrity sha512-kTyzlneLWKbRDkSshch5MFIX46+t9SPoOly544KnX1erHmNJfVkBk69XmADeoltKHezbiglE81Kg2KXxVgrAqQ== dependencies: - "@abp/jquery" "~3.2.0" + "@abp/jquery" "~3.3.0-rc.1" toastr "^2.1.4" -"@abp/utils@^3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/utils/-/utils-3.2.0.tgz#084918379f2c5e43c1e52291ba6667f3ea3c1f33" - integrity sha512-DZsvF/I5o3r0D1+2B61KvJX78/tJ5uj9MaPq00Z/sxXdqsP2SQQmjhMm+Lb0FgGMK06XIoF9eDgM3Hu0y0H3cQ== +"@abp/utils@^3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/utils/-/utils-3.3.0-rc.1.tgz#2ea2806a42d31dff246478497493e6a8735b3aa3" + integrity sha512-B58plJNC9UF9kigsGLd29qa9nyfIkgV7868NmNgsPwulAhcI1dKUgmSlymN1fBK4zPOVWbzReANVLKbQx13Z1Q== dependencies: just-compare "^1.3.0" diff --git a/modules/client-simulation/src/Volo.ClientSimulation.Web/Volo.ClientSimulation.Web.csproj b/modules/client-simulation/src/Volo.ClientSimulation.Web/Volo.ClientSimulation.Web.csproj index 217b57addf..d16564c12e 100644 --- a/modules/client-simulation/src/Volo.ClientSimulation.Web/Volo.ClientSimulation.Web.csproj +++ b/modules/client-simulation/src/Volo.ClientSimulation.Web/Volo.ClientSimulation.Web.csproj @@ -4,7 +4,7 @@ - netcoreapp3.1 + net5.0 Volo.ClientSimulation.Web Volo.ClientSimulation.Web Library diff --git a/modules/client-simulation/src/Volo.ClientSimulation/Volo.ClientSimulation.csproj b/modules/client-simulation/src/Volo.ClientSimulation/Volo.ClientSimulation.csproj index 3876e7deb5..432cb2adb3 100644 --- a/modules/client-simulation/src/Volo.ClientSimulation/Volo.ClientSimulation.csproj +++ b/modules/client-simulation/src/Volo.ClientSimulation/Volo.ClientSimulation.csproj @@ -4,7 +4,7 @@ - netcoreapp3.1 + net5.0 Volo.ClientSimulation Volo.ClientSimulation diff --git a/modules/cms-kit/angular/package.json b/modules/cms-kit/angular/package.json index 3c883b278e..295d02b8ed 100644 --- a/modules/cms-kit/angular/package.json +++ b/modules/cms-kit/angular/package.json @@ -15,11 +15,11 @@ }, "private": true, "dependencies": { - "@abp/ng.account": "~3.2.0", - "@abp/ng.identity": "~3.2.0", - "@abp/ng.setting-management": "~3.2.0", - "@abp/ng.tenant-management": "~3.2.0", - "@abp/ng.theme.basic": "~3.2.0", + "@abp/ng.account": "~3.3.0-rc.1", + "@abp/ng.identity": "~3.3.0-rc.1", + "@abp/ng.setting-management": "~3.3.0-rc.1", + "@abp/ng.tenant-management": "~3.3.0-rc.1", + "@abp/ng.theme.basic": "~3.3.0-rc.1", "@angular/animations": "~10.0.0", "@angular/common": "~10.0.0", "@angular/compiler": "~10.0.0", diff --git a/modules/cms-kit/angular/projects/cms-kit/package.json b/modules/cms-kit/angular/projects/cms-kit/package.json index 1806d9cad0..783b86c93b 100644 --- a/modules/cms-kit/angular/projects/cms-kit/package.json +++ b/modules/cms-kit/angular/projects/cms-kit/package.json @@ -4,8 +4,8 @@ "peerDependencies": { "@angular/common": "^9.1.11", "@angular/core": "^9.1.11", - "@abp/ng.core": ">=3.2.0", - "@abp/ng.theme.shared": ">=3.2.0" + "@abp/ng.core": ">=3.3.0-rc.1", + "@abp/ng.theme.shared": ">=3.3.0-rc.1" }, "dependencies": { "tslib": "^2.0.0" diff --git a/modules/cms-kit/host/Volo.CmsKit.HttpApi.Host/CmsKitHttpApiHostModule.cs b/modules/cms-kit/host/Volo.CmsKit.HttpApi.Host/CmsKitHttpApiHostModule.cs index fe9df5d7b6..a4660cd675 100644 --- a/modules/cms-kit/host/Volo.CmsKit.HttpApi.Host/CmsKitHttpApiHostModule.cs +++ b/modules/cms-kit/host/Volo.CmsKit.HttpApi.Host/CmsKitHttpApiHostModule.cs @@ -96,6 +96,7 @@ namespace Volo.CmsKit { options.Languages.Add(new LanguageInfo("cs", "cs", "Čeština")); options.Languages.Add(new LanguageInfo("en", "en", "English")); + options.Languages.Add(new LanguageInfo("hu", "hu", "Magyar")); options.Languages.Add(new LanguageInfo("pt-BR", "pt-BR", "Português")); options.Languages.Add(new LanguageInfo("ru", "ru", "Русский")); options.Languages.Add(new LanguageInfo("tr", "tr", "Türkçe")); diff --git a/modules/cms-kit/host/Volo.CmsKit.HttpApi.Host/Volo.CmsKit.HttpApi.Host.csproj b/modules/cms-kit/host/Volo.CmsKit.HttpApi.Host/Volo.CmsKit.HttpApi.Host.csproj index 99b2d0f1c0..a81b088c54 100644 --- a/modules/cms-kit/host/Volo.CmsKit.HttpApi.Host/Volo.CmsKit.HttpApi.Host.csproj +++ b/modules/cms-kit/host/Volo.CmsKit.HttpApi.Host/Volo.CmsKit.HttpApi.Host.csproj @@ -3,7 +3,7 @@ - netcoreapp3.1 + net5.0 Volo.CmsKit true Volo.CmsKit-c2d31439-b723-48e2-b061-5ebd7aeb6010 @@ -14,17 +14,18 @@ - - - - - - - - - - - + + + + + + + + + + + + diff --git a/modules/cms-kit/host/Volo.CmsKit.IdentityServer/CmsKitIdentityServerModule.cs b/modules/cms-kit/host/Volo.CmsKit.IdentityServer/CmsKitIdentityServerModule.cs index 5fbff7cfeb..8b44d69b8e 100644 --- a/modules/cms-kit/host/Volo.CmsKit.IdentityServer/CmsKitIdentityServerModule.cs +++ b/modules/cms-kit/host/Volo.CmsKit.IdentityServer/CmsKitIdentityServerModule.cs @@ -104,6 +104,7 @@ namespace Volo.CmsKit { options.Languages.Add(new LanguageInfo("cs", "cs", "Čeština")); options.Languages.Add(new LanguageInfo("en", "en", "English")); + options.Languages.Add(new LanguageInfo("hu", "hu", "Magyar")); options.Languages.Add(new LanguageInfo("pt-BR", "pt-BR", "Português")); options.Languages.Add(new LanguageInfo("ru", "ru", "Русский")); options.Languages.Add(new LanguageInfo("tr", "tr", "Türkçe")); diff --git a/modules/cms-kit/host/Volo.CmsKit.IdentityServer/Migrations/20200810022553_Initial.Designer.cs b/modules/cms-kit/host/Volo.CmsKit.IdentityServer/Migrations/20201013055450_Initial.Designer.cs similarity index 99% rename from modules/cms-kit/host/Volo.CmsKit.IdentityServer/Migrations/20200810022553_Initial.Designer.cs rename to modules/cms-kit/host/Volo.CmsKit.IdentityServer/Migrations/20201013055450_Initial.Designer.cs index aac1944355..5b4befc45a 100644 --- a/modules/cms-kit/host/Volo.CmsKit.IdentityServer/Migrations/20200810022553_Initial.Designer.cs +++ b/modules/cms-kit/host/Volo.CmsKit.IdentityServer/Migrations/20201013055450_Initial.Designer.cs @@ -11,7 +11,7 @@ using Volo.CmsKit.EntityFrameworkCore; namespace Volo.CmsKit.Migrations { [DbContext(typeof(IdentityServerHostMigrationsDbContext))] - [Migration("20200810022553_Initial")] + [Migration("20201013055450_Initial")] partial class Initial { protected override void BuildTargetModel(ModelBuilder modelBuilder) @@ -19,7 +19,7 @@ namespace Volo.CmsKit.Migrations #pragma warning disable 612, 618 modelBuilder .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) - .HasAnnotation("ProductVersion", "3.1.6") + .HasAnnotation("ProductVersion", "3.1.8") .HasAnnotation("Relational:MaxIdentifierLength", 128) .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); diff --git a/modules/cms-kit/host/Volo.CmsKit.IdentityServer/Migrations/20200810022553_Initial.cs b/modules/cms-kit/host/Volo.CmsKit.IdentityServer/Migrations/20201013055450_Initial.cs similarity index 100% rename from modules/cms-kit/host/Volo.CmsKit.IdentityServer/Migrations/20200810022553_Initial.cs rename to modules/cms-kit/host/Volo.CmsKit.IdentityServer/Migrations/20201013055450_Initial.cs diff --git a/modules/cms-kit/host/Volo.CmsKit.IdentityServer/Migrations/IdentityServerHostMigrationsDbContextModelSnapshot.cs b/modules/cms-kit/host/Volo.CmsKit.IdentityServer/Migrations/IdentityServerHostMigrationsDbContextModelSnapshot.cs index b4249161b0..c4003cc3a0 100644 --- a/modules/cms-kit/host/Volo.CmsKit.IdentityServer/Migrations/IdentityServerHostMigrationsDbContextModelSnapshot.cs +++ b/modules/cms-kit/host/Volo.CmsKit.IdentityServer/Migrations/IdentityServerHostMigrationsDbContextModelSnapshot.cs @@ -17,7 +17,7 @@ namespace Volo.CmsKit.Migrations #pragma warning disable 612, 618 modelBuilder .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) - .HasAnnotation("ProductVersion", "3.1.6") + .HasAnnotation("ProductVersion", "3.1.8") .HasAnnotation("Relational:MaxIdentifierLength", 128) .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); 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 a32a6c2dc3..c62935e032 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 @@ -1,7 +1,7 @@ - netcoreapp3.1 + net5.0 Volo.CmsKit true Volo.CmsKit-c2d31439-b723-48e2-b061-5ebd7aeb6010 @@ -11,33 +11,34 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/modules/cms-kit/host/Volo.CmsKit.IdentityServer/package.json b/modules/cms-kit/host/Volo.CmsKit.IdentityServer/package.json index fba2dab1f7..1e03efad38 100644 --- a/modules/cms-kit/host/Volo.CmsKit.IdentityServer/package.json +++ b/modules/cms-kit/host/Volo.CmsKit.IdentityServer/package.json @@ -3,6 +3,6 @@ "name": "my-app-identityserver", "private": true, "dependencies": { - "@abp/aspnetcore.mvc.ui.theme.basic": "^3.2.0" + "@abp/aspnetcore.mvc.ui.theme.basic": "^3.3.0-rc.1" } } \ No newline at end of file diff --git a/modules/cms-kit/host/Volo.CmsKit.IdentityServer/wwwroot/libs/abp/core/abp.js b/modules/cms-kit/host/Volo.CmsKit.IdentityServer/wwwroot/libs/abp/core/abp.js index 20bd92147a..72af4bd106 100644 --- a/modules/cms-kit/host/Volo.CmsKit.IdentityServer/wwwroot/libs/abp/core/abp.js +++ b/modules/cms-kit/host/Volo.CmsKit.IdentityServer/wwwroot/libs/abp/core/abp.js @@ -689,7 +689,7 @@ var abp = abp || {}; abp.security.antiForgery = abp.security.antiForgery || {}; abp.security.antiForgery.tokenCookieName = 'XSRF-TOKEN'; - abp.security.antiForgery.tokenHeaderName = 'X-XSRF-TOKEN'; + abp.security.antiForgery.tokenHeaderName = 'RequestVerificationToken'; abp.security.antiForgery.getToken = function () { return abp.utils.getCookieValue(abp.security.antiForgery.tokenCookieName); diff --git a/modules/cms-kit/host/Volo.CmsKit.IdentityServer/yarn.lock b/modules/cms-kit/host/Volo.CmsKit.IdentityServer/yarn.lock index 72a5d2df3d..ec897ce443 100644 --- a/modules/cms-kit/host/Volo.CmsKit.IdentityServer/yarn.lock +++ b/modules/cms-kit/host/Volo.CmsKit.IdentityServer/yarn.lock @@ -2,37 +2,37 @@ # yarn lockfile v1 -"@abp/aspnetcore.mvc.ui.theme.basic@^3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.basic/-/aspnetcore.mvc.ui.theme.basic-3.2.0.tgz#207277419356a14f686421de0ee320fad0d6857f" - integrity sha512-4xn4BPQu9QL3sM47QtPNwOei9/fnRw3dXCL7vlJBCU70jL8911C6D/Pj/CBqCEMMVPI6M4GE7Ls4AwKTvgFeTw== - dependencies: - "@abp/aspnetcore.mvc.ui.theme.shared" "~3.2.0" - -"@abp/aspnetcore.mvc.ui.theme.shared@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.shared/-/aspnetcore.mvc.ui.theme.shared-3.2.0.tgz#bed24c1d28f6e85d58fa963911a09e8b2998c1b6" - integrity sha512-Ap1dPCvL7r31oFyi+3YPviFkDly5FZfWbHq2bURsEbscembpc6DOSfXehvuZ2BjqsZF3n/HX0Y1lX4irUqKqjg== - dependencies: - "@abp/aspnetcore.mvc.ui" "~3.2.0" - "@abp/bootstrap" "~3.2.0" - "@abp/bootstrap-datepicker" "~3.2.0" - "@abp/datatables.net-bs4" "~3.2.0" - "@abp/font-awesome" "~3.2.0" - "@abp/jquery-form" "~3.2.0" - "@abp/jquery-validation-unobtrusive" "~3.2.0" - "@abp/lodash" "~3.2.0" - "@abp/luxon" "~3.2.0" - "@abp/malihu-custom-scrollbar-plugin" "~3.2.0" - "@abp/select2" "~3.2.0" - "@abp/sweetalert" "~3.2.0" - "@abp/timeago" "~3.2.0" - "@abp/toastr" "~3.2.0" - -"@abp/aspnetcore.mvc.ui@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui/-/aspnetcore.mvc.ui-3.2.0.tgz#01f80b9f663f4d95ceac733761833cf4648e92b5" - integrity sha512-NzH1UxEoE/FVT0LLjMNq5eSsiORLe5dE+aKr7jjbaxcuVr7QI7KI9ry6xWAZk+0cbGvsUAY0xqrMxxqiLpskxQ== +"@abp/aspnetcore.mvc.ui.theme.basic@^3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.basic/-/aspnetcore.mvc.ui.theme.basic-3.3.0-rc.1.tgz#0c088d2946f93447388f8e63313b47398fe2f792" + integrity sha512-ysmFoSrEOMn33h6Q3swefEPkT8iABLR1RNLaHzaGOp042+3xJpvnPRC0PjdtFGIx9Mic3EHU7va/by9TGaRP0A== + dependencies: + "@abp/aspnetcore.mvc.ui.theme.shared" "~3.3.0-rc.1" + +"@abp/aspnetcore.mvc.ui.theme.shared@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.shared/-/aspnetcore.mvc.ui.theme.shared-3.3.0-rc.1.tgz#0ebb50effe6d1d8e87d30cf0258c92074c77922f" + integrity sha512-sYmKnmy9Fsh0dT+CPhsxk5UwqUTdWIXDbRCp9ZI+9AKGHHBkuFfTPSi3TBK+Y/vQAOn68JdMVdRLdMJHHUXm+g== + dependencies: + "@abp/aspnetcore.mvc.ui" "~3.3.0-rc.1" + "@abp/bootstrap" "~3.3.0-rc.1" + "@abp/bootstrap-datepicker" "~3.3.0-rc.1" + "@abp/datatables.net-bs4" "~3.3.0-rc.1" + "@abp/font-awesome" "~3.3.0-rc.1" + "@abp/jquery-form" "~3.3.0-rc.1" + "@abp/jquery-validation-unobtrusive" "~3.3.0-rc.1" + "@abp/lodash" "~3.3.0-rc.1" + "@abp/luxon" "~3.3.0-rc.1" + "@abp/malihu-custom-scrollbar-plugin" "~3.3.0-rc.1" + "@abp/select2" "~3.3.0-rc.1" + "@abp/sweetalert" "~3.3.0-rc.1" + "@abp/timeago" "~3.3.0-rc.1" + "@abp/toastr" "~3.3.0-rc.1" + +"@abp/aspnetcore.mvc.ui@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui/-/aspnetcore.mvc.ui-3.3.0-rc.1.tgz#69e0fa91fb1a4f7424e08e076df213fea90c796b" + integrity sha512-c6xNCJlhmz8EasZZeYkC6LoOJLMnfa+JGbtfZF8FXNT4MQVyFpfQtGInGAn6A3TDZR2Y/roJbjXf/D73cxMnGA== dependencies: ansi-colors "^4.1.1" extend-object "^1.0.0" @@ -41,145 +41,145 @@ path "^0.12.7" rimraf "^3.0.2" -"@abp/bootstrap-datepicker@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/bootstrap-datepicker/-/bootstrap-datepicker-3.2.0.tgz#0a1813d8a84dd6eb6cf647244a4a91900364deb1" - integrity sha512-w7YyA5TRZqGL3qYyArwfrRc4/qWQMT0BPYDOsGMrtPJZDWeZL7WPezuiIvKNdI71BfUq6XiA1+wwMfqjcClZ2g== +"@abp/bootstrap-datepicker@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/bootstrap-datepicker/-/bootstrap-datepicker-3.3.0-rc.1.tgz#4195fa5cf5cc72420c9d87a6c75ec26c3c70b9df" + integrity sha512-6ijmKV6ySrsBwtyQxoe+/Otmhzp1XJy0uGVnY2YhmOHuKzmQeIwfzrMMuLK5XX+Gsub1dYqsawFQNzJYxY2rLA== dependencies: bootstrap-datepicker "^1.9.0" -"@abp/bootstrap@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/bootstrap/-/bootstrap-3.2.0.tgz#d249338b0151734f99b8e366aea6fc17d5ef9b37" - integrity sha512-hx9r7EGb1vJrHAdw3D8Cpudv++hrM4dKoKtOKnQbxGG+Q9vwVS6SKquVxJum+bEZWa1CgXvT6co0IDOlW3pDhg== +"@abp/bootstrap@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/bootstrap/-/bootstrap-3.3.0-rc.1.tgz#e5526e2ad9ac3e3d650d8d805708d083ce5ff6f2" + integrity sha512-TvTPt6e8cGgdH4EdWAadm/8ykE0wke0vYGWWbgNfrNuSb+/Mt/lg0U3nDaNdjDBtstkEPLHKA2lvS5Nb1mNr+w== dependencies: - "@abp/core" "~3.2.0" + "@abp/core" "~3.3.0-rc.1" bootstrap "^4.5.0" bootstrap-v4-rtl "4.4.1-2" -"@abp/core@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/core/-/core-3.2.0.tgz#e9f07bde581b07e1b904bec3b12e0ccfc2a50125" - integrity sha512-X3iWv8QxAbqKJMoTb3vfvwGYmD9uZ+p+zn5q5Hoybyq9fjEcevpkdX7OiLvO8M+NEwCKa81wtkvvM2BnEV6Igg== +"@abp/core@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/core/-/core-3.3.0-rc.1.tgz#b84bdd9526c52f5d76a356d2854256477680ef6e" + integrity sha512-6KQ9Lu/Ok0FaIIRYoUUgnV0DFcT7H080Qfr7QHOv/nI6lviFwtAi/L3IJPCwKSoP+08RklyzvD9zOIdWNWEYMQ== dependencies: - "@abp/utils" "^3.2.0" + "@abp/utils" "^3.3.0-rc.1" -"@abp/datatables.net-bs4@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/datatables.net-bs4/-/datatables.net-bs4-3.2.0.tgz#8551c0ac5e29b037a86b141f41052e7a3038be89" - integrity sha512-i2LVTKAllgzhc21rb0GQ0YHtmOMyCT+6P3ZelqkoLdp56D63rVhdAOHrqjebrEHMehsuCUV2XH908kakXWIPXA== +"@abp/datatables.net-bs4@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/datatables.net-bs4/-/datatables.net-bs4-3.3.0-rc.1.tgz#360cd4e71c8015a3b9045636ec09f11c938685a6" + integrity sha512-7DTaQfpi4bEAKBq3QR4WHYVGGuk2v7zca0Q41XuWeSkcgGwctrJnuAdotNmihDQuwNZgYO+2gFDlVa5DXPELKQ== dependencies: - "@abp/datatables.net" "~3.2.0" + "@abp/datatables.net" "~3.3.0-rc.1" datatables.net-bs4 "^1.10.21" -"@abp/datatables.net@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/datatables.net/-/datatables.net-3.2.0.tgz#effd0ec603b15c0de2d1db993d1416b46f4e3146" - integrity sha512-6UX/WqdlRfb3BQ2cw7LbUlMimDXtx7rHanTTWq44g+Wc8fn4fVcYyo9RWCYYOd2MWm9pElEvuzG1AzaOamjW9Q== +"@abp/datatables.net@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/datatables.net/-/datatables.net-3.3.0-rc.1.tgz#b4fdebc7806036d3d468453772fbc1fd3c3b443f" + integrity sha512-GqeKMFYvQ3Zfx35fKkYhYUpIEWtaW1KWo5VrA+EbyTcbhdrAuAUoDH4QgLpdhtCvNO74M8JFpMVEYHhhUkc0nQ== dependencies: - "@abp/jquery" "~3.2.0" + "@abp/jquery" "~3.3.0-rc.1" datatables.net "^1.10.21" -"@abp/font-awesome@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/font-awesome/-/font-awesome-3.2.0.tgz#ad75daf1c084c2c6a0aeccc092057627ce898652" - integrity sha512-FAWBYWwg2ZtKO+0/lS/bc4YFnR7IehQ2Y+y1srIypgSY/739X4aUWb0YDW1tE0QrrFfQ//f16AyIKPynGl0T5Q== +"@abp/font-awesome@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/font-awesome/-/font-awesome-3.3.0-rc.1.tgz#700ba64f6c8832b812d5d1bca28dd4a487bec833" + integrity sha512-fna7mw5AIuP/FZSx1Ac94ZpGJIwQCZKuiIpmW/vVsFHUSICZ9J+uKa6hg3pt5SLFMAEVvAS6ScJyTkt6Hoc0Mg== dependencies: - "@abp/core" "~3.2.0" + "@abp/core" "~3.3.0-rc.1" "@fortawesome/fontawesome-free" "^5.13.0" -"@abp/jquery-form@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/jquery-form/-/jquery-form-3.2.0.tgz#b1b408c0f380c8dfd99c063251f2f1fd86dff14c" - integrity sha512-ZC38zLqlMm67nONg+7ZSC7ExzLZApZ2nZ3/yM6J5LNa7IOgzDGPZgbDRBiwFdC3vIB04LhnNr83YrEvIaUnIzQ== +"@abp/jquery-form@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/jquery-form/-/jquery-form-3.3.0-rc.1.tgz#9fe258a926013618cd99c03aca401c4fc543a72d" + integrity sha512-qLWucASxcgCKdVeix/NXYADhGOWBAR69U/xJj4p/H5i80PuMetH/bWCb9SQbrbyza/Gp4A8JV5vBKNmZFQqSbg== dependencies: - "@abp/jquery" "~3.2.0" + "@abp/jquery" "~3.3.0-rc.1" jquery-form "^4.3.0" -"@abp/jquery-validation-unobtrusive@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-3.2.0.tgz#91b996c743e5b1423a4d01d8808788a4bf4adb32" - integrity sha512-FSkGWvIkZTd2LITbTCdyno0ml30PZZmGYCazowHprh1iuhx0C+yCd9U/kfZ3rLoZAFtWjz0ZUq1Z7G5xXHB97A== +"@abp/jquery-validation-unobtrusive@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-3.3.0-rc.1.tgz#7860d04cfdf152976d780efab88712ae58db8541" + integrity sha512-KAAhLa3MHcwf6CWcAtlW2BQ9WeN8LwzDY6qCz6IVG25zjZfHZ6HEVeMAG3eJ6NRZlAWv2zZK8i8Qma9lKD55gA== dependencies: - "@abp/jquery-validation" "~3.2.0" + "@abp/jquery-validation" "~3.3.0-rc.1" jquery-validation-unobtrusive "^3.2.11" -"@abp/jquery-validation@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/jquery-validation/-/jquery-validation-3.2.0.tgz#1de41e9167b41a956ce2f6e3d6f16d023fccd078" - integrity sha512-FlP7btUvAJfGoi0g8Hm474jlhtweyd/P6dRu2spApUOpKjMyUNFpp/nphmr0iQvx7JGeeaAaUhQJ2v5UKy/Z8w== +"@abp/jquery-validation@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/jquery-validation/-/jquery-validation-3.3.0-rc.1.tgz#ab64965232b30a6ae9ed8660fc9587792bfd619d" + integrity sha512-84ueP2TWJVTYuqIzofrwu8NpWQA/thmQzDzhSnI6dTLrrYzDHLQ7YjwG3/591ka3b6u71diE6UfeyQ4iBiPQ5Q== dependencies: - "@abp/jquery" "~3.2.0" + "@abp/jquery" "~3.3.0-rc.1" jquery-validation "^1.19.2" -"@abp/jquery@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/jquery/-/jquery-3.2.0.tgz#eabc0bafef3cf2b64f672c562bda1f1002b07b7c" - integrity sha512-tlvQ79cqyJ+tXEf17Vdwi6O8yo0+7bmicyy5A/iYyWWJUjXGkiouQHjHkoZ2jeyxwvqn85tBbfjeRumcZdYRMA== +"@abp/jquery@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/jquery/-/jquery-3.3.0-rc.1.tgz#d46f75bfbcc65d4675675c8b69d219a3276afe91" + integrity sha512-NdChW0cbsqWVkB6AvXnTfeNZm2Ai3jmYEO2HJZDYBbWHkMlvQRnQ6oVD6TJvqMDtK066ArL1KAofuSJI2l8njQ== dependencies: - "@abp/core" "~3.2.0" + "@abp/core" "~3.3.0-rc.1" jquery "~3.5.1" -"@abp/lodash@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/lodash/-/lodash-3.2.0.tgz#63e8c51fe9e760d7debca9129bfbf01be8c12d18" - integrity sha512-/rGkJMCgbA0JLkjMXenxz6q0BXRDwvYSLUu7XotNj/cbiHpT5yHHTnWQgwxVUKEVA9xtmYUH1h20J25n/VD/tg== +"@abp/lodash@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/lodash/-/lodash-3.3.0-rc.1.tgz#5cf5462e1df615af5a3f89b8eb6b5d639f134026" + integrity sha512-AXvTAHfKSkQjJ70eStqSq2sXrOHQE+O5/7/k6JuSLbhzfC1paAZeKjLyoGj1hSuyWHQl6tbqDxJQej/NxGucHw== dependencies: - "@abp/core" "~3.2.0" + "@abp/core" "~3.3.0-rc.1" lodash "^4.17.15" -"@abp/luxon@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/luxon/-/luxon-3.2.0.tgz#f94b595d15d78868a4acf73803a9da8609096d39" - integrity sha512-3FF9/W+Smp4FqRJ6F5vNxydXYraVgEUsrOBkaBexVkzT/l3zBkCmrJ8i+Eib8xBXpS6Ku4nmpqbqm1VYhlxKTQ== +"@abp/luxon@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/luxon/-/luxon-3.3.0-rc.1.tgz#e479e7e854ccb9fcd35ce15145d50a9c9581dc50" + integrity sha512-j+1cBVmGtE9Of14i7nwtn9ZSvNa+46beiyOqMVmuH5qjPQTbYUAVFOlL7jVmYswplxUdK1r52n1nOz13oADnwA== dependencies: - "@abp/core" "~3.2.0" + "@abp/core" "~3.3.0-rc.1" luxon "^1.24.1" -"@abp/malihu-custom-scrollbar-plugin@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-3.2.0.tgz#bd11a36a37ec23d38cba116934398696379158b1" - integrity sha512-BYGICB55RsYHmaICnyWdCewo0uEbopmuuUuCJlE+2IY1I4JchSWG2mV//F+jOZQmlOsjYufK70BrQQEIr+ewXw== +"@abp/malihu-custom-scrollbar-plugin@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-3.3.0-rc.1.tgz#3455730273e75ad8d81083989b4f0d4486fe6a2c" + integrity sha512-TePsuZmhX34y9OEPdyYnWuQnx8ntkMXO4gkwciT0fqen+Cs8ty1VFr7uBeFTIo/JTCBtrRehcOjCJiv/F3j1Ug== dependencies: - "@abp/core" "~3.2.0" + "@abp/core" "~3.3.0-rc.1" malihu-custom-scrollbar-plugin "^3.1.5" -"@abp/select2@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/select2/-/select2-3.2.0.tgz#729f82695bbfd7ab3d7a90059a198f338037c867" - integrity sha512-83V8jIR8RGFJ3II5G7/bitlv44OHOEENKDrT639OYIxHfgWEWm4CBhcyCnlZJqv6xB2AVDfFPgCPlDGl3x3tmw== +"@abp/select2@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/select2/-/select2-3.3.0-rc.1.tgz#f5e159e13d2b7868a2283fb58af5121f1cc439e3" + integrity sha512-+fZoOHSZMeoMhIKQFrL62B1mwH10zNwsmEfgdLEvSiGNss+yGUmCZKxz9jSbQUr81N/kgew1CMxMjPGfyvpudA== dependencies: - "@abp/core" "~3.2.0" + "@abp/core" "~3.3.0-rc.1" select2 "^4.0.13" -"@abp/sweetalert@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/sweetalert/-/sweetalert-3.2.0.tgz#05040b7276ca2ce62ffc20865d64fb6e0fdb62cb" - integrity sha512-BEgbWwWX2uOsVS/zV6OzlxRBCtSlqeAYdSkmDjQ7pzCthwZXPPFr1o8UXyp9W7GKwDg3lfWTQPkkm+2y587xEw== +"@abp/sweetalert@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/sweetalert/-/sweetalert-3.3.0-rc.1.tgz#72e926a4e44dec851cf5abbe088f27294ccea671" + integrity sha512-IxrpZwgSO6t9DGKzWN3CfBL+lA5n/5Z3JBt6plWSYFSMMNDlxIOPyKcJBUUnlHnpUiqslCIiZRlOcCLTsw13tw== dependencies: - "@abp/core" "~3.2.0" + "@abp/core" "~3.3.0-rc.1" sweetalert "^2.1.2" -"@abp/timeago@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/timeago/-/timeago-3.2.0.tgz#e4a207566c00ccb3161ee91c6f6ce26419e4bbaf" - integrity sha512-VUk8c3hITZfu5aA21XB2Qaw5fwoeAl36Piy0Cb3aUOCFjyGWg19htXxDoT7rzqZ5UJFN0VRYg9MzciXZrFN5/w== +"@abp/timeago@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/timeago/-/timeago-3.3.0-rc.1.tgz#dec80881b231757f3d53fd017631517b0fb79e65" + integrity sha512-YQTE/p5SILYkfDSDbgdScqANb1d2F9a+d1Hijy/lUK6WLUqNkU2qlF1I/aBpJJWD6h8KAVqC5ZmOXZ/WDRSZ3w== dependencies: - "@abp/jquery" "~3.2.0" + "@abp/jquery" "~3.3.0-rc.1" timeago "^1.6.7" -"@abp/toastr@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/toastr/-/toastr-3.2.0.tgz#059e1e1e998207a6f75db2bfe717bec2a0b6d955" - integrity sha512-EKikZVQDaX/uQfc0rWsW2x+UDsO4r80KC3pLvRaLXW5IEwEhTpYwZDUGReOEQ8YEk7UKOXrVJA07mxkbdOzyAw== +"@abp/toastr@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/toastr/-/toastr-3.3.0-rc.1.tgz#56d1c044c528ca12b4d3e37a19f21ec8cf3c3945" + integrity sha512-kTyzlneLWKbRDkSshch5MFIX46+t9SPoOly544KnX1erHmNJfVkBk69XmADeoltKHezbiglE81Kg2KXxVgrAqQ== dependencies: - "@abp/jquery" "~3.2.0" + "@abp/jquery" "~3.3.0-rc.1" toastr "^2.1.4" -"@abp/utils@^3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/utils/-/utils-3.2.0.tgz#084918379f2c5e43c1e52291ba6667f3ea3c1f33" - integrity sha512-DZsvF/I5o3r0D1+2B61KvJX78/tJ5uj9MaPq00Z/sxXdqsP2SQQmjhMm+Lb0FgGMK06XIoF9eDgM3Hu0y0H3cQ== +"@abp/utils@^3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/utils/-/utils-3.3.0-rc.1.tgz#2ea2806a42d31dff246478497493e6a8735b3aa3" + integrity sha512-B58plJNC9UF9kigsGLd29qa9nyfIkgV7868NmNgsPwulAhcI1dKUgmSlymN1fBK4zPOVWbzReANVLKbQx13Z1Q== dependencies: just-compare "^1.3.0" diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Host/Volo.CmsKit.Web.Host.csproj b/modules/cms-kit/host/Volo.CmsKit.Web.Host/Volo.CmsKit.Web.Host.csproj index e58aa309c6..bb7592e7b4 100644 --- a/modules/cms-kit/host/Volo.CmsKit.Web.Host/Volo.CmsKit.Web.Host.csproj +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Host/Volo.CmsKit.Web.Host.csproj @@ -3,7 +3,7 @@ - netcoreapp3.1 + net5.0 Volo.CmsKit true Volo.CmsKit-c2d31439-b723-48e2-b061-5ebd7aeb6010 @@ -13,22 +13,22 @@ - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Host/package.json b/modules/cms-kit/host/Volo.CmsKit.Web.Host/package.json index 9b79ab6170..c035a75924 100644 --- a/modules/cms-kit/host/Volo.CmsKit.Web.Host/package.json +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Host/package.json @@ -3,6 +3,6 @@ "name": "my-app", "private": true, "dependencies": { - "@abp/aspnetcore.mvc.ui.theme.basic": "^3.2.0" + "@abp/aspnetcore.mvc.ui.theme.basic": "^3.3.0-rc.1" } } \ No newline at end of file diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Host/wwwroot/libs/abp/core/abp.js b/modules/cms-kit/host/Volo.CmsKit.Web.Host/wwwroot/libs/abp/core/abp.js index 20bd92147a..72af4bd106 100644 --- a/modules/cms-kit/host/Volo.CmsKit.Web.Host/wwwroot/libs/abp/core/abp.js +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Host/wwwroot/libs/abp/core/abp.js @@ -689,7 +689,7 @@ var abp = abp || {}; abp.security.antiForgery = abp.security.antiForgery || {}; abp.security.antiForgery.tokenCookieName = 'XSRF-TOKEN'; - abp.security.antiForgery.tokenHeaderName = 'X-XSRF-TOKEN'; + abp.security.antiForgery.tokenHeaderName = 'RequestVerificationToken'; abp.security.antiForgery.getToken = function () { return abp.utils.getCookieValue(abp.security.antiForgery.tokenCookieName); diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Host/yarn.lock b/modules/cms-kit/host/Volo.CmsKit.Web.Host/yarn.lock index a37f397509..88b0ed6069 100644 --- a/modules/cms-kit/host/Volo.CmsKit.Web.Host/yarn.lock +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Host/yarn.lock @@ -2,37 +2,37 @@ # yarn lockfile v1 -"@abp/aspnetcore.mvc.ui.theme.basic@^3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.basic/-/aspnetcore.mvc.ui.theme.basic-3.2.0.tgz#207277419356a14f686421de0ee320fad0d6857f" - integrity sha512-4xn4BPQu9QL3sM47QtPNwOei9/fnRw3dXCL7vlJBCU70jL8911C6D/Pj/CBqCEMMVPI6M4GE7Ls4AwKTvgFeTw== - dependencies: - "@abp/aspnetcore.mvc.ui.theme.shared" "~3.2.0" - -"@abp/aspnetcore.mvc.ui.theme.shared@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.shared/-/aspnetcore.mvc.ui.theme.shared-3.2.0.tgz#bed24c1d28f6e85d58fa963911a09e8b2998c1b6" - integrity sha512-Ap1dPCvL7r31oFyi+3YPviFkDly5FZfWbHq2bURsEbscembpc6DOSfXehvuZ2BjqsZF3n/HX0Y1lX4irUqKqjg== - dependencies: - "@abp/aspnetcore.mvc.ui" "~3.2.0" - "@abp/bootstrap" "~3.2.0" - "@abp/bootstrap-datepicker" "~3.2.0" - "@abp/datatables.net-bs4" "~3.2.0" - "@abp/font-awesome" "~3.2.0" - "@abp/jquery-form" "~3.2.0" - "@abp/jquery-validation-unobtrusive" "~3.2.0" - "@abp/lodash" "~3.2.0" - "@abp/luxon" "~3.2.0" - "@abp/malihu-custom-scrollbar-plugin" "~3.2.0" - "@abp/select2" "~3.2.0" - "@abp/sweetalert" "~3.2.0" - "@abp/timeago" "~3.2.0" - "@abp/toastr" "~3.2.0" - -"@abp/aspnetcore.mvc.ui@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui/-/aspnetcore.mvc.ui-3.2.0.tgz#01f80b9f663f4d95ceac733761833cf4648e92b5" - integrity sha512-NzH1UxEoE/FVT0LLjMNq5eSsiORLe5dE+aKr7jjbaxcuVr7QI7KI9ry6xWAZk+0cbGvsUAY0xqrMxxqiLpskxQ== +"@abp/aspnetcore.mvc.ui.theme.basic@^3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.basic/-/aspnetcore.mvc.ui.theme.basic-3.3.0-rc.1.tgz#0c088d2946f93447388f8e63313b47398fe2f792" + integrity sha512-ysmFoSrEOMn33h6Q3swefEPkT8iABLR1RNLaHzaGOp042+3xJpvnPRC0PjdtFGIx9Mic3EHU7va/by9TGaRP0A== + dependencies: + "@abp/aspnetcore.mvc.ui.theme.shared" "~3.3.0-rc.1" + +"@abp/aspnetcore.mvc.ui.theme.shared@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.shared/-/aspnetcore.mvc.ui.theme.shared-3.3.0-rc.1.tgz#0ebb50effe6d1d8e87d30cf0258c92074c77922f" + integrity sha512-sYmKnmy9Fsh0dT+CPhsxk5UwqUTdWIXDbRCp9ZI+9AKGHHBkuFfTPSi3TBK+Y/vQAOn68JdMVdRLdMJHHUXm+g== + dependencies: + "@abp/aspnetcore.mvc.ui" "~3.3.0-rc.1" + "@abp/bootstrap" "~3.3.0-rc.1" + "@abp/bootstrap-datepicker" "~3.3.0-rc.1" + "@abp/datatables.net-bs4" "~3.3.0-rc.1" + "@abp/font-awesome" "~3.3.0-rc.1" + "@abp/jquery-form" "~3.3.0-rc.1" + "@abp/jquery-validation-unobtrusive" "~3.3.0-rc.1" + "@abp/lodash" "~3.3.0-rc.1" + "@abp/luxon" "~3.3.0-rc.1" + "@abp/malihu-custom-scrollbar-plugin" "~3.3.0-rc.1" + "@abp/select2" "~3.3.0-rc.1" + "@abp/sweetalert" "~3.3.0-rc.1" + "@abp/timeago" "~3.3.0-rc.1" + "@abp/toastr" "~3.3.0-rc.1" + +"@abp/aspnetcore.mvc.ui@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui/-/aspnetcore.mvc.ui-3.3.0-rc.1.tgz#69e0fa91fb1a4f7424e08e076df213fea90c796b" + integrity sha512-c6xNCJlhmz8EasZZeYkC6LoOJLMnfa+JGbtfZF8FXNT4MQVyFpfQtGInGAn6A3TDZR2Y/roJbjXf/D73cxMnGA== dependencies: ansi-colors "^4.1.1" extend-object "^1.0.0" @@ -41,145 +41,145 @@ path "^0.12.7" rimraf "^3.0.2" -"@abp/bootstrap-datepicker@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/bootstrap-datepicker/-/bootstrap-datepicker-3.2.0.tgz#0a1813d8a84dd6eb6cf647244a4a91900364deb1" - integrity sha512-w7YyA5TRZqGL3qYyArwfrRc4/qWQMT0BPYDOsGMrtPJZDWeZL7WPezuiIvKNdI71BfUq6XiA1+wwMfqjcClZ2g== +"@abp/bootstrap-datepicker@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/bootstrap-datepicker/-/bootstrap-datepicker-3.3.0-rc.1.tgz#4195fa5cf5cc72420c9d87a6c75ec26c3c70b9df" + integrity sha512-6ijmKV6ySrsBwtyQxoe+/Otmhzp1XJy0uGVnY2YhmOHuKzmQeIwfzrMMuLK5XX+Gsub1dYqsawFQNzJYxY2rLA== dependencies: bootstrap-datepicker "^1.9.0" -"@abp/bootstrap@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/bootstrap/-/bootstrap-3.2.0.tgz#d249338b0151734f99b8e366aea6fc17d5ef9b37" - integrity sha512-hx9r7EGb1vJrHAdw3D8Cpudv++hrM4dKoKtOKnQbxGG+Q9vwVS6SKquVxJum+bEZWa1CgXvT6co0IDOlW3pDhg== +"@abp/bootstrap@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/bootstrap/-/bootstrap-3.3.0-rc.1.tgz#e5526e2ad9ac3e3d650d8d805708d083ce5ff6f2" + integrity sha512-TvTPt6e8cGgdH4EdWAadm/8ykE0wke0vYGWWbgNfrNuSb+/Mt/lg0U3nDaNdjDBtstkEPLHKA2lvS5Nb1mNr+w== dependencies: - "@abp/core" "~3.2.0" + "@abp/core" "~3.3.0-rc.1" bootstrap "^4.5.0" bootstrap-v4-rtl "4.4.1-2" -"@abp/core@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/core/-/core-3.2.0.tgz#e9f07bde581b07e1b904bec3b12e0ccfc2a50125" - integrity sha512-X3iWv8QxAbqKJMoTb3vfvwGYmD9uZ+p+zn5q5Hoybyq9fjEcevpkdX7OiLvO8M+NEwCKa81wtkvvM2BnEV6Igg== +"@abp/core@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/core/-/core-3.3.0-rc.1.tgz#b84bdd9526c52f5d76a356d2854256477680ef6e" + integrity sha512-6KQ9Lu/Ok0FaIIRYoUUgnV0DFcT7H080Qfr7QHOv/nI6lviFwtAi/L3IJPCwKSoP+08RklyzvD9zOIdWNWEYMQ== dependencies: - "@abp/utils" "^3.2.0" + "@abp/utils" "^3.3.0-rc.1" -"@abp/datatables.net-bs4@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/datatables.net-bs4/-/datatables.net-bs4-3.2.0.tgz#8551c0ac5e29b037a86b141f41052e7a3038be89" - integrity sha512-i2LVTKAllgzhc21rb0GQ0YHtmOMyCT+6P3ZelqkoLdp56D63rVhdAOHrqjebrEHMehsuCUV2XH908kakXWIPXA== +"@abp/datatables.net-bs4@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/datatables.net-bs4/-/datatables.net-bs4-3.3.0-rc.1.tgz#360cd4e71c8015a3b9045636ec09f11c938685a6" + integrity sha512-7DTaQfpi4bEAKBq3QR4WHYVGGuk2v7zca0Q41XuWeSkcgGwctrJnuAdotNmihDQuwNZgYO+2gFDlVa5DXPELKQ== dependencies: - "@abp/datatables.net" "~3.2.0" + "@abp/datatables.net" "~3.3.0-rc.1" datatables.net-bs4 "^1.10.21" -"@abp/datatables.net@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/datatables.net/-/datatables.net-3.2.0.tgz#effd0ec603b15c0de2d1db993d1416b46f4e3146" - integrity sha512-6UX/WqdlRfb3BQ2cw7LbUlMimDXtx7rHanTTWq44g+Wc8fn4fVcYyo9RWCYYOd2MWm9pElEvuzG1AzaOamjW9Q== +"@abp/datatables.net@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/datatables.net/-/datatables.net-3.3.0-rc.1.tgz#b4fdebc7806036d3d468453772fbc1fd3c3b443f" + integrity sha512-GqeKMFYvQ3Zfx35fKkYhYUpIEWtaW1KWo5VrA+EbyTcbhdrAuAUoDH4QgLpdhtCvNO74M8JFpMVEYHhhUkc0nQ== dependencies: - "@abp/jquery" "~3.2.0" + "@abp/jquery" "~3.3.0-rc.1" datatables.net "^1.10.21" -"@abp/font-awesome@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/font-awesome/-/font-awesome-3.2.0.tgz#ad75daf1c084c2c6a0aeccc092057627ce898652" - integrity sha512-FAWBYWwg2ZtKO+0/lS/bc4YFnR7IehQ2Y+y1srIypgSY/739X4aUWb0YDW1tE0QrrFfQ//f16AyIKPynGl0T5Q== +"@abp/font-awesome@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/font-awesome/-/font-awesome-3.3.0-rc.1.tgz#700ba64f6c8832b812d5d1bca28dd4a487bec833" + integrity sha512-fna7mw5AIuP/FZSx1Ac94ZpGJIwQCZKuiIpmW/vVsFHUSICZ9J+uKa6hg3pt5SLFMAEVvAS6ScJyTkt6Hoc0Mg== dependencies: - "@abp/core" "~3.2.0" + "@abp/core" "~3.3.0-rc.1" "@fortawesome/fontawesome-free" "^5.13.0" -"@abp/jquery-form@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/jquery-form/-/jquery-form-3.2.0.tgz#b1b408c0f380c8dfd99c063251f2f1fd86dff14c" - integrity sha512-ZC38zLqlMm67nONg+7ZSC7ExzLZApZ2nZ3/yM6J5LNa7IOgzDGPZgbDRBiwFdC3vIB04LhnNr83YrEvIaUnIzQ== +"@abp/jquery-form@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/jquery-form/-/jquery-form-3.3.0-rc.1.tgz#9fe258a926013618cd99c03aca401c4fc543a72d" + integrity sha512-qLWucASxcgCKdVeix/NXYADhGOWBAR69U/xJj4p/H5i80PuMetH/bWCb9SQbrbyza/Gp4A8JV5vBKNmZFQqSbg== dependencies: - "@abp/jquery" "~3.2.0" + "@abp/jquery" "~3.3.0-rc.1" jquery-form "^4.3.0" -"@abp/jquery-validation-unobtrusive@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-3.2.0.tgz#91b996c743e5b1423a4d01d8808788a4bf4adb32" - integrity sha512-FSkGWvIkZTd2LITbTCdyno0ml30PZZmGYCazowHprh1iuhx0C+yCd9U/kfZ3rLoZAFtWjz0ZUq1Z7G5xXHB97A== +"@abp/jquery-validation-unobtrusive@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-3.3.0-rc.1.tgz#7860d04cfdf152976d780efab88712ae58db8541" + integrity sha512-KAAhLa3MHcwf6CWcAtlW2BQ9WeN8LwzDY6qCz6IVG25zjZfHZ6HEVeMAG3eJ6NRZlAWv2zZK8i8Qma9lKD55gA== dependencies: - "@abp/jquery-validation" "~3.2.0" + "@abp/jquery-validation" "~3.3.0-rc.1" jquery-validation-unobtrusive "^3.2.11" -"@abp/jquery-validation@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/jquery-validation/-/jquery-validation-3.2.0.tgz#1de41e9167b41a956ce2f6e3d6f16d023fccd078" - integrity sha512-FlP7btUvAJfGoi0g8Hm474jlhtweyd/P6dRu2spApUOpKjMyUNFpp/nphmr0iQvx7JGeeaAaUhQJ2v5UKy/Z8w== +"@abp/jquery-validation@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/jquery-validation/-/jquery-validation-3.3.0-rc.1.tgz#ab64965232b30a6ae9ed8660fc9587792bfd619d" + integrity sha512-84ueP2TWJVTYuqIzofrwu8NpWQA/thmQzDzhSnI6dTLrrYzDHLQ7YjwG3/591ka3b6u71diE6UfeyQ4iBiPQ5Q== dependencies: - "@abp/jquery" "~3.2.0" + "@abp/jquery" "~3.3.0-rc.1" jquery-validation "^1.19.2" -"@abp/jquery@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/jquery/-/jquery-3.2.0.tgz#eabc0bafef3cf2b64f672c562bda1f1002b07b7c" - integrity sha512-tlvQ79cqyJ+tXEf17Vdwi6O8yo0+7bmicyy5A/iYyWWJUjXGkiouQHjHkoZ2jeyxwvqn85tBbfjeRumcZdYRMA== +"@abp/jquery@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/jquery/-/jquery-3.3.0-rc.1.tgz#d46f75bfbcc65d4675675c8b69d219a3276afe91" + integrity sha512-NdChW0cbsqWVkB6AvXnTfeNZm2Ai3jmYEO2HJZDYBbWHkMlvQRnQ6oVD6TJvqMDtK066ArL1KAofuSJI2l8njQ== dependencies: - "@abp/core" "~3.2.0" + "@abp/core" "~3.3.0-rc.1" jquery "~3.5.1" -"@abp/lodash@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/lodash/-/lodash-3.2.0.tgz#63e8c51fe9e760d7debca9129bfbf01be8c12d18" - integrity sha512-/rGkJMCgbA0JLkjMXenxz6q0BXRDwvYSLUu7XotNj/cbiHpT5yHHTnWQgwxVUKEVA9xtmYUH1h20J25n/VD/tg== +"@abp/lodash@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/lodash/-/lodash-3.3.0-rc.1.tgz#5cf5462e1df615af5a3f89b8eb6b5d639f134026" + integrity sha512-AXvTAHfKSkQjJ70eStqSq2sXrOHQE+O5/7/k6JuSLbhzfC1paAZeKjLyoGj1hSuyWHQl6tbqDxJQej/NxGucHw== dependencies: - "@abp/core" "~3.2.0" + "@abp/core" "~3.3.0-rc.1" lodash "^4.17.15" -"@abp/luxon@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/luxon/-/luxon-3.2.0.tgz#f94b595d15d78868a4acf73803a9da8609096d39" - integrity sha512-3FF9/W+Smp4FqRJ6F5vNxydXYraVgEUsrOBkaBexVkzT/l3zBkCmrJ8i+Eib8xBXpS6Ku4nmpqbqm1VYhlxKTQ== +"@abp/luxon@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/luxon/-/luxon-3.3.0-rc.1.tgz#e479e7e854ccb9fcd35ce15145d50a9c9581dc50" + integrity sha512-j+1cBVmGtE9Of14i7nwtn9ZSvNa+46beiyOqMVmuH5qjPQTbYUAVFOlL7jVmYswplxUdK1r52n1nOz13oADnwA== dependencies: - "@abp/core" "~3.2.0" + "@abp/core" "~3.3.0-rc.1" luxon "^1.24.1" -"@abp/malihu-custom-scrollbar-plugin@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-3.2.0.tgz#bd11a36a37ec23d38cba116934398696379158b1" - integrity sha512-BYGICB55RsYHmaICnyWdCewo0uEbopmuuUuCJlE+2IY1I4JchSWG2mV//F+jOZQmlOsjYufK70BrQQEIr+ewXw== +"@abp/malihu-custom-scrollbar-plugin@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-3.3.0-rc.1.tgz#3455730273e75ad8d81083989b4f0d4486fe6a2c" + integrity sha512-TePsuZmhX34y9OEPdyYnWuQnx8ntkMXO4gkwciT0fqen+Cs8ty1VFr7uBeFTIo/JTCBtrRehcOjCJiv/F3j1Ug== dependencies: - "@abp/core" "~3.2.0" + "@abp/core" "~3.3.0-rc.1" malihu-custom-scrollbar-plugin "^3.1.5" -"@abp/select2@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/select2/-/select2-3.2.0.tgz#729f82695bbfd7ab3d7a90059a198f338037c867" - integrity sha512-83V8jIR8RGFJ3II5G7/bitlv44OHOEENKDrT639OYIxHfgWEWm4CBhcyCnlZJqv6xB2AVDfFPgCPlDGl3x3tmw== +"@abp/select2@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/select2/-/select2-3.3.0-rc.1.tgz#f5e159e13d2b7868a2283fb58af5121f1cc439e3" + integrity sha512-+fZoOHSZMeoMhIKQFrL62B1mwH10zNwsmEfgdLEvSiGNss+yGUmCZKxz9jSbQUr81N/kgew1CMxMjPGfyvpudA== dependencies: - "@abp/core" "~3.2.0" + "@abp/core" "~3.3.0-rc.1" select2 "^4.0.13" -"@abp/sweetalert@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/sweetalert/-/sweetalert-3.2.0.tgz#05040b7276ca2ce62ffc20865d64fb6e0fdb62cb" - integrity sha512-BEgbWwWX2uOsVS/zV6OzlxRBCtSlqeAYdSkmDjQ7pzCthwZXPPFr1o8UXyp9W7GKwDg3lfWTQPkkm+2y587xEw== +"@abp/sweetalert@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/sweetalert/-/sweetalert-3.3.0-rc.1.tgz#72e926a4e44dec851cf5abbe088f27294ccea671" + integrity sha512-IxrpZwgSO6t9DGKzWN3CfBL+lA5n/5Z3JBt6plWSYFSMMNDlxIOPyKcJBUUnlHnpUiqslCIiZRlOcCLTsw13tw== dependencies: - "@abp/core" "~3.2.0" + "@abp/core" "~3.3.0-rc.1" sweetalert "^2.1.2" -"@abp/timeago@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/timeago/-/timeago-3.2.0.tgz#e4a207566c00ccb3161ee91c6f6ce26419e4bbaf" - integrity sha512-VUk8c3hITZfu5aA21XB2Qaw5fwoeAl36Piy0Cb3aUOCFjyGWg19htXxDoT7rzqZ5UJFN0VRYg9MzciXZrFN5/w== +"@abp/timeago@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/timeago/-/timeago-3.3.0-rc.1.tgz#dec80881b231757f3d53fd017631517b0fb79e65" + integrity sha512-YQTE/p5SILYkfDSDbgdScqANb1d2F9a+d1Hijy/lUK6WLUqNkU2qlF1I/aBpJJWD6h8KAVqC5ZmOXZ/WDRSZ3w== dependencies: - "@abp/jquery" "~3.2.0" + "@abp/jquery" "~3.3.0-rc.1" timeago "^1.6.7" -"@abp/toastr@~3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/toastr/-/toastr-3.2.0.tgz#059e1e1e998207a6f75db2bfe717bec2a0b6d955" - integrity sha512-EKikZVQDaX/uQfc0rWsW2x+UDsO4r80KC3pLvRaLXW5IEwEhTpYwZDUGReOEQ8YEk7UKOXrVJA07mxkbdOzyAw== +"@abp/toastr@~3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/toastr/-/toastr-3.3.0-rc.1.tgz#56d1c044c528ca12b4d3e37a19f21ec8cf3c3945" + integrity sha512-kTyzlneLWKbRDkSshch5MFIX46+t9SPoOly544KnX1erHmNJfVkBk69XmADeoltKHezbiglE81Kg2KXxVgrAqQ== dependencies: - "@abp/jquery" "~3.2.0" + "@abp/jquery" "~3.3.0-rc.1" toastr "^2.1.4" -"@abp/utils@^3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@abp/utils/-/utils-3.2.0.tgz#084918379f2c5e43c1e52291ba6667f3ea3c1f33" - integrity sha512-DZsvF/I5o3r0D1+2B61KvJX78/tJ5uj9MaPq00Z/sxXdqsP2SQQmjhMm+Lb0FgGMK06XIoF9eDgM3Hu0y0H3cQ== +"@abp/utils@^3.3.0-rc.1": + version "3.3.0-rc.1" + resolved "https://registry.yarnpkg.com/@abp/utils/-/utils-3.3.0-rc.1.tgz#2ea2806a42d31dff246478497493e6a8735b3aa3" + integrity sha512-B58plJNC9UF9kigsGLd29qa9nyfIkgV7868NmNgsPwulAhcI1dKUgmSlymN1fBK4zPOVWbzReANVLKbQx13Z1Q== dependencies: just-compare "^1.3.0" 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 fa084c3432..483d54d9d5 100644 --- a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/CmsKitWebUnifiedModule.cs +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/CmsKitWebUnifiedModule.cs @@ -110,6 +110,7 @@ namespace Volo.CmsKit { options.Languages.Add(new LanguageInfo("cs", "cs", "Čeština")); options.Languages.Add(new LanguageInfo("en", "en", "English")); + options.Languages.Add(new LanguageInfo("hu", "hu", "Magyar")); options.Languages.Add(new LanguageInfo("pt-BR", "pt-BR", "Português (Brasil)")); options.Languages.Add(new LanguageInfo("ru", "ru", "Русский")); options.Languages.Add(new LanguageInfo("tr", "tr", "Türkçe")); diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20200815101508_ReArrange_Indexes.Designer.cs b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20200815101508_ReArrange_Indexes.Designer.cs deleted file mode 100644 index 53c6d48621..0000000000 --- a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20200815101508_ReArrange_Indexes.Designer.cs +++ /dev/null @@ -1,1198 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; -using Volo.CmsKit.EntityFrameworkCore; - -namespace Volo.CmsKit.Migrations -{ - [DbContext(typeof(UnifiedDbContext))] - [Migration("20200815101508_ReArrange_Indexes")] - partial class ReArrange_Indexes - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) - .HasAnnotation("ProductVersion", "3.1.6") - .HasAnnotation("Relational:MaxIdentifierLength", 128) - .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); - - modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("ApplicationName") - .HasColumnName("ApplicationName") - .HasColumnType("nvarchar(96)") - .HasMaxLength(96); - - b.Property("BrowserInfo") - .HasColumnName("BrowserInfo") - .HasColumnType("nvarchar(512)") - .HasMaxLength(512); - - b.Property("ClientId") - .HasColumnName("ClientId") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("ClientIpAddress") - .HasColumnName("ClientIpAddress") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("ClientName") - .HasColumnName("ClientName") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); - - b.Property("Comments") - .HasColumnName("Comments") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("nvarchar(40)") - .HasMaxLength(40); - - b.Property("CorrelationId") - .HasColumnName("CorrelationId") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("Exceptions") - .HasColumnName("Exceptions") - .HasColumnType("nvarchar(4000)") - .HasMaxLength(4000); - - b.Property("ExecutionDuration") - .HasColumnName("ExecutionDuration") - .HasColumnType("int"); - - b.Property("ExecutionTime") - .HasColumnType("datetime2"); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); - - b.Property("HttpMethod") - .HasColumnName("HttpMethod") - .HasColumnType("nvarchar(16)") - .HasMaxLength(16); - - b.Property("HttpStatusCode") - .HasColumnName("HttpStatusCode") - .HasColumnType("int"); - - b.Property("ImpersonatorTenantId") - .HasColumnName("ImpersonatorTenantId") - .HasColumnType("uniqueidentifier"); - - b.Property("ImpersonatorUserId") - .HasColumnName("ImpersonatorUserId") - .HasColumnType("uniqueidentifier"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - b.Property("TenantName") - .HasColumnType("nvarchar(max)"); - - b.Property("Url") - .HasColumnName("Url") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property("UserId") - .HasColumnName("UserId") - .HasColumnType("uniqueidentifier"); - - b.Property("UserName") - .HasColumnName("UserName") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "ExecutionTime"); - - b.HasIndex("TenantId", "UserId", "ExecutionTime"); - - b.ToTable("AbpAuditLogs"); - }); - - modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("AuditLogId") - .HasColumnName("AuditLogId") - .HasColumnType("uniqueidentifier"); - - b.Property("ExecutionDuration") - .HasColumnName("ExecutionDuration") - .HasColumnType("int"); - - b.Property("ExecutionTime") - .HasColumnName("ExecutionTime") - .HasColumnType("datetime2"); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); - - b.Property("MethodName") - .HasColumnName("MethodName") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); - - b.Property("Parameters") - .HasColumnName("Parameters") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); - - b.Property("ServiceName") - .HasColumnName("ServiceName") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("Id"); - - b.HasIndex("AuditLogId"); - - b.HasIndex("TenantId", "ServiceName", "MethodName", "ExecutionTime"); - - b.ToTable("AbpAuditLogActions"); - }); - - modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("AuditLogId") - .HasColumnName("AuditLogId") - .HasColumnType("uniqueidentifier"); - - b.Property("ChangeTime") - .HasColumnName("ChangeTime") - .HasColumnType("datetime2"); - - b.Property("ChangeType") - .HasColumnName("ChangeType") - .HasColumnType("tinyint"); - - b.Property("EntityId") - .IsRequired() - .HasColumnName("EntityId") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); - - b.Property("EntityTenantId") - .HasColumnType("uniqueidentifier"); - - b.Property("EntityTypeFullName") - .IsRequired() - .HasColumnName("EntityTypeFullName") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("Id"); - - b.HasIndex("AuditLogId"); - - b.HasIndex("TenantId", "EntityTypeFullName", "EntityId"); - - b.ToTable("AbpEntityChanges"); - }); - - modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("EntityChangeId") - .HasColumnType("uniqueidentifier"); - - b.Property("NewValue") - .HasColumnName("NewValue") - .HasColumnType("nvarchar(512)") - .HasMaxLength(512); - - b.Property("OriginalValue") - .HasColumnName("OriginalValue") - .HasColumnType("nvarchar(512)") - .HasMaxLength(512); - - b.Property("PropertyName") - .IsRequired() - .HasColumnName("PropertyName") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); - - b.Property("PropertyTypeFullName") - .IsRequired() - .HasColumnName("PropertyTypeFullName") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("Id"); - - b.HasIndex("EntityChangeId"); - - b.ToTable("AbpEntityPropertyChanges"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("nvarchar(40)") - .HasMaxLength(40); - - b.Property("Description") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); - - b.Property("IsStatic") - .HasColumnType("bit"); - - b.Property("Name") - .IsRequired() - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property("Regex") - .HasColumnType("nvarchar(512)") - .HasMaxLength(512); - - b.Property("RegexDescription") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); - - b.Property("Required") - .HasColumnType("bit"); - - b.Property("ValueType") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.ToTable("AbpClaimTypes"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("nvarchar(40)") - .HasMaxLength(40); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); - - b.Property("IsDefault") - .HasColumnName("IsDefault") - .HasColumnType("bit"); - - b.Property("IsPublic") - .HasColumnName("IsPublic") - .HasColumnType("bit"); - - b.Property("IsStatic") - .HasColumnName("IsStatic") - .HasColumnType("bit"); - - b.Property("Name") - .IsRequired() - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property("NormalizedName") - .IsRequired() - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedName"); - - b.ToTable("AbpRoles"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ClaimType") - .IsRequired() - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property("ClaimValue") - .HasColumnType("nvarchar(1024)") - .HasMaxLength(1024); - - b.Property("RoleId") - .HasColumnType("uniqueidentifier"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("Id"); - - b.HasIndex("RoleId"); - - b.ToTable("AbpRoleClaims"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("AccessFailedCount") - .ValueGeneratedOnAdd() - .HasColumnName("AccessFailedCount") - .HasColumnType("int") - .HasDefaultValue(0); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("nvarchar(40)") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); - - b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("uniqueidentifier"); - - b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime2"); - - b.Property("Email") - .IsRequired() - .HasColumnName("Email") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property("EmailConfirmed") - .ValueGeneratedOnAdd() - .HasColumnName("EmailConfirmed") - .HasColumnType("bit") - .HasDefaultValue(false); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") - .HasColumnType("bit") - .HasDefaultValue(false); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime2"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("uniqueidentifier"); - - b.Property("LockoutEnabled") - .ValueGeneratedOnAdd() - .HasColumnName("LockoutEnabled") - .HasColumnType("bit") - .HasDefaultValue(false); - - b.Property("LockoutEnd") - .HasColumnType("datetimeoffset"); - - b.Property("Name") - .HasColumnName("Name") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("NormalizedEmail") - .IsRequired() - .HasColumnName("NormalizedEmail") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property("NormalizedUserName") - .IsRequired() - .HasColumnName("NormalizedUserName") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property("PasswordHash") - .HasColumnName("PasswordHash") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property("PhoneNumber") - .HasColumnName("PhoneNumber") - .HasColumnType("nvarchar(16)") - .HasMaxLength(16); - - b.Property("PhoneNumberConfirmed") - .ValueGeneratedOnAdd() - .HasColumnName("PhoneNumberConfirmed") - .HasColumnType("bit") - .HasDefaultValue(false); - - b.Property("SecurityStamp") - .IsRequired() - .HasColumnName("SecurityStamp") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property("Surname") - .HasColumnName("Surname") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - b.Property("TwoFactorEnabled") - .ValueGeneratedOnAdd() - .HasColumnName("TwoFactorEnabled") - .HasColumnType("bit") - .HasDefaultValue(false); - - b.Property("UserName") - .IsRequired() - .HasColumnName("UserName") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.HasKey("Id"); - - b.HasIndex("Email"); - - b.HasIndex("NormalizedEmail"); - - b.HasIndex("NormalizedUserName"); - - b.HasIndex("UserName"); - - b.ToTable("AbpUsers"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ClaimType") - .IsRequired() - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property("ClaimValue") - .HasColumnType("nvarchar(1024)") - .HasMaxLength(1024); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - b.Property("UserId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("AbpUserClaims"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => - { - b.Property("UserId") - .HasColumnType("uniqueidentifier"); - - b.Property("LoginProvider") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("ProviderDisplayName") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); - - b.Property("ProviderKey") - .IsRequired() - .HasColumnType("nvarchar(196)") - .HasMaxLength(196); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("UserId", "LoginProvider"); - - b.HasIndex("LoginProvider", "ProviderKey"); - - b.ToTable("AbpUserLogins"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => - { - b.Property("OrganizationUnitId") - .HasColumnType("uniqueidentifier"); - - b.Property("UserId") - .HasColumnType("uniqueidentifier"); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("OrganizationUnitId", "UserId"); - - b.HasIndex("UserId", "OrganizationUnitId"); - - b.ToTable("AbpUserOrganizationUnits"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => - { - b.Property("UserId") - .HasColumnType("uniqueidentifier"); - - b.Property("RoleId") - .HasColumnType("uniqueidentifier"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("UserId", "RoleId"); - - b.HasIndex("RoleId", "UserId"); - - b.ToTable("AbpUserRoles"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => - { - b.Property("UserId") - .HasColumnType("uniqueidentifier"); - - b.Property("LoginProvider") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("Name") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - b.Property("Value") - .HasColumnType("nvarchar(max)"); - - b.HasKey("UserId", "LoginProvider", "Name"); - - b.ToTable("AbpUserTokens"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("Code") - .IsRequired() - .HasColumnName("Code") - .HasColumnType("nvarchar(95)") - .HasMaxLength(95); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("nvarchar(40)") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); - - b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("uniqueidentifier"); - - b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime2"); - - b.Property("DisplayName") - .IsRequired() - .HasColumnName("DisplayName") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") - .HasColumnType("bit") - .HasDefaultValue(false); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime2"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("uniqueidentifier"); - - b.Property("ParentId") - .HasColumnType("uniqueidentifier"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("Id"); - - b.HasIndex("Code"); - - b.HasIndex("ParentId"); - - b.ToTable("AbpOrganizationUnits"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => - { - b.Property("OrganizationUnitId") - .HasColumnType("uniqueidentifier"); - - b.Property("RoleId") - .HasColumnType("uniqueidentifier"); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("OrganizationUnitId", "RoleId"); - - b.HasIndex("RoleId", "OrganizationUnitId"); - - b.ToTable("AbpOrganizationUnitRoles"); - }); - - modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("Name") - .IsRequired() - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); - - b.Property("ProviderKey") - .IsRequired() - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("ProviderName") - .IsRequired() - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("Id"); - - b.HasIndex("Name", "ProviderName", "ProviderKey"); - - b.ToTable("AbpPermissionGrants"); - }); - - modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("Name") - .IsRequired() - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); - - b.Property("ProviderKey") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("ProviderName") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("Value") - .IsRequired() - .HasColumnType("nvarchar(2048)") - .HasMaxLength(2048); - - b.HasKey("Id"); - - b.HasIndex("Name", "ProviderName", "ProviderKey"); - - b.ToTable("AbpSettings"); - }); - - modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("nvarchar(40)") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); - - b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("uniqueidentifier"); - - b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime2"); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") - .HasColumnType("bit") - .HasDefaultValue(false); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime2"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("uniqueidentifier"); - - b.Property("Name") - .IsRequired() - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.HasKey("Id"); - - b.HasIndex("Name"); - - b.ToTable("AbpTenants"); - }); - - modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => - { - b.Property("TenantId") - .HasColumnType("uniqueidentifier"); - - b.Property("Name") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("Value") - .IsRequired() - .HasColumnType("nvarchar(1024)") - .HasMaxLength(1024); - - b.HasKey("TenantId", "Name"); - - b.ToTable("AbpTenantConnectionStrings"); - }); - - modelBuilder.Entity("Volo.CmsKit.Comments.Comment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); - - b.Property("EntityId") - .IsRequired() - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("EntityType") - .IsRequired() - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("RepliedCommentId") - .HasColumnType("uniqueidentifier"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - b.Property("Text") - .IsRequired() - .HasColumnType("nvarchar(512)") - .HasMaxLength(512); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "RepliedCommentId"); - - b.HasIndex("TenantId", "EntityType", "EntityId"); - - b.ToTable("CmsComments"); - }); - - modelBuilder.Entity("Volo.CmsKit.Reactions.UserReaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); - - b.Property("EntityId") - .IsRequired() - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("EntityType") - .IsRequired() - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("ReactionName") - .IsRequired() - .HasColumnType("nvarchar(32)") - .HasMaxLength(32); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "EntityType", "EntityId", "ReactionName"); - - b.HasIndex("TenantId", "CreatorId", "EntityType", "EntityId", "ReactionName"); - - b.ToTable("CmsUserReactions"); - }); - - modelBuilder.Entity("Volo.CmsKit.Users.CmsUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("nvarchar(40)") - .HasMaxLength(40); - - b.Property("Email") - .IsRequired() - .HasColumnName("Email") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property("EmailConfirmed") - .ValueGeneratedOnAdd() - .HasColumnName("EmailConfirmed") - .HasColumnType("bit") - .HasDefaultValue(false); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); - - b.Property("Name") - .HasColumnName("Name") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("PhoneNumber") - .HasColumnName("PhoneNumber") - .HasColumnType("nvarchar(16)") - .HasMaxLength(16); - - b.Property("PhoneNumberConfirmed") - .ValueGeneratedOnAdd() - .HasColumnName("PhoneNumberConfirmed") - .HasColumnType("bit") - .HasDefaultValue(false); - - b.Property("Surname") - .HasColumnName("Surname") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - b.Property("UserName") - .IsRequired() - .HasColumnName("UserName") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Email"); - - b.HasIndex("TenantId", "UserName"); - - b.ToTable("CmsUsers"); - }); - - modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => - { - b.HasOne("Volo.Abp.AuditLogging.AuditLog", null) - .WithMany("Actions") - .HasForeignKey("AuditLogId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => - { - b.HasOne("Volo.Abp.AuditLogging.AuditLog", null) - .WithMany("EntityChanges") - .HasForeignKey("AuditLogId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => - { - b.HasOne("Volo.Abp.AuditLogging.EntityChange", null) - .WithMany("PropertyChanges") - .HasForeignKey("EntityChangeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => - { - b.HasOne("Volo.Abp.Identity.IdentityRole", null) - .WithMany("Claims") - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => - { - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Claims") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => - { - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Logins") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => - { - b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) - .WithMany() - .HasForeignKey("OrganizationUnitId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("OrganizationUnits") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => - { - b.HasOne("Volo.Abp.Identity.IdentityRole", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Roles") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => - { - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Tokens") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => - { - b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) - .WithMany() - .HasForeignKey("ParentId"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => - { - b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) - .WithMany("Roles") - .HasForeignKey("OrganizationUnitId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Volo.Abp.Identity.IdentityRole", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => - { - b.HasOne("Volo.Abp.TenantManagement.Tenant", null) - .WithMany("ConnectionStrings") - .HasForeignKey("TenantId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20200815101508_ReArrange_Indexes.cs b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20200815101508_ReArrange_Indexes.cs deleted file mode 100644 index ed957d0d8a..0000000000 --- a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20200815101508_ReArrange_Indexes.cs +++ /dev/null @@ -1,103 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -namespace Volo.CmsKit.Migrations -{ - public partial class ReArrange_Indexes : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropIndex( - name: "IX_CmsUserReactions_EntityType_EntityId", - table: "CmsUserReactions"); - - migrationBuilder.DropIndex( - name: "IX_CmsUserReactions_CreatorId_EntityType_EntityId_ReactionName", - table: "CmsUserReactions"); - - migrationBuilder.DropIndex( - name: "IX_CmsComments_RepliedCommentId", - table: "CmsComments"); - - migrationBuilder.DropIndex( - name: "IX_CmsComments_EntityType_EntityId", - table: "CmsComments"); - - migrationBuilder.CreateIndex( - name: "IX_CmsUsers_TenantId_Email", - table: "CmsUsers", - columns: new[] { "TenantId", "Email" }); - - migrationBuilder.CreateIndex( - name: "IX_CmsUsers_TenantId_UserName", - table: "CmsUsers", - columns: new[] { "TenantId", "UserName" }); - - migrationBuilder.CreateIndex( - name: "IX_CmsUserReactions_TenantId_EntityType_EntityId_ReactionName", - table: "CmsUserReactions", - columns: new[] { "TenantId", "EntityType", "EntityId", "ReactionName" }); - - migrationBuilder.CreateIndex( - name: "IX_CmsUserReactions_TenantId_CreatorId_EntityType_EntityId_ReactionName", - table: "CmsUserReactions", - columns: new[] { "TenantId", "CreatorId", "EntityType", "EntityId", "ReactionName" }); - - migrationBuilder.CreateIndex( - name: "IX_CmsComments_TenantId_RepliedCommentId", - table: "CmsComments", - columns: new[] { "TenantId", "RepliedCommentId" }); - - migrationBuilder.CreateIndex( - name: "IX_CmsComments_TenantId_EntityType_EntityId", - table: "CmsComments", - columns: new[] { "TenantId", "EntityType", "EntityId" }); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropIndex( - name: "IX_CmsUsers_TenantId_Email", - table: "CmsUsers"); - - migrationBuilder.DropIndex( - name: "IX_CmsUsers_TenantId_UserName", - table: "CmsUsers"); - - migrationBuilder.DropIndex( - name: "IX_CmsUserReactions_TenantId_EntityType_EntityId_ReactionName", - table: "CmsUserReactions"); - - migrationBuilder.DropIndex( - name: "IX_CmsUserReactions_TenantId_CreatorId_EntityType_EntityId_ReactionName", - table: "CmsUserReactions"); - - migrationBuilder.DropIndex( - name: "IX_CmsComments_TenantId_RepliedCommentId", - table: "CmsComments"); - - migrationBuilder.DropIndex( - name: "IX_CmsComments_TenantId_EntityType_EntityId", - table: "CmsComments"); - - migrationBuilder.CreateIndex( - name: "IX_CmsUserReactions_EntityType_EntityId", - table: "CmsUserReactions", - columns: new[] { "EntityType", "EntityId" }); - - migrationBuilder.CreateIndex( - name: "IX_CmsUserReactions_CreatorId_EntityType_EntityId_ReactionName", - table: "CmsUserReactions", - columns: new[] { "CreatorId", "EntityType", "EntityId", "ReactionName" }); - - migrationBuilder.CreateIndex( - name: "IX_CmsComments_RepliedCommentId", - table: "CmsComments", - column: "RepliedCommentId"); - - migrationBuilder.CreateIndex( - name: "IX_CmsComments_EntityType_EntityId", - table: "CmsComments", - columns: new[] { "EntityType", "EntityId" }); - } - } -} diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20200826063729_CmsRatings_Added.cs b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20200826063729_CmsRatings_Added.cs deleted file mode 100644 index d753d65865..0000000000 --- a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20200826063729_CmsRatings_Added.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -namespace Volo.CmsKit.Migrations -{ - public partial class CmsRatings_Added : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "CmsRatings", - columns: table => new - { - Id = table.Column(nullable: false), - TenantId = table.Column(nullable: true), - EntityType = table.Column(maxLength: 64, nullable: false), - EntityId = table.Column(maxLength: 64, nullable: false), - StarCount = table.Column(nullable: false), - CreatorId = table.Column(nullable: false), - CreationTime = table.Column(nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_CmsRatings", x => x.Id); - }); - - migrationBuilder.CreateIndex( - name: "IX_CmsRatings_TenantId_EntityType_EntityId", - table: "CmsRatings", - columns: new[] { "TenantId", "EntityType", "EntityId" }); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "CmsRatings"); - } - } -} diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20200826063729_CmsRatings_Added.Designer.cs b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201013061938_Initial.Designer.cs similarity index 97% rename from modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20200826063729_CmsRatings_Added.Designer.cs rename to modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201013061938_Initial.Designer.cs index 00e1003584..64e92cbea5 100644 --- a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20200826063729_CmsRatings_Added.Designer.cs +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201013061938_Initial.Designer.cs @@ -1,1235 +1,1235 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; -using Volo.CmsKit.EntityFrameworkCore; - -namespace Volo.CmsKit.Migrations -{ - [DbContext(typeof(UnifiedDbContext))] - [Migration("20200826063729_CmsRatings_Added")] - partial class CmsRatings_Added - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) - .HasAnnotation("ProductVersion", "3.1.6") - .HasAnnotation("Relational:MaxIdentifierLength", 128) - .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); - - modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("ApplicationName") - .HasColumnName("ApplicationName") - .HasColumnType("nvarchar(96)") - .HasMaxLength(96); - - b.Property("BrowserInfo") - .HasColumnName("BrowserInfo") - .HasColumnType("nvarchar(512)") - .HasMaxLength(512); - - b.Property("ClientId") - .HasColumnName("ClientId") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("ClientIpAddress") - .HasColumnName("ClientIpAddress") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("ClientName") - .HasColumnName("ClientName") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); - - b.Property("Comments") - .HasColumnName("Comments") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("nvarchar(40)") - .HasMaxLength(40); - - b.Property("CorrelationId") - .HasColumnName("CorrelationId") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("Exceptions") - .HasColumnName("Exceptions") - .HasColumnType("nvarchar(4000)") - .HasMaxLength(4000); - - b.Property("ExecutionDuration") - .HasColumnName("ExecutionDuration") - .HasColumnType("int"); - - b.Property("ExecutionTime") - .HasColumnType("datetime2"); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); - - b.Property("HttpMethod") - .HasColumnName("HttpMethod") - .HasColumnType("nvarchar(16)") - .HasMaxLength(16); - - b.Property("HttpStatusCode") - .HasColumnName("HttpStatusCode") - .HasColumnType("int"); - - b.Property("ImpersonatorTenantId") - .HasColumnName("ImpersonatorTenantId") - .HasColumnType("uniqueidentifier"); - - b.Property("ImpersonatorUserId") - .HasColumnName("ImpersonatorUserId") - .HasColumnType("uniqueidentifier"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - b.Property("TenantName") - .HasColumnType("nvarchar(max)"); - - b.Property("Url") - .HasColumnName("Url") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property("UserId") - .HasColumnName("UserId") - .HasColumnType("uniqueidentifier"); - - b.Property("UserName") - .HasColumnName("UserName") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "ExecutionTime"); - - b.HasIndex("TenantId", "UserId", "ExecutionTime"); - - b.ToTable("AbpAuditLogs"); - }); - - modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("AuditLogId") - .HasColumnName("AuditLogId") - .HasColumnType("uniqueidentifier"); - - b.Property("ExecutionDuration") - .HasColumnName("ExecutionDuration") - .HasColumnType("int"); - - b.Property("ExecutionTime") - .HasColumnName("ExecutionTime") - .HasColumnType("datetime2"); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); - - b.Property("MethodName") - .HasColumnName("MethodName") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); - - b.Property("Parameters") - .HasColumnName("Parameters") - .HasColumnType("nvarchar(2000)") - .HasMaxLength(2000); - - b.Property("ServiceName") - .HasColumnName("ServiceName") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("Id"); - - b.HasIndex("AuditLogId"); - - b.HasIndex("TenantId", "ServiceName", "MethodName", "ExecutionTime"); - - b.ToTable("AbpAuditLogActions"); - }); - - modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("AuditLogId") - .HasColumnName("AuditLogId") - .HasColumnType("uniqueidentifier"); - - b.Property("ChangeTime") - .HasColumnName("ChangeTime") - .HasColumnType("datetime2"); - - b.Property("ChangeType") - .HasColumnName("ChangeType") - .HasColumnType("tinyint"); - - b.Property("EntityId") - .IsRequired() - .HasColumnName("EntityId") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); - - b.Property("EntityTenantId") - .HasColumnType("uniqueidentifier"); - - b.Property("EntityTypeFullName") - .IsRequired() - .HasColumnName("EntityTypeFullName") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("Id"); - - b.HasIndex("AuditLogId"); - - b.HasIndex("TenantId", "EntityTypeFullName", "EntityId"); - - b.ToTable("AbpEntityChanges"); - }); - - modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("EntityChangeId") - .HasColumnType("uniqueidentifier"); - - b.Property("NewValue") - .HasColumnName("NewValue") - .HasColumnType("nvarchar(512)") - .HasMaxLength(512); - - b.Property("OriginalValue") - .HasColumnName("OriginalValue") - .HasColumnType("nvarchar(512)") - .HasMaxLength(512); - - b.Property("PropertyName") - .IsRequired() - .HasColumnName("PropertyName") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); - - b.Property("PropertyTypeFullName") - .IsRequired() - .HasColumnName("PropertyTypeFullName") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("Id"); - - b.HasIndex("EntityChangeId"); - - b.ToTable("AbpEntityPropertyChanges"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("nvarchar(40)") - .HasMaxLength(40); - - b.Property("Description") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); - - b.Property("IsStatic") - .HasColumnType("bit"); - - b.Property("Name") - .IsRequired() - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property("Regex") - .HasColumnType("nvarchar(512)") - .HasMaxLength(512); - - b.Property("RegexDescription") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); - - b.Property("Required") - .HasColumnType("bit"); - - b.Property("ValueType") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.ToTable("AbpClaimTypes"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("nvarchar(40)") - .HasMaxLength(40); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); - - b.Property("IsDefault") - .HasColumnName("IsDefault") - .HasColumnType("bit"); - - b.Property("IsPublic") - .HasColumnName("IsPublic") - .HasColumnType("bit"); - - b.Property("IsStatic") - .HasColumnName("IsStatic") - .HasColumnType("bit"); - - b.Property("Name") - .IsRequired() - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property("NormalizedName") - .IsRequired() - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedName"); - - b.ToTable("AbpRoles"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ClaimType") - .IsRequired() - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property("ClaimValue") - .HasColumnType("nvarchar(1024)") - .HasMaxLength(1024); - - b.Property("RoleId") - .HasColumnType("uniqueidentifier"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("Id"); - - b.HasIndex("RoleId"); - - b.ToTable("AbpRoleClaims"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("AccessFailedCount") - .ValueGeneratedOnAdd() - .HasColumnName("AccessFailedCount") - .HasColumnType("int") - .HasDefaultValue(0); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("nvarchar(40)") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); - - b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("uniqueidentifier"); - - b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime2"); - - b.Property("Email") - .IsRequired() - .HasColumnName("Email") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property("EmailConfirmed") - .ValueGeneratedOnAdd() - .HasColumnName("EmailConfirmed") - .HasColumnType("bit") - .HasDefaultValue(false); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") - .HasColumnType("bit") - .HasDefaultValue(false); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime2"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("uniqueidentifier"); - - b.Property("LockoutEnabled") - .ValueGeneratedOnAdd() - .HasColumnName("LockoutEnabled") - .HasColumnType("bit") - .HasDefaultValue(false); - - b.Property("LockoutEnd") - .HasColumnType("datetimeoffset"); - - b.Property("Name") - .HasColumnName("Name") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("NormalizedEmail") - .IsRequired() - .HasColumnName("NormalizedEmail") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property("NormalizedUserName") - .IsRequired() - .HasColumnName("NormalizedUserName") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property("PasswordHash") - .HasColumnName("PasswordHash") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property("PhoneNumber") - .HasColumnName("PhoneNumber") - .HasColumnType("nvarchar(16)") - .HasMaxLength(16); - - b.Property("PhoneNumberConfirmed") - .ValueGeneratedOnAdd() - .HasColumnName("PhoneNumberConfirmed") - .HasColumnType("bit") - .HasDefaultValue(false); - - b.Property("SecurityStamp") - .IsRequired() - .HasColumnName("SecurityStamp") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property("Surname") - .HasColumnName("Surname") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - b.Property("TwoFactorEnabled") - .ValueGeneratedOnAdd() - .HasColumnName("TwoFactorEnabled") - .HasColumnType("bit") - .HasDefaultValue(false); - - b.Property("UserName") - .IsRequired() - .HasColumnName("UserName") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.HasKey("Id"); - - b.HasIndex("Email"); - - b.HasIndex("NormalizedEmail"); - - b.HasIndex("NormalizedUserName"); - - b.HasIndex("UserName"); - - b.ToTable("AbpUsers"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ClaimType") - .IsRequired() - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property("ClaimValue") - .HasColumnType("nvarchar(1024)") - .HasMaxLength(1024); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - b.Property("UserId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("AbpUserClaims"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => - { - b.Property("UserId") - .HasColumnType("uniqueidentifier"); - - b.Property("LoginProvider") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("ProviderDisplayName") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); - - b.Property("ProviderKey") - .IsRequired() - .HasColumnType("nvarchar(196)") - .HasMaxLength(196); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("UserId", "LoginProvider"); - - b.HasIndex("LoginProvider", "ProviderKey"); - - b.ToTable("AbpUserLogins"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => - { - b.Property("OrganizationUnitId") - .HasColumnType("uniqueidentifier"); - - b.Property("UserId") - .HasColumnType("uniqueidentifier"); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("OrganizationUnitId", "UserId"); - - b.HasIndex("UserId", "OrganizationUnitId"); - - b.ToTable("AbpUserOrganizationUnits"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => - { - b.Property("UserId") - .HasColumnType("uniqueidentifier"); - - b.Property("RoleId") - .HasColumnType("uniqueidentifier"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("UserId", "RoleId"); - - b.HasIndex("RoleId", "UserId"); - - b.ToTable("AbpUserRoles"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => - { - b.Property("UserId") - .HasColumnType("uniqueidentifier"); - - b.Property("LoginProvider") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("Name") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - b.Property("Value") - .HasColumnType("nvarchar(max)"); - - b.HasKey("UserId", "LoginProvider", "Name"); - - b.ToTable("AbpUserTokens"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("Code") - .IsRequired() - .HasColumnName("Code") - .HasColumnType("nvarchar(95)") - .HasMaxLength(95); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("nvarchar(40)") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); - - b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("uniqueidentifier"); - - b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime2"); - - b.Property("DisplayName") - .IsRequired() - .HasColumnName("DisplayName") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") - .HasColumnType("bit") - .HasDefaultValue(false); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime2"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("uniqueidentifier"); - - b.Property("ParentId") - .HasColumnType("uniqueidentifier"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("Id"); - - b.HasIndex("Code"); - - b.HasIndex("ParentId"); - - b.ToTable("AbpOrganizationUnits"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => - { - b.Property("OrganizationUnitId") - .HasColumnType("uniqueidentifier"); - - b.Property("RoleId") - .HasColumnType("uniqueidentifier"); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("OrganizationUnitId", "RoleId"); - - b.HasIndex("RoleId", "OrganizationUnitId"); - - b.ToTable("AbpOrganizationUnitRoles"); - }); - - modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("Name") - .IsRequired() - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); - - b.Property("ProviderKey") - .IsRequired() - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("ProviderName") - .IsRequired() - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("Id"); - - b.HasIndex("Name", "ProviderName", "ProviderKey"); - - b.ToTable("AbpPermissionGrants"); - }); - - modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("Name") - .IsRequired() - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); - - b.Property("ProviderKey") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("ProviderName") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("Value") - .IsRequired() - .HasColumnType("nvarchar(2048)") - .HasMaxLength(2048); - - b.HasKey("Id"); - - b.HasIndex("Name", "ProviderName", "ProviderKey"); - - b.ToTable("AbpSettings"); - }); - - modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("nvarchar(40)") - .HasMaxLength(40); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); - - b.Property("DeleterId") - .HasColumnName("DeleterId") - .HasColumnType("uniqueidentifier"); - - b.Property("DeletionTime") - .HasColumnName("DeletionTime") - .HasColumnType("datetime2"); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnName("IsDeleted") - .HasColumnType("bit") - .HasDefaultValue(false); - - b.Property("LastModificationTime") - .HasColumnName("LastModificationTime") - .HasColumnType("datetime2"); - - b.Property("LastModifierId") - .HasColumnName("LastModifierId") - .HasColumnType("uniqueidentifier"); - - b.Property("Name") - .IsRequired() - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.HasKey("Id"); - - b.HasIndex("Name"); - - b.ToTable("AbpTenants"); - }); - - modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => - { - b.Property("TenantId") - .HasColumnType("uniqueidentifier"); - - b.Property("Name") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("Value") - .IsRequired() - .HasColumnType("nvarchar(1024)") - .HasMaxLength(1024); - - b.HasKey("TenantId", "Name"); - - b.ToTable("AbpTenantConnectionStrings"); - }); - - modelBuilder.Entity("Volo.CmsKit.Comments.Comment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); - - b.Property("EntityId") - .IsRequired() - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("EntityType") - .IsRequired() - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("RepliedCommentId") - .HasColumnType("uniqueidentifier"); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - b.Property("Text") - .IsRequired() - .HasColumnType("nvarchar(512)") - .HasMaxLength(512); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "RepliedCommentId"); - - b.HasIndex("TenantId", "EntityType", "EntityId"); - - b.ToTable("CmsComments"); - }); - - modelBuilder.Entity("Volo.CmsKit.Ratings.Rating", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); - - b.Property("EntityId") - .IsRequired() - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("EntityType") - .IsRequired() - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("StarCount") - .HasColumnType("smallint"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "EntityType", "EntityId"); - - b.ToTable("CmsRatings"); - }); - - modelBuilder.Entity("Volo.CmsKit.Reactions.UserReaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("CreationTime") - .HasColumnName("CreationTime") - .HasColumnType("datetime2"); - - b.Property("CreatorId") - .HasColumnName("CreatorId") - .HasColumnType("uniqueidentifier"); - - b.Property("EntityId") - .IsRequired() - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("EntityType") - .IsRequired() - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("ReactionName") - .IsRequired() - .HasColumnType("nvarchar(32)") - .HasMaxLength(32); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "EntityType", "EntityId", "ReactionName"); - - b.HasIndex("TenantId", "CreatorId", "EntityType", "EntityId", "ReactionName"); - - b.ToTable("CmsUserReactions"); - }); - - modelBuilder.Entity("Volo.CmsKit.Users.CmsUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnName("ConcurrencyStamp") - .HasColumnType("nvarchar(40)") - .HasMaxLength(40); - - b.Property("Email") - .IsRequired() - .HasColumnName("Email") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property("EmailConfirmed") - .ValueGeneratedOnAdd() - .HasColumnName("EmailConfirmed") - .HasColumnType("bit") - .HasDefaultValue(false); - - b.Property("ExtraProperties") - .HasColumnName("ExtraProperties") - .HasColumnType("nvarchar(max)"); - - b.Property("Name") - .HasColumnName("Name") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("PhoneNumber") - .HasColumnName("PhoneNumber") - .HasColumnType("nvarchar(16)") - .HasMaxLength(16); - - b.Property("PhoneNumberConfirmed") - .ValueGeneratedOnAdd() - .HasColumnName("PhoneNumberConfirmed") - .HasColumnType("bit") - .HasDefaultValue(false); - - b.Property("Surname") - .HasColumnName("Surname") - .HasColumnType("nvarchar(64)") - .HasMaxLength(64); - - b.Property("TenantId") - .HasColumnName("TenantId") - .HasColumnType("uniqueidentifier"); - - b.Property("UserName") - .IsRequired() - .HasColumnName("UserName") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Email"); - - b.HasIndex("TenantId", "UserName"); - - b.ToTable("CmsUsers"); - }); - - modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => - { - b.HasOne("Volo.Abp.AuditLogging.AuditLog", null) - .WithMany("Actions") - .HasForeignKey("AuditLogId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => - { - b.HasOne("Volo.Abp.AuditLogging.AuditLog", null) - .WithMany("EntityChanges") - .HasForeignKey("AuditLogId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => - { - b.HasOne("Volo.Abp.AuditLogging.EntityChange", null) - .WithMany("PropertyChanges") - .HasForeignKey("EntityChangeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => - { - b.HasOne("Volo.Abp.Identity.IdentityRole", null) - .WithMany("Claims") - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => - { - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Claims") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => - { - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Logins") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => - { - b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) - .WithMany() - .HasForeignKey("OrganizationUnitId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("OrganizationUnits") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => - { - b.HasOne("Volo.Abp.Identity.IdentityRole", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Roles") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => - { - b.HasOne("Volo.Abp.Identity.IdentityUser", null) - .WithMany("Tokens") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => - { - b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) - .WithMany() - .HasForeignKey("ParentId"); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => - { - b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) - .WithMany("Roles") - .HasForeignKey("OrganizationUnitId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Volo.Abp.Identity.IdentityRole", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => - { - b.HasOne("Volo.Abp.TenantManagement.Tenant", null) - .WithMany("ConnectionStrings") - .HasForeignKey("TenantId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); -#pragma warning restore 612, 618 - } - } -} +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; +using Volo.CmsKit.EntityFrameworkCore; + +namespace Volo.CmsKit.Migrations +{ + [DbContext(typeof(UnifiedDbContext))] + [Migration("20201013061938_Initial")] + partial class Initial + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) + .HasAnnotation("ProductVersion", "3.1.8") + .HasAnnotation("Relational:MaxIdentifierLength", 128) + .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ApplicationName") + .HasColumnName("ApplicationName") + .HasColumnType("nvarchar(96)") + .HasMaxLength(96); + + b.Property("BrowserInfo") + .HasColumnName("BrowserInfo") + .HasColumnType("nvarchar(512)") + .HasMaxLength(512); + + b.Property("ClientId") + .HasColumnName("ClientId") + .HasColumnType("nvarchar(64)") + .HasMaxLength(64); + + b.Property("ClientIpAddress") + .HasColumnName("ClientIpAddress") + .HasColumnType("nvarchar(64)") + .HasMaxLength(64); + + b.Property("ClientName") + .HasColumnName("ClientName") + .HasColumnType("nvarchar(128)") + .HasMaxLength(128); + + b.Property("Comments") + .HasColumnName("Comments") + .HasColumnType("nvarchar(256)") + .HasMaxLength(256); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(40)") + .HasMaxLength(40); + + b.Property("CorrelationId") + .HasColumnName("CorrelationId") + .HasColumnType("nvarchar(64)") + .HasMaxLength(64); + + b.Property("Exceptions") + .HasColumnName("Exceptions") + .HasColumnType("nvarchar(4000)") + .HasMaxLength(4000); + + b.Property("ExecutionDuration") + .HasColumnName("ExecutionDuration") + .HasColumnType("int"); + + b.Property("ExecutionTime") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); + + b.Property("HttpMethod") + .HasColumnName("HttpMethod") + .HasColumnType("nvarchar(16)") + .HasMaxLength(16); + + b.Property("HttpStatusCode") + .HasColumnName("HttpStatusCode") + .HasColumnType("int"); + + b.Property("ImpersonatorTenantId") + .HasColumnName("ImpersonatorTenantId") + .HasColumnType("uniqueidentifier"); + + b.Property("ImpersonatorUserId") + .HasColumnName("ImpersonatorUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnName("TenantId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantName") + .HasColumnType("nvarchar(max)"); + + b.Property("Url") + .HasColumnName("Url") + .HasColumnType("nvarchar(256)") + .HasMaxLength(256); + + b.Property("UserId") + .HasColumnName("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserName") + .HasColumnName("UserName") + .HasColumnType("nvarchar(256)") + .HasMaxLength(256); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "ExecutionTime"); + + b.HasIndex("TenantId", "UserId", "ExecutionTime"); + + b.ToTable("AbpAuditLogs"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AuditLogId") + .HasColumnName("AuditLogId") + .HasColumnType("uniqueidentifier"); + + b.Property("ExecutionDuration") + .HasColumnName("ExecutionDuration") + .HasColumnType("int"); + + b.Property("ExecutionTime") + .HasColumnName("ExecutionTime") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); + + b.Property("MethodName") + .HasColumnName("MethodName") + .HasColumnType("nvarchar(128)") + .HasMaxLength(128); + + b.Property("Parameters") + .HasColumnName("Parameters") + .HasColumnType("nvarchar(2000)") + .HasMaxLength(2000); + + b.Property("ServiceName") + .HasColumnName("ServiceName") + .HasColumnType("nvarchar(256)") + .HasMaxLength(256); + + b.Property("TenantId") + .HasColumnName("TenantId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("AuditLogId"); + + b.HasIndex("TenantId", "ServiceName", "MethodName", "ExecutionTime"); + + b.ToTable("AbpAuditLogActions"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AuditLogId") + .HasColumnName("AuditLogId") + .HasColumnType("uniqueidentifier"); + + b.Property("ChangeTime") + .HasColumnName("ChangeTime") + .HasColumnType("datetime2"); + + b.Property("ChangeType") + .HasColumnName("ChangeType") + .HasColumnType("tinyint"); + + b.Property("EntityId") + .IsRequired() + .HasColumnName("EntityId") + .HasColumnType("nvarchar(128)") + .HasMaxLength(128); + + b.Property("EntityTenantId") + .HasColumnType("uniqueidentifier"); + + b.Property("EntityTypeFullName") + .IsRequired() + .HasColumnName("EntityTypeFullName") + .HasColumnType("nvarchar(128)") + .HasMaxLength(128); + + b.Property("ExtraProperties") + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnName("TenantId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("AuditLogId"); + + b.HasIndex("TenantId", "EntityTypeFullName", "EntityId"); + + b.ToTable("AbpEntityChanges"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("EntityChangeId") + .HasColumnType("uniqueidentifier"); + + b.Property("NewValue") + .HasColumnName("NewValue") + .HasColumnType("nvarchar(512)") + .HasMaxLength(512); + + b.Property("OriginalValue") + .HasColumnName("OriginalValue") + .HasColumnType("nvarchar(512)") + .HasMaxLength(512); + + b.Property("PropertyName") + .IsRequired() + .HasColumnName("PropertyName") + .HasColumnType("nvarchar(128)") + .HasMaxLength(128); + + b.Property("PropertyTypeFullName") + .IsRequired() + .HasColumnName("PropertyTypeFullName") + .HasColumnType("nvarchar(64)") + .HasMaxLength(64); + + b.Property("TenantId") + .HasColumnName("TenantId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("EntityChangeId"); + + b.ToTable("AbpEntityPropertyChanges"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(40)") + .HasMaxLength(40); + + b.Property("Description") + .HasColumnType("nvarchar(256)") + .HasMaxLength(256); + + b.Property("ExtraProperties") + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); + + b.Property("IsStatic") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasColumnType("nvarchar(256)") + .HasMaxLength(256); + + b.Property("Regex") + .HasColumnType("nvarchar(512)") + .HasMaxLength(512); + + b.Property("RegexDescription") + .HasColumnType("nvarchar(128)") + .HasMaxLength(128); + + b.Property("Required") + .HasColumnType("bit"); + + b.Property("ValueType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("AbpClaimTypes"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(40)") + .HasMaxLength(40); + + b.Property("ExtraProperties") + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDefault") + .HasColumnName("IsDefault") + .HasColumnType("bit"); + + b.Property("IsPublic") + .HasColumnName("IsPublic") + .HasColumnType("bit"); + + b.Property("IsStatic") + .HasColumnName("IsStatic") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasColumnType("nvarchar(256)") + .HasMaxLength(256); + + b.Property("NormalizedName") + .IsRequired() + .HasColumnType("nvarchar(256)") + .HasMaxLength(256); + + b.Property("TenantId") + .HasColumnName("TenantId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("NormalizedName"); + + b.ToTable("AbpRoles"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClaimType") + .IsRequired() + .HasColumnType("nvarchar(256)") + .HasMaxLength(256); + + b.Property("ClaimValue") + .HasColumnType("nvarchar(1024)") + .HasMaxLength(1024); + + b.Property("RoleId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnName("TenantId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("RoleId"); + + b.ToTable("AbpRoleClaims"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AccessFailedCount") + .ValueGeneratedOnAdd() + .HasColumnName("AccessFailedCount") + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(40)") + .HasMaxLength(40); + + b.Property("CreationTime") + .HasColumnName("CreationTime") + .HasColumnType("datetime2"); + + b.Property("CreatorId") + .HasColumnName("CreatorId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleterId") + .HasColumnName("DeleterId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletionTime") + .HasColumnName("DeletionTime") + .HasColumnType("datetime2"); + + b.Property("Email") + .IsRequired() + .HasColumnName("Email") + .HasColumnType("nvarchar(256)") + .HasMaxLength(256); + + b.Property("EmailConfirmed") + .ValueGeneratedOnAdd() + .HasColumnName("EmailConfirmed") + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("ExtraProperties") + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnName("IsDeleted") + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("LastModificationTime") + .HasColumnName("LastModificationTime") + .HasColumnType("datetime2"); + + b.Property("LastModifierId") + .HasColumnName("LastModifierId") + .HasColumnType("uniqueidentifier"); + + b.Property("LockoutEnabled") + .ValueGeneratedOnAdd() + .HasColumnName("LockoutEnabled") + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("LockoutEnd") + .HasColumnType("datetimeoffset"); + + b.Property("Name") + .HasColumnName("Name") + .HasColumnType("nvarchar(64)") + .HasMaxLength(64); + + b.Property("NormalizedEmail") + .IsRequired() + .HasColumnName("NormalizedEmail") + .HasColumnType("nvarchar(256)") + .HasMaxLength(256); + + b.Property("NormalizedUserName") + .IsRequired() + .HasColumnName("NormalizedUserName") + .HasColumnType("nvarchar(256)") + .HasMaxLength(256); + + b.Property("PasswordHash") + .HasColumnName("PasswordHash") + .HasColumnType("nvarchar(256)") + .HasMaxLength(256); + + b.Property("PhoneNumber") + .HasColumnName("PhoneNumber") + .HasColumnType("nvarchar(16)") + .HasMaxLength(16); + + b.Property("PhoneNumberConfirmed") + .ValueGeneratedOnAdd() + .HasColumnName("PhoneNumberConfirmed") + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("SecurityStamp") + .IsRequired() + .HasColumnName("SecurityStamp") + .HasColumnType("nvarchar(256)") + .HasMaxLength(256); + + b.Property("Surname") + .HasColumnName("Surname") + .HasColumnType("nvarchar(64)") + .HasMaxLength(64); + + b.Property("TenantId") + .HasColumnName("TenantId") + .HasColumnType("uniqueidentifier"); + + b.Property("TwoFactorEnabled") + .ValueGeneratedOnAdd() + .HasColumnName("TwoFactorEnabled") + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("UserName") + .IsRequired() + .HasColumnName("UserName") + .HasColumnType("nvarchar(256)") + .HasMaxLength(256); + + b.HasKey("Id"); + + b.HasIndex("Email"); + + b.HasIndex("NormalizedEmail"); + + b.HasIndex("NormalizedUserName"); + + b.HasIndex("UserName"); + + b.ToTable("AbpUsers"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ClaimType") + .IsRequired() + .HasColumnType("nvarchar(256)") + .HasMaxLength(256); + + b.Property("ClaimValue") + .HasColumnType("nvarchar(1024)") + .HasMaxLength(1024); + + b.Property("TenantId") + .HasColumnName("TenantId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("AbpUserClaims"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => + { + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("LoginProvider") + .HasColumnType("nvarchar(64)") + .HasMaxLength(64); + + b.Property("ProviderDisplayName") + .HasColumnType("nvarchar(128)") + .HasMaxLength(128); + + b.Property("ProviderKey") + .IsRequired() + .HasColumnType("nvarchar(196)") + .HasMaxLength(196); + + b.Property("TenantId") + .HasColumnName("TenantId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("UserId", "LoginProvider"); + + b.HasIndex("LoginProvider", "ProviderKey"); + + b.ToTable("AbpUserLogins"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => + { + b.Property("OrganizationUnitId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnName("CreationTime") + .HasColumnType("datetime2"); + + b.Property("CreatorId") + .HasColumnName("CreatorId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnName("TenantId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("OrganizationUnitId", "UserId"); + + b.HasIndex("UserId", "OrganizationUnitId"); + + b.ToTable("AbpUserOrganizationUnits"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => + { + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("RoleId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnName("TenantId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("UserId", "RoleId"); + + b.HasIndex("RoleId", "UserId"); + + b.ToTable("AbpUserRoles"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => + { + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("LoginProvider") + .HasColumnType("nvarchar(64)") + .HasMaxLength(64); + + b.Property("Name") + .HasColumnType("nvarchar(128)") + .HasMaxLength(128); + + b.Property("TenantId") + .HasColumnName("TenantId") + .HasColumnType("uniqueidentifier"); + + b.Property("Value") + .HasColumnType("nvarchar(max)"); + + b.HasKey("UserId", "LoginProvider", "Name"); + + b.ToTable("AbpUserTokens"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasColumnName("Code") + .HasColumnType("nvarchar(95)") + .HasMaxLength(95); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(40)") + .HasMaxLength(40); + + b.Property("CreationTime") + .HasColumnName("CreationTime") + .HasColumnType("datetime2"); + + b.Property("CreatorId") + .HasColumnName("CreatorId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleterId") + .HasColumnName("DeleterId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletionTime") + .HasColumnName("DeletionTime") + .HasColumnType("datetime2"); + + b.Property("DisplayName") + .IsRequired() + .HasColumnName("DisplayName") + .HasColumnType("nvarchar(128)") + .HasMaxLength(128); + + b.Property("ExtraProperties") + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnName("IsDeleted") + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("LastModificationTime") + .HasColumnName("LastModificationTime") + .HasColumnType("datetime2"); + + b.Property("LastModifierId") + .HasColumnName("LastModifierId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnName("TenantId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("Code"); + + b.HasIndex("ParentId"); + + b.ToTable("AbpOrganizationUnits"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => + { + b.Property("OrganizationUnitId") + .HasColumnType("uniqueidentifier"); + + b.Property("RoleId") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnName("CreationTime") + .HasColumnType("datetime2"); + + b.Property("CreatorId") + .HasColumnName("CreatorId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnName("TenantId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("OrganizationUnitId", "RoleId"); + + b.HasIndex("RoleId", "OrganizationUnitId"); + + b.ToTable("AbpOrganizationUnitRoles"); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Name") + .IsRequired() + .HasColumnType("nvarchar(128)") + .HasMaxLength(128); + + b.Property("ProviderKey") + .IsRequired() + .HasColumnType("nvarchar(64)") + .HasMaxLength(64); + + b.Property("ProviderName") + .IsRequired() + .HasColumnType("nvarchar(64)") + .HasMaxLength(64); + + b.Property("TenantId") + .HasColumnName("TenantId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey"); + + b.ToTable("AbpPermissionGrants"); + }); + + modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Name") + .IsRequired() + .HasColumnType("nvarchar(128)") + .HasMaxLength(128); + + b.Property("ProviderKey") + .HasColumnType("nvarchar(64)") + .HasMaxLength(64); + + b.Property("ProviderName") + .HasColumnType("nvarchar(64)") + .HasMaxLength(64); + + b.Property("Value") + .IsRequired() + .HasColumnType("nvarchar(2048)") + .HasMaxLength(2048); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey"); + + b.ToTable("AbpSettings"); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(40)") + .HasMaxLength(40); + + b.Property("CreationTime") + .HasColumnName("CreationTime") + .HasColumnType("datetime2"); + + b.Property("CreatorId") + .HasColumnName("CreatorId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeleterId") + .HasColumnName("DeleterId") + .HasColumnType("uniqueidentifier"); + + b.Property("DeletionTime") + .HasColumnName("DeletionTime") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnName("IsDeleted") + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("LastModificationTime") + .HasColumnName("LastModificationTime") + .HasColumnType("datetime2"); + + b.Property("LastModifierId") + .HasColumnName("LastModifierId") + .HasColumnType("uniqueidentifier"); + + b.Property("Name") + .IsRequired() + .HasColumnType("nvarchar(64)") + .HasMaxLength(64); + + b.HasKey("Id"); + + b.HasIndex("Name"); + + b.ToTable("AbpTenants"); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => + { + b.Property("TenantId") + .HasColumnType("uniqueidentifier"); + + b.Property("Name") + .HasColumnType("nvarchar(64)") + .HasMaxLength(64); + + b.Property("Value") + .IsRequired() + .HasColumnType("nvarchar(1024)") + .HasMaxLength(1024); + + b.HasKey("TenantId", "Name"); + + b.ToTable("AbpTenantConnectionStrings"); + }); + + modelBuilder.Entity("Volo.CmsKit.Comments.Comment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnName("CreationTime") + .HasColumnType("datetime2"); + + b.Property("CreatorId") + .HasColumnName("CreatorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EntityId") + .IsRequired() + .HasColumnType("nvarchar(64)") + .HasMaxLength(64); + + b.Property("EntityType") + .IsRequired() + .HasColumnType("nvarchar(64)") + .HasMaxLength(64); + + b.Property("RepliedCommentId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnName("TenantId") + .HasColumnType("uniqueidentifier"); + + b.Property("Text") + .IsRequired() + .HasColumnType("nvarchar(512)") + .HasMaxLength(512); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "RepliedCommentId"); + + b.HasIndex("TenantId", "EntityType", "EntityId"); + + b.ToTable("CmsComments"); + }); + + modelBuilder.Entity("Volo.CmsKit.Ratings.Rating", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnName("CreationTime") + .HasColumnType("datetime2"); + + b.Property("CreatorId") + .HasColumnName("CreatorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EntityId") + .IsRequired() + .HasColumnType("nvarchar(64)") + .HasMaxLength(64); + + b.Property("EntityType") + .IsRequired() + .HasColumnType("nvarchar(64)") + .HasMaxLength(64); + + b.Property("StarCount") + .HasColumnType("smallint"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "EntityType", "EntityId", "CreatorId"); + + b.ToTable("CmsRatings"); + }); + + modelBuilder.Entity("Volo.CmsKit.Reactions.UserReaction", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnName("CreationTime") + .HasColumnType("datetime2"); + + b.Property("CreatorId") + .HasColumnName("CreatorId") + .HasColumnType("uniqueidentifier"); + + b.Property("EntityId") + .IsRequired() + .HasColumnType("nvarchar(64)") + .HasMaxLength(64); + + b.Property("EntityType") + .IsRequired() + .HasColumnType("nvarchar(64)") + .HasMaxLength(64); + + b.Property("ReactionName") + .IsRequired() + .HasColumnType("nvarchar(32)") + .HasMaxLength(32); + + b.Property("TenantId") + .HasColumnName("TenantId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "EntityType", "EntityId", "ReactionName"); + + b.HasIndex("TenantId", "CreatorId", "EntityType", "EntityId", "ReactionName"); + + b.ToTable("CmsUserReactions"); + }); + + modelBuilder.Entity("Volo.CmsKit.Users.CmsUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnName("ConcurrencyStamp") + .HasColumnType("nvarchar(40)") + .HasMaxLength(40); + + b.Property("Email") + .IsRequired() + .HasColumnName("Email") + .HasColumnType("nvarchar(256)") + .HasMaxLength(256); + + b.Property("EmailConfirmed") + .ValueGeneratedOnAdd() + .HasColumnName("EmailConfirmed") + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("ExtraProperties") + .HasColumnName("ExtraProperties") + .HasColumnType("nvarchar(max)"); + + b.Property("Name") + .HasColumnName("Name") + .HasColumnType("nvarchar(64)") + .HasMaxLength(64); + + b.Property("PhoneNumber") + .HasColumnName("PhoneNumber") + .HasColumnType("nvarchar(16)") + .HasMaxLength(16); + + b.Property("PhoneNumberConfirmed") + .ValueGeneratedOnAdd() + .HasColumnName("PhoneNumberConfirmed") + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("Surname") + .HasColumnName("Surname") + .HasColumnType("nvarchar(64)") + .HasMaxLength(64); + + b.Property("TenantId") + .HasColumnName("TenantId") + .HasColumnType("uniqueidentifier"); + + b.Property("UserName") + .IsRequired() + .HasColumnName("UserName") + .HasColumnType("nvarchar(256)") + .HasMaxLength(256); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Email"); + + b.HasIndex("TenantId", "UserName"); + + b.ToTable("CmsUsers"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => + { + b.HasOne("Volo.Abp.AuditLogging.AuditLog", null) + .WithMany("Actions") + .HasForeignKey("AuditLogId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => + { + b.HasOne("Volo.Abp.AuditLogging.AuditLog", null) + .WithMany("EntityChanges") + .HasForeignKey("AuditLogId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => + { + b.HasOne("Volo.Abp.AuditLogging.EntityChange", null) + .WithMany("PropertyChanges") + .HasForeignKey("EntityChangeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => + { + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany("Claims") + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Claims") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Logins") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany() + .HasForeignKey("OrganizationUnitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("OrganizationUnits") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => + { + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Roles") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Tokens") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany() + .HasForeignKey("ParentId"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany("Roles") + .HasForeignKey("OrganizationUnitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => + { + b.HasOne("Volo.Abp.TenantManagement.Tenant", null) + .WithMany("ConnectionStrings") + .HasForeignKey("TenantId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20200813130355_Initial.cs b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201013061938_Initial.cs similarity index 93% rename from modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20200813130355_Initial.cs rename to modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201013061938_Initial.cs index 9f2560f9c0..73df34b298 100644 --- a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20200813130355_Initial.cs +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20201013061938_Initial.cs @@ -213,6 +213,23 @@ namespace Volo.CmsKit.Migrations table.PrimaryKey("PK_CmsComments", x => x.Id); }); + migrationBuilder.CreateTable( + name: "CmsRatings", + columns: table => new + { + Id = table.Column(nullable: false), + TenantId = table.Column(nullable: true), + EntityType = table.Column(maxLength: 64, nullable: false), + EntityId = table.Column(maxLength: 64, nullable: false), + StarCount = table.Column(nullable: false), + CreatorId = table.Column(nullable: false), + CreationTime = table.Column(nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_CmsRatings", x => x.Id); + }); + migrationBuilder.CreateTable( name: "CmsUserReactions", columns: table => new @@ -622,24 +639,39 @@ namespace Volo.CmsKit.Migrations column: "UserName"); migrationBuilder.CreateIndex( - name: "IX_CmsComments_RepliedCommentId", + name: "IX_CmsComments_TenantId_RepliedCommentId", table: "CmsComments", - column: "RepliedCommentId"); + columns: new[] { "TenantId", "RepliedCommentId" }); migrationBuilder.CreateIndex( - name: "IX_CmsComments_EntityType_EntityId", + name: "IX_CmsComments_TenantId_EntityType_EntityId", table: "CmsComments", - columns: new[] { "EntityType", "EntityId" }); + columns: new[] { "TenantId", "EntityType", "EntityId" }); migrationBuilder.CreateIndex( - name: "IX_CmsUserReactions_EntityType_EntityId", + name: "IX_CmsRatings_TenantId_EntityType_EntityId_CreatorId", + table: "CmsRatings", + columns: new[] { "TenantId", "EntityType", "EntityId", "CreatorId" }); + + migrationBuilder.CreateIndex( + name: "IX_CmsUserReactions_TenantId_EntityType_EntityId_ReactionName", table: "CmsUserReactions", - columns: new[] { "EntityType", "EntityId" }); + columns: new[] { "TenantId", "EntityType", "EntityId", "ReactionName" }); migrationBuilder.CreateIndex( - name: "IX_CmsUserReactions_CreatorId_EntityType_EntityId_ReactionName", + name: "IX_CmsUserReactions_TenantId_CreatorId_EntityType_EntityId_ReactionName", table: "CmsUserReactions", - columns: new[] { "CreatorId", "EntityType", "EntityId", "ReactionName" }); + columns: new[] { "TenantId", "CreatorId", "EntityType", "EntityId", "ReactionName" }); + + migrationBuilder.CreateIndex( + name: "IX_CmsUsers_TenantId_Email", + table: "CmsUsers", + columns: new[] { "TenantId", "Email" }); + + migrationBuilder.CreateIndex( + name: "IX_CmsUsers_TenantId_UserName", + table: "CmsUsers", + columns: new[] { "TenantId", "UserName" }); } protected override void Down(MigrationBuilder migrationBuilder) @@ -686,6 +718,9 @@ namespace Volo.CmsKit.Migrations migrationBuilder.DropTable( name: "CmsComments"); + migrationBuilder.DropTable( + name: "CmsRatings"); + migrationBuilder.DropTable( name: "CmsUserReactions"); diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/UnifiedDbContextModelSnapshot.cs b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/UnifiedDbContextModelSnapshot.cs index 43d834479a..96721a1355 100644 --- a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/UnifiedDbContextModelSnapshot.cs +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/UnifiedDbContextModelSnapshot.cs @@ -17,7 +17,7 @@ namespace Volo.CmsKit.Migrations #pragma warning disable 612, 618 modelBuilder .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) - .HasAnnotation("ProductVersion", "3.1.6") + .HasAnnotation("ProductVersion", "3.1.8") .HasAnnotation("Relational:MaxIdentifierLength", 128) .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); @@ -989,7 +989,7 @@ namespace Volo.CmsKit.Migrations b.HasKey("Id"); - b.HasIndex("TenantId", "EntityType", "EntityId"); + b.HasIndex("TenantId", "EntityType", "EntityId", "CreatorId"); b.ToTable("CmsRatings"); }); 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 3b5450be78..c7a507d2b5 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 @@ -3,7 +3,7 @@ - netcoreapp3.1 + net5.0 Volo.CmsKit true Volo.CmsKit-c2d31439-b723-48e2-b061-5ebd7aeb6010 @@ -13,25 +13,27 @@ - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/package.json b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/package.json index 9b79ab6170..c035a75924 100644 --- a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/package.json +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/package.json @@ -3,6 +3,6 @@ "name": "my-app", "private": true, "dependencies": { - "@abp/aspnetcore.mvc.ui.theme.basic": "^3.2.0" + "@abp/aspnetcore.mvc.ui.theme.basic": "^3.3.0-rc.1" } } \ No newline at end of file diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/wwwroot/libs/abp/core/abp.js b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/wwwroot/libs/abp/core/abp.js index 20bd92147a..72af4bd106 100644 --- a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/wwwroot/libs/abp/core/abp.js +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/wwwroot/libs/abp/core/abp.js @@ -689,7 +689,7 @@ var abp = abp || {}; abp.security.antiForgery = abp.security.antiForgery || {}; abp.security.antiForgery.tokenCookieName = 'XSRF-TOKEN'; - abp.security.antiForgery.tokenHeaderName = 'X-XSRF-TOKEN'; + abp.security.antiForgery.tokenHeaderName = 'RequestVerificationToken'; abp.security.antiForgery.getToken = function () { return abp.utils.getCookieValue(abp.security.antiForgery.tokenCookieName); diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/wwwroot/libs/jquery/jquery.js b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/wwwroot/libs/jquery/jquery.js index 50937333b9..9b5206bcc6 100644 --- a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/wwwroot/libs/jquery/jquery.js +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/wwwroot/libs/jquery/jquery.js @@ -1,5 +1,5 @@ /*! - * jQuery JavaScript Library v3.5.1 + * jQuery JavaScript Library v3.3.1 * https://jquery.com/ * * Includes Sizzle.js @@ -9,7 +9,7 @@ * Released under the MIT license * https://jquery.org/license * - * Date: 2020-05-04T22:49Z + * Date: 2018-01-20T17:24Z */ ( function( global, factory ) { @@ -47,16 +47,13 @@ var arr = []; +var document = window.document; + var getProto = Object.getPrototypeOf; var slice = arr.slice; -var flat = arr.flat ? function( array ) { - return arr.flat.call( array ); -} : function( array ) { - return arr.concat.apply( [], array ); -}; - +var concat = arr.concat; var push = arr.push; @@ -89,40 +86,25 @@ var isWindow = function isWindow( obj ) { }; -var document = window.document; - var preservedScriptAttributes = { type: true, src: true, - nonce: true, noModule: true }; - function DOMEval( code, node, doc ) { + function DOMEval( code, doc, node ) { doc = doc || document; - var i, val, + var i, script = doc.createElement( "script" ); script.text = code; if ( node ) { for ( i in preservedScriptAttributes ) { - - // Support: Firefox 64+, Edge 18+ - // Some browsers don't support the "nonce" property on scripts. - // On the other hand, just using `getAttribute` is not enough as - // the `nonce` attribute is reset to an empty string whenever it - // becomes browsing-context connected. - // See https://github.com/whatwg/html/issues/2369 - // See https://html.spec.whatwg.org/#nonce-attributes - // The `node.getAttribute` check was added for the sake of - // `jQuery.globalEval` so that it can fake a nonce-containing node - // via an object. - val = node[ i ] || node.getAttribute && node.getAttribute( i ); - if ( val ) { - script.setAttribute( i, val ); + if ( node[ i ] ) { + script[ i ] = node[ i ]; } } } @@ -147,7 +129,7 @@ function toType( obj ) { var - version = "3.5.1", + version = "3.3.1", // Define a local copy of jQuery jQuery = function( selector, context ) { @@ -155,7 +137,11 @@ var // The jQuery object is actually just the init constructor 'enhanced' // Need init if jQuery is called (just allow error to be thrown if not included) return new jQuery.fn.init( selector, context ); - }; + }, + + // Support: Android <=4.0 only + // Make sure we trim BOM and NBSP + rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g; jQuery.fn = jQuery.prototype = { @@ -221,18 +207,6 @@ jQuery.fn = jQuery.prototype = { return this.eq( -1 ); }, - even: function() { - return this.pushStack( jQuery.grep( this, function( _elem, i ) { - return ( i + 1 ) % 2; - } ) ); - }, - - odd: function() { - return this.pushStack( jQuery.grep( this, function( _elem, i ) { - return i % 2; - } ) ); - }, - eq: function( i ) { var len = this.length, j = +i + ( i < 0 ? len : 0 ); @@ -284,28 +258,25 @@ jQuery.extend = jQuery.fn.extend = function() { // Extend the base object for ( name in options ) { + src = target[ name ]; copy = options[ name ]; - // Prevent Object.prototype pollution // Prevent never-ending loop - if ( name === "__proto__" || target === copy ) { + if ( target === copy ) { continue; } // Recurse if we're merging plain objects or arrays if ( deep && copy && ( jQuery.isPlainObject( copy ) || ( copyIsArray = Array.isArray( copy ) ) ) ) { - src = target[ name ]; - // Ensure proper type for the source value - if ( copyIsArray && !Array.isArray( src ) ) { - clone = []; - } else if ( !copyIsArray && !jQuery.isPlainObject( src ) ) { - clone = {}; + if ( copyIsArray ) { + copyIsArray = false; + clone = src && Array.isArray( src ) ? src : []; + } else { - clone = src; + clone = src && jQuery.isPlainObject( src ) ? src : {}; } - copyIsArray = false; // Never move original objects, clone them target[ name ] = jQuery.extend( deep, clone, copy ); @@ -358,6 +329,9 @@ jQuery.extend( { }, isEmptyObject: function( obj ) { + + /* eslint-disable no-unused-vars */ + // See https://github.com/eslint/eslint/issues/6125 var name; for ( name in obj ) { @@ -366,10 +340,9 @@ jQuery.extend( { return true; }, - // Evaluates a script in a provided context; falls back to the global one - // if not specified. - globalEval: function( code, options, doc ) { - DOMEval( code, { nonce: options && options.nonce }, doc ); + // Evaluates a script in a global context + globalEval: function( code ) { + DOMEval( code ); }, each: function( obj, callback ) { @@ -393,6 +366,13 @@ jQuery.extend( { return obj; }, + // Support: Android <=4.0 only + trim: function( text ) { + return text == null ? + "" : + ( text + "" ).replace( rtrim, "" ); + }, + // results is for internal usage only makeArray: function( arr, results ) { var ret = results || []; @@ -479,7 +459,7 @@ jQuery.extend( { } // Flatten any nested arrays - return flat( ret ); + return concat.apply( [], ret ); }, // A global GUID counter for objects @@ -496,7 +476,7 @@ if ( typeof Symbol === "function" ) { // Populate the class2type map jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ), -function( _i, name ) { +function( i, name ) { class2type[ "[object " + name + "]" ] = name.toLowerCase(); } ); @@ -518,16 +498,17 @@ function isArrayLike( obj ) { } var Sizzle = /*! - * Sizzle CSS Selector Engine v2.3.5 + * Sizzle CSS Selector Engine v2.3.3 * https://sizzlejs.com/ * - * Copyright JS Foundation and other contributors + * Copyright jQuery Foundation and other contributors * Released under the MIT license - * https://js.foundation/ + * http://jquery.org/license * - * Date: 2020-03-14 + * Date: 2016-08-08 */ -( function( window ) { +(function( window ) { + var i, support, Expr, @@ -558,7 +539,6 @@ var i, classCache = createCache(), tokenCache = createCache(), compilerCache = createCache(), - nonnativeSelectorCache = createCache(), sortOrder = function( a, b ) { if ( a === b ) { hasDuplicate = true; @@ -567,71 +547,61 @@ var i, }, // Instance methods - hasOwn = ( {} ).hasOwnProperty, + hasOwn = ({}).hasOwnProperty, arr = [], pop = arr.pop, - pushNative = arr.push, + push_native = arr.push, push = arr.push, slice = arr.slice, - // Use a stripped-down indexOf as it's faster than native // https://jsperf.com/thor-indexof-vs-for/5 indexOf = function( list, elem ) { var i = 0, len = list.length; for ( ; i < len; i++ ) { - if ( list[ i ] === elem ) { + if ( list[i] === elem ) { return i; } } return -1; }, - booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|" + - "ismap|loop|multiple|open|readonly|required|scoped", + booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", // Regular expressions // http://www.w3.org/TR/css3-selectors/#whitespace whitespace = "[\\x20\\t\\r\\n\\f]", - // https://www.w3.org/TR/css-syntax-3/#ident-token-diagram - identifier = "(?:\\\\[\\da-fA-F]{1,6}" + whitespace + - "?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+", + // http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier + identifier = "(?:\\\\.|[\\w-]|[^\0-\\xa0])+", // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace + - // Operator (capture 2) "*([*^$|!~]?=)" + whitespace + - - // "Attribute values must be CSS identifiers [capture 5] - // or strings [capture 3 or capture 4]" - "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + - whitespace + "*\\]", + // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]" + "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace + + "*\\]", pseudos = ":(" + identifier + ")(?:\\((" + - // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments: // 1. quoted (capture 3; capture 4 or capture 5) "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" + - // 2. simple (capture 6) "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" + - // 3. anything else (capture 2) ".*" + ")\\)|)", // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter rwhitespace = new RegExp( whitespace + "+", "g" ), - rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + - whitespace + "+$", "g" ), + rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ), rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), - rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + - "*" ), - rdescend = new RegExp( whitespace + "|>" ), + rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ), + + rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g" ), rpseudo = new RegExp( pseudos ), ridentifier = new RegExp( "^" + identifier + "$" ), @@ -642,19 +612,16 @@ var i, "TAG": new RegExp( "^(" + identifier + "|[*])" ), "ATTR": new RegExp( "^" + attributes ), "PSEUDO": new RegExp( "^" + pseudos ), - "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + - whitespace + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + - whitespace + "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), + "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + + "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), "bool": new RegExp( "^(?:" + booleans + ")$", "i" ), - // For use in libraries implementing .is() // We use this for POS matching in `select` - "needsContext": new RegExp( "^" + whitespace + - "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + whitespace + - "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) + "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + + whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) }, - rhtml = /HTML$/i, rinputs = /^(?:input|select|textarea|button)$/i, rheader = /^h\d$/i, @@ -667,21 +634,18 @@ var i, // CSS escapes // http://www.w3.org/TR/CSS21/syndata.html#escaped-characters - runescape = new RegExp( "\\\\[\\da-fA-F]{1,6}" + whitespace + "?|\\\\([^\\r\\n\\f])", "g" ), - funescape = function( escape, nonHex ) { - var high = "0x" + escape.slice( 1 ) - 0x10000; - - return nonHex ? - - // Strip the backslash prefix from a non-hex escape sequence - nonHex : - - // Replace a hexadecimal escape sequence with the encoded Unicode code point - // Support: IE <=11+ - // For values outside the Basic Multilingual Plane (BMP), manually construct a - // surrogate pair + runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ), + funescape = function( _, escaped, escapedWhitespace ) { + var high = "0x" + escaped - 0x10000; + // NaN means non-codepoint + // Support: Firefox<24 + // Workaround erroneous numeric interpretation of +"0x" + return high !== high || escapedWhitespace ? + escaped : high < 0 ? + // BMP codepoint String.fromCharCode( high + 0x10000 ) : + // Supplemental Plane codepoint (surrogate pair) String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); }, @@ -697,8 +661,7 @@ var i, } // Control characters and (dependent upon position) numbers get escaped as code points - return ch.slice( 0, -1 ) + "\\" + - ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " "; + return ch.slice( 0, -1 ) + "\\" + ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " "; } // Other potentially-special ASCII characters get backslash-escaped @@ -713,9 +676,9 @@ var i, setDocument(); }, - inDisabledFieldset = addCombinator( + disabledAncestor = addCombinator( function( elem ) { - return elem.disabled === true && elem.nodeName.toLowerCase() === "fieldset"; + return elem.disabled === true && ("form" in elem || "label" in elem); }, { dir: "parentNode", next: "legend" } ); @@ -723,20 +686,18 @@ var i, // Optimize for push.apply( _, NodeList ) try { push.apply( - ( arr = slice.call( preferredDoc.childNodes ) ), + (arr = slice.call( preferredDoc.childNodes )), preferredDoc.childNodes ); - // Support: Android<4.0 // Detect silently failing push.apply - // eslint-disable-next-line no-unused-expressions arr[ preferredDoc.childNodes.length ].nodeType; } catch ( e ) { push = { apply: arr.length ? // Leverage slice if possible function( target, els ) { - pushNative.apply( target, slice.call( els ) ); + push_native.apply( target, slice.call(els) ); } : // Support: IE<9 @@ -744,9 +705,8 @@ try { function( target, els ) { var j = target.length, i = 0; - // Can't trust NodeList.length - while ( ( target[ j++ ] = els[ i++ ] ) ) {} + while ( (target[j++] = els[i++]) ) {} target.length = j - 1; } }; @@ -770,21 +730,24 @@ function Sizzle( selector, context, results, seed ) { // Try to shortcut find operations (as opposed to filters) in HTML documents if ( !seed ) { - setDocument( context ); + + if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) { + setDocument( context ); + } context = context || document; if ( documentIsHTML ) { // If the selector is sufficiently simple, try using a "get*By*" DOM method // (excepting DocumentFragment context, where the methods don't exist) - if ( nodeType !== 11 && ( match = rquickExpr.exec( selector ) ) ) { + if ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) { // ID selector - if ( ( m = match[ 1 ] ) ) { + if ( (m = match[1]) ) { // Document context if ( nodeType === 9 ) { - if ( ( elem = context.getElementById( m ) ) ) { + if ( (elem = context.getElementById( m )) ) { // Support: IE, Opera, Webkit // TODO: identify versions @@ -803,7 +766,7 @@ function Sizzle( selector, context, results, seed ) { // Support: IE, Opera, Webkit // TODO: identify versions // getElementById can match elements by name instead of ID - if ( newContext && ( elem = newContext.getElementById( m ) ) && + if ( newContext && (elem = newContext.getElementById( m )) && contains( context, elem ) && elem.id === m ) { @@ -813,12 +776,12 @@ function Sizzle( selector, context, results, seed ) { } // Type selector - } else if ( match[ 2 ] ) { + } else if ( match[2] ) { push.apply( results, context.getElementsByTagName( selector ) ); return results; // Class selector - } else if ( ( m = match[ 3 ] ) && support.getElementsByClassName && + } else if ( (m = match[3]) && support.getElementsByClassName && context.getElementsByClassName ) { push.apply( results, context.getElementsByClassName( m ) ); @@ -828,62 +791,50 @@ function Sizzle( selector, context, results, seed ) { // Take advantage of querySelectorAll if ( support.qsa && - !nonnativeSelectorCache[ selector + " " ] && - ( !rbuggyQSA || !rbuggyQSA.test( selector ) ) && - - // Support: IE 8 only - // Exclude object elements - ( nodeType !== 1 || context.nodeName.toLowerCase() !== "object" ) ) { - - newSelector = selector; - newContext = context; - - // qSA considers elements outside a scoping root when evaluating child or - // descendant combinators, which is not what we want. - // In such cases, we work around the behavior by prefixing every selector in the - // list with an ID selector referencing the scope context. - // The technique has to be used as well when a leading combinator is used - // as such selectors are not recognized by querySelectorAll. - // Thanks to Andrew Dupont for this technique. - if ( nodeType === 1 && - ( rdescend.test( selector ) || rcombinators.test( selector ) ) ) { + !compilerCache[ selector + " " ] && + (!rbuggyQSA || !rbuggyQSA.test( selector )) ) { - // Expand context for sibling selectors - newContext = rsibling.test( selector ) && testContext( context.parentNode ) || - context; + if ( nodeType !== 1 ) { + newContext = context; + newSelector = selector; - // We can use :scope instead of the ID hack if the browser - // supports it & if we're not changing the context. - if ( newContext !== context || !support.scope ) { + // qSA looks outside Element context, which is not what we want + // Thanks to Andrew Dupont for this workaround technique + // Support: IE <=8 + // Exclude object elements + } else if ( context.nodeName.toLowerCase() !== "object" ) { - // Capture the context ID, setting it first if necessary - if ( ( nid = context.getAttribute( "id" ) ) ) { - nid = nid.replace( rcssescape, fcssescape ); - } else { - context.setAttribute( "id", ( nid = expando ) ); - } + // Capture the context ID, setting it first if necessary + if ( (nid = context.getAttribute( "id" )) ) { + nid = nid.replace( rcssescape, fcssescape ); + } else { + context.setAttribute( "id", (nid = expando) ); } // Prefix every selector in the list groups = tokenize( selector ); i = groups.length; while ( i-- ) { - groups[ i ] = ( nid ? "#" + nid : ":scope" ) + " " + - toSelector( groups[ i ] ); + groups[i] = "#" + nid + " " + toSelector( groups[i] ); } newSelector = groups.join( "," ); + + // Expand context for sibling selectors + newContext = rsibling.test( selector ) && testContext( context.parentNode ) || + context; } - try { - push.apply( results, - newContext.querySelectorAll( newSelector ) - ); - return results; - } catch ( qsaError ) { - nonnativeSelectorCache( selector, true ); - } finally { - if ( nid === expando ) { - context.removeAttribute( "id" ); + if ( newSelector ) { + try { + push.apply( results, + newContext.querySelectorAll( newSelector ) + ); + return results; + } catch ( qsaError ) { + } finally { + if ( nid === expando ) { + context.removeAttribute( "id" ); + } } } } @@ -904,14 +855,12 @@ function createCache() { var keys = []; function cache( key, value ) { - // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) if ( keys.push( key + " " ) > Expr.cacheLength ) { - // Only keep the most recent entries delete cache[ keys.shift() ]; } - return ( cache[ key + " " ] = value ); + return (cache[ key + " " ] = value); } return cache; } @@ -930,19 +879,17 @@ function markFunction( fn ) { * @param {Function} fn Passed the created element and returns a boolean result */ function assert( fn ) { - var el = document.createElement( "fieldset" ); + var el = document.createElement("fieldset"); try { return !!fn( el ); - } catch ( e ) { + } catch (e) { return false; } finally { - // Remove from its parent by default if ( el.parentNode ) { el.parentNode.removeChild( el ); } - // release memory in IE el = null; } @@ -954,11 +901,11 @@ function assert( fn ) { * @param {Function} handler The method that will be applied */ function addHandle( attrs, handler ) { - var arr = attrs.split( "|" ), + var arr = attrs.split("|"), i = arr.length; while ( i-- ) { - Expr.attrHandle[ arr[ i ] ] = handler; + Expr.attrHandle[ arr[i] ] = handler; } } @@ -980,7 +927,7 @@ function siblingCheck( a, b ) { // Check if b follows a if ( cur ) { - while ( ( cur = cur.nextSibling ) ) { + while ( (cur = cur.nextSibling) ) { if ( cur === b ) { return -1; } @@ -1008,7 +955,7 @@ function createInputPseudo( type ) { function createButtonPseudo( type ) { return function( elem ) { var name = elem.nodeName.toLowerCase(); - return ( name === "input" || name === "button" ) && elem.type === type; + return (name === "input" || name === "button") && elem.type === type; }; } @@ -1051,7 +998,7 @@ function createDisabledPseudo( disabled ) { // Where there is no isDisabled, check manually /* jshint -W018 */ elem.isDisabled !== !disabled && - inDisabledFieldset( elem ) === disabled; + disabledAncestor( elem ) === disabled; } return elem.disabled === disabled; @@ -1073,21 +1020,21 @@ function createDisabledPseudo( disabled ) { * @param {Function} fn */ function createPositionalPseudo( fn ) { - return markFunction( function( argument ) { + return markFunction(function( argument ) { argument = +argument; - return markFunction( function( seed, matches ) { + return markFunction(function( seed, matches ) { var j, matchIndexes = fn( [], seed.length, argument ), i = matchIndexes.length; // Match elements found at the specified indexes while ( i-- ) { - if ( seed[ ( j = matchIndexes[ i ] ) ] ) { - seed[ j ] = !( matches[ j ] = seed[ j ] ); + if ( seed[ (j = matchIndexes[i]) ] ) { + seed[j] = !(matches[j] = seed[j]); } } - } ); - } ); + }); + }); } /** @@ -1108,13 +1055,10 @@ support = Sizzle.support = {}; * @returns {Boolean} True iff elem is a non-HTML XML node */ isXML = Sizzle.isXML = function( elem ) { - var namespace = elem.namespaceURI, - docElem = ( elem.ownerDocument || elem ).documentElement; - - // Support: IE <=8 - // Assume HTML when documentElement doesn't yet exist, such as inside loading iframes - // https://bugs.jquery.com/ticket/4833 - return !rhtml.test( namespace || docElem && docElem.nodeName || "HTML" ); + // documentElement is verified for cases where it doesn't yet exist + // (such as loading iframes in IE - #4833) + var documentElement = elem && (elem.ownerDocument || elem).documentElement; + return documentElement ? documentElement.nodeName !== "HTML" : false; }; /** @@ -1127,11 +1071,7 @@ setDocument = Sizzle.setDocument = function( node ) { doc = node ? node.ownerDocument || node : preferredDoc; // Return early if doc is invalid or already selected - // Support: IE 11+, Edge 17 - 18+ - // IE/Edge sometimes throw a "Permission denied" error when strict-comparing - // two documents; shallow comparisons work. - // eslint-disable-next-line eqeqeq - if ( doc == document || doc.nodeType !== 9 || !doc.documentElement ) { + if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) { return document; } @@ -1140,14 +1080,10 @@ setDocument = Sizzle.setDocument = function( node ) { docElem = document.documentElement; documentIsHTML = !isXML( document ); - // Support: IE 9 - 11+, Edge 12 - 18+ + // Support: IE 9-11, Edge // Accessing iframe documents after unload throws "permission denied" errors (jQuery #13936) - // Support: IE 11+, Edge 17 - 18+ - // IE/Edge sometimes throw a "Permission denied" error when strict-comparing - // two documents; shallow comparisons work. - // eslint-disable-next-line eqeqeq - if ( preferredDoc != document && - ( subWindow = document.defaultView ) && subWindow.top !== subWindow ) { + if ( preferredDoc !== document && + (subWindow = document.defaultView) && subWindow.top !== subWindow ) { // Support: IE 11, Edge if ( subWindow.addEventListener ) { @@ -1159,36 +1095,25 @@ setDocument = Sizzle.setDocument = function( node ) { } } - // Support: IE 8 - 11+, Edge 12 - 18+, Chrome <=16 - 25 only, Firefox <=3.6 - 31 only, - // Safari 4 - 5 only, Opera <=11.6 - 12.x only - // IE/Edge & older browsers don't support the :scope pseudo-class. - // Support: Safari 6.0 only - // Safari 6.0 supports :scope but it's an alias of :root there. - support.scope = assert( function( el ) { - docElem.appendChild( el ).appendChild( document.createElement( "div" ) ); - return typeof el.querySelectorAll !== "undefined" && - !el.querySelectorAll( ":scope fieldset div" ).length; - } ); - /* Attributes ---------------------------------------------------------------------- */ // Support: IE<8 // Verify that getAttribute really returns attributes and not properties // (excepting IE8 booleans) - support.attributes = assert( function( el ) { + support.attributes = assert(function( el ) { el.className = "i"; - return !el.getAttribute( "className" ); - } ); + return !el.getAttribute("className"); + }); /* getElement(s)By* ---------------------------------------------------------------------- */ // Check if getElementsByTagName("*") returns only elements - support.getElementsByTagName = assert( function( el ) { - el.appendChild( document.createComment( "" ) ); - return !el.getElementsByTagName( "*" ).length; - } ); + support.getElementsByTagName = assert(function( el ) { + el.appendChild( document.createComment("") ); + return !el.getElementsByTagName("*").length; + }); // Support: IE<9 support.getElementsByClassName = rnative.test( document.getElementsByClassName ); @@ -1197,38 +1122,38 @@ setDocument = Sizzle.setDocument = function( node ) { // Check if getElementById returns elements by name // The broken getElementById methods don't pick up programmatically-set names, // so use a roundabout getElementsByName test - support.getById = assert( function( el ) { + support.getById = assert(function( el ) { docElem.appendChild( el ).id = expando; return !document.getElementsByName || !document.getElementsByName( expando ).length; - } ); + }); // ID filter and find if ( support.getById ) { - Expr.filter[ "ID" ] = function( id ) { + Expr.filter["ID"] = function( id ) { var attrId = id.replace( runescape, funescape ); return function( elem ) { - return elem.getAttribute( "id" ) === attrId; + return elem.getAttribute("id") === attrId; }; }; - Expr.find[ "ID" ] = function( id, context ) { + Expr.find["ID"] = function( id, context ) { if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { var elem = context.getElementById( id ); return elem ? [ elem ] : []; } }; } else { - Expr.filter[ "ID" ] = function( id ) { + Expr.filter["ID"] = function( id ) { var attrId = id.replace( runescape, funescape ); return function( elem ) { var node = typeof elem.getAttributeNode !== "undefined" && - elem.getAttributeNode( "id" ); + elem.getAttributeNode("id"); return node && node.value === attrId; }; }; // Support: IE 6 - 7 only // getElementById is not reliable as a find shortcut - Expr.find[ "ID" ] = function( id, context ) { + Expr.find["ID"] = function( id, context ) { if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { var node, i, elems, elem = context.getElementById( id ); @@ -1236,7 +1161,7 @@ setDocument = Sizzle.setDocument = function( node ) { if ( elem ) { // Verify the id attribute - node = elem.getAttributeNode( "id" ); + node = elem.getAttributeNode("id"); if ( node && node.value === id ) { return [ elem ]; } @@ -1244,8 +1169,8 @@ setDocument = Sizzle.setDocument = function( node ) { // Fall back on getElementsByName elems = context.getElementsByName( id ); i = 0; - while ( ( elem = elems[ i++ ] ) ) { - node = elem.getAttributeNode( "id" ); + while ( (elem = elems[i++]) ) { + node = elem.getAttributeNode("id"); if ( node && node.value === id ) { return [ elem ]; } @@ -1258,7 +1183,7 @@ setDocument = Sizzle.setDocument = function( node ) { } // Tag - Expr.find[ "TAG" ] = support.getElementsByTagName ? + Expr.find["TAG"] = support.getElementsByTagName ? function( tag, context ) { if ( typeof context.getElementsByTagName !== "undefined" ) { return context.getElementsByTagName( tag ); @@ -1273,13 +1198,12 @@ setDocument = Sizzle.setDocument = function( node ) { var elem, tmp = [], i = 0, - // By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too results = context.getElementsByTagName( tag ); // Filter out possible comments if ( tag === "*" ) { - while ( ( elem = results[ i++ ] ) ) { + while ( (elem = results[i++]) ) { if ( elem.nodeType === 1 ) { tmp.push( elem ); } @@ -1291,7 +1215,7 @@ setDocument = Sizzle.setDocument = function( node ) { }; // Class - Expr.find[ "CLASS" ] = support.getElementsByClassName && function( className, context ) { + Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) { if ( typeof context.getElementsByClassName !== "undefined" && documentIsHTML ) { return context.getElementsByClassName( className ); } @@ -1312,14 +1236,10 @@ setDocument = Sizzle.setDocument = function( node ) { // See https://bugs.jquery.com/ticket/13378 rbuggyQSA = []; - if ( ( support.qsa = rnative.test( document.querySelectorAll ) ) ) { - + if ( (support.qsa = rnative.test( document.querySelectorAll )) ) { // Build QSA regex // Regex strategy adopted from Diego Perini - assert( function( el ) { - - var input; - + assert(function( el ) { // Select is set to empty string on purpose // This is to test IE's treatment of not explicitly // setting a boolean content attribute, @@ -1333,98 +1253,78 @@ setDocument = Sizzle.setDocument = function( node ) { // Nothing should be selected when empty strings follow ^= or $= or *= // The test attribute must be unknown in Opera but "safe" for WinRT // https://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section - if ( el.querySelectorAll( "[msallowcapture^='']" ).length ) { + if ( el.querySelectorAll("[msallowcapture^='']").length ) { rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" ); } // Support: IE8 // Boolean attributes and "value" are not treated correctly - if ( !el.querySelectorAll( "[selected]" ).length ) { + if ( !el.querySelectorAll("[selected]").length ) { rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" ); } // Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+ if ( !el.querySelectorAll( "[id~=" + expando + "-]" ).length ) { - rbuggyQSA.push( "~=" ); - } - - // Support: IE 11+, Edge 15 - 18+ - // IE 11/Edge don't find elements on a `[name='']` query in some cases. - // Adding a temporary attribute to the document before the selection works - // around the issue. - // Interestingly, IE 10 & older don't seem to have the issue. - input = document.createElement( "input" ); - input.setAttribute( "name", "" ); - el.appendChild( input ); - if ( !el.querySelectorAll( "[name='']" ).length ) { - rbuggyQSA.push( "\\[" + whitespace + "*name" + whitespace + "*=" + - whitespace + "*(?:''|\"\")" ); + rbuggyQSA.push("~="); } // Webkit/Opera - :checked should return selected option elements // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked // IE8 throws error here and will not see later tests - if ( !el.querySelectorAll( ":checked" ).length ) { - rbuggyQSA.push( ":checked" ); + if ( !el.querySelectorAll(":checked").length ) { + rbuggyQSA.push(":checked"); } // Support: Safari 8+, iOS 8+ // https://bugs.webkit.org/show_bug.cgi?id=136851 // In-page `selector#id sibling-combinator selector` fails if ( !el.querySelectorAll( "a#" + expando + "+*" ).length ) { - rbuggyQSA.push( ".#.+[+~]" ); + rbuggyQSA.push(".#.+[+~]"); } + }); - // Support: Firefox <=3.6 - 5 only - // Old Firefox doesn't throw on a badly-escaped identifier. - el.querySelectorAll( "\\\f" ); - rbuggyQSA.push( "[\\r\\n\\f]" ); - } ); - - assert( function( el ) { + assert(function( el ) { el.innerHTML = "" + ""; // Support: Windows 8 Native Apps // The type and name attributes are restricted during .innerHTML assignment - var input = document.createElement( "input" ); + var input = document.createElement("input"); input.setAttribute( "type", "hidden" ); el.appendChild( input ).setAttribute( "name", "D" ); // Support: IE8 // Enforce case-sensitivity of name attribute - if ( el.querySelectorAll( "[name=d]" ).length ) { + if ( el.querySelectorAll("[name=d]").length ) { rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" ); } // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) // IE8 throws error here and will not see later tests - if ( el.querySelectorAll( ":enabled" ).length !== 2 ) { + if ( el.querySelectorAll(":enabled").length !== 2 ) { rbuggyQSA.push( ":enabled", ":disabled" ); } // Support: IE9-11+ // IE's :disabled selector does not pick up the children of disabled fieldsets docElem.appendChild( el ).disabled = true; - if ( el.querySelectorAll( ":disabled" ).length !== 2 ) { + if ( el.querySelectorAll(":disabled").length !== 2 ) { rbuggyQSA.push( ":enabled", ":disabled" ); } - // Support: Opera 10 - 11 only // Opera 10-11 does not throw on post-comma invalid pseudos - el.querySelectorAll( "*,:x" ); - rbuggyQSA.push( ",.*:" ); - } ); + el.querySelectorAll("*,:x"); + rbuggyQSA.push(",.*:"); + }); } - if ( ( support.matchesSelector = rnative.test( ( matches = docElem.matches || + if ( (support.matchesSelector = rnative.test( (matches = docElem.matches || docElem.webkitMatchesSelector || docElem.mozMatchesSelector || docElem.oMatchesSelector || - docElem.msMatchesSelector ) ) ) ) { - - assert( function( el ) { + docElem.msMatchesSelector) )) ) { + assert(function( el ) { // Check to see if it's possible to do matchesSelector // on a disconnected node (IE 9) support.disconnectedMatch = matches.call( el, "*" ); @@ -1433,11 +1333,11 @@ setDocument = Sizzle.setDocument = function( node ) { // Gecko does not error, returns false instead matches.call( el, "[s!='']:x" ); rbuggyMatches.push( "!=", pseudos ); - } ); + }); } - rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join( "|" ) ); - rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join( "|" ) ); + rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") ); + rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") ); /* Contains ---------------------------------------------------------------------- */ @@ -1454,11 +1354,11 @@ setDocument = Sizzle.setDocument = function( node ) { adown.contains ? adown.contains( bup ) : a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16 - ) ); + )); } : function( a, b ) { if ( b ) { - while ( ( b = b.parentNode ) ) { + while ( (b = b.parentNode) ) { if ( b === a ) { return true; } @@ -1487,11 +1387,7 @@ setDocument = Sizzle.setDocument = function( node ) { } // Calculate position if both inputs belong to the same document - // Support: IE 11+, Edge 17 - 18+ - // IE/Edge sometimes throw a "Permission denied" error when strict-comparing - // two documents; shallow comparisons work. - // eslint-disable-next-line eqeqeq - compare = ( a.ownerDocument || a ) == ( b.ownerDocument || b ) ? + compare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ? a.compareDocumentPosition( b ) : // Otherwise we know they are disconnected @@ -1499,24 +1395,13 @@ setDocument = Sizzle.setDocument = function( node ) { // Disconnected nodes if ( compare & 1 || - ( !support.sortDetached && b.compareDocumentPosition( a ) === compare ) ) { + (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) { // Choose the first element that is related to our preferred document - // Support: IE 11+, Edge 17 - 18+ - // IE/Edge sometimes throw a "Permission denied" error when strict-comparing - // two documents; shallow comparisons work. - // eslint-disable-next-line eqeqeq - if ( a == document || a.ownerDocument == preferredDoc && - contains( preferredDoc, a ) ) { + if ( a === document || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) { return -1; } - - // Support: IE 11+, Edge 17 - 18+ - // IE/Edge sometimes throw a "Permission denied" error when strict-comparing - // two documents; shallow comparisons work. - // eslint-disable-next-line eqeqeq - if ( b == document || b.ownerDocument == preferredDoc && - contains( preferredDoc, b ) ) { + if ( b === document || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) { return 1; } @@ -1529,7 +1414,6 @@ setDocument = Sizzle.setDocument = function( node ) { return compare & 4 ? -1 : 1; } : function( a, b ) { - // Exit early if the nodes are identical if ( a === b ) { hasDuplicate = true; @@ -1545,14 +1429,8 @@ setDocument = Sizzle.setDocument = function( node ) { // Parentless nodes are either documents or disconnected if ( !aup || !bup ) { - - // Support: IE 11+, Edge 17 - 18+ - // IE/Edge sometimes throw a "Permission denied" error when strict-comparing - // two documents; shallow comparisons work. - /* eslint-disable eqeqeq */ - return a == document ? -1 : - b == document ? 1 : - /* eslint-enable eqeqeq */ + return a === document ? -1 : + b === document ? 1 : aup ? -1 : bup ? 1 : sortInput ? @@ -1566,32 +1444,26 @@ setDocument = Sizzle.setDocument = function( node ) { // Otherwise we need full lists of their ancestors for comparison cur = a; - while ( ( cur = cur.parentNode ) ) { + while ( (cur = cur.parentNode) ) { ap.unshift( cur ); } cur = b; - while ( ( cur = cur.parentNode ) ) { + while ( (cur = cur.parentNode) ) { bp.unshift( cur ); } // Walk down the tree looking for a discrepancy - while ( ap[ i ] === bp[ i ] ) { + while ( ap[i] === bp[i] ) { i++; } return i ? - // Do a sibling check if the nodes have a common ancestor - siblingCheck( ap[ i ], bp[ i ] ) : + siblingCheck( ap[i], bp[i] ) : // Otherwise nodes in our document sort first - // Support: IE 11+, Edge 17 - 18+ - // IE/Edge sometimes throw a "Permission denied" error when strict-comparing - // two documents; shallow comparisons work. - /* eslint-disable eqeqeq */ - ap[ i ] == preferredDoc ? -1 : - bp[ i ] == preferredDoc ? 1 : - /* eslint-enable eqeqeq */ + ap[i] === preferredDoc ? -1 : + bp[i] === preferredDoc ? 1 : 0; }; @@ -1603,10 +1475,16 @@ Sizzle.matches = function( expr, elements ) { }; Sizzle.matchesSelector = function( elem, expr ) { - setDocument( elem ); + // Set document vars if needed + if ( ( elem.ownerDocument || elem ) !== document ) { + setDocument( elem ); + } + + // Make sure that attribute selectors are quoted + expr = expr.replace( rattributeQuotes, "='$1']" ); if ( support.matchesSelector && documentIsHTML && - !nonnativeSelectorCache[ expr + " " ] && + !compilerCache[ expr + " " ] && ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) && ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) { @@ -1615,46 +1493,32 @@ Sizzle.matchesSelector = function( elem, expr ) { // IE 9's matchesSelector returns false on disconnected nodes if ( ret || support.disconnectedMatch || - - // As well, disconnected nodes are said to be in a document - // fragment in IE 9 - elem.document && elem.document.nodeType !== 11 ) { + // As well, disconnected nodes are said to be in a document + // fragment in IE 9 + elem.document && elem.document.nodeType !== 11 ) { return ret; } - } catch ( e ) { - nonnativeSelectorCache( expr, true ); - } + } catch (e) {} } return Sizzle( expr, document, null, [ elem ] ).length > 0; }; Sizzle.contains = function( context, elem ) { - // Set document vars if needed - // Support: IE 11+, Edge 17 - 18+ - // IE/Edge sometimes throw a "Permission denied" error when strict-comparing - // two documents; shallow comparisons work. - // eslint-disable-next-line eqeqeq - if ( ( context.ownerDocument || context ) != document ) { + if ( ( context.ownerDocument || context ) !== document ) { setDocument( context ); } return contains( context, elem ); }; Sizzle.attr = function( elem, name ) { - // Set document vars if needed - // Support: IE 11+, Edge 17 - 18+ - // IE/Edge sometimes throw a "Permission denied" error when strict-comparing - // two documents; shallow comparisons work. - // eslint-disable-next-line eqeqeq - if ( ( elem.ownerDocument || elem ) != document ) { + if ( ( elem.ownerDocument || elem ) !== document ) { setDocument( elem ); } var fn = Expr.attrHandle[ name.toLowerCase() ], - // Don't get fooled by Object.prototype properties (jQuery #13807) val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ? fn( elem, name, !documentIsHTML ) : @@ -1664,13 +1528,13 @@ Sizzle.attr = function( elem, name ) { val : support.attributes || !documentIsHTML ? elem.getAttribute( name ) : - ( val = elem.getAttributeNode( name ) ) && val.specified ? + (val = elem.getAttributeNode(name)) && val.specified ? val.value : null; }; Sizzle.escape = function( sel ) { - return ( sel + "" ).replace( rcssescape, fcssescape ); + return (sel + "").replace( rcssescape, fcssescape ); }; Sizzle.error = function( msg ) { @@ -1693,7 +1557,7 @@ Sizzle.uniqueSort = function( results ) { results.sort( sortOrder ); if ( hasDuplicate ) { - while ( ( elem = results[ i++ ] ) ) { + while ( (elem = results[i++]) ) { if ( elem === results[ i ] ) { j = duplicates.push( i ); } @@ -1721,21 +1585,17 @@ getText = Sizzle.getText = function( elem ) { nodeType = elem.nodeType; if ( !nodeType ) { - // If no nodeType, this is expected to be an array - while ( ( node = elem[ i++ ] ) ) { - + while ( (node = elem[i++]) ) { // Do not traverse comment nodes ret += getText( node ); } } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { - // Use textContent for elements // innerText usage removed for consistency of new lines (jQuery #11153) if ( typeof elem.textContent === "string" ) { return elem.textContent; } else { - // Traverse its children for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { ret += getText( elem ); @@ -1744,7 +1604,6 @@ getText = Sizzle.getText = function( elem ) { } else if ( nodeType === 3 || nodeType === 4 ) { return elem.nodeValue; } - // Do not include comment or processing instruction nodes return ret; @@ -1772,21 +1631,19 @@ Expr = Sizzle.selectors = { preFilter: { "ATTR": function( match ) { - match[ 1 ] = match[ 1 ].replace( runescape, funescape ); + match[1] = match[1].replace( runescape, funescape ); // Move the given value to match[3] whether quoted or unquoted - match[ 3 ] = ( match[ 3 ] || match[ 4 ] || - match[ 5 ] || "" ).replace( runescape, funescape ); + match[3] = ( match[3] || match[4] || match[5] || "" ).replace( runescape, funescape ); - if ( match[ 2 ] === "~=" ) { - match[ 3 ] = " " + match[ 3 ] + " "; + if ( match[2] === "~=" ) { + match[3] = " " + match[3] + " "; } return match.slice( 0, 4 ); }, "CHILD": function( match ) { - /* matches from matchExpr["CHILD"] 1 type (only|nth|...) 2 what (child|of-type) @@ -1797,25 +1654,22 @@ Expr = Sizzle.selectors = { 7 sign of y-component 8 y of y-component */ - match[ 1 ] = match[ 1 ].toLowerCase(); - - if ( match[ 1 ].slice( 0, 3 ) === "nth" ) { + match[1] = match[1].toLowerCase(); + if ( match[1].slice( 0, 3 ) === "nth" ) { // nth-* requires argument - if ( !match[ 3 ] ) { - Sizzle.error( match[ 0 ] ); + if ( !match[3] ) { + Sizzle.error( match[0] ); } // numeric x and y parameters for Expr.filter.CHILD // remember that false/true cast respectively to 0/1 - match[ 4 ] = +( match[ 4 ] ? - match[ 5 ] + ( match[ 6 ] || 1 ) : - 2 * ( match[ 3 ] === "even" || match[ 3 ] === "odd" ) ); - match[ 5 ] = +( ( match[ 7 ] + match[ 8 ] ) || match[ 3 ] === "odd" ); + match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) ); + match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" ); - // other types prohibit arguments - } else if ( match[ 3 ] ) { - Sizzle.error( match[ 0 ] ); + // other types prohibit arguments + } else if ( match[3] ) { + Sizzle.error( match[0] ); } return match; @@ -1823,28 +1677,26 @@ Expr = Sizzle.selectors = { "PSEUDO": function( match ) { var excess, - unquoted = !match[ 6 ] && match[ 2 ]; + unquoted = !match[6] && match[2]; - if ( matchExpr[ "CHILD" ].test( match[ 0 ] ) ) { + if ( matchExpr["CHILD"].test( match[0] ) ) { return null; } // Accept quoted arguments as-is - if ( match[ 3 ] ) { - match[ 2 ] = match[ 4 ] || match[ 5 ] || ""; + if ( match[3] ) { + match[2] = match[4] || match[5] || ""; // Strip excess characters from unquoted arguments } else if ( unquoted && rpseudo.test( unquoted ) && - // Get excess from tokenize (recursively) - ( excess = tokenize( unquoted, true ) ) && - + (excess = tokenize( unquoted, true )) && // advance to the next closing parenthesis - ( excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length ) ) { + (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) { // excess is a negative index - match[ 0 ] = match[ 0 ].slice( 0, excess ); - match[ 2 ] = unquoted.slice( 0, excess ); + match[0] = match[0].slice( 0, excess ); + match[2] = unquoted.slice( 0, excess ); } // Return only captures needed by the pseudo filter method (type and argument) @@ -1857,9 +1709,7 @@ Expr = Sizzle.selectors = { "TAG": function( nodeNameSelector ) { var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase(); return nodeNameSelector === "*" ? - function() { - return true; - } : + function() { return true; } : function( elem ) { return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; }; @@ -1869,16 +1719,10 @@ Expr = Sizzle.selectors = { var pattern = classCache[ className + " " ]; return pattern || - ( pattern = new RegExp( "(^|" + whitespace + - ")" + className + "(" + whitespace + "|$)" ) ) && classCache( - className, function( elem ) { - return pattern.test( - typeof elem.className === "string" && elem.className || - typeof elem.getAttribute !== "undefined" && - elem.getAttribute( "class" ) || - "" - ); - } ); + (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) && + classCache( className, function( elem ) { + return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== "undefined" && elem.getAttribute("class") || "" ); + }); }, "ATTR": function( name, operator, check ) { @@ -1894,8 +1738,6 @@ Expr = Sizzle.selectors = { result += ""; - /* eslint-disable max-len */ - return operator === "=" ? result === check : operator === "!=" ? result !== check : operator === "^=" ? check && result.indexOf( check ) === 0 : @@ -1904,12 +1746,10 @@ Expr = Sizzle.selectors = { operator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 : operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" : false; - /* eslint-enable max-len */ - }; }, - "CHILD": function( type, what, _argument, first, last ) { + "CHILD": function( type, what, argument, first, last ) { var simple = type.slice( 0, 3 ) !== "nth", forward = type.slice( -4 ) !== "last", ofType = what === "of-type"; @@ -1921,7 +1761,7 @@ Expr = Sizzle.selectors = { return !!elem.parentNode; } : - function( elem, _context, xml ) { + function( elem, context, xml ) { var cache, uniqueCache, outerCache, node, nodeIndex, start, dir = simple !== forward ? "nextSibling" : "previousSibling", parent = elem.parentNode, @@ -1935,7 +1775,7 @@ Expr = Sizzle.selectors = { if ( simple ) { while ( dir ) { node = elem; - while ( ( node = node[ dir ] ) ) { + while ( (node = node[ dir ]) ) { if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) { @@ -1943,7 +1783,6 @@ Expr = Sizzle.selectors = { return false; } } - // Reverse direction for :only-* (if we haven't yet done so) start = dir = type === "only" && !start && "nextSibling"; } @@ -1959,22 +1798,22 @@ Expr = Sizzle.selectors = { // ...in a gzip-friendly way node = parent; - outerCache = node[ expando ] || ( node[ expando ] = {} ); + outerCache = node[ expando ] || (node[ expando ] = {}); // Support: IE <9 only // Defend against cloned attroperties (jQuery gh-1709) uniqueCache = outerCache[ node.uniqueID ] || - ( outerCache[ node.uniqueID ] = {} ); + (outerCache[ node.uniqueID ] = {}); cache = uniqueCache[ type ] || []; nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; diff = nodeIndex && cache[ 2 ]; node = nodeIndex && parent.childNodes[ nodeIndex ]; - while ( ( node = ++nodeIndex && node && node[ dir ] || + while ( (node = ++nodeIndex && node && node[ dir ] || // Fallback to seeking `elem` from the start - ( diff = nodeIndex = 0 ) || start.pop() ) ) { + (diff = nodeIndex = 0) || start.pop()) ) { // When found, cache indexes on `parent` and break if ( node.nodeType === 1 && ++diff && node === elem ) { @@ -1984,18 +1823,16 @@ Expr = Sizzle.selectors = { } } else { - // Use previously-cached element index if available if ( useCache ) { - // ...in a gzip-friendly way node = elem; - outerCache = node[ expando ] || ( node[ expando ] = {} ); + outerCache = node[ expando ] || (node[ expando ] = {}); // Support: IE <9 only // Defend against cloned attroperties (jQuery gh-1709) uniqueCache = outerCache[ node.uniqueID ] || - ( outerCache[ node.uniqueID ] = {} ); + (outerCache[ node.uniqueID ] = {}); cache = uniqueCache[ type ] || []; nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; @@ -2005,10 +1842,9 @@ Expr = Sizzle.selectors = { // xml :nth-child(...) // or :nth-last-child(...) or :nth(-last)?-of-type(...) if ( diff === false ) { - // Use the same loop as above to seek `elem` from the start - while ( ( node = ++nodeIndex && node && node[ dir ] || - ( diff = nodeIndex = 0 ) || start.pop() ) ) { + while ( (node = ++nodeIndex && node && node[ dir ] || + (diff = nodeIndex = 0) || start.pop()) ) { if ( ( ofType ? node.nodeName.toLowerCase() === name : @@ -2017,13 +1853,12 @@ Expr = Sizzle.selectors = { // Cache the index of each encountered element if ( useCache ) { - outerCache = node[ expando ] || - ( node[ expando ] = {} ); + outerCache = node[ expando ] || (node[ expando ] = {}); // Support: IE <9 only // Defend against cloned attroperties (jQuery gh-1709) uniqueCache = outerCache[ node.uniqueID ] || - ( outerCache[ node.uniqueID ] = {} ); + (outerCache[ node.uniqueID ] = {}); uniqueCache[ type ] = [ dirruns, diff ]; } @@ -2044,7 +1879,6 @@ Expr = Sizzle.selectors = { }, "PSEUDO": function( pseudo, argument ) { - // pseudo-class names are case-insensitive // http://www.w3.org/TR/selectors/#pseudo-classes // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters @@ -2064,15 +1898,15 @@ Expr = Sizzle.selectors = { if ( fn.length > 1 ) { args = [ pseudo, pseudo, "", argument ]; return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? - markFunction( function( seed, matches ) { + markFunction(function( seed, matches ) { var idx, matched = fn( seed, argument ), i = matched.length; while ( i-- ) { - idx = indexOf( seed, matched[ i ] ); - seed[ idx ] = !( matches[ idx ] = matched[ i ] ); + idx = indexOf( seed, matched[i] ); + seed[ idx ] = !( matches[ idx ] = matched[i] ); } - } ) : + }) : function( elem ) { return fn( elem, 0, args ); }; @@ -2083,10 +1917,8 @@ Expr = Sizzle.selectors = { }, pseudos: { - // Potentially complex pseudos - "not": markFunction( function( selector ) { - + "not": markFunction(function( selector ) { // Trim the selector passed to compile // to avoid treating leading and trailing // spaces as combinators @@ -2095,40 +1927,39 @@ Expr = Sizzle.selectors = { matcher = compile( selector.replace( rtrim, "$1" ) ); return matcher[ expando ] ? - markFunction( function( seed, matches, _context, xml ) { + markFunction(function( seed, matches, context, xml ) { var elem, unmatched = matcher( seed, null, xml, [] ), i = seed.length; // Match elements unmatched by `matcher` while ( i-- ) { - if ( ( elem = unmatched[ i ] ) ) { - seed[ i ] = !( matches[ i ] = elem ); + if ( (elem = unmatched[i]) ) { + seed[i] = !(matches[i] = elem); } } - } ) : - function( elem, _context, xml ) { - input[ 0 ] = elem; + }) : + function( elem, context, xml ) { + input[0] = elem; matcher( input, null, xml, results ); - // Don't keep the element (issue #299) - input[ 0 ] = null; + input[0] = null; return !results.pop(); }; - } ), + }), - "has": markFunction( function( selector ) { + "has": markFunction(function( selector ) { return function( elem ) { return Sizzle( selector, elem ).length > 0; }; - } ), + }), - "contains": markFunction( function( text ) { + "contains": markFunction(function( text ) { text = text.replace( runescape, funescape ); return function( elem ) { - return ( elem.textContent || getText( elem ) ).indexOf( text ) > -1; + return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1; }; - } ), + }), // "Whether an element is represented by a :lang() selector // is based solely on the element's language value @@ -2138,26 +1969,25 @@ Expr = Sizzle.selectors = { // The identifier C does not have to be a valid language name." // http://www.w3.org/TR/selectors/#lang-pseudo "lang": markFunction( function( lang ) { - // lang value must be a valid identifier - if ( !ridentifier.test( lang || "" ) ) { + if ( !ridentifier.test(lang || "") ) { Sizzle.error( "unsupported lang: " + lang ); } lang = lang.replace( runescape, funescape ).toLowerCase(); return function( elem ) { var elemLang; do { - if ( ( elemLang = documentIsHTML ? + if ( (elemLang = documentIsHTML ? elem.lang : - elem.getAttribute( "xml:lang" ) || elem.getAttribute( "lang" ) ) ) { + elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) { elemLang = elemLang.toLowerCase(); return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0; } - } while ( ( elem = elem.parentNode ) && elem.nodeType === 1 ); + } while ( (elem = elem.parentNode) && elem.nodeType === 1 ); return false; }; - } ), + }), // Miscellaneous "target": function( elem ) { @@ -2170,9 +2000,7 @@ Expr = Sizzle.selectors = { }, "focus": function( elem ) { - return elem === document.activeElement && - ( !document.hasFocus || document.hasFocus() ) && - !!( elem.type || elem.href || ~elem.tabIndex ); + return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex); }, // Boolean properties @@ -2180,20 +2008,16 @@ Expr = Sizzle.selectors = { "disabled": createDisabledPseudo( true ), "checked": function( elem ) { - // In CSS3, :checked should return both checked and selected elements // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked var nodeName = elem.nodeName.toLowerCase(); - return ( nodeName === "input" && !!elem.checked ) || - ( nodeName === "option" && !!elem.selected ); + return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected); }, "selected": function( elem ) { - // Accessing this property makes selected-by-default // options in Safari work properly if ( elem.parentNode ) { - // eslint-disable-next-line no-unused-expressions elem.parentNode.selectedIndex; } @@ -2202,7 +2026,6 @@ Expr = Sizzle.selectors = { // Contents "empty": function( elem ) { - // http://www.w3.org/TR/selectors/#empty-pseudo // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5), // but not by others (comment: 8; processing instruction: 7; etc.) @@ -2216,7 +2039,7 @@ Expr = Sizzle.selectors = { }, "parent": function( elem ) { - return !Expr.pseudos[ "empty" ]( elem ); + return !Expr.pseudos["empty"]( elem ); }, // Element/input types @@ -2240,62 +2063,57 @@ Expr = Sizzle.selectors = { // Support: IE<8 // New HTML5 attribute values (e.g., "search") appear with elem.type === "text" - ( ( attr = elem.getAttribute( "type" ) ) == null || - attr.toLowerCase() === "text" ); + ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text" ); }, // Position-in-collection - "first": createPositionalPseudo( function() { + "first": createPositionalPseudo(function() { return [ 0 ]; - } ), + }), - "last": createPositionalPseudo( function( _matchIndexes, length ) { + "last": createPositionalPseudo(function( matchIndexes, length ) { return [ length - 1 ]; - } ), + }), - "eq": createPositionalPseudo( function( _matchIndexes, length, argument ) { + "eq": createPositionalPseudo(function( matchIndexes, length, argument ) { return [ argument < 0 ? argument + length : argument ]; - } ), + }), - "even": createPositionalPseudo( function( matchIndexes, length ) { + "even": createPositionalPseudo(function( matchIndexes, length ) { var i = 0; for ( ; i < length; i += 2 ) { matchIndexes.push( i ); } return matchIndexes; - } ), + }), - "odd": createPositionalPseudo( function( matchIndexes, length ) { + "odd": createPositionalPseudo(function( matchIndexes, length ) { var i = 1; for ( ; i < length; i += 2 ) { matchIndexes.push( i ); } return matchIndexes; - } ), + }), - "lt": createPositionalPseudo( function( matchIndexes, length, argument ) { - var i = argument < 0 ? - argument + length : - argument > length ? - length : - argument; + "lt": createPositionalPseudo(function( matchIndexes, length, argument ) { + var i = argument < 0 ? argument + length : argument; for ( ; --i >= 0; ) { matchIndexes.push( i ); } return matchIndexes; - } ), + }), - "gt": createPositionalPseudo( function( matchIndexes, length, argument ) { + "gt": createPositionalPseudo(function( matchIndexes, length, argument ) { var i = argument < 0 ? argument + length : argument; for ( ; ++i < length; ) { matchIndexes.push( i ); } return matchIndexes; - } ) + }) } }; -Expr.pseudos[ "nth" ] = Expr.pseudos[ "eq" ]; +Expr.pseudos["nth"] = Expr.pseudos["eq"]; // Add button/input type pseudos for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) { @@ -2326,39 +2144,37 @@ tokenize = Sizzle.tokenize = function( selector, parseOnly ) { while ( soFar ) { // Comma and first run - if ( !matched || ( match = rcomma.exec( soFar ) ) ) { + if ( !matched || (match = rcomma.exec( soFar )) ) { if ( match ) { - // Don't consume trailing commas as valid - soFar = soFar.slice( match[ 0 ].length ) || soFar; + soFar = soFar.slice( match[0].length ) || soFar; } - groups.push( ( tokens = [] ) ); + groups.push( (tokens = []) ); } matched = false; // Combinators - if ( ( match = rcombinators.exec( soFar ) ) ) { + if ( (match = rcombinators.exec( soFar )) ) { matched = match.shift(); - tokens.push( { + tokens.push({ value: matched, - // Cast descendant combinators to space - type: match[ 0 ].replace( rtrim, " " ) - } ); + type: match[0].replace( rtrim, " " ) + }); soFar = soFar.slice( matched.length ); } // Filters for ( type in Expr.filter ) { - if ( ( match = matchExpr[ type ].exec( soFar ) ) && ( !preFilters[ type ] || - ( match = preFilters[ type ]( match ) ) ) ) { + if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] || + (match = preFilters[ type ]( match ))) ) { matched = match.shift(); - tokens.push( { + tokens.push({ value: matched, type: type, matches: match - } ); + }); soFar = soFar.slice( matched.length ); } } @@ -2375,7 +2191,6 @@ tokenize = Sizzle.tokenize = function( selector, parseOnly ) { soFar.length : soFar ? Sizzle.error( selector ) : - // Cache the tokens tokenCache( selector, groups ).slice( 0 ); }; @@ -2385,7 +2200,7 @@ function toSelector( tokens ) { len = tokens.length, selector = ""; for ( ; i < len; i++ ) { - selector += tokens[ i ].value; + selector += tokens[i].value; } return selector; } @@ -2398,10 +2213,9 @@ function addCombinator( matcher, combinator, base ) { doneName = done++; return combinator.first ? - // Check against closest ancestor/preceding element function( elem, context, xml ) { - while ( ( elem = elem[ dir ] ) ) { + while ( (elem = elem[ dir ]) ) { if ( elem.nodeType === 1 || checkNonElements ) { return matcher( elem, context, xml ); } @@ -2416,7 +2230,7 @@ function addCombinator( matcher, combinator, base ) { // We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching if ( xml ) { - while ( ( elem = elem[ dir ] ) ) { + while ( (elem = elem[ dir ]) ) { if ( elem.nodeType === 1 || checkNonElements ) { if ( matcher( elem, context, xml ) ) { return true; @@ -2424,29 +2238,27 @@ function addCombinator( matcher, combinator, base ) { } } } else { - while ( ( elem = elem[ dir ] ) ) { + while ( (elem = elem[ dir ]) ) { if ( elem.nodeType === 1 || checkNonElements ) { - outerCache = elem[ expando ] || ( elem[ expando ] = {} ); + outerCache = elem[ expando ] || (elem[ expando ] = {}); // Support: IE <9 only // Defend against cloned attroperties (jQuery gh-1709) - uniqueCache = outerCache[ elem.uniqueID ] || - ( outerCache[ elem.uniqueID ] = {} ); + uniqueCache = outerCache[ elem.uniqueID ] || (outerCache[ elem.uniqueID ] = {}); if ( skip && skip === elem.nodeName.toLowerCase() ) { elem = elem[ dir ] || elem; - } else if ( ( oldCache = uniqueCache[ key ] ) && + } else if ( (oldCache = uniqueCache[ key ]) && oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) { // Assign to newCache so results back-propagate to previous elements - return ( newCache[ 2 ] = oldCache[ 2 ] ); + return (newCache[ 2 ] = oldCache[ 2 ]); } else { - // Reuse newcache so results back-propagate to previous elements uniqueCache[ key ] = newCache; // A match means we're done; a fail means we have to keep checking - if ( ( newCache[ 2 ] = matcher( elem, context, xml ) ) ) { + if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) { return true; } } @@ -2462,20 +2274,20 @@ function elementMatcher( matchers ) { function( elem, context, xml ) { var i = matchers.length; while ( i-- ) { - if ( !matchers[ i ]( elem, context, xml ) ) { + if ( !matchers[i]( elem, context, xml ) ) { return false; } } return true; } : - matchers[ 0 ]; + matchers[0]; } function multipleContexts( selector, contexts, results ) { var i = 0, len = contexts.length; for ( ; i < len; i++ ) { - Sizzle( selector, contexts[ i ], results ); + Sizzle( selector, contexts[i], results ); } return results; } @@ -2488,7 +2300,7 @@ function condense( unmatched, map, filter, context, xml ) { mapped = map != null; for ( ; i < len; i++ ) { - if ( ( elem = unmatched[ i ] ) ) { + if ( (elem = unmatched[i]) ) { if ( !filter || filter( elem, context, xml ) ) { newUnmatched.push( elem ); if ( mapped ) { @@ -2508,18 +2320,14 @@ function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postS if ( postFinder && !postFinder[ expando ] ) { postFinder = setMatcher( postFinder, postSelector ); } - return markFunction( function( seed, results, context, xml ) { + return markFunction(function( seed, results, context, xml ) { var temp, i, elem, preMap = [], postMap = [], preexisting = results.length, // Get initial elements from seed or context - elems = seed || multipleContexts( - selector || "*", - context.nodeType ? [ context ] : context, - [] - ), + elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ), // Prefilter to get matcher input, preserving a map for seed-results synchronization matcherIn = preFilter && ( seed || !selector ) ? @@ -2527,7 +2335,6 @@ function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postS elems, matcherOut = matcher ? - // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, postFinder || ( seed ? preFilter : preexisting || postFilter ) ? @@ -2551,8 +2358,8 @@ function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postS // Un-match failing elements by moving them back to matcherIn i = temp.length; while ( i-- ) { - if ( ( elem = temp[ i ] ) ) { - matcherOut[ postMap[ i ] ] = !( matcherIn[ postMap[ i ] ] = elem ); + if ( (elem = temp[i]) ) { + matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem); } } } @@ -2560,27 +2367,25 @@ function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postS if ( seed ) { if ( postFinder || preFilter ) { if ( postFinder ) { - // Get the final matcherOut by condensing this intermediate into postFinder contexts temp = []; i = matcherOut.length; while ( i-- ) { - if ( ( elem = matcherOut[ i ] ) ) { - + if ( (elem = matcherOut[i]) ) { // Restore matcherIn since elem is not yet a final match - temp.push( ( matcherIn[ i ] = elem ) ); + temp.push( (matcherIn[i] = elem) ); } } - postFinder( null, ( matcherOut = [] ), temp, xml ); + postFinder( null, (matcherOut = []), temp, xml ); } // Move matched elements from seed to results to keep them synchronized i = matcherOut.length; while ( i-- ) { - if ( ( elem = matcherOut[ i ] ) && - ( temp = postFinder ? indexOf( seed, elem ) : preMap[ i ] ) > -1 ) { + if ( (elem = matcherOut[i]) && + (temp = postFinder ? indexOf( seed, elem ) : preMap[i]) > -1 ) { - seed[ temp ] = !( results[ temp ] = elem ); + seed[temp] = !(results[temp] = elem); } } } @@ -2598,14 +2403,14 @@ function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postS push.apply( results, matcherOut ); } } - } ); + }); } function matcherFromTokens( tokens ) { var checkContext, matcher, j, len = tokens.length, - leadingRelative = Expr.relative[ tokens[ 0 ].type ], - implicitRelative = leadingRelative || Expr.relative[ " " ], + leadingRelative = Expr.relative[ tokens[0].type ], + implicitRelative = leadingRelative || Expr.relative[" "], i = leadingRelative ? 1 : 0, // The foundational matcher ensures that elements are reachable from top-level context(s) @@ -2617,43 +2422,38 @@ function matcherFromTokens( tokens ) { }, implicitRelative, true ), matchers = [ function( elem, context, xml ) { var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( - ( checkContext = context ).nodeType ? + (checkContext = context).nodeType ? matchContext( elem, context, xml ) : matchAnyContext( elem, context, xml ) ); - // Avoid hanging onto element (issue #299) checkContext = null; return ret; } ]; for ( ; i < len; i++ ) { - if ( ( matcher = Expr.relative[ tokens[ i ].type ] ) ) { - matchers = [ addCombinator( elementMatcher( matchers ), matcher ) ]; + if ( (matcher = Expr.relative[ tokens[i].type ]) ) { + matchers = [ addCombinator(elementMatcher( matchers ), matcher) ]; } else { - matcher = Expr.filter[ tokens[ i ].type ].apply( null, tokens[ i ].matches ); + matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches ); // Return special upon seeing a positional matcher if ( matcher[ expando ] ) { - // Find the next relative operator (if any) for proper handling j = ++i; for ( ; j < len; j++ ) { - if ( Expr.relative[ tokens[ j ].type ] ) { + if ( Expr.relative[ tokens[j].type ] ) { break; } } return setMatcher( i > 1 && elementMatcher( matchers ), i > 1 && toSelector( - - // If the preceding token was a descendant combinator, insert an implicit any-element `*` - tokens - .slice( 0, i - 1 ) - .concat( { value: tokens[ i - 2 ].type === " " ? "*" : "" } ) + // If the preceding token was a descendant combinator, insert an implicit any-element `*` + tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" }) ).replace( rtrim, "$1" ), matcher, i < j && matcherFromTokens( tokens.slice( i, j ) ), - j < len && matcherFromTokens( ( tokens = tokens.slice( j ) ) ), + j < len && matcherFromTokens( (tokens = tokens.slice( j )) ), j < len && toSelector( tokens ) ); } @@ -2674,40 +2474,28 @@ function matcherFromGroupMatchers( elementMatchers, setMatchers ) { unmatched = seed && [], setMatched = [], contextBackup = outermostContext, - // We must always have either seed elements or outermost context - elems = seed || byElement && Expr.find[ "TAG" ]( "*", outermost ), - + elems = seed || byElement && Expr.find["TAG"]( "*", outermost ), // Use integer dirruns iff this is the outermost matcher - dirrunsUnique = ( dirruns += contextBackup == null ? 1 : Math.random() || 0.1 ), + dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1), len = elems.length; if ( outermost ) { - - // Support: IE 11+, Edge 17 - 18+ - // IE/Edge sometimes throw a "Permission denied" error when strict-comparing - // two documents; shallow comparisons work. - // eslint-disable-next-line eqeqeq - outermostContext = context == document || context || outermost; + outermostContext = context === document || context || outermost; } // Add elements passing elementMatchers directly to results // Support: IE<9, Safari // Tolerate NodeList properties (IE: "length"; Safari: ) matching elements by id - for ( ; i !== len && ( elem = elems[ i ] ) != null; i++ ) { + for ( ; i !== len && (elem = elems[i]) != null; i++ ) { if ( byElement && elem ) { j = 0; - - // Support: IE 11+, Edge 17 - 18+ - // IE/Edge sometimes throw a "Permission denied" error when strict-comparing - // two documents; shallow comparisons work. - // eslint-disable-next-line eqeqeq - if ( !context && elem.ownerDocument != document ) { + if ( !context && elem.ownerDocument !== document ) { setDocument( elem ); xml = !documentIsHTML; } - while ( ( matcher = elementMatchers[ j++ ] ) ) { - if ( matcher( elem, context || document, xml ) ) { + while ( (matcher = elementMatchers[j++]) ) { + if ( matcher( elem, context || document, xml) ) { results.push( elem ); break; } @@ -2719,9 +2507,8 @@ function matcherFromGroupMatchers( elementMatchers, setMatchers ) { // Track unmatched elements for set filters if ( bySet ) { - // They will have gone through all possible matchers - if ( ( elem = !matcher && elem ) ) { + if ( (elem = !matcher && elem) ) { matchedCount--; } @@ -2745,17 +2532,16 @@ function matcherFromGroupMatchers( elementMatchers, setMatchers ) { // numerically zero. if ( bySet && i !== matchedCount ) { j = 0; - while ( ( matcher = setMatchers[ j++ ] ) ) { + while ( (matcher = setMatchers[j++]) ) { matcher( unmatched, setMatched, context, xml ); } if ( seed ) { - // Reintegrate element matches to eliminate the need for sorting if ( matchedCount > 0 ) { while ( i-- ) { - if ( !( unmatched[ i ] || setMatched[ i ] ) ) { - setMatched[ i ] = pop.call( results ); + if ( !(unmatched[i] || setMatched[i]) ) { + setMatched[i] = pop.call( results ); } } } @@ -2796,14 +2582,13 @@ compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) { cached = compilerCache[ selector + " " ]; if ( !cached ) { - // Generate a function of recursive functions that can be used to check each element if ( !match ) { match = tokenize( selector ); } i = match.length; while ( i-- ) { - cached = matcherFromTokens( match[ i ] ); + cached = matcherFromTokens( match[i] ); if ( cached[ expando ] ) { setMatchers.push( cached ); } else { @@ -2812,10 +2597,7 @@ compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) { } // Cache the compiled function - cached = compilerCache( - selector, - matcherFromGroupMatchers( elementMatchers, setMatchers ) - ); + cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) ); // Save selector and tokenization cached.selector = selector; @@ -2835,7 +2617,7 @@ compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) { select = Sizzle.select = function( selector, context, results, seed ) { var i, tokens, token, type, find, compiled = typeof selector === "function" && selector, - match = !seed && tokenize( ( selector = compiled.selector || selector ) ); + match = !seed && tokenize( (selector = compiled.selector || selector) ); results = results || []; @@ -2844,12 +2626,11 @@ select = Sizzle.select = function( selector, context, results, seed ) { if ( match.length === 1 ) { // Reduce context if the leading compound selector is an ID - tokens = match[ 0 ] = match[ 0 ].slice( 0 ); - if ( tokens.length > 2 && ( token = tokens[ 0 ] ).type === "ID" && - context.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[ 1 ].type ] ) { + tokens = match[0] = match[0].slice( 0 ); + if ( tokens.length > 2 && (token = tokens[0]).type === "ID" && + context.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[1].type ] ) { - context = ( Expr.find[ "ID" ]( token.matches[ 0 ] - .replace( runescape, funescape ), context ) || [] )[ 0 ]; + context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0]; if ( !context ) { return results; @@ -2862,22 +2643,20 @@ select = Sizzle.select = function( selector, context, results, seed ) { } // Fetch a seed set for right-to-left matching - i = matchExpr[ "needsContext" ].test( selector ) ? 0 : tokens.length; + i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length; while ( i-- ) { - token = tokens[ i ]; + token = tokens[i]; // Abort if we hit a combinator - if ( Expr.relative[ ( type = token.type ) ] ) { + if ( Expr.relative[ (type = token.type) ] ) { break; } - if ( ( find = Expr.find[ type ] ) ) { - + if ( (find = Expr.find[ type ]) ) { // Search, expanding context for leading sibling combinators - if ( ( seed = find( - token.matches[ 0 ].replace( runescape, funescape ), - rsibling.test( tokens[ 0 ].type ) && testContext( context.parentNode ) || - context - ) ) ) { + if ( (seed = find( + token.matches[0].replace( runescape, funescape ), + rsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context + )) ) { // If seed is empty or no tokens remain, we can return early tokens.splice( i, 1 ); @@ -2908,7 +2687,7 @@ select = Sizzle.select = function( selector, context, results, seed ) { // One-time assignments // Sort stability -support.sortStable = expando.split( "" ).sort( sortOrder ).join( "" ) === expando; +support.sortStable = expando.split("").sort( sortOrder ).join("") === expando; // Support: Chrome 14-35+ // Always assume duplicates if they aren't passed to the comparison function @@ -2919,59 +2698,58 @@ setDocument(); // Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27) // Detached nodes confoundingly follow *each other* -support.sortDetached = assert( function( el ) { - +support.sortDetached = assert(function( el ) { // Should return 1, but returns 4 (following) - return el.compareDocumentPosition( document.createElement( "fieldset" ) ) & 1; -} ); + return el.compareDocumentPosition( document.createElement("fieldset") ) & 1; +}); // Support: IE<8 // Prevent attribute/property "interpolation" // https://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx -if ( !assert( function( el ) { +if ( !assert(function( el ) { el.innerHTML = ""; - return el.firstChild.getAttribute( "href" ) === "#"; -} ) ) { + return el.firstChild.getAttribute("href") === "#" ; +}) ) { addHandle( "type|href|height|width", function( elem, name, isXML ) { if ( !isXML ) { return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 ); } - } ); + }); } // Support: IE<9 // Use defaultValue in place of getAttribute("value") -if ( !support.attributes || !assert( function( el ) { +if ( !support.attributes || !assert(function( el ) { el.innerHTML = ""; el.firstChild.setAttribute( "value", "" ); return el.firstChild.getAttribute( "value" ) === ""; -} ) ) { - addHandle( "value", function( elem, _name, isXML ) { +}) ) { + addHandle( "value", function( elem, name, isXML ) { if ( !isXML && elem.nodeName.toLowerCase() === "input" ) { return elem.defaultValue; } - } ); + }); } // Support: IE<9 // Use getAttributeNode to fetch booleans when getAttribute lies -if ( !assert( function( el ) { - return el.getAttribute( "disabled" ) == null; -} ) ) { +if ( !assert(function( el ) { + return el.getAttribute("disabled") == null; +}) ) { addHandle( booleans, function( elem, name, isXML ) { var val; if ( !isXML ) { return elem[ name ] === true ? name.toLowerCase() : - ( val = elem.getAttributeNode( name ) ) && val.specified ? + (val = elem.getAttributeNode( name )) && val.specified ? val.value : - null; + null; } - } ); + }); } return Sizzle; -} )( window ); +})( window ); @@ -3340,7 +3118,7 @@ jQuery.each( { parents: function( elem ) { return dir( elem, "parentNode" ); }, - parentsUntil: function( elem, _i, until ) { + parentsUntil: function( elem, i, until ) { return dir( elem, "parentNode", until ); }, next: function( elem ) { @@ -3355,10 +3133,10 @@ jQuery.each( { prevAll: function( elem ) { return dir( elem, "previousSibling" ); }, - nextUntil: function( elem, _i, until ) { + nextUntil: function( elem, i, until ) { return dir( elem, "nextSibling", until ); }, - prevUntil: function( elem, _i, until ) { + prevUntil: function( elem, i, until ) { return dir( elem, "previousSibling", until ); }, siblings: function( elem ) { @@ -3368,24 +3146,18 @@ jQuery.each( { return siblings( elem.firstChild ); }, contents: function( elem ) { - if ( elem.contentDocument != null && - - // Support: IE 11+ - // elements with no `data` attribute has an object - // `contentDocument` with a `null` prototype. - getProto( elem.contentDocument ) ) { + if ( nodeName( elem, "iframe" ) ) { + return elem.contentDocument; + } - return elem.contentDocument; - } + // Support: IE 9 - 11 only, iOS 7 only, Android Browser <=4.3 only + // Treat the template element as a regular one in browsers that + // don't support it. + if ( nodeName( elem, "template" ) ) { + elem = elem.content || elem; + } - // Support: IE 9 - 11 only, iOS 7 only, Android Browser <=4.3 only - // Treat the template element as a regular one in browsers that - // don't support it. - if ( nodeName( elem, "template" ) ) { - elem = elem.content || elem; - } - - return jQuery.merge( [], elem.childNodes ); + return jQuery.merge( [], elem.childNodes ); } }, function( name, fn ) { jQuery.fn[ name ] = function( until, selector ) { @@ -3717,7 +3489,7 @@ jQuery.extend( { var fns = arguments; return jQuery.Deferred( function( newDefer ) { - jQuery.each( tuples, function( _i, tuple ) { + jQuery.each( tuples, function( i, tuple ) { // Map tuples (progress, done, fail) to arguments (done, fail, progress) var fn = isFunction( fns[ tuple[ 4 ] ] ) && fns[ tuple[ 4 ] ]; @@ -4170,7 +3942,7 @@ var access = function( elems, fn, key, value, chainable, emptyGet, raw ) { // ...except when executing function values } else { bulk = fn; - fn = function( elem, _key, value ) { + fn = function( elem, key, value ) { return bulk.call( jQuery( elem ), value ); }; } @@ -4205,7 +3977,7 @@ var rmsPrefix = /^-ms-/, rdashAlpha = /-([a-z])/g; // Used by camelCase as callback to replace() -function fcamelCase( _all, letter ) { +function fcamelCase( all, letter ) { return letter.toUpperCase(); } @@ -4694,26 +4466,6 @@ var rcssNum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" ); var cssExpand = [ "Top", "Right", "Bottom", "Left" ]; -var documentElement = document.documentElement; - - - - var isAttached = function( elem ) { - return jQuery.contains( elem.ownerDocument, elem ); - }, - composed = { composed: true }; - - // Support: IE 9 - 11+, Edge 12 - 18+, iOS 10.0 - 10.2 only - // Check attachment across shadow DOM boundaries when possible (gh-3504) - // Support: iOS 10.0-10.2 only - // Early iOS 10 versions support `attachShadow` but not `getRootNode`, - // leading to errors. We need to check for `getRootNode`. - if ( documentElement.getRootNode ) { - isAttached = function( elem ) { - return jQuery.contains( elem.ownerDocument, elem ) || - elem.getRootNode( composed ) === elem.ownerDocument; - }; - } var isHiddenWithinTree = function( elem, el ) { // isHiddenWithinTree might be called from jQuery#filter function; @@ -4728,11 +4480,32 @@ var isHiddenWithinTree = function( elem, el ) { // Support: Firefox <=43 - 45 // Disconnected elements can have computed display: none, so first confirm that elem is // in the document. - isAttached( elem ) && + jQuery.contains( elem.ownerDocument, elem ) && jQuery.css( elem, "display" ) === "none"; }; +var swap = function( elem, options, callback, args ) { + var ret, name, + old = {}; + + // Remember the old values, and insert the new ones + for ( name in options ) { + old[ name ] = elem.style[ name ]; + elem.style[ name ] = options[ name ]; + } + + ret = callback.apply( elem, args || [] ); + + // Revert the old values + for ( name in options ) { + elem.style[ name ] = old[ name ]; + } + + return ret; +}; + + function adjustCSS( elem, prop, valueParts, tween ) { @@ -4749,8 +4522,7 @@ function adjustCSS( elem, prop, valueParts, tween ) { unit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ), // Starting value computation is required for potential unit mismatches - initialInUnit = elem.nodeType && - ( jQuery.cssNumber[ prop ] || unit !== "px" && +initial ) && + initialInUnit = ( jQuery.cssNumber[ prop ] || unit !== "px" && +initial ) && rcssNum.exec( jQuery.css( elem, prop ) ); if ( initialInUnit && initialInUnit[ 3 ] !== unit ) { @@ -4897,47 +4669,18 @@ jQuery.fn.extend( { } ); var rcheckableType = ( /^(?:checkbox|radio)$/i ); -var rtagName = ( /<([a-z][^\/\0>\x20\t\r\n\f]*)/i ); +var rtagName = ( /<([a-z][^\/\0>\x20\t\r\n\f]+)/i ); var rscriptType = ( /^$|^module$|\/(?:java|ecma)script/i ); -( function() { - var fragment = document.createDocumentFragment(), - div = fragment.appendChild( document.createElement( "div" ) ), - input = document.createElement( "input" ); - - // Support: Android 4.0 - 4.3 only - // Check state lost if the name is set (#11217) - // Support: Windows Web Apps (WWA) - // `name` and `type` must use .setAttribute for WWA (#14901) - input.setAttribute( "type", "radio" ); - input.setAttribute( "checked", "checked" ); - input.setAttribute( "name", "t" ); - - div.appendChild( input ); - - // Support: Android <=4.1 only - // Older WebKit doesn't clone checked state correctly in fragments - support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked; - - // Support: IE <=11 only - // Make sure textarea (and checkbox) defaultValue is properly cloned - div.innerHTML = ""; - support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue; - - // Support: IE <=9 only - // IE <=9 replaces "; - support.option = !!div.lastChild; -} )(); - - // We have to close these tags to support XHTML (#13200) var wrapMap = { + // Support: IE <=9 only + option: [ 1, "" ], + // XHTML parsers do not magically insert elements in the // same way that tag soup parsers do. So we cannot shorten // this by omitting or other required elements. @@ -4949,14 +4692,12 @@ var wrapMap = { _default: [ 0, "", "" ] }; +// Support: IE <=9 only +wrapMap.optgroup = wrapMap.option; + wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; wrapMap.th = wrapMap.td; -// Support: IE <=9 only -if ( !support.option ) { - wrapMap.optgroup = wrapMap.option = [ 1, "" ]; -} - function getAll( context, tag ) { @@ -5000,7 +4741,7 @@ function setGlobalEval( elems, refElements ) { var rhtml = /<|&#?\w+;/; function buildFragment( elems, context, scripts, selection, ignored ) { - var elem, tmp, tag, wrap, attached, j, + var elem, tmp, tag, wrap, contains, j, fragment = context.createDocumentFragment(), nodes = [], i = 0, @@ -5064,13 +4805,13 @@ function buildFragment( elems, context, scripts, selection, ignored ) { continue; } - attached = isAttached( elem ); + contains = jQuery.contains( elem.ownerDocument, elem ); // Append to fragment tmp = getAll( fragment.appendChild( elem ), "script" ); // Preserve script evaluation history - if ( attached ) { + if ( contains ) { setGlobalEval( tmp ); } @@ -5089,6 +4830,34 @@ function buildFragment( elems, context, scripts, selection, ignored ) { } +( function() { + var fragment = document.createDocumentFragment(), + div = fragment.appendChild( document.createElement( "div" ) ), + input = document.createElement( "input" ); + + // Support: Android 4.0 - 4.3 only + // Check state lost if the name is set (#11217) + // Support: Windows Web Apps (WWA) + // `name` and `type` must use .setAttribute for WWA (#14901) + input.setAttribute( "type", "radio" ); + input.setAttribute( "checked", "checked" ); + input.setAttribute( "name", "t" ); + + div.appendChild( input ); + + // Support: Android <=4.1 only + // Older WebKit doesn't clone checked state correctly in fragments + support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked; + + // Support: IE <=11 only + // Make sure textarea (and checkbox) defaultValue is properly cloned + div.innerHTML = ""; + support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue; +} )(); +var documentElement = document.documentElement; + + + var rkeyEvent = /^key/, rmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/, @@ -5102,19 +4871,8 @@ function returnFalse() { return false; } -// Support: IE <=9 - 11+ -// focus() and blur() are asynchronous, except when they are no-op. -// So expect focus to be synchronous when the element is already active, -// and blur to be synchronous when the element is not already active. -// (focus and blur are always synchronous in other supported browsers, -// this just defines when we can count on it). -function expectSync( elem, type ) { - return ( elem === safeActiveElement() ) === ( type === "focus" ); -} - // Support: IE <=9 only -// Accessing document.activeElement can throw unexpectedly -// https://bugs.jquery.com/ticket/13393 +// See #13393 for more info function safeActiveElement() { try { return document.activeElement; @@ -5197,8 +4955,8 @@ jQuery.event = { special, handlers, type, namespaces, origType, elemData = dataPriv.get( elem ); - // Only attach events to objects that accept data - if ( !acceptData( elem ) ) { + // Don't attach events to noData or text/comment nodes (but allow plain objects) + if ( !elemData ) { return; } @@ -5222,7 +4980,7 @@ jQuery.event = { // Init the element's event structure and main handler, if this is the first if ( !( events = elemData.events ) ) { - events = elemData.events = Object.create( null ); + events = elemData.events = {}; } if ( !( eventHandle = elemData.handle ) ) { eventHandle = elemData.handle = function( e ) { @@ -5380,15 +5138,12 @@ jQuery.event = { dispatch: function( nativeEvent ) { + // Make a writable jQuery.Event from the native event object + var event = jQuery.event.fix( nativeEvent ); + var i, j, ret, matched, handleObj, handlerQueue, args = new Array( arguments.length ), - - // Make a writable jQuery.Event from the native event object - event = jQuery.event.fix( nativeEvent ), - - handlers = ( - dataPriv.get( this, "events" ) || Object.create( null ) - )[ event.type ] || [], + handlers = ( dataPriv.get( this, "events" ) || {} )[ event.type ] || [], special = jQuery.event.special[ event.type ] || {}; // Use the fix-ed jQuery.Event rather than the (read-only) native event @@ -5417,10 +5172,9 @@ jQuery.event = { while ( ( handleObj = matched.handlers[ j++ ] ) && !event.isImmediatePropagationStopped() ) { - // If the event is namespaced, then each handler is only invoked if it is - // specially universal or its namespaces are a superset of the event's. - if ( !event.rnamespace || handleObj.namespace === false || - event.rnamespace.test( handleObj.namespace ) ) { + // Triggered event must either 1) have no namespace, or 2) have namespace(s) + // a subset or equal to those in the bound event (both can have no namespace). + if ( !event.rnamespace || event.rnamespace.test( handleObj.namespace ) ) { event.handleObj = handleObj; event.data = handleObj.data; @@ -5544,51 +5298,39 @@ jQuery.event = { // Prevent triggered image.load events from bubbling to window.load noBubble: true }, - click: { + focus: { - // Utilize native event to ensure correct state for checkable inputs - setup: function( data ) { - - // For mutual compressibility with _default, replace `this` access with a local var. - // `|| data` is dead code meant only to preserve the variable through minification. - var el = this || data; - - // Claim the first handler - if ( rcheckableType.test( el.type ) && - el.click && nodeName( el, "input" ) ) { - - // dataPriv.set( el, "click", ... ) - leverageNative( el, "click", returnTrue ); + // Fire native event if possible so blur/focus sequence is correct + trigger: function() { + if ( this !== safeActiveElement() && this.focus ) { + this.focus(); + return false; } - - // Return false to allow normal processing in the caller - return false; }, - trigger: function( data ) { - - // For mutual compressibility with _default, replace `this` access with a local var. - // `|| data` is dead code meant only to preserve the variable through minification. - var el = this || data; - - // Force setup before triggering a click - if ( rcheckableType.test( el.type ) && - el.click && nodeName( el, "input" ) ) { - - leverageNative( el, "click" ); + delegateType: "focusin" + }, + blur: { + trigger: function() { + if ( this === safeActiveElement() && this.blur ) { + this.blur(); + return false; } + }, + delegateType: "focusout" + }, + click: { - // Return non-false to allow normal event-path propagation - return true; + // For checkbox, fire native event so checked state will be right + trigger: function() { + if ( this.type === "checkbox" && this.click && nodeName( this, "input" ) ) { + this.click(); + return false; + } }, - // For cross-browser consistency, suppress native .click() on links - // Also prevent it if we're currently inside a leveraged native-event stack + // For cross-browser consistency, don't fire native .click() on links _default: function( event ) { - var target = event.target; - return rcheckableType.test( target.type ) && - target.click && nodeName( target, "input" ) && - dataPriv.get( target, "click" ) || - nodeName( target, "a" ); + return nodeName( event.target, "a" ); } }, @@ -5605,93 +5347,6 @@ jQuery.event = { } }; -// Ensure the presence of an event listener that handles manually-triggered -// synthetic events by interrupting progress until reinvoked in response to -// *native* events that it fires directly, ensuring that state changes have -// already occurred before other listeners are invoked. -function leverageNative( el, type, expectSync ) { - - // Missing expectSync indicates a trigger call, which must force setup through jQuery.event.add - if ( !expectSync ) { - if ( dataPriv.get( el, type ) === undefined ) { - jQuery.event.add( el, type, returnTrue ); - } - return; - } - - // Register the controller as a special universal handler for all event namespaces - dataPriv.set( el, type, false ); - jQuery.event.add( el, type, { - namespace: false, - handler: function( event ) { - var notAsync, result, - saved = dataPriv.get( this, type ); - - if ( ( event.isTrigger & 1 ) && this[ type ] ) { - - // Interrupt processing of the outer synthetic .trigger()ed event - // Saved data should be false in such cases, but might be a leftover capture object - // from an async native handler (gh-4350) - if ( !saved.length ) { - - // Store arguments for use when handling the inner native event - // There will always be at least one argument (an event object), so this array - // will not be confused with a leftover capture object. - saved = slice.call( arguments ); - dataPriv.set( this, type, saved ); - - // Trigger the native event and capture its result - // Support: IE <=9 - 11+ - // focus() and blur() are asynchronous - notAsync = expectSync( this, type ); - this[ type ](); - result = dataPriv.get( this, type ); - if ( saved !== result || notAsync ) { - dataPriv.set( this, type, false ); - } else { - result = {}; - } - if ( saved !== result ) { - - // Cancel the outer synthetic event - event.stopImmediatePropagation(); - event.preventDefault(); - return result.value; - } - - // If this is an inner synthetic event for an event with a bubbling surrogate - // (focus or blur), assume that the surrogate already propagated from triggering the - // native event and prevent that from happening again here. - // This technically gets the ordering wrong w.r.t. to `.trigger()` (in which the - // bubbling surrogate propagates *after* the non-bubbling base), but that seems - // less bad than duplication. - } else if ( ( jQuery.event.special[ type ] || {} ).delegateType ) { - event.stopPropagation(); - } - - // If this is a native event triggered above, everything is now in order - // Fire an inner synthetic event with the original arguments - } else if ( saved.length ) { - - // ...and capture the result - dataPriv.set( this, type, { - value: jQuery.event.trigger( - - // Support: IE <=9 - 11+ - // Extend with the prototype to reset the above stopImmediatePropagation() - jQuery.extend( saved[ 0 ], jQuery.Event.prototype ), - saved.slice( 1 ), - this - ) - } ); - - // Abort handling of the native event - event.stopImmediatePropagation(); - } - } - } ); -} - jQuery.removeEvent = function( elem, type, handle ) { // This "if" is needed for plain objects @@ -5804,7 +5459,6 @@ jQuery.each( { shiftKey: true, view: true, "char": true, - code: true, charCode: true, key: true, keyCode: true, @@ -5851,33 +5505,6 @@ jQuery.each( { } }, jQuery.event.addProp ); -jQuery.each( { focus: "focusin", blur: "focusout" }, function( type, delegateType ) { - jQuery.event.special[ type ] = { - - // Utilize native event if possible so blur/focus sequence is correct - setup: function() { - - // Claim the first handler - // dataPriv.set( this, "focus", ... ) - // dataPriv.set( this, "blur", ... ) - leverageNative( this, type, expectSync ); - - // Return false to allow normal processing in the caller - return false; - }, - trigger: function() { - - // Force setup before trigger - leverageNative( this, type ); - - // Return non-false to allow normal event-path propagation - return true; - }, - - delegateType: delegateType - }; -} ); - // Create mouseenter/leave events using mouseover/out and event-time checks // so that event delegation works in jQuery. // Do the same for pointerenter/pointerleave and pointerover/pointerout @@ -5963,6 +5590,13 @@ jQuery.fn.extend( { var + /* eslint-disable max-len */ + + // See https://github.com/eslint/eslint/issues/3229 + rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi, + + /* eslint-enable */ + // Support: IE <=10 - 11, Edge 12 - 13 only // In IE/Edge using regex groups here causes severe slowdowns. // See https://connect.microsoft.com/IE/feedback/details/1736512/ @@ -5999,7 +5633,7 @@ function restoreScript( elem ) { } function cloneCopyEvent( src, dest ) { - var i, l, type, pdataOld, udataOld, udataCur, events; + var i, l, type, pdataOld, pdataCur, udataOld, udataCur, events; if ( dest.nodeType !== 1 ) { return; @@ -6007,11 +5641,13 @@ function cloneCopyEvent( src, dest ) { // 1. Copy private data: events, handlers, etc. if ( dataPriv.hasData( src ) ) { - pdataOld = dataPriv.get( src ); + pdataOld = dataPriv.access( src ); + pdataCur = dataPriv.set( dest, pdataOld ); events = pdataOld.events; if ( events ) { - dataPriv.remove( dest, "handle events" ); + delete pdataCur.handle; + pdataCur.events = {}; for ( type in events ) { for ( i = 0, l = events[ type ].length; i < l; i++ ) { @@ -6047,7 +5683,7 @@ function fixInput( src, dest ) { function domManip( collection, args, callback, ignored ) { // Flatten any nested arrays - args = flat( args ); + args = concat.apply( [], args ); var fragment, first, scripts, hasScripts, node, doc, i = 0, @@ -6119,13 +5755,11 @@ function domManip( collection, args, callback, ignored ) { if ( node.src && ( node.type || "" ).toLowerCase() !== "module" ) { // Optional AJAX dependency, but won't run scripts if not present - if ( jQuery._evalUrl && !node.noModule ) { - jQuery._evalUrl( node.src, { - nonce: node.nonce || node.getAttribute( "nonce" ) - }, doc ); + if ( jQuery._evalUrl ) { + jQuery._evalUrl( node.src ); } } else { - DOMEval( node.textContent.replace( rcleanScript, "" ), node, doc ); + DOMEval( node.textContent.replace( rcleanScript, "" ), doc, node ); } } } @@ -6147,7 +5781,7 @@ function remove( elem, selector, keepData ) { } if ( node.parentNode ) { - if ( keepData && isAttached( node ) ) { + if ( keepData && jQuery.contains( node.ownerDocument, node ) ) { setGlobalEval( getAll( node, "script" ) ); } node.parentNode.removeChild( node ); @@ -6159,13 +5793,13 @@ function remove( elem, selector, keepData ) { jQuery.extend( { htmlPrefilter: function( html ) { - return html; + return html.replace( rxhtmlTag, "<$1>" ); }, clone: function( elem, dataAndEvents, deepDataAndEvents ) { var i, l, srcElements, destElements, clone = elem.cloneNode( true ), - inPage = isAttached( elem ); + inPage = jQuery.contains( elem.ownerDocument, elem ); // Fix IE cloning issues if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) && @@ -6421,27 +6055,6 @@ var getStyles = function( elem ) { return view.getComputedStyle( elem ); }; -var swap = function( elem, options, callback ) { - var ret, name, - old = {}; - - // Remember the old values, and insert the new ones - for ( name in options ) { - old[ name ] = elem.style[ name ]; - elem.style[ name ] = options[ name ]; - } - - ret = callback.call( elem ); - - // Revert the old values - for ( name in options ) { - elem.style[ name ] = old[ name ]; - } - - return ret; -}; - - var rboxStyle = new RegExp( cssExpand.join( "|" ), "i" ); @@ -6482,10 +6095,8 @@ var rboxStyle = new RegExp( cssExpand.join( "|" ), "i" ); // Support: IE 9 only // Detect overflow:scroll screwiness (gh-3699) - // Support: Chrome <=64 - // Don't get tricked when zoom affects offsetWidth (gh-4029) div.style.position = "absolute"; - scrollboxSizeVal = roundPixelMeasures( div.offsetWidth / 3 ) === 12; + scrollboxSizeVal = div.offsetWidth === 36 || "absolute"; documentElement.removeChild( container ); @@ -6499,7 +6110,7 @@ var rboxStyle = new RegExp( cssExpand.join( "|" ), "i" ); } var pixelPositionVal, boxSizingReliableVal, scrollboxSizeVal, pixelBoxStylesVal, - reliableTrDimensionsVal, reliableMarginLeftVal, + reliableMarginLeftVal, container = document.createElement( "div" ), div = document.createElement( "div" ); @@ -6534,35 +6145,6 @@ var rboxStyle = new RegExp( cssExpand.join( "|" ), "i" ); scrollboxSize: function() { computeStyleTests(); return scrollboxSizeVal; - }, - - // Support: IE 9 - 11+, Edge 15 - 18+ - // IE/Edge misreport `getComputedStyle` of table rows with width/height - // set in CSS while `offset*` properties report correct values. - // Behavior in IE 9 is more subtle than in newer versions & it passes - // some versions of this test; make sure not to make it pass there! - reliableTrDimensions: function() { - var table, tr, trChild, trStyle; - if ( reliableTrDimensionsVal == null ) { - table = document.createElement( "table" ); - tr = document.createElement( "tr" ); - trChild = document.createElement( "div" ); - - table.style.cssText = "position:absolute;left:-11111px"; - tr.style.height = "1px"; - trChild.style.height = "9px"; - - documentElement - .appendChild( table ) - .appendChild( tr ) - .appendChild( trChild ); - - trStyle = window.getComputedStyle( tr ); - reliableTrDimensionsVal = parseInt( trStyle.height ) > 3; - - documentElement.removeChild( table ); - } - return reliableTrDimensionsVal; } } ); } )(); @@ -6585,7 +6167,7 @@ function curCSS( elem, name, computed ) { if ( computed ) { ret = computed.getPropertyValue( name ) || computed[ name ]; - if ( ret === "" && !isAttached( elem ) ) { + if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) { ret = jQuery.style( elem, name ); } @@ -6641,13 +6223,30 @@ function addGetHookIf( conditionFn, hookFn ) { } -var cssPrefixes = [ "Webkit", "Moz", "ms" ], - emptyStyle = document.createElement( "div" ).style, - vendorProps = {}; +var + + // Swappable if display is none or starts with table + // except "table", "table-cell", or "table-caption" + // See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display + rdisplayswap = /^(none|table(?!-c[ea]).+)/, + rcustomProp = /^--/, + cssShow = { position: "absolute", visibility: "hidden", display: "block" }, + cssNormalTransform = { + letterSpacing: "0", + fontWeight: "400" + }, + + cssPrefixes = [ "Webkit", "Moz", "ms" ], + emptyStyle = document.createElement( "div" ).style; -// Return a vendor-prefixed property or undefined +// Return a css property mapped to a potentially vendor prefixed property function vendorPropName( name ) { + // Shortcut for names that are not vendor prefixed + if ( name in emptyStyle ) { + return name; + } + // Check for vendor prefixed names var capName = name[ 0 ].toUpperCase() + name.slice( 1 ), i = cssPrefixes.length; @@ -6660,34 +6259,17 @@ function vendorPropName( name ) { } } -// Return a potentially-mapped jQuery.cssProps or vendor prefixed property +// Return a property mapped along what jQuery.cssProps suggests or to +// a vendor prefixed property. function finalPropName( name ) { - var final = jQuery.cssProps[ name ] || vendorProps[ name ]; - - if ( final ) { - return final; + var ret = jQuery.cssProps[ name ]; + if ( !ret ) { + ret = jQuery.cssProps[ name ] = vendorPropName( name ) || name; } - if ( name in emptyStyle ) { - return name; - } - return vendorProps[ name ] = vendorPropName( name ) || name; + return ret; } - -var - - // Swappable if display is none or starts with table - // except "table", "table-cell", or "table-caption" - // See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display - rdisplayswap = /^(none|table(?!-c[ea]).+)/, - rcustomProp = /^--/, - cssShow = { position: "absolute", visibility: "hidden", display: "block" }, - cssNormalTransform = { - letterSpacing: "0", - fontWeight: "400" - }; - -function setPositiveNumber( _elem, value, subtract ) { +function setPositiveNumber( elem, value, subtract ) { // Any relative (+/-) values have already been // normalized at this point @@ -6758,10 +6340,7 @@ function boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computed delta - extra - 0.5 - - // If offsetWidth/offsetHeight is unknown, then we can't determine content-box scroll gutter - // Use an explicit zero to avoid NaN (gh-3964) - ) ) || 0; + ) ); } return delta; @@ -6771,16 +6350,9 @@ function getWidthOrHeight( elem, dimension, extra ) { // Start with computed style var styles = getStyles( elem ), - - // To avoid forcing a reflow, only fetch boxSizing if we need it (gh-4322). - // Fake content-box until we know it's needed to know the true value. - boxSizingNeeded = !support.boxSizingReliable() || extra, - isBorderBox = boxSizingNeeded && - jQuery.css( elem, "boxSizing", false, styles ) === "border-box", - valueIsBorderBox = isBorderBox, - val = curCSS( elem, dimension, styles ), - offsetProp = "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ); + isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box", + valueIsBorderBox = isBorderBox; // Support: Firefox <=54 // Return a confounding non-pixel value or feign ignorance, as appropriate. @@ -6791,38 +6363,22 @@ function getWidthOrHeight( elem, dimension, extra ) { val = "auto"; } + // Check for style in case a browser which returns unreliable values + // for getComputedStyle silently falls back to the reliable elem.style + valueIsBorderBox = valueIsBorderBox && + ( support.boxSizingReliable() || val === elem.style[ dimension ] ); - // Support: IE 9 - 11 only - // Use offsetWidth/offsetHeight for when box sizing is unreliable. - // In those cases, the computed value can be trusted to be border-box. - if ( ( !support.boxSizingReliable() && isBorderBox || - - // Support: IE 10 - 11+, Edge 15 - 18+ - // IE/Edge misreport `getComputedStyle` of table rows with width/height - // set in CSS while `offset*` properties report correct values. - // Interestingly, in some cases IE 9 doesn't suffer from this issue. - !support.reliableTrDimensions() && nodeName( elem, "tr" ) || - - // Fall back to offsetWidth/offsetHeight when value is "auto" - // This happens for inline elements with no explicit setting (gh-3571) - val === "auto" || - - // Support: Android <=4.1 - 4.3 only - // Also use offsetWidth/offsetHeight for misreported inline dimensions (gh-3602) - !parseFloat( val ) && jQuery.css( elem, "display", false, styles ) === "inline" ) && + // Fall back to offsetWidth/offsetHeight when value is "auto" + // This happens for inline elements with no explicit setting (gh-3571) + // Support: Android <=4.1 - 4.3 only + // Also use offsetWidth/offsetHeight for misreported inline dimensions (gh-3602) + if ( val === "auto" || + !parseFloat( val ) && jQuery.css( elem, "display", false, styles ) === "inline" ) { - // Make sure the element is visible & connected - elem.getClientRects().length ) { + val = elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ]; - isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box"; - - // Where available, offsetWidth/offsetHeight approximate border box dimensions. - // Where not available (e.g., SVG), assume unreliable box-sizing and interpret the - // retrieved value as a content box dimension. - valueIsBorderBox = offsetProp in elem; - if ( valueIsBorderBox ) { - val = elem[ offsetProp ]; - } + // offsetWidth/offsetHeight provide border-box values + valueIsBorderBox = true; } // Normalize "" and auto @@ -6868,13 +6424,6 @@ jQuery.extend( { "flexGrow": true, "flexShrink": true, "fontWeight": true, - "gridArea": true, - "gridColumn": true, - "gridColumnEnd": true, - "gridColumnStart": true, - "gridRow": true, - "gridRowEnd": true, - "gridRowStart": true, "lineHeight": true, "opacity": true, "order": true, @@ -6930,9 +6479,7 @@ jQuery.extend( { } // If a number was passed in, add the unit (except for certain CSS properties) - // The isCustomProp check can be removed in jQuery 4.0 when we only auto-append - // "px" to a few hardcoded values. - if ( type === "number" && !isCustomProp ) { + if ( type === "number" ) { value += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? "" : "px" ); } @@ -7006,7 +6553,7 @@ jQuery.extend( { } } ); -jQuery.each( [ "height", "width" ], function( _i, dimension ) { +jQuery.each( [ "height", "width" ], function( i, dimension ) { jQuery.cssHooks[ dimension ] = { get: function( elem, computed, extra ) { if ( computed ) { @@ -7032,29 +6579,18 @@ jQuery.each( [ "height", "width" ], function( _i, dimension ) { set: function( elem, value, extra ) { var matches, styles = getStyles( elem ), - - // Only read styles.position if the test has a chance to fail - // to avoid forcing a reflow. - scrollboxSizeBuggy = !support.scrollboxSize() && - styles.position === "absolute", - - // To avoid forcing a reflow, only fetch boxSizing if we need it (gh-3991) - boxSizingNeeded = scrollboxSizeBuggy || extra, - isBorderBox = boxSizingNeeded && - jQuery.css( elem, "boxSizing", false, styles ) === "border-box", - subtract = extra ? - boxModelAdjustment( - elem, - dimension, - extra, - isBorderBox, - styles - ) : - 0; + isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box", + subtract = extra && boxModelAdjustment( + elem, + dimension, + extra, + isBorderBox, + styles + ); // Account for unreliable border-box dimensions by comparing offset* to computed and // faking a content-box to get border and padding (gh-3699) - if ( isBorderBox && scrollboxSizeBuggy ) { + if ( isBorderBox && support.scrollboxSize() === styles.position ) { subtract -= Math.ceil( elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] - parseFloat( styles[ dimension ] ) - @@ -7222,9 +6758,9 @@ Tween.propHooks = { // Use .style if available and use plain properties where available. if ( jQuery.fx.step[ tween.prop ] ) { jQuery.fx.step[ tween.prop ]( tween ); - } else if ( tween.elem.nodeType === 1 && ( - jQuery.cssHooks[ tween.prop ] || - tween.elem.style[ finalPropName( tween.prop ) ] != null ) ) { + } else if ( tween.elem.nodeType === 1 && + ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || + jQuery.cssHooks[ tween.prop ] ) ) { jQuery.style( tween.elem, tween.prop, tween.now + tween.unit ); } else { tween.elem[ tween.prop ] = tween.now; @@ -7779,7 +7315,7 @@ jQuery.fn.extend( { clearQueue = type; type = undefined; } - if ( clearQueue ) { + if ( clearQueue && type !== false ) { this.queue( type || "fx", [] ); } @@ -7862,7 +7398,7 @@ jQuery.fn.extend( { } } ); -jQuery.each( [ "toggle", "show", "hide" ], function( _i, name ) { +jQuery.each( [ "toggle", "show", "hide" ], function( i, name ) { var cssFn = jQuery.fn[ name ]; jQuery.fn[ name ] = function( speed, easing, callback ) { return speed == null || typeof speed === "boolean" ? @@ -8083,7 +7619,7 @@ boolHook = { } }; -jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( _i, name ) { +jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name ) { var getter = attrHandle[ name ] || jQuery.find.attr; attrHandle[ name ] = function( elem, name, isXML ) { @@ -8707,9 +8243,7 @@ jQuery.extend( jQuery.event, { special.bindType || type; // jQuery handler - handle = ( - dataPriv.get( cur, "events" ) || Object.create( null ) - )[ event.type ] && + handle = ( dataPriv.get( cur, "events" ) || {} )[ event.type ] && dataPriv.get( cur, "handle" ); if ( handle ) { handle.apply( cur, data ); @@ -8820,10 +8354,7 @@ if ( !support.focusin ) { jQuery.event.special[ fix ] = { setup: function() { - - // Handle: regular nodes (via `this.ownerDocument`), window - // (via `this.document`) & document (via `this`). - var doc = this.ownerDocument || this.document || this, + var doc = this.ownerDocument || this, attaches = dataPriv.access( doc, fix ); if ( !attaches ) { @@ -8832,7 +8363,7 @@ if ( !support.focusin ) { dataPriv.access( doc, fix, ( attaches || 0 ) + 1 ); }, teardown: function() { - var doc = this.ownerDocument || this.document || this, + var doc = this.ownerDocument || this, attaches = dataPriv.access( doc, fix ) - 1; if ( !attaches ) { @@ -8848,7 +8379,7 @@ if ( !support.focusin ) { } var location = window.location; -var nonce = { guid: Date.now() }; +var nonce = Date.now(); var rquery = ( /\?/ ); @@ -8936,10 +8467,6 @@ jQuery.param = function( a, traditional ) { encodeURIComponent( value == null ? "" : value ); }; - if ( a == null ) { - return ""; - } - // If an array was passed in, assume that it is an array of form elements. if ( Array.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) { @@ -8980,7 +8507,7 @@ jQuery.fn.extend( { rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) && ( this.checked || !rcheckableType.test( type ) ); } ) - .map( function( _i, elem ) { + .map( function( i, elem ) { var val = jQuery( this ).val(); if ( val == null ) { @@ -9442,14 +8969,12 @@ jQuery.extend( { if ( !responseHeaders ) { responseHeaders = {}; while ( ( match = rheaders.exec( responseHeadersString ) ) ) { - responseHeaders[ match[ 1 ].toLowerCase() + " " ] = - ( responseHeaders[ match[ 1 ].toLowerCase() + " " ] || [] ) - .concat( match[ 2 ] ); + responseHeaders[ match[ 1 ].toLowerCase() ] = match[ 2 ]; } } - match = responseHeaders[ key.toLowerCase() + " " ]; + match = responseHeaders[ key.toLowerCase() ]; } - return match == null ? null : match.join( ", " ); + return match == null ? null : match; }, // Raw string @@ -9593,8 +9118,7 @@ jQuery.extend( { // Add or update anti-cache param if needed if ( s.cache === false ) { cacheURL = cacheURL.replace( rantiCache, "$1" ); - uncached = ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ( nonce.guid++ ) + - uncached; + uncached = ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ( nonce++ ) + uncached; } // Put hash and anti-cache on the URL that will be requested (gh-1732) @@ -9727,11 +9251,6 @@ jQuery.extend( { response = ajaxHandleResponses( s, jqXHR, responses ); } - // Use a noop converter for missing script - if ( !isSuccess && jQuery.inArray( "script", s.dataTypes ) > -1 ) { - s.converters[ "text script" ] = function() {}; - } - // Convert no matter what (that way responseXXX fields are always set) response = ajaxConvert( s, response, jqXHR, isSuccess ); @@ -9822,7 +9341,7 @@ jQuery.extend( { } } ); -jQuery.each( [ "get", "post" ], function( _i, method ) { +jQuery.each( [ "get", "post" ], function( i, method ) { jQuery[ method ] = function( url, data, callback, type ) { // Shift arguments if data argument was omitted @@ -9843,17 +9362,8 @@ jQuery.each( [ "get", "post" ], function( _i, method ) { }; } ); -jQuery.ajaxPrefilter( function( s ) { - var i; - for ( i in s.headers ) { - if ( i.toLowerCase() === "content-type" ) { - s.contentType = s.headers[ i ] || ""; - } - } -} ); - -jQuery._evalUrl = function( url, options, doc ) { +jQuery._evalUrl = function( url ) { return jQuery.ajax( { url: url, @@ -9863,16 +9373,7 @@ jQuery._evalUrl = function( url, options, doc ) { cache: true, async: false, global: false, - - // Only evaluate the response if it is successful (gh-4126) - // dataFilter is not invoked for failure responses, so using it instead - // of the default converter is kludgy but it works. - converters: { - "text script": function() {} - }, - dataFilter: function( response ) { - jQuery.globalEval( response, options, doc ); - } + "throws": true } ); }; @@ -10155,21 +9656,24 @@ jQuery.ajaxPrefilter( "script", function( s ) { // Bind script tag hack transport jQuery.ajaxTransport( "script", function( s ) { - // This transport only deals with cross domain or forced-by-attrs requests - if ( s.crossDomain || s.scriptAttrs ) { + // This transport only deals with cross domain requests + if ( s.crossDomain ) { var script, callback; return { send: function( _, complete ) { - script = jQuery( "