@rxap/pipes 21.0.1-dev.1 → 22.0.0-dev.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/compodoc/changelog.html +7 -0
- package/compodoc/dependencies.html +5 -5
- package/compodoc/js/search/search_index.js +2 -2
- package/compodoc/properties.html +1 -1
- package/docs/documentation.json +31 -31
- package/docs/html/classes/DeleteIdentifierPipe.html +2 -2
- package/docs/html/classes/EscapeQuotationMarkPipe.html +2 -2
- package/docs/html/classes/GetFromObjectPipe.html +2 -2
- package/docs/html/classes/JoinPipe.html +2 -2
- package/docs/html/classes/LimitPipe.html +2 -2
- package/docs/html/classes/ReplacePipe.html +2 -2
- package/docs/html/classes/RxapCurrencyPipe.html +2 -2
- package/docs/html/classes/SlicePipe.html +2 -2
- package/docs/html/classes/ToDisplayPipe.html +2 -2
- package/docs/html/classes/TruncatePipe.html +2 -2
- package/docs/html/index.html +2 -2
- package/docs/html/modules.html +1 -1
- package/docs/markdown/README.md +1 -1
- package/docs/markdown/classes/DeleteIdentifierPipe.md +3 -3
- package/docs/markdown/classes/EscapeQuotationMarkPipe.md +3 -3
- package/docs/markdown/classes/GetFromObjectPipe.md +3 -3
- package/docs/markdown/classes/JoinPipe.md +3 -3
- package/docs/markdown/classes/LimitPipe.md +3 -3
- package/docs/markdown/classes/ReplacePipe.md +3 -3
- package/docs/markdown/classes/RxapCurrencyPipe.md +3 -3
- package/docs/markdown/classes/SlicePipe.md +3 -3
- package/docs/markdown/classes/ToDisplayPipe.md +3 -3
- package/docs/markdown/classes/TruncatePipe.md +3 -3
- package/docs/markdown/globals.md +2 -2
- package/docs/wiki/Class.DeleteIdentifierPipe.md +2 -2
- package/docs/wiki/Class.EscapeQuotationMarkPipe.md +2 -2
- package/docs/wiki/Class.GetFromObjectPipe.md +2 -2
- package/docs/wiki/Class.JoinPipe.md +2 -2
- package/docs/wiki/Class.LimitPipe.md +2 -2
- package/docs/wiki/Class.ReplacePipe.md +2 -2
- package/docs/wiki/Class.RxapCurrencyPipe.md +2 -2
- package/docs/wiki/Class.SlicePipe.md +2 -2
- package/docs/wiki/Class.ToDisplayPipe.md +2 -2
- package/docs/wiki/Class.TruncatePipe.md +2 -2
- package/docs/wiki/globals.md +1 -1
- package/fesm2022/rxap-pipes-santization.mjs +91 -63
- package/fesm2022/rxap-pipes-santization.mjs.map +1 -1
- package/fesm2022/rxap-pipes.mjs +399 -223
- package/fesm2022/rxap-pipes.mjs.map +1 -1
- package/package.json +11 -11
- package/types/rxap-pipes-santization.d.ts +17 -18
- package/types/rxap-pipes.d.ts +82 -91
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Class: ReplacePipe
|
|
4
4
|
|
|
5
|
-
Defined in: [replace.pipe.ts:10](https://gitlab.com/rxap/packages/-/blob/
|
|
5
|
+
Defined in: [replace.pipe.ts:10](https://gitlab.com/rxap/packages/-/blob/c8145693a1e685c856c9997ae6c17bbf32838e79/packages/angular/pipes/src/lib/replace.pipe.ts#L10)
|
|
6
6
|
|
|
7
7
|
## Implements
|
|
8
8
|
|
|
@@ -24,7 +24,7 @@ Defined in: [replace.pipe.ts:10](https://gitlab.com/rxap/packages/-/blob/be7e221
|
|
|
24
24
|
|
|
25
25
|
> **transform**(`value`, `replace`, `replaceValue`): `string`
|
|
26
26
|
|
|
27
|
-
Defined in: [replace.pipe.ts:12](https://gitlab.com/rxap/packages/-/blob/
|
|
27
|
+
Defined in: [replace.pipe.ts:12](https://gitlab.com/rxap/packages/-/blob/c8145693a1e685c856c9997ae6c17bbf32838e79/packages/angular/pipes/src/lib/replace.pipe.ts#L12)
|
|
28
28
|
|
|
29
29
|
#### Parameters
|
|
30
30
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Class: RxapCurrencyPipe
|
|
4
4
|
|
|
5
|
-
Defined in: [currency.pipe.ts:8](https://gitlab.com/rxap/packages/-/blob/
|
|
5
|
+
Defined in: [currency.pipe.ts:8](https://gitlab.com/rxap/packages/-/blob/c8145693a1e685c856c9997ae6c17bbf32838e79/packages/angular/pipes/src/lib/currency.pipe.ts#L8)
|
|
6
6
|
|
|
7
7
|
## Implements
|
|
8
8
|
|
|
@@ -24,7 +24,7 @@ Defined in: [currency.pipe.ts:8](https://gitlab.com/rxap/packages/-/blob/be7e221
|
|
|
24
24
|
|
|
25
25
|
> **transform**(`value`, `currencyCode`?, `display`?, `digitsInfo`?, `locale`?): `null` \| `string`
|
|
26
26
|
|
|
27
|
-
Defined in: [currency.pipe.ts:45](https://gitlab.com/rxap/packages/-/blob/
|
|
27
|
+
Defined in: [currency.pipe.ts:45](https://gitlab.com/rxap/packages/-/blob/c8145693a1e685c856c9997ae6c17bbf32838e79/packages/angular/pipes/src/lib/currency.pipe.ts#L45)
|
|
28
28
|
|
|
29
29
|
#### Parameters
|
|
30
30
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Class: SlicePipe
|
|
4
4
|
|
|
5
|
-
Defined in: [slice.pipe.ts:10](https://gitlab.com/rxap/packages/-/blob/
|
|
5
|
+
Defined in: [slice.pipe.ts:10](https://gitlab.com/rxap/packages/-/blob/c8145693a1e685c856c9997ae6c17bbf32838e79/packages/angular/pipes/src/lib/slice.pipe.ts#L10)
|
|
6
6
|
|
|
7
7
|
## Implements
|
|
8
8
|
|
|
@@ -24,7 +24,7 @@ Defined in: [slice.pipe.ts:10](https://gitlab.com/rxap/packages/-/blob/be7e221de
|
|
|
24
24
|
|
|
25
25
|
> **transform**\<`T`\>(`value`, `start`, `end`?): `T`[]
|
|
26
26
|
|
|
27
|
-
Defined in: [slice.pipe.ts:12](https://gitlab.com/rxap/packages/-/blob/
|
|
27
|
+
Defined in: [slice.pipe.ts:12](https://gitlab.com/rxap/packages/-/blob/c8145693a1e685c856c9997ae6c17bbf32838e79/packages/angular/pipes/src/lib/slice.pipe.ts#L12)
|
|
28
28
|
|
|
29
29
|
#### Type Parameters
|
|
30
30
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Class: ToDisplayPipe
|
|
4
4
|
|
|
5
|
-
Defined in: [to-display.pipe.ts:12](https://gitlab.com/rxap/packages/-/blob/
|
|
5
|
+
Defined in: [to-display.pipe.ts:12](https://gitlab.com/rxap/packages/-/blob/c8145693a1e685c856c9997ae6c17bbf32838e79/packages/angular/pipes/src/lib/to-display.pipe.ts#L12)
|
|
6
6
|
|
|
7
7
|
## Implements
|
|
8
8
|
|
|
@@ -24,7 +24,7 @@ Defined in: [to-display.pipe.ts:12](https://gitlab.com/rxap/packages/-/blob/be7e
|
|
|
24
24
|
|
|
25
25
|
> **transform**(`value`, `toDisplay`): `string`
|
|
26
26
|
|
|
27
|
-
Defined in: [to-display.pipe.ts:16](https://gitlab.com/rxap/packages/-/blob/
|
|
27
|
+
Defined in: [to-display.pipe.ts:16](https://gitlab.com/rxap/packages/-/blob/c8145693a1e685c856c9997ae6c17bbf32838e79/packages/angular/pipes/src/lib/to-display.pipe.ts#L16)
|
|
28
28
|
|
|
29
29
|
#### Parameters
|
|
30
30
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Class: TruncatePipe
|
|
4
4
|
|
|
5
|
-
Defined in: [truncate.pipe.ts:10](https://gitlab.com/rxap/packages/-/blob/
|
|
5
|
+
Defined in: [truncate.pipe.ts:10](https://gitlab.com/rxap/packages/-/blob/c8145693a1e685c856c9997ae6c17bbf32838e79/packages/angular/pipes/src/lib/truncate.pipe.ts#L10)
|
|
6
6
|
|
|
7
7
|
## Implements
|
|
8
8
|
|
|
@@ -24,7 +24,7 @@ Defined in: [truncate.pipe.ts:10](https://gitlab.com/rxap/packages/-/blob/be7e22
|
|
|
24
24
|
|
|
25
25
|
> **transform**(`value`?, `length`?, `ellipsis`?): `string`
|
|
26
26
|
|
|
27
|
-
Defined in: [truncate.pipe.ts:12](https://gitlab.com/rxap/packages/-/blob/
|
|
27
|
+
Defined in: [truncate.pipe.ts:12](https://gitlab.com/rxap/packages/-/blob/c8145693a1e685c856c9997ae6c17bbf32838e79/packages/angular/pipes/src/lib/truncate.pipe.ts#L12)
|
|
28
28
|
|
|
29
29
|
#### Parameters
|
|
30
30
|
|
package/docs/wiki/globals.md
CHANGED
|
@@ -1,64 +1,92 @@
|
|
|
1
|
-
import * as i0 from
|
|
2
|
-
import {
|
|
3
|
-
import { DomSanitizer } from
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { Injectable, Pipe, SecurityContext, inject } from "@angular/core";
|
|
3
|
+
import { DomSanitizer } from "@angular/platform-browser";
|
|
4
|
+
var SantizationService = class SantizationService {
|
|
5
|
+
constructor() {
|
|
6
|
+
this._sanitizer = inject(DomSanitizer);
|
|
7
|
+
}
|
|
8
|
+
transform(value, type = "url") {
|
|
9
|
+
if (value === null) return this._sanitizer.sanitize(SecurityContext.NONE, value);
|
|
10
|
+
switch (type) {
|
|
11
|
+
case "html": return this._sanitizer.bypassSecurityTrustHtml(value);
|
|
12
|
+
case "style": return this._sanitizer.bypassSecurityTrustStyle(value);
|
|
13
|
+
case "script": return this._sanitizer.bypassSecurityTrustScript(value);
|
|
14
|
+
case "url": return this._sanitizer.bypassSecurityTrustUrl(value);
|
|
15
|
+
case "resourceUrl": return this._sanitizer.bypassSecurityTrustResourceUrl(value);
|
|
16
|
+
}
|
|
17
|
+
throw new Error("type is not set");
|
|
18
|
+
}
|
|
19
|
+
static {
|
|
20
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
21
|
+
minVersion: "12.0.0",
|
|
22
|
+
version: "22.3.0",
|
|
23
|
+
ngImport: i0,
|
|
24
|
+
type: SantizationService,
|
|
25
|
+
deps: [],
|
|
26
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
static {
|
|
30
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
31
|
+
minVersion: "12.0.0",
|
|
32
|
+
version: "22.3.0",
|
|
33
|
+
ngImport: i0,
|
|
34
|
+
type: SantizationService,
|
|
35
|
+
providedIn: "root"
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
40
|
+
minVersion: "12.0.0",
|
|
41
|
+
version: "22.3.0",
|
|
42
|
+
ngImport: i0,
|
|
43
|
+
type: SantizationService,
|
|
44
|
+
decorators: [{
|
|
45
|
+
type: Injectable,
|
|
46
|
+
args: [{ providedIn: "root" }]
|
|
47
|
+
}]
|
|
48
|
+
});
|
|
49
|
+
var SantizationPipe = class SantizationPipe {
|
|
50
|
+
constructor() {
|
|
51
|
+
this.santizationService = inject(SantizationService);
|
|
52
|
+
}
|
|
53
|
+
transform(value, type = "url") {
|
|
54
|
+
return this.santizationService.transform(value, type);
|
|
55
|
+
}
|
|
56
|
+
static {
|
|
57
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
58
|
+
minVersion: "12.0.0",
|
|
59
|
+
version: "22.3.0",
|
|
60
|
+
ngImport: i0,
|
|
61
|
+
type: SantizationPipe,
|
|
62
|
+
deps: [],
|
|
63
|
+
target: i0.ɵɵFactoryTarget.Pipe
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
static {
|
|
67
|
+
this.ɵpipe = i0.ɵɵngDeclarePipe({
|
|
68
|
+
minVersion: "14.0.0",
|
|
69
|
+
version: "22.3.0",
|
|
70
|
+
ngImport: i0,
|
|
71
|
+
type: SantizationPipe,
|
|
72
|
+
isStandalone: true,
|
|
73
|
+
name: "santization"
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
78
|
+
minVersion: "12.0.0",
|
|
79
|
+
version: "22.3.0",
|
|
80
|
+
ngImport: i0,
|
|
81
|
+
type: SantizationPipe,
|
|
82
|
+
decorators: [{
|
|
83
|
+
type: Pipe,
|
|
84
|
+
args: [{
|
|
85
|
+
name: "santization",
|
|
86
|
+
standalone: true
|
|
87
|
+
}]
|
|
88
|
+
}]
|
|
89
|
+
});
|
|
63
90
|
export { SantizationPipe, SantizationService };
|
|
64
|
-
|
|
91
|
+
|
|
92
|
+
//# sourceMappingURL=rxap-pipes-santization.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rxap-pipes-santization.mjs","sources":["../../../../../packages/angular/pipes/santization/src/lib/santization.service.ts","../../../../../packages/angular/pipes/santization/src/lib/santization.pipe.ts"
|
|
1
|
+
{"version":3,"file":"rxap-pipes-santization.mjs","names":[],"sources":["../../../../../packages/angular/pipes/santization/src/lib/santization.service.ts","../../../../../packages/angular/pipes/santization/src/lib/santization.pipe.ts"],"sourcesContent":["import { Injectable, SecurityContext, inject } from '@angular/core';\nimport {\n DomSanitizer,\n SafeValue,\n} from '@angular/platform-browser';\n\n// TODO : move to @rxap/services\n@Injectable({\n providedIn: 'root',\n})\nexport class SantizationService {\n private _sanitizer = inject<DomSanitizer>(DomSanitizer);\n\n\n transform(\n value: string | null,\n type: 'html' | 'style' | 'script' | 'url' | 'resourceUrl' = 'url',\n ): SafeValue | null {\n if (value === null) {\n return this._sanitizer.sanitize(SecurityContext.NONE, value);\n }\n switch (type) {\n case 'html':\n return this._sanitizer.bypassSecurityTrustHtml(value);\n\n case 'style':\n return this._sanitizer.bypassSecurityTrustStyle(value);\n\n case 'script':\n return this._sanitizer.bypassSecurityTrustScript(value);\n\n case 'url':\n return this._sanitizer.bypassSecurityTrustUrl(value);\n\n case 'resourceUrl':\n return this._sanitizer.bypassSecurityTrustResourceUrl(value);\n }\n\n throw new Error('type is not set');\n }\n}\n","import { Pipe, PipeTransform, inject } from '@angular/core';\nimport { SafeValue } from '@angular/platform-browser';\nimport { SantizationService } from './santization.service';\n\n@Pipe({\n name: 'santization',\n standalone: true,\n})\nexport class SantizationPipe implements PipeTransform {\n private readonly santizationService = inject(SantizationService);\n\n\n transform(\n value: string | null,\n type: 'html' | 'style' | 'script' | 'url' | 'resourceUrl' = 'url',\n ): SafeValue | null {\n return this.santizationService.transform(value, type);\n }\n}\n"],"mappings":";;;AAUA,IAAa,qBAAb,MAAa,mBAAkB;CAH/B,cAAA;EAIU,KAAA,aAAa,OAAqB,YAAY;CA6BvD;CA1BC,UACE,OACA,OAA4D,OAAK;EAEjE,IAAI,UAAU,MACZ,OAAO,KAAK,WAAW,SAAS,gBAAgB,MAAM,KAAK;EAE7D,QAAQ,MAAR;GACE,KAAK,QACH,OAAO,KAAK,WAAW,wBAAwB,KAAK;GAEtD,KAAK,SACH,OAAO,KAAK,WAAW,yBAAyB,KAAK;GAEvD,KAAK,UACH,OAAO,KAAK,WAAW,0BAA0B,KAAK;GAExD,KAAK,OACH,OAAO,KAAK,WAAW,uBAAuB,KAAK;G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