@nextcloud/vue
Version:
Nextcloud vue components
181 lines (180 loc) • 7.63 kB
TypeScript
import { IFolder, INode } from '@nextcloud/files';
import { IUpload } from '@nextcloud/files/upload';
import { FilePickerItem, FilePickerItemGroup } from '../NcFilePicker/NcFilePicker.vue';
type __VLS_Props = {
/**
* Actions to be shown in the upload picker menu.
*/
actions?: FilePickerItem[] | FilePickerItemGroup[];
/**
* The upload destination folder
*/
destination: IFolder;
/**
* A callback function to get the list of files present in the destination folder.
*/
content: (relativePath?: string) => Promise<INode[]>;
/**
* Allowed MIME types to upload
*/
accept?: string[];
/**
* Disable the upload picker
*/
disabled?: boolean;
/**
* The label of the upload picker button
*/
label?: string;
/**
* Allow uploading multiple files
*/
multiple?: boolean;
/**
* Only show the icon without text label
*/
iconOnly?: boolean;
/**
* The variant of the menu button
*/
variant?: 'primary' | 'secondary' | 'tertiary';
/**
* Allow uploading directories
*/
directory?: boolean;
};
/**
* Reset the file input form
*/
declare function reset(): void;
declare const _default: import('vue').DefineComponent<__VLS_Props, {
reset: typeof reset;
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
"upload:started": (upload: IUpload) => any;
"upload:finished": (upload: IUpload) => any;
paused: (queue: IUpload[]) => any;
resumed: (queue: IUpload[]) => any;
finished: () => any;
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
"onUpload:started"?: ((upload: IUpload) => any) | undefined;
"onUpload:finished"?: ((upload: IUpload) => any) | undefined;
onPaused?: ((queue: IUpload[]) => any) | undefined;
onResumed?: ((queue: IUpload[]) => any) | undefined;
onFinished?: (() => any) | undefined;
}>, {
label: string;
variant: "primary" | "secondary" | "tertiary";
actions: FilePickerItem[] | FilePickerItemGroup[];
accept: string[];
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
filePicker: ({
$: import('vue').ComponentInternalInstance;
$data: {};
$props: {
readonly accept?: string[] | undefined;
readonly actionCaption?: string | undefined;
readonly actions?: FilePickerItem[] | FilePickerItemGroup[] | undefined;
readonly directory?: boolean | undefined;
readonly directoryOnly?: boolean | undefined;
readonly disabled?: boolean | undefined;
readonly iconOnly?: boolean | undefined;
readonly label?: string | undefined;
readonly loading?: boolean | undefined;
readonly multiple?: boolean | undefined;
readonly variant?: "primary" | "secondary" | "tertiary" | undefined;
readonly onPick?: ((files: File[]) => any) | undefined;
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
$attrs: import('vue').Attrs;
$refs: {
[x: string]: unknown;
} & {
form: HTMLFormElement;
input: HTMLInputElement;
};
$slots: Readonly<{
[name: string]: import('vue').Slot<any> | undefined;
}>;
$root: import('vue').ComponentPublicInstance | null;
$parent: import('vue').ComponentPublicInstance | null;
$host: Element | null;
$emit: (event: "pick", files: File[]) => void;
$el: HTMLFormElement;
$options: import('vue').ComponentOptionsBase<Readonly<{
accept?: string[];
actionCaption?: string;
actions?: FilePickerItem[] | FilePickerItemGroup[];
directory?: boolean;
directoryOnly?: boolean;
disabled?: boolean;
iconOnly?: boolean;
label?: string;
loading?: boolean;
multiple?: boolean;
variant?: "primary" | "secondary" | "tertiary";
}> & Readonly<{
onPick?: ((files: File[]) => any) | undefined;
}>, {
reset: () => void;
triggerPickFiles: (uploadFolders: boolean) => void;
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
pick: (files: File[]) => any;
}, string, {
label: string;
variant: "primary" | "secondary" | "tertiary";
actions: FilePickerItem[] | FilePickerItemGroup[];
accept: string[];
actionCaption: string;
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
beforeCreate?: (() => void) | (() => void)[];
created?: (() => void) | (() => void)[];
beforeMount?: (() => void) | (() => void)[];
mounted?: (() => void) | (() => void)[];
beforeUpdate?: (() => void) | (() => void)[];
updated?: (() => void) | (() => void)[];
activated?: (() => void) | (() => void)[];
deactivated?: (() => void) | (() => void)[];
beforeDestroy?: (() => void) | (() => void)[];
beforeUnmount?: (() => void) | (() => void)[];
destroyed?: (() => void) | (() => void)[];
unmounted?: (() => void) | (() => void)[];
renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
};
$forceUpdate: () => void;
$nextTick: typeof import('vue').nextTick;
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
} & Readonly<{
label: string;
variant: "primary" | "secondary" | "tertiary";
actions: FilePickerItem[] | FilePickerItemGroup[];
accept: string[];
actionCaption: string;
}> & Omit<Readonly<{
accept?: string[];
actionCaption?: string;
actions?: FilePickerItem[] | FilePickerItemGroup[];
directory?: boolean;
directoryOnly?: boolean;
disabled?: boolean;
iconOnly?: boolean;
label?: string;
loading?: boolean;
multiple?: boolean;
variant?: "primary" | "secondary" | "tertiary";
}> & Readonly<{
onPick?: ((files: File[]) => any) | undefined;
}>, "reset" | "triggerPickFiles" | ("label" | "variant" | "actions" | "accept" | "actionCaption")> & {
reset: () => void;
triggerPickFiles: (uploadFolders: boolean) => void;
} & {} & import('vue').ComponentCustomProperties & {} & {
$slots: Readonly<{
icon?: import('vue').Slot;
default?: import('vue').Slot;
}> & {
icon?: import('vue').Slot;
default?: import('vue').Slot;
};
}) | null;
}, HTMLFormElement>;
export default _default;