From ee3b22dc856100865aba406eb818d83b43e44782 Mon Sep 17 00:00:00 2001 From: "dave.snider@gmail.com" Date: Mon, 3 Dec 2018 14:14:12 -0800 Subject: [PATCH] Update to EUI 5.3.0 (#26485) * update to EUI 5.3.0 --- package.json | 2 +- typings/@elastic/eui/index.d.ts | 1 - x-pack/package.json | 2 +- .../HistoryTabs/__test__/HistoryTabs.test.tsx | 9 +++++++-- .../public/components/inputs/input.tsx | 3 ++- .../public/components/inputs/multi_input.tsx | 3 ++- .../public/components/inputs/select.tsx | 2 +- x-pack/plugins/infra/types/eui.d.ts | 18 ++++++------------ .../plugins/infra/types/eui_experimental.d.ts | 2 +- yarn.lock | 8 ++++---- 10 files changed, 25 insertions(+), 25 deletions(-) diff --git a/package.json b/package.json index a9230c199dc1a5..6a2b5fe155f01c 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/typings/@elastic/eui/index.d.ts b/typings/@elastic/eui/index.d.ts index 0e837f11eab1dd..4d84dde16d6b68 100644 --- a/typings/@elastic/eui/index.d.ts +++ b/typings/@elastic/eui/index.d.ts @@ -22,6 +22,5 @@ declare module '@elastic/eui' { export const EuiWrappingPopover: React.SFC; export const EuiCopy: React.SFC; - export const EuiPopoverTitle: React.SFC; export const EuiOutsideClickDetector: React.SFC; } diff --git a/x-pack/package.json b/x-pack/package.json index b77f35be974568..31c0e9056577af 100644 --- a/x-pack/package.json +++ b/x-pack/package.json @@ -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", diff --git a/x-pack/plugins/apm/public/components/shared/HistoryTabs/__test__/HistoryTabs.test.tsx b/x-pack/plugins/apm/public/components/shared/HistoryTabs/__test__/HistoryTabs.test.tsx index 89624bbbe599a5..25aae9d2532937 100644 --- a/x-pack/plugins/apm/public/components/shared/HistoryTabs/__test__/HistoryTabs.test.tsx +++ b/x-pack/plugins/apm/public/components/shared/HistoryTabs/__test__/HistoryTabs.test.tsx @@ -16,6 +16,11 @@ import { IHistoryTab } from '..'; +type PropsOf = Component extends React.SFC + ? Props + : never; +type EuiTabProps = PropsOf; + describe('HistoryTabs', () => { let mockLocation: any; let mockHistory: any; @@ -62,7 +67,7 @@ describe('HistoryTabs', () => { const wrapper = shallow(); expect(wrapper).toMatchSnapshot(); - const tabs: ShallowWrapper = wrapper.find(EuiTab); + const tabs: ShallowWrapper = 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); @@ -82,7 +87,7 @@ describe('HistoryTabs', () => { .at(2) .simulate('click'); - const tabs: ReactWrapper = wrapper.find(EuiTab); + const tabs: ReactWrapper = 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); diff --git a/x-pack/plugins/beats_management/public/components/inputs/input.tsx b/x-pack/plugins/beats_management/public/components/inputs/input.tsx index 1f778e35cdc217..a96fb493c4ab22 100644 --- a/x-pack/plugins/beats_management/public/components/inputs/input.tsx +++ b/x-pack/plugins/beats_management/public/components/inputs/input.tsx @@ -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'; diff --git a/x-pack/plugins/beats_management/public/components/inputs/multi_input.tsx b/x-pack/plugins/beats_management/public/components/inputs/multi_input.tsx index ba7b2e62656101..30e4290c64158a 100644 --- a/x-pack/plugins/beats_management/public/components/inputs/multi_input.tsx +++ b/x-pack/plugins/beats_management/public/components/inputs/multi_input.tsx @@ -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'; diff --git a/x-pack/plugins/beats_management/public/components/inputs/select.tsx b/x-pack/plugins/beats_management/public/components/inputs/select.tsx index 8fa192090a99af..0b8da66d89b8eb 100644 --- a/x-pack/plugins/beats_management/public/components/inputs/select.tsx +++ b/x-pack/plugins/beats_management/public/components/inputs/select.tsx @@ -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'; diff --git a/x-pack/plugins/infra/types/eui.d.ts b/x-pack/plugins/infra/types/eui.d.ts index 8b6c2c07cecd2f..b3285d211f5df8 100644 --- a/x-pack/plugins/infra/types/eui.d.ts +++ b/x-pack/plugins/infra/types/eui.d.ts @@ -9,7 +9,12 @@ * package includes them. */ -import { CommonProps, EuiToolTipPosition } from '@elastic/eui'; +declare module '@elastic/eui' { + export const EuiWrappingPopover: React.SFC; +} + +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'; @@ -141,8 +146,6 @@ declare module '@elastic/eui' { children: React.ReactNode; }; - export const EuiErrorBoundary: React.SFC; - type EuiSizesResponsive = 'xs' | 's' | 'm' | 'l' | 'xl'; type EuiResponsiveProps = CommonProps & { children: React.ReactNode; @@ -164,13 +167,4 @@ declare module '@elastic/eui' { }; export const EuiDatePickerRange: React.SFC; - - export type EuiBetaBadgeProps = CommonProps & { - iconType?: IconType; - label: React.ReactNode; - title?: string; - tooltipContent?: React.ReactNode; - tooltipPosition?: EuiToolTipPosition; - }; - export const EuiBetaBadge: React.SFC; } diff --git a/x-pack/plugins/infra/types/eui_experimental.d.ts b/x-pack/plugins/infra/types/eui_experimental.d.ts index 3e016f491e555d..da03b34c6b98ca 100644 --- a/x-pack/plugins/infra/types/eui_experimental.d.ts +++ b/x-pack/plugins/infra/types/eui_experimental.d.ts @@ -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; diff --git a/yarn.lock b/yarn.lock index be7b0803358d34..f6f1b6dd643f27 100644 --- a/yarn.lock +++ b/yarn.lock @@ -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"