@volosoft/abp.ng.theme.lepton-x
Version:
ABP Framework is a complete open-source infrastructure to create modern web applications by following the best practices and conventions of software development. This package is a part of the [ABP Framework](https://abp.io) and contains client-side files.
628 lines (605 loc) • 30.8 kB
JavaScript
import * as i0 from '@angular/core';
import { ChangeDetectionStrategy, Component, inject, Injectable, InjectionToken, provideAppInitializer, PLATFORM_ID, makeEnvironmentProviders, NgModule, signal, computed } from '@angular/core';
import { ValidationErrorComponent, VALIDATION_ERROR_TEMPLATE, VALIDATION_INVALID_CLASSES, VALIDATION_TARGET_SELECTOR, NgxValidateCoreModule } from '@ngx-validate/core';
import { LocalizationPipe, SessionStateService, ConfigStateService, NAVIGATE_TO_MANAGE_PROFILE, RouteBasedCultureUrlService, getLocaleDirection, LocalizationService, AuthService, ReplaceableComponentsService, EnvironmentService, TenantUserSharingStrategy, CoreModule, RouterEvents, ReplaceableTemplateDirective } from '@abp/ng.core';
import { isPlatformServer, CommonModule, Location, isPlatformBrowser } from '@angular/common';
import { AbpNavbarService, AbpToolbarService, provideLeptonXAbpCore } from '@volo/abp.ng.lepton-x.core';
import { filter, switchMap, map } from 'rxjs/operators';
import { combineLatest, of, map as map$1 } from 'rxjs';
import { LanguageService, UserProfileService, flatArrayDeepToObject, LPX_TRANSLATE_SERVICE_TOKEN, LanguageTranslateKeys } from '@volo/ngx-lepton-x.core';
import { PROFILE_PICTURE, NAVIGATE_TO_MY_SECURITY_LOGS, OPEN_MY_LINK_USERS_MODAL, NAVIGATE_TO_MY_SESSIONS, NAVIGATE_TO_MY_EXTERNAL_LOGINS, OPEN_AUTHORITY_DELEGATION_MODAL, OPEN_SWITCH_TENANT_MODAL, PROFILE_PICTURE_PROVIDERS } from '@volo/abp.commercial.ng.ui/config';
import { UserMenuService, CreateErrorComponentService, HTTP_ERROR_STATUS, HTTP_ERROR_DETAIL } from '@abp/ng.theme.shared';
import { Router, provideRouter, ActivatedRoute } from '@angular/router';
import { ThemeTranslateKeys, provideLpx, withLpxOptions } from '@volosoft/ngx-lepton-x';
import { AccountLayoutComponent } from '@volosoft/abp.ng.theme.lepton-x/account';
class AbpValidationErrorComponent extends ValidationErrorComponent {
get abpErrors() {
if (!this.errors || !this.errors.length) {
return [];
}
return this.errors.map((error) => {
if (!error.message) {
return error;
}
const index = error.message.indexOf('[');
if (index > -1) {
return {
...error,
message: error.message.slice(0, index),
interpoliteParams: error.message
.slice(index + 1, error.message.length - 1)
.split(','),
};
}
return error;
});
}
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: AbpValidationErrorComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.13", type: AbpValidationErrorComponent, isStandalone: true, selector: "abp-validation-error", usesInheritance: true, ngImport: i0, template: `
<span
class="text-danger"
data-valmsg-for="Role.Name"
data-valmsg-replace="true"
>
@for (error of abpErrors; track $index) {
<span>
{{ error.message | abpLocalization: error.interpoliteParams }}
</span>
}
</span>
`, isInline: true, styles: [":host-context{order:3}\n"], dependencies: [{ kind: "pipe", type: LocalizationPipe, name: "abpLocalization" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: AbpValidationErrorComponent, decorators: [{
type: Component,
args: [{ selector: 'abp-validation-error', template: `
<span
class="text-danger"
data-valmsg-for="Role.Name"
data-valmsg-replace="true"
>
@for (error of abpErrors; track $index) {
<span>
{{ error.message | abpLocalization: error.interpoliteParams }}
</span>
}
</span>
`, changeDetection: ChangeDetectionStrategy.OnPush, imports: [LocalizationPipe], styles: [":host-context{order:3}\n"] }]
}] });
class AbpSettingsService {
constructor() {
this.sessionService = inject(SessionStateService);
this.configStateService = inject(ConfigStateService);
this.languageService = inject(LanguageService);
this.userProfileService = inject(UserProfileService);
this.profilePicture$ = inject(PROFILE_PICTURE);
this.navigateToManageProfile = inject(NAVIGATE_TO_MANAGE_PROFILE);
this.navigateToMySecurityLogs = inject(NAVIGATE_TO_MY_SECURITY_LOGS);
this.openMyLinkUsersModal = inject(OPEN_MY_LINK_USERS_MODAL, { optional: true });
this.userMenuService = inject(UserMenuService);
this.routeCultureUrl = inject(RouteBasedCultureUrlService);
}
setUpListeners() {
this.listenToLangChange();
this.setLanguageOptions();
this.setUserProfile();
this.setProfilePicture();
this.setUserMenuGroups();
}
setUserProfile() {
const emptyStringOnNull = (value) => value || '';
const currentUser$ = this.configStateService
.getOne$('currentUser')
.pipe(filter(Boolean));
const currentTenant$ = this.configStateService
.getOne$('currentTenant')
.pipe(filter(Boolean));
combineLatest([currentUser$, currentTenant$]).subscribe(([currentUser, currentTenant]) => {
this.userProfileService.patchUser({
id: currentUser.id,
isAuthenticated: currentUser.isAuthenticated,
userName: currentUser.userName,
fullName: emptyStringOnNull(currentUser.name) +
' ' +
emptyStringOnNull(currentUser.surName),
email: currentUser.email,
tenant: currentTenant,
});
});
}
setUserMenuGroups() {
this.userMenuService.items$.subscribe((userMenu) => {
const userActionGroups = userMenu.reduce((acc, curr, index) => {
const menuItem = {
icon: curr.textTemplate?.icon,
text: curr.textTemplate?.text,
component: curr?.component,
action: () => {
curr.action();
return of(true);
},
visible: curr.visible,
};
const setIndex = index === userMenu.length - 1 ? 1 : 0;
acc[setIndex].push(menuItem);
return acc;
}, [[], []]);
this.userProfileService.patchUser({
userActionGroups,
});
});
}
setProfilePicture() {
this.profilePicture$
.pipe(filter(Boolean))
.subscribe((avatar) => this.userProfileService.patchUser({
avatar: {
type: avatar.type,
source: avatar.source || '',
},
}));
}
setLanguageOptions() {
this.sessionService
.getLanguage$()
.pipe(switchMap((currentLang) => this.configStateService.getDeep$('localization.languages').pipe(filter(Boolean), map((languages) => languages.map(({ cultureName, ...rest }) => ({
...rest,
cultureName,
selected: cultureName === currentLang,
isRTL: getLocaleDirection(cultureName) === 'rtl',
}))))))
.subscribe((settings) => {
this.languageService.setLanguages(settings);
});
}
listenToLangChange() {
this.languageService.selectedLanguage$
.pipe(filter(Boolean))
.subscribe((lang) => {
this.routeCultureUrl.applyLanguageSelection(lang?.cultureName || '');
});
}
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: AbpSettingsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: AbpSettingsService, providedIn: 'root' }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: AbpSettingsService, decorators: [{
type: Injectable,
args: [{ providedIn: 'root' }]
}] });
const HTTP_ERROR_PATH = new InjectionToken('HTTP_ERROR_PATH');
const LPX_TRANSLATE_KEY_MAP_TOKEN = new InjectionToken('LPX_TRANSLATE_KEY_MAP_TOKEN');
class AbpCreateErrorComponentService extends CreateErrorComponentService {
constructor() {
super();
this.router = inject(Router);
this.httpErrorPath = inject(HTTP_ERROR_PATH);
}
execute(instance) {
if (this.canCreateCustomError(instance.status)) {
super.execute(instance);
return;
}
const queryParams = { status: instance.status };
this.router.navigate([this.httpErrorPath], { queryParams });
}
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: AbpCreateErrorComponentService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: AbpCreateErrorComponentService }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: AbpCreateErrorComponentService, decorators: [{
type: Injectable
}], ctorParameters: () => [] });
class AbpTranslateService {
constructor() {
this.localization = inject(LocalizationService);
this.translateKeys = inject(LPX_TRANSLATE_KEY_MAP_TOKEN);
}
get(key, defaultValue) {
const keyToTranslate = this.getKey(key);
if (keyToTranslate) {
return this.localization.instant({
key: keyToTranslate,
defaultValue,
});
}
return defaultValue || key;
}
get$(key, defaultValue) {
const keyToTranslate = this.getKey(key);
if (keyToTranslate) {
return this.localization.get({
key: keyToTranslate,
defaultValue,
});
}
return of(defaultValue || key);
}
getKey(key) {
const keys = flatArrayDeepToObject(this.translateKeys);
return keys[key] ? keys[key] : key.includes('::') ? key : undefined;
}
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: AbpTranslateService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: AbpTranslateService }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: AbpTranslateService, decorators: [{
type: Injectable
}] });
class AbpAuthService {
constructor() {
this.userProfileService = inject(UserProfileService);
this.authService = inject(AuthService);
this.isUserExists$ = this.userProfileService.user$.pipe(map((user) => user && !!user.userName));
}
navigateToLogin() {
this.authService.navigateToLogin();
}
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: AbpAuthService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: AbpAuthService }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: AbpAuthService, decorators: [{
type: Injectable
}] });
const INIT_SERVICE_PROVIDER = provideAppInitializer(() => {
initServices();
});
function initServices() {
const navbar = inject(AbpNavbarService);
const abpToolbar = inject(AbpToolbarService);
const setting = inject(AbpSettingsService);
abpToolbar.listenNavItems();
setting.setUpListeners();
navbar.initRoutes();
}
const LPX_STYLE_PROVIDER = provideAppInitializer(() => {
const platformId = inject(PLATFORM_ID);
if (isPlatformServer(platformId)) {
return Promise.resolve();
}
const loader = document.querySelector('#lp-page-loader');
if (loader) {
loader.style.background = 'var(--background)';
setTimeout(() => loader.parentNode?.removeChild(loader), 500);
}
return Promise.resolve();
});
const LPX_TRANSLATE_PROVIDER = {
provide: LPX_TRANSLATE_SERVICE_TOKEN,
useFactory: () => {
return new AbpTranslateService();
},
deps: [LocalizationService, LPX_TRANSLATE_KEY_MAP_TOKEN],
};
const translateKeys = {
[LanguageTranslateKeys.SettingsTitle]: 'LeptonX::Language',
[ThemeTranslateKeys.AppearanceTitle]: 'LeptonX::Appearance',
[ThemeTranslateKeys.DarkMode]: 'LeptonX::Theme:dark',
[ThemeTranslateKeys.LightMode]: 'LeptonX::Theme:light',
[ThemeTranslateKeys.SemiDarkMode]: 'LeptonX::Theme:dim',
[ThemeTranslateKeys.System]: 'LeptonX::Theme:system',
};
const LPX_TRANSLATE_KEYS_PROVIDER = {
provide: LPX_TRANSLATE_KEY_MAP_TOKEN,
multi: true,
useValue: translateKeys,
};
const ACCOUNT_LAYOUT_PROVIDER = provideAppInitializer(() => {
initAccountLayout();
});
function initAccountLayout() {
const replaceableComponents = inject(ReplaceableComponentsService);
replaceableComponents.add({
key: "Theme.AccountLayoutComponent" /* eThemeLeptonXComponents.AccountLayout */,
component: AccountLayoutComponent,
});
}
function leptonXRoutes(options) {
const { httpError } = options || {};
return provideRouter([
{
pathMatch: 'full',
path: httpError?.errorPath || 'error',
loadComponent: () => Promise.resolve().then(function () { return httpError_component; }).then((c) => c.HttpErrorComponent),
},
]);
}
function httpErrorProvider(options) {
const { httpError } = options || {};
return [
{
provide: HTTP_ERROR_PATH,
useValue: httpError?.errorPath || 'error',
},
{
provide: CreateErrorComponentService,
useClass: AbpCreateErrorComponentService,
},
leptonXRoutes(options),
];
}
var eUserMenuItems;
(function (eUserMenuItems) {
eUserMenuItems["Sessions"] = "Sessions";
eUserMenuItems["SwitchTenant"] = "SwitchTenant";
eUserMenuItems["ExternalLogins"] = "ExternalLogins";
eUserMenuItems["LinkedAccounts"] = "LinkedAccounts";
eUserMenuItems["MyAccount"] = "MyAccount";
eUserMenuItems["SecurityLogs"] = "SecurityLogs";
eUserMenuItems["BackToImpersonator"] = "BackToImpersonator";
eUserMenuItems["AuthorityDelegation"] = "AuthorityDelegation";
eUserMenuItems["Logout"] = "Logout";
})(eUserMenuItems || (eUserMenuItems = {}));
const LEPTON_X_USER_MENU_PROVIDERS = [
provideAppInitializer(() => {
configureUserMenu();
}),
];
function configureUserMenu() {
const userMenu = inject(UserMenuService);
const authService = inject(AuthService);
const configState = inject(ConfigStateService);
const environment = inject(EnvironmentService);
const navigateToMySessions = inject(NAVIGATE_TO_MY_SESSIONS);
const navigateToMyExternalLogins = inject(NAVIGATE_TO_MY_EXTERNAL_LOGINS);
const navigateToManageProfile = inject(NAVIGATE_TO_MANAGE_PROFILE);
const navigateToMySecurityLogs = inject(NAVIGATE_TO_MY_SECURITY_LOGS);
const openMyLinkUsersModal = inject(OPEN_MY_LINK_USERS_MODAL, {
optional: true,
});
const openAuthorityDelegationModal = inject(OPEN_AUTHORITY_DELEGATION_MODAL, {
optional: true,
});
const openSwitchTenantModal = inject(OPEN_SWITCH_TENANT_MODAL, {
optional: true,
});
userMenu.addItems([
{
id: eUserMenuItems.Sessions,
order: 100,
textTemplate: {
icon: 'bi bi-clock-fill',
text: 'AbpAccount::Sessions',
},
action: () => navigateToMySessions(),
},
{
id: eUserMenuItems.SwitchTenant,
order: 101,
textTemplate: {
icon: 'bi bi-arrow-left-right',
text: 'AbpAccount::SwitchTenant',
},
visible: () => {
if (!openSwitchTenantModal)
return false;
return configState.getOne$('multiTenancy').pipe(map$1(multiTenancy => multiTenancy?.isEnabled &&
multiTenancy?.userSharingStrategy === TenantUserSharingStrategy.Shared));
},
action: () => openSwitchTenantModal?.(),
},
{
id: eUserMenuItems.ExternalLogins,
order: 102,
textTemplate: {
icon: 'bi bi-person-circle',
text: 'AbpAccount::ExternalLogins',
},
action: () => navigateToMyExternalLogins(),
visible: () => {
return environment.getEnvironment$().pipe(map$1(({ oAuthConfig }) => {
return oAuthConfig?.responseType === 'code';
}));
},
},
{
id: eUserMenuItems.LinkedAccounts,
order: 103,
textTemplate: {
icon: 'bi bi-link',
text: 'AbpAccount::LinkedAccounts',
},
action: () => openMyLinkUsersModal(),
visible: () => !!openMyLinkUsersModal,
},
{
id: eUserMenuItems.AuthorityDelegation,
order: 104,
textTemplate: {
text: 'AbpAccount::AuthorityDelegation',
icon: 'fa fa-users',
},
visible: () => {
return configState
.getOne$('currentUser')
.pipe(map$1(({ impersonatorUserId }) => !Boolean(impersonatorUserId)));
},
action: () => openAuthorityDelegationModal(),
},
{
id: eUserMenuItems.MyAccount,
order: 105,
textTemplate: {
icon: 'bi bi-sliders',
text: 'AbpAccount::MyAccount',
},
action: () => navigateToManageProfile(),
},
{
id: eUserMenuItems.SecurityLogs,
order: 106,
textTemplate: {
icon: 'bi bi-list-ul',
text: 'AbpAccount::MySecurityLogs',
},
action: () => navigateToMySecurityLogs(),
},
{
id: eUserMenuItems.Logout,
order: 108, // The order has taken to 108 deliberately since we moved the back to impersonator item to the end of the menu
textTemplate: {
icon: 'bi bi-box-arrow-right',
text: 'AbpUi::Logout',
},
action: () => {
authService.logout().subscribe();
},
},
]);
}
var ThemeLeptonXFeatureKind;
(function (ThemeLeptonXFeatureKind) {
ThemeLeptonXFeatureKind[ThemeLeptonXFeatureKind["Options"] = 0] = "Options";
})(ThemeLeptonXFeatureKind || (ThemeLeptonXFeatureKind = {}));
function makeThemeLeptonXFeature(kind, providers) {
return {
ɵkind: kind,
ɵproviders: providers,
};
}
function withThemeLeptonXOptions(options = {}) {
const lpxModuleOptions = {
...options,
styleFactory: (styles) => {
styles.push({
bundleName: 'abp-bundle',
});
if (options?.styleFactory) {
return options.styleFactory(styles);
}
return styles;
},
};
return makeThemeLeptonXFeature(ThemeLeptonXFeatureKind.Options, [
provideLpx(withLpxOptions(lpxModuleOptions)),
httpErrorProvider(options),
]);
}
function provideAbpValidationError() {
const providers = [
{
provide: VALIDATION_ERROR_TEMPLATE,
useValue: AbpValidationErrorComponent,
},
{
provide: VALIDATION_INVALID_CLASSES,
useValue: 'is-invalid',
},
{
provide: VALIDATION_TARGET_SELECTOR,
useValue: '.form-group',
},
];
return makeEnvironmentProviders(providers);
}
function provideThemeLeptonX(...features) {
const providers = [
LPX_STYLE_PROVIDER,
PROFILE_PICTURE_PROVIDERS,
LEPTON_X_USER_MENU_PROVIDERS,
INIT_SERVICE_PROVIDER,
provideAbpValidationError(),
provideLeptonXAbpCore(),
ACCOUNT_LAYOUT_PROVIDER,
provideLpx(),
LPX_TRANSLATE_KEYS_PROVIDER,
LPX_TRANSLATE_PROVIDER,
];
features.forEach(({ ɵproviders }) => providers.push(...ɵproviders));
return makeEnvironmentProviders(providers);
}
class AbpValidationErrorModule {
/**
* @deprecated `AbpValidationErrorModule.forRoot()` is deprecated. You can use `provideAbpValidationError` **function** instead.
*/
static forRoot() {
return {
ngModule: AbpValidationErrorModule,
providers: [provideAbpValidationError()],
};
}
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: AbpValidationErrorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.13", ngImport: i0, type: AbpValidationErrorModule, imports: [CommonModule,
CoreModule,
NgxValidateCoreModule,
AbpValidationErrorComponent], exports: [AbpValidationErrorComponent, NgxValidateCoreModule] }); }
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: AbpValidationErrorModule, imports: [CommonModule,
CoreModule,
NgxValidateCoreModule, NgxValidateCoreModule] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: AbpValidationErrorModule, decorators: [{
type: NgModule,
args: [{
imports: [
CommonModule,
CoreModule,
NgxValidateCoreModule,
AbpValidationErrorComponent,
],
exports: [AbpValidationErrorComponent, NgxValidateCoreModule],
}]
}] });
class HttpErrorComponent {
constructor() {
this.router = inject(Router);
this.activatedRoute = inject(ActivatedRoute);
this.location = inject(Location);
this.routerEvents = inject(RouterEvents);
this.platformId = inject(PLATFORM_ID);
this.errorComponentKey = "Theme.HttpErrorComponent" /* eThemeLeptonXComponents.HttpError */;
this.status = signal(0, ...(ngDevMode ? [{ debugName: "status" }] : /* istanbul ignore next */ []));
this.lastNavigation = this.routerEvents.previousNavigation;
this.currentNavigation = this.routerEvents.currentNavigation;
this.statusText = computed(() => HTTP_ERROR_STATUS[this.status()] ?? '', ...(ngDevMode ? [{ debugName: "statusText" }] : /* istanbul ignore next */ []));
this.detail = computed(() => HTTP_ERROR_DETAIL[this.status()] ?? '', ...(ngDevMode ? [{ debugName: "detail" }] : /* istanbul ignore next */ []));
const { status } = this.activatedRoute.snapshot.queryParams;
if (!isNaN(status)) {
this.status.set(+status);
}
}
goBack() {
if (!isPlatformBrowser(this.platformId)) {
return;
}
const url = this.status() === 404 ? this.currentNavigation() : this.lastNavigation();
if (url) {
this.router.navigateByUrl(url, { onSameUrlNavigation: 'reload' });
}
else {
this.location.back();
}
this.destroy$?.next();
}
goHome() {
this.router.navigateByUrl('/', { onSameUrlNavigation: 'reload' });
this.destroy$?.next();
}
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: HttpErrorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.13", type: HttpErrorComponent, isStandalone: true, selector: "abp-http-error", ngImport: i0, template: "<ng-container *abpReplaceableTemplate=\"{ componentKey: errorComponentKey }\">\r\n <div class=\"container\">\r\n <div class=\"row\">\r\n <div class=\"col-lg-10 col-md-11 mx-auto\">\r\n <div\r\n class=\"d-flex flex-column justify-content-center min-vh-100 align-items-center\"\r\n >\r\n <div class=\"card\">\r\n <div class=\"card-body p-lg-5\">\r\n <div class=\"row\">\r\n <div class=\"col-auto d-flex align-items-center\">\r\n <i\r\n class=\"bi bi-emoji-frown text-primary mb-3 mb-md-0 mx-3 mx-md-4\"\r\n style=\"font-size: 12em\"\r\n ></i>\r\n </div>\r\n <div class=\"col flex-center ps-lg-4\">\r\n <div class=\"status-content\">\r\n <h1 class=\"fw-bolder display-1 text-brand\">\r\n {{ status() }}\r\n </h1>\r\n <h2 class=\"mb-0\">{{ statusText() | abpLocalization }}</h2>\r\n <h5 class=\"text-muted\">{{ detail() | abpLocalization }}</h5>\r\n\r\n @if (lastNavigation() && status() !== 403) {\r\n <a class=\"btn btn-primary soft me-2\" (click)=\"goBack()\">\r\n {{ 'AbpUi::GoBack' | abpLocalization }}\r\n </a>\r\n }\r\n <a class=\"btn btn-primary\" (click)=\"goHome()\">\r\n {{ 'AbpUi::GoHomePage' | abpLocalization }}\r\n </a>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</ng-container>\r\n", dependencies: [{ kind: "directive", type: ReplaceableTemplateDirective, selector: "[abpReplaceableTemplate]", inputs: ["abpReplaceableTemplate"] }, { kind: "pipe", type: LocalizationPipe, name: "abpLocalization" }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: HttpErrorComponent, decorators: [{
type: Component,
args: [{ selector: 'abp-http-error', imports: [LocalizationPipe, ReplaceableTemplateDirective], template: "<ng-container *abpReplaceableTemplate=\"{ componentKey: errorComponentKey }\">\r\n <div class=\"container\">\r\n <div class=\"row\">\r\n <div class=\"col-lg-10 col-md-11 mx-auto\">\r\n <div\r\n class=\"d-flex flex-column justify-content-center min-vh-100 align-items-center\"\r\n >\r\n <div class=\"card\">\r\n <div class=\"card-body p-lg-5\">\r\n <div class=\"row\">\r\n <div class=\"col-auto d-flex align-items-center\">\r\n <i\r\n class=\"bi bi-emoji-frown text-primary mb-3 mb-md-0 mx-3 mx-md-4\"\r\n style=\"font-size: 12em\"\r\n ></i>\r\n </div>\r\n <div class=\"col flex-center ps-lg-4\">\r\n <div class=\"status-content\">\r\n <h1 class=\"fw-bolder display-1 text-brand\">\r\n {{ status() }}\r\n </h1>\r\n <h2 class=\"mb-0\">{{ statusText() | abpLocalization }}</h2>\r\n <h5 class=\"text-muted\">{{ detail() | abpLocalization }}</h5>\r\n\r\n @if (lastNavigation() && status() !== 403) {\r\n <a class=\"btn btn-primary soft me-2\" (click)=\"goBack()\">\r\n {{ 'AbpUi::GoBack' | abpLocalization }}\r\n </a>\r\n }\r\n <a class=\"btn btn-primary\" (click)=\"goHome()\">\r\n {{ 'AbpUi::GoHomePage' | abpLocalization }}\r\n </a>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</ng-container>\r\n" }]
}], ctorParameters: () => [] });
var httpError_component = /*#__PURE__*/Object.freeze({
__proto__: null,
HttpErrorComponent: HttpErrorComponent
});
class ThemeLeptonXModule {
/**
* @deprecated `ThemeLeptonXModule.forRoot()` is deprecated. You can use `provideThemeLeptonX` **function** instead.
*/
static forRoot(options) {
return {
ngModule: ThemeLeptonXModule,
providers: [provideThemeLeptonX(withThemeLeptonXOptions(options))],
};
}
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: ThemeLeptonXModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.13", ngImport: i0, type: ThemeLeptonXModule }); }
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: ThemeLeptonXModule }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: ThemeLeptonXModule, decorators: [{
type: NgModule
}] });
/**
* Generated bundle index. Do not edit.
*/
export { ACCOUNT_LAYOUT_PROVIDER, AbpAuthService, AbpCreateErrorComponentService, AbpSettingsService, AbpTranslateService, AbpValidationErrorComponent, AbpValidationErrorModule, HTTP_ERROR_PATH, HttpErrorComponent, INIT_SERVICE_PROVIDER, LEPTON_X_USER_MENU_PROVIDERS, LPX_STYLE_PROVIDER, LPX_TRANSLATE_KEYS_PROVIDER, LPX_TRANSLATE_KEY_MAP_TOKEN, LPX_TRANSLATE_PROVIDER, ThemeLeptonXFeatureKind, ThemeLeptonXModule, configureUserMenu, eUserMenuItems, httpErrorProvider, initAccountLayout, initServices, leptonXRoutes, provideAbpValidationError, provideThemeLeptonX, translateKeys, withThemeLeptonXOptions };
//# sourceMappingURL=volosoft-abp.ng.theme.lepton-x.mjs.map