<commit_before>import classNames from 'classnames';
/* eslint-disable no-unused-vars */
import React from 'react';
/* eslint-enable no-unused-vars */

import FieldInput from './FieldInput';
import IconEdit from './icons/IconEdit';

module.exports = class FieldTextarea extends FieldInput {
  getInputElement(attributes) {
    let {props} = this;
    let inputContent = null;

    let classes = classNames(props.inputClass, props.sharedClass);
    attributes = this.bindEvents(attributes);

    if (this.isEditing() || props.writeType === 'input') {
      inputContent = (
        <textarea
          ref="inputElement"
          className={classes}
          {...attributes}
          value={attributes.startValue} />
      );
    } else {
      inputContent = (
        <span
          ref="inputElement"
          {...attributes}
          className={classes}
          onClick={attributes.onFocus}>
          <span className={props.inlineTextClass}>
            {props.value || attributes.startValue}
          </span>
          <span className={props.inlineIconClass}>
            <IconEdit />
          </span>
        </span>
      );
    }

    if (this.props.renderer) {
      return this.props.renderer(inputContent);
    }

    return inputContent;
  }
}<commit_msg>Making Field Password class customizable<commit_after>import classNames from 'classnames/dedupe';
/* eslint-disable no-unused-vars */
import React from 'react';
/* eslint-enable no-unused-vars */

import FieldInput from './FieldInput';
import IconEdit from './icons/IconEdit';

module.exports = class FieldTextarea extends FieldInput {
  getInputElement(attributes) {
    let {
      inlineIconClass,
      inlineTextClass,
      inputClass,
      renderer,
      sharedClass,
      value,
      writeType,
    } = this.props;
    let inputContent = null;

    let classes = classNames(inputClass, sharedClass);
    attributes = this.bindEvents(attributes);

    if (this.isEditing() || writeType === 'input') {
      inputContent = (
        <textarea
          ref="inputElement"
          className={classes}
          {...attributes}
          value={attributes.startValue} />
      );
    } else {
      inputContent = (
        <span
          ref="inputElement"
          {...attributes}
          className={classes}
          onClick={attributes.onFocus}>
          <span className={classNames(inlineTextClass)}>
            {value || attributes.startValue}
          </span>
          <span className={classNames(inlineIconClass)}>
            <IconEdit />
          </span>
        </span>
      );
    }

    if (renderer) {
      return renderer(inputContent);
    }

    return inputContent;
  }
}
{'fraction_non_alphanumeric': 0.12169705991812431, 'fraction_numerical': 0.0, 'mean_word_length': 2.234657039711191, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, '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': '7026557', 'n_tokens_mistral': 734, 'n_tokens_neox': 728, 'n_words': 152}