diff --git a/README.md b/README.md
index 8d872160ca..14b044f8b1 100644
--- a/README.md
+++ b/README.md
@@ -17,7 +17,7 @@ See the documentation.
#### Pre Requirements
-- Visual Studio 2019 16.3.0+
+- Visual Studio 2019 16.4.0+
#### Framework
diff --git a/common.props b/common.props
index 6f12895d7c..92d87d3d76 100644
--- a/common.props
+++ b/common.props
@@ -1,7 +1,7 @@
- latest
- 2.2.0
+ latest
+ 2.3.0
$(NoWarn);CS1591
https://abp.io/assets/abp_nupkg.png
https://abp.io
@@ -9,9 +9,7 @@
git
https://github.com/abpframework/abp/
-
-
\ No newline at end of file
diff --git a/docs/cs/Getting-Started-Angular-Template.md b/docs/cs/Getting-Started-Angular-Template.md
index ea5ef0a4bf..185ae68c79 100644
--- a/docs/cs/Getting-Started-Angular-Template.md
+++ b/docs/cs/Getting-Started-Angular-Template.md
@@ -26,7 +26,7 @@ abp new Acme.BookStore -u angular
Vytvořené řešení vyžaduje;
-* [Visual Studio 2019 (v16.3+)](https://visualstudio.microsoft.com/vs/)
+* [Visual Studio 2019 (v16.4.0+)](https://visualstudio.microsoft.com/vs/)
* [.NET Core 3.0+](https://www.microsoft.com/net/download/dotnet-core/)
* [Node v12+](https://nodejs.org)
* [Yarn v1.19+](https://yarnpkg.com/)
diff --git a/docs/cs/Getting-Started-AspNetCore-Application.md b/docs/cs/Getting-Started-AspNetCore-Application.md
index 0537b01579..eb15f45389 100644
--- a/docs/cs/Getting-Started-AspNetCore-Application.md
+++ b/docs/cs/Getting-Started-AspNetCore-Application.md
@@ -4,7 +4,7 @@ Tento tutoriál vysvětluje jak začít s ABP z ničeho s minimem závislostí.
## Tvorba nového projektu
-1. Vytvořte novou AspNet Core Web aplikaci ve Visual Studio 2019 (16.3.0+):
+1. Vytvořte novou AspNet Core Web aplikaci ve Visual Studio 2019 (16.4.0+):

diff --git a/docs/cs/Getting-Started-AspNetCore-MVC-Template.md b/docs/cs/Getting-Started-AspNetCore-MVC-Template.md
index 32edd59931..2149f0f82d 100644
--- a/docs/cs/Getting-Started-AspNetCore-MVC-Template.md
+++ b/docs/cs/Getting-Started-AspNetCore-MVC-Template.md
@@ -26,7 +26,7 @@ Příkaz `new` vytvoří **vrstvenou MVC aplikaci** s **Entity Framework Core**
Vytvořené řešení vyžaduje;
-* [Visual Studio 2019 (v16.3+)](https://visualstudio.microsoft.com/vs/)
+* [Visual Studio 2019 (v16.4.0+)](https://visualstudio.microsoft.com/vs/)
* [.NET Core 3.0+](https://www.microsoft.com/net/download/dotnet-core/)
* [Node v12+](https://nodejs.org)
* [Yarn v1.19+](https://yarnpkg.com/)
diff --git a/docs/en/AspNetCore/Tag-Helpers/Buttons.md b/docs/en/AspNetCore/Tag-Helpers/Buttons.md
new file mode 100644
index 0000000000..b25e6600ef
--- /dev/null
+++ b/docs/en/AspNetCore/Tag-Helpers/Buttons.md
@@ -0,0 +1,95 @@
+# Buttons
+
+ABP framework has a special Tag Helper to create bootstrap button easily.
+
+``
+
+## Attributes
+
+`` has 7 different attribute.
+
+* [`button-type`](#button-type)
+* [`size`](#size)
+* [`busy-text`](#busy-text)
+* [`text`](#text)
+* [`icon`](#icon)
+* [`disabled`](#disabled)
+* [`icon-type`](#icon-type)
+
+
+### `button-type`
+
+`button-type` is a selectable parameter. It's default value is `Default`.
+
+`Button`
+
+You can choose one of the button type listed below.
+
+* `Default`
+* `Primary`
+* `Secondary`
+* `Success`
+* `Danger`
+* `Warning`
+* `Info`
+* `Light`
+* `Dark`
+* `Outline_Primary`
+* `Outline_Secondary`
+* `Outline_Success`
+* `Outline_Danger`
+* `Outline_Warning`
+* `Outline_Info`
+* `Outline_Light`
+* `Outline_Dark`
+* `Link`
+
+### `size`
+
+`size` is a selectable parameter. It's default value is `Default`.
+
+`Button`
+
+You can choose one of the size type listed below.
+
+* `Default`
+* `Small`
+* `Medium`
+* `Large`
+* `Block`
+* `Block_Small`
+* `Block_Medium`
+* `Block_Large`
+
+### `busy-text`
+
+`busy-text` is a string parameter. IT shows the text while the button is busy.
+
+### `text`
+
+`text` is a string parameter that displaying on button.
+
+### `icon`
+
+`icon` is a string parameter. It is depending to [`icon-type`](#`icon-type`). For default, we use [Font Awesome](https://fontawesome.com/) for icons. To use it, you need to set `icon` parameter as a icon name.
+
+##### Example
+
+[fa-address-card](https://fontawesome.com/icons/address-card): 
+
+``
+
+> Don't forget: You dont need to write prefix! It will add automatically "fa" prefix for [Font Awesome](https://fontawesome.com/) icons while you did not change `icon-type`.
+
+### `disabled`
+
+`disabled` is a boolean parameter. If you set it `true`, your button will be disabled.
+
+### `icon-type`
+
+`icon-type` is a selectable parameter. It's default value is `FontAwesome`. You can create your own icon type provider and change it.
+
+You can choose one of the size type listed below.
+
+* `FontAwesome`
+* `Other`
\ No newline at end of file
diff --git a/docs/en/AspNetCore/Tag-Helpers/fa-address-card.png b/docs/en/AspNetCore/Tag-Helpers/fa-address-card.png
new file mode 100644
index 0000000000..a3b2c815b8
Binary files /dev/null and b/docs/en/AspNetCore/Tag-Helpers/fa-address-card.png differ
diff --git a/docs/en/Background-Jobs-Quartz.md b/docs/en/Background-Jobs-Quartz.md
new file mode 100644
index 0000000000..8039192708
--- /dev/null
+++ b/docs/en/Background-Jobs-Quartz.md
@@ -0,0 +1,73 @@
+# Quartz Background Job Manager
+
+[Quartz](https://www.quartz-scheduler.net/) is an advanced background job manager. You can integrate Quartz with the ABP Framework to use it instead of the [default background job manager](Background-Jobs.md). In this way, you can use the same background job API for Quartz and your code will be independent of Quartz. If you like, you can directly use Quartz's API, too.
+
+> See the [background jobs document](Background-Jobs.md) to learn how to use the background job system. This document only shows how to install and configure the Quartz integration.
+
+## Installation
+
+It is suggested to use the [ABP CLI](CLI.md) to install this package.
+
+### Using the ABP CLI
+
+Open a command line window in the folder of the project (.csproj file) and type the following command:
+
+````bash
+abp add-package Volo.Abp.BackgroundJobs.Quartz
+````
+
+### Manual Installation
+
+If you want to manually install;
+
+1. Add the [Volo.Abp.BackgroundJobs.Quartz](https://www.nuget.org/packages/Volo.Abp.BackgroundJobs.Quartz) NuGet package to your project:
+
+ ````
+ Install-Package Volo.Abp.BackgroundJobs.Quartz
+ ````
+
+2. Add the `AbpBackgroundJobsQuartzModule` to the dependency list of your module:
+
+````csharp
+[DependsOn(
+ //...other dependencies
+ typeof(AbpBackgroundJobsQuartzModule) //Add the new module dependency
+ )]
+public class YourModule : AbpModule
+{
+}
+````
+
+## Configuration
+
+Quartz is a very configurable library,and the ABP framework provides `AbpQuartzPreOptions` for this. You can use the `PreConfigure` method in your module class to pre-configure this option. ABP will use it when initializing the Quartz module. For example:
+
+````csharp
+[DependsOn(
+ //...other dependencies
+ typeof(AbpBackgroundJobsQuartzModule) //Add the new module dependency
+ )]
+public class YourModule : AbpModule
+{
+ public override void PreConfigureServices(ServiceConfigurationContext context)
+ {
+ var configuration = context.Services.GetConfiguration();
+
+ PreConfigure(options =>
+ {
+ options.Properties = new NameValueCollection
+ {
+ ["quartz.jobStore.dataSource"] = "BackgroundJobsDemoApp",
+ ["quartz.jobStore.type"] = "Quartz.Impl.AdoJobStore.JobStoreTX, Quartz",
+ ["quartz.jobStore.tablePrefix"] = "QRTZ_",
+ ["quartz.serializer.type"] = "json",
+ ["quartz.dataSource.BackgroundJobsDemoApp.connectionString"] = configuration.GetConnectionString("Quartz"),
+ ["quartz.dataSource.BackgroundJobsDemoApp.provider"] = "SqlServer",
+ ["quartz.jobStore.driverDelegateType"] = "Quartz.Impl.AdoJobStore.SqlServerDelegate, Quartz",
+ };
+ });
+ }
+}
+````
+
+Quartz stores job and scheduling information **in memory by default**. In the example, we use the pre-configuration of [options pattern](Options.md) to change it to the database. For more configuration of Quartz, please refer to the Quartz's [documentation](https://www.quartz-scheduler.net/documentation/quartz-3.x/tutorial/index.html).
\ No newline at end of file
diff --git a/docs/en/Background-Jobs.md b/docs/en/Background-Jobs.md
index 70f06bbadb..7162359662 100644
--- a/docs/en/Background-Jobs.md
+++ b/docs/en/Background-Jobs.md
@@ -11,7 +11,7 @@ Background jobs are **persistent** that means they will be **re-tried** and **ex
## Abstraction Package
-ABP provides an **abstraction** module and **several implementations** for background jobs. It has a built-in/default implementation as well as Hangfire and RabbitMQ integrations.
+ABP provides an **abstraction** module and **several implementations** for background jobs. It has a built-in/default implementation as well as Hangfire, RabbitMQ and Quartz integrations.
`Volo.Abp.BackgroundJobs.Abstractions` nuget package provides needed services to create background jobs and queue background job items. If your module only depend on this package, it can be independent from the actual implementation/integration.
diff --git a/docs/en/Background-Worker.md b/docs/en/Background-Worker.md
new file mode 100644
index 0000000000..13dd7246fc
--- /dev/null
+++ b/docs/en/Background-Worker.md
@@ -0,0 +1,3 @@
+# Background Workers
+
+TODO
\ No newline at end of file
diff --git a/docs/en/Background-Workers-Quartz.md b/docs/en/Background-Workers-Quartz.md
new file mode 100644
index 0000000000..523704cb64
--- /dev/null
+++ b/docs/en/Background-Workers-Quartz.md
@@ -0,0 +1,68 @@
+# Quartz Background Worker Manager
+
+[Quartz](https://www.quartz-scheduler.net/) is an advanced background worker manager. You can integrate Quartz with the ABP Framework to use it instead of the [default background worker manager](Background-Worker.md). ABP simply integrates quartz.
+
+## Installation
+
+It is suggested to use the [ABP CLI](CLI.md) to install this package.
+
+### Using the ABP CLI
+
+Open a command line window in the folder of the project (.csproj file) and type the following command:
+
+````bash
+abp add-package Volo.Abp.BackgroundWorkers.Quartz
+````
+
+### Manual Installation
+
+If you want to manually install;
+
+1. Add the [Volo.Abp.BackgroundWorkers.Quartz](https://www.nuget.org/packages/Volo.Abp.BackgroundWorkers.Quartz) NuGet package to your project:
+
+ ````
+ Install-Package Volo.Abp.BackgroundWorkers.Quartz
+ ````
+
+2. Add the `AbpBackgroundWorkersQuartzModule` to the dependency list of your module:
+
+````csharp
+[DependsOn(
+ //...other dependencies
+ typeof(AbpBackgroundWorkersQuartzModule) //Add the new module dependency
+ )]
+public class YourModule : AbpModule
+{
+}
+````
+
+### Configuration
+
+See [Configuration](Background-Jobs-Quartz.md#Configuration).
+
+### Create a Background Worker
+
+A background work is a class that derives from the `QuartzBackgroundWorkerBase` base class. for example. A simple worker class is shown below:
+
+```` csharp
+public class MyLogWorker : QuartzBackgroundWorkerBase
+{
+ public MyLogWorker()
+ {
+ JobDetail = JobBuilder.Create().Build();
+ Trigger = TriggerBuilder.Create().StartNow().Build();
+ }
+
+ public override Task Execute(IJobExecutionContext context)
+ {
+ Logger.LogInformation("Executed MyLogWorker..!");
+ return Task.CompletedTask;
+ }
+}
+````
+
+We simply implemented the Execute method to write a log. The background worker is a **singleton by default**. If you want, you can also implement a [dependency interface](Dependency-Injection.md#DependencyInterfaces) to register it as another life cycle.
+
+### More
+
+Please see Quartz's [documentation](https://www.quartz-scheduler.net/documentation/index.html) for more information.
\ No newline at end of file
diff --git a/docs/en/Entity-Framework-Core-Migrations.md b/docs/en/Entity-Framework-Core-Migrations.md
index 58773cb39f..23b17293f1 100644
--- a/docs/en/Entity-Framework-Core-Migrations.md
+++ b/docs/en/Entity-Framework-Core-Migrations.md
@@ -899,26 +899,7 @@ public class BookStoreDbMigratorModule : AbpModule
We had a reference to the `Acme.BookStore.EntityFrameworkCore.DbMigrationsForSecondDb` project from the `Acme.BookStore.Web` project, but hadn't added module dependency since we hadn't created it before. But, now we have it and we need to add `typeof(BookStoreEntityFrameworkCoreSecondDbMigrationsModule)` to the dependency list of the `BookStoreWebModule` class.
-#### BookStoreDbMigrationService
-
-You need one final touch to the `BookStoreDbMigrationService` inside the `Acme.BookStore.Domain` project. It is currently designed to work with a single `IBookStoreDbSchemaMigrator` implementation, but now we have two.
-
-It injects `IBookStoreDbSchemaMigrator`. Replace it with an `IEnumerable` injection ([Dependency Injection System](Dependency-Injection.md) allows to inject multiple implementations of an interface just like that).
-
-Now, you have **a collection of schema migrators** instead of a single one. Find the lines like:
-
-````csharp
-await _dbSchemaMigrators.MigrateAsync();
-````
-
-change them to:
-
-````csharp
-foreach (var migrator in _dbSchemaMigrators)
-{
- await migrator.MigrateAsync();
-}
-````
+#### Run the Database Migrator!
You can run the `.DbMigrator` application to migrate & seed the databases. To test, you can delete both databases and run the `.DbMigrator` application again to see if it creates both of the databases.
diff --git a/docs/en/Getting-Started-Angular-Template.md b/docs/en/Getting-Started-Angular-Template.md
index 9a4fddcf2a..6c1f0a4db2 100644
--- a/docs/en/Getting-Started-Angular-Template.md
+++ b/docs/en/Getting-Started-Angular-Template.md
@@ -26,7 +26,7 @@ abp new Acme.BookStore -u angular
The created solution requires;
-* [Visual Studio 2019 (v16.3+)](https://visualstudio.microsoft.com/vs/)
+* [Visual Studio 2019 (v16.4+)](https://visualstudio.microsoft.com/vs/)
* [.NET Core 3.0+](https://www.microsoft.com/net/download/dotnet-core/)
* [Node v12+](https://nodejs.org)
* [Yarn v1.19+](https://yarnpkg.com/)
diff --git a/docs/en/Getting-Started-AspNetCore-Application.md b/docs/en/Getting-Started-AspNetCore-Application.md
index 4abcd039c9..f3fafca7df 100644
--- a/docs/en/Getting-Started-AspNetCore-Application.md
+++ b/docs/en/Getting-Started-AspNetCore-Application.md
@@ -4,7 +4,7 @@ This tutorial explains how to start ABP from scratch with minimal dependencies.
## Create A New Project
-1. Create a new AspNet Core Web Application from Visual Studio 2019 (16.3.0+):
+1. Create a new AspNet Core Web Application from Visual Studio 2019 (16.4.0+):

diff --git a/docs/en/Getting-Started-AspNetCore-MVC-Template.md b/docs/en/Getting-Started-AspNetCore-MVC-Template.md
index 311bb8b4dc..1332a2cd7a 100644
--- a/docs/en/Getting-Started-AspNetCore-MVC-Template.md
+++ b/docs/en/Getting-Started-AspNetCore-MVC-Template.md
@@ -26,7 +26,7 @@ abp new Acme.BookStore
The created solution requires;
-* [Visual Studio 2019 (v16.3+)](https://visualstudio.microsoft.com/vs/)
+* [Visual Studio 2019 (v16.4+)](https://visualstudio.microsoft.com/vs/)
* [.NET Core 3.0+](https://www.microsoft.com/net/download/dotnet-core/)
* [Node v12+](https://nodejs.org)
* [Yarn v1.19+](https://yarnpkg.com/)
diff --git a/docs/en/Samples/Microservice-Demo.md b/docs/en/Samples/Microservice-Demo.md
index ba32878ea6..f074c57e51 100644
--- a/docs/en/Samples/Microservice-Demo.md
+++ b/docs/en/Samples/Microservice-Demo.md
@@ -419,7 +419,7 @@ A screenshot from the Products page:
#### Using Microservices
-Publc web site application uses the Blogging and Product microservices for all operations, over the Public Web Site Gateway (PublicWebSiteGateway.Host).
+Public web site application uses the Blogging and Product microservices for all operations, over the Public Web Site Gateway (PublicWebSiteGateway.Host).
##### Remote End Point
diff --git a/docs/en/Startup-Templates/Module.md b/docs/en/Startup-Templates/Module.md
index 2b95e49a56..45e123971b 100644
--- a/docs/en/Startup-Templates/Module.md
+++ b/docs/en/Startup-Templates/Module.md
@@ -133,7 +133,7 @@ For the `.Web.Unified` application, there is a single database, named `YourProje
##### How to Run?
-Set it as the startup project, run `Update-Database` command for the EF Core from Package Manager Console and run your application. Default username is `admin` and password is `1q2w3E*`.
+Set `host/YourProjectName.Web.Unified` as the startup project, run `Update-Database` command for the EF Core from Package Manager Console and run your application. Default username is `admin` and password is `1q2w3E*`.
#### Separated Deployment & Databases Scenario
diff --git a/docs/en/docs-nav.json b/docs/en/docs-nav.json
index 2e5bf3a663..46a3b54406 100644
--- a/docs/en/docs-nav.json
+++ b/docs/en/docs-nav.json
@@ -348,6 +348,20 @@
{
"text": "RabbitMQ Integration",
"path": "Background-Jobs-RabbitMq.md"
+ },
+ {
+ "text": "Quartz Integration",
+ "path": "Background-Jobs-Quartz.md"
+ }
+ ]
+ },
+ {
+ "text": "Background Workers",
+ "path": "Background-Workers.md",
+ "items": [
+ {
+ "text": "Quartz Integration",
+ "path": "Background-Workers-Quartz.md"
}
]
}
diff --git a/docs/pt-BR/Getting-Started-Angular-Template.md b/docs/pt-BR/Getting-Started-Angular-Template.md
index 707e06cef3..9dac0f080d 100644
--- a/docs/pt-BR/Getting-Started-Angular-Template.md
+++ b/docs/pt-BR/Getting-Started-Angular-Template.md
@@ -26,7 +26,7 @@ abp new Acme.BookStore -u angular
A solução criada requer;
-* [Visual Studio 2019 (v16.3+)](https://visualstudio.microsoft.com/vs/)
+* [Visual Studio 2019 (v16.4+)](https://visualstudio.microsoft.com/vs/)
* [.NET Core 3.0+](https://www.microsoft.com/net/download/dotnet-core/)
* [Node v12+](https://nodejs.org)
* [Yarn v1.19+](https://yarnpkg.com/)
diff --git a/docs/pt-BR/Getting-Started-AspNetCore-MVC-Template.md b/docs/pt-BR/Getting-Started-AspNetCore-MVC-Template.md
index ac82ff0279..8a64bbab23 100644
--- a/docs/pt-BR/Getting-Started-AspNetCore-MVC-Template.md
+++ b/docs/pt-BR/Getting-Started-AspNetCore-MVC-Template.md
@@ -26,7 +26,7 @@ abp new Acme.BookStore
A solução criada requer;
-* [Visual Studio 2019 (v16.3+)](https://visualstudio.microsoft.com/vs/)
+* [Visual Studio 2019 (v16.4+)](https://visualstudio.microsoft.com/vs/)
* [.NET Core 3.0+](https://www.microsoft.com/net/download/dotnet-core/)
* [Node v12+](https://nodejs.org)
* [Yarn v1.19+](https://yarnpkg.com/)
diff --git a/docs/zh-Hans/Background-Jobs-Quartz.md b/docs/zh-Hans/Background-Jobs-Quartz.md
new file mode 100644
index 0000000000..906d0b2d1f
--- /dev/null
+++ b/docs/zh-Hans/Background-Jobs-Quartz.md
@@ -0,0 +1,73 @@
+# Quartz 后台作业管理
+
+[Quartz](https://www.quartz-scheduler.net/)是一个高级的作业管理. 你可以用ABP框架集成Quartz代替[默认后台作业管理](Background-Jobs.md). 通过这种方式你可以使用相同的后台作业API,将你的代码独立于Quartz. 如果你喜欢也可以直接使用Quartz的API.
+
+> 参阅[后台作业文档](Background-Jobs.md),学习如何使用后台作业系统. 本文只介绍了如何安装和配置Quartz集成.
+
+## 安装
+
+建议使用[ABP CLI](CLI.md)安装包.
+
+### 使用ABP CLI
+
+在项目的文件夹(.csproj文件)中打开命令行窗口输入以下命令:
+
+````bash
+abp add-package Volo.Abp.BackgroundJobs.Quartz
+````
+
+### 手动安装
+
+如果你想手动安装;
+
+1. 添加 [Volo.Abp.BackgroundJobs.Quartz](https://www.nuget.org/packages/Volo.Abp.BackgroundJobs.Quartz) NuGet包添加到你的项目:
+
+ ````
+ Install-Package Volo.Abp.BackgroundJobs.Quartz
+ ````
+
+2. 添加 `AbpBackgroundJobsQuartzModule` 到你的模块的依赖列表:
+
+````csharp
+[DependsOn(
+ //...other dependencies
+ typeof(AbpBackgroundJobsQuartzModule) //Add the new module dependency
+ )]
+public class YourModule : AbpModule
+{
+}
+````
+
+## 配置
+
+Quartz是一个可配置的类库,对此ABP框架提供了 `AbpQuartzPreOptions`. 你可以在模块预配置此选项,ABP在初始化Quartz模块时将使用它. 例:
+
+````csharp
+[DependsOn(
+ //...other dependencies
+ typeof(AbpBackgroundJobsQuartzModule) //Add the new module dependency
+ )]
+public class YourModule : AbpModule
+{
+ public override void PreConfigureServices(ServiceConfigurationContext context)
+ {
+ var configuration = context.Services.GetConfiguration();
+
+ PreConfigure(options =>
+ {
+ options.Properties = new NameValueCollection
+ {
+ ["quartz.jobStore.dataSource"] = "BackgroundJobsDemoApp",
+ ["quartz.jobStore.type"] = "Quartz.Impl.AdoJobStore.JobStoreTX, Quartz",
+ ["quartz.jobStore.tablePrefix"] = "QRTZ_",
+ ["quartz.serializer.type"] = "json",
+ ["quartz.dataSource.BackgroundJobsDemoApp.connectionString"] = configuration.GetConnectionString("Quartz"),
+ ["quartz.dataSource.BackgroundJobsDemoApp.provider"] = "SqlServer",
+ ["quartz.jobStore.driverDelegateType"] = "Quartz.Impl.AdoJobStore.SqlServerDelegate, Quartz",
+ };
+ });
+ }
+}
+````
+
+Quartz**默认**将作业与调度信息存储在**内存**中,示例中我们使用[选项模式](Options.md)的预配置将其更改为存储到数据库中. 有关Quartz的更多配置请参阅[Quartz文档](https://www.quartz-scheduler.net/documentation/quartz-3.x/tutorial/index.html).
\ No newline at end of file
diff --git a/docs/zh-Hans/Background-Jobs.md b/docs/zh-Hans/Background-Jobs.md
index 7c2a694005..398a8efc8b 100644
--- a/docs/zh-Hans/Background-Jobs.md
+++ b/docs/zh-Hans/Background-Jobs.md
@@ -7,13 +7,13 @@
- 为执行**长时间运行的任务**而用户无需等待, 例如:用户按了一下"报告"按钮开始一个长时间运行的报告任务, 你把这个任务添加到**队列**里,并在完成后通过电子邮件将报告的结果发送给你的用户.
- 创建**可重试**和**持久的任务**以**确保**代码将**成功执行**. 例如, 你可以在后台作业中发送电子邮件以克服**临时故障**并**保证**最终发送. 这样用户不需要在发送电子邮件时等待.
-后台作业是**持久性的**这意味着即使你的应用程序崩溃了, 后台左右也会在稍后**重试**并**执行**.
+后台作业是**持久性的**这意味着即使你的应用程序崩溃了, 后台作业也会在稍后**重试**并**执行**.
ABP为后台作业提供了一个**抽象**模块和几个后台作业**实现**. 它具有内置/默认的实现以及与Hangfire和RabbitMQ的集成.
## 抽象模块
-ABP为后台作业提供了一个 **abstraction** 模块和 **多个实现**. 它有一个内置/默认实现以及Hangfire与RabbitMQ集成.
+ABP为后台作业提供了一个 **抽象** 模块和 **多个实现**. 它有一个内置/默认实现以及Hangfire,RabbitMQ与Quartz集成.
`Volo.Abp.BackgroundJobs.Abstractions` nuget package 提供了创建后台作业和队列作业所需要的服务. 如果你的模块只依赖这个包,那么它可以独立于其实现/集成.
@@ -174,4 +174,5 @@ public class MyModule : AbpModule
请参阅预构建的作业管理器备选方案:
* [Hangfire 后台作业管理器](Background-Jobs-Hangfire.md)
-* [RabbitMQ 后台作业管理器](Background-Jobs-RabbitMq.md)
\ No newline at end of file
+* [RabbitMQ 后台作业管理器](Background-Jobs-RabbitMq.md)
+* [Quartz 后台作业管理器](Background-Jobs-Quartz.md)
\ No newline at end of file
diff --git a/docs/zh-Hans/Background-Workers-Quartz.md b/docs/zh-Hans/Background-Workers-Quartz.md
new file mode 100644
index 0000000000..4799633b07
--- /dev/null
+++ b/docs/zh-Hans/Background-Workers-Quartz.md
@@ -0,0 +1,68 @@
+# Quartz 后台工作者管理
+
+[Quartz](https://www.quartz-scheduler.net/)是一个高级的后台工作者管理. 你可以用ABP框架集成Quartz代替[默认后台工作者管理](Background-Workers.md). ABP简单的集成了Quartz.
+
+## 安装
+
+建议使用[ABP CLI](CLI.md)安装包.
+
+### 使用ABP CLI
+
+在项目的文件夹(.csproj文件)中打开命令行窗口输入以下命令:
+
+````bash
+abp add-package Volo.Abp.BackgroundWorkers.Quartz
+````
+
+### 手动安装
+
+如果你想手动安装;
+
+1. 添加 [Volo.Abp.BackgroundWorkers.Quartz](https://www.nuget.org/packages/Volo.Abp.BackgroundWorkers.Quartz) NuGet包添加到你的项目:
+
+ ````
+ Install-Package Volo.Abp.BackgroundWorkers.Quartz
+ ````
+
+2. 添加 `AbpBackgroundWorkersQuartzModule` 到你的模块的依赖列表:
+
+````csharp
+[DependsOn(
+ //...other dependencies
+ typeof(AbpBackgroundWorkersQuartzModule) //Add the new module dependency
+ )]
+public class YourModule : AbpModule
+{
+}
+````
+
+### 配置
+
+参阅[配置](Background-Jobs-Quartz.md#配置).
+
+### 创建后台工作者
+
+后台工作者是一个继承自 `QuartzBackgroundWorkerBase` 基类的类. 一个简单的工作者如下所示:
+
+```` csharp
+public class MyLogWorker : QuartzBackgroundWorkerBase
+{
+ public MyLogWorker()
+ {
+ JobDetail = JobBuilder.Create().Build();
+ Trigger = TriggerBuilder.Create().StartNow().Build();
+ }
+
+ public override Task Execute(IJobExecutionContext context)
+ {
+ Logger.LogInformation("Executed MyLogWorker..!");
+ return Task.CompletedTask;
+ }
+}
+````
+
+示例中我们重写了 `Execute` 方法写入日志. 后台工作者默认是**单例**. 如果你需要,也可以实现[依赖接口](Dependency-Injection.md#依赖接口)将其注册为其他的生命周期.
+
+### 更多
+
+参阅Quartz[文档](https://www.quartz-scheduler.net/documentation/index.html)了解更多信息.
\ No newline at end of file
diff --git a/docs/zh-Hans/Background-Workers.md b/docs/zh-Hans/Background-Workers.md
new file mode 100644
index 0000000000..675ca882ec
--- /dev/null
+++ b/docs/zh-Hans/Background-Workers.md
@@ -0,0 +1,3 @@
+# 后台工作者
+
+TODO
\ No newline at end of file
diff --git a/docs/zh-Hans/Getting-Started-AspNetCore-MVC-Template.md b/docs/zh-Hans/Getting-Started-AspNetCore-MVC-Template.md
index d65573d9db..94bcad8fc5 100644
--- a/docs/zh-Hans/Getting-Started-AspNetCore-MVC-Template.md
+++ b/docs/zh-Hans/Getting-Started-AspNetCore-MVC-Template.md
@@ -24,7 +24,7 @@ abp new Acme.BookStore
创建项目的要求:
-* [Visual Studio 2019 (v16.3+)](https://visualstudio.microsoft.com/vs/)
+* [Visual Studio 2019 (v16.4+)](https://visualstudio.microsoft.com/vs/)
* [.NET Core 3.0+](https://www.microsoft.com/net/download/dotnet-core/)
* [Node v12+](https://nodejs.org)
* [Yarn v1.19+](https://yarnpkg.com/)
diff --git a/docs/zh-Hans/docs-nav.json b/docs/zh-Hans/docs-nav.json
index 15391a27a9..f67da497c3 100644
--- a/docs/zh-Hans/docs-nav.json
+++ b/docs/zh-Hans/docs-nav.json
@@ -328,6 +328,20 @@
{
"text": "RabbitMQ 集成",
"path": "Background-Jobs-RabbitMq.md"
+ },
+ {
+ "text": "Quartz 集成",
+ "path": "Background-Jobs-Quartz.md"
+ }
+ ]
+ },
+ {
+ "text": "后台工作者",
+ "path": "Background-Workers.md",
+ "items": [
+ {
+ "text": "Quartz 集成",
+ "path": "Background-Workers-Quartz.md"
}
]
}
diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/ApplicationConfigurationDto.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/ApplicationConfigurationDto.cs
index 44e9076751..cc62a1e1b9 100644
--- a/framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/ApplicationConfigurationDto.cs
+++ b/framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/ApplicationConfigurationDto.cs
@@ -1,4 +1,5 @@
using System;
+using Volo.Abp.AspNetCore.Mvc.MultiTenancy;
namespace Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations
{
@@ -14,5 +15,9 @@ namespace Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations
public CurrentUserDto CurrentUser { get; set; }
public ApplicationFeatureConfigurationDto Features { get; set; }
+
+ public MultiTenancyInfoDto MultiTenancy { get; set; }
+
+ public CurrentTenantDto CurrentTenant { get; set; }
}
}
\ No newline at end of file
diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo/Abp/AspNetCore/Mvc/MultiTenancy/CurrentTenantDto.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo/Abp/AspNetCore/Mvc/MultiTenancy/CurrentTenantDto.cs
new file mode 100644
index 0000000000..06b24f1235
--- /dev/null
+++ b/framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo/Abp/AspNetCore/Mvc/MultiTenancy/CurrentTenantDto.cs
@@ -0,0 +1,15 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Volo.Abp.AspNetCore.Mvc.MultiTenancy
+{
+ public class CurrentTenantDto
+ {
+ public Guid? Id { get; set; }
+
+ public string Name { get; set; }
+
+ public bool IsAvailable { get; set; }
+ }
+}
diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo/Abp/AspNetCore/Mvc/MultiTenancy/MultiTenancyInfoDto.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo/Abp/AspNetCore/Mvc/MultiTenancy/MultiTenancyInfoDto.cs
new file mode 100644
index 0000000000..165a0e5c21
--- /dev/null
+++ b/framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo/Abp/AspNetCore/Mvc/MultiTenancy/MultiTenancyInfoDto.cs
@@ -0,0 +1,11 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Volo.Abp.AspNetCore.Mvc.MultiTenancy
+{
+ public class MultiTenancyInfoDto
+ {
+ public bool IsEnabled { get; set; }
+ }
+}
diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/AbpApplicationConfigurationAppService.cs b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/AbpApplicationConfigurationAppService.cs
index 69f75a31b2..4b4cf521c2 100644
--- a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/AbpApplicationConfigurationAppService.cs
+++ b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/AbpApplicationConfigurationAppService.cs
@@ -8,9 +8,11 @@ using System.Globalization;
using System.Threading.Tasks;
using Microsoft.Extensions.Logging;
using Volo.Abp.Application.Services;
+using Volo.Abp.AspNetCore.Mvc.MultiTenancy;
using Volo.Abp.Authorization;
using Volo.Abp.Features;
using Volo.Abp.Localization;
+using Volo.Abp.MultiTenancy;
using Volo.Abp.Settings;
using Volo.Abp.Users;
@@ -19,6 +21,7 @@ namespace Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations
public class AbpApplicationConfigurationAppService : ApplicationService, IAbpApplicationConfigurationAppService
{
private readonly AbpLocalizationOptions _localizationOptions;
+ private readonly AbpMultiTenancyOptions _multiTenancyOptions;
private readonly IServiceProvider _serviceProvider;
private readonly IAbpAuthorizationPolicyProvider _abpAuthorizationPolicyProvider;
private readonly IAuthorizationService _authorizationService;
@@ -30,6 +33,7 @@ namespace Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations
public AbpApplicationConfigurationAppService(
IOptions localizationOptions,
+ IOptions multiTenancyOptions,
IServiceProvider serviceProvider,
IAbpAuthorizationPolicyProvider abpAuthorizationPolicyProvider,
IAuthorizationService authorizationService,
@@ -48,6 +52,7 @@ namespace Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations
_featureDefinitionManager = featureDefinitionManager;
_languageProvider = languageProvider;
_localizationOptions = localizationOptions.Value;
+ _multiTenancyOptions = multiTenancyOptions.Value;
}
public virtual async Task GetAsync()
@@ -60,11 +65,31 @@ namespace Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations
Features = await GetFeaturesConfigAsync(),
Localization = await GetLocalizationConfigAsync(),
CurrentUser = GetCurrentUser(),
- Setting = await GetSettingConfigAsync()
+ Setting = await GetSettingConfigAsync(),
+ MultiTenancy = GetMultiTenancy(),
+ CurrentTenant = GetCurrentTenant()
};
}
+ protected virtual CurrentTenantDto GetCurrentTenant()
+ {
+ return new CurrentTenantDto()
+ {
+ Id = CurrentTenant.Id,
+ Name = CurrentTenant.Name,
+ IsAvailable = CurrentTenant.IsAvailable
+ };
+ }
+
+ protected virtual MultiTenancyInfoDto GetMultiTenancy()
+ {
+ return new MultiTenancyInfoDto
+ {
+ IsEnabled = _multiTenancyOptions.IsEnabled
+ };
+ }
+
protected virtual CurrentUserDto GetCurrentUser()
{
return new CurrentUserDto
diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Templates/TemplateRandomSslPortStep.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Templates/TemplateRandomSslPortStep.cs
index c5f5292e1a..12bc34221a 100644
--- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Templates/TemplateRandomSslPortStep.cs
+++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Templates/TemplateRandomSslPortStep.cs
@@ -137,12 +137,15 @@ namespace Volo.Abp.Cli.ProjectBuilding.Templates
{
environment.NormalizeLineEndings();
+ var buildInUrlHttp = buildInUrl.Replace("https://", "http://");
+ var buildInUrlWithoutPortHttp = buildInUrlWithoutPort.Replace("https://", "http://");
+
var environmentLines = environment.GetLines();
for (var i = 0; i < environmentLines.Length; i++)
{
- if (environmentLines[i].Contains(buildInUrl))
+ if (environmentLines[i].Contains(buildInUrlHttp))
{
- environmentLines[i] = environmentLines[i].Replace(buildInUrl, $"{buildInUrlWithoutPort}:{newPort}");
+ environmentLines[i] = environmentLines[i].Replace(buildInUrlHttp, $"{buildInUrlWithoutPortHttp}:{newPort}");
}
}
environment.SetLines(environmentLines);
diff --git a/framework/src/Volo.Abp.IdentityModel/Volo.Abp.IdentityModel.csproj b/framework/src/Volo.Abp.IdentityModel/Volo.Abp.IdentityModel.csproj
index ce26fe7bea..afda5e0002 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.Localization/Volo/Abp/Localization/AbpStringLocalizerFactory.cs b/framework/src/Volo.Abp.Localization/Volo/Abp/Localization/AbpStringLocalizerFactory.cs
index edb1eaae77..103567248f 100644
--- a/framework/src/Volo.Abp.Localization/Volo/Abp/Localization/AbpStringLocalizerFactory.cs
+++ b/framework/src/Volo.Abp.Localization/Volo/Abp/Localization/AbpStringLocalizerFactory.cs
@@ -38,10 +38,18 @@ namespace Volo.Abp.Localization
return _innerFactory.Create(resourceType);
}
- return _localizerCache.GetOrAdd(
- resourceType,
- _ => CreateStringLocalizerCacheItem(resource)
- ).Localizer;
+ if (_localizerCache.TryGetValue(resourceType, out var cacheItem))
+ {
+ return cacheItem.Localizer;
+ }
+
+ lock (_localizerCache)
+ {
+ return _localizerCache.GetOrAdd(
+ resourceType,
+ _ => CreateStringLocalizerCacheItem(resource)
+ ).Localizer;
+ }
}
private StringLocalizerCacheItem CreateStringLocalizerCacheItem(LocalizationResource resource)
diff --git a/npm/lerna.json b/npm/lerna.json
index 5704ec6dea..e23f5a1a9a 100644
--- a/npm/lerna.json
+++ b/npm/lerna.json
@@ -1,5 +1,5 @@
{
- "version": "2.1.0",
+ "version": "2.2.0",
"packages": [
"packs/*"
],
diff --git a/npm/ng-packs/lerna.version.json b/npm/ng-packs/lerna.version.json
index 82255f0fff..ccbc798b72 100644
--- a/npm/ng-packs/lerna.version.json
+++ b/npm/ng-packs/lerna.version.json
@@ -1,5 +1,5 @@
{
- "version": "2.1.0",
+ "version": "2.2.0",
"packages": [
"packages/*"
],
diff --git a/npm/ng-packs/packages/account-config/package.json b/npm/ng-packs/packages/account-config/package.json
index 29e7de1c8b..acbfbc6e8b 100644
--- a/npm/ng-packs/packages/account-config/package.json
+++ b/npm/ng-packs/packages/account-config/package.json
@@ -1,6 +1,6 @@
{
"name": "@abp/ng.account.config",
- "version": "2.1.0",
+ "version": "2.2.0",
"homepage": "https://abp.io",
"repository": {
"type": "git",
diff --git a/npm/ng-packs/packages/account/package.json b/npm/ng-packs/packages/account/package.json
index 0fd51c92e2..d4b136a17d 100644
--- a/npm/ng-packs/packages/account/package.json
+++ b/npm/ng-packs/packages/account/package.json
@@ -1,14 +1,14 @@
{
"name": "@abp/ng.account",
- "version": "2.1.0",
+ "version": "2.2.0",
"homepage": "https://abp.io",
"repository": {
"type": "git",
"url": "https://github.com/abpframework/abp.git"
},
"dependencies": {
- "@abp/ng.account.config": "^2.1.0",
- "@abp/ng.theme.shared": "^2.1.0"
+ "@abp/ng.account.config": "^2.2.0",
+ "@abp/ng.theme.shared": "^2.2.0"
},
"publishConfig": {
"access": "public"
diff --git a/npm/ng-packs/packages/core/package.json b/npm/ng-packs/packages/core/package.json
index 690bcff8ec..3fdb5bf6bb 100644
--- a/npm/ng-packs/packages/core/package.json
+++ b/npm/ng-packs/packages/core/package.json
@@ -1,6 +1,6 @@
{
"name": "@abp/ng.core",
- "version": "2.1.0",
+ "version": "2.2.0",
"homepage": "https://abp.io",
"repository": {
"type": "git",
diff --git a/npm/ng-packs/packages/feature-management/package.json b/npm/ng-packs/packages/feature-management/package.json
index 99f3f10900..4ac09b6f9c 100644
--- a/npm/ng-packs/packages/feature-management/package.json
+++ b/npm/ng-packs/packages/feature-management/package.json
@@ -1,13 +1,13 @@
{
"name": "@abp/ng.feature-management",
- "version": "2.1.0",
+ "version": "2.2.0",
"homepage": "https://abp.io",
"repository": {
"type": "git",
"url": "https://github.com/abpframework/abp.git"
},
"dependencies": {
- "@abp/ng.theme.shared": "^2.1.0"
+ "@abp/ng.theme.shared": "^2.2.0"
},
"publishConfig": {
"access": "public"
diff --git a/npm/ng-packs/packages/identity-config/package.json b/npm/ng-packs/packages/identity-config/package.json
index 02ddc47ad8..13ce65c2be 100644
--- a/npm/ng-packs/packages/identity-config/package.json
+++ b/npm/ng-packs/packages/identity-config/package.json
@@ -1,6 +1,6 @@
{
"name": "@abp/ng.identity.config",
- "version": "2.1.0",
+ "version": "2.2.0",
"homepage": "https://abp.io",
"repository": {
"type": "git",
diff --git a/npm/ng-packs/packages/identity/package.json b/npm/ng-packs/packages/identity/package.json
index b931b78043..67a19edb65 100644
--- a/npm/ng-packs/packages/identity/package.json
+++ b/npm/ng-packs/packages/identity/package.json
@@ -1,15 +1,15 @@
{
"name": "@abp/ng.identity",
- "version": "2.1.0",
+ "version": "2.2.0",
"homepage": "https://abp.io",
"repository": {
"type": "git",
"url": "https://github.com/abpframework/abp.git"
},
"dependencies": {
- "@abp/ng.identity.config": "^2.1.0",
- "@abp/ng.permission-management": "^2.1.0",
- "@abp/ng.theme.shared": "^2.1.0"
+ "@abp/ng.identity.config": "^2.2.0",
+ "@abp/ng.permission-management": "^2.2.0",
+ "@abp/ng.theme.shared": "^2.2.0"
},
"publishConfig": {
"access": "public"
diff --git a/npm/ng-packs/packages/identity/src/lib/components/roles/roles.component.html b/npm/ng-packs/packages/identity/src/lib/components/roles/roles.component.html
index 89cbd99789..f800c4a8e4 100644
--- a/npm/ng-packs/packages/identity/src/lib/components/roles/roles.component.html
+++ b/npm/ng-packs/packages/identity/src/lib/components/roles/roles.component.html
@@ -76,7 +76,7 @@
diff --git a/npm/ng-packs/packages/identity/src/lib/components/roles/roles.component.ts b/npm/ng-packs/packages/identity/src/lib/components/roles/roles.component.ts
index 3ac929bc5d..546ff48483 100644
--- a/npm/ng-packs/packages/identity/src/lib/components/roles/roles.component.ts
+++ b/npm/ng-packs/packages/identity/src/lib/components/roles/roles.component.ts
@@ -142,4 +142,11 @@ export class RolesComponent implements OnInit {
new Event('submit', { bubbles: true, cancelable: true }),
);
}
+
+ openPermissionsModal(providerKey: string) {
+ this.providerKey = providerKey;
+ setTimeout(() => {
+ this.visiblePermissions = true;
+ }, 0);
+ }
}
diff --git a/npm/ng-packs/packages/identity/src/lib/components/users/users.component.html b/npm/ng-packs/packages/identity/src/lib/components/users/users.component.html
index 534bdee970..38b22789e9 100644
--- a/npm/ng-packs/packages/identity/src/lib/components/users/users.component.html
+++ b/npm/ng-packs/packages/identity/src/lib/components/users/users.component.html
@@ -102,7 +102,7 @@
diff --git a/npm/ng-packs/packages/identity/src/lib/components/users/users.component.ts b/npm/ng-packs/packages/identity/src/lib/components/users/users.component.ts
index f0a55f6bfe..356292d438 100644
--- a/npm/ng-packs/packages/identity/src/lib/components/users/users.component.ts
+++ b/npm/ng-packs/packages/identity/src/lib/components/users/users.component.ts
@@ -243,4 +243,11 @@ export class UsersComponent implements OnInit {
.pipe(finalize(() => (this.loading = false)))
.subscribe();
}
+
+ openPermissionsModal(providerKey: string) {
+ this.providerKey = providerKey;
+ setTimeout(() => {
+ this.visiblePermissions = true;
+ }, 0);
+ }
}
diff --git a/npm/ng-packs/packages/permission-management/package.json b/npm/ng-packs/packages/permission-management/package.json
index 960df5e00f..cc0c80f01d 100644
--- a/npm/ng-packs/packages/permission-management/package.json
+++ b/npm/ng-packs/packages/permission-management/package.json
@@ -1,13 +1,13 @@
{
"name": "@abp/ng.permission-management",
- "version": "2.1.0",
+ "version": "2.2.0",
"homepage": "https://abp.io",
"repository": {
"type": "git",
"url": "https://github.com/abpframework/abp.git"
},
"dependencies": {
- "@abp/ng.theme.shared": "^2.1.0"
+ "@abp/ng.theme.shared": "^2.2.0"
},
"publishConfig": {
"access": "public"
diff --git a/npm/ng-packs/packages/setting-management-config/package.json b/npm/ng-packs/packages/setting-management-config/package.json
index 6dfb125a1c..5467d1591d 100644
--- a/npm/ng-packs/packages/setting-management-config/package.json
+++ b/npm/ng-packs/packages/setting-management-config/package.json
@@ -1,6 +1,6 @@
{
"name": "@abp/ng.setting-management.config",
- "version": "2.1.0",
+ "version": "2.2.0",
"homepage": "https://abp.io",
"repository": {
"type": "git",
diff --git a/npm/ng-packs/packages/setting-management/package.json b/npm/ng-packs/packages/setting-management/package.json
index be71733edc..5947478234 100644
--- a/npm/ng-packs/packages/setting-management/package.json
+++ b/npm/ng-packs/packages/setting-management/package.json
@@ -1,14 +1,14 @@
{
"name": "@abp/ng.setting-management",
- "version": "2.1.0",
+ "version": "2.2.0",
"homepage": "https://abp.io",
"repository": {
"type": "git",
"url": "https://github.com/abpframework/abp.git"
},
"dependencies": {
- "@abp/ng.setting-management.config": "^2.1.0",
- "@abp/ng.theme.shared": "^2.1.0"
+ "@abp/ng.setting-management.config": "^2.2.0",
+ "@abp/ng.theme.shared": "^2.2.0"
},
"publishConfig": {
"access": "public"
diff --git a/npm/ng-packs/packages/tenant-management-config/package.json b/npm/ng-packs/packages/tenant-management-config/package.json
index 13de14a892..c2f8f63ec2 100644
--- a/npm/ng-packs/packages/tenant-management-config/package.json
+++ b/npm/ng-packs/packages/tenant-management-config/package.json
@@ -1,6 +1,6 @@
{
"name": "@abp/ng.tenant-management.config",
- "version": "2.1.0",
+ "version": "2.2.0",
"homepage": "https://abp.io",
"repository": {
"type": "git",
diff --git a/npm/ng-packs/packages/tenant-management/package.json b/npm/ng-packs/packages/tenant-management/package.json
index 9e60dc4ae2..a53304ba9c 100644
--- a/npm/ng-packs/packages/tenant-management/package.json
+++ b/npm/ng-packs/packages/tenant-management/package.json
@@ -1,15 +1,15 @@
{
"name": "@abp/ng.tenant-management",
- "version": "2.1.0",
+ "version": "2.2.0",
"homepage": "https://abp.io",
"repository": {
"type": "git",
"url": "https://github.com/abpframework/abp.git"
},
"dependencies": {
- "@abp/ng.feature-management": "^2.1.0",
- "@abp/ng.tenant-management.config": "^2.1.0",
- "@abp/ng.theme.shared": "^2.1.0"
+ "@abp/ng.feature-management": "^2.2.0",
+ "@abp/ng.tenant-management.config": "^2.2.0",
+ "@abp/ng.theme.shared": "^2.2.0"
},
"publishConfig": {
"access": "public"
diff --git a/npm/ng-packs/packages/tenant-management/src/lib/components/tenants/tenants.component.html b/npm/ng-packs/packages/tenant-management/src/lib/components/tenants/tenants.component.html
index 6a4690e797..a0fccaf9d3 100644
--- a/npm/ng-packs/packages/tenant-management/src/lib/components/tenants/tenants.component.html
+++ b/npm/ng-packs/packages/tenant-management/src/lib/components/tenants/tenants.component.html
@@ -93,7 +93,7 @@
diff --git a/npm/ng-packs/packages/tenant-management/src/lib/components/tenants/tenants.component.ts b/npm/ng-packs/packages/tenant-management/src/lib/components/tenants/tenants.component.ts
index fcc2afd3da..fa400d06f9 100644
--- a/npm/ng-packs/packages/tenant-management/src/lib/components/tenants/tenants.component.ts
+++ b/npm/ng-packs/packages/tenant-management/src/lib/components/tenants/tenants.component.ts
@@ -272,4 +272,11 @@ export class TenantsComponent implements OnInit {
}, 0);
}
}
+
+ openFeaturesModal(providerKey: string) {
+ this.providerKey = providerKey;
+ setTimeout(() => {
+ this.visibleFeatures = true;
+ }, 0);
+ }
}
diff --git a/npm/ng-packs/packages/theme-basic/package.json b/npm/ng-packs/packages/theme-basic/package.json
index 16e2a5f0a2..9bfc619578 100644
--- a/npm/ng-packs/packages/theme-basic/package.json
+++ b/npm/ng-packs/packages/theme-basic/package.json
@@ -1,13 +1,13 @@
{
"name": "@abp/ng.theme.basic",
- "version": "2.1.0",
+ "version": "2.2.0",
"homepage": "https://abp.io",
"repository": {
"type": "git",
"url": "https://github.com/abpframework/abp.git"
},
"dependencies": {
- "@abp/ng.theme.shared": "^2.1.0"
+ "@abp/ng.theme.shared": "^2.2.0"
},
"publishConfig": {
"access": "public"
diff --git a/npm/ng-packs/packages/theme-shared/package.json b/npm/ng-packs/packages/theme-shared/package.json
index c48d70b316..1776bb0a12 100644
--- a/npm/ng-packs/packages/theme-shared/package.json
+++ b/npm/ng-packs/packages/theme-shared/package.json
@@ -1,13 +1,13 @@
{
"name": "@abp/ng.theme.shared",
- "version": "2.1.0",
+ "version": "2.2.0",
"homepage": "https://abp.io",
"repository": {
"type": "git",
"url": "https://github.com/abpframework/abp.git"
},
"dependencies": {
- "@abp/ng.core": "^2.1.0",
+ "@abp/ng.core": "^2.2.0",
"@fortawesome/fontawesome-free": "^5.12.1",
"@ng-bootstrap/ng-bootstrap": "^5.3.0",
"@ngx-validate/core": "^0.0.7",
diff --git a/npm/ng-packs/scripts/publish.ts b/npm/ng-packs/scripts/publish.ts
index 3a8197522f..5570602813 100644
--- a/npm/ng-packs/scripts/publish.ts
+++ b/npm/ng-packs/scripts/publish.ts
@@ -19,6 +19,8 @@ const publish = async () => {
process.exit(1);
}
+ const registry = program.preview ? 'http://localhost:4873' : 'https://registry.npmjs.org';
+
try {
await execa('yarn', ['install-new-dependencies'], { stdout: 'inherit' });
@@ -44,9 +46,7 @@ const publish = async () => {
'lerna',
'exec',
'--',
- `"npm publish --registry https://registry.npmjs.org${
- program.preview ? ' --tag preview' : ''
- }"`,
+ `"npm publish --registry ${registry}${program.preview ? ' --tag preview' : ''}"`,
],
{
stdout: 'inherit',
@@ -56,12 +56,14 @@ const publish = async () => {
await fse.rename('../lerna.json', '../lerna.publish.json');
- await execa('git', ['add', '../packages/*', '../package.json', '../lerna.version.json'], {
- stdout: 'inherit',
- });
- await execa('git', ['commit', '-m', 'Upgrade ng package versions', '--no-verify'], {
- stdout: 'inherit',
- });
+ if (!program.preview) {
+ await execa('git', ['add', '../packages/*', '../package.json', '../lerna.version.json'], {
+ stdout: 'inherit',
+ });
+ await execa('git', ['commit', '-m', 'Upgrade ng package versions', '--no-verify'], {
+ stdout: 'inherit',
+ });
+ }
} catch (error) {
console.error(error.stderr);
process.exit(1);
diff --git a/npm/ng-packs/yarn.lock b/npm/ng-packs/yarn.lock
index 9f534018fa..f405dcbd9d 100644
--- a/npm/ng-packs/yarn.lock
+++ b/npm/ng-packs/yarn.lock
@@ -4670,7 +4670,7 @@ debug@3.1.0, debug@~3.1.0:
dependencies:
ms "2.0.0"
-debug@^3.0.0, debug@^3.1.0, debug@^3.1.1, debug@^3.2.5, debug@^3.2.6:
+debug@^3.0.0, debug@^3.1.0, debug@^3.1.1, debug@^3.2.5:
version "3.2.6"
resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b"
integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==
@@ -4862,11 +4862,6 @@ detect-indent@^5.0.0:
resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-5.0.0.tgz#3871cc0a6a002e8c3e5b3cf7f336264675f06b9d"
integrity sha1-OHHMCmoALow+Wzz38zYmRnXwa50=
-detect-libc@^1.0.2:
- version "1.0.3"
- resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b"
- integrity sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=
-
detect-newline@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-2.1.0.tgz#f41f1c10be4b00e87b5f13da680759f2c5bfd3e2"
@@ -6315,7 +6310,7 @@ humanize-ms@^1.2.1:
dependencies:
ms "^2.0.0"
-iconv-lite@0.4.24, iconv-lite@^0.4.24, iconv-lite@^0.4.4, iconv-lite@~0.4.13:
+iconv-lite@0.4.24, iconv-lite@^0.4.24, iconv-lite@~0.4.13:
version "0.4.24"
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b"
integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==
@@ -8487,15 +8482,6 @@ natural-compare@^1.4.0:
resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7"
integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=
-needle@^2.2.1:
- version "2.3.2"
- resolved "https://registry.yarnpkg.com/needle/-/needle-2.3.2.tgz#3342dea100b7160960a450dc8c22160ac712a528"
- integrity sha512-DUzITvPVDUy6vczKKYTnWc/pBZ0EnjMJnQ3y+Jo5zfKFimJs7S3HFCxCRZYB9FUZcrzUQr3WsmvZgddMEIZv6w==
- dependencies:
- debug "^3.2.6"
- iconv-lite "^0.4.4"
- sax "^1.2.4"
-
negotiator@0.6.2:
version "0.6.2"
resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb"
@@ -8649,22 +8635,6 @@ node-notifier@^5.4.2:
shellwords "^0.1.1"
which "^1.3.0"
-node-pre-gyp@*:
- version "0.14.0"
- resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.14.0.tgz#9a0596533b877289bcad4e143982ca3d904ddc83"
- integrity sha512-+CvDC7ZttU/sSt9rFjix/P05iS43qHCOOGzcr3Ry99bXG7VX953+vFyEuph/tfqoYu8dttBkE86JSKBO2OzcxA==
- dependencies:
- detect-libc "^1.0.2"
- mkdirp "^0.5.1"
- needle "^2.2.1"
- nopt "^4.0.1"
- npm-packlist "^1.1.6"
- npmlog "^4.0.2"
- rc "^1.2.7"
- rimraf "^2.6.1"
- semver "^5.3.0"
- tar "^4.4.2"
-
node-releases@^1.1.47, node-releases@^1.1.49:
version "1.1.50"
resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.50.tgz#803c40d2c45db172d0410e4efec83aa8c6ad0592"
@@ -8780,7 +8750,7 @@ npm-package-arg@6.1.0:
semver "^5.6.0"
validate-npm-package-name "^3.0.0"
-npm-packlist@^1.1.12, npm-packlist@^1.1.6, npm-packlist@^1.4.4:
+npm-packlist@^1.1.12, npm-packlist@^1.4.4:
version "1.4.8"
resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.4.8.tgz#56ee6cc135b9f98ad3d51c1c95da22bbb9b2ef3e"
integrity sha512-5+AZgwru5IevF5ZdnFglB5wNlHG1AOOuw28WhUq8/8emhBmLv6jX5by4WJCh7lW0uSYZYS6DXqIsyZVIXRZU9A==
@@ -8853,7 +8823,7 @@ npm-run-path@^3.0.0:
dependencies:
path-key "^3.0.0"
-"npmlog@2 || ^3.1.0 || ^4.0.0", npmlog@^4.0.2, npmlog@^4.1.2:
+"npmlog@2 || ^3.1.0 || ^4.0.0", npmlog@^4.1.2:
version "4.1.2"
resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b"
integrity sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==
@@ -9886,7 +9856,7 @@ raw-loader@3.1.0:
loader-utils "^1.1.0"
schema-utils "^2.0.1"
-rc@^1.2.7, rc@^1.2.8:
+rc@^1.2.8:
version "1.2.8"
resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed"
integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==
@@ -10387,7 +10357,7 @@ rimraf@3.0.0:
dependencies:
glob "^7.1.3"
-rimraf@^2.2.8, rimraf@^2.5.2, rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.2, rimraf@^2.6.3:
+rimraf@^2.2.8, rimraf@^2.5.2, rimraf@^2.5.4, rimraf@^2.6.2, rimraf@^2.6.3:
version "2.7.1"
resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec"
integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==
@@ -11447,7 +11417,7 @@ tapable@^1.0.0, tapable@^1.1.3:
resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.1.3.tgz#a1fccc06b58db61fd7a45da2da44f5f3a3e67ba2"
integrity sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA==
-tar@^4.4.10, tar@^4.4.12, tar@^4.4.2, tar@^4.4.8:
+tar@^4.4.10, tar@^4.4.12, tar@^4.4.8:
version "4.4.13"
resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.13.tgz#43b364bc52888d555298637b10d60790254ab525"
integrity sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA==
diff --git a/npm/package-lock.json b/npm/package-lock.json
index 964d3d3877..5aadbe1235 100644
--- a/npm/package-lock.json
+++ b/npm/package-lock.json
@@ -1,5 +1,5 @@
{
- "version": "2.1.0",
+ "version": "2.2.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
diff --git a/npm/package.json b/npm/package.json
index 60e21ea830..42879096a6 100644
--- a/npm/package.json
+++ b/npm/package.json
@@ -1,5 +1,5 @@
-{
- "version": "2.2.0",
+{
+ "version": "2.2.0",
"scripts": {
"lerna": "lerna",
"gulp:app": "node run-gulp-script.js ../templates/app/aspnet-core",
diff --git a/npm/packs/anchor-js/package.json b/npm/packs/anchor-js/package.json
index fc870fbd56..0548674d45 100644
--- a/npm/packs/anchor-js/package.json
+++ b/npm/packs/anchor-js/package.json
@@ -1,12 +1,12 @@
{
- "version": "2.1.0",
+ "version": "2.2.0",
"name": "@abp/anchor-js",
"publishConfig": {
"access": "public"
},
"dependencies": {
- "@abp/core": "^2.1.0",
+ "@abp/core": "^2.2.0",
"anchor-js": "^4.2.2"
},
- "gitHead": "8b95e7469f6459fd51d56f4c20ca067533b07992"
+ "gitHead": "d5707967977fb14328661ae403c41eaa679ee263"
}
diff --git a/npm/packs/aspnetcore.mvc.ui.theme.basic/package.json b/npm/packs/aspnetcore.mvc.ui.theme.basic/package.json
index 417b694482..e3b0981f37 100644
--- a/npm/packs/aspnetcore.mvc.ui.theme.basic/package.json
+++ b/npm/packs/aspnetcore.mvc.ui.theme.basic/package.json
@@ -1,11 +1,11 @@
{
- "version": "2.1.0",
+ "version": "2.2.0",
"name": "@abp/aspnetcore.mvc.ui.theme.basic",
"publishConfig": {
"access": "public"
},
"dependencies": {
- "@abp/aspnetcore.mvc.ui.theme.shared": "^2.1.0"
+ "@abp/aspnetcore.mvc.ui.theme.shared": "^2.2.0"
},
- "gitHead": "8b95e7469f6459fd51d56f4c20ca067533b07992"
+ "gitHead": "d5707967977fb14328661ae403c41eaa679ee263"
}
diff --git a/npm/packs/aspnetcore.mvc.ui.theme.shared/package.json b/npm/packs/aspnetcore.mvc.ui.theme.shared/package.json
index fb3f8affa9..05d398abcd 100644
--- a/npm/packs/aspnetcore.mvc.ui.theme.shared/package.json
+++ b/npm/packs/aspnetcore.mvc.ui.theme.shared/package.json
@@ -1,24 +1,24 @@
{
- "version": "2.1.0",
+ "version": "2.2.0",
"name": "@abp/aspnetcore.mvc.ui.theme.shared",
"publishConfig": {
"access": "public"
},
"dependencies": {
- "@abp/aspnetcore.mvc.ui": "^2.1.0",
- "@abp/bootstrap": "^2.1.0",
- "@abp/bootstrap-datepicker": "^2.1.0",
- "@abp/datatables.net-bs4": "^2.1.0",
- "@abp/font-awesome": "^2.1.0",
- "@abp/jquery-form": "^2.1.0",
- "@abp/jquery-validation-unobtrusive": "^2.1.0",
- "@abp/lodash": "^2.1.0",
- "@abp/luxon": "^2.1.0",
- "@abp/malihu-custom-scrollbar-plugin": "^2.1.0",
- "@abp/select2": "^2.1.0",
- "@abp/sweetalert": "^2.1.0",
- "@abp/timeago": "^2.1.0",
- "@abp/toastr": "^2.1.0"
+ "@abp/aspnetcore.mvc.ui": "^2.2.0",
+ "@abp/bootstrap": "^2.2.0",
+ "@abp/bootstrap-datepicker": "^2.2.0",
+ "@abp/datatables.net-bs4": "^2.2.0",
+ "@abp/font-awesome": "^2.2.0",
+ "@abp/jquery-form": "^2.2.0",
+ "@abp/jquery-validation-unobtrusive": "^2.2.0",
+ "@abp/lodash": "^2.2.0",
+ "@abp/luxon": "^2.2.0",
+ "@abp/malihu-custom-scrollbar-plugin": "^2.2.0",
+ "@abp/select2": "^2.2.0",
+ "@abp/sweetalert": "^2.2.0",
+ "@abp/timeago": "^2.2.0",
+ "@abp/toastr": "^2.2.0"
},
- "gitHead": "8b95e7469f6459fd51d56f4c20ca067533b07992"
+ "gitHead": "d5707967977fb14328661ae403c41eaa679ee263"
}
diff --git a/npm/packs/aspnetcore.mvc.ui/package.json b/npm/packs/aspnetcore.mvc.ui/package.json
index 76013c0a33..3f32ccb015 100644
--- a/npm/packs/aspnetcore.mvc.ui/package.json
+++ b/npm/packs/aspnetcore.mvc.ui/package.json
@@ -1,5 +1,5 @@
{
- "version": "2.1.0",
+ "version": "2.2.0",
"name": "@abp/aspnetcore.mvc.ui",
"publishConfig": {
"access": "public"
@@ -12,5 +12,5 @@
"path": "^0.12.7",
"rimraf": "^3.0.0"
},
- "gitHead": "8b95e7469f6459fd51d56f4c20ca067533b07992"
+ "gitHead": "d5707967977fb14328661ae403c41eaa679ee263"
}
diff --git a/npm/packs/blogging/package.json b/npm/packs/blogging/package.json
index 2c6512c852..932b4c856d 100644
--- a/npm/packs/blogging/package.json
+++ b/npm/packs/blogging/package.json
@@ -1,13 +1,13 @@
{
- "version": "2.1.0",
+ "version": "2.2.0",
"name": "@abp/blogging",
"publishConfig": {
"access": "public"
},
"dependencies": {
- "@abp/aspnetcore.mvc.ui.theme.shared": "^2.1.0",
- "@abp/owl.carousel": "^2.1.0",
- "@abp/tui-editor": "^2.1.0"
+ "@abp/aspnetcore.mvc.ui.theme.shared": "^2.2.0",
+ "@abp/owl.carousel": "^2.2.0",
+ "@abp/tui-editor": "^2.2.0"
},
- "gitHead": "8b95e7469f6459fd51d56f4c20ca067533b07992"
+ "gitHead": "d5707967977fb14328661ae403c41eaa679ee263"
}
diff --git a/npm/packs/bootstrap-datepicker/package.json b/npm/packs/bootstrap-datepicker/package.json
index b3fbcf35b4..386d7eba6c 100644
--- a/npm/packs/bootstrap-datepicker/package.json
+++ b/npm/packs/bootstrap-datepicker/package.json
@@ -1,5 +1,5 @@
{
- "version": "2.1.0",
+ "version": "2.2.0",
"name": "@abp/bootstrap-datepicker",
"publishConfig": {
"access": "public"
@@ -7,5 +7,5 @@
"dependencies": {
"bootstrap-datepicker": "^1.9.0"
},
- "gitHead": "8b95e7469f6459fd51d56f4c20ca067533b07992"
+ "gitHead": "d5707967977fb14328661ae403c41eaa679ee263"
}
diff --git a/npm/packs/bootstrap/package.json b/npm/packs/bootstrap/package.json
index 9b33112e65..498e54e892 100644
--- a/npm/packs/bootstrap/package.json
+++ b/npm/packs/bootstrap/package.json
@@ -1,12 +1,12 @@
{
- "version": "2.1.0",
+ "version": "2.2.0",
"name": "@abp/bootstrap",
"publishConfig": {
"access": "public"
},
"dependencies": {
- "@abp/core": "^2.1.0",
+ "@abp/core": "^2.2.0",
"bootstrap": "^4.3.1"
},
- "gitHead": "8b95e7469f6459fd51d56f4c20ca067533b07992"
+ "gitHead": "d5707967977fb14328661ae403c41eaa679ee263"
}
diff --git a/npm/packs/chart.js/package.json b/npm/packs/chart.js/package.json
index b3a1bf4884..80ccd61e17 100644
--- a/npm/packs/chart.js/package.json
+++ b/npm/packs/chart.js/package.json
@@ -1,5 +1,5 @@
{
- "version": "2.1.0",
+ "version": "2.2.0",
"name": "@abp/chart.js",
"publishConfig": {
"access": "public"
@@ -7,5 +7,5 @@
"dependencies": {
"chart.js": "^2.9.3"
},
- "gitHead": "8b95e7469f6459fd51d56f4c20ca067533b07992"
+ "gitHead": "d5707967977fb14328661ae403c41eaa679ee263"
}
diff --git a/npm/packs/clipboard/package.json b/npm/packs/clipboard/package.json
index 2093609151..b6a483d76f 100644
--- a/npm/packs/clipboard/package.json
+++ b/npm/packs/clipboard/package.json
@@ -1,12 +1,12 @@
{
- "version": "2.1.0",
+ "version": "2.2.0",
"name": "@abp/clipboard",
"publishConfig": {
"access": "public"
},
"dependencies": {
- "@abp/core": "^2.1.0",
+ "@abp/core": "^2.2.0",
"clipboard": "^2.0.4"
},
- "gitHead": "8b95e7469f6459fd51d56f4c20ca067533b07992"
+ "gitHead": "d5707967977fb14328661ae403c41eaa679ee263"
}
diff --git a/npm/packs/codemirror/package.json b/npm/packs/codemirror/package.json
index 8ac6657a13..7a2b528f44 100644
--- a/npm/packs/codemirror/package.json
+++ b/npm/packs/codemirror/package.json
@@ -1,12 +1,12 @@
{
- "version": "2.1.0",
+ "version": "2.2.0",
"name": "@abp/codemirror",
"publishConfig": {
"access": "public"
},
"dependencies": {
- "@abp/core": "^2.1.0",
+ "@abp/core": "^2.2.0",
"codemirror": "^5.49.2"
},
- "gitHead": "8b95e7469f6459fd51d56f4c20ca067533b07992"
+ "gitHead": "d5707967977fb14328661ae403c41eaa679ee263"
}
diff --git a/npm/packs/core/package.json b/npm/packs/core/package.json
index 550063546f..dec0ece13b 100644
--- a/npm/packs/core/package.json
+++ b/npm/packs/core/package.json
@@ -1,8 +1,8 @@
{
- "version": "2.1.0",
+ "version": "2.2.0",
"name": "@abp/core",
"publishConfig": {
"access": "public"
},
- "gitHead": "8b95e7469f6459fd51d56f4c20ca067533b07992"
+ "gitHead": "d5707967977fb14328661ae403c41eaa679ee263"
}
diff --git a/npm/packs/datatables.net-bs4/package.json b/npm/packs/datatables.net-bs4/package.json
index d1a0f60c72..d5e3c10801 100644
--- a/npm/packs/datatables.net-bs4/package.json
+++ b/npm/packs/datatables.net-bs4/package.json
@@ -1,12 +1,12 @@
{
- "version": "2.1.0",
+ "version": "2.2.0",
"name": "@abp/datatables.net-bs4",
"publishConfig": {
"access": "public"
},
"dependencies": {
- "@abp/datatables.net": "^2.1.0",
+ "@abp/datatables.net": "^2.2.0",
"datatables.net-bs4": "^1.10.20"
},
- "gitHead": "8b95e7469f6459fd51d56f4c20ca067533b07992"
+ "gitHead": "d5707967977fb14328661ae403c41eaa679ee263"
}
diff --git a/npm/packs/datatables.net/package.json b/npm/packs/datatables.net/package.json
index 820ef2c3e3..47d51dd15b 100644
--- a/npm/packs/datatables.net/package.json
+++ b/npm/packs/datatables.net/package.json
@@ -1,12 +1,12 @@
{
- "version": "2.1.0",
+ "version": "2.2.0",
"name": "@abp/datatables.net",
"publishConfig": {
"access": "public"
},
"dependencies": {
- "@abp/core": "^2.1.0",
+ "@abp/core": "^2.2.0",
"datatables.net": "^1.10.20"
},
- "gitHead": "8b95e7469f6459fd51d56f4c20ca067533b07992"
+ "gitHead": "d5707967977fb14328661ae403c41eaa679ee263"
}
diff --git a/npm/packs/docs/package.json b/npm/packs/docs/package.json
index 8b5ca447fb..e21b186f57 100644
--- a/npm/packs/docs/package.json
+++ b/npm/packs/docs/package.json
@@ -1,15 +1,15 @@
{
- "version": "2.1.0",
+ "version": "2.2.0",
"name": "@abp/docs",
"publishConfig": {
"access": "public"
},
"dependencies": {
- "@abp/anchor-js": "^2.1.0",
- "@abp/clipboard": "^2.1.0",
- "@abp/malihu-custom-scrollbar-plugin": "^2.1.0",
- "@abp/popper.js": "^2.1.0",
- "@abp/prismjs": "^2.1.0"
+ "@abp/anchor-js": "^2.2.0",
+ "@abp/clipboard": "^2.2.0",
+ "@abp/malihu-custom-scrollbar-plugin": "^2.2.0",
+ "@abp/popper.js": "^2.2.0",
+ "@abp/prismjs": "^2.2.0"
},
- "gitHead": "8b95e7469f6459fd51d56f4c20ca067533b07992"
+ "gitHead": "d5707967977fb14328661ae403c41eaa679ee263"
}
diff --git a/npm/packs/flag-icon-css/package.json b/npm/packs/flag-icon-css/package.json
index f417da6e67..96ec8df8c4 100644
--- a/npm/packs/flag-icon-css/package.json
+++ b/npm/packs/flag-icon-css/package.json
@@ -1,5 +1,5 @@
{
- "version": "2.1.0",
+ "version": "2.2.0",
"name": "@abp/flag-icon-css",
"publishConfig": {
"access": "public"
@@ -7,5 +7,5 @@
"dependencies": {
"flag-icon-css": "^3.4.5"
},
- "gitHead": "8b95e7469f6459fd51d56f4c20ca067533b07992"
+ "gitHead": "d5707967977fb14328661ae403c41eaa679ee263"
}
diff --git a/npm/packs/font-awesome/package.json b/npm/packs/font-awesome/package.json
index a2f78e633a..fe302462be 100644
--- a/npm/packs/font-awesome/package.json
+++ b/npm/packs/font-awesome/package.json
@@ -1,12 +1,12 @@
{
- "version": "2.1.0",
+ "version": "2.2.0",
"name": "@abp/font-awesome",
"publishConfig": {
"access": "public"
},
"dependencies": {
- "@abp/core": "^2.1.0",
+ "@abp/core": "^2.2.0",
"@fortawesome/fontawesome-free": "^5.11.2"
},
- "gitHead": "8b95e7469f6459fd51d56f4c20ca067533b07992"
+ "gitHead": "d5707967977fb14328661ae403c41eaa679ee263"
}
diff --git a/npm/packs/highlight.js/package.json b/npm/packs/highlight.js/package.json
index 9acc66df3a..e46c972e59 100644
--- a/npm/packs/highlight.js/package.json
+++ b/npm/packs/highlight.js/package.json
@@ -1,11 +1,11 @@
{
- "version": "2.1.0",
+ "version": "2.2.0",
"name": "@abp/highlight.js",
"publishConfig": {
"access": "public"
},
"dependencies": {
- "@abp/core": "^2.1.0"
+ "@abp/core": "^2.2.0"
},
- "gitHead": "8b95e7469f6459fd51d56f4c20ca067533b07992"
+ "gitHead": "d5707967977fb14328661ae403c41eaa679ee263"
}
diff --git a/npm/packs/jquery-form/package.json b/npm/packs/jquery-form/package.json
index 144027a6a4..391c4a06df 100644
--- a/npm/packs/jquery-form/package.json
+++ b/npm/packs/jquery-form/package.json
@@ -1,12 +1,12 @@
{
- "version": "2.1.0",
+ "version": "2.2.0",
"name": "@abp/jquery-form",
"publishConfig": {
"access": "public"
},
"dependencies": {
- "@abp/jquery": "^2.1.0",
+ "@abp/jquery": "^2.2.0",
"jquery-form": "^4.2.2"
},
- "gitHead": "8b95e7469f6459fd51d56f4c20ca067533b07992"
+ "gitHead": "d5707967977fb14328661ae403c41eaa679ee263"
}
diff --git a/npm/packs/jquery-validation-unobtrusive/package.json b/npm/packs/jquery-validation-unobtrusive/package.json
index ec827ccb33..b40a776119 100644
--- a/npm/packs/jquery-validation-unobtrusive/package.json
+++ b/npm/packs/jquery-validation-unobtrusive/package.json
@@ -1,12 +1,12 @@
{
- "version": "2.1.0",
+ "version": "2.2.0",
"name": "@abp/jquery-validation-unobtrusive",
"publishConfig": {
"access": "public"
},
"dependencies": {
- "@abp/jquery-validation": "^2.1.0",
+ "@abp/jquery-validation": "^2.2.0",
"jquery-validation-unobtrusive": "^3.2.11"
},
- "gitHead": "8b95e7469f6459fd51d56f4c20ca067533b07992"
+ "gitHead": "d5707967977fb14328661ae403c41eaa679ee263"
}
diff --git a/npm/packs/jquery-validation/package.json b/npm/packs/jquery-validation/package.json
index d49be4e57c..d1c32c5fea 100644
--- a/npm/packs/jquery-validation/package.json
+++ b/npm/packs/jquery-validation/package.json
@@ -1,12 +1,12 @@
{
- "version": "2.1.0",
+ "version": "2.2.0",
"name": "@abp/jquery-validation",
"publishConfig": {
"access": "public"
},
"dependencies": {
- "@abp/jquery": "^2.1.0",
+ "@abp/jquery": "^2.2.0",
"jquery-validation": "^1.19.1"
},
- "gitHead": "8b95e7469f6459fd51d56f4c20ca067533b07992"
+ "gitHead": "d5707967977fb14328661ae403c41eaa679ee263"
}
diff --git a/npm/packs/jquery/package.json b/npm/packs/jquery/package.json
index de5d7ee359..5ec2fd0ec3 100644
--- a/npm/packs/jquery/package.json
+++ b/npm/packs/jquery/package.json
@@ -1,12 +1,12 @@
{
- "version": "2.1.0",
+ "version": "2.2.0",
"name": "@abp/jquery",
"publishConfig": {
"access": "public"
},
"dependencies": {
- "@abp/core": "^2.1.0",
+ "@abp/core": "^2.2.0",
"jquery": "^3.4.1"
},
- "gitHead": "8b95e7469f6459fd51d56f4c20ca067533b07992"
+ "gitHead": "d5707967977fb14328661ae403c41eaa679ee263"
}
diff --git a/npm/packs/lodash/package.json b/npm/packs/lodash/package.json
index d40747c1c7..6e9ffd0c0c 100644
--- a/npm/packs/lodash/package.json
+++ b/npm/packs/lodash/package.json
@@ -1,12 +1,12 @@
{
- "version": "2.1.0",
+ "version": "2.2.0",
"name": "@abp/lodash",
"publishConfig": {
"access": "public"
},
"dependencies": {
- "@abp/core": "^2.1.0",
+ "@abp/core": "^2.2.0",
"lodash": "^4.17.15"
},
- "gitHead": "8b95e7469f6459fd51d56f4c20ca067533b07992"
+ "gitHead": "d5707967977fb14328661ae403c41eaa679ee263"
}
diff --git a/npm/packs/luxon/package.json b/npm/packs/luxon/package.json
index 4b2b7be9ef..1e53e6fd99 100644
--- a/npm/packs/luxon/package.json
+++ b/npm/packs/luxon/package.json
@@ -1,5 +1,5 @@
{
- "version": "2.1.0",
+ "version": "2.2.0",
"name": "@abp/luxon",
"publishConfig": {
"access": "public"
@@ -7,5 +7,5 @@
"dependencies": {
"luxon": "^1.21.3"
},
- "gitHead": "8b95e7469f6459fd51d56f4c20ca067533b07992"
+ "gitHead": "d5707967977fb14328661ae403c41eaa679ee263"
}
diff --git a/npm/packs/malihu-custom-scrollbar-plugin/package.json b/npm/packs/malihu-custom-scrollbar-plugin/package.json
index e479adbc4e..1d65d8f9d8 100644
--- a/npm/packs/malihu-custom-scrollbar-plugin/package.json
+++ b/npm/packs/malihu-custom-scrollbar-plugin/package.json
@@ -1,12 +1,12 @@
{
- "version": "2.1.0",
+ "version": "2.2.0",
"name": "@abp/malihu-custom-scrollbar-plugin",
"publishConfig": {
"access": "public"
},
"dependencies": {
- "@abp/core": "^2.1.0",
+ "@abp/core": "^2.2.0",
"malihu-custom-scrollbar-plugin": "^3.1.5"
},
- "gitHead": "8b95e7469f6459fd51d56f4c20ca067533b07992"
+ "gitHead": "d5707967977fb14328661ae403c41eaa679ee263"
}
diff --git a/npm/packs/markdown-it/package.json b/npm/packs/markdown-it/package.json
index e387bb033f..da0afef6db 100644
--- a/npm/packs/markdown-it/package.json
+++ b/npm/packs/markdown-it/package.json
@@ -1,12 +1,12 @@
{
- "version": "2.1.0",
+ "version": "2.2.0",
"name": "@abp/markdown-it",
"publishConfig": {
"access": "public"
},
"dependencies": {
- "@abp/core": "^2.1.0",
+ "@abp/core": "^2.2.0",
"markdown-it": "^10.0.0"
},
- "gitHead": "8b95e7469f6459fd51d56f4c20ca067533b07992"
+ "gitHead": "d5707967977fb14328661ae403c41eaa679ee263"
}
diff --git a/npm/packs/owl.carousel/package.json b/npm/packs/owl.carousel/package.json
index 9f0e18c986..947313ad4a 100644
--- a/npm/packs/owl.carousel/package.json
+++ b/npm/packs/owl.carousel/package.json
@@ -1,12 +1,12 @@
{
- "version": "2.1.0",
+ "version": "2.2.0",
"name": "@abp/owl.carousel",
"publishConfig": {
"access": "public"
},
"dependencies": {
- "@abp/core": "^2.1.0",
+ "@abp/core": "^2.2.0",
"owl.carousel": "^2.3.4"
},
- "gitHead": "8b95e7469f6459fd51d56f4c20ca067533b07992"
+ "gitHead": "d5707967977fb14328661ae403c41eaa679ee263"
}
diff --git a/npm/packs/popper.js/package.json b/npm/packs/popper.js/package.json
index b496fbb2d8..21fa7de6ee 100644
--- a/npm/packs/popper.js/package.json
+++ b/npm/packs/popper.js/package.json
@@ -1,12 +1,12 @@
{
- "version": "2.1.0",
+ "version": "2.2.0",
"name": "@abp/popper.js",
"publishConfig": {
"access": "public"
},
"dependencies": {
- "@abp/core": "^2.1.0",
+ "@abp/core": "^2.2.0",
"popper.js": "^1.16.0"
},
- "gitHead": "8b95e7469f6459fd51d56f4c20ca067533b07992"
+ "gitHead": "d5707967977fb14328661ae403c41eaa679ee263"
}
diff --git a/npm/packs/prismjs/package.json b/npm/packs/prismjs/package.json
index d3523bc74a..745e4da5b1 100644
--- a/npm/packs/prismjs/package.json
+++ b/npm/packs/prismjs/package.json
@@ -1,12 +1,12 @@
{
- "version": "2.1.0",
+ "version": "2.2.0",
"name": "@abp/prismjs",
"publishConfig": {
"access": "public"
},
"dependencies": {
- "@abp/core": "^2.1.0",
+ "@abp/core": "^2.2.0",
"prismjs": "^1.17.1"
},
- "gitHead": "8b95e7469f6459fd51d56f4c20ca067533b07992"
+ "gitHead": "d5707967977fb14328661ae403c41eaa679ee263"
}
diff --git a/npm/packs/select2/package.json b/npm/packs/select2/package.json
index a92c303959..f3f6715210 100644
--- a/npm/packs/select2/package.json
+++ b/npm/packs/select2/package.json
@@ -1,12 +1,12 @@
{
- "version": "2.1.0",
+ "version": "2.2.0",
"name": "@abp/select2",
"publishConfig": {
"access": "public"
},
"dependencies": {
- "@abp/core": "^2.1.0",
+ "@abp/core": "^2.2.0",
"select2": "^4.0.12"
},
- "gitHead": "8b95e7469f6459fd51d56f4c20ca067533b07992"
+ "gitHead": "d5707967977fb14328661ae403c41eaa679ee263"
}
diff --git a/npm/packs/sweetalert/package.json b/npm/packs/sweetalert/package.json
index e9c09c9023..01693f17d1 100644
--- a/npm/packs/sweetalert/package.json
+++ b/npm/packs/sweetalert/package.json
@@ -1,12 +1,12 @@
{
- "version": "2.1.0",
+ "version": "2.2.0",
"name": "@abp/sweetalert",
"publishConfig": {
"access": "public"
},
"dependencies": {
- "@abp/core": "^2.1.0",
+ "@abp/core": "^2.2.0",
"sweetalert": "^2.1.2"
},
- "gitHead": "8b95e7469f6459fd51d56f4c20ca067533b07992"
+ "gitHead": "d5707967977fb14328661ae403c41eaa679ee263"
}
diff --git a/npm/packs/timeago/package.json b/npm/packs/timeago/package.json
index ab1f0c39b5..57f55b073b 100644
--- a/npm/packs/timeago/package.json
+++ b/npm/packs/timeago/package.json
@@ -1,12 +1,12 @@
{
- "version": "2.1.0",
+ "version": "2.2.0",
"name": "@abp/timeago",
"publishConfig": {
"access": "public"
},
"dependencies": {
- "@abp/jquery": "^2.1.0",
+ "@abp/jquery": "^2.2.0",
"timeago": "^1.6.7"
},
- "gitHead": "8b95e7469f6459fd51d56f4c20ca067533b07992"
+ "gitHead": "d5707967977fb14328661ae403c41eaa679ee263"
}
diff --git a/npm/packs/toastr/package.json b/npm/packs/toastr/package.json
index f9c5d7dbe9..063be979ae 100644
--- a/npm/packs/toastr/package.json
+++ b/npm/packs/toastr/package.json
@@ -1,12 +1,12 @@
{
- "version": "2.1.0",
+ "version": "2.2.0",
"name": "@abp/toastr",
"publishConfig": {
"access": "public"
},
"dependencies": {
- "@abp/jquery": "^2.1.0",
+ "@abp/jquery": "^2.2.0",
"toastr": "^2.1.4"
},
- "gitHead": "8b95e7469f6459fd51d56f4c20ca067533b07992"
+ "gitHead": "d5707967977fb14328661ae403c41eaa679ee263"
}
diff --git a/npm/packs/tui-editor/package.json b/npm/packs/tui-editor/package.json
index 73e1cdeca5..e13b5d37b8 100644
--- a/npm/packs/tui-editor/package.json
+++ b/npm/packs/tui-editor/package.json
@@ -1,15 +1,15 @@
{
- "version": "2.1.0",
+ "version": "2.2.0",
"name": "@abp/tui-editor",
"publishConfig": {
"access": "public"
},
"dependencies": {
- "@abp/codemirror": "^2.1.0",
- "@abp/highlight.js": "^2.1.0",
- "@abp/jquery": "^2.1.0",
- "@abp/markdown-it": "^2.1.0",
+ "@abp/codemirror": "^2.2.0",
+ "@abp/highlight.js": "^2.2.0",
+ "@abp/jquery": "^2.2.0",
+ "@abp/markdown-it": "^2.2.0",
"tui-editor": "^1.4.8"
},
- "gitHead": "8b95e7469f6459fd51d56f4c20ca067533b07992"
+ "gitHead": "d5707967977fb14328661ae403c41eaa679ee263"
}
diff --git a/npm/preview-publish.ps1 b/npm/preview-publish.ps1
index d448378750..5ca3336c85 100644
--- a/npm/preview-publish.ps1
+++ b/npm/preview-publish.ps1
@@ -4,7 +4,7 @@ param(
npm install
-$NextVersion = $(node get-version.js) + '-preview' + (Get-Date).tostring(“yyyyMMdd”) + '-1'
+$NextVersion = $(node get-version.js) + '-preview' + (Get-Date).tostring(“yyyyMMdd”)
$rootFolder = (Get-Item -Path "./" -Verbose).FullName
if(-Not $Version) {
@@ -16,7 +16,7 @@ $commands = (
"npm install",
"npm run publish-packages -- --nextVersion $Version --preview",
"cd ../../",
- "yarn lerna publish $Version --no-push --yes --no-git-reset --no-commit-hooks --no-git-tag-version --force-publish --dist-tag preview"
+ "yarn lerna publish $Version --no-push --yes --no-git-reset --no-commit-hooks --no-git-tag-version --force-publish --dist-tag preview --registry http://localhost:4873"
)
foreach ($command in $commands) {
diff --git a/nupkg/common.ps1 b/nupkg/common.ps1
index 52c2a54464..af62eb56ed 100644
--- a/nupkg/common.ps1
+++ b/nupkg/common.ps1
@@ -79,9 +79,9 @@ $projects = (
"framework/src/Volo.Abp.Http.Abstractions",
"framework/src/Volo.Abp.Http.Client",
"framework/src/Volo.Abp.Http.Client.IdentityModel",
+ "framework/src/Volo.Abp.Http.Client.IdentityModel.Web",
"framework/src/Volo.Abp.Http",
"framework/src/Volo.Abp.IdentityModel",
- "framework/src/Volo.Abp.IdentityModel.Web",
"framework/src/Volo.Abp.Json",
"framework/src/Volo.Abp.Ldap",
"framework/src/Volo.Abp.Localization.Abstractions",
diff --git a/templates/app/angular/package.json b/templates/app/angular/package.json
index 64615821ae..faf50f8c72 100644
--- a/templates/app/angular/package.json
+++ b/templates/app/angular/package.json
@@ -11,11 +11,11 @@
},
"private": true,
"dependencies": {
- "@abp/ng.account": "~2.1.0",
- "@abp/ng.identity": "~2.1.0",
- "@abp/ng.setting-management": "~2.1.0",
- "@abp/ng.tenant-management": "~2.1.0",
- "@abp/ng.theme.basic": "~2.1.0",
+ "@abp/ng.account": "~2.2.0",
+ "@abp/ng.identity": "~2.2.0",
+ "@abp/ng.setting-management": "~2.2.0",
+ "@abp/ng.tenant-management": "~2.2.0",
+ "@abp/ng.theme.basic": "~2.2.0",
"@angular/animations": "~9.0.2",
"@angular/common": "~9.0.2",
"@angular/compiler": "~9.0.2",
diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Host/MyProjectNameHttpApiHostModule.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Host/MyProjectNameHttpApiHostModule.cs
index 63b9689b18..6cdc617690 100644
--- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Host/MyProjectNameHttpApiHostModule.cs
+++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Host/MyProjectNameHttpApiHostModule.cs
@@ -167,11 +167,11 @@ namespace MyCompanyName.MyProjectName
app.UseRouting();
app.UseCors(DefaultCorsPolicyName);
app.UseAuthentication();
- app.UseAuthorization();
if (MultiTenancyConsts.IsEnabled)
{
app.UseMultiTenancy();
}
+ app.UseAuthorization();
app.UseAbpRequestLocalization();
app.UseSwagger();
diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/package.json b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/package.json
index b620e756f7..6e36dde3bf 100644
--- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/package.json
+++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/package.json
@@ -3,6 +3,6 @@
"name": "my-app",
"private": true,
"dependencies": {
- "@abp/aspnetcore.mvc.ui.theme.basic": "^2.1.0"
+ "@abp/aspnetcore.mvc.ui.theme.basic": "^2.2.0"
}
}
\ No newline at end of file
diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/wwwroot/libs/abp/core/abp.css b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/wwwroot/libs/abp/core/abp.css
index ee3c5080a5..ddf9cae5b2 100644
--- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/wwwroot/libs/abp/core/abp.css
+++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/wwwroot/libs/abp/core/abp.css
@@ -1,56 +1,56 @@
-@keyframes spin {
- 0% {
- transform: translateZ(0) rotate(0deg);
- }
-
- 100% {
- transform: translateZ(0) rotate(360deg);
- }
-}
-
-.abp-block-area {
- position: fixed;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- z-index: 102;
- background-color: #fff;
- opacity: .8;
- transition: opacity .25s;
-}
-
- .abp-block-area.abp-block-area-disappearing {
- opacity: 0;
- }
-
- .abp-block-area.abp-block-area-busy:after {
- content: attr(data-text);
- display: block;
- max-width: 125px;
- position: absolute;
- top: 50%;
- left: 50%;
- transform: translate(-50%, -50%);
- font-size: 20px;
- font-family: sans-serif;
- color: #343a40;
- text-align: center;
- text-transform: uppercase;
- }
-
- .abp-block-area.abp-block-area-busy:before {
- content: "";
- display: block;
- width: 150px;
- height: 150px;
- border-radius: 50%;
- border-width: 2px;
- border-style: solid;
- border-color: transparent #228ae6 #228ae6 #228ae6;
- position: absolute;
- top: calc(50% - 75px);
- left: calc(50% - 75px);
- will-change: transform;
- animation: spin .75s infinite ease-in-out;
- }
+@keyframes spin {
+ 0% {
+ transform: translateZ(0) rotate(0deg);
+ }
+
+ 100% {
+ transform: translateZ(0) rotate(360deg);
+ }
+}
+
+.abp-block-area {
+ position: fixed;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ z-index: 102;
+ background-color: #fff;
+ opacity: .8;
+ transition: opacity .25s;
+}
+
+ .abp-block-area.abp-block-area-disappearing {
+ opacity: 0;
+ }
+
+ .abp-block-area.abp-block-area-busy:after {
+ content: attr(data-text);
+ display: block;
+ max-width: 125px;
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ transform: translate(-50%, -50%);
+ font-size: 20px;
+ font-family: sans-serif;
+ color: #343a40;
+ text-align: center;
+ text-transform: uppercase;
+ }
+
+ .abp-block-area.abp-block-area-busy:before {
+ content: "";
+ display: block;
+ width: 150px;
+ height: 150px;
+ border-radius: 50%;
+ border-width: 2px;
+ border-style: solid;
+ border-color: transparent #228ae6 #228ae6 #228ae6;
+ position: absolute;
+ top: calc(50% - 75px);
+ left: calc(50% - 75px);
+ will-change: transform;
+ animation: spin .75s infinite ease-in-out;
+ }
diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/wwwroot/libs/abp/core/abp.js b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/wwwroot/libs/abp/core/abp.js
index cef1cf55e1..730db8bc97 100644
--- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/wwwroot/libs/abp/core/abp.js
+++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/wwwroot/libs/abp/core/abp.js
@@ -1,636 +1,636 @@
-var abp = abp || {};
-(function () {
-
- /* Application paths *****************************************/
-
- //Current application root path (including virtual directory if exists).
- abp.appPath = abp.appPath || '/';
-
- abp.pageLoadTime = new Date();
-
- //Converts given path to absolute path using abp.appPath variable.
- abp.toAbsAppPath = function (path) {
- if (path.indexOf('/') == 0) {
- path = path.substring(1);
- }
-
- return abp.appPath + path;
- };
-
- /* LOGGING ***************************************************/
- //Implements Logging API that provides secure & controlled usage of console.log
-
- abp.log = abp.log || {};
-
- abp.log.levels = {
- DEBUG: 1,
- INFO: 2,
- WARN: 3,
- ERROR: 4,
- FATAL: 5
- };
-
- abp.log.level = abp.log.levels.DEBUG;
-
- abp.log.log = function (logObject, logLevel) {
- if (!window.console || !window.console.log) {
- return;
- }
-
- if (logLevel != undefined && logLevel < abp.log.level) {
- return;
- }
-
- console.log(logObject);
- };
-
- abp.log.debug = function (logObject) {
- abp.log.log("DEBUG: ", abp.log.levels.DEBUG);
- abp.log.log(logObject, abp.log.levels.DEBUG);
- };
-
- abp.log.info = function (logObject) {
- abp.log.log("INFO: ", abp.log.levels.INFO);
- abp.log.log(logObject, abp.log.levels.INFO);
- };
-
- abp.log.warn = function (logObject) {
- abp.log.log("WARN: ", abp.log.levels.WARN);
- abp.log.log(logObject, abp.log.levels.WARN);
- };
-
- abp.log.error = function (logObject) {
- abp.log.log("ERROR: ", abp.log.levels.ERROR);
- abp.log.log(logObject, abp.log.levels.ERROR);
- };
-
- abp.log.fatal = function (logObject) {
- abp.log.log("FATAL: ", abp.log.levels.FATAL);
- abp.log.log(logObject, abp.log.levels.FATAL);
- };
-
- /* LOCALIZATION ***********************************************/
-
- abp.localization = abp.localization || {};
-
- abp.localization.values = {};
-
- abp.localization.localize = function (key, sourceName) {
- sourceName = sourceName || abp.localization.defaultResourceName;
-
- var source = abp.localization.values[sourceName];
-
- if (!source) {
- abp.log.warn('Could not find localization source: ' + sourceName);
- return key;
- }
-
- var value = source[key];
- if (value == undefined) {
- return key;
- }
-
- var copiedArguments = Array.prototype.slice.call(arguments, 0);
- copiedArguments.splice(1, 1);
- copiedArguments[0] = value;
-
- return abp.utils.formatString.apply(this, copiedArguments);
- };
-
- abp.localization.getResource = function (name) {
- return function () {
- var copiedArguments = Array.prototype.slice.call(arguments, 0);
- copiedArguments.splice(1, 0, name);
- return abp.localization.localize.apply(this, copiedArguments);
- };
- };
-
- abp.localization.defaultResourceName = undefined;
-
- /* AUTHORIZATION **********************************************/
-
- abp.auth = abp.auth || {};
-
- abp.auth.policies = abp.auth.policies || {};
-
- abp.auth.grantedPolicies = abp.auth.grantedPolicies || {};
-
- abp.auth.isGranted = function (policyName) {
- return abp.auth.policies[policyName] != undefined && abp.auth.grantedPolicies[policyName] != undefined;
- };
-
- abp.auth.isAnyGranted = function () {
- if (!arguments || arguments.length <= 0) {
- return true;
- }
-
- for (var i = 0; i < arguments.length; i++) {
- if (abp.auth.isGranted(arguments[i])) {
- return true;
- }
- }
-
- return false;
- };
-
- abp.auth.areAllGranted = function () {
- if (!arguments || arguments.length <= 0) {
- return true;
- }
-
- for (var i = 0; i < arguments.length; i++) {
- if (!abp.auth.isGranted(arguments[i])) {
- return false;
- }
- }
-
- return true;
- };
-
- abp.auth.tokenCookieName = 'Abp.AuthToken';
-
- abp.auth.setToken = function (authToken, expireDate) {
- abp.utils.setCookieValue(abp.auth.tokenCookieName, authToken, expireDate, abp.appPath, abp.domain);
- };
-
- abp.auth.getToken = function () {
- return abp.utils.getCookieValue(abp.auth.tokenCookieName);
- }
-
- abp.auth.clearToken = function () {
- abp.auth.setToken();
- }
-
- /* SETTINGS *************************************************/
-
- abp.setting = abp.setting || {};
-
- abp.setting.values = abp.setting.values || {};
-
- abp.setting.get = function (name) {
- return abp.setting.values[name];
- };
-
- abp.setting.getBoolean = function (name) {
- var value = abp.setting.get(name);
- return value == 'true' || value == 'True';
- };
-
- abp.setting.getInt = function (name) {
- return parseInt(abp.setting.values[name]);
- };
-
- /* NOTIFICATION *********************************************/
- //Defines Notification API, not implements it
-
- abp.notify = abp.notify || {};
-
- abp.notify.success = function (message, title, options) {
- abp.log.warn('abp.notify.success is not implemented!');
- };
-
- abp.notify.info = function (message, title, options) {
- abp.log.warn('abp.notify.info is not implemented!');
- };
-
- abp.notify.warn = function (message, title, options) {
- abp.log.warn('abp.notify.warn is not implemented!');
- };
-
- abp.notify.error = function (message, title, options) {
- abp.log.warn('abp.notify.error is not implemented!');
- };
-
- /* MESSAGE **************************************************/
- //Defines Message API, not implements it
-
- abp.message = abp.message || {};
-
- abp.message._showMessage = function (message, title) {
- alert((title || '') + ' ' + message);
- };
-
- abp.message.info = function (message, title) {
- abp.log.warn('abp.message.info is not implemented!');
- return abp.message._showMessage(message, title);
- };
-
- abp.message.success = function (message, title) {
- abp.log.warn('abp.message.success is not implemented!');
- return abp.message._showMessage(message, title);
- };
-
- abp.message.warn = function (message, title) {
- abp.log.warn('abp.message.warn is not implemented!');
- return abp.message._showMessage(message, title);
- };
-
- abp.message.error = function (message, title) {
- abp.log.warn('abp.message.error is not implemented!');
- return abp.message._showMessage(message, title);
- };
-
- abp.message.confirm = function (message, titleOrCallback, callback) {
- abp.log.warn('abp.message.confirm is not properly implemented!');
-
- if (titleOrCallback && !(typeof titleOrCallback == 'string')) {
- callback = titleOrCallback;
- }
-
- var result = confirm(message);
- callback && callback(result);
- };
-
- /* UI *******************************************************/
-
- abp.ui = abp.ui || {};
-
- /* UI BLOCK */
- //Defines UI Block API and implements basically
-
- var $abpBlockArea = document.createElement('div');
- $abpBlockArea.classList.add('abp-block-area');
-
- /* opts: { //Can be an object with options or a string for query a selector
- * elm: a query selector (optional - default: document.body)
- * busy: boolean (optional - default: false)
- * promise: A promise with always or finally handler (optional - auto unblocks the ui if provided)
- * }
- */
- abp.ui.block = function (opts) {
- if (!opts) {
- opts = {};
- } else if (typeof opts == 'string') {
- opts = {
- elm: opts
- };
- }
-
- var $elm = document.querySelector(opts.elm) || document.body;
-
- if (opts.busy) {
- $abpBlockArea.classList.add('abp-block-area-busy');
- } else {
- $abpBlockArea.classList.remove('abp-block-area-busy');
- }
-
- if (document.querySelector(opts.elm)) {
- $abpBlockArea.style.position = 'absolute';
- } else {
- $abpBlockArea.style.position = 'fixed';
- }
-
- $elm.appendChild($abpBlockArea);
-
- if (opts.promise) {
- if (opts.promise.always) { //jQuery.Deferred style
- opts.promise.always(function () {
- abp.ui.unblock({
- $elm: opts.elm
- });
- });
- } else if (opts.promise['finally']) { //Q style
- opts.promise['finally'](function () {
- abp.ui.unblock({
- $elm: opts.elm
- });
- });
- }
- }
- };
-
- /* opts: {
- *
- * }
- */
- abp.ui.unblock = function (opts) {
- var element = document.querySelector('.abp-block-area');
- if (element) {
- element.classList.add('abp-block-area-disappearing');
- setTimeout(function () {
- if (element) {
- element.classList.remove('abp-block-area-disappearing');
- element.parentElement.removeChild(element);
- }
- }, 250);
- }
- };
-
- /* UI BUSY */
- //Defines UI Busy API, not implements it
-
- abp.ui.setBusy = function (opts) {
- if (!opts) {
- opts = {
- busy: true
- };
- } else if (typeof opts == 'string') {
- opts = {
- elm: opts,
- busy: true
- };
- }
-
- abp.ui.block(opts);
- };
-
- abp.ui.clearBusy = function (opts) {
- abp.ui.unblock(opts);
- };
-
- /* SIMPLE EVENT BUS *****************************************/
-
- abp.event = (function () {
-
- var _callbacks = {};
-
- var on = function (eventName, callback) {
- if (!_callbacks[eventName]) {
- _callbacks[eventName] = [];
- }
-
- _callbacks[eventName].push(callback);
- };
-
- var off = function (eventName, callback) {
- var callbacks = _callbacks[eventName];
- if (!callbacks) {
- return;
- }
-
- var index = -1;
- for (var i = 0; i < callbacks.length; i++) {
- if (callbacks[i] === callback) {
- index = i;
- break;
- }
- }
-
- if (index < 0) {
- return;
- }
-
- _callbacks[eventName].splice(index, 1);
- };
-
- var trigger = function (eventName) {
- var callbacks = _callbacks[eventName];
- if (!callbacks || !callbacks.length) {
- return;
- }
-
- var args = Array.prototype.slice.call(arguments, 1);
- for (var i = 0; i < callbacks.length; i++) {
- callbacks[i].apply(this, args);
- }
- };
-
- // Public interface ///////////////////////////////////////////////////
-
- return {
- on: on,
- off: off,
- trigger: trigger
- };
- })();
-
-
- /* UTILS ***************************************************/
-
- abp.utils = abp.utils || {};
-
- /* Creates a name namespace.
- * Example:
- * var taskService = abp.utils.createNamespace(abp, 'services.task');
- * taskService will be equal to abp.services.task
- * first argument (root) must be defined first
- ************************************************************/
- abp.utils.createNamespace = function (root, ns) {
- var parts = ns.split('.');
- for (var i = 0; i < parts.length; i++) {
- if (typeof root[parts[i]] == 'undefined') {
- root[parts[i]] = {};
- }
-
- root = root[parts[i]];
- }
-
- return root;
- };
-
- /* Find and replaces a string (search) to another string (replacement) in
- * given string (str).
- * Example:
- * abp.utils.replaceAll('This is a test string', 'is', 'X') = 'ThX X a test string'
- ************************************************************/
- abp.utils.replaceAll = function (str, search, replacement) {
- var fix = search.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
- return str.replace(new RegExp(fix, 'g'), replacement);
- };
-
- /* Formats a string just like string.format in C#.
- * Example:
- * abp.utils.formatString('Hello {0}','Tuana') = 'Hello Tuana'
- ************************************************************/
- abp.utils.formatString = function () {
- if (arguments.length < 1) {
- return null;
- }
-
- var str = arguments[0];
-
- for (var i = 1; i < arguments.length; i++) {
- var placeHolder = '{' + (i - 1) + '}';
- str = abp.utils.replaceAll(str, placeHolder, arguments[i]);
- }
-
- return str;
- };
-
- abp.utils.toPascalCase = function (str) {
- if (!str || !str.length) {
- return str;
- }
-
- if (str.length === 1) {
- return str.charAt(0).toUpperCase();
- }
-
- return str.charAt(0).toUpperCase() + str.substr(1);
- }
-
- abp.utils.toCamelCase = function (str) {
- if (!str || !str.length) {
- return str;
- }
-
- if (str.length === 1) {
- return str.charAt(0).toLowerCase();
- }
-
- return str.charAt(0).toLowerCase() + str.substr(1);
- }
-
- abp.utils.truncateString = function (str, maxLength) {
- if (!str || !str.length || str.length <= maxLength) {
- return str;
- }
-
- return str.substr(0, maxLength);
- };
-
- abp.utils.truncateStringWithPostfix = function (str, maxLength, postfix) {
- postfix = postfix || '...';
-
- if (!str || !str.length || str.length <= maxLength) {
- return str;
- }
-
- if (maxLength <= postfix.length) {
- return postfix.substr(0, maxLength);
- }
-
- return str.substr(0, maxLength - postfix.length) + postfix;
- };
-
- abp.utils.isFunction = function (obj) {
- return !!(obj && obj.constructor && obj.call && obj.apply);
- };
-
- /**
- * parameterInfos should be an array of { name, value } objects
- * where name is query string parameter name and value is it's value.
- * includeQuestionMark is true by default.
- */
- abp.utils.buildQueryString = function (parameterInfos, includeQuestionMark) {
- if (includeQuestionMark === undefined) {
- includeQuestionMark = true;
- }
-
- var qs = '';
-
- function addSeperator() {
- if (!qs.length) {
- if (includeQuestionMark) {
- qs = qs + '?';
- }
- } else {
- qs = qs + '&';
- }
- }
-
- for (var i = 0; i < parameterInfos.length; ++i) {
- var parameterInfo = parameterInfos[i];
- if (parameterInfo.value === undefined) {
- continue;
- }
-
- if (parameterInfo.value === null) {
- parameterInfo.value = '';
- }
-
- addSeperator();
-
- if (parameterInfo.value.toJSON && typeof parameterInfo.value.toJSON === "function") {
- qs = qs + parameterInfo.name + '=' + encodeURIComponent(parameterInfo.value.toJSON());
- } else if (Array.isArray(parameterInfo.value) && parameterInfo.value.length) {
- for (var j = 0; j < parameterInfo.value.length; j++) {
- if (j > 0) {
- addSeperator();
- }
-
- qs = qs + parameterInfo.name + '[' + j + ']=' + encodeURIComponent(parameterInfo.value[j]);
- }
- } else {
- qs = qs + parameterInfo.name + '=' + encodeURIComponent(parameterInfo.value);
- }
- }
-
- return qs;
- }
-
- /**
- * Sets a cookie value for given key.
- * This is a simple implementation created to be used by ABP.
- * Please use a complete cookie library if you need.
- * @param {string} key
- * @param {string} value
- * @param {Date} expireDate (optional). If not specified the cookie will expire at the end of session.
- * @param {string} path (optional)
- */
- abp.utils.setCookieValue = function (key, value, expireDate, path) {
- var cookieValue = encodeURIComponent(key) + '=';
-
- if (value) {
- cookieValue = cookieValue + encodeURIComponent(value);
- }
-
- if (expireDate) {
- cookieValue = cookieValue + "; expires=" + expireDate.toUTCString();
- }
-
- if (path) {
- cookieValue = cookieValue + "; path=" + path;
- }
-
- document.cookie = cookieValue;
- };
-
- /**
- * Gets a cookie with given key.
- * This is a simple implementation created to be used by ABP.
- * Please use a complete cookie library if you need.
- * @param {string} key
- * @returns {string} Cookie value or null
- */
- abp.utils.getCookieValue = function (key) {
- var equalities = document.cookie.split('; ');
- for (var i = 0; i < equalities.length; i++) {
- if (!equalities[i]) {
- continue;
- }
-
- var splitted = equalities[i].split('=');
- if (splitted.length != 2) {
- continue;
- }
-
- if (decodeURIComponent(splitted[0]) === key) {
- return decodeURIComponent(splitted[1] || '');
- }
- }
-
- return null;
- };
-
- /**
- * Deletes cookie for given key.
- * This is a simple implementation created to be used by ABP.
- * Please use a complete cookie library if you need.
- * @param {string} key
- * @param {string} path (optional)
- */
- abp.utils.deleteCookie = function (key, path) {
- var cookieValue = encodeURIComponent(key) + '=';
-
- cookieValue = cookieValue + "; expires=" + (new Date(new Date().getTime() - 86400000)).toUTCString();
-
- if (path) {
- cookieValue = cookieValue + "; path=" + path;
- }
-
- document.cookie = cookieValue;
- }
-
- /* SECURITY ***************************************/
- abp.security = abp.security || {};
- abp.security.antiForgery = abp.security.antiForgery || {};
-
- abp.security.antiForgery.tokenCookieName = 'XSRF-TOKEN';
- abp.security.antiForgery.tokenHeaderName = 'X-XSRF-TOKEN';
-
- abp.security.antiForgery.getToken = function () {
- return abp.utils.getCookieValue(abp.security.antiForgery.tokenCookieName);
- };
-
+var abp = abp || {};
+(function () {
+
+ /* Application paths *****************************************/
+
+ //Current application root path (including virtual directory if exists).
+ abp.appPath = abp.appPath || '/';
+
+ abp.pageLoadTime = new Date();
+
+ //Converts given path to absolute path using abp.appPath variable.
+ abp.toAbsAppPath = function (path) {
+ if (path.indexOf('/') == 0) {
+ path = path.substring(1);
+ }
+
+ return abp.appPath + path;
+ };
+
+ /* LOGGING ***************************************************/
+ //Implements Logging API that provides secure & controlled usage of console.log
+
+ abp.log = abp.log || {};
+
+ abp.log.levels = {
+ DEBUG: 1,
+ INFO: 2,
+ WARN: 3,
+ ERROR: 4,
+ FATAL: 5
+ };
+
+ abp.log.level = abp.log.levels.DEBUG;
+
+ abp.log.log = function (logObject, logLevel) {
+ if (!window.console || !window.console.log) {
+ return;
+ }
+
+ if (logLevel != undefined && logLevel < abp.log.level) {
+ return;
+ }
+
+ console.log(logObject);
+ };
+
+ abp.log.debug = function (logObject) {
+ abp.log.log("DEBUG: ", abp.log.levels.DEBUG);
+ abp.log.log(logObject, abp.log.levels.DEBUG);
+ };
+
+ abp.log.info = function (logObject) {
+ abp.log.log("INFO: ", abp.log.levels.INFO);
+ abp.log.log(logObject, abp.log.levels.INFO);
+ };
+
+ abp.log.warn = function (logObject) {
+ abp.log.log("WARN: ", abp.log.levels.WARN);
+ abp.log.log(logObject, abp.log.levels.WARN);
+ };
+
+ abp.log.error = function (logObject) {
+ abp.log.log("ERROR: ", abp.log.levels.ERROR);
+ abp.log.log(logObject, abp.log.levels.ERROR);
+ };
+
+ abp.log.fatal = function (logObject) {
+ abp.log.log("FATAL: ", abp.log.levels.FATAL);
+ abp.log.log(logObject, abp.log.levels.FATAL);
+ };
+
+ /* LOCALIZATION ***********************************************/
+
+ abp.localization = abp.localization || {};
+
+ abp.localization.values = {};
+
+ abp.localization.localize = function (key, sourceName) {
+ sourceName = sourceName || abp.localization.defaultResourceName;
+
+ var source = abp.localization.values[sourceName];
+
+ if (!source) {
+ abp.log.warn('Could not find localization source: ' + sourceName);
+ return key;
+ }
+
+ var value = source[key];
+ if (value == undefined) {
+ return key;
+ }
+
+ var copiedArguments = Array.prototype.slice.call(arguments, 0);
+ copiedArguments.splice(1, 1);
+ copiedArguments[0] = value;
+
+ return abp.utils.formatString.apply(this, copiedArguments);
+ };
+
+ abp.localization.getResource = function (name) {
+ return function () {
+ var copiedArguments = Array.prototype.slice.call(arguments, 0);
+ copiedArguments.splice(1, 0, name);
+ return abp.localization.localize.apply(this, copiedArguments);
+ };
+ };
+
+ abp.localization.defaultResourceName = undefined;
+
+ /* AUTHORIZATION **********************************************/
+
+ abp.auth = abp.auth || {};
+
+ abp.auth.policies = abp.auth.policies || {};
+
+ abp.auth.grantedPolicies = abp.auth.grantedPolicies || {};
+
+ abp.auth.isGranted = function (policyName) {
+ return abp.auth.policies[policyName] != undefined && abp.auth.grantedPolicies[policyName] != undefined;
+ };
+
+ abp.auth.isAnyGranted = function () {
+ if (!arguments || arguments.length <= 0) {
+ return true;
+ }
+
+ for (var i = 0; i < arguments.length; i++) {
+ if (abp.auth.isGranted(arguments[i])) {
+ return true;
+ }
+ }
+
+ return false;
+ };
+
+ abp.auth.areAllGranted = function () {
+ if (!arguments || arguments.length <= 0) {
+ return true;
+ }
+
+ for (var i = 0; i < arguments.length; i++) {
+ if (!abp.auth.isGranted(arguments[i])) {
+ return false;
+ }
+ }
+
+ return true;
+ };
+
+ abp.auth.tokenCookieName = 'Abp.AuthToken';
+
+ abp.auth.setToken = function (authToken, expireDate) {
+ abp.utils.setCookieValue(abp.auth.tokenCookieName, authToken, expireDate, abp.appPath, abp.domain);
+ };
+
+ abp.auth.getToken = function () {
+ return abp.utils.getCookieValue(abp.auth.tokenCookieName);
+ }
+
+ abp.auth.clearToken = function () {
+ abp.auth.setToken();
+ }
+
+ /* SETTINGS *************************************************/
+
+ abp.setting = abp.setting || {};
+
+ abp.setting.values = abp.setting.values || {};
+
+ abp.setting.get = function (name) {
+ return abp.setting.values[name];
+ };
+
+ abp.setting.getBoolean = function (name) {
+ var value = abp.setting.get(name);
+ return value == 'true' || value == 'True';
+ };
+
+ abp.setting.getInt = function (name) {
+ return parseInt(abp.setting.values[name]);
+ };
+
+ /* NOTIFICATION *********************************************/
+ //Defines Notification API, not implements it
+
+ abp.notify = abp.notify || {};
+
+ abp.notify.success = function (message, title, options) {
+ abp.log.warn('abp.notify.success is not implemented!');
+ };
+
+ abp.notify.info = function (message, title, options) {
+ abp.log.warn('abp.notify.info is not implemented!');
+ };
+
+ abp.notify.warn = function (message, title, options) {
+ abp.log.warn('abp.notify.warn is not implemented!');
+ };
+
+ abp.notify.error = function (message, title, options) {
+ abp.log.warn('abp.notify.error is not implemented!');
+ };
+
+ /* MESSAGE **************************************************/
+ //Defines Message API, not implements it
+
+ abp.message = abp.message || {};
+
+ abp.message._showMessage = function (message, title) {
+ alert((title || '') + ' ' + message);
+ };
+
+ abp.message.info = function (message, title) {
+ abp.log.warn('abp.message.info is not implemented!');
+ return abp.message._showMessage(message, title);
+ };
+
+ abp.message.success = function (message, title) {
+ abp.log.warn('abp.message.success is not implemented!');
+ return abp.message._showMessage(message, title);
+ };
+
+ abp.message.warn = function (message, title) {
+ abp.log.warn('abp.message.warn is not implemented!');
+ return abp.message._showMessage(message, title);
+ };
+
+ abp.message.error = function (message, title) {
+ abp.log.warn('abp.message.error is not implemented!');
+ return abp.message._showMessage(message, title);
+ };
+
+ abp.message.confirm = function (message, titleOrCallback, callback) {
+ abp.log.warn('abp.message.confirm is not properly implemented!');
+
+ if (titleOrCallback && !(typeof titleOrCallback == 'string')) {
+ callback = titleOrCallback;
+ }
+
+ var result = confirm(message);
+ callback && callback(result);
+ };
+
+ /* UI *******************************************************/
+
+ abp.ui = abp.ui || {};
+
+ /* UI BLOCK */
+ //Defines UI Block API and implements basically
+
+ var $abpBlockArea = document.createElement('div');
+ $abpBlockArea.classList.add('abp-block-area');
+
+ /* opts: { //Can be an object with options or a string for query a selector
+ * elm: a query selector (optional - default: document.body)
+ * busy: boolean (optional - default: false)
+ * promise: A promise with always or finally handler (optional - auto unblocks the ui if provided)
+ * }
+ */
+ abp.ui.block = function (opts) {
+ if (!opts) {
+ opts = {};
+ } else if (typeof opts == 'string') {
+ opts = {
+ elm: opts
+ };
+ }
+
+ var $elm = document.querySelector(opts.elm) || document.body;
+
+ if (opts.busy) {
+ $abpBlockArea.classList.add('abp-block-area-busy');
+ } else {
+ $abpBlockArea.classList.remove('abp-block-area-busy');
+ }
+
+ if (document.querySelector(opts.elm)) {
+ $abpBlockArea.style.position = 'absolute';
+ } else {
+ $abpBlockArea.style.position = 'fixed';
+ }
+
+ $elm.appendChild($abpBlockArea);
+
+ if (opts.promise) {
+ if (opts.promise.always) { //jQuery.Deferred style
+ opts.promise.always(function () {
+ abp.ui.unblock({
+ $elm: opts.elm
+ });
+ });
+ } else if (opts.promise['finally']) { //Q style
+ opts.promise['finally'](function () {
+ abp.ui.unblock({
+ $elm: opts.elm
+ });
+ });
+ }
+ }
+ };
+
+ /* opts: {
+ *
+ * }
+ */
+ abp.ui.unblock = function (opts) {
+ var element = document.querySelector('.abp-block-area');
+ if (element) {
+ element.classList.add('abp-block-area-disappearing');
+ setTimeout(function () {
+ if (element) {
+ element.classList.remove('abp-block-area-disappearing');
+ element.parentElement.removeChild(element);
+ }
+ }, 250);
+ }
+ };
+
+ /* UI BUSY */
+ //Defines UI Busy API, not implements it
+
+ abp.ui.setBusy = function (opts) {
+ if (!opts) {
+ opts = {
+ busy: true
+ };
+ } else if (typeof opts == 'string') {
+ opts = {
+ elm: opts,
+ busy: true
+ };
+ }
+
+ abp.ui.block(opts);
+ };
+
+ abp.ui.clearBusy = function (opts) {
+ abp.ui.unblock(opts);
+ };
+
+ /* SIMPLE EVENT BUS *****************************************/
+
+ abp.event = (function () {
+
+ var _callbacks = {};
+
+ var on = function (eventName, callback) {
+ if (!_callbacks[eventName]) {
+ _callbacks[eventName] = [];
+ }
+
+ _callbacks[eventName].push(callback);
+ };
+
+ var off = function (eventName, callback) {
+ var callbacks = _callbacks[eventName];
+ if (!callbacks) {
+ return;
+ }
+
+ var index = -1;
+ for (var i = 0; i < callbacks.length; i++) {
+ if (callbacks[i] === callback) {
+ index = i;
+ break;
+ }
+ }
+
+ if (index < 0) {
+ return;
+ }
+
+ _callbacks[eventName].splice(index, 1);
+ };
+
+ var trigger = function (eventName) {
+ var callbacks = _callbacks[eventName];
+ if (!callbacks || !callbacks.length) {
+ return;
+ }
+
+ var args = Array.prototype.slice.call(arguments, 1);
+ for (var i = 0; i < callbacks.length; i++) {
+ callbacks[i].apply(this, args);
+ }
+ };
+
+ // Public interface ///////////////////////////////////////////////////
+
+ return {
+ on: on,
+ off: off,
+ trigger: trigger
+ };
+ })();
+
+
+ /* UTILS ***************************************************/
+
+ abp.utils = abp.utils || {};
+
+ /* Creates a name namespace.
+ * Example:
+ * var taskService = abp.utils.createNamespace(abp, 'services.task');
+ * taskService will be equal to abp.services.task
+ * first argument (root) must be defined first
+ ************************************************************/
+ abp.utils.createNamespace = function (root, ns) {
+ var parts = ns.split('.');
+ for (var i = 0; i < parts.length; i++) {
+ if (typeof root[parts[i]] == 'undefined') {
+ root[parts[i]] = {};
+ }
+
+ root = root[parts[i]];
+ }
+
+ return root;
+ };
+
+ /* Find and replaces a string (search) to another string (replacement) in
+ * given string (str).
+ * Example:
+ * abp.utils.replaceAll('This is a test string', 'is', 'X') = 'ThX X a test string'
+ ************************************************************/
+ abp.utils.replaceAll = function (str, search, replacement) {
+ var fix = search.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
+ return str.replace(new RegExp(fix, 'g'), replacement);
+ };
+
+ /* Formats a string just like string.format in C#.
+ * Example:
+ * abp.utils.formatString('Hello {0}','Tuana') = 'Hello Tuana'
+ ************************************************************/
+ abp.utils.formatString = function () {
+ if (arguments.length < 1) {
+ return null;
+ }
+
+ var str = arguments[0];
+
+ for (var i = 1; i < arguments.length; i++) {
+ var placeHolder = '{' + (i - 1) + '}';
+ str = abp.utils.replaceAll(str, placeHolder, arguments[i]);
+ }
+
+ return str;
+ };
+
+ abp.utils.toPascalCase = function (str) {
+ if (!str || !str.length) {
+ return str;
+ }
+
+ if (str.length === 1) {
+ return str.charAt(0).toUpperCase();
+ }
+
+ return str.charAt(0).toUpperCase() + str.substr(1);
+ }
+
+ abp.utils.toCamelCase = function (str) {
+ if (!str || !str.length) {
+ return str;
+ }
+
+ if (str.length === 1) {
+ return str.charAt(0).toLowerCase();
+ }
+
+ return str.charAt(0).toLowerCase() + str.substr(1);
+ }
+
+ abp.utils.truncateString = function (str, maxLength) {
+ if (!str || !str.length || str.length <= maxLength) {
+ return str;
+ }
+
+ return str.substr(0, maxLength);
+ };
+
+ abp.utils.truncateStringWithPostfix = function (str, maxLength, postfix) {
+ postfix = postfix || '...';
+
+ if (!str || !str.length || str.length <= maxLength) {
+ return str;
+ }
+
+ if (maxLength <= postfix.length) {
+ return postfix.substr(0, maxLength);
+ }
+
+ return str.substr(0, maxLength - postfix.length) + postfix;
+ };
+
+ abp.utils.isFunction = function (obj) {
+ return !!(obj && obj.constructor && obj.call && obj.apply);
+ };
+
+ /**
+ * parameterInfos should be an array of { name, value } objects
+ * where name is query string parameter name and value is it's value.
+ * includeQuestionMark is true by default.
+ */
+ abp.utils.buildQueryString = function (parameterInfos, includeQuestionMark) {
+ if (includeQuestionMark === undefined) {
+ includeQuestionMark = true;
+ }
+
+ var qs = '';
+
+ function addSeperator() {
+ if (!qs.length) {
+ if (includeQuestionMark) {
+ qs = qs + '?';
+ }
+ } else {
+ qs = qs + '&';
+ }
+ }
+
+ for (var i = 0; i < parameterInfos.length; ++i) {
+ var parameterInfo = parameterInfos[i];
+ if (parameterInfo.value === undefined) {
+ continue;
+ }
+
+ if (parameterInfo.value === null) {
+ parameterInfo.value = '';
+ }
+
+ addSeperator();
+
+ if (parameterInfo.value.toJSON && typeof parameterInfo.value.toJSON === "function") {
+ qs = qs + parameterInfo.name + '=' + encodeURIComponent(parameterInfo.value.toJSON());
+ } else if (Array.isArray(parameterInfo.value) && parameterInfo.value.length) {
+ for (var j = 0; j < parameterInfo.value.length; j++) {
+ if (j > 0) {
+ addSeperator();
+ }
+
+ qs = qs + parameterInfo.name + '[' + j + ']=' + encodeURIComponent(parameterInfo.value[j]);
+ }
+ } else {
+ qs = qs + parameterInfo.name + '=' + encodeURIComponent(parameterInfo.value);
+ }
+ }
+
+ return qs;
+ }
+
+ /**
+ * Sets a cookie value for given key.
+ * This is a simple implementation created to be used by ABP.
+ * Please use a complete cookie library if you need.
+ * @param {string} key
+ * @param {string} value
+ * @param {Date} expireDate (optional). If not specified the cookie will expire at the end of session.
+ * @param {string} path (optional)
+ */
+ abp.utils.setCookieValue = function (key, value, expireDate, path) {
+ var cookieValue = encodeURIComponent(key) + '=';
+
+ if (value) {
+ cookieValue = cookieValue + encodeURIComponent(value);
+ }
+
+ if (expireDate) {
+ cookieValue = cookieValue + "; expires=" + expireDate.toUTCString();
+ }
+
+ if (path) {
+ cookieValue = cookieValue + "; path=" + path;
+ }
+
+ document.cookie = cookieValue;
+ };
+
+ /**
+ * Gets a cookie with given key.
+ * This is a simple implementation created to be used by ABP.
+ * Please use a complete cookie library if you need.
+ * @param {string} key
+ * @returns {string} Cookie value or null
+ */
+ abp.utils.getCookieValue = function (key) {
+ var equalities = document.cookie.split('; ');
+ for (var i = 0; i < equalities.length; i++) {
+ if (!equalities[i]) {
+ continue;
+ }
+
+ var splitted = equalities[i].split('=');
+ if (splitted.length != 2) {
+ continue;
+ }
+
+ if (decodeURIComponent(splitted[0]) === key) {
+ return decodeURIComponent(splitted[1] || '');
+ }
+ }
+
+ return null;
+ };
+
+ /**
+ * Deletes cookie for given key.
+ * This is a simple implementation created to be used by ABP.
+ * Please use a complete cookie library if you need.
+ * @param {string} key
+ * @param {string} path (optional)
+ */
+ abp.utils.deleteCookie = function (key, path) {
+ var cookieValue = encodeURIComponent(key) + '=';
+
+ cookieValue = cookieValue + "; expires=" + (new Date(new Date().getTime() - 86400000)).toUTCString();
+
+ if (path) {
+ cookieValue = cookieValue + "; path=" + path;
+ }
+
+ document.cookie = cookieValue;
+ }
+
+ /* SECURITY ***************************************/
+ abp.security = abp.security || {};
+ abp.security.antiForgery = abp.security.antiForgery || {};
+
+ abp.security.antiForgery.tokenCookieName = 'XSRF-TOKEN';
+ abp.security.antiForgery.tokenHeaderName = 'X-XSRF-TOKEN';
+
+ abp.security.antiForgery.getToken = function () {
+ return abp.utils.getCookieValue(abp.security.antiForgery.tokenCookieName);
+ };
+
})();
\ No newline at end of file
diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/wwwroot/libs/abp/jquery/abp.jquery.js b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/wwwroot/libs/abp/jquery/abp.jquery.js
index 6e2ee001b8..e6aff047f7 100644
--- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/wwwroot/libs/abp/jquery/abp.jquery.js
+++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/wwwroot/libs/abp/jquery/abp.jquery.js
@@ -1,393 +1,393 @@
-var abp = abp || {};
-(function($) {
-
- if (!$) {
- throw "abp/jquery library requires the jquery library included to the page!";
- }
-
- // ABP CORE OVERRIDES /////////////////////////////////////////////////////
-
- abp.message._showMessage = function (message, title) {
- alert((title || '') + ' ' + message);
-
- return $.Deferred(function ($dfd) {
- $dfd.resolve();
- });
- };
-
- abp.message.confirm = function (message, titleOrCallback, callback) {
- if (titleOrCallback && !(typeof titleOrCallback == 'string')) {
- callback = titleOrCallback;
- }
-
- var result = confirm(message);
- callback && callback(result);
-
- return $.Deferred(function ($dfd) {
- $dfd.resolve(result);
- });
- };
-
- abp.utils.isFunction = function (obj) {
- return $.isFunction(obj);
- };
-
- // JQUERY EXTENSIONS //////////////////////////////////////////////////////
-
- $.fn.findWithSelf = function (selector) {
- return this.filter(selector).add(this.find(selector));
- };
-
- // DOM ////////////////////////////////////////////////////////////////////
-
- abp.dom = abp.dom || {};
-
- abp.dom.onNodeAdded = function (callback) {
- abp.event.on('abp.dom.nodeAdded', callback);
- };
-
- abp.dom.onNodeRemoved = function (callback) {
- abp.event.on('abp.dom.nodeRemoved', callback);
- };
-
- var mutationObserverCallback = function (mutationsList) {
- for (var i = 0; i < mutationsList.length; i++) {
- var mutation = mutationsList[i];
- if (mutation.type === 'childList') {
- if (mutation.addedNodes && mutation.removedNodes.length) {
- for (var k = 0; k < mutation.removedNodes.length; k++) {
- abp.event.trigger(
- 'abp.dom.nodeRemoved',
- {
- $el: $(mutation.removedNodes[k])
- }
- );
- }
- }
-
- if (mutation.addedNodes && mutation.addedNodes.length) {
- for (var j = 0; j < mutation.addedNodes.length; j++) {
- abp.event.trigger(
- 'abp.dom.nodeAdded',
- {
- $el: $(mutation.addedNodes[j])
- }
- );
- }
- }
- }
- }
- };
-
- new MutationObserver(mutationObserverCallback).observe(
- $('body')[0],
- {
- subtree: true,
- childList: true
- }
- );
-
- // AJAX ///////////////////////////////////////////////////////////////////
-
- abp.ajax = function (userOptions) {
- userOptions = userOptions || {};
-
- var options = $.extend(true, {}, abp.ajax.defaultOpts, userOptions);
-
- options.success = undefined;
- options.error = undefined;
-
- return $.Deferred(function ($dfd) {
- $.ajax(options)
- .done(function (data, textStatus, jqXHR) {
- $dfd.resolve(data);
- userOptions.success && userOptions.success(data);
- }).fail(function (jqXHR) {
- if (jqXHR.getResponseHeader('_AbpErrorFormat') === 'true') {
- abp.ajax.handleAbpErrorResponse(jqXHR, userOptions, $dfd);
- } else {
- abp.ajax.handleNonAbpErrorResponse(jqXHR, userOptions, $dfd);
- }
- });
- });
- };
-
- $.extend(abp.ajax, {
- defaultOpts: {
- dataType: 'json',
- type: 'POST',
- contentType: 'application/json',
- headers: {
- 'X-Requested-With': 'XMLHttpRequest'
- }
- },
-
- defaultError: {
- message: 'An error has occurred!',
- details: 'Error detail not sent by server.'
- },
-
- defaultError401: {
- message: 'You are not authenticated!',
- details: 'You should be authenticated (sign in) in order to perform this operation.'
- },
-
- defaultError403: {
- message: 'You are not authorized!',
- details: 'You are not allowed to perform this operation.'
- },
-
- defaultError404: {
- message: 'Resource not found!',
- details: 'The resource requested could not found on the server.'
- },
-
- logError: function (error) {
- abp.log.error(error);
- },
-
- showError: function (error) {
- if (error.details) {
- return abp.message.error(error.details, error.message);
- } else {
- return abp.message.error(error.message || abp.ajax.defaultError.message);
- }
- },
-
- handleTargetUrl: function (targetUrl) {
- if (!targetUrl) {
- location.href = abp.appPath;
- } else {
- location.href = targetUrl;
- }
- },
-
- handleErrorStatusCode: function (status) {
- switch (status) {
- case 401:
- abp.ajax.handleUnAuthorizedRequest(
- abp.ajax.showError(abp.ajax.defaultError401),
- abp.appPath
- );
- break;
- case 403:
- abp.ajax.showError(abp.ajax.defaultError403);
- break;
- case 404:
- abp.ajax.showError(abp.ajax.defaultError404);
- break;
- default:
- abp.ajax.showError(abp.ajax.defaultError);
- break;
- }
- },
-
- handleNonAbpErrorResponse: function (jqXHR, userOptions, $dfd) {
- if (userOptions.abpHandleError !== false) {
- abp.ajax.handleErrorStatusCode(jqXHR.status);
- }
-
- $dfd.reject.apply(this, arguments);
- userOptions.error && userOptions.error.apply(this, arguments);
- },
-
- handleAbpErrorResponse: function (jqXHR, userOptions, $dfd) {
- var messagePromise = null;
-
- if (userOptions.abpHandleError !== false) {
- messagePromise = abp.ajax.showError(jqXHR.responseJSON.error);
- }
-
- abp.ajax.logError(jqXHR.responseJSON.error);
-
- $dfd && $dfd.reject(jqXHR.responseJSON.error, jqXHR);
- userOptions.error && userOptions.error(jqXHR.responseJSON.error, jqXHR);
-
- if (jqXHR.status === 401 && userOptions.abpHandleError !== false) {
- abp.ajax.handleUnAuthorizedRequest(messagePromise);
- }
- },
-
- handleUnAuthorizedRequest: function (messagePromise, targetUrl) {
- if (messagePromise) {
- messagePromise.done(function () {
- abp.ajax.handleTargetUrl(targetUrl);
- });
- } else {
- abp.ajax.handleTargetUrl(targetUrl);
- }
- },
-
- blockUI: function (options) {
- if (options.blockUI) {
- if (options.blockUI === true) { //block whole page
- abp.ui.setBusy();
- } else { //block an element
- abp.ui.setBusy(options.blockUI);
- }
- }
- },
-
- unblockUI: function (options) {
- if (options.blockUI) {
- if (options.blockUI === true) { //unblock whole page
- abp.ui.clearBusy();
- } else { //unblock an element
- abp.ui.clearBusy(options.blockUI);
- }
- }
- },
-
- ajaxSendHandler: function (event, request, settings) {
- var token = abp.security.antiForgery.getToken();
- if (!token) {
- return;
- }
-
- if (!settings.headers || settings.headers[abp.security.antiForgery.tokenHeaderName] === undefined) {
- request.setRequestHeader(abp.security.antiForgery.tokenHeaderName, token);
- }
- }
- });
-
- $(document).ajaxSend(function (event, request, settings) {
- return abp.ajax.ajaxSendHandler(event, request, settings);
- });
-
- abp.event.on('abp.configurationInitialized', function () {
- var l = abp.localization.getResource('AbpUi');
-
- abp.ajax.defaultError.message = l('DefaultErrorMessage');
- abp.ajax.defaultError.details = l('DefaultErrorMessageDetail');
- abp.ajax.defaultError401.message = l('DefaultErrorMessage401');
- abp.ajax.defaultError401.details = l('DefaultErrorMessage401Detail');
- abp.ajax.defaultError403.message = l('DefaultErrorMessage403');
- abp.ajax.defaultError403.details = l('DefaultErrorMessage403Detail');
- abp.ajax.defaultError404.message = l('DefaultErrorMessage404');
- abp.ajax.defaultError404.details = l('DefaultErrorMessage404Detail');
- });
-
- // RESOURCE LOADER ////////////////////////////////////////////////////////
-
- /* UrlStates enum */
- var UrlStates = {
- LOADING: 'LOADING',
- LOADED: 'LOADED',
- FAILED: 'FAILED'
- };
-
- /* UrlInfo class */
- function UrlInfo(url) {
- this.url = url;
- this.state = UrlStates.LOADING;
- this.loadCallbacks = [];
- this.failCallbacks = [];
- }
-
- UrlInfo.prototype.succeed = function () {
- this.state = UrlStates.LOADED;
- for (var i = 0; i < this.loadCallbacks.length; i++) {
- this.loadCallbacks[i]();
- }
- };
-
- UrlInfo.prototype.failed = function () {
- this.state = UrlStates.FAILED;
- for (var i = 0; i < this.failCallbacks.length; i++) {
- this.failCallbacks[i]();
- }
- };
-
- UrlInfo.prototype.handleCallbacks = function (loadCallback, failCallback) {
- switch (this.state) {
- case UrlStates.LOADED:
- loadCallback && loadCallback();
- break;
- case UrlStates.FAILED:
- failCallback && failCallback();
- break;
- case UrlStates.LOADING:
- this.addCallbacks(loadCallback, failCallback);
- break;
- }
- };
-
- UrlInfo.prototype.addCallbacks = function (loadCallback, failCallback) {
- loadCallback && this.loadCallbacks.push(loadCallback);
- failCallback && this.failCallbacks.push(failCallback);
- };
-
- /* ResourceLoader API */
-
- abp.ResourceLoader = (function () {
-
- var _urlInfos = {};
-
- function getCacheKey(url) {
- return url;
- }
-
- function appendTimeToUrl(url) {
-
- if (url.indexOf('?') < 0) {
- url += '?';
- } else {
- url += '&';
- }
-
- url += '_=' + new Date().getTime();
-
- return url;
- }
-
- var _loadFromUrl = function (url, loadCallback, failCallback, serverLoader) {
-
- var cacheKey = getCacheKey(url);
-
- var urlInfo = _urlInfos[cacheKey];
-
- if (urlInfo) {
- urlInfo.handleCallbacks(loadCallback, failCallback);
- return;
- }
-
- _urlInfos[cacheKey] = urlInfo = new UrlInfo(url);
- urlInfo.addCallbacks(loadCallback, failCallback);
-
- serverLoader(urlInfo);
- };
-
- var _loadScript = function (url, loadCallback, failCallback) {
- _loadFromUrl(url, loadCallback, failCallback, function (urlInfo) {
- $.get({
- url: url,
- dataType: 'text'
- })
- .done(function (script) {
- $.globalEval(script);
- urlInfo.succeed();
- })
- .fail(function () {
- urlInfo.failed();
- });
- });
- };
-
- var _loadStyle = function (url) {
- _loadFromUrl(url, undefined, undefined, function (urlInfo) {
-
- $('', {
- rel: 'stylesheet',
- type: 'text/css',
- href: appendTimeToUrl(url)
- }).appendTo('head');
- });
- };
-
- return {
- loadScript: _loadScript,
- loadStyle: _loadStyle
- }
- })();
-
+var abp = abp || {};
+(function($) {
+
+ if (!$) {
+ throw "abp/jquery library requires the jquery library included to the page!";
+ }
+
+ // ABP CORE OVERRIDES /////////////////////////////////////////////////////
+
+ abp.message._showMessage = function (message, title) {
+ alert((title || '') + ' ' + message);
+
+ return $.Deferred(function ($dfd) {
+ $dfd.resolve();
+ });
+ };
+
+ abp.message.confirm = function (message, titleOrCallback, callback) {
+ if (titleOrCallback && !(typeof titleOrCallback == 'string')) {
+ callback = titleOrCallback;
+ }
+
+ var result = confirm(message);
+ callback && callback(result);
+
+ return $.Deferred(function ($dfd) {
+ $dfd.resolve(result);
+ });
+ };
+
+ abp.utils.isFunction = function (obj) {
+ return $.isFunction(obj);
+ };
+
+ // JQUERY EXTENSIONS //////////////////////////////////////////////////////
+
+ $.fn.findWithSelf = function (selector) {
+ return this.filter(selector).add(this.find(selector));
+ };
+
+ // DOM ////////////////////////////////////////////////////////////////////
+
+ abp.dom = abp.dom || {};
+
+ abp.dom.onNodeAdded = function (callback) {
+ abp.event.on('abp.dom.nodeAdded', callback);
+ };
+
+ abp.dom.onNodeRemoved = function (callback) {
+ abp.event.on('abp.dom.nodeRemoved', callback);
+ };
+
+ var mutationObserverCallback = function (mutationsList) {
+ for (var i = 0; i < mutationsList.length; i++) {
+ var mutation = mutationsList[i];
+ if (mutation.type === 'childList') {
+ if (mutation.addedNodes && mutation.removedNodes.length) {
+ for (var k = 0; k < mutation.removedNodes.length; k++) {
+ abp.event.trigger(
+ 'abp.dom.nodeRemoved',
+ {
+ $el: $(mutation.removedNodes[k])
+ }
+ );
+ }
+ }
+
+ if (mutation.addedNodes && mutation.addedNodes.length) {
+ for (var j = 0; j < mutation.addedNodes.length; j++) {
+ abp.event.trigger(
+ 'abp.dom.nodeAdded',
+ {
+ $el: $(mutation.addedNodes[j])
+ }
+ );
+ }
+ }
+ }
+ }
+ };
+
+ new MutationObserver(mutationObserverCallback).observe(
+ $('body')[0],
+ {
+ subtree: true,
+ childList: true
+ }
+ );
+
+ // AJAX ///////////////////////////////////////////////////////////////////
+
+ abp.ajax = function (userOptions) {
+ userOptions = userOptions || {};
+
+ var options = $.extend(true, {}, abp.ajax.defaultOpts, userOptions);
+
+ options.success = undefined;
+ options.error = undefined;
+
+ return $.Deferred(function ($dfd) {
+ $.ajax(options)
+ .done(function (data, textStatus, jqXHR) {
+ $dfd.resolve(data);
+ userOptions.success && userOptions.success(data);
+ }).fail(function (jqXHR) {
+ if (jqXHR.getResponseHeader('_AbpErrorFormat') === 'true') {
+ abp.ajax.handleAbpErrorResponse(jqXHR, userOptions, $dfd);
+ } else {
+ abp.ajax.handleNonAbpErrorResponse(jqXHR, userOptions, $dfd);
+ }
+ });
+ });
+ };
+
+ $.extend(abp.ajax, {
+ defaultOpts: {
+ dataType: 'json',
+ type: 'POST',
+ contentType: 'application/json',
+ headers: {
+ 'X-Requested-With': 'XMLHttpRequest'
+ }
+ },
+
+ defaultError: {
+ message: 'An error has occurred!',
+ details: 'Error detail not sent by server.'
+ },
+
+ defaultError401: {
+ message: 'You are not authenticated!',
+ details: 'You should be authenticated (sign in) in order to perform this operation.'
+ },
+
+ defaultError403: {
+ message: 'You are not authorized!',
+ details: 'You are not allowed to perform this operation.'
+ },
+
+ defaultError404: {
+ message: 'Resource not found!',
+ details: 'The resource requested could not found on the server.'
+ },
+
+ logError: function (error) {
+ abp.log.error(error);
+ },
+
+ showError: function (error) {
+ if (error.details) {
+ return abp.message.error(error.details, error.message);
+ } else {
+ return abp.message.error(error.message || abp.ajax.defaultError.message);
+ }
+ },
+
+ handleTargetUrl: function (targetUrl) {
+ if (!targetUrl) {
+ location.href = abp.appPath;
+ } else {
+ location.href = targetUrl;
+ }
+ },
+
+ handleErrorStatusCode: function (status) {
+ switch (status) {
+ case 401:
+ abp.ajax.handleUnAuthorizedRequest(
+ abp.ajax.showError(abp.ajax.defaultError401),
+ abp.appPath
+ );
+ break;
+ case 403:
+ abp.ajax.showError(abp.ajax.defaultError403);
+ break;
+ case 404:
+ abp.ajax.showError(abp.ajax.defaultError404);
+ break;
+ default:
+ abp.ajax.showError(abp.ajax.defaultError);
+ break;
+ }
+ },
+
+ handleNonAbpErrorResponse: function (jqXHR, userOptions, $dfd) {
+ if (userOptions.abpHandleError !== false) {
+ abp.ajax.handleErrorStatusCode(jqXHR.status);
+ }
+
+ $dfd.reject.apply(this, arguments);
+ userOptions.error && userOptions.error.apply(this, arguments);
+ },
+
+ handleAbpErrorResponse: function (jqXHR, userOptions, $dfd) {
+ var messagePromise = null;
+
+ if (userOptions.abpHandleError !== false) {
+ messagePromise = abp.ajax.showError(jqXHR.responseJSON.error);
+ }
+
+ abp.ajax.logError(jqXHR.responseJSON.error);
+
+ $dfd && $dfd.reject(jqXHR.responseJSON.error, jqXHR);
+ userOptions.error && userOptions.error(jqXHR.responseJSON.error, jqXHR);
+
+ if (jqXHR.status === 401 && userOptions.abpHandleError !== false) {
+ abp.ajax.handleUnAuthorizedRequest(messagePromise);
+ }
+ },
+
+ handleUnAuthorizedRequest: function (messagePromise, targetUrl) {
+ if (messagePromise) {
+ messagePromise.done(function () {
+ abp.ajax.handleTargetUrl(targetUrl);
+ });
+ } else {
+ abp.ajax.handleTargetUrl(targetUrl);
+ }
+ },
+
+ blockUI: function (options) {
+ if (options.blockUI) {
+ if (options.blockUI === true) { //block whole page
+ abp.ui.setBusy();
+ } else { //block an element
+ abp.ui.setBusy(options.blockUI);
+ }
+ }
+ },
+
+ unblockUI: function (options) {
+ if (options.blockUI) {
+ if (options.blockUI === true) { //unblock whole page
+ abp.ui.clearBusy();
+ } else { //unblock an element
+ abp.ui.clearBusy(options.blockUI);
+ }
+ }
+ },
+
+ ajaxSendHandler: function (event, request, settings) {
+ var token = abp.security.antiForgery.getToken();
+ if (!token) {
+ return;
+ }
+
+ if (!settings.headers || settings.headers[abp.security.antiForgery.tokenHeaderName] === undefined) {
+ request.setRequestHeader(abp.security.antiForgery.tokenHeaderName, token);
+ }
+ }
+ });
+
+ $(document).ajaxSend(function (event, request, settings) {
+ return abp.ajax.ajaxSendHandler(event, request, settings);
+ });
+
+ abp.event.on('abp.configurationInitialized', function () {
+ var l = abp.localization.getResource('AbpUi');
+
+ abp.ajax.defaultError.message = l('DefaultErrorMessage');
+ abp.ajax.defaultError.details = l('DefaultErrorMessageDetail');
+ abp.ajax.defaultError401.message = l('DefaultErrorMessage401');
+ abp.ajax.defaultError401.details = l('DefaultErrorMessage401Detail');
+ abp.ajax.defaultError403.message = l('DefaultErrorMessage403');
+ abp.ajax.defaultError403.details = l('DefaultErrorMessage403Detail');
+ abp.ajax.defaultError404.message = l('DefaultErrorMessage404');
+ abp.ajax.defaultError404.details = l('DefaultErrorMessage404Detail');
+ });
+
+ // RESOURCE LOADER ////////////////////////////////////////////////////////
+
+ /* UrlStates enum */
+ var UrlStates = {
+ LOADING: 'LOADING',
+ LOADED: 'LOADED',
+ FAILED: 'FAILED'
+ };
+
+ /* UrlInfo class */
+ function UrlInfo(url) {
+ this.url = url;
+ this.state = UrlStates.LOADING;
+ this.loadCallbacks = [];
+ this.failCallbacks = [];
+ }
+
+ UrlInfo.prototype.succeed = function () {
+ this.state = UrlStates.LOADED;
+ for (var i = 0; i < this.loadCallbacks.length; i++) {
+ this.loadCallbacks[i]();
+ }
+ };
+
+ UrlInfo.prototype.failed = function () {
+ this.state = UrlStates.FAILED;
+ for (var i = 0; i < this.failCallbacks.length; i++) {
+ this.failCallbacks[i]();
+ }
+ };
+
+ UrlInfo.prototype.handleCallbacks = function (loadCallback, failCallback) {
+ switch (this.state) {
+ case UrlStates.LOADED:
+ loadCallback && loadCallback();
+ break;
+ case UrlStates.FAILED:
+ failCallback && failCallback();
+ break;
+ case UrlStates.LOADING:
+ this.addCallbacks(loadCallback, failCallback);
+ break;
+ }
+ };
+
+ UrlInfo.prototype.addCallbacks = function (loadCallback, failCallback) {
+ loadCallback && this.loadCallbacks.push(loadCallback);
+ failCallback && this.failCallbacks.push(failCallback);
+ };
+
+ /* ResourceLoader API */
+
+ abp.ResourceLoader = (function () {
+
+ var _urlInfos = {};
+
+ function getCacheKey(url) {
+ return url;
+ }
+
+ function appendTimeToUrl(url) {
+
+ if (url.indexOf('?') < 0) {
+ url += '?';
+ } else {
+ url += '&';
+ }
+
+ url += '_=' + new Date().getTime();
+
+ return url;
+ }
+
+ var _loadFromUrl = function (url, loadCallback, failCallback, serverLoader) {
+
+ var cacheKey = getCacheKey(url);
+
+ var urlInfo = _urlInfos[cacheKey];
+
+ if (urlInfo) {
+ urlInfo.handleCallbacks(loadCallback, failCallback);
+ return;
+ }
+
+ _urlInfos[cacheKey] = urlInfo = new UrlInfo(url);
+ urlInfo.addCallbacks(loadCallback, failCallback);
+
+ serverLoader(urlInfo);
+ };
+
+ var _loadScript = function (url, loadCallback, failCallback) {
+ _loadFromUrl(url, loadCallback, failCallback, function (urlInfo) {
+ $.get({
+ url: url,
+ dataType: 'text'
+ })
+ .done(function (script) {
+ $.globalEval(script);
+ urlInfo.succeed();
+ })
+ .fail(function () {
+ urlInfo.failed();
+ });
+ });
+ };
+
+ var _loadStyle = function (url) {
+ _loadFromUrl(url, undefined, undefined, function (urlInfo) {
+
+ $('', {
+ rel: 'stylesheet',
+ type: 'text/css',
+ href: appendTimeToUrl(url)
+ }).appendTo('head');
+ });
+ };
+
+ return {
+ loadScript: _loadScript,
+ loadStyle: _loadStyle
+ }
+ })();
+
})(jQuery);
\ No newline at end of file
diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/yarn.lock b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/yarn.lock
index d125f98cc5..157d0f2e34 100644
--- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/yarn.lock
+++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/yarn.lock
@@ -2,37 +2,37 @@
# yarn lockfile v1
-"@abp/aspnetcore.mvc.ui.theme.basic@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.basic/-/aspnetcore.mvc.ui.theme.basic-2.1.0.tgz#f815001bd856fb5cbdd0b736181f2401a1a7ec62"
- integrity sha512-ej6dhUo3H9w6bpBTpMhk3M6zbC3fVAVMm5yLSYlYJ0sQxjb9PqC02OgiJme0mkxCUMwPuHVSQLrMQbioXdZu3A==
+"@abp/aspnetcore.mvc.ui.theme.basic@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.basic/-/aspnetcore.mvc.ui.theme.basic-2.2.0.tgz#e7f4e57d2b17cc76388e9c56bc34d50c9658873b"
+ integrity sha512-S9GQ9YVg4DWrgjujwiXBER6KqdqW5nZ1Bmt+YEePn5gEoPvoVrh6ojthpHYRjBJtGFqBSzRAQ9eVZLebT22Ozg==
dependencies:
- "@abp/aspnetcore.mvc.ui.theme.shared" "^2.1.0"
+ "@abp/aspnetcore.mvc.ui.theme.shared" "^2.2.0"
-"@abp/aspnetcore.mvc.ui.theme.shared@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.shared/-/aspnetcore.mvc.ui.theme.shared-2.1.0.tgz#c2790241b5a44b9d6e4f65911a1b9d9e9104ed82"
- integrity sha512-dxC0P/b1T+QJmRrB8HoLM7/GkWblz/X5lLqgn583W7/OTYhvxIxszuRDy/XIEuS+fP6a9rcGvGu5jcKJEqe/xA==
- dependencies:
- "@abp/aspnetcore.mvc.ui" "^2.1.0"
- "@abp/bootstrap" "^2.1.0"
- "@abp/bootstrap-datepicker" "^2.1.0"
- "@abp/datatables.net-bs4" "^2.1.0"
- "@abp/font-awesome" "^2.1.0"
- "@abp/jquery-form" "^2.1.0"
- "@abp/jquery-validation-unobtrusive" "^2.1.0"
- "@abp/lodash" "^2.1.0"
- "@abp/luxon" "^2.1.0"
- "@abp/malihu-custom-scrollbar-plugin" "^2.1.0"
- "@abp/select2" "^2.1.0"
- "@abp/sweetalert" "^2.1.0"
- "@abp/timeago" "^2.1.0"
- "@abp/toastr" "^2.1.0"
-
-"@abp/aspnetcore.mvc.ui@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui/-/aspnetcore.mvc.ui-2.1.0.tgz#3c86f42e52af3151d2aee0ffdd1281014ea61054"
- integrity sha512-pKiKMBOPuLm7p44DW8DdbsVn5PY3NqGYkz6gf75uzxyWiVYyl2CM/bvX9w4Ie7Q969owENMLrBREN6ezWZ5ynA==
+"@abp/aspnetcore.mvc.ui.theme.shared@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.shared/-/aspnetcore.mvc.ui.theme.shared-2.2.0.tgz#e0df953853be2a184d323931573f9f98aebbaa62"
+ integrity sha512-urxziaCdvfEqN5cjiiM5f5dx2Yr+AoGqCJVCo0Okjl2dosdaj5DH4SBzMvKAaLXzo3Ep1h4b3Wvws4BThL/6rA==
+ dependencies:
+ "@abp/aspnetcore.mvc.ui" "^2.2.0"
+ "@abp/bootstrap" "^2.2.0"
+ "@abp/bootstrap-datepicker" "^2.2.0"
+ "@abp/datatables.net-bs4" "^2.2.0"
+ "@abp/font-awesome" "^2.2.0"
+ "@abp/jquery-form" "^2.2.0"
+ "@abp/jquery-validation-unobtrusive" "^2.2.0"
+ "@abp/lodash" "^2.2.0"
+ "@abp/luxon" "^2.2.0"
+ "@abp/malihu-custom-scrollbar-plugin" "^2.2.0"
+ "@abp/select2" "^2.2.0"
+ "@abp/sweetalert" "^2.2.0"
+ "@abp/timeago" "^2.2.0"
+ "@abp/toastr" "^2.2.0"
+
+"@abp/aspnetcore.mvc.ui@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui/-/aspnetcore.mvc.ui-2.2.0.tgz#b2cdd421eed09ec1d30ae85e14434b7efc094ade"
+ integrity sha512-IO/AjhJu+LUa9zOaT8JlEnV+Pcp9oQ3q9kTq8kmMakC35vTIyvBpB3nnykXIOytZSyjsBgFYB/uMxPgBOjWagg==
dependencies:
ansi-colors "^4.1.1"
extend-object "^1.0.0"
@@ -41,135 +41,135 @@
path "^0.12.7"
rimraf "^3.0.0"
-"@abp/bootstrap-datepicker@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/bootstrap-datepicker/-/bootstrap-datepicker-2.1.0.tgz#a0d71da15cb3d3cc02f9a390437a44db5e9f9ea1"
- integrity sha512-lkNI0iyefiXS2O5x9Ae9eJQLPXSQlOWDX7QhKnBHLR9JxjJEnhBUIIOylMltAIqtVDtjk2ikDyd3BAiyBdtB/w==
+"@abp/bootstrap-datepicker@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/bootstrap-datepicker/-/bootstrap-datepicker-2.2.0.tgz#a2f50b422824f18ed4b7e80be6852e2979119f8e"
+ integrity sha512-X9jT5mU42QFfVhOZdun7aEJUf3bMko6NsG3NFQVjqTqKH+iYGKfHPFpXD0gP/6Nb4KgZUdId8hSyQTZyOK2JEA==
dependencies:
bootstrap-datepicker "^1.9.0"
-"@abp/bootstrap@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/bootstrap/-/bootstrap-2.1.0.tgz#7ce15d4effac0e0991a3520c4666c6cb17a3fef2"
- integrity sha512-1xQjqu6shCgzd1FI94y5AIXGIhBlZEoRrOhaT84j/2KzYiDvhP+LAqQjMgqlQmBLs6vMckpxtf5thxKTMXvtOw==
+"@abp/bootstrap@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/bootstrap/-/bootstrap-2.2.0.tgz#16e41d3432117bbcd9012c6f735c49c543255879"
+ integrity sha512-aRmluu6SkIl+JgCzSSJZrDPkYr6WWaQdY0iJAOz6NHtffa7Aumh1IUOrLVKL0T1pQn6QKs0Z7JDGyYMdh1HPkQ==
dependencies:
- "@abp/core" "^2.1.0"
+ "@abp/core" "^2.2.0"
bootstrap "^4.3.1"
-"@abp/core@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/core/-/core-2.1.0.tgz#0cd2850f029df1d18517b8e74c70341972c37ed7"
- integrity sha512-1wnRo00hWncZWSakaEXm388XhhbKXDVkWDIdaT3kyQpvp3kX1lFx7I5iiZiwIeULwZRF9mi6HV6iHEze58x0kQ==
+"@abp/core@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/core/-/core-2.2.0.tgz#4eea0a06458c90acb8566a11eb841fe65d15d256"
+ integrity sha512-tBGHa5CUr0ewT31g689RAfQ6Su2p4uyn2PzmrW/8lahBrvqkoCb41fkCDLQJkTY5rKPrEKZd/s9OoyOnS20DLg==
-"@abp/datatables.net-bs4@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/datatables.net-bs4/-/datatables.net-bs4-2.1.0.tgz#a0f36cf4e3ef96ae03aa4b9956fcb8b971c854cb"
- integrity sha512-93qc2rrGs+JKRPM/7UCasa5VmfswgYU8cv3Ybg5OKoaASODYUn06GChRFnd/mvqcDxw4+8gaqpC3U2ETZZI4pA==
+"@abp/datatables.net-bs4@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/datatables.net-bs4/-/datatables.net-bs4-2.2.0.tgz#c7cc49e889b295ae10fb24ed62b154ef79ffc85a"
+ integrity sha512-zjJRPqOCWPfkHt1QztfFHKrsTE9o6Je2EpfA7hRMej2FlGbsMWUxOqx/btK1vjD6YIU8DtVDpIdj1WvPOITQ4Q==
dependencies:
- "@abp/datatables.net" "^2.1.0"
+ "@abp/datatables.net" "^2.2.0"
datatables.net-bs4 "^1.10.20"
-"@abp/datatables.net@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/datatables.net/-/datatables.net-2.1.0.tgz#674eaaa5b0948d7ee85b6605bfbad1a70f839aa7"
- integrity sha512-3ZM2p+JpHumxbIKlDP/LKLsfceMdttdTOL0ckIZCmAAgoIeKmAtuMoKcHTr8lj5mjgv4arBGvG9WVCemep2PEw==
+"@abp/datatables.net@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/datatables.net/-/datatables.net-2.2.0.tgz#22f9c7ca90c2d4af264483b4f8286b0feb7c3d52"
+ integrity sha512-L4MnpdloSWr/px3mvV75sxsxL68MyALB2LKdzCFMQWILCZVkxMmQb9LARINYIrn461Wrc+zbYWNEBD0MAq7flg==
dependencies:
- "@abp/core" "^2.1.0"
+ "@abp/core" "^2.2.0"
datatables.net "^1.10.20"
-"@abp/font-awesome@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/font-awesome/-/font-awesome-2.1.0.tgz#c2e628a1b9d0525e7d6950bf007feebcd1c490c8"
- integrity sha512-vlm1IQuQVfuCI2O1vphDd11zUEJ4/4PU0/0XI1YCpilse8fBg080CM3+G0kw6Erm/riznqhOJwBcfT+K+zqk8A==
+"@abp/font-awesome@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/font-awesome/-/font-awesome-2.2.0.tgz#2de39e3c6c3e8c30394d82861761a66c5b4032f0"
+ integrity sha512-RT06MYUGgaWBEpW5c7wUcfMXgxcOHWdX/C01LDO/j6iVoKBuBHOkkvcUoTWII068ECrLYOkj+RyT59dCKm8FFw==
dependencies:
- "@abp/core" "^2.1.0"
+ "@abp/core" "^2.2.0"
"@fortawesome/fontawesome-free" "^5.11.2"
-"@abp/jquery-form@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/jquery-form/-/jquery-form-2.1.0.tgz#285dbfdcf722cb0249f149e728cef7f788410c0c"
- integrity sha512-A17rjHTiBJBKYgrtDX5wIqnI89wNmo3bdK9NagL1wMFj4GvDyOZoRIDLqkopYQsc8zuPjqw4+1aa2TPiA+jtKg==
+"@abp/jquery-form@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/jquery-form/-/jquery-form-2.2.0.tgz#951653fac4013a7bbec065b5101b86d575e0eca7"
+ integrity sha512-ji44E3Ud0S3LNXn1WJ/Aw44qAIG7EITEW1KOe46oz+/awPpbiiA4dDDNleTvO2jI2/s8mNyR0bNanP6BUsc7tw==
dependencies:
- "@abp/jquery" "^2.1.0"
+ "@abp/jquery" "^2.2.0"
jquery-form "^4.2.2"
-"@abp/jquery-validation-unobtrusive@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-2.1.0.tgz#fc938775ced2efc686e7dd092d6ceff1ea947f36"
- integrity sha512-a8iBIj6amJ9rQNV+wxQUuEVh93M/c32kJcrwSEPWQcOoTj5gf0j8eKK9YvZaGokpylraz9mdGOwYQQuNj1sxEw==
+"@abp/jquery-validation-unobtrusive@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-2.2.0.tgz#6d39ba9f7bf026d1380796bf5dff76c8d16b42ce"
+ integrity sha512-SuS/dRRVz7ZR4HK/h9x0jRRVLPqXN0CPRGPdJZ1LJraXVEJ9/eDEGf1rMlHmEGt1FXXFTD01/zjisbweDE786w==
dependencies:
- "@abp/jquery-validation" "^2.1.0"
+ "@abp/jquery-validation" "^2.2.0"
jquery-validation-unobtrusive "^3.2.11"
-"@abp/jquery-validation@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/jquery-validation/-/jquery-validation-2.1.0.tgz#2bf1a31321cce3b2abe6d56c6112c52a8ecb28b6"
- integrity sha512-kU6/E+Xc3wHAUs+sGMAL8uozkXv65HnpksTwV4/+RK+D6iFU2EyNgCEFu7QGSwYZsV1/7YsCe2GD4ucBXIknbA==
+"@abp/jquery-validation@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/jquery-validation/-/jquery-validation-2.2.0.tgz#02bb8ba883e72c1204867ee4d1c1094bd91c4c4c"
+ integrity sha512-ypITQloO4iEDgqlA6qb3taj+7HMX0Cf/ACA2OvtrvOgJejx6J4wfrPjwuFZu1WWJ0xtc9yTdbovdcSVcQbIGaA==
dependencies:
- "@abp/jquery" "^2.1.0"
+ "@abp/jquery" "^2.2.0"
jquery-validation "^1.19.1"
-"@abp/jquery@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/jquery/-/jquery-2.1.0.tgz#fb5b4c9e8622cf46fee92f9f731d007d5fb200bb"
- integrity sha512-ZpfzRut5G611bBmuDdiT6BD0M7Rl1P6r8uNxUjdmFXYwFd8wD02ZhIcsX7qFHFkYERuXfcLrZh4rpw9G1DVCJg==
+"@abp/jquery@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/jquery/-/jquery-2.2.0.tgz#0e641b1109e78eff4c34331ca2b123b67cc30cbe"
+ integrity sha512-vEfRoFEAmDmRgSq98Y9EZExfQFSWtmjaHrodUu+MadTcRlnn+wHq8wwkKKxpj/eYtNc8aFORpyHMMH7uliAKxg==
dependencies:
- "@abp/core" "^2.1.0"
+ "@abp/core" "^2.2.0"
jquery "^3.4.1"
-"@abp/lodash@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/lodash/-/lodash-2.1.0.tgz#9fc9e6521e6284d607cedbff1a458fa324137c5c"
- integrity sha512-s1gTHhpbmEDDCsZeXb9MpClkDS4wH5R2IWPRZUlSPxo3gF0pvkx5ubdhYUEUgqy5QqWxE/+zUAjDc4x+cEriFQ==
+"@abp/lodash@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/lodash/-/lodash-2.2.0.tgz#af0a2ebcb28fd0a8c02da5026479d9370ed19719"
+ integrity sha512-wOMLqIpuq4a7ww7pB138G6YxBiTGBgxNW/IWGUiWbfgrr88cGPKIYYv/8O8mvr8PLNGjizNynuwQRj522yA3Dw==
dependencies:
- "@abp/core" "^2.1.0"
+ "@abp/core" "^2.2.0"
lodash "^4.17.15"
-"@abp/luxon@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/luxon/-/luxon-2.1.0.tgz#624796722119f075119006b436054aecbb38f15f"
- integrity sha512-2b0sRo6rdYT1wDu9nSXm/9o8rhQ9ED7FxrDMYabYuOQz48esgn4fBUNcPqpxwejpFmlhZY6CONvkddNtaMeVHw==
+"@abp/luxon@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/luxon/-/luxon-2.2.0.tgz#0d0e78edc249853fa31eceecc00df2846a879aa9"
+ integrity sha512-WbOW0PcMks+WXRPWt/+H4pOa5waM331WkY0F+EJx8fpxemNGQNUEXLkuMXzN3MrN6LrplM9AZ9i+NRA9PWHbNw==
dependencies:
luxon "^1.21.3"
-"@abp/malihu-custom-scrollbar-plugin@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-2.1.0.tgz#f4dc1a32cefc3de8af08cb6d585ec5f7636a0c5e"
- integrity sha512-WcxzCZ5YOMxGxZerEh966cVrFSCw1UTDqwU2rxA/LsHEbPKd69AY+SHvUiacNxPXs1ZCF6FFJ29C5dWicEIRaQ==
+"@abp/malihu-custom-scrollbar-plugin@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-2.2.0.tgz#e11fd46dccbb28d44fb199e880b91d27c94f1919"
+ integrity sha512-YDu/NLpIzMA96NDHxd27/+liTm3sow9M+oWH29+9JW8o/AEpXUH3T3AmoXXcTgsBlzLaewgHEFM8yxsAAFoj8Q==
dependencies:
- "@abp/core" "^2.1.0"
+ "@abp/core" "^2.2.0"
malihu-custom-scrollbar-plugin "^3.1.5"
-"@abp/select2@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/select2/-/select2-2.1.0.tgz#79e50d2c25e74a5f96520e8aa1433d79aea674d1"
- integrity sha512-ut/3c+lFdoepuDH36M7thWagmAmTFrChcPnhYjTx4MmIf31WW1BwqOSx3I2g8M+NEEx+V2jTNuBpTq7PONgSJg==
+"@abp/select2@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/select2/-/select2-2.2.0.tgz#4639d4e5b72b1736fa4476bd9b6a78e036400421"
+ integrity sha512-tc87JyM0kvVF388kyGUjDby49Zrrb089jVRRipoIaxXeu4M1YxEFSKBEcUK1MohZWjVtWrNs8MoxPlfukaMpyw==
dependencies:
- "@abp/core" "^2.1.0"
+ "@abp/core" "^2.2.0"
select2 "^4.0.12"
-"@abp/sweetalert@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/sweetalert/-/sweetalert-2.1.0.tgz#88f405c4ba9f9ed2fd54b945ed6bc48d5ae2fa23"
- integrity sha512-EWvReqxZ1DrNH9XD+cf/yGVj+8IPTpuoPuWKDryN4fF7TCMJA+KrXp5lFxpjfkKTtNzLeFGsJqDFWaUifxtqTA==
+"@abp/sweetalert@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/sweetalert/-/sweetalert-2.2.0.tgz#dfc60ba085522d8390e41b90bf5a3d474f4ae624"
+ integrity sha512-HS6TKOwP91UjzjZHaheurZ1AYUSMkQyCSmoX6g5LAK4eH8IIgpojVSp1AFCSPATrFsFWY/dzkDGcfu90FWsVBg==
dependencies:
- "@abp/core" "^2.1.0"
+ "@abp/core" "^2.2.0"
sweetalert "^2.1.2"
-"@abp/timeago@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/timeago/-/timeago-2.1.0.tgz#28c0aef88aff8b54d1dfb42a664d05097e7fda35"
- integrity sha512-NklUYcWeji7po+Y6Oi7b7IkYmjd5YRu123bm3MqjQ71AzuOCTFbvPMHzYOjrUTkzr6gW3IJ24LQ4YmpshPy4ZQ==
+"@abp/timeago@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/timeago/-/timeago-2.2.0.tgz#9a8297f36a46cdc4cc62f44d0fdc91b70def389c"
+ integrity sha512-8qjmKscsTvPznHKWEsddYxdSBiU+l+OgLG6vzMcSWqngYbDQGXqNA93BwJI2qiwd+FkNcfGgYg7CN7bcwzmaiw==
dependencies:
- "@abp/jquery" "^2.1.0"
+ "@abp/jquery" "^2.2.0"
timeago "^1.6.7"
-"@abp/toastr@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/toastr/-/toastr-2.1.0.tgz#22a53a2b1f354770fdc7b37f06bec10eefccfe7a"
- integrity sha512-hD3hTDx+CixTVTx73rnZDiiFkfSxpZox8RLm+CiFA62ORdO8Ryij8TOXXkJd84b2tJfkAkYehohVXKwHlHU7Zg==
+"@abp/toastr@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/toastr/-/toastr-2.2.0.tgz#1cad83a89da244685b3c82adff64260b7ccf4742"
+ integrity sha512-HHfSaw4M/9zS+KgzxGvbHYiQ5qcJgpf21cRZEo16aUwnTeKr4SRaewAWryNn4dKcIO2YNrhzDLH+OYbEaJJlDQ==
dependencies:
- "@abp/jquery" "^2.1.0"
+ "@abp/jquery" "^2.2.0"
toastr "^2.1.4"
"@fortawesome/fontawesome-free@^5.11.2":
diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/package.json b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/package.json
index bd35b85b18..5d035c76c9 100644
--- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/package.json
+++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/package.json
@@ -3,6 +3,6 @@
"name": "my-app-identityserver",
"private": true,
"dependencies": {
- "@abp/aspnetcore.mvc.ui.theme.basic": "^2.1.0"
+ "@abp/aspnetcore.mvc.ui.theme.basic": "^2.2.0"
}
}
\ No newline at end of file
diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/wwwroot/libs/abp/core/abp.css b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/wwwroot/libs/abp/core/abp.css
index ee3c5080a5..ddf9cae5b2 100644
--- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/wwwroot/libs/abp/core/abp.css
+++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/wwwroot/libs/abp/core/abp.css
@@ -1,56 +1,56 @@
-@keyframes spin {
- 0% {
- transform: translateZ(0) rotate(0deg);
- }
-
- 100% {
- transform: translateZ(0) rotate(360deg);
- }
-}
-
-.abp-block-area {
- position: fixed;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- z-index: 102;
- background-color: #fff;
- opacity: .8;
- transition: opacity .25s;
-}
-
- .abp-block-area.abp-block-area-disappearing {
- opacity: 0;
- }
-
- .abp-block-area.abp-block-area-busy:after {
- content: attr(data-text);
- display: block;
- max-width: 125px;
- position: absolute;
- top: 50%;
- left: 50%;
- transform: translate(-50%, -50%);
- font-size: 20px;
- font-family: sans-serif;
- color: #343a40;
- text-align: center;
- text-transform: uppercase;
- }
-
- .abp-block-area.abp-block-area-busy:before {
- content: "";
- display: block;
- width: 150px;
- height: 150px;
- border-radius: 50%;
- border-width: 2px;
- border-style: solid;
- border-color: transparent #228ae6 #228ae6 #228ae6;
- position: absolute;
- top: calc(50% - 75px);
- left: calc(50% - 75px);
- will-change: transform;
- animation: spin .75s infinite ease-in-out;
- }
+@keyframes spin {
+ 0% {
+ transform: translateZ(0) rotate(0deg);
+ }
+
+ 100% {
+ transform: translateZ(0) rotate(360deg);
+ }
+}
+
+.abp-block-area {
+ position: fixed;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ z-index: 102;
+ background-color: #fff;
+ opacity: .8;
+ transition: opacity .25s;
+}
+
+ .abp-block-area.abp-block-area-disappearing {
+ opacity: 0;
+ }
+
+ .abp-block-area.abp-block-area-busy:after {
+ content: attr(data-text);
+ display: block;
+ max-width: 125px;
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ transform: translate(-50%, -50%);
+ font-size: 20px;
+ font-family: sans-serif;
+ color: #343a40;
+ text-align: center;
+ text-transform: uppercase;
+ }
+
+ .abp-block-area.abp-block-area-busy:before {
+ content: "";
+ display: block;
+ width: 150px;
+ height: 150px;
+ border-radius: 50%;
+ border-width: 2px;
+ border-style: solid;
+ border-color: transparent #228ae6 #228ae6 #228ae6;
+ position: absolute;
+ top: calc(50% - 75px);
+ left: calc(50% - 75px);
+ will-change: transform;
+ animation: spin .75s infinite ease-in-out;
+ }
diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/wwwroot/libs/abp/core/abp.js b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/wwwroot/libs/abp/core/abp.js
index cef1cf55e1..730db8bc97 100644
--- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/wwwroot/libs/abp/core/abp.js
+++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/wwwroot/libs/abp/core/abp.js
@@ -1,636 +1,636 @@
-var abp = abp || {};
-(function () {
-
- /* Application paths *****************************************/
-
- //Current application root path (including virtual directory if exists).
- abp.appPath = abp.appPath || '/';
-
- abp.pageLoadTime = new Date();
-
- //Converts given path to absolute path using abp.appPath variable.
- abp.toAbsAppPath = function (path) {
- if (path.indexOf('/') == 0) {
- path = path.substring(1);
- }
-
- return abp.appPath + path;
- };
-
- /* LOGGING ***************************************************/
- //Implements Logging API that provides secure & controlled usage of console.log
-
- abp.log = abp.log || {};
-
- abp.log.levels = {
- DEBUG: 1,
- INFO: 2,
- WARN: 3,
- ERROR: 4,
- FATAL: 5
- };
-
- abp.log.level = abp.log.levels.DEBUG;
-
- abp.log.log = function (logObject, logLevel) {
- if (!window.console || !window.console.log) {
- return;
- }
-
- if (logLevel != undefined && logLevel < abp.log.level) {
- return;
- }
-
- console.log(logObject);
- };
-
- abp.log.debug = function (logObject) {
- abp.log.log("DEBUG: ", abp.log.levels.DEBUG);
- abp.log.log(logObject, abp.log.levels.DEBUG);
- };
-
- abp.log.info = function (logObject) {
- abp.log.log("INFO: ", abp.log.levels.INFO);
- abp.log.log(logObject, abp.log.levels.INFO);
- };
-
- abp.log.warn = function (logObject) {
- abp.log.log("WARN: ", abp.log.levels.WARN);
- abp.log.log(logObject, abp.log.levels.WARN);
- };
-
- abp.log.error = function (logObject) {
- abp.log.log("ERROR: ", abp.log.levels.ERROR);
- abp.log.log(logObject, abp.log.levels.ERROR);
- };
-
- abp.log.fatal = function (logObject) {
- abp.log.log("FATAL: ", abp.log.levels.FATAL);
- abp.log.log(logObject, abp.log.levels.FATAL);
- };
-
- /* LOCALIZATION ***********************************************/
-
- abp.localization = abp.localization || {};
-
- abp.localization.values = {};
-
- abp.localization.localize = function (key, sourceName) {
- sourceName = sourceName || abp.localization.defaultResourceName;
-
- var source = abp.localization.values[sourceName];
-
- if (!source) {
- abp.log.warn('Could not find localization source: ' + sourceName);
- return key;
- }
-
- var value = source[key];
- if (value == undefined) {
- return key;
- }
-
- var copiedArguments = Array.prototype.slice.call(arguments, 0);
- copiedArguments.splice(1, 1);
- copiedArguments[0] = value;
-
- return abp.utils.formatString.apply(this, copiedArguments);
- };
-
- abp.localization.getResource = function (name) {
- return function () {
- var copiedArguments = Array.prototype.slice.call(arguments, 0);
- copiedArguments.splice(1, 0, name);
- return abp.localization.localize.apply(this, copiedArguments);
- };
- };
-
- abp.localization.defaultResourceName = undefined;
-
- /* AUTHORIZATION **********************************************/
-
- abp.auth = abp.auth || {};
-
- abp.auth.policies = abp.auth.policies || {};
-
- abp.auth.grantedPolicies = abp.auth.grantedPolicies || {};
-
- abp.auth.isGranted = function (policyName) {
- return abp.auth.policies[policyName] != undefined && abp.auth.grantedPolicies[policyName] != undefined;
- };
-
- abp.auth.isAnyGranted = function () {
- if (!arguments || arguments.length <= 0) {
- return true;
- }
-
- for (var i = 0; i < arguments.length; i++) {
- if (abp.auth.isGranted(arguments[i])) {
- return true;
- }
- }
-
- return false;
- };
-
- abp.auth.areAllGranted = function () {
- if (!arguments || arguments.length <= 0) {
- return true;
- }
-
- for (var i = 0; i < arguments.length; i++) {
- if (!abp.auth.isGranted(arguments[i])) {
- return false;
- }
- }
-
- return true;
- };
-
- abp.auth.tokenCookieName = 'Abp.AuthToken';
-
- abp.auth.setToken = function (authToken, expireDate) {
- abp.utils.setCookieValue(abp.auth.tokenCookieName, authToken, expireDate, abp.appPath, abp.domain);
- };
-
- abp.auth.getToken = function () {
- return abp.utils.getCookieValue(abp.auth.tokenCookieName);
- }
-
- abp.auth.clearToken = function () {
- abp.auth.setToken();
- }
-
- /* SETTINGS *************************************************/
-
- abp.setting = abp.setting || {};
-
- abp.setting.values = abp.setting.values || {};
-
- abp.setting.get = function (name) {
- return abp.setting.values[name];
- };
-
- abp.setting.getBoolean = function (name) {
- var value = abp.setting.get(name);
- return value == 'true' || value == 'True';
- };
-
- abp.setting.getInt = function (name) {
- return parseInt(abp.setting.values[name]);
- };
-
- /* NOTIFICATION *********************************************/
- //Defines Notification API, not implements it
-
- abp.notify = abp.notify || {};
-
- abp.notify.success = function (message, title, options) {
- abp.log.warn('abp.notify.success is not implemented!');
- };
-
- abp.notify.info = function (message, title, options) {
- abp.log.warn('abp.notify.info is not implemented!');
- };
-
- abp.notify.warn = function (message, title, options) {
- abp.log.warn('abp.notify.warn is not implemented!');
- };
-
- abp.notify.error = function (message, title, options) {
- abp.log.warn('abp.notify.error is not implemented!');
- };
-
- /* MESSAGE **************************************************/
- //Defines Message API, not implements it
-
- abp.message = abp.message || {};
-
- abp.message._showMessage = function (message, title) {
- alert((title || '') + ' ' + message);
- };
-
- abp.message.info = function (message, title) {
- abp.log.warn('abp.message.info is not implemented!');
- return abp.message._showMessage(message, title);
- };
-
- abp.message.success = function (message, title) {
- abp.log.warn('abp.message.success is not implemented!');
- return abp.message._showMessage(message, title);
- };
-
- abp.message.warn = function (message, title) {
- abp.log.warn('abp.message.warn is not implemented!');
- return abp.message._showMessage(message, title);
- };
-
- abp.message.error = function (message, title) {
- abp.log.warn('abp.message.error is not implemented!');
- return abp.message._showMessage(message, title);
- };
-
- abp.message.confirm = function (message, titleOrCallback, callback) {
- abp.log.warn('abp.message.confirm is not properly implemented!');
-
- if (titleOrCallback && !(typeof titleOrCallback == 'string')) {
- callback = titleOrCallback;
- }
-
- var result = confirm(message);
- callback && callback(result);
- };
-
- /* UI *******************************************************/
-
- abp.ui = abp.ui || {};
-
- /* UI BLOCK */
- //Defines UI Block API and implements basically
-
- var $abpBlockArea = document.createElement('div');
- $abpBlockArea.classList.add('abp-block-area');
-
- /* opts: { //Can be an object with options or a string for query a selector
- * elm: a query selector (optional - default: document.body)
- * busy: boolean (optional - default: false)
- * promise: A promise with always or finally handler (optional - auto unblocks the ui if provided)
- * }
- */
- abp.ui.block = function (opts) {
- if (!opts) {
- opts = {};
- } else if (typeof opts == 'string') {
- opts = {
- elm: opts
- };
- }
-
- var $elm = document.querySelector(opts.elm) || document.body;
-
- if (opts.busy) {
- $abpBlockArea.classList.add('abp-block-area-busy');
- } else {
- $abpBlockArea.classList.remove('abp-block-area-busy');
- }
-
- if (document.querySelector(opts.elm)) {
- $abpBlockArea.style.position = 'absolute';
- } else {
- $abpBlockArea.style.position = 'fixed';
- }
-
- $elm.appendChild($abpBlockArea);
-
- if (opts.promise) {
- if (opts.promise.always) { //jQuery.Deferred style
- opts.promise.always(function () {
- abp.ui.unblock({
- $elm: opts.elm
- });
- });
- } else if (opts.promise['finally']) { //Q style
- opts.promise['finally'](function () {
- abp.ui.unblock({
- $elm: opts.elm
- });
- });
- }
- }
- };
-
- /* opts: {
- *
- * }
- */
- abp.ui.unblock = function (opts) {
- var element = document.querySelector('.abp-block-area');
- if (element) {
- element.classList.add('abp-block-area-disappearing');
- setTimeout(function () {
- if (element) {
- element.classList.remove('abp-block-area-disappearing');
- element.parentElement.removeChild(element);
- }
- }, 250);
- }
- };
-
- /* UI BUSY */
- //Defines UI Busy API, not implements it
-
- abp.ui.setBusy = function (opts) {
- if (!opts) {
- opts = {
- busy: true
- };
- } else if (typeof opts == 'string') {
- opts = {
- elm: opts,
- busy: true
- };
- }
-
- abp.ui.block(opts);
- };
-
- abp.ui.clearBusy = function (opts) {
- abp.ui.unblock(opts);
- };
-
- /* SIMPLE EVENT BUS *****************************************/
-
- abp.event = (function () {
-
- var _callbacks = {};
-
- var on = function (eventName, callback) {
- if (!_callbacks[eventName]) {
- _callbacks[eventName] = [];
- }
-
- _callbacks[eventName].push(callback);
- };
-
- var off = function (eventName, callback) {
- var callbacks = _callbacks[eventName];
- if (!callbacks) {
- return;
- }
-
- var index = -1;
- for (var i = 0; i < callbacks.length; i++) {
- if (callbacks[i] === callback) {
- index = i;
- break;
- }
- }
-
- if (index < 0) {
- return;
- }
-
- _callbacks[eventName].splice(index, 1);
- };
-
- var trigger = function (eventName) {
- var callbacks = _callbacks[eventName];
- if (!callbacks || !callbacks.length) {
- return;
- }
-
- var args = Array.prototype.slice.call(arguments, 1);
- for (var i = 0; i < callbacks.length; i++) {
- callbacks[i].apply(this, args);
- }
- };
-
- // Public interface ///////////////////////////////////////////////////
-
- return {
- on: on,
- off: off,
- trigger: trigger
- };
- })();
-
-
- /* UTILS ***************************************************/
-
- abp.utils = abp.utils || {};
-
- /* Creates a name namespace.
- * Example:
- * var taskService = abp.utils.createNamespace(abp, 'services.task');
- * taskService will be equal to abp.services.task
- * first argument (root) must be defined first
- ************************************************************/
- abp.utils.createNamespace = function (root, ns) {
- var parts = ns.split('.');
- for (var i = 0; i < parts.length; i++) {
- if (typeof root[parts[i]] == 'undefined') {
- root[parts[i]] = {};
- }
-
- root = root[parts[i]];
- }
-
- return root;
- };
-
- /* Find and replaces a string (search) to another string (replacement) in
- * given string (str).
- * Example:
- * abp.utils.replaceAll('This is a test string', 'is', 'X') = 'ThX X a test string'
- ************************************************************/
- abp.utils.replaceAll = function (str, search, replacement) {
- var fix = search.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
- return str.replace(new RegExp(fix, 'g'), replacement);
- };
-
- /* Formats a string just like string.format in C#.
- * Example:
- * abp.utils.formatString('Hello {0}','Tuana') = 'Hello Tuana'
- ************************************************************/
- abp.utils.formatString = function () {
- if (arguments.length < 1) {
- return null;
- }
-
- var str = arguments[0];
-
- for (var i = 1; i < arguments.length; i++) {
- var placeHolder = '{' + (i - 1) + '}';
- str = abp.utils.replaceAll(str, placeHolder, arguments[i]);
- }
-
- return str;
- };
-
- abp.utils.toPascalCase = function (str) {
- if (!str || !str.length) {
- return str;
- }
-
- if (str.length === 1) {
- return str.charAt(0).toUpperCase();
- }
-
- return str.charAt(0).toUpperCase() + str.substr(1);
- }
-
- abp.utils.toCamelCase = function (str) {
- if (!str || !str.length) {
- return str;
- }
-
- if (str.length === 1) {
- return str.charAt(0).toLowerCase();
- }
-
- return str.charAt(0).toLowerCase() + str.substr(1);
- }
-
- abp.utils.truncateString = function (str, maxLength) {
- if (!str || !str.length || str.length <= maxLength) {
- return str;
- }
-
- return str.substr(0, maxLength);
- };
-
- abp.utils.truncateStringWithPostfix = function (str, maxLength, postfix) {
- postfix = postfix || '...';
-
- if (!str || !str.length || str.length <= maxLength) {
- return str;
- }
-
- if (maxLength <= postfix.length) {
- return postfix.substr(0, maxLength);
- }
-
- return str.substr(0, maxLength - postfix.length) + postfix;
- };
-
- abp.utils.isFunction = function (obj) {
- return !!(obj && obj.constructor && obj.call && obj.apply);
- };
-
- /**
- * parameterInfos should be an array of { name, value } objects
- * where name is query string parameter name and value is it's value.
- * includeQuestionMark is true by default.
- */
- abp.utils.buildQueryString = function (parameterInfos, includeQuestionMark) {
- if (includeQuestionMark === undefined) {
- includeQuestionMark = true;
- }
-
- var qs = '';
-
- function addSeperator() {
- if (!qs.length) {
- if (includeQuestionMark) {
- qs = qs + '?';
- }
- } else {
- qs = qs + '&';
- }
- }
-
- for (var i = 0; i < parameterInfos.length; ++i) {
- var parameterInfo = parameterInfos[i];
- if (parameterInfo.value === undefined) {
- continue;
- }
-
- if (parameterInfo.value === null) {
- parameterInfo.value = '';
- }
-
- addSeperator();
-
- if (parameterInfo.value.toJSON && typeof parameterInfo.value.toJSON === "function") {
- qs = qs + parameterInfo.name + '=' + encodeURIComponent(parameterInfo.value.toJSON());
- } else if (Array.isArray(parameterInfo.value) && parameterInfo.value.length) {
- for (var j = 0; j < parameterInfo.value.length; j++) {
- if (j > 0) {
- addSeperator();
- }
-
- qs = qs + parameterInfo.name + '[' + j + ']=' + encodeURIComponent(parameterInfo.value[j]);
- }
- } else {
- qs = qs + parameterInfo.name + '=' + encodeURIComponent(parameterInfo.value);
- }
- }
-
- return qs;
- }
-
- /**
- * Sets a cookie value for given key.
- * This is a simple implementation created to be used by ABP.
- * Please use a complete cookie library if you need.
- * @param {string} key
- * @param {string} value
- * @param {Date} expireDate (optional). If not specified the cookie will expire at the end of session.
- * @param {string} path (optional)
- */
- abp.utils.setCookieValue = function (key, value, expireDate, path) {
- var cookieValue = encodeURIComponent(key) + '=';
-
- if (value) {
- cookieValue = cookieValue + encodeURIComponent(value);
- }
-
- if (expireDate) {
- cookieValue = cookieValue + "; expires=" + expireDate.toUTCString();
- }
-
- if (path) {
- cookieValue = cookieValue + "; path=" + path;
- }
-
- document.cookie = cookieValue;
- };
-
- /**
- * Gets a cookie with given key.
- * This is a simple implementation created to be used by ABP.
- * Please use a complete cookie library if you need.
- * @param {string} key
- * @returns {string} Cookie value or null
- */
- abp.utils.getCookieValue = function (key) {
- var equalities = document.cookie.split('; ');
- for (var i = 0; i < equalities.length; i++) {
- if (!equalities[i]) {
- continue;
- }
-
- var splitted = equalities[i].split('=');
- if (splitted.length != 2) {
- continue;
- }
-
- if (decodeURIComponent(splitted[0]) === key) {
- return decodeURIComponent(splitted[1] || '');
- }
- }
-
- return null;
- };
-
- /**
- * Deletes cookie for given key.
- * This is a simple implementation created to be used by ABP.
- * Please use a complete cookie library if you need.
- * @param {string} key
- * @param {string} path (optional)
- */
- abp.utils.deleteCookie = function (key, path) {
- var cookieValue = encodeURIComponent(key) + '=';
-
- cookieValue = cookieValue + "; expires=" + (new Date(new Date().getTime() - 86400000)).toUTCString();
-
- if (path) {
- cookieValue = cookieValue + "; path=" + path;
- }
-
- document.cookie = cookieValue;
- }
-
- /* SECURITY ***************************************/
- abp.security = abp.security || {};
- abp.security.antiForgery = abp.security.antiForgery || {};
-
- abp.security.antiForgery.tokenCookieName = 'XSRF-TOKEN';
- abp.security.antiForgery.tokenHeaderName = 'X-XSRF-TOKEN';
-
- abp.security.antiForgery.getToken = function () {
- return abp.utils.getCookieValue(abp.security.antiForgery.tokenCookieName);
- };
-
+var abp = abp || {};
+(function () {
+
+ /* Application paths *****************************************/
+
+ //Current application root path (including virtual directory if exists).
+ abp.appPath = abp.appPath || '/';
+
+ abp.pageLoadTime = new Date();
+
+ //Converts given path to absolute path using abp.appPath variable.
+ abp.toAbsAppPath = function (path) {
+ if (path.indexOf('/') == 0) {
+ path = path.substring(1);
+ }
+
+ return abp.appPath + path;
+ };
+
+ /* LOGGING ***************************************************/
+ //Implements Logging API that provides secure & controlled usage of console.log
+
+ abp.log = abp.log || {};
+
+ abp.log.levels = {
+ DEBUG: 1,
+ INFO: 2,
+ WARN: 3,
+ ERROR: 4,
+ FATAL: 5
+ };
+
+ abp.log.level = abp.log.levels.DEBUG;
+
+ abp.log.log = function (logObject, logLevel) {
+ if (!window.console || !window.console.log) {
+ return;
+ }
+
+ if (logLevel != undefined && logLevel < abp.log.level) {
+ return;
+ }
+
+ console.log(logObject);
+ };
+
+ abp.log.debug = function (logObject) {
+ abp.log.log("DEBUG: ", abp.log.levels.DEBUG);
+ abp.log.log(logObject, abp.log.levels.DEBUG);
+ };
+
+ abp.log.info = function (logObject) {
+ abp.log.log("INFO: ", abp.log.levels.INFO);
+ abp.log.log(logObject, abp.log.levels.INFO);
+ };
+
+ abp.log.warn = function (logObject) {
+ abp.log.log("WARN: ", abp.log.levels.WARN);
+ abp.log.log(logObject, abp.log.levels.WARN);
+ };
+
+ abp.log.error = function (logObject) {
+ abp.log.log("ERROR: ", abp.log.levels.ERROR);
+ abp.log.log(logObject, abp.log.levels.ERROR);
+ };
+
+ abp.log.fatal = function (logObject) {
+ abp.log.log("FATAL: ", abp.log.levels.FATAL);
+ abp.log.log(logObject, abp.log.levels.FATAL);
+ };
+
+ /* LOCALIZATION ***********************************************/
+
+ abp.localization = abp.localization || {};
+
+ abp.localization.values = {};
+
+ abp.localization.localize = function (key, sourceName) {
+ sourceName = sourceName || abp.localization.defaultResourceName;
+
+ var source = abp.localization.values[sourceName];
+
+ if (!source) {
+ abp.log.warn('Could not find localization source: ' + sourceName);
+ return key;
+ }
+
+ var value = source[key];
+ if (value == undefined) {
+ return key;
+ }
+
+ var copiedArguments = Array.prototype.slice.call(arguments, 0);
+ copiedArguments.splice(1, 1);
+ copiedArguments[0] = value;
+
+ return abp.utils.formatString.apply(this, copiedArguments);
+ };
+
+ abp.localization.getResource = function (name) {
+ return function () {
+ var copiedArguments = Array.prototype.slice.call(arguments, 0);
+ copiedArguments.splice(1, 0, name);
+ return abp.localization.localize.apply(this, copiedArguments);
+ };
+ };
+
+ abp.localization.defaultResourceName = undefined;
+
+ /* AUTHORIZATION **********************************************/
+
+ abp.auth = abp.auth || {};
+
+ abp.auth.policies = abp.auth.policies || {};
+
+ abp.auth.grantedPolicies = abp.auth.grantedPolicies || {};
+
+ abp.auth.isGranted = function (policyName) {
+ return abp.auth.policies[policyName] != undefined && abp.auth.grantedPolicies[policyName] != undefined;
+ };
+
+ abp.auth.isAnyGranted = function () {
+ if (!arguments || arguments.length <= 0) {
+ return true;
+ }
+
+ for (var i = 0; i < arguments.length; i++) {
+ if (abp.auth.isGranted(arguments[i])) {
+ return true;
+ }
+ }
+
+ return false;
+ };
+
+ abp.auth.areAllGranted = function () {
+ if (!arguments || arguments.length <= 0) {
+ return true;
+ }
+
+ for (var i = 0; i < arguments.length; i++) {
+ if (!abp.auth.isGranted(arguments[i])) {
+ return false;
+ }
+ }
+
+ return true;
+ };
+
+ abp.auth.tokenCookieName = 'Abp.AuthToken';
+
+ abp.auth.setToken = function (authToken, expireDate) {
+ abp.utils.setCookieValue(abp.auth.tokenCookieName, authToken, expireDate, abp.appPath, abp.domain);
+ };
+
+ abp.auth.getToken = function () {
+ return abp.utils.getCookieValue(abp.auth.tokenCookieName);
+ }
+
+ abp.auth.clearToken = function () {
+ abp.auth.setToken();
+ }
+
+ /* SETTINGS *************************************************/
+
+ abp.setting = abp.setting || {};
+
+ abp.setting.values = abp.setting.values || {};
+
+ abp.setting.get = function (name) {
+ return abp.setting.values[name];
+ };
+
+ abp.setting.getBoolean = function (name) {
+ var value = abp.setting.get(name);
+ return value == 'true' || value == 'True';
+ };
+
+ abp.setting.getInt = function (name) {
+ return parseInt(abp.setting.values[name]);
+ };
+
+ /* NOTIFICATION *********************************************/
+ //Defines Notification API, not implements it
+
+ abp.notify = abp.notify || {};
+
+ abp.notify.success = function (message, title, options) {
+ abp.log.warn('abp.notify.success is not implemented!');
+ };
+
+ abp.notify.info = function (message, title, options) {
+ abp.log.warn('abp.notify.info is not implemented!');
+ };
+
+ abp.notify.warn = function (message, title, options) {
+ abp.log.warn('abp.notify.warn is not implemented!');
+ };
+
+ abp.notify.error = function (message, title, options) {
+ abp.log.warn('abp.notify.error is not implemented!');
+ };
+
+ /* MESSAGE **************************************************/
+ //Defines Message API, not implements it
+
+ abp.message = abp.message || {};
+
+ abp.message._showMessage = function (message, title) {
+ alert((title || '') + ' ' + message);
+ };
+
+ abp.message.info = function (message, title) {
+ abp.log.warn('abp.message.info is not implemented!');
+ return abp.message._showMessage(message, title);
+ };
+
+ abp.message.success = function (message, title) {
+ abp.log.warn('abp.message.success is not implemented!');
+ return abp.message._showMessage(message, title);
+ };
+
+ abp.message.warn = function (message, title) {
+ abp.log.warn('abp.message.warn is not implemented!');
+ return abp.message._showMessage(message, title);
+ };
+
+ abp.message.error = function (message, title) {
+ abp.log.warn('abp.message.error is not implemented!');
+ return abp.message._showMessage(message, title);
+ };
+
+ abp.message.confirm = function (message, titleOrCallback, callback) {
+ abp.log.warn('abp.message.confirm is not properly implemented!');
+
+ if (titleOrCallback && !(typeof titleOrCallback == 'string')) {
+ callback = titleOrCallback;
+ }
+
+ var result = confirm(message);
+ callback && callback(result);
+ };
+
+ /* UI *******************************************************/
+
+ abp.ui = abp.ui || {};
+
+ /* UI BLOCK */
+ //Defines UI Block API and implements basically
+
+ var $abpBlockArea = document.createElement('div');
+ $abpBlockArea.classList.add('abp-block-area');
+
+ /* opts: { //Can be an object with options or a string for query a selector
+ * elm: a query selector (optional - default: document.body)
+ * busy: boolean (optional - default: false)
+ * promise: A promise with always or finally handler (optional - auto unblocks the ui if provided)
+ * }
+ */
+ abp.ui.block = function (opts) {
+ if (!opts) {
+ opts = {};
+ } else if (typeof opts == 'string') {
+ opts = {
+ elm: opts
+ };
+ }
+
+ var $elm = document.querySelector(opts.elm) || document.body;
+
+ if (opts.busy) {
+ $abpBlockArea.classList.add('abp-block-area-busy');
+ } else {
+ $abpBlockArea.classList.remove('abp-block-area-busy');
+ }
+
+ if (document.querySelector(opts.elm)) {
+ $abpBlockArea.style.position = 'absolute';
+ } else {
+ $abpBlockArea.style.position = 'fixed';
+ }
+
+ $elm.appendChild($abpBlockArea);
+
+ if (opts.promise) {
+ if (opts.promise.always) { //jQuery.Deferred style
+ opts.promise.always(function () {
+ abp.ui.unblock({
+ $elm: opts.elm
+ });
+ });
+ } else if (opts.promise['finally']) { //Q style
+ opts.promise['finally'](function () {
+ abp.ui.unblock({
+ $elm: opts.elm
+ });
+ });
+ }
+ }
+ };
+
+ /* opts: {
+ *
+ * }
+ */
+ abp.ui.unblock = function (opts) {
+ var element = document.querySelector('.abp-block-area');
+ if (element) {
+ element.classList.add('abp-block-area-disappearing');
+ setTimeout(function () {
+ if (element) {
+ element.classList.remove('abp-block-area-disappearing');
+ element.parentElement.removeChild(element);
+ }
+ }, 250);
+ }
+ };
+
+ /* UI BUSY */
+ //Defines UI Busy API, not implements it
+
+ abp.ui.setBusy = function (opts) {
+ if (!opts) {
+ opts = {
+ busy: true
+ };
+ } else if (typeof opts == 'string') {
+ opts = {
+ elm: opts,
+ busy: true
+ };
+ }
+
+ abp.ui.block(opts);
+ };
+
+ abp.ui.clearBusy = function (opts) {
+ abp.ui.unblock(opts);
+ };
+
+ /* SIMPLE EVENT BUS *****************************************/
+
+ abp.event = (function () {
+
+ var _callbacks = {};
+
+ var on = function (eventName, callback) {
+ if (!_callbacks[eventName]) {
+ _callbacks[eventName] = [];
+ }
+
+ _callbacks[eventName].push(callback);
+ };
+
+ var off = function (eventName, callback) {
+ var callbacks = _callbacks[eventName];
+ if (!callbacks) {
+ return;
+ }
+
+ var index = -1;
+ for (var i = 0; i < callbacks.length; i++) {
+ if (callbacks[i] === callback) {
+ index = i;
+ break;
+ }
+ }
+
+ if (index < 0) {
+ return;
+ }
+
+ _callbacks[eventName].splice(index, 1);
+ };
+
+ var trigger = function (eventName) {
+ var callbacks = _callbacks[eventName];
+ if (!callbacks || !callbacks.length) {
+ return;
+ }
+
+ var args = Array.prototype.slice.call(arguments, 1);
+ for (var i = 0; i < callbacks.length; i++) {
+ callbacks[i].apply(this, args);
+ }
+ };
+
+ // Public interface ///////////////////////////////////////////////////
+
+ return {
+ on: on,
+ off: off,
+ trigger: trigger
+ };
+ })();
+
+
+ /* UTILS ***************************************************/
+
+ abp.utils = abp.utils || {};
+
+ /* Creates a name namespace.
+ * Example:
+ * var taskService = abp.utils.createNamespace(abp, 'services.task');
+ * taskService will be equal to abp.services.task
+ * first argument (root) must be defined first
+ ************************************************************/
+ abp.utils.createNamespace = function (root, ns) {
+ var parts = ns.split('.');
+ for (var i = 0; i < parts.length; i++) {
+ if (typeof root[parts[i]] == 'undefined') {
+ root[parts[i]] = {};
+ }
+
+ root = root[parts[i]];
+ }
+
+ return root;
+ };
+
+ /* Find and replaces a string (search) to another string (replacement) in
+ * given string (str).
+ * Example:
+ * abp.utils.replaceAll('This is a test string', 'is', 'X') = 'ThX X a test string'
+ ************************************************************/
+ abp.utils.replaceAll = function (str, search, replacement) {
+ var fix = search.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
+ return str.replace(new RegExp(fix, 'g'), replacement);
+ };
+
+ /* Formats a string just like string.format in C#.
+ * Example:
+ * abp.utils.formatString('Hello {0}','Tuana') = 'Hello Tuana'
+ ************************************************************/
+ abp.utils.formatString = function () {
+ if (arguments.length < 1) {
+ return null;
+ }
+
+ var str = arguments[0];
+
+ for (var i = 1; i < arguments.length; i++) {
+ var placeHolder = '{' + (i - 1) + '}';
+ str = abp.utils.replaceAll(str, placeHolder, arguments[i]);
+ }
+
+ return str;
+ };
+
+ abp.utils.toPascalCase = function (str) {
+ if (!str || !str.length) {
+ return str;
+ }
+
+ if (str.length === 1) {
+ return str.charAt(0).toUpperCase();
+ }
+
+ return str.charAt(0).toUpperCase() + str.substr(1);
+ }
+
+ abp.utils.toCamelCase = function (str) {
+ if (!str || !str.length) {
+ return str;
+ }
+
+ if (str.length === 1) {
+ return str.charAt(0).toLowerCase();
+ }
+
+ return str.charAt(0).toLowerCase() + str.substr(1);
+ }
+
+ abp.utils.truncateString = function (str, maxLength) {
+ if (!str || !str.length || str.length <= maxLength) {
+ return str;
+ }
+
+ return str.substr(0, maxLength);
+ };
+
+ abp.utils.truncateStringWithPostfix = function (str, maxLength, postfix) {
+ postfix = postfix || '...';
+
+ if (!str || !str.length || str.length <= maxLength) {
+ return str;
+ }
+
+ if (maxLength <= postfix.length) {
+ return postfix.substr(0, maxLength);
+ }
+
+ return str.substr(0, maxLength - postfix.length) + postfix;
+ };
+
+ abp.utils.isFunction = function (obj) {
+ return !!(obj && obj.constructor && obj.call && obj.apply);
+ };
+
+ /**
+ * parameterInfos should be an array of { name, value } objects
+ * where name is query string parameter name and value is it's value.
+ * includeQuestionMark is true by default.
+ */
+ abp.utils.buildQueryString = function (parameterInfos, includeQuestionMark) {
+ if (includeQuestionMark === undefined) {
+ includeQuestionMark = true;
+ }
+
+ var qs = '';
+
+ function addSeperator() {
+ if (!qs.length) {
+ if (includeQuestionMark) {
+ qs = qs + '?';
+ }
+ } else {
+ qs = qs + '&';
+ }
+ }
+
+ for (var i = 0; i < parameterInfos.length; ++i) {
+ var parameterInfo = parameterInfos[i];
+ if (parameterInfo.value === undefined) {
+ continue;
+ }
+
+ if (parameterInfo.value === null) {
+ parameterInfo.value = '';
+ }
+
+ addSeperator();
+
+ if (parameterInfo.value.toJSON && typeof parameterInfo.value.toJSON === "function") {
+ qs = qs + parameterInfo.name + '=' + encodeURIComponent(parameterInfo.value.toJSON());
+ } else if (Array.isArray(parameterInfo.value) && parameterInfo.value.length) {
+ for (var j = 0; j < parameterInfo.value.length; j++) {
+ if (j > 0) {
+ addSeperator();
+ }
+
+ qs = qs + parameterInfo.name + '[' + j + ']=' + encodeURIComponent(parameterInfo.value[j]);
+ }
+ } else {
+ qs = qs + parameterInfo.name + '=' + encodeURIComponent(parameterInfo.value);
+ }
+ }
+
+ return qs;
+ }
+
+ /**
+ * Sets a cookie value for given key.
+ * This is a simple implementation created to be used by ABP.
+ * Please use a complete cookie library if you need.
+ * @param {string} key
+ * @param {string} value
+ * @param {Date} expireDate (optional). If not specified the cookie will expire at the end of session.
+ * @param {string} path (optional)
+ */
+ abp.utils.setCookieValue = function (key, value, expireDate, path) {
+ var cookieValue = encodeURIComponent(key) + '=';
+
+ if (value) {
+ cookieValue = cookieValue + encodeURIComponent(value);
+ }
+
+ if (expireDate) {
+ cookieValue = cookieValue + "; expires=" + expireDate.toUTCString();
+ }
+
+ if (path) {
+ cookieValue = cookieValue + "; path=" + path;
+ }
+
+ document.cookie = cookieValue;
+ };
+
+ /**
+ * Gets a cookie with given key.
+ * This is a simple implementation created to be used by ABP.
+ * Please use a complete cookie library if you need.
+ * @param {string} key
+ * @returns {string} Cookie value or null
+ */
+ abp.utils.getCookieValue = function (key) {
+ var equalities = document.cookie.split('; ');
+ for (var i = 0; i < equalities.length; i++) {
+ if (!equalities[i]) {
+ continue;
+ }
+
+ var splitted = equalities[i].split('=');
+ if (splitted.length != 2) {
+ continue;
+ }
+
+ if (decodeURIComponent(splitted[0]) === key) {
+ return decodeURIComponent(splitted[1] || '');
+ }
+ }
+
+ return null;
+ };
+
+ /**
+ * Deletes cookie for given key.
+ * This is a simple implementation created to be used by ABP.
+ * Please use a complete cookie library if you need.
+ * @param {string} key
+ * @param {string} path (optional)
+ */
+ abp.utils.deleteCookie = function (key, path) {
+ var cookieValue = encodeURIComponent(key) + '=';
+
+ cookieValue = cookieValue + "; expires=" + (new Date(new Date().getTime() - 86400000)).toUTCString();
+
+ if (path) {
+ cookieValue = cookieValue + "; path=" + path;
+ }
+
+ document.cookie = cookieValue;
+ }
+
+ /* SECURITY ***************************************/
+ abp.security = abp.security || {};
+ abp.security.antiForgery = abp.security.antiForgery || {};
+
+ abp.security.antiForgery.tokenCookieName = 'XSRF-TOKEN';
+ abp.security.antiForgery.tokenHeaderName = 'X-XSRF-TOKEN';
+
+ abp.security.antiForgery.getToken = function () {
+ return abp.utils.getCookieValue(abp.security.antiForgery.tokenCookieName);
+ };
+
})();
\ No newline at end of file
diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/wwwroot/libs/abp/jquery/abp.jquery.js b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/wwwroot/libs/abp/jquery/abp.jquery.js
index 6e2ee001b8..e6aff047f7 100644
--- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/wwwroot/libs/abp/jquery/abp.jquery.js
+++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/wwwroot/libs/abp/jquery/abp.jquery.js
@@ -1,393 +1,393 @@
-var abp = abp || {};
-(function($) {
-
- if (!$) {
- throw "abp/jquery library requires the jquery library included to the page!";
- }
-
- // ABP CORE OVERRIDES /////////////////////////////////////////////////////
-
- abp.message._showMessage = function (message, title) {
- alert((title || '') + ' ' + message);
-
- return $.Deferred(function ($dfd) {
- $dfd.resolve();
- });
- };
-
- abp.message.confirm = function (message, titleOrCallback, callback) {
- if (titleOrCallback && !(typeof titleOrCallback == 'string')) {
- callback = titleOrCallback;
- }
-
- var result = confirm(message);
- callback && callback(result);
-
- return $.Deferred(function ($dfd) {
- $dfd.resolve(result);
- });
- };
-
- abp.utils.isFunction = function (obj) {
- return $.isFunction(obj);
- };
-
- // JQUERY EXTENSIONS //////////////////////////////////////////////////////
-
- $.fn.findWithSelf = function (selector) {
- return this.filter(selector).add(this.find(selector));
- };
-
- // DOM ////////////////////////////////////////////////////////////////////
-
- abp.dom = abp.dom || {};
-
- abp.dom.onNodeAdded = function (callback) {
- abp.event.on('abp.dom.nodeAdded', callback);
- };
-
- abp.dom.onNodeRemoved = function (callback) {
- abp.event.on('abp.dom.nodeRemoved', callback);
- };
-
- var mutationObserverCallback = function (mutationsList) {
- for (var i = 0; i < mutationsList.length; i++) {
- var mutation = mutationsList[i];
- if (mutation.type === 'childList') {
- if (mutation.addedNodes && mutation.removedNodes.length) {
- for (var k = 0; k < mutation.removedNodes.length; k++) {
- abp.event.trigger(
- 'abp.dom.nodeRemoved',
- {
- $el: $(mutation.removedNodes[k])
- }
- );
- }
- }
-
- if (mutation.addedNodes && mutation.addedNodes.length) {
- for (var j = 0; j < mutation.addedNodes.length; j++) {
- abp.event.trigger(
- 'abp.dom.nodeAdded',
- {
- $el: $(mutation.addedNodes[j])
- }
- );
- }
- }
- }
- }
- };
-
- new MutationObserver(mutationObserverCallback).observe(
- $('body')[0],
- {
- subtree: true,
- childList: true
- }
- );
-
- // AJAX ///////////////////////////////////////////////////////////////////
-
- abp.ajax = function (userOptions) {
- userOptions = userOptions || {};
-
- var options = $.extend(true, {}, abp.ajax.defaultOpts, userOptions);
-
- options.success = undefined;
- options.error = undefined;
-
- return $.Deferred(function ($dfd) {
- $.ajax(options)
- .done(function (data, textStatus, jqXHR) {
- $dfd.resolve(data);
- userOptions.success && userOptions.success(data);
- }).fail(function (jqXHR) {
- if (jqXHR.getResponseHeader('_AbpErrorFormat') === 'true') {
- abp.ajax.handleAbpErrorResponse(jqXHR, userOptions, $dfd);
- } else {
- abp.ajax.handleNonAbpErrorResponse(jqXHR, userOptions, $dfd);
- }
- });
- });
- };
-
- $.extend(abp.ajax, {
- defaultOpts: {
- dataType: 'json',
- type: 'POST',
- contentType: 'application/json',
- headers: {
- 'X-Requested-With': 'XMLHttpRequest'
- }
- },
-
- defaultError: {
- message: 'An error has occurred!',
- details: 'Error detail not sent by server.'
- },
-
- defaultError401: {
- message: 'You are not authenticated!',
- details: 'You should be authenticated (sign in) in order to perform this operation.'
- },
-
- defaultError403: {
- message: 'You are not authorized!',
- details: 'You are not allowed to perform this operation.'
- },
-
- defaultError404: {
- message: 'Resource not found!',
- details: 'The resource requested could not found on the server.'
- },
-
- logError: function (error) {
- abp.log.error(error);
- },
-
- showError: function (error) {
- if (error.details) {
- return abp.message.error(error.details, error.message);
- } else {
- return abp.message.error(error.message || abp.ajax.defaultError.message);
- }
- },
-
- handleTargetUrl: function (targetUrl) {
- if (!targetUrl) {
- location.href = abp.appPath;
- } else {
- location.href = targetUrl;
- }
- },
-
- handleErrorStatusCode: function (status) {
- switch (status) {
- case 401:
- abp.ajax.handleUnAuthorizedRequest(
- abp.ajax.showError(abp.ajax.defaultError401),
- abp.appPath
- );
- break;
- case 403:
- abp.ajax.showError(abp.ajax.defaultError403);
- break;
- case 404:
- abp.ajax.showError(abp.ajax.defaultError404);
- break;
- default:
- abp.ajax.showError(abp.ajax.defaultError);
- break;
- }
- },
-
- handleNonAbpErrorResponse: function (jqXHR, userOptions, $dfd) {
- if (userOptions.abpHandleError !== false) {
- abp.ajax.handleErrorStatusCode(jqXHR.status);
- }
-
- $dfd.reject.apply(this, arguments);
- userOptions.error && userOptions.error.apply(this, arguments);
- },
-
- handleAbpErrorResponse: function (jqXHR, userOptions, $dfd) {
- var messagePromise = null;
-
- if (userOptions.abpHandleError !== false) {
- messagePromise = abp.ajax.showError(jqXHR.responseJSON.error);
- }
-
- abp.ajax.logError(jqXHR.responseJSON.error);
-
- $dfd && $dfd.reject(jqXHR.responseJSON.error, jqXHR);
- userOptions.error && userOptions.error(jqXHR.responseJSON.error, jqXHR);
-
- if (jqXHR.status === 401 && userOptions.abpHandleError !== false) {
- abp.ajax.handleUnAuthorizedRequest(messagePromise);
- }
- },
-
- handleUnAuthorizedRequest: function (messagePromise, targetUrl) {
- if (messagePromise) {
- messagePromise.done(function () {
- abp.ajax.handleTargetUrl(targetUrl);
- });
- } else {
- abp.ajax.handleTargetUrl(targetUrl);
- }
- },
-
- blockUI: function (options) {
- if (options.blockUI) {
- if (options.blockUI === true) { //block whole page
- abp.ui.setBusy();
- } else { //block an element
- abp.ui.setBusy(options.blockUI);
- }
- }
- },
-
- unblockUI: function (options) {
- if (options.blockUI) {
- if (options.blockUI === true) { //unblock whole page
- abp.ui.clearBusy();
- } else { //unblock an element
- abp.ui.clearBusy(options.blockUI);
- }
- }
- },
-
- ajaxSendHandler: function (event, request, settings) {
- var token = abp.security.antiForgery.getToken();
- if (!token) {
- return;
- }
-
- if (!settings.headers || settings.headers[abp.security.antiForgery.tokenHeaderName] === undefined) {
- request.setRequestHeader(abp.security.antiForgery.tokenHeaderName, token);
- }
- }
- });
-
- $(document).ajaxSend(function (event, request, settings) {
- return abp.ajax.ajaxSendHandler(event, request, settings);
- });
-
- abp.event.on('abp.configurationInitialized', function () {
- var l = abp.localization.getResource('AbpUi');
-
- abp.ajax.defaultError.message = l('DefaultErrorMessage');
- abp.ajax.defaultError.details = l('DefaultErrorMessageDetail');
- abp.ajax.defaultError401.message = l('DefaultErrorMessage401');
- abp.ajax.defaultError401.details = l('DefaultErrorMessage401Detail');
- abp.ajax.defaultError403.message = l('DefaultErrorMessage403');
- abp.ajax.defaultError403.details = l('DefaultErrorMessage403Detail');
- abp.ajax.defaultError404.message = l('DefaultErrorMessage404');
- abp.ajax.defaultError404.details = l('DefaultErrorMessage404Detail');
- });
-
- // RESOURCE LOADER ////////////////////////////////////////////////////////
-
- /* UrlStates enum */
- var UrlStates = {
- LOADING: 'LOADING',
- LOADED: 'LOADED',
- FAILED: 'FAILED'
- };
-
- /* UrlInfo class */
- function UrlInfo(url) {
- this.url = url;
- this.state = UrlStates.LOADING;
- this.loadCallbacks = [];
- this.failCallbacks = [];
- }
-
- UrlInfo.prototype.succeed = function () {
- this.state = UrlStates.LOADED;
- for (var i = 0; i < this.loadCallbacks.length; i++) {
- this.loadCallbacks[i]();
- }
- };
-
- UrlInfo.prototype.failed = function () {
- this.state = UrlStates.FAILED;
- for (var i = 0; i < this.failCallbacks.length; i++) {
- this.failCallbacks[i]();
- }
- };
-
- UrlInfo.prototype.handleCallbacks = function (loadCallback, failCallback) {
- switch (this.state) {
- case UrlStates.LOADED:
- loadCallback && loadCallback();
- break;
- case UrlStates.FAILED:
- failCallback && failCallback();
- break;
- case UrlStates.LOADING:
- this.addCallbacks(loadCallback, failCallback);
- break;
- }
- };
-
- UrlInfo.prototype.addCallbacks = function (loadCallback, failCallback) {
- loadCallback && this.loadCallbacks.push(loadCallback);
- failCallback && this.failCallbacks.push(failCallback);
- };
-
- /* ResourceLoader API */
-
- abp.ResourceLoader = (function () {
-
- var _urlInfos = {};
-
- function getCacheKey(url) {
- return url;
- }
-
- function appendTimeToUrl(url) {
-
- if (url.indexOf('?') < 0) {
- url += '?';
- } else {
- url += '&';
- }
-
- url += '_=' + new Date().getTime();
-
- return url;
- }
-
- var _loadFromUrl = function (url, loadCallback, failCallback, serverLoader) {
-
- var cacheKey = getCacheKey(url);
-
- var urlInfo = _urlInfos[cacheKey];
-
- if (urlInfo) {
- urlInfo.handleCallbacks(loadCallback, failCallback);
- return;
- }
-
- _urlInfos[cacheKey] = urlInfo = new UrlInfo(url);
- urlInfo.addCallbacks(loadCallback, failCallback);
-
- serverLoader(urlInfo);
- };
-
- var _loadScript = function (url, loadCallback, failCallback) {
- _loadFromUrl(url, loadCallback, failCallback, function (urlInfo) {
- $.get({
- url: url,
- dataType: 'text'
- })
- .done(function (script) {
- $.globalEval(script);
- urlInfo.succeed();
- })
- .fail(function () {
- urlInfo.failed();
- });
- });
- };
-
- var _loadStyle = function (url) {
- _loadFromUrl(url, undefined, undefined, function (urlInfo) {
-
- $('', {
- rel: 'stylesheet',
- type: 'text/css',
- href: appendTimeToUrl(url)
- }).appendTo('head');
- });
- };
-
- return {
- loadScript: _loadScript,
- loadStyle: _loadStyle
- }
- })();
-
+var abp = abp || {};
+(function($) {
+
+ if (!$) {
+ throw "abp/jquery library requires the jquery library included to the page!";
+ }
+
+ // ABP CORE OVERRIDES /////////////////////////////////////////////////////
+
+ abp.message._showMessage = function (message, title) {
+ alert((title || '') + ' ' + message);
+
+ return $.Deferred(function ($dfd) {
+ $dfd.resolve();
+ });
+ };
+
+ abp.message.confirm = function (message, titleOrCallback, callback) {
+ if (titleOrCallback && !(typeof titleOrCallback == 'string')) {
+ callback = titleOrCallback;
+ }
+
+ var result = confirm(message);
+ callback && callback(result);
+
+ return $.Deferred(function ($dfd) {
+ $dfd.resolve(result);
+ });
+ };
+
+ abp.utils.isFunction = function (obj) {
+ return $.isFunction(obj);
+ };
+
+ // JQUERY EXTENSIONS //////////////////////////////////////////////////////
+
+ $.fn.findWithSelf = function (selector) {
+ return this.filter(selector).add(this.find(selector));
+ };
+
+ // DOM ////////////////////////////////////////////////////////////////////
+
+ abp.dom = abp.dom || {};
+
+ abp.dom.onNodeAdded = function (callback) {
+ abp.event.on('abp.dom.nodeAdded', callback);
+ };
+
+ abp.dom.onNodeRemoved = function (callback) {
+ abp.event.on('abp.dom.nodeRemoved', callback);
+ };
+
+ var mutationObserverCallback = function (mutationsList) {
+ for (var i = 0; i < mutationsList.length; i++) {
+ var mutation = mutationsList[i];
+ if (mutation.type === 'childList') {
+ if (mutation.addedNodes && mutation.removedNodes.length) {
+ for (var k = 0; k < mutation.removedNodes.length; k++) {
+ abp.event.trigger(
+ 'abp.dom.nodeRemoved',
+ {
+ $el: $(mutation.removedNodes[k])
+ }
+ );
+ }
+ }
+
+ if (mutation.addedNodes && mutation.addedNodes.length) {
+ for (var j = 0; j < mutation.addedNodes.length; j++) {
+ abp.event.trigger(
+ 'abp.dom.nodeAdded',
+ {
+ $el: $(mutation.addedNodes[j])
+ }
+ );
+ }
+ }
+ }
+ }
+ };
+
+ new MutationObserver(mutationObserverCallback).observe(
+ $('body')[0],
+ {
+ subtree: true,
+ childList: true
+ }
+ );
+
+ // AJAX ///////////////////////////////////////////////////////////////////
+
+ abp.ajax = function (userOptions) {
+ userOptions = userOptions || {};
+
+ var options = $.extend(true, {}, abp.ajax.defaultOpts, userOptions);
+
+ options.success = undefined;
+ options.error = undefined;
+
+ return $.Deferred(function ($dfd) {
+ $.ajax(options)
+ .done(function (data, textStatus, jqXHR) {
+ $dfd.resolve(data);
+ userOptions.success && userOptions.success(data);
+ }).fail(function (jqXHR) {
+ if (jqXHR.getResponseHeader('_AbpErrorFormat') === 'true') {
+ abp.ajax.handleAbpErrorResponse(jqXHR, userOptions, $dfd);
+ } else {
+ abp.ajax.handleNonAbpErrorResponse(jqXHR, userOptions, $dfd);
+ }
+ });
+ });
+ };
+
+ $.extend(abp.ajax, {
+ defaultOpts: {
+ dataType: 'json',
+ type: 'POST',
+ contentType: 'application/json',
+ headers: {
+ 'X-Requested-With': 'XMLHttpRequest'
+ }
+ },
+
+ defaultError: {
+ message: 'An error has occurred!',
+ details: 'Error detail not sent by server.'
+ },
+
+ defaultError401: {
+ message: 'You are not authenticated!',
+ details: 'You should be authenticated (sign in) in order to perform this operation.'
+ },
+
+ defaultError403: {
+ message: 'You are not authorized!',
+ details: 'You are not allowed to perform this operation.'
+ },
+
+ defaultError404: {
+ message: 'Resource not found!',
+ details: 'The resource requested could not found on the server.'
+ },
+
+ logError: function (error) {
+ abp.log.error(error);
+ },
+
+ showError: function (error) {
+ if (error.details) {
+ return abp.message.error(error.details, error.message);
+ } else {
+ return abp.message.error(error.message || abp.ajax.defaultError.message);
+ }
+ },
+
+ handleTargetUrl: function (targetUrl) {
+ if (!targetUrl) {
+ location.href = abp.appPath;
+ } else {
+ location.href = targetUrl;
+ }
+ },
+
+ handleErrorStatusCode: function (status) {
+ switch (status) {
+ case 401:
+ abp.ajax.handleUnAuthorizedRequest(
+ abp.ajax.showError(abp.ajax.defaultError401),
+ abp.appPath
+ );
+ break;
+ case 403:
+ abp.ajax.showError(abp.ajax.defaultError403);
+ break;
+ case 404:
+ abp.ajax.showError(abp.ajax.defaultError404);
+ break;
+ default:
+ abp.ajax.showError(abp.ajax.defaultError);
+ break;
+ }
+ },
+
+ handleNonAbpErrorResponse: function (jqXHR, userOptions, $dfd) {
+ if (userOptions.abpHandleError !== false) {
+ abp.ajax.handleErrorStatusCode(jqXHR.status);
+ }
+
+ $dfd.reject.apply(this, arguments);
+ userOptions.error && userOptions.error.apply(this, arguments);
+ },
+
+ handleAbpErrorResponse: function (jqXHR, userOptions, $dfd) {
+ var messagePromise = null;
+
+ if (userOptions.abpHandleError !== false) {
+ messagePromise = abp.ajax.showError(jqXHR.responseJSON.error);
+ }
+
+ abp.ajax.logError(jqXHR.responseJSON.error);
+
+ $dfd && $dfd.reject(jqXHR.responseJSON.error, jqXHR);
+ userOptions.error && userOptions.error(jqXHR.responseJSON.error, jqXHR);
+
+ if (jqXHR.status === 401 && userOptions.abpHandleError !== false) {
+ abp.ajax.handleUnAuthorizedRequest(messagePromise);
+ }
+ },
+
+ handleUnAuthorizedRequest: function (messagePromise, targetUrl) {
+ if (messagePromise) {
+ messagePromise.done(function () {
+ abp.ajax.handleTargetUrl(targetUrl);
+ });
+ } else {
+ abp.ajax.handleTargetUrl(targetUrl);
+ }
+ },
+
+ blockUI: function (options) {
+ if (options.blockUI) {
+ if (options.blockUI === true) { //block whole page
+ abp.ui.setBusy();
+ } else { //block an element
+ abp.ui.setBusy(options.blockUI);
+ }
+ }
+ },
+
+ unblockUI: function (options) {
+ if (options.blockUI) {
+ if (options.blockUI === true) { //unblock whole page
+ abp.ui.clearBusy();
+ } else { //unblock an element
+ abp.ui.clearBusy(options.blockUI);
+ }
+ }
+ },
+
+ ajaxSendHandler: function (event, request, settings) {
+ var token = abp.security.antiForgery.getToken();
+ if (!token) {
+ return;
+ }
+
+ if (!settings.headers || settings.headers[abp.security.antiForgery.tokenHeaderName] === undefined) {
+ request.setRequestHeader(abp.security.antiForgery.tokenHeaderName, token);
+ }
+ }
+ });
+
+ $(document).ajaxSend(function (event, request, settings) {
+ return abp.ajax.ajaxSendHandler(event, request, settings);
+ });
+
+ abp.event.on('abp.configurationInitialized', function () {
+ var l = abp.localization.getResource('AbpUi');
+
+ abp.ajax.defaultError.message = l('DefaultErrorMessage');
+ abp.ajax.defaultError.details = l('DefaultErrorMessageDetail');
+ abp.ajax.defaultError401.message = l('DefaultErrorMessage401');
+ abp.ajax.defaultError401.details = l('DefaultErrorMessage401Detail');
+ abp.ajax.defaultError403.message = l('DefaultErrorMessage403');
+ abp.ajax.defaultError403.details = l('DefaultErrorMessage403Detail');
+ abp.ajax.defaultError404.message = l('DefaultErrorMessage404');
+ abp.ajax.defaultError404.details = l('DefaultErrorMessage404Detail');
+ });
+
+ // RESOURCE LOADER ////////////////////////////////////////////////////////
+
+ /* UrlStates enum */
+ var UrlStates = {
+ LOADING: 'LOADING',
+ LOADED: 'LOADED',
+ FAILED: 'FAILED'
+ };
+
+ /* UrlInfo class */
+ function UrlInfo(url) {
+ this.url = url;
+ this.state = UrlStates.LOADING;
+ this.loadCallbacks = [];
+ this.failCallbacks = [];
+ }
+
+ UrlInfo.prototype.succeed = function () {
+ this.state = UrlStates.LOADED;
+ for (var i = 0; i < this.loadCallbacks.length; i++) {
+ this.loadCallbacks[i]();
+ }
+ };
+
+ UrlInfo.prototype.failed = function () {
+ this.state = UrlStates.FAILED;
+ for (var i = 0; i < this.failCallbacks.length; i++) {
+ this.failCallbacks[i]();
+ }
+ };
+
+ UrlInfo.prototype.handleCallbacks = function (loadCallback, failCallback) {
+ switch (this.state) {
+ case UrlStates.LOADED:
+ loadCallback && loadCallback();
+ break;
+ case UrlStates.FAILED:
+ failCallback && failCallback();
+ break;
+ case UrlStates.LOADING:
+ this.addCallbacks(loadCallback, failCallback);
+ break;
+ }
+ };
+
+ UrlInfo.prototype.addCallbacks = function (loadCallback, failCallback) {
+ loadCallback && this.loadCallbacks.push(loadCallback);
+ failCallback && this.failCallbacks.push(failCallback);
+ };
+
+ /* ResourceLoader API */
+
+ abp.ResourceLoader = (function () {
+
+ var _urlInfos = {};
+
+ function getCacheKey(url) {
+ return url;
+ }
+
+ function appendTimeToUrl(url) {
+
+ if (url.indexOf('?') < 0) {
+ url += '?';
+ } else {
+ url += '&';
+ }
+
+ url += '_=' + new Date().getTime();
+
+ return url;
+ }
+
+ var _loadFromUrl = function (url, loadCallback, failCallback, serverLoader) {
+
+ var cacheKey = getCacheKey(url);
+
+ var urlInfo = _urlInfos[cacheKey];
+
+ if (urlInfo) {
+ urlInfo.handleCallbacks(loadCallback, failCallback);
+ return;
+ }
+
+ _urlInfos[cacheKey] = urlInfo = new UrlInfo(url);
+ urlInfo.addCallbacks(loadCallback, failCallback);
+
+ serverLoader(urlInfo);
+ };
+
+ var _loadScript = function (url, loadCallback, failCallback) {
+ _loadFromUrl(url, loadCallback, failCallback, function (urlInfo) {
+ $.get({
+ url: url,
+ dataType: 'text'
+ })
+ .done(function (script) {
+ $.globalEval(script);
+ urlInfo.succeed();
+ })
+ .fail(function () {
+ urlInfo.failed();
+ });
+ });
+ };
+
+ var _loadStyle = function (url) {
+ _loadFromUrl(url, undefined, undefined, function (urlInfo) {
+
+ $('', {
+ rel: 'stylesheet',
+ type: 'text/css',
+ href: appendTimeToUrl(url)
+ }).appendTo('head');
+ });
+ };
+
+ return {
+ loadScript: _loadScript,
+ loadStyle: _loadStyle
+ }
+ })();
+
})(jQuery);
\ No newline at end of file
diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/yarn.lock b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/yarn.lock
index 7230736133..b3b0eb268b 100644
--- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/yarn.lock
+++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/yarn.lock
@@ -2,37 +2,37 @@
# yarn lockfile v1
-"@abp/aspnetcore.mvc.ui.theme.basic@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.basic/-/aspnetcore.mvc.ui.theme.basic-2.1.0.tgz#f815001bd856fb5cbdd0b736181f2401a1a7ec62"
- integrity sha512-ej6dhUo3H9w6bpBTpMhk3M6zbC3fVAVMm5yLSYlYJ0sQxjb9PqC02OgiJme0mkxCUMwPuHVSQLrMQbioXdZu3A==
+"@abp/aspnetcore.mvc.ui.theme.basic@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.basic/-/aspnetcore.mvc.ui.theme.basic-2.2.0.tgz#e7f4e57d2b17cc76388e9c56bc34d50c9658873b"
+ integrity sha512-S9GQ9YVg4DWrgjujwiXBER6KqdqW5nZ1Bmt+YEePn5gEoPvoVrh6ojthpHYRjBJtGFqBSzRAQ9eVZLebT22Ozg==
dependencies:
- "@abp/aspnetcore.mvc.ui.theme.shared" "^2.1.0"
+ "@abp/aspnetcore.mvc.ui.theme.shared" "^2.2.0"
-"@abp/aspnetcore.mvc.ui.theme.shared@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.shared/-/aspnetcore.mvc.ui.theme.shared-2.1.0.tgz#c2790241b5a44b9d6e4f65911a1b9d9e9104ed82"
- integrity sha512-dxC0P/b1T+QJmRrB8HoLM7/GkWblz/X5lLqgn583W7/OTYhvxIxszuRDy/XIEuS+fP6a9rcGvGu5jcKJEqe/xA==
- dependencies:
- "@abp/aspnetcore.mvc.ui" "^2.1.0"
- "@abp/bootstrap" "^2.1.0"
- "@abp/bootstrap-datepicker" "^2.1.0"
- "@abp/datatables.net-bs4" "^2.1.0"
- "@abp/font-awesome" "^2.1.0"
- "@abp/jquery-form" "^2.1.0"
- "@abp/jquery-validation-unobtrusive" "^2.1.0"
- "@abp/lodash" "^2.1.0"
- "@abp/luxon" "^2.1.0"
- "@abp/malihu-custom-scrollbar-plugin" "^2.1.0"
- "@abp/select2" "^2.1.0"
- "@abp/sweetalert" "^2.1.0"
- "@abp/timeago" "^2.1.0"
- "@abp/toastr" "^2.1.0"
-
-"@abp/aspnetcore.mvc.ui@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui/-/aspnetcore.mvc.ui-2.1.0.tgz#3c86f42e52af3151d2aee0ffdd1281014ea61054"
- integrity sha512-pKiKMBOPuLm7p44DW8DdbsVn5PY3NqGYkz6gf75uzxyWiVYyl2CM/bvX9w4Ie7Q969owENMLrBREN6ezWZ5ynA==
+"@abp/aspnetcore.mvc.ui.theme.shared@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.shared/-/aspnetcore.mvc.ui.theme.shared-2.2.0.tgz#e0df953853be2a184d323931573f9f98aebbaa62"
+ integrity sha512-urxziaCdvfEqN5cjiiM5f5dx2Yr+AoGqCJVCo0Okjl2dosdaj5DH4SBzMvKAaLXzo3Ep1h4b3Wvws4BThL/6rA==
+ dependencies:
+ "@abp/aspnetcore.mvc.ui" "^2.2.0"
+ "@abp/bootstrap" "^2.2.0"
+ "@abp/bootstrap-datepicker" "^2.2.0"
+ "@abp/datatables.net-bs4" "^2.2.0"
+ "@abp/font-awesome" "^2.2.0"
+ "@abp/jquery-form" "^2.2.0"
+ "@abp/jquery-validation-unobtrusive" "^2.2.0"
+ "@abp/lodash" "^2.2.0"
+ "@abp/luxon" "^2.2.0"
+ "@abp/malihu-custom-scrollbar-plugin" "^2.2.0"
+ "@abp/select2" "^2.2.0"
+ "@abp/sweetalert" "^2.2.0"
+ "@abp/timeago" "^2.2.0"
+ "@abp/toastr" "^2.2.0"
+
+"@abp/aspnetcore.mvc.ui@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui/-/aspnetcore.mvc.ui-2.2.0.tgz#b2cdd421eed09ec1d30ae85e14434b7efc094ade"
+ integrity sha512-IO/AjhJu+LUa9zOaT8JlEnV+Pcp9oQ3q9kTq8kmMakC35vTIyvBpB3nnykXIOytZSyjsBgFYB/uMxPgBOjWagg==
dependencies:
ansi-colors "^4.1.1"
extend-object "^1.0.0"
@@ -41,135 +41,135 @@
path "^0.12.7"
rimraf "^3.0.0"
-"@abp/bootstrap-datepicker@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/bootstrap-datepicker/-/bootstrap-datepicker-2.1.0.tgz#a0d71da15cb3d3cc02f9a390437a44db5e9f9ea1"
- integrity sha512-lkNI0iyefiXS2O5x9Ae9eJQLPXSQlOWDX7QhKnBHLR9JxjJEnhBUIIOylMltAIqtVDtjk2ikDyd3BAiyBdtB/w==
+"@abp/bootstrap-datepicker@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/bootstrap-datepicker/-/bootstrap-datepicker-2.2.0.tgz#a2f50b422824f18ed4b7e80be6852e2979119f8e"
+ integrity sha512-X9jT5mU42QFfVhOZdun7aEJUf3bMko6NsG3NFQVjqTqKH+iYGKfHPFpXD0gP/6Nb4KgZUdId8hSyQTZyOK2JEA==
dependencies:
bootstrap-datepicker "^1.9.0"
-"@abp/bootstrap@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/bootstrap/-/bootstrap-2.1.0.tgz#7ce15d4effac0e0991a3520c4666c6cb17a3fef2"
- integrity sha512-1xQjqu6shCgzd1FI94y5AIXGIhBlZEoRrOhaT84j/2KzYiDvhP+LAqQjMgqlQmBLs6vMckpxtf5thxKTMXvtOw==
+"@abp/bootstrap@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/bootstrap/-/bootstrap-2.2.0.tgz#16e41d3432117bbcd9012c6f735c49c543255879"
+ integrity sha512-aRmluu6SkIl+JgCzSSJZrDPkYr6WWaQdY0iJAOz6NHtffa7Aumh1IUOrLVKL0T1pQn6QKs0Z7JDGyYMdh1HPkQ==
dependencies:
- "@abp/core" "^2.1.0"
+ "@abp/core" "^2.2.0"
bootstrap "^4.3.1"
-"@abp/core@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/core/-/core-2.1.0.tgz#0cd2850f029df1d18517b8e74c70341972c37ed7"
- integrity sha512-1wnRo00hWncZWSakaEXm388XhhbKXDVkWDIdaT3kyQpvp3kX1lFx7I5iiZiwIeULwZRF9mi6HV6iHEze58x0kQ==
+"@abp/core@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/core/-/core-2.2.0.tgz#4eea0a06458c90acb8566a11eb841fe65d15d256"
+ integrity sha512-tBGHa5CUr0ewT31g689RAfQ6Su2p4uyn2PzmrW/8lahBrvqkoCb41fkCDLQJkTY5rKPrEKZd/s9OoyOnS20DLg==
-"@abp/datatables.net-bs4@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/datatables.net-bs4/-/datatables.net-bs4-2.1.0.tgz#a0f36cf4e3ef96ae03aa4b9956fcb8b971c854cb"
- integrity sha512-93qc2rrGs+JKRPM/7UCasa5VmfswgYU8cv3Ybg5OKoaASODYUn06GChRFnd/mvqcDxw4+8gaqpC3U2ETZZI4pA==
+"@abp/datatables.net-bs4@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/datatables.net-bs4/-/datatables.net-bs4-2.2.0.tgz#c7cc49e889b295ae10fb24ed62b154ef79ffc85a"
+ integrity sha512-zjJRPqOCWPfkHt1QztfFHKrsTE9o6Je2EpfA7hRMej2FlGbsMWUxOqx/btK1vjD6YIU8DtVDpIdj1WvPOITQ4Q==
dependencies:
- "@abp/datatables.net" "^2.1.0"
+ "@abp/datatables.net" "^2.2.0"
datatables.net-bs4 "^1.10.20"
-"@abp/datatables.net@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/datatables.net/-/datatables.net-2.1.0.tgz#674eaaa5b0948d7ee85b6605bfbad1a70f839aa7"
- integrity sha512-3ZM2p+JpHumxbIKlDP/LKLsfceMdttdTOL0ckIZCmAAgoIeKmAtuMoKcHTr8lj5mjgv4arBGvG9WVCemep2PEw==
+"@abp/datatables.net@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/datatables.net/-/datatables.net-2.2.0.tgz#22f9c7ca90c2d4af264483b4f8286b0feb7c3d52"
+ integrity sha512-L4MnpdloSWr/px3mvV75sxsxL68MyALB2LKdzCFMQWILCZVkxMmQb9LARINYIrn461Wrc+zbYWNEBD0MAq7flg==
dependencies:
- "@abp/core" "^2.1.0"
+ "@abp/core" "^2.2.0"
datatables.net "^1.10.20"
-"@abp/font-awesome@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/font-awesome/-/font-awesome-2.1.0.tgz#c2e628a1b9d0525e7d6950bf007feebcd1c490c8"
- integrity sha512-vlm1IQuQVfuCI2O1vphDd11zUEJ4/4PU0/0XI1YCpilse8fBg080CM3+G0kw6Erm/riznqhOJwBcfT+K+zqk8A==
+"@abp/font-awesome@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/font-awesome/-/font-awesome-2.2.0.tgz#2de39e3c6c3e8c30394d82861761a66c5b4032f0"
+ integrity sha512-RT06MYUGgaWBEpW5c7wUcfMXgxcOHWdX/C01LDO/j6iVoKBuBHOkkvcUoTWII068ECrLYOkj+RyT59dCKm8FFw==
dependencies:
- "@abp/core" "^2.1.0"
+ "@abp/core" "^2.2.0"
"@fortawesome/fontawesome-free" "^5.11.2"
-"@abp/jquery-form@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/jquery-form/-/jquery-form-2.1.0.tgz#285dbfdcf722cb0249f149e728cef7f788410c0c"
- integrity sha512-A17rjHTiBJBKYgrtDX5wIqnI89wNmo3bdK9NagL1wMFj4GvDyOZoRIDLqkopYQsc8zuPjqw4+1aa2TPiA+jtKg==
+"@abp/jquery-form@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/jquery-form/-/jquery-form-2.2.0.tgz#951653fac4013a7bbec065b5101b86d575e0eca7"
+ integrity sha512-ji44E3Ud0S3LNXn1WJ/Aw44qAIG7EITEW1KOe46oz+/awPpbiiA4dDDNleTvO2jI2/s8mNyR0bNanP6BUsc7tw==
dependencies:
- "@abp/jquery" "^2.1.0"
+ "@abp/jquery" "^2.2.0"
jquery-form "^4.2.2"
-"@abp/jquery-validation-unobtrusive@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-2.1.0.tgz#fc938775ced2efc686e7dd092d6ceff1ea947f36"
- integrity sha512-a8iBIj6amJ9rQNV+wxQUuEVh93M/c32kJcrwSEPWQcOoTj5gf0j8eKK9YvZaGokpylraz9mdGOwYQQuNj1sxEw==
+"@abp/jquery-validation-unobtrusive@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-2.2.0.tgz#6d39ba9f7bf026d1380796bf5dff76c8d16b42ce"
+ integrity sha512-SuS/dRRVz7ZR4HK/h9x0jRRVLPqXN0CPRGPdJZ1LJraXVEJ9/eDEGf1rMlHmEGt1FXXFTD01/zjisbweDE786w==
dependencies:
- "@abp/jquery-validation" "^2.1.0"
+ "@abp/jquery-validation" "^2.2.0"
jquery-validation-unobtrusive "^3.2.11"
-"@abp/jquery-validation@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/jquery-validation/-/jquery-validation-2.1.0.tgz#2bf1a31321cce3b2abe6d56c6112c52a8ecb28b6"
- integrity sha512-kU6/E+Xc3wHAUs+sGMAL8uozkXv65HnpksTwV4/+RK+D6iFU2EyNgCEFu7QGSwYZsV1/7YsCe2GD4ucBXIknbA==
+"@abp/jquery-validation@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/jquery-validation/-/jquery-validation-2.2.0.tgz#02bb8ba883e72c1204867ee4d1c1094bd91c4c4c"
+ integrity sha512-ypITQloO4iEDgqlA6qb3taj+7HMX0Cf/ACA2OvtrvOgJejx6J4wfrPjwuFZu1WWJ0xtc9yTdbovdcSVcQbIGaA==
dependencies:
- "@abp/jquery" "^2.1.0"
+ "@abp/jquery" "^2.2.0"
jquery-validation "^1.19.1"
-"@abp/jquery@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/jquery/-/jquery-2.1.0.tgz#fb5b4c9e8622cf46fee92f9f731d007d5fb200bb"
- integrity sha512-ZpfzRut5G611bBmuDdiT6BD0M7Rl1P6r8uNxUjdmFXYwFd8wD02ZhIcsX7qFHFkYERuXfcLrZh4rpw9G1DVCJg==
+"@abp/jquery@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/jquery/-/jquery-2.2.0.tgz#0e641b1109e78eff4c34331ca2b123b67cc30cbe"
+ integrity sha512-vEfRoFEAmDmRgSq98Y9EZExfQFSWtmjaHrodUu+MadTcRlnn+wHq8wwkKKxpj/eYtNc8aFORpyHMMH7uliAKxg==
dependencies:
- "@abp/core" "^2.1.0"
+ "@abp/core" "^2.2.0"
jquery "^3.4.1"
-"@abp/lodash@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/lodash/-/lodash-2.1.0.tgz#9fc9e6521e6284d607cedbff1a458fa324137c5c"
- integrity sha512-s1gTHhpbmEDDCsZeXb9MpClkDS4wH5R2IWPRZUlSPxo3gF0pvkx5ubdhYUEUgqy5QqWxE/+zUAjDc4x+cEriFQ==
+"@abp/lodash@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/lodash/-/lodash-2.2.0.tgz#af0a2ebcb28fd0a8c02da5026479d9370ed19719"
+ integrity sha512-wOMLqIpuq4a7ww7pB138G6YxBiTGBgxNW/IWGUiWbfgrr88cGPKIYYv/8O8mvr8PLNGjizNynuwQRj522yA3Dw==
dependencies:
- "@abp/core" "^2.1.0"
+ "@abp/core" "^2.2.0"
lodash "^4.17.15"
-"@abp/luxon@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/luxon/-/luxon-2.1.0.tgz#624796722119f075119006b436054aecbb38f15f"
- integrity sha512-2b0sRo6rdYT1wDu9nSXm/9o8rhQ9ED7FxrDMYabYuOQz48esgn4fBUNcPqpxwejpFmlhZY6CONvkddNtaMeVHw==
+"@abp/luxon@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/luxon/-/luxon-2.2.0.tgz#0d0e78edc249853fa31eceecc00df2846a879aa9"
+ integrity sha512-WbOW0PcMks+WXRPWt/+H4pOa5waM331WkY0F+EJx8fpxemNGQNUEXLkuMXzN3MrN6LrplM9AZ9i+NRA9PWHbNw==
dependencies:
luxon "^1.21.3"
-"@abp/malihu-custom-scrollbar-plugin@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-2.1.0.tgz#f4dc1a32cefc3de8af08cb6d585ec5f7636a0c5e"
- integrity sha512-WcxzCZ5YOMxGxZerEh966cVrFSCw1UTDqwU2rxA/LsHEbPKd69AY+SHvUiacNxPXs1ZCF6FFJ29C5dWicEIRaQ==
+"@abp/malihu-custom-scrollbar-plugin@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-2.2.0.tgz#e11fd46dccbb28d44fb199e880b91d27c94f1919"
+ integrity sha512-YDu/NLpIzMA96NDHxd27/+liTm3sow9M+oWH29+9JW8o/AEpXUH3T3AmoXXcTgsBlzLaewgHEFM8yxsAAFoj8Q==
dependencies:
- "@abp/core" "^2.1.0"
+ "@abp/core" "^2.2.0"
malihu-custom-scrollbar-plugin "^3.1.5"
-"@abp/select2@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/select2/-/select2-2.1.0.tgz#79e50d2c25e74a5f96520e8aa1433d79aea674d1"
- integrity sha512-ut/3c+lFdoepuDH36M7thWagmAmTFrChcPnhYjTx4MmIf31WW1BwqOSx3I2g8M+NEEx+V2jTNuBpTq7PONgSJg==
+"@abp/select2@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/select2/-/select2-2.2.0.tgz#4639d4e5b72b1736fa4476bd9b6a78e036400421"
+ integrity sha512-tc87JyM0kvVF388kyGUjDby49Zrrb089jVRRipoIaxXeu4M1YxEFSKBEcUK1MohZWjVtWrNs8MoxPlfukaMpyw==
dependencies:
- "@abp/core" "^2.1.0"
+ "@abp/core" "^2.2.0"
select2 "^4.0.12"
-"@abp/sweetalert@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/sweetalert/-/sweetalert-2.1.0.tgz#88f405c4ba9f9ed2fd54b945ed6bc48d5ae2fa23"
- integrity sha512-EWvReqxZ1DrNH9XD+cf/yGVj+8IPTpuoPuWKDryN4fF7TCMJA+KrXp5lFxpjfkKTtNzLeFGsJqDFWaUifxtqTA==
+"@abp/sweetalert@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/sweetalert/-/sweetalert-2.2.0.tgz#dfc60ba085522d8390e41b90bf5a3d474f4ae624"
+ integrity sha512-HS6TKOwP91UjzjZHaheurZ1AYUSMkQyCSmoX6g5LAK4eH8IIgpojVSp1AFCSPATrFsFWY/dzkDGcfu90FWsVBg==
dependencies:
- "@abp/core" "^2.1.0"
+ "@abp/core" "^2.2.0"
sweetalert "^2.1.2"
-"@abp/timeago@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/timeago/-/timeago-2.1.0.tgz#28c0aef88aff8b54d1dfb42a664d05097e7fda35"
- integrity sha512-NklUYcWeji7po+Y6Oi7b7IkYmjd5YRu123bm3MqjQ71AzuOCTFbvPMHzYOjrUTkzr6gW3IJ24LQ4YmpshPy4ZQ==
+"@abp/timeago@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/timeago/-/timeago-2.2.0.tgz#9a8297f36a46cdc4cc62f44d0fdc91b70def389c"
+ integrity sha512-8qjmKscsTvPznHKWEsddYxdSBiU+l+OgLG6vzMcSWqngYbDQGXqNA93BwJI2qiwd+FkNcfGgYg7CN7bcwzmaiw==
dependencies:
- "@abp/jquery" "^2.1.0"
+ "@abp/jquery" "^2.2.0"
timeago "^1.6.7"
-"@abp/toastr@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/toastr/-/toastr-2.1.0.tgz#22a53a2b1f354770fdc7b37f06bec10eefccfe7a"
- integrity sha512-hD3hTDx+CixTVTx73rnZDiiFkfSxpZox8RLm+CiFA62ORdO8Ryij8TOXXkJd84b2tJfkAkYehohVXKwHlHU7Zg==
+"@abp/toastr@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/toastr/-/toastr-2.2.0.tgz#1cad83a89da244685b3c82adff64260b7ccf4742"
+ integrity sha512-HHfSaw4M/9zS+KgzxGvbHYiQ5qcJgpf21cRZEo16aUwnTeKr4SRaewAWryNn4dKcIO2YNrhzDLH+OYbEaJJlDQ==
dependencies:
- "@abp/jquery" "^2.1.0"
+ "@abp/jquery" "^2.2.0"
toastr "^2.1.4"
"@fortawesome/fontawesome-free@^5.11.2":
diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/MyProjectNameWebModule.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/MyProjectNameWebModule.cs
index 102ff5eee9..66273114fb 100644
--- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/MyProjectNameWebModule.cs
+++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/MyProjectNameWebModule.cs
@@ -227,13 +227,15 @@ namespace MyCompanyName.MyProjectName.Web
app.UseVirtualFiles();
app.UseRouting();
app.UseAuthentication();
- app.UseAuthorization();
if (MultiTenancyConsts.IsEnabled)
{
app.UseMultiTenancy();
}
+ app.UseAuthorization();
+
+
app.UseAbpRequestLocalization();
app.UseSwagger();
diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/package.json b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/package.json
index b620e756f7..6e36dde3bf 100644
--- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/package.json
+++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/package.json
@@ -3,6 +3,6 @@
"name": "my-app",
"private": true,
"dependencies": {
- "@abp/aspnetcore.mvc.ui.theme.basic": "^2.1.0"
+ "@abp/aspnetcore.mvc.ui.theme.basic": "^2.2.0"
}
}
\ No newline at end of file
diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/wwwroot/libs/abp/core/abp.css b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/wwwroot/libs/abp/core/abp.css
index ee3c5080a5..ddf9cae5b2 100644
--- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/wwwroot/libs/abp/core/abp.css
+++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/wwwroot/libs/abp/core/abp.css
@@ -1,56 +1,56 @@
-@keyframes spin {
- 0% {
- transform: translateZ(0) rotate(0deg);
- }
-
- 100% {
- transform: translateZ(0) rotate(360deg);
- }
-}
-
-.abp-block-area {
- position: fixed;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- z-index: 102;
- background-color: #fff;
- opacity: .8;
- transition: opacity .25s;
-}
-
- .abp-block-area.abp-block-area-disappearing {
- opacity: 0;
- }
-
- .abp-block-area.abp-block-area-busy:after {
- content: attr(data-text);
- display: block;
- max-width: 125px;
- position: absolute;
- top: 50%;
- left: 50%;
- transform: translate(-50%, -50%);
- font-size: 20px;
- font-family: sans-serif;
- color: #343a40;
- text-align: center;
- text-transform: uppercase;
- }
-
- .abp-block-area.abp-block-area-busy:before {
- content: "";
- display: block;
- width: 150px;
- height: 150px;
- border-radius: 50%;
- border-width: 2px;
- border-style: solid;
- border-color: transparent #228ae6 #228ae6 #228ae6;
- position: absolute;
- top: calc(50% - 75px);
- left: calc(50% - 75px);
- will-change: transform;
- animation: spin .75s infinite ease-in-out;
- }
+@keyframes spin {
+ 0% {
+ transform: translateZ(0) rotate(0deg);
+ }
+
+ 100% {
+ transform: translateZ(0) rotate(360deg);
+ }
+}
+
+.abp-block-area {
+ position: fixed;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ z-index: 102;
+ background-color: #fff;
+ opacity: .8;
+ transition: opacity .25s;
+}
+
+ .abp-block-area.abp-block-area-disappearing {
+ opacity: 0;
+ }
+
+ .abp-block-area.abp-block-area-busy:after {
+ content: attr(data-text);
+ display: block;
+ max-width: 125px;
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ transform: translate(-50%, -50%);
+ font-size: 20px;
+ font-family: sans-serif;
+ color: #343a40;
+ text-align: center;
+ text-transform: uppercase;
+ }
+
+ .abp-block-area.abp-block-area-busy:before {
+ content: "";
+ display: block;
+ width: 150px;
+ height: 150px;
+ border-radius: 50%;
+ border-width: 2px;
+ border-style: solid;
+ border-color: transparent #228ae6 #228ae6 #228ae6;
+ position: absolute;
+ top: calc(50% - 75px);
+ left: calc(50% - 75px);
+ will-change: transform;
+ animation: spin .75s infinite ease-in-out;
+ }
diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/wwwroot/libs/abp/core/abp.js b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/wwwroot/libs/abp/core/abp.js
index cef1cf55e1..730db8bc97 100644
--- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/wwwroot/libs/abp/core/abp.js
+++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/wwwroot/libs/abp/core/abp.js
@@ -1,636 +1,636 @@
-var abp = abp || {};
-(function () {
-
- /* Application paths *****************************************/
-
- //Current application root path (including virtual directory if exists).
- abp.appPath = abp.appPath || '/';
-
- abp.pageLoadTime = new Date();
-
- //Converts given path to absolute path using abp.appPath variable.
- abp.toAbsAppPath = function (path) {
- if (path.indexOf('/') == 0) {
- path = path.substring(1);
- }
-
- return abp.appPath + path;
- };
-
- /* LOGGING ***************************************************/
- //Implements Logging API that provides secure & controlled usage of console.log
-
- abp.log = abp.log || {};
-
- abp.log.levels = {
- DEBUG: 1,
- INFO: 2,
- WARN: 3,
- ERROR: 4,
- FATAL: 5
- };
-
- abp.log.level = abp.log.levels.DEBUG;
-
- abp.log.log = function (logObject, logLevel) {
- if (!window.console || !window.console.log) {
- return;
- }
-
- if (logLevel != undefined && logLevel < abp.log.level) {
- return;
- }
-
- console.log(logObject);
- };
-
- abp.log.debug = function (logObject) {
- abp.log.log("DEBUG: ", abp.log.levels.DEBUG);
- abp.log.log(logObject, abp.log.levels.DEBUG);
- };
-
- abp.log.info = function (logObject) {
- abp.log.log("INFO: ", abp.log.levels.INFO);
- abp.log.log(logObject, abp.log.levels.INFO);
- };
-
- abp.log.warn = function (logObject) {
- abp.log.log("WARN: ", abp.log.levels.WARN);
- abp.log.log(logObject, abp.log.levels.WARN);
- };
-
- abp.log.error = function (logObject) {
- abp.log.log("ERROR: ", abp.log.levels.ERROR);
- abp.log.log(logObject, abp.log.levels.ERROR);
- };
-
- abp.log.fatal = function (logObject) {
- abp.log.log("FATAL: ", abp.log.levels.FATAL);
- abp.log.log(logObject, abp.log.levels.FATAL);
- };
-
- /* LOCALIZATION ***********************************************/
-
- abp.localization = abp.localization || {};
-
- abp.localization.values = {};
-
- abp.localization.localize = function (key, sourceName) {
- sourceName = sourceName || abp.localization.defaultResourceName;
-
- var source = abp.localization.values[sourceName];
-
- if (!source) {
- abp.log.warn('Could not find localization source: ' + sourceName);
- return key;
- }
-
- var value = source[key];
- if (value == undefined) {
- return key;
- }
-
- var copiedArguments = Array.prototype.slice.call(arguments, 0);
- copiedArguments.splice(1, 1);
- copiedArguments[0] = value;
-
- return abp.utils.formatString.apply(this, copiedArguments);
- };
-
- abp.localization.getResource = function (name) {
- return function () {
- var copiedArguments = Array.prototype.slice.call(arguments, 0);
- copiedArguments.splice(1, 0, name);
- return abp.localization.localize.apply(this, copiedArguments);
- };
- };
-
- abp.localization.defaultResourceName = undefined;
-
- /* AUTHORIZATION **********************************************/
-
- abp.auth = abp.auth || {};
-
- abp.auth.policies = abp.auth.policies || {};
-
- abp.auth.grantedPolicies = abp.auth.grantedPolicies || {};
-
- abp.auth.isGranted = function (policyName) {
- return abp.auth.policies[policyName] != undefined && abp.auth.grantedPolicies[policyName] != undefined;
- };
-
- abp.auth.isAnyGranted = function () {
- if (!arguments || arguments.length <= 0) {
- return true;
- }
-
- for (var i = 0; i < arguments.length; i++) {
- if (abp.auth.isGranted(arguments[i])) {
- return true;
- }
- }
-
- return false;
- };
-
- abp.auth.areAllGranted = function () {
- if (!arguments || arguments.length <= 0) {
- return true;
- }
-
- for (var i = 0; i < arguments.length; i++) {
- if (!abp.auth.isGranted(arguments[i])) {
- return false;
- }
- }
-
- return true;
- };
-
- abp.auth.tokenCookieName = 'Abp.AuthToken';
-
- abp.auth.setToken = function (authToken, expireDate) {
- abp.utils.setCookieValue(abp.auth.tokenCookieName, authToken, expireDate, abp.appPath, abp.domain);
- };
-
- abp.auth.getToken = function () {
- return abp.utils.getCookieValue(abp.auth.tokenCookieName);
- }
-
- abp.auth.clearToken = function () {
- abp.auth.setToken();
- }
-
- /* SETTINGS *************************************************/
-
- abp.setting = abp.setting || {};
-
- abp.setting.values = abp.setting.values || {};
-
- abp.setting.get = function (name) {
- return abp.setting.values[name];
- };
-
- abp.setting.getBoolean = function (name) {
- var value = abp.setting.get(name);
- return value == 'true' || value == 'True';
- };
-
- abp.setting.getInt = function (name) {
- return parseInt(abp.setting.values[name]);
- };
-
- /* NOTIFICATION *********************************************/
- //Defines Notification API, not implements it
-
- abp.notify = abp.notify || {};
-
- abp.notify.success = function (message, title, options) {
- abp.log.warn('abp.notify.success is not implemented!');
- };
-
- abp.notify.info = function (message, title, options) {
- abp.log.warn('abp.notify.info is not implemented!');
- };
-
- abp.notify.warn = function (message, title, options) {
- abp.log.warn('abp.notify.warn is not implemented!');
- };
-
- abp.notify.error = function (message, title, options) {
- abp.log.warn('abp.notify.error is not implemented!');
- };
-
- /* MESSAGE **************************************************/
- //Defines Message API, not implements it
-
- abp.message = abp.message || {};
-
- abp.message._showMessage = function (message, title) {
- alert((title || '') + ' ' + message);
- };
-
- abp.message.info = function (message, title) {
- abp.log.warn('abp.message.info is not implemented!');
- return abp.message._showMessage(message, title);
- };
-
- abp.message.success = function (message, title) {
- abp.log.warn('abp.message.success is not implemented!');
- return abp.message._showMessage(message, title);
- };
-
- abp.message.warn = function (message, title) {
- abp.log.warn('abp.message.warn is not implemented!');
- return abp.message._showMessage(message, title);
- };
-
- abp.message.error = function (message, title) {
- abp.log.warn('abp.message.error is not implemented!');
- return abp.message._showMessage(message, title);
- };
-
- abp.message.confirm = function (message, titleOrCallback, callback) {
- abp.log.warn('abp.message.confirm is not properly implemented!');
-
- if (titleOrCallback && !(typeof titleOrCallback == 'string')) {
- callback = titleOrCallback;
- }
-
- var result = confirm(message);
- callback && callback(result);
- };
-
- /* UI *******************************************************/
-
- abp.ui = abp.ui || {};
-
- /* UI BLOCK */
- //Defines UI Block API and implements basically
-
- var $abpBlockArea = document.createElement('div');
- $abpBlockArea.classList.add('abp-block-area');
-
- /* opts: { //Can be an object with options or a string for query a selector
- * elm: a query selector (optional - default: document.body)
- * busy: boolean (optional - default: false)
- * promise: A promise with always or finally handler (optional - auto unblocks the ui if provided)
- * }
- */
- abp.ui.block = function (opts) {
- if (!opts) {
- opts = {};
- } else if (typeof opts == 'string') {
- opts = {
- elm: opts
- };
- }
-
- var $elm = document.querySelector(opts.elm) || document.body;
-
- if (opts.busy) {
- $abpBlockArea.classList.add('abp-block-area-busy');
- } else {
- $abpBlockArea.classList.remove('abp-block-area-busy');
- }
-
- if (document.querySelector(opts.elm)) {
- $abpBlockArea.style.position = 'absolute';
- } else {
- $abpBlockArea.style.position = 'fixed';
- }
-
- $elm.appendChild($abpBlockArea);
-
- if (opts.promise) {
- if (opts.promise.always) { //jQuery.Deferred style
- opts.promise.always(function () {
- abp.ui.unblock({
- $elm: opts.elm
- });
- });
- } else if (opts.promise['finally']) { //Q style
- opts.promise['finally'](function () {
- abp.ui.unblock({
- $elm: opts.elm
- });
- });
- }
- }
- };
-
- /* opts: {
- *
- * }
- */
- abp.ui.unblock = function (opts) {
- var element = document.querySelector('.abp-block-area');
- if (element) {
- element.classList.add('abp-block-area-disappearing');
- setTimeout(function () {
- if (element) {
- element.classList.remove('abp-block-area-disappearing');
- element.parentElement.removeChild(element);
- }
- }, 250);
- }
- };
-
- /* UI BUSY */
- //Defines UI Busy API, not implements it
-
- abp.ui.setBusy = function (opts) {
- if (!opts) {
- opts = {
- busy: true
- };
- } else if (typeof opts == 'string') {
- opts = {
- elm: opts,
- busy: true
- };
- }
-
- abp.ui.block(opts);
- };
-
- abp.ui.clearBusy = function (opts) {
- abp.ui.unblock(opts);
- };
-
- /* SIMPLE EVENT BUS *****************************************/
-
- abp.event = (function () {
-
- var _callbacks = {};
-
- var on = function (eventName, callback) {
- if (!_callbacks[eventName]) {
- _callbacks[eventName] = [];
- }
-
- _callbacks[eventName].push(callback);
- };
-
- var off = function (eventName, callback) {
- var callbacks = _callbacks[eventName];
- if (!callbacks) {
- return;
- }
-
- var index = -1;
- for (var i = 0; i < callbacks.length; i++) {
- if (callbacks[i] === callback) {
- index = i;
- break;
- }
- }
-
- if (index < 0) {
- return;
- }
-
- _callbacks[eventName].splice(index, 1);
- };
-
- var trigger = function (eventName) {
- var callbacks = _callbacks[eventName];
- if (!callbacks || !callbacks.length) {
- return;
- }
-
- var args = Array.prototype.slice.call(arguments, 1);
- for (var i = 0; i < callbacks.length; i++) {
- callbacks[i].apply(this, args);
- }
- };
-
- // Public interface ///////////////////////////////////////////////////
-
- return {
- on: on,
- off: off,
- trigger: trigger
- };
- })();
-
-
- /* UTILS ***************************************************/
-
- abp.utils = abp.utils || {};
-
- /* Creates a name namespace.
- * Example:
- * var taskService = abp.utils.createNamespace(abp, 'services.task');
- * taskService will be equal to abp.services.task
- * first argument (root) must be defined first
- ************************************************************/
- abp.utils.createNamespace = function (root, ns) {
- var parts = ns.split('.');
- for (var i = 0; i < parts.length; i++) {
- if (typeof root[parts[i]] == 'undefined') {
- root[parts[i]] = {};
- }
-
- root = root[parts[i]];
- }
-
- return root;
- };
-
- /* Find and replaces a string (search) to another string (replacement) in
- * given string (str).
- * Example:
- * abp.utils.replaceAll('This is a test string', 'is', 'X') = 'ThX X a test string'
- ************************************************************/
- abp.utils.replaceAll = function (str, search, replacement) {
- var fix = search.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
- return str.replace(new RegExp(fix, 'g'), replacement);
- };
-
- /* Formats a string just like string.format in C#.
- * Example:
- * abp.utils.formatString('Hello {0}','Tuana') = 'Hello Tuana'
- ************************************************************/
- abp.utils.formatString = function () {
- if (arguments.length < 1) {
- return null;
- }
-
- var str = arguments[0];
-
- for (var i = 1; i < arguments.length; i++) {
- var placeHolder = '{' + (i - 1) + '}';
- str = abp.utils.replaceAll(str, placeHolder, arguments[i]);
- }
-
- return str;
- };
-
- abp.utils.toPascalCase = function (str) {
- if (!str || !str.length) {
- return str;
- }
-
- if (str.length === 1) {
- return str.charAt(0).toUpperCase();
- }
-
- return str.charAt(0).toUpperCase() + str.substr(1);
- }
-
- abp.utils.toCamelCase = function (str) {
- if (!str || !str.length) {
- return str;
- }
-
- if (str.length === 1) {
- return str.charAt(0).toLowerCase();
- }
-
- return str.charAt(0).toLowerCase() + str.substr(1);
- }
-
- abp.utils.truncateString = function (str, maxLength) {
- if (!str || !str.length || str.length <= maxLength) {
- return str;
- }
-
- return str.substr(0, maxLength);
- };
-
- abp.utils.truncateStringWithPostfix = function (str, maxLength, postfix) {
- postfix = postfix || '...';
-
- if (!str || !str.length || str.length <= maxLength) {
- return str;
- }
-
- if (maxLength <= postfix.length) {
- return postfix.substr(0, maxLength);
- }
-
- return str.substr(0, maxLength - postfix.length) + postfix;
- };
-
- abp.utils.isFunction = function (obj) {
- return !!(obj && obj.constructor && obj.call && obj.apply);
- };
-
- /**
- * parameterInfos should be an array of { name, value } objects
- * where name is query string parameter name and value is it's value.
- * includeQuestionMark is true by default.
- */
- abp.utils.buildQueryString = function (parameterInfos, includeQuestionMark) {
- if (includeQuestionMark === undefined) {
- includeQuestionMark = true;
- }
-
- var qs = '';
-
- function addSeperator() {
- if (!qs.length) {
- if (includeQuestionMark) {
- qs = qs + '?';
- }
- } else {
- qs = qs + '&';
- }
- }
-
- for (var i = 0; i < parameterInfos.length; ++i) {
- var parameterInfo = parameterInfos[i];
- if (parameterInfo.value === undefined) {
- continue;
- }
-
- if (parameterInfo.value === null) {
- parameterInfo.value = '';
- }
-
- addSeperator();
-
- if (parameterInfo.value.toJSON && typeof parameterInfo.value.toJSON === "function") {
- qs = qs + parameterInfo.name + '=' + encodeURIComponent(parameterInfo.value.toJSON());
- } else if (Array.isArray(parameterInfo.value) && parameterInfo.value.length) {
- for (var j = 0; j < parameterInfo.value.length; j++) {
- if (j > 0) {
- addSeperator();
- }
-
- qs = qs + parameterInfo.name + '[' + j + ']=' + encodeURIComponent(parameterInfo.value[j]);
- }
- } else {
- qs = qs + parameterInfo.name + '=' + encodeURIComponent(parameterInfo.value);
- }
- }
-
- return qs;
- }
-
- /**
- * Sets a cookie value for given key.
- * This is a simple implementation created to be used by ABP.
- * Please use a complete cookie library if you need.
- * @param {string} key
- * @param {string} value
- * @param {Date} expireDate (optional). If not specified the cookie will expire at the end of session.
- * @param {string} path (optional)
- */
- abp.utils.setCookieValue = function (key, value, expireDate, path) {
- var cookieValue = encodeURIComponent(key) + '=';
-
- if (value) {
- cookieValue = cookieValue + encodeURIComponent(value);
- }
-
- if (expireDate) {
- cookieValue = cookieValue + "; expires=" + expireDate.toUTCString();
- }
-
- if (path) {
- cookieValue = cookieValue + "; path=" + path;
- }
-
- document.cookie = cookieValue;
- };
-
- /**
- * Gets a cookie with given key.
- * This is a simple implementation created to be used by ABP.
- * Please use a complete cookie library if you need.
- * @param {string} key
- * @returns {string} Cookie value or null
- */
- abp.utils.getCookieValue = function (key) {
- var equalities = document.cookie.split('; ');
- for (var i = 0; i < equalities.length; i++) {
- if (!equalities[i]) {
- continue;
- }
-
- var splitted = equalities[i].split('=');
- if (splitted.length != 2) {
- continue;
- }
-
- if (decodeURIComponent(splitted[0]) === key) {
- return decodeURIComponent(splitted[1] || '');
- }
- }
-
- return null;
- };
-
- /**
- * Deletes cookie for given key.
- * This is a simple implementation created to be used by ABP.
- * Please use a complete cookie library if you need.
- * @param {string} key
- * @param {string} path (optional)
- */
- abp.utils.deleteCookie = function (key, path) {
- var cookieValue = encodeURIComponent(key) + '=';
-
- cookieValue = cookieValue + "; expires=" + (new Date(new Date().getTime() - 86400000)).toUTCString();
-
- if (path) {
- cookieValue = cookieValue + "; path=" + path;
- }
-
- document.cookie = cookieValue;
- }
-
- /* SECURITY ***************************************/
- abp.security = abp.security || {};
- abp.security.antiForgery = abp.security.antiForgery || {};
-
- abp.security.antiForgery.tokenCookieName = 'XSRF-TOKEN';
- abp.security.antiForgery.tokenHeaderName = 'X-XSRF-TOKEN';
-
- abp.security.antiForgery.getToken = function () {
- return abp.utils.getCookieValue(abp.security.antiForgery.tokenCookieName);
- };
-
+var abp = abp || {};
+(function () {
+
+ /* Application paths *****************************************/
+
+ //Current application root path (including virtual directory if exists).
+ abp.appPath = abp.appPath || '/';
+
+ abp.pageLoadTime = new Date();
+
+ //Converts given path to absolute path using abp.appPath variable.
+ abp.toAbsAppPath = function (path) {
+ if (path.indexOf('/') == 0) {
+ path = path.substring(1);
+ }
+
+ return abp.appPath + path;
+ };
+
+ /* LOGGING ***************************************************/
+ //Implements Logging API that provides secure & controlled usage of console.log
+
+ abp.log = abp.log || {};
+
+ abp.log.levels = {
+ DEBUG: 1,
+ INFO: 2,
+ WARN: 3,
+ ERROR: 4,
+ FATAL: 5
+ };
+
+ abp.log.level = abp.log.levels.DEBUG;
+
+ abp.log.log = function (logObject, logLevel) {
+ if (!window.console || !window.console.log) {
+ return;
+ }
+
+ if (logLevel != undefined && logLevel < abp.log.level) {
+ return;
+ }
+
+ console.log(logObject);
+ };
+
+ abp.log.debug = function (logObject) {
+ abp.log.log("DEBUG: ", abp.log.levels.DEBUG);
+ abp.log.log(logObject, abp.log.levels.DEBUG);
+ };
+
+ abp.log.info = function (logObject) {
+ abp.log.log("INFO: ", abp.log.levels.INFO);
+ abp.log.log(logObject, abp.log.levels.INFO);
+ };
+
+ abp.log.warn = function (logObject) {
+ abp.log.log("WARN: ", abp.log.levels.WARN);
+ abp.log.log(logObject, abp.log.levels.WARN);
+ };
+
+ abp.log.error = function (logObject) {
+ abp.log.log("ERROR: ", abp.log.levels.ERROR);
+ abp.log.log(logObject, abp.log.levels.ERROR);
+ };
+
+ abp.log.fatal = function (logObject) {
+ abp.log.log("FATAL: ", abp.log.levels.FATAL);
+ abp.log.log(logObject, abp.log.levels.FATAL);
+ };
+
+ /* LOCALIZATION ***********************************************/
+
+ abp.localization = abp.localization || {};
+
+ abp.localization.values = {};
+
+ abp.localization.localize = function (key, sourceName) {
+ sourceName = sourceName || abp.localization.defaultResourceName;
+
+ var source = abp.localization.values[sourceName];
+
+ if (!source) {
+ abp.log.warn('Could not find localization source: ' + sourceName);
+ return key;
+ }
+
+ var value = source[key];
+ if (value == undefined) {
+ return key;
+ }
+
+ var copiedArguments = Array.prototype.slice.call(arguments, 0);
+ copiedArguments.splice(1, 1);
+ copiedArguments[0] = value;
+
+ return abp.utils.formatString.apply(this, copiedArguments);
+ };
+
+ abp.localization.getResource = function (name) {
+ return function () {
+ var copiedArguments = Array.prototype.slice.call(arguments, 0);
+ copiedArguments.splice(1, 0, name);
+ return abp.localization.localize.apply(this, copiedArguments);
+ };
+ };
+
+ abp.localization.defaultResourceName = undefined;
+
+ /* AUTHORIZATION **********************************************/
+
+ abp.auth = abp.auth || {};
+
+ abp.auth.policies = abp.auth.policies || {};
+
+ abp.auth.grantedPolicies = abp.auth.grantedPolicies || {};
+
+ abp.auth.isGranted = function (policyName) {
+ return abp.auth.policies[policyName] != undefined && abp.auth.grantedPolicies[policyName] != undefined;
+ };
+
+ abp.auth.isAnyGranted = function () {
+ if (!arguments || arguments.length <= 0) {
+ return true;
+ }
+
+ for (var i = 0; i < arguments.length; i++) {
+ if (abp.auth.isGranted(arguments[i])) {
+ return true;
+ }
+ }
+
+ return false;
+ };
+
+ abp.auth.areAllGranted = function () {
+ if (!arguments || arguments.length <= 0) {
+ return true;
+ }
+
+ for (var i = 0; i < arguments.length; i++) {
+ if (!abp.auth.isGranted(arguments[i])) {
+ return false;
+ }
+ }
+
+ return true;
+ };
+
+ abp.auth.tokenCookieName = 'Abp.AuthToken';
+
+ abp.auth.setToken = function (authToken, expireDate) {
+ abp.utils.setCookieValue(abp.auth.tokenCookieName, authToken, expireDate, abp.appPath, abp.domain);
+ };
+
+ abp.auth.getToken = function () {
+ return abp.utils.getCookieValue(abp.auth.tokenCookieName);
+ }
+
+ abp.auth.clearToken = function () {
+ abp.auth.setToken();
+ }
+
+ /* SETTINGS *************************************************/
+
+ abp.setting = abp.setting || {};
+
+ abp.setting.values = abp.setting.values || {};
+
+ abp.setting.get = function (name) {
+ return abp.setting.values[name];
+ };
+
+ abp.setting.getBoolean = function (name) {
+ var value = abp.setting.get(name);
+ return value == 'true' || value == 'True';
+ };
+
+ abp.setting.getInt = function (name) {
+ return parseInt(abp.setting.values[name]);
+ };
+
+ /* NOTIFICATION *********************************************/
+ //Defines Notification API, not implements it
+
+ abp.notify = abp.notify || {};
+
+ abp.notify.success = function (message, title, options) {
+ abp.log.warn('abp.notify.success is not implemented!');
+ };
+
+ abp.notify.info = function (message, title, options) {
+ abp.log.warn('abp.notify.info is not implemented!');
+ };
+
+ abp.notify.warn = function (message, title, options) {
+ abp.log.warn('abp.notify.warn is not implemented!');
+ };
+
+ abp.notify.error = function (message, title, options) {
+ abp.log.warn('abp.notify.error is not implemented!');
+ };
+
+ /* MESSAGE **************************************************/
+ //Defines Message API, not implements it
+
+ abp.message = abp.message || {};
+
+ abp.message._showMessage = function (message, title) {
+ alert((title || '') + ' ' + message);
+ };
+
+ abp.message.info = function (message, title) {
+ abp.log.warn('abp.message.info is not implemented!');
+ return abp.message._showMessage(message, title);
+ };
+
+ abp.message.success = function (message, title) {
+ abp.log.warn('abp.message.success is not implemented!');
+ return abp.message._showMessage(message, title);
+ };
+
+ abp.message.warn = function (message, title) {
+ abp.log.warn('abp.message.warn is not implemented!');
+ return abp.message._showMessage(message, title);
+ };
+
+ abp.message.error = function (message, title) {
+ abp.log.warn('abp.message.error is not implemented!');
+ return abp.message._showMessage(message, title);
+ };
+
+ abp.message.confirm = function (message, titleOrCallback, callback) {
+ abp.log.warn('abp.message.confirm is not properly implemented!');
+
+ if (titleOrCallback && !(typeof titleOrCallback == 'string')) {
+ callback = titleOrCallback;
+ }
+
+ var result = confirm(message);
+ callback && callback(result);
+ };
+
+ /* UI *******************************************************/
+
+ abp.ui = abp.ui || {};
+
+ /* UI BLOCK */
+ //Defines UI Block API and implements basically
+
+ var $abpBlockArea = document.createElement('div');
+ $abpBlockArea.classList.add('abp-block-area');
+
+ /* opts: { //Can be an object with options or a string for query a selector
+ * elm: a query selector (optional - default: document.body)
+ * busy: boolean (optional - default: false)
+ * promise: A promise with always or finally handler (optional - auto unblocks the ui if provided)
+ * }
+ */
+ abp.ui.block = function (opts) {
+ if (!opts) {
+ opts = {};
+ } else if (typeof opts == 'string') {
+ opts = {
+ elm: opts
+ };
+ }
+
+ var $elm = document.querySelector(opts.elm) || document.body;
+
+ if (opts.busy) {
+ $abpBlockArea.classList.add('abp-block-area-busy');
+ } else {
+ $abpBlockArea.classList.remove('abp-block-area-busy');
+ }
+
+ if (document.querySelector(opts.elm)) {
+ $abpBlockArea.style.position = 'absolute';
+ } else {
+ $abpBlockArea.style.position = 'fixed';
+ }
+
+ $elm.appendChild($abpBlockArea);
+
+ if (opts.promise) {
+ if (opts.promise.always) { //jQuery.Deferred style
+ opts.promise.always(function () {
+ abp.ui.unblock({
+ $elm: opts.elm
+ });
+ });
+ } else if (opts.promise['finally']) { //Q style
+ opts.promise['finally'](function () {
+ abp.ui.unblock({
+ $elm: opts.elm
+ });
+ });
+ }
+ }
+ };
+
+ /* opts: {
+ *
+ * }
+ */
+ abp.ui.unblock = function (opts) {
+ var element = document.querySelector('.abp-block-area');
+ if (element) {
+ element.classList.add('abp-block-area-disappearing');
+ setTimeout(function () {
+ if (element) {
+ element.classList.remove('abp-block-area-disappearing');
+ element.parentElement.removeChild(element);
+ }
+ }, 250);
+ }
+ };
+
+ /* UI BUSY */
+ //Defines UI Busy API, not implements it
+
+ abp.ui.setBusy = function (opts) {
+ if (!opts) {
+ opts = {
+ busy: true
+ };
+ } else if (typeof opts == 'string') {
+ opts = {
+ elm: opts,
+ busy: true
+ };
+ }
+
+ abp.ui.block(opts);
+ };
+
+ abp.ui.clearBusy = function (opts) {
+ abp.ui.unblock(opts);
+ };
+
+ /* SIMPLE EVENT BUS *****************************************/
+
+ abp.event = (function () {
+
+ var _callbacks = {};
+
+ var on = function (eventName, callback) {
+ if (!_callbacks[eventName]) {
+ _callbacks[eventName] = [];
+ }
+
+ _callbacks[eventName].push(callback);
+ };
+
+ var off = function (eventName, callback) {
+ var callbacks = _callbacks[eventName];
+ if (!callbacks) {
+ return;
+ }
+
+ var index = -1;
+ for (var i = 0; i < callbacks.length; i++) {
+ if (callbacks[i] === callback) {
+ index = i;
+ break;
+ }
+ }
+
+ if (index < 0) {
+ return;
+ }
+
+ _callbacks[eventName].splice(index, 1);
+ };
+
+ var trigger = function (eventName) {
+ var callbacks = _callbacks[eventName];
+ if (!callbacks || !callbacks.length) {
+ return;
+ }
+
+ var args = Array.prototype.slice.call(arguments, 1);
+ for (var i = 0; i < callbacks.length; i++) {
+ callbacks[i].apply(this, args);
+ }
+ };
+
+ // Public interface ///////////////////////////////////////////////////
+
+ return {
+ on: on,
+ off: off,
+ trigger: trigger
+ };
+ })();
+
+
+ /* UTILS ***************************************************/
+
+ abp.utils = abp.utils || {};
+
+ /* Creates a name namespace.
+ * Example:
+ * var taskService = abp.utils.createNamespace(abp, 'services.task');
+ * taskService will be equal to abp.services.task
+ * first argument (root) must be defined first
+ ************************************************************/
+ abp.utils.createNamespace = function (root, ns) {
+ var parts = ns.split('.');
+ for (var i = 0; i < parts.length; i++) {
+ if (typeof root[parts[i]] == 'undefined') {
+ root[parts[i]] = {};
+ }
+
+ root = root[parts[i]];
+ }
+
+ return root;
+ };
+
+ /* Find and replaces a string (search) to another string (replacement) in
+ * given string (str).
+ * Example:
+ * abp.utils.replaceAll('This is a test string', 'is', 'X') = 'ThX X a test string'
+ ************************************************************/
+ abp.utils.replaceAll = function (str, search, replacement) {
+ var fix = search.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
+ return str.replace(new RegExp(fix, 'g'), replacement);
+ };
+
+ /* Formats a string just like string.format in C#.
+ * Example:
+ * abp.utils.formatString('Hello {0}','Tuana') = 'Hello Tuana'
+ ************************************************************/
+ abp.utils.formatString = function () {
+ if (arguments.length < 1) {
+ return null;
+ }
+
+ var str = arguments[0];
+
+ for (var i = 1; i < arguments.length; i++) {
+ var placeHolder = '{' + (i - 1) + '}';
+ str = abp.utils.replaceAll(str, placeHolder, arguments[i]);
+ }
+
+ return str;
+ };
+
+ abp.utils.toPascalCase = function (str) {
+ if (!str || !str.length) {
+ return str;
+ }
+
+ if (str.length === 1) {
+ return str.charAt(0).toUpperCase();
+ }
+
+ return str.charAt(0).toUpperCase() + str.substr(1);
+ }
+
+ abp.utils.toCamelCase = function (str) {
+ if (!str || !str.length) {
+ return str;
+ }
+
+ if (str.length === 1) {
+ return str.charAt(0).toLowerCase();
+ }
+
+ return str.charAt(0).toLowerCase() + str.substr(1);
+ }
+
+ abp.utils.truncateString = function (str, maxLength) {
+ if (!str || !str.length || str.length <= maxLength) {
+ return str;
+ }
+
+ return str.substr(0, maxLength);
+ };
+
+ abp.utils.truncateStringWithPostfix = function (str, maxLength, postfix) {
+ postfix = postfix || '...';
+
+ if (!str || !str.length || str.length <= maxLength) {
+ return str;
+ }
+
+ if (maxLength <= postfix.length) {
+ return postfix.substr(0, maxLength);
+ }
+
+ return str.substr(0, maxLength - postfix.length) + postfix;
+ };
+
+ abp.utils.isFunction = function (obj) {
+ return !!(obj && obj.constructor && obj.call && obj.apply);
+ };
+
+ /**
+ * parameterInfos should be an array of { name, value } objects
+ * where name is query string parameter name and value is it's value.
+ * includeQuestionMark is true by default.
+ */
+ abp.utils.buildQueryString = function (parameterInfos, includeQuestionMark) {
+ if (includeQuestionMark === undefined) {
+ includeQuestionMark = true;
+ }
+
+ var qs = '';
+
+ function addSeperator() {
+ if (!qs.length) {
+ if (includeQuestionMark) {
+ qs = qs + '?';
+ }
+ } else {
+ qs = qs + '&';
+ }
+ }
+
+ for (var i = 0; i < parameterInfos.length; ++i) {
+ var parameterInfo = parameterInfos[i];
+ if (parameterInfo.value === undefined) {
+ continue;
+ }
+
+ if (parameterInfo.value === null) {
+ parameterInfo.value = '';
+ }
+
+ addSeperator();
+
+ if (parameterInfo.value.toJSON && typeof parameterInfo.value.toJSON === "function") {
+ qs = qs + parameterInfo.name + '=' + encodeURIComponent(parameterInfo.value.toJSON());
+ } else if (Array.isArray(parameterInfo.value) && parameterInfo.value.length) {
+ for (var j = 0; j < parameterInfo.value.length; j++) {
+ if (j > 0) {
+ addSeperator();
+ }
+
+ qs = qs + parameterInfo.name + '[' + j + ']=' + encodeURIComponent(parameterInfo.value[j]);
+ }
+ } else {
+ qs = qs + parameterInfo.name + '=' + encodeURIComponent(parameterInfo.value);
+ }
+ }
+
+ return qs;
+ }
+
+ /**
+ * Sets a cookie value for given key.
+ * This is a simple implementation created to be used by ABP.
+ * Please use a complete cookie library if you need.
+ * @param {string} key
+ * @param {string} value
+ * @param {Date} expireDate (optional). If not specified the cookie will expire at the end of session.
+ * @param {string} path (optional)
+ */
+ abp.utils.setCookieValue = function (key, value, expireDate, path) {
+ var cookieValue = encodeURIComponent(key) + '=';
+
+ if (value) {
+ cookieValue = cookieValue + encodeURIComponent(value);
+ }
+
+ if (expireDate) {
+ cookieValue = cookieValue + "; expires=" + expireDate.toUTCString();
+ }
+
+ if (path) {
+ cookieValue = cookieValue + "; path=" + path;
+ }
+
+ document.cookie = cookieValue;
+ };
+
+ /**
+ * Gets a cookie with given key.
+ * This is a simple implementation created to be used by ABP.
+ * Please use a complete cookie library if you need.
+ * @param {string} key
+ * @returns {string} Cookie value or null
+ */
+ abp.utils.getCookieValue = function (key) {
+ var equalities = document.cookie.split('; ');
+ for (var i = 0; i < equalities.length; i++) {
+ if (!equalities[i]) {
+ continue;
+ }
+
+ var splitted = equalities[i].split('=');
+ if (splitted.length != 2) {
+ continue;
+ }
+
+ if (decodeURIComponent(splitted[0]) === key) {
+ return decodeURIComponent(splitted[1] || '');
+ }
+ }
+
+ return null;
+ };
+
+ /**
+ * Deletes cookie for given key.
+ * This is a simple implementation created to be used by ABP.
+ * Please use a complete cookie library if you need.
+ * @param {string} key
+ * @param {string} path (optional)
+ */
+ abp.utils.deleteCookie = function (key, path) {
+ var cookieValue = encodeURIComponent(key) + '=';
+
+ cookieValue = cookieValue + "; expires=" + (new Date(new Date().getTime() - 86400000)).toUTCString();
+
+ if (path) {
+ cookieValue = cookieValue + "; path=" + path;
+ }
+
+ document.cookie = cookieValue;
+ }
+
+ /* SECURITY ***************************************/
+ abp.security = abp.security || {};
+ abp.security.antiForgery = abp.security.antiForgery || {};
+
+ abp.security.antiForgery.tokenCookieName = 'XSRF-TOKEN';
+ abp.security.antiForgery.tokenHeaderName = 'X-XSRF-TOKEN';
+
+ abp.security.antiForgery.getToken = function () {
+ return abp.utils.getCookieValue(abp.security.antiForgery.tokenCookieName);
+ };
+
})();
\ No newline at end of file
diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/wwwroot/libs/abp/jquery/abp.jquery.js b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/wwwroot/libs/abp/jquery/abp.jquery.js
index 6e2ee001b8..e6aff047f7 100644
--- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/wwwroot/libs/abp/jquery/abp.jquery.js
+++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/wwwroot/libs/abp/jquery/abp.jquery.js
@@ -1,393 +1,393 @@
-var abp = abp || {};
-(function($) {
-
- if (!$) {
- throw "abp/jquery library requires the jquery library included to the page!";
- }
-
- // ABP CORE OVERRIDES /////////////////////////////////////////////////////
-
- abp.message._showMessage = function (message, title) {
- alert((title || '') + ' ' + message);
-
- return $.Deferred(function ($dfd) {
- $dfd.resolve();
- });
- };
-
- abp.message.confirm = function (message, titleOrCallback, callback) {
- if (titleOrCallback && !(typeof titleOrCallback == 'string')) {
- callback = titleOrCallback;
- }
-
- var result = confirm(message);
- callback && callback(result);
-
- return $.Deferred(function ($dfd) {
- $dfd.resolve(result);
- });
- };
-
- abp.utils.isFunction = function (obj) {
- return $.isFunction(obj);
- };
-
- // JQUERY EXTENSIONS //////////////////////////////////////////////////////
-
- $.fn.findWithSelf = function (selector) {
- return this.filter(selector).add(this.find(selector));
- };
-
- // DOM ////////////////////////////////////////////////////////////////////
-
- abp.dom = abp.dom || {};
-
- abp.dom.onNodeAdded = function (callback) {
- abp.event.on('abp.dom.nodeAdded', callback);
- };
-
- abp.dom.onNodeRemoved = function (callback) {
- abp.event.on('abp.dom.nodeRemoved', callback);
- };
-
- var mutationObserverCallback = function (mutationsList) {
- for (var i = 0; i < mutationsList.length; i++) {
- var mutation = mutationsList[i];
- if (mutation.type === 'childList') {
- if (mutation.addedNodes && mutation.removedNodes.length) {
- for (var k = 0; k < mutation.removedNodes.length; k++) {
- abp.event.trigger(
- 'abp.dom.nodeRemoved',
- {
- $el: $(mutation.removedNodes[k])
- }
- );
- }
- }
-
- if (mutation.addedNodes && mutation.addedNodes.length) {
- for (var j = 0; j < mutation.addedNodes.length; j++) {
- abp.event.trigger(
- 'abp.dom.nodeAdded',
- {
- $el: $(mutation.addedNodes[j])
- }
- );
- }
- }
- }
- }
- };
-
- new MutationObserver(mutationObserverCallback).observe(
- $('body')[0],
- {
- subtree: true,
- childList: true
- }
- );
-
- // AJAX ///////////////////////////////////////////////////////////////////
-
- abp.ajax = function (userOptions) {
- userOptions = userOptions || {};
-
- var options = $.extend(true, {}, abp.ajax.defaultOpts, userOptions);
-
- options.success = undefined;
- options.error = undefined;
-
- return $.Deferred(function ($dfd) {
- $.ajax(options)
- .done(function (data, textStatus, jqXHR) {
- $dfd.resolve(data);
- userOptions.success && userOptions.success(data);
- }).fail(function (jqXHR) {
- if (jqXHR.getResponseHeader('_AbpErrorFormat') === 'true') {
- abp.ajax.handleAbpErrorResponse(jqXHR, userOptions, $dfd);
- } else {
- abp.ajax.handleNonAbpErrorResponse(jqXHR, userOptions, $dfd);
- }
- });
- });
- };
-
- $.extend(abp.ajax, {
- defaultOpts: {
- dataType: 'json',
- type: 'POST',
- contentType: 'application/json',
- headers: {
- 'X-Requested-With': 'XMLHttpRequest'
- }
- },
-
- defaultError: {
- message: 'An error has occurred!',
- details: 'Error detail not sent by server.'
- },
-
- defaultError401: {
- message: 'You are not authenticated!',
- details: 'You should be authenticated (sign in) in order to perform this operation.'
- },
-
- defaultError403: {
- message: 'You are not authorized!',
- details: 'You are not allowed to perform this operation.'
- },
-
- defaultError404: {
- message: 'Resource not found!',
- details: 'The resource requested could not found on the server.'
- },
-
- logError: function (error) {
- abp.log.error(error);
- },
-
- showError: function (error) {
- if (error.details) {
- return abp.message.error(error.details, error.message);
- } else {
- return abp.message.error(error.message || abp.ajax.defaultError.message);
- }
- },
-
- handleTargetUrl: function (targetUrl) {
- if (!targetUrl) {
- location.href = abp.appPath;
- } else {
- location.href = targetUrl;
- }
- },
-
- handleErrorStatusCode: function (status) {
- switch (status) {
- case 401:
- abp.ajax.handleUnAuthorizedRequest(
- abp.ajax.showError(abp.ajax.defaultError401),
- abp.appPath
- );
- break;
- case 403:
- abp.ajax.showError(abp.ajax.defaultError403);
- break;
- case 404:
- abp.ajax.showError(abp.ajax.defaultError404);
- break;
- default:
- abp.ajax.showError(abp.ajax.defaultError);
- break;
- }
- },
-
- handleNonAbpErrorResponse: function (jqXHR, userOptions, $dfd) {
- if (userOptions.abpHandleError !== false) {
- abp.ajax.handleErrorStatusCode(jqXHR.status);
- }
-
- $dfd.reject.apply(this, arguments);
- userOptions.error && userOptions.error.apply(this, arguments);
- },
-
- handleAbpErrorResponse: function (jqXHR, userOptions, $dfd) {
- var messagePromise = null;
-
- if (userOptions.abpHandleError !== false) {
- messagePromise = abp.ajax.showError(jqXHR.responseJSON.error);
- }
-
- abp.ajax.logError(jqXHR.responseJSON.error);
-
- $dfd && $dfd.reject(jqXHR.responseJSON.error, jqXHR);
- userOptions.error && userOptions.error(jqXHR.responseJSON.error, jqXHR);
-
- if (jqXHR.status === 401 && userOptions.abpHandleError !== false) {
- abp.ajax.handleUnAuthorizedRequest(messagePromise);
- }
- },
-
- handleUnAuthorizedRequest: function (messagePromise, targetUrl) {
- if (messagePromise) {
- messagePromise.done(function () {
- abp.ajax.handleTargetUrl(targetUrl);
- });
- } else {
- abp.ajax.handleTargetUrl(targetUrl);
- }
- },
-
- blockUI: function (options) {
- if (options.blockUI) {
- if (options.blockUI === true) { //block whole page
- abp.ui.setBusy();
- } else { //block an element
- abp.ui.setBusy(options.blockUI);
- }
- }
- },
-
- unblockUI: function (options) {
- if (options.blockUI) {
- if (options.blockUI === true) { //unblock whole page
- abp.ui.clearBusy();
- } else { //unblock an element
- abp.ui.clearBusy(options.blockUI);
- }
- }
- },
-
- ajaxSendHandler: function (event, request, settings) {
- var token = abp.security.antiForgery.getToken();
- if (!token) {
- return;
- }
-
- if (!settings.headers || settings.headers[abp.security.antiForgery.tokenHeaderName] === undefined) {
- request.setRequestHeader(abp.security.antiForgery.tokenHeaderName, token);
- }
- }
- });
-
- $(document).ajaxSend(function (event, request, settings) {
- return abp.ajax.ajaxSendHandler(event, request, settings);
- });
-
- abp.event.on('abp.configurationInitialized', function () {
- var l = abp.localization.getResource('AbpUi');
-
- abp.ajax.defaultError.message = l('DefaultErrorMessage');
- abp.ajax.defaultError.details = l('DefaultErrorMessageDetail');
- abp.ajax.defaultError401.message = l('DefaultErrorMessage401');
- abp.ajax.defaultError401.details = l('DefaultErrorMessage401Detail');
- abp.ajax.defaultError403.message = l('DefaultErrorMessage403');
- abp.ajax.defaultError403.details = l('DefaultErrorMessage403Detail');
- abp.ajax.defaultError404.message = l('DefaultErrorMessage404');
- abp.ajax.defaultError404.details = l('DefaultErrorMessage404Detail');
- });
-
- // RESOURCE LOADER ////////////////////////////////////////////////////////
-
- /* UrlStates enum */
- var UrlStates = {
- LOADING: 'LOADING',
- LOADED: 'LOADED',
- FAILED: 'FAILED'
- };
-
- /* UrlInfo class */
- function UrlInfo(url) {
- this.url = url;
- this.state = UrlStates.LOADING;
- this.loadCallbacks = [];
- this.failCallbacks = [];
- }
-
- UrlInfo.prototype.succeed = function () {
- this.state = UrlStates.LOADED;
- for (var i = 0; i < this.loadCallbacks.length; i++) {
- this.loadCallbacks[i]();
- }
- };
-
- UrlInfo.prototype.failed = function () {
- this.state = UrlStates.FAILED;
- for (var i = 0; i < this.failCallbacks.length; i++) {
- this.failCallbacks[i]();
- }
- };
-
- UrlInfo.prototype.handleCallbacks = function (loadCallback, failCallback) {
- switch (this.state) {
- case UrlStates.LOADED:
- loadCallback && loadCallback();
- break;
- case UrlStates.FAILED:
- failCallback && failCallback();
- break;
- case UrlStates.LOADING:
- this.addCallbacks(loadCallback, failCallback);
- break;
- }
- };
-
- UrlInfo.prototype.addCallbacks = function (loadCallback, failCallback) {
- loadCallback && this.loadCallbacks.push(loadCallback);
- failCallback && this.failCallbacks.push(failCallback);
- };
-
- /* ResourceLoader API */
-
- abp.ResourceLoader = (function () {
-
- var _urlInfos = {};
-
- function getCacheKey(url) {
- return url;
- }
-
- function appendTimeToUrl(url) {
-
- if (url.indexOf('?') < 0) {
- url += '?';
- } else {
- url += '&';
- }
-
- url += '_=' + new Date().getTime();
-
- return url;
- }
-
- var _loadFromUrl = function (url, loadCallback, failCallback, serverLoader) {
-
- var cacheKey = getCacheKey(url);
-
- var urlInfo = _urlInfos[cacheKey];
-
- if (urlInfo) {
- urlInfo.handleCallbacks(loadCallback, failCallback);
- return;
- }
-
- _urlInfos[cacheKey] = urlInfo = new UrlInfo(url);
- urlInfo.addCallbacks(loadCallback, failCallback);
-
- serverLoader(urlInfo);
- };
-
- var _loadScript = function (url, loadCallback, failCallback) {
- _loadFromUrl(url, loadCallback, failCallback, function (urlInfo) {
- $.get({
- url: url,
- dataType: 'text'
- })
- .done(function (script) {
- $.globalEval(script);
- urlInfo.succeed();
- })
- .fail(function () {
- urlInfo.failed();
- });
- });
- };
-
- var _loadStyle = function (url) {
- _loadFromUrl(url, undefined, undefined, function (urlInfo) {
-
- $('', {
- rel: 'stylesheet',
- type: 'text/css',
- href: appendTimeToUrl(url)
- }).appendTo('head');
- });
- };
-
- return {
- loadScript: _loadScript,
- loadStyle: _loadStyle
- }
- })();
-
+var abp = abp || {};
+(function($) {
+
+ if (!$) {
+ throw "abp/jquery library requires the jquery library included to the page!";
+ }
+
+ // ABP CORE OVERRIDES /////////////////////////////////////////////////////
+
+ abp.message._showMessage = function (message, title) {
+ alert((title || '') + ' ' + message);
+
+ return $.Deferred(function ($dfd) {
+ $dfd.resolve();
+ });
+ };
+
+ abp.message.confirm = function (message, titleOrCallback, callback) {
+ if (titleOrCallback && !(typeof titleOrCallback == 'string')) {
+ callback = titleOrCallback;
+ }
+
+ var result = confirm(message);
+ callback && callback(result);
+
+ return $.Deferred(function ($dfd) {
+ $dfd.resolve(result);
+ });
+ };
+
+ abp.utils.isFunction = function (obj) {
+ return $.isFunction(obj);
+ };
+
+ // JQUERY EXTENSIONS //////////////////////////////////////////////////////
+
+ $.fn.findWithSelf = function (selector) {
+ return this.filter(selector).add(this.find(selector));
+ };
+
+ // DOM ////////////////////////////////////////////////////////////////////
+
+ abp.dom = abp.dom || {};
+
+ abp.dom.onNodeAdded = function (callback) {
+ abp.event.on('abp.dom.nodeAdded', callback);
+ };
+
+ abp.dom.onNodeRemoved = function (callback) {
+ abp.event.on('abp.dom.nodeRemoved', callback);
+ };
+
+ var mutationObserverCallback = function (mutationsList) {
+ for (var i = 0; i < mutationsList.length; i++) {
+ var mutation = mutationsList[i];
+ if (mutation.type === 'childList') {
+ if (mutation.addedNodes && mutation.removedNodes.length) {
+ for (var k = 0; k < mutation.removedNodes.length; k++) {
+ abp.event.trigger(
+ 'abp.dom.nodeRemoved',
+ {
+ $el: $(mutation.removedNodes[k])
+ }
+ );
+ }
+ }
+
+ if (mutation.addedNodes && mutation.addedNodes.length) {
+ for (var j = 0; j < mutation.addedNodes.length; j++) {
+ abp.event.trigger(
+ 'abp.dom.nodeAdded',
+ {
+ $el: $(mutation.addedNodes[j])
+ }
+ );
+ }
+ }
+ }
+ }
+ };
+
+ new MutationObserver(mutationObserverCallback).observe(
+ $('body')[0],
+ {
+ subtree: true,
+ childList: true
+ }
+ );
+
+ // AJAX ///////////////////////////////////////////////////////////////////
+
+ abp.ajax = function (userOptions) {
+ userOptions = userOptions || {};
+
+ var options = $.extend(true, {}, abp.ajax.defaultOpts, userOptions);
+
+ options.success = undefined;
+ options.error = undefined;
+
+ return $.Deferred(function ($dfd) {
+ $.ajax(options)
+ .done(function (data, textStatus, jqXHR) {
+ $dfd.resolve(data);
+ userOptions.success && userOptions.success(data);
+ }).fail(function (jqXHR) {
+ if (jqXHR.getResponseHeader('_AbpErrorFormat') === 'true') {
+ abp.ajax.handleAbpErrorResponse(jqXHR, userOptions, $dfd);
+ } else {
+ abp.ajax.handleNonAbpErrorResponse(jqXHR, userOptions, $dfd);
+ }
+ });
+ });
+ };
+
+ $.extend(abp.ajax, {
+ defaultOpts: {
+ dataType: 'json',
+ type: 'POST',
+ contentType: 'application/json',
+ headers: {
+ 'X-Requested-With': 'XMLHttpRequest'
+ }
+ },
+
+ defaultError: {
+ message: 'An error has occurred!',
+ details: 'Error detail not sent by server.'
+ },
+
+ defaultError401: {
+ message: 'You are not authenticated!',
+ details: 'You should be authenticated (sign in) in order to perform this operation.'
+ },
+
+ defaultError403: {
+ message: 'You are not authorized!',
+ details: 'You are not allowed to perform this operation.'
+ },
+
+ defaultError404: {
+ message: 'Resource not found!',
+ details: 'The resource requested could not found on the server.'
+ },
+
+ logError: function (error) {
+ abp.log.error(error);
+ },
+
+ showError: function (error) {
+ if (error.details) {
+ return abp.message.error(error.details, error.message);
+ } else {
+ return abp.message.error(error.message || abp.ajax.defaultError.message);
+ }
+ },
+
+ handleTargetUrl: function (targetUrl) {
+ if (!targetUrl) {
+ location.href = abp.appPath;
+ } else {
+ location.href = targetUrl;
+ }
+ },
+
+ handleErrorStatusCode: function (status) {
+ switch (status) {
+ case 401:
+ abp.ajax.handleUnAuthorizedRequest(
+ abp.ajax.showError(abp.ajax.defaultError401),
+ abp.appPath
+ );
+ break;
+ case 403:
+ abp.ajax.showError(abp.ajax.defaultError403);
+ break;
+ case 404:
+ abp.ajax.showError(abp.ajax.defaultError404);
+ break;
+ default:
+ abp.ajax.showError(abp.ajax.defaultError);
+ break;
+ }
+ },
+
+ handleNonAbpErrorResponse: function (jqXHR, userOptions, $dfd) {
+ if (userOptions.abpHandleError !== false) {
+ abp.ajax.handleErrorStatusCode(jqXHR.status);
+ }
+
+ $dfd.reject.apply(this, arguments);
+ userOptions.error && userOptions.error.apply(this, arguments);
+ },
+
+ handleAbpErrorResponse: function (jqXHR, userOptions, $dfd) {
+ var messagePromise = null;
+
+ if (userOptions.abpHandleError !== false) {
+ messagePromise = abp.ajax.showError(jqXHR.responseJSON.error);
+ }
+
+ abp.ajax.logError(jqXHR.responseJSON.error);
+
+ $dfd && $dfd.reject(jqXHR.responseJSON.error, jqXHR);
+ userOptions.error && userOptions.error(jqXHR.responseJSON.error, jqXHR);
+
+ if (jqXHR.status === 401 && userOptions.abpHandleError !== false) {
+ abp.ajax.handleUnAuthorizedRequest(messagePromise);
+ }
+ },
+
+ handleUnAuthorizedRequest: function (messagePromise, targetUrl) {
+ if (messagePromise) {
+ messagePromise.done(function () {
+ abp.ajax.handleTargetUrl(targetUrl);
+ });
+ } else {
+ abp.ajax.handleTargetUrl(targetUrl);
+ }
+ },
+
+ blockUI: function (options) {
+ if (options.blockUI) {
+ if (options.blockUI === true) { //block whole page
+ abp.ui.setBusy();
+ } else { //block an element
+ abp.ui.setBusy(options.blockUI);
+ }
+ }
+ },
+
+ unblockUI: function (options) {
+ if (options.blockUI) {
+ if (options.blockUI === true) { //unblock whole page
+ abp.ui.clearBusy();
+ } else { //unblock an element
+ abp.ui.clearBusy(options.blockUI);
+ }
+ }
+ },
+
+ ajaxSendHandler: function (event, request, settings) {
+ var token = abp.security.antiForgery.getToken();
+ if (!token) {
+ return;
+ }
+
+ if (!settings.headers || settings.headers[abp.security.antiForgery.tokenHeaderName] === undefined) {
+ request.setRequestHeader(abp.security.antiForgery.tokenHeaderName, token);
+ }
+ }
+ });
+
+ $(document).ajaxSend(function (event, request, settings) {
+ return abp.ajax.ajaxSendHandler(event, request, settings);
+ });
+
+ abp.event.on('abp.configurationInitialized', function () {
+ var l = abp.localization.getResource('AbpUi');
+
+ abp.ajax.defaultError.message = l('DefaultErrorMessage');
+ abp.ajax.defaultError.details = l('DefaultErrorMessageDetail');
+ abp.ajax.defaultError401.message = l('DefaultErrorMessage401');
+ abp.ajax.defaultError401.details = l('DefaultErrorMessage401Detail');
+ abp.ajax.defaultError403.message = l('DefaultErrorMessage403');
+ abp.ajax.defaultError403.details = l('DefaultErrorMessage403Detail');
+ abp.ajax.defaultError404.message = l('DefaultErrorMessage404');
+ abp.ajax.defaultError404.details = l('DefaultErrorMessage404Detail');
+ });
+
+ // RESOURCE LOADER ////////////////////////////////////////////////////////
+
+ /* UrlStates enum */
+ var UrlStates = {
+ LOADING: 'LOADING',
+ LOADED: 'LOADED',
+ FAILED: 'FAILED'
+ };
+
+ /* UrlInfo class */
+ function UrlInfo(url) {
+ this.url = url;
+ this.state = UrlStates.LOADING;
+ this.loadCallbacks = [];
+ this.failCallbacks = [];
+ }
+
+ UrlInfo.prototype.succeed = function () {
+ this.state = UrlStates.LOADED;
+ for (var i = 0; i < this.loadCallbacks.length; i++) {
+ this.loadCallbacks[i]();
+ }
+ };
+
+ UrlInfo.prototype.failed = function () {
+ this.state = UrlStates.FAILED;
+ for (var i = 0; i < this.failCallbacks.length; i++) {
+ this.failCallbacks[i]();
+ }
+ };
+
+ UrlInfo.prototype.handleCallbacks = function (loadCallback, failCallback) {
+ switch (this.state) {
+ case UrlStates.LOADED:
+ loadCallback && loadCallback();
+ break;
+ case UrlStates.FAILED:
+ failCallback && failCallback();
+ break;
+ case UrlStates.LOADING:
+ this.addCallbacks(loadCallback, failCallback);
+ break;
+ }
+ };
+
+ UrlInfo.prototype.addCallbacks = function (loadCallback, failCallback) {
+ loadCallback && this.loadCallbacks.push(loadCallback);
+ failCallback && this.failCallbacks.push(failCallback);
+ };
+
+ /* ResourceLoader API */
+
+ abp.ResourceLoader = (function () {
+
+ var _urlInfos = {};
+
+ function getCacheKey(url) {
+ return url;
+ }
+
+ function appendTimeToUrl(url) {
+
+ if (url.indexOf('?') < 0) {
+ url += '?';
+ } else {
+ url += '&';
+ }
+
+ url += '_=' + new Date().getTime();
+
+ return url;
+ }
+
+ var _loadFromUrl = function (url, loadCallback, failCallback, serverLoader) {
+
+ var cacheKey = getCacheKey(url);
+
+ var urlInfo = _urlInfos[cacheKey];
+
+ if (urlInfo) {
+ urlInfo.handleCallbacks(loadCallback, failCallback);
+ return;
+ }
+
+ _urlInfos[cacheKey] = urlInfo = new UrlInfo(url);
+ urlInfo.addCallbacks(loadCallback, failCallback);
+
+ serverLoader(urlInfo);
+ };
+
+ var _loadScript = function (url, loadCallback, failCallback) {
+ _loadFromUrl(url, loadCallback, failCallback, function (urlInfo) {
+ $.get({
+ url: url,
+ dataType: 'text'
+ })
+ .done(function (script) {
+ $.globalEval(script);
+ urlInfo.succeed();
+ })
+ .fail(function () {
+ urlInfo.failed();
+ });
+ });
+ };
+
+ var _loadStyle = function (url) {
+ _loadFromUrl(url, undefined, undefined, function (urlInfo) {
+
+ $('', {
+ rel: 'stylesheet',
+ type: 'text/css',
+ href: appendTimeToUrl(url)
+ }).appendTo('head');
+ });
+ };
+
+ return {
+ loadScript: _loadScript,
+ loadStyle: _loadStyle
+ }
+ })();
+
})(jQuery);
\ No newline at end of file
diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/yarn.lock b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/yarn.lock
index 7230736133..b3b0eb268b 100644
--- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/yarn.lock
+++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/yarn.lock
@@ -2,37 +2,37 @@
# yarn lockfile v1
-"@abp/aspnetcore.mvc.ui.theme.basic@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.basic/-/aspnetcore.mvc.ui.theme.basic-2.1.0.tgz#f815001bd856fb5cbdd0b736181f2401a1a7ec62"
- integrity sha512-ej6dhUo3H9w6bpBTpMhk3M6zbC3fVAVMm5yLSYlYJ0sQxjb9PqC02OgiJme0mkxCUMwPuHVSQLrMQbioXdZu3A==
+"@abp/aspnetcore.mvc.ui.theme.basic@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.basic/-/aspnetcore.mvc.ui.theme.basic-2.2.0.tgz#e7f4e57d2b17cc76388e9c56bc34d50c9658873b"
+ integrity sha512-S9GQ9YVg4DWrgjujwiXBER6KqdqW5nZ1Bmt+YEePn5gEoPvoVrh6ojthpHYRjBJtGFqBSzRAQ9eVZLebT22Ozg==
dependencies:
- "@abp/aspnetcore.mvc.ui.theme.shared" "^2.1.0"
+ "@abp/aspnetcore.mvc.ui.theme.shared" "^2.2.0"
-"@abp/aspnetcore.mvc.ui.theme.shared@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.shared/-/aspnetcore.mvc.ui.theme.shared-2.1.0.tgz#c2790241b5a44b9d6e4f65911a1b9d9e9104ed82"
- integrity sha512-dxC0P/b1T+QJmRrB8HoLM7/GkWblz/X5lLqgn583W7/OTYhvxIxszuRDy/XIEuS+fP6a9rcGvGu5jcKJEqe/xA==
- dependencies:
- "@abp/aspnetcore.mvc.ui" "^2.1.0"
- "@abp/bootstrap" "^2.1.0"
- "@abp/bootstrap-datepicker" "^2.1.0"
- "@abp/datatables.net-bs4" "^2.1.0"
- "@abp/font-awesome" "^2.1.0"
- "@abp/jquery-form" "^2.1.0"
- "@abp/jquery-validation-unobtrusive" "^2.1.0"
- "@abp/lodash" "^2.1.0"
- "@abp/luxon" "^2.1.0"
- "@abp/malihu-custom-scrollbar-plugin" "^2.1.0"
- "@abp/select2" "^2.1.0"
- "@abp/sweetalert" "^2.1.0"
- "@abp/timeago" "^2.1.0"
- "@abp/toastr" "^2.1.0"
-
-"@abp/aspnetcore.mvc.ui@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui/-/aspnetcore.mvc.ui-2.1.0.tgz#3c86f42e52af3151d2aee0ffdd1281014ea61054"
- integrity sha512-pKiKMBOPuLm7p44DW8DdbsVn5PY3NqGYkz6gf75uzxyWiVYyl2CM/bvX9w4Ie7Q969owENMLrBREN6ezWZ5ynA==
+"@abp/aspnetcore.mvc.ui.theme.shared@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.shared/-/aspnetcore.mvc.ui.theme.shared-2.2.0.tgz#e0df953853be2a184d323931573f9f98aebbaa62"
+ integrity sha512-urxziaCdvfEqN5cjiiM5f5dx2Yr+AoGqCJVCo0Okjl2dosdaj5DH4SBzMvKAaLXzo3Ep1h4b3Wvws4BThL/6rA==
+ dependencies:
+ "@abp/aspnetcore.mvc.ui" "^2.2.0"
+ "@abp/bootstrap" "^2.2.0"
+ "@abp/bootstrap-datepicker" "^2.2.0"
+ "@abp/datatables.net-bs4" "^2.2.0"
+ "@abp/font-awesome" "^2.2.0"
+ "@abp/jquery-form" "^2.2.0"
+ "@abp/jquery-validation-unobtrusive" "^2.2.0"
+ "@abp/lodash" "^2.2.0"
+ "@abp/luxon" "^2.2.0"
+ "@abp/malihu-custom-scrollbar-plugin" "^2.2.0"
+ "@abp/select2" "^2.2.0"
+ "@abp/sweetalert" "^2.2.0"
+ "@abp/timeago" "^2.2.0"
+ "@abp/toastr" "^2.2.0"
+
+"@abp/aspnetcore.mvc.ui@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui/-/aspnetcore.mvc.ui-2.2.0.tgz#b2cdd421eed09ec1d30ae85e14434b7efc094ade"
+ integrity sha512-IO/AjhJu+LUa9zOaT8JlEnV+Pcp9oQ3q9kTq8kmMakC35vTIyvBpB3nnykXIOytZSyjsBgFYB/uMxPgBOjWagg==
dependencies:
ansi-colors "^4.1.1"
extend-object "^1.0.0"
@@ -41,135 +41,135 @@
path "^0.12.7"
rimraf "^3.0.0"
-"@abp/bootstrap-datepicker@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/bootstrap-datepicker/-/bootstrap-datepicker-2.1.0.tgz#a0d71da15cb3d3cc02f9a390437a44db5e9f9ea1"
- integrity sha512-lkNI0iyefiXS2O5x9Ae9eJQLPXSQlOWDX7QhKnBHLR9JxjJEnhBUIIOylMltAIqtVDtjk2ikDyd3BAiyBdtB/w==
+"@abp/bootstrap-datepicker@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/bootstrap-datepicker/-/bootstrap-datepicker-2.2.0.tgz#a2f50b422824f18ed4b7e80be6852e2979119f8e"
+ integrity sha512-X9jT5mU42QFfVhOZdun7aEJUf3bMko6NsG3NFQVjqTqKH+iYGKfHPFpXD0gP/6Nb4KgZUdId8hSyQTZyOK2JEA==
dependencies:
bootstrap-datepicker "^1.9.0"
-"@abp/bootstrap@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/bootstrap/-/bootstrap-2.1.0.tgz#7ce15d4effac0e0991a3520c4666c6cb17a3fef2"
- integrity sha512-1xQjqu6shCgzd1FI94y5AIXGIhBlZEoRrOhaT84j/2KzYiDvhP+LAqQjMgqlQmBLs6vMckpxtf5thxKTMXvtOw==
+"@abp/bootstrap@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/bootstrap/-/bootstrap-2.2.0.tgz#16e41d3432117bbcd9012c6f735c49c543255879"
+ integrity sha512-aRmluu6SkIl+JgCzSSJZrDPkYr6WWaQdY0iJAOz6NHtffa7Aumh1IUOrLVKL0T1pQn6QKs0Z7JDGyYMdh1HPkQ==
dependencies:
- "@abp/core" "^2.1.0"
+ "@abp/core" "^2.2.0"
bootstrap "^4.3.1"
-"@abp/core@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/core/-/core-2.1.0.tgz#0cd2850f029df1d18517b8e74c70341972c37ed7"
- integrity sha512-1wnRo00hWncZWSakaEXm388XhhbKXDVkWDIdaT3kyQpvp3kX1lFx7I5iiZiwIeULwZRF9mi6HV6iHEze58x0kQ==
+"@abp/core@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/core/-/core-2.2.0.tgz#4eea0a06458c90acb8566a11eb841fe65d15d256"
+ integrity sha512-tBGHa5CUr0ewT31g689RAfQ6Su2p4uyn2PzmrW/8lahBrvqkoCb41fkCDLQJkTY5rKPrEKZd/s9OoyOnS20DLg==
-"@abp/datatables.net-bs4@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/datatables.net-bs4/-/datatables.net-bs4-2.1.0.tgz#a0f36cf4e3ef96ae03aa4b9956fcb8b971c854cb"
- integrity sha512-93qc2rrGs+JKRPM/7UCasa5VmfswgYU8cv3Ybg5OKoaASODYUn06GChRFnd/mvqcDxw4+8gaqpC3U2ETZZI4pA==
+"@abp/datatables.net-bs4@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/datatables.net-bs4/-/datatables.net-bs4-2.2.0.tgz#c7cc49e889b295ae10fb24ed62b154ef79ffc85a"
+ integrity sha512-zjJRPqOCWPfkHt1QztfFHKrsTE9o6Je2EpfA7hRMej2FlGbsMWUxOqx/btK1vjD6YIU8DtVDpIdj1WvPOITQ4Q==
dependencies:
- "@abp/datatables.net" "^2.1.0"
+ "@abp/datatables.net" "^2.2.0"
datatables.net-bs4 "^1.10.20"
-"@abp/datatables.net@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/datatables.net/-/datatables.net-2.1.0.tgz#674eaaa5b0948d7ee85b6605bfbad1a70f839aa7"
- integrity sha512-3ZM2p+JpHumxbIKlDP/LKLsfceMdttdTOL0ckIZCmAAgoIeKmAtuMoKcHTr8lj5mjgv4arBGvG9WVCemep2PEw==
+"@abp/datatables.net@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/datatables.net/-/datatables.net-2.2.0.tgz#22f9c7ca90c2d4af264483b4f8286b0feb7c3d52"
+ integrity sha512-L4MnpdloSWr/px3mvV75sxsxL68MyALB2LKdzCFMQWILCZVkxMmQb9LARINYIrn461Wrc+zbYWNEBD0MAq7flg==
dependencies:
- "@abp/core" "^2.1.0"
+ "@abp/core" "^2.2.0"
datatables.net "^1.10.20"
-"@abp/font-awesome@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/font-awesome/-/font-awesome-2.1.0.tgz#c2e628a1b9d0525e7d6950bf007feebcd1c490c8"
- integrity sha512-vlm1IQuQVfuCI2O1vphDd11zUEJ4/4PU0/0XI1YCpilse8fBg080CM3+G0kw6Erm/riznqhOJwBcfT+K+zqk8A==
+"@abp/font-awesome@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/font-awesome/-/font-awesome-2.2.0.tgz#2de39e3c6c3e8c30394d82861761a66c5b4032f0"
+ integrity sha512-RT06MYUGgaWBEpW5c7wUcfMXgxcOHWdX/C01LDO/j6iVoKBuBHOkkvcUoTWII068ECrLYOkj+RyT59dCKm8FFw==
dependencies:
- "@abp/core" "^2.1.0"
+ "@abp/core" "^2.2.0"
"@fortawesome/fontawesome-free" "^5.11.2"
-"@abp/jquery-form@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/jquery-form/-/jquery-form-2.1.0.tgz#285dbfdcf722cb0249f149e728cef7f788410c0c"
- integrity sha512-A17rjHTiBJBKYgrtDX5wIqnI89wNmo3bdK9NagL1wMFj4GvDyOZoRIDLqkopYQsc8zuPjqw4+1aa2TPiA+jtKg==
+"@abp/jquery-form@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/jquery-form/-/jquery-form-2.2.0.tgz#951653fac4013a7bbec065b5101b86d575e0eca7"
+ integrity sha512-ji44E3Ud0S3LNXn1WJ/Aw44qAIG7EITEW1KOe46oz+/awPpbiiA4dDDNleTvO2jI2/s8mNyR0bNanP6BUsc7tw==
dependencies:
- "@abp/jquery" "^2.1.0"
+ "@abp/jquery" "^2.2.0"
jquery-form "^4.2.2"
-"@abp/jquery-validation-unobtrusive@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-2.1.0.tgz#fc938775ced2efc686e7dd092d6ceff1ea947f36"
- integrity sha512-a8iBIj6amJ9rQNV+wxQUuEVh93M/c32kJcrwSEPWQcOoTj5gf0j8eKK9YvZaGokpylraz9mdGOwYQQuNj1sxEw==
+"@abp/jquery-validation-unobtrusive@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-2.2.0.tgz#6d39ba9f7bf026d1380796bf5dff76c8d16b42ce"
+ integrity sha512-SuS/dRRVz7ZR4HK/h9x0jRRVLPqXN0CPRGPdJZ1LJraXVEJ9/eDEGf1rMlHmEGt1FXXFTD01/zjisbweDE786w==
dependencies:
- "@abp/jquery-validation" "^2.1.0"
+ "@abp/jquery-validation" "^2.2.0"
jquery-validation-unobtrusive "^3.2.11"
-"@abp/jquery-validation@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/jquery-validation/-/jquery-validation-2.1.0.tgz#2bf1a31321cce3b2abe6d56c6112c52a8ecb28b6"
- integrity sha512-kU6/E+Xc3wHAUs+sGMAL8uozkXv65HnpksTwV4/+RK+D6iFU2EyNgCEFu7QGSwYZsV1/7YsCe2GD4ucBXIknbA==
+"@abp/jquery-validation@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/jquery-validation/-/jquery-validation-2.2.0.tgz#02bb8ba883e72c1204867ee4d1c1094bd91c4c4c"
+ integrity sha512-ypITQloO4iEDgqlA6qb3taj+7HMX0Cf/ACA2OvtrvOgJejx6J4wfrPjwuFZu1WWJ0xtc9yTdbovdcSVcQbIGaA==
dependencies:
- "@abp/jquery" "^2.1.0"
+ "@abp/jquery" "^2.2.0"
jquery-validation "^1.19.1"
-"@abp/jquery@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/jquery/-/jquery-2.1.0.tgz#fb5b4c9e8622cf46fee92f9f731d007d5fb200bb"
- integrity sha512-ZpfzRut5G611bBmuDdiT6BD0M7Rl1P6r8uNxUjdmFXYwFd8wD02ZhIcsX7qFHFkYERuXfcLrZh4rpw9G1DVCJg==
+"@abp/jquery@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/jquery/-/jquery-2.2.0.tgz#0e641b1109e78eff4c34331ca2b123b67cc30cbe"
+ integrity sha512-vEfRoFEAmDmRgSq98Y9EZExfQFSWtmjaHrodUu+MadTcRlnn+wHq8wwkKKxpj/eYtNc8aFORpyHMMH7uliAKxg==
dependencies:
- "@abp/core" "^2.1.0"
+ "@abp/core" "^2.2.0"
jquery "^3.4.1"
-"@abp/lodash@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/lodash/-/lodash-2.1.0.tgz#9fc9e6521e6284d607cedbff1a458fa324137c5c"
- integrity sha512-s1gTHhpbmEDDCsZeXb9MpClkDS4wH5R2IWPRZUlSPxo3gF0pvkx5ubdhYUEUgqy5QqWxE/+zUAjDc4x+cEriFQ==
+"@abp/lodash@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/lodash/-/lodash-2.2.0.tgz#af0a2ebcb28fd0a8c02da5026479d9370ed19719"
+ integrity sha512-wOMLqIpuq4a7ww7pB138G6YxBiTGBgxNW/IWGUiWbfgrr88cGPKIYYv/8O8mvr8PLNGjizNynuwQRj522yA3Dw==
dependencies:
- "@abp/core" "^2.1.0"
+ "@abp/core" "^2.2.0"
lodash "^4.17.15"
-"@abp/luxon@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/luxon/-/luxon-2.1.0.tgz#624796722119f075119006b436054aecbb38f15f"
- integrity sha512-2b0sRo6rdYT1wDu9nSXm/9o8rhQ9ED7FxrDMYabYuOQz48esgn4fBUNcPqpxwejpFmlhZY6CONvkddNtaMeVHw==
+"@abp/luxon@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/luxon/-/luxon-2.2.0.tgz#0d0e78edc249853fa31eceecc00df2846a879aa9"
+ integrity sha512-WbOW0PcMks+WXRPWt/+H4pOa5waM331WkY0F+EJx8fpxemNGQNUEXLkuMXzN3MrN6LrplM9AZ9i+NRA9PWHbNw==
dependencies:
luxon "^1.21.3"
-"@abp/malihu-custom-scrollbar-plugin@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-2.1.0.tgz#f4dc1a32cefc3de8af08cb6d585ec5f7636a0c5e"
- integrity sha512-WcxzCZ5YOMxGxZerEh966cVrFSCw1UTDqwU2rxA/LsHEbPKd69AY+SHvUiacNxPXs1ZCF6FFJ29C5dWicEIRaQ==
+"@abp/malihu-custom-scrollbar-plugin@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-2.2.0.tgz#e11fd46dccbb28d44fb199e880b91d27c94f1919"
+ integrity sha512-YDu/NLpIzMA96NDHxd27/+liTm3sow9M+oWH29+9JW8o/AEpXUH3T3AmoXXcTgsBlzLaewgHEFM8yxsAAFoj8Q==
dependencies:
- "@abp/core" "^2.1.0"
+ "@abp/core" "^2.2.0"
malihu-custom-scrollbar-plugin "^3.1.5"
-"@abp/select2@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/select2/-/select2-2.1.0.tgz#79e50d2c25e74a5f96520e8aa1433d79aea674d1"
- integrity sha512-ut/3c+lFdoepuDH36M7thWagmAmTFrChcPnhYjTx4MmIf31WW1BwqOSx3I2g8M+NEEx+V2jTNuBpTq7PONgSJg==
+"@abp/select2@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/select2/-/select2-2.2.0.tgz#4639d4e5b72b1736fa4476bd9b6a78e036400421"
+ integrity sha512-tc87JyM0kvVF388kyGUjDby49Zrrb089jVRRipoIaxXeu4M1YxEFSKBEcUK1MohZWjVtWrNs8MoxPlfukaMpyw==
dependencies:
- "@abp/core" "^2.1.0"
+ "@abp/core" "^2.2.0"
select2 "^4.0.12"
-"@abp/sweetalert@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/sweetalert/-/sweetalert-2.1.0.tgz#88f405c4ba9f9ed2fd54b945ed6bc48d5ae2fa23"
- integrity sha512-EWvReqxZ1DrNH9XD+cf/yGVj+8IPTpuoPuWKDryN4fF7TCMJA+KrXp5lFxpjfkKTtNzLeFGsJqDFWaUifxtqTA==
+"@abp/sweetalert@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/sweetalert/-/sweetalert-2.2.0.tgz#dfc60ba085522d8390e41b90bf5a3d474f4ae624"
+ integrity sha512-HS6TKOwP91UjzjZHaheurZ1AYUSMkQyCSmoX6g5LAK4eH8IIgpojVSp1AFCSPATrFsFWY/dzkDGcfu90FWsVBg==
dependencies:
- "@abp/core" "^2.1.0"
+ "@abp/core" "^2.2.0"
sweetalert "^2.1.2"
-"@abp/timeago@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/timeago/-/timeago-2.1.0.tgz#28c0aef88aff8b54d1dfb42a664d05097e7fda35"
- integrity sha512-NklUYcWeji7po+Y6Oi7b7IkYmjd5YRu123bm3MqjQ71AzuOCTFbvPMHzYOjrUTkzr6gW3IJ24LQ4YmpshPy4ZQ==
+"@abp/timeago@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/timeago/-/timeago-2.2.0.tgz#9a8297f36a46cdc4cc62f44d0fdc91b70def389c"
+ integrity sha512-8qjmKscsTvPznHKWEsddYxdSBiU+l+OgLG6vzMcSWqngYbDQGXqNA93BwJI2qiwd+FkNcfGgYg7CN7bcwzmaiw==
dependencies:
- "@abp/jquery" "^2.1.0"
+ "@abp/jquery" "^2.2.0"
timeago "^1.6.7"
-"@abp/toastr@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/toastr/-/toastr-2.1.0.tgz#22a53a2b1f354770fdc7b37f06bec10eefccfe7a"
- integrity sha512-hD3hTDx+CixTVTx73rnZDiiFkfSxpZox8RLm+CiFA62ORdO8Ryij8TOXXkJd84b2tJfkAkYehohVXKwHlHU7Zg==
+"@abp/toastr@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/toastr/-/toastr-2.2.0.tgz#1cad83a89da244685b3c82adff64260b7ccf4742"
+ integrity sha512-HHfSaw4M/9zS+KgzxGvbHYiQ5qcJgpf21cRZEo16aUwnTeKr4SRaewAWryNn4dKcIO2YNrhzDLH+OYbEaJJlDQ==
dependencies:
- "@abp/jquery" "^2.1.0"
+ "@abp/jquery" "^2.2.0"
toastr "^2.1.4"
"@fortawesome/fontawesome-free@^5.11.2":
diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/package.json b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/package.json
index b620e756f7..6e36dde3bf 100644
--- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/package.json
+++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/package.json
@@ -3,6 +3,6 @@
"name": "my-app",
"private": true,
"dependencies": {
- "@abp/aspnetcore.mvc.ui.theme.basic": "^2.1.0"
+ "@abp/aspnetcore.mvc.ui.theme.basic": "^2.2.0"
}
}
\ No newline at end of file
diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/wwwroot/libs/abp/core/abp.css b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/wwwroot/libs/abp/core/abp.css
index ee3c5080a5..ddf9cae5b2 100644
--- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/wwwroot/libs/abp/core/abp.css
+++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/wwwroot/libs/abp/core/abp.css
@@ -1,56 +1,56 @@
-@keyframes spin {
- 0% {
- transform: translateZ(0) rotate(0deg);
- }
-
- 100% {
- transform: translateZ(0) rotate(360deg);
- }
-}
-
-.abp-block-area {
- position: fixed;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- z-index: 102;
- background-color: #fff;
- opacity: .8;
- transition: opacity .25s;
-}
-
- .abp-block-area.abp-block-area-disappearing {
- opacity: 0;
- }
-
- .abp-block-area.abp-block-area-busy:after {
- content: attr(data-text);
- display: block;
- max-width: 125px;
- position: absolute;
- top: 50%;
- left: 50%;
- transform: translate(-50%, -50%);
- font-size: 20px;
- font-family: sans-serif;
- color: #343a40;
- text-align: center;
- text-transform: uppercase;
- }
-
- .abp-block-area.abp-block-area-busy:before {
- content: "";
- display: block;
- width: 150px;
- height: 150px;
- border-radius: 50%;
- border-width: 2px;
- border-style: solid;
- border-color: transparent #228ae6 #228ae6 #228ae6;
- position: absolute;
- top: calc(50% - 75px);
- left: calc(50% - 75px);
- will-change: transform;
- animation: spin .75s infinite ease-in-out;
- }
+@keyframes spin {
+ 0% {
+ transform: translateZ(0) rotate(0deg);
+ }
+
+ 100% {
+ transform: translateZ(0) rotate(360deg);
+ }
+}
+
+.abp-block-area {
+ position: fixed;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ z-index: 102;
+ background-color: #fff;
+ opacity: .8;
+ transition: opacity .25s;
+}
+
+ .abp-block-area.abp-block-area-disappearing {
+ opacity: 0;
+ }
+
+ .abp-block-area.abp-block-area-busy:after {
+ content: attr(data-text);
+ display: block;
+ max-width: 125px;
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ transform: translate(-50%, -50%);
+ font-size: 20px;
+ font-family: sans-serif;
+ color: #343a40;
+ text-align: center;
+ text-transform: uppercase;
+ }
+
+ .abp-block-area.abp-block-area-busy:before {
+ content: "";
+ display: block;
+ width: 150px;
+ height: 150px;
+ border-radius: 50%;
+ border-width: 2px;
+ border-style: solid;
+ border-color: transparent #228ae6 #228ae6 #228ae6;
+ position: absolute;
+ top: calc(50% - 75px);
+ left: calc(50% - 75px);
+ will-change: transform;
+ animation: spin .75s infinite ease-in-out;
+ }
diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/wwwroot/libs/abp/core/abp.js b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/wwwroot/libs/abp/core/abp.js
index cef1cf55e1..730db8bc97 100644
--- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/wwwroot/libs/abp/core/abp.js
+++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/wwwroot/libs/abp/core/abp.js
@@ -1,636 +1,636 @@
-var abp = abp || {};
-(function () {
-
- /* Application paths *****************************************/
-
- //Current application root path (including virtual directory if exists).
- abp.appPath = abp.appPath || '/';
-
- abp.pageLoadTime = new Date();
-
- //Converts given path to absolute path using abp.appPath variable.
- abp.toAbsAppPath = function (path) {
- if (path.indexOf('/') == 0) {
- path = path.substring(1);
- }
-
- return abp.appPath + path;
- };
-
- /* LOGGING ***************************************************/
- //Implements Logging API that provides secure & controlled usage of console.log
-
- abp.log = abp.log || {};
-
- abp.log.levels = {
- DEBUG: 1,
- INFO: 2,
- WARN: 3,
- ERROR: 4,
- FATAL: 5
- };
-
- abp.log.level = abp.log.levels.DEBUG;
-
- abp.log.log = function (logObject, logLevel) {
- if (!window.console || !window.console.log) {
- return;
- }
-
- if (logLevel != undefined && logLevel < abp.log.level) {
- return;
- }
-
- console.log(logObject);
- };
-
- abp.log.debug = function (logObject) {
- abp.log.log("DEBUG: ", abp.log.levels.DEBUG);
- abp.log.log(logObject, abp.log.levels.DEBUG);
- };
-
- abp.log.info = function (logObject) {
- abp.log.log("INFO: ", abp.log.levels.INFO);
- abp.log.log(logObject, abp.log.levels.INFO);
- };
-
- abp.log.warn = function (logObject) {
- abp.log.log("WARN: ", abp.log.levels.WARN);
- abp.log.log(logObject, abp.log.levels.WARN);
- };
-
- abp.log.error = function (logObject) {
- abp.log.log("ERROR: ", abp.log.levels.ERROR);
- abp.log.log(logObject, abp.log.levels.ERROR);
- };
-
- abp.log.fatal = function (logObject) {
- abp.log.log("FATAL: ", abp.log.levels.FATAL);
- abp.log.log(logObject, abp.log.levels.FATAL);
- };
-
- /* LOCALIZATION ***********************************************/
-
- abp.localization = abp.localization || {};
-
- abp.localization.values = {};
-
- abp.localization.localize = function (key, sourceName) {
- sourceName = sourceName || abp.localization.defaultResourceName;
-
- var source = abp.localization.values[sourceName];
-
- if (!source) {
- abp.log.warn('Could not find localization source: ' + sourceName);
- return key;
- }
-
- var value = source[key];
- if (value == undefined) {
- return key;
- }
-
- var copiedArguments = Array.prototype.slice.call(arguments, 0);
- copiedArguments.splice(1, 1);
- copiedArguments[0] = value;
-
- return abp.utils.formatString.apply(this, copiedArguments);
- };
-
- abp.localization.getResource = function (name) {
- return function () {
- var copiedArguments = Array.prototype.slice.call(arguments, 0);
- copiedArguments.splice(1, 0, name);
- return abp.localization.localize.apply(this, copiedArguments);
- };
- };
-
- abp.localization.defaultResourceName = undefined;
-
- /* AUTHORIZATION **********************************************/
-
- abp.auth = abp.auth || {};
-
- abp.auth.policies = abp.auth.policies || {};
-
- abp.auth.grantedPolicies = abp.auth.grantedPolicies || {};
-
- abp.auth.isGranted = function (policyName) {
- return abp.auth.policies[policyName] != undefined && abp.auth.grantedPolicies[policyName] != undefined;
- };
-
- abp.auth.isAnyGranted = function () {
- if (!arguments || arguments.length <= 0) {
- return true;
- }
-
- for (var i = 0; i < arguments.length; i++) {
- if (abp.auth.isGranted(arguments[i])) {
- return true;
- }
- }
-
- return false;
- };
-
- abp.auth.areAllGranted = function () {
- if (!arguments || arguments.length <= 0) {
- return true;
- }
-
- for (var i = 0; i < arguments.length; i++) {
- if (!abp.auth.isGranted(arguments[i])) {
- return false;
- }
- }
-
- return true;
- };
-
- abp.auth.tokenCookieName = 'Abp.AuthToken';
-
- abp.auth.setToken = function (authToken, expireDate) {
- abp.utils.setCookieValue(abp.auth.tokenCookieName, authToken, expireDate, abp.appPath, abp.domain);
- };
-
- abp.auth.getToken = function () {
- return abp.utils.getCookieValue(abp.auth.tokenCookieName);
- }
-
- abp.auth.clearToken = function () {
- abp.auth.setToken();
- }
-
- /* SETTINGS *************************************************/
-
- abp.setting = abp.setting || {};
-
- abp.setting.values = abp.setting.values || {};
-
- abp.setting.get = function (name) {
- return abp.setting.values[name];
- };
-
- abp.setting.getBoolean = function (name) {
- var value = abp.setting.get(name);
- return value == 'true' || value == 'True';
- };
-
- abp.setting.getInt = function (name) {
- return parseInt(abp.setting.values[name]);
- };
-
- /* NOTIFICATION *********************************************/
- //Defines Notification API, not implements it
-
- abp.notify = abp.notify || {};
-
- abp.notify.success = function (message, title, options) {
- abp.log.warn('abp.notify.success is not implemented!');
- };
-
- abp.notify.info = function (message, title, options) {
- abp.log.warn('abp.notify.info is not implemented!');
- };
-
- abp.notify.warn = function (message, title, options) {
- abp.log.warn('abp.notify.warn is not implemented!');
- };
-
- abp.notify.error = function (message, title, options) {
- abp.log.warn('abp.notify.error is not implemented!');
- };
-
- /* MESSAGE **************************************************/
- //Defines Message API, not implements it
-
- abp.message = abp.message || {};
-
- abp.message._showMessage = function (message, title) {
- alert((title || '') + ' ' + message);
- };
-
- abp.message.info = function (message, title) {
- abp.log.warn('abp.message.info is not implemented!');
- return abp.message._showMessage(message, title);
- };
-
- abp.message.success = function (message, title) {
- abp.log.warn('abp.message.success is not implemented!');
- return abp.message._showMessage(message, title);
- };
-
- abp.message.warn = function (message, title) {
- abp.log.warn('abp.message.warn is not implemented!');
- return abp.message._showMessage(message, title);
- };
-
- abp.message.error = function (message, title) {
- abp.log.warn('abp.message.error is not implemented!');
- return abp.message._showMessage(message, title);
- };
-
- abp.message.confirm = function (message, titleOrCallback, callback) {
- abp.log.warn('abp.message.confirm is not properly implemented!');
-
- if (titleOrCallback && !(typeof titleOrCallback == 'string')) {
- callback = titleOrCallback;
- }
-
- var result = confirm(message);
- callback && callback(result);
- };
-
- /* UI *******************************************************/
-
- abp.ui = abp.ui || {};
-
- /* UI BLOCK */
- //Defines UI Block API and implements basically
-
- var $abpBlockArea = document.createElement('div');
- $abpBlockArea.classList.add('abp-block-area');
-
- /* opts: { //Can be an object with options or a string for query a selector
- * elm: a query selector (optional - default: document.body)
- * busy: boolean (optional - default: false)
- * promise: A promise with always or finally handler (optional - auto unblocks the ui if provided)
- * }
- */
- abp.ui.block = function (opts) {
- if (!opts) {
- opts = {};
- } else if (typeof opts == 'string') {
- opts = {
- elm: opts
- };
- }
-
- var $elm = document.querySelector(opts.elm) || document.body;
-
- if (opts.busy) {
- $abpBlockArea.classList.add('abp-block-area-busy');
- } else {
- $abpBlockArea.classList.remove('abp-block-area-busy');
- }
-
- if (document.querySelector(opts.elm)) {
- $abpBlockArea.style.position = 'absolute';
- } else {
- $abpBlockArea.style.position = 'fixed';
- }
-
- $elm.appendChild($abpBlockArea);
-
- if (opts.promise) {
- if (opts.promise.always) { //jQuery.Deferred style
- opts.promise.always(function () {
- abp.ui.unblock({
- $elm: opts.elm
- });
- });
- } else if (opts.promise['finally']) { //Q style
- opts.promise['finally'](function () {
- abp.ui.unblock({
- $elm: opts.elm
- });
- });
- }
- }
- };
-
- /* opts: {
- *
- * }
- */
- abp.ui.unblock = function (opts) {
- var element = document.querySelector('.abp-block-area');
- if (element) {
- element.classList.add('abp-block-area-disappearing');
- setTimeout(function () {
- if (element) {
- element.classList.remove('abp-block-area-disappearing');
- element.parentElement.removeChild(element);
- }
- }, 250);
- }
- };
-
- /* UI BUSY */
- //Defines UI Busy API, not implements it
-
- abp.ui.setBusy = function (opts) {
- if (!opts) {
- opts = {
- busy: true
- };
- } else if (typeof opts == 'string') {
- opts = {
- elm: opts,
- busy: true
- };
- }
-
- abp.ui.block(opts);
- };
-
- abp.ui.clearBusy = function (opts) {
- abp.ui.unblock(opts);
- };
-
- /* SIMPLE EVENT BUS *****************************************/
-
- abp.event = (function () {
-
- var _callbacks = {};
-
- var on = function (eventName, callback) {
- if (!_callbacks[eventName]) {
- _callbacks[eventName] = [];
- }
-
- _callbacks[eventName].push(callback);
- };
-
- var off = function (eventName, callback) {
- var callbacks = _callbacks[eventName];
- if (!callbacks) {
- return;
- }
-
- var index = -1;
- for (var i = 0; i < callbacks.length; i++) {
- if (callbacks[i] === callback) {
- index = i;
- break;
- }
- }
-
- if (index < 0) {
- return;
- }
-
- _callbacks[eventName].splice(index, 1);
- };
-
- var trigger = function (eventName) {
- var callbacks = _callbacks[eventName];
- if (!callbacks || !callbacks.length) {
- return;
- }
-
- var args = Array.prototype.slice.call(arguments, 1);
- for (var i = 0; i < callbacks.length; i++) {
- callbacks[i].apply(this, args);
- }
- };
-
- // Public interface ///////////////////////////////////////////////////
-
- return {
- on: on,
- off: off,
- trigger: trigger
- };
- })();
-
-
- /* UTILS ***************************************************/
-
- abp.utils = abp.utils || {};
-
- /* Creates a name namespace.
- * Example:
- * var taskService = abp.utils.createNamespace(abp, 'services.task');
- * taskService will be equal to abp.services.task
- * first argument (root) must be defined first
- ************************************************************/
- abp.utils.createNamespace = function (root, ns) {
- var parts = ns.split('.');
- for (var i = 0; i < parts.length; i++) {
- if (typeof root[parts[i]] == 'undefined') {
- root[parts[i]] = {};
- }
-
- root = root[parts[i]];
- }
-
- return root;
- };
-
- /* Find and replaces a string (search) to another string (replacement) in
- * given string (str).
- * Example:
- * abp.utils.replaceAll('This is a test string', 'is', 'X') = 'ThX X a test string'
- ************************************************************/
- abp.utils.replaceAll = function (str, search, replacement) {
- var fix = search.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
- return str.replace(new RegExp(fix, 'g'), replacement);
- };
-
- /* Formats a string just like string.format in C#.
- * Example:
- * abp.utils.formatString('Hello {0}','Tuana') = 'Hello Tuana'
- ************************************************************/
- abp.utils.formatString = function () {
- if (arguments.length < 1) {
- return null;
- }
-
- var str = arguments[0];
-
- for (var i = 1; i < arguments.length; i++) {
- var placeHolder = '{' + (i - 1) + '}';
- str = abp.utils.replaceAll(str, placeHolder, arguments[i]);
- }
-
- return str;
- };
-
- abp.utils.toPascalCase = function (str) {
- if (!str || !str.length) {
- return str;
- }
-
- if (str.length === 1) {
- return str.charAt(0).toUpperCase();
- }
-
- return str.charAt(0).toUpperCase() + str.substr(1);
- }
-
- abp.utils.toCamelCase = function (str) {
- if (!str || !str.length) {
- return str;
- }
-
- if (str.length === 1) {
- return str.charAt(0).toLowerCase();
- }
-
- return str.charAt(0).toLowerCase() + str.substr(1);
- }
-
- abp.utils.truncateString = function (str, maxLength) {
- if (!str || !str.length || str.length <= maxLength) {
- return str;
- }
-
- return str.substr(0, maxLength);
- };
-
- abp.utils.truncateStringWithPostfix = function (str, maxLength, postfix) {
- postfix = postfix || '...';
-
- if (!str || !str.length || str.length <= maxLength) {
- return str;
- }
-
- if (maxLength <= postfix.length) {
- return postfix.substr(0, maxLength);
- }
-
- return str.substr(0, maxLength - postfix.length) + postfix;
- };
-
- abp.utils.isFunction = function (obj) {
- return !!(obj && obj.constructor && obj.call && obj.apply);
- };
-
- /**
- * parameterInfos should be an array of { name, value } objects
- * where name is query string parameter name and value is it's value.
- * includeQuestionMark is true by default.
- */
- abp.utils.buildQueryString = function (parameterInfos, includeQuestionMark) {
- if (includeQuestionMark === undefined) {
- includeQuestionMark = true;
- }
-
- var qs = '';
-
- function addSeperator() {
- if (!qs.length) {
- if (includeQuestionMark) {
- qs = qs + '?';
- }
- } else {
- qs = qs + '&';
- }
- }
-
- for (var i = 0; i < parameterInfos.length; ++i) {
- var parameterInfo = parameterInfos[i];
- if (parameterInfo.value === undefined) {
- continue;
- }
-
- if (parameterInfo.value === null) {
- parameterInfo.value = '';
- }
-
- addSeperator();
-
- if (parameterInfo.value.toJSON && typeof parameterInfo.value.toJSON === "function") {
- qs = qs + parameterInfo.name + '=' + encodeURIComponent(parameterInfo.value.toJSON());
- } else if (Array.isArray(parameterInfo.value) && parameterInfo.value.length) {
- for (var j = 0; j < parameterInfo.value.length; j++) {
- if (j > 0) {
- addSeperator();
- }
-
- qs = qs + parameterInfo.name + '[' + j + ']=' + encodeURIComponent(parameterInfo.value[j]);
- }
- } else {
- qs = qs + parameterInfo.name + '=' + encodeURIComponent(parameterInfo.value);
- }
- }
-
- return qs;
- }
-
- /**
- * Sets a cookie value for given key.
- * This is a simple implementation created to be used by ABP.
- * Please use a complete cookie library if you need.
- * @param {string} key
- * @param {string} value
- * @param {Date} expireDate (optional). If not specified the cookie will expire at the end of session.
- * @param {string} path (optional)
- */
- abp.utils.setCookieValue = function (key, value, expireDate, path) {
- var cookieValue = encodeURIComponent(key) + '=';
-
- if (value) {
- cookieValue = cookieValue + encodeURIComponent(value);
- }
-
- if (expireDate) {
- cookieValue = cookieValue + "; expires=" + expireDate.toUTCString();
- }
-
- if (path) {
- cookieValue = cookieValue + "; path=" + path;
- }
-
- document.cookie = cookieValue;
- };
-
- /**
- * Gets a cookie with given key.
- * This is a simple implementation created to be used by ABP.
- * Please use a complete cookie library if you need.
- * @param {string} key
- * @returns {string} Cookie value or null
- */
- abp.utils.getCookieValue = function (key) {
- var equalities = document.cookie.split('; ');
- for (var i = 0; i < equalities.length; i++) {
- if (!equalities[i]) {
- continue;
- }
-
- var splitted = equalities[i].split('=');
- if (splitted.length != 2) {
- continue;
- }
-
- if (decodeURIComponent(splitted[0]) === key) {
- return decodeURIComponent(splitted[1] || '');
- }
- }
-
- return null;
- };
-
- /**
- * Deletes cookie for given key.
- * This is a simple implementation created to be used by ABP.
- * Please use a complete cookie library if you need.
- * @param {string} key
- * @param {string} path (optional)
- */
- abp.utils.deleteCookie = function (key, path) {
- var cookieValue = encodeURIComponent(key) + '=';
-
- cookieValue = cookieValue + "; expires=" + (new Date(new Date().getTime() - 86400000)).toUTCString();
-
- if (path) {
- cookieValue = cookieValue + "; path=" + path;
- }
-
- document.cookie = cookieValue;
- }
-
- /* SECURITY ***************************************/
- abp.security = abp.security || {};
- abp.security.antiForgery = abp.security.antiForgery || {};
-
- abp.security.antiForgery.tokenCookieName = 'XSRF-TOKEN';
- abp.security.antiForgery.tokenHeaderName = 'X-XSRF-TOKEN';
-
- abp.security.antiForgery.getToken = function () {
- return abp.utils.getCookieValue(abp.security.antiForgery.tokenCookieName);
- };
-
+var abp = abp || {};
+(function () {
+
+ /* Application paths *****************************************/
+
+ //Current application root path (including virtual directory if exists).
+ abp.appPath = abp.appPath || '/';
+
+ abp.pageLoadTime = new Date();
+
+ //Converts given path to absolute path using abp.appPath variable.
+ abp.toAbsAppPath = function (path) {
+ if (path.indexOf('/') == 0) {
+ path = path.substring(1);
+ }
+
+ return abp.appPath + path;
+ };
+
+ /* LOGGING ***************************************************/
+ //Implements Logging API that provides secure & controlled usage of console.log
+
+ abp.log = abp.log || {};
+
+ abp.log.levels = {
+ DEBUG: 1,
+ INFO: 2,
+ WARN: 3,
+ ERROR: 4,
+ FATAL: 5
+ };
+
+ abp.log.level = abp.log.levels.DEBUG;
+
+ abp.log.log = function (logObject, logLevel) {
+ if (!window.console || !window.console.log) {
+ return;
+ }
+
+ if (logLevel != undefined && logLevel < abp.log.level) {
+ return;
+ }
+
+ console.log(logObject);
+ };
+
+ abp.log.debug = function (logObject) {
+ abp.log.log("DEBUG: ", abp.log.levels.DEBUG);
+ abp.log.log(logObject, abp.log.levels.DEBUG);
+ };
+
+ abp.log.info = function (logObject) {
+ abp.log.log("INFO: ", abp.log.levels.INFO);
+ abp.log.log(logObject, abp.log.levels.INFO);
+ };
+
+ abp.log.warn = function (logObject) {
+ abp.log.log("WARN: ", abp.log.levels.WARN);
+ abp.log.log(logObject, abp.log.levels.WARN);
+ };
+
+ abp.log.error = function (logObject) {
+ abp.log.log("ERROR: ", abp.log.levels.ERROR);
+ abp.log.log(logObject, abp.log.levels.ERROR);
+ };
+
+ abp.log.fatal = function (logObject) {
+ abp.log.log("FATAL: ", abp.log.levels.FATAL);
+ abp.log.log(logObject, abp.log.levels.FATAL);
+ };
+
+ /* LOCALIZATION ***********************************************/
+
+ abp.localization = abp.localization || {};
+
+ abp.localization.values = {};
+
+ abp.localization.localize = function (key, sourceName) {
+ sourceName = sourceName || abp.localization.defaultResourceName;
+
+ var source = abp.localization.values[sourceName];
+
+ if (!source) {
+ abp.log.warn('Could not find localization source: ' + sourceName);
+ return key;
+ }
+
+ var value = source[key];
+ if (value == undefined) {
+ return key;
+ }
+
+ var copiedArguments = Array.prototype.slice.call(arguments, 0);
+ copiedArguments.splice(1, 1);
+ copiedArguments[0] = value;
+
+ return abp.utils.formatString.apply(this, copiedArguments);
+ };
+
+ abp.localization.getResource = function (name) {
+ return function () {
+ var copiedArguments = Array.prototype.slice.call(arguments, 0);
+ copiedArguments.splice(1, 0, name);
+ return abp.localization.localize.apply(this, copiedArguments);
+ };
+ };
+
+ abp.localization.defaultResourceName = undefined;
+
+ /* AUTHORIZATION **********************************************/
+
+ abp.auth = abp.auth || {};
+
+ abp.auth.policies = abp.auth.policies || {};
+
+ abp.auth.grantedPolicies = abp.auth.grantedPolicies || {};
+
+ abp.auth.isGranted = function (policyName) {
+ return abp.auth.policies[policyName] != undefined && abp.auth.grantedPolicies[policyName] != undefined;
+ };
+
+ abp.auth.isAnyGranted = function () {
+ if (!arguments || arguments.length <= 0) {
+ return true;
+ }
+
+ for (var i = 0; i < arguments.length; i++) {
+ if (abp.auth.isGranted(arguments[i])) {
+ return true;
+ }
+ }
+
+ return false;
+ };
+
+ abp.auth.areAllGranted = function () {
+ if (!arguments || arguments.length <= 0) {
+ return true;
+ }
+
+ for (var i = 0; i < arguments.length; i++) {
+ if (!abp.auth.isGranted(arguments[i])) {
+ return false;
+ }
+ }
+
+ return true;
+ };
+
+ abp.auth.tokenCookieName = 'Abp.AuthToken';
+
+ abp.auth.setToken = function (authToken, expireDate) {
+ abp.utils.setCookieValue(abp.auth.tokenCookieName, authToken, expireDate, abp.appPath, abp.domain);
+ };
+
+ abp.auth.getToken = function () {
+ return abp.utils.getCookieValue(abp.auth.tokenCookieName);
+ }
+
+ abp.auth.clearToken = function () {
+ abp.auth.setToken();
+ }
+
+ /* SETTINGS *************************************************/
+
+ abp.setting = abp.setting || {};
+
+ abp.setting.values = abp.setting.values || {};
+
+ abp.setting.get = function (name) {
+ return abp.setting.values[name];
+ };
+
+ abp.setting.getBoolean = function (name) {
+ var value = abp.setting.get(name);
+ return value == 'true' || value == 'True';
+ };
+
+ abp.setting.getInt = function (name) {
+ return parseInt(abp.setting.values[name]);
+ };
+
+ /* NOTIFICATION *********************************************/
+ //Defines Notification API, not implements it
+
+ abp.notify = abp.notify || {};
+
+ abp.notify.success = function (message, title, options) {
+ abp.log.warn('abp.notify.success is not implemented!');
+ };
+
+ abp.notify.info = function (message, title, options) {
+ abp.log.warn('abp.notify.info is not implemented!');
+ };
+
+ abp.notify.warn = function (message, title, options) {
+ abp.log.warn('abp.notify.warn is not implemented!');
+ };
+
+ abp.notify.error = function (message, title, options) {
+ abp.log.warn('abp.notify.error is not implemented!');
+ };
+
+ /* MESSAGE **************************************************/
+ //Defines Message API, not implements it
+
+ abp.message = abp.message || {};
+
+ abp.message._showMessage = function (message, title) {
+ alert((title || '') + ' ' + message);
+ };
+
+ abp.message.info = function (message, title) {
+ abp.log.warn('abp.message.info is not implemented!');
+ return abp.message._showMessage(message, title);
+ };
+
+ abp.message.success = function (message, title) {
+ abp.log.warn('abp.message.success is not implemented!');
+ return abp.message._showMessage(message, title);
+ };
+
+ abp.message.warn = function (message, title) {
+ abp.log.warn('abp.message.warn is not implemented!');
+ return abp.message._showMessage(message, title);
+ };
+
+ abp.message.error = function (message, title) {
+ abp.log.warn('abp.message.error is not implemented!');
+ return abp.message._showMessage(message, title);
+ };
+
+ abp.message.confirm = function (message, titleOrCallback, callback) {
+ abp.log.warn('abp.message.confirm is not properly implemented!');
+
+ if (titleOrCallback && !(typeof titleOrCallback == 'string')) {
+ callback = titleOrCallback;
+ }
+
+ var result = confirm(message);
+ callback && callback(result);
+ };
+
+ /* UI *******************************************************/
+
+ abp.ui = abp.ui || {};
+
+ /* UI BLOCK */
+ //Defines UI Block API and implements basically
+
+ var $abpBlockArea = document.createElement('div');
+ $abpBlockArea.classList.add('abp-block-area');
+
+ /* opts: { //Can be an object with options or a string for query a selector
+ * elm: a query selector (optional - default: document.body)
+ * busy: boolean (optional - default: false)
+ * promise: A promise with always or finally handler (optional - auto unblocks the ui if provided)
+ * }
+ */
+ abp.ui.block = function (opts) {
+ if (!opts) {
+ opts = {};
+ } else if (typeof opts == 'string') {
+ opts = {
+ elm: opts
+ };
+ }
+
+ var $elm = document.querySelector(opts.elm) || document.body;
+
+ if (opts.busy) {
+ $abpBlockArea.classList.add('abp-block-area-busy');
+ } else {
+ $abpBlockArea.classList.remove('abp-block-area-busy');
+ }
+
+ if (document.querySelector(opts.elm)) {
+ $abpBlockArea.style.position = 'absolute';
+ } else {
+ $abpBlockArea.style.position = 'fixed';
+ }
+
+ $elm.appendChild($abpBlockArea);
+
+ if (opts.promise) {
+ if (opts.promise.always) { //jQuery.Deferred style
+ opts.promise.always(function () {
+ abp.ui.unblock({
+ $elm: opts.elm
+ });
+ });
+ } else if (opts.promise['finally']) { //Q style
+ opts.promise['finally'](function () {
+ abp.ui.unblock({
+ $elm: opts.elm
+ });
+ });
+ }
+ }
+ };
+
+ /* opts: {
+ *
+ * }
+ */
+ abp.ui.unblock = function (opts) {
+ var element = document.querySelector('.abp-block-area');
+ if (element) {
+ element.classList.add('abp-block-area-disappearing');
+ setTimeout(function () {
+ if (element) {
+ element.classList.remove('abp-block-area-disappearing');
+ element.parentElement.removeChild(element);
+ }
+ }, 250);
+ }
+ };
+
+ /* UI BUSY */
+ //Defines UI Busy API, not implements it
+
+ abp.ui.setBusy = function (opts) {
+ if (!opts) {
+ opts = {
+ busy: true
+ };
+ } else if (typeof opts == 'string') {
+ opts = {
+ elm: opts,
+ busy: true
+ };
+ }
+
+ abp.ui.block(opts);
+ };
+
+ abp.ui.clearBusy = function (opts) {
+ abp.ui.unblock(opts);
+ };
+
+ /* SIMPLE EVENT BUS *****************************************/
+
+ abp.event = (function () {
+
+ var _callbacks = {};
+
+ var on = function (eventName, callback) {
+ if (!_callbacks[eventName]) {
+ _callbacks[eventName] = [];
+ }
+
+ _callbacks[eventName].push(callback);
+ };
+
+ var off = function (eventName, callback) {
+ var callbacks = _callbacks[eventName];
+ if (!callbacks) {
+ return;
+ }
+
+ var index = -1;
+ for (var i = 0; i < callbacks.length; i++) {
+ if (callbacks[i] === callback) {
+ index = i;
+ break;
+ }
+ }
+
+ if (index < 0) {
+ return;
+ }
+
+ _callbacks[eventName].splice(index, 1);
+ };
+
+ var trigger = function (eventName) {
+ var callbacks = _callbacks[eventName];
+ if (!callbacks || !callbacks.length) {
+ return;
+ }
+
+ var args = Array.prototype.slice.call(arguments, 1);
+ for (var i = 0; i < callbacks.length; i++) {
+ callbacks[i].apply(this, args);
+ }
+ };
+
+ // Public interface ///////////////////////////////////////////////////
+
+ return {
+ on: on,
+ off: off,
+ trigger: trigger
+ };
+ })();
+
+
+ /* UTILS ***************************************************/
+
+ abp.utils = abp.utils || {};
+
+ /* Creates a name namespace.
+ * Example:
+ * var taskService = abp.utils.createNamespace(abp, 'services.task');
+ * taskService will be equal to abp.services.task
+ * first argument (root) must be defined first
+ ************************************************************/
+ abp.utils.createNamespace = function (root, ns) {
+ var parts = ns.split('.');
+ for (var i = 0; i < parts.length; i++) {
+ if (typeof root[parts[i]] == 'undefined') {
+ root[parts[i]] = {};
+ }
+
+ root = root[parts[i]];
+ }
+
+ return root;
+ };
+
+ /* Find and replaces a string (search) to another string (replacement) in
+ * given string (str).
+ * Example:
+ * abp.utils.replaceAll('This is a test string', 'is', 'X') = 'ThX X a test string'
+ ************************************************************/
+ abp.utils.replaceAll = function (str, search, replacement) {
+ var fix = search.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
+ return str.replace(new RegExp(fix, 'g'), replacement);
+ };
+
+ /* Formats a string just like string.format in C#.
+ * Example:
+ * abp.utils.formatString('Hello {0}','Tuana') = 'Hello Tuana'
+ ************************************************************/
+ abp.utils.formatString = function () {
+ if (arguments.length < 1) {
+ return null;
+ }
+
+ var str = arguments[0];
+
+ for (var i = 1; i < arguments.length; i++) {
+ var placeHolder = '{' + (i - 1) + '}';
+ str = abp.utils.replaceAll(str, placeHolder, arguments[i]);
+ }
+
+ return str;
+ };
+
+ abp.utils.toPascalCase = function (str) {
+ if (!str || !str.length) {
+ return str;
+ }
+
+ if (str.length === 1) {
+ return str.charAt(0).toUpperCase();
+ }
+
+ return str.charAt(0).toUpperCase() + str.substr(1);
+ }
+
+ abp.utils.toCamelCase = function (str) {
+ if (!str || !str.length) {
+ return str;
+ }
+
+ if (str.length === 1) {
+ return str.charAt(0).toLowerCase();
+ }
+
+ return str.charAt(0).toLowerCase() + str.substr(1);
+ }
+
+ abp.utils.truncateString = function (str, maxLength) {
+ if (!str || !str.length || str.length <= maxLength) {
+ return str;
+ }
+
+ return str.substr(0, maxLength);
+ };
+
+ abp.utils.truncateStringWithPostfix = function (str, maxLength, postfix) {
+ postfix = postfix || '...';
+
+ if (!str || !str.length || str.length <= maxLength) {
+ return str;
+ }
+
+ if (maxLength <= postfix.length) {
+ return postfix.substr(0, maxLength);
+ }
+
+ return str.substr(0, maxLength - postfix.length) + postfix;
+ };
+
+ abp.utils.isFunction = function (obj) {
+ return !!(obj && obj.constructor && obj.call && obj.apply);
+ };
+
+ /**
+ * parameterInfos should be an array of { name, value } objects
+ * where name is query string parameter name and value is it's value.
+ * includeQuestionMark is true by default.
+ */
+ abp.utils.buildQueryString = function (parameterInfos, includeQuestionMark) {
+ if (includeQuestionMark === undefined) {
+ includeQuestionMark = true;
+ }
+
+ var qs = '';
+
+ function addSeperator() {
+ if (!qs.length) {
+ if (includeQuestionMark) {
+ qs = qs + '?';
+ }
+ } else {
+ qs = qs + '&';
+ }
+ }
+
+ for (var i = 0; i < parameterInfos.length; ++i) {
+ var parameterInfo = parameterInfos[i];
+ if (parameterInfo.value === undefined) {
+ continue;
+ }
+
+ if (parameterInfo.value === null) {
+ parameterInfo.value = '';
+ }
+
+ addSeperator();
+
+ if (parameterInfo.value.toJSON && typeof parameterInfo.value.toJSON === "function") {
+ qs = qs + parameterInfo.name + '=' + encodeURIComponent(parameterInfo.value.toJSON());
+ } else if (Array.isArray(parameterInfo.value) && parameterInfo.value.length) {
+ for (var j = 0; j < parameterInfo.value.length; j++) {
+ if (j > 0) {
+ addSeperator();
+ }
+
+ qs = qs + parameterInfo.name + '[' + j + ']=' + encodeURIComponent(parameterInfo.value[j]);
+ }
+ } else {
+ qs = qs + parameterInfo.name + '=' + encodeURIComponent(parameterInfo.value);
+ }
+ }
+
+ return qs;
+ }
+
+ /**
+ * Sets a cookie value for given key.
+ * This is a simple implementation created to be used by ABP.
+ * Please use a complete cookie library if you need.
+ * @param {string} key
+ * @param {string} value
+ * @param {Date} expireDate (optional). If not specified the cookie will expire at the end of session.
+ * @param {string} path (optional)
+ */
+ abp.utils.setCookieValue = function (key, value, expireDate, path) {
+ var cookieValue = encodeURIComponent(key) + '=';
+
+ if (value) {
+ cookieValue = cookieValue + encodeURIComponent(value);
+ }
+
+ if (expireDate) {
+ cookieValue = cookieValue + "; expires=" + expireDate.toUTCString();
+ }
+
+ if (path) {
+ cookieValue = cookieValue + "; path=" + path;
+ }
+
+ document.cookie = cookieValue;
+ };
+
+ /**
+ * Gets a cookie with given key.
+ * This is a simple implementation created to be used by ABP.
+ * Please use a complete cookie library if you need.
+ * @param {string} key
+ * @returns {string} Cookie value or null
+ */
+ abp.utils.getCookieValue = function (key) {
+ var equalities = document.cookie.split('; ');
+ for (var i = 0; i < equalities.length; i++) {
+ if (!equalities[i]) {
+ continue;
+ }
+
+ var splitted = equalities[i].split('=');
+ if (splitted.length != 2) {
+ continue;
+ }
+
+ if (decodeURIComponent(splitted[0]) === key) {
+ return decodeURIComponent(splitted[1] || '');
+ }
+ }
+
+ return null;
+ };
+
+ /**
+ * Deletes cookie for given key.
+ * This is a simple implementation created to be used by ABP.
+ * Please use a complete cookie library if you need.
+ * @param {string} key
+ * @param {string} path (optional)
+ */
+ abp.utils.deleteCookie = function (key, path) {
+ var cookieValue = encodeURIComponent(key) + '=';
+
+ cookieValue = cookieValue + "; expires=" + (new Date(new Date().getTime() - 86400000)).toUTCString();
+
+ if (path) {
+ cookieValue = cookieValue + "; path=" + path;
+ }
+
+ document.cookie = cookieValue;
+ }
+
+ /* SECURITY ***************************************/
+ abp.security = abp.security || {};
+ abp.security.antiForgery = abp.security.antiForgery || {};
+
+ abp.security.antiForgery.tokenCookieName = 'XSRF-TOKEN';
+ abp.security.antiForgery.tokenHeaderName = 'X-XSRF-TOKEN';
+
+ abp.security.antiForgery.getToken = function () {
+ return abp.utils.getCookieValue(abp.security.antiForgery.tokenCookieName);
+ };
+
})();
\ No newline at end of file
diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/wwwroot/libs/abp/jquery/abp.jquery.js b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/wwwroot/libs/abp/jquery/abp.jquery.js
index 6e2ee001b8..e6aff047f7 100644
--- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/wwwroot/libs/abp/jquery/abp.jquery.js
+++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/wwwroot/libs/abp/jquery/abp.jquery.js
@@ -1,393 +1,393 @@
-var abp = abp || {};
-(function($) {
-
- if (!$) {
- throw "abp/jquery library requires the jquery library included to the page!";
- }
-
- // ABP CORE OVERRIDES /////////////////////////////////////////////////////
-
- abp.message._showMessage = function (message, title) {
- alert((title || '') + ' ' + message);
-
- return $.Deferred(function ($dfd) {
- $dfd.resolve();
- });
- };
-
- abp.message.confirm = function (message, titleOrCallback, callback) {
- if (titleOrCallback && !(typeof titleOrCallback == 'string')) {
- callback = titleOrCallback;
- }
-
- var result = confirm(message);
- callback && callback(result);
-
- return $.Deferred(function ($dfd) {
- $dfd.resolve(result);
- });
- };
-
- abp.utils.isFunction = function (obj) {
- return $.isFunction(obj);
- };
-
- // JQUERY EXTENSIONS //////////////////////////////////////////////////////
-
- $.fn.findWithSelf = function (selector) {
- return this.filter(selector).add(this.find(selector));
- };
-
- // DOM ////////////////////////////////////////////////////////////////////
-
- abp.dom = abp.dom || {};
-
- abp.dom.onNodeAdded = function (callback) {
- abp.event.on('abp.dom.nodeAdded', callback);
- };
-
- abp.dom.onNodeRemoved = function (callback) {
- abp.event.on('abp.dom.nodeRemoved', callback);
- };
-
- var mutationObserverCallback = function (mutationsList) {
- for (var i = 0; i < mutationsList.length; i++) {
- var mutation = mutationsList[i];
- if (mutation.type === 'childList') {
- if (mutation.addedNodes && mutation.removedNodes.length) {
- for (var k = 0; k < mutation.removedNodes.length; k++) {
- abp.event.trigger(
- 'abp.dom.nodeRemoved',
- {
- $el: $(mutation.removedNodes[k])
- }
- );
- }
- }
-
- if (mutation.addedNodes && mutation.addedNodes.length) {
- for (var j = 0; j < mutation.addedNodes.length; j++) {
- abp.event.trigger(
- 'abp.dom.nodeAdded',
- {
- $el: $(mutation.addedNodes[j])
- }
- );
- }
- }
- }
- }
- };
-
- new MutationObserver(mutationObserverCallback).observe(
- $('body')[0],
- {
- subtree: true,
- childList: true
- }
- );
-
- // AJAX ///////////////////////////////////////////////////////////////////
-
- abp.ajax = function (userOptions) {
- userOptions = userOptions || {};
-
- var options = $.extend(true, {}, abp.ajax.defaultOpts, userOptions);
-
- options.success = undefined;
- options.error = undefined;
-
- return $.Deferred(function ($dfd) {
- $.ajax(options)
- .done(function (data, textStatus, jqXHR) {
- $dfd.resolve(data);
- userOptions.success && userOptions.success(data);
- }).fail(function (jqXHR) {
- if (jqXHR.getResponseHeader('_AbpErrorFormat') === 'true') {
- abp.ajax.handleAbpErrorResponse(jqXHR, userOptions, $dfd);
- } else {
- abp.ajax.handleNonAbpErrorResponse(jqXHR, userOptions, $dfd);
- }
- });
- });
- };
-
- $.extend(abp.ajax, {
- defaultOpts: {
- dataType: 'json',
- type: 'POST',
- contentType: 'application/json',
- headers: {
- 'X-Requested-With': 'XMLHttpRequest'
- }
- },
-
- defaultError: {
- message: 'An error has occurred!',
- details: 'Error detail not sent by server.'
- },
-
- defaultError401: {
- message: 'You are not authenticated!',
- details: 'You should be authenticated (sign in) in order to perform this operation.'
- },
-
- defaultError403: {
- message: 'You are not authorized!',
- details: 'You are not allowed to perform this operation.'
- },
-
- defaultError404: {
- message: 'Resource not found!',
- details: 'The resource requested could not found on the server.'
- },
-
- logError: function (error) {
- abp.log.error(error);
- },
-
- showError: function (error) {
- if (error.details) {
- return abp.message.error(error.details, error.message);
- } else {
- return abp.message.error(error.message || abp.ajax.defaultError.message);
- }
- },
-
- handleTargetUrl: function (targetUrl) {
- if (!targetUrl) {
- location.href = abp.appPath;
- } else {
- location.href = targetUrl;
- }
- },
-
- handleErrorStatusCode: function (status) {
- switch (status) {
- case 401:
- abp.ajax.handleUnAuthorizedRequest(
- abp.ajax.showError(abp.ajax.defaultError401),
- abp.appPath
- );
- break;
- case 403:
- abp.ajax.showError(abp.ajax.defaultError403);
- break;
- case 404:
- abp.ajax.showError(abp.ajax.defaultError404);
- break;
- default:
- abp.ajax.showError(abp.ajax.defaultError);
- break;
- }
- },
-
- handleNonAbpErrorResponse: function (jqXHR, userOptions, $dfd) {
- if (userOptions.abpHandleError !== false) {
- abp.ajax.handleErrorStatusCode(jqXHR.status);
- }
-
- $dfd.reject.apply(this, arguments);
- userOptions.error && userOptions.error.apply(this, arguments);
- },
-
- handleAbpErrorResponse: function (jqXHR, userOptions, $dfd) {
- var messagePromise = null;
-
- if (userOptions.abpHandleError !== false) {
- messagePromise = abp.ajax.showError(jqXHR.responseJSON.error);
- }
-
- abp.ajax.logError(jqXHR.responseJSON.error);
-
- $dfd && $dfd.reject(jqXHR.responseJSON.error, jqXHR);
- userOptions.error && userOptions.error(jqXHR.responseJSON.error, jqXHR);
-
- if (jqXHR.status === 401 && userOptions.abpHandleError !== false) {
- abp.ajax.handleUnAuthorizedRequest(messagePromise);
- }
- },
-
- handleUnAuthorizedRequest: function (messagePromise, targetUrl) {
- if (messagePromise) {
- messagePromise.done(function () {
- abp.ajax.handleTargetUrl(targetUrl);
- });
- } else {
- abp.ajax.handleTargetUrl(targetUrl);
- }
- },
-
- blockUI: function (options) {
- if (options.blockUI) {
- if (options.blockUI === true) { //block whole page
- abp.ui.setBusy();
- } else { //block an element
- abp.ui.setBusy(options.blockUI);
- }
- }
- },
-
- unblockUI: function (options) {
- if (options.blockUI) {
- if (options.blockUI === true) { //unblock whole page
- abp.ui.clearBusy();
- } else { //unblock an element
- abp.ui.clearBusy(options.blockUI);
- }
- }
- },
-
- ajaxSendHandler: function (event, request, settings) {
- var token = abp.security.antiForgery.getToken();
- if (!token) {
- return;
- }
-
- if (!settings.headers || settings.headers[abp.security.antiForgery.tokenHeaderName] === undefined) {
- request.setRequestHeader(abp.security.antiForgery.tokenHeaderName, token);
- }
- }
- });
-
- $(document).ajaxSend(function (event, request, settings) {
- return abp.ajax.ajaxSendHandler(event, request, settings);
- });
-
- abp.event.on('abp.configurationInitialized', function () {
- var l = abp.localization.getResource('AbpUi');
-
- abp.ajax.defaultError.message = l('DefaultErrorMessage');
- abp.ajax.defaultError.details = l('DefaultErrorMessageDetail');
- abp.ajax.defaultError401.message = l('DefaultErrorMessage401');
- abp.ajax.defaultError401.details = l('DefaultErrorMessage401Detail');
- abp.ajax.defaultError403.message = l('DefaultErrorMessage403');
- abp.ajax.defaultError403.details = l('DefaultErrorMessage403Detail');
- abp.ajax.defaultError404.message = l('DefaultErrorMessage404');
- abp.ajax.defaultError404.details = l('DefaultErrorMessage404Detail');
- });
-
- // RESOURCE LOADER ////////////////////////////////////////////////////////
-
- /* UrlStates enum */
- var UrlStates = {
- LOADING: 'LOADING',
- LOADED: 'LOADED',
- FAILED: 'FAILED'
- };
-
- /* UrlInfo class */
- function UrlInfo(url) {
- this.url = url;
- this.state = UrlStates.LOADING;
- this.loadCallbacks = [];
- this.failCallbacks = [];
- }
-
- UrlInfo.prototype.succeed = function () {
- this.state = UrlStates.LOADED;
- for (var i = 0; i < this.loadCallbacks.length; i++) {
- this.loadCallbacks[i]();
- }
- };
-
- UrlInfo.prototype.failed = function () {
- this.state = UrlStates.FAILED;
- for (var i = 0; i < this.failCallbacks.length; i++) {
- this.failCallbacks[i]();
- }
- };
-
- UrlInfo.prototype.handleCallbacks = function (loadCallback, failCallback) {
- switch (this.state) {
- case UrlStates.LOADED:
- loadCallback && loadCallback();
- break;
- case UrlStates.FAILED:
- failCallback && failCallback();
- break;
- case UrlStates.LOADING:
- this.addCallbacks(loadCallback, failCallback);
- break;
- }
- };
-
- UrlInfo.prototype.addCallbacks = function (loadCallback, failCallback) {
- loadCallback && this.loadCallbacks.push(loadCallback);
- failCallback && this.failCallbacks.push(failCallback);
- };
-
- /* ResourceLoader API */
-
- abp.ResourceLoader = (function () {
-
- var _urlInfos = {};
-
- function getCacheKey(url) {
- return url;
- }
-
- function appendTimeToUrl(url) {
-
- if (url.indexOf('?') < 0) {
- url += '?';
- } else {
- url += '&';
- }
-
- url += '_=' + new Date().getTime();
-
- return url;
- }
-
- var _loadFromUrl = function (url, loadCallback, failCallback, serverLoader) {
-
- var cacheKey = getCacheKey(url);
-
- var urlInfo = _urlInfos[cacheKey];
-
- if (urlInfo) {
- urlInfo.handleCallbacks(loadCallback, failCallback);
- return;
- }
-
- _urlInfos[cacheKey] = urlInfo = new UrlInfo(url);
- urlInfo.addCallbacks(loadCallback, failCallback);
-
- serverLoader(urlInfo);
- };
-
- var _loadScript = function (url, loadCallback, failCallback) {
- _loadFromUrl(url, loadCallback, failCallback, function (urlInfo) {
- $.get({
- url: url,
- dataType: 'text'
- })
- .done(function (script) {
- $.globalEval(script);
- urlInfo.succeed();
- })
- .fail(function () {
- urlInfo.failed();
- });
- });
- };
-
- var _loadStyle = function (url) {
- _loadFromUrl(url, undefined, undefined, function (urlInfo) {
-
- $('', {
- rel: 'stylesheet',
- type: 'text/css',
- href: appendTimeToUrl(url)
- }).appendTo('head');
- });
- };
-
- return {
- loadScript: _loadScript,
- loadStyle: _loadStyle
- }
- })();
-
+var abp = abp || {};
+(function($) {
+
+ if (!$) {
+ throw "abp/jquery library requires the jquery library included to the page!";
+ }
+
+ // ABP CORE OVERRIDES /////////////////////////////////////////////////////
+
+ abp.message._showMessage = function (message, title) {
+ alert((title || '') + ' ' + message);
+
+ return $.Deferred(function ($dfd) {
+ $dfd.resolve();
+ });
+ };
+
+ abp.message.confirm = function (message, titleOrCallback, callback) {
+ if (titleOrCallback && !(typeof titleOrCallback == 'string')) {
+ callback = titleOrCallback;
+ }
+
+ var result = confirm(message);
+ callback && callback(result);
+
+ return $.Deferred(function ($dfd) {
+ $dfd.resolve(result);
+ });
+ };
+
+ abp.utils.isFunction = function (obj) {
+ return $.isFunction(obj);
+ };
+
+ // JQUERY EXTENSIONS //////////////////////////////////////////////////////
+
+ $.fn.findWithSelf = function (selector) {
+ return this.filter(selector).add(this.find(selector));
+ };
+
+ // DOM ////////////////////////////////////////////////////////////////////
+
+ abp.dom = abp.dom || {};
+
+ abp.dom.onNodeAdded = function (callback) {
+ abp.event.on('abp.dom.nodeAdded', callback);
+ };
+
+ abp.dom.onNodeRemoved = function (callback) {
+ abp.event.on('abp.dom.nodeRemoved', callback);
+ };
+
+ var mutationObserverCallback = function (mutationsList) {
+ for (var i = 0; i < mutationsList.length; i++) {
+ var mutation = mutationsList[i];
+ if (mutation.type === 'childList') {
+ if (mutation.addedNodes && mutation.removedNodes.length) {
+ for (var k = 0; k < mutation.removedNodes.length; k++) {
+ abp.event.trigger(
+ 'abp.dom.nodeRemoved',
+ {
+ $el: $(mutation.removedNodes[k])
+ }
+ );
+ }
+ }
+
+ if (mutation.addedNodes && mutation.addedNodes.length) {
+ for (var j = 0; j < mutation.addedNodes.length; j++) {
+ abp.event.trigger(
+ 'abp.dom.nodeAdded',
+ {
+ $el: $(mutation.addedNodes[j])
+ }
+ );
+ }
+ }
+ }
+ }
+ };
+
+ new MutationObserver(mutationObserverCallback).observe(
+ $('body')[0],
+ {
+ subtree: true,
+ childList: true
+ }
+ );
+
+ // AJAX ///////////////////////////////////////////////////////////////////
+
+ abp.ajax = function (userOptions) {
+ userOptions = userOptions || {};
+
+ var options = $.extend(true, {}, abp.ajax.defaultOpts, userOptions);
+
+ options.success = undefined;
+ options.error = undefined;
+
+ return $.Deferred(function ($dfd) {
+ $.ajax(options)
+ .done(function (data, textStatus, jqXHR) {
+ $dfd.resolve(data);
+ userOptions.success && userOptions.success(data);
+ }).fail(function (jqXHR) {
+ if (jqXHR.getResponseHeader('_AbpErrorFormat') === 'true') {
+ abp.ajax.handleAbpErrorResponse(jqXHR, userOptions, $dfd);
+ } else {
+ abp.ajax.handleNonAbpErrorResponse(jqXHR, userOptions, $dfd);
+ }
+ });
+ });
+ };
+
+ $.extend(abp.ajax, {
+ defaultOpts: {
+ dataType: 'json',
+ type: 'POST',
+ contentType: 'application/json',
+ headers: {
+ 'X-Requested-With': 'XMLHttpRequest'
+ }
+ },
+
+ defaultError: {
+ message: 'An error has occurred!',
+ details: 'Error detail not sent by server.'
+ },
+
+ defaultError401: {
+ message: 'You are not authenticated!',
+ details: 'You should be authenticated (sign in) in order to perform this operation.'
+ },
+
+ defaultError403: {
+ message: 'You are not authorized!',
+ details: 'You are not allowed to perform this operation.'
+ },
+
+ defaultError404: {
+ message: 'Resource not found!',
+ details: 'The resource requested could not found on the server.'
+ },
+
+ logError: function (error) {
+ abp.log.error(error);
+ },
+
+ showError: function (error) {
+ if (error.details) {
+ return abp.message.error(error.details, error.message);
+ } else {
+ return abp.message.error(error.message || abp.ajax.defaultError.message);
+ }
+ },
+
+ handleTargetUrl: function (targetUrl) {
+ if (!targetUrl) {
+ location.href = abp.appPath;
+ } else {
+ location.href = targetUrl;
+ }
+ },
+
+ handleErrorStatusCode: function (status) {
+ switch (status) {
+ case 401:
+ abp.ajax.handleUnAuthorizedRequest(
+ abp.ajax.showError(abp.ajax.defaultError401),
+ abp.appPath
+ );
+ break;
+ case 403:
+ abp.ajax.showError(abp.ajax.defaultError403);
+ break;
+ case 404:
+ abp.ajax.showError(abp.ajax.defaultError404);
+ break;
+ default:
+ abp.ajax.showError(abp.ajax.defaultError);
+ break;
+ }
+ },
+
+ handleNonAbpErrorResponse: function (jqXHR, userOptions, $dfd) {
+ if (userOptions.abpHandleError !== false) {
+ abp.ajax.handleErrorStatusCode(jqXHR.status);
+ }
+
+ $dfd.reject.apply(this, arguments);
+ userOptions.error && userOptions.error.apply(this, arguments);
+ },
+
+ handleAbpErrorResponse: function (jqXHR, userOptions, $dfd) {
+ var messagePromise = null;
+
+ if (userOptions.abpHandleError !== false) {
+ messagePromise = abp.ajax.showError(jqXHR.responseJSON.error);
+ }
+
+ abp.ajax.logError(jqXHR.responseJSON.error);
+
+ $dfd && $dfd.reject(jqXHR.responseJSON.error, jqXHR);
+ userOptions.error && userOptions.error(jqXHR.responseJSON.error, jqXHR);
+
+ if (jqXHR.status === 401 && userOptions.abpHandleError !== false) {
+ abp.ajax.handleUnAuthorizedRequest(messagePromise);
+ }
+ },
+
+ handleUnAuthorizedRequest: function (messagePromise, targetUrl) {
+ if (messagePromise) {
+ messagePromise.done(function () {
+ abp.ajax.handleTargetUrl(targetUrl);
+ });
+ } else {
+ abp.ajax.handleTargetUrl(targetUrl);
+ }
+ },
+
+ blockUI: function (options) {
+ if (options.blockUI) {
+ if (options.blockUI === true) { //block whole page
+ abp.ui.setBusy();
+ } else { //block an element
+ abp.ui.setBusy(options.blockUI);
+ }
+ }
+ },
+
+ unblockUI: function (options) {
+ if (options.blockUI) {
+ if (options.blockUI === true) { //unblock whole page
+ abp.ui.clearBusy();
+ } else { //unblock an element
+ abp.ui.clearBusy(options.blockUI);
+ }
+ }
+ },
+
+ ajaxSendHandler: function (event, request, settings) {
+ var token = abp.security.antiForgery.getToken();
+ if (!token) {
+ return;
+ }
+
+ if (!settings.headers || settings.headers[abp.security.antiForgery.tokenHeaderName] === undefined) {
+ request.setRequestHeader(abp.security.antiForgery.tokenHeaderName, token);
+ }
+ }
+ });
+
+ $(document).ajaxSend(function (event, request, settings) {
+ return abp.ajax.ajaxSendHandler(event, request, settings);
+ });
+
+ abp.event.on('abp.configurationInitialized', function () {
+ var l = abp.localization.getResource('AbpUi');
+
+ abp.ajax.defaultError.message = l('DefaultErrorMessage');
+ abp.ajax.defaultError.details = l('DefaultErrorMessageDetail');
+ abp.ajax.defaultError401.message = l('DefaultErrorMessage401');
+ abp.ajax.defaultError401.details = l('DefaultErrorMessage401Detail');
+ abp.ajax.defaultError403.message = l('DefaultErrorMessage403');
+ abp.ajax.defaultError403.details = l('DefaultErrorMessage403Detail');
+ abp.ajax.defaultError404.message = l('DefaultErrorMessage404');
+ abp.ajax.defaultError404.details = l('DefaultErrorMessage404Detail');
+ });
+
+ // RESOURCE LOADER ////////////////////////////////////////////////////////
+
+ /* UrlStates enum */
+ var UrlStates = {
+ LOADING: 'LOADING',
+ LOADED: 'LOADED',
+ FAILED: 'FAILED'
+ };
+
+ /* UrlInfo class */
+ function UrlInfo(url) {
+ this.url = url;
+ this.state = UrlStates.LOADING;
+ this.loadCallbacks = [];
+ this.failCallbacks = [];
+ }
+
+ UrlInfo.prototype.succeed = function () {
+ this.state = UrlStates.LOADED;
+ for (var i = 0; i < this.loadCallbacks.length; i++) {
+ this.loadCallbacks[i]();
+ }
+ };
+
+ UrlInfo.prototype.failed = function () {
+ this.state = UrlStates.FAILED;
+ for (var i = 0; i < this.failCallbacks.length; i++) {
+ this.failCallbacks[i]();
+ }
+ };
+
+ UrlInfo.prototype.handleCallbacks = function (loadCallback, failCallback) {
+ switch (this.state) {
+ case UrlStates.LOADED:
+ loadCallback && loadCallback();
+ break;
+ case UrlStates.FAILED:
+ failCallback && failCallback();
+ break;
+ case UrlStates.LOADING:
+ this.addCallbacks(loadCallback, failCallback);
+ break;
+ }
+ };
+
+ UrlInfo.prototype.addCallbacks = function (loadCallback, failCallback) {
+ loadCallback && this.loadCallbacks.push(loadCallback);
+ failCallback && this.failCallbacks.push(failCallback);
+ };
+
+ /* ResourceLoader API */
+
+ abp.ResourceLoader = (function () {
+
+ var _urlInfos = {};
+
+ function getCacheKey(url) {
+ return url;
+ }
+
+ function appendTimeToUrl(url) {
+
+ if (url.indexOf('?') < 0) {
+ url += '?';
+ } else {
+ url += '&';
+ }
+
+ url += '_=' + new Date().getTime();
+
+ return url;
+ }
+
+ var _loadFromUrl = function (url, loadCallback, failCallback, serverLoader) {
+
+ var cacheKey = getCacheKey(url);
+
+ var urlInfo = _urlInfos[cacheKey];
+
+ if (urlInfo) {
+ urlInfo.handleCallbacks(loadCallback, failCallback);
+ return;
+ }
+
+ _urlInfos[cacheKey] = urlInfo = new UrlInfo(url);
+ urlInfo.addCallbacks(loadCallback, failCallback);
+
+ serverLoader(urlInfo);
+ };
+
+ var _loadScript = function (url, loadCallback, failCallback) {
+ _loadFromUrl(url, loadCallback, failCallback, function (urlInfo) {
+ $.get({
+ url: url,
+ dataType: 'text'
+ })
+ .done(function (script) {
+ $.globalEval(script);
+ urlInfo.succeed();
+ })
+ .fail(function () {
+ urlInfo.failed();
+ });
+ });
+ };
+
+ var _loadStyle = function (url) {
+ _loadFromUrl(url, undefined, undefined, function (urlInfo) {
+
+ $('', {
+ rel: 'stylesheet',
+ type: 'text/css',
+ href: appendTimeToUrl(url)
+ }).appendTo('head');
+ });
+ };
+
+ return {
+ loadScript: _loadScript,
+ loadStyle: _loadStyle
+ }
+ })();
+
})(jQuery);
\ No newline at end of file
diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/yarn.lock b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/yarn.lock
index d125f98cc5..157d0f2e34 100644
--- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/yarn.lock
+++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/yarn.lock
@@ -2,37 +2,37 @@
# yarn lockfile v1
-"@abp/aspnetcore.mvc.ui.theme.basic@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.basic/-/aspnetcore.mvc.ui.theme.basic-2.1.0.tgz#f815001bd856fb5cbdd0b736181f2401a1a7ec62"
- integrity sha512-ej6dhUo3H9w6bpBTpMhk3M6zbC3fVAVMm5yLSYlYJ0sQxjb9PqC02OgiJme0mkxCUMwPuHVSQLrMQbioXdZu3A==
+"@abp/aspnetcore.mvc.ui.theme.basic@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.basic/-/aspnetcore.mvc.ui.theme.basic-2.2.0.tgz#e7f4e57d2b17cc76388e9c56bc34d50c9658873b"
+ integrity sha512-S9GQ9YVg4DWrgjujwiXBER6KqdqW5nZ1Bmt+YEePn5gEoPvoVrh6ojthpHYRjBJtGFqBSzRAQ9eVZLebT22Ozg==
dependencies:
- "@abp/aspnetcore.mvc.ui.theme.shared" "^2.1.0"
+ "@abp/aspnetcore.mvc.ui.theme.shared" "^2.2.0"
-"@abp/aspnetcore.mvc.ui.theme.shared@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.shared/-/aspnetcore.mvc.ui.theme.shared-2.1.0.tgz#c2790241b5a44b9d6e4f65911a1b9d9e9104ed82"
- integrity sha512-dxC0P/b1T+QJmRrB8HoLM7/GkWblz/X5lLqgn583W7/OTYhvxIxszuRDy/XIEuS+fP6a9rcGvGu5jcKJEqe/xA==
- dependencies:
- "@abp/aspnetcore.mvc.ui" "^2.1.0"
- "@abp/bootstrap" "^2.1.0"
- "@abp/bootstrap-datepicker" "^2.1.0"
- "@abp/datatables.net-bs4" "^2.1.0"
- "@abp/font-awesome" "^2.1.0"
- "@abp/jquery-form" "^2.1.0"
- "@abp/jquery-validation-unobtrusive" "^2.1.0"
- "@abp/lodash" "^2.1.0"
- "@abp/luxon" "^2.1.0"
- "@abp/malihu-custom-scrollbar-plugin" "^2.1.0"
- "@abp/select2" "^2.1.0"
- "@abp/sweetalert" "^2.1.0"
- "@abp/timeago" "^2.1.0"
- "@abp/toastr" "^2.1.0"
-
-"@abp/aspnetcore.mvc.ui@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui/-/aspnetcore.mvc.ui-2.1.0.tgz#3c86f42e52af3151d2aee0ffdd1281014ea61054"
- integrity sha512-pKiKMBOPuLm7p44DW8DdbsVn5PY3NqGYkz6gf75uzxyWiVYyl2CM/bvX9w4Ie7Q969owENMLrBREN6ezWZ5ynA==
+"@abp/aspnetcore.mvc.ui.theme.shared@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.shared/-/aspnetcore.mvc.ui.theme.shared-2.2.0.tgz#e0df953853be2a184d323931573f9f98aebbaa62"
+ integrity sha512-urxziaCdvfEqN5cjiiM5f5dx2Yr+AoGqCJVCo0Okjl2dosdaj5DH4SBzMvKAaLXzo3Ep1h4b3Wvws4BThL/6rA==
+ dependencies:
+ "@abp/aspnetcore.mvc.ui" "^2.2.0"
+ "@abp/bootstrap" "^2.2.0"
+ "@abp/bootstrap-datepicker" "^2.2.0"
+ "@abp/datatables.net-bs4" "^2.2.0"
+ "@abp/font-awesome" "^2.2.0"
+ "@abp/jquery-form" "^2.2.0"
+ "@abp/jquery-validation-unobtrusive" "^2.2.0"
+ "@abp/lodash" "^2.2.0"
+ "@abp/luxon" "^2.2.0"
+ "@abp/malihu-custom-scrollbar-plugin" "^2.2.0"
+ "@abp/select2" "^2.2.0"
+ "@abp/sweetalert" "^2.2.0"
+ "@abp/timeago" "^2.2.0"
+ "@abp/toastr" "^2.2.0"
+
+"@abp/aspnetcore.mvc.ui@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui/-/aspnetcore.mvc.ui-2.2.0.tgz#b2cdd421eed09ec1d30ae85e14434b7efc094ade"
+ integrity sha512-IO/AjhJu+LUa9zOaT8JlEnV+Pcp9oQ3q9kTq8kmMakC35vTIyvBpB3nnykXIOytZSyjsBgFYB/uMxPgBOjWagg==
dependencies:
ansi-colors "^4.1.1"
extend-object "^1.0.0"
@@ -41,135 +41,135 @@
path "^0.12.7"
rimraf "^3.0.0"
-"@abp/bootstrap-datepicker@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/bootstrap-datepicker/-/bootstrap-datepicker-2.1.0.tgz#a0d71da15cb3d3cc02f9a390437a44db5e9f9ea1"
- integrity sha512-lkNI0iyefiXS2O5x9Ae9eJQLPXSQlOWDX7QhKnBHLR9JxjJEnhBUIIOylMltAIqtVDtjk2ikDyd3BAiyBdtB/w==
+"@abp/bootstrap-datepicker@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/bootstrap-datepicker/-/bootstrap-datepicker-2.2.0.tgz#a2f50b422824f18ed4b7e80be6852e2979119f8e"
+ integrity sha512-X9jT5mU42QFfVhOZdun7aEJUf3bMko6NsG3NFQVjqTqKH+iYGKfHPFpXD0gP/6Nb4KgZUdId8hSyQTZyOK2JEA==
dependencies:
bootstrap-datepicker "^1.9.0"
-"@abp/bootstrap@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/bootstrap/-/bootstrap-2.1.0.tgz#7ce15d4effac0e0991a3520c4666c6cb17a3fef2"
- integrity sha512-1xQjqu6shCgzd1FI94y5AIXGIhBlZEoRrOhaT84j/2KzYiDvhP+LAqQjMgqlQmBLs6vMckpxtf5thxKTMXvtOw==
+"@abp/bootstrap@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/bootstrap/-/bootstrap-2.2.0.tgz#16e41d3432117bbcd9012c6f735c49c543255879"
+ integrity sha512-aRmluu6SkIl+JgCzSSJZrDPkYr6WWaQdY0iJAOz6NHtffa7Aumh1IUOrLVKL0T1pQn6QKs0Z7JDGyYMdh1HPkQ==
dependencies:
- "@abp/core" "^2.1.0"
+ "@abp/core" "^2.2.0"
bootstrap "^4.3.1"
-"@abp/core@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/core/-/core-2.1.0.tgz#0cd2850f029df1d18517b8e74c70341972c37ed7"
- integrity sha512-1wnRo00hWncZWSakaEXm388XhhbKXDVkWDIdaT3kyQpvp3kX1lFx7I5iiZiwIeULwZRF9mi6HV6iHEze58x0kQ==
+"@abp/core@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/core/-/core-2.2.0.tgz#4eea0a06458c90acb8566a11eb841fe65d15d256"
+ integrity sha512-tBGHa5CUr0ewT31g689RAfQ6Su2p4uyn2PzmrW/8lahBrvqkoCb41fkCDLQJkTY5rKPrEKZd/s9OoyOnS20DLg==
-"@abp/datatables.net-bs4@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/datatables.net-bs4/-/datatables.net-bs4-2.1.0.tgz#a0f36cf4e3ef96ae03aa4b9956fcb8b971c854cb"
- integrity sha512-93qc2rrGs+JKRPM/7UCasa5VmfswgYU8cv3Ybg5OKoaASODYUn06GChRFnd/mvqcDxw4+8gaqpC3U2ETZZI4pA==
+"@abp/datatables.net-bs4@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/datatables.net-bs4/-/datatables.net-bs4-2.2.0.tgz#c7cc49e889b295ae10fb24ed62b154ef79ffc85a"
+ integrity sha512-zjJRPqOCWPfkHt1QztfFHKrsTE9o6Je2EpfA7hRMej2FlGbsMWUxOqx/btK1vjD6YIU8DtVDpIdj1WvPOITQ4Q==
dependencies:
- "@abp/datatables.net" "^2.1.0"
+ "@abp/datatables.net" "^2.2.0"
datatables.net-bs4 "^1.10.20"
-"@abp/datatables.net@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/datatables.net/-/datatables.net-2.1.0.tgz#674eaaa5b0948d7ee85b6605bfbad1a70f839aa7"
- integrity sha512-3ZM2p+JpHumxbIKlDP/LKLsfceMdttdTOL0ckIZCmAAgoIeKmAtuMoKcHTr8lj5mjgv4arBGvG9WVCemep2PEw==
+"@abp/datatables.net@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/datatables.net/-/datatables.net-2.2.0.tgz#22f9c7ca90c2d4af264483b4f8286b0feb7c3d52"
+ integrity sha512-L4MnpdloSWr/px3mvV75sxsxL68MyALB2LKdzCFMQWILCZVkxMmQb9LARINYIrn461Wrc+zbYWNEBD0MAq7flg==
dependencies:
- "@abp/core" "^2.1.0"
+ "@abp/core" "^2.2.0"
datatables.net "^1.10.20"
-"@abp/font-awesome@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/font-awesome/-/font-awesome-2.1.0.tgz#c2e628a1b9d0525e7d6950bf007feebcd1c490c8"
- integrity sha512-vlm1IQuQVfuCI2O1vphDd11zUEJ4/4PU0/0XI1YCpilse8fBg080CM3+G0kw6Erm/riznqhOJwBcfT+K+zqk8A==
+"@abp/font-awesome@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/font-awesome/-/font-awesome-2.2.0.tgz#2de39e3c6c3e8c30394d82861761a66c5b4032f0"
+ integrity sha512-RT06MYUGgaWBEpW5c7wUcfMXgxcOHWdX/C01LDO/j6iVoKBuBHOkkvcUoTWII068ECrLYOkj+RyT59dCKm8FFw==
dependencies:
- "@abp/core" "^2.1.0"
+ "@abp/core" "^2.2.0"
"@fortawesome/fontawesome-free" "^5.11.2"
-"@abp/jquery-form@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/jquery-form/-/jquery-form-2.1.0.tgz#285dbfdcf722cb0249f149e728cef7f788410c0c"
- integrity sha512-A17rjHTiBJBKYgrtDX5wIqnI89wNmo3bdK9NagL1wMFj4GvDyOZoRIDLqkopYQsc8zuPjqw4+1aa2TPiA+jtKg==
+"@abp/jquery-form@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/jquery-form/-/jquery-form-2.2.0.tgz#951653fac4013a7bbec065b5101b86d575e0eca7"
+ integrity sha512-ji44E3Ud0S3LNXn1WJ/Aw44qAIG7EITEW1KOe46oz+/awPpbiiA4dDDNleTvO2jI2/s8mNyR0bNanP6BUsc7tw==
dependencies:
- "@abp/jquery" "^2.1.0"
+ "@abp/jquery" "^2.2.0"
jquery-form "^4.2.2"
-"@abp/jquery-validation-unobtrusive@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-2.1.0.tgz#fc938775ced2efc686e7dd092d6ceff1ea947f36"
- integrity sha512-a8iBIj6amJ9rQNV+wxQUuEVh93M/c32kJcrwSEPWQcOoTj5gf0j8eKK9YvZaGokpylraz9mdGOwYQQuNj1sxEw==
+"@abp/jquery-validation-unobtrusive@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-2.2.0.tgz#6d39ba9f7bf026d1380796bf5dff76c8d16b42ce"
+ integrity sha512-SuS/dRRVz7ZR4HK/h9x0jRRVLPqXN0CPRGPdJZ1LJraXVEJ9/eDEGf1rMlHmEGt1FXXFTD01/zjisbweDE786w==
dependencies:
- "@abp/jquery-validation" "^2.1.0"
+ "@abp/jquery-validation" "^2.2.0"
jquery-validation-unobtrusive "^3.2.11"
-"@abp/jquery-validation@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/jquery-validation/-/jquery-validation-2.1.0.tgz#2bf1a31321cce3b2abe6d56c6112c52a8ecb28b6"
- integrity sha512-kU6/E+Xc3wHAUs+sGMAL8uozkXv65HnpksTwV4/+RK+D6iFU2EyNgCEFu7QGSwYZsV1/7YsCe2GD4ucBXIknbA==
+"@abp/jquery-validation@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/jquery-validation/-/jquery-validation-2.2.0.tgz#02bb8ba883e72c1204867ee4d1c1094bd91c4c4c"
+ integrity sha512-ypITQloO4iEDgqlA6qb3taj+7HMX0Cf/ACA2OvtrvOgJejx6J4wfrPjwuFZu1WWJ0xtc9yTdbovdcSVcQbIGaA==
dependencies:
- "@abp/jquery" "^2.1.0"
+ "@abp/jquery" "^2.2.0"
jquery-validation "^1.19.1"
-"@abp/jquery@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/jquery/-/jquery-2.1.0.tgz#fb5b4c9e8622cf46fee92f9f731d007d5fb200bb"
- integrity sha512-ZpfzRut5G611bBmuDdiT6BD0M7Rl1P6r8uNxUjdmFXYwFd8wD02ZhIcsX7qFHFkYERuXfcLrZh4rpw9G1DVCJg==
+"@abp/jquery@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/jquery/-/jquery-2.2.0.tgz#0e641b1109e78eff4c34331ca2b123b67cc30cbe"
+ integrity sha512-vEfRoFEAmDmRgSq98Y9EZExfQFSWtmjaHrodUu+MadTcRlnn+wHq8wwkKKxpj/eYtNc8aFORpyHMMH7uliAKxg==
dependencies:
- "@abp/core" "^2.1.0"
+ "@abp/core" "^2.2.0"
jquery "^3.4.1"
-"@abp/lodash@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/lodash/-/lodash-2.1.0.tgz#9fc9e6521e6284d607cedbff1a458fa324137c5c"
- integrity sha512-s1gTHhpbmEDDCsZeXb9MpClkDS4wH5R2IWPRZUlSPxo3gF0pvkx5ubdhYUEUgqy5QqWxE/+zUAjDc4x+cEriFQ==
+"@abp/lodash@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/lodash/-/lodash-2.2.0.tgz#af0a2ebcb28fd0a8c02da5026479d9370ed19719"
+ integrity sha512-wOMLqIpuq4a7ww7pB138G6YxBiTGBgxNW/IWGUiWbfgrr88cGPKIYYv/8O8mvr8PLNGjizNynuwQRj522yA3Dw==
dependencies:
- "@abp/core" "^2.1.0"
+ "@abp/core" "^2.2.0"
lodash "^4.17.15"
-"@abp/luxon@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/luxon/-/luxon-2.1.0.tgz#624796722119f075119006b436054aecbb38f15f"
- integrity sha512-2b0sRo6rdYT1wDu9nSXm/9o8rhQ9ED7FxrDMYabYuOQz48esgn4fBUNcPqpxwejpFmlhZY6CONvkddNtaMeVHw==
+"@abp/luxon@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/luxon/-/luxon-2.2.0.tgz#0d0e78edc249853fa31eceecc00df2846a879aa9"
+ integrity sha512-WbOW0PcMks+WXRPWt/+H4pOa5waM331WkY0F+EJx8fpxemNGQNUEXLkuMXzN3MrN6LrplM9AZ9i+NRA9PWHbNw==
dependencies:
luxon "^1.21.3"
-"@abp/malihu-custom-scrollbar-plugin@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-2.1.0.tgz#f4dc1a32cefc3de8af08cb6d585ec5f7636a0c5e"
- integrity sha512-WcxzCZ5YOMxGxZerEh966cVrFSCw1UTDqwU2rxA/LsHEbPKd69AY+SHvUiacNxPXs1ZCF6FFJ29C5dWicEIRaQ==
+"@abp/malihu-custom-scrollbar-plugin@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-2.2.0.tgz#e11fd46dccbb28d44fb199e880b91d27c94f1919"
+ integrity sha512-YDu/NLpIzMA96NDHxd27/+liTm3sow9M+oWH29+9JW8o/AEpXUH3T3AmoXXcTgsBlzLaewgHEFM8yxsAAFoj8Q==
dependencies:
- "@abp/core" "^2.1.0"
+ "@abp/core" "^2.2.0"
malihu-custom-scrollbar-plugin "^3.1.5"
-"@abp/select2@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/select2/-/select2-2.1.0.tgz#79e50d2c25e74a5f96520e8aa1433d79aea674d1"
- integrity sha512-ut/3c+lFdoepuDH36M7thWagmAmTFrChcPnhYjTx4MmIf31WW1BwqOSx3I2g8M+NEEx+V2jTNuBpTq7PONgSJg==
+"@abp/select2@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/select2/-/select2-2.2.0.tgz#4639d4e5b72b1736fa4476bd9b6a78e036400421"
+ integrity sha512-tc87JyM0kvVF388kyGUjDby49Zrrb089jVRRipoIaxXeu4M1YxEFSKBEcUK1MohZWjVtWrNs8MoxPlfukaMpyw==
dependencies:
- "@abp/core" "^2.1.0"
+ "@abp/core" "^2.2.0"
select2 "^4.0.12"
-"@abp/sweetalert@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/sweetalert/-/sweetalert-2.1.0.tgz#88f405c4ba9f9ed2fd54b945ed6bc48d5ae2fa23"
- integrity sha512-EWvReqxZ1DrNH9XD+cf/yGVj+8IPTpuoPuWKDryN4fF7TCMJA+KrXp5lFxpjfkKTtNzLeFGsJqDFWaUifxtqTA==
+"@abp/sweetalert@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/sweetalert/-/sweetalert-2.2.0.tgz#dfc60ba085522d8390e41b90bf5a3d474f4ae624"
+ integrity sha512-HS6TKOwP91UjzjZHaheurZ1AYUSMkQyCSmoX6g5LAK4eH8IIgpojVSp1AFCSPATrFsFWY/dzkDGcfu90FWsVBg==
dependencies:
- "@abp/core" "^2.1.0"
+ "@abp/core" "^2.2.0"
sweetalert "^2.1.2"
-"@abp/timeago@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/timeago/-/timeago-2.1.0.tgz#28c0aef88aff8b54d1dfb42a664d05097e7fda35"
- integrity sha512-NklUYcWeji7po+Y6Oi7b7IkYmjd5YRu123bm3MqjQ71AzuOCTFbvPMHzYOjrUTkzr6gW3IJ24LQ4YmpshPy4ZQ==
+"@abp/timeago@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/timeago/-/timeago-2.2.0.tgz#9a8297f36a46cdc4cc62f44d0fdc91b70def389c"
+ integrity sha512-8qjmKscsTvPznHKWEsddYxdSBiU+l+OgLG6vzMcSWqngYbDQGXqNA93BwJI2qiwd+FkNcfGgYg7CN7bcwzmaiw==
dependencies:
- "@abp/jquery" "^2.1.0"
+ "@abp/jquery" "^2.2.0"
timeago "^1.6.7"
-"@abp/toastr@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/toastr/-/toastr-2.1.0.tgz#22a53a2b1f354770fdc7b37f06bec10eefccfe7a"
- integrity sha512-hD3hTDx+CixTVTx73rnZDiiFkfSxpZox8RLm+CiFA62ORdO8Ryij8TOXXkJd84b2tJfkAkYehohVXKwHlHU7Zg==
+"@abp/toastr@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/toastr/-/toastr-2.2.0.tgz#1cad83a89da244685b3c82adff64260b7ccf4742"
+ integrity sha512-HHfSaw4M/9zS+KgzxGvbHYiQ5qcJgpf21cRZEo16aUwnTeKr4SRaewAWryNn4dKcIO2YNrhzDLH+OYbEaJJlDQ==
dependencies:
- "@abp/jquery" "^2.1.0"
+ "@abp/jquery" "^2.2.0"
toastr "^2.1.4"
"@fortawesome/fontawesome-free@^5.11.2":
diff --git a/templates/module/angular/package.json b/templates/module/angular/package.json
index 25d046c1fa..34ea25858d 100644
--- a/templates/module/angular/package.json
+++ b/templates/module/angular/package.json
@@ -12,11 +12,11 @@
},
"private": true,
"dependencies": {
- "@abp/ng.account": "^2.1.0",
- "@abp/ng.theme.basic": "^2.1.0",
- "@abp/ng.identity": "^2.1.0",
- "@abp/ng.tenant-management": "^2.1.0",
- "@abp/ng.setting-management": "^2.1.0",
+ "@abp/ng.account": "^2.2.0",
+ "@abp/ng.theme.basic": "^2.2.0",
+ "@abp/ng.identity": "^2.2.0",
+ "@abp/ng.tenant-management": "^2.2.0",
+ "@abp/ng.setting-management": "^2.2.0",
"@angular/animations": "~8.2.14",
"@angular/common": "~8.2.14",
"@angular/compiler": "~8.2.14",
diff --git a/templates/module/angular/projects/my-project-name-config/package.json b/templates/module/angular/projects/my-project-name-config/package.json
index f38bcd8c11..6900d392a2 100644
--- a/templates/module/angular/projects/my-project-name-config/package.json
+++ b/templates/module/angular/projects/my-project-name-config/package.json
@@ -2,6 +2,6 @@
"name": "my-project-name.config",
"version": "0.0.1",
"peerDependencies": {
- "@abp/ng.core": ">=2.1.0"
+ "@abp/ng.core": ">=2.2.0"
}
}
diff --git a/templates/module/angular/projects/my-project-name/package.json b/templates/module/angular/projects/my-project-name/package.json
index 11317ae64d..d9e41b2608 100644
--- a/templates/module/angular/projects/my-project-name/package.json
+++ b/templates/module/angular/projects/my-project-name/package.json
@@ -2,7 +2,7 @@
"name": "my-project-name",
"version": "0.0.1",
"dependencies": {
- "@abp/ng.theme.shared": "^2.1.0",
+ "@abp/ng.theme.shared": "^2.2.0",
"my-project-name.config": "^0.0.1"
}
}
diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.HttpApi.Host/MyProjectNameHttpApiHostModule.cs b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.HttpApi.Host/MyProjectNameHttpApiHostModule.cs
index b501ed5fe5..3bfa9a36bf 100644
--- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.HttpApi.Host/MyProjectNameHttpApiHostModule.cs
+++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.HttpApi.Host/MyProjectNameHttpApiHostModule.cs
@@ -157,11 +157,11 @@ namespace MyCompanyName.MyProjectName
app.UseRouting();
app.UseCors(DefaultCorsPolicyName);
app.UseAuthentication();
- app.UseAuthorization();
if (MultiTenancyConsts.IsEnabled)
{
app.UseMultiTenancy();
}
+ app.UseAuthorization();
app.UseAbpRequestLocalization();
app.UseSwagger();
app.UseSwaggerUI(options =>
diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/package.json b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/package.json
index bd35b85b18..5d035c76c9 100644
--- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/package.json
+++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/package.json
@@ -3,6 +3,6 @@
"name": "my-app-identityserver",
"private": true,
"dependencies": {
- "@abp/aspnetcore.mvc.ui.theme.basic": "^2.1.0"
+ "@abp/aspnetcore.mvc.ui.theme.basic": "^2.2.0"
}
}
\ No newline at end of file
diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/wwwroot/libs/abp/core/abp.css b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/wwwroot/libs/abp/core/abp.css
index ee3c5080a5..ddf9cae5b2 100644
--- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/wwwroot/libs/abp/core/abp.css
+++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/wwwroot/libs/abp/core/abp.css
@@ -1,56 +1,56 @@
-@keyframes spin {
- 0% {
- transform: translateZ(0) rotate(0deg);
- }
-
- 100% {
- transform: translateZ(0) rotate(360deg);
- }
-}
-
-.abp-block-area {
- position: fixed;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- z-index: 102;
- background-color: #fff;
- opacity: .8;
- transition: opacity .25s;
-}
-
- .abp-block-area.abp-block-area-disappearing {
- opacity: 0;
- }
-
- .abp-block-area.abp-block-area-busy:after {
- content: attr(data-text);
- display: block;
- max-width: 125px;
- position: absolute;
- top: 50%;
- left: 50%;
- transform: translate(-50%, -50%);
- font-size: 20px;
- font-family: sans-serif;
- color: #343a40;
- text-align: center;
- text-transform: uppercase;
- }
-
- .abp-block-area.abp-block-area-busy:before {
- content: "";
- display: block;
- width: 150px;
- height: 150px;
- border-radius: 50%;
- border-width: 2px;
- border-style: solid;
- border-color: transparent #228ae6 #228ae6 #228ae6;
- position: absolute;
- top: calc(50% - 75px);
- left: calc(50% - 75px);
- will-change: transform;
- animation: spin .75s infinite ease-in-out;
- }
+@keyframes spin {
+ 0% {
+ transform: translateZ(0) rotate(0deg);
+ }
+
+ 100% {
+ transform: translateZ(0) rotate(360deg);
+ }
+}
+
+.abp-block-area {
+ position: fixed;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ z-index: 102;
+ background-color: #fff;
+ opacity: .8;
+ transition: opacity .25s;
+}
+
+ .abp-block-area.abp-block-area-disappearing {
+ opacity: 0;
+ }
+
+ .abp-block-area.abp-block-area-busy:after {
+ content: attr(data-text);
+ display: block;
+ max-width: 125px;
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ transform: translate(-50%, -50%);
+ font-size: 20px;
+ font-family: sans-serif;
+ color: #343a40;
+ text-align: center;
+ text-transform: uppercase;
+ }
+
+ .abp-block-area.abp-block-area-busy:before {
+ content: "";
+ display: block;
+ width: 150px;
+ height: 150px;
+ border-radius: 50%;
+ border-width: 2px;
+ border-style: solid;
+ border-color: transparent #228ae6 #228ae6 #228ae6;
+ position: absolute;
+ top: calc(50% - 75px);
+ left: calc(50% - 75px);
+ will-change: transform;
+ animation: spin .75s infinite ease-in-out;
+ }
diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/wwwroot/libs/abp/core/abp.js b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/wwwroot/libs/abp/core/abp.js
index cef1cf55e1..730db8bc97 100644
--- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/wwwroot/libs/abp/core/abp.js
+++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/wwwroot/libs/abp/core/abp.js
@@ -1,636 +1,636 @@
-var abp = abp || {};
-(function () {
-
- /* Application paths *****************************************/
-
- //Current application root path (including virtual directory if exists).
- abp.appPath = abp.appPath || '/';
-
- abp.pageLoadTime = new Date();
-
- //Converts given path to absolute path using abp.appPath variable.
- abp.toAbsAppPath = function (path) {
- if (path.indexOf('/') == 0) {
- path = path.substring(1);
- }
-
- return abp.appPath + path;
- };
-
- /* LOGGING ***************************************************/
- //Implements Logging API that provides secure & controlled usage of console.log
-
- abp.log = abp.log || {};
-
- abp.log.levels = {
- DEBUG: 1,
- INFO: 2,
- WARN: 3,
- ERROR: 4,
- FATAL: 5
- };
-
- abp.log.level = abp.log.levels.DEBUG;
-
- abp.log.log = function (logObject, logLevel) {
- if (!window.console || !window.console.log) {
- return;
- }
-
- if (logLevel != undefined && logLevel < abp.log.level) {
- return;
- }
-
- console.log(logObject);
- };
-
- abp.log.debug = function (logObject) {
- abp.log.log("DEBUG: ", abp.log.levels.DEBUG);
- abp.log.log(logObject, abp.log.levels.DEBUG);
- };
-
- abp.log.info = function (logObject) {
- abp.log.log("INFO: ", abp.log.levels.INFO);
- abp.log.log(logObject, abp.log.levels.INFO);
- };
-
- abp.log.warn = function (logObject) {
- abp.log.log("WARN: ", abp.log.levels.WARN);
- abp.log.log(logObject, abp.log.levels.WARN);
- };
-
- abp.log.error = function (logObject) {
- abp.log.log("ERROR: ", abp.log.levels.ERROR);
- abp.log.log(logObject, abp.log.levels.ERROR);
- };
-
- abp.log.fatal = function (logObject) {
- abp.log.log("FATAL: ", abp.log.levels.FATAL);
- abp.log.log(logObject, abp.log.levels.FATAL);
- };
-
- /* LOCALIZATION ***********************************************/
-
- abp.localization = abp.localization || {};
-
- abp.localization.values = {};
-
- abp.localization.localize = function (key, sourceName) {
- sourceName = sourceName || abp.localization.defaultResourceName;
-
- var source = abp.localization.values[sourceName];
-
- if (!source) {
- abp.log.warn('Could not find localization source: ' + sourceName);
- return key;
- }
-
- var value = source[key];
- if (value == undefined) {
- return key;
- }
-
- var copiedArguments = Array.prototype.slice.call(arguments, 0);
- copiedArguments.splice(1, 1);
- copiedArguments[0] = value;
-
- return abp.utils.formatString.apply(this, copiedArguments);
- };
-
- abp.localization.getResource = function (name) {
- return function () {
- var copiedArguments = Array.prototype.slice.call(arguments, 0);
- copiedArguments.splice(1, 0, name);
- return abp.localization.localize.apply(this, copiedArguments);
- };
- };
-
- abp.localization.defaultResourceName = undefined;
-
- /* AUTHORIZATION **********************************************/
-
- abp.auth = abp.auth || {};
-
- abp.auth.policies = abp.auth.policies || {};
-
- abp.auth.grantedPolicies = abp.auth.grantedPolicies || {};
-
- abp.auth.isGranted = function (policyName) {
- return abp.auth.policies[policyName] != undefined && abp.auth.grantedPolicies[policyName] != undefined;
- };
-
- abp.auth.isAnyGranted = function () {
- if (!arguments || arguments.length <= 0) {
- return true;
- }
-
- for (var i = 0; i < arguments.length; i++) {
- if (abp.auth.isGranted(arguments[i])) {
- return true;
- }
- }
-
- return false;
- };
-
- abp.auth.areAllGranted = function () {
- if (!arguments || arguments.length <= 0) {
- return true;
- }
-
- for (var i = 0; i < arguments.length; i++) {
- if (!abp.auth.isGranted(arguments[i])) {
- return false;
- }
- }
-
- return true;
- };
-
- abp.auth.tokenCookieName = 'Abp.AuthToken';
-
- abp.auth.setToken = function (authToken, expireDate) {
- abp.utils.setCookieValue(abp.auth.tokenCookieName, authToken, expireDate, abp.appPath, abp.domain);
- };
-
- abp.auth.getToken = function () {
- return abp.utils.getCookieValue(abp.auth.tokenCookieName);
- }
-
- abp.auth.clearToken = function () {
- abp.auth.setToken();
- }
-
- /* SETTINGS *************************************************/
-
- abp.setting = abp.setting || {};
-
- abp.setting.values = abp.setting.values || {};
-
- abp.setting.get = function (name) {
- return abp.setting.values[name];
- };
-
- abp.setting.getBoolean = function (name) {
- var value = abp.setting.get(name);
- return value == 'true' || value == 'True';
- };
-
- abp.setting.getInt = function (name) {
- return parseInt(abp.setting.values[name]);
- };
-
- /* NOTIFICATION *********************************************/
- //Defines Notification API, not implements it
-
- abp.notify = abp.notify || {};
-
- abp.notify.success = function (message, title, options) {
- abp.log.warn('abp.notify.success is not implemented!');
- };
-
- abp.notify.info = function (message, title, options) {
- abp.log.warn('abp.notify.info is not implemented!');
- };
-
- abp.notify.warn = function (message, title, options) {
- abp.log.warn('abp.notify.warn is not implemented!');
- };
-
- abp.notify.error = function (message, title, options) {
- abp.log.warn('abp.notify.error is not implemented!');
- };
-
- /* MESSAGE **************************************************/
- //Defines Message API, not implements it
-
- abp.message = abp.message || {};
-
- abp.message._showMessage = function (message, title) {
- alert((title || '') + ' ' + message);
- };
-
- abp.message.info = function (message, title) {
- abp.log.warn('abp.message.info is not implemented!');
- return abp.message._showMessage(message, title);
- };
-
- abp.message.success = function (message, title) {
- abp.log.warn('abp.message.success is not implemented!');
- return abp.message._showMessage(message, title);
- };
-
- abp.message.warn = function (message, title) {
- abp.log.warn('abp.message.warn is not implemented!');
- return abp.message._showMessage(message, title);
- };
-
- abp.message.error = function (message, title) {
- abp.log.warn('abp.message.error is not implemented!');
- return abp.message._showMessage(message, title);
- };
-
- abp.message.confirm = function (message, titleOrCallback, callback) {
- abp.log.warn('abp.message.confirm is not properly implemented!');
-
- if (titleOrCallback && !(typeof titleOrCallback == 'string')) {
- callback = titleOrCallback;
- }
-
- var result = confirm(message);
- callback && callback(result);
- };
-
- /* UI *******************************************************/
-
- abp.ui = abp.ui || {};
-
- /* UI BLOCK */
- //Defines UI Block API and implements basically
-
- var $abpBlockArea = document.createElement('div');
- $abpBlockArea.classList.add('abp-block-area');
-
- /* opts: { //Can be an object with options or a string for query a selector
- * elm: a query selector (optional - default: document.body)
- * busy: boolean (optional - default: false)
- * promise: A promise with always or finally handler (optional - auto unblocks the ui if provided)
- * }
- */
- abp.ui.block = function (opts) {
- if (!opts) {
- opts = {};
- } else if (typeof opts == 'string') {
- opts = {
- elm: opts
- };
- }
-
- var $elm = document.querySelector(opts.elm) || document.body;
-
- if (opts.busy) {
- $abpBlockArea.classList.add('abp-block-area-busy');
- } else {
- $abpBlockArea.classList.remove('abp-block-area-busy');
- }
-
- if (document.querySelector(opts.elm)) {
- $abpBlockArea.style.position = 'absolute';
- } else {
- $abpBlockArea.style.position = 'fixed';
- }
-
- $elm.appendChild($abpBlockArea);
-
- if (opts.promise) {
- if (opts.promise.always) { //jQuery.Deferred style
- opts.promise.always(function () {
- abp.ui.unblock({
- $elm: opts.elm
- });
- });
- } else if (opts.promise['finally']) { //Q style
- opts.promise['finally'](function () {
- abp.ui.unblock({
- $elm: opts.elm
- });
- });
- }
- }
- };
-
- /* opts: {
- *
- * }
- */
- abp.ui.unblock = function (opts) {
- var element = document.querySelector('.abp-block-area');
- if (element) {
- element.classList.add('abp-block-area-disappearing');
- setTimeout(function () {
- if (element) {
- element.classList.remove('abp-block-area-disappearing');
- element.parentElement.removeChild(element);
- }
- }, 250);
- }
- };
-
- /* UI BUSY */
- //Defines UI Busy API, not implements it
-
- abp.ui.setBusy = function (opts) {
- if (!opts) {
- opts = {
- busy: true
- };
- } else if (typeof opts == 'string') {
- opts = {
- elm: opts,
- busy: true
- };
- }
-
- abp.ui.block(opts);
- };
-
- abp.ui.clearBusy = function (opts) {
- abp.ui.unblock(opts);
- };
-
- /* SIMPLE EVENT BUS *****************************************/
-
- abp.event = (function () {
-
- var _callbacks = {};
-
- var on = function (eventName, callback) {
- if (!_callbacks[eventName]) {
- _callbacks[eventName] = [];
- }
-
- _callbacks[eventName].push(callback);
- };
-
- var off = function (eventName, callback) {
- var callbacks = _callbacks[eventName];
- if (!callbacks) {
- return;
- }
-
- var index = -1;
- for (var i = 0; i < callbacks.length; i++) {
- if (callbacks[i] === callback) {
- index = i;
- break;
- }
- }
-
- if (index < 0) {
- return;
- }
-
- _callbacks[eventName].splice(index, 1);
- };
-
- var trigger = function (eventName) {
- var callbacks = _callbacks[eventName];
- if (!callbacks || !callbacks.length) {
- return;
- }
-
- var args = Array.prototype.slice.call(arguments, 1);
- for (var i = 0; i < callbacks.length; i++) {
- callbacks[i].apply(this, args);
- }
- };
-
- // Public interface ///////////////////////////////////////////////////
-
- return {
- on: on,
- off: off,
- trigger: trigger
- };
- })();
-
-
- /* UTILS ***************************************************/
-
- abp.utils = abp.utils || {};
-
- /* Creates a name namespace.
- * Example:
- * var taskService = abp.utils.createNamespace(abp, 'services.task');
- * taskService will be equal to abp.services.task
- * first argument (root) must be defined first
- ************************************************************/
- abp.utils.createNamespace = function (root, ns) {
- var parts = ns.split('.');
- for (var i = 0; i < parts.length; i++) {
- if (typeof root[parts[i]] == 'undefined') {
- root[parts[i]] = {};
- }
-
- root = root[parts[i]];
- }
-
- return root;
- };
-
- /* Find and replaces a string (search) to another string (replacement) in
- * given string (str).
- * Example:
- * abp.utils.replaceAll('This is a test string', 'is', 'X') = 'ThX X a test string'
- ************************************************************/
- abp.utils.replaceAll = function (str, search, replacement) {
- var fix = search.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
- return str.replace(new RegExp(fix, 'g'), replacement);
- };
-
- /* Formats a string just like string.format in C#.
- * Example:
- * abp.utils.formatString('Hello {0}','Tuana') = 'Hello Tuana'
- ************************************************************/
- abp.utils.formatString = function () {
- if (arguments.length < 1) {
- return null;
- }
-
- var str = arguments[0];
-
- for (var i = 1; i < arguments.length; i++) {
- var placeHolder = '{' + (i - 1) + '}';
- str = abp.utils.replaceAll(str, placeHolder, arguments[i]);
- }
-
- return str;
- };
-
- abp.utils.toPascalCase = function (str) {
- if (!str || !str.length) {
- return str;
- }
-
- if (str.length === 1) {
- return str.charAt(0).toUpperCase();
- }
-
- return str.charAt(0).toUpperCase() + str.substr(1);
- }
-
- abp.utils.toCamelCase = function (str) {
- if (!str || !str.length) {
- return str;
- }
-
- if (str.length === 1) {
- return str.charAt(0).toLowerCase();
- }
-
- return str.charAt(0).toLowerCase() + str.substr(1);
- }
-
- abp.utils.truncateString = function (str, maxLength) {
- if (!str || !str.length || str.length <= maxLength) {
- return str;
- }
-
- return str.substr(0, maxLength);
- };
-
- abp.utils.truncateStringWithPostfix = function (str, maxLength, postfix) {
- postfix = postfix || '...';
-
- if (!str || !str.length || str.length <= maxLength) {
- return str;
- }
-
- if (maxLength <= postfix.length) {
- return postfix.substr(0, maxLength);
- }
-
- return str.substr(0, maxLength - postfix.length) + postfix;
- };
-
- abp.utils.isFunction = function (obj) {
- return !!(obj && obj.constructor && obj.call && obj.apply);
- };
-
- /**
- * parameterInfos should be an array of { name, value } objects
- * where name is query string parameter name and value is it's value.
- * includeQuestionMark is true by default.
- */
- abp.utils.buildQueryString = function (parameterInfos, includeQuestionMark) {
- if (includeQuestionMark === undefined) {
- includeQuestionMark = true;
- }
-
- var qs = '';
-
- function addSeperator() {
- if (!qs.length) {
- if (includeQuestionMark) {
- qs = qs + '?';
- }
- } else {
- qs = qs + '&';
- }
- }
-
- for (var i = 0; i < parameterInfos.length; ++i) {
- var parameterInfo = parameterInfos[i];
- if (parameterInfo.value === undefined) {
- continue;
- }
-
- if (parameterInfo.value === null) {
- parameterInfo.value = '';
- }
-
- addSeperator();
-
- if (parameterInfo.value.toJSON && typeof parameterInfo.value.toJSON === "function") {
- qs = qs + parameterInfo.name + '=' + encodeURIComponent(parameterInfo.value.toJSON());
- } else if (Array.isArray(parameterInfo.value) && parameterInfo.value.length) {
- for (var j = 0; j < parameterInfo.value.length; j++) {
- if (j > 0) {
- addSeperator();
- }
-
- qs = qs + parameterInfo.name + '[' + j + ']=' + encodeURIComponent(parameterInfo.value[j]);
- }
- } else {
- qs = qs + parameterInfo.name + '=' + encodeURIComponent(parameterInfo.value);
- }
- }
-
- return qs;
- }
-
- /**
- * Sets a cookie value for given key.
- * This is a simple implementation created to be used by ABP.
- * Please use a complete cookie library if you need.
- * @param {string} key
- * @param {string} value
- * @param {Date} expireDate (optional). If not specified the cookie will expire at the end of session.
- * @param {string} path (optional)
- */
- abp.utils.setCookieValue = function (key, value, expireDate, path) {
- var cookieValue = encodeURIComponent(key) + '=';
-
- if (value) {
- cookieValue = cookieValue + encodeURIComponent(value);
- }
-
- if (expireDate) {
- cookieValue = cookieValue + "; expires=" + expireDate.toUTCString();
- }
-
- if (path) {
- cookieValue = cookieValue + "; path=" + path;
- }
-
- document.cookie = cookieValue;
- };
-
- /**
- * Gets a cookie with given key.
- * This is a simple implementation created to be used by ABP.
- * Please use a complete cookie library if you need.
- * @param {string} key
- * @returns {string} Cookie value or null
- */
- abp.utils.getCookieValue = function (key) {
- var equalities = document.cookie.split('; ');
- for (var i = 0; i < equalities.length; i++) {
- if (!equalities[i]) {
- continue;
- }
-
- var splitted = equalities[i].split('=');
- if (splitted.length != 2) {
- continue;
- }
-
- if (decodeURIComponent(splitted[0]) === key) {
- return decodeURIComponent(splitted[1] || '');
- }
- }
-
- return null;
- };
-
- /**
- * Deletes cookie for given key.
- * This is a simple implementation created to be used by ABP.
- * Please use a complete cookie library if you need.
- * @param {string} key
- * @param {string} path (optional)
- */
- abp.utils.deleteCookie = function (key, path) {
- var cookieValue = encodeURIComponent(key) + '=';
-
- cookieValue = cookieValue + "; expires=" + (new Date(new Date().getTime() - 86400000)).toUTCString();
-
- if (path) {
- cookieValue = cookieValue + "; path=" + path;
- }
-
- document.cookie = cookieValue;
- }
-
- /* SECURITY ***************************************/
- abp.security = abp.security || {};
- abp.security.antiForgery = abp.security.antiForgery || {};
-
- abp.security.antiForgery.tokenCookieName = 'XSRF-TOKEN';
- abp.security.antiForgery.tokenHeaderName = 'X-XSRF-TOKEN';
-
- abp.security.antiForgery.getToken = function () {
- return abp.utils.getCookieValue(abp.security.antiForgery.tokenCookieName);
- };
-
+var abp = abp || {};
+(function () {
+
+ /* Application paths *****************************************/
+
+ //Current application root path (including virtual directory if exists).
+ abp.appPath = abp.appPath || '/';
+
+ abp.pageLoadTime = new Date();
+
+ //Converts given path to absolute path using abp.appPath variable.
+ abp.toAbsAppPath = function (path) {
+ if (path.indexOf('/') == 0) {
+ path = path.substring(1);
+ }
+
+ return abp.appPath + path;
+ };
+
+ /* LOGGING ***************************************************/
+ //Implements Logging API that provides secure & controlled usage of console.log
+
+ abp.log = abp.log || {};
+
+ abp.log.levels = {
+ DEBUG: 1,
+ INFO: 2,
+ WARN: 3,
+ ERROR: 4,
+ FATAL: 5
+ };
+
+ abp.log.level = abp.log.levels.DEBUG;
+
+ abp.log.log = function (logObject, logLevel) {
+ if (!window.console || !window.console.log) {
+ return;
+ }
+
+ if (logLevel != undefined && logLevel < abp.log.level) {
+ return;
+ }
+
+ console.log(logObject);
+ };
+
+ abp.log.debug = function (logObject) {
+ abp.log.log("DEBUG: ", abp.log.levels.DEBUG);
+ abp.log.log(logObject, abp.log.levels.DEBUG);
+ };
+
+ abp.log.info = function (logObject) {
+ abp.log.log("INFO: ", abp.log.levels.INFO);
+ abp.log.log(logObject, abp.log.levels.INFO);
+ };
+
+ abp.log.warn = function (logObject) {
+ abp.log.log("WARN: ", abp.log.levels.WARN);
+ abp.log.log(logObject, abp.log.levels.WARN);
+ };
+
+ abp.log.error = function (logObject) {
+ abp.log.log("ERROR: ", abp.log.levels.ERROR);
+ abp.log.log(logObject, abp.log.levels.ERROR);
+ };
+
+ abp.log.fatal = function (logObject) {
+ abp.log.log("FATAL: ", abp.log.levels.FATAL);
+ abp.log.log(logObject, abp.log.levels.FATAL);
+ };
+
+ /* LOCALIZATION ***********************************************/
+
+ abp.localization = abp.localization || {};
+
+ abp.localization.values = {};
+
+ abp.localization.localize = function (key, sourceName) {
+ sourceName = sourceName || abp.localization.defaultResourceName;
+
+ var source = abp.localization.values[sourceName];
+
+ if (!source) {
+ abp.log.warn('Could not find localization source: ' + sourceName);
+ return key;
+ }
+
+ var value = source[key];
+ if (value == undefined) {
+ return key;
+ }
+
+ var copiedArguments = Array.prototype.slice.call(arguments, 0);
+ copiedArguments.splice(1, 1);
+ copiedArguments[0] = value;
+
+ return abp.utils.formatString.apply(this, copiedArguments);
+ };
+
+ abp.localization.getResource = function (name) {
+ return function () {
+ var copiedArguments = Array.prototype.slice.call(arguments, 0);
+ copiedArguments.splice(1, 0, name);
+ return abp.localization.localize.apply(this, copiedArguments);
+ };
+ };
+
+ abp.localization.defaultResourceName = undefined;
+
+ /* AUTHORIZATION **********************************************/
+
+ abp.auth = abp.auth || {};
+
+ abp.auth.policies = abp.auth.policies || {};
+
+ abp.auth.grantedPolicies = abp.auth.grantedPolicies || {};
+
+ abp.auth.isGranted = function (policyName) {
+ return abp.auth.policies[policyName] != undefined && abp.auth.grantedPolicies[policyName] != undefined;
+ };
+
+ abp.auth.isAnyGranted = function () {
+ if (!arguments || arguments.length <= 0) {
+ return true;
+ }
+
+ for (var i = 0; i < arguments.length; i++) {
+ if (abp.auth.isGranted(arguments[i])) {
+ return true;
+ }
+ }
+
+ return false;
+ };
+
+ abp.auth.areAllGranted = function () {
+ if (!arguments || arguments.length <= 0) {
+ return true;
+ }
+
+ for (var i = 0; i < arguments.length; i++) {
+ if (!abp.auth.isGranted(arguments[i])) {
+ return false;
+ }
+ }
+
+ return true;
+ };
+
+ abp.auth.tokenCookieName = 'Abp.AuthToken';
+
+ abp.auth.setToken = function (authToken, expireDate) {
+ abp.utils.setCookieValue(abp.auth.tokenCookieName, authToken, expireDate, abp.appPath, abp.domain);
+ };
+
+ abp.auth.getToken = function () {
+ return abp.utils.getCookieValue(abp.auth.tokenCookieName);
+ }
+
+ abp.auth.clearToken = function () {
+ abp.auth.setToken();
+ }
+
+ /* SETTINGS *************************************************/
+
+ abp.setting = abp.setting || {};
+
+ abp.setting.values = abp.setting.values || {};
+
+ abp.setting.get = function (name) {
+ return abp.setting.values[name];
+ };
+
+ abp.setting.getBoolean = function (name) {
+ var value = abp.setting.get(name);
+ return value == 'true' || value == 'True';
+ };
+
+ abp.setting.getInt = function (name) {
+ return parseInt(abp.setting.values[name]);
+ };
+
+ /* NOTIFICATION *********************************************/
+ //Defines Notification API, not implements it
+
+ abp.notify = abp.notify || {};
+
+ abp.notify.success = function (message, title, options) {
+ abp.log.warn('abp.notify.success is not implemented!');
+ };
+
+ abp.notify.info = function (message, title, options) {
+ abp.log.warn('abp.notify.info is not implemented!');
+ };
+
+ abp.notify.warn = function (message, title, options) {
+ abp.log.warn('abp.notify.warn is not implemented!');
+ };
+
+ abp.notify.error = function (message, title, options) {
+ abp.log.warn('abp.notify.error is not implemented!');
+ };
+
+ /* MESSAGE **************************************************/
+ //Defines Message API, not implements it
+
+ abp.message = abp.message || {};
+
+ abp.message._showMessage = function (message, title) {
+ alert((title || '') + ' ' + message);
+ };
+
+ abp.message.info = function (message, title) {
+ abp.log.warn('abp.message.info is not implemented!');
+ return abp.message._showMessage(message, title);
+ };
+
+ abp.message.success = function (message, title) {
+ abp.log.warn('abp.message.success is not implemented!');
+ return abp.message._showMessage(message, title);
+ };
+
+ abp.message.warn = function (message, title) {
+ abp.log.warn('abp.message.warn is not implemented!');
+ return abp.message._showMessage(message, title);
+ };
+
+ abp.message.error = function (message, title) {
+ abp.log.warn('abp.message.error is not implemented!');
+ return abp.message._showMessage(message, title);
+ };
+
+ abp.message.confirm = function (message, titleOrCallback, callback) {
+ abp.log.warn('abp.message.confirm is not properly implemented!');
+
+ if (titleOrCallback && !(typeof titleOrCallback == 'string')) {
+ callback = titleOrCallback;
+ }
+
+ var result = confirm(message);
+ callback && callback(result);
+ };
+
+ /* UI *******************************************************/
+
+ abp.ui = abp.ui || {};
+
+ /* UI BLOCK */
+ //Defines UI Block API and implements basically
+
+ var $abpBlockArea = document.createElement('div');
+ $abpBlockArea.classList.add('abp-block-area');
+
+ /* opts: { //Can be an object with options or a string for query a selector
+ * elm: a query selector (optional - default: document.body)
+ * busy: boolean (optional - default: false)
+ * promise: A promise with always or finally handler (optional - auto unblocks the ui if provided)
+ * }
+ */
+ abp.ui.block = function (opts) {
+ if (!opts) {
+ opts = {};
+ } else if (typeof opts == 'string') {
+ opts = {
+ elm: opts
+ };
+ }
+
+ var $elm = document.querySelector(opts.elm) || document.body;
+
+ if (opts.busy) {
+ $abpBlockArea.classList.add('abp-block-area-busy');
+ } else {
+ $abpBlockArea.classList.remove('abp-block-area-busy');
+ }
+
+ if (document.querySelector(opts.elm)) {
+ $abpBlockArea.style.position = 'absolute';
+ } else {
+ $abpBlockArea.style.position = 'fixed';
+ }
+
+ $elm.appendChild($abpBlockArea);
+
+ if (opts.promise) {
+ if (opts.promise.always) { //jQuery.Deferred style
+ opts.promise.always(function () {
+ abp.ui.unblock({
+ $elm: opts.elm
+ });
+ });
+ } else if (opts.promise['finally']) { //Q style
+ opts.promise['finally'](function () {
+ abp.ui.unblock({
+ $elm: opts.elm
+ });
+ });
+ }
+ }
+ };
+
+ /* opts: {
+ *
+ * }
+ */
+ abp.ui.unblock = function (opts) {
+ var element = document.querySelector('.abp-block-area');
+ if (element) {
+ element.classList.add('abp-block-area-disappearing');
+ setTimeout(function () {
+ if (element) {
+ element.classList.remove('abp-block-area-disappearing');
+ element.parentElement.removeChild(element);
+ }
+ }, 250);
+ }
+ };
+
+ /* UI BUSY */
+ //Defines UI Busy API, not implements it
+
+ abp.ui.setBusy = function (opts) {
+ if (!opts) {
+ opts = {
+ busy: true
+ };
+ } else if (typeof opts == 'string') {
+ opts = {
+ elm: opts,
+ busy: true
+ };
+ }
+
+ abp.ui.block(opts);
+ };
+
+ abp.ui.clearBusy = function (opts) {
+ abp.ui.unblock(opts);
+ };
+
+ /* SIMPLE EVENT BUS *****************************************/
+
+ abp.event = (function () {
+
+ var _callbacks = {};
+
+ var on = function (eventName, callback) {
+ if (!_callbacks[eventName]) {
+ _callbacks[eventName] = [];
+ }
+
+ _callbacks[eventName].push(callback);
+ };
+
+ var off = function (eventName, callback) {
+ var callbacks = _callbacks[eventName];
+ if (!callbacks) {
+ return;
+ }
+
+ var index = -1;
+ for (var i = 0; i < callbacks.length; i++) {
+ if (callbacks[i] === callback) {
+ index = i;
+ break;
+ }
+ }
+
+ if (index < 0) {
+ return;
+ }
+
+ _callbacks[eventName].splice(index, 1);
+ };
+
+ var trigger = function (eventName) {
+ var callbacks = _callbacks[eventName];
+ if (!callbacks || !callbacks.length) {
+ return;
+ }
+
+ var args = Array.prototype.slice.call(arguments, 1);
+ for (var i = 0; i < callbacks.length; i++) {
+ callbacks[i].apply(this, args);
+ }
+ };
+
+ // Public interface ///////////////////////////////////////////////////
+
+ return {
+ on: on,
+ off: off,
+ trigger: trigger
+ };
+ })();
+
+
+ /* UTILS ***************************************************/
+
+ abp.utils = abp.utils || {};
+
+ /* Creates a name namespace.
+ * Example:
+ * var taskService = abp.utils.createNamespace(abp, 'services.task');
+ * taskService will be equal to abp.services.task
+ * first argument (root) must be defined first
+ ************************************************************/
+ abp.utils.createNamespace = function (root, ns) {
+ var parts = ns.split('.');
+ for (var i = 0; i < parts.length; i++) {
+ if (typeof root[parts[i]] == 'undefined') {
+ root[parts[i]] = {};
+ }
+
+ root = root[parts[i]];
+ }
+
+ return root;
+ };
+
+ /* Find and replaces a string (search) to another string (replacement) in
+ * given string (str).
+ * Example:
+ * abp.utils.replaceAll('This is a test string', 'is', 'X') = 'ThX X a test string'
+ ************************************************************/
+ abp.utils.replaceAll = function (str, search, replacement) {
+ var fix = search.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
+ return str.replace(new RegExp(fix, 'g'), replacement);
+ };
+
+ /* Formats a string just like string.format in C#.
+ * Example:
+ * abp.utils.formatString('Hello {0}','Tuana') = 'Hello Tuana'
+ ************************************************************/
+ abp.utils.formatString = function () {
+ if (arguments.length < 1) {
+ return null;
+ }
+
+ var str = arguments[0];
+
+ for (var i = 1; i < arguments.length; i++) {
+ var placeHolder = '{' + (i - 1) + '}';
+ str = abp.utils.replaceAll(str, placeHolder, arguments[i]);
+ }
+
+ return str;
+ };
+
+ abp.utils.toPascalCase = function (str) {
+ if (!str || !str.length) {
+ return str;
+ }
+
+ if (str.length === 1) {
+ return str.charAt(0).toUpperCase();
+ }
+
+ return str.charAt(0).toUpperCase() + str.substr(1);
+ }
+
+ abp.utils.toCamelCase = function (str) {
+ if (!str || !str.length) {
+ return str;
+ }
+
+ if (str.length === 1) {
+ return str.charAt(0).toLowerCase();
+ }
+
+ return str.charAt(0).toLowerCase() + str.substr(1);
+ }
+
+ abp.utils.truncateString = function (str, maxLength) {
+ if (!str || !str.length || str.length <= maxLength) {
+ return str;
+ }
+
+ return str.substr(0, maxLength);
+ };
+
+ abp.utils.truncateStringWithPostfix = function (str, maxLength, postfix) {
+ postfix = postfix || '...';
+
+ if (!str || !str.length || str.length <= maxLength) {
+ return str;
+ }
+
+ if (maxLength <= postfix.length) {
+ return postfix.substr(0, maxLength);
+ }
+
+ return str.substr(0, maxLength - postfix.length) + postfix;
+ };
+
+ abp.utils.isFunction = function (obj) {
+ return !!(obj && obj.constructor && obj.call && obj.apply);
+ };
+
+ /**
+ * parameterInfos should be an array of { name, value } objects
+ * where name is query string parameter name and value is it's value.
+ * includeQuestionMark is true by default.
+ */
+ abp.utils.buildQueryString = function (parameterInfos, includeQuestionMark) {
+ if (includeQuestionMark === undefined) {
+ includeQuestionMark = true;
+ }
+
+ var qs = '';
+
+ function addSeperator() {
+ if (!qs.length) {
+ if (includeQuestionMark) {
+ qs = qs + '?';
+ }
+ } else {
+ qs = qs + '&';
+ }
+ }
+
+ for (var i = 0; i < parameterInfos.length; ++i) {
+ var parameterInfo = parameterInfos[i];
+ if (parameterInfo.value === undefined) {
+ continue;
+ }
+
+ if (parameterInfo.value === null) {
+ parameterInfo.value = '';
+ }
+
+ addSeperator();
+
+ if (parameterInfo.value.toJSON && typeof parameterInfo.value.toJSON === "function") {
+ qs = qs + parameterInfo.name + '=' + encodeURIComponent(parameterInfo.value.toJSON());
+ } else if (Array.isArray(parameterInfo.value) && parameterInfo.value.length) {
+ for (var j = 0; j < parameterInfo.value.length; j++) {
+ if (j > 0) {
+ addSeperator();
+ }
+
+ qs = qs + parameterInfo.name + '[' + j + ']=' + encodeURIComponent(parameterInfo.value[j]);
+ }
+ } else {
+ qs = qs + parameterInfo.name + '=' + encodeURIComponent(parameterInfo.value);
+ }
+ }
+
+ return qs;
+ }
+
+ /**
+ * Sets a cookie value for given key.
+ * This is a simple implementation created to be used by ABP.
+ * Please use a complete cookie library if you need.
+ * @param {string} key
+ * @param {string} value
+ * @param {Date} expireDate (optional). If not specified the cookie will expire at the end of session.
+ * @param {string} path (optional)
+ */
+ abp.utils.setCookieValue = function (key, value, expireDate, path) {
+ var cookieValue = encodeURIComponent(key) + '=';
+
+ if (value) {
+ cookieValue = cookieValue + encodeURIComponent(value);
+ }
+
+ if (expireDate) {
+ cookieValue = cookieValue + "; expires=" + expireDate.toUTCString();
+ }
+
+ if (path) {
+ cookieValue = cookieValue + "; path=" + path;
+ }
+
+ document.cookie = cookieValue;
+ };
+
+ /**
+ * Gets a cookie with given key.
+ * This is a simple implementation created to be used by ABP.
+ * Please use a complete cookie library if you need.
+ * @param {string} key
+ * @returns {string} Cookie value or null
+ */
+ abp.utils.getCookieValue = function (key) {
+ var equalities = document.cookie.split('; ');
+ for (var i = 0; i < equalities.length; i++) {
+ if (!equalities[i]) {
+ continue;
+ }
+
+ var splitted = equalities[i].split('=');
+ if (splitted.length != 2) {
+ continue;
+ }
+
+ if (decodeURIComponent(splitted[0]) === key) {
+ return decodeURIComponent(splitted[1] || '');
+ }
+ }
+
+ return null;
+ };
+
+ /**
+ * Deletes cookie for given key.
+ * This is a simple implementation created to be used by ABP.
+ * Please use a complete cookie library if you need.
+ * @param {string} key
+ * @param {string} path (optional)
+ */
+ abp.utils.deleteCookie = function (key, path) {
+ var cookieValue = encodeURIComponent(key) + '=';
+
+ cookieValue = cookieValue + "; expires=" + (new Date(new Date().getTime() - 86400000)).toUTCString();
+
+ if (path) {
+ cookieValue = cookieValue + "; path=" + path;
+ }
+
+ document.cookie = cookieValue;
+ }
+
+ /* SECURITY ***************************************/
+ abp.security = abp.security || {};
+ abp.security.antiForgery = abp.security.antiForgery || {};
+
+ abp.security.antiForgery.tokenCookieName = 'XSRF-TOKEN';
+ abp.security.antiForgery.tokenHeaderName = 'X-XSRF-TOKEN';
+
+ abp.security.antiForgery.getToken = function () {
+ return abp.utils.getCookieValue(abp.security.antiForgery.tokenCookieName);
+ };
+
})();
\ No newline at end of file
diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/wwwroot/libs/abp/jquery/abp.jquery.js b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/wwwroot/libs/abp/jquery/abp.jquery.js
index 6e2ee001b8..e6aff047f7 100644
--- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/wwwroot/libs/abp/jquery/abp.jquery.js
+++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/wwwroot/libs/abp/jquery/abp.jquery.js
@@ -1,393 +1,393 @@
-var abp = abp || {};
-(function($) {
-
- if (!$) {
- throw "abp/jquery library requires the jquery library included to the page!";
- }
-
- // ABP CORE OVERRIDES /////////////////////////////////////////////////////
-
- abp.message._showMessage = function (message, title) {
- alert((title || '') + ' ' + message);
-
- return $.Deferred(function ($dfd) {
- $dfd.resolve();
- });
- };
-
- abp.message.confirm = function (message, titleOrCallback, callback) {
- if (titleOrCallback && !(typeof titleOrCallback == 'string')) {
- callback = titleOrCallback;
- }
-
- var result = confirm(message);
- callback && callback(result);
-
- return $.Deferred(function ($dfd) {
- $dfd.resolve(result);
- });
- };
-
- abp.utils.isFunction = function (obj) {
- return $.isFunction(obj);
- };
-
- // JQUERY EXTENSIONS //////////////////////////////////////////////////////
-
- $.fn.findWithSelf = function (selector) {
- return this.filter(selector).add(this.find(selector));
- };
-
- // DOM ////////////////////////////////////////////////////////////////////
-
- abp.dom = abp.dom || {};
-
- abp.dom.onNodeAdded = function (callback) {
- abp.event.on('abp.dom.nodeAdded', callback);
- };
-
- abp.dom.onNodeRemoved = function (callback) {
- abp.event.on('abp.dom.nodeRemoved', callback);
- };
-
- var mutationObserverCallback = function (mutationsList) {
- for (var i = 0; i < mutationsList.length; i++) {
- var mutation = mutationsList[i];
- if (mutation.type === 'childList') {
- if (mutation.addedNodes && mutation.removedNodes.length) {
- for (var k = 0; k < mutation.removedNodes.length; k++) {
- abp.event.trigger(
- 'abp.dom.nodeRemoved',
- {
- $el: $(mutation.removedNodes[k])
- }
- );
- }
- }
-
- if (mutation.addedNodes && mutation.addedNodes.length) {
- for (var j = 0; j < mutation.addedNodes.length; j++) {
- abp.event.trigger(
- 'abp.dom.nodeAdded',
- {
- $el: $(mutation.addedNodes[j])
- }
- );
- }
- }
- }
- }
- };
-
- new MutationObserver(mutationObserverCallback).observe(
- $('body')[0],
- {
- subtree: true,
- childList: true
- }
- );
-
- // AJAX ///////////////////////////////////////////////////////////////////
-
- abp.ajax = function (userOptions) {
- userOptions = userOptions || {};
-
- var options = $.extend(true, {}, abp.ajax.defaultOpts, userOptions);
-
- options.success = undefined;
- options.error = undefined;
-
- return $.Deferred(function ($dfd) {
- $.ajax(options)
- .done(function (data, textStatus, jqXHR) {
- $dfd.resolve(data);
- userOptions.success && userOptions.success(data);
- }).fail(function (jqXHR) {
- if (jqXHR.getResponseHeader('_AbpErrorFormat') === 'true') {
- abp.ajax.handleAbpErrorResponse(jqXHR, userOptions, $dfd);
- } else {
- abp.ajax.handleNonAbpErrorResponse(jqXHR, userOptions, $dfd);
- }
- });
- });
- };
-
- $.extend(abp.ajax, {
- defaultOpts: {
- dataType: 'json',
- type: 'POST',
- contentType: 'application/json',
- headers: {
- 'X-Requested-With': 'XMLHttpRequest'
- }
- },
-
- defaultError: {
- message: 'An error has occurred!',
- details: 'Error detail not sent by server.'
- },
-
- defaultError401: {
- message: 'You are not authenticated!',
- details: 'You should be authenticated (sign in) in order to perform this operation.'
- },
-
- defaultError403: {
- message: 'You are not authorized!',
- details: 'You are not allowed to perform this operation.'
- },
-
- defaultError404: {
- message: 'Resource not found!',
- details: 'The resource requested could not found on the server.'
- },
-
- logError: function (error) {
- abp.log.error(error);
- },
-
- showError: function (error) {
- if (error.details) {
- return abp.message.error(error.details, error.message);
- } else {
- return abp.message.error(error.message || abp.ajax.defaultError.message);
- }
- },
-
- handleTargetUrl: function (targetUrl) {
- if (!targetUrl) {
- location.href = abp.appPath;
- } else {
- location.href = targetUrl;
- }
- },
-
- handleErrorStatusCode: function (status) {
- switch (status) {
- case 401:
- abp.ajax.handleUnAuthorizedRequest(
- abp.ajax.showError(abp.ajax.defaultError401),
- abp.appPath
- );
- break;
- case 403:
- abp.ajax.showError(abp.ajax.defaultError403);
- break;
- case 404:
- abp.ajax.showError(abp.ajax.defaultError404);
- break;
- default:
- abp.ajax.showError(abp.ajax.defaultError);
- break;
- }
- },
-
- handleNonAbpErrorResponse: function (jqXHR, userOptions, $dfd) {
- if (userOptions.abpHandleError !== false) {
- abp.ajax.handleErrorStatusCode(jqXHR.status);
- }
-
- $dfd.reject.apply(this, arguments);
- userOptions.error && userOptions.error.apply(this, arguments);
- },
-
- handleAbpErrorResponse: function (jqXHR, userOptions, $dfd) {
- var messagePromise = null;
-
- if (userOptions.abpHandleError !== false) {
- messagePromise = abp.ajax.showError(jqXHR.responseJSON.error);
- }
-
- abp.ajax.logError(jqXHR.responseJSON.error);
-
- $dfd && $dfd.reject(jqXHR.responseJSON.error, jqXHR);
- userOptions.error && userOptions.error(jqXHR.responseJSON.error, jqXHR);
-
- if (jqXHR.status === 401 && userOptions.abpHandleError !== false) {
- abp.ajax.handleUnAuthorizedRequest(messagePromise);
- }
- },
-
- handleUnAuthorizedRequest: function (messagePromise, targetUrl) {
- if (messagePromise) {
- messagePromise.done(function () {
- abp.ajax.handleTargetUrl(targetUrl);
- });
- } else {
- abp.ajax.handleTargetUrl(targetUrl);
- }
- },
-
- blockUI: function (options) {
- if (options.blockUI) {
- if (options.blockUI === true) { //block whole page
- abp.ui.setBusy();
- } else { //block an element
- abp.ui.setBusy(options.blockUI);
- }
- }
- },
-
- unblockUI: function (options) {
- if (options.blockUI) {
- if (options.blockUI === true) { //unblock whole page
- abp.ui.clearBusy();
- } else { //unblock an element
- abp.ui.clearBusy(options.blockUI);
- }
- }
- },
-
- ajaxSendHandler: function (event, request, settings) {
- var token = abp.security.antiForgery.getToken();
- if (!token) {
- return;
- }
-
- if (!settings.headers || settings.headers[abp.security.antiForgery.tokenHeaderName] === undefined) {
- request.setRequestHeader(abp.security.antiForgery.tokenHeaderName, token);
- }
- }
- });
-
- $(document).ajaxSend(function (event, request, settings) {
- return abp.ajax.ajaxSendHandler(event, request, settings);
- });
-
- abp.event.on('abp.configurationInitialized', function () {
- var l = abp.localization.getResource('AbpUi');
-
- abp.ajax.defaultError.message = l('DefaultErrorMessage');
- abp.ajax.defaultError.details = l('DefaultErrorMessageDetail');
- abp.ajax.defaultError401.message = l('DefaultErrorMessage401');
- abp.ajax.defaultError401.details = l('DefaultErrorMessage401Detail');
- abp.ajax.defaultError403.message = l('DefaultErrorMessage403');
- abp.ajax.defaultError403.details = l('DefaultErrorMessage403Detail');
- abp.ajax.defaultError404.message = l('DefaultErrorMessage404');
- abp.ajax.defaultError404.details = l('DefaultErrorMessage404Detail');
- });
-
- // RESOURCE LOADER ////////////////////////////////////////////////////////
-
- /* UrlStates enum */
- var UrlStates = {
- LOADING: 'LOADING',
- LOADED: 'LOADED',
- FAILED: 'FAILED'
- };
-
- /* UrlInfo class */
- function UrlInfo(url) {
- this.url = url;
- this.state = UrlStates.LOADING;
- this.loadCallbacks = [];
- this.failCallbacks = [];
- }
-
- UrlInfo.prototype.succeed = function () {
- this.state = UrlStates.LOADED;
- for (var i = 0; i < this.loadCallbacks.length; i++) {
- this.loadCallbacks[i]();
- }
- };
-
- UrlInfo.prototype.failed = function () {
- this.state = UrlStates.FAILED;
- for (var i = 0; i < this.failCallbacks.length; i++) {
- this.failCallbacks[i]();
- }
- };
-
- UrlInfo.prototype.handleCallbacks = function (loadCallback, failCallback) {
- switch (this.state) {
- case UrlStates.LOADED:
- loadCallback && loadCallback();
- break;
- case UrlStates.FAILED:
- failCallback && failCallback();
- break;
- case UrlStates.LOADING:
- this.addCallbacks(loadCallback, failCallback);
- break;
- }
- };
-
- UrlInfo.prototype.addCallbacks = function (loadCallback, failCallback) {
- loadCallback && this.loadCallbacks.push(loadCallback);
- failCallback && this.failCallbacks.push(failCallback);
- };
-
- /* ResourceLoader API */
-
- abp.ResourceLoader = (function () {
-
- var _urlInfos = {};
-
- function getCacheKey(url) {
- return url;
- }
-
- function appendTimeToUrl(url) {
-
- if (url.indexOf('?') < 0) {
- url += '?';
- } else {
- url += '&';
- }
-
- url += '_=' + new Date().getTime();
-
- return url;
- }
-
- var _loadFromUrl = function (url, loadCallback, failCallback, serverLoader) {
-
- var cacheKey = getCacheKey(url);
-
- var urlInfo = _urlInfos[cacheKey];
-
- if (urlInfo) {
- urlInfo.handleCallbacks(loadCallback, failCallback);
- return;
- }
-
- _urlInfos[cacheKey] = urlInfo = new UrlInfo(url);
- urlInfo.addCallbacks(loadCallback, failCallback);
-
- serverLoader(urlInfo);
- };
-
- var _loadScript = function (url, loadCallback, failCallback) {
- _loadFromUrl(url, loadCallback, failCallback, function (urlInfo) {
- $.get({
- url: url,
- dataType: 'text'
- })
- .done(function (script) {
- $.globalEval(script);
- urlInfo.succeed();
- })
- .fail(function () {
- urlInfo.failed();
- });
- });
- };
-
- var _loadStyle = function (url) {
- _loadFromUrl(url, undefined, undefined, function (urlInfo) {
-
- $('', {
- rel: 'stylesheet',
- type: 'text/css',
- href: appendTimeToUrl(url)
- }).appendTo('head');
- });
- };
-
- return {
- loadScript: _loadScript,
- loadStyle: _loadStyle
- }
- })();
-
+var abp = abp || {};
+(function($) {
+
+ if (!$) {
+ throw "abp/jquery library requires the jquery library included to the page!";
+ }
+
+ // ABP CORE OVERRIDES /////////////////////////////////////////////////////
+
+ abp.message._showMessage = function (message, title) {
+ alert((title || '') + ' ' + message);
+
+ return $.Deferred(function ($dfd) {
+ $dfd.resolve();
+ });
+ };
+
+ abp.message.confirm = function (message, titleOrCallback, callback) {
+ if (titleOrCallback && !(typeof titleOrCallback == 'string')) {
+ callback = titleOrCallback;
+ }
+
+ var result = confirm(message);
+ callback && callback(result);
+
+ return $.Deferred(function ($dfd) {
+ $dfd.resolve(result);
+ });
+ };
+
+ abp.utils.isFunction = function (obj) {
+ return $.isFunction(obj);
+ };
+
+ // JQUERY EXTENSIONS //////////////////////////////////////////////////////
+
+ $.fn.findWithSelf = function (selector) {
+ return this.filter(selector).add(this.find(selector));
+ };
+
+ // DOM ////////////////////////////////////////////////////////////////////
+
+ abp.dom = abp.dom || {};
+
+ abp.dom.onNodeAdded = function (callback) {
+ abp.event.on('abp.dom.nodeAdded', callback);
+ };
+
+ abp.dom.onNodeRemoved = function (callback) {
+ abp.event.on('abp.dom.nodeRemoved', callback);
+ };
+
+ var mutationObserverCallback = function (mutationsList) {
+ for (var i = 0; i < mutationsList.length; i++) {
+ var mutation = mutationsList[i];
+ if (mutation.type === 'childList') {
+ if (mutation.addedNodes && mutation.removedNodes.length) {
+ for (var k = 0; k < mutation.removedNodes.length; k++) {
+ abp.event.trigger(
+ 'abp.dom.nodeRemoved',
+ {
+ $el: $(mutation.removedNodes[k])
+ }
+ );
+ }
+ }
+
+ if (mutation.addedNodes && mutation.addedNodes.length) {
+ for (var j = 0; j < mutation.addedNodes.length; j++) {
+ abp.event.trigger(
+ 'abp.dom.nodeAdded',
+ {
+ $el: $(mutation.addedNodes[j])
+ }
+ );
+ }
+ }
+ }
+ }
+ };
+
+ new MutationObserver(mutationObserverCallback).observe(
+ $('body')[0],
+ {
+ subtree: true,
+ childList: true
+ }
+ );
+
+ // AJAX ///////////////////////////////////////////////////////////////////
+
+ abp.ajax = function (userOptions) {
+ userOptions = userOptions || {};
+
+ var options = $.extend(true, {}, abp.ajax.defaultOpts, userOptions);
+
+ options.success = undefined;
+ options.error = undefined;
+
+ return $.Deferred(function ($dfd) {
+ $.ajax(options)
+ .done(function (data, textStatus, jqXHR) {
+ $dfd.resolve(data);
+ userOptions.success && userOptions.success(data);
+ }).fail(function (jqXHR) {
+ if (jqXHR.getResponseHeader('_AbpErrorFormat') === 'true') {
+ abp.ajax.handleAbpErrorResponse(jqXHR, userOptions, $dfd);
+ } else {
+ abp.ajax.handleNonAbpErrorResponse(jqXHR, userOptions, $dfd);
+ }
+ });
+ });
+ };
+
+ $.extend(abp.ajax, {
+ defaultOpts: {
+ dataType: 'json',
+ type: 'POST',
+ contentType: 'application/json',
+ headers: {
+ 'X-Requested-With': 'XMLHttpRequest'
+ }
+ },
+
+ defaultError: {
+ message: 'An error has occurred!',
+ details: 'Error detail not sent by server.'
+ },
+
+ defaultError401: {
+ message: 'You are not authenticated!',
+ details: 'You should be authenticated (sign in) in order to perform this operation.'
+ },
+
+ defaultError403: {
+ message: 'You are not authorized!',
+ details: 'You are not allowed to perform this operation.'
+ },
+
+ defaultError404: {
+ message: 'Resource not found!',
+ details: 'The resource requested could not found on the server.'
+ },
+
+ logError: function (error) {
+ abp.log.error(error);
+ },
+
+ showError: function (error) {
+ if (error.details) {
+ return abp.message.error(error.details, error.message);
+ } else {
+ return abp.message.error(error.message || abp.ajax.defaultError.message);
+ }
+ },
+
+ handleTargetUrl: function (targetUrl) {
+ if (!targetUrl) {
+ location.href = abp.appPath;
+ } else {
+ location.href = targetUrl;
+ }
+ },
+
+ handleErrorStatusCode: function (status) {
+ switch (status) {
+ case 401:
+ abp.ajax.handleUnAuthorizedRequest(
+ abp.ajax.showError(abp.ajax.defaultError401),
+ abp.appPath
+ );
+ break;
+ case 403:
+ abp.ajax.showError(abp.ajax.defaultError403);
+ break;
+ case 404:
+ abp.ajax.showError(abp.ajax.defaultError404);
+ break;
+ default:
+ abp.ajax.showError(abp.ajax.defaultError);
+ break;
+ }
+ },
+
+ handleNonAbpErrorResponse: function (jqXHR, userOptions, $dfd) {
+ if (userOptions.abpHandleError !== false) {
+ abp.ajax.handleErrorStatusCode(jqXHR.status);
+ }
+
+ $dfd.reject.apply(this, arguments);
+ userOptions.error && userOptions.error.apply(this, arguments);
+ },
+
+ handleAbpErrorResponse: function (jqXHR, userOptions, $dfd) {
+ var messagePromise = null;
+
+ if (userOptions.abpHandleError !== false) {
+ messagePromise = abp.ajax.showError(jqXHR.responseJSON.error);
+ }
+
+ abp.ajax.logError(jqXHR.responseJSON.error);
+
+ $dfd && $dfd.reject(jqXHR.responseJSON.error, jqXHR);
+ userOptions.error && userOptions.error(jqXHR.responseJSON.error, jqXHR);
+
+ if (jqXHR.status === 401 && userOptions.abpHandleError !== false) {
+ abp.ajax.handleUnAuthorizedRequest(messagePromise);
+ }
+ },
+
+ handleUnAuthorizedRequest: function (messagePromise, targetUrl) {
+ if (messagePromise) {
+ messagePromise.done(function () {
+ abp.ajax.handleTargetUrl(targetUrl);
+ });
+ } else {
+ abp.ajax.handleTargetUrl(targetUrl);
+ }
+ },
+
+ blockUI: function (options) {
+ if (options.blockUI) {
+ if (options.blockUI === true) { //block whole page
+ abp.ui.setBusy();
+ } else { //block an element
+ abp.ui.setBusy(options.blockUI);
+ }
+ }
+ },
+
+ unblockUI: function (options) {
+ if (options.blockUI) {
+ if (options.blockUI === true) { //unblock whole page
+ abp.ui.clearBusy();
+ } else { //unblock an element
+ abp.ui.clearBusy(options.blockUI);
+ }
+ }
+ },
+
+ ajaxSendHandler: function (event, request, settings) {
+ var token = abp.security.antiForgery.getToken();
+ if (!token) {
+ return;
+ }
+
+ if (!settings.headers || settings.headers[abp.security.antiForgery.tokenHeaderName] === undefined) {
+ request.setRequestHeader(abp.security.antiForgery.tokenHeaderName, token);
+ }
+ }
+ });
+
+ $(document).ajaxSend(function (event, request, settings) {
+ return abp.ajax.ajaxSendHandler(event, request, settings);
+ });
+
+ abp.event.on('abp.configurationInitialized', function () {
+ var l = abp.localization.getResource('AbpUi');
+
+ abp.ajax.defaultError.message = l('DefaultErrorMessage');
+ abp.ajax.defaultError.details = l('DefaultErrorMessageDetail');
+ abp.ajax.defaultError401.message = l('DefaultErrorMessage401');
+ abp.ajax.defaultError401.details = l('DefaultErrorMessage401Detail');
+ abp.ajax.defaultError403.message = l('DefaultErrorMessage403');
+ abp.ajax.defaultError403.details = l('DefaultErrorMessage403Detail');
+ abp.ajax.defaultError404.message = l('DefaultErrorMessage404');
+ abp.ajax.defaultError404.details = l('DefaultErrorMessage404Detail');
+ });
+
+ // RESOURCE LOADER ////////////////////////////////////////////////////////
+
+ /* UrlStates enum */
+ var UrlStates = {
+ LOADING: 'LOADING',
+ LOADED: 'LOADED',
+ FAILED: 'FAILED'
+ };
+
+ /* UrlInfo class */
+ function UrlInfo(url) {
+ this.url = url;
+ this.state = UrlStates.LOADING;
+ this.loadCallbacks = [];
+ this.failCallbacks = [];
+ }
+
+ UrlInfo.prototype.succeed = function () {
+ this.state = UrlStates.LOADED;
+ for (var i = 0; i < this.loadCallbacks.length; i++) {
+ this.loadCallbacks[i]();
+ }
+ };
+
+ UrlInfo.prototype.failed = function () {
+ this.state = UrlStates.FAILED;
+ for (var i = 0; i < this.failCallbacks.length; i++) {
+ this.failCallbacks[i]();
+ }
+ };
+
+ UrlInfo.prototype.handleCallbacks = function (loadCallback, failCallback) {
+ switch (this.state) {
+ case UrlStates.LOADED:
+ loadCallback && loadCallback();
+ break;
+ case UrlStates.FAILED:
+ failCallback && failCallback();
+ break;
+ case UrlStates.LOADING:
+ this.addCallbacks(loadCallback, failCallback);
+ break;
+ }
+ };
+
+ UrlInfo.prototype.addCallbacks = function (loadCallback, failCallback) {
+ loadCallback && this.loadCallbacks.push(loadCallback);
+ failCallback && this.failCallbacks.push(failCallback);
+ };
+
+ /* ResourceLoader API */
+
+ abp.ResourceLoader = (function () {
+
+ var _urlInfos = {};
+
+ function getCacheKey(url) {
+ return url;
+ }
+
+ function appendTimeToUrl(url) {
+
+ if (url.indexOf('?') < 0) {
+ url += '?';
+ } else {
+ url += '&';
+ }
+
+ url += '_=' + new Date().getTime();
+
+ return url;
+ }
+
+ var _loadFromUrl = function (url, loadCallback, failCallback, serverLoader) {
+
+ var cacheKey = getCacheKey(url);
+
+ var urlInfo = _urlInfos[cacheKey];
+
+ if (urlInfo) {
+ urlInfo.handleCallbacks(loadCallback, failCallback);
+ return;
+ }
+
+ _urlInfos[cacheKey] = urlInfo = new UrlInfo(url);
+ urlInfo.addCallbacks(loadCallback, failCallback);
+
+ serverLoader(urlInfo);
+ };
+
+ var _loadScript = function (url, loadCallback, failCallback) {
+ _loadFromUrl(url, loadCallback, failCallback, function (urlInfo) {
+ $.get({
+ url: url,
+ dataType: 'text'
+ })
+ .done(function (script) {
+ $.globalEval(script);
+ urlInfo.succeed();
+ })
+ .fail(function () {
+ urlInfo.failed();
+ });
+ });
+ };
+
+ var _loadStyle = function (url) {
+ _loadFromUrl(url, undefined, undefined, function (urlInfo) {
+
+ $('', {
+ rel: 'stylesheet',
+ type: 'text/css',
+ href: appendTimeToUrl(url)
+ }).appendTo('head');
+ });
+ };
+
+ return {
+ loadScript: _loadScript,
+ loadStyle: _loadStyle
+ }
+ })();
+
})(jQuery);
\ No newline at end of file
diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/yarn.lock b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/yarn.lock
index 7230736133..b3b0eb268b 100644
--- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/yarn.lock
+++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/yarn.lock
@@ -2,37 +2,37 @@
# yarn lockfile v1
-"@abp/aspnetcore.mvc.ui.theme.basic@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.basic/-/aspnetcore.mvc.ui.theme.basic-2.1.0.tgz#f815001bd856fb5cbdd0b736181f2401a1a7ec62"
- integrity sha512-ej6dhUo3H9w6bpBTpMhk3M6zbC3fVAVMm5yLSYlYJ0sQxjb9PqC02OgiJme0mkxCUMwPuHVSQLrMQbioXdZu3A==
+"@abp/aspnetcore.mvc.ui.theme.basic@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.basic/-/aspnetcore.mvc.ui.theme.basic-2.2.0.tgz#e7f4e57d2b17cc76388e9c56bc34d50c9658873b"
+ integrity sha512-S9GQ9YVg4DWrgjujwiXBER6KqdqW5nZ1Bmt+YEePn5gEoPvoVrh6ojthpHYRjBJtGFqBSzRAQ9eVZLebT22Ozg==
dependencies:
- "@abp/aspnetcore.mvc.ui.theme.shared" "^2.1.0"
+ "@abp/aspnetcore.mvc.ui.theme.shared" "^2.2.0"
-"@abp/aspnetcore.mvc.ui.theme.shared@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.shared/-/aspnetcore.mvc.ui.theme.shared-2.1.0.tgz#c2790241b5a44b9d6e4f65911a1b9d9e9104ed82"
- integrity sha512-dxC0P/b1T+QJmRrB8HoLM7/GkWblz/X5lLqgn583W7/OTYhvxIxszuRDy/XIEuS+fP6a9rcGvGu5jcKJEqe/xA==
- dependencies:
- "@abp/aspnetcore.mvc.ui" "^2.1.0"
- "@abp/bootstrap" "^2.1.0"
- "@abp/bootstrap-datepicker" "^2.1.0"
- "@abp/datatables.net-bs4" "^2.1.0"
- "@abp/font-awesome" "^2.1.0"
- "@abp/jquery-form" "^2.1.0"
- "@abp/jquery-validation-unobtrusive" "^2.1.0"
- "@abp/lodash" "^2.1.0"
- "@abp/luxon" "^2.1.0"
- "@abp/malihu-custom-scrollbar-plugin" "^2.1.0"
- "@abp/select2" "^2.1.0"
- "@abp/sweetalert" "^2.1.0"
- "@abp/timeago" "^2.1.0"
- "@abp/toastr" "^2.1.0"
-
-"@abp/aspnetcore.mvc.ui@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui/-/aspnetcore.mvc.ui-2.1.0.tgz#3c86f42e52af3151d2aee0ffdd1281014ea61054"
- integrity sha512-pKiKMBOPuLm7p44DW8DdbsVn5PY3NqGYkz6gf75uzxyWiVYyl2CM/bvX9w4Ie7Q969owENMLrBREN6ezWZ5ynA==
+"@abp/aspnetcore.mvc.ui.theme.shared@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.shared/-/aspnetcore.mvc.ui.theme.shared-2.2.0.tgz#e0df953853be2a184d323931573f9f98aebbaa62"
+ integrity sha512-urxziaCdvfEqN5cjiiM5f5dx2Yr+AoGqCJVCo0Okjl2dosdaj5DH4SBzMvKAaLXzo3Ep1h4b3Wvws4BThL/6rA==
+ dependencies:
+ "@abp/aspnetcore.mvc.ui" "^2.2.0"
+ "@abp/bootstrap" "^2.2.0"
+ "@abp/bootstrap-datepicker" "^2.2.0"
+ "@abp/datatables.net-bs4" "^2.2.0"
+ "@abp/font-awesome" "^2.2.0"
+ "@abp/jquery-form" "^2.2.0"
+ "@abp/jquery-validation-unobtrusive" "^2.2.0"
+ "@abp/lodash" "^2.2.0"
+ "@abp/luxon" "^2.2.0"
+ "@abp/malihu-custom-scrollbar-plugin" "^2.2.0"
+ "@abp/select2" "^2.2.0"
+ "@abp/sweetalert" "^2.2.0"
+ "@abp/timeago" "^2.2.0"
+ "@abp/toastr" "^2.2.0"
+
+"@abp/aspnetcore.mvc.ui@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui/-/aspnetcore.mvc.ui-2.2.0.tgz#b2cdd421eed09ec1d30ae85e14434b7efc094ade"
+ integrity sha512-IO/AjhJu+LUa9zOaT8JlEnV+Pcp9oQ3q9kTq8kmMakC35vTIyvBpB3nnykXIOytZSyjsBgFYB/uMxPgBOjWagg==
dependencies:
ansi-colors "^4.1.1"
extend-object "^1.0.0"
@@ -41,135 +41,135 @@
path "^0.12.7"
rimraf "^3.0.0"
-"@abp/bootstrap-datepicker@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/bootstrap-datepicker/-/bootstrap-datepicker-2.1.0.tgz#a0d71da15cb3d3cc02f9a390437a44db5e9f9ea1"
- integrity sha512-lkNI0iyefiXS2O5x9Ae9eJQLPXSQlOWDX7QhKnBHLR9JxjJEnhBUIIOylMltAIqtVDtjk2ikDyd3BAiyBdtB/w==
+"@abp/bootstrap-datepicker@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/bootstrap-datepicker/-/bootstrap-datepicker-2.2.0.tgz#a2f50b422824f18ed4b7e80be6852e2979119f8e"
+ integrity sha512-X9jT5mU42QFfVhOZdun7aEJUf3bMko6NsG3NFQVjqTqKH+iYGKfHPFpXD0gP/6Nb4KgZUdId8hSyQTZyOK2JEA==
dependencies:
bootstrap-datepicker "^1.9.0"
-"@abp/bootstrap@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/bootstrap/-/bootstrap-2.1.0.tgz#7ce15d4effac0e0991a3520c4666c6cb17a3fef2"
- integrity sha512-1xQjqu6shCgzd1FI94y5AIXGIhBlZEoRrOhaT84j/2KzYiDvhP+LAqQjMgqlQmBLs6vMckpxtf5thxKTMXvtOw==
+"@abp/bootstrap@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/bootstrap/-/bootstrap-2.2.0.tgz#16e41d3432117bbcd9012c6f735c49c543255879"
+ integrity sha512-aRmluu6SkIl+JgCzSSJZrDPkYr6WWaQdY0iJAOz6NHtffa7Aumh1IUOrLVKL0T1pQn6QKs0Z7JDGyYMdh1HPkQ==
dependencies:
- "@abp/core" "^2.1.0"
+ "@abp/core" "^2.2.0"
bootstrap "^4.3.1"
-"@abp/core@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/core/-/core-2.1.0.tgz#0cd2850f029df1d18517b8e74c70341972c37ed7"
- integrity sha512-1wnRo00hWncZWSakaEXm388XhhbKXDVkWDIdaT3kyQpvp3kX1lFx7I5iiZiwIeULwZRF9mi6HV6iHEze58x0kQ==
+"@abp/core@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/core/-/core-2.2.0.tgz#4eea0a06458c90acb8566a11eb841fe65d15d256"
+ integrity sha512-tBGHa5CUr0ewT31g689RAfQ6Su2p4uyn2PzmrW/8lahBrvqkoCb41fkCDLQJkTY5rKPrEKZd/s9OoyOnS20DLg==
-"@abp/datatables.net-bs4@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/datatables.net-bs4/-/datatables.net-bs4-2.1.0.tgz#a0f36cf4e3ef96ae03aa4b9956fcb8b971c854cb"
- integrity sha512-93qc2rrGs+JKRPM/7UCasa5VmfswgYU8cv3Ybg5OKoaASODYUn06GChRFnd/mvqcDxw4+8gaqpC3U2ETZZI4pA==
+"@abp/datatables.net-bs4@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/datatables.net-bs4/-/datatables.net-bs4-2.2.0.tgz#c7cc49e889b295ae10fb24ed62b154ef79ffc85a"
+ integrity sha512-zjJRPqOCWPfkHt1QztfFHKrsTE9o6Je2EpfA7hRMej2FlGbsMWUxOqx/btK1vjD6YIU8DtVDpIdj1WvPOITQ4Q==
dependencies:
- "@abp/datatables.net" "^2.1.0"
+ "@abp/datatables.net" "^2.2.0"
datatables.net-bs4 "^1.10.20"
-"@abp/datatables.net@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/datatables.net/-/datatables.net-2.1.0.tgz#674eaaa5b0948d7ee85b6605bfbad1a70f839aa7"
- integrity sha512-3ZM2p+JpHumxbIKlDP/LKLsfceMdttdTOL0ckIZCmAAgoIeKmAtuMoKcHTr8lj5mjgv4arBGvG9WVCemep2PEw==
+"@abp/datatables.net@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/datatables.net/-/datatables.net-2.2.0.tgz#22f9c7ca90c2d4af264483b4f8286b0feb7c3d52"
+ integrity sha512-L4MnpdloSWr/px3mvV75sxsxL68MyALB2LKdzCFMQWILCZVkxMmQb9LARINYIrn461Wrc+zbYWNEBD0MAq7flg==
dependencies:
- "@abp/core" "^2.1.0"
+ "@abp/core" "^2.2.0"
datatables.net "^1.10.20"
-"@abp/font-awesome@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/font-awesome/-/font-awesome-2.1.0.tgz#c2e628a1b9d0525e7d6950bf007feebcd1c490c8"
- integrity sha512-vlm1IQuQVfuCI2O1vphDd11zUEJ4/4PU0/0XI1YCpilse8fBg080CM3+G0kw6Erm/riznqhOJwBcfT+K+zqk8A==
+"@abp/font-awesome@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/font-awesome/-/font-awesome-2.2.0.tgz#2de39e3c6c3e8c30394d82861761a66c5b4032f0"
+ integrity sha512-RT06MYUGgaWBEpW5c7wUcfMXgxcOHWdX/C01LDO/j6iVoKBuBHOkkvcUoTWII068ECrLYOkj+RyT59dCKm8FFw==
dependencies:
- "@abp/core" "^2.1.0"
+ "@abp/core" "^2.2.0"
"@fortawesome/fontawesome-free" "^5.11.2"
-"@abp/jquery-form@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/jquery-form/-/jquery-form-2.1.0.tgz#285dbfdcf722cb0249f149e728cef7f788410c0c"
- integrity sha512-A17rjHTiBJBKYgrtDX5wIqnI89wNmo3bdK9NagL1wMFj4GvDyOZoRIDLqkopYQsc8zuPjqw4+1aa2TPiA+jtKg==
+"@abp/jquery-form@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/jquery-form/-/jquery-form-2.2.0.tgz#951653fac4013a7bbec065b5101b86d575e0eca7"
+ integrity sha512-ji44E3Ud0S3LNXn1WJ/Aw44qAIG7EITEW1KOe46oz+/awPpbiiA4dDDNleTvO2jI2/s8mNyR0bNanP6BUsc7tw==
dependencies:
- "@abp/jquery" "^2.1.0"
+ "@abp/jquery" "^2.2.0"
jquery-form "^4.2.2"
-"@abp/jquery-validation-unobtrusive@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-2.1.0.tgz#fc938775ced2efc686e7dd092d6ceff1ea947f36"
- integrity sha512-a8iBIj6amJ9rQNV+wxQUuEVh93M/c32kJcrwSEPWQcOoTj5gf0j8eKK9YvZaGokpylraz9mdGOwYQQuNj1sxEw==
+"@abp/jquery-validation-unobtrusive@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-2.2.0.tgz#6d39ba9f7bf026d1380796bf5dff76c8d16b42ce"
+ integrity sha512-SuS/dRRVz7ZR4HK/h9x0jRRVLPqXN0CPRGPdJZ1LJraXVEJ9/eDEGf1rMlHmEGt1FXXFTD01/zjisbweDE786w==
dependencies:
- "@abp/jquery-validation" "^2.1.0"
+ "@abp/jquery-validation" "^2.2.0"
jquery-validation-unobtrusive "^3.2.11"
-"@abp/jquery-validation@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/jquery-validation/-/jquery-validation-2.1.0.tgz#2bf1a31321cce3b2abe6d56c6112c52a8ecb28b6"
- integrity sha512-kU6/E+Xc3wHAUs+sGMAL8uozkXv65HnpksTwV4/+RK+D6iFU2EyNgCEFu7QGSwYZsV1/7YsCe2GD4ucBXIknbA==
+"@abp/jquery-validation@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/jquery-validation/-/jquery-validation-2.2.0.tgz#02bb8ba883e72c1204867ee4d1c1094bd91c4c4c"
+ integrity sha512-ypITQloO4iEDgqlA6qb3taj+7HMX0Cf/ACA2OvtrvOgJejx6J4wfrPjwuFZu1WWJ0xtc9yTdbovdcSVcQbIGaA==
dependencies:
- "@abp/jquery" "^2.1.0"
+ "@abp/jquery" "^2.2.0"
jquery-validation "^1.19.1"
-"@abp/jquery@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/jquery/-/jquery-2.1.0.tgz#fb5b4c9e8622cf46fee92f9f731d007d5fb200bb"
- integrity sha512-ZpfzRut5G611bBmuDdiT6BD0M7Rl1P6r8uNxUjdmFXYwFd8wD02ZhIcsX7qFHFkYERuXfcLrZh4rpw9G1DVCJg==
+"@abp/jquery@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/jquery/-/jquery-2.2.0.tgz#0e641b1109e78eff4c34331ca2b123b67cc30cbe"
+ integrity sha512-vEfRoFEAmDmRgSq98Y9EZExfQFSWtmjaHrodUu+MadTcRlnn+wHq8wwkKKxpj/eYtNc8aFORpyHMMH7uliAKxg==
dependencies:
- "@abp/core" "^2.1.0"
+ "@abp/core" "^2.2.0"
jquery "^3.4.1"
-"@abp/lodash@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/lodash/-/lodash-2.1.0.tgz#9fc9e6521e6284d607cedbff1a458fa324137c5c"
- integrity sha512-s1gTHhpbmEDDCsZeXb9MpClkDS4wH5R2IWPRZUlSPxo3gF0pvkx5ubdhYUEUgqy5QqWxE/+zUAjDc4x+cEriFQ==
+"@abp/lodash@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/lodash/-/lodash-2.2.0.tgz#af0a2ebcb28fd0a8c02da5026479d9370ed19719"
+ integrity sha512-wOMLqIpuq4a7ww7pB138G6YxBiTGBgxNW/IWGUiWbfgrr88cGPKIYYv/8O8mvr8PLNGjizNynuwQRj522yA3Dw==
dependencies:
- "@abp/core" "^2.1.0"
+ "@abp/core" "^2.2.0"
lodash "^4.17.15"
-"@abp/luxon@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/luxon/-/luxon-2.1.0.tgz#624796722119f075119006b436054aecbb38f15f"
- integrity sha512-2b0sRo6rdYT1wDu9nSXm/9o8rhQ9ED7FxrDMYabYuOQz48esgn4fBUNcPqpxwejpFmlhZY6CONvkddNtaMeVHw==
+"@abp/luxon@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/luxon/-/luxon-2.2.0.tgz#0d0e78edc249853fa31eceecc00df2846a879aa9"
+ integrity sha512-WbOW0PcMks+WXRPWt/+H4pOa5waM331WkY0F+EJx8fpxemNGQNUEXLkuMXzN3MrN6LrplM9AZ9i+NRA9PWHbNw==
dependencies:
luxon "^1.21.3"
-"@abp/malihu-custom-scrollbar-plugin@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-2.1.0.tgz#f4dc1a32cefc3de8af08cb6d585ec5f7636a0c5e"
- integrity sha512-WcxzCZ5YOMxGxZerEh966cVrFSCw1UTDqwU2rxA/LsHEbPKd69AY+SHvUiacNxPXs1ZCF6FFJ29C5dWicEIRaQ==
+"@abp/malihu-custom-scrollbar-plugin@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-2.2.0.tgz#e11fd46dccbb28d44fb199e880b91d27c94f1919"
+ integrity sha512-YDu/NLpIzMA96NDHxd27/+liTm3sow9M+oWH29+9JW8o/AEpXUH3T3AmoXXcTgsBlzLaewgHEFM8yxsAAFoj8Q==
dependencies:
- "@abp/core" "^2.1.0"
+ "@abp/core" "^2.2.0"
malihu-custom-scrollbar-plugin "^3.1.5"
-"@abp/select2@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/select2/-/select2-2.1.0.tgz#79e50d2c25e74a5f96520e8aa1433d79aea674d1"
- integrity sha512-ut/3c+lFdoepuDH36M7thWagmAmTFrChcPnhYjTx4MmIf31WW1BwqOSx3I2g8M+NEEx+V2jTNuBpTq7PONgSJg==
+"@abp/select2@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/select2/-/select2-2.2.0.tgz#4639d4e5b72b1736fa4476bd9b6a78e036400421"
+ integrity sha512-tc87JyM0kvVF388kyGUjDby49Zrrb089jVRRipoIaxXeu4M1YxEFSKBEcUK1MohZWjVtWrNs8MoxPlfukaMpyw==
dependencies:
- "@abp/core" "^2.1.0"
+ "@abp/core" "^2.2.0"
select2 "^4.0.12"
-"@abp/sweetalert@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/sweetalert/-/sweetalert-2.1.0.tgz#88f405c4ba9f9ed2fd54b945ed6bc48d5ae2fa23"
- integrity sha512-EWvReqxZ1DrNH9XD+cf/yGVj+8IPTpuoPuWKDryN4fF7TCMJA+KrXp5lFxpjfkKTtNzLeFGsJqDFWaUifxtqTA==
+"@abp/sweetalert@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/sweetalert/-/sweetalert-2.2.0.tgz#dfc60ba085522d8390e41b90bf5a3d474f4ae624"
+ integrity sha512-HS6TKOwP91UjzjZHaheurZ1AYUSMkQyCSmoX6g5LAK4eH8IIgpojVSp1AFCSPATrFsFWY/dzkDGcfu90FWsVBg==
dependencies:
- "@abp/core" "^2.1.0"
+ "@abp/core" "^2.2.0"
sweetalert "^2.1.2"
-"@abp/timeago@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/timeago/-/timeago-2.1.0.tgz#28c0aef88aff8b54d1dfb42a664d05097e7fda35"
- integrity sha512-NklUYcWeji7po+Y6Oi7b7IkYmjd5YRu123bm3MqjQ71AzuOCTFbvPMHzYOjrUTkzr6gW3IJ24LQ4YmpshPy4ZQ==
+"@abp/timeago@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/timeago/-/timeago-2.2.0.tgz#9a8297f36a46cdc4cc62f44d0fdc91b70def389c"
+ integrity sha512-8qjmKscsTvPznHKWEsddYxdSBiU+l+OgLG6vzMcSWqngYbDQGXqNA93BwJI2qiwd+FkNcfGgYg7CN7bcwzmaiw==
dependencies:
- "@abp/jquery" "^2.1.0"
+ "@abp/jquery" "^2.2.0"
timeago "^1.6.7"
-"@abp/toastr@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/toastr/-/toastr-2.1.0.tgz#22a53a2b1f354770fdc7b37f06bec10eefccfe7a"
- integrity sha512-hD3hTDx+CixTVTx73rnZDiiFkfSxpZox8RLm+CiFA62ORdO8Ryij8TOXXkJd84b2tJfkAkYehohVXKwHlHU7Zg==
+"@abp/toastr@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/toastr/-/toastr-2.2.0.tgz#1cad83a89da244685b3c82adff64260b7ccf4742"
+ integrity sha512-HHfSaw4M/9zS+KgzxGvbHYiQ5qcJgpf21cRZEo16aUwnTeKr4SRaewAWryNn4dKcIO2YNrhzDLH+OYbEaJJlDQ==
dependencies:
- "@abp/jquery" "^2.1.0"
+ "@abp/jquery" "^2.2.0"
toastr "^2.1.4"
"@fortawesome/fontawesome-free@^5.11.2":
diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Host/MyProjectNameWebHostModule.cs b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Host/MyProjectNameWebHostModule.cs
index 41b48d4548..8576829c5d 100644
--- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Host/MyProjectNameWebHostModule.cs
+++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Host/MyProjectNameWebHostModule.cs
@@ -235,13 +235,14 @@ namespace MyCompanyName.MyProjectName
app.UseVirtualFiles();
app.UseRouting();
app.UseAuthentication();
- app.UseAuthorization();
if (MultiTenancyConsts.IsEnabled)
{
app.UseMultiTenancy();
}
+ app.UseAuthorization();
+
app.UseAbpRequestLocalization();
app.UseSwagger();
diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Host/package.json b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Host/package.json
index b620e756f7..6e36dde3bf 100644
--- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Host/package.json
+++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Host/package.json
@@ -3,6 +3,6 @@
"name": "my-app",
"private": true,
"dependencies": {
- "@abp/aspnetcore.mvc.ui.theme.basic": "^2.1.0"
+ "@abp/aspnetcore.mvc.ui.theme.basic": "^2.2.0"
}
}
\ No newline at end of file
diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Host/wwwroot/libs/abp/core/abp.css b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Host/wwwroot/libs/abp/core/abp.css
index ee3c5080a5..ddf9cae5b2 100644
--- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Host/wwwroot/libs/abp/core/abp.css
+++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Host/wwwroot/libs/abp/core/abp.css
@@ -1,56 +1,56 @@
-@keyframes spin {
- 0% {
- transform: translateZ(0) rotate(0deg);
- }
-
- 100% {
- transform: translateZ(0) rotate(360deg);
- }
-}
-
-.abp-block-area {
- position: fixed;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- z-index: 102;
- background-color: #fff;
- opacity: .8;
- transition: opacity .25s;
-}
-
- .abp-block-area.abp-block-area-disappearing {
- opacity: 0;
- }
-
- .abp-block-area.abp-block-area-busy:after {
- content: attr(data-text);
- display: block;
- max-width: 125px;
- position: absolute;
- top: 50%;
- left: 50%;
- transform: translate(-50%, -50%);
- font-size: 20px;
- font-family: sans-serif;
- color: #343a40;
- text-align: center;
- text-transform: uppercase;
- }
-
- .abp-block-area.abp-block-area-busy:before {
- content: "";
- display: block;
- width: 150px;
- height: 150px;
- border-radius: 50%;
- border-width: 2px;
- border-style: solid;
- border-color: transparent #228ae6 #228ae6 #228ae6;
- position: absolute;
- top: calc(50% - 75px);
- left: calc(50% - 75px);
- will-change: transform;
- animation: spin .75s infinite ease-in-out;
- }
+@keyframes spin {
+ 0% {
+ transform: translateZ(0) rotate(0deg);
+ }
+
+ 100% {
+ transform: translateZ(0) rotate(360deg);
+ }
+}
+
+.abp-block-area {
+ position: fixed;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ z-index: 102;
+ background-color: #fff;
+ opacity: .8;
+ transition: opacity .25s;
+}
+
+ .abp-block-area.abp-block-area-disappearing {
+ opacity: 0;
+ }
+
+ .abp-block-area.abp-block-area-busy:after {
+ content: attr(data-text);
+ display: block;
+ max-width: 125px;
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ transform: translate(-50%, -50%);
+ font-size: 20px;
+ font-family: sans-serif;
+ color: #343a40;
+ text-align: center;
+ text-transform: uppercase;
+ }
+
+ .abp-block-area.abp-block-area-busy:before {
+ content: "";
+ display: block;
+ width: 150px;
+ height: 150px;
+ border-radius: 50%;
+ border-width: 2px;
+ border-style: solid;
+ border-color: transparent #228ae6 #228ae6 #228ae6;
+ position: absolute;
+ top: calc(50% - 75px);
+ left: calc(50% - 75px);
+ will-change: transform;
+ animation: spin .75s infinite ease-in-out;
+ }
diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Host/wwwroot/libs/abp/core/abp.js b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Host/wwwroot/libs/abp/core/abp.js
index cef1cf55e1..730db8bc97 100644
--- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Host/wwwroot/libs/abp/core/abp.js
+++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Host/wwwroot/libs/abp/core/abp.js
@@ -1,636 +1,636 @@
-var abp = abp || {};
-(function () {
-
- /* Application paths *****************************************/
-
- //Current application root path (including virtual directory if exists).
- abp.appPath = abp.appPath || '/';
-
- abp.pageLoadTime = new Date();
-
- //Converts given path to absolute path using abp.appPath variable.
- abp.toAbsAppPath = function (path) {
- if (path.indexOf('/') == 0) {
- path = path.substring(1);
- }
-
- return abp.appPath + path;
- };
-
- /* LOGGING ***************************************************/
- //Implements Logging API that provides secure & controlled usage of console.log
-
- abp.log = abp.log || {};
-
- abp.log.levels = {
- DEBUG: 1,
- INFO: 2,
- WARN: 3,
- ERROR: 4,
- FATAL: 5
- };
-
- abp.log.level = abp.log.levels.DEBUG;
-
- abp.log.log = function (logObject, logLevel) {
- if (!window.console || !window.console.log) {
- return;
- }
-
- if (logLevel != undefined && logLevel < abp.log.level) {
- return;
- }
-
- console.log(logObject);
- };
-
- abp.log.debug = function (logObject) {
- abp.log.log("DEBUG: ", abp.log.levels.DEBUG);
- abp.log.log(logObject, abp.log.levels.DEBUG);
- };
-
- abp.log.info = function (logObject) {
- abp.log.log("INFO: ", abp.log.levels.INFO);
- abp.log.log(logObject, abp.log.levels.INFO);
- };
-
- abp.log.warn = function (logObject) {
- abp.log.log("WARN: ", abp.log.levels.WARN);
- abp.log.log(logObject, abp.log.levels.WARN);
- };
-
- abp.log.error = function (logObject) {
- abp.log.log("ERROR: ", abp.log.levels.ERROR);
- abp.log.log(logObject, abp.log.levels.ERROR);
- };
-
- abp.log.fatal = function (logObject) {
- abp.log.log("FATAL: ", abp.log.levels.FATAL);
- abp.log.log(logObject, abp.log.levels.FATAL);
- };
-
- /* LOCALIZATION ***********************************************/
-
- abp.localization = abp.localization || {};
-
- abp.localization.values = {};
-
- abp.localization.localize = function (key, sourceName) {
- sourceName = sourceName || abp.localization.defaultResourceName;
-
- var source = abp.localization.values[sourceName];
-
- if (!source) {
- abp.log.warn('Could not find localization source: ' + sourceName);
- return key;
- }
-
- var value = source[key];
- if (value == undefined) {
- return key;
- }
-
- var copiedArguments = Array.prototype.slice.call(arguments, 0);
- copiedArguments.splice(1, 1);
- copiedArguments[0] = value;
-
- return abp.utils.formatString.apply(this, copiedArguments);
- };
-
- abp.localization.getResource = function (name) {
- return function () {
- var copiedArguments = Array.prototype.slice.call(arguments, 0);
- copiedArguments.splice(1, 0, name);
- return abp.localization.localize.apply(this, copiedArguments);
- };
- };
-
- abp.localization.defaultResourceName = undefined;
-
- /* AUTHORIZATION **********************************************/
-
- abp.auth = abp.auth || {};
-
- abp.auth.policies = abp.auth.policies || {};
-
- abp.auth.grantedPolicies = abp.auth.grantedPolicies || {};
-
- abp.auth.isGranted = function (policyName) {
- return abp.auth.policies[policyName] != undefined && abp.auth.grantedPolicies[policyName] != undefined;
- };
-
- abp.auth.isAnyGranted = function () {
- if (!arguments || arguments.length <= 0) {
- return true;
- }
-
- for (var i = 0; i < arguments.length; i++) {
- if (abp.auth.isGranted(arguments[i])) {
- return true;
- }
- }
-
- return false;
- };
-
- abp.auth.areAllGranted = function () {
- if (!arguments || arguments.length <= 0) {
- return true;
- }
-
- for (var i = 0; i < arguments.length; i++) {
- if (!abp.auth.isGranted(arguments[i])) {
- return false;
- }
- }
-
- return true;
- };
-
- abp.auth.tokenCookieName = 'Abp.AuthToken';
-
- abp.auth.setToken = function (authToken, expireDate) {
- abp.utils.setCookieValue(abp.auth.tokenCookieName, authToken, expireDate, abp.appPath, abp.domain);
- };
-
- abp.auth.getToken = function () {
- return abp.utils.getCookieValue(abp.auth.tokenCookieName);
- }
-
- abp.auth.clearToken = function () {
- abp.auth.setToken();
- }
-
- /* SETTINGS *************************************************/
-
- abp.setting = abp.setting || {};
-
- abp.setting.values = abp.setting.values || {};
-
- abp.setting.get = function (name) {
- return abp.setting.values[name];
- };
-
- abp.setting.getBoolean = function (name) {
- var value = abp.setting.get(name);
- return value == 'true' || value == 'True';
- };
-
- abp.setting.getInt = function (name) {
- return parseInt(abp.setting.values[name]);
- };
-
- /* NOTIFICATION *********************************************/
- //Defines Notification API, not implements it
-
- abp.notify = abp.notify || {};
-
- abp.notify.success = function (message, title, options) {
- abp.log.warn('abp.notify.success is not implemented!');
- };
-
- abp.notify.info = function (message, title, options) {
- abp.log.warn('abp.notify.info is not implemented!');
- };
-
- abp.notify.warn = function (message, title, options) {
- abp.log.warn('abp.notify.warn is not implemented!');
- };
-
- abp.notify.error = function (message, title, options) {
- abp.log.warn('abp.notify.error is not implemented!');
- };
-
- /* MESSAGE **************************************************/
- //Defines Message API, not implements it
-
- abp.message = abp.message || {};
-
- abp.message._showMessage = function (message, title) {
- alert((title || '') + ' ' + message);
- };
-
- abp.message.info = function (message, title) {
- abp.log.warn('abp.message.info is not implemented!');
- return abp.message._showMessage(message, title);
- };
-
- abp.message.success = function (message, title) {
- abp.log.warn('abp.message.success is not implemented!');
- return abp.message._showMessage(message, title);
- };
-
- abp.message.warn = function (message, title) {
- abp.log.warn('abp.message.warn is not implemented!');
- return abp.message._showMessage(message, title);
- };
-
- abp.message.error = function (message, title) {
- abp.log.warn('abp.message.error is not implemented!');
- return abp.message._showMessage(message, title);
- };
-
- abp.message.confirm = function (message, titleOrCallback, callback) {
- abp.log.warn('abp.message.confirm is not properly implemented!');
-
- if (titleOrCallback && !(typeof titleOrCallback == 'string')) {
- callback = titleOrCallback;
- }
-
- var result = confirm(message);
- callback && callback(result);
- };
-
- /* UI *******************************************************/
-
- abp.ui = abp.ui || {};
-
- /* UI BLOCK */
- //Defines UI Block API and implements basically
-
- var $abpBlockArea = document.createElement('div');
- $abpBlockArea.classList.add('abp-block-area');
-
- /* opts: { //Can be an object with options or a string for query a selector
- * elm: a query selector (optional - default: document.body)
- * busy: boolean (optional - default: false)
- * promise: A promise with always or finally handler (optional - auto unblocks the ui if provided)
- * }
- */
- abp.ui.block = function (opts) {
- if (!opts) {
- opts = {};
- } else if (typeof opts == 'string') {
- opts = {
- elm: opts
- };
- }
-
- var $elm = document.querySelector(opts.elm) || document.body;
-
- if (opts.busy) {
- $abpBlockArea.classList.add('abp-block-area-busy');
- } else {
- $abpBlockArea.classList.remove('abp-block-area-busy');
- }
-
- if (document.querySelector(opts.elm)) {
- $abpBlockArea.style.position = 'absolute';
- } else {
- $abpBlockArea.style.position = 'fixed';
- }
-
- $elm.appendChild($abpBlockArea);
-
- if (opts.promise) {
- if (opts.promise.always) { //jQuery.Deferred style
- opts.promise.always(function () {
- abp.ui.unblock({
- $elm: opts.elm
- });
- });
- } else if (opts.promise['finally']) { //Q style
- opts.promise['finally'](function () {
- abp.ui.unblock({
- $elm: opts.elm
- });
- });
- }
- }
- };
-
- /* opts: {
- *
- * }
- */
- abp.ui.unblock = function (opts) {
- var element = document.querySelector('.abp-block-area');
- if (element) {
- element.classList.add('abp-block-area-disappearing');
- setTimeout(function () {
- if (element) {
- element.classList.remove('abp-block-area-disappearing');
- element.parentElement.removeChild(element);
- }
- }, 250);
- }
- };
-
- /* UI BUSY */
- //Defines UI Busy API, not implements it
-
- abp.ui.setBusy = function (opts) {
- if (!opts) {
- opts = {
- busy: true
- };
- } else if (typeof opts == 'string') {
- opts = {
- elm: opts,
- busy: true
- };
- }
-
- abp.ui.block(opts);
- };
-
- abp.ui.clearBusy = function (opts) {
- abp.ui.unblock(opts);
- };
-
- /* SIMPLE EVENT BUS *****************************************/
-
- abp.event = (function () {
-
- var _callbacks = {};
-
- var on = function (eventName, callback) {
- if (!_callbacks[eventName]) {
- _callbacks[eventName] = [];
- }
-
- _callbacks[eventName].push(callback);
- };
-
- var off = function (eventName, callback) {
- var callbacks = _callbacks[eventName];
- if (!callbacks) {
- return;
- }
-
- var index = -1;
- for (var i = 0; i < callbacks.length; i++) {
- if (callbacks[i] === callback) {
- index = i;
- break;
- }
- }
-
- if (index < 0) {
- return;
- }
-
- _callbacks[eventName].splice(index, 1);
- };
-
- var trigger = function (eventName) {
- var callbacks = _callbacks[eventName];
- if (!callbacks || !callbacks.length) {
- return;
- }
-
- var args = Array.prototype.slice.call(arguments, 1);
- for (var i = 0; i < callbacks.length; i++) {
- callbacks[i].apply(this, args);
- }
- };
-
- // Public interface ///////////////////////////////////////////////////
-
- return {
- on: on,
- off: off,
- trigger: trigger
- };
- })();
-
-
- /* UTILS ***************************************************/
-
- abp.utils = abp.utils || {};
-
- /* Creates a name namespace.
- * Example:
- * var taskService = abp.utils.createNamespace(abp, 'services.task');
- * taskService will be equal to abp.services.task
- * first argument (root) must be defined first
- ************************************************************/
- abp.utils.createNamespace = function (root, ns) {
- var parts = ns.split('.');
- for (var i = 0; i < parts.length; i++) {
- if (typeof root[parts[i]] == 'undefined') {
- root[parts[i]] = {};
- }
-
- root = root[parts[i]];
- }
-
- return root;
- };
-
- /* Find and replaces a string (search) to another string (replacement) in
- * given string (str).
- * Example:
- * abp.utils.replaceAll('This is a test string', 'is', 'X') = 'ThX X a test string'
- ************************************************************/
- abp.utils.replaceAll = function (str, search, replacement) {
- var fix = search.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
- return str.replace(new RegExp(fix, 'g'), replacement);
- };
-
- /* Formats a string just like string.format in C#.
- * Example:
- * abp.utils.formatString('Hello {0}','Tuana') = 'Hello Tuana'
- ************************************************************/
- abp.utils.formatString = function () {
- if (arguments.length < 1) {
- return null;
- }
-
- var str = arguments[0];
-
- for (var i = 1; i < arguments.length; i++) {
- var placeHolder = '{' + (i - 1) + '}';
- str = abp.utils.replaceAll(str, placeHolder, arguments[i]);
- }
-
- return str;
- };
-
- abp.utils.toPascalCase = function (str) {
- if (!str || !str.length) {
- return str;
- }
-
- if (str.length === 1) {
- return str.charAt(0).toUpperCase();
- }
-
- return str.charAt(0).toUpperCase() + str.substr(1);
- }
-
- abp.utils.toCamelCase = function (str) {
- if (!str || !str.length) {
- return str;
- }
-
- if (str.length === 1) {
- return str.charAt(0).toLowerCase();
- }
-
- return str.charAt(0).toLowerCase() + str.substr(1);
- }
-
- abp.utils.truncateString = function (str, maxLength) {
- if (!str || !str.length || str.length <= maxLength) {
- return str;
- }
-
- return str.substr(0, maxLength);
- };
-
- abp.utils.truncateStringWithPostfix = function (str, maxLength, postfix) {
- postfix = postfix || '...';
-
- if (!str || !str.length || str.length <= maxLength) {
- return str;
- }
-
- if (maxLength <= postfix.length) {
- return postfix.substr(0, maxLength);
- }
-
- return str.substr(0, maxLength - postfix.length) + postfix;
- };
-
- abp.utils.isFunction = function (obj) {
- return !!(obj && obj.constructor && obj.call && obj.apply);
- };
-
- /**
- * parameterInfos should be an array of { name, value } objects
- * where name is query string parameter name and value is it's value.
- * includeQuestionMark is true by default.
- */
- abp.utils.buildQueryString = function (parameterInfos, includeQuestionMark) {
- if (includeQuestionMark === undefined) {
- includeQuestionMark = true;
- }
-
- var qs = '';
-
- function addSeperator() {
- if (!qs.length) {
- if (includeQuestionMark) {
- qs = qs + '?';
- }
- } else {
- qs = qs + '&';
- }
- }
-
- for (var i = 0; i < parameterInfos.length; ++i) {
- var parameterInfo = parameterInfos[i];
- if (parameterInfo.value === undefined) {
- continue;
- }
-
- if (parameterInfo.value === null) {
- parameterInfo.value = '';
- }
-
- addSeperator();
-
- if (parameterInfo.value.toJSON && typeof parameterInfo.value.toJSON === "function") {
- qs = qs + parameterInfo.name + '=' + encodeURIComponent(parameterInfo.value.toJSON());
- } else if (Array.isArray(parameterInfo.value) && parameterInfo.value.length) {
- for (var j = 0; j < parameterInfo.value.length; j++) {
- if (j > 0) {
- addSeperator();
- }
-
- qs = qs + parameterInfo.name + '[' + j + ']=' + encodeURIComponent(parameterInfo.value[j]);
- }
- } else {
- qs = qs + parameterInfo.name + '=' + encodeURIComponent(parameterInfo.value);
- }
- }
-
- return qs;
- }
-
- /**
- * Sets a cookie value for given key.
- * This is a simple implementation created to be used by ABP.
- * Please use a complete cookie library if you need.
- * @param {string} key
- * @param {string} value
- * @param {Date} expireDate (optional). If not specified the cookie will expire at the end of session.
- * @param {string} path (optional)
- */
- abp.utils.setCookieValue = function (key, value, expireDate, path) {
- var cookieValue = encodeURIComponent(key) + '=';
-
- if (value) {
- cookieValue = cookieValue + encodeURIComponent(value);
- }
-
- if (expireDate) {
- cookieValue = cookieValue + "; expires=" + expireDate.toUTCString();
- }
-
- if (path) {
- cookieValue = cookieValue + "; path=" + path;
- }
-
- document.cookie = cookieValue;
- };
-
- /**
- * Gets a cookie with given key.
- * This is a simple implementation created to be used by ABP.
- * Please use a complete cookie library if you need.
- * @param {string} key
- * @returns {string} Cookie value or null
- */
- abp.utils.getCookieValue = function (key) {
- var equalities = document.cookie.split('; ');
- for (var i = 0; i < equalities.length; i++) {
- if (!equalities[i]) {
- continue;
- }
-
- var splitted = equalities[i].split('=');
- if (splitted.length != 2) {
- continue;
- }
-
- if (decodeURIComponent(splitted[0]) === key) {
- return decodeURIComponent(splitted[1] || '');
- }
- }
-
- return null;
- };
-
- /**
- * Deletes cookie for given key.
- * This is a simple implementation created to be used by ABP.
- * Please use a complete cookie library if you need.
- * @param {string} key
- * @param {string} path (optional)
- */
- abp.utils.deleteCookie = function (key, path) {
- var cookieValue = encodeURIComponent(key) + '=';
-
- cookieValue = cookieValue + "; expires=" + (new Date(new Date().getTime() - 86400000)).toUTCString();
-
- if (path) {
- cookieValue = cookieValue + "; path=" + path;
- }
-
- document.cookie = cookieValue;
- }
-
- /* SECURITY ***************************************/
- abp.security = abp.security || {};
- abp.security.antiForgery = abp.security.antiForgery || {};
-
- abp.security.antiForgery.tokenCookieName = 'XSRF-TOKEN';
- abp.security.antiForgery.tokenHeaderName = 'X-XSRF-TOKEN';
-
- abp.security.antiForgery.getToken = function () {
- return abp.utils.getCookieValue(abp.security.antiForgery.tokenCookieName);
- };
-
+var abp = abp || {};
+(function () {
+
+ /* Application paths *****************************************/
+
+ //Current application root path (including virtual directory if exists).
+ abp.appPath = abp.appPath || '/';
+
+ abp.pageLoadTime = new Date();
+
+ //Converts given path to absolute path using abp.appPath variable.
+ abp.toAbsAppPath = function (path) {
+ if (path.indexOf('/') == 0) {
+ path = path.substring(1);
+ }
+
+ return abp.appPath + path;
+ };
+
+ /* LOGGING ***************************************************/
+ //Implements Logging API that provides secure & controlled usage of console.log
+
+ abp.log = abp.log || {};
+
+ abp.log.levels = {
+ DEBUG: 1,
+ INFO: 2,
+ WARN: 3,
+ ERROR: 4,
+ FATAL: 5
+ };
+
+ abp.log.level = abp.log.levels.DEBUG;
+
+ abp.log.log = function (logObject, logLevel) {
+ if (!window.console || !window.console.log) {
+ return;
+ }
+
+ if (logLevel != undefined && logLevel < abp.log.level) {
+ return;
+ }
+
+ console.log(logObject);
+ };
+
+ abp.log.debug = function (logObject) {
+ abp.log.log("DEBUG: ", abp.log.levels.DEBUG);
+ abp.log.log(logObject, abp.log.levels.DEBUG);
+ };
+
+ abp.log.info = function (logObject) {
+ abp.log.log("INFO: ", abp.log.levels.INFO);
+ abp.log.log(logObject, abp.log.levels.INFO);
+ };
+
+ abp.log.warn = function (logObject) {
+ abp.log.log("WARN: ", abp.log.levels.WARN);
+ abp.log.log(logObject, abp.log.levels.WARN);
+ };
+
+ abp.log.error = function (logObject) {
+ abp.log.log("ERROR: ", abp.log.levels.ERROR);
+ abp.log.log(logObject, abp.log.levels.ERROR);
+ };
+
+ abp.log.fatal = function (logObject) {
+ abp.log.log("FATAL: ", abp.log.levels.FATAL);
+ abp.log.log(logObject, abp.log.levels.FATAL);
+ };
+
+ /* LOCALIZATION ***********************************************/
+
+ abp.localization = abp.localization || {};
+
+ abp.localization.values = {};
+
+ abp.localization.localize = function (key, sourceName) {
+ sourceName = sourceName || abp.localization.defaultResourceName;
+
+ var source = abp.localization.values[sourceName];
+
+ if (!source) {
+ abp.log.warn('Could not find localization source: ' + sourceName);
+ return key;
+ }
+
+ var value = source[key];
+ if (value == undefined) {
+ return key;
+ }
+
+ var copiedArguments = Array.prototype.slice.call(arguments, 0);
+ copiedArguments.splice(1, 1);
+ copiedArguments[0] = value;
+
+ return abp.utils.formatString.apply(this, copiedArguments);
+ };
+
+ abp.localization.getResource = function (name) {
+ return function () {
+ var copiedArguments = Array.prototype.slice.call(arguments, 0);
+ copiedArguments.splice(1, 0, name);
+ return abp.localization.localize.apply(this, copiedArguments);
+ };
+ };
+
+ abp.localization.defaultResourceName = undefined;
+
+ /* AUTHORIZATION **********************************************/
+
+ abp.auth = abp.auth || {};
+
+ abp.auth.policies = abp.auth.policies || {};
+
+ abp.auth.grantedPolicies = abp.auth.grantedPolicies || {};
+
+ abp.auth.isGranted = function (policyName) {
+ return abp.auth.policies[policyName] != undefined && abp.auth.grantedPolicies[policyName] != undefined;
+ };
+
+ abp.auth.isAnyGranted = function () {
+ if (!arguments || arguments.length <= 0) {
+ return true;
+ }
+
+ for (var i = 0; i < arguments.length; i++) {
+ if (abp.auth.isGranted(arguments[i])) {
+ return true;
+ }
+ }
+
+ return false;
+ };
+
+ abp.auth.areAllGranted = function () {
+ if (!arguments || arguments.length <= 0) {
+ return true;
+ }
+
+ for (var i = 0; i < arguments.length; i++) {
+ if (!abp.auth.isGranted(arguments[i])) {
+ return false;
+ }
+ }
+
+ return true;
+ };
+
+ abp.auth.tokenCookieName = 'Abp.AuthToken';
+
+ abp.auth.setToken = function (authToken, expireDate) {
+ abp.utils.setCookieValue(abp.auth.tokenCookieName, authToken, expireDate, abp.appPath, abp.domain);
+ };
+
+ abp.auth.getToken = function () {
+ return abp.utils.getCookieValue(abp.auth.tokenCookieName);
+ }
+
+ abp.auth.clearToken = function () {
+ abp.auth.setToken();
+ }
+
+ /* SETTINGS *************************************************/
+
+ abp.setting = abp.setting || {};
+
+ abp.setting.values = abp.setting.values || {};
+
+ abp.setting.get = function (name) {
+ return abp.setting.values[name];
+ };
+
+ abp.setting.getBoolean = function (name) {
+ var value = abp.setting.get(name);
+ return value == 'true' || value == 'True';
+ };
+
+ abp.setting.getInt = function (name) {
+ return parseInt(abp.setting.values[name]);
+ };
+
+ /* NOTIFICATION *********************************************/
+ //Defines Notification API, not implements it
+
+ abp.notify = abp.notify || {};
+
+ abp.notify.success = function (message, title, options) {
+ abp.log.warn('abp.notify.success is not implemented!');
+ };
+
+ abp.notify.info = function (message, title, options) {
+ abp.log.warn('abp.notify.info is not implemented!');
+ };
+
+ abp.notify.warn = function (message, title, options) {
+ abp.log.warn('abp.notify.warn is not implemented!');
+ };
+
+ abp.notify.error = function (message, title, options) {
+ abp.log.warn('abp.notify.error is not implemented!');
+ };
+
+ /* MESSAGE **************************************************/
+ //Defines Message API, not implements it
+
+ abp.message = abp.message || {};
+
+ abp.message._showMessage = function (message, title) {
+ alert((title || '') + ' ' + message);
+ };
+
+ abp.message.info = function (message, title) {
+ abp.log.warn('abp.message.info is not implemented!');
+ return abp.message._showMessage(message, title);
+ };
+
+ abp.message.success = function (message, title) {
+ abp.log.warn('abp.message.success is not implemented!');
+ return abp.message._showMessage(message, title);
+ };
+
+ abp.message.warn = function (message, title) {
+ abp.log.warn('abp.message.warn is not implemented!');
+ return abp.message._showMessage(message, title);
+ };
+
+ abp.message.error = function (message, title) {
+ abp.log.warn('abp.message.error is not implemented!');
+ return abp.message._showMessage(message, title);
+ };
+
+ abp.message.confirm = function (message, titleOrCallback, callback) {
+ abp.log.warn('abp.message.confirm is not properly implemented!');
+
+ if (titleOrCallback && !(typeof titleOrCallback == 'string')) {
+ callback = titleOrCallback;
+ }
+
+ var result = confirm(message);
+ callback && callback(result);
+ };
+
+ /* UI *******************************************************/
+
+ abp.ui = abp.ui || {};
+
+ /* UI BLOCK */
+ //Defines UI Block API and implements basically
+
+ var $abpBlockArea = document.createElement('div');
+ $abpBlockArea.classList.add('abp-block-area');
+
+ /* opts: { //Can be an object with options or a string for query a selector
+ * elm: a query selector (optional - default: document.body)
+ * busy: boolean (optional - default: false)
+ * promise: A promise with always or finally handler (optional - auto unblocks the ui if provided)
+ * }
+ */
+ abp.ui.block = function (opts) {
+ if (!opts) {
+ opts = {};
+ } else if (typeof opts == 'string') {
+ opts = {
+ elm: opts
+ };
+ }
+
+ var $elm = document.querySelector(opts.elm) || document.body;
+
+ if (opts.busy) {
+ $abpBlockArea.classList.add('abp-block-area-busy');
+ } else {
+ $abpBlockArea.classList.remove('abp-block-area-busy');
+ }
+
+ if (document.querySelector(opts.elm)) {
+ $abpBlockArea.style.position = 'absolute';
+ } else {
+ $abpBlockArea.style.position = 'fixed';
+ }
+
+ $elm.appendChild($abpBlockArea);
+
+ if (opts.promise) {
+ if (opts.promise.always) { //jQuery.Deferred style
+ opts.promise.always(function () {
+ abp.ui.unblock({
+ $elm: opts.elm
+ });
+ });
+ } else if (opts.promise['finally']) { //Q style
+ opts.promise['finally'](function () {
+ abp.ui.unblock({
+ $elm: opts.elm
+ });
+ });
+ }
+ }
+ };
+
+ /* opts: {
+ *
+ * }
+ */
+ abp.ui.unblock = function (opts) {
+ var element = document.querySelector('.abp-block-area');
+ if (element) {
+ element.classList.add('abp-block-area-disappearing');
+ setTimeout(function () {
+ if (element) {
+ element.classList.remove('abp-block-area-disappearing');
+ element.parentElement.removeChild(element);
+ }
+ }, 250);
+ }
+ };
+
+ /* UI BUSY */
+ //Defines UI Busy API, not implements it
+
+ abp.ui.setBusy = function (opts) {
+ if (!opts) {
+ opts = {
+ busy: true
+ };
+ } else if (typeof opts == 'string') {
+ opts = {
+ elm: opts,
+ busy: true
+ };
+ }
+
+ abp.ui.block(opts);
+ };
+
+ abp.ui.clearBusy = function (opts) {
+ abp.ui.unblock(opts);
+ };
+
+ /* SIMPLE EVENT BUS *****************************************/
+
+ abp.event = (function () {
+
+ var _callbacks = {};
+
+ var on = function (eventName, callback) {
+ if (!_callbacks[eventName]) {
+ _callbacks[eventName] = [];
+ }
+
+ _callbacks[eventName].push(callback);
+ };
+
+ var off = function (eventName, callback) {
+ var callbacks = _callbacks[eventName];
+ if (!callbacks) {
+ return;
+ }
+
+ var index = -1;
+ for (var i = 0; i < callbacks.length; i++) {
+ if (callbacks[i] === callback) {
+ index = i;
+ break;
+ }
+ }
+
+ if (index < 0) {
+ return;
+ }
+
+ _callbacks[eventName].splice(index, 1);
+ };
+
+ var trigger = function (eventName) {
+ var callbacks = _callbacks[eventName];
+ if (!callbacks || !callbacks.length) {
+ return;
+ }
+
+ var args = Array.prototype.slice.call(arguments, 1);
+ for (var i = 0; i < callbacks.length; i++) {
+ callbacks[i].apply(this, args);
+ }
+ };
+
+ // Public interface ///////////////////////////////////////////////////
+
+ return {
+ on: on,
+ off: off,
+ trigger: trigger
+ };
+ })();
+
+
+ /* UTILS ***************************************************/
+
+ abp.utils = abp.utils || {};
+
+ /* Creates a name namespace.
+ * Example:
+ * var taskService = abp.utils.createNamespace(abp, 'services.task');
+ * taskService will be equal to abp.services.task
+ * first argument (root) must be defined first
+ ************************************************************/
+ abp.utils.createNamespace = function (root, ns) {
+ var parts = ns.split('.');
+ for (var i = 0; i < parts.length; i++) {
+ if (typeof root[parts[i]] == 'undefined') {
+ root[parts[i]] = {};
+ }
+
+ root = root[parts[i]];
+ }
+
+ return root;
+ };
+
+ /* Find and replaces a string (search) to another string (replacement) in
+ * given string (str).
+ * Example:
+ * abp.utils.replaceAll('This is a test string', 'is', 'X') = 'ThX X a test string'
+ ************************************************************/
+ abp.utils.replaceAll = function (str, search, replacement) {
+ var fix = search.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
+ return str.replace(new RegExp(fix, 'g'), replacement);
+ };
+
+ /* Formats a string just like string.format in C#.
+ * Example:
+ * abp.utils.formatString('Hello {0}','Tuana') = 'Hello Tuana'
+ ************************************************************/
+ abp.utils.formatString = function () {
+ if (arguments.length < 1) {
+ return null;
+ }
+
+ var str = arguments[0];
+
+ for (var i = 1; i < arguments.length; i++) {
+ var placeHolder = '{' + (i - 1) + '}';
+ str = abp.utils.replaceAll(str, placeHolder, arguments[i]);
+ }
+
+ return str;
+ };
+
+ abp.utils.toPascalCase = function (str) {
+ if (!str || !str.length) {
+ return str;
+ }
+
+ if (str.length === 1) {
+ return str.charAt(0).toUpperCase();
+ }
+
+ return str.charAt(0).toUpperCase() + str.substr(1);
+ }
+
+ abp.utils.toCamelCase = function (str) {
+ if (!str || !str.length) {
+ return str;
+ }
+
+ if (str.length === 1) {
+ return str.charAt(0).toLowerCase();
+ }
+
+ return str.charAt(0).toLowerCase() + str.substr(1);
+ }
+
+ abp.utils.truncateString = function (str, maxLength) {
+ if (!str || !str.length || str.length <= maxLength) {
+ return str;
+ }
+
+ return str.substr(0, maxLength);
+ };
+
+ abp.utils.truncateStringWithPostfix = function (str, maxLength, postfix) {
+ postfix = postfix || '...';
+
+ if (!str || !str.length || str.length <= maxLength) {
+ return str;
+ }
+
+ if (maxLength <= postfix.length) {
+ return postfix.substr(0, maxLength);
+ }
+
+ return str.substr(0, maxLength - postfix.length) + postfix;
+ };
+
+ abp.utils.isFunction = function (obj) {
+ return !!(obj && obj.constructor && obj.call && obj.apply);
+ };
+
+ /**
+ * parameterInfos should be an array of { name, value } objects
+ * where name is query string parameter name and value is it's value.
+ * includeQuestionMark is true by default.
+ */
+ abp.utils.buildQueryString = function (parameterInfos, includeQuestionMark) {
+ if (includeQuestionMark === undefined) {
+ includeQuestionMark = true;
+ }
+
+ var qs = '';
+
+ function addSeperator() {
+ if (!qs.length) {
+ if (includeQuestionMark) {
+ qs = qs + '?';
+ }
+ } else {
+ qs = qs + '&';
+ }
+ }
+
+ for (var i = 0; i < parameterInfos.length; ++i) {
+ var parameterInfo = parameterInfos[i];
+ if (parameterInfo.value === undefined) {
+ continue;
+ }
+
+ if (parameterInfo.value === null) {
+ parameterInfo.value = '';
+ }
+
+ addSeperator();
+
+ if (parameterInfo.value.toJSON && typeof parameterInfo.value.toJSON === "function") {
+ qs = qs + parameterInfo.name + '=' + encodeURIComponent(parameterInfo.value.toJSON());
+ } else if (Array.isArray(parameterInfo.value) && parameterInfo.value.length) {
+ for (var j = 0; j < parameterInfo.value.length; j++) {
+ if (j > 0) {
+ addSeperator();
+ }
+
+ qs = qs + parameterInfo.name + '[' + j + ']=' + encodeURIComponent(parameterInfo.value[j]);
+ }
+ } else {
+ qs = qs + parameterInfo.name + '=' + encodeURIComponent(parameterInfo.value);
+ }
+ }
+
+ return qs;
+ }
+
+ /**
+ * Sets a cookie value for given key.
+ * This is a simple implementation created to be used by ABP.
+ * Please use a complete cookie library if you need.
+ * @param {string} key
+ * @param {string} value
+ * @param {Date} expireDate (optional). If not specified the cookie will expire at the end of session.
+ * @param {string} path (optional)
+ */
+ abp.utils.setCookieValue = function (key, value, expireDate, path) {
+ var cookieValue = encodeURIComponent(key) + '=';
+
+ if (value) {
+ cookieValue = cookieValue + encodeURIComponent(value);
+ }
+
+ if (expireDate) {
+ cookieValue = cookieValue + "; expires=" + expireDate.toUTCString();
+ }
+
+ if (path) {
+ cookieValue = cookieValue + "; path=" + path;
+ }
+
+ document.cookie = cookieValue;
+ };
+
+ /**
+ * Gets a cookie with given key.
+ * This is a simple implementation created to be used by ABP.
+ * Please use a complete cookie library if you need.
+ * @param {string} key
+ * @returns {string} Cookie value or null
+ */
+ abp.utils.getCookieValue = function (key) {
+ var equalities = document.cookie.split('; ');
+ for (var i = 0; i < equalities.length; i++) {
+ if (!equalities[i]) {
+ continue;
+ }
+
+ var splitted = equalities[i].split('=');
+ if (splitted.length != 2) {
+ continue;
+ }
+
+ if (decodeURIComponent(splitted[0]) === key) {
+ return decodeURIComponent(splitted[1] || '');
+ }
+ }
+
+ return null;
+ };
+
+ /**
+ * Deletes cookie for given key.
+ * This is a simple implementation created to be used by ABP.
+ * Please use a complete cookie library if you need.
+ * @param {string} key
+ * @param {string} path (optional)
+ */
+ abp.utils.deleteCookie = function (key, path) {
+ var cookieValue = encodeURIComponent(key) + '=';
+
+ cookieValue = cookieValue + "; expires=" + (new Date(new Date().getTime() - 86400000)).toUTCString();
+
+ if (path) {
+ cookieValue = cookieValue + "; path=" + path;
+ }
+
+ document.cookie = cookieValue;
+ }
+
+ /* SECURITY ***************************************/
+ abp.security = abp.security || {};
+ abp.security.antiForgery = abp.security.antiForgery || {};
+
+ abp.security.antiForgery.tokenCookieName = 'XSRF-TOKEN';
+ abp.security.antiForgery.tokenHeaderName = 'X-XSRF-TOKEN';
+
+ abp.security.antiForgery.getToken = function () {
+ return abp.utils.getCookieValue(abp.security.antiForgery.tokenCookieName);
+ };
+
})();
\ No newline at end of file
diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Host/wwwroot/libs/abp/jquery/abp.jquery.js b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Host/wwwroot/libs/abp/jquery/abp.jquery.js
index 6e2ee001b8..e6aff047f7 100644
--- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Host/wwwroot/libs/abp/jquery/abp.jquery.js
+++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Host/wwwroot/libs/abp/jquery/abp.jquery.js
@@ -1,393 +1,393 @@
-var abp = abp || {};
-(function($) {
-
- if (!$) {
- throw "abp/jquery library requires the jquery library included to the page!";
- }
-
- // ABP CORE OVERRIDES /////////////////////////////////////////////////////
-
- abp.message._showMessage = function (message, title) {
- alert((title || '') + ' ' + message);
-
- return $.Deferred(function ($dfd) {
- $dfd.resolve();
- });
- };
-
- abp.message.confirm = function (message, titleOrCallback, callback) {
- if (titleOrCallback && !(typeof titleOrCallback == 'string')) {
- callback = titleOrCallback;
- }
-
- var result = confirm(message);
- callback && callback(result);
-
- return $.Deferred(function ($dfd) {
- $dfd.resolve(result);
- });
- };
-
- abp.utils.isFunction = function (obj) {
- return $.isFunction(obj);
- };
-
- // JQUERY EXTENSIONS //////////////////////////////////////////////////////
-
- $.fn.findWithSelf = function (selector) {
- return this.filter(selector).add(this.find(selector));
- };
-
- // DOM ////////////////////////////////////////////////////////////////////
-
- abp.dom = abp.dom || {};
-
- abp.dom.onNodeAdded = function (callback) {
- abp.event.on('abp.dom.nodeAdded', callback);
- };
-
- abp.dom.onNodeRemoved = function (callback) {
- abp.event.on('abp.dom.nodeRemoved', callback);
- };
-
- var mutationObserverCallback = function (mutationsList) {
- for (var i = 0; i < mutationsList.length; i++) {
- var mutation = mutationsList[i];
- if (mutation.type === 'childList') {
- if (mutation.addedNodes && mutation.removedNodes.length) {
- for (var k = 0; k < mutation.removedNodes.length; k++) {
- abp.event.trigger(
- 'abp.dom.nodeRemoved',
- {
- $el: $(mutation.removedNodes[k])
- }
- );
- }
- }
-
- if (mutation.addedNodes && mutation.addedNodes.length) {
- for (var j = 0; j < mutation.addedNodes.length; j++) {
- abp.event.trigger(
- 'abp.dom.nodeAdded',
- {
- $el: $(mutation.addedNodes[j])
- }
- );
- }
- }
- }
- }
- };
-
- new MutationObserver(mutationObserverCallback).observe(
- $('body')[0],
- {
- subtree: true,
- childList: true
- }
- );
-
- // AJAX ///////////////////////////////////////////////////////////////////
-
- abp.ajax = function (userOptions) {
- userOptions = userOptions || {};
-
- var options = $.extend(true, {}, abp.ajax.defaultOpts, userOptions);
-
- options.success = undefined;
- options.error = undefined;
-
- return $.Deferred(function ($dfd) {
- $.ajax(options)
- .done(function (data, textStatus, jqXHR) {
- $dfd.resolve(data);
- userOptions.success && userOptions.success(data);
- }).fail(function (jqXHR) {
- if (jqXHR.getResponseHeader('_AbpErrorFormat') === 'true') {
- abp.ajax.handleAbpErrorResponse(jqXHR, userOptions, $dfd);
- } else {
- abp.ajax.handleNonAbpErrorResponse(jqXHR, userOptions, $dfd);
- }
- });
- });
- };
-
- $.extend(abp.ajax, {
- defaultOpts: {
- dataType: 'json',
- type: 'POST',
- contentType: 'application/json',
- headers: {
- 'X-Requested-With': 'XMLHttpRequest'
- }
- },
-
- defaultError: {
- message: 'An error has occurred!',
- details: 'Error detail not sent by server.'
- },
-
- defaultError401: {
- message: 'You are not authenticated!',
- details: 'You should be authenticated (sign in) in order to perform this operation.'
- },
-
- defaultError403: {
- message: 'You are not authorized!',
- details: 'You are not allowed to perform this operation.'
- },
-
- defaultError404: {
- message: 'Resource not found!',
- details: 'The resource requested could not found on the server.'
- },
-
- logError: function (error) {
- abp.log.error(error);
- },
-
- showError: function (error) {
- if (error.details) {
- return abp.message.error(error.details, error.message);
- } else {
- return abp.message.error(error.message || abp.ajax.defaultError.message);
- }
- },
-
- handleTargetUrl: function (targetUrl) {
- if (!targetUrl) {
- location.href = abp.appPath;
- } else {
- location.href = targetUrl;
- }
- },
-
- handleErrorStatusCode: function (status) {
- switch (status) {
- case 401:
- abp.ajax.handleUnAuthorizedRequest(
- abp.ajax.showError(abp.ajax.defaultError401),
- abp.appPath
- );
- break;
- case 403:
- abp.ajax.showError(abp.ajax.defaultError403);
- break;
- case 404:
- abp.ajax.showError(abp.ajax.defaultError404);
- break;
- default:
- abp.ajax.showError(abp.ajax.defaultError);
- break;
- }
- },
-
- handleNonAbpErrorResponse: function (jqXHR, userOptions, $dfd) {
- if (userOptions.abpHandleError !== false) {
- abp.ajax.handleErrorStatusCode(jqXHR.status);
- }
-
- $dfd.reject.apply(this, arguments);
- userOptions.error && userOptions.error.apply(this, arguments);
- },
-
- handleAbpErrorResponse: function (jqXHR, userOptions, $dfd) {
- var messagePromise = null;
-
- if (userOptions.abpHandleError !== false) {
- messagePromise = abp.ajax.showError(jqXHR.responseJSON.error);
- }
-
- abp.ajax.logError(jqXHR.responseJSON.error);
-
- $dfd && $dfd.reject(jqXHR.responseJSON.error, jqXHR);
- userOptions.error && userOptions.error(jqXHR.responseJSON.error, jqXHR);
-
- if (jqXHR.status === 401 && userOptions.abpHandleError !== false) {
- abp.ajax.handleUnAuthorizedRequest(messagePromise);
- }
- },
-
- handleUnAuthorizedRequest: function (messagePromise, targetUrl) {
- if (messagePromise) {
- messagePromise.done(function () {
- abp.ajax.handleTargetUrl(targetUrl);
- });
- } else {
- abp.ajax.handleTargetUrl(targetUrl);
- }
- },
-
- blockUI: function (options) {
- if (options.blockUI) {
- if (options.blockUI === true) { //block whole page
- abp.ui.setBusy();
- } else { //block an element
- abp.ui.setBusy(options.blockUI);
- }
- }
- },
-
- unblockUI: function (options) {
- if (options.blockUI) {
- if (options.blockUI === true) { //unblock whole page
- abp.ui.clearBusy();
- } else { //unblock an element
- abp.ui.clearBusy(options.blockUI);
- }
- }
- },
-
- ajaxSendHandler: function (event, request, settings) {
- var token = abp.security.antiForgery.getToken();
- if (!token) {
- return;
- }
-
- if (!settings.headers || settings.headers[abp.security.antiForgery.tokenHeaderName] === undefined) {
- request.setRequestHeader(abp.security.antiForgery.tokenHeaderName, token);
- }
- }
- });
-
- $(document).ajaxSend(function (event, request, settings) {
- return abp.ajax.ajaxSendHandler(event, request, settings);
- });
-
- abp.event.on('abp.configurationInitialized', function () {
- var l = abp.localization.getResource('AbpUi');
-
- abp.ajax.defaultError.message = l('DefaultErrorMessage');
- abp.ajax.defaultError.details = l('DefaultErrorMessageDetail');
- abp.ajax.defaultError401.message = l('DefaultErrorMessage401');
- abp.ajax.defaultError401.details = l('DefaultErrorMessage401Detail');
- abp.ajax.defaultError403.message = l('DefaultErrorMessage403');
- abp.ajax.defaultError403.details = l('DefaultErrorMessage403Detail');
- abp.ajax.defaultError404.message = l('DefaultErrorMessage404');
- abp.ajax.defaultError404.details = l('DefaultErrorMessage404Detail');
- });
-
- // RESOURCE LOADER ////////////////////////////////////////////////////////
-
- /* UrlStates enum */
- var UrlStates = {
- LOADING: 'LOADING',
- LOADED: 'LOADED',
- FAILED: 'FAILED'
- };
-
- /* UrlInfo class */
- function UrlInfo(url) {
- this.url = url;
- this.state = UrlStates.LOADING;
- this.loadCallbacks = [];
- this.failCallbacks = [];
- }
-
- UrlInfo.prototype.succeed = function () {
- this.state = UrlStates.LOADED;
- for (var i = 0; i < this.loadCallbacks.length; i++) {
- this.loadCallbacks[i]();
- }
- };
-
- UrlInfo.prototype.failed = function () {
- this.state = UrlStates.FAILED;
- for (var i = 0; i < this.failCallbacks.length; i++) {
- this.failCallbacks[i]();
- }
- };
-
- UrlInfo.prototype.handleCallbacks = function (loadCallback, failCallback) {
- switch (this.state) {
- case UrlStates.LOADED:
- loadCallback && loadCallback();
- break;
- case UrlStates.FAILED:
- failCallback && failCallback();
- break;
- case UrlStates.LOADING:
- this.addCallbacks(loadCallback, failCallback);
- break;
- }
- };
-
- UrlInfo.prototype.addCallbacks = function (loadCallback, failCallback) {
- loadCallback && this.loadCallbacks.push(loadCallback);
- failCallback && this.failCallbacks.push(failCallback);
- };
-
- /* ResourceLoader API */
-
- abp.ResourceLoader = (function () {
-
- var _urlInfos = {};
-
- function getCacheKey(url) {
- return url;
- }
-
- function appendTimeToUrl(url) {
-
- if (url.indexOf('?') < 0) {
- url += '?';
- } else {
- url += '&';
- }
-
- url += '_=' + new Date().getTime();
-
- return url;
- }
-
- var _loadFromUrl = function (url, loadCallback, failCallback, serverLoader) {
-
- var cacheKey = getCacheKey(url);
-
- var urlInfo = _urlInfos[cacheKey];
-
- if (urlInfo) {
- urlInfo.handleCallbacks(loadCallback, failCallback);
- return;
- }
-
- _urlInfos[cacheKey] = urlInfo = new UrlInfo(url);
- urlInfo.addCallbacks(loadCallback, failCallback);
-
- serverLoader(urlInfo);
- };
-
- var _loadScript = function (url, loadCallback, failCallback) {
- _loadFromUrl(url, loadCallback, failCallback, function (urlInfo) {
- $.get({
- url: url,
- dataType: 'text'
- })
- .done(function (script) {
- $.globalEval(script);
- urlInfo.succeed();
- })
- .fail(function () {
- urlInfo.failed();
- });
- });
- };
-
- var _loadStyle = function (url) {
- _loadFromUrl(url, undefined, undefined, function (urlInfo) {
-
- $('', {
- rel: 'stylesheet',
- type: 'text/css',
- href: appendTimeToUrl(url)
- }).appendTo('head');
- });
- };
-
- return {
- loadScript: _loadScript,
- loadStyle: _loadStyle
- }
- })();
-
+var abp = abp || {};
+(function($) {
+
+ if (!$) {
+ throw "abp/jquery library requires the jquery library included to the page!";
+ }
+
+ // ABP CORE OVERRIDES /////////////////////////////////////////////////////
+
+ abp.message._showMessage = function (message, title) {
+ alert((title || '') + ' ' + message);
+
+ return $.Deferred(function ($dfd) {
+ $dfd.resolve();
+ });
+ };
+
+ abp.message.confirm = function (message, titleOrCallback, callback) {
+ if (titleOrCallback && !(typeof titleOrCallback == 'string')) {
+ callback = titleOrCallback;
+ }
+
+ var result = confirm(message);
+ callback && callback(result);
+
+ return $.Deferred(function ($dfd) {
+ $dfd.resolve(result);
+ });
+ };
+
+ abp.utils.isFunction = function (obj) {
+ return $.isFunction(obj);
+ };
+
+ // JQUERY EXTENSIONS //////////////////////////////////////////////////////
+
+ $.fn.findWithSelf = function (selector) {
+ return this.filter(selector).add(this.find(selector));
+ };
+
+ // DOM ////////////////////////////////////////////////////////////////////
+
+ abp.dom = abp.dom || {};
+
+ abp.dom.onNodeAdded = function (callback) {
+ abp.event.on('abp.dom.nodeAdded', callback);
+ };
+
+ abp.dom.onNodeRemoved = function (callback) {
+ abp.event.on('abp.dom.nodeRemoved', callback);
+ };
+
+ var mutationObserverCallback = function (mutationsList) {
+ for (var i = 0; i < mutationsList.length; i++) {
+ var mutation = mutationsList[i];
+ if (mutation.type === 'childList') {
+ if (mutation.addedNodes && mutation.removedNodes.length) {
+ for (var k = 0; k < mutation.removedNodes.length; k++) {
+ abp.event.trigger(
+ 'abp.dom.nodeRemoved',
+ {
+ $el: $(mutation.removedNodes[k])
+ }
+ );
+ }
+ }
+
+ if (mutation.addedNodes && mutation.addedNodes.length) {
+ for (var j = 0; j < mutation.addedNodes.length; j++) {
+ abp.event.trigger(
+ 'abp.dom.nodeAdded',
+ {
+ $el: $(mutation.addedNodes[j])
+ }
+ );
+ }
+ }
+ }
+ }
+ };
+
+ new MutationObserver(mutationObserverCallback).observe(
+ $('body')[0],
+ {
+ subtree: true,
+ childList: true
+ }
+ );
+
+ // AJAX ///////////////////////////////////////////////////////////////////
+
+ abp.ajax = function (userOptions) {
+ userOptions = userOptions || {};
+
+ var options = $.extend(true, {}, abp.ajax.defaultOpts, userOptions);
+
+ options.success = undefined;
+ options.error = undefined;
+
+ return $.Deferred(function ($dfd) {
+ $.ajax(options)
+ .done(function (data, textStatus, jqXHR) {
+ $dfd.resolve(data);
+ userOptions.success && userOptions.success(data);
+ }).fail(function (jqXHR) {
+ if (jqXHR.getResponseHeader('_AbpErrorFormat') === 'true') {
+ abp.ajax.handleAbpErrorResponse(jqXHR, userOptions, $dfd);
+ } else {
+ abp.ajax.handleNonAbpErrorResponse(jqXHR, userOptions, $dfd);
+ }
+ });
+ });
+ };
+
+ $.extend(abp.ajax, {
+ defaultOpts: {
+ dataType: 'json',
+ type: 'POST',
+ contentType: 'application/json',
+ headers: {
+ 'X-Requested-With': 'XMLHttpRequest'
+ }
+ },
+
+ defaultError: {
+ message: 'An error has occurred!',
+ details: 'Error detail not sent by server.'
+ },
+
+ defaultError401: {
+ message: 'You are not authenticated!',
+ details: 'You should be authenticated (sign in) in order to perform this operation.'
+ },
+
+ defaultError403: {
+ message: 'You are not authorized!',
+ details: 'You are not allowed to perform this operation.'
+ },
+
+ defaultError404: {
+ message: 'Resource not found!',
+ details: 'The resource requested could not found on the server.'
+ },
+
+ logError: function (error) {
+ abp.log.error(error);
+ },
+
+ showError: function (error) {
+ if (error.details) {
+ return abp.message.error(error.details, error.message);
+ } else {
+ return abp.message.error(error.message || abp.ajax.defaultError.message);
+ }
+ },
+
+ handleTargetUrl: function (targetUrl) {
+ if (!targetUrl) {
+ location.href = abp.appPath;
+ } else {
+ location.href = targetUrl;
+ }
+ },
+
+ handleErrorStatusCode: function (status) {
+ switch (status) {
+ case 401:
+ abp.ajax.handleUnAuthorizedRequest(
+ abp.ajax.showError(abp.ajax.defaultError401),
+ abp.appPath
+ );
+ break;
+ case 403:
+ abp.ajax.showError(abp.ajax.defaultError403);
+ break;
+ case 404:
+ abp.ajax.showError(abp.ajax.defaultError404);
+ break;
+ default:
+ abp.ajax.showError(abp.ajax.defaultError);
+ break;
+ }
+ },
+
+ handleNonAbpErrorResponse: function (jqXHR, userOptions, $dfd) {
+ if (userOptions.abpHandleError !== false) {
+ abp.ajax.handleErrorStatusCode(jqXHR.status);
+ }
+
+ $dfd.reject.apply(this, arguments);
+ userOptions.error && userOptions.error.apply(this, arguments);
+ },
+
+ handleAbpErrorResponse: function (jqXHR, userOptions, $dfd) {
+ var messagePromise = null;
+
+ if (userOptions.abpHandleError !== false) {
+ messagePromise = abp.ajax.showError(jqXHR.responseJSON.error);
+ }
+
+ abp.ajax.logError(jqXHR.responseJSON.error);
+
+ $dfd && $dfd.reject(jqXHR.responseJSON.error, jqXHR);
+ userOptions.error && userOptions.error(jqXHR.responseJSON.error, jqXHR);
+
+ if (jqXHR.status === 401 && userOptions.abpHandleError !== false) {
+ abp.ajax.handleUnAuthorizedRequest(messagePromise);
+ }
+ },
+
+ handleUnAuthorizedRequest: function (messagePromise, targetUrl) {
+ if (messagePromise) {
+ messagePromise.done(function () {
+ abp.ajax.handleTargetUrl(targetUrl);
+ });
+ } else {
+ abp.ajax.handleTargetUrl(targetUrl);
+ }
+ },
+
+ blockUI: function (options) {
+ if (options.blockUI) {
+ if (options.blockUI === true) { //block whole page
+ abp.ui.setBusy();
+ } else { //block an element
+ abp.ui.setBusy(options.blockUI);
+ }
+ }
+ },
+
+ unblockUI: function (options) {
+ if (options.blockUI) {
+ if (options.blockUI === true) { //unblock whole page
+ abp.ui.clearBusy();
+ } else { //unblock an element
+ abp.ui.clearBusy(options.blockUI);
+ }
+ }
+ },
+
+ ajaxSendHandler: function (event, request, settings) {
+ var token = abp.security.antiForgery.getToken();
+ if (!token) {
+ return;
+ }
+
+ if (!settings.headers || settings.headers[abp.security.antiForgery.tokenHeaderName] === undefined) {
+ request.setRequestHeader(abp.security.antiForgery.tokenHeaderName, token);
+ }
+ }
+ });
+
+ $(document).ajaxSend(function (event, request, settings) {
+ return abp.ajax.ajaxSendHandler(event, request, settings);
+ });
+
+ abp.event.on('abp.configurationInitialized', function () {
+ var l = abp.localization.getResource('AbpUi');
+
+ abp.ajax.defaultError.message = l('DefaultErrorMessage');
+ abp.ajax.defaultError.details = l('DefaultErrorMessageDetail');
+ abp.ajax.defaultError401.message = l('DefaultErrorMessage401');
+ abp.ajax.defaultError401.details = l('DefaultErrorMessage401Detail');
+ abp.ajax.defaultError403.message = l('DefaultErrorMessage403');
+ abp.ajax.defaultError403.details = l('DefaultErrorMessage403Detail');
+ abp.ajax.defaultError404.message = l('DefaultErrorMessage404');
+ abp.ajax.defaultError404.details = l('DefaultErrorMessage404Detail');
+ });
+
+ // RESOURCE LOADER ////////////////////////////////////////////////////////
+
+ /* UrlStates enum */
+ var UrlStates = {
+ LOADING: 'LOADING',
+ LOADED: 'LOADED',
+ FAILED: 'FAILED'
+ };
+
+ /* UrlInfo class */
+ function UrlInfo(url) {
+ this.url = url;
+ this.state = UrlStates.LOADING;
+ this.loadCallbacks = [];
+ this.failCallbacks = [];
+ }
+
+ UrlInfo.prototype.succeed = function () {
+ this.state = UrlStates.LOADED;
+ for (var i = 0; i < this.loadCallbacks.length; i++) {
+ this.loadCallbacks[i]();
+ }
+ };
+
+ UrlInfo.prototype.failed = function () {
+ this.state = UrlStates.FAILED;
+ for (var i = 0; i < this.failCallbacks.length; i++) {
+ this.failCallbacks[i]();
+ }
+ };
+
+ UrlInfo.prototype.handleCallbacks = function (loadCallback, failCallback) {
+ switch (this.state) {
+ case UrlStates.LOADED:
+ loadCallback && loadCallback();
+ break;
+ case UrlStates.FAILED:
+ failCallback && failCallback();
+ break;
+ case UrlStates.LOADING:
+ this.addCallbacks(loadCallback, failCallback);
+ break;
+ }
+ };
+
+ UrlInfo.prototype.addCallbacks = function (loadCallback, failCallback) {
+ loadCallback && this.loadCallbacks.push(loadCallback);
+ failCallback && this.failCallbacks.push(failCallback);
+ };
+
+ /* ResourceLoader API */
+
+ abp.ResourceLoader = (function () {
+
+ var _urlInfos = {};
+
+ function getCacheKey(url) {
+ return url;
+ }
+
+ function appendTimeToUrl(url) {
+
+ if (url.indexOf('?') < 0) {
+ url += '?';
+ } else {
+ url += '&';
+ }
+
+ url += '_=' + new Date().getTime();
+
+ return url;
+ }
+
+ var _loadFromUrl = function (url, loadCallback, failCallback, serverLoader) {
+
+ var cacheKey = getCacheKey(url);
+
+ var urlInfo = _urlInfos[cacheKey];
+
+ if (urlInfo) {
+ urlInfo.handleCallbacks(loadCallback, failCallback);
+ return;
+ }
+
+ _urlInfos[cacheKey] = urlInfo = new UrlInfo(url);
+ urlInfo.addCallbacks(loadCallback, failCallback);
+
+ serverLoader(urlInfo);
+ };
+
+ var _loadScript = function (url, loadCallback, failCallback) {
+ _loadFromUrl(url, loadCallback, failCallback, function (urlInfo) {
+ $.get({
+ url: url,
+ dataType: 'text'
+ })
+ .done(function (script) {
+ $.globalEval(script);
+ urlInfo.succeed();
+ })
+ .fail(function () {
+ urlInfo.failed();
+ });
+ });
+ };
+
+ var _loadStyle = function (url) {
+ _loadFromUrl(url, undefined, undefined, function (urlInfo) {
+
+ $('', {
+ rel: 'stylesheet',
+ type: 'text/css',
+ href: appendTimeToUrl(url)
+ }).appendTo('head');
+ });
+ };
+
+ return {
+ loadScript: _loadScript,
+ loadStyle: _loadStyle
+ }
+ })();
+
})(jQuery);
\ No newline at end of file
diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Host/yarn.lock b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Host/yarn.lock
index 7230736133..b3b0eb268b 100644
--- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Host/yarn.lock
+++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Host/yarn.lock
@@ -2,37 +2,37 @@
# yarn lockfile v1
-"@abp/aspnetcore.mvc.ui.theme.basic@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.basic/-/aspnetcore.mvc.ui.theme.basic-2.1.0.tgz#f815001bd856fb5cbdd0b736181f2401a1a7ec62"
- integrity sha512-ej6dhUo3H9w6bpBTpMhk3M6zbC3fVAVMm5yLSYlYJ0sQxjb9PqC02OgiJme0mkxCUMwPuHVSQLrMQbioXdZu3A==
+"@abp/aspnetcore.mvc.ui.theme.basic@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.basic/-/aspnetcore.mvc.ui.theme.basic-2.2.0.tgz#e7f4e57d2b17cc76388e9c56bc34d50c9658873b"
+ integrity sha512-S9GQ9YVg4DWrgjujwiXBER6KqdqW5nZ1Bmt+YEePn5gEoPvoVrh6ojthpHYRjBJtGFqBSzRAQ9eVZLebT22Ozg==
dependencies:
- "@abp/aspnetcore.mvc.ui.theme.shared" "^2.1.0"
+ "@abp/aspnetcore.mvc.ui.theme.shared" "^2.2.0"
-"@abp/aspnetcore.mvc.ui.theme.shared@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.shared/-/aspnetcore.mvc.ui.theme.shared-2.1.0.tgz#c2790241b5a44b9d6e4f65911a1b9d9e9104ed82"
- integrity sha512-dxC0P/b1T+QJmRrB8HoLM7/GkWblz/X5lLqgn583W7/OTYhvxIxszuRDy/XIEuS+fP6a9rcGvGu5jcKJEqe/xA==
- dependencies:
- "@abp/aspnetcore.mvc.ui" "^2.1.0"
- "@abp/bootstrap" "^2.1.0"
- "@abp/bootstrap-datepicker" "^2.1.0"
- "@abp/datatables.net-bs4" "^2.1.0"
- "@abp/font-awesome" "^2.1.0"
- "@abp/jquery-form" "^2.1.0"
- "@abp/jquery-validation-unobtrusive" "^2.1.0"
- "@abp/lodash" "^2.1.0"
- "@abp/luxon" "^2.1.0"
- "@abp/malihu-custom-scrollbar-plugin" "^2.1.0"
- "@abp/select2" "^2.1.0"
- "@abp/sweetalert" "^2.1.0"
- "@abp/timeago" "^2.1.0"
- "@abp/toastr" "^2.1.0"
-
-"@abp/aspnetcore.mvc.ui@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui/-/aspnetcore.mvc.ui-2.1.0.tgz#3c86f42e52af3151d2aee0ffdd1281014ea61054"
- integrity sha512-pKiKMBOPuLm7p44DW8DdbsVn5PY3NqGYkz6gf75uzxyWiVYyl2CM/bvX9w4Ie7Q969owENMLrBREN6ezWZ5ynA==
+"@abp/aspnetcore.mvc.ui.theme.shared@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.shared/-/aspnetcore.mvc.ui.theme.shared-2.2.0.tgz#e0df953853be2a184d323931573f9f98aebbaa62"
+ integrity sha512-urxziaCdvfEqN5cjiiM5f5dx2Yr+AoGqCJVCo0Okjl2dosdaj5DH4SBzMvKAaLXzo3Ep1h4b3Wvws4BThL/6rA==
+ dependencies:
+ "@abp/aspnetcore.mvc.ui" "^2.2.0"
+ "@abp/bootstrap" "^2.2.0"
+ "@abp/bootstrap-datepicker" "^2.2.0"
+ "@abp/datatables.net-bs4" "^2.2.0"
+ "@abp/font-awesome" "^2.2.0"
+ "@abp/jquery-form" "^2.2.0"
+ "@abp/jquery-validation-unobtrusive" "^2.2.0"
+ "@abp/lodash" "^2.2.0"
+ "@abp/luxon" "^2.2.0"
+ "@abp/malihu-custom-scrollbar-plugin" "^2.2.0"
+ "@abp/select2" "^2.2.0"
+ "@abp/sweetalert" "^2.2.0"
+ "@abp/timeago" "^2.2.0"
+ "@abp/toastr" "^2.2.0"
+
+"@abp/aspnetcore.mvc.ui@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui/-/aspnetcore.mvc.ui-2.2.0.tgz#b2cdd421eed09ec1d30ae85e14434b7efc094ade"
+ integrity sha512-IO/AjhJu+LUa9zOaT8JlEnV+Pcp9oQ3q9kTq8kmMakC35vTIyvBpB3nnykXIOytZSyjsBgFYB/uMxPgBOjWagg==
dependencies:
ansi-colors "^4.1.1"
extend-object "^1.0.0"
@@ -41,135 +41,135 @@
path "^0.12.7"
rimraf "^3.0.0"
-"@abp/bootstrap-datepicker@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/bootstrap-datepicker/-/bootstrap-datepicker-2.1.0.tgz#a0d71da15cb3d3cc02f9a390437a44db5e9f9ea1"
- integrity sha512-lkNI0iyefiXS2O5x9Ae9eJQLPXSQlOWDX7QhKnBHLR9JxjJEnhBUIIOylMltAIqtVDtjk2ikDyd3BAiyBdtB/w==
+"@abp/bootstrap-datepicker@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/bootstrap-datepicker/-/bootstrap-datepicker-2.2.0.tgz#a2f50b422824f18ed4b7e80be6852e2979119f8e"
+ integrity sha512-X9jT5mU42QFfVhOZdun7aEJUf3bMko6NsG3NFQVjqTqKH+iYGKfHPFpXD0gP/6Nb4KgZUdId8hSyQTZyOK2JEA==
dependencies:
bootstrap-datepicker "^1.9.0"
-"@abp/bootstrap@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/bootstrap/-/bootstrap-2.1.0.tgz#7ce15d4effac0e0991a3520c4666c6cb17a3fef2"
- integrity sha512-1xQjqu6shCgzd1FI94y5AIXGIhBlZEoRrOhaT84j/2KzYiDvhP+LAqQjMgqlQmBLs6vMckpxtf5thxKTMXvtOw==
+"@abp/bootstrap@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/bootstrap/-/bootstrap-2.2.0.tgz#16e41d3432117bbcd9012c6f735c49c543255879"
+ integrity sha512-aRmluu6SkIl+JgCzSSJZrDPkYr6WWaQdY0iJAOz6NHtffa7Aumh1IUOrLVKL0T1pQn6QKs0Z7JDGyYMdh1HPkQ==
dependencies:
- "@abp/core" "^2.1.0"
+ "@abp/core" "^2.2.0"
bootstrap "^4.3.1"
-"@abp/core@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/core/-/core-2.1.0.tgz#0cd2850f029df1d18517b8e74c70341972c37ed7"
- integrity sha512-1wnRo00hWncZWSakaEXm388XhhbKXDVkWDIdaT3kyQpvp3kX1lFx7I5iiZiwIeULwZRF9mi6HV6iHEze58x0kQ==
+"@abp/core@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/core/-/core-2.2.0.tgz#4eea0a06458c90acb8566a11eb841fe65d15d256"
+ integrity sha512-tBGHa5CUr0ewT31g689RAfQ6Su2p4uyn2PzmrW/8lahBrvqkoCb41fkCDLQJkTY5rKPrEKZd/s9OoyOnS20DLg==
-"@abp/datatables.net-bs4@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/datatables.net-bs4/-/datatables.net-bs4-2.1.0.tgz#a0f36cf4e3ef96ae03aa4b9956fcb8b971c854cb"
- integrity sha512-93qc2rrGs+JKRPM/7UCasa5VmfswgYU8cv3Ybg5OKoaASODYUn06GChRFnd/mvqcDxw4+8gaqpC3U2ETZZI4pA==
+"@abp/datatables.net-bs4@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/datatables.net-bs4/-/datatables.net-bs4-2.2.0.tgz#c7cc49e889b295ae10fb24ed62b154ef79ffc85a"
+ integrity sha512-zjJRPqOCWPfkHt1QztfFHKrsTE9o6Je2EpfA7hRMej2FlGbsMWUxOqx/btK1vjD6YIU8DtVDpIdj1WvPOITQ4Q==
dependencies:
- "@abp/datatables.net" "^2.1.0"
+ "@abp/datatables.net" "^2.2.0"
datatables.net-bs4 "^1.10.20"
-"@abp/datatables.net@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/datatables.net/-/datatables.net-2.1.0.tgz#674eaaa5b0948d7ee85b6605bfbad1a70f839aa7"
- integrity sha512-3ZM2p+JpHumxbIKlDP/LKLsfceMdttdTOL0ckIZCmAAgoIeKmAtuMoKcHTr8lj5mjgv4arBGvG9WVCemep2PEw==
+"@abp/datatables.net@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/datatables.net/-/datatables.net-2.2.0.tgz#22f9c7ca90c2d4af264483b4f8286b0feb7c3d52"
+ integrity sha512-L4MnpdloSWr/px3mvV75sxsxL68MyALB2LKdzCFMQWILCZVkxMmQb9LARINYIrn461Wrc+zbYWNEBD0MAq7flg==
dependencies:
- "@abp/core" "^2.1.0"
+ "@abp/core" "^2.2.0"
datatables.net "^1.10.20"
-"@abp/font-awesome@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/font-awesome/-/font-awesome-2.1.0.tgz#c2e628a1b9d0525e7d6950bf007feebcd1c490c8"
- integrity sha512-vlm1IQuQVfuCI2O1vphDd11zUEJ4/4PU0/0XI1YCpilse8fBg080CM3+G0kw6Erm/riznqhOJwBcfT+K+zqk8A==
+"@abp/font-awesome@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/font-awesome/-/font-awesome-2.2.0.tgz#2de39e3c6c3e8c30394d82861761a66c5b4032f0"
+ integrity sha512-RT06MYUGgaWBEpW5c7wUcfMXgxcOHWdX/C01LDO/j6iVoKBuBHOkkvcUoTWII068ECrLYOkj+RyT59dCKm8FFw==
dependencies:
- "@abp/core" "^2.1.0"
+ "@abp/core" "^2.2.0"
"@fortawesome/fontawesome-free" "^5.11.2"
-"@abp/jquery-form@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/jquery-form/-/jquery-form-2.1.0.tgz#285dbfdcf722cb0249f149e728cef7f788410c0c"
- integrity sha512-A17rjHTiBJBKYgrtDX5wIqnI89wNmo3bdK9NagL1wMFj4GvDyOZoRIDLqkopYQsc8zuPjqw4+1aa2TPiA+jtKg==
+"@abp/jquery-form@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/jquery-form/-/jquery-form-2.2.0.tgz#951653fac4013a7bbec065b5101b86d575e0eca7"
+ integrity sha512-ji44E3Ud0S3LNXn1WJ/Aw44qAIG7EITEW1KOe46oz+/awPpbiiA4dDDNleTvO2jI2/s8mNyR0bNanP6BUsc7tw==
dependencies:
- "@abp/jquery" "^2.1.0"
+ "@abp/jquery" "^2.2.0"
jquery-form "^4.2.2"
-"@abp/jquery-validation-unobtrusive@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-2.1.0.tgz#fc938775ced2efc686e7dd092d6ceff1ea947f36"
- integrity sha512-a8iBIj6amJ9rQNV+wxQUuEVh93M/c32kJcrwSEPWQcOoTj5gf0j8eKK9YvZaGokpylraz9mdGOwYQQuNj1sxEw==
+"@abp/jquery-validation-unobtrusive@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-2.2.0.tgz#6d39ba9f7bf026d1380796bf5dff76c8d16b42ce"
+ integrity sha512-SuS/dRRVz7ZR4HK/h9x0jRRVLPqXN0CPRGPdJZ1LJraXVEJ9/eDEGf1rMlHmEGt1FXXFTD01/zjisbweDE786w==
dependencies:
- "@abp/jquery-validation" "^2.1.0"
+ "@abp/jquery-validation" "^2.2.0"
jquery-validation-unobtrusive "^3.2.11"
-"@abp/jquery-validation@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/jquery-validation/-/jquery-validation-2.1.0.tgz#2bf1a31321cce3b2abe6d56c6112c52a8ecb28b6"
- integrity sha512-kU6/E+Xc3wHAUs+sGMAL8uozkXv65HnpksTwV4/+RK+D6iFU2EyNgCEFu7QGSwYZsV1/7YsCe2GD4ucBXIknbA==
+"@abp/jquery-validation@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/jquery-validation/-/jquery-validation-2.2.0.tgz#02bb8ba883e72c1204867ee4d1c1094bd91c4c4c"
+ integrity sha512-ypITQloO4iEDgqlA6qb3taj+7HMX0Cf/ACA2OvtrvOgJejx6J4wfrPjwuFZu1WWJ0xtc9yTdbovdcSVcQbIGaA==
dependencies:
- "@abp/jquery" "^2.1.0"
+ "@abp/jquery" "^2.2.0"
jquery-validation "^1.19.1"
-"@abp/jquery@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/jquery/-/jquery-2.1.0.tgz#fb5b4c9e8622cf46fee92f9f731d007d5fb200bb"
- integrity sha512-ZpfzRut5G611bBmuDdiT6BD0M7Rl1P6r8uNxUjdmFXYwFd8wD02ZhIcsX7qFHFkYERuXfcLrZh4rpw9G1DVCJg==
+"@abp/jquery@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/jquery/-/jquery-2.2.0.tgz#0e641b1109e78eff4c34331ca2b123b67cc30cbe"
+ integrity sha512-vEfRoFEAmDmRgSq98Y9EZExfQFSWtmjaHrodUu+MadTcRlnn+wHq8wwkKKxpj/eYtNc8aFORpyHMMH7uliAKxg==
dependencies:
- "@abp/core" "^2.1.0"
+ "@abp/core" "^2.2.0"
jquery "^3.4.1"
-"@abp/lodash@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/lodash/-/lodash-2.1.0.tgz#9fc9e6521e6284d607cedbff1a458fa324137c5c"
- integrity sha512-s1gTHhpbmEDDCsZeXb9MpClkDS4wH5R2IWPRZUlSPxo3gF0pvkx5ubdhYUEUgqy5QqWxE/+zUAjDc4x+cEriFQ==
+"@abp/lodash@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/lodash/-/lodash-2.2.0.tgz#af0a2ebcb28fd0a8c02da5026479d9370ed19719"
+ integrity sha512-wOMLqIpuq4a7ww7pB138G6YxBiTGBgxNW/IWGUiWbfgrr88cGPKIYYv/8O8mvr8PLNGjizNynuwQRj522yA3Dw==
dependencies:
- "@abp/core" "^2.1.0"
+ "@abp/core" "^2.2.0"
lodash "^4.17.15"
-"@abp/luxon@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/luxon/-/luxon-2.1.0.tgz#624796722119f075119006b436054aecbb38f15f"
- integrity sha512-2b0sRo6rdYT1wDu9nSXm/9o8rhQ9ED7FxrDMYabYuOQz48esgn4fBUNcPqpxwejpFmlhZY6CONvkddNtaMeVHw==
+"@abp/luxon@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/luxon/-/luxon-2.2.0.tgz#0d0e78edc249853fa31eceecc00df2846a879aa9"
+ integrity sha512-WbOW0PcMks+WXRPWt/+H4pOa5waM331WkY0F+EJx8fpxemNGQNUEXLkuMXzN3MrN6LrplM9AZ9i+NRA9PWHbNw==
dependencies:
luxon "^1.21.3"
-"@abp/malihu-custom-scrollbar-plugin@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-2.1.0.tgz#f4dc1a32cefc3de8af08cb6d585ec5f7636a0c5e"
- integrity sha512-WcxzCZ5YOMxGxZerEh966cVrFSCw1UTDqwU2rxA/LsHEbPKd69AY+SHvUiacNxPXs1ZCF6FFJ29C5dWicEIRaQ==
+"@abp/malihu-custom-scrollbar-plugin@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-2.2.0.tgz#e11fd46dccbb28d44fb199e880b91d27c94f1919"
+ integrity sha512-YDu/NLpIzMA96NDHxd27/+liTm3sow9M+oWH29+9JW8o/AEpXUH3T3AmoXXcTgsBlzLaewgHEFM8yxsAAFoj8Q==
dependencies:
- "@abp/core" "^2.1.0"
+ "@abp/core" "^2.2.0"
malihu-custom-scrollbar-plugin "^3.1.5"
-"@abp/select2@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/select2/-/select2-2.1.0.tgz#79e50d2c25e74a5f96520e8aa1433d79aea674d1"
- integrity sha512-ut/3c+lFdoepuDH36M7thWagmAmTFrChcPnhYjTx4MmIf31WW1BwqOSx3I2g8M+NEEx+V2jTNuBpTq7PONgSJg==
+"@abp/select2@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/select2/-/select2-2.2.0.tgz#4639d4e5b72b1736fa4476bd9b6a78e036400421"
+ integrity sha512-tc87JyM0kvVF388kyGUjDby49Zrrb089jVRRipoIaxXeu4M1YxEFSKBEcUK1MohZWjVtWrNs8MoxPlfukaMpyw==
dependencies:
- "@abp/core" "^2.1.0"
+ "@abp/core" "^2.2.0"
select2 "^4.0.12"
-"@abp/sweetalert@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/sweetalert/-/sweetalert-2.1.0.tgz#88f405c4ba9f9ed2fd54b945ed6bc48d5ae2fa23"
- integrity sha512-EWvReqxZ1DrNH9XD+cf/yGVj+8IPTpuoPuWKDryN4fF7TCMJA+KrXp5lFxpjfkKTtNzLeFGsJqDFWaUifxtqTA==
+"@abp/sweetalert@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/sweetalert/-/sweetalert-2.2.0.tgz#dfc60ba085522d8390e41b90bf5a3d474f4ae624"
+ integrity sha512-HS6TKOwP91UjzjZHaheurZ1AYUSMkQyCSmoX6g5LAK4eH8IIgpojVSp1AFCSPATrFsFWY/dzkDGcfu90FWsVBg==
dependencies:
- "@abp/core" "^2.1.0"
+ "@abp/core" "^2.2.0"
sweetalert "^2.1.2"
-"@abp/timeago@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/timeago/-/timeago-2.1.0.tgz#28c0aef88aff8b54d1dfb42a664d05097e7fda35"
- integrity sha512-NklUYcWeji7po+Y6Oi7b7IkYmjd5YRu123bm3MqjQ71AzuOCTFbvPMHzYOjrUTkzr6gW3IJ24LQ4YmpshPy4ZQ==
+"@abp/timeago@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/timeago/-/timeago-2.2.0.tgz#9a8297f36a46cdc4cc62f44d0fdc91b70def389c"
+ integrity sha512-8qjmKscsTvPznHKWEsddYxdSBiU+l+OgLG6vzMcSWqngYbDQGXqNA93BwJI2qiwd+FkNcfGgYg7CN7bcwzmaiw==
dependencies:
- "@abp/jquery" "^2.1.0"
+ "@abp/jquery" "^2.2.0"
timeago "^1.6.7"
-"@abp/toastr@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/toastr/-/toastr-2.1.0.tgz#22a53a2b1f354770fdc7b37f06bec10eefccfe7a"
- integrity sha512-hD3hTDx+CixTVTx73rnZDiiFkfSxpZox8RLm+CiFA62ORdO8Ryij8TOXXkJd84b2tJfkAkYehohVXKwHlHU7Zg==
+"@abp/toastr@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/toastr/-/toastr-2.2.0.tgz#1cad83a89da244685b3c82adff64260b7ccf4742"
+ integrity sha512-HHfSaw4M/9zS+KgzxGvbHYiQ5qcJgpf21cRZEo16aUwnTeKr4SRaewAWryNn4dKcIO2YNrhzDLH+OYbEaJJlDQ==
dependencies:
- "@abp/jquery" "^2.1.0"
+ "@abp/jquery" "^2.2.0"
toastr "^2.1.4"
"@fortawesome/fontawesome-free@^5.11.2":
diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/package.json b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/package.json
index b620e756f7..6e36dde3bf 100644
--- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/package.json
+++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/package.json
@@ -3,6 +3,6 @@
"name": "my-app",
"private": true,
"dependencies": {
- "@abp/aspnetcore.mvc.ui.theme.basic": "^2.1.0"
+ "@abp/aspnetcore.mvc.ui.theme.basic": "^2.2.0"
}
}
\ No newline at end of file
diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/wwwroot/libs/abp/core/abp.css b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/wwwroot/libs/abp/core/abp.css
index ee3c5080a5..ddf9cae5b2 100644
--- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/wwwroot/libs/abp/core/abp.css
+++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/wwwroot/libs/abp/core/abp.css
@@ -1,56 +1,56 @@
-@keyframes spin {
- 0% {
- transform: translateZ(0) rotate(0deg);
- }
-
- 100% {
- transform: translateZ(0) rotate(360deg);
- }
-}
-
-.abp-block-area {
- position: fixed;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- z-index: 102;
- background-color: #fff;
- opacity: .8;
- transition: opacity .25s;
-}
-
- .abp-block-area.abp-block-area-disappearing {
- opacity: 0;
- }
-
- .abp-block-area.abp-block-area-busy:after {
- content: attr(data-text);
- display: block;
- max-width: 125px;
- position: absolute;
- top: 50%;
- left: 50%;
- transform: translate(-50%, -50%);
- font-size: 20px;
- font-family: sans-serif;
- color: #343a40;
- text-align: center;
- text-transform: uppercase;
- }
-
- .abp-block-area.abp-block-area-busy:before {
- content: "";
- display: block;
- width: 150px;
- height: 150px;
- border-radius: 50%;
- border-width: 2px;
- border-style: solid;
- border-color: transparent #228ae6 #228ae6 #228ae6;
- position: absolute;
- top: calc(50% - 75px);
- left: calc(50% - 75px);
- will-change: transform;
- animation: spin .75s infinite ease-in-out;
- }
+@keyframes spin {
+ 0% {
+ transform: translateZ(0) rotate(0deg);
+ }
+
+ 100% {
+ transform: translateZ(0) rotate(360deg);
+ }
+}
+
+.abp-block-area {
+ position: fixed;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ z-index: 102;
+ background-color: #fff;
+ opacity: .8;
+ transition: opacity .25s;
+}
+
+ .abp-block-area.abp-block-area-disappearing {
+ opacity: 0;
+ }
+
+ .abp-block-area.abp-block-area-busy:after {
+ content: attr(data-text);
+ display: block;
+ max-width: 125px;
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ transform: translate(-50%, -50%);
+ font-size: 20px;
+ font-family: sans-serif;
+ color: #343a40;
+ text-align: center;
+ text-transform: uppercase;
+ }
+
+ .abp-block-area.abp-block-area-busy:before {
+ content: "";
+ display: block;
+ width: 150px;
+ height: 150px;
+ border-radius: 50%;
+ border-width: 2px;
+ border-style: solid;
+ border-color: transparent #228ae6 #228ae6 #228ae6;
+ position: absolute;
+ top: calc(50% - 75px);
+ left: calc(50% - 75px);
+ will-change: transform;
+ animation: spin .75s infinite ease-in-out;
+ }
diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/wwwroot/libs/abp/core/abp.js b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/wwwroot/libs/abp/core/abp.js
index cef1cf55e1..730db8bc97 100644
--- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/wwwroot/libs/abp/core/abp.js
+++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/wwwroot/libs/abp/core/abp.js
@@ -1,636 +1,636 @@
-var abp = abp || {};
-(function () {
-
- /* Application paths *****************************************/
-
- //Current application root path (including virtual directory if exists).
- abp.appPath = abp.appPath || '/';
-
- abp.pageLoadTime = new Date();
-
- //Converts given path to absolute path using abp.appPath variable.
- abp.toAbsAppPath = function (path) {
- if (path.indexOf('/') == 0) {
- path = path.substring(1);
- }
-
- return abp.appPath + path;
- };
-
- /* LOGGING ***************************************************/
- //Implements Logging API that provides secure & controlled usage of console.log
-
- abp.log = abp.log || {};
-
- abp.log.levels = {
- DEBUG: 1,
- INFO: 2,
- WARN: 3,
- ERROR: 4,
- FATAL: 5
- };
-
- abp.log.level = abp.log.levels.DEBUG;
-
- abp.log.log = function (logObject, logLevel) {
- if (!window.console || !window.console.log) {
- return;
- }
-
- if (logLevel != undefined && logLevel < abp.log.level) {
- return;
- }
-
- console.log(logObject);
- };
-
- abp.log.debug = function (logObject) {
- abp.log.log("DEBUG: ", abp.log.levels.DEBUG);
- abp.log.log(logObject, abp.log.levels.DEBUG);
- };
-
- abp.log.info = function (logObject) {
- abp.log.log("INFO: ", abp.log.levels.INFO);
- abp.log.log(logObject, abp.log.levels.INFO);
- };
-
- abp.log.warn = function (logObject) {
- abp.log.log("WARN: ", abp.log.levels.WARN);
- abp.log.log(logObject, abp.log.levels.WARN);
- };
-
- abp.log.error = function (logObject) {
- abp.log.log("ERROR: ", abp.log.levels.ERROR);
- abp.log.log(logObject, abp.log.levels.ERROR);
- };
-
- abp.log.fatal = function (logObject) {
- abp.log.log("FATAL: ", abp.log.levels.FATAL);
- abp.log.log(logObject, abp.log.levels.FATAL);
- };
-
- /* LOCALIZATION ***********************************************/
-
- abp.localization = abp.localization || {};
-
- abp.localization.values = {};
-
- abp.localization.localize = function (key, sourceName) {
- sourceName = sourceName || abp.localization.defaultResourceName;
-
- var source = abp.localization.values[sourceName];
-
- if (!source) {
- abp.log.warn('Could not find localization source: ' + sourceName);
- return key;
- }
-
- var value = source[key];
- if (value == undefined) {
- return key;
- }
-
- var copiedArguments = Array.prototype.slice.call(arguments, 0);
- copiedArguments.splice(1, 1);
- copiedArguments[0] = value;
-
- return abp.utils.formatString.apply(this, copiedArguments);
- };
-
- abp.localization.getResource = function (name) {
- return function () {
- var copiedArguments = Array.prototype.slice.call(arguments, 0);
- copiedArguments.splice(1, 0, name);
- return abp.localization.localize.apply(this, copiedArguments);
- };
- };
-
- abp.localization.defaultResourceName = undefined;
-
- /* AUTHORIZATION **********************************************/
-
- abp.auth = abp.auth || {};
-
- abp.auth.policies = abp.auth.policies || {};
-
- abp.auth.grantedPolicies = abp.auth.grantedPolicies || {};
-
- abp.auth.isGranted = function (policyName) {
- return abp.auth.policies[policyName] != undefined && abp.auth.grantedPolicies[policyName] != undefined;
- };
-
- abp.auth.isAnyGranted = function () {
- if (!arguments || arguments.length <= 0) {
- return true;
- }
-
- for (var i = 0; i < arguments.length; i++) {
- if (abp.auth.isGranted(arguments[i])) {
- return true;
- }
- }
-
- return false;
- };
-
- abp.auth.areAllGranted = function () {
- if (!arguments || arguments.length <= 0) {
- return true;
- }
-
- for (var i = 0; i < arguments.length; i++) {
- if (!abp.auth.isGranted(arguments[i])) {
- return false;
- }
- }
-
- return true;
- };
-
- abp.auth.tokenCookieName = 'Abp.AuthToken';
-
- abp.auth.setToken = function (authToken, expireDate) {
- abp.utils.setCookieValue(abp.auth.tokenCookieName, authToken, expireDate, abp.appPath, abp.domain);
- };
-
- abp.auth.getToken = function () {
- return abp.utils.getCookieValue(abp.auth.tokenCookieName);
- }
-
- abp.auth.clearToken = function () {
- abp.auth.setToken();
- }
-
- /* SETTINGS *************************************************/
-
- abp.setting = abp.setting || {};
-
- abp.setting.values = abp.setting.values || {};
-
- abp.setting.get = function (name) {
- return abp.setting.values[name];
- };
-
- abp.setting.getBoolean = function (name) {
- var value = abp.setting.get(name);
- return value == 'true' || value == 'True';
- };
-
- abp.setting.getInt = function (name) {
- return parseInt(abp.setting.values[name]);
- };
-
- /* NOTIFICATION *********************************************/
- //Defines Notification API, not implements it
-
- abp.notify = abp.notify || {};
-
- abp.notify.success = function (message, title, options) {
- abp.log.warn('abp.notify.success is not implemented!');
- };
-
- abp.notify.info = function (message, title, options) {
- abp.log.warn('abp.notify.info is not implemented!');
- };
-
- abp.notify.warn = function (message, title, options) {
- abp.log.warn('abp.notify.warn is not implemented!');
- };
-
- abp.notify.error = function (message, title, options) {
- abp.log.warn('abp.notify.error is not implemented!');
- };
-
- /* MESSAGE **************************************************/
- //Defines Message API, not implements it
-
- abp.message = abp.message || {};
-
- abp.message._showMessage = function (message, title) {
- alert((title || '') + ' ' + message);
- };
-
- abp.message.info = function (message, title) {
- abp.log.warn('abp.message.info is not implemented!');
- return abp.message._showMessage(message, title);
- };
-
- abp.message.success = function (message, title) {
- abp.log.warn('abp.message.success is not implemented!');
- return abp.message._showMessage(message, title);
- };
-
- abp.message.warn = function (message, title) {
- abp.log.warn('abp.message.warn is not implemented!');
- return abp.message._showMessage(message, title);
- };
-
- abp.message.error = function (message, title) {
- abp.log.warn('abp.message.error is not implemented!');
- return abp.message._showMessage(message, title);
- };
-
- abp.message.confirm = function (message, titleOrCallback, callback) {
- abp.log.warn('abp.message.confirm is not properly implemented!');
-
- if (titleOrCallback && !(typeof titleOrCallback == 'string')) {
- callback = titleOrCallback;
- }
-
- var result = confirm(message);
- callback && callback(result);
- };
-
- /* UI *******************************************************/
-
- abp.ui = abp.ui || {};
-
- /* UI BLOCK */
- //Defines UI Block API and implements basically
-
- var $abpBlockArea = document.createElement('div');
- $abpBlockArea.classList.add('abp-block-area');
-
- /* opts: { //Can be an object with options or a string for query a selector
- * elm: a query selector (optional - default: document.body)
- * busy: boolean (optional - default: false)
- * promise: A promise with always or finally handler (optional - auto unblocks the ui if provided)
- * }
- */
- abp.ui.block = function (opts) {
- if (!opts) {
- opts = {};
- } else if (typeof opts == 'string') {
- opts = {
- elm: opts
- };
- }
-
- var $elm = document.querySelector(opts.elm) || document.body;
-
- if (opts.busy) {
- $abpBlockArea.classList.add('abp-block-area-busy');
- } else {
- $abpBlockArea.classList.remove('abp-block-area-busy');
- }
-
- if (document.querySelector(opts.elm)) {
- $abpBlockArea.style.position = 'absolute';
- } else {
- $abpBlockArea.style.position = 'fixed';
- }
-
- $elm.appendChild($abpBlockArea);
-
- if (opts.promise) {
- if (opts.promise.always) { //jQuery.Deferred style
- opts.promise.always(function () {
- abp.ui.unblock({
- $elm: opts.elm
- });
- });
- } else if (opts.promise['finally']) { //Q style
- opts.promise['finally'](function () {
- abp.ui.unblock({
- $elm: opts.elm
- });
- });
- }
- }
- };
-
- /* opts: {
- *
- * }
- */
- abp.ui.unblock = function (opts) {
- var element = document.querySelector('.abp-block-area');
- if (element) {
- element.classList.add('abp-block-area-disappearing');
- setTimeout(function () {
- if (element) {
- element.classList.remove('abp-block-area-disappearing');
- element.parentElement.removeChild(element);
- }
- }, 250);
- }
- };
-
- /* UI BUSY */
- //Defines UI Busy API, not implements it
-
- abp.ui.setBusy = function (opts) {
- if (!opts) {
- opts = {
- busy: true
- };
- } else if (typeof opts == 'string') {
- opts = {
- elm: opts,
- busy: true
- };
- }
-
- abp.ui.block(opts);
- };
-
- abp.ui.clearBusy = function (opts) {
- abp.ui.unblock(opts);
- };
-
- /* SIMPLE EVENT BUS *****************************************/
-
- abp.event = (function () {
-
- var _callbacks = {};
-
- var on = function (eventName, callback) {
- if (!_callbacks[eventName]) {
- _callbacks[eventName] = [];
- }
-
- _callbacks[eventName].push(callback);
- };
-
- var off = function (eventName, callback) {
- var callbacks = _callbacks[eventName];
- if (!callbacks) {
- return;
- }
-
- var index = -1;
- for (var i = 0; i < callbacks.length; i++) {
- if (callbacks[i] === callback) {
- index = i;
- break;
- }
- }
-
- if (index < 0) {
- return;
- }
-
- _callbacks[eventName].splice(index, 1);
- };
-
- var trigger = function (eventName) {
- var callbacks = _callbacks[eventName];
- if (!callbacks || !callbacks.length) {
- return;
- }
-
- var args = Array.prototype.slice.call(arguments, 1);
- for (var i = 0; i < callbacks.length; i++) {
- callbacks[i].apply(this, args);
- }
- };
-
- // Public interface ///////////////////////////////////////////////////
-
- return {
- on: on,
- off: off,
- trigger: trigger
- };
- })();
-
-
- /* UTILS ***************************************************/
-
- abp.utils = abp.utils || {};
-
- /* Creates a name namespace.
- * Example:
- * var taskService = abp.utils.createNamespace(abp, 'services.task');
- * taskService will be equal to abp.services.task
- * first argument (root) must be defined first
- ************************************************************/
- abp.utils.createNamespace = function (root, ns) {
- var parts = ns.split('.');
- for (var i = 0; i < parts.length; i++) {
- if (typeof root[parts[i]] == 'undefined') {
- root[parts[i]] = {};
- }
-
- root = root[parts[i]];
- }
-
- return root;
- };
-
- /* Find and replaces a string (search) to another string (replacement) in
- * given string (str).
- * Example:
- * abp.utils.replaceAll('This is a test string', 'is', 'X') = 'ThX X a test string'
- ************************************************************/
- abp.utils.replaceAll = function (str, search, replacement) {
- var fix = search.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
- return str.replace(new RegExp(fix, 'g'), replacement);
- };
-
- /* Formats a string just like string.format in C#.
- * Example:
- * abp.utils.formatString('Hello {0}','Tuana') = 'Hello Tuana'
- ************************************************************/
- abp.utils.formatString = function () {
- if (arguments.length < 1) {
- return null;
- }
-
- var str = arguments[0];
-
- for (var i = 1; i < arguments.length; i++) {
- var placeHolder = '{' + (i - 1) + '}';
- str = abp.utils.replaceAll(str, placeHolder, arguments[i]);
- }
-
- return str;
- };
-
- abp.utils.toPascalCase = function (str) {
- if (!str || !str.length) {
- return str;
- }
-
- if (str.length === 1) {
- return str.charAt(0).toUpperCase();
- }
-
- return str.charAt(0).toUpperCase() + str.substr(1);
- }
-
- abp.utils.toCamelCase = function (str) {
- if (!str || !str.length) {
- return str;
- }
-
- if (str.length === 1) {
- return str.charAt(0).toLowerCase();
- }
-
- return str.charAt(0).toLowerCase() + str.substr(1);
- }
-
- abp.utils.truncateString = function (str, maxLength) {
- if (!str || !str.length || str.length <= maxLength) {
- return str;
- }
-
- return str.substr(0, maxLength);
- };
-
- abp.utils.truncateStringWithPostfix = function (str, maxLength, postfix) {
- postfix = postfix || '...';
-
- if (!str || !str.length || str.length <= maxLength) {
- return str;
- }
-
- if (maxLength <= postfix.length) {
- return postfix.substr(0, maxLength);
- }
-
- return str.substr(0, maxLength - postfix.length) + postfix;
- };
-
- abp.utils.isFunction = function (obj) {
- return !!(obj && obj.constructor && obj.call && obj.apply);
- };
-
- /**
- * parameterInfos should be an array of { name, value } objects
- * where name is query string parameter name and value is it's value.
- * includeQuestionMark is true by default.
- */
- abp.utils.buildQueryString = function (parameterInfos, includeQuestionMark) {
- if (includeQuestionMark === undefined) {
- includeQuestionMark = true;
- }
-
- var qs = '';
-
- function addSeperator() {
- if (!qs.length) {
- if (includeQuestionMark) {
- qs = qs + '?';
- }
- } else {
- qs = qs + '&';
- }
- }
-
- for (var i = 0; i < parameterInfos.length; ++i) {
- var parameterInfo = parameterInfos[i];
- if (parameterInfo.value === undefined) {
- continue;
- }
-
- if (parameterInfo.value === null) {
- parameterInfo.value = '';
- }
-
- addSeperator();
-
- if (parameterInfo.value.toJSON && typeof parameterInfo.value.toJSON === "function") {
- qs = qs + parameterInfo.name + '=' + encodeURIComponent(parameterInfo.value.toJSON());
- } else if (Array.isArray(parameterInfo.value) && parameterInfo.value.length) {
- for (var j = 0; j < parameterInfo.value.length; j++) {
- if (j > 0) {
- addSeperator();
- }
-
- qs = qs + parameterInfo.name + '[' + j + ']=' + encodeURIComponent(parameterInfo.value[j]);
- }
- } else {
- qs = qs + parameterInfo.name + '=' + encodeURIComponent(parameterInfo.value);
- }
- }
-
- return qs;
- }
-
- /**
- * Sets a cookie value for given key.
- * This is a simple implementation created to be used by ABP.
- * Please use a complete cookie library if you need.
- * @param {string} key
- * @param {string} value
- * @param {Date} expireDate (optional). If not specified the cookie will expire at the end of session.
- * @param {string} path (optional)
- */
- abp.utils.setCookieValue = function (key, value, expireDate, path) {
- var cookieValue = encodeURIComponent(key) + '=';
-
- if (value) {
- cookieValue = cookieValue + encodeURIComponent(value);
- }
-
- if (expireDate) {
- cookieValue = cookieValue + "; expires=" + expireDate.toUTCString();
- }
-
- if (path) {
- cookieValue = cookieValue + "; path=" + path;
- }
-
- document.cookie = cookieValue;
- };
-
- /**
- * Gets a cookie with given key.
- * This is a simple implementation created to be used by ABP.
- * Please use a complete cookie library if you need.
- * @param {string} key
- * @returns {string} Cookie value or null
- */
- abp.utils.getCookieValue = function (key) {
- var equalities = document.cookie.split('; ');
- for (var i = 0; i < equalities.length; i++) {
- if (!equalities[i]) {
- continue;
- }
-
- var splitted = equalities[i].split('=');
- if (splitted.length != 2) {
- continue;
- }
-
- if (decodeURIComponent(splitted[0]) === key) {
- return decodeURIComponent(splitted[1] || '');
- }
- }
-
- return null;
- };
-
- /**
- * Deletes cookie for given key.
- * This is a simple implementation created to be used by ABP.
- * Please use a complete cookie library if you need.
- * @param {string} key
- * @param {string} path (optional)
- */
- abp.utils.deleteCookie = function (key, path) {
- var cookieValue = encodeURIComponent(key) + '=';
-
- cookieValue = cookieValue + "; expires=" + (new Date(new Date().getTime() - 86400000)).toUTCString();
-
- if (path) {
- cookieValue = cookieValue + "; path=" + path;
- }
-
- document.cookie = cookieValue;
- }
-
- /* SECURITY ***************************************/
- abp.security = abp.security || {};
- abp.security.antiForgery = abp.security.antiForgery || {};
-
- abp.security.antiForgery.tokenCookieName = 'XSRF-TOKEN';
- abp.security.antiForgery.tokenHeaderName = 'X-XSRF-TOKEN';
-
- abp.security.antiForgery.getToken = function () {
- return abp.utils.getCookieValue(abp.security.antiForgery.tokenCookieName);
- };
-
+var abp = abp || {};
+(function () {
+
+ /* Application paths *****************************************/
+
+ //Current application root path (including virtual directory if exists).
+ abp.appPath = abp.appPath || '/';
+
+ abp.pageLoadTime = new Date();
+
+ //Converts given path to absolute path using abp.appPath variable.
+ abp.toAbsAppPath = function (path) {
+ if (path.indexOf('/') == 0) {
+ path = path.substring(1);
+ }
+
+ return abp.appPath + path;
+ };
+
+ /* LOGGING ***************************************************/
+ //Implements Logging API that provides secure & controlled usage of console.log
+
+ abp.log = abp.log || {};
+
+ abp.log.levels = {
+ DEBUG: 1,
+ INFO: 2,
+ WARN: 3,
+ ERROR: 4,
+ FATAL: 5
+ };
+
+ abp.log.level = abp.log.levels.DEBUG;
+
+ abp.log.log = function (logObject, logLevel) {
+ if (!window.console || !window.console.log) {
+ return;
+ }
+
+ if (logLevel != undefined && logLevel < abp.log.level) {
+ return;
+ }
+
+ console.log(logObject);
+ };
+
+ abp.log.debug = function (logObject) {
+ abp.log.log("DEBUG: ", abp.log.levels.DEBUG);
+ abp.log.log(logObject, abp.log.levels.DEBUG);
+ };
+
+ abp.log.info = function (logObject) {
+ abp.log.log("INFO: ", abp.log.levels.INFO);
+ abp.log.log(logObject, abp.log.levels.INFO);
+ };
+
+ abp.log.warn = function (logObject) {
+ abp.log.log("WARN: ", abp.log.levels.WARN);
+ abp.log.log(logObject, abp.log.levels.WARN);
+ };
+
+ abp.log.error = function (logObject) {
+ abp.log.log("ERROR: ", abp.log.levels.ERROR);
+ abp.log.log(logObject, abp.log.levels.ERROR);
+ };
+
+ abp.log.fatal = function (logObject) {
+ abp.log.log("FATAL: ", abp.log.levels.FATAL);
+ abp.log.log(logObject, abp.log.levels.FATAL);
+ };
+
+ /* LOCALIZATION ***********************************************/
+
+ abp.localization = abp.localization || {};
+
+ abp.localization.values = {};
+
+ abp.localization.localize = function (key, sourceName) {
+ sourceName = sourceName || abp.localization.defaultResourceName;
+
+ var source = abp.localization.values[sourceName];
+
+ if (!source) {
+ abp.log.warn('Could not find localization source: ' + sourceName);
+ return key;
+ }
+
+ var value = source[key];
+ if (value == undefined) {
+ return key;
+ }
+
+ var copiedArguments = Array.prototype.slice.call(arguments, 0);
+ copiedArguments.splice(1, 1);
+ copiedArguments[0] = value;
+
+ return abp.utils.formatString.apply(this, copiedArguments);
+ };
+
+ abp.localization.getResource = function (name) {
+ return function () {
+ var copiedArguments = Array.prototype.slice.call(arguments, 0);
+ copiedArguments.splice(1, 0, name);
+ return abp.localization.localize.apply(this, copiedArguments);
+ };
+ };
+
+ abp.localization.defaultResourceName = undefined;
+
+ /* AUTHORIZATION **********************************************/
+
+ abp.auth = abp.auth || {};
+
+ abp.auth.policies = abp.auth.policies || {};
+
+ abp.auth.grantedPolicies = abp.auth.grantedPolicies || {};
+
+ abp.auth.isGranted = function (policyName) {
+ return abp.auth.policies[policyName] != undefined && abp.auth.grantedPolicies[policyName] != undefined;
+ };
+
+ abp.auth.isAnyGranted = function () {
+ if (!arguments || arguments.length <= 0) {
+ return true;
+ }
+
+ for (var i = 0; i < arguments.length; i++) {
+ if (abp.auth.isGranted(arguments[i])) {
+ return true;
+ }
+ }
+
+ return false;
+ };
+
+ abp.auth.areAllGranted = function () {
+ if (!arguments || arguments.length <= 0) {
+ return true;
+ }
+
+ for (var i = 0; i < arguments.length; i++) {
+ if (!abp.auth.isGranted(arguments[i])) {
+ return false;
+ }
+ }
+
+ return true;
+ };
+
+ abp.auth.tokenCookieName = 'Abp.AuthToken';
+
+ abp.auth.setToken = function (authToken, expireDate) {
+ abp.utils.setCookieValue(abp.auth.tokenCookieName, authToken, expireDate, abp.appPath, abp.domain);
+ };
+
+ abp.auth.getToken = function () {
+ return abp.utils.getCookieValue(abp.auth.tokenCookieName);
+ }
+
+ abp.auth.clearToken = function () {
+ abp.auth.setToken();
+ }
+
+ /* SETTINGS *************************************************/
+
+ abp.setting = abp.setting || {};
+
+ abp.setting.values = abp.setting.values || {};
+
+ abp.setting.get = function (name) {
+ return abp.setting.values[name];
+ };
+
+ abp.setting.getBoolean = function (name) {
+ var value = abp.setting.get(name);
+ return value == 'true' || value == 'True';
+ };
+
+ abp.setting.getInt = function (name) {
+ return parseInt(abp.setting.values[name]);
+ };
+
+ /* NOTIFICATION *********************************************/
+ //Defines Notification API, not implements it
+
+ abp.notify = abp.notify || {};
+
+ abp.notify.success = function (message, title, options) {
+ abp.log.warn('abp.notify.success is not implemented!');
+ };
+
+ abp.notify.info = function (message, title, options) {
+ abp.log.warn('abp.notify.info is not implemented!');
+ };
+
+ abp.notify.warn = function (message, title, options) {
+ abp.log.warn('abp.notify.warn is not implemented!');
+ };
+
+ abp.notify.error = function (message, title, options) {
+ abp.log.warn('abp.notify.error is not implemented!');
+ };
+
+ /* MESSAGE **************************************************/
+ //Defines Message API, not implements it
+
+ abp.message = abp.message || {};
+
+ abp.message._showMessage = function (message, title) {
+ alert((title || '') + ' ' + message);
+ };
+
+ abp.message.info = function (message, title) {
+ abp.log.warn('abp.message.info is not implemented!');
+ return abp.message._showMessage(message, title);
+ };
+
+ abp.message.success = function (message, title) {
+ abp.log.warn('abp.message.success is not implemented!');
+ return abp.message._showMessage(message, title);
+ };
+
+ abp.message.warn = function (message, title) {
+ abp.log.warn('abp.message.warn is not implemented!');
+ return abp.message._showMessage(message, title);
+ };
+
+ abp.message.error = function (message, title) {
+ abp.log.warn('abp.message.error is not implemented!');
+ return abp.message._showMessage(message, title);
+ };
+
+ abp.message.confirm = function (message, titleOrCallback, callback) {
+ abp.log.warn('abp.message.confirm is not properly implemented!');
+
+ if (titleOrCallback && !(typeof titleOrCallback == 'string')) {
+ callback = titleOrCallback;
+ }
+
+ var result = confirm(message);
+ callback && callback(result);
+ };
+
+ /* UI *******************************************************/
+
+ abp.ui = abp.ui || {};
+
+ /* UI BLOCK */
+ //Defines UI Block API and implements basically
+
+ var $abpBlockArea = document.createElement('div');
+ $abpBlockArea.classList.add('abp-block-area');
+
+ /* opts: { //Can be an object with options or a string for query a selector
+ * elm: a query selector (optional - default: document.body)
+ * busy: boolean (optional - default: false)
+ * promise: A promise with always or finally handler (optional - auto unblocks the ui if provided)
+ * }
+ */
+ abp.ui.block = function (opts) {
+ if (!opts) {
+ opts = {};
+ } else if (typeof opts == 'string') {
+ opts = {
+ elm: opts
+ };
+ }
+
+ var $elm = document.querySelector(opts.elm) || document.body;
+
+ if (opts.busy) {
+ $abpBlockArea.classList.add('abp-block-area-busy');
+ } else {
+ $abpBlockArea.classList.remove('abp-block-area-busy');
+ }
+
+ if (document.querySelector(opts.elm)) {
+ $abpBlockArea.style.position = 'absolute';
+ } else {
+ $abpBlockArea.style.position = 'fixed';
+ }
+
+ $elm.appendChild($abpBlockArea);
+
+ if (opts.promise) {
+ if (opts.promise.always) { //jQuery.Deferred style
+ opts.promise.always(function () {
+ abp.ui.unblock({
+ $elm: opts.elm
+ });
+ });
+ } else if (opts.promise['finally']) { //Q style
+ opts.promise['finally'](function () {
+ abp.ui.unblock({
+ $elm: opts.elm
+ });
+ });
+ }
+ }
+ };
+
+ /* opts: {
+ *
+ * }
+ */
+ abp.ui.unblock = function (opts) {
+ var element = document.querySelector('.abp-block-area');
+ if (element) {
+ element.classList.add('abp-block-area-disappearing');
+ setTimeout(function () {
+ if (element) {
+ element.classList.remove('abp-block-area-disappearing');
+ element.parentElement.removeChild(element);
+ }
+ }, 250);
+ }
+ };
+
+ /* UI BUSY */
+ //Defines UI Busy API, not implements it
+
+ abp.ui.setBusy = function (opts) {
+ if (!opts) {
+ opts = {
+ busy: true
+ };
+ } else if (typeof opts == 'string') {
+ opts = {
+ elm: opts,
+ busy: true
+ };
+ }
+
+ abp.ui.block(opts);
+ };
+
+ abp.ui.clearBusy = function (opts) {
+ abp.ui.unblock(opts);
+ };
+
+ /* SIMPLE EVENT BUS *****************************************/
+
+ abp.event = (function () {
+
+ var _callbacks = {};
+
+ var on = function (eventName, callback) {
+ if (!_callbacks[eventName]) {
+ _callbacks[eventName] = [];
+ }
+
+ _callbacks[eventName].push(callback);
+ };
+
+ var off = function (eventName, callback) {
+ var callbacks = _callbacks[eventName];
+ if (!callbacks) {
+ return;
+ }
+
+ var index = -1;
+ for (var i = 0; i < callbacks.length; i++) {
+ if (callbacks[i] === callback) {
+ index = i;
+ break;
+ }
+ }
+
+ if (index < 0) {
+ return;
+ }
+
+ _callbacks[eventName].splice(index, 1);
+ };
+
+ var trigger = function (eventName) {
+ var callbacks = _callbacks[eventName];
+ if (!callbacks || !callbacks.length) {
+ return;
+ }
+
+ var args = Array.prototype.slice.call(arguments, 1);
+ for (var i = 0; i < callbacks.length; i++) {
+ callbacks[i].apply(this, args);
+ }
+ };
+
+ // Public interface ///////////////////////////////////////////////////
+
+ return {
+ on: on,
+ off: off,
+ trigger: trigger
+ };
+ })();
+
+
+ /* UTILS ***************************************************/
+
+ abp.utils = abp.utils || {};
+
+ /* Creates a name namespace.
+ * Example:
+ * var taskService = abp.utils.createNamespace(abp, 'services.task');
+ * taskService will be equal to abp.services.task
+ * first argument (root) must be defined first
+ ************************************************************/
+ abp.utils.createNamespace = function (root, ns) {
+ var parts = ns.split('.');
+ for (var i = 0; i < parts.length; i++) {
+ if (typeof root[parts[i]] == 'undefined') {
+ root[parts[i]] = {};
+ }
+
+ root = root[parts[i]];
+ }
+
+ return root;
+ };
+
+ /* Find and replaces a string (search) to another string (replacement) in
+ * given string (str).
+ * Example:
+ * abp.utils.replaceAll('This is a test string', 'is', 'X') = 'ThX X a test string'
+ ************************************************************/
+ abp.utils.replaceAll = function (str, search, replacement) {
+ var fix = search.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
+ return str.replace(new RegExp(fix, 'g'), replacement);
+ };
+
+ /* Formats a string just like string.format in C#.
+ * Example:
+ * abp.utils.formatString('Hello {0}','Tuana') = 'Hello Tuana'
+ ************************************************************/
+ abp.utils.formatString = function () {
+ if (arguments.length < 1) {
+ return null;
+ }
+
+ var str = arguments[0];
+
+ for (var i = 1; i < arguments.length; i++) {
+ var placeHolder = '{' + (i - 1) + '}';
+ str = abp.utils.replaceAll(str, placeHolder, arguments[i]);
+ }
+
+ return str;
+ };
+
+ abp.utils.toPascalCase = function (str) {
+ if (!str || !str.length) {
+ return str;
+ }
+
+ if (str.length === 1) {
+ return str.charAt(0).toUpperCase();
+ }
+
+ return str.charAt(0).toUpperCase() + str.substr(1);
+ }
+
+ abp.utils.toCamelCase = function (str) {
+ if (!str || !str.length) {
+ return str;
+ }
+
+ if (str.length === 1) {
+ return str.charAt(0).toLowerCase();
+ }
+
+ return str.charAt(0).toLowerCase() + str.substr(1);
+ }
+
+ abp.utils.truncateString = function (str, maxLength) {
+ if (!str || !str.length || str.length <= maxLength) {
+ return str;
+ }
+
+ return str.substr(0, maxLength);
+ };
+
+ abp.utils.truncateStringWithPostfix = function (str, maxLength, postfix) {
+ postfix = postfix || '...';
+
+ if (!str || !str.length || str.length <= maxLength) {
+ return str;
+ }
+
+ if (maxLength <= postfix.length) {
+ return postfix.substr(0, maxLength);
+ }
+
+ return str.substr(0, maxLength - postfix.length) + postfix;
+ };
+
+ abp.utils.isFunction = function (obj) {
+ return !!(obj && obj.constructor && obj.call && obj.apply);
+ };
+
+ /**
+ * parameterInfos should be an array of { name, value } objects
+ * where name is query string parameter name and value is it's value.
+ * includeQuestionMark is true by default.
+ */
+ abp.utils.buildQueryString = function (parameterInfos, includeQuestionMark) {
+ if (includeQuestionMark === undefined) {
+ includeQuestionMark = true;
+ }
+
+ var qs = '';
+
+ function addSeperator() {
+ if (!qs.length) {
+ if (includeQuestionMark) {
+ qs = qs + '?';
+ }
+ } else {
+ qs = qs + '&';
+ }
+ }
+
+ for (var i = 0; i < parameterInfos.length; ++i) {
+ var parameterInfo = parameterInfos[i];
+ if (parameterInfo.value === undefined) {
+ continue;
+ }
+
+ if (parameterInfo.value === null) {
+ parameterInfo.value = '';
+ }
+
+ addSeperator();
+
+ if (parameterInfo.value.toJSON && typeof parameterInfo.value.toJSON === "function") {
+ qs = qs + parameterInfo.name + '=' + encodeURIComponent(parameterInfo.value.toJSON());
+ } else if (Array.isArray(parameterInfo.value) && parameterInfo.value.length) {
+ for (var j = 0; j < parameterInfo.value.length; j++) {
+ if (j > 0) {
+ addSeperator();
+ }
+
+ qs = qs + parameterInfo.name + '[' + j + ']=' + encodeURIComponent(parameterInfo.value[j]);
+ }
+ } else {
+ qs = qs + parameterInfo.name + '=' + encodeURIComponent(parameterInfo.value);
+ }
+ }
+
+ return qs;
+ }
+
+ /**
+ * Sets a cookie value for given key.
+ * This is a simple implementation created to be used by ABP.
+ * Please use a complete cookie library if you need.
+ * @param {string} key
+ * @param {string} value
+ * @param {Date} expireDate (optional). If not specified the cookie will expire at the end of session.
+ * @param {string} path (optional)
+ */
+ abp.utils.setCookieValue = function (key, value, expireDate, path) {
+ var cookieValue = encodeURIComponent(key) + '=';
+
+ if (value) {
+ cookieValue = cookieValue + encodeURIComponent(value);
+ }
+
+ if (expireDate) {
+ cookieValue = cookieValue + "; expires=" + expireDate.toUTCString();
+ }
+
+ if (path) {
+ cookieValue = cookieValue + "; path=" + path;
+ }
+
+ document.cookie = cookieValue;
+ };
+
+ /**
+ * Gets a cookie with given key.
+ * This is a simple implementation created to be used by ABP.
+ * Please use a complete cookie library if you need.
+ * @param {string} key
+ * @returns {string} Cookie value or null
+ */
+ abp.utils.getCookieValue = function (key) {
+ var equalities = document.cookie.split('; ');
+ for (var i = 0; i < equalities.length; i++) {
+ if (!equalities[i]) {
+ continue;
+ }
+
+ var splitted = equalities[i].split('=');
+ if (splitted.length != 2) {
+ continue;
+ }
+
+ if (decodeURIComponent(splitted[0]) === key) {
+ return decodeURIComponent(splitted[1] || '');
+ }
+ }
+
+ return null;
+ };
+
+ /**
+ * Deletes cookie for given key.
+ * This is a simple implementation created to be used by ABP.
+ * Please use a complete cookie library if you need.
+ * @param {string} key
+ * @param {string} path (optional)
+ */
+ abp.utils.deleteCookie = function (key, path) {
+ var cookieValue = encodeURIComponent(key) + '=';
+
+ cookieValue = cookieValue + "; expires=" + (new Date(new Date().getTime() - 86400000)).toUTCString();
+
+ if (path) {
+ cookieValue = cookieValue + "; path=" + path;
+ }
+
+ document.cookie = cookieValue;
+ }
+
+ /* SECURITY ***************************************/
+ abp.security = abp.security || {};
+ abp.security.antiForgery = abp.security.antiForgery || {};
+
+ abp.security.antiForgery.tokenCookieName = 'XSRF-TOKEN';
+ abp.security.antiForgery.tokenHeaderName = 'X-XSRF-TOKEN';
+
+ abp.security.antiForgery.getToken = function () {
+ return abp.utils.getCookieValue(abp.security.antiForgery.tokenCookieName);
+ };
+
})();
\ No newline at end of file
diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/wwwroot/libs/abp/jquery/abp.jquery.js b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/wwwroot/libs/abp/jquery/abp.jquery.js
index 6e2ee001b8..e6aff047f7 100644
--- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/wwwroot/libs/abp/jquery/abp.jquery.js
+++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/wwwroot/libs/abp/jquery/abp.jquery.js
@@ -1,393 +1,393 @@
-var abp = abp || {};
-(function($) {
-
- if (!$) {
- throw "abp/jquery library requires the jquery library included to the page!";
- }
-
- // ABP CORE OVERRIDES /////////////////////////////////////////////////////
-
- abp.message._showMessage = function (message, title) {
- alert((title || '') + ' ' + message);
-
- return $.Deferred(function ($dfd) {
- $dfd.resolve();
- });
- };
-
- abp.message.confirm = function (message, titleOrCallback, callback) {
- if (titleOrCallback && !(typeof titleOrCallback == 'string')) {
- callback = titleOrCallback;
- }
-
- var result = confirm(message);
- callback && callback(result);
-
- return $.Deferred(function ($dfd) {
- $dfd.resolve(result);
- });
- };
-
- abp.utils.isFunction = function (obj) {
- return $.isFunction(obj);
- };
-
- // JQUERY EXTENSIONS //////////////////////////////////////////////////////
-
- $.fn.findWithSelf = function (selector) {
- return this.filter(selector).add(this.find(selector));
- };
-
- // DOM ////////////////////////////////////////////////////////////////////
-
- abp.dom = abp.dom || {};
-
- abp.dom.onNodeAdded = function (callback) {
- abp.event.on('abp.dom.nodeAdded', callback);
- };
-
- abp.dom.onNodeRemoved = function (callback) {
- abp.event.on('abp.dom.nodeRemoved', callback);
- };
-
- var mutationObserverCallback = function (mutationsList) {
- for (var i = 0; i < mutationsList.length; i++) {
- var mutation = mutationsList[i];
- if (mutation.type === 'childList') {
- if (mutation.addedNodes && mutation.removedNodes.length) {
- for (var k = 0; k < mutation.removedNodes.length; k++) {
- abp.event.trigger(
- 'abp.dom.nodeRemoved',
- {
- $el: $(mutation.removedNodes[k])
- }
- );
- }
- }
-
- if (mutation.addedNodes && mutation.addedNodes.length) {
- for (var j = 0; j < mutation.addedNodes.length; j++) {
- abp.event.trigger(
- 'abp.dom.nodeAdded',
- {
- $el: $(mutation.addedNodes[j])
- }
- );
- }
- }
- }
- }
- };
-
- new MutationObserver(mutationObserverCallback).observe(
- $('body')[0],
- {
- subtree: true,
- childList: true
- }
- );
-
- // AJAX ///////////////////////////////////////////////////////////////////
-
- abp.ajax = function (userOptions) {
- userOptions = userOptions || {};
-
- var options = $.extend(true, {}, abp.ajax.defaultOpts, userOptions);
-
- options.success = undefined;
- options.error = undefined;
-
- return $.Deferred(function ($dfd) {
- $.ajax(options)
- .done(function (data, textStatus, jqXHR) {
- $dfd.resolve(data);
- userOptions.success && userOptions.success(data);
- }).fail(function (jqXHR) {
- if (jqXHR.getResponseHeader('_AbpErrorFormat') === 'true') {
- abp.ajax.handleAbpErrorResponse(jqXHR, userOptions, $dfd);
- } else {
- abp.ajax.handleNonAbpErrorResponse(jqXHR, userOptions, $dfd);
- }
- });
- });
- };
-
- $.extend(abp.ajax, {
- defaultOpts: {
- dataType: 'json',
- type: 'POST',
- contentType: 'application/json',
- headers: {
- 'X-Requested-With': 'XMLHttpRequest'
- }
- },
-
- defaultError: {
- message: 'An error has occurred!',
- details: 'Error detail not sent by server.'
- },
-
- defaultError401: {
- message: 'You are not authenticated!',
- details: 'You should be authenticated (sign in) in order to perform this operation.'
- },
-
- defaultError403: {
- message: 'You are not authorized!',
- details: 'You are not allowed to perform this operation.'
- },
-
- defaultError404: {
- message: 'Resource not found!',
- details: 'The resource requested could not found on the server.'
- },
-
- logError: function (error) {
- abp.log.error(error);
- },
-
- showError: function (error) {
- if (error.details) {
- return abp.message.error(error.details, error.message);
- } else {
- return abp.message.error(error.message || abp.ajax.defaultError.message);
- }
- },
-
- handleTargetUrl: function (targetUrl) {
- if (!targetUrl) {
- location.href = abp.appPath;
- } else {
- location.href = targetUrl;
- }
- },
-
- handleErrorStatusCode: function (status) {
- switch (status) {
- case 401:
- abp.ajax.handleUnAuthorizedRequest(
- abp.ajax.showError(abp.ajax.defaultError401),
- abp.appPath
- );
- break;
- case 403:
- abp.ajax.showError(abp.ajax.defaultError403);
- break;
- case 404:
- abp.ajax.showError(abp.ajax.defaultError404);
- break;
- default:
- abp.ajax.showError(abp.ajax.defaultError);
- break;
- }
- },
-
- handleNonAbpErrorResponse: function (jqXHR, userOptions, $dfd) {
- if (userOptions.abpHandleError !== false) {
- abp.ajax.handleErrorStatusCode(jqXHR.status);
- }
-
- $dfd.reject.apply(this, arguments);
- userOptions.error && userOptions.error.apply(this, arguments);
- },
-
- handleAbpErrorResponse: function (jqXHR, userOptions, $dfd) {
- var messagePromise = null;
-
- if (userOptions.abpHandleError !== false) {
- messagePromise = abp.ajax.showError(jqXHR.responseJSON.error);
- }
-
- abp.ajax.logError(jqXHR.responseJSON.error);
-
- $dfd && $dfd.reject(jqXHR.responseJSON.error, jqXHR);
- userOptions.error && userOptions.error(jqXHR.responseJSON.error, jqXHR);
-
- if (jqXHR.status === 401 && userOptions.abpHandleError !== false) {
- abp.ajax.handleUnAuthorizedRequest(messagePromise);
- }
- },
-
- handleUnAuthorizedRequest: function (messagePromise, targetUrl) {
- if (messagePromise) {
- messagePromise.done(function () {
- abp.ajax.handleTargetUrl(targetUrl);
- });
- } else {
- abp.ajax.handleTargetUrl(targetUrl);
- }
- },
-
- blockUI: function (options) {
- if (options.blockUI) {
- if (options.blockUI === true) { //block whole page
- abp.ui.setBusy();
- } else { //block an element
- abp.ui.setBusy(options.blockUI);
- }
- }
- },
-
- unblockUI: function (options) {
- if (options.blockUI) {
- if (options.blockUI === true) { //unblock whole page
- abp.ui.clearBusy();
- } else { //unblock an element
- abp.ui.clearBusy(options.blockUI);
- }
- }
- },
-
- ajaxSendHandler: function (event, request, settings) {
- var token = abp.security.antiForgery.getToken();
- if (!token) {
- return;
- }
-
- if (!settings.headers || settings.headers[abp.security.antiForgery.tokenHeaderName] === undefined) {
- request.setRequestHeader(abp.security.antiForgery.tokenHeaderName, token);
- }
- }
- });
-
- $(document).ajaxSend(function (event, request, settings) {
- return abp.ajax.ajaxSendHandler(event, request, settings);
- });
-
- abp.event.on('abp.configurationInitialized', function () {
- var l = abp.localization.getResource('AbpUi');
-
- abp.ajax.defaultError.message = l('DefaultErrorMessage');
- abp.ajax.defaultError.details = l('DefaultErrorMessageDetail');
- abp.ajax.defaultError401.message = l('DefaultErrorMessage401');
- abp.ajax.defaultError401.details = l('DefaultErrorMessage401Detail');
- abp.ajax.defaultError403.message = l('DefaultErrorMessage403');
- abp.ajax.defaultError403.details = l('DefaultErrorMessage403Detail');
- abp.ajax.defaultError404.message = l('DefaultErrorMessage404');
- abp.ajax.defaultError404.details = l('DefaultErrorMessage404Detail');
- });
-
- // RESOURCE LOADER ////////////////////////////////////////////////////////
-
- /* UrlStates enum */
- var UrlStates = {
- LOADING: 'LOADING',
- LOADED: 'LOADED',
- FAILED: 'FAILED'
- };
-
- /* UrlInfo class */
- function UrlInfo(url) {
- this.url = url;
- this.state = UrlStates.LOADING;
- this.loadCallbacks = [];
- this.failCallbacks = [];
- }
-
- UrlInfo.prototype.succeed = function () {
- this.state = UrlStates.LOADED;
- for (var i = 0; i < this.loadCallbacks.length; i++) {
- this.loadCallbacks[i]();
- }
- };
-
- UrlInfo.prototype.failed = function () {
- this.state = UrlStates.FAILED;
- for (var i = 0; i < this.failCallbacks.length; i++) {
- this.failCallbacks[i]();
- }
- };
-
- UrlInfo.prototype.handleCallbacks = function (loadCallback, failCallback) {
- switch (this.state) {
- case UrlStates.LOADED:
- loadCallback && loadCallback();
- break;
- case UrlStates.FAILED:
- failCallback && failCallback();
- break;
- case UrlStates.LOADING:
- this.addCallbacks(loadCallback, failCallback);
- break;
- }
- };
-
- UrlInfo.prototype.addCallbacks = function (loadCallback, failCallback) {
- loadCallback && this.loadCallbacks.push(loadCallback);
- failCallback && this.failCallbacks.push(failCallback);
- };
-
- /* ResourceLoader API */
-
- abp.ResourceLoader = (function () {
-
- var _urlInfos = {};
-
- function getCacheKey(url) {
- return url;
- }
-
- function appendTimeToUrl(url) {
-
- if (url.indexOf('?') < 0) {
- url += '?';
- } else {
- url += '&';
- }
-
- url += '_=' + new Date().getTime();
-
- return url;
- }
-
- var _loadFromUrl = function (url, loadCallback, failCallback, serverLoader) {
-
- var cacheKey = getCacheKey(url);
-
- var urlInfo = _urlInfos[cacheKey];
-
- if (urlInfo) {
- urlInfo.handleCallbacks(loadCallback, failCallback);
- return;
- }
-
- _urlInfos[cacheKey] = urlInfo = new UrlInfo(url);
- urlInfo.addCallbacks(loadCallback, failCallback);
-
- serverLoader(urlInfo);
- };
-
- var _loadScript = function (url, loadCallback, failCallback) {
- _loadFromUrl(url, loadCallback, failCallback, function (urlInfo) {
- $.get({
- url: url,
- dataType: 'text'
- })
- .done(function (script) {
- $.globalEval(script);
- urlInfo.succeed();
- })
- .fail(function () {
- urlInfo.failed();
- });
- });
- };
-
- var _loadStyle = function (url) {
- _loadFromUrl(url, undefined, undefined, function (urlInfo) {
-
- $('', {
- rel: 'stylesheet',
- type: 'text/css',
- href: appendTimeToUrl(url)
- }).appendTo('head');
- });
- };
-
- return {
- loadScript: _loadScript,
- loadStyle: _loadStyle
- }
- })();
-
+var abp = abp || {};
+(function($) {
+
+ if (!$) {
+ throw "abp/jquery library requires the jquery library included to the page!";
+ }
+
+ // ABP CORE OVERRIDES /////////////////////////////////////////////////////
+
+ abp.message._showMessage = function (message, title) {
+ alert((title || '') + ' ' + message);
+
+ return $.Deferred(function ($dfd) {
+ $dfd.resolve();
+ });
+ };
+
+ abp.message.confirm = function (message, titleOrCallback, callback) {
+ if (titleOrCallback && !(typeof titleOrCallback == 'string')) {
+ callback = titleOrCallback;
+ }
+
+ var result = confirm(message);
+ callback && callback(result);
+
+ return $.Deferred(function ($dfd) {
+ $dfd.resolve(result);
+ });
+ };
+
+ abp.utils.isFunction = function (obj) {
+ return $.isFunction(obj);
+ };
+
+ // JQUERY EXTENSIONS //////////////////////////////////////////////////////
+
+ $.fn.findWithSelf = function (selector) {
+ return this.filter(selector).add(this.find(selector));
+ };
+
+ // DOM ////////////////////////////////////////////////////////////////////
+
+ abp.dom = abp.dom || {};
+
+ abp.dom.onNodeAdded = function (callback) {
+ abp.event.on('abp.dom.nodeAdded', callback);
+ };
+
+ abp.dom.onNodeRemoved = function (callback) {
+ abp.event.on('abp.dom.nodeRemoved', callback);
+ };
+
+ var mutationObserverCallback = function (mutationsList) {
+ for (var i = 0; i < mutationsList.length; i++) {
+ var mutation = mutationsList[i];
+ if (mutation.type === 'childList') {
+ if (mutation.addedNodes && mutation.removedNodes.length) {
+ for (var k = 0; k < mutation.removedNodes.length; k++) {
+ abp.event.trigger(
+ 'abp.dom.nodeRemoved',
+ {
+ $el: $(mutation.removedNodes[k])
+ }
+ );
+ }
+ }
+
+ if (mutation.addedNodes && mutation.addedNodes.length) {
+ for (var j = 0; j < mutation.addedNodes.length; j++) {
+ abp.event.trigger(
+ 'abp.dom.nodeAdded',
+ {
+ $el: $(mutation.addedNodes[j])
+ }
+ );
+ }
+ }
+ }
+ }
+ };
+
+ new MutationObserver(mutationObserverCallback).observe(
+ $('body')[0],
+ {
+ subtree: true,
+ childList: true
+ }
+ );
+
+ // AJAX ///////////////////////////////////////////////////////////////////
+
+ abp.ajax = function (userOptions) {
+ userOptions = userOptions || {};
+
+ var options = $.extend(true, {}, abp.ajax.defaultOpts, userOptions);
+
+ options.success = undefined;
+ options.error = undefined;
+
+ return $.Deferred(function ($dfd) {
+ $.ajax(options)
+ .done(function (data, textStatus, jqXHR) {
+ $dfd.resolve(data);
+ userOptions.success && userOptions.success(data);
+ }).fail(function (jqXHR) {
+ if (jqXHR.getResponseHeader('_AbpErrorFormat') === 'true') {
+ abp.ajax.handleAbpErrorResponse(jqXHR, userOptions, $dfd);
+ } else {
+ abp.ajax.handleNonAbpErrorResponse(jqXHR, userOptions, $dfd);
+ }
+ });
+ });
+ };
+
+ $.extend(abp.ajax, {
+ defaultOpts: {
+ dataType: 'json',
+ type: 'POST',
+ contentType: 'application/json',
+ headers: {
+ 'X-Requested-With': 'XMLHttpRequest'
+ }
+ },
+
+ defaultError: {
+ message: 'An error has occurred!',
+ details: 'Error detail not sent by server.'
+ },
+
+ defaultError401: {
+ message: 'You are not authenticated!',
+ details: 'You should be authenticated (sign in) in order to perform this operation.'
+ },
+
+ defaultError403: {
+ message: 'You are not authorized!',
+ details: 'You are not allowed to perform this operation.'
+ },
+
+ defaultError404: {
+ message: 'Resource not found!',
+ details: 'The resource requested could not found on the server.'
+ },
+
+ logError: function (error) {
+ abp.log.error(error);
+ },
+
+ showError: function (error) {
+ if (error.details) {
+ return abp.message.error(error.details, error.message);
+ } else {
+ return abp.message.error(error.message || abp.ajax.defaultError.message);
+ }
+ },
+
+ handleTargetUrl: function (targetUrl) {
+ if (!targetUrl) {
+ location.href = abp.appPath;
+ } else {
+ location.href = targetUrl;
+ }
+ },
+
+ handleErrorStatusCode: function (status) {
+ switch (status) {
+ case 401:
+ abp.ajax.handleUnAuthorizedRequest(
+ abp.ajax.showError(abp.ajax.defaultError401),
+ abp.appPath
+ );
+ break;
+ case 403:
+ abp.ajax.showError(abp.ajax.defaultError403);
+ break;
+ case 404:
+ abp.ajax.showError(abp.ajax.defaultError404);
+ break;
+ default:
+ abp.ajax.showError(abp.ajax.defaultError);
+ break;
+ }
+ },
+
+ handleNonAbpErrorResponse: function (jqXHR, userOptions, $dfd) {
+ if (userOptions.abpHandleError !== false) {
+ abp.ajax.handleErrorStatusCode(jqXHR.status);
+ }
+
+ $dfd.reject.apply(this, arguments);
+ userOptions.error && userOptions.error.apply(this, arguments);
+ },
+
+ handleAbpErrorResponse: function (jqXHR, userOptions, $dfd) {
+ var messagePromise = null;
+
+ if (userOptions.abpHandleError !== false) {
+ messagePromise = abp.ajax.showError(jqXHR.responseJSON.error);
+ }
+
+ abp.ajax.logError(jqXHR.responseJSON.error);
+
+ $dfd && $dfd.reject(jqXHR.responseJSON.error, jqXHR);
+ userOptions.error && userOptions.error(jqXHR.responseJSON.error, jqXHR);
+
+ if (jqXHR.status === 401 && userOptions.abpHandleError !== false) {
+ abp.ajax.handleUnAuthorizedRequest(messagePromise);
+ }
+ },
+
+ handleUnAuthorizedRequest: function (messagePromise, targetUrl) {
+ if (messagePromise) {
+ messagePromise.done(function () {
+ abp.ajax.handleTargetUrl(targetUrl);
+ });
+ } else {
+ abp.ajax.handleTargetUrl(targetUrl);
+ }
+ },
+
+ blockUI: function (options) {
+ if (options.blockUI) {
+ if (options.blockUI === true) { //block whole page
+ abp.ui.setBusy();
+ } else { //block an element
+ abp.ui.setBusy(options.blockUI);
+ }
+ }
+ },
+
+ unblockUI: function (options) {
+ if (options.blockUI) {
+ if (options.blockUI === true) { //unblock whole page
+ abp.ui.clearBusy();
+ } else { //unblock an element
+ abp.ui.clearBusy(options.blockUI);
+ }
+ }
+ },
+
+ ajaxSendHandler: function (event, request, settings) {
+ var token = abp.security.antiForgery.getToken();
+ if (!token) {
+ return;
+ }
+
+ if (!settings.headers || settings.headers[abp.security.antiForgery.tokenHeaderName] === undefined) {
+ request.setRequestHeader(abp.security.antiForgery.tokenHeaderName, token);
+ }
+ }
+ });
+
+ $(document).ajaxSend(function (event, request, settings) {
+ return abp.ajax.ajaxSendHandler(event, request, settings);
+ });
+
+ abp.event.on('abp.configurationInitialized', function () {
+ var l = abp.localization.getResource('AbpUi');
+
+ abp.ajax.defaultError.message = l('DefaultErrorMessage');
+ abp.ajax.defaultError.details = l('DefaultErrorMessageDetail');
+ abp.ajax.defaultError401.message = l('DefaultErrorMessage401');
+ abp.ajax.defaultError401.details = l('DefaultErrorMessage401Detail');
+ abp.ajax.defaultError403.message = l('DefaultErrorMessage403');
+ abp.ajax.defaultError403.details = l('DefaultErrorMessage403Detail');
+ abp.ajax.defaultError404.message = l('DefaultErrorMessage404');
+ abp.ajax.defaultError404.details = l('DefaultErrorMessage404Detail');
+ });
+
+ // RESOURCE LOADER ////////////////////////////////////////////////////////
+
+ /* UrlStates enum */
+ var UrlStates = {
+ LOADING: 'LOADING',
+ LOADED: 'LOADED',
+ FAILED: 'FAILED'
+ };
+
+ /* UrlInfo class */
+ function UrlInfo(url) {
+ this.url = url;
+ this.state = UrlStates.LOADING;
+ this.loadCallbacks = [];
+ this.failCallbacks = [];
+ }
+
+ UrlInfo.prototype.succeed = function () {
+ this.state = UrlStates.LOADED;
+ for (var i = 0; i < this.loadCallbacks.length; i++) {
+ this.loadCallbacks[i]();
+ }
+ };
+
+ UrlInfo.prototype.failed = function () {
+ this.state = UrlStates.FAILED;
+ for (var i = 0; i < this.failCallbacks.length; i++) {
+ this.failCallbacks[i]();
+ }
+ };
+
+ UrlInfo.prototype.handleCallbacks = function (loadCallback, failCallback) {
+ switch (this.state) {
+ case UrlStates.LOADED:
+ loadCallback && loadCallback();
+ break;
+ case UrlStates.FAILED:
+ failCallback && failCallback();
+ break;
+ case UrlStates.LOADING:
+ this.addCallbacks(loadCallback, failCallback);
+ break;
+ }
+ };
+
+ UrlInfo.prototype.addCallbacks = function (loadCallback, failCallback) {
+ loadCallback && this.loadCallbacks.push(loadCallback);
+ failCallback && this.failCallbacks.push(failCallback);
+ };
+
+ /* ResourceLoader API */
+
+ abp.ResourceLoader = (function () {
+
+ var _urlInfos = {};
+
+ function getCacheKey(url) {
+ return url;
+ }
+
+ function appendTimeToUrl(url) {
+
+ if (url.indexOf('?') < 0) {
+ url += '?';
+ } else {
+ url += '&';
+ }
+
+ url += '_=' + new Date().getTime();
+
+ return url;
+ }
+
+ var _loadFromUrl = function (url, loadCallback, failCallback, serverLoader) {
+
+ var cacheKey = getCacheKey(url);
+
+ var urlInfo = _urlInfos[cacheKey];
+
+ if (urlInfo) {
+ urlInfo.handleCallbacks(loadCallback, failCallback);
+ return;
+ }
+
+ _urlInfos[cacheKey] = urlInfo = new UrlInfo(url);
+ urlInfo.addCallbacks(loadCallback, failCallback);
+
+ serverLoader(urlInfo);
+ };
+
+ var _loadScript = function (url, loadCallback, failCallback) {
+ _loadFromUrl(url, loadCallback, failCallback, function (urlInfo) {
+ $.get({
+ url: url,
+ dataType: 'text'
+ })
+ .done(function (script) {
+ $.globalEval(script);
+ urlInfo.succeed();
+ })
+ .fail(function () {
+ urlInfo.failed();
+ });
+ });
+ };
+
+ var _loadStyle = function (url) {
+ _loadFromUrl(url, undefined, undefined, function (urlInfo) {
+
+ $('', {
+ rel: 'stylesheet',
+ type: 'text/css',
+ href: appendTimeToUrl(url)
+ }).appendTo('head');
+ });
+ };
+
+ return {
+ loadScript: _loadScript,
+ loadStyle: _loadStyle
+ }
+ })();
+
})(jQuery);
\ No newline at end of file
diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/yarn.lock b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/yarn.lock
index 8a69d469f0..857eab952e 100644
--- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/yarn.lock
+++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/yarn.lock
@@ -2,37 +2,37 @@
# yarn lockfile v1
-"@abp/aspnetcore.mvc.ui.theme.basic@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.basic/-/aspnetcore.mvc.ui.theme.basic-2.1.0.tgz#f815001bd856fb5cbdd0b736181f2401a1a7ec62"
- integrity sha512-ej6dhUo3H9w6bpBTpMhk3M6zbC3fVAVMm5yLSYlYJ0sQxjb9PqC02OgiJme0mkxCUMwPuHVSQLrMQbioXdZu3A==
+"@abp/aspnetcore.mvc.ui.theme.basic@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.basic/-/aspnetcore.mvc.ui.theme.basic-2.2.0.tgz#e7f4e57d2b17cc76388e9c56bc34d50c9658873b"
+ integrity sha512-S9GQ9YVg4DWrgjujwiXBER6KqdqW5nZ1Bmt+YEePn5gEoPvoVrh6ojthpHYRjBJtGFqBSzRAQ9eVZLebT22Ozg==
dependencies:
- "@abp/aspnetcore.mvc.ui.theme.shared" "^2.1.0"
+ "@abp/aspnetcore.mvc.ui.theme.shared" "^2.2.0"
-"@abp/aspnetcore.mvc.ui.theme.shared@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.shared/-/aspnetcore.mvc.ui.theme.shared-2.1.0.tgz#c2790241b5a44b9d6e4f65911a1b9d9e9104ed82"
- integrity sha512-dxC0P/b1T+QJmRrB8HoLM7/GkWblz/X5lLqgn583W7/OTYhvxIxszuRDy/XIEuS+fP6a9rcGvGu5jcKJEqe/xA==
- dependencies:
- "@abp/aspnetcore.mvc.ui" "^2.1.0"
- "@abp/bootstrap" "^2.1.0"
- "@abp/bootstrap-datepicker" "^2.1.0"
- "@abp/datatables.net-bs4" "^2.1.0"
- "@abp/font-awesome" "^2.1.0"
- "@abp/jquery-form" "^2.1.0"
- "@abp/jquery-validation-unobtrusive" "^2.1.0"
- "@abp/lodash" "^2.1.0"
- "@abp/luxon" "^2.1.0"
- "@abp/malihu-custom-scrollbar-plugin" "^2.1.0"
- "@abp/select2" "^2.1.0"
- "@abp/sweetalert" "^2.1.0"
- "@abp/timeago" "^2.1.0"
- "@abp/toastr" "^2.1.0"
-
-"@abp/aspnetcore.mvc.ui@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui/-/aspnetcore.mvc.ui-2.1.0.tgz#3c86f42e52af3151d2aee0ffdd1281014ea61054"
- integrity sha512-pKiKMBOPuLm7p44DW8DdbsVn5PY3NqGYkz6gf75uzxyWiVYyl2CM/bvX9w4Ie7Q969owENMLrBREN6ezWZ5ynA==
+"@abp/aspnetcore.mvc.ui.theme.shared@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.shared/-/aspnetcore.mvc.ui.theme.shared-2.2.0.tgz#e0df953853be2a184d323931573f9f98aebbaa62"
+ integrity sha512-urxziaCdvfEqN5cjiiM5f5dx2Yr+AoGqCJVCo0Okjl2dosdaj5DH4SBzMvKAaLXzo3Ep1h4b3Wvws4BThL/6rA==
+ dependencies:
+ "@abp/aspnetcore.mvc.ui" "^2.2.0"
+ "@abp/bootstrap" "^2.2.0"
+ "@abp/bootstrap-datepicker" "^2.2.0"
+ "@abp/datatables.net-bs4" "^2.2.0"
+ "@abp/font-awesome" "^2.2.0"
+ "@abp/jquery-form" "^2.2.0"
+ "@abp/jquery-validation-unobtrusive" "^2.2.0"
+ "@abp/lodash" "^2.2.0"
+ "@abp/luxon" "^2.2.0"
+ "@abp/malihu-custom-scrollbar-plugin" "^2.2.0"
+ "@abp/select2" "^2.2.0"
+ "@abp/sweetalert" "^2.2.0"
+ "@abp/timeago" "^2.2.0"
+ "@abp/toastr" "^2.2.0"
+
+"@abp/aspnetcore.mvc.ui@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui/-/aspnetcore.mvc.ui-2.2.0.tgz#b2cdd421eed09ec1d30ae85e14434b7efc094ade"
+ integrity sha512-IO/AjhJu+LUa9zOaT8JlEnV+Pcp9oQ3q9kTq8kmMakC35vTIyvBpB3nnykXIOytZSyjsBgFYB/uMxPgBOjWagg==
dependencies:
ansi-colors "^4.1.1"
extend-object "^1.0.0"
@@ -41,135 +41,135 @@
path "^0.12.7"
rimraf "^3.0.0"
-"@abp/bootstrap-datepicker@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/bootstrap-datepicker/-/bootstrap-datepicker-2.1.0.tgz#a0d71da15cb3d3cc02f9a390437a44db5e9f9ea1"
- integrity sha512-lkNI0iyefiXS2O5x9Ae9eJQLPXSQlOWDX7QhKnBHLR9JxjJEnhBUIIOylMltAIqtVDtjk2ikDyd3BAiyBdtB/w==
+"@abp/bootstrap-datepicker@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/bootstrap-datepicker/-/bootstrap-datepicker-2.2.0.tgz#a2f50b422824f18ed4b7e80be6852e2979119f8e"
+ integrity sha512-X9jT5mU42QFfVhOZdun7aEJUf3bMko6NsG3NFQVjqTqKH+iYGKfHPFpXD0gP/6Nb4KgZUdId8hSyQTZyOK2JEA==
dependencies:
bootstrap-datepicker "^1.9.0"
-"@abp/bootstrap@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/bootstrap/-/bootstrap-2.1.0.tgz#7ce15d4effac0e0991a3520c4666c6cb17a3fef2"
- integrity sha512-1xQjqu6shCgzd1FI94y5AIXGIhBlZEoRrOhaT84j/2KzYiDvhP+LAqQjMgqlQmBLs6vMckpxtf5thxKTMXvtOw==
+"@abp/bootstrap@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/bootstrap/-/bootstrap-2.2.0.tgz#16e41d3432117bbcd9012c6f735c49c543255879"
+ integrity sha512-aRmluu6SkIl+JgCzSSJZrDPkYr6WWaQdY0iJAOz6NHtffa7Aumh1IUOrLVKL0T1pQn6QKs0Z7JDGyYMdh1HPkQ==
dependencies:
- "@abp/core" "^2.1.0"
+ "@abp/core" "^2.2.0"
bootstrap "^4.3.1"
-"@abp/core@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/core/-/core-2.1.0.tgz#0cd2850f029df1d18517b8e74c70341972c37ed7"
- integrity sha512-1wnRo00hWncZWSakaEXm388XhhbKXDVkWDIdaT3kyQpvp3kX1lFx7I5iiZiwIeULwZRF9mi6HV6iHEze58x0kQ==
+"@abp/core@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/core/-/core-2.2.0.tgz#4eea0a06458c90acb8566a11eb841fe65d15d256"
+ integrity sha512-tBGHa5CUr0ewT31g689RAfQ6Su2p4uyn2PzmrW/8lahBrvqkoCb41fkCDLQJkTY5rKPrEKZd/s9OoyOnS20DLg==
-"@abp/datatables.net-bs4@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/datatables.net-bs4/-/datatables.net-bs4-2.1.0.tgz#a0f36cf4e3ef96ae03aa4b9956fcb8b971c854cb"
- integrity sha512-93qc2rrGs+JKRPM/7UCasa5VmfswgYU8cv3Ybg5OKoaASODYUn06GChRFnd/mvqcDxw4+8gaqpC3U2ETZZI4pA==
+"@abp/datatables.net-bs4@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/datatables.net-bs4/-/datatables.net-bs4-2.2.0.tgz#c7cc49e889b295ae10fb24ed62b154ef79ffc85a"
+ integrity sha512-zjJRPqOCWPfkHt1QztfFHKrsTE9o6Je2EpfA7hRMej2FlGbsMWUxOqx/btK1vjD6YIU8DtVDpIdj1WvPOITQ4Q==
dependencies:
- "@abp/datatables.net" "^2.1.0"
+ "@abp/datatables.net" "^2.2.0"
datatables.net-bs4 "^1.10.20"
-"@abp/datatables.net@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/datatables.net/-/datatables.net-2.1.0.tgz#674eaaa5b0948d7ee85b6605bfbad1a70f839aa7"
- integrity sha512-3ZM2p+JpHumxbIKlDP/LKLsfceMdttdTOL0ckIZCmAAgoIeKmAtuMoKcHTr8lj5mjgv4arBGvG9WVCemep2PEw==
+"@abp/datatables.net@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/datatables.net/-/datatables.net-2.2.0.tgz#22f9c7ca90c2d4af264483b4f8286b0feb7c3d52"
+ integrity sha512-L4MnpdloSWr/px3mvV75sxsxL68MyALB2LKdzCFMQWILCZVkxMmQb9LARINYIrn461Wrc+zbYWNEBD0MAq7flg==
dependencies:
- "@abp/core" "^2.1.0"
+ "@abp/core" "^2.2.0"
datatables.net "^1.10.20"
-"@abp/font-awesome@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/font-awesome/-/font-awesome-2.1.0.tgz#c2e628a1b9d0525e7d6950bf007feebcd1c490c8"
- integrity sha512-vlm1IQuQVfuCI2O1vphDd11zUEJ4/4PU0/0XI1YCpilse8fBg080CM3+G0kw6Erm/riznqhOJwBcfT+K+zqk8A==
+"@abp/font-awesome@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/font-awesome/-/font-awesome-2.2.0.tgz#2de39e3c6c3e8c30394d82861761a66c5b4032f0"
+ integrity sha512-RT06MYUGgaWBEpW5c7wUcfMXgxcOHWdX/C01LDO/j6iVoKBuBHOkkvcUoTWII068ECrLYOkj+RyT59dCKm8FFw==
dependencies:
- "@abp/core" "^2.1.0"
+ "@abp/core" "^2.2.0"
"@fortawesome/fontawesome-free" "^5.11.2"
-"@abp/jquery-form@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/jquery-form/-/jquery-form-2.1.0.tgz#285dbfdcf722cb0249f149e728cef7f788410c0c"
- integrity sha512-A17rjHTiBJBKYgrtDX5wIqnI89wNmo3bdK9NagL1wMFj4GvDyOZoRIDLqkopYQsc8zuPjqw4+1aa2TPiA+jtKg==
+"@abp/jquery-form@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/jquery-form/-/jquery-form-2.2.0.tgz#951653fac4013a7bbec065b5101b86d575e0eca7"
+ integrity sha512-ji44E3Ud0S3LNXn1WJ/Aw44qAIG7EITEW1KOe46oz+/awPpbiiA4dDDNleTvO2jI2/s8mNyR0bNanP6BUsc7tw==
dependencies:
- "@abp/jquery" "^2.1.0"
+ "@abp/jquery" "^2.2.0"
jquery-form "^4.2.2"
-"@abp/jquery-validation-unobtrusive@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-2.1.0.tgz#fc938775ced2efc686e7dd092d6ceff1ea947f36"
- integrity sha512-a8iBIj6amJ9rQNV+wxQUuEVh93M/c32kJcrwSEPWQcOoTj5gf0j8eKK9YvZaGokpylraz9mdGOwYQQuNj1sxEw==
+"@abp/jquery-validation-unobtrusive@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-2.2.0.tgz#6d39ba9f7bf026d1380796bf5dff76c8d16b42ce"
+ integrity sha512-SuS/dRRVz7ZR4HK/h9x0jRRVLPqXN0CPRGPdJZ1LJraXVEJ9/eDEGf1rMlHmEGt1FXXFTD01/zjisbweDE786w==
dependencies:
- "@abp/jquery-validation" "^2.1.0"
+ "@abp/jquery-validation" "^2.2.0"
jquery-validation-unobtrusive "^3.2.11"
-"@abp/jquery-validation@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/jquery-validation/-/jquery-validation-2.1.0.tgz#2bf1a31321cce3b2abe6d56c6112c52a8ecb28b6"
- integrity sha512-kU6/E+Xc3wHAUs+sGMAL8uozkXv65HnpksTwV4/+RK+D6iFU2EyNgCEFu7QGSwYZsV1/7YsCe2GD4ucBXIknbA==
+"@abp/jquery-validation@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/jquery-validation/-/jquery-validation-2.2.0.tgz#02bb8ba883e72c1204867ee4d1c1094bd91c4c4c"
+ integrity sha512-ypITQloO4iEDgqlA6qb3taj+7HMX0Cf/ACA2OvtrvOgJejx6J4wfrPjwuFZu1WWJ0xtc9yTdbovdcSVcQbIGaA==
dependencies:
- "@abp/jquery" "^2.1.0"
+ "@abp/jquery" "^2.2.0"
jquery-validation "^1.19.1"
-"@abp/jquery@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/jquery/-/jquery-2.1.0.tgz#fb5b4c9e8622cf46fee92f9f731d007d5fb200bb"
- integrity sha512-ZpfzRut5G611bBmuDdiT6BD0M7Rl1P6r8uNxUjdmFXYwFd8wD02ZhIcsX7qFHFkYERuXfcLrZh4rpw9G1DVCJg==
+"@abp/jquery@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/jquery/-/jquery-2.2.0.tgz#0e641b1109e78eff4c34331ca2b123b67cc30cbe"
+ integrity sha512-vEfRoFEAmDmRgSq98Y9EZExfQFSWtmjaHrodUu+MadTcRlnn+wHq8wwkKKxpj/eYtNc8aFORpyHMMH7uliAKxg==
dependencies:
- "@abp/core" "^2.1.0"
+ "@abp/core" "^2.2.0"
jquery "^3.4.1"
-"@abp/lodash@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/lodash/-/lodash-2.1.0.tgz#9fc9e6521e6284d607cedbff1a458fa324137c5c"
- integrity sha512-s1gTHhpbmEDDCsZeXb9MpClkDS4wH5R2IWPRZUlSPxo3gF0pvkx5ubdhYUEUgqy5QqWxE/+zUAjDc4x+cEriFQ==
+"@abp/lodash@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/lodash/-/lodash-2.2.0.tgz#af0a2ebcb28fd0a8c02da5026479d9370ed19719"
+ integrity sha512-wOMLqIpuq4a7ww7pB138G6YxBiTGBgxNW/IWGUiWbfgrr88cGPKIYYv/8O8mvr8PLNGjizNynuwQRj522yA3Dw==
dependencies:
- "@abp/core" "^2.1.0"
+ "@abp/core" "^2.2.0"
lodash "^4.17.15"
-"@abp/luxon@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/luxon/-/luxon-2.1.0.tgz#624796722119f075119006b436054aecbb38f15f"
- integrity sha512-2b0sRo6rdYT1wDu9nSXm/9o8rhQ9ED7FxrDMYabYuOQz48esgn4fBUNcPqpxwejpFmlhZY6CONvkddNtaMeVHw==
+"@abp/luxon@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/luxon/-/luxon-2.2.0.tgz#0d0e78edc249853fa31eceecc00df2846a879aa9"
+ integrity sha512-WbOW0PcMks+WXRPWt/+H4pOa5waM331WkY0F+EJx8fpxemNGQNUEXLkuMXzN3MrN6LrplM9AZ9i+NRA9PWHbNw==
dependencies:
luxon "^1.21.3"
-"@abp/malihu-custom-scrollbar-plugin@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-2.1.0.tgz#f4dc1a32cefc3de8af08cb6d585ec5f7636a0c5e"
- integrity sha512-WcxzCZ5YOMxGxZerEh966cVrFSCw1UTDqwU2rxA/LsHEbPKd69AY+SHvUiacNxPXs1ZCF6FFJ29C5dWicEIRaQ==
+"@abp/malihu-custom-scrollbar-plugin@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-2.2.0.tgz#e11fd46dccbb28d44fb199e880b91d27c94f1919"
+ integrity sha512-YDu/NLpIzMA96NDHxd27/+liTm3sow9M+oWH29+9JW8o/AEpXUH3T3AmoXXcTgsBlzLaewgHEFM8yxsAAFoj8Q==
dependencies:
- "@abp/core" "^2.1.0"
+ "@abp/core" "^2.2.0"
malihu-custom-scrollbar-plugin "^3.1.5"
-"@abp/select2@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/select2/-/select2-2.1.0.tgz#79e50d2c25e74a5f96520e8aa1433d79aea674d1"
- integrity sha512-ut/3c+lFdoepuDH36M7thWagmAmTFrChcPnhYjTx4MmIf31WW1BwqOSx3I2g8M+NEEx+V2jTNuBpTq7PONgSJg==
+"@abp/select2@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/select2/-/select2-2.2.0.tgz#4639d4e5b72b1736fa4476bd9b6a78e036400421"
+ integrity sha512-tc87JyM0kvVF388kyGUjDby49Zrrb089jVRRipoIaxXeu4M1YxEFSKBEcUK1MohZWjVtWrNs8MoxPlfukaMpyw==
dependencies:
- "@abp/core" "^2.1.0"
+ "@abp/core" "^2.2.0"
select2 "^4.0.12"
-"@abp/sweetalert@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/sweetalert/-/sweetalert-2.1.0.tgz#88f405c4ba9f9ed2fd54b945ed6bc48d5ae2fa23"
- integrity sha512-EWvReqxZ1DrNH9XD+cf/yGVj+8IPTpuoPuWKDryN4fF7TCMJA+KrXp5lFxpjfkKTtNzLeFGsJqDFWaUifxtqTA==
+"@abp/sweetalert@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/sweetalert/-/sweetalert-2.2.0.tgz#dfc60ba085522d8390e41b90bf5a3d474f4ae624"
+ integrity sha512-HS6TKOwP91UjzjZHaheurZ1AYUSMkQyCSmoX6g5LAK4eH8IIgpojVSp1AFCSPATrFsFWY/dzkDGcfu90FWsVBg==
dependencies:
- "@abp/core" "^2.1.0"
+ "@abp/core" "^2.2.0"
sweetalert "^2.1.2"
-"@abp/timeago@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/timeago/-/timeago-2.1.0.tgz#28c0aef88aff8b54d1dfb42a664d05097e7fda35"
- integrity sha512-NklUYcWeji7po+Y6Oi7b7IkYmjd5YRu123bm3MqjQ71AzuOCTFbvPMHzYOjrUTkzr6gW3IJ24LQ4YmpshPy4ZQ==
+"@abp/timeago@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/timeago/-/timeago-2.2.0.tgz#9a8297f36a46cdc4cc62f44d0fdc91b70def389c"
+ integrity sha512-8qjmKscsTvPznHKWEsddYxdSBiU+l+OgLG6vzMcSWqngYbDQGXqNA93BwJI2qiwd+FkNcfGgYg7CN7bcwzmaiw==
dependencies:
- "@abp/jquery" "^2.1.0"
+ "@abp/jquery" "^2.2.0"
timeago "^1.6.7"
-"@abp/toastr@^2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@abp/toastr/-/toastr-2.1.0.tgz#22a53a2b1f354770fdc7b37f06bec10eefccfe7a"
- integrity sha512-hD3hTDx+CixTVTx73rnZDiiFkfSxpZox8RLm+CiFA62ORdO8Ryij8TOXXkJd84b2tJfkAkYehohVXKwHlHU7Zg==
+"@abp/toastr@^2.2.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@abp/toastr/-/toastr-2.2.0.tgz#1cad83a89da244685b3c82adff64260b7ccf4742"
+ integrity sha512-HHfSaw4M/9zS+KgzxGvbHYiQ5qcJgpf21cRZEo16aUwnTeKr4SRaewAWryNn4dKcIO2YNrhzDLH+OYbEaJJlDQ==
dependencies:
- "@abp/jquery" "^2.1.0"
+ "@abp/jquery" "^2.2.0"
toastr "^2.1.4"
"@fortawesome/fontawesome-free@^5.11.2":
diff --git a/tools/github-changelog-generator/changelog.md b/tools/github-changelog-generator/changelog.md
deleted file mode 100644
index e753f610c6..0000000000
Binary files a/tools/github-changelog-generator/changelog.md and /dev/null differ