climb-onyx-gui
Version:
Onyx Graphical User Interface
49 lines (48 loc) • 1.59 kB
TypeScript
import { ExportStatus, TabState, Project, Fields, Theme, ObjectType } from './types';
export interface OnyxProps {
enabled: boolean;
httpPathHandler: (path: string) => Promise<Response>;
s3PathHandler: (path: string) => Promise<void>;
fileWriter: (path: string, content: string) => Promise<void>;
extTheme?: string | null;
extVersion: string;
getItem?: (key: string) => unknown;
setItem?: (key: string, value: unknown) => void;
setTitle?: (title: string) => void;
}
export interface PageProps extends OnyxProps {
theme: Theme;
tabState: TabState;
handleTabChange: (tabState: TabState) => void;
handleObjectShow: (objectType: ObjectType, ID: string) => void;
handleObjectHide: (objectType: ObjectType) => void;
}
export interface ProjectProps extends PageProps {
project: Project;
}
export interface DataProps extends ProjectProps {
fields: Fields;
recordPrimaryID: string;
analysisPrimaryID: string;
typeLookups: Map<string, string[]>;
lookupDescriptions: Map<string, string>;
}
export interface IDProps extends DataProps {
ID: string;
onHide: () => void;
}
export interface ResultsProps extends DataProps {
title: string;
commandBase: string;
searchPath: string;
}
export interface ExportHandlerProps {
fileName: string;
statusToken: {
status: ExportStatus;
};
setExportStatus: (status: ExportStatus) => void;
setExportProgress: (progress: number) => void;
setExportProgressMessage: (message: string) => void;
setExportError: (error: Error) => void;
}