@atlaskit/analytics-next 8.2.1 → 8.3.2
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/AnalyticsContext/package.json +1 -0
- package/AnalyticsErrorBoundary/package.json +1 -0
- package/AnalyticsEvent/package.json +1 -0
- package/AnalyticsListener/package.json +1 -0
- package/CHANGELOG.md +18 -0
- package/UIAnalyticsEvent/package.json +1 -0
- package/createAndFireEvents/package.json +1 -0
- package/dist/cjs/components/AnalyticsErrorBoundary.js +2 -2
- package/dist/cjs/events/AnalyticsEvent.js +13 -3
- package/dist/cjs/events/UIAnalyticsEvent.js +11 -1
- package/dist/cjs/hocs/withAnalyticsContext.js +5 -3
- package/dist/cjs/hooks/usePatchedProps.js +2 -2
- package/dist/cjs/hooks/usePlatformLeafEventHandler.js +2 -2
- package/dist/cjs/hooks/usePlatformLeafSyntheticEventHandler.js +2 -2
- package/dist/cjs/index.js +39 -21
- package/dist/cjs/utils/cleanProps.js +3 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/events/AnalyticsEvent.js +8 -0
- package/dist/es2019/events/UIAnalyticsEvent.js +8 -0
- package/dist/es2019/index.js +2 -2
- package/dist/es2019/version.json +1 -1
- package/dist/esm/components/AnalyticsErrorBoundary.js +2 -2
- package/dist/esm/events/AnalyticsEvent.js +11 -2
- package/dist/esm/events/UIAnalyticsEvent.js +8 -0
- package/dist/esm/hocs/withAnalyticsContext.js +4 -3
- package/dist/esm/hooks/usePatchedProps.js +2 -2
- package/dist/esm/hooks/usePlatformLeafEventHandler.js +2 -2
- package/dist/esm/hooks/usePlatformLeafSyntheticEventHandler.js +2 -2
- package/dist/esm/index.js +2 -2
- package/dist/esm/utils/cleanProps.js +2 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/components/AnalyticsContext/LegacyAnalyticsContext.d.ts +4 -4
- package/dist/types/components/AnalyticsErrorBoundary.d.ts +1 -1
- package/dist/types/components/AnalyticsListener/LegacyAnalyticsListener.d.ts +4 -4
- package/dist/types/events/AnalyticsEvent.d.ts +2 -0
- package/dist/types/events/UIAnalyticsEvent.d.ts +2 -0
- package/dist/types/hocs/withAnalyticsContext.d.ts +1 -1
- package/dist/types/hocs/withAnalyticsEvents.d.ts +1 -1
- package/dist/types/hooks/usePatchedProps.d.ts +1 -1
- package/dist/types/index.d.ts +2 -2
- package/dist/types/performance/examples.d.ts +1 -0
- package/package.json +5 -6
- package/report.api.md +7572 -0
- package/types/package.json +1 -0
- package/useAnalyticsEvents/package.json +1 -0
- package/useCallbackWithAnalytics/package.json +1 -0
- package/usePatchedProps/package.json +1 -0
- package/usePlatformLeafEventHandler/package.json +1 -0
- package/withAnalyticsContext/package.json +1 -0
- package/withAnalyticsEvents/package.json +1 -0
- package/dist/cjs/performance/examples.js +0 -258
- package/dist/es2019/performance/examples.js +0 -197
- package/dist/esm/performance/examples.js +0 -228
|
@@ -10,12 +10,12 @@ interface Props {
|
|
|
10
10
|
}
|
|
11
11
|
declare class AnalyticsContext extends Component<Props, AnalyticsReactContextInterface> {
|
|
12
12
|
static contextTypes: {
|
|
13
|
-
getAtlaskitAnalyticsContext: PropTypes.Requireable<any>;
|
|
14
|
-
getAtlaskitAnalyticsEventHandlers: PropTypes.Requireable<any>;
|
|
13
|
+
getAtlaskitAnalyticsContext: PropTypes.Requireable<(...args: any[]) => any>;
|
|
14
|
+
getAtlaskitAnalyticsEventHandlers: PropTypes.Requireable<(...args: any[]) => any>;
|
|
15
15
|
};
|
|
16
16
|
static childContextTypes: {
|
|
17
|
-
getAtlaskitAnalyticsContext: PropTypes.Requireable<any>;
|
|
18
|
-
getAtlaskitAnalyticsEventHandlers: PropTypes.Requireable<any>;
|
|
17
|
+
getAtlaskitAnalyticsContext: PropTypes.Requireable<(...args: any[]) => any>;
|
|
18
|
+
getAtlaskitAnalyticsEventHandlers: PropTypes.Requireable<(...args: any[]) => any>;
|
|
19
19
|
};
|
|
20
20
|
contextValue: AnalyticsReactContextInterface;
|
|
21
21
|
constructor(props: Props);
|
|
@@ -25,5 +25,5 @@ export declare class BaseAnalyticsErrorBoundary extends Component<AnalyticsError
|
|
|
25
25
|
componentDidCatch(error: Error, info?: AnalyticsErrorBoundaryErrorInfo): void;
|
|
26
26
|
render(): JSX.Element;
|
|
27
27
|
}
|
|
28
|
-
declare const AnalyticsErrorBoundary: React.ForwardRefExoticComponent<
|
|
28
|
+
declare const AnalyticsErrorBoundary: React.ForwardRefExoticComponent<Omit<AnalyticsErrorBoundaryProps, keyof WithAnalyticsEventsProps> & React.RefAttributes<any>>;
|
|
29
29
|
export default AnalyticsErrorBoundary;
|
|
@@ -13,12 +13,12 @@ declare type Props = {
|
|
|
13
13
|
};
|
|
14
14
|
declare class AnalyticsListener extends Component<Props> {
|
|
15
15
|
static contextTypes: {
|
|
16
|
-
getAtlaskitAnalyticsEventHandlers: PropTypes.Requireable<any>;
|
|
17
|
-
getAtlaskitAnalyticsContext: PropTypes.Requireable<any>;
|
|
16
|
+
getAtlaskitAnalyticsEventHandlers: PropTypes.Requireable<(...args: any[]) => any>;
|
|
17
|
+
getAtlaskitAnalyticsContext: PropTypes.Requireable<(...args: any[]) => any>;
|
|
18
18
|
};
|
|
19
19
|
static childContextTypes: {
|
|
20
|
-
getAtlaskitAnalyticsEventHandlers: PropTypes.Requireable<any>;
|
|
21
|
-
getAtlaskitAnalyticsContext: PropTypes.Requireable<any>;
|
|
20
|
+
getAtlaskitAnalyticsEventHandlers: PropTypes.Requireable<(...args: any[]) => any>;
|
|
21
|
+
getAtlaskitAnalyticsContext: PropTypes.Requireable<(...args: any[]) => any>;
|
|
22
22
|
};
|
|
23
23
|
contextValue: AnalyticsReactContextInterface;
|
|
24
24
|
constructor(props: Props);
|
|
@@ -4,8 +4,10 @@ declare type AnalyticsEventUpdater = AnalyticsEventPayload | AnalyticsEventCallb
|
|
|
4
4
|
export declare type AnalyticsEventProps = {
|
|
5
5
|
payload: AnalyticsEventPayload;
|
|
6
6
|
};
|
|
7
|
+
export declare const isAnalyticsEvent: (obj: any) => boolean;
|
|
7
8
|
export default class AnalyticsEvent {
|
|
8
9
|
payload: AnalyticsEventPayload;
|
|
10
|
+
_isAnalyticsEvent: boolean;
|
|
9
11
|
constructor(props: AnalyticsEventProps);
|
|
10
12
|
clone: () => AnalyticsEvent | null;
|
|
11
13
|
update(updater: AnalyticsEventUpdater): this;
|
|
@@ -6,10 +6,12 @@ export declare type UIAnalyticsEventProps = AnalyticsEventProps & {
|
|
|
6
6
|
context?: Context;
|
|
7
7
|
handlers?: UIAnalyticsEventHandler[];
|
|
8
8
|
};
|
|
9
|
+
export declare const isUIAnalyticsEvent: (obj: any) => boolean;
|
|
9
10
|
export default class UIAnalyticsEvent extends AnalyticsEvent {
|
|
10
11
|
context: Context;
|
|
11
12
|
handlers: UIAnalyticsEventHandler[];
|
|
12
13
|
hasFired: boolean;
|
|
14
|
+
_isUIAnalyticsEvent: boolean;
|
|
13
15
|
constructor(props: UIAnalyticsEventProps);
|
|
14
16
|
clone: () => UIAnalyticsEvent | null;
|
|
15
17
|
fire: (channel?: string | undefined) => void;
|
|
@@ -2,5 +2,5 @@ import React from 'react';
|
|
|
2
2
|
export interface WithContextProps {
|
|
3
3
|
analyticsContext?: Record<string, any>;
|
|
4
4
|
}
|
|
5
|
-
declare const withAnalyticsContext: (defaultData?: any) => <Props, Component>(WrappedComponent:
|
|
5
|
+
declare const withAnalyticsContext: (defaultData?: any) => <Props, Component>(WrappedComponent: React.JSXElementConstructor<Props> & Component) => React.ForwardRefExoticComponent<React.PropsWithoutRef<JSX.LibraryManagedAttributes<Component, Props & WithContextProps>> & React.RefAttributes<any>>;
|
|
6
6
|
export default withAnalyticsContext;
|
|
@@ -8,5 +8,5 @@ export interface WithAnalyticsEventsProps {
|
|
|
8
8
|
createAnalyticsEvent?: CreateUIAnalyticsEvent;
|
|
9
9
|
ref?: React.Ref<any>;
|
|
10
10
|
}
|
|
11
|
-
declare const withAnalyticsEvents: (createEventMap?: CreateEventMap) => <Props extends WithAnalyticsEventsProps, Component>(WrappedComponent:
|
|
11
|
+
declare const withAnalyticsEvents: (createEventMap?: CreateEventMap) => <Props extends WithAnalyticsEventsProps, Component>(WrappedComponent: React.JSXElementConstructor<Props> & Component) => React.ForwardRefExoticComponent<React.PropsWithoutRef<JSX.LibraryManagedAttributes<Component, Omit<Props, keyof WithAnalyticsEventsProps>>> & React.RefAttributes<any>>;
|
|
12
12
|
export default withAnalyticsEvents;
|
|
@@ -2,4 +2,4 @@ import { CreateEventMap } from '../types';
|
|
|
2
2
|
export declare type PatchedPropsHook = {
|
|
3
3
|
patchedEventProps: CreateEventMap;
|
|
4
4
|
};
|
|
5
|
-
export declare function usePatchedProps<Props extends Record<string, any>>(createEventMap:
|
|
5
|
+
export declare function usePatchedProps<Props extends Record<string, any>>(createEventMap: CreateEventMap | undefined, wrappedComponentProps: Props): PatchedPropsHook;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export type { CreateUIAnalyticsEvent } from './types';
|
|
2
|
-
export { default as AnalyticsEvent } from './events/AnalyticsEvent';
|
|
2
|
+
export { default as AnalyticsEvent, isAnalyticsEvent, } from './events/AnalyticsEvent';
|
|
3
3
|
export type { AnalyticsEventPayload, AnalyticsEventProps, } from './events/AnalyticsEvent';
|
|
4
|
-
export { default as UIAnalyticsEvent } from './events/UIAnalyticsEvent';
|
|
4
|
+
export { default as UIAnalyticsEvent, isUIAnalyticsEvent, } from './events/UIAnalyticsEvent';
|
|
5
5
|
export type { UIAnalyticsEventProps, UIAnalyticsEventHandler, } from './events/UIAnalyticsEvent';
|
|
6
6
|
export { default as AnalyticsListener } from './components/AnalyticsListener/index';
|
|
7
7
|
export { default as AnalyticsContext } from './components/AnalyticsContext/index';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/analytics-next",
|
|
3
|
-
"version": "8.2
|
|
3
|
+
"version": "8.3.2",
|
|
4
4
|
"description": "React components, HOCs and hooks to assist with tracking user activity with React components",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"sideEffects": false,
|
|
16
16
|
"atlaskit:src": "src/index.ts",
|
|
17
17
|
"atlassian": {
|
|
18
|
-
"team": "
|
|
18
|
+
"team": "UIP Frontend Observability",
|
|
19
19
|
"releaseModel": "scheduled",
|
|
20
20
|
"website": {
|
|
21
21
|
"name": "Analytics next"
|
|
@@ -48,8 +48,7 @@
|
|
|
48
48
|
"react": "^16.8.0"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
|
-
"@atlaskit/
|
|
52
|
-
"@atlaskit/button": "^16.0.0",
|
|
51
|
+
"@atlaskit/button": "^16.3.0",
|
|
53
52
|
"@atlaskit/docs": "*",
|
|
54
53
|
"@atlaskit/ssr": "*",
|
|
55
54
|
"@atlaskit/textfield": "^5.0.0",
|
|
@@ -59,7 +58,7 @@
|
|
|
59
58
|
"react-dom": "^16.8.0",
|
|
60
59
|
"redux": "^3.7.2",
|
|
61
60
|
"storybook-addon-performance": "^0.16.0",
|
|
62
|
-
"typescript": "3.
|
|
61
|
+
"typescript": "4.3.5"
|
|
63
62
|
},
|
|
64
63
|
"techstack": {
|
|
65
64
|
"@atlassian/frontend": {
|
|
@@ -73,7 +72,7 @@
|
|
|
73
72
|
"analytics-next"
|
|
74
73
|
],
|
|
75
74
|
"theming": [
|
|
76
|
-
"
|
|
75
|
+
"react-context"
|
|
77
76
|
],
|
|
78
77
|
"deprecation": [
|
|
79
78
|
"no-deprecated-imports"
|