<commit_before>import React, { PropTypes, Component } from 'react';
import translate from '../../i18n/Translate';
import TextInput from '../ui/TextInput';
import FullWidthButton from '../ui/FullWidthButton';

@translate('UnlockGroupPopup')
export default class UnlockGroupPopup extends Component {

    static propTypes = {
        onClickOkHandler: PropTypes.func,
        joining         : PropTypes.bool,
        // Injected by @translate:
        strings             : PropTypes.object
    };

    constructor(props) {
        super(props);
        this.onOkClick = this.onOkClick.bind(this);

        this.state = {
            opened: false
        };
    }

    componentDidMount() {
        $$('.popup-unlock-group').on('popup:opened', () => {
            setTimeout(() => { this.setState({opened: true}) }, 0);
        });
        $$('.popup-unlock-group').on('popup:closed', () => {
            setTimeout(() => { this.setState({opened: false}) }, 0);
        });
    }

    onOkClick() {
        const token = this.refs.token.getValue();
        this.props.onClickOkHandler(token);
    }

    render() {
        const {joining, strings} = this.props;
        const {opened} = this.state;<commit_msg>Undo focus on unlock group popup fix<commit_after>import React, { PropTypes, Component } from 'react';
import translate from '../../i18n/Translate';
import TextInput from '../ui/TextInput';
import FullWidthButton from '../ui/FullWidthButton';

@translate('UnlockGroupPopup')
export default class UnlockGroupPopup extends Component {

    static propTypes = {
        onClickOkHandler: PropTypes.func,
        joining         : PropTypes.bool,
        // Injected by @translate:
        strings             : PropTypes.object
    };

    constructor(props) {
        super(props);
        this.onOkClick = this.onOkClick.bind(this);

        this.state = {
            opened: false
        };
    }

    componentDidMount() {
        $$('.popup-unlock-group').on('popup:opened', () => {
            this.setState({opened: true});
        });
        $$('.popup-unlock-group').on('popup:closed', () => {
            this.setState({opened: false});
        });
    }

    onOkClick() {
        const token = this.refs.token.getValue();
        this.props.onClickOkHandler(token);
    }

    render() {
        const {joining, strings} = this.props;
        const {opened} = this.state;
{'fraction_non_alphanumeric': 0.1496030087755955, 'fraction_numerical': 0.0025073129962390303, 'mean_word_length': 2.239512855209743, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '6637096', 'n_tokens_mistral': 673, 'n_tokens_neox': 666, 'n_words': 135}