primeng
Version:
PrimeNG is an open source UI library for Angular featuring a rich set of 80+ components, a theme designer, various theme alternatives such as Material, Bootstrap, Tailwind, premium templates and professional support. In addition, it integrates with PrimeB
90 lines (85 loc) • 2.94 kB
TypeScript
import * as rxjs from 'rxjs';
import * as _angular_core from '@angular/core';
import { ElementRef, TemplateRef, InjectionToken, EnvironmentProviders } from '@angular/core';
import { OverlayOptions, Translation } from 'primeng/api';
import { BaseStyle } from 'primeng/base';
type ThemeType = {
preset?: any;
options?: any;
} | 'none' | boolean | undefined;
type ThemeConfigType = {
theme?: ThemeType;
csp?: {
nonce: string | undefined;
};
};
declare class ThemeProvider {
theme: _angular_core.WritableSignal<any>;
csp: _angular_core.WritableSignal<{
nonce: string | undefined;
}>;
isThemeChanged: boolean;
document: Document;
baseStyle: BaseStyle;
constructor();
ngOnDestroy(): void;
onThemeChange(value: any): void;
loadCommonTheme(): void;
setThemeConfig(config: ThemeConfigType): void;
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ThemeProvider, never>;
static ɵprov: _angular_core.ɵɵInjectableDeclaration<ThemeProvider>;
}
type ZIndex = {
modal: number;
overlay: number;
menu: number;
tooltip: number;
};
type PrimeNGConfigType = {
ripple?: boolean;
overlayAppendTo?: HTMLElement | ElementRef | TemplateRef<any> | string | null | undefined | any;
/**
* @deprecated Since v20. Use `inputVariant` instead.
*/
inputStyle?: 'outlined' | 'filled';
inputVariant?: 'outlined' | 'filled';
csp?: {
nonce: string | undefined;
};
overlayOptions?: OverlayOptions;
translation?: Translation;
zIndex?: ZIndex;
filterMatchModeOptions?: any;
} & ThemeConfigType;
declare class PrimeNG extends ThemeProvider {
ripple: _angular_core.WritableSignal<boolean>;
platformId: any;
/**
* @deprecated Since v20. Use `inputVariant` instead.
*/
inputStyle: _angular_core.WritableSignal<"outlined" | "filled">;
inputVariant: _angular_core.WritableSignal<"outlined" | "filled">;
overlayAppendTo: _angular_core.WritableSignal<any>;
overlayOptions: OverlayOptions;
csp: _angular_core.WritableSignal<{
nonce: string | undefined;
}>;
filterMatchModeOptions: {
text: string[];
numeric: string[];
date: string[];
};
translation: Translation;
zIndex: ZIndex;
private translationSource;
translationObserver: rxjs.Observable<any>;
getTranslation(key: string): any;
setTranslation(value: Translation): void;
setConfig(config: PrimeNGConfigType): void;
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PrimeNG, never>;
static ɵprov: _angular_core.ɵɵInjectableDeclaration<PrimeNG>;
}
declare const PRIME_NG_CONFIG: InjectionToken<PrimeNGConfigType>;
declare function providePrimeNG(...features: PrimeNGConfigType[]): EnvironmentProviders;
export { PRIME_NG_CONFIG, PrimeNG, ThemeProvider, providePrimeNG };
export type { PrimeNGConfigType, ThemeConfigType, ThemeType, ZIndex };