@sumaris-net/ngx-components 2.4.74 → 2.4.76

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sumaris-net/ngx-components",
3
3
  "description": "SUMARiS Angular components",
4
- "version": "2.4.74",
4
+ "version": "2.4.76",
5
5
  "author": "contact@e-is.pro",
6
6
  "license": "AGPL-3.0",
7
7
  "readmeFilename": "README.md",
@@ -20,6 +20,7 @@ export declare class SharedValidators {
20
20
  maxDecimals: string;
21
21
  double: string;
22
22
  integer: string;
23
+ precision: string;
23
24
  email: string;
24
25
  latitude: string;
25
26
  longitude: string;
@@ -41,6 +42,11 @@ export declare class SharedValidators {
41
42
  static decimal(opts?: {
42
43
  maxDecimals?: number;
43
44
  }): ValidatorFn;
45
+ /**
46
+ * Check precision. e.g. if precision=0.5 then value=0.6 is invalid
47
+ * @param precision
48
+ */
49
+ static precision(precision: number): ValidatorFn;
44
50
  static validDate(control: UntypedFormControl): ValidationErrors | null;
45
51
  static dateIsAfter(previousValue: Moment, errorParam: string, granularity?: unitOfTime.StartOf): ValidatorFn;
46
52
  static dateIsBefore(maxValue: Moment, errorParam: string, granularity?: unitOfTime.StartOf): ValidatorFn;
@@ -493,6 +493,7 @@
493
493
  "FIELD_INVALID": "Invalid value",
494
494
  "FIELD_NOT_VALID_DECIMAL": "Expected decimal value",
495
495
  "FIELD_NOT_VALID_INTEGER": "Expected integer value",
496
+ "FIELD_NOT_VALID_PRECISION": "Expected precision: {{precision}}",
496
497
  "FIELD_NOT_VALID_EMAIL": "Invalid email address",
497
498
  "FIELD_NOT_VALID_DATE": "Invalid date",
498
499
  "FIELD_NOT_VALID_DATE_AFTER": "Must be after {{minDate}}",
@@ -493,6 +493,7 @@
493
493
  "FIELD_INVALID": "Invalid value",
494
494
  "FIELD_NOT_VALID_DECIMAL": "Expected decimal value",
495
495
  "FIELD_NOT_VALID_INTEGER": "Expected integer value",
496
+ "FIELD_NOT_VALID_PRECISION": "Expected precision: {{precision}}",
496
497
  "FIELD_NOT_VALID_EMAIL": "Invalid email address",
497
498
  "FIELD_NOT_VALID_DATE": "Invalid date",
498
499
  "FIELD_NOT_VALID_DATE_AFTER": "Must be after {{minDate}}",
@@ -481,11 +481,12 @@
481
481
  "FIELD_MIN_COMPACT": "Min {{min}}",
482
482
  "FIELD_MAX": "Valeur maximale : {{max}}",
483
483
  "FIELD_MAX_COMPACT": "Max {{max}}",
484
- "FIELD_MAXIMUM_DECIMALS": "Trop de décimales (max: {{maxDecimals}})",
484
+ "FIELD_MAXIMUM_DECIMALS": "Trop de décimales (max : {{maxDecimals}})",
485
485
  "FIELD_MAXIMUM_DECIMALS_COMPACT": "Nb décimale > {{maxDecimals}}",
486
486
  "FIELD_INVALID": "Valeur non valide",
487
487
  "FIELD_NOT_VALID_DECIMAL": "Valeur décimale attendue",
488
488
  "FIELD_NOT_VALID_INTEGER": "Valeur entière attendue",
489
+ "FIELD_NOT_VALID_PRECISION": "Précision attendue : {{precision}}",
489
490
  "FIELD_NOT_VALID_EMAIL": "Adresse email invalide",
490
491
  "FIELD_NOT_VALID_DATE": "Date invalide",
491
492
  "FIELD_NOT_VALID_DATE_AFTER": "Doit être postérieure à {{minDate}}",