Prep for embed saved object refactor + helper (#62486) (#62664)

This commit is contained in:
Stacey Gammon 2020-04-06 15:31:48 -04:00 committed by GitHub
parent cab65d369f
commit 34028fd0d2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
26 changed files with 234 additions and 303 deletions

View file

@ -53,20 +53,17 @@ export class EmbeddableExamplesPlugin
new MultiTaskTodoEmbeddableFactory()
);
// These are registered in the start method because `getEmbeddableFactory `
// is only available in start. We could reconsider this I think and make it
// available in both.
deps.embeddable.registerEmbeddableFactory(
SEARCHABLE_LIST_CONTAINER,
new SearchableListContainerFactory(async () => ({
getEmbeddableFactory: (await core.getStartServices())[1].embeddable.getEmbeddableFactory,
embeddableServices: (await core.getStartServices())[1].embeddable,
}))
);
deps.embeddable.registerEmbeddableFactory(
LIST_CONTAINER,
new ListContainerFactory(async () => ({
getEmbeddableFactory: (await core.getStartServices())[1].embeddable.getEmbeddableFactory,
embeddableServices: (await core.getStartServices())[1].embeddable,
}))
);