@ecodev/natural 42.4.2 → 44.0.1

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.
Files changed (156) hide show
  1. package/esm2020/lib/classes/abstract-controller.mjs +3 -3
  2. package/esm2020/lib/classes/abstract-detail.mjs +6 -6
  3. package/esm2020/lib/classes/abstract-editable-list.mjs +7 -7
  4. package/esm2020/lib/classes/abstract-list.mjs +3 -3
  5. package/esm2020/lib/classes/abstract-navigable-list.mjs +3 -3
  6. package/esm2020/lib/classes/query-variable-manager.mjs +2 -2
  7. package/esm2020/lib/classes/validators.mjs +1 -1
  8. package/esm2020/lib/directives/http-prefix.directive.mjs +3 -3
  9. package/esm2020/lib/modules/alert/alert.module.mjs +5 -5
  10. package/esm2020/lib/modules/alert/alert.service.mjs +3 -3
  11. package/esm2020/lib/modules/alert/confirm.component.mjs +5 -5
  12. package/esm2020/lib/modules/avatar/avatar.module.mjs +5 -5
  13. package/esm2020/lib/modules/avatar/component/avatar.component.mjs +7 -17
  14. package/esm2020/lib/modules/avatar/service/avatar.service.mjs +3 -3
  15. package/esm2020/lib/modules/columns-picker/columns-picker-column.directive.mjs +9 -5
  16. package/esm2020/lib/modules/columns-picker/columns-picker.component.mjs +9 -9
  17. package/esm2020/lib/modules/columns-picker/columns-picker.module.mjs +11 -13
  18. package/esm2020/lib/modules/common/common-module.mjs +5 -5
  19. package/esm2020/lib/modules/common/directives/linkable-tab.directive.mjs +5 -5
  20. package/esm2020/lib/modules/common/directives/src-density.directive.mjs +3 -3
  21. package/esm2020/lib/modules/common/pipes/capitalize.pipe.mjs +3 -3
  22. package/esm2020/lib/modules/common/pipes/ellipsis.pipe.mjs +3 -3
  23. package/esm2020/lib/modules/common/pipes/enum.pipe.mjs +3 -3
  24. package/esm2020/lib/modules/common/pipes/swiss-date.pipe.mjs +3 -3
  25. package/esm2020/lib/modules/common/services/memory-storage.mjs +3 -3
  26. package/esm2020/lib/modules/common/services/seo.service.mjs +3 -3
  27. package/esm2020/lib/modules/detail-header/detail-header.component.mjs +9 -9
  28. package/esm2020/lib/modules/detail-header/detail-header.module.mjs +5 -5
  29. package/esm2020/lib/modules/dialog-trigger/dialog-trigger.component.mjs +3 -3
  30. package/esm2020/lib/modules/dialog-trigger/dialog-trigger.module.mjs +5 -5
  31. package/esm2020/lib/modules/dropdown-components/abstract-association-select-component.directive.mjs +6 -6
  32. package/esm2020/lib/modules/dropdown-components/natural-dropdown-components.module.mjs +16 -18
  33. package/esm2020/lib/modules/dropdown-components/type-date/type-date.component.mjs +16 -16
  34. package/esm2020/lib/modules/dropdown-components/type-date-range/type-date-range.component.mjs +14 -14
  35. package/esm2020/lib/modules/dropdown-components/type-hierarchic-selector/type-hierarchic-selector.component.mjs +9 -9
  36. package/esm2020/lib/modules/dropdown-components/type-natural-select/type-natural-select.component.mjs +9 -9
  37. package/esm2020/lib/modules/dropdown-components/type-number/type-number.component.mjs +13 -13
  38. package/esm2020/lib/modules/dropdown-components/type-select/type-select.component.mjs +11 -11
  39. package/esm2020/lib/modules/dropdown-components/type-text/type-text.component.mjs +13 -10
  40. package/esm2020/lib/modules/dropdown-components/types.mjs +1 -1
  41. package/esm2020/lib/modules/file/abstract-file.mjs +3 -3
  42. package/esm2020/lib/modules/file/component/file.component.mjs +6 -6
  43. package/esm2020/lib/modules/file/file-drop.directive.mjs +3 -3
  44. package/esm2020/lib/modules/file/file-select.directive.mjs +3 -3
  45. package/esm2020/lib/modules/file/file.module.mjs +5 -5
  46. package/esm2020/lib/modules/file/file.service.mjs +3 -3
  47. package/esm2020/lib/modules/fixed-button/fixed-button.component.mjs +6 -6
  48. package/esm2020/lib/modules/fixed-button/fixed-button.module.mjs +5 -5
  49. package/esm2020/lib/modules/fixed-button-detail/fixed-button-detail.component.mjs +6 -6
  50. package/esm2020/lib/modules/fixed-button-detail/fixed-button-detail.module.mjs +5 -5
  51. package/esm2020/lib/modules/hierarchic-selector/hierarchic-selector/hierarchic-selector.component.mjs +10 -10
  52. package/esm2020/lib/modules/hierarchic-selector/hierarchic-selector/hierarchic-selector.service.mjs +3 -3
  53. package/esm2020/lib/modules/hierarchic-selector/hierarchic-selector-dialog/hierarchic-selector-dialog.component.mjs +5 -5
  54. package/esm2020/lib/modules/hierarchic-selector/hierarchic-selector-dialog/hierarchic-selector-dialog.service.mjs +3 -3
  55. package/esm2020/lib/modules/hierarchic-selector/hierarchic-selector.module.mjs +19 -21
  56. package/esm2020/lib/modules/icon/icon.component.mjs +5 -5
  57. package/esm2020/lib/modules/icon/icon.module.mjs +5 -5
  58. package/esm2020/lib/modules/logger/error-handler.mjs +3 -3
  59. package/esm2020/lib/modules/logger/error.module.mjs +5 -5
  60. package/esm2020/lib/modules/matomo/matomo-module.module.mjs +4 -4
  61. package/esm2020/lib/modules/matomo/matomo.service.mjs +3 -3
  62. package/esm2020/lib/modules/panels/abstract-panel.mjs +3 -3
  63. package/esm2020/lib/modules/panels/panels.component.mjs +3 -3
  64. package/esm2020/lib/modules/panels/panels.module.mjs +5 -5
  65. package/esm2020/lib/modules/panels/panels.service.mjs +3 -3
  66. package/esm2020/lib/modules/relations/relations.component.mjs +16 -11
  67. package/esm2020/lib/modules/relations/relations.module.mjs +14 -16
  68. package/esm2020/lib/modules/search/dropdown-container/dropdown-container.component.mjs +7 -7
  69. package/esm2020/lib/modules/search/dropdown-container/dropdown.service.mjs +4 -4
  70. package/esm2020/lib/modules/search/facet-selector/facet-selector.component.mjs +5 -5
  71. package/esm2020/lib/modules/search/group/group.component.mjs +5 -5
  72. package/esm2020/lib/modules/search/input/input.component.mjs +20 -20
  73. package/esm2020/lib/modules/search/search/search.component.mjs +5 -5
  74. package/esm2020/lib/modules/search/search.module.mjs +15 -17
  75. package/esm2020/lib/modules/select/abstract-select.component.mjs +6 -6
  76. package/esm2020/lib/modules/select/select/select.component.mjs +16 -16
  77. package/esm2020/lib/modules/select/select-enum/select-enum.component.mjs +8 -8
  78. package/esm2020/lib/modules/select/select-hierarchic/select-hierarchic.component.mjs +10 -10
  79. package/esm2020/lib/modules/select/select.module.mjs +16 -18
  80. package/esm2020/lib/modules/sidenav/sidenav/sidenav.component.mjs +3 -3
  81. package/esm2020/lib/modules/sidenav/sidenav-container/sidenav-container.component.mjs +8 -9
  82. package/esm2020/lib/modules/sidenav/sidenav-content/sidenav-content.component.mjs +3 -3
  83. package/esm2020/lib/modules/sidenav/sidenav-stack.service.mjs +3 -3
  84. package/esm2020/lib/modules/sidenav/sidenav.module.mjs +5 -5
  85. package/esm2020/lib/modules/sidenav/sidenav.service.mjs +3 -3
  86. package/esm2020/lib/modules/stamp/stamp-module.module.mjs +5 -5
  87. package/esm2020/lib/modules/stamp/stamp.component.mjs +5 -5
  88. package/esm2020/lib/modules/table-button/table-button.component.mjs +7 -7
  89. package/esm2020/lib/modules/table-button/table-button.module.mjs +5 -5
  90. package/esm2020/lib/services/abstract-model.service.mjs +51 -45
  91. package/esm2020/lib/services/enum.service.mjs +3 -3
  92. package/esm2020/lib/services/link-mutation.service.mjs +3 -3
  93. package/esm2020/lib/services/persistence.service.mjs +3 -3
  94. package/esm2020/lib/services/swiss-parsing-date-adapter.service.mjs +3 -3
  95. package/fesm2015/ecodev-natural.mjs +513 -517
  96. package/fesm2015/ecodev-natural.mjs.map +1 -1
  97. package/fesm2020/ecodev-natural.mjs +512 -517
  98. package/fesm2020/ecodev-natural.mjs.map +1 -1
  99. package/{ecodev-natural.d.ts → index.d.ts} +0 -0
  100. package/lib/classes/abstract-controller.d.ts +1 -1
  101. package/lib/classes/abstract-detail.d.ts +3 -3
  102. package/lib/classes/abstract-editable-list.d.ts +5 -5
  103. package/lib/classes/abstract-list.d.ts +1 -1
  104. package/lib/classes/abstract-navigable-list.d.ts +1 -1
  105. package/lib/classes/validators.d.ts +2 -2
  106. package/lib/directives/http-prefix.directive.d.ts +1 -1
  107. package/lib/modules/alert/confirm.component.d.ts +1 -1
  108. package/lib/modules/avatar/component/avatar.component.d.ts +1 -1
  109. package/lib/modules/columns-picker/columns-picker-column.directive.d.ts +2 -2
  110. package/lib/modules/columns-picker/columns-picker.component.d.ts +1 -1
  111. package/lib/modules/common/directives/linkable-tab.directive.d.ts +1 -1
  112. package/lib/modules/common/directives/src-density.directive.d.ts +1 -1
  113. package/lib/modules/common/pipes/capitalize.pipe.d.ts +1 -1
  114. package/lib/modules/common/pipes/ellipsis.pipe.d.ts +1 -1
  115. package/lib/modules/common/pipes/enum.pipe.d.ts +1 -1
  116. package/lib/modules/common/pipes/swiss-date.pipe.d.ts +1 -1
  117. package/lib/modules/detail-header/detail-header.component.d.ts +1 -1
  118. package/lib/modules/dialog-trigger/dialog-trigger.component.d.ts +1 -1
  119. package/lib/modules/dropdown-components/abstract-association-select-component.directive.d.ts +11 -8
  120. package/lib/modules/dropdown-components/type-date/type-date.component.d.ts +9 -6
  121. package/lib/modules/dropdown-components/type-date-range/type-date-range.component.d.ts +11 -8
  122. package/lib/modules/dropdown-components/type-hierarchic-selector/type-hierarchic-selector.component.d.ts +1 -1
  123. package/lib/modules/dropdown-components/type-natural-select/type-natural-select.component.d.ts +1 -1
  124. package/lib/modules/dropdown-components/type-number/type-number.component.d.ts +10 -7
  125. package/lib/modules/dropdown-components/type-select/type-select.component.d.ts +8 -5
  126. package/lib/modules/dropdown-components/type-text/type-text.component.d.ts +4 -4
  127. package/lib/modules/dropdown-components/types.d.ts +4 -2
  128. package/lib/modules/file/abstract-file.d.ts +1 -1
  129. package/lib/modules/file/component/file.component.d.ts +1 -1
  130. package/lib/modules/file/file-drop.directive.d.ts +1 -1
  131. package/lib/modules/file/file-select.directive.d.ts +1 -1
  132. package/lib/modules/fixed-button/fixed-button.component.d.ts +1 -1
  133. package/lib/modules/fixed-button-detail/fixed-button-detail.component.d.ts +1 -1
  134. package/lib/modules/hierarchic-selector/hierarchic-selector/hierarchic-selector.component.d.ts +1 -1
  135. package/lib/modules/hierarchic-selector/hierarchic-selector-dialog/hierarchic-selector-dialog.component.d.ts +1 -1
  136. package/lib/modules/icon/icon.component.d.ts +1 -1
  137. package/lib/modules/panels/abstract-panel.d.ts +1 -1
  138. package/lib/modules/panels/panels.component.d.ts +1 -1
  139. package/lib/modules/relations/relations.component.d.ts +2 -1
  140. package/lib/modules/search/dropdown-container/dropdown-container.component.d.ts +2 -2
  141. package/lib/modules/search/dropdown-container/dropdown.service.d.ts +1 -1
  142. package/lib/modules/search/facet-selector/facet-selector.component.d.ts +1 -1
  143. package/lib/modules/search/group/group.component.d.ts +1 -1
  144. package/lib/modules/search/input/input.component.d.ts +7 -8
  145. package/lib/modules/search/search/search.component.d.ts +1 -1
  146. package/lib/modules/select/abstract-select.component.d.ts +9 -9
  147. package/lib/modules/select/select/select.component.d.ts +7 -5
  148. package/lib/modules/select/select-enum/select-enum.component.d.ts +5 -3
  149. package/lib/modules/select/select-hierarchic/select-hierarchic.component.d.ts +3 -3
  150. package/lib/modules/sidenav/sidenav/sidenav.component.d.ts +1 -1
  151. package/lib/modules/sidenav/sidenav-container/sidenav-container.component.d.ts +3 -4
  152. package/lib/modules/sidenav/sidenav-content/sidenav-content.component.d.ts +1 -1
  153. package/lib/modules/stamp/stamp.component.d.ts +1 -1
  154. package/lib/modules/table-button/table-button.component.d.ts +1 -1
  155. package/lib/services/abstract-model.service.d.ts +4 -4
  156. package/package.json +8 -8
@@ -14,5 +14,5 @@ export declare class NaturalGroupComponent {
14
14
  addInput(selection: NaturalSearchSelection): void;
15
15
  removeInput(index: number): void;
16
16
  static ɵfac: i0.ɵɵFactoryDeclaration<NaturalGroupComponent, never>;
17
- static ɵcmp: i0.ɵɵComponentDeclaration<NaturalGroupComponent, "natural-group", never, { "placeholder": "placeholder"; "facets": "facets"; "selections": "selections"; }, { "selectionChange": "selectionChange"; }, never, never>;
17
+ static ɵcmp: i0.ɵɵComponentDeclaration<NaturalGroupComponent, "natural-group", never, { "placeholder": "placeholder"; "facets": "facets"; "selections": "selections"; }, { "selectionChange": "selectionChange"; }, never, never, false>;
18
18
  }
@@ -1,4 +1,4 @@
1
- import { ComponentFactoryResolver, ElementRef, EventEmitter, Injector, OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core';
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
  */
@@ -20,7 +19,7 @@ export declare class NaturalInputComponent implements OnInit, OnChanges, OnDestr
20
19
  /**
21
20
  * Native element ref for <input> related to this <natural-input> component
22
21
  */
23
- input: ElementRef;
22
+ input: ElementRef<HTMLInputElement>;
24
23
  /**
25
24
  * Label for this field
26
25
  */
@@ -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, dropdownService: NaturalDropdownService, injector: Injector, componentFactoryResolver: ComponentFactoryResolver);
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: V | null): void;
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<string | ExtractTallOne<TService>> implements OnInit, OnDestroy, ControlValueAccessor, AfterViewInit {
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: string | ExtractTallOne<TService> | null): void;
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: string | ExtractTallOne<TService> | null) => string;
90
+ getDisplayFn(): (item: V<TService> | null) => string;
90
91
  clear(emitEvent?: boolean): void;
91
- search(term: string | ExtractTallOne<TService> | null): void;
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
- export declare class NaturalSelectEnumComponent extends AbstractSelect<IEnum['value'] | IEnum['value'][]> implements OnInit, ControlValueAccessor {
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: IEnum['value'] | IEnum['value'][] | null) => string;
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
  }
@@ -1,10 +1,9 @@
1
- import { ElementRef, OnDestroy, OnInit } from '@angular/core';
1
+ import { OnDestroy, OnInit } from '@angular/core';
2
2
  import { MatDrawer } from '@angular/material/sidenav';
3
3
  import { NaturalSidenavService } from '../sidenav.service';
4
4
  import * as i0 from "@angular/core";
5
5
  export declare class NaturalSidenavContainerComponent implements OnInit, OnDestroy {
6
6
  readonly sidenavService: NaturalSidenavService;
7
- readonly element: ElementRef;
8
7
  /**
9
8
  * Unique identifier used for the local storage
10
9
  */
@@ -35,7 +34,7 @@ export declare class NaturalSidenavContainerComponent implements OnInit, OnDestr
35
34
  * Inner "native" material sidenav
36
35
  */
37
36
  private menuSidenav;
38
- constructor(sidenavService: NaturalSidenavService, element: ElementRef);
37
+ constructor(sidenavService: NaturalSidenavService);
39
38
  get isMinimized(): boolean;
40
39
  get isMobileView(): boolean;
41
40
  ngOnInit(): void;
@@ -47,5 +46,5 @@ export declare class NaturalSidenavContainerComponent implements OnInit, OnDestr
47
46
  expand(): void;
48
47
  toggleMinimized(): void;
49
48
  static ɵfac: i0.ɵɵFactoryDeclaration<NaturalSidenavContainerComponent, never>;
50
- 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>;
51
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, FormGroup, ValidatorFn } from '@angular/forms';
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): FormGroup;
75
+ getFormGroup(model: Literal): UntypedFormGroup;
76
76
  /**
77
77
  * Get a single object
78
78
  *
@@ -177,13 +177,13 @@ export declare abstract class NaturalAbstractModelService<Tone, Vone extends {
177
177
  *
178
178
  * This is typically a site or state ID, and is needed to get appropriate access rights
179
179
  */
180
- protected getPartialVariablesForOne(): Partial<Vone>;
180
+ protected getPartialVariablesForOne(): Observable<Partial<Vone>>;
181
181
  /**
182
182
  * Returns additional variables to be used when getting multiple objects
183
183
  *
184
184
  * This is typically a site or state ID, but it could be something else to further filter the query
185
185
  */
186
- getPartialVariablesForAll(): Partial<Vall>;
186
+ getPartialVariablesForAll(): Observable<Partial<Vall>>;
187
187
  /**
188
188
  * Returns additional variables to be used when creating an object
189
189
  *
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@ecodev/natural",
3
- "version": "42.4.2",
3
+ "version": "44.0.1",
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": "./ecodev-natural.d.ts",
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,11 +23,11 @@
23
23
  "tslib": "^2.3.1"
24
24
  },
25
25
  "peerDependencies": {
26
- "@angular/common": "^13.2.0",
27
- "@angular/core": "^13.2.0",
28
- "@angular/localize": "^13.2.0",
29
- "@angular/material": "^13.2.0",
30
- "apollo-angular": "^2.6.0",
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
+ "apollo-angular": "^3.0.0",
31
31
  "lodash-es": "^4.17.21",
32
32
  "rxjs": "^7.4.0"
33
33
  },
@@ -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": "ecodev-natural.d.ts"
39
+ "typings": "index.d.ts"
40
40
  }