@sumaris-net/ngx-components 2.2.1-rc7 → 2.2.1-rc9

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.2.1-rc7",
4
+ "version": "2.2.1-rc9",
5
5
  "author": "contact@e-is.pro",
6
6
  "license": "AGPL-3.0",
7
7
  "readmeFilename": "README.md",
@@ -1,8 +1,8 @@
1
1
  import { Observable } from 'rxjs';
2
- import { FetchPolicy, InternalRefetchQueriesInclude, MutationUpdaterFn } from '@apollo/client/core';
2
+ import { InternalRefetchQueriesInclude, MutationUpdaterFn } from '@apollo/client/core';
3
3
  import { SortDirection } from '@angular/material/sort';
4
4
  import { BaseGraphqlService } from './base-graphql-service.class';
5
- import { EntitiesServiceWatchOptions, EntityServiceLoadOptions, IEntitiesService, IEntityService, LoadResult } from '../../shared/services/entity-service.class';
5
+ import { EntitiesServiceLoadOptions, EntitiesServiceWatchOptions, EntityServiceListenChangesOptions, IEntitiesService, IEntityService, LoadResult } from '../../shared/services/entity-service.class';
6
6
  import { GraphqlService } from '../graphql/graphql.service';
7
7
  import { PlatformService } from './platform.service';
8
8
  import { Entity, EntityAsObjectOptions } from './model/entity.model';
@@ -45,7 +45,7 @@ export interface EntitySaveOptions {
45
45
  data: any;
46
46
  }>;
47
47
  }
48
- export declare abstract class BaseEntityService<T extends Entity<T, ID>, F extends EntityFilter<F, T, ID>, ID = number, WO extends EntitiesServiceWatchOptions = EntitiesServiceWatchOptions, LO extends EntityServiceLoadOptions = EntityServiceLoadOptions, Q extends BaseEntityGraphqlQueries = BaseEntityGraphqlQueries, M extends BaseEntityGraphqlMutations = BaseEntityGraphqlMutations, S extends BaseEntityGraphqlSubscriptions = BaseEntityGraphqlSubscriptions> extends BaseGraphqlService<T, F, ID> implements IEntitiesService<T, F, WO>, IEntityService<T, ID, LO> {
48
+ export declare abstract class BaseEntityService<T extends Entity<T, ID>, F extends EntityFilter<F, T, ID>, ID = number, WO extends EntitiesServiceWatchOptions = EntitiesServiceWatchOptions, LO extends EntitiesServiceLoadOptions = EntitiesServiceLoadOptions, Q extends BaseEntityGraphqlQueries = BaseEntityGraphqlQueries, M extends BaseEntityGraphqlMutations = BaseEntityGraphqlMutations, S extends BaseEntityGraphqlSubscriptions = BaseEntityGraphqlSubscriptions> extends BaseGraphqlService<T, F, ID> implements IEntitiesService<T, F, WO>, IEntityService<T, ID, LO> {
49
49
  protected graphql: GraphqlService;
50
50
  protected platform: PlatformService;
51
51
  protected dataType: new () => T;
@@ -61,19 +61,11 @@ export declare abstract class BaseEntityService<T extends Entity<T, ID>, F exten
61
61
  protected readonly defaultSortDirection: SortDirection;
62
62
  protected readonly watchQueriesUpdatePolicy: MutableWatchQueriesUpdatePolicy;
63
63
  protected constructor(graphql: GraphqlService, platform: PlatformService, dataType: new () => T, filterType: new () => F, options: BaseEntityServiceOptions<T, ID, Q, M, S>);
64
- watch(id: number, opts?: WO & {
65
- query?: any;
66
- }): Observable<T>;
67
- load(id: ID, opts?: LO & {
68
- query?: any;
69
- }): Promise<T>;
70
- watchAll(offset: number, size: number, sortBy?: string, sortDirection?: SortDirection, filter?: F, opts?: WO & {
71
- query?: any;
72
- }): Observable<LoadResult<T>>;
64
+ watch(id: number, opts?: WO): Observable<T>;
65
+ load(id: ID, opts?: LO): Promise<T>;
66
+ watchAll(offset: number, size: number, sortBy?: string, sortDirection?: SortDirection, filter?: F, opts?: WO): Observable<LoadResult<T>>;
73
67
  loadAll(offset: number, size: number, sortBy?: string, sortDirection?: SortDirection, filter?: Partial<F>, opts?: LO & {
74
- query?: any;
75
68
  debug?: boolean;
76
- withTotal?: boolean;
77
69
  }): Promise<LoadResult<T>>;
78
70
  countAll(filter?: Partial<F>, opts?: LO): Promise<number>;
79
71
  canUserWrite(data: T, opts?: any): boolean;
@@ -95,13 +87,7 @@ export declare abstract class BaseEntityService<T extends Entity<T, ID>, F exten
95
87
  * Delete a referential entity
96
88
  */
97
89
  delete(entity: T, opts?: EntitySaveOptions | any): Promise<any>;
98
- listenChanges(id: ID, opts?: {
99
- query?: any;
100
- variables?: any;
101
- interval?: number;
102
- fetchPolicy?: FetchPolicy;
103
- toEntity?: boolean;
104
- }): Observable<T>;
90
+ listenChanges(id: ID, opts?: EntityServiceListenChangesOptions): Observable<T>;
105
91
  copyIdAndUpdateDate(source: T, target: T): void;
106
92
  fromObject(source: any): T;
107
93
  asFilter(source: any): F;
@@ -119,7 +119,7 @@ export declare class MatAutocompleteField implements OnInit, OnDestroy, InputEle
119
119
  private getAutocompletePanel;
120
120
  private getMatSelectPanel;
121
121
  private markForCheck;
122
- markAsLoading(): void;
122
+ protected markAsLoading(): void;
123
123
  static ɵfac: i0.ɵɵFactoryDeclaration<MatAutocompleteField, [null, { optional: true; }]>;
124
124
  static ɵcmp: i0.ɵɵComponentDeclaration<MatAutocompleteField, "mat-autocomplete-field", never, { "equals": "equals"; "logPrefix": "logPrefix"; "formControl": "formControl"; "formControlName": "formControlName"; "floatLabel": "floatLabel"; "appearance": "appearance"; "placeholder": "placeholder"; "suggestFn": "suggestFn"; "required": "required"; "mobile": "mobile"; "clearable": "clearable"; "debounceTime": "debounceTime"; "displayWith": "displayWith"; "displayAttributes": "displayAttributes"; "displayColumnSizes": "displayColumnSizes"; "displayColumnNames": "displayColumnNames"; "highlightAccent": "highlightAccent"; "showAllOnFocus": "showAllOnFocus"; "showPanelOnFocus": "showPanelOnFocus"; "autofocus": "autofocus"; "config": "config"; "i18nPrefix": "i18nPrefix"; "noResultMessage": "noResultMessage"; "classList": "class"; "panelWidth": "panelWidth"; "matAutocompletePosition": "matAutocompletePosition"; "multiple": "multiple"; "itemSize": "itemSize"; "fetchMoreThreshold": "fetchMoreThreshold"; "suggestLengthThreshold": "suggestLengthThreshold"; "showLoadingSpinner": "showLoadingSpinner"; "debug": "debug"; "showSearchBar": "showSearchBar"; "stickySearchBar": "stickySearchBar"; "filter": "filter"; "readonly": "readonly"; "tabindex": "tabindex"; "items": "items"; }, { "clicked": "click"; "blurred": "blur"; "focused": "focus"; "dropButtonClick": "dropButtonClick"; "keydownEscape": "keydown.escape"; "keyupEnter": "keyup.enter"; }, never, ["[matError]", "[matAfter]", "[matPrefix]", "[matSuffix]"], false>;
125
125
  }
@@ -108,7 +108,7 @@ export declare class MatChipsField implements OnInit, OnDestroy, InputElement, C
108
108
  setDisabledState(isDisabled: boolean): void;
109
109
  focus(): void;
110
110
  filterInputTextFocusEvent(event: FocusEvent): boolean;
111
- filterInputTextBlurEvent(event: FocusEvent): boolean;
111
+ protected filterInputTextBlurEvent(event: FocusEvent): boolean;
112
112
  filterChipsFocusEvent(event: FocusEvent): void;
113
113
  clearValue(event: Event): void;
114
114
  _initAutocompleteInfiniteScroll(threshold?: string): void;
@@ -22,7 +22,7 @@ export declare class ChipsTestPage implements OnInit {
22
22
  loadItems(): Promise<void>;
23
23
  entityToString(item: any): string;
24
24
  suggest(value: any, filter?: any): Promise<LoadResult<EntityTestClass>>;
25
- doSubmit(event: any): void;
25
+ doSubmit(_: any): void;
26
26
  equals(o1: EntityTestClass, o2: EntityTestClass): boolean;
27
27
  stringify(value: any): string;
28
28
  static ɵfac: i0.ɵɵFactoryDeclaration<ChipsTestPage, never>;
@@ -28,6 +28,24 @@ export declare interface EntityServiceLoadOptions {
28
28
  fetchPolicy?: FetchPolicy;
29
29
  trash?: boolean;
30
30
  toEntity?: boolean;
31
+ query?: any;
32
+ variables?: any;
33
+ [key: string]: any;
34
+ }
35
+ export declare interface EntityServiceWatchOptions {
36
+ fetchPolicy?: WatchQueryFetchPolicy;
37
+ trash?: boolean;
38
+ toEntity?: boolean;
39
+ query?: any;
40
+ variables?: any;
41
+ [key: string]: any;
42
+ }
43
+ export declare interface EntityServiceListenChangesOptions {
44
+ interval?: number;
45
+ fetchPolicy?: FetchPolicy;
46
+ toEntity?: boolean;
47
+ query?: any;
48
+ variables?: any;
31
49
  [key: string]: any;
32
50
  }
33
51
  export declare interface IEntityService<T, ID = any, LO = EntityServiceLoadOptions> {
@@ -37,19 +55,11 @@ export declare interface IEntityService<T, ID = any, LO = EntityServiceLoadOptio
37
55
  delete(data: T, opts?: any): Promise<any>;
38
56
  listenChanges(id: ID, opts?: any): Observable<T | undefined>;
39
57
  }
40
- export declare interface EntitiesServiceLoadOptions {
41
- fetchPolicy?: FetchPolicy;
42
- trash?: boolean;
58
+ export declare interface EntitiesServiceLoadOptions extends EntityServiceLoadOptions {
43
59
  withTotal?: boolean;
44
- toEntity?: boolean;
45
- [key: string]: any;
46
60
  }
47
- export declare interface EntitiesServiceWatchOptions {
48
- fetchPolicy?: WatchQueryFetchPolicy;
49
- trash?: boolean;
61
+ export declare interface EntitiesServiceWatchOptions extends EntityServiceWatchOptions {
50
62
  withTotal?: boolean;
51
- toEntity?: boolean;
52
- [key: string]: any;
53
63
  }
54
64
  export declare interface IEntitiesService<T, F, O extends EntitiesServiceWatchOptions = EntitiesServiceWatchOptions> {
55
65
  watchAll(offset: number, size: number, sortBy?: string, sortDirection?: SortDirection, filter?: Partial<F>, options?: O): Observable<LoadResult<T>>;