diff --git a/npm/ng-packs/packages/core/src/lib/utils/date-utils.ts b/npm/ng-packs/packages/core/src/lib/utils/date-utils.ts index ee44fb99cc..6c4793f895 100644 --- a/npm/ng-packs/packages/core/src/lib/utils/date-utils.ts +++ b/npm/ng-packs/packages/core/src/lib/utils/date-utils.ts @@ -1,10 +1,11 @@ import { ApplicationConfiguration } from '../models/application-configuration'; +import { DateTimeFormatDto } from '../proxy/volo/abp/asp-net-core/mvc/application-configurations/models'; import { ConfigStateService } from '../services'; export function getShortDateFormat(configStateService: ConfigStateService) { const dateTimeFormat = configStateService.getDeep( 'localization.currentCulture.dateTimeFormat', - ) as ApplicationConfiguration.DateTimeFormat; + ) as DateTimeFormatDto; return dateTimeFormat.shortDatePattern; } @@ -12,7 +13,7 @@ export function getShortDateFormat(configStateService: ConfigStateService) { export function getShortTimeFormat(configStateService: ConfigStateService) { const dateTimeFormat = configStateService.getDeep( 'localization.currentCulture.dateTimeFormat', - ) as ApplicationConfiguration.DateTimeFormat; + ) as DateTimeFormatDto; return dateTimeFormat.shortTimePattern.replace('tt', 'a'); } @@ -20,7 +21,7 @@ export function getShortTimeFormat(configStateService: ConfigStateService) { export function getShortDateShortTimeFormat(configStateService: ConfigStateService) { const dateTimeFormat = configStateService.getDeep( 'localization.currentCulture.dateTimeFormat', - ) as ApplicationConfiguration.DateTimeFormat; + ) as DateTimeFormatDto; return `${dateTimeFormat.shortDatePattern} ${dateTimeFormat.shortTimePattern.replace('tt', 'a')}`; } diff --git a/npm/ng-packs/packages/core/src/lib/utils/initial-utils.ts b/npm/ng-packs/packages/core/src/lib/utils/initial-utils.ts index c4b8e012ab..4291219db8 100644 --- a/npm/ng-packs/packages/core/src/lib/utils/initial-utils.ts +++ b/npm/ng-packs/packages/core/src/lib/utils/initial-utils.ts @@ -6,7 +6,8 @@ import { tap } from 'rxjs/operators'; import { ApplicationConfiguration } from '../models/application-configuration'; import { ABP } from '../models/common'; import { Environment } from '../models/environment'; -import { ApplicationConfigurationService } from '../services/application-configuration.service'; +import { AbpApplicationConfigurationService } from '../proxy/volo/abp/asp-net-core/mvc/application-configurations/abp-application-configuration.service'; +import { CurrentTenantDto } from '../proxy/volo/abp/asp-net-core/mvc/multi-tenancy/models'; import { AuthService } from '../services/auth.service'; import { ConfigStateService } from '../services/config-state.service'; import { EnvironmentService } from '../services/environment.service'; @@ -20,7 +21,7 @@ export function getInitialData(injector: Injector) { const fn = async () => { const environmentService = injector.get(EnvironmentService); const configState = injector.get(ConfigStateService); - const appConfigService = injector.get(ApplicationConfigurationService); + const appConfigService = injector.get(AbpApplicationConfigurationService); const options = injector.get(CORE_OPTIONS) as ABP.Root; environmentService.setState(options.environment as Environment); @@ -31,14 +32,12 @@ export function getInitialData(injector: Injector) { if (options.skipGetAppConfiguration) return; return appConfigService - .getConfiguration() + .get() .pipe( tap(res => configState.setState(res)), tap(() => checkAccessToken(injector)), tap(() => { - const currentTenant = configState.getOne( - 'currentTenant', - ) as ApplicationConfiguration.CurrentTenant; + const currentTenant = configState.getOne('currentTenant') as CurrentTenantDto; if (!currentTenant?.id) return; injector.get(SessionStateService).setTenant(currentTenant); diff --git a/npm/ng-packs/packages/core/src/lib/utils/localization-utils.ts b/npm/ng-packs/packages/core/src/lib/utils/localization-utils.ts index 09478c8ed8..e9014a52db 100644 --- a/npm/ng-packs/packages/core/src/lib/utils/localization-utils.ts +++ b/npm/ng-packs/packages/core/src/lib/utils/localization-utils.ts @@ -1,4 +1,4 @@ -import { ApplicationConfiguration } from '../models/application-configuration'; +import { ApplicationLocalizationConfigurationDto } from '../proxy/volo/abp/asp-net-core/mvc/application-configurations/models'; // This will not be necessary when only Angukar 9.1+ is supported export function getLocaleDirection(locale: string): 'ltr' | 'rtl' { @@ -9,7 +9,7 @@ export function getLocaleDirection(locale: string): 'ltr' | 'rtl' { : 'ltr'; } -export function createLocalizer(localization: ApplicationConfiguration.Localization) { +export function createLocalizer(localization: ApplicationLocalizationConfigurationDto) { return (resourceName: string, key: string, defaultValue: string) => { if (resourceName === '_') return key; @@ -21,7 +21,7 @@ export function createLocalizer(localization: ApplicationConfiguration.Localizat }; } -export function createLocalizerWithFallback(localization: ApplicationConfiguration.Localization) { +export function createLocalizerWithFallback(localization: ApplicationLocalizationConfigurationDto) { const findLocalization = createLocalizationFinder(localization); return (resourceNames: string[], keys: string[], defaultValue: string) => { @@ -31,7 +31,7 @@ export function createLocalizerWithFallback(localization: ApplicationConfigurati } export function createLocalizationPipeKeyGenerator( - localization: ApplicationConfiguration.Localization, + localization: ApplicationLocalizationConfigurationDto, ) { const findLocalization = createLocalizationFinder(localization); @@ -41,7 +41,7 @@ export function createLocalizationPipeKeyGenerator( }; } -function createLocalizationFinder(localization: ApplicationConfiguration.Localization) { +function createLocalizationFinder(localization: ApplicationLocalizationConfigurationDto) { const localize = createLocalizer(localization); return (resourceNames: string[], keys: string[]) => { diff --git a/npm/ng-packs/packages/core/src/lib/utils/multi-tenancy-utils.ts b/npm/ng-packs/packages/core/src/lib/utils/multi-tenancy-utils.ts index ede1a1cbc8..abfc33d723 100644 --- a/npm/ng-packs/packages/core/src/lib/utils/multi-tenancy-utils.ts +++ b/npm/ng-packs/packages/core/src/lib/utils/multi-tenancy-utils.ts @@ -3,6 +3,8 @@ import clone from 'just-clone'; import { of } from 'rxjs'; import { switchMap, tap } from 'rxjs/operators'; import { Environment } from '../models/environment'; +import { AbpTenantService } from '../proxy/pages/abp/multi-tenancy/abp-tenant.service'; +import { CurrentTenantDto } from '../proxy/volo/abp/asp-net-core/mvc/multi-tenancy/models'; import { EnvironmentService } from '../services/environment.service'; import { MultiTenancyService } from '../services/multi-tenancy.service'; import { createTokenParser } from './string-utils'; @@ -20,6 +22,7 @@ function getCurrentTenancyName(appBaseUrl: string): string { export async function parseTenantFromUrl(injector: Injector) { const environmentService = injector.get(EnvironmentService); const multiTenancyService = injector.get(MultiTenancyService); + const abpTenantService = injector.get(AbpTenantService); const baseUrl = environmentService.getEnvironment()?.application?.baseUrl || ''; const tenancyName = getCurrentTenancyName(baseUrl); @@ -30,10 +33,10 @@ export async function parseTenantFromUrl(injector: Injector) { return of(null) .pipe( - switchMap(() => multiTenancyService.findTenantByName(tenancyName, { __tenant: '' })), + switchMap(() => abpTenantService.findTenantByName(tenancyName, { __tenant: '' })), tap(res => { multiTenancyService.domainTenant = res.success - ? { id: res.tenantId, name: res.name } + ? ({ id: res.tenantId, name: res.name } as CurrentTenantDto) : null; }), ) diff --git a/npm/ng-packs/packages/core/src/public-api.ts b/npm/ng-packs/packages/core/src/public-api.ts index ec8fddfea8..e37884c3a1 100644 --- a/npm/ng-packs/packages/core/src/public-api.ts +++ b/npm/ng-packs/packages/core/src/public-api.ts @@ -21,3 +21,11 @@ export * from './lib/strategies'; export * from './lib/tokens'; export * from './lib/utils'; export * from './lib/validators'; +export * from './lib/proxy/volo/abp/asp-net-core/mvc/api-exploring'; +export * from './lib/proxy/volo/abp/asp-net-core/mvc/multi-tenancy'; +export * from './lib/proxy/volo/abp/asp-net-core/mvc/application-configurations'; +export * from './lib/proxy/volo/abp/asp-net-core/mvc/application-configurations/object-extending'; +export * from './lib/proxy/volo/abp/http/modeling'; +export * from './lib/proxy/volo/abp/models'; +export * from './lib/proxy/volo/abp/localization'; +export * from './lib/proxy/pages/abp/multi-tenancy'; diff --git a/npm/ng-packs/packages/feature-management/src/lib/components/feature-management/feature-management.component.ts b/npm/ng-packs/packages/feature-management/src/lib/components/feature-management/feature-management.component.ts index ab819da42f..99c0f3d133 100644 --- a/npm/ng-packs/packages/feature-management/src/lib/components/feature-management/feature-management.component.ts +++ b/npm/ng-packs/packages/feature-management/src/lib/components/feature-management/feature-management.component.ts @@ -1,4 +1,8 @@ -import { ApplicationConfigurationService, ConfigStateService, TrackByService } from '@abp/ng.core'; +import { + AbpApplicationConfigurationService, + ConfigStateService, + TrackByService, +} from '@abp/ng.core'; import { LocaleDirection } from '@abp/ng.theme.shared'; import { Component, EventEmitter, Input, Output } from '@angular/core'; import { Store } from '@ngxs/store'; @@ -66,7 +70,7 @@ export class FeatureManagementComponent protected service: FeaturesService, protected store: Store, protected configState: ConfigStateService, - protected appConfigService: ApplicationConfigurationService, + protected appConfigService: AbpApplicationConfigurationService, ) {} openModal() { @@ -118,7 +122,7 @@ export class FeatureManagementComponent if (!this.providerKey) { // to refresh host's features this.appConfigService - .getConfiguration() + .get() .pipe(tap(res => this.configState.setState(res))) .subscribe(); } diff --git a/npm/ng-packs/packages/permission-management/src/lib/components/permission-management.component.ts b/npm/ng-packs/packages/permission-management/src/lib/components/permission-management.component.ts index 5b4623aeed..67a48cb507 100644 --- a/npm/ng-packs/packages/permission-management/src/lib/components/permission-management.component.ts +++ b/npm/ng-packs/packages/permission-management/src/lib/components/permission-management.component.ts @@ -1,7 +1,7 @@ import { - ApplicationConfiguration, - ApplicationConfigurationService, + AbpApplicationConfigurationService, ConfigStateService, + CurrentUserDto, } from '@abp/ng.core'; import { LocaleDirection } from '@abp/ng.theme.shared'; import { Component, EventEmitter, Input, Output, TrackByFunction } from '@angular/core'; @@ -118,7 +118,7 @@ export class PermissionManagementComponent constructor( protected store: Store, protected configState: ConfigStateService, - protected appConfigService: ApplicationConfigurationService, + protected appConfigService: AbpApplicationConfigurationService, ) {} getChecked(name: string) { @@ -254,9 +254,7 @@ export class PermissionManagementComponent .pipe( switchMap(() => this.shouldFetchAppConfig() - ? this.appConfigService - .getConfiguration() - .pipe(tap(res => this.configState.setState(res))) + ? this.appConfigService.get().pipe(tap(res => this.configState.setState(res))) : of(null), ), finalize(() => (this.modalBusy = false)), @@ -300,9 +298,7 @@ export class PermissionManagementComponent } shouldFetchAppConfig() { - const currentUser = this.configState.getOne( - 'currentUser', - ) as ApplicationConfiguration.CurrentUser; + const currentUser = this.configState.getOne('currentUser') as CurrentUserDto; if (this.providerName === 'R') return currentUser.roles.some(role => role === this.providerKey); diff --git a/npm/ng-packs/packages/theme-basic/src/lib/components/nav-items/current-user.component.ts b/npm/ng-packs/packages/theme-basic/src/lib/components/nav-items/current-user.component.ts index 9b24a7b999..fc4b50ec31 100644 --- a/npm/ng-packs/packages/theme-basic/src/lib/components/nav-items/current-user.component.ts +++ b/npm/ng-packs/packages/theme-basic/src/lib/components/nav-items/current-user.component.ts @@ -1,9 +1,4 @@ -import { - ApplicationConfiguration, - AuthService, - ConfigStateService, - EnvironmentService, -} from '@abp/ng.core'; +import { AuthService, ConfigStateService, CurrentUserDto, EnvironmentService } from '@abp/ng.core'; import { Component } from '@angular/core'; import { Router } from '@angular/router'; import { Observable } from 'rxjs'; @@ -52,9 +47,7 @@ import { Observable } from 'rxjs'; `, }) export class CurrentUserComponent { - currentUser$: Observable = this.configState.getOne$( - 'currentUser', - ); + currentUser$: Observable = this.configState.getOne$('currentUser'); get smallScreen(): boolean { return window.innerWidth < 992; diff --git a/npm/ng-packs/packages/theme-basic/src/lib/components/nav-items/languages.component.ts b/npm/ng-packs/packages/theme-basic/src/lib/components/nav-items/languages.component.ts index 6df8beef7a..7f73e312cf 100644 --- a/npm/ng-packs/packages/theme-basic/src/lib/components/nav-items/languages.component.ts +++ b/npm/ng-packs/packages/theme-basic/src/lib/components/nav-items/languages.component.ts @@ -1,4 +1,4 @@ -import { ApplicationConfiguration, ConfigStateService, SessionStateService } from '@abp/ng.core'; +import { ConfigStateService, LanguageInfo, SessionStateService } from '@abp/ng.core'; import { Component } from '@angular/core'; import { Observable } from 'rxjs'; import { map } from 'rxjs/operators'; @@ -48,9 +48,7 @@ export class LanguagesComponent { return window.innerWidth < 992; } - languages$: Observable = this.configState.getDeep$( - 'localization.languages', - ); + languages$: Observable = this.configState.getDeep$('localization.languages'); get defaultLanguage$(): Observable { return this.languages$.pipe( @@ -64,7 +62,7 @@ export class LanguagesComponent { ); } - get dropdownLanguages$(): Observable { + get dropdownLanguages$(): Observable { return this.languages$.pipe( map( languages => diff --git a/npm/ng-packs/packages/theme-shared/extensions/src/lib/utils/localization.util.ts b/npm/ng-packs/packages/theme-shared/extensions/src/lib/utils/localization.util.ts index 8cd4694d3b..227735591b 100644 --- a/npm/ng-packs/packages/theme-shared/extensions/src/lib/utils/localization.util.ts +++ b/npm/ng-packs/packages/theme-shared/extensions/src/lib/utils/localization.util.ts @@ -1,8 +1,11 @@ -import { ApplicationConfiguration, createLocalizationPipeKeyGenerator } from '@abp/ng.core'; +import { + ApplicationLocalizationConfigurationDto, + createLocalizationPipeKeyGenerator, +} from '@abp/ng.core'; import { ObjectExtensions } from '../models/object-extensions'; export function createDisplayNameLocalizationPipeKeyGenerator( - localization: ApplicationConfiguration.Localization, + localization: ApplicationLocalizationConfigurationDto, ) { const generateLocalizationPipeKey = createLocalizationPipeKeyGenerator(localization); diff --git a/npm/ng-packs/packages/theme-shared/extensions/src/lib/utils/state.util.ts b/npm/ng-packs/packages/theme-shared/extensions/src/lib/utils/state.util.ts index 6c122721e3..141d503f46 100644 --- a/npm/ng-packs/packages/theme-shared/extensions/src/lib/utils/state.util.ts +++ b/npm/ng-packs/packages/theme-shared/extensions/src/lib/utils/state.util.ts @@ -1,4 +1,4 @@ -import { ABP, ApplicationConfiguration, ConfigStateService } from '@abp/ng.core'; +import { ABP, ApplicationLocalizationConfigurationDto, ConfigStateService } from '@abp/ng.core'; import { Observable, pipe, zip } from 'rxjs'; import { filter, map, switchMap, take } from 'rxjs/operators'; import { ePropType } from '../enums/props.enum'; @@ -19,7 +19,7 @@ function selectObjectExtensions( function selectLocalization( configState: ConfigStateService, -): Observable { +): Observable { return configState.getOne$('localization'); } diff --git a/npm/ng-packs/packages/theme-shared/extensions/src/tests/localization.util.spec.ts b/npm/ng-packs/packages/theme-shared/extensions/src/tests/localization.util.spec.ts index f0abe48f76..007b304b42 100644 --- a/npm/ng-packs/packages/theme-shared/extensions/src/tests/localization.util.spec.ts +++ b/npm/ng-packs/packages/theme-shared/extensions/src/tests/localization.util.spec.ts @@ -1,3 +1,4 @@ +import { ApplicationLocalizationConfigurationDto } from '@abp/ng.core'; import { createDisplayNameLocalizationPipeKeyGenerator } from '../lib/utils/localization.util'; describe('Localization Utils', () => { @@ -10,7 +11,9 @@ describe('Localization Utils', () => { defaultResourceName: 'Default', currentCulture: null, languages: [], - }); + languageFilesMap: null, + languagesMap: null, + } as ApplicationLocalizationConfigurationDto); test.each` displayName | fallback | expected diff --git a/npm/ng-packs/packages/theme-shared/src/lib/handlers/error.handler.ts b/npm/ng-packs/packages/theme-shared/src/lib/handlers/error.handler.ts index d54d219c6f..c4a4d2db72 100644 --- a/npm/ng-packs/packages/theme-shared/src/lib/handlers/error.handler.ts +++ b/npm/ng-packs/packages/theme-shared/src/lib/handlers/error.handler.ts @@ -1,4 +1,4 @@ -import { Config, RestOccurError } from '@abp/ng.core'; +import { Config, LocalizationParam, RestOccurError } from '@abp/ng.core'; import { HttpErrorResponse } from '@angular/common/http'; import { ApplicationRef, @@ -87,10 +87,7 @@ export class ErrorHandler { private listenToRouterError() { this.actions - .pipe( - ofActionSuccessful(RouterError), - filter(this.filterRouteErrors), - ) + .pipe(ofActionSuccessful(RouterError), filter(this.filterRouteErrors)) .subscribe(() => this.show404Page()); } @@ -233,8 +230,8 @@ export class ErrorHandler { } private showError( - message?: Config.LocalizationParam, - title?: Config.LocalizationParam, + message?: LocalizationParam, + title?: LocalizationParam, body?: any, ): Observable { if (body) { diff --git a/npm/ng-packs/packages/theme-shared/src/lib/models/confirmation.ts b/npm/ng-packs/packages/theme-shared/src/lib/models/confirmation.ts index 086942a1c1..ad2ceb7545 100644 --- a/npm/ng-packs/packages/theme-shared/src/lib/models/confirmation.ts +++ b/npm/ng-packs/packages/theme-shared/src/lib/models/confirmation.ts @@ -1,4 +1,4 @@ -import { Config } from '@abp/ng.core'; +import { Config, LocalizationParam } from '@abp/ng.core'; export namespace Confirmation { export interface Options { @@ -8,8 +8,8 @@ export namespace Confirmation { titleLocalizationParams?: string[]; hideCancelBtn?: boolean; hideYesBtn?: boolean; - cancelText?: Config.LocalizationParam; - yesText?: Config.LocalizationParam; + cancelText?: LocalizationParam; + yesText?: LocalizationParam; } export interface DialogData { diff --git a/npm/ng-packs/packages/theme-shared/src/lib/models/toaster.ts b/npm/ng-packs/packages/theme-shared/src/lib/models/toaster.ts index beb5d4fc6c..1cd4e18bea 100644 --- a/npm/ng-packs/packages/theme-shared/src/lib/models/toaster.ts +++ b/npm/ng-packs/packages/theme-shared/src/lib/models/toaster.ts @@ -1,4 +1,4 @@ -import { Config } from '@abp/ng.core'; +import { Config, LocalizationParam } from '@abp/ng.core'; export namespace Toaster { export interface ToastOptions { @@ -13,8 +13,8 @@ export namespace Toaster { } export interface Toast { - message: Config.LocalizationParam; - title?: Config.LocalizationParam; + message: LocalizationParam; + title?: LocalizationParam; severity?: string; options?: ToastOptions; } @@ -24,8 +24,8 @@ export namespace Toaster { export interface Service { show: ( - message: Config.LocalizationParam, - title: Config.LocalizationParam, + message: LocalizationParam, + title: LocalizationParam, severity: Toaster.Severity, options: Partial, ) => ToasterId; diff --git a/npm/ng-packs/packages/theme-shared/src/lib/services/confirmation.service.ts b/npm/ng-packs/packages/theme-shared/src/lib/services/confirmation.service.ts index 70ad0d0e2b..e2556d311a 100644 --- a/npm/ng-packs/packages/theme-shared/src/lib/services/confirmation.service.ts +++ b/npm/ng-packs/packages/theme-shared/src/lib/services/confirmation.service.ts @@ -1,4 +1,4 @@ -import { Config, ContentProjectionService, PROJECTION_STRATEGY } from '@abp/ng.core'; +import { ContentProjectionService, LocalizationParam, PROJECTION_STRATEGY } from '@abp/ng.core'; import { ComponentRef, Injectable } from '@angular/core'; import { fromEvent, Observable, ReplaySubject, Subject } from 'rxjs'; import { debounceTime, filter, takeUntil } from 'rxjs/operators'; @@ -33,40 +33,40 @@ export class ConfirmationService { } info( - message: Config.LocalizationParam, - title: Config.LocalizationParam, + message: LocalizationParam, + title: LocalizationParam, options?: Partial, ): Observable { return this.show(message, title, 'info', options); } success( - message: Config.LocalizationParam, - title: Config.LocalizationParam, + message: LocalizationParam, + title: LocalizationParam, options?: Partial, ): Observable { return this.show(message, title, 'success', options); } warn( - message: Config.LocalizationParam, - title: Config.LocalizationParam, + message: LocalizationParam, + title: LocalizationParam, options?: Partial, ): Observable { return this.show(message, title, 'warning', options); } error( - message: Config.LocalizationParam, - title: Config.LocalizationParam, + message: LocalizationParam, + title: LocalizationParam, options?: Partial, ): Observable { return this.show(message, title, 'error', options); } show( - message: Config.LocalizationParam, - title: Config.LocalizationParam, + message: LocalizationParam, + title: LocalizationParam, severity?: Confirmation.Severity, options = {} as Partial, ): Observable { diff --git a/npm/ng-packs/packages/theme-shared/src/lib/services/toaster.service.ts b/npm/ng-packs/packages/theme-shared/src/lib/services/toaster.service.ts index 84275a0fc8..efd04b6ba0 100644 --- a/npm/ng-packs/packages/theme-shared/src/lib/services/toaster.service.ts +++ b/npm/ng-packs/packages/theme-shared/src/lib/services/toaster.service.ts @@ -1,9 +1,14 @@ +import { + ContentProjectionService, + LocalizationParam, + PROJECTION_STRATEGY, + Strict, +} from '@abp/ng.core'; import { ComponentRef, Injectable } from '@angular/core'; -import { Toaster } from '../models'; import { ReplaySubject } from 'rxjs'; -import { Config, ContentProjectionService, PROJECTION_STRATEGY, Strict } from '@abp/ng.core'; import snq from 'snq'; import { ToastContainerComponent } from '../components/toast-container/toast-container.component'; +import { Toaster } from '../models'; @Injectable({ providedIn: 'root', @@ -34,8 +39,8 @@ export class ToasterService implements ToasterContract { * @param options Spesific style or structural options for individual toast */ info( - message: Config.LocalizationParam, - title?: Config.LocalizationParam, + message: LocalizationParam, + title?: LocalizationParam, options?: Partial, ): Toaster.ToasterId { return this.show(message, title, 'info', options); @@ -48,8 +53,8 @@ export class ToasterService implements ToasterContract { * @param options Spesific style or structural options for individual toast */ success( - message: Config.LocalizationParam, - title?: Config.LocalizationParam, + message: LocalizationParam, + title?: LocalizationParam, options?: Partial, ): Toaster.ToasterId { return this.show(message, title, 'success', options); @@ -62,8 +67,8 @@ export class ToasterService implements ToasterContract { * @param options Spesific style or structural options for individual toast */ warn( - message: Config.LocalizationParam, - title?: Config.LocalizationParam, + message: LocalizationParam, + title?: LocalizationParam, options?: Partial, ): Toaster.ToasterId { return this.show(message, title, 'warning', options); @@ -76,8 +81,8 @@ export class ToasterService implements ToasterContract { * @param options Spesific style or structural options for individual toast */ error( - message: Config.LocalizationParam, - title?: Config.LocalizationParam, + message: LocalizationParam, + title?: LocalizationParam, options?: Partial, ): Toaster.ToasterId { return this.show(message, title, 'error', options); @@ -92,8 +97,8 @@ export class ToasterService implements ToasterContract { */ show( - message: Config.LocalizationParam, - title: Config.LocalizationParam = null, + message: LocalizationParam, + title: LocalizationParam = null, severity: Toaster.Severity = 'neutral', options = {} as Partial, ): Toaster.ToasterId { diff --git a/npm/ng-packs/packages/theme-shared/src/lib/utils/date-parser-formatter.ts b/npm/ng-packs/packages/theme-shared/src/lib/utils/date-parser-formatter.ts index cf24e4d82c..d0814e499c 100644 --- a/npm/ng-packs/packages/theme-shared/src/lib/utils/date-parser-formatter.ts +++ b/npm/ng-packs/packages/theme-shared/src/lib/utils/date-parser-formatter.ts @@ -1,4 +1,4 @@ -import { ApplicationConfiguration, ConfigStateService } from '@abp/ng.core'; +import { ApplicationLocalizationConfigurationDto, ConfigStateService } from '@abp/ng.core'; import { DatePipe } from '@angular/common'; import { Injectable, Optional } from '@angular/core'; import { NgbDateParserFormatter, NgbDateStruct } from '@ng-bootstrap/ng-bootstrap'; @@ -51,7 +51,7 @@ export class DateParserFormatter extends NgbDateParserFormatter { format(date: NgbDateStruct): string { const { shortDatePattern } = (this.configState.getOne( 'localization', - ) as ApplicationConfiguration.Localization).currentCulture.dateTimeFormat; + ) as ApplicationLocalizationConfigurationDto).currentCulture.dateTimeFormat; if (date && this.datePipe) { return this.datePipe.transform( diff --git a/templates/app/angular/yarn.lock b/templates/app/angular/yarn.lock index 3998e21b01..8c869f6ff9 100644 --- a/templates/app/angular/yarn.lock +++ b/templates/app/angular/yarn.lock @@ -2,15 +2,14 @@ # yarn lockfile v1 -"@abp/ng.core@~3.3.1": - version "3.3.1" - resolved "https://registry.yarnpkg.com/@abp/ng.core/-/ng.core-3.3.1.tgz#230518da3cd1a8b4efef85df9d4d07e5c66b2549" - integrity sha512-x2zD3zhK5YD9EaV1p8AEboj9yoqzYCvyOkb7YDDBNR1VP2v+m7T8NRASBHkVrGZLwLkyd/qwOBUjEitz8XAbUA== +"@abp/ng.core@~4.0.0-rc.4": + version "4.0.0-rc.4" + resolved "https://registry.yarnpkg.com/@abp/ng.core/-/ng.core-4.0.0-rc.4.tgz#f1cbb7d43662579a7977c9d98bf28f7a6726537f" + integrity sha512-EtvoUr52v4+DEn3j2mru4OiLJf9tcg5ptLRjwBg1psftz1t3atnmvP1F8+sIhOwnj/Zm5hlhqSqnedpTzdALPg== dependencies: - "@abp/utils" "^3.3.0" + "@abp/utils" "^4.0.0-rc.3" "@angular/localize" "~10.0.10" "@ngxs/router-plugin" "^3.7.0" - "@ngxs/storage-plugin" "^3.7.0" "@ngxs/store" "^3.7.0" angular-oauth2-oidc "^10.0.0" just-clone "^3.1.0" @@ -19,29 +18,29 @@ ts-toolbelt "6.15.4" tslib "^2.0.0" -"@abp/ng.feature-management@~3.3.1": - version "3.3.1" - resolved "https://registry.yarnpkg.com/@abp/ng.feature-management/-/ng.feature-management-3.3.1.tgz#b4497d999e87049b266473daf8d274d5fb26b248" - integrity sha512-SdUrZ67bGJQZ0RchS7bcA5wSF6PiD3hcJwsReWzw49nM2Qr8vbHlsstXww6slvq8nT5gwC6O0OA71zsHarpHfg== +"@abp/ng.feature-management@~4.0.0-rc.4": + version "4.0.0-rc.4" + resolved "https://registry.yarnpkg.com/@abp/ng.feature-management/-/ng.feature-management-4.0.0-rc.4.tgz#ab740e4327b8fd10ba4567bfeb24debbd4ffe8a5" + integrity sha512-PlWxAA2wECRrBGwqWeaWi+f3YPayIaOJhW4INTvD5JUFMIRJsOJZlxpmcz8x2pU64bUO42/YM26+Xy2TyVKFNg== dependencies: - "@abp/ng.theme.shared" "~3.3.1" + "@abp/ng.theme.shared" "~4.0.0-rc.4" tslib "^2.0.0" -"@abp/ng.identity@~3.3.1": - version "3.3.1" - resolved "https://registry.yarnpkg.com/@abp/ng.identity/-/ng.identity-3.3.1.tgz#e357e8bb1281e4fcbdeb20ef9d288eee6b274d3c" - integrity sha512-NjCmLdHUQtyGWPqIBo0OVSxUeQ4laQ501xPsJYZG7WOWmMJGTkBQKIFkUAG8gLKv8EDTIzBuVs8V8scr+EUSiw== +"@abp/ng.identity@~4.0.0-rc.4": + version "4.0.0-rc.4" + resolved "https://registry.yarnpkg.com/@abp/ng.identity/-/ng.identity-4.0.0-rc.4.tgz#5b8694b1d1d6f1a039e1a445add14dcc5d6eb5ad" + integrity sha512-nqx3ofuTT5kOdJHWAyrZyEmGGp08DZNNC7IIY7L1/NueiAcfjghKrAiGkNnt5SApdk86OzdrLdIvpELnZVCMzg== dependencies: - "@abp/ng.permission-management" "~3.3.1" - "@abp/ng.theme.shared" "~3.3.1" + "@abp/ng.permission-management" "~4.0.0-rc.4" + "@abp/ng.theme.shared" "~4.0.0-rc.4" tslib "^2.0.0" -"@abp/ng.permission-management@~3.3.1": - version "3.3.1" - resolved "https://registry.yarnpkg.com/@abp/ng.permission-management/-/ng.permission-management-3.3.1.tgz#2870a517b00b266c064df0914f0c4227c83677d7" - integrity sha512-69h0MLXOOQ9Iav4drwg1P6dcA+tl7+Vgt34IGJW1o0Aj0pYBlqBZQqq8IOW2g/xVLRE8qkfRnmoyAGBQfbJkTA== +"@abp/ng.permission-management@~4.0.0-rc.4": + version "4.0.0-rc.4" + resolved "https://registry.yarnpkg.com/@abp/ng.permission-management/-/ng.permission-management-4.0.0-rc.4.tgz#3d838528549860e2a8b6aba2c5f35f6764089322" + integrity sha512-2o/1dtfNQOkqHWzdHyI8Ske5E5VseCM+N3erJu4NSLIWrj5G3CG9wwbJm3BqEjHG7hzbcvR6fYxKpDUmqvQR0A== dependencies: - "@abp/ng.theme.shared" "~3.3.1" + "@abp/ng.theme.shared" "~4.0.0-rc.4" tslib "^2.0.0" "@abp/ng.schematics@~3.3.1": @@ -55,37 +54,37 @@ jsonc-parser "^2.3.0" typescript "~3.9.2" -"@abp/ng.setting-management@~3.3.1": - version "3.3.1" - resolved "https://registry.yarnpkg.com/@abp/ng.setting-management/-/ng.setting-management-3.3.1.tgz#f89ed79ab5b6348a5bd57a8699ee6298279e30ec" - integrity sha512-TGIeAUemaKEFcC/HG6d9JEYOG9EIYTry1goAKJReI0CShrykZUM5WPHe3wK0CQIqgI6MChVSYeq4yC+oyl8JnQ== +"@abp/ng.setting-management@~4.0.0-rc.4": + version "4.0.0-rc.4" + resolved "https://registry.yarnpkg.com/@abp/ng.setting-management/-/ng.setting-management-4.0.0-rc.4.tgz#45e7fe04a8069da19d644860617e5b5aeab39281" + integrity sha512-L7liYuB+DdWdcdJwG4OkQhBdb1bNqFO08TjfbRdkPARHje/tat+z8jtZ58yQVYOVCs9M2vJt3ydHnvZ+PQWpow== dependencies: - "@abp/ng.theme.shared" "~3.3.1" + "@abp/ng.theme.shared" "~4.0.0-rc.4" tslib "^2.0.0" -"@abp/ng.tenant-management@~3.3.1": - version "3.3.1" - resolved "https://registry.yarnpkg.com/@abp/ng.tenant-management/-/ng.tenant-management-3.3.1.tgz#315fdc5980adddbc9d561fba15bed6c27d8203ec" - integrity sha512-dehegHTe459UCc+45G0yL/ptGBk4xDk+Nl5DIRKDyf0k7l5HZstS5UrWwOAY8JO2SECUB5RjX33yvqt2/nxt4Q== +"@abp/ng.tenant-management@~4.0.0-rc.4": + version "4.0.0-rc.4" + resolved "https://registry.yarnpkg.com/@abp/ng.tenant-management/-/ng.tenant-management-4.0.0-rc.4.tgz#0978a65423b9f56df1fd58eaaa01fd912b2875ab" + integrity sha512-K7BCZMTs/nPoPrDo/yGu3IWZjXktZHcq0qg2pvjVZRqlfbgk0m+mih01H6WC+/tjKYfdb4PtWQJ36mGR17zvuQ== dependencies: - "@abp/ng.feature-management" "~3.3.1" - "@abp/ng.theme.shared" "~3.3.1" + "@abp/ng.feature-management" "~4.0.0-rc.4" + "@abp/ng.theme.shared" "~4.0.0-rc.4" tslib "^2.0.0" -"@abp/ng.theme.basic@~3.3.1": - version "3.3.1" - resolved "https://registry.yarnpkg.com/@abp/ng.theme.basic/-/ng.theme.basic-3.3.1.tgz#e9d711c3d1895a481d15409f35e52608d71259fc" - integrity sha512-DcAdBQNdgpkEGhFHXClBJIfTOuG43AQkk6o4yzaglCkYKQDuJ4XRtbRdFQNb/we/OtdIFHQtxVLEeqrMTZYYcQ== +"@abp/ng.theme.basic@~4.0.0-rc.4": + version "4.0.0-rc.4" + resolved "https://registry.yarnpkg.com/@abp/ng.theme.basic/-/ng.theme.basic-4.0.0-rc.4.tgz#438d73fed9962dae3d92b0d1f87f36e3601ab720" + integrity sha512-Gunzo6N1YoGZ3crLCYqflmvnuayekyV5Aa63dwCikOTloEBmfQy4FylAcUvncNo841BwmWOk7oDGmxQmrx+5bw== dependencies: - "@abp/ng.theme.shared" "~3.3.1" + "@abp/ng.theme.shared" "~4.0.0-rc.4" tslib "^2.0.0" -"@abp/ng.theme.shared@~3.3.1": - version "3.3.1" - resolved "https://registry.yarnpkg.com/@abp/ng.theme.shared/-/ng.theme.shared-3.3.1.tgz#694453546b4e4147a9f89058570dbbef81ef1196" - integrity sha512-21wJPa/cNBU3OoLiact4w1sHnQpsm0R5JUD6pRCzp14EyPN3QgOY8JC+/YgGuasKY2xm5pvgbgIdTryy9j4IyQ== +"@abp/ng.theme.shared@~4.0.0-rc.4": + version "4.0.0-rc.4" + resolved "https://registry.yarnpkg.com/@abp/ng.theme.shared/-/ng.theme.shared-4.0.0-rc.4.tgz#6341acbb647c8606c1147cad4387334a42908a2c" + integrity sha512-r3V+PIJC9pCA1OD7xL6I+sJ0AFeF/wcjyUJvn7ZRvevK+eDkHf6AqTXRCNgd+VTfCqtjIpiU5oC7rSOB1gGwPw== dependencies: - "@abp/ng.core" "~3.3.1" + "@abp/ng.core" "~4.0.0-rc.4" "@fortawesome/fontawesome-free" "^5.14.0" "@ng-bootstrap/ng-bootstrap" "^7.0.0" "@ngx-validate/core" "^0.0.12" @@ -94,10 +93,10 @@ chart.js "^2.9.3" tslib "^2.0.0" -"@abp/utils@^3.3.0": - version "3.3.1" - resolved "https://registry.yarnpkg.com/@abp/utils/-/utils-3.3.1.tgz#f1759161ac8af10e57b50ac90538a24a51b64ebd" - integrity sha512-XEYJYp94zDdln48P7X51wa4v1yg3Q+p0o2DdZxQbZxXChRkCwVC/B0uyMGPs75wkft6xiz965Xr7vcNvMo0nOA== +"@abp/utils@^4.0.0-rc.3": + version "4.0.0-rc.4" + resolved "https://registry.yarnpkg.com/@abp/utils/-/utils-4.0.0-rc.4.tgz#99573069c7dac8751e3124e60511a11a169df565" + integrity sha512-z1l6A07+rSgf7fzI/UTlZv1cJBiIUa0kpEvhcChe7mwlHB7oQ3SlGjZX37kzOqWcOusfMOANPuVulkZLSCOB/w== dependencies: just-compare "^1.3.0" @@ -1291,13 +1290,6 @@ dependencies: tslib "^1.9.0" -"@ngxs/storage-plugin@^3.7.0": - version "3.7.0" - resolved "https://registry.yarnpkg.com/@ngxs/storage-plugin/-/storage-plugin-3.7.0.tgz#3a0bc75f5dbba17a18e37b69cfde5d470cfceb45" - integrity sha512-j5rGYfhi1S+sAky956DIs+6AYP9FMBWL2Uz+omKBS/i42mjhyD26UfApORjwCOyW5PCb4Tq3B14ZPxyAaSi/OA== - dependencies: - tslib "^1.9.0" - "@ngxs/store@^3.7.0": version "3.7.0" resolved "https://registry.yarnpkg.com/@ngxs/store/-/store-3.7.0.tgz#e46387219dae610c685accc119ae42e351afcaa4"