import * as i0 from '@angular/core'; import { OnInit, OnDestroy, OnChanges, EventEmitter, ElementRef, SimpleChanges, AfterContentInit, AfterViewInit } from '@angular/core'; import * as i2 from '@angular/forms'; import { ControlValueAccessor, FormControl, ValidatorFn, FormGroup } from '@angular/forms'; import * as i4 from '@eui/components/externals/quill'; import { QuillModules, ToolbarItemConfig, EditorChangeSelection, ContentChange, SelectionChange, Focus, Blur } from '@eui/components/externals/quill'; export * from '@eui/components/externals/quill'; import { BooleanInput, NumberInput } from '@angular/cdk/coercion'; import * as i1 from '@angular/common'; import * as i3 from '@eui/components/directives'; import * as i5 from '@eui/components/eui-dialog'; import * as i6 from '@eui/components/eui-icon'; import * as i7 from '@eui/components/eui-input-text'; declare const QuillType$1: any; /** * @description * Rich text editor component based on Quill with customizable toolbar and formatting options. * Provides WYSIWYG editing capabilities with support for text formatting, images, tables, links, and code blocks. * Implements ControlValueAccessor for seamless integration with Angular forms. * Supports both HTML and JSON output formats with character and word counting. * Commonly used for content management, document editing, comment systems, and rich text input fields. * Dependencies: Quill editor library, EuiDialogService for image URL dialogs. */ declare class EuiEditorComponent implements ControlValueAccessor, OnInit, OnDestroy, OnChanges { get class(): string; e2eAttr: string; id: string; placeholder: string; format: 'html' | 'json'; theme: 'snow' | 'bubble'; debug: 'warn' | 'log' | 'error' | false; customToolbarPosition: 'top' | 'bottom'; tabindex: string; modules: QuillModules; formats?: string[] | null; customToolbarConfig: ToolbarItemConfig[]; height: string; editorCreate: EventEmitter; editorChange: EventEmitter; contentChange: EventEmitter; selectionChange: EventEmitter; focus: EventEmitter; blur: EventEmitter; charactersCountChange: EventEmitter; wordsCountChange: EventEmitter; true: boolean; get readonly(): string; value: string | any; charactersCount: number; wordsCount: number; bytesCount: number; isFocused: boolean; generatedId: string; formControl: FormControl; jsonToHtmlContent: string; toolbarConfig: { [id: string]: { label: string; options: any[]; dialogMessage: string; }; }; protected readyToRender: boolean; euiEditorCustomToolbar: EuiEditorCustomToolbarTagDirective; get isReadOnly(): boolean; set isReadOnly(value: BooleanInput); private _isReadOnly; get showCounters(): boolean; set showCounters(value: BooleanInput); private _showCounters; /** @deprecated The input isEnabledOnFocus will be deprecated in next major version of eUI. * Please check the showcase sample in order to replace this feature using the focus emitter. */ get isEnabledOnFocus(): boolean; set isEnabledOnFocus(value: boolean); private _isEnabledOnFocus; get isMinimalToolbar(): boolean; set isMinimalToolbar(value: BooleanInput); private _isMinimalToolbar; get isInvalid(): boolean; set isInvalid(value: BooleanInput); private _isInvalid; private quill; private minimalToolbarConfig; private defaultToolbarConfig; private destroy$; private euiDialogService; private cdr; private ngControl; private loader; constructor(); ngOnChanges(c: SimpleChanges): void; ngOnInit(): void; ngOnDestroy(): void; enableEditorOnFocus(event: any): void; imageUrlHandler(): void; editorUndo(): void; editorRedo(): void; editorDeleteContent(): void; insertTable(): void; get hasImageFeature(): boolean; _onEditorCreated(quill: typeof QuillType$1): void; private _internalChange; _onContentChanged(event: ContentChange): void; _onSelectionChanged(event: SelectionChange): void; _onFocus(event: Focus): void; _onBlur(event: Blur): void; registerOnChange(fn: any): void; registerOnTouched(fn: any): void; writeValue(value: string): void; private get tableModule(); private onChange; private onTouch; private htmlEntitiesDecode; get hasCharactersCounter(): boolean; get charactersCounterLabel(): string; get hasWordsCounter(): boolean; get wordsCounterLabel(): string; private calculateCounters; private stripHtml; private cleanHtml; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class EuiEditorCustomToolbarTagDirective { elementRef: ElementRef; elementClass: string; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * Pipe to remove classes from the editor */ declare class ClassFilterPipe { transform(value: string): string; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵpipe: i0.ɵɵPipeDeclaration; } /** * @description * Directive for enforcing maximum character length on eui-editor components. * Displays remaining character count indicator and prevents exceeding the specified limit. * Strips HTML tags when counting characters in HTML format mode. * Must be used with formControlName on eui-editor elements. * Automatically updates counter as content changes and applies error styling when limit exceeded. */ declare class EuiEditorMaxlengthDirective implements AfterContentInit, OnDestroy, OnChanges { /** * Content format of the editor being validated. * Determines how content is parsed for character counting. * 'html' strips HTML tags, 'json' parses Quill Delta format. * @default 'html' */ format: 'html' | 'json'; /** * Maximum allowed character count for editor content. * Characters are counted after stripping HTML tags or formatting. * Required for directive to function. */ get euiEditorMaxlength(): number; set euiEditorMaxlength(value: NumberInput); private _euiEditorMaxlength; /** * Shows or hides the remaining character count indicator. * When true, displays counter below editor showing characters remaining. * Counter turns red when limit is exceeded. * @default true */ get isShowMaxlength(): boolean; set isShowMaxlength(value: BooleanInput); private _isShowMaxlength; private valueChangesSubscription; private maxLengthSpan; private wrapper; private el; private renderer; private control; ngOnChanges(changes: SimpleChanges): void; ngAfterContentInit(): void; ngOnDestroy(): void; private refreshValue; private createMaxLengthBox; private destroyMaxLengthBox; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * @description * Validator that requires the length of the editor's content, out of HTML tags or JSON structure, to be greater than or equal * to the provided minimum length. * * @usageNotes * Validate that the editor has a minimum of 5 characters: * * ```typescript * const editor = new FormControl('ng', euiEditorMinLength(5)); * console.log(editor.errors); // { minlength: { minLength: 5, actual: 2 } } * ``` * * @returns A validator function that returns an error map with the * `minlength` if the validation check fails, otherwise `null`. */ declare const euiEditorMinLength: (minLength: number) => ValidatorFn; /** * @description * Validator that requires the length of the editor's content, out of HTML tags or JSON structure, to be less than or equal * to the provided maximum length. * * @usageNotes * Validate that the editor has a maximum of 10 characters: * * ```typescript * const editor = new FormControl('ng angular reactive', euiEditorMaxLength(10)); * console.log(editor.errors); // { maxLength: { maxLength: 10, actual: 19 } } * ``` * * @returns A validator function that returns an error map with the * `maxlength` if the validation check fails, otherwise `null`. */ declare const euiEditorMaxLength: (maxLength: number) => ValidatorFn; /** * @description * Validator that requires the number of words in the editor, out of HTML tags or JSON structure, to be greater than or equal * to the provided minimum number. * * @usageNotes * Validate that the editor has a minimum of 5 words: * * ```typescript * const editor = new FormControl('ng angular', euiEditorMinWords(5)); * console.log(editor.errors); // { minWords: { minWords: 5, actual: 2 } } * ``` * * @returns A validator function that returns an error map with the * `minWords` if the validation check fails, otherwise `null`. */ declare const euiEditorMinWords: (minWords: number) => ValidatorFn; /** * @description * Validator that requires the number of words in the editor, out of HTML tags or JSON structure, to be less than or equal * to the provided maximum number. * * @usageNotes * Validate that the editor has a maximum of 10 words: * * ```typescript * const editor = new FormControl('ng angular reactive forms editor wysiwyg eui ec europa npm node', euiEditorMaxWords(10)); * console.log(editor.errors); // { maxWords: { maxWords: 10, actual: 11 } } * ``` * * @returns A validator function that returns an error map with the * `maxWords` if the validation check fails, otherwise `null`. */ declare const euiEditorMaxWords: (maxWords: number) => ValidatorFn; /** * @description * Validator that requires the number of bytes in the editor, with HTML tags or JSON structure, to be greater than or equal * to the provided minimum number. * * @usageNotes * Validate that the editor has a minimum of 20 bytes: * * ```typescript * const editor = new FormControl('

europa.eu

', euiEditorMinBytes(20)); * console.log(editor.errors); // { minBytes: { minBytes: 20, actual: 16 } } * ``` * * @returns A validator function that returns an error map with the * `minBytes` if the validation check fails, otherwise `null`. */ declare const euiEditorMinBytes: (minBytes: number) => ValidatorFn; /** * @description * Validator that requires the number of bytes in the editor, with HTML tags or JSON structure, to be less than or equal * to the provided minimum number. * * @usageNotes * Validate that the editor has a maximum of 20 bytes: * * ```typescript * const editor = new FormControl('

europa.eu site

', euiEditorMinBytes(20)); * console.log(editor.errors); // { maxBytes: { maxBytes: 20, actual: 21 } } * ``` * * @returns A validator function that returns an error map with the * `maxBytes` if the validation check fails, otherwise `null`. */ declare const euiEditorMaxBytes: (maxBytes: number) => ValidatorFn; declare class EuiEditorCountersComponent { charactersCounter: number; charactersLabel: string; wordsCounter: number; wordsLabel: string; isMaxLengthValid: boolean; hasCharactersCounter: boolean; hasWordsCounter: boolean; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; static ngAcceptInputType_isMaxLengthValid: unknown; static ngAcceptInputType_hasCharactersCounter: unknown; static ngAcceptInputType_hasWordsCounter: unknown; } declare const QuillType: any; declare class EuiEditorJsonViewComponent implements AfterViewInit, OnChanges { string: string; theme: string; content: string; private quillEditor; private editorElem; private elementRef; valueSetter: (quillEditor: typeof QuillType, value: string) => void; ngOnChanges(changes: SimpleChanges): void; ngAfterViewInit(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class EuiEditorImageDialogComponent implements OnInit, OnDestroy { form: FormGroup; private destroy$; private config; ngOnInit(): void; ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class EuiEditorModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } export { ClassFilterPipe, EuiEditorComponent, EuiEditorCountersComponent, EuiEditorCustomToolbarTagDirective, EuiEditorMaxlengthDirective, EuiEditorModule, euiEditorMaxBytes, euiEditorMaxLength, euiEditorMaxWords, euiEditorMinBytes, euiEditorMinLength, euiEditorMinWords }; //# sourceMappingURL=eui-components-externals-eui-editor.d.ts.map