@ecodev/natural 50.0.1 → 50.0.3
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/data-source.mjs +1 -1
- package/esm2020/lib/modules/common/pipes/capitalize.pipe.mjs +4 -1
- package/esm2020/lib/modules/hierarchic-selector/hierarchic-selector/hierarchic-selector.component.mjs +1 -1
- package/esm2020/lib/modules/search/dropdown-container/dropdown.service.mjs +1 -1
- package/esm2020/lib/modules/search/facet-selector/facet-selector.component.mjs +4 -3
- package/esm2020/lib/modules/search/group/group.component.mjs +9 -3
- package/esm2020/lib/modules/search/input/input.component.mjs +11 -4
- package/esm2020/lib/modules/search/search/search.component.mjs +9 -3
- package/esm2020/lib/modules/search/search.module.mjs +3 -3
- package/fesm2015/ecodev-natural.mjs +33 -10
- package/fesm2015/ecodev-natural.mjs.map +1 -1
- package/fesm2020/ecodev-natural.mjs +33 -10
- package/fesm2020/ecodev-natural.mjs.map +1 -1
- package/lib/classes/data-source.d.ts +1 -1
- package/lib/modules/common/pipes/capitalize.pipe.d.ts +3 -0
- package/lib/modules/search/dropdown-container/dropdown.service.d.ts +1 -0
- package/lib/modules/search/facet-selector/facet-selector.component.d.ts +1 -0
- package/lib/modules/search/group/group.component.d.ts +5 -1
- package/lib/modules/search/input/input.component.d.ts +5 -1
- package/lib/modules/search/search/search.component.d.ts +5 -1
- package/package.json +1 -1
- package/src/lib/_natural.theme.scss +1 -0
|
@@ -3,7 +3,7 @@ import { Observable } from 'rxjs';
|
|
|
3
3
|
import { Literal } from '../types/types';
|
|
4
4
|
export interface PaginatedData<T> {
|
|
5
5
|
readonly items: readonly T[];
|
|
6
|
-
readonly offset?: number;
|
|
6
|
+
readonly offset?: number | null;
|
|
7
7
|
readonly pageSize: number;
|
|
8
8
|
readonly pageIndex: number;
|
|
9
9
|
readonly length: number;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { PipeTransform } from '@angular/core';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
|
+
/**
|
|
4
|
+
* Returns the string with the first letter as capital
|
|
5
|
+
*/
|
|
3
6
|
export declare class NaturalCapitalizePipe implements PipeTransform {
|
|
4
7
|
transform(value: string | null): string | null;
|
|
5
8
|
static ɵfac: i0.ɵɵFactoryDeclaration<NaturalCapitalizePipe, never>;
|
|
@@ -8,6 +8,7 @@ import * as i0 from "@angular/core";
|
|
|
8
8
|
export interface NaturalDropdownData<C = any> {
|
|
9
9
|
condition: FilterGroupConditionField | null;
|
|
10
10
|
configuration: C;
|
|
11
|
+
title?: string;
|
|
11
12
|
}
|
|
12
13
|
export declare const NATURAL_DROPDOWN_DATA: InjectionToken<NaturalDropdownData<any>>;
|
|
13
14
|
export declare class NaturalDropdownService {
|
|
@@ -12,6 +12,7 @@ export interface FacetSelectorConfiguration {
|
|
|
12
12
|
facets: NaturalSearchFacets;
|
|
13
13
|
}
|
|
14
14
|
export declare class FacetSelectorComponent implements DropdownComponent {
|
|
15
|
+
data: NaturalDropdownData<FacetSelectorConfiguration>;
|
|
15
16
|
protected dropdownRef: NaturalDropdownRef;
|
|
16
17
|
renderedValue: BehaviorSubject<string>;
|
|
17
18
|
facets: NaturalSearchFacets;
|
|
@@ -5,6 +5,10 @@ import { GroupSelections, NaturalSearchSelection } from '../types/values';
|
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export declare class NaturalGroupComponent {
|
|
7
7
|
newValueInput: NaturalInputComponent;
|
|
8
|
+
/**
|
|
9
|
+
* Text display in the dropdown to select the facet
|
|
10
|
+
*/
|
|
11
|
+
dropdownTitle: string;
|
|
8
12
|
placeholder: string;
|
|
9
13
|
facets: NaturalSearchFacets;
|
|
10
14
|
readonly selectionChange: EventEmitter<GroupSelections>;
|
|
@@ -14,5 +18,5 @@ export declare class NaturalGroupComponent {
|
|
|
14
18
|
addInput(selection: NaturalSearchSelection): void;
|
|
15
19
|
removeInput(index: number): void;
|
|
16
20
|
static ɵfac: i0.ɵɵFactoryDeclaration<NaturalGroupComponent, never>;
|
|
17
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<NaturalGroupComponent, "natural-group", never, { "placeholder": "placeholder"; "facets": "facets"; "selections": "selections"; }, { "selectionChange": "selectionChange"; }, never, never, false, never>;
|
|
21
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NaturalGroupComponent, "natural-group", never, { "dropdownTitle": "dropdownTitle"; "placeholder": "placeholder"; "facets": "facets"; "selections": "selections"; }, { "selectionChange": "selectionChange"; }, never, never, false, never>;
|
|
18
22
|
}
|
|
@@ -36,6 +36,10 @@ export declare class NaturalInputComponent implements OnInit, OnChanges, OnDestr
|
|
|
36
36
|
* Available facets, allows the user to pick one, than generated then a selection
|
|
37
37
|
*/
|
|
38
38
|
facets: NaturalSearchFacets;
|
|
39
|
+
/**
|
|
40
|
+
* Text display in the dropdown to select the facet
|
|
41
|
+
*/
|
|
42
|
+
dropdownTitle: string;
|
|
39
43
|
/**
|
|
40
44
|
* Emits when user a added/updated/deleted a search (from global context or from facet)
|
|
41
45
|
*/
|
|
@@ -103,6 +107,6 @@ export declare class NaturalInputComponent implements OnInit, OnChanges, OnDestr
|
|
|
103
107
|
private setValue;
|
|
104
108
|
private getSelection;
|
|
105
109
|
static ɵfac: i0.ɵɵFactoryDeclaration<NaturalInputComponent, never>;
|
|
106
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<NaturalInputComponent, "natural-input", never, { "placeholder": "placeholder"; "searchFieldName": "searchFieldName"; "selection": "selection"; "facets": "facets"; }, { "selectionChange": "selectionChange"; "cleared": "cleared"; }, never, never, false, never>;
|
|
110
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NaturalInputComponent, "natural-input", never, { "placeholder": "placeholder"; "searchFieldName": "searchFieldName"; "selection": "selection"; "facets": "facets"; "dropdownTitle": "dropdownTitle"; }, { "selectionChange": "selectionChange"; "cleared": "cleared"; }, never, never, false, never>;
|
|
107
111
|
}
|
|
108
112
|
export {};
|
|
@@ -17,6 +17,10 @@ export declare class NaturalSearchComponent implements OnChanges {
|
|
|
17
17
|
* Whether to allow end-user to create multiple `OR` groups
|
|
18
18
|
*/
|
|
19
19
|
multipleGroups: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Text display in the dropdown to select the facet
|
|
22
|
+
*/
|
|
23
|
+
dropdownTitle: string;
|
|
20
24
|
/**
|
|
21
25
|
* Emits when some selection has been setted by the user
|
|
22
26
|
*/
|
|
@@ -37,5 +41,5 @@ export declare class NaturalSearchComponent implements OnChanges {
|
|
|
37
41
|
removeGroup(index: number): void;
|
|
38
42
|
clear(): void;
|
|
39
43
|
static ɵfac: i0.ɵɵFactoryDeclaration<NaturalSearchComponent, never>;
|
|
40
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<NaturalSearchComponent, "natural-search", never, { "placeholder": "placeholder"; "facets": "facets"; "multipleGroups": "multipleGroups"; "selections": "selections"; }, { "selectionChange": "selectionChange"; }, never, never, false, never>;
|
|
44
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NaturalSearchComponent, "natural-search", never, { "placeholder": "placeholder"; "facets": "facets"; "multipleGroups": "multipleGroups"; "dropdownTitle": "dropdownTitle"; "selections": "selections"; }, { "selectionChange": "selectionChange"; }, never, never, false, never>;
|
|
41
45
|
}
|
package/package.json
CHANGED