diff --git a/docs/en/Themes/LeptonXLite/Angular.md b/docs/en/Themes/LeptonXLite/Angular.md index 7ebb649aca..56b003e606 100644 --- a/docs/en/Themes/LeptonXLite/Angular.md +++ b/docs/en/Themes/LeptonXLite/Angular.md @@ -14,11 +14,15 @@ To add `LeptonX-lite` into your project, - Install `@abp/ng.theme.lepton-x` -`yarn add @abp/ng.theme.lepton-x@preview` +```bash +yarn add @abp/ng.theme.lepton-x +``` - Install `bootstrap-icons` -`yarn add bootstrap-icons` +```bash +yarn add bootstrap-icons +``` - Then, we need to edit the styles array in `angular.json` to replace the existing style with the new one in the following link : diff --git a/npm/ng-packs/packages/core/src/lib/tests/application-localization.service.spec.ts b/npm/ng-packs/packages/core/src/lib/tests/application-localization.service.spec.ts new file mode 100644 index 0000000000..4e81b39f59 --- /dev/null +++ b/npm/ng-packs/packages/core/src/lib/tests/application-localization.service.spec.ts @@ -0,0 +1,17 @@ +export const APPLICATION_LOCALIZATION_DATA = { + resources: { + Default: { texts: {}, baseResources: [] }, + MyProjectName: { + texts: { + "'{0}' and '{1}' do not match.": "'{0}' and '{1}' do not match.", + }, + baseResources: [], + }, + AbpIdentity: { + texts: { + Identity: 'identity', + }, + baseResources: [], + }, + }, +}; diff --git a/npm/ng-packs/packages/core/src/lib/tests/config-state.service.spec.ts b/npm/ng-packs/packages/core/src/lib/tests/config-state.service.spec.ts index 3dc1b45732..58040e8652 100644 --- a/npm/ng-packs/packages/core/src/lib/tests/config-state.service.spec.ts +++ b/npm/ng-packs/packages/core/src/lib/tests/config-state.service.spec.ts @@ -8,6 +8,9 @@ import { } from '../proxy/volo/abp/asp-net-core/mvc/application-configurations/models'; import { ConfigStateService } from '../services'; import { CORE_OPTIONS } from '../tokens'; +import { IncludeLocalizationResourcesProvider } from '../providers'; +import { APPLICATION_LOCALIZATION_DATA } from './application-localization.service.spec'; +import { AbpApplicationLocalizationService } from '../proxy/volo/abp/asp-net-core/mvc/application-configurations/abp-application-localization.service'; export const CONFIG_STATE_DATA = { environment: { @@ -34,14 +37,7 @@ export const CONFIG_STATE_DATA = { layouts: [null, null, null], }, localization: { - values: { - MyProjectName: { - "'{0}' and '{1}' do not match.": "'{0}' and '{1}' do not match.", - }, - AbpIdentity: { - Identity: 'identity', - }, - }, + values: {}, languages: [ { cultureName: 'cs', @@ -115,6 +111,11 @@ describe('ConfigStateService', () => { provide: AbpApplicationConfigurationService, useValue: { get: () => of(CONFIG_STATE_DATA) }, }, + { + provide: AbpApplicationLocalizationService, + useValue: { get: () => APPLICATION_LOCALIZATION_DATA }, + }, + IncludeLocalizationResourcesProvider, ], }); diff --git a/npm/ng-packs/packages/core/src/lib/tests/date-utils.spec.ts b/npm/ng-packs/packages/core/src/lib/tests/date-utils.spec.ts index 20ef2e4a48..33f02dfb4f 100644 --- a/npm/ng-packs/packages/core/src/lib/tests/date-utils.spec.ts +++ b/npm/ng-packs/packages/core/src/lib/tests/date-utils.spec.ts @@ -15,7 +15,7 @@ describe('Date Utils', () => { let config: ConfigStateService; beforeEach(() => { - config = new ConfigStateService(null); + config = new ConfigStateService(null, null, null); }); describe('#getShortDateFormat', () => { diff --git a/npm/ng-packs/packages/core/src/lib/tests/localization-utils.spec.ts b/npm/ng-packs/packages/core/src/lib/tests/localization-utils.spec.ts index c12b7b61ce..4af0755d6c 100644 --- a/npm/ng-packs/packages/core/src/lib/tests/localization-utils.spec.ts +++ b/npm/ng-packs/packages/core/src/lib/tests/localization-utils.spec.ts @@ -57,6 +57,7 @@ describe('Localization Utils', () => { languages: [], languageFilesMap: null, languagesMap: null, + resources: {}, }); test.each` @@ -100,6 +101,7 @@ describe('Localization Utils', () => { languages: [], languageFilesMap: null, languagesMap: null, + resources: {}, }); test.each` @@ -148,6 +150,7 @@ describe('Localization Utils', () => { languages: [], languageFilesMap: null, languagesMap: null, + resources: {}, }); test.each` diff --git a/npm/ng-packs/packages/core/src/lib/tests/localization.service.spec.ts b/npm/ng-packs/packages/core/src/lib/tests/localization.service.spec.ts index 5aedd28f6e..d2eb653a85 100644 --- a/npm/ng-packs/packages/core/src/lib/tests/localization.service.spec.ts +++ b/npm/ng-packs/packages/core/src/lib/tests/localization.service.spec.ts @@ -8,8 +8,12 @@ import { SessionStateService } from '../services/session-state.service'; import { LocalizationService } from '../services/localization.service'; import { CORE_OPTIONS } from '../tokens/options.token'; import { CONFIG_STATE_DATA } from './config-state.service.spec'; +import { AbpApplicationLocalizationService } from '../proxy/volo/abp/asp-net-core/mvc/application-configurations/abp-application-localization.service'; +import { APPLICATION_LOCALIZATION_DATA } from './application-localization.service.spec'; +import { IncludeLocalizationResourcesProvider } from '../providers'; const appConfigData$ = new BehaviorSubject(CONFIG_STATE_DATA); +const appLocalizationData$ = new BehaviorSubject(APPLICATION_LOCALIZATION_DATA); describe('LocalizationService', () => { let spectator: SpectatorService; @@ -22,6 +26,7 @@ describe('LocalizationService', () => { entryComponents: [], mocks: [Router], providers: [ + IncludeLocalizationResourcesProvider, { provide: CORE_OPTIONS, useValue: { registerLocaleFn: () => Promise.resolve(), cultureNameLocaleFileMap: {} }, @@ -30,6 +35,10 @@ describe('LocalizationService', () => { provide: AbpApplicationConfigurationService, useValue: { get: () => appConfigData$ }, }, + { + provide: AbpApplicationLocalizationService, + useValue: { get: () => appLocalizationData$ }, + }, ], }); diff --git a/npm/ng-packs/packages/core/src/lib/tests/permission.guard.spec.ts b/npm/ng-packs/packages/core/src/lib/tests/permission.guard.spec.ts index 4369b8434f..372f3434f3 100644 --- a/npm/ng-packs/packages/core/src/lib/tests/permission.guard.spec.ts +++ b/npm/ng-packs/packages/core/src/lib/tests/permission.guard.spec.ts @@ -9,6 +9,7 @@ import { HttpErrorReporterService } from '../services/http-error-reporter.servic import { PermissionService } from '../services/permission.service'; import { RoutesService } from '../services/routes.service'; import { CORE_OPTIONS } from '../tokens/options.token'; +import { IncludeLocalizationResourcesProvider } from '../providers'; describe('PermissionGuard', () => { let spectator: SpectatorService; @@ -36,7 +37,7 @@ describe('PermissionGuard', () => { }, }, ], - { relativeLinkResolution: 'legacy' }, + {}, ), ], providers: [ @@ -45,6 +46,7 @@ describe('PermissionGuard', () => { useValue: '/', }, { provide: CORE_OPTIONS, useValue: { skipGetAppConfiguration: true } }, + IncludeLocalizationResourcesProvider, ], });