@livetiles/reach-components-react 0.5.0-preview.500 → 0.5.0-preview.501

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
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { FC, ReactNode } from 'react';
2
3
  import { IDialogProps, IDropdownOption, IPersonaProps } from 'office-ui-fabric-react';
3
4
  import * as styled_components from 'styled-components';
@@ -414,14 +415,6 @@ declare enum FieldMode {
414
415
  Hidden = 3
415
416
  }
416
417
 
417
- interface Channel {
418
- id: string;
419
- name: string;
420
- translations?: {
421
- [key: string]: string;
422
- };
423
- }
424
-
425
418
  interface KeywordGroup {
426
419
  id: string;
427
420
  name: string;
@@ -470,6 +463,14 @@ declare enum KnownNewsState {
470
463
  Alert = 2
471
464
  }
472
465
 
466
+ interface Channel {
467
+ id: string;
468
+ name: string;
469
+ translations?: {
470
+ [key: string]: string;
471
+ };
472
+ }
473
+
473
474
  declare type VersionId = string;
474
475
  interface SchedulableItem extends PublishableItem {
475
476
  metadata?: NewsMetadata;
@@ -481,7 +482,6 @@ interface NewsItem extends SchedulableItem {
481
482
  expiryDate?: string;
482
483
  knownState: KnownNewsState;
483
484
  hasNewComments?: boolean;
484
- isLiked?: boolean;
485
485
  }
486
486
  interface NewsItemAlertOptions {
487
487
  duration?: string;
@@ -501,6 +501,19 @@ interface BaseItem {
501
501
  id?: string;
502
502
  statistics?: ItemStatistics;
503
503
  poll?: Poll;
504
+ searchHighlights?: SearchHighlightSummary;
505
+ }
506
+ interface SearchHighlightSummary {
507
+ title: SearchHighlight[];
508
+ content: SearchHighlight[];
509
+ }
510
+ interface SearchHighlight {
511
+ language: string;
512
+ texts: {
513
+ value: string;
514
+ type: 'text' | 'hit';
515
+ }[];
516
+ score: number;
504
517
  }
505
518
  interface Poll {
506
519
  questions: PollQuestion[];
@@ -535,7 +548,6 @@ interface PublishableItemContent extends ContentDefinition {
535
548
  headline?: string;
536
549
  intro?: string;
537
550
  body?: string;
538
- bodyRaw?: string;
539
551
  customProperties?: {
540
552
  [key: string]: any;
541
553
  };
@@ -600,6 +612,7 @@ interface PublishableItem extends BaseItem {
600
612
  statistics?: ItemStatistics;
601
613
  useExternalContent?: boolean;
602
614
  isDemoContent?: boolean;
615
+ isLiked?: boolean;
603
616
  }
604
617
  interface PollTranslation {
605
618
  questions: QuestionTranslations[];
@@ -641,6 +654,18 @@ interface Attachment extends BaseAttachment {
641
654
  type: AttachmentType;
642
655
  }
643
656
 
657
+ declare enum GraphQLAttachmentType {
658
+ Image = "IMAGE",
659
+ File = "FILE",
660
+ YouTubeVideo = "YOU_TUBE_VIDEO",
661
+ VimeoVideo = "VIMEO_VIDEO",
662
+ News = "NEWS",
663
+ Event = "EVENT",
664
+ Page = "PAGE",
665
+ Post = "POST",
666
+ Giphy = "GIPHY"
667
+ }
668
+
644
669
  interface ItemWithAttachments {
645
670
  attachments?: Attachment[];
646
671
  fileAccessToken?: string;
@@ -861,6 +886,12 @@ interface ToolbarSearchProps {
861
886
  }
862
887
  declare const Toolbar: FC<ToolbarProps>;
863
888
 
889
+ declare type TokenType = string | number;
890
+
891
+ interface ItemLoader<TItem, TTokenType extends TokenType> {
892
+ (pageSize: number, token?: TTokenType): Promise<PaginatedList<TItem>>;
893
+ }
894
+
864
895
  interface ToolbarChannelSelectorProps {
865
896
  getInitialSelectedKey?: (dropdownOptions: IDropdownOption[]) => string;
866
897
  allChannelsOption?: ToolbarChannelSelectorOption;
@@ -1059,6 +1090,83 @@ interface EventFilterDefinition extends PublishableItemFilterDefinition, EventCo
1059
1090
  pastEventsOnly?: boolean;
1060
1091
  }
1061
1092
 
1093
+ declare enum StreamEventResponse {
1094
+ NotSet = "NOTSET",
1095
+ Registered = "REGISTERED",
1096
+ Declined = "DECLINED"
1097
+ }
1098
+
1099
+ declare enum StreamItemTypes {
1100
+ Post = "POST",
1101
+ News = "NEWS",
1102
+ Event = "EVENT",
1103
+ Page = "PAGE"
1104
+ }
1105
+ declare enum StreamConversationScope {
1106
+ Public = "PUBLIC",
1107
+ Editor = "EDITOR",
1108
+ Posts = "POSTS"
1109
+ }
1110
+ interface PostStreamItem extends Post {
1111
+ type: StreamItemTypes.Post;
1112
+ isUnread: boolean;
1113
+ keywordsList?: Keyword[];
1114
+ groupIds?: string[];
1115
+ postAttachments?: StreamAttachment[];
1116
+ postComments?: PaginatedList<StreamPostComment>;
1117
+ hasMoreUnreadComments: boolean;
1118
+ }
1119
+ interface StreamPostComment extends Comment {
1120
+ postCommentAttachments?: StreamAttachment[];
1121
+ streamConversationScope?: StreamConversationScope;
1122
+ }
1123
+ interface StreamAttachment extends BaseAttachment {
1124
+ type: GraphQLAttachmentType;
1125
+ }
1126
+ interface NewsStreamItem extends NewsItem {
1127
+ type: StreamItemTypes.News;
1128
+ contentsList: StreamPublishableItemContents[];
1129
+ channelsList: string[];
1130
+ isUnread: boolean;
1131
+ keywordsList?: Keyword[];
1132
+ knownNewsState?: StreamKnownNewsState[];
1133
+ }
1134
+ declare enum StreamKnownNewsState {
1135
+ Unconfirmed = "UNCONFIRMED",
1136
+ Alert = "ALERT"
1137
+ }
1138
+ interface EventStreamItem extends EventItem {
1139
+ type: StreamItemTypes.Event;
1140
+ contentsList: StreamPublishableItemContents[];
1141
+ channelsList: string[];
1142
+ isUnread: boolean;
1143
+ keywordsList?: Keyword[];
1144
+ userResponseType?: StreamEventResponse;
1145
+ eventCancelInformation?: StreamEventCancelInformation;
1146
+ }
1147
+ interface PageStreamItem extends PageItem {
1148
+ type: StreamItemTypes.Page;
1149
+ contentsList: StreamPublishableItemContents[];
1150
+ channelsList: string[];
1151
+ isUnread: boolean;
1152
+ keywordsList?: Keyword[];
1153
+ streamPageType?: string;
1154
+ path?: (PageNavigationNode & {
1155
+ parentId?: string;
1156
+ })[];
1157
+ }
1158
+ interface StreamPublishableItemContents {
1159
+ language: string;
1160
+ title: string;
1161
+ intro?: string;
1162
+ headline?: string;
1163
+ }
1164
+ interface StreamEventCancelInformation extends EventCancelInformation {
1165
+ cancellationReasons?: {
1166
+ [key: string]: string;
1167
+ }[];
1168
+ }
1169
+
1062
1170
  interface TargetLinkOverrideContextProps {
1063
1171
  onResolveContentTargetUrl: (itemId: string, itemType: ItemResourceTypes) => string;
1064
1172
  onResolveEmbeddedContentTargetUrl?: (itemId: string, itemType: ItemResourceTypes) => string;
@@ -1085,9 +1193,17 @@ interface PageFilterDefinition extends PublishableItemFilterDefinition {
1085
1193
  pageType?: PageType;
1086
1194
  }
1087
1195
 
1196
+ declare function useNewsStreamDataLoader(filter?: NewsFilterDefinition, searchText?: string, includeAllItems?: boolean): ItemLoader<NewsStreamItem, number>;
1197
+
1198
+ declare function useEventsStreamDataLoader(filter?: EventFilterDefinition, searchText?: string, view?: EventView): ItemLoader<EventStreamItem, number>;
1199
+
1088
1200
  interface PostStreamFilterDefinition extends PostFilterDefinition, BeforePublishingDateFilterDefinition, AuthorFilterDefinition {
1089
1201
  }
1090
1202
 
1203
+ declare function usePostsStreamDataLoader(groupId?: string, filter?: PostStreamFilterDefinition, searchText?: string): ItemLoader<PostStreamItem, number>;
1204
+
1205
+ declare function usePagesStreamDataLoader(filter?: PageFilterDefinition, searchText?: string): ItemLoader<PageStreamItem, number>;
1206
+
1091
1207
  interface LibNewsFilterDefinition extends Omit<NewsFilterDefinition, 'channels' | 'keywords'> {
1092
1208
  channels?: string | FilterWithLogicalOperator;
1093
1209
  keywords?: string | FilterWithLogicalOperator;
@@ -1492,4 +1608,4 @@ interface ErrorWrapperProps {
1492
1608
  }
1493
1609
  declare const ErrorWrapper: FC<ErrorWrapperProps>;
1494
1610
 
1495
- export { AuthorFilter, AuthorToolbarFilter, Avatar, Props as AvatarProps, ChannelFilter, ChannelFilterProps, ChannelSelectorWrapper as ChannelSelector, ChannelSelectorWrapperProps as ChannelSelectorProps, ChannelToolbarFilter, ClearAllFiltersButton, ClearAllFiltersButtonProps, ContactToolbarFilter, EditorToolbarIndicators, EditorToolbarIndicatorsProps, ErrorType, ErrorWrapper, ErrorWrapperProps, EventDatesToolbarFilter, EventDatesToolbarFilterProps, EventDetail, EventDetailPreview, EventDetailProps, EventEditor, EventEditorContextProvider, EventEditorContextProviderProps, EventEditorPanel, EventEditorPanelProps, EventEditorProps, EventEditorToolbarRecurringControls, EventEditorToolbarRecurringControlsProps, EventEditorToolbarStateActions, EventGridProps, EventItemContextProvider, EventItemPreviewContextProvider, EventView, EventsEditorDashboard, EventsEditorDashboardProps, EventsGrid, EventsList, EventsListProps, FilterProps, FilterSearch, FilterWithLogicalOperator, GroupNotificationsSettings, GroupNotificationsSettingsProps, ItemLayoutMode, ItemResourceTypes, Keyword, ScrollableKeywordPicker as KeywordPicker, KeywordPickerProps, KeywordsFilter, KeywordsToolbarFilter, LibNewsFilterDefinition, LogicalOperator, ManageChannels, ManageChannelsProps, NewsDetail, NewsDetailPreview, NewsDetailProps, NewsEditor, NewsEditorContextProvider, NewsEditorContextProviderProps, NewsEditorDashboard, NewsEditorDashboardProps, NewsEditorPanel, NewsEditorPanelProps, NewsEditorProps, NewsEditorToolbarStateActions, NewsGrid, NewsGridProps, NewsHero, NewsHeroProps, NewsItemContextProvider, NewsItemPreviewContextProvider, NewsList, NewsListProps, PageDetail, PageDetailPreview, PageDetailProps, PageEditor, PageEditorContextProvider, PageEditorContextProviderProps, PageEditorPanel, PageEditorPanelProps, PageEditorProps, PageEditorToolbarStateActions, PageItemContextProvider, PageItemPreviewContextProvider, PageType, PageViewTrackerSettings, PageViewTrackerSettingsContextProvider, PagesGrid, PagesGridProps, PagesList, PagesListProps, PostDetail, PostDetailProps, PostGroupSelector, PostGroupSelectorButton, PostGroupSelectorProps, PostGroupsPicker, PostGroupsPickerProps, PostInputBox, PostInputBoxProps, PostList, PostListContextProvider, PostListContextProviderProps, PostListProps, PublishableItem, PublishingDateFilter, PublishingDateToolbarFilter, ReachContextProps, ReachContextProvider, Dialog as ReachDialog, SharedItemDetailPreviewProps, TargetLinkOverrideContextProvider, Toolbar, ToolbarChannelSelector, ToolbarChannelSelectorOption, ToolbarChannelSelectorProps, ToolbarCloseButton, ToolbarCloseButtonProps, ToolbarEventViewSelector, ToolbarEventViewSelectorProps, ToolbarFilterModal, ToolbarFilterModalButton, ToolbarFilterModalProps, ToolbarFilterPanel, ToolbarFilterSearch, ToolbarFilterToggleButton, ToolbarIconButton, ToolbarIconButtonProps, ToolbarLanguageSelector, ToolbarManageNewsItemButton, ToolbarMarkAllEventsAsReadButton, ToolbarMarkAllNewsAsReadButton, ToolbarMarkEventsItemsAsReadButtonProps, ToolbarMarkNewsItemsAsReadButtonProps, ToolbarLanguageSelector as ToolbarNewsLanguageSelector, ToolbarPostNotificationButton, ToolbarProps, ToolbarSearchProps, ToolbarUnreadItemsButton, UserDetails, UserDetailsProps, VerticalFilterPanel, VerticalFilterPanelProps, VideoSource$1 as VideoSource, isFilterActive, useCurrentUser, useLazySubscriptionContext };
1611
+ export { AuthorFilter, AuthorToolbarFilter, Avatar, Props as AvatarProps, ChannelFilter, ChannelFilterProps, ChannelSelectorWrapper as ChannelSelector, ChannelSelectorWrapperProps as ChannelSelectorProps, ChannelToolbarFilter, ClearAllFiltersButton, ClearAllFiltersButtonProps, ContactToolbarFilter, EditorToolbarIndicators, EditorToolbarIndicatorsProps, ErrorType, ErrorWrapper, ErrorWrapperProps, EventDatesToolbarFilter, EventDatesToolbarFilterProps, EventDetail, EventDetailPreview, EventDetailProps, EventEditor, EventEditorContextProvider, EventEditorContextProviderProps, EventEditorPanel, EventEditorPanelProps, EventEditorProps, EventEditorToolbarRecurringControls, EventEditorToolbarRecurringControlsProps, EventEditorToolbarStateActions, EventGridProps, EventItemContextProvider, EventItemPreviewContextProvider, EventStreamItem, EventView, EventsEditorDashboard, EventsEditorDashboardProps, EventsGrid, EventsList, EventsListProps, FilterProps, FilterSearch, FilterWithLogicalOperator, GroupNotificationsSettings, GroupNotificationsSettingsProps, ItemLayoutMode, ItemLoader, ItemResourceTypes, Keyword, ScrollableKeywordPicker as KeywordPicker, KeywordPickerProps, KeywordsFilter, KeywordsToolbarFilter, LibNewsFilterDefinition, LogicalOperator, ManageChannels, ManageChannelsProps, NewsDetail, NewsDetailPreview, NewsDetailProps, NewsEditor, NewsEditorContextProvider, NewsEditorContextProviderProps, NewsEditorDashboard, NewsEditorDashboardProps, NewsEditorPanel, NewsEditorPanelProps, NewsEditorProps, NewsEditorToolbarStateActions, NewsGrid, NewsGridProps, NewsHero, NewsHeroProps, NewsItemContextProvider, NewsItemPreviewContextProvider, NewsList, NewsListProps, NewsStreamItem, PageDetail, PageDetailPreview, PageDetailProps, PageEditor, PageEditorContextProvider, PageEditorContextProviderProps, PageEditorPanel, PageEditorPanelProps, PageEditorProps, PageEditorToolbarStateActions, PageItemContextProvider, PageItemPreviewContextProvider, PageStreamItem, PageType, PageViewTrackerSettings, PageViewTrackerSettingsContextProvider, PagesGrid, PagesGridProps, PagesList, PagesListProps, PostDetail, PostDetailProps, PostGroupSelector, PostGroupSelectorButton, PostGroupSelectorProps, PostGroupsPicker, PostGroupsPickerProps, PostInputBox, PostInputBoxProps, PostList, PostListContextProvider, PostListContextProviderProps, PostListProps, PostStreamItem, PublishableItem, PublishingDateFilter, PublishingDateToolbarFilter, ReachContextProps, ReachContextProvider, Dialog as ReachDialog, SharedItemDetailPreviewProps, TargetLinkOverrideContextProvider, Toolbar, ToolbarChannelSelector, ToolbarChannelSelectorOption, ToolbarChannelSelectorProps, ToolbarCloseButton, ToolbarCloseButtonProps, ToolbarEventViewSelector, ToolbarEventViewSelectorProps, ToolbarFilterModal, ToolbarFilterModalButton, ToolbarFilterModalProps, ToolbarFilterPanel, ToolbarFilterSearch, ToolbarFilterToggleButton, ToolbarIconButton, ToolbarIconButtonProps, ToolbarLanguageSelector, ToolbarManageNewsItemButton, ToolbarMarkAllEventsAsReadButton, ToolbarMarkAllNewsAsReadButton, ToolbarMarkEventsItemsAsReadButtonProps, ToolbarMarkNewsItemsAsReadButtonProps, ToolbarLanguageSelector as ToolbarNewsLanguageSelector, ToolbarPostNotificationButton, ToolbarProps, ToolbarSearchProps, ToolbarUnreadItemsButton, UserDetails, UserDetailsProps, VerticalFilterPanel, VerticalFilterPanelProps, VideoSource$1 as VideoSource, isFilterActive, useCurrentUser, useEventsStreamDataLoader, useLazySubscriptionContext, useNewsStreamDataLoader, usePagesStreamDataLoader, usePostsStreamDataLoader };
package/index.esm.js CHANGED
@@ -1 +1 @@
1
- export{aI as AuthorFilter,aH as AuthorToolbarFilter,aa as Avatar,aA as ChannelFilter,aN as ChannelSelector,aB as ChannelToolbarFilter,aE as ClearAllFiltersButton,b5 as ContactToolbarFilter,aX as EditorToolbarIndicators,bl as ErrorType,bk as ErrorWrapper,b6 as EventDatesToolbarFilter,$ as EventDetail,as as EventDetailPreview,bb as EventEditor,bc as EventEditorContextProvider,bd as EventEditorPanel,bf as EventEditorToolbarRecurringControls,be as EventEditorToolbarStateActions,an as EventItemContextProvider,av as EventItemPreviewContextProvider,aM as EventView,ad as EventsEditorDashboard,a4 as EventsGrid,a5 as EventsList,aJ as FilterSearch,b0 as GroupNotificationsSettings,a2 as ItemLayoutMode,aS as ItemResourceTypes,aV as KeywordPicker,aF as KeywordsFilter,aG as KeywordsToolbarFilter,b7 as LogicalOperator,a6 as ManageChannels,Y as NewsDetail,aq as NewsDetailPreview,aO as NewsEditor,aP as NewsEditorContextProvider,ac as NewsEditorDashboard,aU as NewsEditorPanel,aT as NewsEditorToolbarStateActions,a3 as NewsGrid,ab as NewsHero,al as NewsItemContextProvider,at as NewsItemPreviewContextProvider,a1 as NewsList,Z as PageDetail,ar as PageDetailPreview,bh as PageEditor,bg as PageEditorContextProvider,bj as PageEditorPanel,bi as PageEditorToolbarStateActions,am as PageItemContextProvider,au as PageItemPreviewContextProvider,ba as PageType,aQ as PageViewTrackerSettingsContextProvider,b8 as PagesGrid,b9 as PagesList,a0 as PostDetail,a$ as PostGroupSelector,b2 as PostGroupSelectorButton,a_ as PostGroupsPicker,aY as PostInputBox,aZ as PostList,W as PostListContextProvider,aD as PublishingDateFilter,aC as PublishingDateToolbarFilter,V as ReachContextProvider,aW as ReachDialog,aR as TargetLinkOverrideContextProvider,ae as Toolbar,ah as ToolbarChannelSelector,ak as ToolbarCloseButton,aL as ToolbarEventViewSelector,ax as ToolbarFilterModal,ay as ToolbarFilterModalButton,aw as ToolbarFilterPanel,aK as ToolbarFilterSearch,b3 as ToolbarFilterToggleButton,af as ToolbarIconButton,ao as ToolbarLanguageSelector,ap as ToolbarManageNewsItemButton,ai as ToolbarMarkAllEventsAsReadButton,aj as ToolbarMarkAllNewsAsReadButton,ao as ToolbarNewsLanguageSelector,b1 as ToolbarPostNotificationButton,ag as ToolbarUnreadItemsButton,a9 as UserDetails,az as VerticalFilterPanel,b4 as isFilterActive,a7 as useCurrentUser,a8 as useLazySubscriptionContext}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{aZ as AuthorFilter,aY as AuthorToolbarFilter,ar as Avatar,aR as ChannelFilter,b2 as ChannelSelector,aS as ChannelToolbarFilter,aV as ClearAllFiltersButton,bm as ContactToolbarFilter,ba as EditorToolbarIndicators,bC as ErrorType,bB as ErrorWrapper,bn as EventDatesToolbarFilter,ag as EventDetail,aJ as EventDetailPreview,bs as EventEditor,bt as EventEditorContextProvider,bu as EventEditorPanel,bw as EventEditorToolbarRecurringControls,bv as EventEditorToolbarStateActions,aE as EventItemContextProvider,aM as EventItemPreviewContextProvider,b1 as EventView,au as EventsEditorDashboard,al as EventsGrid,am as EventsList,a_ as FilterSearch,bh as GroupNotificationsSettings,aj as ItemLayoutMode,b7 as ItemResourceTypes,b8 as KeywordPicker,aW as KeywordsFilter,aX as KeywordsToolbarFilter,bo as LogicalOperator,an as ManageChannels,ae as NewsDetail,aH as NewsDetailPreview,b3 as NewsEditor,b4 as NewsEditorContextProvider,at as NewsEditorDashboard,bc as NewsEditorPanel,bb as NewsEditorToolbarStateActions,ak as NewsGrid,as as NewsHero,aC as NewsItemContextProvider,aK as NewsItemPreviewContextProvider,ai as NewsList,af as PageDetail,aI as PageDetailPreview,by as PageEditor,bx as PageEditorContextProvider,bA as PageEditorPanel,bz as PageEditorToolbarStateActions,aD as PageItemContextProvider,aL as PageItemPreviewContextProvider,br as PageType,b5 as PageViewTrackerSettingsContextProvider,bp as PagesGrid,bq as PagesList,ah as PostDetail,bg as PostGroupSelector,bj as PostGroupSelectorButton,bf as PostGroupsPicker,bd as PostInputBox,be as PostList,ad as PostListContextProvider,aU as PublishingDateFilter,aT as PublishingDateToolbarFilter,ac as ReachContextProvider,b9 as ReachDialog,b6 as TargetLinkOverrideContextProvider,av as Toolbar,ay as ToolbarChannelSelector,aB as ToolbarCloseButton,b0 as ToolbarEventViewSelector,aO as ToolbarFilterModal,aP as ToolbarFilterModalButton,aN as ToolbarFilterPanel,a$ as ToolbarFilterSearch,bk as ToolbarFilterToggleButton,aw as ToolbarIconButton,aF as ToolbarLanguageSelector,aG as ToolbarManageNewsItemButton,az as ToolbarMarkAllEventsAsReadButton,aA as ToolbarMarkAllNewsAsReadButton,aF as ToolbarNewsLanguageSelector,bi as ToolbarPostNotificationButton,ax as ToolbarUnreadItemsButton,aq as UserDetails,aQ as VerticalFilterPanel,bl as isFilterActive,ao as useCurrentUser,bF as useEventsStreamDataLoader,ap as useLazySubscriptionContext,bG as useNewsStreamDataLoader,bD as usePagesStreamDataLoader,bE as usePostsStreamDataLoader}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";