@sumaris-net/ngx-components 2.4.73 → 2.4.75

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.73",
4
+ "version": "2.4.75",
5
5
  "author": "contact@e-is.pro",
6
6
  "license": "AGPL-3.0",
7
7
  "readmeFilename": "README.md",
@@ -47,7 +47,10 @@ export declare class LocalSettingsService extends StartableService<LocalSettings
47
47
  isUsageMode(mode: UsageMode): boolean;
48
48
  isOnFieldMode(value?: UsageMode): boolean;
49
49
  restoreLocally(): Promise<LocalSettings | undefined>;
50
- setProperty<T = string>(keyOrDef: string | FormFieldDefinition, value: T): void;
50
+ setProperty<T = string>(keyOrDef: string | FormFieldDefinition, value: T, opts?: {
51
+ emitEvent?: boolean;
52
+ immediate?: boolean;
53
+ }): void;
51
54
  getProperty(keyOrDef: string | FormFieldDefinition, defaultValue?: any): any;
52
55
  getPropertyAsBoolean(definition: FormFieldDefinition, defaultValue?: boolean): boolean;
53
56
  getPropertyAsInt(definition: FormFieldDefinition, defaultValue?: number): number;
@@ -41,6 +41,11 @@ export declare class SharedValidators {
41
41
  static decimal(opts?: {
42
42
  maxDecimals?: number;
43
43
  }): ValidatorFn;
44
+ /**
45
+ * Check precision. e.g. if precision=0.5 then value=0.6 is invalid
46
+ * @param precision
47
+ */
48
+ static precision(precision: number): ValidatorFn;
44
49
  static validDate(control: UntypedFormControl): ValidationErrors | null;
45
50
  static dateIsAfter(previousValue: Moment, errorParam: string, granularity?: unitOfTime.StartOf): ValidatorFn;
46
51
  static dateIsBefore(maxValue: Moment, errorParam: string, granularity?: unitOfTime.StartOf): ValidatorFn;