@ecodev/natural 47.3.0 → 47.3.2
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/lib/classes/abstract-editable-list.mjs +3 -1
- package/esm2020/lib/modules/file/utils.mjs +16 -5
- package/esm2020/lib/modules/relations/relations.component.mjs +11 -6
- package/esm2020/lib/modules/select/select/select.component.mjs +11 -9
- package/fesm2015/ecodev-natural.mjs +36 -16
- package/fesm2015/ecodev-natural.mjs.map +1 -1
- package/fesm2020/ecodev-natural.mjs +36 -16
- package/fesm2020/ecodev-natural.mjs.map +1 -1
- package/lib/classes/abstract-editable-list.d.ts +2 -0
- package/lib/modules/relations/relations.component.d.ts +9 -10
- package/lib/modules/select/select/select.component.d.ts +2 -1
- package/package.json +1 -1
|
@@ -55,6 +55,8 @@ export declare class NaturalAbstractEditableList<TService extends NaturalAbstrac
|
|
|
55
55
|
* - AbstractModelService.getPartialVariablesForCreation()
|
|
56
56
|
* - AbstractModelService.getPartialVariablesForUpdate()
|
|
57
57
|
* - some other required treatment.
|
|
58
|
+
*
|
|
59
|
+
* TODO return type is incorrect and should be closer to `Partial<T>[]` or an even looser type, because we don't really know what fields exists in the form. When we fix this, we should also remove type coercing in unit tests.
|
|
58
60
|
*/
|
|
59
61
|
getItems(): T[];
|
|
60
62
|
/**
|
|
@@ -7,9 +7,8 @@ import { HierarchicFiltersConfiguration } from '../../modules/hierarchic-selecto
|
|
|
7
7
|
import { LinkableObject, NaturalLinkMutationService } from '../../services/link-mutation.service';
|
|
8
8
|
import { NaturalHierarchicConfiguration } from '../hierarchic-selector/classes/hierarchic-configuration';
|
|
9
9
|
import { NaturalHierarchicSelectorDialogService } from '../hierarchic-selector/hierarchic-selector-dialog/hierarchic-selector-dialog.service';
|
|
10
|
-
import { Filter } from '../search/classes/graphql-doctrine.types';
|
|
11
10
|
import { NaturalAbstractModelService } from '../../services/abstract-model.service';
|
|
12
|
-
import {
|
|
11
|
+
import { ExtractTallOne, ExtractVall } from '../../types/types';
|
|
13
12
|
import * as i0 from "@angular/core";
|
|
14
13
|
/**
|
|
15
14
|
* Custom template usage :
|
|
@@ -19,11 +18,11 @@ import * as i0 from "@angular/core";
|
|
|
19
18
|
* </ng-template>
|
|
20
19
|
* </natural-relations>
|
|
21
20
|
*/
|
|
22
|
-
export declare class NaturalRelationsComponent<TService extends NaturalAbstractModelService<
|
|
21
|
+
export declare class NaturalRelationsComponent<TService extends NaturalAbstractModelService<unknown, any, PaginatedData<LinkableObject>, QueryVariables, unknown, any, unknown, any, unknown, any>> extends NaturalAbstractController implements OnInit, OnChanges, OnDestroy {
|
|
23
22
|
private readonly linkMutationService;
|
|
24
23
|
private readonly hierarchicSelectorDialog;
|
|
25
24
|
private select?;
|
|
26
|
-
itemTemplate?: TemplateRef<
|
|
25
|
+
itemTemplate?: TemplateRef<unknown>;
|
|
27
26
|
service?: TService;
|
|
28
27
|
/**
|
|
29
28
|
* The placeholder used in the button to add a new relation
|
|
@@ -32,11 +31,11 @@ export declare class NaturalRelationsComponent<TService extends NaturalAbstractM
|
|
|
32
31
|
/**
|
|
33
32
|
* Filter for autocomplete selector
|
|
34
33
|
*/
|
|
35
|
-
autocompleteSelectorFilter?:
|
|
34
|
+
autocompleteSelectorFilter?: ExtractVall<TService>['filter'] | null | undefined;
|
|
36
35
|
/**
|
|
37
36
|
* Function to customize the rendering of the selected item as text in input
|
|
38
37
|
*/
|
|
39
|
-
displayWith?: (item:
|
|
38
|
+
displayWith?: (item: ExtractTallOne<TService> | null) => string;
|
|
40
39
|
/**
|
|
41
40
|
* Whether the relations can be changed
|
|
42
41
|
*/
|
|
@@ -65,7 +64,7 @@ export declare class NaturalRelationsComponent<TService extends NaturalAbstractM
|
|
|
65
64
|
/**
|
|
66
65
|
* Listing service instance
|
|
67
66
|
*/
|
|
68
|
-
dataSource?: NaturalDataSource
|
|
67
|
+
dataSource?: NaturalDataSource<PaginatedData<LinkableObject>>;
|
|
69
68
|
loading: boolean;
|
|
70
69
|
/**
|
|
71
70
|
* Table columns
|
|
@@ -88,7 +87,7 @@ export declare class NaturalRelationsComponent<TService extends NaturalAbstractM
|
|
|
88
87
|
* So if the relations are from one action -> to many objectives, then the filter must filter
|
|
89
88
|
* the objectives that have indeed a relation to the particular action.
|
|
90
89
|
*/
|
|
91
|
-
set filter(filter:
|
|
90
|
+
set filter(filter: ExtractVall<TService>['filter']);
|
|
92
91
|
ngOnInit(): void;
|
|
93
92
|
ngOnChanges(): void;
|
|
94
93
|
/**
|
|
@@ -101,9 +100,9 @@ export declare class NaturalRelationsComponent<TService extends NaturalAbstractM
|
|
|
101
100
|
* Refetch result to display it in table
|
|
102
101
|
* TODO : could maybe use "update" attribute of apollo.mutate function to update table faster (but hard to do it here)
|
|
103
102
|
*/
|
|
104
|
-
addRelations(relations: LinkableObject[]): void;
|
|
103
|
+
addRelations(relations: (LinkableObject | ExtractTallOne<TService> | string | null)[]): void;
|
|
105
104
|
pagination(event?: PageEvent): void;
|
|
106
|
-
getDisplayFn(): (item:
|
|
105
|
+
getDisplayFn(): (item: ExtractTallOne<TService> | null) => string;
|
|
107
106
|
openNaturalHierarchicSelector(): void;
|
|
108
107
|
/**
|
|
109
108
|
* Get list from database
|
|
@@ -74,7 +74,7 @@ export declare class NaturalSelectComponent<TService extends NaturalAbstractMode
|
|
|
74
74
|
*/
|
|
75
75
|
items: null | Observable<readonly any[]>;
|
|
76
76
|
/**
|
|
77
|
-
* Whether
|
|
77
|
+
* Whether we are searching something
|
|
78
78
|
*/
|
|
79
79
|
loading: boolean;
|
|
80
80
|
/**
|
|
@@ -108,6 +108,7 @@ export declare class NaturalSelectComponent<TService extends NaturalAbstractMode
|
|
|
108
108
|
search(term: V<TService> | null): void;
|
|
109
109
|
showClearButton(): boolean;
|
|
110
110
|
private getSearchFilter;
|
|
111
|
+
getVariablesForDebug(): Readonly<QueryVariables> | undefined;
|
|
111
112
|
static ɵfac: i0.ɵɵFactoryDeclaration<NaturalSelectComponent<any>, never>;
|
|
112
113
|
static ɵcmp: i0.ɵɵComponentDeclaration<NaturalSelectComponent<any>, "natural-select", never, { "service": "service"; "optionRequired": "optionRequired"; "searchField": "searchField"; "searchOperator": "searchOperator"; "filter": "filter"; "disabled": "disabled"; }, {}, ["itemTemplate"], never, false, never>;
|
|
113
114
|
}
|