@atlaskit/analytics-next
Advanced tools
Comparing version 10.2.0 to 10.2.1
# @atlaskit/analytics-next | ||
## 10.2.1 | ||
### Patch Changes | ||
- [#179607](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/179607) | ||
[`ec8b221900f5c`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/ec8b221900f5c) - | ||
Adds a package.json#overrides in hopes that it will override the peerDependencies of | ||
@atlaskit/analytics-next-stable-react-context (NOTE: This may not work across all platforms and | ||
was only tested in one scenario, but should have zero impact if it doesn't work) | ||
## 10.2.0 | ||
@@ -4,0 +14,0 @@ |
@@ -12,6 +12,5 @@ "use strict"; | ||
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); | ||
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized")); | ||
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits")); | ||
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn")); | ||
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf")); | ||
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits")); | ||
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); | ||
@@ -23,3 +22,3 @@ var _react = _interopRequireWildcard(require("react")); | ||
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; } | ||
function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = (0, _getPrototypeOf2.default)(t); if (r) { var s = (0, _getPrototypeOf2.default)(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return (0, _possibleConstructorReturn2.default)(this, e); }; } | ||
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)); } | ||
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | ||
@@ -36,9 +35,7 @@ var ContextTypes = { | ||
var AnalyticsContext = /*#__PURE__*/function (_Component) { | ||
(0, _inherits2.default)(AnalyticsContext, _Component); | ||
var _super = _createSuper(AnalyticsContext); | ||
function AnalyticsContext(props) { | ||
var _this; | ||
(0, _classCallCheck2.default)(this, AnalyticsContext); | ||
_this = _super.call(this, props); | ||
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "getChildContext", function () { | ||
_this = _callSuper(this, AnalyticsContext, [props]); | ||
(0, _defineProperty2.default)(_this, "getChildContext", function () { | ||
return { | ||
@@ -48,3 +45,3 @@ getAtlaskitAnalyticsContext: _this.getAnalyticsContext | ||
}); | ||
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "getAnalyticsContext", function () { | ||
(0, _defineProperty2.default)(_this, "getAnalyticsContext", function () { | ||
var data = _this.props.data; | ||
@@ -55,3 +52,3 @@ var _this$context$getAtla = _this.context.getAtlaskitAnalyticsContext, | ||
}); | ||
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "getAnalyticsEventHandlers", function () { | ||
(0, _defineProperty2.default)(_this, "getAnalyticsEventHandlers", function () { | ||
var _this$context$getAtla2 = _this.context.getAtlaskitAnalyticsEventHandlers, | ||
@@ -67,3 +64,4 @@ getAtlaskitAnalyticsEventHandlers = _this$context$getAtla2 === void 0 ? noop : _this$context$getAtla2; | ||
} | ||
(0, _createClass2.default)(AnalyticsContext, [{ | ||
(0, _inherits2.default)(AnalyticsContext, _Component); | ||
return (0, _createClass2.default)(AnalyticsContext, [{ | ||
key: "render", | ||
@@ -77,3 +75,2 @@ value: function render() { | ||
}]); | ||
return AnalyticsContext; | ||
}(_react.Component); | ||
@@ -80,0 +77,0 @@ (0, _defineProperty2.default)(AnalyticsContext, "contextTypes", ContextTypes); |
@@ -12,6 +12,5 @@ "use strict"; | ||
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); | ||
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized")); | ||
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits")); | ||
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn")); | ||
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf")); | ||
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits")); | ||
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); | ||
@@ -25,3 +24,3 @@ var _react = _interopRequireWildcard(require("react")); | ||
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; } | ||
function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = (0, _getPrototypeOf2.default)(t); if (r) { var s = (0, _getPrototypeOf2.default)(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return (0, _possibleConstructorReturn2.default)(this, e); }; } | ||
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)); } | ||
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | ||
@@ -40,4 +39,2 @@ var ContextTypes = exports.ContextTypes = { | ||
var AnalyticsDecorator = exports.AnalyticsDecorator = /*#__PURE__*/function (_Component) { | ||
(0, _inherits2.default)(AnalyticsDecorator, _Component); | ||
var _super = _createSuper(AnalyticsDecorator); | ||
function AnalyticsDecorator() { | ||
@@ -49,4 +46,4 @@ var _this; | ||
} | ||
_this = _super.call.apply(_super, [this].concat(args)); | ||
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "getDecoratedAnalyticsData", function (name, srcData, isPrivate) { | ||
_this = _callSuper(this, AnalyticsDecorator, [].concat(args)); | ||
(0, _defineProperty2.default)(_this, "getDecoratedAnalyticsData", function (name, srcData, isPrivate) { | ||
var _this$props = _this.props, | ||
@@ -68,3 +65,3 @@ data = _this$props.data, | ||
}); | ||
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "onAnalyticsEvent", function (name, srcData, isPrivate) { | ||
(0, _defineProperty2.default)(_this, "onAnalyticsEvent", function (name, srcData, isPrivate) { | ||
var _ref = _this.context, | ||
@@ -78,3 +75,3 @@ onAnalyticsEvent = _ref.onAnalyticsEvent; | ||
}); | ||
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "getParentAnalyticsData", function (name, isPrivate) { | ||
(0, _defineProperty2.default)(_this, "getParentAnalyticsData", function (name, isPrivate) { | ||
var parentData = _this.getDecoratedAnalyticsData(name, {}, isPrivate); | ||
@@ -90,3 +87,4 @@ var _ref2 = _this.context, | ||
} | ||
(0, _createClass2.default)(AnalyticsDecorator, [{ | ||
(0, _inherits2.default)(AnalyticsDecorator, _Component); | ||
return (0, _createClass2.default)(AnalyticsDecorator, [{ | ||
key: "getChildContext", | ||
@@ -106,3 +104,2 @@ value: function getChildContext() { | ||
}]); | ||
return AnalyticsDecorator; | ||
}(_react.Component); | ||
@@ -109,0 +106,0 @@ (0, _defineProperty2.default)(AnalyticsDecorator, "defaultProps", { |
@@ -11,6 +11,5 @@ "use strict"; | ||
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); | ||
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized")); | ||
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits")); | ||
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn")); | ||
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf")); | ||
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits")); | ||
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); | ||
@@ -23,3 +22,3 @@ var _react = _interopRequireWildcard(require("react")); | ||
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; } | ||
function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = (0, _getPrototypeOf2.default)(t); if (r) { var s = (0, _getPrototypeOf2.default)(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return (0, _possibleConstructorReturn2.default)(this, e); }; } | ||
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)); } | ||
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | ||
@@ -36,4 +35,2 @@ var ContextTypes = { | ||
var AnalyticsDelegate = /*#__PURE__*/function (_Component) { | ||
(0, _inherits2.default)(AnalyticsDelegate, _Component); | ||
var _super = _createSuper(AnalyticsDelegate); | ||
function AnalyticsDelegate() { | ||
@@ -45,4 +42,4 @@ var _this; | ||
} | ||
_this = _super.call.apply(_super, [this].concat(args)); | ||
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "onAnalyticsEvent", function (name, data, isPrivate) { | ||
_this = _callSuper(this, AnalyticsDelegate, [].concat(args)); | ||
(0, _defineProperty2.default)(_this, "onAnalyticsEvent", function (name, data, isPrivate) { | ||
var delegateAnalyticsEvent = _this.props.delegateAnalyticsEvent; | ||
@@ -61,3 +58,4 @@ var eventData = _objectSpread({}, data); | ||
} | ||
(0, _createClass2.default)(AnalyticsDelegate, [{ | ||
(0, _inherits2.default)(AnalyticsDelegate, _Component); | ||
return (0, _createClass2.default)(AnalyticsDelegate, [{ | ||
key: "getChildContext", | ||
@@ -76,3 +74,2 @@ value: function getChildContext() { | ||
}]); | ||
return AnalyticsDelegate; | ||
}(_react.Component); | ||
@@ -79,0 +76,0 @@ (0, _defineProperty2.default)(AnalyticsDelegate, "contextTypes", ContextTypes); |
@@ -11,5 +11,5 @@ "use strict"; | ||
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); | ||
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits")); | ||
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn")); | ||
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf")); | ||
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits")); | ||
var _react = _interopRequireWildcard(require("react")); | ||
@@ -22,3 +22,3 @@ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags"); | ||
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; } | ||
function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = (0, _getPrototypeOf2.default)(t); if (r) { var s = (0, _getPrototypeOf2.default)(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return (0, _possibleConstructorReturn2.default)(this, e); }; } | ||
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)); } | ||
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | ||
@@ -31,8 +31,6 @@ /** | ||
var AnalyticsErrorBoundary = exports.default = /*#__PURE__*/function (_Component) { | ||
(0, _inherits2.default)(AnalyticsErrorBoundary, _Component); | ||
var _super = _createSuper(AnalyticsErrorBoundary); | ||
function AnalyticsErrorBoundary(props) { | ||
var _this; | ||
(0, _classCallCheck2.default)(this, AnalyticsErrorBoundary); | ||
_this = _super.call(this, props); | ||
_this = _callSuper(this, AnalyticsErrorBoundary, [props]); | ||
_this.state = { | ||
@@ -43,3 +41,4 @@ hasError: false | ||
} | ||
(0, _createClass2.default)(AnalyticsErrorBoundary, [{ | ||
(0, _inherits2.default)(AnalyticsErrorBoundary, _Component); | ||
return (0, _createClass2.default)(AnalyticsErrorBoundary, [{ | ||
key: "componentDidCatch", | ||
@@ -85,3 +84,2 @@ value: function componentDidCatch(error, info) { | ||
}]); | ||
return AnalyticsErrorBoundary; | ||
}(_react.Component); |
@@ -12,6 +12,5 @@ "use strict"; | ||
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); | ||
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized")); | ||
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits")); | ||
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn")); | ||
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf")); | ||
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits")); | ||
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); | ||
@@ -23,3 +22,3 @@ var _react = _interopRequireWildcard(require("react")); | ||
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; } | ||
function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = (0, _getPrototypeOf2.default)(t); if (r) { var s = (0, _getPrototypeOf2.default)(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return (0, _possibleConstructorReturn2.default)(this, e); }; } | ||
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)); } | ||
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | ||
@@ -36,9 +35,7 @@ var ContextTypes = { | ||
var AnalyticsListener = /*#__PURE__*/function (_Component) { | ||
(0, _inherits2.default)(AnalyticsListener, _Component); | ||
var _super = _createSuper(AnalyticsListener); | ||
function AnalyticsListener(props) { | ||
var _this; | ||
(0, _classCallCheck2.default)(this, AnalyticsListener); | ||
_this = _super.call(this, props); | ||
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "getChildContext", function () { | ||
_this = _callSuper(this, AnalyticsListener, [props]); | ||
(0, _defineProperty2.default)(_this, "getChildContext", function () { | ||
return { | ||
@@ -49,3 +46,3 @@ getAtlaskitAnalyticsEventHandlers: _this.getAnalyticsEventHandlers, | ||
}); | ||
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "getAnalyticsEventHandlers", function () { | ||
(0, _defineProperty2.default)(_this, "getAnalyticsEventHandlers", function () { | ||
var _this$props = _this.props, | ||
@@ -63,3 +60,3 @@ channel = _this$props.channel, | ||
}); | ||
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "getAtlaskitAnalyticsContext", function () { | ||
(0, _defineProperty2.default)(_this, "getAtlaskitAnalyticsContext", function () { | ||
var _this$context$getAtla2 = _this.context.getAtlaskitAnalyticsContext, | ||
@@ -75,3 +72,4 @@ getAtlaskitAnalyticsContext = _this$context$getAtla2 === void 0 ? noop : _this$context$getAtla2; | ||
} | ||
(0, _createClass2.default)(AnalyticsListener, [{ | ||
(0, _inherits2.default)(AnalyticsListener, _Component); | ||
return (0, _createClass2.default)(AnalyticsListener, [{ | ||
key: "render", | ||
@@ -85,3 +83,2 @@ value: function render() { | ||
}]); | ||
return AnalyticsListener; | ||
}(_react.Component); | ||
@@ -88,0 +85,0 @@ (0, _defineProperty2.default)(AnalyticsListener, "contextTypes", ContextTypes); |
@@ -35,3 +35,3 @@ "use strict"; | ||
} | ||
(0, _createClass2.default)(AnalyticsEvent, [{ | ||
return (0, _createClass2.default)(AnalyticsEvent, [{ | ||
key: "update", | ||
@@ -48,3 +48,2 @@ value: function update(updater) { | ||
}]); | ||
return AnalyticsEvent; | ||
}(); |
@@ -11,11 +11,11 @@ "use strict"; | ||
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); | ||
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized")); | ||
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn")); | ||
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf")); | ||
var _get2 = _interopRequireDefault(require("@babel/runtime/helpers/get")); | ||
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits")); | ||
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn")); | ||
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf")); | ||
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); | ||
var _AnalyticsEvent2 = _interopRequireDefault(require("./AnalyticsEvent")); | ||
function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = (0, _getPrototypeOf2.default)(t); if (r) { var s = (0, _getPrototypeOf2.default)(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return (0, _possibleConstructorReturn2.default)(this, e); }; } | ||
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /// <reference types="node" /> | ||
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)); } | ||
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | ||
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" /> | ||
var isUIAnalyticsEvent = exports.isUIAnalyticsEvent = function isUIAnalyticsEvent(obj) { | ||
@@ -28,10 +28,8 @@ var _obj$constructor; | ||
var UIAnalyticsEvent = exports.default = /*#__PURE__*/function (_AnalyticsEvent) { | ||
(0, _inherits2.default)(UIAnalyticsEvent, _AnalyticsEvent); | ||
var _super = _createSuper(UIAnalyticsEvent); | ||
function UIAnalyticsEvent(props) { | ||
var _this; | ||
(0, _classCallCheck2.default)(this, UIAnalyticsEvent); | ||
_this = _super.call(this, props); | ||
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "_isUIAnalyticsEvent", true); | ||
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "clone", function () { | ||
_this = _callSuper(this, UIAnalyticsEvent, [props]); | ||
(0, _defineProperty2.default)(_this, "_isUIAnalyticsEvent", true); | ||
(0, _defineProperty2.default)(_this, "clone", function () { | ||
if (_this.hasFired) { | ||
@@ -59,3 +57,3 @@ if (process.env.NODE_ENV !== 'production' && !process.env.CI) { | ||
}); | ||
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "fire", function (channel) { | ||
(0, _defineProperty2.default)(_this, "fire", function (channel) { | ||
if (_this.hasFired) { | ||
@@ -69,3 +67,3 @@ if (process.env.NODE_ENV !== 'production' && !process.env.CI) { | ||
_this.handlers.forEach(function (handler) { | ||
return handler((0, _assertThisInitialized2.default)(_this), channel); | ||
return handler(_this, channel); | ||
}); | ||
@@ -79,3 +77,4 @@ _this.hasFired = true; | ||
} | ||
(0, _createClass2.default)(UIAnalyticsEvent, [{ | ||
(0, _inherits2.default)(UIAnalyticsEvent, _AnalyticsEvent); | ||
return (0, _createClass2.default)(UIAnalyticsEvent, [{ | ||
key: "update", | ||
@@ -90,6 +89,5 @@ value: function update(updater) { | ||
} | ||
return (0, _get2.default)((0, _getPrototypeOf2.default)(UIAnalyticsEvent.prototype), "update", this).call(this, updater); | ||
return _superPropGet(UIAnalyticsEvent, "update", this, 3)([updater]); | ||
} | ||
}]); | ||
return UIAnalyticsEvent; | ||
}(_AnalyticsEvent2.default); |
@@ -13,6 +13,5 @@ "use strict"; | ||
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); | ||
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized")); | ||
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits")); | ||
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn")); | ||
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf")); | ||
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits")); | ||
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); | ||
@@ -26,3 +25,3 @@ var _react = _interopRequireWildcard(require("react")); | ||
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; } | ||
function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = (0, _getPrototypeOf2.default)(t); if (r) { var s = (0, _getPrototypeOf2.default)(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return (0, _possibleConstructorReturn2.default)(this, e); }; } | ||
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)); } | ||
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | ||
@@ -47,14 +46,12 @@ /** | ||
var withAnalytics = function withAnalytics(WrappedComponent) { | ||
var _class; | ||
var _WithAnalytics; | ||
var map = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; | ||
var defaultProps = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; | ||
var withDelegation = arguments.length > 3 ? arguments[3] : undefined; | ||
return _class = /*#__PURE__*/function (_Component) { | ||
(0, _inherits2.default)(WithAnalytics, _Component); | ||
var _super = _createSuper(WithAnalytics); | ||
return _WithAnalytics = /*#__PURE__*/function (_Component) { | ||
function WithAnalytics(props) { | ||
var _this; | ||
(0, _classCallCheck2.default)(this, WithAnalytics); | ||
_this = _super.call(this, props); | ||
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "delegateAnalyticsEvent", function (analyticsId, data, isPrivate) { | ||
_this = _callSuper(this, WithAnalytics, [props]); | ||
(0, _defineProperty2.default)(_this, "delegateAnalyticsEvent", function (analyticsId, data, isPrivate) { | ||
var _ref = _this.context, | ||
@@ -67,3 +64,3 @@ onAnalyticsEvent = _ref.onAnalyticsEvent; | ||
}); | ||
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "fireAnalyticsEvent", function (name, data) { | ||
(0, _defineProperty2.default)(_this, "fireAnalyticsEvent", function (name, data) { | ||
var _this$props = _this.props, | ||
@@ -80,3 +77,3 @@ analyticsData = _this$props.analyticsData, | ||
}); | ||
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "privateAnalyticsEvent", function (name, data) { | ||
(0, _defineProperty2.default)(_this, "privateAnalyticsEvent", function (name, data) { | ||
var _ref3 = _this.context, | ||
@@ -89,3 +86,3 @@ onAnalyticsEvent = _ref3.onAnalyticsEvent; | ||
}); | ||
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "getParentAnalyticsData", function (name) { | ||
(0, _defineProperty2.default)(_this, "getParentAnalyticsData", function (name) { | ||
var _ref4 = _this.context, | ||
@@ -105,3 +102,4 @@ getParentAnalyticsData = _ref4.getParentAnalyticsData; | ||
} | ||
(0, _createClass2.default)(WithAnalytics, [{ | ||
(0, _inherits2.default)(WithAnalytics, _Component); | ||
return (0, _createClass2.default)(WithAnalytics, [{ | ||
key: "componentDidMount", | ||
@@ -145,11 +143,10 @@ value: function componentDidMount() { | ||
}]); | ||
return WithAnalytics; | ||
}(_react.Component), (0, _defineProperty2.default)(_class, "displayName", "WithAnalytics(".concat(WrappedComponent.displayName || WrappedComponent.name, ")")), (0, _defineProperty2.default)(_class, "contextTypes", { | ||
}(_react.Component), (0, _defineProperty2.default)(_WithAnalytics, "displayName", "WithAnalytics(".concat(WrappedComponent.displayName || WrappedComponent.name, ")")), (0, _defineProperty2.default)(_WithAnalytics, "contextTypes", { | ||
onAnalyticsEvent: _propTypes.default.func, | ||
getParentAnalyticsData: _propTypes.default.func | ||
}), (0, _defineProperty2.default)(_class, "defaultProps", { | ||
}), (0, _defineProperty2.default)(_WithAnalytics, "defaultProps", { | ||
analyticsId: defaultProps.analyticsId, | ||
analyticsData: defaultProps.analyticsData | ||
}), _class; | ||
}), _WithAnalytics; | ||
}; | ||
var _default = exports.default = withAnalytics; |
@@ -23,4 +23,4 @@ import _extends from "@babel/runtime/helpers/extends"; | ||
const withAnalytics = (WrappedComponent, map = {}, defaultProps = {}, withDelegation) => { | ||
var _class; | ||
return _class = class WithAnalytics extends Component { | ||
var _WithAnalytics; | ||
return _WithAnalytics = class WithAnalytics extends Component { | ||
constructor(props) { | ||
@@ -114,10 +114,10 @@ super(props); | ||
} | ||
}, _defineProperty(_class, "displayName", `WithAnalytics(${WrappedComponent.displayName || WrappedComponent.name})`), _defineProperty(_class, "contextTypes", { | ||
}, _defineProperty(_WithAnalytics, "displayName", `WithAnalytics(${WrappedComponent.displayName || WrappedComponent.name})`), _defineProperty(_WithAnalytics, "contextTypes", { | ||
onAnalyticsEvent: PropTypes.func, | ||
getParentAnalyticsData: PropTypes.func | ||
}), _defineProperty(_class, "defaultProps", { | ||
}), _defineProperty(_WithAnalytics, "defaultProps", { | ||
analyticsId: defaultProps.analyticsId, | ||
analyticsData: defaultProps.analyticsData | ||
}), _class; | ||
}), _WithAnalytics; | ||
}; | ||
export default withAnalytics; |
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray"; | ||
import _classCallCheck from "@babel/runtime/helpers/classCallCheck"; | ||
import _createClass from "@babel/runtime/helpers/createClass"; | ||
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized"; | ||
import _inherits from "@babel/runtime/helpers/inherits"; | ||
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn"; | ||
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf"; | ||
import _inherits from "@babel/runtime/helpers/inherits"; | ||
import _defineProperty from "@babel/runtime/helpers/defineProperty"; | ||
function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; } | ||
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); } | ||
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | ||
@@ -24,9 +23,7 @@ import React, { Component } from 'react'; | ||
var AnalyticsContext = /*#__PURE__*/function (_Component) { | ||
_inherits(AnalyticsContext, _Component); | ||
var _super = _createSuper(AnalyticsContext); | ||
function AnalyticsContext(props) { | ||
var _this; | ||
_classCallCheck(this, AnalyticsContext); | ||
_this = _super.call(this, props); | ||
_defineProperty(_assertThisInitialized(_this), "getChildContext", function () { | ||
_this = _callSuper(this, AnalyticsContext, [props]); | ||
_defineProperty(_this, "getChildContext", function () { | ||
return { | ||
@@ -36,3 +33,3 @@ getAtlaskitAnalyticsContext: _this.getAnalyticsContext | ||
}); | ||
_defineProperty(_assertThisInitialized(_this), "getAnalyticsContext", function () { | ||
_defineProperty(_this, "getAnalyticsContext", function () { | ||
var data = _this.props.data; | ||
@@ -43,3 +40,3 @@ var _this$context$getAtla = _this.context.getAtlaskitAnalyticsContext, | ||
}); | ||
_defineProperty(_assertThisInitialized(_this), "getAnalyticsEventHandlers", function () { | ||
_defineProperty(_this, "getAnalyticsEventHandlers", function () { | ||
var _this$context$getAtla2 = _this.context.getAtlaskitAnalyticsEventHandlers, | ||
@@ -55,3 +52,4 @@ getAtlaskitAnalyticsEventHandlers = _this$context$getAtla2 === void 0 ? noop : _this$context$getAtla2; | ||
} | ||
_createClass(AnalyticsContext, [{ | ||
_inherits(AnalyticsContext, _Component); | ||
return _createClass(AnalyticsContext, [{ | ||
key: "render", | ||
@@ -65,3 +63,2 @@ value: function render() { | ||
}]); | ||
return AnalyticsContext; | ||
}(Component); | ||
@@ -68,0 +65,0 @@ _defineProperty(AnalyticsContext, "contextTypes", ContextTypes); |
import _typeof from "@babel/runtime/helpers/typeof"; | ||
import _classCallCheck from "@babel/runtime/helpers/classCallCheck"; | ||
import _createClass from "@babel/runtime/helpers/createClass"; | ||
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized"; | ||
import _inherits from "@babel/runtime/helpers/inherits"; | ||
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn"; | ||
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf"; | ||
import _inherits from "@babel/runtime/helpers/inherits"; | ||
import _defineProperty from "@babel/runtime/helpers/defineProperty"; | ||
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; } | ||
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; } | ||
function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; } | ||
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); } | ||
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | ||
@@ -28,4 +27,2 @@ import React, { Component } from 'react'; | ||
export var AnalyticsDecorator = /*#__PURE__*/function (_Component) { | ||
_inherits(AnalyticsDecorator, _Component); | ||
var _super = _createSuper(AnalyticsDecorator); | ||
function AnalyticsDecorator() { | ||
@@ -37,4 +34,4 @@ var _this; | ||
} | ||
_this = _super.call.apply(_super, [this].concat(args)); | ||
_defineProperty(_assertThisInitialized(_this), "getDecoratedAnalyticsData", function (name, srcData, isPrivate) { | ||
_this = _callSuper(this, AnalyticsDecorator, [].concat(args)); | ||
_defineProperty(_this, "getDecoratedAnalyticsData", function (name, srcData, isPrivate) { | ||
var _this$props = _this.props, | ||
@@ -56,3 +53,3 @@ data = _this$props.data, | ||
}); | ||
_defineProperty(_assertThisInitialized(_this), "onAnalyticsEvent", function (name, srcData, isPrivate) { | ||
_defineProperty(_this, "onAnalyticsEvent", function (name, srcData, isPrivate) { | ||
var _ref = _this.context, | ||
@@ -66,3 +63,3 @@ onAnalyticsEvent = _ref.onAnalyticsEvent; | ||
}); | ||
_defineProperty(_assertThisInitialized(_this), "getParentAnalyticsData", function (name, isPrivate) { | ||
_defineProperty(_this, "getParentAnalyticsData", function (name, isPrivate) { | ||
var parentData = _this.getDecoratedAnalyticsData(name, {}, isPrivate); | ||
@@ -78,3 +75,4 @@ var _ref2 = _this.context, | ||
} | ||
_createClass(AnalyticsDecorator, [{ | ||
_inherits(AnalyticsDecorator, _Component); | ||
return _createClass(AnalyticsDecorator, [{ | ||
key: "getChildContext", | ||
@@ -94,3 +92,2 @@ value: function getChildContext() { | ||
}]); | ||
return AnalyticsDecorator; | ||
}(Component); | ||
@@ -97,0 +94,0 @@ _defineProperty(AnalyticsDecorator, "defaultProps", { |
import _classCallCheck from "@babel/runtime/helpers/classCallCheck"; | ||
import _createClass from "@babel/runtime/helpers/createClass"; | ||
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized"; | ||
import _inherits from "@babel/runtime/helpers/inherits"; | ||
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn"; | ||
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf"; | ||
import _inherits from "@babel/runtime/helpers/inherits"; | ||
import _defineProperty from "@babel/runtime/helpers/defineProperty"; | ||
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; } | ||
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; } | ||
function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; } | ||
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); } | ||
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | ||
@@ -24,4 +23,2 @@ import React, { Component } from 'react'; | ||
var AnalyticsDelegate = /*#__PURE__*/function (_Component) { | ||
_inherits(AnalyticsDelegate, _Component); | ||
var _super = _createSuper(AnalyticsDelegate); | ||
function AnalyticsDelegate() { | ||
@@ -33,4 +30,4 @@ var _this; | ||
} | ||
_this = _super.call.apply(_super, [this].concat(args)); | ||
_defineProperty(_assertThisInitialized(_this), "onAnalyticsEvent", function (name, data, isPrivate) { | ||
_this = _callSuper(this, AnalyticsDelegate, [].concat(args)); | ||
_defineProperty(_this, "onAnalyticsEvent", function (name, data, isPrivate) { | ||
var delegateAnalyticsEvent = _this.props.delegateAnalyticsEvent; | ||
@@ -49,3 +46,4 @@ var eventData = _objectSpread({}, data); | ||
} | ||
_createClass(AnalyticsDelegate, [{ | ||
_inherits(AnalyticsDelegate, _Component); | ||
return _createClass(AnalyticsDelegate, [{ | ||
key: "getChildContext", | ||
@@ -64,3 +62,2 @@ value: function getChildContext() { | ||
}]); | ||
return AnalyticsDelegate; | ||
}(Component); | ||
@@ -67,0 +64,0 @@ _defineProperty(AnalyticsDelegate, "contextTypes", ContextTypes); |
import _classCallCheck from "@babel/runtime/helpers/classCallCheck"; | ||
import _createClass from "@babel/runtime/helpers/createClass"; | ||
import _inherits from "@babel/runtime/helpers/inherits"; | ||
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn"; | ||
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf"; | ||
function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; } | ||
import _inherits from "@babel/runtime/helpers/inherits"; | ||
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); } | ||
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | ||
@@ -19,8 +19,6 @@ import React, { Component } from 'react'; | ||
var AnalyticsErrorBoundary = /*#__PURE__*/function (_Component) { | ||
_inherits(AnalyticsErrorBoundary, _Component); | ||
var _super = _createSuper(AnalyticsErrorBoundary); | ||
function AnalyticsErrorBoundary(props) { | ||
var _this; | ||
_classCallCheck(this, AnalyticsErrorBoundary); | ||
_this = _super.call(this, props); | ||
_this = _callSuper(this, AnalyticsErrorBoundary, [props]); | ||
_this.state = { | ||
@@ -31,3 +29,4 @@ hasError: false | ||
} | ||
_createClass(AnalyticsErrorBoundary, [{ | ||
_inherits(AnalyticsErrorBoundary, _Component); | ||
return _createClass(AnalyticsErrorBoundary, [{ | ||
key: "componentDidCatch", | ||
@@ -73,4 +72,3 @@ value: function componentDidCatch(error, info) { | ||
}]); | ||
return AnalyticsErrorBoundary; | ||
}(Component); | ||
export { AnalyticsErrorBoundary as default }; |
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray"; | ||
import _classCallCheck from "@babel/runtime/helpers/classCallCheck"; | ||
import _createClass from "@babel/runtime/helpers/createClass"; | ||
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized"; | ||
import _inherits from "@babel/runtime/helpers/inherits"; | ||
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn"; | ||
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf"; | ||
import _inherits from "@babel/runtime/helpers/inherits"; | ||
import _defineProperty from "@babel/runtime/helpers/defineProperty"; | ||
function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; } | ||
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); } | ||
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | ||
@@ -24,9 +23,7 @@ import React, { Component } from 'react'; | ||
var AnalyticsListener = /*#__PURE__*/function (_Component) { | ||
_inherits(AnalyticsListener, _Component); | ||
var _super = _createSuper(AnalyticsListener); | ||
function AnalyticsListener(props) { | ||
var _this; | ||
_classCallCheck(this, AnalyticsListener); | ||
_this = _super.call(this, props); | ||
_defineProperty(_assertThisInitialized(_this), "getChildContext", function () { | ||
_this = _callSuper(this, AnalyticsListener, [props]); | ||
_defineProperty(_this, "getChildContext", function () { | ||
return { | ||
@@ -37,3 +34,3 @@ getAtlaskitAnalyticsEventHandlers: _this.getAnalyticsEventHandlers, | ||
}); | ||
_defineProperty(_assertThisInitialized(_this), "getAnalyticsEventHandlers", function () { | ||
_defineProperty(_this, "getAnalyticsEventHandlers", function () { | ||
var _this$props = _this.props, | ||
@@ -51,3 +48,3 @@ channel = _this$props.channel, | ||
}); | ||
_defineProperty(_assertThisInitialized(_this), "getAtlaskitAnalyticsContext", function () { | ||
_defineProperty(_this, "getAtlaskitAnalyticsContext", function () { | ||
var _this$context$getAtla2 = _this.context.getAtlaskitAnalyticsContext, | ||
@@ -63,3 +60,4 @@ getAtlaskitAnalyticsContext = _this$context$getAtla2 === void 0 ? noop : _this$context$getAtla2; | ||
} | ||
_createClass(AnalyticsListener, [{ | ||
_inherits(AnalyticsListener, _Component); | ||
return _createClass(AnalyticsListener, [{ | ||
key: "render", | ||
@@ -73,3 +71,2 @@ value: function render() { | ||
}]); | ||
return AnalyticsListener; | ||
}(Component); | ||
@@ -76,0 +73,0 @@ _defineProperty(AnalyticsListener, "contextTypes", ContextTypes); |
@@ -28,3 +28,3 @@ import _typeof from "@babel/runtime/helpers/typeof"; | ||
} | ||
_createClass(AnalyticsEvent, [{ | ||
return _createClass(AnalyticsEvent, [{ | ||
key: "update", | ||
@@ -41,4 +41,3 @@ value: function update(updater) { | ||
}]); | ||
return AnalyticsEvent; | ||
}(); | ||
export { AnalyticsEvent as default }; |
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray"; | ||
import _classCallCheck from "@babel/runtime/helpers/classCallCheck"; | ||
import _createClass from "@babel/runtime/helpers/createClass"; | ||
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized"; | ||
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn"; | ||
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf"; | ||
import _get from "@babel/runtime/helpers/get"; | ||
import _inherits from "@babel/runtime/helpers/inherits"; | ||
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn"; | ||
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf"; | ||
import _defineProperty from "@babel/runtime/helpers/defineProperty"; | ||
function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; } | ||
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); } | ||
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | ||
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; } | ||
/// <reference types="node" /> | ||
@@ -21,10 +21,8 @@ import AnalyticsEvent from './AnalyticsEvent'; | ||
var UIAnalyticsEvent = /*#__PURE__*/function (_AnalyticsEvent) { | ||
_inherits(UIAnalyticsEvent, _AnalyticsEvent); | ||
var _super = _createSuper(UIAnalyticsEvent); | ||
function UIAnalyticsEvent(props) { | ||
var _this; | ||
_classCallCheck(this, UIAnalyticsEvent); | ||
_this = _super.call(this, props); | ||
_defineProperty(_assertThisInitialized(_this), "_isUIAnalyticsEvent", true); | ||
_defineProperty(_assertThisInitialized(_this), "clone", function () { | ||
_this = _callSuper(this, UIAnalyticsEvent, [props]); | ||
_defineProperty(_this, "_isUIAnalyticsEvent", true); | ||
_defineProperty(_this, "clone", function () { | ||
if (_this.hasFired) { | ||
@@ -52,3 +50,3 @@ if (process.env.NODE_ENV !== 'production' && !process.env.CI) { | ||
}); | ||
_defineProperty(_assertThisInitialized(_this), "fire", function (channel) { | ||
_defineProperty(_this, "fire", function (channel) { | ||
if (_this.hasFired) { | ||
@@ -62,3 +60,3 @@ if (process.env.NODE_ENV !== 'production' && !process.env.CI) { | ||
_this.handlers.forEach(function (handler) { | ||
return handler(_assertThisInitialized(_this), channel); | ||
return handler(_this, channel); | ||
}); | ||
@@ -72,3 +70,4 @@ _this.hasFired = true; | ||
} | ||
_createClass(UIAnalyticsEvent, [{ | ||
_inherits(UIAnalyticsEvent, _AnalyticsEvent); | ||
return _createClass(UIAnalyticsEvent, [{ | ||
key: "update", | ||
@@ -83,7 +82,6 @@ value: function update(updater) { | ||
} | ||
return _get(_getPrototypeOf(UIAnalyticsEvent.prototype), "update", this).call(this, updater); | ||
return _superPropGet(UIAnalyticsEvent, "update", this, 3)([updater]); | ||
} | ||
}]); | ||
return UIAnalyticsEvent; | ||
}(AnalyticsEvent); | ||
export { UIAnalyticsEvent as default }; |
@@ -5,6 +5,5 @@ import _extends from "@babel/runtime/helpers/extends"; | ||
import _createClass from "@babel/runtime/helpers/createClass"; | ||
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized"; | ||
import _inherits from "@babel/runtime/helpers/inherits"; | ||
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn"; | ||
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf"; | ||
import _inherits from "@babel/runtime/helpers/inherits"; | ||
import _defineProperty from "@babel/runtime/helpers/defineProperty"; | ||
@@ -14,3 +13,3 @@ var _excluded = ["analyticsId", "analyticsData"]; | ||
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; } | ||
function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; } | ||
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); } | ||
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | ||
@@ -37,14 +36,12 @@ import React, { Component } from 'react'; | ||
var withAnalytics = function withAnalytics(WrappedComponent) { | ||
var _class; | ||
var _WithAnalytics; | ||
var map = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; | ||
var defaultProps = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; | ||
var withDelegation = arguments.length > 3 ? arguments[3] : undefined; | ||
return _class = /*#__PURE__*/function (_Component) { | ||
_inherits(WithAnalytics, _Component); | ||
var _super = _createSuper(WithAnalytics); | ||
return _WithAnalytics = /*#__PURE__*/function (_Component) { | ||
function WithAnalytics(props) { | ||
var _this; | ||
_classCallCheck(this, WithAnalytics); | ||
_this = _super.call(this, props); | ||
_defineProperty(_assertThisInitialized(_this), "delegateAnalyticsEvent", function (analyticsId, data, isPrivate) { | ||
_this = _callSuper(this, WithAnalytics, [props]); | ||
_defineProperty(_this, "delegateAnalyticsEvent", function (analyticsId, data, isPrivate) { | ||
var _ref = _this.context, | ||
@@ -57,3 +54,3 @@ onAnalyticsEvent = _ref.onAnalyticsEvent; | ||
}); | ||
_defineProperty(_assertThisInitialized(_this), "fireAnalyticsEvent", function (name, data) { | ||
_defineProperty(_this, "fireAnalyticsEvent", function (name, data) { | ||
var _this$props = _this.props, | ||
@@ -70,3 +67,3 @@ analyticsData = _this$props.analyticsData, | ||
}); | ||
_defineProperty(_assertThisInitialized(_this), "privateAnalyticsEvent", function (name, data) { | ||
_defineProperty(_this, "privateAnalyticsEvent", function (name, data) { | ||
var _ref3 = _this.context, | ||
@@ -79,3 +76,3 @@ onAnalyticsEvent = _ref3.onAnalyticsEvent; | ||
}); | ||
_defineProperty(_assertThisInitialized(_this), "getParentAnalyticsData", function (name) { | ||
_defineProperty(_this, "getParentAnalyticsData", function (name) { | ||
var _ref4 = _this.context, | ||
@@ -95,3 +92,4 @@ getParentAnalyticsData = _ref4.getParentAnalyticsData; | ||
} | ||
_createClass(WithAnalytics, [{ | ||
_inherits(WithAnalytics, _Component); | ||
return _createClass(WithAnalytics, [{ | ||
key: "componentDidMount", | ||
@@ -135,11 +133,10 @@ value: function componentDidMount() { | ||
}]); | ||
return WithAnalytics; | ||
}(Component), _defineProperty(_class, "displayName", "WithAnalytics(".concat(WrappedComponent.displayName || WrappedComponent.name, ")")), _defineProperty(_class, "contextTypes", { | ||
}(Component), _defineProperty(_WithAnalytics, "displayName", "WithAnalytics(".concat(WrappedComponent.displayName || WrappedComponent.name, ")")), _defineProperty(_WithAnalytics, "contextTypes", { | ||
onAnalyticsEvent: PropTypes.func, | ||
getParentAnalyticsData: PropTypes.func | ||
}), _defineProperty(_class, "defaultProps", { | ||
}), _defineProperty(_WithAnalytics, "defaultProps", { | ||
analyticsId: defaultProps.analyticsId, | ||
analyticsData: defaultProps.analyticsData | ||
}), _class; | ||
}), _WithAnalytics; | ||
}; | ||
export default withAnalytics; |
{ | ||
"name": "@atlaskit/analytics-next", | ||
"version": "10.2.0", | ||
"version": "10.2.1", | ||
"description": "React components, HOCs and hooks to assist with tracking user activity with React components", | ||
@@ -60,4 +60,4 @@ "publishConfig": { | ||
"peerDependencies": { | ||
"react": "^16.8.0 || ^17.0.0 || ^18.0.0", | ||
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0" | ||
"react": "^16.8.0 || ^17.0.0 || ^18.2.0", | ||
"react-dom": "^16.8.0 || ^17.0.0 || ^18.2.0" | ||
}, | ||
@@ -71,2 +71,7 @@ "devDependencies": { | ||
}, | ||
"overrides": { | ||
"@atlaskit/analytics-next-stable-react-context": { | ||
"react": "^18.2.0" | ||
} | ||
}, | ||
"techstack": { | ||
@@ -73,0 +78,0 @@ "@atlassian/frontend": { |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
0
300123
4985