@ecodev/natural 63.9.1 → 64.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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 +9 -9
  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,59 +0,0 @@
1
- import { NaturalSearchFacets } from '../../search/types/facet';
2
- import { NaturalSearchSelections } from '../../search/types/values';
3
- import { NaturalHierarchicConfiguration } from '../classes/hierarchic-configuration';
4
- import { HierarchicFiltersConfiguration } from '../classes/hierarchic-filters-configuration';
5
- import { OrganizedModelSelection } from '../hierarchic-selector/hierarchic-selector.service';
6
- import * as i0 from "@angular/core";
7
- export type HierarchicDialogResult = {
8
- hierarchicSelection?: OrganizedModelSelection;
9
- searchSelections?: NaturalSearchSelections | null;
10
- };
11
- export type HierarchicDialogConfig = {
12
- /**
13
- * Configuration to setup rules of hierarchy
14
- */
15
- hierarchicConfig: NaturalHierarchicConfiguration[];
16
- /**
17
- * Selected items when HierarchicComponent initializes
18
- */
19
- hierarchicSelection?: OrganizedModelSelection;
20
- /**
21
- * Filters to apply on queries (when opening new level of hierarchy)
22
- */
23
- hierarchicFilters?: HierarchicFiltersConfiguration | null;
24
- /**
25
- * Multiple selection if true or single selection if false
26
- */
27
- multiple?: boolean;
28
- /**
29
- * Allow to validate selection with no items checked
30
- */
31
- allowUnselect?: boolean;
32
- /**
33
- * Allow to select all items with dedicated button
34
- */
35
- allowSelectAll?: boolean;
36
- /**
37
- * Facets for natural-search in HierarchicComponent
38
- */
39
- searchFacets?: NaturalSearchFacets;
40
- /**
41
- * Selections of natural search to initialize on HierarchicComponent initialisation
42
- */
43
- searchSelections?: NaturalSearchSelections | null;
44
- };
45
- export declare class NaturalHierarchicSelectorDialogComponent {
46
- private dialogRef;
47
- /**
48
- * Set of hierarchic configurations to pass as attribute to HierarchicComponent
49
- */
50
- config: HierarchicDialogConfig;
51
- /**
52
- * Natural search selections after initialisation
53
- */
54
- searchSelectionsOutput: NaturalSearchSelections | undefined | null;
55
- constructor();
56
- close(selected: OrganizedModelSelection | undefined): void;
57
- static ɵfac: i0.ɵɵFactoryDeclaration<NaturalHierarchicSelectorDialogComponent, never>;
58
- static ɵcmp: i0.ɵɵComponentDeclaration<NaturalHierarchicSelectorDialogComponent, "ng-component", never, {}, {}, never, never, true, never>;
59
- }
@@ -1,9 +0,0 @@
1
- import { MatDialogConfig, MatDialogRef } from '@angular/material/dialog';
2
- import { HierarchicDialogConfig, HierarchicDialogResult, NaturalHierarchicSelectorDialogComponent } from './hierarchic-selector-dialog.component';
3
- import * as i0 from "@angular/core";
4
- export declare class NaturalHierarchicSelectorDialogService {
5
- private readonly dialog;
6
- open(hierarchicConfig: HierarchicDialogConfig, dialogConfig?: MatDialogConfig): MatDialogRef<NaturalHierarchicSelectorDialogComponent, HierarchicDialogResult>;
7
- static ɵfac: i0.ɵɵFactoryDeclaration<NaturalHierarchicSelectorDialogService, never>;
8
- static ɵprov: i0.ɵɵInjectableDeclaration<NaturalHierarchicSelectorDialogService>;
9
- }
@@ -1,6 +0,0 @@
1
- export * from './classes/hierarchic-configuration';
2
- export * from './classes/hierarchic-filters-configuration';
3
- export * from './hierarchic-selector/hierarchic-selector.component';
4
- export * from './hierarchic-selector-dialog/hierarchic-selector-dialog.component';
5
- export * from './hierarchic-selector-dialog/hierarchic-selector-dialog.service';
6
- export * from './hierarchic-selector/hierarchic-selector.service';
@@ -1,39 +0,0 @@
1
- import { InjectionToken } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- export type NaturalIconConfig = {
4
- svg?: string;
5
- font?: string;
6
- class?: 'negative' | 'neutral' | 'positive';
7
- };
8
- export type NaturalIconsConfig = Record<string, NaturalIconConfig>;
9
- export declare const NATURAL_ICONS_CONFIG: InjectionToken<NaturalIconsConfig>;
10
- /**
11
- * Allows to use `<mat-icon>` without knowing where an icon comes from (SVG or font) or with aliases for Material font.
12
- *
13
- * SVG icons and Material font aliases must be configured ahead of time, via `NATURAL_ICONS_CONFIG`.
14
- *
15
- * It also make it easy to give a specific size to the icon via `[size]`.
16
- *
17
- * Usage:
18
- *
19
- * ```html
20
- * <mat-icon naturalIcon="search"></mat-icon>
21
- * <mat-icon naturalIcon="my-svg-icon-name"></mat-icon>
22
- * <mat-icon naturalIcon="my-alias-for-search"></mat-icon>
23
- * <mat-icon naturalIcon="search" [size]="150"></mat-icon>
24
- * ```
25
- */
26
- export declare class NaturalIconDirective {
27
- private readonly matIconRegistry;
28
- private readonly domSanitizer;
29
- private readonly config;
30
- private readonly matIconComponent;
31
- protected _size: number | undefined;
32
- protected classes: string;
33
- constructor();
34
- set naturalIcon(value: string);
35
- set size(size: number | undefined | null);
36
- private registerIcons;
37
- static ɵfac: i0.ɵɵFactoryDeclaration<NaturalIconDirective, never>;
38
- static ɵdir: i0.ɵɵDirectiveDeclaration<NaturalIconDirective, "mat-icon[naturalIcon]", never, { "naturalIcon": { "alias": "naturalIcon"; "required": true; }; "size": { "alias": "size"; "required": false; }; }, {}, never, never, true, never>;
39
- }
@@ -1,9 +0,0 @@
1
- import { EnvironmentProviders, Provider } from '@angular/core';
2
- import { NaturalIconsConfig } from './icon.directive';
3
- /**
4
- * Configure Material Symbols, instead of Material Icons, and configure custom Natural icons.
5
- *
6
- * This means that `https://fonts.googleapis.com/icon?family=Material+Icons` must be
7
- * replaced by `https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:FILL@1`.
8
- */
9
- export declare function provideIcons(config: NaturalIconsConfig): (EnvironmentProviders | Provider)[];
@@ -1,2 +0,0 @@
1
- export * from './icon.directive';
2
- export { provideIcons } from './icon.module';
@@ -1,52 +0,0 @@
1
- import { ErrorHandler, InjectionToken } from '@angular/core';
2
- import { Observable } from 'rxjs';
3
- import * as i0 from "@angular/core";
4
- export type NaturalLoggerType = {
5
- message: string;
6
- stacktrace?: string;
7
- href?: string;
8
- host?: string;
9
- path?: string;
10
- agent?: string;
11
- status?: number;
12
- referrer?: string;
13
- url?: string;
14
- userId?: string;
15
- user?: string;
16
- [key: string]: any;
17
- };
18
- export type NaturalLoggerExtra = {
19
- /**
20
- * Return an observable of extra data that will be logged. Those data will be merged into
21
- * the original data, and so it can override things.
22
- *
23
- * Only the first emitted value will be used.
24
- */
25
- getExtras(error: unknown): Observable<Partial<NaturalLoggerType>>;
26
- };
27
- export declare const NaturalLoggerConfigUrl: InjectionToken<string>;
28
- export declare const NaturalLoggerConfigExtra: InjectionToken<NaturalLoggerExtra>;
29
- /**
30
- * Replace Angular's error handler to also send the log to a remote server via HTTP POST.
31
- *
32
- * Usage is automatic as soon as we provide it via:
33
- *
34
- * ```ts
35
- * provideErrorHandler('http://example.com', ExtraService),
36
- * ```
37
- */
38
- export declare class NaturalErrorHandler extends ErrorHandler {
39
- private readonly http;
40
- private readonly document;
41
- private readonly url;
42
- private readonly loggerExtra;
43
- constructor();
44
- handleError(error: any): void;
45
- private toMessage;
46
- /**
47
- * Send parameters to remote log
48
- */
49
- private postLog;
50
- static ɵfac: i0.ɵɵFactoryDeclaration<NaturalErrorHandler, never>;
51
- static ɵprov: i0.ɵɵInjectableDeclaration<NaturalErrorHandler>;
52
- }
@@ -1,3 +0,0 @@
1
- import { Provider, Type } from '@angular/core';
2
- import { NaturalLoggerExtra } from './error-handler';
3
- export declare function provideErrorHandler(url: string | null, extraService?: Type<NaturalLoggerExtra>): Provider[];
@@ -1,3 +0,0 @@
1
- export { provideErrorHandler } from './error.module';
2
- export { NaturalErrorHandler, NaturalLoggerConfigExtra, NaturalLoggerConfigUrl } from './error-handler';
3
- export type { NaturalLoggerExtra, NaturalLoggerType } from './error-handler';
@@ -1,42 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- /**
3
- * Incomplete list of Matomo functions. But it should be enough
4
- * for our basic needs.
5
- *
6
- * To complete this list, maybe see https://developer.matomo.org/guides/tracking-javascript-guide
7
- */
8
- type MatomoFunction = 'setCustomUrl' | 'setCustomDimension' | 'setDocumentTitle' | 'setReferrerUrl' | 'setSiteId' | 'setTrackerUrl' | 'trackPageView';
9
- export type PaqItem = [MatomoFunction, ...(number | string | null)[]];
10
- /**
11
- * Service to track visitors via Matomo.
12
- *
13
- * @dynamic
14
- */
15
- export declare class NaturalMatomoService {
16
- private readonly router;
17
- private readonly document;
18
- private readonly titleService;
19
- private readonly isBrowser;
20
- private readonly window;
21
- private subscription;
22
- private referrerUrl;
23
- constructor();
24
- /**
25
- * Inject Matomo script and start tracking all page navigation
26
- */
27
- startTracking(url: string | null, site: number | null): void;
28
- stopTracking(): void;
29
- /**
30
- * Push a Matomo command on the stack
31
- *
32
- * It can be called at any time, including before Matomo is even loaded.
33
- *
34
- * Also see https://developer.matomo.org/guides/tracking-javascript-guide
35
- */
36
- push(functionName: PaqItem[0], ...args: PaqItem[1][]): void;
37
- private injectTrackingCode;
38
- private listenForRouteChanges;
39
- static ɵfac: i0.ɵɵFactoryDeclaration<NaturalMatomoService, never>;
40
- static ɵprov: i0.ɵɵInjectableDeclaration<NaturalMatomoService>;
41
- }
42
- export {};
@@ -1 +0,0 @@
1
- export { NaturalMatomoService } from './matomo.service';
@@ -1,37 +0,0 @@
1
- import { DestroyRef } from '@angular/core';
2
- import { NaturalPanelsService } from './panels.service';
3
- import { NaturalPanelData } from './types';
4
- import * as i0 from "@angular/core";
5
- export declare class NaturalAbstractPanel {
6
- protected readonly destroyRef: DestroyRef;
7
- /**
8
- * The data property is the container where the resolved content is stored
9
- * When loading a component from a panel opening (dialog), receives the data provided by the service
10
- */
11
- data: any;
12
- /**
13
- * Bind isFrontPanel style class on root component
14
- */
15
- isFrontPanel: boolean;
16
- /**
17
- * Bind isPanel style class on root component
18
- */
19
- isPanel: boolean;
20
- /**
21
- * Merging of data provided by the very root component (that is in a route context) and inherited data through panels
22
- * TODO: provide type with available attributes
23
- */
24
- panelData?: NaturalPanelData;
25
- panelService?: NaturalPanelsService;
26
- /**
27
- * Bind click on panels, to allow the selection of those who are behind
28
- */
29
- clickPanel(): void;
30
- /**
31
- * Called when panel opens and component is loaded
32
- * Runs before ngOnInit()
33
- */
34
- initPanel(panelData: NaturalPanelData): void;
35
- static ɵfac: i0.ɵɵFactoryDeclaration<NaturalAbstractPanel, never>;
36
- static ɵdir: i0.ɵɵDirectiveDeclaration<NaturalAbstractPanel, never, never, {}, {}, never, never, true, never>;
37
- }
@@ -1,6 +0,0 @@
1
- import { UrlMatcher } from '@angular/router';
2
- /**
3
- * Url fallback matcher to be used instead of `path: '**'` when Panel system
4
- * is used in the project.
5
- */
6
- export declare const fallbackIfNoOpenedPanels: UrlMatcher;
@@ -1,9 +0,0 @@
1
- import { OnDestroy } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- export declare class NaturalPanelsComponent implements OnDestroy {
4
- private readonly panelsService;
5
- constructor();
6
- ngOnDestroy(): void;
7
- static ɵfac: i0.ɵɵFactoryDeclaration<NaturalPanelsComponent, never>;
8
- static ɵcmp: i0.ɵɵComponentDeclaration<NaturalPanelsComponent, "natural-panels", never, {}, {}, never, never, true, never>;
9
- }
@@ -1,3 +0,0 @@
1
- import { Provider } from '@angular/core';
2
- import { NaturalPanelsHooksConfig } from './types';
3
- export declare function providePanels(hooks: NaturalPanelsHooksConfig): Provider[];
@@ -1,121 +0,0 @@
1
- import { ActivatedRoute } from '@angular/router';
2
- import { Subject } from 'rxjs';
3
- import { NaturalAbstractPanel } from './abstract-panel';
4
- import * as i0 from "@angular/core";
5
- /**
6
- * TODO: implement route update when closing dialog with escape
7
- * @dynamic
8
- */
9
- export declare class NaturalPanelsService {
10
- private readonly router;
11
- private readonly dialog;
12
- private readonly injector;
13
- private hooksConfig;
14
- private readonly panelWidth;
15
- /**
16
- * Because of this static property Panels are **not** compatible with SSR.
17
- * And we cannot make it non-static, because `UrlMatcher` cannot be injected.
18
- */
19
- private static _opened;
20
- static get opened(): boolean;
21
- /**
22
- * Stream that emits when all open dialog have finished closing
23
- */
24
- readonly afterAllClosed: Subject<void>;
25
- /**
26
- * Cache for panels counter. Works more like an ID.
27
- * Is used to give an unique identifier to multiple similar panels configurations
28
- */
29
- private counter;
30
- /**
31
- * Class applied to dialog overlay related with panels
32
- * If change, change CSS too
33
- */
34
- private panelClass;
35
- /**
36
- * Cache for panels setup before navigation change.
37
- * Used to detect panels openings/closings and adapt for new configuration
38
- */
39
- private oldFullConfig;
40
- /**
41
- * Cache for subscription stop
42
- */
43
- private routeSub?;
44
- /**
45
- * Cache for subscription stop
46
- */
47
- private navSub?;
48
- /**
49
- * Horizontal gaps between panels
50
- */
51
- private panelsOffsetH;
52
- /**
53
- * Vertical gaps between panels
54
- */
55
- private panelsOffsetV;
56
- /**
57
- * Cache of previous screen size
58
- * Used to change panels stack orientation on small screens
59
- */
60
- private isVertical;
61
- constructor();
62
- /**
63
- * Notify the service to start listening to route changes to open panels
64
- *
65
- * @internal
66
- */
67
- start(route: ActivatedRoute): void;
68
- /**
69
- * Uses given configuration to add at the end of current url
70
- */
71
- private appendConfigToCurrentUrl;
72
- /**
73
- * Notify the service that all panels were closed
74
- *
75
- * @internal
76
- */
77
- stop(): void;
78
- /**
79
- * Go to panel matching given component. Causes an url change.
80
- *
81
- * @internal
82
- */
83
- goToPanelByComponent(component: NaturalAbstractPanel): void;
84
- /**
85
- * Go to panel matching given component. Causes an url change.
86
- */
87
- goToPenultimatePanel(): void;
88
- /**
89
- * Calls the new url that only includes the segments from the panels we want to stay open
90
- */
91
- private goToPanelByIndex;
92
- /**
93
- * Selecting a panel is equivalent to close all those that are in front of him
94
- * @param index of panel in stack. The most behind (the first one) is 0.
95
- */
96
- private selectPanelByIndex;
97
- /**
98
- * Open new panels if url has changed with new segments
99
- */
100
- private updatePanels;
101
- /**
102
- * Resolve all services, then open panels
103
- */
104
- private openPanels;
105
- private getResolvedData;
106
- private openPanel;
107
- /**
108
- * Return panel position (index) by searching matching component
109
- */
110
- private getPanelIndex;
111
- /**
112
- * Whether the given panel is currently the top, visible, panel. If there are no panels opened at all, then any panel given is considered top, visible, panel.
113
- */
114
- isTopPanel(component: NaturalAbstractPanel): boolean;
115
- /**
116
- * Repositions panels from start until given index
117
- */
118
- private updateComponentsPosition;
119
- static ɵfac: i0.ɵɵFactoryDeclaration<NaturalPanelsService, never>;
120
- static ɵprov: i0.ɵɵInjectableDeclaration<NaturalPanelsService>;
121
- }
@@ -1,8 +0,0 @@
1
- import { Injector } from '@angular/core';
2
- import { UrlMatcher, UrlSegment } from '@angular/router';
3
- import { NaturalPanelConfig, NaturalPanelsRouterRule } from './types';
4
- /**
5
- * Return a list of items specifying the component, the service and the optional id of url segments
6
- */
7
- export declare function getStackConfig(segments: UrlSegment[], routes: NaturalPanelsRouterRule[], injector?: Injector | null): NaturalPanelConfig[];
8
- export declare const naturalPanelsUrlMatcher: UrlMatcher;
@@ -1,7 +0,0 @@
1
- export { providePanels } from './panels.module';
2
- export * from './panels.component';
3
- export * from './panels.service';
4
- export { naturalPanelsUrlMatcher } from './panels.urlmatcher';
5
- export { fallbackIfNoOpenedPanels } from './fallback-if-no-opened-panels.urlmatcher';
6
- export * from './abstract-panel';
7
- export * from './types';
@@ -1,61 +0,0 @@
1
- import { ComponentType } from '@angular/cdk/portal';
2
- import { InjectionToken, Injector } from '@angular/core';
3
- import { UrlSegment } from '@angular/router';
4
- import { Literal } from '../../types/types';
5
- import { Observable } from 'rxjs';
6
- import { NaturalAbstractPanel } from './abstract-panel';
7
- import { LinkableObject } from '../../services/link-mutation.service';
8
- /**
9
- * Kind of snapshot of the instance of a panel activated route
10
- */
11
- export type NaturalPanelsRouteConfig = {
12
- segments: UrlSegment[];
13
- path: string;
14
- };
15
- /**
16
- * Config required to manage url and instantiate component correctly
17
- */
18
- export type NaturalPanelConfig = {
19
- component: ComponentType<NaturalAbstractPanel>;
20
- injector: Injector | null;
21
- resolve: NaturalPanelResolves;
22
- params: Literal;
23
- rule: NaturalPanelsRouterRule;
24
- route: NaturalPanelsRouteConfig;
25
- };
26
- /**
27
- * Data provided to instantiated components in context of a panel/dialog
28
- */
29
- export type NaturalPanelData = {
30
- config: NaturalPanelConfig;
31
- data: Literal;
32
- /**
33
- * Related objects that should be linked to the object shown in the panel after its creation
34
- */
35
- linkableObjects: LinkableObject[];
36
- };
37
- /**
38
- * Similar to Angular functional resolver interface, but simpler for our panels' needs
39
- */
40
- type NaturalPanelResolve<T> = (route: NaturalPanelConfig) => Observable<T>;
41
- export type NaturalPanelResolves = Record<string, NaturalPanelResolve<unknown>>;
42
- /**
43
- * Configuration for a route
44
- */
45
- export type NaturalPanelsRouterRule = {
46
- path: string;
47
- component: ComponentType<NaturalAbstractPanel>;
48
- resolve?: NaturalPanelResolves;
49
- };
50
- export type NaturalPanelsBeforeOpenPanel = {
51
- itemData: NaturalPanelData;
52
- panelConfig: NaturalPanelConfig;
53
- fullPanelsConfig: NaturalPanelConfig[];
54
- resolvedResult: any;
55
- };
56
- export type NaturalPanelsHooksConfig = {
57
- beforeOpenPanel?: (injector: Injector, naturalPanelsBeforeOpenPanel: NaturalPanelsBeforeOpenPanel) => NaturalPanelData;
58
- };
59
- export type NaturalPanelsRoutesConfig = NaturalPanelsRouterRule[];
60
- export declare const PanelsHooksConfig: InjectionToken<NaturalPanelsHooksConfig>;
61
- export {};
@@ -1 +0,0 @@
1
- export * from './relations.component';
@@ -1,123 +0,0 @@
1
- import { OnChanges, OnInit, TemplateRef } from '@angular/core';
2
- import { PageEvent } from '@angular/material/paginator';
3
- import { NaturalDataSource, PaginatedData } from '../../classes/data-source';
4
- import { QueryVariables } from '../../classes/query-variable-manager';
5
- import { HierarchicFiltersConfiguration } from '../hierarchic-selector/classes/hierarchic-filters-configuration';
6
- import { LinkableObject } from '../../services/link-mutation.service';
7
- import { NaturalHierarchicConfiguration } from '../hierarchic-selector/classes/hierarchic-configuration';
8
- import { NaturalAbstractModelService } from '../../services/abstract-model.service';
9
- import { ExtractTallOne, ExtractVall } from '../../types/types';
10
- import * as i0 from "@angular/core";
11
- /**
12
- * Custom template usage :
13
- *
14
- * ```html
15
- * <natural-relations [main]="owner" [service]="svc" [filter]="{}" placeholder="Select an item">
16
- * <ng-template let-item="item">
17
- * <span>{{ item.xxx }}</span>
18
- * </ng-template>
19
- * </natural-relations>
20
- * ```
21
- */
22
- export declare class NaturalRelationsComponent<TService extends NaturalAbstractModelService<unknown, any, PaginatedData<LinkableObject>, QueryVariables, unknown, any, unknown, any, unknown, any>> implements OnInit, OnChanges {
23
- private readonly destroyRef;
24
- private readonly linkMutationService;
25
- private readonly hierarchicSelectorDialog;
26
- private readonly select;
27
- readonly itemTemplate: import("@angular/core").Signal<TemplateRef<unknown> | undefined>;
28
- private _service;
29
- get service(): TService;
30
- set service(service: TService);
31
- /**
32
- * The placeholder used in the button to add a new relation
33
- */
34
- placeholder: string;
35
- /**
36
- * Filter for autocomplete selector
37
- */
38
- autocompleteSelectorFilter?: ExtractVall<TService>['filter'] | null | undefined;
39
- /**
40
- * Function to customize the rendering of the selected item as text in input
41
- */
42
- displayWith?: (item: ExtractTallOne<TService> | null) => string;
43
- /**
44
- * Whether the relations can be changed
45
- */
46
- disabled: boolean;
47
- /**
48
- * The main object to which all relations belong to
49
- */
50
- main: LinkableObject & {
51
- permissions?: {
52
- update: boolean;
53
- };
54
- };
55
- /**
56
- * Emits after relations were successfully added on the server
57
- */
58
- readonly selectionChange: import("@angular/core").OutputEmitterRef<void>;
59
- /**
60
- * Filters for hierarchic selector
61
- */
62
- hierarchicSelectorFilters?: HierarchicFiltersConfiguration | null;
63
- /**
64
- * Configuration in case we prefer hierarchic selection over autocomplete selection
65
- */
66
- hierarchicSelectorConfig?: NaturalHierarchicConfiguration[];
67
- /**
68
- * Link mutation semantic
69
- */
70
- otherName?: string | null;
71
- /**
72
- * Listing service instance
73
- */
74
- dataSource: NaturalDataSource<PaginatedData<LinkableObject>>;
75
- loading: boolean;
76
- /**
77
- * Table columns
78
- */
79
- displayedColumns: string[];
80
- readonly pageSizeOptions: number[];
81
- protected readonly defaultPagination: {
82
- pageIndex: number;
83
- pageSize: number;
84
- };
85
- /**
86
- * Observable variables/options for listing service usage and apollo watchQuery
87
- */
88
- private variablesManager;
89
- readonly removing: Set<LinkableObject>;
90
- /**
91
- * The filter used to filter relations
92
- *
93
- * So if the relations are from one action -> to many objectives, then the filter must filter
94
- * the objectives that have indeed a relation to the particular action.
95
- */
96
- set filter(filter: ExtractVall<TService>['filter']);
97
- /**
98
- * The sorting used to sort relations
99
- *
100
- * So if the relations are from one action -> to many objectives, then the sorting must sort
101
- * the objectives that have indeed a relation to the particular action.
102
- */
103
- set sorting(sorting: ExtractVall<TService>['sorting']);
104
- ngOnChanges(): void;
105
- ngOnInit(): void;
106
- /**
107
- * Unlink action
108
- * Refetch result to display it in table
109
- */
110
- removeRelation(relation: LinkableObject): void;
111
- /**
112
- * Link action
113
- * Refetch result to display it in table
114
- * TODO : could maybe use "update" attribute of apollo.mutate function to update table faster (but hard to do it here)
115
- */
116
- addRelations(relations: (LinkableObject | ExtractTallOne<TService> | string | null)[]): void;
117
- pagination(event?: PageEvent): void;
118
- getDisplayFn(): (item: ExtractTallOne<TService> | null) => string;
119
- openNaturalHierarchicSelector(): void;
120
- private getSelectKey;
121
- static ɵfac: i0.ɵɵFactoryDeclaration<NaturalRelationsComponent<any>, never>;
122
- static ɵcmp: i0.ɵɵComponentDeclaration<NaturalRelationsComponent<any>, "natural-relations", never, { "service": { "alias": "service"; "required": true; }; "placeholder": { "alias": "placeholder"; "required": false; }; "autocompleteSelectorFilter": { "alias": "autocompleteSelectorFilter"; "required": false; }; "displayWith": { "alias": "displayWith"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "main": { "alias": "main"; "required": true; }; "hierarchicSelectorFilters": { "alias": "hierarchicSelectorFilters"; "required": false; }; "hierarchicSelectorConfig": { "alias": "hierarchicSelectorConfig"; "required": false; }; "otherName": { "alias": "otherName"; "required": false; }; "filter": { "alias": "filter"; "required": false; }; "sorting": { "alias": "sorting"; "required": false; }; }, { "selectionChange": "selectionChange"; }, ["itemTemplate"], never, true, never>;
123
- }
@@ -1,4 +0,0 @@
1
- import { NaturalSearchFacets } from '../types/facet';
2
- import { NaturalSearchSelections } from '../types/values';
3
- import { Filter } from './graphql-doctrine.types';
4
- export declare function toGraphQLDoctrineFilter(facets: NaturalSearchFacets | null, selections: NaturalSearchSelections | null): Filter;