diff --git a/npm/ng-packs/apps/dev-app/src/app/app.module.ts b/npm/ng-packs/apps/dev-app/src/app/app.module.ts index 96ea3e8b20..707f1f846f 100644 --- a/npm/ng-packs/apps/dev-app/src/app/app.module.ts +++ b/npm/ng-packs/apps/dev-app/src/app/app.module.ts @@ -1,21 +1,18 @@ import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; -import { - CoreModule, - provideCoreModuleConfig, withOptions -} from '@abp/ng.core'; +import { CoreModule, provideAbpCore, withOptions } from '@abp/ng.core'; import { registerLocale } from '@abp/ng.core/locale'; import { InternetConnectionStatusComponent, ThemeSharedModule, - provideThemeSharedConfig, + provideAbpThemeShared, } from '@abp/ng.theme.shared'; import { ThemeLeptonXModule } from '@abp/ng.theme.lepton-x'; import { SideMenuLayoutModule } from '@abp/ng.theme.lepton-x/layouts'; -import { AbpOAuthModule, provideAbpOAuthConfig } from '@abp/ng.oauth'; +import { provideAbpOAuth } from '@abp/ng.oauth'; import { provideSettingManagementConfig } from '@abp/ng.setting-management/config'; -import { AccountConfigModule, provideAccountConfig } from '@abp/ng.account/config'; +import { provideAccountConfig } from '@abp/ng.account/config'; import { provideIdentityConfig } from '@abp/ng.identity/config'; import { provideTenantManagementConfig } from '@abp/ng.tenant-management/config'; import { provideFeatureManagementConfig } from '@abp/ng.feature-management'; @@ -39,7 +36,7 @@ import { APP_ROUTE_PROVIDER } from './route.provider'; ], providers: [ APP_ROUTE_PROVIDER, - provideCoreModuleConfig( + provideAbpCore( withOptions({ environment, registerLocaleFn: registerLocale(), @@ -47,8 +44,8 @@ import { APP_ROUTE_PROVIDER } from './route.provider'; skipGetAppConfiguration: false, }), ), - provideAbpOAuthConfig(), - provideThemeSharedConfig(), + provideAbpOAuth(), + provideAbpThemeShared(), provideSettingManagementConfig(), provideAccountConfig(), provideIdentityConfig(), 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 44ed63000d..30c09c4c0c 100644 --- a/npm/ng-packs/packages/core/src/lib/core.module.ts +++ b/npm/ng-packs/packages/core/src/lib/core.module.ts @@ -20,14 +20,12 @@ import { ABP } from './models/common'; import { LocalizationPipe } from './pipes/localization.pipe'; import { SortPipe } from './pipes/sort.pipe'; import { ToInjectorPipe } from './pipes/to-injector.pipe'; -import { LocalizationService } from './services/localization.service'; -import { localizationContributor, LOCALIZATIONS } from './tokens/localization.token'; import './utils/date-extensions'; import { ShortDateTimePipe } from './pipes/short-date-time.pipe'; import { ShortTimePipe } from './pipes/short-time.pipe'; import { ShortDatePipe } from './pipes/short-date.pipe'; import { SafeHtmlPipe } from './pipes/safe-html.pipe'; -import { provideCoreModuleConfig, provideCoreModuleConfigChild, withOptions } from './providers'; +import { provideAbpCoreChild, provideAbpCore, withOptions } from './providers'; const standaloneDirectives = [ AutofocusDirective, @@ -116,22 +114,22 @@ export class RootCoreModule {} }) export class CoreModule { /** - * @deprecated forRoot method is deprecated, use `provideCoreModuleConfig` *function* for config settings. + * @deprecated forRoot method is deprecated, use `provideAbpCore` *function* for config settings. */ static forRoot(options = {} as ABP.Root): ModuleWithProviders { return { ngModule: RootCoreModule, - providers: [provideCoreModuleConfig(withOptions(options))], + providers: [provideAbpCore(withOptions(options))], }; } /** - * @deprecated forChild method is deprecated, use `provideCoreModuleConfig` *function* for config settings. + * @deprecated forChild method is deprecated, use `provideAbpCoreChild` *function* for config settings. */ static forChild(options = {} as ABP.Child): ModuleWithProviders { return { ngModule: RootCoreModule, - providers: [provideCoreModuleConfigChild(options)], + providers: [provideAbpCoreChild(options)], }; } } diff --git a/npm/ng-packs/packages/core/src/lib/providers/core-module-config.provider.ts b/npm/ng-packs/packages/core/src/lib/providers/core-module-config.provider.ts index 7f17aa2528..cf8c260e39 100644 --- a/npm/ng-packs/packages/core/src/lib/providers/core-module-config.provider.ts +++ b/npm/ng-packs/packages/core/src/lib/providers/core-module-config.provider.ts @@ -10,6 +10,7 @@ import { OTHERS_GROUP, QUEUE_MANAGER, SORT_COMPARE_FUNC, + SortableItem, TENANT_KEY, compareFuncFactory, coreOptionsFactory, @@ -77,7 +78,7 @@ export function withOptions(options = {} as ABP.Root): CoreFeature { +export function withTitleStrategy(strategy: unknown): CoreFeature { return makeCoreFeature(CoreFeatureKind.TitleStrategy, [ { provide: TitleStrategy, @@ -87,7 +88,7 @@ export function withTitleStrategy(strategy: any): CoreFeature 1 | -1 | 0, ): CoreFeature { return makeCoreFeature(CoreFeatureKind.CompareFunctionFactory, [ { @@ -97,7 +98,7 @@ export function withCompareFuncFactory( ]); } -export function provideCoreModuleConfig(...features: CoreFeature[]) { +export function provideAbpCore(...features: CoreFeature[]) { const providers = [ LocaleProvider, CookieLanguageProvider, @@ -154,7 +155,7 @@ export function provideCoreModuleConfig(...features: CoreFeature { return { ngModule: AbpOAuthModule, - providers: [provideAbpOAuthConfig()], + providers: [provideAbpOAuth()], }; } } diff --git a/npm/ng-packs/packages/oauth/src/lib/providers/oauth-module-config.provider.ts b/npm/ng-packs/packages/oauth/src/lib/providers/oauth-module-config.provider.ts index ec02be4029..936aee113f 100644 --- a/npm/ng-packs/packages/oauth/src/lib/providers/oauth-module-config.provider.ts +++ b/npm/ng-packs/packages/oauth/src/lib/providers/oauth-module-config.provider.ts @@ -20,7 +20,7 @@ import { NavigateToManageProfileProvider } from './navigate-to-manage-profile.pr import { HTTP_INTERCEPTORS } from '@angular/common/http'; -export function provideAbpOAuthConfig() { +export function provideAbpOAuth() { const providers = [ { provide: AuthService, diff --git a/npm/ng-packs/packages/theme-shared/src/lib/providers/theme-shared-config.provider.ts b/npm/ng-packs/packages/theme-shared/src/lib/providers/theme-shared-config.provider.ts index 900bab18b6..0ca68316c7 100644 --- a/npm/ng-packs/packages/theme-shared/src/lib/providers/theme-shared-config.provider.ts +++ b/npm/ng-packs/packages/theme-shared/src/lib/providers/theme-shared-config.provider.ts @@ -18,7 +18,7 @@ import { NG_BOOTSTRAP_CONFIG_PROVIDERS } from './ng-bootstrap-config.provider'; import { THEME_SHARED_ROUTE_PROVIDERS } from './route.provider'; import { tenantNotFoundProvider } from './tenant-not-found.provider'; -export function provideThemeSharedConfig( +export function provideAbpThemeShared( { httpErrorConfig, validation = {}, confirmationIcons = {} } = {} as RootParams, ) { const providers = [ diff --git a/npm/ng-packs/packages/theme-shared/src/lib/theme-shared.module.ts b/npm/ng-packs/packages/theme-shared/src/lib/theme-shared.module.ts index 675fa00a9e..8b81c14df2 100644 --- a/npm/ng-packs/packages/theme-shared/src/lib/theme-shared.module.ts +++ b/npm/ng-packs/packages/theme-shared/src/lib/theme-shared.module.ts @@ -20,7 +20,7 @@ import { LoadingDirective } from './directives/loading.directive'; import { NgxDatatableDefaultDirective } from './directives/ngx-datatable-default.directive'; import { NgxDatatableListDirective } from './directives/ngx-datatable-list.directive'; import { RootParams } from './models/common'; -import { provideThemeSharedConfig } from './providers'; +import { provideAbpThemeShared } from './providers'; import { PasswordComponent } from './components/password/password.component'; import { CardModule } from './components/card/card.module'; import { AbpVisibleDirective, DisabledDirective } from './directives'; @@ -86,7 +86,7 @@ export class ThemeSharedModule { ): ModuleWithProviders { return { ngModule: ThemeSharedModule, - providers: [provideThemeSharedConfig({ httpErrorConfig, validation, confirmationIcons })], + providers: [provideAbpThemeShared({ httpErrorConfig, validation, confirmationIcons })], }; } }