diff --git a/package.json b/package.json
index 7cf501588..36f66d77e 100644
--- a/package.json
+++ b/package.json
@@ -51,7 +51,7 @@
"react-virtualized-select": "^3.1.0",
"reduce-reducers": "^0.1.2",
"redux": "^3.7.2",
- "redux-form": "6.8.0",
+ "redux-form": "^7.2.3",
"reselect": "^3.0.1",
"screenfull": "^3.3.2",
"whatwg-fetch": "^2.0.3",
@@ -66,7 +66,7 @@
"@babel/preset-react": "^7.0.0-beta.34",
"akh": "^3.1.2",
"autoprefixer": "^7.2.4",
- "babel-eslint": "^8.1.2",
+ "babel-eslint": "^8.2.1",
"babel-loader": "8.0.0-beta.0",
"babel-plugin-syntax-dynamic-import": "^6.18.0",
"babel-plugin-transform-class-properties": "^6.24.1",
@@ -78,8 +78,8 @@
"css-loader": "^0.28.1",
"csv-loader": "^2.1.1",
"daggy": "^1.1.0",
- "eslint": "^4.14.0",
- "eslint-plugin-react": "^7.5.1",
+ "eslint": "^4.17.0",
+ "eslint-plugin-react": "^7.6.1",
"express": "^4.15.3",
"fantasy-combinators": "0.0.1",
"fantasy-land": "^3.3.0",
diff --git a/source/components/Simulateur.js b/source/components/Simulateur.js
index 5a8d852ea..d8ec3fd14 100644
--- a/source/components/Simulateur.js
+++ b/source/components/Simulateur.js
@@ -15,8 +15,6 @@ import {
import './conversation/conversation.css'
import './Simulateur.css'
import Conversation from './conversation/Conversation'
-import { getInputComponent } from 'Engine/generateQuestions'
-
import ReactPiwik from './Tracker'
import Results from 'Components/Results'
@@ -105,21 +103,10 @@ export default class extends Component {
diff --git a/source/components/conversation/Conversation.js b/source/components/conversation/Conversation.js
index d4fb6a852..dcb3821fe 100644
--- a/source/components/conversation/Conversation.js
+++ b/source/components/conversation/Conversation.js
@@ -1,10 +1,11 @@
import React, { Component } from 'react'
import { Trans, translate } from 'react-i18next'
-import { isEmpty } from 'ramda'
+import { isEmpty, map } from 'ramda'
import Aide from '../Aide'
-import Satisfaction from '../Satisfaction'
import { reduxForm } from 'redux-form'
import { scroller, Element } from 'react-scroll'
+import { getInputComponent } from 'Engine/generateQuestions'
+import Satisfaction from '../Satisfaction'
let scroll = () =>
scroller.scrollTo('myScrollToElement', {
@@ -29,10 +30,10 @@ export default class Conversation extends Component {
let {
foldedSteps,
currentQuestion,
+ parsedRules,
+ targetNames,
reinitalise,
- textColourOnWhite,
- done,
- nextSteps
+ textColourOnWhite
} = this.props
return (
@@ -42,13 +43,15 @@ export default class Conversation extends Component {
- {foldedSteps}
+ {map(
+ getInputComponent({ unfolded: false })(parsedRules, targetNames),
+ foldedSteps
+ )}
)}
@@ -57,13 +60,18 @@ export default class Conversation extends Component {
style={{
opacity: foldedSteps.length != 0 ? 1 : 0,
color: textColourOnWhite
- }}
- >
+ }}>
Modifier mes réponses
- {currentQuestion || }
+ {currentQuestion ? (
+ getInputComponent({ unfolded: true })(parsedRules, targetNames)(
+ currentQuestion
+ )
+ ) : (
+
+ )}
diff --git a/source/components/conversation/FormDecorator.js b/source/components/conversation/FormDecorator.js
index 9a047d1ec..02181e51d 100644
--- a/source/components/conversation/FormDecorator.js
+++ b/source/components/conversation/FormDecorator.js
@@ -23,8 +23,6 @@ export var FormDecorator = formType => RenderField =>
//... this helper directly to the redux state to avoid passing more props
state => ({
themeColours: state.themeColours,
- getCurrentInversion: dottedName =>
- formValueSelector('conversation')(state, 'inversions.' + dottedName),
situationGate: state.situationGate
}),
dispatch => ({