File input element
Optionalconfig: FileUploadConfig = {}File Upload config
Protected_Private$announcementsPrivate$buttonPrivate$inputPrivate$statusPrivateenteredPrivatei18nPrivateidStatic ConstantdefaultsFile upload default config
StaticelementStaticmoduleName for the component used when initialising using data-module attributes.
Static ConstantschemaFile upload config schema
Protected$rootProtectedReturns the root element of the component
ProtectedconfigProtectedReturns the root element of the component
Internal VirtualconfigOverride
Function which defines configuration overrides to prioritize properties from the root element's dataset.
It should take a subset of configuration as input and return a new configuration object with properties that should be overridden based on the root element's dataset. A Symbol is used for indexing to prevent conflicts.
Optionalparam: Partial<FileUploadConfig>Configuration object
return - Configuration object
PrivatecanPrivateConfirms if the content of a DataTransfer dragged over component can be dropped
Unfortunately, there's a certain level of uncertainty in Safari which does not
even provide a list of items while dragging (and seems to even miss the types sometimes)
The DataTransfer being dragged
DataTransfer looks OK for filling the input, false otherwisePrivatecanPrivateConfirms if enhanced <input> can be filled with files from the given DataTransfer
The DataTransfer being dropped
DataTransfer contains files, in number matching the multiple attribute of the original <input>PrivatefindPrivatehidePrivateHides the drop zone visually
PrivatematchesPrivateConfirms the given number of files matches that allowed by the enhanced <input>
The number of files
true if the enhanced <input> can accept that number of filesPrivateobservePrivateCreate a mutation observer to check if the input's attributes altered.
PrivateonPrivateCheck if the value of the underlying input has changed
PrivateonPrivateWhen the button is clicked, emulate clicking the actual, hidden file input
PrivateonPrivateHandles user dropping on the component
The dragenter event
PrivateshowPrivateShow the drop zone visually
PrivateupdatePrivateSynchronise the disabled state between the input and replacement button.
PrivateupdatePrivateUpdates the visibility of the dropzone as users enters the various elements on the page
The dragenter event
Staticcheck
File upload component