import { Subject, Observable } from 'rxjs'; import { FormControl } from '@angular/forms'; import * as i0 from '@angular/core'; import { InjectionToken, OnInit, ElementRef, OnChanges, EventEmitter, SimpleChanges, PipeTransform } from '@angular/core'; import { NgScrollbar } from 'ngx-scrollbar'; declare const FONT_PICKER_CONFIG: InjectionToken; interface FontInterface { size: string; style: string; family: string; files?: any; styles?: string[]; getStyles?: () => any; } interface GoogleFontInterface { kind: string; family: string; category: string; files: any[]; variants: string[]; } declare class GoogleFontsInterface { kind: string; items: any[]; } declare class Font implements FontInterface { size: string; style: string; family: string; files: any; styles: string[]; constructor(props?: Partial); getStyles(): any; } interface FontPickerConfigInterface { apiKey?: string; } declare class FontPickerConfig implements FontPickerConfigInterface { apiKey?: string; constructor(config?: Partial); assign(config?: Partial): void; } declare class FontPickerComponent implements OnInit { private cdRef; private elRef; private service; private document; private readonly window; private initialFont; private testWidth; private testContainer; private autoWidth; private listenerResize; private listenerMouseDown; private directiveInstance; private directiveElementRef; private useRootViewContainer; font: Font; open: boolean; loading: boolean; top: number; left: number; position: string; arrowTop: number; listLabel: string; selectedFont: boolean; presetVisible: boolean; safeFonts: string[]; fontAmount: number; loadedFonts: number; presetFonts: Font[]; googleFonts: Font[]; currentFonts: Font[]; fpWidth: number; fpHeight: number; fpPosition: string; fpPositionOffset: number; fpSearchText: string; fpLoadingText: string; fpPopularLabel: string; fpResultsLabel: string; fpPresetLabel: string; fpPresetFonts: string[]; fpPresetNotice: string; fpSizeSelect: boolean; fpStyleSelect: boolean; fpCancelButton: boolean; fpCancelButtonText: string; fpCancelButtonClass: string; fpUploadButton: boolean; fpUploadButtonText: string; fpUploadButtonClass: string; fpDialogDisplay: string; fpFilterByFamilies: string[]; fpSortByFamilies: boolean; dialogArrowSize: number; dialogArrowOffset: number; searchTerm: FormControl; renderMore: Subject; dialogElement: ElementRef; scrollbar: NgScrollbar; handleEsc(event: any): void; handleEnter(event: any): void; constructor(); ngOnInit(): void; trackFont(index: number, font: FontInterface): string; setDialog(instance: any, elementRef: ElementRef, fpUseRootViewContainer: boolean, defaultFont: FontInterface, fpWidth: string, fpHeight: string, fpDialogDisplay: string, fpSizeSelect: boolean, fpStyleSelect: boolean, fpPosition: string, fpPositionOffset: string, fpPositionRelativeToArrow: boolean, fpSearchText: string, fpLoadingText: string, fpPopularLabel: string, fpResultsLabel: string, fpPresetLabel: string, fpPresetFonts: string[], fpPresetNotice: string, fpCancelButton: boolean, fpCancelButtonText: string, fpCancelButtonClass: string, fpUploadButton: boolean, fpUploadButtonText: string, fpUploadButtonClass: string, fpFilterByFamilies: string[], fpSortByFamilies: boolean): void; updateDialog(font: FontInterface, fpWidth: string, fpHeight: string, fpDialogDisplay: string, fpSizeSelect: boolean, fpStyleSelect: boolean, fpPosition: string, fpPositionOffset: string, fpPositionRelativeToArrow: boolean, fpSearchText: string, fpLoadingText: string, fpPopularLabel: string, fpResultsLabel: string, fpPresetLabel: string, fpPresetFonts: string[], fpPresetNotice: string, fpCancelButton: boolean, fpCancelButtonText: string, fpCancelButtonClass: string, fpUploadButton: boolean, fpUploadButtonText: string, fpUploadButtonClass: string, fpFilterByFamilies: string[], fpSortByFamilies: boolean): void; openFontPicker(): void; closeFontPicker(): void; private isFontAvailable; private getPresetFonts; private setCurrentFonts; private findFont; private findFonts; private loadMoreFonts; private loadGoogleFonts; private searchGoogleFonts; private isDescendant; private createDialogBox; private setDialogPosition; private onResize; private onMouseDown; onUploadFont(event: any): void; onAcceptSelect(event: any): void; onCancelSelect(event: any): void; onSelectFont(font: any): void; onSearchReset(event: any): void; onFontSizeChange(event: any): void; onFontStyleChange(event: any, font: Font): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class FontPickerDirective implements OnInit, OnChanges { private injector; private appRef; private vcRef; private elRef; private cdRef; private service; private dialog; private viewAttachedToAppRef; private cmpRef; fontPicker: FontInterface; fpWidth: string; fpHeight: string; fpFallbackFont: FontInterface; fpAutoLoad: boolean; fpPresetLabel: string; fpPresetFonts: string[]; fpPresetNotice: string; fpSizeSelect: boolean; fpStyleSelect: boolean; fpDialogDisplay: string; fpUseRootViewContainer: boolean; fpPosition: string; fpPositionOffset: string; fpPositionRelativeToArrow: boolean; fpSearchText: string; fpLoadingText: string; fpPopularLabel: string; fpResultsLabel: string; fpCancelButton: boolean; fpCancelButtonText: string; fpCancelButtonClass: string; fpUploadButton: boolean; fpUploadButtonText: string; fpUploadButtonClass: string; fpFilterByFamilies: string[]; fpSortByFamilies: boolean; fontPickerUpload: EventEmitter; fontPickerChange: EventEmitter; onClick(): void; ngOnInit(): void; ngOnChanges(changes: SimpleChanges): void; loadFont(font: FontInterface): void; uploadFont(): void; openDialog(): void; closeDialog(): void; toggleDialog(): void; fontChanged(font: FontInterface): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class FontPickerService { private http; private _config; private apiKey; private baseUrl; constructor(); /** * Loads the given font from Google Web Fonts. */ loadFont(font: FontInterface): void; /** * Returns list of all fonts with given sort option: * date || alpha || style || trending || popularity */ getAllFonts(sort: string): Observable; /** * Returns font object for the requested font family. */ getRequestedFont(family: string): Observable; /** * Handler method for all possible http request errors. */ private handleHttpError; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare class FontSizePipe implements PipeTransform { transform(value: string): number; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵpipe: i0.ɵɵPipeDeclaration; } declare class FontStylesPipe implements PipeTransform { transform(value: string): string; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵpipe: i0.ɵɵPipeDeclaration; } declare class StatefulSlicePipe implements PipeTransform { private slicedArray; private previousArrayRef; private previousEndValue; transform(arr: any[], start: number, end: number): any[]; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵpipe: i0.ɵɵPipeDeclaration; } export { FONT_PICKER_CONFIG, Font, FontPickerComponent, FontPickerConfig, FontPickerDirective, FontPickerService, FontSizePipe, FontStylesPipe, GoogleFontsInterface, StatefulSlicePipe }; export type { FontInterface, FontPickerConfigInterface, GoogleFontInterface };