How to use robe-react-commons - 10 common examples

To help you get started, we’ve selected a few robe-react-commons examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github robeio / robe-react-ui / src / validation / InputValidations.js View on Github external
maxLength = (max: number, value: string, code: string): string => {
        let message = Application.i18n(undefined, "validation.InputValidations", "maxLength");
        let valueLength = (value === undefined || value === null) ? 0 : value.length;
        /* eslint-disable no-eval */
        let result = (valueLength > max) ?
            template(message, {
                max: max,
                value: value,
                code: code,
            }) : undefined;
        return result;
    }
    regex = (regex: string, value: any, code: string): string => {
github robeio / robe-react-ui / src / validation / InputValidations.js View on Github external
minLength = (min: number, value: string, code: string): string => {
        let message = Application.i18n(undefined, "validation.InputValidations", "minLength");
        let valueLength = (value === undefined || value === null) ? 0 : value.length;
        /* eslint-disable no-eval */
        return (valueLength < min) ?
            template(message, {
                min: min,
                value: value,
                code: code,
            }) : undefined;
    }
    maxLength = (max: number, value: string, code: string): string => {
github robeio / robe-react-ui / src / validation / InputValidations.js View on Github external
required = (value: any, code: string): string => {
        let message = Application.i18n(undefined, "validation.InputValidations", "required");
        /* eslint-disable no-eval */
        return (value === undefined || value === null || value === "" || value.length === 0) ?
            template(message, {
                value: value,
                code: code
            }) : undefined;
    }
    htmlRequired = (value: any, code: string): string => {
github robeio / robe-react-ui / src / validation / InputValidations.js View on Github external
minValue = (minValue: number, value: number, code: string): string => {
        let message = Application.i18n(undefined, "validation.InputValidations", "minValue");
        /* eslint-disable no-eval */
        return (value === undefined || value === null || value < minValue) ?
            template(message, {
                minValue: minValue,
                value: value,
                code: code
            }) : undefined;
    }
    maxValue = (maxValue: number, value: number, code: string): string => {
github robeio / robe-react-ui / src / validation / InputValidations.js View on Github external
maxValue = (maxValue: number, value: number, code: string): string => {
        let message = Application.i18n(undefined, "validation.InputValidations", "maxValue");

        /* eslint-disable no-eval */
        return (value === undefined || value === null || value > maxValue) ?
            template(message, {
                maxValue: maxValue,
                value: value,
                code: code
            }) : undefined;
    }
    minLength = (min: number, value: string, code: string): string => {
github robeio / robe-react-ui / src / datagrid / DataGrid.jsx View on Github external
create: {
                visible: false,
                text: Application.i18n(DataGrid, "datagrid.DataGrid", "toolbar", "create"),
                icon: "fa-plus",
                onClick: this.props.onNewClick
            },
            edit: {
                visible: false,
                text: Application.i18n(DataGrid, "datagrid.DataGrid", "toolbar", "edit"),
                icon: "fa-pencil",
                onClick: this.props.onEditClick,
                disabled: !this.state.hasSelection
            },
            delete: {
                visible: false,
                text: Application.i18n(DataGrid, "datagrid.DataGrid", "toolbar", "delete"),
                icon: "fa-trash",
                onClick: this.__showDeleteConfirm,
                disabled: !this.state.hasSelection
            }
        };

        Maps.forEach(this.props.toolbar, (item: Object) => {
            if (is.string(item)) {
                if (!(config[item] === undefined)) {
                    config[item].visible = true;
                } else {
                    console.warn("command not found please use create,edit,delete or use your custom command"); //eslint-disable-line
                }
            } else if (is.hash(item)) {
                if (config[item.name] === undefined) {
                    config[item.name] = {};
github robeio / robe-react-ui / site / sampleprojects / SampleProjects.jsx View on Github external
render(): Object {
        return (
            
                
                    <h2>{Application.i18n(SampleProjects, "sampleprojects.SampleProjects", "title")}</h2>
                    <h5>{Application.i18n(SampleProjects, "sampleprojects.SampleProjects", "header")}</h5>
                
                <br>
                {this.renderProjects()}
            
        );
    }
github robeio / robe-react-ui / site / components / samples / buttons / ButtonSample.jsx View on Github external
render():Object {
        return (
            <div>
                {Application.i18n(ButtonSample,"buttons.ButtonSample","buttonNormal")}
                <div>
                    <button>Normal</button>
                </div>
                {Application.i18n(ButtonSample,"buttons.ButtonSample","buttonAsync")}
                <div>
                    <button>{Application.i18n(ButtonSample,"buttons.ButtonSample","async")}</button>
                </div>
                <a rel="noopener noreferrer" href="https://react-bootstrap.github.io/components.html#buttons">{Application.i18n(ButtonSample,"buttons.ButtonSample","forMoreLink")}</a>
            </div>
        );
    }
    static onClick(e: Object) {
github robeio / robe-react-ui / site / error / NotFound.jsx View on Github external
render() {
        return (<div style="{NotFound.style}">
            <img src="./notfound.gif">
            <h1>{Application.i18n(NotFound,"error.NotFound","message")}</h1>
        </div>);
    }
github robeio / robe-react-ui / src / inputs / PasswordInput.jsx View on Github external
constructor(props: Object) {
        super(props);
        this.strengthMessages = Application.i18n(PasswordInput, "inputs.PasswordInput", "strength");
    }
    /**

robe-react-commons

Robe React Commons

MIT
Latest version published 8 years ago

Package Health Score

46 / 100
Full package analysis

Popular robe-react-commons functions