diff --git a/x-pack/legacy/plugins/lens/public/app_plugin/app.test.tsx b/x-pack/legacy/plugins/lens/public/app_plugin/app.test.tsx index f0a4cb5b5e451..d2aa3e1e3e809 100644 --- a/x-pack/legacy/plugins/lens/public/app_plugin/app.test.tsx +++ b/x-pack/legacy/plugins/lens/public/app_plugin/app.test.tsx @@ -12,11 +12,11 @@ import { toastNotifications } from 'ui/notify'; import { Storage } from 'ui/storage'; import { Document, SavedObjectStore } from '../persistence'; import { mount } from 'enzyme'; -import { QueryBar } from '../../../../../../src/legacy/core_plugins/data/public/query'; +import { QueryBarTopRow } from '../../../../../../src/legacy/core_plugins/data/public/query/query_bar'; import { SavedObjectsClientContract } from 'src/core/public'; -jest.mock('../../../../../../src/legacy/core_plugins/data/public/query', () => ({ - QueryBar: jest.fn(() => null), +jest.mock('../../../../../../src/legacy/core_plugins/data/public/query/query_bar', () => ({ + QueryBarTopRow: jest.fn(() => null), })); jest.mock('ui/new_platform'); @@ -69,7 +69,7 @@ function makeDefaultArgs(): jest.Mocked<{ load: jest.fn(), save: jest.fn(), }, - QueryBar: jest.fn(() =>
), + QueryBarTopRow: jest.fn(() =>
), redirectTo: jest.fn(id => {}), savedObjectsClient: jest.fn(), } as unknown) as jest.Mocked<{ @@ -186,7 +186,7 @@ describe('Lens App', () => { await waitForPromises(); expect(args.docStorage.load).toHaveBeenCalledWith('1234'); - expect(QueryBar).toHaveBeenCalledWith( + expect(QueryBarTopRow).toHaveBeenCalledWith( expect.objectContaining({ dateRangeFrom: 'now-7d', dateRangeTo: 'now', @@ -355,7 +355,7 @@ describe('Lens App', () => { mount(); - expect(QueryBar).toHaveBeenCalledWith( + expect(QueryBarTopRow).toHaveBeenCalledWith( expect.objectContaining({ dateRangeFrom: 'now-7d', dateRangeTo: 'now', @@ -378,7 +378,7 @@ describe('Lens App', () => { const instance = mount(); - expect(QueryBar).toHaveBeenCalledWith( + expect(QueryBarTopRow).toHaveBeenCalledWith( expect.objectContaining({ indexPatterns: [], }), @@ -393,7 +393,7 @@ describe('Lens App', () => { instance.update(); - expect(QueryBar).toHaveBeenCalledWith( + expect(QueryBarTopRow).toHaveBeenCalledWith( expect.objectContaining({ indexPatterns: ['newIndex'], }), @@ -417,7 +417,7 @@ describe('Lens App', () => { instance.update(); - expect(QueryBar).toHaveBeenCalledWith( + expect(QueryBarTopRow).toHaveBeenCalledWith( expect.objectContaining({ dateRangeFrom: 'now-14d', dateRangeTo: 'now-7d', diff --git a/x-pack/legacy/plugins/lens/public/app_plugin/app.tsx b/x-pack/legacy/plugins/lens/public/app_plugin/app.tsx index 82353f6550151..9978cac00d920 100644 --- a/x-pack/legacy/plugins/lens/public/app_plugin/app.tsx +++ b/x-pack/legacy/plugins/lens/public/app_plugin/app.tsx @@ -13,7 +13,8 @@ import { Storage } from 'ui/storage'; import { toastNotifications } from 'ui/notify'; import { Chrome } from 'ui/chrome'; import { SavedObjectsClientContract } from 'src/core/public'; -import { Query, QueryBar } from '../../../../../../src/legacy/core_plugins/data/public/query'; +import { Query } from '../../../../../../src/legacy/core_plugins/data/public/query'; +import { QueryBarTopRow } from '../../../../../../src/legacy/core_plugins/data/public/query/query_bar'; import { Document, SavedObjectStore } from '../persistence'; import { EditorFrameInstance } from '../types'; import { NativeRenderer } from '../native_renderer'; @@ -199,7 +200,7 @@ export function App({ - { diff --git a/x-pack/legacy/plugins/lens/public/editor_frame_plugin/merge_tables.ts b/x-pack/legacy/plugins/lens/public/editor_frame_plugin/merge_tables.ts index 887c1841ae15f..9ddba447df293 100644 --- a/x-pack/legacy/plugins/lens/public/editor_frame_plugin/merge_tables.ts +++ b/x-pack/legacy/plugins/lens/public/editor_frame_plugin/merge_tables.ts @@ -5,8 +5,8 @@ */ import { i18n } from '@kbn/i18n'; -import { ExpressionFunction } from 'src/legacy/core_plugins/interpreter/types'; -import { KibanaDatatable } from '../../../../../../src/legacy/core_plugins/interpreter/public'; +import { ExpressionFunction } from '../../../../../../src/legacy/core_plugins/interpreter/types'; +import { KibanaDatatable } from '../../../../../../src/legacy/core_plugins/interpreter/common'; import { LensMultiTable } from '../types'; interface MergeTables { diff --git a/x-pack/legacy/plugins/lens/public/editor_frame_plugin/mocks.tsx b/x-pack/legacy/plugins/lens/public/editor_frame_plugin/mocks.tsx index c7fbce2256b68..02e93e4631284 100644 --- a/x-pack/legacy/plugins/lens/public/editor_frame_plugin/mocks.tsx +++ b/x-pack/legacy/plugins/lens/public/editor_frame_plugin/mocks.tsx @@ -6,7 +6,6 @@ import React from 'react'; import { ExpressionRendererProps } from 'src/legacy/core_plugins/expressions/public'; -import { setup as dataSetup } from '../../../../../../src/legacy/core_plugins/data/public/legacy'; import { ExpressionsSetup, ExpressionsStart, @@ -14,8 +13,6 @@ import { import { DatasourcePublicAPI, FramePublicAPI, Visualization, Datasource } from '../types'; import { EditorFrameSetupPlugins, EditorFrameStartPlugins } from './plugin'; -type DataSetup = typeof dataSetup; - export function createMockVisualization(): jest.Mocked { return { id: 'TEST_VIS', @@ -84,16 +81,12 @@ export function createMockFramePublicAPI(): FrameMock { type Omit = Pick>; -export type MockedSetupDependencies = Omit & { - data: Omit & { - expressions: jest.Mocked; - }; +export type MockedSetupDependencies = Omit & { + expressions: jest.Mocked; }; -export type MockedStartDependencies = Omit & { - data: Omit & { - expressions: jest.Mocked; - }; +export type MockedStartDependencies = Omit & { + expressions: jest.Mocked; }; export function createExpressionRendererMock(): jest.Mock< diff --git a/x-pack/legacy/plugins/lens/public/indexpattern_plugin/filter_ratio.test.ts b/x-pack/legacy/plugins/lens/public/indexpattern_plugin/filter_ratio.test.ts index 849e40e18f981..d03370d0b8137 100644 --- a/x-pack/legacy/plugins/lens/public/indexpattern_plugin/filter_ratio.test.ts +++ b/x-pack/legacy/plugins/lens/public/indexpattern_plugin/filter_ratio.test.ts @@ -5,7 +5,7 @@ */ import { calculateFilterRatio } from './filter_ratio'; -import { KibanaDatatable } from 'src/legacy/core_plugins/interpreter/public'; +import { KibanaDatatable } from 'src/legacy/core_plugins/interpreter/common'; describe('calculate_filter_ratio', () => { it('should collapse two rows and columns into a single row and column', () => { diff --git a/x-pack/legacy/plugins/lens/public/indexpattern_plugin/rename_columns.test.ts b/x-pack/legacy/plugins/lens/public/indexpattern_plugin/rename_columns.test.ts index cf0292d853567..641b1ceb431fb 100644 --- a/x-pack/legacy/plugins/lens/public/indexpattern_plugin/rename_columns.test.ts +++ b/x-pack/legacy/plugins/lens/public/indexpattern_plugin/rename_columns.test.ts @@ -5,7 +5,7 @@ */ import { renameColumns } from './rename_columns'; -import { KibanaDatatable } from 'src/legacy/core_plugins/interpreter/public'; +import { KibanaDatatable } from 'src/legacy/core_plugins/interpreter/common'; describe('rename_columns', () => { it('should rename columns of a given datatable', () => { diff --git a/x-pack/legacy/plugins/lens/public/types.ts b/x-pack/legacy/plugins/lens/public/types.ts index a21dc5af8cd19..4d5e8ce213646 100644 --- a/x-pack/legacy/plugins/lens/public/types.ts +++ b/x-pack/legacy/plugins/lens/public/types.ts @@ -7,7 +7,7 @@ import { Ast } from '@kbn/interpreter/common'; import { EuiIconType } from '@elastic/eui/src/components/icon/icon'; import { Query } from 'src/plugins/data/common'; -import { KibanaDatatable } from '../../../../../src/legacy/core_plugins/interpreter/public'; +import { KibanaDatatable } from '../../../../../src/legacy/core_plugins/interpreter/common'; import { DragContextState } from './drag_drop'; import { Document } from './persistence';