@omnia/fx
Version:
Provide Omnia Fx typings and tooling for clientside Omnia development.
84 lines (83 loc) • 3.94 kB
TypeScript
import { VueComponentBase } from "..";
import { IWebComponentInstance } from "../..";
import { OmniaContext } from "../../contexts";
import { GuidValue, IPersistedPost, IPostBaseContext, IPostBaseWithContext, OmitProperties, ResolvedUserIdentity, ThemeDefinition } from "../../models";
import { PostStyle } from "../models";
import { IRichTextEditor } from "../richtexteditor";
import { IPostComponent, IPostCustomSlots, PostPermission, PostProvider } from "./IPost";
import { PostLocalization } from "./loc/localize";
import "./Post.css";
import { UserIdentityStore } from "@omnia/fx/stores";
export default class PostComponent extends VueComponentBase implements IWebComponentInstance, IPostComponent {
omniaContext: OmniaContext;
userIdentityStore: UserIdentityStore;
private featureStore;
postLoc: PostLocalization.locInterface;
provider: PostProvider;
editContentOnTop?: boolean;
omniaServiceId: GuidValue;
postTypeId: GuidValue;
showMoreSize: number;
richTextSettings?: OmitProperties<IRichTextEditor, "initialContent" | "onContentChange">;
styles?: typeof PostStyle;
cardStyle?: ThemeDefinition;
allowLikes?: boolean;
enableMention?: boolean;
customSlots?: IPostCustomSlots;
hideEditOption?: boolean;
getTopPostIds: () => {
[commentId: string]: string;
};
getUserHash: () => {
[principalName: string]: ResolvedUserIdentity;
};
topicPermissionDictionary: {
[topicId: string]: PostPermission;
};
isLoading: boolean;
currentUser: ResolvedUserIdentity;
showOnlyPromotedPost: boolean;
canCreateNewPost: boolean;
postAddingHashKey: string;
postsReplyingHashKey: {
[id: string]: string;
};
postsHashKey: {
[id: string]: string;
};
postAdding: IPersistedPost<IPostBaseWithContext<IPostBaseContext>>;
postsReplying: {
[id: string]: IPersistedPost<IPostBaseWithContext<IPostBaseContext>>;
};
postsBeingEdited: Array<IPersistedPost<IPostBaseWithContext<IPostBaseContext>>>;
currentShowMoreSize: {
[id: string]: number;
};
private postClasses;
private minIndexToShow;
private topMostId;
private topPosts;
private postTemplate;
private enableTeamsPresence;
onPromotedPostChange(newValue: IPersistedPost<IPostBaseWithContext<IPostBaseContext>>, oldValue: IPersistedPost<IPostBaseWithContext<IPostBaseContext>>): void;
onPostsChange(newValue: IPersistedPost<IPostBaseWithContext<IPostBaseContext>>[], oldValue: IPersistedPost<IPostBaseWithContext<IPostBaseContext>>[]): void;
created(): void;
mounted(): void;
updateCreatePostPermission(): void;
initPostAdding(): void;
extendCurrentShowMoreSize(id: string, size?: number): void;
handlePostAdding: (addedPost: boolean, postId: string, parentPost?: IPersistedPost<IPostBaseWithContext<IPostBaseContext>>) => void;
onCancelReply(persistedParentPost: IPersistedPost<IPostBaseWithContext<IPostBaseContext>>): void;
onOpenReply(persistedPostToReplyOn: IPersistedPost<IPostBaseWithContext<IPostBaseContext>>): void;
openEditPost(post: IPersistedPost<IPostBaseWithContext<IPostBaseContext>>): void;
cancelEditPost(post: IPersistedPost<IPostBaseWithContext<IPostBaseContext>>): void;
isElementInViewport(el: any): boolean;
getPostsCountLabel(postsCount: number): string;
renderPosts(): VueTsxSupport.JSX.Element;
renderShowMoreOption(id: string): VueTsxSupport.JSX.Element;
renderShowAllOption(id: string): VueTsxSupport.JSX.Element;
renderMainPostComponent(post: IPersistedPost<IPostBaseWithContext<IPostBaseContext>>, slimSpacing: boolean): VueTsxSupport.JSX.Element;
renderPostsWithReplies(parentPost: IPersistedPost<IPostBaseWithContext<IPostBaseContext>>): VueTsxSupport.JSX.Element;
renderPromotedPost(): VueTsxSupport.JSX.Element | JSX.Element[];
render(): VueTsxSupport.JSX.Element;
}