@ctrl/ngx-csv 5.0.0 → 6.0.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/README.md +7 -6
- package/csv.directive.d.ts +1 -1
- package/esm2020/csv.directive.mjs +3 -3
- package/esm2020/csv.module.mjs +4 -4
- package/fesm2015/ctrl-ngx-csv.mjs +7 -7
- package/fesm2015/ctrl-ngx-csv.mjs.map +1 -1
- package/fesm2020/ctrl-ngx-csv.mjs +7 -7
- package/fesm2020/ctrl-ngx-csv.mjs.map +1 -1
- package/{ctrl-ngx-csv.d.ts → index.d.ts} +0 -0
- package/package.json +4 -5
package/README.md
CHANGED
@@ -18,12 +18,13 @@ npm install @ctrl/ngx-csv
|
|
18
18
|
|
19
19
|
Latest version available for each version of Angular
|
20
20
|
|
21
|
-
| ngx-
|
22
|
-
|
|
23
|
-
| 2.1.1
|
24
|
-
| 3.0.1
|
25
|
-
| 4.0.0
|
26
|
-
|
|
21
|
+
| ngx-csv | Angular |
|
22
|
+
| ------- | ---------- |
|
23
|
+
| 2.1.1 | 8.x |
|
24
|
+
| 3.0.1 | 9.x |
|
25
|
+
| 4.0.0 | 10.x |
|
26
|
+
| 5.0.0 | 12.x, 13.x |
|
27
|
+
| current | >= 14.x |
|
27
28
|
|
28
29
|
### Import
|
29
30
|
|
package/csv.directive.d.ts
CHANGED
@@ -23,5 +23,5 @@ export declare class CsvDirective implements OnChanges {
|
|
23
23
|
constructor(sanitizer: DomSanitizer);
|
24
24
|
ngOnChanges(): void;
|
25
25
|
static ɵfac: i0.ɵɵFactoryDeclaration<CsvDirective, never>;
|
26
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<CsvDirective, "[csvLink]", never, { "data": "data"; "headers": "headers"; "delimiter": "delimiter"; "filename": "filename"; "uFEFF": "uFEFF"; "target": "target"; }, {}, never>;
|
26
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CsvDirective, "[csvLink]", never, { "data": "data"; "headers": "headers"; "delimiter": "delimiter"; "filename": "filename"; "uFEFF": "uFEFF"; "target": "target"; }, {}, never, never, false>;
|
27
27
|
}
|
@@ -23,9 +23,9 @@ export class CsvDirective {
|
|
23
23
|
this.href = this.sanitizer.bypassSecurityTrustResourceUrl(buildURI(this.data, this.uFEFF, this.headers, this.delimiter));
|
24
24
|
}
|
25
25
|
}
|
26
|
-
CsvDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
27
|
-
CsvDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
28
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
26
|
+
CsvDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: CsvDirective, deps: [{ token: i1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Directive });
|
27
|
+
CsvDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.2", type: CsvDirective, selector: "[csvLink]", inputs: { data: "data", headers: "headers", delimiter: "delimiter", filename: "filename", uFEFF: "uFEFF", target: "target" }, host: { properties: { "href": "this.href", "download": "this.download", "target": "this.target" } }, usesOnChanges: true, ngImport: i0 });
|
28
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: CsvDirective, decorators: [{
|
29
29
|
type: Directive,
|
30
30
|
args: [{ selector: '[csvLink]' }]
|
31
31
|
}], ctorParameters: function () { return [{ type: i1.DomSanitizer }]; }, propDecorators: { data: [{
|
package/esm2020/csv.module.mjs
CHANGED
@@ -3,10 +3,10 @@ import { CsvDirective } from './csv.directive';
|
|
3
3
|
import * as i0 from "@angular/core";
|
4
4
|
export class CsvModule {
|
5
5
|
}
|
6
|
-
CsvModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
7
|
-
CsvModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "
|
8
|
-
CsvModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
9
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
6
|
+
CsvModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: CsvModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
7
|
+
CsvModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.2", ngImport: i0, type: CsvModule, declarations: [CsvDirective], exports: [CsvDirective] });
|
8
|
+
CsvModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: CsvModule });
|
9
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: CsvModule, decorators: [{
|
10
10
|
type: NgModule,
|
11
11
|
args: [{
|
12
12
|
declarations: [CsvDirective],
|
@@ -76,9 +76,9 @@ class CsvDirective {
|
|
76
76
|
this.href = this.sanitizer.bypassSecurityTrustResourceUrl(buildURI(this.data, this.uFEFF, this.headers, this.delimiter));
|
77
77
|
}
|
78
78
|
}
|
79
|
-
CsvDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
80
|
-
CsvDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
81
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
79
|
+
CsvDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: CsvDirective, deps: [{ token: i1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Directive });
|
80
|
+
CsvDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.2", type: CsvDirective, selector: "[csvLink]", inputs: { data: "data", headers: "headers", delimiter: "delimiter", filename: "filename", uFEFF: "uFEFF", target: "target" }, host: { properties: { "href": "this.href", "download": "this.download", "target": "this.target" } }, usesOnChanges: true, ngImport: i0 });
|
81
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: CsvDirective, decorators: [{
|
82
82
|
type: Directive,
|
83
83
|
args: [{ selector: '[csvLink]' }]
|
84
84
|
}], ctorParameters: function () { return [{ type: i1.DomSanitizer }]; }, propDecorators: { data: [{
|
@@ -103,10 +103,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0", ngImpor
|
|
103
103
|
|
104
104
|
class CsvModule {
|
105
105
|
}
|
106
|
-
CsvModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
107
|
-
CsvModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "
|
108
|
-
CsvModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
109
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
106
|
+
CsvModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: CsvModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
107
|
+
CsvModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.2", ngImport: i0, type: CsvModule, declarations: [CsvDirective], exports: [CsvDirective] });
|
108
|
+
CsvModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: CsvModule });
|
109
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: CsvModule, decorators: [{
|
110
110
|
type: NgModule,
|
111
111
|
args: [{
|
112
112
|
declarations: [CsvDirective],
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ctrl-ngx-csv.mjs","sources":["../../src/lib/util.ts","../../src/lib/csv.directive.ts","../../src/lib/csv.module.ts","../../src/lib/ctrl-ngx-csv.ts"],"sourcesContent":["/* eslint-disable prefer-arrow/prefer-arrow-functions */\nexport interface HeaderObj {\n label: string;\n key: string;\n}\n\nexport const isJsons = (array: any[]) =>\n Array.isArray(array) &&\n array.every(row => typeof row === 'object' && !(row instanceof Array));\n\nexport const isArrays = (array: any[]) =>\n Array.isArray(array) && array.every(row => Array.isArray(row));\n\nexport function jsonsHeaders(array: object[]) {\n return Array.from(\n new Set(\n array.map(item => Object.keys(item)).reduce((a, b) => [...a, ...b], []),\n ),\n );\n}\n\nexport function jsons2arrays(\n jsons: { [key: string]: string }[],\n headers?: string[] | HeaderObj[],\n) {\n headers = headers || jsonsHeaders(jsons);\n\n // allow headers to have custom labels, defaulting to having the header data key be the label\n let headerLabels: string[] = headers as string[];\n let headerKeys: string[] = headers as string[];\n if (isJsons(headers)) {\n headerLabels = (headers as HeaderObj[]).map(header => header.label);\n headerKeys = (headers as HeaderObj[]).map(header => header.key);\n }\n\n const data = jsons.map(object =>\n headerKeys.map(header => (header in object ? object[header] : '')),\n );\n return [headerLabels, ...data];\n}\n\nexport const elementOrEmpty = (element: any) =>\n element || element === 0 ? element : '';\n\nexport function joiner(data: any, delimiter = ',') {\n return data\n .map((row: any, index: number) =>\n row.map((element: any) => '\"' + elementOrEmpty(element) + '\"').join(delimiter),\n )\n .join(`\\n`);\n}\n\nexport function arrays2csv(\n data: string[][],\n headers?: string[] | HeaderObj[],\n delimiter?: string,\n) {\n return joiner(headers ? [headers, ...data] : data, delimiter);\n}\n\nexport function jsons2csv(\n data: { [key: string]: string }[],\n headers?: string[] | HeaderObj[],\n delimiter?: string,\n) {\n return joiner(jsons2arrays(data, headers), delimiter);\n}\n\nexport function string2csv(\n data: string,\n headers?: string[],\n delimiter?: string,\n) {\n return headers ? `${headers.join(delimiter)}\\n${data}` : data;\n}\n\nexport function toCSV(\n data: string | string[][] | { [key: string]: string }[] | any[],\n headers?: string[] | HeaderObj[],\n delimiter?: string,\n) {\n if (isJsons(data as any)) {\n return jsons2csv(data as { [key: string]: string }[], headers, delimiter);\n }\n if (isArrays(data as any)) {\n return arrays2csv(data as string[][], headers, delimiter);\n }\n if (typeof data === 'string') {\n return string2csv(data, headers as string[], delimiter);\n }\n throw new TypeError(\n `Data should be a \"String\", \"Array of arrays\" OR \"Array of objects\" `,\n );\n}\n\nexport function blob(\n data: string | string[][] | { [key: string]: string }[] | any[],\n uFEFF = true,\n headers?: string[] | HeaderObj[],\n delimiter?: string,\n) {\n const csv = toCSV(data, headers, delimiter);\n return new Blob([uFEFF ? '\\uFEFF' : '', csv], { type: 'text/csv' });\n}\n\nexport function buildURI(\n data: string | string[][] | { [key: string]: string }[] | any[],\n uFEFF = true,\n headers?: string[] | HeaderObj[],\n delimiter?: string,\n) {\n return URL.createObjectURL(blob(data, uFEFF, headers, delimiter));\n}\n","import { Directive, HostBinding, Input, OnChanges } from '@angular/core';\nimport { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser';\n\nimport { buildURI, HeaderObj } from './util';\n\n@Directive({ selector: '[csvLink]' })\nexport class CsvDirective implements OnChanges {\n /** the body of the csv */\n @Input() data: string | string[][] | { [key: string]: string }[] | any[] = [];\n /** Set the first line of the csv */\n @Input() headers?: string[] | HeaderObj[];\n /** Set the seperator between values */\n @Input() delimiter = ',';\n /** Set the filename of the csv. Default is `data.csv` */\n @Input()\n set filename(a: string) {\n this.download = a;\n }\n /** adds a Byte order mark to setup the csv as UTF-8 */\n @Input() uFEFF = true;\n @HostBinding() href?: SafeResourceUrl;\n /** filename */\n @HostBinding() download = 'data.csv';\n @Input() @HostBinding() target = '_blank';\n\n constructor(private sanitizer: DomSanitizer) {}\n\n ngOnChanges() {\n this.href = this.sanitizer.bypassSecurityTrustResourceUrl(\n buildURI(this.data, this.uFEFF, this.headers, this.delimiter),\n );\n }\n}\n","import { NgModule } from '@angular/core';\n\nimport { CsvDirective } from './csv.directive';\n\n@NgModule({\n declarations: [CsvDirective],\n exports: [CsvDirective],\n})\nexport class CsvModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;
|
1
|
+
{"version":3,"file":"ctrl-ngx-csv.mjs","sources":["../../src/lib/util.ts","../../src/lib/csv.directive.ts","../../src/lib/csv.module.ts","../../src/lib/ctrl-ngx-csv.ts"],"sourcesContent":["/* eslint-disable prefer-arrow/prefer-arrow-functions */\nexport interface HeaderObj {\n label: string;\n key: string;\n}\n\nexport const isJsons = (array: any[]) =>\n Array.isArray(array) &&\n array.every(row => typeof row === 'object' && !(row instanceof Array));\n\nexport const isArrays = (array: any[]) =>\n Array.isArray(array) && array.every(row => Array.isArray(row));\n\nexport function jsonsHeaders(array: object[]) {\n return Array.from(\n new Set(\n array.map(item => Object.keys(item)).reduce((a, b) => [...a, ...b], []),\n ),\n );\n}\n\nexport function jsons2arrays(\n jsons: { [key: string]: string }[],\n headers?: string[] | HeaderObj[],\n) {\n headers = headers || jsonsHeaders(jsons);\n\n // allow headers to have custom labels, defaulting to having the header data key be the label\n let headerLabels: string[] = headers as string[];\n let headerKeys: string[] = headers as string[];\n if (isJsons(headers)) {\n headerLabels = (headers as HeaderObj[]).map(header => header.label);\n headerKeys = (headers as HeaderObj[]).map(header => header.key);\n }\n\n const data = jsons.map(object =>\n headerKeys.map(header => (header in object ? object[header] : '')),\n );\n return [headerLabels, ...data];\n}\n\nexport const elementOrEmpty = (element: any) =>\n element || element === 0 ? element : '';\n\nexport function joiner(data: any, delimiter = ',') {\n return data\n .map((row: any, index: number) =>\n row.map((element: any) => '\"' + elementOrEmpty(element) + '\"').join(delimiter),\n )\n .join(`\\n`);\n}\n\nexport function arrays2csv(\n data: string[][],\n headers?: string[] | HeaderObj[],\n delimiter?: string,\n) {\n return joiner(headers ? [headers, ...data] : data, delimiter);\n}\n\nexport function jsons2csv(\n data: { [key: string]: string }[],\n headers?: string[] | HeaderObj[],\n delimiter?: string,\n) {\n return joiner(jsons2arrays(data, headers), delimiter);\n}\n\nexport function string2csv(\n data: string,\n headers?: string[],\n delimiter?: string,\n) {\n return headers ? `${headers.join(delimiter)}\\n${data}` : data;\n}\n\nexport function toCSV(\n data: string | string[][] | { [key: string]: string }[] | any[],\n headers?: string[] | HeaderObj[],\n delimiter?: string,\n) {\n if (isJsons(data as any)) {\n return jsons2csv(data as { [key: string]: string }[], headers, delimiter);\n }\n if (isArrays(data as any)) {\n return arrays2csv(data as string[][], headers, delimiter);\n }\n if (typeof data === 'string') {\n return string2csv(data, headers as string[], delimiter);\n }\n throw new TypeError(\n `Data should be a \"String\", \"Array of arrays\" OR \"Array of objects\" `,\n );\n}\n\nexport function blob(\n data: string | string[][] | { [key: string]: string }[] | any[],\n uFEFF = true,\n headers?: string[] | HeaderObj[],\n delimiter?: string,\n) {\n const csv = toCSV(data, headers, delimiter);\n return new Blob([uFEFF ? '\\uFEFF' : '', csv], { type: 'text/csv' });\n}\n\nexport function buildURI(\n data: string | string[][] | { [key: string]: string }[] | any[],\n uFEFF = true,\n headers?: string[] | HeaderObj[],\n delimiter?: string,\n) {\n return URL.createObjectURL(blob(data, uFEFF, headers, delimiter));\n}\n","import { Directive, HostBinding, Input, OnChanges } from '@angular/core';\nimport { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser';\n\nimport { buildURI, HeaderObj } from './util';\n\n@Directive({ selector: '[csvLink]' })\nexport class CsvDirective implements OnChanges {\n /** the body of the csv */\n @Input() data: string | string[][] | { [key: string]: string }[] | any[] = [];\n /** Set the first line of the csv */\n @Input() headers?: string[] | HeaderObj[];\n /** Set the seperator between values */\n @Input() delimiter = ',';\n /** Set the filename of the csv. Default is `data.csv` */\n @Input()\n set filename(a: string) {\n this.download = a;\n }\n /** adds a Byte order mark to setup the csv as UTF-8 */\n @Input() uFEFF = true;\n @HostBinding() href?: SafeResourceUrl;\n /** filename */\n @HostBinding() download = 'data.csv';\n @Input() @HostBinding() target = '_blank';\n\n constructor(private sanitizer: DomSanitizer) {}\n\n ngOnChanges() {\n this.href = this.sanitizer.bypassSecurityTrustResourceUrl(\n buildURI(this.data, this.uFEFF, this.headers, this.delimiter),\n );\n }\n}\n","import { NgModule } from '@angular/core';\n\nimport { CsvDirective } from './csv.directive';\n\n@NgModule({\n declarations: [CsvDirective],\n exports: [CsvDirective],\n})\nexport class CsvModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;AAMO,MAAM,OAAO,GAAG,CAAC,KAAY,KAClC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;AACpB,IAAA,KAAK,CAAC,KAAK,CAAC,GAAG,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,EAAE,GAAG,YAAY,KAAK,CAAC,EAAE;AAElE,MAAM,QAAQ,GAAG,CAAC,KAAY,KACnC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,KAAK,CAAC,GAAG,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;AAE3D,SAAU,YAAY,CAAC,KAAe,EAAA;IAC1C,OAAO,KAAK,CAAC,IAAI,CACf,IAAI,GAAG,CACL,KAAK,CAAC,GAAG,CAAC,IAAI,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC,EAAE,EAAE,CAAC,CACxE,CACF,CAAC;AACJ,CAAC;AAEe,SAAA,YAAY,CAC1B,KAAkC,EAClC,OAAgC,EAAA;AAEhC,IAAA,OAAO,GAAG,OAAO,IAAI,YAAY,CAAC,KAAK,CAAC,CAAC;;IAGzC,IAAI,YAAY,GAAa,OAAmB,CAAC;IACjD,IAAI,UAAU,GAAa,OAAmB,CAAC;AAC/C,IAAA,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE;AACpB,QAAA,YAAY,GAAI,OAAuB,CAAC,GAAG,CAAC,MAAM,IAAI,MAAM,CAAC,KAAK,CAAC,CA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AAI,EAAA,CAAA;sBAAZ,KAAK;gBAEG,OAAO,EAAA,CAAA;sBAAf,KAAK;gBAEG,SAAS,EAAA,CAAA;sBAAjB,KAAK;gBAGF,QAAQ,EAAA,CAAA;sBADX,KAAK;gBAKG,KAAK,EAAA,CAAA;sBAAb,KAAK;gBACS,IAAI,EAAA,CAAA;sBAAlB,WAAW;gBAEG,QAAQ,EAAA,CAAA;sBAAtB,WAAW;gBACY,MAAM,EAAA,CAAA;sBAA7B,KAAK;;sBAAI,WAAW;;;MCfV,SAAS,CAAA;;sGAAT,SAAS,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;uGAAT,SAAS,EAAA,YAAA,EAAA,CAHL,YAAY,CAAA,EAAA,OAAA,EAAA,CACjB,YAAY,CAAA,EAAA,CAAA,CAAA;uGAEX,SAAS,EAAA,CAAA,CAAA;2FAAT,SAAS,EAAA,UAAA,EAAA,CAAA;kBAJrB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,YAAY,CAAC;oBAC5B,OAAO,EAAE,CAAC,YAAY,CAAC;iBACxB,CAAA;;;ACPD;;AAEG;;;;"}
|
@@ -76,9 +76,9 @@ class CsvDirective {
|
|
76
76
|
this.href = this.sanitizer.bypassSecurityTrustResourceUrl(buildURI(this.data, this.uFEFF, this.headers, this.delimiter));
|
77
77
|
}
|
78
78
|
}
|
79
|
-
CsvDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
80
|
-
CsvDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
81
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
79
|
+
CsvDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: CsvDirective, deps: [{ token: i1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Directive });
|
80
|
+
CsvDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.2", type: CsvDirective, selector: "[csvLink]", inputs: { data: "data", headers: "headers", delimiter: "delimiter", filename: "filename", uFEFF: "uFEFF", target: "target" }, host: { properties: { "href": "this.href", "download": "this.download", "target": "this.target" } }, usesOnChanges: true, ngImport: i0 });
|
81
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: CsvDirective, decorators: [{
|
82
82
|
type: Directive,
|
83
83
|
args: [{ selector: '[csvLink]' }]
|
84
84
|
}], ctorParameters: function () { return [{ type: i1.DomSanitizer }]; }, propDecorators: { data: [{
|
@@ -103,10 +103,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0", ngImpor
|
|
103
103
|
|
104
104
|
class CsvModule {
|
105
105
|
}
|
106
|
-
CsvModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
107
|
-
CsvModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "
|
108
|
-
CsvModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
109
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
106
|
+
CsvModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: CsvModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
107
|
+
CsvModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.2", ngImport: i0, type: CsvModule, declarations: [CsvDirective], exports: [CsvDirective] });
|
108
|
+
CsvModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: CsvModule });
|
109
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: CsvModule, decorators: [{
|
110
110
|
type: NgModule,
|
111
111
|
args: [{
|
112
112
|
declarations: [CsvDirective],
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ctrl-ngx-csv.mjs","sources":["../../src/lib/util.ts","../../src/lib/csv.directive.ts","../../src/lib/csv.module.ts","../../src/lib/ctrl-ngx-csv.ts"],"sourcesContent":["/* eslint-disable prefer-arrow/prefer-arrow-functions */\nexport interface HeaderObj {\n label: string;\n key: string;\n}\n\nexport const isJsons = (array: any[]) =>\n Array.isArray(array) &&\n array.every(row => typeof row === 'object' && !(row instanceof Array));\n\nexport const isArrays = (array: any[]) =>\n Array.isArray(array) && array.every(row => Array.isArray(row));\n\nexport function jsonsHeaders(array: object[]) {\n return Array.from(\n new Set(\n array.map(item => Object.keys(item)).reduce((a, b) => [...a, ...b], []),\n ),\n );\n}\n\nexport function jsons2arrays(\n jsons: { [key: string]: string }[],\n headers?: string[] | HeaderObj[],\n) {\n headers = headers || jsonsHeaders(jsons);\n\n // allow headers to have custom labels, defaulting to having the header data key be the label\n let headerLabels: string[] = headers as string[];\n let headerKeys: string[] = headers as string[];\n if (isJsons(headers)) {\n headerLabels = (headers as HeaderObj[]).map(header => header.label);\n headerKeys = (headers as HeaderObj[]).map(header => header.key);\n }\n\n const data = jsons.map(object =>\n headerKeys.map(header => (header in object ? object[header] : '')),\n );\n return [headerLabels, ...data];\n}\n\nexport const elementOrEmpty = (element: any) =>\n element || element === 0 ? element : '';\n\nexport function joiner(data: any, delimiter = ',') {\n return data\n .map((row: any, index: number) =>\n row.map((element: any) => '\"' + elementOrEmpty(element) + '\"').join(delimiter),\n )\n .join(`\\n`);\n}\n\nexport function arrays2csv(\n data: string[][],\n headers?: string[] | HeaderObj[],\n delimiter?: string,\n) {\n return joiner(headers ? [headers, ...data] : data, delimiter);\n}\n\nexport function jsons2csv(\n data: { [key: string]: string }[],\n headers?: string[] | HeaderObj[],\n delimiter?: string,\n) {\n return joiner(jsons2arrays(data, headers), delimiter);\n}\n\nexport function string2csv(\n data: string,\n headers?: string[],\n delimiter?: string,\n) {\n return headers ? `${headers.join(delimiter)}\\n${data}` : data;\n}\n\nexport function toCSV(\n data: string | string[][] | { [key: string]: string }[] | any[],\n headers?: string[] | HeaderObj[],\n delimiter?: string,\n) {\n if (isJsons(data as any)) {\n return jsons2csv(data as { [key: string]: string }[], headers, delimiter);\n }\n if (isArrays(data as any)) {\n return arrays2csv(data as string[][], headers, delimiter);\n }\n if (typeof data === 'string') {\n return string2csv(data, headers as string[], delimiter);\n }\n throw new TypeError(\n `Data should be a \"String\", \"Array of arrays\" OR \"Array of objects\" `,\n );\n}\n\nexport function blob(\n data: string | string[][] | { [key: string]: string }[] | any[],\n uFEFF = true,\n headers?: string[] | HeaderObj[],\n delimiter?: string,\n) {\n const csv = toCSV(data, headers, delimiter);\n return new Blob([uFEFF ? '\\uFEFF' : '', csv], { type: 'text/csv' });\n}\n\nexport function buildURI(\n data: string | string[][] | { [key: string]: string }[] | any[],\n uFEFF = true,\n headers?: string[] | HeaderObj[],\n delimiter?: string,\n) {\n return URL.createObjectURL(blob(data, uFEFF, headers, delimiter));\n}\n","import { Directive, HostBinding, Input, OnChanges } from '@angular/core';\nimport { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser';\n\nimport { buildURI, HeaderObj } from './util';\n\n@Directive({ selector: '[csvLink]' })\nexport class CsvDirective implements OnChanges {\n /** the body of the csv */\n @Input() data: string | string[][] | { [key: string]: string }[] | any[] = [];\n /** Set the first line of the csv */\n @Input() headers?: string[] | HeaderObj[];\n /** Set the seperator between values */\n @Input() delimiter = ',';\n /** Set the filename of the csv. Default is `data.csv` */\n @Input()\n set filename(a: string) {\n this.download = a;\n }\n /** adds a Byte order mark to setup the csv as UTF-8 */\n @Input() uFEFF = true;\n @HostBinding() href?: SafeResourceUrl;\n /** filename */\n @HostBinding() download = 'data.csv';\n @Input() @HostBinding() target = '_blank';\n\n constructor(private sanitizer: DomSanitizer) {}\n\n ngOnChanges() {\n this.href = this.sanitizer.bypassSecurityTrustResourceUrl(\n buildURI(this.data, this.uFEFF, this.headers, this.delimiter),\n );\n }\n}\n","import { NgModule } from '@angular/core';\n\nimport { CsvDirective } from './csv.directive';\n\n@NgModule({\n declarations: [CsvDirective],\n exports: [CsvDirective],\n})\nexport class CsvModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;
|
1
|
+
{"version":3,"file":"ctrl-ngx-csv.mjs","sources":["../../src/lib/util.ts","../../src/lib/csv.directive.ts","../../src/lib/csv.module.ts","../../src/lib/ctrl-ngx-csv.ts"],"sourcesContent":["/* eslint-disable prefer-arrow/prefer-arrow-functions */\nexport interface HeaderObj {\n label: string;\n key: string;\n}\n\nexport const isJsons = (array: any[]) =>\n Array.isArray(array) &&\n array.every(row => typeof row === 'object' && !(row instanceof Array));\n\nexport const isArrays = (array: any[]) =>\n Array.isArray(array) && array.every(row => Array.isArray(row));\n\nexport function jsonsHeaders(array: object[]) {\n return Array.from(\n new Set(\n array.map(item => Object.keys(item)).reduce((a, b) => [...a, ...b], []),\n ),\n );\n}\n\nexport function jsons2arrays(\n jsons: { [key: string]: string }[],\n headers?: string[] | HeaderObj[],\n) {\n headers = headers || jsonsHeaders(jsons);\n\n // allow headers to have custom labels, defaulting to having the header data key be the label\n let headerLabels: string[] = headers as string[];\n let headerKeys: string[] = headers as string[];\n if (isJsons(headers)) {\n headerLabels = (headers as HeaderObj[]).map(header => header.label);\n headerKeys = (headers as HeaderObj[]).map(header => header.key);\n }\n\n const data = jsons.map(object =>\n headerKeys.map(header => (header in object ? object[header] : '')),\n );\n return [headerLabels, ...data];\n}\n\nexport const elementOrEmpty = (element: any) =>\n element || element === 0 ? element : '';\n\nexport function joiner(data: any, delimiter = ',') {\n return data\n .map((row: any, index: number) =>\n row.map((element: any) => '\"' + elementOrEmpty(element) + '\"').join(delimiter),\n )\n .join(`\\n`);\n}\n\nexport function arrays2csv(\n data: string[][],\n headers?: string[] | HeaderObj[],\n delimiter?: string,\n) {\n return joiner(headers ? [headers, ...data] : data, delimiter);\n}\n\nexport function jsons2csv(\n data: { [key: string]: string }[],\n headers?: string[] | HeaderObj[],\n delimiter?: string,\n) {\n return joiner(jsons2arrays(data, headers), delimiter);\n}\n\nexport function string2csv(\n data: string,\n headers?: string[],\n delimiter?: string,\n) {\n return headers ? `${headers.join(delimiter)}\\n${data}` : data;\n}\n\nexport function toCSV(\n data: string | string[][] | { [key: string]: string }[] | any[],\n headers?: string[] | HeaderObj[],\n delimiter?: string,\n) {\n if (isJsons(data as any)) {\n return jsons2csv(data as { [key: string]: string }[], headers, delimiter);\n }\n if (isArrays(data as any)) {\n return arrays2csv(data as string[][], headers, delimiter);\n }\n if (typeof data === 'string') {\n return string2csv(data, headers as string[], delimiter);\n }\n throw new TypeError(\n `Data should be a \"String\", \"Array of arrays\" OR \"Array of objects\" `,\n );\n}\n\nexport function blob(\n data: string | string[][] | { [key: string]: string }[] | any[],\n uFEFF = true,\n headers?: string[] | HeaderObj[],\n delimiter?: string,\n) {\n const csv = toCSV(data, headers, delimiter);\n return new Blob([uFEFF ? '\\uFEFF' : '', csv], { type: 'text/csv' });\n}\n\nexport function buildURI(\n data: string | string[][] | { [key: string]: string }[] | any[],\n uFEFF = true,\n headers?: string[] | HeaderObj[],\n delimiter?: string,\n) {\n return URL.createObjectURL(blob(data, uFEFF, headers, delimiter));\n}\n","import { Directive, HostBinding, Input, OnChanges } from '@angular/core';\nimport { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser';\n\nimport { buildURI, HeaderObj } from './util';\n\n@Directive({ selector: '[csvLink]' })\nexport class CsvDirective implements OnChanges {\n /** the body of the csv */\n @Input() data: string | string[][] | { [key: string]: string }[] | any[] = [];\n /** Set the first line of the csv */\n @Input() headers?: string[] | HeaderObj[];\n /** Set the seperator between values */\n @Input() delimiter = ',';\n /** Set the filename of the csv. Default is `data.csv` */\n @Input()\n set filename(a: string) {\n this.download = a;\n }\n /** adds a Byte order mark to setup the csv as UTF-8 */\n @Input() uFEFF = true;\n @HostBinding() href?: SafeResourceUrl;\n /** filename */\n @HostBinding() download = 'data.csv';\n @Input() @HostBinding() target = '_blank';\n\n constructor(private sanitizer: DomSanitizer) {}\n\n ngOnChanges() {\n this.href = this.sanitizer.bypassSecurityTrustResourceUrl(\n buildURI(this.data, this.uFEFF, this.headers, this.delimiter),\n );\n }\n}\n","import { NgModule } from '@angular/core';\n\nimport { CsvDirective } from './csv.directive';\n\n@NgModule({\n declarations: [CsvDirective],\n exports: [CsvDirective],\n})\nexport class CsvModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;AAMO,MAAM,OAAO,GAAG,CAAC,KAAY,KAClC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;AACpB,IAAA,KAAK,CAAC,KAAK,CAAC,GAAG,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,EAAE,GAAG,YAAY,KAAK,CAAC,EAAE;AAElE,MAAM,QAAQ,GAAG,CAAC,KAAY,KACnC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,KAAK,CAAC,GAAG,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;AAE3D,SAAU,YAAY,CAAC,KAAe,EAAA;IAC1C,OAAO,KAAK,CAAC,IAAI,CACf,IAAI,GAAG,CACL,KAAK,CAAC,GAAG,CAAC,IAAI,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC,EAAE,EAAE,CAAC,CACxE,CACF,CAAC;AACJ,CAAC;AAEe,SAAA,YAAY,CAC1B,KAAkC,EAClC,OAAgC,EAAA;AAEhC,IAAA,OAAO,GAAG,OAAO,IAAI,YAAY,CAAC,KAAK,CAAC,CAAC;;IAGzC,IAAI,YAAY,GAAa,OAAmB,CAAC;IACjD,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A,EAAA,EAAA,CAAA,CAAA;2FAAZ,YAAY,EAAA,UAAA,EAAA,CAAA;kBADxB,SAAS;mBAAC,EAAE,QAAQ,EAAE,WAAW,EAAE,CAAA;mGAGzB,IAAI,EAAA,CAAA;sBAAZ,KAAK;gBAEG,OAAO,EAAA,CAAA;sBAAf,KAAK;gBAEG,SAAS,EAAA,CAAA;sBAAjB,KAAK;gBAGF,QAAQ,EAAA,CAAA;sBADX,KAAK;gBAKG,KAAK,EAAA,CAAA;sBAAb,KAAK;gBACS,IAAI,EAAA,CAAA;sBAAlB,WAAW;gBAEG,QAAQ,EAAA,CAAA;sBAAtB,WAAW;gBACY,MAAM,EAAA,CAAA;sBAA7B,KAAK;;sBAAI,WAAW;;;MCfV,SAAS,CAAA;;sGAAT,SAAS,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;uGAAT,SAAS,EAAA,YAAA,EAAA,CAHL,YAAY,CAAA,EAAA,OAAA,EAAA,CACjB,YAAY,CAAA,EAAA,CAAA,CAAA;uGAEX,SAAS,EAAA,CAAA,CAAA;2FAAT,SAAS,EAAA,UAAA,EAAA,CAAA;kBAJrB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,YAAY,CAAC;oBAC5B,OAAO,EAAE,CAAC,YAAY,CAAC;AACxB,iBAAA,CAAA;;;ACPD;;AAEG;;;;"}
|
File without changes
|
package/package.json
CHANGED
@@ -1,13 +1,12 @@
|
|
1
1
|
{
|
2
|
-
"$schema": "../../node_modules/ng-packagr/package.schema.json",
|
3
2
|
"name": "@ctrl/ngx-csv",
|
4
3
|
"description": "Easily generate a CSV download in the browser with Angular",
|
5
4
|
"publishConfig": {
|
6
5
|
"access": "public"
|
7
6
|
},
|
8
|
-
"version": "
|
7
|
+
"version": "6.0.0",
|
9
8
|
"peerDependencies": {
|
10
|
-
"@angular/core": ">=
|
9
|
+
"@angular/core": ">=14.0.0-0"
|
11
10
|
},
|
12
11
|
"repository": "scttcper/ngx-csv",
|
13
12
|
"homepage": "https://ngx-csv.vercel.app",
|
@@ -23,13 +22,13 @@
|
|
23
22
|
"esm2020": "esm2020/ctrl-ngx-csv.mjs",
|
24
23
|
"fesm2020": "fesm2020/ctrl-ngx-csv.mjs",
|
25
24
|
"fesm2015": "fesm2015/ctrl-ngx-csv.mjs",
|
26
|
-
"typings": "
|
25
|
+
"typings": "index.d.ts",
|
27
26
|
"exports": {
|
28
27
|
"./package.json": {
|
29
28
|
"default": "./package.json"
|
30
29
|
},
|
31
30
|
".": {
|
32
|
-
"types": "./
|
31
|
+
"types": "./index.d.ts",
|
33
32
|
"esm2020": "./esm2020/ctrl-ngx-csv.mjs",
|
34
33
|
"es2020": "./fesm2020/ctrl-ngx-csv.mjs",
|
35
34
|
"es2015": "./fesm2015/ctrl-ngx-csv.mjs",
|