@atlaskit/editor-plugin-card
Version:
Card plugin for @atlaskit/editor-core
39 lines (38 loc) • 2.47 kB
JavaScript
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
import _createClass from "@babel/runtime/helpers/createClass";
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
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; })(); }
import React from 'react';
import { EditorSmartCardProvider, EditorSmartCardProviderValueGuard } from '@atlaskit/link-provider';
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
import { EditorAnalyticsContext } from '../EditorAnalyticsContext';
import { DatasourceEventsBinding } from './DatasourceEvents';
import { LinkEventsBinding } from './LinkEvents';
// eslint-disable-next-line @repo/internal/react/no-class-components
export var EditorLinkingPlatformAnalytics = /*#__PURE__*/function (_React$PureComponent) {
function EditorLinkingPlatformAnalytics() {
_classCallCheck(this, EditorLinkingPlatformAnalytics);
return _callSuper(this, EditorLinkingPlatformAnalytics, arguments);
}
_inherits(EditorLinkingPlatformAnalytics, _React$PureComponent);
return _createClass(EditorLinkingPlatformAnalytics, [{
key: "render",
value: function render() {
if (expValEquals('platform_editor_hydratable_ui', 'isEnabled', true) && !this.props.editorView) {
return null;
}
return /*#__PURE__*/React.createElement(EditorSmartCardProvider, null, /*#__PURE__*/React.createElement(EditorSmartCardProviderValueGuard, null, /*#__PURE__*/React.createElement(EditorAnalyticsContext, {
editorView: this.props.editorView
}, /*#__PURE__*/React.createElement(LinkEventsBinding
// Ignored via go/ees005
// eslint-disable-next-line react/jsx-props-no-spreading
, this.props), /*#__PURE__*/React.createElement(DatasourceEventsBinding
// Ignored via go/ees005
// eslint-disable-next-line react/jsx-props-no-spreading
, this.props))));
}
}]);
}(React.PureComponent);