@carbonorm/carbonreact 3.6.0 → 3.6.1
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/CarbonReact.d.ts +8 -0
- package/dist/index.cjs.js +2 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +2 -1
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/CarbonReact.tsx +5 -3
package/package.json
CHANGED
package/src/CarbonReact.tsx
CHANGED
|
@@ -8,7 +8,7 @@ import 'react-toastify/dist/ReactToastify.min.css';
|
|
|
8
8
|
import BackendThrowable from 'components/Errors/BackendThrowable';
|
|
9
9
|
import Nest from 'components/Nest/Nest';
|
|
10
10
|
import {initialRestfulObjectsState, iRestfulObjectArrayTypes} from "variables/C6";
|
|
11
|
-
import CarbonWebSocket from "./components/WebSocket/CarbonWebSocket";
|
|
11
|
+
import CarbonWebSocket, {iCarbonWebSocketProps} from "./components/WebSocket/CarbonWebSocket";
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
// our central container, single page application
|
|
@@ -48,6 +48,7 @@ export function isJsonString(str: string) {
|
|
|
48
48
|
const CarbonReact = class<P = {}, S = {}> extends Component<{
|
|
49
49
|
children?: ReactNode | ReactNode[],
|
|
50
50
|
shouldStatePersist?: boolean,
|
|
51
|
+
websocket?: iCarbonWebSocketProps | boolean
|
|
51
52
|
} & P, S & iCarbonReactState> {
|
|
52
53
|
|
|
53
54
|
static instance: Component<{
|
|
@@ -132,7 +133,7 @@ const CarbonReact = class<P = {}, S = {}> extends Component<{
|
|
|
132
133
|
}
|
|
133
134
|
}
|
|
134
135
|
|
|
135
|
-
render()
|
|
136
|
+
render(): ReactElement {
|
|
136
137
|
|
|
137
138
|
console.log('CarbonORM TSX RENDER');
|
|
138
139
|
|
|
@@ -155,7 +156,8 @@ const CarbonReact = class<P = {}, S = {}> extends Component<{
|
|
|
155
156
|
|
|
156
157
|
return <>
|
|
157
158
|
<GlobalHistory/>
|
|
158
|
-
|
|
159
|
+
{this.props.websocket &&
|
|
160
|
+
<CarbonWebSocket {...(true === this.props.websocket ? {} : this.props.websocket)} />}
|
|
159
161
|
<Context value={this.state}>
|
|
160
162
|
{this.props.children}
|
|
161
163
|
</Context>
|