<commit_before>module.exports = {
  getDefaultProps () {
    return {
      style: {
        display: "none" // effective $.hide()
      },
      showMethod: "fadeIn", //, slideDown, and show are built into jQuery
      showDuration: 300,
      showEasing: "swing", // and linear are built into jQuery
      hideMethod: "fadeOut",
      hideDuration: 1000,
      hideEasing: "swing",
      //
      timeOut: 5000,
    };
  },

  getInitialState () {
    return {
      intervalId: null
    };
  },

  _get$Node () {
    return $(this.getDOMNode());
  },

  componentDidMount () {
    var {props} = this;
    this._get$Node()[props.showMethod]({
      duration: props.showDuration,
      easing: props.showEasing
    });
    // if (props.timeOut > 0) {
    //   this.setState({
    //     intervalId: setTimeout('hideToast', props.timeOut);
    //   });
    // }
  }
};<commit_msg>feat(jQueryMixin): hook hover logic into handleMouse{Enter/Leave}<commit_after>function callShowMethod ($node, props) {
  $node[props.showMethod]({
    duration: props.showDuration,
    easing: props.showEasing
  });
}

module.exports = {
  getDefaultProps () {
    return {
      style: {
        display: "none" // effective $.hide()
      },
      showMethod: "fadeIn", //, slideDown, and show are built into jQuery
      showDuration: 300,
      showEasing: "swing", // and linear are built into jQuery
      hideMethod: "fadeOut",
      hideDuration: 1000,
      hideEasing: "swing",
      //
      timeOut: 5000,
      extendedTimeOut: 1000
    };
  },

  getInitialState () {
    return {
      intervalId: null
    };
  },

  _get$Node () {
    return $(this.getDOMNode());
  },

  _setIntervalId (intervalId) {
    this.setState({
      intervalId
    });
  },

  componentDidMount () {
    var {props} = this;
    callShowMethod(this._get$Node(), props);
    // if (props.timeOut > 0) {
    // this._setIntervalId(
    // setTimeout('hideToast', props.timeOut);
    //   });
    // }
  },

  handleMouseEnter () {
    clearTimeout(this.state.intervalId);
    this._setIntervalId(null);

    callShowMethod(this._get$Node().stop(true, true), this.props);
  },

  handleMouseLeave () {
    var {props} = this;

    if (props.timeOut > 0 || props.extendedTimeOut > 0) {
      this._setIntervalId(
        setTimeout('hideToast', props.extendedTimeOut)
      );
    }
  }
};
{'fraction_non_alphanumeric': 0.1504237288135593, 'fraction_numerical': 0.012711864406779662, 'mean_word_length': 2.330042313117066, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '2952861', 'n_tokens_mistral': 795, 'n_tokens_neox': 751, 'n_words': 150}