@rxap/pipes 12.0.3 → 13.0.0-next.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/LICENSE +1 -1
- package/README.md +17 -1
- package/collection.json +10 -0
- package/esm2020/index.mjs +7 -0
- package/esm2020/lib/currency.pipe.mjs +67 -0
- package/esm2020/lib/delete-identifier.pipe.mjs +38 -0
- package/esm2020/lib/escape-quotation-mark.pipe.mjs +34 -0
- package/esm2020/lib/get-from-object.pipe.mjs +29 -0
- package/esm2020/lib/replace.pipe.mjs +28 -0
- package/esm2020/lib/to-display.pipe.mjs +32 -0
- package/esm2020/rxap-pipes.mjs +5 -0
- package/esm2020/santization/lib/santization.module.mjs +17 -0
- package/esm2020/santization/lib/santization.pipe.mjs +21 -0
- package/esm2020/santization/lib/santization.service.mjs +37 -0
- package/esm2020/santization/public_api.mjs +4 -0
- package/esm2020/santization/rxap-pipes-santization.mjs +5 -0
- package/fesm2015/rxap-pipes-santization.mjs +77 -0
- package/fesm2015/rxap-pipes-santization.mjs.map +1 -0
- package/fesm2015/{rxap-pipes.js → rxap-pipes.mjs} +43 -43
- package/fesm2015/rxap-pipes.mjs.map +1 -0
- package/{fesm2015/rxap-pipes-santization.js → fesm2020/rxap-pipes-santization.mjs} +11 -11
- package/fesm2020/rxap-pipes-santization.mjs.map +1 -0
- package/fesm2020/rxap-pipes.mjs +222 -0
- package/fesm2020/rxap-pipes.mjs.map +1 -0
- package/migration.json +4 -0
- package/package.json +44 -17
- package/santization/package.json +5 -5
- package/src/schematics/ng-add/index.d.ts +2 -0
- package/src/schematics/ng-add/index.js +8 -0
- package/src/schematics/ng-add/index.js.map +1 -0
- package/src/schematics/ng-add/schema.json +7 -0
- package/bundles/rxap-pipes-santization.umd.js +0 -114
- package/bundles/rxap-pipes-santization.umd.js.map +0 -1
- package/bundles/rxap-pipes.umd.js +0 -617
- package/bundles/rxap-pipes.umd.js.map +0 -1
- package/esm2015/index.js +0 -7
- package/esm2015/index.js.map +0 -1
- package/esm2015/lib/currency.pipe.js +0 -67
- package/esm2015/lib/currency.pipe.js.map +0 -1
- package/esm2015/lib/delete-identifier.pipe.js +0 -38
- package/esm2015/lib/delete-identifier.pipe.js.map +0 -1
- package/esm2015/lib/escape-quotation-mark.pipe.js +0 -34
- package/esm2015/lib/escape-quotation-mark.pipe.js.map +0 -1
- package/esm2015/lib/get-from-object.pipe.js +0 -29
- package/esm2015/lib/get-from-object.pipe.js.map +0 -1
- package/esm2015/lib/replace.pipe.js +0 -28
- package/esm2015/lib/replace.pipe.js.map +0 -1
- package/esm2015/lib/to-display.pipe.js +0 -32
- package/esm2015/lib/to-display.pipe.js.map +0 -1
- package/esm2015/rxap-pipes.js +0 -5
- package/esm2015/rxap-pipes.js.map +0 -1
- package/esm2015/santization/lib/santization.module.js +0 -17
- package/esm2015/santization/lib/santization.module.js.map +0 -1
- package/esm2015/santization/lib/santization.pipe.js +0 -21
- package/esm2015/santization/lib/santization.pipe.js.map +0 -1
- package/esm2015/santization/lib/santization.service.js +0 -37
- package/esm2015/santization/lib/santization.service.js.map +0 -1
- package/esm2015/santization/public_api.js +0 -4
- package/esm2015/santization/public_api.js.map +0 -1
- package/esm2015/santization/rxap-pipes-santization.js +0 -5
- package/esm2015/santization/rxap-pipes-santization.js.map +0 -1
- package/fesm2015/rxap-pipes-santization.js.map +0 -1
- package/fesm2015/rxap-pipes.js.map +0 -1
- package/schematics/collection.json +0 -4
- package/schematics/index.d.ts +0 -1
- package/schematics/index.js +0 -3
- package/schematics/index.js.map +0 -1
- package/schematics/migration.json +0 -4
package/santization/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"fesm2015": "../fesm2015/rxap-pipes-santization.
|
|
2
|
+
"module": "../fesm2015/rxap-pipes-santization.mjs",
|
|
3
|
+
"es2020": "../fesm2020/rxap-pipes-santization.mjs",
|
|
4
|
+
"esm2020": "../esm2020/santization/rxap-pipes-santization.mjs",
|
|
5
|
+
"fesm2020": "../fesm2020/rxap-pipes-santization.mjs",
|
|
6
|
+
"fesm2015": "../fesm2015/rxap-pipes-santization.mjs",
|
|
7
7
|
"typings": "rxap-pipes-santization.d.ts",
|
|
8
8
|
"sideEffects": false,
|
|
9
9
|
"name": "@rxap/pipes/santization"
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const schematics_utilities_1 = require("@rxap/schematics-utilities");
|
|
4
|
+
function default_1() {
|
|
5
|
+
return (0, schematics_utilities_1.InstallPeerDependencies)();
|
|
6
|
+
}
|
|
7
|
+
exports.default = default_1;
|
|
8
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../libs/pipes/src/schematics/ng-add/index.ts"],"names":[],"mappings":";;AACA,qEAAqE;AAErE;IACE,OAAO,IAAA,8CAAuB,GAAE,CAAC;AACnC,CAAC;AAFD,4BAEC"}
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/platform-browser')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@rxap/pipes/santization', ['exports', '@angular/core', '@angular/platform-browser'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.rxap = global.rxap || {}, global.rxap.pipes = global.rxap.pipes || {}, global.rxap.pipes.santization = {}), global.ng.core, global.ng.platformBrowser));
|
|
5
|
-
}(this, (function (exports, i0, i1) { 'use strict';
|
|
6
|
-
|
|
7
|
-
function _interopNamespace(e) {
|
|
8
|
-
if (e && e.__esModule) return e;
|
|
9
|
-
var n = Object.create(null);
|
|
10
|
-
if (e) {
|
|
11
|
-
Object.keys(e).forEach(function (k) {
|
|
12
|
-
if (k !== 'default') {
|
|
13
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
14
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
15
|
-
enumerable: true,
|
|
16
|
-
get: function () {
|
|
17
|
-
return e[k];
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
n['default'] = e;
|
|
24
|
-
return Object.freeze(n);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
|
|
28
|
-
var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
|
|
29
|
-
|
|
30
|
-
// TODO : move to @rxap/services
|
|
31
|
-
var SantizationService = /** @class */ (function () {
|
|
32
|
-
function SantizationService(_sanitizer) {
|
|
33
|
-
this._sanitizer = _sanitizer;
|
|
34
|
-
}
|
|
35
|
-
SantizationService.prototype.transform = function (value, type) {
|
|
36
|
-
if (type === void 0) { type = 'url'; }
|
|
37
|
-
switch (type) {
|
|
38
|
-
case 'html':
|
|
39
|
-
return this._sanitizer.bypassSecurityTrustHtml(value);
|
|
40
|
-
case 'style':
|
|
41
|
-
return this._sanitizer.bypassSecurityTrustStyle(value);
|
|
42
|
-
case 'script':
|
|
43
|
-
return this._sanitizer.bypassSecurityTrustScript(value);
|
|
44
|
-
case 'url':
|
|
45
|
-
return this._sanitizer.bypassSecurityTrustUrl(value);
|
|
46
|
-
case 'resourceUrl':
|
|
47
|
-
return this._sanitizer.bypassSecurityTrustResourceUrl(value);
|
|
48
|
-
}
|
|
49
|
-
throw new Error('type is not set');
|
|
50
|
-
};
|
|
51
|
-
return SantizationService;
|
|
52
|
-
}());
|
|
53
|
-
SantizationService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: SantizationService, deps: [{ token: i1.DomSanitizer }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
54
|
-
SantizationService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: SantizationService, providedIn: 'root' });
|
|
55
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: SantizationService, decorators: [{
|
|
56
|
-
type: i0.Injectable,
|
|
57
|
-
args: [{
|
|
58
|
-
providedIn: 'root'
|
|
59
|
-
}]
|
|
60
|
-
}], ctorParameters: function () {
|
|
61
|
-
return [{ type: i1__namespace.DomSanitizer, decorators: [{
|
|
62
|
-
type: i0.Inject,
|
|
63
|
-
args: [i1.DomSanitizer]
|
|
64
|
-
}] }];
|
|
65
|
-
} });
|
|
66
|
-
|
|
67
|
-
var SantizationPipe = /** @class */ (function () {
|
|
68
|
-
function SantizationPipe(santizationService) {
|
|
69
|
-
this.santizationService = santizationService;
|
|
70
|
-
}
|
|
71
|
-
SantizationPipe.prototype.transform = function (value, type) {
|
|
72
|
-
if (type === void 0) { type = 'url'; }
|
|
73
|
-
return this.santizationService.transform(value, type);
|
|
74
|
-
};
|
|
75
|
-
return SantizationPipe;
|
|
76
|
-
}());
|
|
77
|
-
SantizationPipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: SantizationPipe, deps: [{ token: SantizationService }], target: i0__namespace.ɵɵFactoryTarget.Pipe });
|
|
78
|
-
SantizationPipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: SantizationPipe, name: "santization" });
|
|
79
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: SantizationPipe, decorators: [{
|
|
80
|
-
type: i0.Pipe,
|
|
81
|
-
args: [{
|
|
82
|
-
name: 'santization',
|
|
83
|
-
}]
|
|
84
|
-
}], ctorParameters: function () { return [{ type: SantizationService }]; } });
|
|
85
|
-
|
|
86
|
-
var SantizationModule = /** @class */ (function () {
|
|
87
|
-
function SantizationModule() {
|
|
88
|
-
}
|
|
89
|
-
return SantizationModule;
|
|
90
|
-
}());
|
|
91
|
-
SantizationModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: SantizationModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
92
|
-
SantizationModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: SantizationModule, declarations: [SantizationPipe], exports: [SantizationPipe] });
|
|
93
|
-
SantizationModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: SantizationModule, imports: [[]] });
|
|
94
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: SantizationModule, decorators: [{
|
|
95
|
-
type: i0.NgModule,
|
|
96
|
-
args: [{
|
|
97
|
-
declarations: [SantizationPipe],
|
|
98
|
-
imports: [],
|
|
99
|
-
exports: [SantizationPipe]
|
|
100
|
-
}]
|
|
101
|
-
}] });
|
|
102
|
-
|
|
103
|
-
/**
|
|
104
|
-
* Generated bundle index. Do not edit.
|
|
105
|
-
*/
|
|
106
|
-
|
|
107
|
-
exports.SantizationModule = SantizationModule;
|
|
108
|
-
exports.SantizationPipe = SantizationPipe;
|
|
109
|
-
exports.SantizationService = SantizationService;
|
|
110
|
-
|
|
111
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
112
|
-
|
|
113
|
-
})));
|
|
114
|
-
//# sourceMappingURL=rxap-pipes-santization.umd.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rxap-pipes-santization.umd.js","sources":["../../../../libs/pipes/santization/src/lib/santization.service.ts","../../../../libs/pipes/santization/src/lib/santization.pipe.ts","../../../../libs/pipes/santization/src/lib/santization.module.ts","../../../../libs/pipes/santization/src/rxap-pipes-santization.ts"],"sourcesContent":["import {\n Inject,\n Injectable\n} 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 constructor(@Inject(DomSanitizer) private _sanitizer: DomSanitizer) {}\n\n transform(\n value: string,\n type: 'html' | 'style' | 'script' | 'url' | 'resourceUrl' = 'url'\n ): SafeValue {\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 } from '@angular/core';\nimport { SafeValue } from '@angular/platform-browser';\nimport { SantizationService } from './santization.service';\n\n@Pipe({\n name: 'santization',\n})\nexport class SantizationPipe implements PipeTransform {\n constructor(private readonly santizationService: SantizationService) {}\n\n transform(\n value: string,\n type: 'html' | 'style' | 'script' | 'url' | 'resourceUrl' = 'url',\n ): SafeValue {\n return this.santizationService.transform(value, type);\n }\n}\n","import { NgModule } from '@angular/core';\nimport { SantizationPipe } from './santization.pipe';\n\n@NgModule({\n declarations: [ SantizationPipe ],\n imports: [],\n exports: [ SantizationPipe ]\n})\nexport class SantizationModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["DomSanitizer","Injectable","Inject","Pipe","NgModule"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;IASA;;QAKE,4BAA0C,UAAwB;YAAxB,eAAU,GAAV,UAAU,CAAc;SAAI;QAEtE,sCAAS,GA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