import { RawDraftContentBlock, RawDraftContentState } from 'draft-js'; import { EurekaDraft } from '../@Types/Draft/Draft'; import { DraftEntityData } from '../@Types/Draft/DraftEntityData'; import { DependencyStore } from '../Form/Form'; import { FormStep } from '../@Types/FormStep'; import { Form } from '../@Types'; interface FormCache { form: Form; dependencies: DependencyStore; ticket?: { caseNumber: string; }; entityValue?: { _id: string; label: string; [key: string]: any; }; company?: { _id: string; label: string; [key: string]: any; }; entity?: Record; } export declare function stringToDraft(text: string): RawDraftContentState; export declare const getRawText: (draft?: RawDraftContentState, text?: string) => RawDraftContentState; export declare function mapDraftEntities(cache: FormCache, draft: EurekaDraft, mapToId?: boolean): RawDraftContentState; type MappedBlock = { text: string; inlineStyleRanges?: RawDraftContentBlock['inlineStyleRanges']; }; export declare const draftEntityMapper: (cache: FormCache, entityData: DraftEntityData, mapToId?: boolean) => MappedBlock; type DraftBlock = EurekaDraft['blocks'][0]; /** * The function will generate text for given draftjs editorContent. */ export declare function draftToString(cache: FormCache, draft: EurekaDraft, mapToId?: boolean): string; /** * Function to check if a block is of type list. */ export declare function isList(blockType: DraftBlock['type']): boolean; /** * Function will return text for Entity. */ export declare function getEntityText(entityMap: EurekaDraft['entityMap'], entityKey: number, blockText: string): string; /** * Function to check if the block is an atomic entity block. */ export declare function isAtomicBlock(block: DraftBlock): boolean; /** * The function returns true if the string passed to it has no content. */ export declare function isEmptyString(str: string): boolean; export declare function getDepthPadding(depth: number): string; export declare function formStepToString(step: FormStep, value: any | undefined, mapToId?: boolean): string | null; export {};