diff --git a/docs/en/Modules/Account.md b/docs/en/Modules/Account.md index 7beb5b128d..2ae77d532d 100644 --- a/docs/en/Modules/Account.md +++ b/docs/en/Modules/Account.md @@ -6,7 +6,7 @@ This module is based on [Microsoft's Identity library](https://docs.microsoft.co ## How to Install -This module comes as pre-installed (as NuGet/NPM packages) when you [create a new solution](https://abp.io/get-started) with the ABP Framework. You can continue to use it as package and get updates easily, or you can include its source code into your solution (see `get-source` [CLI](../CLI.md) command) to develop your custom module. +This module comes as pre-installed (as NuGet/NPM packages). You can continue to use it as package and get updates easily, or you can include its source code into your solution (see `get-source` [CLI](../CLI.md) command) to develop your custom module. ### The Source Code diff --git a/docs/en/Modules/Audit-Logging.md b/docs/en/Modules/Audit-Logging.md index 30e1ef4e04..93a50c8387 100644 --- a/docs/en/Modules/Audit-Logging.md +++ b/docs/en/Modules/Audit-Logging.md @@ -6,7 +6,7 @@ The Audit Logging Module basically implements the `IAuditingStore` to save the a ## How to Install -This module comes as pre-installed (as NuGet/NPM packages) when you [create a new solution](https://abp.io/get-started) with the ABP Framework. You can continue to use it as package and get updates easily, or you can include its source code into your solution (see `get-source` [CLI](../CLI.md) command) to develop your custom module. +This module comes as pre-installed (as NuGet/NPM packages). You can continue to use it as package and get updates easily, or you can include its source code into your solution (see `get-source` [CLI](../CLI.md) command) to develop your custom module. ### The Source Code diff --git a/docs/en/Modules/Background-Jobs.md b/docs/en/Modules/Background-Jobs.md index 6cce8a6c95..5fd57d812c 100644 --- a/docs/en/Modules/Background-Jobs.md +++ b/docs/en/Modules/Background-Jobs.md @@ -6,7 +6,7 @@ The Background Jobs module implements the `IBackgroundJobStore` interface and ma ## How to Install -This module comes as pre-installed (as NuGet/NPM packages) when you [create a new solution](https://abp.io/get-started) with the ABP Framework. You can continue to use it as package and get updates easily, or you can include its source code into your solution (see `get-source` [CLI](../CLI.md) command) to develop your custom module. +This module comes as pre-installed (as NuGet/NPM packages). You can continue to use it as package and get updates easily, or you can include its source code into your solution (see `get-source` [CLI](../CLI.md) command) to develop your custom module. ### The Source Code diff --git a/docs/en/Modules/Docs.md b/docs/en/Modules/Docs.md index 94b50aea58..414a64d055 100644 --- a/docs/en/Modules/Docs.md +++ b/docs/en/Modules/Docs.md @@ -32,7 +32,7 @@ It is recommended to use ABP CLI to create new projects. Use the following comma abp new Acme.MyProject ``` -You can also navigate to https://abp.io/get-started. Enter your project name as `Acme.MyProject`, other use default options. +You can also generate a CLI command from [get started page](https://abp.io/get-started). Enter your project name as `Acme.MyProject`, other use default options. Note that this document covers `Entity Framework Core` provider but you can also select `MongoDB` as your database provider. diff --git a/docs/en/Modules/Feature-Management.md b/docs/en/Modules/Feature-Management.md index 9677e2f470..d6cf470391 100644 --- a/docs/en/Modules/Feature-Management.md +++ b/docs/en/Modules/Feature-Management.md @@ -6,7 +6,7 @@ The Feature Management module implements the `IFeatureManagementStore` interface ## How to Install -This module comes as pre-installed (as NuGet/NPM packages) when you [create a new solution](https://abp.io/get-started) with the ABP Framework. You can continue to use it as package and get updates easily, or you can include its source code into your solution (see `get-source` [CLI](../CLI.md) command) to develop your custom module. +This module comes as pre-installed (as NuGet/NPM packages). You can continue to use it as package and get updates easily, or you can include its source code into your solution (see `get-source` [CLI](../CLI.md) command) to develop your custom module. ### The Source Code diff --git a/docs/en/Modules/Identity.md b/docs/en/Modules/Identity.md index 4cd8bef316..f73e8073b2 100644 --- a/docs/en/Modules/Identity.md +++ b/docs/en/Modules/Identity.md @@ -4,7 +4,7 @@ Identity module is used to manage roles, users and their permissions, based on t ## How to Install -This module comes as pre-installed (as NuGet/NPM packages) when you [create a new solution](https://abp.io/get-started) with the ABP Framework. You can continue to use it as package and get updates easily, or you can include its source code into your solution (see `get-source` [CLI](../CLI.md) command) to develop your custom module. +This module comes as pre-installed (as NuGet/NPM packages). You can continue to use it as package and get updates easily, or you can include its source code into your solution (see `get-source` [CLI](../CLI.md) command) to develop your custom module. ### The Source Code diff --git a/docs/en/Modules/IdentityServer.md b/docs/en/Modules/IdentityServer.md index 90e9fe19eb..f754a29687 100644 --- a/docs/en/Modules/IdentityServer.md +++ b/docs/en/Modules/IdentityServer.md @@ -4,7 +4,7 @@ IdentityServer module provides a full integration with the [IdentityServer](http ## How to Install -This module comes as pre-installed (as NuGet/NPM packages) when you [create a new solution](https://abp.io/get-started) with the ABP Framework. You can continue to use it as package and get updates easily, or you can include its source code into your solution (see `get-source` [CLI](../CLI.md) command) to develop your custom module. +This module comes as pre-installed (as NuGet/NPM packages). You can continue to use it as package and get updates easily, or you can include its source code into your solution (see `get-source` [CLI](../CLI.md) command) to develop your custom module. ### The Source Code diff --git a/docs/en/Modules/OpenIddict.md b/docs/en/Modules/OpenIddict.md index 3a015011e6..32c51164ac 100644 --- a/docs/en/Modules/OpenIddict.md +++ b/docs/en/Modules/OpenIddict.md @@ -4,7 +4,7 @@ OpenIddict module provides an integration with the [OpenIddict](https://github.c ## How to Install -This module comes as pre-installed (as NuGet/NPM packages) when you [create a new solution](https://abp.io/get-started) with the ABP Framework. You can continue to use it as a package and get updates easily, or you can include its source code into your solution (see `get-source` [CLI](../CLI.md) command) to develop your custom module. +This module comes as pre-installed (as NuGet/NPM packages). You can continue to use it as a package and get updates easily, or you can include its source code into your solution (see `get-source` [CLI](../CLI.md) command) to develop your custom module. ### The Source Code diff --git a/docs/en/Modules/Permission-Management.md b/docs/en/Modules/Permission-Management.md index b97ddfca6c..e77a284a42 100644 --- a/docs/en/Modules/Permission-Management.md +++ b/docs/en/Modules/Permission-Management.md @@ -6,7 +6,7 @@ This module implements the `IPermissionStore` to store and manage permissions va ## How to Install -This module comes as pre-installed (as NuGet/NPM packages) when you [create a new solution](https://abp.io/get-started) with the ABP Framework. You can continue to use it as package and get updates easily, or you can include its source code into your solution (see `get-source` [CLI](../CLI.md) command) to develop your custom module. +This module comes as pre-installed (as NuGet/NPM packages). You can continue to use it as package and get updates easily, or you can include its source code into your solution (see `get-source` [CLI](../CLI.md) command) to develop your custom module. ### The Source Code diff --git a/docs/en/Startup-Templates/Application-Single-Layer.md b/docs/en/Startup-Templates/Application-Single-Layer.md index 95ebad55a7..7574ae3f7b 100644 --- a/docs/en/Startup-Templates/Application-Single-Layer.md +++ b/docs/en/Startup-Templates/Application-Single-Layer.md @@ -10,7 +10,7 @@ ABP's [Application Startup Template](Application.md) provides a well-organized a ## How to Start with It? -You can use the [ABP CLI](../CLI.md) to create a new project using this startup template. Alternatively, you can directly create & download this startup template from the [Get Started](https://abp.io/get-started) page. In this section, we will use the ABP CLI. +You can use the [ABP CLI](../CLI.md) to create a new project using this startup template. Alternatively, you can generate a CLI command for this startup template from the [Get Started](https://abp.io/get-started) page. In this section, we will use the ABP CLI. Firstly, install the ABP CLI if you haven't installed it before: diff --git a/docs/en/Startup-Templates/Application.md b/docs/en/Startup-Templates/Application.md index 6a47363e8c..98ccdd10d2 100644 --- a/docs/en/Startup-Templates/Application.md +++ b/docs/en/Startup-Templates/Application.md @@ -11,7 +11,7 @@ This document explains **the solution structure** and projects in details. If yo ## How to Start With? -You can use the [ABP CLI](../CLI.md) to create a new project using this startup template. Alternatively, you can directly create & download from the [Get Started](https://abp.io/get-started) page. CLI approach is used here. +You can use the [ABP CLI](../CLI.md) to create a new project using this startup template. Alternatively, you can generate a CLI command from the [Get Started](https://abp.io/get-started) page. CLI approach is used here. First, install the ABP CLI if you haven't installed it before: diff --git a/docs/en/Startup-Templates/Module.md b/docs/en/Startup-Templates/Module.md index afb6496ed5..faf4cb41a2 100644 --- a/docs/en/Startup-Templates/Module.md +++ b/docs/en/Startup-Templates/Module.md @@ -4,7 +4,7 @@ This template can be used to create a **reusable [application module](../Modules ## How to Start With? -You can use the [ABP CLI](../CLI.md) to create a new project using this startup template. Alternatively, you can directly create & download from the [Get Started](https://abp.io/get-started) page. CLI approach is used here. +You can use the [ABP CLI](../CLI.md) to create a new project using this startup template. Alternatively, you can generate a CLI command from the [Get Started](https://abp.io/get-started) page. CLI approach is used here. First, install the ABP CLI if you haven't installed before: diff --git a/docs/en/Tutorials/Todo/Single-Layer/todo-single-layer-ui-initial.png b/docs/en/Tutorials/Todo/Single-Layer/todo-single-layer-ui-initial.png index 2393505147..a1d113f574 100644 Binary files a/docs/en/Tutorials/Todo/Single-Layer/todo-single-layer-ui-initial.png and b/docs/en/Tutorials/Todo/Single-Layer/todo-single-layer-ui-initial.png differ diff --git a/docs/en/Tutorials/Todo/todo-list.png b/docs/en/Tutorials/Todo/todo-list.png index e2eaf8bc46..6394dd8f29 100644 Binary files a/docs/en/Tutorials/Todo/todo-list.png and b/docs/en/Tutorials/Todo/todo-list.png differ diff --git a/docs/en/Tutorials/Todo/todo-ui-initial.png b/docs/en/Tutorials/Todo/todo-ui-initial.png index 44be4ceaf6..9cc1b2e2be 100644 Binary files a/docs/en/Tutorials/Todo/todo-ui-initial.png and b/docs/en/Tutorials/Todo/todo-ui-initial.png differ diff --git a/docs/en/UI/Angular/Quick-Start.md b/docs/en/UI/Angular/Quick-Start.md index e3f25ceb01..768b3b7b67 100644 --- a/docs/en/UI/Angular/Quick-Start.md +++ b/docs/en/UI/Angular/Quick-Start.md @@ -37,19 +37,9 @@ This command will prepare a solution with an Angular and a .NET Core project in To continue reading without checking other methods, visit [Angular project structure section](#angular-project-structure). -### 2. Direct Download +### 2. Generating a CLI Command from Get Started Page -You may [download a solution scaffold directly on ABP.io](https://abp.io/get-started) if you are more comfortable with GUI or simply want to try ABP without installing the CLI. - -Please do the following: - -1. Click on the "DIRECT DOWNLOAD" tab. -2. Fill out the short form about your project. -3. Click on the "Create now" button. - -...and a customized download will start in a few seconds. - -To avoid IDE warnings, run `yarn` or `npm install` in the Angular root folder before you continue to the next section. It is not imperative but recommended. +You can generate a CLI command on the [get started page of the abp.io website](https://abp.io/get-started). Then, use the command on your terminal to create a new [Startup Template](../../Startup-Templates/Index.md). ## Angular Project Structure diff --git a/framework/src/Volo.Abp.EntityFrameworkCore.MySQL/Volo.Abp.EntityFrameworkCore.MySQL.csproj b/framework/src/Volo.Abp.EntityFrameworkCore.MySQL/Volo.Abp.EntityFrameworkCore.MySQL.csproj index 90d40b1b5a..9c9f62d943 100644 --- a/framework/src/Volo.Abp.EntityFrameworkCore.MySQL/Volo.Abp.EntityFrameworkCore.MySQL.csproj +++ b/framework/src/Volo.Abp.EntityFrameworkCore.MySQL/Volo.Abp.EntityFrameworkCore.MySQL.csproj @@ -19,8 +19,8 @@ - - + + diff --git a/framework/src/Volo.Abp.Localization/Volo/Abp/Localization/LanguageInfo.cs b/framework/src/Volo.Abp.Localization/Volo/Abp/Localization/LanguageInfo.cs index 38d2e973a0..9183b89c4e 100644 --- a/framework/src/Volo.Abp.Localization/Volo/Abp/Localization/LanguageInfo.cs +++ b/framework/src/Volo.Abp.Localization/Volo/Abp/Localization/LanguageInfo.cs @@ -1,4 +1,5 @@ using System; +using System.Globalization; using JetBrains.Annotations; namespace Volo.Abp.Localization; @@ -15,9 +16,13 @@ public class LanguageInfo : ILanguageInfo [NotNull] public virtual string DisplayName { get; protected set; } + [NotNull] + public virtual string TwoLetterISOLanguageName { get; protected set; } + [CanBeNull] public virtual string FlagIcon { get; set; } + protected LanguageInfo() { @@ -49,5 +54,8 @@ public class LanguageInfo : ILanguageInfo DisplayName = !displayName.IsNullOrWhiteSpace() ? displayName : cultureName; + + TwoLetterISOLanguageName = new CultureInfo(cultureName) + .TwoLetterISOLanguageName; } } diff --git a/modules/openiddict/src/Volo.Abp.OpenIddict.EntityFrameworkCore/Volo/Abp/OpenIddict/Authorizations/EfCoreOpenIddictAuthorizationRepository.cs b/modules/openiddict/src/Volo.Abp.OpenIddict.EntityFrameworkCore/Volo/Abp/OpenIddict/Authorizations/EfCoreOpenIddictAuthorizationRepository.cs index fcd1aabed5..9cd5397bb4 100644 --- a/modules/openiddict/src/Volo.Abp.OpenIddict.EntityFrameworkCore/Volo/Abp/OpenIddict/Authorizations/EfCoreOpenIddictAuthorizationRepository.cs +++ b/modules/openiddict/src/Volo.Abp.OpenIddict.EntityFrameworkCore/Volo/Abp/OpenIddict/Authorizations/EfCoreOpenIddictAuthorizationRepository.cs @@ -89,6 +89,6 @@ public class EfCoreOpenIddictAuthorizationRepository : EfCoreRepository x.Id).Take(count).ToListAsync(cancellationToken: cancellationToken); } } diff --git a/modules/openiddict/src/Volo.Abp.OpenIddict.MongoDB/Volo/Abp/OpenIddict/Authorizations/MongoOpenIddictAuthorizationRepository.cs b/modules/openiddict/src/Volo.Abp.OpenIddict.MongoDB/Volo/Abp/OpenIddict/Authorizations/MongoOpenIddictAuthorizationRepository.cs index 2f96602f67..5103d009c1 100644 --- a/modules/openiddict/src/Volo.Abp.OpenIddict.MongoDB/Volo/Abp/OpenIddict/Authorizations/MongoOpenIddictAuthorizationRepository.cs +++ b/modules/openiddict/src/Volo.Abp.OpenIddict.MongoDB/Volo/Abp/OpenIddict/Authorizations/MongoOpenIddictAuthorizationRepository.cs @@ -77,6 +77,8 @@ public class MongoOpenIddictAuthorizationRepository : MongoDbRepository x.CreationDate < date) .Where(x => x.Status != OpenIddictConstants.Statuses.Valid || (x.Type == OpenIddictConstants.AuthorizationTypes.AdHoc && !tokens.Contains(x.Id))) + .OrderBy(x => x.Id) + .Take(count) .ToListAsync(cancellationToken: cancellationToken); } } diff --git a/npm/ng-packs/packages/core/src/lib/core.module.ts b/npm/ng-packs/packages/core/src/lib/core.module.ts index 4cf289a240..e3cd895022 100644 --- a/npm/ng-packs/packages/core/src/lib/core.module.ts +++ b/npm/ng-packs/packages/core/src/lib/core.module.ts @@ -33,8 +33,9 @@ import { getInitialData, localeInitializer } from './utils/initial-utils'; import { ShortDateTimePipe } from './pipes/short-date-time.pipe'; import { ShortTimePipe } from './pipes/short-time.pipe'; import { ShortDatePipe } from './pipes/short-date.pipe'; +import { QUEUE_MANAGER } from './tokens/queue.token'; +import { DefaultQueueManager } from './utils/queue'; import { IncludeLocalizationResourcesProvider } from './providers/include-localization-resources.provider'; -import { AuthGuard } from './abstracts/auth.guard'; /** * BaseCoreModule is the module that holds @@ -171,6 +172,10 @@ export class CoreModule { useValue: localizationContributor(options.localizations), deps: [LocalizationService], }, + { + provide: QUEUE_MANAGER, + useClass: DefaultQueueManager, + }, IncludeLocalizationResourcesProvider, ], }; diff --git a/npm/ng-packs/packages/core/src/lib/tests/initial-utils.spec.ts b/npm/ng-packs/packages/core/src/lib/tests/initial-utils.spec.ts index b28447be99..90100d4613 100644 --- a/npm/ng-packs/packages/core/src/lib/tests/initial-utils.spec.ts +++ b/npm/ng-packs/packages/core/src/lib/tests/initial-utils.spec.ts @@ -12,6 +12,7 @@ import { getInitialData, localeInitializer } from '../utils/initial-utils'; import * as environmentUtils from '../utils/environment-utils'; import * as multiTenancyUtils from '../utils/multi-tenancy-utils'; import { RestService } from '../services/rest.service'; +import { CHECK_AUTHENTICATION_STATE_FN_KEY } from '../tokens/check-authentication-state'; const environment = { oAuthConfig: { issuer: 'test' } }; @@ -41,6 +42,10 @@ describe('InitialUtils', () => { registerLocaleFn: () => Promise.resolve(), }, }, + { + provide: CHECK_AUTHENTICATION_STATE_FN_KEY, + useValue: () => {}, + }, ], }); @@ -51,6 +56,9 @@ describe('InitialUtils', () => { const environmentService = spectator.inject(EnvironmentService); const configStateService = spectator.inject(ConfigStateService); const sessionStateService = spectator.inject(SessionStateService); + //const checkAuthenticationState = spectator.inject(CHECK_AUTHENTICATION_STATE_FN_KEY); + + const authService = spectator.inject(AuthService); const parseTenantFromUrlSpy = jest.spyOn(multiTenancyUtils, 'parseTenantFromUrl'); const getRemoteEnvSpy = jest.spyOn(environmentUtils, 'getRemoteEnv'); @@ -65,7 +73,7 @@ describe('InitialUtils', () => { const configRefreshAppStateSpy = jest.spyOn(configStateService, 'refreshAppState'); configRefreshAppStateSpy.mockReturnValue(of(appConfigRes)); const sessionSetTenantSpy = jest.spyOn(sessionStateService, 'setTenant'); - + const authServiceInitSpy = jest.spyOn(authService, 'init'); const configStateGetOneSpy = jest.spyOn(configStateService, 'getOne'); configStateGetOneSpy.mockReturnValue(appConfigRes.currentTenant); @@ -79,6 +87,7 @@ describe('InitialUtils', () => { expect(configRefreshAppStateSpy).toHaveBeenCalled(); expect(environmentSetStateSpy).toHaveBeenCalledWith(environment); expect(sessionSetTenantSpy).toHaveBeenCalledWith(appConfigRes.currentTenant); + expect(authServiceInitSpy).toHaveBeenCalled(); }); }); diff --git a/npm/ng-packs/packages/oauth/src/lib/tests/api.interceptor.spec.ts b/npm/ng-packs/packages/oauth/src/lib/tests/api.interceptor.spec.ts index 97fa7035dd..1b102b8589 100644 --- a/npm/ng-packs/packages/oauth/src/lib/tests/api.interceptor.spec.ts +++ b/npm/ng-packs/packages/oauth/src/lib/tests/api.interceptor.spec.ts @@ -3,8 +3,7 @@ import { SpyObject } from '@ngneat/spectator'; import { createServiceFactory, SpectatorService } from '@ngneat/spectator/jest'; import { OAuthService } from 'angular-oauth2-oidc'; import { Subject, timer } from 'rxjs'; -import { ApiInterceptor } from '../interceptors/api.interceptor'; -import { HttpWaitService, SessionStateService, TENANT_KEY } from '@abp/ng.core'; +import { ApiInterceptor, HttpWaitService, SessionStateService, TENANT_KEY } from '@abp/ng.core'; describe('ApiInterceptor', () => { let spectator: SpectatorService; diff --git a/npm/ng-packs/packages/oauth/src/lib/tests/initial-utils.spec.ts b/npm/ng-packs/packages/oauth/src/lib/tests/initial-utils.spec.ts index 488c14113b..cd2dfbcac5 100644 --- a/npm/ng-packs/packages/oauth/src/lib/tests/initial-utils.spec.ts +++ b/npm/ng-packs/packages/oauth/src/lib/tests/initial-utils.spec.ts @@ -9,10 +9,8 @@ import { ConfigStateService, AbpApplicationConfigurationService, SessionStateService, - ApplicationConfigurationDto, } from '@abp/ng.core'; import * as clearOAuthStorageDefault from '../utils/clear-o-auth-storage'; -import { of } from 'rxjs'; import { checkAccessToken } from '../utils/check-access-token'; const environment = { oAuthConfig: { issuer: 'test' } }; @@ -49,33 +47,6 @@ describe('InitialUtils', () => { beforeEach(() => (spectator = createComponent())); - describe('#getInitialData', () => { - let mockInjector; - let configStateService; - let authService; - beforeEach(() => { - mockInjector = { - get: spectator.inject, - }; - configStateService = spectator.inject(ConfigStateService); - authService = spectator.inject(AuthService); - }); - - test('should called configStateService.refreshAppState', async () => { - const configRefreshAppStateSpy = jest.spyOn(configStateService, 'refreshAppState'); - const appConfigRes = { - currentTenant: { id: 'test', name: 'testing' }, - } as ApplicationConfigurationDto; - - configRefreshAppStateSpy.mockReturnValue(of(appConfigRes)); - - // Todo: refactor it - // await initFactory(mockInjector)(); - - expect(configRefreshAppStateSpy).toHaveBeenCalled(); - }); - }); - describe('#checkAccessToken', () => { let injector; let injectorSpy;