import * as i0 from '@angular/core'; import { OnInit, OnDestroy, ChangeDetectorRef } from '@angular/core'; import * as i1 from '@angular/common'; import { NgControl, UntypedFormControl, ControlValueAccessor } from '@angular/forms'; import { DaffFormFieldControl } from '@daffodil/design/form-field'; import { Subject } from 'rxjs'; import { DaffInputComponent } from '@daffodil/design/input'; import { DaffNativeSelectComponent } from '@daffodil/design/native-select'; declare class DaffQuantityInputComponent implements OnInit, OnDestroy { ngControl: NgControl; private changeDetectorRef; input: DaffInputComponent; /** * @docs * The minimum number for the quantity input field */ min: number; /** * @docs * The maximum number for the quantity input field */ max: number; /** * A new control for the nested native input. * We don't bind the native input directly to the inherited form control * to avoid triggering updates on the input event. * Instead, we listen for the change event and manually patch form control values. */ _inputControl: UntypedFormControl; get focused(): boolean; _destroyed: Subject; get value(): any; set value(value: any); get disabled(): boolean; constructor(ngControl: NgControl, changeDetectorRef: ChangeDetectorRef); /** * @docs-private */ ngOnInit(): void; ngOnDestroy(): void; focus(): void; onFocus(): void; onBlur(): void; /** * Callback function fired when the value changes. * Used to pass the value back up to the ngControl. */ onValueChange(e: any): void; private setInputDisabled; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class DaffQuantitySelectComponent { ngControl: NgControl; private changeDetectorRef; select: DaffNativeSelectComponent; /** * @docs * The minimum number selectable. */ min: number; /** * @docs * The maximum number selectable; */ max: number; /** * @docs * Property used to determine whether or not the DaffQuantitySelectComponent is * used in a situation whether the `max` isn't a true max. */ extendable: boolean; /** * The amount to increment between "min" and "max". */ private increment; _value: number; get value(): number; set value(value: number); constructor(ngControl: NgControl, changeDetectorRef: ChangeDetectorRef); /** * Callback function fired when the value changes. * Used to pass the value back up to the ngControl. */ onValueChange(e: any): void; get focused(): boolean; focus(): void; onFocus(): void; /** * A helper function for easily making options for the `select`. */ get valueArray(): number[]; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class DaffQuantityFieldComponent extends DaffFormFieldControl implements ControlValueAccessor, DaffFormFieldControl { ngControl: NgControl; private cd; input: DaffQuantityInputComponent; select: DaffQuantitySelectComponent; /** * @docs * The minimum valid value of the quantity field. * Must be greater than or equal to 1. */ min: number; /** * @docs * The maximum valid value of the quantity field. * Must be greater than min. */ max: number; /** * @docs * The range of numbers acceptable in a quantity dropdown * before it becomes an input element. */ selectMax: number; id: string; get focused(): boolean; /** * @docs-private * * TODO: Update functionality to match other control during refactor. */ disabled: boolean; /** * @docs-private * TODO: Update functionality to match other control during refactor. */ required: boolean; private _quantity; private _inputHasBeenShown; get quantity(): number; set quantity(value: number); /** * Returns the lesser of max and selectMax. */ get _maxFloor(): number; get controlType(): "native-input" | "native-select"; get showInputField(): boolean; get showSelectField(): boolean; constructor(ngControl: NgControl, cd: ChangeDetectorRef); private onChange; private onTouched; writeValue(quantity: number): void; registerOnChange(fn: (quantity: number) => void): void; registerOnTouched(fn: any): void; setDisabledState(isDisabled: boolean): void; focus(): void; get value(): any; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } /** * @deprecated in favor of standalone components. Deprecated in version 0.84.0. Will be removed in version 1.0.0. */ declare class DaffQuantityFieldModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } export { DaffQuantityFieldComponent, DaffQuantityFieldModule };