@sumaris-net/ngx-components 18.3.30-alpha1 → 18.4.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/doc/changelog.md +16 -13
- package/esm2022/src/app/core/table/testing/table.testing.mjs +1 -1
- package/esm2022/src/app/shared/inputs.mjs +3 -2
- package/esm2022/src/app/shared/material/latlong/latlong.utils.mjs +39 -27
- package/esm2022/src/app/shared/material/latlong/material.latlong-input.mjs +134 -80
- package/esm2022/src/app/shared/material/latlong/material.latlong.mjs +21 -106
- package/esm2022/src/app/shared/material/latlong/testing/latlong.test.mjs +1 -1
- package/esm2022/src/app/shared/material/material.testing.module.mjs +3 -14
- package/esm2022/src/app/shared/material/test/test-component.mjs +48 -24
- package/esm2022/src/app/shared/pipes/maskito.pipe.mjs +3 -3
- package/fesm2022/sumaris-net.ngx-components.mjs +317 -323
- package/fesm2022/sumaris-net.ngx-components.mjs.map +1 -1
- package/package.json +1 -1
- package/src/app/shared/material/latlong/latlong.utils.d.ts +24 -6
- package/src/app/shared/material/latlong/material.latlong-input.d.ts +9 -5
- package/src/app/shared/material/latlong/material.latlong.d.ts +1 -15
- package/src/assets/i18n/en-US.json +12 -20
- package/src/assets/i18n/en.json +8 -16
- package/src/assets/i18n/fr.json +8 -16
- package/src/assets/manifest.json +1 -1
- package/src/theme/_material.scss +5 -0
package/package.json
CHANGED
|
@@ -10,8 +10,27 @@ export interface ILatLongData {
|
|
|
10
10
|
sign: LatLongSignValue;
|
|
11
11
|
}
|
|
12
12
|
export declare const MASKS: {
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
latitude: {
|
|
14
|
+
DDMMSS: (string | RegExp)[];
|
|
15
|
+
DDMM: (string | RegExp)[];
|
|
16
|
+
DD: (string | RegExp)[];
|
|
17
|
+
};
|
|
18
|
+
longitude: {
|
|
19
|
+
DDMMSS: (string | RegExp)[];
|
|
20
|
+
DDMM: (string | RegExp)[];
|
|
21
|
+
DD: (string | RegExp)[];
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
export declare const MASK_RANGES: {
|
|
25
|
+
latitude: {
|
|
26
|
+
DDMMSS: number[][];
|
|
27
|
+
DDMM: number[][];
|
|
28
|
+
DD: number[][];
|
|
29
|
+
};
|
|
30
|
+
longitude: {
|
|
31
|
+
DDMMSS: number[][];
|
|
32
|
+
DDMM: number[][];
|
|
33
|
+
DD: number[][];
|
|
15
34
|
};
|
|
16
35
|
};
|
|
17
36
|
export declare class LatLongFormatOptions {
|
|
@@ -19,7 +38,6 @@ export declare class LatLongFormatOptions {
|
|
|
19
38
|
maxDecimals?: number;
|
|
20
39
|
placeholderChar?: string;
|
|
21
40
|
hideSign?: boolean;
|
|
22
|
-
inputSelectionRanges?: number[][];
|
|
23
41
|
fixLatLong?: boolean;
|
|
24
42
|
}
|
|
25
43
|
export declare const LAT_LONG_PATTERN_MAX_DECIMALS = 3;
|
|
@@ -28,13 +46,13 @@ export declare function computeDecimalPart(value: number, nbOfDecimals: number):
|
|
|
28
46
|
export declare function formatLatLong(value: number, type: LatLongType, opts?: Partial<LatLongFormatOptions>): string;
|
|
29
47
|
export declare function formatLatitude(value: number | null, opts?: Partial<LatLongFormatOptions>): string;
|
|
30
48
|
export declare function formatLongitude(value: number | null, opts?: Partial<LatLongFormatOptions>): string;
|
|
31
|
-
export declare function
|
|
49
|
+
export declare function splitDegreesToDDArray(value: number, opts: LatLongFormatOptions & {
|
|
32
50
|
longitude: boolean;
|
|
33
51
|
}): (number | string)[];
|
|
34
|
-
export declare function
|
|
52
|
+
export declare function splitDegreesToDDMMArray(value: number, opts: LatLongFormatOptions & {
|
|
35
53
|
longitude: boolean;
|
|
36
54
|
}): number[];
|
|
37
|
-
export declare function
|
|
55
|
+
export declare function splitDegreesToDDMMSSArray(value: number, opts: LatLongFormatOptions & {
|
|
38
56
|
longitude: boolean;
|
|
39
57
|
}): number[];
|
|
40
58
|
export declare function parseLatitudeOrLongitude(input: string, pattern: string, maxDecimals?: number, placeholderChar?: string): number | null;
|
|
@@ -15,7 +15,7 @@ export declare class MatLatLongFieldInput implements MatFormFieldControl<number>
|
|
|
15
15
|
minutesInput: ElementRef;
|
|
16
16
|
secondsInput: ElementRef;
|
|
17
17
|
signInput: ElementRef;
|
|
18
|
-
|
|
18
|
+
protected formGroup: import("@angular/forms").FormGroup<{
|
|
19
19
|
degrees: import("@angular/forms").FormControl<string>;
|
|
20
20
|
minutes: import("@angular/forms").FormControl<string>;
|
|
21
21
|
seconds: import("@angular/forms").FormControl<string>;
|
|
@@ -43,11 +43,12 @@ export declare class MatLatLongFieldInput implements MatFormFieldControl<number>
|
|
|
43
43
|
get errorState(): boolean;
|
|
44
44
|
type: LatLongType;
|
|
45
45
|
pattern: LatLongPattern;
|
|
46
|
+
defaultSign: LatLongSign;
|
|
47
|
+
maxDecimals: number;
|
|
48
|
+
readonly: boolean;
|
|
46
49
|
degreesSymbolUnit: string;
|
|
47
50
|
minutesSymbolUnit: string;
|
|
48
51
|
secondsSymbolUnit: string;
|
|
49
|
-
defaultSign: LatLongSign;
|
|
50
|
-
maxDecimals: number;
|
|
51
52
|
showMinutes: boolean;
|
|
52
53
|
showSeconds: boolean;
|
|
53
54
|
showSign: boolean;
|
|
@@ -59,6 +60,8 @@ export declare class MatLatLongFieldInput implements MatFormFieldControl<number>
|
|
|
59
60
|
secondsPlaceholder: string;
|
|
60
61
|
lastInputMaxDecimals: number;
|
|
61
62
|
private logPrefix;
|
|
63
|
+
private _subscription;
|
|
64
|
+
private cd;
|
|
62
65
|
constructor(_elementRef: ElementRef<HTMLElement>, _formField: MatFormField, ngControl: NgControl);
|
|
63
66
|
ngOnInit(): void;
|
|
64
67
|
ngOnDestroy(): void;
|
|
@@ -67,7 +70,7 @@ export declare class MatLatLongFieldInput implements MatFormFieldControl<number>
|
|
|
67
70
|
handleInput(controlName: string, nextControlName?: string): void;
|
|
68
71
|
autoFocusNext(controlName: string, nextControlName?: string): void;
|
|
69
72
|
autoFocusPrev(controlName: string, prevControlName: string): void;
|
|
70
|
-
getElementByName(name: string): HTMLElement;
|
|
73
|
+
getElementByName(name: string): HTMLElement | undefined;
|
|
71
74
|
setDescribedByIds(ids: string[]): void;
|
|
72
75
|
onContainerClick(): void;
|
|
73
76
|
writeValue(value: number | null): void;
|
|
@@ -75,6 +78,7 @@ export declare class MatLatLongFieldInput implements MatFormFieldControl<number>
|
|
|
75
78
|
registerOnTouched(fn: any): void;
|
|
76
79
|
setDisabledState(isDisabled: boolean): void;
|
|
77
80
|
private computeLatLongFormGroupValue;
|
|
81
|
+
private safeParseFloat;
|
|
78
82
|
static ɵfac: i0.ɵɵFactoryDeclaration<MatLatLongFieldInput, [null, { optional: true; }, { optional: true; self: true; }]>;
|
|
79
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MatLatLongFieldInput, "mat-latlong-input", never, { "userAriaDescribedBy": { "alias": "aria-describedby"; "required": false; }; "required": { "alias": "required"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "value": { "alias": "value"; "required": false; }; "type": { "alias": "type"; "required": false; }; "pattern": { "alias": "latLongPattern"; "required": false; }; "
|
|
83
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MatLatLongFieldInput, "mat-latlong-input", never, { "userAriaDescribedBy": { "alias": "aria-describedby"; "required": false; }; "required": { "alias": "required"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "value": { "alias": "value"; "required": false; }; "type": { "alias": "type"; "required": false; }; "pattern": { "alias": "latLongPattern"; "required": false; }; "defaultSign": { "alias": "defaultSign"; "required": false; }; "maxDecimals": { "alias": "maxDecimals"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; }, {}, never, never, false, never>;
|
|
80
84
|
}
|
|
@@ -3,7 +3,6 @@ import { ControlValueAccessor, FormGroupDirective, UntypedFormControl } from '@a
|
|
|
3
3
|
import { MatFormFieldAppearance, MatFormFieldDefaultOptions, SubscriptSizing } from '@angular/material/form-field';
|
|
4
4
|
import { AppFloatLabelType } from '../../form/field.model';
|
|
5
5
|
import { LatLongPattern, LatLongSign, LatLongType } from './latlong.utils';
|
|
6
|
-
import { MaskitoOptions } from '@maskito/core';
|
|
7
6
|
import { MatLatLongFieldInput } from './material.latlong-input';
|
|
8
7
|
import * as i0 from "@angular/core";
|
|
9
8
|
export declare class MatLatLongField implements ControlValueAccessor, OnInit, AfterViewInit, OnDestroy {
|
|
@@ -16,16 +15,6 @@ export declare class MatLatLongField implements ControlValueAccessor, OnInit, Af
|
|
|
16
15
|
private _tabindex;
|
|
17
16
|
private readonly _defaultAppearance;
|
|
18
17
|
private readonly _defaultSubscriptSizing;
|
|
19
|
-
protected showMinutes: boolean;
|
|
20
|
-
protected showSeconds: boolean;
|
|
21
|
-
protected showSign: boolean;
|
|
22
|
-
protected degreesPlaceholder: string;
|
|
23
|
-
protected minutesPlaceholder: string;
|
|
24
|
-
protected secondsPlaceholder: string;
|
|
25
|
-
protected degreesMask: MaskitoOptions;
|
|
26
|
-
protected minutesMask: MaskitoOptions;
|
|
27
|
-
protected secondsMask: MaskitoOptions;
|
|
28
|
-
protected lastInputMaxDecimals: number;
|
|
29
18
|
protected i18nErrorKeys: {
|
|
30
19
|
required: string;
|
|
31
20
|
min: string;
|
|
@@ -64,9 +53,6 @@ export declare class MatLatLongField implements ControlValueAccessor, OnInit, Af
|
|
|
64
53
|
defaultSign: LatLongSign;
|
|
65
54
|
autofocus: boolean;
|
|
66
55
|
mobile: boolean;
|
|
67
|
-
degreesSymbolUnit: string;
|
|
68
|
-
minutesSymbolUnit: string;
|
|
69
|
-
secondsSymbolUnit: string;
|
|
70
56
|
clearable: boolean;
|
|
71
57
|
classList: string;
|
|
72
58
|
set tabindex(value: number);
|
|
@@ -95,7 +81,7 @@ export declare class MatLatLongField implements ControlValueAccessor, OnInit, Af
|
|
|
95
81
|
clearValue(event?: Event): void;
|
|
96
82
|
private markForCheck;
|
|
97
83
|
static ɵfac: i0.ɵɵFactoryDeclaration<MatLatLongField, [null, { optional: true; }, null]>;
|
|
98
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MatLatLongField, "mat-latlong-field", never, { "formControl": { "alias": "formControl"; "required": false; }; "formControlName": { "alias": "formControlName"; "required": false; }; "type": { "alias": "type"; "required": false; }; "pattern": { "alias": "latLongPattern"; "required": false; }; "maxDecimals": { "alias": "maxDecimals"; "required": false; }; "required": { "alias": "required"; "required": false; }; "floatLabel": { "alias": "floatLabel"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "defaultSign": { "alias": "defaultSign"; "required": false; }; "autofocus": { "alias": "autofocus"; "required": false; }; "mobile": { "alias": "mobile"; "required": false; }; "
|
|
84
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MatLatLongField, "mat-latlong-field", never, { "formControl": { "alias": "formControl"; "required": false; }; "formControlName": { "alias": "formControlName"; "required": false; }; "type": { "alias": "type"; "required": false; }; "pattern": { "alias": "latLongPattern"; "required": false; }; "maxDecimals": { "alias": "maxDecimals"; "required": false; }; "required": { "alias": "required"; "required": false; }; "floatLabel": { "alias": "floatLabel"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "defaultSign": { "alias": "defaultSign"; "required": false; }; "autofocus": { "alias": "autofocus"; "required": false; }; "mobile": { "alias": "mobile"; "required": false; }; "clearable": { "alias": "clearable"; "required": false; }; "classList": { "alias": "class"; "required": false; }; "tabindex": { "alias": "tabindex"; "required": false; }; "appearance": { "alias": "appearance"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "subscriptSizing": { "alias": "subscriptSizing"; "required": false; }; }, {}, never, ["[matPrefix]", "[matSuffix]", "mat-error,[matError]", "mat-hint:not([align='end']),[matHint]", "mat-hint[align='end']"], false, never>;
|
|
99
85
|
static ngAcceptInputType_mobile: unknown;
|
|
100
86
|
static ngAcceptInputType_clearable: unknown;
|
|
101
87
|
static ngAcceptInputType_tabindex: unknown;
|
|
@@ -76,27 +76,19 @@
|
|
|
76
76
|
"DATE_PLACEHOLDER": "mm/dd/yyyy",
|
|
77
77
|
"DATE_TIME_PLACEHOLDER": "mm/dd/yyyy hh:mm",
|
|
78
78
|
"LAT_LONG": {
|
|
79
|
-
"
|
|
80
|
-
"
|
|
81
|
-
"
|
|
82
|
-
"
|
|
83
|
-
"
|
|
84
|
-
"
|
|
79
|
+
"DD_PLACEHOLDER": "DD",
|
|
80
|
+
"DD_DDDDDDD_PLACEHOLDER": "± DD.DDDDDDD",
|
|
81
|
+
"DDD_PLACEHOLDER": "DDD",
|
|
82
|
+
"DDD_DDDDDDD_PLACEHOLDER": "±DDD.DDDDDDD",
|
|
83
|
+
"MM_PLACEHOLDER": "MM",
|
|
84
|
+
"MM_MMM_PLACEHOLDER": "MM.MMM",
|
|
85
|
+
"SS_SS_PLACEHOLDER": "SS.SS",
|
|
85
86
|
"LAT_SIGN_PLACEHOLDER": "N|S",
|
|
86
87
|
"LAT_SIGN_N": "N",
|
|
87
88
|
"LAT_SIGN_S": "S",
|
|
88
89
|
"LONG_SIGN_PLACEHOLDER": "E|W",
|
|
89
90
|
"LONG_SIGN_E": "E",
|
|
90
|
-
"LONG_SIGN_W": "W"
|
|
91
|
-
"SINGLE_FIELD_PATTERN": {
|
|
92
|
-
"DD": "DD",
|
|
93
|
-
"DD_PLACEHOLDER": "± DD.DDDDDDD",
|
|
94
|
-
"DDD": "DDD",
|
|
95
|
-
"DDD_PLACEHOLDER": "±DDD.DDDDDDD",
|
|
96
|
-
"MM": "MM",
|
|
97
|
-
"MM_MMM": "MM.MMM",
|
|
98
|
-
"SS_SS": "SS.SS"
|
|
99
|
-
}
|
|
91
|
+
"LONG_SIGN_W": "W"
|
|
100
92
|
},
|
|
101
93
|
"METADATA": "Metadata:",
|
|
102
94
|
"DAY_UNIT": "j",
|
|
@@ -136,11 +128,11 @@
|
|
|
136
128
|
},
|
|
137
129
|
"DEBUG": {
|
|
138
130
|
"TITLE": "Debug",
|
|
139
|
-
"BTN_DEBUG_DOTS": "
|
|
131
|
+
"BTN_DEBUG_DOTS": "Debug...",
|
|
140
132
|
"BTN_ENABLE_DEBUG": "Enable debug?"
|
|
141
133
|
},
|
|
142
134
|
"NAMED_FILTER": {
|
|
143
|
-
"TITLE": "Saved
|
|
135
|
+
"TITLE": "Saved filter",
|
|
144
136
|
"SAVE": "Save the filter",
|
|
145
137
|
"DELETE": "Delete the filter",
|
|
146
138
|
"DELETED": "Filter deleted",
|
|
@@ -153,8 +145,8 @@
|
|
|
153
145
|
},
|
|
154
146
|
"CONFIGURATION": {
|
|
155
147
|
"OPTIONS": {
|
|
156
|
-
"ANDROID_INSTALL_URL": "Android > Install App URL",
|
|
157
|
-
"IOS_INSTALL_URL": "iOS > Install App URL",
|
|
148
|
+
"ANDROID_INSTALL_URL": "App > Android > Install App URL",
|
|
149
|
+
"IOS_INSTALL_URL": "App > iOS > Install App URL",
|
|
158
150
|
"DB_TIMEZONE": "Persistence > Database timezone (readonly option)",
|
|
159
151
|
"LOGO": "Menu > Logo (max width 110px)",
|
|
160
152
|
"FAVICON": "favicon",
|
package/src/assets/i18n/en.json
CHANGED
|
@@ -75,27 +75,19 @@
|
|
|
75
75
|
"DATE_PLACEHOLDER": "dd/mm/yyyy",
|
|
76
76
|
"DATE_TIME_PLACEHOLDER": "dd/mm/yyyy hh:mm",
|
|
77
77
|
"LAT_LONG": {
|
|
78
|
-
"
|
|
79
|
-
"
|
|
80
|
-
"
|
|
81
|
-
"
|
|
82
|
-
"
|
|
83
|
-
"
|
|
78
|
+
"DD_PLACEHOLDER": "DD",
|
|
79
|
+
"DD_DDDDDDD_PLACEHOLDER": "± DD.DDDDDDD",
|
|
80
|
+
"DDD_PLACEHOLDER": "DDD",
|
|
81
|
+
"DDD_DDDDDDD_PLACEHOLDER": "±DDD.DDDDDDD",
|
|
82
|
+
"MM_PLACEHOLDER": "MM",
|
|
83
|
+
"MM_MMM_PLACEHOLDER": "MM.MMM",
|
|
84
|
+
"SS_SS_PLACEHOLDER": "SS.SS",
|
|
84
85
|
"LAT_SIGN_PLACEHOLDER": "N|S",
|
|
85
86
|
"LAT_SIGN_N": "N",
|
|
86
87
|
"LAT_SIGN_S": "S",
|
|
87
88
|
"LONG_SIGN_PLACEHOLDER": "E|W",
|
|
88
89
|
"LONG_SIGN_E": "E",
|
|
89
|
-
"LONG_SIGN_W": "W"
|
|
90
|
-
"SINGLE_FIELD_PATTERN": {
|
|
91
|
-
"DD": "DD",
|
|
92
|
-
"DD_PLACEHOLDER": "± DD.DDDDDDD",
|
|
93
|
-
"DDD": "DDD",
|
|
94
|
-
"DDD_PLACEHOLDER": "±DDD.DDDDDDD",
|
|
95
|
-
"MM": "MM",
|
|
96
|
-
"MM_MMM": "MM.MMM",
|
|
97
|
-
"SS_SS": "SS.SS"
|
|
98
|
-
}
|
|
90
|
+
"LONG_SIGN_W": "W"
|
|
99
91
|
},
|
|
100
92
|
"METADATA": "Metadata:",
|
|
101
93
|
"DAY_UNIT": "j",
|
package/src/assets/i18n/fr.json
CHANGED
|
@@ -75,27 +75,19 @@
|
|
|
75
75
|
"DATE_PLACEHOLDER": "jj/mm/aaaa",
|
|
76
76
|
"DATE_TIME_PLACEHOLDER": "jj/mm/aaaa hh:mm",
|
|
77
77
|
"LAT_LONG": {
|
|
78
|
-
"
|
|
79
|
-
"
|
|
80
|
-
"
|
|
81
|
-
"
|
|
82
|
-
"
|
|
83
|
-
"
|
|
78
|
+
"DD_PLACEHOLDER": "DD",
|
|
79
|
+
"DD_DDDDDDD_PLACEHOLDER": "± DD.DDDDDDD",
|
|
80
|
+
"DDD_PLACEHOLDER": "DDD",
|
|
81
|
+
"DDD_DDDDDDD_PLACEHOLDER": "±DDD.DDDDDDD",
|
|
82
|
+
"MM_PLACEHOLDER": "MM",
|
|
83
|
+
"MM_MMM_PLACEHOLDER": "MM",
|
|
84
|
+
"SS_SS_PLACEHOLDER": "SS",
|
|
84
85
|
"LAT_SIGN_PLACEHOLDER": "N|S",
|
|
85
86
|
"LAT_SIGN_N": "N",
|
|
86
87
|
"LAT_SIGN_S": "S",
|
|
87
88
|
"LONG_SIGN_PLACEHOLDER": "E|W",
|
|
88
89
|
"LONG_SIGN_E": "E",
|
|
89
|
-
"LONG_SIGN_W": "W"
|
|
90
|
-
"SINGLE_FIELD_PATTERN": {
|
|
91
|
-
"DD": "DD",
|
|
92
|
-
"DD_PLACEHOLDER": "± DD.DDDDDDD",
|
|
93
|
-
"DDD": "DDD",
|
|
94
|
-
"DDD_PLACEHOLDER": "±DDD.DDDDDDD",
|
|
95
|
-
"MM": "MM",
|
|
96
|
-
"MM_MMM": "MM.MMM",
|
|
97
|
-
"SS_SS": "SS.SS"
|
|
98
|
-
}
|
|
90
|
+
"LONG_SIGN_W": "W"
|
|
99
91
|
},
|
|
100
92
|
"METADATA": "Metadata:",
|
|
101
93
|
"DAY_UNIT": "j",
|
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": "18.
|
|
5
|
+
"version": "18.4.0",
|
|
6
6
|
"default_locale": "fr",
|
|
7
7
|
"description": "Angular components for building beautiful and responsive Apps",
|
|
8
8
|
"icons": [{
|
package/src/theme/_material.scss
CHANGED
|
@@ -200,6 +200,11 @@ mat-icon[slot] {
|
|
|
200
200
|
.mat-mdc-select-value {
|
|
201
201
|
text-align: right;
|
|
202
202
|
padding-right: 0.25em;
|
|
203
|
+
color: var(--mdc-filled-text-field-input-text-color, var(--ion-text-color));
|
|
204
|
+
}
|
|
205
|
+
.mat-mdc-select-placeholder {
|
|
206
|
+
transition: none !important;
|
|
207
|
+
color: var(--mdc-filled-text-field-input-text-placeholder-color, var(--app-form-field-label-color));
|
|
203
208
|
}
|
|
204
209
|
|
|
205
210
|
}
|