@ecodev/natural 60.1.1 → 61.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 (41) hide show
  1. package/esm2022/lib/classes/abstract-detail.mjs +2 -3
  2. package/esm2022/lib/classes/abstract-editable-list.mjs +3 -5
  3. package/esm2022/lib/classes/abstract-list.mjs +6 -5
  4. package/esm2022/lib/classes/abstract-navigable-list.mjs +4 -3
  5. package/esm2022/lib/classes/rxjs.mjs +11 -5
  6. package/esm2022/lib/modules/columns-picker/columns-picker.component.mjs +5 -9
  7. package/esm2022/lib/modules/common/directives/linkable-tab.directive.mjs +7 -9
  8. package/esm2022/lib/modules/dropdown-components/type-select/type-select.component.mjs +10 -10
  9. package/esm2022/lib/modules/file/abstract-file.mjs +3 -6
  10. package/esm2022/lib/modules/file/file-drop.directive.mjs +6 -4
  11. package/esm2022/lib/modules/hierarchic-selector/hierarchic-selector/hierarchic-selector.component.mjs +8 -8
  12. package/esm2022/lib/modules/panels/abstract-panel.mjs +9 -9
  13. package/esm2022/lib/modules/relations/relations.component.mjs +8 -8
  14. package/esm2022/lib/modules/select/abstract-select.component.mjs +3 -5
  15. package/esm2022/lib/modules/select/select/select.component.mjs +7 -5
  16. package/esm2022/lib/modules/select/select-hierarchic/select-hierarchic.component.mjs +1 -1
  17. package/esm2022/lib/modules/sidenav/sidenav.service.mjs +8 -8
  18. package/esm2022/public-api.mjs +1 -2
  19. package/fesm2022/ecodev-natural.mjs +58 -89
  20. package/fesm2022/ecodev-natural.mjs.map +1 -1
  21. package/lib/classes/abstract-detail.d.ts +0 -1
  22. package/lib/classes/abstract-editable-list.d.ts +1 -2
  23. package/lib/classes/abstract-list.d.ts +2 -2
  24. package/lib/classes/abstract-navigable-list.d.ts +2 -2
  25. package/lib/classes/rxjs.d.ts +9 -2
  26. package/lib/modules/columns-picker/columns-picker.component.d.ts +3 -4
  27. package/lib/modules/common/directives/linkable-tab.directive.d.ts +2 -2
  28. package/lib/modules/dropdown-components/type-select/type-select.component.d.ts +3 -3
  29. package/lib/modules/file/abstract-file.d.ts +1 -2
  30. package/lib/modules/file/file-drop.directive.d.ts +1 -0
  31. package/lib/modules/hierarchic-selector/hierarchic-selector/hierarchic-selector.component.d.ts +2 -2
  32. package/lib/modules/panels/abstract-panel.d.ts +3 -2
  33. package/lib/modules/relations/relations.component.d.ts +2 -2
  34. package/lib/modules/select/abstract-select.component.d.ts +2 -3
  35. package/lib/modules/select/select/select.component.d.ts +3 -2
  36. package/lib/modules/select/select-hierarchic/select-hierarchic.component.d.ts +2 -2
  37. package/lib/modules/sidenav/sidenav.service.d.ts +2 -2
  38. package/package.json +1 -1
  39. package/public-api.d.ts +0 -1
  40. package/esm2022/lib/classes/abstract-controller.mjs +0 -31
  41. package/lib/classes/abstract-controller.d.ts +0 -21
@@ -1,6 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Directive, Component, Inject, Injectable, HostBinding, HostListener, inject, DestroyRef, InjectionToken, TemplateRef, ViewEncapsulation, ViewChild, Injector, Optional, Input, Host, Self, EventEmitter, Output, Pipe, LOCALE_ID, APP_INITIALIZER, ContentChild, createEnvironmentInjector, createComponent, runInInjectionContext, PLATFORM_ID, ErrorHandler, importProvidersFrom } from '@angular/core';
3
- import { Subject, Observable, takeUntil, BehaviorSubject, of, timer, switchMap as switchMap$1, tap, endWith, last, EMPTY, finalize, merge as merge$1, first as first$1, take, map as map$1, ReplaySubject, debounceTime, raceWith, mergeMap, shareReplay, catchError, forkJoin, combineLatest, from, startWith as startWith$1, filter as filter$1, asyncScheduler } from 'rxjs';
2
+ import { Component, Inject, Injectable, inject, DestroyRef, Directive, HostBinding, HostListener, InjectionToken, TemplateRef, ViewEncapsulation, ViewChild, Injector, Optional, Input, Host, Self, EventEmitter, Output, Pipe, LOCALE_ID, APP_INITIALIZER, ContentChild, createEnvironmentInjector, createComponent, runInInjectionContext, PLATFORM_ID, ErrorHandler, importProvidersFrom } from '@angular/core';
4
3
  import * as i2$2 from '@angular/forms';
5
4
  import { FormGroup, FormArray, Validators, UntypedFormGroup, UntypedFormArray, FormControl, FormsModule, ReactiveFormsModule, UntypedFormControl, FormControlDirective, FormControlName } from '@angular/forms';
6
5
  import * as i2$3 from '@angular/router';
@@ -12,8 +11,9 @@ import * as i3 from '@angular/material/button';
12
11
  import { MatButtonModule } from '@angular/material/button';
13
12
  import * as i2 from '@angular/material/snack-bar';
14
13
  import { MatSnackBarModule } from '@angular/material/snack-bar';
15
- import { switchMap, first, map, filter, takeUntil as takeUntil$1, takeWhile, debounceTime as debounceTime$1, tap as tap$1, shareReplay as shareReplay$1, startWith, distinctUntilChanged, finalize as finalize$1, throttleTime } from 'rxjs/operators';
14
+ import { Observable, BehaviorSubject, of, timer, switchMap as switchMap$1, tap, endWith, last, EMPTY, finalize, Subject, merge as merge$1, first as first$1, take, takeUntil as takeUntil$1, map as map$1, ReplaySubject, debounceTime, raceWith, mergeMap, shareReplay, catchError, forkJoin, combineLatest, from, startWith as startWith$1, filter as filter$1, asyncScheduler } from 'rxjs';
16
15
  import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
16
+ import { switchMap, first, map, filter, takeUntil, takeWhile, debounceTime as debounceTime$1, tap as tap$1, shareReplay as shareReplay$1, startWith, distinctUntilChanged, finalize as finalize$1, throttleTime } from 'rxjs/operators';
17
17
  import * as i4$3 from '@angular/material/table';
18
18
  import { MatTableDataSource, MatTableModule } from '@angular/material/table';
19
19
  import { DataSource, SelectionModel } from '@angular/cdk/collections';
@@ -77,34 +77,6 @@ import * as i1$9 from '@angular/common/http';
77
77
  import { HttpHeaders } from '@angular/common/http';
78
78
  import { HmacSHA256 } from 'crypto-es/lib/sha256';
79
79
 
80
- class NaturalAbstractController {
81
- constructor() {
82
- /**
83
- * Usage:
84
- *
85
- * ```ts
86
- * import { takeUntil } from 'rxjs/operators';
87
- * .pipe(takeUntil(this.ngUnsubscribe)) // as first pipe on observables that should be destroyed on component destroy
88
- * ```
89
- *
90
- * @deprecated Instead of this, you should create the observable in the constructor or field initializers and use
91
- * Angular native `.pipe(takeUntilDestroyed())`. And most likely subscribe at a later point. We keep this method until
92
- * all existing usages (typically in `ngOnInit()`) are migrated away.
93
- */
94
- this.ngUnsubscribe = new Subject();
95
- }
96
- ngOnDestroy() {
97
- this.ngUnsubscribe.next(); // unsubscribe everybody
98
- this.ngUnsubscribe.complete(); // complete the stream, because we will never emit again
99
- }
100
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalAbstractController, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
101
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.3", type: NaturalAbstractController, isStandalone: true, ngImport: i0 }); }
102
- }
103
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalAbstractController, decorators: [{
104
- type: Directive,
105
- args: [{ standalone: true }]
106
- }] });
107
-
108
80
  class NaturalConfirmComponent {
109
81
  constructor(data) {
110
82
  this.data = data;
@@ -170,9 +142,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImpor
170
142
  }]
171
143
  }], ctorParameters: () => [{ type: i1.MatDialog }, { type: i2.MatSnackBar }] });
172
144
 
173
- class NaturalAbstractPanel extends NaturalAbstractController {
145
+ class NaturalAbstractPanel {
174
146
  constructor() {
175
- super(...arguments);
147
+ this.destroyRef = inject(DestroyRef);
176
148
  /**
177
149
  * The data property is the container where the resolved content is stored
178
150
  * When loading a component from a panel opening (dialog), receives the data provided by the service
@@ -205,7 +177,7 @@ class NaturalAbstractPanel extends NaturalAbstractController {
205
177
  if (this.panelData?.data) {
206
178
  if (this.panelData.data.model instanceof Observable) {
207
179
  // Subscribe to model to know when Apollo cache is changed, so we can reflect it into `data.model`
208
- this.panelData.data.model.pipe(takeUntil(this.ngUnsubscribe)).subscribe(model => {
180
+ this.panelData.data.model.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(model => {
209
181
  this.data = {
210
182
  ...this.data,
211
183
  ...this.panelData?.data,
@@ -221,8 +193,8 @@ class NaturalAbstractPanel extends NaturalAbstractController {
221
193
  }
222
194
  }
223
195
  }
224
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalAbstractPanel, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
225
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.3", type: NaturalAbstractPanel, isStandalone: true, host: { listeners: { "click": "clickPanel()" }, properties: { "class.isFrontPanel": "this.isFrontPanel", "class.isPanel": "this.isPanel" } }, usesInheritance: true, ngImport: i0 }); }
196
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalAbstractPanel, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
197
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.3", type: NaturalAbstractPanel, isStandalone: true, host: { listeners: { "click": "clickPanel()" }, properties: { "class.isFrontPanel": "this.isFrontPanel", "class.isPanel": "this.isPanel" } }, ngImport: i0 }); }
226
198
  }
227
199
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalAbstractPanel, decorators: [{
228
200
  type: Directive,
@@ -2389,7 +2361,6 @@ class NaturalAbstractDetail extends NaturalAbstractPanel {
2389
2361
  this.router = inject(Router);
2390
2362
  this.route = inject(ActivatedRoute);
2391
2363
  this._dialogData = inject(MAT_DIALOG_DATA, { optional: true });
2392
- this.destroyRef = inject(DestroyRef);
2393
2364
  /**
2394
2365
  * Once set, this must not change anymore, especially not right after the creation mutation,
2395
2366
  * so the form does not switch from creation mode to update mode without an actual reload of
@@ -2585,9 +2556,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImpor
2585
2556
  *
2586
2557
  * @dynamic
2587
2558
  */
2588
- class NaturalAbstractEditableList extends NaturalAbstractController {
2559
+ class NaturalAbstractEditableList {
2589
2560
  constructor(service) {
2590
- super();
2591
2561
  this.service = service;
2592
2562
  this.formArray = new UntypedFormArray([]);
2593
2563
  this.variablesManager = new NaturalQueryVariablesManager();
@@ -2649,7 +2619,7 @@ class NaturalAbstractEditableList extends NaturalAbstractController {
2649
2619
  validateAllFormControls(this.form);
2650
2620
  }
2651
2621
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalAbstractEditableList, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive }); }
2652
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.3", type: NaturalAbstractEditableList, isStandalone: true, usesInheritance: true, ngImport: i0 }); }
2622
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.3", type: NaturalAbstractEditableList, isStandalone: true, ngImport: i0 }); }
2653
2623
  }
2654
2624
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalAbstractEditableList, decorators: [{
2655
2625
  type: Directive,
@@ -3007,7 +2977,7 @@ class NaturalDropdownService {
3007
2977
  // When click on backdrop, validate result.. ?
3008
2978
  overlayRef
3009
2979
  .backdropClick()
3010
- .pipe(takeUntil$1(dropdownContainer.closed))
2980
+ .pipe(takeUntil(dropdownContainer.closed))
3011
2981
  .subscribe(() => dropdownContainer.close());
3012
2982
  return dropdownRef;
3013
2983
  }
@@ -3683,7 +3653,7 @@ class NaturalDataSource extends DataSource {
3683
3653
  this.ngUnsubscribe = new Subject();
3684
3654
  if (value instanceof Observable) {
3685
3655
  this.internalData = new BehaviorSubject(null);
3686
- value.pipe(takeUntil$1(this.ngUnsubscribe)).subscribe(res => (this.data = res));
3656
+ value.pipe(takeUntil(this.ngUnsubscribe)).subscribe(res => (this.data = res));
3687
3657
  }
3688
3658
  else {
3689
3659
  this.internalData = new BehaviorSubject(value);
@@ -3702,7 +3672,7 @@ class NaturalDataSource extends DataSource {
3702
3672
  this.internalData.next(data);
3703
3673
  }
3704
3674
  connect() {
3705
- return this.internalData.pipe(takeUntil$1(this.ngUnsubscribe), map(data => (data ? data.items : [])));
3675
+ return this.internalData.pipe(takeUntil(this.ngUnsubscribe), map(data => (data ? data.items : [])));
3706
3676
  }
3707
3677
  disconnect() {
3708
3678
  this.ngUnsubscribe.next(); // unsubscribe everybody
@@ -3838,12 +3808,12 @@ class NaturalAbstractList extends NaturalAbstractPanel {
3838
3808
  // But we need parameters from url after NavigationEnd. So proceed in two steps with a flag.
3839
3809
  let isPopState = false;
3840
3810
  this.router.events
3841
- .pipe(takeUntil$1(this.ngUnsubscribe), filter(event => event instanceof NavigationStart && event.navigationTrigger === 'popstate'))
3811
+ .pipe(takeUntilDestroyed(this.destroyRef), filter(event => event instanceof NavigationStart && event.navigationTrigger === 'popstate'))
3842
3812
  .subscribe(() => {
3843
3813
  isPopState = true;
3844
3814
  });
3845
3815
  this.router.events
3846
- .pipe(takeUntil$1(this.ngUnsubscribe), filter(event => event instanceof NavigationEnd && isPopState))
3816
+ .pipe(takeUntilDestroyed(this.destroyRef), filter(event => event instanceof NavigationEnd && isPopState))
3847
3817
  .subscribe(() => {
3848
3818
  isPopState = false; // reset flag
3849
3819
  this.naturalSearchSelections = fromUrl(this.persistenceService.getFromUrl('ns', this.route));
@@ -4054,7 +4024,7 @@ class NaturalAbstractList extends NaturalAbstractPanel {
4054
4024
  // the casting and resolve things in a better way, but that's too much work for now
4055
4025
  return this.service
4056
4026
  .watchAll(this.variablesManager)
4057
- .pipe(takeUntil$1(this.ngUnsubscribe));
4027
+ .pipe(takeUntilDestroyed(this.destroyRef));
4058
4028
  }
4059
4029
  initFromPersisted() {
4060
4030
  if (!this.persistSearch || this.isPanel) {
@@ -4212,7 +4182,7 @@ class NaturalAbstractNavigableList extends NaturalAbstractList {
4212
4182
  super.ngOnInit();
4213
4183
  }
4214
4184
  getDataObservable() {
4215
- return this.service.watchAll(this.variablesManager).pipe(takeUntil$1(this.ngUnsubscribe), map(result => {
4185
+ return this.service.watchAll(this.variablesManager).pipe(takeUntilDestroyed(this.destroyRef), map(result => {
4216
4186
  // On each data arriving, we query children count to show/hide chevron
4217
4187
  const navigableItems = result.items.map(item => {
4218
4188
  const navigableItem = {
@@ -4347,10 +4317,16 @@ function createHttpLink(httpLink, httpBatchLink, options) {
4347
4317
  * Typical usage in a component would be:
4348
4318
  *
4349
4319
  * ```ts
4320
+ * cancellableTimeout(inject(DestroyRef)).subscribe(myCallback);
4321
+ * ```
4322
+ *
4323
+ * or
4324
+ *
4325
+ * ```ts
4350
4326
  * cancellableTimeout(this.ngUnsubscribe).subscribe(myCallback);
4351
4327
  * ```
4352
4328
  *
4353
- * Instead of the more error prone:
4329
+ * Instead of the more error-prone:
4354
4330
  *
4355
4331
  * ```ts
4356
4332
  * public foo(): void {
@@ -4366,9 +4342,7 @@ function createHttpLink(httpLink, httpBatchLink, options) {
4366
4342
  * ```
4367
4343
  */
4368
4344
  function cancellableTimeout(canceller, milliSeconds = 0) {
4369
- return timer(milliSeconds).pipe(take(1), takeUntil(canceller), map$1(() => {
4370
- return;
4371
- }));
4345
+ return timer(milliSeconds).pipe(take(1), canceller instanceof DestroyRef ? takeUntilDestroyed(canceller) : takeUntil$1(canceller), map$1(() => undefined));
4372
4346
  }
4373
4347
  /**
4374
4348
  * For debugging purpose only, will dump in console everything that happen to
@@ -5441,6 +5415,7 @@ class NaturalColumnsPickerComponent {
5441
5415
  }
5442
5416
  constructor(breakpointObserver) {
5443
5417
  this.breakpointObserver = breakpointObserver;
5418
+ this.destroyRef = inject(DestroyRef);
5444
5419
  this._availableColumns = [];
5445
5420
  this.buttons = [];
5446
5421
  /**
@@ -5451,7 +5426,6 @@ class NaturalColumnsPickerComponent {
5451
5426
  * Displayed options in the dropdown menu
5452
5427
  */
5453
5428
  this.displayedColumns = [];
5454
- this.ngUnsubscribe = new Subject();
5455
5429
  this.isMobile = this.breakpointObserver.observe(Breakpoints.XSmall).pipe(map$1(result => result.matches));
5456
5430
  }
5457
5431
  initColumns() {
@@ -5467,7 +5441,7 @@ class NaturalColumnsPickerComponent {
5467
5441
  }
5468
5442
  ngOnChanges(changes) {
5469
5443
  // Unfortunately need a timeout to avoid an ExpressionChangedAfterItHasBeenCheckedError on /state/4989/process
5470
- cancellableTimeout(this.ngUnsubscribe).subscribe(() => {
5444
+ cancellableTimeout(this.destroyRef).subscribe(() => {
5471
5445
  if (changes.availableColumns) {
5472
5446
  this.initColumns();
5473
5447
  this.updateColumns();
@@ -5477,10 +5451,6 @@ class NaturalColumnsPickerComponent {
5477
5451
  }
5478
5452
  });
5479
5453
  }
5480
- ngOnDestroy() {
5481
- this.ngUnsubscribe.next(); // unsubscribe everybody
5482
- this.ngUnsubscribe.complete(); // complete the stream, because we will never emit again
5483
- }
5484
5454
  defaultTrue(value) {
5485
5455
  return value ?? true;
5486
5456
  }
@@ -5545,12 +5515,12 @@ function getTabId(tab) {
5545
5515
  * </mat-tab-group>
5546
5516
  * ```
5547
5517
  */
5548
- class NaturalLinkableTabDirective extends NaturalAbstractController {
5518
+ class NaturalLinkableTabDirective {
5549
5519
  constructor(component, route, router) {
5550
- super();
5551
5520
  this.component = component;
5552
5521
  this.route = route;
5553
5522
  this.router = router;
5523
+ this.destroyRef = inject(DestroyRef);
5554
5524
  /**
5555
5525
  * If false, disables the persistent navigation
5556
5526
  */
@@ -5570,7 +5540,7 @@ class NaturalLinkableTabDirective extends NaturalAbstractController {
5570
5540
  return;
5571
5541
  }
5572
5542
  // When url params change, update the mat-tab-group selected tab
5573
- this.route.fragment.pipe(takeUntil$1(this.ngUnsubscribe)).subscribe(fragment => {
5543
+ this.route.fragment.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(fragment => {
5574
5544
  // Get index of tab that matches wanted name
5575
5545
  const tabIndex = this.getTabIndex(fragment);
5576
5546
  // If tab index is valid (>= 0) go to given fragment
@@ -5580,7 +5550,7 @@ class NaturalLinkableTabDirective extends NaturalAbstractController {
5580
5550
  }
5581
5551
  });
5582
5552
  // When mat-tab-groups selected tab change, update url
5583
- this.component.selectedTabChange.pipe(takeUntil$1(this.ngUnsubscribe)).subscribe(event => {
5553
+ this.component.selectedTabChange.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(event => {
5584
5554
  if (this.isLoadingRouteConfig) {
5585
5555
  return;
5586
5556
  }
@@ -5603,7 +5573,7 @@ class NaturalLinkableTabDirective extends NaturalAbstractController {
5603
5573
  return this.component._tabs.toArray().findIndex(tab => fragment === getTabId(tab));
5604
5574
  }
5605
5575
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalLinkableTabDirective, deps: [{ token: i1$7.MatTabGroup }, { token: i2$3.ActivatedRoute }, { token: i2$3.Router }], target: i0.ɵɵFactoryTarget.Directive }); }
5606
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.3", type: NaturalLinkableTabDirective, isStandalone: true, selector: "mat-tab-group[naturalLinkableTab]", inputs: { naturalLinkableTab: "naturalLinkableTab" }, usesInheritance: true, ngImport: i0 }); }
5576
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.3", type: NaturalLinkableTabDirective, isStandalone: true, selector: "mat-tab-group[naturalLinkableTab]", inputs: { naturalLinkableTab: "naturalLinkableTab" }, ngImport: i0 }); }
5607
5577
  }
5608
5578
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalLinkableTabDirective, decorators: [{
5609
5579
  type: Directive,
@@ -6345,9 +6315,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImpor
6345
6315
  * Public API Surface of natural
6346
6316
  */
6347
6317
 
6348
- class TypeSelectComponent extends NaturalAbstractController {
6318
+ class TypeSelectComponent {
6349
6319
  constructor(data) {
6350
- super();
6320
+ this.destroyRef = inject(DestroyRef);
6351
6321
  this.renderedValue = new BehaviorSubject('');
6352
6322
  this.requireValueCtrl = false;
6353
6323
  this.operators = possibleDiscreteOperators;
@@ -6434,7 +6404,7 @@ class TypeSelectComponent extends NaturalAbstractController {
6434
6404
  const items$ = Array.isArray(this.configuration.items)
6435
6405
  ? of(this.configuration.items)
6436
6406
  : this.configuration.items;
6437
- return items$.pipe(takeUntil$1(this.ngUnsubscribe), map(items => {
6407
+ return items$.pipe(takeUntilDestroyed(this.destroyRef), map(items => {
6438
6408
  this.items = items;
6439
6409
  // Reload selection, according to possible values from configuration
6440
6410
  const possibleIds = this.items.map(item => this.getId(item));
@@ -6490,7 +6460,7 @@ class TypeSelectComponent extends NaturalAbstractController {
6490
6460
  }
6491
6461
  }
6492
6462
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: TypeSelectComponent, deps: [{ token: NATURAL_DROPDOWN_DATA }], target: i0.ɵɵFactoryTarget.Component }); }
6493
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.3", type: TypeSelectComponent, isStandalone: true, selector: "ng-component", viewQueries: [{ propertyName: "list", first: true, predicate: MatSelectionList, descendants: true }], usesInheritance: true, ngImport: i0, template: "<form [formGroup]=\"form\">\n @if (configuration.operators) {\n <mat-form-field style=\"max-width: 7em; margin-right: 1em\">\n <mat-label i18n=\"Mathematical operator < > =\">Op\u00E9rateur</mat-label>\n <mat-select [formControl]=\"operatorCtrl\" [required]=\"true\" panelWidth=\"\">\n @for (item of operators; track item) {\n <mat-option [value]=\"item.key\">\n {{ item.label }}\n </mat-option>\n }\n </mat-select>\n </mat-form-field>\n }\n\n @if (requireValueCtrl) {\n <mat-selection-list [formControl]=\"valueCtrl\">\n @for (item of items; track item) {\n <mat-list-option [value]=\"getId(item)\" togglePosition=\"before\">\n {{ getDisplay(item) }}\n </mat-list-option>\n }\n </mat-selection-list>\n }\n</form>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i3$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3$1.MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i3$2.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i1$3.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: MatOptionModule }, { kind: "ngmodule", type: MatListModule }, { kind: "component", type: i5.MatSelectionList, selector: "mat-selection-list", inputs: ["color", "compareWith", "multiple", "hideSingleSelectionIndicator", "disabled"], outputs: ["selectionChange"], exportAs: ["matSelectionList"] }, { kind: "component", type: i5.MatListOption, selector: "mat-list-option", inputs: ["togglePosition", "checkboxPosition", "color", "value", "selected"], outputs: ["selectedChange"], exportAs: ["matListOption"] }] }); }
6463
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.3", type: TypeSelectComponent, isStandalone: true, selector: "ng-component", viewQueries: [{ propertyName: "list", first: true, predicate: MatSelectionList, descendants: true }], ngImport: i0, template: "<form [formGroup]=\"form\">\n @if (configuration.operators) {\n <mat-form-field style=\"max-width: 7em; margin-right: 1em\">\n <mat-label i18n=\"Mathematical operator < > =\">Op\u00E9rateur</mat-label>\n <mat-select [formControl]=\"operatorCtrl\" [required]=\"true\" panelWidth=\"\">\n @for (item of operators; track item) {\n <mat-option [value]=\"item.key\">\n {{ item.label }}\n </mat-option>\n }\n </mat-select>\n </mat-form-field>\n }\n\n @if (requireValueCtrl) {\n <mat-selection-list [formControl]=\"valueCtrl\">\n @for (item of items; track item) {\n <mat-list-option [value]=\"getId(item)\" togglePosition=\"before\">\n {{ getDisplay(item) }}\n </mat-list-option>\n }\n </mat-selection-list>\n }\n</form>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i3$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3$1.MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i3$2.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i1$3.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: MatOptionModule }, { kind: "ngmodule", type: MatListModule }, { kind: "component", type: i5.MatSelectionList, selector: "mat-selection-list", inputs: ["color", "compareWith", "multiple", "hideSingleSelectionIndicator", "disabled"], outputs: ["selectionChange"], exportAs: ["matSelectionList"] }, { kind: "component", type: i5.MatListOption, selector: "mat-list-option", inputs: ["togglePosition", "checkboxPosition", "color", "value", "selected"], outputs: ["selectedChange"], exportAs: ["matListOption"] }] }); }
6494
6464
  }
6495
6465
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: TypeSelectComponent, decorators: [{
6496
6466
  type: Component,
@@ -6614,7 +6584,7 @@ class ExternalFormControlMatcher extends ErrorStateMatcher {
6614
6584
  return false;
6615
6585
  }
6616
6586
  }
6617
- class AbstractSelect extends NaturalAbstractController {
6587
+ class AbstractSelect {
6618
6588
  /**
6619
6589
  * If the field is required
6620
6590
  */
@@ -6626,7 +6596,6 @@ class AbstractSelect extends NaturalAbstractController {
6626
6596
  return !!this._required;
6627
6597
  }
6628
6598
  constructor(ngControl) {
6629
- super();
6630
6599
  this.ngControl = ngControl;
6631
6600
  /**
6632
6601
  * Mat-hint
@@ -6759,7 +6728,7 @@ class AbstractSelect extends NaturalAbstractController {
6759
6728
  this.internalCtrl.updateValueAndValidity();
6760
6729
  }
6761
6730
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: AbstractSelect, deps: [{ token: i2$2.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Directive }); }
6762
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.3", type: AbstractSelect, isStandalone: true, inputs: { placeholder: "placeholder", hint: "hint", required: "required", navigateTo: "navigateTo", clearLabel: "clearLabel", showIcon: "showIcon", icon: "icon", displayWith: "displayWith", disabled: "disabled" }, outputs: { selectionChange: "selectionChange", blur: "blur" }, usesInheritance: true, ngImport: i0 }); }
6731
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.3", type: AbstractSelect, isStandalone: true, inputs: { placeholder: "placeholder", hint: "hint", required: "required", navigateTo: "navigateTo", clearLabel: "clearLabel", showIcon: "showIcon", icon: "icon", displayWith: "displayWith", disabled: "disabled" }, outputs: { selectionChange: "selectionChange", blur: "blur" }, ngImport: i0 }); }
6763
6732
  }
6764
6733
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: AbstractSelect, decorators: [{
6765
6734
  type: Directive,
@@ -6827,6 +6796,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImpor
6827
6796
  class NaturalSelectComponent extends AbstractSelect {
6828
6797
  constructor() {
6829
6798
  super(...arguments);
6799
+ this.destroyRef = inject(DestroyRef);
6830
6800
  /**
6831
6801
  * If false, allows to input free string without selecting an option from autocomplete suggestions
6832
6802
  */
@@ -6887,7 +6857,7 @@ class NaturalSelectComponent extends AbstractSelect {
6887
6857
  }
6888
6858
  ngAfterViewInit() {
6889
6859
  this.internalCtrl.valueChanges
6890
- .pipe(takeUntil$1(this.ngUnsubscribe), distinctUntilChanged(), debounceTime$1(300))
6860
+ .pipe(takeUntilDestroyed(this.destroyRef), distinctUntilChanged(), debounceTime$1(300))
6891
6861
  .subscribe(val => this.search(val));
6892
6862
  }
6893
6863
  onInternalFormChange() {
@@ -6946,7 +6916,7 @@ class NaturalSelectComponent extends AbstractSelect {
6946
6916
  return;
6947
6917
  }
6948
6918
  // Init query, and when query results arrive, finish loading, and count items
6949
- this.items = this.service.watchAll(this.variablesManager).pipe(takeUntil$1(this.ngUnsubscribe), finalize$1(() => (this.loading = false)), map(data => {
6919
+ this.items = this.service.watchAll(this.variablesManager).pipe(takeUntilDestroyed(this.destroyRef), finalize$1(() => (this.loading = false)), map(data => {
6950
6920
  this.loading = false;
6951
6921
  this.nbTotal = data.length;
6952
6922
  const nbListed = Math.min(data.length, this.pageSize);
@@ -8029,10 +7999,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImpor
8029
7999
  type: Input
8030
8000
  }] } });
8031
8001
 
8032
- class NaturalHierarchicSelectorComponent extends NaturalAbstractController {
8002
+ class NaturalHierarchicSelectorComponent {
8033
8003
  constructor(hierarchicSelectorService) {
8034
- super();
8035
8004
  this.hierarchicSelectorService = hierarchicSelectorService;
8005
+ this.destroyRef = inject(DestroyRef);
8036
8006
  /**
8037
8007
  * If multiple or single item selection
8038
8008
  */
@@ -8099,7 +8069,7 @@ class NaturalHierarchicSelectorComponent extends NaturalAbstractController {
8099
8069
  // Update dataSource when receiving new list -> we assign the whole tree
8100
8070
  // The treeControl and treeFlattener will generate the displayed tree
8101
8071
  this.hierarchicSelectorService.dataChange
8102
- .pipe(takeUntil$1(this.ngUnsubscribe))
8072
+ .pipe(takeUntilDestroyed(this.destroyRef))
8103
8073
  .subscribe(data => (this.dataSource.data = data));
8104
8074
  // Prevent empty screen on first load and init NaturalHierarchicSelectorService with inputted configuration
8105
8075
  let variables;
@@ -8346,7 +8316,7 @@ class NaturalHierarchicSelectorComponent extends NaturalAbstractController {
8346
8316
  return model.__typename + '-' + model.id;
8347
8317
  }
8348
8318
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalHierarchicSelectorComponent, deps: [{ token: NaturalHierarchicSelectorService }], target: i0.ɵɵFactoryTarget.Component }); }
8349
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.3", type: NaturalHierarchicSelectorComponent, isStandalone: true, selector: "natural-hierarchic-selector", inputs: { displayWith: "displayWith", config: "config", multiple: "multiple", selected: "selected", allowUnselect: "allowUnselect", filters: "filters", searchFacets: "searchFacets", searchSelections: "searchSelections" }, outputs: { searchSelectionChange: "searchSelectionChange", selectionChange: "selectionChange" }, providers: [NaturalHierarchicSelectorService], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div [style.margin-bottom.px]=\"20\">\n <natural-search (selectionChange)=\"search($event)\" [facets]=\"searchFacets\" [selections]=\"searchSelections\" />\n</div>\n\n<div class=\"body\">\n @if (loading) {\n <mat-progress-spinner [diameter]=\"36\" mode=\"indeterminate\" style=\"margin: 10px\" />\n }\n\n <mat-tree [dataSource]=\"dataSource\" [treeControl]=\"treeControl\">\n <mat-tree-node *matTreeNodeDef=\"let node\" [ngClass]=\"{leaf: !node.expandable}\" matTreeNodePadding>\n @if (node.expandable) {\n <button\n (click)=\"loadChildren(node)\"\n [attr.aria-label]=\"'toggle ' + node.name\"\n mat-icon-button\n matTreeNodeToggle\n >\n @if (node.loading) {\n <mat-progress-spinner [diameter]=\"24\" [strokeWidth]=\"5\" mode=\"indeterminate\" />\n }\n @if (!node.loading) {\n <mat-icon [naturalIcon]=\"treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'\" />\n }\n </button>\n }\n\n <mat-checkbox\n (change)=\"toggleFlatNode(node)\"\n [checked]=\"flatNodesSelection.isSelected(node)\"\n [disabled]=\"!isNodeTogglable(node)\"\n style=\"margin-right: 10px\"\n >\n @if (node.node.config.icon) {\n <mat-icon [naturalIcon]=\"node.node.config.icon\" style=\"margin-right: 10px\" />\n }\n <span>{{ node.name }}</span>\n </mat-checkbox>\n </mat-tree-node>\n </mat-tree>\n\n <mat-chip-listbox aria-orientation=\"vertical\" class=\"mat-mdc-chip-set-stacked\">\n @for (node of selectedNodes; track node.model.id) {\n <mat-chip-option (removed)=\"unselectModelNode(node)\" [removable]=\"true\" [selectable]=\"false\">\n @if (node.config.icon) {\n <mat-icon [naturalIcon]=\"node.config.icon\" />\n }\n <div class=\"mat-body chip-label\">{{ node.model.name || node.model.fullName }}</div>\n <button matChipRemove>\n <mat-icon naturalIcon=\"cancel\" />\n </button>\n </mat-chip-option>\n }\n </mat-chip-listbox>\n</div>\n\n@if (!loading && !dataSource.data.length) {\n <div i18n>Aucun r\u00E9sultat</div>\n}\n", styles: [":host{display:block}:host ul,:host li{-webkit-margin-before:0;-webkit-margin-after:0;list-style-type:none}:host mat-icon{width:18px;height:18px;font-size:18px}:host .mat-tree-node.leaf{margin-left:48px}:host .body{display:flex;flex-direction:row;justify-content:space-between}:host .body mat-tree{flex:66}:host .body mat-chip-listbox{flex:33}:host mat-tree{flex-shrink:0}:host mat-chip-listbox{margin-left:10px}\n"], dependencies: [{ kind: "component", type: NaturalSearchComponent, selector: "natural-search", inputs: ["placeholder", "facets", "multipleGroups", "dropdownTitle", "selections"], outputs: ["selectionChange"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2$5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i8.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "ngmodule", type: MatTreeModule }, { kind: "directive", type: i4$2.MatTreeNodeDef, selector: "[matTreeNodeDef]", inputs: ["matTreeNodeDefWhen", "matTreeNode"] }, { kind: "directive", type: i4$2.MatTreeNodePadding, selector: "[matTreeNodePadding]", inputs: ["matTreeNodePadding", "matTreeNodePaddingIndent"] }, { kind: "directive", type: i4$2.MatTreeNodeToggle, selector: "[matTreeNodeToggle]", inputs: ["matTreeNodeToggleRecursive"] }, { kind: "component", type: i4$2.MatTree, selector: "mat-tree", exportAs: ["matTree"] }, { kind: "directive", type: i4$2.MatTreeNode, selector: "mat-tree-node", inputs: ["tabIndex", "disabled"], outputs: ["activation", "expandedChange"], exportAs: ["matTreeNode"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i3.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1$5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NaturalIconDirective, selector: "mat-icon[naturalIcon]", inputs: ["naturalIcon", "size"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i7.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "ngmodule", type: MatChipsModule }, { kind: "component", type: i8$1.MatChipListbox, selector: "mat-chip-listbox", inputs: ["multiple", "aria-orientation", "selectable", "compareWith", "required", "hideSingleSelectionIndicator", "value"], outputs: ["change"] }, { kind: "component", type: i8$1.MatChipOption, selector: "mat-basic-chip-option, [mat-basic-chip-option], mat-chip-option, [mat-chip-option]", inputs: ["selectable", "selected"], outputs: ["selectionChange"] }, { kind: "directive", type: i8$1.MatChipRemove, selector: "[matChipRemove]" }] }); }
8319
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.3", type: NaturalHierarchicSelectorComponent, isStandalone: true, selector: "natural-hierarchic-selector", inputs: { displayWith: "displayWith", config: "config", multiple: "multiple", selected: "selected", allowUnselect: "allowUnselect", filters: "filters", searchFacets: "searchFacets", searchSelections: "searchSelections" }, outputs: { searchSelectionChange: "searchSelectionChange", selectionChange: "selectionChange" }, providers: [NaturalHierarchicSelectorService], usesOnChanges: true, ngImport: i0, template: "<div [style.margin-bottom.px]=\"20\">\n <natural-search (selectionChange)=\"search($event)\" [facets]=\"searchFacets\" [selections]=\"searchSelections\" />\n</div>\n\n<div class=\"body\">\n @if (loading) {\n <mat-progress-spinner [diameter]=\"36\" mode=\"indeterminate\" style=\"margin: 10px\" />\n }\n\n <mat-tree [dataSource]=\"dataSource\" [treeControl]=\"treeControl\">\n <mat-tree-node *matTreeNodeDef=\"let node\" [ngClass]=\"{leaf: !node.expandable}\" matTreeNodePadding>\n @if (node.expandable) {\n <button\n (click)=\"loadChildren(node)\"\n [attr.aria-label]=\"'toggle ' + node.name\"\n mat-icon-button\n matTreeNodeToggle\n >\n @if (node.loading) {\n <mat-progress-spinner [diameter]=\"24\" [strokeWidth]=\"5\" mode=\"indeterminate\" />\n }\n @if (!node.loading) {\n <mat-icon [naturalIcon]=\"treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'\" />\n }\n </button>\n }\n\n <mat-checkbox\n (change)=\"toggleFlatNode(node)\"\n [checked]=\"flatNodesSelection.isSelected(node)\"\n [disabled]=\"!isNodeTogglable(node)\"\n style=\"margin-right: 10px\"\n >\n @if (node.node.config.icon) {\n <mat-icon [naturalIcon]=\"node.node.config.icon\" style=\"margin-right: 10px\" />\n }\n <span>{{ node.name }}</span>\n </mat-checkbox>\n </mat-tree-node>\n </mat-tree>\n\n <mat-chip-listbox aria-orientation=\"vertical\" class=\"mat-mdc-chip-set-stacked\">\n @for (node of selectedNodes; track node.model.id) {\n <mat-chip-option (removed)=\"unselectModelNode(node)\" [removable]=\"true\" [selectable]=\"false\">\n @if (node.config.icon) {\n <mat-icon [naturalIcon]=\"node.config.icon\" />\n }\n <div class=\"mat-body chip-label\">{{ node.model.name || node.model.fullName }}</div>\n <button matChipRemove>\n <mat-icon naturalIcon=\"cancel\" />\n </button>\n </mat-chip-option>\n }\n </mat-chip-listbox>\n</div>\n\n@if (!loading && !dataSource.data.length) {\n <div i18n>Aucun r\u00E9sultat</div>\n}\n", styles: [":host{display:block}:host ul,:host li{-webkit-margin-before:0;-webkit-margin-after:0;list-style-type:none}:host mat-icon{width:18px;height:18px;font-size:18px}:host .mat-tree-node.leaf{margin-left:48px}:host .body{display:flex;flex-direction:row;justify-content:space-between}:host .body mat-tree{flex:66}:host .body mat-chip-listbox{flex:33}:host mat-tree{flex-shrink:0}:host mat-chip-listbox{margin-left:10px}\n"], dependencies: [{ kind: "component", type: NaturalSearchComponent, selector: "natural-search", inputs: ["placeholder", "facets", "multipleGroups", "dropdownTitle", "selections"], outputs: ["selectionChange"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2$5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i8.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "ngmodule", type: MatTreeModule }, { kind: "directive", type: i4$2.MatTreeNodeDef, selector: "[matTreeNodeDef]", inputs: ["matTreeNodeDefWhen", "matTreeNode"] }, { kind: "directive", type: i4$2.MatTreeNodePadding, selector: "[matTreeNodePadding]", inputs: ["matTreeNodePadding", "matTreeNodePaddingIndent"] }, { kind: "directive", type: i4$2.MatTreeNodeToggle, selector: "[matTreeNodeToggle]", inputs: ["matTreeNodeToggleRecursive"] }, { kind: "component", type: i4$2.MatTree, selector: "mat-tree", exportAs: ["matTree"] }, { kind: "directive", type: i4$2.MatTreeNode, selector: "mat-tree-node", inputs: ["tabIndex", "disabled"], outputs: ["activation", "expandedChange"], exportAs: ["matTreeNode"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i3.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1$5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NaturalIconDirective, selector: "mat-icon[naturalIcon]", inputs: ["naturalIcon", "size"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i7.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "ngmodule", type: MatChipsModule }, { kind: "component", type: i8$1.MatChipListbox, selector: "mat-chip-listbox", inputs: ["multiple", "aria-orientation", "selectable", "compareWith", "required", "hideSingleSelectionIndicator", "value"], outputs: ["change"] }, { kind: "component", type: i8$1.MatChipOption, selector: "mat-basic-chip-option, [mat-basic-chip-option], mat-chip-option, [mat-chip-option]", inputs: ["selectable", "selected"], outputs: ["selectionChange"] }, { kind: "directive", type: i8$1.MatChipRemove, selector: "[matChipRemove]" }] }); }
8350
8320
  }
8351
8321
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalHierarchicSelectorComponent, decorators: [{
8352
8322
  type: Component,
@@ -8843,9 +8813,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImpor
8843
8813
  *
8844
8814
  * @dynamic
8845
8815
  */
8846
- class NaturalAbstractFile extends NaturalAbstractController {
8816
+ class NaturalAbstractFile {
8847
8817
  constructor(element, naturalFileService, document) {
8848
- super();
8849
8818
  this.element = element;
8850
8819
  this.naturalFileService = naturalFileService;
8851
8820
  this.document = document;
@@ -8895,7 +8864,6 @@ class NaturalAbstractFile extends NaturalAbstractController {
8895
8864
  this.filesChange = new EventEmitter();
8896
8865
  }
8897
8866
  ngOnDestroy() {
8898
- super.ngOnDestroy();
8899
8867
  delete this.fileElement; // faster memory release of dom element
8900
8868
  }
8901
8869
  ngOnInit() {
@@ -9027,7 +8995,7 @@ class NaturalAbstractFile extends NaturalAbstractController {
9027
8995
  }));
9028
8996
  }
9029
8997
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalAbstractFile, deps: [{ token: i0.ElementRef }, { token: NaturalFileService }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Directive }); }
9030
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.3", type: NaturalAbstractFile, isStandalone: true, inputs: { multiple: "multiple", accept: "accept", maxSize: "maxSize", fileSelectionDisabled: "fileSelectionDisabled", selectable: "selectable", broadcast: "broadcast" }, outputs: { fileChange: "fileChange", filesChange: "filesChange" }, host: { listeners: { "change": "onChange($event)" } }, usesInheritance: true, usesOnChanges: true, ngImport: i0 }); }
8998
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.3", type: NaturalAbstractFile, isStandalone: true, inputs: { multiple: "multiple", accept: "accept", maxSize: "maxSize", fileSelectionDisabled: "fileSelectionDisabled", selectable: "selectable", broadcast: "broadcast" }, outputs: { fileChange: "fileChange", filesChange: "filesChange" }, host: { listeners: { "change": "onChange($event)" } }, usesOnChanges: true, ngImport: i0 }); }
9031
8999
  }
9032
9000
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalAbstractFile, decorators: [{
9033
9001
  type: Directive,
@@ -9072,6 +9040,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImpor
9072
9040
  class NaturalFileDropDirective extends NaturalAbstractFile {
9073
9041
  constructor() {
9074
9042
  super(...arguments);
9043
+ this.destroyRef = inject(DestroyRef);
9075
9044
  this.fileOverClass = false;
9076
9045
  /**
9077
9046
  * Emits whenever files are being dragged over
@@ -9086,7 +9055,7 @@ class NaturalFileDropDirective extends NaturalAbstractFile {
9086
9055
  // It's not absolutely perfect and if dragging slowly and precisely we can
9087
9056
  // still see flicker, but it should be better for most normal usages.
9088
9057
  this.rawFileOver
9089
- .pipe(takeUntil$1(this.ngUnsubscribe), throttleTime(200, asyncScheduler, {
9058
+ .pipe(takeUntilDestroyed(this.destroyRef), throttleTime(200, asyncScheduler, {
9090
9059
  leading: true,
9091
9060
  trailing: true,
9092
9061
  }))
@@ -9944,14 +9913,14 @@ const fallbackIfNoOpenedPanels = (segments) => {
9944
9913
  * </natural-relations>
9945
9914
  * ```
9946
9915
  */
9947
- class NaturalRelationsComponent extends NaturalAbstractController {
9916
+ class NaturalRelationsComponent {
9948
9917
  get service() {
9949
9918
  return this._service;
9950
9919
  }
9951
9920
  set service(service) {
9952
9921
  this._service = service;
9953
9922
  this.loading = true;
9954
- const items$ = this._service.watchAll(this.variablesManager).pipe(takeUntil(this.ngUnsubscribe), tap({
9923
+ const items$ = this._service.watchAll(this.variablesManager).pipe(takeUntilDestroyed(this.destroyRef), tap({
9955
9924
  next: () => (this.loading = false),
9956
9925
  complete: () => (this.loading = false),
9957
9926
  error: () => (this.loading = false),
@@ -9959,9 +9928,9 @@ class NaturalRelationsComponent extends NaturalAbstractController {
9959
9928
  this.dataSource = new NaturalDataSource(items$);
9960
9929
  }
9961
9930
  constructor(linkMutationService, hierarchicSelectorDialog) {
9962
- super();
9963
9931
  this.linkMutationService = linkMutationService;
9964
9932
  this.hierarchicSelectorDialog = hierarchicSelectorDialog;
9933
+ this.destroyRef = inject(DestroyRef);
9965
9934
  /**
9966
9935
  * The placeholder used in the button to add a new relation
9967
9936
  */
@@ -10087,7 +10056,7 @@ class NaturalRelationsComponent extends NaturalAbstractController {
10087
10056
  return this.hierarchicSelectorConfig.find(c => !!c.selectableAtKey)?.selectableAtKey;
10088
10057
  }
10089
10058
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalRelationsComponent, deps: [{ token: NaturalLinkMutationService }, { token: NaturalHierarchicSelectorDialogService }], target: i0.ɵɵFactoryTarget.Component }); }
10090
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.3", type: NaturalRelationsComponent, isStandalone: true, selector: "natural-relations", inputs: { service: "service", placeholder: "placeholder", autocompleteSelectorFilter: "autocompleteSelectorFilter", displayWith: "displayWith", disabled: "disabled", main: "main", hierarchicSelectorFilters: "hierarchicSelectorFilters", hierarchicSelectorConfig: "hierarchicSelectorConfig", otherName: "otherName", filter: "filter" }, outputs: { selectionChange: "selectionChange" }, queries: [{ propertyName: "itemTemplate", first: true, predicate: TemplateRef, descendants: true }], viewQueries: [{ propertyName: "select", first: true, predicate: NaturalSelectComponent, descendants: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div class=\"body\">\n <ng-template #defaultNameCell let-item=\"item\">\n {{ getDisplayFn()(item) }}\n </ng-template>\n\n <table [dataSource]=\"dataSource\" class=\"natural-row-click\" mat-table>\n <tr *matHeaderRowDef=\"displayedColumns\" mat-header-row style=\"display: none\"></tr>\n <tr *matRowDef=\"let row; columns: displayedColumns\" mat-row></tr>\n\n <ng-container matColumnDef=\"name\">\n <th *matHeaderCellDef i18n mat-header-cell>Titre</th>\n <td *matCellDef=\"let item\" mat-cell>\n <ng-template\n [ngTemplateOutletContext]=\"{item: item}\"\n [ngTemplateOutlet]=\"itemTemplate ? itemTemplate : defaultNameCell\"\n />\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"unlink\">\n <th *matHeaderCellDef mat-header-cell></th>\n <td *matCellDef=\"let element\" mat-cell>\n @if (!disabled) {\n <button\n (click)=\"removeRelation(element)\"\n [disabled]=\"removing.has(element)\"\n color=\"warn\"\n mat-icon-button\n i18n-matTooltip\n matTooltip=\"Dissocier\"\n >\n <mat-icon naturalIcon=\"link_off\" />\n </button>\n }\n </td>\n </ng-container>\n </table>\n\n @if (dataSource.data && (dataSource.data.length || 0) > (dataSource.data.pageSize || 0)) {\n <mat-paginator\n (page)=\"pagination($event)\"\n [length]=\"dataSource.data.length || 0\"\n [pageIndex]=\"dataSource.data.pageIndex || 0\"\n [pageSizeOptions]=\"pageSizeOptions\"\n [pageSize]=\"dataSource.data.pageSize || 0\"\n />\n }\n\n @if (!loading && dataSource.data?.length === 0) {\n <div class=\"nat-margin-vertical mat-body\">\n <span i18n>Aucun r\u00E9sultat</span>\n </div>\n }\n\n @if (loading) {\n <mat-progress-spinner [diameter]=\"40\" class=\"loading\" mode=\"indeterminate\" />\n }\n</div>\n\n@if (!disabled) {\n @if (hierarchicSelectorConfig) {\n <div>\n <button (click)=\"openNaturalHierarchicSelector()\" color=\"primary\" mat-flat-button>{{ placeholder }}</button>\n </div>\n } @else {\n <natural-select\n (selectionChange)=\"addRelations([$event])\"\n [displayWith]=\"$any(getDisplayFn())\"\n [filter]=\"autocompleteSelectorFilter\"\n [placeholder]=\"placeholder\"\n [service]=\"service\"\n [showIcon]=\"false\"\n />\n }\n}\n", styles: [":host{display:flex;flex-direction:column}:host>*:not(:last-child){margin-bottom:20px}:host .body{display:flex;flex-direction:column}:host .loading{margin:20px auto}:host .mat-column-unlink{width:2.5em}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2$5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: MatTableModule }, { kind: "component", type: i4$3.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i4$3.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i4$3.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i4$3.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i4$3.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i4$3.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i4$3.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i4$3.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i4$3.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i4$3.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i3.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i3.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i7$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1$5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NaturalIconDirective, selector: "mat-icon[naturalIcon]", inputs: ["naturalIcon", "size"] }, { kind: "ngmodule", type: MatPaginatorModule }, { kind: "component", type: i8$2.MatPaginator, selector: "mat-paginator", inputs: ["color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig", "disabled"], outputs: ["page"], exportAs: ["matPaginator"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i8.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "component", type: NaturalSelectComponent, selector: "natural-select", inputs: ["service", "optionRequired", "searchField", "searchOperator", "filter", "disabled"] }] }); }
10059
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.3", type: NaturalRelationsComponent, isStandalone: true, selector: "natural-relations", inputs: { service: "service", placeholder: "placeholder", autocompleteSelectorFilter: "autocompleteSelectorFilter", displayWith: "displayWith", disabled: "disabled", main: "main", hierarchicSelectorFilters: "hierarchicSelectorFilters", hierarchicSelectorConfig: "hierarchicSelectorConfig", otherName: "otherName", filter: "filter" }, outputs: { selectionChange: "selectionChange" }, queries: [{ propertyName: "itemTemplate", first: true, predicate: TemplateRef, descendants: true }], viewQueries: [{ propertyName: "select", first: true, predicate: NaturalSelectComponent, descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"body\">\n <ng-template #defaultNameCell let-item=\"item\">\n {{ getDisplayFn()(item) }}\n </ng-template>\n\n <table [dataSource]=\"dataSource\" class=\"natural-row-click\" mat-table>\n <tr *matHeaderRowDef=\"displayedColumns\" mat-header-row style=\"display: none\"></tr>\n <tr *matRowDef=\"let row; columns: displayedColumns\" mat-row></tr>\n\n <ng-container matColumnDef=\"name\">\n <th *matHeaderCellDef i18n mat-header-cell>Titre</th>\n <td *matCellDef=\"let item\" mat-cell>\n <ng-template\n [ngTemplateOutletContext]=\"{item: item}\"\n [ngTemplateOutlet]=\"itemTemplate ? itemTemplate : defaultNameCell\"\n />\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"unlink\">\n <th *matHeaderCellDef mat-header-cell></th>\n <td *matCellDef=\"let element\" mat-cell>\n @if (!disabled) {\n <button\n (click)=\"removeRelation(element)\"\n [disabled]=\"removing.has(element)\"\n color=\"warn\"\n mat-icon-button\n i18n-matTooltip\n matTooltip=\"Dissocier\"\n >\n <mat-icon naturalIcon=\"link_off\" />\n </button>\n }\n </td>\n </ng-container>\n </table>\n\n @if (dataSource.data && (dataSource.data.length || 0) > (dataSource.data.pageSize || 0)) {\n <mat-paginator\n (page)=\"pagination($event)\"\n [length]=\"dataSource.data.length || 0\"\n [pageIndex]=\"dataSource.data.pageIndex || 0\"\n [pageSizeOptions]=\"pageSizeOptions\"\n [pageSize]=\"dataSource.data.pageSize || 0\"\n />\n }\n\n @if (!loading && dataSource.data?.length === 0) {\n <div class=\"nat-margin-vertical mat-body\">\n <span i18n>Aucun r\u00E9sultat</span>\n </div>\n }\n\n @if (loading) {\n <mat-progress-spinner [diameter]=\"40\" class=\"loading\" mode=\"indeterminate\" />\n }\n</div>\n\n@if (!disabled) {\n @if (hierarchicSelectorConfig) {\n <div>\n <button (click)=\"openNaturalHierarchicSelector()\" color=\"primary\" mat-flat-button>{{ placeholder }}</button>\n </div>\n } @else {\n <natural-select\n (selectionChange)=\"addRelations([$event])\"\n [displayWith]=\"$any(getDisplayFn())\"\n [filter]=\"autocompleteSelectorFilter\"\n [placeholder]=\"placeholder\"\n [service]=\"service\"\n [showIcon]=\"false\"\n />\n }\n}\n", styles: [":host{display:flex;flex-direction:column}:host>*:not(:last-child){margin-bottom:20px}:host .body{display:flex;flex-direction:column}:host .loading{margin:20px auto}:host .mat-column-unlink{width:2.5em}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2$5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: MatTableModule }, { kind: "component", type: i4$3.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i4$3.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i4$3.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i4$3.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i4$3.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i4$3.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i4$3.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i4$3.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i4$3.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i4$3.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i3.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i3.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i7$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1$5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NaturalIconDirective, selector: "mat-icon[naturalIcon]", inputs: ["naturalIcon", "size"] }, { kind: "ngmodule", type: MatPaginatorModule }, { kind: "component", type: i8$2.MatPaginator, selector: "mat-paginator", inputs: ["color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig", "disabled"], outputs: ["page"], exportAs: ["matPaginator"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i8.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "component", type: NaturalSelectComponent, selector: "natural-select", inputs: ["service", "optionRequired", "searchField", "searchOperator", "filter", "disabled"] }] }); }
10091
10060
  }
10092
10061
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalRelationsComponent, decorators: [{
10093
10062
  type: Component,
@@ -10378,13 +10347,13 @@ function assert(value) {
10378
10347
  * https://github.com/angular/material2/issues/6743
10379
10348
  * Maybe the better is to wait next release
10380
10349
  */
10381
- class NaturalSidenavService extends NaturalAbstractController {
10350
+ class NaturalSidenavService {
10382
10351
  constructor(breakpointObserver, router, sessionStorage, naturalSidenavStackService) {
10383
- super();
10384
10352
  this.breakpointObserver = breakpointObserver;
10385
10353
  this.router = router;
10386
10354
  this.sessionStorage = sessionStorage;
10387
10355
  this.naturalSidenavStackService = naturalSidenavStackService;
10356
+ this.destroyRef = inject(DestroyRef);
10388
10357
  /**
10389
10358
  * Navigation modes
10390
10359
  * First is for desktop view
@@ -10446,7 +10415,7 @@ class NaturalSidenavService extends NaturalAbstractController {
10446
10415
  let oldIsBig = null;
10447
10416
  this.breakpointObserver
10448
10417
  .observe([Breakpoints.XSmall, Breakpoints.Small])
10449
- .pipe(takeUntil$1(this.ngUnsubscribe))
10418
+ .pipe(takeUntilDestroyed(this.destroyRef))
10450
10419
  .subscribe(r => {
10451
10420
  this._isMobileView = r.matches;
10452
10421
  const isBig = !this._isMobileView;
@@ -10467,7 +10436,7 @@ class NaturalSidenavService extends NaturalAbstractController {
10467
10436
  });
10468
10437
  if (autoClose) {
10469
10438
  this.router.events
10470
- .pipe(takeUntil$1(this.ngUnsubscribe), filter(e => e instanceof NavigationEnd))
10439
+ .pipe(takeUntilDestroyed(this.destroyRef), filter(e => e instanceof NavigationEnd))
10471
10440
  .subscribe(() => {
10472
10441
  this.navItemClicked();
10473
10442
  });
@@ -11636,5 +11605,5 @@ function graphqlQuerySigner(key) {
11636
11605
  * Generated bundle index. Do not edit.
11637
11606
  */
11638
11607
 
11639
- export { AvatarService, InvalidWithValueStateMatcher$1 as InvalidWithValueStateMatcher, LOCAL_STORAGE, NATURAL_DROPDOWN_DATA, NATURAL_ICONS_CONFIG, NATURAL_PERSISTENCE_VALIDATOR, NATURAL_SEO_CONFIG, NaturalAbstractController, NaturalAbstractDetail, NaturalAbstractEditableList, NaturalAbstractList, NaturalAbstractModelService, NaturalAbstractNavigableList, NaturalAbstractPanel, NaturalAlertService, NaturalAvatarComponent, NaturalBackgroundDensityDirective, NaturalCapitalizePipe, NaturalColumnsPickerComponent, NaturalConfirmComponent, NaturalDataSource, NaturalDebounceService, NaturalDetailHeaderComponent, NaturalDialogTriggerComponent, NaturalDropdownRef, NaturalEllipsisPipe, NaturalEnumPipe, NaturalEnumService, NaturalErrorHandler, NaturalFileComponent, NaturalFileDropDirective, NaturalFileSelectDirective, NaturalFileService, NaturalFixedButtonComponent, NaturalFixedButtonDetailComponent, NaturalHierarchicSelectorComponent, NaturalHierarchicSelectorDialogComponent, NaturalHierarchicSelectorDialogService, NaturalHierarchicSelectorService, NaturalHttpPrefixDirective, NaturalIconDirective, NaturalLinkMutationService, NaturalLinkableTabDirective, NaturalLoggerConfigExtra, NaturalLoggerConfigUrl, NaturalMatomoService, NaturalMemoryStorage, NaturalPanelsComponent, NaturalPanelsService, NaturalPersistenceService, NaturalQueryVariablesManager, NaturalRelationsComponent, NaturalSearchComponent, NaturalSelectComponent, NaturalSelectEnumComponent, NaturalSelectHierarchicComponent, NaturalSeoService, NaturalSidenavComponent, NaturalSidenavContainerComponent, NaturalSidenavContentComponent, NaturalSidenavService, NaturalSidenavStackService, NaturalSrcDensityDirective, NaturalStampComponent, NaturalSwissParsingDateAdapter, NaturalTableButtonComponent, NaturalTimeAgoPipe, PanelsHooksConfig, SESSION_STORAGE, SortingOrder, TypeBooleanComponent, TypeDateComponent, TypeDateRangeComponent, TypeHierarchicSelectorComponent, TypeNaturalSelectComponent, TypeNumberComponent, TypeOptionsComponent, TypeSelectComponent, TypeTextComponent, available, cancellableTimeout, collectErrors, copyToClipboard, createHttpLink, debug, decimal, deepFreeze, deliverableEmail, ensureHttpPrefix, fallbackIfNoOpenedPanels, formatIsoDate, formatIsoDateTime, fromUrl, getForegroundColor, graphqlQuerySigner, ifValid, integer, localStorageFactory, localStorageProvider, makePlural, memoryLocalStorageProvider, memorySessionStorageProvider, mergeOverrideArray, money, naturalPanelsUrlMatcher, naturalProviders, possibleComparableOperators, provideErrorHandler, provideIcons, providePanels, provideSeo, relationsToIds, replaceObjectKeepingReference, replaceOperatorByField, replaceOperatorByName, sessionStorageFactory, sessionStorageProvider, toGraphQLDoctrineFilter, toNavigationParameters, toUrl, unique, upperCaseFirstLetter, urlValidator, validTlds, validateAllFormControls, validateColumns, validatePagination, validateSorting, wrapLike, wrapPrefix, wrapSuffix };
11608
+ export { AvatarService, InvalidWithValueStateMatcher$1 as InvalidWithValueStateMatcher, LOCAL_STORAGE, NATURAL_DROPDOWN_DATA, NATURAL_ICONS_CONFIG, NATURAL_PERSISTENCE_VALIDATOR, NATURAL_SEO_CONFIG, NaturalAbstractDetail, NaturalAbstractEditableList, NaturalAbstractList, NaturalAbstractModelService, NaturalAbstractNavigableList, NaturalAbstractPanel, NaturalAlertService, NaturalAvatarComponent, NaturalBackgroundDensityDirective, NaturalCapitalizePipe, NaturalColumnsPickerComponent, NaturalConfirmComponent, NaturalDataSource, NaturalDebounceService, NaturalDetailHeaderComponent, NaturalDialogTriggerComponent, NaturalDropdownRef, NaturalEllipsisPipe, NaturalEnumPipe, NaturalEnumService, NaturalErrorHandler, NaturalFileComponent, NaturalFileDropDirective, NaturalFileSelectDirective, NaturalFileService, NaturalFixedButtonComponent, NaturalFixedButtonDetailComponent, NaturalHierarchicSelectorComponent, NaturalHierarchicSelectorDialogComponent, NaturalHierarchicSelectorDialogService, NaturalHierarchicSelectorService, NaturalHttpPrefixDirective, NaturalIconDirective, NaturalLinkMutationService, NaturalLinkableTabDirective, NaturalLoggerConfigExtra, NaturalLoggerConfigUrl, NaturalMatomoService, NaturalMemoryStorage, NaturalPanelsComponent, NaturalPanelsService, NaturalPersistenceService, NaturalQueryVariablesManager, NaturalRelationsComponent, NaturalSearchComponent, NaturalSelectComponent, NaturalSelectEnumComponent, NaturalSelectHierarchicComponent, NaturalSeoService, NaturalSidenavComponent, NaturalSidenavContainerComponent, NaturalSidenavContentComponent, NaturalSidenavService, NaturalSidenavStackService, NaturalSrcDensityDirective, NaturalStampComponent, NaturalSwissParsingDateAdapter, NaturalTableButtonComponent, NaturalTimeAgoPipe, PanelsHooksConfig, SESSION_STORAGE, SortingOrder, TypeBooleanComponent, TypeDateComponent, TypeDateRangeComponent, TypeHierarchicSelectorComponent, TypeNaturalSelectComponent, TypeNumberComponent, TypeOptionsComponent, TypeSelectComponent, TypeTextComponent, available, cancellableTimeout, collectErrors, copyToClipboard, createHttpLink, debug, decimal, deepFreeze, deliverableEmail, ensureHttpPrefix, fallbackIfNoOpenedPanels, formatIsoDate, formatIsoDateTime, fromUrl, getForegroundColor, graphqlQuerySigner, ifValid, integer, localStorageFactory, localStorageProvider, makePlural, memoryLocalStorageProvider, memorySessionStorageProvider, mergeOverrideArray, money, naturalPanelsUrlMatcher, naturalProviders, possibleComparableOperators, provideErrorHandler, provideIcons, providePanels, provideSeo, relationsToIds, replaceObjectKeepingReference, replaceOperatorByField, replaceOperatorByName, sessionStorageFactory, sessionStorageProvider, toGraphQLDoctrineFilter, toNavigationParameters, toUrl, unique, upperCaseFirstLetter, urlValidator, validTlds, validateAllFormControls, validateColumns, validatePagination, validateSorting, wrapLike, wrapPrefix, wrapSuffix };
11640
11609
  //# sourceMappingURL=ecodev-natural.mjs.map