From fdd39f5a0f6d538d98c3ba1ae1ff32a871250aab Mon Sep 17 00:00:00 2001 From: Diana Derevyankina <54894989+DziyanaDzeraviankina@users.noreply.github.com> Date: Mon, 30 Aug 2021 13:39:52 +0300 Subject: [PATCH] [TSVB] Remove deprecated `IFieldType` (#110404) Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> --- .../public/application/components/aggs/agg.tsx | 5 ++--- .../public/application/components/aggs/aggs.tsx | 5 ++--- .../strategies/abstract_search_strategy.test.ts | 4 ++-- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/plugins/vis_type_timeseries/public/application/components/aggs/agg.tsx b/src/plugins/vis_type_timeseries/public/application/components/aggs/agg.tsx index 6ba213a47cd47..17af812ae5ce3 100644 --- a/src/plugins/vis_type_timeseries/public/application/components/aggs/agg.tsx +++ b/src/plugins/vis_type_timeseries/public/application/components/aggs/agg.tsx @@ -13,14 +13,13 @@ import { aggToComponent } from '../lib/agg_to_component'; import { isMetricEnabled } from '../../lib/check_ui_restrictions'; import { UnsupportedAgg } from './unsupported_agg'; import { TemporaryUnsupportedAgg } from './temporary_unsupported_agg'; -import type { Metric, Panel, Series } from '../../../../common/types'; +import type { Metric, Panel, Series, SanitizedFieldType } from '../../../../common/types'; import { DragHandleProps } from '../../../types'; import { TimeseriesUIRestrictions } from '../../../../common/ui_restrictions'; -import { IFieldType } from '../../../../../data/common/index_patterns/fields'; interface AggProps extends HTMLAttributes { disableDelete: boolean; - fields: IFieldType[]; + fields: Record; model: Metric; panel: Panel; series: Series; diff --git a/src/plugins/vis_type_timeseries/public/application/components/aggs/aggs.tsx b/src/plugins/vis_type_timeseries/public/application/components/aggs/aggs.tsx index 192cdd4985c6c..0edd8b9c3feb5 100644 --- a/src/plugins/vis_type_timeseries/public/application/components/aggs/aggs.tsx +++ b/src/plugins/vis_type_timeseries/public/application/components/aggs/aggs.tsx @@ -15,9 +15,8 @@ import { Agg } from './agg'; import { seriesChangeHandler } from '../lib/series_change_handler'; import { handleAdd, handleDelete } from '../lib/collection_actions'; import { newMetricAggFn } from '../lib/new_metric_agg_fn'; -import type { Panel, Series } from '../../../../common/types'; +import type { Panel, Series, SanitizedFieldType } from '../../../../common/types'; import type { TimeseriesUIRestrictions } from '../../../../common/ui_restrictions'; -import { IFieldType } from '../../../../../data/common/index_patterns/fields'; const DROPPABLE_ID = 'aggs_dnd'; @@ -25,7 +24,7 @@ export interface AggsProps { name: keyof Series; panel: Panel; model: Series; - fields: IFieldType[]; + fields: Record; uiRestrictions: TimeseriesUIRestrictions; onChange(): void; } diff --git a/src/plugins/vis_type_timeseries/server/lib/search_strategies/strategies/abstract_search_strategy.test.ts b/src/plugins/vis_type_timeseries/server/lib/search_strategies/strategies/abstract_search_strategy.test.ts index 7add5cb4a4553..767d5c00d7a33 100644 --- a/src/plugins/vis_type_timeseries/server/lib/search_strategies/strategies/abstract_search_strategy.test.ts +++ b/src/plugins/vis_type_timeseries/server/lib/search_strategies/strategies/abstract_search_strategy.test.ts @@ -10,7 +10,7 @@ import { IndexPatternsService } from '../../../../../data/common'; import { from } from 'rxjs'; import { AbstractSearchStrategy } from './abstract_search_strategy'; -import type { IFieldType } from '../../../../../data/common'; +import type { FieldSpec } from '../../../../../data/common'; import type { CachedIndexPatternFetcher } from '../lib/cached_index_pattern_fetcher'; import type { VisTypeTimeseriesRequestHandlerContext, @@ -21,7 +21,7 @@ class FooSearchStrategy extends AbstractSearchStrategy {} describe('AbstractSearchStrategy', () => { let abstractSearchStrategy: AbstractSearchStrategy; - let mockedFields: IFieldType[]; + let mockedFields: FieldSpec[]; let requestContext: VisTypeTimeseriesRequestHandlerContext; beforeEach(() => {