Skip to content

Commit

Permalink
Upgrade EUI to 12.1.0 (elastic#39601)
Browse files Browse the repository at this point in the history
* eui@12.1.0

* jest regenerator-runtime babel-polyfill

* TS Toast -> EuiGlobalToastListToast

* EuiBadge

* EuiCopy

* snapshot updates

* simplify toast interface usage

* misc review cleanup

* remove eui core-js resolution
  • Loading branch information
thompsongl committed Jun 26, 2019
1 parent 475e0b2 commit 13070b1
Show file tree
Hide file tree
Showing 56 changed files with 191 additions and 185 deletions.
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,7 @@
"resolutions": {
"**/@types/node": "10.12.27",
"**/@types/hapi": "^17.0.18",
"**/typescript": "^3.3.3333",
"**/@elastic/eui/**/core-js": "2.6.9"
"**/typescript": "^3.3.3333"
},
"workspaces": {
"packages": [
Expand All @@ -104,7 +103,7 @@
"@babel/register": "7.4.4",
"@elastic/charts": "^6.0.1",
"@elastic/datemath": "5.0.2",
"@elastic/eui": "11.3.2",
"@elastic/eui": "12.1.0",
"@elastic/filesaver": "1.1.2",
"@elastic/good": "8.1.1-kibana2",
"@elastic/numeral": "2.3.3",
Expand Down
2 changes: 1 addition & 1 deletion src/core/public/notifications/toasts/global_toast_list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

import { EuiGlobalToastList, Toast } from '@elastic/eui';
import { EuiGlobalToastList, EuiGlobalToastListToast as Toast } from '@elastic/eui';

import React from 'react';
import * as Rx from 'rxjs';
Expand Down
2 changes: 1 addition & 1 deletion src/core/public/notifications/toasts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@

export { ToastsService, ToastsSetup, ToastsStart } from './toasts_service';
export { ErrorToastOptions, ToastsApi, ToastInput } from './toasts_api';
export { Toast } from '@elastic/eui';
export { EuiGlobalToastListToast as Toast } from '@elastic/eui';
2 changes: 1 addition & 1 deletion src/core/public/notifications/toasts/toasts_api.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

import { Toast } from '@elastic/eui';
import { EuiGlobalToastListToast as Toast } from '@elastic/eui';
import React from 'react';
import * as Rx from 'rxjs';

Expand Down
2 changes: 1 addition & 1 deletion src/core/public/notifications/toasts/toasts_service.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import React from 'react';
import { render, unmountComponentAtNode } from 'react-dom';

import { Toast } from '@elastic/eui';
import { EuiGlobalToastListToast as Toast } from '@elastic/eui';
import { I18nStart } from '../../i18n';
import { UiSettingsSetup } from '../../ui_settings';
import { GlobalToastList } from './global_toast_list';
Expand Down
2 changes: 1 addition & 1 deletion src/core/public/public.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { IconType } from '@elastic/eui';
import { Observable } from 'rxjs';
import React from 'react';
import * as Rx from 'rxjs';
import { Toast } from '@elastic/eui';
import { EuiGlobalToastListToast as Toast } from '@elastic/eui';

// @public (undocumented)
export interface ApplicationSetup {
Expand Down
2 changes: 2 additions & 0 deletions src/dev/jest/setup/babel_polyfill.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,5 @@
// include the necessary polyfills when using `@babel/preset-env`, but for some
// reason it did not work. See https://github.com/elastic/kibana/issues/14506
import '../../../setup_node_env/babel_register/polyfill';
// Required for EUI
import 'regenerator-runtime/runtime';
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ interface Props {
[propName: string]: any;
}

export const FilterView: SFC<Props> = ({ filter, ...rest }: Props) => {
export const FilterView: SFC<Props> = ({ filter, iconOnClick, onClick, ...rest }: Props) => {
let title = `Filter: ${getFilterDisplayText(filter)}. ${i18n.translate(
'data.filter.filterBar.moreFilterActionsMessage',
{
Expand All @@ -51,16 +51,17 @@ export const FilterView: SFC<Props> = ({ filter, ...rest }: Props) => {
<EuiBadge
title={title}
iconType="cross"
// @ts-ignore
iconSide="right"
closeButtonProps={{
// Removing tab focus on close button because the same option can be optained through the context menu
// Also, we may want to add a `DEL` keyboard press functionality
tabIndex: '-1',
tabIndex: -1,
}}
iconOnClick={iconOnClick}
iconOnClickAriaLabel={i18n.translate('data.filter.filterBar.filterItemBadgeIconAriaLabel', {
defaultMessage: 'Delete',
})}
onClick={onClick}
onClickAriaLabel={i18n.translate('data.filter.filterBar.filterItemBadgeAriaLabel', {
defaultMessage: 'Filter actions',
})}
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion src/legacy/ui/public/share/components/url_panel_content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,10 @@ class UrlPanelContentUI extends Component<Props, State> {

{this.renderShortUrlSwitch()}

<EuiCopy textToCopy={this.state.url} anchorClassName="kbnShareContextMenu__copyAnchor">
<EuiCopy
textToCopy={this.state.url || ''}
anchorClassName="kbnShareContextMenu__copyAnchor"
>
{(copy: () => void) => (
<EuiButton
fill
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
},
"license": "Apache-2.0",
"dependencies": {
"@elastic/eui": "11.3.2",
"@elastic/eui": "12.1.0",
"react": "^16.8.0",
"react-dom": "^16.8.0"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
},
"license": "Apache-2.0",
"dependencies": {
"@elastic/eui": "11.3.2",
"@elastic/eui": "12.1.0",
"react": "^16.8.0"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"license": "Apache-2.0",
"dependencies": {
"@elastic/eui": "11.3.2",
"@elastic/eui": "12.1.0",
"react": "^16.8.0"
},
"scripts": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"license": "Apache-2.0",
"dependencies": {
"@elastic/eui": "11.3.2",
"@elastic/eui": "12.1.0",
"react": "^16.8.0"
},
"scripts": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
},
"license": "Apache-2.0",
"dependencies": {
"@elastic/eui": "11.3.2",
"@elastic/eui": "12.1.0",
"react": "^16.8.0",
"react-dom": "^16.8.0"
}
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,7 +22,6 @@ import { Direction } from '@elastic/eui/src/services/sort/sort_direction';

declare module '@elastic/eui' {
export const EuiWrappingPopover: React.SFC<any>;
export const EuiCopy: React.SFC<any>;
export const EuiOutsideClickDetector: React.SFC<any>;
export const EuiSideNav: React.SFC<any>;

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 13070b1

Please sign in to comment.