ngx-lift 0.4.0 → 0.5.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/esm2022/lib/pipes/array-join.pipe.mjs +3 -3
- package/esm2022/lib/pipes/byte-converter.pipe.mjs +3 -3
- package/esm2022/lib/pipes/is-https.pipe.mjs +3 -3
- package/esm2022/lib/pipes/mask.pipe.mjs +3 -3
- package/esm2022/lib/utils/difference-in-days.util.mjs +22 -0
- package/esm2022/lib/utils/index.mjs +2 -1
- package/fesm2022/ngx-lift.mjs +36 -14
- package/fesm2022/ngx-lift.mjs.map +1 -1
- package/lib/utils/difference-in-days.util.d.ts +16 -0
- package/lib/utils/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -8,10 +8,10 @@ export class ArrayJoinPipe {
|
|
|
8
8
|
// For non-array cases or unexpected types, return the value as is
|
|
9
9
|
return value;
|
|
10
10
|
}
|
|
11
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.
|
|
12
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.
|
|
11
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: ArrayJoinPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
12
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.3.4", ngImport: i0, type: ArrayJoinPipe, isStandalone: true, name: "arrayJoin" }); }
|
|
13
13
|
}
|
|
14
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.
|
|
14
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: ArrayJoinPipe, decorators: [{
|
|
15
15
|
type: Pipe,
|
|
16
16
|
args: [{
|
|
17
17
|
name: 'arrayJoin',
|
|
@@ -56,10 +56,10 @@ export class ByteConverterPipe {
|
|
|
56
56
|
formatNumber(value) {
|
|
57
57
|
return new Intl.NumberFormat(this.locale, { maximumFractionDigits: 2 }).format(value);
|
|
58
58
|
}
|
|
59
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.
|
|
60
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.
|
|
59
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: ByteConverterPipe, deps: [{ token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
60
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.3.4", ngImport: i0, type: ByteConverterPipe, isStandalone: true, name: "byteConverter" }); }
|
|
61
61
|
}
|
|
62
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.
|
|
62
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: ByteConverterPipe, decorators: [{
|
|
63
63
|
type: Pipe,
|
|
64
64
|
args: [{
|
|
65
65
|
name: 'byteConverter',
|
|
@@ -5,10 +5,10 @@ export class IsHttpsPipe {
|
|
|
5
5
|
transform(value) {
|
|
6
6
|
return httpsPattern.test(value);
|
|
7
7
|
}
|
|
8
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.
|
|
9
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.
|
|
8
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: IsHttpsPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
9
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.3.4", ngImport: i0, type: IsHttpsPipe, isStandalone: true, name: "isHttps" }); }
|
|
10
10
|
}
|
|
11
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.
|
|
11
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: IsHttpsPipe, decorators: [{
|
|
12
12
|
type: Pipe,
|
|
13
13
|
args: [{
|
|
14
14
|
name: 'isHttps',
|
|
@@ -23,10 +23,10 @@ export class MaskPipe {
|
|
|
23
23
|
.map((char, i) => (i < unmaskedPrefixLength || i > value.length - unmaskedSuffixLength - 1 ? char : maskChar))
|
|
24
24
|
.join('');
|
|
25
25
|
}
|
|
26
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.
|
|
27
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.
|
|
26
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: MaskPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
27
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.3.4", ngImport: i0, type: MaskPipe, isStandalone: true, name: "mask" }); }
|
|
28
28
|
}
|
|
29
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.
|
|
29
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: MaskPipe, decorators: [{
|
|
30
30
|
type: Pipe,
|
|
31
31
|
args: [{
|
|
32
32
|
name: 'mask',
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Calculates the difference in whole days between two dates.
|
|
3
|
+
*
|
|
4
|
+
* @param {Date | number | string} dateLeft - The date from which the difference is measured (the reference date).
|
|
5
|
+
* Can be a Date object, a number representing milliseconds since the Unix epoch,
|
|
6
|
+
* or a string in a format parseable by the Date constructor.
|
|
7
|
+
* @param {Date | number | string} dateRight - The date to be compared against the reference date.
|
|
8
|
+
* Can be a Date object, a number representing milliseconds since the Unix epoch,
|
|
9
|
+
* or a string in a format parseable by the Date constructor.
|
|
10
|
+
* @returns {number} The number of whole days between the reference date (dateLeft) and the compared date (dateRight).
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* // How many whole days are between '2022-09-08' and '2023-09-18'?
|
|
14
|
+
* const result = differenceInDays('2022-09-08', new Date('2023-09-18'));
|
|
15
|
+
*/
|
|
16
|
+
export function differenceInDays(dateLeft, dateRight) {
|
|
17
|
+
const _dateLeft = new Date(dateLeft);
|
|
18
|
+
const _dateRight = new Date(dateRight);
|
|
19
|
+
const difference = (_dateLeft.getTime() - _dateRight.getTime()) / (1000 * 60 * 60 * 24);
|
|
20
|
+
return Math.floor(difference);
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGlmZmVyZW5jZS1pbi1kYXlzLnV0aWwuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9uZ3gtbGlmdC9zcmMvbGliL3V0aWxzL2RpZmZlcmVuY2UtaW4tZGF5cy51dGlsLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7Ozs7Ozs7OztHQWNHO0FBQ0gsTUFBTSxVQUFVLGdCQUFnQixDQUFDLFFBQWdDLEVBQUUsU0FBaUM7SUFDbEcsTUFBTSxTQUFTLEdBQUcsSUFBSSxJQUFJLENBQUMsUUFBUSxDQUFDLENBQUM7SUFDckMsTUFBTSxVQUFVLEdBQUcsSUFBSSxJQUFJLENBQUMsU0FBUyxDQUFDLENBQUM7SUFFdkMsTUFBTSxVQUFVLEdBQUcsQ0FBQyxTQUFTLENBQUMsT0FBTyxFQUFFLEdBQUcsVUFBVSxDQUFDLE9BQU8sRUFBRSxDQUFDLEdB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GF0ZSAoZGF0ZUxlZnQpIGFuZCB0aGUgY29tcGFyZWQgZGF0ZSAoZGF0ZVJpZ2h0KS5cbiAqXG4gKiBAZXhhbXBsZVxuICogLy8gSG93IG1hbnkgd2hvbGUgZGF5cyBhcmUgYmV0d2VlbiAnMjAyMi0wOS0wOCcgYW5kICcyMDIzLTA5LTE4Jz9cbiAqIGNvbnN0IHJlc3VsdCA9IGRpZmZlcmVuY2VJbkRheXMoJzIwMjItMDktMDgnLCBuZXcgRGF0ZSgnMjAyMy0wOS0xOCcpKTtcbiAqL1xuZXhwb3J0IGZ1bmN0aW9uIGRpZmZlcmVuY2VJbkRheXMoZGF0ZUxlZnQ6IERhdGUgfCBudW1iZXIgfCBzdHJpbmcsIGRhdGVSaWdodDogRGF0ZSB8IG51bWJlciB8IHN0cmluZykge1xuICBjb25zdCBfZGF0ZUxlZnQgPSBuZXcgRGF0ZShkYXRlTGVmdCk7XG4gIGNvbnN0IF9kYXRlUmlnaHQgPSBuZXcgRGF0ZShkYXRlUmlnaHQpO1xuXG4gIGNvbnN0IGRpZmZlcmVuY2UgPSAoX2RhdGVMZWZ0LmdldFRpbWUoKSAtIF9kYXRlUmlnaHQuZ2V0VGltZSgpKSAvICgxMDAwICogNjAgKiA2MCAqIDI0KTtcblxuICByZXR1cm4gTWF0aC5mbG9vcihkaWZmZXJlbmNlKTtcbn1cbiJdfQ==
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
export * from './difference-in-days.util';
|
|
1
2
|
export * from './form.util';
|
|
2
3
|
export * from './is-empty.util';
|
|
3
4
|
export * from './is-equal.util';
|
|
4
5
|
export * from './pick-by.util';
|
|
5
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
6
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9uZ3gtbGlmdC9zcmMvbGliL3V0aWxzL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsMkJBQTJCLENBQUM7QUFDMUMsY0FBYyxhQUFhLENBQUM7QUFDNUIsY0FBYyxpQkFBaUIsQ0FBQztBQUNoQyxjQUFjLGlCQUFpQixDQUFDO0FBQ2hDLGNBQWMsZ0JBQWdCLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL2RpZmZlcmVuY2UtaW4tZGF5cy51dGlsJztcbmV4cG9ydCAqIGZyb20gJy4vZm9ybS51dGlsJztcbmV4cG9ydCAqIGZyb20gJy4vaXMtZW1wdHkudXRpbCc7XG5leHBvcnQgKiBmcm9tICcuL2lzLWVxdWFsLnV0aWwnO1xuZXhwb3J0ICogZnJvbSAnLi9waWNrLWJ5LnV0aWwnO1xuIl19
|
package/fesm2022/ngx-lift.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { startWith, Subject, combineLatest, tap, map,
|
|
1
|
+
import { startWith, Subject, combineLatest, pipe, tap, map, catchError, of, Observable, merge, EMPTY, timer, exhaustMap, share, switchMap } from 'rxjs';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
3
|
import { Pipe, LOCALE_ID, Inject } from '@angular/core';
|
|
4
4
|
import { Validators, FormArray } from '@angular/forms';
|
|
@@ -285,10 +285,10 @@ class ArrayJoinPipe {
|
|
|
285
285
|
// For non-array cases or unexpected types, return the value as is
|
|
286
286
|
return value;
|
|
287
287
|
}
|
|
288
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.
|
|
289
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.
|
|
288
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: ArrayJoinPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
289
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.3.4", ngImport: i0, type: ArrayJoinPipe, isStandalone: true, name: "arrayJoin" }); }
|
|
290
290
|
}
|
|
291
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.
|
|
291
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: ArrayJoinPipe, decorators: [{
|
|
292
292
|
type: Pipe,
|
|
293
293
|
args: [{
|
|
294
294
|
name: 'arrayJoin',
|
|
@@ -352,10 +352,10 @@ class ByteConverterPipe {
|
|
|
352
352
|
formatNumber(value) {
|
|
353
353
|
return new Intl.NumberFormat(this.locale, { maximumFractionDigits: 2 }).format(value);
|
|
354
354
|
}
|
|
355
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.
|
|
356
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.
|
|
355
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: ByteConverterPipe, deps: [{ token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
356
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.3.4", ngImport: i0, type: ByteConverterPipe, isStandalone: true, name: "byteConverter" }); }
|
|
357
357
|
}
|
|
358
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.
|
|
358
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: ByteConverterPipe, decorators: [{
|
|
359
359
|
type: Pipe,
|
|
360
360
|
args: [{
|
|
361
361
|
name: 'byteConverter',
|
|
@@ -462,10 +462,10 @@ class IsHttpsPipe {
|
|
|
462
462
|
transform(value) {
|
|
463
463
|
return httpsPattern.test(value);
|
|
464
464
|
}
|
|
465
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.
|
|
466
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.
|
|
465
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: IsHttpsPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
466
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.3.4", ngImport: i0, type: IsHttpsPipe, isStandalone: true, name: "isHttps" }); }
|
|
467
467
|
}
|
|
468
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.
|
|
468
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: IsHttpsPipe, decorators: [{
|
|
469
469
|
type: Pipe,
|
|
470
470
|
args: [{
|
|
471
471
|
name: 'isHttps',
|
|
@@ -496,10 +496,10 @@ class MaskPipe {
|
|
|
496
496
|
.map((char, i) => (i < unmaskedPrefixLength || i > value.length - unmaskedSuffixLength - 1 ? char : maskChar))
|
|
497
497
|
.join('');
|
|
498
498
|
}
|
|
499
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.
|
|
500
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.
|
|
499
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: MaskPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
500
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.3.4", ngImport: i0, type: MaskPipe, isStandalone: true, name: "mask" }); }
|
|
501
501
|
}
|
|
502
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.
|
|
502
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: MaskPipe, decorators: [{
|
|
503
503
|
type: Pipe,
|
|
504
504
|
args: [{
|
|
505
505
|
name: 'mask',
|
|
@@ -507,6 +507,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.4", ngImpor
|
|
|
507
507
|
}]
|
|
508
508
|
}] });
|
|
509
509
|
|
|
510
|
+
/**
|
|
511
|
+
* Calculates the difference in whole days between two dates.
|
|
512
|
+
*
|
|
513
|
+
* @param {Date | number | string} dateLeft - The date from which the difference is measured (the reference date).
|
|
514
|
+
* Can be a Date object, a number representing milliseconds since the Unix epoch,
|
|
515
|
+
* or a string in a format parseable by the Date constructor.
|
|
516
|
+
* @param {Date | number | string} dateRight - The date to be compared against the reference date.
|
|
517
|
+
* Can be a Date object, a number representing milliseconds since the Unix epoch,
|
|
518
|
+
* or a string in a format parseable by the Date constructor.
|
|
519
|
+
* @returns {number} The number of whole days between the reference date (dateLeft) and the compared date (dateRight).
|
|
520
|
+
*
|
|
521
|
+
* @example
|
|
522
|
+
* // How many whole days are between '2022-09-08' and '2023-09-18'?
|
|
523
|
+
* const result = differenceInDays('2022-09-08', new Date('2023-09-18'));
|
|
524
|
+
*/
|
|
525
|
+
function differenceInDays(dateLeft, dateRight) {
|
|
526
|
+
const _dateLeft = new Date(dateLeft);
|
|
527
|
+
const _dateRight = new Date(dateRight);
|
|
528
|
+
const difference = (_dateLeft.getTime() - _dateRight.getTime()) / (1000 * 60 * 60 * 24);
|
|
529
|
+
return Math.floor(difference);
|
|
530
|
+
}
|
|
531
|
+
|
|
510
532
|
/**
|
|
511
533
|
* Provides a conditional validator that applies the specified validator functions only if the condition is met.
|
|
512
534
|
*
|
|
@@ -703,5 +725,5 @@ function httpsValidator(control) {
|
|
|
703
725
|
* Generated bundle index. Do not edit.
|
|
704
726
|
*/
|
|
705
727
|
|
|
706
|
-
export { ArrayJoinPipe, ByteConverterPipe, IsHttpsPipe, MaskPipe, UniqueValidator, combineLatestEager, createAsyncState, distinctOnChange, httpsValidator, ifAsyncValidator, ifValidator, isEmpty, isEqual, logger, pickBy, poll, startWithTap, switchMapWithAsyncState, urlValidator };
|
|
728
|
+
export { ArrayJoinPipe, ByteConverterPipe, IsHttpsPipe, MaskPipe, UniqueValidator, combineLatestEager, createAsyncState, differenceInDays, distinctOnChange, httpsValidator, ifAsyncValidator, ifValidator, isEmpty, isEqual, logger, pickBy, poll, startWithTap, switchMapWithAsyncState, urlValidator };
|
|
707
729
|
//# sourceMappingURL=ngx-lift.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-lift.mjs","sources":["../../../projects/ngx-lift/src/lib/operators/combine-latest-eager.operator.ts","../../../projects/ngx-lift/src/lib/operators/create-async-state.operator.ts","../../../projects/ngx-lift/src/lib/operators/distinct-on-change.operator.ts","../../../projects/ngx-lift/src/lib/operators/logger.operator.ts","../../../projects/ngx-lift/src/lib/operators/poll.operator.ts","../../../projects/ngx-lift/src/lib/operators/start-with-tap.operator.ts","../../../projects/ngx-lift/src/lib/operators/switch-map-with-async-state.operator.ts","../../../projects/ngx-lift/src/lib/pipes/array-join.pipe.ts","../../../projects/ngx-lift/src/lib/pipes/byte-converter.pipe.ts","../../../projects/ngx-lift/src/lib/const.ts","../../../projects/ngx-lift/src/lib/pipes/is-https.pipe.ts","../../../projects/ngx-lift/src/lib/pipes/mask.pipe.ts","../../../projects/ngx-lift/src/lib/utils/form.util.ts","../../../projects/ngx-lift/src/lib/utils/is-empty.util.ts","../../../projects/ngx-lift/src/lib/utils/is-equal.util.ts","../../../projects/ngx-lift/src/lib/utils/pick-by.util.ts","../../../projects/ngx-lift/src/lib/validators/unique.validator.ts","../../../projects/ngx-lift/src/lib/validators/url.validator.ts","../../../projects/ngx-lift/src/public-api.ts","../../../projects/ngx-lift/src/ngx-lift.ts"],"sourcesContent":["import {combineLatest, Observable, startWith, Subject} from 'rxjs';\n\nexport function combineLatestEager<T extends Observable<unknown>[]>(\n sources: T,\n startWithNullForAll?: boolean,\n): Observable<{[K in keyof T]: T[K] extends Observable<infer U> ? U | null : never}>;\n\nexport function combineLatestEager<T extends Record<string, Observable<unknown>>>(\n sources: T,\n startWithNullForAll?: boolean,\n): Observable<{[K in keyof T]: T[K] extends Observable<infer U> ? U | null : never}>;\n\n/**\n * Combines multiple observables into a single observable emitting an array or dictionary\n * of the latest values from each source observable.\n * Adds startWith(null) for each Subject in combineLatest when the second parameter startWithNullForAll is false.\n * When startWithNullForAll is true, each observable will startWith null.\n *\n * @template T - The type of the data in the observables.\n *\n * @param {Array<Observable<T>> | Record<string, Observable<T>>} sources -\n * An array of observables or a dictionary of observables to be combined.\n *\n * @param {boolean} [startWithNullForAll=false] -\n * Determines whether to start each observable with a `null` value.\n *\n * @returns {Observable<Array<T | null> | Record<string, T | null>>} -\n * An observable emitting an array or dictionary of the latest values from each source observable.\n *\n * @throws {Error} -\n * Throws an error if the provided argument is not an array of observables or a dictionary of observables.\n */\nexport function combineLatestEager<T>(\n sources: Array<Observable<T>> | Record<string, Observable<T>>,\n startWithNullForAll = false,\n): Observable<Array<T | null> | Record<string, T | null>> {\n function observableMapper<T>(observable: Observable<T>) {\n if (startWithNullForAll) {\n return observable.pipe(startWith(null));\n } else {\n // Check if observable is a Subject, if true, apply startWith(null)\n return observable instanceof Subject ? observable.pipe(startWith(null)) : observable;\n }\n }\n\n if (Array.isArray(sources)) {\n // If sources is an array of observables\n return combineLatest(sources.map(observableMapper));\n } else if (typeof sources === 'object' && sources !== null) {\n // If sources is a dictionary of observables\n const observables: Record<string, Observable<T | null>> = {};\n\n for (const [key, value] of Object.entries(sources)) {\n observables[key] = observableMapper(value);\n }\n\n return combineLatest(observables);\n } else {\n throw new Error(\n `Invalid argument type. Please provide an array of observables or a dictionary of observables. Received: ${typeof sources}`,\n );\n }\n}\n","import {HttpErrorResponse} from '@angular/common/http';\nimport {catchError, map, Observable, of, pipe, startWith, tap, TapObserver, UnaryFunction} from 'rxjs';\n\nimport {AsyncState} from '../models/async-state.model';\n\n/**\n * createAsyncState transforms an Observable of type T into an Observable of AsyncState<T>.\n * AsyncState<T> represents the loading, error, and data states for asynchronous operations.\n *\n * @template T - The type of the data in the observable.\n * @template E - The type of the error that can occur.\n *\n * @param {Partial<Observer<T>> | ((value: T) => void)} [observerOrNextForOrigin] -\n * An optional parameter that can be a partial TapObserver<T> or a function to handle the next value or error in the original Observable.\n *\n * @returns {UnaryFunction<Observable<T>, Observable<AsyncState<T, E>>>} -\n * A function that transforms an observable stream into an asynchronous state.\n *\n * @example\n * Usage 1: Simple request\n * data$ = this.shopService.products$.pipe(\n * createAsyncState({\n * next: res => console.log('Side effect if success: ' + res),\n * error: error => console.error('Side effect if error: ' + error.message)\n * })\n * );\n *\n * Usage 2: Dependent requests\n * data$ = firstCall$.pipe(\n * switchMap(() => this.shopService.products$),\n * createAsyncState()\n * );\n *\n * Another implementation thought when refreshing the data: instead of startWith, `merge of` emit as the trigger\n *\n * subject.pipe(\n * switchMap(() => merge(\n * of({ loading: true, error: null, data: null }),\n * this.service.apiCall().pipe(\n * map(data => ({ loading: false, error: null, data })),\n * tap({\n * next: res => callback?.(res.data),\n * error: err => errorCallback?.(err),\n * }),\n * catchError(error => of({ loading: false, error, data: null })),\n * ),\n * ))\n * )\n *\n */\nexport function createAsyncState<T, E = HttpErrorResponse>(\n observerOrNextForOrigin?: Partial<TapObserver<T>> | ((value: T) => void),\n): UnaryFunction<Observable<T>, Observable<AsyncState<T, E>>> {\n return pipe(\n tap(observerOrNextForOrigin),\n map((data) => ({loading: false, error: null, data})),\n startWith({loading: true, error: null, data: null}),\n // retry(1), // if you want to add retry\n catchError((error: E) => of({loading: false, error, data: null})),\n );\n}\n","import {Observable, OperatorFunction, Subscriber, TeardownLogic} from 'rxjs';\n\n/**\n * Creates an operator function for RxJS Observables that filters out consecutive\n * values that are considered equal according to a provided comparator function,\n * and invokes a callback when a distinct value is encountered.\n *\n * @template T - The type of elements emitted by the observable.\n * @param {(previousValue: T, currentValue: T) => void} onChangeCallback\n * A callback function that will be invoked when a distinct value is encountered.\n * It receives the previous distinct value and the current value.\n * @param {(previousValue: T, currentValue: T) => boolean} [comparator]\n * A function that determines if two values are considered equal.\n * Defaults to a function that performs strict equality (===) comparison.\n * @returns {OperatorFunction<T, T>} - The RxJS operator function.\n *\n * @example\n * Example 1:\n * const source$ = new Observable<number>((observer) => {\n * observer.next(1);\n * observer.next(2);\n * observer.next(2);\n * observer.next(3);\n * observer.next(3);\n * observer.next(4);\n * observer.next(5);\n * observer.complete();\n * });\n *\n * const distinctOnChange$ = source$.pipe(\n * distinctOnChange(\n * (prev, curr) => console.log(`Value changed from ${prev} to: ${curr}`),\n * (prev, curr) => prev === curr,\n * ),\n * );\n * distinctOnChange$.subscribe((res) => console.log(res));\n *\n *\n * Example 2:\n * distinctOnChange<RDEValue<OseInstance>[]>(\n * () => {\n * this.store.dispatch(\n * addToast({\n * toast: {\n * type: ToastType.SUCCESS,\n * title: this.l10nService.getMessage('STATUS_CHANGE'),\n * description: this.l10nService.getMessage('STATUS_CHANGE_DESC'),\n * },\n * }),\n * );\n * },\n * (prev, current) =>\n * prev.every((prevInstance, index) => instanceComparator(prevInstance.entity, current[index].entity)),\n * );\n */\nexport function distinctOnChange<T>(\n onChangeCallback: (previousValue: T, currentValue: T) => void,\n comparator: (previousValue: T, currentValue: T) => boolean = (prev, curr) => prev === curr,\n): OperatorFunction<T, T> {\n return (source: Observable<T>) =>\n new Observable<T>((subscriber: Subscriber<T>): TeardownLogic => {\n let hasFirstValue = false;\n let previousValue: T;\n\n const subscription = source.subscribe({\n next: (currentValue: T) => {\n if (hasFirstValue) {\n if (!comparator(previousValue, currentValue)) {\n onChangeCallback(previousValue, currentValue);\n previousValue = currentValue;\n subscriber.next(currentValue);\n }\n } else {\n previousValue = currentValue;\n hasFirstValue = true;\n subscriber.next(currentValue);\n }\n },\n error: (err: unknown) => subscriber.error(err),\n complete: () => subscriber.complete(),\n });\n\n return () => subscription.unsubscribe();\n });\n}\n","import {OperatorFunction, pipe, tap} from 'rxjs';\n\n// Define a type for different logger functions\ntype LoggerType = 'count' | 'debug' | 'dir' | 'log' | 'table';\n\n// Define a more permissive type for console functions\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype ConsoleFunction = (...args: any[]) => void;\n\n// Map each LoggerType to its corresponding console function\nconst loggerFunctions: Record<LoggerType, ConsoleFunction> = {\n count: console.count.bind(console),\n debug: console.debug.bind(console),\n dir: console.dir.bind(console),\n log: console.log.bind(console),\n table: console.table.bind(console),\n};\n\n/**\n * Logger operator for RxJS observables.\n *\n * @param loggerType The type of logger to be used: 'count', 'debug', 'dir', 'log', 'table'.\n * Defaults to 'log' if not provided or if an unknown type is specified.\n * @returns An RxJS operator function that logs values using the specified console function.\n */\nexport const logger = <T>(loggerType: LoggerType = 'log'): OperatorFunction<T, T> =>\n pipe(\n tap((value: T) => {\n const logFunction = loggerFunctions[loggerType] || console.log.bind(console);\n logFunction(value);\n }),\n );\n","import {catchError, EMPTY, exhaustMap, map, merge, Observable, of, share, startWith, timer} from 'rxjs';\n\nimport {AsyncState} from '../models';\n\n/**\n * Polls the API at a specified interval, handling the triggering of requests and building parameters.\n *\n * @param {Object} options - The options object containing interval, apiCall, paramsBuilder, and trigger\n * @param {number} options.interval - The interval at which to poll the API\n * @param {(params: Record<string, unknown>) => Observable<Data>} options.apiCall - The function to call the API\n * @param {(input: Input | null) => Record<string, unknown>} [options.paramsBuilder] - The function to build parameters based on input\n * @param {Observable<Input>} [options.trigger] - The trigger observable for initiating requests\n * @return {Observable<AsyncState<Data>>} An observable emitting the async state of the API data\n */\nexport function poll<Data, Input>(options: {\n interval: number;\n apiCall: (params: Record<string, unknown>) => Observable<Data>;\n paramsBuilder?: (input: Input | null) => Record<string, unknown>;\n trigger?: Observable<Input>;\n}): Observable<AsyncState<Data>> {\n let latestInput: Input | null = null;\n\n return merge(options.trigger || EMPTY, timer(0, options.interval)).pipe(\n exhaustMap((input) => {\n let params: Record<string, unknown> = {};\n\n const triggeredByObservable = typeof input !== 'number';\n if (triggeredByObservable) {\n latestInput = input;\n }\n if (options.paramsBuilder) {\n params = options.paramsBuilder(latestInput);\n }\n\n const isFirstRequest = input === 0;\n const shouldShowLoading = triggeredByObservable || isFirstRequest;\n\n let observable = options.apiCall(params).pipe(\n map((data) => ({loading: false, error: null, data})),\n catchError((error) => of({loading: false, error, data: null})),\n );\n\n if (shouldShowLoading) {\n observable = observable.pipe(startWith({loading: true, error: null, data: null}));\n }\n\n return observable;\n }),\n share(),\n );\n}\n","import {Observable} from 'rxjs';\n\n/**\n * Operator that taps into a callback before the source Observable starts emitting values.\n *\n * This operator is useful for triggering a side effect before the main Observable starts emitting.\n *\n * @param callback A function to be executed before the source Observable emits its first value.\n * @returns An RxJS operator function that taps into the callback and then switchMaps to the source Observable.\n */\nexport function startWithTap<T>(callback: () => void) {\n return (source: Observable<T>) => {\n callback();\n return source;\n };\n}\n","import {HttpErrorResponse} from '@angular/common/http';\nimport {Observable, OperatorFunction, switchMap} from 'rxjs';\n\nimport {AsyncState} from '../models';\nimport {createAsyncState} from './create-async-state.operator';\n\n/**\n * Custom RxJS operator that uses switchMap to handle asynchronous operations and\n * transforms the emitted values into an AsyncState object.\n *\n * @template T - The type of data emitted by the observable returned by the project.\n * @template K - The type of value emitted by the source observable.\n * @template E - The type of error that can be encountered during the asynchronous operation.\n *\n * @param {function(K): Observable<T>} project - A function that takes a value emitted by the source\n * observable and returns an observable representing an asynchronous operation.\n *\n * @returns {OperatorFunction<K, AsyncState<T, E>>} - An RxJS operator that transforms the source observable into\n * an observable of AsyncState objects.\n *\n * @example\n * // Usage of the switchMapWithAsyncState operator\n * const source$ = new BehaviorSubject<number>(1);\n *\n * const asyncOperation = (value: number) => {\n * return of(value * 2).pipe(delay(1000));\n * };\n *\n * const result$ = source$.pipe(switchMapWithAsyncState(asyncOperation));\n * result$.subscribe((state) => {\n * console.log(state); // Outputs AsyncState objects with loading, data, and error properties.\n * });\n */\nexport function switchMapWithAsyncState<T, K, E = HttpErrorResponse>(\n project: (value: K, index: number) => Observable<T>,\n): OperatorFunction<K, AsyncState<T, E>> {\n return (source: Observable<K>) =>\n source.pipe(switchMap((value, index) => project(value, index).pipe(createAsyncState<T, E>())));\n}\n","import {Pipe, PipeTransform} from '@angular/core';\n\n@Pipe({\n name: 'arrayJoin',\n standalone: true,\n})\nexport class ArrayJoinPipe implements PipeTransform {\n transform(value: unknown, separator: string = ',') {\n if (Array.isArray(value)) {\n return value.join(separator);\n }\n\n // For non-array cases or unexpected types, return the value as is\n return value;\n }\n}\n","import {Inject, LOCALE_ID, Pipe, PipeTransform} from '@angular/core';\n\n/**\n * import { LOCALE_ID, NgModule } from '@angular/core';\n * import { BrowserModule } from '@angular/platform-browser';\n * import { AppComponent } from './app.component';\n * import { registerLocaleData } from '@angular/common';\n *\n * import localeEn from '@angular/common/locales/en';\n * import localeFr from '@angular/common/locales/fr';\n *\n * // Register locales\n * registerLocaleData(localeEn);\n * registerLocaleData(localeFr);\n *\n * @NgModule({\n * declarations: [AppComponent],\n * imports: [BrowserModule],\n * providers: [\n * {\n * provide: LOCALE_ID,\n * useFactory: () => {\n * // Use the browser's language or a default language\n * return navigator.language || 'en';\n * },\n * },\n * ],\n * bootstrap: [AppComponent],\n * })\n * export class AppModule {}\n */\n\n@Pipe({\n name: 'byteConverter',\n standalone: true,\n})\nexport class ByteConverterPipe implements PipeTransform {\n constructor(@Inject(LOCALE_ID) private locale: string) {}\n\n // If using navigator.language directly in the pipe, this approach directly uses the browser's language at the moment the ByteConverterPipe is constructed. If the user changes the language while using the application, it won't be automatically reflected. If dynamic language changes are a requirement, using the LOCALE_ID provider as demonstrated in the AppModule is a more Angular-centric approach.\n // private locale: string;\n // constructor() {\n // // Use navigator.language as the default locale\n // this.locale = navigator.language || 'en';\n // }\n\n transform(value: number): string {\n if (value === null || value === undefined || isNaN(value)) {\n return '-';\n }\n\n const units = ['BYTE', 'KB', 'MB', 'GB', 'TB'];\n let unitIndex = 0;\n\n while (value >= 1024 && unitIndex < units.length - 1) {\n value /= 1024;\n unitIndex++;\n }\n\n const translationObject = translations[this.locale] || translations['en'];\n const key = units[unitIndex];\n\n return this.formatNumber(value) + ' ' + translationObject[key];\n }\n\n private formatNumber(value: number): string {\n return new Intl.NumberFormat(this.locale, {maximumFractionDigits: 2}).format(value);\n }\n}\n\nconst translations: Record<string, Record<string, string>> = {\n en: {\n BYTE: 'B',\n KB: 'KB',\n MB: 'MB',\n GB: 'GB',\n TB: 'TB',\n },\n 'en-US': {\n // You can provide specific variations for en-US if needed\n BYTE: 'B',\n KB: 'KB',\n MB: 'MB',\n GB: 'GB',\n TB: 'TB',\n },\n de: {\n BYTE: 'B',\n KB: 'KB',\n MB: 'MB',\n GB: 'GB',\n TB: 'TB',\n },\n es: {\n BYTE: 'B',\n KB: 'KB',\n MB: 'MB',\n GB: 'GB',\n TB: 'TB',\n },\n fr: {\n BYTE: 'o',\n KB: 'Ko',\n MB: 'Mo',\n GB: 'Go',\n TB: 'To',\n },\n it: {\n BYTE: 'B',\n KB: 'KB',\n MB: 'MB',\n GB: 'GB',\n TB: 'TB',\n },\n ja: {\n BYTE: 'B',\n KB: 'KB',\n MB: 'MB',\n GB: 'GB',\n TB: 'TB',\n },\n ko: {\n BYTE: 'B',\n KB: 'KB',\n MB: 'MB',\n GB: 'GB',\n TB: 'TB',\n },\n 'pt-BR': {\n BYTE: 'B',\n KB: 'KB',\n MB: 'MB',\n GB: 'GB',\n TB: 'TB',\n },\n 'zh-CN': {\n BYTE: '字节',\n KB: '千字节',\n MB: '兆字节',\n GB: '千兆字节',\n TB: '太字节',\n },\n 'zh-TW': {\n BYTE: '位元組',\n KB: '千位元組',\n MB: '兆位元組',\n GB: '千兆位元組',\n TB: '太位元組',\n },\n ru: {\n BYTE: 'Б',\n KB: 'КБ',\n MB: 'МБ',\n GB: 'ГБ',\n TB: 'ТБ',\n },\n};\n","// https://regex101.com/library/mX1xW0\nexport const emailPattern = /^([\\w-]+(?:\\.[\\w-]+)*)@((?:[\\w-]+\\.)*\\w[\\w-]{0,66})\\.([a-z]{2,6}(?:\\.[a-z]{2})?)$/;\n\nexport const urlPattern =\n /^https?:\\/\\/(?:www\\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\\.[a-zA-Z0-9()]{1,6}\\b(?:[-a-zA-Z0-9()@:%_+.~#?&/=]*)$/;\nexport const httpsPattern =\n /^https:\\/\\/(?:www\\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\\.[a-zA-Z0-9()]{1,6}\\b(?:[-a-zA-Z0-9()@:%_+.~#?&/=]*)$/;\n","import {Pipe, PipeTransform} from '@angular/core';\n\nimport {httpsPattern} from '../const';\n\n@Pipe({\n name: 'isHttps',\n standalone: true,\n})\nexport class IsHttpsPipe implements PipeTransform {\n transform(value: string): boolean {\n return httpsPattern.test(value);\n }\n}\n","import {Pipe, PipeTransform} from '@angular/core';\n\nconst unmaskNumber = 6;\nconst maskChar = '*';\n\nexport interface MaskOptions {\n unmaskedPrefixLength?: number;\n unmaskedSuffixLength?: number;\n masked?: boolean;\n}\n\n@Pipe({\n name: 'mask',\n standalone: true,\n})\nexport class MaskPipe implements PipeTransform {\n /**\n * Transforms the input string by masking characters based on the provided options.\n *\n * @param {string} value - The input string to be masked.\n * @param {MaskOptions} [options={}] - Options for customizing the masking behavior.\n * @returns {string} - The masked string.\n */\n transform(value: string, options: MaskOptions = {}): string {\n const {unmaskedPrefixLength = unmaskNumber, unmaskedSuffixLength = unmaskNumber, masked = true} = options;\n\n if (\n value.length <= unmaskedPrefixLength + unmaskedSuffixLength ||\n unmaskedPrefixLength < 0 ||\n unmaskedSuffixLength < 0 ||\n !masked\n ) {\n return value;\n }\n\n return value\n .split('')\n .map((char, i) => (i < unmaskedPrefixLength || i > value.length - unmaskedSuffixLength - 1 ? char : maskChar))\n .join('');\n }\n}\n","import {AbstractControl, AsyncValidatorFn, ValidatorFn, Validators} from '@angular/forms';\nimport {of} from 'rxjs';\n\n/**\n * Provides a conditional validator that applies the specified validator functions only if the condition is met.\n *\n * @param condition A function that determines whether the validators should be applied.\n * @param trueValidatorFn The validator function or an array of validator functions to be applied when the condition is true.\n * @param falseValidatorFn Optional. The validator function or an array of validator functions to be applied when the condition is false.\n * @returns A validator function that can be used with Angular Reactive Forms.\n */\nexport function ifValidator(\n condition: (control: AbstractControl) => boolean,\n trueValidatorFn: ValidatorFn | ValidatorFn[],\n falseValidatorFn?: ValidatorFn | ValidatorFn[],\n): ValidatorFn {\n /**\n * @param control The AbstractControl to validate.\n * @returns Validation errors if the condition is met; otherwise, null.\n */\n return (control: AbstractControl): Validators | null => {\n if (!trueValidatorFn || !condition(control)) {\n return composeValidators(control, falseValidatorFn);\n }\n\n return composeValidators(control, trueValidatorFn);\n };\n}\n\n/**\n * Provides a conditional async validator that applies the specified async validator function only if the condition is met.\n *\n * @param condition A function that determines whether the async validator should be applied.\n * @param validatorFn The async validator function to be applied conditionally.\n * @returns An async validator function that can be used with Angular Reactive Forms.\n */\nexport function ifAsyncValidator(\n condition: (control: AbstractControl) => boolean,\n validatorFn: AsyncValidatorFn,\n): AsyncValidatorFn {\n /**\n * @param control The AbstractControl to validate asynchronously.\n * @returns An observable that emits validation errors if the condition is met; otherwise, emits null.\n */\n return (control: AbstractControl) => {\n if (!validatorFn || !condition(control)) {\n return of(null);\n }\n\n return validatorFn(control);\n };\n}\n\n/**\n * Composes and applies the provided validators to the given AbstractControl.\n *\n * @param control The AbstractControl to validate.\n * @param validatorFn The validator function or an array of validator functions to be applied.\n * @returns Validation errors if the validators are applicable; otherwise, null.\n */\nfunction composeValidators(\n control: AbstractControl,\n validatorFn: ValidatorFn | ValidatorFn[] | undefined,\n): Validators | null {\n if (!validatorFn) {\n return null;\n }\n\n const validatorFns = Array.isArray(validatorFn) ? validatorFn : [validatorFn];\n return Validators.compose(validatorFns)?.(control) || null;\n}\n","/**\n * Check if a value is empty.\n * @param {T | undefined | null} value - The value to check for emptiness.\n * @returns {boolean} - Returns true if the value is empty, otherwise false.\n */\nexport function isEmpty<T extends object | string | Array<unknown>>(value: T | undefined | null): value is null {\n if (value == null) return true;\n\n if (typeof value === 'string' || Array.isArray(value)) {\n return value.length === 0;\n }\n\n if (typeof value === 'object') {\n return Object.keys(value as Record<string, unknown>).length === 0;\n }\n\n return false;\n}\n","/**\n * Check if two values are deeply equal.\n * @param {T} value1 - The first value to compare.\n * @param {T} value2 - The second value to compare.\n * @returns {boolean} - Returns true if the values are deeply equal, otherwise false.\n */\nexport function isEqual<T>(value1: T, value2: T): boolean {\n if (value1 === value2) return true;\n\n if (typeof value1 !== 'object' || typeof value2 !== 'object' || value1 === null || value2 === null) {\n return false;\n }\n\n const keys1 = Object.keys(value1) as Array<keyof T>;\n const keys2 = Object.keys(value2) as Array<keyof T>;\n\n if (keys1.length !== keys2.length) return false;\n\n for (const key of keys1) {\n if (!keys2.includes(key) || !isEqual(value1[key], value2[key])) {\n return false;\n }\n }\n\n return true;\n}\n","/**\n * Create an object composed of object properties that satisfy a given condition.\n * @param {T} source - The object to pick properties from.\n * @param {(value: T[keyof T], key: string) => boolean} predicate - The function invoked per property.\n * @returns {Partial<T>} - Returns the new object.\n */\nexport function pickBy<T>(source: T, predicate: (value: T[keyof T], key: string) => boolean): Partial<T> {\n const result: Partial<T> = {};\n\n for (const key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key) && predicate(source[key], key)) {\n result[key] = source[key];\n }\n }\n\n return result;\n}\n","import {AbstractControl, FormArray, ValidationErrors, ValidatorFn} from '@angular/forms';\n\n/**\n * Validator for checking uniqueness across multiple fields in a FormArray or FormGroup.\n *\n * This validator can be applied to a FormArray or FormGroup containing the controls to be validated.\n * It ensures that each control's value is unique among all other controls within the array or group.\n */\nexport class UniqueValidator {\n /**\n * Validator function to be attached to a FormArray or FormGroup.\n *\n * This validator checks for uniqueness of each control's value within the array or group.\n *\n * @param keySelector A function to select the key control for comparison (default is the control itself).\n * @typeparam T The type of the control value.\n */\n static unique<T>(\n keySelector: (control: AbstractControl) => AbstractControl<T> = (control: AbstractControl<T>) => control,\n ): ValidatorFn {\n return (formArray: AbstractControl): ValidationErrors | null => {\n if (!(formArray instanceof FormArray)) {\n return null;\n }\n\n const targetControls = formArray.controls.map(keySelector);\n const valueControlMap = new Map<T, AbstractControl<T>>();\n const invalidControls: AbstractControl<T>[] = [];\n\n for (const control of targetControls) {\n const value = control.value;\n\n if (value == null || String(value) === '' || String(value) === 'NaN') {\n continue;\n }\n\n const controlInMap = valueControlMap.get(value);\n\n if (controlInMap) {\n if (!invalidControls.includes(controlInMap)) {\n invalidControls.push(controlInMap);\n }\n\n invalidControls.push(control);\n } else {\n valueControlMap.set(value, control);\n }\n }\n\n const notUniqueError = {notUnique: true};\n\n // set errors manually for target controls\n for (const control of targetControls) {\n const errors = control.errors;\n\n if (invalidControls.includes(control)) {\n // set not unique error for invalid controls\n control.setErrors(errors === null ? notUniqueError : {...errors, ...notUniqueError});\n } else {\n // remove not unique errors for valid controls\n if (errors === null) {\n control.setErrors(null);\n } else {\n delete errors['notUnique'];\n control.setErrors(Object.keys(errors).length > 0 ? errors : null);\n }\n }\n }\n\n return invalidControls.length > 0 ? notUniqueError : null;\n };\n }\n}\n","import {AbstractControl, ValidationErrors} from '@angular/forms';\n\nimport {httpsPattern, urlPattern} from '../const';\n\nexport function urlValidator(control: AbstractControl): ValidationErrors | null {\n if (!urlPattern.test(control.value)) {\n return {invalidUrl: true};\n }\n return null;\n}\n\nexport function httpsValidator(control: AbstractControl): ValidationErrors | null {\n if (!httpsPattern.test(control.value)) {\n return {invalidUrl: true};\n }\n return null;\n}\n","/*\n * Public API Surface of ngx-lift\n */\n\nexport * from './lib/models';\nexport * from './lib/operators';\nexport * from './lib/pipes';\nexport * from './lib/utils';\nexport * from './lib/validators';\n// export * from './lib/signals';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;AAYA;;;;;;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AA;IACrD,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;AACrC,QAAA,OAAO,EAAC,UAAU,EAAE,IAAI,EAAC,CAAC;AAC3B,KAAA;AACD,IAAA,OAAO,IAAI,CAAC;AACd;;AChBA;;AAEG;AAOH;;ACTA;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ngx-lift.mjs","sources":["../../../projects/ngx-lift/src/lib/operators/combine-latest-eager.operator.ts","../../../projects/ngx-lift/src/lib/operators/create-async-state.operator.ts","../../../projects/ngx-lift/src/lib/operators/distinct-on-change.operator.ts","../../../projects/ngx-lift/src/lib/operators/logger.operator.ts","../../../projects/ngx-lift/src/lib/operators/poll.operator.ts","../../../projects/ngx-lift/src/lib/operators/start-with-tap.operator.ts","../../../projects/ngx-lift/src/lib/operators/switch-map-with-async-state.operator.ts","../../../projects/ngx-lift/src/lib/pipes/array-join.pipe.ts","../../../projects/ngx-lift/src/lib/pipes/byte-converter.pipe.ts","../../../projects/ngx-lift/src/lib/const.ts","../../../projects/ngx-lift/src/lib/pipes/is-https.pipe.ts","../../../projects/ngx-lift/src/lib/pipes/mask.pipe.ts","../../../projects/ngx-lift/src/lib/utils/difference-in-days.util.ts","../../../projects/ngx-lift/src/lib/utils/form.util.ts","../../../projects/ngx-lift/src/lib/utils/is-empty.util.ts","../../../projects/ngx-lift/src/lib/utils/is-equal.util.ts","../../../projects/ngx-lift/src/lib/utils/pick-by.util.ts","../../../projects/ngx-lift/src/lib/validators/unique.validator.ts","../../../projects/ngx-lift/src/lib/validators/url.validator.ts","../../../projects/ngx-lift/src/public-api.ts","../../../projects/ngx-lift/src/ngx-lift.ts"],"sourcesContent":["import {combineLatest, Observable, startWith, Subject} from 'rxjs';\n\nexport function combineLatestEager<T extends Observable<unknown>[]>(\n sources: T,\n startWithNullForAll?: boolean,\n): Observable<{[K in keyof T]: T[K] extends Observable<infer U> ? U | null : never}>;\n\nexport function combineLatestEager<T extends Record<string, Observable<unknown>>>(\n sources: T,\n startWithNullForAll?: boolean,\n): Observable<{[K in keyof T]: T[K] extends Observable<infer U> ? U | null : never}>;\n\n/**\n * Combines multiple observables into a single observable emitting an array or dictionary\n * of the latest values from each source observable.\n * Adds startWith(null) for each Subject in combineLatest when the second parameter startWithNullForAll is false.\n * When startWithNullForAll is true, each observable will startWith null.\n *\n * @template T - The type of the data in the observables.\n *\n * @param {Array<Observable<T>> | Record<string, Observable<T>>} sources -\n * An array of observables or a dictionary of observables to be combined.\n *\n * @param {boolean} [startWithNullForAll=false] -\n * Determines whether to start each observable with a `null` value.\n *\n * @returns {Observable<Array<T | null> | Record<string, T | null>>} -\n * An observable emitting an array or dictionary of the latest values from each source observable.\n *\n * @throws {Error} -\n * Throws an error if the provided argument is not an array of observables or a dictionary of observables.\n */\nexport function combineLatestEager<T>(\n sources: Array<Observable<T>> | Record<string, Observable<T>>,\n startWithNullForAll = false,\n): Observable<Array<T | null> | Record<string, T | null>> {\n function observableMapper<T>(observable: Observable<T>) {\n if (startWithNullForAll) {\n return observable.pipe(startWith(null));\n } else {\n // Check if observable is a Subject, if true, apply startWith(null)\n return observable instanceof Subject ? observable.pipe(startWith(null)) : observable;\n }\n }\n\n if (Array.isArray(sources)) {\n // If sources is an array of observables\n return combineLatest(sources.map(observableMapper));\n } else if (typeof sources === 'object' && sources !== null) {\n // If sources is a dictionary of observables\n const observables: Record<string, Observable<T | null>> = {};\n\n for (const [key, value] of Object.entries(sources)) {\n observables[key] = observableMapper(value);\n }\n\n return combineLatest(observables);\n } else {\n throw new Error(\n `Invalid argument type. Please provide an array of observables or a dictionary of observables. Received: ${typeof sources}`,\n );\n }\n}\n","import {HttpErrorResponse} from '@angular/common/http';\nimport {catchError, map, Observable, of, pipe, startWith, tap, TapObserver, UnaryFunction} from 'rxjs';\n\nimport {AsyncState} from '../models/async-state.model';\n\n/**\n * createAsyncState transforms an Observable of type T into an Observable of AsyncState<T>.\n * AsyncState<T> represents the loading, error, and data states for asynchronous operations.\n *\n * @template T - The type of the data in the observable.\n * @template E - The type of the error that can occur.\n *\n * @param {Partial<Observer<T>> | ((value: T) => void)} [observerOrNextForOrigin] -\n * An optional parameter that can be a partial TapObserver<T> or a function to handle the next value or error in the original Observable.\n *\n * @returns {UnaryFunction<Observable<T>, Observable<AsyncState<T, E>>>} -\n * A function that transforms an observable stream into an asynchronous state.\n *\n * @example\n * Usage 1: Simple request\n * data$ = this.shopService.products$.pipe(\n * createAsyncState({\n * next: res => console.log('Side effect if success: ' + res),\n * error: error => console.error('Side effect if error: ' + error.message)\n * })\n * );\n *\n * Usage 2: Dependent requests\n * data$ = firstCall$.pipe(\n * switchMap(() => this.shopService.products$),\n * createAsyncState()\n * );\n *\n * Another implementation thought when refreshing the data: instead of startWith, `merge of` emit as the trigger\n *\n * subject.pipe(\n * switchMap(() => merge(\n * of({ loading: true, error: null, data: null }),\n * this.service.apiCall().pipe(\n * map(data => ({ loading: false, error: null, data })),\n * tap({\n * next: res => callback?.(res.data),\n * error: err => errorCallback?.(err),\n * }),\n * catchError(error => of({ loading: false, error, data: null })),\n * ),\n * ))\n * )\n *\n */\nexport function createAsyncState<T, E = HttpErrorResponse>(\n observerOrNextForOrigin?: Partial<TapObserver<T>> | ((value: T) => void),\n): UnaryFunction<Observable<T>, Observable<AsyncState<T, E>>> {\n return pipe(\n tap(observerOrNextForOrigin),\n map((data) => ({loading: false, error: null, data})),\n startWith({loading: true, error: null, data: null}),\n // retry(1), // if you want to add retry\n catchError((error: E) => of({loading: false, error, data: null})),\n );\n}\n","import {Observable, OperatorFunction, Subscriber, TeardownLogic} from 'rxjs';\n\n/**\n * Creates an operator function for RxJS Observables that filters out consecutive\n * values that are considered equal according to a provided comparator function,\n * and invokes a callback when a distinct value is encountered.\n *\n * @template T - The type of elements emitted by the observable.\n * @param {(previousValue: T, currentValue: T) => void} onChangeCallback\n * A callback function that will be invoked when a distinct value is encountered.\n * It receives the previous distinct value and the current value.\n * @param {(previousValue: T, currentValue: T) => boolean} [comparator]\n * A function that determines if two values are considered equal.\n * Defaults to a function that performs strict equality (===) comparison.\n * @returns {OperatorFunction<T, T>} - The RxJS operator function.\n *\n * @example\n * Example 1:\n * const source$ = new Observable<number>((observer) => {\n * observer.next(1);\n * observer.next(2);\n * observer.next(2);\n * observer.next(3);\n * observer.next(3);\n * observer.next(4);\n * observer.next(5);\n * observer.complete();\n * });\n *\n * const distinctOnChange$ = source$.pipe(\n * distinctOnChange(\n * (prev, curr) => console.log(`Value changed from ${prev} to: ${curr}`),\n * (prev, curr) => prev === curr,\n * ),\n * );\n * distinctOnChange$.subscribe((res) => console.log(res));\n *\n *\n * Example 2:\n * distinctOnChange<RDEValue<OseInstance>[]>(\n * () => {\n * this.store.dispatch(\n * addToast({\n * toast: {\n * type: ToastType.SUCCESS,\n * title: this.l10nService.getMessage('STATUS_CHANGE'),\n * description: this.l10nService.getMessage('STATUS_CHANGE_DESC'),\n * },\n * }),\n * );\n * },\n * (prev, current) =>\n * prev.every((prevInstance, index) => instanceComparator(prevInstance.entity, current[index].entity)),\n * );\n */\nexport function distinctOnChange<T>(\n onChangeCallback: (previousValue: T, currentValue: T) => void,\n comparator: (previousValue: T, currentValue: T) => boolean = (prev, curr) => prev === curr,\n): OperatorFunction<T, T> {\n return (source: Observable<T>) =>\n new Observable<T>((subscriber: Subscriber<T>): TeardownLogic => {\n let hasFirstValue = false;\n let previousValue: T;\n\n const subscription = source.subscribe({\n next: (currentValue: T) => {\n if (hasFirstValue) {\n if (!comparator(previousValue, currentValue)) {\n onChangeCallback(previousValue, currentValue);\n previousValue = currentValue;\n subscriber.next(currentValue);\n }\n } else {\n previousValue = currentValue;\n hasFirstValue = true;\n subscriber.next(currentValue);\n }\n },\n error: (err: unknown) => subscriber.error(err),\n complete: () => subscriber.complete(),\n });\n\n return () => subscription.unsubscribe();\n });\n}\n","import {OperatorFunction, pipe, tap} from 'rxjs';\n\n// Define a type for different logger functions\ntype LoggerType = 'count' | 'debug' | 'dir' | 'log' | 'table';\n\n// Define a more permissive type for console functions\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype ConsoleFunction = (...args: any[]) => void;\n\n// Map each LoggerType to its corresponding console function\nconst loggerFunctions: Record<LoggerType, ConsoleFunction> = {\n count: console.count.bind(console),\n debug: console.debug.bind(console),\n dir: console.dir.bind(console),\n log: console.log.bind(console),\n table: console.table.bind(console),\n};\n\n/**\n * Logger operator for RxJS observables.\n *\n * @param loggerType The type of logger to be used: 'count', 'debug', 'dir', 'log', 'table'.\n * Defaults to 'log' if not provided or if an unknown type is specified.\n * @returns An RxJS operator function that logs values using the specified console function.\n */\nexport const logger = <T>(loggerType: LoggerType = 'log'): OperatorFunction<T, T> =>\n pipe(\n tap((value: T) => {\n const logFunction = loggerFunctions[loggerType] || console.log.bind(console);\n logFunction(value);\n }),\n );\n","import {catchError, EMPTY, exhaustMap, map, merge, Observable, of, share, startWith, timer} from 'rxjs';\n\nimport {AsyncState} from '../models';\n\n/**\n * Polls the API at a specified interval, handling the triggering of requests and building parameters.\n *\n * @param {Object} options - The options object containing interval, apiCall, paramsBuilder, and trigger\n * @param {number} options.interval - The interval at which to poll the API\n * @param {(params: Record<string, unknown>) => Observable<Data>} options.apiCall - The function to call the API\n * @param {(input: Input | null) => Record<string, unknown>} [options.paramsBuilder] - The function to build parameters based on input\n * @param {Observable<Input>} [options.trigger] - The trigger observable for initiating requests\n * @return {Observable<AsyncState<Data>>} An observable emitting the async state of the API data\n */\nexport function poll<Data, Input>(options: {\n interval: number;\n apiCall: (params: Record<string, unknown>) => Observable<Data>;\n paramsBuilder?: (input: Input | null) => Record<string, unknown>;\n trigger?: Observable<Input>;\n}): Observable<AsyncState<Data>> {\n let latestInput: Input | null = null;\n\n return merge(options.trigger || EMPTY, timer(0, options.interval)).pipe(\n exhaustMap((input) => {\n let params: Record<string, unknown> = {};\n\n const triggeredByObservable = typeof input !== 'number';\n if (triggeredByObservable) {\n latestInput = input;\n }\n if (options.paramsBuilder) {\n params = options.paramsBuilder(latestInput);\n }\n\n const isFirstRequest = input === 0;\n const shouldShowLoading = triggeredByObservable || isFirstRequest;\n\n let observable = options.apiCall(params).pipe(\n map((data) => ({loading: false, error: null, data})),\n catchError((error) => of({loading: false, error, data: null})),\n );\n\n if (shouldShowLoading) {\n observable = observable.pipe(startWith({loading: true, error: null, data: null}));\n }\n\n return observable;\n }),\n share(),\n );\n}\n","import {Observable} from 'rxjs';\n\n/**\n * Operator that taps into a callback before the source Observable starts emitting values.\n *\n * This operator is useful for triggering a side effect before the main Observable starts emitting.\n *\n * @param callback A function to be executed before the source Observable emits its first value.\n * @returns An RxJS operator function that taps into the callback and then switchMaps to the source Observable.\n */\nexport function startWithTap<T>(callback: () => void) {\n return (source: Observable<T>) => {\n callback();\n return source;\n };\n}\n","import {HttpErrorResponse} from '@angular/common/http';\nimport {Observable, OperatorFunction, switchMap} from 'rxjs';\n\nimport {AsyncState} from '../models';\nimport {createAsyncState} from './create-async-state.operator';\n\n/**\n * Custom RxJS operator that uses switchMap to handle asynchronous operations and\n * transforms the emitted values into an AsyncState object.\n *\n * @template T - The type of data emitted by the observable returned by the project.\n * @template K - The type of value emitted by the source observable.\n * @template E - The type of error that can be encountered during the asynchronous operation.\n *\n * @param {function(K): Observable<T>} project - A function that takes a value emitted by the source\n * observable and returns an observable representing an asynchronous operation.\n *\n * @returns {OperatorFunction<K, AsyncState<T, E>>} - An RxJS operator that transforms the source observable into\n * an observable of AsyncState objects.\n *\n * @example\n * // Usage of the switchMapWithAsyncState operator\n * const source$ = new BehaviorSubject<number>(1);\n *\n * const asyncOperation = (value: number) => {\n * return of(value * 2).pipe(delay(1000));\n * };\n *\n * const result$ = source$.pipe(switchMapWithAsyncState(asyncOperation));\n * result$.subscribe((state) => {\n * console.log(state); // Outputs AsyncState objects with loading, data, and error properties.\n * });\n */\nexport function switchMapWithAsyncState<T, K, E = HttpErrorResponse>(\n project: (value: K, index: number) => Observable<T>,\n): OperatorFunction<K, AsyncState<T, E>> {\n return (source: Observable<K>) =>\n source.pipe(switchMap((value, index) => project(value, index).pipe(createAsyncState<T, E>())));\n}\n","import {Pipe, PipeTransform} from '@angular/core';\n\n@Pipe({\n name: 'arrayJoin',\n standalone: true,\n})\nexport class ArrayJoinPipe implements PipeTransform {\n transform(value: unknown, separator: string = ',') {\n if (Array.isArray(value)) {\n return value.join(separator);\n }\n\n // For non-array cases or unexpected types, return the value as is\n return value;\n }\n}\n","import {Inject, LOCALE_ID, Pipe, PipeTransform} from '@angular/core';\n\n/**\n * import { LOCALE_ID, NgModule } from '@angular/core';\n * import { BrowserModule } from '@angular/platform-browser';\n * import { AppComponent } from './app.component';\n * import { registerLocaleData } from '@angular/common';\n *\n * import localeEn from '@angular/common/locales/en';\n * import localeFr from '@angular/common/locales/fr';\n *\n * // Register locales\n * registerLocaleData(localeEn);\n * registerLocaleData(localeFr);\n *\n * @NgModule({\n * declarations: [AppComponent],\n * imports: [BrowserModule],\n * providers: [\n * {\n * provide: LOCALE_ID,\n * useFactory: () => {\n * // Use the browser's language or a default language\n * return navigator.language || 'en';\n * },\n * },\n * ],\n * bootstrap: [AppComponent],\n * })\n * export class AppModule {}\n */\n\n@Pipe({\n name: 'byteConverter',\n standalone: true,\n})\nexport class ByteConverterPipe implements PipeTransform {\n constructor(@Inject(LOCALE_ID) private locale: string) {}\n\n // If using navigator.language directly in the pipe, this approach directly uses the browser's language at the moment the ByteConverterPipe is constructed. If the user changes the language while using the application, it won't be automatically reflected. If dynamic language changes are a requirement, using the LOCALE_ID provider as demonstrated in the AppModule is a more Angular-centric approach.\n // private locale: string;\n // constructor() {\n // // Use navigator.language as the default locale\n // this.locale = navigator.language || 'en';\n // }\n\n transform(value: number): string {\n if (value === null || value === undefined || isNaN(value)) {\n return '-';\n }\n\n const units = ['BYTE', 'KB', 'MB', 'GB', 'TB'];\n let unitIndex = 0;\n\n while (value >= 1024 && unitIndex < units.length - 1) {\n value /= 1024;\n unitIndex++;\n }\n\n const translationObject = translations[this.locale] || translations['en'];\n const key = units[unitIndex];\n\n return this.formatNumber(value) + ' ' + translationObject[key];\n }\n\n private formatNumber(value: number): string {\n return new Intl.NumberFormat(this.locale, {maximumFractionDigits: 2}).format(value);\n }\n}\n\nconst translations: Record<string, Record<string, string>> = {\n en: {\n BYTE: 'B',\n KB: 'KB',\n MB: 'MB',\n GB: 'GB',\n TB: 'TB',\n },\n 'en-US': {\n // You can provide specific variations for en-US if needed\n BYTE: 'B',\n KB: 'KB',\n MB: 'MB',\n GB: 'GB',\n TB: 'TB',\n },\n de: {\n BYTE: 'B',\n KB: 'KB',\n MB: 'MB',\n GB: 'GB',\n TB: 'TB',\n },\n es: {\n BYTE: 'B',\n KB: 'KB',\n MB: 'MB',\n GB: 'GB',\n TB: 'TB',\n },\n fr: {\n BYTE: 'o',\n KB: 'Ko',\n MB: 'Mo',\n GB: 'Go',\n TB: 'To',\n },\n it: {\n BYTE: 'B',\n KB: 'KB',\n MB: 'MB',\n GB: 'GB',\n TB: 'TB',\n },\n ja: {\n BYTE: 'B',\n KB: 'KB',\n MB: 'MB',\n GB: 'GB',\n TB: 'TB',\n },\n ko: {\n BYTE: 'B',\n KB: 'KB',\n MB: 'MB',\n GB: 'GB',\n TB: 'TB',\n },\n 'pt-BR': {\n BYTE: 'B',\n KB: 'KB',\n MB: 'MB',\n GB: 'GB',\n TB: 'TB',\n },\n 'zh-CN': {\n BYTE: '字节',\n KB: '千字节',\n MB: '兆字节',\n GB: '千兆字节',\n TB: '太字节',\n },\n 'zh-TW': {\n BYTE: '位元組',\n KB: '千位元組',\n MB: '兆位元組',\n GB: '千兆位元組',\n TB: '太位元組',\n },\n ru: {\n BYTE: 'Б',\n KB: 'КБ',\n MB: 'МБ',\n GB: 'ГБ',\n TB: 'ТБ',\n },\n};\n","// https://regex101.com/library/mX1xW0\nexport const emailPattern = /^([\\w-]+(?:\\.[\\w-]+)*)@((?:[\\w-]+\\.)*\\w[\\w-]{0,66})\\.([a-z]{2,6}(?:\\.[a-z]{2})?)$/;\n\nexport const urlPattern =\n /^https?:\\/\\/(?:www\\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\\.[a-zA-Z0-9()]{1,6}\\b(?:[-a-zA-Z0-9()@:%_+.~#?&/=]*)$/;\nexport const httpsPattern =\n /^https:\\/\\/(?:www\\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\\.[a-zA-Z0-9()]{1,6}\\b(?:[-a-zA-Z0-9()@:%_+.~#?&/=]*)$/;\n","import {Pipe, PipeTransform} from '@angular/core';\n\nimport {httpsPattern} from '../const';\n\n@Pipe({\n name: 'isHttps',\n standalone: true,\n})\nexport class IsHttpsPipe implements PipeTransform {\n transform(value: string): boolean {\n return httpsPattern.test(value);\n }\n}\n","import {Pipe, PipeTransform} from '@angular/core';\n\nconst unmaskNumber = 6;\nconst maskChar = '*';\n\nexport interface MaskOptions {\n unmaskedPrefixLength?: number;\n unmaskedSuffixLength?: number;\n masked?: boolean;\n}\n\n@Pipe({\n name: 'mask',\n standalone: true,\n})\nexport class MaskPipe implements PipeTransform {\n /**\n * Transforms the input string by masking characters based on the provided options.\n *\n * @param {string} value - The input string to be masked.\n * @param {MaskOptions} [options={}] - Options for customizing the masking behavior.\n * @returns {string} - The masked string.\n */\n transform(value: string, options: MaskOptions = {}): string {\n const {unmaskedPrefixLength = unmaskNumber, unmaskedSuffixLength = unmaskNumber, masked = true} = options;\n\n if (\n value.length <= unmaskedPrefixLength + unmaskedSuffixLength ||\n unmaskedPrefixLength < 0 ||\n unmaskedSuffixLength < 0 ||\n !masked\n ) {\n return value;\n }\n\n return value\n .split('')\n .map((char, i) => (i < unmaskedPrefixLength || i > value.length - unmaskedSuffixLength - 1 ? char : maskChar))\n .join('');\n }\n}\n","/**\n * Calculates the difference in whole days between two dates.\n *\n * @param {Date | number | string} dateLeft - The date from which the difference is measured (the reference date).\n * Can be a Date object, a number representing milliseconds since the Unix epoch,\n * or a string in a format parseable by the Date constructor.\n * @param {Date | number | string} dateRight - The date to be compared against the reference date.\n * Can be a Date object, a number representing milliseconds since the Unix epoch,\n * or a string in a format parseable by the Date constructor.\n * @returns {number} The number of whole days between the reference date (dateLeft) and the compared date (dateRight).\n *\n * @example\n * // How many whole days are between '2022-09-08' and '2023-09-18'?\n * const result = differenceInDays('2022-09-08', new Date('2023-09-18'));\n */\nexport function differenceInDays(dateLeft: Date | number | string, dateRight: Date | number | string) {\n const _dateLeft = new Date(dateLeft);\n const _dateRight = new Date(dateRight);\n\n const difference = (_dateLeft.getTime() - _dateRight.getTime()) / (1000 * 60 * 60 * 24);\n\n return Math.floor(difference);\n}\n","import {AbstractControl, AsyncValidatorFn, ValidatorFn, Validators} from '@angular/forms';\nimport {of} from 'rxjs';\n\n/**\n * Provides a conditional validator that applies the specified validator functions only if the condition is met.\n *\n * @param condition A function that determines whether the validators should be applied.\n * @param trueValidatorFn The validator function or an array of validator functions to be applied when the condition is true.\n * @param falseValidatorFn Optional. The validator function or an array of validator functions to be applied when the condition is false.\n * @returns A validator function that can be used with Angular Reactive Forms.\n */\nexport function ifValidator(\n condition: (control: AbstractControl) => boolean,\n trueValidatorFn: ValidatorFn | ValidatorFn[],\n falseValidatorFn?: ValidatorFn | ValidatorFn[],\n): ValidatorFn {\n /**\n * @param control The AbstractControl to validate.\n * @returns Validation errors if the condition is met; otherwise, null.\n */\n return (control: AbstractControl): Validators | null => {\n if (!trueValidatorFn || !condition(control)) {\n return composeValidators(control, falseValidatorFn);\n }\n\n return composeValidators(control, trueValidatorFn);\n };\n}\n\n/**\n * Provides a conditional async validator that applies the specified async validator function only if the condition is met.\n *\n * @param condition A function that determines whether the async validator should be applied.\n * @param validatorFn The async validator function to be applied conditionally.\n * @returns An async validator function that can be used with Angular Reactive Forms.\n */\nexport function ifAsyncValidator(\n condition: (control: AbstractControl) => boolean,\n validatorFn: AsyncValidatorFn,\n): AsyncValidatorFn {\n /**\n * @param control The AbstractControl to validate asynchronously.\n * @returns An observable that emits validation errors if the condition is met; otherwise, emits null.\n */\n return (control: AbstractControl) => {\n if (!validatorFn || !condition(control)) {\n return of(null);\n }\n\n return validatorFn(control);\n };\n}\n\n/**\n * Composes and applies the provided validators to the given AbstractControl.\n *\n * @param control The AbstractControl to validate.\n * @param validatorFn The validator function or an array of validator functions to be applied.\n * @returns Validation errors if the validators are applicable; otherwise, null.\n */\nfunction composeValidators(\n control: AbstractControl,\n validatorFn: ValidatorFn | ValidatorFn[] | undefined,\n): Validators | null {\n if (!validatorFn) {\n return null;\n }\n\n const validatorFns = Array.isArray(validatorFn) ? validatorFn : [validatorFn];\n return Validators.compose(validatorFns)?.(control) || null;\n}\n","/**\n * Check if a value is empty.\n * @param {T | undefined | null} value - The value to check for emptiness.\n * @returns {boolean} - Returns true if the value is empty, otherwise false.\n */\nexport function isEmpty<T extends object | string | Array<unknown>>(value: T | undefined | null): value is null {\n if (value == null) return true;\n\n if (typeof value === 'string' || Array.isArray(value)) {\n return value.length === 0;\n }\n\n if (typeof value === 'object') {\n return Object.keys(value as Record<string, unknown>).length === 0;\n }\n\n return false;\n}\n","/**\n * Check if two values are deeply equal.\n * @param {T} value1 - The first value to compare.\n * @param {T} value2 - The second value to compare.\n * @returns {boolean} - Returns true if the values are deeply equal, otherwise false.\n */\nexport function isEqual<T>(value1: T, value2: T): boolean {\n if (value1 === value2) return true;\n\n if (typeof value1 !== 'object' || typeof value2 !== 'object' || value1 === null || value2 === null) {\n return false;\n }\n\n const keys1 = Object.keys(value1) as Array<keyof T>;\n const keys2 = Object.keys(value2) as Array<keyof T>;\n\n if (keys1.length !== keys2.length) return false;\n\n for (const key of keys1) {\n if (!keys2.includes(key) || !isEqual(value1[key], value2[key])) {\n return false;\n }\n }\n\n return true;\n}\n","/**\n * Create an object composed of object properties that satisfy a given condition.\n * @param {T} source - The object to pick properties from.\n * @param {(value: T[keyof T], key: string) => boolean} predicate - The function invoked per property.\n * @returns {Partial<T>} - Returns the new object.\n */\nexport function pickBy<T>(source: T, predicate: (value: T[keyof T], key: string) => boolean): Partial<T> {\n const result: Partial<T> = {};\n\n for (const key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key) && predicate(source[key], key)) {\n result[key] = source[key];\n }\n }\n\n return result;\n}\n","import {AbstractControl, FormArray, ValidationErrors, ValidatorFn} from '@angular/forms';\n\n/**\n * Validator for checking uniqueness across multiple fields in a FormArray or FormGroup.\n *\n * This validator can be applied to a FormArray or FormGroup containing the controls to be validated.\n * It ensures that each control's value is unique among all other controls within the array or group.\n */\nexport class UniqueValidator {\n /**\n * Validator function to be attached to a FormArray or FormGroup.\n *\n * This validator checks for uniqueness of each control's value within the array or group.\n *\n * @param keySelector A function to select the key control for comparison (default is the control itself).\n * @typeparam T The type of the control value.\n */\n static unique<T>(\n keySelector: (control: AbstractControl) => AbstractControl<T> = (control: AbstractControl<T>) => control,\n ): ValidatorFn {\n return (formArray: AbstractControl): ValidationErrors | null => {\n if (!(formArray instanceof FormArray)) {\n return null;\n }\n\n const targetControls = formArray.controls.map(keySelector);\n const valueControlMap = new Map<T, AbstractControl<T>>();\n const invalidControls: AbstractControl<T>[] = [];\n\n for (const control of targetControls) {\n const value = control.value;\n\n if (value == null || String(value) === '' || String(value) === 'NaN') {\n continue;\n }\n\n const controlInMap = valueControlMap.get(value);\n\n if (controlInMap) {\n if (!invalidControls.includes(controlInMap)) {\n invalidControls.push(controlInMap);\n }\n\n invalidControls.push(control);\n } else {\n valueControlMap.set(value, control);\n }\n }\n\n const notUniqueError = {notUnique: true};\n\n // set errors manually for target controls\n for (const control of targetControls) {\n const errors = control.errors;\n\n if (invalidControls.includes(control)) {\n // set not unique error for invalid controls\n control.setErrors(errors === null ? notUniqueError : {...errors, ...notUniqueError});\n } else {\n // remove not unique errors for valid controls\n if (errors === null) {\n control.setErrors(null);\n } else {\n delete errors['notUnique'];\n control.setErrors(Object.keys(errors).length > 0 ? errors : null);\n }\n }\n }\n\n return invalidControls.length > 0 ? notUniqueError : null;\n };\n }\n}\n","import {AbstractControl, ValidationErrors} from '@angular/forms';\n\nimport {httpsPattern, urlPattern} from '../const';\n\nexport function urlValidator(control: AbstractControl): ValidationErrors | null {\n if (!urlPattern.test(control.value)) {\n return {invalidUrl: true};\n }\n return null;\n}\n\nexport function httpsValidator(control: AbstractControl): ValidationErrors | null {\n if (!httpsPattern.test(control.value)) {\n return {invalidUrl: true};\n }\n return null;\n}\n","/*\n * Public API Surface of ngx-lift\n */\n\nexport * from './lib/models';\nexport * from './lib/operators';\nexport * from './lib/pipes';\nexport * from './lib/utils';\nexport * from './lib/validators';\n// export * from './lib/signals';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;AAYA;;;;;;;;;;;;;;;;;;;AAmBG;SACa,kBAAkB,CAChC,OAA6D,EAC7D,mBAAmB,GAAG,KAAK,EAAA;IAE3B,SAAS,gBAAgB,CAAI,UAAyB,EAAA;AACpD,QAAA,IAAI,mBAAmB,EAAE;YACvB,OAAO,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC;AACzC,SAAA;AAAM,aAAA;;AAEL,YAAA,OAAO,UAAU,YAAY,OAAO,GAAG,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,GAAG,UAAU,CAAC;AACtF,SAAA;KACF;AAED,IAAA,IAAI,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE;;QAE1B,OAAO,aAAa,CAAC,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC,CAAC;AACrD,KAAA;SAAM,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,KAAK,IAAI,EAAE;;QAE1D,MAAM,WAAW,GAAyC,EAAE,CAAC;AAE7D,QAAA,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE;YAClD,WAAW,CAAC,GAAG,CAAC,GAAG,gBAAgB,CAAC,KAAK,CAAC,CAAC;AAC5C,SAAA;AAED,QAAA,OAAO,aAAa,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C,MAAM,KAAK,IAAI,GAAG,cAAc,GAAG,EAAC,GAAG,MAAM,EAAE,GAAG,cAAc,EAAC,CAAC,CAAC;AACtF,iBAAA;AAAM,qBAAA;;oBAEL,IAAI,MAAM,KAAK,IAAI,EAAE;AACnB,wBAAA,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;AACzB,qBAAA;AAAM,yBAAA;AACL,wBAAA,OAAO,MAAM,CAAC,WAAW,CAAC,CAAC;wBAC3B,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,GAAG,CAAC,GAAG,MAAM,GAAG,IAAI,CAAC,CAAC;AACnE,qBAAA;AACF,iBAAA;AACF,aAAA;AAED,YAAA,OAAO,eAAe,CAAC,MAAM,GAAG,CAAC,GAAG,cAAc,GAAG,IAAI,CAAC;AAC5D,SAAC,CAAC;KACH;AACF;;ACpEK,SAAU,YAAY,CAAC,OAAwB,EAAA;IACnD,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;AACnC,QAAA,OAAO,EAAC,UAAU,EAAE,IAAI,EAAC,CAAC;AAC3B,KAAA;AACD,IAAA,OAAO,IAAI,CAAC;AACd,CAAC;AAEK,SAAU,cAAc,CAAC,OAAwB,EAAA;IACrD,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;AACrC,QAAA,OAAO,EAAC,UAAU,EAAE,IAAI,EAAC,CAAC;AAC3B,KAAA;AACD,IAAA,OAAO,IAAI,CAAC;AACd;;AChBA;;AAEG;AAOH;;ACTA;;AAEG;;;;"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Calculates the difference in whole days between two dates.
|
|
3
|
+
*
|
|
4
|
+
* @param {Date | number | string} dateLeft - The date from which the difference is measured (the reference date).
|
|
5
|
+
* Can be a Date object, a number representing milliseconds since the Unix epoch,
|
|
6
|
+
* or a string in a format parseable by the Date constructor.
|
|
7
|
+
* @param {Date | number | string} dateRight - The date to be compared against the reference date.
|
|
8
|
+
* Can be a Date object, a number representing milliseconds since the Unix epoch,
|
|
9
|
+
* or a string in a format parseable by the Date constructor.
|
|
10
|
+
* @returns {number} The number of whole days between the reference date (dateLeft) and the compared date (dateRight).
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* // How many whole days are between '2022-09-08' and '2023-09-18'?
|
|
14
|
+
* const result = differenceInDays('2022-09-08', new Date('2023-09-18'));
|
|
15
|
+
*/
|
|
16
|
+
export declare function differenceInDays(dateLeft: Date | number | string, dateRight: Date | number | string): number;
|
package/lib/utils/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ngx-lift",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
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": {
|