import { CoreStart , Plugin } from 'src/core/public' ; import './index.scss' ; import { createSavedObjectClass } from './saved_object' ; import { DataPublicPluginStart } from '../../data/public' ; import { PER_PAGE_SETTING , LISTING_LIMIT_SETTING } from '../common' ; export interface SavedObjectsStart { SavedObjectClass : any ; settings : { getPerPage : ( ) => number ; getListingLimit : ( ) => number ; } ; } export interface SavedObjectsStartDeps { data : DataPublicPluginStart ; } export class SavedObjectsPublicPlugin implements Plugin < void , SavedObjectsStart , object , SavedObjectsStartDeps > { public setup ( ) { } public start ( core , { data } ) { return { SavedObjectClass : createSavedObjectClass ( { indexPatterns : data . indexPatterns , savedObjectsClient : core . savedObjects . client , search : data . search , chrome : core . chrome , overlays : core . overlays , } ) , settings : { getPerPage : ( ) => core . uiSettings . get ( PER_PAGE_SETTING ) , getListingLimit : ( ) => core . uiSettings . get ( LISTING_LIMIT_SETTING ) , } , } ; } }