Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[6.x] Update to EUI 5.3.0 (#26485) #26578

Merged
merged 1 commit into from
Dec 4, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,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