coer-elements 0.0.86 → 0.0.88
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/fesm2022/coer-elements-components.mjs +2 -2
- package/fesm2022/coer-elements-components.mjs.map +1 -1
- package/fesm2022/coer-elements-pipes.mjs +6 -2
- package/fesm2022/coer-elements-pipes.mjs.map +1 -1
- package/images/loading.gif +0 -0
- package/package.json +1 -1
- package/pipes/lib/no-image.pipe.d.ts +1 -1
@@ -19,8 +19,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImpor
|
|
19
19
|
}], ctorParameters: () => [{ type: i1.DomSanitizer }] });
|
20
20
|
|
21
21
|
class NoImagePipe {
|
22
|
-
transform(value) {
|
23
|
-
|
22
|
+
transform(value, type = 'IMAGE') {
|
23
|
+
if (typeof value == 'string' && value.trim().toUpperCase() == 'LOADING')
|
24
|
+
return 'coer-elements/images/loading.gif';
|
25
|
+
let NO_IMAGE = (type === 'IMAGE')
|
26
|
+
? 'coer-elements/images/no-image.png'
|
27
|
+
: 'coer-elements/images/no-user.png';
|
24
28
|
if (Tools.IsOnlyWhiteSpace(value)) {
|
25
29
|
return NO_IMAGE;
|
26
30
|
}
|
@@ -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', standalone: false })\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', standalone: false })\r\nexport class NoImagePipe implements PipeTransform {\r\n\r\n transform(value: string | File | null | undefined): string {\r\n
|
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', standalone: false })\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', standalone: false })\r\nexport class NoImagePipe implements PipeTransform {\r\n\r\n transform(value: string | File | null | undefined, type: 'IMAGE' | 'USER' = 'IMAGE'): string {\r\n\r\n if (typeof value == 'string' && value.trim().toUpperCase() == 'LOADING')\r\n return 'coer-elements/images/loading.gif';\r\n\r\n let NO_IMAGE = (type === 'IMAGE') \r\n ? 'coer-elements/images/no-image.png'\r\n : 'coer-elements/images/no-user.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', standalone: false })\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;;AAE7B,IAAA,SAAS,CAAC,KAAa,EAAA;QACnB,OAAO,IAAI,CAAC,SAAS,CAAC,uBAAuB,CAAC,KAAK,CAAC;;8GAL/C,QAAQ,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,YAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA;4GAAR,QAAQ,EAAA,YAAA,EAAA,KAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,CAAA;;2FAAR,QAAQ,EAAA,UAAA,EAAA,CAAA;kBADpB,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE;;;MCC5B,WAAW,CAAA;AAEpB,IAAA,SAAS,CAAC,KAAuC,EAAE,IAAA,GAAyB,OAAO,EAAA;AAE/E,QAAA,IAAI,OAAO,KAAK,IAAI,QAAQ,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,IAAI,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CAAA;AAAX,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAW,iBAVhB,QAAQ;YACR,WAAW;AACX,YAAA,iBAAiB,aAGjB,QAAQ;YACR,WAAW;YACX,iBAAiB,CAAA,EAAA,CAAA,CAAA;+GAGZ,WAAW,EAAA,CAAA,CAAA;;2FAAX,WAAW,EAAA,UAAA,EAAA,CAAA;kBAZvB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,YAAY,EAAE;wBACV,QAAQ;wBACR,WAAW;wBACX;AACH,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACL,QAAQ;wBACR,WAAW;wBACX;AACH;AACJ,iBAAA;;;AClBD;;AAEG;;;;"}
|
Binary file
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import { PipeTransform } from '@angular/core';
|
2
2
|
import * as i0 from "@angular/core";
|
3
3
|
export declare class NoImagePipe implements PipeTransform {
|
4
|
-
transform(value: string | File | null | undefined): string;
|
4
|
+
transform(value: string | File | null | undefined, type?: 'IMAGE' | 'USER'): string;
|
5
5
|
static ɵfac: i0.ɵɵFactoryDeclaration<NoImagePipe, never>;
|
6
6
|
static ɵpipe: i0.ɵɵPipeDeclaration<NoImagePipe, "noImage", false>;
|
7
7
|
}
|