ngx-transforms 0.3.0 → 0.3.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/README.md +46 -73
- package/fesm2022/ngx-transforms.mjs +1609 -180
- package/fesm2022/ngx-transforms.mjs.map +1 -1
- package/package.json +7 -6
- package/types/ngx-transforms.d.ts +828 -12
|
@@ -105,10 +105,10 @@ class AsciiArtPipe {
|
|
|
105
105
|
div.textContent = text;
|
|
106
106
|
return div.innerHTML;
|
|
107
107
|
}
|
|
108
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
109
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.
|
|
108
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: AsciiArtPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
109
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: AsciiArtPipe, isStandalone: true, name: "asciiArt" });
|
|
110
110
|
}
|
|
111
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
111
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: AsciiArtPipe, decorators: [{
|
|
112
112
|
type: Pipe,
|
|
113
113
|
args: [{
|
|
114
114
|
name: 'asciiArt',
|
|
@@ -142,10 +142,10 @@ class CamelCasePipe {
|
|
|
142
142
|
: word.charAt(0).toUpperCase() + word.slice(1))
|
|
143
143
|
.join('');
|
|
144
144
|
}
|
|
145
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
146
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.
|
|
145
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: CamelCasePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
146
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: CamelCasePipe, isStandalone: true, name: "camelCase" });
|
|
147
147
|
}
|
|
148
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
148
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: CamelCasePipe, decorators: [{
|
|
149
149
|
type: Pipe,
|
|
150
150
|
args: [{
|
|
151
151
|
name: 'camelCase',
|
|
@@ -182,10 +182,10 @@ class HighlightPipe {
|
|
|
182
182
|
const highlighed = value.replace(regex, '<span class="highlight">$1</span>');
|
|
183
183
|
return this.sanitizer.bypassSecurityTrustHtml(highlighed);
|
|
184
184
|
}
|
|
185
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
186
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.
|
|
185
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: HighlightPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
186
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: HighlightPipe, isStandalone: true, name: "highlight" });
|
|
187
187
|
}
|
|
188
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
188
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: HighlightPipe, decorators: [{
|
|
189
189
|
type: Pipe,
|
|
190
190
|
args: [{
|
|
191
191
|
name: 'highlight',
|
|
@@ -214,10 +214,10 @@ class InitialsPipe {
|
|
|
214
214
|
.map(word => word.charAt(0).toUpperCase())
|
|
215
215
|
.join('');
|
|
216
216
|
}
|
|
217
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
218
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.
|
|
217
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: InitialsPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
218
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: InitialsPipe, isStandalone: true, name: "initials" });
|
|
219
219
|
}
|
|
220
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
220
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: InitialsPipe, decorators: [{
|
|
221
221
|
type: Pipe,
|
|
222
222
|
args: [{
|
|
223
223
|
name: 'initials',
|
|
@@ -247,10 +247,10 @@ class KebabCasePipe {
|
|
|
247
247
|
.replace(/[^a-z0-9-]+/g, '-') // Replace non-alphanumeric (except hyphen) with hyphen
|
|
248
248
|
.replace(/^-|-$/g, ''); // Remove leading/trailing hyphens
|
|
249
249
|
}
|
|
250
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
251
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.
|
|
250
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: KebabCasePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
251
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: KebabCasePipe, isStandalone: true, name: "kebabCase" });
|
|
252
252
|
}
|
|
253
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
253
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: KebabCasePipe, decorators: [{
|
|
254
254
|
type: Pipe,
|
|
255
255
|
args: [{
|
|
256
256
|
name: 'kebabCase',
|
|
@@ -291,10 +291,10 @@ class MorseCodePipe {
|
|
|
291
291
|
.filter(code => code)
|
|
292
292
|
.join(' ');
|
|
293
293
|
}
|
|
294
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
295
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.
|
|
294
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: MorseCodePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
295
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: MorseCodePipe, isStandalone: true, name: "morseCode" });
|
|
296
296
|
}
|
|
297
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
297
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: MorseCodePipe, decorators: [{
|
|
298
298
|
type: Pipe,
|
|
299
299
|
args: [{
|
|
300
300
|
name: 'morseCode',
|
|
@@ -340,10 +340,10 @@ class ReplacePipe {
|
|
|
340
340
|
const result = value.replace(finalPattern, highlightedMatch);
|
|
341
341
|
return this.sanitizer.bypassSecurityTrustHtml(result);
|
|
342
342
|
}
|
|
343
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
344
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.
|
|
343
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: ReplacePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
344
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: ReplacePipe, isStandalone: true, name: "replace" });
|
|
345
345
|
}
|
|
346
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
346
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: ReplacePipe, decorators: [{
|
|
347
347
|
type: Pipe,
|
|
348
348
|
args: [{
|
|
349
349
|
name: 'replace',
|
|
@@ -375,10 +375,10 @@ class SnakeCasePipe {
|
|
|
375
375
|
.replace(/_+/g, '_') // Collapse multiple underscores
|
|
376
376
|
.replace(/^_|_$/g, ''); // Remove leading/trailing underscores
|
|
377
377
|
}
|
|
378
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
379
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.
|
|
378
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: SnakeCasePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
379
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: SnakeCasePipe, isStandalone: true, name: "snakeCase" });
|
|
380
380
|
}
|
|
381
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
381
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: SnakeCasePipe, decorators: [{
|
|
382
382
|
type: Pipe,
|
|
383
383
|
args: [{
|
|
384
384
|
name: 'snakeCase',
|
|
@@ -407,10 +407,10 @@ class TitleCasePipe {
|
|
|
407
407
|
.map(word => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase())
|
|
408
408
|
.join(' ');
|
|
409
409
|
}
|
|
410
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
411
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.
|
|
410
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: TitleCasePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
411
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: TitleCasePipe, isStandalone: true, name: "titleCase" });
|
|
412
412
|
}
|
|
413
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
413
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: TitleCasePipe, decorators: [{
|
|
414
414
|
type: Pipe,
|
|
415
415
|
args: [{
|
|
416
416
|
name: 'titleCase',
|
|
@@ -462,10 +462,10 @@ class TruncatePipe {
|
|
|
462
462
|
}
|
|
463
463
|
return truncated.trim() + ellipsis;
|
|
464
464
|
}
|
|
465
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
466
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.
|
|
465
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: TruncatePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
466
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: TruncatePipe, isStandalone: true, name: "truncate" });
|
|
467
467
|
}
|
|
468
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
468
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: TruncatePipe, decorators: [{
|
|
469
469
|
type: Pipe,
|
|
470
470
|
args: [{
|
|
471
471
|
name: 'truncate',
|
|
@@ -473,6 +473,1397 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImpor
|
|
|
473
473
|
}]
|
|
474
474
|
}] });
|
|
475
475
|
|
|
476
|
+
/**
|
|
477
|
+
* TrimPipe: Removes whitespace (or specified characters) from both ends of a string.
|
|
478
|
+
*
|
|
479
|
+
* By default, trims whitespace. Pass a string of characters to trim those instead.
|
|
480
|
+
*
|
|
481
|
+
* @param {string} value - The string to trim.
|
|
482
|
+
* @param {string} [chars] - Optional set of characters to trim from both ends.
|
|
483
|
+
*
|
|
484
|
+
* @returns {string} - The trimmed string, or an empty string if input is invalid.
|
|
485
|
+
*
|
|
486
|
+
* @example
|
|
487
|
+
* {{ ' hello ' | trim }} // 'hello'
|
|
488
|
+
* {{ '--hello--' | trim:'-' }} // 'hello'
|
|
489
|
+
* {{ '***title***' | trim:'*' }} // 'title'
|
|
490
|
+
*/
|
|
491
|
+
class TrimPipe {
|
|
492
|
+
transform(value, chars) {
|
|
493
|
+
if (typeof value !== 'string')
|
|
494
|
+
return '';
|
|
495
|
+
if (!chars)
|
|
496
|
+
return value.trim();
|
|
497
|
+
const escaped = chars
|
|
498
|
+
.split('')
|
|
499
|
+
.map(c => c.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'))
|
|
500
|
+
.join('');
|
|
501
|
+
const regex = new RegExp(`^[${escaped}]+|[${escaped}]+$`, 'g');
|
|
502
|
+
return value.replace(regex, '');
|
|
503
|
+
}
|
|
504
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: TrimPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
505
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: TrimPipe, isStandalone: true, name: "trim" });
|
|
506
|
+
}
|
|
507
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: TrimPipe, decorators: [{
|
|
508
|
+
type: Pipe,
|
|
509
|
+
args: [{
|
|
510
|
+
name: 'trim',
|
|
511
|
+
standalone: true,
|
|
512
|
+
}]
|
|
513
|
+
}] });
|
|
514
|
+
|
|
515
|
+
/**
|
|
516
|
+
* CapitalizePipe: Uppercases the first character and lowercases the rest.
|
|
517
|
+
*
|
|
518
|
+
* Useful for normalizing headings, labels, and proper nouns.
|
|
519
|
+
* Differs from `upperFirst` which only uppercases the first character without
|
|
520
|
+
* altering the remaining characters.
|
|
521
|
+
*
|
|
522
|
+
* @param {string} value - The string to capitalize.
|
|
523
|
+
*
|
|
524
|
+
* @returns {string} - The capitalized string, or an empty string if input is invalid.
|
|
525
|
+
*
|
|
526
|
+
* @example
|
|
527
|
+
* {{ 'hello world' | capitalize }} // 'Hello world'
|
|
528
|
+
* {{ 'HELLO WORLD' | capitalize }} // 'Hello world'
|
|
529
|
+
* {{ 'hELLo' | capitalize }} // 'Hello'
|
|
530
|
+
*/
|
|
531
|
+
class CapitalizePipe {
|
|
532
|
+
transform(value) {
|
|
533
|
+
if (typeof value !== 'string' || value.length === 0)
|
|
534
|
+
return '';
|
|
535
|
+
return value.charAt(0).toUpperCase() + value.slice(1).toLowerCase();
|
|
536
|
+
}
|
|
537
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: CapitalizePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
538
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: CapitalizePipe, isStandalone: true, name: "capitalize" });
|
|
539
|
+
}
|
|
540
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: CapitalizePipe, decorators: [{
|
|
541
|
+
type: Pipe,
|
|
542
|
+
args: [{
|
|
543
|
+
name: 'capitalize',
|
|
544
|
+
standalone: true,
|
|
545
|
+
}]
|
|
546
|
+
}] });
|
|
547
|
+
|
|
548
|
+
/**
|
|
549
|
+
* UpperFirstPipe: Uppercases the first character of a string without altering the rest.
|
|
550
|
+
*
|
|
551
|
+
* Differs from `capitalize` which also lowercases the remaining characters.
|
|
552
|
+
* Useful when you want to preserve acronyms, camelCase, or existing casing.
|
|
553
|
+
*
|
|
554
|
+
* @param {string} value - The string to transform.
|
|
555
|
+
*
|
|
556
|
+
* @returns {string} - The transformed string, or an empty string if input is invalid.
|
|
557
|
+
*
|
|
558
|
+
* @example
|
|
559
|
+
* {{ 'hello WORLD' | upperFirst }} // 'Hello WORLD'
|
|
560
|
+
* {{ 'javaScript' | upperFirst }} // 'JavaScript'
|
|
561
|
+
* {{ 'apiKey' | upperFirst }} // 'ApiKey'
|
|
562
|
+
*/
|
|
563
|
+
class UpperFirstPipe {
|
|
564
|
+
transform(value) {
|
|
565
|
+
if (typeof value !== 'string' || value.length === 0)
|
|
566
|
+
return '';
|
|
567
|
+
return value.charAt(0).toUpperCase() + value.slice(1);
|
|
568
|
+
}
|
|
569
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: UpperFirstPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
570
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: UpperFirstPipe, isStandalone: true, name: "upperFirst" });
|
|
571
|
+
}
|
|
572
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: UpperFirstPipe, decorators: [{
|
|
573
|
+
type: Pipe,
|
|
574
|
+
args: [{
|
|
575
|
+
name: 'upperFirst',
|
|
576
|
+
standalone: true,
|
|
577
|
+
}]
|
|
578
|
+
}] });
|
|
579
|
+
|
|
580
|
+
/**
|
|
581
|
+
* LeftPadPipe: Pads a string on the left until it reaches the target length.
|
|
582
|
+
*
|
|
583
|
+
* Wraps JavaScript's native `padStart`. If the input is already at or above
|
|
584
|
+
* the target length, returns it unchanged. Defaults to padding with spaces.
|
|
585
|
+
*
|
|
586
|
+
* @param {string | number} value - The string or number to pad.
|
|
587
|
+
* @param {number} length - The target length of the resulting string.
|
|
588
|
+
* @param {string} [char=' '] - The character (or string) to pad with.
|
|
589
|
+
*
|
|
590
|
+
* @returns {string} - The padded string, or empty string if input is invalid.
|
|
591
|
+
*
|
|
592
|
+
* @example
|
|
593
|
+
* {{ '5' | leftPad:3:'0' }} // '005'
|
|
594
|
+
* {{ 42 | leftPad:5 }} // ' 42'
|
|
595
|
+
* {{ 'hi' | leftPad:6:'-' }} // '----hi'
|
|
596
|
+
*/
|
|
597
|
+
class LeftPadPipe {
|
|
598
|
+
transform(value, length, char = ' ') {
|
|
599
|
+
if (value === null || value === undefined)
|
|
600
|
+
return '';
|
|
601
|
+
const str = typeof value === 'number' ? String(value) : value;
|
|
602
|
+
if (typeof str !== 'string')
|
|
603
|
+
return '';
|
|
604
|
+
if (typeof length !== 'number' || isNaN(length) || length < 0)
|
|
605
|
+
return str;
|
|
606
|
+
const padChar = char === '' ? ' ' : char;
|
|
607
|
+
return str.padStart(length, padChar);
|
|
608
|
+
}
|
|
609
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: LeftPadPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
610
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: LeftPadPipe, isStandalone: true, name: "leftPad" });
|
|
611
|
+
}
|
|
612
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: LeftPadPipe, decorators: [{
|
|
613
|
+
type: Pipe,
|
|
614
|
+
args: [{
|
|
615
|
+
name: 'leftPad',
|
|
616
|
+
standalone: true,
|
|
617
|
+
}]
|
|
618
|
+
}] });
|
|
619
|
+
|
|
620
|
+
/**
|
|
621
|
+
* RightPadPipe: Pads a string on the right until it reaches the target length.
|
|
622
|
+
*
|
|
623
|
+
* Wraps JavaScript's native `padEnd`. If the input is already at or above
|
|
624
|
+
* the target length, returns it unchanged. Defaults to padding with spaces.
|
|
625
|
+
*
|
|
626
|
+
* @param {string | number} value - The string or number to pad.
|
|
627
|
+
* @param {number} length - The target length of the resulting string.
|
|
628
|
+
* @param {string} [char=' '] - The character (or string) to pad with.
|
|
629
|
+
*
|
|
630
|
+
* @returns {string} - The padded string, or empty string if input is invalid.
|
|
631
|
+
*
|
|
632
|
+
* @example
|
|
633
|
+
* {{ 'hi' | rightPad:5:'.' }} // 'hi...'
|
|
634
|
+
* {{ 'name' | rightPad:10 }} // 'name '
|
|
635
|
+
* {{ 42 | rightPad:5:'0' }} // '42000'
|
|
636
|
+
*/
|
|
637
|
+
class RightPadPipe {
|
|
638
|
+
transform(value, length, char = ' ') {
|
|
639
|
+
if (value === null || value === undefined)
|
|
640
|
+
return '';
|
|
641
|
+
const str = typeof value === 'number' ? String(value) : value;
|
|
642
|
+
if (typeof str !== 'string')
|
|
643
|
+
return '';
|
|
644
|
+
if (typeof length !== 'number' || isNaN(length) || length < 0)
|
|
645
|
+
return str;
|
|
646
|
+
const padChar = char === '' ? ' ' : char;
|
|
647
|
+
return str.padEnd(length, padChar);
|
|
648
|
+
}
|
|
649
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: RightPadPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
650
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: RightPadPipe, isStandalone: true, name: "rightPad" });
|
|
651
|
+
}
|
|
652
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: RightPadPipe, decorators: [{
|
|
653
|
+
type: Pipe,
|
|
654
|
+
args: [{
|
|
655
|
+
name: 'rightPad',
|
|
656
|
+
standalone: true,
|
|
657
|
+
}]
|
|
658
|
+
}] });
|
|
659
|
+
|
|
660
|
+
/**
|
|
661
|
+
* PadPipe: Pads a string on both sides to reach the target length (centers it).
|
|
662
|
+
*
|
|
663
|
+
* When the padding is uneven, the extra character goes to the right.
|
|
664
|
+
* Defaults to padding with spaces.
|
|
665
|
+
*
|
|
666
|
+
* @param {string | number} value - The string or number to pad.
|
|
667
|
+
* @param {number} length - The target length of the resulting string.
|
|
668
|
+
* @param {string} [char=' '] - The character (or string) to pad with.
|
|
669
|
+
*
|
|
670
|
+
* @returns {string} - The padded string, or empty string if input is invalid.
|
|
671
|
+
*
|
|
672
|
+
* @example
|
|
673
|
+
* {{ 'x' | pad:5:'-' }} // '--x--'
|
|
674
|
+
* {{ 'hi' | pad:6:'*' }} // '**hi**'
|
|
675
|
+
* {{ 'hi' | pad:7:'*' }} // '**hi***' (extra right)
|
|
676
|
+
*/
|
|
677
|
+
class PadPipe {
|
|
678
|
+
transform(value, length, char = ' ') {
|
|
679
|
+
if (value === null || value === undefined)
|
|
680
|
+
return '';
|
|
681
|
+
const str = typeof value === 'number' ? String(value) : value;
|
|
682
|
+
if (typeof str !== 'string')
|
|
683
|
+
return '';
|
|
684
|
+
if (typeof length !== 'number' || isNaN(length) || length < 0)
|
|
685
|
+
return str;
|
|
686
|
+
if (str.length >= length)
|
|
687
|
+
return str;
|
|
688
|
+
const padChar = char === '' ? ' ' : char;
|
|
689
|
+
const diff = length - str.length;
|
|
690
|
+
const leftCount = Math.floor(diff / 2);
|
|
691
|
+
const leftTarget = str.length + leftCount;
|
|
692
|
+
return str.padStart(leftTarget, padChar).padEnd(length, padChar);
|
|
693
|
+
}
|
|
694
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: PadPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
695
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: PadPipe, isStandalone: true, name: "pad" });
|
|
696
|
+
}
|
|
697
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: PadPipe, decorators: [{
|
|
698
|
+
type: Pipe,
|
|
699
|
+
args: [{
|
|
700
|
+
name: 'pad',
|
|
701
|
+
standalone: true,
|
|
702
|
+
}]
|
|
703
|
+
}] });
|
|
704
|
+
|
|
705
|
+
/**
|
|
706
|
+
* RepeatPipe: Repeats a string a given number of times.
|
|
707
|
+
*
|
|
708
|
+
* Wraps `String.prototype.repeat`. Optional separator is inserted between repetitions.
|
|
709
|
+
*
|
|
710
|
+
* @param {string} value - The string to repeat.
|
|
711
|
+
* @param {number} count - Number of times to repeat (must be >= 0).
|
|
712
|
+
* @param {string} [separator=''] - Optional separator placed between repetitions.
|
|
713
|
+
*
|
|
714
|
+
* @returns {string} - The repeated string, or an empty string if input is invalid.
|
|
715
|
+
*
|
|
716
|
+
* @example
|
|
717
|
+
* {{ '-' | repeat:10 }} // '----------'
|
|
718
|
+
* {{ 'ha' | repeat:3 }} // 'hahaha'
|
|
719
|
+
* {{ 'item' | repeat:3:', ' }} // 'item, item, item'
|
|
720
|
+
*/
|
|
721
|
+
class RepeatPipe {
|
|
722
|
+
transform(value, count, separator = '') {
|
|
723
|
+
if (typeof value !== 'string')
|
|
724
|
+
return '';
|
|
725
|
+
if (typeof count !== 'number' || isNaN(count) || count < 0 || !isFinite(count)) {
|
|
726
|
+
return '';
|
|
727
|
+
}
|
|
728
|
+
const repetitions = Math.floor(count);
|
|
729
|
+
if (repetitions === 0)
|
|
730
|
+
return '';
|
|
731
|
+
if (!separator)
|
|
732
|
+
return value.repeat(repetitions);
|
|
733
|
+
return Array(repetitions).fill(value).join(separator);
|
|
734
|
+
}
|
|
735
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: RepeatPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
736
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: RepeatPipe, isStandalone: true, name: "repeat" });
|
|
737
|
+
}
|
|
738
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: RepeatPipe, decorators: [{
|
|
739
|
+
type: Pipe,
|
|
740
|
+
args: [{
|
|
741
|
+
name: 'repeat',
|
|
742
|
+
standalone: true,
|
|
743
|
+
}]
|
|
744
|
+
}] });
|
|
745
|
+
|
|
746
|
+
/**
|
|
747
|
+
* SlugifyPipe: Converts a string into a URL-friendly slug.
|
|
748
|
+
*
|
|
749
|
+
* Removes diacritics, lowercases, replaces non-alphanumerics with the separator,
|
|
750
|
+
* collapses consecutive separators, and trims them from the ends.
|
|
751
|
+
*
|
|
752
|
+
* @param {string} value - The string to slugify.
|
|
753
|
+
* @param {string} [separator='-'] - Character used to join words.
|
|
754
|
+
*
|
|
755
|
+
* @returns {string} - The slugified string, or an empty string if input is invalid.
|
|
756
|
+
*
|
|
757
|
+
* @example
|
|
758
|
+
* {{ 'Hello World!' | slugify }} // 'hello-world'
|
|
759
|
+
* {{ 'Café & Tea' | slugify }} // 'cafe-tea'
|
|
760
|
+
* {{ 'My Blog Post' | slugify:'_' }} // 'my_blog_post'
|
|
761
|
+
*/
|
|
762
|
+
class SlugifyPipe {
|
|
763
|
+
transform(value, separator = '-') {
|
|
764
|
+
if (typeof value !== 'string')
|
|
765
|
+
return '';
|
|
766
|
+
const sep = separator || '-';
|
|
767
|
+
const escaped = sep.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
768
|
+
return value
|
|
769
|
+
.normalize('NFD')
|
|
770
|
+
.replace(/[\u0300-\u036f]/g, '')
|
|
771
|
+
.toLowerCase()
|
|
772
|
+
.replace(/[^a-z0-9]+/g, sep)
|
|
773
|
+
.replace(new RegExp(`${escaped}+`, 'g'), sep)
|
|
774
|
+
.replace(new RegExp(`^${escaped}|${escaped}$`, 'g'), '');
|
|
775
|
+
}
|
|
776
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: SlugifyPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
777
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: SlugifyPipe, isStandalone: true, name: "slugify" });
|
|
778
|
+
}
|
|
779
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: SlugifyPipe, decorators: [{
|
|
780
|
+
type: Pipe,
|
|
781
|
+
args: [{
|
|
782
|
+
name: 'slugify',
|
|
783
|
+
standalone: true,
|
|
784
|
+
}]
|
|
785
|
+
}] });
|
|
786
|
+
|
|
787
|
+
/**
|
|
788
|
+
* StripTagsPipe: Removes HTML tags from a string.
|
|
789
|
+
*
|
|
790
|
+
* By default strips every tag. Pass an array of allowed tag names to keep
|
|
791
|
+
* those specific tags while stripping the rest. HTML comments and DOCTYPEs
|
|
792
|
+
* are always removed.
|
|
793
|
+
*
|
|
794
|
+
* Note: this pipe returns a plain string — the caller is responsible for
|
|
795
|
+
* binding the output safely (e.g. via `[textContent]`). For sanitization
|
|
796
|
+
* that also neutralizes dangerous attributes/scripts, use HtmlSanitizePipe.
|
|
797
|
+
*
|
|
798
|
+
* @param {string} value - The HTML string to strip.
|
|
799
|
+
* @param {string[]} [allowedTags] - Optional list of tag names to preserve.
|
|
800
|
+
*
|
|
801
|
+
* @returns {string} - The stripped string, or empty string if input is invalid.
|
|
802
|
+
*
|
|
803
|
+
* @example
|
|
804
|
+
* {{ '<p>Hi <b>there</b></p>' | stripTags }} // 'Hi there'
|
|
805
|
+
* {{ '<p>Hi <b>bold</b></p>' | stripTags:['b'] }} // 'Hi <b>bold</b>'
|
|
806
|
+
* {{ '<script>alert(1)</script>Safe' | stripTags }} // 'Safe'
|
|
807
|
+
*/
|
|
808
|
+
class StripTagsPipe {
|
|
809
|
+
transform(value, allowedTags) {
|
|
810
|
+
if (typeof value !== 'string')
|
|
811
|
+
return '';
|
|
812
|
+
let result = value
|
|
813
|
+
.replace(/<!--[\s\S]*?-->/g, '')
|
|
814
|
+
.replace(/<!DOCTYPE[^>]*>/gi, '')
|
|
815
|
+
.replace(/<script\b[\s\S]*?<\/script>/gi, '')
|
|
816
|
+
.replace(/<style\b[\s\S]*?<\/style>/gi, '');
|
|
817
|
+
if (!Array.isArray(allowedTags) || allowedTags.length === 0) {
|
|
818
|
+
return result.replace(/<\/?[a-zA-Z][^>]*>/g, '');
|
|
819
|
+
}
|
|
820
|
+
const allowed = allowedTags
|
|
821
|
+
.filter(t => typeof t === 'string' && t.length > 0)
|
|
822
|
+
.map(t => t.toLowerCase().replace(/[^a-z0-9]/g, ''));
|
|
823
|
+
if (allowed.length === 0) {
|
|
824
|
+
return result.replace(/<\/?[a-zA-Z][^>]*>/g, '');
|
|
825
|
+
}
|
|
826
|
+
const pattern = new RegExp(`</?(?!(?:${allowed.join('|')})\\b)[a-zA-Z][^>]*>`, 'gi');
|
|
827
|
+
result = result.replace(pattern, '');
|
|
828
|
+
return result;
|
|
829
|
+
}
|
|
830
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: StripTagsPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
831
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: StripTagsPipe, isStandalone: true, name: "stripTags" });
|
|
832
|
+
}
|
|
833
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: StripTagsPipe, decorators: [{
|
|
834
|
+
type: Pipe,
|
|
835
|
+
args: [{
|
|
836
|
+
name: 'stripTags',
|
|
837
|
+
standalone: true,
|
|
838
|
+
}]
|
|
839
|
+
}] });
|
|
840
|
+
|
|
841
|
+
/**
|
|
842
|
+
* EncodeUriPipe: Encodes a full URI by escaping characters that would be invalid.
|
|
843
|
+
*
|
|
844
|
+
* Wraps the native `encodeURI`. Preserves URI structural characters
|
|
845
|
+
* (`: / ? # [ ] @ ! $ & ' ( ) * + , ; =`) so this is suitable for entire URLs,
|
|
846
|
+
* not for individual query string values (use `encodeURIComponent` for those).
|
|
847
|
+
*
|
|
848
|
+
* @param {string} value - The URI to encode.
|
|
849
|
+
*
|
|
850
|
+
* @returns {string} - The encoded URI, or empty string if input is invalid.
|
|
851
|
+
*
|
|
852
|
+
* @example
|
|
853
|
+
* {{ 'https://example.com/?q=hi world' | encodeURI }} // 'https://example.com/?q=hi%20world'
|
|
854
|
+
* {{ '/path with space.html' | encodeURI }} // '/path%20with%20space.html'
|
|
855
|
+
*/
|
|
856
|
+
class EncodeUriPipe {
|
|
857
|
+
transform(value) {
|
|
858
|
+
if (typeof value !== 'string')
|
|
859
|
+
return '';
|
|
860
|
+
try {
|
|
861
|
+
return encodeURI(value);
|
|
862
|
+
}
|
|
863
|
+
catch {
|
|
864
|
+
return value;
|
|
865
|
+
}
|
|
866
|
+
}
|
|
867
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: EncodeUriPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
868
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: EncodeUriPipe, isStandalone: true, name: "encodeURI" });
|
|
869
|
+
}
|
|
870
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: EncodeUriPipe, decorators: [{
|
|
871
|
+
type: Pipe,
|
|
872
|
+
args: [{
|
|
873
|
+
name: 'encodeURI',
|
|
874
|
+
standalone: true,
|
|
875
|
+
}]
|
|
876
|
+
}] });
|
|
877
|
+
|
|
878
|
+
/**
|
|
879
|
+
* EncodeUriComponentPipe: Encodes a single URI component, escaping reserved characters.
|
|
880
|
+
*
|
|
881
|
+
* Wraps the native `encodeURIComponent`. Encodes everything except
|
|
882
|
+
* `A-Z a-z 0-9 - _ . ! ~ * ' ( )`. Use this for query parameter values,
|
|
883
|
+
* path segments, or anywhere a value must not collide with URL syntax.
|
|
884
|
+
*
|
|
885
|
+
* @param {string} value - The URI component to encode.
|
|
886
|
+
*
|
|
887
|
+
* @returns {string} - The encoded component, or empty string if input is invalid.
|
|
888
|
+
*
|
|
889
|
+
* @example
|
|
890
|
+
* {{ 'hi world&you' | encodeURIComponent }} // 'hi%20world%26you'
|
|
891
|
+
* {{ 'foo/bar?baz=1' | encodeURIComponent }} // 'foo%2Fbar%3Fbaz%3D1'
|
|
892
|
+
*/
|
|
893
|
+
class EncodeUriComponentPipe {
|
|
894
|
+
transform(value) {
|
|
895
|
+
if (typeof value !== 'string')
|
|
896
|
+
return '';
|
|
897
|
+
try {
|
|
898
|
+
return encodeURIComponent(value);
|
|
899
|
+
}
|
|
900
|
+
catch {
|
|
901
|
+
return value;
|
|
902
|
+
}
|
|
903
|
+
}
|
|
904
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: EncodeUriComponentPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
905
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: EncodeUriComponentPipe, isStandalone: true, name: "encodeURIComponent" });
|
|
906
|
+
}
|
|
907
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: EncodeUriComponentPipe, decorators: [{
|
|
908
|
+
type: Pipe,
|
|
909
|
+
args: [{
|
|
910
|
+
name: 'encodeURIComponent',
|
|
911
|
+
standalone: true,
|
|
912
|
+
}]
|
|
913
|
+
}] });
|
|
914
|
+
|
|
915
|
+
/**
|
|
916
|
+
* DecodeUriPipe: Decodes a URI previously encoded with `encodeURI`.
|
|
917
|
+
*
|
|
918
|
+
* Wraps the native `decodeURI`. Returns the input unchanged if the string
|
|
919
|
+
* contains a malformed escape sequence.
|
|
920
|
+
*
|
|
921
|
+
* @param {string} value - The encoded URI to decode.
|
|
922
|
+
*
|
|
923
|
+
* @returns {string} - The decoded URI, or empty string if input is invalid.
|
|
924
|
+
*
|
|
925
|
+
* @example
|
|
926
|
+
* {{ 'https://example.com/?q=hi%20world' | decodeURI }} // 'https://example.com/?q=hi world'
|
|
927
|
+
* {{ '/path%20with%20space.html' | decodeURI }} // '/path with space.html'
|
|
928
|
+
*/
|
|
929
|
+
class DecodeUriPipe {
|
|
930
|
+
transform(value) {
|
|
931
|
+
if (typeof value !== 'string')
|
|
932
|
+
return '';
|
|
933
|
+
try {
|
|
934
|
+
return decodeURI(value);
|
|
935
|
+
}
|
|
936
|
+
catch {
|
|
937
|
+
return value;
|
|
938
|
+
}
|
|
939
|
+
}
|
|
940
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DecodeUriPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
941
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: DecodeUriPipe, isStandalone: true, name: "decodeURI" });
|
|
942
|
+
}
|
|
943
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DecodeUriPipe, decorators: [{
|
|
944
|
+
type: Pipe,
|
|
945
|
+
args: [{
|
|
946
|
+
name: 'decodeURI',
|
|
947
|
+
standalone: true,
|
|
948
|
+
}]
|
|
949
|
+
}] });
|
|
950
|
+
|
|
951
|
+
/**
|
|
952
|
+
* DecodeUriComponentPipe: Decodes a URI component encoded with `encodeURIComponent`.
|
|
953
|
+
*
|
|
954
|
+
* Wraps the native `decodeURIComponent`. Returns the input unchanged if the
|
|
955
|
+
* string contains a malformed escape sequence.
|
|
956
|
+
*
|
|
957
|
+
* @param {string} value - The encoded URI component to decode.
|
|
958
|
+
*
|
|
959
|
+
* @returns {string} - The decoded component, or empty string if input is invalid.
|
|
960
|
+
*
|
|
961
|
+
* @example
|
|
962
|
+
* {{ 'hi%20world%26you' | decodeURIComponent }} // 'hi world&you'
|
|
963
|
+
* {{ 'foo%2Fbar%3Fbaz%3D1' | decodeURIComponent }} // 'foo/bar?baz=1'
|
|
964
|
+
*/
|
|
965
|
+
class DecodeUriComponentPipe {
|
|
966
|
+
transform(value) {
|
|
967
|
+
if (typeof value !== 'string')
|
|
968
|
+
return '';
|
|
969
|
+
try {
|
|
970
|
+
return decodeURIComponent(value);
|
|
971
|
+
}
|
|
972
|
+
catch {
|
|
973
|
+
return value;
|
|
974
|
+
}
|
|
975
|
+
}
|
|
976
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DecodeUriComponentPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
977
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: DecodeUriComponentPipe, isStandalone: true, name: "decodeURIComponent" });
|
|
978
|
+
}
|
|
979
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DecodeUriComponentPipe, decorators: [{
|
|
980
|
+
type: Pipe,
|
|
981
|
+
args: [{
|
|
982
|
+
name: 'decodeURIComponent',
|
|
983
|
+
standalone: true,
|
|
984
|
+
}]
|
|
985
|
+
}] });
|
|
986
|
+
|
|
987
|
+
/**
|
|
988
|
+
* SplitPipe: Splits a string into an array using the given separator.
|
|
989
|
+
*
|
|
990
|
+
* Wraps `String.prototype.split`. Returns an empty array for invalid inputs.
|
|
991
|
+
*
|
|
992
|
+
* @param {string} value - The string to split.
|
|
993
|
+
* @param {string | RegExp} [separator=''] - Character, string, or regex to split on.
|
|
994
|
+
* An empty separator splits the string into individual characters.
|
|
995
|
+
* @param {number} [limit] - Optional maximum number of elements to return.
|
|
996
|
+
*
|
|
997
|
+
* @returns {string[]} - The resulting array, or an empty array for invalid input.
|
|
998
|
+
*
|
|
999
|
+
* @example
|
|
1000
|
+
* {{ 'a,b,c' | split:',' }} // ['a', 'b', 'c']
|
|
1001
|
+
* {{ 'abc' | split }} // ['a', 'b', 'c']
|
|
1002
|
+
* {{ 'one two three' | split:' ':2 }} // ['one', 'two']
|
|
1003
|
+
*/
|
|
1004
|
+
class SplitPipe {
|
|
1005
|
+
transform(value, separator = '', limit) {
|
|
1006
|
+
if (typeof value !== 'string')
|
|
1007
|
+
return [];
|
|
1008
|
+
if (typeof limit === 'number' && limit >= 0) {
|
|
1009
|
+
return value.split(separator, limit);
|
|
1010
|
+
}
|
|
1011
|
+
return value.split(separator);
|
|
1012
|
+
}
|
|
1013
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: SplitPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
1014
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: SplitPipe, isStandalone: true, name: "split" });
|
|
1015
|
+
}
|
|
1016
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: SplitPipe, decorators: [{
|
|
1017
|
+
type: Pipe,
|
|
1018
|
+
args: [{
|
|
1019
|
+
name: 'split',
|
|
1020
|
+
standalone: true,
|
|
1021
|
+
}]
|
|
1022
|
+
}] });
|
|
1023
|
+
|
|
1024
|
+
/**
|
|
1025
|
+
* MatchPipe: Returns all regex matches found in a string.
|
|
1026
|
+
*
|
|
1027
|
+
* Wraps `String.prototype.match` with a global default. Returns an empty array
|
|
1028
|
+
* when nothing matches or the regex is invalid.
|
|
1029
|
+
*
|
|
1030
|
+
* @param {string} value - The string to search.
|
|
1031
|
+
* @param {string | RegExp} pattern - Pattern string (or RegExp) to match.
|
|
1032
|
+
* @param {string} [flags='g'] - Regex flags used when `pattern` is a string.
|
|
1033
|
+
*
|
|
1034
|
+
* @returns {string[]} - Array of matches, or empty array if none / invalid input.
|
|
1035
|
+
*
|
|
1036
|
+
* @example
|
|
1037
|
+
* {{ 'abc123def456' | match:'[0-9]+' }} // ['123', '456']
|
|
1038
|
+
* {{ 'hello world' | match:'[a-z]+' }} // ['hello', 'world']
|
|
1039
|
+
* {{ 'HELLO' | match:'[a-z]+':'gi' }} // ['HELLO']
|
|
1040
|
+
*/
|
|
1041
|
+
class MatchPipe {
|
|
1042
|
+
transform(value, pattern, flags = 'g') {
|
|
1043
|
+
if (typeof value !== 'string' || !pattern)
|
|
1044
|
+
return [];
|
|
1045
|
+
try {
|
|
1046
|
+
const regex = typeof pattern === 'string'
|
|
1047
|
+
? new RegExp(pattern, flags.includes('g') ? flags : flags + 'g')
|
|
1048
|
+
: (pattern.flags.includes('g') ? pattern : new RegExp(pattern.source, pattern.flags + 'g'));
|
|
1049
|
+
const matches = value.match(regex);
|
|
1050
|
+
return matches ?? [];
|
|
1051
|
+
}
|
|
1052
|
+
catch {
|
|
1053
|
+
return [];
|
|
1054
|
+
}
|
|
1055
|
+
}
|
|
1056
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: MatchPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
1057
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: MatchPipe, isStandalone: true, name: "match" });
|
|
1058
|
+
}
|
|
1059
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: MatchPipe, decorators: [{
|
|
1060
|
+
type: Pipe,
|
|
1061
|
+
args: [{
|
|
1062
|
+
name: 'match',
|
|
1063
|
+
standalone: true,
|
|
1064
|
+
}]
|
|
1065
|
+
}] });
|
|
1066
|
+
|
|
1067
|
+
/**
|
|
1068
|
+
* TestPipe: Returns true when a string matches a regex pattern.
|
|
1069
|
+
*
|
|
1070
|
+
* Wraps `RegExp.prototype.test`. Returns false for invalid input or regex.
|
|
1071
|
+
*
|
|
1072
|
+
* @param {string} value - The string to test.
|
|
1073
|
+
* @param {string | RegExp} pattern - Pattern string (or RegExp) to test against.
|
|
1074
|
+
* @param {string} [flags=''] - Regex flags used when `pattern` is a string.
|
|
1075
|
+
*
|
|
1076
|
+
* @returns {boolean} - `true` if the pattern matches anywhere in the string.
|
|
1077
|
+
*
|
|
1078
|
+
* @example
|
|
1079
|
+
* {{ 'abc@x.com' | test:'@' }} // true
|
|
1080
|
+
* {{ 'ABC' | test:'[a-z]':'i' }} // true
|
|
1081
|
+
* {{ '123' | test:'^[0-9]+$' }} // true
|
|
1082
|
+
*/
|
|
1083
|
+
class TestPipe {
|
|
1084
|
+
transform(value, pattern, flags = '') {
|
|
1085
|
+
if (typeof value !== 'string' || !pattern)
|
|
1086
|
+
return false;
|
|
1087
|
+
try {
|
|
1088
|
+
const regex = typeof pattern === 'string'
|
|
1089
|
+
? new RegExp(pattern, flags)
|
|
1090
|
+
: pattern;
|
|
1091
|
+
return regex.test(value);
|
|
1092
|
+
}
|
|
1093
|
+
catch {
|
|
1094
|
+
return false;
|
|
1095
|
+
}
|
|
1096
|
+
}
|
|
1097
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: TestPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
1098
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: TestPipe, isStandalone: true, name: "test" });
|
|
1099
|
+
}
|
|
1100
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: TestPipe, decorators: [{
|
|
1101
|
+
type: Pipe,
|
|
1102
|
+
args: [{
|
|
1103
|
+
name: 'test',
|
|
1104
|
+
standalone: true,
|
|
1105
|
+
}]
|
|
1106
|
+
}] });
|
|
1107
|
+
|
|
1108
|
+
/**
|
|
1109
|
+
* NewlinesPipe: Replaces line breaks in a string with a custom replacement.
|
|
1110
|
+
*
|
|
1111
|
+
* Handles all common line-break variants (`\n`, `\r\n`, `\r`). Defaults to
|
|
1112
|
+
* `<br>` for HTML display via `[innerHTML]`. Pass any string to customize.
|
|
1113
|
+
*
|
|
1114
|
+
* @param {string} value - The string containing line breaks.
|
|
1115
|
+
* @param {string} [replacement='<br>'] - String inserted in place of each line break.
|
|
1116
|
+
*
|
|
1117
|
+
* @returns {string} - The transformed string, or empty string if input is invalid.
|
|
1118
|
+
*
|
|
1119
|
+
* @example
|
|
1120
|
+
* {{ text | newlines }} // 'a<br>b<br>c' (use [innerHTML])
|
|
1121
|
+
* {{ text | newlines:' | ' }} // 'a | b | c'
|
|
1122
|
+
* {{ text | newlines:' ' }} // 'a b c' (flatten to single line)
|
|
1123
|
+
*/
|
|
1124
|
+
class NewlinesPipe {
|
|
1125
|
+
transform(value, replacement = '<br>') {
|
|
1126
|
+
if (typeof value !== 'string')
|
|
1127
|
+
return '';
|
|
1128
|
+
return value.replace(/\r\n|\r|\n/g, replacement);
|
|
1129
|
+
}
|
|
1130
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: NewlinesPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
1131
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: NewlinesPipe, isStandalone: true, name: "newlines" });
|
|
1132
|
+
}
|
|
1133
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: NewlinesPipe, decorators: [{
|
|
1134
|
+
type: Pipe,
|
|
1135
|
+
args: [{
|
|
1136
|
+
name: 'newlines',
|
|
1137
|
+
standalone: true,
|
|
1138
|
+
}]
|
|
1139
|
+
}] });
|
|
1140
|
+
|
|
1141
|
+
/**
|
|
1142
|
+
* TemplatePipe: Replaces `{key}` placeholders in a string with values from an object.
|
|
1143
|
+
*
|
|
1144
|
+
* Supports dot notation for nested keys. Missing keys are left as-is.
|
|
1145
|
+
*
|
|
1146
|
+
* @param {string} value - The template string containing placeholders like `{name}`.
|
|
1147
|
+
* @param {Record<string, unknown>} [values={}] - Map of keys to replacement values.
|
|
1148
|
+
*
|
|
1149
|
+
* @returns {string} - The interpolated string, or empty string if input is invalid.
|
|
1150
|
+
*
|
|
1151
|
+
* @example
|
|
1152
|
+
* {{ 'Hello {name}!' | template:{name:'Alice'} }} // 'Hello Alice!'
|
|
1153
|
+
* {{ '{user.name} is {user.age}' | template:{user:{name:'Bob',age:30}} }} // 'Bob is 30'
|
|
1154
|
+
* {{ 'Hi {missing}!' | template:{name:'Alice'} }} // 'Hi {missing}!'
|
|
1155
|
+
*/
|
|
1156
|
+
class TemplatePipe {
|
|
1157
|
+
transform(value, values = {}) {
|
|
1158
|
+
if (typeof value !== 'string')
|
|
1159
|
+
return '';
|
|
1160
|
+
if (!values || typeof values !== 'object')
|
|
1161
|
+
return value;
|
|
1162
|
+
return value.replace(/\{([\w.]+)\}/g, (match, key) => {
|
|
1163
|
+
const resolved = this.getNestedValue(values, key);
|
|
1164
|
+
return resolved === undefined || resolved === null ? match : String(resolved);
|
|
1165
|
+
});
|
|
1166
|
+
}
|
|
1167
|
+
getNestedValue(obj, path) {
|
|
1168
|
+
return path.split('.').reduce((current, segment) => current?.[segment], obj);
|
|
1169
|
+
}
|
|
1170
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: TemplatePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
1171
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: TemplatePipe, isStandalone: true, name: "template" });
|
|
1172
|
+
}
|
|
1173
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: TemplatePipe, decorators: [{
|
|
1174
|
+
type: Pipe,
|
|
1175
|
+
args: [{
|
|
1176
|
+
name: 'template',
|
|
1177
|
+
standalone: true,
|
|
1178
|
+
}]
|
|
1179
|
+
}] });
|
|
1180
|
+
|
|
1181
|
+
/**
|
|
1182
|
+
* LatinizePipe: Strips diacritics (accents) from a string while preserving
|
|
1183
|
+
* casing, spaces, and punctuation.
|
|
1184
|
+
*
|
|
1185
|
+
* Uses Unicode NFD normalization to split combining marks from base letters,
|
|
1186
|
+
* then removes the combining mark range (U+0300–U+036F). Unlike `slugify`,
|
|
1187
|
+
* this pipe leaves the string structure intact — it only removes accents.
|
|
1188
|
+
*
|
|
1189
|
+
* @param {string} value - The string to latinize.
|
|
1190
|
+
*
|
|
1191
|
+
* @returns {string} - The latinized string, or empty string if input is invalid.
|
|
1192
|
+
*
|
|
1193
|
+
* @example
|
|
1194
|
+
* {{ 'Café' | latinize }} // 'Cafe'
|
|
1195
|
+
* {{ 'naïve résumé' | latinize }} // 'naive resume'
|
|
1196
|
+
* {{ 'Crème Brûlée' | latinize }} // 'Creme Brulee'
|
|
1197
|
+
*/
|
|
1198
|
+
class LatinizePipe {
|
|
1199
|
+
transform(value) {
|
|
1200
|
+
if (typeof value !== 'string')
|
|
1201
|
+
return '';
|
|
1202
|
+
return value.normalize('NFD').replace(/[̀-ͯ]/g, '');
|
|
1203
|
+
}
|
|
1204
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: LatinizePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
1205
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: LatinizePipe, isStandalone: true, name: "latinize" });
|
|
1206
|
+
}
|
|
1207
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: LatinizePipe, decorators: [{
|
|
1208
|
+
type: Pipe,
|
|
1209
|
+
args: [{
|
|
1210
|
+
name: 'latinize',
|
|
1211
|
+
standalone: true,
|
|
1212
|
+
}]
|
|
1213
|
+
}] });
|
|
1214
|
+
|
|
1215
|
+
/**
|
|
1216
|
+
* WrapPipe: Surrounds a string with a prefix and optional suffix.
|
|
1217
|
+
*
|
|
1218
|
+
* When no suffix is provided, the prefix is used on both sides.
|
|
1219
|
+
*
|
|
1220
|
+
* @param {string} value - The string to wrap.
|
|
1221
|
+
* @param {string} [prefix=''] - Text to place before the value.
|
|
1222
|
+
* @param {string} [suffix] - Text to place after the value (defaults to prefix).
|
|
1223
|
+
*
|
|
1224
|
+
* @returns {string} - The wrapped string, or empty string if input is invalid.
|
|
1225
|
+
*
|
|
1226
|
+
* @example
|
|
1227
|
+
* {{ 'value' | wrap:'[':']' }} // '[value]'
|
|
1228
|
+
* {{ 'bold' | wrap:'**' }} // '**bold**'
|
|
1229
|
+
* {{ 'tag' | wrap:'<':'>' }} // '<tag>'
|
|
1230
|
+
*/
|
|
1231
|
+
class WrapPipe {
|
|
1232
|
+
transform(value, prefix = '', suffix) {
|
|
1233
|
+
if (typeof value !== 'string')
|
|
1234
|
+
return '';
|
|
1235
|
+
const pfx = typeof prefix === 'string' ? prefix : '';
|
|
1236
|
+
const sfx = suffix === undefined
|
|
1237
|
+
? pfx
|
|
1238
|
+
: (typeof suffix === 'string' ? suffix : '');
|
|
1239
|
+
return `${pfx}${value}${sfx}`;
|
|
1240
|
+
}
|
|
1241
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: WrapPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
1242
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: WrapPipe, isStandalone: true, name: "wrap" });
|
|
1243
|
+
}
|
|
1244
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: WrapPipe, decorators: [{
|
|
1245
|
+
type: Pipe,
|
|
1246
|
+
args: [{
|
|
1247
|
+
name: 'wrap',
|
|
1248
|
+
standalone: true,
|
|
1249
|
+
}]
|
|
1250
|
+
}] });
|
|
1251
|
+
|
|
1252
|
+
/**
|
|
1253
|
+
* KeysPipe: Returns the own enumerable property names of an object as an array.
|
|
1254
|
+
*
|
|
1255
|
+
* Wraps `Object.keys`. Works on plain objects and arrays. Returns an empty array
|
|
1256
|
+
* for null, undefined, or primitive inputs.
|
|
1257
|
+
*
|
|
1258
|
+
* @param {unknown} value - The object whose keys to extract.
|
|
1259
|
+
*
|
|
1260
|
+
* @returns {string[]} - Array of property names, or an empty array if invalid input.
|
|
1261
|
+
*
|
|
1262
|
+
* @example
|
|
1263
|
+
* {{ { a: 1, b: 2, c: 3 } | keys }} // ['a', 'b', 'c']
|
|
1264
|
+
* {{ user | keys }} // ['name', 'age', 'email']
|
|
1265
|
+
* @for (key of obj | keys; track key) { ... }
|
|
1266
|
+
*/
|
|
1267
|
+
class KeysPipe {
|
|
1268
|
+
transform(value) {
|
|
1269
|
+
if (value === null || value === undefined)
|
|
1270
|
+
return [];
|
|
1271
|
+
if (typeof value !== 'object')
|
|
1272
|
+
return [];
|
|
1273
|
+
return Object.keys(value);
|
|
1274
|
+
}
|
|
1275
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: KeysPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
1276
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: KeysPipe, isStandalone: true, name: "keys" });
|
|
1277
|
+
}
|
|
1278
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: KeysPipe, decorators: [{
|
|
1279
|
+
type: Pipe,
|
|
1280
|
+
args: [{
|
|
1281
|
+
name: 'keys',
|
|
1282
|
+
standalone: true,
|
|
1283
|
+
}]
|
|
1284
|
+
}] });
|
|
1285
|
+
|
|
1286
|
+
/**
|
|
1287
|
+
* ValuesPipe: Returns the own enumerable property values of an object as an array.
|
|
1288
|
+
*
|
|
1289
|
+
* Wraps `Object.values`. Works on plain objects and arrays. Returns an empty array
|
|
1290
|
+
* for null, undefined, or primitive inputs.
|
|
1291
|
+
*
|
|
1292
|
+
* @param {unknown} value - The object whose values to extract.
|
|
1293
|
+
*
|
|
1294
|
+
* @returns {unknown[]} - Array of property values, or an empty array if invalid input.
|
|
1295
|
+
*
|
|
1296
|
+
* @example
|
|
1297
|
+
* {{ { a: 1, b: 2, c: 3 } | values }} // [1, 2, 3]
|
|
1298
|
+
* {{ user | values }} // ['Alice', 30, 'a@b.com']
|
|
1299
|
+
* @for (val of obj | values; track $index) { ... }
|
|
1300
|
+
*/
|
|
1301
|
+
class ValuesPipe {
|
|
1302
|
+
transform(value) {
|
|
1303
|
+
if (value === null || value === undefined)
|
|
1304
|
+
return [];
|
|
1305
|
+
if (typeof value !== 'object')
|
|
1306
|
+
return [];
|
|
1307
|
+
return Object.values(value);
|
|
1308
|
+
}
|
|
1309
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: ValuesPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
1310
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: ValuesPipe, isStandalone: true, name: "values" });
|
|
1311
|
+
}
|
|
1312
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: ValuesPipe, decorators: [{
|
|
1313
|
+
type: Pipe,
|
|
1314
|
+
args: [{
|
|
1315
|
+
name: 'values',
|
|
1316
|
+
standalone: true,
|
|
1317
|
+
}]
|
|
1318
|
+
}] });
|
|
1319
|
+
|
|
1320
|
+
/**
|
|
1321
|
+
* PairsPipe: Returns the own enumerable properties of an object as an array of
|
|
1322
|
+
* [key, value] tuples.
|
|
1323
|
+
*
|
|
1324
|
+
* Wraps `Object.entries`. Works on plain objects and arrays. Returns an empty
|
|
1325
|
+
* array for null, undefined, or primitive inputs.
|
|
1326
|
+
*
|
|
1327
|
+
* @param {unknown} value - The object to convert into key/value pairs.
|
|
1328
|
+
*
|
|
1329
|
+
* @returns {[string, unknown][]} - Array of [key, value] tuples, or empty array.
|
|
1330
|
+
*
|
|
1331
|
+
* @example
|
|
1332
|
+
* {{ { a: 1, b: 2 } | pairs }} // [['a', 1], ['b', 2]]
|
|
1333
|
+
* @for (entry of user | pairs; track entry[0]) {
|
|
1334
|
+
* <li>{{ entry[0] }}: {{ entry[1] }}</li>
|
|
1335
|
+
* }
|
|
1336
|
+
*/
|
|
1337
|
+
class PairsPipe {
|
|
1338
|
+
transform(value) {
|
|
1339
|
+
if (value === null || value === undefined)
|
|
1340
|
+
return [];
|
|
1341
|
+
if (typeof value !== 'object')
|
|
1342
|
+
return [];
|
|
1343
|
+
return Object.entries(value);
|
|
1344
|
+
}
|
|
1345
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: PairsPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
1346
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: PairsPipe, isStandalone: true, name: "pairs" });
|
|
1347
|
+
}
|
|
1348
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: PairsPipe, decorators: [{
|
|
1349
|
+
type: Pipe,
|
|
1350
|
+
args: [{
|
|
1351
|
+
name: 'pairs',
|
|
1352
|
+
standalone: true,
|
|
1353
|
+
}]
|
|
1354
|
+
}] });
|
|
1355
|
+
|
|
1356
|
+
/**
|
|
1357
|
+
* PickPipe: Returns a new object containing only the specified keys.
|
|
1358
|
+
*
|
|
1359
|
+
* Non-existent keys are skipped silently. Returns an empty object for null,
|
|
1360
|
+
* undefined, or primitive inputs. Does not mutate the input.
|
|
1361
|
+
*
|
|
1362
|
+
* @param {unknown} value - The source object.
|
|
1363
|
+
* @param {string[] | string} keys - Key (or array of keys) to keep.
|
|
1364
|
+
*
|
|
1365
|
+
* @returns {Record<string, unknown>} - A new object with only the picked keys.
|
|
1366
|
+
*
|
|
1367
|
+
* @example
|
|
1368
|
+
* {{ user | pick:['name', 'email'] }} // { name: 'Alice', email: 'a@b.com' }
|
|
1369
|
+
* {{ obj | pick:'id' }} // { id: 42 }
|
|
1370
|
+
*/
|
|
1371
|
+
class PickPipe {
|
|
1372
|
+
transform(value, keys) {
|
|
1373
|
+
if (value === null || value === undefined)
|
|
1374
|
+
return {};
|
|
1375
|
+
if (typeof value !== 'object')
|
|
1376
|
+
return {};
|
|
1377
|
+
const list = Array.isArray(keys) ? keys : (typeof keys === 'string' ? [keys] : []);
|
|
1378
|
+
if (list.length === 0)
|
|
1379
|
+
return {};
|
|
1380
|
+
const source = value;
|
|
1381
|
+
const result = {};
|
|
1382
|
+
for (const key of list) {
|
|
1383
|
+
if (typeof key !== 'string')
|
|
1384
|
+
continue;
|
|
1385
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
1386
|
+
result[key] = source[key];
|
|
1387
|
+
}
|
|
1388
|
+
}
|
|
1389
|
+
return result;
|
|
1390
|
+
}
|
|
1391
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: PickPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
1392
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: PickPipe, isStandalone: true, name: "pick" });
|
|
1393
|
+
}
|
|
1394
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: PickPipe, decorators: [{
|
|
1395
|
+
type: Pipe,
|
|
1396
|
+
args: [{
|
|
1397
|
+
name: 'pick',
|
|
1398
|
+
standalone: true,
|
|
1399
|
+
}]
|
|
1400
|
+
}] });
|
|
1401
|
+
|
|
1402
|
+
/**
|
|
1403
|
+
* OmitPipe: Returns a new object with the specified keys removed.
|
|
1404
|
+
*
|
|
1405
|
+
* Keys that don't exist on the source are ignored. Returns an empty object
|
|
1406
|
+
* for null, undefined, or primitive inputs. Does not mutate the input.
|
|
1407
|
+
*
|
|
1408
|
+
* @param {unknown} value - The source object.
|
|
1409
|
+
* @param {string[] | string} keys - Key (or array of keys) to remove.
|
|
1410
|
+
*
|
|
1411
|
+
* @returns {Record<string, unknown>} - A new object without the omitted keys.
|
|
1412
|
+
*
|
|
1413
|
+
* @example
|
|
1414
|
+
* {{ user | omit:['password'] }} // user without password
|
|
1415
|
+
* {{ obj | omit:['internal', '_id'] }} // public-safe view
|
|
1416
|
+
*/
|
|
1417
|
+
class OmitPipe {
|
|
1418
|
+
transform(value, keys) {
|
|
1419
|
+
if (value === null || value === undefined)
|
|
1420
|
+
return {};
|
|
1421
|
+
if (typeof value !== 'object')
|
|
1422
|
+
return {};
|
|
1423
|
+
const list = Array.isArray(keys) ? keys : (typeof keys === 'string' ? [keys] : []);
|
|
1424
|
+
const exclude = new Set(list.filter((k) => typeof k === 'string'));
|
|
1425
|
+
const source = value;
|
|
1426
|
+
const result = {};
|
|
1427
|
+
for (const key of Object.keys(source)) {
|
|
1428
|
+
if (!exclude.has(key)) {
|
|
1429
|
+
result[key] = source[key];
|
|
1430
|
+
}
|
|
1431
|
+
}
|
|
1432
|
+
return result;
|
|
1433
|
+
}
|
|
1434
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: OmitPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
1435
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: OmitPipe, isStandalone: true, name: "omit" });
|
|
1436
|
+
}
|
|
1437
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: OmitPipe, decorators: [{
|
|
1438
|
+
type: Pipe,
|
|
1439
|
+
args: [{
|
|
1440
|
+
name: 'omit',
|
|
1441
|
+
standalone: true,
|
|
1442
|
+
}]
|
|
1443
|
+
}] });
|
|
1444
|
+
|
|
1445
|
+
/**
|
|
1446
|
+
* InvertPipe: Returns a new object with keys and values swapped.
|
|
1447
|
+
*
|
|
1448
|
+
* Values are coerced to strings to become valid keys. When two source keys
|
|
1449
|
+
* share a value, the **last one wins** (use `invertBy` if you need to keep
|
|
1450
|
+
* every collision as an array). Returns an empty object for null, undefined,
|
|
1451
|
+
* or primitive inputs. Does not mutate the input.
|
|
1452
|
+
*
|
|
1453
|
+
* @param {unknown} value - The source object.
|
|
1454
|
+
*
|
|
1455
|
+
* @returns {Record<string, string>} - A new object with keys/values swapped.
|
|
1456
|
+
*
|
|
1457
|
+
* @example
|
|
1458
|
+
* {{ { a: 1, b: 2 } | invert }} // { '1': 'a', '2': 'b' }
|
|
1459
|
+
* {{ { en: 'hello', fr: 'bonjour' } | invert }} // { hello: 'en', bonjour: 'fr' }
|
|
1460
|
+
* {{ { a: 1, b: 1 } | invert }} // { '1': 'b' } (last wins)
|
|
1461
|
+
*/
|
|
1462
|
+
class InvertPipe {
|
|
1463
|
+
transform(value) {
|
|
1464
|
+
if (value === null || value === undefined)
|
|
1465
|
+
return {};
|
|
1466
|
+
if (typeof value !== 'object')
|
|
1467
|
+
return {};
|
|
1468
|
+
const source = value;
|
|
1469
|
+
const result = {};
|
|
1470
|
+
for (const key of Object.keys(source)) {
|
|
1471
|
+
const v = source[key];
|
|
1472
|
+
if (v === undefined)
|
|
1473
|
+
continue;
|
|
1474
|
+
result[String(v)] = key;
|
|
1475
|
+
}
|
|
1476
|
+
return result;
|
|
1477
|
+
}
|
|
1478
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: InvertPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
1479
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: InvertPipe, isStandalone: true, name: "invert" });
|
|
1480
|
+
}
|
|
1481
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: InvertPipe, decorators: [{
|
|
1482
|
+
type: Pipe,
|
|
1483
|
+
args: [{
|
|
1484
|
+
name: 'invert',
|
|
1485
|
+
standalone: true,
|
|
1486
|
+
}]
|
|
1487
|
+
}] });
|
|
1488
|
+
|
|
1489
|
+
/**
|
|
1490
|
+
* InvertByPipe: Returns a new object with values as keys, grouping the original
|
|
1491
|
+
* keys for each value into an array.
|
|
1492
|
+
*
|
|
1493
|
+
* Unlike `invert`, no data is lost when multiple source keys share a value —
|
|
1494
|
+
* they're collected into an array under the shared key.
|
|
1495
|
+
*
|
|
1496
|
+
* @param {unknown} value - The source object.
|
|
1497
|
+
*
|
|
1498
|
+
* @returns {Record<string, string[]>} - A new object with values-as-keys
|
|
1499
|
+
* pointing at arrays of the original keys.
|
|
1500
|
+
*
|
|
1501
|
+
* @example
|
|
1502
|
+
* {{ { a: 1, b: 2, c: 1 } | invertBy }} // { '1': ['a', 'c'], '2': ['b'] }
|
|
1503
|
+
* {{ { alice: 'admin', bob: 'user', carol: 'admin' } | invertBy }}
|
|
1504
|
+
* // { admin: ['alice', 'carol'], user: ['bob'] }
|
|
1505
|
+
*/
|
|
1506
|
+
class InvertByPipe {
|
|
1507
|
+
transform(value) {
|
|
1508
|
+
if (value === null || value === undefined)
|
|
1509
|
+
return {};
|
|
1510
|
+
if (typeof value !== 'object')
|
|
1511
|
+
return {};
|
|
1512
|
+
const source = value;
|
|
1513
|
+
const result = {};
|
|
1514
|
+
for (const key of Object.keys(source)) {
|
|
1515
|
+
const v = source[key];
|
|
1516
|
+
if (v === undefined)
|
|
1517
|
+
continue;
|
|
1518
|
+
const stringKey = String(v);
|
|
1519
|
+
if (!result[stringKey])
|
|
1520
|
+
result[stringKey] = [];
|
|
1521
|
+
result[stringKey].push(key);
|
|
1522
|
+
}
|
|
1523
|
+
return result;
|
|
1524
|
+
}
|
|
1525
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: InvertByPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
1526
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: InvertByPipe, isStandalone: true, name: "invertBy" });
|
|
1527
|
+
}
|
|
1528
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: InvertByPipe, decorators: [{
|
|
1529
|
+
type: Pipe,
|
|
1530
|
+
args: [{
|
|
1531
|
+
name: 'invertBy',
|
|
1532
|
+
standalone: true,
|
|
1533
|
+
}]
|
|
1534
|
+
}] });
|
|
1535
|
+
|
|
1536
|
+
/**
|
|
1537
|
+
* DiffObjPipe: Returns the slice of `value` whose properties differ from `compareTo`.
|
|
1538
|
+
*
|
|
1539
|
+
* For each key in `value`, the entry is included in the result when:
|
|
1540
|
+
* - The key is missing from `compareTo`, or
|
|
1541
|
+
* - `value[key]` is not strictly equal (`!==`) to `compareTo[key]`.
|
|
1542
|
+
*
|
|
1543
|
+
* Comparison is shallow — nested objects/arrays are compared by reference.
|
|
1544
|
+
*
|
|
1545
|
+
* @param {unknown} value - The source object.
|
|
1546
|
+
* @param {unknown} compareTo - The object to compare against.
|
|
1547
|
+
*
|
|
1548
|
+
* @returns {Record<string, unknown>} - A new object containing the differing entries.
|
|
1549
|
+
*
|
|
1550
|
+
* @example
|
|
1551
|
+
* {{ { a: 1, b: 2 } | diffObj:{ a: 1, b: 99 } }} // { b: 2 }
|
|
1552
|
+
* {{ { a: 1, b: 2, c: 3 } | diffObj:{ a: 1 } }} // { b: 2, c: 3 }
|
|
1553
|
+
* {{ { a: 1 } | diffObj:{ a: 1 } }} // {} (no differences)
|
|
1554
|
+
*/
|
|
1555
|
+
class DiffObjPipe {
|
|
1556
|
+
transform(value, compareTo) {
|
|
1557
|
+
if (value === null || value === undefined)
|
|
1558
|
+
return {};
|
|
1559
|
+
if (typeof value !== 'object')
|
|
1560
|
+
return {};
|
|
1561
|
+
const source = value;
|
|
1562
|
+
if (compareTo === null || compareTo === undefined || typeof compareTo !== 'object') {
|
|
1563
|
+
return { ...source };
|
|
1564
|
+
}
|
|
1565
|
+
const target = compareTo;
|
|
1566
|
+
const result = {};
|
|
1567
|
+
for (const key of Object.keys(source)) {
|
|
1568
|
+
if (!Object.prototype.hasOwnProperty.call(target, key) || source[key] !== target[key]) {
|
|
1569
|
+
result[key] = source[key];
|
|
1570
|
+
}
|
|
1571
|
+
}
|
|
1572
|
+
return result;
|
|
1573
|
+
}
|
|
1574
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DiffObjPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
1575
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: DiffObjPipe, isStandalone: true, name: "diffObj" });
|
|
1576
|
+
}
|
|
1577
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DiffObjPipe, decorators: [{
|
|
1578
|
+
type: Pipe,
|
|
1579
|
+
args: [{
|
|
1580
|
+
name: 'diffObj',
|
|
1581
|
+
standalone: true,
|
|
1582
|
+
}]
|
|
1583
|
+
}] });
|
|
1584
|
+
|
|
1585
|
+
/**
|
|
1586
|
+
* IsDefinedPipe: Returns `true` when the value is neither `null` nor `undefined`.
|
|
1587
|
+
*
|
|
1588
|
+
* Useful for guarding optional bindings in templates without resorting to
|
|
1589
|
+
* verbose `value !== null && value !== undefined` checks. Empty strings,
|
|
1590
|
+
* `0`, and `false` are all considered defined.
|
|
1591
|
+
*
|
|
1592
|
+
* @param {unknown} value - The value to test.
|
|
1593
|
+
*
|
|
1594
|
+
* @returns {boolean} - `true` if defined, `false` if null/undefined.
|
|
1595
|
+
*
|
|
1596
|
+
* @example
|
|
1597
|
+
* {{ user | isDefined }} // true when user is set
|
|
1598
|
+
* {{ 0 | isDefined }} // true
|
|
1599
|
+
* {{ '' | isDefined }} // true
|
|
1600
|
+
* {{ null | isDefined }} // false
|
|
1601
|
+
* {{ undefined | isDefined }} // false
|
|
1602
|
+
*/
|
|
1603
|
+
class IsDefinedPipe {
|
|
1604
|
+
transform(value) {
|
|
1605
|
+
return value !== null && value !== undefined;
|
|
1606
|
+
}
|
|
1607
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: IsDefinedPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
1608
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: IsDefinedPipe, isStandalone: true, name: "isDefined" });
|
|
1609
|
+
}
|
|
1610
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: IsDefinedPipe, decorators: [{
|
|
1611
|
+
type: Pipe,
|
|
1612
|
+
args: [{
|
|
1613
|
+
name: 'isDefined',
|
|
1614
|
+
standalone: true,
|
|
1615
|
+
}]
|
|
1616
|
+
}] });
|
|
1617
|
+
|
|
1618
|
+
/**
|
|
1619
|
+
* IsNullPipe: Returns `true` only when the value is exactly `null`.
|
|
1620
|
+
*
|
|
1621
|
+
* Strict check — `undefined` returns `false`. Use `isDefined` (with `!`) if
|
|
1622
|
+
* you want to catch both null and undefined together.
|
|
1623
|
+
*
|
|
1624
|
+
* @param {unknown} value - The value to test.
|
|
1625
|
+
*
|
|
1626
|
+
* @returns {boolean} - `true` if the value is null, `false` otherwise.
|
|
1627
|
+
*
|
|
1628
|
+
* @example
|
|
1629
|
+
* {{ null | isNull }} // true
|
|
1630
|
+
* {{ undefined | isNull }} // false
|
|
1631
|
+
* {{ 0 | isNull }} // false
|
|
1632
|
+
* {{ '' | isNull }} // false
|
|
1633
|
+
*/
|
|
1634
|
+
class IsNullPipe {
|
|
1635
|
+
transform(value) {
|
|
1636
|
+
return value === null;
|
|
1637
|
+
}
|
|
1638
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: IsNullPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
1639
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: IsNullPipe, isStandalone: true, name: "isNull" });
|
|
1640
|
+
}
|
|
1641
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: IsNullPipe, decorators: [{
|
|
1642
|
+
type: Pipe,
|
|
1643
|
+
args: [{
|
|
1644
|
+
name: 'isNull',
|
|
1645
|
+
standalone: true,
|
|
1646
|
+
}]
|
|
1647
|
+
}] });
|
|
1648
|
+
|
|
1649
|
+
/**
|
|
1650
|
+
* IsStringPipe: Returns `true` when the value is a primitive string.
|
|
1651
|
+
*
|
|
1652
|
+
* Uses `typeof value === 'string'` — boxed `String` objects (rare) are not
|
|
1653
|
+
* matched. Useful for polymorphic templates that render values from JSON,
|
|
1654
|
+
* dynamic forms, or `unknown`-typed data.
|
|
1655
|
+
*
|
|
1656
|
+
* @param {unknown} value - The value to test.
|
|
1657
|
+
*
|
|
1658
|
+
* @returns {boolean} - `true` if the value is a string primitive, `false` otherwise.
|
|
1659
|
+
*
|
|
1660
|
+
* @example
|
|
1661
|
+
* {{ 'hello' | isString }} // true
|
|
1662
|
+
* {{ '' | isString }} // true
|
|
1663
|
+
* {{ 42 | isString }} // false
|
|
1664
|
+
* {{ null | isString }} // false
|
|
1665
|
+
*/
|
|
1666
|
+
class IsStringPipe {
|
|
1667
|
+
transform(value) {
|
|
1668
|
+
return typeof value === 'string';
|
|
1669
|
+
}
|
|
1670
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: IsStringPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
1671
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: IsStringPipe, isStandalone: true, name: "isString" });
|
|
1672
|
+
}
|
|
1673
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: IsStringPipe, decorators: [{
|
|
1674
|
+
type: Pipe,
|
|
1675
|
+
args: [{
|
|
1676
|
+
name: 'isString',
|
|
1677
|
+
standalone: true,
|
|
1678
|
+
}]
|
|
1679
|
+
}] });
|
|
1680
|
+
|
|
1681
|
+
/**
|
|
1682
|
+
* IsNumberPipe: Returns `true` when the value is a primitive number.
|
|
1683
|
+
*
|
|
1684
|
+
* Uses `typeof value === 'number'`. By design `NaN` returns `true` because
|
|
1685
|
+
* its type is `number` — if you need a finite-only check, follow up with
|
|
1686
|
+
* `Number.isFinite`. Numeric strings (e.g. `'42'`) return `false`.
|
|
1687
|
+
*
|
|
1688
|
+
* @param {unknown} value - The value to test.
|
|
1689
|
+
*
|
|
1690
|
+
* @returns {boolean} - `true` if the value is a number primitive, `false` otherwise.
|
|
1691
|
+
*
|
|
1692
|
+
* @example
|
|
1693
|
+
* {{ 42 | isNumber }} // true
|
|
1694
|
+
* {{ 0 | isNumber }} // true
|
|
1695
|
+
* {{ NaN | isNumber }} // true
|
|
1696
|
+
* {{ '42' | isNumber }} // false
|
|
1697
|
+
* {{ null | isNumber }} // false
|
|
1698
|
+
*/
|
|
1699
|
+
class IsNumberPipe {
|
|
1700
|
+
transform(value) {
|
|
1701
|
+
return typeof value === 'number';
|
|
1702
|
+
}
|
|
1703
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: IsNumberPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
1704
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: IsNumberPipe, isStandalone: true, name: "isNumber" });
|
|
1705
|
+
}
|
|
1706
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: IsNumberPipe, decorators: [{
|
|
1707
|
+
type: Pipe,
|
|
1708
|
+
args: [{
|
|
1709
|
+
name: 'isNumber',
|
|
1710
|
+
standalone: true,
|
|
1711
|
+
}]
|
|
1712
|
+
}] });
|
|
1713
|
+
|
|
1714
|
+
/**
|
|
1715
|
+
* IsArrayPipe: Returns `true` when the value is an Array.
|
|
1716
|
+
*
|
|
1717
|
+
* Backed by `Array.isArray`, so array-likes (NodeList, HTMLCollection,
|
|
1718
|
+
* arguments, typed arrays) all return `false`. Use it to discriminate between
|
|
1719
|
+
* structural and scalar inputs in polymorphic templates.
|
|
1720
|
+
*
|
|
1721
|
+
* @param {unknown} value - The value to test.
|
|
1722
|
+
*
|
|
1723
|
+
* @returns {boolean} - `true` if the value is an array, `false` otherwise.
|
|
1724
|
+
*
|
|
1725
|
+
* @example
|
|
1726
|
+
* {{ [1, 2, 3] | isArray }} // true
|
|
1727
|
+
* {{ [] | isArray }} // true
|
|
1728
|
+
* {{ 'abc' | isArray }} // false
|
|
1729
|
+
* {{ { length: 0 } | isArray }} // false
|
|
1730
|
+
*/
|
|
1731
|
+
class IsArrayPipe {
|
|
1732
|
+
transform(value) {
|
|
1733
|
+
return Array.isArray(value);
|
|
1734
|
+
}
|
|
1735
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: IsArrayPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
1736
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: IsArrayPipe, isStandalone: true, name: "isArray" });
|
|
1737
|
+
}
|
|
1738
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: IsArrayPipe, decorators: [{
|
|
1739
|
+
type: Pipe,
|
|
1740
|
+
args: [{
|
|
1741
|
+
name: 'isArray',
|
|
1742
|
+
standalone: true,
|
|
1743
|
+
}]
|
|
1744
|
+
}] });
|
|
1745
|
+
|
|
1746
|
+
/**
|
|
1747
|
+
* IsObjectPipe: Returns `true` when the value is a non-null object that is
|
|
1748
|
+
* not an array.
|
|
1749
|
+
*
|
|
1750
|
+
* Lenient — class instances, Date, Map, Set, and RegExp all return `true`
|
|
1751
|
+
* because their JS type is "object". Only `null` and arrays are excluded.
|
|
1752
|
+
* Pair with `isArray` to discriminate between the two structural shapes.
|
|
1753
|
+
*
|
|
1754
|
+
* @param {unknown} value - The value to test.
|
|
1755
|
+
*
|
|
1756
|
+
* @returns {boolean} - `true` if the value is a non-null, non-array object.
|
|
1757
|
+
*
|
|
1758
|
+
* @example
|
|
1759
|
+
* {{ { a: 1 } | isObject }} // true
|
|
1760
|
+
* {{ {} | isObject }} // true
|
|
1761
|
+
* {{ [1, 2] | isObject }} // false
|
|
1762
|
+
* {{ null | isObject }} // false
|
|
1763
|
+
* {{ 'abc' | isObject }} // false
|
|
1764
|
+
*/
|
|
1765
|
+
class IsObjectPipe {
|
|
1766
|
+
transform(value) {
|
|
1767
|
+
return value !== null && typeof value === 'object' && !Array.isArray(value);
|
|
1768
|
+
}
|
|
1769
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: IsObjectPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
1770
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: IsObjectPipe, isStandalone: true, name: "isObject" });
|
|
1771
|
+
}
|
|
1772
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: IsObjectPipe, decorators: [{
|
|
1773
|
+
type: Pipe,
|
|
1774
|
+
args: [{
|
|
1775
|
+
name: 'isObject',
|
|
1776
|
+
standalone: true,
|
|
1777
|
+
}]
|
|
1778
|
+
}] });
|
|
1779
|
+
|
|
1780
|
+
/**
|
|
1781
|
+
* IsFunctionPipe: Returns `true` when the value is callable.
|
|
1782
|
+
*
|
|
1783
|
+
* Backed by `typeof value === 'function'`, so arrow functions, regular
|
|
1784
|
+
* functions, async functions, generator functions, and class constructors
|
|
1785
|
+
* all return `true`. Methods and bound functions count too.
|
|
1786
|
+
*
|
|
1787
|
+
* @param {unknown} value - The value to test.
|
|
1788
|
+
*
|
|
1789
|
+
* @returns {boolean} - `true` if the value is a function, `false` otherwise.
|
|
1790
|
+
*
|
|
1791
|
+
* @example
|
|
1792
|
+
* {{ (() => 0) | isFunction }} // true
|
|
1793
|
+
* {{ Math.max | isFunction }} // true
|
|
1794
|
+
* {{ class {} | isFunction }} // true
|
|
1795
|
+
* {{ 'fn' | isFunction }} // false
|
|
1796
|
+
*/
|
|
1797
|
+
class IsFunctionPipe {
|
|
1798
|
+
transform(value) {
|
|
1799
|
+
return typeof value === 'function';
|
|
1800
|
+
}
|
|
1801
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: IsFunctionPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
1802
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: IsFunctionPipe, isStandalone: true, name: "isFunction" });
|
|
1803
|
+
}
|
|
1804
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: IsFunctionPipe, decorators: [{
|
|
1805
|
+
type: Pipe,
|
|
1806
|
+
args: [{
|
|
1807
|
+
name: 'isFunction',
|
|
1808
|
+
standalone: true,
|
|
1809
|
+
}]
|
|
1810
|
+
}] });
|
|
1811
|
+
|
|
1812
|
+
/**
|
|
1813
|
+
* IsEmptyPipe: Returns `true` when the value has nothing in it.
|
|
1814
|
+
*
|
|
1815
|
+
* - `null` / `undefined` → `true`
|
|
1816
|
+
* - `''` (empty string) → `true`
|
|
1817
|
+
* - `[]` (empty array) → `true`
|
|
1818
|
+
* - `{}` (no own enumerable keys) → `true`
|
|
1819
|
+
* - empty `Map` / `Set` → `true`
|
|
1820
|
+
* - everything else (numbers, booleans, dates, functions, non-empty containers) → `false`
|
|
1821
|
+
*
|
|
1822
|
+
* Whitespace strings count as non-empty — chain `trim` first if you want a
|
|
1823
|
+
* "blank" check.
|
|
1824
|
+
*
|
|
1825
|
+
* @param {unknown} value - The value to test.
|
|
1826
|
+
*
|
|
1827
|
+
* @returns {boolean} - `true` if the value is considered empty.
|
|
1828
|
+
*
|
|
1829
|
+
* @example
|
|
1830
|
+
* {{ '' | isEmpty }} // true
|
|
1831
|
+
* {{ [] | isEmpty }} // true
|
|
1832
|
+
* {{ {} | isEmpty }} // true
|
|
1833
|
+
* {{ null | isEmpty }} // true
|
|
1834
|
+
* {{ ' ' | isEmpty }} // false (use trim first)
|
|
1835
|
+
* {{ 0 | isEmpty }} // false
|
|
1836
|
+
*/
|
|
1837
|
+
class IsEmptyPipe {
|
|
1838
|
+
transform(value) {
|
|
1839
|
+
if (value === null || value === undefined)
|
|
1840
|
+
return true;
|
|
1841
|
+
if (typeof value === 'string' || Array.isArray(value))
|
|
1842
|
+
return value.length === 0;
|
|
1843
|
+
if (value instanceof Map || value instanceof Set)
|
|
1844
|
+
return value.size === 0;
|
|
1845
|
+
if (typeof value === 'object') {
|
|
1846
|
+
// Only plain objects are "empty when no keys".
|
|
1847
|
+
// Built-in types (Date, RegExp) and class instances carry meaning.
|
|
1848
|
+
const proto = Object.getPrototypeOf(value);
|
|
1849
|
+
if (proto === Object.prototype || proto === null) {
|
|
1850
|
+
return Object.keys(value).length === 0;
|
|
1851
|
+
}
|
|
1852
|
+
return false;
|
|
1853
|
+
}
|
|
1854
|
+
return false;
|
|
1855
|
+
}
|
|
1856
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: IsEmptyPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
1857
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: IsEmptyPipe, isStandalone: true, name: "isEmpty" });
|
|
1858
|
+
}
|
|
1859
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: IsEmptyPipe, decorators: [{
|
|
1860
|
+
type: Pipe,
|
|
1861
|
+
args: [{
|
|
1862
|
+
name: 'isEmpty',
|
|
1863
|
+
standalone: true,
|
|
1864
|
+
}]
|
|
1865
|
+
}] });
|
|
1866
|
+
|
|
476
1867
|
/**
|
|
477
1868
|
* CreditCardMaskPipe: Masks all but the last four digits of a string, optionally controlled by a boolean flag.
|
|
478
1869
|
* By default, masking is applied.
|
|
@@ -505,10 +1896,10 @@ class CreditCardMaskPipe {
|
|
|
505
1896
|
}
|
|
506
1897
|
return value;
|
|
507
1898
|
}
|
|
508
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
509
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.
|
|
1899
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: CreditCardMaskPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
1900
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: CreditCardMaskPipe, isStandalone: true, name: "creditCardMask" });
|
|
510
1901
|
}
|
|
511
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
1902
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: CreditCardMaskPipe, decorators: [{
|
|
512
1903
|
type: Pipe,
|
|
513
1904
|
args: [{
|
|
514
1905
|
name: 'creditCardMask',
|
|
@@ -546,10 +1937,10 @@ class EmailMaskPipe {
|
|
|
546
1937
|
const lastChar = local[local.length - 1];
|
|
547
1938
|
return `${firstChar}***${lastChar}@${domain}`;
|
|
548
1939
|
}
|
|
549
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
550
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.
|
|
1940
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: EmailMaskPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
1941
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: EmailMaskPipe, isStandalone: true, name: "emailMask" });
|
|
551
1942
|
}
|
|
552
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
1943
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: EmailMaskPipe, decorators: [{
|
|
553
1944
|
type: Pipe,
|
|
554
1945
|
args: [{
|
|
555
1946
|
name: 'emailMask',
|
|
@@ -582,10 +1973,10 @@ class HtmlEscapePipe {
|
|
|
582
1973
|
};
|
|
583
1974
|
return value.replace(/[&<>"']/g, char => escapeMap[char]);
|
|
584
1975
|
}
|
|
585
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
586
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.
|
|
1976
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: HtmlEscapePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
1977
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: HtmlEscapePipe, isStandalone: true, name: "htmlEscape" });
|
|
587
1978
|
}
|
|
588
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
1979
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: HtmlEscapePipe, decorators: [{
|
|
589
1980
|
type: Pipe,
|
|
590
1981
|
args: [{
|
|
591
1982
|
name: 'htmlEscape',
|
|
@@ -617,10 +2008,10 @@ class HtmlSanitizePipe {
|
|
|
617
2008
|
return this.sanitizer.bypassSecurityTrustHtml('');
|
|
618
2009
|
return this.sanitizer.sanitize(0, value) || this.sanitizer.bypassSecurityTrustHtml('');
|
|
619
2010
|
}
|
|
620
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
621
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.
|
|
2011
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: HtmlSanitizePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
2012
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: HtmlSanitizePipe, isStandalone: true, name: "htmlSanitize" });
|
|
622
2013
|
}
|
|
623
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
2014
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: HtmlSanitizePipe, decorators: [{
|
|
624
2015
|
type: Pipe,
|
|
625
2016
|
args: [{
|
|
626
2017
|
name: 'htmlSanitize',
|
|
@@ -651,10 +2042,10 @@ class IpAddressMaskPipe {
|
|
|
651
2042
|
}
|
|
652
2043
|
return value;
|
|
653
2044
|
}
|
|
654
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
655
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.
|
|
2045
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: IpAddressMaskPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
2046
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: IpAddressMaskPipe, isStandalone: true, name: "ipAddressMask" });
|
|
656
2047
|
}
|
|
657
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
2048
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: IpAddressMaskPipe, decorators: [{
|
|
658
2049
|
type: Pipe,
|
|
659
2050
|
args: [{
|
|
660
2051
|
name: 'ipAddressMask',
|
|
@@ -702,10 +2093,10 @@ class BarcodePipe {
|
|
|
702
2093
|
return '';
|
|
703
2094
|
}
|
|
704
2095
|
}
|
|
705
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
706
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.
|
|
2096
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: BarcodePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
2097
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: BarcodePipe, isStandalone: true, name: "barcode" });
|
|
707
2098
|
}
|
|
708
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
2099
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: BarcodePipe, decorators: [{
|
|
709
2100
|
type: Pipe,
|
|
710
2101
|
args: [{
|
|
711
2102
|
name: 'barcode',
|
|
@@ -890,10 +2281,10 @@ class ColorConvertPipe {
|
|
|
890
2281
|
return value;
|
|
891
2282
|
}
|
|
892
2283
|
}
|
|
893
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
894
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.
|
|
2284
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: ColorConvertPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
2285
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: ColorConvertPipe, isStandalone: true, name: "colorConvert" });
|
|
895
2286
|
}
|
|
896
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
2287
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: ColorConvertPipe, decorators: [{
|
|
897
2288
|
type: Pipe,
|
|
898
2289
|
args: [{
|
|
899
2290
|
name: 'colorConvert',
|
|
@@ -919,10 +2310,10 @@ class GravatarPipe {
|
|
|
919
2310
|
const hash = md5(value.trim().toLowerCase());
|
|
920
2311
|
return `https://www.gravatar.com/avatar/${hash}?s=${size}`;
|
|
921
2312
|
}
|
|
922
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
923
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.
|
|
2313
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: GravatarPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
2314
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: GravatarPipe, isStandalone: true, name: "gravatar" });
|
|
924
2315
|
}
|
|
925
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
2316
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: GravatarPipe, decorators: [{
|
|
926
2317
|
type: Pipe,
|
|
927
2318
|
args: [{
|
|
928
2319
|
name: 'gravatar',
|
|
@@ -948,10 +2339,10 @@ class QrCodePipe {
|
|
|
948
2339
|
}
|
|
949
2340
|
return QRCode.toDataURL(value, options);
|
|
950
2341
|
}
|
|
951
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
952
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.
|
|
2342
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: QrCodePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
2343
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: QrCodePipe, isStandalone: true, name: "qrCode" });
|
|
953
2344
|
}
|
|
954
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
2345
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: QrCodePipe, decorators: [{
|
|
955
2346
|
type: Pipe,
|
|
956
2347
|
args: [{
|
|
957
2348
|
name: 'qrCode',
|
|
@@ -972,10 +2363,10 @@ class CountPipe {
|
|
|
972
2363
|
}
|
|
973
2364
|
return 0;
|
|
974
2365
|
}
|
|
975
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
976
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.
|
|
2366
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: CountPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
2367
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: CountPipe, isStandalone: true, name: "count" });
|
|
977
2368
|
}
|
|
978
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
2369
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: CountPipe, decorators: [{
|
|
979
2370
|
type: Pipe,
|
|
980
2371
|
args: [{
|
|
981
2372
|
name: 'count',
|
|
@@ -991,8 +2382,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImpor
|
|
|
991
2382
|
* @returns {'mobile' | 'tablet' | 'desktop' | 'unknown'} - The detected device type.
|
|
992
2383
|
*
|
|
993
2384
|
* @example
|
|
994
|
-
* {{ '' |
|
|
995
|
-
* <div *ngIf="'' |
|
|
2385
|
+
* {{ '' | deviceType }} // Outputs: 'mobile' (on a mobile device)
|
|
2386
|
+
* <div *ngIf="'' | deviceType === 'desktop'">Desktop-only content</div>
|
|
996
2387
|
*/
|
|
997
2388
|
class DeviceTypePipe {
|
|
998
2389
|
transform(value = typeof navigator !== 'undefined' ? navigator.userAgent : '') {
|
|
@@ -1007,13 +2398,13 @@ class DeviceTypePipe {
|
|
|
1007
2398
|
return 'tablet';
|
|
1008
2399
|
return 'desktop';
|
|
1009
2400
|
}
|
|
1010
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1011
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.
|
|
2401
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DeviceTypePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
2402
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: DeviceTypePipe, isStandalone: true, name: "deviceType" });
|
|
1012
2403
|
}
|
|
1013
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
2404
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DeviceTypePipe, decorators: [{
|
|
1014
2405
|
type: Pipe,
|
|
1015
2406
|
args: [{
|
|
1016
|
-
name: '
|
|
2407
|
+
name: 'deviceType',
|
|
1017
2408
|
standalone: true
|
|
1018
2409
|
}]
|
|
1019
2410
|
}] });
|
|
@@ -1084,10 +2475,10 @@ class JsonPrettyPipe {
|
|
|
1084
2475
|
result = result.replace(/[{}[\]]/g, '<span class="json-punctuation">$&</span>');
|
|
1085
2476
|
return result;
|
|
1086
2477
|
}
|
|
1087
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1088
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.
|
|
2478
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: JsonPrettyPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
2479
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: JsonPrettyPipe, isStandalone: true, name: "jsonPretty" });
|
|
1089
2480
|
}
|
|
1090
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
2481
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: JsonPrettyPipe, decorators: [{
|
|
1091
2482
|
type: Pipe,
|
|
1092
2483
|
args: [{
|
|
1093
2484
|
name: 'jsonPretty',
|
|
@@ -1115,10 +2506,10 @@ class TextToSpeechPipe {
|
|
|
1115
2506
|
uttrance.lang = lang;
|
|
1116
2507
|
window.speechSynthesis.speak(uttrance);
|
|
1117
2508
|
}
|
|
1118
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1119
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.
|
|
2509
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: TextToSpeechPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
2510
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: TextToSpeechPipe, isStandalone: true, name: "textToSpeech" });
|
|
1120
2511
|
}
|
|
1121
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
2512
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: TextToSpeechPipe, decorators: [{
|
|
1122
2513
|
type: Pipe,
|
|
1123
2514
|
args: [{
|
|
1124
2515
|
name: 'textToSpeech',
|
|
@@ -1145,7 +2536,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImpor
|
|
|
1145
2536
|
* @note Pure pipe - output won't automatically update as time passes.
|
|
1146
2537
|
* Use signals or periodic change detection to re-trigger.
|
|
1147
2538
|
* */
|
|
1148
|
-
class
|
|
2539
|
+
class TimeAgoPipe {
|
|
1149
2540
|
static THRESHOLDS = [
|
|
1150
2541
|
[60, 1, 'second'],
|
|
1151
2542
|
[3600, 60, 'minute'],
|
|
@@ -1170,17 +2561,17 @@ class TimeAgoPipePipe {
|
|
|
1170
2561
|
this.cacheLocal = local;
|
|
1171
2562
|
}
|
|
1172
2563
|
const seconds = Math.floor((date.getTime() - Date.now()) / 1000);
|
|
1173
|
-
for (const [max, divisor, unit] of
|
|
2564
|
+
for (const [max, divisor, unit] of TimeAgoPipe.THRESHOLDS) {
|
|
1174
2565
|
if (Math.abs(seconds) < max) {
|
|
1175
2566
|
return this.rtf.format(Math.round(seconds / divisor), unit);
|
|
1176
2567
|
}
|
|
1177
2568
|
}
|
|
1178
2569
|
return "";
|
|
1179
2570
|
}
|
|
1180
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1181
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.
|
|
2571
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: TimeAgoPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
2572
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: TimeAgoPipe, isStandalone: true, name: "timeAgo" });
|
|
1182
2573
|
}
|
|
1183
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
2574
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: TimeAgoPipe, decorators: [{
|
|
1184
2575
|
type: Pipe,
|
|
1185
2576
|
args: [{
|
|
1186
2577
|
name: 'timeAgo',
|
|
@@ -1225,10 +2616,10 @@ class DiffPipe {
|
|
|
1225
2616
|
getNestedValue(obj, path) {
|
|
1226
2617
|
return path.split('.').reduce((current, segment) => current?.[segment], obj);
|
|
1227
2618
|
}
|
|
1228
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1229
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.
|
|
2619
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DiffPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
2620
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: DiffPipe, isStandalone: true, name: "diff" });
|
|
1230
2621
|
}
|
|
1231
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
2622
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DiffPipe, decorators: [{
|
|
1232
2623
|
type: Pipe,
|
|
1233
2624
|
args: [{
|
|
1234
2625
|
name: 'diff',
|
|
@@ -1265,10 +2656,10 @@ class EveryPipe {
|
|
|
1265
2656
|
getNestedValue(obj, path) {
|
|
1266
2657
|
return path.split('.').reduce((current, segment) => current?.[segment], obj);
|
|
1267
2658
|
}
|
|
1268
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1269
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.
|
|
2659
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: EveryPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
2660
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: EveryPipe, isStandalone: true, name: "every" });
|
|
1270
2661
|
}
|
|
1271
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
2662
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: EveryPipe, decorators: [{
|
|
1272
2663
|
type: Pipe,
|
|
1273
2664
|
args: [{
|
|
1274
2665
|
name: 'every',
|
|
@@ -1313,10 +2704,10 @@ class IntersectionPipe {
|
|
|
1313
2704
|
getNestedValue(obj, path) {
|
|
1314
2705
|
return path.split('.').reduce((current, segment) => current?.[segment], obj);
|
|
1315
2706
|
}
|
|
1316
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1317
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.
|
|
2707
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: IntersectionPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
2708
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: IntersectionPipe, isStandalone: true, name: "intersection" });
|
|
1318
2709
|
}
|
|
1319
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
2710
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: IntersectionPipe, decorators: [{
|
|
1320
2711
|
type: Pipe,
|
|
1321
2712
|
args: [{
|
|
1322
2713
|
name: 'intersection',
|
|
@@ -1350,10 +2741,10 @@ class ChunkPipe {
|
|
|
1350
2741
|
}
|
|
1351
2742
|
return result;
|
|
1352
2743
|
}
|
|
1353
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1354
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.
|
|
2744
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: ChunkPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
2745
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: ChunkPipe, isStandalone: true, name: "chunk" });
|
|
1355
2746
|
}
|
|
1356
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
2747
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: ChunkPipe, decorators: [{
|
|
1357
2748
|
type: Pipe,
|
|
1358
2749
|
args: [{
|
|
1359
2750
|
name: 'chunk',
|
|
@@ -1374,17 +2765,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImpor
|
|
|
1374
2765
|
* {{ [[1, [2, [3]]]] | flatten:1 }} // [1, 2, [3]]
|
|
1375
2766
|
* {{ [['a', 'b'], ['c']] | flatten }} // ['a', 'b', 'c']
|
|
1376
2767
|
*/
|
|
1377
|
-
class
|
|
2768
|
+
class FlattenPipe {
|
|
1378
2769
|
transform(value, depth = Infinity) {
|
|
1379
2770
|
if (!Array.isArray(value)) {
|
|
1380
2771
|
return [];
|
|
1381
2772
|
}
|
|
1382
2773
|
return value.flat(depth);
|
|
1383
2774
|
}
|
|
1384
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1385
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.
|
|
2775
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: FlattenPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
2776
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: FlattenPipe, isStandalone: true, name: "flatten" });
|
|
1386
2777
|
}
|
|
1387
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
2778
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: FlattenPipe, decorators: [{
|
|
1388
2779
|
type: Pipe,
|
|
1389
2780
|
args: [{
|
|
1390
2781
|
name: 'flatten',
|
|
@@ -1421,10 +2812,10 @@ class GroupByPipe {
|
|
|
1421
2812
|
getNestedValue(obj, path) {
|
|
1422
2813
|
return path.split('.').reduce((current, segment) => current?.[segment], obj);
|
|
1423
2814
|
}
|
|
1424
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1425
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.
|
|
2815
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: GroupByPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
2816
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: GroupByPipe, isStandalone: true, name: "groupBy" });
|
|
1426
2817
|
}
|
|
1427
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
2818
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: GroupByPipe, decorators: [{
|
|
1428
2819
|
type: Pipe,
|
|
1429
2820
|
args: [{
|
|
1430
2821
|
name: 'groupBy',
|
|
@@ -1458,10 +2849,10 @@ class InitialPipe {
|
|
|
1458
2849
|
}
|
|
1459
2850
|
return value.slice(0, -n);
|
|
1460
2851
|
}
|
|
1461
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1462
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.
|
|
2852
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: InitialPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
2853
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: InitialPipe, isStandalone: true, name: "initial" });
|
|
1463
2854
|
}
|
|
1464
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
2855
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: InitialPipe, decorators: [{
|
|
1465
2856
|
type: Pipe,
|
|
1466
2857
|
args: [{
|
|
1467
2858
|
name: 'initial',
|
|
@@ -1510,10 +2901,10 @@ class OrderByPipe {
|
|
|
1510
2901
|
getNestedValue(obj, path) {
|
|
1511
2902
|
return path.split('.').reduce((current, segment) => current?.[segment], obj);
|
|
1512
2903
|
}
|
|
1513
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1514
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.
|
|
2904
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: OrderByPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
2905
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: OrderByPipe, isStandalone: true, name: "orderBy" });
|
|
1515
2906
|
}
|
|
1516
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
2907
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: OrderByPipe, decorators: [{
|
|
1517
2908
|
type: Pipe,
|
|
1518
2909
|
args: [{
|
|
1519
2910
|
name: 'orderBy',
|
|
@@ -1543,10 +2934,10 @@ class PluckPipe {
|
|
|
1543
2934
|
getNestedValue(obj, path) {
|
|
1544
2935
|
return path.split('.').reduce((current, segment) => current?.[segment], obj);
|
|
1545
2936
|
}
|
|
1546
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1547
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.
|
|
2937
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: PluckPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
2938
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: PluckPipe, isStandalone: true, name: "pluck" });
|
|
1548
2939
|
}
|
|
1549
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
2940
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: PluckPipe, decorators: [{
|
|
1550
2941
|
type: Pipe,
|
|
1551
2942
|
args: [{
|
|
1552
2943
|
name: 'pluck',
|
|
@@ -1582,10 +2973,10 @@ class RangePipe {
|
|
|
1582
2973
|
}
|
|
1583
2974
|
return result;
|
|
1584
2975
|
}
|
|
1585
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1586
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.
|
|
2976
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: RangePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
2977
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: RangePipe, isStandalone: true, name: "range" });
|
|
1587
2978
|
}
|
|
1588
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
2979
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: RangePipe, decorators: [{
|
|
1589
2980
|
type: Pipe,
|
|
1590
2981
|
args: [{
|
|
1591
2982
|
name: 'range',
|
|
@@ -1615,10 +3006,10 @@ class ReversePipe {
|
|
|
1615
3006
|
}
|
|
1616
3007
|
return '';
|
|
1617
3008
|
}
|
|
1618
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1619
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.
|
|
3009
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: ReversePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
3010
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: ReversePipe, isStandalone: true, name: "reverse" });
|
|
1620
3011
|
}
|
|
1621
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
3012
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: ReversePipe, decorators: [{
|
|
1622
3013
|
type: Pipe,
|
|
1623
3014
|
args: [{
|
|
1624
3015
|
name: 'reverse',
|
|
@@ -1665,10 +3056,10 @@ class SamplePipe {
|
|
|
1665
3056
|
// Return single item for n=1, array otherwise
|
|
1666
3057
|
return n === 1 ? result[0] : result;
|
|
1667
3058
|
}
|
|
1668
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1669
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.
|
|
3059
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: SamplePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
3060
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: SamplePipe, isStandalone: true, name: "sample", pure: false });
|
|
1670
3061
|
}
|
|
1671
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
3062
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: SamplePipe, decorators: [{
|
|
1672
3063
|
type: Pipe,
|
|
1673
3064
|
args: [{
|
|
1674
3065
|
name: 'sample',
|
|
@@ -1708,10 +3099,10 @@ class ShufflePipe {
|
|
|
1708
3099
|
}
|
|
1709
3100
|
return arr;
|
|
1710
3101
|
}
|
|
1711
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1712
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.
|
|
3102
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: ShufflePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
3103
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: ShufflePipe, isStandalone: true, name: "shuffle", pure: false });
|
|
1713
3104
|
}
|
|
1714
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
3105
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: ShufflePipe, decorators: [{
|
|
1715
3106
|
type: Pipe,
|
|
1716
3107
|
args: [{
|
|
1717
3108
|
name: 'shuffle',
|
|
@@ -1746,10 +3137,10 @@ class TailPipe {
|
|
|
1746
3137
|
return [];
|
|
1747
3138
|
return value.slice(n);
|
|
1748
3139
|
}
|
|
1749
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1750
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.
|
|
3140
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: TailPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
3141
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: TailPipe, isStandalone: true, name: "tail" });
|
|
1751
3142
|
}
|
|
1752
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
3143
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: TailPipe, decorators: [{
|
|
1753
3144
|
type: Pipe,
|
|
1754
3145
|
args: [{
|
|
1755
3146
|
name: 'tail',
|
|
@@ -1776,10 +3167,10 @@ class TruthifyPipe {
|
|
|
1776
3167
|
}
|
|
1777
3168
|
return value.filter(Boolean);
|
|
1778
3169
|
}
|
|
1779
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1780
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.
|
|
3170
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: TruthifyPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
3171
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: TruthifyPipe, isStandalone: true, name: "truthify" });
|
|
1781
3172
|
}
|
|
1782
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
3173
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: TruthifyPipe, decorators: [{
|
|
1783
3174
|
type: Pipe,
|
|
1784
3175
|
args: [{
|
|
1785
3176
|
name: 'truthify',
|
|
@@ -1822,10 +3213,10 @@ class UniquePipe {
|
|
|
1822
3213
|
getNestedValue(obj, path) {
|
|
1823
3214
|
return path.split('.').reduce((current, segment) => current?.[segment], obj);
|
|
1824
3215
|
}
|
|
1825
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1826
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.
|
|
3216
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: UniquePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
3217
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: UniquePipe, isStandalone: true, name: "unique" });
|
|
1827
3218
|
}
|
|
1828
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
3219
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: UniquePipe, decorators: [{
|
|
1829
3220
|
type: Pipe,
|
|
1830
3221
|
args: [{
|
|
1831
3222
|
name: 'unique',
|
|
@@ -1869,10 +3260,10 @@ class WithoutPipe {
|
|
|
1869
3260
|
getNestedValue(obj, path) {
|
|
1870
3261
|
return path.split('.').reduce((current, segment) => current?.[segment], obj);
|
|
1871
3262
|
}
|
|
1872
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1873
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.
|
|
3263
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: WithoutPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
3264
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: WithoutPipe, isStandalone: true, name: "without" });
|
|
1874
3265
|
}
|
|
1875
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
3266
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: WithoutPipe, decorators: [{
|
|
1876
3267
|
type: Pipe,
|
|
1877
3268
|
args: [{
|
|
1878
3269
|
name: 'without',
|
|
@@ -1909,10 +3300,10 @@ class SomePipe {
|
|
|
1909
3300
|
getNestedValue(obj, path) {
|
|
1910
3301
|
return path.split('.').reduce((current, segment) => current?.[segment], obj);
|
|
1911
3302
|
}
|
|
1912
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1913
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.
|
|
3303
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: SomePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
3304
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: SomePipe, isStandalone: true, name: "some" });
|
|
1914
3305
|
}
|
|
1915
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
3306
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: SomePipe, decorators: [{
|
|
1916
3307
|
type: Pipe,
|
|
1917
3308
|
args: [{
|
|
1918
3309
|
name: 'some',
|
|
@@ -1968,10 +3359,10 @@ class UnionPipe {
|
|
|
1968
3359
|
getNestedValue(obj, path) {
|
|
1969
3360
|
return path.split('.').reduce((current, segment) => current?.[segment], obj);
|
|
1970
3361
|
}
|
|
1971
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1972
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.
|
|
3362
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: UnionPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
3363
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: UnionPipe, isStandalone: true, name: "union" });
|
|
1973
3364
|
}
|
|
1974
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
3365
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: UnionPipe, decorators: [{
|
|
1975
3366
|
type: Pipe,
|
|
1976
3367
|
args: [{
|
|
1977
3368
|
name: 'union',
|
|
@@ -2032,10 +3423,10 @@ class FilterByPipe {
|
|
|
2032
3423
|
getNestedValue(obj, path) {
|
|
2033
3424
|
return path.split('.').reduce((current, segment) => current?.[segment], obj);
|
|
2034
3425
|
}
|
|
2035
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
2036
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.
|
|
3426
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: FilterByPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
3427
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: FilterByPipe, isStandalone: true, name: "filterBy" });
|
|
2037
3428
|
}
|
|
2038
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
3429
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: FilterByPipe, decorators: [{
|
|
2039
3430
|
type: Pipe,
|
|
2040
3431
|
args: [{
|
|
2041
3432
|
name: 'filterBy',
|
|
@@ -2075,10 +3466,10 @@ class MinPipe {
|
|
|
2075
3466
|
getNestedValue(obj, path) {
|
|
2076
3467
|
return path.split('.').reduce((current, segment) => current?.[segment], obj);
|
|
2077
3468
|
}
|
|
2078
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
2079
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.
|
|
3469
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: MinPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
3470
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: MinPipe, isStandalone: true, name: "min" });
|
|
2080
3471
|
}
|
|
2081
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
3472
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: MinPipe, decorators: [{
|
|
2082
3473
|
type: Pipe,
|
|
2083
3474
|
args: [{
|
|
2084
3475
|
name: 'min',
|
|
@@ -2118,10 +3509,10 @@ class MaxPipe {
|
|
|
2118
3509
|
getNestedValue(obj, path) {
|
|
2119
3510
|
return path.split('.').reduce((current, segment) => current?.[segment], obj);
|
|
2120
3511
|
}
|
|
2121
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
2122
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.
|
|
3512
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: MaxPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
3513
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: MaxPipe, isStandalone: true, name: "max" });
|
|
2123
3514
|
}
|
|
2124
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
3515
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: MaxPipe, decorators: [{
|
|
2125
3516
|
type: Pipe,
|
|
2126
3517
|
args: [{
|
|
2127
3518
|
name: 'max',
|
|
@@ -2161,10 +3552,10 @@ class SumPipe {
|
|
|
2161
3552
|
getNestedValue(obj, path) {
|
|
2162
3553
|
return path.split('.').reduce((current, segment) => current?.[segment], obj);
|
|
2163
3554
|
}
|
|
2164
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
2165
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.
|
|
3555
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: SumPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
3556
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: SumPipe, isStandalone: true, name: "sum" });
|
|
2166
3557
|
}
|
|
2167
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
3558
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: SumPipe, decorators: [{
|
|
2168
3559
|
type: Pipe,
|
|
2169
3560
|
args: [{
|
|
2170
3561
|
name: 'sum',
|
|
@@ -2204,10 +3595,10 @@ class AveragePipe {
|
|
|
2204
3595
|
getNestedValue(obj, path) {
|
|
2205
3596
|
return path.split('.').reduce((current, segment) => current?.[segment], obj);
|
|
2206
3597
|
}
|
|
2207
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
2208
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.
|
|
3598
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: AveragePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
3599
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: AveragePipe, isStandalone: true, name: "average" });
|
|
2209
3600
|
}
|
|
2210
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
3601
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: AveragePipe, decorators: [{
|
|
2211
3602
|
type: Pipe,
|
|
2212
3603
|
args: [{
|
|
2213
3604
|
name: 'average',
|
|
@@ -2246,10 +3637,10 @@ class PercentagePipe {
|
|
|
2246
3637
|
}
|
|
2247
3638
|
return result;
|
|
2248
3639
|
}
|
|
2249
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
2250
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.
|
|
3640
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: PercentagePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
3641
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: PercentagePipe, isStandalone: true, name: "percentage" });
|
|
2251
3642
|
}
|
|
2252
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
3643
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: PercentagePipe, decorators: [{
|
|
2253
3644
|
type: Pipe,
|
|
2254
3645
|
args: [{
|
|
2255
3646
|
name: 'percentage',
|
|
@@ -2284,10 +3675,10 @@ class CeilPipe {
|
|
|
2284
3675
|
const factor = Math.pow(10, precision);
|
|
2285
3676
|
return Math.ceil(value * factor) / factor;
|
|
2286
3677
|
}
|
|
2287
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
2288
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.
|
|
3678
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: CeilPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
3679
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: CeilPipe, isStandalone: true, name: "ceil" });
|
|
2289
3680
|
}
|
|
2290
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
3681
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: CeilPipe, decorators: [{
|
|
2291
3682
|
type: Pipe,
|
|
2292
3683
|
args: [{
|
|
2293
3684
|
name: 'ceil',
|
|
@@ -2322,10 +3713,10 @@ class FloorPipe {
|
|
|
2322
3713
|
const factor = Math.pow(10, precision);
|
|
2323
3714
|
return Math.floor(value * factor) / factor;
|
|
2324
3715
|
}
|
|
2325
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
2326
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.
|
|
3716
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: FloorPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
3717
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: FloorPipe, isStandalone: true, name: "floor" });
|
|
2327
3718
|
}
|
|
2328
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
3719
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: FloorPipe, decorators: [{
|
|
2329
3720
|
type: Pipe,
|
|
2330
3721
|
args: [{
|
|
2331
3722
|
name: 'floor',
|
|
@@ -2360,10 +3751,10 @@ class RoundPipe {
|
|
|
2360
3751
|
const factor = Math.pow(10, precision);
|
|
2361
3752
|
return Math.round(value * factor) / factor;
|
|
2362
3753
|
}
|
|
2363
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
2364
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.
|
|
3754
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: RoundPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
3755
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: RoundPipe, isStandalone: true, name: "round" });
|
|
2365
3756
|
}
|
|
2366
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
3757
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: RoundPipe, decorators: [{
|
|
2367
3758
|
type: Pipe,
|
|
2368
3759
|
args: [{
|
|
2369
3760
|
name: 'round',
|
|
@@ -2395,10 +3786,10 @@ class SqrtPipe {
|
|
|
2395
3786
|
}
|
|
2396
3787
|
return Math.sqrt(value);
|
|
2397
3788
|
}
|
|
2398
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
2399
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.
|
|
3789
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: SqrtPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
3790
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: SqrtPipe, isStandalone: true, name: "sqrt" });
|
|
2400
3791
|
}
|
|
2401
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
3792
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: SqrtPipe, decorators: [{
|
|
2402
3793
|
type: Pipe,
|
|
2403
3794
|
args: [{
|
|
2404
3795
|
name: 'sqrt',
|
|
@@ -2431,10 +3822,10 @@ class PowPipe {
|
|
|
2431
3822
|
}
|
|
2432
3823
|
return Math.pow(value, exponent);
|
|
2433
3824
|
}
|
|
2434
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
2435
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.
|
|
3825
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: PowPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
3826
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: PowPipe, isStandalone: true, name: "pow" });
|
|
2436
3827
|
}
|
|
2437
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
3828
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: PowPipe, decorators: [{
|
|
2438
3829
|
type: Pipe,
|
|
2439
3830
|
args: [{
|
|
2440
3831
|
name: 'pow',
|
|
@@ -2463,10 +3854,10 @@ class DegreesPipe {
|
|
|
2463
3854
|
}
|
|
2464
3855
|
return value * (180 / Math.PI);
|
|
2465
3856
|
}
|
|
2466
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
2467
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.
|
|
3857
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DegreesPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
3858
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: DegreesPipe, isStandalone: true, name: "degrees" });
|
|
2468
3859
|
}
|
|
2469
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
3860
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DegreesPipe, decorators: [{
|
|
2470
3861
|
type: Pipe,
|
|
2471
3862
|
args: [{
|
|
2472
3863
|
name: 'degrees',
|
|
@@ -2516,10 +3907,10 @@ class BytesPipe {
|
|
|
2516
3907
|
const precision = typeof decimals === 'number' && decimals >= 0 ? decimals : 1;
|
|
2517
3908
|
return `${size.toFixed(precision)} ${units[unitIndex]}`;
|
|
2518
3909
|
}
|
|
2519
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
2520
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.
|
|
3910
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: BytesPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
3911
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: BytesPipe, isStandalone: true, name: "bytes" });
|
|
2521
3912
|
}
|
|
2522
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
3913
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: BytesPipe, decorators: [{
|
|
2523
3914
|
type: Pipe,
|
|
2524
3915
|
args: [{
|
|
2525
3916
|
name: 'bytes',
|
|
@@ -2548,10 +3939,10 @@ class RadiansPipe {
|
|
|
2548
3939
|
}
|
|
2549
3940
|
return value * (Math.PI / 180);
|
|
2550
3941
|
}
|
|
2551
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
2552
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.
|
|
3942
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: RadiansPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
3943
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.11", ngImport: i0, type: RadiansPipe, isStandalone: true, name: "radians" });
|
|
2553
3944
|
}
|
|
2554
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
3945
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: RadiansPipe, decorators: [{
|
|
2555
3946
|
type: Pipe,
|
|
2556
3947
|
args: [{
|
|
2557
3948
|
name: 'radians',
|
|
@@ -2572,6 +3963,44 @@ const ALL_PIPES = [
|
|
|
2572
3963
|
SnakeCasePipe,
|
|
2573
3964
|
TitleCasePipe,
|
|
2574
3965
|
TruncatePipe,
|
|
3966
|
+
TrimPipe,
|
|
3967
|
+
CapitalizePipe,
|
|
3968
|
+
UpperFirstPipe,
|
|
3969
|
+
LeftPadPipe,
|
|
3970
|
+
RightPadPipe,
|
|
3971
|
+
PadPipe,
|
|
3972
|
+
RepeatPipe,
|
|
3973
|
+
SlugifyPipe,
|
|
3974
|
+
StripTagsPipe,
|
|
3975
|
+
EncodeUriPipe,
|
|
3976
|
+
EncodeUriComponentPipe,
|
|
3977
|
+
DecodeUriPipe,
|
|
3978
|
+
DecodeUriComponentPipe,
|
|
3979
|
+
SplitPipe,
|
|
3980
|
+
MatchPipe,
|
|
3981
|
+
TestPipe,
|
|
3982
|
+
NewlinesPipe,
|
|
3983
|
+
TemplatePipe,
|
|
3984
|
+
LatinizePipe,
|
|
3985
|
+
WrapPipe,
|
|
3986
|
+
// Object
|
|
3987
|
+
KeysPipe,
|
|
3988
|
+
ValuesPipe,
|
|
3989
|
+
PairsPipe,
|
|
3990
|
+
PickPipe,
|
|
3991
|
+
OmitPipe,
|
|
3992
|
+
InvertPipe,
|
|
3993
|
+
InvertByPipe,
|
|
3994
|
+
DiffObjPipe,
|
|
3995
|
+
// Boolean
|
|
3996
|
+
IsDefinedPipe,
|
|
3997
|
+
IsNullPipe,
|
|
3998
|
+
IsStringPipe,
|
|
3999
|
+
IsNumberPipe,
|
|
4000
|
+
IsArrayPipe,
|
|
4001
|
+
IsObjectPipe,
|
|
4002
|
+
IsFunctionPipe,
|
|
4003
|
+
IsEmptyPipe,
|
|
2575
4004
|
// Security & Privacy
|
|
2576
4005
|
CreditCardMaskPipe,
|
|
2577
4006
|
EmailMaskPipe,
|
|
@@ -2588,13 +4017,13 @@ const ALL_PIPES = [
|
|
|
2588
4017
|
DeviceTypePipe,
|
|
2589
4018
|
JsonPrettyPipe,
|
|
2590
4019
|
TextToSpeechPipe,
|
|
2591
|
-
|
|
4020
|
+
TimeAgoPipe,
|
|
2592
4021
|
// Array
|
|
2593
4022
|
ChunkPipe,
|
|
2594
4023
|
DiffPipe,
|
|
2595
4024
|
EveryPipe,
|
|
2596
4025
|
IntersectionPipe,
|
|
2597
|
-
|
|
4026
|
+
FlattenPipe,
|
|
2598
4027
|
GroupByPipe,
|
|
2599
4028
|
InitialPipe,
|
|
2600
4029
|
OrderByPipe,
|
|
@@ -2632,5 +4061,5 @@ const ALL_PIPES = [
|
|
|
2632
4061
|
* Generated bundle index. Do not edit.
|
|
2633
4062
|
*/
|
|
2634
4063
|
|
|
2635
|
-
export { ALL_PIPES, AsciiArtPipe, AveragePipe, BarcodePipe, BytesPipe, CamelCasePipe, CeilPipe, ChunkPipe, ColorConvertPipe, CountPipe, CreditCardMaskPipe, DegreesPipe, DeviceTypePipe, DiffPipe, EmailMaskPipe, EveryPipe, FilterByPipe,
|
|
4064
|
+
export { ALL_PIPES, AsciiArtPipe, AveragePipe, BarcodePipe, BytesPipe, CamelCasePipe, CapitalizePipe, CeilPipe, ChunkPipe, ColorConvertPipe, CountPipe, CreditCardMaskPipe, DecodeUriComponentPipe, DecodeUriPipe, DegreesPipe, DeviceTypePipe, DiffObjPipe, DiffPipe, EmailMaskPipe, EncodeUriComponentPipe, EncodeUriPipe, EveryPipe, FilterByPipe, FlattenPipe, FloorPipe, GravatarPipe, GroupByPipe, HighlightPipe, HtmlEscapePipe, HtmlSanitizePipe, InitialPipe, InitialsPipe, IntersectionPipe, InvertByPipe, InvertPipe, IpAddressMaskPipe, IsArrayPipe, IsDefinedPipe, IsEmptyPipe, IsFunctionPipe, IsNullPipe, IsNumberPipe, IsObjectPipe, IsStringPipe, JsonPrettyPipe, KebabCasePipe, KeysPipe, LatinizePipe, LeftPadPipe, MatchPipe, MaxPipe, MinPipe, MorseCodePipe, NewlinesPipe, OmitPipe, OrderByPipe, PadPipe, PairsPipe, PercentagePipe, PickPipe, PluckPipe, PowPipe, QrCodePipe, RadiansPipe, RangePipe, RepeatPipe, ReplacePipe, ReversePipe, RightPadPipe, RoundPipe, SamplePipe, ShufflePipe, SlugifyPipe, SnakeCasePipe, SomePipe, SplitPipe, SqrtPipe, StripTagsPipe, SumPipe, TailPipe, TemplatePipe, TestPipe, TextToSpeechPipe, TimeAgoPipe, TitleCasePipe, TrimPipe, TruncatePipe, TruthifyPipe, UnionPipe, UniquePipe, UpperFirstPipe, ValuesPipe, WithoutPipe, WrapPipe };
|
|
2636
4065
|
//# sourceMappingURL=ngx-transforms.mjs.map
|