<commit_before>import React, {Component} from 'react';
import Calendar from './Calendar';
import {withDateSelection} from './Calendar/withDateSelection';

export {default as Calendar} from './Calendar';
export {withDateSelection} from './Calendar/withDateSelection';
export {withKeyboardSupport} from './Calendar/withKeyboardSupport';
export {withMultipleDates, defaultMultipleDateInterpolation} from './Calendar/withMultipleDates';
export {withRange} from './Calendar/withRange';

/*
 * By default, Calendar is a controlled component.
 * Export a sensible default for minimal setup
 */
export default class DefaultCalendar extends Component {
  static defaultProps = {
    Component: withDateSelection(Calendar),
    interpolateSelection: (selected) => selected,
  };
  state = {
    selected: typeof this.props.selected !== 'undefined'
      ? this.props.selected
      : new Date(),
  };
  componentWillReceiveProps({selected}) {
    if (selected !== this.props.selected) {
      this.setState({selected});
    }
  }
  handleSelect = (selected) => {
    const {onSelect, interpolateSelection} = this.props;

    if (typeof onSelect === 'function') { onSelect(selected); }

    this.setState({selected: interpolateSelection(selected, this.state.selected)});
  }
  render() {
    // eslint-disable-next-line no-unused-vars
    const {Component, interpolateSelection, ...props} = this.props;
<commit_msg>Export EVENT_TYPE so that it can be used along with `withRange` (#78)<commit_after>import React, {Component} from 'react';
import Calendar from './Calendar';
import {withDateSelection} from './Calendar/withDateSelection';

export {default as Calendar} from './Calendar';
export {withDateSelection} from './Calendar/withDateSelection';
export {withKeyboardSupport} from './Calendar/withKeyboardSupport';
export {withMultipleDates, defaultMultipleDateInterpolation} from './Calendar/withMultipleDates';
export {withRange, EVENT_TYPE} from './Calendar/withRange';

/*
 * By default, Calendar is a controlled component.
 * Export a sensible default for minimal setup
 */
export default class DefaultCalendar extends Component {
  static defaultProps = {
    Component: withDateSelection(Calendar),
    interpolateSelection: (selected) => selected,
  };
  state = {
    selected: typeof this.props.selected !== 'undefined'
      ? this.props.selected
      : new Date(),
  };
  componentWillReceiveProps({selected}) {
    if (selected !== this.props.selected) {
      this.setState({selected});
    }
  }
  handleSelect = (selected) => {
    const {onSelect, interpolateSelection} = this.props;

    if (typeof onSelect === 'function') { onSelect(selected); }

    this.setState({selected: interpolateSelection(selected, this.state.selected)});
  }
  render() {
    // eslint-disable-next-line no-unused-vars
    const {Component, interpolateSelection, ...props} = this.props;

{'fraction_non_alphanumeric': 0.1286509040333797, 'fraction_numerical': 0.0006954102920723226, 'mean_word_length': 4.48, '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': '2676263', 'n_tokens_mistral': 777, 'n_tokens_neox': 765, 'n_words': 208}