@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/bundles/sumaris-net.ngx-components.umd.js +74 -0
- 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/public_api.js +3 -1
- package/esm2015/src/app/core/core.module.js +4 -1
- package/esm2015/src/app/core/form/form-error-translate.pipe.js +19 -0
- package/esm2015/src/app/core/form/form-error.adapter.js +56 -0
- package/fesm2015/sumaris-net.ngx-components.js +69 -1
- package/fesm2015/sumaris-net.ngx-components.js.map +1 -1
- package/package.json +1 -1
- package/public_api.d.ts +2 -0
- package/src/app/core/form/form-error-translate.pipe.d.ts +8 -0
- package/src/app/core/form/form-error.adapter.d.ts +16 -0
- package/sumaris-net.ngx-components.metadata.json +1 -1
package/package.json
CHANGED
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
|
+
}
|