packages/ecl/components/ecl-file-upload/ecl-file-upload.directive.ts
Directive that enhances a native input[type=file] with ECL-compliant styling and behavior. Supports multiple file selection, dynamic file list rendering, translations and validation state.
| Selector | [eclFileUpload] |
Properties |
Methods |
Inputs |
Outputs |
HostBindings |
HostListeners |
Accessors |
| disabled |
Type : boolean
|
|
Whether the component is disabled. |
| id |
Type : string
|
|
ID attribute applied to the native file input. |
| isInvalid |
Type : boolean
|
Default value : false
|
|
Marks the component as invalid (if not using Angular form validation). |
| multiple |
Type : boolean
|
|
Allows selecting multiple files. |
| variant |
Type : string
|
Default value : 'default'
|
|
Variant of the component's appearance. Currently unused. Default: |
| class |
Type : string
|
| e2eAttr |
Type : any
|
| tabindex |
Type : number
|
| filesSelected |
Type : EventEmitter
|
|
Event emitted when files are selected. |
| attr.type |
Type : string
|
Default value : 'file'
|
|
Host binding to define input type as 'file'. |
| class |
Type : string
|
|
Applies the base |
| class.ecl-file-upload--invalid |
Type : boolean
|
|
Returns |
| change | ||||||
Arguments : '$event'
|
||||||
|
Handles file selection and emits a structured file selection event.
Parameters :
|
| click | ||||||
Arguments : '$event'
|
||||||
|
Prevents file dialog from opening when component is disabled.
Parameters :
|
| onClick | ||||||||
onClick(evt: Event)
|
||||||||
Decorators :
@HostListener('click', ['$event'])
|
||||||||
|
Prevents file dialog from opening when component is disabled.
Parameters :
Returns :
void
|
| onFilesSelected | ||||||||
onFilesSelected(evt: Event)
|
||||||||
Decorators :
@HostListener('change', ['$event'])
|
||||||||
|
Handles file selection and emits a structured file selection event.
Parameters :
Returns :
void
|
| getCssClasses | ||||||
getCssClasses(rootClass: string)
|
||||||
|
Parameters :
Returns :
string
|
| type |
Type : string
|
Default value : 'file'
|
Decorators :
@HostBinding('attr.type')
|
|
Host binding to define input type as 'file'. |
| cssClasses |
getcssClasses()
|
|
Applies the base
Returns :
string
|
| invalidState |
getinvalidState()
|
|
Returns
Returns :
boolean
|