packages/components/eui-file-upload/file-preview/file-preview.component.ts
Internal class used by eui-file-upload to display the files to be uploaded.
| changeDetection | ChangeDetectionStrategy.OnPush |
| encapsulation | ViewEncapsulation.None |
| selector | eui-file-preview |
| imports |
NgTemplateOutlet
EUI_BUTTON
EUI_ICON
EUI_LABEL
EuiFileSizePipe
|
| templateUrl | ./file-preview.component.html |
Properties |
|
Methods |
|
Inputs |
Outputs |
| file |
Type : Blob | EuiUploadedFileInterface | any
|
|
The file to use. Will be a |
| hasPreview |
Type : boolean
|
Default value : true
|
|
Whether a preview, image or icon, is displayed for a file to upload. |
| hasPreviewAsIcon |
Type : boolean
|
Default value : false
|
|
Whether a preview is displayed as a file format icon. |
| hasPreviewAsImage |
Type : boolean
|
Default value : true
|
|
Whether a preview is displayed as image. |
| index |
Type : number
|
|
Index of the file in the list. |
| isFilenameDisplayed |
Type : boolean
|
Default value : true
|
|
Whether the filename is displayed. |
| isFileObject |
Type : boolean
|
Default value : false
|
|
Whether the file is |
| isFilesizeDisplayed |
Type : boolean
|
Default value : true
|
|
Whether the filesize is displayed. |
| isFiletypeDisplayed |
Type : boolean
|
Default value : true
|
|
Whether the file type is displayed. |
| isItemsClickable |
Type : boolean
|
Default value : false
|
|
Whether items can be clicked. |
| uploadedFileTemplate |
Type : TemplateRef<literal type>
|
|
Template to use in the list of files. |
| itemClick |
Type : EventEmitter
|
|
Event emitted when a chosen file to upload is clicked. |
| removeFromList |
Type : EventEmitter
|
|
Event emitted when the remove button is clicked. |
| Public onItemClick | ||||||||
onItemClick(e: Event)
|
||||||||
|
Click item handler.
Parameters :
Returns :
void
|
| Public onRemoveFromList |
onRemoveFromList()
|
|
Remove from the list handler.
Returns :
void
|
| Public fileExtension |
Type : string
|
| Public icon |
Type : string
|
| Public isLoading |
Type : unknown
|
Default value : false
|
| Public previewData |
Type : literal type
|
| templates |
Type : QueryList<EuiTemplateDirective>
|
Decorators :
@ContentChildren(EuiTemplateDirective)
|
| Public typeFromFileExtension |
Type : string
|
Default value : null
|
| Public url |
Type : string
|