UNPKG

@iobroker/adapter-react-v5

Version:

React components to develop ioBroker interfaces with react.

86 lines (85 loc) 3.31 kB
import React, { type JSX } from 'react'; import type { Connection } from '@iobroker/socket-client'; import type { IobTheme } from '../types'; interface DialogSelectFileProps { /** where to store settings in localStorage * @property {string} [title] The dialog title; default: Please select object ID... (translated) */ dialogName?: string; /** The dialog title; default: Please select object ID... (translated) */ title?: string; /** Set to true to allow the selection of multiple IDs. */ multiSelect?: boolean; /** Image prefix. Normally, admin has '../..' and the web has '../' */ imagePrefix?: string; /** @deprecated Image prefix */ prefix?: string; /** Show the expert button? */ showExpertButton?: boolean; /** Language */ lang?: ioBroker.Languages; /** Socket class */ socket: Connection; /** Theme name. */ themeName?: string; /** Theme type. */ themeType?: 'dark' | 'light'; /** Theme object. */ theme: IobTheme; /** The selected IDs. */ selected?: string | string[]; /** The ok button text; default: OK (translated) */ ok?: string; /** The cancel button text; default: Cancel (translated) */ cancel?: string; /** If download of files enabled */ allowUpload?: boolean; /** If download of files enabled */ allowDownload?: boolean; /** If creation of folders enabled */ allowCreateFolder?: boolean; /** If creation of folders enabled */ allowDelete?: boolean; /** if tile view enabled (default true) */ allowView?: boolean; /** Show toolbar (default true) */ showToolbar?: boolean; /** Limit file browser to one specific objectID of type meta and the following path (like vis.0/main) */ limitPath?: string; /** like `['png', 'svg', 'bmp', 'jpg', 'jpeg', 'gif']` */ filterFiles?: string[]; /** images, code, txt, audio, video */ filterByType?: 'images' | 'code' | 'txt'; /** allow only folder's selection */ selectOnlyFolders?: boolean; /** Close handler that is always called when the dialog is closed. */ onClose: () => void; /** Handler that is called when the user presses OK or by double click. */ onOk: (selected: string | string[] | undefined) => void; /** The styling class names. */ filters?: Record<string, string>; /** Allow switch views Table<=>Rows */ showViewTypeButton?: boolean; /** If type selector should be shown */ showTypeSelector?: boolean; /** If defined, allow selecting only files from this folder */ restrictToFolder?: string; /** If restrictToFolder defined, allow selecting files outside of this folder */ allowNonRestricted?: boolean; /** force expert mode */ expertMode?: boolean; /** Translate function - optional */ t?: (text: string, ...args: any[]) => string; /** The z-index of the dialog; default: 1300 */ zIndex?: number; } interface DialogSelectFileState { selected: string[]; } export declare class DialogSelectFile extends React.Component<DialogSelectFileProps, DialogSelectFileState> { private readonly dialogName; private readonly filters; constructor(props: DialogSelectFileProps); handleCancel(): void; handleOk(): void; render(): JSX.Element; } export {};