import * as _angular_core from '@angular/core'; import { OnDestroy, InjectionToken, Signal } from '@angular/core'; import { FieldTree, validate, SchemaPath } from '@angular/forms/signals'; import { ValidatorFn } from '@angular/forms'; type Placement = 'top' | 'bottom' | 'left' | 'right' | 'bottom-left' | 'top-left'; interface ErrorTooltipOptions { id?: string | number; showFirstErrorOnly?: boolean; placement?: Placement; zIndex?: number; tooltipClass?: string; shadow?: boolean; offset?: number; width?: string; maxWidth?: string; textColor?: string; backgroundColor?: string; borderColor?: string; pointerEvents?: "auto" | "none"; appendTooltipToBody?: boolean; } declare class ErrorTooltipDirective implements OnDestroy { private readonly hostEl; private readonly viewContainerRef; private readonly envInjector; private readonly controlContainer; private readonly ngControl; private readonly globalOptions; readonly options: _angular_core.InputSignal; readonly id: _angular_core.InputSignal; readonly showFirstErrorOnly: _angular_core.InputSignal; readonly placement: _angular_core.InputSignal; readonly zIndex: _angular_core.InputSignal; readonly tooltipClass: _angular_core.InputSignal; readonly shadow: _angular_core.InputSignal; readonly offset: _angular_core.InputSignal; readonly width: _angular_core.InputSignal; readonly maxWidth: _angular_core.InputSignal; readonly textColor: _angular_core.InputSignal; readonly backgroundColor: _angular_core.InputSignal; readonly borderColor: _angular_core.InputSignal; readonly pointerEvents: _angular_core.InputSignal<"auto" | "none" | null>; readonly appendTooltipToBody: _angular_core.InputSignal; private readonly mergedOptions; private refToTooltip; private tooltipComponent; private formControlPosition; private isTooltipVisible; private readonly controlTick; private readonly destroyAll$; private readonly tooltipDestroyed$; private readonly errorPayloads; constructor(); ngOnInit(): void; /** Public API **/ showErrorTooltip(): void; hideErrorTooltip(): void; /** Submit listener **/ private handleTooltipVisibilityOnFormSubmission; /** Tooltip lifecycle **/ private displayTooltip; private setupTooltipComponent; private attachListeners; private destroyTooltip; private getFormControlPosition; ngOnDestroy(): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵdir: _angular_core.ɵɵDirectiveDeclaration; } declare class ErrorTooltipSigDirective implements OnDestroy { private readonly hostEl; private readonly viewContainerRef; private readonly injector; private readonly globalOptions; readonly options: _angular_core.InputSignal; readonly errorTooltipField: _angular_core.InputSignal>; readonly id: _angular_core.InputSignal; readonly showFirstErrorOnly: _angular_core.InputSignal; readonly placement: _angular_core.InputSignal; readonly zIndex: _angular_core.InputSignal; readonly tooltipClass: _angular_core.InputSignal; readonly shadow: _angular_core.InputSignal; readonly offset: _angular_core.InputSignal; readonly width: _angular_core.InputSignal; readonly maxWidth: _angular_core.InputSignal; readonly textColor: _angular_core.InputSignal; readonly backgroundColor: _angular_core.InputSignal; readonly borderColor: _angular_core.InputSignal; readonly pointerEvents: _angular_core.InputSignal<"auto" | "none" | null>; readonly appendTooltipToBody: _angular_core.InputSignal; private readonly mergedOptions; private refToTooltip; private tooltipComponent; private formControlPosition; private readonly field; private readonly errorPayloads; private isTooltipVisible; private readonly destroy$; constructor(); /** Public User-Methods **/ showErrorTooltip(): void; hideErrorTooltip(): void; /** Listeners **/ private attachListeners; private listenToUserInteraction; private listenForPositionChangesOfFormControl; private displayTooltip; private setupTooltipComponent; private destroyTooltip; private getFormControlPosition; ngOnDestroy(): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵdir: _angular_core.ɵɵDirectiveDeclaration; } type SignalValidateFn = typeof validate; declare const ERROR_TOOLTIP_SIG_VALIDATE: InjectionToken; type SupportedLanguage = 'de' | 'fr' | 'en'; interface ErrorTooltipProviderOptions { lang?: SupportedLanguage | Signal; validate?: SignalValidateFn; } declare function provideErrorTooltips(options?: ErrorTooltipProviderOptions): _angular_core.EnvironmentProviders; declare const ERROR_TOOLTIP_OPTIONS: InjectionToken; declare function provideErrorTooltipOptions(options: ErrorTooltipOptions): _angular_core.EnvironmentProviders; type TriLangText = Record; declare class CustomValidators { static required(errorMessage?: string): ValidatorFn; static trueRequired(errorMessage?: string): ValidatorFn; static minLength(minLength: number, errorMessage?: string): ValidatorFn; static maxLength(maxLength: number, errorMessage?: string): ValidatorFn; static smallerThan(referenceValue: number, errorMessage?: string): ValidatorFn; static formattedSmallerThan(referenceValue: number, errorMessage?: string): ValidatorFn; static greaterThan(referenceValue: number, errorMessage?: string): ValidatorFn; static formattedGreaterThan(referenceValue: number, errorMessage?: string): ValidatorFn; static minValue(referenceValue: number, errorMessage?: string): ValidatorFn; static formattedMinValue(referenceValue: number, errorMessage?: string): ValidatorFn; static maxValue(referenceValue: number, errorMessage?: string): ValidatorFn; static formattedMaxValue(referenceValue: number, errorMessage?: string): ValidatorFn; static lettersOnly(errorMessage?: string): ValidatorFn; static email(errorMessage?: string): ValidatorFn; static passwordErrors(minLength: number, minDigits: number, minCapitalLetters: number): ValidatorFn; static regexPattern(pattern: RegExp, errorMessage: string): ValidatorFn; /*** i18 variants of custom validators ***/ static requiredI18n(errorMessage?: TriLangText): ValidatorFn; static trueRequiredI18n(errorMessage?: TriLangText): ValidatorFn; static minLengthI18n(minLength: number, errorMessage?: TriLangText): ValidatorFn; static maxLengthI18n(maxLength: number, errorMessage?: TriLangText): ValidatorFn; static smallerThanI18n(referenceValue: number, errorMessage?: TriLangText): ValidatorFn; static formattedSmallerThanI18n(referenceValue: number, errorMessage?: TriLangText): ValidatorFn; static greaterThanI18n(referenceValue: number, errorMessage?: TriLangText): ValidatorFn; static formattedGreaterThanI18n(referenceValue: number, errorMessage?: TriLangText): ValidatorFn; static minValueI18n(referenceValue: number, errorMessage?: TriLangText): ValidatorFn; static formattedMinValueI18n(referenceValue: number, errorMessage?: TriLangText): ValidatorFn; static maxValueI18n(referenceValue: number, errorMessage?: TriLangText): ValidatorFn; static formattedMaxValueI18n(referenceValue: number, errorMessage?: TriLangText): ValidatorFn; static lettersOnlyI18n(errorMessage?: TriLangText): ValidatorFn; static emailI18n(errorMessage?: TriLangText): ValidatorFn; static passwordErrorsI18n(minLength: number, minDigits: number, minCapitalLetters: number): ValidatorFn; /** * i18n regexPattern: * Here it's mandatory that the caller provides all three translations (app-specific text). */ static regexPatternI18n(pattern: RegExp, errorMessage: TriLangText): ValidatorFn; /*** Helpers ***/ private static isEmptyValue; private static toNumberOrNull; } type TriLangTextLike$1 = TriLangText | Signal | (() => TriLangText | null | undefined); type ValueLike$1 = T | Signal | (() => T); declare class CustomSigValidators { private readonly validate; private resolve; private resolveTriLangText; required(path: SchemaPath, errorMessage?: ValueLike$1): void; trueRequired(path: SchemaPath, errorMessage?: ValueLike$1): void; minLength(path: SchemaPath, minLength: ValueLike$1, errorMessage?: ValueLike$1): void; maxLength(path: SchemaPath, maxLength: ValueLike$1, errorMessage?: ValueLike$1): void; smallerThan(path: SchemaPath, referenceValue: ValueLike$1, errorMessage?: ValueLike$1): void; formattedSmallerThan(path: SchemaPath, referenceValue: ValueLike$1, errorMessage?: ValueLike$1): void; greaterThan(path: SchemaPath, referenceValue: ValueLike$1, errorMessage?: ValueLike$1): void; formattedGreaterThan(path: SchemaPath, referenceValue: ValueLike$1, errorMessage?: ValueLike$1): void; minValue(path: SchemaPath, referenceValue: ValueLike$1, errorMessage?: ValueLike$1): void; formattedMinValue(path: SchemaPath, referenceValue: ValueLike$1, errorMessage?: ValueLike$1): void; maxValue(path: SchemaPath, referenceValue: ValueLike$1, errorMessage?: ValueLike$1): void; formattedMaxValue(path: SchemaPath, referenceValue: ValueLike$1, errorMessage?: ValueLike$1): void; lettersOnly(path: SchemaPath, errorMessage?: ValueLike$1): void; email(path: SchemaPath, errorMessage?: ValueLike$1): void; passwordErrors(path: SchemaPath, minLength: ValueLike$1, minDigits: ValueLike$1, minCapitalLetters: ValueLike$1): void; regexPattern(path: SchemaPath, pattern: RegExp, errorMessage: ValueLike$1): void; /*** i18 variants of custom validators ***/ requiredI18n(path: SchemaPath, errorMessage?: TriLangTextLike$1): void; trueRequiredI18n(path: SchemaPath, errorMessage?: TriLangTextLike$1): void; minLengthI18n(path: SchemaPath, minLength: ValueLike$1, errorMessage?: TriLangTextLike$1): void; maxLengthI18n(path: SchemaPath, maxLength: ValueLike$1, errorMessage?: TriLangTextLike$1): void; smallerThanI18n(path: SchemaPath, referenceValue: ValueLike$1, errorMessage?: TriLangTextLike$1): void; formattedSmallerThanI18n(path: SchemaPath, referenceValue: ValueLike$1, errorMessage?: TriLangTextLike$1): void; greaterThanI18n(path: SchemaPath, referenceValue: ValueLike$1, errorMessage?: TriLangTextLike$1): void; formattedGreaterThanI18n(path: SchemaPath, referenceValue: ValueLike$1, errorMessage?: TriLangTextLike$1): void; minValueI18n(path: SchemaPath, referenceValue: ValueLike$1, errorMessage?: TriLangTextLike$1): void; formattedMinValueI18n(path: SchemaPath, referenceValue: ValueLike$1, errorMessage?: TriLangTextLike$1): void; maxValueI18n(path: SchemaPath, referenceValue: ValueLike$1, errorMessage?: TriLangTextLike$1): void; formattedMaxValueI18n(path: SchemaPath, referenceValue: ValueLike$1, errorMessage?: TriLangTextLike$1): void; lettersOnlyI18n(path: SchemaPath, errorMessage?: TriLangTextLike$1): void; emailI18n(path: SchemaPath, errorMessage?: TriLangTextLike$1): void; passwordErrorsI18n(path: SchemaPath, minLength: ValueLike$1, minDigits: ValueLike$1, minCapitalLetters: ValueLike$1): void; regexPatternI18n(path: SchemaPath, pattern: RegExp, errorMessage: TriLangTextLike$1): void; /*** Helpers ***/ private isEmptyValue; private toNumberOrNull; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵprov: _angular_core.ɵɵInjectableDeclaration; } declare const ERROR_TOOLTIP_LANG: InjectionToken>; declare class ErrorTooltipSigFormDirective { private readonly tooltips; showErrorTooltips(): void; hideErrorTooltips(): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵdir: _angular_core.ɵɵDirectiveDeclaration; } declare class MockErrorTooltipDirective { private collectedOptions; options: ErrorTooltipOptions; set id(val: string | number); set showFirstErrorOnly(val: boolean); set placement(val: Placement); set zIndex(val: number); set tooltipClass(val: string); set shadow(val: boolean); set offset(val: number); set width(val: string); set maxWidth(val: string); set textColor(val: string); set backgroundColor(val: string); set borderColor(val: string); set pointerEvents(val: 'auto' | 'none'); static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵdir: _angular_core.ɵɵDirectiveDeclaration; } declare class MockErrorTooltipSigDirective { private collectedOptions; options: ErrorTooltipOptions; errorTooltipField: FieldTree; set id(val: string | number | null); set showFirstErrorOnly(val: boolean | null); set placement(val: Placement | null); set zIndex(val: number | null); set tooltipClass(val: string | null); set shadow(val: boolean | null); set offset(val: number | null); set width(val: string | null); set maxWidth(val: string | null); set textColor(val: string | null); set backgroundColor(val: string | null); set borderColor(val: string | null); set pointerEvents(val: 'auto' | 'none' | null); showErrorTooltip(): void; hideErrorTooltip(): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵdir: _angular_core.ɵɵDirectiveDeclaration; } /** * Mock for ErrorTooltipSigFormDirective (Signal Forms). * Keeps tests lightweight: no contentChildren/querying, just spyable methods. */ declare class MockErrorTooltipSigFormDirective { showErrorTooltips(): void; hideErrorTooltips(): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵdir: _angular_core.ɵɵDirectiveDeclaration; } declare class MockCustomValidators { static required(_errorMessage?: string): ValidatorFn; static trueRequired(_errorMessage?: string): ValidatorFn; static minLength(_minLength: number, _errorMessage?: string): ValidatorFn; static maxLength(_maxLength: number, _errorMessage?: string): ValidatorFn; static smallerThan(_referenceValue: number, _errorMessage?: string): ValidatorFn; static formattedSmallerThan(_referenceValue: number, _errorMessage?: string): ValidatorFn; static greaterThan(_referenceValue: number, _errorMessage?: string): ValidatorFn; static formattedGreaterThan(_referenceValue: number, _errorMessage?: string): ValidatorFn; static minValue(_referenceValue: number, _errorMessage?: string): ValidatorFn; static formattedMinValue(_referenceValue: number, _errorMessage?: string): ValidatorFn; static maxValue(_referenceValue: number, _errorMessage?: string): ValidatorFn; static formattedMaxValue(_referenceValue: number, _errorMessage?: string): ValidatorFn; static lettersOnly(_errorMessage?: string): ValidatorFn; static email(_errorMessage?: string): ValidatorFn; static passwordErrors(_minLength: number, _minDigits: number, _minCapitalLetters: number): ValidatorFn; static regexPattern(_pattern: RegExp, _errorMessage: string): ValidatorFn; static requiredI18n(_errorMessage?: TriLangText): ValidatorFn; static trueRequiredI18n(_errorMessage?: TriLangText): ValidatorFn; static minLengthI18n(_minLength: number, _errorMessage?: TriLangText): ValidatorFn; static maxLengthI18n(_maxLength: number, _errorMessage?: TriLangText): ValidatorFn; static smallerThanI18n(_referenceValue: number, _errorMessage?: TriLangText): ValidatorFn; static formattedSmallerThanI18n(_referenceValue: number, _errorMessage?: TriLangText): ValidatorFn; static greaterThanI18n(_referenceValue: number, _errorMessage?: TriLangText): ValidatorFn; static formattedGreaterThanI18n(_referenceValue: number, _errorMessage?: TriLangText): ValidatorFn; static minValueI18n(_referenceValue: number, _errorMessage?: TriLangText): ValidatorFn; static formattedMinValueI18n(_referenceValue: number, _errorMessage?: TriLangText): ValidatorFn; static maxValueI18n(_referenceValue: number, _errorMessage?: TriLangText): ValidatorFn; static formattedMaxValueI18n(_referenceValue: number, _errorMessage?: TriLangText): ValidatorFn; static lettersOnlyI18n(_errorMessage?: TriLangText): ValidatorFn; static emailI18n(_errorMessage?: TriLangText): ValidatorFn; static passwordErrorsI18n(_minLength: number, _minDigits: number, _minCapitalLetters: number): ValidatorFn; static regexPatternI18n(_pattern: RegExp, _errorMessage: TriLangText): ValidatorFn; private static valid; } type TriLangTextLike = TriLangText | Signal | (() => TriLangText | null | undefined); type ValueLike = T | Signal | (() => T); declare class MockCustomSigValidators { required(_path: SchemaPath, _errorMessage?: ValueLike): void; trueRequired(_path: SchemaPath, _errorMessage?: ValueLike): void; minLength(_path: SchemaPath, _minLength: ValueLike, _errorMessage?: ValueLike): void; maxLength(_path: SchemaPath, _maxLength: ValueLike, _errorMessage?: ValueLike): void; smallerThan(_path: SchemaPath, _referenceValue: ValueLike, _errorMessage?: ValueLike): void; formattedSmallerThan(_path: SchemaPath, _referenceValue: ValueLike, _errorMessage?: ValueLike): void; greaterThan(_path: SchemaPath, _referenceValue: ValueLike, _errorMessage?: ValueLike): void; formattedGreaterThan(_path: SchemaPath, _referenceValue: ValueLike, _errorMessage?: ValueLike): void; minValue(_path: SchemaPath, _referenceValue: ValueLike, _errorMessage?: ValueLike): void; formattedMinValue(_path: SchemaPath, _referenceValue: ValueLike, _errorMessage?: ValueLike): void; maxValue(_path: SchemaPath, _referenceValue: ValueLike, _errorMessage?: ValueLike): void; formattedMaxValue(_path: SchemaPath, _referenceValue: ValueLike, _errorMessage?: ValueLike): void; lettersOnly(_path: SchemaPath, _errorMessage?: ValueLike): void; email(_path: SchemaPath, _errorMessage?: ValueLike): void; passwordErrors(_path: SchemaPath, _minLength: ValueLike, _minDigits: ValueLike, _minCapitalLetters: ValueLike): void; regexPattern(_path: SchemaPath, _pattern: RegExp, _errorMessage: ValueLike): void; requiredI18n(_path: SchemaPath, _errorMessage?: TriLangTextLike): void; trueRequiredI18n(_path: SchemaPath, _errorMessage?: TriLangTextLike): void; minLengthI18n(_path: SchemaPath, _minLength: ValueLike, _errorMessage?: TriLangTextLike): void; maxLengthI18n(_path: SchemaPath, _maxLength: ValueLike, _errorMessage?: TriLangTextLike): void; smallerThanI18n(_path: SchemaPath, _referenceValue: ValueLike, _errorMessage?: TriLangTextLike): void; formattedSmallerThanI18n(_path: SchemaPath, _referenceValue: ValueLike, _errorMessage?: TriLangTextLike): void; greaterThanI18n(_path: SchemaPath, _referenceValue: ValueLike, _errorMessage?: TriLangTextLike): void; formattedGreaterThanI18n(_path: SchemaPath, _referenceValue: ValueLike, _errorMessage?: TriLangTextLike): void; minValueI18n(_path: SchemaPath, _referenceValue: ValueLike, _errorMessage?: TriLangTextLike): void; formattedMinValueI18n(_path: SchemaPath, _referenceValue: ValueLike, _errorMessage?: TriLangTextLike): void; maxValueI18n(_path: SchemaPath, _referenceValue: ValueLike, _errorMessage?: TriLangTextLike): void; formattedMaxValueI18n(_path: SchemaPath, _referenceValue: ValueLike, _errorMessage?: TriLangTextLike): void; lettersOnlyI18n(_path: SchemaPath, _errorMessage?: TriLangTextLike): void; emailI18n(_path: SchemaPath, _errorMessage?: TriLangTextLike): void; passwordErrorsI18n(_path: SchemaPath, _minLength: ValueLike, _minDigits: ValueLike, _minCapitalLetters: ValueLike): void; regexPatternI18n(_path: SchemaPath, _pattern: RegExp, _errorMessage: TriLangTextLike): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵprov: _angular_core.ɵɵInjectableDeclaration; } export { CustomSigValidators, CustomValidators, ERROR_TOOLTIP_LANG, ERROR_TOOLTIP_OPTIONS, ERROR_TOOLTIP_SIG_VALIDATE, ErrorTooltipDirective, ErrorTooltipSigDirective, ErrorTooltipSigFormDirective, MockCustomSigValidators, MockCustomValidators, MockErrorTooltipDirective, MockErrorTooltipSigDirective, MockErrorTooltipSigFormDirective, provideErrorTooltipOptions, provideErrorTooltips }; export type { ErrorTooltipOptions, ErrorTooltipProviderOptions, SignalValidateFn, SupportedLanguage, TriLangText };