@ecodev/natural 63.5.0 → 63.6.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.
@@ -2,16 +2,16 @@ import * as i0 from '@angular/core';
2
2
  import { inject, Component, Injectable, DestroyRef, HostListener, HostBinding, Directive, InjectionToken, ElementRef, viewChild, ViewEncapsulation, Injector, Input, PLATFORM_ID, signal, output, Pipe, Optional, Inject, LOCALE_ID, provideAppInitializer, input, computed, contentChild, TemplateRef, EnvironmentInjector, createEnvironmentInjector, createComponent, runInInjectionContext, ChangeDetectionStrategy, linkedSignal, ErrorHandler, importProvidersFrom } from '@angular/core';
3
3
  import * as i1$2 from '@angular/forms';
4
4
  import { FormGroup, FormArray, Validators, UntypedFormGroup, UntypedFormArray, FormControl, FormsModule, ReactiveFormsModule, UntypedFormControl, NgControl, FormControlDirective, FormControlName } from '@angular/forms';
5
- import { ActivatedRoute, Router, NavigationStart, NavigationEnd, RouteConfigLoadStart, RouteConfigLoadEnd, PRIMARY_OUTLET, RouterLink, NavigationError, DefaultUrlSerializer, UrlTree } from '@angular/router';
5
+ import { NavigationStart, NavigationEnd, ActivatedRoute, Router, RouteConfigLoadStart, RouteConfigLoadEnd, PRIMARY_OUTLET, RouterLink, NavigationError, DefaultUrlSerializer, UrlTree } from '@angular/router';
6
6
  import { pickBy, cloneDeep, uniq, groupBy, mergeWith, defaultsDeep, omit, isEqual, kebabCase, merge, clone, pick, defaults, isEmpty, isObject, intersection, flatten, differenceWith } from 'lodash-es';
7
7
  import * as i1 from '@angular/material/dialog';
8
8
  import { MAT_DIALOG_DATA, MatDialogModule, MatDialog, MatDialogRef } from '@angular/material/dialog';
9
9
  import { MatSnackBar, MatSnackBarModule } from '@angular/material/snack-bar';
10
10
  import * as i2 from '@angular/material/button';
11
11
  import { MatButtonModule } from '@angular/material/button';
12
- 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, filter as filter$1, startWith as startWith$1, asyncScheduler, throwError } from 'rxjs';
12
+ import { Observable, switchMap, take, BehaviorSubject, of, timer, tap, endWith, last, EMPTY, finalize, Subject, merge as merge$1, first as first$1, takeUntil as takeUntil$1, map as map$1, ReplaySubject, debounceTime, raceWith, mergeMap, shareReplay, catchError, forkJoin, combineLatest, from, filter as filter$1, startWith as startWith$1, asyncScheduler, throwError } from 'rxjs';
13
13
  import { takeUntilDestroyed, outputFromObservable } from '@angular/core/rxjs-interop';
14
- 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';
14
+ import { filter, switchMap as switchMap$1, first, map, takeUntil, takeWhile, debounceTime as debounceTime$1, tap as tap$1, shareReplay as shareReplay$1, startWith, distinctUntilChanged, finalize as finalize$1, throttleTime } from 'rxjs/operators';
15
15
  import * as i2$3 from '@angular/material/table';
16
16
  import { MatTableDataSource, MatTableModule } from '@angular/material/table';
17
17
  import { DataSource, SelectionModel } from '@angular/cdk/collections';
@@ -21,7 +21,6 @@ import { Overlay, OverlayConfig } from '@angular/cdk/overlay';
21
21
  import * as i1$1 from '@angular/cdk/portal';
22
22
  import { BasePortalOutlet, CdkPortalOutlet, PortalModule, ComponentPortal } from '@angular/cdk/portal';
23
23
  import { ConfigurableFocusTrapFactory } from '@angular/cdk/a11y';
24
- import { trigger, state, transition, style, animate, sequence, query, group } from '@angular/animations';
25
24
  import * as i6 from '@angular/material/checkbox';
26
25
  import { MatCheckboxModule } from '@angular/material/checkbox';
27
26
  import * as i5 from '@angular/material/datepicker';
@@ -431,6 +430,9 @@ function validateColumns(data) {
431
430
  }
432
431
  return data.split(',').filter(string => string);
433
432
  }
433
+ function onHistoryEvent(router) {
434
+ return router.events.pipe(filter(e => e instanceof NavigationStart && e.navigationTrigger === 'popstate'), switchMap(() => router.events.pipe(filter(e => e instanceof NavigationEnd), take(1))));
435
+ }
434
436
 
435
437
  // Basic; loosely typed structure for graphql-doctrine filters
436
438
  // Logical operator to be used in conditions
@@ -2121,7 +2123,7 @@ function unique(fieldName, excludedId, modelService) {
2121
2123
  };
2122
2124
  const qvm = new NaturalQueryVariablesManager();
2123
2125
  qvm.set('variables', variables);
2124
- return timer(500).pipe(switchMap(() => modelService.count(qvm).pipe(first(), map(count => (count > 0 ? { duplicateValue: count } : null)))));
2126
+ return timer(500).pipe(switchMap$1(() => modelService.count(qvm).pipe(first(), map(count => (count > 0 ? { duplicateValue: count } : null)))));
2125
2127
  };
2126
2128
  }
2127
2129
  /**
@@ -2135,7 +2137,7 @@ function available(getAvailableQuery, excludedId = null) {
2135
2137
  if (!control.value || !control.dirty) {
2136
2138
  return of(null);
2137
2139
  }
2138
- return timer(500).pipe(switchMap(() => getAvailableQuery(control.value, excludedId).pipe(map(isAvailable => (isAvailable ? null : { available: true })))));
2140
+ return timer(500).pipe(switchMap$1(() => getAvailableQuery(control.value, excludedId).pipe(map(isAvailable => (isAvailable ? null : { available: true })))));
2139
2141
  };
2140
2142
  }
2141
2143
  /**
@@ -2394,7 +2396,7 @@ class NaturalAbstractDetail extends NaturalAbstractPanel {
2394
2396
  #subscribeToModelFromResolvedData(route) {
2395
2397
  let previousId = -1;
2396
2398
  route.data
2397
- .pipe(switchMap$1(data => {
2399
+ .pipe(switchMap(data => {
2398
2400
  if (!(data.model instanceof Observable)) {
2399
2401
  throw new Error('Resolved data must include the key `model`, and it must be an observable (usually one from Apollo).');
2400
2402
  }
@@ -2458,10 +2460,10 @@ class NaturalAbstractDetail extends NaturalAbstractPanel {
2458
2460
  this.form.disable();
2459
2461
  this.service
2460
2462
  .create(newValues)
2461
- .pipe(switchMap$1(model => {
2463
+ .pipe(switchMap(model => {
2462
2464
  this.alertService.info($localize `Créé`);
2463
2465
  return this.postCreate(model).pipe(endWith(model), last());
2464
- }), switchMap$1((model) => {
2466
+ }), switchMap((model) => {
2465
2467
  if (redirect) {
2466
2468
  if (this.isPanel) {
2467
2469
  const oldUrl = this.router.url;
@@ -2485,12 +2487,12 @@ class NaturalAbstractDetail extends NaturalAbstractPanel {
2485
2487
  this.form.disable();
2486
2488
  (confirmer ??
2487
2489
  this.alertService.confirm($localize `Suppression`, $localize `Voulez-vous supprimer définitivement cet élément ?`, $localize `Supprimer définitivement`))
2488
- .pipe(switchMap$1(confirmed => {
2490
+ .pipe(switchMap(confirmed => {
2489
2491
  if (!confirmed || !this.isUpdatePage()) {
2490
2492
  return EMPTY;
2491
2493
  }
2492
2494
  this.preDelete(this.data.model);
2493
- return this.service.delete([this.data.model]).pipe(switchMap$1(() => {
2495
+ return this.service.delete([this.data.model]).pipe(switchMap(() => {
2494
2496
  this.alertService.info($localize `Supprimé`);
2495
2497
  if (this.isPanel) {
2496
2498
  this.panelService?.goToPenultimatePanel();
@@ -2807,53 +2809,14 @@ function replaceToday(selection) {
2807
2809
  return selection;
2808
2810
  }
2809
2811
 
2810
- /**
2811
- * Animations used by the mat-menu component.
2812
- * Animation duration and timing values are based on:
2813
- * https://material.io/guidelines/components/menus.html#menus-usage
2814
- */
2815
- const naturalDropdownAnimations = {
2816
- /**
2817
- * This animation controls the menu panel's entry and exit from the page.
2818
- *
2819
- * When the menu panel is added to the DOM, it scales in and fades in its border.
2820
- *
2821
- * When the menu panel is removed from the DOM, it simply fades out after a brief
2822
- * delay to display the ripple.
2823
- */
2824
- transformMenu: trigger('transformMenu', [
2825
- state('void', style({
2826
- opacity: 0,
2827
- // This starts off from 0.01, instead of 0, because there's an issue in the Angular animations
2828
- // as of 4.2, which causes the animation to be skipped if it starts from 0.
2829
- transform: 'scale(0.01, 0.01)',
2830
- })),
2831
- transition('void => enter', sequence([
2832
- query('.natural-dropdown-container-content', style({ opacity: 0 })),
2833
- animate('100ms linear', style({ opacity: 1, transform: 'scale(1, 0.5)' })),
2834
- group([
2835
- query('.natural-dropdown-container-content', animate('400ms cubic-bezier(0.55, 0, 0.55, 0.2)', style({ opacity: 1 }))),
2836
- animate('300ms cubic-bezier(0.25, 0.8, 0.25, 1)', style({ transform: 'scale(1, 1)' })),
2837
- ]),
2838
- ])),
2839
- transition('* => void', animate('150ms 50ms linear', style({ opacity: 0 }))),
2840
- ]),
2841
- /**
2842
- * This animation fades in the background color and content of the menu panel
2843
- * after its containing element is scaled in.
2844
- */
2845
- fadeInItems: trigger('fadeInItems', [
2846
- // TODO(crisbeto): this is inside the `transformMenu`
2847
- // now. Remove next time we do breaking changes.
2848
- state('showing', style({ opacity: 1 })),
2849
- transition('void => *', [style({ opacity: 0 }), animate('400ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)')]),
2850
- ]),
2851
- };
2852
-
2853
2812
  function throwMatDialogContentAlreadyAttachedError() {
2854
2813
  throw Error('Attempting to attach dialog content after content is already attached');
2855
2814
  }
2856
2815
  const NATURAL_DROPDOWN_CONTAINER_DATA = new InjectionToken('NaturalDropdownContainerData');
2816
+ /** Name of the enter animation `@keyframes`. */
2817
+ const ENTER_ANIMATION = '_mat-menu-enter';
2818
+ /** Name of the exit animation `@keyframes`. */
2819
+ const EXIT_ANIMATION = '_mat-menu-exit';
2857
2820
  class NaturalDropdownContainerComponent extends BasePortalOutlet {
2858
2821
  elementRef = inject(ElementRef);
2859
2822
  focusTrapFactory = inject(ConfigurableFocusTrapFactory);
@@ -2861,19 +2824,14 @@ class NaturalDropdownContainerComponent extends BasePortalOutlet {
2861
2824
  portalOutlet = viewChild.required(CdkPortalOutlet);
2862
2825
  closed = new Subject();
2863
2826
  /** Current state of the panel animation. */
2864
- panelAnimationState = 'void';
2865
- /** Emits whenever an animation on the menu completes. */
2866
- animationDone = new Subject();
2827
+ panelAnimationState = 'enter';
2867
2828
  focusTrap = null;
2868
2829
  elementFocusedBeforeDialogWasOpened = null;
2869
- constructor() {
2870
- super();
2871
- }
2872
2830
  ngOnDestroy() {
2873
2831
  this.closed.complete();
2874
2832
  }
2875
2833
  close() {
2876
- this.closed.next();
2834
+ this.panelAnimationState = 'void';
2877
2835
  }
2878
2836
  attachTemplatePortal(portal) {
2879
2837
  return this.portalOutlet().attachTemplatePortal(portal);
@@ -2885,17 +2843,18 @@ class NaturalDropdownContainerComponent extends BasePortalOutlet {
2885
2843
  }
2886
2844
  return portalOutlet.attachComponentPortal(portal);
2887
2845
  }
2888
- startAnimation() {
2889
- this.panelAnimationState = 'enter';
2890
- }
2891
- onAnimationDone(event) {
2892
- if (event.toState === 'enter') {
2893
- this.trapFocus();
2894
- }
2895
- else if (event.toState === 'exit') {
2896
- this.restoreFocus();
2846
+ /** Callback that is invoked when the panel animation completes. */
2847
+ onAnimationDone(state) {
2848
+ const isExit = state === EXIT_ANIMATION;
2849
+ if (isExit || state === ENTER_ANIMATION) {
2850
+ if (isExit) {
2851
+ this.restoreFocus();
2852
+ this.closed.next();
2853
+ }
2854
+ else {
2855
+ this.trapFocus();
2856
+ }
2897
2857
  }
2898
- this.animationDone.next();
2899
2858
  }
2900
2859
  trapFocus() {
2901
2860
  if (!this.focusTrap) {
@@ -2914,13 +2873,13 @@ class NaturalDropdownContainerComponent extends BasePortalOutlet {
2914
2873
  this.focusTrap.destroy();
2915
2874
  }
2916
2875
  }
2917
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.13", ngImport: i0, type: NaturalDropdownContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2918
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.13", type: NaturalDropdownContainerComponent, isStandalone: true, selector: "ng-component", viewQueries: [{ propertyName: "portalOutlet", first: true, predicate: CdkPortalOutlet, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div\n class=\"natural-dropdown-container mat-elevation-z2\"\n role=\"menu\"\n tabindex=\"-1\"\n [@transformMenu]=\"panelAnimationState\"\n (@transformMenu.done)=\"onAnimationDone($event)\"\n>\n <div class=\"natural-dropdown-container-content\">\n <ng-template cdkPortalOutlet />\n </div>\n\n @if (data.showValidateButton) {\n <div class=\"natural-dropdown-validate-button\">\n <button color=\"primary\" mat-raised-button i18n (click)=\"close()\">Valider</button>\n </div>\n }\n</div>\n", styles: [".natural-dropdown-container{display:flex;flex-direction:column;border-radius:2px;height:100%}.natural-dropdown-container-content{flex:1;padding:5px;overflow:auto}.natural-dropdown-container .natural-dropdown-validate-button{display:flex;flex:none;flex-direction:row;justify-content:flex-end;margin:5px}\n"], dependencies: [{ kind: "ngmodule", type: PortalModule }, { kind: "directive", type: i1$1.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }], animations: [naturalDropdownAnimations.transformMenu, naturalDropdownAnimations.fadeInItems], encapsulation: i0.ViewEncapsulation.None });
2876
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.13", ngImport: i0, type: NaturalDropdownContainerComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
2877
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.13", type: NaturalDropdownContainerComponent, isStandalone: true, selector: "ng-component", viewQueries: [{ propertyName: "portalOutlet", first: true, predicate: CdkPortalOutlet, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div\n class=\"natural-dropdown-container mat-elevation-z2\"\n role=\"menu\"\n tabindex=\"-1\"\n [class.mat-menu-panel-exit-animation]=\"panelAnimationState === 'void'\"\n (animationend)=\"onAnimationDone($event.animationName)\"\n (animationcancel)=\"onAnimationDone($event.animationName)\"\n>\n <div class=\"natural-dropdown-container-content\">\n <ng-template cdkPortalOutlet />\n </div>\n\n @if (data.showValidateButton) {\n <div class=\"natural-dropdown-validate-button\">\n <button color=\"primary\" mat-raised-button i18n (click)=\"close()\">Valider</button>\n </div>\n }\n</div>\n", styles: ["@keyframes _mat-menu-enter{0%{transform:scale(.8);opacity:0}to{transform:none;opacity:1}}@keyframes _mat-menu-exit{0%{opacity:1}to{opacity:0}}.natural-dropdown-container{display:flex;flex-direction:column;animation:_mat-menu-enter .12s cubic-bezier(0,0,.2,1);border-radius:2px;height:100%}.natural-dropdown-container-content{flex:1;padding:5px;overflow:auto}.natural-dropdown-container .natural-dropdown-validate-button{display:flex;flex:none;flex-direction:row;justify-content:flex-end;margin:5px}.natural-dropdown-container.mat-menu-panel-exit-animation{animation:_mat-menu-exit .1s 25ms linear forwards}\n"], dependencies: [{ kind: "ngmodule", type: PortalModule }, { kind: "directive", type: i1$1.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }], encapsulation: i0.ViewEncapsulation.None });
2919
2878
  }
2920
2879
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.13", ngImport: i0, type: NaturalDropdownContainerComponent, decorators: [{
2921
2880
  type: Component,
2922
- args: [{ encapsulation: ViewEncapsulation.None, preserveWhitespaces: false, animations: [naturalDropdownAnimations.transformMenu, naturalDropdownAnimations.fadeInItems], imports: [PortalModule, MatButtonModule], template: "<div\n class=\"natural-dropdown-container mat-elevation-z2\"\n role=\"menu\"\n tabindex=\"-1\"\n [@transformMenu]=\"panelAnimationState\"\n (@transformMenu.done)=\"onAnimationDone($event)\"\n>\n <div class=\"natural-dropdown-container-content\">\n <ng-template cdkPortalOutlet />\n </div>\n\n @if (data.showValidateButton) {\n <div class=\"natural-dropdown-validate-button\">\n <button color=\"primary\" mat-raised-button i18n (click)=\"close()\">Valider</button>\n </div>\n }\n</div>\n", styles: [".natural-dropdown-container{display:flex;flex-direction:column;border-radius:2px;height:100%}.natural-dropdown-container-content{flex:1;padding:5px;overflow:auto}.natural-dropdown-container .natural-dropdown-validate-button{display:flex;flex:none;flex-direction:row;justify-content:flex-end;margin:5px}\n"] }]
2923
- }], ctorParameters: () => [] });
2881
+ args: [{ encapsulation: ViewEncapsulation.None, preserveWhitespaces: false, imports: [PortalModule, MatButtonModule], template: "<div\n class=\"natural-dropdown-container mat-elevation-z2\"\n role=\"menu\"\n tabindex=\"-1\"\n [class.mat-menu-panel-exit-animation]=\"panelAnimationState === 'void'\"\n (animationend)=\"onAnimationDone($event.animationName)\"\n (animationcancel)=\"onAnimationDone($event.animationName)\"\n>\n <div class=\"natural-dropdown-container-content\">\n <ng-template cdkPortalOutlet />\n </div>\n\n @if (data.showValidateButton) {\n <div class=\"natural-dropdown-validate-button\">\n <button color=\"primary\" mat-raised-button i18n (click)=\"close()\">Valider</button>\n </div>\n }\n</div>\n", styles: ["@keyframes _mat-menu-enter{0%{transform:scale(.8);opacity:0}to{transform:none;opacity:1}}@keyframes _mat-menu-exit{0%{opacity:1}to{opacity:0}}.natural-dropdown-container{display:flex;flex-direction:column;animation:_mat-menu-enter .12s cubic-bezier(0,0,.2,1);border-radius:2px;height:100%}.natural-dropdown-container-content{flex:1;padding:5px;overflow:auto}.natural-dropdown-container .natural-dropdown-validate-button{display:flex;flex:none;flex-direction:row;justify-content:flex-end;margin:5px}.natural-dropdown-container.mat-menu-panel-exit-animation{animation:_mat-menu-exit .1s 25ms linear forwards}\n"] }]
2882
+ }] });
2924
2883
 
2925
2884
  class NaturalDropdownRef {
2926
2885
  dropdownContainer;
@@ -2965,8 +2924,6 @@ class NaturalDropdownService {
2965
2924
  const containerRef = overlayRef.attach(containerPortal);
2966
2925
  const dropdownContainer = containerRef.instance;
2967
2926
  const dropdownRef = new NaturalDropdownRef(dropdownContainer, component, customProviders, this.injector, containerRef);
2968
- // Start animation that shows menu
2969
- dropdownContainer.startAnimation();
2970
2927
  const close = () => {
2971
2928
  if (dropdownRef.componentInstance.isValid() && dropdownRef.componentInstance.isDirty()) {
2972
2929
  dropdownRef.close({
@@ -3816,25 +3773,14 @@ class NaturalAbstractList extends NaturalAbstractPanel {
3816
3773
  this.handleHistoryNavigation();
3817
3774
  }
3818
3775
  handleHistoryNavigation() {
3819
- // Update natural search when history changes (back/forward buttons)
3820
- // History state is detectable only on NavigationStart (popstate trigger)
3821
- // But we need parameters from url after NavigationEnd. So proceed in two steps with a flag.
3822
- let isPopState = false;
3823
- this.router.events
3824
- .pipe(takeUntilDestroyed(this.destroyRef), filter(event => event instanceof NavigationStart && event.navigationTrigger === 'popstate'))
3825
- .subscribe(() => (isPopState = true));
3826
- this.router.events
3827
- .pipe(takeUntilDestroyed(this.destroyRef), filter(event => event instanceof NavigationEnd && isPopState), filter(() => this.historyNavigationFilter()))
3776
+ onHistoryEvent(this.router)
3777
+ .pipe(takeUntilDestroyed(this.destroyRef))
3828
3778
  .subscribe(() => {
3829
- isPopState = false; // reset flag
3830
3779
  const selections = fromUrl(this.persistenceService.getFromUrl('ns', this.route));
3831
3780
  this.naturalSearchSelections = selections;
3832
3781
  this.search(selections);
3833
3782
  });
3834
3783
  }
3835
- historyNavigationFilter() {
3836
- return true;
3837
- }
3838
3784
  /**
3839
3785
  * Persist search and then launch whatever is required to refresh the list
3840
3786
  */
@@ -4763,7 +4709,7 @@ class NaturalAbstractModelService {
4763
4709
  prepareOneQuery(id, fetchPolicy) {
4764
4710
  this.throwIfObservable(id);
4765
4711
  this.throwIfNotQuery(this.oneQuery);
4766
- return this.getVariablesForOne(id).pipe(switchMap(variables => {
4712
+ return this.getVariablesForOne(id).pipe(switchMap$1(variables => {
4767
4713
  this.throwIfNotQuery(this.oneQuery);
4768
4714
  return this.apollo.watchQuery({
4769
4715
  query: this.oneQuery,
@@ -4781,7 +4727,7 @@ class NaturalAbstractModelService {
4781
4727
  */
4782
4728
  getAll(queryVariablesManager) {
4783
4729
  this.throwIfNotQuery(this.allQuery);
4784
- return this.getPartialVariablesForAll().pipe(first$1(), switchMap(partialVariables => {
4730
+ return this.getPartialVariablesForAll().pipe(first$1(), switchMap$1(partialVariables => {
4785
4731
  this.throwIfNotQuery(this.allQuery);
4786
4732
  // Copy manager to prevent to apply internal variables to external QueryVariablesManager
4787
4733
  const manager = new NaturalQueryVariablesManager(queryVariablesManager);
@@ -4814,7 +4760,7 @@ class NaturalAbstractModelService {
4814
4760
  // Null is accepted value for "no variables"
4815
4761
  filter(variables => typeof variables !== 'undefined')),
4816
4762
  partialVariables: this.getPartialVariablesForAll(),
4817
- }).pipe(switchMap(result => {
4763
+ }).pipe(switchMap$1(result => {
4818
4764
  // Apply partial variables from service
4819
4765
  // Copy manager to prevent to apply internal variables to external QueryVariablesManager
4820
4766
  const manager = new NaturalQueryVariablesManager(queryVariablesManager);
@@ -4843,7 +4789,7 @@ class NaturalAbstractModelService {
4843
4789
  // If creation is pending, listen to creation observable and when ready, fire update
4844
4790
  const pendingCreation = this.creatingCache.get(object);
4845
4791
  if (pendingCreation) {
4846
- return pendingCreation.pipe(switchMap(created => {
4792
+ return pendingCreation.pipe(switchMap$1(created => {
4847
4793
  return this.update({
4848
4794
  id: created.id,
4849
4795
  ...object,
@@ -4937,7 +4883,7 @@ class NaturalAbstractModelService {
4937
4883
  })
4938
4884
  .pipe(
4939
4885
  // Delay the observable until Apollo refetch is completed
4940
- switchMap(result => {
4886
+ switchMap$1(result => {
4941
4887
  const mappedResult = this.mapDelete(result);
4942
4888
  return from(this.apollo.client.reFetchObservableQueries()).pipe(map(() => mappedResult));
4943
4889
  }));
@@ -4995,7 +4941,7 @@ class NaturalAbstractModelService {
4995
4941
  length
4996
4942
  }
4997
4943
  }`;
4998
- return this.getPartialVariablesForAll().pipe(switchMap(partialVariables => {
4944
+ return this.getPartialVariablesForAll().pipe(switchMap$1(partialVariables => {
4999
4945
  // Copy manager to prevent to apply internal variables to external QueryVariablesManager
5000
4946
  const manager = new NaturalQueryVariablesManager(queryVariablesManager);
5001
4947
  manager.merge('partial-variables', partialVariables);
@@ -5216,7 +5162,7 @@ class NaturalLinkMutationService {
5216
5162
  link(obj1, obj2, otherName = null, variables = {}) {
5217
5163
  // clone prevents to affect the original reference
5218
5164
  const clonedVariables = clone(variables);
5219
- return this.getMutation('link', obj1, obj2, otherName, clonedVariables).pipe(switchMap(mutation => this.execute(mutation)));
5165
+ return this.getMutation('link', obj1, obj2, otherName, clonedVariables).pipe(switchMap$1(mutation => this.execute(mutation)));
5220
5166
  }
5221
5167
  /**
5222
5168
  * Link many objects
@@ -5228,7 +5174,7 @@ class NaturalLinkMutationService {
5228
5174
  * Unlink two objects
5229
5175
  */
5230
5176
  unlink(obj1, obj2, otherName = null) {
5231
- return this.getMutation('unlink', obj1, obj2, otherName).pipe(switchMap(mutation => this.execute(mutation)));
5177
+ return this.getMutation('unlink', obj1, obj2, otherName).pipe(switchMap$1(mutation => this.execute(mutation)));
5232
5178
  }
5233
5179
  /**
5234
5180
  * Return the list of all available mutation names
@@ -6128,7 +6074,7 @@ class NaturalSeoService {
6128
6074
  config: configToken instanceof Observable ? configToken.pipe(startWith$1(this.config)) : of(configToken),
6129
6075
  navigationEnd: this.router.events.pipe(filter$1(event => event instanceof NavigationEnd)),
6130
6076
  })
6131
- .pipe(takeUntilDestroyed(), switchMap$1(({ config }) => {
6077
+ .pipe(takeUntilDestroyed(), switchMap(({ config }) => {
6132
6078
  this.config = config;
6133
6079
  const root = this.router.routerState.root.snapshot;
6134
6080
  this.routeData = this.getRouteData(root);
@@ -11489,7 +11435,7 @@ function graphqlQuerySigner(key) {
11489
11435
  const operations = getOperations(req);
11490
11436
  const timestamp = Math.round(Date.now() / 1000);
11491
11437
  const payload = timestamp + operations;
11492
- return from(hmacSha256(key, payload)).pipe(switchMap$1(hash => {
11438
+ return from(hmacSha256(key, payload)).pipe(switchMap(hash => {
11493
11439
  const header = `v1.${timestamp}.${hash}`;
11494
11440
  const signedRequest = req.clone({
11495
11441
  headers: req.headers.set('X-Signature', header),
@@ -11508,5 +11454,5 @@ function graphqlQuerySigner(key) {
11508
11454
  * Generated bundle index. Do not edit.
11509
11455
  */
11510
11456
 
11511
- 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, NetworkActivityService, PanelsHooksConfig, SESSION_STORAGE, SortingOrder, TypeBooleanComponent, TypeDateComponent, TypeDateRangeComponent, TypeHierarchicSelectorComponent, TypeNaturalSelectComponent, TypeNumberComponent, TypeOptionsComponent, TypeSelectComponent, TypeTextComponent, activityInterceptor, 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, rgbToHex, sessionStorageFactory, sessionStorageProvider, toGraphQLDoctrineFilter, toNavigationParameters, toUrl, unique, upperCaseFirstLetter, urlValidator, validTlds, validateAllFormControls, validateColumns, validatePagination, validateSorting, wrapLike, wrapPrefix, wrapSuffix };
11457
+ 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, NetworkActivityService, PanelsHooksConfig, SESSION_STORAGE, SortingOrder, TypeBooleanComponent, TypeDateComponent, TypeDateRangeComponent, TypeHierarchicSelectorComponent, TypeNaturalSelectComponent, TypeNumberComponent, TypeOptionsComponent, TypeSelectComponent, TypeTextComponent, activityInterceptor, 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, onHistoryEvent, possibleComparableOperators, provideErrorHandler, provideIcons, providePanels, provideSeo, relationsToIds, replaceObjectKeepingReference, replaceOperatorByField, replaceOperatorByName, rgbToHex, sessionStorageFactory, sessionStorageProvider, toGraphQLDoctrineFilter, toNavigationParameters, toUrl, unique, upperCaseFirstLetter, urlValidator, validTlds, validateAllFormControls, validateColumns, validatePagination, validateSorting, wrapLike, wrapPrefix, wrapSuffix };
11512
11458
  //# sourceMappingURL=ecodev-natural.mjs.map