@carbonorm/carbonreact 3.3.12 → 3.3.14

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@carbonorm/carbonreact",
3
- "version": "3.3.12",
3
+ "version": "3.3.14",
4
4
  "browser": "dist/index.umd.js",
5
5
  "module": "dist/index.esm.js",
6
6
  "main": "dist/index.cjs.js",
@@ -1,8 +1,9 @@
1
1
  import styles from './style.module.scss';
2
- import OutsideClickHandler from 'react-outside-click-handler';
2
+ //import OutsideClickHandler from 'react-outside-click-handler';
3
3
  import CarbonReact from "../../CarbonReact";
4
+ import {ReactElement} from "react";
4
5
 
5
- export default function BackendThrowable() {
6
+ export default () : ReactElement => {
6
7
 
7
8
  const bootstrap = CarbonReact.instance;
8
9
 
@@ -12,32 +13,7 @@ export default function BackendThrowable() {
12
13
 
13
14
  return <div className={styles.maintenanceHero}>
14
15
  <h1 className={styles.httpStatusCode}>{currentThrowable?.status || 500}</h1>
15
- <OutsideClickHandler
16
- onOutsideClick={() => bootstrap.setState(currentState => ({ backendThrowable: currentState.backendThrowable.slice(1) }))}>
17
- <div className={styles.centeredContainer}>
18
- {Object.keys(currentThrowable).map((key, index) => {
19
16
 
20
- const valueIsString = typeof currentThrowable[key] === 'string';
21
-
22
- const valueIsCode = 'THROWN NEAR' === key;
23
-
24
- return <div key={index}>
25
- <div className={styles.errorTextGeneral}> &gt; <span className={styles.errorKeys}>{key}</span>:
26
- {valueIsString
27
- ? (valueIsCode ? <div
28
- style={{ backgroundColor: 'black', fontSize: 'xx-small' }}
29
- dangerouslySetInnerHTML={{ __html: currentThrowable[key] }} /> :
30
- <i className={styles.errorValues}>&quot;{currentThrowable[key]}&quot;</i>)
31
- : ''}
32
- </div>
33
- {valueIsString
34
- ? ''
35
- :
36
- <pre className={styles.errorPre}>{JSON.stringify(currentThrowable[key], undefined, 4)}</pre>}
37
- </div>;
38
- })}
39
- </div>
40
- </OutsideClickHandler>
41
17
  </div>;
42
18
 
43
19
  }