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
package/fesm2022/ngx-lift.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { startWith, Subject, combineLatest, pipe, tap, map, catchError, of, Observable, expand, EMPTY, reduce, timer, isObservable, merge, exhaustMap, from, share, switchMap, fromEvent, throttleTime, identity, distinctUntilChanged,
|
|
1
|
+
import { startWith, Subject, combineLatest, pipe, tap, map, catchError, of, Observable, expand, EMPTY, reduce, timer, isObservable, merge, exhaustMap, from, share, switchMap, fromEvent, throttleTime, identity, distinctUntilChanged, exhaustAll, concatAll, mergeAll, switchAll } from 'rxjs';
|
|
2
2
|
import { toObservable, toSignal } from '@angular/core/rxjs-interop';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { Pipe, inject, LOCALE_ID, makeEnvironmentProviders, NgModule,
|
|
4
|
+
import { Pipe, inject, LOCALE_ID, makeEnvironmentProviders, NgModule, Optional, Injectable, assertInInjectionContext, isSignal, untracked, computed, DestroyRef, signal, effect } from '@angular/core';
|
|
5
5
|
import { Validators, FormArray } from '@angular/forms';
|
|
6
6
|
import { ActivatedRoute } from '@angular/router';
|
|
7
7
|
|
|
@@ -288,7 +288,7 @@ function isPromise$1(obj) {
|
|
|
288
288
|
|
|
289
289
|
function poll(options) {
|
|
290
290
|
const timerEmitValue = '__timer__emission__';
|
|
291
|
-
const timer$ = timer(0, options.interval).pipe(map((i) => `${timerEmitValue}${i}`));
|
|
291
|
+
const timer$ = timer(options.delay || 0, options.interval).pipe(map((i) => `${timerEmitValue}${i}`));
|
|
292
292
|
const trigger$ = options.forceRefresh === undefined
|
|
293
293
|
? EMPTY
|
|
294
294
|
: isObservable(options.forceRefresh)
|
|
@@ -376,10 +376,10 @@ class ArrayJoinPipe {
|
|
|
376
376
|
// For non-array cases or unexpected types, return the value as is
|
|
377
377
|
return value;
|
|
378
378
|
}
|
|
379
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
380
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.
|
|
379
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ArrayJoinPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
380
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: ArrayJoinPipe, isStandalone: true, name: "arrayJoin" }); }
|
|
381
381
|
}
|
|
382
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
382
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ArrayJoinPipe, decorators: [{
|
|
383
383
|
type: Pipe,
|
|
384
384
|
args: [{
|
|
385
385
|
name: 'arrayJoin',
|
|
@@ -437,10 +437,10 @@ class ByteConverterPipe {
|
|
|
437
437
|
formatNumber(value) {
|
|
438
438
|
return new Intl.NumberFormat(this.locale, { maximumFractionDigits: 2 }).format(value);
|
|
439
439
|
}
|
|
440
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
441
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.
|
|
440
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ByteConverterPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
441
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: ByteConverterPipe, isStandalone: true, name: "byteConverter" }); }
|
|
442
442
|
}
|
|
443
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
443
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ByteConverterPipe, decorators: [{
|
|
444
444
|
type: Pipe,
|
|
445
445
|
args: [{
|
|
446
446
|
name: 'byteConverter',
|
|
@@ -631,11 +631,11 @@ class IdleDetectionModule {
|
|
|
631
631
|
providers: [provideIdleDetectionConfig(config)],
|
|
632
632
|
};
|
|
633
633
|
}
|
|
634
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
635
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.
|
|
636
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.
|
|
634
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: IdleDetectionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
635
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: IdleDetectionModule }); }
|
|
636
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: IdleDetectionModule }); }
|
|
637
637
|
}
|
|
638
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
638
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: IdleDetectionModule, decorators: [{
|
|
639
639
|
type: NgModule,
|
|
640
640
|
args: [{
|
|
641
641
|
imports: [],
|
|
@@ -816,10 +816,10 @@ class IdleDetectionService {
|
|
|
816
816
|
this.countdown = this.timeoutDuration = config.timeoutDurationInSeconds;
|
|
817
817
|
}
|
|
818
818
|
}
|
|
819
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
820
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.
|
|
819
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: IdleDetectionService, deps: [{ token: IdleDetectionConfig, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
820
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: IdleDetectionService, providedIn: 'root' }); }
|
|
821
821
|
}
|
|
822
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
822
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: IdleDetectionService, decorators: [{
|
|
823
823
|
type: Injectable,
|
|
824
824
|
args: [{
|
|
825
825
|
providedIn: 'root',
|
|
@@ -828,21 +828,65 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImpor
|
|
|
828
828
|
type: Optional
|
|
829
829
|
}] }] });
|
|
830
830
|
|
|
831
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
832
|
+
function isArrayLike(value) {
|
|
833
|
+
return (value != null &&
|
|
834
|
+
typeof value !== 'function' &&
|
|
835
|
+
typeof value.length === 'number' &&
|
|
836
|
+
value.length >= 0 &&
|
|
837
|
+
value.length <= Number.MAX_SAFE_INTEGER);
|
|
838
|
+
}
|
|
839
|
+
function isPrototype(value) {
|
|
840
|
+
const Ctor = value?.constructor;
|
|
841
|
+
return Ctor && Ctor.prototype === value;
|
|
842
|
+
}
|
|
843
|
+
|
|
844
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
831
845
|
/**
|
|
832
|
-
*
|
|
833
|
-
*
|
|
834
|
-
* @
|
|
846
|
+
* Checks if a value is empty.
|
|
847
|
+
*
|
|
848
|
+
* @param {any} value - The value to check for emptiness. It can be of any type.
|
|
849
|
+
* @return {boolean} `true` if the value is empty, `false` otherwise.
|
|
835
850
|
*/
|
|
836
851
|
function isEmpty(value) {
|
|
837
|
-
if (value
|
|
852
|
+
if (value === null || value === undefined) {
|
|
853
|
+
// Handles null and undefined
|
|
838
854
|
return true;
|
|
839
|
-
|
|
855
|
+
}
|
|
856
|
+
// Handle array-like objects (arrays, strings, jQuery-like collections)
|
|
857
|
+
if ((Array.isArray(value) || typeof value === 'string' || typeof value.splice === 'function') &&
|
|
858
|
+
isArrayLike(value)) {
|
|
840
859
|
return value.length === 0;
|
|
841
860
|
}
|
|
861
|
+
// Handle Maps and Sets
|
|
862
|
+
if (value instanceof Map || value instanceof Set) {
|
|
863
|
+
return value.size === 0;
|
|
864
|
+
}
|
|
865
|
+
// Handle objects
|
|
842
866
|
if (typeof value === 'object') {
|
|
843
|
-
|
|
867
|
+
// Check for prototype objects and non-enumerable properties
|
|
868
|
+
if (isPrototype(value)) {
|
|
869
|
+
return Object.getOwnPropertyNames(value).length === 0;
|
|
870
|
+
}
|
|
871
|
+
// Check for enumerable properties
|
|
872
|
+
for (const key in value) {
|
|
873
|
+
if (Object.prototype.hasOwnProperty.call(value, key)) {
|
|
874
|
+
return false;
|
|
875
|
+
}
|
|
876
|
+
}
|
|
877
|
+
return true;
|
|
844
878
|
}
|
|
845
|
-
|
|
879
|
+
// All other types (numbers, booleans, functions, etc.)
|
|
880
|
+
return true;
|
|
881
|
+
}
|
|
882
|
+
/**
|
|
883
|
+
* Checks if a value is not null, undefined, empty ArrayLike, Map, Set, or empty object.
|
|
884
|
+
*
|
|
885
|
+
* @param {any} value - The value to check.
|
|
886
|
+
* @return {boolean} Whether the value is not null, undefined, empty ArrayLike, Map, Set, or empty object.
|
|
887
|
+
*/
|
|
888
|
+
function isNotEmpty(value) {
|
|
889
|
+
return !isEmpty(value);
|
|
846
890
|
}
|
|
847
891
|
|
|
848
892
|
/**
|
|
@@ -971,10 +1015,10 @@ class IsHttpsPipe {
|
|
|
971
1015
|
transform(value) {
|
|
972
1016
|
return isHttps(value);
|
|
973
1017
|
}
|
|
974
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
975
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.
|
|
1018
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: IsHttpsPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
1019
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: IsHttpsPipe, isStandalone: true, name: "isHttps" }); }
|
|
976
1020
|
}
|
|
977
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
1021
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: IsHttpsPipe, decorators: [{
|
|
978
1022
|
type: Pipe,
|
|
979
1023
|
args: [{
|
|
980
1024
|
name: 'isHttps',
|
|
@@ -1005,10 +1049,10 @@ class MaskPipe {
|
|
|
1005
1049
|
.map((char, i) => (i < unmaskedPrefixLength || i > value.length - unmaskedSuffixLength - 1 ? char : maskChar))
|
|
1006
1050
|
.join('');
|
|
1007
1051
|
}
|
|
1008
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
1009
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.
|
|
1052
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MaskPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
1053
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: MaskPipe, isStandalone: true, name: "mask" }); }
|
|
1010
1054
|
}
|
|
1011
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
1055
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MaskPipe, decorators: [{
|
|
1012
1056
|
type: Pipe,
|
|
1013
1057
|
args: [{
|
|
1014
1058
|
name: 'mask',
|
|
@@ -1021,10 +1065,10 @@ class RangePipe {
|
|
|
1021
1065
|
const input = value;
|
|
1022
1066
|
return range(...input);
|
|
1023
1067
|
}
|
|
1024
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
1025
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.
|
|
1068
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RangePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
1069
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: RangePipe, isStandalone: true, name: "range" }); }
|
|
1026
1070
|
}
|
|
1027
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
1071
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RangePipe, decorators: [{
|
|
1028
1072
|
type: Pipe,
|
|
1029
1073
|
args: [{
|
|
1030
1074
|
name: 'range',
|
|
@@ -1504,5 +1548,5 @@ function httpsValidator(control) {
|
|
|
1504
1548
|
* Generated bundle index. Do not edit.
|
|
1505
1549
|
*/
|
|
1506
1550
|
|
|
1507
|
-
export { ArrayJoinPipe, ByteConverterPipe, IdleDetectionConfig, IdleDetectionModule, IdleDetectionService, IsHttpsPipe, MaskPipe, RangePipe, UniqueValidator, aggregatePaginatedKubernetesResources, combineFrom, combineLatestEager, computedAsync, createAsyncState, createTrigger, dateRangeValidator, differenceInDays, distinctOnChange, fetchPaginatedKubernetesResources, httpsValidator, ifAsyncValidator, ifValidator, injectParams, injectQueryParams, intersectionValidator, isEmpty, isEqual, isFQDN, isHttps, isIP, isURL, logger, mergeFrom, omitBy, pickBy, poll, provideIdleDetectionConfig, range, startWithTap, switchMapWithAsyncState, urlValidator };
|
|
1551
|
+
export { ArrayJoinPipe, ByteConverterPipe, IdleDetectionConfig, IdleDetectionModule, IdleDetectionService, IsHttpsPipe, MaskPipe, RangePipe, UniqueValidator, aggregatePaginatedKubernetesResources, combineFrom, combineLatestEager, computedAsync, createAsyncState, createTrigger, dateRangeValidator, differenceInDays, distinctOnChange, fetchPaginatedKubernetesResources, httpsValidator, ifAsyncValidator, ifValidator, injectParams, injectQueryParams, intersectionValidator, isEmpty, isEqual, isFQDN, isHttps, isIP, isNotEmpty, isURL, logger, mergeFrom, omitBy, pickBy, poll, provideIdleDetectionConfig, range, startWithTap, switchMapWithAsyncState, urlValidator };
|
|
1508
1552
|
//# sourceMappingURL=ngx-lift.mjs.map
|