<commit_before>"use strict";

/*
   See License / Disclaimer https://raw.githubusercontent.com/DynamicTyped/Griddle/master/LICENSE
*/
var React = require("react");
var _ = require("underscore");
var ColumnProperties = require("./columnProperties.js");

var GridTitle = React.createClass({
  displayName: "GridTitle",
  getDefaultProps: function() {
    return {
      columnSettings: null,
      rowSettings: null,
      sortSettings: null,
      headerStyle: null,
      useGriddleStyles: true,
      useGriddleIcons: true,
      headerStyles: {}
    };
  },
  componentWillMount: function() {
    this.verifyProps();
  },
  sort: function(event) {
    this.props.sortSettings.changeSort(event.target.dataset.title ||
      event.target.parentElement.dataset.title);
  },
  verifyProps: function() {
    if (this.props.columnSettings === null) {
      console.error(
        "gridTitle: The columnSettings prop is null and it shouldn't be"
      );
    }

    if (this.props.sortSettings === null) {
      console.error(
        "gridTitle: The sortSettings prop is null and it shouldn't be");
    }
  },
  render: function() {
    this.verifyProps();
    var that = this;

    var nodes = this.props.columnSettings.getColumns().map(function(col,
      index) {
      var columnSort = "";
      var sortComponent = null;
      var titleStyles = null;

      if (that.props.sortSettings.sortColumn == col && that.props.sortSettings
        .sortAscending) {
        columnSort = that.props.sortSettings.sortAscendingClassName;<commit_msg>Update gridTitle.jsx.js<commit_after>"use strict";

/*
   See License / Disclaimer https://raw.githubusercontent.com/DynamicTyped/Griddle/master/LICENSE
*/
var React = require("react");
var _ = require("underscore");
var ColumnProperties = require("./columnProperties.js");

var GridTitle = React.createClass({
  displayName: "GridTitle",
  getDefaultProps: function() {
    return {
      columnSettings: null,
      rowSettings: null,
      sortSettings: null,
      headerStyle: null,
      useGriddleStyles: true,
      useGriddleIcons: true,
      headerStyles: {}
    };
  },
  componentWillMount: function() {
    this.verifyProps();
  },
  sort: function(event) {
    this.props.sortSettings.changeSort(event.target.dataset.title ||
      event.target.parentElement.dataset.title);
  },
  verifyProps: function() {
    if (this.props.columnSettings === null) {
      console.error(
        "gridTitle: The columnSettings prop is null and it shouldn't be"
      );
    }

    if (this.props.sortSettings === null) {
      console.error(
        "gridTitle: The sortSettings prop is null and it shouldn't be");
    }
  },
  render: function() {
    this.verifyProps();
    var that = this;

    var nodes = this.props.columnSettings.getColumns().map(function(col,
      index) {
      var columnSort = "";
      var sortComponent = that.props.sortSettings.sortDefaultClassName;
      var titleStyles = null;

      if (that.props.sortSettings.sortColumn == col && that.props.sortSettings
        .sortAscending) {
        columnSort = that.props.sortSettings.sortAscendingClassName;
{'fraction_non_alphanumeric': 0.12444017914267434, 'fraction_numerical': 0.0, 'mean_word_length': 3.0663198959687907, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '4004780', 'n_tokens_mistral': 915, 'n_tokens_neox': 905, 'n_words': 194}