<commit_before>/*
Copyright 2015, 2016 OpenMarket Ltd

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

'use strict';

var React = require('react');
var Velocity = require('velocity-vector');
require('velocity-vector/velocity.ui');
var sdk = require('../../../index');
var Email = require('../../../email');
var Modal = require("../../../Modal");

var FIELD_EMAIL = 'field_email';
var FIELD_USERNAME = 'field_username';
var FIELD_PASSWORD = '<PASSWORD>';
var FIELD_PASSWORD_CONFIRM = '<PASSWORD>';

/**
 * A pure UI component which displays a registration form.
 */
module.exports = React.createClass({
    displayName: 'RegistrationForm',

    propTypes: {
        defaultEmail: React.PropTypes.string,
        defaultUsername: React.PropTypes.string,
        defaultPassword: React.PropTypes.string,
        guestUsername: React.PropTypes.string,
        showEmail: React.PropTypes.bool,
        minPasswordLength: React.PropTypes.number,
        onError: React.PropTypes.func,
        onRegisterClick: React.PropTypes.func // onRegisterClick(Object) => ?Promise
    },

    getDefaultProps: function() {
        return {
            showEmail: false,
            minPasswordLength: 6,
            onError: function(e) {
                console.error(e);
            }
        };<commit_msg>Doc the default params / guestUsername props<commit_after>/*
Copyright 2015, 2016 OpenMarket Ltd

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

'use strict';

var React = require('react');
var Velocity = require('velocity-vector');
require('velocity-vector/velocity.ui');
var sdk = require('../../../index');
var Email = require('../../../email');
var Modal = require("../../../Modal");

var FIELD_EMAIL = 'field_email';
var FIELD_USERNAME = 'field_username';
var FIELD_PASSWORD = '<PASSWORD>';
var FIELD_PASSWORD_CONFIRM = '<PASSWORD>';

/**
 * A pure UI component which displays a registration form.
 */
module.exports = React.createClass({
    displayName: 'RegistrationForm',

    propTypes: {
        // Values pre-filled in the input boxes when the component loads
        defaultEmail: React.PropTypes.string,
        defaultUsername: React.PropTypes.string,
        defaultPassword: React.PropTypes.string,

        // A username that will be used if no username is enetered.
        // Specifying this param will also warn the user that enetering
        // a different username will cause a fresh account to be generated.
        guestUsername: React.PropTypes.string,

        showEmail: React.PropTypes.bool,
        minPasswordLength: React.PropTypes.number,
        onError: React.PropTypes.func,
        onRegisterClick: React.PropTypes.func // onRegisterClick(Object) => ?Promise
    },

    getDefaultProps: function() {
        return {
            showEmail: false,
            minPasswordLength: 6,
            onError: function(e) {
                console.error(e);
            }
        };
{'fraction_non_alphanumeric': 0.10605276771857217, 'fraction_numerical': 0.006725297465080186, 'mean_word_length': 3.1007423117709436, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '2550728', 'n_tokens_mistral': 1054, 'n_tokens_neox': 1008, 'n_words': 359}