import { KbqInputModule } from '@koobiq/components/input';

KbqInput

directiveСкопировать ссылку на KbqInput
@Directive({
selector: 'input[kbqInput],input[kbqNumberInput]',
exportAs: 'kbqInput'
})
class KbqInput implements KbqFormFieldControl<any>, CanUpdateErrorState {
readonly errorStateMatcher = input<ErrorStateMatcher>();
type = input<string | undefined>();
ngControl: NgControl | null;
numberInput: KbqNumberInput | null;
parentForm: NgForm | null;
parentFormGroup: FormGroupDirective | null;
defaultErrorStateMatcher: ErrorStateMatcher;
readonly errorState: Signal<boolean>;
updateErrorState(): void;
focus(): void;
onBlur(): void;
focusChanged(isFocused: boolean): void;
}
errorStateMatcherinputСкопировать ссылку на errorStateMatcherErrorStateMatcher

An object used to control when error messages are shown.

typeinputСкопировать ссылку на typestring | undefined

Input type of the element.

errorStateСкопировать ссылку на errorStateSignal<boolean>

Whether the component is in an error state.

focusChanged()Скопировать ссылку на focusChanged()void

Callback for the cases where the focused state of the input changes.

KbqInputMono

directiveСкопировать ссылку на KbqInputMono
@Directive({
selector: 'input[kbqInputMonospace]',
exportAs: 'kbqInputMonospace, KbqInputMonospace'
})
class KbqInputMono {}

KbqInputPassword

directiveСкопировать ссылку на KbqInputPassword
@Directive({
selector: 'input[kbqInputPassword]',
exportAs: 'kbqInputPassword'
})
class KbqInputPassword implements KbqFormFieldControl<any>, CanUpdateErrorState {
readonly errorStateMatcher = input<ErrorStateMatcher>();
ngControl: NgControl | null;
parentForm: NgForm | null;
parentFormGroup: FormGroupDirective | null;
defaultErrorStateMatcher: ErrorStateMatcher;
readonly errorState: Signal<boolean>;
readonly elementType: Signal<"text" | "password">;
updateErrorState(): void;
toggleType(): void;
focus(): void;
onBlur(): void;
focusChanged(isFocused: boolean): void;
}
errorStateMatcherinputСкопировать ссылку на errorStateMatcherErrorStateMatcher

An object used to control when error messages are shown.

errorStateСкопировать ссылку на errorStateSignal<boolean>

Whether the component is in an error state.

elementTypeСкопировать ссылку на elementTypeSignal<"text" | "password">

Type of the native input: password while the password is hidden, text while it is shown.

toggleType()Скопировать ссылку на toggleType()void

Toggles the native input type between password and text.

focusChanged()Скопировать ссылку на focusChanged()void

Callback for the cases where the focused state of the input changes.

KbqMaxValidator

directiveСкопировать ссылку на KbqMaxValidator

A directive which installs the KbqMaxValidator for any formControlName, formControl, or control with ngModel that also has a max attribute.

@Directive({
selector: '[max][formControlName],[max][formControl],[max][ngModel]'
})
class KbqMaxValidator implements Validator {
readonly max = input<number>();
validate(c: AbstractControl): ValidationErrors | null;
registerOnValidatorChange(fn: () => void): void;
}
maxinputСкопировать ссылку на maxnumber

Upper bound installed as Validators.max. A non-numeric bound reads back as NaN.

KbqMinValidator

directiveСкопировать ссылку на KbqMinValidator

A directive which installs the KbqMinValidator for any formControlName, formControl, or control with ngModel that also has a min attribute.

@Directive({
selector: '[min][formControlName],[min][formControl],[min][ngModel]'
})
class KbqMinValidator implements Validator {
readonly min = input<number>();
validate(c: AbstractControl): ValidationErrors | null;
registerOnValidatorChange(fn: () => void): void;
}
mininputСкопировать ссылку на minnumber

Lower bound installed as Validators.min. A non-numeric bound reads back as NaN.

KbqNumberInput

directiveСкопировать ссылку на KbqNumberInput
@Directive({
selector: 'input[kbqNumberInput]',
exportAs: 'kbqNumberInput, kbqNumericalInput'
})
class KbqNumberInput implements ControlValueAccessor {
readonly integer = input<boolean>(false);
readonly bigStep = input<number>(BIG_STEP);
readonly step = input<number>(SMALL_STEP);
readonly min = input<number>(-Infinity);
readonly max = input<number>(Infinity);
readonly withThousandSeparator = input<boolean>(true);
readonly startFormattingFrom = input<number>();
value = input<number | null | undefined>();
disabled = input<boolean | undefined>();
readonly valueChange: Subject<number | null>;
readonly disabledChange: Subject<boolean>;
readonly stateChanges: Subject<void>;
focused: boolean;
get nativeElement(): HTMLInputElement;
get viewValue(): string;
get valueAsNumber(): number | null;
onContainerClick(): void;
focus(): void;
focusChanged(isFocused: boolean): void;
onKeyDown(event: KeyboardEvent): void;
onInput(event: InputEvent): void;
onPaste(event: ClipboardEvent): void;
stepUp(step: number): void;
stepDown(step: number): void;
}
integerinputСкопировать ссылку на integerboolean

Allows input and pasting of integers only.

bigStepinputСкопировать ссылку на bigStepnumber

Step applied when Shift is held.

stepinputСкопировать ссылку на stepnumber

Step applied by the arrow keys and by kbq-stepper.

mininputСкопировать ссылку на minnumber

Lower bound the value is clamped to when stepping.

maxinputСкопировать ссылку на maxnumber

Upper bound the value is clamped to when stepping.

startFormattingFrominputСкопировать ссылку на startFormattingFromnumber

Adds the thousand separator only from this power of ten. For example, 4 keeps 1234 un-grouped and groups 12345. Defaults to the active locale's own value.

valueinputСкопировать ссылку на valuenumber | null | undefined

The numeric value of the field, bound with [value] or written by a form control.

disabledinputСкопировать ссылку на disabledboolean | undefined

Whether the field is disabled, bound with [disabled] or set by a form control.

localeOverridesinputСкопировать ссылку на localeOverridesKbqPartialLocaleData | undefined

Localized strings for this element and its subtree, keyed by locale section. Every key is optional at every depth.

valueChangeСкопировать ссылку на valueChangeSubject<number | null>

Emits when the value changes (either due to user input or programmatic change).

disabledChangeСкопировать ссылку на disabledChangeSubject<boolean>

Emits when the disabled state has changed

stateChangesСкопировать ссылку на stateChangesSubject<void>

Emits whenever the focused or disabled state of the directive changes.

valueAsNumberСкопировать ссылку на valueAsNumbernumber | null

Locale-aware numeric read of the field: parsed straight from nativeElement.value, so "1 234,5" reads back as 1234.5 where the native valueAsNumber of a type="text" input reports NaN. Computed on every read rather than cached off the committed model, so it never lags behind a keystroke the way value can while onInput's reformat is still pending in its setTimeout(0) — safe to read from a consumer's own (input) handler. An in-progress "-" reads as null, same as an empty field, rather than the last committed number.

KBQ_INPUT_DEFAULT_LOCALE_CONFIGURATION

constСкопировать ссылку на KBQ_INPUT_DEFAULT_LOCALE_CONFIGURATION

Default configuration of KbqNumberInput: the whole input locale section, of which the number input reads number.

const KBQ_INPUT_DEFAULT_LOCALE_CONFIGURATION: KbqInputLocaleConfiguration;

KBQ_INPUT_LOCALE_CONFIGURATION

constСкопировать ссылку на KBQ_INPUT_LOCALE_CONFIGURATION

Injection token for providing the default configuration of KbqNumberInput.

const KBQ_INPUT_LOCALE_CONFIGURATION: InjectionToken<KbqInputLocaleConfiguration>;

KBQ_INPUT_NUMBER_DEFAULT_CONFIGURATION

constDeprecatedСкопировать ссылку на KBQ_INPUT_NUMBER_DEFAULT_CONFIGURATION

Use KBQ_INPUT_DEFAULT_LOCALE_CONFIGURATION, which carries the whole input locale section rather than just its number slice. Will be removed in 22.0.0.

const KBQ_INPUT_NUMBER_DEFAULT_CONFIGURATION: { groupSeparator: string[]; fractionSeparator: string; startFormattingFrom: number; viewGroupSeparator: string; };

KBQ_INPUT_VALUE_ACCESSOR

constСкопировать ссылку на KBQ_INPUT_VALUE_ACCESSOR
const KBQ_INPUT_VALUE_ACCESSOR: InjectionToken<{ value: any }>;

KBQ_MAX_VALIDATOR

constСкопировать ссылку на KBQ_MAX_VALIDATOR
const KBQ_MAX_VALIDATOR: Provider;

KBQ_MIN_VALIDATOR

constСкопировать ссылку на KBQ_MIN_VALIDATOR
const KBQ_MIN_VALIDATOR: Provider;

KBQ_NUMBER_INPUT_VALUE_ACCESSOR

constСкопировать ссылку на KBQ_NUMBER_INPUT_VALUE_ACCESSOR
const KBQ_NUMBER_INPUT_VALUE_ACCESSOR: any;

kbqInputLocaleConfigurationProvider

constСкопировать ссылку на kbqInputLocaleConfigurationProvider

Utility provider for KBQ_INPUT_LOCALE_CONFIGURATION. Only the values you pass are overridden; the rest keep following the active locale.

const kbqInputLocaleConfigurationProvider: (
configuration: KbqDeepPartial<KbqInputLocaleConfiguration>
) => Provider;
Предложения по улучшению
Если вы нашли ошибку или хотите доработать статью, создайте запрос на GitHub.