Skip to content

Commit b95165b

Browse files
committed
Revert ISchemas
1 parent 3084e2d commit b95165b

File tree

4 files changed

+12
-6
lines changed

4 files changed

+12
-6
lines changed

src/legacy/core_plugins/vis_default_editor/public/components/agg_group.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import { IAggConfigs, IAggConfig } from 'src/plugins/data/public';
2424
import { DefaultEditorAggGroup, DefaultEditorAggGroupProps } from './agg_group';
2525
import { DefaultEditorAgg } from './agg';
2626
import { DefaultEditorAggAdd } from './agg_add';
27-
import { Schemas } from '../schemas';
27+
import { ISchemas, Schemas } from '../schemas';
2828
import { EditorVisState } from './sidebar/state/reducers';
2929

3030
jest.mock('@elastic/eui', () => ({
@@ -47,7 +47,7 @@ jest.mock('./agg_add', () => ({
4747
describe('DefaultEditorAgg component', () => {
4848
let defaultProps: DefaultEditorAggGroupProps;
4949
let aggs: IAggConfigs;
50-
let schemas: Schemas;
50+
let schemas: ISchemas;
5151
let setTouched: jest.Mock;
5252
let setValidity: jest.Mock;
5353
let reorderAggs: jest.Mock;

src/legacy/core_plugins/vis_default_editor/public/components/sidebar/data_tab.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ import {
3838
toggleEnabledAgg,
3939
} from './state';
4040
import { AddSchema, ReorderAggs, DefaultEditorAggCommonProps } from '../agg_common_props';
41-
import { Schemas } from '../../schemas';
41+
import { ISchemas } from '../../schemas';
4242
import { TimeRange } from '../../../../../../plugins/data/public';
4343
import { EditorVisState } from './state/reducers';
4444

@@ -47,7 +47,7 @@ export interface DefaultEditorDataTabProps {
4747
formIsTouched: boolean;
4848
isTabSelected: boolean;
4949
metricAggs: IAggConfig[];
50-
schemas: Schemas;
50+
schemas: ISchemas;
5151
state: EditorVisState;
5252
setTouched(isTouched: boolean): void;
5353
setValidity(modelName: string, value: boolean): void;

src/legacy/core_plugins/vis_default_editor/public/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ export { RangesParamEditor, RangeValues } from './components/controls/ranges';
2323
export * from './editor_size';
2424
export * from './vis_options_props';
2525
export * from './utils';
26-
export { Schemas, Schema } from './schemas';
26+
export { ISchemas, Schemas, Schema } from './schemas';

src/legacy/core_plugins/vis_default_editor/public/schemas.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@ import { Optional } from '@kbn/utility-types';
2323

2424
import { AggGroupNames, AggParam, IAggGroupNames } from '../../../../plugins/data/public';
2525

26+
export interface ISchemas {
27+
[AggGroupNames.Buckets]: Schema[];
28+
[AggGroupNames.Metrics]: Schema[];
29+
all: Schema[];
30+
}
31+
2632
export interface Schema {
2733
aggFilter: string[];
2834
editor: boolean | string;
@@ -38,7 +44,7 @@ export interface Schema {
3844
aggSettings?: any;
3945
}
4046

41-
export class Schemas {
47+
export class Schemas implements ISchemas {
4248
all: Schema[] = [];
4349
[AggGroupNames.Buckets]: Schema[] = [];
4450
[AggGroupNames.Metrics]: Schema[] = [];

0 commit comments

Comments
 (0)