@sumaris-net/ngx-components 2.6.4-rc11 → 2.6.4-rc13
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/esm2020/src/app/shared/named-filter/named-filter.service.mjs +17 -37
- package/fesm2015/sumaris-net.ngx-components.mjs +16 -35
- package/fesm2015/sumaris-net.ngx-components.mjs.map +1 -1
- package/fesm2020/sumaris-net.ngx-components.mjs +16 -36
- package/fesm2020/sumaris-net.ngx-components.mjs.map +1 -1
- package/package.json +1 -1
- package/src/app/shared/named-filter/named-filter.service.d.ts +13 -30
package/package.json
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
import { SortDirection } from '@angular/material/sort';
|
|
2
1
|
import { InjectionToken } from '@angular/core';
|
|
3
|
-
import {
|
|
4
|
-
import { Entity, EntityAsObjectOptions, IEntity } from '../../core/services/model/entity.model';
|
|
2
|
+
import { Entity, IEntity } from '../../core/services/model/entity.model';
|
|
5
3
|
import { EntityFilter, IEntityFilter } from '../../core/services/model/filter.model';
|
|
6
|
-
import {
|
|
4
|
+
import { IEntitiesService, IEntityService, LoadResult, SuggestService } from '../services/entity-service.class';
|
|
7
5
|
import { GraphqlService } from '../../core/graphql/graphql.service';
|
|
8
|
-
import {
|
|
6
|
+
import { BaseEntityService, BaseEntityServiceOptions } from '../../core/services/base-entity-service.class';
|
|
9
7
|
import { PlatformService } from '../../core/services/platform.service';
|
|
10
|
-
import { StoreObject } from '@apollo/client/core';
|
|
11
8
|
import { AccountService } from '../../core/services/account.service';
|
|
12
9
|
import * as i0 from "@angular/core";
|
|
13
10
|
export interface INamedFilter<T extends INamedFilter<T>> extends IEntity<T, number> {
|
|
@@ -25,15 +22,14 @@ export declare class NamedFilter<T extends NamedFilter<any> = NamedFilter<any>>
|
|
|
25
22
|
recorderPersonId: number;
|
|
26
23
|
recorderDepartmentId: number;
|
|
27
24
|
fromObject(source: any, opts?: any): void;
|
|
28
|
-
asObject(opts?: EntityAsObjectOptions): StoreObject;
|
|
29
25
|
}
|
|
30
|
-
export interface INamedFilterFilter<T extends INamedFilter<T>> extends IEntityFilter<
|
|
26
|
+
export interface INamedFilterFilter<F extends INamedFilterFilter<any, T>, T extends INamedFilter<T>> extends IEntityFilter<F, T> {
|
|
31
27
|
searchText: string;
|
|
32
28
|
entityName: string;
|
|
33
29
|
recorderPersonId: number;
|
|
34
30
|
recorderDepartmentId: number;
|
|
35
31
|
}
|
|
36
|
-
export declare class NamedFilterFilter<F extends NamedFilterFilter<any, T> = NamedFilterFilter<any, any>, T extends NamedFilter<any> = NamedFilter<any>> extends EntityFilter<F, T> implements INamedFilterFilter<T> {
|
|
32
|
+
export declare class NamedFilterFilter<F extends NamedFilterFilter<any, T> = NamedFilterFilter<any, any>, T extends NamedFilter<any> = NamedFilter<any>> extends EntityFilter<F, T> implements INamedFilterFilter<F, T> {
|
|
37
33
|
static fromObject: (source: any, opts?: any) => NamedFilterFilter;
|
|
38
34
|
searchText: string;
|
|
39
35
|
entityName: string;
|
|
@@ -42,33 +38,20 @@ export declare class NamedFilterFilter<F extends NamedFilterFilter<any, T> = Nam
|
|
|
42
38
|
fromObject(source: any, opts?: any): void;
|
|
43
39
|
}
|
|
44
40
|
export declare const APP_NAMED_FILTER_SERVICE: InjectionToken<INamedFilterService<any, any>>;
|
|
45
|
-
export interface
|
|
46
|
-
withContent: boolean;
|
|
41
|
+
export interface INamedFilterService<T extends INamedFilter<T>, F extends INamedFilterFilter<F, T>> extends IEntitiesService<T, F>, IEntityService<T, number>, SuggestService<T, F> {
|
|
47
42
|
}
|
|
48
|
-
export
|
|
49
|
-
withContent: boolean;
|
|
50
|
-
}
|
|
51
|
-
export interface INamedFilterService<T extends INamedFilter<T>, F extends EntityFilter<F, T>> extends IEntitiesService<T, F, INamedFilterServiceWatchOptions>, IEntityService<T, number, INamedFilterServiceLoadOptions>, SuggestService<T, F> {
|
|
52
|
-
suggestFilter(searchText: string, filter?: Partial<F>): F;
|
|
53
|
-
}
|
|
54
|
-
export interface INamedFilterQueries extends BaseEntityGraphqlQueries {
|
|
55
|
-
loadAllWithContent: any;
|
|
56
|
-
}
|
|
57
|
-
export declare abstract class AbstractNamedFilterService<T extends NamedFilter<T>, F extends NamedFilterFilter<F, T>, WO extends INamedFilterServiceWatchOptions = INamedFilterServiceWatchOptions, LO extends INamedFilterServiceLoadOptions = INamedFilterServiceLoadOptions, Q extends INamedFilterQueries = INamedFilterQueries, M extends BaseEntityGraphqlMutations = BaseEntityGraphqlMutations> extends BaseEntityService<T, F, number, WO, LO, Q, M> implements INamedFilterService<T, F> {
|
|
43
|
+
export declare abstract class AbstractNamedFilterService<T extends NamedFilter<T>, F extends NamedFilterFilter<F, T>> extends BaseEntityService<T, F, number> implements INamedFilterService<T, F> {
|
|
58
44
|
protected graphql: GraphqlService;
|
|
59
45
|
protected platform: PlatformService;
|
|
60
46
|
protected account: AccountService;
|
|
61
47
|
protected dataType: new () => T;
|
|
62
48
|
protected filterType: new () => F;
|
|
63
|
-
protected options: BaseEntityServiceOptions<T, number
|
|
64
|
-
protected constructor(graphql: GraphqlService, platform: PlatformService, account: AccountService, dataType: new () => T, filterType: new () => F, options: BaseEntityServiceOptions<T, number
|
|
65
|
-
watchAll(offset: number, size: number, sortBy?: string, sortDirection?: SortDirection, filter?: F, options?: WO): Observable<LoadResult<T>>;
|
|
66
|
-
loadAll(offset: number, size: number, sortBy?: string, sortDirection?: SortDirection, filter?: Partial<F>, options?: LO & {
|
|
67
|
-
debug?: boolean;
|
|
68
|
-
}): Promise<LoadResult<T>>;
|
|
49
|
+
protected options: BaseEntityServiceOptions<T, number>;
|
|
50
|
+
protected constructor(graphql: GraphqlService, platform: PlatformService, account: AccountService, dataType: new () => T, filterType: new () => F, options: BaseEntityServiceOptions<T, number>);
|
|
69
51
|
suggest(value: any, filter: Partial<F>): Promise<LoadResult<T>>;
|
|
70
|
-
|
|
52
|
+
asSuggestFilter(searchText: string, filter?: Partial<F>): F;
|
|
71
53
|
asFilter(source: any): F;
|
|
72
|
-
|
|
73
|
-
static
|
|
54
|
+
protected fillDefaultProperties(source: T): void;
|
|
55
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AbstractNamedFilterService<any, any>, never>;
|
|
56
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<AbstractNamedFilterService<any, any>, never, never, {}, {}, never, never, false>;
|
|
74
57
|
}
|