@sumaris-net/ngx-components 2.6.4-rc1 → 2.6.4-rc11
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/public_api.mjs +2 -1
- package/esm2020/src/app/core/form/form.utils.mjs +1 -1
- package/esm2020/src/app/core/services/model/entity.model.mjs +2 -1
- package/esm2020/src/app/core/services/model/filter.model.mjs +1 -1
- package/esm2020/src/app/core/table/testing/table.testing.mjs +1 -1
- package/esm2020/src/app/shared/dates.mjs +4 -5
- package/esm2020/src/app/shared/form/field.component.mjs +1 -1
- package/esm2020/src/app/shared/forms.mjs +8 -3
- package/esm2020/src/app/shared/material/autocomplete/material.autocomplete.mjs +7 -3
- package/esm2020/src/app/shared/material/autocomplete/testing/autocomplete.test.mjs +1 -1
- package/esm2020/src/app/shared/named-filter/named-filter.service.mjs +126 -0
- package/esm2020/src/app/shared/services/entity-service.class.mjs +1 -1
- package/fesm2015/sumaris-net.ngx-components.mjs +558 -442
- package/fesm2015/sumaris-net.ngx-components.mjs.map +1 -1
- package/fesm2020/sumaris-net.ngx-components.mjs +564 -442
- package/fesm2020/sumaris-net.ngx-components.mjs.map +1 -1
- package/package.json +1 -1
- package/public_api.d.ts +1 -0
- package/src/app/core/form/form.utils.d.ts +2 -0
- package/src/app/shared/forms.d.ts +1 -0
- package/src/app/shared/material/autocomplete/material.autocomplete.d.ts +2 -1
- package/src/app/shared/named-filter/named-filter.service.d.ts +74 -0
- package/src/assets/manifest.json +1 -1
package/package.json
CHANGED
package/public_api.d.ts
CHANGED
|
@@ -124,6 +124,7 @@ export * from './src/app/shared/validator/form-error-adapter.class';
|
|
|
124
124
|
export * from './src/app/shared/material/latlong/latlong.utils';
|
|
125
125
|
export * from './src/app/shared/debug/debug.module';
|
|
126
126
|
export * from './src/app/shared/debug/debug.component';
|
|
127
|
+
export * from './src/app/shared/named-filter/named-filter.service';
|
|
127
128
|
export * from './src/app/core/core.module';
|
|
128
129
|
export * from './src/app/core/services/model/account.model';
|
|
129
130
|
export * from './src/app/core/services/model/token.model';
|
|
@@ -199,6 +199,7 @@ export declare class FormArrayHelper<T = Entity<any>, C extends AbstractControl
|
|
|
199
199
|
*/
|
|
200
200
|
add(value?: T, options?: {
|
|
201
201
|
emitEvent: boolean;
|
|
202
|
+
insertAt?: number;
|
|
202
203
|
}): boolean;
|
|
203
204
|
removeAt(index: number): boolean;
|
|
204
205
|
resize(length: number, options?: {
|
|
@@ -281,6 +282,7 @@ export declare class AppFormArray<T extends Entity<T>, C extends AbstractControl
|
|
|
281
282
|
*/
|
|
282
283
|
add(value?: T, options?: {
|
|
283
284
|
emitEvent: boolean;
|
|
285
|
+
insertAt?: number;
|
|
284
286
|
}): void;
|
|
285
287
|
removeAt(index: number, options?: {
|
|
286
288
|
emitEvent: boolean;
|
|
@@ -38,6 +38,7 @@ export declare function disableControls(form: UntypedFormGroup, paths: string[],
|
|
|
38
38
|
}): void;
|
|
39
39
|
export declare function addValueInArray(arrayControl: UntypedFormArray, createControl: (value?: any) => AbstractControl, equals: (v1: any, v2: any) => boolean, isEmpty: (value: any) => boolean, value: any, options?: {
|
|
40
40
|
emitEvent: boolean;
|
|
41
|
+
insertAt?: number;
|
|
41
42
|
}): boolean;
|
|
42
43
|
/**
|
|
43
44
|
* Set an array using given default values. Each default value will be pass to the 'createControl()' function
|
|
@@ -67,6 +67,7 @@ export declare class MatAutocompleteField implements OnInit, AfterViewInit, OnDe
|
|
|
67
67
|
debug: boolean;
|
|
68
68
|
showSearchBar: boolean;
|
|
69
69
|
stickySearchBar: boolean;
|
|
70
|
+
applyImplicitValue: boolean | (() => boolean);
|
|
70
71
|
clicked: EventEmitter<MouseEvent>;
|
|
71
72
|
blurred: EventEmitter<FocusEvent>;
|
|
72
73
|
focused: EventEmitter<FocusEvent>;
|
|
@@ -134,5 +135,5 @@ export declare class MatAutocompleteField implements OnInit, AfterViewInit, OnDe
|
|
|
134
135
|
*/
|
|
135
136
|
private _fixSearchbarOverlay;
|
|
136
137
|
static ɵfac: i0.ɵɵFactoryDeclaration<MatAutocompleteField, [null, null, null, null, null, { optional: true; }]>;
|
|
137
|
-
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"; "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>;
|
|
138
|
+
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"; "fetchMoreThreshold": "fetchMoreThreshold"; "suggestLengthThreshold": "suggestLengthThreshold"; "showLoadingSpinner": "showLoadingSpinner"; "debug": "debug"; "showSearchBar": "showSearchBar"; "stickySearchBar": "stickySearchBar"; "applyImplicitValue": "applyImplicitValue"; "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>;
|
|
138
139
|
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { SortDirection } from '@angular/material/sort';
|
|
2
|
+
import { InjectionToken } from '@angular/core';
|
|
3
|
+
import { Observable } from 'rxjs';
|
|
4
|
+
import { Entity, EntityAsObjectOptions, IEntity } from '../../core/services/model/entity.model';
|
|
5
|
+
import { EntityFilter, IEntityFilter } from '../../core/services/model/filter.model';
|
|
6
|
+
import { EntitiesServiceLoadOptions, EntitiesServiceWatchOptions, IEntitiesService, IEntityService, LoadResult, SuggestService } from '../services/entity-service.class';
|
|
7
|
+
import { GraphqlService } from '../../core/graphql/graphql.service';
|
|
8
|
+
import { BaseEntityGraphqlMutations, BaseEntityGraphqlQueries, BaseEntityService, BaseEntityServiceOptions } from '../../core/services/base-entity-service.class';
|
|
9
|
+
import { PlatformService } from '../../core/services/platform.service';
|
|
10
|
+
import { StoreObject } from '@apollo/client/core';
|
|
11
|
+
import { AccountService } from '../../core/services/account.service';
|
|
12
|
+
import * as i0 from "@angular/core";
|
|
13
|
+
export interface INamedFilter<T extends INamedFilter<T>> extends IEntity<T, number> {
|
|
14
|
+
name: string;
|
|
15
|
+
entityName: string;
|
|
16
|
+
content: any;
|
|
17
|
+
recorderPersonId: number;
|
|
18
|
+
recorderDepartmentId: number;
|
|
19
|
+
}
|
|
20
|
+
export declare class NamedFilter<T extends NamedFilter<any> = NamedFilter<any>> extends Entity<T, number> implements INamedFilter<T> {
|
|
21
|
+
static fromObject: (source: any, opts?: any) => NamedFilter;
|
|
22
|
+
name: string;
|
|
23
|
+
entityName: string;
|
|
24
|
+
content: any;
|
|
25
|
+
recorderPersonId: number;
|
|
26
|
+
recorderDepartmentId: number;
|
|
27
|
+
fromObject(source: any, opts?: any): void;
|
|
28
|
+
asObject(opts?: EntityAsObjectOptions): StoreObject;
|
|
29
|
+
}
|
|
30
|
+
export interface INamedFilterFilter<T extends INamedFilter<T>> extends IEntityFilter<any, T> {
|
|
31
|
+
searchText: string;
|
|
32
|
+
entityName: string;
|
|
33
|
+
recorderPersonId: number;
|
|
34
|
+
recorderDepartmentId: number;
|
|
35
|
+
}
|
|
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> {
|
|
37
|
+
static fromObject: (source: any, opts?: any) => NamedFilterFilter;
|
|
38
|
+
searchText: string;
|
|
39
|
+
entityName: string;
|
|
40
|
+
recorderPersonId: number;
|
|
41
|
+
recorderDepartmentId: number;
|
|
42
|
+
fromObject(source: any, opts?: any): void;
|
|
43
|
+
}
|
|
44
|
+
export declare const APP_NAMED_FILTER_SERVICE: InjectionToken<INamedFilterService<any, any>>;
|
|
45
|
+
export interface INamedFilterServiceWatchOptions extends EntitiesServiceWatchOptions {
|
|
46
|
+
withContent: boolean;
|
|
47
|
+
}
|
|
48
|
+
export interface INamedFilterServiceLoadOptions extends EntitiesServiceLoadOptions {
|
|
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> {
|
|
58
|
+
protected graphql: GraphqlService;
|
|
59
|
+
protected platform: PlatformService;
|
|
60
|
+
protected account: AccountService;
|
|
61
|
+
protected dataType: new () => T;
|
|
62
|
+
protected filterType: new () => F;
|
|
63
|
+
protected options: BaseEntityServiceOptions<T, number, Q, M>;
|
|
64
|
+
protected constructor(graphql: GraphqlService, platform: PlatformService, account: AccountService, dataType: new () => T, filterType: new () => F, options: BaseEntityServiceOptions<T, number, Q, M>);
|
|
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>>;
|
|
69
|
+
suggest(value: any, filter: Partial<F>): Promise<LoadResult<T>>;
|
|
70
|
+
suggestFilter(searchText: string, filter?: Partial<F>): F;
|
|
71
|
+
asFilter(source: any): F;
|
|
72
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AbstractNamedFilterService<any, any, any, any, any, any>, never>;
|
|
73
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<AbstractNamedFilterService<any, any, any, any, any, any>, never, never, {}, {}, never, never, false>;
|
|
74
|
+
}
|
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.6.
|
|
5
|
+
"version": "2.6.4-alpha4",
|
|
6
6
|
"default_locale": "fr",
|
|
7
7
|
"description": "Angular components for building beautiful and responsive Apps",
|
|
8
8
|
"icons": [{
|