aesirx-analytics 2.3.5 → 2.4.0

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/dist/index.d.ts CHANGED
@@ -4,13 +4,9 @@ import { NextRouter } from 'next/router';
4
4
  interface AnalyticsNext {
5
5
  router: NextRouter;
6
6
  attributes: any;
7
- oldLayout?: boolean;
8
- loginApp?: any;
9
- isLoggedApp?: boolean;
10
- isOptInReplaceAnalytics?: boolean;
11
7
  children?: ReactNode;
12
8
  }
13
- declare const AnalyticsNext: ({ router, attributes, oldLayout, loginApp, isLoggedApp, isOptInReplaceAnalytics, children, }: AnalyticsNext) => React.JSX.Element;
9
+ declare const AnalyticsNext: ({ router, attributes, children }: AnalyticsNext) => React.JSX.Element;
14
10
 
15
11
  interface AnalyticsReact {
16
12
  location: {
@@ -24,31 +20,15 @@ interface AnalyticsReact {
24
20
  oldLayout?: boolean;
25
21
  isOptInReplaceAnalytics?: boolean;
26
22
  }
27
- declare const AnalyticsReact: ({ location, history, oldLayout, isOptInReplaceAnalytics, children, }: AnalyticsReact) => React.JSX.Element;
28
-
29
- interface AnalyticsHandle$1 {
30
- location: {
31
- search: string;
32
- pathname: string;
33
- };
34
- history: {
35
- replace: (_: object) => void;
36
- };
37
- children?: ReactNode;
38
- }
39
- declare const AnalyticsHandle$1: ({ location, history, children }: AnalyticsHandle$1) => React.JSX.Element;
40
-
41
- interface AnalyticsHandle {
42
- router: any;
43
- attributes: any;
44
- children?: ReactNode;
45
- }
46
- declare const AnalyticsHandle: ({ router, attributes, children }: AnalyticsHandle) => React.JSX.Element;
23
+ declare const AnalyticsReact: ({ location, history, children }: AnalyticsReact) => React.JSX.Element;
47
24
 
48
25
  declare const startTracker: (endpoint: string, url?: string, referer?: string, user_agent?: string, attributesVisit?: any) => Promise<any>;
49
26
  declare const trackEvent: (endpoint: string, referer?: string, data?: object) => Promise<boolean>;
50
27
  declare const endTrackerVisibilityState: (endPoint: string) => void;
51
28
 
29
+ interface Props {
30
+ children?: ReactNode;
31
+ }
52
32
  interface AnalyticsContextType {
53
33
  event_uuid: string;
54
34
  visitor_uuid: string;
@@ -57,6 +37,7 @@ interface AnalyticsContextType {
57
37
  ref: any;
58
38
  }
59
39
  declare const AnalyticsContext: React.Context<AnalyticsContextType>;
40
+ declare const AnalyticsContextProvider: React.FC<Props>;
60
41
 
61
42
  /**
62
43
  * Function to get browser finger print
@@ -64,16 +45,4 @@ declare const AnalyticsContext: React.Context<AnalyticsContextType>;
64
45
  */
65
46
  declare const getFingerprint: () => string;
66
47
 
67
- interface Props {
68
- optInConsentData?: any;
69
- }
70
- declare global {
71
- interface Window {
72
- funcAfterOptInConsent: any;
73
- funcAfterRejectOptIn: any;
74
- optInConsentData: any;
75
- }
76
- }
77
- declare const OptInConsent: ({ optInConsentData, }: Props) => React.JSX.Element;
78
-
79
- export { AnalyticsContext, AnalyticsNext, AnalyticsHandle as AnalyticsNextHandle, AnalyticsReact, AnalyticsHandle$1 as AnalyticsReactHandle, OptInConsent, endTrackerVisibilityState, getFingerprint, startTracker, trackEvent };
48
+ export { AnalyticsContext, AnalyticsContextProvider, AnalyticsNext, AnalyticsReact, endTrackerVisibilityState, getFingerprint, startTracker, trackEvent };