/** * 适配老的大屏组件数据格式传入 */ import React from 'react'; import { AlgorithmVersionStr, HumanProperty, ObjectType, Rect, ViewOption, AlignType, IScreenshotButtonProp, ODRECT } from '@zhst/types'; export type TAB_TYPE = 'COMPATER' | 'NORMAL' | 'TRACK'; export type MODEL_TYPE = 'VIDEO' | 'IMAGE'; export interface ImgViewProps extends React.HTMLAttributes { imageKey: string; odRect: ODRECT; attachImg?: Array<{ label: string; url: string; }>; showAttachImgLabel: boolean; screenshotButtonAlign: AlignType; screenshotButtonRender: (screenshotButtonProp: IScreenshotButtonProp) => React.ReactElement; scale$?: number; showCrop$?: boolean; hideLeftTopBtn?: boolean; score?: number; viewOption?: ViewOption; } export interface VideoViewProps { flvUrl: string; maxDuration?: number; screenshotButtonAlign?: AlignType; screenshotButtonRender?: (screenshotButtonProp: IScreenshotButtonProp) => React.ReactElement; defautlNormalizationRect?: Rect; onCropChange?: (showCrop: boolean, normalizationRect: null | Rect) => void; showCrop$?: boolean; } export interface CarouselProps { hasPre?: boolean; hasNext?: boolean; selectIndex: number; setSelectIndex: React.Dispatch>; dataSource: Array<{ key: string; url: string; }>; } export type ISelectItem = Partial> & Partial>; export interface HeaderProps { value: TAB_TYPE; onChange: (type: TAB_TYPE) => void; tabsFilter: TAB_TYPE[]; } export interface ImgViewRef { imgInsRef: React.MutableRefObject; setShowCrop: React.Dispatch>; } export interface VideoViewRef { cropAble: boolean; setShowCrop: React.Dispatch>; downloadVideoframe: () => void; } export interface ParamProps { tab: string; selectItem: ISelectItem; imgViewRef: React.MutableRefObject; VideoViewRef: React.MutableRefObject; model: MODEL_TYPE; setModel: React.Dispatch>; scale$: number; showCrop$: boolean; } export interface BigImageData { extendRectList: (Rect & { algorithmVersion: AlgorithmVersionStr; imageKey: string; })[]; rectList: (Rect & { algorithmVersion: AlgorithmVersionStr; imageKey: string; })[]; attachImg: { url: string; label: '形体' | '人脸'; }[]; odRect: Rect; imageKey: string; imgSummary: string; objectExtImageKey: string; attributeList: { label: string; list: any[]; }[]; archiveImages?: any; spaceName: string; objectType: ObjectType; objectId: string; bodyObjectId?: string; faceObjectId?: string; sourceObjectId?: string; cameraId: string; cameraName: string; selectIndex: number; humanProperty: HumanProperty; qualityScore?: number; score: number; timestamp: string; bodyImageUrl: string; faceImageUrl: string; algorithmVersion: AlgorithmVersionStr; bodySpaceName: string; faceSpaceName: string; solutionId?: string; [index: string]: any; } interface IOldImageData { visible?: boolean; defaultModel?: MODEL_TYPE; onClose?: () => void; isLoading?: boolean; hasPre?: boolean; hasNext?: boolean; selectIndex?: number; onSelectIndexChange?: (i: number) => void; dataSource: any[]; dataSources: any[]; relatedData?: any[]; transformPropFunc: (item: any) => ISelectItem; transformVideoPropFunc: (item: ISelectItem) => Promise>; screenshotButtonRender?: (screenshotButtonProp: IScreenshotButtonProp) => React.ReactElement; showTool?: boolean; showCarousel?: boolean; imgViewProp?: Partial; videoViewProp?: Partial; ToolProps?: Partial; nullDialogProp?: { emptyText?: string; }; showHeader?: boolean; tabsFilter?: TAB_TYPE[]; useVirtual?: boolean; loadNext?: (i: number) => Promise; loadPre?: (i: number) => Promise; children: React.ReactNode; title?: string; specialTitle?: string; isRelated?: boolean; carouselProp?: Partial; } export interface ToolProps { renderRight?: (props: ParamProps) => React.ReactNode; renderLeft?: (props: ParamProps) => React.ReactNode; renderVideoBtn?: boolean; param: ParamProps; disableVideo: boolean; } declare const _default: (data: IOldImageData) => IOldImageData; export default _default;