@carbonorm/carbonreact 3.0.5 → 3.0.6

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.
@@ -1,3 +1,4 @@
1
+ import CarbonReact from "CarbonReact";
1
2
  import { tRestfulObjectArrayValues, tStatefulApiData } from "variables/C6";
2
3
  import { KeysMatching } from "./KeysMatching";
3
- 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) => null | (ObjectType[])), stateKey: KeysMatching<S, tStatefulApiData<ObjectType>>, uniqueObjectId: (keyof ObjectType) | (keyof ObjectType)[], callback?: () => void): void;
4
+ export default function deleteRestfulObjectArrays<ObjectType = tRestfulObjectArrayValues, S = typeof CarbonReact.instance.state, P = typeof CarbonReact.instance.props>(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) => null | (ObjectType[])), stateKey: KeysMatching<S, tStatefulApiData<ObjectType>>, uniqueObjectId: (keyof ObjectType) | (keyof ObjectType)[], callback?: () => void): void;
@@ -1,4 +1,5 @@
1
1
  import { tRestfulObjectArrayValues, tStatefulApiData } from "variables/C6";
2
+ import CarbonReact from "CarbonReact";
2
3
  import { KeysMatching } from "./KeysMatching";
3
4
  export declare enum eUpdateInsertMethod {
4
5
  REPLACE = 0,
@@ -15,4 +16,4 @@ export declare enum eUpdateInsertMethod {
15
16
  * @param callback - if you want to do something with the updated state, you can pass a callback here. Run as the second
16
17
  * parameter of setState.
17
18
  */
18
- 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) => null | (ObjectType[])), stateKey: KeysMatching<S, tStatefulApiData<ObjectType>>, uniqueObjectId: (keyof ObjectType) | (keyof ObjectType)[], insertUpdateOrder?: eUpdateInsertMethod, callback?: () => void): void;
19
+ export default function updateRestfulObjectArrays<ObjectType = tRestfulObjectArrayValues, S = typeof CarbonReact.instance.state, P = typeof CarbonReact.instance.props>(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) => null | (ObjectType[])), stateKey: KeysMatching<S, tStatefulApiData<ObjectType>>, uniqueObjectId: (keyof ObjectType) | (keyof ObjectType)[], insertUpdateOrder?: eUpdateInsertMethod, callback?: () => void): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@carbonorm/carbonreact",
3
- "version": "3.0.5",
3
+ "version": "3.0.6",
4
4
  "main": "dist/index.cjs.js",
5
5
  "module": "dist/index.esm.js",
6
6
  "types": "dist/index.d.ts",
@@ -5,7 +5,7 @@ import {KeysMatching} from "./KeysMatching";
5
5
 
6
6
  //ObjectType, UniqueIdType extends keyof ObjectType
7
7
  // @link https://www.typescriptlang.org/docs/handbook/2/mapped-types.html
8
- export default function deleteRestfulObjectArrays<ObjectType = tRestfulObjectArrayValues, S = {}, P = {}>
8
+ export default function deleteRestfulObjectArrays<ObjectType = tRestfulObjectArrayValues, S = typeof CarbonReact.instance.state, P = typeof CarbonReact.instance.props>
9
9
  (dataOrCallback: ObjectType[] | (<K extends keyof S>(
10
10
  state: ((prevState: Readonly<S>, props: Readonly<P>) => (Pick<S, K> | S | null)) | (Pick<S, K> | S | null),
11
11
  callback?: () => void
@@ -19,7 +19,7 @@ export enum eUpdateInsertMethod {
19
19
  * @param callback - if you want to do something with the updated state, you can pass a callback here. Run as the second
20
20
  * parameter of setState.
21
21
  */
22
- export default function updateRestfulObjectArrays<ObjectType = tRestfulObjectArrayValues, S = {}, P = {}>
22
+ export default function updateRestfulObjectArrays<ObjectType = tRestfulObjectArrayValues, S = typeof CarbonReact.instance.state, P = typeof CarbonReact.instance.props>
23
23
  (dataOrCallback: ObjectType[] | (<K extends keyof S>(
24
24
  state: ((prevState: Readonly<S>, props: Readonly<P>) => (Pick<S, K> | S | null)) | (Pick<S, K> | S | null),
25
25
  callback?: () => void