Skip to content

Commit

Permalink
Update to EUI 5.3.0 (#26485)
Browse files Browse the repository at this point in the history
* update to EUI 5.3.0
  • Loading branch information
snide authored Dec 3, 2018
1 parent 16e56bf commit ee3b22d
Show file tree
Hide file tree
Showing 10 changed files with 25 additions and 25 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
]
},
"dependencies": {
"@elastic/eui": "5.0.0",
"@elastic/eui": "5.3.0",
"@elastic/filesaver": "1.1.2",
"@elastic/good": "8.1.1-kibana1",
"@elastic/numeral": "2.3.2",
Expand Down
1 change: 0 additions & 1 deletion typings/@elastic/eui/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,5 @@
declare module '@elastic/eui' {
export const EuiWrappingPopover: React.SFC<any>;
export const EuiCopy: React.SFC<any>;
export const EuiPopoverTitle: React.SFC<any>;
export const EuiOutsideClickDetector: React.SFC<any>;
}
2 changes: 1 addition & 1 deletion x-pack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@
},
"dependencies": {
"@elastic/datemath": "^4.0.2",
"@elastic/eui": "5.0.0",
"@elastic/eui": "5.3.0",
"@elastic/node-crypto": "0.1.2",
"@elastic/node-phantom-simple": "2.2.4",
"@elastic/numeral": "2.3.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ import {
IHistoryTab
} from '..';

type PropsOf<Component> = Component extends React.SFC<infer Props>
? Props
: never;
type EuiTabProps = PropsOf<typeof EuiTab>;

describe('HistoryTabs', () => {
let mockLocation: any;
let mockHistory: any;
Expand Down Expand Up @@ -62,7 +67,7 @@ describe('HistoryTabs', () => {
const wrapper = shallow(<HistoryTabsWithoutRouter {...testProps} />);
expect(wrapper).toMatchSnapshot();

const tabs: ShallowWrapper<EuiTab> = wrapper.find(EuiTab);
const tabs: ShallowWrapper<EuiTabProps> = wrapper.find(EuiTab);
expect(tabs.at(0).props().isSelected).toEqual(false);
expect(tabs.at(1).props().isSelected).toEqual(true);
expect(tabs.at(2).props().isSelected).toEqual(false);
Expand All @@ -82,7 +87,7 @@ describe('HistoryTabs', () => {
.at(2)
.simulate('click');

const tabs: ReactWrapper<EuiTab> = wrapper.find(EuiTab);
const tabs: ReactWrapper<EuiTabProps> = wrapper.find(EuiTab);
expect(tabs.at(0).props().isSelected).toEqual(false);
expect(tabs.at(1).props().isSelected).toEqual(false);
expect(tabs.at(2).props().isSelected).toEqual(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
import { CommonProps, EuiFieldText, EuiFieldTextProps, EuiFormRow } from '@elastic/eui';
import { EuiFieldText, EuiFieldTextProps, EuiFormRow } from '@elastic/eui';
import { CommonProps } from '@elastic/eui/src/components/common';
import { FormsyInputProps, withFormsy } from 'formsy-react';
import React, { Component, InputHTMLAttributes } from 'react';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
import { CommonProps, EuiFormRow, EuiTextArea, EuiTextAreaProps } from '@elastic/eui';
import { EuiFormRow, EuiTextArea, EuiTextAreaProps } from '@elastic/eui';
import { CommonProps } from '@elastic/eui/src/components/common';
// @ts-ignore
import { FormsyInputProps, withFormsy } from 'formsy-react';
import React, { Component, InputHTMLAttributes } from 'react';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
*/

import {
CommonProps,
EuiFormRow,
// @ts-ignore
EuiSelect,
} from '@elastic/eui';
import { CommonProps } from '@elastic/eui/src/components/common';
// @ts-ignore
import { FormsyInputProps, withFormsy } from 'formsy-react';
import React, { Component, InputHTMLAttributes } from 'react';
Expand Down
18 changes: 6 additions & 12 deletions x-pack/plugins/infra/types/eui.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@
* package includes them.
*/

import { CommonProps, EuiToolTipPosition } from '@elastic/eui';
declare module '@elastic/eui' {
export const EuiWrappingPopover: React.SFC<any>;
}

import { EuiToolTipPosition } from '@elastic/eui';
import { CommonProps } from '@elastic/eui/src/components/common';
import moment from 'moment';
import { MouseEventHandler, ReactType, Ref } from 'react';
import { ReactDatePickerProps } from 'react-datepicker';
Expand Down Expand Up @@ -141,8 +146,6 @@ declare module '@elastic/eui' {
children: React.ReactNode;
};

export const EuiErrorBoundary: React.SFC<EuiErrorBoundaryProps>;

type EuiSizesResponsive = 'xs' | 's' | 'm' | 'l' | 'xl';
type EuiResponsiveProps = CommonProps & {
children: React.ReactNode;
Expand All @@ -164,13 +167,4 @@ declare module '@elastic/eui' {
};

export const EuiDatePickerRange: React.SFC<EuiDatePickerRangeProps>;

export type EuiBetaBadgeProps = CommonProps & {
iconType?: IconType;
label: React.ReactNode;
title?: string;
tooltipContent?: React.ReactNode;
tooltipPosition?: EuiToolTipPosition;
};
export const EuiBetaBadge: React.SFC<EuiBetaBadgeProps>;
}
2 changes: 1 addition & 1 deletion x-pack/plugins/infra/types/eui_experimental.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

declare module '@elastic/eui/lib/experimental' {
import { CommonProps } from '@elastic/eui';
import { CommonProps } from '@elastic/eui/src/components/common';
export type EuiSeriesChartProps = CommonProps & {
xType?: string;
stackBy?: string;
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -746,10 +746,10 @@
tabbable "^1.1.0"
uuid "^3.1.0"

"@elastic/eui@5.0.0":
version "5.0.0"
resolved "https://registry.yarnpkg.com/@elastic/eui/-/eui-5.0.0.tgz#e6fe9e1aa8b00c93045178f78a6dd0d457d56fa8"
integrity sha512-WL6sp6u2Rt1O7a2exLU/RuDcRnpluPN6aQ2JexBl+G6mVyF8F5I3RGJKTJp3jOozOaODRY2ev+Nq57EydkjrKg==
"@elastic/eui@5.3.0":
version "5.3.0"
resolved "https://registry.yarnpkg.com/@elastic/eui/-/eui-5.3.0.tgz#6a871b209c757141ebe88f5c77393652cb43c24d"
integrity sha512-fvOSwZsdQHGpLUIPVLGZus+ty4hJtHVTGqhdwNIFyCt1/gha/S7nEN2Gsk442gfDbGE2girc6vhD3Bl1gzBYRA==
dependencies:
classnames "^2.2.5"
core-js "^2.5.1"
Expand Down

0 comments on commit ee3b22d

Please sign in to comment.