coer-elements 0.0.26 → 0.0.27
Sign up to get free protection for your applications and to get access to all the features.
@@ -1,16 +1,16 @@
|
|
1
1
|
import { Pipe } from '@angular/core';
|
2
|
-
import {
|
2
|
+
import { Tools } from 'coer-elements/tools';
|
3
3
|
import * as i0 from "@angular/core";
|
4
4
|
export class NoImagePipe {
|
5
5
|
transform(value) {
|
6
|
-
const NO_IMAGE = '
|
6
|
+
const NO_IMAGE = 'coer-elements/images/no-image.png';
|
7
7
|
if (Tools.IsOnlyWhiteSpace(value)) {
|
8
8
|
return NO_IMAGE;
|
9
9
|
}
|
10
10
|
else if (typeof value === 'string') {
|
11
11
|
return value;
|
12
12
|
}
|
13
|
-
Files.ConvertToBase64(value).then(base64 => { return base64
|
13
|
+
//Files.ConvertToBase64(value as File).then(base64 => { return base64 });
|
14
14
|
return NO_IMAGE;
|
15
15
|
}
|
16
16
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NoImagePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
@@ -20,4 +20,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
20
20
|
type: Pipe,
|
21
21
|
args: [{ name: 'noImage' }]
|
22
22
|
}] });
|
23
|
-
//# sourceMappingURL=data:application/json;base64,
|
23
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibm8taW1hZ2UucGlwZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2NvZXItZWxlbWVudHMvcGlwZXMvbGliL25vLWltYWdlLnBpcGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLElBQUksRUFBaUIsTUFBTSxlQUFlLENBQUM7QUFDcEQsT0FBTyxFQUFTLEtBQUssRUFBRSxNQUFNLHFCQUFxQixD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XHJcbiAgICAgICAgZWxzZSBpZiAodHlwZW9mIHZhbHVlID09PSAnc3RyaW5nJykge1xyXG4gICAgICAgICAgICByZXR1cm4gdmFsdWU7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICAvL0ZpbGVzLkNvbnZlcnRUb0Jhc2U2NCh2YWx1ZSBhcyBGaWxlKS50aGVuKGJhc2U2NCA9PiB7IHJldHVybiBiYXNlNjQgfSk7XHJcbiAgICAgICAgcmV0dXJuIE5PX0lNQUdFO1xyXG4gICAgfVxyXG59Il19
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import * as i0 from '@angular/core';
|
2
2
|
import { Pipe, NgModule } from '@angular/core';
|
3
3
|
import * as i1 from '@angular/platform-browser';
|
4
|
-
import { Tools
|
4
|
+
import { Tools } from 'coer-elements/tools';
|
5
5
|
|
6
6
|
class HtmlPipe {
|
7
7
|
constructor(sanitizer) {
|
@@ -20,14 +20,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
20
20
|
|
21
21
|
class NoImagePipe {
|
22
22
|
transform(value) {
|
23
|
-
const NO_IMAGE = '
|
23
|
+
const NO_IMAGE = 'coer-elements/images/no-image.png';
|
24
24
|
if (Tools.IsOnlyWhiteSpace(value)) {
|
25
25
|
return NO_IMAGE;
|
26
26
|
}
|
27
27
|
else if (typeof value === 'string') {
|
28
28
|
return value;
|
29
29
|
}
|
30
|
-
Files.ConvertToBase64(value).then(base64 => { return base64
|
30
|
+
//Files.ConvertToBase64(value as File).then(base64 => { return base64 });
|
31
31
|
return NO_IMAGE;
|
32
32
|
}
|
33
33
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NoImagePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"coer-elements-pipes.mjs","sources":["../../../projects/coer-elements/pipes/lib/html.pipe.ts","../../../projects/coer-elements/pipes/lib/no-image.pipe.ts","../../../projects/coer-elements/pipes/lib/numeric-format.pipe.ts","../../../projects/coer-elements/pipes/lib/pipes.module.ts","../../../projects/coer-elements/pipes/coer-elements-pipes.ts"],"sourcesContent":["import { Pipe, PipeTransform } from '@angular/core';\r\nimport { DomSanitizer } from '@angular/platform-browser';\r\n\r\n@Pipe({ name: 'html' })\r\nexport class HtmlPipe implements PipeTransform {\r\n\r\n constructor(private sanitizer: DomSanitizer) {}\r\n\r\n transform(value: string): any {\r\n return this.sanitizer.bypassSecurityTrustHtml(value);\r\n }\r\n}","import { Pipe, PipeTransform } from '@angular/core'
|
1
|
+
{"version":3,"file":"coer-elements-pipes.mjs","sources":["../../../projects/coer-elements/pipes/lib/html.pipe.ts","../../../projects/coer-elements/pipes/lib/no-image.pipe.ts","../../../projects/coer-elements/pipes/lib/numeric-format.pipe.ts","../../../projects/coer-elements/pipes/lib/pipes.module.ts","../../../projects/coer-elements/pipes/coer-elements-pipes.ts"],"sourcesContent":["import { Pipe, PipeTransform } from '@angular/core';\r\nimport { DomSanitizer } from '@angular/platform-browser';\r\n\r\n@Pipe({ name: 'html' })\r\nexport class HtmlPipe implements PipeTransform {\r\n\r\n constructor(private sanitizer: DomSanitizer) {}\r\n\r\n transform(value: string): any {\r\n return this.sanitizer.bypassSecurityTrustHtml(value);\r\n }\r\n}","import { Pipe, PipeTransform } from '@angular/core';\r\nimport { Files, Tools } from 'coer-elements/tools';\r\n\r\n@Pipe({ name: 'noImage' })\r\nexport class NoImagePipe implements PipeTransform {\r\n\r\n transform(value: string | File | null | undefined): string {\r\n const NO_IMAGE = 'coer-elements/images/no-image.png';\r\n\r\n if(Tools.IsOnlyWhiteSpace(value) ) {\r\n return NO_IMAGE;\r\n }\r\n\r\n else if (typeof value === 'string') {\r\n return value;\r\n }\r\n\r\n //Files.ConvertToBase64(value as File).then(base64 => { return base64 });\r\n return NO_IMAGE;\r\n }\r\n}","import { Pipe, PipeTransform } from '@angular/core';\r\nimport { Tools } from 'coer-elements/tools';\r\n\r\n@Pipe({ name: 'numericFormat' })\r\nexport class NumericFormatPipe implements PipeTransform {\r\n\r\n transform(value: string | number | null | undefined, decimals: number = 0): string {\r\n return Tools.GetNumericFormat(value, decimals);\r\n }\r\n}","import { NgModule } from '@angular/core';\r\n\r\n//Pipes\r\nimport { HtmlPipe } from './html.pipe';\r\nimport { NoImagePipe } from './no-image.pipe';\r\nimport { NumericFormatPipe } from './numeric-format.pipe';\r\n\r\n@NgModule({\r\n declarations: [\r\n HtmlPipe,\r\n NoImagePipe,\r\n NumericFormatPipe\r\n ],\r\n exports: [\r\n HtmlPipe,\r\n NoImagePipe,\r\n NumericFormatPipe\r\n ]\r\n})\r\nexport class PipesModule { }","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;MAIa,QAAQ,CAAA;AAEjB,IAAA,WAAA,CAAoB,SAAuB,EAAA;QAAvB,IAAS,CAAA,SAAA,GAAT,SAAS,CAAc;KAAI;AAE/C,IAAA,SAAS,CAAC,KAAa,EAAA;QACnB,OAAO,IAAI,CAAC,SAAS,CAAC,uBAAuB,CAAC,KAAK,CAAC,CAAC;KACxD;+GANQ,QAAQ,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,YAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA,EAAA;6GAAR,QAAQ,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,CAAA,EAAA;;4FAAR,QAAQ,EAAA,UAAA,EAAA,CAAA;kBADpB,IAAI;mBAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAA;;;MCCT,WAAW,CAAA;AAEpB,IAAA,SAAS,CAAC,KAAuC,EAAA;QAC7C,MAAM,QAAQ,GAAG,mCAAmC,CAAC;AAErD,QAAA,IAAG,KAAK,CAAC,gBAAgB,CAAC,KAAK,CAAC,EAAG;AAC/B,Y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