@livetiles/reach-components-react 0.4.0-preview.714 → 0.4.0-preview.719

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/index.d.ts CHANGED
@@ -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,
@@ -438,6 +446,19 @@ interface BaseItem {
438
446
  id?: string;
439
447
  statistics?: ItemStatistics;
440
448
  poll?: Poll;
449
+ searchHighlights?: SearchHighlightSummary;
450
+ }
451
+ interface SearchHighlightSummary {
452
+ title: SearchHighlight[];
453
+ content: SearchHighlight[];
454
+ }
455
+ interface SearchHighlight {
456
+ language: string;
457
+ texts: {
458
+ value: string;
459
+ type: 'text' | 'hit';
460
+ }[];
461
+ score: number;
441
462
  }
442
463
  interface Poll {
443
464
  questions: PollQuestion[];
@@ -472,7 +493,6 @@ interface PublishableItemContent extends ContentDefinition {
472
493
  headline?: string;
473
494
  intro?: string;
474
495
  body?: string;
475
- bodyRaw?: string;
476
496
  customProperties?: {
477
497
  [key: string]: any;
478
498
  };
@@ -549,6 +569,63 @@ interface ChoiceTranslations {
549
569
 
550
570
  declare function useCurrentUser(): CurrentUser;
551
571
 
572
+ declare enum AttachmentType {
573
+ Image = 0,
574
+ File = 1,
575
+ YouTubeVideo = 2,
576
+ VimeoVideo = 3,
577
+ News = 4,
578
+ Event = 5,
579
+ Page = 6,
580
+ Post = 7,
581
+ Giphy = 8
582
+ }
583
+ interface BaseAttachment {
584
+ id: string;
585
+ filename?: string;
586
+ previewUrl?: string;
587
+ url?: string;
588
+ isUploadInProgress?: boolean;
589
+ hasError?: boolean;
590
+ width?: number;
591
+ height?: number;
592
+ }
593
+ interface Attachment extends BaseAttachment {
594
+ type: AttachmentType;
595
+ }
596
+
597
+ interface ItemWithAttachments {
598
+ attachments?: Attachment[];
599
+ fileAccessToken?: string;
600
+ attachmentContainerId?: string;
601
+ }
602
+
603
+ interface Comment extends ItemWithAttachments {
604
+ id: string;
605
+ parentItemId: string;
606
+ content: string;
607
+ contentLanguageCode?: string;
608
+ receivedDateTime: string;
609
+ sender: Account;
610
+ conversationScope: ConversationScope;
611
+ modified?: string;
612
+ statistics?: CommentStatistics;
613
+ isLiked?: boolean;
614
+ threadId?: string;
615
+ isUnread?: boolean;
616
+ hasUnreadReplies?: boolean;
617
+ isDemoContent?: boolean;
618
+ }
619
+ interface CommentStatistics {
620
+ likeCount?: number;
621
+ replyCount?: number;
622
+ }
623
+ declare enum ConversationScope {
624
+ Public = 0,
625
+ Editor = 1,
626
+ Posts = 2
627
+ }
628
+
552
629
  declare enum ItemResourceTypes {
553
630
  News = "news",
554
631
  Pages = "pages",
@@ -711,9 +788,7 @@ interface ToolbarMarkAllItemsAsReadButtonProps {
711
788
  onMarkAsReadFinished?: () => unknown;
712
789
  disabled?: boolean;
713
790
  unreadCount?: number;
714
- }
715
- declare const ToolbarMarkAllNewsAsReadButton: FC<ToolbarMarkAllItemsAsReadButtonProps>;
716
- declare const ToolbarMarkAllEventsAsReadButton: FC<ToolbarMarkAllItemsAsReadButtonProps>;
791
+ }
717
792
 
718
793
  declare const ToolbarUnreadItemsButton: FC<{
719
794
  onClick: () => unknown;
@@ -798,8 +873,8 @@ interface FilterWithLogicalOperator {
798
873
  operator?: LogicalOperator;
799
874
  }
800
875
  declare enum LogicalOperator {
801
- Or = "or",
802
- And = "and"
876
+ Or = "OR",
877
+ And = "AND"
803
878
  }
804
879
 
805
880
  interface AuthorFilterDefinition extends IndexableFilterDefinition {
@@ -840,6 +915,36 @@ interface EventFilterDefinition extends PublishableItemFilterDefinition, EventCo
840
915
  pastEventsOnly?: boolean;
841
916
  }
842
917
 
918
+ interface KeywordPickerProps {
919
+ value?: Keyword[] | string[];
920
+ onChange: (keywords: Keyword[]) => void;
921
+ showSelectionToggle?: boolean;
922
+ availableKeywords?: Keyword[];
923
+ mandatoryKeywordIds?: string[];
924
+ className?: string;
925
+ }
926
+ declare const ScrollableKeywordPicker: styled_components.StyledComponent<FC<KeywordPickerProps>, styled_components.DefaultTheme, {}, never>;
927
+
928
+ interface Post extends BaseItem, ItemWithAttachments {
929
+ id: string;
930
+ comments?: PaginatedList<Comment>;
931
+ groupId: string;
932
+ content: string;
933
+ permalink?: string;
934
+ author: Account;
935
+ publishingDate: string;
936
+ modified?: string;
937
+ statistics: ItemStatistics;
938
+ keywords?: {
939
+ [key: string]: Keyword[];
940
+ };
941
+ contentLanguageCode?: string;
942
+ isLiked?: boolean;
943
+ isUnread?: boolean;
944
+ isDemoContent?: boolean;
945
+ isFollowing?: boolean;
946
+ }
947
+
843
948
  interface LibNewsFilterDefinition extends Omit<NewsFilterDefinition, 'channels' | 'keywords'> {
844
949
  channels?: string | FilterWithLogicalOperator;
845
950
  keywords?: string | FilterWithLogicalOperator;
@@ -1042,6 +1147,18 @@ interface NewsEditorProps {
1042
1147
  }
1043
1148
  declare const NewsEditor: FC<NewsEditorProps>;
1044
1149
 
1150
+ interface ToolbarMarkNewsItemsAsReadButtonProps extends ToolbarMarkAllItemsAsReadButtonProps {
1151
+ filter?: LibNewsFilterDefinition;
1152
+ searchText?: string;
1153
+ }
1154
+ declare const ToolbarMarkAllNewsAsReadButton: FC<ToolbarMarkNewsItemsAsReadButtonProps>;
1155
+
1156
+ interface ToolbarMarkEventsItemsAsReadButtonProps extends ToolbarMarkAllItemsAsReadButtonProps {
1157
+ filter?: EventFilterDefinition;
1158
+ searchText?: string;
1159
+ }
1160
+ declare const ToolbarMarkAllEventsAsReadButton: FC<ToolbarMarkEventsItemsAsReadButtonProps>;
1161
+
1045
1162
  interface EditorToolbarIndicatorsProps {
1046
1163
  className?: string;
1047
1164
  }
@@ -1062,4 +1179,23 @@ declare const NewsEditorPanel: FC<{
1062
1179
  className?: string;
1063
1180
  }>;
1064
1181
 
1065
- 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, KeywordsFilter, KeywordsToolbarFilter, LibNewsFilterDefinition, ManageChannels, ManageChannelsProps, NewsDetail, NewsDetailPreview, NewsDetailPreviewProps, NewsDetailProps, NewsEditor, NewsEditorContextProvider, NewsEditorContextProviderProps, NewsEditorDashboard, NewsEditorDashboardProps, NewsEditorPanel, NewsEditorProps, NewsEditorToolbarStateActions, 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, ToolbarMarkAllItemsAsReadButtonProps, ToolbarMarkAllNewsAsReadButton, ToolbarNewsLanguageSelector, ToolbarProps, ToolbarSearchProps, ToolbarUnreadItemsButton, UserDetails, UserDetailsProps, VerticalFilterPanel, VerticalFilterPanelProps, useCurrentUser };
1182
+ interface PostInputBoxProps {
1183
+ onBeforeSave?: (post: Post) => void;
1184
+ onAfterSave?: (post: Post) => void;
1185
+ disableDragAndDrop?: boolean;
1186
+ disableAutoFocus?: boolean;
1187
+ className?: string;
1188
+ }
1189
+ declare const PostInputBox: FC<PostInputBoxProps>;
1190
+
1191
+ declare const PostList: FC;
1192
+
1193
+ interface PostListContextProviderProps {
1194
+ pageSize?: number;
1195
+ groupId?: string;
1196
+ }
1197
+ declare const PostListContextProvider: FC<PostListContextProviderProps>;
1198
+
1199
+ declare const PostGroupSelector: FC;
1200
+
1201
+ 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, NewsEditorContextProviderProps, NewsEditorDashboard, NewsEditorDashboardProps, NewsEditorPanel, NewsEditorProps, NewsEditorToolbarStateActions, NewsGrid, NewsGridProps, NewsHero, NewsHeroProps, NewsItemContextProvider, NewsItemPreviewContextProvider, NewsList, NewsListProps, PageDetail, PageDetailProps, PageViewTrackerSettings, PageViewTrackerSettingsContextProvider, PostDetail, PostDetailProps, PostGroupSelector, PostInputBox, PostInputBoxProps, PostList, PostListContextProvider, PostListContextProviderProps, 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,E as EventDetail,a3 as EventView,r as EventsEditorDashboard,l as EventsGrid,n as EventsList,a0 as FilterSearch,I as ItemLayoutMode,a9 as ItemResourceTypes,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 NewsEditorPanel,ac 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,S as PublishingDateFilter,Q as PublishingDateToolbarFilter,R as ReachContextProvider,aa 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";
1
+ export{a0 as AuthorFilter,$ as AuthorToolbarFilter,A as Avatar,O as ChannelFilter,a5 as ChannelSelector,Q as ChannelToolbarFilter,X as ClearAllFiltersButton,ad as EditorToolbarIndicators,E as EventDetail,a4 as EventView,s as EventsEditorDashboard,n as EventsGrid,o as EventsList,a1 as FilterSearch,I as ItemLayoutMode,aa as ItemResourceTypes,ab as KeywordPicker,Y as KeywordsFilter,Z as KeywordsToolbarFilter,M as ManageChannels,N as NewsDetail,G as NewsDetailPreview,a6 as NewsEditor,a7 as NewsEditorContextProvider,r as NewsEditorDashboard,af as NewsEditorPanel,ae as NewsEditorToolbarStateActions,l as NewsGrid,q as NewsHero,C as NewsItemContextProvider,H as NewsItemPreviewContextProvider,k as NewsList,i as PageDetail,a8 as PageViewTrackerSettingsContextProvider,j as PostDetail,ai as PostGroupSelector,ag as PostInputBox,ah as PostList,h as PostListContextProvider,W as PublishingDateFilter,S as PublishingDateToolbarFilter,R as ReachContextProvider,ac as ReachDialog,a9 as TargetLinkOverrideContextProvider,t as Toolbar,x as ToolbarChannelSelector,B as ToolbarCloseButton,a3 as ToolbarEventViewSelector,K as ToolbarFilterModal,L as ToolbarFilterModalButton,J as ToolbarFilterPanel,a2 as ToolbarFilterSearch,v as ToolbarIconButton,F as ToolbarManageNewsItemButton,y as ToolbarMarkAllEventsAsReadButton,z as ToolbarMarkAllNewsAsReadButton,D as ToolbarNewsLanguageSelector,w as ToolbarUnreadItemsButton,U as UserDetails,V as VerticalFilterPanel,p 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";