@ecodev/natural 63.9.1 → 64.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 (160) hide show
  1. package/fesm2022/ecodev-natural-vanilla.mjs +3 -3
  2. package/fesm2022/ecodev-natural-vanilla.mjs.map +1 -1
  3. package/fesm2022/ecodev-natural.mjs +520 -650
  4. package/fesm2022/ecodev-natural.mjs.map +1 -1
  5. package/index.d.ts +4264 -3
  6. package/package.json +10 -10
  7. package/src/lib/modules/sidenav/_sidenav.theme.scss +1 -1
  8. package/vanilla/index.d.ts +418 -3
  9. package/lib/classes/abstract-detail.d.ts +0 -108
  10. package/lib/classes/abstract-editable-list.d.ts +0 -70
  11. package/lib/classes/abstract-list.d.ts +0 -191
  12. package/lib/classes/abstract-navigable-list.d.ts +0 -54
  13. package/lib/classes/apollo-utils.d.ts +0 -18
  14. package/lib/classes/crypto.d.ts +0 -8
  15. package/lib/classes/cumulative-changes.d.ts +0 -27
  16. package/lib/classes/data-source.d.ts +0 -32
  17. package/lib/classes/network-activity.service.d.ts +0 -54
  18. package/lib/classes/providers.d.ts +0 -5
  19. package/lib/classes/query-variable-manager-utils.d.ts +0 -2
  20. package/lib/classes/query-variable-manager.d.ts +0 -91
  21. package/lib/classes/rxjs.d.ts +0 -42
  22. package/lib/classes/signing.d.ts +0 -7
  23. package/lib/classes/tld.d.ts +0 -10
  24. package/lib/classes/utility.d.ts +0 -85
  25. package/lib/classes/validators.d.ts +0 -72
  26. package/lib/directives/http-prefix.directive.d.ts +0 -15
  27. package/lib/modules/alert/alert.service.d.ts +0 -21
  28. package/lib/modules/alert/confirm.component.d.ts +0 -12
  29. package/lib/modules/alert/public-api.d.ts +0 -2
  30. package/lib/modules/avatar/component/avatar.component.d.ts +0 -37
  31. package/lib/modules/avatar/public-api.d.ts +0 -2
  32. package/lib/modules/avatar/service/avatar.service.d.ts +0 -24
  33. package/lib/modules/avatar/sources/gravatar.d.ts +0 -8
  34. package/lib/modules/avatar/sources/image.d.ts +0 -8
  35. package/lib/modules/avatar/sources/initials.d.ts +0 -8
  36. package/lib/modules/avatar/sources/source.d.ts +0 -23
  37. package/lib/modules/columns-picker/columns-picker.component.d.ts +0 -45
  38. package/lib/modules/columns-picker/public-api.d.ts +0 -2
  39. package/lib/modules/columns-picker/types.d.ts +0 -84
  40. package/lib/modules/common/directives/background-density.directive.d.ts +0 -37
  41. package/lib/modules/common/directives/linkable-tab.directive.d.ts +0 -29
  42. package/lib/modules/common/directives/src-density.directive.d.ts +0 -33
  43. package/lib/modules/common/pipes/capitalize.pipe.d.ts +0 -10
  44. package/lib/modules/common/pipes/ellipsis.pipe.d.ts +0 -7
  45. package/lib/modules/common/pipes/enum.pipe.d.ts +0 -14
  46. package/lib/modules/common/pipes/time-ago.pipe.d.ts +0 -18
  47. package/lib/modules/common/public-api.d.ts +0 -11
  48. package/lib/modules/common/services/memory-storage.d.ts +0 -46
  49. package/lib/modules/common/services/seo.provider.d.ts +0 -6
  50. package/lib/modules/common/services/seo.service.d.ts +0 -148
  51. package/lib/modules/detail-header/detail-header.component.d.ts +0 -43
  52. package/lib/modules/detail-header/public-api.d.ts +0 -1
  53. package/lib/modules/dialog-trigger/dialog-trigger.component.d.ts +0 -37
  54. package/lib/modules/dialog-trigger/public-api.d.ts +0 -1
  55. package/lib/modules/dropdown-components/abstract-association-select-component.directive.d.ts +0 -34
  56. package/lib/modules/dropdown-components/public-api.d.ts +0 -10
  57. package/lib/modules/dropdown-components/type-boolean/type-boolean.component.d.ts +0 -12
  58. package/lib/modules/dropdown-components/type-date/type-date.component.d.ts +0 -36
  59. package/lib/modules/dropdown-components/type-date-range/type-date-range.component.d.ts +0 -43
  60. package/lib/modules/dropdown-components/type-hierarchic-selector/type-hierarchic-selector.component.d.ts +0 -31
  61. package/lib/modules/dropdown-components/type-natural-select/type-natural-select.component.d.ts +0 -18
  62. package/lib/modules/dropdown-components/type-number/type-number.component.d.ts +0 -36
  63. package/lib/modules/dropdown-components/type-options/type-options.component.d.ts +0 -29
  64. package/lib/modules/dropdown-components/type-select/type-select.component.d.ts +0 -59
  65. package/lib/modules/dropdown-components/type-text/type-text.component.d.ts +0 -26
  66. package/lib/modules/dropdown-components/types.d.ts +0 -13
  67. package/lib/modules/dropdown-components/utils.d.ts +0 -14
  68. package/lib/modules/file/abstract-file.d.ts +0 -95
  69. package/lib/modules/file/component/file.component.d.ts +0 -58
  70. package/lib/modules/file/file-drop.directive.d.ts +0 -32
  71. package/lib/modules/file/file-select.directive.d.ts +0 -15
  72. package/lib/modules/file/file.service.d.ts +0 -19
  73. package/lib/modules/file/public-api.d.ts +0 -6
  74. package/lib/modules/file/types.d.ts +0 -7
  75. package/lib/modules/file/utils.d.ts +0 -8
  76. package/lib/modules/fixed-button/fixed-button.component.d.ts +0 -11
  77. package/lib/modules/fixed-button/public-api.d.ts +0 -1
  78. package/lib/modules/fixed-button-detail/fixed-button-detail.component.d.ts +0 -24
  79. package/lib/modules/fixed-button-detail/public-api.d.ts +0 -1
  80. package/lib/modules/hierarchic-selector/classes/flat-node.d.ts +0 -11
  81. package/lib/modules/hierarchic-selector/classes/hierarchic-configuration.d.ts +0 -56
  82. package/lib/modules/hierarchic-selector/classes/hierarchic-filters-configuration.d.ts +0 -7
  83. package/lib/modules/hierarchic-selector/classes/model-node.d.ts +0 -13
  84. package/lib/modules/hierarchic-selector/hierarchic-selector/hierarchic-selector.component.d.ts +0 -161
  85. package/lib/modules/hierarchic-selector/hierarchic-selector/hierarchic-selector.service.d.ts +0 -76
  86. package/lib/modules/hierarchic-selector/hierarchic-selector-dialog/hierarchic-selector-dialog.component.d.ts +0 -59
  87. package/lib/modules/hierarchic-selector/hierarchic-selector-dialog/hierarchic-selector-dialog.service.d.ts +0 -9
  88. package/lib/modules/hierarchic-selector/public-api.d.ts +0 -6
  89. package/lib/modules/icon/icon.directive.d.ts +0 -39
  90. package/lib/modules/icon/icon.module.d.ts +0 -9
  91. package/lib/modules/icon/public-api.d.ts +0 -2
  92. package/lib/modules/logger/error-handler.d.ts +0 -52
  93. package/lib/modules/logger/error.module.d.ts +0 -3
  94. package/lib/modules/logger/public-api.d.ts +0 -3
  95. package/lib/modules/matomo/matomo.service.d.ts +0 -42
  96. package/lib/modules/matomo/public-api.d.ts +0 -1
  97. package/lib/modules/panels/abstract-panel.d.ts +0 -37
  98. package/lib/modules/panels/fallback-if-no-opened-panels.urlmatcher.d.ts +0 -6
  99. package/lib/modules/panels/panels.component.d.ts +0 -9
  100. package/lib/modules/panels/panels.module.d.ts +0 -3
  101. package/lib/modules/panels/panels.service.d.ts +0 -121
  102. package/lib/modules/panels/panels.urlmatcher.d.ts +0 -8
  103. package/lib/modules/panels/public-api.d.ts +0 -7
  104. package/lib/modules/panels/types.d.ts +0 -61
  105. package/lib/modules/relations/public-api.d.ts +0 -1
  106. package/lib/modules/relations/relations.component.d.ts +0 -123
  107. package/lib/modules/search/classes/graphql-doctrine.d.ts +0 -4
  108. package/lib/modules/search/classes/graphql-doctrine.types.d.ts +0 -83
  109. package/lib/modules/search/classes/transformers.d.ts +0 -78
  110. package/lib/modules/search/classes/url.d.ts +0 -18
  111. package/lib/modules/search/classes/utils.d.ts +0 -17
  112. package/lib/modules/search/dropdown-container/dropdown-container.component.d.ts +0 -31
  113. package/lib/modules/search/dropdown-container/dropdown-ref.d.ts +0 -13
  114. package/lib/modules/search/dropdown-container/dropdown.service.d.ts +0 -24
  115. package/lib/modules/search/facet-selector/facet-selector.component.d.ts +0 -32
  116. package/lib/modules/search/group/group.component.d.ts +0 -21
  117. package/lib/modules/search/input/input.component.d.ts +0 -110
  118. package/lib/modules/search/public-api.d.ts +0 -11
  119. package/lib/modules/search/search/search.component.d.ts +0 -44
  120. package/lib/modules/search/types/dropdown-component.d.ts +0 -20
  121. package/lib/modules/search/types/facet.d.ts +0 -75
  122. package/lib/modules/search/types/values.d.ts +0 -32
  123. package/lib/modules/select/abstract-select.component.d.ts +0 -127
  124. package/lib/modules/select/public-api.d.ts +0 -3
  125. package/lib/modules/select/select/select.component.d.ts +0 -135
  126. package/lib/modules/select/select-enum/select-enum.component.d.ts +0 -32
  127. package/lib/modules/select/select-hierarchic/select-hierarchic.component.d.ts +0 -65
  128. package/lib/modules/sidenav/public-api.d.ts +0 -5
  129. package/lib/modules/sidenav/sidenav/sidenav.component.d.ts +0 -5
  130. package/lib/modules/sidenav/sidenav-container/sidenav-container.component.d.ts +0 -45
  131. package/lib/modules/sidenav/sidenav-content/sidenav-content.component.d.ts +0 -5
  132. package/lib/modules/sidenav/sidenav-stack.service.d.ts +0 -28
  133. package/lib/modules/sidenav/sidenav.service.d.ts +0 -86
  134. package/lib/modules/stamp/public-api.d.ts +0 -1
  135. package/lib/modules/stamp/stamp.component.d.ts +0 -15
  136. package/lib/modules/table-button/public-api.d.ts +0 -1
  137. package/lib/modules/table-button/table-button.component.d.ts +0 -32
  138. package/lib/services/abstract-model.service.d.ts +0 -244
  139. package/lib/services/debounce.service.d.ts +0 -52
  140. package/lib/services/enum.service.d.ts +0 -19
  141. package/lib/services/link-mutation.service.d.ts +0 -51
  142. package/lib/services/persistence.service.d.ts +0 -50
  143. package/lib/services/swiss-parsing-date-adapter.service.d.ts +0 -16
  144. package/lib/types/types.d.ts +0 -100
  145. package/public-api.d.ts +0 -44
  146. package/vanilla/public-api.d.ts +0 -11
  147. package/vanilla/src/lib/classes/crypto.d.ts +0 -8
  148. package/vanilla/src/lib/classes/data-source.d.ts +0 -32
  149. package/vanilla/src/lib/classes/query-variable-manager-utils.d.ts +0 -2
  150. package/vanilla/src/lib/classes/query-variable-manager.d.ts +0 -91
  151. package/vanilla/src/lib/classes/signing.d.ts +0 -7
  152. package/vanilla/src/lib/classes/utility.d.ts +0 -85
  153. package/vanilla/src/lib/modules/search/classes/graphql-doctrine.types.d.ts +0 -83
  154. package/vanilla/src/lib/modules/search/classes/utils.d.ts +0 -17
  155. package/vanilla/src/lib/modules/search/types/dropdown-component.d.ts +0 -20
  156. package/vanilla/src/lib/modules/search/types/facet.d.ts +0 -75
  157. package/vanilla/src/lib/modules/search/types/values.d.ts +0 -32
  158. package/vanilla/src/lib/services/abstract-model.service.d.ts +0 -244
  159. package/vanilla/src/lib/services/debounce.service.d.ts +0 -52
  160. package/vanilla/src/lib/types/types.d.ts +0 -100
@@ -1,127 +0,0 @@
1
- import { DoCheck, OnInit } from '@angular/core';
2
- import { ControlValueAccessor, FormControl, NgControl } from '@angular/forms';
3
- import { ErrorStateMatcher } from '@angular/material/core';
4
- import * as i0 from "@angular/core";
5
- /**
6
- * This will completely ignore internal formControl and instead use the one from the component
7
- * which comes from outside of this component. This basically allows us to **not** depend on
8
- * touched status propagation between outside and inside world, and thus get rid of our legacy
9
- * custom FormControl class ("NaturalFormControl").
10
- */
11
- declare class ExternalFormControlMatcher<TValue, TInput> extends ErrorStateMatcher {
12
- private readonly component;
13
- constructor(component: AbstractSelect<TValue, TInput>);
14
- isErrorState(): boolean;
15
- }
16
- export declare abstract class AbstractSelect<TValue, TInput> implements OnInit, ControlValueAccessor, DoCheck {
17
- placeholder?: string;
18
- /**
19
- * Mat-hint, if given, and it is non-empty, then `subscriptSizing` will
20
- * automatically be set to `dynamic` to allow for long, wrapping text.
21
- */
22
- readonly hint: import("@angular/core").InputSignal<string | null | undefined>;
23
- protected readonly subscriptSizing: import("@angular/core").Signal<"dynamic" | "fixed">;
24
- /**
25
- * If given an error message, it will be displayed in a `<mat-error>`, but only if the control
26
- * is actually in an error state via one of its validators.
27
- *
28
- * This is not needed for the special case of the required validator, because the message is hardcoded.
29
- */
30
- error: string | null;
31
- /**
32
- * If the field is required
33
- */
34
- set required(value: boolean);
35
- get required(): boolean;
36
- private _required;
37
- /**
38
- * Add a suffix button that is a link to given destination
39
- */
40
- navigateTo?: any[] | string | null;
41
- /**
42
- * If provided cause a new clear button to appear
43
- */
44
- clearLabel?: string;
45
- /**
46
- * Whether to show the search icon
47
- */
48
- showIcon: boolean;
49
- /**
50
- * Icon name
51
- */
52
- icon: string;
53
- /**
54
- * Function to customize the rendering of the selected item as text in input
55
- */
56
- displayWith?: (item: TValue | null) => string;
57
- /**
58
- * Emit the selected value whenever it changes
59
- */
60
- readonly selectionChange: import("@angular/core").OutputEmitterRef<TValue | null>;
61
- /**
62
- * Emits when internal input is blurred
63
- */
64
- readonly blur: import("@angular/core").OutputEmitterRef<void>;
65
- /**
66
- * Contains internal representation for current selection AND searched text (for autocomplete)
67
- *
68
- * It is **not** necessarily `TValue | null`.
69
- *
70
- * - NaturalSelectComponent: `string | TValue | null`. We allow `string`
71
- * only when `optionRequired` is false, so most of the time it is `TValue | null`.
72
- * - NaturalSelectHierarchicComponent: `string | null`.
73
- * - NaturalSelectEnumComponent: `TValue | null`.
74
- *
75
- * In natural-select context, we use pristine and dirty to identify if the displayed value is search or committed model :
76
- * - Pristine status (unchanged value) means the model is displayed and propagated = the selection is committed
77
- * - Dirty status (changed value) means we are in search/autocomplete mode
78
- */
79
- readonly internalCtrl: FormControl<TInput | null>;
80
- /**
81
- * Interface with ControlValueAccessor
82
- * Notifies parent model / form controller
83
- */
84
- onChange?: (item: TValue | null) => void;
85
- /**
86
- * Interface with ControlValueAccessor
87
- * Notifies parent model / form controller
88
- */
89
- onTouched?: () => void;
90
- readonly matcher: ExternalFormControlMatcher<TValue, TInput>;
91
- readonly ngControl: NgControl | null;
92
- constructor();
93
- ngDoCheck(): void;
94
- writeValue(value: TInput | null): void;
95
- ngOnInit(): void;
96
- /**
97
- * Whether the value can be changed
98
- */
99
- set disabled(disabled: boolean);
100
- registerOnChange(fn: (item: TValue | null) => void): void;
101
- registerOnTouched(fn: () => void): void;
102
- abstract getDisplayFn(): (item: TValue | null) => string;
103
- /**
104
- * Commit the model to null
105
- * Emit and event to update the model
106
- */
107
- clear(): void;
108
- /**
109
- * If input is dirty (search running) restore to model value
110
- */
111
- onBlur(): void;
112
- /**
113
- * Commit the model change
114
- */
115
- propagateValue(value: TValue | null): void;
116
- setDisabledState(isDisabled: boolean): void;
117
- showClearButton(): boolean;
118
- touch(): void;
119
- hasRequiredError(): boolean;
120
- /**
121
- * Apply Validators.required on the internal form, based on ngControl or [required] attribute, giving priority to attribute.
122
- */
123
- private applyRequired;
124
- static ɵfac: i0.ɵɵFactoryDeclaration<AbstractSelect<any, any>, never>;
125
- static ɵdir: i0.ɵɵDirectiveDeclaration<AbstractSelect<any, any>, never, never, { "placeholder": { "alias": "placeholder"; "required": false; }; "hint": { "alias": "hint"; "required": false; "isSignal": true; }; "error": { "alias": "error"; "required": false; }; "required": { "alias": "required"; "required": false; }; "navigateTo": { "alias": "navigateTo"; "required": false; }; "clearLabel": { "alias": "clearLabel"; "required": false; }; "showIcon": { "alias": "showIcon"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "displayWith": { "alias": "displayWith"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "selectionChange": "selectionChange"; "blur": "blur"; }, never, never, true, never>;
126
- }
127
- export {};
@@ -1,3 +0,0 @@
1
- export * from './select-enum/select-enum.component';
2
- export * from './select-hierarchic/select-hierarchic.component';
3
- export * from './select/select.component';
@@ -1,135 +0,0 @@
1
- import { AfterViewInit, OnInit, TemplateRef } from '@angular/core';
2
- import { ControlValueAccessor } from '@angular/forms';
3
- import { MatAutocompleteTrigger } from '@angular/material/autocomplete';
4
- import { Observable } from 'rxjs';
5
- import { PaginatedData } from '../../../classes/data-source';
6
- import { QueryVariables } from '../../../classes/query-variable-manager';
7
- import { NaturalAbstractModelService } from '../../../services/abstract-model.service';
8
- import { ExtractTallOne, ExtractVall, Literal } from '../../../types/types';
9
- import { AbstractSelect } from '../abstract-select.component';
10
- import * as i0 from "@angular/core";
11
- type ValueTypeFor<TService> = string | ExtractTallOne<TService>;
12
- /**
13
- * Default usage:
14
- * ```html
15
- * <natural-select [service]="myServiceInstance" [(model)]="myModel" (modelChange)=myChangeFn($event) />
16
- * ```
17
- *
18
- * Custom template usage :
19
- * ```html
20
- * <natural-select [service]="svc" [(ngModel)]="model">
21
- * <ng-template let-item="item">
22
- * <span>{{ item.xxx }}</span>
23
- * </ng-template>
24
- * </natural-select>
25
- * ```
26
- *
27
- * `[(ngModel)]` and `(ngModelChange)` are optional.
28
- *
29
- * Placeholder :
30
- * ```html
31
- * <natural-select placeholder="my placeholder" />
32
- * ```
33
- *
34
- * Search with like %xxx% on specified field `name` instead of custom filter on whole object
35
- * ```html
36
- * <natural-select searchField="name" />
37
- * ```
38
- *
39
- * Allows to input free string without selecting an option from autocomplete suggestions
40
- * ```html
41
- * <natural-select [optionRequired]="false" />
42
- * ```
43
- */
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
- private readonly destroyRef;
46
- readonly autoTrigger: import("@angular/core").Signal<MatAutocompleteTrigger>;
47
- readonly itemTemplate: import("@angular/core").Signal<TemplateRef<any> | undefined>;
48
- /**
49
- * Service with watchAll function that accepts queryVariables.
50
- */
51
- service: TService;
52
- /**
53
- * If false, allows to input free string without selecting an option from autocomplete suggestions
54
- */
55
- optionRequired: boolean;
56
- /**
57
- * The field on which to search for, default to 'custom'.
58
- */
59
- searchField: 'custom' | string;
60
- /**
61
- * The operator with which to search for, default to 'search' if `searchField` is 'custom', else 'like'.
62
- */
63
- searchOperator: 'search' | string | null;
64
- /**
65
- * Cache the committed value during search mode.
66
- * It's used to be restored in case we cancel the selection
67
- */
68
- private lastValidValue;
69
- /**
70
- * Additional filter for query
71
- */
72
- set filter(filter: ExtractVall<TService>['filter'] | null | undefined);
73
- /**
74
- * Items returned by server to show in listing
75
- */
76
- items: null | Observable<readonly any[]>;
77
- /**
78
- * Whether we are searching something
79
- */
80
- loading: boolean;
81
- /**
82
- * If some items are not shown in result list
83
- * Shows a message after list if true
84
- */
85
- hasMoreItems: boolean;
86
- nbTotal: number;
87
- /**
88
- * Default page size
89
- */
90
- pageSize: number;
91
- /**
92
- * Init search options
93
- */
94
- private readonly variablesManager;
95
- /**
96
- * Whether the value can be changed
97
- */
98
- set disabled(disabled: boolean);
99
- ngOnInit(): void;
100
- ngAfterViewInit(): void;
101
- onInternalFormChange(): void;
102
- onBlur(): void;
103
- /**
104
- * Reset form to it's initial value
105
- * Discard searched text (in autocomplete use case)
106
- * Doest not commit the change to the model (no change event is emitted)
107
- */
108
- reset(): void;
109
- /**
110
- * Enter semantic means we want to validate something.
111
- * If we hit ENTER while typing a text, the stroke is ignored because the value is invalid (it's accepted in free text mode)
112
- * If we hit ENTER while the input field is empty, we validate the unselection (empty is a valid value)
113
- */
114
- onKeyEnter(): void;
115
- writeValue(value: ValueTypeFor<TService> | null): void;
116
- private initService;
117
- startSearch(): void;
118
- /**
119
- * Commit the model change
120
- * Set internal form as pristine to reflect that the visible value match the model
121
- */
122
- propagateValue(value: ValueTypeFor<TService> | null): void;
123
- /**
124
- * Very important to return something, above all if [select]='displayedValue' attribute value is used
125
- */
126
- getDisplayFn(): (item: ValueTypeFor<TService> | null) => string;
127
- clear(): void;
128
- search(term: ValueTypeFor<TService> | null): void;
129
- showClearButton(): boolean;
130
- private getSearchFilter;
131
- getVariablesForDebug(): Readonly<QueryVariables> | undefined;
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; }; "pageSize": { "alias": "pageSize"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, {}, ["itemTemplate"], never, true, never>;
134
- }
135
- export {};
@@ -1,32 +0,0 @@
1
- import { OnInit } from '@angular/core';
2
- import { ControlValueAccessor } from '@angular/forms';
3
- import { Observable } from 'rxjs';
4
- import { IEnum } from '../../../services/enum.service';
5
- import { AbstractSelect } from '../abstract-select.component';
6
- import * as i0 from "@angular/core";
7
- type Value = IEnum['value'] | IEnum['value'][];
8
- export declare class NaturalSelectEnumComponent extends AbstractSelect<Value, Value> implements OnInit, ControlValueAccessor {
9
- private readonly enumService;
10
- /**
11
- * The name of the enum type, eg: `"ActionStatus"`
12
- */
13
- enumName: string;
14
- /**
15
- * If given an extra option is added to select `null` with given label
16
- */
17
- nullLabel?: string;
18
- /**
19
- * Functions that receives an enum value and returns whether that value is disabled
20
- */
21
- optionDisabled?: (item: IEnum) => boolean;
22
- /**
23
- * Whether the user should be allowed to select multiple options
24
- */
25
- multiple: boolean;
26
- items?: Observable<IEnum[]>;
27
- ngOnInit(): void;
28
- getDisplayFn(): (item: Value | null) => string;
29
- static ɵfac: i0.ɵɵFactoryDeclaration<NaturalSelectEnumComponent, never>;
30
- static ɵcmp: i0.ɵɵComponentDeclaration<NaturalSelectEnumComponent, "natural-select-enum", never, { "enumName": { "alias": "enumName"; "required": true; }; "nullLabel": { "alias": "nullLabel"; "required": false; }; "optionDisabled": { "alias": "optionDisabled"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; }, {}, never, never, true, never>;
31
- }
32
- export {};
@@ -1,65 +0,0 @@
1
- import { OnInit } from '@angular/core';
2
- import { ControlValueAccessor } from '@angular/forms';
3
- import { Literal } from '../../../types/types';
4
- import { HierarchicFiltersConfiguration } from '../../hierarchic-selector/classes/hierarchic-filters-configuration';
5
- import { NaturalHierarchicConfiguration } from '../../hierarchic-selector/public-api';
6
- import { AbstractSelect } from '../abstract-select.component';
7
- import * as i0 from "@angular/core";
8
- /**
9
- * Default usage:
10
- *
11
- * ```html
12
- * <natural-select
13
- * [config]="myConfig"
14
- * [(ngModel)]="amazingModel"
15
- * (ngModelChange)=amazingChangeFn($event)
16
- * />
17
- * ```
18
- *
19
- * `[(ngModel)]` and `(ngModelChange)` are optional.
20
- *
21
- * Placeholder :
22
- *
23
- * ```html
24
- * <natural-select placeholder="amazing placeholder" />
25
- * ```
26
- */
27
- export declare class NaturalSelectHierarchicComponent extends AbstractSelect<Literal, string> implements OnInit, ControlValueAccessor {
28
- private readonly hierarchicSelectorDialogService;
29
- /**
30
- * If provided cause a new select button to appear
31
- */
32
- selectLabel?: string;
33
- /**
34
- * Configuration for hierarchic relations
35
- *
36
- * It should be an array with at least one element with `selectableAtKey` configured, otherwise the selector will never open.
37
- */
38
- config: NaturalHierarchicConfiguration[] | null;
39
- /**
40
- * Filters formatted for hierarchic selector
41
- */
42
- filters?: HierarchicFiltersConfiguration;
43
- /**
44
- * The selected value as an object. The internal value is `internalCtrl.value`, and that is a string.
45
- */
46
- private value;
47
- /**
48
- * On Firefox, the combination of <input (focus)> event and dialog opening cause some strange bug where focus event is called multiple
49
- * times This prevents it.
50
- */
51
- private lockOpenDialog;
52
- /**
53
- * Very important to return something, above all if [select]='displayedValue' attribute value is used
54
- */
55
- getDisplayFn(): (item: Literal | null) => string;
56
- /**
57
- * Override parent because our internalCtrl store the textual representation as string instead of raw Literal
58
- */
59
- writeValue(value: Literal | string | null): void;
60
- openDialog(): void;
61
- showSelectButton(): boolean;
62
- private getSelectKey;
63
- static ɵfac: i0.ɵɵFactoryDeclaration<NaturalSelectHierarchicComponent, never>;
64
- static ɵcmp: i0.ɵɵComponentDeclaration<NaturalSelectHierarchicComponent, "natural-select-hierarchic", never, { "selectLabel": { "alias": "selectLabel"; "required": false; }; "config": { "alias": "config"; "required": false; }; "filters": { "alias": "filters"; "required": false; }; }, {}, never, never, true, never>;
65
- }
@@ -1,5 +0,0 @@
1
- export * from './sidenav.service';
2
- export * from './sidenav-stack.service';
3
- export * from './sidenav/sidenav.component';
4
- export * from './sidenav-container/sidenav-container.component';
5
- export * from './sidenav-content/sidenav-content.component';
@@ -1,5 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- export declare class NaturalSidenavComponent {
3
- static ɵfac: i0.ɵɵFactoryDeclaration<NaturalSidenavComponent, never>;
4
- static ɵcmp: i0.ɵɵComponentDeclaration<NaturalSidenavComponent, "natural-sidenav", never, {}, {}, never, ["*"], true, never>;
5
- }
@@ -1,45 +0,0 @@
1
- import { OnDestroy, OnInit } from '@angular/core';
2
- import { MatDrawer, MatSidenav } from '@angular/material/sidenav';
3
- import { NaturalSidenavService } from '../sidenav.service';
4
- import * as i0 from "@angular/core";
5
- export declare class NaturalSidenavContainerComponent implements OnInit, OnDestroy {
6
- readonly sidenavService: NaturalSidenavService;
7
- /**
8
- * Unique identifier used for the local storage
9
- */
10
- name: string;
11
- /**
12
- * The side that the drawer is attached to
13
- */
14
- position: MatDrawer['position'];
15
- /**
16
- * If true listens to route changes to close side nav after a route change if mobile view is active
17
- * Actually a navigation to current route does not emit a route change, and the sidenav don't close.
18
- */
19
- mobileAutoClose: boolean;
20
- /**
21
- * Width of the minimized menu
22
- */
23
- minimizedWidth: number;
24
- /**
25
- * If true, prevents "native" material sidenav to scroll at container level and delegates the scroll responsability to the transcluded
26
- * content
27
- */
28
- noScroll: boolean;
29
- /**
30
- * Inner "native" material sidenav
31
- */
32
- readonly menuSidenav: import("@angular/core").Signal<MatSidenav>;
33
- get isMinimized(): boolean;
34
- get isMobileView(): boolean;
35
- ngOnInit(): void;
36
- ngOnDestroy(): void;
37
- toggle(): void;
38
- close(): void;
39
- open(): void;
40
- minimize(): void;
41
- expand(): void;
42
- toggleMinimized(): void;
43
- static ɵfac: i0.ɵɵFactoryDeclaration<NaturalSidenavContainerComponent, never>;
44
- static ɵcmp: i0.ɵɵComponentDeclaration<NaturalSidenavContainerComponent, "natural-sidenav-container", never, { "name": { "alias": "name"; "required": true; }; "position": { "alias": "position"; "required": false; }; "mobileAutoClose": { "alias": "mobileAutoClose"; "required": false; }; "minimizedWidth": { "alias": "minimizedWidth"; "required": false; }; "noScroll": { "alias": "noScroll"; "required": false; }; }, {}, never, ["natural-sidenav", "natural-sidenav-content"], true, never>;
45
- }
@@ -1,5 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- export declare class NaturalSidenavContentComponent {
3
- static ɵfac: i0.ɵɵFactoryDeclaration<NaturalSidenavContentComponent, never>;
4
- static ɵcmp: i0.ɵɵComponentDeclaration<NaturalSidenavContentComponent, "natural-sidenav-content", never, {}, {}, never, ["*"], true, never>;
5
- }
@@ -1,28 +0,0 @@
1
- import { Subject } from 'rxjs';
2
- import { NaturalSidenavContainerComponent } from './sidenav-container/sidenav-container.component';
3
- import * as i0 from "@angular/core";
4
- export declare class NaturalSidenavStackService {
5
- /**
6
- * The stack of all currently living sidenavs
7
- */
8
- private readonly sidenavs;
9
- /**
10
- * Emits the most recent living SidenavContainer whenever it changes. So it's
11
- * either the SidenavContainer that was just added, or the one "before" the
12
- * SidenavContainer that was just removed
13
- */
14
- readonly currentSidenav: Subject<NaturalSidenavContainerComponent | undefined>;
15
- /**
16
- * For internal use only
17
- * @internal
18
- */
19
- register(sidenav: NaturalSidenavContainerComponent): void;
20
- /**
21
- * For internal use only
22
- * @internal
23
- */
24
- unregister(sidenav: NaturalSidenavContainerComponent): void;
25
- private next;
26
- static ɵfac: i0.ɵɵFactoryDeclaration<NaturalSidenavStackService, never>;
27
- static ɵprov: i0.ɵɵInjectableDeclaration<NaturalSidenavStackService>;
28
- }
@@ -1,86 +0,0 @@
1
- import { MatDrawerMode } from '@angular/material/sidenav';
2
- import { NaturalSidenavContainerComponent } from './sidenav-container/sidenav-container.component';
3
- import * as i0 from "@angular/core";
4
- /**
5
- * TODO: Fix nav minimize and maximize resize
6
- * Since Material 2 beta 10, when nav is resized the body is not resized
7
- * https://github.com/angular/material2/issues/6743
8
- * Maybe the better is to wait next release
9
- */
10
- export declare class NaturalSidenavService {
11
- private readonly destroyRef;
12
- private readonly breakpointObserver;
13
- private readonly router;
14
- private readonly sessionStorage;
15
- private readonly naturalSidenavStackService;
16
- /**
17
- * Navigation modes
18
- * First is for desktop view
19
- * Second is for mobile view
20
- */
21
- private modes;
22
- /**
23
- * Activated mode
24
- * Default to desktop view
25
- */
26
- private mode;
27
- /**
28
- * Whether nav is opened or not
29
- */
30
- private opened;
31
- /**
32
- * Stores the opened status during mobile view, to restore if we come back to desktop view
33
- */
34
- private tmpOpened;
35
- /**
36
- * Whether nav is minimized or not
37
- */
38
- private minimized;
39
- /**
40
- * LocalStorage key that stores the minimized status
41
- */
42
- private readonly minimizedStorageKey;
43
- /**
44
- * LocalStorage key that stores the opened status
45
- */
46
- private readonly openedStorageKey;
47
- private minimizedStorageKeyWithName;
48
- private openedStorageKeyWithName;
49
- private _isMobileView;
50
- get activeMode(): MatDrawerMode;
51
- get isOpened(): boolean;
52
- get isMinimized(): boolean;
53
- destroy(component: NaturalSidenavContainerComponent): void;
54
- init(name: string, component: NaturalSidenavContainerComponent, autoClose?: boolean): void;
55
- isMobileView(): boolean;
56
- /**
57
- * Close nav on mobile view after a click
58
- */
59
- navItemClicked(): void;
60
- /**
61
- * Change minimized status and stores the new value
62
- */
63
- setMinimized(value: boolean): void;
64
- minimize(): void;
65
- expand(): void;
66
- toggleMinimized(): void;
67
- /**
68
- * Get the stored minimized status
69
- */
70
- getMinimizedStatus(): boolean;
71
- /**
72
- * Get the stored opened status
73
- * Default on an opened status if nothing is stored
74
- */
75
- getMenuOpenedStatus(): boolean;
76
- /**
77
- * Toggle menu but expand it if mobile mode is activated
78
- * Stores the status in local storage
79
- */
80
- toggle(): void;
81
- close(): void;
82
- open(): void;
83
- setOpened(value: boolean): void;
84
- static ɵfac: i0.ɵɵFactoryDeclaration<NaturalSidenavService, never>;
85
- static ɵprov: i0.ɵɵInjectableDeclaration<NaturalSidenavService>;
86
- }
@@ -1 +0,0 @@
1
- export * from './stamp.component';
@@ -1,15 +0,0 @@
1
- import { NameOrFullName } from '../../types/types';
2
- import * as i0 from "@angular/core";
3
- type Stamped = {
4
- creator: NameOrFullName | null;
5
- updater: NameOrFullName | null;
6
- creationDate: string | null;
7
- updateDate: string | null;
8
- };
9
- export declare class NaturalStampComponent {
10
- item: Stamped;
11
- showUpdate(): boolean;
12
- static ɵfac: i0.ɵɵFactoryDeclaration<NaturalStampComponent, never>;
13
- static ɵcmp: i0.ɵɵComponentDeclaration<NaturalStampComponent, "natural-stamp", never, { "item": { "alias": "item"; "required": true; }; }, {}, never, never, true, never>;
14
- }
15
- export {};
@@ -1 +0,0 @@
1
- export * from './table-button.component';
@@ -1,32 +0,0 @@
1
- import { Params, QueryParamsHandling, UrlTree } from '@angular/router';
2
- import { ThemePalette } from '@angular/material/core';
3
- import { Subject } from 'rxjs';
4
- import * as i0 from "@angular/core";
5
- /**
6
- * Button that fits well in a `<mat-table>` and support either
7
- * route navigation via `navigate`, or external URL via `href`,
8
- * or callback via `buttonClick`.
9
- *
10
- * If neither `navigate` nor `href` nor `buttonClick` have a meaningful value, then
11
- * it will show the icon and/or label in a `<span>` instead of a button.
12
- *
13
- * External URL will always be opened in new tab.
14
- */
15
- export declare class NaturalTableButtonComponent {
16
- readonly queryParams: import("@angular/core").InputSignal<Params>;
17
- readonly queryParamsHandling: import("@angular/core").InputSignal<QueryParamsHandling>;
18
- readonly label: import("@angular/core").InputSignal<string | null | undefined>;
19
- readonly icon: import("@angular/core").InputSignal<string | null | undefined>;
20
- readonly href: import("@angular/core").InputSignal<string | null | undefined>;
21
- readonly navigate: import("@angular/core").InputSignal<string | any[] | UrlTree | null | undefined>;
22
- readonly fragment: import("@angular/core").InputSignal<string | undefined>;
23
- readonly preserveFragment: import("@angular/core").InputSignal<boolean>;
24
- readonly disabled: import("@angular/core").InputSignal<boolean>;
25
- readonly raised: import("@angular/core").InputSignal<boolean>;
26
- readonly color: import("@angular/core").InputSignal<ThemePalette>;
27
- protected readonly buttonClick$: Subject<MouseEvent>;
28
- readonly buttonClick: import("@angular/core").OutputRef<MouseEvent>;
29
- protected readonly type: import("@angular/core").Signal<"click" | "routerLink" | "none" | "href">;
30
- static ɵfac: i0.ɵɵFactoryDeclaration<NaturalTableButtonComponent, never>;
31
- static ɵcmp: i0.ɵɵComponentDeclaration<NaturalTableButtonComponent, "natural-table-button", never, { "queryParams": { "alias": "queryParams"; "required": false; "isSignal": true; }; "queryParamsHandling": { "alias": "queryParamsHandling"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "href": { "alias": "href"; "required": false; "isSignal": true; }; "navigate": { "alias": "navigate"; "required": false; "isSignal": true; }; "fragment": { "alias": "fragment"; "required": false; "isSignal": true; }; "preserveFragment": { "alias": "preserveFragment"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "raised": { "alias": "raised"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; }, { "buttonClick": "buttonClick"; }, never, never, true, never>;
32
- }