|
@@ -1,5 +1,5 @@
|
|
|
import type { PluginOptions, UIPlugin, PluginTarget, UppyFile } from '@uppy/core'
|
|
|
-import type StatusBar from '@uppy/status-bar'
|
|
|
+import type { StatusBarLocale } from '@uppy/status-bar'
|
|
|
import DashboardLocale from './generatedLocale'
|
|
|
|
|
|
type FieldRenderOptions = {
|
|
@@ -16,48 +16,46 @@ interface MetaField {
|
|
|
render?: (field: FieldRenderOptions, h: PreactRender) => any
|
|
|
}
|
|
|
|
|
|
-declare module Dashboard {
|
|
|
- interface DashboardOptions extends PluginOptions {
|
|
|
- animateOpenClose?: boolean
|
|
|
- browserBackButtonClose?: boolean
|
|
|
- closeAfterFinish?: boolean
|
|
|
- closeModalOnClickOutside?: boolean
|
|
|
- disableInformer?: boolean
|
|
|
- disablePageScrollWhenModalOpen?: boolean
|
|
|
- disableStatusBar?: boolean
|
|
|
- disableThumbnailGenerator?: boolean
|
|
|
- doneButtonHandler?: () => void
|
|
|
- height?: string | number
|
|
|
- hideCancelButton?: boolean
|
|
|
- hidePauseResumeButton?: boolean
|
|
|
- hideProgressAfterFinish?: boolean
|
|
|
- hideRetryButton?: boolean
|
|
|
- hideUploadButton?: boolean
|
|
|
- inline?: boolean
|
|
|
- locale?: DashboardLocale & StatusBar.StatusBarLocale
|
|
|
- metaFields?: MetaField[] | ((file: UppyFile) => MetaField[])
|
|
|
- note?: string | null
|
|
|
- onRequestCloseModal?: () => void
|
|
|
- plugins?: string[]
|
|
|
- fileManagerSelectionType?: 'files' | 'folders' | 'both';
|
|
|
- proudlyDisplayPoweredByUppy?: boolean
|
|
|
- showLinkToFileUploadResult?: boolean
|
|
|
- showProgressDetails?: boolean
|
|
|
- showSelectedFiles?: boolean
|
|
|
- showRemoveButtonAfterComplete?: boolean
|
|
|
- replaceTargetContent?: boolean
|
|
|
- target?: PluginTarget
|
|
|
- theme?: 'auto' | 'dark' | 'light'
|
|
|
- thumbnailWidth?: number
|
|
|
- trigger?: string
|
|
|
- width?: string | number
|
|
|
- autoOpenFileEditor?: boolean
|
|
|
- disabled?: boolean
|
|
|
+export interface DashboardOptions extends PluginOptions {
|
|
|
+ animateOpenClose?: boolean
|
|
|
+ browserBackButtonClose?: boolean
|
|
|
+ closeAfterFinish?: boolean
|
|
|
+ closeModalOnClickOutside?: boolean
|
|
|
+ disableInformer?: boolean
|
|
|
+ disablePageScrollWhenModalOpen?: boolean
|
|
|
+ disableStatusBar?: boolean
|
|
|
+ disableThumbnailGenerator?: boolean
|
|
|
+ doneButtonHandler?: () => void
|
|
|
+ height?: string | number
|
|
|
+ hideCancelButton?: boolean
|
|
|
+ hidePauseResumeButton?: boolean
|
|
|
+ hideProgressAfterFinish?: boolean
|
|
|
+ hideRetryButton?: boolean
|
|
|
+ hideUploadButton?: boolean
|
|
|
+ inline?: boolean
|
|
|
+ locale?: DashboardLocale & StatusBarLocale
|
|
|
+ metaFields?: MetaField[] | ((file: UppyFile) => MetaField[])
|
|
|
+ note?: string | null
|
|
|
+ onRequestCloseModal?: () => void
|
|
|
+ plugins?: string[]
|
|
|
+ fileManagerSelectionType?: 'files' | 'folders' | 'both';
|
|
|
+ proudlyDisplayPoweredByUppy?: boolean
|
|
|
+ showLinkToFileUploadResult?: boolean
|
|
|
+ showProgressDetails?: boolean
|
|
|
+ showSelectedFiles?: boolean
|
|
|
+ showRemoveButtonAfterComplete?: boolean
|
|
|
+ replaceTargetContent?: boolean
|
|
|
+ target?: PluginTarget
|
|
|
+ theme?: 'auto' | 'dark' | 'light'
|
|
|
+ thumbnailWidth?: number
|
|
|
+ trigger?: string
|
|
|
+ width?: string | number
|
|
|
+ autoOpenFileEditor?: boolean
|
|
|
+ disabled?: boolean
|
|
|
disableLocalFiles?: boolean
|
|
|
- }
|
|
|
}
|
|
|
|
|
|
-declare class Dashboard extends UIPlugin<Dashboard.DashboardOptions> {
|
|
|
+declare class Dashboard extends UIPlugin<DashboardOptions> {
|
|
|
addTarget (plugin: UIPlugin): HTMLElement
|
|
|
hideAllPanels (): void
|
|
|
openModal (): void
|