<commit_before>import React from 'react';
import R from 'ramda';
import { Icon } from 'react-fa';

class CreateNodeWidget extends React.Component {
  constructor(props) {
    super(props);

    this.onAddNodeClick = this.onAddNodeClick.bind(this);
    this.onNodeTypeChange = this.onNodeTypeChange.bind(this);
  }

  onAddNodeClick(event) {
    this.props.onAddNodeClick();
    event.target.blur();
  }

  onNodeTypeChange(event) {
    this.props.onNodeTypeChange(event.target.value);
    event.target.blur();
  }

  render() {
    const nodeTypes = R.values(this.props.nodeTypes);<commit_msg>feat(xod-client): add sorting nodetypes by id<commit_after>import React from 'react';
import R from 'ramda';
import { Icon } from 'react-fa';

class CreateNodeWidget extends React.Component {
  constructor(props) {
    super(props);

    this.onAddNodeClick = this.onAddNodeClick.bind(this);
    this.onNodeTypeChange = this.onNodeTypeChange.bind(this);
  }

  onAddNodeClick(event) {
    this.props.onAddNodeClick();
    event.target.blur();
  }

  onNodeTypeChange(event) {
    this.props.onNodeTypeChange(event.target.value);
    event.target.blur();
  }

  render() {
    const sortById = R.sort(
      R.comparator((a, b) => a.id < b.id)
    );
    const nodeTypes = sortById(R.values(this.props.nodeTypes));
{'fraction_non_alphanumeric': 0.1362940275650842, 'fraction_numerical': 0.0, 'mean_word_length': 3.876865671641791, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, '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': '827394', 'n_tokens_mistral': 447, 'n_tokens_neox': 434, 'n_words': 75}