import { CommentThread, BaseContext, GridCell } from '../types'; /** * Options for managing Comments and Comment Threads in AdapTable */ export interface CommentOptions { /** * Function to configure if a cell can contain Comments */ isCellCommentable?: (commentableCellContext: CommentableCellContext) => boolean; /** * Loads the Comment Threads */ loadCommentThreads?(commentLoadContext: CommentLoadContext): Promise; /** * Persists the current Comment Threads * @param commentThreads */ persistCommentThreads?(commentThreads: CommentThread[]): Promise; /** * Date Format string for Comments timestamp * * @defaultValue 'dd-MM-yyyy HH:mm:ss' */ dateFormat?: string | (() => string); /** * Show the Close Button in the Comments Popup * @defaultValue true */ showPopupCloseButton?: boolean; } /** * Context used when determining if a cell can show Comments */ export interface CommentableCellContext extends BaseContext { /** * Grid Cell in AdapTable which has been clicked */ gridCell: GridCell; } /** * Context used when loading Comments */ export interface CommentLoadContext extends BaseContext { }