From 3e743d82edbd32f43d5a573bfaffc3b41229f52b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mehmet=20Tu=CC=88ken?= Date: Fri, 13 Dec 2019 20:49:32 +0300 Subject: [PATCH 01/48] Fix ES localization tests fail. --- .../Volo/Abp/Localization/AbpLocalization_Tests.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/AbpLocalization_Tests.cs b/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/AbpLocalization_Tests.cs index 24433824a3..46f34e054d 100644 --- a/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/AbpLocalization_Tests.cs +++ b/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/AbpLocalization_Tests.cs @@ -117,7 +117,7 @@ namespace Volo.Abp.Localization using (AbpCultureHelper.Use("es")) { - _localizer["USA"].Value.ShouldBe("Estados unidos de America"); //Inherited from CountryNames/es.json + _localizer["USA"].Value.ShouldBe("Estados unidos de América"); //Inherited from CountryNames/es.json _localizer["ThisFieldIsRequired"].Value.ShouldBe("El campo no puede estar vacío"); //Inherited from Validation/es.json _localizer.GetAllStrings().ShouldContain(ls => ls.Name == "USA"); @@ -181,7 +181,7 @@ namespace Volo.Abp.Localization localizedStrings.ShouldContain( ls => ls.Name == "FortyTwo" && - ls.Value == "Cuarenta y dos" && + ls.Value == "Curenta y dos" && ls.ResourceNotFound == false ); @@ -217,7 +217,7 @@ namespace Volo.Abp.Localization var localizedStrings = _localizer.GetAllStrings(false).ToList(); localizedStrings.ShouldNotContain( - ls => ls.Name == "FortyTwo" + ls => ls.Name == "FortyThree" ); localizedStrings.ShouldContain( From 1de18d845f8bd76a633870f38c4ca605afd82149 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mehmet=20Tu=CC=88ken?= Date: Sun, 15 Dec 2019 14:44:27 +0300 Subject: [PATCH 02/48] catch JsonReaderException isn't valid json response. --- .../RemoteServiceExceptionHandler.cs | 22 ++++++++++++++----- 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/RemoteServiceExceptionHandler.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/RemoteServiceExceptionHandler.cs index fe41577583..744641bb8a 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/RemoteServiceExceptionHandler.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/RemoteServiceExceptionHandler.cs @@ -32,7 +32,8 @@ namespace Volo.Abp.Cli.ProjectBuilding return; } - var exceptionMessage = "Remote server returns '" + (int)responseMessage.StatusCode + "-" + responseMessage.ReasonPhrase + "'. "; + var exceptionMessage = "Remote server returns '" + (int) responseMessage.StatusCode + "-" + + responseMessage.ReasonPhrase + "'. "; var remoteServiceErrorMessage = await GetAbpRemoteServiceErrorAsync(responseMessage); if (remoteServiceErrorMessage != null) @@ -45,10 +46,18 @@ namespace Volo.Abp.Cli.ProjectBuilding public async Task GetAbpRemoteServiceErrorAsync(HttpResponseMessage responseMessage) { - var errorResult = _jsonSerializer.Deserialize - ( - await responseMessage.Content.ReadAsStringAsync() - ); + RemoteServiceErrorResponse errorResult; + try + { + errorResult = _jsonSerializer.Deserialize + ( + await responseMessage.Content.ReadAsStringAsync() + ); + } + catch (JsonReaderException) + { + return null; + } if (errorResult?.Error == null) { @@ -82,7 +91,8 @@ namespace Volo.Abp.Cli.ProjectBuilding for (var i = 0; i < errorResult.Error.ValidationErrors.Length; i++) { var validationError = errorResult.Error.ValidationErrors[i]; - sbError.AppendLine("Validation error #" + i + ": " + validationError.Message + " - Members: " + validationError.Members.JoinAsString(", ") + "."); + sbError.AppendLine("Validation error #" + i + ": " + validationError.Message + " - Members: " + + validationError.Members.JoinAsString(", ") + "."); } } From 0226a00facf47d5c51c87a7f02ac2ef1043f43ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mehmet=20Tu=CC=88ken?= Date: Sun, 15 Dec 2019 22:47:28 +0300 Subject: [PATCH 03/48] fix missing rename from AbpErrorViewModel --- .../Views/Error/Default.cshtml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/Views/Error/Default.cshtml b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/Views/Error/Default.cshtml index f1c6bb91d3..cfd16a2b8c 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/Views/Error/Default.cshtml +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/Views/Error/Default.cshtml @@ -2,8 +2,8 @@ @using System.Collections.Generic @using Localization.Resources.AbpUi @using Microsoft.AspNetCore.Mvc.Localization -@using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Pages.Error -@model AbpErrorPageModel +@using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Views.Error +@model AbpErrorViewModel @inject IHtmlLocalizer L @{ var errorMessage = Model.ErrorInfo.Message; From cc7b29de27ef10cd0d9d15294b1741ac6b9455bc Mon Sep 17 00:00:00 2001 From: Yunus Emre Kalkan Date: Mon, 16 Dec 2019 12:38:39 +0300 Subject: [PATCH 04/48] Commercial.abp.io localization update --- .../Commercial/Localization/Resources/en.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/en.json b/abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/en.json index 3ca5aa1e97..c83e5aa6a9 100644 --- a/abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/en.json +++ b/abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/en.json @@ -25,6 +25,7 @@ "Volo.AbpIo.Commercial:010004": "Can not find the specified user! The user must have already registered.", "MyOrganizations": "My organizations", "ApiKey": "API key", - "UserNameNotFound": "There is no user with username {0}" + "UserNameNotFound": "There is no user with username {0}", + "SuccessfullyAddedToNewsletter": "Thanks you for subscribing to our newsletter!" } } \ No newline at end of file From b0ddb294fd8bcf2771e3e9888436fd498a95bd3f Mon Sep 17 00:00:00 2001 From: TheDiaval Date: Tue, 17 Dec 2019 11:26:44 +0300 Subject: [PATCH 05/48] style(theme-shared): change table sort icons --- .../sort-order-icon.component.html | 6 ++--- .../sort-order-icon.component.ts | 4 +-- .../theme-shared/src/lib/constants/styles.ts | 27 +++++++++++++++++++ 3 files changed, 32 insertions(+), 5 deletions(-) diff --git a/npm/ng-packs/packages/theme-shared/src/lib/components/sort-order-icon/sort-order-icon.component.html b/npm/ng-packs/packages/theme-shared/src/lib/components/sort-order-icon/sort-order-icon.component.html index 63b4f648f5..a3a142cc01 100644 --- a/npm/ng-packs/packages/theme-shared/src/lib/components/sort-order-icon/sort-order-icon.component.html +++ b/npm/ng-packs/packages/theme-shared/src/lib/components/sort-order-icon/sort-order-icon.component.html @@ -1,3 +1,3 @@ - - - +
+ +
diff --git a/npm/ng-packs/packages/theme-shared/src/lib/components/sort-order-icon/sort-order-icon.component.ts b/npm/ng-packs/packages/theme-shared/src/lib/components/sort-order-icon/sort-order-icon.component.ts index 0daa31c597..feaad56c5b 100644 --- a/npm/ng-packs/packages/theme-shared/src/lib/components/sort-order-icon/sort-order-icon.component.ts +++ b/npm/ng-packs/packages/theme-shared/src/lib/components/sort-order-icon/sort-order-icon.component.ts @@ -61,8 +61,8 @@ export class SortOrderIconComponent { iconClass: string; get icon(): string { - if (!this.selectedSortKey) return 'fa-sort'; - if (this.selectedSortKey === this.sortKey) return `fa-sort-${this.order}`; + if (!this.selectedSortKey) return 'sorting'; + if (this.selectedSortKey === this.sortKey) return `sorting_${this.order}`; else return ''; } diff --git a/npm/ng-packs/packages/theme-shared/src/lib/constants/styles.ts b/npm/ng-packs/packages/theme-shared/src/lib/constants/styles.ts index 5a9dcb2cc0..99c651f736 100644 --- a/npm/ng-packs/packages/theme-shared/src/lib/constants/styles.ts +++ b/npm/ng-packs/packages/theme-shared/src/lib/constants/styles.ts @@ -241,6 +241,33 @@ body abp-toast .ui-toast .ui-toast-message.ui-toast-message-info .ui-toast-messa max-height: 100vh; } +[class^="sorting"] { + opacity: .3; + cursor: pointer; +} +[class^="sorting"]:before { + right: 0.5rem; + content: "↑"; +} +[class^="sorting"]:after { + right: 0.5rem; + content: "↓"; +} + +.sorting_desc { + opacity: 1; +} +.sorting_desc:before { + opacity: .3; +} + +.sorting_asc { + opacity: 1; +} +.sorting_asc:after { + opacity: .3; +} + @keyframes fadeInTop { from { transform: translateY(-5px); From 08c7dcfe54f86d03e9bc60d61c0120c7e1f24036 Mon Sep 17 00:00:00 2001 From: TheDiaval Date: Tue, 17 Dec 2019 11:38:04 +0300 Subject: [PATCH 06/48] test(theme-shared): correct the test for sort icon component --- .../src/lib/tests/sort-order-icon.component.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/npm/ng-packs/packages/theme-shared/src/lib/tests/sort-order-icon.component.spec.ts b/npm/ng-packs/packages/theme-shared/src/lib/tests/sort-order-icon.component.spec.ts index ae14fc175b..f37d7e7ef6 100644 --- a/npm/ng-packs/packages/theme-shared/src/lib/tests/sort-order-icon.component.spec.ts +++ b/npm/ng-packs/packages/theme-shared/src/lib/tests/sort-order-icon.component.spec.ts @@ -24,7 +24,7 @@ describe('SortOrderIconComponent', () => { component.sort(newKey); expect(component.selectedSortKey).toBe(newKey); expect(component.order).toBe('asc'); - expect(component.icon).toBe('fa-sort-asc'); + expect(component.icon).toBe('sorting_asc'); }); test("shouldn't have any icon class when sortKey and selectedSortKey are different", () => { From 828888aa79c108640e79ea687f5c82de1672394b Mon Sep 17 00:00:00 2001 From: mehmet-erim Date: Tue, 17 Dec 2019 14:52:07 +0300 Subject: [PATCH 07/48] docs: add contributing.md --- npm/ng-packs/CONTRIBUTING.md | 123 ++++++++++++++++++++++++ npm/ng-packs/README.md | 5 +- npm/ng-packs/yarn.lock | 132 +++++++++++++------------- templates/app/angular/src/styles.scss | 1 - 4 files changed, 191 insertions(+), 70 deletions(-) create mode 100644 npm/ng-packs/CONTRIBUTING.md diff --git a/npm/ng-packs/CONTRIBUTING.md b/npm/ng-packs/CONTRIBUTING.md new file mode 100644 index 0000000000..5c6fdc081b --- /dev/null +++ b/npm/ng-packs/CONTRIBUTING.md @@ -0,0 +1,123 @@ +# Contributing to ABP Angular UI + +We would love for you to contribute to ABP Angular UI and help make it even better than it is today. + +# Development + + +Run `yarn` to install all dependencies, then run `yarn prepare:workspace` to prepare the ABP packages (might take 2 minutes). + +Run `yarn start` to start the `dev-app`. Navigate to http://localhost:4200/. + +## Package +[Symlink Manager](https://github.com/mehmet-erim/symlink-manager) is used to manage symbolic link processes. Run `yarn symlink copy` to select the packages to develop. + +## Application +The `dev-app` project is the same as the Angular UI template project. `dev-app` is used to see changes instantly. + +If you will only develop the `dev-app`, you don't need to run `symlink-manager`. + +> Reminder! If you have developed the `dev-app` template, you should do the same for the application and module templates. + +For more information, see the [docs.abp.io](https://docs.abp.io) + + +# Committing changes + +Before you commit, please ensure that your code passes the existing unit tests. + +New features should be accompanied by new tests. + +## Commit message format + +Each commit message consists of a **header**, a **body** and a **footer**. The header has a special +format that includes a **type**, a **scope** and a **subject**: + +``` +(): + + + +