ngx-lift 1.10.0 → 1.10.2
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/models/kubernetes-object-condition.model.mjs +1 -1
- package/esm2022/lib/operators/poll.operator.mjs +2 -2
- 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/pipes/range.pipe.mjs +4 -4
- package/esm2022/lib/utils/idle-detection/idle-detection.module.mjs +5 -5
- package/esm2022/lib/utils/idle-detection/idle-detection.service.mjs +4 -4
- package/esm2022/lib/utils/internal.util.mjs +13 -0
- package/esm2022/lib/utils/is-empty.util.mjs +40 -8
- package/fesm2022/ngx-lift.mjs +77 -33
- package/fesm2022/ngx-lift.mjs.map +1 -1
- package/lib/models/kubernetes-object-condition.model.d.ts +3 -3
- package/lib/operators/poll.operator.d.ts +13 -7
- package/lib/utils/internal.util.d.ts +4 -0
- package/lib/utils/is-empty.util.d.ts +8 -4
- package/package.json +11 -1
|
@@ -2,27 +2,32 @@ import { Signal } from '@angular/core';
|
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
import { AsyncState } from '../models';
|
|
4
4
|
/**
|
|
5
|
-
* Polls data at a specified interval and can be triggered manually
|
|
5
|
+
* Polls data at a specified interval and can be triggered manually, and returns an observable that
|
|
6
|
+
* emits the result of the poll as an `AsyncState` object.
|
|
6
7
|
*
|
|
7
8
|
* @template Data - The type of the data emitted by the polling function.
|
|
8
9
|
* @template Input - The type of the input parameter used to build polling parameters.
|
|
9
|
-
* @param
|
|
10
|
-
* @param
|
|
11
|
-
* @param
|
|
12
|
-
* @param
|
|
13
|
-
* @param
|
|
14
|
-
* @
|
|
10
|
+
* @param options.interval - The interval in milliseconds between each poll.
|
|
11
|
+
* @param options.pollingFn - A function that returns an Observable, Promise, or primitive value.
|
|
12
|
+
* @param options.forceRefresh - An optional Observable or Signal that triggers a manual refresh of the polling function.
|
|
13
|
+
* @param options.paramsBuilder - An optional function that builds parameters for the polling function based on the input. The value emitted by the forceRefresh observable will serve as the parameter.
|
|
14
|
+
* @param options.initialValue - An initial value to return before the first poll.
|
|
15
|
+
* @param options.delay - An optional delay, in milliseconds, to wait before starting the first poll.
|
|
16
|
+
*
|
|
17
|
+
* @returns An observable that emits the result of the poll as an `AsyncState` object.
|
|
15
18
|
*/
|
|
16
19
|
export declare function poll<Data>(options: {
|
|
17
20
|
interval: number;
|
|
18
21
|
pollingFn: (params: any) => Observable<Data> | Promise<Data> | Data;
|
|
19
22
|
initialValue?: AsyncState<Data>;
|
|
23
|
+
delay?: number;
|
|
20
24
|
}): Observable<AsyncState<Data>>;
|
|
21
25
|
export declare function poll<Data, Input>(options: {
|
|
22
26
|
interval: number;
|
|
23
27
|
pollingFn: (params: Input) => Observable<Data> | Promise<Data> | Data;
|
|
24
28
|
forceRefresh: Observable<Input> | Signal<Input>;
|
|
25
29
|
initialValue?: AsyncState<Data>;
|
|
30
|
+
delay?: number;
|
|
26
31
|
}): Observable<AsyncState<Data>>;
|
|
27
32
|
export declare function poll<Data, Input>(options: {
|
|
28
33
|
interval: number;
|
|
@@ -30,4 +35,5 @@ export declare function poll<Data, Input>(options: {
|
|
|
30
35
|
forceRefresh: Observable<Input> | Signal<Input>;
|
|
31
36
|
paramsBuilder: (input: Input) => any;
|
|
32
37
|
initialValue?: AsyncState<Data>;
|
|
38
|
+
delay?: number;
|
|
33
39
|
}): Observable<AsyncState<Data>>;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
+
export declare function isEmpty(value: string): value is '';
|
|
1
2
|
/**
|
|
2
|
-
* Check if a value is empty.
|
|
3
|
-
* @param
|
|
4
|
-
* @returns
|
|
3
|
+
* Check if a value is null, undefined, empty ArrayLike, Map, Set or empty object.
|
|
4
|
+
* @param value The value to check.
|
|
5
|
+
* @returns Whether the value is null, undefined, empty ArrayLike, Map, Set or empty object.
|
|
5
6
|
*/
|
|
6
|
-
export declare function isEmpty<T extends object |
|
|
7
|
+
export declare function isEmpty<T extends object | ArrayLike<any> | Map<any, any> | Set<any>>(value: T | null | undefined): value is null | undefined;
|
|
8
|
+
export declare function isNotEmpty(value: ''): false;
|
|
9
|
+
export declare function isNotEmpty(value: string): value is Exclude<string, ''>;
|
|
10
|
+
export declare function isNotEmpty<T extends object | ArrayLike<any> | Map<any, any> | Set<any>>(value: T | null | undefined): value is T;
|
package/package.json
CHANGED
|
@@ -1,8 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ngx-lift",
|
|
3
|
-
"version": "1.10.
|
|
3
|
+
"version": "1.10.2",
|
|
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
|
+
"license": "MIT",
|
|
7
|
+
"keywords": [
|
|
8
|
+
"angular",
|
|
9
|
+
"ngx-lift"
|
|
10
|
+
],
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "git+https://github.com/wghglory/ngx-lift.git"
|
|
14
|
+
},
|
|
15
|
+
"homepage": "https://ngx-lift.netlify.app",
|
|
6
16
|
"peerDependencies": {
|
|
7
17
|
"@angular/common": ">=17.0.0",
|
|
8
18
|
"@angular/core": ">=17.0.0",
|