@livetiles/reach-components-react 0.4.0-preview.661 → 0.4.0-preview.664

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.
package/NewsEditor.d.ts CHANGED
@@ -1,8 +1,5 @@
1
1
  import { FC } from 'react';
2
2
  export interface NewsEditorProps {
3
- newsId?: string;
4
- groupId?: string;
5
- onSuccessfulCreate?: (itemId: string) => void;
6
3
  className?: string;
7
4
  }
8
5
  export declare const NewsEditor: FC<NewsEditorProps>;
@@ -0,0 +1,6 @@
1
+ import { FC } from 'react';
2
+ export declare const NewsEditorContextProvider: FC<{
3
+ itemId?: string;
4
+ groupId?: string;
5
+ onSuccessfulCreate?: (itemId: string) => void;
6
+ }>;
@@ -0,0 +1,2 @@
1
+ import { FC } from 'react';
2
+ export declare const NewsEditorToolbarStateActions: FC;
@@ -0,0 +1,11 @@
1
+ import { Post } from '@livetiles/reach/feature/content';
2
+ import { FC } from 'react';
3
+ export interface PostInputBoxProps {
4
+ groupId: string;
5
+ onBeforeSave: (post: Post) => void;
6
+ onAfterSave: (post: Post) => void;
7
+ disableDragAndDrop?: boolean;
8
+ disableAutoFocus?: boolean;
9
+ className?: string;
10
+ }
11
+ export declare const PostInputBox: FC<PostInputBoxProps>;
package/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { FC, ReactNode } from 'react';
2
- import { IDialogProps, IDropdownOption, IPersonaProps, IContextualMenuItem } from 'office-ui-fabric-react';
2
+ import { IDialogProps, IDropdownOption, IPersonaProps } from 'office-ui-fabric-react';
3
3
  import * as styled_components from 'styled-components';
4
4
 
5
5
  declare type ReachContextProps = {
@@ -51,6 +51,14 @@ interface PostDetailProps {
51
51
  }
52
52
  declare const PostDetail: FC<PostDetailProps>;
53
53
 
54
+ interface PaginatedList<TItem> {
55
+ items: TItem[];
56
+ paginationToken?: any;
57
+ nextItem?: TItem;
58
+ hasMoreUnreadComments?: boolean;
59
+ hasNextPage?: boolean;
60
+ }
61
+
54
62
  declare enum AuthenticationType {
55
63
  unknown = 0,
56
64
  azuread = 1,
@@ -560,6 +568,63 @@ interface ChoiceTranslations {
560
568
 
561
569
  declare function useCurrentUser(): CurrentUser;
562
570
 
571
+ declare enum AttachmentType {
572
+ Image = 0,
573
+ File = 1,
574
+ YouTubeVideo = 2,
575
+ VimeoVideo = 3,
576
+ News = 4,
577
+ Event = 5,
578
+ Page = 6,
579
+ Post = 7,
580
+ Giphy = 8
581
+ }
582
+ interface BaseAttachment {
583
+ id: string;
584
+ filename?: string;
585
+ previewUrl?: string;
586
+ url?: string;
587
+ isUploadInProgress?: boolean;
588
+ hasError?: boolean;
589
+ width?: number;
590
+ height?: number;
591
+ }
592
+ interface Attachment extends BaseAttachment {
593
+ type: AttachmentType;
594
+ }
595
+
596
+ interface ItemWithAttachments {
597
+ attachments?: Attachment[];
598
+ fileAccessToken?: string;
599
+ attachmentContainerId?: string;
600
+ }
601
+
602
+ interface Comment extends ItemWithAttachments {
603
+ id: string;
604
+ parentItemId: string;
605
+ content: string;
606
+ contentLanguageCode?: string;
607
+ receivedDateTime: string;
608
+ sender: Account;
609
+ conversationScope: ConversationScope;
610
+ modified?: string;
611
+ statistics?: CommentStatistics;
612
+ isLiked?: boolean;
613
+ threadId?: string;
614
+ isUnread?: boolean;
615
+ hasUnreadReplies?: boolean;
616
+ isDemoContent?: boolean;
617
+ }
618
+ interface CommentStatistics {
619
+ likeCount?: number;
620
+ replyCount?: number;
621
+ }
622
+ declare enum ConversationScope {
623
+ Public = 0,
624
+ Editor = 1,
625
+ Posts = 2
626
+ }
627
+
563
628
  declare enum ItemResourceTypes {
564
629
  News = "news",
565
630
  Pages = "pages",
@@ -859,6 +924,26 @@ interface KeywordPickerProps {
859
924
  }
860
925
  declare const ScrollableKeywordPicker: styled_components.StyledComponent<FC<KeywordPickerProps>, styled_components.DefaultTheme, {}, never>;
861
926
 
927
+ interface Post extends BaseItem, ItemWithAttachments {
928
+ id: string;
929
+ comments?: PaginatedList<Comment>;
930
+ groupId: string;
931
+ content: string;
932
+ permalink?: string;
933
+ author: Account;
934
+ publishingDate: string;
935
+ modified?: string;
936
+ statistics: ItemStatistics;
937
+ keywords?: {
938
+ [key: string]: Keyword[];
939
+ };
940
+ contentLanguageCode?: string;
941
+ isLiked?: boolean;
942
+ isUnread?: boolean;
943
+ isDemoContent?: boolean;
944
+ isFollowing?: boolean;
945
+ }
946
+
862
947
  interface LibNewsFilterDefinition extends Omit<NewsFilterDefinition, 'channels' | 'keywords'> {
863
948
  channels?: string | FilterWithLogicalOperator;
864
949
  keywords?: string | FilterWithLogicalOperator;
@@ -1057,9 +1142,6 @@ declare const ToolbarFilterSearch: styled_components.StyledComponent<FC<{
1057
1142
  }>, styled_components.DefaultTheme, {}, never>;
1058
1143
 
1059
1144
  interface NewsEditorProps {
1060
- newsId?: string;
1061
- groupId?: string;
1062
- onSuccessfulCreate?: (itemId: string) => void;
1063
1145
  className?: string;
1064
1146
  }
1065
1147
  declare const NewsEditor: FC<NewsEditorProps>;
@@ -1081,16 +1163,22 @@ interface EditorToolbarIndicatorsProps {
1081
1163
  }
1082
1164
  declare const EditorToolbarIndicators: FC<EditorToolbarIndicatorsProps>;
1083
1165
 
1084
- interface EditorToolbarStateActionsProps {
1166
+ declare const NewsEditorContextProvider: FC<{
1167
+ itemId?: string;
1168
+ groupId?: string;
1169
+ onSuccessfulCreate?: (itemId: string) => void;
1170
+ }>;
1171
+
1172
+ declare const NewsEditorToolbarStateActions: FC;
1173
+
1174
+ interface PostInputBoxProps {
1175
+ groupId: string;
1176
+ onBeforeSave: (post: Post) => void;
1177
+ onAfterSave: (post: Post) => void;
1178
+ disableDragAndDrop?: boolean;
1179
+ disableAutoFocus?: boolean;
1085
1180
  className?: string;
1086
- validationInfo?: ReactNode;
1087
- additionalApprovalActions?: IContextualMenuItem[];
1088
- disableApproval?: boolean;
1089
- stringResources?: {
1090
- deletePermanentlyTitle: string;
1091
- deletePermanentlyInfo: string;
1092
- };
1093
1181
  }
1094
- declare const EditorToolbarStateActions: FC<EditorToolbarStateActionsProps>;
1182
+ declare const PostInputBox: FC<PostInputBoxProps>;
1095
1183
 
1096
- export { AuthorFilter, AuthorToolbarFilter, Avatar, Props as AvatarProps, ChannelFilter, ChannelFilterProps, ChannelSelectorWrapper as ChannelSelector, ChannelSelectorWrapperProps as ChannelSelectorProps, ChannelToolbarFilter, ClearAllFiltersButton, ClearAllFiltersButtonProps, EditorToolbarIndicators, EditorToolbarIndicatorsProps, EditorToolbarStateActions, EditorToolbarStateActionsProps, EventDetail, EventDetailProps, EventGridProps, EventView, EventsEditorDashboard, EventsEditorDashboardProps, EventsGrid, EventsList, EventsListProps, FilterProps, FilterSearch, ItemLayoutMode, ItemResourceTypes, Keyword, ScrollableKeywordPicker as KeywordPicker, KeywordPickerProps, KeywordsFilter, KeywordsToolbarFilter, LibNewsFilterDefinition, ManageChannels, ManageChannelsProps, NewsDetail, NewsDetailPreview, NewsDetailPreviewProps, NewsDetailProps, NewsEditor, NewsEditorDashboard, NewsEditorDashboardProps, NewsEditorProps, NewsGrid, NewsGridProps, NewsHero, NewsHeroProps, NewsItemContextProvider, NewsItemPreviewContextProvider, NewsList, NewsListProps, PageDetail, PageDetailProps, PageViewTrackerSettings, PageViewTrackerSettingsContextProvider, PostDetail, PostDetailProps, PublishableItem, PublishingDateFilter, PublishingDateToolbarFilter, ReachContextProps, ReachContextProvider, Dialog as ReachDialog, TargetLinkOverrideContextProvider, Toolbar, ToolbarChannelSelector, ToolbarChannelSelectorOption, ToolbarChannelSelectorProps, ToolbarCloseButton, ToolbarCloseButtonProps, ToolbarEventViewSelector, ToolbarEventViewSelectorProps, ToolbarFilterModal, ToolbarFilterModalButton, ToolbarFilterModalProps, ToolbarFilterPanel, ToolbarFilterSearch, ToolbarIconButton, ToolbarIconButtonProps, ToolbarManageNewsItemButton, ToolbarMarkAllEventsAsReadButton, ToolbarMarkAllNewsAsReadButton, ToolbarMarkEventsItemsAsReadButtonProps, ToolbarMarkNewsItemsAsReadButtonProps, ToolbarNewsLanguageSelector, ToolbarProps, ToolbarSearchProps, ToolbarUnreadItemsButton, UserDetails, UserDetailsProps, VerticalFilterPanel, VerticalFilterPanelProps, useCurrentUser };
1184
+ export { AuthorFilter, AuthorToolbarFilter, Avatar, Props as AvatarProps, ChannelFilter, ChannelFilterProps, ChannelSelectorWrapper as ChannelSelector, ChannelSelectorWrapperProps as ChannelSelectorProps, ChannelToolbarFilter, ClearAllFiltersButton, ClearAllFiltersButtonProps, EditorToolbarIndicators, EditorToolbarIndicatorsProps, EventDetail, EventDetailProps, EventGridProps, EventView, EventsEditorDashboard, EventsEditorDashboardProps, EventsGrid, EventsList, EventsListProps, FilterProps, FilterSearch, ItemLayoutMode, ItemResourceTypes, Keyword, ScrollableKeywordPicker as KeywordPicker, KeywordPickerProps, KeywordsFilter, KeywordsToolbarFilter, LibNewsFilterDefinition, ManageChannels, ManageChannelsProps, NewsDetail, NewsDetailPreview, NewsDetailPreviewProps, NewsDetailProps, NewsEditor, NewsEditorContextProvider, NewsEditorDashboard, NewsEditorDashboardProps, NewsEditorProps, NewsEditorToolbarStateActions, NewsGrid, NewsGridProps, NewsHero, NewsHeroProps, NewsItemContextProvider, NewsItemPreviewContextProvider, NewsList, NewsListProps, PageDetail, PageDetailProps, PageViewTrackerSettings, PageViewTrackerSettingsContextProvider, PostDetail, PostDetailProps, PostInputBox, PostInputBoxProps, PublishableItem, PublishingDateFilter, PublishingDateToolbarFilter, ReachContextProps, ReachContextProvider, Dialog as ReachDialog, TargetLinkOverrideContextProvider, Toolbar, ToolbarChannelSelector, ToolbarChannelSelectorOption, ToolbarChannelSelectorProps, ToolbarCloseButton, ToolbarCloseButtonProps, ToolbarEventViewSelector, ToolbarEventViewSelectorProps, ToolbarFilterModal, ToolbarFilterModalButton, ToolbarFilterModalProps, ToolbarFilterPanel, ToolbarFilterSearch, ToolbarIconButton, ToolbarIconButtonProps, ToolbarManageNewsItemButton, ToolbarMarkAllEventsAsReadButton, ToolbarMarkAllNewsAsReadButton, ToolbarMarkEventsItemsAsReadButtonProps, ToolbarMarkNewsItemsAsReadButtonProps, ToolbarNewsLanguageSelector, ToolbarProps, ToolbarSearchProps, ToolbarUnreadItemsButton, UserDetails, UserDetailsProps, VerticalFilterPanel, VerticalFilterPanelProps, useCurrentUser };
package/index.esm.js CHANGED
@@ -1 +1 @@
1
- export{$ as AuthorFilter,Z as AuthorToolbarFilter,A as Avatar,L as ChannelFilter,a4 as ChannelSelector,O as ChannelToolbarFilter,W as ClearAllFiltersButton,ab as EditorToolbarIndicators,ac as EditorToolbarStateActions,E as EventDetail,a3 as EventView,r as EventsEditorDashboard,l as EventsGrid,n as EventsList,a0 as FilterSearch,I as ItemLayoutMode,a8 as ItemResourceTypes,a9 as KeywordPicker,X as KeywordsFilter,Y as KeywordsToolbarFilter,M as ManageChannels,N as NewsDetail,F as NewsDetailPreview,a5 as NewsEditor,q as NewsEditorDashboard,k as NewsGrid,p as NewsHero,B as NewsItemContextProvider,G as NewsItemPreviewContextProvider,j as NewsList,h as PageDetail,a6 as PageViewTrackerSettingsContextProvider,i as PostDetail,S as PublishingDateFilter,Q as PublishingDateToolbarFilter,R as ReachContextProvider,aa as ReachDialog,a7 as TargetLinkOverrideContextProvider,s as Toolbar,w as ToolbarChannelSelector,z as ToolbarCloseButton,a2 as ToolbarEventViewSelector,J as ToolbarFilterModal,K as ToolbarFilterModalButton,H as ToolbarFilterPanel,a1 as ToolbarFilterSearch,t as ToolbarIconButton,D as ToolbarManageNewsItemButton,x as ToolbarMarkAllEventsAsReadButton,y as ToolbarMarkAllNewsAsReadButton,C as ToolbarNewsLanguageSelector,v as ToolbarUnreadItemsButton,U as UserDetails,V as VerticalFilterPanel,o as useCurrentUser}from"./index.esm2.js";import"react/jsx-runtime";import"events";import"react";import"office-ui-fabric-react";import"react-router-dom";import"react-is";import"styled-components";import"react-dom";import"office-ui-fabric-core/dist/css/fabric.css";import"office-ui-fabric-react/lib/common/DirectionalHint";import"react-dom/server";
1
+ export{$ as AuthorFilter,Z as AuthorToolbarFilter,A as Avatar,L as ChannelFilter,a4 as ChannelSelector,O as ChannelToolbarFilter,W as ClearAllFiltersButton,ac as EditorToolbarIndicators,E as EventDetail,a3 as EventView,r as EventsEditorDashboard,l as EventsGrid,n as EventsList,a0 as FilterSearch,I as ItemLayoutMode,a9 as ItemResourceTypes,aa as KeywordPicker,X as KeywordsFilter,Y as KeywordsToolbarFilter,M as ManageChannels,N as NewsDetail,F as NewsDetailPreview,a5 as NewsEditor,a6 as NewsEditorContextProvider,q as NewsEditorDashboard,ad as NewsEditorToolbarStateActions,k as NewsGrid,p as NewsHero,B as NewsItemContextProvider,G as NewsItemPreviewContextProvider,j as NewsList,h as PageDetail,a7 as PageViewTrackerSettingsContextProvider,i as PostDetail,ae as PostInputBox,S as PublishingDateFilter,Q as PublishingDateToolbarFilter,R as ReachContextProvider,ab as ReachDialog,a8 as TargetLinkOverrideContextProvider,s as Toolbar,w as ToolbarChannelSelector,z as ToolbarCloseButton,a2 as ToolbarEventViewSelector,J as ToolbarFilterModal,K as ToolbarFilterModalButton,H as ToolbarFilterPanel,a1 as ToolbarFilterSearch,t as ToolbarIconButton,D as ToolbarManageNewsItemButton,x as ToolbarMarkAllEventsAsReadButton,y as ToolbarMarkAllNewsAsReadButton,C as ToolbarNewsLanguageSelector,v as ToolbarUnreadItemsButton,U as UserDetails,V as VerticalFilterPanel,o as useCurrentUser}from"./index.esm2.js";import"react/jsx-runtime";import"events";import"react";import"office-ui-fabric-react";import"react-router-dom";import"react-is";import"styled-components";import"react-dom";import"office-ui-fabric-core/dist/css/fabric.css";import"office-ui-fabric-react/lib/common/DirectionalHint";import"react-dom/server";