@livetiles/reach-plugin-types 0.4.0-preview.903 → 0.4.0-preview.906

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/index.d.ts +49 -63
  2. package/package.json +1 -1
package/lib/index.d.ts CHANGED
@@ -4081,7 +4081,7 @@ declare module "libs/reach/ui/common/src/common/buttons/CommentActionMenu" {
4081
4081
  setContent: (content: string) => unknown;
4082
4082
  handleTranslate: (preferredContentLanguageCode: string) => Promise<string>;
4083
4083
  showAutoTranslate: boolean;
4084
- onReply?: (commentId: string, commentSender: Account) => void;
4084
+ onReply?: (comment: Comment, commentSender: Account) => void;
4085
4085
  disabled?: boolean;
4086
4086
  }>;
4087
4087
  }
@@ -6950,8 +6950,10 @@ declare module "libs/reach/feature/content/src/comments/RichCommentInput" {
6950
6950
  } & import("react").RefAttributes<HTMLInputElement>>;
6951
6951
  }
6952
6952
  declare module "libs/reach/feature/content/src/comments/utils" {
6953
- import { Attachment } from "libs/reach/util/common/src/index";
6953
+ import { Comment, Attachment, CurrentUser } from "libs/reach/util/common/src/index";
6954
6954
  export function canSaveInput(allowSaveWithoutContent: boolean, attachments: Attachment[], content: string): boolean;
6955
+ export function canDelete(comment: Comment, user: CurrentUser, groupIds: string[]): boolean;
6956
+ export function canEdit(comment: Comment, user: CurrentUser): boolean;
6955
6957
  }
6956
6958
  declare module "libs/reach/feature/content/src/forms/videos/VideoElementGenerator" {
6957
6959
  import { VideoInfo } from "libs/reach/feature/content/src/forms/videos/InsertVideoDialog";
@@ -9045,6 +9047,46 @@ declare module "libs/reach/feature/content/src/common/detail/events/controls/Eve
9045
9047
  import { FC } from 'react';
9046
9048
  export const EventDetailViewCancelInformation: FC;
9047
9049
  }
9050
+ declare module "libs/reach/feature/content/src/common/hooks/usePageViewTracker" {
9051
+ import { ItemResourceTypes } from "libs/reach/util/common/src/index";
9052
+ export enum PageViewType {
9053
+ PostsGroupView = "PostsGroupView"
9054
+ }
9055
+ export function usePageViewTracker(basePath: ItemResourceTypes | string, itemId: string, viewType?: PageViewType): void;
9056
+ }
9057
+ declare module "libs/reach/feature/content/src/comments/ThreadContext" {
9058
+ import { FC, Dispatch, SetStateAction } from 'react';
9059
+ export const ThreadContext: import("react").Context<{
9060
+ setActiveThreadId: (threadId: string) => unknown;
9061
+ activeThreadId: string;
9062
+ hasMoreUnreadReplies?: boolean;
9063
+ setHasMoreUnreadReplies?: Dispatch<SetStateAction<boolean>>;
9064
+ }>;
9065
+ export const ThreadContextProvider: FC;
9066
+ }
9067
+ declare module "libs/reach/feature/content/src/comments/CommentWithReplies" {
9068
+ import { Account, Comment, ConversationScope, ItemResourceTypes, PaginatedList } from "libs/reach/util/common/src/index";
9069
+ import { FC } from 'react';
9070
+ export const CommentWithReplies: FC<{
9071
+ comment: Comment;
9072
+ replies?: PaginatedList<Comment>;
9073
+ scope: ConversationScope;
9074
+ mentionSearchHandler: (text: string) => Promise<Account[]>;
9075
+ type: ItemResourceTypes;
9076
+ groupIds: string[];
9077
+ baseAttachmentPath: string;
9078
+ getHashtagFilterRoute?: (hashtag: string) => string;
9079
+ onReplyIconClick?: () => void;
9080
+ onReply?: (comment: Comment, commentSender?: Account) => void;
9081
+ onDeleteComment?: (comment?: Comment) => unknown;
9082
+ onDeleteReply?: (reply: Comment) => unknown;
9083
+ onReplyCountChange?: (newReplyCount: number) => void;
9084
+ readOnly?: boolean;
9085
+ trimContent?: boolean;
9086
+ showReplyBox?: boolean;
9087
+ className?: string;
9088
+ }>;
9089
+ }
9048
9090
  declare module "libs/reach/feature/content/src/comments/CommentList" {
9049
9091
  import { FC } from 'react';
9050
9092
  import { Comment, ConversationScope } from "libs/reach/util/common/src/index";
@@ -9061,7 +9103,7 @@ declare module "libs/reach/feature/content/src/comments/CommentList" {
9061
9103
  baseAttachmentPath: string;
9062
9104
  noItemsYetStringResourceKey: string;
9063
9105
  getHashtagFilterRoute?: (hashtag: string) => string;
9064
- onReply?: (commentId: string, commentSender: Account) => void;
9106
+ onReply?: (comment: Comment, commentSender?: Account) => void;
9065
9107
  readOnly?: boolean;
9066
9108
  trimContent?: boolean;
9067
9109
  className?: string;
@@ -9123,7 +9165,6 @@ declare module "libs/reach/feature/content/src/comments/PagedCommentsSection" {
9123
9165
  showReplyBox?: boolean;
9124
9166
  trimContent?: boolean;
9125
9167
  title?: ReactNode;
9126
- onThreadReply?: (threadId: string) => void;
9127
9168
  className?: string;
9128
9169
  };
9129
9170
  export const PagedCommentsSection: FC<Props>;
@@ -9155,7 +9196,6 @@ declare module "libs/reach/feature/content/src/comments/PublishableItemComments"
9155
9196
  readOnly?: boolean;
9156
9197
  loadInReadOnlyMode?: boolean;
9157
9198
  type: ItemResourceTypes;
9158
- onThreadReply?: (threadId: string) => void;
9159
9199
  hideProfileUrl?: boolean;
9160
9200
  disableLoginForPublicUser?: boolean;
9161
9201
  }>;
@@ -9181,13 +9221,6 @@ declare module "libs/reach/feature/content/src/feedback/buttons/FeedbackButtons"
9181
9221
  className?: string;
9182
9222
  }>;
9183
9223
  }
9184
- declare module "libs/reach/feature/content/src/common/hooks/usePageViewTracker" {
9185
- import { ItemResourceTypes } from "libs/reach/util/common/src/index";
9186
- export enum PageViewType {
9187
- PostsGroupView = "PostsGroupView"
9188
- }
9189
- export function usePageViewTracker(basePath: ItemResourceTypes | string, itemId: string, viewType?: PageViewType): void;
9190
- }
9191
9224
  declare module "libs/reach/feature/content/src/comments/ThreadView" {
9192
9225
  import { FC } from 'react';
9193
9226
  import { Comment, ConversationScope } from "libs/reach/util/common/src/index";
@@ -9786,8 +9819,9 @@ declare module "libs/reach/feature/content/src/comments/CommentDisplay" {
9786
9819
  getHashtagFilterRoute?: (hashtag: string) => string;
9787
9820
  highlight?: boolean;
9788
9821
  isInitialLiked?: boolean;
9822
+ hasUnreadReplies?: boolean;
9789
9823
  onReplyIconClick?: () => void;
9790
- onReply?: (commentId: string, commentSender?: Account) => void;
9824
+ onReply?: (comment: Comment, commentSender?: Account) => void;
9791
9825
  replyCount?: number;
9792
9826
  readOnly?: boolean;
9793
9827
  trimContent?: boolean;
@@ -10014,9 +10048,9 @@ declare module "libs/reach/feature/content/src/posts/PostReplies" {
10014
10048
  initialPageSize?: number;
10015
10049
  comments?: PaginatedList<Comment>;
10016
10050
  autoFocusReplyField?: boolean;
10051
+ showReplyBox?: boolean;
10017
10052
  onReplyAdded: () => void;
10018
10053
  onReplyDeleted: () => void;
10019
- onThreadReply?: (threadId: string) => void;
10020
10054
  trimContent?: boolean;
10021
10055
  }
10022
10056
  export const PostReplies: FC<Props>;
@@ -10061,7 +10095,7 @@ declare module "libs/reach/feature/content/src/posts/PostDisplay" {
10061
10095
  import { Comment, Keyword, PaginatedList } from "libs/reach/util/common/src/index";
10062
10096
  interface Props {
10063
10097
  post: Post;
10064
- targetUrl: string;
10098
+ targetUrl?: string;
10065
10099
  className?: string;
10066
10100
  threadId?: string;
10067
10101
  onCustomPostDelete?: () => void;
@@ -10103,52 +10137,6 @@ declare module "libs/reach/feature/content/src/posts/PostGroupSelector" {
10103
10137
  className?: string;
10104
10138
  }>;
10105
10139
  }
10106
- declare module "libs/reach/feature/content/src/posts/PostListItem" {
10107
- import { FC } from 'react';
10108
- import { Post } from "libs/reach/feature/content/src/posts/utils";
10109
- import { Keyword } from "libs/reach/util/common/src/index";
10110
- interface Props {
10111
- post: Post;
10112
- onEditActiveChange?: (isEditMode: boolean) => void;
10113
- onShowCommentsChange?: (showComments: boolean) => void;
10114
- keywordSettings?: {
10115
- availableKeywords?: Keyword[];
10116
- defaultKeywords?: Keyword[];
10117
- mandatoryKeywords?: Keyword[];
10118
- };
10119
- showGroup: boolean;
10120
- onBeforeDelete?: (id: string) => unknown;
10121
- onAfterDelete?: (id: string) => unknown;
10122
- trimContent?: boolean;
10123
- targetUrl?: string;
10124
- postGroupTargetUrl?: string;
10125
- onKeywordClick?: (keywordId: string) => void;
10126
- baseTargetUrl?: string;
10127
- }
10128
- export const PostListItem: FC<Props>;
10129
- }
10130
- declare module "libs/reach/feature/content/src/posts/PostWithSelfThreadHandling" {
10131
- import { FC } from 'react';
10132
- import { Post } from "libs/reach/feature/content/src/index";
10133
- import { Keyword } from "libs/reach/util/common/src/index";
10134
- export const PostWithSelfThreadHandling: FC<{
10135
- post: Post;
10136
- keywordSettings?: {
10137
- availableKeywords?: Keyword[];
10138
- defaultKeywords?: Keyword[];
10139
- mandatoryKeywords?: Keyword[];
10140
- };
10141
- showGroup: boolean;
10142
- onBeforeDelete?: (id: string) => unknown;
10143
- onAfterDelete?: (id: string) => unknown;
10144
- onItemClick?: (postId: string) => unknown;
10145
- targetUrl?: string;
10146
- postGroupTargetUrl?: string;
10147
- trimContent?: boolean;
10148
- onKeywordClick?: (keywordId: string) => void;
10149
- baseTargetUrl?: string;
10150
- }>;
10151
- }
10152
10140
  declare module "libs/reach/feature/content/src/stream/streamUtils" {
10153
10141
  import { AttachmentType, BaseAttachment, Channel, Comment, ConversationScope, CurrentUser, EventCancelInformation, EventItem, EventResponse, GraphQLAttachmentType, Keyword, KnownNewsState, NewsItem, PageItem, PageNavigationContext, PageNavigationNode, PageType, PaginatedList } from "libs/reach/util/common/src/index";
10154
10142
  import { Post } from "libs/reach/feature/content/src/posts/index";
@@ -11885,8 +11873,6 @@ declare module "libs/reach/feature/content/src/posts/index" {
11885
11873
  export * from "libs/reach/feature/content/src/posts/PostDisplay";
11886
11874
  export * from "libs/reach/feature/content/src/posts/PostGroupsPicker";
11887
11875
  export * from "libs/reach/feature/content/src/posts/PostGroupSelector";
11888
- export * from "libs/reach/feature/content/src/posts/PostListItem";
11889
- export * from "libs/reach/feature/content/src/posts/PostWithSelfThreadHandling";
11890
11876
  export * from "libs/reach/feature/content/src/posts/useAttachmentUploader";
11891
11877
  export * from "libs/reach/feature/content/src/posts/useMarkPostsAndCommentsAsRead";
11892
11878
  export * from "libs/reach/feature/content/src/posts/usePostKeywordSettings";
package/package.json CHANGED
@@ -4,6 +4,6 @@
4
4
  "main": "",
5
5
  "types": "./index.d.ts",
6
6
  "license": "ISC",
7
- "version": "0.4.0-preview.903",
7
+ "version": "0.4.0-preview.906",
8
8
  "dependencies": {}
9
9
  }