{"version":3,"sources":["webpack:///./Scripts/UniGraphics/Components/QuantityField.js","webpack:///./Scripts/UniGraphics/Components/QuantityField.Container.js"],"names":["value","fieldId","maxvalue","onChange","Fragment","className","onClick","id","e","target","min","max","maxLength","QuantityFieldContainer","Component","constructor","props","super","this","state","bind","nextValue","errorEl","document","getElementsByClassName","innerHTML","errorMessageMaxvalue","setState","parseInt","render"],"mappings":"8HAGA,MAQA,EARsB,EAAGA,QAAOC,UAASC,WAAUC,cAC/C,gBAAC,EAAAC,SAAD,KACI,uBAAKC,UAAW,qCAAuCL,GAAS,EAAI,eAAiB,IAAKM,QAAS,IAAMH,EAASH,EAAQ,KAC1H,yBAAOK,UAAU,iCAAiCE,GAAIN,EAASD,MAAOA,EAAOG,SAAWK,GAAML,EAASK,EAAEC,OAAOT,OAAQU,IAAI,IAAIC,IAAKT,EAAUU,UAAU,MACzJ,uBAAKP,UAAW,qCAAuCL,GAASE,EAAW,eAAiB,IAAKI,QAAS,IAAMH,EAASH,EAAQ,M,+MCJzI,MAAMa,UAA+BC,YACjCC,YAAYC,GACRC,MAAMD,GACNE,KAAKC,MAAQ,CACXnB,MAAO,GAETkB,KAAKf,SAAWe,KAAKf,SAASiB,KAAKF,MAGvCf,SAASkB,GACL,IAAIC,EAAUC,SAASC,uBAAuB,iBAAiB,GAC3DH,EAAkC,EAAtBH,KAAKF,MAAMd,UACvBmB,EAAkC,EAAtBH,KAAKF,MAAMd,SACvBoB,EAAQG,UAAYP,KAAKF,MAAMU,sBAE/BJ,EAAQG,UAAY,GAExBP,KAAKS,SAAS,CACV3B,MAAO4B,SAASP,IAAc,IAKtCQ,SACI,OACI,gBAAC,EAAD,KAAmBX,KAAKF,MAAxB,CAA+Bb,SAAUe,KAAKf,SAAUH,MAAOkB,KAAKC,MAAMnB,UAKtF","file":"64.9ddab231a8c47f0ccf8a.js","sourcesContent":["import React, { Fragment } from 'react';\r\n\r\n\r\nconst QuantityField = ({ value, fieldId, maxvalue, onChange }) => (\r\n    <Fragment>\r\n        <div className={\"quantity-field__decrease noselect\" + (value <= 1 ? ' is-disabled' : '')} onClick={() => onChange(value - 1)}></div>\r\n        <input className=\"quantity-field__input noselect\" id={fieldId} value={value} onChange={(e) => onChange(e.target.value)} min=\"0\" max={maxvalue} maxLength=\"3\" />\r\n        <div className={\"quantity-field__increase noselect\" + (value >= maxvalue ? ' is-disabled' : '')} onClick={() => onChange(value + 1)}></div>\r\n    </Fragment>\r\n);\r\n\r\nexport default QuantityField;","import React, { Component } from 'react';\r\nimport QuantityField from '../Components/QuantityField';\r\n\r\nclass QuantityFieldContainer extends Component {\r\n    constructor(props) {\r\n        super(props);\r\n        this.state = {\r\n          value: 1\r\n        }\r\n        this.onChange = this.onChange.bind(this)\r\n    }\r\n\r\n    onChange(nextValue) {\r\n        let errorEl = document.getElementsByClassName('error-message')[0];\r\n        if (nextValue > this.props.maxvalue * 1) {\r\n            nextValue = this.props.maxvalue * 1;\r\n            errorEl.innerHTML = this.props.errorMessageMaxvalue;\r\n        } else {\r\n            errorEl.innerHTML = '';\r\n        }\r\n        this.setState({\r\n            value: parseInt(nextValue) || 1\r\n           \r\n        });\r\n    }\r\n\r\n    render() {\r\n        return (\r\n            <QuantityField {...this.props} onChange={this.onChange} value={this.state.value} />\r\n        );\r\n    }\r\n}\r\n\r\nexport default QuantityFieldContainer;"],"sourceRoot":""}