@sumaris-net/ngx-components 2.8.1-beta6 → 2.8.1-beta8
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 +5 -0
- package/esm2022/src/app/shared/file/csv.utils.mjs +17 -1
- package/esm2022/src/app/shared/file/json.utils.mjs +9 -1
- package/esm2022/src/app/shared/functions.mjs +6 -1
- package/esm2022/src/app/shared/pipes/pipes.module.mjs +6 -3
- package/esm2022/src/app/shared/pipes/property.pipes.mjs +25 -12
- package/esm2022/src/app/shared/pipes/string.pipes.mjs +1 -1
- package/fesm2022/sumaris-net.ngx-components.mjs +189 -144
- 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/app/shared/functions.d.ts +4 -0
- package/src/app/shared/inputs.d.ts +1 -1
- package/src/app/shared/pipes/pipes.module.d.ts +1 -1
- package/src/app/shared/pipes/property.pipes.d.ts +10 -1
- 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
|
}
|
|
@@ -99,6 +99,10 @@ export declare function removeAll<T>(array: T[], predicate: (value: T) => boolea
|
|
|
99
99
|
export declare function remove<T>(array: T[], predicate: (value: T) => boolean): T;
|
|
100
100
|
export declare function capitalizeFirstLetter(value: string): string;
|
|
101
101
|
export declare function uncapitalizeFirstLetter(value: string): string;
|
|
102
|
+
export declare function booleanToString(value: any, opts?: {
|
|
103
|
+
yesLabel: string;
|
|
104
|
+
noLabel: string;
|
|
105
|
+
}): string;
|
|
102
106
|
export declare function splitByProperty<T, M extends KeyValueType<T> = KeyValueType<T>>(array: T[] | readonly T[], propertyName: keyof T | string): M;
|
|
103
107
|
export declare function splitById<T, M extends KeyValueType<T> = KeyValueType<T>>(array: T[] | readonly T[]): M;
|
|
104
108
|
/**
|
|
@@ -16,7 +16,7 @@ export interface InputElement extends FocusableElement {
|
|
|
16
16
|
}
|
|
17
17
|
export declare function isInputElement(object: any): object is InputElement;
|
|
18
18
|
export declare function asInputElement(object: ElementRef): InputElement | undefined;
|
|
19
|
-
export declare function tabindexComparator(a: InputElement, b: InputElement):
|
|
19
|
+
export declare function tabindexComparator(a: InputElement, b: InputElement): 0 | 1 | -1;
|
|
20
20
|
export interface CanGainFocusOptions {
|
|
21
21
|
minTabindex?: number;
|
|
22
22
|
maxTabindex?: number;
|
|
@@ -25,6 +25,6 @@ import * as i23 from "@ionic/angular";
|
|
|
25
25
|
import * as i24 from "@ngx-translate/core";
|
|
26
26
|
export declare class SharedPipesModule {
|
|
27
27
|
static ɵfac: i0.ɵɵFactoryDeclaration<SharedPipesModule, never>;
|
|
28
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<SharedPipesModule, [typeof i1.PropertyGetPipe, typeof i1.PropertyFormatPipe, typeof i1.ValueFormatPipe, typeof i2.DateFormatPipe, typeof i3.DateDiffDurationPipe, typeof i4.DurationPipe, typeof i5.DateFromNowPipe, typeof i6.LatLongFormatPipe, typeof i6.LatitudeFormatPipe, typeof i6.LongitudeFormatPipe, typeof i7.HighlightPipe, typeof i8.NumberFormatPipe, typeof i9.FileSizePipe, typeof i10.MathAbsPipe, typeof i10.OddPipe, typeof i10.EvenPipe, typeof i11.NotEmptyArrayPipe, typeof i11.EmptyArrayPipe, typeof i11.ArrayLengthPipe, typeof i11.ArrayFirstPipe, typeof i11.ArrayPluckPipe, typeof i11.ArrayIncludesPipe, typeof i11.ArrayFilterPipe, typeof i11.ArrayJoinPipe, typeof i12.MapGetPipe, typeof i12.MapKeysPipe, typeof i12.MapValuesPipe, typeof i13.IsNilOrBlankPipe, typeof i13.IsNotNilOrBlankPipe, typeof i13.IsNilOrNaNPipe, typeof i13.IsNotNilOrNaNPipe, typeof i13.IsNotNilPipe, typeof i13.IsNilPipe, typeof i13.ToStringPipe, typeof i13.CapitalizePipe, typeof i13.StrLengthPipe, typeof i13.StrIncludesPipe, typeof i14.TranslateContextPipe, typeof i14.TranslatablePipe, typeof i15.NgInitDirective, typeof i16.FormErrorTranslatePipe, typeof i16.FormGetPipe, typeof i16.FormGetControlPipe, typeof i16.FormGetArrayPipe, typeof i16.FormGetGroupPipe, typeof i16.FormGetValuePipe, typeof i17.MatColorPipe, typeof i18.AsAnyPipe, typeof i18.AsArrayPipe, typeof i18.AsObservablePipe, typeof i18.AsFloatLabelTypePipe, typeof i19.MaskitoPlaceholderPipe, typeof i20.IsSelectedPipe, typeof i20.IsNotEmptySelectionPipe, typeof i20.IsEmptySelectionPipe, typeof i20.SelectionLengthPipe, typeof i20.IsMultipleSelectionPipe, typeof i20.IsSingleSelectionPipe, typeof i21.BadgeNumberPipe], [typeof i22.CommonModule, typeof i23.IonicModule, typeof i24.TranslateModule], [typeof i1.PropertyGetPipe, typeof i1.PropertyFormatPipe, typeof i1.ValueFormatPipe, typeof i2.DateFormatPipe, typeof i3.DateDiffDurationPipe, typeof i4.DurationPipe, typeof i5.DateFromNowPipe, typeof i6.LatLongFormatPipe, typeof i6.LatitudeFormatPipe, typeof i6.LongitudeFormatPipe, typeof i7.HighlightPipe, typeof i8.NumberFormatPipe, typeof i9.FileSizePipe, typeof i10.MathAbsPipe, typeof i10.OddPipe, typeof i10.EvenPipe, typeof i11.NotEmptyArrayPipe, typeof i11.EmptyArrayPipe, typeof i11.ArrayLengthPipe, typeof i11.ArrayFirstPipe, typeof i11.ArrayPluckPipe, typeof i11.ArrayIncludesPipe, typeof i11.ArrayFilterPipe, typeof i11.ArrayJoinPipe, typeof i12.MapGetPipe, typeof i12.MapKeysPipe, typeof i12.MapValuesPipe, typeof i13.IsNilOrBlankPipe, typeof i13.IsNotNilOrBlankPipe, typeof i13.IsNilOrNaNPipe, typeof i13.IsNotNilOrNaNPipe, typeof i13.IsNotNilPipe, typeof i13.IsNilPipe, typeof i13.ToStringPipe, typeof i13.CapitalizePipe, typeof i13.StrLengthPipe, typeof i13.StrIncludesPipe, typeof i14.TranslateContextPipe, typeof i14.TranslatablePipe, typeof i15.NgInitDirective, typeof i16.FormErrorTranslatePipe, typeof i16.FormGetPipe, typeof i16.FormGetControlPipe, typeof i16.FormGetArrayPipe, typeof i16.FormGetGroupPipe, typeof i16.FormGetValuePipe, typeof i17.MatColorPipe, typeof i18.AsAnyPipe, typeof i18.AsArrayPipe, typeof i18.AsObservablePipe, typeof i18.AsFloatLabelTypePipe, typeof i19.MaskitoPlaceholderPipe, typeof i20.IsSelectedPipe, typeof i20.IsNotEmptySelectionPipe, typeof i20.IsEmptySelectionPipe, typeof i20.SelectionLengthPipe, typeof i20.IsMultipleSelectionPipe, typeof i20.IsSingleSelectionPipe, typeof i21.BadgeNumberPipe]>;
|
|
28
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<SharedPipesModule, [typeof i1.PropertyGetPipe, typeof i1.PropertyFormatPipe, typeof i1.ValueFormatPipe, typeof i2.DateFormatPipe, typeof i3.DateDiffDurationPipe, typeof i4.DurationPipe, typeof i5.DateFromNowPipe, typeof i6.LatLongFormatPipe, typeof i6.LatitudeFormatPipe, typeof i6.LongitudeFormatPipe, typeof i7.HighlightPipe, typeof i8.NumberFormatPipe, typeof i9.FileSizePipe, typeof i10.MathAbsPipe, typeof i10.OddPipe, typeof i10.EvenPipe, typeof i11.NotEmptyArrayPipe, typeof i11.EmptyArrayPipe, typeof i11.ArrayLengthPipe, typeof i11.ArrayFirstPipe, typeof i11.ArrayPluckPipe, typeof i11.ArrayIncludesPipe, typeof i11.ArrayFilterPipe, typeof i11.ArrayJoinPipe, typeof i12.MapGetPipe, typeof i12.MapKeysPipe, typeof i12.MapValuesPipe, typeof i13.IsNilOrBlankPipe, typeof i13.IsNotNilOrBlankPipe, typeof i13.IsNilOrNaNPipe, typeof i13.IsNotNilOrNaNPipe, typeof i13.IsNotNilPipe, typeof i13.IsNilPipe, typeof i13.ToStringPipe, typeof i13.CapitalizePipe, typeof i13.StrLengthPipe, typeof i13.StrIncludesPipe, typeof i1.BooleanFormatPipe, typeof i14.TranslateContextPipe, typeof i14.TranslatablePipe, typeof i15.NgInitDirective, typeof i16.FormErrorTranslatePipe, typeof i16.FormGetPipe, typeof i16.FormGetControlPipe, typeof i16.FormGetArrayPipe, typeof i16.FormGetGroupPipe, typeof i16.FormGetValuePipe, typeof i17.MatColorPipe, typeof i18.AsAnyPipe, typeof i18.AsArrayPipe, typeof i18.AsObservablePipe, typeof i18.AsFloatLabelTypePipe, typeof i19.MaskitoPlaceholderPipe, typeof i20.IsSelectedPipe, typeof i20.IsNotEmptySelectionPipe, typeof i20.IsEmptySelectionPipe, typeof i20.SelectionLengthPipe, typeof i20.IsMultipleSelectionPipe, typeof i20.IsSingleSelectionPipe, typeof i21.BadgeNumberPipe], [typeof i22.CommonModule, typeof i23.IonicModule, typeof i24.TranslateModule], [typeof i1.PropertyGetPipe, typeof i1.PropertyFormatPipe, typeof i1.ValueFormatPipe, typeof i2.DateFormatPipe, typeof i3.DateDiffDurationPipe, typeof i4.DurationPipe, typeof i5.DateFromNowPipe, typeof i6.LatLongFormatPipe, typeof i6.LatitudeFormatPipe, typeof i6.LongitudeFormatPipe, typeof i7.HighlightPipe, typeof i8.NumberFormatPipe, typeof i9.FileSizePipe, typeof i10.MathAbsPipe, typeof i10.OddPipe, typeof i10.EvenPipe, typeof i11.NotEmptyArrayPipe, typeof i11.EmptyArrayPipe, typeof i11.ArrayLengthPipe, typeof i11.ArrayFirstPipe, typeof i11.ArrayPluckPipe, typeof i11.ArrayIncludesPipe, typeof i11.ArrayFilterPipe, typeof i11.ArrayJoinPipe, typeof i12.MapGetPipe, typeof i12.MapKeysPipe, typeof i12.MapValuesPipe, typeof i13.IsNilOrBlankPipe, typeof i13.IsNotNilOrBlankPipe, typeof i13.IsNilOrNaNPipe, typeof i13.IsNotNilOrNaNPipe, typeof i13.IsNotNilPipe, typeof i13.IsNilPipe, typeof i13.ToStringPipe, typeof i13.CapitalizePipe, typeof i13.StrLengthPipe, typeof i13.StrIncludesPipe, typeof i1.BooleanFormatPipe, typeof i14.TranslateContextPipe, typeof i14.TranslatablePipe, typeof i15.NgInitDirective, typeof i16.FormErrorTranslatePipe, typeof i16.FormGetPipe, typeof i16.FormGetControlPipe, typeof i16.FormGetArrayPipe, typeof i16.FormGetGroupPipe, typeof i16.FormGetValuePipe, typeof i17.MatColorPipe, typeof i18.AsAnyPipe, typeof i18.AsArrayPipe, typeof i18.AsObservablePipe, typeof i18.AsFloatLabelTypePipe, typeof i19.MaskitoPlaceholderPipe, typeof i20.IsSelectedPipe, typeof i20.IsNotEmptySelectionPipe, typeof i20.IsEmptySelectionPipe, typeof i20.SelectionLengthPipe, typeof i20.IsMultipleSelectionPipe, typeof i20.IsSingleSelectionPipe, typeof i21.BadgeNumberPipe]>;
|
|
29
29
|
static ɵinj: i0.ɵɵInjectorDeclaration<SharedPipesModule>;
|
|
30
30
|
}
|
|
@@ -23,7 +23,7 @@ declare abstract class AbstractValueFormatPipe {
|
|
|
23
23
|
}
|
|
24
24
|
export declare class PropertyFormatPipe extends AbstractValueFormatPipe implements PipeTransform {
|
|
25
25
|
constructor(dateFormat: DateFormatService, translate: TranslateService);
|
|
26
|
-
transform(obj: any,
|
|
26
|
+
transform(obj: any, args: string | Array<string | number> | FormFieldDefinition): string | Promise<string>;
|
|
27
27
|
static ɵfac: i0.ɵɵFactoryDeclaration<PropertyFormatPipe, never>;
|
|
28
28
|
static ɵpipe: i0.ɵɵPipeDeclaration<PropertyFormatPipe, "propertyFormat", false>;
|
|
29
29
|
static ɵprov: i0.ɵɵInjectableDeclaration<PropertyFormatPipe>;
|
|
@@ -35,4 +35,13 @@ export declare class ValueFormatPipe extends AbstractValueFormatPipe implements
|
|
|
35
35
|
static ɵpipe: i0.ɵɵPipeDeclaration<ValueFormatPipe, "valueFormat", false>;
|
|
36
36
|
static ɵprov: i0.ɵɵInjectableDeclaration<ValueFormatPipe>;
|
|
37
37
|
}
|
|
38
|
+
export declare class BooleanFormatPipe extends AbstractValueFormatPipe implements PipeTransform {
|
|
39
|
+
constructor(translate: TranslateService);
|
|
40
|
+
transform(value: any, opts?: {
|
|
41
|
+
yesLabel: string;
|
|
42
|
+
noLabel: string;
|
|
43
|
+
}): string;
|
|
44
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BooleanFormatPipe, never>;
|
|
45
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<BooleanFormatPipe, "booleanFormat", false>;
|
|
46
|
+
}
|
|
38
47
|
export {};
|
|
@@ -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-beta8",
|
|
6
6
|
"default_locale": "fr",
|
|
7
7
|
"description": "Angular components for building beautiful and responsive Apps",
|
|
8
8
|
"icons": [{
|