@atlaskit/analytics-next 10.2.0 → 10.3.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 +18 -0
- package/dist/cjs/components/AnalyticsContext/LegacyAnalyticsContext.js +8 -11
- package/dist/cjs/components/AnalyticsDecorator/index.js +8 -11
- package/dist/cjs/components/AnalyticsDelegate/index.js +6 -9
- package/dist/cjs/components/AnalyticsErrorBoundary.js +5 -7
- package/dist/cjs/components/AnalyticsListener/LegacyAnalyticsListener.js +8 -11
- package/dist/cjs/events/AnalyticsEvent.js +1 -2
- package/dist/cjs/events/UIAnalyticsEvent.js +13 -15
- package/dist/cjs/utils/withAnalytics.js +14 -17
- package/dist/es2019/utils/withAnalytics.js +5 -5
- package/dist/esm/components/AnalyticsContext/LegacyAnalyticsContext.js +8 -11
- package/dist/esm/components/AnalyticsDecorator/index.js +8 -11
- package/dist/esm/components/AnalyticsDelegate/index.js +6 -9
- package/dist/esm/components/AnalyticsErrorBoundary.js +5 -7
- package/dist/esm/components/AnalyticsListener/LegacyAnalyticsListener.js +8 -11
- package/dist/esm/events/AnalyticsEvent.js +1 -2
- package/dist/esm/events/UIAnalyticsEvent.js +12 -14
- package/dist/esm/utils/withAnalytics.js +14 -17
- package/dist/types/components/AnalyticsDecorator/index.d.ts +1 -1
- package/dist/types/components/AnalyticsDelegate/index.d.ts +1 -1
- package/dist/types/utils/withAnalytics.d.ts +2 -4
- package/dist/types-ts4.5/components/AnalyticsDecorator/index.d.ts +1 -1
- package/dist/types-ts4.5/components/AnalyticsDelegate/index.d.ts +1 -1
- package/dist/types-ts4.5/utils/withAnalytics.d.ts +2 -4
- package/package.json +9 -4
- package/tsconfig.json +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/analytics-next
|
|
2
2
|
|
|
3
|
+
## 10.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#109060](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/109060)
|
|
8
|
+
[`4660ec858a305`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/4660ec858a305) -
|
|
9
|
+
Update `React` from v16 to v18
|
|
10
|
+
|
|
11
|
+
## 10.2.1
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [#179607](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/179607)
|
|
16
|
+
[`ec8b221900f5c`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/ec8b221900f5c) -
|
|
17
|
+
Adds a package.json#overrides in hopes that it will override the peerDependencies of
|
|
18
|
+
@atlaskit/analytics-next-stable-react-context (NOTE: This may not work across all platforms and
|
|
19
|
+
was only tested in one scenario, but should have zero impact if it doesn't work)
|
|
20
|
+
|
|
3
21
|
## 10.2.0
|
|
4
22
|
|
|
5
23
|
### Minor Changes
|
|
@@ -9,17 +9,16 @@ exports.default = void 0;
|
|
|
9
9
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
10
10
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
11
11
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
12
|
-
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
13
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
14
12
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
15
13
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
14
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
16
15
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
17
16
|
var _react = _interopRequireWildcard(require("react"));
|
|
18
17
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
19
18
|
var _analyticsNextStableReactContext = _interopRequireDefault(require("@atlaskit/analytics-next-stable-react-context"));
|
|
20
19
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
21
20
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
22
|
-
function
|
|
21
|
+
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
|
23
22
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
24
23
|
var ContextTypes = {
|
|
25
24
|
getAtlaskitAnalyticsContext: _propTypes.default.func,
|
|
@@ -31,24 +30,22 @@ var noop = function noop() {
|
|
|
31
30
|
|
|
32
31
|
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
33
32
|
var AnalyticsContext = /*#__PURE__*/function (_Component) {
|
|
34
|
-
(0, _inherits2.default)(AnalyticsContext, _Component);
|
|
35
|
-
var _super = _createSuper(AnalyticsContext);
|
|
36
33
|
function AnalyticsContext(props) {
|
|
37
34
|
var _this;
|
|
38
35
|
(0, _classCallCheck2.default)(this, AnalyticsContext);
|
|
39
|
-
_this =
|
|
40
|
-
(0, _defineProperty2.default)(
|
|
36
|
+
_this = _callSuper(this, AnalyticsContext, [props]);
|
|
37
|
+
(0, _defineProperty2.default)(_this, "getChildContext", function () {
|
|
41
38
|
return {
|
|
42
39
|
getAtlaskitAnalyticsContext: _this.getAnalyticsContext
|
|
43
40
|
};
|
|
44
41
|
});
|
|
45
|
-
(0, _defineProperty2.default)(
|
|
42
|
+
(0, _defineProperty2.default)(_this, "getAnalyticsContext", function () {
|
|
46
43
|
var data = _this.props.data;
|
|
47
44
|
var _this$context$getAtla = _this.context.getAtlaskitAnalyticsContext,
|
|
48
45
|
getAtlaskitAnalyticsContext = _this$context$getAtla === void 0 ? noop : _this$context$getAtla;
|
|
49
46
|
return [].concat((0, _toConsumableArray2.default)(getAtlaskitAnalyticsContext()), [data]);
|
|
50
47
|
});
|
|
51
|
-
(0, _defineProperty2.default)(
|
|
48
|
+
(0, _defineProperty2.default)(_this, "getAnalyticsEventHandlers", function () {
|
|
52
49
|
var _this$context$getAtla2 = _this.context.getAtlaskitAnalyticsEventHandlers,
|
|
53
50
|
getAtlaskitAnalyticsEventHandlers = _this$context$getAtla2 === void 0 ? noop : _this$context$getAtla2;
|
|
54
51
|
return getAtlaskitAnalyticsEventHandlers();
|
|
@@ -59,7 +56,8 @@ var AnalyticsContext = /*#__PURE__*/function (_Component) {
|
|
|
59
56
|
};
|
|
60
57
|
return _this;
|
|
61
58
|
}
|
|
62
|
-
(0,
|
|
59
|
+
(0, _inherits2.default)(AnalyticsContext, _Component);
|
|
60
|
+
return (0, _createClass2.default)(AnalyticsContext, [{
|
|
63
61
|
key: "render",
|
|
64
62
|
value: function render() {
|
|
65
63
|
var children = this.props.children;
|
|
@@ -68,7 +66,6 @@ var AnalyticsContext = /*#__PURE__*/function (_Component) {
|
|
|
68
66
|
}, children);
|
|
69
67
|
}
|
|
70
68
|
}]);
|
|
71
|
-
return AnalyticsContext;
|
|
72
69
|
}(_react.Component);
|
|
73
70
|
(0, _defineProperty2.default)(AnalyticsContext, "contextTypes", ContextTypes);
|
|
74
71
|
(0, _defineProperty2.default)(AnalyticsContext, "childContextTypes", ContextTypes);
|
|
@@ -9,10 +9,9 @@ exports.default = exports.ContextTypes = exports.AnalyticsDecorator = void 0;
|
|
|
9
9
|
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
10
10
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
11
11
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
12
|
-
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
13
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
14
12
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
15
13
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
14
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
16
15
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
17
16
|
var _react = _interopRequireWildcard(require("react"));
|
|
18
17
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
@@ -21,7 +20,7 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
|
|
|
21
20
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof3(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
22
21
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
23
22
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
24
|
-
function
|
|
23
|
+
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
|
25
24
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
26
25
|
var ContextTypes = exports.ContextTypes = {
|
|
27
26
|
onAnalyticsEvent: _propTypes.default.func,
|
|
@@ -35,16 +34,14 @@ var ContextTypes = exports.ContextTypes = {
|
|
|
35
34
|
*/
|
|
36
35
|
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
37
36
|
var AnalyticsDecorator = exports.AnalyticsDecorator = /*#__PURE__*/function (_Component) {
|
|
38
|
-
(0, _inherits2.default)(AnalyticsDecorator, _Component);
|
|
39
|
-
var _super = _createSuper(AnalyticsDecorator);
|
|
40
37
|
function AnalyticsDecorator() {
|
|
41
38
|
var _this;
|
|
42
39
|
(0, _classCallCheck2.default)(this, AnalyticsDecorator);
|
|
43
40
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
44
41
|
args[_key] = arguments[_key];
|
|
45
42
|
}
|
|
46
|
-
_this =
|
|
47
|
-
(0, _defineProperty2.default)(
|
|
43
|
+
_this = _callSuper(this, AnalyticsDecorator, [].concat(args));
|
|
44
|
+
(0, _defineProperty2.default)(_this, "getDecoratedAnalyticsData", function (name, srcData, isPrivate) {
|
|
48
45
|
var _this$props = _this.props,
|
|
49
46
|
data = _this$props.data,
|
|
50
47
|
getData = _this$props.getData,
|
|
@@ -61,7 +58,7 @@ var AnalyticsDecorator = exports.AnalyticsDecorator = /*#__PURE__*/function (_Co
|
|
|
61
58
|
}
|
|
62
59
|
return decoratedData;
|
|
63
60
|
});
|
|
64
|
-
(0, _defineProperty2.default)(
|
|
61
|
+
(0, _defineProperty2.default)(_this, "onAnalyticsEvent", function (name, srcData, isPrivate) {
|
|
65
62
|
var _ref = _this.context,
|
|
66
63
|
onAnalyticsEvent = _ref.onAnalyticsEvent;
|
|
67
64
|
if (typeof onAnalyticsEvent !== 'function') {
|
|
@@ -70,7 +67,7 @@ var AnalyticsDecorator = exports.AnalyticsDecorator = /*#__PURE__*/function (_Co
|
|
|
70
67
|
var decoratedData = _this.getDecoratedAnalyticsData(name, srcData, isPrivate);
|
|
71
68
|
onAnalyticsEvent(name, decoratedData, isPrivate);
|
|
72
69
|
});
|
|
73
|
-
(0, _defineProperty2.default)(
|
|
70
|
+
(0, _defineProperty2.default)(_this, "getParentAnalyticsData", function (name, isPrivate) {
|
|
74
71
|
var parentData = _this.getDecoratedAnalyticsData(name, {}, isPrivate);
|
|
75
72
|
var _ref2 = _this.context,
|
|
76
73
|
getParentAnalyticsData = _ref2.getParentAnalyticsData;
|
|
@@ -81,7 +78,8 @@ var AnalyticsDecorator = exports.AnalyticsDecorator = /*#__PURE__*/function (_Co
|
|
|
81
78
|
});
|
|
82
79
|
return _this;
|
|
83
80
|
}
|
|
84
|
-
(0,
|
|
81
|
+
(0, _inherits2.default)(AnalyticsDecorator, _Component);
|
|
82
|
+
return (0, _createClass2.default)(AnalyticsDecorator, [{
|
|
85
83
|
key: "getChildContext",
|
|
86
84
|
value: function getChildContext() {
|
|
87
85
|
return {
|
|
@@ -96,7 +94,6 @@ var AnalyticsDecorator = exports.AnalyticsDecorator = /*#__PURE__*/function (_Co
|
|
|
96
94
|
return _react.default.Children.only(children);
|
|
97
95
|
}
|
|
98
96
|
}]);
|
|
99
|
-
return AnalyticsDecorator;
|
|
100
97
|
}(_react.Component);
|
|
101
98
|
(0, _defineProperty2.default)(AnalyticsDecorator, "defaultProps", {
|
|
102
99
|
match: '*',
|
|
@@ -8,10 +8,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
exports.default = void 0;
|
|
9
9
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
10
10
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
11
|
-
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
12
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
13
11
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
14
12
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
13
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
15
14
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
16
15
|
var _react = _interopRequireWildcard(require("react"));
|
|
17
16
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
@@ -19,7 +18,7 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
|
|
|
19
18
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
20
19
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
21
20
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
22
|
-
function
|
|
21
|
+
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
|
23
22
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
24
23
|
var ContextTypes = {
|
|
25
24
|
onAnalyticsEvent: _propTypes.default.func
|
|
@@ -31,16 +30,14 @@ var ContextTypes = {
|
|
|
31
30
|
*/
|
|
32
31
|
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
33
32
|
var AnalyticsDelegate = /*#__PURE__*/function (_Component) {
|
|
34
|
-
(0, _inherits2.default)(AnalyticsDelegate, _Component);
|
|
35
|
-
var _super = _createSuper(AnalyticsDelegate);
|
|
36
33
|
function AnalyticsDelegate() {
|
|
37
34
|
var _this;
|
|
38
35
|
(0, _classCallCheck2.default)(this, AnalyticsDelegate);
|
|
39
36
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
40
37
|
args[_key] = arguments[_key];
|
|
41
38
|
}
|
|
42
|
-
_this =
|
|
43
|
-
(0, _defineProperty2.default)(
|
|
39
|
+
_this = _callSuper(this, AnalyticsDelegate, [].concat(args));
|
|
40
|
+
(0, _defineProperty2.default)(_this, "onAnalyticsEvent", function (name, data, isPrivate) {
|
|
44
41
|
var delegateAnalyticsEvent = _this.props.delegateAnalyticsEvent;
|
|
45
42
|
var eventData = _objectSpread({}, data);
|
|
46
43
|
if (delegateAnalyticsEvent) {
|
|
@@ -54,7 +51,8 @@ var AnalyticsDelegate = /*#__PURE__*/function (_Component) {
|
|
|
54
51
|
});
|
|
55
52
|
return _this;
|
|
56
53
|
}
|
|
57
|
-
(0,
|
|
54
|
+
(0, _inherits2.default)(AnalyticsDelegate, _Component);
|
|
55
|
+
return (0, _createClass2.default)(AnalyticsDelegate, [{
|
|
58
56
|
key: "getChildContext",
|
|
59
57
|
value: function getChildContext() {
|
|
60
58
|
return {
|
|
@@ -68,7 +66,6 @@ var AnalyticsDelegate = /*#__PURE__*/function (_Component) {
|
|
|
68
66
|
return _react.default.Children.only(children);
|
|
69
67
|
}
|
|
70
68
|
}]);
|
|
71
|
-
return AnalyticsDelegate;
|
|
72
69
|
}(_react.Component);
|
|
73
70
|
(0, _defineProperty2.default)(AnalyticsDelegate, "contextTypes", ContextTypes);
|
|
74
71
|
(0, _defineProperty2.default)(AnalyticsDelegate, "childContextTypes", ContextTypes);
|
|
@@ -8,9 +8,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
exports.default = void 0;
|
|
9
9
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
10
10
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
11
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
12
11
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
13
12
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
13
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
14
14
|
var _react = _interopRequireWildcard(require("react"));
|
|
15
15
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
16
16
|
var _isModernContextEnabledEnv = _interopRequireDefault(require("../utils/isModernContextEnabledEnv"));
|
|
@@ -18,7 +18,7 @@ var _LegacyAnalyticsContext = _interopRequireDefault(require("./AnalyticsContext
|
|
|
18
18
|
var _ModernAnalyticsContext = _interopRequireDefault(require("./AnalyticsContext/ModernAnalyticsContext"));
|
|
19
19
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
20
20
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
21
|
-
function
|
|
21
|
+
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
|
22
22
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
23
23
|
/**
|
|
24
24
|
* @private https://product-fabric.atlassian.net/browse/AFO-815
|
|
@@ -26,18 +26,17 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
26
26
|
*/
|
|
27
27
|
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
28
28
|
var AnalyticsErrorBoundary = exports.default = /*#__PURE__*/function (_Component) {
|
|
29
|
-
(0, _inherits2.default)(AnalyticsErrorBoundary, _Component);
|
|
30
|
-
var _super = _createSuper(AnalyticsErrorBoundary);
|
|
31
29
|
function AnalyticsErrorBoundary(props) {
|
|
32
30
|
var _this;
|
|
33
31
|
(0, _classCallCheck2.default)(this, AnalyticsErrorBoundary);
|
|
34
|
-
_this =
|
|
32
|
+
_this = _callSuper(this, AnalyticsErrorBoundary, [props]);
|
|
35
33
|
_this.state = {
|
|
36
34
|
hasError: false
|
|
37
35
|
};
|
|
38
36
|
return _this;
|
|
39
37
|
}
|
|
40
|
-
(0,
|
|
38
|
+
(0, _inherits2.default)(AnalyticsErrorBoundary, _Component);
|
|
39
|
+
return (0, _createClass2.default)(AnalyticsErrorBoundary, [{
|
|
41
40
|
key: "componentDidCatch",
|
|
42
41
|
value: function componentDidCatch(error, info) {
|
|
43
42
|
var onError = this.props.onError;
|
|
@@ -78,5 +77,4 @@ var AnalyticsErrorBoundary = exports.default = /*#__PURE__*/function (_Component
|
|
|
78
77
|
}, children);
|
|
79
78
|
}
|
|
80
79
|
}]);
|
|
81
|
-
return AnalyticsErrorBoundary;
|
|
82
80
|
}(_react.Component);
|
|
@@ -9,17 +9,16 @@ exports.default = void 0;
|
|
|
9
9
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
10
10
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
11
11
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
12
|
-
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
13
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
14
12
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
15
13
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
14
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
16
15
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
17
16
|
var _react = _interopRequireWildcard(require("react"));
|
|
18
17
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
19
18
|
var _analyticsNextStableReactContext = _interopRequireDefault(require("@atlaskit/analytics-next-stable-react-context"));
|
|
20
19
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
21
20
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
22
|
-
function
|
|
21
|
+
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
|
23
22
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
24
23
|
var ContextTypes = {
|
|
25
24
|
getAtlaskitAnalyticsEventHandlers: _propTypes.default.func,
|
|
@@ -31,19 +30,17 @@ var noop = function noop() {
|
|
|
31
30
|
|
|
32
31
|
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
33
32
|
var AnalyticsListener = /*#__PURE__*/function (_Component) {
|
|
34
|
-
(0, _inherits2.default)(AnalyticsListener, _Component);
|
|
35
|
-
var _super = _createSuper(AnalyticsListener);
|
|
36
33
|
function AnalyticsListener(props) {
|
|
37
34
|
var _this;
|
|
38
35
|
(0, _classCallCheck2.default)(this, AnalyticsListener);
|
|
39
|
-
_this =
|
|
40
|
-
(0, _defineProperty2.default)(
|
|
36
|
+
_this = _callSuper(this, AnalyticsListener, [props]);
|
|
37
|
+
(0, _defineProperty2.default)(_this, "getChildContext", function () {
|
|
41
38
|
return {
|
|
42
39
|
getAtlaskitAnalyticsEventHandlers: _this.getAnalyticsEventHandlers,
|
|
43
40
|
getAtlaskitAnalyticsContext: _this.getAtlaskitAnalyticsContext
|
|
44
41
|
};
|
|
45
42
|
});
|
|
46
|
-
(0, _defineProperty2.default)(
|
|
43
|
+
(0, _defineProperty2.default)(_this, "getAnalyticsEventHandlers", function () {
|
|
47
44
|
var _this$props = _this.props,
|
|
48
45
|
channel = _this$props.channel,
|
|
49
46
|
onEvent = _this$props.onEvent;
|
|
@@ -56,7 +53,7 @@ var AnalyticsListener = /*#__PURE__*/function (_Component) {
|
|
|
56
53
|
};
|
|
57
54
|
return [handler].concat((0, _toConsumableArray2.default)(getAtlaskitAnalyticsEventHandlers()));
|
|
58
55
|
});
|
|
59
|
-
(0, _defineProperty2.default)(
|
|
56
|
+
(0, _defineProperty2.default)(_this, "getAtlaskitAnalyticsContext", function () {
|
|
60
57
|
var _this$context$getAtla2 = _this.context.getAtlaskitAnalyticsContext,
|
|
61
58
|
getAtlaskitAnalyticsContext = _this$context$getAtla2 === void 0 ? noop : _this$context$getAtla2;
|
|
62
59
|
return getAtlaskitAnalyticsContext();
|
|
@@ -67,7 +64,8 @@ var AnalyticsListener = /*#__PURE__*/function (_Component) {
|
|
|
67
64
|
};
|
|
68
65
|
return _this;
|
|
69
66
|
}
|
|
70
|
-
(0,
|
|
67
|
+
(0, _inherits2.default)(AnalyticsListener, _Component);
|
|
68
|
+
return (0, _createClass2.default)(AnalyticsListener, [{
|
|
71
69
|
key: "render",
|
|
72
70
|
value: function render() {
|
|
73
71
|
var children = this.props.children;
|
|
@@ -76,7 +74,6 @@ var AnalyticsListener = /*#__PURE__*/function (_Component) {
|
|
|
76
74
|
}, children);
|
|
77
75
|
}
|
|
78
76
|
}]);
|
|
79
|
-
return AnalyticsListener;
|
|
80
77
|
}(_react.Component);
|
|
81
78
|
(0, _defineProperty2.default)(AnalyticsListener, "contextTypes", ContextTypes);
|
|
82
79
|
(0, _defineProperty2.default)(AnalyticsListener, "childContextTypes", ContextTypes);
|
|
@@ -32,7 +32,7 @@ var AnalyticsEvent = exports.default = /*#__PURE__*/function () {
|
|
|
32
32
|
});
|
|
33
33
|
this.payload = props.payload;
|
|
34
34
|
}
|
|
35
|
-
(0, _createClass2.default)(AnalyticsEvent, [{
|
|
35
|
+
return (0, _createClass2.default)(AnalyticsEvent, [{
|
|
36
36
|
key: "update",
|
|
37
37
|
value: function update(updater) {
|
|
38
38
|
if (typeof updater === 'function') {
|
|
@@ -44,5 +44,4 @@ var AnalyticsEvent = exports.default = /*#__PURE__*/function () {
|
|
|
44
44
|
return this;
|
|
45
45
|
}
|
|
46
46
|
}]);
|
|
47
|
-
return AnalyticsEvent;
|
|
48
47
|
}();
|
|
@@ -8,15 +8,15 @@ exports.isUIAnalyticsEvent = exports.default = void 0;
|
|
|
8
8
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
9
9
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
10
10
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
11
|
-
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
12
|
-
var _get2 = _interopRequireDefault(require("@babel/runtime/helpers/get"));
|
|
13
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
14
11
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
15
12
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
13
|
+
var _get2 = _interopRequireDefault(require("@babel/runtime/helpers/get"));
|
|
14
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
16
15
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
17
16
|
var _AnalyticsEvent2 = _interopRequireDefault(require("./AnalyticsEvent"));
|
|
18
|
-
function
|
|
19
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
17
|
+
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
|
18
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
19
|
+
function _superPropGet(t, o, e, r) { var p = (0, _get2.default)((0, _getPrototypeOf2.default)(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; } /// <reference types="node" />
|
|
20
20
|
var isUIAnalyticsEvent = exports.isUIAnalyticsEvent = function isUIAnalyticsEvent(obj) {
|
|
21
21
|
var _obj$constructor;
|
|
22
22
|
return obj instanceof UIAnalyticsEvent || !!(obj !== null && obj !== void 0 && obj._isUIAnalyticsEvent) ||
|
|
@@ -24,14 +24,12 @@ var isUIAnalyticsEvent = exports.isUIAnalyticsEvent = function isUIAnalyticsEven
|
|
|
24
24
|
(obj === null || obj === void 0 || (_obj$constructor = obj.constructor) === null || _obj$constructor === void 0 ? void 0 : _obj$constructor.name) === 'UIAnalyticsEvent';
|
|
25
25
|
};
|
|
26
26
|
var UIAnalyticsEvent = exports.default = /*#__PURE__*/function (_AnalyticsEvent) {
|
|
27
|
-
(0, _inherits2.default)(UIAnalyticsEvent, _AnalyticsEvent);
|
|
28
|
-
var _super = _createSuper(UIAnalyticsEvent);
|
|
29
27
|
function UIAnalyticsEvent(props) {
|
|
30
28
|
var _this;
|
|
31
29
|
(0, _classCallCheck2.default)(this, UIAnalyticsEvent);
|
|
32
|
-
_this =
|
|
33
|
-
(0, _defineProperty2.default)(
|
|
34
|
-
(0, _defineProperty2.default)(
|
|
30
|
+
_this = _callSuper(this, UIAnalyticsEvent, [props]);
|
|
31
|
+
(0, _defineProperty2.default)(_this, "_isUIAnalyticsEvent", true);
|
|
32
|
+
(0, _defineProperty2.default)(_this, "clone", function () {
|
|
35
33
|
if (_this.hasFired) {
|
|
36
34
|
if (process.env.NODE_ENV !== 'production' && !process.env.CI) {
|
|
37
35
|
// eslint-disable-next-line no-console
|
|
@@ -54,7 +52,7 @@ var UIAnalyticsEvent = exports.default = /*#__PURE__*/function (_AnalyticsEvent)
|
|
|
54
52
|
payload: payload
|
|
55
53
|
});
|
|
56
54
|
});
|
|
57
|
-
(0, _defineProperty2.default)(
|
|
55
|
+
(0, _defineProperty2.default)(_this, "fire", function (channel) {
|
|
58
56
|
if (_this.hasFired) {
|
|
59
57
|
if (process.env.NODE_ENV !== 'production' && !process.env.CI) {
|
|
60
58
|
// eslint-disable-next-line no-console
|
|
@@ -63,7 +61,7 @@ var UIAnalyticsEvent = exports.default = /*#__PURE__*/function (_AnalyticsEvent)
|
|
|
63
61
|
return;
|
|
64
62
|
}
|
|
65
63
|
_this.handlers.forEach(function (handler) {
|
|
66
|
-
return handler(
|
|
64
|
+
return handler(_this, channel);
|
|
67
65
|
});
|
|
68
66
|
_this.hasFired = true;
|
|
69
67
|
});
|
|
@@ -72,7 +70,8 @@ var UIAnalyticsEvent = exports.default = /*#__PURE__*/function (_AnalyticsEvent)
|
|
|
72
70
|
_this.hasFired = false;
|
|
73
71
|
return _this;
|
|
74
72
|
}
|
|
75
|
-
(0,
|
|
73
|
+
(0, _inherits2.default)(UIAnalyticsEvent, _AnalyticsEvent);
|
|
74
|
+
return (0, _createClass2.default)(UIAnalyticsEvent, [{
|
|
76
75
|
key: "update",
|
|
77
76
|
value: function update(updater) {
|
|
78
77
|
if (this.hasFired) {
|
|
@@ -82,8 +81,7 @@ var UIAnalyticsEvent = exports.default = /*#__PURE__*/function (_AnalyticsEvent)
|
|
|
82
81
|
}
|
|
83
82
|
return this;
|
|
84
83
|
}
|
|
85
|
-
return (
|
|
84
|
+
return _superPropGet(UIAnalyticsEvent, "update", this, 3)([updater]);
|
|
86
85
|
}
|
|
87
86
|
}]);
|
|
88
|
-
return UIAnalyticsEvent;
|
|
89
87
|
}(_AnalyticsEvent2.default);
|
|
@@ -10,10 +10,9 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
10
10
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
11
11
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
12
12
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
13
|
-
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
14
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
15
13
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
16
14
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
15
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
17
16
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
18
17
|
var _react = _interopRequireWildcard(require("react"));
|
|
19
18
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
@@ -22,7 +21,7 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
|
|
|
22
21
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
23
22
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
24
23
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
25
|
-
function
|
|
24
|
+
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
|
26
25
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
27
26
|
/**
|
|
28
27
|
* The withAnalytics HOC wraps a component and provides the `fireAnalyticsEvent`
|
|
@@ -42,18 +41,16 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
42
41
|
* @param withDelegation
|
|
43
42
|
*/
|
|
44
43
|
var withAnalytics = function withAnalytics(WrappedComponent) {
|
|
45
|
-
var
|
|
44
|
+
var _WithAnalytics;
|
|
46
45
|
var map = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
47
46
|
var defaultProps = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
48
47
|
var withDelegation = arguments.length > 3 ? arguments[3] : undefined;
|
|
49
|
-
return
|
|
50
|
-
(0, _inherits2.default)(WithAnalytics, _Component);
|
|
51
|
-
var _super = _createSuper(WithAnalytics);
|
|
48
|
+
return _WithAnalytics = /*#__PURE__*/function (_Component) {
|
|
52
49
|
function WithAnalytics(props) {
|
|
53
50
|
var _this;
|
|
54
51
|
(0, _classCallCheck2.default)(this, WithAnalytics);
|
|
55
|
-
_this =
|
|
56
|
-
(0, _defineProperty2.default)(
|
|
52
|
+
_this = _callSuper(this, WithAnalytics, [props]);
|
|
53
|
+
(0, _defineProperty2.default)(_this, "delegateAnalyticsEvent", function (analyticsId, data, isPrivate) {
|
|
57
54
|
var _ref = _this.context,
|
|
58
55
|
onAnalyticsEvent = _ref.onAnalyticsEvent;
|
|
59
56
|
if (!onAnalyticsEvent) {
|
|
@@ -61,7 +58,7 @@ var withAnalytics = function withAnalytics(WrappedComponent) {
|
|
|
61
58
|
}
|
|
62
59
|
onAnalyticsEvent(analyticsId, data, isPrivate);
|
|
63
60
|
});
|
|
64
|
-
(0, _defineProperty2.default)(
|
|
61
|
+
(0, _defineProperty2.default)(_this, "fireAnalyticsEvent", function (name, data) {
|
|
65
62
|
var _this$props = _this.props,
|
|
66
63
|
analyticsData = _this$props.analyticsData,
|
|
67
64
|
analyticsId = _this$props.analyticsId;
|
|
@@ -73,7 +70,7 @@ var withAnalytics = function withAnalytics(WrappedComponent) {
|
|
|
73
70
|
var eventData = _objectSpread(_objectSpread({}, analyticsData), data);
|
|
74
71
|
onAnalyticsEvent("".concat(analyticsId, ".").concat(name), eventData, false);
|
|
75
72
|
});
|
|
76
|
-
(0, _defineProperty2.default)(
|
|
73
|
+
(0, _defineProperty2.default)(_this, "privateAnalyticsEvent", function (name, data) {
|
|
77
74
|
var _ref3 = _this.context,
|
|
78
75
|
onAnalyticsEvent = _ref3.onAnalyticsEvent;
|
|
79
76
|
if (!onAnalyticsEvent) {
|
|
@@ -81,7 +78,7 @@ var withAnalytics = function withAnalytics(WrappedComponent) {
|
|
|
81
78
|
}
|
|
82
79
|
onAnalyticsEvent("".concat(name), data, true);
|
|
83
80
|
});
|
|
84
|
-
(0, _defineProperty2.default)(
|
|
81
|
+
(0, _defineProperty2.default)(_this, "getParentAnalyticsData", function (name) {
|
|
85
82
|
var _ref4 = _this.context,
|
|
86
83
|
getParentAnalyticsData = _ref4.getParentAnalyticsData;
|
|
87
84
|
var parentData = {};
|
|
@@ -96,7 +93,8 @@ var withAnalytics = function withAnalytics(WrappedComponent) {
|
|
|
96
93
|
};
|
|
97
94
|
return _this;
|
|
98
95
|
}
|
|
99
|
-
(0,
|
|
96
|
+
(0, _inherits2.default)(WithAnalytics, _Component);
|
|
97
|
+
return (0, _createClass2.default)(WithAnalytics, [{
|
|
100
98
|
key: "componentDidMount",
|
|
101
99
|
value: function componentDidMount() {
|
|
102
100
|
this.setState({
|
|
@@ -135,13 +133,12 @@ var withAnalytics = function withAnalytics(WrappedComponent) {
|
|
|
135
133
|
}, componentProps));
|
|
136
134
|
}
|
|
137
135
|
}]);
|
|
138
|
-
|
|
139
|
-
}(_react.Component), (0, _defineProperty2.default)(_class, "displayName", "WithAnalytics(".concat(WrappedComponent.displayName || WrappedComponent.name, ")")), (0, _defineProperty2.default)(_class, "contextTypes", {
|
|
136
|
+
}(_react.Component), (0, _defineProperty2.default)(_WithAnalytics, "displayName", "WithAnalytics(".concat(WrappedComponent.displayName || WrappedComponent.name, ")")), (0, _defineProperty2.default)(_WithAnalytics, "contextTypes", {
|
|
140
137
|
onAnalyticsEvent: _propTypes.default.func,
|
|
141
138
|
getParentAnalyticsData: _propTypes.default.func
|
|
142
|
-
}), (0, _defineProperty2.default)(
|
|
139
|
+
}), (0, _defineProperty2.default)(_WithAnalytics, "defaultProps", {
|
|
143
140
|
analyticsId: defaultProps.analyticsId,
|
|
144
141
|
analyticsData: defaultProps.analyticsData
|
|
145
|
-
}),
|
|
142
|
+
}), _WithAnalytics;
|
|
146
143
|
};
|
|
147
144
|
var _default = exports.default = withAnalytics;
|
|
@@ -20,8 +20,8 @@ import PropTypes from 'prop-types';
|
|
|
20
20
|
* @param withDelegation
|
|
21
21
|
*/
|
|
22
22
|
const withAnalytics = (WrappedComponent, map = {}, defaultProps = {}, withDelegation) => {
|
|
23
|
-
var
|
|
24
|
-
return
|
|
23
|
+
var _WithAnalytics;
|
|
24
|
+
return _WithAnalytics = class WithAnalytics extends Component {
|
|
25
25
|
constructor(props) {
|
|
26
26
|
super(props);
|
|
27
27
|
_defineProperty(this, "delegateAnalyticsEvent", (analyticsId, data, isPrivate) => {
|
|
@@ -110,12 +110,12 @@ const withAnalytics = (WrappedComponent, map = {}, defaultProps = {}, withDelega
|
|
|
110
110
|
ref: this.props.innerRef
|
|
111
111
|
}, componentProps));
|
|
112
112
|
}
|
|
113
|
-
}, _defineProperty(
|
|
113
|
+
}, _defineProperty(_WithAnalytics, "displayName", `WithAnalytics(${WrappedComponent.displayName || WrappedComponent.name})`), _defineProperty(_WithAnalytics, "contextTypes", {
|
|
114
114
|
onAnalyticsEvent: PropTypes.func,
|
|
115
115
|
getParentAnalyticsData: PropTypes.func
|
|
116
|
-
}), _defineProperty(
|
|
116
|
+
}), _defineProperty(_WithAnalytics, "defaultProps", {
|
|
117
117
|
analyticsId: defaultProps.analyticsId,
|
|
118
118
|
analyticsData: defaultProps.analyticsData
|
|
119
|
-
}),
|
|
119
|
+
}), _WithAnalytics;
|
|
120
120
|
};
|
|
121
121
|
export default withAnalytics;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
2
2
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
3
3
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
4
|
-
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
5
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
6
4
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
7
5
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
6
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
8
7
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
9
|
-
function
|
|
8
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
10
9
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
11
10
|
import React, { Component } from 'react';
|
|
12
11
|
import PropTypes from 'prop-types';
|
|
@@ -21,24 +20,22 @@ var noop = function noop() {
|
|
|
21
20
|
|
|
22
21
|
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
23
22
|
var AnalyticsContext = /*#__PURE__*/function (_Component) {
|
|
24
|
-
_inherits(AnalyticsContext, _Component);
|
|
25
|
-
var _super = _createSuper(AnalyticsContext);
|
|
26
23
|
function AnalyticsContext(props) {
|
|
27
24
|
var _this;
|
|
28
25
|
_classCallCheck(this, AnalyticsContext);
|
|
29
|
-
_this =
|
|
30
|
-
_defineProperty(
|
|
26
|
+
_this = _callSuper(this, AnalyticsContext, [props]);
|
|
27
|
+
_defineProperty(_this, "getChildContext", function () {
|
|
31
28
|
return {
|
|
32
29
|
getAtlaskitAnalyticsContext: _this.getAnalyticsContext
|
|
33
30
|
};
|
|
34
31
|
});
|
|
35
|
-
_defineProperty(
|
|
32
|
+
_defineProperty(_this, "getAnalyticsContext", function () {
|
|
36
33
|
var data = _this.props.data;
|
|
37
34
|
var _this$context$getAtla = _this.context.getAtlaskitAnalyticsContext,
|
|
38
35
|
getAtlaskitAnalyticsContext = _this$context$getAtla === void 0 ? noop : _this$context$getAtla;
|
|
39
36
|
return [].concat(_toConsumableArray(getAtlaskitAnalyticsContext()), [data]);
|
|
40
37
|
});
|
|
41
|
-
_defineProperty(
|
|
38
|
+
_defineProperty(_this, "getAnalyticsEventHandlers", function () {
|
|
42
39
|
var _this$context$getAtla2 = _this.context.getAtlaskitAnalyticsEventHandlers,
|
|
43
40
|
getAtlaskitAnalyticsEventHandlers = _this$context$getAtla2 === void 0 ? noop : _this$context$getAtla2;
|
|
44
41
|
return getAtlaskitAnalyticsEventHandlers();
|
|
@@ -49,7 +46,8 @@ var AnalyticsContext = /*#__PURE__*/function (_Component) {
|
|
|
49
46
|
};
|
|
50
47
|
return _this;
|
|
51
48
|
}
|
|
52
|
-
|
|
49
|
+
_inherits(AnalyticsContext, _Component);
|
|
50
|
+
return _createClass(AnalyticsContext, [{
|
|
53
51
|
key: "render",
|
|
54
52
|
value: function render() {
|
|
55
53
|
var children = this.props.children;
|
|
@@ -58,7 +56,6 @@ var AnalyticsContext = /*#__PURE__*/function (_Component) {
|
|
|
58
56
|
}, children);
|
|
59
57
|
}
|
|
60
58
|
}]);
|
|
61
|
-
return AnalyticsContext;
|
|
62
59
|
}(Component);
|
|
63
60
|
_defineProperty(AnalyticsContext, "contextTypes", ContextTypes);
|
|
64
61
|
_defineProperty(AnalyticsContext, "childContextTypes", ContextTypes);
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import _typeof from "@babel/runtime/helpers/typeof";
|
|
2
2
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
3
3
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
4
|
-
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
5
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
6
4
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
7
5
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
6
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
8
7
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
9
8
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
10
9
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
11
|
-
function
|
|
10
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
12
11
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
13
12
|
import React, { Component } from 'react';
|
|
14
13
|
import PropTypes from 'prop-types';
|
|
@@ -25,16 +24,14 @@ export var ContextTypes = {
|
|
|
25
24
|
*/
|
|
26
25
|
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
27
26
|
export var AnalyticsDecorator = /*#__PURE__*/function (_Component) {
|
|
28
|
-
_inherits(AnalyticsDecorator, _Component);
|
|
29
|
-
var _super = _createSuper(AnalyticsDecorator);
|
|
30
27
|
function AnalyticsDecorator() {
|
|
31
28
|
var _this;
|
|
32
29
|
_classCallCheck(this, AnalyticsDecorator);
|
|
33
30
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
34
31
|
args[_key] = arguments[_key];
|
|
35
32
|
}
|
|
36
|
-
_this =
|
|
37
|
-
_defineProperty(
|
|
33
|
+
_this = _callSuper(this, AnalyticsDecorator, [].concat(args));
|
|
34
|
+
_defineProperty(_this, "getDecoratedAnalyticsData", function (name, srcData, isPrivate) {
|
|
38
35
|
var _this$props = _this.props,
|
|
39
36
|
data = _this$props.data,
|
|
40
37
|
getData = _this$props.getData,
|
|
@@ -51,7 +48,7 @@ export var AnalyticsDecorator = /*#__PURE__*/function (_Component) {
|
|
|
51
48
|
}
|
|
52
49
|
return decoratedData;
|
|
53
50
|
});
|
|
54
|
-
_defineProperty(
|
|
51
|
+
_defineProperty(_this, "onAnalyticsEvent", function (name, srcData, isPrivate) {
|
|
55
52
|
var _ref = _this.context,
|
|
56
53
|
onAnalyticsEvent = _ref.onAnalyticsEvent;
|
|
57
54
|
if (typeof onAnalyticsEvent !== 'function') {
|
|
@@ -60,7 +57,7 @@ export var AnalyticsDecorator = /*#__PURE__*/function (_Component) {
|
|
|
60
57
|
var decoratedData = _this.getDecoratedAnalyticsData(name, srcData, isPrivate);
|
|
61
58
|
onAnalyticsEvent(name, decoratedData, isPrivate);
|
|
62
59
|
});
|
|
63
|
-
_defineProperty(
|
|
60
|
+
_defineProperty(_this, "getParentAnalyticsData", function (name, isPrivate) {
|
|
64
61
|
var parentData = _this.getDecoratedAnalyticsData(name, {}, isPrivate);
|
|
65
62
|
var _ref2 = _this.context,
|
|
66
63
|
getParentAnalyticsData = _ref2.getParentAnalyticsData;
|
|
@@ -71,7 +68,8 @@ export var AnalyticsDecorator = /*#__PURE__*/function (_Component) {
|
|
|
71
68
|
});
|
|
72
69
|
return _this;
|
|
73
70
|
}
|
|
74
|
-
|
|
71
|
+
_inherits(AnalyticsDecorator, _Component);
|
|
72
|
+
return _createClass(AnalyticsDecorator, [{
|
|
75
73
|
key: "getChildContext",
|
|
76
74
|
value: function getChildContext() {
|
|
77
75
|
return {
|
|
@@ -86,7 +84,6 @@ export var AnalyticsDecorator = /*#__PURE__*/function (_Component) {
|
|
|
86
84
|
return React.Children.only(children);
|
|
87
85
|
}
|
|
88
86
|
}]);
|
|
89
|
-
return AnalyticsDecorator;
|
|
90
87
|
}(Component);
|
|
91
88
|
_defineProperty(AnalyticsDecorator, "defaultProps", {
|
|
92
89
|
match: '*',
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
2
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
-
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
4
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
5
3
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
6
4
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
5
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
7
6
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
8
7
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
9
8
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
10
|
-
function
|
|
9
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
11
10
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
12
11
|
import React, { Component } from 'react';
|
|
13
12
|
import PropTypes from 'prop-types';
|
|
@@ -21,16 +20,14 @@ var ContextTypes = {
|
|
|
21
20
|
*/
|
|
22
21
|
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
23
22
|
var AnalyticsDelegate = /*#__PURE__*/function (_Component) {
|
|
24
|
-
_inherits(AnalyticsDelegate, _Component);
|
|
25
|
-
var _super = _createSuper(AnalyticsDelegate);
|
|
26
23
|
function AnalyticsDelegate() {
|
|
27
24
|
var _this;
|
|
28
25
|
_classCallCheck(this, AnalyticsDelegate);
|
|
29
26
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
30
27
|
args[_key] = arguments[_key];
|
|
31
28
|
}
|
|
32
|
-
_this =
|
|
33
|
-
_defineProperty(
|
|
29
|
+
_this = _callSuper(this, AnalyticsDelegate, [].concat(args));
|
|
30
|
+
_defineProperty(_this, "onAnalyticsEvent", function (name, data, isPrivate) {
|
|
34
31
|
var delegateAnalyticsEvent = _this.props.delegateAnalyticsEvent;
|
|
35
32
|
var eventData = _objectSpread({}, data);
|
|
36
33
|
if (delegateAnalyticsEvent) {
|
|
@@ -44,7 +41,8 @@ var AnalyticsDelegate = /*#__PURE__*/function (_Component) {
|
|
|
44
41
|
});
|
|
45
42
|
return _this;
|
|
46
43
|
}
|
|
47
|
-
|
|
44
|
+
_inherits(AnalyticsDelegate, _Component);
|
|
45
|
+
return _createClass(AnalyticsDelegate, [{
|
|
48
46
|
key: "getChildContext",
|
|
49
47
|
value: function getChildContext() {
|
|
50
48
|
return {
|
|
@@ -58,7 +56,6 @@ var AnalyticsDelegate = /*#__PURE__*/function (_Component) {
|
|
|
58
56
|
return React.Children.only(children);
|
|
59
57
|
}
|
|
60
58
|
}]);
|
|
61
|
-
return AnalyticsDelegate;
|
|
62
59
|
}(Component);
|
|
63
60
|
_defineProperty(AnalyticsDelegate, "contextTypes", ContextTypes);
|
|
64
61
|
_defineProperty(AnalyticsDelegate, "childContextTypes", ContextTypes);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
2
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
4
3
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
5
4
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
6
|
-
|
|
5
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
6
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
7
7
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
8
8
|
import React, { Component } from 'react';
|
|
9
9
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
@@ -16,18 +16,17 @@ import ModernAnalyticsContext from './AnalyticsContext/ModernAnalyticsContext';
|
|
|
16
16
|
*/
|
|
17
17
|
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
18
18
|
var AnalyticsErrorBoundary = /*#__PURE__*/function (_Component) {
|
|
19
|
-
_inherits(AnalyticsErrorBoundary, _Component);
|
|
20
|
-
var _super = _createSuper(AnalyticsErrorBoundary);
|
|
21
19
|
function AnalyticsErrorBoundary(props) {
|
|
22
20
|
var _this;
|
|
23
21
|
_classCallCheck(this, AnalyticsErrorBoundary);
|
|
24
|
-
_this =
|
|
22
|
+
_this = _callSuper(this, AnalyticsErrorBoundary, [props]);
|
|
25
23
|
_this.state = {
|
|
26
24
|
hasError: false
|
|
27
25
|
};
|
|
28
26
|
return _this;
|
|
29
27
|
}
|
|
30
|
-
|
|
28
|
+
_inherits(AnalyticsErrorBoundary, _Component);
|
|
29
|
+
return _createClass(AnalyticsErrorBoundary, [{
|
|
31
30
|
key: "componentDidCatch",
|
|
32
31
|
value: function componentDidCatch(error, info) {
|
|
33
32
|
var onError = this.props.onError;
|
|
@@ -68,6 +67,5 @@ var AnalyticsErrorBoundary = /*#__PURE__*/function (_Component) {
|
|
|
68
67
|
}, children);
|
|
69
68
|
}
|
|
70
69
|
}]);
|
|
71
|
-
return AnalyticsErrorBoundary;
|
|
72
70
|
}(Component);
|
|
73
71
|
export { AnalyticsErrorBoundary as default };
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
2
2
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
3
3
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
4
|
-
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
5
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
6
4
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
7
5
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
6
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
8
7
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
9
|
-
function
|
|
8
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
10
9
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
11
10
|
import React, { Component } from 'react';
|
|
12
11
|
import PropTypes from 'prop-types';
|
|
@@ -21,19 +20,17 @@ var noop = function noop() {
|
|
|
21
20
|
|
|
22
21
|
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
23
22
|
var AnalyticsListener = /*#__PURE__*/function (_Component) {
|
|
24
|
-
_inherits(AnalyticsListener, _Component);
|
|
25
|
-
var _super = _createSuper(AnalyticsListener);
|
|
26
23
|
function AnalyticsListener(props) {
|
|
27
24
|
var _this;
|
|
28
25
|
_classCallCheck(this, AnalyticsListener);
|
|
29
|
-
_this =
|
|
30
|
-
_defineProperty(
|
|
26
|
+
_this = _callSuper(this, AnalyticsListener, [props]);
|
|
27
|
+
_defineProperty(_this, "getChildContext", function () {
|
|
31
28
|
return {
|
|
32
29
|
getAtlaskitAnalyticsEventHandlers: _this.getAnalyticsEventHandlers,
|
|
33
30
|
getAtlaskitAnalyticsContext: _this.getAtlaskitAnalyticsContext
|
|
34
31
|
};
|
|
35
32
|
});
|
|
36
|
-
_defineProperty(
|
|
33
|
+
_defineProperty(_this, "getAnalyticsEventHandlers", function () {
|
|
37
34
|
var _this$props = _this.props,
|
|
38
35
|
channel = _this$props.channel,
|
|
39
36
|
onEvent = _this$props.onEvent;
|
|
@@ -46,7 +43,7 @@ var AnalyticsListener = /*#__PURE__*/function (_Component) {
|
|
|
46
43
|
};
|
|
47
44
|
return [handler].concat(_toConsumableArray(getAtlaskitAnalyticsEventHandlers()));
|
|
48
45
|
});
|
|
49
|
-
_defineProperty(
|
|
46
|
+
_defineProperty(_this, "getAtlaskitAnalyticsContext", function () {
|
|
50
47
|
var _this$context$getAtla2 = _this.context.getAtlaskitAnalyticsContext,
|
|
51
48
|
getAtlaskitAnalyticsContext = _this$context$getAtla2 === void 0 ? noop : _this$context$getAtla2;
|
|
52
49
|
return getAtlaskitAnalyticsContext();
|
|
@@ -57,7 +54,8 @@ var AnalyticsListener = /*#__PURE__*/function (_Component) {
|
|
|
57
54
|
};
|
|
58
55
|
return _this;
|
|
59
56
|
}
|
|
60
|
-
|
|
57
|
+
_inherits(AnalyticsListener, _Component);
|
|
58
|
+
return _createClass(AnalyticsListener, [{
|
|
61
59
|
key: "render",
|
|
62
60
|
value: function render() {
|
|
63
61
|
var children = this.props.children;
|
|
@@ -66,7 +64,6 @@ var AnalyticsListener = /*#__PURE__*/function (_Component) {
|
|
|
66
64
|
}, children);
|
|
67
65
|
}
|
|
68
66
|
}]);
|
|
69
|
-
return AnalyticsListener;
|
|
70
67
|
}(Component);
|
|
71
68
|
_defineProperty(AnalyticsListener, "contextTypes", ContextTypes);
|
|
72
69
|
_defineProperty(AnalyticsListener, "childContextTypes", ContextTypes);
|
|
@@ -25,7 +25,7 @@ var AnalyticsEvent = /*#__PURE__*/function () {
|
|
|
25
25
|
});
|
|
26
26
|
this.payload = props.payload;
|
|
27
27
|
}
|
|
28
|
-
_createClass(AnalyticsEvent, [{
|
|
28
|
+
return _createClass(AnalyticsEvent, [{
|
|
29
29
|
key: "update",
|
|
30
30
|
value: function update(updater) {
|
|
31
31
|
if (typeof updater === 'function') {
|
|
@@ -37,6 +37,5 @@ var AnalyticsEvent = /*#__PURE__*/function () {
|
|
|
37
37
|
return this;
|
|
38
38
|
}
|
|
39
39
|
}]);
|
|
40
|
-
return AnalyticsEvent;
|
|
41
40
|
}();
|
|
42
41
|
export { AnalyticsEvent as default };
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
2
2
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
3
3
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
4
|
-
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
5
|
-
import _get from "@babel/runtime/helpers/get";
|
|
6
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
7
4
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
8
5
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
6
|
+
import _get from "@babel/runtime/helpers/get";
|
|
7
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
9
8
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
10
|
-
function
|
|
9
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
11
10
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
11
|
+
function _superPropGet(t, o, e, r) { var p = _get(_getPrototypeOf(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; }
|
|
12
12
|
/// <reference types="node" />
|
|
13
13
|
import AnalyticsEvent from './AnalyticsEvent';
|
|
14
14
|
export var isUIAnalyticsEvent = function isUIAnalyticsEvent(obj) {
|
|
@@ -18,14 +18,12 @@ export var isUIAnalyticsEvent = function isUIAnalyticsEvent(obj) {
|
|
|
18
18
|
(obj === null || obj === void 0 || (_obj$constructor = obj.constructor) === null || _obj$constructor === void 0 ? void 0 : _obj$constructor.name) === 'UIAnalyticsEvent';
|
|
19
19
|
};
|
|
20
20
|
var UIAnalyticsEvent = /*#__PURE__*/function (_AnalyticsEvent) {
|
|
21
|
-
_inherits(UIAnalyticsEvent, _AnalyticsEvent);
|
|
22
|
-
var _super = _createSuper(UIAnalyticsEvent);
|
|
23
21
|
function UIAnalyticsEvent(props) {
|
|
24
22
|
var _this;
|
|
25
23
|
_classCallCheck(this, UIAnalyticsEvent);
|
|
26
|
-
_this =
|
|
27
|
-
_defineProperty(
|
|
28
|
-
_defineProperty(
|
|
24
|
+
_this = _callSuper(this, UIAnalyticsEvent, [props]);
|
|
25
|
+
_defineProperty(_this, "_isUIAnalyticsEvent", true);
|
|
26
|
+
_defineProperty(_this, "clone", function () {
|
|
29
27
|
if (_this.hasFired) {
|
|
30
28
|
if (process.env.NODE_ENV !== 'production' && !process.env.CI) {
|
|
31
29
|
// eslint-disable-next-line no-console
|
|
@@ -48,7 +46,7 @@ var UIAnalyticsEvent = /*#__PURE__*/function (_AnalyticsEvent) {
|
|
|
48
46
|
payload: payload
|
|
49
47
|
});
|
|
50
48
|
});
|
|
51
|
-
_defineProperty(
|
|
49
|
+
_defineProperty(_this, "fire", function (channel) {
|
|
52
50
|
if (_this.hasFired) {
|
|
53
51
|
if (process.env.NODE_ENV !== 'production' && !process.env.CI) {
|
|
54
52
|
// eslint-disable-next-line no-console
|
|
@@ -57,7 +55,7 @@ var UIAnalyticsEvent = /*#__PURE__*/function (_AnalyticsEvent) {
|
|
|
57
55
|
return;
|
|
58
56
|
}
|
|
59
57
|
_this.handlers.forEach(function (handler) {
|
|
60
|
-
return handler(
|
|
58
|
+
return handler(_this, channel);
|
|
61
59
|
});
|
|
62
60
|
_this.hasFired = true;
|
|
63
61
|
});
|
|
@@ -66,7 +64,8 @@ var UIAnalyticsEvent = /*#__PURE__*/function (_AnalyticsEvent) {
|
|
|
66
64
|
_this.hasFired = false;
|
|
67
65
|
return _this;
|
|
68
66
|
}
|
|
69
|
-
|
|
67
|
+
_inherits(UIAnalyticsEvent, _AnalyticsEvent);
|
|
68
|
+
return _createClass(UIAnalyticsEvent, [{
|
|
70
69
|
key: "update",
|
|
71
70
|
value: function update(updater) {
|
|
72
71
|
if (this.hasFired) {
|
|
@@ -76,9 +75,8 @@ var UIAnalyticsEvent = /*#__PURE__*/function (_AnalyticsEvent) {
|
|
|
76
75
|
}
|
|
77
76
|
return this;
|
|
78
77
|
}
|
|
79
|
-
return
|
|
78
|
+
return _superPropGet(UIAnalyticsEvent, "update", this, 3)([updater]);
|
|
80
79
|
}
|
|
81
80
|
}]);
|
|
82
|
-
return UIAnalyticsEvent;
|
|
83
81
|
}(AnalyticsEvent);
|
|
84
82
|
export { UIAnalyticsEvent as default };
|
|
@@ -2,15 +2,14 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
3
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
4
4
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
5
|
-
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
6
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
7
5
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
8
6
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
7
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
9
8
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
10
9
|
var _excluded = ["analyticsId", "analyticsData"];
|
|
11
10
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
12
11
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
13
|
-
function
|
|
12
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
14
13
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
15
14
|
import React, { Component } from 'react';
|
|
16
15
|
import PropTypes from 'prop-types';
|
|
@@ -32,18 +31,16 @@ import PropTypes from 'prop-types';
|
|
|
32
31
|
* @param withDelegation
|
|
33
32
|
*/
|
|
34
33
|
var withAnalytics = function withAnalytics(WrappedComponent) {
|
|
35
|
-
var
|
|
34
|
+
var _WithAnalytics;
|
|
36
35
|
var map = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
37
36
|
var defaultProps = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
38
37
|
var withDelegation = arguments.length > 3 ? arguments[3] : undefined;
|
|
39
|
-
return
|
|
40
|
-
_inherits(WithAnalytics, _Component);
|
|
41
|
-
var _super = _createSuper(WithAnalytics);
|
|
38
|
+
return _WithAnalytics = /*#__PURE__*/function (_Component) {
|
|
42
39
|
function WithAnalytics(props) {
|
|
43
40
|
var _this;
|
|
44
41
|
_classCallCheck(this, WithAnalytics);
|
|
45
|
-
_this =
|
|
46
|
-
_defineProperty(
|
|
42
|
+
_this = _callSuper(this, WithAnalytics, [props]);
|
|
43
|
+
_defineProperty(_this, "delegateAnalyticsEvent", function (analyticsId, data, isPrivate) {
|
|
47
44
|
var _ref = _this.context,
|
|
48
45
|
onAnalyticsEvent = _ref.onAnalyticsEvent;
|
|
49
46
|
if (!onAnalyticsEvent) {
|
|
@@ -51,7 +48,7 @@ var withAnalytics = function withAnalytics(WrappedComponent) {
|
|
|
51
48
|
}
|
|
52
49
|
onAnalyticsEvent(analyticsId, data, isPrivate);
|
|
53
50
|
});
|
|
54
|
-
_defineProperty(
|
|
51
|
+
_defineProperty(_this, "fireAnalyticsEvent", function (name, data) {
|
|
55
52
|
var _this$props = _this.props,
|
|
56
53
|
analyticsData = _this$props.analyticsData,
|
|
57
54
|
analyticsId = _this$props.analyticsId;
|
|
@@ -63,7 +60,7 @@ var withAnalytics = function withAnalytics(WrappedComponent) {
|
|
|
63
60
|
var eventData = _objectSpread(_objectSpread({}, analyticsData), data);
|
|
64
61
|
onAnalyticsEvent("".concat(analyticsId, ".").concat(name), eventData, false);
|
|
65
62
|
});
|
|
66
|
-
_defineProperty(
|
|
63
|
+
_defineProperty(_this, "privateAnalyticsEvent", function (name, data) {
|
|
67
64
|
var _ref3 = _this.context,
|
|
68
65
|
onAnalyticsEvent = _ref3.onAnalyticsEvent;
|
|
69
66
|
if (!onAnalyticsEvent) {
|
|
@@ -71,7 +68,7 @@ var withAnalytics = function withAnalytics(WrappedComponent) {
|
|
|
71
68
|
}
|
|
72
69
|
onAnalyticsEvent("".concat(name), data, true);
|
|
73
70
|
});
|
|
74
|
-
_defineProperty(
|
|
71
|
+
_defineProperty(_this, "getParentAnalyticsData", function (name) {
|
|
75
72
|
var _ref4 = _this.context,
|
|
76
73
|
getParentAnalyticsData = _ref4.getParentAnalyticsData;
|
|
77
74
|
var parentData = {};
|
|
@@ -86,7 +83,8 @@ var withAnalytics = function withAnalytics(WrappedComponent) {
|
|
|
86
83
|
};
|
|
87
84
|
return _this;
|
|
88
85
|
}
|
|
89
|
-
|
|
86
|
+
_inherits(WithAnalytics, _Component);
|
|
87
|
+
return _createClass(WithAnalytics, [{
|
|
90
88
|
key: "componentDidMount",
|
|
91
89
|
value: function componentDidMount() {
|
|
92
90
|
this.setState({
|
|
@@ -125,13 +123,12 @@ var withAnalytics = function withAnalytics(WrappedComponent) {
|
|
|
125
123
|
}, componentProps));
|
|
126
124
|
}
|
|
127
125
|
}]);
|
|
128
|
-
|
|
129
|
-
}(Component), _defineProperty(_class, "displayName", "WithAnalytics(".concat(WrappedComponent.displayName || WrappedComponent.name, ")")), _defineProperty(_class, "contextTypes", {
|
|
126
|
+
}(Component), _defineProperty(_WithAnalytics, "displayName", "WithAnalytics(".concat(WrappedComponent.displayName || WrappedComponent.name, ")")), _defineProperty(_WithAnalytics, "contextTypes", {
|
|
130
127
|
onAnalyticsEvent: PropTypes.func,
|
|
131
128
|
getParentAnalyticsData: PropTypes.func
|
|
132
|
-
}), _defineProperty(
|
|
129
|
+
}), _defineProperty(_WithAnalytics, "defaultProps", {
|
|
133
130
|
analyticsId: defaultProps.analyticsId,
|
|
134
131
|
analyticsData: defaultProps.analyticsData
|
|
135
|
-
}),
|
|
132
|
+
}), _WithAnalytics;
|
|
136
133
|
};
|
|
137
134
|
export default withAnalytics;
|
|
@@ -41,6 +41,6 @@ export declare class AnalyticsDecorator extends Component<AnalyticsDecoratorProp
|
|
|
41
41
|
getDecoratedAnalyticsData: (name: string, srcData: AnalyticsData, isPrivate: boolean) => AnalyticsData;
|
|
42
42
|
onAnalyticsEvent: (name: string, srcData: AnalyticsData, isPrivate: boolean) => void;
|
|
43
43
|
getParentAnalyticsData: (name: string, isPrivate: boolean) => AnalyticsData;
|
|
44
|
-
render():
|
|
44
|
+
render(): React.ReactNode;
|
|
45
45
|
}
|
|
46
46
|
export default AnalyticsDecorator;
|
|
@@ -20,6 +20,6 @@ declare class AnalyticsDelegate extends Component<AnalyticsDelegateProps> {
|
|
|
20
20
|
};
|
|
21
21
|
getChildContext(): AnalyticsDelegateContext;
|
|
22
22
|
onAnalyticsEvent: (name: string, data: any, isPrivate: boolean) => void;
|
|
23
|
-
render():
|
|
23
|
+
render(): React.ReactNode;
|
|
24
24
|
}
|
|
25
25
|
export default AnalyticsDelegate;
|
|
@@ -47,12 +47,10 @@ declare const withAnalytics: (WrappedComponent: React.ComponentType<any>, map?:
|
|
|
47
47
|
privateAnalyticsEvent: (name: string, data?: AnalyticsData) => void;
|
|
48
48
|
getParentAnalyticsData: (name: string) => AnalyticsData;
|
|
49
49
|
render(): JSX.Element;
|
|
50
|
-
context:
|
|
50
|
+
context: unknown;
|
|
51
51
|
setState<K extends "evaluatedMap">(state: WithAnalyticsState | ((prevState: Readonly<WithAnalyticsState>, props: Readonly<WithAnalyticsProps>) => WithAnalyticsState | Pick<WithAnalyticsState, K> | null) | Pick<WithAnalyticsState, K> | null, callback?: (() => void) | undefined): void;
|
|
52
52
|
forceUpdate(callback?: (() => void) | undefined): void;
|
|
53
|
-
readonly props: Readonly<WithAnalyticsProps
|
|
54
|
-
children?: React.ReactNode;
|
|
55
|
-
}>;
|
|
53
|
+
readonly props: Readonly<WithAnalyticsProps>;
|
|
56
54
|
state: Readonly<WithAnalyticsState>;
|
|
57
55
|
refs: {
|
|
58
56
|
[key: string]: React.ReactInstance;
|
|
@@ -41,6 +41,6 @@ export declare class AnalyticsDecorator extends Component<AnalyticsDecoratorProp
|
|
|
41
41
|
getDecoratedAnalyticsData: (name: string, srcData: AnalyticsData, isPrivate: boolean) => AnalyticsData;
|
|
42
42
|
onAnalyticsEvent: (name: string, srcData: AnalyticsData, isPrivate: boolean) => void;
|
|
43
43
|
getParentAnalyticsData: (name: string, isPrivate: boolean) => AnalyticsData;
|
|
44
|
-
render():
|
|
44
|
+
render(): React.ReactNode;
|
|
45
45
|
}
|
|
46
46
|
export default AnalyticsDecorator;
|
|
@@ -20,6 +20,6 @@ declare class AnalyticsDelegate extends Component<AnalyticsDelegateProps> {
|
|
|
20
20
|
};
|
|
21
21
|
getChildContext(): AnalyticsDelegateContext;
|
|
22
22
|
onAnalyticsEvent: (name: string, data: any, isPrivate: boolean) => void;
|
|
23
|
-
render():
|
|
23
|
+
render(): React.ReactNode;
|
|
24
24
|
}
|
|
25
25
|
export default AnalyticsDelegate;
|
|
@@ -47,12 +47,10 @@ declare const withAnalytics: (WrappedComponent: React.ComponentType<any>, map?:
|
|
|
47
47
|
privateAnalyticsEvent: (name: string, data?: AnalyticsData) => void;
|
|
48
48
|
getParentAnalyticsData: (name: string) => AnalyticsData;
|
|
49
49
|
render(): JSX.Element;
|
|
50
|
-
context:
|
|
50
|
+
context: unknown;
|
|
51
51
|
setState<K extends "evaluatedMap">(state: WithAnalyticsState | ((prevState: Readonly<WithAnalyticsState>, props: Readonly<WithAnalyticsProps>) => WithAnalyticsState | Pick<WithAnalyticsState, K> | null) | Pick<WithAnalyticsState, K> | null, callback?: (() => void) | undefined): void;
|
|
52
52
|
forceUpdate(callback?: (() => void) | undefined): void;
|
|
53
|
-
readonly props: Readonly<WithAnalyticsProps
|
|
54
|
-
children?: React.ReactNode;
|
|
55
|
-
}>;
|
|
53
|
+
readonly props: Readonly<WithAnalyticsProps>;
|
|
56
54
|
state: Readonly<WithAnalyticsState>;
|
|
57
55
|
refs: {
|
|
58
56
|
[key: string]: React.ReactInstance;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/analytics-next",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.3.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/"
|
|
@@ -57,16 +57,21 @@
|
|
|
57
57
|
"use-memo-one": "^1.1.1"
|
|
58
58
|
},
|
|
59
59
|
"peerDependencies": {
|
|
60
|
-
"react": "^16.8.0 || ^17.0.0 || ^18.
|
|
61
|
-
"react-dom": "^16.8.0 || ^17.0.0 || ^18.
|
|
60
|
+
"react": "^16.8.0 || ^17.0.0 || ^18.2.0",
|
|
61
|
+
"react-dom": "^16.8.0 || ^17.0.0 || ^18.2.0"
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
64
|
"@atlaskit/ssr": "*",
|
|
65
65
|
"@atlassian/feature-flags-test-utils": "*",
|
|
66
|
-
"@testing-library/react": "^
|
|
66
|
+
"@testing-library/react": "^13.4.0",
|
|
67
67
|
"storybook-addon-performance": "^0.17.3",
|
|
68
68
|
"typescript": "~5.4.2"
|
|
69
69
|
},
|
|
70
|
+
"overrides": {
|
|
71
|
+
"@atlaskit/analytics-next-stable-react-context": {
|
|
72
|
+
"react": "^18.2.0"
|
|
73
|
+
}
|
|
74
|
+
},
|
|
70
75
|
"techstack": {
|
|
71
76
|
"@atlassian/frontend": {
|
|
72
77
|
"import-structure": "atlassian-conventions"
|