@sumaris-net/ngx-components 2.8.1-beta7 → 2.8.1
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/doc/changelog.md +2 -0
- package/esm2022/src/app/shared/file/csv.utils.mjs +17 -1
- package/esm2022/src/app/shared/file/json.utils.mjs +9 -1
- package/fesm2022/sumaris-net.ngx-components.mjs +24 -0
- package/fesm2022/sumaris-net.ngx-components.mjs.map +1 -1
- package/package.json +1 -1
- package/src/app/shared/file/csv.utils.d.ts +5 -0
- package/src/app/shared/file/json.utils.d.ts +3 -0
- package/src/assets/i18n/en-US.json +7 -0
- package/src/assets/i18n/en.json +7 -0
- package/src/assets/i18n/fr.json +7 -0
- package/src/assets/manifest.json +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
2
|
import { FileEvent } from '../upload-file/upload-file.model';
|
|
3
|
+
import { TranslateService } from '@ngx-translate/core';
|
|
3
4
|
export declare class CsvUtils {
|
|
5
|
+
static DEFAULT_SEPARATOR: string;
|
|
6
|
+
static DEFAULT_ENCODING: string;
|
|
4
7
|
static exportToFile(rows: object[], opts?: {
|
|
5
8
|
filename?: string;
|
|
6
9
|
headers?: string[];
|
|
@@ -16,4 +19,6 @@ export declare class CsvUtils {
|
|
|
16
19
|
separator?: string;
|
|
17
20
|
skipEmptyLine?: boolean;
|
|
18
21
|
}): string[][];
|
|
22
|
+
static getLocalizedSeparator(translate?: TranslateService, defaultSeparator?: string): string;
|
|
23
|
+
static getLocalizedEncoding(translate: TranslateService, defaultEncoding?: string): string;
|
|
19
24
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
2
|
import { FileEvent } from '../upload-file/upload-file.model';
|
|
3
|
+
import { TranslateService } from '@ngx-translate/core';
|
|
3
4
|
export declare class JsonUtils {
|
|
5
|
+
static DEFAULT_ENCODING: string;
|
|
4
6
|
static exportToFile(content: any, opts?: {
|
|
5
7
|
filename?: string;
|
|
6
8
|
encoding?: string;
|
|
@@ -13,4 +15,5 @@ export declare class JsonUtils {
|
|
|
13
15
|
static parseFile<T = any>(file: File, opts?: {
|
|
14
16
|
encoding?: string;
|
|
15
17
|
}): Observable<FileEvent<T>>;
|
|
18
|
+
static getLocalizedEncoding(translate: TranslateService, defaultEncoding?: string): string;
|
|
16
19
|
}
|
|
@@ -529,6 +529,13 @@
|
|
|
529
529
|
}
|
|
530
530
|
},
|
|
531
531
|
"FILE": {
|
|
532
|
+
"JSON": {
|
|
533
|
+
"ENCODING": "UTF-8"
|
|
534
|
+
},
|
|
535
|
+
"CSV": {
|
|
536
|
+
"SEPARATOR": ",",
|
|
537
|
+
"ENCODING": "UTF-8"
|
|
538
|
+
},
|
|
532
539
|
"UPLOAD": {
|
|
533
540
|
"DRAG_AND_DROP": "Drag and drop a file{{ extension }} here<br/>or",
|
|
534
541
|
"BROWSE": "Browse",
|
package/src/assets/i18n/en.json
CHANGED
|
@@ -529,6 +529,13 @@
|
|
|
529
529
|
}
|
|
530
530
|
},
|
|
531
531
|
"FILE": {
|
|
532
|
+
"JSON": {
|
|
533
|
+
"ENCODING": "UTF-8"
|
|
534
|
+
},
|
|
535
|
+
"CSV": {
|
|
536
|
+
"SEPARATOR": ",",
|
|
537
|
+
"ENCODING": "UTF-8"
|
|
538
|
+
},
|
|
532
539
|
"UPLOAD": {
|
|
533
540
|
"DRAG_AND_DROP": "Drag and drop a file{{ extension }} here<br/>or",
|
|
534
541
|
"BROWSE": "Browse",
|
package/src/assets/i18n/fr.json
CHANGED
|
@@ -529,6 +529,13 @@
|
|
|
529
529
|
}
|
|
530
530
|
},
|
|
531
531
|
"FILE": {
|
|
532
|
+
"JSON": {
|
|
533
|
+
"ENCODING": "UTF-8"
|
|
534
|
+
},
|
|
535
|
+
"CSV": {
|
|
536
|
+
"SEPARATOR": ";",
|
|
537
|
+
"ENCODING": "UTF-8"
|
|
538
|
+
},
|
|
532
539
|
"UPLOAD": {
|
|
533
540
|
"DRAG_AND_DROP": "Glisser et déposer un fichier{{ extension }} ici<br/>ou",
|
|
534
541
|
"BROWSE": "Parcourir",
|
package/src/assets/manifest.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "ngx-sumaris-components",
|
|
3
3
|
"short_name": "ngx-sumaris-components",
|
|
4
4
|
"manifest_version": 1,
|
|
5
|
-
"version": "2.8.1
|
|
5
|
+
"version": "2.8.1",
|
|
6
6
|
"default_locale": "fr",
|
|
7
7
|
"description": "Angular components for building beautiful and responsive Apps",
|
|
8
8
|
"icons": [{
|