@livetiles/reach-plugin-types 0.5.0-preview.294 → 0.5.0-preview.296
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/lib/index.d.ts +15 -36
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -2844,7 +2844,7 @@ declare module "libs/reach/util/common/src/analytics/analyticsUtils" {
|
|
|
2844
2844
|
Chat = "chat",
|
|
2845
2845
|
Comments = "comments",
|
|
2846
2846
|
Events = "events",
|
|
2847
|
-
|
|
2847
|
+
Search = "search",
|
|
2848
2848
|
News = "news",
|
|
2849
2849
|
Pages = "pages",
|
|
2850
2850
|
People = "people",
|
|
@@ -2890,46 +2890,26 @@ declare module "libs/reach/util/common/src/analytics/useIframeInteraction" {
|
|
|
2890
2890
|
}
|
|
2891
2891
|
declare module "libs/reach/util/common/src/analytics/AnalyticsModuleContextProvider" {
|
|
2892
2892
|
import { FC } from 'react';
|
|
2893
|
-
import {
|
|
2894
|
-
export const AnalyticsModuleContext: import("react").Context<
|
|
2893
|
+
import { EventModule } from '@livetiles/analytics';
|
|
2894
|
+
export const AnalyticsModuleContext: import("react").Context<EventModule>;
|
|
2895
2895
|
export const AnalyticsModuleContextProvider: FC<{
|
|
2896
|
-
module:
|
|
2896
|
+
module: EventModule;
|
|
2897
2897
|
}>;
|
|
2898
2898
|
}
|
|
2899
2899
|
declare module "libs/reach/util/common/src/analytics/AnalyticsContextProvider" {
|
|
2900
2900
|
import { Dispatch, FC, SetStateAction } from 'react';
|
|
2901
|
-
import { Activity, Analytics, InteractionProperties } from '@livetiles/analytics';
|
|
2902
|
-
import { ItemResourceTypes } from "libs/reach/util/common/src/content/index";
|
|
2903
|
-
export interface AnalyticsSearchData {
|
|
2904
|
-
searchTerm: string;
|
|
2905
|
-
results: {
|
|
2906
|
-
itemId: string;
|
|
2907
|
-
itemType: ItemResourceTypes;
|
|
2908
|
-
}[];
|
|
2909
|
-
itemRead?: string;
|
|
2910
|
-
isGlobalSearch?: boolean;
|
|
2911
|
-
}
|
|
2912
|
-
export enum AnalyticsSearchEventType {
|
|
2913
|
-
search = "search",
|
|
2914
|
-
searchSession = "searchSession"
|
|
2915
|
-
}
|
|
2901
|
+
import { Activity, Analytics, EventModule, InteractionProperties, EventSearch } from '@livetiles/analytics';
|
|
2916
2902
|
export interface SearchAnalytics {
|
|
2917
|
-
data:
|
|
2918
|
-
onSearchTermChange: (newData:
|
|
2919
|
-
trackSearchSession: () => Promise<unknown>;
|
|
2903
|
+
data: EventSearch[];
|
|
2904
|
+
onSearchTermChange: (newData: EventSearch) => Promise<unknown>;
|
|
2920
2905
|
onItemRead: (itemId: string) => void;
|
|
2921
2906
|
}
|
|
2922
|
-
export interface Module {
|
|
2923
|
-
type: string;
|
|
2924
|
-
subtype?: string;
|
|
2925
|
-
value?: string;
|
|
2926
|
-
}
|
|
2927
2907
|
export interface ModuleAnalytics {
|
|
2928
|
-
module:
|
|
2929
|
-
setModule: Dispatch<SetStateAction<
|
|
2908
|
+
module: EventModule;
|
|
2909
|
+
setModule: Dispatch<SetStateAction<EventModule>>;
|
|
2930
2910
|
}
|
|
2931
2911
|
interface ActivityAnalytics {
|
|
2932
|
-
trackActivity: (scrollContainer?: HTMLElement, moduleOverride?:
|
|
2912
|
+
trackActivity: (scrollContainer?: HTMLElement, moduleOverride?: EventModule) => Activity | undefined;
|
|
2933
2913
|
sendActivity: () => void;
|
|
2934
2914
|
}
|
|
2935
2915
|
export type ReachAnalytics = Analytics & ModuleAnalytics & SearchAnalytics & ActivityAnalytics;
|
|
@@ -2940,11 +2920,10 @@ declare module "libs/reach/util/common/src/analytics/AnalyticsContextProvider" {
|
|
|
2940
2920
|
getUser: () => import("@segment/analytics-next").User;
|
|
2941
2921
|
identify: (userId: string, traits?: Record<string, unknown>) => Promise<void>;
|
|
2942
2922
|
activity: (payload: import("@livetiles/analytics").ActivityProperties) => Activity;
|
|
2943
|
-
module:
|
|
2944
|
-
setModule: Dispatch<SetStateAction<
|
|
2945
|
-
data:
|
|
2946
|
-
onSearchTermChange: (newData:
|
|
2947
|
-
trackSearchSession: () => Promise<unknown>;
|
|
2923
|
+
module: EventModule;
|
|
2924
|
+
setModule: Dispatch<SetStateAction<EventModule>>;
|
|
2925
|
+
data: EventSearch[];
|
|
2926
|
+
onSearchTermChange: (newData: EventSearch) => Promise<unknown>;
|
|
2948
2927
|
onItemRead: (itemId: string) => void;
|
|
2949
2928
|
sendActivity: () => void;
|
|
2950
2929
|
};
|
|
@@ -11397,7 +11376,7 @@ declare module "libs/reach/feature/content/src/common/hooks/useAnalyticsSearchTr
|
|
|
11397
11376
|
import { Post } from "libs/reach/feature/content/src/posts/utils";
|
|
11398
11377
|
import { StreamItem } from "libs/reach/feature/content/src/stream/streamUtils";
|
|
11399
11378
|
import { ItemResourceTypes, PublishableItem } from "libs/reach/util/common/src/index";
|
|
11400
|
-
export function useAnalyticsSearchTracking(items?: (PublishableItem | Post | StreamItem)[], disableTracking?: boolean,
|
|
11379
|
+
export function useAnalyticsSearchTracking(items?: (PublishableItem | Post | StreamItem)[], disableTracking?: boolean, itemType?: ItemResourceTypes): void;
|
|
11401
11380
|
export function useClearSearchSessionOnLeave(): void;
|
|
11402
11381
|
}
|
|
11403
11382
|
declare module "libs/reach/feature/content/src/common/sidebar/SidebarIcon" {
|