@sumaris-net/ngx-components 1.3.2 → 1.3.3

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": "1.3.2",
4
+ "version": "1.3.3",
5
5
  "author": "contact@e-is.pro",
6
6
  "license": "AGPL-3.0",
7
7
  "readmeFilename": "README.md",
@@ -38,7 +38,7 @@ export declare abstract class AppEntityEditor<T extends Entity<T, ID>, S extends
38
38
  protected dateFormat: DateFormatPipe;
39
39
  protected cd: ChangeDetectorRef;
40
40
  protected settings: LocalSettingsService;
41
- protected formErrorAdapter: FormErrorTranslator;
41
+ protected errorTranslator: FormErrorTranslator;
42
42
  data: T;
43
43
  saving: boolean;
44
44
  hasRemoteListener: boolean;
@@ -1,6 +1,7 @@
1
1
  import { InjectionToken } from '@angular/core';
2
2
  import { TranslateService } from '@ngx-translate/core';
3
3
  import { AbstractControl } from '@angular/forms';
4
+ import { FormErrors } from '../../core/form/form.utils';
4
5
  import { ObjectMap } from '../types';
5
6
  export declare const APP_FORM_ERROR_I18N_KEYS: InjectionToken<ObjectMap<string>>;
6
7
  export interface IFormControlPathTranslator {
@@ -16,7 +17,8 @@ export declare class FormErrorTranslator implements IFormControlPathTranslator {
16
17
  private translate;
17
18
  private readonly errorI18nKeys;
18
19
  constructor(translate: TranslateService, errorI18nKeys: ObjectMap<string>);
19
- translateErrors(control: AbstractControl, opts?: FormErrorTranslatorOptions): string;
20
+ translateFormErrors(control: AbstractControl, opts?: FormErrorTranslatorOptions): string;
21
+ translateErrors(errors: FormErrors, opts?: FormErrorTranslatorOptions): string;
20
22
  translateControlPath(path: string, opts?: FormErrorTranslatorOptions): string;
21
23
  translateError(errorKey: string, errorContent?: any): any;
22
24
  }