From 8ce312b908c3b82d9ad893b0ba0ac93e16837bd6 Mon Sep 17 00:00:00 2001 From: fsubal Date: Mon, 28 May 2018 15:23:49 +0900 Subject: [PATCH 1/6] [react-rnd] mistakenly typed enableResizing --- types/react-rnd/index.d.ts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/types/react-rnd/index.d.ts b/types/react-rnd/index.d.ts index 9164b409ce..2adf0c83fa 100644 --- a/types/react-rnd/index.d.ts +++ b/types/react-rnd/index.d.ts @@ -18,6 +18,17 @@ declare namespace Rnd { | 'topLeft' | 'topRight'; + export type Enable = { + bottom?: boolean; + bottomLeft?: boolean; + bottomRight?: boolean; + left?: boolean; + right?: boolean; + top?: boolean; + topLeft?: boolean; + topRight?: boolean; + } + interface HandleClasses { bottom?: string; bottomLeft?: string; @@ -90,7 +101,7 @@ declare namespace Rnd { resizeHandleStyles: HandleStyles; lockAspectRatio: boolean; - enableResizing: boolean; + enableResizing?: Enable; onResizeStart: () => void; onResize: () => void; From 4ed668e5cd3c8febed0532a83e1fa9a9ccf15ecd Mon Sep 17 00:00:00 2001 From: fsubal Date: Mon, 28 May 2018 15:33:27 +0900 Subject: [PATCH 2/6] [react-rnd] Added disableDragging? --- types/react-rnd/index.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/types/react-rnd/index.d.ts b/types/react-rnd/index.d.ts index 2adf0c83fa..d2e7b6ea8c 100644 --- a/types/react-rnd/index.d.ts +++ b/types/react-rnd/index.d.ts @@ -102,6 +102,7 @@ declare namespace Rnd { lockAspectRatio: boolean; enableResizing?: Enable; + disableDragging?: boolean onResizeStart: () => void; onResize: () => void; From d779472585a2f75dfc9d78b404cb02c6d097e776 Mon Sep 17 00:00:00 2001 From: fsubal Date: Mon, 28 May 2018 15:49:53 +0900 Subject: [PATCH 3/6] [react-rnd] add "Definitions by" --- types/react-rnd/index.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/types/react-rnd/index.d.ts b/types/react-rnd/index.d.ts index d2e7b6ea8c..11af9b121c 100644 --- a/types/react-rnd/index.d.ts +++ b/types/react-rnd/index.d.ts @@ -1,6 +1,7 @@ // Type definitions for react-rnd 7.3 // Project: https://github.com/bokuweb/react-rnd // Definitions by: Ragg +// fsubal // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.6 import React = require('react'); From e2780102746f457788d298cd0f082541b3472855 Mon Sep 17 00:00:00 2001 From: subal f Date: Mon, 28 May 2018 15:55:05 +0900 Subject: [PATCH 4/6] [react-rnd] fix test --- types/react-rnd/react-rnd-tests.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/types/react-rnd/react-rnd-tests.tsx b/types/react-rnd/react-rnd-tests.tsx index ee434117fe..9f1cbc593c 100644 --- a/types/react-rnd/react-rnd-tests.tsx +++ b/types/react-rnd/react-rnd-tests.tsx @@ -13,7 +13,13 @@ const onResize: Rnd.ResizeHandler = (e, direction, ref, delta, position) => { className="class" lockAspectRatio maxWidth={100} - enableResizing={false} + enableResizing={{ + bottom: true, + bottomLeft: true, + bottomRight: false, + left: false + }} + disableDragging={false} resizeHandleStyles={{ top: { background: '#000' } }} From b70cdb2113c06031610f873eb407e009e381c8d7 Mon Sep 17 00:00:00 2001 From: subal f Date: Mon, 28 May 2018 15:57:38 +0900 Subject: [PATCH 5/6] [react-rnd] fix for 'npm run lint react-rnd' --- types/react-rnd/index.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/types/react-rnd/index.d.ts b/types/react-rnd/index.d.ts index 11af9b121c..27876914c6 100644 --- a/types/react-rnd/index.d.ts +++ b/types/react-rnd/index.d.ts @@ -19,7 +19,7 @@ declare namespace Rnd { | 'topLeft' | 'topRight'; - export type Enable = { + interface Enable { bottom?: boolean; bottomLeft?: boolean; bottomRight?: boolean; @@ -29,7 +29,7 @@ declare namespace Rnd { topLeft?: boolean; topRight?: boolean; } - + interface HandleClasses { bottom?: string; bottomLeft?: string; @@ -103,7 +103,7 @@ declare namespace Rnd { lockAspectRatio: boolean; enableResizing?: Enable; - disableDragging?: boolean + disableDragging?: boolean; onResizeStart: () => void; onResize: () => void; From 8bd9f3e3cadef5ca1d6726c281fbc374c4297466 Mon Sep 17 00:00:00 2001 From: subal f Date: Mon, 28 May 2018 16:09:02 +0900 Subject: [PATCH 6/6] [react-rnd] now it has 7.4 --- types/react-rnd/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/react-rnd/index.d.ts b/types/react-rnd/index.d.ts index 27876914c6..31d477ca5e 100644 --- a/types/react-rnd/index.d.ts +++ b/types/react-rnd/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for react-rnd 7.3 +// Type definitions for react-rnd 7.4 // Project: https://github.com/bokuweb/react-rnd // Definitions by: Ragg // fsubal