ngx-lift 1.3.0 → 1.3.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.
- package/esm2022/lib/operators/combine-latest-eager.operator.mjs +1 -1
- package/esm2022/lib/operators/distinct-on-change.operator.mjs +1 -1
- package/esm2022/lib/operators/poll.operator.mjs +16 -13
- package/esm2022/lib/pipes/array-join.pipe.mjs +4 -4
- package/esm2022/lib/pipes/byte-converter.pipe.mjs +4 -4
- package/esm2022/lib/pipes/is-https.pipe.mjs +4 -4
- package/esm2022/lib/pipes/mask.pipe.mjs +4 -4
- package/esm2022/lib/signals/combine-from.mjs +1 -1
- package/esm2022/lib/signals/computed-async.mjs +1 -1
- package/esm2022/lib/signals/inject-params.mjs +1 -1
- package/esm2022/lib/signals/inject-query-params.mjs +1 -1
- package/esm2022/lib/signals/merge-from.mjs +1 -1
- package/esm2022/lib/utils/form.util.mjs +1 -1
- package/esm2022/lib/utils/is-empty.util.mjs +1 -1
- package/esm2022/lib/utils/is-equal.util.mjs +1 -1
- package/esm2022/lib/utils/pick-by.util.mjs +1 -1
- package/esm2022/lib/validators/unique.validator.mjs +1 -1
- package/esm2022/lib/validators/url.validator.mjs +1 -1
- package/fesm2022/ngx-lift.mjs +27 -24
- package/fesm2022/ngx-lift.mjs.map +1 -1
- package/lib/operators/poll.operator.d.ts +11 -9
- package/package.json +1 -1
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
2
|
import { AsyncState } from '../models';
|
|
3
3
|
/**
|
|
4
|
-
* Polls
|
|
4
|
+
* Polls data at a specified interval and can be triggered manually.
|
|
5
5
|
*
|
|
6
|
-
* @
|
|
7
|
-
* @
|
|
8
|
-
* @param {
|
|
9
|
-
* @param {
|
|
10
|
-
* @param {Observable<
|
|
11
|
-
* @
|
|
6
|
+
* @template Data - The type of the data emitted by the polling function.
|
|
7
|
+
* @template Input - The type of the input parameter used to build polling parameters.
|
|
8
|
+
* @param {object} options - The configuration options for polling.
|
|
9
|
+
* @param {number} options.interval - The interval in milliseconds between each poll.
|
|
10
|
+
* @param {(params: any) => Observable<Data>} options.pollingFn - A function that returns an Observable emitting the polled data.
|
|
11
|
+
* @param {(input: Input | null) => any} [options.paramsBuilder] - An optional function that builds parameters for the polling function based on the input.
|
|
12
|
+
* @param {Observable<Input>} [options.trigger] - An optional Observable that triggers a manual poll.
|
|
13
|
+
* @returns {Observable<AsyncState<Data>>} An Observable emitting objects representing the state of the asynchronous operation.
|
|
12
14
|
*/
|
|
13
15
|
export declare function poll<Data, Input>(options: {
|
|
14
16
|
interval: number;
|
|
15
|
-
|
|
16
|
-
paramsBuilder?: (input: Input | null) =>
|
|
17
|
+
pollingFn: (params: any) => Observable<Data>;
|
|
18
|
+
paramsBuilder?: (input: Input | null) => any;
|
|
17
19
|
trigger?: Observable<Input>;
|
|
18
20
|
}): Observable<AsyncState<Data>>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ngx-lift",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.1",
|
|
4
4
|
"description": "A project has been crafted with the goal of enhancing and simplifying your Angular development experience.",
|
|
5
5
|
"author": "Guanghui Wang <guanghui-wang@foxmail.com>",
|
|
6
6
|
"peerDependencies": {
|