@microsoft/windows-admin-center-sdk
Version:
Microsoft - Windows Admin Center Shell
112 lines (111 loc) • 4 kB
TypeScript
import { ElementRef, Injector, OnInit } from '@angular/core';
import { FormControl, ValidationErrors } from '@angular/forms';
import { SimplePropertySchemaFieldLoaderComponent } from '../../../schema/schema-field-host.component';
import { SmeInternalFormFieldComponent } from '../form-field.component';
import * as i0 from "@angular/core";
export declare class NumberFormFieldLoaderComponent extends SimplePropertySchemaFieldLoaderComponent {
static ɵfac: i0.ɵɵFactoryDeclaration<NumberFormFieldLoaderComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<NumberFormFieldLoaderComponent, "ng-component", never, {}, {}, never, never, false, never>;
}
/**
* Accessible number field implementation
*/
export declare class NumberFormFieldComponent extends SmeInternalFormFieldComponent<number> implements OnInit {
/**
* The source name to use for logging
*/
protected get logSourceName(): string;
/**
* The input from number form field
*/
input: ElementRef;
/**
* The container for the input box and spin buttons
*/
container: ElementRef;
/**
* The increment button UI element
*/
incrementButton: ElementRef;
/**
* The decrement button UI element
*/
decrementButton: ElementRef;
/**
* It determine whether to show the spin button.
*/
showSpinButton: boolean;
/**
* The size of each movement of the slider.
*/
step: number;
/**
* The size of each increment/decrement value of the slider.
*/
incrementBy: number;
/**
* The minimum value of the slider
*/
min: number;
/**
* The maximum value of the slider
*/
max: number;
/**
* Initializes a new instance of the SliderFormFieldComponent
*/
constructor(injector: Injector);
ngOnInit(): void;
/**
* Handle keydown events on the number input
*/
onInputKeydown($event: KeyboardEvent): void;
/**
* Increments the controls value by 1 "step"
*/
increment(): void;
/**
* Decrements the controls value by 1 "step"
*/
decrement(): void;
/**
* The functionality to focus on the input field
*/
onInputFocus($event: any): void;
/**
* The functionality to focus out on the input field
*
* @param $event the focus event object
*/
onInputFocusOut($event: any): void;
/**
* Creates the idBag used by this component to store unique element ids.
* id values will be assigned be the @see BaseComponent super class.
*/
protected createIdBag(): MsftSme.StringMap<string>;
/**
* Determines the value to use when clearing the field based on the initial value type
*/
protected getClearValue(): number;
/**
* Performs validation that is internal to this control
* @param c The form control attached to this instance
*/
protected validate(c: FormControl): ValidationErrors;
/**
* Gets the remainder of a division operation by converting any decimals to integers first
* @param value The number to be divided
* @param divisor The dividing number
*/
protected getSafeRemainder(value: number, divisor: number): number;
/**
* It toggles the focus state for passed in UI element
*
* @param element the element for focusing
* @param addClass it determines whether to add or remove class state
* @returns void
*/
protected toggleFocusEvent(element: ElementRef, addClass?: boolean): void;
static ɵfac: i0.ɵɵFactoryDeclaration<NumberFormFieldComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<NumberFormFieldComponent, "sme-form-field[type=\"number\"]", never, { "showSpinButton": "showSpinButton"; "step": "step"; "incrementBy": "incrementBy"; "min": "min"; "max": "max"; }, {}, never, never, false, never>;
}