Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
))}
{!isValid ? errors : showDescription ? description : null}
);
}
}
export const materialRadioGroupControlTester: RankedTester = rankWith(
2,
optionIs('format', 'radio')
);
export default withJsonFormsControlProps(MaterialRadioGroupControl);
);
}
}
export interface StatePropsOfDateControl extends StatePropsOfControl {
defaultLabel: string;
cancelLabel: string;
clearLabel: string;
}
export const materialDateControlTester: RankedTester = rankWith(
4,
isDateControl
);
export default withJsonFormsControlProps(MaterialDateControl);
keyboardIcon={}
timeIcon={}
InputProps={inputProps}
/>
);
}
}
export const materialDateTimeControlTester: RankedTester = rankWith(
2,
isDateTimeControl
);
export default withJsonFormsControlProps(MaterialDateTimeControl);
RankedTester,
rankWith
} from '@jsonforms/core';
import { withJsonFormsControlProps } from '@jsonforms/react';
import { MuiInputText } from '../mui-controls/MuiInputText';
import { MaterialInputControl } from './MaterialInputControl';
export const MaterialTextControl = (props: ControlProps) => (
);
export const materialTextControlTester: RankedTester = rankWith(
1,
isStringControl
);
export default withJsonFormsControlProps(MaterialTextControl);
schema={schema}
path={path}
id={id + '-input'}
/>
<div>
{!isValid ? errors : showDescription ? description : null}
</div>
);
}
}
}
export const inputControlTester: RankedTester = rankWith(1, isControl);
export default withVanillaControlProps(withJsonFormsControlProps(InputControl));
step={schema.multipleOf || 1}
/>
{!isValid ? errors : showDescription ? description : null}
);
}
}
export const materialSliderControlTester: RankedTester = rankWith(
4,
isRangeControl
);
export default withJsonFormsControlProps(MaterialSliderControl);
s => s !== enumSchema || s !== stringSchema
);
const wrongType = remainingSchemas.find(s => s.type && s.type !== 'string');
return enumSchema && stringSchema && !wrongType;
};
const simpleAnyOf = and(
uiTypeIs('Control'),
schemaMatches(
schema => schema.hasOwnProperty('anyOf') && hasEnumAndText(schema.anyOf)
)
);
export const materialAnyOfStringOrEnumControlTester: RankedTester = rankWith(
5,
simpleAnyOf
);
export default withJsonFormsControlProps(MaterialAnyOfStringOrEnumControl);
onChange={ev => this.handleChange(ev.currentTarget.value)}
/>
<label>{optionValue}</label>
))}
<div>
{!isValid ? errors : showDescription ? description : null}
</div>
);
}
}
export default withVanillaControlProps(
withJsonFormsControlProps(RadioGroupControl)
);
rootSchema={rootSchema}
handleChange={handleChange}
errors={errors}
config={config}
/>
}
/>
);
};
export const materialBooleanControlTester: RankedTester = rankWith(
2,
isBooleanControl
);
export default withJsonFormsControlProps(MaterialBooleanControl);
helperText={!isValid ? errors : showDescription ? description : null}
InputLabelProps={{ shrink: true }}
value={data}
onChange={onChange}
/>
);
}
}
export const materialNativeControlTester: RankedTester = rankWith(
2,
or(isDateControl, isTimeControl)
);
export default withJsonFormsControlProps(MaterialNativeControl);