/** * @flow * @file Base class for the Open With ES6 wrapper * @author Box */ import 'regenerator-runtime/runtime'; import * as React from 'react'; // TODO switch to createRoot when upgrading to React 18 // eslint-disable-next-line react/no-deprecated import { render } from 'react-dom'; import ES6Wrapper from './ES6Wrapper'; import ContentOpenWithReactComponent from '../content-open-with'; class ContentOpenWith extends ES6Wrapper { /** * Callback for executing an integration * * @return {void} */ onExecute = (appIntegrationId: string): void => { this.emit('execute', appIntegrationId); }; /** * Callback when an error occurs while loading or executing integrations * * @return {void} */ onError = (error: Error): void => { this.emit('error', error); }; /** @inheritdoc */ render() { render( , this.container, ); } } global.Box = global.Box || {}; global.Box.ContentOpenWith = ContentOpenWith; export default ContentOpenWith;