@livetiles/reach-plugin-types 0.5.0-preview.1044 → 0.5.0-preview.1046

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 +132 -42
  2. package/package.json +1 -1
package/lib/index.d.ts CHANGED
@@ -1724,24 +1724,28 @@ declare module "libs/reach/util/common/src/content/BaseItem" {
1724
1724
  choices: PollQuestionChoice[];
1725
1725
  }
1726
1726
  export interface PollQuestionSettings {
1727
+ allowOtherAnswer?: boolean;
1727
1728
  isMultiChoice?: boolean;
1728
1729
  }
1729
1730
  export interface PollQuestionChoice {
1730
1731
  choiceId: string;
1731
1732
  description?: string;
1732
1733
  disabled?: boolean;
1734
+ isOther?: boolean;
1733
1735
  }
1734
1736
  export interface PollQuestionAnswer {
1735
- questionId: string;
1736
1737
  choiceIds: string[];
1738
+ freeTextAnswer?: string;
1739
+ questionId: string;
1737
1740
  }
1738
1741
  export interface QuestionResult {
1739
- showResults: boolean;
1740
1742
  choiceResults: {
1741
1743
  [choiceId: string]: number;
1742
1744
  };
1743
- userSelectedChoices: string[];
1745
+ freeTextAnswer?: string;
1746
+ showResults: boolean;
1744
1747
  totalFeedbackCount: number;
1748
+ userSelectedChoices: string[];
1745
1749
  }
1746
1750
  export interface PollResult {
1747
1751
  totalFeedbackCount?: number;
@@ -7858,8 +7862,8 @@ declare module "libs/reach/feature/content/src/common/detail/events/EventPathCon
7858
7862
  }>;
7859
7863
  }
7860
7864
  declare module "libs/reach/feature/content/src/common/detail/events/controls/EventMetaInfo" {
7861
- import { Channel, EventItem, EventLocation } from "libs/reach/util/common/src/index";
7862
7865
  import { FC } from 'react';
7866
+ import { Channel, EventItem, EventLocation } from "libs/reach/util/common/src/index";
7863
7867
  export const EventLocationInfo: FC<{
7864
7868
  className?: string;
7865
7869
  itemId: string;
@@ -9641,6 +9645,7 @@ declare module "libs/reach/feature/content/src/feedback/PollUserContext" {
9641
9645
  questions: PollQuestion[];
9642
9646
  answers: PollQuestionAnswer[];
9643
9647
  addAnswer: (questionId: string, selectedChoiceIds: string[]) => unknown;
9648
+ addFreeTextAnswer: (questionId: string, freeTextAnswer: string | null) => void;
9644
9649
  setAnswers: (answers: PollQuestionAnswer[]) => unknown;
9645
9650
  hasMissingAnswers: boolean;
9646
9651
  hasMissingUnsavedAnswer: boolean;
@@ -11752,6 +11757,20 @@ declare module "libs/reach/feature/content/src/reach-2/buttons/ButtonWithMenu" {
11752
11757
  const ButtonWithMenu: FC<ButtonWithMenuProps>;
11753
11758
  export default ButtonWithMenu;
11754
11759
  }
11760
+ declare module "libs/reach/feature/content/src/reach-2/buttons/feedback/BaseLikeButton" {
11761
+ import { FC } from 'react';
11762
+ import { ItemResourceTypes } from "libs/reach/util/common/src/index";
11763
+ export const BaseLikeButton: FC<{
11764
+ itemId: string;
11765
+ itemType: ItemResourceTypes;
11766
+ isLiked?: boolean;
11767
+ likeCount?: number;
11768
+ disabled?: boolean;
11769
+ onLike?: (isNowLiked: boolean) => void;
11770
+ isVertical?: boolean;
11771
+ className?: string;
11772
+ }>;
11773
+ }
11755
11774
  declare module "libs/reach/feature/content/src/reach-2/common/feedback/ItemFeedbackMetadataContextProvider" {
11756
11775
  import { FeedbackSettings, ItemResourceTypes, PublishableItem } from "libs/reach/util/common/src/index";
11757
11776
  import { FC } from 'react';
@@ -11785,16 +11804,16 @@ declare module "libs/reach/feature/content/src/reach-2/buttons/feedback/Bookmark
11785
11804
  export const BookmarkButton: FC<BookmarkListItemProps>;
11786
11805
  }
11787
11806
  declare module "libs/reach/feature/content/src/reach-2/common/editor/CommentRichTextEditor" {
11788
- import { FC } from 'react';
11789
11807
  import { Editor } from '@tiptap/react';
11808
+ import { FC } from 'react';
11790
11809
  export interface CommentRichTextEditorStyles {
11791
- minHeight?: number;
11792
11810
  maxHeight?: number;
11811
+ minHeight?: number;
11793
11812
  }
11794
11813
  const CommentRichTextEditor: FC<{
11814
+ className?: string;
11795
11815
  editor: Editor;
11796
11816
  styles?: CommentRichTextEditorStyles;
11797
- className?: string;
11798
11817
  }>;
11799
11818
  export default CommentRichTextEditor;
11800
11819
  }
@@ -12189,20 +12208,6 @@ declare module "libs/reach/feature/content/src/reach-2/comments/CommentHeader" {
12189
12208
  readOnly?: boolean;
12190
12209
  }>;
12191
12210
  }
12192
- declare module "libs/reach/feature/content/src/reach-2/buttons/feedback/BaseLikeButton" {
12193
- import { FC } from 'react';
12194
- import { ItemResourceTypes } from "libs/reach/util/common/src/index";
12195
- export const BaseLikeButton: FC<{
12196
- itemId: string;
12197
- itemType: ItemResourceTypes;
12198
- isLiked?: boolean;
12199
- likeCount?: number;
12200
- disabled?: boolean;
12201
- onLike?: (isNowLiked: boolean) => void;
12202
- isVertical?: boolean;
12203
- className?: string;
12204
- }>;
12205
- }
12206
12211
  declare module "libs/reach/feature/content/src/reach-2/comments/CommentLikeButton" {
12207
12212
  import { FC } from 'react';
12208
12213
  export const CommentLikeButton: FC<{
@@ -12495,63 +12500,146 @@ declare module "libs/reach/feature/content/src/reach-2/comments/index" {
12495
12500
  export * from "libs/reach/feature/content/src/reach-2/comments/useCommentsQuery";
12496
12501
  export * from "libs/reach/feature/content/src/reach-2/comments/useTransformedCommentContent";
12497
12502
  }
12498
- declare module "libs/reach/feature/content/src/reach-2/common/snippets/common/publication-card/components/comment/comment-editor/components/Footer" {
12503
+ declare module "libs/reach/feature/content/src/reach-2/common/snippets/common/publication-card/components/comment/utils" {
12504
+ export enum TextStylingOptions {
12505
+ EmojiOverlay = 0,
12506
+ MentionOverlay = 1,
12507
+ None = 2,
12508
+ TextFormatting = 3
12509
+ }
12510
+ export const ExpandCollapseEffect: (isCollapsed: boolean, maxHeight: number) => import("styled-components").FlattenSimpleInterpolation;
12511
+ }
12512
+ declare module "libs/reach/feature/content/src/reach-2/common/snippets/common/publication-card/components/comment/comment-editor/CommentEditorFooter" {
12499
12513
  import { FC } from 'react';
12500
- import { TextStylingOptions } from "libs/reach/feature/content/src/reach-2/common/snippets/common/publication-card/components/comment/comment-editor/CommentEditor";
12501
- interface IFooterProps {
12514
+ import { TextStylingOptions } from "libs/reach/feature/content/src/reach-2/common/snippets/common/publication-card/components/comment/utils";
12515
+ interface ICommentEditorFooterProps {
12502
12516
  editorCharacterLimit: number;
12503
12517
  getCharacterCount: () => number;
12518
+ isCollapsed: boolean;
12519
+ isSaving?: boolean;
12504
12520
  onSave: () => void;
12505
12521
  onClickButton: (option: TextStylingOptions) => void;
12506
12522
  shouldShowTextFormatting: boolean;
12507
12523
  showTextStylingOptions: TextStylingOptions;
12508
12524
  }
12509
- const Footer: FC<IFooterProps>;
12510
- export default Footer;
12525
+ const CommentEditorFooter: FC<ICommentEditorFooterProps>;
12526
+ export default CommentEditorFooter;
12511
12527
  }
12512
- declare module "libs/reach/feature/content/src/reach-2/common/snippets/common/publication-card/components/comment/comment-editor/components/Header" {
12528
+ declare module "libs/reach/feature/content/src/reach-2/common/snippets/common/publication-card/components/comment/comment-editor/CommentEditorHeader" {
12513
12529
  import { FC } from 'react';
12514
- const Header: FC;
12515
- export default Header;
12530
+ interface ICommentEditorHeaderProps {
12531
+ isCollapsed: boolean;
12532
+ onCancel: () => void;
12533
+ }
12534
+ const CommentEditorHeader: FC<ICommentEditorHeaderProps>;
12535
+ export default CommentEditorHeader;
12516
12536
  }
12517
- declare module "libs/reach/feature/content/src/reach-2/common/snippets/common/publication-card/components/comment/comment-editor/components/Main" {
12537
+ declare module "libs/reach/feature/content/src/reach-2/common/snippets/common/publication-card/components/comment/comment-editor/CommentEditorMain" {
12518
12538
  import { Account } from "libs/reach/util/common/src/index";
12519
12539
  import { Editor } from '@tiptap/react';
12520
12540
  import { FC } from 'react';
12521
- import { TextStylingOptions } from "libs/reach/feature/content/src/reach-2/common/snippets/common/publication-card/components/comment/comment-editor/CommentEditor";
12522
- interface IMainProps {
12541
+ import { TextStylingOptions } from "libs/reach/feature/content/src/reach-2/common/snippets/common/publication-card/components/comment/utils";
12542
+ interface ICommentEditorMainProps {
12523
12543
  editor: Editor;
12524
12544
  getMentionsSearchHandler: (searchText: string) => Promise<Account[]>;
12545
+ isCollapsed: boolean;
12525
12546
  setShowTextStylingOptions: (option: TextStylingOptions) => void;
12526
12547
  shouldShowOverlay: boolean;
12527
12548
  shouldShowTextFormatting: boolean;
12528
12549
  showTextStylingOptions: TextStylingOptions;
12529
12550
  }
12530
- const Main: FC<IMainProps>;
12531
- export default Main;
12551
+ const CommentEditorMain: FC<ICommentEditorMainProps>;
12552
+ export default CommentEditorMain;
12532
12553
  }
12533
12554
  declare module "libs/reach/feature/content/src/reach-2/common/snippets/common/publication-card/components/comment/comment-editor/CommentEditor" {
12534
12555
  import { Comment } from "libs/reach/util/common/src/index";
12535
12556
  import { FC } from 'react';
12536
- export enum TextStylingOptions {
12537
- None = 0,
12538
- EmojiOverlay = 1,
12539
- MentionOverlay = 2,
12540
- TextFormatting = 3
12541
- }
12542
12557
  interface ICommentEditorProps {
12543
- className?: string;
12544
12558
  comment?: Comment;
12559
+ isCollapsed?: boolean;
12560
+ isSaving?: boolean;
12561
+ onCancel?: () => void;
12562
+ onFocus?: () => void;
12563
+ onSave: (newContent: {
12564
+ content?: string;
12565
+ formattedContent?: string;
12566
+ }, clearContent: () => void) => Promise<void>;
12545
12567
  parentItemId: string;
12546
12568
  placeholder?: string;
12547
12569
  }
12548
12570
  const CommentEditor: FC<ICommentEditorProps>;
12549
12571
  export default CommentEditor;
12550
12572
  }
12573
+ declare module "libs/reach/feature/content/src/reach-2/common/snippets/common/publication-card/components/comment/comment-display/CommentDisplayContent" {
12574
+ import { FC } from 'react';
12575
+ interface ICommentContentProps {
12576
+ content: string;
12577
+ formattedContent: string;
12578
+ }
12579
+ const CommentContent: FC<ICommentContentProps>;
12580
+ export default CommentContent;
12581
+ }
12582
+ declare module "libs/reach/feature/content/src/reach-2/common/snippets/common/publication-card/components/comment/comment-display/CommentDisplayHeader" {
12583
+ import { Account } from "libs/reach/util/common/src/index";
12584
+ import { FC } from 'react';
12585
+ interface ICommentHeaderProps {
12586
+ modifiedTime: string;
12587
+ onDelete: () => void;
12588
+ onEdit: () => void;
12589
+ receivedDateTime: string;
12590
+ sender: Account;
12591
+ }
12592
+ const CommentHeader: FC<ICommentHeaderProps>;
12593
+ export default CommentHeader;
12594
+ }
12595
+ declare module "libs/reach/feature/content/src/reach-2/common/snippets/common/publication-card/components/comment/comment-display/CommentDisplayMetaData" {
12596
+ import { Comment } from "libs/reach/util/common/src/index";
12597
+ import { FC } from 'react';
12598
+ interface ICommentMetadataProps {
12599
+ comment: Comment;
12600
+ onReply: () => void;
12601
+ }
12602
+ const CommentMetadata: FC<ICommentMetadataProps>;
12603
+ export default CommentMetadata;
12604
+ }
12605
+ declare module "libs/reach/feature/content/src/reach-2/common/snippets/common/publication-card/components/comment/comment-display/CommentDisplay" {
12606
+ import { Comment } from "libs/reach/util/common/src/index";
12607
+ import { FC } from 'react';
12608
+ interface ICommentDisplayProps {
12609
+ comment: Comment;
12610
+ onEdit: () => void;
12611
+ onDelete: () => void;
12612
+ onReply: () => void;
12613
+ }
12614
+ const CommentDisplay: FC<ICommentDisplayProps>;
12615
+ export default CommentDisplay;
12616
+ }
12617
+ declare module "libs/reach/feature/content/src/reach-2/common/snippets/common/publication-card/components/comment/CommentListItem" {
12618
+ import { CommentWithReplies } from "libs/reach/feature/content/src/index";
12619
+ import { Comment } from "libs/reach/util/common/src/index";
12620
+ import { FC } from 'react';
12621
+ interface CommentItemProps {
12622
+ comment: CommentWithReplies;
12623
+ isEditMode: boolean;
12624
+ isSaving: boolean;
12625
+ onCommentDeleted: (comment: Comment) => Promise<void>;
12626
+ onCommentUpdated: (comment: Comment, newContent: {
12627
+ content?: string;
12628
+ formattedContent?: string;
12629
+ }) => Promise<void>;
12630
+ onEdit: (isEditMode?: boolean) => void;
12631
+ onReply: () => void;
12632
+ parentItemId: string;
12633
+ }
12634
+ const CommentListItem: FC<CommentItemProps>;
12635
+ export default CommentListItem;
12636
+ }
12551
12637
  declare module "libs/reach/feature/content/src/reach-2/common/snippets/common/publication-card/components/comment/CommentsList" {
12552
12638
  import { FC } from 'react';
12553
12639
  interface ICommentsListProps {
12554
12640
  itemId: string;
12641
+ refetchItem: (itemId: string) => Promise<void>;
12642
+ totalComments: number;
12555
12643
  }
12556
12644
  const CommentsList: FC<ICommentsListProps>;
12557
12645
  export default CommentsList;
@@ -12559,8 +12647,8 @@ declare module "libs/reach/feature/content/src/reach-2/common/snippets/common/pu
12559
12647
  declare module "libs/reach/feature/content/src/reach-2/common/snippets/common/publication-card/components/Footer" {
12560
12648
  import { PostStreamItem } from "libs/reach/feature/content/src/stream/index";
12561
12649
  interface IFooterProps {
12562
- commentCount?: number;
12563
12650
  item: PostStreamItem;
12651
+ refetchItem: (itemId: string) => Promise<void>;
12564
12652
  }
12565
12653
  const Footer: React.FC<IFooterProps>;
12566
12654
  export default Footer;
@@ -12592,6 +12680,7 @@ declare module "libs/reach/feature/content/src/reach-2/common/snippets/common/pu
12592
12680
  interface IPublicationCardProps {
12593
12681
  item: PostStreamItem;
12594
12682
  onEdit: () => void;
12683
+ refetchItem: (itemId: string) => Promise<void>;
12595
12684
  refreshList: () => Promise<void>;
12596
12685
  }
12597
12686
  const PublicationCard: React.FC<IPublicationCardProps>;
@@ -12640,6 +12729,7 @@ declare module "libs/reach/feature/content/src/reach-2/buttons/feedback/ShareBut
12640
12729
  export const ShareButton: import("react").ForwardRefExoticComponent<IShareButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
12641
12730
  }
12642
12731
  declare module "libs/reach/feature/content/src/reach-2/buttons/feedback/index" {
12732
+ export * from "libs/reach/feature/content/src/reach-2/buttons/feedback/BaseLikeButton";
12643
12733
  export * from "libs/reach/feature/content/src/reach-2/buttons/feedback/BookmarkButton";
12644
12734
  export * from "libs/reach/feature/content/src/reach-2/buttons/feedback/CommentButton";
12645
12735
  export * from "libs/reach/feature/content/src/reach-2/buttons/feedback/ItemLikeButton";
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.1044",
7
+ "version": "0.5.0-preview.1046",
8
8
  "dependencies": {}
9
9
  }