UNPKG

@atlaskit/editor-common

Version:

A package that contains common classes and components for editor and renderer

27 lines 1.81 kB
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(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } import React from 'react'; import { withAnalyticsEvents } from '@atlaskit/analytics-next'; export var WithCreateAnalyticsEvent = withAnalyticsEvents()( /*#__PURE__*/function (_React$Component) { _inherits(WithCreateAnalyticsEvent, _React$Component); var _super = _createSuper(WithCreateAnalyticsEvent); function WithCreateAnalyticsEvent() { _classCallCheck(this, WithCreateAnalyticsEvent); return _super.apply(this, arguments); } _createClass(WithCreateAnalyticsEvent, [{ key: "render", value: function render() { var _this$props = this.props, render = _this$props.render, createAnalyticsEvent = _this$props.createAnalyticsEvent; return render(createAnalyticsEvent); } }]); return WithCreateAnalyticsEvent; }(React.Component));