UNPKG

@hisptz/react-ui

Version:

A collection of reusable complex DHIS2 react ui components.

21 lines (15 loc) 623 B
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } import { defaultsDeep } from "lodash"; export default class FormFieldModel { constructor(attributes) { _defineProperty(this, "id", void 0); _defineProperty(this, "name", void 0); _defineProperty(this, "valueType", void 0); this.name = attributes.name; this.valueType = attributes.valueType; defaultsDeep(this, attributes, this.defaults); } get defaults() { return {}; } }