48 lines
1.7 KiB
TypeScript
48 lines
1.7 KiB
TypeScript
import { EntityDict } from '../../../oak-app-domain';
|
|
import { FileState } from '../../../features/extraFile';
|
|
import { EntityDict as BaseEntityDict } from 'oak-domain/lib/types/Entity';
|
|
import { ReactComponentProps } from 'oak-frontend-base/lib/types/Page';
|
|
type ExtraFile = EntityDict['extraFile']['OpSchema'];
|
|
export interface EnhancedExtraFile extends ExtraFile {
|
|
url: string;
|
|
thumbUrl: string;
|
|
fileName: string;
|
|
fileState?: FileState;
|
|
percentage?: number;
|
|
}
|
|
export type Theme = 'file' | 'image' | 'image-flow' | 'custom';
|
|
type SourceType = 'album' | 'camera';
|
|
type ImageMode = 'scaleToFill' | 'aspectFit' | 'aspectFill' | 'widthFix' | 'heightFix' | 'top' | 'bottom' | 'left' | 'right' | 'center' | 'top left' | 'top right' | 'bottom left' | 'bottom right';
|
|
declare const _default: <ED2 extends EntityDict & BaseEntityDict, T2 extends keyof ED2>(props: ReactComponentProps<ED2, T2, true, {
|
|
bucket: string;
|
|
autoUpload: boolean;
|
|
maxNumber: number;
|
|
extension: string[];
|
|
selectCount: number;
|
|
sourceType: SourceType[];
|
|
mediaType: ("image" | "video")[];
|
|
mode: ImageMode;
|
|
size: number;
|
|
showUploadList: boolean;
|
|
showUploadProgress: boolean;
|
|
calcMd5: boolean;
|
|
accept: string;
|
|
disablePreview: boolean;
|
|
disableDelete: boolean;
|
|
disableAdd: boolean;
|
|
disableDownload: boolean;
|
|
disabled: boolean;
|
|
type: string;
|
|
origin: ED2["extraFile"]["Schema"]["origin"] | null;
|
|
tag1: string;
|
|
tag2: string;
|
|
entity: keyof ED2;
|
|
entityId: string;
|
|
theme: Theme;
|
|
children?: React.ReactNode;
|
|
style?: React.CSSProperties;
|
|
className?: string;
|
|
beforeUpload: (file: File) => Promise<string>;
|
|
}>) => React.ReactElement;
|
|
export default _default;
|