<commit_before>import React from 'react'
import capitalize from 'lodash/capitalize'
import map from 'lodash/map'

import ActionBar from 'js/components/ActionBar'
import Select from 'js/components/Select'
import AdjustOne from 'js/components/AdjustOne'

import 'css/characterGenerator.css'

const renderSizes = (sizes, charSize, changeValue) => {
  if (!(sizes instanceof Array) || sizes.length < 2) {
    return
  }
  return <div className='row'>
    <label for='Size'>Size</label>
    <Select id='size'
      options={sizes} value={charSize}
      onChange={(event) => changeValue('characteristics.size', event.target.value)}
    />
  </div>
}

const renderIncreaseOne = (appData, charAttr, setIncreaseOne) => (
  <div className='row'>
    <label for='increaseOne'>Increase One</label>
    <Select id='increaseOne'
      options={[].concat(appData.pleaseSelect, appData.attributes)} value={charAttr.oneIncreased}
      onChange={(event) => setIncreaseOne(event.target.value)}
    />
  </div>
)

const renderAspects = (charAspects, ancestryAspects, changeValue) => {
  return map(charAspects, (aspectVal, aspectKey) => {
    let capAspectKey = capitalize(aspectKey)
    let aspect = ancestryAspects[aspectKey]

    return <div key={aspectKey} className={'row ' + aspectKey}>
      <label for={'editAspect' + capAspectKey}>{capAspectKey}</label>
      <Select id={'editAspect' + capAspectKey}
        options={aspect.values} value={aspectVal}
        onChange={(event) => changeValue(aspectKey, event.target.value)}
      />
    </div>
  })
}

const getStyles = (charData) => ({
  display: charData.mode !== 'edit' ? 'none' : ''
})
<commit_msg>[#36] Bugfix - change aspects.value, not value.<commit_after>import React from 'react'
import capitalize from 'lodash/capitalize'
import map from 'lodash/map'

import ActionBar from 'js/components/ActionBar'
import Select from 'js/components/Select'
import AdjustOne from 'js/components/AdjustOne'

import 'css/characterGenerator.css'

const renderSizes = (sizes, charSize, changeValue) => {
  if (!(sizes instanceof Array) || sizes.length < 2) {
    return
  }
  return <div className='row'>
    <label for='Size'>Size</label>
    <Select id='size'
      options={sizes} value={charSize}
      onChange={(event) => changeValue('characteristics.size', event.target.value)}
    />
  </div>
}

const renderIncreaseOne = (appData, charAttr, setIncreaseOne) => (
  <div className='row'>
    <label for='increaseOne'>Increase One</label>
    <Select id='increaseOne'
      options={[].concat(appData.pleaseSelect, appData.attributes)} value={charAttr.oneIncreased}
      onChange={(event) => setIncreaseOne(event.target.value)}
    />
  </div>
)

const renderAspects = (charAspects, ancestryAspects, changeValue) => {
  return map(charAspects, (aspectVal, aspectKey) => {
    let capAspectKey = capitalize(aspectKey)
    let aspect = ancestryAspects[aspectKey]

    return <div key={aspectKey} className={'row ' + aspectKey}>
      <label for={'editAspect' + capAspectKey}>{capAspectKey}</label>
      <Select id={'editAspect' + capAspectKey}
        options={aspect.values} value={aspectVal}
        onChange={(event) => changeValue('aspects.' + aspectKey, event.target.value)}
      />
    </div>
  })
}

const getStyles = (charData) => ({
  display: charData.mode !== 'edit' ? 'none' : ''
})

{'fraction_non_alphanumeric': 0.15271527152715272, 'fraction_numerical': 0.0012001200120012002, 'mean_word_length': 4.317384370015949, 'pattern_counts': {'":': 0, '<': 35, '<?xml version=': 0, '>': 49, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '109098', 'n_tokens_mistral': 1103, 'n_tokens_neox': 1084, 'n_words': 222}