Remove extra types we added to infra project over time (#35963)

* Our proposed merge back into master should no longer impact this team/project
* During merges from master back into feature-secops we were getting constant conflicts and typing issues where these types would influence other people's types.
* Removed horiztonal bar chart as it is not needed and used anymore and we are replacing it
This commit is contained in:
Frank Hassanabad 2019-05-02 14:57:31 -06:00 committed by GitHub
parent 572b000cb9
commit 607802f5d7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 11 additions and 91 deletions

View file

@ -118,20 +118,4 @@ declare module '@elastic/eui' {
message?: any;
};
export const EuiInMemoryTable: React.SFC<EuiInMemoryTableProps>;
type EuiSuperSelectProps = CommonProps & {
style?: any;
options?: any;
valueOfSelected?: any;
onChange?: (value: any) => void;
disabled?: boolean;
isLoading?: boolean;
itemClassName?: any;
hasDividers?: boolean;
itemLayoutAlign?: any;
compressed?: boolean;
fullWidth?: any;
};
export const EuiSuperSelect: React.SFC<EuiSuperSelectProps>;
}

View file

@ -7,11 +7,7 @@
declare module '@elastic/eui/lib/experimental' {
import { CommonProps } from '@elastic/eui/src/components/common';
export type EuiSeriesChartProps = CommonProps & {
width?: number | string;
height?: number | string;
orientation?: string;
xType?: string;
yType?: string;
stackBy?: string;
statusText?: string;
yDomain?: number[];
@ -25,7 +21,7 @@ declare module '@elastic/eui/lib/experimental' {
export const EuiSeriesChart: React.SFC<EuiSeriesChartProps>;
type EuiSeriesProps = CommonProps & {
data: Array<{ x: number; y: number | string; y0?: number }>;
data: Array<{ x: number; y: number; y0?: number }>;
lineSize?: number;
name: string;
color?: string;

View file

@ -4,7 +4,10 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { EuiSuperSelect } from '@elastic/eui';
import {
// @ts-ignore
EuiSuperSelect,
} from '@elastic/eui';
import React from 'react';
import { pure } from 'recompose';
import { ActionCreator } from 'typescript-fsa';

View file

@ -1,57 +0,0 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
import { EuiTitle } from '@elastic/eui';
import { EuiBarSeries, EuiSeriesChart } from '@elastic/eui/lib/experimental';
import React from 'react';
import { pure } from 'recompose';
import styled from 'styled-components';
import { LoadingPanel } from '../loading';
import * as i18n from './translations';
export interface HorizontalBarChartData {
x: number;
y: string;
}
interface HorizontalBarChartProps {
barChartdata: HorizontalBarChartData[];
width?: number;
height?: number;
title: string;
loading: boolean;
}
export const HorizontalBarChart = pure<HorizontalBarChartProps>(
({ barChartdata, width, height, title, loading }) => {
return loading ? (
<LoadingPanel height="auto" width="100%" text={i18n.LOADING_DATA} />
) : (
<Container height={height}>
<EuiTitle size="s">
<h3>{title}</h3>
</EuiTitle>
<EuiSeriesChart width={width} height={height} yType="ordinal" orientation="horizontal">
<EuiBarSeries name="Tag counts" data={barChartdata} />
</EuiSeriesChart>
</Container>
);
}
);
const Container = styled.div<{ height?: number }>`
display: flex;
flex-direction: row;
flex-wrap: wrap;
height: auto;
& > div {
.rv-xy-plot {
height: ${({ height }) => (height ? `${height}px !important` : 'auto')};
}
}
`;

View file

@ -1,11 +0,0 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
import { i18n } from '@kbn/i18n';
export const LOADING_DATA = i18n.translate('xpack.siem.horizontalBarChart.loadingData', {
defaultMessage: 'Loading data',
});

View file

@ -4,7 +4,12 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { EuiFlexGroup, EuiFlexItem, EuiSuperSelect } from '@elastic/eui';
import {
EuiFlexGroup,
EuiFlexItem,
// @ts-ignore
EuiSuperSelect,
} from '@elastic/eui';
import { noop } from 'lodash/fp';
import * as React from 'react';
import { pure } from 'recompose';