import * as React from "react"; import * as PropTypes from "prop-types"; import { FieldProps, JSONSchemaArray, JSONSchemaObject } from "../../types"; import ApiClient from "../../ApiClient"; interface ProcessedFile { dataURL: string; name: string; size: number; type: File["type"]; } interface ImageArrayFieldState extends MediaArrayState { modalMediaSrc: string; } interface MediaMetadataSchema { capturerVerbatim?: string[]; intellectualOwner?: string; intellectualRights?: string; } interface ProcessedExifData { formData?: any; defaultMediaMetadata?: any; } export default class ImageArrayField extends React.Component>, ImageArrayFieldState> { ALLOWED_FILE_TYPES: string[]; ACCEPT_FILE_TYPES: string[]; MAX_FILE_SIZE: number; KEY: string; ENDPOINT: string; GLYPH: string; TRANSLATION_TAKE_NEW: string; TRANSLATION_SELECT_FILE: string; TRANSLATION_NO_MEDIA: string; CONTAINER_CLASS: string; METADATA_FORM_ID: string; renderMedia: (id: string) => JSX.Element; renderLoadingMedia: (id: string) => JSX.Element; onMediaClick: (i: number) => any; renderModalMedia: () => JSX.Element; formatValue(value: string[], options: any, props: FieldProps): string | null; } export interface MediaArrayState { tmpMedias: number[]; addModal?: any; dragging?: boolean; metadataModalOpen?: number | false; modalIdx?: number; modalMediaSrc?: string; modalMetadata?: any; metadataSaveSuccess?: string | false; metadataForm?: any; alert?: boolean; alertMsg?: string; } type Constructor = new (...args: any[]) => LFC; export declare function MediaArrayField>, MediaArrayState>>>(ComposedComponent: LFC): { new (...args: any[]): { ALLOWED_FILE_TYPES: string[]; ACCEPT_FILE_TYPES: string[]; MAX_FILE_SIZE: number; KEY: string; ENDPOINT: string; GLYPH: string; TRANSLATION_TAKE_NEW: string; TRANSLATION_SELECT_FILE: string; TRANSLATION_NO_MEDIA: string; CONTAINER_CLASS: string; METADATA_FORM_ID: string; deprecatedOptions: { imageAddModal: string; autoOpenImageAddModal: string; }; apiClient: ApiClient; _context: any; mounted: boolean; fetching: any; addMediaContainerRef: React.RefObject; getOptions: (uiSchema: any) => any; componentDidMount(): void; componentWillUnmount(): void; onDragEnter: () => void; onDragLeave: () => void; onDrop: (files: File[]) => void; defaultOnClick: () => void; render(): JSX.Element; onKeyDown: (e: (KeyboardEvent | React.KeyboardEvent)) => void; renderMedias: () => any; renderLoadingMedias: () => (JSX.Element | null)[]; openModalFor: (i: number) => () => void; onMediaRmClick: (i: number) => () => void; hideMetadataModal: () => void; onMetadataFormChange: (formData: any) => void; renderMetadataModal: () => JSX.Element | null; onHideMediaAddModal: () => void; renderMediaAddModal: () => JSX.Element | null; onAlertOk: () => void; parseExif: (files: File[]) => Promise; sideEffects: (formData: any) => void; onFileFormChange: (files: File[]) => void; getContainerId: () => number | "root"; saveMedias(files: File[], exifDataPromise: Promise): Promise; addNameToDataURL: (dataURL: string, name: string) => string; processFiles: (files: File[]) => Promise; processFile: (file: File) => Promise; onMediaMetadataUpdate: ({ formData }: { formData: any; }) => Promise; getMetadataPromise: (exifDataPromise: Promise) => Promise; getMaxFileSizeAsString: () => string; getAllowedMediaFormatsTranslationKey: () => "AllowedFileFormat" | "AllowedFileFormats"; getAllowedMediaFormatsAsString: () => string; context: any; setState(state: MediaArrayState | ((prevState: Readonly, props: Readonly>>) => MediaArrayState | Pick | null) | Pick | null, callback?: (() => void) | undefined): void; forceUpdate(callback?: (() => void) | undefined): void; readonly props: Readonly>> & Readonly<{ children?: React.ReactNode; }>; state: Readonly; refs: { [key: string]: React.ReactInstance; }; shouldComponentUpdate?(nextProps: Readonly>>, nextState: Readonly, nextContext: any): boolean; componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void; getSnapshotBeforeUpdate?(prevProps: Readonly>>, prevState: Readonly): any; componentDidUpdate?(prevProps: Readonly>>, prevState: Readonly, snapshot?: any): void; componentWillMount?(): void; UNSAFE_componentWillMount?(): void; componentWillReceiveProps?(nextProps: Readonly>>, nextContext: any): void; UNSAFE_componentWillReceiveProps?(nextProps: Readonly>>, nextContext: any): void; componentWillUpdate?(nextProps: Readonly>>, nextState: Readonly, nextContext: any): void; UNSAFE_componentWillUpdate?(nextProps: Readonly>>, nextState: Readonly, nextContext: any): void; }; contextType: React.Context; propTypes: { uiSchema: PropTypes.Requireable; addModal: PropTypes.Requireable; }>>; }> | null | undefined>>; autoOpenAddModal: PropTypes.Requireable; autoOpenMetadataModal: PropTypes.Requireable; sideEffects: PropTypes.Requireable; exifParsers: PropTypes.Requireable<(object | null | undefined)[]>; metadataFormId: PropTypes.Requireable; hideDeleteButton: PropTypes.Requireable; deleteConfirmPlacement: PropTypes.Requireable; }>>; }>>; schema: PropTypes.Validator; items: PropTypes.Validator; }>>>; }>>>; formData: PropTypes.Requireable; }; displayName: string; } & LFC; interface ThumbnailProps { id?: string; apiClient: ApiClient; apiEndpoint?: string; dataURL?: string; loading?: boolean; downloadLink?: boolean; } interface ThumbnailState { url?: string; linkUrl?: string; } export declare class Thumbnail extends React.PureComponent { mounted: boolean; constructor(props: ThumbnailProps); componentDidMount(): void; componentWillUnmount(): void; UNSAFE_componentWillReceiveProps(props: ThumbnailProps): void; updateURL: ({ id, apiClient, apiEndpoint }: ThumbnailProps) => Promise; render(): JSX.Element | null; } export {};