@ecodev/natural 47.2.0 → 47.3.0
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/modules/dropdown-components/type-natural-select/type-natural-select.component.mjs +1 -1
- package/esm2020/lib/modules/relations/relations.component.mjs +1 -1
- package/esm2020/lib/modules/select/select/select.component.mjs +48 -16
- package/fesm2015/ecodev-natural.mjs +50 -17
- package/fesm2015/ecodev-natural.mjs.map +1 -1
- package/fesm2020/ecodev-natural.mjs +49 -17
- package/fesm2020/ecodev-natural.mjs.map +1 -1
- package/lib/modules/select/select/select.component.d.ts +25 -9
- package/package.json +1 -1
|
@@ -11,28 +11,40 @@ import * as i0 from "@angular/core";
|
|
|
11
11
|
type V<TService> = string | ExtractTallOne<TService>;
|
|
12
12
|
/**
|
|
13
13
|
* Default usage:
|
|
14
|
-
*
|
|
14
|
+
* ```html
|
|
15
|
+
* <natural-select [service]="myServiceInstance" [(model)]="myModel" (modelChange)=myChangeFn($event)></natural-select>
|
|
16
|
+
* ```
|
|
15
17
|
*
|
|
16
18
|
* Custom template usage :
|
|
19
|
+
* ```html
|
|
17
20
|
* <natural-select [service]="svc" [(ngModel)]="model">
|
|
18
21
|
* <ng-template let-item="item">
|
|
19
22
|
* <span>{{ item.xxx }}</span>
|
|
20
23
|
* </ng-template>
|
|
21
24
|
* </natural-select>
|
|
25
|
+
* ```
|
|
22
26
|
*
|
|
23
|
-
* [(ngModel)] and (ngModelChange) are optional
|
|
27
|
+
* `[(ngModel)]` and `(ngModelChange)` are optional.
|
|
24
28
|
*
|
|
25
29
|
* Placeholder :
|
|
26
|
-
*
|
|
30
|
+
* ```html
|
|
31
|
+
* <natural-select placeholder="my placeholder"></natural-select>
|
|
32
|
+
* ```
|
|
27
33
|
*
|
|
28
34
|
* Never float placeholder :
|
|
29
|
-
*
|
|
35
|
+
* ```html
|
|
36
|
+
* <natural-select placeholder="my placeholder" floatPlaceholder="never"></natural-select>
|
|
37
|
+
* ```
|
|
30
38
|
*
|
|
31
|
-
* Search with like %xxx% on specified
|
|
32
|
-
*
|
|
39
|
+
* Search with like %xxx% on specified field `name` instead of custom filter on whole object
|
|
40
|
+
* ```html
|
|
41
|
+
* <natural-select searchField="name"></natural-select>
|
|
42
|
+
* ```
|
|
33
43
|
*
|
|
34
44
|
* Allows to input free string without selecting an option from autocomplete suggestions
|
|
35
|
-
*
|
|
45
|
+
* ```html
|
|
46
|
+
* <natural-select [optionRequired]="false"></natural-select>
|
|
47
|
+
* ```
|
|
36
48
|
*/
|
|
37
49
|
export declare class NaturalSelectComponent<TService extends NaturalAbstractModelService<any, any, PaginatedData<Literal>, QueryVariables, any, any, any, any, any, any>> extends AbstractSelect<V<TService>, V<TService>> implements OnInit, OnDestroy, ControlValueAccessor, AfterViewInit {
|
|
38
50
|
autoTrigger: MatAutocompleteTrigger;
|
|
@@ -46,9 +58,13 @@ export declare class NaturalSelectComponent<TService extends NaturalAbstractMode
|
|
|
46
58
|
*/
|
|
47
59
|
optionRequired: boolean;
|
|
48
60
|
/**
|
|
49
|
-
* The
|
|
61
|
+
* The field on which to search for, default to 'custom'.
|
|
50
62
|
*/
|
|
51
63
|
searchField: 'custom' | string;
|
|
64
|
+
/**
|
|
65
|
+
* The operator with which to search for, default to 'search' if `searchField` is 'custom', else 'like'.
|
|
66
|
+
*/
|
|
67
|
+
searchOperator: 'search' | string | null;
|
|
52
68
|
/**
|
|
53
69
|
* Additional filter for query
|
|
54
70
|
*/
|
|
@@ -93,6 +109,6 @@ export declare class NaturalSelectComponent<TService extends NaturalAbstractMode
|
|
|
93
109
|
showClearButton(): boolean;
|
|
94
110
|
private getSearchFilter;
|
|
95
111
|
static ɵfac: i0.ɵɵFactoryDeclaration<NaturalSelectComponent<any>, never>;
|
|
96
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<NaturalSelectComponent<any>, "natural-select", never, { "service": "service"; "optionRequired": "optionRequired"; "searchField": "searchField"; "filter": "filter"; "disabled": "disabled"; }, {}, ["itemTemplate"], never, false, never>;
|
|
112
|
+
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>;
|
|
97
113
|
}
|
|
98
114
|
export {};
|