Input File: API Table
class: FileHandle
Fields
| Name | Privacy | Type | Default | Description | Inherited From |
|---|---|---|---|---|---|
failedProp | public | Array<string> | [] | ||
systemFile | public | systemFile | |||
_acceptCriteria | protected | _acceptCriteria |
Methods
| Name | Privacy | Description | Parameters | Return | Inherited From |
|---|---|---|---|---|---|
createDownloadUrl | public | file: SystemFile | |||
uploadFileStatus | public | ||||
_getFileNameExtension | protected | fileName: string | string |
class: LionInputFile, lion-input-file
Fields
| Name | Privacy | Type | Default | Description | Inherited From |
|---|---|---|---|---|---|
accept | public | string | '' | ||
buttonLabel | public | string | '' | The label of the button | |
enableDropZone | public | boolean | false | ||
isDragging | public | boolean | |||
maxFileSize | public | number | MAX_FILE_SIZE | ||
modelValue | public | array | [] | Overrides the inherited accessor with a typed pair instead of a class field: a field would be emitted as a property and every consumer that type-checks the declarations reports “TS2610: ‘modelValue’ is defined as an accessor … but is overridden here as an instance property”. Keeps the published InputFile[] type and adds no runtime behaviour. | |
multiple | public | boolean | false | ||
operationMode | public | ||||
slots | public | ||||
type | public | string | 'file' | ||
uploadOnSelect | public | boolean | false | ||
uploadResponse | public | UploadResponse[] | [] | ||
_acceptCriteria | protected | ||||
_buttonNode | protected | ||||
_feedbackConditionMeta | protected | LionField | |||
_fileListNode | protected | LionSelectedFileList | |||
_focusableNode | protected | LionField | |||
_initialButtonLabel | protected | string | '' | ||
_inputNode | protected | HTMLInputElement | |||
_isDragAndDropSupported | protected | ||||
_selectedFilesMetaData | protected | InputFile[] | [] |
Methods
| Name | Privacy | Description | Parameters | Return | Inherited From |
|---|---|---|---|---|---|
clear | public | Clears modelValue. Interaction states are not cleared (use resetInteractionState for this) | LionField | ||
formatter | public | v: InputFile[] | string | ||
onLocaleUpdated | public | ||||
parser | public | InputFile[] | |||
reset | public | Resets modelValue to initial value. Interaction states are cleared | LionField | ||
resetInteractionState | public | LionField | |||
_dispatchFileListChangeEvent | protected | newFiles: InputFile[] | |||
_dropZoneTemplate | protected | TemplateResult | |||
_handleErroredFiles | protected | fileObj: InputFile | |||
_handleErrors | protected | ||||
_inputGroupAfterTemplate | protected | TemplateResult | |||
_inputGroupInputTemplate | protected | TemplateResult | |||
_isEmpty | protected | Helper method for the mutually exclusive Required Validator | |||
_onChange | protected | Dispatches custom bubble event | ev: Event= | LionField | |
_onClick | protected | Clear _inputNode.value to make sure onChange is called even for duplicate files | ev: Event | ||
_onRemoveFile | protected | ev: CustomEvent | |||
_processDroppedFiles | protected | ev: DragEvent | |||
_processFiles | protected | Runs on drag or change event | selectedFiles: InputFile[] | ||
_reflectBackOn | protected | Every time .formattedValue is attempted to sync to the view value (on change/blur and on modelValue change), this condition is checked. In case of the input-file we don’t want this sync to happen, since the view value is already correct. | boolean | ||
_removeFile | protected | removedFile: InputFile | |||
_showFeedbackConditionFor | protected | type: string, meta: object | |||
_updateUploadButtonDescription | protected | Description for screen readers connected to the button about how many files have been updated |
Events
| Name | Type | Description | Inherited From |
|---|---|---|---|
file-list-changed | CustomEvent | ||
file-removed | CustomEvent | ||
user-input-changed | Event | LionField |
Attributes
| Name | Field | Inherited From |
|---|---|---|
accept | accept | |
multiple | multiple | |
button-label | buttonLabel | |
max-file-size | maxFileSize | |
enable-drop-zone | enableDropZone | |
upload-on-select | uploadOnSelect | |
is-dragging | isDragging | |
uploadResponse | uploadResponse | |
_selectedFilesMetaData | _selectedFilesMetaData |
Slots
| Name | Description |
|---|---|
file-select-button | [private] The button to open the file dialog |
selected-file-list | [private] The list of selected files |
class: LionSelectedFileList, lion-selected-file-list
Fields
| Name | Privacy | Type | Default | Description | Inherited From |
|---|---|---|---|---|---|
fileList | public | InputFile[] | [] | ||
multiple | public | boolean | false |
Methods
| Name | Privacy | Description | Parameters | Return | Inherited From |
|---|---|---|---|---|---|
_enhanceLightDomA11y | protected | ||||
_listItemAfterTemplate | protected | file: InputFile, fileUuid: string | TemplateResult | ||
_listItemBeforeTemplate | protected | file: InputFile | TemplateResult|typeof nothing | ||
_removeButtonContentTemplate | protected | TemplateResult | |||
_removeFile | protected | removedFile: InputFile | |||
_selectedListItemTemplate | protected | file: InputFile | TemplateResult | ||
_validationFeedbackTemplate | protected | validationFeedback: Array<FeedbackMessage>, fileUuid: string | TemplateResult |
Events
| Name | Type | Description | Inherited From |
|---|---|---|---|
file-remove-requested | CustomEvent |
Attributes
| Name | Field | Inherited From |
|---|---|---|
fileList | fileList | |
multiple | multiple |