<commit_before>import React from "react";
import {PropTypes as T} from 'prop-types';
import {Grid, Row, Col} from 'react-bootstrap';
import RaisedButton from 'material-ui/RaisedButton';
import FontIcon from 'material-ui/FontIcon';
import IconButton from 'material-ui/IconButton';
import LocationSVG from 'material-ui/svg-icons/action/room';
import Card from '../container/Card';
import AddCircleOutlineSVG from 'material-ui/svg-icons/content/add-circle-outline';
import DescriptionSVG from 'material-ui/svg-icons/action/description';
import scrollToElement from 'scroll-to-element';


const styles = {
    button: {
        width: '100%',
        margin: '15px 0'
    },
    cardIconLocationWrapper : {
        width: '25px',
        height: '25px',
        position: 'absolute',
        right: '0',
        top: '0',
        padding: '3px'
    },
    cardIconLocation : {
        width: '20px',
        height: '20px',
        color: 'white'
    }
};

export default class Table extends React.PureComponent {
    constructor(props) {
        super(props);
    }

    renderCards (p, key) {
      return (
          <div key={key} className="card text-center table-card" style={{display: 'inline-block', margin: '15px'}}>
            <span className="card-number">{this.props.pokemons.all[key].id_national}</span>
            <img src={this.props.pokemons.all[key].image} className="card-pokemon"/>
            <IconButton
                style={styles.cardIconLocationWrapper}
                iconStyle={styles.cardIconLocation}
                tooltipPosition="top-center"
                tooltip="Détails"
                children={<DescriptionSVG/>}
                onTouchTap={
                    () => {
                        let pokemon = {};
                        pokemon.current = this.props.pokemons.all[key];
                        pokemon.evolution = [];
                        pokemon.starter = {};
                        //Gère les évolutions
                        for(var i = 0; i < this.props.pokemons.all.length; i++) {
                            if(this.props.pokemons.all[i].id_parent === pokemon.current.id_national) {
                                pokemon.evolution.push(this.props.pokemons.all[i]);
                            }
                        }
                        //Gère les starteurs
                        for(var j = 0; j < this.props.pokemons.all.length; j++) {
                            if(this.props.pokemons.all[j].id_national === pokemon.current.id_parent) {
                                pokemon.starter = this.props.pokemons.all[j];
                            }
                        }
                        this.props.setSelectedPokemonForDetails(pokemon);
                        this.props.openDetails();
                    }
                }
            />
            <span className="card-title table-title">
              {this.props.pokemons.all[key].name}
            </span>
            <div className="card-type table-type align">
              <span className="type">Feu</span>
            </div>
          </div><commit_msg>Add type on table, adjust selectedCurrent<commit_after>import React from "react";
import {PropTypes as T} from 'prop-types';
import {Grid, Row, Col} from 'react-bootstrap';
import RaisedButton from 'material-ui/RaisedButton';
import FontIcon from 'material-ui/FontIcon';
import IconButton from 'material-ui/IconButton';
import LocationSVG from 'material-ui/svg-icons/action/room';
import Card from '../container/Card';
import AddCircleOutlineSVG from 'material-ui/svg-icons/content/add-circle-outline';
import DescriptionSVG from 'material-ui/svg-icons/action/description';
import scrollToElement from 'scroll-to-element';


const styles = {
    button: {
        width: '100%',
        margin: '15px 0'
    },
    cardIconLocationWrapper : {
        width: '25px',
        height: '25px',
        position: 'absolute',
        right: '0',
        top: '0',
        padding: '3px'
    },
    cardIconLocation : {
        width: '20px',
        height: '20px',
        color: 'white'
    }
};

export default class Table extends React.PureComponent {
    constructor(props) {
        super(props);
    }

    renderCards (p, key) {
      return (
          <div key={key} className="card text-center table-card" style={{display: 'inline-block', margin: '15px'}}>
            <span className="card-number">{this.props.pokemons.all[key].id_national}</span>
            <img src={this.props.pokemons.all[key].image} className="card-pokemon"/>
            <IconButton
                style={styles.cardIconLocationWrapper}
                iconStyle={styles.cardIconLocation}
                tooltipPosition="top-center"
                tooltip="Détails"
                children={<DescriptionSVG/>}
                onTouchTap={
                    () => {
                        this.props.setSelectedPokemonForDetails(this.props.pokemons.all[key]);
                        this.props.openDetails();
                    }
                }
            />
            <span className="card-title table-title">
              {this.props.pokemons.all[key].name}
            </span>
            <div className="card-type align">
                {(this.props.pokemons.all[key].type.map((ps, ks) => this.renderType(ps, ks)))}
            </div>
          </div>
        )
    }

    renderType (ps, ks) {
        return (
            <span key={ks} className="type" style={{backgroundColor: ps.color}}>{ps.nom_type}</span>
{'fraction_non_alphanumeric': 0.12914327114653143, 'fraction_numerical': 0.007245064299945662, 'mean_word_length': 1.7945344129554657, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 32, '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': '3377583', 'n_tokens_mistral': 1617, 'n_tokens_neox': 1546, 'n_words': 293}