mirror of
https://github.com/idanoo/GoScrobble.git
synced 2024-11-24 09:25:15 +00:00
1 line
4.5 KiB
JSON
1 line
4.5 KiB
JSON
{"ast":null,"code":"import * as PropTypes from 'prop-types';\nimport chainPropTypes from './chainPropTypes';\n\nfunction isClassComponent(elementType) {\n // elementType.prototype?.isReactComponent\n var _elementType$prototyp = elementType.prototype,\n prototype = _elementType$prototyp === void 0 ? {} : _elementType$prototyp;\n return Boolean(prototype.isReactComponent);\n}\n\nfunction elementTypeAcceptingRef(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var safePropName = propFullName || propName;\n\n if (propValue == null) {\n return null;\n }\n\n var warningHint;\n /**\n * Blacklisting instead of whitelisting\n *\n * Blacklisting will miss some components, such as React.Fragment. Those will at least\n * trigger a warning in React.\n * We can't whitelist because there is no safe way to detect React.forwardRef\n * or class components. \"Safe\" means there's no public API.\n *\n */\n\n if (typeof propValue === 'function' && !isClassComponent(propValue)) {\n warningHint = 'Did you accidentally provide a plain function component instead?';\n }\n\n if (warningHint !== undefined) {\n return new Error(\"Invalid \".concat(location, \" `\").concat(safePropName, \"` supplied to `\").concat(componentName, \"`. \") + \"Expected an element type that can hold a ref. \".concat(warningHint, \" \") + 'For more information see https://material-ui.com/r/caveat-with-refs-guide');\n }\n\n return null;\n}\n\nexport default chainPropTypes(PropTypes.elementType, elementTypeAcceptingRef);","map":{"version":3,"sources":["/app/node_modules/@material-ui/utils/esm/elementTypeAcceptingRef.js"],"names":["PropTypes","chainPropTypes","isClassComponent","elementType","_elementType$prototyp","prototype","Boolean","isReactComponent","elementTypeAcceptingRef","props","propName","componentName","location","propFullName","propValue","safePropName","warningHint","undefined","Error","concat"],"mappings":"AAAA,OAAO,KAAKA,SAAZ,MAA2B,YAA3B;AACA,OAAOC,cAAP,MAA2B,kBAA3B;;AAEA,SAASC,gBAAT,CAA0BC,WAA1B,EAAuC;AACrC;AACA,MAAIC,qBAAqB,GAAGD,WAAW,CAACE,SAAxC;AAAA,MACIA,SAAS,GAAGD,qBAAqB,KAAK,KAAK,CAA/B,GAAmC,EAAnC,GAAwCA,qBADxD;AAEA,SAAOE,OAAO,CAACD,SAAS,CAACE,gBAAX,CAAd;AACD;;AAED,SAASC,uBAAT,CAAiCC,KAAjC,EAAwCC,QAAxC,EAAkDC,aAAlD,EAAiEC,QAAjE,EAA2EC,YAA3E,EAAyF;AACvF,MAAIC,SAAS,GAAGL,KAAK,CAACC,QAAD,CAArB;AACA,MAAIK,YAAY,GAAGF,YAAY,IAAIH,QAAnC;;AAEA,MAAII,SAAS,IAAI,IAAjB,EAAuB;AACrB,WAAO,IAAP;AACD;;AAED,MAAIE,WAAJ;AACA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEE,MAAI,OAAOF,SAAP,KAAqB,UAArB,IAAmC,CAACZ,gBAAgB,CAACY,SAAD,CAAxD,EAAqE;AACnEE,IAAAA,WAAW,GAAG,kEAAd;AACD;;AAED,MAAIA,WAAW,KAAKC,SAApB,EAA+B;AAC7B,WAAO,IAAIC,KAAJ,CAAU,WAAWC,MAAX,CAAkBP,QAAlB,EAA4B,IAA5B,EAAkCO,MAAlC,CAAyCJ,YAAzC,EAAuD,iBAAvD,EAA0EI,MAA1E,CAAiFR,aAAjF,EAAgG,KAAhG,IAAyG,iDAAiDQ,MAAjD,CAAwDH,WAAxD,EAAqE,GAArE,CAAzG,GAAqL,2EAA/L,CAAP;AACD;;AAED,SAAO,IAAP;AACD;;AAED,eAAef,cAAc,CAACD,SAAS,CAACG,WAAX,EAAwBK,uBAAxB,CAA7B","sourcesContent":["import * as PropTypes from 'prop-types';\nimport chainPropTypes from './chainPropTypes';\n\nfunction isClassComponent(elementType) {\n // elementType.prototype?.isReactComponent\n var _elementType$prototyp = elementType.prototype,\n prototype = _elementType$prototyp === void 0 ? {} : _elementType$prototyp;\n return Boolean(prototype.isReactComponent);\n}\n\nfunction elementTypeAcceptingRef(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var safePropName = propFullName || propName;\n\n if (propValue == null) {\n return null;\n }\n\n var warningHint;\n /**\n * Blacklisting instead of whitelisting\n *\n * Blacklisting will miss some components, such as React.Fragment. Those will at least\n * trigger a warning in React.\n * We can't whitelist because there is no safe way to detect React.forwardRef\n * or class components. \"Safe\" means there's no public API.\n *\n */\n\n if (typeof propValue === 'function' && !isClassComponent(propValue)) {\n warningHint = 'Did you accidentally provide a plain function component instead?';\n }\n\n if (warningHint !== undefined) {\n return new Error(\"Invalid \".concat(location, \" `\").concat(safePropName, \"` supplied to `\").concat(componentName, \"`. \") + \"Expected an element type that can hold a ref. \".concat(warningHint, \" \") + 'For more information see https://material-ui.com/r/caveat-with-refs-guide');\n }\n\n return null;\n}\n\nexport default chainPropTypes(PropTypes.elementType, elementTypeAcceptingRef);"]},"metadata":{},"sourceType":"module"} |