2018-02-28 16:45:13 +00:00
|
|
|
import React, { Component } from 'react'
|
2018-06-06 16:17:13 +00:00
|
|
|
import { connect } from 'react-redux'
|
2018-06-29 16:14:00 +00:00
|
|
|
import {
|
|
|
|
noUserInputSelector,
|
|
|
|
analysisWithDefaultsSelector
|
|
|
|
} from 'Selectors/analyseSelectors'
|
2018-03-01 18:07:40 +00:00
|
|
|
import Conversation from './conversation/Conversation'
|
2018-03-15 14:51:39 +00:00
|
|
|
import FoldedSteps, { GoToAnswers } from './conversation/FoldedSteps'
|
2018-04-26 15:30:51 +00:00
|
|
|
import GoToExplanations from './GoToExplanations'
|
2018-06-18 09:54:18 +00:00
|
|
|
import ProgressTip from './ProgressTip'
|
|
|
|
import ResultView from './ResultView/ResultView'
|
|
|
|
import './Simu.css'
|
2018-05-02 15:55:25 +00:00
|
|
|
import Sondage from './Sondage'
|
2018-06-18 09:54:18 +00:00
|
|
|
import TargetSelection from './TargetSelection'
|
|
|
|
import withColours from './withColours'
|
2018-06-06 16:17:13 +00:00
|
|
|
|
2018-02-28 16:45:13 +00:00
|
|
|
@withColours
|
2018-06-06 16:17:13 +00:00
|
|
|
@connect(state => ({
|
2018-06-15 18:09:43 +00:00
|
|
|
noUserInput: noUserInputSelector(state),
|
2018-06-29 16:14:00 +00:00
|
|
|
analysis: analysisWithDefaultsSelector(state),
|
2018-06-06 16:17:13 +00:00
|
|
|
conversationStarted: state.conversationStarted
|
|
|
|
}))
|
2018-06-12 10:21:36 +00:00
|
|
|
export default class Simu extends Component {
|
2018-02-28 16:45:13 +00:00
|
|
|
render() {
|
2018-06-29 16:14:00 +00:00
|
|
|
let {
|
|
|
|
colours,
|
|
|
|
conversationStarted,
|
|
|
|
noUserInput,
|
|
|
|
analysis: { blockingInputControls }
|
|
|
|
} = this.props
|
2018-03-01 18:07:40 +00:00
|
|
|
|
2018-02-28 16:45:13 +00:00
|
|
|
return (
|
2018-04-05 17:53:01 +00:00
|
|
|
<div id="simu">
|
2018-03-15 14:51:39 +00:00
|
|
|
<div id="focusZone">
|
2018-06-11 15:59:50 +00:00
|
|
|
<FoldedSteps />
|
2018-06-15 18:09:43 +00:00
|
|
|
<GoToAnswers />
|
2018-03-22 16:41:45 +00:00
|
|
|
<TargetSelection colours={colours} />
|
2018-06-06 16:17:13 +00:00
|
|
|
{conversationStarted && (
|
2018-06-11 14:55:30 +00:00
|
|
|
<>
|
|
|
|
<ProgressTip />
|
|
|
|
<Conversation textColourOnWhite={colours.textColourOnWhite} />
|
|
|
|
</>
|
2018-06-06 16:17:13 +00:00
|
|
|
)}
|
2018-06-29 16:14:00 +00:00
|
|
|
{!noUserInput && !blockingInputControls && <GoToExplanations />}
|
2018-03-15 14:51:39 +00:00
|
|
|
</div>
|
2018-06-29 16:14:00 +00:00
|
|
|
{!noUserInput && !blockingInputControls && <ResultView />}
|
|
|
|
{!blockingInputControls && <Sondage />}
|
2018-04-05 17:53:01 +00:00
|
|
|
</div>
|
2018-02-28 16:45:13 +00:00
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|