Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
config
} = this.props;
const isValid = errors.length === 0;
const divClassNames = `validation ${
isValid ? classNames.description : 'validation_error'
}`;
const appliedUiSchemaOptions = merge({}, config, uischema.options);
const showDescription = !isDescriptionHidden(
visible,
description,
this.state.isFocused,
appliedUiSchemaOptions.showUnfocusedDescription
);
const labelText = isPlainLabel(label) ? label : label.default;
const cell = maxBy(cells, r => r.tester(uischema, schema));
if (
cell === undefined ||
cell.tester(uischema, schema) === NOT_APPLICABLE
) {
console.warn('No applicable cell found.', uischema, schema);
return null;
} else {
return (
<div id="{id}" hidden="{!visible}"></div>
this.state.isFocused,
appliedUiSchemaOptions.showUnfocusedDescription
);
const options = schema.enum;
return (
<div hidden="{!visible}">
<label>
{computeLabel(
isPlainLabel(label) ? label : label.default,
required,
appliedUiSchemaOptions.hideRequiredAsterisk
)}
</label>
<div style="{groupStyle}">
{options.map(optionValue => (
<div>
<input checked="{data" name="{id}" id="{optionValue}" value="{optionValue}" type="radio"> this.handleChange(ev.currentTarget.value)}
/></div></div></div>
);
const onChange = (ev: any) => handleChange(path, ev.target.value);
const fieldType = schema.format;
const showDescription = !isDescriptionHidden(
visible,
description,
this.state.isFocused,
appliedUiSchemaOptions.showUnfocusedDescription
);
return (
);
(translations: Translations, label: string | Labels): (string | Labels) => {
if (label === undefined || label === null) {
return undefined;
}
if (isPlainLabel(label)) {
return translate(translations, label);
} else {
return _.mapValues(label, l => translate(translations, l)) as Labels;
}
};
path,
handleChange,
data,
config
} = this.props;
const appliedUiSchemaOptions = merge({}, config, uischema.options);
const isValid = errors.length === 0;
const inputProps = {};
return (
handleChange(path, datetime ? moment(datetime).format() : '')
}
format='MM/DD/YYYY h:mm a'
clearable={true}
disabled={!enabled}
const tableClass = getStyleAsClassName('array.table.table');
const labelClass = getStyleAsClassName('array.table.label');
const buttonClass = getStyleAsClassName('array.table.button');
const controlClass = [
getStyleAsClassName('array.table'),
convertToValidClassName(controlElement.scope)
].join(' ');
const createControlElement = (key?: string): ControlElement => ({
type: 'Control',
label: false,
scope: schema.type === 'object' ? `#/properties/${key}` : '#'
});
const labelObject = createLabelDescriptionFrom(controlElement, schema);
const isValid = errors.length === 0;
const divClassNames = 'validation' + (isValid ? '' : ' validation_error');
const labelText = isPlainLabel(label) ? label : label.default;
return (
<div hidden="{!visible}">
<header>
<label>{labelText}</label>
<button>
Add to {labelObject.text}
</button>
</header>
<div>
{!isValid ? errors : ''}
</div>
<table></table></div>
const showDescription = !isDescriptionHidden(
visible,
description,
this.state.isFocused,
appliedUiSchemaOptions.showUnfocusedDescription
);
const inputProps = {};
const localeDateTimeFormat = momentLocale
? `${momentLocale.localeData().longDateFormat('L')}`
: 'YYYY-MM-DD';
let labelText;
let labelCancel;
let labelClear;
if (isPlainLabel(label)) {
labelText = label;
labelCancel = 'Cancel';
labelClear = 'Clear';
} else {
labelText = defaultLabel;
labelCancel = startsWith(cancelLabel, '%') ? 'Cancel' : cancelLabel;
labelClear = startsWith(clearLabel, '%') ? 'Clear' : clearLabel;
}
return (
const options = schema.enum;
return (
{computeLabel(
isPlainLabel(label) ? label : label.default,
required,
appliedUiSchemaOptions.hideRequiredAsterisk
)}
this.handleChange(value)}
row={true}
>
{options.map(optionValue => (
}
label={optionValue}
);
const foundUISchema = findUISchema(
uischemas,
schema,
uischema.scope,
path,
undefined,
uischema
);
const appliedUiSchemaOptions = merge({}, config, uischema.options);
return (
{data > 0 ? (
map(range(data), index => (
visible,
description,
this.state.isFocused,
appliedUiSchemaOptions.showUnfocusedDescription
);
return (
{computeLabel(
isPlainLabel(label) ? label : label.default,
required,
appliedUiSchemaOptions.hideRequiredAsterisk
)}
<div style="{rangeContainerStyle}">
{schema.minimum}
{schema.maximum}
</div>