NumberComponent
Creates form input for number values.
Implements ControlValueAccessor so it can be used within Angular forms.
Example :
<yuv-number [scale]="2"></yuv-number>Component Metadata
Section titled “Component Metadata”Selector: yuv-number
Standalone: Yes
Implements: ControlValueAccessor, OnInit, OnDestroy
Inputs
Section titled “Inputs”classifications
Section titled “classifications”Type: string[]
Default Value: []
classification property adds some semantics to the value of this component. If you provide a value of filesize numbers typed into the control will be handled like file sizes (calculates differnt units)
grouping
Section titled “grouping”Type: boolean
Default Value: false
Set to true to group number by pattern
groupPattern
Section titled “groupPattern”Type: string | undefined
Default Value: undefined
The pattern to group number value by
maxValue
Section titled “maxValue”Type: number | undefined
Default Value: undefined
set maximum input value
minValue
Section titled “minValue”Type: number | undefined
Default Value: undefined
set minimum input value
precision
Section titled “precision”Type: number | undefined
Default Value: undefined
Overall amount of digits allowed (including decimal places)
readonly
Section titled “readonly”Type: boolean
Default Value: false
Will prevent the input from being changed (default: false)
Type: number | undefined
Default Value: undefined
Number of decimal places
disabled
Section titled “disabled”Type: BooleanInput
placeholder
Section titled “placeholder”Type: string
required
Section titled “required”Type: BooleanInput
Properties
Section titled “Properties”innerCtrl
Section titled “innerCtrl”Type: unknown
Default Value: new FormControl<string | null>(null)
ngControl
Section titled “ngControl”Type: unknown
Default Value: injectNgControl(this)
propagateChange
Section titled “propagateChange”Type: unknown
Default Value: () => {...}
transformPipe
Section titled “transformPipe”Type: LocaleNumberPipe | FileSizePipe
Default Value: new LocaleNumberPipe(this.translate)
translate
Section titled “translate”Type: unknown
Default Value: inject(TranslateService)
validationErrors
Section titled “validationErrors”Type: ValidationErrors[]
Default Value: []
autofilled
Section titled “autofilled”Type: boolean
controlType
Section titled “controlType”Type: string
disableAutomaticLabeling
Section titled “disableAutomaticLabeling”Type: boolean
stateChanges
Section titled “stateChanges”Type: unknown
Default Value: new Subject<void>()
userAriaDescribedBy
Section titled “userAriaDescribedBy”Type: string
Methods
Section titled “Methods”betweenTwoNumbers
Section titled “betweenTwoNumbers”betweenTwoNumbers(val: number, minVal: number | undefined, maxVal: number | undefined): booleanArguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
| val | number | |
| minVal | number | undefined | |
| maxVal | number | undefined |
format
Section titled “format”format(): voidregisterOnChange
Section titled “registerOnChange”registerOnChange(fn: any): voidArguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
| fn | any |
registerOnTouched
Section titled “registerOnTouched”registerOnTouched(): voidsetDisabledState
Section titled “setDisabledState”setDisabledState(isDisabled: boolean): voidArguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
| isDisabled | boolean |
unformat
Section titled “unformat”unformat(): voidwriteValue
Section titled “writeValue”writeValue(value: any): voidArguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
| value | any |
onContainerClick
Section titled “onContainerClick”onContainerClick(event: MouseEvent): voidArguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
| event | MouseEvent |
onFocusIn
Section titled “onFocusIn”onFocusIn(): voidonFocusout
Section titled “onFocusout”onFocusout(): voidonNgOnDestroy
Section titled “onNgOnDestroy”onNgOnDestroy(): voidsetDescribedByIds
Section titled “setDescribedByIds”setDescribedByIds(ids: string[]): voidArguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
| ids | string[] |