@carbonorm/carbonreact 2.0.0 → 2.0.2
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 -15
- package/dist/hoc/deleteRestfulObjectArrays.d.ts +3 -2
- package/dist/hoc/getStyles.d.ts +3 -3
- package/dist/hoc/updateRestfulObjectArrays.d.ts +3 -2
- package/dist/index.cjs.js +1525 -2650
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +0 -2
- package/dist/index.esm.js +1523 -2636
- package/dist/index.esm.js.map +1 -1
- package/dist/variables/C6.d.ts +33 -564
- package/package.json +2 -1
- package/src/CarbonReact.tsx +10 -11
- package/src/hoc/deleteRestfulObjectArrays.tsx +8 -6
- package/src/hoc/updateRestfulObjectArrays.tsx +7 -7
- package/src/hoc/uploadImage.tsx +68 -23
- package/src/index.ts +0 -2
- package/src/variables/C6.tsx +3 -1
- package/dist/components/Errors/Localhost.d.ts +0 -1
package/dist/CarbonReact.d.ts
CHANGED
|
@@ -1,31 +1,24 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
2
|
import 'react-toastify/dist/ReactToastify.min.css';
|
|
3
|
-
import {
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
carbons: tStatefulApiData<iCarbons>;
|
|
7
|
-
}
|
|
8
|
-
export type tRestfulObjectArrayKeys = keyof iRestfulObjectArrayTypes;
|
|
9
|
-
export type tRestfulObjectArrayValues = iRestfulObjectArrayTypes[tRestfulObjectArrayKeys];
|
|
10
|
-
export type tRestfulObjectValues = tRestfulObjectArrayValues[number];
|
|
11
|
-
export interface iCarbonORMState extends iRestfulObjectArrayTypes {
|
|
3
|
+
import { iRestfulObjectArrayTypes } from "variables/C6";
|
|
4
|
+
export interface iCarbonReactState {
|
|
5
|
+
alertsWaiting: any[];
|
|
12
6
|
websocketEvents: MessageEvent[];
|
|
13
7
|
websocketData: any[];
|
|
14
8
|
websocket?: WebSocket;
|
|
15
|
-
websocketMounted: boolean;
|
|
16
|
-
alert?: boolean;
|
|
17
|
-
alertsWaiting: any[];
|
|
18
9
|
backendThrowable: any[];
|
|
19
10
|
}
|
|
11
|
+
export declare const initialRequiredCarbonORMState: iCarbonReactState;
|
|
12
|
+
export declare const initialCarbonReactState: iCarbonReactState;
|
|
20
13
|
export default class CarbonReact<P = {}, S = {}> extends React.Component<{
|
|
21
14
|
children?: ReactNode | ReactNode[];
|
|
22
|
-
} & P,
|
|
15
|
+
} & P, (iRestfulObjectArrayTypes | S) & iCarbonReactState> {
|
|
23
16
|
static instance: CarbonReact;
|
|
24
17
|
static lastLocation: string;
|
|
25
18
|
static whyDidYouRender: boolean;
|
|
26
19
|
constructor(props: any);
|
|
27
20
|
websocketTimeout: number;
|
|
28
|
-
shouldComponentUpdate(nextProps: Readonly<any>, nextState: Readonly<
|
|
29
|
-
componentDidUpdate(_prevProps: Readonly<any>, _prevState: Readonly<
|
|
21
|
+
shouldComponentUpdate(nextProps: Readonly<any>, nextState: Readonly<iCarbonReactState>, _nextContext: any): boolean;
|
|
22
|
+
componentDidUpdate(_prevProps: Readonly<any>, _prevState: Readonly<iCarbonReactState>, _snapshot?: any): void;
|
|
30
23
|
render(): import("react/jsx-runtime").JSX.Element;
|
|
31
24
|
}
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { iCarbonReactState } from "CarbonReact";
|
|
2
|
+
import { iRestfulObjectArrayTypes, tRestfulObjectValues } from "variables/C6";
|
|
3
|
+
export default function deleteRestfulObjectArrays<ObjectType = tRestfulObjectValues, ObjectArrayTypes = iRestfulObjectArrayTypes>(dataOrCallback: ((prev: Readonly<iCarbonReactState>) => ObjectType[]) | ObjectType[], stateKey: keyof ObjectArrayTypes, uniqueObjectId: keyof ObjectType, callback?: () => void): void;
|
package/dist/hoc/getStyles.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import BootstrapStyle from "variables/bootstrap.module.css";
|
|
2
|
-
import
|
|
2
|
+
import Styles from "style.module.css";
|
|
3
3
|
export declare const getRootStyleValue: (property?: string) => string;
|
|
4
4
|
type tBootstrap = typeof BootstrapStyle;
|
|
5
|
-
type
|
|
6
|
-
export default function getStyles<iCSS extends {}>(overrides?: iCSS): tBootstrap &
|
|
5
|
+
type tStyles = typeof Styles;
|
|
6
|
+
export default function getStyles<iCSS extends {}>(overrides?: iCSS): tBootstrap & tStyles & iCSS;
|
|
7
7
|
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { iCarbonReactState } from "CarbonReact";
|
|
2
|
+
import { iRestfulObjectArrayTypes, tRestfulObjectValues } from "variables/C6";
|
|
2
3
|
export declare enum eUpdateInsertMethod {
|
|
3
4
|
REPLACE = 0,
|
|
4
5
|
FIRST = 1,
|
|
@@ -14,4 +15,4 @@ export declare enum eUpdateInsertMethod {
|
|
|
14
15
|
* @param callback - if you want to do something with the updated state, you can pass a callback here. Run as the second
|
|
15
16
|
* parameter of setState.
|
|
16
17
|
*/
|
|
17
|
-
export default function updateRestfulObjectArray<ObjectType
|
|
18
|
+
export default function updateRestfulObjectArray<ObjectType = tRestfulObjectValues, ObjectArrayTypes = iRestfulObjectArrayTypes>(dataOrCallback: ((prev: Readonly<iCarbonReactState>) => ObjectType[]) | ObjectType[], stateKey: keyof ObjectArrayTypes, uniqueObjectId: keyof ObjectType, insertUpdateOrder?: eUpdateInsertMethod, callback?: () => void): void;
|