diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 0000000000..738b727317 --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,4 @@ +ui-angular: + - npm/ng-packs/**/* + - templates/app/angular/**/* + - templates/module/angular/**/* diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml new file mode 100644 index 0000000000..e70e966d4a --- /dev/null +++ b/.github/workflows/labeler.yml @@ -0,0 +1,17 @@ +name: "Pull Request Labeler" +on: + pull_request: + paths: + - npm/ng-packs/**/* + - templates/app/angular/**/* + - templates/module/angular/**/* + branches: + - master + - dev +jobs: + labeler: + runs-on: ubuntu-18.04 + steps: + - uses: actions/labeler@v2 + with: + repo-token: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.gitignore b/.gitignore index 4eabbccebd..73d74ec7c6 100644 --- a/.gitignore +++ b/.gitignore @@ -289,4 +289,5 @@ samples/MicroserviceDemo/gateways/BackendAdminAppGateway.Host/Logs/logs.txt samples/MicroserviceDemo/applications/PublicWebSite.Host/Logs/logs.txt samples/MicroserviceDemo/gateways/PublicWebSiteGateway.Host/Logs/logs.txt samples/MicroserviceDemo/microservices/BloggingService.Host/Logs/logs.txt +samples/MicroserviceDemo/applications/ConsoleClientDemo/Logs/logs.txt modules/docs/app/Volo.DocsTestApp/Logs/logs.txt diff --git a/abp_io/AbpIoLocalization/AbpIoLocalization/Www/Localization/Resources/pt-BR.json b/abp_io/AbpIoLocalization/AbpIoLocalization/Www/Localization/Resources/pt-BR.json index a01d460e01..c34a08f7ed 100644 --- a/abp_io/AbpIoLocalization/AbpIoLocalization/Www/Localization/Resources/pt-BR.json +++ b/abp_io/AbpIoLocalization/AbpIoLocalization/Www/Localization/Resources/pt-BR.json @@ -18,10 +18,10 @@ "AbpShortDescription": "ABP é uma arquitetura completa e uma forte infraestrutura para criar aplicativos da web modernos! Segue as melhores práticas e convenções para fornecer uma sólida experiência de desenvolvimento.", "SourceCodeUpper": "CÓDIGO FONTE", "LatestReleaseLogs": "Últimos registros de lançamento", - "Infrastructure": "Infra-estrutura", + "Infrastructure": "Infraestrutura", "Architecture": "Arquitetura", "Modular": "Modular", - "DontRepeatYourself": "Não se repita", + "DontRepeatYourself": "Não repita a si mesmo", "DeveloperFocused": "Desenvolvedor focado", "FullStackApplicationInfrastructure": "Infraestrutura de aplicativos full stack.", "DomainDrivenDesign": "Design Orientado a Domínio", @@ -30,7 +30,7 @@ "AuthorizationExplanation": "Autorização avançada com usuário, função e sistema de permissão refinado. Criada na biblioteca Microsoft Identity.", "MultiTenancy": "Múltiplos inquilinos", "MultiTenancyExplanation": "Aplicativos SaaS facilitados! Multilocação integrada do banco de dados à interface do usuário.", - "CrossCuttingConcerns": "Preocupações transversais", + "CrossCuttingConcerns": "Características transversais", "CrossCuttingConcernsExplanation": "Infraestrutura completa para autorização, validação, tratamento de exceções, armazenamento em cache, log de auditoria, gerenciamento de transações e assim por diante.", "BuiltInBundlingMinification": "Pacote & Minificação Integrados", "BuiltInBundlingMinificationExplanation": "Pare de usar ferramentas externas para empacotamento e minificação. O ABP oferece uma maneira mais simples, dinâmica, poderosa, modular e integrada!", diff --git a/docs/en/AspNetCore/Bundling-Minification.md b/docs/en/AspNetCore/Bundling-Minification.md index 220562935d..8868d441e1 100644 --- a/docs/en/AspNetCore/Bundling-Minification.md +++ b/docs/en/AspNetCore/Bundling-Minification.md @@ -114,7 +114,7 @@ public class MyWebModule : AbpModule { public override void ConfigureServices(ServiceConfigurationContext context) { - Configure(options => + Configure(options => { options .ScriptBundles @@ -151,7 +151,7 @@ public class MyWebExtensionModule : AbpModule { public override void ConfigureServices(ServiceConfigurationContext context) { - Configure(options => + Configure(options => { options .ScriptBundles @@ -189,7 +189,7 @@ public class MyExtensionGlobalStyleContributor : BundleContributor Then you can use this contributor as like below: ````C# -services.Configure(options => +services.Configure(options => { options .ScriptBundles @@ -317,7 +317,7 @@ In some specific cases, it may be needed to create a **new** bundle **inherited* Example: ````c# -services.Configure(options => +services.Configure(options => { options .StyleBundles diff --git a/docs/en/Best-Practices/Module-Architecture.md b/docs/en/Best-Practices/Module-Architecture.md index f37d60d68b..d9f833726f 100644 --- a/docs/en/Best-Practices/Module-Architecture.md +++ b/docs/en/Best-Practices/Module-Architecture.md @@ -57,7 +57,7 @@ Next section describes the packages in more details. * **Do** divide the domain layer into two projects: * **Domain.Shared** package, named as *CompanyName.ModuleName.Domain.Shared*, that contains constants, enums and other types those can be safely shared with the all layers of the module. This package can also be shared to 3rd-party clients. It can not contain entities, repositories, domain services or any other business objects. * **Domain** package, named as *CompanyName.ModuleName.Domain*, that contains entities, repository interfaces, domain service interfaces and their implementations and other domain objects. - * Domain package depends on the **Domain.Share** package. + * Domain package depends on the **Domain.Shared** package. #### Application Layer @@ -85,5 +85,5 @@ Next section describes the packages in more details. #### Web Layer -* Do create a **Web** package, named as *CompanyName.ModuleName.Web*, that contains pages, views, scripts, styles, images and other UI components. +* **Do** create a **Web** package, named as *CompanyName.ModuleName.Web*, that contains pages, views, scripts, styles, images and other UI components. * Web package only depends on the **HttpApi** package. \ No newline at end of file diff --git a/docs/en/Multi-Tenancy.md b/docs/en/Multi-Tenancy.md index c69e2cb299..00f51d430d 100644 --- a/docs/en/Multi-Tenancy.md +++ b/docs/en/Multi-Tenancy.md @@ -312,10 +312,10 @@ http://nginx.org/en/docs/http/ngx_http_core_module.html#ignore_invalid_headers http://nginx.org/en/docs/http/ngx_http_core_module.html#underscores_in_headers -"__tenant" parameter name can be changed using AspNetCoreMultiTenancyOptions. Example: +"__tenant" parameter name can be changed using AbpAspNetCoreMultiTenancyOptions. Example: ````C# -services.Configure(options => +services.Configure(options => { options.TenantKey = "MyTenantKey"; }); diff --git a/docs/en/Tutorials/Angular/Part-II.md b/docs/en/Tutorials/Angular/Part-II.md index 41414c917c..1dbfe9b5cd 100644 --- a/docs/en/Tutorials/Angular/Part-II.md +++ b/docs/en/Tutorials/Angular/Part-II.md @@ -218,26 +218,6 @@ Open `book-list.component.html` and add the form in the body template of the mod > We've used [NgBootstrap datepicker](https://ng-bootstrap.github.io/#/components/datepicker/overview) in this component. -Open the `book-list.component.ts` and then create an array, named `bookTypeArr`: - -```js -//... -booksType = Books.BookType; - -bookTypeArr = Object.keys(Books.BookType).filter( - bookType => typeof this.booksType[bookType] === 'number' -); -``` -> It use the `booksType` field,please put the `bookTypeArr` defined below that line - -The `bookTypeArr` contains the fields of the `BookType` enum. Resulting array is shown below: - -```js -['Adventure', 'Biography', 'Dystopia', 'Fantastic' ...] -``` - -This array was used in the previous form template (in the `ngFor` loop). - #### Datepicker Requirements You need to import `NgbDatepickerModule` to the `books.module.ts`: @@ -269,6 +249,28 @@ export class BookListComponent implements OnInit { > The `NgbDateAdapter` converts Datepicker value to `Date` type. See the [datepicker adapters](https://ng-bootstrap.github.io/#/components/datepicker/overview) for more details. +#### Create the Book Type Array + +Open the `book-list.component.ts` and then create an array, named `bookTypeArr`: + +```js +//... +booksType = Books.BookType; + +bookTypeArr = Object.keys(Books.BookType).filter( + bookType => typeof this.booksType[bookType] === 'number' +); +``` + +The `bookTypeArr` contains the fields of the `BookType` enum. Resulting array is shown below: + +```js +['Adventure', 'Biography', 'Dystopia', 'Fantastic' ...] +``` + +This array was used in the previous form template (in the `ngFor` loop). + + ![new-book-form](images/bookstore-new-book-form.png) #### Saving the Book diff --git a/docs/zh-Hans/Best-Practices/Module-Architecture.md b/docs/zh-Hans/Best-Practices/Module-Architecture.md index ad38509ef8..648bf660b1 100644 --- a/docs/zh-Hans/Best-Practices/Module-Architecture.md +++ b/docs/zh-Hans/Best-Practices/Module-Architecture.md @@ -57,33 +57,33 @@ * **推荐** 将领域层划分为两个项目: * **Domain.Shared** 包(项目) 命名为*CompanyName.ModuleName.Domain.Shared*,包含常量,枚举和其他类型, 它不能包含实体,存储库,域服务或任何其他业务对象. 可以安全地与模块中的所有层使用. 此包也可以与第三方客户端使用. * **Domain** 包(项目) 命名为*CompanyName.ModuleName.Domain*, 包含实体, 仓储接口,领域服务接口及其实现和其他领域对象. - * Domain package 依赖于 **Domain.Share** package. + * Domain 包依赖于 **Domain.Shared** 包. #### 应用服务层 * **推荐** 将应用服务层划分为两个项目: * **Application.Contracts** 包(项目) 命名为*CompanyName.ModuleName.Application.Contracts,包含应用服务接口和相关的数据传输对象(DTO). - * Application contract package 依赖于 **Domain.Shared** package. + * Application contract 包依赖于 **Domain.Shared** 包. * **Application** 包(项目)命名为*CompanyName.ModuleName.Application*,包含应用服务实现. - * Application package 依赖于 **Domain** 和 **Application.Contracts** packages. + * Application 包依赖于 **Domain** 包和 **Application.Contracts** 包. #### 基础设施层 * **推荐** 为每个orm/数据库集成创建一个独立的集成包, 比如Entity Framework Core 和 MongoDB. - * **推荐** 例如, 创建一个抽象Entity Framework Core集成的*CompanyName.ModuleName.EntityFrameworkCore* package. ORM 集成 package 依赖于 **Domain** package. + * **推荐** 例如, 创建一个抽象Entity Framework Core集成的*CompanyName.ModuleName.EntityFrameworkCore* 包. ORM 集成包依赖于 **Domain** 包. * **不推荐** 依赖于orm/数据库集成包中的其他层. * **推荐** 为每个主要的库创建一个独立的集成包, 在不影响其他包的情况下可以被另一个库替换. #### HTTP 层 * **推荐** 创建命名为*CompanyName.ModuleName.HttpApi*的**HTTP API**包, 为模块开发REST风格的HTTP API. - * HTTP API package 只依赖于 **Application.Contracts** package. 不要依赖 Application package. + * HTTP API 包只依赖于 **Application.Contracts** 包. 不要依赖 Application 包. * **推荐** 为每个应用服务创建一个Controller (通常通过实现其接口). 这些控制器使用应用服务接口来委托操作. 它根据需要配置路由, HTTP方法和其他与Web相关的东西. -* **推荐** 创建一个为HTTP API包提供客户端服务的**HTTP API Client**包, 它的命名为*companyname.modulename.httpapi*. 这些客户端服务将应用服务接口实现远程端点的客户端. - * HTTP API Client package 仅依赖于 **Application.Contracts** package. +* **推荐** 创建一个为HTTP API包提供客户端服务的**HTTP API Client**包, 它的命名为*Companyname.ModuleName.HttpApi.Client*. 这些客户端服务将应用服务接口实现远程端点的客户端. + * HTTP API Client 包仅依赖于 **Application.Contracts** 包. * **推荐** 使用ABP框架提供的动态代理HTTP C#客户端的功能. #### Web 层 * **推荐** 创建命名为*CompanyName.ModuleName.Web*的 **Web**包. 包含页面,视图,脚本,样式,图像和其他UI组件. - * Web package 仅依赖于 **HttpApi** package. \ No newline at end of file + * Web 包仅依赖于 **HttpApi** 包. \ No newline at end of file diff --git a/docs/zh-Hans/Index.md b/docs/zh-Hans/Index.md index fbe003b8e7..d946d8f0bb 100644 --- a/docs/zh-Hans/Index.md +++ b/docs/zh-Hans/Index.md @@ -6,12 +6,6 @@ ABP是一个**开源应用程序框架**,专注于基于ASP.NET Core的Web应用 浏览左侧导航菜单以深入了解文档. -## 项目状态 - -ABP是开源[ASP.NET Boilerplate](https://aspnetboilerplate.com/)框架的**下一代框架**, 它目前处于早期预览阶段,尚未准备好在生产中使用. 文档仍在进行中,远未完成. - -对于短期和生产级应用程序, 建议使用[ASP.NET Boilerplate](https://aspnetboilerplate.com/)框架,该框架具有丰富的功能集,成熟,积极维护和最新. - ## 入门 使用ABP开发新项目的最简单方法是使用启动模板: diff --git a/docs/zh-Hans/Multi-Tenancy.md b/docs/zh-Hans/Multi-Tenancy.md index f42fd73454..5f00c2c12c 100644 --- a/docs/zh-Hans/Multi-Tenancy.md +++ b/docs/zh-Hans/Multi-Tenancy.md @@ -312,10 +312,10 @@ Volo.Abp.AspNetCore.MultiTenancy 添加了下面这些租户解析器,从当前W http://nginx.org/en/docs/http/ngx_http_core_module.html#ignore_invalid_headers http://nginx.org/en/docs/http/ngx_http_core_module.html#underscores_in_headers -可以使用AspNetCoreMultiTenancyOptions修改默认的参数名"__tenant".例如: +可以使用AbpAspNetCoreMultiTenancyOptions修改默认的参数名"__tenant".例如: ````C# -services.Configure(options => +services.Configure(options => { options.TenantKey = "MyTenantKey"; }); diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/Toolbar/LanguageSwitch/Default.cshtml b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/Toolbar/LanguageSwitch/Default.cshtml index fe6e8c36fd..ae3255abbf 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/Toolbar/LanguageSwitch/Default.cshtml +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/Toolbar/LanguageSwitch/Default.cshtml @@ -1,14 +1,18 @@ -@using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Themes.Basic.Components.Toolbar.LanguageSwitch +@using System.Linq +@using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Themes.Basic.Components.Toolbar.LanguageSwitch @model LanguageSwitchViewComponentModel - +} diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/Toolbar/UserMenu/Default.cshtml b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/Toolbar/UserMenu/Default.cshtml index 548977ffe1..d1738165d3 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/Toolbar/UserMenu/Default.cshtml +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/Toolbar/UserMenu/Default.cshtml @@ -9,7 +9,14 @@ @model ApplicationMenu
-
-
diff --git a/npm/ng-packs/packages/theme-shared/src/lib/components/error/error.component.scss b/npm/ng-packs/packages/theme-shared/src/lib/components/http-error-wrapper/http-error-wrapper.component.scss similarity index 87% rename from npm/ng-packs/packages/theme-shared/src/lib/components/error/error.component.scss rename to npm/ng-packs/packages/theme-shared/src/lib/components/http-error-wrapper/http-error-wrapper.component.scss index a98b5a3ca6..b9f7690a5b 100644 --- a/npm/ng-packs/packages/theme-shared/src/lib/components/error/error.component.scss +++ b/npm/ng-packs/packages/theme-shared/src/lib/components/http-error-wrapper/http-error-wrapper.component.scss @@ -1,7 +1,6 @@ .error { position: fixed; top: 0; - background-color: #fff; width: 100vw; height: 100vh; z-index: 999999; diff --git a/npm/ng-packs/packages/theme-shared/src/lib/components/error/error.component.ts b/npm/ng-packs/packages/theme-shared/src/lib/components/http-error-wrapper/http-error-wrapper.component.ts similarity index 79% rename from npm/ng-packs/packages/theme-shared/src/lib/components/error/error.component.ts rename to npm/ng-packs/packages/theme-shared/src/lib/components/http-error-wrapper/http-error-wrapper.component.ts index 70ddce726e..a102672ad6 100644 --- a/npm/ng-packs/packages/theme-shared/src/lib/components/error/error.component.ts +++ b/npm/ng-packs/packages/theme-shared/src/lib/components/http-error-wrapper/http-error-wrapper.component.ts @@ -1,25 +1,27 @@ import { Config, takeUntilDestroy } from '@abp/ng.core'; import { AfterViewInit, + ApplicationRef, Component, ComponentFactoryResolver, ElementRef, EmbeddedViewRef, + Injector, OnDestroy, + OnInit, Type, ViewChild, - ApplicationRef, - Injector, } from '@angular/core'; import { fromEvent, Subject } from 'rxjs'; import { debounceTime, filter } from 'rxjs/operators'; +import snq from 'snq'; @Component({ - selector: 'abp-error', - templateUrl: './error.component.html', - styleUrls: ['error.component.scss'], + selector: 'abp-http-error-wrapper', + templateUrl: './http-error-wrapper.component.html', + styleUrls: ['http-error-wrapper.component.scss'], }) -export class ErrorComponent implements AfterViewInit, OnDestroy { +export class HttpErrorWrapperComponent implements AfterViewInit, OnDestroy, OnInit { appRef: ApplicationRef; cfRes: ComponentFactoryResolver; @@ -38,6 +40,8 @@ export class ErrorComponent implements AfterViewInit, OnDestroy { hideCloseIcon = false; + backgroundColor: string; + @ViewChild('container', { static: false }) containerRef: ElementRef; @@ -45,6 +49,11 @@ export class ErrorComponent implements AfterViewInit, OnDestroy { return this.status ? `[${this.status}]` : ''; } + ngOnInit() { + this.backgroundColor = + snq(() => window.getComputedStyle(document.body).getPropertyValue('background-color')) || '#fff'; + } + ngAfterViewInit() { if (this.customComponent) { const customComponentRef = this.cfRes.resolveComponentFactory(this.customComponent).create(this.injector); diff --git a/npm/ng-packs/packages/theme-shared/src/lib/components/modal/modal.component.html b/npm/ng-packs/packages/theme-shared/src/lib/components/modal/modal.component.html index 9b712d7199..c3168bad92 100644 --- a/npm/ng-packs/packages/theme-shared/src/lib/components/modal/modal.component.html +++ b/npm/ng-packs/packages/theme-shared/src/lib/components/modal/modal.component.html @@ -1,30 +1,34 @@ - -