@sumaris-net/ngx-components 0.25.10 → 0.25.11

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": "0.25.10",
4
+ "version": "0.25.11",
5
5
  "author": "contact@e-is.pro",
6
6
  "license": "AGPL-3.0",
7
7
  "readmeFilename": "README.md",
package/public_api.d.ts CHANGED
@@ -105,6 +105,7 @@ export * from './src/app/core/services/pipes/account.pipes';
105
105
  export * from './src/app/core/services/pipes/department-to-string.pipe';
106
106
  export * from './src/app/core/services/pipes/person-to-string.pipe';
107
107
  export * from './src/app/core/services/pipes/usage-mode.pipes';
108
+ export * from './src/app/core/form/form-error-translate.pipe';
108
109
  export * from './src/app/vendor';
109
110
  export * from './src/app/core/services/platform.service';
110
111
  export * from './src/app/core/services/network.service';
@@ -127,6 +128,7 @@ export * from './src/app/core/form/form.class';
127
128
  export * from './src/app/core/form/form.utils';
128
129
  export * from './src/app/core/form/form-buttons-bar.component';
129
130
  export * from './src/app/core/form/list.form';
131
+ export * from './src/app/core/form/form-error.adapter';
130
132
  export * from './src/app/core/form/properties.form';
131
133
  export * from './src/app/core/table/table.class';
132
134
  export * from './src/app/core/table/table.utils';
@@ -0,0 +1,8 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import { FormGroup } from '@angular/forms';
3
+ import { FormErrorAdapter, FormErrorAdapterOptions } from './form-error.adapter';
4
+ export declare class FormErrorTranslatePipe implements PipeTransform {
5
+ private adapter;
6
+ constructor(adapter: FormErrorAdapter);
7
+ transform(form: FormGroup, opts?: FormErrorAdapterOptions): string;
8
+ }
@@ -0,0 +1,16 @@
1
+ import { TranslateService } from '@ngx-translate/core';
2
+ import { FormGroup } from '@angular/forms';
3
+ export interface FormErrorAdapterOptions {
4
+ i18nPrefix?: string;
5
+ separator?: string;
6
+ recursive?: boolean;
7
+ }
8
+ export declare class FormErrorAdapter {
9
+ private translate;
10
+ constructor(translate: TranslateService);
11
+ formatError(form: FormGroup, opts?: FormErrorAdapterOptions): string;
12
+ protected getI18nFieldName(fieldName: string, opts?: {
13
+ i18nPrefix?: string;
14
+ }): string;
15
+ protected getI18nError(errorKey: string, errorContent?: any): string;
16
+ }