@microphi/store 2.8.1 → 2.9.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/README.md +131 -2
- package/lib/cjs/lib/effect/effect.d.ts +1 -0
- package/lib/cjs/lib/effect/effect.d.ts.map +1 -1
- package/lib/cjs/lib/effect/effect.js +1 -2
- package/lib/cjs/lib/operators/cache.d.ts +1 -0
- package/lib/cjs/lib/operators/cache.d.ts.map +1 -1
- package/lib/cjs/lib/operators/cache.js +1 -0
- package/lib/cjs/lib/operators/debounce.d.ts +2 -0
- package/lib/cjs/lib/operators/debounce.d.ts.map +1 -1
- package/lib/cjs/lib/operators/debounce.js +6 -1
- package/lib/cjs/lib/operators/delay.d.ts +14 -0
- package/lib/cjs/lib/operators/delay.d.ts.map +1 -0
- package/lib/cjs/lib/operators/delay.js +44 -0
- package/lib/cjs/lib/store/store.d.ts +8 -5
- package/lib/cjs/lib/store/store.d.ts.map +1 -1
- package/lib/cjs/lib/store/store.js +8 -12
- package/lib/esm/lib/effect/effect.d.ts +1 -0
- package/lib/esm/lib/effect/effect.d.ts.map +1 -1
- package/lib/esm/lib/effect/effect.js +1 -2
- package/lib/esm/lib/operators/cache.d.ts +1 -0
- package/lib/esm/lib/operators/cache.d.ts.map +1 -1
- package/lib/esm/lib/operators/cache.js +1 -0
- package/lib/esm/lib/operators/debounce.d.ts +2 -0
- package/lib/esm/lib/operators/debounce.d.ts.map +1 -1
- package/lib/esm/lib/operators/debounce.js +4 -0
- package/lib/esm/lib/operators/delay.d.ts +14 -0
- package/lib/esm/lib/operators/delay.d.ts.map +1 -0
- package/lib/esm/lib/operators/delay.js +36 -0
- package/lib/esm/lib/store/store.d.ts +8 -5
- package/lib/esm/lib/store/store.d.ts.map +1 -1
- package/lib/esm/lib/store/store.js +11 -15
- package/lib/tsconfig.build.tsbuildinfo +1 -1
- package/lib/tsconfig.cjs.tsbuildinfo +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @microphi/store
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
@microphi/store is a pure RxJS state manager.
|
|
4
4
|
|
|
5
5
|
## Install
|
|
6
6
|
With your favourite package manager install
|
|
@@ -60,7 +60,6 @@ class MyStore extends Store<ItemsState, ItemsActions>
|
|
|
60
60
|
users: [...state.users, ...payload]
|
|
61
61
|
};
|
|
62
62
|
}
|
|
63
|
-
|
|
64
63
|
}
|
|
65
64
|
```
|
|
66
65
|
|
|
@@ -90,3 +89,133 @@ store.getLoadingFor('findAll').subscribe((loading) => {
|
|
|
90
89
|
});
|
|
91
90
|
|
|
92
91
|
```
|
|
92
|
+
|
|
93
|
+
### Choose the right strategy
|
|
94
|
+
We assume that an action always execute an async effect. Internally such effect is wrapped in a RxJS pipe, as such there are several way this can be done.
|
|
95
|
+
So for example when we dispatch an action such as `findOne` let's say its effect is a call to and endpoint to retrieve an entity by its id.
|
|
96
|
+
Dependending on the scenario we may want to `switchMap`, `mergeMap` or `concatMap`.
|
|
97
|
+
|
|
98
|
+
This can be achieved passing the `strategy` argument to the `@Effect` decorator such as:
|
|
99
|
+
|
|
100
|
+
```typescript
|
|
101
|
+
|
|
102
|
+
class MyStore extends Store<ItemsState, ItemsActions>
|
|
103
|
+
implements makeStore<ItemsState, ItemsActions> {
|
|
104
|
+
|
|
105
|
+
constructor() {
|
|
106
|
+
super({
|
|
107
|
+
users: ['alice', 'bob'],
|
|
108
|
+
selected: undefined,
|
|
109
|
+
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
@Effect('mergeMap')
|
|
114
|
+
findOne(id: string): Observable<string> {
|
|
115
|
+
return fromFetch(`http://my.super.endpoint/${id}`)
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
@Reduce()
|
|
119
|
+
public onFindOne(state: ItemsState, select: string) {
|
|
120
|
+
return {
|
|
121
|
+
...state,
|
|
122
|
+
selected,
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
### Operators
|
|
129
|
+
When dispatching actions some RxJS operators can be applied using decorators:
|
|
130
|
+
|
|
131
|
+
#### Cache
|
|
132
|
+
It caches the value returned from the effect (i.e.: its observable) for 300_000 (default) milliseconds (i.e.: 5 mins) or the amount of milliseconds provided in the `ttl` field.
|
|
133
|
+
The effect will be cached according to its arguments. I.e.: like a memoized function `@Cache` will get check arguments and cache their result separately.
|
|
134
|
+
|
|
135
|
+
Optionally a `trackBy` function can be provided in order to customized how arguments are considered for caching.
|
|
136
|
+
If not provided `JSON.stringify` is used to serialize the arguments.
|
|
137
|
+
If provided `trackBy` will have the exact same arguments of the effect being annotated.
|
|
138
|
+
```typescript
|
|
139
|
+
|
|
140
|
+
class MyStore extends Store<ItemsState, ItemsActions>
|
|
141
|
+
implements makeStore<ItemsState, ItemsActions> {
|
|
142
|
+
|
|
143
|
+
constructor() {
|
|
144
|
+
super({
|
|
145
|
+
users: ['alice', 'bob'],
|
|
146
|
+
selected: undefined,
|
|
147
|
+
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
@Effect('mergeMap')
|
|
152
|
+
@Cache({ttl: 1_000, trackBy: (id: string) => id.toLowerCase()})
|
|
153
|
+
findOne(id: string): Observable<string> {
|
|
154
|
+
return fromFetch(`http://my.super.endpoint/${id}`)
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
@Reduce()
|
|
158
|
+
public onFindOne(state: ItemsState, select: string) {
|
|
159
|
+
return {
|
|
160
|
+
...state,
|
|
161
|
+
selected,
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
#### DebounceTime
|
|
169
|
+
It will debouce calling the effect as in a RxJS pipe
|
|
170
|
+
|
|
171
|
+
```typescript
|
|
172
|
+
|
|
173
|
+
class MyStore extends Store<ItemsState, ItemsActions>
|
|
174
|
+
implements makeStore<ItemsState, ItemsActions> {
|
|
175
|
+
|
|
176
|
+
constructor() {
|
|
177
|
+
super({
|
|
178
|
+
users: ['alice', 'bob'],
|
|
179
|
+
selected: undefined,
|
|
180
|
+
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
@Effect('mergeMap')
|
|
185
|
+
@DebounceTime(300)
|
|
186
|
+
findOne(id: string): Observable<string> {
|
|
187
|
+
return fromFetch(`http://my.super.endpoint/${id}`)
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
@Reduce()
|
|
191
|
+
public onFindOne(state: ItemsState, select: string) {
|
|
192
|
+
return {
|
|
193
|
+
...state,
|
|
194
|
+
selected,
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
#### DelayTime
|
|
201
|
+
It will deley an effect as in a RxJS pipe.
|
|
202
|
+
```typescript
|
|
203
|
+
class TestClass extends Store<State, Actions> {
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* this effect will be rate limited at one call per 100 ms
|
|
207
|
+
*/
|
|
208
|
+
@Effect('concatMap')
|
|
209
|
+
@DelayTime(100)
|
|
210
|
+
effectWithDelay(id: string) {
|
|
211
|
+
return fromFetch(`http://my.super.endpoint/${id}`)
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
@Reduce()
|
|
215
|
+
onEffectWithDelay(state: State, payload: string): State {
|
|
216
|
+
return {...state, items: [...state.items, payload]};
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
```
|
|
220
|
+
⚠️ Note the use of `concatMap` strategy. If another strategy is used the effect of `@DelayTime` may be not what really expected.
|
|
221
|
+
Please see [delay.spec.ts](./src/lib/operators/delay.spec.ts) for all possible combination of `strategy` and `@DelayTime`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"effect.d.ts","sourceRoot":"","sources":["../../../../src/lib/effect/effect.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"effect.d.ts","sourceRoot":"","sources":["../../../../src/lib/effect/effect.ts"],"names":[],"mappings":"AACA,OAAO,kBAAkB,CAAC;AAE1B,MAAM,MAAM,cAAc,GAAG,WAAW,GAAG,UAAU,GAAG,WAAW,CAAC;AAEpE,MAAM,WAAW,MAAM;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,cAAc,CAAC;CAC1B;AAED,eAAO,MAAM,YAAY,eAAwB,CAAC;AAElD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AACH,wBAAgB,MAAM,CAAC,QAAQ,GAAE,cAA4B,GAAG,eAAe,CAO9E;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,OAE3D;AAED,wBAAgB,UAAU,CAAC,CAAC,SAAS,MAAM,EAAE,QAAQ,EAAE,CAAC,GAAG,MAAM,EAAE,CAclE"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getEffects = exports.getEffectMetadata = exports.Effect = exports.EffectSymbol = void 0;
|
|
4
4
|
const scan_instance_1 = require("../utilities/scan-instance");
|
|
5
|
+
require("reflect-metadata");
|
|
5
6
|
exports.EffectSymbol = Symbol.for('@Effect');
|
|
6
7
|
/**
|
|
7
8
|
* Tags a method as an effect <br>
|
|
@@ -56,9 +57,7 @@ exports.EffectSymbol = Symbol.for('@Effect');
|
|
|
56
57
|
* @constructor
|
|
57
58
|
*/
|
|
58
59
|
function Effect(strategy = 'switchMap') {
|
|
59
|
-
// return Reflect.metadata(EffectSymbol, strategy);
|
|
60
60
|
return (target, propertyKey, descriptor) => {
|
|
61
|
-
// return Reflect.metadata(EffectSymbol, strategy)(target, propertyKey);
|
|
62
61
|
Reflect.defineMetadata(exports.EffectSymbol, strategy, target, propertyKey);
|
|
63
62
|
return descriptor;
|
|
64
63
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cache.d.ts","sourceRoot":"","sources":["../../../../src/lib/operators/cache.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAClC,OAAO,EAAE,EAAE,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"cache.d.ts","sourceRoot":"","sources":["../../../../src/lib/operators/cache.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAClC,OAAO,EAAE,EAAE,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,kBAAkB,CAAC;AAE1B,eAAO,MAAM,WAAW,eAAmB,CAAC;AAE5C,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,MAAM,GAAC,MAAM,CAAC;CAC7C;AAED,MAAM,MAAM,YAAY,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,UAAU,CAAC,GAAG,CAAC,CAAC;AAE/D;;GAEG;AACH,wBAAgB,KAAK,CAAC,OAAO,CAAC,EAAE,YAAY,wCAEE,CAAC,YAAY,GAAG,cAAc,wBAAwB,EAAE,CAAC,UA2CtG"}
|
|
@@ -2,6 +2,7 @@ import 'reflect-metadata';
|
|
|
2
2
|
import { Class } from 'utility-types';
|
|
3
3
|
import { Store } from '../store/store';
|
|
4
4
|
import { Fn, Key } from '../store/types';
|
|
5
|
+
import { MonoTypeOperatorFunction } from 'rxjs';
|
|
5
6
|
/**
|
|
6
7
|
* Add a debounce to each dispatch of this action
|
|
7
8
|
*/
|
|
@@ -9,4 +10,5 @@ export declare function DebounceTime(time: number): <T extends Fn, S extends Sto
|
|
|
9
10
|
export declare function getDebounceTimeMetadata<T>(klass: Class<T>, key: string): any;
|
|
10
11
|
export declare function getDebounceTimeMetadataFromInstance(instance: object, key: string): number;
|
|
11
12
|
export declare function getDebounce<T extends object>(instance: T, key: string): number;
|
|
13
|
+
export declare function debounceOrNothing<T>(dueTime: number): MonoTypeOperatorFunction<T>;
|
|
12
14
|
//# sourceMappingURL=debounce.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"debounce.d.ts","sourceRoot":"","sources":["../../../../src/lib/operators/debounce.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAEtC,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAE,EAAE,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"debounce.d.ts","sourceRoot":"","sources":["../../../../src/lib/operators/debounce.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAEtC,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAE,EAAE,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,wBAAwB,EAA0B,MAAM,MAAM,CAAC;AAKxE;;GAEG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,qDAEkB,CAAC,OAAO,GAAG,cAAc,wBAAwB,CAAC,CAAC,gCAI7G;AAED,wBAAgB,uBAAuB,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,OAEtE;AAED,wBAAgB,mCAAmC,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,UAQhF;AAED,wBAAgB,WAAW,CAAC,CAAC,SAAS,MAAM,EAAE,QAAQ,EAAE,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAc9E;AAED,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,OAAO,EAAE,MAAM,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAEjF"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getDebounce = exports.getDebounceTimeMetadataFromInstance = exports.getDebounceTimeMetadata = exports.DebounceTime = void 0;
|
|
3
|
+
exports.debounceOrNothing = exports.getDebounce = exports.getDebounceTimeMetadataFromInstance = exports.getDebounceTimeMetadata = exports.DebounceTime = void 0;
|
|
4
4
|
require("reflect-metadata");
|
|
5
5
|
const scan_instance_1 = require("../utilities/scan-instance");
|
|
6
|
+
const rxjs_1 = require("rxjs");
|
|
6
7
|
const DebounceSymbol = Symbol.for('@DebounceTime');
|
|
7
8
|
/**
|
|
8
9
|
* Add a debounce to each dispatch of this action
|
|
@@ -37,3 +38,7 @@ function getDebounce(instance, key) {
|
|
|
37
38
|
return debounce;
|
|
38
39
|
}
|
|
39
40
|
exports.getDebounce = getDebounce;
|
|
41
|
+
function debounceOrNothing(dueTime) {
|
|
42
|
+
return dueTime ? (0, rxjs_1.debounceTime)(dueTime) : rxjs_1.identity;
|
|
43
|
+
}
|
|
44
|
+
exports.debounceOrNothing = debounceOrNothing;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import 'reflect-metadata';
|
|
2
|
+
import { Class } from 'utility-types';
|
|
3
|
+
import { Store } from '../store/store';
|
|
4
|
+
import { Fn, Key } from '../store/types';
|
|
5
|
+
import { MonoTypeOperatorFunction } from 'rxjs';
|
|
6
|
+
/**
|
|
7
|
+
* Add a delay to each dispatch of this action
|
|
8
|
+
*/
|
|
9
|
+
export declare function DelayTime(time: number): <T extends Fn, S extends Store<any, any>>(target: S, key: Key, descriptor: TypedPropertyDescriptor<T>) => TypedPropertyDescriptor<T>;
|
|
10
|
+
export declare function getDelayTimeMetadata<T>(klass: Class<T>, key: string): any;
|
|
11
|
+
export declare function getDelayTimeMetadataFromInstance(instance: object, key: string): number;
|
|
12
|
+
export declare function getDelay<T extends object>(instance: T, key: string): number;
|
|
13
|
+
export declare function delayOrNothing<T>(delayTime: number): MonoTypeOperatorFunction<T>;
|
|
14
|
+
//# sourceMappingURL=delay.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delay.d.ts","sourceRoot":"","sources":["../../../../src/lib/operators/delay.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAEtC,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAE,EAAE,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,wBAAwB,EAAmB,MAAM,MAAM,CAAC;AAKjE;;GAEG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,qDAEqB,CAAC,OAAO,GAAG,cAAc,wBAAwB,CAAC,CAAC,gCAI7G;AAED,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,OAEnE;AAED,wBAAgB,gCAAgC,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,UAQ7E;AAED,wBAAgB,QAAQ,CAAC,CAAC,SAAS,MAAM,EAAE,QAAQ,EAAE,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAc3E;AAED,wBAAgB,cAAc,CAAC,CAAC,EAAE,SAAS,EAAE,MAAM,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAEhF"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.delayOrNothing = exports.getDelay = exports.getDelayTimeMetadataFromInstance = exports.getDelayTimeMetadata = exports.DelayTime = void 0;
|
|
4
|
+
require("reflect-metadata");
|
|
5
|
+
const scan_instance_1 = require("../utilities/scan-instance");
|
|
6
|
+
const rxjs_1 = require("rxjs");
|
|
7
|
+
const DelaySymbol = Symbol.for('@DelayTime');
|
|
8
|
+
/**
|
|
9
|
+
* Add a delay to each dispatch of this action
|
|
10
|
+
*/
|
|
11
|
+
function DelayTime(time) {
|
|
12
|
+
return (target, key, descriptor) => {
|
|
13
|
+
Reflect.defineMetadata(DelaySymbol, time, target, key);
|
|
14
|
+
return descriptor;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
exports.DelayTime = DelayTime;
|
|
18
|
+
function getDelayTimeMetadata(klass, key) {
|
|
19
|
+
return Reflect.getMetadata(DelaySymbol, klass.prototype, key);
|
|
20
|
+
}
|
|
21
|
+
exports.getDelayTimeMetadata = getDelayTimeMetadata;
|
|
22
|
+
function getDelayTimeMetadataFromInstance(instance, key) {
|
|
23
|
+
let debounce = 0;
|
|
24
|
+
(0, scan_instance_1.scanInstance)(instance, (proto) => {
|
|
25
|
+
debounce = Reflect.getMetadata(DelaySymbol, proto, key);
|
|
26
|
+
});
|
|
27
|
+
return debounce;
|
|
28
|
+
}
|
|
29
|
+
exports.getDelayTimeMetadataFromInstance = getDelayTimeMetadataFromInstance;
|
|
30
|
+
function getDelay(instance, key) {
|
|
31
|
+
let delay = 0;
|
|
32
|
+
(0, scan_instance_1.scanInstance)(instance, (proto) => {
|
|
33
|
+
const value = Reflect.getMetadata(DelaySymbol, proto, key);
|
|
34
|
+
if (value) {
|
|
35
|
+
delay = value;
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
return delay;
|
|
39
|
+
}
|
|
40
|
+
exports.getDelay = getDelay;
|
|
41
|
+
function delayOrNothing(delayTime) {
|
|
42
|
+
return delayTime ? (0, rxjs_1.delay)(delayTime) : rxjs_1.identity;
|
|
43
|
+
}
|
|
44
|
+
exports.delayOrNothing = delayOrNothing;
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
import { BehaviorSubject, Observable } from 'rxjs';
|
|
1
|
+
import { BehaviorSubject, Observable, SchedulerLike } from 'rxjs';
|
|
2
2
|
import { Effect } from '../effect/effect';
|
|
3
|
+
import { CacheSymbol } from '../operators/cache';
|
|
3
4
|
import { Reducer } from '../reduce/reduce';
|
|
4
5
|
import { getPayloadFromActionType, LoadingState } from './types';
|
|
5
|
-
import { CacheSymbol } from '../operators/cache';
|
|
6
6
|
export declare abstract class Store<State, A> {
|
|
7
7
|
private initialState;
|
|
8
|
-
|
|
8
|
+
protected [CacheSymbol]: Map<string, {
|
|
9
|
+
timestamp: number;
|
|
10
|
+
value: Observable<any>;
|
|
11
|
+
}>;
|
|
9
12
|
private readonly actions;
|
|
10
13
|
readonly effects: Effect[];
|
|
11
14
|
readonly reducers: Reducer[];
|
|
@@ -13,11 +16,11 @@ export declare abstract class Store<State, A> {
|
|
|
13
16
|
get loading$(): Observable<LoadingState<A>>;
|
|
14
17
|
protected readonly _store$: BehaviorSubject<State>;
|
|
15
18
|
get state$(): Observable<State>;
|
|
16
|
-
constructor(initialState: State);
|
|
19
|
+
constructor(initialState: State, scheduler?: SchedulerLike);
|
|
17
20
|
select<R>(projection: (s: State) => R): Observable<R>;
|
|
18
21
|
getLoadingFor<C extends keyof A>(action: C): Observable<boolean>;
|
|
19
22
|
dispatch<C extends keyof A>(action: C, ...payload: getPayloadFromActionType<A, C>): void;
|
|
20
|
-
|
|
23
|
+
protected static noopEffect(payload: any): Observable<any>;
|
|
21
24
|
private static getOperator;
|
|
22
25
|
private swallowError;
|
|
23
26
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../../../src/lib/store/store.ts"],"names":[],"mappings":"AACA,O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,EAAE,wBAAwB,CAAC,CAAC,EAAE,CAAC,CAAC;IAa5C,SAAS,CAAC,MAAM,CAAC,UAAU,CAAC,OAAO,EAAE,GAAG;IAIxC,OAAO,CAAC,MAAM,CAAC,WAAW;IAU1B,OAAO,CAAC,YAAY;CAarB"}
|
|
@@ -6,9 +6,10 @@ exports.Store = void 0;
|
|
|
6
6
|
const rxjs_1 = require("rxjs");
|
|
7
7
|
const operators_1 = require("rxjs/operators");
|
|
8
8
|
const effect_1 = require("../effect/effect");
|
|
9
|
+
const cache_1 = require("../operators/cache");
|
|
9
10
|
const debounce_1 = require("../operators/debounce");
|
|
11
|
+
const delay_1 = require("../operators/delay");
|
|
10
12
|
const reduce_1 = require("../reduce/reduce");
|
|
11
|
-
const cache_1 = require("../operators/cache");
|
|
12
13
|
class Store {
|
|
13
14
|
get loading$() {
|
|
14
15
|
return this._loading$.asObservable();
|
|
@@ -16,7 +17,7 @@ class Store {
|
|
|
16
17
|
get state$() {
|
|
17
18
|
return this._store$.asObservable();
|
|
18
19
|
}
|
|
19
|
-
constructor(initialState) {
|
|
20
|
+
constructor(initialState, scheduler = rxjs_1.asapScheduler) {
|
|
20
21
|
this.initialState = initialState;
|
|
21
22
|
this[_a] = new Map();
|
|
22
23
|
this.actions = new Map();
|
|
@@ -34,13 +35,10 @@ class Store {
|
|
|
34
35
|
const effect = this.effects.find((e) => e.action === key);
|
|
35
36
|
const operator = Store.getOperator(effect.strategy);
|
|
36
37
|
const action = this.actions.get(key);
|
|
37
|
-
const pipeline = [];
|
|
38
38
|
if (action) {
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}
|
|
43
|
-
pipeline.push((0, operators_1.withLatestFrom)(this._store$), (0, operators_1.tap)(([{ payload }]) => {
|
|
39
|
+
const debounced = (0, debounce_1.getDebounce)(this, key) || 0;
|
|
40
|
+
const delayTime = (0, delay_1.getDelay)(this, key) || 0;
|
|
41
|
+
action.pipe((0, operators_1.withLatestFrom)(this._store$), (0, debounce_1.debounceOrNothing)(debounced), (0, operators_1.tap)(([{ payload }]) => {
|
|
44
42
|
this._loading$.next({
|
|
45
43
|
payload: payload,
|
|
46
44
|
status: true,
|
|
@@ -48,7 +46,7 @@ class Store {
|
|
|
48
46
|
});
|
|
49
47
|
}), operator(([{ name, payload }]) => {
|
|
50
48
|
const method = name;
|
|
51
|
-
return this[method](...payload).pipe((0, operators_1.tap)((response) => {
|
|
49
|
+
return this[method](...payload).pipe((0, delay_1.delayOrNothing)(delayTime), (0, operators_1.tap)((response) => {
|
|
52
50
|
this._loading$.next({
|
|
53
51
|
payload,
|
|
54
52
|
response,
|
|
@@ -80,9 +78,7 @@ class Store {
|
|
|
80
78
|
// error need to be swallowed here too otherwise the observable chain will be broken
|
|
81
79
|
// meaning that once an action goes into an error it cannot be dispatched again
|
|
82
80
|
(0, operators_1.catchError)((error) => this.swallowError(key, error, payload)));
|
|
83
|
-
}));
|
|
84
|
-
// @ts-ignore
|
|
85
|
-
action.pipe(...pipeline).subscribe(this._store$);
|
|
81
|
+
})).subscribe((state) => this._store$.next(state));
|
|
86
82
|
}
|
|
87
83
|
});
|
|
88
84
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"effect.d.ts","sourceRoot":"","sources":["../../../../src/lib/effect/effect.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"effect.d.ts","sourceRoot":"","sources":["../../../../src/lib/effect/effect.ts"],"names":[],"mappings":"AACA,OAAO,kBAAkB,CAAC;AAE1B,MAAM,MAAM,cAAc,GAAG,WAAW,GAAG,UAAU,GAAG,WAAW,CAAC;AAEpE,MAAM,WAAW,MAAM;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,cAAc,CAAC;CAC1B;AAED,eAAO,MAAM,YAAY,eAAwB,CAAC;AAElD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AACH,wBAAgB,MAAM,CAAC,QAAQ,GAAE,cAA4B,GAAG,eAAe,CAO9E;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,OAE3D;AAED,wBAAgB,UAAU,CAAC,CAAC,SAAS,MAAM,EAAE,QAAQ,EAAE,CAAC,GAAG,MAAM,EAAE,CAclE"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { scanInstance } from '../utilities/scan-instance';
|
|
2
|
+
import 'reflect-metadata';
|
|
2
3
|
export const EffectSymbol = Symbol.for('@Effect');
|
|
3
4
|
/**
|
|
4
5
|
* Tags a method as an effect <br>
|
|
@@ -53,9 +54,7 @@ export const EffectSymbol = Symbol.for('@Effect');
|
|
|
53
54
|
* @constructor
|
|
54
55
|
*/
|
|
55
56
|
export function Effect(strategy = 'switchMap') {
|
|
56
|
-
// return Reflect.metadata(EffectSymbol, strategy);
|
|
57
57
|
return (target, propertyKey, descriptor) => {
|
|
58
|
-
// return Reflect.metadata(EffectSymbol, strategy)(target, propertyKey);
|
|
59
58
|
Reflect.defineMetadata(EffectSymbol, strategy, target, propertyKey);
|
|
60
59
|
return descriptor;
|
|
61
60
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cache.d.ts","sourceRoot":"","sources":["../../../../src/lib/operators/cache.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAClC,OAAO,EAAE,EAAE,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"cache.d.ts","sourceRoot":"","sources":["../../../../src/lib/operators/cache.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAClC,OAAO,EAAE,EAAE,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,kBAAkB,CAAC;AAE1B,eAAO,MAAM,WAAW,eAAmB,CAAC;AAE5C,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,MAAM,GAAC,MAAM,CAAC;CAC7C;AAED,MAAM,MAAM,YAAY,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,UAAU,CAAC,GAAG,CAAC,CAAC;AAE/D;;GAEG;AACH,wBAAgB,KAAK,CAAC,OAAO,CAAC,EAAE,YAAY,wCAEE,CAAC,YAAY,GAAG,cAAc,wBAAwB,EAAE,CAAC,UA2CtG"}
|
|
@@ -2,6 +2,7 @@ import 'reflect-metadata';
|
|
|
2
2
|
import { Class } from 'utility-types';
|
|
3
3
|
import { Store } from '../store/store';
|
|
4
4
|
import { Fn, Key } from '../store/types';
|
|
5
|
+
import { MonoTypeOperatorFunction } from 'rxjs';
|
|
5
6
|
/**
|
|
6
7
|
* Add a debounce to each dispatch of this action
|
|
7
8
|
*/
|
|
@@ -9,4 +10,5 @@ export declare function DebounceTime(time: number): <T extends Fn, S extends Sto
|
|
|
9
10
|
export declare function getDebounceTimeMetadata<T>(klass: Class<T>, key: string): any;
|
|
10
11
|
export declare function getDebounceTimeMetadataFromInstance(instance: object, key: string): number;
|
|
11
12
|
export declare function getDebounce<T extends object>(instance: T, key: string): number;
|
|
13
|
+
export declare function debounceOrNothing<T>(dueTime: number): MonoTypeOperatorFunction<T>;
|
|
12
14
|
//# sourceMappingURL=debounce.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"debounce.d.ts","sourceRoot":"","sources":["../../../../src/lib/operators/debounce.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAEtC,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAE,EAAE,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"debounce.d.ts","sourceRoot":"","sources":["../../../../src/lib/operators/debounce.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAEtC,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAE,EAAE,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,wBAAwB,EAA0B,MAAM,MAAM,CAAC;AAKxE;;GAEG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,qDAEkB,CAAC,OAAO,GAAG,cAAc,wBAAwB,CAAC,CAAC,gCAI7G;AAED,wBAAgB,uBAAuB,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,OAEtE;AAED,wBAAgB,mCAAmC,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,UAQhF;AAED,wBAAgB,WAAW,CAAC,CAAC,SAAS,MAAM,EAAE,QAAQ,EAAE,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAc9E;AAED,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,OAAO,EAAE,MAAM,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAEjF"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import 'reflect-metadata';
|
|
2
2
|
import { scanInstance } from '../utilities/scan-instance';
|
|
3
|
+
import { debounceTime, identity } from 'rxjs';
|
|
3
4
|
const DebounceSymbol = Symbol.for('@DebounceTime');
|
|
4
5
|
/**
|
|
5
6
|
* Add a debounce to each dispatch of this action
|
|
@@ -30,3 +31,6 @@ export function getDebounce(instance, key) {
|
|
|
30
31
|
});
|
|
31
32
|
return debounce;
|
|
32
33
|
}
|
|
34
|
+
export function debounceOrNothing(dueTime) {
|
|
35
|
+
return dueTime ? debounceTime(dueTime) : identity;
|
|
36
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import 'reflect-metadata';
|
|
2
|
+
import { Class } from 'utility-types';
|
|
3
|
+
import { Store } from '../store/store';
|
|
4
|
+
import { Fn, Key } from '../store/types';
|
|
5
|
+
import { MonoTypeOperatorFunction } from 'rxjs';
|
|
6
|
+
/**
|
|
7
|
+
* Add a delay to each dispatch of this action
|
|
8
|
+
*/
|
|
9
|
+
export declare function DelayTime(time: number): <T extends Fn, S extends Store<any, any>>(target: S, key: Key, descriptor: TypedPropertyDescriptor<T>) => TypedPropertyDescriptor<T>;
|
|
10
|
+
export declare function getDelayTimeMetadata<T>(klass: Class<T>, key: string): any;
|
|
11
|
+
export declare function getDelayTimeMetadataFromInstance(instance: object, key: string): number;
|
|
12
|
+
export declare function getDelay<T extends object>(instance: T, key: string): number;
|
|
13
|
+
export declare function delayOrNothing<T>(delayTime: number): MonoTypeOperatorFunction<T>;
|
|
14
|
+
//# sourceMappingURL=delay.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delay.d.ts","sourceRoot":"","sources":["../../../../src/lib/operators/delay.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAEtC,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAE,EAAE,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,wBAAwB,EAAmB,MAAM,MAAM,CAAC;AAKjE;;GAEG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,qDAEqB,CAAC,OAAO,GAAG,cAAc,wBAAwB,CAAC,CAAC,gCAI7G;AAED,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,OAEnE;AAED,wBAAgB,gCAAgC,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,UAQ7E;AAED,wBAAgB,QAAQ,CAAC,CAAC,SAAS,MAAM,EAAE,QAAQ,EAAE,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAc3E;AAED,wBAAgB,cAAc,CAAC,CAAC,EAAE,SAAS,EAAE,MAAM,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAEhF"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import 'reflect-metadata';
|
|
2
|
+
import { scanInstance } from '../utilities/scan-instance';
|
|
3
|
+
import { delay, identity } from 'rxjs';
|
|
4
|
+
const DelaySymbol = Symbol.for('@DelayTime');
|
|
5
|
+
/**
|
|
6
|
+
* Add a delay to each dispatch of this action
|
|
7
|
+
*/
|
|
8
|
+
export function DelayTime(time) {
|
|
9
|
+
return (target, key, descriptor) => {
|
|
10
|
+
Reflect.defineMetadata(DelaySymbol, time, target, key);
|
|
11
|
+
return descriptor;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
export function getDelayTimeMetadata(klass, key) {
|
|
15
|
+
return Reflect.getMetadata(DelaySymbol, klass.prototype, key);
|
|
16
|
+
}
|
|
17
|
+
export function getDelayTimeMetadataFromInstance(instance, key) {
|
|
18
|
+
let debounce = 0;
|
|
19
|
+
scanInstance(instance, (proto) => {
|
|
20
|
+
debounce = Reflect.getMetadata(DelaySymbol, proto, key);
|
|
21
|
+
});
|
|
22
|
+
return debounce;
|
|
23
|
+
}
|
|
24
|
+
export function getDelay(instance, key) {
|
|
25
|
+
let delay = 0;
|
|
26
|
+
scanInstance(instance, (proto) => {
|
|
27
|
+
const value = Reflect.getMetadata(DelaySymbol, proto, key);
|
|
28
|
+
if (value) {
|
|
29
|
+
delay = value;
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
return delay;
|
|
33
|
+
}
|
|
34
|
+
export function delayOrNothing(delayTime) {
|
|
35
|
+
return delayTime ? delay(delayTime) : identity;
|
|
36
|
+
}
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
import { BehaviorSubject, Observable } from 'rxjs';
|
|
1
|
+
import { BehaviorSubject, Observable, SchedulerLike } from 'rxjs';
|
|
2
2
|
import { Effect } from '../effect/effect';
|
|
3
|
+
import { CacheSymbol } from '../operators/cache';
|
|
3
4
|
import { Reducer } from '../reduce/reduce';
|
|
4
5
|
import { getPayloadFromActionType, LoadingState } from './types';
|
|
5
|
-
import { CacheSymbol } from '../operators/cache';
|
|
6
6
|
export declare abstract class Store<State, A> {
|
|
7
7
|
private initialState;
|
|
8
|
-
|
|
8
|
+
protected [CacheSymbol]: Map<string, {
|
|
9
|
+
timestamp: number;
|
|
10
|
+
value: Observable<any>;
|
|
11
|
+
}>;
|
|
9
12
|
private readonly actions;
|
|
10
13
|
readonly effects: Effect[];
|
|
11
14
|
readonly reducers: Reducer[];
|
|
@@ -13,11 +16,11 @@ export declare abstract class Store<State, A> {
|
|
|
13
16
|
get loading$(): Observable<LoadingState<A>>;
|
|
14
17
|
protected readonly _store$: BehaviorSubject<State>;
|
|
15
18
|
get state$(): Observable<State>;
|
|
16
|
-
constructor(initialState: State);
|
|
19
|
+
constructor(initialState: State, scheduler?: SchedulerLike);
|
|
17
20
|
select<R>(projection: (s: State) => R): Observable<R>;
|
|
18
21
|
getLoadingFor<C extends keyof A>(action: C): Observable<boolean>;
|
|
19
22
|
dispatch<C extends keyof A>(action: C, ...payload: getPayloadFromActionType<A, C>): void;
|
|
20
|
-
|
|
23
|
+
protected static noopEffect(payload: any): Observable<any>;
|
|
21
24
|
private static getOperator;
|
|
22
25
|
private swallowError;
|
|
23
26
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../../../src/lib/store/store.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1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