angular-toolbox 0.0.1 → 0.0.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/esm2020/lib/angular-toolbox.module.mjs +20 -0
- package/esm2020/public-api.mjs +2 -1
- package/fesm2015/angular-toolbox.mjs +19 -2
- package/fesm2015/angular-toolbox.mjs.map +1 -1
- package/fesm2020/angular-toolbox.mjs +19 -2
- package/fesm2020/angular-toolbox.mjs.map +1 -1
- package/lib/angular-toolbox.module.d.ts +7 -0
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { NgModule } from '@angular/core';
|
|
2
|
+
import { SafeHtmlPipe } from './pipe/safe/safe-html.pipe';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export class AngularToolboxModule {
|
|
5
|
+
}
|
|
6
|
+
AngularToolboxModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AngularToolboxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
7
|
+
AngularToolboxModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: AngularToolboxModule, declarations: [SafeHtmlPipe], exports: [SafeHtmlPipe] });
|
|
8
|
+
AngularToolboxModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AngularToolboxModule });
|
|
9
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AngularToolboxModule, decorators: [{
|
|
10
|
+
type: NgModule,
|
|
11
|
+
args: [{
|
|
12
|
+
declarations: [
|
|
13
|
+
SafeHtmlPipe
|
|
14
|
+
],
|
|
15
|
+
exports: [
|
|
16
|
+
SafeHtmlPipe
|
|
17
|
+
]
|
|
18
|
+
}]
|
|
19
|
+
}] });
|
|
20
|
+
//# sourceM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
|
1
1
|
/*
|
|
2
2
|
* Public API Surface of angular-toolbox
|
|
3
3
|
*/
|
|
4
|
+
export * from './lib/angular-toolbox.module';
|
|
4
5
|
export * from './lib/pipe';
|
|
5
6
|
export * from './lib/service';
|
|
6
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
7
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3Byb2plY3RzL2FuZ3VsYXItdG9vbGJveC9zcmMvcHVibGljLWFwaS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUVILGNBQWMsOEJBQThCLENBQUM7QUFDN0MsY0FBYyxZQUFZLENBQUM7QUFDM0IsY0FBYyxlQUFlLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKlxuICogUHVibGljIEFQSSBTdXJmYWNlIG9mIGFuZ3VsYXItdG9vbGJveFxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vbGliL2FuZ3VsYXItdG9vbGJveC5tb2R1bGUnO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvcGlwZSc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi9zZXJ2aWNlJztcbiJdfQ==
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Pipe, Injectable } from '@angular/core';
|
|
2
|
+
import { Pipe, NgModule, Injectable } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/platform-browser';
|
|
4
4
|
|
|
5
5
|
class SafeHtmlPipe {
|
|
@@ -17,6 +17,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
17
17
|
args: [{ name: 'safeHtml' }]
|
|
18
18
|
}], ctorParameters: function () { return [{ type: i1.DomSanitizer }]; } });
|
|
19
19
|
|
|
20
|
+
class AngularToolboxModule {
|
|
21
|
+
}
|
|
22
|
+
AngularToolboxModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AngularToolboxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
23
|
+
AngularToolboxModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: AngularToolboxModule, declarations: [SafeHtmlPipe], exports: [SafeHtmlPipe] });
|
|
24
|
+
AngularToolboxModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AngularToolboxModule });
|
|
25
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AngularToolboxModule, decorators: [{
|
|
26
|
+
type: NgModule,
|
|
27
|
+
args: [{
|
|
28
|
+
declarations: [
|
|
29
|
+
SafeHtmlPipe
|
|
30
|
+
],
|
|
31
|
+
exports: [
|
|
32
|
+
SafeHtmlPipe
|
|
33
|
+
]
|
|
34
|
+
}]
|
|
35
|
+
}] });
|
|
36
|
+
|
|
20
37
|
/**
|
|
21
38
|
* A lightweight service that helps to manage unregistration issues of Angular subscriptions.
|
|
22
39
|
*/
|
|
@@ -85,5 +102,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
85
102
|
* Generated bundle index. Do not edit.
|
|
86
103
|
*/
|
|
87
104
|
|
|
88
|
-
export { SafeHtmlPipe, SubscriptionService };
|
|
105
|
+
export { AngularToolboxModule, SafeHtmlPipe, SubscriptionService };
|
|
89
106
|
//# sourceMappingURL=angular-toolbox.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"angular-toolbox.mjs","sources":["../../../projects/angular-toolbox/src/lib/pipe/safe/safe-html.pipe.ts","../../../projects/angular-toolbox/src/lib/service/subscription/subscription.service.ts","../../../projects/angular-toolbox/src/public-api.ts","../../../projects/angular-toolbox/src/angular-toolbox.ts"],"sourcesContent":["import { DomSanitizer, SafeHtml } from '@angular/platform-browser'\r\nimport { PipeTransform, Pipe } from \"@angular/core\";\r\n\r\n@Pipe({ name: 'safeHtml'})\r\nexport class SafeHtmlPipe implements PipeTransform {\r\n\r\n constructor(private _sanitizer: DomSanitizer) {}\r\n\r\n public transform(value: string): SafeHtml {\r\n return this._sanitizer.bypassSecurityTrustHtml(value);\r\n }\r\n}","import { Injectable } from '@angular/core';\nimport { Subscription } from 'rxjs';\n\n@Injectable({\n providedIn: 'root'\n})\n/**\n * A lightweight service that helps to manage unregistration issues of Angular subscriptions.\n */\nexport class SubscriptionService {\n\n /**\n * The internal Subscription instances storage.\n */\n private _subMap: Map<String, Array<Subscription>> = new Map<String, Array<Subscription>>();\n\n /**\n * Stores a new Subscription instance associated with the specified reference.\n * \n * @param ref the reference for which to store a new Subscription instance.\n * @param subscription the Subscription instance to register.\n * @returns a reference to this SubscriptionService instance.\n */\n public register(ref: String, subscription: Subscription): SubscriptionService {\n if (!this._subMap.has(ref)) this._subMap.set(ref, []);\n this._subMap.get(ref)?.push(subscription);\n return this;\n }\n \n /**\n * Unsubscribes and removes all Subscription instances associated with the specified reference.\n * \n * @param ref the reference for which to remove all Subscription instances.\n * @returns true whether the specified reference exists; false otherwise.\n */\n public clearAll(ref: String): boolean {\n let result: boolean = false;\n if (this._subMap.has(ref)) {\n this._subMap.get(ref)?.forEach(subscription => subscription.unsubscribe());\n this._subMap.delete(ref);\n result = true;\n }\n return result;\n }\n\n /**\n * Returns all Subscription instances associated with the specified reference.\n * \n * @param ref the reference for which to remove get Subscription instances.\n * @returns all Subscription instances associated with the specified reference, or whether\n * the specified reference does not exists.\n */\n public get(ref: String): Array<Subscription> | null {\n return this._subMap.get(ref) || null;\n }\n}\n","/*\n * Public API Surface of angular-toolbox\n */\n\nexport * from './lib/pipe';\nexport * from './lib/service';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;MAIa,YAAY,CAAA;AAEvB,IAAA,WAAA,CAAoB,UAAwB,EAAA;AAAxB,QAAA,IAAU,CAAA,UAAA,GAAV,UAAU,CAAc;KAAI;AAEzC,IAAA,SAAS,CAAC,KAAa,EAAA;QAC5B,OAAO,IAAI,CAAC,UAAU,CAAC,uBAAuB,CAAC,KAAK,CAAC,CAAC;KACvD;;yGANU,YAAY,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,YAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA;uGAAZ,YAAY,EAAA,IAAA,EAAA,UAAA,EAAA,CAAA,CAAA;2FAAZ,YAAY,EAAA,UAAA,EAAA,CAAA;kBADxB,IAAI;mBAAC,EAAE,IAAI,EAAE,UAAU,EAAC,CAAA;;;
|
|
1
|
+
{"version":3,"file":"angular-toolbox.mjs","sources":["../../../projects/angular-toolbox/src/lib/pipe/safe/safe-html.pipe.ts","../../../projects/angular-toolbox/src/lib/angular-toolbox.module.ts","../../../projects/angular-toolbox/src/lib/service/subscription/subscription.service.ts","../../../projects/angular-toolbox/src/public-api.ts","../../../projects/angular-toolbox/src/angular-toolbox.ts"],"sourcesContent":["import { DomSanitizer, SafeHtml } from '@angular/platform-browser'\r\nimport { PipeTransform, Pipe } from \"@angular/core\";\r\n\r\n@Pipe({ name: 'safeHtml'})\r\nexport class SafeHtmlPipe implements PipeTransform {\r\n\r\n constructor(private _sanitizer: DomSanitizer) {}\r\n\r\n public transform(value: string): SafeHtml {\r\n return this._sanitizer.bypassSecurityTrustHtml(value);\r\n }\r\n}","import { NgModule } from '@angular/core';\r\nimport { SafeHtmlPipe } from './pipe/safe/safe-html.pipe';\r\n\r\n@NgModule({\r\n declarations: [\r\n SafeHtmlPipe\r\n ],\r\n exports: [\r\n SafeHtmlPipe\r\n ]\r\n})\r\nexport class AngularToolboxModule { }","import { Injectable } from '@angular/core';\nimport { Subscription } from 'rxjs';\n\n@Injectable({\n providedIn: 'root'\n})\n/**\n * A lightweight service that helps to manage unregistration issues of Angular subscriptions.\n */\nexport class SubscriptionService {\n\n /**\n * The internal Subscription instances storage.\n */\n private _subMap: Map<String, Array<Subscription>> = new Map<String, Array<Subscription>>();\n\n /**\n * Stores a new Subscription instance associated with the specified reference.\n * \n * @param ref the reference for which to store a new Subscription instance.\n * @param subscription the Subscription instance to register.\n * @returns a reference to this SubscriptionService instance.\n */\n public register(ref: String, subscription: Subscription): SubscriptionService {\n if (!this._subMap.has(ref)) this._subMap.set(ref, []);\n this._subMap.get(ref)?.push(subscription);\n return this;\n }\n \n /**\n * Unsubscribes and removes all Subscription instances associated with the specified reference.\n * \n * @param ref the reference for which to remove all Subscription instances.\n * @returns true whether the specified reference exists; false otherwise.\n */\n public clearAll(ref: String): boolean {\n let result: boolean = false;\n if (this._subMap.has(ref)) {\n this._subMap.get(ref)?.forEach(subscription => subscription.unsubscribe());\n this._subMap.delete(ref);\n result = true;\n }\n return result;\n }\n\n /**\n * Returns all Subscription instances associated with the specified reference.\n * \n * @param ref the reference for which to remove get Subscription instances.\n * @returns all Subscription instances associated with the specified reference, or whether\n * the specified reference does not exists.\n */\n public get(ref: String): Array<Subscription> | null {\n return this._subMap.get(ref) || null;\n }\n}\n","/*\n * Public API Surface of angular-toolbox\n */\n\nexport * from './lib/angular-toolbox.module';\nexport * from './lib/pipe';\nexport * from './lib/service';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;MAIa,YAAY,CAAA;AAEvB,IAAA,WAAA,CAAoB,UAAwB,EAAA;AAAxB,QAAA,IAAU,CAAA,UAAA,GAAV,UAAU,CAAc;KAAI;AAEzC,IAAA,SAAS,CAAC,KAAa,EAAA;QAC5B,OAAO,IAAI,CAAC,UAAU,CAAC,uBAAuB,CAAC,KAAK,CAAC,CAAC;KACvD;;yGANU,YAAY,EAAA,IAAA,EAA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angular/core';
|
|
2
|
-
import { Pipe, Injectable } from '@angular/core';
|
|
2
|
+
import { Pipe, NgModule, Injectable } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/platform-browser';
|
|
4
4
|
|
|
5
5
|
class SafeHtmlPipe {
|
|
@@ -17,6 +17,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
17
17
|
args: [{ name: 'safeHtml' }]
|
|
18
18
|
}], ctorParameters: function () { return [{ type: i1.DomSanitizer }]; } });
|
|
19
19
|
|
|
20
|
+
class AngularToolboxModule {
|
|
21
|
+
}
|
|
22
|
+
AngularToolboxModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AngularToolboxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
23
|
+
AngularToolboxModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: AngularToolboxModule, declarations: [SafeHtmlPipe], exports: [SafeHtmlPipe] });
|
|
24
|
+
AngularToolboxModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AngularToolboxModule });
|
|
25
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AngularToolboxModule, decorators: [{
|
|
26
|
+
type: NgModule,
|
|
27
|
+
args: [{
|
|
28
|
+
declarations: [
|
|
29
|
+
SafeHtmlPipe
|
|
30
|
+
],
|
|
31
|
+
exports: [
|
|
32
|
+
SafeHtmlPipe
|
|
33
|
+
]
|
|
34
|
+
}]
|
|
35
|
+
}] });
|
|
36
|
+
|
|
20
37
|
/**
|
|
21
38
|
* A lightweight service that helps to manage unregistration issues of Angular subscriptions.
|
|
22
39
|
*/
|
|
@@ -83,5 +100,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
83
100
|
* Generated bundle index. Do not edit.
|
|
84
101
|
*/
|
|
85
102
|
|
|
86
|
-
export { SafeHtmlPipe, SubscriptionService };
|
|
103
|
+
export { AngularToolboxModule, SafeHtmlPipe, SubscriptionService };
|
|
87
104
|
//# sourceMappingURL=angular-toolbox.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"angular-toolbox.mjs","sources":["../../../projects/angular-toolbox/src/lib/pipe/safe/safe-html.pipe.ts","../../../projects/angular-toolbox/src/lib/service/subscription/subscription.service.ts","../../../projects/angular-toolbox/src/public-api.ts","../../../projects/angular-toolbox/src/angular-toolbox.ts"],"sourcesContent":["import { DomSanitizer, SafeHtml } from '@angular/platform-browser'\r\nimport { PipeTransform, Pipe } from \"@angular/core\";\r\n\r\n@Pipe({ name: 'safeHtml'})\r\nexport class SafeHtmlPipe implements PipeTransform {\r\n\r\n constructor(private _sanitizer: DomSanitizer) {}\r\n\r\n public transform(value: string): SafeHtml {\r\n return this._sanitizer.bypassSecurityTrustHtml(value);\r\n }\r\n}","import { Injectable } from '@angular/core';\nimport { Subscription } from 'rxjs';\n\n@Injectable({\n providedIn: 'root'\n})\n/**\n * A lightweight service that helps to manage unregistration issues of Angular subscriptions.\n */\nexport class SubscriptionService {\n\n /**\n * The internal Subscription instances storage.\n */\n private _subMap: Map<String, Array<Subscription>> = new Map<String, Array<Subscription>>();\n\n /**\n * Stores a new Subscription instance associated with the specified reference.\n * \n * @param ref the reference for which to store a new Subscription instance.\n * @param subscription the Subscription instance to register.\n * @returns a reference to this SubscriptionService instance.\n */\n public register(ref: String, subscription: Subscription): SubscriptionService {\n if (!this._subMap.has(ref)) this._subMap.set(ref, []);\n this._subMap.get(ref)?.push(subscription);\n return this;\n }\n \n /**\n * Unsubscribes and removes all Subscription instances associated with the specified reference.\n * \n * @param ref the reference for which to remove all Subscription instances.\n * @returns true whether the specified reference exists; false otherwise.\n */\n public clearAll(ref: String): boolean {\n let result: boolean = false;\n if (this._subMap.has(ref)) {\n this._subMap.get(ref)?.forEach(subscription => subscription.unsubscribe());\n this._subMap.delete(ref);\n result = true;\n }\n return result;\n }\n\n /**\n * Returns all Subscription instances associated with the specified reference.\n * \n * @param ref the reference for which to remove get Subscription instances.\n * @returns all Subscription instances associated with the specified reference, or whether\n * the specified reference does not exists.\n */\n public get(ref: String): Array<Subscription> | null {\n return this._subMap.get(ref) || null;\n }\n}\n","/*\n * Public API Surface of angular-toolbox\n */\n\nexport * from './lib/pipe';\nexport * from './lib/service';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;MAIa,YAAY,CAAA;AAEvB,IAAA,WAAA,CAAoB,UAAwB,EAAA;QAAxB,IAAU,CAAA,UAAA,GAAV,UAAU,CAAc;KAAI;AAEzC,IAAA,SAAS,CAAC,KAAa,EAAA;QAC5B,OAAO,IAAI,CAAC,UAAU,CAAC,uBAAuB,CAAC,KAAK,CAAC,CAAC;KACvD;;yGANU,YAAY,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,YAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA;uGAAZ,YAAY,EAAA,IAAA,EAAA,UAAA,EAAA,CAAA,CAAA;2FAAZ,YAAY,EAAA,UAAA,EAAA,CAAA;kBADxB,IAAI;mBAAC,EAAE,IAAI,EAAE,UAAU,EAAC,CAAA;;;
|
|
1
|
+
{"version":3,"file":"angular-toolbox.mjs","sources":["../../../projects/angular-toolbox/src/lib/pipe/safe/safe-html.pipe.ts","../../../projects/angular-toolbox/src/lib/angular-toolbox.module.ts","../../../projects/angular-toolbox/src/lib/service/subscription/subscription.service.ts","../../../projects/angular-toolbox/src/public-api.ts","../../../projects/angular-toolbox/src/angular-toolbox.ts"],"sourcesContent":["import { DomSanitizer, SafeHtml } from '@angular/platform-browser'\r\nimport { PipeTransform, Pipe } from \"@angular/core\";\r\n\r\n@Pipe({ name: 'safeHtml'})\r\nexport class SafeHtmlPipe implements PipeTransform {\r\n\r\n constructor(private _sanitizer: DomSanitizer) {}\r\n\r\n public transform(value: string): SafeHtml {\r\n return this._sanitizer.bypassSecurityTrustHtml(value);\r\n }\r\n}","import { NgModule } from '@angular/core';\r\nimport { SafeHtmlPipe } from './pipe/safe/safe-html.pipe';\r\n\r\n@NgModule({\r\n declarations: [\r\n SafeHtmlPipe\r\n ],\r\n exports: [\r\n SafeHtmlPipe\r\n ]\r\n})\r\nexport class AngularToolboxModule { }","import { Injectable } from '@angular/core';\nimport { Subscription } from 'rxjs';\n\n@Injectable({\n providedIn: 'root'\n})\n/**\n * A lightweight service that helps to manage unregistration issues of Angular subscriptions.\n */\nexport class SubscriptionService {\n\n /**\n * The internal Subscription instances storage.\n */\n private _subMap: Map<String, Array<Subscription>> = new Map<String, Array<Subscription>>();\n\n /**\n * Stores a new Subscription instance associated with the specified reference.\n * \n * @param ref the reference for which to store a new Subscription instance.\n * @param subscription the Subscription instance to register.\n * @returns a reference to this SubscriptionService instance.\n */\n public register(ref: String, subscription: Subscription): SubscriptionService {\n if (!this._subMap.has(ref)) this._subMap.set(ref, []);\n this._subMap.get(ref)?.push(subscription);\n return this;\n }\n \n /**\n * Unsubscribes and removes all Subscription instances associated with the specified reference.\n * \n * @param ref the reference for which to remove all Subscription instances.\n * @returns true whether the specified reference exists; false otherwise.\n */\n public clearAll(ref: String): boolean {\n let result: boolean = false;\n if (this._subMap.has(ref)) {\n this._subMap.get(ref)?.forEach(subscription => subscription.unsubscribe());\n this._subMap.delete(ref);\n result = true;\n }\n return result;\n }\n\n /**\n * Returns all Subscription instances associated with the specified reference.\n * \n * @param ref the reference for which to remove get Subscription instances.\n * @returns all Subscription instances associated with the specified reference, or whether\n * the specified reference does not exists.\n */\n public get(ref: String): Array<Subscription> | null {\n return this._subMap.get(ref) || null;\n }\n}\n","/*\n * Public API Surface of angular-toolbox\n */\n\nexport * from './lib/angular-toolbox.module';\nexport * from './lib/pipe';\nexport * from './lib/service';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;MAIa,YAAY,CAAA;AAEvB,IAAA,WAAA,CAAoB,UAAwB,EAAA;QAAxB,IAAU,CAAA,UAAA,GAAV,UAAU,CAAc;KAAI;AAEzC,IAAA,SAAS,CAAC,KAAa,EAAA;QAC5B,OAAO,IAAI,CAAC,UAAU,CAAC,uBAAuB,CAAC,KAAK,CAAC,CAAC;KACvD;;yGANU,YAAY,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,YAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA;uGAAZ,YAAY,EAAA,IAAA,EAAA,UAAA,EAAA,CAAA,CAAA;2FAAZ,YAAY,EAAA,UAAA,EAAA,CAAA;kBADxB,IAAI;mBAAC,EAAE,IAAI,EAAE,UAAU,EAAC,CAAA;;;MCQZ,oBAAoB,CAAA;;iHAApB,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;kHAApB,oBAAoB,EAAA,YAAA,EAAA,CANzB,YAAY,CAAA,EAAA,OAAA,EAAA,CAGZ,YAAY,CAAA,EAAA,CAAA,CAAA;kHAGP,oBAAoB,EAAA,CAAA,CAAA;2FAApB,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBARhC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,YAAY,EAAE;wBACV,YAAY;AACf,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACL,YAAY;AACf,qBAAA;AACJ,iBAAA,CAAA;;;ACJD;;AAEG;MACU,mBAAmB,CAAA;AANhC,IAAA,WAAA,GAAA;AAQI;;AAEG;AACK,QAAA,IAAA,CAAA,OAAO,GAAqC,IAAI,GAAG,EAA+B,CAAC;AAyC9F,K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AA;kBAN/B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,UAAU,EAAE,MAAM;AACrB,iBAAA,CAAA;;;ACLD;;AAEG;;ACFH;;AAEG;;;;"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./pipe/safe/safe-html.pipe";
|
|
3
|
+
export declare class AngularToolboxModule {
|
|
4
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AngularToolboxModule, never>;
|
|
5
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<AngularToolboxModule, [typeof i1.SafeHtmlPipe], never, [typeof i1.SafeHtmlPipe]>;
|
|
6
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<AngularToolboxModule>;
|
|
7
|
+
}
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED