From 979d4def2e7bc57a7a2f261cdd1a460f899ddb8f Mon Sep 17 00:00:00 2001 From: Marcin Szamotulski Date: Thu, 18 May 2017 12:56:37 +0200 Subject: [PATCH 1/6] use create-react-class --- package.json | 3 ++- src/React.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index d6126cc..dc23084 100644 --- a/package.json +++ b/package.json @@ -2,6 +2,7 @@ "name": "purescript-react", "files": [], "peerDependencies": { - "react": "^0.14.3" + "react": "^15.5.4", + "create-react-class": "^15.5.3" } } diff --git a/src/React.js b/src/React.js index 52d3aa2..b4fee1e 100644 --- a/src/React.js +++ b/src/React.js @@ -2,6 +2,7 @@ "use strict"; var React = require("react"); +var createReactClass = require("create-react-class"); function getProps(this_) { return function(){ @@ -117,7 +118,7 @@ function createClass(spec) { } }; - return React.createClass(result); + return createReactClass(result); } exports.createClass = createClass; From d2188e9da3f9d8ee35580d89303b77d9175b20fa Mon Sep 17 00:00:00 2001 From: Marcin Szamotulski Date: Thu, 18 May 2017 12:56:54 +0200 Subject: [PATCH 2/6] Add node_modules to .gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 760bddf..da6c2f6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ .psci* bower_components/ +node_modules/ output/ .psc-package .psc-ide-port From d7fdebeee325cb22fe0ff2bc957babc947dbab73 Mon Sep 17 00:00:00 2001 From: Marcin Szamotulski Date: Fri, 23 Jun 2017 23:04:28 +0200 Subject: [PATCH 3/6] react-15: add events --- src/React/DOM/Props.purs | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/src/React/DOM/Props.purs b/src/React/DOM/Props.purs index 74136d6..aa8cb08 100644 --- a/src/React/DOM/Props.purs +++ b/src/React/DOM/Props.purs @@ -458,6 +458,30 @@ security = unsafeMkProps "security" unselectable :: Boolean -> Props unselectable = unsafeMkProps "unselectable" +onAnimationStart :: forall eff props state result. + (Event -> EventHandlerContext eff props state result) -> Props +onAnimationStart f = unsafeMkProps "onAnimationStart" (handle f) + +onAnimationEnd :: forall eff props state result. + (Event -> EventHandlerContext eff props state result) -> Props +onAnimationEnd f = unsafeMkProps "onAnimationEnd" (handle f) + +onAnimationIteration :: forall eff props state result. + (Event -> EventHandlerContext eff props state result) -> Props +onAnimationIteration f = unsafeMkProps "onAnimationIteration" (handle f) + +onTransitionStart :: forall eff props state result. + (Event -> EventHandlerContext eff props state result) -> Props +onTransitionStart f = unsafeMkProps "onTransitionStart" (handle f) + +onTransitionEnd :: forall eff props state result. + (Event -> EventHandlerContext eff props state result) -> Props +onTransitionEnd f = unsafeMkProps "onTransitionEnd" (handle f) + +onLoad :: forall eff props state result. + (Event -> EventHandlerContext eff props state result) -> Props +onLoad f = unsafeMkProps "onLoad" (handle f) + onCopy :: forall eff props state result. (Event -> EventHandlerContext eff props state result) -> Props onCopy f = unsafeMkProps "onCopy" (handle f) @@ -498,6 +522,10 @@ onInput :: forall eff props state result. (Event -> EventHandlerContext eff props state result) -> Props onInput f = unsafeMkProps "onInput" (handle f) +onInvalid :: forall eff props state result. + (Event -> EventHandlerContext eff props state result) -> Props +onInvalid f = unsafeMkProps "onInvalid" (handle f) + onSubmit :: forall eff props state result. (Event -> EventHandlerContext eff props state result) -> Props onSubmit f = unsafeMkProps "onSubmit" (handle f) From ab51970f51581ea6006abe8e8c571100dab0a593 Mon Sep 17 00:00:00 2001 From: Marcin Szamotulski Date: Fri, 23 Jun 2017 23:32:24 +0200 Subject: [PATCH 4/6] onTransitionStart is not supported --- src/React/DOM/Props.purs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/React/DOM/Props.purs b/src/React/DOM/Props.purs index aa8cb08..56f813b 100644 --- a/src/React/DOM/Props.purs +++ b/src/React/DOM/Props.purs @@ -470,10 +470,6 @@ onAnimationIteration :: forall eff props state result. (Event -> EventHandlerContext eff props state result) -> Props onAnimationIteration f = unsafeMkProps "onAnimationIteration" (handle f) -onTransitionStart :: forall eff props state result. - (Event -> EventHandlerContext eff props state result) -> Props -onTransitionStart f = unsafeMkProps "onTransitionStart" (handle f) - onTransitionEnd :: forall eff props state result. (Event -> EventHandlerContext eff props state result) -> Props onTransitionEnd f = unsafeMkProps "onTransitionEnd" (handle f) From eaecd3047ff6fd1c27b3dd90b874376cce54df05 Mon Sep 17 00:00:00 2001 From: Marcin Szamotulski Date: Fri, 23 Jun 2017 23:57:52 +0200 Subject: [PATCH 5/6] Add suppressContentEditableWarning prop. --- src/React/DOM/Props.purs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/React/DOM/Props.purs b/src/React/DOM/Props.purs index 56f813b..8bac25c 100644 --- a/src/React/DOM/Props.purs +++ b/src/React/DOM/Props.purs @@ -617,3 +617,6 @@ onScroll f = unsafeMkProps "onScroll" (handle f) onWheel :: forall eff props state result. (Event -> EventHandlerContext eff props state result) -> Props onWheel f = unsafeMkProps "onWheel" (handle f) + +suppressContentEditableWarning :: Boolean -> Props +suppressContentEditableWarning = unsafeMkProps "suppressContentEditableWarning" From 72fb942d36414b46307e051a97d783ac61e1dc33 Mon Sep 17 00:00:00 2001 From: Marcin Szamotulski Date: Sat, 24 Jun 2017 00:02:12 +0200 Subject: [PATCH 6/6] update package.json --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index dc23084..1e1b0fc 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "purescript-react", "files": [], "peerDependencies": { - "react": "^15.5.4", - "create-react-class": "^15.5.3" + "react": "^15.6.1", + "create-react-class": "^15.6.0" } }