@atlaskit/analytics
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -1,6 +0,16 @@ | ||
<a name="1.0.0"></a> | ||
# 1.0.0 (2017-07-18) | ||
<a name="1.0.1"></a> | ||
## 1.0.1 (2017-07-25) | ||
<a name="1.0.1"></a> | ||
## 1.0.1 (2017-07-25) | ||
### Bug Fixes | ||
* **build:** use class transform in loose mode in babel to improve load performance in apps ([fde719a](https://bitbucket.org/atlassian/atlaskit/commits/fde719a)) | ||
<a name="1.0.0"></a> | ||
@@ -7,0 +17,0 @@ # 1.0.0 (2017-07-18) |
@@ -81,3 +81,3 @@ module.exports = /******/ | ||
}), exports.withAnalytics = exports.cleanProps = exports.AnalyticsListener = exports.AnalyticsDecorator = void 0; | ||
var _AnalyticsDecorator2 = __webpack_require__(2), _AnalyticsDecorator3 = _interopRequireDefault(_AnalyticsDecorator2), _AnalyticsListener2 = __webpack_require__(14), _AnalyticsListener3 = _interopRequireDefault(_AnalyticsListener2), _cleanProps2 = __webpack_require__(15), _cleanProps3 = _interopRequireDefault(_cleanProps2), _withAnalytics2 = __webpack_require__(17), _withAnalytics3 = _interopRequireDefault(_withAnalytics2); | ||
var _AnalyticsDecorator2 = __webpack_require__(2), _AnalyticsDecorator3 = _interopRequireDefault(_AnalyticsDecorator2), _AnalyticsListener2 = __webpack_require__(12), _AnalyticsListener3 = _interopRequireDefault(_AnalyticsListener2), _cleanProps2 = __webpack_require__(13), _cleanProps3 = _interopRequireDefault(_cleanProps2), _withAnalytics2 = __webpack_require__(15), _withAnalytics3 = _interopRequireDefault(_withAnalytics2); | ||
exports.AnalyticsDecorator = _AnalyticsDecorator3.default, exports.AnalyticsListener = _AnalyticsListener3.default, | ||
@@ -97,9 +97,8 @@ exports.cleanProps = _cleanProps3.default, exports.withAnalytics = _withAnalytics3.default; | ||
}); | ||
var _assign = __webpack_require__(3), _assign2 = _interopRequireDefault(_assign), _typeof2 = __webpack_require__(4), _typeof3 = _interopRequireDefault(_typeof2), _extends2 = __webpack_require__(5), _extends3 = _interopRequireDefault(_extends2), _getPrototypeOf = __webpack_require__(6), _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf), _classCallCheck2 = __webpack_require__(7), _classCallCheck3 = _interopRequireDefault(_classCallCheck2), _createClass2 = __webpack_require__(8), _createClass3 = _interopRequireDefault(_createClass2), _possibleConstructorReturn2 = __webpack_require__(9), _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2), _inherits2 = __webpack_require__(10), _inherits3 = _interopRequireDefault(_inherits2), _propTypes = __webpack_require__(11), _propTypes2 = _interopRequireDefault(_propTypes), _react = __webpack_require__(12), _react2 = _interopRequireDefault(_react), _matchEvent = __webpack_require__(13), _matchEvent2 = _interopRequireDefault(_matchEvent), AnalyticsDecorator = function(_Component) { | ||
var _assign = __webpack_require__(3), _assign2 = _interopRequireDefault(_assign), _typeof2 = __webpack_require__(4), _typeof3 = _interopRequireDefault(_typeof2), _extends2 = __webpack_require__(5), _extends3 = _interopRequireDefault(_extends2), _classCallCheck2 = __webpack_require__(6), _classCallCheck3 = _interopRequireDefault(_classCallCheck2), _possibleConstructorReturn2 = __webpack_require__(7), _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2), _inherits2 = __webpack_require__(8), _inherits3 = _interopRequireDefault(_inherits2), _propTypes = __webpack_require__(9), _propTypes2 = _interopRequireDefault(_propTypes), _react = __webpack_require__(10), _react2 = _interopRequireDefault(_react), _matchEvent = __webpack_require__(11), _matchEvent2 = _interopRequireDefault(_matchEvent), AnalyticsDecorator = function(_Component) { | ||
function AnalyticsDecorator() { | ||
var _ref, _temp, _this, _ret; | ||
var _temp, _this, _ret; | ||
(0, _classCallCheck3.default)(this, AnalyticsDecorator); | ||
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) args[_key] = arguments[_key]; | ||
return _temp = _this = (0, _possibleConstructorReturn3.default)(this, (_ref = AnalyticsDecorator.__proto__ || (0, | ||
_getPrototypeOf2.default)(AnalyticsDecorator)).call.apply(_ref, [ this ].concat(args))), | ||
return _temp = _this = (0, _possibleConstructorReturn3.default)(this, _Component.call.apply(_Component, [ this ].concat(args))), | ||
_this.onAnalyticsEvent = function(name, srcData, isPrivate) { | ||
@@ -120,18 +119,12 @@ // Check there is a listener to pass the event to, otherwise there's no need | ||
} | ||
return (0, _inherits3.default)(AnalyticsDecorator, _Component), (0, _createClass3.default)(AnalyticsDecorator, [ { | ||
key: "getChildContext", | ||
value: function() { | ||
return { | ||
onAnalyticsEvent: this.onAnalyticsEvent | ||
}; | ||
} | ||
}, { | ||
key: "render", | ||
value: function() { | ||
var children = this.props.children; | ||
// eslint-disable-line react/prop-types | ||
// TODO: Remove wrapping <div> when we upgrade to React@16 | ||
return _react2.default.createElement("div", null, children); | ||
} | ||
} ]), AnalyticsDecorator; | ||
return (0, _inherits3.default)(AnalyticsDecorator, _Component), AnalyticsDecorator.prototype.getChildContext = function() { | ||
return { | ||
onAnalyticsEvent: this.onAnalyticsEvent | ||
}; | ||
}, AnalyticsDecorator.prototype.render = function() { | ||
var children = this.props.children; | ||
// eslint-disable-line react/prop-types | ||
// TODO: Remove wrapping <div> when we upgrade to React@16 | ||
return _react2.default.createElement("div", null, children); | ||
}, AnalyticsDecorator; | ||
}(_react.Component); | ||
@@ -167,30 +160,22 @@ /* eslint-disable react/sort-comp */ | ||
function(module, exports) { | ||
module.exports = require("babel-runtime/core-js/object/get-prototype-of"); | ||
module.exports = require("babel-runtime/helpers/classCallCheck"); | ||
}, /* 7 */ | ||
/***/ | ||
function(module, exports) { | ||
module.exports = require("babel-runtime/helpers/classCallCheck"); | ||
module.exports = require("babel-runtime/helpers/possibleConstructorReturn"); | ||
}, /* 8 */ | ||
/***/ | ||
function(module, exports) { | ||
module.exports = require("babel-runtime/helpers/createClass"); | ||
module.exports = require("babel-runtime/helpers/inherits"); | ||
}, /* 9 */ | ||
/***/ | ||
function(module, exports) { | ||
module.exports = require("babel-runtime/helpers/possibleConstructorReturn"); | ||
module.exports = require("prop-types"); | ||
}, /* 10 */ | ||
/***/ | ||
function(module, exports) { | ||
module.exports = require("babel-runtime/helpers/inherits"); | ||
module.exports = require("react"); | ||
}, /* 11 */ | ||
/***/ | ||
function(module, exports) { | ||
module.exports = require("prop-types"); | ||
}, /* 12 */ | ||
/***/ | ||
function(module, exports) { | ||
module.exports = require("react"); | ||
}, /* 13 */ | ||
/***/ | ||
function(module, exports) { | ||
"use strict"; | ||
@@ -209,3 +194,3 @@ /* | ||
exports.default = matchEvent; | ||
}, /* 14 */ | ||
}, /* 12 */ | ||
/***/ | ||
@@ -222,9 +207,8 @@ function(module, exports, __webpack_require__) { | ||
}); | ||
var _extends2 = __webpack_require__(5), _extends3 = _interopRequireDefault(_extends2), _getPrototypeOf = __webpack_require__(6), _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf), _classCallCheck2 = __webpack_require__(7), _classCallCheck3 = _interopRequireDefault(_classCallCheck2), _createClass2 = __webpack_require__(8), _createClass3 = _interopRequireDefault(_createClass2), _possibleConstructorReturn2 = __webpack_require__(9), _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2), _inherits2 = __webpack_require__(10), _inherits3 = _interopRequireDefault(_inherits2), _propTypes = __webpack_require__(11), _propTypes2 = _interopRequireDefault(_propTypes), _react = __webpack_require__(12), _react2 = _interopRequireDefault(_react), _matchEvent = __webpack_require__(13), _matchEvent2 = _interopRequireDefault(_matchEvent), AnalyticsListener = function(_Component) { | ||
var _extends2 = __webpack_require__(5), _extends3 = _interopRequireDefault(_extends2), _classCallCheck2 = __webpack_require__(6), _classCallCheck3 = _interopRequireDefault(_classCallCheck2), _possibleConstructorReturn2 = __webpack_require__(7), _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2), _inherits2 = __webpack_require__(8), _inherits3 = _interopRequireDefault(_inherits2), _propTypes = __webpack_require__(9), _propTypes2 = _interopRequireDefault(_propTypes), _react = __webpack_require__(10), _react2 = _interopRequireDefault(_react), _matchEvent = __webpack_require__(11), _matchEvent2 = _interopRequireDefault(_matchEvent), AnalyticsListener = function(_Component) { | ||
function AnalyticsListener() { | ||
var _ref, _temp, _this, _ret; | ||
var _temp, _this, _ret; | ||
(0, _classCallCheck3.default)(this, AnalyticsListener); | ||
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) args[_key] = arguments[_key]; | ||
return _temp = _this = (0, _possibleConstructorReturn3.default)(this, (_ref = AnalyticsListener.__proto__ || (0, | ||
_getPrototypeOf2.default)(AnalyticsListener)).call.apply(_ref, [ this ].concat(args))), | ||
return _temp = _this = (0, _possibleConstructorReturn3.default)(this, _Component.call.apply(_Component, [ this ].concat(args))), | ||
_this.onAnalyticsEvent = function(name, data, isPrivate) { | ||
@@ -243,18 +227,12 @@ // Call this component's onEvent method if it's a match | ||
} | ||
return (0, _inherits3.default)(AnalyticsListener, _Component), (0, _createClass3.default)(AnalyticsListener, [ { | ||
key: "getChildContext", | ||
value: function() { | ||
return { | ||
onAnalyticsEvent: this.onAnalyticsEvent | ||
}; | ||
} | ||
}, { | ||
key: "render", | ||
value: function() { | ||
var children = this.props.children; | ||
// eslint-disable-line react/prop-types | ||
// TODO: Remove wrapping <div> when we upgrade to React@16 | ||
return _react2.default.createElement("div", null, children); | ||
} | ||
} ]), AnalyticsListener; | ||
return (0, _inherits3.default)(AnalyticsListener, _Component), AnalyticsListener.prototype.getChildContext = function() { | ||
return { | ||
onAnalyticsEvent: this.onAnalyticsEvent | ||
}; | ||
}, AnalyticsListener.prototype.render = function() { | ||
var children = this.props.children; | ||
// eslint-disable-line react/prop-types | ||
// TODO: Remove wrapping <div> when we upgrade to React@16 | ||
return _react2.default.createElement("div", null, children); | ||
}, AnalyticsListener; | ||
}(_react.Component); | ||
@@ -274,3 +252,3 @@ /* eslint-disable react/sort-comp */ | ||
}, exports.default = AnalyticsListener; | ||
}, /* 15 */ | ||
}, /* 13 */ | ||
/***/ | ||
@@ -297,9 +275,9 @@ function(module, exports, __webpack_require__) { | ||
}); | ||
var _objectWithoutProperties2 = __webpack_require__(16), _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); | ||
var _objectWithoutProperties2 = __webpack_require__(14), _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); | ||
exports.default = cleanProps; | ||
}, /* 16 */ | ||
}, /* 14 */ | ||
/***/ | ||
function(module, exports) { | ||
module.exports = require("babel-runtime/helpers/objectWithoutProperties"); | ||
}, /* 17 */ | ||
}, /* 15 */ | ||
/***/ | ||
@@ -316,11 +294,10 @@ function(module, exports, __webpack_require__) { | ||
}); | ||
var _keys = __webpack_require__(18), _keys2 = _interopRequireDefault(_keys), _objectWithoutProperties2 = __webpack_require__(16), _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2), _extends2 = __webpack_require__(5), _extends3 = _interopRequireDefault(_extends2), _getPrototypeOf = __webpack_require__(6), _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf), _classCallCheck2 = __webpack_require__(7), _classCallCheck3 = _interopRequireDefault(_classCallCheck2), _createClass2 = __webpack_require__(8), _createClass3 = _interopRequireDefault(_createClass2), _possibleConstructorReturn2 = __webpack_require__(9), _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2), _inherits2 = __webpack_require__(10), _inherits3 = _interopRequireDefault(_inherits2), _react = __webpack_require__(12), _react2 = _interopRequireDefault(_react), _propTypes = __webpack_require__(11), _propTypes2 = _interopRequireDefault(_propTypes), withAnalytics = function(WrappedComponent) { | ||
var _keys = __webpack_require__(16), _keys2 = _interopRequireDefault(_keys), _objectWithoutProperties2 = __webpack_require__(14), _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2), _extends2 = __webpack_require__(5), _extends3 = _interopRequireDefault(_extends2), _classCallCheck2 = __webpack_require__(6), _classCallCheck3 = _interopRequireDefault(_classCallCheck2), _possibleConstructorReturn2 = __webpack_require__(7), _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2), _inherits2 = __webpack_require__(8), _inherits3 = _interopRequireDefault(_inherits2), _react = __webpack_require__(10), _react2 = _interopRequireDefault(_react), _propTypes = __webpack_require__(9), _propTypes2 = _interopRequireDefault(_propTypes), withAnalytics = function(WrappedComponent) { | ||
var _class, _temp2, map = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}; | ||
return _temp2 = _class = function(_Component) { | ||
function WithAnalytics() { | ||
var _ref, _temp, _this, _ret; | ||
var _temp, _this, _ret; | ||
(0, _classCallCheck3.default)(this, WithAnalytics); | ||
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) args[_key] = arguments[_key]; | ||
return _temp = _this = (0, _possibleConstructorReturn3.default)(this, (_ref = WithAnalytics.__proto__ || (0, | ||
_getPrototypeOf2.default)(WithAnalytics)).call.apply(_ref, [ this ].concat(args))), | ||
return _temp = _this = (0, _possibleConstructorReturn3.default)(this, _Component.call.apply(_Component, [ this ].concat(args))), | ||
_this.fireAnalyticsEvent = function(name, data) { | ||
@@ -337,25 +314,19 @@ var _this$props = _this.props, analyticsData = _this$props.analyticsData, analyticsId = _this$props.analyticsId, onAnalyticsEvent = _this.context.onAnalyticsEvent; | ||
} | ||
return (0, _inherits3.default)(WithAnalytics, _Component), (0, _createClass3.default)(WithAnalytics, [ { | ||
key: "componentWillMount", | ||
value: function() { | ||
this.evaluatedMap = "function" == typeof map ? map(this.fireAnalyticsEvent) : map; | ||
} | ||
}, { | ||
key: "render", | ||
value: function() { | ||
var _this2 = this, _props = this.props, componentProps = (_props.analyticsId, _props.analyticsData, | ||
(0, _objectWithoutProperties3.default)(_props, [ "analyticsId", "analyticsData" ])); | ||
/* eslint-enable no-unused-vars */ | ||
return (0, _keys2.default)(this.evaluatedMap).forEach(function(prop) { | ||
var handler = _this2.evaluatedMap[prop], originalProp = componentProps[prop]; | ||
componentProps[prop] = function() { | ||
"function" == typeof handler ? handler.apply(void 0, arguments) : _this2.fireAnalyticsEvent(handler), | ||
"function" == typeof originalProp && originalProp.apply(void 0, arguments); | ||
}; | ||
}), _react2.default.createElement(WrappedComponent, (0, _extends3.default)({ | ||
fireAnalyticsEvent: this.fireAnalyticsEvent, | ||
firePrivateAnalyticsEvent: this.privateAnalyticsEvent | ||
}, componentProps)); | ||
} | ||
} ]), WithAnalytics; | ||
return (0, _inherits3.default)(WithAnalytics, _Component), WithAnalytics.prototype.componentWillMount = function() { | ||
this.evaluatedMap = "function" == typeof map ? map(this.fireAnalyticsEvent) : map; | ||
}, WithAnalytics.prototype.render = function() { | ||
var _this2 = this, _props = this.props, componentProps = (_props.analyticsId, _props.analyticsData, | ||
(0, _objectWithoutProperties3.default)(_props, [ "analyticsId", "analyticsData" ])); | ||
/* eslint-enable no-unused-vars */ | ||
return (0, _keys2.default)(this.evaluatedMap).forEach(function(prop) { | ||
var handler = _this2.evaluatedMap[prop], originalProp = componentProps[prop]; | ||
componentProps[prop] = function() { | ||
"function" == typeof handler ? handler.apply(void 0, arguments) : _this2.fireAnalyticsEvent(handler), | ||
"function" == typeof originalProp && originalProp.apply(void 0, arguments); | ||
}; | ||
}), _react2.default.createElement(WrappedComponent, (0, _extends3.default)({ | ||
fireAnalyticsEvent: this.fireAnalyticsEvent, | ||
firePrivateAnalyticsEvent: this.privateAnalyticsEvent | ||
}, componentProps)); | ||
}, WithAnalytics; | ||
}(_react.Component), _class.displayName = "WithAnalytics(" + (WrappedComponent.displayName || WrappedComponent.name) + ")", | ||
@@ -367,3 +338,3 @@ _class.contextTypes = { | ||
exports.default = withAnalytics; | ||
}, /* 18 */ | ||
}, /* 16 */ | ||
/***/ | ||
@@ -370,0 +341,0 @@ function(module, exports) { |
@@ -1,1 +0,1 @@ | ||
module.exports=function(t){function e(a){if(n[a])return n[a].exports;var r=n[a]={exports:{},id:a,loaded:!1};return t[a].call(r.exports,r,r.exports,e),r.loaded=!0,r.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){t.exports=n(1)},function(t,e,n){"use strict";function a(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.withAnalytics=e.cleanProps=e.AnalyticsListener=e.AnalyticsDecorator=void 0;var r=n(2),u=a(r),i=n(14),o=a(i),l=n(15),c=a(l),f=n(17),s=a(f);e.AnalyticsDecorator=u.default,e.AnalyticsListener=o.default,e.cleanProps=c.default,e.withAnalytics=s.default},function(t,e,n){"use strict";function a(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=n(3),u=a(r),i=n(4),o=a(i),l=n(5),c=a(l),f=n(6),s=a(f),d=n(7),p=a(d),v=n(8),y=a(v),h=n(9),A=a(h),b=n(10),m=a(b),E=n(11),_=a(E),x=n(12),P=a(x),g=n(13),j=a(g),M=function(t){function e(){var t,n,a,r;(0,p.default)(this,e);for(var i=arguments.length,l=Array(i),f=0;f<i;f++)l[f]=arguments[f];return n=a=(0,A.default)(this,(t=e.__proto__||(0,s.default)(e)).call.apply(t,[this].concat(l))),a.onAnalyticsEvent=function(t,e,n){var r=a.context.onAnalyticsEvent;if("function"==typeof r){var i=a.props,l=i.data,f=i.getData,s=i.match,d=i.matchPrivate,p=(0,c.default)({},e);d===n&&(0,j.default)(s,t)&&("object"===("undefined"==typeof l?"undefined":(0,o.default)(l))&&(0,u.default)(p,l),"function"==typeof f&&(0,u.default)(p,f(t,p))),r(t,p,n)}},r=n,(0,A.default)(a,r)}return(0,m.default)(e,t),(0,y.default)(e,[{key:"getChildContext",value:function(){return{onAnalyticsEvent:this.onAnalyticsEvent}}},{key:"render",value:function(){var t=this.props.children;return P.default.createElement("div",null,t)}}]),e}(x.Component);M.propTypes={data:_.default.object,getData:_.default.func,match:_.default.oneOfType([_.default.string,_.default.func]),matchPrivate:_.default.bool},M.defaultProps={match:"*",matchPrivate:!1},M.contextTypes={onAnalyticsEvent:_.default.func},M.childContextTypes={onAnalyticsEvent:_.default.func},e.default=M},function(t,e){t.exports=require("babel-runtime/core-js/object/assign")},function(t,e){t.exports=require("babel-runtime/helpers/typeof")},function(t,e){t.exports=require("babel-runtime/helpers/extends")},function(t,e){t.exports=require("babel-runtime/core-js/object/get-prototype-of")},function(t,e){t.exports=require("babel-runtime/helpers/classCallCheck")},function(t,e){t.exports=require("babel-runtime/helpers/createClass")},function(t,e){t.exports=require("babel-runtime/helpers/possibleConstructorReturn")},function(t,e){t.exports=require("babel-runtime/helpers/inherits")},function(t,e){t.exports=require("prop-types")},function(t,e){t.exports=require("react")},function(t,e){"use strict";function n(t,e){return"*"===t||void 0===e||("string"==typeof t?a.test(e)?e.substr(0,t.length)===t:e===t:"function"==typeof t?t(e):t instanceof RegExp&&t.test(e))}Object.defineProperty(e,"__esModule",{value:!0});var a=/\.$/;e.default=n},function(t,e,n){"use strict";function a(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=n(5),u=a(r),i=n(6),o=a(i),l=n(7),c=a(l),f=n(8),s=a(f),d=n(9),p=a(d),v=n(10),y=a(v),h=n(11),A=a(h),b=n(12),m=a(b),E=n(13),_=a(E),x=function(t){function e(){var t,n,a,r;(0,c.default)(this,e);for(var i=arguments.length,l=Array(i),f=0;f<i;f++)l[f]=arguments[f];return n=a=(0,p.default)(this,(t=e.__proto__||(0,o.default)(e)).call.apply(t,[this].concat(l))),a.onAnalyticsEvent=function(t,e,n){var r=a.props,i=r.onEvent,o=r.match,l=r.matchPrivate;if(l===n&&(0,_.default)(o,t)&&"function"==typeof i){var c=(0,u.default)({},e);i(t,c)}var f=a.context.onAnalyticsEvent;"function"==typeof f&&f(t,e,n)},r=n,(0,p.default)(a,r)}return(0,y.default)(e,t),(0,s.default)(e,[{key:"getChildContext",value:function(){return{onAnalyticsEvent:this.onAnalyticsEvent}}},{key:"render",value:function(){var t=this.props.children;return m.default.createElement("div",null,t)}}]),e}(b.Component);x.propTypes={onEvent:A.default.func.isRequired,match:A.default.oneOfType([A.default.string,A.default.func]),matchPrivate:A.default.bool},x.defaultProps={match:"*",matchPrivate:!1},x.contextTypes={onAnalyticsEvent:A.default.func},x.childContextTypes={onAnalyticsEvent:A.default.func},e.default=x},function(t,e,n){"use strict";function a(t){return t&&t.__esModule?t:{default:t}}function r(t){var e=(t.analyticsId,t.analyticsData,t.fireAnalyticsEvent,t.firePrivateAnalyticsEvent,(0,i.default)(t,["analyticsId","analyticsData","fireAnalyticsEvent","firePrivateAnalyticsEvent"]));return e}Object.defineProperty(e,"__esModule",{value:!0});var u=n(16),i=a(u);e.default=r},function(t,e){t.exports=require("babel-runtime/helpers/objectWithoutProperties")},function(t,e,n){"use strict";function a(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=n(18),u=a(r),i=n(16),o=a(i),l=n(5),c=a(l),f=n(6),s=a(f),d=n(7),p=a(d),v=n(8),y=a(v),h=n(9),A=a(h),b=n(10),m=a(b),E=n(12),_=a(E),x=n(11),P=a(x),g=function(t){var e,n,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n=e=function(e){function n(){var t,e,a,r;(0,p.default)(this,n);for(var u=arguments.length,i=Array(u),o=0;o<u;o++)i[o]=arguments[o];return e=a=(0,A.default)(this,(t=n.__proto__||(0,s.default)(n)).call.apply(t,[this].concat(i))),a.fireAnalyticsEvent=function(t,e){var n=a.props,r=n.analyticsData,u=n.analyticsId,i=a.context.onAnalyticsEvent;if(u&&i){var o=(0,c.default)({},r,e);i(u+"."+t,o,!1)}},a.privateAnalyticsEvent=function(t,e){var n=a.context.onAnalyticsEvent;n&&n(""+t,e,!0)},r=e,(0,A.default)(a,r)}return(0,m.default)(n,e),(0,y.default)(n,[{key:"componentWillMount",value:function(){this.evaluatedMap="function"==typeof a?a(this.fireAnalyticsEvent):a}},{key:"render",value:function(){var e=this,n=this.props,a=(n.analyticsId,n.analyticsData,(0,o.default)(n,["analyticsId","analyticsData"]));return(0,u.default)(this.evaluatedMap).forEach(function(t){var n=e.evaluatedMap[t],r=a[t];a[t]=function(){"function"==typeof n?n.apply(void 0,arguments):e.fireAnalyticsEvent(n),"function"==typeof r&&r.apply(void 0,arguments)}}),_.default.createElement(t,(0,c.default)({fireAnalyticsEvent:this.fireAnalyticsEvent,firePrivateAnalyticsEvent:this.privateAnalyticsEvent},a))}}]),n}(E.Component),e.displayName="WithAnalytics("+(t.displayName||t.name)+")",e.contextTypes={onAnalyticsEvent:P.default.func},n};e.default=g},function(t,e){t.exports=require("babel-runtime/core-js/object/keys")}]); | ||
module.exports=function(t){function e(a){if(n[a])return n[a].exports;var r=n[a]={exports:{},id:a,loaded:!1};return t[a].call(r.exports,r,r.exports,e),r.loaded=!0,r.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){t.exports=n(1)},function(t,e,n){"use strict";function a(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.withAnalytics=e.cleanProps=e.AnalyticsListener=e.AnalyticsDecorator=void 0;var r=n(2),i=a(r),o=n(12),u=a(o),l=n(13),c=a(l),f=n(15),s=a(f);e.AnalyticsDecorator=i.default,e.AnalyticsListener=u.default,e.cleanProps=c.default,e.withAnalytics=s.default},function(t,e,n){"use strict";function a(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=n(3),i=a(r),o=n(4),u=a(o),l=n(5),c=a(l),f=n(6),s=a(f),d=n(7),p=a(d),y=n(8),v=a(y),h=n(9),A=a(h),E=n(10),m=a(E),b=n(11),x=a(b),_=function(t){function e(){var n,a,r;(0,s.default)(this,e);for(var o=arguments.length,l=Array(o),f=0;f<o;f++)l[f]=arguments[f];return n=a=(0,p.default)(this,t.call.apply(t,[this].concat(l))),a.onAnalyticsEvent=function(t,e,n){var r=a.context.onAnalyticsEvent;if("function"==typeof r){var o=a.props,l=o.data,f=o.getData,s=o.match,d=o.matchPrivate,p=(0,c.default)({},e);d===n&&(0,x.default)(s,t)&&("object"===("undefined"==typeof l?"undefined":(0,u.default)(l))&&(0,i.default)(p,l),"function"==typeof f&&(0,i.default)(p,f(t,p))),r(t,p,n)}},r=n,(0,p.default)(a,r)}return(0,v.default)(e,t),e.prototype.getChildContext=function(){return{onAnalyticsEvent:this.onAnalyticsEvent}},e.prototype.render=function(){var t=this.props.children;return m.default.createElement("div",null,t)},e}(E.Component);_.propTypes={data:A.default.object,getData:A.default.func,match:A.default.oneOfType([A.default.string,A.default.func]),matchPrivate:A.default.bool},_.defaultProps={match:"*",matchPrivate:!1},_.contextTypes={onAnalyticsEvent:A.default.func},_.childContextTypes={onAnalyticsEvent:A.default.func},e.default=_},function(t,e){t.exports=require("babel-runtime/core-js/object/assign")},function(t,e){t.exports=require("babel-runtime/helpers/typeof")},function(t,e){t.exports=require("babel-runtime/helpers/extends")},function(t,e){t.exports=require("babel-runtime/helpers/classCallCheck")},function(t,e){t.exports=require("babel-runtime/helpers/possibleConstructorReturn")},function(t,e){t.exports=require("babel-runtime/helpers/inherits")},function(t,e){t.exports=require("prop-types")},function(t,e){t.exports=require("react")},function(t,e){"use strict";function n(t,e){return"*"===t||void 0===e||("string"==typeof t?a.test(e)?e.substr(0,t.length)===t:e===t:"function"==typeof t?t(e):t instanceof RegExp&&t.test(e))}Object.defineProperty(e,"__esModule",{value:!0});var a=/\.$/;e.default=n},function(t,e,n){"use strict";function a(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=n(5),i=a(r),o=n(6),u=a(o),l=n(7),c=a(l),f=n(8),s=a(f),d=n(9),p=a(d),y=n(10),v=a(y),h=n(11),A=a(h),E=function(t){function e(){var n,a,r;(0,u.default)(this,e);for(var o=arguments.length,l=Array(o),f=0;f<o;f++)l[f]=arguments[f];return n=a=(0,c.default)(this,t.call.apply(t,[this].concat(l))),a.onAnalyticsEvent=function(t,e,n){var r=a.props,o=r.onEvent,u=r.match,l=r.matchPrivate;if(l===n&&(0,A.default)(u,t)&&"function"==typeof o){var c=(0,i.default)({},e);o(t,c)}var f=a.context.onAnalyticsEvent;"function"==typeof f&&f(t,e,n)},r=n,(0,c.default)(a,r)}return(0,s.default)(e,t),e.prototype.getChildContext=function(){return{onAnalyticsEvent:this.onAnalyticsEvent}},e.prototype.render=function(){var t=this.props.children;return v.default.createElement("div",null,t)},e}(y.Component);E.propTypes={onEvent:p.default.func.isRequired,match:p.default.oneOfType([p.default.string,p.default.func]),matchPrivate:p.default.bool},E.defaultProps={match:"*",matchPrivate:!1},E.contextTypes={onAnalyticsEvent:p.default.func},E.childContextTypes={onAnalyticsEvent:p.default.func},e.default=E},function(t,e,n){"use strict";function a(t){return t&&t.__esModule?t:{default:t}}function r(t){var e=(t.analyticsId,t.analyticsData,t.fireAnalyticsEvent,t.firePrivateAnalyticsEvent,(0,o.default)(t,["analyticsId","analyticsData","fireAnalyticsEvent","firePrivateAnalyticsEvent"]));return e}Object.defineProperty(e,"__esModule",{value:!0});var i=n(14),o=a(i);e.default=r},function(t,e){t.exports=require("babel-runtime/helpers/objectWithoutProperties")},function(t,e,n){"use strict";function a(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=n(16),i=a(r),o=n(14),u=a(o),l=n(5),c=a(l),f=n(6),s=a(f),d=n(7),p=a(d),y=n(8),v=a(y),h=n(10),A=a(h),E=n(9),m=a(E),b=function(t){var e,n,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n=e=function(e){function n(){var t,a,r;(0,s.default)(this,n);for(var i=arguments.length,o=Array(i),u=0;u<i;u++)o[u]=arguments[u];return t=a=(0,p.default)(this,e.call.apply(e,[this].concat(o))),a.fireAnalyticsEvent=function(t,e){var n=a.props,r=n.analyticsData,i=n.analyticsId,o=a.context.onAnalyticsEvent;if(i&&o){var u=(0,c.default)({},r,e);o(i+"."+t,u,!1)}},a.privateAnalyticsEvent=function(t,e){var n=a.context.onAnalyticsEvent;n&&n(""+t,e,!0)},r=t,(0,p.default)(a,r)}return(0,v.default)(n,e),n.prototype.componentWillMount=function(){this.evaluatedMap="function"==typeof a?a(this.fireAnalyticsEvent):a},n.prototype.render=function(){var e=this,n=this.props,a=(n.analyticsId,n.analyticsData,(0,u.default)(n,["analyticsId","analyticsData"]));return(0,i.default)(this.evaluatedMap).forEach(function(t){var n=e.evaluatedMap[t],r=a[t];a[t]=function(){"function"==typeof n?n.apply(void 0,arguments):e.fireAnalyticsEvent(n),"function"==typeof r&&r.apply(void 0,arguments)}}),A.default.createElement(t,(0,c.default)({fireAnalyticsEvent:this.fireAnalyticsEvent,firePrivateAnalyticsEvent:this.privateAnalyticsEvent},a))},n}(h.Component),e.displayName="WithAnalytics("+(t.displayName||t.name)+")",e.contextTypes={onAnalyticsEvent:m.default.func},n};e.default=b},function(t,e){t.exports=require("babel-runtime/core-js/object/keys")}]); |
!function(root, factory) { | ||
"object" == typeof exports && "object" == typeof module ? module.exports = factory(require("babel-runtime/core-js/object/assign"), require("babel-runtime/helpers/typeof"), require("babel-runtime/helpers/extends"), require("babel-runtime/core-js/object/get-prototype-of"), require("babel-runtime/helpers/classCallCheck"), require("babel-runtime/helpers/createClass"), require("babel-runtime/helpers/possibleConstructorReturn"), require("babel-runtime/helpers/inherits"), require("prop-types"), require("react"), require("babel-runtime/helpers/objectWithoutProperties"), require("babel-runtime/core-js/object/keys")) : "function" == typeof define && define.amd ? define([ "babel-runtime/core-js/object/assign", "babel-runtime/helpers/typeof", "babel-runtime/helpers/extends", "babel-runtime/core-js/object/get-prototype-of", "babel-runtime/helpers/classCallCheck", "babel-runtime/helpers/createClass", "babel-runtime/helpers/possibleConstructorReturn", "babel-runtime/helpers/inherits", "prop-types", "react", "babel-runtime/helpers/objectWithoutProperties", "babel-runtime/core-js/object/keys" ], factory) : "object" == typeof exports ? exports["@atlaskit/analytics"] = factory(require("babel-runtime/core-js/object/assign"), require("babel-runtime/helpers/typeof"), require("babel-runtime/helpers/extends"), require("babel-runtime/core-js/object/get-prototype-of"), require("babel-runtime/helpers/classCallCheck"), require("babel-runtime/helpers/createClass"), require("babel-runtime/helpers/possibleConstructorReturn"), require("babel-runtime/helpers/inherits"), require("prop-types"), require("react"), require("babel-runtime/helpers/objectWithoutProperties"), require("babel-runtime/core-js/object/keys")) : root["@atlaskit/analytics"] = factory(root["babel-runtime/core-js/object/assign"], root["babel-runtime/helpers/typeof"], root["babel-runtime/helpers/extends"], root["babel-runtime/core-js/object/get-prototype-of"], root["babel-runtime/helpers/classCallCheck"], root["babel-runtime/helpers/createClass"], root["babel-runtime/helpers/possibleConstructorReturn"], root["babel-runtime/helpers/inherits"], root["prop-types"], root.react, root["babel-runtime/helpers/objectWithoutProperties"], root["babel-runtime/core-js/object/keys"]); | ||
}(this, function(__WEBPACK_EXTERNAL_MODULE_3__, __WEBPACK_EXTERNAL_MODULE_4__, __WEBPACK_EXTERNAL_MODULE_5__, __WEBPACK_EXTERNAL_MODULE_6__, __WEBPACK_EXTERNAL_MODULE_7__, __WEBPACK_EXTERNAL_MODULE_8__, __WEBPACK_EXTERNAL_MODULE_9__, __WEBPACK_EXTERNAL_MODULE_10__, __WEBPACK_EXTERNAL_MODULE_11__, __WEBPACK_EXTERNAL_MODULE_12__, __WEBPACK_EXTERNAL_MODULE_16__, __WEBPACK_EXTERNAL_MODULE_18__) { | ||
"object" == typeof exports && "object" == typeof module ? module.exports = factory(require("babel-runtime/core-js/object/assign"), require("babel-runtime/helpers/typeof"), require("babel-runtime/helpers/extends"), require("babel-runtime/helpers/classCallCheck"), require("babel-runtime/helpers/possibleConstructorReturn"), require("babel-runtime/helpers/inherits"), require("prop-types"), require("react"), require("babel-runtime/helpers/objectWithoutProperties"), require("babel-runtime/core-js/object/keys")) : "function" == typeof define && define.amd ? define([ "babel-runtime/core-js/object/assign", "babel-runtime/helpers/typeof", "babel-runtime/helpers/extends", "babel-runtime/helpers/classCallCheck", "babel-runtime/helpers/possibleConstructorReturn", "babel-runtime/helpers/inherits", "prop-types", "react", "babel-runtime/helpers/objectWithoutProperties", "babel-runtime/core-js/object/keys" ], factory) : "object" == typeof exports ? exports["@atlaskit/analytics"] = factory(require("babel-runtime/core-js/object/assign"), require("babel-runtime/helpers/typeof"), require("babel-runtime/helpers/extends"), require("babel-runtime/helpers/classCallCheck"), require("babel-runtime/helpers/possibleConstructorReturn"), require("babel-runtime/helpers/inherits"), require("prop-types"), require("react"), require("babel-runtime/helpers/objectWithoutProperties"), require("babel-runtime/core-js/object/keys")) : root["@atlaskit/analytics"] = factory(root["babel-runtime/core-js/object/assign"], root["babel-runtime/helpers/typeof"], root["babel-runtime/helpers/extends"], root["babel-runtime/helpers/classCallCheck"], root["babel-runtime/helpers/possibleConstructorReturn"], root["babel-runtime/helpers/inherits"], root["prop-types"], root.react, root["babel-runtime/helpers/objectWithoutProperties"], root["babel-runtime/core-js/object/keys"]); | ||
}(this, function(__WEBPACK_EXTERNAL_MODULE_3__, __WEBPACK_EXTERNAL_MODULE_4__, __WEBPACK_EXTERNAL_MODULE_5__, __WEBPACK_EXTERNAL_MODULE_6__, __WEBPACK_EXTERNAL_MODULE_7__, __WEBPACK_EXTERNAL_MODULE_8__, __WEBPACK_EXTERNAL_MODULE_9__, __WEBPACK_EXTERNAL_MODULE_10__, __WEBPACK_EXTERNAL_MODULE_14__, __WEBPACK_EXTERNAL_MODULE_16__) { | ||
/******/ | ||
@@ -84,3 +84,3 @@ return function(modules) { | ||
}), exports.withAnalytics = exports.cleanProps = exports.AnalyticsListener = exports.AnalyticsDecorator = void 0; | ||
var _AnalyticsDecorator2 = __webpack_require__(2), _AnalyticsDecorator3 = _interopRequireDefault(_AnalyticsDecorator2), _AnalyticsListener2 = __webpack_require__(14), _AnalyticsListener3 = _interopRequireDefault(_AnalyticsListener2), _cleanProps2 = __webpack_require__(15), _cleanProps3 = _interopRequireDefault(_cleanProps2), _withAnalytics2 = __webpack_require__(17), _withAnalytics3 = _interopRequireDefault(_withAnalytics2); | ||
var _AnalyticsDecorator2 = __webpack_require__(2), _AnalyticsDecorator3 = _interopRequireDefault(_AnalyticsDecorator2), _AnalyticsListener2 = __webpack_require__(12), _AnalyticsListener3 = _interopRequireDefault(_AnalyticsListener2), _cleanProps2 = __webpack_require__(13), _cleanProps3 = _interopRequireDefault(_cleanProps2), _withAnalytics2 = __webpack_require__(15), _withAnalytics3 = _interopRequireDefault(_withAnalytics2); | ||
exports.AnalyticsDecorator = _AnalyticsDecorator3.default, exports.AnalyticsListener = _AnalyticsListener3.default, | ||
@@ -100,9 +100,8 @@ exports.cleanProps = _cleanProps3.default, exports.withAnalytics = _withAnalytics3.default; | ||
}); | ||
var _assign = __webpack_require__(3), _assign2 = _interopRequireDefault(_assign), _typeof2 = __webpack_require__(4), _typeof3 = _interopRequireDefault(_typeof2), _extends2 = __webpack_require__(5), _extends3 = _interopRequireDefault(_extends2), _getPrototypeOf = __webpack_require__(6), _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf), _classCallCheck2 = __webpack_require__(7), _classCallCheck3 = _interopRequireDefault(_classCallCheck2), _createClass2 = __webpack_require__(8), _createClass3 = _interopRequireDefault(_createClass2), _possibleConstructorReturn2 = __webpack_require__(9), _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2), _inherits2 = __webpack_require__(10), _inherits3 = _interopRequireDefault(_inherits2), _propTypes = __webpack_require__(11), _propTypes2 = _interopRequireDefault(_propTypes), _react = __webpack_require__(12), _react2 = _interopRequireDefault(_react), _matchEvent = __webpack_require__(13), _matchEvent2 = _interopRequireDefault(_matchEvent), AnalyticsDecorator = function(_Component) { | ||
var _assign = __webpack_require__(3), _assign2 = _interopRequireDefault(_assign), _typeof2 = __webpack_require__(4), _typeof3 = _interopRequireDefault(_typeof2), _extends2 = __webpack_require__(5), _extends3 = _interopRequireDefault(_extends2), _classCallCheck2 = __webpack_require__(6), _classCallCheck3 = _interopRequireDefault(_classCallCheck2), _possibleConstructorReturn2 = __webpack_require__(7), _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2), _inherits2 = __webpack_require__(8), _inherits3 = _interopRequireDefault(_inherits2), _propTypes = __webpack_require__(9), _propTypes2 = _interopRequireDefault(_propTypes), _react = __webpack_require__(10), _react2 = _interopRequireDefault(_react), _matchEvent = __webpack_require__(11), _matchEvent2 = _interopRequireDefault(_matchEvent), AnalyticsDecorator = function(_Component) { | ||
function AnalyticsDecorator() { | ||
var _ref, _temp, _this, _ret; | ||
var _temp, _this, _ret; | ||
(0, _classCallCheck3.default)(this, AnalyticsDecorator); | ||
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) args[_key] = arguments[_key]; | ||
return _temp = _this = (0, _possibleConstructorReturn3.default)(this, (_ref = AnalyticsDecorator.__proto__ || (0, | ||
_getPrototypeOf2.default)(AnalyticsDecorator)).call.apply(_ref, [ this ].concat(args))), | ||
return _temp = _this = (0, _possibleConstructorReturn3.default)(this, _Component.call.apply(_Component, [ this ].concat(args))), | ||
_this.onAnalyticsEvent = function(name, srcData, isPrivate) { | ||
@@ -123,18 +122,12 @@ // Check there is a listener to pass the event to, otherwise there's no need | ||
} | ||
return (0, _inherits3.default)(AnalyticsDecorator, _Component), (0, _createClass3.default)(AnalyticsDecorator, [ { | ||
key: "getChildContext", | ||
value: function() { | ||
return { | ||
onAnalyticsEvent: this.onAnalyticsEvent | ||
}; | ||
} | ||
}, { | ||
key: "render", | ||
value: function() { | ||
var children = this.props.children; | ||
// eslint-disable-line react/prop-types | ||
// TODO: Remove wrapping <div> when we upgrade to React@16 | ||
return _react2.default.createElement("div", null, children); | ||
} | ||
} ]), AnalyticsDecorator; | ||
return (0, _inherits3.default)(AnalyticsDecorator, _Component), AnalyticsDecorator.prototype.getChildContext = function() { | ||
return { | ||
onAnalyticsEvent: this.onAnalyticsEvent | ||
}; | ||
}, AnalyticsDecorator.prototype.render = function() { | ||
var children = this.props.children; | ||
// eslint-disable-line react/prop-types | ||
// TODO: Remove wrapping <div> when we upgrade to React@16 | ||
return _react2.default.createElement("div", null, children); | ||
}, AnalyticsDecorator; | ||
}(_react.Component); | ||
@@ -190,10 +183,2 @@ /* eslint-disable react/sort-comp */ | ||
function(module, exports) { | ||
module.exports = __WEBPACK_EXTERNAL_MODULE_11__; | ||
}, /* 12 */ | ||
/***/ | ||
function(module, exports) { | ||
module.exports = __WEBPACK_EXTERNAL_MODULE_12__; | ||
}, /* 13 */ | ||
/***/ | ||
function(module, exports) { | ||
"use strict"; | ||
@@ -212,3 +197,3 @@ /* | ||
exports.default = matchEvent; | ||
}, /* 14 */ | ||
}, /* 12 */ | ||
/***/ | ||
@@ -225,9 +210,8 @@ function(module, exports, __webpack_require__) { | ||
}); | ||
var _extends2 = __webpack_require__(5), _extends3 = _interopRequireDefault(_extends2), _getPrototypeOf = __webpack_require__(6), _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf), _classCallCheck2 = __webpack_require__(7), _classCallCheck3 = _interopRequireDefault(_classCallCheck2), _createClass2 = __webpack_require__(8), _createClass3 = _interopRequireDefault(_createClass2), _possibleConstructorReturn2 = __webpack_require__(9), _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2), _inherits2 = __webpack_require__(10), _inherits3 = _interopRequireDefault(_inherits2), _propTypes = __webpack_require__(11), _propTypes2 = _interopRequireDefault(_propTypes), _react = __webpack_require__(12), _react2 = _interopRequireDefault(_react), _matchEvent = __webpack_require__(13), _matchEvent2 = _interopRequireDefault(_matchEvent), AnalyticsListener = function(_Component) { | ||
var _extends2 = __webpack_require__(5), _extends3 = _interopRequireDefault(_extends2), _classCallCheck2 = __webpack_require__(6), _classCallCheck3 = _interopRequireDefault(_classCallCheck2), _possibleConstructorReturn2 = __webpack_require__(7), _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2), _inherits2 = __webpack_require__(8), _inherits3 = _interopRequireDefault(_inherits2), _propTypes = __webpack_require__(9), _propTypes2 = _interopRequireDefault(_propTypes), _react = __webpack_require__(10), _react2 = _interopRequireDefault(_react), _matchEvent = __webpack_require__(11), _matchEvent2 = _interopRequireDefault(_matchEvent), AnalyticsListener = function(_Component) { | ||
function AnalyticsListener() { | ||
var _ref, _temp, _this, _ret; | ||
var _temp, _this, _ret; | ||
(0, _classCallCheck3.default)(this, AnalyticsListener); | ||
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) args[_key] = arguments[_key]; | ||
return _temp = _this = (0, _possibleConstructorReturn3.default)(this, (_ref = AnalyticsListener.__proto__ || (0, | ||
_getPrototypeOf2.default)(AnalyticsListener)).call.apply(_ref, [ this ].concat(args))), | ||
return _temp = _this = (0, _possibleConstructorReturn3.default)(this, _Component.call.apply(_Component, [ this ].concat(args))), | ||
_this.onAnalyticsEvent = function(name, data, isPrivate) { | ||
@@ -246,18 +230,12 @@ // Call this component's onEvent method if it's a match | ||
} | ||
return (0, _inherits3.default)(AnalyticsListener, _Component), (0, _createClass3.default)(AnalyticsListener, [ { | ||
key: "getChildContext", | ||
value: function() { | ||
return { | ||
onAnalyticsEvent: this.onAnalyticsEvent | ||
}; | ||
} | ||
}, { | ||
key: "render", | ||
value: function() { | ||
var children = this.props.children; | ||
// eslint-disable-line react/prop-types | ||
// TODO: Remove wrapping <div> when we upgrade to React@16 | ||
return _react2.default.createElement("div", null, children); | ||
} | ||
} ]), AnalyticsListener; | ||
return (0, _inherits3.default)(AnalyticsListener, _Component), AnalyticsListener.prototype.getChildContext = function() { | ||
return { | ||
onAnalyticsEvent: this.onAnalyticsEvent | ||
}; | ||
}, AnalyticsListener.prototype.render = function() { | ||
var children = this.props.children; | ||
// eslint-disable-line react/prop-types | ||
// TODO: Remove wrapping <div> when we upgrade to React@16 | ||
return _react2.default.createElement("div", null, children); | ||
}, AnalyticsListener; | ||
}(_react.Component); | ||
@@ -277,3 +255,3 @@ /* eslint-disable react/sort-comp */ | ||
}, exports.default = AnalyticsListener; | ||
}, /* 15 */ | ||
}, /* 13 */ | ||
/***/ | ||
@@ -300,9 +278,9 @@ function(module, exports, __webpack_require__) { | ||
}); | ||
var _objectWithoutProperties2 = __webpack_require__(16), _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); | ||
var _objectWithoutProperties2 = __webpack_require__(14), _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); | ||
exports.default = cleanProps; | ||
}, /* 16 */ | ||
}, /* 14 */ | ||
/***/ | ||
function(module, exports) { | ||
module.exports = __WEBPACK_EXTERNAL_MODULE_16__; | ||
}, /* 17 */ | ||
module.exports = __WEBPACK_EXTERNAL_MODULE_14__; | ||
}, /* 15 */ | ||
/***/ | ||
@@ -319,11 +297,10 @@ function(module, exports, __webpack_require__) { | ||
}); | ||
var _keys = __webpack_require__(18), _keys2 = _interopRequireDefault(_keys), _objectWithoutProperties2 = __webpack_require__(16), _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2), _extends2 = __webpack_require__(5), _extends3 = _interopRequireDefault(_extends2), _getPrototypeOf = __webpack_require__(6), _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf), _classCallCheck2 = __webpack_require__(7), _classCallCheck3 = _interopRequireDefault(_classCallCheck2), _createClass2 = __webpack_require__(8), _createClass3 = _interopRequireDefault(_createClass2), _possibleConstructorReturn2 = __webpack_require__(9), _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2), _inherits2 = __webpack_require__(10), _inherits3 = _interopRequireDefault(_inherits2), _react = __webpack_require__(12), _react2 = _interopRequireDefault(_react), _propTypes = __webpack_require__(11), _propTypes2 = _interopRequireDefault(_propTypes), withAnalytics = function(WrappedComponent) { | ||
var _keys = __webpack_require__(16), _keys2 = _interopRequireDefault(_keys), _objectWithoutProperties2 = __webpack_require__(14), _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2), _extends2 = __webpack_require__(5), _extends3 = _interopRequireDefault(_extends2), _classCallCheck2 = __webpack_require__(6), _classCallCheck3 = _interopRequireDefault(_classCallCheck2), _possibleConstructorReturn2 = __webpack_require__(7), _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2), _inherits2 = __webpack_require__(8), _inherits3 = _interopRequireDefault(_inherits2), _react = __webpack_require__(10), _react2 = _interopRequireDefault(_react), _propTypes = __webpack_require__(9), _propTypes2 = _interopRequireDefault(_propTypes), withAnalytics = function(WrappedComponent) { | ||
var _class, _temp2, map = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}; | ||
return _temp2 = _class = function(_Component) { | ||
function WithAnalytics() { | ||
var _ref, _temp, _this, _ret; | ||
var _temp, _this, _ret; | ||
(0, _classCallCheck3.default)(this, WithAnalytics); | ||
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) args[_key] = arguments[_key]; | ||
return _temp = _this = (0, _possibleConstructorReturn3.default)(this, (_ref = WithAnalytics.__proto__ || (0, | ||
_getPrototypeOf2.default)(WithAnalytics)).call.apply(_ref, [ this ].concat(args))), | ||
return _temp = _this = (0, _possibleConstructorReturn3.default)(this, _Component.call.apply(_Component, [ this ].concat(args))), | ||
_this.fireAnalyticsEvent = function(name, data) { | ||
@@ -340,25 +317,19 @@ var _this$props = _this.props, analyticsData = _this$props.analyticsData, analyticsId = _this$props.analyticsId, onAnalyticsEvent = _this.context.onAnalyticsEvent; | ||
} | ||
return (0, _inherits3.default)(WithAnalytics, _Component), (0, _createClass3.default)(WithAnalytics, [ { | ||
key: "componentWillMount", | ||
value: function() { | ||
this.evaluatedMap = "function" == typeof map ? map(this.fireAnalyticsEvent) : map; | ||
} | ||
}, { | ||
key: "render", | ||
value: function() { | ||
var _this2 = this, _props = this.props, componentProps = (_props.analyticsId, _props.analyticsData, | ||
(0, _objectWithoutProperties3.default)(_props, [ "analyticsId", "analyticsData" ])); | ||
/* eslint-enable no-unused-vars */ | ||
return (0, _keys2.default)(this.evaluatedMap).forEach(function(prop) { | ||
var handler = _this2.evaluatedMap[prop], originalProp = componentProps[prop]; | ||
componentProps[prop] = function() { | ||
"function" == typeof handler ? handler.apply(void 0, arguments) : _this2.fireAnalyticsEvent(handler), | ||
"function" == typeof originalProp && originalProp.apply(void 0, arguments); | ||
}; | ||
}), _react2.default.createElement(WrappedComponent, (0, _extends3.default)({ | ||
fireAnalyticsEvent: this.fireAnalyticsEvent, | ||
firePrivateAnalyticsEvent: this.privateAnalyticsEvent | ||
}, componentProps)); | ||
} | ||
} ]), WithAnalytics; | ||
return (0, _inherits3.default)(WithAnalytics, _Component), WithAnalytics.prototype.componentWillMount = function() { | ||
this.evaluatedMap = "function" == typeof map ? map(this.fireAnalyticsEvent) : map; | ||
}, WithAnalytics.prototype.render = function() { | ||
var _this2 = this, _props = this.props, componentProps = (_props.analyticsId, _props.analyticsData, | ||
(0, _objectWithoutProperties3.default)(_props, [ "analyticsId", "analyticsData" ])); | ||
/* eslint-enable no-unused-vars */ | ||
return (0, _keys2.default)(this.evaluatedMap).forEach(function(prop) { | ||
var handler = _this2.evaluatedMap[prop], originalProp = componentProps[prop]; | ||
componentProps[prop] = function() { | ||
"function" == typeof handler ? handler.apply(void 0, arguments) : _this2.fireAnalyticsEvent(handler), | ||
"function" == typeof originalProp && originalProp.apply(void 0, arguments); | ||
}; | ||
}), _react2.default.createElement(WrappedComponent, (0, _extends3.default)({ | ||
fireAnalyticsEvent: this.fireAnalyticsEvent, | ||
firePrivateAnalyticsEvent: this.privateAnalyticsEvent | ||
}, componentProps)); | ||
}, WithAnalytics; | ||
}(_react.Component), _class.displayName = "WithAnalytics(" + (WrappedComponent.displayName || WrappedComponent.name) + ")", | ||
@@ -370,7 +341,7 @@ _class.contextTypes = { | ||
exports.default = withAnalytics; | ||
}, /* 18 */ | ||
}, /* 16 */ | ||
/***/ | ||
function(module, exports) { | ||
module.exports = __WEBPACK_EXTERNAL_MODULE_18__; | ||
module.exports = __WEBPACK_EXTERNAL_MODULE_16__; | ||
} ]); | ||
}); |
@@ -1,1 +0,1 @@ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("babel-runtime/core-js/object/assign"),require("babel-runtime/helpers/typeof"),require("babel-runtime/helpers/extends"),require("babel-runtime/core-js/object/get-prototype-of"),require("babel-runtime/helpers/classCallCheck"),require("babel-runtime/helpers/createClass"),require("babel-runtime/helpers/possibleConstructorReturn"),require("babel-runtime/helpers/inherits"),require("prop-types"),require("react"),require("babel-runtime/helpers/objectWithoutProperties"),require("babel-runtime/core-js/object/keys")):"function"==typeof define&&define.amd?define(["babel-runtime/core-js/object/assign","babel-runtime/helpers/typeof","babel-runtime/helpers/extends","babel-runtime/core-js/object/get-prototype-of","babel-runtime/helpers/classCallCheck","babel-runtime/helpers/createClass","babel-runtime/helpers/possibleConstructorReturn","babel-runtime/helpers/inherits","prop-types","react","babel-runtime/helpers/objectWithoutProperties","babel-runtime/core-js/object/keys"],t):"object"==typeof exports?exports["@atlaskit/analytics"]=t(require("babel-runtime/core-js/object/assign"),require("babel-runtime/helpers/typeof"),require("babel-runtime/helpers/extends"),require("babel-runtime/core-js/object/get-prototype-of"),require("babel-runtime/helpers/classCallCheck"),require("babel-runtime/helpers/createClass"),require("babel-runtime/helpers/possibleConstructorReturn"),require("babel-runtime/helpers/inherits"),require("prop-types"),require("react"),require("babel-runtime/helpers/objectWithoutProperties"),require("babel-runtime/core-js/object/keys")):e["@atlaskit/analytics"]=t(e["babel-runtime/core-js/object/assign"],e["babel-runtime/helpers/typeof"],e["babel-runtime/helpers/extends"],e["babel-runtime/core-js/object/get-prototype-of"],e["babel-runtime/helpers/classCallCheck"],e["babel-runtime/helpers/createClass"],e["babel-runtime/helpers/possibleConstructorReturn"],e["babel-runtime/helpers/inherits"],e["prop-types"],e.react,e["babel-runtime/helpers/objectWithoutProperties"],e["babel-runtime/core-js/object/keys"])}(this,function(e,t,n,r,a,i,u,l,o,s,c,f){return function(e){function t(r){if(n[r])return n[r].exports;var a=n[r]={exports:{},id:r,loaded:!1};return e[r].call(a.exports,a,a.exports,t),a.loaded=!0,a.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){e.exports=n(1)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.withAnalytics=t.cleanProps=t.AnalyticsListener=t.AnalyticsDecorator=void 0;var a=n(2),i=r(a),u=n(14),l=r(u),o=n(15),s=r(o),c=n(17),f=r(c);t.AnalyticsDecorator=i.default,t.AnalyticsListener=l.default,t.cleanProps=s.default,t.withAnalytics=f.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),u=n(4),l=r(u),o=n(5),s=r(o),c=n(6),f=r(c),p=n(7),d=r(p),b=n(8),y=r(b),v=n(9),h=r(v),m=n(10),j=r(m),x=n(11),A=r(x),E=n(12),_=r(E),q=n(13),C=r(q),P=function(e){function t(){var e,n,r,a;(0,d.default)(this,t);for(var u=arguments.length,o=Array(u),c=0;c<u;c++)o[c]=arguments[c];return n=r=(0,h.default)(this,(e=t.__proto__||(0,f.default)(t)).call.apply(e,[this].concat(o))),r.onAnalyticsEvent=function(e,t,n){var a=r.context.onAnalyticsEvent;if("function"==typeof a){var u=r.props,o=u.data,c=u.getData,f=u.match,p=u.matchPrivate,d=(0,s.default)({},t);p===n&&(0,C.default)(f,e)&&("object"===("undefined"==typeof o?"undefined":(0,l.default)(o))&&(0,i.default)(d,o),"function"==typeof c&&(0,i.default)(d,c(e,d))),a(e,d,n)}},a=n,(0,h.default)(r,a)}return(0,j.default)(t,e),(0,y.default)(t,[{key:"getChildContext",value:function(){return{onAnalyticsEvent:this.onAnalyticsEvent}}},{key:"render",value:function(){var e=this.props.children;return _.default.createElement("div",null,e)}}]),t}(E.Component);P.propTypes={data:A.default.object,getData:A.default.func,match:A.default.oneOfType([A.default.string,A.default.func]),matchPrivate:A.default.bool},P.defaultProps={match:"*",matchPrivate:!1},P.contextTypes={onAnalyticsEvent:A.default.func},P.childContextTypes={onAnalyticsEvent:A.default.func},t.default=P},function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t){e.exports=n},function(e,t){e.exports=r},function(e,t){e.exports=a},function(e,t){e.exports=i},function(e,t){e.exports=u},function(e,t){e.exports=l},function(e,t){e.exports=o},function(e,t){e.exports=s},function(e,t){"use strict";function n(e,t){return"*"===e||void 0===t||("string"==typeof e?r.test(t)?t.substr(0,e.length)===e:t===e:"function"==typeof e?e(t):e instanceof RegExp&&e.test(t))}Object.defineProperty(t,"__esModule",{value:!0});var r=/\.$/;t.default=n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(5),i=r(a),u=n(6),l=r(u),o=n(7),s=r(o),c=n(8),f=r(c),p=n(9),d=r(p),b=n(10),y=r(b),v=n(11),h=r(v),m=n(12),j=r(m),x=n(13),A=r(x),E=function(e){function t(){var e,n,r,a;(0,s.default)(this,t);for(var u=arguments.length,o=Array(u),c=0;c<u;c++)o[c]=arguments[c];return n=r=(0,d.default)(this,(e=t.__proto__||(0,l.default)(t)).call.apply(e,[this].concat(o))),r.onAnalyticsEvent=function(e,t,n){var a=r.props,u=a.onEvent,l=a.match,o=a.matchPrivate;if(o===n&&(0,A.default)(l,e)&&"function"==typeof u){var s=(0,i.default)({},t);u(e,s)}var c=r.context.onAnalyticsEvent;"function"==typeof c&&c(e,t,n)},a=n,(0,d.default)(r,a)}return(0,y.default)(t,e),(0,f.default)(t,[{key:"getChildContext",value:function(){return{onAnalyticsEvent:this.onAnalyticsEvent}}},{key:"render",value:function(){var e=this.props.children;return j.default.createElement("div",null,e)}}]),t}(m.Component);E.propTypes={onEvent:h.default.func.isRequired,match:h.default.oneOfType([h.default.string,h.default.func]),matchPrivate:h.default.bool},E.defaultProps={match:"*",matchPrivate:!1},E.contextTypes={onAnalyticsEvent:h.default.func},E.childContextTypes={onAnalyticsEvent:h.default.func},t.default=E},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e){var t=(e.analyticsId,e.analyticsData,e.fireAnalyticsEvent,e.firePrivateAnalyticsEvent,(0,u.default)(e,["analyticsId","analyticsData","fireAnalyticsEvent","firePrivateAnalyticsEvent"]));return t}Object.defineProperty(t,"__esModule",{value:!0});var i=n(16),u=r(i);t.default=a},function(e,t){e.exports=c},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(18),i=r(a),u=n(16),l=r(u),o=n(5),s=r(o),c=n(6),f=r(c),p=n(7),d=r(p),b=n(8),y=r(b),v=n(9),h=r(v),m=n(10),j=r(m),x=n(12),A=r(x),E=n(11),_=r(E),q=function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n=t=function(t){function n(){var e,t,r,a;(0,d.default)(this,n);for(var i=arguments.length,u=Array(i),l=0;l<i;l++)u[l]=arguments[l];return t=r=(0,h.default)(this,(e=n.__proto__||(0,f.default)(n)).call.apply(e,[this].concat(u))),r.fireAnalyticsEvent=function(e,t){var n=r.props,a=n.analyticsData,i=n.analyticsId,u=r.context.onAnalyticsEvent;if(i&&u){var l=(0,s.default)({},a,t);u(i+"."+e,l,!1)}},r.privateAnalyticsEvent=function(e,t){var n=r.context.onAnalyticsEvent;n&&n(""+e,t,!0)},a=t,(0,h.default)(r,a)}return(0,j.default)(n,t),(0,y.default)(n,[{key:"componentWillMount",value:function(){this.evaluatedMap="function"==typeof r?r(this.fireAnalyticsEvent):r}},{key:"render",value:function(){var t=this,n=this.props,r=(n.analyticsId,n.analyticsData,(0,l.default)(n,["analyticsId","analyticsData"]));return(0,i.default)(this.evaluatedMap).forEach(function(e){var n=t.evaluatedMap[e],a=r[e];r[e]=function(){"function"==typeof n?n.apply(void 0,arguments):t.fireAnalyticsEvent(n),"function"==typeof a&&a.apply(void 0,arguments)}}),A.default.createElement(e,(0,s.default)({fireAnalyticsEvent:this.fireAnalyticsEvent,firePrivateAnalyticsEvent:this.privateAnalyticsEvent},r))}}]),n}(x.Component),t.displayName="WithAnalytics("+(e.displayName||e.name)+")",t.contextTypes={onAnalyticsEvent:_.default.func},n};t.default=q},function(e,t){e.exports=f}])}); | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("babel-runtime/core-js/object/assign"),require("babel-runtime/helpers/typeof"),require("babel-runtime/helpers/extends"),require("babel-runtime/helpers/classCallCheck"),require("babel-runtime/helpers/possibleConstructorReturn"),require("babel-runtime/helpers/inherits"),require("prop-types"),require("react"),require("babel-runtime/helpers/objectWithoutProperties"),require("babel-runtime/core-js/object/keys")):"function"==typeof define&&define.amd?define(["babel-runtime/core-js/object/assign","babel-runtime/helpers/typeof","babel-runtime/helpers/extends","babel-runtime/helpers/classCallCheck","babel-runtime/helpers/possibleConstructorReturn","babel-runtime/helpers/inherits","prop-types","react","babel-runtime/helpers/objectWithoutProperties","babel-runtime/core-js/object/keys"],t):"object"==typeof exports?exports["@atlaskit/analytics"]=t(require("babel-runtime/core-js/object/assign"),require("babel-runtime/helpers/typeof"),require("babel-runtime/helpers/extends"),require("babel-runtime/helpers/classCallCheck"),require("babel-runtime/helpers/possibleConstructorReturn"),require("babel-runtime/helpers/inherits"),require("prop-types"),require("react"),require("babel-runtime/helpers/objectWithoutProperties"),require("babel-runtime/core-js/object/keys")):e["@atlaskit/analytics"]=t(e["babel-runtime/core-js/object/assign"],e["babel-runtime/helpers/typeof"],e["babel-runtime/helpers/extends"],e["babel-runtime/helpers/classCallCheck"],e["babel-runtime/helpers/possibleConstructorReturn"],e["babel-runtime/helpers/inherits"],e["prop-types"],e.react,e["babel-runtime/helpers/objectWithoutProperties"],e["babel-runtime/core-js/object/keys"])}(this,function(e,t,n,r,a,i,o,u,l,s){return function(e){function t(r){if(n[r])return n[r].exports;var a=n[r]={exports:{},id:r,loaded:!1};return e[r].call(a.exports,a,a.exports,t),a.loaded=!0,a.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){e.exports=n(1)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.withAnalytics=t.cleanProps=t.AnalyticsListener=t.AnalyticsDecorator=void 0;var a=n(2),i=r(a),o=n(12),u=r(o),l=n(13),s=r(l),c=n(15),f=r(c);t.AnalyticsDecorator=i.default,t.AnalyticsListener=u.default,t.cleanProps=s.default,t.withAnalytics=f.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),i=r(a),o=n(4),u=r(o),l=n(5),s=r(l),c=n(6),f=r(c),p=n(7),d=r(p),y=n(8),b=r(y),h=n(9),v=r(h),m=n(10),A=r(m),x=n(11),E=r(x),j=function(e){function t(){var n,r,a;(0,f.default)(this,t);for(var o=arguments.length,l=Array(o),c=0;c<o;c++)l[c]=arguments[c];return n=r=(0,d.default)(this,e.call.apply(e,[this].concat(l))),r.onAnalyticsEvent=function(e,t,n){var a=r.context.onAnalyticsEvent;if("function"==typeof a){var o=r.props,l=o.data,c=o.getData,f=o.match,p=o.matchPrivate,d=(0,s.default)({},t);p===n&&(0,E.default)(f,e)&&("object"===("undefined"==typeof l?"undefined":(0,u.default)(l))&&(0,i.default)(d,l),"function"==typeof c&&(0,i.default)(d,c(e,d))),a(e,d,n)}},a=n,(0,d.default)(r,a)}return(0,b.default)(t,e),t.prototype.getChildContext=function(){return{onAnalyticsEvent:this.onAnalyticsEvent}},t.prototype.render=function(){var e=this.props.children;return A.default.createElement("div",null,e)},t}(m.Component);j.propTypes={data:v.default.object,getData:v.default.func,match:v.default.oneOfType([v.default.string,v.default.func]),matchPrivate:v.default.bool},j.defaultProps={match:"*",matchPrivate:!1},j.contextTypes={onAnalyticsEvent:v.default.func},j.childContextTypes={onAnalyticsEvent:v.default.func},t.default=j},function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t){e.exports=n},function(e,t){e.exports=r},function(e,t){e.exports=a},function(e,t){e.exports=i},function(e,t){e.exports=o},function(e,t){e.exports=u},function(e,t){"use strict";function n(e,t){return"*"===e||void 0===t||("string"==typeof e?r.test(t)?t.substr(0,e.length)===e:t===e:"function"==typeof e?e(t):e instanceof RegExp&&e.test(t))}Object.defineProperty(t,"__esModule",{value:!0});var r=/\.$/;t.default=n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(5),i=r(a),o=n(6),u=r(o),l=n(7),s=r(l),c=n(8),f=r(c),p=n(9),d=r(p),y=n(10),b=r(y),h=n(11),v=r(h),m=function(e){function t(){var n,r,a;(0,u.default)(this,t);for(var o=arguments.length,l=Array(o),c=0;c<o;c++)l[c]=arguments[c];return n=r=(0,s.default)(this,e.call.apply(e,[this].concat(l))),r.onAnalyticsEvent=function(e,t,n){var a=r.props,o=a.onEvent,u=a.match,l=a.matchPrivate;if(l===n&&(0,v.default)(u,e)&&"function"==typeof o){var s=(0,i.default)({},t);o(e,s)}var c=r.context.onAnalyticsEvent;"function"==typeof c&&c(e,t,n)},a=n,(0,s.default)(r,a)}return(0,f.default)(t,e),t.prototype.getChildContext=function(){return{onAnalyticsEvent:this.onAnalyticsEvent}},t.prototype.render=function(){var e=this.props.children;return b.default.createElement("div",null,e)},t}(y.Component);m.propTypes={onEvent:d.default.func.isRequired,match:d.default.oneOfType([d.default.string,d.default.func]),matchPrivate:d.default.bool},m.defaultProps={match:"*",matchPrivate:!1},m.contextTypes={onAnalyticsEvent:d.default.func},m.childContextTypes={onAnalyticsEvent:d.default.func},t.default=m},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e){var t=(e.analyticsId,e.analyticsData,e.fireAnalyticsEvent,e.firePrivateAnalyticsEvent,(0,o.default)(e,["analyticsId","analyticsData","fireAnalyticsEvent","firePrivateAnalyticsEvent"]));return t}Object.defineProperty(t,"__esModule",{value:!0});var i=n(14),o=r(i);t.default=a},function(e,t){e.exports=l},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(16),i=r(a),o=n(14),u=r(o),l=n(5),s=r(l),c=n(6),f=r(c),p=n(7),d=r(p),y=n(8),b=r(y),h=n(10),v=r(h),m=n(9),A=r(m),x=function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n=t=function(t){function n(){var e,r,a;(0,f.default)(this,n);for(var i=arguments.length,o=Array(i),u=0;u<i;u++)o[u]=arguments[u];return e=r=(0,d.default)(this,t.call.apply(t,[this].concat(o))),r.fireAnalyticsEvent=function(e,t){var n=r.props,a=n.analyticsData,i=n.analyticsId,o=r.context.onAnalyticsEvent;if(i&&o){var u=(0,s.default)({},a,t);o(i+"."+e,u,!1)}},r.privateAnalyticsEvent=function(e,t){var n=r.context.onAnalyticsEvent;n&&n(""+e,t,!0)},a=e,(0,d.default)(r,a)}return(0,b.default)(n,t),n.prototype.componentWillMount=function(){this.evaluatedMap="function"==typeof r?r(this.fireAnalyticsEvent):r},n.prototype.render=function(){var t=this,n=this.props,r=(n.analyticsId,n.analyticsData,(0,u.default)(n,["analyticsId","analyticsData"]));return(0,i.default)(this.evaluatedMap).forEach(function(e){var n=t.evaluatedMap[e],a=r[e];r[e]=function(){"function"==typeof n?n.apply(void 0,arguments):t.fireAnalyticsEvent(n),"function"==typeof a&&a.apply(void 0,arguments)}}),v.default.createElement(e,(0,s.default)({fireAnalyticsEvent:this.fireAnalyticsEvent,firePrivateAnalyticsEvent:this.privateAnalyticsEvent},r))},n}(h.Component),t.displayName="WithAnalytics("+(e.displayName||e.name)+")",t.contextTypes={onAnalyticsEvent:A.default.func},n};t.default=x},function(e,t){e.exports=s}])}); |
{ | ||
"name": "@atlaskit/analytics", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"config": { | ||
@@ -16,3 +16,5 @@ "access": "public" | ||
"prepublish": "../../node_modules/.bin/in-publish && { cd ../.. && npm run prepublish/single @atlaskit/analytics; } || ../../node_modules/.bin/not-in-publish", | ||
"jest": "../../node_modules/.bin/jest -c ../../build/config/jest.config.js" | ||
"jest": "../../node_modules/.bin/jest -c ../../build/config/jest.config.js", | ||
"storybook": "../../build/bin/storybook.single.sh", | ||
"eslint": "../../build/bin/lint.eslint.sh" | ||
}, | ||
@@ -19,0 +21,0 @@ "files": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
55617
689