UNPKG

@react-form-builder/core

Version:

React JSON Schema Form Builder to create complex, validated, reusable forms with no deep React knowledge required

27 lines (26 loc) 610 B
import { emptyPropertiesContext as u } from "./emptyPropertiesContext.js"; const a = (e) => ({ onChange: (t) => { e.setValue(t.value); }, onBlur: () => { e.setTouched(); } }), l = (e, t, r) => ({ propertyName: e, get propertyValue() { return t.value ?? r.uncontrolledValue; } }), p = (e, t, r) => { if (!e || !t.valued) return u; const n = a(e), o = t.kind !== "template" ? l(t.valued, e, t) : void 0; return { eventHandlers: n, valueProperty: o, cellInfo: r }; }; export { p as getFieldPropertiesContext }; //# sourceMappingURL=getFieldPropertiesContext.js.map