@sumaris-net/ngx-components 0.25.13 → 0.25.14
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 +12 -12
- 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/table/table.class.js +3 -3
- package/esm2015/src/app/shared/pipes/form.pipes.js +2 -2
- package/esm2015/src/app/shared/validator/form-error-adapter.class.js +10 -10
- package/fesm2015/sumaris-net.ngx-components.js +12 -12
- package/fesm2015/sumaris-net.ngx-components.js.map +1 -1
- package/package.json +1 -1
- package/src/app/core/table/table.class.d.ts +3 -3
- package/src/app/shared/validator/form-error-adapter.class.d.ts +7 -7
- package/sumaris-net.ngx-components.metadata.json +1 -1
package/package.json
CHANGED
|
@@ -20,7 +20,7 @@ import { CompletableEvent } from '../../shared/events';
|
|
|
20
20
|
import { ShowToastOptions } from '../../shared/toasts';
|
|
21
21
|
import { CdkColumnDef } from '@angular/cdk/table';
|
|
22
22
|
import { LoadResult } from '../../shared/services/entity-service.class';
|
|
23
|
-
import { FormErrorAdapter,
|
|
23
|
+
import { FormErrorAdapter, IFormControlPathTranslateService } from '../../shared/validator/form-error-adapter.class';
|
|
24
24
|
export declare const SETTINGS_DISPLAY_COLUMNS = "displayColumns";
|
|
25
25
|
export declare const SETTINGS_SORTED_COLUMN = "sortedColumn";
|
|
26
26
|
export declare const SETTINGS_FILTER = "filter";
|
|
@@ -43,7 +43,7 @@ export interface IModalDetailOptions<T = any> {
|
|
|
43
43
|
onDelete: (event: UIEvent, data: T) => Promise<boolean>;
|
|
44
44
|
}
|
|
45
45
|
export declare type SaveActionType = 'delete' | 'sort' | 'filter';
|
|
46
|
-
export declare abstract class AppTable<T extends IEntity<T, ID>, F = any, ID = number> implements OnInit, OnDestroy, AfterViewInit, IAppForm,
|
|
46
|
+
export declare abstract class AppTable<T extends IEntity<T, ID>, F = any, ID = number> implements OnInit, OnDestroy, AfterViewInit, IAppForm, IFormControlPathTranslateService {
|
|
47
47
|
protected route: ActivatedRoute;
|
|
48
48
|
protected router: Router;
|
|
49
49
|
protected platform: Platform | PlatformService;
|
|
@@ -290,7 +290,7 @@ export declare abstract class AppTable<T extends IEntity<T, ID>, F = any, ID = n
|
|
|
290
290
|
doRefresh(event?: CompletableEvent): void;
|
|
291
291
|
getCurrentColumns(): ColumnItem[];
|
|
292
292
|
escapeEditingRow(event?: Event, row?: TableElement<T>): void;
|
|
293
|
-
|
|
293
|
+
translateControlPath(path: string): string;
|
|
294
294
|
protected editRow(event: Event | undefined, row: TableElement<T>, opts?: {
|
|
295
295
|
focusColumn?: string;
|
|
296
296
|
}): boolean;
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { InjectionToken } from '@angular/core';
|
|
2
2
|
import { TranslateService } from '@ngx-translate/core';
|
|
3
|
-
import {
|
|
3
|
+
import { AbstractControl } from '@angular/forms';
|
|
4
4
|
import { ObjectMap } from '../types';
|
|
5
5
|
export declare const APP_FORM_ERROR_I18N_KEYS: InjectionToken<ObjectMap<string>>;
|
|
6
|
-
export interface
|
|
7
|
-
|
|
6
|
+
export interface IFormControlPathTranslateService {
|
|
7
|
+
translateControlPath: (controlPath: string) => string;
|
|
8
8
|
}
|
|
9
9
|
export interface FormErrorAdapterOptions {
|
|
10
10
|
i18nPrefix?: string;
|
|
11
|
-
pathTranslateService?:
|
|
11
|
+
pathTranslateService?: IFormControlPathTranslateService;
|
|
12
12
|
separator?: string;
|
|
13
13
|
recursive?: boolean;
|
|
14
14
|
}
|
|
15
|
-
export declare class FormErrorAdapter implements
|
|
15
|
+
export declare class FormErrorAdapter implements IFormControlPathTranslateService {
|
|
16
16
|
private translate;
|
|
17
17
|
private readonly errorI18nKeys;
|
|
18
18
|
constructor(translate: TranslateService, errorI18nKeys: ObjectMap<string>);
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
translateErrors(control: AbstractControl, opts?: FormErrorAdapterOptions): string;
|
|
20
|
+
translateControlPath(path: string, opts?: FormErrorAdapterOptions): string;
|
|
21
21
|
translateError(errorKey: string, errorContent?: any): any;
|
|
22
22
|
}
|