mirror of
https://github.com/idanoo/GoScrobble.git
synced 2024-11-24 09:25:15 +00:00
1 line
3.4 KiB
JSON
1 line
3.4 KiB
JSON
{"ast":null,"code":"// Supports determination of isControlled().\n// Controlled input accepts its current value as a prop.\n//\n// @see https://facebook.github.io/react/docs/forms.html#controlled-components\n// @param value\n// @returns {boolean} true if string (including '') or number (including zero)\nexport function hasValue(value) {\n return value != null && !(Array.isArray(value) && value.length === 0);\n} // Determine if field is empty or filled.\n// Response determines if label is presented above field or as placeholder.\n//\n// @param obj\n// @param SSR\n// @returns {boolean} False when not present or empty string.\n// True when any number or string with length.\n\nexport function isFilled(obj) {\n var SSR = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n return obj && (hasValue(obj.value) && obj.value !== '' || SSR && hasValue(obj.defaultValue) && obj.defaultValue !== '');\n} // Determine if an Input is adorned on start.\n// It's corresponding to the left with LTR.\n//\n// @param obj\n// @returns {boolean} False when no adornments.\n// True when adorned at the start.\n\nexport function isAdornedStart(obj) {\n return obj.startAdornment;\n}","map":{"version":3,"sources":["/app/node_modules/@material-ui/core/esm/InputBase/utils.js"],"names":["hasValue","value","Array","isArray","length","isFilled","obj","SSR","arguments","undefined","defaultValue","isAdornedStart","startAdornment"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,QAAT,CAAkBC,KAAlB,EAAyB;AAC9B,SAAOA,KAAK,IAAI,IAAT,IAAiB,EAAEC,KAAK,CAACC,OAAN,CAAcF,KAAd,KAAwBA,KAAK,CAACG,MAAN,KAAiB,CAA3C,CAAxB;AACD,C,CAAC;AACF;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAO,SAASC,QAAT,CAAkBC,GAAlB,EAAuB;AAC5B,MAAIC,GAAG,GAAGC,SAAS,CAACJ,MAAV,GAAmB,CAAnB,IAAwBI,SAAS,CAAC,CAAD,CAAT,KAAiBC,SAAzC,GAAqDD,SAAS,CAAC,CAAD,CAA9D,GAAoE,KAA9E;AACA,SAAOF,GAAG,KAAKN,QAAQ,CAACM,GAAG,CAACL,KAAL,CAAR,IAAuBK,GAAG,CAACL,KAAJ,KAAc,EAArC,IAA2CM,GAAG,IAAIP,QAAQ,CAACM,GAAG,CAACI,YAAL,CAAf,IAAqCJ,GAAG,CAACI,YAAJ,KAAqB,EAA1G,CAAV;AACD,C,CAAC;AACF;AACA;AACA;AACA;AACA;;AAEA,OAAO,SAASC,cAAT,CAAwBL,GAAxB,EAA6B;AAClC,SAAOA,GAAG,CAACM,cAAX;AACD","sourcesContent":["// Supports determination of isControlled().\n// Controlled input accepts its current value as a prop.\n//\n// @see https://facebook.github.io/react/docs/forms.html#controlled-components\n// @param value\n// @returns {boolean} true if string (including '') or number (including zero)\nexport function hasValue(value) {\n return value != null && !(Array.isArray(value) && value.length === 0);\n} // Determine if field is empty or filled.\n// Response determines if label is presented above field or as placeholder.\n//\n// @param obj\n// @param SSR\n// @returns {boolean} False when not present or empty string.\n// True when any number or string with length.\n\nexport function isFilled(obj) {\n var SSR = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n return obj && (hasValue(obj.value) && obj.value !== '' || SSR && hasValue(obj.defaultValue) && obj.defaultValue !== '');\n} // Determine if an Input is adorned on start.\n// It's corresponding to the left with LTR.\n//\n// @param obj\n// @returns {boolean} False when no adornments.\n// True when adorned at the start.\n\nexport function isAdornedStart(obj) {\n return obj.startAdornment;\n}"]},"metadata":{},"sourceType":"module"} |