@abp/ng.theme.basic
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.
220 lines (195 loc) • 10.8 kB
TypeScript
import * as i0 from '@angular/core';
import { AfterViewInit, TrackByFunction, Renderer2, ElementRef, TemplateRef, Injector, ModuleWithProviders, InjectionToken } from '@angular/core';
import * as _abp_ng_core from '@abp/ng.core';
import { eLayoutType, CurrentUserDto, LanguageInfo, RoutesService, TreeNode, ABP, DomInsertionService, ReplaceableComponentsService } from '@abp/ng.core';
import { AuthWrapperService, TenantBoxService } from '@abp/ng.account.core';
import { UserMenuService, UserMenu, NavItemsService, NavItem, PageAlertService, LocaleDirection } from '@abp/ng.theme.shared';
import { Observable } from 'rxjs';
import { ValidationErrorComponent as ValidationErrorComponent$1, Validation } from '@ngx-validate/core';
declare const enum eThemeBasicComponents {
ApplicationLayout = "Theme.ApplicationLayoutComponent",
AccountLayout = "Theme.AccountLayoutComponent",
EmptyLayout = "Theme.EmptyLayoutComponent",
Logo = "Theme.LogoComponent",
Routes = "Theme.RoutesComponent",
NavItems = "Theme.NavItemsComponent",
CurrentUser = "Theme.CurrentUserComponent",
Languages = "Theme.LanguagesComponent"
}
declare const enum eUserMenuItems {
MyAccount = "UserMenu.MyAccount",
Logout = "UserMenu.Logout"
}
declare class LayoutService {
private subscription;
private cdRef;
document: Document;
isCollapsed: boolean;
smallScreen: boolean;
logoComponentKey: eThemeBasicComponents;
routesComponentKey: eThemeBasicComponents;
navItemsComponentKey: eThemeBasicComponents;
constructor();
private checkWindowWidth;
subscribeWindowSize(): void;
static ɵfac: i0.ɵɵFactoryDeclaration<LayoutService, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<LayoutService>;
}
declare class AccountLayoutComponent implements AfterViewInit {
service: LayoutService;
static type: eLayoutType;
authWrapperKey: string;
ngAfterViewInit(): void;
static ɵfac: i0.ɵɵFactoryDeclaration<AccountLayoutComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<AccountLayoutComponent, "abp-layout-account", never, {}, {}, never, never, true, never>;
}
declare class AuthWrapperComponent {
service: AuthWrapperService;
static ɵfac: i0.ɵɵFactoryDeclaration<AuthWrapperComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<AuthWrapperComponent, "abp-auth-wrapper", never, {}, {}, never, ["*"], true, never>;
}
declare class TenantBoxComponent {
service: TenantBoxService;
static ɵfac: i0.ɵɵFactoryDeclaration<TenantBoxComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<TenantBoxComponent, "abp-tenant-box", never, {}, {}, never, never, true, never>;
}
declare class ApplicationLayoutComponent implements AfterViewInit {
readonly service: LayoutService;
static type: eLayoutType;
ngAfterViewInit(): void;
static ɵfac: i0.ɵɵFactoryDeclaration<ApplicationLayoutComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<ApplicationLayoutComponent, "abp-layout-application", never, {}, {}, never, never, true, never>;
}
declare class EmptyLayoutComponent {
static type: eLayoutType;
static ɵfac: i0.ɵɵFactoryDeclaration<EmptyLayoutComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<EmptyLayoutComponent, "abp-layout-empty", never, {}, {}, never, never, true, never>;
}
declare class LogoComponent {
private environment;
private readonly providedLogoUrl;
private readonly providedAppName;
get logoUrl(): string;
get appName(): string;
static ɵfac: i0.ɵɵFactoryDeclaration<LogoComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<LogoComponent, "abp-logo", never, {}, {}, never, never, true, never>;
}
declare class CurrentUserComponent {
readonly navigateToManageProfile: () => void;
readonly userMenu: UserMenuService;
private authService;
private configState;
private sessionState;
private document;
currentUser$: Observable<CurrentUserDto>;
selectedTenant$: Observable<_abp_ng_core.CurrentTenantDto>;
trackByFn: TrackByFunction<UserMenu>;
get smallScreen(): boolean;
navigateToLogin(): void;
logout(): void;
static ɵfac: i0.ɵɵFactoryDeclaration<CurrentUserComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<CurrentUserComponent, "abp-current-user", never, {}, {}, never, never, true, never>;
}
declare class LanguagesComponent {
private sessionState;
private configState;
document: Document;
get smallScreen(): boolean;
languages$: Observable<LanguageInfo[]>;
get defaultLanguage$(): Observable<string>;
get dropdownLanguages$(): Observable<LanguageInfo[]>;
get selectedLangCulture(): string;
onChangeLang(cultureName: string): void;
static ɵfac: i0.ɵɵFactoryDeclaration<LanguagesComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<LanguagesComponent, "abp-languages", never, {}, {}, never, never, true, never>;
}
declare class NavItemsComponent {
readonly navItems: NavItemsService;
private platformId;
readonly isBrowser: boolean;
trackByFn: TrackByFunction<NavItem>;
static ɵfac: i0.ɵɵFactoryDeclaration<NavItemsComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<NavItemsComponent, "abp-nav-items", never, {}, {}, never, never, true, never>;
}
declare class PageAlertContainerComponent {
service: PageAlertService;
static ɵfac: i0.ɵɵFactoryDeclaration<PageAlertContainerComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<PageAlertContainerComponent, "abp-page-alert-container", never, {}, {}, never, never, true, never>;
}
declare class RoutesComponent {
readonly routesService: RoutesService;
protected renderer: Renderer2;
readonly smallScreen: i0.InputSignal<boolean>;
readonly childrenContainers: i0.Signal<readonly ElementRef<HTMLDivElement>[]>;
rootDropdownExpand: {
[key: string]: boolean;
};
trackByFn: TrackByFunction<TreeNode<ABP.Route>>;
isDropdown(node: TreeNode<ABP.Route>): boolean;
closeDropdown(): void;
static ɵfac: i0.ɵɵFactoryDeclaration<RoutesComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<RoutesComponent, "abp-routes", never, { "smallScreen": { "alias": "smallScreen"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
}
declare class ValidationErrorComponent extends ValidationErrorComponent$1 {
get abpErrors(): (Validation.Error & {
interpoliteParams?: string[];
})[];
static ɵfac: i0.ɵɵFactoryDeclaration<ValidationErrorComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<ValidationErrorComponent, "abp-validation-error", never, {}, {}, never, never, true, never>;
}
declare const BOOTSTRAP = "bootstrap-{{dir}}.min.css";
declare class LazyStyleHandler {
private document;
private lazyLoad;
private styles;
private _dir;
readonly loaded: Map<string, HTMLLinkElement>;
set dir(dir: LocaleDirection);
get dir(): LocaleDirection;
constructor();
private getHrefFromLink;
private getLoadedBootstrap;
private listenToDirectionChanges;
private setLazyLoad;
private setStyles;
private switchCSS;
static ɵfac: i0.ɵɵFactoryDeclaration<LazyStyleHandler, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<LazyStyleHandler>;
}
declare function createLazyStyleHref(style: string, dir: string): string;
declare function initLazyStyleHandler(): () => LazyStyleHandler;
declare namespace Layout {
interface State {
navigationElements: NavigationElement[];
}
interface NavigationElement {
name: string;
element: TemplateRef<any>;
order?: number;
}
}
declare const BASIC_THEME_NAV_ITEM_PROVIDERS: i0.EnvironmentProviders[];
declare function configureNavItems(): void;
declare const BASIC_THEME_STYLES_PROVIDERS: i0.EnvironmentProviders[];
declare function configureStyles(domInsertion: DomInsertionService, replaceableComponents: ReplaceableComponentsService): () => void;
declare const BASIC_THEME_USER_MENU_PROVIDERS: i0.EnvironmentProviders[];
declare function configureUserMenu(injector: Injector): () => void;
declare function provideThemeBasicConfig(): i0.EnvironmentProviders;
declare const LAYOUTS: (typeof EmptyLayoutComponent)[];
declare const THEME_BASIC_COMPONENTS: (typeof LogoComponent | typeof RoutesComponent | typeof NavItemsComponent | typeof TenantBoxComponent | typeof AuthWrapperComponent | typeof PageAlertContainerComponent | typeof EmptyLayoutComponent | typeof CurrentUserComponent | typeof LanguagesComponent | typeof ValidationErrorComponent)[];
declare class BaseThemeBasicModule {
static ɵfac: i0.ɵɵFactoryDeclaration<BaseThemeBasicModule, never>;
static ɵmod: i0.ɵɵNgModuleDeclaration<BaseThemeBasicModule, never, [typeof ApplicationLayoutComponent, typeof AccountLayoutComponent, typeof EmptyLayoutComponent, typeof ValidationErrorComponent, typeof LogoComponent, typeof NavItemsComponent, typeof RoutesComponent, typeof CurrentUserComponent, typeof LanguagesComponent, typeof PageAlertContainerComponent, typeof AuthWrapperComponent, typeof TenantBoxComponent], [typeof ApplicationLayoutComponent, typeof AccountLayoutComponent, typeof EmptyLayoutComponent, typeof ValidationErrorComponent, typeof LogoComponent, typeof NavItemsComponent, typeof RoutesComponent, typeof CurrentUserComponent, typeof LanguagesComponent, typeof PageAlertContainerComponent, typeof AuthWrapperComponent, typeof TenantBoxComponent]>;
static ɵinj: i0.ɵɵInjectorDeclaration<BaseThemeBasicModule>;
}
declare class ThemeBasicModule {
/**
* @deprecated forRoot method is deprecated, use `provideThemeBasicConfig` *function* for config settings.
*/
static forRoot(): ModuleWithProviders<ThemeBasicModule>;
static ɵfac: i0.ɵɵFactoryDeclaration<ThemeBasicModule, never>;
static ɵmod: i0.ɵɵNgModuleDeclaration<ThemeBasicModule, never, [typeof BaseThemeBasicModule], [typeof BaseThemeBasicModule]>;
static ɵinj: i0.ɵɵInjectorDeclaration<ThemeBasicModule>;
}
declare const LAZY_STYLES: InjectionToken<string[]>;
export { AccountLayoutComponent, ApplicationLayoutComponent, AuthWrapperComponent, BASIC_THEME_NAV_ITEM_PROVIDERS, BASIC_THEME_STYLES_PROVIDERS, BASIC_THEME_USER_MENU_PROVIDERS, BOOTSTRAP, BaseThemeBasicModule, CurrentUserComponent, EmptyLayoutComponent, LAYOUTS, LAZY_STYLES, LanguagesComponent, Layout, LazyStyleHandler, LogoComponent, NavItemsComponent, PageAlertContainerComponent, RoutesComponent, THEME_BASIC_COMPONENTS, TenantBoxComponent, ThemeBasicModule, ValidationErrorComponent, configureNavItems, configureStyles, configureUserMenu, createLazyStyleHref, eThemeBasicComponents, eUserMenuItems, initLazyStyleHandler, provideThemeBasicConfig };