@atlaskit/analytics-next 9.0.2 → 9.1.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/CHANGELOG.md +6 -0
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/version.json +1 -1
- package/package.json +3 -3
- package/tmp/api-report-tmp.d.ts +0 -225
package/CHANGELOG.md
CHANGED
package/dist/cjs/version.json
CHANGED
package/dist/es2019/version.json
CHANGED
package/dist/esm/version.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/analytics-next",
|
|
3
|
-
"version": "9.0
|
|
3
|
+
"version": "9.1.0",
|
|
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/"
|
|
@@ -51,10 +51,10 @@
|
|
|
51
51
|
"react": "^16.8.0"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
|
-
"@atlaskit/button": "^16.
|
|
54
|
+
"@atlaskit/button": "^16.7.0",
|
|
55
55
|
"@atlaskit/docs": "*",
|
|
56
56
|
"@atlaskit/ssr": "*",
|
|
57
|
-
"@atlaskit/textfield": "^5.
|
|
57
|
+
"@atlaskit/textfield": "^5.4.0",
|
|
58
58
|
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|
|
59
59
|
"@testing-library/react": "^12.1.5",
|
|
60
60
|
"enzyme": "^3.10.0",
|
package/tmp/api-report-tmp.d.ts
DELETED
|
@@ -1,225 +0,0 @@
|
|
|
1
|
-
## API Report File for "@atlaskit/analytics-next"
|
|
2
|
-
|
|
3
|
-
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
-
|
|
5
|
-
```ts
|
|
6
|
-
|
|
7
|
-
/// <reference types="react" />
|
|
8
|
-
|
|
9
|
-
import { default as AnalyticsReactContext } from '@atlaskit/analytics-next-stable-react-context';
|
|
10
|
-
import { AnalyticsReactContextInterface } from '@atlaskit/analytics-next-stable-react-context';
|
|
11
|
-
import { Component } from 'react';
|
|
12
|
-
import { default as React_2 } from 'react';
|
|
13
|
-
import { ReactNode } from 'react';
|
|
14
|
-
|
|
15
|
-
// @public (undocumented)
|
|
16
|
-
export let AnalyticsContext: AnalyticsContextFunction;
|
|
17
|
-
|
|
18
|
-
// @public (undocumented)
|
|
19
|
-
type AnalyticsContextFunction = (props: {
|
|
20
|
-
children: React.ReactNode;
|
|
21
|
-
data: Object;
|
|
22
|
-
}, context?: AnalyticsReactContextInterface) => JSX.Element;
|
|
23
|
-
|
|
24
|
-
// @public @deprecated (undocumented)
|
|
25
|
-
export class AnalyticsErrorBoundary extends Component<AnalyticsErrorBoundaryProps, AnalyticsErrorBoundaryState> {
|
|
26
|
-
constructor(props: AnalyticsErrorBoundaryProps);
|
|
27
|
-
// (undocumented)
|
|
28
|
-
componentDidCatch(error: Error, info?: AnalyticsErrorBoundaryErrorInfo): void;
|
|
29
|
-
// (undocumented)
|
|
30
|
-
render(): JSX.Element | null;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
// @public (undocumented)
|
|
34
|
-
type AnalyticsErrorBoundaryErrorInfo = {
|
|
35
|
-
componentStack: string;
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
// @public (undocumented)
|
|
39
|
-
export interface AnalyticsErrorBoundaryProps {
|
|
40
|
-
// (undocumented)
|
|
41
|
-
channel: string;
|
|
42
|
-
children: ReactNode;
|
|
43
|
-
// (undocumented)
|
|
44
|
-
data: {};
|
|
45
|
-
// (undocumented)
|
|
46
|
-
ErrorComponent?: React_2.ComponentType;
|
|
47
|
-
// (undocumented)
|
|
48
|
-
onError?: (error: Error, info?: AnalyticsErrorBoundaryErrorInfo) => void;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
// @public (undocumented)
|
|
52
|
-
type AnalyticsErrorBoundaryState = {
|
|
53
|
-
hasError: boolean;
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
// @public (undocumented)
|
|
57
|
-
export class AnalyticsEvent {
|
|
58
|
-
constructor(props: AnalyticsEventProps);
|
|
59
|
-
// (undocumented)
|
|
60
|
-
clone: () => AnalyticsEvent | null;
|
|
61
|
-
// (undocumented)
|
|
62
|
-
_isAnalyticsEvent: boolean;
|
|
63
|
-
// (undocumented)
|
|
64
|
-
payload: AnalyticsEventPayload;
|
|
65
|
-
// (undocumented)
|
|
66
|
-
update(updater: AnalyticsEventUpdater): this;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
// @public (undocumented)
|
|
70
|
-
type AnalyticsEventCallback = (payload: AnalyticsEventPayload) => AnalyticsEventPayload;
|
|
71
|
-
|
|
72
|
-
// @public (undocumented)
|
|
73
|
-
type AnalyticsEventCreator = (create: CreateUIAnalyticsEvent, props: Record<string, any>) => UIAnalyticsEvent | undefined;
|
|
74
|
-
|
|
75
|
-
// @public (undocumented)
|
|
76
|
-
export type AnalyticsEventPayload = Record<string, any>;
|
|
77
|
-
|
|
78
|
-
// @public (undocumented)
|
|
79
|
-
export type AnalyticsEventProps = {
|
|
80
|
-
payload: AnalyticsEventPayload;
|
|
81
|
-
};
|
|
82
|
-
|
|
83
|
-
// @public (undocumented)
|
|
84
|
-
type AnalyticsEventUpdater = AnalyticsEventCallback | AnalyticsEventPayload;
|
|
85
|
-
|
|
86
|
-
// @public (undocumented)
|
|
87
|
-
export let AnalyticsListener: AnalyticsListenerFunction;
|
|
88
|
-
|
|
89
|
-
// @public (undocumented)
|
|
90
|
-
type AnalyticsListenerFunction = (props: {
|
|
91
|
-
children?: React.ReactNode;
|
|
92
|
-
channel?: string;
|
|
93
|
-
onEvent: (event: UIAnalyticsEvent, channel?: string) => void;
|
|
94
|
-
}, context?: AnalyticsReactContextInterface) => JSX.Element;
|
|
95
|
-
|
|
96
|
-
export { AnalyticsReactContext }
|
|
97
|
-
|
|
98
|
-
export { AnalyticsReactContextInterface }
|
|
99
|
-
|
|
100
|
-
// @public (undocumented)
|
|
101
|
-
type ChannelIdentifier = string;
|
|
102
|
-
|
|
103
|
-
// @public (undocumented)
|
|
104
|
-
export function cleanProps(props: Record<string, any>): {
|
|
105
|
-
[x: string]: any;
|
|
106
|
-
};
|
|
107
|
-
|
|
108
|
-
// @public (undocumented)
|
|
109
|
-
type Context = Record<string, any>[];
|
|
110
|
-
|
|
111
|
-
// @public (undocumented)
|
|
112
|
-
export const createAndFireEvent: (channel?: string | undefined) => (payload: AnalyticsEventPayload) => (createAnalyticsEvent: CreateUIAnalyticsEvent) => UIAnalyticsEvent;
|
|
113
|
-
|
|
114
|
-
// @public (undocumented)
|
|
115
|
-
type CreateEventMap = Record<string, CreateEventMapValue>;
|
|
116
|
-
|
|
117
|
-
// @public (undocumented)
|
|
118
|
-
type CreateEventMapValue = AnalyticsEventCreator | AnalyticsEventPayload;
|
|
119
|
-
|
|
120
|
-
// @public (undocumented)
|
|
121
|
-
export type CreateUIAnalyticsEvent = (payload: AnalyticsEventPayload) => UIAnalyticsEvent;
|
|
122
|
-
|
|
123
|
-
// @public (undocumented)
|
|
124
|
-
export const isAnalyticsEvent: (obj: any) => boolean;
|
|
125
|
-
|
|
126
|
-
// @public (undocumented)
|
|
127
|
-
export const isUIAnalyticsEvent: (obj: any) => boolean;
|
|
128
|
-
|
|
129
|
-
// @public (undocumented)
|
|
130
|
-
export class UIAnalyticsEvent extends AnalyticsEvent {
|
|
131
|
-
constructor(props: UIAnalyticsEventProps);
|
|
132
|
-
// (undocumented)
|
|
133
|
-
clone: () => UIAnalyticsEvent | null;
|
|
134
|
-
// (undocumented)
|
|
135
|
-
context: Context;
|
|
136
|
-
// (undocumented)
|
|
137
|
-
fire: (channel?: string | undefined) => void;
|
|
138
|
-
// (undocumented)
|
|
139
|
-
handlers: UIAnalyticsEventHandler[];
|
|
140
|
-
// (undocumented)
|
|
141
|
-
hasFired: boolean;
|
|
142
|
-
// (undocumented)
|
|
143
|
-
_isUIAnalyticsEvent: boolean;
|
|
144
|
-
// (undocumented)
|
|
145
|
-
update(updater: ((payload: AnalyticsEventPayload) => AnalyticsEventPayload) | Record<string, any>): this;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
// @public (undocumented)
|
|
149
|
-
export type UIAnalyticsEventHandler = (event: UIAnalyticsEvent, channel?: ChannelIdentifier) => void;
|
|
150
|
-
|
|
151
|
-
// @public (undocumented)
|
|
152
|
-
export type UIAnalyticsEventProps = AnalyticsEventProps & {
|
|
153
|
-
context?: Context;
|
|
154
|
-
handlers?: UIAnalyticsEventHandler[];
|
|
155
|
-
};
|
|
156
|
-
|
|
157
|
-
// @public (undocumented)
|
|
158
|
-
export function useAnalyticsEvents(): UseAnalyticsEventsHook;
|
|
159
|
-
|
|
160
|
-
// @public (undocumented)
|
|
161
|
-
export type UseAnalyticsEventsHook = {
|
|
162
|
-
createAnalyticsEvent: CreateUIAnalyticsEvent;
|
|
163
|
-
};
|
|
164
|
-
|
|
165
|
-
// @public (undocumented)
|
|
166
|
-
export const useCallbackWithAnalytics: UseCallbackWithAnalyticsHook;
|
|
167
|
-
|
|
168
|
-
// @public (undocumented)
|
|
169
|
-
export type UseCallbackWithAnalyticsHook = (method: (...args: any[]) => void, payload: ((...args: any[]) => void) | Record<string, any>, channel?: string) => (...args: any[]) => void;
|
|
170
|
-
|
|
171
|
-
// @public (undocumented)
|
|
172
|
-
export function usePlatformLeafEventHandler<T>({ fn, action, componentName, actionSubject, packageName, packageVersion, analyticsData, }: UsePlatformLeafEventHandlerHookArgs<T>): (value: T) => void;
|
|
173
|
-
|
|
174
|
-
// @public (undocumented)
|
|
175
|
-
export type UsePlatformLeafEventHandlerHook<T> = (value: T) => void;
|
|
176
|
-
|
|
177
|
-
// @public (undocumented)
|
|
178
|
-
export type UsePlatformLeafEventHandlerHookArgs<T> = {
|
|
179
|
-
fn: (value: T, analyticsEvent: UIAnalyticsEvent) => void;
|
|
180
|
-
action: string;
|
|
181
|
-
componentName: string;
|
|
182
|
-
actionSubject?: string;
|
|
183
|
-
packageName: string;
|
|
184
|
-
packageVersion: string;
|
|
185
|
-
analyticsData?: Record<string, any>;
|
|
186
|
-
};
|
|
187
|
-
|
|
188
|
-
// @public (undocumented)
|
|
189
|
-
export function usePlatformLeafSyntheticEventHandler({ fn, action, componentName, packageName, packageVersion, analyticsData, }: UsePlatformLeafSyntheticEventHandlerHookArgs): () => void;
|
|
190
|
-
|
|
191
|
-
// @public (undocumented)
|
|
192
|
-
export type UsePlatformLeafSyntheticEventHandlerHook = () => void;
|
|
193
|
-
|
|
194
|
-
// @public (undocumented)
|
|
195
|
-
export type UsePlatformLeafSyntheticEventHandlerHookArgs = {
|
|
196
|
-
fn: (analyticsEvent: UIAnalyticsEvent) => void;
|
|
197
|
-
action: string;
|
|
198
|
-
componentName: string;
|
|
199
|
-
packageName: string;
|
|
200
|
-
packageVersion: string;
|
|
201
|
-
analyticsData?: Record<string, any>;
|
|
202
|
-
};
|
|
203
|
-
|
|
204
|
-
// @public (undocumented)
|
|
205
|
-
export const withAnalyticsContext: (defaultData?: any) => <Props, Component>(WrappedComponent: React_2.JSXElementConstructor<Props> & Component) => React_2.ForwardRefExoticComponent<React_2.PropsWithoutRef<JSX.LibraryManagedAttributes<Component, Props & WithContextProps>> & React_2.RefAttributes<any>>;
|
|
206
|
-
|
|
207
|
-
// @public (undocumented)
|
|
208
|
-
export const withAnalyticsEvents: (createEventMap?: CreateEventMap) => <Props extends WithAnalyticsEventsProps, Component>(WrappedComponent: React_2.JSXElementConstructor<Props> & Component) => React_2.ForwardRefExoticComponent<React_2.PropsWithoutRef<JSX.LibraryManagedAttributes<Component, Omit<Props, keyof WithAnalyticsEventsProps>>> & React_2.RefAttributes<any>>;
|
|
209
|
-
|
|
210
|
-
// @public (undocumented)
|
|
211
|
-
export interface WithAnalyticsEventsProps {
|
|
212
|
-
createAnalyticsEvent?: CreateUIAnalyticsEvent;
|
|
213
|
-
// (undocumented)
|
|
214
|
-
ref?: React_2.Ref<any>;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
// @public (undocumented)
|
|
218
|
-
export interface WithContextProps {
|
|
219
|
-
// (undocumented)
|
|
220
|
-
analyticsContext?: Record<string, any>;
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
// (No @packageDocumentation comment for this package)
|
|
224
|
-
|
|
225
|
-
```
|