/** * 适配老的大屏组件数据格式传入 */ import React from 'react'; import { AlgorithmVersionStr, HumanProperty, ObjectType, Rect } from '@zhst/types'; import { VideoViewProps, ImgViewProps, VideoViewRef, ImgViewRef } from '@zhst/meta'; export type TAB_TYPE = 'COMPATER' | 'NORMAL' | 'TRACK'; export type MODEL_TYPE = 'VIDEO' | 'IMAGE'; export interface CarouselProps { hasPre?: boolean; hasNext?: boolean; selectIndex: number; setSelectIndex: React.Dispatch>; dataSource: Array<{ key: string; url: string; }>; } export type ISelectItem = Partial> & Partial>; /** * 描述列表 description */ export interface HeaderProps { value: TAB_TYPE; onChange: (type: TAB_TYPE) => void; tabsFilter: TAB_TYPE[]; } 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 ToolProps { renderRight?: (props: ParamProps) => React.ReactNode; renderLeft?: (props: ParamProps) => React.ReactNode; renderVideoBtn?: boolean; param: ParamProps; disableVideo: boolean; } export interface BigImageData { extendRectList: (Rect & { algorithmVersion: AlgorithmVersionStr; imageKey: string; })[]; rectList: (Rect & { algorithmVersion: AlgorithmVersionStr; imageKey: string; })[]; attachImg: { url: string; label: '形体' | '人脸'; }[]; odRect: Rect; compaterImages: string[]; constractKey: string; frameImageKey: string; imageKey?: string; imgSummary: string; objectExtImageKey: string; attributeList: { label: string; list: any[]; }[]; archiveImages?: any; spaceName: string; objectIndex?: { deviceId: string; fragmentId: string; objectId: string; solutionId: 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; position: { lat: number; lng: number; }; solutionId?: string; [index: string]: any; } export interface ImageModalDataProps { targetData: BigImageData[]; compactData: BigImageData[]; } export interface ModalAdapterConfigProps { oldMode?: boolean; } /** * 大图组件适配器,兼容老接口 * @param Cmp 大图组件 * @param config 额外配置 * @returns 大图组件 */ declare const adapter: (Cmp: any, config: ModalAdapterConfigProps) => any; export default adapter;