UNPKG

@grapecity/inputman.comment.react

Version:

InputMan.comment.react

85 lines (84 loc) 4.15 kB
import * as GC from "@grapecity/inputman.comment"; import { IDictionary } from "../common/helper"; import React from "react"; export interface Props extends IDictionary { id?: string | undefined; className?: string | undefined; name?: string | null; } export interface GcCommentProps extends Props { userInfo?: GC.InputMan.UserInfo; candidateReactionList?: string[]; candidateReactionListColumns?: number; postTimeFormatter?: GC.InputMan.DateFormatter; updateTimeFormatter?: GC.InputMan.DateFormatter; showIcon?: boolean; addCommentEditorPosition?: GC.InputMan.GcCommentEditorPosition; commentMode?: GC.InputMan.GcCommentMode; header?: (string | GC.InputMan.GcCommentHeaderFooterItem)[]; footer?: (string | GC.InputMan.GcCommentHeaderFooterItem)[]; headerFooterItems?: { [key: string]: (gcComment: GC.InputMan.GcComment) => GC.InputMan.IHeaderFooterItem; }; commentAction?: (string | GC.InputMan.GcCommentCommentActionItem)[]; commentInfoAction?: (string | GC.InputMan.GcCommentCommentInfoActionItem)[]; commentActionItem?: { [key: string]: GC.InputMan.ICommentActionItem; }; commentInfoActionItem?: { [key: string]: GC.InputMan.ICommentInfoActionItem; }; commentActionButtonType?: GC.InputMan.GcCommentActionButtonType; pageSize?: number; loadOnDemand?: boolean; allowAnonymous?: boolean; anonymousUserInfo?: GC.InputMan.UserInfo; warningMessage?: GC.InputMan.IWarningMessage; watermark?: GC.InputMan.IWaterMark; commentFormatter?: GC.InputMan.CommentFormatter; editorConfig?: GC.InputMan.EditorConfig; avatarType?: GC.InputMan.GcCommentUserIconType; loadUsersInfoHandler?: GC.InputMan.LoadUsersCallback; loadComments?: (args: GC.InputMan.LoadMoreCommentsInfo) => GC.InputMan.LoadCommentsResult; addNewCommentTo?: GC.InputMan.AddNewCommentPosition; keepDraft?: boolean; dataSource?: GC.InputMan.IGcCommentDataSource; loadCommentCount?: () => number | Promise<number>; commentCountFormatter?: (n: number) => string | HTMLElement; loadReactionCount?: () => number | Promise<number>; reactionCountFormatter?: (n: number) => string | HTMLElement; sortInfo?: GC.InputMan.SortInfo; loadRepliesOnDemand?: boolean; replyLevel?: number; collapseRepliesMode?: GC.InputMan.GcCommentCollapseRepliesMode; showCurrentUserName?: boolean; contextToolbar?: (string | GC.InputMan.GcCommentContextToolbar | GC.InputMan.ContextToolbarOption)[]; contextToolbarItem?: { [key: string]: GC.InputMan.ICommentContextToolbarItem; }; loadCommentReplies?: (comment: GC.InputMan.IComment, loadedCount: number) => GC.InputMan.LoadCommentsResult; comments?: GC.InputMan.IComment[]; stickedComment?: GC.InputMan.IComment; copiedLinkDisplayTextFormatter?: (comment: GC.InputMan.IComment) => GC.InputMan.ICopiedLinkDisplayTextConfig; copiedLinkFormatter?: (comment: GC.InputMan.IComment) => string; copiedLinkSearchParams?: (GC.InputMan.GcCommentLinkSearchParams | GC.InputMan.CustomLinkSearchParam)[]; pastedLinkType?: GC.InputMan.GcCommentPasteLinkType; showLinkTypeContextToolbar?: boolean; loadCommentByLink?: (link: string) => Promise<GC.InputMan.LoadCommentByLinkResult>; openLinkMode?: GC.InputMan.OpenLinkMode; loadStickedComment?: () => GC.InputMan.IComment | null; showZeroReaction?: boolean; showOpenReactionListButton?: boolean; createEditor?: (args: GC.InputMan.CreateEditorArgs) => GC.InputMan.ICommentEditor; editorCreated?: (args: GC.InputMan.EditorCreatedArgs) => void; beforeExecuteCommand?: (args: GC.InputMan.ExecuteCommandArgs) => void; afterExecuteCommand?: (args: GC.InputMan.ExecuteCommandArgs) => void; beforeFirstLoad?: () => void; afterFirstLoad?: () => void; preprocessError?: (args: GC.InputMan.PreprocessErrorArgs) => void; onInitialized?: ((sender: GC.InputMan.GcComment) => void) | null; } export interface IGcComment { getNestedIMControl: () => GC.InputMan.GcComment | null; } export declare const GcComment: React.FC<GcCommentProps>;