anydrop-ui
The plain-JavaScript AnyDrop UI: drop zone, folder tree and mobile layout on top of the core.
Classes
| Class | Description |
|---|---|
| AnyDrop | The AnyDrop UI: a drop zone with file and folder pickers, a folder tree, a toolbar, an error panel, thumbnails and a mobile layout. It extends AnyDropCore, so every core option, method and event works. |
Interfaces
| Interface | Description |
|---|---|
| AnyDropDict | The DOM strings of a UI instance. Every user-visible text is one of these (translatable). |
| AnyDropErrorItemContext | Context of an error panel row. |
| AnyDropFileContext | Context of a file row. |
| AnyDropFolderContext | Context of a folder row. |
| AnyDropLocale | A language pack: set it with the locale option. |
| AnyDropMessageContext | Context of the drop message (also the empty state). |
| AnyDropRenderContext | Members every render context has. |
| AnyDropRenderHooks | The five render hooks. |
| AnyDropRenderView | A mounted custom view. |
| AnyDropRowAction | A custom row action, or an override of a built-in one (same id). |
| AnyDropRowActions | The rowActions option: the buttons of file rows and folder rows. |
| AnyDropToolbarContext | Context of the toolbar. |
| AnyDropUIOptions | The DOM strings of a UI instance. Every user-visible text is one of these (translatable). |
| MockFile | A file-like object for displayExistingFile(): not part of the tree or the upload queue. |
Type Aliases
| Type Alias | Description |
|---|---|
| AnyDropConfig | What the constructor and setOption accept. |
| AnyDropFileAction | The built-in file row actions. |
| AnyDropFolderAction | The built-in folder row actions. |
| AnyDropFullOptions | - |
| AnyDropIconName | The names of the built-in icons. Custom row actions can use any other name you put in icons. |
| AnyDropIcons | Icons as SVG markup, by name, or a function that returns markup or an element per name (null or undefined = the built-in icon). Icons are trusted developer input, never user data. |
| AnyDropLayout | How files are laid out. list is the default, compact is a dense list. |
| AnyDropRenderHook | A render hook: runs with this = the instance. |
| AnyDropRenderResult | What a render hook may return: an element, a view, text, or nothing (keep the default content). |
| AnyDropTexts | Every text of the UI and core (dict* options), except dictRemoveFileConfirmation. |
| ElementRef | - |
Variables
| Variable | Description |
|---|---|
| DEFAULT_TEMPLATE | The default preview template. data-ad-* attributes mark the parts that get filled in. |
Functions
| Function | Description |
|---|---|
| uiDefaults | The default UI options (a fresh object each call). |
References
VERSION
Re-exports VERSION