src/components/sq-input-file/sq-input-file.component.ts
Represents a file input component that extends SqInputComponent.
This component extends the SqInputComponent and adds additional properties and behavior for handling money input.
Example :
selector | sq-input-file |
styleUrls | ./sq-input-file.component.scss |
templateUrl | ./sq-input-file.component.html |
constructor(validatorHelper: ValidatorHelper, element: ElementRef, translate: TranslateService)
|
||||||||||||||||
Constructs a new instance of SqInputFileComponent.
Parameters :
|
block | |
Type : boolean
|
|
Default value : false
|
|
Display the file input as a block element. |
borderColor | |
Type : string
|
|
Default value : 'var(--primary_color)'
|
|
Inherited from
SqInputComponent
|
|
Defined in
SqInputComponent:28
|
|
Border color for the file input. |
color | |
Type : string
|
|
Default value : 'var(--primary_color)'
|
|
Color for the file input. |
fileType | |
Type : string
|
|
Default value : '*.*'
|
|
Allowed file types pattern (e.g., '*.jpg, *.png'). |
fontSize | |
Type : string
|
|
Default value : '1rem'
|
|
Font size for the file input. |
loading | |
Type : boolean
|
|
Default value : false
|
|
Indicates whether the file input is in a loading state. |
maxSize | |
Type : number
|
|
Maximum allowed file size in bytes. |
multiple | |
Type : boolean
|
|
Default value : false
|
|
Indicates whether multiple files can be selected. |
noPadding | |
Type : boolean
|
|
Default value : false
|
|
Indicates whether padding should be removed from the file input. |
textColor | |
Type : string
|
|
Default value : 'var(--white-html)'
|
|
Text color for the file input. |
backgroundColor | |
Type : string
|
|
Default value : ''
|
|
Inherited from
SqInputComponent
|
|
Defined in
SqInputComponent:141
|
|
Background color of the input element. |
customClass | |
Type : string
|
|
Default value : ''
|
|
Inherited from
SqInputComponent
|
|
Defined in
SqInputComponent:60
|
|
Custom CSS class for the input element. |
disabled | |
Type : boolean
|
|
Default value : false
|
|
Inherited from
SqInputComponent
|
|
Defined in
SqInputComponent:101
|
|
Flag to disable the input element. |
errorSpan | |
Type : boolean
|
|
Default value : true
|
|
Inherited from
SqInputComponent
|
|
Defined in
SqInputComponent:96
|
|
Flag to display an error span. |
externalError | |
Type : string
|
|
Default value : ''
|
|
Inherited from
SqInputComponent
|
|
Defined in
SqInputComponent:70
|
|
External error message to display. |
externalIcon | |
Type : string
|
|
Default value : ''
|
|
Inherited from
SqInputComponent
|
|
Defined in
SqInputComponent:75
|
|
External icon to display. |
id | |
Type : string
|
|
Inherited from
SqInputComponent
|
|
Defined in
SqInputComponent:50
|
|
The id attribute for the input element. |
inputMode | |
Type : string
|
|
Default value : ''
|
|
Inherited from
SqInputComponent
|
|
Defined in
SqInputComponent:171
|
|
Input mode for mobile devices. |
label | |
Type : string
|
|
Inherited from
SqInputComponent
|
|
Defined in
SqInputComponent:55
|
|
An optional label for the input. |
labelColor | |
Type : string
|
|
Default value : ''
|
|
Inherited from
SqInputComponent
|
|
Defined in
SqInputComponent:151
|
|
Color of the input label. |
maxLength | |
Type : number | null
|
|
Default value : null
|
|
Inherited from
SqInputComponent
|
|
Defined in
SqInputComponent:161
|
|
Maximum length for the input element. |
name | |
Type : string
|
|
Default value : `random-name-${(1 + Date.now() + Math.random()).toString().replace('.', '')}`
|
|
Inherited from
SqInputComponent
|
|
Defined in
SqInputComponent:45
|
|
The name attribute for the input element. |
pattern | |
Type : string
|
|
Default value : ''
|
|
Inherited from
SqInputComponent
|
|
Defined in
SqInputComponent:166
|
|
Regular expression pattern for input validation. |
placeholder | |
Type : string
|
|
Default value : ''
|
|
Inherited from
SqInputComponent
|
|
Defined in
SqInputComponent:65
|
|
Placeholder text for the input element. |
readonly | |
Type : boolean
|
|
Default value : false
|
|
Inherited from
SqInputComponent
|
|
Defined in
SqInputComponent:106
|
|
Flag to make the input element readonly. |
required | |
Type : boolean
|
|
Default value : false
|
|
Inherited from
SqInputComponent
|
|
Defined in
SqInputComponent:111
|
|
Flag to mark the input as required. |
timeToChange | |
Type : number
|
|
Default value : 0
|
|
Inherited from
SqInputComponent
|
|
Defined in
SqInputComponent:91
|
|
Time in milliseconds before triggering input timeout. |
tooltipColor | |
Type : string
|
|
Default value : 'inherit'
|
|
Inherited from
SqInputComponent
|
|
Defined in
SqInputComponent:131
|
|
Color of the tooltip. |
tooltipIcon | |
Type : string
|
|
Default value : ''
|
|
Inherited from
SqInputComponent
|
|
Defined in
SqInputComponent:136
|
|
Icon for the tooltip. |
tooltipMessage | |
Type : string
|
|
Default value : ''
|
|
Inherited from
SqInputComponent
|
|
Defined in
SqInputComponent:121
|
|
Tooltip message to display. |
tooltipPlacement | |
Type : "center top" | "center bottom" | "left center" | "right center"
|
|
Default value : 'right center'
|
|
Inherited from
SqInputComponent
|
|
Defined in
SqInputComponent:126
|
|
Placement of the tooltip. |
type | |
Type : "text" | "email" | "hidden" | "password" | "tel" | "url" | "file"
|
|
Default value : 'text'
|
|
Inherited from
SqInputComponent
|
|
Defined in
SqInputComponent:156
|
|
Type of the input element (e.g., text, email, password). |
useFormErrors | |
Type : boolean
|
|
Default value : true
|
|
Inherited from
SqInputComponent
|
|
Defined in
SqInputComponent:116
|
|
Flag to use form errors for validation messages. |
value | |
Type : any
|
|
Inherited from
SqInputComponent
|
|
Defined in
SqInputComponent:81
|
|
The value of the input element. |
emitFocus | |
Type : EventEmitter<Event>
|
|
Inherited from
SqInputComponent
|
|
Defined in
SqInputComponent:201
|
|
Event emitter for focus input changes. |
inFocus | |
Type : EventEmitter<boolean>
|
|
Inherited from
SqInputComponent
|
|
Defined in
SqInputComponent:186
|
|
Event emitter for input focus events. |
keyPressDown | |
Type : EventEmitter<KeyboardEvent>
|
|
Inherited from
SqInputComponent
|
|
Defined in
SqInputComponent:176
|
|
Event emitter for keydown events. |
keyPressUp | |
Type : EventEmitter<KeyboardEvent>
|
|
Inherited from
SqInputComponent
|
|
Defined in
SqInputComponent:181
|
|
Event emitter for keyup events. |
valid | |
Type : EventEmitter<boolean>
|
|
Inherited from
SqInputComponent
|
|
Defined in
SqInputComponent:191
|
|
Event emitter for validation status. |
valueChange | |
Type : EventEmitter<any>
|
|
Inherited from
SqInputComponent
|
|
Defined in
SqInputComponent:196
|
|
Event emitter for input value changes. |
Async change | ||||||||
change(event: any)
|
||||||||
Inherited from
SqInputComponent
|
||||||||
Defined in
SqInputComponent:135
|
||||||||
Handle the change event for the file input.
Parameters :
Returns :
any
|
Async validate | ||||||||
validate(isBlur)
|
||||||||
Inherited from
SqInputComponent
|
||||||||
Defined in
SqInputComponent:101
|
||||||||
Asynchronously validate the file input value.
Parameters :
Returns :
any
|
keyDown | ||||||||
keyDown(event: KeyboardEvent)
|
||||||||
Inherited from
SqInputComponent
|
||||||||
Defined in
SqInputComponent:314
|
||||||||
Handle keydown events.
Parameters :
Returns :
void
|
keyUp | ||||||||
keyUp(event: KeyboardEvent)
|
||||||||
Inherited from
SqInputComponent
|
||||||||
Defined in
SqInputComponent:322
|
||||||||
Handle keyup events.
Parameters :
Returns :
void
|
Async setError | |||||||||||||||
setError(key: string, interpolateParams: Object)
|
|||||||||||||||
Inherited from
SqInputComponent
|
|||||||||||||||
Defined in
SqInputComponent:304
|
|||||||||||||||
Sets an error message.
Parameters :
Returns :
any
|
customContent |
Type : TemplateRef<HTMLElement> | null
|
Default value : null
|
Decorators :
@ContentChild('customContent', {static: true})
|
Custom content to be displayed within the file input. |
nativeElement |
Type : ElementRef
|
Inherited from
SqInputComponent
|
Defined in
SqInputComponent:79
|
Reference to the native element. |
Public translate |
Type : TranslateService
|
Decorators :
@Optional()
|
Inherited from
SqInputComponent
|
Defined in
SqInputComponent:90
|
- The TranslateService for translation support (optional).
|
Public validatorHelper |
Type : ValidatorHelper
|
Inherited from
SqInputComponent
|
Defined in
SqInputComponent:88
|
- The ValidatorHelper service for input validation.
|
_value |
Type : any
|
Default value : ''
|
Inherited from
SqInputComponent
|
Defined in
SqInputComponent:224
|
The internal value of the input element. |
error |
Type : boolean | string
|
Default value : false
|
Inherited from
SqInputComponent
|
Defined in
SqInputComponent:229
|
Error message to display. |
labelTemplate |
Type : TemplateRef<HTMLElement> | null
|
Default value : null
|
Decorators :
@ContentChild('labelTemplate')
|
Inherited from
SqInputComponent
|
Defined in
SqInputComponent:219
|
Reference to a label template. |
leftLabel |
Type : TemplateRef<HTMLElement> | null
|
Default value : null
|
Decorators :
@ContentChild('leftLabel')
|
Inherited from
SqInputComponent
|
Defined in
SqInputComponent:207
|
Reference to a left-aligned label template. |
rightLabel |
Type : TemplateRef<HTMLElement> | null
|
Default value : null
|
Decorators :
@ContentChild('rightLabel')
|
Inherited from
SqInputComponent
|
Defined in
SqInputComponent:213
|
Reference to a right-aligned label template. |
timeoutInput |
Type : ReturnType<>
|
Inherited from
SqInputComponent
|
Defined in
SqInputComponent:239
|
Timeout for input changes. |
./sq-input-file.component.scss