@ecodev/natural 45.4.2 → 46.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/esm2020/lib/classes/abstract-controller.mjs +2 -2
- package/esm2020/lib/classes/abstract-detail.mjs +10 -3
- package/esm2020/lib/classes/abstract-list.mjs +1 -1
- package/esm2020/lib/classes/abstract-navigable-list.mjs +1 -1
- package/esm2020/lib/classes/rxjs.mjs +1 -1
- package/esm2020/lib/classes/validators.mjs +2 -2
- package/esm2020/lib/modules/avatar/service/avatar.service.mjs +2 -2
- package/esm2020/lib/modules/avatar/service/md5.mjs +4 -4
- package/esm2020/lib/modules/columns-picker/columns-picker-column.directive.mjs +1 -1
- package/esm2020/lib/modules/common/pipes/swiss-date.pipe.mjs +1 -1
- package/esm2020/lib/modules/dropdown-components/type-date/type-date.component.mjs +67 -34
- package/esm2020/lib/modules/dropdown-components/type-date-range/type-date-range.component.mjs +4 -4
- package/esm2020/lib/modules/dropdown-components/type-hierarchic-selector/type-hierarchic-selector.component.mjs +1 -1
- package/esm2020/lib/modules/dropdown-components/type-text/type-text.component.mjs +2 -2
- package/esm2020/lib/modules/file/abstract-file.mjs +2 -2
- package/esm2020/lib/modules/file/component/file.component.mjs +32 -24
- package/esm2020/lib/modules/file/file-drop.directive.mjs +1 -1
- package/esm2020/lib/modules/file/file-select.directive.mjs +1 -1
- package/esm2020/lib/modules/fixed-button/fixed-button.component.mjs +2 -2
- package/esm2020/lib/modules/hierarchic-selector/classes/hierarchic-filters-configuration.mjs +1 -1
- package/esm2020/lib/modules/hierarchic-selector/hierarchic-selector/hierarchic-selector.service.mjs +1 -1
- package/esm2020/lib/modules/logger/error-handler.mjs +1 -1
- package/esm2020/lib/modules/panels/fallback-if-no-opened-panels.urlmatcher.mjs +2 -2
- package/esm2020/lib/modules/panels/panels.service.mjs +2 -2
- package/esm2020/lib/modules/panels/types.mjs +1 -1
- package/esm2020/lib/modules/relations/relations.component.mjs +2 -2
- package/esm2020/lib/modules/search/classes/graphql-doctrine.mjs +11 -5
- package/esm2020/lib/modules/search/classes/transformers.mjs +51 -1
- package/esm2020/lib/modules/search/input/input.component.mjs +4 -4
- package/esm2020/lib/modules/search/public-api.mjs +2 -2
- package/esm2020/lib/modules/search/search/search.component.mjs +2 -2
- package/esm2020/lib/modules/search/types/facet.mjs +1 -1
- package/esm2020/lib/modules/search/types/values.mjs +1 -1
- package/esm2020/lib/modules/select/abstract-select.component.mjs +2 -2
- package/esm2020/lib/modules/select/select/select.component.mjs +1 -1
- package/esm2020/lib/modules/select/select-enum/select-enum.component.mjs +1 -2
- package/esm2020/lib/modules/select/select-hierarchic/select-hierarchic.component.mjs +1 -1
- package/esm2020/lib/modules/sidenav/sidenav/sidenav.component.mjs +2 -3
- package/esm2020/lib/modules/sidenav/sidenav-content/sidenav-content.component.mjs +2 -3
- package/esm2020/lib/modules/sidenav/sidenav.service.mjs +1 -1
- package/esm2020/lib/modules/table-button/table-button.component.mjs +2 -2
- package/esm2020/lib/services/abstract-model.service.mjs +8 -1
- package/esm2020/lib/services/debounce.service.mjs +1 -1
- package/esm2020/lib/services/persistence.service.mjs +4 -2
- package/esm2020/lib/services/swiss-parsing-date-adapter.service.mjs +1 -1
- package/fesm2015/ecodev-natural.mjs +1299 -1194
- package/fesm2015/ecodev-natural.mjs.map +1 -1
- package/fesm2020/ecodev-natural.mjs +712 -609
- package/fesm2020/ecodev-natural.mjs.map +1 -1
- package/lib/classes/abstract-controller.d.ts +0 -1
- package/lib/modules/avatar/service/avatar.service.d.ts +0 -1
- package/lib/modules/dropdown-components/type-date/type-date.component.d.ts +6 -2
- package/lib/modules/dropdown-components/type-date-range/type-date-range.component.d.ts +1 -1
- package/lib/modules/dropdown-components/type-hierarchic-selector/type-hierarchic-selector.component.d.ts +1 -2
- package/lib/modules/dropdown-components/type-text/type-text.component.d.ts +2 -2
- package/lib/modules/file/abstract-file.d.ts +1 -1
- package/lib/modules/file/component/file.component.d.ts +32 -9
- package/lib/modules/fixed-button/fixed-button.component.d.ts +0 -1
- package/lib/modules/hierarchic-selector/classes/hierarchic-filters-configuration.d.ts +1 -2
- package/lib/modules/panels/types.d.ts +1 -2
- package/lib/modules/relations/relations.component.d.ts +2 -2
- package/lib/modules/search/classes/transformers.d.ts +15 -0
- package/lib/modules/search/input/input.component.d.ts +6 -5
- package/lib/modules/search/public-api.d.ts +1 -1
- package/lib/modules/search/search/search.component.d.ts +2 -2
- package/lib/modules/search/types/facet.d.ts +1 -2
- package/lib/modules/search/types/values.d.ts +2 -4
- package/lib/modules/select/abstract-select.component.d.ts +2 -2
- package/lib/modules/select/select-enum/select-enum.component.d.ts +0 -1
- package/lib/modules/sidenav/sidenav/sidenav.component.d.ts +0 -1
- package/lib/modules/sidenav/sidenav-content/sidenav-content.component.d.ts +0 -1
- package/lib/modules/table-button/table-button.component.d.ts +2 -2
- package/lib/services/debounce.service.d.ts +1 -1
- package/package.json +1 -1
|
@@ -8,7 +8,6 @@ import * as i0 from "@angular/core";
|
|
|
8
8
|
*/
|
|
9
9
|
export declare class NaturalAbstractController implements OnDestroy {
|
|
10
10
|
protected readonly ngUnsubscribe: Subject<void>;
|
|
11
|
-
constructor();
|
|
12
11
|
ngOnDestroy(): void;
|
|
13
12
|
back(): void;
|
|
14
13
|
static ɵfac: i0.ɵɵFactoryDeclaration<NaturalAbstractController, never>;
|
|
@@ -12,7 +12,6 @@ export declare class AvatarService {
|
|
|
12
12
|
private readonly sourceCreators;
|
|
13
13
|
private readonly avatarColors;
|
|
14
14
|
private readonly failedSources;
|
|
15
|
-
constructor();
|
|
16
15
|
getRandomColor(avatarText: string): string;
|
|
17
16
|
getCreators(): IterableIterator<[keyof AvatarComponent, SourceCreator]>;
|
|
18
17
|
private getSourceKey;
|
|
@@ -4,22 +4,25 @@ import { BehaviorSubject } from 'rxjs';
|
|
|
4
4
|
import { FilterGroupConditionField } from '../../search/classes/graphql-doctrine.types';
|
|
5
5
|
import { NaturalDropdownData } from '../../search/dropdown-container/dropdown.service';
|
|
6
6
|
import { DropdownComponent } from '../../search/types/dropdown-component';
|
|
7
|
+
import { NaturalAbstractController } from '../../../classes/abstract-controller';
|
|
7
8
|
import * as i0 from "@angular/core";
|
|
8
|
-
export interface TypeDateConfiguration<D =
|
|
9
|
+
export interface TypeDateConfiguration<D = Date> {
|
|
9
10
|
min?: D | null;
|
|
10
11
|
max?: D | null;
|
|
11
12
|
}
|
|
12
|
-
export declare class TypeDateComponent<D = any> implements DropdownComponent {
|
|
13
|
+
export declare class TypeDateComponent<D = any> extends NaturalAbstractController implements DropdownComponent {
|
|
13
14
|
private dateAdapter;
|
|
14
15
|
private dateFormats;
|
|
15
16
|
readonly renderedValue: BehaviorSubject<string>;
|
|
16
17
|
readonly configuration: Required<TypeDateConfiguration<D>>;
|
|
17
18
|
readonly operatorCtrl: FormControl<"equal" | "greater" | "greaterOrEqual" | "less" | "lessOrEqual">;
|
|
18
19
|
readonly valueCtrl: FormControl<D | null>;
|
|
20
|
+
readonly todayCtrl: FormControl<boolean | null>;
|
|
19
21
|
readonly operators: import("../types").PossibleComparableOperator[];
|
|
20
22
|
readonly form: FormGroup<{
|
|
21
23
|
operator: FormControl<"equal" | "greater" | "greaterOrEqual" | "less" | "lessOrEqual">;
|
|
22
24
|
value: FormControl<D | null>;
|
|
25
|
+
today: FormControl<boolean | null>;
|
|
23
26
|
}>;
|
|
24
27
|
private readonly defaults;
|
|
25
28
|
constructor(data: NaturalDropdownData<TypeDateConfiguration<D>>, dateAdapter: DateAdapter<D>, dateFormats: MatDateFormats);
|
|
@@ -27,6 +30,7 @@ export declare class TypeDateComponent<D = any> implements DropdownComponent {
|
|
|
27
30
|
isValid(): boolean;
|
|
28
31
|
isDirty(): boolean;
|
|
29
32
|
private reloadCondition;
|
|
33
|
+
private setTodayOrDate;
|
|
30
34
|
private initValidators;
|
|
31
35
|
private getDayAfter;
|
|
32
36
|
private getRenderedValue;
|
|
@@ -15,7 +15,7 @@ declare class InvalidWithValueStateMatcher implements ErrorStateMatcher {
|
|
|
15
15
|
/**
|
|
16
16
|
* Date range with mandatory bounding dates.
|
|
17
17
|
*
|
|
18
|
-
* If you need
|
|
18
|
+
* If you need optional bounding date, then use `TypeDateComponent` instead.
|
|
19
19
|
*/
|
|
20
20
|
export declare class TypeDateRangeComponent<D = any> implements DropdownComponent {
|
|
21
21
|
private dateAdapter;
|
|
@@ -10,8 +10,7 @@ export interface HierarchicFilterConfiguration<T = Literal> {
|
|
|
10
10
|
service: NaturalHierarchicConfiguration['service'];
|
|
11
11
|
filter: T;
|
|
12
12
|
}
|
|
13
|
-
export
|
|
14
|
-
}
|
|
13
|
+
export declare type HierarchicFiltersConfiguration<T = Literal> = Array<HierarchicFilterConfiguration<T>>;
|
|
15
14
|
export interface TypeHierarchicSelectorConfiguration {
|
|
16
15
|
key: string;
|
|
17
16
|
service: NaturalAbstractModelService<any, any, any, any, any, any, any, any, any, any>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FormControl
|
|
1
|
+
import { FormControl } from '@angular/forms';
|
|
2
2
|
import { ErrorStateMatcher } from '@angular/material/core';
|
|
3
3
|
import { BehaviorSubject } from 'rxjs';
|
|
4
4
|
import { FilterGroupConditionField } from '../../search/classes/graphql-doctrine.types';
|
|
@@ -7,7 +7,7 @@ import { NaturalDropdownData } from '../../search/dropdown-container/dropdown.se
|
|
|
7
7
|
import { DropdownComponent } from '../../search/types/dropdown-component';
|
|
8
8
|
import * as i0 from "@angular/core";
|
|
9
9
|
export declare class InvalidWithValueStateMatcher implements ErrorStateMatcher {
|
|
10
|
-
isErrorState(control: FormControl | null
|
|
10
|
+
isErrorState(control: FormControl | null): boolean;
|
|
11
11
|
}
|
|
12
12
|
export declare class TypeTextComponent implements DropdownComponent {
|
|
13
13
|
protected dropdownRef: NaturalDropdownRef;
|
|
@@ -36,7 +36,7 @@ export declare abstract class NaturalAbstractFile extends NaturalAbstractControl
|
|
|
36
36
|
multiple: boolean;
|
|
37
37
|
/**
|
|
38
38
|
* Comma-separated list of unique file type specifiers. Like the native element
|
|
39
|
-
* it can be a
|
|
39
|
+
* it can be a mix of mime-type and file extensions.
|
|
40
40
|
*
|
|
41
41
|
* See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#accept
|
|
42
42
|
*/
|
|
@@ -1,38 +1,61 @@
|
|
|
1
1
|
import { EventEmitter, OnChanges, OnInit, SimpleChanges } from '@angular/core';
|
|
2
2
|
import { AbstractControl } from '@angular/forms';
|
|
3
3
|
import { DomSanitizer, SafeStyle } from '@angular/platform-browser';
|
|
4
|
+
import { Observable } from 'rxjs';
|
|
4
5
|
import { NaturalFileService } from '../file.service';
|
|
5
|
-
import { NaturalAbstractModelService } from '../../../services/abstract-model.service';
|
|
6
6
|
import { FileModel } from '../types';
|
|
7
|
+
import { NaturalAlertService } from '../../alert/alert.service';
|
|
7
8
|
import * as i0 from "@angular/core";
|
|
8
|
-
export declare class FileComponent
|
|
9
|
+
export declare class FileComponent implements OnInit, OnChanges {
|
|
9
10
|
private readonly naturalFileService;
|
|
11
|
+
private readonly alertService;
|
|
10
12
|
private readonly sanitizer;
|
|
11
13
|
private readonly document;
|
|
12
14
|
height: number;
|
|
13
15
|
action: 'upload' | 'download' | null;
|
|
14
16
|
backgroundSize: string;
|
|
15
17
|
/**
|
|
16
|
-
* Comma
|
|
18
|
+
* Comma-separated list of unique file type specifiers. Like the native element
|
|
19
|
+
* it can be a mix of mime-type and file extensions.
|
|
20
|
+
*
|
|
21
|
+
* See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#accept
|
|
17
22
|
*/
|
|
18
23
|
accept: string;
|
|
19
|
-
|
|
24
|
+
/**
|
|
25
|
+
* If given it will be called when a new file is selected. The callback should typically upload the file
|
|
26
|
+
* to the server and link the newly uploaded file to the existing related object.
|
|
27
|
+
*
|
|
28
|
+
* The callback **must** be able to run even if the calling component has been destroyed. That means in most
|
|
29
|
+
* cases you **must** `bind()` the callback explicitly, like so:
|
|
30
|
+
*
|
|
31
|
+
* ```html
|
|
32
|
+
* <natural-file [uploader]="myCallback.bind(this)"></natural-file>
|
|
33
|
+
* ```
|
|
34
|
+
*
|
|
35
|
+
* Also, you probably **should** set a `[formCtrl]` so that the form is updated automatically, instead of doing
|
|
36
|
+
* it manually within the callback.
|
|
37
|
+
*/
|
|
38
|
+
uploader?: (file: File) => Observable<FileModel>;
|
|
20
39
|
model: FileModel | null;
|
|
21
40
|
/**
|
|
22
|
-
* If provided, get updated
|
|
23
|
-
*
|
|
41
|
+
* If provided, its value will get updated when the model changes.
|
|
42
|
+
* But its value is never read, so if you want to set a value use `[model]` instead.
|
|
24
43
|
*/
|
|
25
44
|
formCtrl: AbstractControl | null | undefined;
|
|
45
|
+
/**
|
|
46
|
+
* This **must not** be used to mutate the server, because it is very likely it will never be called if the
|
|
47
|
+
* human navigates away from the page before the upload is finished. Instead, you should use `[uploader]`.
|
|
48
|
+
*/
|
|
26
49
|
readonly modelChange: EventEmitter<FileModel>;
|
|
27
50
|
imagePreview: SafeStyle | null;
|
|
28
51
|
filePreview: string | null;
|
|
29
|
-
constructor(naturalFileService: NaturalFileService, sanitizer: DomSanitizer, document: Document);
|
|
52
|
+
constructor(naturalFileService: NaturalFileService, alertService: NaturalAlertService, sanitizer: DomSanitizer, document: Document);
|
|
30
53
|
ngOnInit(): void;
|
|
31
54
|
ngOnChanges(changes: SimpleChanges): void;
|
|
32
55
|
upload(file: File): void;
|
|
33
56
|
getDownloadLink(): null | string;
|
|
34
57
|
private updateImage;
|
|
35
58
|
private getBase64;
|
|
36
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<FileComponent
|
|
37
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<FileComponent
|
|
59
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FileComponent, never>;
|
|
60
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FileComponent, "natural-file", never, { "height": "height"; "action": "action"; "backgroundSize": "backgroundSize"; "accept": "accept"; "uploader": "uploader"; "model": "model"; "formCtrl": "formCtrl"; }, { "modelChange": "modelChange"; }, never, never, false>;
|
|
38
61
|
}
|
|
@@ -6,7 +6,6 @@ export declare class NaturalFixedButtonComponent {
|
|
|
6
6
|
link: RouterLink['routerLink'];
|
|
7
7
|
color: ThemePalette;
|
|
8
8
|
disabled: boolean;
|
|
9
|
-
constructor();
|
|
10
9
|
static ɵfac: i0.ɵɵFactoryDeclaration<NaturalFixedButtonComponent, never>;
|
|
11
10
|
static ɵcmp: i0.ɵɵComponentDeclaration<NaturalFixedButtonComponent, "natural-fixed-button", never, { "icon": "icon"; "link": "link"; "color": "color"; "disabled": "disabled"; }, {}, never, never, false>;
|
|
12
11
|
}
|
|
@@ -4,5 +4,4 @@ export interface HierarchicFilterConfiguration<T = Literal> {
|
|
|
4
4
|
service: NaturalHierarchicConfiguration['service'];
|
|
5
5
|
filter: T;
|
|
6
6
|
}
|
|
7
|
-
export
|
|
8
|
-
}
|
|
7
|
+
export declare type HierarchicFiltersConfiguration<T = Literal> = Array<HierarchicFilterConfiguration<T>>;
|
|
@@ -61,6 +61,5 @@ export interface NaturalPanelsBeforeOpenPanel {
|
|
|
61
61
|
export interface NaturalPanelsHooksConfig {
|
|
62
62
|
beforeOpenPanel?: (injector: Injector, naturalPanelsBeforeOpenPanel: NaturalPanelsBeforeOpenPanel) => NaturalPanelData;
|
|
63
63
|
}
|
|
64
|
-
export
|
|
65
|
-
}
|
|
64
|
+
export declare type NaturalPanelsRoutesConfig = Array<NaturalPanelsRouterRule>;
|
|
66
65
|
export declare const PanelsHooksConfig: InjectionToken<NaturalPanelsHooksConfig>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EventEmitter, OnChanges, OnDestroy, OnInit,
|
|
1
|
+
import { EventEmitter, OnChanges, OnDestroy, OnInit, TemplateRef } from '@angular/core';
|
|
2
2
|
import { PageEvent } from '@angular/material/paginator';
|
|
3
3
|
import { NaturalAbstractController } from '../../classes/abstract-controller';
|
|
4
4
|
import { NaturalDataSource, PaginatedData } from '../../classes/data-source';
|
|
@@ -90,7 +90,7 @@ export declare class NaturalRelationsComponent<TService extends NaturalAbstractM
|
|
|
90
90
|
*/
|
|
91
91
|
set filter(filter: Filter);
|
|
92
92
|
ngOnInit(): void;
|
|
93
|
-
ngOnChanges(
|
|
93
|
+
ngOnChanges(): void;
|
|
94
94
|
/**
|
|
95
95
|
* Unlink action
|
|
96
96
|
* Refetch result to display it in table
|
|
@@ -37,3 +37,18 @@ export declare function replaceOperatorByField(selection: NaturalSearchSelection
|
|
|
37
37
|
* {field: 'myFieldName', name:'myConfigName', condition: {myConfigName: {values: [1, 2, 3]}}}
|
|
38
38
|
*/
|
|
39
39
|
export declare function replaceOperatorByName(selection: NaturalSearchSelection): NaturalSearchSelection;
|
|
40
|
+
/**
|
|
41
|
+
* Replace `"today"` and `"tomorrow"` by their real value right now.
|
|
42
|
+
*
|
|
43
|
+
* This transformer is applied automatically and should **not** be part
|
|
44
|
+
* of Natural public API.
|
|
45
|
+
*
|
|
46
|
+
* So:
|
|
47
|
+
*
|
|
48
|
+
* {field: 'myFieldName', condition: {greater: {value: 'today'}}}
|
|
49
|
+
*
|
|
50
|
+
* will become
|
|
51
|
+
*
|
|
52
|
+
* {field: 'myFieldName', condition: {greater: {value: '2023-01-03'}}}
|
|
53
|
+
*/
|
|
54
|
+
export declare function replaceToday(selection: NaturalSearchSelection): NaturalSearchSelection;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { ElementRef, EnvironmentInjector, EventEmitter, OnChanges, OnDestroy, OnInit
|
|
2
|
-
import { FormControl
|
|
1
|
+
import { ElementRef, EnvironmentInjector, EventEmitter, OnChanges, OnDestroy, OnInit } from '@angular/core';
|
|
2
|
+
import { FormControl } from '@angular/forms';
|
|
3
3
|
import { ErrorStateMatcher, MatRipple } from '@angular/material/core';
|
|
4
4
|
import { NaturalDropdownService } from '../dropdown-container/dropdown.service';
|
|
5
5
|
import { Facet, NaturalSearchFacets } from '../types/facet';
|
|
6
6
|
import { NaturalSearchSelection } from '../types/values';
|
|
7
7
|
import * as i0 from "@angular/core";
|
|
8
|
-
|
|
9
|
-
isErrorState(control: FormControl<unknown> | null
|
|
8
|
+
declare class AlwaysErrorStateMatcher implements ErrorStateMatcher {
|
|
9
|
+
isErrorState(control: FormControl<unknown> | null): boolean;
|
|
10
10
|
}
|
|
11
11
|
export declare class NaturalInputComponent implements OnInit, OnChanges, OnDestroy {
|
|
12
12
|
private readonly element;
|
|
@@ -88,7 +88,7 @@ export declare class NaturalInputComponent implements OnInit, OnChanges, OnDestr
|
|
|
88
88
|
constructor(element: ElementRef<HTMLElement>, dropdownService: NaturalDropdownService, injector: EnvironmentInjector);
|
|
89
89
|
ngOnInit(): void;
|
|
90
90
|
ngOnDestroy(): void;
|
|
91
|
-
ngOnChanges(
|
|
91
|
+
ngOnChanges(): void;
|
|
92
92
|
search(event: Event): void;
|
|
93
93
|
clear(): void;
|
|
94
94
|
openDropdown(): void;
|
|
@@ -105,3 +105,4 @@ export declare class NaturalInputComponent implements OnInit, OnChanges, OnDestr
|
|
|
105
105
|
static ɵfac: i0.ɵɵFactoryDeclaration<NaturalInputComponent, never>;
|
|
106
106
|
static ɵcmp: i0.ɵɵComponentDeclaration<NaturalInputComponent, "natural-input", never, { "placeholder": "placeholder"; "searchFieldName": "searchFieldName"; "selection": "selection"; "facets": "facets"; }, { "selectionChange": "selectionChange"; "cleared": "cleared"; }, never, never, false>;
|
|
107
107
|
}
|
|
108
|
+
export {};
|
|
@@ -8,5 +8,5 @@ export { NATURAL_DROPDOWN_DATA } from './dropdown-container/dropdown.service';
|
|
|
8
8
|
export { NaturalSearchModule } from './search.module';
|
|
9
9
|
export { toGraphQLDoctrineFilter } from './classes/graphql-doctrine';
|
|
10
10
|
export { fromUrl, toUrl, toNavigationParameters } from './classes/url';
|
|
11
|
-
export
|
|
11
|
+
export { replaceOperatorByName, wrapLike, replaceOperatorByField } from './classes/transformers';
|
|
12
12
|
export { NaturalSearchComponent } from './search/search.component';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EventEmitter, OnChanges
|
|
1
|
+
import { EventEmitter, OnChanges } from '@angular/core';
|
|
2
2
|
import { NaturalSearchFacets } from '../types/facet';
|
|
3
3
|
import { GroupSelections, NaturalSearchSelections } from '../types/values';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
@@ -27,7 +27,7 @@ export declare class NaturalSearchComponent implements OnChanges {
|
|
|
27
27
|
* Input to display at component initialisation
|
|
28
28
|
*/
|
|
29
29
|
set selections(selections: NaturalSearchSelections);
|
|
30
|
-
ngOnChanges(
|
|
30
|
+
ngOnChanges(): void;
|
|
31
31
|
updateGroup(groupSelections: GroupSelections, groupIndex: number): void;
|
|
32
32
|
addGroup(): void;
|
|
33
33
|
removeGroup(index: number): void;
|
|
@@ -16,14 +16,12 @@ export interface NaturalSearchSelection {
|
|
|
16
16
|
/**
|
|
17
17
|
* Groups are a list of values, that should be interpreted with AND condition
|
|
18
18
|
*/
|
|
19
|
-
export
|
|
20
|
-
}
|
|
19
|
+
export declare type GroupSelections = Array<NaturalSearchSelection>;
|
|
21
20
|
/**
|
|
22
21
|
* List of groups, that should be interpreted with OR condition
|
|
23
22
|
* Final input / output format
|
|
24
23
|
*/
|
|
25
|
-
export
|
|
26
|
-
}
|
|
24
|
+
export declare type NaturalSearchSelections = Array<GroupSelections>;
|
|
27
25
|
/**
|
|
28
26
|
* Consolidated type for a selection and it's matching facet
|
|
29
27
|
* Used internally for dropdown
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DoCheck, EventEmitter, OnDestroy, OnInit } from '@angular/core';
|
|
2
|
-
import { ControlValueAccessor, FormControl,
|
|
2
|
+
import { ControlValueAccessor, FormControl, NgControl } from '@angular/forms';
|
|
3
3
|
import { ErrorStateMatcher } from '@angular/material/core';
|
|
4
4
|
import { FloatLabelType } from '@angular/material/form-field';
|
|
5
5
|
import { NaturalAbstractController } from '../../classes/abstract-controller';
|
|
@@ -13,7 +13,7 @@ import * as i0 from "@angular/core";
|
|
|
13
13
|
declare class ExternalFormControlMatcher<T, I> extends ErrorStateMatcher {
|
|
14
14
|
private readonly component;
|
|
15
15
|
constructor(component: AbstractSelect<T, I>);
|
|
16
|
-
isErrorState(
|
|
16
|
+
isErrorState(): boolean;
|
|
17
17
|
}
|
|
18
18
|
export declare abstract class AbstractSelect<V, I> extends NaturalAbstractController implements OnInit, OnDestroy, ControlValueAccessor, DoCheck {
|
|
19
19
|
readonly ngControl: NgControl | null;
|
|
@@ -7,7 +7,6 @@ import * as i0 from "@angular/core";
|
|
|
7
7
|
declare type V = IEnum['value'] | IEnum['value'][];
|
|
8
8
|
export declare class NaturalSelectEnumComponent extends AbstractSelect<V, V> implements OnInit, ControlValueAccessor {
|
|
9
9
|
private readonly enumService;
|
|
10
|
-
readonly ngControl: NgControl | null;
|
|
11
10
|
/**
|
|
12
11
|
* The name of the enum type, eg: `"ActionStatus"`
|
|
13
12
|
*/
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
export declare class NaturalSidenavComponent {
|
|
3
|
-
constructor();
|
|
4
3
|
static ɵfac: i0.ɵɵFactoryDeclaration<NaturalSidenavComponent, never>;
|
|
5
4
|
static ɵcmp: i0.ɵɵComponentDeclaration<NaturalSidenavComponent, "natural-sidenav", never, {}, {}, never, ["*"], false>;
|
|
6
5
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
export declare class NaturalSidenavContentComponent {
|
|
3
|
-
constructor();
|
|
4
3
|
static ɵfac: i0.ɵɵFactoryDeclaration<NaturalSidenavContentComponent, never>;
|
|
5
4
|
static ɵcmp: i0.ɵɵComponentDeclaration<NaturalSidenavContentComponent, "natural-sidenav-content", never, {}, {}, never, ["*"], false>;
|
|
6
5
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EventEmitter, OnChanges
|
|
1
|
+
import { EventEmitter, OnChanges } from '@angular/core';
|
|
2
2
|
import { Params, QueryParamsHandling, RouterLink } from '@angular/router';
|
|
3
3
|
import { ThemePalette } from '@angular/material/core';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
@@ -25,7 +25,7 @@ export declare class NaturalTableButtonComponent implements OnChanges {
|
|
|
25
25
|
color: ThemePalette;
|
|
26
26
|
readonly buttonClick: EventEmitter<MouseEvent>;
|
|
27
27
|
type: 'routerLink' | 'href' | 'click' | 'none';
|
|
28
|
-
ngOnChanges(
|
|
28
|
+
ngOnChanges(): void;
|
|
29
29
|
static ɵfac: i0.ɵɵFactoryDeclaration<NaturalTableButtonComponent, never>;
|
|
30
30
|
static ɵcmp: i0.ɵɵComponentDeclaration<NaturalTableButtonComponent, "natural-table-button", never, { "queryParams": "queryParams"; "queryParamsHandling": "queryParamsHandling"; "label": "label"; "icon": "icon"; "href": "href"; "navigate": "navigate"; "fragment": "fragment"; "preserveFragment": "preserveFragment"; "raised": "raised"; "color": "color"; }, { "buttonClick": "buttonClick"; }, never, never, false>;
|
|
31
31
|
}
|
|
@@ -25,7 +25,7 @@ export declare class NaturalDebounceService {
|
|
|
25
25
|
* keep the same debouncing timeline.
|
|
26
26
|
*/
|
|
27
27
|
debounce<T>(key: Key, id: string, source: Observable<T>): Observable<T>;
|
|
28
|
-
cancel
|
|
28
|
+
cancel(key: Key, id: string): void;
|
|
29
29
|
/**
|
|
30
30
|
* Immediately execute all pending updates.
|
|
31
31
|
*
|