ng2csv 6.0.0 → 7.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/fesm2022/ng2csv.mjs +7 -7
- package/index.d.ts +50 -5
- package/package.json +1 -1
- package/lib/auto-csv-row-mapper.class.d.ts +0 -9
- package/lib/csv-configuration.class.d.ts +0 -8
- package/lib/csv-row-mapper.interface.d.ts +0 -4
- package/lib/ng2csv.module.d.ts +0 -6
- package/lib/ng2csv.service.d.ts +0 -12
- package/lib/ordered-projection-csv-row-mapper.class.d.ts +0 -7
- package/public-api.d.ts +0 -6
package/fesm2022/ng2csv.mjs
CHANGED
|
@@ -127,10 +127,10 @@ class Ng2CsvService {
|
|
|
127
127
|
}
|
|
128
128
|
return value;
|
|
129
129
|
}
|
|
130
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
131
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
130
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: Ng2CsvService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
131
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: Ng2CsvService, providedIn: 'root' }); }
|
|
132
132
|
}
|
|
133
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
133
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: Ng2CsvService, decorators: [{
|
|
134
134
|
type: Injectable,
|
|
135
135
|
args: [{
|
|
136
136
|
providedIn: 'root'
|
|
@@ -138,11 +138,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
|
138
138
|
}] });
|
|
139
139
|
|
|
140
140
|
class Ng2CsvModule {
|
|
141
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
142
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
143
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
141
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: Ng2CsvModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
142
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.6", ngImport: i0, type: Ng2CsvModule }); }
|
|
143
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: Ng2CsvModule }); }
|
|
144
144
|
}
|
|
145
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
145
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: Ng2CsvModule, decorators: [{
|
|
146
146
|
type: NgModule,
|
|
147
147
|
args: [{}]
|
|
148
148
|
}] });
|
package/index.d.ts
CHANGED
|
@@ -1,5 +1,50 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
|
|
3
|
+
declare class CsvConfiguration {
|
|
4
|
+
delimiter: string;
|
|
5
|
+
quote: string;
|
|
6
|
+
newLine: string;
|
|
7
|
+
includeHeaderLine: boolean;
|
|
8
|
+
outputValueForNull: string;
|
|
9
|
+
outputValueForUndefined: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
interface ICsvRowMapper<T> {
|
|
13
|
+
getColumnNames(): string[];
|
|
14
|
+
map(obj: T): string[];
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
declare class Ng2CsvService {
|
|
18
|
+
download<T>(data: T[], filename: string, csvRowMapper?: ICsvRowMapper<T>, config?: CsvConfiguration): void;
|
|
19
|
+
convertToCsv<T>(data: T[], csvRowMapper?: ICsvRowMapper<T>, config?: CsvConfiguration): string;
|
|
20
|
+
private mapNullOrUndefinedValues;
|
|
21
|
+
private escapeQuotes;
|
|
22
|
+
private escapeRowValue;
|
|
23
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<Ng2CsvService, never>;
|
|
24
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<Ng2CsvService>;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
declare class Ng2CsvModule {
|
|
28
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<Ng2CsvModule, never>;
|
|
29
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<Ng2CsvModule, never, never, never>;
|
|
30
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<Ng2CsvModule>;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
declare class AutoCsvRowMapper<T> implements ICsvRowMapper<T> {
|
|
34
|
+
private derivedCsvRowMapper;
|
|
35
|
+
constructor(data: T[]);
|
|
36
|
+
getColumnNames(): string[];
|
|
37
|
+
map(obj: T): string[];
|
|
38
|
+
private createProjection;
|
|
39
|
+
private getAllKeys;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
declare class OrderedProjectionCsvRowMapper<T> implements ICsvRowMapper<T> {
|
|
43
|
+
private projections;
|
|
44
|
+
constructor(projections: Array<[string, (obj: T) => string]>);
|
|
45
|
+
getColumnNames(): string[];
|
|
46
|
+
map(obj: T): string[];
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export { AutoCsvRowMapper, CsvConfiguration, Ng2CsvModule, Ng2CsvService, OrderedProjectionCsvRowMapper };
|
|
50
|
+
export type { ICsvRowMapper };
|
package/package.json
CHANGED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ICsvRowMapper } from './csv-row-mapper.interface';
|
|
2
|
-
export declare class AutoCsvRowMapper<T> implements ICsvRowMapper<T> {
|
|
3
|
-
private derivedCsvRowMapper;
|
|
4
|
-
constructor(data: T[]);
|
|
5
|
-
getColumnNames(): string[];
|
|
6
|
-
map(obj: T): string[];
|
|
7
|
-
private createProjection;
|
|
8
|
-
private getAllKeys;
|
|
9
|
-
}
|
package/lib/ng2csv.module.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
export declare class Ng2CsvModule {
|
|
3
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<Ng2CsvModule, never>;
|
|
4
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<Ng2CsvModule, never, never, never>;
|
|
5
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<Ng2CsvModule>;
|
|
6
|
-
}
|
package/lib/ng2csv.service.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { CsvConfiguration } from './csv-configuration.class';
|
|
2
|
-
import { ICsvRowMapper } from './csv-row-mapper.interface';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class Ng2CsvService {
|
|
5
|
-
download<T>(data: T[], filename: string, csvRowMapper?: ICsvRowMapper<T>, config?: CsvConfiguration): void;
|
|
6
|
-
convertToCsv<T>(data: T[], csvRowMapper?: ICsvRowMapper<T>, config?: CsvConfiguration): string;
|
|
7
|
-
private mapNullOrUndefinedValues;
|
|
8
|
-
private escapeQuotes;
|
|
9
|
-
private escapeRowValue;
|
|
10
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<Ng2CsvService, never>;
|
|
11
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<Ng2CsvService>;
|
|
12
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { ICsvRowMapper } from './csv-row-mapper.interface';
|
|
2
|
-
export declare class OrderedProjectionCsvRowMapper<T> implements ICsvRowMapper<T> {
|
|
3
|
-
private projections;
|
|
4
|
-
constructor(projections: Array<[string, (obj: T) => string]>);
|
|
5
|
-
getColumnNames(): string[];
|
|
6
|
-
map(obj: T): string[];
|
|
7
|
-
}
|
package/public-api.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export * from './lib/ng2csv.service';
|
|
2
|
-
export * from './lib/ng2csv.module';
|
|
3
|
-
export * from './lib/auto-csv-row-mapper.class';
|
|
4
|
-
export * from './lib/csv-configuration.class';
|
|
5
|
-
export * from './lib/csv-row-mapper.interface';
|
|
6
|
-
export * from './lib/ordered-projection-csv-row-mapper.class';
|