diff --git a/README.md b/README.md index dbf8bce537..1d7b7e51a7 100644 --- a/README.md +++ b/README.md @@ -108,6 +108,10 @@ ABP is a community-driven open source project. See [the contribution guide](http Love ABP Framework? **Please give a star** to this repository :star: +## Discord Channel + +You can use this link to join the ABP Community Discord Server: https://discord.gg/uVGt6hyhcm + ## ABP Commercial See also [ABP Commercial](https://commercial.abp.io/) if you are looking for pre-built application modules, professional themes, code generation tooling and premium support for the ABP Framework. diff --git a/abp_io/AbpIoLocalization/AbpIoLocalization/Admin/Localization/Resources/en.json b/abp_io/AbpIoLocalization/AbpIoLocalization/Admin/Localization/Resources/en.json index d2702c83b9..023a4b18ed 100644 --- a/abp_io/AbpIoLocalization/AbpIoLocalization/Admin/Localization/Resources/en.json +++ b/abp_io/AbpIoLocalization/AbpIoLocalization/Admin/Localization/Resources/en.json @@ -337,18 +337,6 @@ "Expired": "Expired", "TrialLicenseDeletionWarningMessage": "Are you sure you want to delete the trial license? Trial license, organization, support accounts will be deleted!", "LicenseCategoryFilter": "License category", - "Volo.AbpIo.Commercial:030000": "You already used your trial period.", - "Volo.AbpIo.Commercial:030001": "This organization name already exists.", - "Volo.AbpIo.Commercial:030002": "Once activated, trial license cannot be set to requested!", - "Volo.AbpIo.Commercial:030003": "There is no such status!", - "Volo.AbpIo.Commercial:030004": "Status could not be changed due to an unexpected error!", - "Volo.AbpIo.Commercial:030005": "Start and end date can be updated when the trial license is in the -activated- status!", - "Volo.AbpIo.Commercial:030006": "End date must always be greater than start date!", - "Volo.AbpIo.Commercial:030007": "This trial license has already been activated once!", - "Volo.AbpIo.Commercial:030008": "Purchase date can be set only when status is Purchased!", - "Volo.AbpIo.Commercial:030009": "User not found!", - "Volo.AbpIo.Commercial:030010": "To purchase the trial license, first you need to activate your trial license!", - "Volo.AbpIo.Commercial:030011": "You cannot delete a trial license when it is purchased!", "Permission:SendWelcomeEmail": "Send Welcome Email", "SendWelcomeEmail": "Send Welcome Email", "SendWelcomeEmailWarningMessage": "Are you sure you want to send welcome email to the organization members?", diff --git a/abp_io/AbpIoLocalization/AbpIoLocalization/Base/Localization/Resources/en.json b/abp_io/AbpIoLocalization/AbpIoLocalization/Base/Localization/Resources/en.json index a214e251af..f772006632 100644 --- a/abp_io/AbpIoLocalization/AbpIoLocalization/Base/Localization/Resources/en.json +++ b/abp_io/AbpIoLocalization/AbpIoLocalization/Base/Localization/Resources/en.json @@ -14,6 +14,18 @@ "Volo.AbpIo.Domain:020002": "Could not delete this NPM Package because \"{Modules}\" Modules are using this package.", "Volo.AbpIo.Domain:020003": "Could not delete this NPM Package because \"{Modules}\" Modules are using this package and \"{NugetPackages}\" Nuget Packages are dependent to this package.", "Volo.AbpIo.Domain:020004": "Could not delete this Nuget Package because \"{Modules}\" Modules are using this package.", + "Volo.AbpIo.Domain:030000": "You have already completed your trial period.", + "Volo.AbpIo.Domain:030001": "This organization name already exists.", + "Volo.AbpIo.Domain:030002": "Once activated, you cannot switch the trial license to -requested- status!", + "Volo.AbpIo.Domain:030003": "There is no such status!", + "Volo.AbpIo.Domain:030004": "Status could not be changed due to an unexpected error!", + "Volo.AbpIo.Domain:030005": "Start and end date can be updated when the trial license is in the -activated- status!", + "Volo.AbpIo.Domain:030006": "The end date must be greater than the start date!", + "Volo.AbpIo.Domain:030007": "This trial license has already been activated!", + "Volo.AbpIo.Domain:030008": "The purchase date can be set only when the status is -purchased-!", + "Volo.AbpIo.Domain:030009": "User not found!", + "Volo.AbpIo.Domain:030010": "To purchase the trial license, you first need to activate your trial license!", + "Volo.AbpIo.Domain:030011": "You cannot delete a trial license when it is purchased!", "WantToLearn?": "Want to learn?", "ReadyToGetStarted?": "Ready to get started?", "JoinOurCommunity": "Join our community", @@ -72,7 +84,7 @@ "WouldLikeToReceiveMarketingMaterials": "I would like to receive marketing materials like product deals & special offers.", "JoinOurMarketingNewsletter": "Join our marketing newsletter", "CommunityPrivacyPolicyConfirmation": "I agree to the Terms & Conditions and Privacy Policy.", - "ABPIO-Common": "ABPIO-Common", + "WouldLikeToReceiveNotification": "I would like to receive the latest news from abp.io websites.", "CommercialNewsletterConfirmationMessage": "I agree to the Terms & Conditions and Privacy Policy.", "FreeDDDEBook": "Free DDD E-Book", "AdditionalServices": "Additional Services", @@ -106,6 +118,7 @@ "ThereIsNoEvent": "There is no event.", "Events": "Events", "Volo.AbpIo.Domain:080000": "There is already a purchase item named \"{Name}\"", - "MasteringAbpFrameworkBook": "Book: Mastering ABP Framework" + "MasteringAbpFrameworkBook": "Book: Mastering ABP Framework", + "ABPIO-CommonPreferenceDefinition": "Get latest news about ABP Platform like new posts, events and more." } } diff --git a/common.props b/common.props index 12a177739b..facc92f0bc 100644 --- a/common.props +++ b/common.props @@ -1,7 +1,7 @@ latest - 5.2.0-rc.1 + 5.3.0 $(NoWarn);CS1591;CS0436 https://abp.io/assets/abp_nupkg.png https://abp.io/ diff --git a/docs/en/Background-Workers.md b/docs/en/Background-Workers.md index 0c9e26e409..726a8817ab 100644 --- a/docs/en/Background-Workers.md +++ b/docs/en/Background-Workers.md @@ -86,20 +86,20 @@ After creating a background worker class, you should add it to the `IBackgroundW [DependsOn(typeof(AbpBackgroundWorkersModule))] public class MyModule : AbpModule { - public override void OnApplicationInitialization( + public override Task OnApplicationInitializationAsync( ApplicationInitializationContext context) { - context.AddBackgroundWorker(); + context.AddBackgroundWorkerAsync(); } } ```` -`context.AddBackgroundWorker(...)` is a shortcut extension method for the expression below: +`context.AddBackgroundWorkerAsync(...)` is a shortcut extension method for the expression below: ````csharp -context.ServiceProvider +await context.ServiceProvider .GetRequiredService() - .Add( + .AddAsync( context .ServiceProvider .GetRequiredService() diff --git a/docs/en/Blog-Posts/2021-04-05 CmsKit/POST.md b/docs/en/Blog-Posts/2021-04-05 CmsKit/POST.md index 59bd172f47..a07928a116 100644 --- a/docs/en/Blog-Posts/2021-04-05 CmsKit/POST.md +++ b/docs/en/Blog-Posts/2021-04-05 CmsKit/POST.md @@ -79,7 +79,7 @@ For example, -We've covered the initial features, installation and configuration steps in this post. You can read the [open-source](https://docs.abp.io/en/abp/latest/Modules/Cms-Kit) and [commercial](https://docs.abp.io/en/commercial/latest/modules/CMS-Kit) documentation to get further information about features and the CMS Kit module. CMS Kit's initial version contains lots of features that you can easily integrate and use in your applications. We're planning to improve the existing features, fixing bugs and adding new features in upcoming releases. If you want to give some feedback or have a feature request, please reach out to us from [GitHub](https://github.com/abpframework/abp) or [support.abp.io](https://support.abp.io). We will be happy to plan the CMS Kit module's future together. +We've covered the initial features, installation and configuration steps in this post. You can read the [open-source](https://docs.abp.io/en/abp/latest/Modules/Cms-Kit/Index) and [commercial](https://docs.abp.io/en/commercial/latest/modules/CMS-Kit) documentation to get further information about features and the CMS Kit module. CMS Kit's initial version contains lots of features that you can easily integrate and use in your applications. We're planning to improve the existing features, fixing bugs and adding new features in upcoming releases. If you want to give some feedback or have a feature request, please reach out to us from [GitHub](https://github.com/abpframework/abp) or [support.abp.io](https://support.abp.io). We will be happy to plan the CMS Kit module's future together. Thank you! diff --git a/docs/en/Blog-Posts/2022-03-08 v5_2_Preview/POST.md b/docs/en/Blog-Posts/2022-03-08 v5_2_Preview/POST.md index 5699328d89..b78e3235a2 100644 --- a/docs/en/Blog-Posts/2022-03-08 v5_2_Preview/POST.md +++ b/docs/en/Blog-Posts/2022-03-08 v5_2_Preview/POST.md @@ -34,6 +34,13 @@ See the [ABP CLI documentation](https://docs.abp.io/en/abp/latest/CLI) for all t You can use any IDE that supports .NET 6.x, like **[Visual Studio 2022](https://visualstudio.microsoft.com/downloads/)**. +## Migration Guides + +Please see the migration guides if you are upgrading from 5.x versions: + +* [ABP Framework 5.x to 5.2 migration guide](https://docs.abp.io/en/abp/5.2/Migration-Guides/Abp-5_2) +* [ABP Commercial 5.x to 5.2 migration guide](https://docs.abp.io/en/commercial/5.2/migration-guides/index) + ## What's New with ABP Framework 5.2? In this section, I will introduce some major features released with this version. Here, a brief list of titles explained in the next sections: @@ -45,7 +52,7 @@ In this section, I will introduce some major features released with this version * Custom Global CSS and JavaScript for the CMS Kit module * Other news -Let's begin with the first section: +Let's begin with the first section. ### Single-layer Solution Template @@ -171,7 +178,7 @@ With this new feature, you can automatically generate advanced user interfaces w ## Community News -We organized the 3rd live [ABP Community Talks](https://community.abp.io/talks) event on February 23rd. ABP community has a good interest in these events and we will continue to organize such a live event in every month. March's event will be announced in a few days. [Follow us on twitter](https://twitter.com/abpframework). +We organized the 3rd live [ABP Community Talks](https://community.abp.io/events) event on February 23rd. ABP community has a good interest in these events and we will continue to organize such a live event in every month. March's event will be announced in a few days. [Follow us on twitter](https://twitter.com/abpframework). [ABP Community](https://community.abp.io/) website is being a huge resource of articles and video tutorials on the ABP Framework and .NET. There have been 93 articles/tutorials submitted so far. Here's a list of a few contents posted in the last weeks: diff --git a/docs/en/Community-Articles/2021-12-13-Integrating-the-Syncfusion-MVC-Components-to-the-ABP-MVC-UI/POST.md b/docs/en/Community-Articles/2021-12-13-Integrating-the-Syncfusion-MVC-Components-to-the-ABP-MVC-UI/POST.md index edaeaf46db..4095c62092 100644 --- a/docs/en/Community-Articles/2021-12-13-Integrating-the-Syncfusion-MVC-Components-to-the-ABP-MVC-UI/POST.md +++ b/docs/en/Community-Articles/2021-12-13-Integrating-the-Syncfusion-MVC-Components-to-the-ABP-MVC-UI/POST.md @@ -178,7 +178,7 @@ module.exports = { }; ``` -> ABP copies related packages from **node_modules** folder to the **libs** folder by examining this file. You can read this [document](docs.abp.io/en/abp/latest/UI/AspNetCore/Client-Side-Package-Management#mapping-the-library-resources) for more info. +> ABP copies related packages from **node_modules** folder to the **libs** folder by examining this file. You can read this [document](https://docs.abp.io/en/abp/latest/UI/AspNetCore/Client-Side-Package-Management#mapping-the-library-resources) for more info. * Then run the `abp install-libs` to install the dependencies and copy them into the libs folder by your mappings configuration. After running this command, in your **libs** folder it should be a folder named **syncfusion** folder. diff --git a/docs/en/Community-Articles/2022-02-06-How-to-Hide-ABP-Related-Endpoints-on-Swagger-UI/POST.md b/docs/en/Community-Articles/2022-02-06-How-to-Hide-ABP-Related-Endpoints-on-Swagger-UI/POST.md index 5c9c576e9c..056c14c6e7 100644 --- a/docs/en/Community-Articles/2022-02-06-How-to-Hide-ABP-Related-Endpoints-on-Swagger-UI/POST.md +++ b/docs/en/Community-Articles/2022-02-06-How-to-Hide-ABP-Related-Endpoints-on-Swagger-UI/POST.md @@ -108,7 +108,7 @@ public class SwaggerSettingConsts We've created a class with a constant variable to avoid using the magic strings. This variable will be our setting name. -ABP provides us a [Settings System](https://docs.abp.io/en/abp/latest/Setting) to easily define settings for our applications. We only need to create a class that derives from the `SettingDefinitionProvider` class, but we don't even need to do this because the ABP startup templates come with a pre-defined setting provider class. +ABP provides us a [Settings System](https://docs.abp.io/en/abp/latest/Settings) to easily define settings for our applications. We only need to create a class that derives from the `SettingDefinitionProvider` class, but we don't even need to do this because the ABP startup templates come with a pre-defined setting provider class. * So open the setting definition provider class (`SwaggerSettingsDemoSettingDefinitionProvider` in our case, it's under the /Settings folder of your domain layer) and update the class: diff --git a/docs/en/Distributed-Locking.md b/docs/en/Distributed-Locking.md new file mode 100644 index 0000000000..bea10645ca --- /dev/null +++ b/docs/en/Distributed-Locking.md @@ -0,0 +1,104 @@ +# Distributed Locking +Distributed locking is a technique to manage many applications that try to access the same resource. +The main purpose is to allow only one of many applications to access the same resource at the same time. +Otherwise, accessing the same object from various applications may corrupt the value of resources. + +> ABP's current distributed locking implementation is based on the [DistributedLock](https://github.com/madelson/DistributedLock) library. + +## Installation + +You can open a command-line terminal and type the following command to install the [Volo.Abp.DistributedLocking](https://www.nuget.org/packages/Volo.Abp.DistributedLocking) package into your project: + +````bash +abp add-package Volo.Abp.DistributedLocking +```` + +This package provides the necessary API to use the distributed locking system, however, you should configure a provider before using it. + +### Configuring a provider + +The [DistributedLock](https://github.com/madelson/DistributedLock) library provides [various of implementations](https://github.com/madelson/DistributedLock#implementations) for the locking, like [Redis](https://github.com/madelson/DistributedLock/blob/master/docs/DistributedLock.Redis.md) and [ZooKeeper](https://github.com/madelson/DistributedLock/blob/master/docs/DistributedLock.ZooKeeper.md). + +For example, if you want to use the [Redis provider](https://github.com/madelson/DistributedLock/blob/master/docs/DistributedLock.Redis.md), you should add [DistributedLock.Redis](https://www.nuget.org/packages/DistributedLock.Redis) NuGet package to your project, then add the following code into the `ConfigureServices` method of your ABP [module](Module-Development-Basics.md) class: + +````csharp +using Medallion.Threading; +using Medallion.Threading.Redis; + +namespace AbpDemo +{ + public class MyModule : AbpModule + { + public override void ConfigureServices(ServiceConfigurationContext context) + { + var configuration = context.Services.GetConfiguration(); + + context.Services.AddSingleton(sp => + { + var connection = ConnectionMultiplexer + .Connect(configuration["Redis:Configuration"]); + return new + RedisDistributedSynchronizationProvider(connection.GetDatabase()); + }); + } + } +} +```` + +This code gets the Redis connection string from the [configuration](Configuration.md), so you can add the following lines to your `appsettings.json` file: + +````json +"Redis": { + "Configuration": "127.0.0.1" +} +```` + +## Usage + +There are two ways to use the distributed locking API: ABP's `IAbpDistributedLock` abstraction and [DistributedLock](https://github.com/madelson/DistributedLock) library's API. + +### Using the IAbpDistributedLock service + +`IAbpDistributedLock` is a simple service provided by the ABP framework for simple usage of distributed locking. + +**Example: Using the `IAbpDistributedLock.TryAcquireAsync` method** + +````csharp +using Volo.Abp.DistributedLocking; + +namespace AbpDemo +{ + public class MyService : ITransientDependency + { + private readonly IAbpDistributedLock _distributedLock; + public MyService(IAbpDistributedLock distributedLock) + { + _distributedLock = distributedLock; + } + + public async Task MyMethodAsync() + { + await using (var handle = + await _distributedLock.TryAcquireAsync("MyLockName")) + { + if (handle != null) + { + // your code that access the shared resource + } + } + } + } +} +```` + +`TryAcquireAsync` may not acquire the lock. It returns `null` if the lock could not be acquired. In this case, you shouldn't access the resource. If the handle is not `null`, it means that you've obtained the lock and can safely access the resource. + +`TryAcquireAsync` method gets the following parameters: + +* `name` (`string`, required): Unique name of your lock. Different named locks are used to access different resources. +* `timeout` (`TimeSpan`): A timeout value to wait to obtain the lock. Default value is `TimeSpan.Zero`, which means it doesn't wait if the lock is already owned by another application. +* `cancellationToken`: A cancellation token that can be triggered later to cancel the operation. + +### Using DistributedLock library's API + +ABP's `IAbpDistributedLock` service is very limited and mainly designed to be internally used by the ABP Framework. For your own applications, you can use the DistributedLock library's own API. See its [own documentation](https://github.com/madelson/DistributedLock) for details. diff --git a/docs/en/Features.md b/docs/en/Features.md index 3b1869a9a5..7e8802da96 100644 --- a/docs/en/Features.md +++ b/docs/en/Features.md @@ -308,7 +308,7 @@ The example above defines a *Reporting* feature with two children: *PDF Reportin ### Changing Features Definitions of a Depended Module -A class deriving from the `FeatureDefinitionProvider` (just like the example above) can also get the existing permission definitions (defined by the depended [modules](Module-Development-Basics.md)) and change their definitions. +A class deriving from the `FeatureDefinitionProvider` (just like the example above) can also get the existing feature definitions (defined by the depended [modules](Module-Development-Basics.md)) and change their definitions. **Example: Manipulate an existing feature definition** @@ -437,4 +437,4 @@ Use this code inside the `ConfigureServices` of your [module](Module-Development ### Feature Store -`IFeatureStore` is the only interface that needs to be implemented to read the value of features from a persistence source, generally a database system. The Feature Management module implements it and pre-installed in the application startup template. See the [feature management module documentation](https://docs.abp.io/en/abp/latest/Modules/Feature-Management) for more information \ No newline at end of file +`IFeatureStore` is the only interface that needs to be implemented to read the value of features from a persistence source, generally a database system. The Feature Management module implements it and pre-installed in the application startup template. See the [feature management module documentation](https://docs.abp.io/en/abp/latest/Modules/Feature-Management) for more information diff --git a/docs/en/Migration-Guides/Abp-5_2.md b/docs/en/Migration-Guides/Abp-5_2.md index 3a98e948ae..d0cbf80aad 100644 --- a/docs/en/Migration-Guides/Abp-5_2.md +++ b/docs/en/Migration-Guides/Abp-5_2.md @@ -1,3 +1,52 @@ # ABP Version 5.2 Migration Guide -TODO \ No newline at end of file +This document is a guide for upgrading ABP v5.x solutions to ABP v5.2. Please read them all since v5.2 has some changes you should take care. + + +## MongoDB + +- `IMongoDbRepositoryFilterer.AddGlobalFilters()` method is replaced with async one `IMongoDbRepositoryFilterer.AddGlobalFiltersAsync()` + +## Blazor UI +If you use Blazor WASM or Blazor Server UI, you should follow this section. + +### Blazorise 1.0 +We've upgraded to Blazorise 1.0 stable version. So there is some breaking changes that you have to apply in your project. + +Also You can review that pull request [#11649 - Blazorise 1.0 Migration](https://github.com/abpframework/abp/pull/11649) + +- `NumericEdit` is now made around the native `input type="number"` so a lot of its formating features are moved to the new `NumericPicker` component. Replace NumericEdit with NumericPicker. +- Rename `DecimalsSeparator` to `DecimalSeparator` on the `DataGridColumn` and `NumericPicker`. +- Rename `MaxMessageSize` to `MaxChunkSize`. +- Remove `Fullscreen` parameter on `` and replace it with `Size="ModalSize.Fullscreen"` parameter. +- Remove `NotificationType`, `Message`, and `Title` parameter from `` component. +- Move `RightAligned` parameter from `` to `` component. +- Rename any usage of the `ChangeTextOnKeyPress` parameter into `Immediate`. +- Rename any usage of `DelayTextOnKeyPress` parameter into `Debounce` and `DelayTextOnKeyPressInterval` into DebounceInterval. +- Replace all `Left` and `Right` enums with `Start` and `End` for the following enum types: `Direction`, `Float`, `Placement`, `NotificationLocation`, `Side`, `SnackbarLocation`, `SnackbarStackLocation`, `TabPosition`, and `TextAlignment`. +- Replace all `FromLeft`, `FromRight`, `RoundedLeft`, and `RoundedRight` enums with `FromStart`, `FromEnd`, `RoundedStart`, and `RoundedEnd` for the `Border` utilities. +- Replace all `FromLeft` and `FromRight` with `FromStart`, `FromEnd` for the Margin and `Padding` utilities. +- Replace all `AddLabel` with `AddLabels` method on chart instance. +- Change enum value from `None` to `Default` for the following enum types: `Color`, `Background`, `TextColor`, `Alignment`, `BorderRadius`, `BorderSize`, `Direction`, `DisplayDirection`, `FigureSize`, `IconSize`, `JustifyContent`, `OverflowType`, `SnackbarColor`, `Target`, `TextAlignment`, `TextOverflow`, `TextTransform`, `TextWeight`, `VerticalAlignment`, `Visibility`, `Size`, and `SnackbarLocation`. +- Obsolete typography parameters `Alignment`, `Color`, `Transform`, and `Weight` are removed in favor of `TextAlignment`, `TextColor`, `TextTransform`, and `TextWeight`. +- Remove any use of an obsolete component ``. +- The Datagrid's obsolete `Direction` parameter has now been removed. Instead, please use the `SortDirection` parameter if you weren't already.. +- Rename `` `Mode` parameter into `RenderMode`. + +> _Check out [Blazorise Release Notes](https://preview.blazorise.com/news/release-notes/100) for more information._ + +## MVC - Razor Pages UI + +If you use MVC Razor Pages UI, you should follow this section. + +### Client libraries +The `libs` folder no longer exists in templates after v5.2. That change greatly reduced the size of templates and brought some other advantages. + +You can use `abp install-libs` command for installing or updating client libraries. You should run this command after updating v5.2. + +> If you're creating a new project, you don't have to be concerned about it, ABP CLI installs client libraries after automatically. + +## See Also + +* [Official blog post for the 5.2 release](https://blog.abp.io/abp/ABP.IO-Platform-5-2-RC-Has-Been-Published) + diff --git a/docs/en/Migration-Guides/Index.md b/docs/en/Migration-Guides/Index.md index 909f6c0998..e2647d8b0e 100644 --- a/docs/en/Migration-Guides/Index.md +++ b/docs/en/Migration-Guides/Index.md @@ -1,5 +1,6 @@ # ABP Framework Migration Guides +- [5.1 to 5.2](Abp-5_2.md) - [4.x to 5.0](Abp-5_0.md) - [4.2 to 4.3](Abp-4_3.md) - [4.x to 4.2](Abp-4_2.md) diff --git a/docs/en/UI/AspNetCore/AutoComplete-Select.md b/docs/en/UI/AspNetCore/AutoComplete-Select.md new file mode 100644 index 0000000000..86d8c14b8a --- /dev/null +++ b/docs/en/UI/AspNetCore/AutoComplete-Select.md @@ -0,0 +1,71 @@ +# ASP.NET Core MVC / Razor Pages: Auto-Complete Select +A simple select component sometimes isn't useful with a huge amount of data. ABP Provides a select implementation that works with pagination and server-side search via using [Select2](https://select2.org/). It works with single or multiple choices well. + +A screenshot can be shown below. + +| Single | Multiple | +| --- | --- | +| ![autocomplete-select-example](../../images/abp-select2-single.png) |![autocomplete-select-example](../../images/abp-select2-multiple.png) | + +## Getting Started + +This is a core feature and it's used by the ABP Framework. There is no custom installation or additional packages required. + +## Usage + +A simple usage is presented below. + +```html + +``` + +The select must have the `auto-complete-select` class and the following attributes: + +- `data-autocomplete-api-url`: * API Endpoint url to get select items. **GET** request will be sent to this url. +- `data-autocomplete-display-property`: * Property name to display. _(For example: `name` or `title`. Property name of entity/dto.)_. +- `data-autocomplete-value-property`: * Identifier property name. _(For example: `id`)_. +- `data-autocomplete-items-property`: * Property name of collection in response object. _(For example: `items`)_ +- `data-autocomplete-filter-param-name`: * Filter text property name. _(For example: `filter`)_. +- `data-autocomplete-selected-item-name`: Text to display as selected item. +- `data-autocomplete-parent-selector`: jQuery selector expression for parent DOM. _(If it's in a modal, it's suggested to send the modal selector as this parameter)_. + +Also, selected value(s) should be defined with the ` diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Building/Steps/ConnectionStringChangeStep.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Building/Steps/ConnectionStringChangeStep.cs index 2292fed8e5..0f50a443e7 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Building/Steps/ConnectionStringChangeStep.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Building/Steps/ConnectionStringChangeStep.cs @@ -26,7 +26,7 @@ public class ConnectionStringChangeStep : ProjectBuildPipelineStep return; } - var newConnectionString = $"\"{DefaultConnectionStringKey}\": \"{context.BuildArgs.ConnectionString}\""; + var newConnectionString = $"\"{DefaultConnectionStringKey}\": \"{context.BuildArgs.ConnectionString.Replace(@"\\", @"\").Replace(@"\", @"\\")}\""; foreach (var appSettingsJson in appSettingsJsonFiles) { diff --git a/framework/src/Volo.Abp.EventBus.Azure/Volo/Abp/EventBus/Azure/AbpAzureEventBusOptions.cs b/framework/src/Volo.Abp.EventBus.Azure/Volo/Abp/EventBus/Azure/AbpAzureEventBusOptions.cs index a6aa2f9857..57fa4b7f48 100644 --- a/framework/src/Volo.Abp.EventBus.Azure/Volo/Abp/EventBus/Azure/AbpAzureEventBusOptions.cs +++ b/framework/src/Volo.Abp.EventBus.Azure/Volo/Abp/EventBus/Azure/AbpAzureEventBusOptions.cs @@ -7,4 +7,6 @@ public class AbpAzureEventBusOptions public string SubscriberName { get; set; } public string TopicName { get; set; } + + public bool IsServiceBusDisabled { get; set; } } diff --git a/framework/src/Volo.Abp.EventBus.Azure/Volo/Abp/EventBus/Azure/AbpEventBusAzureModule.cs b/framework/src/Volo.Abp.EventBus.Azure/Volo/Abp/EventBus/Azure/AbpEventBusAzureModule.cs index 64c8b2fcd3..129004c871 100644 --- a/framework/src/Volo.Abp.EventBus.Azure/Volo/Abp/EventBus/Azure/AbpEventBusAzureModule.cs +++ b/framework/src/Volo.Abp.EventBus.Azure/Volo/Abp/EventBus/Azure/AbpEventBusAzureModule.cs @@ -1,4 +1,5 @@ using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Options; using Volo.Abp.AzureServiceBus; using Volo.Abp.Modularity; @@ -19,9 +20,15 @@ public class AbpEventBusAzureModule : AbpModule public override void OnApplicationInitialization(ApplicationInitializationContext context) { - context - .ServiceProvider - .GetRequiredService() - .Initialize(); + var options = context.ServiceProvider.GetRequiredService>().Value; + + if (!options.IsServiceBusDisabled) + { + context + .ServiceProvider + .GetRequiredService() + .Initialize(); + } + } } diff --git a/framework/src/Volo.Abp.Settings/Volo/Abp/Settings/SettingEncryptionService.cs b/framework/src/Volo.Abp.Settings/Volo/Abp/Settings/SettingEncryptionService.cs index c44f5f7974..9f59f57910 100644 --- a/framework/src/Volo.Abp.Settings/Volo/Abp/Settings/SettingEncryptionService.cs +++ b/framework/src/Volo.Abp.Settings/Volo/Abp/Settings/SettingEncryptionService.cs @@ -1,4 +1,6 @@ using System; +using Microsoft.Extensions.Logging; +using Microsoft.Extensions.Logging.Abstractions; using Volo.Abp.DependencyInjection; using Volo.Abp.Security.Encryption; @@ -7,10 +9,12 @@ namespace Volo.Abp.Settings; public class SettingEncryptionService : ISettingEncryptionService, ITransientDependency { protected IStringEncryptionService StringEncryptionService { get; } + public ILogger Logger { get; set; } public SettingEncryptionService(IStringEncryptionService stringEncryptionService) { StringEncryptionService = stringEncryptionService; + Logger = NullLogger.Instance; } public virtual string Encrypt(SettingDefinition settingDefinition, string plainValue) @@ -30,6 +34,14 @@ public class SettingEncryptionService : ISettingEncryptionService, ITransientDep return encryptedValue; } - return StringEncryptionService.Decrypt(encryptedValue); + try + { + return StringEncryptionService.Decrypt(encryptedValue); + } + catch (Exception e) + { + Logger.LogException(e); + return string.Empty; + } } } diff --git a/modules/blogging/src/Volo.Blogging.Application/Volo/Blogging/Posts/PostAppService.cs b/modules/blogging/src/Volo.Blogging.Application/Volo/Blogging/Posts/PostAppService.cs index 457656291f..15506ecf70 100644 --- a/modules/blogging/src/Volo.Blogging.Application/Volo/Blogging/Posts/PostAppService.cs +++ b/modules/blogging/src/Volo.Blogging.Application/Volo/Blogging/Posts/PostAppService.cs @@ -231,11 +231,16 @@ namespace Volo.Blogging.Posts return url; } - private async Task SaveTags(ICollection newTags, Post post) + private async Task SaveTags(ICollection tags, Post post) { - await RemoveOldTags(newTags, post); - - await AddNewTags(newTags, post); + tags = tags + .Select(t => t.ToLowerInvariant()) + .Distinct() + .ToList(); + + await RemoveOldTags(tags, post); + + await AddNewTags(tags, post); } private async Task RemoveOldTags(ICollection newTags, Post post) diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/abp.resourcemapping.js b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/abp.resourcemapping.js index 82b2d4b649..26cdc6aad9 100644 --- a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/abp.resourcemapping.js +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/abp.resourcemapping.js @@ -7,6 +7,5 @@ module.exports = { "@libs" ], mappings: { - } } \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/GlobalResources/Index.cshtml b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/GlobalResources/Index.cshtml index b67a147baa..615ef31477 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/GlobalResources/Index.cshtml +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/GlobalResources/Index.cshtml @@ -2,6 +2,7 @@ @using Microsoft.AspNetCore.Mvc.Localization @using Volo.Abp.AspNetCore.Mvc.UI.Layout +@using Volo.Abp.AspNetCore.Mvc.UI.Packages.Codemirror @using Volo.CmsKit.Admin.Web.Pages.CmsKit.GlobalResources @using Volo.CmsKit.Admin.Web.Menus @using Volo.CmsKit.Localization @@ -17,8 +18,15 @@ PageLayout.Content.MenuItemName = CmsKitAdminMenus.GlobalResources.GlobalResourcesMenu; } +@section styles{ + +} + @section scripts { + + + diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/GlobalResources/index.js b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/GlobalResources/index.js index 72fb11e8dc..c58447b22d 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/GlobalResources/index.js +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/GlobalResources/index.js @@ -3,11 +3,26 @@ $(function (){ var service = volo.cmsKit.admin.globalResources.globalResourceAdmin; + var scriptEditor = CodeMirror.fromTextArea(document.getElementById("ScriptContent"),{ + mode:"javascript", + lineNumbers:true + }); + + var styleEditor = CodeMirror.fromTextArea(document.getElementById("StyleContent"),{ + mode:"css", + lineNumbers:true + }); + + $('.nav-tabs a').on('shown.bs.tab', function() { + scriptEditor.refresh(); + styleEditor.refresh(); + }); + $('#SaveResourcesButton').on('click','',function(){ service.setGlobalResources( { - style: $('#StyleContent').val(), - script: $('#ScriptContent').val() + style: styleEditor.getValue(), + script: scriptEditor.getValue() } ).then(function () { abp.message.success(l("SavedSuccessfully")); diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Pages/Create.cshtml b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Pages/Create.cshtml index 841576e761..4671cb2ca2 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Pages/Create.cshtml +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Pages/Create.cshtml @@ -1,6 +1,7 @@ @page @using System.Globalization +@using Volo.Abp.AspNetCore.Mvc.UI.Packages.Codemirror @using Volo.Abp.AspNetCore.Mvc.UI.Packages.TuiEditor @using Volo.Abp.AspNetCore.Mvc.UI.Packages.Uppy @using Volo.CmsKit.Admin.Web.Pages @@ -22,6 +23,9 @@ + + + @@ -31,6 +35,7 @@ @section styles { + } @@ -56,11 +61,11 @@ - + - + diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Pages/Update.cshtml b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Pages/Update.cshtml index 1271502946..499ad1b633 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Pages/Update.cshtml +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Pages/Update.cshtml @@ -1,6 +1,7 @@ @page "{Id}" @using System.Globalization +@using Volo.Abp.AspNetCore.Mvc.UI.Packages.Codemirror @using Volo.Abp.AspNetCore.Mvc.UI.Packages.TuiEditor @using Volo.Abp.AspNetCore.Mvc.UI.Packages.Uppy @using Volo.Abp.AspNetCore.Mvc.UI.Packages.Slugify @@ -23,6 +24,9 @@ + + + @@ -32,6 +36,7 @@ @section styles { + } diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Pages/create.js b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Pages/create.js index ffe37fe5a8..1de6021a7d 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Pages/create.js +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Pages/create.js @@ -6,22 +6,40 @@ $(function () { var $slug = $('#ViewModel_Slug'); var $buttonSubmit = $('#button-page-create'); + var scriptEditor = CodeMirror.fromTextArea(document.getElementById("ViewModel_Script"), { + mode: "javascript", + lineNumbers: true + }); + + var styleEditor = CodeMirror.fromTextArea(document.getElementById("ViewModel_Style"), { + mode: "css", + lineNumbers: true + }); + + $('.nav-tabs a').on('shown.bs.tab', function () { + scriptEditor.refresh(); + styleEditor.refresh(); + }); + $createForm.data('validator').settings.ignore = ":hidden, [contenteditable='true']:not([name]), .tui-popup-wrapper"; $createForm.on('submit', function (e) { e.preventDefault(); - + if ($createForm.valid()) { abp.ui.setBusy(); + $("#ViewModel_Style").val(styleEditor.getValue()); + $("#ViewModel_Script").val(scriptEditor.getValue()); + $createForm.ajaxSubmit({ success: function (result) { abp.notify.success(l('SuccessfullySaved')); abp.ui.clearBusy(); location.href = "../Pages"; }, - error: function(result){ + error: function (result) { abp.ui.clearBusy(); abp.notify.error(result.responseJSON.error.message); } diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Pages/update.js b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Pages/update.js index 99af38b70c..6bd90dd934 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Pages/update.js +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Pages/update.js @@ -7,6 +7,21 @@ $(function () { $formUpdate.data('validator').settings.ignore = ":hidden, [contenteditable='true']:not([name]), .tui-popup-wrapper"; + var scriptEditor = CodeMirror.fromTextArea(document.getElementById("ViewModel_Script"), { + mode: "javascript", + lineNumbers: true + }); + + var styleEditor = CodeMirror.fromTextArea(document.getElementById("ViewModel_Style"), { + mode: "css", + lineNumbers: true + }); + + $('.nav-tabs a').on('shown.bs.tab', function () { + scriptEditor.refresh(); + styleEditor.refresh(); + }); + $formUpdate.on('submit', function (e) { e.preventDefault(); @@ -14,6 +29,9 @@ $(function () { abp.ui.setBusy(); + $("#ViewModel_Style").val(styleEditor.getValue()); + $("#ViewModel_Script").val(scriptEditor.getValue()); + $formUpdate.ajaxSubmit({ success: function (result) { abp.notify.success(l('SuccessfullySaved')); diff --git a/npm/packs/cms-kit.admin/package.json b/npm/packs/cms-kit.admin/package.json index 528bdb3ac0..524583a187 100644 --- a/npm/packs/cms-kit.admin/package.json +++ b/npm/packs/cms-kit.admin/package.json @@ -8,7 +8,8 @@ "@abp/jstree": "~5.2.0-rc.1", "@abp/slugify": "~5.2.0-rc.1", "@abp/tui-editor": "~5.2.0-rc.1", - "@abp/uppy": "~5.2.0-rc.1" + "@abp/uppy": "~5.2.0-rc.1", + "@abp/codemirror": "~5.2.0-rc.1" }, "gitHead": "bb4ea17d5996f01889134c138d00b6c8f858a431" } diff --git a/npm/packs/codemirror/abp.resourcemapping.js b/npm/packs/codemirror/abp.resourcemapping.js index 71731c389b..d7f349b54a 100644 --- a/npm/packs/codemirror/abp.resourcemapping.js +++ b/npm/packs/codemirror/abp.resourcemapping.js @@ -1,5 +1,8 @@ module.exports = { mappings: { - "@node_modules/codemirror/lib/*.*": "@libs/codemirror/" + "@node_modules/codemirror/lib/*.*": "@libs/codemirror/", + "@node_modules/codemirror/mode/**/*.*": "@libs/codemirror/mode/", + "@node_modules/codemirror/theme/**/*.*": "@libs/codemirror/theme/", + "@node_modules/codemirror/addon/**/*.*": "@libs/codemirror/addon/" } } \ No newline at end of file diff --git a/npm/packs/jquery-form/abp.resourcemapping.js b/npm/packs/jquery-form/abp.resourcemapping.js index 259206e7ea..4ec5565b0c 100644 --- a/npm/packs/jquery-form/abp.resourcemapping.js +++ b/npm/packs/jquery-form/abp.resourcemapping.js @@ -1,6 +1,5 @@ module.exports = { mappings: { - "@node_modules/jquery-form/dist/jquery.form.min.js": "@libs/jquery-form/", - "@node_modules/jquery-form/dist/jquery.form.min.js.map": "@libs/jquery-form/" + "@node_modules/@abp/jquery-form/src/jquery.form.min.js": "@libs/jquery-form/" } } \ No newline at end of file diff --git a/npm/packs/jquery-form/src/jquery.form.min.js b/npm/packs/jquery-form/src/jquery.form.min.js new file mode 100644 index 0000000000..c794a23e13 --- /dev/null +++ b/npm/packs/jquery-form/src/jquery.form.min.js @@ -0,0 +1,22 @@ +/*! + * jQuery Form Plugin + * version: 4.3.0 + * Requires jQuery v1.7.2 or later + * Project repository: https://github.com/jquery-form/form + + * Copyright 2017 Kevin Morris + * Copyright 2006 M. Alsup + + * Dual licensed under the LGPL-2.1+ or MIT licenses + * https://github.com/jquery-form/form#license + + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + */ +!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof module&&module.exports?module.exports=function(t,r){return void 0===r&&(r="undefined"!=typeof window?require("jquery"):require("jquery")(t)),e(r),r}:e(jQuery)}(function(e){"use strict";var t=/\r?\n/g,r={};r.fileapi=void 0!==e('').get(0).files,r.formdata=void 0!==window.FormData;var a=!!e.fn.prop;function n(t){var r=t.data;t.isDefaultPrevented()||(t.preventDefault(),e(t.target).closest("form").ajaxSubmit(r))}function i(t){var r=t.target,a=e(r);if(!a.is("[type=submit],[type=image]")){var n=a.closest("[type=submit]");if(0===n.length)return;r=n[0]}var i=r.form;if(i.clk=r,"image"===r.type)if(void 0!==t.offsetX)i.clk_x=t.offsetX,i.clk_y=t.offsetY;else if("function"==typeof e.fn.offset){var o=a.offset();i.clk_x=t.pageX-o.left,i.clk_y=t.pageY-o.top}else i.clk_x=t.pageX-r.offsetLeft,i.clk_y=t.pageY-r.offsetTop;setTimeout(function(){i.clk=i.clk_x=i.clk_y=null},100)}function o(){if(e.fn.ajaxSubmit.debug){var t="[jquery.form] "+Array.prototype.join.call(arguments,"");window.console&&window.console.log?window.console.log(t):window.opera&&window.opera.postError&&window.opera.postError(t)}}e.fn.attr2=function(){if(!a)return this.attr.apply(this,arguments);var e=this.prop.apply(this,arguments);return e&&e.jquery||"string"==typeof e?e:this.attr.apply(this,arguments)},e.fn.ajaxSubmit=function(t,n,i,s){if(!this.length)return o("ajaxSubmit: skipping submit process - no element selected"),this;var u,c,l,f,d=this;"function"==typeof t?t={success:t}:"string"==typeof t||!1===t&&arguments.length>0?(t={url:t,data:n,dataType:i},"function"==typeof s&&(t.success=s)):void 0===t&&(t={}),u=t.method||t.type||this.attr2("method"),(l=(l="string"==typeof(c=t.url||this.attr2("action"))?e.trim(c):"")||window.location.href||"")&&(l=(l.match(/^([^#]+)/)||[])[1]),f=/(MSIE|Trident)/.test(navigator.userAgent||"")&&/^https/i.test(window.location.href||"")?"javascript:false":"about:blank",t=e.extend(!0,{url:l,success:e.ajaxSettings.success,type:u||e.ajaxSettings.type,iframeSrc:f},t);var m={};if(this.trigger("form-pre-serialize",[this,t,m]),m.veto)return o("ajaxSubmit: submit vetoed via form-pre-serialize trigger"),this;if(t.beforeSerialize&&!1===t.beforeSerialize(this,t))return o("ajaxSubmit: submit aborted via beforeSerialize callback"),this;var p=t.traditional;void 0===p&&(p=e.ajaxSettings.traditional);var h,v=[],g=this.formToArray(t.semantic,v,t.filtering);if(t.data){var x=e.isFunction(t.data)?t.data(g):t.data;t.extraData=x,h=e.param(x,p)}if(t.beforeSubmit&&!1===t.beforeSubmit(g,this,t))return o("ajaxSubmit: submit aborted via beforeSubmit callback"),this;if(this.trigger("form-submit-validate",[g,this,t,m]),m.veto)return o("ajaxSubmit: submit vetoed via form-submit-validate trigger"),this;var y=e.param(g,p);h&&(y=y?y+"&"+h:h),"GET"===t.type.toUpperCase()?(t.url+=(t.url.indexOf("?")>=0?"&":"?")+y,t.data=null):t.data=y;var b=[];if(t.resetForm&&b.push(function(){d.resetForm()}),t.clearForm&&b.push(function(){d.clearForm(t.includeHidden)}),!t.dataType&&t.target){var T=t.success||function(){};b.push(function(r,a,n){var i=arguments,o=t.replaceTarget?"replaceWith":"html";"html"==o&&(r=e.parseHTML(e("
").text(r).html())),e(t.target)[o](r).each(function(){T.apply(this,i)})})}else t.success&&(e.isArray(t.success)?e.merge(b,t.success):b.push(t.success));if(t.success=function(e,r,a){for(var n=t.context||this,i=0,o=b.length;i0,k="multipart/form-data",D=d.attr("enctype")===k||d.attr("encoding")===k,A=r.fileapi&&r.formdata;o("fileAPI :"+A);var F,L=(S||D)&&!A;!1!==t.iframe&&(t.iframe||L)?t.closeKeepAlive?e.get(t.closeKeepAlive,function(){F=M(g)}):F=M(g):F=(S||D)&&A?function(r){for(var a=new FormData,n=0;n',j)).css({position:"absolute",top:"-1000px",left:"-1000px"}),m=f[0],p={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(t){var r="timeout"===t?"timeout":"aborted";o("aborting upload... "+r),this.aborted=1;try{m.contentWindow.document.execCommand&&m.contentWindow.document.execCommand("Stop")}catch(e){}f.attr("src",s.iframeSrc),p.error=r,s.error&&s.error.call(s.context,p,r,t),c&&e.event.trigger("ajaxError",[p,s,r]),s.complete&&s.complete.call(s.context,p,r)}},(c=s.global)&&0==e.active++&&e.event.trigger("ajaxStart"),c&&e.event.trigger("ajaxSend",[p,s]),s.beforeSend&&!1===s.beforeSend.call(s.context,p,s))return s.global&&e.active--,T.reject(),T;if(p.aborted)return T.reject(),T;(h=b.clk)&&(g=h.name)&&!h.disabled&&(s.extraData=s.extraData||{},s.extraData[g]=h.value,"image"===h.type&&(s.extraData[g+".x"]=b.clk_x,s.extraData[g+".y"]=b.clk_y));var S=1,k=2;function D(e){var t=null;try{e.contentWindow&&(t=e.contentWindow.document)}catch(e){o("cannot get iframe.contentWindow document: "+e)}if(t)return t;try{t=e.contentDocument?e.contentDocument:e.document}catch(r){o("cannot get iframe.contentDocument: "+r),t=e.document}return t}var A=e("meta[name=csrf-token]").attr("content"),F=e("meta[name=csrf-param]").attr("content");function L(){var t=d.attr2("target"),r=d.attr2("action"),a=d.attr("enctype")||d.attr("encoding")||"multipart/form-data";b.setAttribute("target",l),u&&!/post/i.test(u)||b.setAttribute("method","POST"),r!==s.url&&b.setAttribute("action",s.url),s.skipEncodingOverride||u&&!/post/i.test(u)||d.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"}),s.timeout&&(y=setTimeout(function(){x=!0,C(S)},s.timeout));var n=[];try{if(s.extraData)for(var i in s.extraData)s.extraData.hasOwnProperty(i)&&(e.isPlainObject(s.extraData[i])&&s.extraData[i].hasOwnProperty("name")&&s.extraData[i].hasOwnProperty("value")?n.push(e('',j).val(s.extraData[i].value).appendTo(b)[0]):n.push(e('',j).val(s.extraData[i]).appendTo(b)[0]));s.iframeTarget||f.appendTo(w),m.attachEvent?m.attachEvent("onload",C):m.addEventListener("load",C,!1),setTimeout(function e(){try{var t=D(m).readyState;o("state = "+t),t&&"uninitialized"===t.toLowerCase()&&setTimeout(e,50)}catch(e){o("Server abort: ",e," (",e.name,")"),C(k),y&&clearTimeout(y),y=void 0}},15);try{b.submit()}catch(e){document.createElement("form").submit.apply(b)}}finally{b.setAttribute("action",r),b.setAttribute("enctype",a),t?b.setAttribute("target",t):d.removeAttr("target"),e(n).remove()}}F&&A&&(s.extraData=s.extraData||{},s.extraData[F]=A),s.forceSync?L():setTimeout(L,10);var E,M,O,X=50;function C(t){if(!p.aborted&&!O){if((M=D(m))||(o("cannot access response document"),t=k),t===S&&p)return p.abort("timeout"),void T.reject(p,"timeout");if(t===k&&p)return p.abort("server abort"),void T.reject(p,"error","server abort");if(M&&M.location.href!==s.iframeSrc||x){m.detachEvent?m.detachEvent("onload",C):m.removeEventListener("load",C,!1);var r,a="success";try{if(x)throw"timeout";var n="xml"===s.dataType||M.XMLDocument||e.isXMLDoc(M);if(o("isXml="+n),!n&&window.opera&&(null===M.body||!M.body.innerHTML)&&--X)return o("requeing onLoad callback, DOM not available"),void setTimeout(C,250);var i=M.body?M.body:M.documentElement;p.responseText=i?i.innerHTML:null,p.responseXML=M.XMLDocument?M.XMLDocument:M,n&&(s.dataType="xml"),p.getResponseHeader=function(e){return{"content-type":s.dataType}[e.toLowerCase()]},i&&(p.status=Number(i.getAttribute("status"))||p.status,p.statusText=i.getAttribute("statusText")||p.statusText);var u=(s.dataType||"").toLowerCase(),l=/(json|script|text)/.test(u);if(l||s.textarea){var d=M.getElementsByTagName("textarea")[0];if(d)p.responseText=d.value,p.status=Number(d.getAttribute("status"))||p.status,p.statusText=d.getAttribute("statusText")||p.statusText;else if(l){var h=M.getElementsByTagName("pre")[0],v=M.getElementsByTagName("body")[0];h?p.responseText=h.textContent?h.textContent:h.innerText:v&&(p.responseText=v.textContent?v.textContent:v.innerText)}}else"xml"===u&&!p.responseXML&&p.responseText&&(p.responseXML=q(p.responseText));try{E=_(p,u,s)}catch(e){a="parsererror",p.error=r=e||a}}catch(e){o("error caught: ",e),a="error",p.error=r=e||a}p.aborted&&(o("upload aborted"),a=null),p.status&&(a=p.status>=200&&p.status<300||304===p.status?"success":"error"),"success"===a?(s.success&&s.success.call(s.context,E,"success",p),T.resolve(p.responseText,"success",p),c&&e.event.trigger("ajaxSuccess",[p,s])):a&&(void 0===r&&(r=p.statusText),s.error&&s.error.call(s.context,p,a,r),T.reject(p,"error",r),c&&e.event.trigger("ajaxError",[p,s,r])),c&&e.event.trigger("ajaxComplete",[p,s]),c&&!--e.active&&e.event.trigger("ajaxStop"),s.complete&&s.complete.call(s.context,p,a),O=!0,s.timeout&&clearTimeout(y),setTimeout(function(){s.iframeTarget?f.attr("src",s.iframeSrc):f.remove(),p.responseXML=null},100)}}}var q=e.parseXML||function(e,t){return window.ActiveXObject?((t=new ActiveXObject("Microsoft.XMLDOM")).async="false",t.loadXML(e)):t=(new DOMParser).parseFromString(e,"text/xml"),t&&t.documentElement&&"parsererror"!==t.documentElement.nodeName?t:null},N=e.parseJSON||function(e){return window.console.error("jquery.parseJSON is undefined"),null},_=function(t,r,a){var n=t.getResponseHeader("content-type")||"",i=("xml"===r||!r)&&n.indexOf("xml")>=0,o=i?t.responseXML:t.responseText;return i&&"parsererror"===o.documentElement.nodeName&&e.error&&e.error("parsererror"),a&&a.dataFilter&&(o=a.dataFilter(o,r)),"string"==typeof o&&(("json"===r||!r)&&n.indexOf("json")>=0?o=N(o):("script"===r||!r)&&n.indexOf("javascript")>=0&&e.globalEval(o)),o};return T}},e.fn.ajaxForm=function(t,r,a,s){if(("string"==typeof t||!1===t&&arguments.length>0)&&(t={url:t,data:r,dataType:a},"function"==typeof s&&(t.success=s)),(t=t||{}).delegation=t.delegation&&e.isFunction(e.fn.on),!t.delegation&&0===this.length){var u={s:this.selector,c:this.context};return!e.isReady&&u.s?(o("DOM not ready, queuing ajaxForm"),e(function(){e(u.s,u.c).ajaxForm(t)}),this):(o("terminating; zero elements found by selector"+(e.isReady?"":" (DOM not ready)")),this)}return t.delegation?(e(document).off("submit.form-plugin",this.selector,n).off("click.form-plugin",this.selector,i).on("submit.form-plugin",this.selector,t,n).on("click.form-plugin",this.selector,t,i),this):(t.beforeFormUnbind&&t.beforeFormUnbind(this,t),this.ajaxFormUnbind().on("submit.form-plugin",t,n).on("click.form-plugin",t,i))},e.fn.ajaxFormUnbind=function(){return this.off("submit.form-plugin click.form-plugin")},e.fn.formToArray=function(t,a,n){var i=[];if(0===this.length)return i;var o,s,u,c,l,f,d,m,p=this[0],h=this.attr("id"),v=t||void 0===p.elements?p.getElementsByTagName("*"):p.elements;if(v&&(v=e.makeArray(v)),h&&(t||/(Edge|Trident)\//.test(navigator.userAgent))&&(o=e(':input[form="'+h+'"]').get()).length&&(v=(v||[]).concat(o)),!v||!v.length)return i;for(e.isFunction(n)&&(v=e.map(v,n)),s=0,d=v.length;s - - + + diff --git a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server/MyCompanyName.MyProjectName.Blazor.Server.csproj b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server/MyCompanyName.MyProjectName.Blazor.Server.csproj index 3b28660902..124902bb24 100644 --- a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server/MyCompanyName.MyProjectName.Blazor.Server.csproj +++ b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server/MyCompanyName.MyProjectName.Blazor.Server.csproj @@ -7,8 +7,8 @@ - - + + diff --git a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server/_Imports.razor b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server/_Imports.razor new file mode 100644 index 0000000000..fe27745143 --- /dev/null +++ b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server/_Imports.razor @@ -0,0 +1,13 @@ +@using System.Net.Http +@using Microsoft.AspNetCore.Authorization +@using Microsoft.AspNetCore.Components.Authorization +@using Microsoft.AspNetCore.Components.Forms +@using Microsoft.AspNetCore.Components.Routing +@using Microsoft.AspNetCore.Components.Web +@using Microsoft.AspNetCore.Components.Web.Virtualization +@using Microsoft.JSInterop +@using MyCompanyName.MyProjectName.Blazor.Server +@using Blazorise +@using Blazorise.DataGrid +@using Volo.Abp.BlazoriseUI +@using Volo.Abp.BlazoriseUI.Components \ No newline at end of file diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server.Tiered/MyCompanyName.MyProjectName.Blazor.Server.Tiered.csproj b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server.Tiered/MyCompanyName.MyProjectName.Blazor.Server.Tiered.csproj index 8e33d8e828..75c373acad 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server.Tiered/MyCompanyName.MyProjectName.Blazor.Server.Tiered.csproj +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server.Tiered/MyCompanyName.MyProjectName.Blazor.Server.Tiered.csproj @@ -13,8 +13,8 @@ - - + + diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server/MyCompanyName.MyProjectName.Blazor.Server.csproj b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server/MyCompanyName.MyProjectName.Blazor.Server.csproj index dffe94ce7d..89cc860ab6 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server/MyCompanyName.MyProjectName.Blazor.Server.csproj +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server/MyCompanyName.MyProjectName.Blazor.Server.csproj @@ -13,8 +13,8 @@ - - + + diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/MyCompanyName.MyProjectName.Blazor.csproj b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/MyCompanyName.MyProjectName.Blazor.csproj index 96e0925201..fe34414fa1 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/MyCompanyName.MyProjectName.Blazor.csproj +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/MyCompanyName.MyProjectName.Blazor.csproj @@ -8,8 +8,8 @@ - - + + diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Host/MyCompanyName.MyProjectName.Blazor.Host.csproj b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Host/MyCompanyName.MyProjectName.Blazor.Host.csproj index 092d9f461a..8e510431f4 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Host/MyCompanyName.MyProjectName.Blazor.Host.csproj +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Host/MyCompanyName.MyProjectName.Blazor.Host.csproj @@ -8,8 +8,8 @@ - - + + diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Server.Host/MyCompanyName.MyProjectName.Blazor.Server.Host.csproj b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Server.Host/MyCompanyName.MyProjectName.Blazor.Server.Host.csproj index 8c79116720..3ad973c9a7 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Server.Host/MyCompanyName.MyProjectName.Blazor.Server.Host.csproj +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Server.Host/MyCompanyName.MyProjectName.Blazor.Server.Host.csproj @@ -12,8 +12,8 @@ - - + +