@livetiles/reach-plugin-types 0.4.73 → 0.4.75

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 +57 -68
  2. package/package.json +1 -1
package/lib/index.d.ts CHANGED
@@ -1976,11 +1976,12 @@ declare module "libs/reach/util/common/src/content/NewsItem" {
1976
1976
  import { NewsMetadata } from "libs/reach/util/common/src/content/NewsMetadata";
1977
1977
  import { KnownNewsState } from "libs/reach/util/common/src/content/KnownNewsState";
1978
1978
  import { PublishableItem } from "libs/reach/util/common/src/content/PublishableItem";
1979
+ import { Channel } from "libs/reach/util/common/src/user/Channel";
1979
1980
  export type Source = 'Condense' | 'External' | null;
1980
1981
  export type VersionId = string;
1981
1982
  export interface SchedulableItem extends PublishableItem {
1982
1983
  metadata?: NewsMetadata;
1983
- channels?: SchedulableItemChannel[];
1984
+ channels?: Channel[];
1984
1985
  }
1985
1986
  export interface NewsItem extends SchedulableItem {
1986
1987
  source?: string;
@@ -1999,9 +2000,6 @@ declare module "libs/reach/util/common/src/content/NewsItem" {
1999
2000
  newsId: string;
2000
2001
  versionModificationDate: string;
2001
2002
  }
2002
- export interface SchedulableItemChannel {
2003
- name: string;
2004
- }
2005
2003
  }
2006
2004
  declare module "libs/reach/util/common/src/content/VideoSource" {
2007
2005
  export enum VideoSource {
@@ -2888,7 +2886,7 @@ declare module "libs/reach/util/common/src/analytics/AnalyticsModuleContextProvi
2888
2886
  }
2889
2887
  declare module "libs/reach/util/common/src/analytics/AnalyticsContextProvider" {
2890
2888
  import { Dispatch, FC, SetStateAction } from 'react';
2891
- import { Activity, Analytics, EventModule, InteractionProperties, EventSearch } from '@livetiles/analytics';
2889
+ import { Analytics, EventModule, InteractionProperties, EventSearch } from '@livetiles/analytics';
2892
2890
  export interface SearchAnalytics {
2893
2891
  data: EventSearch[];
2894
2892
  onSearchTermChange: (newData: EventSearch) => Promise<unknown>;
@@ -2898,24 +2896,18 @@ declare module "libs/reach/util/common/src/analytics/AnalyticsContextProvider" {
2898
2896
  module: EventModule;
2899
2897
  setModule: Dispatch<SetStateAction<EventModule>>;
2900
2898
  }
2901
- interface ActivityAnalytics {
2902
- trackActivity: (scrollContainer?: HTMLElement, moduleOverride?: EventModule) => Activity | undefined;
2903
- sendActivity: () => void;
2904
- }
2905
- export type ReachAnalytics = Analytics & ModuleAnalytics & SearchAnalytics & ActivityAnalytics;
2899
+ export type ReachAnalytics = Analytics & ModuleAnalytics & SearchAnalytics;
2906
2900
  export const AnalyticsContext: import("react").Context<ReachAnalytics>;
2907
2901
  export function useAnalyticsContext(): {
2908
2902
  interaction: (payload: Omit<InteractionProperties, 'module'>) => Promise<void>;
2909
- trackActivity: (scrollContainer?: HTMLElement) => Activity;
2910
2903
  getUser: () => import("@segment/analytics-next").User;
2911
2904
  identify: (userId: string, traits?: Record<string, unknown>) => void;
2912
- activity: (payload: import("@livetiles/analytics").ActivityProperties) => Activity;
2905
+ activity: (payload: import("@livetiles/analytics").ActivityProperties) => import("@livetiles/analytics").Activity;
2913
2906
  module: EventModule;
2914
2907
  setModule: Dispatch<SetStateAction<EventModule>>;
2915
2908
  data: EventSearch[];
2916
2909
  onSearchTermChange: (newData: EventSearch) => Promise<unknown>;
2917
2910
  onItemRead: (itemId: string) => void;
2918
- sendActivity: () => void;
2919
2911
  };
2920
2912
  export const AnalyticsLibraryContextProvider: FC<{
2921
2913
  appName?: string;
@@ -2934,8 +2926,41 @@ declare module "libs/reach/util/common/src/analytics/useAnalyticsViewTrack" {
2934
2926
  export function useAnalyticsViewTrackWithPagination(startTracking: boolean, items: BaseItem[], itemResourceType: ItemResourceTypes): void;
2935
2927
  export function useAnalyticsViewTrack(startTracking: boolean, itemResourceType?: ItemResourceTypes, thresholdPercentageOverride?: number): void;
2936
2928
  }
2929
+ declare module "libs/reach/util/common/src/useModalRouting" {
2930
+ export interface ModalRouting {
2931
+ isActive: boolean;
2932
+ itemId: string;
2933
+ backgroundLocation: any;
2934
+ }
2935
+ export function useModalRouting(): {
2936
+ isModalRoutingActive: boolean;
2937
+ modalItemId: string;
2938
+ backgroundLocation: any;
2939
+ };
2940
+ export function useModalRoutingSettings(): (itemId: string) => {
2941
+ modalRouting: {
2942
+ isActive: boolean;
2943
+ itemId: string;
2944
+ backgroundLocation: {
2945
+ state: {
2946
+ modalRouting: {
2947
+ isActive: boolean;
2948
+ };
2949
+ };
2950
+ pathname: string;
2951
+ search: string;
2952
+ hash: string;
2953
+ key?: string;
2954
+ };
2955
+ };
2956
+ };
2957
+ }
2937
2958
  declare module "libs/reach/util/common/src/analytics/useAnalyticsActivityTrack" {
2938
- export function useAnalyticsActivityTrack(scrollContainer: HTMLElement): void;
2959
+ import { Activity } from '@livetiles/analytics';
2960
+ export function useAnalyticsActivityTrack(scrollContainer?: HTMLElement): {
2961
+ trackActivity: () => Activity;
2962
+ sendActivity: () => void;
2963
+ };
2939
2964
  }
2940
2965
  declare module "libs/reach/util/common/src/analytics/useAnalyticsNavigateTrack" {
2941
2966
  export function useAnalyticsNavigateTrack(): void;
@@ -3709,35 +3734,6 @@ declare module "libs/reach/util/common/src/ForbiddenErrorTriggerAction" {
3709
3734
  static create(): GenericAccessDeniedTriggerAction;
3710
3735
  }
3711
3736
  }
3712
- declare module "libs/reach/util/common/src/useModalRouting" {
3713
- export interface ModalRouting {
3714
- isActive: boolean;
3715
- itemId: string;
3716
- backgroundLocation: any;
3717
- }
3718
- export function useModalRouting(): {
3719
- isModalRoutingActive: boolean;
3720
- modalItemId: string;
3721
- backgroundLocation: any;
3722
- };
3723
- export function useModalRoutingSettings(): (itemId: string) => {
3724
- modalRouting: {
3725
- isActive: boolean;
3726
- itemId: string;
3727
- backgroundLocation: {
3728
- state: {
3729
- modalRouting: {
3730
- isActive: boolean;
3731
- };
3732
- };
3733
- pathname: string;
3734
- search: string;
3735
- hash: string;
3736
- key?: string;
3737
- };
3738
- };
3739
- };
3740
- }
3741
3737
  declare module "libs/reach/util/common/src/index" {
3742
3738
  export { initializeIcons } from 'office-ui-fabric-react';
3743
3739
  export * from "libs/reach/util/common/src/FocusStyles";
@@ -4623,7 +4619,7 @@ declare module "libs/reach/ui/common/src/common/channels/ChannelTitle" {
4623
4619
  import { Channel } from "libs/reach/util/common/src/index";
4624
4620
  import { CurrentUser } from "libs/reach/util/common/src/index";
4625
4621
  interface Props {
4626
- channel: Channel | string;
4622
+ channel: Partial<Channel>;
4627
4623
  language?: string;
4628
4624
  applyChannelBubbleStyle?: boolean;
4629
4625
  role?: string;
@@ -4631,10 +4627,10 @@ declare module "libs/reach/ui/common/src/common/channels/ChannelTitle" {
4631
4627
  }
4632
4628
  export const ChannelTitle: FC<Props>;
4633
4629
  export const ChannelTitles: FC<{
4634
- channels: (Channel | string)[];
4630
+ channels: Channel[];
4635
4631
  language?: string;
4636
4632
  }>;
4637
- export function getChannelDisplayName(allChannels: Channel[], channelOrName: Channel | string, user: CurrentUser, language?: string): string;
4633
+ export function getChannelDisplayName(channel: Partial<Channel>, user: CurrentUser, language?: string): string;
4638
4634
  }
4639
4635
  declare module "libs/reach/ui/common/src/common/channels/ChannelItem" {
4640
4636
  import { UserChannelSubscription } from "libs/reach/util/common/src/index";
@@ -4659,16 +4655,17 @@ declare module "libs/reach/ui/common/src/common/channels/ChannelItem" {
4659
4655
  }
4660
4656
  declare module "libs/reach/ui/common/src/common/channels/ChannelList" {
4661
4657
  import { FC } from 'react';
4658
+ import { Channel } from "libs/reach/util/common/src/index";
4662
4659
  export interface ChannelStyleDefinition {
4663
4660
  backgroundColor?: string;
4664
4661
  color?: string;
4665
4662
  }
4666
4663
  export const ChannelList: FC<{
4667
- channels: string[];
4664
+ channels: Channel[];
4668
4665
  language: string;
4669
4666
  channelStyleDefinition?: ChannelStyleDefinition;
4670
4667
  visibleChannelsCount?: number;
4671
- onChannelClick?: (channel: string) => unknown;
4668
+ onChannelClick?: (channel: Channel) => unknown;
4672
4669
  className?: string;
4673
4670
  }>;
4674
4671
  }
@@ -4676,7 +4673,7 @@ declare module "libs/reach/ui/common/src/common/channels/ClickableChannelTitles"
4676
4673
  import { FC } from 'react';
4677
4674
  import { Channel } from "libs/reach/util/common/src/index";
4678
4675
  export const ClickableChannelTitles: FC<{
4679
- channels: (Channel | string)[];
4676
+ channels: Channel[];
4680
4677
  buildChannelFilterUrl?: (channelName: string) => string;
4681
4678
  language?: string;
4682
4679
  channelBackgroundColor?: string;
@@ -9202,16 +9199,14 @@ declare module "libs/reach/feature/content/src/news/DateInfo" {
9202
9199
  }
9203
9200
  declare module "libs/reach/feature/content/src/news/ItemMetaInfo" {
9204
9201
  import { FC } from 'react';
9205
- import { SchedulableItemChannel } from "libs/reach/util/common/src/index";
9206
9202
  import { DateMode } from "libs/reach/feature/content/src/news/DateInfo";
9207
- import { Account } from "libs/reach/util/common/src/index";
9208
- import { PublishableItem } from "libs/reach/util/common/src/index";
9203
+ import { Account, Channel, PublishableItem } from "libs/reach/util/common/src/index";
9209
9204
  export const getAuthor: (item: Partial<PublishableItem>) => Account;
9210
9205
  export const ItemMetaInfo: FC<{
9211
9206
  item: Partial<PublishableItem>;
9212
9207
  className?: string;
9213
9208
  expiryDate?: string;
9214
- channels?: SchedulableItemChannel[];
9209
+ channels?: Channel[];
9215
9210
  showChannels?: boolean;
9216
9211
  dateMode: DateMode;
9217
9212
  readOnly?: boolean;
@@ -10535,7 +10530,7 @@ declare module "libs/reach/feature/content/src/posts/index" {
10535
10530
  export * from "libs/reach/feature/content/src/posts/utils";
10536
10531
  }
10537
10532
  declare module "libs/reach/feature/content/src/stream/streamUtils" {
10538
- import { AttachmentType, BaseAttachment, Channel, Comment, ConversationScope, CurrentUser, EventCancelInformation, EventItem, EventResponse, GraphQLAttachmentType, ItemResourceTypes, Keyword, KnownNewsState, NewsItem, PageItem, PageNavigationContext, PageNavigationNode, PageType, PaginatedList } from "libs/reach/util/common/src/index";
10533
+ import { AttachmentType, BaseAttachment, Channel, Comment, ConversationScope, EventCancelInformation, EventItem, EventResponse, GraphQLAttachmentType, ItemResourceTypes, Keyword, KnownNewsState, NewsItem, PageItem, PageNavigationContext, PageNavigationNode, PageType, PaginatedList } from "libs/reach/util/common/src/index";
10539
10534
  import { Post } from "libs/reach/feature/content/src/posts/index";
10540
10535
  import { StreamEventResponse } from "libs/reach/feature/content/src/stream/useStreamItemsQuery";
10541
10536
  enum StreamItemTypes {
@@ -10752,7 +10747,7 @@ declare module "libs/reach/feature/content/src/stream/streamUtils" {
10752
10747
  hasNewComments?: boolean;
10753
10748
  isLiked?: boolean;
10754
10749
  metadata?: import("@livetiles/reach/util/common").NewsMetadata;
10755
- channels?: import("@livetiles/reach/util/common").SchedulableItemChannel[];
10750
+ channels?: Channel[];
10756
10751
  lease: import("@livetiles/reach/util/common").LeaseInfo;
10757
10752
  id?: string;
10758
10753
  versionId?: string;
@@ -10857,7 +10852,7 @@ declare module "libs/reach/feature/content/src/stream/streamUtils" {
10857
10852
  isSeriesMaster?: string;
10858
10853
  isVirtual?: boolean;
10859
10854
  metadata?: import("@livetiles/reach/util/common").NewsMetadata;
10860
- channels?: import("@livetiles/reach/util/common").SchedulableItemChannel[];
10855
+ channels?: Channel[];
10861
10856
  lease: import("@livetiles/reach/util/common").LeaseInfo;
10862
10857
  id?: string;
10863
10858
  versionId?: string;
@@ -10992,7 +10987,7 @@ declare module "libs/reach/feature/content/src/stream/streamUtils" {
10992
10987
  isDemoContent?: boolean;
10993
10988
  poll?: import("@livetiles/reach/util/common").Poll;
10994
10989
  })[];
10995
- export function convertProperties(items: StreamItem[], user: CurrentUser, subscriptionChannels?: Channel[]): ({
10990
+ export function convertProperties(items: StreamItem[], subscriptionChannels?: Channel[]): ({
10996
10991
  keywords: {
10997
10992
  [key: string]: Keyword[];
10998
10993
  };
@@ -11037,7 +11032,7 @@ declare module "libs/reach/feature/content/src/stream/streamUtils" {
11037
11032
  hasNewComments?: boolean;
11038
11033
  isLiked?: boolean;
11039
11034
  metadata?: import("@livetiles/reach/util/common").NewsMetadata;
11040
- channels?: import("@livetiles/reach/util/common").SchedulableItemChannel[];
11035
+ channels?: Channel[];
11041
11036
  lease: import("@livetiles/reach/util/common").LeaseInfo;
11042
11037
  id?: string;
11043
11038
  versionId?: string;
@@ -11091,7 +11086,7 @@ declare module "libs/reach/feature/content/src/stream/streamUtils" {
11091
11086
  isSeriesMaster?: string;
11092
11087
  isVirtual?: boolean;
11093
11088
  metadata?: import("@livetiles/reach/util/common").NewsMetadata;
11094
- channels?: import("@livetiles/reach/util/common").SchedulableItemChannel[];
11089
+ channels?: Channel[];
11095
11090
  lease: import("@livetiles/reach/util/common").LeaseInfo;
11096
11091
  id?: string;
11097
11092
  versionId?: string;
@@ -11182,9 +11177,7 @@ declare module "libs/reach/feature/content/src/stream/streamUtils" {
11182
11177
  modifiedOn?: string;
11183
11178
  modifiedBy?: import("@livetiles/reach/util/common").Account;
11184
11179
  };
11185
- channels: {
11186
- name: string;
11187
- }[];
11180
+ channels: Channel[];
11188
11181
  contents: {};
11189
11182
  bannerInfo: {
11190
11183
  videoSource: import("@livetiles/reach/util/common").VideoSource;
@@ -11235,9 +11228,7 @@ declare module "libs/reach/feature/content/src/stream/streamUtils" {
11235
11228
  modifiedOn?: string;
11236
11229
  modifiedBy?: import("@livetiles/reach/util/common").Account;
11237
11230
  };
11238
- channels: {
11239
- name: string;
11240
- }[];
11231
+ channels: Channel[];
11241
11232
  contents: {};
11242
11233
  bannerInfo: {
11243
11234
  videoSource: import("@livetiles/reach/util/common").VideoSource;
@@ -11302,9 +11293,7 @@ declare module "libs/reach/feature/content/src/stream/streamUtils" {
11302
11293
  modifiedOn?: string;
11303
11294
  modifiedBy?: import("@livetiles/reach/util/common").Account;
11304
11295
  };
11305
- channels: {
11306
- name: string;
11307
- }[];
11296
+ channels: Channel[];
11308
11297
  contents: {};
11309
11298
  bannerInfo: {
11310
11299
  videoSource: import("@livetiles/reach/util/common").VideoSource;
package/package.json CHANGED
@@ -4,6 +4,6 @@
4
4
  "main": "",
5
5
  "types": "./index.d.ts",
6
6
  "license": "ISC",
7
- "version": "0.4.73",
7
+ "version": "0.4.75",
8
8
  "dependencies": {}
9
9
  }