@reactables/core 1.2.0-alpha.3 → 1.2.1
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.
|
@@ -11,7 +11,7 @@ export interface EffectsAndSources {
|
|
|
11
11
|
}
|
|
12
12
|
export interface RxConfig<T, S extends Cases<T>> extends SliceConfig<T, S>, EffectsAndSources {
|
|
13
13
|
debug?: boolean;
|
|
14
|
-
/**@deprecated Use storeValue
|
|
14
|
+
/**@deprecated Use storeValue modifier instead to add store value behaviour to reactable */
|
|
15
15
|
storeValue?: boolean;
|
|
16
16
|
}
|
|
17
17
|
export declare const RxBuilder: <T, S extends Cases<T>>({ effects, sources, debug, storeValue, ...sliceConfig }: RxConfig<T, S>) => Reactable<T, { [K in keyof S]: (payload?: unknown) => void; }>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { Observable, ObservedValueOf } from 'rxjs';
|
|
2
2
|
import { Action, Reactable } from '../Models';
|
|
3
|
-
export declare const combine: <T extends Record<string, Reactable<unknown, unknown>>>(
|
|
3
|
+
export declare const combine: <T extends Record<string, Reactable<unknown, unknown>>>(sourceReactables: T) => [Observable<{ [K in keyof T]: ObservedValueOf<T[K][0]>; }>, { [K_1 in keyof T]: T[K_1][1]; }, Observable<Action<unknown>>];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/index.js
CHANGED
|
@@ -299,14 +299,16 @@ var storeValue = function (reactable) {
|
|
|
299
299
|
return [replaySubject$, __assign(__assign({}, actions), { destroy: destroy }), actions$];
|
|
300
300
|
};
|
|
301
301
|
|
|
302
|
-
var combine = function (
|
|
303
|
-
var _a = Object.entries(
|
|
302
|
+
var combine = function (sourceReactables) {
|
|
303
|
+
var _a = Object.entries(sourceReactables).reduce(function (acc, _a) {
|
|
304
304
|
var _b, _c;
|
|
305
305
|
var key = _a[0], _d = _a[1], state$ = _d[0], actions = _d[1], actions$ = _d[2];
|
|
306
306
|
return {
|
|
307
307
|
states: __assign(__assign({}, acc.states), (_b = {}, _b[key] = state$, _b)),
|
|
308
308
|
actions: __assign(__assign({}, acc.actions), (_c = {}, _c[key] = actions, _c)),
|
|
309
|
-
actions$: actions$
|
|
309
|
+
actions$: actions$
|
|
310
|
+
? acc.actions$.concat(actions$.pipe(operators.map(function (action) { return (__assign(__assign({}, action), { type: "[".concat(key, "] - ").concat(action.type) })); })))
|
|
311
|
+
: acc.actions$
|
|
310
312
|
};
|
|
311
313
|
}, {
|
|
312
314
|
states: {},
|
package/package.json
CHANGED