import * as React from 'react'; /** Here to resolve conflict with electronjs */ export interface File extends Blob { readonly lastModified: number; readonly name: string; } export interface AdjustCursor { (event: React.ChangeEvent | React.ClipboardEvent, position?: number): void; } export interface AttributesType { active?: boolean; box?: boolean; className?: string; contentBox?: boolean; dropdown?: boolean; menuBox?: string; navBox?: boolean; primary?: boolean; size?: string; userBox?: boolean; width?: number; } export interface ValidatedBlurEvent extends React.FocusEvent { relatedTarget: EventTarget; target: EventTarget & T & { isValid?: boolean; }; } export interface DataObject { [x: string]: string | number; } export interface RenderEvent

{ Element: React.ElementType; componentProps: P; componentState: S; elementProps: E; } export interface CustomRender { (props: RenderEvent): React.ReactNode; } export interface SomeObject { [x: string]: any; } export interface SomeFunction { (x: unknown): unknown; } export interface SomeRefCurrent { [x: string]: Element | undefined; } export declare type RecursivePartial = Partial<{ [P in keyof T]?: T[P] extends object ? RecursivePartial : Partial; }>; export declare type RecursiveRequired = Required<{ [P in keyof T]?: T[P] extends object ? RecursiveRequired : Required; }>; export interface CustomEventHandler { (ev: T): void; } export declare type SuggestionValue = SomeObject | string | number | null; export declare type Values = T[keyof T]; export declare type SetState = React.Dispatch>; export interface Action { payload: P; type: T; } export declare type ArrayElement = A extends readonly (infer T)[] ? T : A; export interface CommonRefCurrent { wrapper: HTMLElement | null; } /** Eliminates differences between suggestions from filtered list and value in input */ export declare type TransformSuggestionToMatchFilter = (str: string) => string; /** Array with file sizes [minFileSize, maxFileSize] */ export declare type ConvertFileSizeProps = [number | undefined, number | undefined]; /** Array with converted file sizes in custom unit of measurement */ export declare type ConvertFileSizeReturns = [string | undefined, string | undefined]; /** Function converts size in bytes to custom unit of measurement */ export declare type ConvertFileSize = ([minFileSize, maxFileSize]: ConvertFileSizeProps) => ConvertFileSizeReturns; /** Methods of rounding numbers */ export declare enum RoundMethods { /** Round to smaller number */ Down = "down", /** Round to nearest integer */ Round = "round", /** Round to larger number */ Up = "up" } /** Possible options for filtering values in list */ export declare const FILTER_RULES: { /** Filter by inclusion in string */ includes: "includes"; /** Smart filter. Not advisable to use "smart" filter with large amounts of data (1-2 thousand values) */ smart: "smart"; /** Filter by matching beginning of line */ startsWith: "startsWith"; }; /** Type of props for function getFilteredData */ export declare type GetFilteredDataProps = { /** Suggestions from list being compared */ data: SuggestionValue[]; /** Rule by which filtering occurs */ filterRule?: Values; /** Fields, when containing search data */ searchFields?: string[]; /** Object's field name from which data will be rendered as list items */ textField?: string; /** Eliminates differences between suggestions from filtered list and value in input */ transformSuggestionToMatchFilter?: TransformSuggestionToMatchFilter; /** Value in input */ value: string; };