diff --git a/src/legacy/core_plugins/kibana/public/discover/angular/context.js b/src/legacy/core_plugins/kibana/public/discover/angular/context.js
index 90017b31d5f2d..bcc1b074aaeb6 100644
--- a/src/legacy/core_plugins/kibana/public/discover/angular/context.js
+++ b/src/legacy/core_plugins/kibana/public/discover/angular/context.js
@@ -24,7 +24,7 @@ import {
i18n,
subscribeWithScope,
npStart,
-} from './dependencies';
+} from './../kibana_services';
import './context_app';
import contextAppRouteTemplate from './context.html';
diff --git a/src/legacy/core_plugins/kibana/public/discover/angular/context_app.js b/src/legacy/core_plugins/kibana/public/discover/angular/context_app.js
index a1c5ade0d72b5..6d7a9dcbbfd14 100644
--- a/src/legacy/core_plugins/kibana/public/discover/angular/context_app.js
+++ b/src/legacy/core_plugins/kibana/public/discover/angular/context_app.js
@@ -18,7 +18,7 @@
*/
import _ from 'lodash';
-import { callAfterBindingsWorkaround, uiModules, timefilter } from './dependencies';
+import { callAfterBindingsWorkaround, uiModules, timefilter } from './../kibana_services';
import contextAppTemplate from './context_app.html';
import '../context/components/action_bar';
import { getFirstSortableField } from '../context/api/utils/sorting';
diff --git a/src/legacy/core_plugins/kibana/public/discover/angular/discover.js b/src/legacy/core_plugins/kibana/public/discover/angular/discover.js
index 251aefc8a879a..14f16f1d4481c 100644
--- a/src/legacy/core_plugins/kibana/public/discover/angular/discover.js
+++ b/src/legacy/core_plugins/kibana/public/discover/angular/discover.js
@@ -69,7 +69,7 @@ import {
uiRoutes,
vislibSeriesResponseHandlerProvider,
VisProvider,
-} from './dependencies';
+} from './../kibana_services';
import { getRootBreadcrumbs, getSavedSearchBreadcrumbs } from '../breadcrumbs';
import { extractTimeFilter, changeTimeFilter } from '../../../../data/public';
diff --git a/src/legacy/core_plugins/kibana/public/discover/angular/doc.ts b/src/legacy/core_plugins/kibana/public/discover/angular/doc.ts
index cb34c0e622506..5be85d88341ec 100644
--- a/src/legacy/core_plugins/kibana/public/discover/angular/doc.ts
+++ b/src/legacy/core_plugins/kibana/public/discover/angular/doc.ts
@@ -16,7 +16,13 @@
* specific language governing permissions and limitations
* under the License.
*/
-import { uiRoutes, uiModules, wrapInI18nContext, timefilter, IndexPatterns } from './dependencies';
+import {
+ uiRoutes,
+ uiModules,
+ wrapInI18nContext,
+ timefilter,
+ IndexPatterns,
+} from './../kibana_services';
// @ts-ignore
import { getRootBreadcrumbs } from '../breadcrumbs';
import html from './doc.html';
diff --git a/src/legacy/core_plugins/kibana/public/discover/angular/doc_table/components/pager/index.js b/src/legacy/core_plugins/kibana/public/discover/angular/doc_table/components/pager/index.js
index e6d638d88bc27..1cd881d3b8d93 100644
--- a/src/legacy/core_plugins/kibana/public/discover/angular/doc_table/components/pager/index.js
+++ b/src/legacy/core_plugins/kibana/public/discover/angular/doc_table/components/pager/index.js
@@ -16,11 +16,9 @@
* specific language governing permissions and limitations
* under the License.
*/
-
-import { uiModules } from 'ui/modules';
+import { wrapInI18nContext, uiModules } from '../../../../kibana_services';
import { ToolBarPagerText } from './tool_bar_pager_text';
import { ToolBarPagerButtons } from './tool_bar_pager_buttons';
-import { wrapInI18nContext } from 'ui/i18n';
const app = uiModules.get('kibana');
diff --git a/src/legacy/core_plugins/kibana/public/discover/angular/doc_table/components/table_header.ts b/src/legacy/core_plugins/kibana/public/discover/angular/doc_table/components/table_header.ts
index 08c367834a72f..b7331d80c87de 100644
--- a/src/legacy/core_plugins/kibana/public/discover/angular/doc_table/components/table_header.ts
+++ b/src/legacy/core_plugins/kibana/public/discover/angular/doc_table/components/table_header.ts
@@ -17,7 +17,7 @@
* under the License.
*/
import { wrapInI18nContext } from 'ui/i18n';
-import { uiModules } from '../../dependencies';
+import { uiModules } from '../../../kibana_services';
import { TableHeader } from './table_header/table_header';
const module = uiModules.get('app/discover');
diff --git a/src/legacy/core_plugins/kibana/public/discover/angular/doc_table/components/table_header/helpers.tsx b/src/legacy/core_plugins/kibana/public/discover/angular/doc_table/components/table_header/helpers.tsx
index 55186bcb47d15..80f963c8ccb3e 100644
--- a/src/legacy/core_plugins/kibana/public/discover/angular/doc_table/components/table_header/helpers.tsx
+++ b/src/legacy/core_plugins/kibana/public/discover/angular/doc_table/components/table_header/helpers.tsx
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-import { IndexPattern } from '../../../dependencies';
+import { IndexPattern } from '../../../../kibana_services';
// @ts-ignore
import { shortenDottedString } from '../../../../../../common/utils/shorten_dotted_string';
diff --git a/src/legacy/core_plugins/kibana/public/discover/angular/doc_table/components/table_header/table_header.tsx b/src/legacy/core_plugins/kibana/public/discover/angular/doc_table/components/table_header/table_header.tsx
index a51eb8ae67a3e..71674710ac855 100644
--- a/src/legacy/core_plugins/kibana/public/discover/angular/doc_table/components/table_header/table_header.tsx
+++ b/src/legacy/core_plugins/kibana/public/discover/angular/doc_table/components/table_header/table_header.tsx
@@ -17,7 +17,7 @@
* under the License.
*/
import React from 'react';
-import { IndexPattern } from '../../../dependencies';
+import { IndexPattern } from '../../../../kibana_services';
// @ts-ignore
import { TableHeaderColumn } from './table_header_column';
import { SortOrder, getDisplayedColumns } from './helpers';
@@ -47,7 +47,7 @@ export function TableHeader({
return (
- |
+ |
{displayedColumns.map(col => {
return (
{
diff --git a/src/legacy/core_plugins/kibana/public/discover/angular/index.ts b/src/legacy/core_plugins/kibana/public/discover/angular/index.ts
index bca07e5011e91..5d6f57b62eaa9 100644
--- a/src/legacy/core_plugins/kibana/public/discover/angular/index.ts
+++ b/src/legacy/core_plugins/kibana/public/discover/angular/index.ts
@@ -16,8 +16,9 @@
* specific language governing permissions and limitations
* under the License.
*/
-import './dependencies';
+import './../kibana_services';
import './discover';
import './doc';
import './context';
import './doc_viewer';
+import './directives';
diff --git a/src/legacy/core_plugins/kibana/public/discover/components/field_chooser/discover_field.js b/src/legacy/core_plugins/kibana/public/discover/components/field_chooser/discover_field.js
index f7469d0142d57..ec638664f414e 100644
--- a/src/legacy/core_plugins/kibana/public/discover/components/field_chooser/discover_field.js
+++ b/src/legacy/core_plugins/kibana/public/discover/components/field_chooser/discover_field.js
@@ -19,14 +19,13 @@
import $ from 'jquery';
import { i18n } from '@kbn/i18n';
+import { uiModules, capabilities } from '../../kibana_services';
import html from './discover_field.html';
import _ from 'lodash';
import 'ui/directives/css_truncate';
import 'ui/directives/field_name';
import './string_progress_bar';
import detailsHtml from './lib/detail_views/string.html';
-import { capabilities } from 'ui/capabilities';
-import { uiModules } from 'ui/modules';
const app = uiModules.get('apps/discover');
app.directive('discoverField', function ($compile) {
diff --git a/src/legacy/core_plugins/kibana/public/discover/components/field_chooser/discover_field_search_directive.ts b/src/legacy/core_plugins/kibana/public/discover/components/field_chooser/discover_field_search_directive.ts
index 8af23caedd78a..b1bc15e3dbe9e 100644
--- a/src/legacy/core_plugins/kibana/public/discover/components/field_chooser/discover_field_search_directive.ts
+++ b/src/legacy/core_plugins/kibana/public/discover/components/field_chooser/discover_field_search_directive.ts
@@ -17,8 +17,7 @@
* under the License.
*/
// @ts-ignore
-import { uiModules } from 'ui/modules';
-import { wrapInI18nContext } from 'ui/i18n';
+import { wrapInI18nContext, uiModules } from '../../kibana_services';
import { DiscoverFieldSearch } from './discover_field_search';
const app = uiModules.get('apps/discover');
diff --git a/src/legacy/core_plugins/kibana/public/discover/components/field_chooser/discover_index_pattern_directive.ts b/src/legacy/core_plugins/kibana/public/discover/components/field_chooser/discover_index_pattern_directive.ts
index 938d6cc226f2f..b968e5fd0d01b 100644
--- a/src/legacy/core_plugins/kibana/public/discover/components/field_chooser/discover_index_pattern_directive.ts
+++ b/src/legacy/core_plugins/kibana/public/discover/components/field_chooser/discover_index_pattern_directive.ts
@@ -17,8 +17,7 @@
* under the License.
*/
// @ts-ignore
-import { uiModules } from 'ui/modules';
-import { wrapInI18nContext } from 'ui/i18n';
+import { wrapInI18nContext, uiModules } from '../../kibana_services';
import { DiscoverIndexPattern } from './discover_index_pattern';
const app = uiModules.get('apps/discover');
diff --git a/src/legacy/core_plugins/kibana/public/discover/components/field_chooser/field_chooser.js b/src/legacy/core_plugins/kibana/public/discover/components/field_chooser/field_chooser.js
index 3e0172dec1ff4..219935c27f485 100644
--- a/src/legacy/core_plugins/kibana/public/discover/components/field_chooser/field_chooser.js
+++ b/src/legacy/core_plugins/kibana/public/discover/components/field_chooser/field_chooser.js
@@ -27,8 +27,10 @@ import _ from 'lodash';
import $ from 'jquery';
import rison from 'rison-node';
import { fieldCalculator } from './lib/field_calculator';
-import { FieldList } from 'ui/index_patterns';
-import { uiModules } from 'ui/modules';
+import {
+ uiModules,
+ FieldList,
+} from '../../kibana_services';
import fieldChooserTemplate from './field_chooser.html';
const app = uiModules.get('apps/discover');
diff --git a/src/legacy/core_plugins/kibana/public/discover/components/field_chooser/string_progress_bar.js b/src/legacy/core_plugins/kibana/public/discover/components/field_chooser/string_progress_bar.js
index ae00df6dfbbf8..6efe91e94ffad 100644
--- a/src/legacy/core_plugins/kibana/public/discover/components/field_chooser/string_progress_bar.js
+++ b/src/legacy/core_plugins/kibana/public/discover/components/field_chooser/string_progress_bar.js
@@ -16,13 +16,8 @@
* specific language governing permissions and limitations
* under the License.
*/
-
-
-import { wrapInI18nContext } from 'ui/i18n';
-import { uiModules } from 'ui/modules';
-
import React from 'react';
-
+import { wrapInI18nContext, uiModules } from '../../kibana_services';
import {
EuiFlexGroup,
EuiFlexItem,
diff --git a/src/legacy/core_plugins/kibana/public/discover/angular/dependencies.ts b/src/legacy/core_plugins/kibana/public/discover/kibana_services.ts
similarity index 95%
rename from src/legacy/core_plugins/kibana/public/discover/angular/dependencies.ts
rename to src/legacy/core_plugins/kibana/public/discover/kibana_services.ts
index a1a917b400651..97d5a1ec47474 100644
--- a/src/legacy/core_plugins/kibana/public/discover/angular/dependencies.ts
+++ b/src/legacy/core_plugins/kibana/public/discover/kibana_services.ts
@@ -25,19 +25,19 @@ import 'ui/state_management/app_state';
import 'ui/capabilities/route_setup';
import uiRoutes from 'ui/routes';
-export { uiRoutes };
import angular from 'angular';
-export { angular };
-
import { npStart } from 'ui/new_platform';
const { chrome } = npStart.core;
+
+export { uiRoutes };
export { chrome };
export { npStart } from 'ui/new_platform';
+export { angular };
// @ts-ignore
export { uiModules } from 'ui/modules';
-export { IndexPattern, IndexPatterns, StaticIndexPattern } from 'ui/index_patterns';
+export { IndexPattern, IndexPatterns, StaticIndexPattern, FieldList } from 'ui/index_patterns';
export { wrapInI18nContext } from 'ui/i18n';
export { timefilter } from 'ui/timefilter';
export { FilterBarQueryFilterProvider } from 'ui/filter_manager/query_filter';
@@ -75,7 +75,6 @@ export {
export { tabifyAggResponse } from 'ui/agg_response/tabify';
export { showSaveModal } from 'ui/saved_objects/show_saved_object_save_modal';
export { SavedObjectSaveModal } from 'ui/saved_objects/components/saved_object_save_modal';
-export { getRootBreadcrumbs, getSavedSearchBreadcrumbs } from '../breadcrumbs';
+export { getRootBreadcrumbs, getSavedSearchBreadcrumbs } from './breadcrumbs';
export { buildVislibDimensions } from 'ui/visualize/loader/pipeline_helpers/build_pipeline';
-
-import './directives';
+export { capabilities } from 'ui/capabilities';