@sumaris-net/ngx-components 2.9.0-alpha4 → 2.9.0-alpha5
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/doc/changelog.md +3 -1
- package/esm2022/src/app/core/table/async-table.class.mjs +23 -6
- package/esm2022/src/app/core/table/table.class.mjs +15 -2
- package/esm2022/src/app/shared/validator/form-error-adapter.class.mjs +9 -1
- package/fesm2022/sumaris-net.ngx-components.mjs +42 -4
- package/fesm2022/sumaris-net.ngx-components.mjs.map +1 -1
- package/package.json +1 -1
- package/src/app/core/table/async-table.class.d.ts +12 -3
- package/src/app/core/table/table.class.d.ts +10 -2
- package/src/app/shared/validator/form-error-adapter.class.d.ts +7 -1
- package/src/assets/manifest.json +1 -1
package/package.json
CHANGED
|
@@ -18,7 +18,7 @@ import { WaitForOptions } from '../../shared/observables';
|
|
|
18
18
|
import { ShowToastOptions } from '../../shared/toast/toasts';
|
|
19
19
|
import { CdkColumnDef } from '@angular/cdk/table';
|
|
20
20
|
import { LoadResult } from '../../shared/services/entity-service.class';
|
|
21
|
-
import { FormErrorTranslateOptions, FormErrorTranslator, IFormPathTranslator } from '../../shared/validator/form-error-adapter.class';
|
|
21
|
+
import { FormErrorTranslateOptions, FormErrorTranslator, FormErrorTranslatorOptions, IFormPathTranslator } from '../../shared/validator/form-error-adapter.class';
|
|
22
22
|
import { SaveActionType } from './table.model';
|
|
23
23
|
import { AsyncTableElement } from '@e-is/ngx-material-table';
|
|
24
24
|
import { EntitiesAsyncTableDataSource } from './entities-async-table-datasource.class';
|
|
@@ -50,7 +50,7 @@ export declare abstract class AppAsyncTable<T extends IEntity<T, ID>, F = any, I
|
|
|
50
50
|
displayedColumns: string[];
|
|
51
51
|
totalRowCount: number | null;
|
|
52
52
|
visibleRowCount: number;
|
|
53
|
-
|
|
53
|
+
errorTranslateOptions: FormErrorTranslateOptions | FormErrorTranslatorOptions;
|
|
54
54
|
readonly readySubject: BehaviorSubject<boolean>;
|
|
55
55
|
readonly loadingSubject: BehaviorSubject<boolean>;
|
|
56
56
|
readonly savingSubject: BehaviorSubject<boolean>;
|
|
@@ -59,6 +59,14 @@ export declare abstract class AppAsyncTable<T extends IEntity<T, ID>, F = any, I
|
|
|
59
59
|
readonly errorSubject: BehaviorSubject<string>;
|
|
60
60
|
get error(): string;
|
|
61
61
|
set error(error: string);
|
|
62
|
+
/**
|
|
63
|
+
* @deprecated use errorTranslateOptions instead
|
|
64
|
+
*/
|
|
65
|
+
get errorTranslatorOptions(): FormErrorTranslatorOptions;
|
|
66
|
+
/**
|
|
67
|
+
* @deprecated use errorTranslateOptions instead
|
|
68
|
+
*/
|
|
69
|
+
set errorTranslatorOptions(options: FormErrorTranslatorOptions);
|
|
62
70
|
selection: SelectionModel<AsyncTableElement<T>>;
|
|
63
71
|
permanentSelection: SelectionModel<T>;
|
|
64
72
|
permanentSelectionChangedPrevented: boolean;
|
|
@@ -92,6 +100,7 @@ export declare abstract class AppAsyncTable<T extends IEntity<T, ID>, F = any, I
|
|
|
92
100
|
get lastUserColumn(): string;
|
|
93
101
|
set dataSource(value: EntitiesAsyncTableDataSource<T, F, ID>);
|
|
94
102
|
get dataSource(): EntitiesAsyncTableDataSource<T, F, ID>;
|
|
103
|
+
set filter(value: F);
|
|
95
104
|
get filter(): F;
|
|
96
105
|
get empty(): boolean;
|
|
97
106
|
get selectedEntities(): T[];
|
|
@@ -382,5 +391,5 @@ export declare abstract class AppAsyncTable<T extends IEntity<T, ID>, F = any, I
|
|
|
382
391
|
private startCellValueChanges;
|
|
383
392
|
private stopCellValueChanges;
|
|
384
393
|
static ɵfac: i0.ɵɵFactoryDeclaration<AppAsyncTable<any, any, any>, never>;
|
|
385
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<AppAsyncTable<any, any, any>, never, never, { "settingsId": { "alias": "settingsId"; "required": false; }; "debug": { "alias": "debug"; "required": false; }; "i18nColumnPrefix": { "alias": "i18nColumnPrefix"; "required": false; }; "i18nColumnSuffix": { "alias": "i18nColumnSuffix"; "required": false; }; "autoLoad": { "alias": "autoLoad"; "required": false; }; "readOnly": { "alias": "readOnly"; "required": false; }; "inlineEdition": { "alias": "inlineEdition"; "required": false; }; "focusFirstColumn": { "alias": "focusFirstColumn"; "required": false; }; "confirmBeforeDelete": { "alias": "confirmBeforeDelete"; "required": false; }; "confirmBeforeCancel": { "alias": "confirmBeforeCancel"; "required": false; }; "undoableDeletion": { "alias": "undoableDeletion"; "required": false; }; "saveBeforeDelete": { "alias": "saveBeforeDelete"; "required": false; }; "keepEditedRowOnSave": { "alias": "keepEditedRowOnSave"; "required": false; }; "saveBeforeSort": { "alias": "saveBeforeSort"; "required": false; }; "saveBeforeFilter": { "alias": "saveBeforeFilter"; "required": false; }; "propagateRowError": { "alias": "propagateRowError"; "required": false; }; "permanentSelectionAllowed": { "alias": "permanentSelectionAllowed"; "required": false; }; "defaultSortBy": { "alias": "defaultSortBy"; "required": false; }; "defaultSortDirection": { "alias": "defaultSortDirection"; "required": false; }; "defaultPageSize": { "alias": "defaultPageSize"; "required": false; }; "defaultPageSizeOptions": { "alias": "defaultPageSizeOptions"; "required": false; }; "focusColumn": { "alias": "focusColumn"; "required": false; }; "dataSource": { "alias": "dataSource"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "paginator": { "alias": "paginator"; "required": false; }; }, { "onRefresh": "onRefresh"; "onOpenRow": "onOpenRow"; "onNewRow": "onNewRow"; "onStartEditingRow": "onStartEditingRow"; "onConfirmEditCreateRow": "onConfirmEditCreateRow"; "onCancelOrDeleteRow": "onCancelOrDeleteRow"; "onBeforeDeleteRows": "onBeforeDeleteRows"; "onBeforeCancelRows": "onBeforeCancelRows"; "onBeforeSave": "onBeforeSave"; "onAfterDeletedRows": "onAfterDeletedRows"; "onSort": "onSort"; "onDirty": "onDirty"; "onError": "onError"; }, never, never, false, never>;
|
|
394
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<AppAsyncTable<any, any, any>, never, never, { "settingsId": { "alias": "settingsId"; "required": false; }; "debug": { "alias": "debug"; "required": false; }; "i18nColumnPrefix": { "alias": "i18nColumnPrefix"; "required": false; }; "i18nColumnSuffix": { "alias": "i18nColumnSuffix"; "required": false; }; "autoLoad": { "alias": "autoLoad"; "required": false; }; "readOnly": { "alias": "readOnly"; "required": false; }; "inlineEdition": { "alias": "inlineEdition"; "required": false; }; "focusFirstColumn": { "alias": "focusFirstColumn"; "required": false; }; "confirmBeforeDelete": { "alias": "confirmBeforeDelete"; "required": false; }; "confirmBeforeCancel": { "alias": "confirmBeforeCancel"; "required": false; }; "undoableDeletion": { "alias": "undoableDeletion"; "required": false; }; "saveBeforeDelete": { "alias": "saveBeforeDelete"; "required": false; }; "keepEditedRowOnSave": { "alias": "keepEditedRowOnSave"; "required": false; }; "saveBeforeSort": { "alias": "saveBeforeSort"; "required": false; }; "saveBeforeFilter": { "alias": "saveBeforeFilter"; "required": false; }; "propagateRowError": { "alias": "propagateRowError"; "required": false; }; "permanentSelectionAllowed": { "alias": "permanentSelectionAllowed"; "required": false; }; "defaultSortBy": { "alias": "defaultSortBy"; "required": false; }; "defaultSortDirection": { "alias": "defaultSortDirection"; "required": false; }; "defaultPageSize": { "alias": "defaultPageSize"; "required": false; }; "defaultPageSizeOptions": { "alias": "defaultPageSizeOptions"; "required": false; }; "focusColumn": { "alias": "focusColumn"; "required": false; }; "dataSource": { "alias": "dataSource"; "required": false; }; "filter": { "alias": "filter"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "paginator": { "alias": "paginator"; "required": false; }; }, { "onRefresh": "onRefresh"; "onOpenRow": "onOpenRow"; "onNewRow": "onNewRow"; "onStartEditingRow": "onStartEditingRow"; "onConfirmEditCreateRow": "onConfirmEditCreateRow"; "onCancelOrDeleteRow": "onCancelOrDeleteRow"; "onBeforeDeleteRows": "onBeforeDeleteRows"; "onBeforeCancelRows": "onBeforeCancelRows"; "onBeforeSave": "onBeforeSave"; "onAfterDeletedRows": "onAfterDeletedRows"; "onSort": "onSort"; "onDirty": "onDirty"; "onError": "onError"; }, never, never, false, never>;
|
|
386
395
|
}
|
|
@@ -18,7 +18,7 @@ import { WaitForOptions } from '../../shared/observables';
|
|
|
18
18
|
import { ShowToastOptions } from '../../shared/toast/toasts';
|
|
19
19
|
import { CdkColumnDef } from '@angular/cdk/table';
|
|
20
20
|
import { LoadResult } from '../../shared/services/entity-service.class';
|
|
21
|
-
import { FormErrorTranslateOptions, FormErrorTranslator, IFormPathTranslator } from '../../shared/validator/form-error-adapter.class';
|
|
21
|
+
import { FormErrorTranslateOptions, FormErrorTranslator, FormErrorTranslatorOptions, IFormPathTranslator } from '../../shared/validator/form-error-adapter.class';
|
|
22
22
|
import { SaveActionType } from './table.model';
|
|
23
23
|
import { MatPaginator } from '@angular/material/paginator';
|
|
24
24
|
import { MatTable } from '@angular/material/table';
|
|
@@ -50,7 +50,7 @@ export declare abstract class AppTable<T extends IEntity<T, ID>, F = any, ID = n
|
|
|
50
50
|
displayedColumns: string[];
|
|
51
51
|
totalRowCount: number | null;
|
|
52
52
|
visibleRowCount: number;
|
|
53
|
-
errorTranslateOptions: FormErrorTranslateOptions;
|
|
53
|
+
errorTranslateOptions: FormErrorTranslateOptions | FormErrorTranslatorOptions;
|
|
54
54
|
readonly readySubject: BehaviorSubject<boolean>;
|
|
55
55
|
readonly loadingSubject: BehaviorSubject<boolean>;
|
|
56
56
|
readonly savingSubject: BehaviorSubject<boolean>;
|
|
@@ -63,6 +63,14 @@ export declare abstract class AppTable<T extends IEntity<T, ID>, F = any, ID = n
|
|
|
63
63
|
* @deprecated
|
|
64
64
|
*/
|
|
65
65
|
get error$(): Observable<string>;
|
|
66
|
+
/**
|
|
67
|
+
* @deprecated use errorTranslateOptions instead
|
|
68
|
+
*/
|
|
69
|
+
get errorTranslatorOptions(): FormErrorTranslatorOptions;
|
|
70
|
+
/**
|
|
71
|
+
* @deprecated use errorTranslateOptions instead
|
|
72
|
+
*/
|
|
73
|
+
set errorTranslatorOptions(options: FormErrorTranslatorOptions);
|
|
66
74
|
selection: SelectionModel<TableElement<T>>;
|
|
67
75
|
permanentSelection: SelectionModel<T>;
|
|
68
76
|
permanentSelectionChangedPrevented: boolean;
|
|
@@ -32,13 +32,19 @@ export interface FormErrorTranslatorOptions extends FormErrorTranslateOptions {
|
|
|
32
32
|
*/
|
|
33
33
|
controlPathTranslator?: IFormControlPathTranslator;
|
|
34
34
|
}
|
|
35
|
-
export declare class FormErrorTranslator implements IFormPathTranslator {
|
|
35
|
+
export declare class FormErrorTranslator implements IFormPathTranslator, IFormControlPathTranslator {
|
|
36
36
|
private translate;
|
|
37
37
|
private readonly errorI18nKeys;
|
|
38
38
|
constructor(translate: TranslateService, errorI18nKeys: ObjectMap<string>);
|
|
39
39
|
translateFormErrors(control: AbstractControl, opts?: FormErrorTranslateOptions | FormErrorTranslatorOptions): string;
|
|
40
40
|
translateErrors(errors: FormErrors, opts?: FormErrorTranslateOptions): string;
|
|
41
41
|
translateFormPath(path: string, opts?: FormErrorTranslateOptions | FormErrorTranslatorOptions): string;
|
|
42
|
+
/**
|
|
43
|
+
* @Deprecated use translateFormPath() instead
|
|
44
|
+
* @param path
|
|
45
|
+
* @param opts
|
|
46
|
+
*/
|
|
47
|
+
translateControlPath(path: string, opts?: FormErrorTranslatorOptions): string;
|
|
42
48
|
translateError(errorKey: string, errorContent?: any): any;
|
|
43
49
|
static ɵfac: i0.ɵɵFactoryDeclaration<FormErrorTranslator, [null, { optional: true; }]>;
|
|
44
50
|
static ɵprov: i0.ɵɵInjectableDeclaration<FormErrorTranslator>;
|
package/src/assets/manifest.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "ngx-sumaris-components",
|
|
3
3
|
"short_name": "ngx-sumaris-components",
|
|
4
4
|
"manifest_version": 1,
|
|
5
|
-
"version": "2.9.0-
|
|
5
|
+
"version": "2.9.0-alpha5",
|
|
6
6
|
"default_locale": "fr",
|
|
7
7
|
"description": "Angular components for building beautiful and responsive Apps",
|
|
8
8
|
"icons": [{
|