@carbonorm/carbonreact 2.0.3 → 3.0.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/dist/CarbonReact.d.ts +49 -14
- package/dist/hoc/deleteRestfulObjectArrays.d.ts +2 -3
- package/dist/hoc/setUrl.d.ts +1 -1
- package/dist/hoc/updateRestfulObjectArrays.d.ts +2 -3
- package/dist/index.cjs.js +105 -398
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +0 -2
- package/dist/index.esm.js +102 -392
- package/dist/index.esm.js.map +1 -1
- package/dist/variables/C6.d.ts +1 -3
- package/package.json +3 -3
- package/src/CarbonReact.tsx +9 -10
- package/src/hoc/deleteRestfulObjectArrays.tsx +20 -9
- package/src/hoc/setUrl.tsx +3 -14
- package/src/hoc/updateRestfulObjectArrays.tsx +19 -10
- package/src/index.ts +0 -2
- package/src/variables/C6.tsx +1 -6
- package/dist/hoc/axiosInstance.d.ts +0 -5
- package/src/hoc/axiosInstance.tsx +0 -494
package/dist/CarbonReact.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Component, ReactNode } from 'react';
|
|
2
2
|
import 'react-toastify/dist/ReactToastify.min.css';
|
|
3
3
|
import { iRestfulObjectArrayTypes } from "variables/C6";
|
|
4
4
|
export interface iCarbonReactState {
|
|
@@ -9,16 +9,51 @@ export interface iCarbonReactState {
|
|
|
9
9
|
backendThrowable: any[];
|
|
10
10
|
}
|
|
11
11
|
export declare const initialRequiredCarbonORMState: iCarbonReactState;
|
|
12
|
-
export declare const initialCarbonReactState: iCarbonReactState;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
12
|
+
export declare const initialCarbonReactState: iCarbonReactState & iRestfulObjectArrayTypes;
|
|
13
|
+
declare const CarbonReact: {
|
|
14
|
+
new <P = {}, S = {}>(props: any): {
|
|
15
|
+
websocketTimeout: number;
|
|
16
|
+
shouldComponentUpdate(nextProps: Readonly<any>, nextState: Readonly<iCarbonReactState>, _nextContext: any): boolean;
|
|
17
|
+
componentDidUpdate(_prevProps: Readonly<any>, _prevState: Readonly<iCarbonReactState>, _snapshot?: any): void;
|
|
18
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
context: unknown;
|
|
20
|
+
setState<K extends keyof iCarbonReactState | keyof S>(state: (S & iCarbonReactState) | ((prevState: Readonly<S & iCarbonReactState>, props: Readonly<{
|
|
21
|
+
children?: ReactNode | ReactNode[];
|
|
22
|
+
} & P>) => (S & iCarbonReactState) | Pick<S & iCarbonReactState, K> | null) | Pick<S & iCarbonReactState, K> | null, callback?: (() => void) | undefined): void;
|
|
23
|
+
forceUpdate(callback?: (() => void) | undefined): void;
|
|
24
|
+
readonly props: Readonly<{
|
|
25
|
+
children?: ReactNode | ReactNode[];
|
|
26
|
+
} & P>;
|
|
27
|
+
state: Readonly<S & iCarbonReactState>;
|
|
28
|
+
refs: {
|
|
29
|
+
[key: string]: import("react").ReactInstance;
|
|
30
|
+
};
|
|
31
|
+
componentDidMount?(): void;
|
|
32
|
+
componentWillUnmount?(): void;
|
|
33
|
+
componentDidCatch?(error: Error, errorInfo: import("react").ErrorInfo): void;
|
|
34
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<{
|
|
35
|
+
children?: ReactNode | ReactNode[];
|
|
36
|
+
} & P>, prevState: Readonly<S & iCarbonReactState>): any;
|
|
37
|
+
componentWillMount?(): void;
|
|
38
|
+
UNSAFE_componentWillMount?(): void;
|
|
39
|
+
componentWillReceiveProps?(nextProps: Readonly<{
|
|
40
|
+
children?: ReactNode | ReactNode[];
|
|
41
|
+
} & P>, nextContext: any): void;
|
|
42
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<{
|
|
43
|
+
children?: ReactNode | ReactNode[];
|
|
44
|
+
} & P>, nextContext: any): void;
|
|
45
|
+
componentWillUpdate?(nextProps: Readonly<{
|
|
46
|
+
children?: ReactNode | ReactNode[];
|
|
47
|
+
} & P>, nextState: Readonly<S & iCarbonReactState>, nextContext: any): void;
|
|
48
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<{
|
|
49
|
+
children?: ReactNode | ReactNode[];
|
|
50
|
+
} & P>, nextState: Readonly<S & iCarbonReactState>, nextContext: any): void;
|
|
51
|
+
};
|
|
52
|
+
instance: Component<{
|
|
53
|
+
children?: ReactNode | ReactNode[];
|
|
54
|
+
} & any, any & iCarbonReactState>;
|
|
55
|
+
lastLocation: string;
|
|
56
|
+
whyDidYouRender: boolean;
|
|
57
|
+
contextType?: import("react").Context<any> | undefined;
|
|
58
|
+
};
|
|
59
|
+
export default CarbonReact;
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export default function deleteRestfulObjectArrays<ObjectType = tRestfulObjectValues, ObjectArrayTypes = iRestfulObjectArrayTypes>(dataOrCallback: ((prev: Readonly<iCarbonReactState>) => ObjectType[]) | ObjectType[], stateKey: keyof ObjectArrayTypes, uniqueObjectId: keyof ObjectType, callback?: () => void): void;
|
|
1
|
+
import { tRestfulObjectArrayValues, tStatefulApiData } from "variables/C6";
|
|
2
|
+
export default function deleteRestfulObjectArrays<ObjectType = tRestfulObjectArrayValues, S = {}, P = {}>(dataOrCallback: ObjectType[] | (<K extends keyof S>(state: ((prevState: Readonly<S>, props: Readonly<P>) => (Pick<S, K> | S | null)) | (Pick<S, K> | S | null), callback?: () => void) => ObjectType[]), stateKey: S[keyof S] extends tStatefulApiData<ObjectType> ? keyof S : never, uniqueObjectId: keyof ObjectType, callback?: () => void): void;
|
package/dist/hoc/setUrl.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function setUrl(): void;
|
|
1
|
+
export default function setUrl(host?: string, https?: boolean): void;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { iRestfulObjectArrayTypes, tRestfulObjectValues } from "variables/C6";
|
|
1
|
+
import { tRestfulObjectArrayValues, tStatefulApiData } from "variables/C6";
|
|
3
2
|
export declare enum eUpdateInsertMethod {
|
|
4
3
|
REPLACE = 0,
|
|
5
4
|
FIRST = 1,
|
|
@@ -15,4 +14,4 @@ export declare enum eUpdateInsertMethod {
|
|
|
15
14
|
* @param callback - if you want to do something with the updated state, you can pass a callback here. Run as the second
|
|
16
15
|
* parameter of setState.
|
|
17
16
|
*/
|
|
18
|
-
export default function updateRestfulObjectArrays<ObjectType =
|
|
17
|
+
export default function updateRestfulObjectArrays<ObjectType = tRestfulObjectArrayValues, S = {}, P = {}>(dataOrCallback: ObjectType[] | (<K extends keyof S>(state: ((prevState: Readonly<S>, props: Readonly<P>) => (Pick<S, K> | S | null)) | (Pick<S, K> | S | null), callback?: () => void) => ObjectType[]), stateKey: S[keyof S] extends tStatefulApiData<ObjectType> ? keyof S : never, uniqueObjectId: keyof ObjectType, insertUpdateOrder?: eUpdateInsertMethod, callback?: () => void): void;
|