<commit_before>import R from 'ramda';
import React, { Component } from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import GridColumn from '../../common/grid/gridColumn';
import PartnerApplicationsDirectFilter from './partnerApplicationsDirectFilter';
import ConceptNoteIDCell from '../conceptNoteIDCell';
import PaginatedList from '../../common/list/paginatedList';
import { loadApplicationsDirect } from '../../../reducers/applicationsDirectList';
import { isQueryChanged } from '../../../helpers/apiHelper';
import { formatDateForPrint } from '../../../helpers/dates';
import WrappedCell from '../../common/cell/wrappedCell';

const applicationCell = ({ row, column }) => {
  if (column.name === 'is_direct') {
    return (<DirectSelectionCell
      directSelection={row.is_direct}
    />);
  } else if (column.name === 'submission_date') {
    return <WrappedCell content={formatDateForPrint(row.submission_date)} />;
  } else if (column.name === 'id') {
    return (<ConceptNoteIDCell
      id={row.id}
    />);
  }

  return undefined;
};

class PartnerApplicationsDirect extends Component {
  componentWillMount() {
    const { query } = this.props;
    this.props.loadApplications(query);
  }

  shouldComponentUpdate(nextProps) {
    const { query } = this.props;

    if (isQueryChanged(nextProps, query)) {
      this.props.loadApplications(nextProps.location.query);
      return false;
    }

    return true;
  }
<commit_msg>table cells<commit_after>import R from 'ramda';
import React, { Component } from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import GridColumn from '../../common/grid/gridColumn';
import PartnerApplicationsDirectFilter from './partnerApplicationsDirectFilter';
import ConceptNoteIDCell from '../conceptNoteIDCell';
import PaginatedList from '../../common/list/paginatedList';
import { loadApplicationsDirect } from '../../../reducers/applicationsDirectList';
import { isQueryChanged } from '../../../helpers/apiHelper';
import { formatDateForPrint } from '../../../helpers/dates';
import WrappedCell from '../../common/cell/wrappedCell';

const applicationCell = ({ row, column }) => {
  if (column.name === 'submission_date') {
    return <WrappedCell content={formatDateForPrint(row.submission_date)} />;
  } else if (column.name === 'id') {
    return (<ConceptNoteIDCell
      id={row.id}
    />);
  }

  return undefined;
};

class PartnerApplicationsDirect extends Component {
  componentWillMount() {
    const { query } = this.props;
    this.props.loadApplications(query);
  }

  shouldComponentUpdate(nextProps) {
    const { query } = this.props;

    if (isQueryChanged(nextProps, query)) {
      this.props.loadApplications(nextProps.location.query);
      return false;
    }

    return true;
  }

{'fraction_non_alphanumeric': 0.15053003533568904, 'fraction_numerical': 0.0, 'mean_word_length': 3.8310580204778155, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 10, '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': '2498804', 'n_tokens_mistral': 811, 'n_tokens_neox': 797, 'n_words': 186}