import React from 'react' ; import ReactDOM from 'react-dom' ; import { EuiLoadingChart } from '@elastic/eui' ; import classNames from 'classnames' ; import { Embeddable , EmbeddableInput , IContainer } from '../../../embeddable_plugin' ; export const PLACEHOLDER_EMBEDDABLE = 'placeholder' ; export class PlaceholderEmbeddable extends Embeddable { public readonly type = PLACEHOLDER_EMBEDDABLE ; private node ? : HTMLElement ; constructor ( initialInput , parent ? ) { super ( initialInput , { } , parent ) ; this . input = initialInput ; } public render ( node ) { if ( this . node ) { ReactDOM . unmountComponentAtNode ( this . node ) ; } this . node = node ; const classes = classNames ( 'embPanel' , 'embPanel-isLoading' ) ; ReactDOM . render ( < div className = { classes } > < EuiLoadingChart size = "l" mono / > < /div>, node); } public reload ( ) { } }