Wagtail client-side components
    Preparing search index...
    Index

    Constructors

    Properties

    actions: {
        addComment: (comment: Comment) => AddCommentAction;
        addReply: (commentId: number, reply: CommentReply) => AddReplyAction;
        deleteComment: (commentId: number) => DeleteCommentAction;
        deleteReply: (commentId: number, replyId: number) => DeleteReplyAction;
        invalidateContentPath: (contentPath: string) => InvalidateContentPathAction;
        resolveComment: (commentId: number) => ResolveCommentAction;
        setFocusedComment: (
            commentId: null | number,
            __namedParameters?: { forceFocus: boolean; updatePinnedComment: boolean },
        ) => SetFocusedCommentAction;
        updateComment: (
            commentId: number,
            update: CommentUpdate,
        ) => UpdateCommentAction;
        updateReply: (
            commentId: number,
            replyId: number,
            update: CommentReplyUpdate,
        ) => UpdateReplyAction;
    } = commentActionFunctions
    activationHandlers: (() => void)[] = []
    selectors: {
        selectCommentCount: (
            state: { comments: CommentsState; settings: SettingsState },
        ) => number;
        selectComments: (
            state: { comments: CommentsState; settings: SettingsState },
        ) => Map<number, Comment>;
        selectFocused: (
            state: { comments: CommentsState; settings: SettingsState },
        ) => null | number;
        selectIsDirty: (
            state: { comments: CommentsState; settings: SettingsState },
            ...params: [],
        ) => boolean & {
            clearCache: () => void;
            resetResultsCount: () => void;
            resultsCount: () => number;
        } & {
            dependencies: [
                (
                    state: { comments: CommentsState; settings: SettingsState },
                ) => Map<number, Comment>,
                (state: { comments: CommentsState; settings: SettingsState }) => number,
            ];
            dependencyRecomputations: () => number;
            lastResult: () => boolean;
            memoizedResultFunc: (
                ...resultFuncArgs: [Map<number, Comment>, number],
            ) => boolean & {
                clearCache: () => void;
                resetResultsCount: () => void;
                resultsCount: () => number;
            };
            recomputations: () => number;
            resetDependencyRecomputations: () => void;
            resetRecomputations: () => void;
            resultFunc: (...resultFuncArgs: [Map<number, Comment>, number]) => boolean;
        } & {
            argsMemoize: <Func extends AnyFunction>(
                func: Func,
                options?: WeakMapMemoizeOptions<ReturnType<Func>>,
            ) => Func & {
                clearCache: () => void;
                resetResultsCount: () => void;
                resultsCount: () => number;
            };
            memoize: <Func extends AnyFunction>(
                func: Func,
                options?: WeakMapMemoizeOptions<ReturnType<Func>>,
            ) => Func & {
                clearCache: () => void;
                resetResultsCount: () => void;
                resultsCount: () => number;
            };
        };
    } = ...
    store: Store
    utils: {
        selectCommentFactory: (
            localId: number,
        ) => (
            state: { comments: CommentsState; settings: SettingsState },
            ...params: [],
        ) => undefined | Comment & {
            clearCache: () => void;
            resetResultsCount: () => void;
            resultsCount: () => number;
        } & {
            dependencies: [
                (
                    state: { comments: CommentsState; settings: SettingsState },
                ) => Map<number, Comment>,
            ];
            dependencyRecomputations: () => number;
            lastResult: () => undefined | Comment;
            memoizedResultFunc: (
                ...resultFuncArgs: [Map<number, Comment>],
            ) => undefined | Comment & {
                clearCache: () => void;
                resetResultsCount: () => void;
                resultsCount: () => number;
            };
            recomputations: () => number;
            resetDependencyRecomputations: () => void;
            resetRecomputations: () => void;
            resultFunc: (
                ...resultFuncArgs: [Map<number, Comment>],
            ) => undefined | Comment;
        } & {
            argsMemoize: <Func extends AnyFunction>(
                func: Func,
                options?: WeakMapMemoizeOptions<ReturnType<Func>>,
            ) => Func & {
                clearCache: () => void;
                resetResultsCount: () => void;
                resultsCount: () => number;
            };
            memoize: <Func extends AnyFunction>(
                func: Func,
                options?: WeakMapMemoizeOptions<ReturnType<Func>>,
            ) => Func & {
                clearCache: () => void;
                resetResultsCount: () => void;
                resultsCount: () => number;
            };
        };
        selectCommentsForContentPathFactory: (
            contentpath: string,
        ) => (
            state: { comments: CommentsState; settings: SettingsState },
            ...params: [],
        ) => Comment[] & {
            clearCache: () => void;
            resetResultsCount: () => void;
            resultsCount: () => number;
        } & {
            dependencies: [
                (
                    state: { comments: CommentsState; settings: SettingsState },
                ) => Map<number, Comment>,
            ];
            dependencyRecomputations: () => number;
            lastResult: () => Comment[];
            memoizedResultFunc: (
                ...resultFuncArgs: [Map<number, Comment>],
            ) => Comment[] & {
                clearCache: () => void;
                resetResultsCount: () => void;
                resultsCount: () => number;
            };
            recomputations: () => number;
            resetDependencyRecomputations: () => void;
            resetRecomputations: () => void;
            resultFunc: (...resultFuncArgs: [Map<number, Comment>]) => Comment[];
        } & {
            argsMemoize: <Func extends AnyFunction>(
                func: Func,
                options?: WeakMapMemoizeOptions<ReturnType<Func>>,
            ) => Func & {
                clearCache: () => void;
                resetResultsCount: () => void;
                resultsCount: () => number;
            };
            memoize: <Func extends AnyFunction>(
                func: Func,
                options?: WeakMapMemoizeOptions<ReturnType<Func>>,
            ) => Func & {
                clearCache: () => void;
                resetResultsCount: () => void;
                resultsCount: () => number;
            };
        };
    } = ...

    Methods

    • Parameters

      • userId: any
      • authors: Map<string, { avatar_url: string; name: string }>

      Returns void

    • Parameters

      • commentId: number
      • newContentPath: string

      Returns void