@ecodev/natural 55.9.0 → 56.0.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/esm2022/lib/classes/abstract-controller.mjs +3 -3
- package/esm2022/lib/classes/abstract-detail.mjs +5 -5
- package/esm2022/lib/classes/abstract-editable-list.mjs +4 -4
- package/esm2022/lib/classes/abstract-list.mjs +5 -5
- package/esm2022/lib/classes/abstract-navigable-list.mjs +12 -12
- package/esm2022/lib/classes/apollo-utils.mjs +3 -2
- package/esm2022/lib/classes/data-source.mjs +1 -1
- package/esm2022/lib/classes/query-variable-manager-utils.mjs +1 -1
- package/esm2022/lib/classes/query-variable-manager.mjs +3 -3
- package/esm2022/lib/classes/signing.mjs +1 -1
- package/esm2022/lib/classes/utility.mjs +1 -1
- package/esm2022/lib/classes/validators.mjs +2 -2
- package/esm2022/lib/directives/http-prefix.directive.mjs +5 -5
- package/esm2022/lib/modules/alert/alert.service.mjs +5 -5
- package/esm2022/lib/modules/alert/confirm.component.mjs +6 -6
- package/esm2022/lib/modules/avatar/component/avatar.component.mjs +39 -43
- package/esm2022/lib/modules/avatar/service/avatar.service.mjs +4 -4
- package/esm2022/lib/modules/avatar/service/md5.mjs +1 -1
- package/esm2022/lib/modules/avatar/sources/gravatar.mjs +1 -1
- package/esm2022/lib/modules/avatar/sources/initials.mjs +1 -1
- package/esm2022/lib/modules/columns-picker/columns-picker.component.mjs +10 -10
- package/esm2022/lib/modules/common/directives/linkable-tab.directive.mjs +6 -6
- package/esm2022/lib/modules/common/directives/src-density.directive.mjs +5 -5
- package/esm2022/lib/modules/common/pipes/capitalize.pipe.mjs +4 -4
- package/esm2022/lib/modules/common/pipes/ellipsis.pipe.mjs +3 -3
- package/esm2022/lib/modules/common/pipes/enum.pipe.mjs +4 -4
- package/esm2022/lib/modules/common/pipes/swiss-date.pipe.mjs +3 -3
- package/esm2022/lib/modules/common/pipes/time-ago.pipe.mjs +6 -6
- package/esm2022/lib/modules/common/services/memory-storage.mjs +4 -4
- package/esm2022/lib/modules/common/services/seo.service.mjs +7 -7
- package/esm2022/lib/modules/detail-header/detail-header.component.mjs +7 -9
- package/esm2022/lib/modules/dialog-trigger/dialog-trigger.component.mjs +5 -5
- package/esm2022/lib/modules/dropdown-components/abstract-association-select-component.directive.mjs +6 -6
- package/esm2022/lib/modules/dropdown-components/type-boolean/type-boolean.component.mjs +8 -9
- package/esm2022/lib/modules/dropdown-components/type-date/type-date.component.mjs +10 -13
- package/esm2022/lib/modules/dropdown-components/type-date-range/type-date-range.component.mjs +7 -9
- package/esm2022/lib/modules/dropdown-components/type-hierarchic-selector/type-hierarchic-selector.component.mjs +6 -8
- package/esm2022/lib/modules/dropdown-components/type-natural-select/type-natural-select.component.mjs +5 -8
- package/esm2022/lib/modules/dropdown-components/type-number/type-number.component.mjs +8 -18
- package/esm2022/lib/modules/dropdown-components/type-options/type-options.component.mjs +8 -10
- package/esm2022/lib/modules/dropdown-components/type-select/type-select.component.mjs +11 -21
- package/esm2022/lib/modules/dropdown-components/type-text/type-text.component.mjs +8 -10
- package/esm2022/lib/modules/dropdown-components/types.mjs +1 -1
- package/esm2022/lib/modules/dropdown-components/utils.mjs +1 -1
- package/esm2022/lib/modules/file/abstract-file.mjs +6 -6
- package/esm2022/lib/modules/file/component/file.component.mjs +10 -10
- package/esm2022/lib/modules/file/file-drop.directive.mjs +4 -4
- package/esm2022/lib/modules/file/file-select.directive.mjs +3 -3
- package/esm2022/lib/modules/file/file.service.mjs +6 -6
- package/esm2022/lib/modules/file/utils.mjs +1 -1
- package/esm2022/lib/modules/fixed-button/fixed-button.component.mjs +5 -5
- package/esm2022/lib/modules/fixed-button-detail/fixed-button-detail.component.mjs +7 -9
- package/esm2022/lib/modules/hierarchic-selector/classes/flat-node.mjs +1 -1
- package/esm2022/lib/modules/hierarchic-selector/classes/hierarchic-configuration.mjs +1 -1
- package/esm2022/lib/modules/hierarchic-selector/classes/hierarchic-filters-configuration.mjs +1 -1
- package/esm2022/lib/modules/hierarchic-selector/hierarchic-selector/hierarchic-selector.component.mjs +17 -17
- package/esm2022/lib/modules/hierarchic-selector/hierarchic-selector/hierarchic-selector.service.mjs +5 -5
- package/esm2022/lib/modules/hierarchic-selector/hierarchic-selector-dialog/hierarchic-selector-dialog.component.mjs +7 -7
- package/esm2022/lib/modules/hierarchic-selector/hierarchic-selector-dialog/hierarchic-selector-dialog.service.mjs +4 -4
- package/esm2022/lib/modules/icon/icon.directive.mjs +6 -6
- package/esm2022/lib/modules/logger/error-handler.mjs +6 -6
- package/esm2022/lib/modules/logger/error.module.mjs +1 -1
- package/esm2022/lib/modules/matomo/matomo.service.mjs +6 -6
- package/esm2022/lib/modules/panels/abstract-panel.mjs +5 -5
- package/esm2022/lib/modules/panels/fallback-if-no-opened-panels.urlmatcher.mjs +1 -1
- package/esm2022/lib/modules/panels/panels.component.mjs +5 -5
- package/esm2022/lib/modules/panels/panels.service.mjs +7 -7
- package/esm2022/lib/modules/panels/panels.urlmatcher.mjs +2 -2
- package/esm2022/lib/modules/panels/types.mjs +1 -1
- package/esm2022/lib/modules/relations/relations.component.mjs +16 -16
- package/esm2022/lib/modules/search/classes/graphql-doctrine.mjs +2 -2
- package/esm2022/lib/modules/search/classes/graphql-doctrine.types.mjs +1 -1
- package/esm2022/lib/modules/search/classes/transformers.mjs +1 -1
- package/esm2022/lib/modules/search/classes/url.mjs +9 -9
- package/esm2022/lib/modules/search/classes/utils.mjs +1 -1
- package/esm2022/lib/modules/search/dropdown-container/dropdown-container.component.mjs +8 -10
- package/esm2022/lib/modules/search/dropdown-container/dropdown.service.mjs +5 -5
- package/esm2022/lib/modules/search/facet-selector/facet-selector.component.mjs +8 -10
- package/esm2022/lib/modules/search/group/group.component.mjs +5 -7
- package/esm2022/lib/modules/search/input/input.component.mjs +34 -37
- package/esm2022/lib/modules/search/search/search.component.mjs +7 -7
- package/esm2022/lib/modules/search/types/dropdown-component.mjs +1 -1
- package/esm2022/lib/modules/search/types/facet.mjs +1 -1
- package/esm2022/lib/modules/search/types/values.mjs +1 -1
- package/esm2022/lib/modules/select/abstract-select.component.mjs +6 -6
- package/esm2022/lib/modules/select/select/select.component.mjs +12 -10
- package/esm2022/lib/modules/select/select-enum/select-enum.component.mjs +7 -7
- package/esm2022/lib/modules/select/select-hierarchic/select-hierarchic.component.mjs +11 -14
- package/esm2022/lib/modules/sidenav/sidenav/sidenav.component.mjs +5 -5
- package/esm2022/lib/modules/sidenav/sidenav-container/sidenav-container.component.mjs +6 -6
- package/esm2022/lib/modules/sidenav/sidenav-content/sidenav-content.component.mjs +5 -5
- package/esm2022/lib/modules/sidenav/sidenav-stack.service.mjs +4 -4
- package/esm2022/lib/modules/sidenav/sidenav.service.mjs +6 -6
- package/esm2022/lib/modules/stamp/stamp.component.mjs +5 -7
- package/esm2022/lib/modules/table-button/table-button.component.mjs +7 -9
- package/esm2022/lib/services/abstract-model.service.mjs +4 -4
- package/esm2022/lib/services/debounce.service.mjs +29 -10
- package/esm2022/lib/services/enum.service.mjs +6 -6
- package/esm2022/lib/services/link-mutation.service.mjs +6 -6
- package/esm2022/lib/services/persistence.service.mjs +10 -6
- package/esm2022/lib/services/swiss-parsing-date-adapter.service.mjs +4 -4
- package/esm2022/lib/types/types.mjs +1 -1
- package/esm2022/public-api.mjs +2 -3
- package/fesm2022/ecodev-natural.mjs +499 -495
- package/fesm2022/ecodev-natural.mjs.map +1 -1
- package/lib/classes/abstract-editable-list.d.ts +1 -1
- package/lib/classes/abstract-list.d.ts +2 -2
- package/lib/classes/data-source.d.ts +2 -2
- package/lib/classes/query-variable-manager.d.ts +7 -7
- package/lib/classes/utility.d.ts +1 -1
- package/lib/modules/alert/confirm.component.d.ts +2 -2
- package/lib/modules/columns-picker/columns-picker.component.d.ts +1 -1
- package/lib/modules/common/services/seo.service.d.ts +4 -4
- package/lib/modules/dialog-trigger/dialog-trigger.component.d.ts +2 -2
- package/lib/modules/dropdown-components/type-boolean/type-boolean.component.d.ts +2 -2
- package/lib/modules/dropdown-components/type-date/type-date.component.d.ts +2 -2
- package/lib/modules/dropdown-components/type-date-range/type-date-range.component.d.ts +2 -2
- package/lib/modules/dropdown-components/type-hierarchic-selector/type-hierarchic-selector.component.d.ts +6 -6
- package/lib/modules/dropdown-components/type-natural-select/type-natural-select.component.d.ts +2 -2
- package/lib/modules/dropdown-components/type-number/type-number.component.d.ts +2 -2
- package/lib/modules/dropdown-components/type-options/type-options.component.d.ts +4 -4
- package/lib/modules/dropdown-components/type-select/type-select.component.d.ts +2 -2
- package/lib/modules/dropdown-components/types.d.ts +4 -4
- package/lib/modules/file/abstract-file.d.ts +4 -4
- package/lib/modules/file/component/file.component.d.ts +1 -1
- package/lib/modules/hierarchic-selector/classes/hierarchic-configuration.d.ts +4 -4
- package/lib/modules/hierarchic-selector/classes/hierarchic-filters-configuration.d.ts +3 -3
- package/lib/modules/hierarchic-selector/hierarchic-selector/hierarchic-selector.component.d.ts +4 -4
- package/lib/modules/hierarchic-selector/hierarchic-selector/hierarchic-selector.service.d.ts +1 -3
- package/lib/modules/hierarchic-selector/hierarchic-selector-dialog/hierarchic-selector-dialog.component.d.ts +4 -4
- package/lib/modules/icon/icon.directive.d.ts +3 -5
- package/lib/modules/logger/error-handler.d.ts +4 -4
- package/lib/modules/panels/types.d.ts +14 -16
- package/lib/modules/relations/relations.component.d.ts +1 -1
- package/lib/modules/search/classes/graphql-doctrine.types.d.ts +37 -41
- package/lib/modules/search/dropdown-container/dropdown-container.component.d.ts +2 -2
- package/lib/modules/search/dropdown-container/dropdown.service.d.ts +2 -2
- package/lib/modules/search/facet-selector/facet-selector.component.d.ts +2 -2
- package/lib/modules/search/input/input.component.d.ts +1 -1
- package/lib/modules/search/types/dropdown-component.d.ts +2 -2
- package/lib/modules/search/types/facet.d.ts +7 -7
- package/lib/modules/search/types/values.d.ts +6 -6
- package/lib/modules/select/select/select.component.d.ts +1 -1
- package/lib/services/abstract-model.service.d.ts +7 -13
- package/lib/services/debounce.service.d.ts +10 -2
- package/lib/services/enum.service.d.ts +2 -2
- package/lib/services/link-mutation.service.d.ts +2 -2
- package/lib/types/types.d.ts +1 -3
- package/package.json +10 -10
- package/public-api.d.ts +0 -1
- package/src/lib/_natural.theme.scss +5 -2
|
@@ -1,21 +1,19 @@
|
|
|
1
1
|
import { Literal } from '../../../types/types';
|
|
2
|
-
export
|
|
3
|
-
groups?:
|
|
4
|
-
}
|
|
5
|
-
export
|
|
2
|
+
export type Filter = {
|
|
3
|
+
groups?: FilterGroup[] | null;
|
|
4
|
+
};
|
|
5
|
+
export type FilterGroup = {
|
|
6
6
|
groupLogic?: LogicalOperator | null;
|
|
7
7
|
conditionsLogic?: LogicalOperator | null;
|
|
8
8
|
joins?: FilterGroupJoin | null;
|
|
9
|
-
conditions?:
|
|
10
|
-
}
|
|
11
|
-
export
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
export interface JoinOn {
|
|
9
|
+
conditions?: FilterGroupCondition[] | null;
|
|
10
|
+
};
|
|
11
|
+
export type FilterGroupJoin = Record<string, JoinOn>;
|
|
12
|
+
export type JoinOn = {
|
|
15
13
|
type?: JoinType | null;
|
|
16
14
|
joins?: FilterGroupJoin | null;
|
|
17
|
-
conditions?:
|
|
18
|
-
}
|
|
15
|
+
conditions?: FilterGroupCondition[] | null;
|
|
16
|
+
};
|
|
19
17
|
export declare enum LogicalOperator {
|
|
20
18
|
AND = "AND",
|
|
21
19
|
OR = "OR"
|
|
@@ -24,10 +22,8 @@ export declare enum JoinType {
|
|
|
24
22
|
innerJoin = "innerJoin",
|
|
25
23
|
leftJoin = "leftJoin"
|
|
26
24
|
}
|
|
27
|
-
export
|
|
28
|
-
|
|
29
|
-
}
|
|
30
|
-
export interface FilterGroupConditionField {
|
|
25
|
+
export type FilterGroupCondition = Record<string, FilterGroupConditionField>;
|
|
26
|
+
export type FilterGroupConditionField = {
|
|
31
27
|
between?: BetweenOperator | null;
|
|
32
28
|
equal?: EqualOperator | null;
|
|
33
29
|
greater?: GreaterOperator | null;
|
|
@@ -40,48 +36,48 @@ export interface FilterGroupConditionField {
|
|
|
40
36
|
have?: HaveOperator | null;
|
|
41
37
|
empty?: EmptyOperator | null;
|
|
42
38
|
[key: string]: Literal | undefined | null;
|
|
43
|
-
}
|
|
39
|
+
};
|
|
44
40
|
export type Scalar = number | string | boolean;
|
|
45
|
-
export
|
|
46
|
-
values:
|
|
41
|
+
export type HaveOperator = {
|
|
42
|
+
values: string[];
|
|
47
43
|
not?: boolean | null;
|
|
48
|
-
}
|
|
49
|
-
export
|
|
44
|
+
};
|
|
45
|
+
export type EmptyOperator = {
|
|
50
46
|
not?: boolean | null;
|
|
51
|
-
}
|
|
52
|
-
export
|
|
47
|
+
};
|
|
48
|
+
export type BetweenOperator = {
|
|
53
49
|
from: Scalar;
|
|
54
50
|
to: Scalar;
|
|
55
51
|
not?: boolean | null;
|
|
56
|
-
}
|
|
57
|
-
export
|
|
52
|
+
};
|
|
53
|
+
export type EqualOperator = {
|
|
58
54
|
value: Scalar;
|
|
59
55
|
not?: boolean | null;
|
|
60
|
-
}
|
|
61
|
-
export
|
|
56
|
+
};
|
|
57
|
+
export type GreaterOperator = {
|
|
62
58
|
value: Scalar;
|
|
63
59
|
not?: boolean | null;
|
|
64
|
-
}
|
|
65
|
-
export
|
|
60
|
+
};
|
|
61
|
+
export type GreaterOrEqualOperator = {
|
|
66
62
|
value: Scalar;
|
|
67
63
|
not?: boolean | null;
|
|
68
|
-
}
|
|
69
|
-
export
|
|
70
|
-
values:
|
|
64
|
+
};
|
|
65
|
+
export type InOperator = {
|
|
66
|
+
values: Scalar[];
|
|
71
67
|
not?: boolean | null;
|
|
72
|
-
}
|
|
73
|
-
export
|
|
68
|
+
};
|
|
69
|
+
export type LessOperator = {
|
|
74
70
|
value: Scalar;
|
|
75
71
|
not?: boolean | null;
|
|
76
|
-
}
|
|
77
|
-
export
|
|
72
|
+
};
|
|
73
|
+
export type LessOrEqualOperator = {
|
|
78
74
|
value: Scalar;
|
|
79
75
|
not?: boolean | null;
|
|
80
|
-
}
|
|
81
|
-
export
|
|
76
|
+
};
|
|
77
|
+
export type LikeOperator = {
|
|
82
78
|
value: Scalar;
|
|
83
79
|
not?: boolean | null;
|
|
84
|
-
}
|
|
85
|
-
export
|
|
80
|
+
};
|
|
81
|
+
export type NullOperator = {
|
|
86
82
|
not?: boolean | null;
|
|
87
|
-
}
|
|
83
|
+
};
|
|
@@ -5,9 +5,9 @@ import { ComponentRef, ElementRef, EmbeddedViewRef, InjectionToken, OnDestroy, T
|
|
|
5
5
|
import { Subject } from 'rxjs';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
export declare function throwMatDialogContentAlreadyAttachedError(): void;
|
|
8
|
-
export
|
|
8
|
+
export type NaturalDropdownContainerData = {
|
|
9
9
|
showValidateButton: boolean;
|
|
10
|
-
}
|
|
10
|
+
};
|
|
11
11
|
export declare const NATURAL_DROPDOWN_CONTAINER_DATA: InjectionToken<NaturalDropdownContainerData>;
|
|
12
12
|
export declare class NaturalDropdownContainerComponent extends BasePortalOutlet implements OnDestroy {
|
|
13
13
|
private readonly elementRef;
|
|
@@ -5,11 +5,11 @@ import { FilterGroupConditionField } from '../classes/graphql-doctrine.types';
|
|
|
5
5
|
import { NaturalDropdownRef } from './dropdown-ref';
|
|
6
6
|
import { DropdownComponent } from '../types/dropdown-component';
|
|
7
7
|
import * as i0 from "@angular/core";
|
|
8
|
-
export
|
|
8
|
+
export type NaturalDropdownData<C = any> = {
|
|
9
9
|
condition: FilterGroupConditionField | null;
|
|
10
10
|
configuration: C;
|
|
11
11
|
title?: string;
|
|
12
|
-
}
|
|
12
|
+
};
|
|
13
13
|
export declare const NATURAL_DROPDOWN_DATA: InjectionToken<NaturalDropdownData<any>>;
|
|
14
14
|
export declare class NaturalDropdownService {
|
|
15
15
|
private readonly overlay;
|
|
@@ -8,9 +8,9 @@ import * as i0 from "@angular/core";
|
|
|
8
8
|
/**
|
|
9
9
|
* Configuration for facet selection
|
|
10
10
|
*/
|
|
11
|
-
export
|
|
11
|
+
export type FacetSelectorConfiguration = {
|
|
12
12
|
facets: NaturalSearchFacets;
|
|
13
|
-
}
|
|
13
|
+
};
|
|
14
14
|
export declare class FacetSelectorComponent implements DropdownComponent {
|
|
15
15
|
data: NaturalDropdownData<FacetSelectorConfiguration>;
|
|
16
16
|
protected dropdownRef: NaturalDropdownRef;
|
|
@@ -90,9 +90,9 @@ export declare class NaturalInputComponent implements OnInit, OnChanges, OnDestr
|
|
|
90
90
|
*/
|
|
91
91
|
focus(): void;
|
|
92
92
|
constructor(element: ElementRef<HTMLElement>, dropdownService: NaturalDropdownService, injector: EnvironmentInjector);
|
|
93
|
+
ngOnChanges(): void;
|
|
93
94
|
ngOnInit(): void;
|
|
94
95
|
ngOnDestroy(): void;
|
|
95
|
-
ngOnChanges(): void;
|
|
96
96
|
search(event: Event): void;
|
|
97
97
|
clear(): void;
|
|
98
98
|
openDropdown(): void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BehaviorSubject } from 'rxjs';
|
|
2
2
|
import { FilterGroupConditionField } from '../classes/graphql-doctrine.types';
|
|
3
|
-
export
|
|
3
|
+
export type DropdownComponent = {
|
|
4
4
|
/**
|
|
5
5
|
* Observable of current value as string
|
|
6
6
|
*/
|
|
@@ -17,4 +17,4 @@ export interface DropdownComponent {
|
|
|
17
17
|
* Returns true if the dropdown value has change
|
|
18
18
|
*/
|
|
19
19
|
isDirty(): boolean;
|
|
20
|
-
}
|
|
20
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Type } from '@angular/core';
|
|
2
2
|
import { DropdownComponent } from './dropdown-component';
|
|
3
3
|
import { NaturalSearchSelection } from './values';
|
|
4
|
-
|
|
4
|
+
type BasicFacet = {
|
|
5
5
|
/**
|
|
6
6
|
* The label to be used in the GUI
|
|
7
7
|
*/
|
|
@@ -33,11 +33,11 @@ interface BasicFacet {
|
|
|
33
33
|
* friendly values, but the API works with a "low-level" unit.
|
|
34
34
|
*/
|
|
35
35
|
transform?: (s: NaturalSearchSelection) => NaturalSearchSelection;
|
|
36
|
-
}
|
|
36
|
+
};
|
|
37
37
|
/**
|
|
38
38
|
* Facet that is only a flag (set or unset)
|
|
39
39
|
*/
|
|
40
|
-
export
|
|
40
|
+
export type FlagFacet<Condition> = {
|
|
41
41
|
/**
|
|
42
42
|
* The value to be returned when the flag is set
|
|
43
43
|
*/
|
|
@@ -49,11 +49,11 @@ export interface FlagFacet<Condition> extends BasicFacet {
|
|
|
49
49
|
* Defaults to `false`.
|
|
50
50
|
*/
|
|
51
51
|
inversed?: boolean;
|
|
52
|
-
}
|
|
52
|
+
} & BasicFacet;
|
|
53
53
|
/**
|
|
54
54
|
* Facet that uses a component in a dropdown
|
|
55
55
|
*/
|
|
56
|
-
export
|
|
56
|
+
export type DropdownFacet<C> = {
|
|
57
57
|
component: Type<DropdownComponent>;
|
|
58
58
|
/**
|
|
59
59
|
* Show a button into the dropdown container to validate value. Gives alternative to "click out" and incoming "tab/esc" key.
|
|
@@ -63,7 +63,7 @@ export interface DropdownFacet<C> extends BasicFacet {
|
|
|
63
63
|
* Anything that could be useful for the dropdown component
|
|
64
64
|
*/
|
|
65
65
|
configuration?: C;
|
|
66
|
-
}
|
|
66
|
+
} & BasicFacet;
|
|
67
67
|
/**
|
|
68
68
|
* A facet
|
|
69
69
|
*/
|
|
@@ -71,5 +71,5 @@ export type Facet = DropdownFacet<any> | FlagFacet<any>;
|
|
|
71
71
|
/**
|
|
72
72
|
* Exhaustive list of facets
|
|
73
73
|
*/
|
|
74
|
-
export type NaturalSearchFacets =
|
|
74
|
+
export type NaturalSearchFacets = Facet[];
|
|
75
75
|
export {};
|
|
@@ -3,7 +3,7 @@ import { Facet } from './facet';
|
|
|
3
3
|
/**
|
|
4
4
|
* Type for a search selection
|
|
5
5
|
*/
|
|
6
|
-
export
|
|
6
|
+
export type NaturalSearchSelection = {
|
|
7
7
|
field: string;
|
|
8
8
|
/**
|
|
9
9
|
* This is required if the facet also have a `name`.
|
|
@@ -12,21 +12,21 @@ export interface NaturalSearchSelection {
|
|
|
12
12
|
*/
|
|
13
13
|
name?: string;
|
|
14
14
|
condition: FilterGroupConditionField;
|
|
15
|
-
}
|
|
15
|
+
};
|
|
16
16
|
/**
|
|
17
17
|
* Groups are a list of values, that should be interpreted with AND condition
|
|
18
18
|
*/
|
|
19
|
-
export type GroupSelections =
|
|
19
|
+
export type GroupSelections = NaturalSearchSelection[];
|
|
20
20
|
/**
|
|
21
21
|
* List of groups, that should be interpreted with OR condition
|
|
22
22
|
* Final input / output format
|
|
23
23
|
*/
|
|
24
|
-
export type NaturalSearchSelections =
|
|
24
|
+
export type NaturalSearchSelections = GroupSelections[];
|
|
25
25
|
/**
|
|
26
26
|
* Consolidated type for a selection and it's matching facet
|
|
27
27
|
* Used internally for dropdown
|
|
28
28
|
*/
|
|
29
|
-
export
|
|
29
|
+
export type DropdownResult = {
|
|
30
30
|
condition: FilterGroupConditionField;
|
|
31
31
|
facet?: Facet;
|
|
32
|
-
}
|
|
32
|
+
};
|
|
@@ -94,9 +94,9 @@ export declare class NaturalSelectComponent<TService extends NaturalAbstractMode
|
|
|
94
94
|
* Whether the value can be changed
|
|
95
95
|
*/
|
|
96
96
|
set disabled(disabled: boolean);
|
|
97
|
+
ngOnInit(): void;
|
|
97
98
|
ngAfterViewInit(): void;
|
|
98
99
|
onInternalFormChange(): void;
|
|
99
|
-
ngOnInit(): void;
|
|
100
100
|
onBlur(): void;
|
|
101
101
|
/**
|
|
102
102
|
* Reset form to it's initial value
|
|
@@ -7,21 +7,15 @@ import { NaturalQueryVariablesManager, QueryVariables } from '../classes/query-v
|
|
|
7
7
|
import { Literal } from '../types/types';
|
|
8
8
|
import { PaginatedData } from '../classes/data-source';
|
|
9
9
|
import { NaturalDebounceService } from './debounce.service';
|
|
10
|
-
export
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
export interface FormAsyncValidators {
|
|
14
|
-
[key: string]: AsyncValidatorFn[];
|
|
15
|
-
}
|
|
16
|
-
export interface VariablesWithInput {
|
|
10
|
+
export type FormValidators = Record<string, ValidatorFn[]>;
|
|
11
|
+
export type FormAsyncValidators = Record<string, AsyncValidatorFn[]>;
|
|
12
|
+
export type VariablesWithInput = {
|
|
17
13
|
input: Literal;
|
|
18
|
-
}
|
|
19
|
-
export
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
interface Resolve<TOne> {
|
|
14
|
+
};
|
|
15
|
+
export type FormControls = Record<string, AbstractControl>;
|
|
16
|
+
type Resolve<TOne> = {
|
|
23
17
|
model: TOne;
|
|
24
|
-
}
|
|
18
|
+
};
|
|
25
19
|
export type WithId<T> = {
|
|
26
20
|
id: string;
|
|
27
21
|
} & T;
|
|
@@ -12,7 +12,6 @@ type Key = NaturalAbstractModelService<unknown, any, any, any, unknown, any, unk
|
|
|
12
12
|
* `id` should be the ID of the object that will be updated.
|
|
13
13
|
*/
|
|
14
14
|
export declare class NaturalDebounceService {
|
|
15
|
-
private readonly flusher;
|
|
16
15
|
/**
|
|
17
16
|
* Stores the debounced update function
|
|
18
17
|
*/
|
|
@@ -25,7 +24,15 @@ export declare class NaturalDebounceService {
|
|
|
25
24
|
* keep the same debouncing timeline.
|
|
26
25
|
*/
|
|
27
26
|
debounce<T>(key: Key, id: string, source: Observable<T>): Observable<T>;
|
|
28
|
-
|
|
27
|
+
cancelOne(key: Key, id: string): void;
|
|
28
|
+
/**
|
|
29
|
+
* Immediately execute the pending update, if any.
|
|
30
|
+
*
|
|
31
|
+
* It should typically be called before resolving the object, to mutate it before re-fetching it from server.
|
|
32
|
+
*
|
|
33
|
+
* The returned observable will complete when the update completes, even if it errors.
|
|
34
|
+
*/
|
|
35
|
+
flushOne(key: Key, id: string): Observable<void>;
|
|
29
36
|
/**
|
|
30
37
|
* Immediately execute all pending updates.
|
|
31
38
|
*
|
|
@@ -34,6 +41,7 @@ export declare class NaturalDebounceService {
|
|
|
34
41
|
* The returned observable will complete when all updates complete, even if some of them error.
|
|
35
42
|
*/
|
|
36
43
|
flush(): Observable<void>;
|
|
44
|
+
private internalFlush;
|
|
37
45
|
/**
|
|
38
46
|
* Count of pending updates
|
|
39
47
|
*/
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Apollo } from 'apollo-angular';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
|
-
export
|
|
4
|
+
export type IEnum = {
|
|
5
5
|
value: string;
|
|
6
6
|
name: string;
|
|
7
|
-
}
|
|
7
|
+
};
|
|
8
8
|
export declare class NaturalEnumService {
|
|
9
9
|
private readonly apollo;
|
|
10
10
|
constructor(apollo: Apollo);
|
|
@@ -3,10 +3,10 @@ import { FetchResult } from '@apollo/client/core';
|
|
|
3
3
|
import { Observable } from 'rxjs';
|
|
4
4
|
import { Literal } from '../types/types';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
|
-
export
|
|
6
|
+
export type LinkableObject = {
|
|
7
7
|
id: string;
|
|
8
8
|
__typename: string;
|
|
9
|
-
}
|
|
9
|
+
};
|
|
10
10
|
export declare class NaturalLinkMutationService {
|
|
11
11
|
private readonly apollo;
|
|
12
12
|
/**
|
package/lib/types/types.d.ts
CHANGED
|
@@ -5,9 +5,7 @@ import { ObservedValueOf } from 'rxjs';
|
|
|
5
5
|
/**
|
|
6
6
|
* An object literal with any keys and values
|
|
7
7
|
*/
|
|
8
|
-
export
|
|
9
|
-
[key: string]: any;
|
|
10
|
-
}
|
|
8
|
+
export type Literal = Record<string, any>;
|
|
11
9
|
/**
|
|
12
10
|
* An object with either a name or a fullName (or maybe both)
|
|
13
11
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ecodev/natural",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "56.0.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": "github:Ecodev/natural",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -22,15 +22,15 @@
|
|
|
22
22
|
"tslib": "^2.5.3"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
|
-
"@angular/animations": "^
|
|
26
|
-
"@angular/cdk": "^
|
|
27
|
-
"@angular/common": "^
|
|
28
|
-
"@angular/core": "^
|
|
29
|
-
"@angular/forms": "^
|
|
30
|
-
"@angular/localize": "^
|
|
31
|
-
"@angular/material": "^
|
|
32
|
-
"@angular/platform-browser": "^
|
|
33
|
-
"@angular/router": "^
|
|
25
|
+
"@angular/animations": "^17.2.0",
|
|
26
|
+
"@angular/cdk": "^17.2.0",
|
|
27
|
+
"@angular/common": "^17.2.0",
|
|
28
|
+
"@angular/core": "^17.2.0",
|
|
29
|
+
"@angular/forms": "^17.2.0",
|
|
30
|
+
"@angular/localize": "^17.2.0",
|
|
31
|
+
"@angular/material": "^17.2.0",
|
|
32
|
+
"@angular/platform-browser": "^17.2.0",
|
|
33
|
+
"@angular/router": "^17.2.0",
|
|
34
34
|
"apollo-angular": "^5.0.0",
|
|
35
35
|
"lodash-es": "^4.17.21",
|
|
36
36
|
"rxjs": "^7.8.1"
|
package/public-api.d.ts
CHANGED
|
@@ -47,8 +47,11 @@
|
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
.natural-elevation {
|
|
50
|
-
box-shadow:
|
|
51
|
-
0 1px
|
|
50
|
+
box-shadow:
|
|
51
|
+
inset 0 1px rgba(255, 255, 255, 0.3),
|
|
52
|
+
0 2px 1px -1px rgba(0, 0, 0, 0.2),
|
|
53
|
+
0 1px 1px 0 rgba(0, 0, 0, 0.14),
|
|
54
|
+
0 1px 3px 0 rgba(0, 0, 0, 0.12);
|
|
52
55
|
}
|
|
53
56
|
}
|
|
54
57
|
|