@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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@carbonorm/carbonreact",
3
3
  "license": "MIT",
4
- "version": "3.6.0",
4
+ "version": "3.6.1",
5
5
  "browser": "dist/index.umd.js",
6
6
  "module": "dist/index.esm.js",
7
7
  "main": "dist/index.cjs.js",
@@ -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() : ReactElement {
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
- <CarbonWebSocket/>
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>