@e1011/es-kit 1.0.218 → 1.0.222
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/hooks/esm/index.css +28 -28
- package/dist/hooks/index.css +28 -28
- package/dist/lib/cjs/src/core/ui/components/error/ErrorBoundary.js +1 -1
- package/dist/lib/cjs/src/core/ui/components/error/ErrorBoundary.js.map +1 -1
- package/dist/lib/esm/src/core/ui/components/error/ErrorBoundary.js +1 -1
- package/dist/lib/esm/src/core/ui/components/error/ErrorBoundary.js.map +1 -1
- package/dist/lib/tsconfig.tsbuildinfo +1 -1
- package/dist/types/src/core/ui/components/error/ErrorBoundary.d.ts +4 -10
- package/dist/types/src/core/ui/components/error/ErrorBoundary.d.ts.map +1 -1
- package/dist/types/src/core/ui/components/error/errorBoundary.stories.d.ts +1 -0
- package/dist/types/src/core/ui/components/error/errorBoundary.stories.d.ts.map +1 -1
- package/dist/types/src/core/ui/components/error/errorBoundary.types.d.ts +7 -3
- package/dist/types/src/core/ui/components/error/errorBoundary.types.d.ts.map +1 -1
- package/dist/ui/esm/src/core/ui/components/error/ErrorBoundary.js +1 -1
- package/dist/ui/esm/src/core/ui/components/error/ErrorBoundary.js.map +1 -1
- package/dist/ui/src/core/ui/components/error/ErrorBoundary.js +1 -1
- package/dist/ui/src/core/ui/components/error/ErrorBoundary.js.map +1 -1
- package/dist/utils/esm/index.css +28 -28
- package/dist/utils/index.css +28 -28
- package/package.json +1 -1
package/dist/hooks/esm/index.css
CHANGED
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
.errorBoundary-module_errorBoundary__gk9ps {
|
|
2
|
-
background: #EFEFEF;
|
|
3
|
-
width: 100%;
|
|
4
|
-
height: 100%;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
.errorBoundary-module_StyledIcon__IYHiU {
|
|
8
|
-
margin-right: 10px;
|
|
9
|
-
}
|
|
10
1
|
.icon-module_icon-base-parent__nOMvW {
|
|
11
2
|
line-height: 1px !important;
|
|
12
3
|
}
|
|
@@ -37,6 +28,34 @@
|
|
|
37
28
|
width: var(--height);
|
|
38
29
|
height: var(--width);
|
|
39
30
|
}
|
|
31
|
+
.errorBoundary-module_errorBoundary__gk9ps {
|
|
32
|
+
background: #EFEFEF;
|
|
33
|
+
width: 100%;
|
|
34
|
+
height: 100%;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.errorBoundary-module_StyledIcon__IYHiU {
|
|
38
|
+
margin-right: 10px;
|
|
39
|
+
}
|
|
40
|
+
.divider-module_divider-line__6CesR {
|
|
41
|
+
position: relative;
|
|
42
|
+
display: block;
|
|
43
|
+
transition: opacity, width, height 250ms ease-in-out;
|
|
44
|
+
background-color: var(--color);
|
|
45
|
+
opacity: var(--opacity);
|
|
46
|
+
}
|
|
47
|
+
.divider-module_divider-line__6CesR.divider-module_vertical__qSVWD {
|
|
48
|
+
height: var(--length);
|
|
49
|
+
left: var(--left);
|
|
50
|
+
width: var(--width);
|
|
51
|
+
margin: var(--margin);
|
|
52
|
+
}
|
|
53
|
+
.divider-module_divider-line__6CesR.divider-module_horizontal__Gz-Oj {
|
|
54
|
+
width: var(--length);
|
|
55
|
+
left: var(--left);
|
|
56
|
+
height: var(--height);
|
|
57
|
+
margin: var(--margin);
|
|
58
|
+
}
|
|
40
59
|
.CollapsibleContainer-module_collapsible-container__u0Jmm {
|
|
41
60
|
transform-origin: 0% 0%;
|
|
42
61
|
opacity: 0;
|
|
@@ -70,25 +89,6 @@
|
|
|
70
89
|
max-width: var(--prop-value);
|
|
71
90
|
opacity: 1;
|
|
72
91
|
}
|
|
73
|
-
.divider-module_divider-line__6CesR {
|
|
74
|
-
position: relative;
|
|
75
|
-
display: block;
|
|
76
|
-
transition: opacity, width, height 250ms ease-in-out;
|
|
77
|
-
background-color: var(--color);
|
|
78
|
-
opacity: var(--opacity);
|
|
79
|
-
}
|
|
80
|
-
.divider-module_divider-line__6CesR.divider-module_vertical__qSVWD {
|
|
81
|
-
height: var(--length);
|
|
82
|
-
left: var(--left);
|
|
83
|
-
width: var(--width);
|
|
84
|
-
margin: var(--margin);
|
|
85
|
-
}
|
|
86
|
-
.divider-module_divider-line__6CesR.divider-module_horizontal__Gz-Oj {
|
|
87
|
-
width: var(--length);
|
|
88
|
-
left: var(--left);
|
|
89
|
-
height: var(--height);
|
|
90
|
-
margin: var(--margin);
|
|
91
|
-
}
|
|
92
92
|
.layoutBox-module_layout-box__ZIID8 {
|
|
93
93
|
display: flex;
|
|
94
94
|
position: relative;
|
package/dist/hooks/index.css
CHANGED
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
.errorBoundary-module_errorBoundary__gk9ps {
|
|
2
|
-
background: #EFEFEF;
|
|
3
|
-
width: 100%;
|
|
4
|
-
height: 100%;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
.errorBoundary-module_StyledIcon__IYHiU {
|
|
8
|
-
margin-right: 10px;
|
|
9
|
-
}
|
|
10
1
|
.icon-module_icon-base-parent__nOMvW {
|
|
11
2
|
line-height: 1px !important;
|
|
12
3
|
}
|
|
@@ -37,6 +28,34 @@
|
|
|
37
28
|
width: var(--height);
|
|
38
29
|
height: var(--width);
|
|
39
30
|
}
|
|
31
|
+
.errorBoundary-module_errorBoundary__gk9ps {
|
|
32
|
+
background: #EFEFEF;
|
|
33
|
+
width: 100%;
|
|
34
|
+
height: 100%;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.errorBoundary-module_StyledIcon__IYHiU {
|
|
38
|
+
margin-right: 10px;
|
|
39
|
+
}
|
|
40
|
+
.divider-module_divider-line__6CesR {
|
|
41
|
+
position: relative;
|
|
42
|
+
display: block;
|
|
43
|
+
transition: opacity, width, height 250ms ease-in-out;
|
|
44
|
+
background-color: var(--color);
|
|
45
|
+
opacity: var(--opacity);
|
|
46
|
+
}
|
|
47
|
+
.divider-module_divider-line__6CesR.divider-module_vertical__qSVWD {
|
|
48
|
+
height: var(--length);
|
|
49
|
+
left: var(--left);
|
|
50
|
+
width: var(--width);
|
|
51
|
+
margin: var(--margin);
|
|
52
|
+
}
|
|
53
|
+
.divider-module_divider-line__6CesR.divider-module_horizontal__Gz-Oj {
|
|
54
|
+
width: var(--length);
|
|
55
|
+
left: var(--left);
|
|
56
|
+
height: var(--height);
|
|
57
|
+
margin: var(--margin);
|
|
58
|
+
}
|
|
40
59
|
.CollapsibleContainer-module_collapsible-container__u0Jmm {
|
|
41
60
|
transform-origin: 0% 0%;
|
|
42
61
|
opacity: 0;
|
|
@@ -70,25 +89,6 @@
|
|
|
70
89
|
max-width: var(--prop-value);
|
|
71
90
|
opacity: 1;
|
|
72
91
|
}
|
|
73
|
-
.divider-module_divider-line__6CesR {
|
|
74
|
-
position: relative;
|
|
75
|
-
display: block;
|
|
76
|
-
transition: opacity, width, height 250ms ease-in-out;
|
|
77
|
-
background-color: var(--color);
|
|
78
|
-
opacity: var(--opacity);
|
|
79
|
-
}
|
|
80
|
-
.divider-module_divider-line__6CesR.divider-module_vertical__qSVWD {
|
|
81
|
-
height: var(--length);
|
|
82
|
-
left: var(--left);
|
|
83
|
-
width: var(--width);
|
|
84
|
-
margin: var(--margin);
|
|
85
|
-
}
|
|
86
|
-
.divider-module_divider-line__6CesR.divider-module_horizontal__Gz-Oj {
|
|
87
|
-
width: var(--length);
|
|
88
|
-
left: var(--left);
|
|
89
|
-
height: var(--height);
|
|
90
|
-
margin: var(--margin);
|
|
91
|
-
}
|
|
92
92
|
.layoutBox-module_layout-box__ZIID8 {
|
|
93
93
|
display: flex;
|
|
94
94
|
position: relative;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var e=require("react"),r=require("../container/layoutBox/LayoutBox.js"),t=require("./errorBoundary.module.scss.js"),o=require("../icon/IconBase.js");const a=e.memo((e=>{let{title:a,text:n}=e;return React.createElement(r.LayoutBox,{className:t.default.errorBoundary,direction:"column",flexWrap:"wrap",gap:"2rem",padding:"1rem"},a&&React.createElement("h1",null,a),React.createElement(r.LayoutBox,{align:"center",justify:"space-between",gap:"1rem"},React.createElement(o.IconBase,{className:t.default.StyledIcon,color:"#FF0000",width:"3rem",height:"3rem"},React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},React.createElement("path",{d:"M506.3 417l-213.3-364c-16.33-28-57.54-28-73.98 0l-213.2 364C-10.59 444.9 9.849 480 42.74 480h426.6C502.1 480 522.6 445 506.3 417zM232 168c0-13.25 10.75-24 24-24S280 154.8 280 168v128c0 13.25-10.75 24-23.1 24S232 309.3 232 296V168zM256 416c-17.36 0-31.44-14.08-31.44-31.44c0-17.36 14.07-31.44 31.44-31.44s31.44 14.08 31.44 31.44C287.4 401.9 273.4 416 256 416z"}))),n&&React.createElement(r.LayoutBox,{flexShrink:"0",width:"90%"},n)))}));a.displayName="DefaultErrorComponent";class n extends e.PureComponent{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,r){this.setState({hasError:!0,error:e,errorInfo:r})}render(){const{ErrorComponent:e=a}=this.props,{hasError:
|
|
1
|
+
"use strict";var e=require("react"),r=require("../container/layoutBox/LayoutBox.js"),t=require("./errorBoundary.module.scss.js"),o=require("../icon/IconBase.js");const a=e.memo((e=>{let{title:a,text:n}=e;return React.createElement(r.LayoutBox,{className:t.default.errorBoundary,direction:"column",flexWrap:"wrap",gap:"2rem",padding:"1rem"},a&&React.createElement("h1",null,a),React.createElement(r.LayoutBox,{align:"center",justify:"space-between",gap:"1rem"},React.createElement(o.IconBase,{className:t.default.StyledIcon,color:"#FF0000",width:"3rem",height:"3rem"},React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},React.createElement("path",{d:"M506.3 417l-213.3-364c-16.33-28-57.54-28-73.98 0l-213.2 364C-10.59 444.9 9.849 480 42.74 480h426.6C502.1 480 522.6 445 506.3 417zM232 168c0-13.25 10.75-24 24-24S280 154.8 280 168v128c0 13.25-10.75 24-23.1 24S232 309.3 232 296V168zM256 416c-17.36 0-31.44-14.08-31.44-31.44c0-17.36 14.07-31.44 31.44-31.44s31.44 14.08 31.44 31.44C287.4 401.9 273.4 416 256 416z"}))),n&&React.createElement(r.LayoutBox,{flexShrink:"0",width:"90%"},n)))}));a.displayName="DefaultErrorComponent";class n extends e.PureComponent{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,r){this.setState({hasError:!0,error:e,errorInfo:r})}render(){const{ErrorComponent:e=a,title:r,text:t}=this.props,{hasError:o,error:n,errorInfo:c}=this.state;return o?React.createElement(e,{title:r||(null==n?void 0:n.toString())||"Error",text:t||"".concat(JSON.stringify(c,null,2))}):this.props.children}}exports.DefaultErrorComponent=a,exports.ErrorBoundary=n;
|
|
2
2
|
//# sourceMappingURL=ErrorBoundary.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorBoundary.js","sources":["../../../../../../../../src/core/ui/components/error/ErrorBoundary.tsx"],"sourcesContent":["import { FC, memo, PureComponent, ReactNode
|
|
1
|
+
{"version":3,"file":"ErrorBoundary.js","sources":["../../../../../../../../src/core/ui/components/error/ErrorBoundary.tsx"],"sourcesContent":["import { FC, memo, PureComponent, ReactNode } from 'react'\n\nimport { IconBase } from '../icon'\nimport { LayoutBox } from '../container/layoutBox/LayoutBox'\n\nimport classes from './errorBoundary.module.scss'\nimport { DefaultErrorComponentProps, ErrorBoundaryProps } from './errorBoundary.types'\n\n\ninterface State {\n error?: Error\n errorInfo?: unknown\n hasError: boolean\n}\n\n\nexport const DefaultErrorComponent: FC<DefaultErrorComponentProps>\n= memo(({ title, text }: DefaultErrorComponentProps) => (\n <LayoutBox className={classes.errorBoundary} direction='column' flexWrap='wrap' gap='2rem' padding='1rem'>\n {title && <h1>{title}</h1>}\n <LayoutBox align='center' justify='space-between' gap='1rem'>\n <IconBase\n className={classes.StyledIcon}\n color='#FF0000'\n width='3rem'\n height='3rem'\n >\n <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'>\n <path d='M506.3 417l-213.3-364c-16.33-28-57.54-28-73.98 0l-213.2 364C-10.59 444.9 9.849 480 42.74 480h426.6C502.1 480 522.6 445 506.3 417zM232 168c0-13.25 10.75-24 24-24S280 154.8 280 168v128c0 13.25-10.75 24-23.1 24S232 309.3 232 296V168zM256 416c-17.36 0-31.44-14.08-31.44-31.44c0-17.36 14.07-31.44 31.44-31.44s31.44 14.08 31.44 31.44C287.4 401.9 273.4 416 256 416z' />\n </svg>\n </IconBase>\n {text && (\n <LayoutBox flexShrink='0' width='90%'>\n {text}\n </LayoutBox>\n )}\n </LayoutBox>\n </LayoutBox>\n))\nDefaultErrorComponent.displayName = 'DefaultErrorComponent'\n\nexport class ErrorBoundary extends PureComponent<ErrorBoundaryProps, State> {\n constructor(props: ErrorBoundaryProps) {\n super(props)\n this.state = { hasError: false }\n }\n\n static getDerivedStateFromError(error: Error): State {\n return { hasError: true, error }\n }\n\n componentDidCatch(error: Error, errorInfo: React.ErrorInfo): void {\n // eslint-disable-next-line no-console\n error && console.error(error)\n // eslint-disable-next-line no-console\n errorInfo && console.error(errorInfo)\n // this.lastError = { error, errorInfo }\n this.setState({ hasError: true, error, errorInfo })\n }\n\n render(): ReactNode {\n const { ErrorComponent = DefaultErrorComponent, title, text } = this.props\n const { hasError, error, errorInfo } = this.state\n\n if (hasError) {\n return (\n <ErrorComponent\n title={title || error?.toString() || 'Error'}\n text={text || `${JSON.stringify(errorInfo, null, 2)}`}\n />\n )\n }\n\n return this.props.children\n }\n}\n"],"names":["DefaultErrorComponent","memo","_ref","title","text","React","createElement","LayoutBox","className","classes","default","errorBoundary","direction","flexWrap","gap","padding","align","justify","IconBase","StyledIcon","color","width","height","xmlns","viewBox","d","flexShrink","displayName","ErrorBoundary","PureComponent","constructor","props","super","this","state","hasError","getDerivedStateFromError","error","componentDidCatch","errorInfo","setState","render","ErrorComponent","toString","concat","JSON","stringify","children"],"mappings":"kKAgBaA,MAAAA,EACXC,EAAIA,MAACC,IAAA,IAACC,MAAEA,EAAKC,KAAEA,GAAkCF,EAAA,OACjDG,MAAAC,cAACC,YAAS,CAACC,UAAWC,EAAOC,QAACC,cAAeC,UAAU,SAASC,SAAS,OAAOC,IAAI,OAAOC,QAAQ,QAChGZ,GAASE,MAAAC,cAAA,KAAA,KAAKH,GACfE,MAAAC,cAACC,YAAS,CAACS,MAAM,SAASC,QAAQ,gBAAgBH,IAAI,QACpDT,MAAAC,cAACY,WAAQ,CACPV,UAAWC,EAAOC,QAACS,WACnBC,MAAM,UACNC,MAAM,OACNC,OAAO,QAEPjB,MAAAC,cAAA,MAAA,CAAKiB,MAAM,6BAA6BC,QAAQ,eAC9CnB,MAAAC,cAAA,OAAA,CAAMmB,EAAE,6WAGXrB,GACCC,MAAAC,cAACC,EAAAA,UAAS,CAACmB,WAAW,IAAIL,MAAM,OAC7BjB,IAIG,IAEdJ,EAAsB2B,YAAc,wBAE7B,MAAMC,UAAsBC,EAAAA,cACjCC,WAAAA,CAAYC,GACVC,MAAMD,GACNE,KAAKC,MAAQ,CAAEC,UAAU,EAC3B,CAEA,+BAAOC,CAAyBC,GAC9B,MAAO,CAAEF,UAAU,EAAME,QAC3B,CAEAC,iBAAAA,CAAkBD,EAAcE,GAM9BN,KAAKO,SAAS,CAAEL,UAAU,EAAME,QAAOE,aACzC,CAEAE,MAAAA,GACE,MAAMC,eAAEA,EAAiB1C,EAAqBG,MAAEA,EAAKC,KAAEA,GAAS6B,KAAKF,OAC/DI,SAAEA,EAAQE,MAAEA,EAAKE,UAAEA,GAAcN,KAAKC,MAE5C,OAAIC,EAEA9B,MAAAC,cAACoC,EAAc,CACbvC,MAAOA,IAASkC,aAAAA,EAAAA,EAAOM,aAAc,QACrCvC,KAAMA,GAAIwC,GAAAA,OAAOC,KAAKC,UAAUP,EAAW,KAAM,MAKhDN,KAAKF,MAAMgB,QACpB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{memo as e,PureComponent as r}from"react";import{LayoutBox as t}from"../container/layoutBox/LayoutBox.js";import o from"./errorBoundary.module.scss.js";import{IconBase as a}from"../icon/IconBase.js";const n=e((e=>{let{title:r,text:n}=e;return React.createElement(t,{className:o.errorBoundary,direction:"column",flexWrap:"wrap",gap:"2rem",padding:"1rem"},r&&React.createElement("h1",null,r),React.createElement(t,{align:"center",justify:"space-between",gap:"1rem"},React.createElement(a,{className:o.StyledIcon,color:"#FF0000",width:"3rem",height:"3rem"},React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},React.createElement("path",{d:"M506.3 417l-213.3-364c-16.33-28-57.54-28-73.98 0l-213.2 364C-10.59 444.9 9.849 480 42.74 480h426.6C502.1 480 522.6 445 506.3 417zM232 168c0-13.25 10.75-24 24-24S280 154.8 280 168v128c0 13.25-10.75 24-23.1 24S232 309.3 232 296V168zM256 416c-17.36 0-31.44-14.08-31.44-31.44c0-17.36 14.07-31.44 31.44-31.44s31.44 14.08 31.44 31.44C287.4 401.9 273.4 416 256 416z"}))),n&&React.createElement(t,{flexShrink:"0",width:"90%"},n)))}));n.displayName="DefaultErrorComponent";class c extends r{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,r){this.setState({hasError:!0,error:e,errorInfo:r})}render(){const{ErrorComponent:e=n}=this.props,{hasError:
|
|
1
|
+
import{memo as e,PureComponent as r}from"react";import{LayoutBox as t}from"../container/layoutBox/LayoutBox.js";import o from"./errorBoundary.module.scss.js";import{IconBase as a}from"../icon/IconBase.js";const n=e((e=>{let{title:r,text:n}=e;return React.createElement(t,{className:o.errorBoundary,direction:"column",flexWrap:"wrap",gap:"2rem",padding:"1rem"},r&&React.createElement("h1",null,r),React.createElement(t,{align:"center",justify:"space-between",gap:"1rem"},React.createElement(a,{className:o.StyledIcon,color:"#FF0000",width:"3rem",height:"3rem"},React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},React.createElement("path",{d:"M506.3 417l-213.3-364c-16.33-28-57.54-28-73.98 0l-213.2 364C-10.59 444.9 9.849 480 42.74 480h426.6C502.1 480 522.6 445 506.3 417zM232 168c0-13.25 10.75-24 24-24S280 154.8 280 168v128c0 13.25-10.75 24-23.1 24S232 309.3 232 296V168zM256 416c-17.36 0-31.44-14.08-31.44-31.44c0-17.36 14.07-31.44 31.44-31.44s31.44 14.08 31.44 31.44C287.4 401.9 273.4 416 256 416z"}))),n&&React.createElement(t,{flexShrink:"0",width:"90%"},n)))}));n.displayName="DefaultErrorComponent";class c extends r{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,r){this.setState({hasError:!0,error:e,errorInfo:r})}render(){const{ErrorComponent:e=n,title:r,text:t}=this.props,{hasError:o,error:a,errorInfo:c}=this.state;return o?React.createElement(e,{title:r||(null==a?void 0:a.toString())||"Error",text:t||"".concat(JSON.stringify(c,null,2))}):this.props.children}}export{n as DefaultErrorComponent,c as ErrorBoundary};
|
|
2
2
|
//# sourceMappingURL=ErrorBoundary.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorBoundary.js","sources":["../../../../../../../../src/core/ui/components/error/ErrorBoundary.tsx"],"sourcesContent":["import { FC, memo, PureComponent, ReactNode
|
|
1
|
+
{"version":3,"file":"ErrorBoundary.js","sources":["../../../../../../../../src/core/ui/components/error/ErrorBoundary.tsx"],"sourcesContent":["import { FC, memo, PureComponent, ReactNode } from 'react'\n\nimport { IconBase } from '../icon'\nimport { LayoutBox } from '../container/layoutBox/LayoutBox'\n\nimport classes from './errorBoundary.module.scss'\nimport { DefaultErrorComponentProps, ErrorBoundaryProps } from './errorBoundary.types'\n\n\ninterface State {\n error?: Error\n errorInfo?: unknown\n hasError: boolean\n}\n\n\nexport const DefaultErrorComponent: FC<DefaultErrorComponentProps>\n= memo(({ title, text }: DefaultErrorComponentProps) => (\n <LayoutBox className={classes.errorBoundary} direction='column' flexWrap='wrap' gap='2rem' padding='1rem'>\n {title && <h1>{title}</h1>}\n <LayoutBox align='center' justify='space-between' gap='1rem'>\n <IconBase\n className={classes.StyledIcon}\n color='#FF0000'\n width='3rem'\n height='3rem'\n >\n <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'>\n <path d='M506.3 417l-213.3-364c-16.33-28-57.54-28-73.98 0l-213.2 364C-10.59 444.9 9.849 480 42.74 480h426.6C502.1 480 522.6 445 506.3 417zM232 168c0-13.25 10.75-24 24-24S280 154.8 280 168v128c0 13.25-10.75 24-23.1 24S232 309.3 232 296V168zM256 416c-17.36 0-31.44-14.08-31.44-31.44c0-17.36 14.07-31.44 31.44-31.44s31.44 14.08 31.44 31.44C287.4 401.9 273.4 416 256 416z' />\n </svg>\n </IconBase>\n {text && (\n <LayoutBox flexShrink='0' width='90%'>\n {text}\n </LayoutBox>\n )}\n </LayoutBox>\n </LayoutBox>\n))\nDefaultErrorComponent.displayName = 'DefaultErrorComponent'\n\nexport class ErrorBoundary extends PureComponent<ErrorBoundaryProps, State> {\n constructor(props: ErrorBoundaryProps) {\n super(props)\n this.state = { hasError: false }\n }\n\n static getDerivedStateFromError(error: Error): State {\n return { hasError: true, error }\n }\n\n componentDidCatch(error: Error, errorInfo: React.ErrorInfo): void {\n // eslint-disable-next-line no-console\n error && console.error(error)\n // eslint-disable-next-line no-console\n errorInfo && console.error(errorInfo)\n // this.lastError = { error, errorInfo }\n this.setState({ hasError: true, error, errorInfo })\n }\n\n render(): ReactNode {\n const { ErrorComponent = DefaultErrorComponent, title, text } = this.props\n const { hasError, error, errorInfo } = this.state\n\n if (hasError) {\n return (\n <ErrorComponent\n title={title || error?.toString() || 'Error'}\n text={text || `${JSON.stringify(errorInfo, null, 2)}`}\n />\n )\n }\n\n return this.props.children\n }\n}\n"],"names":["DefaultErrorComponent","memo","_ref","title","text","React","createElement","LayoutBox","className","classes","errorBoundary","direction","flexWrap","gap","padding","align","justify","IconBase","StyledIcon","color","width","height","xmlns","viewBox","d","flexShrink","displayName","ErrorBoundary","PureComponent","constructor","props","super","this","state","hasError","getDerivedStateFromError","error","componentDidCatch","errorInfo","setState","render","ErrorComponent","toString","concat","JSON","stringify","children"],"mappings":"6MAgBaA,MAAAA,EACXC,GAAKC,IAAA,IAACC,MAAEA,EAAKC,KAAEA,GAAkCF,EAAA,OACjDG,MAAAC,cAACC,EAAS,CAACC,UAAWC,EAAQC,cAAeC,UAAU,SAASC,SAAS,OAAOC,IAAI,OAAOC,QAAQ,QAChGX,GAASE,MAAAC,cAAA,KAAA,KAAKH,GACfE,MAAAC,cAACC,EAAS,CAACQ,MAAM,SAASC,QAAQ,gBAAgBH,IAAI,QACpDR,MAAAC,cAACW,EAAQ,CACPT,UAAWC,EAAQS,WACnBC,MAAM,UACNC,MAAM,OACNC,OAAO,QAEPhB,MAAAC,cAAA,MAAA,CAAKgB,MAAM,6BAA6BC,QAAQ,eAC9ClB,MAAAC,cAAA,OAAA,CAAMkB,EAAE,6WAGXpB,GACCC,MAAAC,cAACC,EAAS,CAACkB,WAAW,IAAIL,MAAM,OAC7BhB,IAIG,IAEdJ,EAAsB0B,YAAc,wBAE7B,MAAMC,UAAsBC,EACjCC,WAAAA,CAAYC,GACVC,MAAMD,GACNE,KAAKC,MAAQ,CAAEC,UAAU,EAC3B,CAEA,+BAAOC,CAAyBC,GAC9B,MAAO,CAAEF,UAAU,EAAME,QAC3B,CAEAC,iBAAAA,CAAkBD,EAAcE,GAM9BN,KAAKO,SAAS,CAAEL,UAAU,EAAME,QAAOE,aACzC,CAEAE,MAAAA,GACE,MAAMC,eAAEA,EAAiBzC,EAAqBG,MAAEA,EAAKC,KAAEA,GAAS4B,KAAKF,OAC/DI,SAAEA,EAAQE,MAAEA,EAAKE,UAAEA,GAAcN,KAAKC,MAE5C,OAAIC,EAEA7B,MAAAC,cAACmC,EAAc,CACbtC,MAAOA,IAASiC,aAAAA,EAAAA,EAAOM,aAAc,QACrCtC,KAAMA,GAAIuC,GAAAA,OAAOC,KAAKC,UAAUP,EAAW,KAAM,MAKhDN,KAAKF,MAAMgB,QACpB"}
|