{"version":3,"sources":["middlewares/InputMw.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAExD,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,4BAA4B,CAY1D,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,4BAA4B,CAa7D,CAAC;AAEF,eAAe,OAAO,CAAC","file":"InputMw.d.ts","sourcesContent":["import * as React from 'react';\nimport get from 'lodash/get';\nimport { InputGroup, TextArea } from '@blueprintjs/core';\nimport { BlueprintFormMiddlewareProps } from '../share';\n\nexport const InputMw: React.FC<BlueprintFormMiddlewareProps> = (props) => {\n  const { next, schema, data, onChange, extraProps } = props;\n  if (typeof schema === 'boolean' || schema.type !== 'string') return next(props);\n  return (\n    <InputGroup\n      value={data || ''}\n      onChange={(e: any) => {\n        onChange(e.target.value || undefined);\n      }}\n      {...get(extraProps, 'props')}\n    />\n  );\n};\n\nexport const TextAreaMw: React.FC<BlueprintFormMiddlewareProps> = (props) => {\n  const { next, schema, data, onChange, extraProps } = props;\n  if (typeof schema === 'boolean' || schema.type !== 'string') return next(props);\n  return (\n    <TextArea\n      style={{ width: '100%' }}\n      value={data || ''}\n      onChange={(e: any) => {\n        onChange(e.target.value || undefined);\n      }}\n      {...get(extraProps, 'props')}\n    />\n  );\n};\n\nexport default InputMw;\n"]}