Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
visible,
required,
config,
input
} = this.props;
const isValid = errors.length === 0;
const appliedUiSchemaOptions = merge({}, config, uischema.options);
const inputLabelStyle: { [x: string]: any } = {
whiteSpace: 'nowrap',
overflow: 'hidden',
textOverflow: 'ellipsis',
// magic width as the label is transformed to 75% of its size
width: '125%'
};
const showDescription = !isDescriptionHidden(
visible,
description,
this.state.isFocused,
appliedUiSchemaOptions.showUnfocusedDescription
);
const firstFormHelperText = showDescription
? description
: !isValid
? errors
: null;
const secondFormHelperText = showDescription && !isValid ? errors : null;
const InnerComponent = input;
return (
uischema,
schema,
visible,
required,
path,
cells,
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 (
uischema,
visible,
enabled,
required,
path,
handleChange,
data,
momentLocale,
config
} = this.props;
const defaultLabel = label as string;
const cancelLabel = '%cancel';
const clearLabel = '%clear';
const isValid = errors.length === 0;
const appliedUiSchemaOptions = merge({}, config, uischema.options);
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;
id,
label,
required,
description,
errors,
data,
schema,
visible
} = this.props;
const isValid = errors.length === 0;
const appliedUiSchemaOptions = merge(
{},
config,
this.props.uischema.options
);
const showDescription = !isDescriptionHidden(
visible,
description,
this.state.isFocused,
appliedUiSchemaOptions.showUnfocusedDescription
);
const options = schema.enum;
return (
schema,
uischema,
visible,
config
} = this.props;
const isValid = errors.length === 0;
const divClassNames = `validation ${
isValid ? classNames.description : 'validation_error'
}`;
const groupStyle: { [x: string]: any } = {
display: 'flex',
flexDirection: 'row'
};
const appliedUiSchemaOptions = merge({}, config, uischema.options);
const showDescription = !isDescriptionHidden(
visible,
description,
this.state.isFocused,
appliedUiSchemaOptions.showUnfocusedDescription
);
const options = schema.enum;
return (
<div hidden="{!visible}">
<label></label></div>
whiteSpace: 'nowrap',
overflow: 'hidden',
textOverflow: 'ellipsis',
width: '100%'
};
const rangeContainerStyle: { [x: string]: any } = {
display: 'flex'
};
const rangeItemStyle: { [x: string]: any } = {
flexGrow: '1'
};
const sliderStyle: { [x: string]: any } = {
marginTop: '7px'
};
const showDescription = !isDescriptionHidden(
visible,
description,
this.state.isFocused,
appliedUiSchemaOptions.showUnfocusedDescription
);
return (
{computeLabel(
isPlainLabel(label) ? label : label.default,
visible,
required,
path,
handleChange,
data,
config
} = this.props;
const isValid = errors.length === 0;
const appliedUiSchemaOptions = merge(
{},
config,
this.props.uischema.options
);
const onChange = (ev: any) => handleChange(path, ev.target.value);
const fieldType = schema.format;
const showDescription = !isDescriptionHidden(
visible,
description,
this.state.isFocused,
appliedUiSchemaOptions.showUnfocusedDescription
);
return (