@ecodev/natural 63.9.0 → 64.0.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/fesm2022/ecodev-natural-vanilla.mjs +3 -3
- package/fesm2022/ecodev-natural-vanilla.mjs.map +1 -1
- package/fesm2022/ecodev-natural.mjs +561 -693
- package/fesm2022/ecodev-natural.mjs.map +1 -1
- package/index.d.ts +4264 -3
- package/package.json +9 -9
- package/src/lib/modules/sidenav/_sidenav.theme.scss +1 -1
- package/vanilla/index.d.ts +418 -3
- package/lib/classes/abstract-detail.d.ts +0 -108
- package/lib/classes/abstract-editable-list.d.ts +0 -70
- package/lib/classes/abstract-list.d.ts +0 -191
- package/lib/classes/abstract-navigable-list.d.ts +0 -54
- package/lib/classes/apollo-utils.d.ts +0 -18
- package/lib/classes/crypto.d.ts +0 -8
- package/lib/classes/cumulative-changes.d.ts +0 -27
- package/lib/classes/data-source.d.ts +0 -32
- package/lib/classes/network-activity.service.d.ts +0 -54
- package/lib/classes/providers.d.ts +0 -5
- package/lib/classes/query-variable-manager-utils.d.ts +0 -2
- package/lib/classes/query-variable-manager.d.ts +0 -91
- package/lib/classes/rxjs.d.ts +0 -42
- package/lib/classes/signing.d.ts +0 -7
- package/lib/classes/tld.d.ts +0 -10
- package/lib/classes/utility.d.ts +0 -85
- package/lib/classes/validators.d.ts +0 -72
- package/lib/directives/http-prefix.directive.d.ts +0 -15
- package/lib/modules/alert/alert.service.d.ts +0 -21
- package/lib/modules/alert/confirm.component.d.ts +0 -12
- package/lib/modules/alert/public-api.d.ts +0 -2
- package/lib/modules/avatar/component/avatar.component.d.ts +0 -37
- package/lib/modules/avatar/public-api.d.ts +0 -2
- package/lib/modules/avatar/service/avatar.service.d.ts +0 -24
- package/lib/modules/avatar/sources/gravatar.d.ts +0 -8
- package/lib/modules/avatar/sources/image.d.ts +0 -8
- package/lib/modules/avatar/sources/initials.d.ts +0 -8
- package/lib/modules/avatar/sources/source.d.ts +0 -23
- package/lib/modules/columns-picker/columns-picker.component.d.ts +0 -45
- package/lib/modules/columns-picker/public-api.d.ts +0 -2
- package/lib/modules/columns-picker/types.d.ts +0 -84
- package/lib/modules/common/directives/background-density.directive.d.ts +0 -37
- package/lib/modules/common/directives/linkable-tab.directive.d.ts +0 -29
- package/lib/modules/common/directives/src-density.directive.d.ts +0 -33
- package/lib/modules/common/pipes/capitalize.pipe.d.ts +0 -10
- package/lib/modules/common/pipes/ellipsis.pipe.d.ts +0 -7
- package/lib/modules/common/pipes/enum.pipe.d.ts +0 -14
- package/lib/modules/common/pipes/time-ago.pipe.d.ts +0 -19
- package/lib/modules/common/public-api.d.ts +0 -11
- package/lib/modules/common/services/memory-storage.d.ts +0 -46
- package/lib/modules/common/services/seo.provider.d.ts +0 -6
- package/lib/modules/common/services/seo.service.d.ts +0 -148
- package/lib/modules/detail-header/detail-header.component.d.ts +0 -43
- package/lib/modules/detail-header/public-api.d.ts +0 -1
- package/lib/modules/dialog-trigger/dialog-trigger.component.d.ts +0 -37
- package/lib/modules/dialog-trigger/public-api.d.ts +0 -1
- package/lib/modules/dropdown-components/abstract-association-select-component.directive.d.ts +0 -35
- package/lib/modules/dropdown-components/public-api.d.ts +0 -10
- package/lib/modules/dropdown-components/type-boolean/type-boolean.component.d.ts +0 -12
- package/lib/modules/dropdown-components/type-date/type-date.component.d.ts +0 -36
- package/lib/modules/dropdown-components/type-date-range/type-date-range.component.d.ts +0 -43
- package/lib/modules/dropdown-components/type-hierarchic-selector/type-hierarchic-selector.component.d.ts +0 -31
- package/lib/modules/dropdown-components/type-natural-select/type-natural-select.component.d.ts +0 -18
- package/lib/modules/dropdown-components/type-number/type-number.component.d.ts +0 -36
- package/lib/modules/dropdown-components/type-options/type-options.component.d.ts +0 -29
- package/lib/modules/dropdown-components/type-select/type-select.component.d.ts +0 -59
- package/lib/modules/dropdown-components/type-text/type-text.component.d.ts +0 -26
- package/lib/modules/dropdown-components/types.d.ts +0 -13
- package/lib/modules/dropdown-components/utils.d.ts +0 -14
- package/lib/modules/file/abstract-file.d.ts +0 -96
- package/lib/modules/file/component/file.component.d.ts +0 -58
- package/lib/modules/file/file-drop.directive.d.ts +0 -32
- package/lib/modules/file/file-select.directive.d.ts +0 -15
- package/lib/modules/file/file.service.d.ts +0 -19
- package/lib/modules/file/public-api.d.ts +0 -6
- package/lib/modules/file/types.d.ts +0 -7
- package/lib/modules/file/utils.d.ts +0 -8
- package/lib/modules/fixed-button/fixed-button.component.d.ts +0 -11
- package/lib/modules/fixed-button/public-api.d.ts +0 -1
- package/lib/modules/fixed-button-detail/fixed-button-detail.component.d.ts +0 -24
- package/lib/modules/fixed-button-detail/public-api.d.ts +0 -1
- package/lib/modules/hierarchic-selector/classes/flat-node.d.ts +0 -11
- package/lib/modules/hierarchic-selector/classes/hierarchic-configuration.d.ts +0 -56
- package/lib/modules/hierarchic-selector/classes/hierarchic-filters-configuration.d.ts +0 -7
- package/lib/modules/hierarchic-selector/classes/model-node.d.ts +0 -13
- package/lib/modules/hierarchic-selector/hierarchic-selector/hierarchic-selector.component.d.ts +0 -160
- package/lib/modules/hierarchic-selector/hierarchic-selector/hierarchic-selector.service.d.ts +0 -76
- package/lib/modules/hierarchic-selector/hierarchic-selector-dialog/hierarchic-selector-dialog.component.d.ts +0 -59
- package/lib/modules/hierarchic-selector/hierarchic-selector-dialog/hierarchic-selector-dialog.service.d.ts +0 -9
- package/lib/modules/hierarchic-selector/public-api.d.ts +0 -6
- package/lib/modules/icon/icon.directive.d.ts +0 -39
- package/lib/modules/icon/icon.module.d.ts +0 -9
- package/lib/modules/icon/public-api.d.ts +0 -2
- package/lib/modules/logger/error-handler.d.ts +0 -52
- package/lib/modules/logger/error.module.d.ts +0 -3
- package/lib/modules/logger/public-api.d.ts +0 -3
- package/lib/modules/matomo/matomo.service.d.ts +0 -42
- package/lib/modules/matomo/public-api.d.ts +0 -1
- package/lib/modules/panels/abstract-panel.d.ts +0 -37
- package/lib/modules/panels/fallback-if-no-opened-panels.urlmatcher.d.ts +0 -6
- package/lib/modules/panels/panels.component.d.ts +0 -9
- package/lib/modules/panels/panels.module.d.ts +0 -3
- package/lib/modules/panels/panels.service.d.ts +0 -121
- package/lib/modules/panels/panels.urlmatcher.d.ts +0 -8
- package/lib/modules/panels/public-api.d.ts +0 -7
- package/lib/modules/panels/types.d.ts +0 -61
- package/lib/modules/relations/public-api.d.ts +0 -1
- package/lib/modules/relations/relations.component.d.ts +0 -123
- package/lib/modules/search/classes/graphql-doctrine.d.ts +0 -4
- package/lib/modules/search/classes/graphql-doctrine.types.d.ts +0 -83
- package/lib/modules/search/classes/transformers.d.ts +0 -78
- package/lib/modules/search/classes/url.d.ts +0 -18
- package/lib/modules/search/classes/utils.d.ts +0 -17
- package/lib/modules/search/dropdown-container/dropdown-container.component.d.ts +0 -31
- package/lib/modules/search/dropdown-container/dropdown-ref.d.ts +0 -13
- package/lib/modules/search/dropdown-container/dropdown.service.d.ts +0 -24
- package/lib/modules/search/facet-selector/facet-selector.component.d.ts +0 -32
- package/lib/modules/search/group/group.component.d.ts +0 -21
- package/lib/modules/search/input/input.component.d.ts +0 -110
- package/lib/modules/search/public-api.d.ts +0 -11
- package/lib/modules/search/search/search.component.d.ts +0 -44
- package/lib/modules/search/types/dropdown-component.d.ts +0 -20
- package/lib/modules/search/types/facet.d.ts +0 -75
- package/lib/modules/search/types/values.d.ts +0 -32
- package/lib/modules/select/abstract-select.component.d.ts +0 -127
- package/lib/modules/select/public-api.d.ts +0 -3
- package/lib/modules/select/select/select.component.d.ts +0 -135
- package/lib/modules/select/select-enum/select-enum.component.d.ts +0 -32
- package/lib/modules/select/select-hierarchic/select-hierarchic.component.d.ts +0 -65
- package/lib/modules/sidenav/public-api.d.ts +0 -5
- package/lib/modules/sidenav/sidenav/sidenav.component.d.ts +0 -5
- package/lib/modules/sidenav/sidenav-container/sidenav-container.component.d.ts +0 -45
- package/lib/modules/sidenav/sidenav-content/sidenav-content.component.d.ts +0 -5
- package/lib/modules/sidenav/sidenav-stack.service.d.ts +0 -28
- package/lib/modules/sidenav/sidenav.service.d.ts +0 -86
- package/lib/modules/stamp/public-api.d.ts +0 -1
- package/lib/modules/stamp/stamp.component.d.ts +0 -15
- package/lib/modules/table-button/public-api.d.ts +0 -1
- package/lib/modules/table-button/table-button.component.d.ts +0 -32
- package/lib/services/abstract-model.service.d.ts +0 -244
- package/lib/services/debounce.service.d.ts +0 -52
- package/lib/services/enum.service.d.ts +0 -19
- package/lib/services/link-mutation.service.d.ts +0 -51
- package/lib/services/persistence.service.d.ts +0 -50
- package/lib/services/swiss-parsing-date-adapter.service.d.ts +0 -16
- package/lib/types/types.d.ts +0 -100
- package/public-api.d.ts +0 -44
- package/vanilla/public-api.d.ts +0 -11
- package/vanilla/src/lib/classes/crypto.d.ts +0 -8
- package/vanilla/src/lib/classes/data-source.d.ts +0 -32
- package/vanilla/src/lib/classes/query-variable-manager-utils.d.ts +0 -2
- package/vanilla/src/lib/classes/query-variable-manager.d.ts +0 -91
- package/vanilla/src/lib/classes/signing.d.ts +0 -7
- package/vanilla/src/lib/classes/utility.d.ts +0 -85
- package/vanilla/src/lib/modules/search/classes/graphql-doctrine.types.d.ts +0 -83
- package/vanilla/src/lib/modules/search/classes/utils.d.ts +0 -17
- package/vanilla/src/lib/modules/search/types/dropdown-component.d.ts +0 -20
- package/vanilla/src/lib/modules/search/types/facet.d.ts +0 -75
- package/vanilla/src/lib/modules/search/types/values.d.ts +0 -32
- package/vanilla/src/lib/services/abstract-model.service.d.ts +0 -244
- package/vanilla/src/lib/services/debounce.service.d.ts +0 -52
- package/vanilla/src/lib/types/types.d.ts +0 -100
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import { Literal } from '../../../types/types';
|
|
2
|
-
export type Filter = {
|
|
3
|
-
groups?: FilterGroup[] | null;
|
|
4
|
-
};
|
|
5
|
-
export type FilterGroup = {
|
|
6
|
-
groupLogic?: LogicalOperator | null;
|
|
7
|
-
conditionsLogic?: LogicalOperator | null;
|
|
8
|
-
joins?: FilterGroupJoin | null;
|
|
9
|
-
conditions?: FilterGroupCondition[] | null;
|
|
10
|
-
};
|
|
11
|
-
export type FilterGroupJoin = Record<string, JoinOn>;
|
|
12
|
-
export type JoinOn = {
|
|
13
|
-
type?: JoinType | null;
|
|
14
|
-
joins?: FilterGroupJoin | null;
|
|
15
|
-
conditions?: FilterGroupCondition[] | null;
|
|
16
|
-
};
|
|
17
|
-
export declare enum LogicalOperator {
|
|
18
|
-
AND = "AND",
|
|
19
|
-
OR = "OR"
|
|
20
|
-
}
|
|
21
|
-
export declare enum JoinType {
|
|
22
|
-
innerJoin = "innerJoin",
|
|
23
|
-
leftJoin = "leftJoin"
|
|
24
|
-
}
|
|
25
|
-
export type FilterGroupCondition = Record<string, FilterGroupConditionField>;
|
|
26
|
-
export type FilterGroupConditionField = {
|
|
27
|
-
between?: BetweenOperator | null;
|
|
28
|
-
equal?: EqualOperator | null;
|
|
29
|
-
greater?: GreaterOperator | null;
|
|
30
|
-
greaterOrEqual?: GreaterOrEqualOperator | null;
|
|
31
|
-
in?: InOperator | null;
|
|
32
|
-
less?: LessOperator | null;
|
|
33
|
-
lessOrEqual?: LessOrEqualOperator | null;
|
|
34
|
-
like?: LikeOperator | null;
|
|
35
|
-
null?: NullOperator | null;
|
|
36
|
-
have?: HaveOperator | null;
|
|
37
|
-
empty?: EmptyOperator | null;
|
|
38
|
-
[key: string]: Literal | undefined | null;
|
|
39
|
-
};
|
|
40
|
-
export type Scalar = number | string | boolean;
|
|
41
|
-
export type HaveOperator = {
|
|
42
|
-
values: string[];
|
|
43
|
-
not?: boolean | null;
|
|
44
|
-
};
|
|
45
|
-
export type EmptyOperator = {
|
|
46
|
-
not?: boolean | null;
|
|
47
|
-
};
|
|
48
|
-
export type BetweenOperator = {
|
|
49
|
-
from: Scalar;
|
|
50
|
-
to: Scalar;
|
|
51
|
-
not?: boolean | null;
|
|
52
|
-
};
|
|
53
|
-
export type EqualOperator = {
|
|
54
|
-
value: Scalar;
|
|
55
|
-
not?: boolean | null;
|
|
56
|
-
};
|
|
57
|
-
export type GreaterOperator = {
|
|
58
|
-
value: Scalar;
|
|
59
|
-
not?: boolean | null;
|
|
60
|
-
};
|
|
61
|
-
export type GreaterOrEqualOperator = {
|
|
62
|
-
value: Scalar;
|
|
63
|
-
not?: boolean | null;
|
|
64
|
-
};
|
|
65
|
-
export type InOperator = {
|
|
66
|
-
values: Scalar[];
|
|
67
|
-
not?: boolean | null;
|
|
68
|
-
};
|
|
69
|
-
export type LessOperator = {
|
|
70
|
-
value: Scalar;
|
|
71
|
-
not?: boolean | null;
|
|
72
|
-
};
|
|
73
|
-
export type LessOrEqualOperator = {
|
|
74
|
-
value: Scalar;
|
|
75
|
-
not?: boolean | null;
|
|
76
|
-
};
|
|
77
|
-
export type LikeOperator = {
|
|
78
|
-
value: Scalar;
|
|
79
|
-
not?: boolean | null;
|
|
80
|
-
};
|
|
81
|
-
export type NullOperator = {
|
|
82
|
-
not?: boolean | null;
|
|
83
|
-
};
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import { NaturalSearchSelection } from '../types/values';
|
|
2
|
-
/**
|
|
3
|
-
* Wrap the searched value by `%` SQL wildcard
|
|
4
|
-
*
|
|
5
|
-
* So:
|
|
6
|
-
*
|
|
7
|
-
* {field: 'myFieldName', condition: {like: {value: 'foo'}}}
|
|
8
|
-
*
|
|
9
|
-
* will become
|
|
10
|
-
*
|
|
11
|
-
* {field: 'myFieldName', condition: {like: {value: '%foo%'}}}
|
|
12
|
-
*/
|
|
13
|
-
export declare function wrapLike(selection: NaturalSearchSelection): NaturalSearchSelection;
|
|
14
|
-
/**
|
|
15
|
-
* Search by prefix using `%' SQL wildcard
|
|
16
|
-
*
|
|
17
|
-
* So:
|
|
18
|
-
*
|
|
19
|
-
* {field: 'myFieldName', condition: {like: {value: 'foo'}}}
|
|
20
|
-
*
|
|
21
|
-
* will become
|
|
22
|
-
*
|
|
23
|
-
* {field: 'myFieldName', condition: {like: {value: 'foo%'}}}
|
|
24
|
-
*/
|
|
25
|
-
export declare function wrapPrefix(selection: NaturalSearchSelection): NaturalSearchSelection;
|
|
26
|
-
/**
|
|
27
|
-
* Search by suffix using `%' SQL wildcard
|
|
28
|
-
*
|
|
29
|
-
* So:
|
|
30
|
-
*
|
|
31
|
-
* {field: 'myFieldName', condition: {like: {value: 'foo'}}}
|
|
32
|
-
*
|
|
33
|
-
* will become
|
|
34
|
-
*
|
|
35
|
-
* {field: 'myFieldName', condition: {like: {value: '%foo'}}}
|
|
36
|
-
*/
|
|
37
|
-
export declare function wrapSuffix(selection: NaturalSearchSelection): NaturalSearchSelection;
|
|
38
|
-
/**
|
|
39
|
-
* Replace the operator name (usually "like", "in" or "between") with the
|
|
40
|
-
* attribute "field" defined in the configuration
|
|
41
|
-
*
|
|
42
|
-
* So:
|
|
43
|
-
*
|
|
44
|
-
* {field: 'myFieldName', condition: {in: {values: [1, 2, 3]}}}
|
|
45
|
-
*
|
|
46
|
-
* will become
|
|
47
|
-
*
|
|
48
|
-
* {field: 'myFieldName', condition: {myFieldName: {values: [1, 2, 3]}}}
|
|
49
|
-
*/
|
|
50
|
-
export declare function replaceOperatorByField(selection: NaturalSearchSelection): NaturalSearchSelection;
|
|
51
|
-
/**
|
|
52
|
-
* Replace the operator name (usually "like", "in" or "between") with the
|
|
53
|
-
* attribute "name" defined in the configuration
|
|
54
|
-
*
|
|
55
|
-
* So:
|
|
56
|
-
*
|
|
57
|
-
* {field: 'myFieldName', name:'myConfigName', condition: {in: {values: [1, 2, 3]}}}
|
|
58
|
-
*
|
|
59
|
-
* will become
|
|
60
|
-
*
|
|
61
|
-
* {field: 'myFieldName', name:'myConfigName', condition: {myConfigName: {values: [1, 2, 3]}}}
|
|
62
|
-
*/
|
|
63
|
-
export declare function replaceOperatorByName(selection: NaturalSearchSelection): NaturalSearchSelection;
|
|
64
|
-
/**
|
|
65
|
-
* Replace `"today"` and `"tomorrow"` by their real value right now.
|
|
66
|
-
*
|
|
67
|
-
* This transformer is applied automatically and should **not** be part
|
|
68
|
-
* of Natural public API.
|
|
69
|
-
*
|
|
70
|
-
* So:
|
|
71
|
-
*
|
|
72
|
-
* {field: 'myFieldName', condition: {greater: {value: 'today'}}}
|
|
73
|
-
*
|
|
74
|
-
* will become
|
|
75
|
-
*
|
|
76
|
-
* {field: 'myFieldName', condition: {greater: {value: '2023-01-03'}}}
|
|
77
|
-
*/
|
|
78
|
-
export declare function replaceToday(selection: NaturalSearchSelection): NaturalSearchSelection;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { NaturalSearchSelections } from '../types/values';
|
|
2
|
-
import { Params } from '@angular/router';
|
|
3
|
-
/**
|
|
4
|
-
* Returns a string representation of the selection that can be used in URL.
|
|
5
|
-
*
|
|
6
|
-
* The string can be parsed back with `fromUrl()`
|
|
7
|
-
*/
|
|
8
|
-
export declare function toUrl(selections: NaturalSearchSelections | null): string | null;
|
|
9
|
-
/**
|
|
10
|
-
* Parse a string, probably coming from URL, into a selection
|
|
11
|
-
*/
|
|
12
|
-
export declare function fromUrl(selections: string | null): NaturalSearchSelections;
|
|
13
|
-
/**
|
|
14
|
-
* Transform a search selection to navigation parameters to be used in URL.
|
|
15
|
-
*
|
|
16
|
-
* This is typically useful to craft URL to pre-filtered lists.
|
|
17
|
-
*/
|
|
18
|
-
export declare function toNavigationParameters(selections: NaturalSearchSelections): Params;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Facet, NaturalSearchFacets } from '../types/facet';
|
|
2
|
-
import { NaturalSearchSelection } from '../types/values';
|
|
3
|
-
/**
|
|
4
|
-
* Lookup a facet by its `name` and then by its `field`, or return null if not found
|
|
5
|
-
*/
|
|
6
|
-
export declare function getFacetFromSelection(facets: NaturalSearchFacets | null, selection: NaturalSearchSelection): Facet | null;
|
|
7
|
-
/**
|
|
8
|
-
* Deep clone a literal via JSON serializing/unserializing
|
|
9
|
-
*
|
|
10
|
-
* It will **not** work with:
|
|
11
|
-
*
|
|
12
|
-
* - functions (will be removed)
|
|
13
|
-
* - `undefined` (will be removed)
|
|
14
|
-
* - cyclic references (will crash)
|
|
15
|
-
* - objects (will be converted to `{}`)
|
|
16
|
-
*/
|
|
17
|
-
export declare function deepClone<T>(obj: T extends undefined ? never : T): T;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { BasePortalOutlet, CdkPortalOutlet, ComponentPortal, TemplatePortal } from '@angular/cdk/portal';
|
|
2
|
-
import { ComponentRef, EmbeddedViewRef, InjectionToken, OnDestroy } from '@angular/core';
|
|
3
|
-
import { Subject } from 'rxjs';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
export declare function throwMatDialogContentAlreadyAttachedError(): void;
|
|
6
|
-
export type NaturalDropdownContainerData = {
|
|
7
|
-
showValidateButton: boolean;
|
|
8
|
-
};
|
|
9
|
-
export declare const NATURAL_DROPDOWN_CONTAINER_DATA: InjectionToken<NaturalDropdownContainerData>;
|
|
10
|
-
export declare class NaturalDropdownContainerComponent extends BasePortalOutlet implements OnDestroy {
|
|
11
|
-
private readonly elementRef;
|
|
12
|
-
private readonly focusTrapFactory;
|
|
13
|
-
readonly data: NaturalDropdownContainerData;
|
|
14
|
-
readonly portalOutlet: import("@angular/core").Signal<CdkPortalOutlet>;
|
|
15
|
-
readonly closed: Subject<void>;
|
|
16
|
-
/** Current state of the panel animation. */
|
|
17
|
-
protected panelAnimationState: 'void' | 'enter';
|
|
18
|
-
private focusTrap;
|
|
19
|
-
private elementFocusedBeforeDialogWasOpened;
|
|
20
|
-
ngOnDestroy(): void;
|
|
21
|
-
close(): void;
|
|
22
|
-
attachTemplatePortal<C>(portal: TemplatePortal<C>): EmbeddedViewRef<C>;
|
|
23
|
-
attachComponentPortal<T>(portal: ComponentPortal<T>): ComponentRef<T>;
|
|
24
|
-
/** Callback that is invoked when the panel animation completes. */
|
|
25
|
-
protected onAnimationDone(state: string): void;
|
|
26
|
-
private trapFocus;
|
|
27
|
-
/** Restores focus to the element that was focused before the dialog opened. */
|
|
28
|
-
private restoreFocus;
|
|
29
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NaturalDropdownContainerComponent, never>;
|
|
30
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<NaturalDropdownContainerComponent, "ng-component", never, {}, {}, never, never, true, never>;
|
|
31
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Subject } from 'rxjs';
|
|
2
|
-
import { DropdownComponent } from '../types/dropdown-component';
|
|
3
|
-
import { DropdownResult } from '../types/values';
|
|
4
|
-
import { NaturalDropdownContainerComponent } from './dropdown-container.component';
|
|
5
|
-
import { ComponentType } from '@angular/cdk/portal';
|
|
6
|
-
import { ComponentRef, Injector, StaticProvider } from '@angular/core';
|
|
7
|
-
export declare class NaturalDropdownRef {
|
|
8
|
-
private readonly dropdownContainer;
|
|
9
|
-
readonly componentInstance: DropdownComponent;
|
|
10
|
-
readonly closed: Subject<DropdownResult | undefined>;
|
|
11
|
-
constructor(dropdownContainer: NaturalDropdownContainerComponent, component: ComponentType<DropdownComponent>, customProviders: StaticProvider[], parentInjector: Injector, containerRef: ComponentRef<NaturalDropdownContainerComponent>);
|
|
12
|
-
close(result?: DropdownResult): void;
|
|
13
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { ComponentType } from '@angular/cdk/portal';
|
|
2
|
-
import { ElementRef, InjectionToken, StaticProvider } from '@angular/core';
|
|
3
|
-
import { FilterGroupConditionField } from '../classes/graphql-doctrine.types';
|
|
4
|
-
import { NaturalDropdownRef } from './dropdown-ref';
|
|
5
|
-
import { DropdownComponent } from '../types/dropdown-component';
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
export type NaturalDropdownData<C = any> = {
|
|
8
|
-
condition: FilterGroupConditionField | null;
|
|
9
|
-
configuration: C;
|
|
10
|
-
title?: string;
|
|
11
|
-
};
|
|
12
|
-
export declare const NATURAL_DROPDOWN_DATA: InjectionToken<NaturalDropdownData<any>>;
|
|
13
|
-
export declare class NaturalDropdownService {
|
|
14
|
-
private readonly overlay;
|
|
15
|
-
private readonly injector;
|
|
16
|
-
open(component: ComponentType<DropdownComponent>, connectedElement: ElementRef<HTMLElement>, customProviders: StaticProvider[], showValidateButton: boolean): NaturalDropdownRef;
|
|
17
|
-
/**
|
|
18
|
-
* This method builds the configuration object needed to create the overlay, the OverlayState.
|
|
19
|
-
*/
|
|
20
|
-
private getOverlayConfig;
|
|
21
|
-
private getPosition;
|
|
22
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NaturalDropdownService, never>;
|
|
23
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<NaturalDropdownService>;
|
|
24
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { BehaviorSubject } from 'rxjs';
|
|
2
|
-
import { FilterGroupConditionField } from '../../search/classes/graphql-doctrine.types';
|
|
3
|
-
import { NaturalDropdownRef } from '../../search/dropdown-container/dropdown-ref';
|
|
4
|
-
import { NaturalDropdownData } from '../../search/dropdown-container/dropdown.service';
|
|
5
|
-
import { DropdownComponent } from '../types/dropdown-component';
|
|
6
|
-
import { Facet, NaturalSearchFacets } from '../types/facet';
|
|
7
|
-
import * as i0 from "@angular/core";
|
|
8
|
-
/**
|
|
9
|
-
* Configuration for facet selection
|
|
10
|
-
*/
|
|
11
|
-
export type FacetSelectorConfiguration = {
|
|
12
|
-
facets: NaturalSearchFacets;
|
|
13
|
-
};
|
|
14
|
-
export declare class FacetSelectorComponent implements DropdownComponent {
|
|
15
|
-
readonly data: NaturalDropdownData<FacetSelectorConfiguration>;
|
|
16
|
-
protected dropdownRef: NaturalDropdownRef;
|
|
17
|
-
readonly renderedValue: BehaviorSubject<string>;
|
|
18
|
-
facets: NaturalSearchFacets;
|
|
19
|
-
selection: Facet | null;
|
|
20
|
-
/**
|
|
21
|
-
* Get value, including rich object types
|
|
22
|
-
*/
|
|
23
|
-
getCondition(): FilterGroupConditionField;
|
|
24
|
-
/**
|
|
25
|
-
* Allow to close the dropdown with a valid value
|
|
26
|
-
*/
|
|
27
|
-
close(): void;
|
|
28
|
-
isValid(): boolean;
|
|
29
|
-
isDirty(): boolean;
|
|
30
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<FacetSelectorComponent, never>;
|
|
31
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<FacetSelectorComponent, "ng-component", never, {}, {}, never, never, true, never>;
|
|
32
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { NaturalInputComponent } from '../input/input.component';
|
|
2
|
-
import { NaturalSearchFacets } from '../types/facet';
|
|
3
|
-
import { GroupSelections, NaturalSearchSelection } from '../types/values';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class NaturalGroupComponent {
|
|
6
|
-
readonly newValueInput: import("@angular/core").Signal<NaturalInputComponent>;
|
|
7
|
-
/**
|
|
8
|
-
* Text display in the dropdown to select the facet
|
|
9
|
-
*/
|
|
10
|
-
dropdownTitle: string;
|
|
11
|
-
placeholder: string;
|
|
12
|
-
facets: NaturalSearchFacets;
|
|
13
|
-
readonly selectionChange: import("@angular/core").OutputEmitterRef<GroupSelections>;
|
|
14
|
-
innerSelections: GroupSelections;
|
|
15
|
-
set selections(selection: GroupSelections);
|
|
16
|
-
updateInput(selection: NaturalSearchSelection, index: number): void;
|
|
17
|
-
addInput(selection: NaturalSearchSelection): void;
|
|
18
|
-
removeInput(index: number): void;
|
|
19
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NaturalGroupComponent, never>;
|
|
20
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<NaturalGroupComponent, "natural-group", never, { "dropdownTitle": { "alias": "dropdownTitle"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": true; }; "facets": { "alias": "facets"; "required": true; }; "selections": { "alias": "selections"; "required": false; }; }, { "selectionChange": "selectionChange"; }, never, never, true, never>;
|
|
21
|
-
}
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
import { ElementRef, OnChanges, OnDestroy, OnInit } from '@angular/core';
|
|
2
|
-
import { FormControl } from '@angular/forms';
|
|
3
|
-
import { ErrorStateMatcher, MatRipple } from '@angular/material/core';
|
|
4
|
-
import { Facet, NaturalSearchFacets } from '../types/facet';
|
|
5
|
-
import { NaturalSearchSelection } from '../types/values';
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
declare class AlwaysErrorStateMatcher implements ErrorStateMatcher {
|
|
8
|
-
isErrorState(control: FormControl<unknown> | null): boolean;
|
|
9
|
-
}
|
|
10
|
-
export declare class NaturalInputComponent implements OnInit, OnChanges, OnDestroy {
|
|
11
|
-
private readonly element;
|
|
12
|
-
private readonly dropdownService;
|
|
13
|
-
private readonly injector;
|
|
14
|
-
/**
|
|
15
|
-
* Controls the ripple effect, used when opening a dropdown
|
|
16
|
-
*/
|
|
17
|
-
readonly ripple: import("@angular/core").Signal<MatRipple>;
|
|
18
|
-
/**
|
|
19
|
-
* Native element ref for <input> related to this <natural-input> component
|
|
20
|
-
*/
|
|
21
|
-
readonly input: import("@angular/core").Signal<ElementRef<HTMLInputElement>>;
|
|
22
|
-
/**
|
|
23
|
-
* Label for this field
|
|
24
|
-
*/
|
|
25
|
-
placeholder?: string;
|
|
26
|
-
/**
|
|
27
|
-
* Name of the field on which do a global search (without facet)
|
|
28
|
-
*/
|
|
29
|
-
searchFieldName: string;
|
|
30
|
-
/**
|
|
31
|
-
* Selected setted for this component
|
|
32
|
-
*/
|
|
33
|
-
selection: NaturalSearchSelection | null;
|
|
34
|
-
/**
|
|
35
|
-
* Available facets, allows the user to pick one, than generated then a selection
|
|
36
|
-
*/
|
|
37
|
-
facets: NaturalSearchFacets;
|
|
38
|
-
/**
|
|
39
|
-
* Text display in the dropdown to select the facet
|
|
40
|
-
*/
|
|
41
|
-
dropdownTitle: string;
|
|
42
|
-
/**
|
|
43
|
-
* Emits when user a added/updated/deleted a search (from global context or from facet)
|
|
44
|
-
*/
|
|
45
|
-
readonly selectionChange: import("@angular/core").OutputEmitterRef<NaturalSearchSelection>;
|
|
46
|
-
/**
|
|
47
|
-
* Emits when user removes the search by pressing the cross icon
|
|
48
|
-
*/
|
|
49
|
-
readonly cleared: import("@angular/core").OutputEmitterRef<NaturalInputComponent>;
|
|
50
|
-
/**
|
|
51
|
-
* Selected facet from the list of available facets
|
|
52
|
-
*/
|
|
53
|
-
facet: Facet | null;
|
|
54
|
-
/**
|
|
55
|
-
* Controller for the input field
|
|
56
|
-
*/
|
|
57
|
-
readonly formCtrl: FormControl<string | null>;
|
|
58
|
-
/**
|
|
59
|
-
* Customer error matcher that should validate on each change (including initialisation)
|
|
60
|
-
*/
|
|
61
|
-
readonly errorMatcher: AlwaysErrorStateMatcher;
|
|
62
|
-
/**
|
|
63
|
-
* Reference of the opened dropdown container
|
|
64
|
-
*/
|
|
65
|
-
private dropdownRef;
|
|
66
|
-
/**
|
|
67
|
-
* Reference of the component inside the dropdown container
|
|
68
|
-
*/
|
|
69
|
-
private dropdownComponentRef;
|
|
70
|
-
/**
|
|
71
|
-
* Minimum input length (number of chars)
|
|
72
|
-
* See length attribute
|
|
73
|
-
*/
|
|
74
|
-
private readonly minLength;
|
|
75
|
-
/**
|
|
76
|
-
* Size of the input (number of chars)
|
|
77
|
-
* Match the input.size attribute
|
|
78
|
-
*/
|
|
79
|
-
length: number;
|
|
80
|
-
/**
|
|
81
|
-
* Flag, that, if marked as yes, prevents the opening of the dropdown
|
|
82
|
-
* Is used to prevent dropdown opening when natural-search takes the focus from parent context (like on modal opening)
|
|
83
|
-
*/
|
|
84
|
-
private neutralizeDropdownOpening;
|
|
85
|
-
/**
|
|
86
|
-
* Custom management for taking the focus from parent context
|
|
87
|
-
* When focusing manually on the <input>, a dropdown is opened
|
|
88
|
-
* But when the focus is given from angular in a parent context (like a dialog) the dropdown would open and we don't want it.
|
|
89
|
-
*/
|
|
90
|
-
focus(): void;
|
|
91
|
-
ngOnChanges(): void;
|
|
92
|
-
ngOnInit(): void;
|
|
93
|
-
ngOnDestroy(): void;
|
|
94
|
-
search(event: Event): void;
|
|
95
|
-
clear(): void;
|
|
96
|
-
openDropdown(): void;
|
|
97
|
-
isDropdown(): boolean;
|
|
98
|
-
isFlag(): boolean;
|
|
99
|
-
private createComponent;
|
|
100
|
-
private createProviders;
|
|
101
|
-
private launchRipple;
|
|
102
|
-
private openFacetSelectorDropdown;
|
|
103
|
-
private openTypeDropdown;
|
|
104
|
-
private setFacet;
|
|
105
|
-
private setValue;
|
|
106
|
-
private getSelection;
|
|
107
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NaturalInputComponent, never>;
|
|
108
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<NaturalInputComponent, "natural-input", never, { "placeholder": { "alias": "placeholder"; "required": false; }; "searchFieldName": { "alias": "searchFieldName"; "required": false; }; "selection": { "alias": "selection"; "required": false; }; "facets": { "alias": "facets"; "required": true; }; "dropdownTitle": { "alias": "dropdownTitle"; "required": false; }; }, { "selectionChange": "selectionChange"; "cleared": "cleared"; }, never, never, true, never>;
|
|
109
|
-
}
|
|
110
|
-
export {};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export type { NaturalDropdownData } from './dropdown-container/dropdown.service';
|
|
2
|
-
export type { FilterGroupConditionField, Filter } from './classes/graphql-doctrine.types';
|
|
3
|
-
export type { DropdownComponent } from './types/dropdown-component';
|
|
4
|
-
export type { FlagFacet, DropdownFacet, Facet, NaturalSearchFacets } from './types/facet';
|
|
5
|
-
export type { NaturalSearchSelections, NaturalSearchSelection } from './types/values';
|
|
6
|
-
export { NaturalDropdownRef } from './dropdown-container/dropdown-ref';
|
|
7
|
-
export { NATURAL_DROPDOWN_DATA } from './dropdown-container/dropdown.service';
|
|
8
|
-
export { toGraphQLDoctrineFilter } from './classes/graphql-doctrine';
|
|
9
|
-
export { fromUrl, toUrl, toNavigationParameters } from './classes/url';
|
|
10
|
-
export { replaceOperatorByName, wrapLike, wrapPrefix, wrapSuffix, replaceOperatorByField } from './classes/transformers';
|
|
11
|
-
export { NaturalSearchComponent } from './search/search.component';
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { OnChanges } from '@angular/core';
|
|
2
|
-
import { NaturalSearchFacets } from '../types/facet';
|
|
3
|
-
import { GroupSelections, NaturalSearchSelections } from '../types/values';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class NaturalSearchComponent implements OnChanges {
|
|
6
|
-
#private;
|
|
7
|
-
private readonly breakpointObserver;
|
|
8
|
-
/**
|
|
9
|
-
* Placeholder for last input (the free search input)
|
|
10
|
-
*/
|
|
11
|
-
placeholder: string;
|
|
12
|
-
/**
|
|
13
|
-
* Exhaustive list of facets to be used in this <natural-search>
|
|
14
|
-
*/
|
|
15
|
-
facets: NaturalSearchFacets;
|
|
16
|
-
/**
|
|
17
|
-
* Whether to allow end-user to create multiple `OR` groups
|
|
18
|
-
*/
|
|
19
|
-
multipleGroups: boolean;
|
|
20
|
-
/**
|
|
21
|
-
* Text display in the dropdown to select the facet
|
|
22
|
-
*/
|
|
23
|
-
dropdownTitle: string;
|
|
24
|
-
/**
|
|
25
|
-
* Emits when some selection has been setted by the user
|
|
26
|
-
*/
|
|
27
|
-
readonly selectionChange: import("@angular/core").OutputEmitterRef<NaturalSearchSelections>;
|
|
28
|
-
/**
|
|
29
|
-
* Cleaned inputted selections. This public API is useful because `selectionChange` does not emit changes made via `[selections]`
|
|
30
|
-
*/
|
|
31
|
-
readonly innerSelections: import("@angular/core").Signal<NaturalSearchSelections>;
|
|
32
|
-
/**
|
|
33
|
-
* Input to display at component initialisation
|
|
34
|
-
*/
|
|
35
|
-
set selections(selections: NaturalSearchSelections);
|
|
36
|
-
readonly isMobile: import("rxjs").Observable<boolean>;
|
|
37
|
-
ngOnChanges(): void;
|
|
38
|
-
updateGroup(groupSelections: GroupSelections, groupIndex: number): void;
|
|
39
|
-
addGroup(): void;
|
|
40
|
-
removeGroup(index: number): void;
|
|
41
|
-
clear(): void;
|
|
42
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NaturalSearchComponent, never>;
|
|
43
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<NaturalSearchComponent, "natural-search", never, { "placeholder": { "alias": "placeholder"; "required": false; }; "facets": { "alias": "facets"; "required": false; }; "multipleGroups": { "alias": "multipleGroups"; "required": false; }; "dropdownTitle": { "alias": "dropdownTitle"; "required": false; }; "selections": { "alias": "selections"; "required": false; }; }, { "selectionChange": "selectionChange"; }, never, never, true, never>;
|
|
44
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { BehaviorSubject } from 'rxjs';
|
|
2
|
-
import { FilterGroupConditionField } from '../classes/graphql-doctrine.types';
|
|
3
|
-
export type DropdownComponent = {
|
|
4
|
-
/**
|
|
5
|
-
* Observable of current value as string
|
|
6
|
-
*/
|
|
7
|
-
readonly renderedValue: BehaviorSubject<string>;
|
|
8
|
-
/**
|
|
9
|
-
* Get condition, including rich object types
|
|
10
|
-
*/
|
|
11
|
-
getCondition(): FilterGroupConditionField;
|
|
12
|
-
/**
|
|
13
|
-
* Returns true if dropdown value is valid
|
|
14
|
-
*/
|
|
15
|
-
isValid(): boolean;
|
|
16
|
-
/**
|
|
17
|
-
* Returns true if the dropdown value has change
|
|
18
|
-
*/
|
|
19
|
-
isDirty(): boolean;
|
|
20
|
-
};
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { Type } from '@angular/core';
|
|
2
|
-
import { DropdownComponent } from './dropdown-component';
|
|
3
|
-
import { NaturalSearchSelection } from './values';
|
|
4
|
-
type BasicFacet = {
|
|
5
|
-
/**
|
|
6
|
-
* The label to be used in the GUI
|
|
7
|
-
*/
|
|
8
|
-
display: string;
|
|
9
|
-
/**
|
|
10
|
-
* The field this facet should apply to.
|
|
11
|
-
*
|
|
12
|
-
* In most cases it should be the property name of the model. Something like:
|
|
13
|
-
*
|
|
14
|
-
* - name
|
|
15
|
-
* - description
|
|
16
|
-
* - artist.name
|
|
17
|
-
*/
|
|
18
|
-
field: string;
|
|
19
|
-
/**
|
|
20
|
-
* This is required only if there are duplicated `field` in all facets.
|
|
21
|
-
*
|
|
22
|
-
* If `name` exists it will be used as an alternative identifier for facet, instead of `field`, to match
|
|
23
|
-
* a selection with its facet (in `getFacetFromSelection()`). So a selection must be given with the `name`,
|
|
24
|
-
* instead of `field`. And it will also be present in the URL. But it will never appear in the GraphQL selection.
|
|
25
|
-
*
|
|
26
|
-
* https://github.com/Ecodev/natural-search/issues/16
|
|
27
|
-
*/
|
|
28
|
-
name?: string;
|
|
29
|
-
/**
|
|
30
|
-
* A function to transform the selection before it is applied onto the filter.
|
|
31
|
-
*
|
|
32
|
-
* This would typically be useful to do unit conversion so the GUI has some user
|
|
33
|
-
* friendly values, but the API works with a "low-level" unit.
|
|
34
|
-
*/
|
|
35
|
-
transform?: (s: NaturalSearchSelection) => NaturalSearchSelection;
|
|
36
|
-
};
|
|
37
|
-
/**
|
|
38
|
-
* Facet that is only a flag (set or unset)
|
|
39
|
-
*/
|
|
40
|
-
export type FlagFacet<Condition> = {
|
|
41
|
-
/**
|
|
42
|
-
* The value to be returned when the flag is set
|
|
43
|
-
*/
|
|
44
|
-
condition: Condition;
|
|
45
|
-
/**
|
|
46
|
-
* If true the value is set when the flag does NOT exist and the
|
|
47
|
-
* value is unset when the flag exists.
|
|
48
|
-
*
|
|
49
|
-
* Defaults to `false`.
|
|
50
|
-
*/
|
|
51
|
-
inversed?: boolean;
|
|
52
|
-
} & BasicFacet;
|
|
53
|
-
/**
|
|
54
|
-
* Facet that uses a component in a dropdown
|
|
55
|
-
*/
|
|
56
|
-
export type DropdownFacet<C> = {
|
|
57
|
-
component: Type<DropdownComponent>;
|
|
58
|
-
/**
|
|
59
|
-
* Show a button into the dropdown container to validate value. Gives alternative to "click out" and incoming "tab/esc" key.
|
|
60
|
-
*/
|
|
61
|
-
showValidateButton?: boolean;
|
|
62
|
-
/**
|
|
63
|
-
* Anything that could be useful for the dropdown component
|
|
64
|
-
*/
|
|
65
|
-
configuration?: C;
|
|
66
|
-
} & BasicFacet;
|
|
67
|
-
/**
|
|
68
|
-
* A facet
|
|
69
|
-
*/
|
|
70
|
-
export type Facet = DropdownFacet<any> | FlagFacet<any>;
|
|
71
|
-
/**
|
|
72
|
-
* Exhaustive list of facets
|
|
73
|
-
*/
|
|
74
|
-
export type NaturalSearchFacets = Facet[];
|
|
75
|
-
export {};
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { FilterGroupConditionField } from '../classes/graphql-doctrine.types';
|
|
2
|
-
import { Facet } from './facet';
|
|
3
|
-
/**
|
|
4
|
-
* Type for a search selection
|
|
5
|
-
*/
|
|
6
|
-
export type NaturalSearchSelection = {
|
|
7
|
-
field: string;
|
|
8
|
-
/**
|
|
9
|
-
* This is required if the facet also have a `name`.
|
|
10
|
-
*
|
|
11
|
-
* See BasicFacet.name
|
|
12
|
-
*/
|
|
13
|
-
name?: string;
|
|
14
|
-
condition: FilterGroupConditionField;
|
|
15
|
-
};
|
|
16
|
-
/**
|
|
17
|
-
* Groups are a list of values, that should be interpreted with AND condition
|
|
18
|
-
*/
|
|
19
|
-
export type GroupSelections = NaturalSearchSelection[];
|
|
20
|
-
/**
|
|
21
|
-
* List of groups, that should be interpreted with OR condition
|
|
22
|
-
* Final input / output format
|
|
23
|
-
*/
|
|
24
|
-
export type NaturalSearchSelections = GroupSelections[];
|
|
25
|
-
/**
|
|
26
|
-
* Consolidated type for a selection and it's matching facet
|
|
27
|
-
* Used internally for dropdown
|
|
28
|
-
*/
|
|
29
|
-
export type DropdownResult = {
|
|
30
|
-
condition: FilterGroupConditionField;
|
|
31
|
-
facet?: Facet;
|
|
32
|
-
};
|