<commit_before>/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

(function() {
  class RichListBox extends React.Component {
    constructor(props) {
      super(props);
      this.state = {
        selectedWidget: 0
      };
    }

    changeSelectedWidget(i) {
      this.setState({ selectedWidget: i });
    }

    getAllCalendarWidgets() {
      return this.props.widgetData.map((widget, i) =>
        <CalendarAlarmWidget
          key={i}
          isSelected={i === this.state.selectedWidget}
          onClick={() => {
            this.changeSelectedWidget(i);
          }}
        />
      );
    }

    render() {
      const allCalendarWidgets = this.getAllCalendarWidgets();
      const cssClasses = this.props.cssClasses;

      return (
        <div className={`richlistbox ${cssClasses}`}>
          {allCalendarWidgets}
        </div>
      );
    }
  }

  RichListBox.propTypes = {
    cssClasses: PropTypes.string,
    widgetData: PropTypes.array
  };

  window.RichListBox = RichListBox;
})();<commit_msg>addin minute changes<commit_after>/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

(function() {
  const { connect } = ReactRedux;
  const { bindActionCreators } = Redux;

  class RichListBox extends React.Component {
    constructor(props) {
      super(props);
      this.state = {
        selectedWidget: 0
      };
    }

    changeSelectedWidget(i) {
      this.setState({ selectedWidget: i });
    }

    getAllCalendarWidgets() {
      return this.props.widgetData.map((widget, i) =>
        <CalendarAlarmWidget
          key={i}
          isSelected={i === this.state.selectedWidget}
          onClick={() => {
            this.changeSelectedWidget(i);
          }}
        />
      );
    }

    render() {
      const allCalendarWidgets = this.getAllCalendarWidgets();
      const cssClasses = this.props.cssClasses;

      return (
        <div className={`richlistbox ${cssClasses}`}>
          {allCalendarWidgets}
        </div>
      );
    }
  }

  RichListBox.propTypes = {
    cssClasses: PropTypes.string,
    widgetData: PropTypes.array
  };

  const mapStateToProps = ({ options }) => ({ state: options });

  const mapDispatchToProps = dispatch => ({
    actions: bindActionCreators(window.__options_actions__, dispatch)
  });

  window.RichListBox = connect(mapStateToProps, mapDispatchToProps)(RichListBox);
})();
{'fraction_non_alphanumeric': 0.12299065420560748, 'fraction_numerical': 0.003738317757009346, 'mean_word_length': 2.417624521072797, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 15, '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': '6441093', 'n_tokens_mistral': 791, 'n_tokens_neox': 777, 'n_words': 178}