import { ElementRef, EventEmitter, OnDestroy } from '@angular/core'; import { ControlValueAccessor, FormControl, NgControl } from '@angular/forms'; import { FocusMonitor } from '@angular/cdk/a11y'; import { MatFormFieldControl } from '@angular/material/form-field'; import { Subject } from 'rxjs'; import { NgbModal as Modal, NgbActiveModal as ActiveModal } from '@ng-bootstrap/ng-bootstrap'; import * as i0 from "@angular/core"; declare type LookupTypes = string | number | Date; /** * Lookupcontrol which provide a lookupfunctionallity an assist-button * Contains a mat-input-control, a button for looking up and select in a related table of the input * and a button for a custom assist-function * @attribute placeholder see matInput * @attribute required see matInput * @attribute disabled see input * @attribute [(ngModel)] see angular material * @attribute lookupFor a string that describe for which "table.fieldname" we want to lookup for * @attribute (assist) an eventhandler who handles the assist-button-click * @attribute (change) an eventhandler who handles the changes in the input-field */ declare abstract class LookupControl implements MatFormFieldControl, ControlValueAccessor, OnDestroy { private focusMonitor; private elRef; private modal; modalRef: ActiveModal; ngControl: NgControl; abstract toValue(val: T): T; static nextId: number; inputControl: FormControl; stateChanges: Subject; focused: boolean; errorState: boolean; controlType: string; autofilled: boolean; private _lookupForColumn; inputElement: HTMLInputElement | null; lookupButton: HTMLButtonElement | null; assistButton: HTMLButtonElement | null; constructor(focusMonitor: FocusMonitor, elRef: ElementRef, modal: Modal, modalRef: ActiveModal, ngControl: NgControl); id: string; get shouldLabelFloat(): boolean; describedBy: string; set value(val: T); get value(): T; private _placeholder; set placeholder(ph: string); get placeholder(): string; get lookupFor(): string; set lookupFor(lookupForColumn: string); _required: boolean; get required(): boolean; set required(req: boolean); _disabled: boolean; get disabled(): boolean; set disabled(val: boolean); get empty(): boolean; setDescribedByIds(ids: string[]): void; assist: EventEmitter; ngAfterViewInit(): void; onContainerClick(event: MouseEvent): void; propagateChange: (_: any) => void; propagateTouched: () => void; registerOnChange(fn: (val: T) => void): void; registerOnTouched(fn: () => void): void; writeValue(value: T): void; /** * called by manually changes * @param event */ onChange(event: any): void; onLookup(): void; assistButtonClicked(): void; ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵdir: i0.ɵɵDirectiveDeclaration, never, never, { "value": "value"; "placeholder": "placeholder"; "lookupFor": "lookupFor"; "required": "required"; "disabled": "disabled"; }, { "assist": "assist"; }, never>; } export declare class CodeControlComponent extends LookupControl { constructor(fm: FocusMonitor, elRef: ElementRef, modal: Modal, modalRef: ActiveModal, ngControl: NgControl); toValue(val: string | null): string; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } /** * Text-Input Control with lookup- and Assist-functionality */ export declare class TextControlComponent extends LookupControl { constructor(fm: FocusMonitor, elRef: ElementRef, modal: Modal, modalRef: ActiveModal, ngControl: NgControl); toValue(val: string | null): string; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } /** * Integer-Input-control with lookup- and assist-fuctionallity */ export declare class IntegerControlComponent extends LookupControl { constructor(fm: FocusMonitor, elRef: ElementRef, modal: Modal, modalRef: ActiveModal, ngControl: NgControl); toValue(val: number | null): number; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } /** * decimal-Input-control with lookup- and assist-fuctionallity */ export declare class DecimalControlComponent extends LookupControl { constructor(fm: FocusMonitor, elRef: ElementRef, modal: Modal, modalRef: ActiveModal, ngControl: NgControl); toValue(val: number | null): number; _precision: number; get precision(): number; set precision(prec: number); static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } export declare class DateControlComponent extends LookupControl { constructor(fm: FocusMonitor, elRef: ElementRef, modal: Modal, modalRef: ActiveModal, ngControl: NgControl); toValue(val: string | Date | null): Date; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } export declare class DateTimeControlComponent extends LookupControl { constructor(fm: FocusMonitor, elRef: ElementRef, modal: Modal, modalRef: ActiveModal, ngControl: NgControl); toValue(val: string | Date | null): Date; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } export {};