{"version":3,"sources":["history.js","reducers/types.ts","reducers/settings.ts","reducers/category.ts","reducers/answer.ts","reducers/external.ts","reducers/result.ts","reducers/index.ts","components/Header.tsx","components/Footer.tsx","actions/category.ts","components/FooterEnd.tsx","components/Settings.tsx","actions/settings.ts","components/ScoreBar.tsx","actions/answer.ts","components/ScaleRow.tsx","components/Statement.tsx","components/Category.jsx","containers/CategoriesList.tsx","containers/Quiz.tsx","components/PolarChart.jsx","containers/Results.tsx","actions/result.ts","containers/App.tsx","serviceWorker.js","index.tsx"],"names":["history","createBrowserHistory","listen","_","window","scrollTo","console","log","TOGGLE_SOUND","TOGGLE_INFOS","FETCH_CATEGORIES","CHANGE_STEP","ADD_ANSWER","GET_ANSWERS","PARSE_RESULTS","LOAD_ANSWERS","initialState","sound","infos","reducer","state","arguments","length","undefined","type","_objectSpread","lang","perStep","currentStep","maxStep","categories","activeCategories","action","localStorage","setItem","JSON","stringify","payload","category_objectSpread","slice","nextStep","maxCat","minCat","filter","answers","newAnswers","array","concat","insertItem","item","statement","removeItem","answer_objectSpread","results","result_objectSpread","stateAnswers","stateCategories","data","forEach","category","result","name","subcategories","children","subcategory","total","statements","stmt","answer","a","id","push","count","score","Math","round","parseResults","rootReducers","combineReducers","settings","settingsReducer","categoryReducer","answerReducer","external","externalReducer","resultReducer","store","createStore","applyMiddleware","reduxThunk","subscribe","Header","react_default","createElement","className","react_router_dom","to","Component","Footer","way","this","props","changeStep","_this","_this$props","Fragment","onClick","connect","dispatch","_ref2","Object","asyncToGenerator","regenerator_default","mark","_callee2","wrap","_context2","prev","next","abrupt","stop","_x2","apply","categoryActions","FooterEnd","href","target","rel","src","width","Settings","toggleSound","toggleInfos","_this2","_this$props$settings","alt","_ref","_callee","_context","_x","ScoreBar","classCallCheck","possibleConstructorReturn","getPrototypeOf","call","emoji1","emoji2","emoji3","emoji4","parseAnswers","oneAnswers","twoAnswers","threeAnswers","fourAnswers","animateEmoji","one","current","two","three","four","setState","React","createRef","loadAnswers","newProps","element","newScore","img","classList","add","setTimeout","remove","ref","storage","getItem","parse","ScaleRow","addAnswer","value","selected","statementId","popSound","getClassName","foundIndex","findIndex","x","Audio","play","answerActions","Statement","checkIsAnswered","isAnswered","components_ScaleRow","Category","key","map","components_Statement","CategoriesList","printCategory","i","components_Category","fetchCategories","response","fetch","then","r","json","sent","t0","Error","Quiz","Header_Header","components_Settings","components_ScoreBar","containers_CategoriesList","components_Footer","components_FooterEnd","PolarChart","forceUpdate","node","d","Chart","datasets","s","backgroundColor","labels","options","scale","ticks","min","max","tooltips","callbacks","label","tooltipItem","datasetIndex","index","style","height","Results","random","components_PolarChart","loadedAnswers","cat","resultActions","App","react_router","exact","path","component","withRouter","Boolean","location","hostname","match","content","es","containers_App","ReactDOM","render","document","getElementById","navigator","serviceWorker","ready","registration","unregister"],"mappings":"6MAEMA,EAAUC,cAEhBD,EAAQE,OAAO,SAAAC,GACbC,OAAOC,SAAS,EAAG,KAGrBC,QAAQC,IAAI,oTAEGP,uCCVFQ,EAAe,eACfC,EAAe,eACfC,EAAmB,mBACnBC,EAAc,cAGdC,EAAa,aACbC,EAAc,cACdC,EAAgB,gBAChBC,EAAe,kkBCH5B,IAAMC,EAA8B,CAClCC,OAAO,EACPC,OAAO,GAGF,SAASC,IAA0D,IAAlDC,EAAkDC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAA1CL,EAC9B,QADwEK,UAAAC,OAAA,EAAAD,UAAA,QAAAE,GACzDC,MACb,KAAKhB,EACH,OAAAiB,EAAA,GACKL,EADL,CAEEH,OAAQG,EAAMH,QAElB,KAAKR,EACH,OAAAgB,EAAA,GACKL,EADL,CAEEF,OAAQE,EAAMF,QAElB,QACE,OAAOE,sjBCjBb,IAAMJ,EAAgC,CACpCU,KAAM,KACNC,QAAS,EACTC,YAAa,EACbC,QAAS,EACTC,WAAY,GACZC,iBAAkB,IAGb,SAASZ,IAA4D,IAApDC,EAAoDC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,G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GD6GuD+N,CAA2BtN,EAAYc,OAG3G+D,CAA6CoI,IE/HtDM,oLAEE,OACIzJ,EAAAvB,EAAAwB,cAACD,EAAAvB,EAAMoC,SAAP,KACIb,EAAAvB,EAAAwB,cAACyJ,EAAA,EAAD,KACI1J,EAAAvB,EAAAwB,cAACyJ,EAAA,EAAD,CAAOC,OAAK,EAACC,KAAK,IAAIC,UAAYvC,KAClCtH,EAAAvB,EAAAwB,cAACyJ,EAAA,EAAD,CAAOC,OAAK,EAACC,KAAK,aAAaC,UAAYV,cAN7C9E,IAAMhE,WAaTyJ,eAAWL,ICNNM,QACW,cAA7BvP,OAAOwP,SAASC,UAEe,UAA7BzP,OAAOwP,SAASC,UAEhBzP,OAAOwP,SAASC,SAASC,MACvB,2DCRN,IAAMC,GACFnK,EAAAvB,EAAAwB,cAACmK,EAAA,EAAD,CAAU1K,MAAOA,GACbM,EAAAvB,EAAAwB,cAAA,QAAMvB,GAAG,kBACLsB,EAAAvB,EAAAwB,cAACE,EAAA,EAAD,CAAY/F,QAASA,GACjB4F,EAAAvB,EAAAwB,cAACoK,GAAD,SAMhBC,IAASC,OAAOJ,GAASK,SAASC,eAAe,UD6G3C,kBAAmBC,WACrBA,UAAUC,cAAcC,MAAM5D,KAAK,SAAA6D,GACjCA,EAAaC","file":"static/js/main.6ab740bb.chunk.js","sourcesContent":["import { createBrowserHistory } from 'history';\n\nconst history = createBrowserHistory();\n\nhistory.listen(_ => {\n window.scrollTo(0, 0)\n});\n\nconsole.log(' _____ ___ _ \\n / ____|__ \\\\ (_) \\n| | ) |__ _ _ _ _ ____ \\n| | / // _` | | | | |_ / \\n| |____ / /| (_| | |_| | |/ / \\n \\\\_____|____\\\\__, |\\\\__,_|_/___| \\n | | \\n |_| \\n\\nPierre Duverneix - Fondation UNIT 2019');\n\nexport default history;","export const TOGGLE_SOUND = 'TOGGLE_SOUND';\nexport const TOGGLE_INFOS = 'TOGGLE_INFOS';\nexport const FETCH_CATEGORIES = 'FETCH_CATEGORIES';\nexport const CHANGE_STEP = 'CHANGE_STEP';\nexport const SET_ANSWERS_STATE = 'SET_ANSWERS_STATE';\nexport const IS_ANSWERED = 'IS_ANSWERED';\nexport const ADD_ANSWER = 'ADD_ANSWER';\nexport const GET_ANSWERS = 'GET_ANSWERS';\nexport const PARSE_RESULTS = 'PARSE_RESULTS';\nexport const LOAD_ANSWERS = 'LOAD_ANSWERS';","import { TSettingsData } from '../common/types';\nimport { \n TOGGLE_SOUND, TOGGLE_INFOS\n} from './types';\n\n\nconst initialState: TSettingsData = {\n sound: true,\n infos: true\n};\n\nexport function reducer(state = initialState, action: any): TSettingsData {\n switch (action.type) {\n case TOGGLE_SOUND:\n return { \n ...state, \n sound: !state.sound\n };\n case TOGGLE_INFOS:\n return {\n ...state,\n infos: !state.infos\n }\n default:\n return state;\n }\n}\n\nexport default reducer;","import { TCategoriesData } from '../common/types';\nimport { \n FETCH_CATEGORIES,\n CHANGE_STEP\n} from './types';\n\n\nconst initialState: TCategoriesData = {\n lang: 'en',\n perStep: 1,\n currentStep: 1,\n maxStep: 1,\n categories: [],\n activeCategories: []\n};\n\nexport function reducer(state = initialState, action: any): TCategoriesData {\n switch (action.type) {\n case FETCH_CATEGORIES:\n localStorage.setItem('c2-categories', JSON.stringify(action.payload));\n\n return { \n ...state, \n categories: action.payload,\n activeCategories: action.payload.slice(0, state.perStep),\n maxStep: action.payload.length\n }\n case CHANGE_STEP:\n const way = action.payload;\n const nextStep: number = way === \"up\" ? state.currentStep+1 : state.currentStep-1;\n const maxCat: number = nextStep;\n const minCat: number = maxCat-state.perStep;\n\n return {\n ...state,\n currentStep: nextStep,\n activeCategories: state.categories.slice(minCat, maxCat)\n }\n default:\n return state;\n }\n}\n\nexport default reducer;","import { TAnswersData } from '../common/types';\nimport { \n ADD_ANSWER,\n GET_ANSWERS\n} from './types';\n\n\nconst initialState: TAnswersData = {\n filter: null,\n answers: []\n};\n\nfunction insertItem(array: any, action: any) {\n let newArray = array.slice();\n return newArray.concat(action.payload);\n}\n\nfunction removeItem(array: any, action: any) {\n return array.filter((item: any) => item.statement !== action.payload.statement);\n}\n\nexport function reducer(state = initialState, action: any): TAnswersData {\n switch (action.type) {\n case ADD_ANSWER:\n let newAnswers: any = state.answers;\n newAnswers = removeItem(newAnswers, action);\n newAnswers = insertItem(newAnswers, action);\n localStorage.setItem('c2-answers', JSON.stringify(newAnswers));\n\n return { \n ...state, \n answers: newAnswers\n };\n case GET_ANSWERS:\n return {\n ...state,\n answers: action.payload\n }\n default:\n return state;\n }\n}\n\nexport default reducer;","import { TExternalData } from '../common/types';\n\nconst initialState: TExternalData = {};\n\nexport function reducer(state = initialState, action: any): TExternalData {\n switch (action.type) {\n default:\n return state;\n }\n}\n\nexport default reducer;","import { TResultsData } from '../common/types';\nimport { \n PARSE_RESULTS,\n LOAD_ANSWERS\n} from './types';\n\n\nconst initialState: TResultsData = {\n results: [],\n answers: [],\n categories: []\n};\n\nfunction parseResults(stateAnswers: any, stateCategories: any, data: any) {\n const answers = stateAnswers || data.answers;\n const categories = stateCategories || data.categories;\n let results: any = [];\n\n categories.forEach(category => {\n let result = { category: { name: category.name, subcategories: [{}] } };\n\n category.children.forEach((subcategory: any) => { \n let total = 0;\n\n subcategory.statements.forEach((stmt: any) => {\n const answer = answers.filter(a => a.statement === stmt.id);\n if (answer[0] && answer[0].answer > 0) {\n total = total + (answer[0].answer - 1);\n }\n });\n\n result.category.subcategories.push({ \n name: subcategory.name, \n count: subcategory.statements.length, \n total: total,\n score: Math.round((total / (subcategory.statements.length * 3)) * 100)\n });\n });\n\n results.push(result);\n });\n\n return results;\n}\n\nexport function reducer(state = initialState, action: any): TResultsData {\n switch (action.type) {\n case LOAD_ANSWERS:\n return {\n ...state,\n answers: action.payload.answers,\n categories: action.payload.categories,\n }\n case PARSE_RESULTS:\n const results = parseResults(state.answers, state.categories, action.payload);\n \n return {\n ...state,\n results: results\n }\n default:\n return state;\n }\n}\n\nexport default reducer;","import { combineReducers, Reducer } from 'redux';\nimport { createStore, applyMiddleware } from 'redux';\nimport reduxThunk from 'redux-thunk';\nimport { TApplicationState } from '../common/types';\nimport { reducer as settingsReducer } from './settings';\nimport { reducer as categoryReducer } from './category';\nimport { reducer as answerReducer } from './answer';\nimport { reducer as externalReducer } from './external';\nimport { reducer as resultReducer } from './result';\n\n\nexport const rootReducers: Reducer = combineReducers({\n settings: settingsReducer,\n category: categoryReducer,\n answer: answerReducer,\n external: externalReducer,\n result: resultReducer\n});\n\nexport const store = createStore(\n rootReducers, \n {},\n applyMiddleware(reduxThunk)\n);\n\nstore.subscribe(() => {});\n\nexport default rootReducers;","import React, { Component } from 'react';\nimport { NavLink } from 'react-router-dom';\n\nexport default class Header extends Component {\n render() {\n return (\n
\n
\n

\n \n C2 pour l'emploi\n \n

\n
\n
\n );\n }\n}","import React, { Component } from 'react';\nimport { connect } from 'react-redux';\nimport * as categoryActions from '../actions/category';\nimport { TAnswersData, TCategoriesData } from '../common/types';\nimport { NavLink } from 'react-router-dom';\n\ninterface IProps {\n changeStep: any;\n currentStep: number;\n maxStep: number;\n\n categories: TCategoriesData;\n answers: TAnswersData;\n};\n\ninterface IState {\n category: {\n currentStep: number;\n maxStep: number;\n categories: TCategoriesData;\n },\n answer: {\n answers: TAnswersData;\n }\n}\n\nclass Footer extends Component {\n changeStep(way: string) {\n this.props.changeStep(way);\n }\n\n render() {\n const { currentStep, maxStep } = this.props;\n return (\n \n
\n { currentStep && currentStep > 1\n ? \n : null\n }\n  \n { currentStep && currentStep < maxStep\n ? \n : null\n }\n  \n \n Résultats\n \n
\n
\n );\n }\n}\n\nconst mapStateToProps = (state: IState) => ({\n currentStep: state.category.currentStep,\n maxStep: state.category.maxStep,\n\n categories: state.category.categories,\n answers: state.answer.answers\n});\n\nconst mapDispatchToProps = (dispatch: any) => ({\n changeStep: (way: string) => dispatch(categoryActions.changeStep(way)),\n});\n\nexport default connect(mapStateToProps, mapDispatchToProps)(Footer);","/**\n * Fetch a JSON file from public directory.\n * @param {string} lang The JSON file lang.\n * @returns {Array} The JSON data structure.\n */\nexport const fetchCategories = (lang: string) => async (dispatch: any) => {\n try { \n const response = await fetch(`datasource/${lang}/statements.json`)\n .then(r => r.json())\n .then(json => {\n return json;\n });\n \n return dispatch({ type: 'FETCH_CATEGORIES', payload: response });\n } catch(error) {\n throw new Error(error);\n }\n};\n\n/**\n * Change the step of the survey.\n * @param {string} way up or down.\n * @returns {Array} The JSON data structure.\n */\nexport const changeStep = (way: string) => async (dispatch: any) => {\n window.scrollTo(0, 0);\n return dispatch({ type: 'CHANGE_STEP', payload: way });\n};","import React, { Component } from 'react';\n\nclass FooterEnd extends Component {\n render() {\n return(\n \n );\n }\n}\n\nexport default FooterEnd;","import React, { Component } from 'react';\nimport { connect } from 'react-redux';\nimport { TSettingsData } from '../common/types';\nimport * as settingsActions from '../actions/settings';\n\ninterface IProps {\n settings: TSettingsData;\n toggleSound: any;\n toggleInfos: any;\n}\n\ninterface IState {}\n\ninterface IRecipeState {\n settings: {\n sound: boolean;\n infos: boolean;\n perPage: number;\n }\n}\n\nclass Settings extends Component {\n toggleSound = () => {\n this.props.toggleSound();\n }\n\n toggleInfos = () => {\n this.props.toggleInfos();\n }\n\n render() {\n const { sound, infos } = this.props.settings;\n\n return(\n
\n
\n

Cet outil d’auto positionnement a été développé dans le cadre du projet \n C2 pour l’emploi \n qui s’appuie sur les résultats du projet européen eLene4work. \n C’est un questionnaire qui vous aidera à identifier vos points forts et ceux à améliorer \n concernant les soft skills (compétences comportementales) qui sont de plus en plus recherchées \n sur le marché du travail. Les soft skills évaluées dans cet outil sont celles décrites dans le  \n document de référence réalisé dans une phase précédente du projet.

\n

Pour chaque compétence vous allez trouver dans le questionnaire un certain nombre d’affirmations. \n Vous pouvez évaluer chacune d’elle à l’aide de l’échelle à droite allant de \"emoji \"pas du tout d’accord\" à \n \"emoji \"tout à fait d’accord\".

\n

Lorsque vous aurez évalué au moins une compétence vous pourrez accéder aux résultats. \n Pour obtenir un rapport complet, il faut évaluer toutes les compétences. Il y a une page \n par grande catégorie de compétences : compétences sociales, personnelles et méthodologiques.\n Pour passer d’une page à l’autre il faut utiliser les boutons Suite et Retour en bas de page.\n

\n \n
\n\n
\n \"\"\n this.toggleSound()} />\n
\n
\n );\n }\n}\n\nconst mapStateToProps = (state: IRecipeState) => ({\n settings: state.settings\n});\n\nconst mapDispatchToProps = (dispatch: any) => ({\n toggleSound: () => dispatch(settingsActions.toggleSound()),\n toggleInfos: () => dispatch(settingsActions.toggleInfos())\n});\n\nexport default connect(mapStateToProps, mapDispatchToProps)(Settings);","export const toggleSound = () => async (dispatch: any) => {\n return dispatch({ type: 'TOGGLE_SOUND' });\n};\n\nexport const toggleInfos = () => async (dispatch: any) => {\n return dispatch({ type: 'TOGGLE_INFOS' });\n}","import React, { Component } from 'react';\nimport { connect } from 'react-redux';\nimport { TAnswersData, TAnswerData } from '../common/types';\nimport * as answerActions from '../actions/answer';\n\ninterface IProps {\n answers: TAnswersData;\n loadAnswers: any;\n}\n\ninterface IRecipeState {\n answer: {\n answers: TAnswersData;\n }\n}\n\ninterface IState {\n score: {\n one: number;\n two: number;\n three: number;\n four: number;\n }\n}\n\nclass ScoreBar extends Component {\n private emoji1: React.RefObject;\n private emoji2: React.RefObject;\n private emoji3: React.RefObject;\n private emoji4: React.RefObject;\n\n constructor(props: IProps) {\n super(props);\n this.state = {\n score: {\n one: 0,\n two: 0,\n three: 0,\n four: 0\n }\n };\n this.emoji1 = React.createRef();\n this.emoji2 = React.createRef();\n this.emoji3 = React.createRef();\n this.emoji4 = React.createRef();\n }\n\n componentDidMount() {\n this.props.loadAnswers();\n }\n\n UNSAFE_componentWillReceiveProps(newProps: any) {\n if (newProps.answers) {\n this.parseAnswers(newProps.answers);\n }\n }\n\n parseAnswers = (answers: TAnswersData) => {\n const score = this.state.score;\n const oneAnswers = answers.filter((answer: TAnswerData) => { return answer.answer === 1; });\n const twoAnswers = answers.filter((answer: TAnswerData) => { return answer.answer === 2; });\n const threeAnswers = answers.filter((answer: TAnswerData) => { return answer.answer === 3; });\n const fourAnswers = answers.filter((answer: TAnswerData) => { return answer.answer === 4; });\n \n this.animateEmoji(oneAnswers, score.one, this.emoji1.current);\n this.animateEmoji(twoAnswers, score.two, this.emoji2.current);\n this.animateEmoji(threeAnswers, score.three, this.emoji3.current);\n this.animateEmoji(fourAnswers, score.four, this.emoji4.current);\n\n this.setState({\n score: {\n one: oneAnswers.length,\n two: twoAnswers.length,\n three: threeAnswers.length,\n four: fourAnswers.length\n }\n });\n }\n\n animateEmoji(answers: Array, score: number, element: HTMLInputElement | null) {\n const newScore = answers.length;\n if (element) {\n if (newScore > score) {\n const img = element.children[0];\n img.classList.add('wobble');\n setTimeout(function() {\n img.classList.remove('wobble');\n }, 1000);\n }\n }\n }\n\n render() {\n return(\n
\n \n \n \"emoji\n \n \n { this.state.score.one }\n \n \n \n \n \"emoji\n \n \n { this.state.score.two }\n \n \n \n \n \"emoji\n \n \n { this.state.score.three }\n \n \n \n \n \"emoji\n \n \n { this.state.score.four }\n \n \n
\n );\n }\n}\n\nconst mapStateToProps = (state: IRecipeState) => ({\n answers: state.answer.answers\n});\n\nconst mapDispatchToProps = (dispatch: any) => ({\n loadAnswers: () => dispatch(answerActions.getAnswers())\n});\n\nexport default connect(mapStateToProps, mapDispatchToProps)(ScoreBar);","export const addAnswer = (value: number) => async (dispatch: any) => {\n return dispatch({ type: 'ADD_ANSWER', payload: value });\n};\n\nexport const getAnswers = () => async (dispatch: any) => {\n const storage = localStorage.getItem('c2-answers');\n let answers = [];\n\n if (storage != null) {\n answers = JSON.parse(storage || \"\");\n }\n\n return dispatch({ type: 'GET_ANSWERS', payload: answers });\n};","import React, { Component } from 'react';\nimport { connect } from 'react-redux';\nimport { TAnswersData, TSettingsData } from '../common/types';\nimport * as answerActions from '../actions/answer';\n\ninterface IProps {\n statementId: number;\n settings: TSettingsData;\n answers: any;\n addAnswer: any;\n}\n\ninterface IState {\n settings: {\n sound: boolean;\n infos: boolean;\n perPage: number;\n };\n answer: {\n answers: TAnswersData;\n };\n}\n\ninterface IRecipeState {\n selected: number;\n}\n\nclass ScaleRow extends Component {\n constructor(props: IProps) {\n super(props);\n this.state = {\n selected: 0\n }\n }\n\n popSound() {\n const soundEnabled = this.props.settings.sound;\n if (soundEnabled) {\n const audio = new Audio('../audios/notification.m4a');\n audio.play();\n return true;\n }\n return false;\n }\n\n addAnswer = (value: number) => {\n this.setState({ selected: value });\n if (this.props.addAnswer({ statement: this.props.statementId, answer: value })) {\n this.popSound();\n }\n }\n\n getClassName = (id: number) => {\n const answers = this.props.answers;\n if (this.state.selected === id) {\n return `scale-cell scale-${id} selected`;\n } else {\n const foundIndex = answers.findIndex((x: any) => x.statement === this.props.statementId);\n if (foundIndex > -1) {\n if (answers[foundIndex].answer === id) {\n return `scale-cell scale-${id} selected`;\n }\n }\n }\n return `scale-cell scale-${id}`;\n }\n\n render() {\n return (\n
\n this.addAnswer(1) } >\n \"emoji\n \n this.addAnswer(2) } >\n \"emoji\n \n this.addAnswer(3) } >\n \"emoji\n \n this.addAnswer(4) } >\n \"emoji\n \n
\n );\n }\n}\n\n\nconst mapStateToProps = (state: IState) => ({\n settings: state.settings,\n answers: state.answer.answers\n});\n\nconst mapDispatchToProps = (dispatch: any) => ({\n addAnswer: (value: number) => dispatch(answerActions.addAnswer(value))\n});\n\nexport default connect(mapStateToProps, mapDispatchToProps)(ScaleRow);","import React, { Component } from 'react';\nimport { connect } from 'react-redux';\nimport ScaleRow from './ScaleRow';\nimport { TStatementData, TAnswersData } from '../common/types';\n\n\ninterface IProps {\n key: number;\n statement: TStatementData;\n getAnswers: any;\n answers: TAnswersData;\n}\n\ninterface IRecipeState {\n answer: {\n answers: TAnswersData;\n }\n}\n\ninterface IState {\n isAnswered: boolean;\n}\n\nclass Statement extends Component {\n constructor(props: IProps) {\n super(props);\n this.state = {\n isAnswered: false\n };\n }\n\n componentDidMount() {\n const answers = this.props.answers;\n if (answers) {\n this.checkIsAnswered(answers);\n }\n }\n\n UNSAFE_componentWillReceiveProps(newProps: any) {\n if (newProps.answers) {\n this.checkIsAnswered(newProps.answers);\n }\n }\n\n checkIsAnswered = (answers: any) => {\n const foundIndex = answers.findIndex((x: any) => x.statement === this.props.statement.id);\n if (foundIndex > -1) {\n this.setState({ isAnswered: true });\n }\n }\n\n render() {\n return(\n
\n
\n {this.props.statement.name}\n
\n
\n \n
\n
\n );\n }\n}\n\nconst mapStateToProps = (state: IRecipeState) => ({\n answers: state.answer.answers\n});\n\nexport default connect(mapStateToProps, null)(Statement);","import React, { Component } from 'react';\nimport Statement from './Statement';\n\nclass Category extends Component { \n render() {\n const data = this.props.category;\n\n return (\n
\n { data.children\n ?

{data.name}

\n :

{data.name}

\n }\n { data.children &&\n data.children.map((category) => {\n return ( );\n })\n }\n { data.statements &&\n data.statements.map((stmt) => {\n return ( );\n })\n }\n
\n );\n }\n}\n\nexport default Category;","import React, { Component } from 'react';\nimport Category from '../components/Category.jsx';\nimport { TCategoryData } from '../common/types';\nimport { connect } from 'react-redux';\nimport * as categoryActions from '../actions/category';\n\ninterface IProps {\n currentStep: number;\n activeCategories?: Array;\n category?: TCategoryData;\n fetchCategories: any;\n}\n \ninterface IState {\n category: {\n currentStep: number;\n activeCategories: Array;\n };\n}\n\nclass CategoriesList extends Component {\n componentDidMount() {\n this.props.fetchCategories('en');\n }\n\n printCategory = (category: TCategoryData, i: number) => {\n return (\n \n )\n }\n\n render() {\n return(\n
\n { this.props.activeCategories &&\n this.props.activeCategories.map((category, i) => {\n return( this.printCategory(category, i) )\n })\n }\n
\n );\n }\n}\n\nconst mapStateToProps = (state: IState) => ({\n activeCategories: state.category.activeCategories,\n currentStep: state.category.currentStep\n});\n\nconst mapDispatchToProps = (dispatch: any) => ({\n fetchCategories: (lang: string) => dispatch(categoryActions.fetchCategories(lang))\n});\n\nexport default connect(mapStateToProps, mapDispatchToProps)(CategoriesList);","import React, { Component } from 'react';\nimport Header from '../components/Header';\nimport Footer from '../components/Footer';\nimport FooterEnd from '../components/FooterEnd';\nimport Settings from '../components/Settings';\nimport ScoreBar from '../components/ScoreBar';\nimport CategoriesList from './CategoriesList';\n\nclass Quiz extends Component {\n render() {\n return (\n
\n
\n
\n \n \n \n
\n
\n \n
\n );\n }\n}\n\nexport default Quiz;","import React, { Component } from 'react';\nimport Chart from 'chart.js';\n\nclass PolarChart extends Component {\n componentDidMount() {\n this.forceUpdate();\n\n const data = this.props.data;\n const node = this.node;\n const colors = [\n \"#36a2eb\",\n \"#ffcd56\",\n \"#ff6384\",\n \"#4bc0c0\"\n ]\n\n const subcategories = data.filter(d => {\n if (d.name != null) {\n return d;\n }\n });\n \n new Chart(node, {\n type: 'polarArea',\n data: {\n datasets: [\n {\n data: subcategories.map(s => s.score),\n backgroundColor: colors.slice(0, subcategories.length)\n }\n ], \n labels: subcategories.map(s => s.name)\n },\n options: {\n scale: {\n ticks: {\n min: 0,\n max: 100\n }\n },\n tooltips: {\n callbacks: {\n label: function(tooltipItem, data) {\n var label = data.datasets[tooltipItem.datasetIndex].label || '';\n if (label) {\n label += ': ';\n }\n var dataset = data.datasets[tooltipItem.datasetIndex];\n var currentValue = dataset.data[tooltipItem.index];\n return label + currentValue + \"%\";\n }\n }\n } \n }\n });\n }\n\n render() {\n return (\n
\n (this.node = node)}\n />\n
\n );\n }\n}\n\nexport default PolarChart;\n","import React, { Component } from 'react';\nimport { connect } from 'react-redux';\nimport Header from '../components/Header';\nimport PolarChart from '../components/PolarChart';\nimport FooterEnd from '../components/FooterEnd';\nimport { NavLink } from 'react-router-dom';\nimport { TAnswersData, TCategoriesData, TResultsData } from '../common/types';\nimport * as resultActions from '../actions/result';\n\ninterface IProps {\n categories: TCategoriesData;\n answers: TAnswersData;\n loadAnswers: any;\n parseResults: any;\n results: TResultsData[] | any;\n loadedAnswers: TAnswersData | any;\n};\n\ninterface IState {\n category: {\n categories: TCategoriesData;\n },\n answer: {\n answers: TAnswersData;\n },\n result: {\n results: TResultsData;\n answers: TAnswersData;\n }\n}\n\ninterface ILocalState {\n key: number;\n}\n\nclass Results extends Component {\n constructor(props: IProps) {\n super(props);\n this.state = {\n key: Math.random()\n }\n }\n\n componentDidMount() {\n this.setState({ key: Math.random() });\n this.props.loadAnswers();\n this.props.parseResults(this.props.categories, this.props.answers);\n }\n\n printCategory(data: any) {\n if (data) {\n return (\n
\n

{ data.name }

\n
\n
\n
    \n { data.subcategories && data.subcategories.map((s, i) => {\n return ( s.name \n ?
  • \n { s.name }\n { s.score }%\n
  • \n : null\n )\n })}\n
\n
\n\n
\n \n
\n
\n
\n )\n }\n }\n\n render() {\n const results = this.props.results;\n\n return (\n
\n
\n
\n

Résultats

\n

\n Ce rapport identifie vos forces et faiblesses dans le domaine des soft skills. \n Il s’appuie sur les résultats du projet européen eLene4work. \n Il se présente sous forme de radars. \n Il y a un radar par catégorie de compétences : sociales, personnelles, méthodologiques.\n

\n

\n A chaque branche du radar correspond une compétence associée au document de référence du projet \n C2 pour l’emploi. \n Celle-ci est graduée en pourcentage et en fonction de vos réponses au questionnaire donne une évaluation \n relative de vos compétences.\n

\n

Cela vous permettra d’évaluer vos forces et vos faiblesses dans le domaine \n des soft skills et d’envisager, le cas échéant, de trouver des pistes d’amélioration comme suivre une formation, \n un MOOC ou toute autre action.\n

\n { results && \n results.map(r => {\n return this.printCategory(r.category)\n })\n }\n \n
\n \n Questionnaire\n \n
\n
\n \n
\n );\n }\n}\n\nconst mapStateToProps = (state: IState) => ({\n categories: state.category.categories,\n answers: state.answer.answers,\n results: state.result.results,\n loadedAnswers: state.result.answers\n});\n\nconst mapDispatchToProps = (dispatch: any) => ({\n loadAnswers: () => dispatch(resultActions.loadAnswers()),\n parseResults: (categories: TCategoriesData, answers: TAnswersData) => dispatch(resultActions.parseResults(categories, answers))\n});\n\nexport default connect(mapStateToProps, mapDispatchToProps)(Results);","import { TCategoriesData, TAnswersData } from \"../common/types\";\n\nexport const loadAnswers = () => async (dispatch: any) => {\n let answers, categories = [];\n const storage = localStorage.getItem('c2-answers');\n const cat = localStorage.getItem('c2-categories');\n\n if (storage != null && cat != null) {\n answers = JSON.parse(storage || \"\");\n categories = JSON.parse(cat || \"\");\n }\n\n const data = {\n 'answers': answers,\n 'categories': categories\n }\n\n return dispatch({ type: 'LOAD_ANSWERS', payload: data });\n};\n\nexport const parseResults = (categories: TCategoriesData, answers: TAnswersData) => async (dispatch: any) => {\n const data = { \n categories: categories,\n answers: answers\n };\n\n return dispatch({ type: 'PARSE_RESULTS', payload: data });\n};","import React from 'react';\nimport { Switch, Route, withRouter, RouteComponentProps } from 'react-router-dom';\nimport Quiz from './Quiz';\nimport Results from './Results';\n\nclass App extends React.Component> {\n render() {\n return (\n \n \n \n \n \n \n );\n }\n}\n\nexport default withRouter(App);","// This optional code is used to register a service worker.\n// register() is not called by default.\n\n// This lets the app load faster on subsequent visits in production, and gives\n// it offline capabilities. However, it also means that developers (and users)\n// will only see deployed updates on subsequent visits to a page, after all the\n// existing tabs open on the page have been closed, since previously cached\n// resources are updated in the background.\n\n// To learn more about the benefits of this model and instructions on how to\n// opt-in, read https://bit.ly/CRA-PWA\n\nconst isLocalhost = Boolean(\n window.location.hostname === 'localhost' ||\n // [::1] is the IPv6 localhost address.\n window.location.hostname === '[::1]' ||\n // 127.0.0.1/8 is considered localhost for IPv4.\n window.location.hostname.match(\n /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/\n )\n);\n\nexport function register(config) {\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\n // The URL constructor is available in all browsers that support SW.\n const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);\n if (publicUrl.origin !== window.location.origin) {\n // Our service worker won't work if PUBLIC_URL is on a different origin\n // from what our page is served on. This might happen if a CDN is used to\n // serve assets; see https://github.com/facebook/create-react-app/issues/2374\n return;\n }\n\n window.addEventListener('load', () => {\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\n\n if (isLocalhost) {\n // This is running on localhost. Let's check if a service worker still exists or not.\n checkValidServiceWorker(swUrl, config);\n\n // Add some additional logging to localhost, pointing developers to the\n // service worker/PWA documentation.\n navigator.serviceWorker.ready.then(() => {\n console.log(\n 'This web app is being served cache-first by a service ' +\n 'worker. To learn more, visit https://bit.ly/CRA-PWA'\n );\n });\n } else {\n // Is not localhost. Just register service worker\n registerValidSW(swUrl, config);\n }\n });\n }\n}\n\nfunction registerValidSW(swUrl, config) {\n navigator.serviceWorker\n .register(swUrl)\n .then(registration => {\n registration.onupdatefound = () => {\n const installingWorker = registration.installing;\n if (installingWorker == null) {\n return;\n }\n installingWorker.onstatechange = () => {\n if (installingWorker.state === 'installed') {\n if (navigator.serviceWorker.controller) {\n // At this point, the updated precached content has been fetched,\n // but the previous service worker will still serve the older\n // content until all client tabs are closed.\n console.log(\n 'New content is available and will be used when all ' +\n 'tabs for this page are closed. See https://bit.ly/CRA-PWA.'\n );\n\n // Execute callback\n if (config && config.onUpdate) {\n config.onUpdate(registration);\n }\n } else {\n // At this point, everything has been precached.\n // It's the perfect time to display a\n // \"Content is cached for offline use.\" message.\n console.log('Content is cached for offline use.');\n\n // Execute callback\n if (config && config.onSuccess) {\n config.onSuccess(registration);\n }\n }\n }\n };\n };\n })\n .catch(error => {\n console.error('Error during service worker registration:', error);\n });\n}\n\nfunction checkValidServiceWorker(swUrl, config) {\n // Check if the service worker can be found. If it can't reload the page.\n fetch(swUrl)\n .then(response => {\n // Ensure service worker exists, and that we really are getting a JS file.\n const contentType = response.headers.get('content-type');\n if (\n response.status === 404 ||\n (contentType != null && contentType.indexOf('javascript') === -1)\n ) {\n // No service worker found. Probably a different app. Reload the page.\n navigator.serviceWorker.ready.then(registration => {\n registration.unregister().then(() => {\n window.location.reload();\n });\n });\n } else {\n // Service worker found. Proceed as normal.\n registerValidSW(swUrl, config);\n }\n })\n .catch(() => {\n console.log(\n 'No internet connection found. App is running in offline mode.'\n );\n });\n}\n\nexport function unregister() {\n if ('serviceWorker' in navigator) {\n navigator.serviceWorker.ready.then(registration => {\n registration.unregister();\n });\n }\n}\n","import React from 'react';\nimport ReactDOM from 'react-dom';\nimport { HashRouter } from 'react-router-dom';\nimport history from './history.js';\nimport { Provider } from 'react-redux';\nimport { store } from './reducers/index';\nimport './style.css';\nimport App from './containers/App';\nimport * as serviceWorker from './serviceWorker';\n\nconst content = (\n \n
\n \n \n \n
\n
\n);\n\nReactDOM.render(content, document.getElementById('c2app'));\nserviceWorker.unregister();\n"],"sourceRoot":""}