@omnia/fx
Version:
Provide Omnia Fx typings and tooling for clientside Omnia development.
90 lines (89 loc) • 3.49 kB
TypeScript
import { CommentStyles, VueComponentBase } from "..";
import { IWebComponentInstance } from "../..";
import { Comment, IBlockInstance, IOmniaContext, OmitProperties, ResolvedUserIdentity, ThemeDefinition } from "../../models";
import { CommentSorting } from "../../models/Social";
import { DirectionRuleStore, FeatureStore } from "../../stores";
import { IRichTextEditor } from "../richtexteditor";
import "./Comment.css";
import { ICommentComponent } from "./IComment";
import { CommentLocalization } from "./loc/localize";
export declare class CommentComponent extends VueComponentBase implements IWebComponentInstance, ICommentComponent {
private userIdentityStore;
directionStore: DirectionRuleStore;
featureStore: FeatureStore;
omniaContext: IOmniaContext;
protected blockInstance: IBlockInstance;
commentLoc: CommentLocalization.locInterface;
showMoreSize: number;
template: string;
comments: Array<Comment>;
topicId: string;
richTextSettings?: OmitProperties<IRichTextEditor, "initialContent" | "onContentChange">;
enableBestReply: boolean;
enableMention?: boolean;
canMarkBestReply: boolean;
dynamicInput: any;
styles?: typeof CommentStyles;
additionalRoles?: Array<string>;
sortOrder?: CommentSorting;
allowLikes?: boolean;
cardStyle?: ThemeDefinition;
hideEdit?: boolean;
readOnly?: boolean;
hideTotalNumber?: boolean;
contextParams?: {
[key: string]: string | number;
};
markedBestReply?: () => void;
commented?: () => void;
commentedReply?: () => void;
reactedSocial?: () => void;
private reverseSortOrder;
isLoading: boolean;
showOnlyBestReply: boolean;
currentUser: ResolvedUserIdentity;
commentsReplyingHashKey: {
[id: string]: string;
};
commentsHashKey: {
[id: string]: string;
};
commentsReplying: {
[id: string]: Comment;
};
commentAddingHashKey: string;
commentAdding: Comment;
currentShowMoreSize: {
[id: string]: number;
};
currentReplyCommentKey: {
[parentId: string]: string;
};
currentMainCommentKey: string;
private commentClasses;
private minIndexToShow;
private topComments;
private templateSettings;
private isRightToLeft;
private get isMobile();
private richTextPlaceholder;
onTopicIdChange(newValue: Comment[], oldValue: Comment[]): void;
created(): void;
mounted(): void;
beforeUpdate(): void;
initCommentAdding(): void;
extendCurrentShowMoreSize(id: string, size?: number): void;
onCommentAdded: (addedComment: boolean, commentId: string, parentComment?: Comment) => void;
onCancelReply(comment: Comment): void;
onOpenReply(commentToReplyOn: Comment): Comment;
isElementInViewport(el: any): boolean;
getCommentsCountLabel(commentsCount: number): string;
renderTopicComments(): VueTsxSupport.JSX.Element;
setFocusWhenViewPrevOrMoreComment(parentCommentId: string, commentKey: string): void;
renderTopCommentShowMoreOption(id: string, replyComment?: boolean): VueTsxSupport.JSX.Element;
renderShowAllOption(id: string): VueTsxSupport.JSX.Element;
renderMainCommentComponent(comment: Comment, slimSpacing: boolean): VueTsxSupport.JSX.Element;
renderCommentsWithChildren(parentComment: Comment): VueTsxSupport.JSX.Element;
renderBestReply(): VueTsxSupport.JSX.Element | JSX.Element[];
render(): VueTsxSupport.JSX.Element;
}