Browse Source

Merge branch 'rel-5.0' into maliming/UnitOfWorkDbContextProvider

pull/10713/head
maliming 5 years ago
parent
commit
90f30251e1
No known key found for this signature in database GPG Key ID: 96224957E51C89E
  1. 717
      docs/en/Community-Articles/2021-11-29-Integrating-DevExpress-Reporting-To-ABP-MVC-Application/Integrating-DevExpress-Reporting-To-ABP-MVC-Application.md
  2. BIN
      docs/en/Community-Articles/2021-11-29-Integrating-DevExpress-Reporting-To-ABP-MVC-Application/bundle-hierarchy.png
  3. BIN
      docs/en/Community-Articles/2021-11-29-Integrating-DevExpress-Reporting-To-ABP-MVC-Application/bundling-folders.png
  4. BIN
      docs/en/Community-Articles/2021-11-29-Integrating-DevExpress-Reporting-To-ABP-MVC-Application/data-source.png
  5. BIN
      docs/en/Community-Articles/2021-11-29-Integrating-DevExpress-Reporting-To-ABP-MVC-Application/initial-project.png
  6. BIN
      docs/en/Community-Articles/2021-11-29-Integrating-DevExpress-Reporting-To-ABP-MVC-Application/result.gif
  7. BIN
      docs/en/Community-Articles/2021-11-29-Integrating-DevExpress-Reporting-To-ABP-MVC-Application/wwwroot-lib.png
  8. 2
      docs/en/Entity-Framework-Core-Oracle-Devart.md
  9. 2
      docs/en/Entity-Framework-Core-Oracle-Official.md
  10. 26
      docs/en/Road-Map.md
  11. 3
      docs/en/Samples/eShopOnAbp/Index.md
  12. 58
      docs/en/Tutorials/Todo/Index.md
  13. 23
      docs/en/UI/Angular/List-Service.md
  14. 4
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/wwwroot/libs/abp/aspnetcore-mvc-ui-theme-shared/bootstrap/dom-event-handlers.js
  15. 16
      framework/src/Volo.Abp.BlobStoring.Minio/Volo/Abp/BlobStoring/Minio/MinioBlobProvider.cs
  16. 13
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/NewCommand.cs
  17. 8
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/ProjectCreationCommandBase.cs
  18. 2
      framework/src/Volo.Abp.EventBus.Azure/Volo/Abp/EventBus/Azure/AzureDistributedEventBus.cs
  19. 5
      framework/src/Volo.Abp.Json/Volo/Abp/Json/SystemTextJson/JsonConverters/AbpHasExtraPropertiesJsonConverter.cs
  20. 4
      framework/test/Volo.Abp.MemoryDb.Tests/Volo/Abp/MemoryDb/JsonConverters/EntityJsonConverter.cs
  21. 2
      modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Shared/Styles/blog.css
  22. 2
      modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Shared/Styles/blog.min.css
  23. 2
      modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Menus/MenuItems/CreateModal.cshtml
  24. 2
      modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Menus/MenuItems/UpdateModal.cshtml
  25. 1
      modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Menus/MenuItems/createModal.js
  26. 1
      modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Menus/MenuItems/updateModal.js
  27. 11
      modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Commenting/Default.cshtml
  28. 2
      modules/feature-management/src/Volo.Abp.FeatureManagement.Application.Contracts/Volo/Abp/FeatureManagement/JsonConverters/SelectionStringValueItemSourceJsonConverter.cs
  29. 6
      modules/feature-management/src/Volo.Abp.FeatureManagement.Application.Contracts/Volo/Abp/FeatureManagement/JsonConverters/StringValueTypeJsonConverter.cs
  30. 2
      modules/feature-management/src/Volo.Abp.FeatureManagement.Application.Contracts/Volo/Abp/FeatureManagement/JsonConverters/ValueValidatorJsonConverter.cs
  31. 6
      modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor/Pages/TenantManagement/TenantManagement.razor.cs
  32. 4
      npm/ng-packs/apps/dev-app/src/polyfills.ts
  33. 7
      npm/ng-packs/package.json
  34. 2
      npm/ng-packs/packages/components/package.json
  35. 2
      npm/ng-packs/packages/theme-shared/package.json
  36. 947
      npm/ng-packs/yarn.lock

717
docs/en/Community-Articles/2021-11-29-Integrating-DevExpress-Reporting-To-ABP-MVC-Application/Integrating-DevExpress-Reporting-To-ABP-MVC-Application.md

@ -0,0 +1,717 @@
# Integrating DevExpress ASP.NET Core Reporting to ABP MVC Application
In this step by step article, I will demonstrate how to integrate DevExpress Reporting [DocumentViewer](https://docs.devexpress.com/XtraReports/400248/web-reporting/asp-net-core-reporting/document-viewer-in-asp-net-core-applications) and [End-User Report Designer](https://docs.devexpress.com/XtraReports/400249/web-reporting/asp-net-core-reporting/end-user-report-designer-in-asp-net-core-applications) components to an existing ABP application. We will also create core bundling packages for styling, DevExpress javascript components and also DocumentViewer specific bundling packages.
## Create the Project (Optional)
ABP Framework offers startup templates to get to business faster. We can download a new startup template using [ABP CLI](https://docs.abp.io/en/abp/latest/CLI):
````bash
abp new Acme.BookStore
````
After the download is finished, open the solution in Visual Studio (or your favorite IDE):
![initial-project](initial-project.png)
Run the `Acme.BookStore.DbMigrator` application to create the database and seed the initial data (which creates the admin user, admin role, related permissions, etc). Then we can run the `Acme.BookStore.Web` project to see our application working.
> _Default admin username is **admin** and password is **1q2w3E\***_
## Installing Packages
You can also follow [this documentation](https://js.devexpress.com/Documentation/17_1/Guide/ASP.NET_MVC_Controls/Prerequisites_and_Installation/) to install DevExpress packages into your computer. We will be installing both nuget references and npm references.
> Don't forget to add _"DevExpress NuGet Feed"_ to your **Nuget Package Sources**.
### Adding NuGet Packages
- Add the `<PackageReference Include="DevExtreme.AspNet.Core" Version="21.2.3" />` NuGet package reference to the **Acme.BookStore.Application.Contracts.csproj**. Or run
```csharp
Install-Package DevExtreme.AspNet.Core
```
command under **Acme.BookStore.Application.Contracts** project.
- Add the `<PackageReference Include="DevExpress.AspNetCore.Reporting" Version="21.2.3" />` NuGet package reference to the **Acme.BookStore.Web.csproj**. Or run
```csharp
Install-Package DevExpress.AspNetCore.Reporting
```
command under the **Acme.BookStore.Web** project. **Note:** You need a commercial license to use this package.
### Adding NPM Packages
Open your `Acme.BookStore.Web` project folder with a command line. Add **devextreme** and [other required third party NPM packages](https://docs.devexpress.com/XtraReports/401763/web-reporting/asp-net-core-reporting/end-user-report-designer-in-asp-net-applications/quick-start/add-an-end-user-report-designer-to-an-aspnet-core-application):
- `npm install devexpress-reporting @devexpress/analytics-core devextreme`
- `npm install globalize jquery-ui-dist cldrjs`
At the end, your `package.json` should look as shown below:
```json
{
"version": "1.0.0",
"name": "my-app",
"private": true,
"dependencies": {
"@abp/aspnetcore.mvc.ui.theme.basic": "^5.0.0-rc.1",
"@devexpress/analytics-core": "^21.2.3",
"cldrjs": "^0.5.5",
"devexpress-reporting": "^21.2.3",
"devextreme": "^21.2.3",
"globalize": "^1.7.0",
"jquery-ui-dist": "^1.12.1"
}
}
```
### Adding Resource Mappings
The `devextreme` and third party NPM packages will be saved under the `node_modules` folder. We need to move the needed files in our `wwwroot/libs` folder to use them in the web project. We can do it using the ABP [client side resource mapping](https://docs.abp.io/en/abp/latest/UI/AspNetCore/Client-Side-Package-Management) system.
Open the `abp.resourcemapping.js` file in your `Acme.BookStore.Web` project and add definitions inside the `mappings` object so the final `abp.resourcemapping.js` file can look as shown below:
```javascript
module.exports = {
aliases: {
},
mappings: {
"@node_modules/devextreme/dist/**/*": "@libs/devextreme/",
"@node_modules/jquery-ui-dist/jquery-ui.min.js": "@libs/devextreme/js/",
"@node_modules/@devexpress/analytics-core/dist/**/*": "@libs/devexpress-analytics-core/",
"@node_modules/devexpress-reporting/dist/**/*": "@libs/devexpress-reporting/",
"@node_modules/knockout/build/output/knockout-latest.js":"@libs/devexpress-reporting/js/",
"@node_modules/cldrjs/dist/cldr.js":"@libs/devexpress-reporting/cldrjs/",
"@node_modules/cldrjs/dist/cldr/event.js":"@libs/devexpress-reporting/cldrjs/",
"@node_modules/cldrjs/dist/cldr/supplemental.js":"@libs/devexpress-reporting/cldrjs/",
"@node_modules/cldrjs/dist/cldr/unresolved.js":"@libs/devexpress-reporting/cldrjs/",
"@node_modules/globalize/dist/globalize.js":"@libs/devexpress-reporting/globalize/",
"@node_modules/globalize/dist/globalize/message.js":"@libs/devexpress-reporting/globalize/",
"@node_modules/globalize/dist/globalize/number.js":"@libs/devexpress-reporting/globalize/",
"@node_modules/globalize/dist/globalize/currency.js":"@libs/devexpress-reporting/globalize/",
"@node_modules/globalize/dist/globalize/date.js":"@libs/devexpress-reporting/globalize/",
"@node_modules/ace-builds/src-min-noconflict/ace.js":"@libs/devexpress-reporting/ace-builds/",
"@node_modules/ace-builds/src-min-noconflict/ext-language_tools.js":"@libs/devexpress-reporting/ace-builds/",
"@node_modules/ace-builds/src-min-noconflict/theme-dreamweaver.js":"@libs/devexpress-reporting/ace-builds/",
"@node_modules/ace-builds/src-min-noconflict/theme-ambiance.js":"@libs/devexpress-reporting/ace-builds/",
"@node_modules/ace-builds/src-min-noconflict/snippets/text.js":"@libs/devexpress-reporting/ace-builds/"
}
};
```
Open your `Acme.BookStore.Web` project folder with a command line and run the `abp install-libs` command. This command will copy the needed library files into the `/wwwroot/libs/devextreme/` folder.
````bash
abp install-libs
````
You can see `devextreme`, `devexpress-reporting` and `devexpress-analytics-core` folders inside the `wwwroot/libs`:
![wwwroot-lib](wwwroot-lib.png)
## Bundling
We will create [bundle contributors](https://docs.abp.io/en/abp/latest/UI/AspNetCore/Bundling-Minification) to add the devextreme css and javascript files for DevExpress [DocumentViewer](https://docs.devexpress.com/XtraReports/400248/web-reporting/asp-net-core-reporting/document-viewer-in-asp-net-core-applications) and [End-User Report Designer](https://docs.devexpress.com/XtraReports/400249/web-reporting/asp-net-core-reporting/end-user-report-designer-in-asp-net-core-applications) components.
To utilize bundling better, we will create hierarchical contributors for both styles and scripts as seen below:
![bundle-hierarchy](bundle-hierarchy.png)
It is recommended to follow this hierarchy because some of the scripts and styles need to be added before one another. Once you grab the relations between the dependent scripts and styles, you are free to modify the `Bundling hierarchy` as you desire and re-use the contributors for other DevExpress components.
We'll start with creating folders in the `Acme.BookStore.Web` project starting with a folder named **Bundling**. Create the following folders for future usage:
- Create a `Common` folder under `Bundling` folder
- Create a `Reporting` folder under `Bundling` folder
- Create a `ThirdParty` folder under `Reporting ` folder
- Create a `DocumentViewer` folder under `Reporting ` folder
- Create a `DocumentDesigner` folder under `Reporting ` folder
At the end, you should have a folder structure as shown below:
![bundling-folders](bundling-folders.png)
With this structured foldering, you can easily add other devexpress components in an isolated and maintained way.
### Adding the Common Style Contributor
Create a `DevExtremeCommonStyleContributor.cs` file under the `Bundling/Common` folder with the following content:
```csharp
using System.Collections.Generic;
using Volo.Abp.AspNetCore.Mvc.UI.Bundling;
namespace Acme.BookStore.Web.Bundling.Common;
public class DevExtremeCommonStyleContributor : BundleContributor
{
public override void ConfigureBundle(BundleConfigurationContext context)
{
context.Files.AddIfNotContains("/libs/devextreme/css/dx.common.css");
context.Files.AddIfNotContains("/libs/devextreme/css/dx.light.css");
}
}
```
> You can choose other themes than the light theme. Check the `/libs/devextreme/css/` folder and the DevExtreme documentation for other themes.
Now we will add the common bundle to the global style bundles. Open your `Acme.BookStoreWebModule.cs` file in your `Acme.BookStore.Web` project and add the following code into the `ConfigureServices` method:
```csharp
Configure<AbpBundlingOptions>(options =>
{
options
.StyleBundles
.Get(StandardBundles.Styles.Global)
.AddContributors(typeof(DevExtremeCommonStyleContributor));
});
```
### Adding the Document Viewer Style Contributor
Create a `DevExpressDocumentViewerStyleContributor.cs` file under the `Bundling/Reporting/DocumentViewer` folder with the following content:
```csharp
using System.Collections.Generic;
using Acme.BookStore.Web.Bundling.Common;
using Volo.Abp.AspNetCore.Mvc.UI.Bundling;
using Volo.Abp.Modularity;
namespace Acme.BookStore.Web.Bundling.Reporting.DocumentViewer;
[DependsOn(
typeof(DevExtremeCommonStyleContributor)
)]
public class DevExpressDocumentViewerStyleContributor : BundleContributor
{
public override void ConfigureBundle(BundleConfigurationContext context)
{
context.Files.AddIfNotContains("/libs/devexpress-reporting/css/dx-reporting-skeleton-screen.css");
context.Files.AddIfNotContains("/libs/devexpress-analytics-core/css/dx-analytics.common.css");
context.Files.AddIfNotContains("/libs/devexpress-analytics-core/css/dx-analytics.light.css");
context.Files.AddIfNotContains("/libs/devexpress-reporting/css/dx-webdocumentviewer.css");
}
}
```
### Adding the Document Designer Style Contributor
Create a `DevExtremeDocumentDesignerStyleContributor.cs` file under the `Bundling/Reporting/DocumentDesigner` folder with the following content:
```csharp
using System.Collections.Generic;
using Acme.BookStore.Web.Bundling.Reporting.DocumentViewer;
using Volo.Abp.AspNetCore.Mvc.UI.Bundling;
using Volo.Abp.Modularity;
namespace Acme.BookStore.Web.Bundling.Reporting.DocumentDesigner;
[DependsOn(
typeof(DevExtremeDocumentViewerStyleContributor)
)]
public class DevExtremeDocumentDesignerStyleContributor : BundleContributor
{
public override void ConfigureBundle(BundleConfigurationContext context)
{
context.Files.AddIfNotContains("/libs/devexpress-analytics-core/css/dx-querybuilder.css");
context.Files.AddIfNotContains("/libs/devexpress-reporting/css/dx-reportdesigner.css");
}
}
```
### Adding the Reporting Common Script Contributor
Create a `DevExtremeReportingCommonScriptContributor.cs` file under the `Bundling/Common` folder with the following content:
```csharp
using System.Collections.Generic;
using Volo.Abp.AspNetCore.Mvc.UI.Bundling;
using Volo.Abp.AspNetCore.Mvc.UI.Packages.JQuery;
using Volo.Abp.Modularity;
namespace Acme.BookStore.Web.Bundling.Common;
[DependsOn(
typeof(JQueryScriptContributor)
)]
public class DevExtremeReportingCommonScriptContributor : BundleContributor
{
public override void ConfigureBundle(BundleConfigurationContext context)
{
context.Files.AddIfNotContains("/libs/devextreme/js/jquery-ui.min.js");
context.Files.AddIfNotContains("/libs/devexpress-reporting/js/knockout-latest.js");
context.Files.AddIfNotContains("/libs/devextreme/js/dx.all.js"); // Has to be added after jquery and knockout
}
}
```
The `DevExtremeReportingCommonScriptContributor` depends on the `JQueryScriptContributor` which adds JQuery related files before the DevExpress packages (see the [bundling system](https://docs.abp.io/en/abp/latest/UI/AspNetCore/Bundling-Minification) for details).
> Since not all of the components of DevExtreme use scripts like `knockout.js` and `jquery-ui.js`, we used *ReportingCommon* naming. You can choose another name or a *Common* contributor by only adding `dx.all.js`.
### Adding the Third Party Script Contributor
Create a `DevExpressReportingThirdPartyScriptContributor.cs` file under the `Bundling/Reporting/ThirdParty` folder with the following content:
```csharp
using System.Collections.Generic;
using Acme.BookStore.Web.Bundling.Common;
using Volo.Abp.AspNetCore.Mvc.UI.Bundling;
using Volo.Abp.Modularity;
namespace Acme.BookStore.Web.Bundling.Reporting.ThirdParty;
[DependsOn(
typeof(DevExtremeReportingCommonScriptContributor)
)]
public class DevExpressReportingThirdPartyScriptContributor : BundleContributor
{
public override void ConfigureBundle(BundleConfigurationContext context)
{
// cldrj related scripts
context.Files.AddIfNotContains("/libs/devexpress-reporting/cldrjs/cldr.js");
context.Files.AddIfNotContains("/libs/devexpress-reporting/cldrjs/event.js");
context.Files.AddIfNotContains("/libs/devexpress-reporting/cldrjs/supplemental.js");
context.Files.AddIfNotContains("/libs/devexpress-reporting/cldrjs/unresolved.js");
// globalize related scripts
context.Files.AddIfNotContains("/libs/devexpress-reporting/globalize/globalize.js");
context.Files.AddIfNotContains("/libs/devexpress-reporting/globalize/currency.js");
context.Files.AddIfNotContains("/libs/devexpress-reporting/globalize/date.js");
context.Files.AddIfNotContains("/libs/devexpress-reporting/globalize/message.js");
context.Files.AddIfNotContains("/libs/devexpress-reporting/globalize/number.js");
// ace-builds related scripts
context.Files.AddIfNotContains("/libs/devexpress-reporting/ace-builds/ace.js");
context.Files.AddIfNotContains("/libs/devexpress-reporting/ace-builds/ext-language_tools.js");
context.Files.AddIfNotContains("/libs/devexpress-reporting/ace-builds/theme-ambiance.js");
context.Files.AddIfNotContains("/libs/devexpress-reporting/ace-builds/theme-dreamweaver.js");
context.Files.AddIfNotContains("/libs/devexpress-reporting/ace-builds/text.js");
}
}
```
The `DevExpressReportingThirdPartyScriptContributor` depends on the newly created `DevExtremeReportingCommonScriptContributor` which adds the specified scripts before third party scripts.
### Adding the Document Viewer Script Contributor
Create a `DevExpressDocumentViewerScriptContributor.cs` file under the `Bundling/Reporting/DocumentViewer` folder with the following content:
```csharp
using System.Collections.Generic;
using Acme.BookStore.Web.Bundling.Reporting.ThirdParty;
using Volo.Abp.AspNetCore.Mvc.UI.Bundling;
using Volo.Abp.Modularity;
namespace Acme.BookStore.Web.Bundling.Reporting.DocumentViewer;
[DependsOn(typeof(DevExpressReportingThirdPartyScriptContributor))]
public class DevExpressDocumentViewerScriptContributor : BundleContributor
{
public override void ConfigureBundle(BundleConfigurationContext context)
{
context.Files.AddIfNotContains("/libs/devexpress-analytics-core/js/dx-analytics-core.min.js");
context.Files.AddIfNotContains("/libs/devexpress-reporting/js/dx-webdocumentviewer.min.js");
}
}
```
Note that the `DevExpressDocumentViewerScriptContributor` depends on the newly created `DevExpressReportingThirdPartyScriptContributor`.
### Adding the Document Designer Script Contributor
```csharp
using System.Collections.Generic;
using Acme.BookStore.Web.Bundling.Reporting.DocumentViewer;
using Volo.Abp.AspNetCore.Mvc.UI.Bundling;
using Volo.Abp.Modularity;
namespace Acme.BookStore.Web.Bundling.Reporting.DocumentDesigner;
[DependsOn(
typeof(DevExpressDocumentViewerScriptContributor)
)]
public class DevExpressDocumentDesignerScriptContributor : BundleContributor
{
public override void ConfigureBundle(BundleConfigurationContext context)
{
context.Files.AddIfNotContains("/libs/devexpress-analytics-core/js/dx-querybuilder.min.js");
context.Files.AddIfNotContains("/libs/devexpress-reporting/js/dx-reportdesigner.min.js");
}
}
```
## End User Report Designer Integration
> You are free to create your desired pages and rooting. This sample will be creating a **Designer** page to demonstrate the layout for the DevExpress reporting components individually.
Create a `Reporting` folder under `Pages` in the `Acme.BookStore.Web` project .
### Adding a Document Designer Page
Create a `Designer.cshtml` Razor page under the `Pages/Reporting` folder and add the following:
```csharp
@page
@using Acme.BookStore.Web.Bundling.Reporting.DocumentDesigner
@using DevExpress.AspNetCore
@model Acme.BookStore.Web.Pages.Reporting.Designer
@{
var designerRender = Html.DevExpress().ReportDesigner("reportDesigner")
.Height("1000px");
@designerRender.RenderHtml()
}
@section Scripts {
<abp-style type="typeof(DevExpressDocumentDesignerStyleContributor)"/>
<abp-script type="typeof(DevExpressDocumentDesignerScriptContributor)"/>
@designerRender.RenderScripts()
}
```
### Adding Controllers
Create a `Controllers` folder and add a `ReportingController.cs` file to contain customized controllers for reporting endpoints:
```csharp
using DevExpress.AspNetCore.Reporting.QueryBuilder;
using DevExpress.AspNetCore.Reporting.QueryBuilder.Native.Services;
using DevExpress.AspNetCore.Reporting.ReportDesigner;
using DevExpress.AspNetCore.Reporting.ReportDesigner.Native.Services;
using DevExpress.AspNetCore.Reporting.WebDocumentViewer;
using DevExpress.AspNetCore.Reporting.WebDocumentViewer.Native.Services;
namespace Acme.BookStore.Web.Controllers;
public class CustomWebDocumentViewerController : WebDocumentViewerController
{
public CustomWebDocumentViewerController(IWebDocumentViewerMvcControllerService controllerService)
: base(controllerService)
{
}
}
public class CustomReportDesignerController : ReportDesignerController
{
public CustomReportDesignerController(IReportDesignerMvcControllerService controllerService)
: base(controllerService)
{
}
}
public class CustomQueryBuilderController : QueryBuilderController
{
public CustomQueryBuilderController(IQueryBuilderMvcControllerService controllerService)
: base(controllerService)
{
}
}
```
### Service Configuration and Midware Update
Update the `ConfigureServices` method of the `BookStoreWebModule.cs` file in **Acme.BookStore.Web** project with the following:
```csharp
context.Services.AddDevExpressControls();
context.Services.AddTransient<CustomReportDesignerController>();
context.Services.AddTransient<CustomQueryBuilderController>();
context.Services.AddTransient<CustomWebDocumentViewerController>();
// UnComment this line if you want to use report storage which is used for menus like "Save as" etc.
//context.Services.AddScoped<ReportStorageWebExtension, CustomReportStorageWebExtension>();
```
Add `UseDevExpressControls` before `UseConfiguredEndpoints` in `OnApplicationInitialization` as the following:
```csharp
...
app.UseDevExpressControls();
app.UseCorrelationId();
...
```
### Adding Custom Report Storage (Optional)
Create `CustomReportStorageWebExtension.cs` under the **Acme.BookStore.Web** project as below:
```csharp
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using DevExpress.XtraReports.UI;
using Microsoft.AspNetCore.Hosting;
namespace Acme.BookStore.Web;
public class CustomReportStorageWebExtension : DevExpress.XtraReports.Web.Extensions.ReportStorageWebExtension
{
readonly string ReportDirectory;
const string FileExtension = ".repx";
public CustomReportStorageWebExtension(IWebHostEnvironment env)
{
ReportDirectory = Path.Combine(env.ContentRootPath, "Reports");
if (!Directory.Exists(ReportDirectory))
{
Directory.CreateDirectory(ReportDirectory);
}
}
public override bool CanSetData(string url)
{
return true;
}
public override bool IsValidUrl(string url)
{
return true;
}
public override byte[] GetData(string url)
{
try
{
if (Directory.EnumerateFiles(ReportDirectory).Select(Path.GetFileNameWithoutExtension).Contains(url))
{
return File.ReadAllBytes(Path.Combine(ReportDirectory, url + FileExtension));
}
if (ReportsFactory.Reports.ContainsKey(url))
{
using (MemoryStream ms = new MemoryStream())
{
ReportsFactory.Reports[url]().SaveLayoutToXml(ms);
return ms.ToArray();
}
}
throw new DevExpress.XtraReports.Web.ClientControls.FaultException(
string.Format("Could not find report '{0}'.", url));
}
catch (Exception)
{
throw new DevExpress.XtraReports.Web.ClientControls.FaultException(
string.Format("Could not find report '{0}'.", url));
}
}
public override Dictionary<string, string> GetUrls()
{
return Directory.GetFiles(ReportDirectory, "*" + FileExtension)
.Select(Path.GetFileNameWithoutExtension)
.Concat(ReportsFactory.Reports.Select(x => x.Key))
.ToDictionary<string, string>(x => x);
}
public override void SetData(XtraReport report, string url)
{
report.SaveLayoutToXml(Path.Combine(ReportDirectory, url + FileExtension));
}
public override string SetNewData(XtraReport report, string defaultUrl)
{
SetData(report, defaultUrl);
return defaultUrl;
}
}
public class ReportsFactory
{
public static Dictionary<string, Func<XtraReport>> Reports { get; set; }
}
```
> You can check more about it at [DevExpress Report Storage documentation](https://docs.devexpress.com/XtraReports/400211/web-reporting/asp-net-core-reporting/end-user-report-designer-in-asp-net-applications/add-a-report-storage).
### Adding a DataSource To Designer
Update `Designer.cshtml.cs` under `Pages/Reporting` in the **Acme.BookStore.Web** project with the following:
```csharp
using System;
using System.Collections.Generic;
using DevExpress.DataAccess.ConnectionParameters;
using DevExpress.DataAccess.Json;
using DevExpress.DataAccess.Sql;
using DevExpress.XtraReports.UI;
using Microsoft.AspNetCore.Mvc.RazorPages;
namespace Acme.BookStore.Web.Pages.Reporting;
public class Designer : PageModel
{
public ReportDesignerModel DesignerModel { get; set; }
public void OnGet()
{
// Create a SQL data source.
// MsSqlConnectionParameters parameters = new MsSqlConnectionParameters("localhost",
// "dbName", "userName", "password", MsSqlAuthorizationType.SqlServer);
// SqlDataSource dataSource = new SqlDataSource(parameters);
// SelectQuery query = SelectQueryFluentBuilder.AddTable("Products").SelectAllColumnsFromTable().Build("Products");
// dataSource.Queries.Add(query);
// dataSource.RebuildResultSchema();
// Create a JSON data source.
JsonDataSource jsonDataSource = new JsonDataSource();
jsonDataSource.JsonSource = new UriJsonSource(new Uri("https://raw.githubusercontent.com/DevExpress-Examples/DataSources/master/JSON/customers.json"));
jsonDataSource.Fill();
DesignerModel = new ReportDesignerModel
{
Report = new XtraReport(),
DataSources = new Dictionary<string, object>()
};
// DesignerModel.DataSources.Add("BookStoreDb", dataSource);
DesignerModel.DataSources.Add("JsonDataSource", jsonDataSource);
}
public class ReportDesignerModel
{
public XtraReport Report { get; set; }
public Dictionary<string, object> DataSources { get; set; }
}
}
```
This will allow binding the `data-source` for your report designer. Also update `Designer.cshtml` to use these data sources:
```csharp
@{
var designerRender = Html.DevExpress().ReportDesigner("reportDesigner")
.Height("1000px")
.Bind(Model.DesignerModel.Report)
.DataSources(configureDS =>
{
foreach (var ds in Model.DesignerModel.DataSources)
{
configureDS.Add(ds.Key, ds.Value);
}
});
@designerRender.RenderHtml()
}
```
You can now see the **Add New DataSource** icon in the Field List:
![data-source](data-source.png)
> You can check [DevExpress Reporting Use Data Sources and Connections documentations](https://docs.devexpress.com/XtraReports/401896/web-reporting/asp-net-core-reporting/end-user-report-designer-in-asp-net-applications/use-data-sources-and-connections) for more information.
## Document Viewer Integration
> You are free to create your desired pages and rooting. This sample will be creating a **Viewer** page to demonstrate the layout for the DevExpress reporting components individually.
Since End User Report Designer already implements the required controllers for features, you should only add a new page for document viewing.
### Adding a Document Viewer Page
Create a `Viewer.cshtml` Razor page under the `Pages/Reporting` folder and add the following:
```csharp
@page
@using Acme.BookStore.Web.Bundling.Reporting.DocumentViewer
@using DevExpress.AspNetCore
@model Acme.BookStore.Web.Pages.Reporting.Viewer
@{
var viewerRender = Html.DevExpress().WebDocumentViewer("DocumentViewer")
.Height("1000px")
.Bind("TestReport");
@viewerRender.RenderHtml()
}
@section Scripts {
<abp-style type="typeof(DevExpressDocumentViewerStyleContributor)"/>
<abp-script type="typeof(DevExpressDocumentViewerScriptContributor)"/>
@viewerRender.RenderScripts()
}
```
> Note: `TestReport.repx` file must be found under `Reports` folder in **Acme.BookStore.Web** project.
### Adding the Antiforgery Token or Passing Bearer Token
While exporting data, you may come across **HTTP 400** error which logs as `[ERR] The required antiforgery request token was not provided in either form field "__RequestVerificationToken" or header value "RequestVerificationToken".` Or you may want to pass **Bearer Token**.
To add these functionalities, update the `Viewer.cshtml` file under the `Pages/Reporting` folder in the **Acme.BookStore.Web** project as shown below:
```csharp
@page
@using Acme.BookStore.Web.Bundling.Reporting.DocumentViewer
@using DevExpress.AspNetCore
@model Acme.BookStore.Web.Pages.Reporting.Viewer
@inject Microsoft.AspNetCore.Antiforgery.IAntiforgery Xsrf
@functions{
public string GetAntiXsrfRequestToken()
{
return Xsrf.GetAndStoreTokens(HttpContext).RequestToken;
}
}
<script type="text/javascript">
function SetupJwt(bearerToken, xsrf) {
DevExpress.Analytics.Utils.ajaxSetup.ajaxSettings = {
headers: {
//'Authorization': 'Bearer ' + bearerToken,
'RequestVerificationToken': xsrf
}
};
}
function AttachXSRFToken_OnExport(args, xsrf) {
args.FormData["__RequestVerificationToken"] = xsrf;
}
function WebDocumentViewer_BeforeRender(s, e) {
SetupJwt('bearer token can be passed here', "@GetAntiXsrfRequestToken()");
$(window).on('beforeunload', function(e) {
s.Close();
});
}
function OnViewerExport(_s, e) {
AttachXSRFToken_OnExport(e, "@GetAntiXsrfRequestToken()");
}
</script>
<input type="hidden" id="RequestVerificationToken" name="RequestVerificationToken" value="@GetAntiXsrfRequestToken()">
@{
var viewerRender = Html.DevExpress().WebDocumentViewer("DocumentViewer")
.ClientSideEvents(x =>
{
x.BeforeRender("WebDocumentViewer_BeforeRender");
x.OnExport("OnViewerExport");
})
.Height("1000px")
.Bind("CustomerReport");
@viewerRender.RenderHtml()
}
@section Scripts {
<abp-style type="typeof(DevExpressDocumentViewerStyleContributor)"/>
<abp-script type="typeof(DevExpressDocumentViewerScriptContributor)"/>
@viewerRender.RenderScripts()
}
```
> You can also add similar configuration to Report Designer for exporting in Preview Mode.
## Result
![result](result.gif)
## Source Code
- You can download the source code from [here](https://github.com/gterdem/abp-devexpress-reporting-sample).

BIN
docs/en/Community-Articles/2021-11-29-Integrating-DevExpress-Reporting-To-ABP-MVC-Application/bundle-hierarchy.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

BIN
docs/en/Community-Articles/2021-11-29-Integrating-DevExpress-Reporting-To-ABP-MVC-Application/bundling-folders.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

BIN
docs/en/Community-Articles/2021-11-29-Integrating-DevExpress-Reporting-To-ABP-MVC-Application/data-source.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

BIN
docs/en/Community-Articles/2021-11-29-Integrating-DevExpress-Reporting-To-ABP-MVC-Application/initial-project.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

BIN
docs/en/Community-Articles/2021-11-29-Integrating-DevExpress-Reporting-To-ABP-MVC-Application/result.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 KiB

BIN
docs/en/Community-Articles/2021-11-29-Integrating-DevExpress-Reporting-To-ABP-MVC-Application/wwwroot-lib.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

2
docs/en/Entity-Framework-Core-Oracle-Devart.md

@ -4,6 +4,8 @@ This document explains how to switch to the **Oracle** database provider for **[
> This document uses a paid library of [Devart](https://www.devart.com/dotconnect/oracle/) company, See [this document](Entity-Framework-Core-Oracle.md) for other options.
> Before switching your provider, please ensure your Oracle version is **v12.2+**. In the earlier versions of Oracle, there were long identifier limitations that prevents creating a database table, column or index longer than 30 bytes. With [v12.2](https://docs.oracle.com/en/database/oracle/oracle-database/12.2/newft/new-features.html#GUID-64283AD6-0939-47B0-856E-5E9255D7246B) "The maximum length of identifiers is increased to 128 bytes". **v12.2** and later versions, you can use the database tables, columns and indexes provided by ABP without any problems.
## Replace the Volo.Abp.EntityFrameworkCore.SqlServer Package
`.EntityFrameworkCore` project in the solution depends on the [Volo.Abp.EntityFrameworkCore.SqlServer](https://www.nuget.org/packages/Volo.Abp.EntityFrameworkCore.SqlServer) NuGet package. Remove this package and add the same version of the [Volo.Abp.EntityFrameworkCore.Oracle.Devart](https://www.nuget.org/packages/Volo.Abp.EntityFrameworkCore.Oracle.Devart) package.

2
docs/en/Entity-Framework-Core-Oracle-Official.md

@ -2,6 +2,8 @@
This document explains how to switch to the **Oracle** database provider for **[the application startup template](Startup-Templates/Application.md)** which comes with SQL Server provider pre-configured.
> Before switching your provider, please ensure your Oracle version is **v12.2+**. In the earlier versions of Oracle, there were long identifier limitations that prevents creating a database table, column or index longer than 30 bytes. With [v12.2](https://docs.oracle.com/en/database/oracle/oracle-database/12.2/newft/new-features.html#GUID-64283AD6-0939-47B0-856E-5E9255D7246B) "The maximum length of identifiers is increased to 128 bytes". **v12.2** and later versions, you can use the database tables, columns and indexes provided by ABP without any problems.
## Replace the Volo.Abp.EntityFrameworkCore.SqlServer Package
`.EntityFrameworkCore` project in the solution depends on the [Volo.Abp.EntityFrameworkCore.SqlServer](https://www.nuget.org/packages/Volo.Abp.EntityFrameworkCore.SqlServer) NuGet package. Remove this package and add the same version of the [Volo.Abp.EntityFrameworkCore.Oracle](https://www.nuget.org/packages/Volo.Abp.EntityFrameworkCore.Oracle) package.

26
docs/en/Road-Map.md

@ -4,19 +4,16 @@ This document provides a road map, release schedule and planned features for the
## Next Versions
### v5.0
### v5.1
This version will focus on the following works:
In [5.1 milestone](https://github.com/abpframework/abp/milestone/60), we will be mostly working on the following topics:
* Upgrading to .NET 6.0 ([#9004](https://github.com/abpframework/abp/issues/9004))
* Upgrading to Bootstrap 5.x ([#8922](https://github.com/abpframework/abp/issues/8922))
* C# and JavaScript Static Client Proxy Generation ([#9864](https://github.com/abpframework/abp/issues/9864))
* Revisit the microservice demo solution ([#8385](https://github.com/abpframework/abp/issues/8385))
* Publishing distributed events as transactional ([#6126](https://github.com/abpframework/abp/issues/6126))
* Performance optimizations; Enabling .NET Trimming, using source generators and reducing reflection, etc.
* Improving the abp.io platform and work more on contents and documents
* Maturing and documenting the [eShopOnAbp](https://github.com/abpframework/eShopOnAbp) project.
* Working on the [LeptonX](https://blog.abp.io/abp/LeptonX-Theme-for-ABP-Framework-Alpha-Release) theme and making it as the default theme for the ABP Framework UI options.
* Flexing the UI-backend dependency for the Angular UI, so we can easily create UI-only modules (like UI themes) with its own localization and settings.
* Working on more examples and guides.
**Planned release date**: End of Quarter 4, 2021. See the [5.0 milestone](https://github.com/abpframework/abp/milestone/51) to track the progress.
The planned release data for v5.1 is **February, 2022**. See the [5.1 milestone](https://github.com/abpframework/abp/milestone/60) on GitHub for all the issues we are working on.
## Backlog Items
@ -24,10 +21,10 @@ The *Next Versions* section above shows the main focus of the planned versions.
Here, a list of major items in the backlog we are considering to work on in the next versions.
* ([#497](https://github.com/abpframework/abp/issues/497)) API Versioning system: finalize & document
* ([#7221](https://github.com/abpframework/abp/issues/7221)) Alternative to IdentityServer4
* ([#2183](https://github.com/abpframework/abp/issues/2183)) Dapr integration
* ([#236](https://github.com/abpframework/abp/issues/236)) Resource based authorization system
* [#497](https://github.com/abpframework/abp/issues/497) / API Versioning system: finalize & document
* [#7221](https://github.com/abpframework/abp/issues/7221) / Alternative to IdentityServer4
* [#2183](https://github.com/abpframework/abp/issues/2183) / Dapr integration
* [#236](https://github.com/abpframework/abp/issues/236) / Resource based authorization system
* [#2882](https://github.com/abpframework/abp/issues/2882) / Providing a gRPC integration infrastructure (while it is [already possible](https://github.com/abpframework/abp-samples/tree/master/GrpcDemo) to create or consume gRPC endpoints for your application, we plan to create endpoints for the [standard application modules](https://docs.abp.io/en/abp/latest/Modules/Index))
* [#1754](https://github.com/abpframework/abp/issues/1754) / Multi-lingual entities
* [#57](https://github.com/abpframework/abp/issues/57) / Built-in CQRS infrastructure
@ -36,6 +33,7 @@ Here, a list of major items in the backlog we are considering to work on in the
* [#4223](https://github.com/abpframework/abp/issues/4223) / WebHook system
* [#162](https://github.com/abpframework/abp/issues/162) / Azure ElasticDB Integration for multitenancy
* [#2296](https://github.com/abpframework/abp/issues/2296) / Feature toggling infrastructure
* [#6655](https://github.com/abpframework/abp/pull/6655) / Use Typescript for the MVC UI
You can always check the milestone planning and the prioritized backlog issues on [the GitHub repository](https://github.com/abpframework/abp/milestones) for a detailed road map. The backlog items are subject to change. We are adding new items and changing priorities based on the community feedbacks and goals of the project.

3
docs/en/Samples/eShopOnAbp/Index.md

@ -0,0 +1,3 @@
# eShopOnAbp
This document is in progress. Please see the source code for now: https://github.com/abpframework/eShopOnAbp

58
docs/en/Tutorials/Todo/Index.md

@ -412,14 +412,16 @@ Open the `Index.cshtml` file in the `Pages` folder of the *TodoApp.Web* project
</abp-card-header>
<abp-card-body>
<!-- FORM FOR NEW TODO ITEMS -->
<form id="NewItemForm" class="form-inline">
<input id="NewItemText"
type="text"
class="form-control mr-2"
placeholder="enter text...">
<button type="submit" class="btn btn-primary">Submit</button>
<form id="NewItemForm" class="row row-cols-lg-auto g-3 align-items-center">
<div class="col-12">
<div class="input-group">
<input id="NewItemText" type="text" class="form-control" placeholder="enter text...">
</div>
</div>
<div class="col-12">
<button type="submit" class="btn btn-primary">Submit</button>
</div>
</form>
<!-- TODO ITEMS LIST -->
<ul id="TodoList">
@foreach (var todoItem in Model.TodoItems)
@ -543,7 +545,7 @@ namespace TodoApp.Blazor.Pages
private List<TodoItemDto> TodoItems { get; set; } = new List<TodoItemDto>();
private string NewTodoText { get; set; }
protected async override Task OnInitializedAsync()
protected override async Task OnInitializedAsync()
{
TodoItems = await TodoAppService.GetListAsync();
}
@ -589,17 +591,16 @@ Open the `Index.razor` file in the `Pages` folder of the *TodoApp.Blazor* projec
</CardHeader>
<CardBody>
<!-- FORM FOR NEW TODO ITEMS -->
<form id="NewItemForm"
@onsubmit:preventDefault
@onsubmit="() => Create()"
class="form-inline">
<input type="text"
@bind-value="@NewTodoText"
class="form-control mr-2"
placeholder="enter text...">
<button type="submit" class="btn btn-primary">Submit</button>
<form id="NewItemForm" @onsubmit:preventDefault @onsubmit="() => Create()" class="row row-cols-lg-auto g-3 align-items-center">
<div class="col-12">
<div class="input-group">
<input name="NewTodoText" type="text" @bind-value="@NewTodoText" class="form-control" placeholder="enter text..." />
</div>
</div>
<div class="col-12">
<button type="submit" class="btn btn-primary">Submit</button>
</div>
</form>
<!-- TODO ITEMS LIST -->
<ul id="TodoList">
@foreach (var todoItem in TodoItems)
@ -682,7 +683,7 @@ You first need to run the `TodoApp.HttpApi.Host` project since the proxy generat
Once you run the `TodoApp.HttpApi.Host` project, open a command-line terminal in the `angular` folder and type the following command:
````bash
abp generate-proxy
abp generate-proxy -t ng
````
If everything goes well, it should generate an output like shown below:
@ -758,17 +759,16 @@ Open the `/angular/src/app/home/home.component.html` file and replace its conten
</div>
<div class="card-body">
<!-- FORM FOR NEW TODO ITEMS -->
<form class="form-inline" (ngSubmit)="create()">
<input
name="NewTodoText"
type="text"
[(ngModel)]="newTodoText"
class="form-control mr-2"
placeholder="enter text..."
/>
<button type="submit" class="btn btn-primary">Submit</button>
<form class="row row-cols-lg-auto g-3 align-items-center" (ngSubmit)="create()">
<div class="col-12">
<div class="input-group">
<input name="NewTodoText" type="text" [(ngModel)]="newTodoText" class="form-control" placeholder="enter text..." />
</div>
</div>
<div class="col-12">
<button type="submit" class="btn btn-primary">Submit</button>
</div>
</form>
<!-- TODO ITEMS LIST -->
<ul id="TodoList">
<li *ngFor="let todoItem of todoItems">

23
docs/en/UI/Angular/List-Service.md

@ -201,26 +201,3 @@ You may use observables in combination with [AsyncPipe](https://angular.io/guide
<input type="text" name="search" [(ngModel)]="list.filter">
```
## Breaking Change with ABP v3.0
We had to modify the `ListService` to make it work with `ngx-datatable`. Previously, the minimum value for `page` property was `1` and you could use it like this:
```html
<!-- other bindings are hidden in favor of brevity -->
<abp-table
[(page)]="list.page"
></abp-table>
```
As of v3.0, with ngx-datatable, the `page` property has to be set as `0` for the initial page. Therefore, if you used `ListService` on your tables before and are going to keep `abp-table`, you need to make the following change:
```html
<!-- other bindings are hidden in favor of brevity -->
<abp-table
[page]="list.page + 1"
(pageChange)="list.page = $event - 1"
></abp-table>
```
**Important Note:** The `abp-table` is not removed, but is deprecated and will be removed in the future. Please consider switching to ngx-datatable.

4
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/wwwroot/libs/abp/aspnetcore-mvc-ui-theme-shared/bootstrap/dom-event-handlers.js

@ -81,6 +81,7 @@
var itemsPropertyName = $(this).data("autocompleteItemsProperty");
var filterParamName = $(this).data("autocompleteFilterParamName");
var selectedText = $(this).data("autocompleteSelectedItemName");
var parentSelector = $(this).data("autocompleteParentSelector");
var name = $(this).attr("name");
var selectedTextInputName = name.substring(0, name.length - 1) + "_Text]";
var selectedTextInput = $('<input>', {
@ -119,7 +120,8 @@
};
}
},
width: '100%'
width: '100%',
dropdownParent: parentSelector ? $(parentSelector) : $('body'),
});
$select.on('select2:select', function (e) {
selectedTextInput.val(e.params.data.text);

16
framework/src/Volo.Abp.BlobStoring.Minio/Volo/Abp/BlobStoring/Minio/MinioBlobProvider.cs

@ -75,13 +75,21 @@ namespace Volo.Abp.BlobStoring.Minio
return null;
}
Stream blobStream = null;
await client.GetObjectAsync(containerName, blobName, (stream) =>
var memoryStream = new MemoryStream();
await client.GetObjectAsync(containerName, blobName, (stream) =>
{
blobStream = stream;
if (stream != null)
{
stream.CopyTo(memoryStream);
memoryStream.Seek(0, SeekOrigin.Begin);
}
else
{
memoryStream = null;
}
});
return await TryCopyToMemoryStreamAsync(blobStream, args.CancellationToken);
return memoryStream;
}
protected virtual MinioClient GetMinioClient(BlobProviderArgs args)

13
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/NewCommand.cs

@ -1,28 +1,18 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Text.Json;
using System.Threading.Tasks;
using ICSharpCode.SharpZipLib.Core;
using ICSharpCode.SharpZipLib.Zip;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.Abstractions;
using Volo.Abp.Cli.Args;
using Volo.Abp.Cli.Auth;
using Volo.Abp.Cli.Commands.Services;
using Volo.Abp.Cli.Http;
using Volo.Abp.Cli.ProjectBuilding;
using Volo.Abp.Cli.ProjectBuilding.Building;
using Volo.Abp.Cli.ProjectBuilding.Templates.App;
using Volo.Abp.Cli.ProjectBuilding.Templates.Console;
using Volo.Abp.Cli.ProjectBuilding.Templates.Microservice;
using Volo.Abp.Cli.ProjectModification;
using Volo.Abp.Cli.Utils;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Threading;
namespace Volo.Abp.Cli.Commands
{
@ -84,6 +74,7 @@ namespace Volo.Abp.Cli.Commands
Logger.LogInformation($"'{projectName}' has been successfully created to '{projectArgs.OutputFolder}'");
RunGraphBuildForMicroserviceServiceTemplate(projectArgs);
OpenRelatedWebPage(projectArgs, template, isTiered, commandLineArgs);
}

8
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/ProjectCreationCommandBase.cs

@ -296,6 +296,14 @@ namespace Volo.Abp.Cli.Commands
}
}
protected virtual void RunGraphBuildForMicroserviceServiceTemplate(ProjectBuildArgs projectArgs)
{
if (MicroserviceServiceTemplateBase.IsMicroserviceServiceTemplate(projectArgs.TemplateName))
{
CmdHelper.RunCmd("dotnet build /graphbuild", projectArgs.OutputFolder);
}
}
protected virtual DatabaseManagementSystem GetDatabaseManagementSystem(CommandLineArgs commandLineArgs)
{
var optionValue = commandLineArgs.Options.GetOrNull(Options.DatabaseManagementSystem.Short, Options.DatabaseManagementSystem.Long);

2
framework/src/Volo.Abp.EventBus.Azure/Volo/Abp/EventBus/Azure/AzureDistributedEventBus.cs

@ -180,7 +180,7 @@ namespace Volo.Abp.EventBus.Azure
protected override async Task PublishToEventBusAsync(Type eventType, object eventData)
{
await PublishAsync(eventType, eventData);
await PublishAsync(EventNameAttribute.GetNameOrDefault(eventType), eventData);
}
protected override void AddToUnitOfWork(IUnitOfWork unitOfWork, UnitOfWorkEventRecord eventRecord)

5
framework/src/Volo.Abp.Json/Volo/Abp/Json/SystemTextJson/JsonConverters/AbpHasExtraPropertiesJsonConverter.cs

@ -27,12 +27,13 @@ namespace Volo.Abp.Json.SystemTextJson.JsonConverters
var rootElement = JsonDocument.ParseValue(ref reader).RootElement;
if (rootElement.ValueKind == JsonValueKind.Object)
{
var extensibleObject = JsonSerializer.Deserialize<T>(rootElement.GetRawText(), newOptions);
var extensibleObject = rootElement.Deserialize<T>(newOptions);
var extraPropertiesJsonProperty = rootElement.EnumerateObject().FirstOrDefault(x => x.Name.Equals(nameof(IHasExtraProperties.ExtraProperties), StringComparison.OrdinalIgnoreCase));
if (extraPropertiesJsonProperty.Value.ValueKind == JsonValueKind.Object)
{
var extraPropertyDictionary = JsonSerializer.Deserialize(extraPropertiesJsonProperty.Value.GetRawText(), typeof(ExtraPropertyDictionary), newOptions);
var extraPropertyDictionary = extraPropertiesJsonProperty.Value.Deserialize(typeof(ExtraPropertyDictionary), newOptions);
ObjectHelper.TrySetProperty(extensibleObject, x => x.ExtraProperties, () => extraPropertyDictionary);
}

4
framework/test/Volo.Abp.MemoryDb.Tests/Volo/Abp/MemoryDb/JsonConverters/EntityJsonConverter.cs

@ -13,12 +13,12 @@ namespace Volo.Abp.MemoryDb.JsonConverters
var jsonDocument = JsonDocument.ParseValue(ref reader);
if (jsonDocument.RootElement.ValueKind == JsonValueKind.Object)
{
var entity = (TEntity)JsonSerializer.Deserialize(jsonDocument.RootElement.GetRawText(), typeToConvert);
var entity = (TEntity)jsonDocument.RootElement.Deserialize(typeToConvert);
var idJsonElement = jsonDocument.RootElement.GetProperty(nameof(Entity<object>.Id));
if (idJsonElement.ValueKind != JsonValueKind.Undefined)
{
var id = JsonSerializer.Deserialize<TKey>(idJsonElement.GetRawText());
var id = idJsonElement.Deserialize<TKey>();
if (id != null)
{
EntityHelper.TrySetId(entity, () => id);

2
modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Shared/Styles/blog.css

@ -286,7 +286,7 @@ div.vs-blog {
padding: 30px;
border-bottom: 1px solid #f1f1f1; }
div.vs-blog .comment-area > .media .media {
padding: 20px 0px 0px; }
padding: 20px 0px 0px 20px; }
div.vs-blog .comment-area .comment-buttons {
padding: 4px 0;
font-size: .96em; }

2
modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Shared/Styles/blog.min.css

File diff suppressed because one or more lines are too long

2
modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Menus/MenuItems/CreateModal.cshtml

@ -13,7 +13,7 @@
}
<form asp-page="/CmsKit/Menus/MenuItems/CreateModal">
<abp-modal>
<abp-modal id="menu-create-modal">
<abp-modal-header title="@L["New"].Value"></abp-modal-header>
<abp-modal-body>

2
modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Menus/MenuItems/UpdateModal.cshtml

@ -13,7 +13,7 @@
}
<form asp-page="/CmsKit/Menus/MenuItems/UpdateModal">
<abp-modal>
<abp-modal id="menu-update-modal">
<abp-modal-header title="@L["New"].Value"></abp-modal-header>
<abp-modal-body>
<abp-input asp-for="Id"/>

1
modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Menus/MenuItems/createModal.js

@ -33,6 +33,7 @@ $(function () {
$pageId.data('autocompleteValueProperty', 'id');
$pageId.data('autocompleteItemsProperty', 'items');
$pageId.data('autocompleteFilterParamName', 'filter');
$pageId.data('autocompleteParentSelector', '#menu-create-modal');
abp.dom.initializers.initializeAutocompleteSelects($pageId);
}

1
modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Menus/MenuItems/updateModal.js

@ -34,6 +34,7 @@ $(function () {
$pageId.data('autocompleteValueProperty', 'id');
$pageId.data('autocompleteItemsProperty', 'items');
$pageId.data('autocompleteFilterParamName', 'filter');
$pageId.data('autocompleteParentSelector', '#menu-update-modal');
abp.dom.initializers.initializeAutocompleteSelects($pageId);
}

11
modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Commenting/Default.cshtml

@ -57,7 +57,16 @@
Func<dynamic, IHtmlContent> GetCommentContentArea(Guid id, string text) =>
@<div class="cms-comment-content-area" data-id="@id.ToString()">
<p class="m-0">
@text
@{
var lines = text.SplitToLines();
if (lines.Any())
{
foreach (var line in lines)
{
@line <br />
}
}
}
</p>
</div>;
}

2
modules/feature-management/src/Volo.Abp.FeatureManagement.Application.Contracts/Volo/Abp/FeatureManagement/JsonConverters/SelectionStringValueItemSourceJsonConverter.cs

@ -19,7 +19,7 @@ namespace Volo.Abp.FeatureManagement.JsonConverters
var newOptions = JsonSerializerOptionsHelper.Create(options, this);
var selectionStringValueItem =
JsonSerializer.Deserialize<LocalizableSelectionStringValueItem[]>(itemsJsonProperty.Value.GetRawText(), newOptions) ??
itemsJsonProperty.Value.Deserialize<LocalizableSelectionStringValueItem[]>(newOptions) ??
Array.Empty<LocalizableSelectionStringValueItem>();
return new StaticSelectionStringValueItemSource(selectionStringValueItem.As<ISelectionStringValueItem[]>());

6
modules/feature-management/src/Volo.Abp.FeatureManagement.Application.Contracts/Volo/Abp/FeatureManagement/JsonConverters/StringValueTypeJsonConverter.cs

@ -22,9 +22,9 @@ namespace Volo.Abp.FeatureManagement.JsonConverters
return name switch
{
"SelectionStringValueType" => JsonSerializer.Deserialize<SelectionStringValueType>(rootElement.GetRawText(), newOptions),
"FreeTextStringValueType" => JsonSerializer.Deserialize<FreeTextStringValueType>(rootElement.GetRawText(), newOptions),
"ToggleStringValueType" => JsonSerializer.Deserialize<ToggleStringValueType>(rootElement.GetRawText(), newOptions),
"SelectionStringValueType" => rootElement.Deserialize<SelectionStringValueType>(newOptions),
"FreeTextStringValueType" => rootElement.Deserialize<FreeTextStringValueType>(newOptions),
"ToggleStringValueType" => rootElement.Deserialize<ToggleStringValueType>(newOptions),
_ => throw new ArgumentException($"{nameof(IStringValueType)} named {name} was not found!")
};
}

2
modules/feature-management/src/Volo.Abp.FeatureManagement.Application.Contracts/Volo/Abp/FeatureManagement/JsonConverters/ValueValidatorJsonConverter.cs

@ -23,7 +23,7 @@ namespace Volo.Abp.FeatureManagement.JsonConverters
if (propertiesJsonProperty.Value.ValueKind == JsonValueKind.Object)
{
var newOptions = JsonSerializerOptionsHelper.Create(options, this, new ObjectToInferredTypesConverter());
var properties = JsonSerializer.Deserialize<IDictionary<string, object>>(propertiesJsonProperty.Value.GetRawText(), newOptions);
var properties = propertiesJsonProperty.Value.Deserialize<IDictionary<string, object>>(newOptions);
if (properties != null && properties.Any())
{
foreach (var property in properties)

6
modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor/Pages/TenantManagement/TenantManagement.razor.cs

@ -53,6 +53,10 @@ namespace Volo.Abp.TenantManagement.Blazor.Pages.TenantManagement
protected override ValueTask SetToolbarItemsAsync()
{
Toolbar.AddButton(L["ManageHostFeatures"],
async () => await FeatureManagementModal.OpenAsync(FeatureProviderName),
"fa fa-cog");
Toolbar.AddButton(L["NewTenant"],
OpenCreateModalAsync,
IconName.Add,
@ -119,4 +123,4 @@ namespace Volo.Abp.TenantManagement.Blazor.Pages.TenantManagement
return base.SetTableColumnsAsync();
}
}
}
}

4
npm/ng-packs/apps/dev-app/src/polyfills.ts

@ -57,8 +57,8 @@
/***************************************************************************************************
* Zone JS is required by default for Angular itself.
*/
import 'zone.js'; // Included with Angular CLI.
/***************************************************************************************************
* APPLICATION IMPORTS
*/
import '@angular/localize/init';
import 'zone.js'; // Included with Angular CLI.

7
npm/ng-packs/package.json

@ -62,12 +62,13 @@
"@angular/compiler-cli": "12.2.13",
"@angular/core": "12.2.13",
"@angular/forms": "12.2.13",
"@angular/localize": "12.2.13",
"@angular/language-service": "12.2.13",
"@angular/platform-browser": "12.2.13",
"@angular/platform-browser-dynamic": "12.2.13",
"@angular/router": "12.2.13",
"@fortawesome/fontawesome-free": "^5.15.4",
"@ng-bootstrap/ng-bootstrap": "^11.0.0-beta.2",
"@ng-bootstrap/ng-bootstrap": "11.0.0-beta.2",
"@ngneat/spectator": "^8.0.3",
"@ngx-validate/core": "^0.0.13",
"@nrwl/angular": "13.1.3",
@ -119,5 +120,7 @@
"typescript": "4.3.5",
"zone.js": "~0.11.4"
},
"dependencies": {}
"resolutions": {
"@ng-bootstrap/ng-bootstrap": "11.0.0-beta.2"
}
}

2
npm/ng-packs/packages/components/package.json

@ -9,7 +9,7 @@
"peerDependencies": {
"@abp/ng.core": ">=5.0.0-rc.1",
"@abp/ng.theme.shared": ">=5.0.0-rc.1",
"@ng-bootstrap/ng-bootstrap": ">=6.0.0"
"@ng-bootstrap/ng-bootstrap": ">=10.0.0"
},
"dependencies": {
"chart.js": "^3.5.1",

2
npm/ng-packs/packages/theme-shared/package.json

@ -9,7 +9,7 @@
"dependencies": {
"@abp/ng.core": "~5.0.0-rc.1",
"@fortawesome/fontawesome-free": "^5.15.4",
"@ng-bootstrap/ng-bootstrap": "^11.0.0-beta.2",
"@ng-bootstrap/ng-bootstrap": "11.0.0-beta.2",
"@ngx-validate/core": "^0.0.13",
"@swimlane/ngx-datatable": "^19.0.0",
"bootstrap": "^5.1.1",

947
npm/ng-packs/yarn.lock

File diff suppressed because it is too large
Loading…
Cancel
Save