<commit_before>const React = require("react");
const {StyleSheet, css} = require("../node_modules/aphrodite/lib/index.js");

const ss = require("./shared-styles.js");

const HamburgerEntry = React.createClass({
    propTypes: {
        children: React.PropTypes.node,
        iconName: React.PropTypes.string.isRequired,
        interactive: React.PropTypes.bool,
    },
    render: function() {
        return (
            <div
                className={
                    css(styles.hamburgerEntry,
                        this.props.interactive && styles.interactive)}
            >
                <div className={css(styles.icon)}>
                    <i className="material-icons">{this.props.iconName}</i>
                </div>
                {this.props.children}
            </div>
        );
    },
});

const HamburgerSectionName = React.createClass({
    propTypes: {
        name: React.PropTypes.string,
    },
    render: function() {
        return (
            <div className={css(styles.hamburgerSectionName)}>
                <span>{this.props.name}</span>
            </div>
        );
    },
});

const Hamburger = React.createClass({
    render: function() {
        return (
            <div className={css(styles.hamburgerMenu)}>
                <HamburgerSectionName name="Logged in as" />
                <HamburgerEntry iconName="person">
                    <span className={css(styles.userName)}>
                        Anonymous Person
                    </span>
                </HamburgerEntry>
                <HamburgerEntry iconName="cloud_off" interactive={true}>
                    <span>
                        Log out
                    </span>
                </HamburgerEntry>
                <HamburgerSectionName name="Administration" />
                <HamburgerEntry iconName="people" interactive={true}>
                    <span>Manage users</span>
                </HamburgerEntry>
                <HamburgerEntry iconName="cloud_upload" interactive={true}>
                    <span>Bulk import data</span>
                </HamburgerEntry>
                <HamburgerEntry iconName="cloud_download" interactive={true}>
                    <span>Bulk export data</span>
                </HamburgerEntry>
                <HamburgerSectionName name="Current item" />
                <HamburgerEntry iconName="content_copy" interactive={true}>
                    <span>Make a duplicate</span>
                </HamburgerEntry>
                <HamburgerEntry iconName="file_download" interactive={true}>
                    <span>Export as JSON</span>
                </HamburgerEntry>
                <HamburgerEntry iconName="delete" interactive={true}>
                    <span>Delete</span>
                </HamburgerEntry>
                <HamburgerSectionName name="All databases" />
                <HamburgerEntry iconName="folder_open" interactive={true}>
                    <span>Plasmids</span>
                </HamburgerEntry>
                <HamburgerEntry iconName="folder_open" interactive={true}>
                    <span>Oligos</span>
                </HamburgerEntry>
                <HamburgerEntry iconName="folder_open" interactive={true}>
                    <span>Bacteria</span>
                </HamburgerEntry>
                <HamburgerEntry iconName="folder_open" interactive={true}>
                    <span>Samples</span>
                </HamburgerEntry>
                <HamburgerEntry iconName="folder_open" interactive={true}>
                    <span>Antibodies</span>
                </HamburgerEntry>
                <HamburgerEntry iconName="folder_open" interactive={true}>
                    <span>TC</span>
                </HamburgerEntry>
                <HamburgerEntry iconName="folder_open" interactive={true}>
                    <span>Yeast</span>
                </HamburgerEntry>
            </div>
        );
    },
});<commit_msg>Hook up some hamburger entries to links.<commit_after>const React = require("react");
const {StyleSheet, css} = require("../node_modules/aphrodite/lib/index.js");

const ss = require("./shared-styles.js");

const HamburgerEntry = React.createClass({
    propTypes: {
        children: React.PropTypes.node,
        href: React.PropTypes.string,
        iconName: React.PropTypes.string.isRequired,
        interactive: React.PropTypes.bool,
    },
    onClick: function() {
        if (this.props.href) {
            // TODO: make this not require a page reload.
            window.location = this.props.href;
        }
    },
    render: function() {
        return (
            <div
                className={
                    css(styles.hamburgerEntry,
                        this.props.interactive && styles.interactive)}
                onClick={this.onClick}
            >
                <div className={css(styles.icon)}>
                    <i className="material-icons">{this.props.iconName}</i>
                </div>
                {this.props.children}
            </div>
        );
    },
});

const HamburgerSectionName = React.createClass({
    propTypes: {
        name: React.PropTypes.string,
    },
    render: function() {
        return (
            <div className={css(styles.hamburgerSectionName)}>
                <span>{this.props.name}</span>
            </div>
        );
    },
});

const Hamburger = React.createClass({
    render: function() {
        return (
            <div className={css(styles.hamburgerMenu)}>
                <HamburgerSectionName name="Logged in as" />
                <HamburgerEntry iconName="person">
                    <span className={css(styles.userName)}>
                        Anonymous Person
                    </span>
                </HamburgerEntry>
                <HamburgerEntry iconName="cloud_off" interactive={true}>
                    <span>
                        Log out
                    </span>
                </HamburgerEntry>
                <HamburgerSectionName name="Administration" />
                <HamburgerEntry iconName="people" interactive={true}>
                    <span>Manage users</span>
                </HamburgerEntry>
                <HamburgerEntry iconName="cloud_upload" interactive={true}>
                    <span>Bulk import data</span>
                </HamburgerEntry>
                <HamburgerEntry iconName="cloud_download" interactive={true}>
                    <span>Bulk export data</span>
                </HamburgerEntry>
                <HamburgerSectionName name="Current item" />
                <HamburgerEntry iconName="content_copy" interactive={true}>
                    <span>Make a duplicate</span>
                </HamburgerEntry>
                <HamburgerEntry iconName="file_download" interactive={true}>
                    <span>Export as JSON</span>
                </HamburgerEntry>
                <HamburgerEntry iconName="delete" interactive={true}>
                    <span>Delete</span>
                </HamburgerEntry>
                <HamburgerSectionName name="All databases" />
                <HamburgerEntry
                    href="/plasmids"
                    iconName="folder_open"
                    interactive={true}
                >
                    <span>Plasmids</span>
                </HamburgerEntry>
                <HamburgerEntry
                    href="/oligos"
                    iconName="folder_open"
                    interactive={true}
                >
                    <span>Oligos</span>
                </HamburgerEntry>
                <HamburgerEntry
                    href="/bacteria"
                    iconName="folder_open"
                    interactive={true}
                >
                    <span>Bacteria</span>
                </HamburgerEntry>
                <HamburgerEntry
                    href="/samples"
                    iconName="folder_open"
                    interactive={true}
                >
                    <span>Samples</span>
                </HamburgerEntry>
                <HamburgerEntry
                    href="/antibodies"
                    iconName="folder_open"
                    interactive={true}
                >
                    <span>Antibodies</span>
                </HamburgerEntry>
                <HamburgerEntry
                    href="/lines"
                    iconName="folder_open"
                    interactive={true}
                >
                    <span>TC</span>
                </HamburgerEntry>
                <HamburgerEntry
                    href="/yeaststrains"
                    iconName="folder_open"
                    interactive={true}
                >
                    <span>Yeast</span>
                </HamburgerEntry>
            </div>
        );
    },
});
{'fraction_non_alphanumeric': 0.10858500169664065, 'fraction_numerical': 0.0, 'mean_word_length': 1.345980366144866, 'pattern_counts': {'":': 0, '<': 155, '<?xml version=': 0, '>': 155, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1407019', 'n_tokens_mistral': 2365, 'n_tokens_neox': 2126, 'n_words': 348}