@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/dist/CarbonReact.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Component, Context, ReactElement, ReactNode } from 'react';
|
|
2
2
|
import 'react-toastify/dist/ReactToastify.min.css';
|
|
3
3
|
import { iRestfulObjectArrayTypes } from "variables/C6";
|
|
4
|
+
import { iCarbonWebSocketProps } from "./components/WebSocket/CarbonWebSocket";
|
|
4
5
|
export interface iCarbonReactState {
|
|
5
6
|
alertsWaiting: any[];
|
|
6
7
|
websocketEvents: MessageEvent[];
|
|
@@ -20,11 +21,13 @@ declare const CarbonReact: {
|
|
|
20
21
|
setState<K extends keyof iCarbonReactState | keyof S>(state: (S & iCarbonReactState) | ((prevState: Readonly<S & iCarbonReactState>, props: Readonly<{
|
|
21
22
|
children?: ReactNode | ReactNode[];
|
|
22
23
|
shouldStatePersist?: boolean | undefined;
|
|
24
|
+
websocket?: boolean | iCarbonWebSocketProps | undefined;
|
|
23
25
|
} & P>) => (S & iCarbonReactState) | Pick<S & iCarbonReactState, K> | null) | Pick<S & iCarbonReactState, K> | null, callback?: (() => void) | undefined): void;
|
|
24
26
|
forceUpdate(callback?: (() => void) | undefined): void;
|
|
25
27
|
readonly props: Readonly<{
|
|
26
28
|
children?: ReactNode | ReactNode[];
|
|
27
29
|
shouldStatePersist?: boolean | undefined;
|
|
30
|
+
websocket?: boolean | iCarbonWebSocketProps | undefined;
|
|
28
31
|
} & P>;
|
|
29
32
|
state: Readonly<S & iCarbonReactState>;
|
|
30
33
|
refs: {
|
|
@@ -36,24 +39,29 @@ declare const CarbonReact: {
|
|
|
36
39
|
getSnapshotBeforeUpdate?(prevProps: Readonly<{
|
|
37
40
|
children?: ReactNode | ReactNode[];
|
|
38
41
|
shouldStatePersist?: boolean | undefined;
|
|
42
|
+
websocket?: boolean | iCarbonWebSocketProps | undefined;
|
|
39
43
|
} & P>, prevState: Readonly<S & iCarbonReactState>): any;
|
|
40
44
|
componentWillMount?(): void;
|
|
41
45
|
UNSAFE_componentWillMount?(): void;
|
|
42
46
|
componentWillReceiveProps?(nextProps: Readonly<{
|
|
43
47
|
children?: ReactNode | ReactNode[];
|
|
44
48
|
shouldStatePersist?: boolean | undefined;
|
|
49
|
+
websocket?: boolean | iCarbonWebSocketProps | undefined;
|
|
45
50
|
} & P>, nextContext: any): void;
|
|
46
51
|
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<{
|
|
47
52
|
children?: ReactNode | ReactNode[];
|
|
48
53
|
shouldStatePersist?: boolean | undefined;
|
|
54
|
+
websocket?: boolean | iCarbonWebSocketProps | undefined;
|
|
49
55
|
} & P>, nextContext: any): void;
|
|
50
56
|
componentWillUpdate?(nextProps: Readonly<{
|
|
51
57
|
children?: ReactNode | ReactNode[];
|
|
52
58
|
shouldStatePersist?: boolean | undefined;
|
|
59
|
+
websocket?: boolean | iCarbonWebSocketProps | undefined;
|
|
53
60
|
} & P>, nextState: Readonly<S & iCarbonReactState>, nextContext: any): void;
|
|
54
61
|
UNSAFE_componentWillUpdate?(nextProps: Readonly<{
|
|
55
62
|
children?: ReactNode | ReactNode[];
|
|
56
63
|
shouldStatePersist?: boolean | undefined;
|
|
64
|
+
websocket?: boolean | iCarbonWebSocketProps | undefined;
|
|
57
65
|
} & P>, nextState: Readonly<S & iCarbonReactState>, nextContext: any): void;
|
|
58
66
|
};
|
|
59
67
|
instance: Component<{
|
package/dist/index.cjs.js
CHANGED
|
@@ -4318,7 +4318,8 @@ const CarbonReact = class extends react.Component {
|
|
|
4318
4318
|
return jsxRuntime_2(jsxRuntime_3, { children: [nest, jsxRuntime_1(BackendThrowable, {})] });
|
|
4319
4319
|
}
|
|
4320
4320
|
const Context = this.context.Provider;
|
|
4321
|
-
return jsxRuntime_2(jsxRuntime_3, { children: [jsxRuntime_1(GlobalHistory, {}),
|
|
4321
|
+
return jsxRuntime_2(jsxRuntime_3, { children: [jsxRuntime_1(GlobalHistory, {}), this.props.websocket &&
|
|
4322
|
+
jsxRuntime_1(CarbonWebSocket, { ...(true === this.props.websocket ? {} : this.props.websocket) }), jsxRuntime_1(Context, { value: this.state, children: this.props.children }), jsxRuntime_1(reactToastify.ToastContainer, {})] });
|
|
4322
4323
|
}
|
|
4323
4324
|
};
|
|
4324
4325
|
|