@mx-cartographer/experiences 5.1.3-alpha.mega2 → 5.1.4

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.
@@ -1,6 +1,6 @@
1
1
  import { default as React } from 'react';
2
- import { MicroWidgetProps } from '../../';
3
- import { Beat } from '../../../common';
2
+ import { MicroWidgetProps } from '../../interfaces';
3
+ import { Beat } from '../../../common/types/Beat';
4
4
  export interface BeatCardProps extends MicroWidgetProps {
5
5
  backgroundColor?: string;
6
6
  beat: Beat;
@@ -1,11 +1,10 @@
1
1
  import { default as React } from 'react';
2
- import { PostHog } from 'posthog-js';
3
- import { clientColorSchemeProps } from '../../';
4
- import { Beat } from '../../../common';
2
+ import { Beat } from '../../../common/types/Beat';
3
+ import { clientColorSchemeProps, TheWholeHog } from '../../interfaces';
5
4
  export interface CarouselHeaderProps {
6
5
  clientColorScheme?: clientColorSchemeProps;
7
6
  onCardClick: (beat?: Beat | undefined) => void;
8
- posthog?: PostHog;
7
+ posthog?: TheWholeHog;
9
8
  widthOverrides?: number | string;
10
9
  }
11
10
  declare const _default: React.FunctionComponent<CarouselHeaderProps>;
@@ -1,6 +1,6 @@
1
1
  import { default as React } from 'react';
2
- import { Beat } from '../../../common';
3
- import { MicroWidgetProps } from '../../';
2
+ import { Beat } from '../../../common/types';
3
+ import { MicroWidgetProps } from '../../interfaces';
4
4
  export interface InsightsMicroWidgetProps extends MicroWidgetProps {
5
5
  areBeatsLoading: boolean;
6
6
  beats: Beat[];
@@ -1,5 +1,5 @@
1
1
  import { default as React } from 'react';
2
- import { MicroWidgetProps } from '../../';
2
+ import { MicroWidgetProps } from '../../interfaces';
3
3
  export interface MicroZeroStateCardProps extends MicroWidgetProps {
4
4
  carouselSize: string;
5
5
  }
@@ -1,5 +1,5 @@
1
1
  import { default as React } from 'react';
2
- import { MicroWidgetProps } from '../../';
2
+ import { MicroWidgetProps } from '../../interfaces';
3
3
  export interface ViewMoreMicroCardProps extends MicroWidgetProps {
4
4
  isActiveCard: boolean;
5
5
  }
@@ -1,5 +1,5 @@
1
1
  import { default as React } from 'react';
2
- import { MicroWidgetProps } from '../../';
2
+ import { MicroWidgetProps } from '../../interfaces';
3
3
  export interface ZeroStateCardProps extends MicroWidgetProps {
4
4
  carouselSize: string;
5
5
  }
@@ -1,5 +1,4 @@
1
1
  import { Beat } from '../common';
2
- import { PostHog } from 'posthog-js';
3
2
  export interface clientColorSchemeProps {
4
3
  [key: string]: string | undefined;
5
4
  }
@@ -10,7 +9,7 @@ export interface MicroWidgetProps {
10
9
  heightOverrides?: number | string;
11
10
  isActiveCard?: boolean;
12
11
  onCardClick?: (beat?: Beat | undefined) => void;
13
- posthog?: PostHog;
12
+ posthog?: TheWholeHog;
14
13
  showBorder?: boolean;
15
14
  showCarouselControls?: boolean;
16
15
  showHeader?: boolean;
@@ -23,3 +22,37 @@ export interface MicroWidgetProps {
23
22
  export interface StyleProps {
24
23
  [key: string]: object;
25
24
  }
25
+ interface PostHogEventMap {
26
+ ATOMIC: {
27
+ CLOSE: string;
28
+ FINISH: string;
29
+ INTERACTION: string;
30
+ };
31
+ CAROUSEL: {
32
+ LEFT_ARROW_CLICKED: string;
33
+ RIGHT_ARROW_CLICKED: string;
34
+ DOT_CLICKED: string;
35
+ VIEW_ALL_CLICKED: string;
36
+ };
37
+ CONNECT: {
38
+ DRAWER_OPENED: string;
39
+ };
40
+ INSIGHT: {
41
+ LOADED_FIRST: string;
42
+ CLICKED: string;
43
+ DISPLAYED: string;
44
+ VIEWED: string;
45
+ VIEW_MORE_CLICKED: string;
46
+ };
47
+ SURVEY: {
48
+ DISMISSED: string;
49
+ SENT: string;
50
+ SHOWN: string;
51
+ };
52
+ }
53
+ export interface TheWholeHog {
54
+ identify: (userGuid: string, clientGuid: string, properties?: Record<string, any>) => void;
55
+ capture: (eventName: string, properties?: Record<string, any>) => void;
56
+ events: PostHogEventMap;
57
+ }
58
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mx-cartographer/experiences",
3
- "version": "5.1.3-alpha.mega2",
3
+ "version": "5.1.4",
4
4
  "description": "Library containing experience widgets",
5
5
  "main": "dist/index.es.js",
6
6
  "types": "dist/index.d.ts",
@@ -123,4 +123,4 @@
123
123
  "README.md"
124
124
  ],
125
125
  "packageManager": "yarn@4.7.0"
126
- }
126
+ }