From 514561b364044ff1a24155dc1a20ba69a3948a5e Mon Sep 17 00:00:00 2001 From: Anton Dosov Date: Tue, 7 Apr 2020 17:54:53 +0200 Subject: [PATCH] resolve conflicts --- src/legacy/core_plugins/vis_type_vislib/public/plugin.ts | 2 +- src/plugins/embeddable/public/lib/triggers/triggers.ts | 6 +++--- .../dashboard_to_dashboard_drilldown/drilldown.test.tsx | 2 +- .../dashboard_to_dashboard_drilldown/drilldown.tsx | 8 ++++---- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/legacy/core_plugins/vis_type_vislib/public/plugin.ts b/src/legacy/core_plugins/vis_type_vislib/public/plugin.ts index 2731fb6f5fbe6..4fbf891e15d8e 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/plugin.ts +++ b/src/legacy/core_plugins/vis_type_vislib/public/plugin.ts @@ -111,6 +111,6 @@ export class VisTypeVislibPlugin implements Plugin { public start(core: CoreStart, { data }: VisTypeVislibPluginStartDependencies) { setFormatService(data.fieldFormats); - setDataActions({ createFiltersFromEvent: data.actions.createFiltersFromEvent }); + setDataActions(data.actions); } } diff --git a/src/plugins/embeddable/public/lib/triggers/triggers.ts b/src/plugins/embeddable/public/lib/triggers/triggers.ts index 7317b0c87c0b6..87b234a63aa9a 100644 --- a/src/plugins/embeddable/public/lib/triggers/triggers.ts +++ b/src/plugins/embeddable/public/lib/triggers/triggers.ts @@ -25,12 +25,12 @@ export interface EmbeddableContext { } export interface EmbeddableVisTriggerContext { - embeddable: T; - timeFieldName: string; + embeddable?: T; + timeFieldName?: string; data: { e?: MouseEvent; data: unknown; - range: unknown; + range?: unknown; }; } diff --git a/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/dashboard_to_dashboard_drilldown/drilldown.test.tsx b/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/dashboard_to_dashboard_drilldown/drilldown.test.tsx index b368799e3a337..ab88b58fe6b77 100644 --- a/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/dashboard_to_dashboard_drilldown/drilldown.test.tsx +++ b/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/dashboard_to_dashboard_drilldown/drilldown.test.tsx @@ -9,7 +9,6 @@ import { UrlGeneratorContract } from '../../../../../../../src/plugins/share/pub import { savedObjectsServiceMock } from '../../../../../../../src/core/public/mocks'; import { dataPluginMock } from '../../../../../../../src/plugins/data/public/mocks'; import { ActionContext, Config } from './types'; -import { VisualizeEmbeddableContract } from '../../../../../../../src/legacy/core_plugins/visualizations/public/'; import { Filter, FilterStateStore, @@ -21,6 +20,7 @@ import { esFilters } from '../../../../../../../src/plugins/data/public'; // convenient to use real implementation here. import { createDirectAccessDashboardLinkGenerator } from '../../../../../../../src/plugins/dashboard/public/url_generator'; +import { VisualizeEmbeddableContract } from '../../../../../../../src/plugins/visualizations/public'; describe('.isConfigValid()', () => { const drilldown = new DashboardToDashboardDrilldown({} as any); diff --git a/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/dashboard_to_dashboard_drilldown/drilldown.tsx b/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/dashboard_to_dashboard_drilldown/drilldown.tsx index 1404b0aa1f4dd..e42d310b33fcd 100644 --- a/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/dashboard_to_dashboard_drilldown/drilldown.tsx +++ b/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/dashboard_to_dashboard_drilldown/drilldown.tsx @@ -9,7 +9,6 @@ import { CoreStart } from 'src/core/public'; import { reactToUiComponent } from '../../../../../../../src/plugins/kibana_react/public'; import { SharePluginStart } from '../../../../../../../src/plugins/share/public'; import { DASHBOARD_APP_URL_GENERATOR } from '../../../../../../../src/plugins/dashboard/public'; -import { VisualizeEmbeddableContract } from '../../../../../../../src/legacy/core_plugins/visualizations/public'; import { PlaceContext, ActionContext, Config, CollectConfigProps } from './types'; import { CollectConfigContainer } from './collect_config'; @@ -17,6 +16,7 @@ import { DASHBOARD_TO_DASHBOARD_DRILLDOWN } from './constants'; import { DrilldownDefinition as Drilldown } from '../../../../../drilldowns/public'; import { txtGoToDashboard } from './i18n'; import { DataPublicPluginStart, esFilters } from '../../../../../../../src/plugins/data/public'; +import { VisualizeEmbeddableContract } from '../../../../../../../src/plugins/visualizations/public'; export interface Params { getSavedObjectsClient: () => Promise; @@ -69,7 +69,7 @@ export class DashboardToDashboardDrilldown timeRange: currentTimeRange, query, filters: currentFilters, - } = context.embeddable.getInput(); + } = context.embeddable!.getInput(); // if useCurrentDashboardFilters enabled, then preserve all the filters (pinned and unpinned) // otherwise preserve only pinned @@ -87,7 +87,7 @@ export class DashboardToDashboardDrilldown // look up by range const { restOfFilters, timeRangeFilter } = (await selectRangeActionGetFilters({ - timeFieldName: context.timeFieldName, + timeFieldName: context.timeFieldName!, data: context.data, })) || {}; filters.push(...(restOfFilters || [])); @@ -96,7 +96,7 @@ export class DashboardToDashboardDrilldown } } else { const { restOfFilters, timeRangeFilter } = await valueClickActionGetFilters({ - timeFieldName: context.timeFieldName, + timeFieldName: context.timeFieldName!, data: context.data, }); filters.push(...(restOfFilters || []));