@mic-rexjs/usecases-react 1.3.34 → 1.3.36
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/configs/usecaseContextMap/types.d.ts +4 -4
- package/es/index.d.ts +5 -2
- package/es/index.js +2 -2
- package/lib/index.js +13 -21
- package/package.json +2 -2
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { OptionsGetterCollectionReducers } from '../../core/usecases/optionsGetterCellectionUseCase/types';
|
|
3
3
|
import { AsyncEntityGenerator, EntityGenerator, EntityReducers, EntityUseCase } from '@mic-rexjs/usecases';
|
|
4
|
-
export type ContextualEntityReducer<T> =
|
|
5
|
-
export type ContextualEntityReducers<T> = {
|
|
6
|
-
[K in keyof
|
|
4
|
+
export type ContextualEntityReducer<T, TReducer> = TReducer extends (entity: T, ...args: infer TArgs) => infer TReturn ? (...args: TArgs) => TReturn extends AsyncEntityGenerator<T, infer TResult> ? Promise<TResult> : TReturn extends EntityGenerator<T, infer TResult> ? TResult : TReturn : never;
|
|
5
|
+
export type ContextualEntityReducers<T, TReducers> = {
|
|
6
|
+
[K in keyof TReducers]: ContextualEntityReducer<T, TReducers[K]>;
|
|
7
7
|
};
|
|
8
|
-
export type UseCaseContext<T, TReducers> = [entity: T, reducers: ContextualEntityReducers<TReducers>];
|
|
8
|
+
export type UseCaseContext<T, TReducers> = [entity: T, reducers: ContextualEntityReducers<T, TReducers>];
|
|
9
9
|
export type UseCaseContextWithCollectionReducers<T, TReducers, TOptions> = [
|
|
10
10
|
...context: UseCaseContext<T, TReducers>,
|
|
11
11
|
collectionReducers: OptionsGetterCollectionReducers<TOptions>
|
package/es/index.d.ts
CHANGED
|
@@ -1,2 +1,5 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export { UseCaseFragment } from './components/UseCaseFragment';
|
|
2
|
+
export { useUseCase } from './hooks/useUseCase';
|
|
3
|
+
export type { UseCaseFragmentProps } from './components/UseCaseFragment/types';
|
|
4
|
+
export type { UseCaseContext, UseCaseContextWithProvider, UseCaseProvider } from './configs/usecaseContextMap/types';
|
|
5
|
+
export type { UseCaseHookOptions } from './hooks/useUseCase/types';
|
package/es/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export { UseCaseFragment } from './components/UseCaseFragment';
|
|
2
|
+
export { useUseCase } from './hooks/useUseCase';
|
package/lib/index.js
CHANGED
|
@@ -3,25 +3,17 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
6
|
+
Object.defineProperty(exports, "UseCaseFragment", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function get() {
|
|
9
|
+
return _UseCaseFragment.UseCaseFragment;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "useUseCase", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function get() {
|
|
15
|
+
return _useUseCase.useUseCase;
|
|
16
|
+
}
|
|
16
17
|
});
|
|
17
|
-
var
|
|
18
|
-
|
|
19
|
-
if (key === "default" || key === "__esModule") return;
|
|
20
|
-
if (key in exports && exports[key] === _useUseCase[key]) return;
|
|
21
|
-
Object.defineProperty(exports, key, {
|
|
22
|
-
enumerable: true,
|
|
23
|
-
get: function get() {
|
|
24
|
-
return _useUseCase[key];
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
});
|
|
18
|
+
var _UseCaseFragment = require("./components/UseCaseFragment");
|
|
19
|
+
var _useUseCase = require("./hooks/useUseCase");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mic-rexjs/usecases-react",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.36",
|
|
4
4
|
"description": "React-based solution for use usecases of Clean Architecture",
|
|
5
5
|
"private": false,
|
|
6
6
|
"keywords": [
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"@commitlint/cli": "^17.6.6",
|
|
49
49
|
"@commitlint/config-angular": "^17.6.6",
|
|
50
50
|
"@jest/globals": "^29.5.0",
|
|
51
|
-
"@mic-rexjs/usecases": "^1.4.
|
|
51
|
+
"@mic-rexjs/usecases": "^1.4.9",
|
|
52
52
|
"@testing-library/react": "^14.0.0",
|
|
53
53
|
"@types/node": "^20.4.2",
|
|
54
54
|
"@types/react": "^18.2.14",
|