@ecodev/natural 43.0.0 → 44.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 +3 -3
- package/esm2020/lib/classes/abstract-detail.mjs +6 -6
- package/esm2020/lib/classes/abstract-editable-list.mjs +7 -7
- package/esm2020/lib/classes/abstract-list.mjs +3 -3
- package/esm2020/lib/classes/abstract-navigable-list.mjs +3 -3
- package/esm2020/lib/classes/validators.mjs +1 -1
- package/esm2020/lib/directives/http-prefix.directive.mjs +3 -3
- package/esm2020/lib/modules/alert/alert.module.mjs +5 -5
- package/esm2020/lib/modules/alert/alert.service.mjs +3 -3
- package/esm2020/lib/modules/alert/confirm.component.mjs +5 -5
- package/esm2020/lib/modules/avatar/avatar.module.mjs +5 -5
- package/esm2020/lib/modules/avatar/component/avatar.component.mjs +7 -17
- package/esm2020/lib/modules/avatar/service/avatar.service.mjs +3 -3
- package/esm2020/lib/modules/columns-picker/columns-picker-column.directive.mjs +3 -3
- package/esm2020/lib/modules/columns-picker/columns-picker.component.mjs +9 -9
- package/esm2020/lib/modules/columns-picker/columns-picker.module.mjs +11 -13
- package/esm2020/lib/modules/common/common-module.mjs +5 -5
- package/esm2020/lib/modules/common/directives/linkable-tab.directive.mjs +3 -3
- package/esm2020/lib/modules/common/directives/src-density.directive.mjs +3 -3
- package/esm2020/lib/modules/common/pipes/capitalize.pipe.mjs +3 -3
- package/esm2020/lib/modules/common/pipes/ellipsis.pipe.mjs +3 -3
- package/esm2020/lib/modules/common/pipes/enum.pipe.mjs +3 -3
- package/esm2020/lib/modules/common/pipes/swiss-date.pipe.mjs +3 -3
- package/esm2020/lib/modules/common/services/memory-storage.mjs +3 -3
- package/esm2020/lib/modules/common/services/seo.service.mjs +3 -3
- package/esm2020/lib/modules/detail-header/detail-header.component.mjs +9 -9
- package/esm2020/lib/modules/detail-header/detail-header.module.mjs +5 -5
- package/esm2020/lib/modules/dialog-trigger/dialog-trigger.component.mjs +3 -3
- package/esm2020/lib/modules/dialog-trigger/dialog-trigger.module.mjs +5 -5
- package/esm2020/lib/modules/dropdown-components/abstract-association-select-component.directive.mjs +6 -6
- package/esm2020/lib/modules/dropdown-components/natural-dropdown-components.module.mjs +16 -18
- package/esm2020/lib/modules/dropdown-components/type-date/type-date.component.mjs +16 -16
- package/esm2020/lib/modules/dropdown-components/type-date-range/type-date-range.component.mjs +14 -14
- package/esm2020/lib/modules/dropdown-components/type-hierarchic-selector/type-hierarchic-selector.component.mjs +9 -9
- package/esm2020/lib/modules/dropdown-components/type-natural-select/type-natural-select.component.mjs +9 -9
- package/esm2020/lib/modules/dropdown-components/type-number/type-number.component.mjs +13 -13
- package/esm2020/lib/modules/dropdown-components/type-select/type-select.component.mjs +11 -11
- package/esm2020/lib/modules/dropdown-components/type-text/type-text.component.mjs +13 -10
- package/esm2020/lib/modules/dropdown-components/types.mjs +1 -1
- package/esm2020/lib/modules/file/abstract-file.mjs +3 -3
- package/esm2020/lib/modules/file/component/file.component.mjs +6 -6
- package/esm2020/lib/modules/file/file-drop.directive.mjs +3 -3
- package/esm2020/lib/modules/file/file-select.directive.mjs +3 -3
- package/esm2020/lib/modules/file/file.module.mjs +5 -5
- package/esm2020/lib/modules/file/file.service.mjs +3 -3
- package/esm2020/lib/modules/fixed-button/fixed-button.component.mjs +6 -6
- package/esm2020/lib/modules/fixed-button/fixed-button.module.mjs +5 -5
- package/esm2020/lib/modules/fixed-button-detail/fixed-button-detail.component.mjs +6 -6
- package/esm2020/lib/modules/fixed-button-detail/fixed-button-detail.module.mjs +5 -5
- package/esm2020/lib/modules/hierarchic-selector/hierarchic-selector/hierarchic-selector.component.mjs +10 -10
- package/esm2020/lib/modules/hierarchic-selector/hierarchic-selector/hierarchic-selector.service.mjs +3 -3
- package/esm2020/lib/modules/hierarchic-selector/hierarchic-selector-dialog/hierarchic-selector-dialog.component.mjs +5 -5
- package/esm2020/lib/modules/hierarchic-selector/hierarchic-selector-dialog/hierarchic-selector-dialog.service.mjs +3 -3
- package/esm2020/lib/modules/hierarchic-selector/hierarchic-selector.module.mjs +19 -21
- package/esm2020/lib/modules/icon/icon.component.mjs +5 -5
- package/esm2020/lib/modules/icon/icon.module.mjs +5 -5
- package/esm2020/lib/modules/logger/error-handler.mjs +3 -3
- package/esm2020/lib/modules/logger/error.module.mjs +5 -5
- package/esm2020/lib/modules/matomo/matomo-module.module.mjs +4 -4
- package/esm2020/lib/modules/matomo/matomo.service.mjs +3 -3
- package/esm2020/lib/modules/panels/abstract-panel.mjs +3 -3
- package/esm2020/lib/modules/panels/panels.component.mjs +3 -3
- package/esm2020/lib/modules/panels/panels.module.mjs +5 -5
- package/esm2020/lib/modules/panels/panels.service.mjs +3 -3
- package/esm2020/lib/modules/relations/relations.component.mjs +8 -8
- package/esm2020/lib/modules/relations/relations.module.mjs +14 -16
- package/esm2020/lib/modules/search/dropdown-container/dropdown-container.component.mjs +7 -7
- package/esm2020/lib/modules/search/dropdown-container/dropdown.service.mjs +3 -3
- package/esm2020/lib/modules/search/facet-selector/facet-selector.component.mjs +5 -5
- package/esm2020/lib/modules/search/group/group.component.mjs +5 -5
- package/esm2020/lib/modules/search/input/input.component.mjs +20 -22
- package/esm2020/lib/modules/search/search/search.component.mjs +5 -5
- package/esm2020/lib/modules/search/search.module.mjs +15 -17
- package/esm2020/lib/modules/select/abstract-select.component.mjs +6 -6
- package/esm2020/lib/modules/select/select/select.component.mjs +16 -16
- package/esm2020/lib/modules/select/select-enum/select-enum.component.mjs +8 -8
- package/esm2020/lib/modules/select/select-hierarchic/select-hierarchic.component.mjs +10 -10
- package/esm2020/lib/modules/select/select.module.mjs +16 -18
- package/esm2020/lib/modules/sidenav/sidenav/sidenav.component.mjs +3 -3
- package/esm2020/lib/modules/sidenav/sidenav-container/sidenav-container.component.mjs +5 -5
- package/esm2020/lib/modules/sidenav/sidenav-content/sidenav-content.component.mjs +3 -3
- package/esm2020/lib/modules/sidenav/sidenav-stack.service.mjs +3 -3
- package/esm2020/lib/modules/sidenav/sidenav.module.mjs +5 -5
- package/esm2020/lib/modules/sidenav/sidenav.service.mjs +3 -3
- package/esm2020/lib/modules/stamp/stamp-module.module.mjs +5 -5
- package/esm2020/lib/modules/stamp/stamp.component.mjs +5 -5
- package/esm2020/lib/modules/table-button/table-button.component.mjs +7 -7
- package/esm2020/lib/modules/table-button/table-button.module.mjs +5 -5
- package/esm2020/lib/services/abstract-model.service.mjs +7 -7
- package/esm2020/lib/services/enum.service.mjs +3 -3
- package/esm2020/lib/services/link-mutation.service.mjs +3 -3
- package/esm2020/lib/services/persistence.service.mjs +3 -3
- package/esm2020/lib/services/swiss-parsing-date-adapter.service.mjs +3 -3
- package/fesm2015/ecodev-natural.mjs +452 -473
- package/fesm2015/ecodev-natural.mjs.map +1 -1
- package/fesm2020/ecodev-natural.mjs +452 -473
- package/fesm2020/ecodev-natural.mjs.map +1 -1
- package/{ecodev-natural.d.ts → index.d.ts} +0 -0
- package/lib/classes/abstract-controller.d.ts +1 -1
- package/lib/classes/abstract-detail.d.ts +3 -3
- package/lib/classes/abstract-editable-list.d.ts +5 -5
- package/lib/classes/abstract-list.d.ts +1 -1
- package/lib/classes/abstract-navigable-list.d.ts +1 -1
- package/lib/classes/validators.d.ts +2 -2
- package/lib/directives/http-prefix.directive.d.ts +1 -1
- package/lib/modules/alert/confirm.component.d.ts +1 -1
- package/lib/modules/avatar/component/avatar.component.d.ts +1 -1
- package/lib/modules/columns-picker/columns-picker-column.directive.d.ts +1 -1
- package/lib/modules/columns-picker/columns-picker.component.d.ts +1 -1
- package/lib/modules/common/directives/linkable-tab.directive.d.ts +1 -1
- package/lib/modules/common/directives/src-density.directive.d.ts +1 -1
- package/lib/modules/common/pipes/capitalize.pipe.d.ts +1 -1
- package/lib/modules/common/pipes/ellipsis.pipe.d.ts +1 -1
- package/lib/modules/common/pipes/enum.pipe.d.ts +1 -1
- package/lib/modules/common/pipes/swiss-date.pipe.d.ts +1 -1
- package/lib/modules/detail-header/detail-header.component.d.ts +1 -1
- package/lib/modules/dialog-trigger/dialog-trigger.component.d.ts +1 -1
- package/lib/modules/dropdown-components/abstract-association-select-component.directive.d.ts +11 -8
- package/lib/modules/dropdown-components/type-date/type-date.component.d.ts +9 -6
- package/lib/modules/dropdown-components/type-date-range/type-date-range.component.d.ts +11 -8
- package/lib/modules/dropdown-components/type-hierarchic-selector/type-hierarchic-selector.component.d.ts +1 -1
- package/lib/modules/dropdown-components/type-natural-select/type-natural-select.component.d.ts +1 -1
- package/lib/modules/dropdown-components/type-number/type-number.component.d.ts +10 -7
- package/lib/modules/dropdown-components/type-select/type-select.component.d.ts +8 -5
- package/lib/modules/dropdown-components/type-text/type-text.component.d.ts +4 -4
- package/lib/modules/dropdown-components/types.d.ts +4 -2
- package/lib/modules/file/abstract-file.d.ts +1 -1
- package/lib/modules/file/component/file.component.d.ts +1 -1
- package/lib/modules/file/file-drop.directive.d.ts +1 -1
- package/lib/modules/file/file-select.directive.d.ts +1 -1
- package/lib/modules/fixed-button/fixed-button.component.d.ts +1 -1
- package/lib/modules/fixed-button-detail/fixed-button-detail.component.d.ts +1 -1
- package/lib/modules/hierarchic-selector/hierarchic-selector/hierarchic-selector.component.d.ts +1 -1
- package/lib/modules/hierarchic-selector/hierarchic-selector-dialog/hierarchic-selector-dialog.component.d.ts +1 -1
- package/lib/modules/icon/icon.component.d.ts +1 -1
- package/lib/modules/panels/abstract-panel.d.ts +1 -1
- package/lib/modules/panels/panels.component.d.ts +1 -1
- package/lib/modules/relations/relations.component.d.ts +1 -1
- package/lib/modules/search/dropdown-container/dropdown-container.component.d.ts +1 -1
- package/lib/modules/search/facet-selector/facet-selector.component.d.ts +1 -1
- package/lib/modules/search/group/group.component.d.ts +1 -1
- package/lib/modules/search/input/input.component.d.ts +6 -7
- package/lib/modules/search/search/search.component.d.ts +1 -1
- package/lib/modules/select/abstract-select.component.d.ts +9 -9
- package/lib/modules/select/select/select.component.d.ts +7 -5
- package/lib/modules/select/select-enum/select-enum.component.d.ts +5 -3
- package/lib/modules/select/select-hierarchic/select-hierarchic.component.d.ts +3 -3
- package/lib/modules/sidenav/sidenav/sidenav.component.d.ts +1 -1
- package/lib/modules/sidenav/sidenav-container/sidenav-container.component.d.ts +1 -1
- package/lib/modules/sidenav/sidenav-content/sidenav-content.component.d.ts +1 -1
- package/lib/modules/stamp/stamp.component.d.ts +1 -1
- package/lib/modules/table-button/table-button.component.d.ts +1 -1
- package/lib/services/abstract-model.service.d.ts +2 -2
- package/package.json +7 -7
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ElementRef, EnvironmentInjector, EventEmitter, OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core';
|
|
2
2
|
import { FormControl, FormGroupDirective, NgForm } from '@angular/forms';
|
|
3
3
|
import { ErrorStateMatcher, MatRipple } from '@angular/material/core';
|
|
4
4
|
import { NaturalDropdownService } from '../dropdown-container/dropdown.service';
|
|
@@ -6,13 +6,12 @@ import { Facet, NaturalSearchFacets } from '../types/facet';
|
|
|
6
6
|
import { NaturalSearchSelection } from '../types/values';
|
|
7
7
|
import * as i0 from "@angular/core";
|
|
8
8
|
export declare class AlwaysErrorStateMatcher implements ErrorStateMatcher {
|
|
9
|
-
isErrorState(control: FormControl | null, form: FormGroupDirective | NgForm | null): boolean;
|
|
9
|
+
isErrorState(control: FormControl<unknown> | null, form: FormGroupDirective | NgForm | null): boolean;
|
|
10
10
|
}
|
|
11
11
|
export declare class NaturalInputComponent implements OnInit, OnChanges, OnDestroy {
|
|
12
12
|
private readonly element;
|
|
13
13
|
private readonly dropdownService;
|
|
14
14
|
private readonly injector;
|
|
15
|
-
private readonly componentFactoryResolver;
|
|
16
15
|
/**
|
|
17
16
|
* Controls the ripple effect, used when opening a dropdown
|
|
18
17
|
*/
|
|
@@ -52,11 +51,11 @@ export declare class NaturalInputComponent implements OnInit, OnChanges, OnDestr
|
|
|
52
51
|
/**
|
|
53
52
|
* Controller for the input field
|
|
54
53
|
*/
|
|
55
|
-
formCtrl: FormControl
|
|
54
|
+
readonly formCtrl: FormControl<string | null>;
|
|
56
55
|
/**
|
|
57
56
|
* Customer error matcher that should validate on each change (including initialisation)
|
|
58
57
|
*/
|
|
59
|
-
errorMatcher: AlwaysErrorStateMatcher;
|
|
58
|
+
readonly errorMatcher: AlwaysErrorStateMatcher;
|
|
60
59
|
/**
|
|
61
60
|
* Reference of the opened dropdown container
|
|
62
61
|
*/
|
|
@@ -86,7 +85,7 @@ export declare class NaturalInputComponent implements OnInit, OnChanges, OnDestr
|
|
|
86
85
|
* 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.
|
|
87
86
|
*/
|
|
88
87
|
focus(): void;
|
|
89
|
-
constructor(element: ElementRef<HTMLElement>, dropdownService: NaturalDropdownService, injector:
|
|
88
|
+
constructor(element: ElementRef<HTMLElement>, dropdownService: NaturalDropdownService, injector: EnvironmentInjector);
|
|
90
89
|
ngOnInit(): void;
|
|
91
90
|
ngOnDestroy(): void;
|
|
92
91
|
ngOnChanges(changes: SimpleChanges): void;
|
|
@@ -104,5 +103,5 @@ export declare class NaturalInputComponent implements OnInit, OnChanges, OnDestr
|
|
|
104
103
|
private setValue;
|
|
105
104
|
private getSelection;
|
|
106
105
|
static ɵfac: i0.ɵɵFactoryDeclaration<NaturalInputComponent, never>;
|
|
107
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<NaturalInputComponent, "natural-input", never, { "placeholder": "placeholder"; "searchFieldName": "searchFieldName"; "selection": "selection"; "facets": "facets"; }, { "selectionChange": "selectionChange"; "cleared": "cleared"; }, never, 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>;
|
|
108
107
|
}
|
|
@@ -33,5 +33,5 @@ export declare class NaturalSearchComponent implements OnChanges {
|
|
|
33
33
|
removeGroup(index: number): void;
|
|
34
34
|
clear(): void;
|
|
35
35
|
static ɵfac: i0.ɵɵFactoryDeclaration<NaturalSearchComponent, never>;
|
|
36
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<NaturalSearchComponent, "natural-search", never, { "placeholder": "placeholder"; "facets": "facets"; "multipleGroups": "multipleGroups"; "selections": "selections"; }, { "selectionChange": "selectionChange"; }, never, ["*"]>;
|
|
36
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NaturalSearchComponent, "natural-search", never, { "placeholder": "placeholder"; "facets": "facets"; "multipleGroups": "multipleGroups"; "selections": "selections"; }, { "selectionChange": "selectionChange"; }, never, ["*"], false>;
|
|
37
37
|
}
|
|
@@ -10,12 +10,12 @@ import * as i0 from "@angular/core";
|
|
|
10
10
|
* touched status propagation between outside and inside world, and thus get rid of our legacy
|
|
11
11
|
* custom FormControl class ("NaturalFormControl").
|
|
12
12
|
*/
|
|
13
|
-
declare class ExternalFormControlMatcher<T> extends ErrorStateMatcher {
|
|
13
|
+
declare class ExternalFormControlMatcher<T, I> extends ErrorStateMatcher {
|
|
14
14
|
private readonly component;
|
|
15
|
-
constructor(component: AbstractSelect<T>);
|
|
16
|
-
isErrorState(control: FormControl | null, form: FormGroupDirective | NgForm | null): boolean;
|
|
15
|
+
constructor(component: AbstractSelect<T, I>);
|
|
16
|
+
isErrorState(control: FormControl<unknown> | null, form: FormGroupDirective | NgForm | null): boolean;
|
|
17
17
|
}
|
|
18
|
-
export declare abstract class AbstractSelect<V> extends NaturalAbstractController implements OnInit, OnDestroy, ControlValueAccessor, DoCheck {
|
|
18
|
+
export declare abstract class AbstractSelect<V, I> extends NaturalAbstractController implements OnInit, OnDestroy, ControlValueAccessor, DoCheck {
|
|
19
19
|
readonly ngControl: NgControl | null;
|
|
20
20
|
placeholder?: string;
|
|
21
21
|
floatPlaceholder: FloatLabelType;
|
|
@@ -63,7 +63,7 @@ export declare abstract class AbstractSelect<V> extends NaturalAbstractControlle
|
|
|
63
63
|
* - NaturalSelectHierarchicComponent: `string | null`.
|
|
64
64
|
* - NaturalSelectEnumComponent: `V | null`.
|
|
65
65
|
*/
|
|
66
|
-
readonly internalCtrl: FormControl
|
|
66
|
+
readonly internalCtrl: FormControl<I | null>;
|
|
67
67
|
/**
|
|
68
68
|
* Interface with ControlValueAccessor
|
|
69
69
|
* Notifies parent model / form controller
|
|
@@ -74,10 +74,10 @@ export declare abstract class AbstractSelect<V> extends NaturalAbstractControlle
|
|
|
74
74
|
* Notifies parent model / form controller
|
|
75
75
|
*/
|
|
76
76
|
onTouched?: () => void;
|
|
77
|
-
matcher: ExternalFormControlMatcher<V>;
|
|
77
|
+
readonly matcher: ExternalFormControlMatcher<V, I>;
|
|
78
78
|
constructor(ngControl: NgControl | null);
|
|
79
79
|
ngDoCheck(): void;
|
|
80
|
-
writeValue(value:
|
|
80
|
+
writeValue(value: I | null): void;
|
|
81
81
|
ngOnInit(): void;
|
|
82
82
|
/**
|
|
83
83
|
* Whether the value can be changed
|
|
@@ -96,7 +96,7 @@ export declare abstract class AbstractSelect<V> extends NaturalAbstractControlle
|
|
|
96
96
|
* Apply Validators.required on the internal form, based on ngControl or [required] attribute, giving priority to attribute.
|
|
97
97
|
*/
|
|
98
98
|
private applyRequired;
|
|
99
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AbstractSelect<any>, [{ optional: true; self: true; }]>;
|
|
100
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<AbstractSelect<any>, never, never, { "placeholder": "placeholder"; "floatPlaceholder": "floatPlaceholder"; "required": "required"; "navigateTo": "navigateTo"; "clearLabel": "clearLabel"; "showIcon": "showIcon"; "icon": "icon"; "displayWith": "displayWith"; "disabled": "disabled"; }, { "selectionChange": "selectionChange"; "blur": "blur"; }, never>;
|
|
99
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AbstractSelect<any, any>, [{ optional: true; self: true; }]>;
|
|
100
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<AbstractSelect<any, any>, never, never, { "placeholder": "placeholder"; "floatPlaceholder": "floatPlaceholder"; "required": "required"; "navigateTo": "navigateTo"; "clearLabel": "clearLabel"; "showIcon": "showIcon"; "icon": "icon"; "displayWith": "displayWith"; "disabled": "disabled"; }, { "selectionChange": "selectionChange"; "blur": "blur"; }, never, never, false>;
|
|
101
101
|
}
|
|
102
102
|
export {};
|
|
@@ -8,6 +8,7 @@ import { NaturalAbstractModelService } from '../../../services/abstract-model.se
|
|
|
8
8
|
import { ExtractTallOne, ExtractVall, Literal } from '../../../types/types';
|
|
9
9
|
import { AbstractSelect } from '../abstract-select.component';
|
|
10
10
|
import * as i0 from "@angular/core";
|
|
11
|
+
declare type V<TService> = string | ExtractTallOne<TService>;
|
|
11
12
|
/**
|
|
12
13
|
* Default usage:
|
|
13
14
|
* <natural-select [service]="amazingServiceInstance" [(model)]="amazingModel" (modelChange)=amazingChangeFn($event)></natural-select>
|
|
@@ -33,7 +34,7 @@ import * as i0 from "@angular/core";
|
|
|
33
34
|
* Allows to input free string without selecting an option from autocomplete suggestions
|
|
34
35
|
* <natural-select [optionRequired]="false">
|
|
35
36
|
*/
|
|
36
|
-
export declare class NaturalSelectComponent<TService extends NaturalAbstractModelService<any, any, PaginatedData<Literal>, QueryVariables, any, any, any, any, any, any>> extends AbstractSelect<
|
|
37
|
+
export declare class NaturalSelectComponent<TService extends NaturalAbstractModelService<any, any, PaginatedData<Literal>, QueryVariables, any, any, any, any, any, any>> extends AbstractSelect<V<TService>, V<TService>> implements OnInit, OnDestroy, ControlValueAccessor, AfterViewInit {
|
|
37
38
|
autoTrigger: MatAutocompleteTrigger;
|
|
38
39
|
itemTemplate?: TemplateRef<any>;
|
|
39
40
|
/**
|
|
@@ -82,15 +83,16 @@ export declare class NaturalSelectComponent<TService extends NaturalAbstractMode
|
|
|
82
83
|
ngOnInit(): void;
|
|
83
84
|
private initService;
|
|
84
85
|
startSearch(): void;
|
|
85
|
-
propagateValue(value:
|
|
86
|
+
propagateValue(value: V<TService> | null): void;
|
|
86
87
|
/**
|
|
87
88
|
* Very important to return something, above all if [select]='displayedValue' attribute value is used
|
|
88
89
|
*/
|
|
89
|
-
getDisplayFn(): (item:
|
|
90
|
+
getDisplayFn(): (item: V<TService> | null) => string;
|
|
90
91
|
clear(emitEvent?: boolean): void;
|
|
91
|
-
search(term:
|
|
92
|
+
search(term: V<TService> | null): void;
|
|
92
93
|
showClearButton(): boolean;
|
|
93
94
|
private getSearchFilter;
|
|
94
95
|
static ɵfac: i0.ɵɵFactoryDeclaration<NaturalSelectComponent<any>, never>;
|
|
95
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<NaturalSelectComponent<any>, "natural-select", never, { "service": "service"; "optionRequired": "optionRequired"; "searchField": "searchField"; "filter": "filter"; "disabled": "disabled"; }, {}, ["itemTemplate"], never>;
|
|
96
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NaturalSelectComponent<any>, "natural-select", never, { "service": "service"; "optionRequired": "optionRequired"; "searchField": "searchField"; "filter": "filter"; "disabled": "disabled"; }, {}, ["itemTemplate"], never, false>;
|
|
96
97
|
}
|
|
98
|
+
export {};
|
|
@@ -4,7 +4,8 @@ import { Observable } from 'rxjs';
|
|
|
4
4
|
import { IEnum, NaturalEnumService } from '../../../services/enum.service';
|
|
5
5
|
import { AbstractSelect } from '../abstract-select.component';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
|
-
|
|
7
|
+
declare type V = IEnum['value'] | IEnum['value'][];
|
|
8
|
+
export declare class NaturalSelectEnumComponent extends AbstractSelect<V, V> implements OnInit, ControlValueAccessor {
|
|
8
9
|
private readonly enumService;
|
|
9
10
|
readonly ngControl: NgControl | null;
|
|
10
11
|
/**
|
|
@@ -26,7 +27,8 @@ export declare class NaturalSelectEnumComponent extends AbstractSelect<IEnum['va
|
|
|
26
27
|
items?: Observable<IEnum[]>;
|
|
27
28
|
constructor(enumService: NaturalEnumService, ngControl: NgControl | null);
|
|
28
29
|
ngOnInit(): void;
|
|
29
|
-
getDisplayFn(): (item:
|
|
30
|
+
getDisplayFn(): (item: V | null) => string;
|
|
30
31
|
static ɵfac: i0.ɵɵFactoryDeclaration<NaturalSelectEnumComponent, [null, { optional: true; self: true; }]>;
|
|
31
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<NaturalSelectEnumComponent, "natural-select-enum", never, { "enumName": "enumName"; "nullLabel": "nullLabel"; "optionDisabled": "optionDisabled"; "multiple": "multiple"; }, {}, never, never>;
|
|
32
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NaturalSelectEnumComponent, "natural-select-enum", never, { "enumName": "enumName"; "nullLabel": "nullLabel"; "optionDisabled": "optionDisabled"; "multiple": "multiple"; }, {}, never, never, false>;
|
|
32
33
|
}
|
|
34
|
+
export {};
|
|
@@ -18,7 +18,7 @@ import * as i0 from "@angular/core";
|
|
|
18
18
|
* Never float placeholder :
|
|
19
19
|
* <natural-select placeholder="amazing placeholder" floatPlaceholder="never">
|
|
20
20
|
*/
|
|
21
|
-
export declare class NaturalSelectHierarchicComponent extends AbstractSelect<Literal> implements OnInit, OnDestroy, ControlValueAccessor {
|
|
21
|
+
export declare class NaturalSelectHierarchicComponent extends AbstractSelect<Literal, string> implements OnInit, OnDestroy, ControlValueAccessor {
|
|
22
22
|
private readonly hierarchicSelectorDialogService;
|
|
23
23
|
/**
|
|
24
24
|
* If provided cause a new select button to appear
|
|
@@ -49,10 +49,10 @@ export declare class NaturalSelectHierarchicComponent extends AbstractSelect<Lit
|
|
|
49
49
|
/**
|
|
50
50
|
* Override parent because our internalCtrl store the textual representation as string instead of raw Literal
|
|
51
51
|
*/
|
|
52
|
-
writeValue(value: Literal | null): void;
|
|
52
|
+
writeValue(value: Literal | string | null): void;
|
|
53
53
|
openDialog(): void;
|
|
54
54
|
showSelectButton(): boolean;
|
|
55
55
|
private getSelectKey;
|
|
56
56
|
static ɵfac: i0.ɵɵFactoryDeclaration<NaturalSelectHierarchicComponent, [null, { optional: true; self: true; }]>;
|
|
57
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<NaturalSelectHierarchicComponent, "natural-select-hierarchic", never, { "selectLabel": "selectLabel"; "config": "config"; "filters": "filters"; }, {}, never, never>;
|
|
57
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NaturalSelectHierarchicComponent, "natural-select-hierarchic", never, { "selectLabel": "selectLabel"; "config": "config"; "filters": "filters"; }, {}, never, never, false>;
|
|
58
58
|
}
|
|
@@ -2,5 +2,5 @@ import * as i0 from "@angular/core";
|
|
|
2
2
|
export declare class NaturalSidenavComponent {
|
|
3
3
|
constructor();
|
|
4
4
|
static ɵfac: i0.ɵɵFactoryDeclaration<NaturalSidenavComponent, never>;
|
|
5
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<NaturalSidenavComponent, "natural-sidenav", never, {}, {}, never, ["*"]>;
|
|
5
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NaturalSidenavComponent, "natural-sidenav", never, {}, {}, never, ["*"], false>;
|
|
6
6
|
}
|
|
@@ -46,5 +46,5 @@ export declare class NaturalSidenavContainerComponent implements OnInit, OnDestr
|
|
|
46
46
|
expand(): void;
|
|
47
47
|
toggleMinimized(): void;
|
|
48
48
|
static ɵfac: i0.ɵɵFactoryDeclaration<NaturalSidenavContainerComponent, never>;
|
|
49
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<NaturalSidenavContainerComponent, "natural-sidenav-container", never, { "name": "name"; "position": "position"; "mobileAutoClose": "mobileAutoClose"; "minimizedWidth": "minimizedWidth"; "noScroll": "noScroll"; }, {}, never, ["natural-sidenav", "natural-sidenav-content"]>;
|
|
49
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NaturalSidenavContainerComponent, "natural-sidenav-container", never, { "name": "name"; "position": "position"; "mobileAutoClose": "mobileAutoClose"; "minimizedWidth": "minimizedWidth"; "noScroll": "noScroll"; }, {}, never, ["natural-sidenav", "natural-sidenav-content"], false>;
|
|
50
50
|
}
|
|
@@ -2,5 +2,5 @@ import * as i0 from "@angular/core";
|
|
|
2
2
|
export declare class NaturalSidenavContentComponent {
|
|
3
3
|
constructor();
|
|
4
4
|
static ɵfac: i0.ɵɵFactoryDeclaration<NaturalSidenavContentComponent, never>;
|
|
5
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<NaturalSidenavContentComponent, "natural-sidenav-content", never, {}, {}, never, ["*"]>;
|
|
5
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NaturalSidenavContentComponent, "natural-sidenav-content", never, {}, {}, never, ["*"], false>;
|
|
6
6
|
}
|
|
@@ -9,6 +9,6 @@ declare type Stamped = {
|
|
|
9
9
|
export declare class NaturalStampComponent {
|
|
10
10
|
item: Stamped;
|
|
11
11
|
static ɵfac: i0.ɵɵFactoryDeclaration<NaturalStampComponent, never>;
|
|
12
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<NaturalStampComponent, "natural-stamp", never, { "item": "item"; }, {}, never, never>;
|
|
12
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NaturalStampComponent, "natural-stamp", never, { "item": "item"; }, {}, never, never, false>;
|
|
13
13
|
}
|
|
14
14
|
export {};
|
|
@@ -25,5 +25,5 @@ export declare class NaturalTableButtonComponent implements OnChanges {
|
|
|
25
25
|
type: 'routerLink' | 'href' | 'none';
|
|
26
26
|
ngOnChanges(changes: SimpleChanges): void;
|
|
27
27
|
static ɵfac: i0.ɵɵFactoryDeclaration<NaturalTableButtonComponent, never>;
|
|
28
|
-
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"; }, {}, never, never>;
|
|
28
|
+
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"; }, {}, never, never, false>;
|
|
29
29
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Apollo } from 'apollo-angular';
|
|
2
2
|
import { FetchResult, WatchQueryFetchPolicy } from '@apollo/client/core';
|
|
3
|
-
import { AbstractControl, AsyncValidatorFn,
|
|
3
|
+
import { AbstractControl, AsyncValidatorFn, UntypedFormGroup, ValidatorFn } from '@angular/forms';
|
|
4
4
|
import { DocumentNode } from 'graphql';
|
|
5
5
|
import { Observable, OperatorFunction } from 'rxjs';
|
|
6
6
|
import { NaturalQueryVariablesManager, QueryVariables } from '../classes/query-variable-manager';
|
|
@@ -72,7 +72,7 @@ export declare abstract class NaturalAbstractModelService<Tone, Vone extends {
|
|
|
72
72
|
* This method should **not** be overridden, but instead `getFormConfig`,
|
|
73
73
|
* `getFormGroupValidators`, `getFormGroupAsyncValidators` might be.
|
|
74
74
|
*/
|
|
75
|
-
getFormGroup(model: Literal):
|
|
75
|
+
getFormGroup(model: Literal): UntypedFormGroup;
|
|
76
76
|
/**
|
|
77
77
|
* Get a single object
|
|
78
78
|
*
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ecodev/natural",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "44.0.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": "github:Ecodev/natural",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"exports": {
|
|
8
8
|
".": {
|
|
9
9
|
"sass": "./theming/_natural.theme.scss",
|
|
10
|
-
"types": "./
|
|
10
|
+
"types": "./index.d.ts",
|
|
11
11
|
"esm2020": "./esm2020/ecodev-natural.mjs",
|
|
12
12
|
"es2020": "./fesm2020/ecodev-natural.mjs",
|
|
13
13
|
"es2015": "./fesm2015/ecodev-natural.mjs",
|
|
@@ -23,10 +23,10 @@
|
|
|
23
23
|
"tslib": "^2.3.1"
|
|
24
24
|
},
|
|
25
25
|
"peerDependencies": {
|
|
26
|
-
"@angular/common": "^
|
|
27
|
-
"@angular/core": "^
|
|
28
|
-
"@angular/localize": "^
|
|
29
|
-
"@angular/material": "^
|
|
26
|
+
"@angular/common": "^14.1.0",
|
|
27
|
+
"@angular/core": "^14.1.0",
|
|
28
|
+
"@angular/localize": "^14.1.0",
|
|
29
|
+
"@angular/material": "^14.1.0",
|
|
30
30
|
"apollo-angular": "^2.6.0",
|
|
31
31
|
"lodash-es": "^4.17.21",
|
|
32
32
|
"rxjs": "^7.4.0"
|
|
@@ -36,5 +36,5 @@
|
|
|
36
36
|
"esm2020": "esm2020/ecodev-natural.mjs",
|
|
37
37
|
"fesm2020": "fesm2020/ecodev-natural.mjs",
|
|
38
38
|
"fesm2015": "fesm2015/ecodev-natural.mjs",
|
|
39
|
-
"typings": "
|
|
39
|
+
"typings": "index.d.ts"
|
|
40
40
|
}
|