import React from 'react' ; import { DocViewer } from '../components/doc_viewer/doc_viewer' ; export function createDocViewerDirective ( reactDirective ) { return reactDirective ( ( props ) => { return < DocViewer { ... props } / > ; } , [ 'hit' , [ 'indexPattern' , { watchDepth : 'reference' } ] , [ 'filter' , { watchDepth : 'reference' } ] , [ 'columns' , { watchDepth : 'collection' } ] , [ 'onAddColumn' , { watchDepth : 'reference' } ] , [ 'onRemoveColumn' , { watchDepth : 'reference' } ] , ] , { restrict : 'E' , scope : { hit : '=' , indexPattern : '=' , filter : '=?' , columns : '=?' , onAddColumn : '=?' , onRemoveColumn : '=?' , } , } ) ; }