@livetiles/reach-plugin-types 0.5.0-preview.653 → 0.5.0-preview.656

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 +143 -86
  2. package/package.json +1 -1
package/lib/index.d.ts CHANGED
@@ -7658,10 +7658,14 @@ declare module "libs/reach/feature/content/src/comments/useCommentsPageLoader" {
7658
7658
  type commentType = Comment & {
7659
7659
  isNewComment?: boolean;
7660
7660
  };
7661
+ type nextPageInfosType = {
7662
+ token: string;
7663
+ hasMoreUnreadComments?: boolean;
7664
+ };
7661
7665
  type isLoadingType = boolean;
7662
7666
  type hasNextPageType = boolean;
7663
7667
  type loadNextPageType = () => unknown;
7664
- type setCommentsType = (updateComments: (prevComments: commentType[]) => commentType[]) => unknown;
7668
+ type setCommentsType = (updateComments: (prevComments: commentType[]) => commentType[], updateNextPageInfos?: (prevNextPageInfos: nextPageInfosType) => nextPageInfosType) => unknown;
7665
7669
  type hasMoreUnreadCommentsType = boolean;
7666
7670
  export function useCommentsPageLoader(type: ItemResourceTypes, scope: ConversationScope, itemId: string, pageSize: number, initialPageSize: number, initialComments?: PaginatedList<commentType>, preventLoading?: boolean, threadId?: string, shouldNotRefreshUserDetails?: boolean, shouldNotReverseOrder?: boolean): [
7667
7671
  commentType[],
@@ -10387,70 +10391,6 @@ declare module "libs/reach/feature/content/src/reach-2/buttons/feedback/Bookmark
10387
10391
  className?: string;
10388
10392
  }>;
10389
10393
  }
10390
- declare module "libs/reach/feature/content/src/reach-2/buttons/feedback/ContextMenuButton" {
10391
- import { FC } from 'react';
10392
- export const ContextMenuButton: FC<{
10393
- buttons: (dismiss: () => void) => JSX.Element;
10394
- onDismiss?: () => void;
10395
- size?: number;
10396
- disabled?: boolean;
10397
- className?: string;
10398
- }>;
10399
- }
10400
- declare module "libs/reach/feature/content/src/reach-2/comments/CommentHeader" {
10401
- import { FC } from 'react';
10402
- import { Account } from "libs/reach/util/common/src/index";
10403
- export const CommentHeader: FC<{
10404
- sender: Account;
10405
- receivedDateTime: string;
10406
- modifiedTime?: string;
10407
- onEdit?: () => void;
10408
- onDelete?: () => void;
10409
- readonly?: boolean;
10410
- }>;
10411
- }
10412
- declare module "libs/reach/feature/content/src/reach-2/buttons/feedback/BaseLikeButton" {
10413
- import { FC } from 'react';
10414
- import { ItemResourceTypes } from "libs/reach/util/common/src/index";
10415
- export const BaseLikeButton: FC<{
10416
- itemId: string;
10417
- itemType: ItemResourceTypes;
10418
- isLiked?: boolean;
10419
- likeCount?: number;
10420
- disabled?: boolean;
10421
- onLike?: (isNowLiked: boolean) => void;
10422
- isVertical?: boolean;
10423
- className?: string;
10424
- }>;
10425
- }
10426
- declare module "libs/reach/feature/content/src/reach-2/comments/CommentLikeButton" {
10427
- import { FC } from 'react';
10428
- export const CommentLikeButton: FC<{
10429
- commentId: string;
10430
- isLiked?: boolean;
10431
- likeCount?: number;
10432
- }>;
10433
- }
10434
- declare module "libs/reach/feature/content/src/reach-2/comments/CommentMetadata" {
10435
- import { FC } from 'react';
10436
- import { Comment } from "libs/reach/util/common/src/index";
10437
- export const CommentMetadata: FC<{
10438
- comment: Comment;
10439
- }>;
10440
- }
10441
- declare module "libs/reach/feature/content/src/reach-2/comments/RichTextEditor" {
10442
- import { FC } from 'react';
10443
- import { Editor } from '@tiptap/react';
10444
- export interface RichTextEditorStyles {
10445
- minHeight?: number;
10446
- maxHeight?: number;
10447
- }
10448
- export const RichTextEditor: FC<{
10449
- editor: Editor;
10450
- styles?: RichTextEditorStyles;
10451
- className?: string;
10452
- }>;
10453
- }
10454
10394
  declare module "libs/reach/feature/content/src/reach-2/comments/EnhancedRichTextEditor" {
10455
10395
  import { FC } from 'react';
10456
10396
  import { Editor } from '@tiptap/react';
@@ -10469,27 +10409,22 @@ declare module "libs/reach/feature/content/src/reach-2/comments/EnhancedRichText
10469
10409
  className?: string;
10470
10410
  }>;
10471
10411
  }
10472
- declare module "libs/reach/feature/content/src/reach-2/comments/CommentContent" {
10473
- import { FC } from 'react';
10474
- export const CommentContent: FC<{
10475
- content: string;
10476
- className?: string;
10477
- }>;
10412
+ declare module "libs/reach/feature/content/src/reach-2/comments/useTransformedCommentContent" {
10413
+ export function useTransformedCommentContent(commentContent?: string): string;
10478
10414
  }
10479
- declare module "libs/reach/feature/content/src/reach-2/comments/CommentDisplay" {
10415
+ declare module "libs/reach/feature/content/src/reach-2/comments/RichTextEditor" {
10480
10416
  import { FC } from 'react';
10481
- import { Comment } from "libs/reach/util/common/src/index";
10482
- export const CommentDisplay: FC<{
10483
- comment: Comment;
10484
- onEdit?: () => void;
10485
- onDelete?: () => void;
10486
- readonly?: boolean;
10417
+ import { Editor } from '@tiptap/react';
10418
+ export interface RichTextEditorStyles {
10419
+ minHeight?: number;
10420
+ maxHeight?: number;
10421
+ }
10422
+ export const RichTextEditor: FC<{
10423
+ editor: Editor;
10424
+ styles?: RichTextEditorStyles;
10487
10425
  className?: string;
10488
10426
  }>;
10489
10427
  }
10490
- declare module "libs/reach/feature/content/src/reach-2/comments/useTransformedCommentContent" {
10491
- export function useTransformedCommentContent(commentContent?: string): string;
10492
- }
10493
10428
  declare module "libs/reach/feature/content/src/reach-2/comments/CommentFormattingToolbar" {
10494
10429
  import { FC } from 'react';
10495
10430
  import { Editor } from '@tiptap/react';
@@ -10520,13 +10455,11 @@ declare module "libs/reach/feature/content/src/reach-2/comments/CommentEditor" {
10520
10455
  }
10521
10456
  declare module "libs/reach/feature/content/src/reach-2/comments/CommentCreator" {
10522
10457
  import { FC } from 'react';
10523
- import { Comment, ConversationScope } from "libs/reach/util/common/src/index";
10524
10458
  export const CommentCreator: FC<{
10525
- parentItemId: string;
10526
- scope: ConversationScope;
10527
- onCommentAdded: (newComment: Comment) => Promise<void>;
10459
+ onSave: (newContent: string) => Promise<void>;
10528
10460
  onToggleEditor?: (showEditor: boolean) => void;
10529
10461
  alwaysShowCommentEditor?: boolean;
10462
+ alwaysExpandEditor?: boolean;
10530
10463
  isMobile?: boolean;
10531
10464
  className?: string;
10532
10465
  }>;
@@ -10548,6 +10481,8 @@ declare module "libs/reach/feature/content/src/reach-2/comments/useCommentsQuery
10548
10481
  updateCommentFromState: (commentId: string, updateFn: (item: CommentWithReplies<TItem>) => CommentWithReplies<TItem>) => void;
10549
10482
  removeCommentFromState: (commentId: string) => void;
10550
10483
  addCommentToState: (newComment: CommentWithReplies<TItem>) => void;
10484
+ addCommentReplyToState: (threadId: string, newCommentReply: Comment) => void;
10485
+ updateCommentReplyFromState: (threadId: string, commentReplyId: string, updateFn: (item: Comment) => Comment) => void;
10551
10486
  data: undefined;
10552
10487
  error: unknown;
10553
10488
  isError: true;
@@ -10583,6 +10518,8 @@ declare module "libs/reach/feature/content/src/reach-2/comments/useCommentsQuery
10583
10518
  updateCommentFromState: (commentId: string, updateFn: (item: CommentWithReplies<TItem>) => CommentWithReplies<TItem>) => void;
10584
10519
  removeCommentFromState: (commentId: string) => void;
10585
10520
  addCommentToState: (newComment: CommentWithReplies<TItem>) => void;
10521
+ addCommentReplyToState: (threadId: string, newCommentReply: Comment) => void;
10522
+ updateCommentReplyFromState: (threadId: string, commentReplyId: string, updateFn: (item: Comment) => Comment) => void;
10586
10523
  data: undefined;
10587
10524
  error: null;
10588
10525
  isError: false;
@@ -10618,6 +10555,8 @@ declare module "libs/reach/feature/content/src/reach-2/comments/useCommentsQuery
10618
10555
  updateCommentFromState: (commentId: string, updateFn: (item: CommentWithReplies<TItem>) => CommentWithReplies<TItem>) => void;
10619
10556
  removeCommentFromState: (commentId: string) => void;
10620
10557
  addCommentToState: (newComment: CommentWithReplies<TItem>) => void;
10558
+ addCommentReplyToState: (threadId: string, newCommentReply: Comment) => void;
10559
+ updateCommentReplyFromState: (threadId: string, commentReplyId: string, updateFn: (item: Comment) => Comment) => void;
10621
10560
  data: InfiniteData<CommentQueryResult<CommentWithReplies<TItem>>>;
10622
10561
  error: unknown;
10623
10562
  isError: true;
@@ -10653,6 +10592,8 @@ declare module "libs/reach/feature/content/src/reach-2/comments/useCommentsQuery
10653
10592
  updateCommentFromState: (commentId: string, updateFn: (item: CommentWithReplies<TItem>) => CommentWithReplies<TItem>) => void;
10654
10593
  removeCommentFromState: (commentId: string) => void;
10655
10594
  addCommentToState: (newComment: CommentWithReplies<TItem>) => void;
10595
+ addCommentReplyToState: (threadId: string, newCommentReply: Comment) => void;
10596
+ updateCommentReplyFromState: (threadId: string, commentReplyId: string, updateFn: (item: Comment) => Comment) => void;
10656
10597
  data: InfiniteData<CommentQueryResult<CommentWithReplies<TItem>>>;
10657
10598
  error: null;
10658
10599
  isError: false;
@@ -10686,6 +10627,77 @@ declare module "libs/reach/feature/content/src/reach-2/comments/useCommentsQuery
10686
10627
  fetchStatus: import("@tanstack/react-query").FetchStatus;
10687
10628
  };
10688
10629
  }
10630
+ declare module "libs/reach/feature/content/src/reach-2/buttons/feedback/ContextMenuButton" {
10631
+ import { FC } from 'react';
10632
+ export const ContextMenuButton: FC<{
10633
+ buttons: (dismiss: () => void) => JSX.Element;
10634
+ onDismiss?: () => void;
10635
+ size?: number;
10636
+ disabled?: boolean;
10637
+ className?: string;
10638
+ }>;
10639
+ }
10640
+ declare module "libs/reach/feature/content/src/reach-2/comments/CommentHeader" {
10641
+ import { FC } from 'react';
10642
+ import { Account } from "libs/reach/util/common/src/index";
10643
+ export const CommentHeader: FC<{
10644
+ sender: Account;
10645
+ receivedDateTime: string;
10646
+ modifiedTime?: string;
10647
+ onEdit?: () => void;
10648
+ onDelete?: () => void;
10649
+ readonly?: boolean;
10650
+ }>;
10651
+ }
10652
+ declare module "libs/reach/feature/content/src/reach-2/buttons/feedback/BaseLikeButton" {
10653
+ import { FC } from 'react';
10654
+ import { ItemResourceTypes } from "libs/reach/util/common/src/index";
10655
+ export const BaseLikeButton: FC<{
10656
+ itemId: string;
10657
+ itemType: ItemResourceTypes;
10658
+ isLiked?: boolean;
10659
+ likeCount?: number;
10660
+ disabled?: boolean;
10661
+ onLike?: (isNowLiked: boolean) => void;
10662
+ isVertical?: boolean;
10663
+ className?: string;
10664
+ }>;
10665
+ }
10666
+ declare module "libs/reach/feature/content/src/reach-2/comments/CommentLikeButton" {
10667
+ import { FC } from 'react';
10668
+ export const CommentLikeButton: FC<{
10669
+ commentId: string;
10670
+ isLiked?: boolean;
10671
+ likeCount?: number;
10672
+ }>;
10673
+ }
10674
+ declare module "libs/reach/feature/content/src/reach-2/comments/CommentMetadata" {
10675
+ import { FC } from 'react';
10676
+ import { Comment } from "libs/reach/util/common/src/index";
10677
+ export const CommentMetadata: FC<{
10678
+ comment: Comment;
10679
+ onReply?: () => void;
10680
+ }>;
10681
+ }
10682
+ declare module "libs/reach/feature/content/src/reach-2/comments/CommentContent" {
10683
+ import { FC } from 'react';
10684
+ export const CommentContent: FC<{
10685
+ content: string;
10686
+ className?: string;
10687
+ }>;
10688
+ }
10689
+ declare module "libs/reach/feature/content/src/reach-2/comments/CommentDisplay" {
10690
+ import { FC } from 'react';
10691
+ import { Comment } from "libs/reach/util/common/src/index";
10692
+ export const CommentDisplay: FC<{
10693
+ comment: Comment;
10694
+ onEdit?: () => void;
10695
+ onDelete?: () => void;
10696
+ readonly?: boolean;
10697
+ onReply?: () => void;
10698
+ className?: string;
10699
+ }>;
10700
+ }
10689
10701
  declare module "libs/reach/feature/content/src/reach-2/comments/RepliesList" {
10690
10702
  import { FC } from 'react';
10691
10703
  import { Comment, ConversationScope, ItemResourceTypes, PaginatedList } from "libs/reach/util/common/src/index";
@@ -10696,9 +10708,29 @@ declare module "libs/reach/feature/content/src/reach-2/comments/RepliesList" {
10696
10708
  threadId: string;
10697
10709
  initialReplies?: PaginatedList<Comment>;
10698
10710
  replyCount?: number;
10711
+ isReplyInputShown?: boolean;
10712
+ onReplyInputClose?: () => void;
10713
+ isMobile?: boolean;
10699
10714
  }
10700
10715
  export const RepliesList: FC<RepliesListProps>;
10701
10716
  }
10717
+ declare module "libs/reach/feature/content/src/reach-2/comments/CommentListItem" {
10718
+ import { FC } from 'react';
10719
+ import { CommentWithReplies } from "libs/reach/feature/content/src/reach-2/comments/useCommentsQuery";
10720
+ import { Comment, ConversationScope, ItemResourceTypes } from "libs/reach/util/common/src/index";
10721
+ interface CommentItemProps {
10722
+ comment: CommentWithReplies;
10723
+ onCommentDeleted: () => Promise<void>;
10724
+ onCommentUpdated: (comment: Comment, newContent: string) => Promise<void>;
10725
+ onToggleEditor?: () => void;
10726
+ isMobile?: boolean;
10727
+ }
10728
+ export const CommentListItem: FC<CommentItemProps & {
10729
+ parentItemId: string;
10730
+ itemResourceType: ItemResourceTypes;
10731
+ scope: ConversationScope;
10732
+ }>;
10733
+ }
10702
10734
  declare module "libs/reach/feature/content/src/reach-2/comments/CommentsList" {
10703
10735
  import { FC } from 'react';
10704
10736
  import { ConversationScope, ItemResourceTypes } from "libs/reach/util/common/src/index";
@@ -11266,7 +11298,32 @@ declare module "apps/reach-app/src/app/admin/customization/Favicon" {
11266
11298
  }
11267
11299
  declare module "apps/reach-app/src/app/admin/customization/EmailNotificationItem" {
11268
11300
  import { FC } from 'react';
11269
- export const EmailNotificationItem: FC;
11301
+ export type NotificationSetting = {
11302
+ option: Option;
11303
+ url?: string;
11304
+ error?: Error;
11305
+ };
11306
+ export enum ItemType {
11307
+ News = 0,
11308
+ Posts = 1,
11309
+ Pages = 2,
11310
+ Events = 3
11311
+ }
11312
+ export enum Option {
11313
+ Reach = "reach",
11314
+ Custom = "custom"
11315
+ }
11316
+ export enum Error {
11317
+ Empty = "empty",
11318
+ Invalid = "invalid"
11319
+ }
11320
+ export const EmailNotificationItem: FC<{
11321
+ id: ItemType;
11322
+ name: string;
11323
+ notificationSetting?: NotificationSetting;
11324
+ handleError: (itemType: ItemType, error: Error) => void;
11325
+ onChange: (itemType: ItemType, option: Option, url?: string) => void;
11326
+ }>;
11270
11327
  }
11271
11328
  declare module "apps/reach-app/src/app/admin/customization/EmailNotifications" {
11272
11329
  import { FC } from 'react';
package/package.json CHANGED
@@ -4,6 +4,6 @@
4
4
  "main": "",
5
5
  "types": "./index.d.ts",
6
6
  "license": "ISC",
7
- "version": "0.5.0-preview.653",
7
+ "version": "0.5.0-preview.656",
8
8
  "dependencies": {}
9
9
  }