@atlaskit/analytics-next 8.3.5 → 9.0.1
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 +12 -0
- package/dist/cjs/components/AnalyticsContext/LegacyAnalyticsContext.js +4 -28
- package/dist/cjs/components/AnalyticsContext/ModernAnalyticsContext.js +1 -12
- package/dist/cjs/components/AnalyticsContext/index.js +0 -7
- package/dist/cjs/components/AnalyticsErrorBoundary.js +19 -68
- package/dist/cjs/components/AnalyticsListener/LegacyAnalyticsListener.js +6 -32
- package/dist/cjs/components/AnalyticsListener/ModernAnalyticsListener.js +2 -14
- package/dist/cjs/components/AnalyticsListener/index.js +0 -7
- package/dist/cjs/events/AnalyticsEvent.js +2 -18
- package/dist/cjs/events/UIAnalyticsEvent.js +3 -31
- package/dist/cjs/hocs/withAnalyticsContext.js +5 -17
- package/dist/cjs/hocs/withAnalyticsEvents.js +6 -16
- package/dist/cjs/hooks/useAnalyticsContext.js +0 -5
- package/dist/cjs/hooks/useAnalyticsEvents.js +0 -5
- package/dist/cjs/hooks/useCallbackWithAnalytics.js +1 -7
- package/dist/cjs/hooks/usePatchedProps.js +3 -19
- package/dist/cjs/hooks/usePlatformLeafEventHandler.js +20 -27
- package/dist/cjs/hooks/usePlatformLeafSyntheticEventHandler.js +19 -26
- package/dist/cjs/hooks/useTrackedRef.js +0 -3
- package/dist/cjs/index.js +0 -18
- package/dist/cjs/test-utils/useRenderCounter.js +0 -3
- package/dist/cjs/utils/cleanProps.js +1 -5
- package/dist/cjs/utils/createAndFireEvent.js +0 -4
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/components/AnalyticsContext/LegacyAnalyticsContext.js +2 -12
- package/dist/es2019/components/AnalyticsContext/ModernAnalyticsContext.js +0 -2
- package/dist/es2019/components/AnalyticsContext/index.js +0 -3
- package/dist/es2019/components/AnalyticsErrorBoundary.js +8 -38
- package/dist/es2019/components/AnalyticsListener/LegacyAnalyticsListener.js +2 -14
- package/dist/es2019/components/AnalyticsListener/ModernAnalyticsListener.js +0 -3
- package/dist/es2019/components/AnalyticsListener/index.js +0 -3
- package/dist/es2019/events/AnalyticsEvent.js +6 -10
- package/dist/es2019/events/UIAnalyticsEvent.js +3 -15
- package/dist/es2019/hocs/withAnalyticsContext.js +6 -5
- package/dist/es2019/hocs/withAnalyticsEvents.js +4 -4
- package/dist/es2019/hooks/usePatchedProps.js +6 -9
- package/dist/es2019/hooks/usePlatformLeafEventHandler.js +14 -10
- package/dist/es2019/hooks/usePlatformLeafSyntheticEventHandler.js +14 -10
- package/dist/es2019/index.js +2 -1
- package/dist/es2019/test-utils/useRenderCounter.js +2 -1
- package/dist/es2019/utils/createAndFireEvent.js +0 -2
- package/dist/es2019/version.json +1 -1
- package/dist/esm/components/AnalyticsContext/LegacyAnalyticsContext.js +4 -21
- package/dist/esm/components/AnalyticsContext/ModernAnalyticsContext.js +1 -3
- package/dist/esm/components/AnalyticsContext/index.js +0 -3
- package/dist/esm/components/AnalyticsErrorBoundary.js +18 -54
- package/dist/esm/components/AnalyticsListener/LegacyAnalyticsListener.js +6 -25
- package/dist/esm/components/AnalyticsListener/ModernAnalyticsListener.js +2 -5
- package/dist/esm/components/AnalyticsListener/index.js +0 -3
- package/dist/esm/events/AnalyticsEvent.js +2 -16
- package/dist/esm/events/UIAnalyticsEvent.js +3 -27
- package/dist/esm/hocs/withAnalyticsContext.js +5 -9
- package/dist/esm/hocs/withAnalyticsEvents.js +6 -8
- package/dist/esm/hooks/useCallbackWithAnalytics.js +1 -2
- package/dist/esm/hooks/usePatchedProps.js +3 -14
- package/dist/esm/hooks/usePlatformLeafEventHandler.js +20 -22
- package/dist/esm/hooks/usePlatformLeafSyntheticEventHandler.js +19 -21
- package/dist/esm/index.js +2 -1
- package/dist/esm/test-utils/useRenderCounter.js +2 -1
- package/dist/esm/utils/cleanProps.js +1 -2
- package/dist/esm/utils/createAndFireEvent.js +0 -2
- package/dist/esm/version.json +1 -1
- package/dist/types/components/AnalyticsErrorBoundary.d.ts +7 -12
- package/package.json +9 -11
- package/report.api.md +152 -7410
- package/tmp/api-report-tmp.d.ts +225 -0
- package/dist/types-ts4.0/components/AnalyticsContext/LegacyAnalyticsContext.d.ts +0 -29
- package/dist/types-ts4.0/components/AnalyticsContext/ModernAnalyticsContext.d.ts +0 -3
- package/dist/types-ts4.0/components/AnalyticsContext/index.d.ts +0 -3
- package/dist/types-ts4.0/components/AnalyticsContext/types.d.ts +0 -9
- package/dist/types-ts4.0/components/AnalyticsErrorBoundary.d.ts +0 -29
- package/dist/types-ts4.0/components/AnalyticsListener/LegacyAnalyticsListener.d.ts +0 -33
- package/dist/types-ts4.0/components/AnalyticsListener/ModernAnalyticsListener.d.ts +0 -3
- package/dist/types-ts4.0/components/AnalyticsListener/index.d.ts +0 -3
- package/dist/types-ts4.0/components/AnalyticsListener/types.d.ts +0 -12
- package/dist/types-ts4.0/events/AnalyticsEvent.d.ts +0 -15
- package/dist/types-ts4.0/events/UIAnalyticsEvent.d.ts +0 -20
- package/dist/types-ts4.0/hocs/withAnalyticsContext.d.ts +0 -6
- package/dist/types-ts4.0/hocs/withAnalyticsEvents.d.ts +0 -12
- package/dist/types-ts4.0/hooks/useAnalyticsContext.d.ts +0 -2
- package/dist/types-ts4.0/hooks/useAnalyticsEvents.d.ts +0 -5
- package/dist/types-ts4.0/hooks/useCallbackWithAnalytics.d.ts +0 -2
- package/dist/types-ts4.0/hooks/usePatchedProps.d.ts +0 -5
- package/dist/types-ts4.0/hooks/usePlatformLeafEventHandler.d.ts +0 -12
- package/dist/types-ts4.0/hooks/usePlatformLeafSyntheticEventHandler.d.ts +0 -11
- package/dist/types-ts4.0/hooks/useTrackedRef.d.ts +0 -2
- package/dist/types-ts4.0/index.d.ts +0 -25
- package/dist/types-ts4.0/performance/examples.d.ts +0 -5
- package/dist/types-ts4.0/test-utils/useRenderCounter.d.ts +0 -1
- package/dist/types-ts4.0/types.d.ts +0 -6
- package/dist/types-ts4.0/utils/cleanProps.d.ts +0 -3
- package/dist/types-ts4.0/utils/createAndFireEvent.d.ts +0 -4
|
@@ -1,23 +1,19 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import _typeof from "@babel/runtime/helpers/typeof";
|
|
3
|
-
|
|
4
3
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
5
|
-
|
|
6
4
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
7
|
-
|
|
8
5
|
import { useMemo, useRef } from 'react';
|
|
9
6
|
import { useAnalyticsEvents } from './useAnalyticsEvents';
|
|
10
7
|
export function usePatchedProps() {
|
|
11
8
|
var createEventMap = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
12
9
|
var wrappedComponentProps = arguments.length > 1 ? arguments[1] : undefined;
|
|
13
|
-
|
|
14
10
|
var _useAnalyticsEvents = useAnalyticsEvents(),
|
|
15
|
-
|
|
16
|
-
|
|
11
|
+
createAnalyticsEvent = _useAnalyticsEvents.createAnalyticsEvent;
|
|
17
12
|
var handlerCache = useRef({});
|
|
18
13
|
var patchedProps = useMemo(function () {
|
|
19
|
-
var cache = handlerCache.current;
|
|
14
|
+
var cache = handlerCache.current;
|
|
20
15
|
|
|
16
|
+
// Clean up no longer used handlers in cache
|
|
21
17
|
Object.keys(cache).filter(function (key) {
|
|
22
18
|
return !(key in createEventMap);
|
|
23
19
|
}).forEach(function (key) {
|
|
@@ -25,29 +21,22 @@ export function usePatchedProps() {
|
|
|
25
21
|
});
|
|
26
22
|
return Object.keys(createEventMap).reduce(function (p, k) {
|
|
27
23
|
var eventCreator = createEventMap[k];
|
|
28
|
-
|
|
29
24
|
if (!['object', 'function'].includes(_typeof(eventCreator))) {
|
|
30
25
|
return p;
|
|
31
26
|
}
|
|
32
|
-
|
|
33
27
|
var propValue = wrappedComponentProps[k];
|
|
34
|
-
|
|
35
28
|
if (k in cache && cache[k].eventCreator === eventCreator && cache[k].propValue === propValue) {
|
|
36
29
|
return _objectSpread(_objectSpread({}, p), {}, _defineProperty({}, k, cache[k].wrappedCallback));
|
|
37
30
|
}
|
|
38
|
-
|
|
39
31
|
var wrappedCallback = function wrappedCallback() {
|
|
40
32
|
var analyticsEvent = typeof eventCreator === 'function' ? eventCreator(createAnalyticsEvent, wrappedComponentProps) : createAnalyticsEvent(eventCreator);
|
|
41
|
-
|
|
42
33
|
if (propValue && typeof propValue === 'function') {
|
|
43
34
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
44
35
|
args[_key] = arguments[_key];
|
|
45
36
|
}
|
|
46
|
-
|
|
47
37
|
propValue.apply(void 0, args.concat([analyticsEvent]));
|
|
48
38
|
}
|
|
49
39
|
};
|
|
50
|
-
|
|
51
40
|
cache[k] = {
|
|
52
41
|
eventCreator: eventCreator,
|
|
53
42
|
wrappedCallback: wrappedCallback,
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
|
|
3
2
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4
|
-
|
|
5
3
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
6
|
-
|
|
7
4
|
import { useCallback } from 'react';
|
|
8
5
|
import { useAnalyticsEvents } from './useAnalyticsEvents';
|
|
9
6
|
import { useTrackedRef } from './useTrackedRef';
|
|
@@ -15,20 +12,19 @@ import { useTrackedRef } from './useTrackedRef';
|
|
|
15
12
|
// or AnalyticsContext component instead.
|
|
16
13
|
export function usePlatformLeafEventHandler(_ref) {
|
|
17
14
|
var fn = _ref.fn,
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
15
|
+
action = _ref.action,
|
|
16
|
+
componentName = _ref.componentName,
|
|
17
|
+
actionSubject = _ref.actionSubject,
|
|
18
|
+
packageName = _ref.packageName,
|
|
19
|
+
packageVersion = _ref.packageVersion,
|
|
20
|
+
analyticsData = _ref.analyticsData;
|
|
25
21
|
var _useAnalyticsEvents = useAnalyticsEvents(),
|
|
26
|
-
|
|
22
|
+
createAnalyticsEvent = _useAnalyticsEvents.createAnalyticsEvent;
|
|
23
|
+
|
|
24
|
+
// We put analyticsData and fn in a ref so that we don't need to break
|
|
27
25
|
// memoization.
|
|
28
26
|
// Generally these could be defined by consumers inline
|
|
29
27
|
// and so we do this to avoid breaking memoization of useCallback
|
|
30
|
-
|
|
31
|
-
|
|
32
28
|
var dataRef = useTrackedRef(analyticsData);
|
|
33
29
|
var fnRef = useTrackedRef(fn);
|
|
34
30
|
var handler = useCallback(function (value) {
|
|
@@ -40,28 +36,30 @@ export function usePlatformLeafEventHandler(_ref) {
|
|
|
40
36
|
packageName: packageName,
|
|
41
37
|
packageVersion: packageVersion
|
|
42
38
|
}
|
|
43
|
-
});
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
// To avoid wrapping this component in AnalyticsContext we manually
|
|
44
42
|
// push the parent context's meta data into the context.
|
|
45
43
|
// Note: this new 'context'
|
|
46
|
-
|
|
47
44
|
var context = _objectSpread({
|
|
48
45
|
componentName: componentName,
|
|
49
46
|
packageName: packageName,
|
|
50
47
|
packageVersion: packageVersion
|
|
51
48
|
}, dataRef.current);
|
|
49
|
+
analyticsEvent.context.push(context);
|
|
52
50
|
|
|
53
|
-
|
|
54
|
-
|
|
51
|
+
// fire an event on the atlaskit channel
|
|
55
52
|
var clone = analyticsEvent.clone();
|
|
56
|
-
|
|
57
53
|
if (clone) {
|
|
58
54
|
clone.fire('atlaskit');
|
|
59
55
|
}
|
|
60
|
-
|
|
61
56
|
fnRef.current(value, analyticsEvent);
|
|
62
|
-
}, [
|
|
63
|
-
|
|
64
|
-
|
|
57
|
+
}, [
|
|
58
|
+
// These are strings and won't change
|
|
59
|
+
action, componentName, actionSubject, packageName, packageVersion,
|
|
60
|
+
// This function is memoized in the context
|
|
61
|
+
createAnalyticsEvent,
|
|
62
|
+
// these are a stable ref because of the useTrackedRef hook
|
|
65
63
|
dataRef, fnRef]);
|
|
66
64
|
return handler;
|
|
67
65
|
}
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
|
|
3
2
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4
|
-
|
|
5
3
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
6
|
-
|
|
7
4
|
import { useCallback } from 'react';
|
|
8
5
|
import { useAnalyticsEvents } from './useAnalyticsEvents';
|
|
9
6
|
import { useTrackedRef } from './useTrackedRef';
|
|
@@ -15,19 +12,18 @@ import { useTrackedRef } from './useTrackedRef';
|
|
|
15
12
|
// or AnalyticsContext component instead.
|
|
16
13
|
export function usePlatformLeafSyntheticEventHandler(_ref) {
|
|
17
14
|
var fn = _ref.fn,
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
15
|
+
action = _ref.action,
|
|
16
|
+
componentName = _ref.componentName,
|
|
17
|
+
packageName = _ref.packageName,
|
|
18
|
+
packageVersion = _ref.packageVersion,
|
|
19
|
+
analyticsData = _ref.analyticsData;
|
|
24
20
|
var _useAnalyticsEvents = useAnalyticsEvents(),
|
|
25
|
-
|
|
21
|
+
createAnalyticsEvent = _useAnalyticsEvents.createAnalyticsEvent;
|
|
22
|
+
|
|
23
|
+
// We put analyticsData and fn in a ref so that we don't need to break
|
|
26
24
|
// memoization.
|
|
27
25
|
// Generally these could be defined by consumers inline
|
|
28
26
|
// and so we do this to avoid breaking memoization of useCallback
|
|
29
|
-
|
|
30
|
-
|
|
31
27
|
var dataRef = useTrackedRef(analyticsData);
|
|
32
28
|
var fnRef = useTrackedRef(fn);
|
|
33
29
|
var handler = useCallback(function () {
|
|
@@ -39,28 +35,30 @@ export function usePlatformLeafSyntheticEventHandler(_ref) {
|
|
|
39
35
|
packageName: packageName,
|
|
40
36
|
packageVersion: packageVersion
|
|
41
37
|
}
|
|
42
|
-
});
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
// To avoid wrapping this component in AnalyticsContext we manually
|
|
43
41
|
// push the parent context's meta data into the context.
|
|
44
42
|
// Note: this new 'context'
|
|
45
|
-
|
|
46
43
|
var context = _objectSpread({
|
|
47
44
|
componentName: componentName,
|
|
48
45
|
packageName: packageName,
|
|
49
46
|
packageVersion: packageVersion
|
|
50
47
|
}, dataRef.current);
|
|
48
|
+
analyticsEvent.context.push(context);
|
|
51
49
|
|
|
52
|
-
|
|
53
|
-
|
|
50
|
+
// fire an event on the atlaskit channel
|
|
54
51
|
var clone = analyticsEvent.clone();
|
|
55
|
-
|
|
56
52
|
if (clone) {
|
|
57
53
|
clone.fire('atlaskit');
|
|
58
54
|
}
|
|
59
|
-
|
|
60
55
|
fnRef.current(analyticsEvent);
|
|
61
|
-
}, [
|
|
62
|
-
|
|
63
|
-
|
|
56
|
+
}, [
|
|
57
|
+
// These are strings and won't change
|
|
58
|
+
action, componentName, packageName, packageVersion,
|
|
59
|
+
// This function is memoized in the context
|
|
60
|
+
createAnalyticsEvent,
|
|
61
|
+
// these are a stable ref because of the useTrackedRef hook
|
|
64
62
|
dataRef, fnRef]);
|
|
65
63
|
return handler;
|
|
66
64
|
}
|
package/dist/esm/index.js
CHANGED
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
export { default as AnalyticsEvent, isAnalyticsEvent } from './events/AnalyticsEvent';
|
|
3
3
|
export { default as UIAnalyticsEvent, isUIAnalyticsEvent } from './events/UIAnalyticsEvent';
|
|
4
4
|
// AnalyticsListener component
|
|
5
|
-
export { default as AnalyticsListener } from './components/AnalyticsListener/index';
|
|
5
|
+
export { default as AnalyticsListener } from './components/AnalyticsListener/index';
|
|
6
6
|
|
|
7
|
+
// AnalyticsContext component and HOC
|
|
7
8
|
export { default as AnalyticsContext } from './components/AnalyticsContext/index';
|
|
8
9
|
export { default as withAnalyticsContext } from './hocs/withAnalyticsContext';
|
|
9
10
|
// AnalyticsErrorBoundary component
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { useEffect, useRef } from 'react';
|
|
1
|
+
import { useEffect, useRef } from 'react';
|
|
2
2
|
|
|
3
|
+
// Hook to track the number of renders in tests
|
|
3
4
|
export var useRenderCounter = function useRenderCounter() {
|
|
4
5
|
var ref = useRef(1);
|
|
5
6
|
useEffect(function () {
|
|
@@ -2,7 +2,6 @@ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProper
|
|
|
2
2
|
var _excluded = ["createAnalyticsEvent"];
|
|
3
3
|
export default function cleanProps(props) {
|
|
4
4
|
var createAnalyticsEvent = props.createAnalyticsEvent,
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
cleanedProps = _objectWithoutProperties(props, _excluded);
|
|
7
6
|
return cleanedProps;
|
|
8
7
|
}
|
|
@@ -3,11 +3,9 @@ export default (function (channel) {
|
|
|
3
3
|
return function (createAnalyticsEvent) {
|
|
4
4
|
var consumerEvent = createAnalyticsEvent(payload);
|
|
5
5
|
var clonedEvent = consumerEvent.clone();
|
|
6
|
-
|
|
7
6
|
if (clonedEvent) {
|
|
8
7
|
clonedEvent.fire(channel);
|
|
9
8
|
}
|
|
10
|
-
|
|
11
9
|
return consumerEvent;
|
|
12
10
|
};
|
|
13
11
|
};
|
package/dist/esm/version.json
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import React, { Component, ReactNode } from 'react';
|
|
2
|
-
import { WithAnalyticsEventsProps } from '../hocs/withAnalyticsEvents';
|
|
3
2
|
declare type AnalyticsErrorBoundaryErrorInfo = {
|
|
4
3
|
componentStack: string;
|
|
5
4
|
};
|
|
6
|
-
export interface AnalyticsErrorBoundaryProps
|
|
5
|
+
export interface AnalyticsErrorBoundaryProps {
|
|
7
6
|
/** React component to be wrapped */
|
|
8
7
|
children: ReactNode;
|
|
9
8
|
channel: string;
|
|
@@ -11,19 +10,15 @@ export interface AnalyticsErrorBoundaryProps extends WithAnalyticsEventsProps {
|
|
|
11
10
|
ErrorComponent?: React.ComponentType;
|
|
12
11
|
onError?: (error: Error, info?: AnalyticsErrorBoundaryErrorInfo) => void;
|
|
13
12
|
}
|
|
14
|
-
declare type AnalyticsErrorBoundaryPayload = {
|
|
15
|
-
error: Error | string;
|
|
16
|
-
info?: AnalyticsErrorBoundaryErrorInfo;
|
|
17
|
-
[key: string]: any;
|
|
18
|
-
};
|
|
19
13
|
declare type AnalyticsErrorBoundaryState = {
|
|
20
14
|
hasError: boolean;
|
|
21
15
|
};
|
|
22
|
-
|
|
16
|
+
/**
|
|
17
|
+
* @deprecated
|
|
18
|
+
*/
|
|
19
|
+
export default class AnalyticsErrorBoundary extends Component<AnalyticsErrorBoundaryProps, AnalyticsErrorBoundaryState> {
|
|
23
20
|
constructor(props: AnalyticsErrorBoundaryProps);
|
|
24
|
-
fireAnalytics: (analyticsErrorPayload: AnalyticsErrorBoundaryPayload) => void;
|
|
25
21
|
componentDidCatch(error: Error, info?: AnalyticsErrorBoundaryErrorInfo): void;
|
|
26
|
-
render(): JSX.Element;
|
|
22
|
+
render(): JSX.Element | null;
|
|
27
23
|
}
|
|
28
|
-
|
|
29
|
-
export default AnalyticsErrorBoundary;
|
|
24
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/analytics-next",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "9.0.1",
|
|
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/"
|
|
@@ -12,19 +12,14 @@
|
|
|
12
12
|
"module": "dist/esm/index.js",
|
|
13
13
|
"module:es2019": "dist/es2019/index.js",
|
|
14
14
|
"types": "dist/types/index.d.ts",
|
|
15
|
-
"typesVersions": {
|
|
16
|
-
">=4.0 <4.5": {
|
|
17
|
-
"*": [
|
|
18
|
-
"dist/types-ts4.0/*",
|
|
19
|
-
"dist/types-ts4.0/index.d.ts"
|
|
20
|
-
]
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
15
|
"sideEffects": false,
|
|
24
16
|
"atlaskit:src": "src/index.ts",
|
|
25
17
|
"atlassian": {
|
|
26
18
|
"team": "UIP Frontend Observability",
|
|
27
|
-
"releaseModel": "
|
|
19
|
+
"releaseModel": "continuous",
|
|
20
|
+
"productPushConsumption": [
|
|
21
|
+
"jira"
|
|
22
|
+
],
|
|
28
23
|
"website": {
|
|
29
24
|
"name": "Analytics next"
|
|
30
25
|
}
|
|
@@ -56,7 +51,7 @@
|
|
|
56
51
|
"react": "^16.8.0"
|
|
57
52
|
},
|
|
58
53
|
"devDependencies": {
|
|
59
|
-
"@atlaskit/button": "^16.
|
|
54
|
+
"@atlaskit/button": "^16.6.0",
|
|
60
55
|
"@atlaskit/docs": "*",
|
|
61
56
|
"@atlaskit/ssr": "*",
|
|
62
57
|
"@atlaskit/textfield": "^5.3.0",
|
|
@@ -79,6 +74,9 @@
|
|
|
79
74
|
"analytics": [
|
|
80
75
|
"analytics-next"
|
|
81
76
|
],
|
|
77
|
+
"design-tokens": [
|
|
78
|
+
"color"
|
|
79
|
+
],
|
|
82
80
|
"theming": [
|
|
83
81
|
"react-context"
|
|
84
82
|
],
|