import type { Mapping, ValueOf } from 'clientnode'; import type BasePropertyTypes from 'clientnode/property-types'; import type { Requireable } from 'clientnode/property-types'; import type { ElementType, ForwardRefExoticComponent, ReactElement, ReactNode, RefAttributes } from 'react'; import type { ComponentAdapter, ValidationMapping } from 'web-component-wrapper/type'; import type { MediaCardReference } from '../../implementations/type'; import type { BaseModel, ModelState as BaseModelState, Pattern, Properties as BaseProperties, State as BaseState, StaticWebComponent, ValueState as BaseValueState } from '../../type'; import type { Adapter as TextInputAdapter, Model as TextInputModel, Props as TextInputProps, PartialModel as PartialTextInputModel } from '../TextInput/type'; export declare enum RepresentationType { BINARY = "binary", IMAGE = "image", EMBEDABLE_TEXT = "embedableText", TEXT = "text", VIDEO = "video" } export type BlobType = Blob | Buffer | string; export interface Value { blob?: Partial; hash?: string; name?: string; source?: string; url?: string; } export interface ValueState extends BaseValueState { attachBlobProperty: boolean; } export interface ModelState extends BaseModelState { invalidMaximumSize: boolean; invalidMinimumSize: boolean; invalidContentTypePattern: boolean; invalidInvertedContentTypePattern: boolean; invalidName: boolean; } export interface Model extends Omit, 'default'> { default?: Mapping; contentTypePattern?: Pattern; invertedContentTypePattern?: Pattern; maximumSize: number; minimumSize: number; fileName: TextInputModel; state?: ModelState; } export interface ChildrenOptions { declaration: string; invalid: boolean; properties: P; value?: null | Type; } export interface Properties extends BaseProperties, ModelState { default?: Mapping; children?: (options: ChildrenOptions, Type>) => ReactNode; fileInputClassNames?: Array; imageClassNames?: Array; acceptedContentTypes?: Array | string; contentTypePattern: Array | null | RegExp | string; invertedContentTypePattern: Array | null | RegExp | string; contentTypePatternText: string; invertedContentTypePatternText: string; maximumSizeText: string; minimumSizeText: string; deleteButton: ReactNode; downloadButton: ReactNode; editButton: ReactNode; newButton: ReactNode; encoding: string; generateFileNameInputProperties: (prototype: TextInputProps, properties: Properties) => TextInputProps | null; model: Model; outlined: boolean; sourceToBlobOptions?: { endings?: 'native' | 'transparent'; type?: string; }; hashingConfiguration: { binaryString: boolean; prefix: string; readChunkSizeInByte: number; }; } export type Props = Partial, 'model'>> & { model?: (Partial, 'fileName' | 'state'>> & { fileName?: PartialTextInputModel; state?: Partial; }); }; export type DefaultProperties = Omit, 'model'> & { model: Model; }; export type PropertyTypes = { [key in keyof Properties]: ValueOf; }; export declare const renderProperties: Array; export interface State extends BaseState { modelState: ModelState; } export type Adapter = ComponentAdapter, Omit, 'value'> & { value?: null | Type; }>; export interface AdapterWithReferences extends Adapter { references: { fileInput: HTMLInputElement | null; mediaCard: MediaCardReference | null; nameInput: TextInputAdapter | null; }; } export interface Component extends Omit, 'propTypes'>, StaticWebComponent { (props: Props & RefAttributes>): ReactElement; } export declare const dedicatedPropertyTypes: ValidationMapping; export declare const modelPropertyTypes: ValidationMapping; export declare const modelStatePropertyTypes: { [key in keyof ModelState]: Requireable; }; export declare const propertyTypes: ValidationMapping; export declare const defaultModelState: ModelState; export declare const defaultModel: Model; export declare const defaultFileNameInputProperties: TextInputProps; export declare const defaultProperties: DefaultProperties;