import * as _angular_forms from '@angular/forms'; import { ControlValueAccessor, Validator, AbstractControl, ValidationErrors, ValidatorFn } from '@angular/forms'; import * as i0 from '@angular/core'; import { ElementRef, Renderer2 } from '@angular/core'; interface AddrInputEvent { type?: 'insert' | 'delete' | 'paste'; pos: number; change: string | null; value?: string | null; previous?: string | null; } /** * Base directive for ip address input fields. */ declare abstract class SiIpInputDirective { private static idCounter; protected readonly elementRef: ElementRef; protected readonly renderer: Renderer2; protected readonly inputEl: any; /** * @defaultValue * ``` * `si-ip-input-${SiIpInputDirective.idCounter++}` * ``` */ readonly id: i0.InputSignal; /** * Enable CIDR (Classless Inter-Domain Routing) notation. * @defaultValue false */ readonly cidr: i0.InputSignalWithTransform; /** * Whether the ip address input is disabled. * @defaultValue false */ readonly disabledInput: i0.InputSignal; private readonly disabledNgControl; protected readonly disabled: i0.Signal; protected onTouched: () => void; protected onChange: (value: any) => void; protected value?: string | null; registerOnChange(fn: any): void; registerOnTouched(fn: () => void): void; setDisabledState(isDisabled: boolean): void; writeValue(value?: string | null): void; protected onInput(e: Event): void; /** @internal */ protected onBlur(): void; /** * Allow to adjust the input value when leaving the input field. */ protected leaveInput(): void; /** * Enforce a format on user input. */ protected abstract maskInput(e: AddrInputEvent): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * Directive for IPv4 address input fields. * * Usage: * * ```ts * import { SiFormItemComponent } from '@siemens/element-ng/form'; * import { SiIp4InputDirective } from '@siemens/element-ng/ip-input'; * * @Component({ * template: ` * * * * `, * imports: [SiFormItemComponent, SiIp4InputDirective, ...] * }) * ``` */ declare class SiIp4InputDirective extends SiIpInputDirective implements ControlValueAccessor, Validator { validate(control: AbstractControl): ValidationErrors | null; /** * Trim leading zeros from each part of the IPv4 address */ protected leaveInput(): void; /** @internal */ protected maskInput(e: AddrInputEvent): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * Directive for IPv6 address input fields. * * Usage: * * ```ts * import { SiFormItemComponent } from '@siemens/element-ng/form'; * import { SiIp6InputDirective } from '@siemens/element-ng/ip-input'; * * @Component({ * template: ` * * * * `, * imports: [SiFormItemComponent, SiIp6InputDirective, ...] * }) * ``` */ declare class SiIp6InputDirective extends SiIpInputDirective implements ControlValueAccessor, Validator { protected readonly validatorFn: i0.Signal<_angular_forms.ValidatorFn>; validate(control: AbstractControl): ValidationErrors | null; protected maskInput(e: AddrInputEvent): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * Copyright (c) Siemens 2016 - 2026 * SPDX-License-Identifier: MIT */ /** * Validator factory for a IPV6 address. */ declare const ipV6Validator: (options: { zeroCompression?: boolean; cidr?: boolean; }) => ValidatorFn; /** * Validates a IPV4 address. */ declare const ipV4Validator: ValidatorFn; /** * Validates a IPV4 address including CIDR. */ declare const ipV4CIDRValidator: ValidatorFn; export { SiIp4InputDirective, SiIp6InputDirective, ipV4CIDRValidator, ipV4Validator, ipV6Validator };