state-decorator 7.3.0 → 7.3.1-destroy.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/es/v6.d.ts CHANGED
@@ -1,21 +1,21 @@
1
- import { GlobalConfig, ParallelActionError, EffectError } from './impl';
2
- import type { DecoratedActions, StoreActions, AsyncAction, SyncAction, SimpleSyncAction, LoadingMap, ErrorMap, LoadingParallelMap, ErrorParallelMap, StoreOptions as StoreOptionsBase, AsyncActionPromise, InvocationContext, GetPromiseInvocationContext, EffectsInvocationContext, InvocationContextActions, WarningNotifyFunc, ErrorEffectsInvocationContext, OnMountInvocationContext, ContextBase, OnPropsChangeEffectsContext, ContextState, Middleware, AbortActionCallback, MiddlewareFactory, LoadingProps, ErrorProps, LoadingMapProps, StoreConfig } from './types';
3
- import { setGlobalConfig, IsLoadingFunc, StoreApi, StateListenerContext, ConflictPolicy } from './index';
4
- export type { StateListenerContext, StoreApi, DecoratedActions, StoreActions, LoadingMap, ErrorMap, LoadingParallelMap, ErrorParallelMap, AsyncActionPromise as AsynchActionPromise, InvocationContext, GetPromiseInvocationContext, EffectsInvocationContext, InvocationContextActions, WarningNotifyFunc, ErrorEffectsInvocationContext, OnMountInvocationContext, ContextBase, OnPropsChangeEffectsContext, SyncAction, AsyncAction, SimpleSyncAction, ContextState, GlobalConfig, Middleware, LoadingProps, AbortActionCallback, ErrorProps, LoadingMapProps, StoreConfig, IsLoadingFunc, };
5
- export { EffectError, ParallelActionError, ConflictPolicy, setGlobalConfig };
6
- export type StoreOptions<S, A, P = {}, DS = {}, FxRes = S> = StoreOptionsBase<S, A, P, DS, FxRes>;
7
- export type StoreAction<S, F extends (...args: any[]) => any, A, P, DS = {}, FxRes = S> = AsyncAction<S, F, A, P, DS, FxRes> | SimpleSyncAction<S, F, P, DS, FxRes> | SyncAction<S, F, A, P, DS, FxRes>;
8
- /**
9
- * Creates and manages a local store.
10
- * The component will be refreshed for every change in the store.
11
- * Store will NOT be destroyed when component is unmouted.
12
- *
13
- * @param getInitialState Function to compute initial state from props.
14
- * @param actionImpl Actions implementation.
15
- * @param props Owner component props to update state or react on prop changes
16
- * @param options The store options.
17
- * @param refreshOnUpdate Whether refresh the component if store state changes.
18
- * @returns The state, actions and isLoading function.
19
- */
20
- export default function useLocalStoreV6<S, A extends DecoratedActions, P, DS = {}>(getInitialState: (p: P) => S, actionImpl: StoreActions<S, A, P, DS>, props?: P, options?: StoreOptions<S, A, P, DS>, middlewares?: MiddlewareFactory<S, A, P>[], refreshOnUpdate?: boolean): StoreApi<S, A, P, DS>;
21
- export declare const useLocalStore: typeof useLocalStoreV6;
1
+ import { GlobalConfig, ParallelActionError, EffectError } from './impl';
2
+ import type { DecoratedActions, StoreActions, AsyncAction, SyncAction, SimpleSyncAction, LoadingMap, ErrorMap, LoadingParallelMap, ErrorParallelMap, StoreOptions as StoreOptionsBase, AsyncActionPromise, InvocationContext, GetPromiseInvocationContext, EffectsInvocationContext, InvocationContextActions, WarningNotifyFunc, ErrorEffectsInvocationContext, OnMountInvocationContext, ContextBase, OnPropsChangeEffectsContext, ContextState, Middleware, AbortActionCallback, MiddlewareFactory, LoadingProps, ErrorProps, LoadingMapProps, StoreConfig } from './types';
3
+ import { setGlobalConfig, IsLoadingFunc, StoreApi, StateListenerContext, ConflictPolicy } from './index';
4
+ export type { StateListenerContext, StoreApi, DecoratedActions, StoreActions, LoadingMap, ErrorMap, LoadingParallelMap, ErrorParallelMap, AsyncActionPromise as AsynchActionPromise, InvocationContext, GetPromiseInvocationContext, EffectsInvocationContext, InvocationContextActions, WarningNotifyFunc, ErrorEffectsInvocationContext, OnMountInvocationContext, ContextBase, OnPropsChangeEffectsContext, SyncAction, AsyncAction, SimpleSyncAction, ContextState, GlobalConfig, Middleware, LoadingProps, AbortActionCallback, ErrorProps, LoadingMapProps, StoreConfig, IsLoadingFunc, };
5
+ export { EffectError, ParallelActionError, ConflictPolicy, setGlobalConfig };
6
+ export type StoreOptions<S, A, P = {}, DS = {}, FxRes = S> = StoreOptionsBase<S, A, P, DS, FxRes>;
7
+ export type StoreAction<S, F extends (...args: any[]) => any, A, P, DS = {}, FxRes = S> = AsyncAction<S, F, A, P, DS, FxRes> | SimpleSyncAction<S, F, P, DS, FxRes> | SyncAction<S, F, A, P, DS, FxRes>;
8
+ /**
9
+ * Creates and manages a local store.
10
+ * The component will be refreshed for every change in the store.
11
+ * Store will NOT be destroyed when component is unmouted.
12
+ *
13
+ * @param getInitialState Function to compute initial state from props.
14
+ * @param actionImpl Actions implementation.
15
+ * @param props Owner component props to update state or react on prop changes
16
+ * @param options The store options.
17
+ * @param refreshOnUpdate Whether refresh the component if store state changes.
18
+ * @returns The state, actions and isLoading function.
19
+ */
20
+ export default function useLocalStoreV6<S, A extends DecoratedActions, P, DS = {}>(getInitialState: (p: P) => S, actionImpl: StoreActions<S, A, P, DS>, props?: P, options?: StoreOptions<S, A, P, DS>, middlewares?: MiddlewareFactory<S, A, P>[], refreshOnUpdate?: boolean): StoreApi<S, A, P, DS>;
21
+ export declare const useLocalStore: typeof useLocalStoreV6;
package/graph.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- export default class Graph {
2
- private keys;
3
- private adj;
4
- constructor(keys: string[]);
5
- private isCyclicUtil;
6
- setEdges(sou: string, dest: string[]): void;
7
- isCyclic(): boolean;
8
- }
1
+ export default class Graph {
2
+ private keys;
3
+ private adj;
4
+ constructor(keys: string[]);
5
+ private isCyclicUtil;
6
+ setEdges(sou: string, dest: string[]): void;
7
+ isCyclic(): boolean;
8
+ }
package/helpers.d.ts CHANGED
@@ -1,67 +1,67 @@
1
- /**
2
- * Effect function that sets the first action argument to the specified prop.
3
- * if dirtyProp is set
4
- */
5
- export declare function setArgIn<S, K extends keyof S, K2 extends keyof S>(propName: K, dirtyProp?: K2): (ctx: {
6
- s: S;
7
- args: [S[K]];
8
- }) => Partial<S>;
9
- /**
10
- * Effect function that sets <code>true</code> in the specified prop.
11
- */
12
- export declare function setTrueIn<S, K extends keyof S, K2 extends keyof S>(propName: K, dirtyProp?: K2): (ctx: {
13
- s: S;
14
- }) => Partial<S>;
15
- /**
16
- * Effect function that sets <code>false</code> in the specified prop.
17
- */
18
- export declare function setFalseIn<S, K extends keyof S, K2 extends keyof S>(propName: K, dirtyProp?: K2): (ctx: {
19
- s: S;
20
- }) => Partial<S>;
21
- /**
22
- * Effect function that sets toggles the boolean value of the specified prop.
23
- */
24
- export declare function toggleProp<S, K extends keyof S, K2 extends keyof S>(propName: K, dirtyProp?: K2): (ctx: {
25
- s: S;
26
- }) => Partial<S>;
27
- /**
28
- * Effect function that sets the update the specifed prop as an array using first action argument as index
29
- * and second as value to set.
30
- */
31
- export declare function setArgsInMap<S, K extends keyof S, K2 extends keyof S, T>(propName: K, dirtyProp?: K2): (ctx: {
32
- s: S;
33
- args: [string, T];
34
- }) => Partial<S>;
35
- /**
36
- * Effect function that sets the update the specifed prop as an array using first action argument as index
37
- * and second as value to set.
38
- */
39
- export declare function setArgsInArray<S, K extends keyof S, K2 extends keyof S, T>(propName: K, dirtyProp?: K2): (ctx: {
40
- s: S;
41
- args: [number, T];
42
- }) => Partial<S>;
43
- /**
44
- * Effect function that sets the asynchronous action result to the specified prop.
45
- */
46
- export declare function setResIn<S, K extends keyof S, K2 extends keyof S>(propName: K, dirtyProp?: K2): (ctx: {
47
- s: S;
48
- res: S[K];
49
- }) => Partial<S>;
50
- /**
51
- * Effect function that sets the update the specifed prop as an array using first action argument as index
52
- * and second as value to set.
53
- */
54
- export declare function setResInArray<S, K extends keyof S, K2 extends keyof S, T>(propName: K, dirtyProp?: K2): (ctx: {
55
- s: S;
56
- args: [number];
57
- res: T;
58
- }) => Partial<S>;
59
- /**
60
- * Effect function that sets the update the specifed prop as an array using first action argument as index
61
- * and second as value to set.
62
- */
63
- export declare function setResInMap<S, K extends keyof S, K2 extends keyof S, T>(propName: K, dirtyProp?: K2): (ctx: {
64
- s: S;
65
- args: [string];
66
- res: T;
67
- }) => Partial<S>;
1
+ /**
2
+ * Effect function that sets the first action argument to the specified prop.
3
+ * if dirtyProp is set
4
+ */
5
+ export declare function setArgIn<S, K extends keyof S, K2 extends keyof S>(propName: K, dirtyProp?: K2): (ctx: {
6
+ s: S;
7
+ args: [S[K]];
8
+ }) => Partial<S>;
9
+ /**
10
+ * Effect function that sets <code>true</code> in the specified prop.
11
+ */
12
+ export declare function setTrueIn<S, K extends keyof S, K2 extends keyof S>(propName: K, dirtyProp?: K2): (ctx: {
13
+ s: S;
14
+ }) => Partial<S>;
15
+ /**
16
+ * Effect function that sets <code>false</code> in the specified prop.
17
+ */
18
+ export declare function setFalseIn<S, K extends keyof S, K2 extends keyof S>(propName: K, dirtyProp?: K2): (ctx: {
19
+ s: S;
20
+ }) => Partial<S>;
21
+ /**
22
+ * Effect function that sets toggles the boolean value of the specified prop.
23
+ */
24
+ export declare function toggleProp<S, K extends keyof S, K2 extends keyof S>(propName: K, dirtyProp?: K2): (ctx: {
25
+ s: S;
26
+ }) => Partial<S>;
27
+ /**
28
+ * Effect function that sets the update the specifed prop as an array using first action argument as index
29
+ * and second as value to set.
30
+ */
31
+ export declare function setArgsInMap<S, K extends keyof S, K2 extends keyof S, T>(propName: K, dirtyProp?: K2): (ctx: {
32
+ s: S;
33
+ args: [string, T];
34
+ }) => Partial<S>;
35
+ /**
36
+ * Effect function that sets the update the specifed prop as an array using first action argument as index
37
+ * and second as value to set.
38
+ */
39
+ export declare function setArgsInArray<S, K extends keyof S, K2 extends keyof S, T>(propName: K, dirtyProp?: K2): (ctx: {
40
+ s: S;
41
+ args: [number, T];
42
+ }) => Partial<S>;
43
+ /**
44
+ * Effect function that sets the asynchronous action result to the specified prop.
45
+ */
46
+ export declare function setResIn<S, K extends keyof S, K2 extends keyof S>(propName: K, dirtyProp?: K2): (ctx: {
47
+ s: S;
48
+ res: S[K];
49
+ }) => Partial<S>;
50
+ /**
51
+ * Effect function that sets the update the specifed prop as an array using first action argument as index
52
+ * and second as value to set.
53
+ */
54
+ export declare function setResInArray<S, K extends keyof S, K2 extends keyof S, T>(propName: K, dirtyProp?: K2): (ctx: {
55
+ s: S;
56
+ args: [number];
57
+ res: T;
58
+ }) => Partial<S>;
59
+ /**
60
+ * Effect function that sets the update the specifed prop as an array using first action argument as index
61
+ * and second as value to set.
62
+ */
63
+ export declare function setResInMap<S, K extends keyof S, K2 extends keyof S, T>(propName: K, dirtyProp?: K2): (ctx: {
64
+ s: S;
65
+ args: [string];
66
+ res: T;
67
+ }) => Partial<S>;