import { objOf, toPairs, dissoc, add, find, uniq, chain, pluck, concat, map, any, equals, is, keys, evolve, curry, filter, pipe, head, isEmpty, propEq, prop, has, max, min, subtract, values, sortBy, last } from 'ramda' import React from 'react' import { anyNull, val } from './traverse-common-functions' import { Node } from './mecanismViews/common' import { makeJsx, evaluateNode, rewriteNode, evaluateArray, evaluateArrayWithFilter, evaluateObject, parseObject, collectNodeMissing } from './evaluation' import { findRuleByName, disambiguateRuleReference, findRuleByDottedName } from './rules' import 'react-virtualized/styles.css' import Somme from './mecanismViews/Somme' import Allègement from './mecanismViews/Allègement' import buildSelectionView from './mecanismViews/Selection' import uniroot from './uniroot' let constantNode = constant => ({ nodeValue: constant, jsx: nodeValue => {nodeValue} }) let decompose = (recurse, k, v) => { let subProps = dissoc('composantes')(v), explanation = v.composantes.map(c => ({ ...recurse( objOf(k, { ...subProps, ...dissoc('attributs')(c) }) ), composante: c.nom ? { nom: c.nom } : c.attributs })) let jsx = (nodeValue, explanation) => ( {explanation.map((c, i) => [
  • {makeJsx(c)}
  • , i < explanation.length - 1 && (