@atlaskit/editor-plugin-card
Version:
Card plugin for @atlaskit/editor-core
24 lines (23 loc) • 1.26 kB
JavaScript
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 class EditorLinkingPlatformAnalytics extends React.PureComponent {
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))));
}
}