import * as i0 from '@angular/core'; import { AfterViewInit, ElementRef, EventEmitter, OnInit, OnDestroy } from '@angular/core'; import * as i13 from '@angular/forms'; import { ControlValueAccessor, NgModel } from '@angular/forms'; import * as i12 from '@angular/common'; declare const enum ExecCommand { backColor = "backColor", bold = "bold", ClearAuthenticationCache = "ClearAuthenticationCache", contentReadOnly = "contentReadOnly", copy = "copy", createLink = "createLink", cut = "cut", decreaseFontSize = "decreaseFontSize", defaultParagraphSeparator = "defaultParagraphSeparator", delete = "delete", enableAbsolutePositionEditor = "enableAbsolutePositionEditor", enableInlineTableEditing = "enableInlineTableEditing", enableObjectResizing = "enableObjectResizing", fontName = "fontName", fontSize = "fontSize", foreColor = "foreColor", formatBlock = "formatBlock", forwardDelete = "forwardDelete", heading = "heading", hiliteColor = "hiliteColor", increaseFontSize = "increaseFontSize", indent = "indent", insertBrOnReturn = "insertBrOnReturn", insertHorizontalRule = "insertHorizontalRule", insertHTML = "insertHTML", insertImage = "insertImage", insertOrderedList = "insertOrderedList", insertUnorderedList = "insertUnorderedList", insertParagraph = "insertParagraph", insertText = "insertText", italic = "italic", justifyCenter = "justifyCenter", justifyFull = "justifyFull", justifyLeft = "justifyLeft", justifyRight = "justifyRight", outdent = "outdent", paste = "paste", redo = "redo", removeFormat = "removeFormat", selectAll = "selectAll", strikeThrough = "strikeThrough", subscript = "subscript", superscript = "superscript", underline = "underline", undo = "undo", unlink = "unlink", useCSS = "useCSS", styleWithCSS = "styleWithCSS", AutoUrlDetect = "AutoUrlDetect" } declare enum ToolbarItemType { Separator = 0, Button = 1, Select = 2, Color = 3, Input = 4, Dropdown = 5 } interface EditorButton extends ToolbarBaseItem { type: ToolbarItemType.Button; command: ExecCommand; icon: string; title?: string; } interface EditorColor extends ToolbarBaseItem { type: ToolbarItemType.Color; command: ExecCommand; icon: string; title?: string; } interface EditorInput extends ToolbarBaseItem { type: ToolbarItemType.Input; command: ExecCommand; icon: string; text: string; title?: string; label?: string; transform?: (val: string) => string; } interface EditorSelect extends ToolbarBaseItem { type: ToolbarItemType.Select; command: ExecCommand; items: { value: number | string; label: string; }[]; title?: string; } interface EditorDropdown extends ToolbarBaseItem { type: ToolbarItemType.Dropdown; label: string; items: { command: ExecCommand; value: string; label: string; }[]; title?: string; } interface Separator extends ToolbarBaseItem { type: ToolbarItemType.Separator; } interface ToolbarBaseItem { type: ToolbarItemType; } type ToolbarItem = EditorDropdown | EditorInput | EditorColor | EditorSelect | EditorButton | Separator; declare class CommandService { private readonly document; constructor(document: Document); private isCommandWithValue; private isCommandWithState; getQueryCommandState(buttons: ToolbarItem[]): { [key: string]: string | number | boolean; }; execCommand(command: string, value?: string): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } interface EditorConfig { buttons?: ToolbarItem[]; placeholder?: string; } declare class EditorComponent implements AfterViewInit, ControlValueAccessor { private readonly commandService; set config(val: EditorConfig); get config(): EditorConfig; _config: EditorConfig; contentEditable: ElementRef; content: string; toolbarItemType: typeof ToolbarItemType; isDisabled: boolean; onChangeFn: (val: string) => void; onTouchedFn: () => void; queryCommandState: { [key: string]: string | number | boolean; }; constructor(commandService: CommandService); ngAfterViewInit(): void; writeValue(val: string): void; registerOnChange(fn: (val: string) => void): void; registerOnTouched(fn: () => void): void; setDisabledState?(isDisabled: boolean): void; domModify(): void; execCommand(command: string, value?: string): void; fetchQueryCommandState(): void; trackBy(_: any, item: ToolbarItem): ToolbarItemType; private updateContentEditable; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class EditorButtonComponent { button: EditorButton; state: string | number | boolean; command: EventEmitter; onCommand(command: ExecCommand): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class EditorColorPickerComponent { button: EditorColor; state: string | number | boolean; command: EventEmitter<{ command: ExecCommand; value: string; }>; onCommand(command: ExecCommand, value: string): void; rgbStringToHex(rgb: string | boolean | number): string; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class EditorInputComponent { private readonly element; private readonly document; button: EditorInput; state: string | number | boolean; command: EventEmitter<{ command: ExecCommand; value: string; }>; inputElement: ElementRef; windowElement: ElementRef; showInputWindow: boolean; value: string; margin: number; opacity: number; selectionRange: Range; constructor(element: ElementRef, document: Document); onCommand(): void; openInputWindow(): void; closeInputWindow(): void; outsideClick($event: MouseEvent): void; private loadSelection; private saveSelection; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class EditorSelectComponent implements OnInit { button: EditorSelect; state: string | number | boolean; command: EventEmitter<{ command: ExecCommand; value: string; }>; ngOnInit(): void; onCommand(command: ExecCommand, value: string): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class EditorSeparatorComponent { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class DomModifyDirective implements OnInit, OnDestroy { private readonly element; domModify: EventEmitter; observer: MutationObserver; constructor(element: ElementRef); ngOnInit(): void; ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class SelectionChangeDirective { private readonly document; private readonly element; selectionChange: EventEmitter; constructor(document: Document, element: ElementRef); selectionchange(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class EditorDropdownComponent implements AfterViewInit { selectElement: ElementRef; set button(val: EditorDropdown); get button(): EditorDropdown; width: number; label: string; _button: EditorDropdown; _tempButton: EditorDropdown; command: EventEmitter<{ command: ExecCommand; value: string; }>; ngAfterViewInit(): void; onCommand({ value: label }: { value: string; }): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class ActionDirective { action: EventEmitter; enterDown(event: KeyboardEvent): void; enterUp(event: KeyboardEvent): void; click(event: MouseEvent): void; private stopEvent; private performAction; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class NgModelChangeDebouncedDirective implements OnInit, OnDestroy { private readonly ngModel; stNgModelChangeDebounced: EventEmitter; private subscription; constructor(ngModel: NgModel); ngOnInit(): void; ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class NgxSimpleTextEditorModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } declare const UNDO_BUTTON: EditorButton; declare const REDO_BUTTON: EditorButton; declare const REMOVE_FORMAT_BUTTON: EditorButton; declare const SEPARATOR: Separator; declare const BOLD_BUTTON: EditorButton; declare const ITALIC_BUTTON: EditorButton; declare const UNDERLINE_BUTTON: EditorButton; declare const STRIKE_THROUGH_BUTTON: EditorButton; declare const JUSTIFY_LEFT_BUTTON: EditorButton; declare const JUSTIFY_CENTER_BUTTON: EditorButton; declare const JUSTIFY_RIGHT_BUTTON: EditorButton; declare const JUSTIFY_FULL_BUTTON: EditorButton; declare const ORDERED_LIST_BUTTON: EditorButton; declare const UNORDERED_LIST_BUTTON: EditorButton; declare const INDENT_BUTTON: EditorButton; declare const OUTDENT_BUTTON: EditorButton; declare const SUBSCRIPT_BUTTON: EditorButton; declare const SUPERSCRIPT_BUTTON: EditorButton; declare const FONT_SIZE_SELECT: EditorSelect; declare const LINK_INPUT: EditorInput; declare const UNLINK_BUTTON: EditorButton; declare const FORE_COLOR: EditorColor; declare const IMAGE_INPUT: EditorInput; declare const CUSTOM: EditorDropdown; declare const ST_BUTTONS: ToolbarItem[]; export { BOLD_BUTTON, CUSTOM, EditorButtonComponent, EditorColorPickerComponent, EditorComponent, EditorDropdownComponent, EditorInputComponent, EditorSelectComponent, EditorSeparatorComponent, ExecCommand, FONT_SIZE_SELECT, FORE_COLOR, IMAGE_INPUT, INDENT_BUTTON, ITALIC_BUTTON, JUSTIFY_CENTER_BUTTON, JUSTIFY_FULL_BUTTON, JUSTIFY_LEFT_BUTTON, JUSTIFY_RIGHT_BUTTON, LINK_INPUT, NgxSimpleTextEditorModule, ORDERED_LIST_BUTTON, OUTDENT_BUTTON, REDO_BUTTON, REMOVE_FORMAT_BUTTON, SEPARATOR, STRIKE_THROUGH_BUTTON, ST_BUTTONS, SUBSCRIPT_BUTTON, SUPERSCRIPT_BUTTON, ToolbarItemType, UNDERLINE_BUTTON, UNDO_BUTTON, UNLINK_BUTTON, UNORDERED_LIST_BUTTON }; export type { EditorButton, EditorColor, EditorConfig, EditorDropdown, EditorInput, EditorSelect, Separator, ToolbarItem };