@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/bundles/sumaris-net.ngx-components.umd.js +31 -6
- package/bundles/sumaris-net.ngx-components.umd.js.map +1 -1
- package/bundles/sumaris-net.ngx-components.umd.min.js +1 -1
- package/bundles/sumaris-net.ngx-components.umd.min.js.map +1 -1
- package/esm2015/src/app/core/form/entity-editor.class.js +4 -4
- package/esm2015/src/app/core/form/form.class.js +2 -2
- package/esm2015/src/app/core/table/table.class.js +2 -2
- package/esm2015/src/app/shared/pipes/form.pipes.js +2 -2
- package/esm2015/src/app/shared/validator/form-error-adapter.class.js +26 -2
- package/fesm2015/sumaris-net.ngx-components.js +30 -6
- package/fesm2015/sumaris-net.ngx-components.js.map +1 -1
- package/package.json +1 -1
- package/src/app/core/form/entity-editor.class.d.ts +1 -1
- package/src/app/shared/validator/form-error-adapter.class.d.ts +3 -1
- package/sumaris-net.ngx-components.metadata.json +1 -1
package/package.json
CHANGED
|
@@ -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
|
|
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
|
-
|
|
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
|
}
|