@sumaris-net/ngx-components 2.9.0-alpha4 → 2.9.0-alpha6

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": "2.9.0-alpha4",
4
+ "version": "2.9.0-alpha6",
5
5
  "author": "contact@e-is.pro",
6
6
  "license": "AGPL-3.0",
7
7
  "readmeFilename": "README.md",
@@ -4,7 +4,7 @@ import { BehaviorSubject, Subject, Subscription } from 'rxjs';
4
4
  import { IAppForm } from './form.utils';
5
5
  import { LocalSettingsService } from '../services/local-settings.service';
6
6
  import { WaitForOptions } from '../../shared/observables';
7
- import { FormErrorTranslateOptions, FormErrorTranslator, IFormPathTranslator } from '../../shared/validator/form-error-adapter.class';
7
+ import { FormErrorTranslateOptions, FormErrorTranslator, FormErrorTranslatorOptions, IFormPathTranslator } from '../../shared/validator/form-error-adapter.class';
8
8
  import { TranslateService } from '@ngx-translate/core';
9
9
  import { MatAutocompleteConfigHolder, MatAutocompleteFieldAddOptions, MatAutocompleteFieldConfig } from '../../shared/material/autocomplete/material.autocomplete.config';
10
10
  import * as i0 from "@angular/core";
@@ -44,6 +44,11 @@ export declare class AppForm<T> implements IAppForm<T>, OnInit, OnDestroy, IForm
44
44
  */
45
45
  protected get _enable(): boolean;
46
46
  protected set _enable(value: boolean);
47
+ /**
48
+ * @deprecated use errorTranslateOptions instead
49
+ */
50
+ get errorTranslatorOptions(): FormErrorTranslatorOptions;
51
+ set errorTranslatorOptions(options: FormErrorTranslatorOptions);
47
52
  disable(opts?: {
48
53
  onlySelf?: boolean;
49
54
  emitEvent?: boolean;
@@ -55,7 +60,7 @@ export declare class AppForm<T> implements IAppForm<T>, OnInit, OnDestroy, IForm
55
60
  get destroyed(): boolean;
56
61
  debug: boolean;
57
62
  tabindex: number;
58
- formErrorTranslateOptions: FormErrorTranslateOptions;
63
+ errorTranslateOptions: FormErrorTranslateOptions;
59
64
  set form(value: UntypedFormGroup);
60
65
  get form(): UntypedFormGroup;
61
66
  onCancel: EventEmitter<any>;
@@ -143,5 +148,5 @@ export declare class AppForm<T> implements IAppForm<T>, OnInit, OnDestroy, IForm
143
148
  protected markForCheck(): void;
144
149
  private setLoading;
145
150
  static ɵfac: i0.ɵɵFactoryDeclaration<AppForm<any>, never>;
146
- static ɵdir: i0.ɵɵDirectiveDeclaration<AppForm<any>, never, never, { "debug": { "alias": "debug"; "required": false; }; "tabindex": { "alias": "tabindex"; "required": false; }; "formErrorTranslateOptions": { "alias": "formErrorTranslateOptions"; "required": false; }; "form": { "alias": "form"; "required": false; }; }, { "onCancel": "onCancel"; "onSubmit": "onSubmit"; }, never, never, false, never>;
151
+ static ɵdir: i0.ɵɵDirectiveDeclaration<AppForm<any>, never, never, { "debug": { "alias": "debug"; "required": false; }; "tabindex": { "alias": "tabindex"; "required": false; }; "errorTranslateOptions": { "alias": "errorTranslateOptions"; "required": false; }; "form": { "alias": "form"; "required": false; }; }, { "onCancel": "onCancel"; "onSubmit": "onSubmit"; }, never, never, false, never>;
147
152
  }
@@ -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
- errorTranslatorOptions: FormErrorTranslateOptions;
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>;
@@ -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-alpha4",
5
+ "version": "2.9.0-alpha6",
6
6
  "default_locale": "fr",
7
7
  "description": "Angular components for building beautiful and responsive Apps",
8
8
  "icons": [{