Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
this.interactive = {
sids: [],
targets: {}
};
this.schema = schema;
this.suite = { ...suite };
this.projectDirectory = projectDirectory;
this.outputDirectory = outputDirectory;
this.snippets = { targets: {}, groups: {}, ...snippets };
this.env = env;
this.options = options;
this.runner = runner; // RUNNER_PUPPETRY when embedded
this.allTargets = Object.values({ ...sharedTargets, ...snippets.targets, ...targets });
// resolve css prop
this.normalizedTargets = mapSelectors( getActiveTargets( this.allTargets ) )
//.filter( entry => !entry.ref )
.reduce( ( carry, entry ) => {
carry[ entry.target ] = entry;
return carry;
}, {});
this.targets = this.allTargets.reduce( ( carry, entry ) => {
carry[ entry.target ] = entry.selector;
return carry;
}, {});
}
render() {
const { placeholder, dataIndex, record, prefixIcon, className, type, targets } = this.props,
{ getFieldDecorator } = this.props.form,
{ editing } = record,
inputOtherProps = type ? { type } : {},
value = record[ dataIndex ],
ref = this.state.hasOwnProperty( "ref" ) ? this.state.ref : record.ref,
activeTargets = getActiveTargets( targets ).filter( target => target.target !== record.target );
return (
<div>
{
editing ? (
<form>
{ getFieldDecorator( dataIndex, {
initialValue: value,
rules: [
{
validator: ruleValidateNotEmptyString
},
{
transform: ( value ) => value.trim()
}</form></div>