Files
ETB/ETB-FrontEnd/node_modules/.cache/babel-loader/2b7e5c5ca42d03d60cf197af1bf20fd2388df711fce25f68bf505a90b507bd1c.json
Iliyan Angelov 306b20e24a Frontend start
2025-09-14 00:54:48 +03:00

1 line
3.2 KiB
JSON

{"ast":null,"code":"import * as React from 'react';\nexport class ErrorBoundary extends React.Component {\n static getDerivedStateFromError(error) {\n // Update state so the next render will show the fallback UI.\n return {\n hasError: true,\n error\n };\n }\n componentDidCatch(error, errorInfo) {\n if (this.props.api.current) {\n this.logError(error); // Allows to trigger the Error event and all listener can run on Error\n\n this.props.api.current.showError({\n error,\n errorInfo\n });\n }\n }\n logError(error, errorInfo) {\n this.props.logger.error(`An unexpected error occurred. Error: ${error && error.message}. `, error, errorInfo);\n }\n render() {\n var _this$state;\n if (this.props.hasError || (_this$state = this.state) != null && _this$state.hasError) {\n // You can render any custom fallback UI\n return this.props.render(this.state);\n }\n return this.props.children;\n }\n}","map":{"version":3,"names":["React","ErrorBoundary","Component","getDerivedStateFromError","error","hasError","componentDidCatch","errorInfo","props","api","current","logError","showError","logger","message","render","_this$state","state","children"],"sources":["/home/gnx/Desktop/ETB/ETB-FrontEnd/node_modules/@mui/x-data-grid/components/ErrorBoundary.js"],"sourcesContent":["import * as React from 'react';\nexport class ErrorBoundary extends React.Component {\n static getDerivedStateFromError(error) {\n // Update state so the next render will show the fallback UI.\n return {\n hasError: true,\n error\n };\n }\n\n componentDidCatch(error, errorInfo) {\n if (this.props.api.current) {\n this.logError(error); // Allows to trigger the Error event and all listener can run on Error\n\n this.props.api.current.showError({\n error,\n errorInfo\n });\n }\n }\n\n logError(error, errorInfo) {\n this.props.logger.error(`An unexpected error occurred. Error: ${error && error.message}. `, error, errorInfo);\n }\n\n render() {\n var _this$state;\n\n if (this.props.hasError || (_this$state = this.state) != null && _this$state.hasError) {\n // You can render any custom fallback UI\n return this.props.render(this.state);\n }\n\n return this.props.children;\n }\n\n}"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,OAAO,MAAMC,aAAa,SAASD,KAAK,CAACE,SAAS,CAAC;EACjD,OAAOC,wBAAwBA,CAACC,KAAK,EAAE;IACrC;IACA,OAAO;MACLC,QAAQ,EAAE,IAAI;MACdD;IACF,CAAC;EACH;EAEAE,iBAAiBA,CAACF,KAAK,EAAEG,SAAS,EAAE;IAClC,IAAI,IAAI,CAACC,KAAK,CAACC,GAAG,CAACC,OAAO,EAAE;MAC1B,IAAI,CAACC,QAAQ,CAACP,KAAK,CAAC,CAAC,CAAC;;MAEtB,IAAI,CAACI,KAAK,CAACC,GAAG,CAACC,OAAO,CAACE,SAAS,CAAC;QAC/BR,KAAK;QACLG;MACF,CAAC,CAAC;IACJ;EACF;EAEAI,QAAQA,CAACP,KAAK,EAAEG,SAAS,EAAE;IACzB,IAAI,CAACC,KAAK,CAACK,MAAM,CAACT,KAAK,CAAC,wCAAwCA,KAAK,IAAIA,KAAK,CAACU,OAAO,IAAI,EAAEV,KAAK,EAAEG,SAAS,CAAC;EAC/G;EAEAQ,MAAMA,CAAA,EAAG;IACP,IAAIC,WAAW;IAEf,IAAI,IAAI,CAACR,KAAK,CAACH,QAAQ,IAAI,CAACW,WAAW,GAAG,IAAI,CAACC,KAAK,KAAK,IAAI,IAAID,WAAW,CAACX,QAAQ,EAAE;MACrF;MACA,OAAO,IAAI,CAACG,KAAK,CAACO,MAAM,CAAC,IAAI,CAACE,KAAK,CAAC;IACtC;IAEA,OAAO,IAAI,CAACT,KAAK,CAACU,QAAQ;EAC5B;AAEF","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}