@ecodev/natural 62.1.2 → 63.1.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.
Files changed (186) hide show
  1. package/fesm2022/ecodev-natural-vanilla.mjs +1199 -0
  2. package/fesm2022/ecodev-natural-vanilla.mjs.map +1 -0
  3. package/fesm2022/ecodev-natural.mjs +457 -436
  4. package/fesm2022/ecodev-natural.mjs.map +1 -1
  5. package/lib/classes/abstract-editable-list.d.ts +3 -2
  6. package/lib/classes/network-activity.service.d.ts +54 -0
  7. package/lib/classes/validators.d.ts +1 -1
  8. package/lib/modules/columns-picker/columns-picker.component.d.ts +2 -2
  9. package/lib/modules/common/services/seo.provider.d.ts +2 -2
  10. package/lib/modules/dropdown-components/type-natural-select/type-natural-select.component.d.ts +1 -0
  11. package/lib/modules/dropdown-components/type-select/type-select.component.d.ts +1 -1
  12. package/lib/modules/file/abstract-file.d.ts +6 -3
  13. package/lib/modules/file/component/file.component.d.ts +3 -3
  14. package/lib/modules/file/file-drop.directive.d.ts +2 -3
  15. package/lib/modules/fixed-button-detail/fixed-button-detail.component.d.ts +2 -3
  16. package/lib/modules/hierarchic-selector/classes/model-node.d.ts +1 -1
  17. package/lib/modules/hierarchic-selector/hierarchic-selector/hierarchic-selector.component.d.ts +3 -3
  18. package/lib/modules/icon/icon.module.d.ts +2 -2
  19. package/lib/modules/panels/panels.service.d.ts +1 -2
  20. package/lib/modules/relations/relations.component.d.ts +4 -4
  21. package/lib/modules/search/dropdown-container/dropdown-container.component.d.ts +2 -3
  22. package/lib/modules/search/group/group.component.d.ts +2 -3
  23. package/lib/modules/search/input/input.component.d.ts +5 -5
  24. package/lib/modules/search/search/search.component.d.ts +2 -2
  25. package/lib/modules/select/abstract-select.component.d.ts +3 -3
  26. package/lib/modules/select/select/select.component.d.ts +4 -4
  27. package/lib/modules/sidenav/sidenav-container/sidenav-container.component.d.ts +1 -1
  28. package/lib/modules/table-button/table-button.component.d.ts +4 -2
  29. package/package.json +16 -14
  30. package/public-api.d.ts +1 -0
  31. package/src/lib/_natural.theme.scss +1 -2
  32. package/vanilla/index.d.ts +5 -0
  33. package/vanilla/package.json +3 -0
  34. package/vanilla/public-api.d.ts +11 -0
  35. package/vanilla/src/lib/classes/crypto.d.ts +8 -0
  36. package/vanilla/src/lib/classes/data-source.d.ts +32 -0
  37. package/vanilla/src/lib/classes/query-variable-manager-utils.d.ts +2 -0
  38. package/vanilla/src/lib/classes/query-variable-manager.d.ts +91 -0
  39. package/vanilla/src/lib/classes/signing.d.ts +7 -0
  40. package/vanilla/src/lib/classes/utility.d.ts +77 -0
  41. package/vanilla/src/lib/modules/search/classes/graphql-doctrine.types.d.ts +83 -0
  42. package/vanilla/src/lib/modules/search/classes/utils.d.ts +17 -0
  43. package/vanilla/src/lib/modules/search/types/dropdown-component.d.ts +20 -0
  44. package/vanilla/src/lib/modules/search/types/facet.d.ts +75 -0
  45. package/vanilla/src/lib/modules/search/types/values.d.ts +32 -0
  46. package/vanilla/src/lib/services/abstract-model.service.d.ts +244 -0
  47. package/vanilla/src/lib/services/debounce.service.d.ts +52 -0
  48. package/vanilla/src/lib/types/types.d.ts +100 -0
  49. package/esm2022/ecodev-natural.mjs +0 -5
  50. package/esm2022/lib/classes/abstract-detail.mjs +0 -229
  51. package/esm2022/lib/classes/abstract-editable-list.mjs +0 -99
  52. package/esm2022/lib/classes/abstract-list.mjs +0 -461
  53. package/esm2022/lib/classes/abstract-navigable-list.mjs +0 -133
  54. package/esm2022/lib/classes/apollo-utils.mjs +0 -59
  55. package/esm2022/lib/classes/crypto.mjs +0 -23
  56. package/esm2022/lib/classes/cumulative-changes.mjs +0 -50
  57. package/esm2022/lib/classes/data-source.mjs +0 -71
  58. package/esm2022/lib/classes/providers.mjs +0 -13
  59. package/esm2022/lib/classes/query-variable-manager-utils.mjs +0 -14
  60. package/esm2022/lib/classes/query-variable-manager.mjs +0 -172
  61. package/esm2022/lib/classes/rxjs.mjs +0 -54
  62. package/esm2022/lib/classes/signing.mjs +0 -38
  63. package/esm2022/lib/classes/tld.mjs +0 -1476
  64. package/esm2022/lib/classes/utility.mjs +0 -234
  65. package/esm2022/lib/classes/validators.mjs +0 -179
  66. package/esm2022/lib/directives/http-prefix.directive.mjs +0 -47
  67. package/esm2022/lib/modules/alert/alert.service.mjs +0 -53
  68. package/esm2022/lib/modules/alert/confirm.component.mjs +0 -16
  69. package/esm2022/lib/modules/alert/public-api.mjs +0 -6
  70. package/esm2022/lib/modules/avatar/component/avatar.component.mjs +0 -203
  71. package/esm2022/lib/modules/avatar/public-api.mjs +0 -6
  72. package/esm2022/lib/modules/avatar/service/avatar.service.mjs +0 -63
  73. package/esm2022/lib/modules/avatar/sources/gravatar.mjs +0 -29
  74. package/esm2022/lib/modules/avatar/sources/image.mjs +0 -13
  75. package/esm2022/lib/modules/avatar/sources/initials.mjs +0 -39
  76. package/esm2022/lib/modules/avatar/sources/source.mjs +0 -16
  77. package/esm2022/lib/modules/columns-picker/columns-picker.component.mjs +0 -145
  78. package/esm2022/lib/modules/columns-picker/public-api.mjs +0 -5
  79. package/esm2022/lib/modules/columns-picker/types.mjs +0 -2
  80. package/esm2022/lib/modules/common/directives/background-density.directive.mjs +0 -63
  81. package/esm2022/lib/modules/common/directives/linkable-tab.directive.mjs +0 -93
  82. package/esm2022/lib/modules/common/directives/src-density.directive.mjs +0 -72
  83. package/esm2022/lib/modules/common/pipes/capitalize.pipe.mjs +0 -24
  84. package/esm2022/lib/modules/common/pipes/ellipsis.pipe.mjs +0 -17
  85. package/esm2022/lib/modules/common/pipes/enum.pipe.mjs +0 -24
  86. package/esm2022/lib/modules/common/pipes/time-ago.pipe.mjs +0 -140
  87. package/esm2022/lib/modules/common/public-api.mjs +0 -14
  88. package/esm2022/lib/modules/common/services/memory-storage.mjs +0 -110
  89. package/esm2022/lib/modules/common/services/seo.provider.mjs +0 -23
  90. package/esm2022/lib/modules/common/services/seo.service.mjs +0 -235
  91. package/esm2022/lib/modules/detail-header/detail-header.component.mjs +0 -84
  92. package/esm2022/lib/modules/detail-header/public-api.mjs +0 -5
  93. package/esm2022/lib/modules/dialog-trigger/dialog-trigger.component.mjs +0 -72
  94. package/esm2022/lib/modules/dialog-trigger/public-api.mjs +0 -5
  95. package/esm2022/lib/modules/dropdown-components/abstract-association-select-component.directive.mjs +0 -100
  96. package/esm2022/lib/modules/dropdown-components/public-api.mjs +0 -14
  97. package/esm2022/lib/modules/dropdown-components/type-boolean/type-boolean.component.mjs +0 -39
  98. package/esm2022/lib/modules/dropdown-components/type-date/type-date.component.mjs +0 -173
  99. package/esm2022/lib/modules/dropdown-components/type-date-range/type-date-range.component.mjs +0 -134
  100. package/esm2022/lib/modules/dropdown-components/type-hierarchic-selector/type-hierarchic-selector.component.mjs +0 -80
  101. package/esm2022/lib/modules/dropdown-components/type-natural-select/type-natural-select.component.mjs +0 -48
  102. package/esm2022/lib/modules/dropdown-components/type-number/type-number.component.mjs +0 -110
  103. package/esm2022/lib/modules/dropdown-components/type-options/type-options.component.mjs +0 -64
  104. package/esm2022/lib/modules/dropdown-components/type-select/type-select.component.mjs +0 -175
  105. package/esm2022/lib/modules/dropdown-components/type-text/type-text.component.mjs +0 -62
  106. package/esm2022/lib/modules/dropdown-components/types.mjs +0 -41
  107. package/esm2022/lib/modules/dropdown-components/utils.mjs +0 -35
  108. package/esm2022/lib/modules/file/abstract-file.mjs +0 -230
  109. package/esm2022/lib/modules/file/component/file.component.mjs +0 -172
  110. package/esm2022/lib/modules/file/file-drop.directive.mjs +0 -111
  111. package/esm2022/lib/modules/file/file-select.directive.mjs +0 -26
  112. package/esm2022/lib/modules/file/file.service.mjs +0 -43
  113. package/esm2022/lib/modules/file/public-api.mjs +0 -9
  114. package/esm2022/lib/modules/file/types.mjs +0 -2
  115. package/esm2022/lib/modules/file/utils.mjs +0 -129
  116. package/esm2022/lib/modules/fixed-button/fixed-button.component.mjs +0 -30
  117. package/esm2022/lib/modules/fixed-button/public-api.mjs +0 -5
  118. package/esm2022/lib/modules/fixed-button-detail/fixed-button-detail.component.mjs +0 -56
  119. package/esm2022/lib/modules/fixed-button-detail/public-api.mjs +0 -5
  120. package/esm2022/lib/modules/hierarchic-selector/classes/flat-node.mjs +0 -18
  121. package/esm2022/lib/modules/hierarchic-selector/classes/hierarchic-configuration.mjs +0 -2
  122. package/esm2022/lib/modules/hierarchic-selector/classes/hierarchic-filters-configuration.mjs +0 -2
  123. package/esm2022/lib/modules/hierarchic-selector/classes/model-node.mjs +0 -14
  124. package/esm2022/lib/modules/hierarchic-selector/hierarchic-selector/hierarchic-selector.component.mjs +0 -398
  125. package/esm2022/lib/modules/hierarchic-selector/hierarchic-selector/hierarchic-selector.service.mjs +0 -243
  126. package/esm2022/lib/modules/hierarchic-selector/hierarchic-selector-dialog/hierarchic-selector-dialog.component.mjs +0 -38
  127. package/esm2022/lib/modules/hierarchic-selector/hierarchic-selector-dialog/hierarchic-selector-dialog.service.mjs +0 -22
  128. package/esm2022/lib/modules/hierarchic-selector/public-api.mjs +0 -10
  129. package/esm2022/lib/modules/icon/icon.directive.mjs +0 -96
  130. package/esm2022/lib/modules/icon/icon.module.mjs +0 -33
  131. package/esm2022/lib/modules/icon/public-api.mjs +0 -6
  132. package/esm2022/lib/modules/logger/error-handler.mjs +0 -87
  133. package/esm2022/lib/modules/logger/error.module.mjs +0 -22
  134. package/esm2022/lib/modules/logger/public-api.mjs +0 -6
  135. package/esm2022/lib/modules/matomo/matomo.service.mjs +0 -96
  136. package/esm2022/lib/modules/matomo/public-api.mjs +0 -5
  137. package/esm2022/lib/modules/panels/abstract-panel.mjs +0 -76
  138. package/esm2022/lib/modules/panels/fallback-if-no-opened-panels.urlmatcher.mjs +0 -12
  139. package/esm2022/lib/modules/panels/panels.component.mjs +0 -27
  140. package/esm2022/lib/modules/panels/panels.module.mjs +0 -10
  141. package/esm2022/lib/modules/panels/panels.service.mjs +0 -329
  142. package/esm2022/lib/modules/panels/panels.urlmatcher.mjs +0 -75
  143. package/esm2022/lib/modules/panels/public-api.mjs +0 -11
  144. package/esm2022/lib/modules/panels/types.mjs +0 -3
  145. package/esm2022/lib/modules/relations/public-api.mjs +0 -5
  146. package/esm2022/lib/modules/relations/relations.component.mjs +0 -254
  147. package/esm2022/lib/modules/search/classes/graphql-doctrine.mjs +0 -111
  148. package/esm2022/lib/modules/search/classes/graphql-doctrine.types.mjs +0 -14
  149. package/esm2022/lib/modules/search/classes/transformers.mjs +0 -142
  150. package/esm2022/lib/modules/search/classes/url.mjs +0 -53
  151. package/esm2022/lib/modules/search/classes/utils.mjs +0 -25
  152. package/esm2022/lib/modules/search/dropdown-container/dropdown-container-animations.mjs +0 -44
  153. package/esm2022/lib/modules/search/dropdown-container/dropdown-container.component.mjs +0 -87
  154. package/esm2022/lib/modules/search/dropdown-container/dropdown-ref.mjs +0 -24
  155. package/esm2022/lib/modules/search/dropdown-container/dropdown.service.mjs +0 -90
  156. package/esm2022/lib/modules/search/facet-selector/facet-selector.component.mjs +0 -45
  157. package/esm2022/lib/modules/search/group/group.component.mjs +0 -53
  158. package/esm2022/lib/modules/search/input/input.component.mjs +0 -365
  159. package/esm2022/lib/modules/search/public-api.mjs +0 -7
  160. package/esm2022/lib/modules/search/search/search.component.mjs +0 -102
  161. package/esm2022/lib/modules/search/types/dropdown-component.mjs +0 -2
  162. package/esm2022/lib/modules/search/types/facet.mjs +0 -2
  163. package/esm2022/lib/modules/search/types/values.mjs +0 -2
  164. package/esm2022/lib/modules/select/abstract-select.component.mjs +0 -232
  165. package/esm2022/lib/modules/select/public-api.mjs +0 -7
  166. package/esm2022/lib/modules/select/select/select.component.mjs +0 -310
  167. package/esm2022/lib/modules/select/select-enum/select-enum.component.mjs +0 -57
  168. package/esm2022/lib/modules/select/select-hierarchic/select-hierarchic.component.mjs +0 -155
  169. package/esm2022/lib/modules/sidenav/public-api.mjs +0 -9
  170. package/esm2022/lib/modules/sidenav/sidenav/sidenav.component.mjs +0 -15
  171. package/esm2022/lib/modules/sidenav/sidenav-container/sidenav-container.component.mjs +0 -90
  172. package/esm2022/lib/modules/sidenav/sidenav-content/sidenav-content.component.mjs +0 -11
  173. package/esm2022/lib/modules/sidenav/sidenav-stack.service.mjs +0 -50
  174. package/esm2022/lib/modules/sidenav/sidenav.service.mjs +0 -196
  175. package/esm2022/lib/modules/stamp/public-api.mjs +0 -5
  176. package/esm2022/lib/modules/stamp/stamp.component.mjs +0 -23
  177. package/esm2022/lib/modules/table-button/public-api.mjs +0 -5
  178. package/esm2022/lib/modules/table-button/table-button.component.mjs +0 -78
  179. package/esm2022/lib/services/abstract-model.service.mjs +0 -526
  180. package/esm2022/lib/services/debounce.service.mjs +0 -149
  181. package/esm2022/lib/services/enum.service.mjs +0 -64
  182. package/esm2022/lib/services/link-mutation.service.mjs +0 -154
  183. package/esm2022/lib/services/persistence.service.mjs +0 -115
  184. package/esm2022/lib/services/swiss-parsing-date-adapter.service.mjs +0 -63
  185. package/esm2022/lib/types/types.mjs +0 -2
  186. package/esm2022/public-api.mjs +0 -46
@@ -12,8 +12,9 @@ import * as i0 from "@angular/core";
12
12
  *
13
13
  * To access data of this component from a parent component, use:
14
14
  *
15
- * ```
16
- * @ViewChildren(ComponentType) cmp: ComponentType;
15
+ * ```ts
16
+ * private readonly cmp = viewChildren(ComponentType);
17
+ *
17
18
  * this.cmp.getItems();
18
19
  * ```
19
20
  *
@@ -0,0 +1,54 @@
1
+ import { GraphQLFormattedError } from 'graphql';
2
+ import { HttpInterceptorFn } from '@angular/common/http';
3
+ import * as i0 from "@angular/core";
4
+ type ProgressBar = {
5
+ start: () => void;
6
+ complete: () => void;
7
+ };
8
+ /**
9
+ * Intercept HTTP request from Angular to show them as activity
10
+ */
11
+ export declare const activityInterceptor: HttpInterceptorFn;
12
+ /**
13
+ * Singleton to track pending XHR and XHR errors in the whole application.
14
+ *
15
+ * You must:
16
+ *
17
+ * - start the tracking by calling `setProgressRef()`
18
+ * - provide the HTTP interceptor `activityInterceptor`
19
+ *
20
+ * The tracking will be entirely disabled for SSR.
21
+ */
22
+ export declare class NetworkActivityService {
23
+ private progress;
24
+ private readonly isBrowser;
25
+ /**
26
+ * Count pending requests
27
+ */
28
+ private pending;
29
+ private readonly writableErrors;
30
+ /**
31
+ * GraphQL errors that happened recently
32
+ */
33
+ readonly errors: import("@angular/core").Signal<GraphQLFormattedError[]>;
34
+ setProgressRef(progressBar: ProgressBar): void;
35
+ /**
36
+ * Notify an XHR started
37
+ */
38
+ increase(): void;
39
+ /**
40
+ * Notify an XHR ended (even if unsuccessful)
41
+ */
42
+ decrease(): void;
43
+ /**
44
+ * Add new GraphQL errors
45
+ */
46
+ addErrors(errors: readonly GraphQLFormattedError[]): void;
47
+ /**
48
+ * Clear all GraphQL errors
49
+ */
50
+ clearErrors(): void;
51
+ static ɵfac: i0.ɵɵFactoryDeclaration<NetworkActivityService, never>;
52
+ static ɵprov: i0.ɵɵInjectableDeclaration<NetworkActivityService>;
53
+ }
54
+ export {};
@@ -4,7 +4,7 @@ import { UntypedModelService } from '../types/types';
4
4
  /**
5
5
  * Returns an async validator function that checks that the form control value is unique
6
6
  */
7
- export declare function unique<TService extends UntypedModelService>(fieldName: string, excludedId: string | null | undefined, modelService: TService): AsyncValidatorFn;
7
+ export declare function unique(fieldName: string, excludedId: string | null | undefined, modelService: UntypedModelService): AsyncValidatorFn;
8
8
  /**
9
9
  * Returns an async validator function that checks that the form control value is available
10
10
  *
@@ -1,4 +1,4 @@
1
- import { EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
1
+ import { OnChanges, SimpleChanges } from '@angular/core';
2
2
  import { AvailableColumn, Button } from './types';
3
3
  import { ThemePalette } from '@angular/material/core';
4
4
  import * as i0 from "@angular/core";
@@ -24,7 +24,7 @@ export declare class NaturalColumnsPickerComponent implements OnChanges {
24
24
  /**
25
25
  * Emit a list of valid and selected column keys whenever the selection changes
26
26
  */
27
- readonly selectionChange: EventEmitter<string[]>;
27
+ readonly selectionChange: import("@angular/core").OutputEmitterRef<string[]>;
28
28
  /**
29
29
  * Displayed options in the dropdown menu
30
30
  */
@@ -1,6 +1,6 @@
1
- import { Provider } from '@angular/core';
1
+ import { EnvironmentProviders, Provider } from '@angular/core';
2
2
  import { NaturalSeoConfig } from './seo.service';
3
3
  /**
4
4
  * Configure and starts `NaturalSeoService`
5
5
  */
6
- export declare function provideSeo(config: NaturalSeoConfig): Provider[];
6
+ export declare function provideSeo(config: NaturalSeoConfig): (EnvironmentProviders | Provider)[];
@@ -7,6 +7,7 @@ export type TypeSelectNaturalConfiguration<TService extends UntypedModelService>
7
7
  service: TService;
8
8
  placeholder: string;
9
9
  filter?: ExtractVall<TService>['filter'];
10
+ pageSize?: number;
10
11
  };
11
12
  export declare class TypeNaturalSelectComponent<TService extends UntypedModelService> extends AbstractAssociationSelectComponent<TypeSelectNaturalConfiguration<TService>> {
12
13
  getCondition(): FilterGroupConditionField;
@@ -24,7 +24,7 @@ export type TypeSelectConfiguration = {
24
24
  export declare class TypeSelectComponent implements DropdownComponent, AfterViewInit {
25
25
  private readonly destroyRef;
26
26
  readonly renderedValue: BehaviorSubject<string>;
27
- list: MatSelectionList;
27
+ readonly list: import("@angular/core").Signal<MatSelectionList | undefined>;
28
28
  requireValueCtrl: boolean;
29
29
  readonly operators: readonly import("../types").PossibleDiscreteOperator[];
30
30
  readonly operatorCtrl: FormControl<PossibleDiscreteOperatorKeys>;
@@ -1,4 +1,4 @@
1
- import { ElementRef, EventEmitter, OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core';
1
+ import { ElementRef, OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core';
2
2
  import { NaturalFileService } from './file.service';
3
3
  import * as i0 from "@angular/core";
4
4
  export type InvalidFile = {
@@ -62,17 +62,19 @@ export declare abstract class NaturalAbstractFile implements OnInit, OnDestroy,
62
62
  * and the second upload should not be confused with the first one.
63
63
  */
64
64
  broadcast: boolean;
65
+ private readonly fileChange$;
65
66
  /**
66
67
  * The single valid file that has been selected.
67
68
  *
68
69
  * It is for convenience of use, and will only emit if there is at least one
69
70
  * valid file. See `filesChange` for a more complete output.
70
71
  */
71
- readonly fileChange: EventEmitter<File>;
72
+ readonly fileChange: import("@angular/core").OutputRef<File>;
73
+ private readonly filesChange$;
72
74
  /**
73
75
  * The list of files that have been selected.
74
76
  */
75
- readonly filesChange: EventEmitter<FileSelection>;
77
+ readonly filesChange: import("@angular/core").OutputRef<FileSelection>;
76
78
  constructor(element: ElementRef<HTMLElement>, naturalFileService: NaturalFileService, document: Document);
77
79
  ngOnDestroy(): void;
78
80
  ngOnInit(): void;
@@ -88,6 +90,7 @@ export declare abstract class NaturalAbstractFile implements OnInit, OnDestroy,
88
90
  private beforeSelect;
89
91
  onChange(event: Event): void;
90
92
  private validate;
93
+ protected hasObservers(): boolean;
91
94
  static ɵfac: i0.ɵɵFactoryDeclaration<NaturalAbstractFile, never>;
92
95
  static ɵdir: i0.ɵɵDirectiveDeclaration<NaturalAbstractFile, never, never, { "multiple": { "alias": "multiple"; "required": false; }; "accept": { "alias": "accept"; "required": false; }; "maxSize": { "alias": "maxSize"; "required": false; }; "fileSelectionDisabled": { "alias": "fileSelectionDisabled"; "required": false; }; "selectable": { "alias": "selectable"; "required": false; }; "broadcast": { "alias": "broadcast"; "required": false; }; }, { "fileChange": "fileChange"; "filesChange": "filesChange"; }, never, never, true, never>;
93
96
  }
@@ -1,4 +1,4 @@
1
- import { EventEmitter, OnChanges, OnInit, SimpleChanges } from '@angular/core';
1
+ import { OnChanges, OnInit, SimpleChanges } from '@angular/core';
2
2
  import { AbstractControl } from '@angular/forms';
3
3
  import { Observable } from 'rxjs';
4
4
  import { FileModel } from '../types';
@@ -7,7 +7,7 @@ export declare class NaturalFileComponent implements OnInit, OnChanges {
7
7
  private readonly naturalFileService;
8
8
  private readonly alertService;
9
9
  private readonly document;
10
- height: import("@angular/core").InputSignal<number>;
10
+ readonly height: import("@angular/core").InputSignal<number>;
11
11
  readonly iconHeight: import("@angular/core").Signal<number>;
12
12
  readonly fontSize: import("@angular/core").Signal<number>;
13
13
  action: 'upload' | 'download' | null;
@@ -44,7 +44,7 @@ export declare class NaturalFileComponent implements OnInit, OnChanges {
44
44
  * This **must not** be used to mutate the server, because it is very likely it will never be called if the
45
45
  * human navigates away from the page before the upload is finished. Instead, you should use `[uploader]`.
46
46
  */
47
- readonly modelChange: EventEmitter<FileModel>;
47
+ readonly modelChange: import("@angular/core").OutputEmitterRef<FileModel>;
48
48
  imagePreview: string;
49
49
  filePreview: string | null;
50
50
  ngOnChanges(changes: SimpleChanges): void;
@@ -1,4 +1,4 @@
1
- import { EventEmitter, OnInit } from '@angular/core';
1
+ import { OnInit } from '@angular/core';
2
2
  import { NaturalAbstractFile } from './abstract-file';
3
3
  import * as i0 from "@angular/core";
4
4
  /**
@@ -20,14 +20,13 @@ export declare class NaturalFileDropDirective extends NaturalAbstractFile implem
20
20
  /**
21
21
  * Emits whenever files are being dragged over
22
22
  */
23
- readonly fileOver: EventEmitter<boolean>;
23
+ readonly fileOver: import("@angular/core").OutputEmitterRef<boolean>;
24
24
  private readonly rawFileOver;
25
25
  ngOnInit(): void;
26
26
  onDrop(event: DragEvent): void;
27
27
  onDragOver(event: DragEvent): void;
28
28
  private closeDrags;
29
29
  onDragLeave(event: DragEvent): void;
30
- private hasObservers;
31
30
  static ɵfac: i0.ɵɵFactoryDeclaration<NaturalFileDropDirective, never>;
32
31
  static ɵdir: i0.ɵɵDirectiveDeclaration<NaturalFileDropDirective, ":not([naturalFileSelect])[naturalFileDrop]", never, {}, { "fileOver": "fileOver"; }, never, never, true, never>;
33
32
  }
@@ -1,4 +1,3 @@
1
- import { EventEmitter } from '@angular/core';
2
1
  import { FormGroup } from '@angular/forms';
3
2
  import * as i0 from "@angular/core";
4
3
  type Model = {
@@ -14,8 +13,8 @@ export declare class NaturalFixedButtonDetailComponent {
14
13
  set model(value: Model);
15
14
  private _model;
16
15
  form: FormGroup;
17
- readonly create: EventEmitter<void>;
18
- readonly delete: EventEmitter<void>;
16
+ readonly create: import("@angular/core").OutputEmitterRef<void>;
17
+ readonly delete: import("@angular/core").OutputEmitterRef<void>;
19
18
  constructor();
20
19
  clickCreate(): void;
21
20
  clickDelete(): void;
@@ -7,7 +7,7 @@ export type HierarchicModel = {
7
7
  export declare class HierarchicModelNode {
8
8
  readonly model: HierarchicModel;
9
9
  readonly config: NaturalHierarchicConfiguration;
10
- childrenChange: BehaviorSubject<HierarchicModelNode[]>;
10
+ readonly childrenChange: BehaviorSubject<HierarchicModelNode[]>;
11
11
  constructor(model: HierarchicModel, config: NaturalHierarchicConfiguration);
12
12
  get children(): HierarchicModelNode[];
13
13
  }
@@ -1,6 +1,6 @@
1
1
  import { SelectionModel } from '@angular/cdk/collections';
2
2
  import { FlatTreeControl } from '@angular/cdk/tree';
3
- import { EventEmitter, OnChanges, OnInit, SimpleChanges } from '@angular/core';
3
+ import { OnChanges, OnInit, SimpleChanges } from '@angular/core';
4
4
  import { MatTreeFlatDataSource, MatTreeFlattener } from '@angular/material/tree';
5
5
  import { NaturalSearchFacets } from '../../search/types/facet';
6
6
  import { NaturalSearchSelections } from '../../search/types/values';
@@ -49,7 +49,7 @@ export declare class NaturalHierarchicSelectorComponent implements OnInit, OnCha
49
49
  /**
50
50
  * Emits when natural-search selections change
51
51
  */
52
- readonly searchSelectionChange: EventEmitter<NaturalSearchSelections>;
52
+ readonly searchSelectionChange: import("@angular/core").OutputEmitterRef<NaturalSearchSelections>;
53
53
  /**
54
54
  * Inner representation of selected @Input() to allow flat listing as mat-chip.
55
55
  */
@@ -58,7 +58,7 @@ export declare class NaturalHierarchicSelectorComponent implements OnInit, OnCha
58
58
  * Emits selection change
59
59
  * Returns a Literal where selected models are organized by key
60
60
  */
61
- readonly selectionChange: EventEmitter<OrganizedModelSelection>;
61
+ readonly selectionChange: import("@angular/core").OutputEmitterRef<OrganizedModelSelection>;
62
62
  /**
63
63
  * Controller for nodes selection
64
64
  */
@@ -1,4 +1,4 @@
1
- import { Provider } from '@angular/core';
1
+ import { EnvironmentProviders, Provider } from '@angular/core';
2
2
  import { NaturalIconsConfig } from './icon.directive';
3
3
  /**
4
4
  * Configure Material Symbols, instead of Material Icons, and configure custom Natural icons.
@@ -6,4 +6,4 @@ import { NaturalIconsConfig } from './icon.directive';
6
6
  * This means that `https://fonts.googleapis.com/icon?family=Material+Icons` must be
7
7
  * replaced by `https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:FILL@1`.
8
8
  */
9
- export declare function provideIcons(config: NaturalIconsConfig): Provider[];
9
+ export declare function provideIcons(config: NaturalIconsConfig): (EnvironmentProviders | Provider)[];
@@ -61,8 +61,7 @@ export declare class NaturalPanelsService {
61
61
  constructor();
62
62
  start(route: ActivatedRoute): void;
63
63
  /**
64
- * Uses given configuration to add in the end of current url
65
- * Neutralizes router error handling
64
+ * Uses given configuration to add at the end of current url
66
65
  */
67
66
  private appendConfigToCurrentUrl;
68
67
  stop(): void;
@@ -1,4 +1,4 @@
1
- import { EventEmitter, OnChanges, OnInit, TemplateRef } from '@angular/core';
1
+ import { OnChanges, OnInit, TemplateRef } from '@angular/core';
2
2
  import { PageEvent } from '@angular/material/paginator';
3
3
  import { NaturalDataSource, PaginatedData } from '../../classes/data-source';
4
4
  import { QueryVariables } from '../../classes/query-variable-manager';
@@ -23,8 +23,8 @@ export declare class NaturalRelationsComponent<TService extends NaturalAbstractM
23
23
  private readonly destroyRef;
24
24
  private readonly linkMutationService;
25
25
  private readonly hierarchicSelectorDialog;
26
- private select?;
27
- itemTemplate?: TemplateRef<unknown>;
26
+ private readonly select;
27
+ readonly itemTemplate: import("@angular/core").Signal<TemplateRef<unknown> | undefined>;
28
28
  private _service;
29
29
  get service(): TService;
30
30
  set service(service: TService);
@@ -55,7 +55,7 @@ export declare class NaturalRelationsComponent<TService extends NaturalAbstractM
55
55
  /**
56
56
  * Emits after relations were successfully added on the server
57
57
  */
58
- readonly selectionChange: EventEmitter<void>;
58
+ readonly selectionChange: import("@angular/core").OutputEmitterRef<void>;
59
59
  /**
60
60
  * Filters for hierarchic selector
61
61
  */
@@ -1,6 +1,6 @@
1
1
  import { AnimationEvent } from '@angular/animations';
2
2
  import { BasePortalOutlet, CdkPortalOutlet, ComponentPortal, TemplatePortal } from '@angular/cdk/portal';
3
- import { ComponentRef, EmbeddedViewRef, InjectionToken, OnDestroy, TemplateRef } from '@angular/core';
3
+ import { ComponentRef, EmbeddedViewRef, InjectionToken, OnDestroy } from '@angular/core';
4
4
  import { Subject } from 'rxjs';
5
5
  import * as i0 from "@angular/core";
6
6
  export declare function throwMatDialogContentAlreadyAttachedError(): void;
@@ -12,8 +12,7 @@ export declare class NaturalDropdownContainerComponent extends BasePortalOutlet
12
12
  private readonly elementRef;
13
13
  private readonly focusTrapFactory;
14
14
  readonly data: NaturalDropdownContainerData;
15
- portalOutlet: CdkPortalOutlet;
16
- templateRef: TemplateRef<any>;
15
+ readonly portalOutlet: import("@angular/core").Signal<CdkPortalOutlet>;
17
16
  readonly closed: Subject<void>;
18
17
  /** Current state of the panel animation. */
19
18
  panelAnimationState: 'void' | 'enter';
@@ -1,17 +1,16 @@
1
- import { EventEmitter } from '@angular/core';
2
1
  import { NaturalInputComponent } from '../input/input.component';
3
2
  import { NaturalSearchFacets } from '../types/facet';
4
3
  import { GroupSelections, NaturalSearchSelection } from '../types/values';
5
4
  import * as i0 from "@angular/core";
6
5
  export declare class NaturalGroupComponent {
7
- newValueInput: NaturalInputComponent;
6
+ readonly newValueInput: import("@angular/core").Signal<NaturalInputComponent>;
8
7
  /**
9
8
  * Text display in the dropdown to select the facet
10
9
  */
11
10
  dropdownTitle: string;
12
11
  placeholder: string;
13
12
  facets: NaturalSearchFacets;
14
- readonly selectionChange: EventEmitter<GroupSelections>;
13
+ readonly selectionChange: import("@angular/core").OutputEmitterRef<GroupSelections>;
15
14
  innerSelections: GroupSelections;
16
15
  set selections(selection: GroupSelections);
17
16
  updateInput(selection: NaturalSearchSelection, index: number): void;
@@ -1,4 +1,4 @@
1
- import { ElementRef, EventEmitter, OnChanges, OnDestroy, OnInit } from '@angular/core';
1
+ import { ElementRef, OnChanges, OnDestroy, OnInit } from '@angular/core';
2
2
  import { FormControl } from '@angular/forms';
3
3
  import { ErrorStateMatcher, MatRipple } from '@angular/material/core';
4
4
  import { Facet, NaturalSearchFacets } from '../types/facet';
@@ -14,11 +14,11 @@ export declare class NaturalInputComponent implements OnInit, OnChanges, OnDestr
14
14
  /**
15
15
  * Controls the ripple effect, used when opening a dropdown
16
16
  */
17
- ripple: MatRipple;
17
+ readonly ripple: import("@angular/core").Signal<MatRipple>;
18
18
  /**
19
19
  * Native element ref for <input> related to this <natural-input> component
20
20
  */
21
- input: ElementRef<HTMLInputElement>;
21
+ readonly input: import("@angular/core").Signal<ElementRef<HTMLInputElement>>;
22
22
  /**
23
23
  * Label for this field
24
24
  */
@@ -42,11 +42,11 @@ export declare class NaturalInputComponent implements OnInit, OnChanges, OnDestr
42
42
  /**
43
43
  * Emits when user a added/updated/deleted a search (from global context or from facet)
44
44
  */
45
- readonly selectionChange: EventEmitter<NaturalSearchSelection>;
45
+ readonly selectionChange: import("@angular/core").OutputEmitterRef<NaturalSearchSelection>;
46
46
  /**
47
47
  * Emits when user removes the search by pressing the cross icon
48
48
  */
49
- readonly cleared: EventEmitter<NaturalInputComponent>;
49
+ readonly cleared: import("@angular/core").OutputEmitterRef<NaturalInputComponent>;
50
50
  /**
51
51
  * Selected facet from the list of available facets
52
52
  */
@@ -1,4 +1,4 @@
1
- import { EventEmitter, OnChanges } from '@angular/core';
1
+ import { 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";
@@ -23,7 +23,7 @@ export declare class NaturalSearchComponent implements OnChanges {
23
23
  /**
24
24
  * Emits when some selection has been setted by the user
25
25
  */
26
- readonly selectionChange: EventEmitter<NaturalSearchSelections>;
26
+ readonly selectionChange: import("@angular/core").OutputEmitterRef<NaturalSearchSelections>;
27
27
  /**
28
28
  * Cleaned inputted selections. Allow valid selections to be manipulated inside component
29
29
  */
@@ -1,4 +1,4 @@
1
- import { DoCheck, EventEmitter, OnInit } from '@angular/core';
1
+ import { DoCheck, OnInit } from '@angular/core';
2
2
  import { ControlValueAccessor, FormControl, NgControl } from '@angular/forms';
3
3
  import { ErrorStateMatcher } from '@angular/material/core';
4
4
  import * as i0 from "@angular/core";
@@ -57,11 +57,11 @@ export declare abstract class AbstractSelect<TValue, TInput> implements OnInit,
57
57
  /**
58
58
  * Emit the selected value whenever it changes
59
59
  */
60
- readonly selectionChange: EventEmitter<TValue | null>;
60
+ readonly selectionChange: import("@angular/core").OutputEmitterRef<TValue | null>;
61
61
  /**
62
62
  * Emits when internal input is blurred
63
63
  */
64
- readonly blur: EventEmitter<void>;
64
+ readonly blur: import("@angular/core").OutputEmitterRef<void>;
65
65
  /**
66
66
  * Contains internal representation for current selection AND searched text (for autocomplete)
67
67
  *
@@ -43,8 +43,8 @@ type ValueTypeFor<TService> = string | ExtractTallOne<TService>;
43
43
  */
44
44
  export declare class NaturalSelectComponent<TService extends NaturalAbstractModelService<any, any, PaginatedData<Literal>, QueryVariables, any, any, any, any, any, any>> extends AbstractSelect<ValueTypeFor<TService>, ValueTypeFor<TService>> implements OnInit, ControlValueAccessor, AfterViewInit {
45
45
  private readonly destroyRef;
46
- autoTrigger: MatAutocompleteTrigger;
47
- itemTemplate?: TemplateRef<any>;
46
+ readonly autoTrigger: import("@angular/core").Signal<MatAutocompleteTrigger>;
47
+ readonly itemTemplate: import("@angular/core").Signal<TemplateRef<any> | undefined>;
48
48
  /**
49
49
  * Service with watchAll function that accepts queryVariables.
50
50
  */
@@ -87,7 +87,7 @@ export declare class NaturalSelectComponent<TService extends NaturalAbstractMode
87
87
  /**
88
88
  * Default page size
89
89
  */
90
- private pageSize;
90
+ pageSize: number;
91
91
  /**
92
92
  * Init search options
93
93
  */
@@ -130,6 +130,6 @@ export declare class NaturalSelectComponent<TService extends NaturalAbstractMode
130
130
  private getSearchFilter;
131
131
  getVariablesForDebug(): Readonly<QueryVariables> | undefined;
132
132
  static ɵfac: i0.ɵɵFactoryDeclaration<NaturalSelectComponent<any>, never>;
133
- static ɵcmp: i0.ɵɵComponentDeclaration<NaturalSelectComponent<any>, "natural-select", never, { "service": { "alias": "service"; "required": true; }; "optionRequired": { "alias": "optionRequired"; "required": false; }; "searchField": { "alias": "searchField"; "required": false; }; "searchOperator": { "alias": "searchOperator"; "required": false; }; "filter": { "alias": "filter"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, {}, ["itemTemplate"], never, true, never>;
133
+ static ɵcmp: i0.ɵɵComponentDeclaration<NaturalSelectComponent<any>, "natural-select", never, { "service": { "alias": "service"; "required": true; }; "optionRequired": { "alias": "optionRequired"; "required": false; }; "searchField": { "alias": "searchField"; "required": false; }; "searchOperator": { "alias": "searchOperator"; "required": false; }; "filter": { "alias": "filter"; "required": false; }; "pageSize": { "alias": "pageSize"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, {}, ["itemTemplate"], never, true, never>;
134
134
  }
135
135
  export {};
@@ -29,7 +29,7 @@ export declare class NaturalSidenavContainerComponent implements OnInit, OnDestr
29
29
  /**
30
30
  * Inner "native" material sidenav
31
31
  */
32
- menuSidenav: MatSidenav;
32
+ readonly menuSidenav: import("@angular/core").Signal<MatSidenav>;
33
33
  get isMinimized(): boolean;
34
34
  get isMobileView(): boolean;
35
35
  ngOnInit(): void;
@@ -1,6 +1,7 @@
1
- import { EventEmitter, OnChanges } from '@angular/core';
1
+ import { OnChanges } from '@angular/core';
2
2
  import { Params, QueryParamsHandling, RouterLink } from '@angular/router';
3
3
  import { ThemePalette } from '@angular/material/core';
4
+ import { Subject } from 'rxjs';
4
5
  import * as i0 from "@angular/core";
5
6
  /**
6
7
  * Button that fits well in a `<mat-table>` and support either
@@ -24,7 +25,8 @@ export declare class NaturalTableButtonComponent implements OnChanges {
24
25
  disabled: boolean;
25
26
  raised: boolean;
26
27
  color: ThemePalette;
27
- readonly buttonClick: EventEmitter<MouseEvent>;
28
+ protected readonly buttonClick$: Subject<MouseEvent>;
29
+ readonly buttonClick: import("@angular/core").OutputRef<MouseEvent>;
28
30
  type: 'routerLink' | 'href' | 'click' | 'none';
29
31
  ngOnChanges(): void;
30
32
  static ɵfac: i0.ɵɵFactoryDeclaration<NaturalTableButtonComponent, never>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ecodev/natural",
3
- "version": "62.1.2",
3
+ "version": "63.1.0",
4
4
  "license": "MIT",
5
5
  "repository": "github:Ecodev/natural",
6
6
  "sideEffects": false,
@@ -8,31 +8,33 @@
8
8
  ".": {
9
9
  "sass": "./theming/_natural.theme.scss",
10
10
  "types": "./index.d.ts",
11
- "esm2022": "./esm2022/ecodev-natural.mjs",
12
- "esm": "./esm2022/ecodev-natural.mjs",
13
11
  "default": "./fesm2022/ecodev-natural.mjs"
14
12
  },
15
13
  "./package.json": {
16
14
  "default": "./package.json"
15
+ },
16
+ "./vanilla": {
17
+ "types": "./vanilla/index.d.ts",
18
+ "default": "./fesm2022/ecodev-natural-vanilla.mjs"
17
19
  }
18
20
  },
19
21
  "dependencies": {
20
22
  "extract-files": "^13.0.0",
21
- "tslib": "^2.5.3"
23
+ "tslib": "^2.8.1"
22
24
  },
23
25
  "peerDependencies": {
24
- "@angular/animations": "^18.1.0",
25
- "@angular/cdk": "^18.1.0",
26
- "@angular/common": "^18.1.0",
27
- "@angular/core": "^18.1.0",
28
- "@angular/forms": "^18.1.0",
29
- "@angular/localize": "^18.1.0",
30
- "@angular/material": "^18.1.0",
31
- "@angular/platform-browser": "^18.1.0",
32
- "@angular/router": "^18.1.0",
26
+ "@angular/animations": "^19.2.0",
27
+ "@angular/cdk": "^19.2.0",
28
+ "@angular/common": "^19.2.0",
29
+ "@angular/core": "^19.2.0",
30
+ "@angular/forms": "^19.2.0",
31
+ "@angular/localize": "^19.2.0",
32
+ "@angular/material": "^19.2.0",
33
+ "@angular/platform-browser": "^19.2.0",
34
+ "@angular/router": "^19.2.0",
33
35
  "apollo-angular": "^10.0.0",
34
36
  "lodash-es": "^4.17.21",
35
- "rxjs": "^7.8.1"
37
+ "rxjs": "^7.8.2"
36
38
  },
37
39
  "module": "fesm2022/ecodev-natural.mjs",
38
40
  "typings": "index.d.ts"
package/public-api.d.ts CHANGED
@@ -8,6 +8,7 @@ export * from './lib/classes/query-variable-manager';
8
8
  export { cancellableTimeout, debug } from './lib/classes/rxjs';
9
9
  export * from './lib/classes/utility';
10
10
  export * from './lib/classes/validators';
11
+ export { NetworkActivityService, activityInterceptor } from './lib/classes/network-activity.service';
11
12
  export { validTlds } from './lib/classes/tld';
12
13
  export * from './lib/services/abstract-model.service';
13
14
  export { NaturalDebounceService } from './lib/services/debounce.service';
@@ -58,8 +58,7 @@ $defaultConfig: mat.m2-define-typography-config();
58
58
 
59
59
  // This is the default Material typography, but with button with normal letter-spacing instead of wider letter-spacing.
60
60
  $typography: mat.m2-define-typography-config(
61
- $button:
62
- mat.m2-define-typography-level(
61
+ $button: mat.m2-define-typography-level(
63
62
  $font-family: mat.m2-font-family($defaultConfig, 'button'),
64
63
  $font-weight: mat.m2-font-weight($defaultConfig, 'button'),
65
64
  $font-size: mat.m2-font-size($defaultConfig, 'button'),
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ /// <amd-module name="@ecodev/natural/vanilla" />
5
+ export * from './public-api';
@@ -0,0 +1,3 @@
1
+ {
2
+ "module": "../fesm2022/ecodev-natural-vanilla.mjs"
3
+ }
@@ -0,0 +1,11 @@
1
+ /**
2
+ * **DO NOT MODIFY UNLESS STRICTLY REQUIRED FOR VANILLA**
3
+ *
4
+ * This is a minimal service specialized for Vanilla and any modification,
5
+ * including adding `import` in this file, might break https://navigations.ichtus.club.
6
+ */
7
+ export { NaturalQueryVariablesManager } from './src/lib/classes/query-variable-manager';
8
+ export type { Literal } from './src/lib/types/types';
9
+ export { graphqlQuerySigner } from './src/lib/classes/signing';
10
+ export { formatIsoDateTime } from './src/lib/classes/utility';
11
+ export { NaturalAbstractModelService, type FormValidators } from './src/lib/services/abstract-model.service';
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Thin wrapper around browsers' native SubtleCrypto for convenience of use
3
+ */
4
+ export declare function sha256(message: string): Promise<string>;
5
+ /**
6
+ * Thin wrapper around browsers' native SubtleCrypto for convenience of use
7
+ */
8
+ export declare function hmacSha256(secret: string, payload: string): Promise<string>;
@@ -0,0 +1,32 @@
1
+ import { DataSource } from '@angular/cdk/collections';
2
+ import { Observable } from 'rxjs';
3
+ import { Literal } from '../types/types';
4
+ export type PaginatedData<T> = {
5
+ readonly items: readonly T[];
6
+ readonly offset?: number | null;
7
+ readonly pageSize: number;
8
+ readonly pageIndex: number;
9
+ readonly length: number;
10
+ };
11
+ /**
12
+ * A NaturalDataSource will connect immediately, in order to know as soon as possible if
13
+ * we need to show a template at all (as seen in my-ichtus)
14
+ *
15
+ * It also allow some extra data manipulation
16
+ */
17
+ export declare class NaturalDataSource<T extends PaginatedData<Literal> = PaginatedData<Literal>> extends DataSource<T['items'][0]> {
18
+ private readonly ngUnsubscribe;
19
+ private readonly internalData;
20
+ constructor(value: Observable<T> | T);
21
+ get internalDataObservable(): Observable<T | null>;
22
+ /**
23
+ * Array of data that should be rendered by the table, where each object represents one row.
24
+ */
25
+ get data(): T | null;
26
+ set data(data: T | null);
27
+ connect(): Observable<T['items']>;
28
+ disconnect(): void;
29
+ push(item: T['items'][0]): void;
30
+ pop(): T['items'][0] | undefined;
31
+ remove(item: T['items'][0]): void;
32
+ }
@@ -0,0 +1,2 @@
1
+ import { Literal } from '../types/types';
2
+ export declare function hasMixedGroupLogic(groups: Literal[]): boolean;