Liferay.Loader.define("dynamic-data-mapping-form-field-type@6.0.108/Validation/DDMQuantity",["module","exports","require","@frontend-taglib-clay$clayui/form","liferay!frontend-js-react-web$react","../util/numericalOperations"],(function(e,t,r){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r("@frontend-taglib-clay$clayui/form"),a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var l=n?Object.getOwnPropertyDescriptor(e,a):null;l&&(l.get||l.set)?Object.defineProperty(r,a,l):r[a]=e[a]}r.default=e,t&&t.set(e,r);return r}(r("liferay!frontend-js-react-web$react")),l=r("../util/numericalOperations");function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}const e=999,o=1;var i=({label:t,name:r,onQuantityChange:u,readOnly:i,value:f})=>{const[c,d]=(0,a.useState)(f.toString());return(0,a.useEffect)((()=>{d(f.toString())}),[f]),a.default.createElement("label",null,t,a.default.createElement(n.ClayInput,{disabled:i,max:e,min:o,name:r,onBlur:({target:t})=>{const r=(0,l.limitValue)({defaultValue:o,max:e,min:o,value:parseInt(t.value,10)});d(r.toString()),u(r)},onChange:({target:{value:e}})=>{d(e)},onKeyPress:e=>{/[-.+,]/.test(e.key)&&e.preventDefault()},type:"number",value:c}))};t.default=i}}));
//# sourceMappingURL=DDMQuantity.js.map