From 5f2682cfe89dc80ac554903b088770cfc316b860 Mon Sep 17 00:00:00 2001 From: Chandler Prall Date: Mon, 14 Jan 2019 16:29:41 -0700 Subject: [PATCH 1/2] rollback @types versions for react & prop-types to support Kibana --- .../accessibility/keyboard_accessible.ts | 4 ++-- src/components/common.ts | 4 ++-- yarn.lock | 15 ++++++--------- 3 files changed, 10 insertions(+), 13 deletions(-) diff --git a/src/components/accessibility/keyboard_accessible.ts b/src/components/accessibility/keyboard_accessible.ts index 80fdd65f09e..9454c81581b 100644 --- a/src/components/accessibility/keyboard_accessible.ts +++ b/src/components/accessibility/keyboard_accessible.ts @@ -34,7 +34,7 @@ interface Props { } export class EuiKeyboardAccessible extends Component { - onKeyDown = (e: KeyboardEvent) => { + onKeyDown = (e: KeyboardEvent) => { // Prevent a scroll from occurring if the user has hit space. if (e.keyCode === keyCodes.SPACE) { e.preventDefault(); @@ -45,7 +45,7 @@ export class EuiKeyboardAccessible extends Component { } } - onKeyUp = (e: KeyboardEvent) => { + onKeyUp = (e: KeyboardEvent) => { // Support keyboard accessibility by emulating mouse click on ENTER or SPACE keypress. if (e.keyCode === keyCodes.ENTER || e.keyCode === keyCodes.SPACE) { // Delegate to the click handler on the element. diff --git a/src/components/common.ts b/src/components/common.ts index 2cb42f0d33d..25ddece0c92 100644 --- a/src/components/common.ts +++ b/src/components/common.ts @@ -1,4 +1,4 @@ -import { Component, FunctionComponent, SFC } from 'react'; +import { Component, SFC } from 'react'; export interface CommonProps { className?: string; @@ -22,7 +22,7 @@ export function keysOf(obj: T): K[] { export type PropsOf = C extends SFC ? SFCProps : - C extends FunctionComponent ? FunctionalProps : + // C extends FunctionComponent ? FunctionalProps : C extends Component ? ComponentProps : never; diff --git a/yarn.lock b/yarn.lock index cb50cec5d39..fd44dc3f2a4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -890,11 +890,9 @@ integrity sha512-ShHzHkYD+Ldw3eyttptCpUhF1/mkInWwasQkCNXZHOsJMJ/UMa8wXrxSrTJaVk0r4pLK/VnESVM0wFsfQzNEKQ== "@types/prop-types@*": - version "15.5.5" - resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.5.5.tgz#17038dd322c2325f5da650a94d5f9974943625e3" - integrity sha512-mOrlCEdwX3seT3n0AXNt4KNPAZZxcsABUHwBgFXOt+nvFUXkxCAO6UBJHPrDxWEa2KDMil86355fjo8jbZ+K0Q== - dependencies: - "@types/react" "*" + version "15.5.3" + resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.5.3.tgz#bef071852dca2a2dbb65fecdb7bfb30cedae2de2" + integrity sha512-sfjHrNF4zWRv3fJUGyZW46wVxhYJ/GeWIPdKxbnLIhY3bWR0Ncl2kIhZI7rpjY9KtUQAkDP8jWEmaGQGFFvruA== "@types/react-virtualized@^9.18.6": version "9.18.6" @@ -905,11 +903,10 @@ "@types/react" "*" "@types/react@*", "@types/react@^16.3.0": - version "16.7.12" - resolved "https://registry.yarnpkg.com/@types/react/-/react-16.7.12.tgz#6ed680cdbd42aa14ddb550237de91787ec8445b4" - integrity sha512-xIO8Eq7EtDHBBY86W7uyaT2rlmDb8NBVwKn0/9pa2rQMrTCebwn2NJmrxxlWQD6qC5DVQtGwAm3Zt0xZNCRwGg== + version "16.3.14" + resolved "https://registry.yarnpkg.com/@types/react/-/react-16.3.14.tgz#f90ac6834de172e13ecca430dcb6814744225d36" + integrity sha512-wNUGm49fPl7eE2fnYdF0v5vSOrUMdKMQD/4NwtQRnb6mnPwtkhabmuFz37eq90+hhyfz0pWd38jkZHOcaZ6LGw== dependencies: - "@types/prop-types" "*" csstype "^2.2.0" "@types/uuid@^3.4.4": From 62f9d36aeab9fac27ec87471153247c768304df7 Mon Sep 17 00:00:00 2001 From: Chandler Prall Date: Mon, 14 Jan 2019 17:45:25 -0700 Subject: [PATCH 2/2] changelog --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 953d5ac71c8..560f419f059 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,8 @@ ## [`master`](https://github.com/elastic/eui/tree/master) -No public interface changes since `6.3.0`. +**Bug fixes** + +- Downgraded `@types/react` and `@types/prop-types` verisons to align with Kibana ([#1435](https://github.com/elastic/eui/pull/1435)) ## [`6.3.0`](https://github.com/elastic/eui/tree/v6.3.0)