From 9f6b1f66655f2c1569b6ccc17d18b80a4151e34d Mon Sep 17 00:00:00 2001 From: Theo Date: Tue, 19 Mar 2019 14:24:21 +0000 Subject: [PATCH 01/11] [Pagination] - Updated Changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b034fe32096..94a3793c077 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -58,6 +58,7 @@ Update ButtonIconColor type to provide all available options ([#1783](https://gi - Adds missing type and fixes closure-scope problem for `SuperDatePicker`'s `onRefresh` callback ([#1732](https://github.com/elastic/eui/pull/1732)) - Changed `EuiBottomBar` to refer to the end of document ([#1727](https://github.com/elastic/eui/pull/1727)) - Fixed `EuiComboBox`'s calls to its `onBlur` prop ([#1739](https://github.com/elastic/eui/pull/1739)) +- Added documentation entry in `EuiPagination` for `activePage` prop. ([#1740](https://github.com/elastic/eui/pull/1740)) ## [`9.4.0`](https://github.com/elastic/eui/tree/v9.4.0) From c770b6df46338064063f4e7a951b4b24dd12fd6d Mon Sep 17 00:00:00 2001 From: Theo Date: Tue, 19 Mar 2019 21:05:34 +0000 Subject: [PATCH 02/11] Code Review - Moved Changelog entry to current master --- CHANGELOG.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 94a3793c077..b034fe32096 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -58,7 +58,6 @@ Update ButtonIconColor type to provide all available options ([#1783](https://gi - Adds missing type and fixes closure-scope problem for `SuperDatePicker`'s `onRefresh` callback ([#1732](https://github.com/elastic/eui/pull/1732)) - Changed `EuiBottomBar` to refer to the end of document ([#1727](https://github.com/elastic/eui/pull/1727)) - Fixed `EuiComboBox`'s calls to its `onBlur` prop ([#1739](https://github.com/elastic/eui/pull/1739)) -- Added documentation entry in `EuiPagination` for `activePage` prop. ([#1740](https://github.com/elastic/eui/pull/1740)) ## [`9.4.0`](https://github.com/elastic/eui/tree/v9.4.0) From 7d80b1e5223f9ecf6a8571e889edc4f9be85775b Mon Sep 17 00:00:00 2001 From: Theo Date: Fri, 22 Mar 2019 10:35:39 +0000 Subject: [PATCH 03/11] [META] - Converted to TS + tests --- src/components/form/form_row/index.d.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/form/form_row/index.d.ts b/src/components/form/form_row/index.d.ts index 619c92e7671..b46c06cc7d9 100644 --- a/src/components/form/form_row/index.d.ts +++ b/src/components/form/form_row/index.d.ts @@ -1,6 +1,7 @@ +import { FunctionComponent, ReactNode, HTMLAttributes } from 'react'; import { CommonProps, ExclusiveUnion } from '../../common'; -import { FunctionComponent, ReactNode, HTMLAttributes } from 'react'; +export { makeId } from './make_id'; declare module '@elastic/eui' { /** From 4a41c1f25cd099984502db0a58755347f8e900d2 Mon Sep 17 00:00:00 2001 From: Theo Date: Fri, 22 Mar 2019 20:46:35 +0000 Subject: [PATCH 04/11] Code review fixes --- src/components/form/form_row/index.d.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/components/form/form_row/index.d.ts b/src/components/form/form_row/index.d.ts index b46c06cc7d9..619c92e7671 100644 --- a/src/components/form/form_row/index.d.ts +++ b/src/components/form/form_row/index.d.ts @@ -1,7 +1,6 @@ -import { FunctionComponent, ReactNode, HTMLAttributes } from 'react'; import { CommonProps, ExclusiveUnion } from '../../common'; -export { makeId } from './make_id'; +import { FunctionComponent, ReactNode, HTMLAttributes } from 'react'; declare module '@elastic/eui' { /** From 710f40d9293b18bb656852ee3d5dd9ca343beb07 Mon Sep 17 00:00:00 2001 From: Theo Date: Wed, 27 Mar 2019 16:26:02 +0000 Subject: [PATCH 05/11] [META] - Converted to TS --- .../form/form_error_text/form_error_text.test.tsx | 15 --------------- src/components/form/form_error_text/index.d.ts | 1 + 2 files changed, 1 insertion(+), 15 deletions(-) delete mode 100644 src/components/form/form_error_text/form_error_text.test.tsx create mode 100644 src/components/form/form_error_text/index.d.ts diff --git a/src/components/form/form_error_text/form_error_text.test.tsx b/src/components/form/form_error_text/form_error_text.test.tsx deleted file mode 100644 index 0232ad6ee04..00000000000 --- a/src/components/form/form_error_text/form_error_text.test.tsx +++ /dev/null @@ -1,15 +0,0 @@ -import React from 'react'; -import { render } from 'enzyme'; -import { requiredProps } from '../../../test'; - -import { EuiFormErrorText } from './form_error_text'; - -describe('EuiFormErrorText', () => { - test('is rendered', () => { - const component = render( - This is an error. - ); - - expect(component).toMatchSnapshot(); - }); -}); diff --git a/src/components/form/form_error_text/index.d.ts b/src/components/form/form_error_text/index.d.ts new file mode 100644 index 00000000000..b0fd3c27565 --- /dev/null +++ b/src/components/form/form_error_text/index.d.ts @@ -0,0 +1 @@ +export { EuiFormErrorText } from './form_error_text'; From a5b8c1bcc566b1255a92ceb289468e6a60771426 Mon Sep 17 00:00:00 2001 From: Theo Date: Wed, 27 Mar 2019 16:29:48 +0000 Subject: [PATCH 06/11] Updated Changelog --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b034fe32096..90a2c8fb9be 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,13 @@ ## [`master`](https://github.com/elastic/eui/tree/master) - Converted `EuiFormErrorText` to TS ([#1772](https://github.com/elastic/eui/pull/1772)) +<<<<<<< HEAD **Bug fixes** Update ButtonIconColor type to provide all available options ([#1783](https://github.com/elastic/eui/pull/1783)) +======= +>>>>>>> Updated Changelog ## [`9.7.1`](https://github.com/elastic/eui/tree/v9.7.1) From 44a3aa920dafbb97bce008fd3cbf891ebda997f7 Mon Sep 17 00:00:00 2001 From: Theo Date: Thu, 28 Mar 2019 14:48:03 +0000 Subject: [PATCH 07/11] EuiFormErrorText - Code review fixes --- src/components/form/form_error_text/index.d.ts | 1 - 1 file changed, 1 deletion(-) delete mode 100644 src/components/form/form_error_text/index.d.ts diff --git a/src/components/form/form_error_text/index.d.ts b/src/components/form/form_error_text/index.d.ts deleted file mode 100644 index b0fd3c27565..00000000000 --- a/src/components/form/form_error_text/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export { EuiFormErrorText } from './form_error_text'; From afd9db53934eb6961c285c2f5ded5c568acc70f7 Mon Sep 17 00:00:00 2001 From: Theo Date: Tue, 2 Apr 2019 13:45:18 +0100 Subject: [PATCH 08/11] Converted `EuiTableHeaderMobile` to TS + tests --- .../form_error_text/form_error_text.test.tsx | 15 +++++++++++ ...snap => table_header_mobile.test.tsx.snap} | 0 src/components/table/mobile/index.d.ts | 1 + .../table/mobile/table_header_mobile.js | 25 ------------------- ...e.test.js => table_header_mobile.test.tsx} | 7 ++---- .../table/mobile/table_header_mobile.tsx | 15 +++++++++++ 6 files changed, 33 insertions(+), 30 deletions(-) create mode 100644 src/components/form/form_error_text/form_error_text.test.tsx rename src/components/table/mobile/__snapshots__/{table_header_mobile.test.js.snap => table_header_mobile.test.tsx.snap} (100%) create mode 100644 src/components/table/mobile/index.d.ts delete mode 100644 src/components/table/mobile/table_header_mobile.js rename src/components/table/mobile/{table_header_mobile.test.js => table_header_mobile.test.tsx} (65%) create mode 100644 src/components/table/mobile/table_header_mobile.tsx diff --git a/src/components/form/form_error_text/form_error_text.test.tsx b/src/components/form/form_error_text/form_error_text.test.tsx new file mode 100644 index 00000000000..0232ad6ee04 --- /dev/null +++ b/src/components/form/form_error_text/form_error_text.test.tsx @@ -0,0 +1,15 @@ +import React from 'react'; +import { render } from 'enzyme'; +import { requiredProps } from '../../../test'; + +import { EuiFormErrorText } from './form_error_text'; + +describe('EuiFormErrorText', () => { + test('is rendered', () => { + const component = render( + This is an error. + ); + + expect(component).toMatchSnapshot(); + }); +}); diff --git a/src/components/table/mobile/__snapshots__/table_header_mobile.test.js.snap b/src/components/table/mobile/__snapshots__/table_header_mobile.test.tsx.snap similarity index 100% rename from src/components/table/mobile/__snapshots__/table_header_mobile.test.js.snap rename to src/components/table/mobile/__snapshots__/table_header_mobile.test.tsx.snap diff --git a/src/components/table/mobile/index.d.ts b/src/components/table/mobile/index.d.ts new file mode 100644 index 00000000000..a54d79c7147 --- /dev/null +++ b/src/components/table/mobile/index.d.ts @@ -0,0 +1 @@ +export { EuiTableHeaderMobile } from './table_header_mobile'; diff --git a/src/components/table/mobile/table_header_mobile.js b/src/components/table/mobile/table_header_mobile.js deleted file mode 100644 index ac1d855fa47..00000000000 --- a/src/components/table/mobile/table_header_mobile.js +++ /dev/null @@ -1,25 +0,0 @@ -import React from 'react'; -import PropTypes from 'prop-types'; -import classNames from 'classnames'; - -export const EuiTableHeaderMobile = ({ - children, - className, - ...rest, -}) => { - const classes = classNames('euiTableHeaderMobile', className); - - return ( -
- {children} -
- ); -}; - -EuiTableHeaderMobile.propTypes = { - children: PropTypes.node, - className: PropTypes.string, -}; diff --git a/src/components/table/mobile/table_header_mobile.test.js b/src/components/table/mobile/table_header_mobile.test.tsx similarity index 65% rename from src/components/table/mobile/table_header_mobile.test.js rename to src/components/table/mobile/table_header_mobile.test.tsx index 1aa94791d96..c674d3ff8af 100644 --- a/src/components/table/mobile/table_header_mobile.test.js +++ b/src/components/table/mobile/table_header_mobile.test.tsx @@ -6,11 +6,8 @@ import { EuiTableHeaderMobile } from './table_header_mobile'; describe('EuiTableHeaderMobile', () => { test('is rendered', () => { - const component = render( - - ); + const component = render(); - expect(component) - .toMatchSnapshot(); + expect(component).toMatchSnapshot(); }); }); diff --git a/src/components/table/mobile/table_header_mobile.tsx b/src/components/table/mobile/table_header_mobile.tsx new file mode 100644 index 00000000000..ed0353c03b5 --- /dev/null +++ b/src/components/table/mobile/table_header_mobile.tsx @@ -0,0 +1,15 @@ +import React, { FunctionComponent, HTMLAttributes } from 'react'; +import classNames from 'classnames'; +import { CommonProps } from '../../common'; + +export const EuiTableHeaderMobile: FunctionComponent< + CommonProps & HTMLAttributes +> = ({ children, className, ...rest }) => { + const classes: string = classNames('euiTableHeaderMobile', className); + + return ( +
+ {children} +
+ ); +}; From 751e06bacde8a6a460ddda5e99904ed0e9288ca1 Mon Sep 17 00:00:00 2001 From: Theo Date: Tue, 2 Apr 2019 13:46:19 +0100 Subject: [PATCH 09/11] Updated Changelog --- CHANGELOG.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 90a2c8fb9be..b034fe32096 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,13 +1,10 @@ ## [`master`](https://github.com/elastic/eui/tree/master) - Converted `EuiFormErrorText` to TS ([#1772](https://github.com/elastic/eui/pull/1772)) -<<<<<<< HEAD **Bug fixes** Update ButtonIconColor type to provide all available options ([#1783](https://github.com/elastic/eui/pull/1783)) -======= ->>>>>>> Updated Changelog ## [`9.7.1`](https://github.com/elastic/eui/tree/v9.7.1) From 85fe8d95d3050c7ae51e975c37d28483d575f810 Mon Sep 17 00:00:00 2001 From: Theo Date: Tue, 2 Apr 2019 13:54:06 +0100 Subject: [PATCH 10/11] Updated Changelog entry for EuiTableHeaderMobile --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b034fe32096..b6bd20a08e6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ ## [`master`](https://github.com/elastic/eui/tree/master) +- Converted `EuiTableHeaderMobile` to TS ([#1786](https://github.com/elastic/eui/pull/1786)) - Converted `EuiFormErrorText` to TS ([#1772](https://github.com/elastic/eui/pull/1772)) **Bug fixes** From fa0b9d86e2e0a1b85d72275bc5364aa373342108 Mon Sep 17 00:00:00 2001 From: Theo Date: Wed, 3 Apr 2019 16:28:57 +0100 Subject: [PATCH 11/11] EuiTableHeaderMobile: Code review fixes --- src/components/table/index.d.ts | 1 + src/components/table/mobile/table_header_mobile.tsx | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/table/index.d.ts b/src/components/table/index.d.ts index 755818abd8b..47a2b97c4a7 100644 --- a/src/components/table/index.d.ts +++ b/src/components/table/index.d.ts @@ -1,4 +1,5 @@ /// +/// import { CommonProps, NoArgCallback } from '../common'; import { IconType } from '../icon'; import { HorizontalAlignment } from '../../services/alignment'; diff --git a/src/components/table/mobile/table_header_mobile.tsx b/src/components/table/mobile/table_header_mobile.tsx index ed0353c03b5..b43fee162b2 100644 --- a/src/components/table/mobile/table_header_mobile.tsx +++ b/src/components/table/mobile/table_header_mobile.tsx @@ -5,7 +5,7 @@ import { CommonProps } from '../../common'; export const EuiTableHeaderMobile: FunctionComponent< CommonProps & HTMLAttributes > = ({ children, className, ...rest }) => { - const classes: string = classNames('euiTableHeaderMobile', className); + const classes = classNames('euiTableHeaderMobile', className); return (