add file browser component and widget
This commit is contained in:
111
widgets/file_browser_widget/pkg/file_browser_widget.d.ts
vendored
Normal file
111
widgets/file_browser_widget/pkg/file_browser_widget.d.ts
vendored
Normal file
@@ -0,0 +1,111 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
export function main(): void;
|
||||
/**
|
||||
* Create and mount a FileBrowser widget to the specified DOM element
|
||||
*/
|
||||
export function create_file_browser_widget(container_id: string, config: JSWidgetConfig): FileBrowserWidgetHandle;
|
||||
/**
|
||||
* Create and mount a FileBrowser widget to a specific DOM element
|
||||
*/
|
||||
export function create_file_browser_widget_on_element(element: Element, config: JSWidgetConfig): FileBrowserWidgetHandle;
|
||||
/**
|
||||
* Utility function to create a default configuration
|
||||
*/
|
||||
export function create_default_config(base_endpoint: string): JSWidgetConfig;
|
||||
/**
|
||||
* Get version information
|
||||
*/
|
||||
export function get_version(): string;
|
||||
/**
|
||||
* Check if the widget is compatible with the current browser
|
||||
*/
|
||||
export function check_browser_compatibility(): boolean;
|
||||
/**
|
||||
* Handle for managing the widget instance
|
||||
*/
|
||||
export class FileBrowserWidgetHandle {
|
||||
private constructor();
|
||||
free(): void;
|
||||
/**
|
||||
* Destroy the widget instance
|
||||
*/
|
||||
destroy(): void;
|
||||
/**
|
||||
* Update the widget configuration
|
||||
*/
|
||||
update_config(_config: JSWidgetConfig): void;
|
||||
}
|
||||
/**
|
||||
* JavaScript-compatible configuration wrapper
|
||||
*/
|
||||
export class JSWidgetConfig {
|
||||
free(): void;
|
||||
constructor(base_endpoint: string);
|
||||
setMaxFileSize(size: number): void;
|
||||
setShowUpload(show: boolean): void;
|
||||
setShowDownload(show: boolean): void;
|
||||
setShowDelete(show: boolean): void;
|
||||
setTheme(theme: string): void;
|
||||
setCssClasses(classes: string): void;
|
||||
setInitialPath(path: string): void;
|
||||
}
|
||||
|
||||
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
||||
|
||||
export interface InitOutput {
|
||||
readonly memory: WebAssembly.Memory;
|
||||
readonly main: () => void;
|
||||
readonly __wbg_jswidgetconfig_free: (a: number, b: number) => void;
|
||||
readonly jswidgetconfig_new: (a: number, b: number) => number;
|
||||
readonly jswidgetconfig_setMaxFileSize: (a: number, b: number) => void;
|
||||
readonly jswidgetconfig_setShowUpload: (a: number, b: number) => void;
|
||||
readonly jswidgetconfig_setShowDownload: (a: number, b: number) => void;
|
||||
readonly jswidgetconfig_setShowDelete: (a: number, b: number) => void;
|
||||
readonly jswidgetconfig_setTheme: (a: number, b: number, c: number) => void;
|
||||
readonly jswidgetconfig_setCssClasses: (a: number, b: number, c: number) => void;
|
||||
readonly jswidgetconfig_setInitialPath: (a: number, b: number, c: number) => void;
|
||||
readonly __wbg_filebrowserwidgethandle_free: (a: number, b: number) => void;
|
||||
readonly filebrowserwidgethandle_destroy: (a: number) => void;
|
||||
readonly filebrowserwidgethandle_update_config: (a: number, b: number) => void;
|
||||
readonly create_file_browser_widget: (a: number, b: number, c: number) => [number, number, number];
|
||||
readonly create_file_browser_widget_on_element: (a: any, b: number) => [number, number, number];
|
||||
readonly create_default_config: (a: number, b: number) => number;
|
||||
readonly get_version: () => [number, number];
|
||||
readonly check_browser_compatibility: () => number;
|
||||
readonly __wbindgen_exn_store: (a: number) => void;
|
||||
readonly __externref_table_alloc: () => number;
|
||||
readonly __wbindgen_export_2: WebAssembly.Table;
|
||||
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
||||
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
||||
readonly __externref_drop_slice: (a: number, b: number) => void;
|
||||
readonly __wbindgen_free: (a: number, b: number, c: number) => void;
|
||||
readonly __wbindgen_export_7: WebAssembly.Table;
|
||||
readonly __externref_table_dealloc: (a: number) => void;
|
||||
readonly closure26_externref_shim: (a: number, b: number, c: any, d: any) => void;
|
||||
readonly closure23_externref_shim: (a: number, b: number, c: any, d: any, e: any) => void;
|
||||
readonly closure48_externref_shim: (a: number, b: number, c: any) => void;
|
||||
readonly closure58_externref_shim: (a: number, b: number, c: any) => void;
|
||||
readonly __wbindgen_start: () => void;
|
||||
}
|
||||
|
||||
export type SyncInitInput = BufferSource | WebAssembly.Module;
|
||||
/**
|
||||
* Instantiates the given `module`, which can either be bytes or
|
||||
* a precompiled `WebAssembly.Module`.
|
||||
*
|
||||
* @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
|
||||
*
|
||||
* @returns {InitOutput}
|
||||
*/
|
||||
export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;
|
||||
|
||||
/**
|
||||
* If `module_or_path` is {RequestInfo} or {URL}, makes a request and
|
||||
* for everything else, calls `WebAssembly.instantiate` directly.
|
||||
*
|
||||
* @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
|
||||
*
|
||||
* @returns {Promise<InitOutput>}
|
||||
*/
|
||||
export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;
|
Reference in New Issue
Block a user