StringComponent
Creates form input for strings. Based on the input values different kinds of inputs will be generated.
Implements ControlValueAccessor so it can be used within Angular forms.
Example :
<!-- string input validating input to be between 5 and 10 characters -->
<yuv-string [minLength]="5" [maxLength]="10"></yuv-string><yuv-string [regex]="[0-9]*">
<yuv-string [rows]="10">
Component Metadata
Section titled “Component Metadata”Selector: yuv-string
Standalone: Yes
Implements: ControlValueAccessor, AfterViewInit, OnInit, OnDestroy
Inputs
Section titled “Inputs”classifications
Section titled “classifications”Type: string[]
Additional semantics for the form element. Possible values are email (validates and creates a link to send an email once there is a valid email address) and url (validates and creates a link to an URL typed into the form element).
Type: number
Setting rows to more than 1 will generate a textarea instead of an input tag and apply the rows property to it
autofocus
Section titled “autofocus”Type: any
Default Value: false
Enable autofucus for the input (default: false)
maxLength
Section titled “maxLength”Type: number | undefined
Default Value: undefined
Maximum number of characters
minLength
Section titled “minLength”Type: number | undefined
Default Value: undefined
Minimal number of characters
multiselect
Section titled “multiselect”Type: any
Default Value: false
Indicator that multiple strings could be inserted, they will be rendered as chips (default: false).
readonly
Section titled “readonly”Type: any
Default Value: false
Will prevent the input from being changed (default: false)
Type: string | undefined
Default Value: undefined
Regular expression to validate the input value against
situation
Section titled “situation”Type: string | undefined
Default Value: undefined
Possibles values are EDIT (default),SEARCH,CREATE. In search situation validation of the form element will be turned off, so you are able to enter search terms that do not meet the elements validators.
disabled
Section titled “disabled”Type: BooleanInput
placeholder
Section titled “placeholder”Type: string
required
Section titled “required”Type: BooleanInput
Properties
Section titled “Properties”classifiytionIcons
Section titled “classifiytionIcons”Type: object
Default Value: \{ email: 'email', url: 'language', phone: 'call' \}
classify
Section titled “classify”Type: literal type
Type: unknown
Default Value: new FormControl<string | string[] | undefined>(undefined)
formatedValue
Section titled “formatedValue”Type: FormattedMailTo
maxEntryCountIfInvalid
Section titled “maxEntryCountIfInvalid”Type: number
ngControl
Section titled “ngControl”Type: unknown
Default Value: injectNgControl(this)
propagateChange
Section titled “propagateChange”Type: unknown
Default Value: () => \{...\}
separatorKeysCodes
Section titled “separatorKeysCodes”Type: unknown
Default Value: [ENTER, COMMA] as const
Type: unknown
Default Value: false
validationErrors
Section titled “validationErrors”Type: literal type[]
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”chipsAdd
Section titled “chipsAdd”chipsAdd(event: MatChipInputEvent): voidArguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
| event | MatChipInputEvent |
chipsEdit
Section titled “chipsEdit”chipsEdit(v: string, event: MatChipEditedEvent): voidArguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
| v | string | |
| event | MatChipEditedEvent |
chipsRemove
Section titled “chipsRemove”chipsRemove(v: string): voidArguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
| v | string |
onBlur
Section titled “onBlur”onBlur(): 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 |
writeValue
Section titled “writeValue”writeValue(value: string | string[]): voidArguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
| value | string | string[] |
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[] |