@carbonorm/carbonreact 3.3.14 → 3.4.0
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/compileValidSQL.cjs +3 -1
- package/compileValidSQL.tsx +15 -8
- package/dist/index.cjs.js +11 -2
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +11 -2
- package/dist/index.esm.js.map +1 -1
- package/package.json +4 -3
- package/src/components/Errors/BackendThrowable.tsx +25 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@carbonorm/carbonreact",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.4.0",
|
|
4
4
|
"browser": "dist/index.umd.js",
|
|
5
5
|
"module": "dist/index.esm.js",
|
|
6
6
|
"main": "dist/index.cjs.js",
|
|
@@ -70,16 +70,17 @@
|
|
|
70
70
|
"scripts": {
|
|
71
71
|
"prepublishOnly": "npm run build",
|
|
72
72
|
"c6": "wget https://raw.githubusercontent.com/RichardTMiles/CarbonPHP/lts/view/C6.tsx -O src/variables/C6.tsx",
|
|
73
|
-
"build": "rm -rf ./dist/ && npm run build:css && npm run build:index && rollup -c &&
|
|
73
|
+
"build": "rm -rf ./dist/ && npm run build:css && npm run build:index && rollup -c && npm run build:compileValidSQL",
|
|
74
74
|
"dev": "rollup -c -w",
|
|
75
75
|
"test": "node test/test.js",
|
|
76
76
|
"pretest": "npm run build",
|
|
77
77
|
"build:index": "npx barrelsby --directory ./src --delete --exclude '(jestHoc|\\.test|\\.d).(js|tsx?)$' --exportDefault --verbose --mode top",
|
|
78
78
|
"build:css": "sass ./src:./src && typed-scss-modules 'src/**/*.?(s)css' --nameFormat all --exportType default src",
|
|
79
|
-
"build:compileValidSQL": "
|
|
79
|
+
"build:compileValidSQL": "tsc compileValidSQL.tsx && mv compileValidSQL.js compileValidSQL.cjs"
|
|
80
80
|
},
|
|
81
81
|
"files": [
|
|
82
82
|
"compileValidSQL.tsx",
|
|
83
|
+
"compileValidSQL.cjs",
|
|
83
84
|
"dist",
|
|
84
85
|
"src"
|
|
85
86
|
]
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import styles from './style.module.scss';
|
|
2
|
-
|
|
2
|
+
import OutsideClickHandler from 'react-outside-click-handler';
|
|
3
3
|
import CarbonReact from "../../CarbonReact";
|
|
4
4
|
import {ReactElement} from "react";
|
|
5
5
|
|
|
@@ -13,7 +13,31 @@ export default () : ReactElement => {
|
|
|
13
13
|
|
|
14
14
|
return <div className={styles.maintenanceHero}>
|
|
15
15
|
<h1 className={styles.httpStatusCode}>{currentThrowable?.status || 500}</h1>
|
|
16
|
+
<OutsideClickHandler
|
|
17
|
+
onOutsideClick={() => bootstrap.setState(currentState => ({ backendThrowable: currentState.backendThrowable.slice(1) }))}>
|
|
18
|
+
<div className={styles.centeredContainer}>
|
|
19
|
+
{Object.keys(currentThrowable).map((key, index) => {
|
|
16
20
|
|
|
21
|
+
const valueIsString = typeof currentThrowable[key] === 'string';
|
|
22
|
+
|
|
23
|
+
const valueIsCode = 'THROWN NEAR' === key;
|
|
24
|
+
|
|
25
|
+
return <div key={index}>
|
|
26
|
+
<div className={styles.errorTextGeneral}> > <span className={styles.errorKeys}>{key}</span>:
|
|
27
|
+
{valueIsString
|
|
28
|
+
? (valueIsCode ? <div
|
|
29
|
+
style={{ backgroundColor: 'black', fontSize: 'xx-small' }}
|
|
30
|
+
dangerouslySetInnerHTML={{ __html: currentThrowable[key] }} /> :
|
|
31
|
+
<i className={styles.errorValues}>"{currentThrowable[key]}"</i>)
|
|
32
|
+
: ''}
|
|
33
|
+
</div>
|
|
34
|
+
{valueIsString
|
|
35
|
+
? ''
|
|
36
|
+
: <pre className={styles.errorPre}>{JSON.stringify(currentThrowable[key], undefined, 4)}</pre>}
|
|
37
|
+
</div>;
|
|
38
|
+
})}
|
|
39
|
+
</div>
|
|
40
|
+
</OutsideClickHandler>
|
|
17
41
|
</div>;
|
|
18
42
|
|
|
19
43
|
}
|