synapse-react-client
Version:
[](https://badge.fury.io/js/synapse-react-client) [](https://github.com/prettier/prettie
40 lines • 1.68 kB
TypeScript
import { SynapseContext } from '@/utils/context/SynapseContext';
import { FileEntity, UserProfile } from '@sage-bionetworks/synapse-types';
import { Component, ContextType } from 'react';
export type EntityFormProps = {
parentContainerId: string;
formSchemaEntityId: string;
formUiSchemaEntityId: string;
initFormData: boolean;
synIdCallback: (synId: string) => void;
};
type EntityFormState = {
error?: any;
isLoading?: boolean;
successfullyUploaded: boolean;
containerId?: string;
userprofile?: UserProfile;
currentFileEntity?: FileEntity;
formData?: any;
formSchema?: any;
formUiSchema?: any;
};
export declare class EntityForm extends Component<EntityFormProps, EntityFormState> {
static contextType: import("react").Context<import("@/utils/context/SynapseContext").SynapseContextType>;
context: NonNullable<ContextType<typeof SynapseContext>>;
formRef: any;
constructor(props: EntityFormProps);
componentDidMount(): void;
submitForm: () => void;
refresh: () => void;
getSchemaFileContent: (targetFolderId: string, formSchemaFileEntity: FileEntity, formUiSchemaFileEntity: FileEntity) => void;
getExistingFileData: (targetFolderId: string, formSchemaContent: any, formUiSchemaContent: any) => void;
getTargetContainer: (userprofile: UserProfile, token: string) => Promise<string | void>;
finishedProcessing: () => void;
onError: (error: any) => void;
onSubmit: ({ formData }: any) => void;
createEntityFile: (fileContentsBlob: Blob) => void;
render(): import("react/jsx-runtime").JSX.Element;
}
export default EntityForm;
//# sourceMappingURL=EntityForm.d.ts.map