mirror of https://github.com/abpframework/abp.git
committed by
GitHub
123 changed files with 753 additions and 684 deletions
@ -1,20 +1,21 @@ |
|||||
import { eLayoutType, RoutesService } from '@abp/ng.core'; |
import { eLayoutType, RoutesService } from '@abp/ng.core'; |
||||
import { APP_INITIALIZER } from '@angular/core'; |
import { inject, provideAppInitializer } from '@angular/core'; |
||||
|
|
||||
export const APP_ROUTE_PROVIDER = [ |
export const APP_ROUTE_PROVIDER = [ |
||||
{ provide: APP_INITIALIZER, useFactory: configureRoutes, deps: [RoutesService], multi: true }, |
provideAppInitializer(() => { |
||||
|
configureRoutes(); |
||||
|
}), |
||||
]; |
]; |
||||
|
|
||||
function configureRoutes(routesService: RoutesService) { |
function configureRoutes() { |
||||
return () => { |
const routesService = inject(RoutesService); |
||||
routesService.add([ |
routesService.add([ |
||||
{ |
{ |
||||
path: '/', |
path: '/', |
||||
name: '::Menu:Home', |
name: '::Menu:Home', |
||||
iconClass: 'fas fa-home', |
iconClass: 'fas fa-home', |
||||
order: 1, |
order: 1, |
||||
layout: eLayoutType.application, |
layout: eLayoutType.application, |
||||
}, |
}, |
||||
]); |
]); |
||||
}; |
|
||||
} |
} |
||||
|
|||||
@ -1,5 +1,5 @@ |
|||||
import { getJestProjects } from '@nx/jest'; |
import { getJestProjectsAsync } from '@nx/jest'; |
||||
|
|
||||
export default { |
export default async () => ({ |
||||
projects: getJestProjects(), |
projects: await getJestProjectsAsync(), |
||||
}; |
}); |
||||
|
|||||
@ -1,84 +1,159 @@ |
|||||
{ |
{ |
||||
"migrations": [ |
"migrations": [ |
||||
{ |
{ |
||||
"cli": "nx", |
"version": "20.0.0-beta.7", |
||||
"version": "19.2.0-beta.2", |
"description": "Migration for v20.0.0-beta.7", |
||||
"description": "Updates the default workspace data directory to .nx/workspace-data", |
"implementation": "./src/migrations/update-20-0-0/move-use-daemon-process", |
||||
"implementation": "./src/migrations/update-19-2-0/move-workspace-data-directory", |
|
||||
"package": "nx", |
"package": "nx", |
||||
"name": "19-2-0-move-graph-cache-directory" |
"name": "move-use-daemon-process" |
||||
}, |
}, |
||||
{ |
{ |
||||
"cli": "nx", |
"version": "20.0.1", |
||||
"version": "19.2.2-beta.0", |
"description": "Set `useLegacyCache` to true for migrating workspaces", |
||||
"description": "Updates the nx wrapper.", |
"implementation": "./src/migrations/update-20-0-1/use-legacy-cache", |
||||
"implementation": "./src/migrations/update-17-3-0/update-nxw", |
"x-repair-skip": true, |
||||
"package": "nx", |
"package": "nx", |
||||
"name": "19-2-2-update-nx-wrapper" |
"name": "use-legacy-cache" |
||||
}, |
}, |
||||
{ |
{ |
||||
"version": "19.2.4-beta.0", |
"version": "20.2.0-beta.5", |
||||
"description": "Set project name in nx.json explicitly", |
"description": "Update TypeScript ESLint packages to v8.13.0 if they are already on v8", |
||||
"implementation": "./src/migrations/update-19-2-4/set-project-name", |
"implementation": "./src/migrations/update-20-2-0/update-typescript-eslint-v8-13-0", |
||||
"x-repair-skip": true, |
"package": "@nx/eslint", |
||||
"package": "nx", |
"name": "update-typescript-eslint-v8.13.0" |
||||
"name": "19-2-4-set-project-name" |
}, |
||||
|
{ |
||||
|
"cli": "nx", |
||||
|
"version": "19.6.0-beta.4", |
||||
|
"description": "Update ciWebServerCommand to use static serve for the application.", |
||||
|
"implementation": "./src/migrations/update-19-6-0/update-ci-webserver-for-static-serve", |
||||
|
"package": "@nx/cypress", |
||||
|
"name": "update-19-6-0-update-ci-webserver-for-vite" |
||||
|
}, |
||||
|
{ |
||||
|
"cli": "nx", |
||||
|
"version": "20.0.0-beta.5", |
||||
|
"description": "replace getJestProjects with getJestProjectsAsync", |
||||
|
"implementation": "./src/migrations/update-20-0-0/replace-getJestProjects-with-getJestProjectsAsync", |
||||
|
"package": "@nx/jest", |
||||
|
"name": "replace-getJestProjects-with-getJestProjectsAsync" |
||||
|
}, |
||||
|
{ |
||||
|
"cli": "nx", |
||||
|
"version": "19.6.0-beta.4", |
||||
|
"description": "Ensure Module Federation DTS is turned off by default.", |
||||
|
"factory": "./src/migrations/update-19-6-0/turn-off-dts-by-default", |
||||
|
"package": "@nx/angular", |
||||
|
"name": "update-19-6-0" |
||||
|
}, |
||||
|
{ |
||||
|
"cli": "nx", |
||||
|
"version": "19.6.0-beta.7", |
||||
|
"requires": { "@angular/core": ">=18.2.0" }, |
||||
|
"description": "Update the @angular/cli package version to ~18.2.0.", |
||||
|
"factory": "./src/migrations/update-19-6-0/update-angular-cli", |
||||
|
"package": "@nx/angular", |
||||
|
"name": "update-angular-cli-version-18-2-0" |
||||
|
}, |
||||
|
{ |
||||
|
"cli": "nx", |
||||
|
"version": "19.6.1-beta.0", |
||||
|
"description": "Ensure Target Defaults are set correctly for Module Federation.", |
||||
|
"factory": "./src/migrations/update-19-6-1/ensure-depends-on-for-mf", |
||||
|
"package": "@nx/angular", |
||||
|
"name": "update-19-6-1-ensure-module-federation-target-defaults" |
||||
|
}, |
||||
|
{ |
||||
|
"cli": "nx", |
||||
|
"version": "20.2.0-beta.2", |
||||
|
"description": "Update the ModuleFederationConfig import use @nx/module-federation.", |
||||
|
"factory": "./src/migrations/update-20-2-0/migrate-mf-imports-to-new-package", |
||||
|
"package": "@nx/angular", |
||||
|
"name": "update-20-2-0-update-module-federation-config-import" |
||||
|
}, |
||||
|
{ |
||||
|
"cli": "nx", |
||||
|
"version": "20.2.0-beta.2", |
||||
|
"description": "Update the withModuleFederation import use @nx/module-federation/angular.", |
||||
|
"factory": "./src/migrations/update-20-2-0/migrate-with-mf-import-to-new-package", |
||||
|
"package": "@nx/angular", |
||||
|
"name": "update-20-2-0-update-with-module-federation-import" |
||||
|
}, |
||||
|
{ |
||||
|
"cli": "nx", |
||||
|
"version": "20.2.0-beta.5", |
||||
|
"requires": { "@angular/core": ">=19.0.0" }, |
||||
|
"description": "Update the @angular/cli package version to ~19.0.0.", |
||||
|
"factory": "./src/migrations/update-20-2-0/update-angular-cli", |
||||
|
"package": "@nx/angular", |
||||
|
"name": "update-angular-cli-version-19-0-0" |
||||
}, |
}, |
||||
{ |
{ |
||||
"cli": "nx", |
"cli": "nx", |
||||
"version": "19.1.0-beta.6", |
"version": "20.2.0-beta.5", |
||||
"description": "Migrate no-extra-semi rules into user config, out of nx extendable configs", |
"requires": { "@angular/core": ">=19.0.0" }, |
||||
"implementation": "./src/migrations/update-19-1-0-migrate-no-extra-semi/migrate-no-extra-semi", |
"description": "Add the '@angular/localize/init' polyfill to the 'polyfills' option of targets using esbuild-based executors.", |
||||
"package": "@nx/eslint-plugin", |
"factory": "./src/migrations/update-20-2-0/add-localize-polyfill-to-targets", |
||||
"name": "update-19-1-0-rename-no-extra-semi" |
"package": "@nx/angular", |
||||
|
"name": "add-localize-polyfill-to-targets" |
||||
|
}, |
||||
|
{ |
||||
|
"cli": "nx", |
||||
|
"version": "20.2.0-beta.5", |
||||
|
"requires": { "@angular/core": ">=19.0.0" }, |
||||
|
"description": "Update '@angular/ssr' import paths to use the new '/node' entry point when 'CommonEngine' is detected.", |
||||
|
"factory": "./src/migrations/update-20-2-0/update-angular-ssr-imports-to-use-node-entry-point", |
||||
|
"package": "@nx/angular", |
||||
|
"name": "update-angular-ssr-imports-to-use-node-entry-point" |
||||
}, |
}, |
||||
{ |
{ |
||||
"cli": "nx", |
"cli": "nx", |
||||
"version": "19.1.0-beta.2", |
"version": "20.2.0-beta.6", |
||||
"requires": { "@angular/core": ">=18.0.0" }, |
"requires": { "@angular/core": ">=19.0.0" }, |
||||
"description": "Update the @angular/cli package version to ~18.0.0.", |
"description": "Disable the Angular ESLint prefer-standalone rule if not set.", |
||||
"factory": "./src/migrations/update-19-1-0/update-angular-cli", |
"factory": "./src/migrations/update-20-2-0/disable-angular-eslint-prefer-standalone", |
||||
"package": "@nx/angular", |
"package": "@nx/angular", |
||||
"name": "update-angular-cli-version-18-0-0" |
"name": "disable-angular-eslint-prefer-standalone" |
||||
}, |
}, |
||||
{ |
{ |
||||
"cli": "nx", |
"cli": "nx", |
||||
"version": "19.2.1-beta.0", |
"version": "20.2.0-beta.8", |
||||
"requires": { "@angular-eslint/eslint-plugin": ">=18.0.0" }, |
"requires": { "@angular/core": ">=19.0.0" }, |
||||
"description": "Installs the '@typescript-eslint/utils' package when having installed '@angular-eslint/eslint-plugin' or '@angular-eslint/eslint-plugin-template' with version >=18.0.0.", |
"description": "Remove Angular ESLint rules that were removed in v19.0.0.", |
||||
"factory": "./src/migrations/update-19-2-1/add-typescript-eslint-utils", |
"factory": "./src/migrations/update-20-2-0/remove-angular-eslint-rules", |
||||
"package": "@nx/angular", |
"package": "@nx/angular", |
||||
"name": "add-typescript-eslint-utils" |
"name": "remove-angular-eslint-rules" |
||||
}, |
}, |
||||
{ |
{ |
||||
"cli": "nx", |
"cli": "nx", |
||||
"version": "19.5.0-beta.1", |
"version": "20.2.0-beta.8", |
||||
"requires": { "@angular/core": ">=18.1.0" }, |
"requires": { "@angular/core": ">=19.0.0" }, |
||||
"description": "Update the @angular/cli package version to ~18.1.0.", |
"description": "Remove the deprecated 'tailwindConfig' option from ng-packagr executors. Tailwind CSS configurations located at the project or workspace root will be picked up automatically.", |
||||
"factory": "./src/migrations/update-19-5-0/update-angular-cli", |
"factory": "./src/migrations/update-20-2-0/remove-tailwind-config-from-ng-packagr-executors", |
||||
"package": "@nx/angular", |
"package": "@nx/angular", |
||||
"name": "update-angular-cli-version-18-1-0" |
"name": "remove-tailwind-config-from-ng-packagr-executors" |
||||
}, |
}, |
||||
{ |
{ |
||||
"version": "18.0.0", |
"version": "19.0.0", |
||||
"description": "Updates two-way bindings that have an invalid expression to use the longform expression instead.", |
"description": "Updates non-standalone Directives, Component and Pipes to 'standalone:false' and removes 'standalone:true' from those who are standalone", |
||||
"factory": "./migrations/invalid-two-way-bindings/bundle", |
"factory": "./bundles/explicit-standalone-flag#migrate", |
||||
"package": "@angular/core", |
"package": "@angular/core", |
||||
"name": "invalid-two-way-bindings" |
"name": "explicit-standalone-flag" |
||||
}, |
}, |
||||
{ |
{ |
||||
"version": "18.0.0", |
"version": "19.0.0", |
||||
"description": "Replace deprecated HTTP related modules with provider functions", |
"description": "Updates ExperimentalPendingTasks to PendingTasks", |
||||
"factory": "./migrations/http-providers/bundle", |
"factory": "./bundles/pending-tasks#migrate", |
||||
"package": "@angular/core", |
"package": "@angular/core", |
||||
"name": "migration-http-providers" |
"name": "pending-tasks" |
||||
}, |
}, |
||||
{ |
{ |
||||
"version": "18.1.0", |
"version": "19.0.0", |
||||
"description": "Updates calls to afterRender with an explicit phase to the new API", |
"description": "Replaces `APP_INITIALIZER`, `ENVIRONMENT_INITIALIZER` & `PLATFORM_INITIALIZER` respectively with `provideAppInitializer`, `provideEnvironmentInitializer` & `providePlatformInitializer`.", |
||||
"factory": "./migrations/after-render-phase/bundle", |
"factory": "./bundles/provide-initializer#migrate", |
||||
|
"optional": true, |
||||
"package": "@angular/core", |
"package": "@angular/core", |
||||
"name": "migration-after-render-phase" |
"name": "provide-initializer" |
||||
} |
} |
||||
] |
] |
||||
} |
} |
||||
|
|||||
@ -1,56 +1,57 @@ |
|||||
import { eLayoutType, RoutesService } from '@abp/ng.core'; |
import { eLayoutType, RoutesService } from '@abp/ng.core'; |
||||
import { APP_INITIALIZER } from '@angular/core'; |
import { inject, provideAppInitializer } from '@angular/core'; |
||||
import { eAccountRouteNames } from '../enums/route-names'; |
import { eAccountRouteNames } from '../enums/route-names'; |
||||
|
|
||||
export const ACCOUNT_ROUTE_PROVIDERS = [ |
export const ACCOUNT_ROUTE_PROVIDERS = [ |
||||
{ provide: APP_INITIALIZER, useFactory: configureRoutes, deps: [RoutesService], multi: true }, |
provideAppInitializer(() => { |
||||
|
configureRoutes(); |
||||
|
}), |
||||
]; |
]; |
||||
|
|
||||
export function configureRoutes(routes: RoutesService) { |
export function configureRoutes() { |
||||
return () => { |
const routes = inject(RoutesService); |
||||
routes.add([ |
routes.add([ |
||||
{ |
{ |
||||
path: undefined, |
path: undefined, |
||||
name: eAccountRouteNames.Account, |
name: eAccountRouteNames.Account, |
||||
invisible: true, |
invisible: true, |
||||
layout: eLayoutType.account, |
layout: eLayoutType.account, |
||||
breadcrumbText: eAccountRouteNames.Account, |
breadcrumbText: eAccountRouteNames.Account, |
||||
iconClass: 'bi bi-person-fill-gear', |
iconClass: 'bi bi-person-fill-gear', |
||||
order: 1, |
order: 1, |
||||
}, |
}, |
||||
{ |
{ |
||||
path: '/account/login', |
path: '/account/login', |
||||
name: eAccountRouteNames.Login, |
name: eAccountRouteNames.Login, |
||||
parentName: eAccountRouteNames.Account, |
parentName: eAccountRouteNames.Account, |
||||
order: 1, |
order: 1, |
||||
}, |
}, |
||||
{ |
{ |
||||
path: '/account/register', |
path: '/account/register', |
||||
name: eAccountRouteNames.Register, |
name: eAccountRouteNames.Register, |
||||
parentName: eAccountRouteNames.Account, |
parentName: eAccountRouteNames.Account, |
||||
order: 2, |
order: 2, |
||||
}, |
}, |
||||
{ |
{ |
||||
path: '/account/manage', |
path: '/account/manage', |
||||
name: eAccountRouteNames.ManageProfile, |
name: eAccountRouteNames.ManageProfile, |
||||
parentName: eAccountRouteNames.Account, |
parentName: eAccountRouteNames.Account, |
||||
layout: eLayoutType.application, |
layout: eLayoutType.application, |
||||
breadcrumbText: 'AbpAccount::Manage', |
breadcrumbText: 'AbpAccount::Manage', |
||||
iconClass: 'bi bi-kanban-fill', |
iconClass: 'bi bi-kanban-fill', |
||||
order: 3, |
order: 3, |
||||
}, |
}, |
||||
{ |
{ |
||||
path: '/account/forgot-password', |
path: '/account/forgot-password', |
||||
parentName: eAccountRouteNames.Account, |
parentName: eAccountRouteNames.Account, |
||||
name: eAccountRouteNames.ForgotPassword, |
name: eAccountRouteNames.ForgotPassword, |
||||
invisible: true, |
invisible: true, |
||||
}, |
}, |
||||
{ |
{ |
||||
path: '/account/reset-password', |
path: '/account/reset-password', |
||||
parentName: eAccountRouteNames.Account, |
parentName: eAccountRouteNames.Account, |
||||
name: eAccountRouteNames.ResetPassword, |
name: eAccountRouteNames.ResetPassword, |
||||
invisible: true, |
invisible: true, |
||||
}, |
}, |
||||
]); |
]); |
||||
}; |
|
||||
} |
} |
||||
|
|||||
@ -1,23 +1,19 @@ |
|||||
import { APP_INITIALIZER, Injector, Provider } from '@angular/core'; |
import { Injector, inject, provideAppInitializer } from '@angular/core'; |
||||
import { DOCUMENT } from '@angular/common'; |
import { DOCUMENT } from '@angular/common'; |
||||
import { SessionStateService } from '../services/session-state.service'; |
import { SessionStateService } from '../services/session-state.service'; |
||||
import { COOKIE_LANGUAGE_KEY } from '../tokens/cookie-language-key.token'; |
import { COOKIE_LANGUAGE_KEY } from '../tokens/cookie-language-key.token'; |
||||
|
|
||||
export function setLanguageToCookie(injector: Injector) { |
export function setLanguageToCookie() { |
||||
return () => { |
const injector = inject(Injector); |
||||
const sessionState = injector.get(SessionStateService); |
const sessionState = injector.get(SessionStateService); |
||||
const document = injector.get(DOCUMENT); |
const document = injector.get(DOCUMENT); |
||||
const cookieLanguageKey = injector.get(COOKIE_LANGUAGE_KEY); |
const cookieLanguageKey = injector.get(COOKIE_LANGUAGE_KEY); |
||||
sessionState.getLanguage$().subscribe(language => { |
sessionState.getLanguage$().subscribe(language => { |
||||
const cookieValue = encodeURIComponent(`c=${language}|uic=${language}`); |
const cookieValue = encodeURIComponent(`c=${language}|uic=${language}`); |
||||
document.cookie = `${cookieLanguageKey}=${cookieValue}`; |
document.cookie = `${cookieLanguageKey}=${cookieValue}`; |
||||
}); |
}); |
||||
}; |
|
||||
} |
} |
||||
|
|
||||
export const CookieLanguageProvider: Provider = { |
export const CookieLanguageProvider = provideAppInitializer(() => { |
||||
provide: APP_INITIALIZER, |
setLanguageToCookie(); |
||||
useFactory: setLanguageToCookie, |
}); |
||||
deps: [Injector], |
|
||||
multi: true, |
|
||||
}; |
|
||||
|
|||||
@ -1,26 +1,22 @@ |
|||||
import { SettingTabsService } from '@abp/ng.setting-management/config'; |
import { SettingTabsService } from '@abp/ng.setting-management/config'; |
||||
import { APP_INITIALIZER } from '@angular/core'; |
import { inject, provideAppInitializer } from '@angular/core'; |
||||
import { eFeatureManagementTabNames } from '../enums/feature-management-tab-names'; |
import { eFeatureManagementTabNames } from '../enums/feature-management-tab-names'; |
||||
import { FeatureManagementTabComponent } from '../components'; |
import { FeatureManagementTabComponent } from '../components'; |
||||
|
|
||||
export const FEATURE_MANAGEMENT_SETTINGS_PROVIDERS = [ |
export const FEATURE_MANAGEMENT_SETTINGS_PROVIDERS = [ |
||||
{ |
provideAppInitializer(() => { |
||||
provide: APP_INITIALIZER, |
configureSettingTabs(); |
||||
useFactory: configureSettingTabs, |
}), |
||||
deps: [SettingTabsService], |
|
||||
multi: true, |
|
||||
}, |
|
||||
]; |
]; |
||||
|
|
||||
export function configureSettingTabs(settingtabs: SettingTabsService) { |
export function configureSettingTabs() { |
||||
return () => { |
const settingtabs = inject(SettingTabsService); |
||||
settingtabs.add([ |
settingtabs.add([ |
||||
{ |
{ |
||||
name: eFeatureManagementTabNames.FeatureManagement, |
name: eFeatureManagementTabNames.FeatureManagement, |
||||
order: 100, |
order: 100, |
||||
requiredPolicy: 'FeatureManagement.ManageHostFeatures', |
requiredPolicy: 'FeatureManagement.ManageHostFeatures', |
||||
component: FeatureManagementTabComponent, |
component: FeatureManagementTabComponent, |
||||
}, |
}, |
||||
]); |
]); |
||||
}; |
|
||||
} |
} |
||||
|
|||||
@ -1,39 +1,40 @@ |
|||||
import { eLayoutType, RoutesService } from '@abp/ng.core'; |
import { eLayoutType, RoutesService } from '@abp/ng.core'; |
||||
import { eThemeSharedRouteNames } from '@abp/ng.theme.shared'; |
import { eThemeSharedRouteNames } from '@abp/ng.theme.shared'; |
||||
import { APP_INITIALIZER } from '@angular/core'; |
import { inject, provideAppInitializer } from '@angular/core'; |
||||
import { eIdentityPolicyNames } from '../enums/policy-names'; |
import { eIdentityPolicyNames } from '../enums/policy-names'; |
||||
import { eIdentityRouteNames } from '../enums/route-names'; |
import { eIdentityRouteNames } from '../enums/route-names'; |
||||
|
|
||||
export const IDENTITY_ROUTE_PROVIDERS = [ |
export const IDENTITY_ROUTE_PROVIDERS = [ |
||||
{ provide: APP_INITIALIZER, useFactory: configureRoutes, deps: [RoutesService], multi: true }, |
provideAppInitializer(() => { |
||||
|
configureRoutes(); |
||||
|
}), |
||||
]; |
]; |
||||
|
|
||||
export function configureRoutes(routesService: RoutesService) { |
export function configureRoutes() { |
||||
return () => { |
const routesService = inject(RoutesService); |
||||
routesService.add([ |
routesService.add([ |
||||
{ |
{ |
||||
path: undefined, |
path: undefined, |
||||
name: eIdentityRouteNames.IdentityManagement, |
name: eIdentityRouteNames.IdentityManagement, |
||||
parentName: eThemeSharedRouteNames.Administration, |
parentName: eThemeSharedRouteNames.Administration, |
||||
requiredPolicy: eIdentityPolicyNames.IdentityManagement, |
requiredPolicy: eIdentityPolicyNames.IdentityManagement, |
||||
iconClass: 'fa fa-id-card-o', |
iconClass: 'fa fa-id-card-o', |
||||
layout: eLayoutType.application, |
layout: eLayoutType.application, |
||||
order: 1, |
order: 1, |
||||
}, |
}, |
||||
{ |
{ |
||||
path: '/identity/roles', |
path: '/identity/roles', |
||||
name: eIdentityRouteNames.Roles, |
name: eIdentityRouteNames.Roles, |
||||
parentName: eIdentityRouteNames.IdentityManagement, |
parentName: eIdentityRouteNames.IdentityManagement, |
||||
requiredPolicy: eIdentityPolicyNames.Roles, |
requiredPolicy: eIdentityPolicyNames.Roles, |
||||
order: 1, |
order: 1, |
||||
}, |
}, |
||||
{ |
{ |
||||
path: '/identity/users', |
path: '/identity/users', |
||||
name: eIdentityRouteNames.Users, |
name: eIdentityRouteNames.Users, |
||||
parentName: eIdentityRouteNames.IdentityManagement, |
parentName: eIdentityRouteNames.IdentityManagement, |
||||
requiredPolicy: eIdentityPolicyNames.Users, |
requiredPolicy: eIdentityPolicyNames.Users, |
||||
order: 2, |
order: 2, |
||||
}, |
}, |
||||
]); |
]); |
||||
}; |
|
||||
} |
} |
||||
|
|||||
@ -1,26 +1,22 @@ |
|||||
import { APP_INITIALIZER } from '@angular/core'; |
import { inject, provideAppInitializer } from '@angular/core'; |
||||
import { EmailSettingGroupComponent } from '../components/email-setting-group/email-setting-group.component'; |
import { EmailSettingGroupComponent } from '../components/email-setting-group/email-setting-group.component'; |
||||
import { eSettingManamagementSettingTabNames } from '../enums/setting-tab-names'; |
import { eSettingManamagementSettingTabNames } from '../enums/setting-tab-names'; |
||||
import { SettingTabsService } from '../services/settings-tabs.service'; |
import { SettingTabsService } from '../services/settings-tabs.service'; |
||||
|
|
||||
export const SETTING_MANAGEMENT_SETTING_TAB_PROVIDERS = [ |
export const SETTING_MANAGEMENT_SETTING_TAB_PROVIDERS = [ |
||||
{ |
provideAppInitializer(() => { |
||||
provide: APP_INITIALIZER, |
configureSettingTabs(); |
||||
useFactory: configureSettingTabs, |
}), |
||||
deps: [SettingTabsService], |
|
||||
multi: true, |
|
||||
}, |
|
||||
]; |
]; |
||||
|
|
||||
export function configureSettingTabs(settingTabs: SettingTabsService) { |
export function configureSettingTabs() { |
||||
return () => { |
const settingTabs = inject(SettingTabsService); |
||||
settingTabs.add([ |
settingTabs.add([ |
||||
{ |
{ |
||||
name: eSettingManamagementSettingTabNames.EmailSettingGroup, |
name: eSettingManamagementSettingTabNames.EmailSettingGroup, |
||||
order: 100, |
order: 100, |
||||
requiredPolicy: 'SettingManagement.Emailing', |
requiredPolicy: 'SettingManagement.Emailing', |
||||
component: EmailSettingGroupComponent, |
component: EmailSettingGroupComponent, |
||||
}, |
}, |
||||
]); |
]); |
||||
}; |
|
||||
} |
} |
||||
|
|||||
@ -1,32 +1,33 @@ |
|||||
import { eLayoutType, RoutesService } from '@abp/ng.core'; |
import { eLayoutType, RoutesService } from '@abp/ng.core'; |
||||
import { eThemeSharedRouteNames } from '@abp/ng.theme.shared'; |
import { eThemeSharedRouteNames } from '@abp/ng.theme.shared'; |
||||
import { APP_INITIALIZER } from '@angular/core'; |
import { inject, provideAppInitializer } from '@angular/core'; |
||||
import { eTenantManagementPolicyNames } from '../enums/policy-names'; |
import { eTenantManagementPolicyNames } from '../enums/policy-names'; |
||||
import { eTenantManagementRouteNames } from '../enums/route-names'; |
import { eTenantManagementRouteNames } from '../enums/route-names'; |
||||
|
|
||||
export const TENANT_MANAGEMENT_ROUTE_PROVIDERS = [ |
export const TENANT_MANAGEMENT_ROUTE_PROVIDERS = [ |
||||
{ provide: APP_INITIALIZER, useFactory: configureRoutes, deps: [RoutesService], multi: true }, |
provideAppInitializer(() => { |
||||
|
configureRoutes(); |
||||
|
}), |
||||
]; |
]; |
||||
|
|
||||
export function configureRoutes(routes: RoutesService) { |
export function configureRoutes() { |
||||
return () => { |
const routes = inject(RoutesService); |
||||
routes.add([ |
routes.add([ |
||||
{ |
{ |
||||
path: undefined, |
path: undefined, |
||||
name: eTenantManagementRouteNames.TenantManagement, |
name: eTenantManagementRouteNames.TenantManagement, |
||||
parentName: eThemeSharedRouteNames.Administration, |
parentName: eThemeSharedRouteNames.Administration, |
||||
requiredPolicy: eTenantManagementPolicyNames.TenantManagement, |
requiredPolicy: eTenantManagementPolicyNames.TenantManagement, |
||||
layout: eLayoutType.application, |
layout: eLayoutType.application, |
||||
iconClass: 'fa fa-users', |
iconClass: 'fa fa-users', |
||||
order: 2, |
order: 2, |
||||
}, |
}, |
||||
{ |
{ |
||||
path: '/tenant-management/tenants', |
path: '/tenant-management/tenants', |
||||
name: eTenantManagementRouteNames.Tenants, |
name: eTenantManagementRouteNames.Tenants, |
||||
parentName: eTenantManagementRouteNames.TenantManagement, |
parentName: eTenantManagementRouteNames.TenantManagement, |
||||
requiredPolicy: eTenantManagementPolicyNames.Tenants, |
requiredPolicy: eTenantManagementPolicyNames.Tenants, |
||||
order: 1, |
order: 1, |
||||
}, |
}, |
||||
]); |
]); |
||||
}; |
|
||||
} |
} |
||||
|
|||||
@ -1,31 +1,27 @@ |
|||||
import { NavItemsService } from '@abp/ng.theme.shared'; |
import { NavItemsService } from '@abp/ng.theme.shared'; |
||||
import { APP_INITIALIZER } from '@angular/core'; |
import { inject, provideAppInitializer } from '@angular/core'; |
||||
import { CurrentUserComponent } from '../components/nav-items/current-user.component'; |
import { CurrentUserComponent } from '../components/nav-items/current-user.component'; |
||||
import { LanguagesComponent } from '../components/nav-items/languages.component'; |
import { LanguagesComponent } from '../components/nav-items/languages.component'; |
||||
import { eThemeBasicComponents } from '../enums/components'; |
import { eThemeBasicComponents } from '../enums/components'; |
||||
|
|
||||
export const BASIC_THEME_NAV_ITEM_PROVIDERS = [ |
export const BASIC_THEME_NAV_ITEM_PROVIDERS = [ |
||||
{ |
provideAppInitializer(() => { |
||||
provide: APP_INITIALIZER, |
configureNavItems(); |
||||
useFactory: configureNavItems, |
}), |
||||
deps: [NavItemsService], |
|
||||
multi: true, |
|
||||
}, |
|
||||
]; |
]; |
||||
|
|
||||
export function configureNavItems(navItems: NavItemsService) { |
export function configureNavItems() { |
||||
return () => { |
const navItems = inject(NavItemsService); |
||||
navItems.addItems([ |
navItems.addItems([ |
||||
{ |
{ |
||||
id: eThemeBasicComponents.Languages, |
id: eThemeBasicComponents.Languages, |
||||
order: 100, |
order: 100, |
||||
component: LanguagesComponent, |
component: LanguagesComponent, |
||||
}, |
}, |
||||
{ |
{ |
||||
id: eThemeBasicComponents.CurrentUser, |
id: eThemeBasicComponents.CurrentUser, |
||||
order: 100, |
order: 100, |
||||
component: CurrentUserComponent, |
component: CurrentUserComponent, |
||||
}, |
}, |
||||
]); |
]); |
||||
}; |
|
||||
} |
} |
||||
|
|||||
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue