@ethlete/cdk 4.11.1 → 4.13.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 (21) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/esm2022/lib/components/overlay/components/overlay/partials/overlay-back-or-close/overlay-back-or-close.directive.mjs +5 -15
  3. package/esm2022/lib/components/overlay/components/overlay/partials/overlay-router-link/overlay-router-link.directive.mjs +4 -3
  4. package/esm2022/lib/components/overlay/components/overlay/services/overlay.service.mjs +1 -2
  5. package/esm2022/lib/components/overlay/components/overlay/types/overlay.types.mjs +1 -1
  6. package/esm2022/lib/components/overlay/components/overlay/utils/filter-overlay.mjs +1 -1
  7. package/esm2022/lib/components/overlay/components/overlay/utils/overlay-position-builder.mjs +4 -4
  8. package/esm2022/lib/components/overlay/components/overlay/utils/overlay-ref.mjs +2 -1
  9. package/esm2022/lib/components/overlay/components/overlay/utils/overlay-router.mjs +80 -83
  10. package/esm2022/lib/components/overlay/components/overlay/utils/sidebar-overlay.mjs +2 -14
  11. package/fesm2022/ethlete-cdk.mjs +85 -109
  12. package/fesm2022/ethlete-cdk.mjs.map +1 -1
  13. package/lib/components/overlay/components/overlay/partials/overlay-back-or-close/overlay-back-or-close.directive.d.ts +2 -7
  14. package/lib/components/overlay/components/overlay/partials/overlay-router-link/overlay-router-link.directive.d.ts +3 -2
  15. package/lib/components/overlay/components/overlay/types/overlay.types.d.ts +4 -1
  16. package/lib/components/overlay/components/overlay/utils/filter-overlay.d.ts +2 -5
  17. package/lib/components/overlay/components/overlay/utils/overlay-position-builder.d.ts +4 -0
  18. package/lib/components/overlay/components/overlay/utils/overlay-ref.d.ts +1 -0
  19. package/lib/components/overlay/components/overlay/utils/overlay-router.d.ts +20 -20
  20. package/lib/components/overlay/components/overlay/utils/sidebar-overlay.d.ts +2 -8
  21. package/package.json +1 -1
@@ -1,8 +1,8 @@
1
1
  import * as i1 from '@angular/cdk/portal';
2
2
  import { CdkPortal, PortalModule, ComponentPortal, TemplatePortal, CdkPortalOutlet } from '@angular/cdk/portal';
3
- import { AsyncPipe, NgClass, NgTemplateOutlet, JsonPipe, NgComponentOutlet, DOCUMENT } from '@angular/common';
3
+ import { AsyncPipe, NgClass, NgTemplateOutlet, JsonPipe, NgComponentOutlet, DOCUMENT, Location } from '@angular/common';
4
4
  import * as i0 from '@angular/core';
5
- import { Component, ViewEncapsulation, ChangeDetectionStrategy, InjectionToken, Directive, booleanAttribute, Input, ContentChild, ContentChildren, inject, ElementRef, Injector, HostBinding, isDevMode, Injectable, ChangeDetectorRef, TemplateRef, ViewContainerRef, ViewChild, forwardRef, numberAttribute, signal, input, EventEmitter, Output, computed, ViewChildren, Optional, Inject, SkipSelf, HostListener, effect, NgZone, NgModule, isSignal, viewChild, contentChild, assertInInjectionContext, Pipe, Attribute } from '@angular/core';
5
+ import { Component, ViewEncapsulation, ChangeDetectionStrategy, InjectionToken, Directive, booleanAttribute, Input, ContentChild, ContentChildren, inject, ElementRef, Injector, HostBinding, isDevMode, Injectable, ChangeDetectorRef, TemplateRef, ViewContainerRef, ViewChild, forwardRef, numberAttribute, signal, input, EventEmitter, Output, computed, ViewChildren, Optional, Inject, SkipSelf, HostListener, effect, NgZone, NgModule, isSignal, DestroyRef, viewChild, contentChild, assertInInjectionContext, Pipe, Attribute } from '@angular/core';
6
6
  import * as i1$1 from '@ethlete/core';
7
7
  import { LetDirective, createDestroy, Memo, signalHostAttributes, signalHostClasses, ObserveVisibilityDirective, signalVisibilityChangeClasses, IS_EMAIL, MUST_MATCH, IS_ARRAY_NOT_EMPTY, AT_LEAST_ONE_REQUIRED, equal, switchQueryListChanges, signalAttributes, ResizeObserverService, createFlipAnimation, AnimatedOverlayDirective, RuntimeError, SelectionModel, ActiveSelectionModel, KeyPressManager, signalClasses, scrollToElement, isEmptyArray, isObjectArray, isPrimitiveArray, createComponentId, ClickOutsideDirective, ANIMATED_LIFECYCLE_TOKEN, AnimatedLifecycleDirective, ObserveContentDirective, clamp, nextFrame, DELAYABLE_TOKEN, ObserveResizeDirective, SmartBlockScrollStrategy, RouterStateService, signalElementScrollState, signalElementIntersection, signalElementChildren, signalHostElementDimensions, signalHostStyles, isElementVisible, getFirstAndLastPartialIntersection, CursorDragScrollDirective, ObserveScrollStateDirective, ClickObserverService, RootBoundaryDirective, elementCanScroll, cloneFormGroup, getFormGroupValue, fromNextFrame, ViewportService, ROOT_BOUNDARY_TOKEN, AnimatedIfDirective, syncSignal, FocusVisibleService, inferMimeType, ScrollObserverIgnoreTargetDirective, TypedQueryList } from '@ethlete/core';
8
8
  import { BehaviorSubject, startWith, map, switchMap, combineLatest, pairwise, tap, takeUntil, skip, of, filter, Subject, Observable, debounceTime, withLatestFrom, distinctUntilChanged, take, merge, skipUntil, skipWhile, catchError, throwError, fromEvent, timer, defer, partition, from, finalize, Subscription } from 'rxjs';
@@ -26,8 +26,8 @@ import { ViewportRuler, STANDARD_DROPDOWN_BELOW_POSITIONS, Overlay, OverlayConfi
26
26
  import { coerceBooleanProperty, coerceCssPixelValue, coerceElement, _isNumberValue } from '@angular/cdk/coercion';
27
27
  import { startWith as startWith$1, debounceTime as debounceTime$1, distinctUntilChanged as distinctUntilChanged$1, takeUntil as takeUntil$1, skip as skip$1, filter as filter$1, mergeMap, mapTo, mergeAll, switchMap as switchMap$1, take as take$1 } from 'rxjs/operators';
28
28
  import { UniqueSelectionDispatcher, _VIEW_REPEATER_STRATEGY, _DisposeViewRepeaterStrategy, _RecycleViewRepeaterStrategy, DataSource } from '@angular/cdk/collections';
29
- import { Title } from '@angular/platform-browser';
30
29
  import { Router, RouterLink, RouterLinkActive, NavigationEnd } from '@angular/router';
30
+ import { Title } from '@angular/platform-browser';
31
31
  import * as i1$3 from '@angular/cdk/table';
32
32
  import { CdkColumnDef, CDK_TABLE, CdkTable, _COALESCED_STYLE_SCHEDULER, _CoalescedStyleScheduler, STICKY_POSITIONING_LISTENER, HeaderRowOutlet, DataRowOutlet, NoDataRowOutlet, FooterRowOutlet, CdkCell, CdkCellDef, CdkFooterCell, CdkFooterCellDef, CdkHeaderCell, CdkHeaderCellDef, CdkTextColumn, TEXT_COLUMN_OPTIONS, CdkFooterRow, CdkTableModule, CDK_ROW_TEMPLATE, CdkFooterRowDef, CdkHeaderRow, CdkHeaderRowDef, CdkNoDataRow, CdkRow, CdkRowDef } from '@angular/cdk/table';
33
33
  import * as i1$4 from '@angular/cdk/scrolling';
@@ -4015,6 +4015,7 @@ class OverlayRef {
4015
4015
  }
4016
4016
  constructor(_ref, config, _containerInstance) {
4017
4017
  this._ref = _ref;
4018
+ this.config = config;
4018
4019
  this._containerInstance = _containerInstance;
4019
4020
  this.componentInstance = null;
4020
4021
  this.componentRef = null;
@@ -11534,7 +11535,7 @@ class OverlayPositionBuilder {
11534
11535
  config: this.mergeConfigs(this.DEFAULTS.bottomSheet, customConfig?.bottomSheet ?? {}),
11535
11536
  },
11536
11537
  {
11537
- breakpoint: 'md',
11538
+ breakpoint: customConfig?.breakpoint ?? 'md',
11538
11539
  config: this.mergeConfigs(this.DEFAULTS.dialog, customConfig?.dialog ?? {}),
11539
11540
  },
11540
11541
  ];
@@ -11546,7 +11547,7 @@ class OverlayPositionBuilder {
11546
11547
  config: this.mergeConfigs(this.DEFAULTS.fullScreenDialog, customConfig?.fullScreenDialog ?? {}),
11547
11548
  },
11548
11549
  {
11549
- breakpoint: 'md',
11550
+ breakpoint: customConfig?.breakpoint ?? 'md',
11550
11551
  config: this.mergeConfigs(this.DEFAULTS.rightSheet, customConfig?.rightSheet ?? {}),
11551
11552
  },
11552
11553
  ];
@@ -11558,7 +11559,7 @@ class OverlayPositionBuilder {
11558
11559
  config: this.mergeConfigs(this.DEFAULTS.fullScreenDialog, customConfig?.fullScreenDialog ?? {}),
11559
11560
  },
11560
11561
  {
11561
- breakpoint: 'md',
11562
+ breakpoint: customConfig?.breakpoint ?? 'md',
11562
11563
  config: this.mergeConfigs(this.DEFAULTS.dialog, customConfig?.dialog ?? {}),
11563
11564
  },
11564
11565
  ];
@@ -11626,15 +11627,18 @@ class OverlayPositionBuilder {
11626
11627
  const OVERLAY_ROUTER_CONFIG_TOKEN = new InjectionToken('OVERLAY_ROUTER_CONFIG_TOKEN');
11627
11628
  class OverlayRouterService {
11628
11629
  constructor() {
11629
- this.config = inject(OVERLAY_ROUTER_CONFIG_TOKEN);
11630
- this.syncCurrentRoute = signal('/');
11630
+ this._router = inject(Router);
11631
+ this._routerStateService = inject(RouterStateService);
11632
+ this._id = createComponentId('ovr');
11633
+ this._overlayRef = inject(OverlayRef);
11634
+ this._config = inject(OVERLAY_ROUTER_CONFIG_TOKEN);
11635
+ this._syncCurrentRoute = signal(this._getInitialRoute());
11636
+ this._nativeBrowserTempBackNavigationStack = signal([]);
11631
11637
  // The current route, but delayed by one frame to ensure that the needed animation classes are applied.
11632
- this.currentRoute = toSignal(toObservable(this.syncCurrentRoute).pipe(switchMap((r) => fromNextFrame().pipe(map(() => r)))), { initialValue: '/' });
11633
- this.routeHistory = signal([]);
11634
- this.rootHistoryItem = signal(null);
11638
+ this.currentRoute = toSignal(toObservable(this._syncCurrentRoute).pipe(switchMap((r) => fromNextFrame().pipe(map(() => r)))), { initialValue: this._getInitialRoute() });
11635
11639
  this.extraRoutes = signal([]);
11636
11640
  this.routes = computed(() => {
11637
- const allRoutes = [...this.config.routes, ...this.extraRoutes()];
11641
+ const allRoutes = [...this._config.routes, ...this.extraRoutes()];
11638
11642
  const allRoundsWithTransformedInputs = allRoutes.map((route) => {
11639
11643
  return {
11640
11644
  ...route,
@@ -11652,7 +11656,7 @@ class OverlayRouterService {
11652
11656
  return allRoundsWithTransformedInputs;
11653
11657
  });
11654
11658
  this.currentPage = computed(() => {
11655
- const currentRoute = this.syncCurrentRoute();
11659
+ const currentRoute = this._syncCurrentRoute();
11656
11660
  for (const route of this.routes()) {
11657
11661
  if (route.path === currentRoute) {
11658
11662
  return route;
@@ -11660,22 +11664,57 @@ class OverlayRouterService {
11660
11664
  }
11661
11665
  return null;
11662
11666
  });
11663
- this.lastPage = computed(() => {
11664
- const history = this.routeHistory();
11665
- if (history.length) {
11666
- return history[history.length - 1];
11667
+ this.navigationDirection = signal('forward');
11668
+ this._disableCloseOnNavigation();
11669
+ this._updateBrowserUrl(this._syncCurrentRoute());
11670
+ this._routerStateService
11671
+ .selectQueryParam(this._id)
11672
+ .pipe(takeUntilDestroyed(), skip(1), tap((route) => {
11673
+ // The user navigated back or forward using the browser history
11674
+ if (!route) {
11675
+ // The route query param no longer exists - close the overlay
11676
+ this._overlayRef.close();
11677
+ }
11678
+ else if (route !== this._syncCurrentRoute()) {
11679
+ const navStack = this._nativeBrowserTempBackNavigationStack();
11680
+ const currentRoute = this._syncCurrentRoute();
11681
+ if (!navStack.length) {
11682
+ // If the nav stack is empty the only way to navigate is back.
11683
+ this.navigate(route, { navigationDirection: 'backward' });
11684
+ this._nativeBrowserTempBackNavigationStack.set([currentRoute]);
11685
+ }
11686
+ else {
11687
+ const lastItem = navStack[navStack.length - 1];
11688
+ if (route === lastItem) {
11689
+ // The new route matches the last item in the back nav stack.
11690
+ // This means we are going forward again.
11691
+ this.navigate(route, { navigationDirection: 'forward' });
11692
+ this._nativeBrowserTempBackNavigationStack.set(navStack.slice(0, -1));
11693
+ }
11694
+ else {
11695
+ // Else we are going back.
11696
+ this.navigate(route, { navigationDirection: 'backward' });
11697
+ this._nativeBrowserTempBackNavigationStack.set([...navStack, currentRoute]);
11698
+ }
11699
+ }
11667
11700
  }
11668
- return null;
11669
- });
11670
- this.canGoBack = computed(() => {
11671
- return this.routeHistory().length;
11701
+ else {
11702
+ // The navigation was triggered by ui interaction. Clear the back nav stack.
11703
+ this._nativeBrowserTempBackNavigationStack.set([]);
11704
+ }
11705
+ }))
11706
+ .subscribe();
11707
+ inject(DestroyRef).onDestroy(() => {
11708
+ // Remove the dialog route from the browser url
11709
+ this._updateBrowserUrl(undefined);
11672
11710
  });
11673
- this.navigationDirection = signal('forward');
11674
- this._navigateToInitialRoute();
11675
11711
  }
11676
- navigate(route) {
11712
+ navigate(route, config) {
11677
11713
  const resolvedRoute = this.resolvePath(route);
11678
- if (resolvedRoute.type === 'back') {
11714
+ if (config?.navigationDirection) {
11715
+ this.navigationDirection.set(config.navigationDirection);
11716
+ }
11717
+ else if (resolvedRoute.type === 'back') {
11679
11718
  this.navigationDirection.set('backward');
11680
11719
  }
11681
11720
  else {
@@ -11683,14 +11722,6 @@ class OverlayRouterService {
11683
11722
  }
11684
11723
  this._updateCurrentRoute(resolvedRoute.route);
11685
11724
  }
11686
- back() {
11687
- const prevRoute = this.lastPage();
11688
- if (!prevRoute)
11689
- return;
11690
- this.navigationDirection.set('backward');
11691
- this.routeHistory.set(this.routeHistory().slice(0, -1));
11692
- this._updateCurrentRoute(prevRoute, { updateHistory: false });
11693
- }
11694
11725
  resolvePath(route) {
11695
11726
  if (Array.isArray(route)) {
11696
11727
  route = route.join('/');
@@ -11702,7 +11733,7 @@ class OverlayRouterService {
11702
11733
  const isReplaceCurrent = route.startsWith('./');
11703
11734
  const isBack = route.startsWith('../');
11704
11735
  const isForward = !isAbsolute && !isReplaceCurrent && !isBack;
11705
- const curr = this.syncCurrentRoute();
11736
+ const curr = this._syncCurrentRoute();
11706
11737
  if (isForward) {
11707
11738
  route = `${curr}/${route}`;
11708
11739
  }
@@ -11740,64 +11771,30 @@ class OverlayRouterService {
11740
11771
  removeRoute(path) {
11741
11772
  this.extraRoutes.set(this.extraRoutes().filter((r) => r.path !== path));
11742
11773
  }
11743
- _updateCurrentRoute(route, config) {
11744
- console.log('from', this.syncCurrentRoute(), 'to', route, 'with config', config);
11745
- if (route === this.syncCurrentRoute())
11774
+ _updateCurrentRoute(route) {
11775
+ if (route === this._syncCurrentRoute())
11746
11776
  return;
11747
11777
  if (this.routes().findIndex((r) => r.path === route) === -1) {
11748
- console.error(`The route "${route}" does not exist.`, this.config);
11778
+ console.error(`The route "${route}" does not exist.`, this._config);
11749
11779
  return;
11750
11780
  }
11751
- const lastRoute = this.syncCurrentRoute();
11752
- if (config?.updateHistory === true || config?.updateHistory === undefined) {
11753
- const history = this.routeHistory();
11754
- if (history[history.length - 1] !== lastRoute) {
11755
- const newHistory = [...history, lastRoute];
11756
- // limit the history to 25 items
11757
- if (newHistory.length > 25) {
11758
- newHistory.shift();
11759
- }
11760
- const rootHistoryItem = this.rootHistoryItem();
11761
- if (rootHistoryItem && newHistory[0] !== rootHistoryItem) {
11762
- newHistory.unshift(rootHistoryItem);
11763
- }
11764
- this.routeHistory.set(newHistory);
11765
- }
11766
- }
11767
- this.syncCurrentRoute.set(route);
11781
+ this._syncCurrentRoute.set(route);
11782
+ this._updateBrowserUrl(route);
11768
11783
  }
11769
- _removeItemFromHistory(item) {
11770
- const history = this.routeHistory();
11771
- const cleanedHistory = history.filter((i) => i !== item);
11772
- console.log({
11773
- history,
11774
- cleanedHistory,
11775
- len: cleanedHistory.length,
11776
- null: cleanedHistory[0],
11777
- curr: this.syncCurrentRoute(),
11778
- });
11779
- if (cleanedHistory.length === 1 && cleanedHistory[0] === this.syncCurrentRoute()) {
11780
- this.routeHistory.set([]);
11781
- }
11782
- else {
11783
- this.routeHistory.set(cleanedHistory);
11784
- }
11784
+ _getInitialRoute() {
11785
+ return this._config.initialRoute ?? this._config.routes[0]?.path ?? '/';
11785
11786
  }
11786
11787
  _navigateToInitialRoute() {
11787
- if (this.config.initialRoute) {
11788
- this._updateCurrentRoute(this.config.initialRoute ?? '/', { updateHistory: false });
11789
- }
11790
- else {
11791
- const first = this.config.routes[0]?.path;
11792
- this._updateCurrentRoute(first ?? '/', { updateHistory: false });
11793
- }
11788
+ this._updateCurrentRoute(this._getInitialRoute());
11789
+ }
11790
+ _updateBrowserUrl(route) {
11791
+ this._router.navigate(['.'], { queryParams: { [this._id]: route }, queryParamsHandling: 'merge' });
11792
+ }
11793
+ _disableCloseOnNavigation() {
11794
+ // @ts-expect-error - private property
11795
+ this._overlayRef._cdkRef.overlayRef._locationChanges?.unsubscribe?.();
11794
11796
  }
11795
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: OverlayRouterService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
11796
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: OverlayRouterService }); }
11797
11797
  }
11798
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: OverlayRouterService, decorators: [{
11799
- type: Injectable
11800
- }], ctorParameters: () => [] });
11801
11798
  const provideOverlayRouterConfig = (config) => {
11802
11799
  return [
11803
11800
  {
@@ -11912,7 +11909,6 @@ class OverlayService {
11912
11909
  { provide: RootBoundaryDirective, useValue: container._rootBoundary },
11913
11910
  { provide: OVERLAY_DATA, useValue: cdkConfig.data },
11914
11911
  { provide: OverlayRef, useValue: overlayRef },
11915
- { provide: OverlayRef, useValue: overlayRef },
11916
11912
  ...(composedConfig.providers ?? []),
11917
11913
  ];
11918
11914
  },
@@ -12368,14 +12364,10 @@ class SidebarOverlayService {
12368
12364
  .pipe(distinctUntilChanged(), tap((renderSidebar) => {
12369
12365
  if (renderSidebar) {
12370
12366
  this.router.removeRoute(sidebarPageRoute);
12371
- this.router.rootHistoryItem.set(null);
12372
12367
  // if the user is currently on the sidebar route, navigate to the initial route.
12373
12368
  if (this.router.currentRoute() === sidebarPageRoute) {
12374
12369
  this.router._navigateToInitialRoute();
12375
12370
  }
12376
- // clean up all history entries that are the sidebar route.
12377
- // we don't want to navigate to the sidebar route if the sidebar is already visible as a actual sidebar.
12378
- this.router._removeItemFromHistory(sidebarPageRoute);
12379
12371
  }
12380
12372
  else {
12381
12373
  this.router.addRoute({
@@ -12386,18 +12378,11 @@ class SidebarOverlayService {
12386
12378
  bodyTemplate: this.sidebarContentTemplate,
12387
12379
  },
12388
12380
  });
12389
- // ensure that the sidebar route is always the last route in the history so it can be reached.
12390
- this.router.rootHistoryItem.set(sidebarPageRoute);
12391
12381
  }
12392
12382
  }), takeUntilDestroyed())
12393
12383
  .subscribe();
12394
12384
  }
12395
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: SidebarOverlayService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
12396
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: SidebarOverlayService }); }
12397
12385
  }
12398
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: SidebarOverlayService, decorators: [{
12399
- type: Injectable
12400
- }], ctorParameters: () => [] });
12401
12386
  const provideSidebarOverlayConfig = (config) => {
12402
12387
  return [
12403
12388
  {
@@ -12411,22 +12396,12 @@ const provideSidebarOverlayConfig = (config) => {
12411
12396
  const OVERLAY_BACK_OR_CLOSE_TOKEN = new InjectionToken('OVERLAY_BACK_OR_CLOSE_TOKEN');
12412
12397
  class OverlayBackOrCloseDirective {
12413
12398
  constructor() {
12399
+ this.locationService = inject(Location);
12414
12400
  this.overlayRef = inject(OverlayRef);
12415
12401
  this.router = inject(OverlayRouterService);
12416
12402
  this.disabled = input(false, { transform: booleanAttribute });
12417
- this.hostClassBindings = signalHostClasses({
12418
- 'et-overlay-back-or-close--is-back': this.router.canGoBack,
12419
- 'et-overlay-back-or-close--is-close': computed(() => !this.router.canGoBack()),
12420
- });
12421
12403
  fromEvent(inject(ElementRef).nativeElement, 'click')
12422
- .pipe(filter(() => !this.disabled()), tap(() => {
12423
- if (this.router.canGoBack()) {
12424
- this.router.back();
12425
- }
12426
- else {
12427
- this.overlayRef.close();
12428
- }
12429
- }), takeUntilDestroyed())
12404
+ .pipe(filter(() => !this.disabled()), tap(() => this.locationService.back()), takeUntilDestroyed())
12430
12405
  .subscribe();
12431
12406
  }
12432
12407
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: OverlayBackOrCloseDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
@@ -12641,15 +12616,16 @@ class OverlayRouterLinkDirective {
12641
12616
  this.router = inject(OverlayRouterService);
12642
12617
  this.path = input.required({ alias: 'etOverlayRouterLink' });
12643
12618
  this.disabled = input(false, { transform: booleanAttribute });
12619
+ this.navigationDirection = input(null);
12644
12620
  this.hostClassBindings = signalHostClasses({
12645
12621
  'et-overlay-router-link--active': computed(() => this.router.resolvePath(this.path()).route === this.router.currentRoute()),
12646
12622
  });
12647
12623
  fromEvent(inject(ElementRef).nativeElement, 'click')
12648
- .pipe(filter(() => !this.disabled()), tap(() => this.router.navigate(this.path())), takeUntilDestroyed())
12624
+ .pipe(filter(() => !this.disabled()), tap(() => this.router.navigate(this.path(), { navigationDirection: this.navigationDirection() ?? undefined })), takeUntilDestroyed())
12649
12625
  .subscribe();
12650
12626
  }
12651
12627
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: OverlayRouterLinkDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
12652
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "17.3.1", type: OverlayRouterLinkDirective, isStandalone: true, selector: "[etOverlayRouterLink]", inputs: { path: { classPropertyName: "path", publicName: "etOverlayRouterLink", isSignal: true, isRequired: true, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "type": "button" }, classAttribute: "et-overlay-router-link" }, providers: [
12628
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "17.3.1", type: OverlayRouterLinkDirective, isStandalone: true, selector: "[etOverlayRouterLink]", inputs: { path: { classPropertyName: "path", publicName: "etOverlayRouterLink", isSignal: true, isRequired: true, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, navigationDirection: { classPropertyName: "navigationDirection", publicName: "navigationDirection", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "type": "button" }, classAttribute: "et-overlay-router-link" }, providers: [
12653
12629
  {
12654
12630
  provide: OVERLAY_ROUTER_LINK_TOKEN,
12655
12631
  useExisting: OverlayRouterLinkDirective,