@ethlete/cdk 2.8.1 → 2.9.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 (43) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/esm2022/lib/components/overlay/components/menu/context-menu-trigger.mjs +163 -0
  3. package/esm2022/lib/components/overlay/components/menu/menu-aim.mjs +140 -0
  4. package/esm2022/lib/components/overlay/components/menu/menu-bar.mjs +113 -0
  5. package/esm2022/lib/components/overlay/components/menu/menu-base.mjs +154 -0
  6. package/esm2022/lib/components/overlay/components/menu/menu-errors.mjs +7 -0
  7. package/esm2022/lib/components/overlay/components/menu/menu-group.mjs +26 -0
  8. package/esm2022/lib/components/overlay/components/menu/menu-interface.mjs +3 -0
  9. package/esm2022/lib/components/overlay/components/menu/menu-item-checkbox.mjs +39 -0
  10. package/esm2022/lib/components/overlay/components/menu/menu-item-radio.mjs +56 -0
  11. package/esm2022/lib/components/overlay/components/menu/menu-item-selectable.mjs +32 -0
  12. package/esm2022/lib/components/overlay/components/menu/menu-item.mjs +210 -0
  13. package/esm2022/lib/components/overlay/components/menu/menu-module.mjs +52 -0
  14. package/esm2022/lib/components/overlay/components/menu/menu-stack.mjs +101 -0
  15. package/esm2022/lib/components/overlay/components/menu/menu-trigger-base.mjs +77 -0
  16. package/esm2022/lib/components/overlay/components/menu/menu-trigger.mjs +240 -0
  17. package/esm2022/lib/components/overlay/components/menu/menu.mjs +116 -0
  18. package/esm2022/lib/components/overlay/components/menu/pointer-focus-tracker.mjs +26 -0
  19. package/esm2022/lib/components/overlay/components/menu/public-api.mjs +17 -0
  20. package/esm2022/lib/components/overlay/components/public-api.mjs +2 -1
  21. package/esm2022/lib/components/scrollable/components/scrollable/scrollable.component.mjs +3 -3
  22. package/fesm2022/ethlete-cdk.mjs +1561 -157
  23. package/fesm2022/ethlete-cdk.mjs.map +1 -1
  24. package/lib/components/overlay/components/menu/context-menu-trigger.d.ts +33 -0
  25. package/lib/components/overlay/components/menu/menu-aim.d.ts +34 -0
  26. package/lib/components/overlay/components/menu/menu-bar.d.ts +13 -0
  27. package/lib/components/overlay/components/menu/menu-base.d.ts +41 -0
  28. package/lib/components/overlay/components/menu/menu-errors.d.ts +2 -0
  29. package/lib/components/overlay/components/menu/menu-group.d.ts +5 -0
  30. package/lib/components/overlay/components/menu/menu-interface.d.ts +11 -0
  31. package/lib/components/overlay/components/menu/menu-item-checkbox.d.ts +9 -0
  32. package/lib/components/overlay/components/menu/menu-item-radio.d.ts +16 -0
  33. package/lib/components/overlay/components/menu/menu-item-selectable.d.ts +11 -0
  34. package/lib/components/overlay/components/menu/menu-item.d.ts +52 -0
  35. package/lib/components/overlay/components/menu/menu-module.d.ts +16 -0
  36. package/lib/components/overlay/components/menu/menu-stack.d.ts +54 -0
  37. package/lib/components/overlay/components/menu/menu-trigger-base.d.ts +33 -0
  38. package/lib/components/overlay/components/menu/menu-trigger.d.ts +34 -0
  39. package/lib/components/overlay/components/menu/menu.d.ts +17 -0
  40. package/lib/components/overlay/components/menu/pointer-focus-tracker.d.ts +17 -0
  41. package/lib/components/overlay/components/menu/public-api.d.ts +16 -0
  42. package/lib/components/overlay/components/public-api.d.ts +1 -0
  43. package/package.json +2 -2
@@ -1,16 +1,16 @@
1
1
  import * as i1 from '@angular/cdk/portal';
2
- import { CdkPortal, PortalModule, ComponentPortal, CdkPortalOutlet, TemplatePortal } from '@angular/cdk/portal';
2
+ import { CdkPortal, PortalModule, ComponentPortal, TemplatePortal, CdkPortalOutlet } from '@angular/cdk/portal';
3
3
  import { AsyncPipe, NgIf, NgClass, NgTemplateOutlet, NgForOf, JsonPipe, NgFor, DOCUMENT } from '@angular/common';
4
4
  import * as i0 from '@angular/core';
5
- import { Component, ViewEncapsulation, ChangeDetectionStrategy, Directive, InjectionToken, booleanAttribute, Input, ContentChild, ContentChildren, inject, ElementRef, Injector, HostBinding, isDevMode, Injectable, TemplateRef, ViewContainerRef, forwardRef, ViewChild, numberAttribute, EventEmitter, Output, Optional, Inject, SkipSelf, HostListener, ChangeDetectorRef, Renderer2, Attribute, NgZone } from '@angular/core';
5
+ import { Component, ViewEncapsulation, ChangeDetectionStrategy, Directive, InjectionToken, booleanAttribute, Input, ContentChild, ContentChildren, inject, ElementRef, Injector, HostBinding, isDevMode, Injectable, TemplateRef, ViewContainerRef, forwardRef, ViewChild, numberAttribute, EventEmitter, Output, Optional, Inject, SkipSelf, HostListener, NgZone, NgModule, ChangeDetectorRef, Renderer2, Attribute } from '@angular/core';
6
6
  import * as i1$1 from '@ethlete/core';
7
7
  import { LetDirective, createDestroy, ScrollObserverFirstElementDirective, ScrollObserverLastElementDirective, Memo, createReactiveBindings, IS_EMAIL, MUST_MATCH, IS_ARRAY_NOT_EMPTY, equal, ResizeObserverService, createFlipAnimation, ClickOutsideDirective, ANIMATED_LIFECYCLE_TOKEN, AnimatedLifecycleDirective, RuntimeError, AnimatedOverlayDirective, SelectionModel, ActiveSelectionModel, ObserveContentDirective, clamp, nextFrame, DELAYABLE_TOKEN, ObserveResizeDirective, SmartBlockScrollStrategy, RouterStateService, ClickObserverService, FocusVisibleService, ViewportService, scrollToElement, getElementVisibleStates, IS_ACTIVE_ELEMENT, IS_ELEMENT, CursorDragScrollDirective, ObserveScrollStateDirective, IsElementDirective, IsActiveElementDirective, ScrollObserverIgnoreTargetDirective, TypedQueryList } from '@ethlete/core';
8
- import { BehaviorSubject, startWith, map, switchMap, combineLatest, pairwise, tap, takeUntil, skip, of, Subject, debounceTime, filter, distinctUntilChanged, withLatestFrom, skipWhile, catchError, throwError, firstValueFrom, fromEvent, merge, take, timer, skipUntil, defer, Subscription, Observable } from 'rxjs';
8
+ import { BehaviorSubject, startWith, map, switchMap, combineLatest, pairwise, tap, takeUntil, skip, of, Subject, debounceTime, filter, distinctUntilChanged, withLatestFrom, skipWhile, catchError, throwError, firstValueFrom, fromEvent, merge, take, timer, skipUntil, defer, partition, Subscription, Observable } from 'rxjs';
9
9
  import { trigger, state, style, transition, animate } from '@angular/animations';
10
10
  import { __decorate, __metadata } from 'tslib';
11
11
  import { extractQuery, isQueryStateLoading, isQueryStateSuccess, isQueryStateFailure, QueryDirective } from '@ethlete/query';
12
12
  import * as i1$2 from '@angular/cdk/a11y';
13
- import { FocusMonitor, LiveAnnouncer, AriaDescriber, FocusKeyManager, A11yModule } from '@angular/cdk/a11y';
13
+ import { FocusMonitor, LiveAnnouncer, InputModalityDetector, FocusKeyManager, AriaDescriber, A11yModule } from '@angular/cdk/a11y';
14
14
  import { AutofillMonitor } from '@angular/cdk/text-field';
15
15
  import { FormControl, NgControl, Validators, NG_VALUE_ACCESSOR } from '@angular/forms';
16
16
  import { ENTER, ESCAPE, TAB as TAB$1, A, DOWN_ARROW, UP_ARROW, LEFT_ARROW, RIGHT_ARROW, SPACE, hasModifierKey, PAGE_DOWN, PAGE_UP, END, HOME } from '@angular/cdk/keycodes';
@@ -18,17 +18,18 @@ import * as i1$4 from '@angular/cdk/bidi';
18
18
  import { Directionality } from '@angular/cdk/bidi';
19
19
  import { CdkDialogContainer, Dialog, DialogConfig, DIALOG_SCROLL_STRATEGY_PROVIDER as DIALOG_SCROLL_STRATEGY_PROVIDER$1 } from '@angular/cdk/dialog';
20
20
  import * as i2 from '@angular/cdk/overlay';
21
- import { ViewportRuler } from '@angular/cdk/overlay';
21
+ import { ViewportRuler, STANDARD_DROPDOWN_BELOW_POSITIONS, Overlay, OverlayConfig, STANDARD_DROPDOWN_ADJACENT_POSITIONS, OverlayModule } from '@angular/cdk/overlay';
22
+ import { coerceBooleanProperty, _isNumberValue } from '@angular/cdk/coercion';
23
+ import * as i2$1 from '@angular/cdk/platform';
24
+ import { _getEventTarget } from '@angular/cdk/platform';
25
+ 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';
26
+ import { UniqueSelectionDispatcher, _VIEW_REPEATER_STRATEGY, _RecycleViewRepeaterStrategy, _DisposeViewRepeaterStrategy, DataSource } from '@angular/cdk/collections';
22
27
  import { Meta, Title } from '@angular/platform-browser';
23
28
  import { Router, NavigationEnd, RouterLink, RouterLinkActive } from '@angular/router';
24
- import { _VIEW_REPEATER_STRATEGY, _RecycleViewRepeaterStrategy, _DisposeViewRepeaterStrategy, DataSource } from '@angular/cdk/collections';
25
- import * as i2$1 from '@angular/cdk/platform';
26
29
  import * as i3 from '@angular/cdk/scrolling';
27
30
  import { CdkScrollableModule, ViewportRuler as ViewportRuler$1 } from '@angular/cdk/scrolling';
28
31
  import * as i1$3 from '@angular/cdk/table';
29
32
  import { CdkCell, CdkCellDef, CdkColumnDef, CDK_TABLE, CdkFooterCell, CdkFooterCellDef, CdkHeaderCell, CdkHeaderCellDef, CdkTextColumn, TEXT_COLUMN_OPTIONS, CdkFooterRow, CdkTableModule, CDK_ROW_TEMPLATE, CdkFooterRowDef, CdkHeaderRow, CdkHeaderRowDef, CdkNoDataRow, CdkRow, CdkRowDef, CdkTable, _COALESCED_STYLE_SCHEDULER, STICKY_POSITIONING_LISTENER, _CoalescedStyleScheduler } from '@angular/cdk/table';
30
- import { _isNumberValue } from '@angular/cdk/coercion';
31
- import { takeUntil as takeUntil$1, take as take$1 } from 'rxjs/operators';
32
33
 
33
34
  class ChevronIconComponent {
34
35
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: ChevronIconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
@@ -6718,187 +6719,1590 @@ const provideDialog = () => {
6718
6719
  return [DialogService, DIALOG_SCROLL_STRATEGY_PROVIDER, Dialog, DIALOG_SCROLL_STRATEGY_PROVIDER$1];
6719
6720
  };
6720
6721
 
6721
- const TOGGLETIP_CONFIG = new InjectionToken('ToggletipConfig');
6722
- const TOGGLETIP_TEXT = new InjectionToken('ToggletipText');
6723
- const TOGGLETIP_TEMPLATE = new InjectionToken('ToggletipTemplate');
6724
- const TOGGLETIP_DEFAULT_CONFIG = {
6725
- placement: 'auto',
6726
- offset: [0, 8],
6727
- arrowPadding: 4,
6728
- customAnimated: false,
6722
+ /* eslint-disable @angular-eslint/directive-class-suffix */
6723
+ const MENU_STACK = new InjectionToken('cdk-menu-stack');
6724
+ const PARENT_OR_NEW_MENU_STACK_PROVIDER = {
6725
+ provide: MENU_STACK,
6726
+ deps: [[new Optional(), new SkipSelf(), new Inject(MENU_STACK)]],
6727
+ useFactory: (parentMenuStack) => parentMenuStack || new MenuStack(),
6729
6728
  };
6730
-
6731
- const createToggletipConfig = (config = {}) => ({
6732
- ...TOGGLETIP_DEFAULT_CONFIG,
6733
- ...(config || {}),
6729
+ const PARENT_OR_NEW_INLINE_MENU_STACK_PROVIDER = (orientation) => ({
6730
+ provide: MENU_STACK,
6731
+ deps: [[new Optional(), new SkipSelf(), new Inject(MENU_STACK)]],
6732
+ useFactory: (parentMenuStack) => parentMenuStack || MenuStack.inline(orientation),
6734
6733
  });
6734
+ let nextId$3 = 0;
6735
+ class MenuStack {
6736
+ constructor() {
6737
+ this.id = `${nextId$3++}`;
6738
+ this._elements = [];
6739
+ this._close = new Subject();
6740
+ this._empty = new Subject();
6741
+ this._hasFocus = new Subject();
6742
+ this.closed = this._close;
6743
+ this.hasFocus = this._hasFocus.pipe(startWith$1(false), debounceTime$1(0), distinctUntilChanged$1());
6744
+ this.emptied = this._empty;
6745
+ this._inlineMenuOrientation = null;
6746
+ }
6747
+ static inline(orientation) {
6748
+ const stack = new MenuStack();
6749
+ stack._inlineMenuOrientation = orientation;
6750
+ return stack;
6751
+ }
6752
+ push(menu) {
6753
+ this._elements.push(menu);
6754
+ }
6755
+ close(lastItem, options) {
6756
+ const { focusNextOnEmpty, focusParentTrigger } = { ...options };
6757
+ if (this._elements.indexOf(lastItem) >= 0) {
6758
+ let poppedElement;
6759
+ do {
6760
+ poppedElement = this._elements.pop();
6761
+ this._close.next({ item: poppedElement, focusParentTrigger });
6762
+ } while (poppedElement !== lastItem);
6763
+ if (this.isEmpty()) {
6764
+ this._empty.next(focusNextOnEmpty);
6765
+ }
6766
+ }
6767
+ }
6768
+ closeSubMenuOf(lastItem) {
6769
+ let removed = false;
6770
+ if (this._elements.indexOf(lastItem) >= 0) {
6771
+ removed = this.peek() !== lastItem;
6772
+ while (this.peek() !== lastItem) {
6773
+ this._close.next({ item: this._elements.pop() });
6774
+ }
6775
+ }
6776
+ return removed;
6777
+ }
6778
+ closeAll(options) {
6779
+ const { focusNextOnEmpty, focusParentTrigger } = { ...options };
6780
+ if (!this.isEmpty()) {
6781
+ while (!this.isEmpty()) {
6782
+ const menuStackItem = this._elements.pop();
6783
+ if (menuStackItem) {
6784
+ this._close.next({ item: menuStackItem, focusParentTrigger });
6785
+ }
6786
+ }
6787
+ this._empty.next(focusNextOnEmpty);
6788
+ }
6789
+ }
6790
+ isEmpty() {
6791
+ return !this._elements.length;
6792
+ }
6793
+ length() {
6794
+ return this._elements.length;
6795
+ }
6796
+ peek() {
6797
+ return this._elements[this._elements.length - 1];
6798
+ }
6799
+ hasInlineMenu() {
6800
+ return this._inlineMenuOrientation != null;
6801
+ }
6802
+ inlineMenuOrientation() {
6803
+ return this._inlineMenuOrientation;
6804
+ }
6805
+ setHasFocus(hasFocus) {
6806
+ this._hasFocus.next(hasFocus);
6807
+ }
6808
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: MenuStack, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
6809
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: MenuStack }); }
6810
+ }
6811
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: MenuStack, decorators: [{
6812
+ type: Injectable
6813
+ }] });
6735
6814
 
6736
- const provideToggletipConfig = (config = {}) => {
6737
- return { provide: TOGGLETIP_CONFIG, useValue: createToggletipConfig(config) };
6738
- };
6739
-
6740
- const TOGGLETIP_DIRECTIVE = new InjectionToken('TOGGLETIP_DIRECTIVE');
6741
- class ToggletipDirective {
6742
- get toggletip() {
6743
- return this._toggletip;
6815
+ const MENU_TRIGGER = new InjectionToken('cdk-menu-trigger');
6816
+ class CdkMenuTriggerBase {
6817
+ constructor() {
6818
+ this.injector = inject(Injector);
6819
+ this.viewContainerRef = inject(ViewContainerRef);
6820
+ this.menuStack = inject(MENU_STACK);
6821
+ this.menuPosition = null;
6822
+ this.opened = new EventEmitter();
6823
+ this.closed = new EventEmitter();
6824
+ this.menuTemplateRef = null;
6825
+ this.overlayRef = null;
6826
+ this.destroyed = new Subject();
6827
+ this.stopOutsideClicksListener = merge(this.closed, this.destroyed);
6828
+ this._menuPortal = null;
6744
6829
  }
6745
- set toggletip(v) {
6746
- this._toggletip = v;
6830
+ ngOnDestroy() {
6831
+ this._destroyOverlay();
6832
+ this.destroyed.next();
6833
+ this.destroyed.complete();
6747
6834
  }
6748
- get showToggletip() {
6749
- return this._showToggletip;
6835
+ isOpen() {
6836
+ return !!this.overlayRef?.hasAttached();
6750
6837
  }
6751
- set showToggletip(value) {
6752
- this._showToggletip = booleanAttribute(value);
6753
- if (this._showToggletip && !this._animatedOverlay.isMounted) {
6754
- nextFrame(() => {
6755
- this._mountToggletip();
6756
- this._addListeners();
6757
- });
6838
+ registerChildMenu(child) {
6839
+ this.childMenu = child;
6840
+ }
6841
+ getMenuContentPortal() {
6842
+ const hasMenuContentChanged = this.menuTemplateRef !== this._menuPortal?.templateRef;
6843
+ if (this.menuTemplateRef && (!this._menuPortal || hasMenuContentChanged)) {
6844
+ this._menuPortal = new TemplatePortal(this.menuTemplateRef, this.viewContainerRef, this.menuData, this._getChildMenuInjector());
6758
6845
  }
6759
- else if (!this._showToggletip && this._animatedOverlay.isMounted) {
6760
- this._animatedOverlay.unmount();
6761
- this._removeListeners();
6846
+ return this._menuPortal;
6847
+ }
6848
+ isElementInsideMenuStack(element) {
6849
+ for (let el = element; el; el = el?.parentElement ?? null) {
6850
+ if (el.getAttribute('data-cdk-menu-stack-id') === this.menuStack.id) {
6851
+ return true;
6852
+ }
6853
+ }
6854
+ return false;
6855
+ }
6856
+ _destroyOverlay() {
6857
+ if (this.overlayRef) {
6858
+ this.overlayRef.dispose();
6859
+ this.overlayRef = null;
6860
+ }
6861
+ }
6862
+ _getChildMenuInjector() {
6863
+ this._childMenuInjector =
6864
+ this._childMenuInjector ||
6865
+ Injector.create({
6866
+ providers: [
6867
+ { provide: MENU_TRIGGER, useValue: this },
6868
+ { provide: MENU_STACK, useValue: this.menuStack },
6869
+ ],
6870
+ parent: this.injector,
6871
+ });
6872
+ return this._childMenuInjector;
6873
+ }
6874
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: CdkMenuTriggerBase, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
6875
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.1", type: CdkMenuTriggerBase, host: { properties: { "attr.aria-controls": "childMenu?.id", "attr.data-cdk-menu-stack-id": "menuStack.id" } }, ngImport: i0 }); }
6876
+ }
6877
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: CdkMenuTriggerBase, decorators: [{
6878
+ type: Directive,
6879
+ args: [{
6880
+ host: {
6881
+ '[attr.aria-controls]': 'childMenu?.id',
6882
+ '[attr.data-cdk-menu-stack-id]': 'menuStack.id',
6883
+ },
6884
+ }]
6885
+ }] });
6886
+
6887
+ /* eslint-disable @angular-eslint/directive-class-suffix */
6888
+ const CONTEXT_MENU_POSITIONS = STANDARD_DROPDOWN_BELOW_POSITIONS.map((position) => {
6889
+ const offsetX = position.overlayX === 'start' ? 2 : -2;
6890
+ const offsetY = position.overlayY === 'top' ? 2 : -2;
6891
+ return { ...position, offsetX, offsetY };
6892
+ });
6893
+ class ContextMenuTracker {
6894
+ update(trigger) {
6895
+ if (ContextMenuTracker._openContextMenuTrigger !== trigger) {
6896
+ ContextMenuTracker._openContextMenuTrigger?.close();
6897
+ ContextMenuTracker._openContextMenuTrigger = trigger;
6762
6898
  }
6763
6899
  }
6900
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: ContextMenuTracker, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
6901
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: ContextMenuTracker, providedIn: 'root' }); }
6902
+ }
6903
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: ContextMenuTracker, decorators: [{
6904
+ type: Injectable,
6905
+ args: [{ providedIn: 'root' }]
6906
+ }] });
6907
+ class CdkContextMenuTrigger extends CdkMenuTriggerBase {
6908
+ get disabled() {
6909
+ return this._disabled;
6910
+ }
6911
+ set disabled(value) {
6912
+ this._disabled = coerceBooleanProperty(value);
6913
+ }
6764
6914
  constructor() {
6765
- this._destroy$ = createDestroy();
6766
- this._defaultConfig = inject(TOGGLETIP_CONFIG, { optional: true }) ?? createToggletipConfig();
6767
- this._animatedOverlay = inject(AnimatedOverlayDirective);
6768
- this._toggletip = null;
6769
- this._showToggletip = false;
6770
- this.toggletipClose = new EventEmitter();
6771
- this._clickObserverService = inject(ClickObserverService);
6772
- this._listenerSubscriptions = [];
6773
- this._animatedOverlay.placement = this._defaultConfig.placement;
6774
- this._animatedOverlay.offset = this._defaultConfig.offset;
6775
- this._animatedOverlay.arrowPadding = this._defaultConfig.arrowPadding;
6915
+ super();
6916
+ this._overlay = inject(Overlay);
6917
+ this._directionality = inject(Directionality, { optional: true });
6918
+ this._contextMenuTracker = inject(ContextMenuTracker);
6919
+ this._disabled = false;
6920
+ this._setMenuStackCloseListener();
6776
6921
  }
6777
- ngOnInit() {
6778
- this._animatedOverlay
6779
- .afterClosed()
6780
- .pipe(tap(() => {
6781
- this._removeListeners();
6782
- this.toggletipClose.emit();
6783
- }), takeUntil(this._destroy$))
6784
- .subscribe();
6922
+ open(coordinates) {
6923
+ this._open(coordinates, false);
6785
6924
  }
6786
- ngOnDestroy() {
6787
- this._animatedOverlay._destroy();
6788
- this._removeListeners();
6925
+ close() {
6926
+ this.menuStack.closeAll();
6789
6927
  }
6790
- _addListeners() {
6791
- const keyupEscSub = fromEvent(document, 'keyup')
6792
- .pipe(filter((e) => e.key === 'Escape'), tap(() => this._animatedOverlay.unmount()))
6793
- .subscribe();
6794
- const clickOutsideSub = this._clickObserverService
6795
- .observe(this._animatedOverlay.componentRef?.location.nativeElement)
6796
- .subscribe((e) => {
6797
- const targetElement = e.target;
6798
- const isInside = this._animatedOverlay.componentRef?.location.nativeElement.contains(targetElement);
6799
- if (!isInside) {
6800
- this._animatedOverlay.unmount();
6928
+ _openOnContextMenu(event) {
6929
+ if (!this.disabled) {
6930
+ event.preventDefault();
6931
+ event.stopPropagation();
6932
+ this._contextMenuTracker.update(this);
6933
+ this._open({ x: event.clientX, y: event.clientY }, true);
6934
+ if (event.button === 2) {
6935
+ this.childMenu?.focusFirstItem('mouse');
6936
+ }
6937
+ else if (event.button === 0) {
6938
+ this.childMenu?.focusFirstItem('keyboard');
6801
6939
  }
6940
+ else {
6941
+ this.childMenu?.focusFirstItem('program');
6942
+ }
6943
+ }
6944
+ }
6945
+ _getOverlayConfig(coordinates) {
6946
+ return new OverlayConfig({
6947
+ positionStrategy: this._getOverlayPositionStrategy(coordinates),
6948
+ scrollStrategy: this._overlay.scrollStrategies.reposition(),
6949
+ direction: this._directionality || undefined,
6802
6950
  });
6803
- this._listenerSubscriptions.push(keyupEscSub, clickOutsideSub);
6804
6951
  }
6805
- _removeListeners() {
6806
- this._listenerSubscriptions.forEach((s) => s.unsubscribe());
6807
- this._listenerSubscriptions.length = 0;
6952
+ _getOverlayPositionStrategy(coordinates) {
6953
+ return this._overlay
6954
+ .position()
6955
+ .flexibleConnectedTo(coordinates)
6956
+ .withLockedPosition()
6957
+ .withGrowAfterOpen()
6958
+ .withPositions(this.menuPosition ?? CONTEXT_MENU_POSITIONS);
6808
6959
  }
6809
- _mountToggletip() {
6810
- this._animatedOverlay.mount({
6811
- component: ToggletipComponent,
6812
- providers: [
6813
- {
6814
- provide: TOGGLETIP_CONFIG,
6815
- useValue: this._defaultConfig,
6816
- },
6817
- ...[
6818
- typeof this.toggletip === 'string'
6819
- ? {
6820
- provide: TOGGLETIP_TEXT,
6821
- useValue: this.toggletip,
6822
- }
6823
- : {
6824
- provide: TOGGLETIP_TEMPLATE,
6825
- useValue: this.toggletip,
6826
- },
6827
- ],
6828
- ],
6960
+ _setMenuStackCloseListener() {
6961
+ this.menuStack.closed.pipe(takeUntil$1(this.destroyed)).subscribe(({ item }) => {
6962
+ if (item === this.childMenu && this.isOpen()) {
6963
+ this.closed.next();
6964
+ this.overlayRef.detach();
6965
+ }
6829
6966
  });
6830
6967
  }
6831
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: ToggletipDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
6832
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.1", type: ToggletipDirective, isStandalone: true, selector: "[etToggletip]", inputs: { toggletip: ["etToggletip", "toggletip"], showToggletip: "showToggletip" }, outputs: { toggletipClose: "toggletipClose" }, providers: [
6833
- {
6834
- provide: TOGGLETIP_DIRECTIVE,
6835
- useExisting: ToggletipDirective,
6836
- },
6837
- ], hostDirectives: [{ directive: i1$1.AnimatedOverlayDirective, inputs: ["placement", "placement"] }], ngImport: i0 }); }
6968
+ _subscribeToOutsideClicks(ignoreFirstAuxClick) {
6969
+ if (this.overlayRef) {
6970
+ let outsideClicks = this.overlayRef.outsidePointerEvents();
6971
+ if (ignoreFirstAuxClick) {
6972
+ const [auxClicks, nonAuxClicks] = partition(outsideClicks, ({ type }) => type === 'auxclick');
6973
+ outsideClicks = merge(nonAuxClicks, auxClicks.pipe(skip$1(1)));
6974
+ }
6975
+ outsideClicks.pipe(takeUntil$1(this.stopOutsideClicksListener)).subscribe((event) => {
6976
+ if (!this.isElementInsideMenuStack(_getEventTarget(event))) {
6977
+ this.menuStack.closeAll();
6978
+ }
6979
+ });
6980
+ }
6981
+ }
6982
+ _open(coordinates, ignoreFirstOutsideAuxClick) {
6983
+ if (this.disabled) {
6984
+ return;
6985
+ }
6986
+ if (this.isOpen()) {
6987
+ this.menuStack.closeSubMenuOf(this.childMenu);
6988
+ this.overlayRef.getConfig().positionStrategy.setOrigin(coordinates);
6989
+ this.overlayRef.updatePosition();
6990
+ }
6991
+ else {
6992
+ this.opened.next();
6993
+ if (this.overlayRef) {
6994
+ this.overlayRef.getConfig().positionStrategy.setOrigin(coordinates);
6995
+ this.overlayRef.updatePosition();
6996
+ }
6997
+ else {
6998
+ this.overlayRef = this._overlay.create(this._getOverlayConfig(coordinates));
6999
+ }
7000
+ this.overlayRef.attach(this.getMenuContentPortal());
7001
+ this._subscribeToOutsideClicks(ignoreFirstOutsideAuxClick);
7002
+ }
7003
+ }
7004
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: CdkContextMenuTrigger, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
7005
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.1", type: CdkContextMenuTrigger, isStandalone: true, selector: "[cdkContextMenuTriggerFor]", inputs: { menuTemplateRef: ["cdkContextMenuTriggerFor", "menuTemplateRef"], menuPosition: ["cdkContextMenuPosition", "menuPosition"], menuData: ["cdkContextMenuTriggerData", "menuData"], disabled: ["cdkContextMenuDisabled", "disabled"] }, outputs: { opened: "cdkContextMenuOpened", closed: "cdkContextMenuClosed" }, host: { listeners: { "contextmenu": "_openOnContextMenu($event)" }, properties: { "attr.data-cdk-menu-stack-id": "null" } }, providers: [
7006
+ { provide: MENU_TRIGGER, useExisting: CdkContextMenuTrigger },
7007
+ { provide: MENU_STACK, useClass: MenuStack },
7008
+ ], exportAs: ["cdkContextMenuTriggerFor"], usesInheritance: true, ngImport: i0 }); }
6838
7009
  }
6839
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: ToggletipDirective, decorators: [{
7010
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: CdkContextMenuTrigger, decorators: [{
6840
7011
  type: Directive,
6841
7012
  args: [{
6842
- selector: '[etToggletip]',
7013
+ selector: '[cdkContextMenuTriggerFor]',
7014
+ exportAs: 'cdkContextMenuTriggerFor',
6843
7015
  standalone: true,
7016
+ host: {
7017
+ '[attr.data-cdk-menu-stack-id]': 'null',
7018
+ '(contextmenu)': '_openOnContextMenu($event)',
7019
+ },
7020
+ inputs: [
7021
+ 'menuTemplateRef: cdkContextMenuTriggerFor',
7022
+ 'menuPosition: cdkContextMenuPosition',
7023
+ 'menuData: cdkContextMenuTriggerData',
7024
+ ],
7025
+ outputs: ['opened: cdkContextMenuOpened', 'closed: cdkContextMenuClosed'],
6844
7026
  providers: [
6845
- {
6846
- provide: TOGGLETIP_DIRECTIVE,
6847
- useExisting: ToggletipDirective,
6848
- },
7027
+ { provide: MENU_TRIGGER, useExisting: CdkContextMenuTrigger },
7028
+ { provide: MENU_STACK, useClass: MenuStack },
6849
7029
  ],
6850
- hostDirectives: [{ directive: AnimatedOverlayDirective, inputs: ['placement'] }],
6851
7030
  }]
6852
- }], ctorParameters: function () { return []; }, propDecorators: { toggletip: [{
7031
+ }], ctorParameters: function () { return []; }, propDecorators: { disabled: [{
6853
7032
  type: Input,
6854
- args: ['etToggletip']
6855
- }], showToggletip: [{
6856
- type: Input
6857
- }], toggletipClose: [{
6858
- type: Output
7033
+ args: ['cdkContextMenuDisabled']
6859
7034
  }] } });
6860
7035
 
6861
- const TOGGLETIP = new InjectionToken('Toggletip');
6862
- // TODO(TRB): The focus should get trapped inside the toggletip.
6863
- // The toggletip trigger should get a aria-haspopup="true" and aria-expanded="true" attribute.
6864
- class ToggletipComponent {
7036
+ function throwMissingPointerFocusTracker() {
7037
+ throw Error('expected an instance of PointerFocusTracker to be provided');
7038
+ }
7039
+ function throwMissingMenuReference() {
7040
+ throw Error('expected a reference to the parent menu');
7041
+ }
7042
+
7043
+ /* eslint-disable @angular-eslint/directive-class-suffix */
7044
+ const MENU_AIM = new InjectionToken('cdk-menu-aim');
7045
+ const MOUSE_MOVE_SAMPLE_FREQUENCY = 3;
7046
+ const NUM_POINTS = 5;
7047
+ const CLOSE_DELAY = 300;
7048
+ function getSlope(a, b) {
7049
+ return (b.y - a.y) / (b.x - a.x);
7050
+ }
7051
+ function getYIntercept(point, slope) {
7052
+ return point.y - slope * point.x;
7053
+ }
7054
+ function isWithinSubmenu(submenuPoints, m, b) {
7055
+ const { left, right, top, bottom } = submenuPoints;
7056
+ return ((m * left + b >= top && m * left + b <= bottom) ||
7057
+ (m * right + b >= top && m * right + b <= bottom) ||
7058
+ ((top - b) / m >= left && (top - b) / m <= right) ||
7059
+ ((bottom - b) / m >= left && (bottom - b) / m <= right));
7060
+ }
7061
+ class TargetMenuAim {
6865
7062
  constructor() {
6866
- this._config = inject(TOGGLETIP_CONFIG);
6867
- this.toggletipText = inject(TOGGLETIP_TEXT, { optional: true });
6868
- this.toggletipTemplate = inject(TOGGLETIP_TEMPLATE, { optional: true });
6869
- this.injector = inject(Injector);
6870
- this._cdr = inject(ChangeDetectorRef);
6871
- this._trigger = inject(TOGGLETIP_DIRECTIVE);
7063
+ this._ngZone = inject(NgZone);
7064
+ this._points = [];
7065
+ this._menu = null;
7066
+ this._pointerTracker = null;
7067
+ this._timeoutId = null;
7068
+ this._destroyed = new Subject();
6872
7069
  }
6873
- get attrAriaHidden() {
6874
- return true;
7070
+ ngOnDestroy() {
7071
+ this._destroyed.next();
7072
+ this._destroyed.complete();
6875
7073
  }
6876
- get usesDefaultAnimation() {
6877
- return !this._config.customAnimated;
7074
+ initialize(menu, pointerTracker) {
7075
+ this._menu = menu;
7076
+ this._pointerTracker = pointerTracker;
7077
+ this._subscribeToMouseMoves();
6878
7078
  }
6879
- get containerClass() {
6880
- return this._config.containerClass;
7079
+ toggle(doToggle) {
7080
+ if (!this._menu)
7081
+ return;
7082
+ if (this._menu.orientation === 'horizontal') {
7083
+ doToggle();
7084
+ }
7085
+ this._checkConfigured();
7086
+ const siblingItemIsWaiting = !!this._timeoutId;
7087
+ const hasPoints = this._points.length > 1;
7088
+ if (hasPoints && !siblingItemIsWaiting) {
7089
+ if (this._isMovingToSubmenu()) {
7090
+ this._startTimeout(doToggle);
7091
+ }
7092
+ else {
7093
+ doToggle();
7094
+ }
7095
+ }
7096
+ else if (!siblingItemIsWaiting) {
7097
+ doToggle();
7098
+ }
6881
7099
  }
6882
- _markForCheck() {
6883
- this._cdr.markForCheck();
7100
+ _startTimeout(doToggle) {
7101
+ const timeoutId = window.setTimeout(() => {
7102
+ if (!this._pointerTracker)
7103
+ return;
7104
+ if (this._pointerTracker.activeElement && timeoutId === this._timeoutId) {
7105
+ doToggle();
7106
+ }
7107
+ this._timeoutId = null;
7108
+ }, CLOSE_DELAY);
7109
+ this._timeoutId = timeoutId;
6884
7110
  }
6885
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: ToggletipComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
6886
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.1", type: ToggletipComponent, isStandalone: true, selector: "et-toggletip", host: { properties: { "attr.aria-hidden": "this.attrAriaHidden", "class.et-with-default-animation": "this.usesDefaultAnimation", "class": "this.containerClass" }, classAttribute: "et-toggletip" }, providers: [
6887
- {
6888
- provide: TOGGLETIP,
6889
- useExisting: ToggletipComponent,
6890
- },
6891
- ], viewQueries: [{ propertyName: "_animatedLifecycle", first: true, predicate: ANIMATED_LIFECYCLE_TOKEN, descendants: true, static: true }], ngImport: i0, template: "<div class=\"et-toggletip-container\" etAnimatedLifecycle>\n <ng-container *ngIf=\"toggletipText\">\n {{ toggletipText }}\n </ng-container>\n\n <ng-container *ngIf=\"toggletipTemplate\">\n <ng-container *ngTemplateOutlet=\"toggletipTemplate; injector: injector\" />\n </ng-container>\n\n <div class=\"toggletip-arrow\" data-popper-arrow></div>\n</div>\n", styles: [":where(.et-toggletip){--background-color: hsl(0 0% 20%);--foreground-color: CanvasText;--border-radius: 4px;--padding-inline: 1.5ch;--padding-block: .75ch;--inline-max-size: 25ch;--arrow-size: 10px;--arrow-radius: 2px}.et-toggletip[data-popper-placement^=top] .toggletip-arrow{bottom:-4px}.et-toggletip[data-popper-placement^=right] .toggletip-arrow{left:-4px}.et-toggletip[data-popper-placement^=bottom] .toggletip-arrow{top:-4px}.et-toggletip[data-popper-placement^=left] .toggletip-arrow{right:-4px}.et-toggletip-container{z-index:1;inline-size:max-content;max-inline-size:var(--inline-max-size);padding:var(--padding-block) var(--padding-inline);border-radius:var(--border-radius);background:var(--background-color);color:var(--foreground-color)}.et-toggletip-container:before{content:\"; Has toggletip: \";clip:rect(1px,1px,1px,1px);clip-path:inset(50%);height:1px;width:1px;margin:-1px;overflow:hidden;padding:0;position:absolute}.toggletip-arrow{inline-size:var(--arrow-size);block-size:var(--arrow-size);position:absolute;z-index:-1}.toggletip-arrow:before{inline-size:var(--arrow-size);block-size:var(--arrow-size);border-radius:var(--arrow-radius);position:absolute;z-index:-1;transform:rotate(45deg);background:var(--background-color);top:0;left:0;content:\"\"}.et-toggletip.et-with-default-animation .et-toggletip-container.et-animation-enter-from,.et-toggletip.et-with-default-animation .et-toggletip-container.et-animation-leave-to{opacity:0}.et-toggletip.et-with-default-animation .et-toggletip-container.et-animation-enter-from .toggletip-arrow:before,.et-toggletip.et-with-default-animation .et-toggletip-container.et-animation-leave-to .toggletip-arrow:before{transform:rotate(45deg) scale(0)}.et-toggletip.et-with-default-animation .et-toggletip-container.et-animation-enter-active{transition:transform .2s var(--ease-out-5),opacity .2s var(--ease-out-5)}.et-toggletip.et-with-default-animation .et-toggletip-container.et-animation-enter-active .toggletip-arrow:before{transition:transform .2s var(--ease-out-5)}.et-toggletip.et-with-default-animation .et-toggletip-container.et-animation-leave-active{transition:transform .15s var(--ease-in-5),opacity .15s var(--ease-in-5)}.et-toggletip.et-with-default-animation .et-toggletip-container.et-animation-leave-active .toggletip-arrow:before{transition:transform .15s var(--ease-in-5)}.et-toggletip.et-with-default-animation[data-popper-placement^=top] .et-toggletip-container.et-animation-enter-from,.et-toggletip.et-with-default-animation[data-popper-placement^=top] .et-toggletip-container.et-animation-leave-to{transform:translateY(5px)}.et-toggletip.et-with-default-animation[data-popper-placement^=right] .et-toggletip-container.et-animation-enter-from,.et-toggletip.et-with-default-animation[data-popper-placement^=right] .et-toggletip-container.et-animation-leave-to{transform:translate(-5px)}.et-toggletip.et-with-default-animation[data-popper-placement^=bottom] .et-toggletip-container.et-animation-enter-from,.et-toggletip.et-with-default-animation[data-popper-placement^=bottom] .et-toggletip-container.et-animation-leave-to{transform:translateY(-5px)}.et-toggletip.et-with-default-animation[data-popper-placement^=left] .et-toggletip-container.et-animation-enter-from,.et-toggletip.et-with-default-animation[data-popper-placement^=left] .et-toggletip-container.et-animation-leave-to{transform:translate(5px)}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: AnimatedLifecycleDirective, selector: "[etAnimatedLifecycle]", exportAs: ["etAnimatedLifecycle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
7111
+ _isMovingToSubmenu() {
7112
+ const submenuPoints = this._getSubmenuBounds();
7113
+ if (!submenuPoints) {
7114
+ return false;
7115
+ }
7116
+ let numMoving = 0;
7117
+ const currPoint = this._points[this._points.length - 1];
7118
+ for (let i = this._points.length - 2; i >= 0; i--) {
7119
+ const previous = this._points[i];
7120
+ const slope = getSlope(currPoint, previous);
7121
+ if (isWithinSubmenu(submenuPoints, slope, getYIntercept(currPoint, slope))) {
7122
+ numMoving++;
7123
+ }
7124
+ }
7125
+ return numMoving >= Math.floor(NUM_POINTS / 2);
7126
+ }
7127
+ _getSubmenuBounds() {
7128
+ return this._pointerTracker?.previousElement?.getMenu()?.nativeElement.getBoundingClientRect();
7129
+ }
7130
+ _checkConfigured() {
7131
+ if (isDevMode()) {
7132
+ if (!this._pointerTracker) {
7133
+ throwMissingPointerFocusTracker();
7134
+ }
7135
+ if (!this._menu) {
7136
+ throwMissingMenuReference();
7137
+ }
7138
+ }
7139
+ }
7140
+ _subscribeToMouseMoves() {
7141
+ this._ngZone.runOutsideAngular(() => {
7142
+ if (!this._menu)
7143
+ return;
7144
+ fromEvent(this._menu.nativeElement, 'mousemove')
7145
+ .pipe(filter$1((_, index) => index % MOUSE_MOVE_SAMPLE_FREQUENCY === 0), takeUntil$1(this._destroyed))
7146
+ .subscribe((event) => {
7147
+ this._points.push({ x: event.clientX, y: event.clientY });
7148
+ if (this._points.length > NUM_POINTS) {
7149
+ this._points.shift();
7150
+ }
7151
+ });
7152
+ });
7153
+ }
7154
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: TargetMenuAim, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
7155
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: TargetMenuAim }); }
6892
7156
  }
6893
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: ToggletipComponent, decorators: [{
6894
- type: Component,
6895
- args: [{ selector: 'et-toggletip', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [NgIf, NgTemplateOutlet, AnimatedLifecycleDirective], host: {
6896
- class: 'et-toggletip',
6897
- }, providers: [
6898
- {
6899
- provide: TOGGLETIP,
6900
- useExisting: ToggletipComponent,
6901
- },
7157
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: TargetMenuAim, decorators: [{
7158
+ type: Injectable
7159
+ }] });
7160
+ class CdkTargetMenuAim {
7161
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: CdkTargetMenuAim, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
7162
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.1", type: CdkTargetMenuAim, isStandalone: true, selector: "[cdkTargetMenuAim]", providers: [{ provide: MENU_AIM, useClass: TargetMenuAim }], exportAs: ["cdkTargetMenuAim"], ngImport: i0 }); }
7163
+ }
7164
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: CdkTargetMenuAim, decorators: [{
7165
+ type: Directive,
7166
+ args: [{
7167
+ selector: '[cdkTargetMenuAim]',
7168
+ exportAs: 'cdkTargetMenuAim',
7169
+ standalone: true,
7170
+ providers: [{ provide: MENU_AIM, useClass: TargetMenuAim }],
7171
+ }]
7172
+ }] });
7173
+
7174
+ /* eslint-disable @angular-eslint/directive-class-suffix */
7175
+ class CdkMenuGroup {
7176
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: CdkMenuGroup, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
7177
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.1", type: CdkMenuGroup, isStandalone: true, selector: "[cdkMenuGroup]", host: { attributes: { "role": "group" }, classAttribute: "cdk-menu-group" }, providers: [{ provide: UniqueSelectionDispatcher, useClass: UniqueSelectionDispatcher }], exportAs: ["cdkMenuGroup"], ngImport: i0 }); }
7178
+ }
7179
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: CdkMenuGroup, decorators: [{
7180
+ type: Directive,
7181
+ args: [{
7182
+ selector: '[cdkMenuGroup]',
7183
+ exportAs: 'cdkMenuGroup',
7184
+ standalone: true,
7185
+ host: {
7186
+ role: 'group',
7187
+ class: 'cdk-menu-group',
7188
+ },
7189
+ providers: [{ provide: UniqueSelectionDispatcher, useClass: UniqueSelectionDispatcher }],
7190
+ }]
7191
+ }] });
7192
+
7193
+ const CDK_MENU = new InjectionToken('cdk-menu');
7194
+
7195
+ /* eslint-disable @angular-eslint/directive-class-suffix */
7196
+ class CdkMenuTrigger extends CdkMenuTriggerBase {
7197
+ constructor() {
7198
+ super();
7199
+ this._elementRef = inject(ElementRef);
7200
+ this._overlay = inject(Overlay);
7201
+ this._ngZone = inject(NgZone);
7202
+ this._directionality = inject(Directionality, { optional: true });
7203
+ this._inputModalityDetector = inject(InputModalityDetector);
7204
+ this._parentMenu = inject(CDK_MENU, { optional: true });
7205
+ this._menuAim = inject(MENU_AIM, { optional: true });
7206
+ this._setRole();
7207
+ this._registerCloseHandler();
7208
+ this._subscribeToMenuStackClosed();
7209
+ this._subscribeToMouseEnter();
7210
+ this._subscribeToMenuStackHasFocus();
7211
+ this._setType();
7212
+ }
7213
+ toggle() {
7214
+ this.isOpen() ? this.close() : this.open();
7215
+ }
7216
+ open() {
7217
+ if (!this.isOpen() && this.menuTemplateRef != null) {
7218
+ this.opened.next();
7219
+ this.overlayRef = this.overlayRef || this._overlay.create(this._getOverlayConfig());
7220
+ this.overlayRef.attach(this.getMenuContentPortal());
7221
+ this._subscribeToOutsideClicks();
7222
+ }
7223
+ }
7224
+ close() {
7225
+ if (this.isOpen()) {
7226
+ this.closed.next();
7227
+ this.overlayRef.detach();
7228
+ }
7229
+ this._closeSiblingTriggers();
7230
+ }
7231
+ getMenu() {
7232
+ return this.childMenu;
7233
+ }
7234
+ _toggleOnKeydown(event) {
7235
+ const isParentVertical = this._parentMenu?.orientation === 'vertical';
7236
+ switch (event.keyCode) {
7237
+ case SPACE:
7238
+ case ENTER:
7239
+ if (!hasModifierKey(event)) {
7240
+ this.toggle();
7241
+ this.childMenu?.focusFirstItem('keyboard');
7242
+ }
7243
+ break;
7244
+ case RIGHT_ARROW:
7245
+ if (!hasModifierKey(event)) {
7246
+ if (this._parentMenu && isParentVertical && this._directionality?.value !== 'rtl') {
7247
+ event.preventDefault();
7248
+ this.open();
7249
+ this.childMenu?.focusFirstItem('keyboard');
7250
+ }
7251
+ }
7252
+ break;
7253
+ case LEFT_ARROW:
7254
+ if (!hasModifierKey(event)) {
7255
+ if (this._parentMenu && isParentVertical && this._directionality?.value === 'rtl') {
7256
+ event.preventDefault();
7257
+ this.open();
7258
+ this.childMenu?.focusFirstItem('keyboard');
7259
+ }
7260
+ }
7261
+ break;
7262
+ case DOWN_ARROW:
7263
+ case UP_ARROW:
7264
+ if (!hasModifierKey(event)) {
7265
+ if (!isParentVertical) {
7266
+ event.preventDefault();
7267
+ this.open();
7268
+ event.keyCode === DOWN_ARROW
7269
+ ? this.childMenu?.focusFirstItem('keyboard')
7270
+ : this.childMenu?.focusLastItem('keyboard');
7271
+ }
7272
+ }
7273
+ break;
7274
+ }
7275
+ }
7276
+ _handleClick() {
7277
+ if (this._inputModalityDetector.mostRecentModality !== 'keyboard') {
7278
+ this.toggle();
7279
+ this.childMenu?.focusFirstItem('mouse');
7280
+ }
7281
+ }
7282
+ _setHasFocus(hasFocus) {
7283
+ if (!this._parentMenu) {
7284
+ this.menuStack.setHasFocus(hasFocus);
7285
+ }
7286
+ }
7287
+ _subscribeToMouseEnter() {
7288
+ this._ngZone.runOutsideAngular(() => {
7289
+ fromEvent(this._elementRef.nativeElement, 'mouseenter')
7290
+ .pipe(filter$1(() => !this.menuStack.isEmpty() && !this.isOpen()), takeUntil$1(this.destroyed))
7291
+ .subscribe(() => {
7292
+ const toggleMenus = () => this._ngZone.run(() => {
7293
+ this._closeSiblingTriggers();
7294
+ this.open();
7295
+ });
7296
+ if (this._menuAim) {
7297
+ this._menuAim.toggle(toggleMenus);
7298
+ }
7299
+ else {
7300
+ toggleMenus();
7301
+ }
7302
+ });
7303
+ });
7304
+ }
7305
+ _closeSiblingTriggers() {
7306
+ if (this._parentMenu) {
7307
+ const isParentMenuBar = !this.menuStack.closeSubMenuOf(this._parentMenu) && this.menuStack.peek() !== this._parentMenu;
7308
+ if (isParentMenuBar) {
7309
+ this.menuStack.closeAll();
7310
+ }
7311
+ }
7312
+ else {
7313
+ this.menuStack.closeAll();
7314
+ }
7315
+ }
7316
+ _getOverlayConfig() {
7317
+ return new OverlayConfig({
7318
+ positionStrategy: this._getOverlayPositionStrategy(),
7319
+ scrollStrategy: this._overlay.scrollStrategies.reposition(),
7320
+ direction: this._directionality || undefined,
7321
+ });
7322
+ }
7323
+ _getOverlayPositionStrategy() {
7324
+ return this._overlay
7325
+ .position()
7326
+ .flexibleConnectedTo(this._elementRef)
7327
+ .withLockedPosition()
7328
+ .withGrowAfterOpen()
7329
+ .withPositions(this._getOverlayPositions());
7330
+ }
7331
+ _getOverlayPositions() {
7332
+ return (this.menuPosition ??
7333
+ (!this._parentMenu || this._parentMenu.orientation === 'horizontal'
7334
+ ? STANDARD_DROPDOWN_BELOW_POSITIONS
7335
+ : STANDARD_DROPDOWN_ADJACENT_POSITIONS));
7336
+ }
7337
+ _registerCloseHandler() {
7338
+ if (!this._parentMenu) {
7339
+ this.menuStack.closed.pipe(takeUntil$1(this.destroyed)).subscribe(({ item }) => {
7340
+ if (item === this.childMenu) {
7341
+ this.close();
7342
+ }
7343
+ });
7344
+ }
7345
+ }
7346
+ _subscribeToOutsideClicks() {
7347
+ if (this.overlayRef) {
7348
+ this.overlayRef
7349
+ .outsidePointerEvents()
7350
+ .pipe(takeUntil$1(this.stopOutsideClicksListener))
7351
+ .subscribe((event) => {
7352
+ const target = _getEventTarget(event);
7353
+ const element = this._elementRef.nativeElement;
7354
+ if (target !== element && !element.contains(target)) {
7355
+ if (!this.isElementInsideMenuStack(target)) {
7356
+ this.menuStack.closeAll();
7357
+ }
7358
+ else {
7359
+ this._closeSiblingTriggers();
7360
+ }
7361
+ }
7362
+ });
7363
+ }
7364
+ }
7365
+ _subscribeToMenuStackHasFocus() {
7366
+ if (!this._parentMenu) {
7367
+ this.menuStack.hasFocus.pipe(takeUntil$1(this.destroyed)).subscribe((hasFocus) => {
7368
+ if (!hasFocus) {
7369
+ this.menuStack.closeAll();
7370
+ }
7371
+ });
7372
+ }
7373
+ }
7374
+ _subscribeToMenuStackClosed() {
7375
+ if (!this._parentMenu) {
7376
+ this.menuStack.closed.subscribe(({ focusParentTrigger }) => {
7377
+ if (focusParentTrigger && !this.menuStack.length()) {
7378
+ this._elementRef.nativeElement.focus();
7379
+ }
7380
+ });
7381
+ }
7382
+ }
7383
+ _setRole() {
7384
+ if (!this._parentMenu) {
7385
+ this._elementRef.nativeElement.setAttribute('role', 'button');
7386
+ }
7387
+ }
7388
+ _setType() {
7389
+ const element = this._elementRef.nativeElement;
7390
+ if (element.nodeName === 'BUTTON' && !element.getAttribute('type')) {
7391
+ element.setAttribute('type', 'button');
7392
+ }
7393
+ }
7394
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: CdkMenuTrigger, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
7395
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.1", type: CdkMenuTrigger, isStandalone: true, selector: "[cdkMenuTriggerFor]", inputs: { menuTemplateRef: ["cdkMenuTriggerFor", "menuTemplateRef"], menuPosition: ["cdkMenuPosition", "menuPosition"], menuData: ["cdkMenuTriggerData", "menuData"] }, outputs: { opened: "cdkMenuOpened", closed: "cdkMenuClosed" }, host: { listeners: { "focusin": "_setHasFocus(true)", "focusout": "_setHasFocus(false)", "keydown": "_toggleOnKeydown($event)", "click": "_handleClick()" }, properties: { "attr.aria-haspopup": "menuTemplateRef ? \"menu\" : null", "attr.aria-expanded": "menuTemplateRef == null ? null : isOpen()" }, classAttribute: "cdk-menu-trigger" }, providers: [{ provide: MENU_TRIGGER, useExisting: CdkMenuTrigger }, PARENT_OR_NEW_MENU_STACK_PROVIDER], exportAs: ["cdkMenuTriggerFor"], usesInheritance: true, ngImport: i0 }); }
7396
+ }
7397
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: CdkMenuTrigger, decorators: [{
7398
+ type: Directive,
7399
+ args: [{
7400
+ selector: '[cdkMenuTriggerFor]',
7401
+ exportAs: 'cdkMenuTriggerFor',
7402
+ standalone: true,
7403
+ host: {
7404
+ class: 'cdk-menu-trigger',
7405
+ '[attr.aria-haspopup]': 'menuTemplateRef ? "menu" : null',
7406
+ '[attr.aria-expanded]': 'menuTemplateRef == null ? null : isOpen()',
7407
+ '(focusin)': '_setHasFocus(true)',
7408
+ '(focusout)': '_setHasFocus(false)',
7409
+ '(keydown)': '_toggleOnKeydown($event)',
7410
+ '(click)': '_handleClick()',
7411
+ },
7412
+ inputs: ['menuTemplateRef: cdkMenuTriggerFor', 'menuPosition: cdkMenuPosition', 'menuData: cdkMenuTriggerData'],
7413
+ outputs: ['opened: cdkMenuOpened', 'closed: cdkMenuClosed'],
7414
+ providers: [{ provide: MENU_TRIGGER, useExisting: CdkMenuTrigger }, PARENT_OR_NEW_MENU_STACK_PROVIDER],
7415
+ }]
7416
+ }], ctorParameters: function () { return []; } });
7417
+
7418
+ /* eslint-disable @angular-eslint/directive-class-suffix */
7419
+ class CdkMenuItem {
7420
+ get disabled() {
7421
+ return this._disabled;
7422
+ }
7423
+ set disabled(value) {
7424
+ this._disabled = coerceBooleanProperty(value);
7425
+ }
7426
+ get hasMenu() {
7427
+ return this._menuTrigger?.menuTemplateRef != null;
7428
+ }
7429
+ constructor() {
7430
+ this._dir = inject(Directionality, { optional: true });
7431
+ this._inputModalityDetector = inject(InputModalityDetector);
7432
+ this._elementRef = inject(ElementRef);
7433
+ this._ngZone = inject(NgZone);
7434
+ this._menuAim = inject(MENU_AIM, { optional: true });
7435
+ this._menuStack = inject(MENU_STACK);
7436
+ this._parentMenu = inject(CDK_MENU, { optional: true });
7437
+ this._menuTrigger = inject(CdkMenuTrigger, { optional: true, self: true });
7438
+ this._disabled = false;
7439
+ this.typeaheadLabel = null;
7440
+ this.triggered = new EventEmitter();
7441
+ this._tabindex = -1;
7442
+ this.closeOnSpacebarTrigger = true;
7443
+ this.destroyed = new Subject();
7444
+ this._setupMouseEnter();
7445
+ this._setType();
7446
+ if (this._isStandaloneItem()) {
7447
+ this._tabindex = 0;
7448
+ }
7449
+ }
7450
+ ngOnDestroy() {
7451
+ this.destroyed.next();
7452
+ this.destroyed.complete();
7453
+ }
7454
+ focus() {
7455
+ this._elementRef.nativeElement.focus();
7456
+ }
7457
+ trigger(options) {
7458
+ const { keepOpen } = { ...options };
7459
+ if (!this.disabled && !this.hasMenu) {
7460
+ this.triggered.next();
7461
+ if (!keepOpen) {
7462
+ this._menuStack.closeAll({ focusParentTrigger: true });
7463
+ }
7464
+ }
7465
+ }
7466
+ isMenuOpen() {
7467
+ return !!this._menuTrigger?.isOpen();
7468
+ }
7469
+ getMenu() {
7470
+ return this._menuTrigger?.getMenu();
7471
+ }
7472
+ getMenuTrigger() {
7473
+ return this._menuTrigger;
7474
+ }
7475
+ getLabel() {
7476
+ return this.typeaheadLabel || this._elementRef.nativeElement.textContent?.trim() || '';
7477
+ }
7478
+ _resetTabIndex() {
7479
+ if (!this._isStandaloneItem()) {
7480
+ this._tabindex = -1;
7481
+ }
7482
+ }
7483
+ _setTabIndex(event) {
7484
+ if (this.disabled) {
7485
+ return;
7486
+ }
7487
+ if (!event || !this._menuStack.isEmpty()) {
7488
+ this._tabindex = 0;
7489
+ }
7490
+ }
7491
+ _onKeydown(event) {
7492
+ switch (event.keyCode) {
7493
+ case SPACE:
7494
+ case ENTER:
7495
+ if (!hasModifierKey(event)) {
7496
+ this.trigger({ keepOpen: event.keyCode === SPACE && !this.closeOnSpacebarTrigger });
7497
+ }
7498
+ break;
7499
+ case RIGHT_ARROW:
7500
+ if (!hasModifierKey(event)) {
7501
+ if (this._parentMenu && this._isParentVertical()) {
7502
+ if (this._dir?.value !== 'rtl') {
7503
+ this._forwardArrowPressed(event);
7504
+ }
7505
+ else {
7506
+ this._backArrowPressed(event);
7507
+ }
7508
+ }
7509
+ }
7510
+ break;
7511
+ case LEFT_ARROW:
7512
+ if (!hasModifierKey(event)) {
7513
+ if (this._parentMenu && this._isParentVertical()) {
7514
+ if (this._dir?.value !== 'rtl') {
7515
+ this._backArrowPressed(event);
7516
+ }
7517
+ else {
7518
+ this._forwardArrowPressed(event);
7519
+ }
7520
+ }
7521
+ }
7522
+ break;
7523
+ }
7524
+ }
7525
+ _handleClick() {
7526
+ if (this._inputModalityDetector.mostRecentModality !== 'keyboard') {
7527
+ this.trigger();
7528
+ }
7529
+ }
7530
+ _handleMousedown(event) {
7531
+ event.preventDefault();
7532
+ event.stopPropagation();
7533
+ }
7534
+ _isStandaloneItem() {
7535
+ return !this._parentMenu;
7536
+ }
7537
+ _backArrowPressed(event) {
7538
+ const parentMenu = this._parentMenu;
7539
+ if (this._menuStack.hasInlineMenu() || this._menuStack.length() > 1) {
7540
+ event.preventDefault();
7541
+ this._menuStack.close(parentMenu, {
7542
+ focusNextOnEmpty: this._menuStack.inlineMenuOrientation() === 'horizontal' ? 1 /* FocusNext.previousItem */ : 2 /* FocusNext.currentItem */,
7543
+ focusParentTrigger: true,
7544
+ });
7545
+ }
7546
+ }
7547
+ _forwardArrowPressed(event) {
7548
+ if (!this.hasMenu && this._menuStack.inlineMenuOrientation() === 'horizontal') {
7549
+ event.preventDefault();
7550
+ this._menuStack.closeAll({
7551
+ focusNextOnEmpty: 0 /* FocusNext.nextItem */,
7552
+ focusParentTrigger: true,
7553
+ });
7554
+ }
7555
+ }
7556
+ _setupMouseEnter() {
7557
+ if (!this._isStandaloneItem()) {
7558
+ const closeOpenSiblings = () => this._ngZone.run(() => this._menuStack.closeSubMenuOf(this._parentMenu));
7559
+ this._ngZone.runOutsideAngular(() => fromEvent(this._elementRef.nativeElement, 'mouseenter')
7560
+ .pipe(filter$1(() => !this._menuStack.isEmpty() && !this.hasMenu), takeUntil$1(this.destroyed))
7561
+ .subscribe(() => {
7562
+ if (this._menuAim) {
7563
+ this._menuAim.toggle(closeOpenSiblings);
7564
+ }
7565
+ else {
7566
+ closeOpenSiblings();
7567
+ }
7568
+ }));
7569
+ }
7570
+ }
7571
+ _isParentVertical() {
7572
+ return this._parentMenu?.orientation === 'vertical';
7573
+ }
7574
+ _setType() {
7575
+ const element = this._elementRef.nativeElement;
7576
+ if (element.nodeName === 'BUTTON' && !element.getAttribute('type')) {
7577
+ element.setAttribute('type', 'button');
7578
+ }
7579
+ }
7580
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: CdkMenuItem, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
7581
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.1", type: CdkMenuItem, isStandalone: true, selector: "[cdkMenuItem]", inputs: { disabled: ["cdkMenuItemDisabled", "disabled"], typeaheadLabel: ["cdkMenuitemTypeaheadLabel", "typeaheadLabel"] }, outputs: { triggered: "cdkMenuItemTriggered" }, host: { attributes: { "role": "menuitem" }, listeners: { "blur": "_resetTabIndex()", "focus": "_setTabIndex()", "click": "_handleClick()", "mousedown": "_handleMousedown($event)", "keydown": "_onKeydown($event)" }, properties: { "tabindex": "_tabindex", "attr.aria-disabled": "disabled || null" }, classAttribute: "cdk-menu-item" }, exportAs: ["cdkMenuItem"], ngImport: i0 }); }
7582
+ }
7583
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: CdkMenuItem, decorators: [{
7584
+ type: Directive,
7585
+ args: [{
7586
+ selector: '[cdkMenuItem]',
7587
+ exportAs: 'cdkMenuItem',
7588
+ standalone: true,
7589
+ host: {
7590
+ role: 'menuitem',
7591
+ class: 'cdk-menu-item',
7592
+ '[tabindex]': '_tabindex',
7593
+ '[attr.aria-disabled]': 'disabled || null',
7594
+ '(blur)': '_resetTabIndex()',
7595
+ '(focus)': '_setTabIndex()',
7596
+ '(click)': '_handleClick()',
7597
+ '(mousedown)': '_handleMousedown($event)',
7598
+ '(keydown)': '_onKeydown($event)',
7599
+ },
7600
+ }]
7601
+ }], ctorParameters: function () { return []; }, propDecorators: { disabled: [{
7602
+ type: Input,
7603
+ args: ['cdkMenuItemDisabled']
7604
+ }], typeaheadLabel: [{
7605
+ type: Input,
7606
+ args: ['cdkMenuitemTypeaheadLabel']
7607
+ }], triggered: [{
7608
+ type: Output,
7609
+ args: ['cdkMenuItemTriggered']
7610
+ }] } });
7611
+
7612
+ class PointerFocusTracker {
7613
+ constructor(_items) {
7614
+ this._items = _items;
7615
+ this.entered = this._getItemPointerEntries();
7616
+ this.exited = this._getItemPointerExits();
7617
+ this._destroyed = new Subject();
7618
+ this.entered.subscribe((element) => (this.activeElement = element));
7619
+ this.exited.subscribe(() => {
7620
+ this.previousElement = this.activeElement;
7621
+ this.activeElement = undefined;
7622
+ });
7623
+ }
7624
+ destroy() {
7625
+ this._destroyed.next();
7626
+ this._destroyed.complete();
7627
+ }
7628
+ _getItemPointerEntries() {
7629
+ return defer(() => this._items.changes.pipe(startWith$1(this._items), mergeMap((list) => list.map((element) => fromEvent(element._elementRef.nativeElement, 'mouseenter').pipe(mapTo(element), takeUntil$1(this._items.changes)))), mergeAll()));
7630
+ }
7631
+ _getItemPointerExits() {
7632
+ return defer(() => this._items.changes.pipe(startWith$1(this._items), mergeMap((list) => list.map((element) => fromEvent(element._elementRef.nativeElement, 'mouseout').pipe(mapTo(element), takeUntil$1(this._items.changes)))), mergeAll()));
7633
+ }
7634
+ }
7635
+
7636
+ /* eslint-disable @angular-eslint/directive-class-suffix */
7637
+ let nextId$2 = 0;
7638
+ class CdkMenuBase extends CdkMenuGroup {
7639
+ constructor() {
7640
+ super(...arguments);
7641
+ this.nativeElement = inject(ElementRef).nativeElement;
7642
+ this.ngZone = inject(NgZone);
7643
+ this.menuStack = inject(MENU_STACK);
7644
+ this.menuAim = inject(MENU_AIM, { optional: true, self: true });
7645
+ this.dir = inject(Directionality, { optional: true });
7646
+ this.id = `cdk-menu-${nextId$2++}`;
7647
+ this.items = null;
7648
+ this.orientation = 'vertical';
7649
+ this.isInline = false;
7650
+ this.keyManager = null;
7651
+ this.destroyed = new Subject();
7652
+ this._menuStackHasFocus = false;
7653
+ }
7654
+ ngAfterContentInit() {
7655
+ if (!this.isInline) {
7656
+ this.menuStack.push(this);
7657
+ }
7658
+ this._setKeyManager();
7659
+ this._subscribeToMenuStackHasFocus();
7660
+ this._subscribeToMenuOpen();
7661
+ this._subscribeToMenuStackClosed();
7662
+ this._setUpPointerTracker();
7663
+ }
7664
+ ngOnDestroy() {
7665
+ this.keyManager?.destroy();
7666
+ this.destroyed.next();
7667
+ this.destroyed.complete();
7668
+ this.pointerTracker?.destroy();
7669
+ }
7670
+ focusFirstItem(focusOrigin = 'program') {
7671
+ if (!this.keyManager)
7672
+ return;
7673
+ this.keyManager.setFocusOrigin(focusOrigin);
7674
+ this.keyManager.setFirstItemActive();
7675
+ }
7676
+ focusLastItem(focusOrigin = 'program') {
7677
+ if (!this.keyManager)
7678
+ return;
7679
+ this.keyManager.setFocusOrigin(focusOrigin);
7680
+ this.keyManager.setLastItemActive();
7681
+ }
7682
+ _getTabIndex() {
7683
+ const tabindexIfInline = this._menuStackHasFocus ? -1 : 0;
7684
+ return this.isInline ? tabindexIfInline : null;
7685
+ }
7686
+ closeOpenMenu(menu, options) {
7687
+ const { focusParentTrigger } = { ...options };
7688
+ const keyManager = this.keyManager;
7689
+ const trigger = this.triggerItem;
7690
+ if (menu === trigger?.getMenuTrigger()?.getMenu()) {
7691
+ trigger?.getMenuTrigger()?.close();
7692
+ if (focusParentTrigger) {
7693
+ if (!keyManager)
7694
+ return;
7695
+ if (trigger) {
7696
+ keyManager.setActiveItem(trigger);
7697
+ }
7698
+ else {
7699
+ keyManager.setFirstItemActive();
7700
+ }
7701
+ }
7702
+ }
7703
+ }
7704
+ _setKeyManager() {
7705
+ if (!this.items)
7706
+ return;
7707
+ this.keyManager = new FocusKeyManager(this.items).withWrap().withTypeAhead().withHomeAndEnd();
7708
+ if (this.orientation === 'horizontal') {
7709
+ this.keyManager.withHorizontalOrientation(this.dir?.value || 'ltr');
7710
+ }
7711
+ else {
7712
+ this.keyManager.withVerticalOrientation();
7713
+ }
7714
+ }
7715
+ _subscribeToMenuOpen() {
7716
+ if (!this.items)
7717
+ return;
7718
+ const exitCondition = merge(this.items.changes, this.destroyed);
7719
+ this.items.changes
7720
+ .pipe(startWith$1(this.items), mergeMap((list) => list
7721
+ .filter((item) => item.hasMenu)
7722
+ .map((item) => item.getMenuTrigger().opened.pipe(mapTo(item), takeUntil$1(exitCondition)))), mergeAll(), switchMap$1((item) => {
7723
+ this.triggerItem = item;
7724
+ return item.getMenuTrigger().closed;
7725
+ }), takeUntil$1(this.destroyed))
7726
+ .subscribe(() => (this.triggerItem = undefined));
7727
+ }
7728
+ _subscribeToMenuStackClosed() {
7729
+ this.menuStack.closed
7730
+ .pipe(takeUntil$1(this.destroyed))
7731
+ .subscribe(({ item, focusParentTrigger }) => this.closeOpenMenu(item, { focusParentTrigger }));
7732
+ }
7733
+ _subscribeToMenuStackHasFocus() {
7734
+ if (this.isInline) {
7735
+ this.menuStack.hasFocus.pipe(takeUntil$1(this.destroyed)).subscribe((hasFocus) => {
7736
+ this._menuStackHasFocus = hasFocus;
7737
+ });
7738
+ }
7739
+ }
7740
+ _setUpPointerTracker() {
7741
+ if (this.menuAim) {
7742
+ this.ngZone.runOutsideAngular(() => {
7743
+ if (!this.items)
7744
+ return;
7745
+ this.pointerTracker = new PointerFocusTracker(this.items);
7746
+ });
7747
+ this.menuAim.initialize(this, this.pointerTracker);
7748
+ }
7749
+ }
7750
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: CdkMenuBase, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
7751
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.1", type: CdkMenuBase, inputs: { id: "id" }, host: { attributes: { "role": "menu" }, listeners: { "focus": "focusFirstItem()", "focusin": "menuStack.setHasFocus(true)", "focusout": "menuStack.setHasFocus(false)" }, properties: { "tabindex": "_getTabIndex()", "id": "id", "attr.aria-orientation": "orientation", "attr.data-cdk-menu-stack-id": "menuStack.id" } }, queries: [{ propertyName: "items", predicate: CdkMenuItem, descendants: true }], usesInheritance: true, ngImport: i0 }); }
7752
+ }
7753
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: CdkMenuBase, decorators: [{
7754
+ type: Directive,
7755
+ args: [{
7756
+ host: {
7757
+ role: 'menu',
7758
+ class: '',
7759
+ '[tabindex]': '_getTabIndex()',
7760
+ '[id]': 'id',
7761
+ '[attr.aria-orientation]': 'orientation',
7762
+ '[attr.data-cdk-menu-stack-id]': 'menuStack.id',
7763
+ '(focus)': 'focusFirstItem()',
7764
+ '(focusin)': 'menuStack.setHasFocus(true)',
7765
+ '(focusout)': 'menuStack.setHasFocus(false)',
7766
+ },
7767
+ }]
7768
+ }], propDecorators: { id: [{
7769
+ type: Input
7770
+ }], items: [{
7771
+ type: ContentChildren,
7772
+ args: [CdkMenuItem, { descendants: true }]
7773
+ }] } });
7774
+
7775
+ /* eslint-disable @angular-eslint/directive-class-suffix */
7776
+ class CdkMenu extends CdkMenuBase {
7777
+ constructor() {
7778
+ super();
7779
+ this._parentTrigger = inject(MENU_TRIGGER, { optional: true });
7780
+ this.closed = new EventEmitter();
7781
+ this.orientation = 'vertical';
7782
+ this.isInline = !this._parentTrigger;
7783
+ this.destroyed.subscribe(this.closed);
7784
+ this._parentTrigger?.registerChildMenu(this);
7785
+ }
7786
+ ngAfterContentInit() {
7787
+ super.ngAfterContentInit();
7788
+ this._subscribeToMenuStackEmptied();
7789
+ }
7790
+ ngOnDestroy() {
7791
+ super.ngOnDestroy();
7792
+ this.closed.complete();
7793
+ }
7794
+ _handleKeyEvent(event) {
7795
+ const keyManager = this.keyManager;
7796
+ if (!keyManager)
7797
+ return;
7798
+ switch (event.keyCode) {
7799
+ case LEFT_ARROW:
7800
+ case RIGHT_ARROW:
7801
+ if (!hasModifierKey(event)) {
7802
+ event.preventDefault();
7803
+ keyManager.setFocusOrigin('keyboard');
7804
+ keyManager.onKeydown(event);
7805
+ }
7806
+ break;
7807
+ case ESCAPE:
7808
+ if (!hasModifierKey(event)) {
7809
+ event.preventDefault();
7810
+ this.menuStack.close(this, {
7811
+ focusNextOnEmpty: 2 /* FocusNext.currentItem */,
7812
+ focusParentTrigger: true,
7813
+ });
7814
+ }
7815
+ break;
7816
+ case TAB$1:
7817
+ if (!hasModifierKey(event, 'altKey', 'metaKey', 'ctrlKey')) {
7818
+ this.menuStack.closeAll({ focusParentTrigger: true });
7819
+ }
7820
+ break;
7821
+ default:
7822
+ keyManager.onKeydown(event);
7823
+ }
7824
+ }
7825
+ _toggleMenuFocus(focusNext) {
7826
+ const keyManager = this.keyManager;
7827
+ if (!keyManager)
7828
+ return;
7829
+ switch (focusNext) {
7830
+ case 0 /* FocusNext.nextItem */:
7831
+ keyManager.setFocusOrigin('keyboard');
7832
+ keyManager.setNextItemActive();
7833
+ break;
7834
+ case 1 /* FocusNext.previousItem */:
7835
+ keyManager.setFocusOrigin('keyboard');
7836
+ keyManager.setPreviousItemActive();
7837
+ break;
7838
+ case 2 /* FocusNext.currentItem */:
7839
+ if (keyManager.activeItem) {
7840
+ keyManager.setFocusOrigin('keyboard');
7841
+ keyManager.setActiveItem(keyManager.activeItem);
7842
+ }
7843
+ break;
7844
+ }
7845
+ }
7846
+ _subscribeToMenuStackEmptied() {
7847
+ this.menuStack.emptied.pipe(takeUntil$1(this.destroyed)).subscribe((event) => this._toggleMenuFocus(event));
7848
+ }
7849
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: CdkMenu, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
7850
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.1", type: CdkMenu, isStandalone: true, selector: "[cdkMenu]", outputs: { closed: "closed" }, host: { attributes: { "role": "menu" }, listeners: { "keydown": "_handleKeyEvent($event)" }, properties: { "class.cdk-menu-inline": "isInline" }, classAttribute: "cdk-menu" }, providers: [
7851
+ { provide: CdkMenuGroup, useExisting: CdkMenu },
7852
+ { provide: CDK_MENU, useExisting: CdkMenu },
7853
+ PARENT_OR_NEW_INLINE_MENU_STACK_PROVIDER('vertical'),
7854
+ ], exportAs: ["cdkMenu"], usesInheritance: true, ngImport: i0 }); }
7855
+ }
7856
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: CdkMenu, decorators: [{
7857
+ type: Directive,
7858
+ args: [{
7859
+ selector: '[cdkMenu]',
7860
+ exportAs: 'cdkMenu',
7861
+ standalone: true,
7862
+ host: {
7863
+ role: 'menu',
7864
+ class: 'cdk-menu',
7865
+ '[class.cdk-menu-inline]': 'isInline',
7866
+ '(keydown)': '_handleKeyEvent($event)',
7867
+ },
7868
+ providers: [
7869
+ { provide: CdkMenuGroup, useExisting: CdkMenu },
7870
+ { provide: CDK_MENU, useExisting: CdkMenu },
7871
+ PARENT_OR_NEW_INLINE_MENU_STACK_PROVIDER('vertical'),
7872
+ ],
7873
+ }]
7874
+ }], ctorParameters: function () { return []; }, propDecorators: { closed: [{
7875
+ type: Output
7876
+ }] } });
7877
+
7878
+ /* eslint-disable @angular-eslint/directive-class-suffix */
7879
+ class CdkMenuBar extends CdkMenuBase {
7880
+ constructor() {
7881
+ super(...arguments);
7882
+ this.orientation = 'horizontal';
7883
+ this.isInline = true;
7884
+ }
7885
+ ngAfterContentInit() {
7886
+ super.ngAfterContentInit();
7887
+ this._subscribeToMenuStackEmptied();
7888
+ }
7889
+ _handleKeyEvent(event) {
7890
+ const keyManager = this.keyManager;
7891
+ if (!keyManager)
7892
+ return;
7893
+ switch (event.keyCode) {
7894
+ case UP_ARROW:
7895
+ case DOWN_ARROW:
7896
+ case LEFT_ARROW:
7897
+ case RIGHT_ARROW:
7898
+ if (!hasModifierKey(event)) {
7899
+ const horizontalArrows = event.keyCode === LEFT_ARROW || event.keyCode === RIGHT_ARROW;
7900
+ if (horizontalArrows) {
7901
+ event.preventDefault();
7902
+ const prevIsOpen = keyManager.activeItem?.isMenuOpen();
7903
+ keyManager.activeItem?.getMenuTrigger()?.close();
7904
+ keyManager.setFocusOrigin('keyboard');
7905
+ keyManager.onKeydown(event);
7906
+ if (prevIsOpen) {
7907
+ keyManager.activeItem?.getMenuTrigger()?.open();
7908
+ }
7909
+ }
7910
+ }
7911
+ break;
7912
+ case ESCAPE:
7913
+ if (!hasModifierKey(event)) {
7914
+ event.preventDefault();
7915
+ keyManager.activeItem?.getMenuTrigger()?.close();
7916
+ }
7917
+ break;
7918
+ case TAB$1:
7919
+ if (!hasModifierKey(event, 'altKey', 'metaKey', 'ctrlKey')) {
7920
+ keyManager.activeItem?.getMenuTrigger()?.close();
7921
+ }
7922
+ break;
7923
+ default:
7924
+ keyManager.onKeydown(event);
7925
+ }
7926
+ }
7927
+ _toggleOpenMenu(focusNext) {
7928
+ const keyManager = this.keyManager;
7929
+ if (!keyManager)
7930
+ return;
7931
+ switch (focusNext) {
7932
+ case 0 /* FocusNext.nextItem */:
7933
+ keyManager.setFocusOrigin('keyboard');
7934
+ keyManager.setNextItemActive();
7935
+ keyManager.activeItem?.getMenuTrigger()?.open();
7936
+ break;
7937
+ case 1 /* FocusNext.previousItem */:
7938
+ keyManager.setFocusOrigin('keyboard');
7939
+ keyManager.setPreviousItemActive();
7940
+ keyManager.activeItem?.getMenuTrigger()?.open();
7941
+ break;
7942
+ case 2 /* FocusNext.currentItem */:
7943
+ if (keyManager.activeItem) {
7944
+ keyManager.setFocusOrigin('keyboard');
7945
+ keyManager.setActiveItem(keyManager.activeItem);
7946
+ }
7947
+ break;
7948
+ }
7949
+ }
7950
+ _subscribeToMenuStackEmptied() {
7951
+ this.menuStack?.emptied.pipe(takeUntil$1(this.destroyed)).subscribe((event) => this._toggleOpenMenu(event));
7952
+ }
7953
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: CdkMenuBar, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
7954
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.1", type: CdkMenuBar, isStandalone: true, selector: "[cdkMenuBar]", host: { attributes: { "role": "menubar" }, listeners: { "keydown": "_handleKeyEvent($event)" }, classAttribute: "cdk-menu-bar" }, providers: [
7955
+ { provide: CdkMenuGroup, useExisting: CdkMenuBar },
7956
+ { provide: CDK_MENU, useExisting: CdkMenuBar },
7957
+ { provide: MENU_STACK, useFactory: () => MenuStack.inline('horizontal') },
7958
+ ], exportAs: ["cdkMenuBar"], usesInheritance: true, ngImport: i0 }); }
7959
+ }
7960
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: CdkMenuBar, decorators: [{
7961
+ type: Directive,
7962
+ args: [{
7963
+ selector: '[cdkMenuBar]',
7964
+ exportAs: 'cdkMenuBar',
7965
+ standalone: true,
7966
+ host: {
7967
+ role: 'menubar',
7968
+ class: 'cdk-menu-bar',
7969
+ '(keydown)': '_handleKeyEvent($event)',
7970
+ },
7971
+ providers: [
7972
+ { provide: CdkMenuGroup, useExisting: CdkMenuBar },
7973
+ { provide: CDK_MENU, useExisting: CdkMenuBar },
7974
+ { provide: MENU_STACK, useFactory: () => MenuStack.inline('horizontal') },
7975
+ ],
7976
+ }]
7977
+ }] });
7978
+
7979
+ class CdkMenuItemSelectable extends CdkMenuItem {
7980
+ constructor() {
7981
+ super(...arguments);
7982
+ this._checked = false;
7983
+ this.closeOnSpacebarTrigger = false;
7984
+ }
7985
+ get checked() {
7986
+ return this._checked;
7987
+ }
7988
+ set checked(value) {
7989
+ this._checked = coerceBooleanProperty(value);
7990
+ }
7991
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: CdkMenuItemSelectable, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
7992
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.1", type: CdkMenuItemSelectable, inputs: { checked: ["cdkMenuItemChecked", "checked"] }, host: { properties: { "attr.aria-checked": "!!checked", "attr.aria-disabled": "disabled || null" } }, usesInheritance: true, ngImport: i0 }); }
7993
+ }
7994
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: CdkMenuItemSelectable, decorators: [{
7995
+ type: Directive,
7996
+ args: [{
7997
+ host: {
7998
+ '[attr.aria-checked]': '!!checked',
7999
+ '[attr.aria-disabled]': 'disabled || null',
8000
+ },
8001
+ }]
8002
+ }], propDecorators: { checked: [{
8003
+ type: Input,
8004
+ args: ['cdkMenuItemChecked']
8005
+ }] } });
8006
+
8007
+ /* eslint-disable @angular-eslint/directive-class-suffix */
8008
+ class CdkMenuItemCheckbox extends CdkMenuItemSelectable {
8009
+ trigger(options) {
8010
+ super.trigger(options);
8011
+ if (!this.disabled) {
8012
+ this.checked = !this.checked;
8013
+ }
8014
+ }
8015
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: CdkMenuItemCheckbox, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
8016
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.1", type: CdkMenuItemCheckbox, isStandalone: true, selector: "[cdkMenuItemCheckbox]", host: { attributes: { "role": "menuitemcheckbox" }, properties: { "class.cdk-menu-item-checkbox": "true" } }, providers: [
8017
+ { provide: CdkMenuItemSelectable, useExisting: CdkMenuItemCheckbox },
8018
+ { provide: CdkMenuItem, useExisting: CdkMenuItemSelectable },
8019
+ ], exportAs: ["cdkMenuItemCheckbox"], usesInheritance: true, ngImport: i0 }); }
8020
+ }
8021
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: CdkMenuItemCheckbox, decorators: [{
8022
+ type: Directive,
8023
+ args: [{
8024
+ selector: '[cdkMenuItemCheckbox]',
8025
+ exportAs: 'cdkMenuItemCheckbox',
8026
+ standalone: true,
8027
+ host: {
8028
+ role: 'menuitemcheckbox',
8029
+ '[class.cdk-menu-item-checkbox]': 'true',
8030
+ },
8031
+ providers: [
8032
+ { provide: CdkMenuItemSelectable, useExisting: CdkMenuItemCheckbox },
8033
+ { provide: CdkMenuItem, useExisting: CdkMenuItemSelectable },
8034
+ ],
8035
+ }]
8036
+ }] });
8037
+
8038
+ /* eslint-disable @angular-eslint/directive-class-suffix */
8039
+ let nextId$1 = 0;
8040
+ class CdkMenuItemRadio extends CdkMenuItemSelectable {
8041
+ constructor() {
8042
+ super();
8043
+ this._selectionDispatcher = inject(UniqueSelectionDispatcher);
8044
+ this._id = `${nextId$1++}`;
8045
+ this._registerDispatcherListener();
8046
+ }
8047
+ ngOnDestroy() {
8048
+ super.ngOnDestroy();
8049
+ this._removeDispatcherListener?.();
8050
+ }
8051
+ trigger(options) {
8052
+ super.trigger(options);
8053
+ if (!this.disabled) {
8054
+ this._selectionDispatcher.notify(this._id, '');
8055
+ }
8056
+ }
8057
+ _registerDispatcherListener() {
8058
+ this._removeDispatcherListener = this._selectionDispatcher.listen((id) => {
8059
+ this.checked = this._id === id;
8060
+ });
8061
+ }
8062
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: CdkMenuItemRadio, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
8063
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.1", type: CdkMenuItemRadio, isStandalone: true, selector: "[cdkMenuItemRadio]", host: { attributes: { "role": "menuitemradio" }, properties: { "class.cdk-menu-item-radio": "true" } }, providers: [
8064
+ { provide: CdkMenuItemSelectable, useExisting: CdkMenuItemRadio },
8065
+ { provide: CdkMenuItem, useExisting: CdkMenuItemSelectable },
8066
+ ], exportAs: ["cdkMenuItemRadio"], usesInheritance: true, ngImport: i0 }); }
8067
+ }
8068
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: CdkMenuItemRadio, decorators: [{
8069
+ type: Directive,
8070
+ args: [{
8071
+ selector: '[cdkMenuItemRadio]',
8072
+ exportAs: 'cdkMenuItemRadio',
8073
+ standalone: true,
8074
+ host: {
8075
+ role: 'menuitemradio',
8076
+ '[class.cdk-menu-item-radio]': 'true',
8077
+ },
8078
+ providers: [
8079
+ { provide: CdkMenuItemSelectable, useExisting: CdkMenuItemRadio },
8080
+ { provide: CdkMenuItem, useExisting: CdkMenuItemSelectable },
8081
+ ],
8082
+ }]
8083
+ }], ctorParameters: function () { return []; } });
8084
+
8085
+ const MENU_DIRECTIVES = [
8086
+ CdkMenuBar,
8087
+ CdkMenu,
8088
+ CdkMenuItem,
8089
+ CdkMenuItemRadio,
8090
+ CdkMenuItemCheckbox,
8091
+ CdkMenuTrigger,
8092
+ CdkMenuGroup,
8093
+ CdkContextMenuTrigger,
8094
+ CdkTargetMenuAim,
8095
+ ];
8096
+ class CdkMenuModule {
8097
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: CdkMenuModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
8098
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.1", ngImport: i0, type: CdkMenuModule, imports: [OverlayModule, CdkMenuBar,
8099
+ CdkMenu,
8100
+ CdkMenuItem,
8101
+ CdkMenuItemRadio,
8102
+ CdkMenuItemCheckbox,
8103
+ CdkMenuTrigger,
8104
+ CdkMenuGroup,
8105
+ CdkContextMenuTrigger,
8106
+ CdkTargetMenuAim], exports: [CdkMenuBar,
8107
+ CdkMenu,
8108
+ CdkMenuItem,
8109
+ CdkMenuItemRadio,
8110
+ CdkMenuItemCheckbox,
8111
+ CdkMenuTrigger,
8112
+ CdkMenuGroup,
8113
+ CdkContextMenuTrigger,
8114
+ CdkTargetMenuAim] }); }
8115
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: CdkMenuModule, imports: [OverlayModule] }); }
8116
+ }
8117
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: CdkMenuModule, decorators: [{
8118
+ type: NgModule,
8119
+ args: [{
8120
+ imports: [OverlayModule, ...MENU_DIRECTIVES],
8121
+ exports: MENU_DIRECTIVES,
8122
+ }]
8123
+ }] });
8124
+
8125
+ const TOGGLETIP_CONFIG = new InjectionToken('ToggletipConfig');
8126
+ const TOGGLETIP_TEXT = new InjectionToken('ToggletipText');
8127
+ const TOGGLETIP_TEMPLATE = new InjectionToken('ToggletipTemplate');
8128
+ const TOGGLETIP_DEFAULT_CONFIG = {
8129
+ placement: 'auto',
8130
+ offset: [0, 8],
8131
+ arrowPadding: 4,
8132
+ customAnimated: false,
8133
+ };
8134
+
8135
+ const createToggletipConfig = (config = {}) => ({
8136
+ ...TOGGLETIP_DEFAULT_CONFIG,
8137
+ ...(config || {}),
8138
+ });
8139
+
8140
+ const provideToggletipConfig = (config = {}) => {
8141
+ return { provide: TOGGLETIP_CONFIG, useValue: createToggletipConfig(config) };
8142
+ };
8143
+
8144
+ const TOGGLETIP_DIRECTIVE = new InjectionToken('TOGGLETIP_DIRECTIVE');
8145
+ class ToggletipDirective {
8146
+ get toggletip() {
8147
+ return this._toggletip;
8148
+ }
8149
+ set toggletip(v) {
8150
+ this._toggletip = v;
8151
+ }
8152
+ get showToggletip() {
8153
+ return this._showToggletip;
8154
+ }
8155
+ set showToggletip(value) {
8156
+ this._showToggletip = booleanAttribute(value);
8157
+ if (this._showToggletip && !this._animatedOverlay.isMounted) {
8158
+ nextFrame(() => {
8159
+ this._mountToggletip();
8160
+ this._addListeners();
8161
+ });
8162
+ }
8163
+ else if (!this._showToggletip && this._animatedOverlay.isMounted) {
8164
+ this._animatedOverlay.unmount();
8165
+ this._removeListeners();
8166
+ }
8167
+ }
8168
+ constructor() {
8169
+ this._destroy$ = createDestroy();
8170
+ this._defaultConfig = inject(TOGGLETIP_CONFIG, { optional: true }) ?? createToggletipConfig();
8171
+ this._animatedOverlay = inject(AnimatedOverlayDirective);
8172
+ this._toggletip = null;
8173
+ this._showToggletip = false;
8174
+ this.toggletipClose = new EventEmitter();
8175
+ this._clickObserverService = inject(ClickObserverService);
8176
+ this._listenerSubscriptions = [];
8177
+ this._animatedOverlay.placement = this._defaultConfig.placement;
8178
+ this._animatedOverlay.offset = this._defaultConfig.offset;
8179
+ this._animatedOverlay.arrowPadding = this._defaultConfig.arrowPadding;
8180
+ }
8181
+ ngOnInit() {
8182
+ this._animatedOverlay
8183
+ .afterClosed()
8184
+ .pipe(tap(() => {
8185
+ this._removeListeners();
8186
+ this.toggletipClose.emit();
8187
+ }), takeUntil(this._destroy$))
8188
+ .subscribe();
8189
+ }
8190
+ ngOnDestroy() {
8191
+ this._animatedOverlay._destroy();
8192
+ this._removeListeners();
8193
+ }
8194
+ _addListeners() {
8195
+ const keyupEscSub = fromEvent(document, 'keyup')
8196
+ .pipe(filter((e) => e.key === 'Escape'), tap(() => this._animatedOverlay.unmount()))
8197
+ .subscribe();
8198
+ const clickOutsideSub = this._clickObserverService
8199
+ .observe(this._animatedOverlay.componentRef?.location.nativeElement)
8200
+ .subscribe((e) => {
8201
+ const targetElement = e.target;
8202
+ const isInside = this._animatedOverlay.componentRef?.location.nativeElement.contains(targetElement);
8203
+ if (!isInside) {
8204
+ this._animatedOverlay.unmount();
8205
+ }
8206
+ });
8207
+ this._listenerSubscriptions.push(keyupEscSub, clickOutsideSub);
8208
+ }
8209
+ _removeListeners() {
8210
+ this._listenerSubscriptions.forEach((s) => s.unsubscribe());
8211
+ this._listenerSubscriptions.length = 0;
8212
+ }
8213
+ _mountToggletip() {
8214
+ this._animatedOverlay.mount({
8215
+ component: ToggletipComponent,
8216
+ providers: [
8217
+ {
8218
+ provide: TOGGLETIP_CONFIG,
8219
+ useValue: this._defaultConfig,
8220
+ },
8221
+ ...[
8222
+ typeof this.toggletip === 'string'
8223
+ ? {
8224
+ provide: TOGGLETIP_TEXT,
8225
+ useValue: this.toggletip,
8226
+ }
8227
+ : {
8228
+ provide: TOGGLETIP_TEMPLATE,
8229
+ useValue: this.toggletip,
8230
+ },
8231
+ ],
8232
+ ],
8233
+ });
8234
+ }
8235
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: ToggletipDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
8236
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.1", type: ToggletipDirective, isStandalone: true, selector: "[etToggletip]", inputs: { toggletip: ["etToggletip", "toggletip"], showToggletip: "showToggletip" }, outputs: { toggletipClose: "toggletipClose" }, providers: [
8237
+ {
8238
+ provide: TOGGLETIP_DIRECTIVE,
8239
+ useExisting: ToggletipDirective,
8240
+ },
8241
+ ], hostDirectives: [{ directive: i1$1.AnimatedOverlayDirective, inputs: ["placement", "placement"] }], ngImport: i0 }); }
8242
+ }
8243
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: ToggletipDirective, decorators: [{
8244
+ type: Directive,
8245
+ args: [{
8246
+ selector: '[etToggletip]',
8247
+ standalone: true,
8248
+ providers: [
8249
+ {
8250
+ provide: TOGGLETIP_DIRECTIVE,
8251
+ useExisting: ToggletipDirective,
8252
+ },
8253
+ ],
8254
+ hostDirectives: [{ directive: AnimatedOverlayDirective, inputs: ['placement'] }],
8255
+ }]
8256
+ }], ctorParameters: function () { return []; }, propDecorators: { toggletip: [{
8257
+ type: Input,
8258
+ args: ['etToggletip']
8259
+ }], showToggletip: [{
8260
+ type: Input
8261
+ }], toggletipClose: [{
8262
+ type: Output
8263
+ }] } });
8264
+
8265
+ const TOGGLETIP = new InjectionToken('Toggletip');
8266
+ // TODO(TRB): The focus should get trapped inside the toggletip.
8267
+ // The toggletip trigger should get a aria-haspopup="true" and aria-expanded="true" attribute.
8268
+ class ToggletipComponent {
8269
+ constructor() {
8270
+ this._config = inject(TOGGLETIP_CONFIG);
8271
+ this.toggletipText = inject(TOGGLETIP_TEXT, { optional: true });
8272
+ this.toggletipTemplate = inject(TOGGLETIP_TEMPLATE, { optional: true });
8273
+ this.injector = inject(Injector);
8274
+ this._cdr = inject(ChangeDetectorRef);
8275
+ this._trigger = inject(TOGGLETIP_DIRECTIVE);
8276
+ }
8277
+ get attrAriaHidden() {
8278
+ return true;
8279
+ }
8280
+ get usesDefaultAnimation() {
8281
+ return !this._config.customAnimated;
8282
+ }
8283
+ get containerClass() {
8284
+ return this._config.containerClass;
8285
+ }
8286
+ _markForCheck() {
8287
+ this._cdr.markForCheck();
8288
+ }
8289
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: ToggletipComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
8290
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.1", type: ToggletipComponent, isStandalone: true, selector: "et-toggletip", host: { properties: { "attr.aria-hidden": "this.attrAriaHidden", "class.et-with-default-animation": "this.usesDefaultAnimation", "class": "this.containerClass" }, classAttribute: "et-toggletip" }, providers: [
8291
+ {
8292
+ provide: TOGGLETIP,
8293
+ useExisting: ToggletipComponent,
8294
+ },
8295
+ ], viewQueries: [{ propertyName: "_animatedLifecycle", first: true, predicate: ANIMATED_LIFECYCLE_TOKEN, descendants: true, static: true }], ngImport: i0, template: "<div class=\"et-toggletip-container\" etAnimatedLifecycle>\n <ng-container *ngIf=\"toggletipText\">\n {{ toggletipText }}\n </ng-container>\n\n <ng-container *ngIf=\"toggletipTemplate\">\n <ng-container *ngTemplateOutlet=\"toggletipTemplate; injector: injector\" />\n </ng-container>\n\n <div class=\"toggletip-arrow\" data-popper-arrow></div>\n</div>\n", styles: [":where(.et-toggletip){--background-color: hsl(0 0% 20%);--foreground-color: CanvasText;--border-radius: 4px;--padding-inline: 1.5ch;--padding-block: .75ch;--inline-max-size: 25ch;--arrow-size: 10px;--arrow-radius: 2px}.et-toggletip[data-popper-placement^=top] .toggletip-arrow{bottom:-4px}.et-toggletip[data-popper-placement^=right] .toggletip-arrow{left:-4px}.et-toggletip[data-popper-placement^=bottom] .toggletip-arrow{top:-4px}.et-toggletip[data-popper-placement^=left] .toggletip-arrow{right:-4px}.et-toggletip-container{z-index:1;inline-size:max-content;max-inline-size:var(--inline-max-size);padding:var(--padding-block) var(--padding-inline);border-radius:var(--border-radius);background:var(--background-color);color:var(--foreground-color)}.et-toggletip-container:before{content:\"; Has toggletip: \";clip:rect(1px,1px,1px,1px);clip-path:inset(50%);height:1px;width:1px;margin:-1px;overflow:hidden;padding:0;position:absolute}.toggletip-arrow{inline-size:var(--arrow-size);block-size:var(--arrow-size);position:absolute;z-index:-1}.toggletip-arrow:before{inline-size:var(--arrow-size);block-size:var(--arrow-size);border-radius:var(--arrow-radius);position:absolute;z-index:-1;transform:rotate(45deg);background:var(--background-color);top:0;left:0;content:\"\"}.et-toggletip.et-with-default-animation .et-toggletip-container.et-animation-enter-from,.et-toggletip.et-with-default-animation .et-toggletip-container.et-animation-leave-to{opacity:0}.et-toggletip.et-with-default-animation .et-toggletip-container.et-animation-enter-from .toggletip-arrow:before,.et-toggletip.et-with-default-animation .et-toggletip-container.et-animation-leave-to .toggletip-arrow:before{transform:rotate(45deg) scale(0)}.et-toggletip.et-with-default-animation .et-toggletip-container.et-animation-enter-active{transition:transform .2s var(--ease-out-5),opacity .2s var(--ease-out-5)}.et-toggletip.et-with-default-animation .et-toggletip-container.et-animation-enter-active .toggletip-arrow:before{transition:transform .2s var(--ease-out-5)}.et-toggletip.et-with-default-animation .et-toggletip-container.et-animation-leave-active{transition:transform .15s var(--ease-in-5),opacity .15s var(--ease-in-5)}.et-toggletip.et-with-default-animation .et-toggletip-container.et-animation-leave-active .toggletip-arrow:before{transition:transform .15s var(--ease-in-5)}.et-toggletip.et-with-default-animation[data-popper-placement^=top] .et-toggletip-container.et-animation-enter-from,.et-toggletip.et-with-default-animation[data-popper-placement^=top] .et-toggletip-container.et-animation-leave-to{transform:translateY(5px)}.et-toggletip.et-with-default-animation[data-popper-placement^=right] .et-toggletip-container.et-animation-enter-from,.et-toggletip.et-with-default-animation[data-popper-placement^=right] .et-toggletip-container.et-animation-leave-to{transform:translate(-5px)}.et-toggletip.et-with-default-animation[data-popper-placement^=bottom] .et-toggletip-container.et-animation-enter-from,.et-toggletip.et-with-default-animation[data-popper-placement^=bottom] .et-toggletip-container.et-animation-leave-to{transform:translateY(-5px)}.et-toggletip.et-with-default-animation[data-popper-placement^=left] .et-toggletip-container.et-animation-enter-from,.et-toggletip.et-with-default-animation[data-popper-placement^=left] .et-toggletip-container.et-animation-leave-to{transform:translate(5px)}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: AnimatedLifecycleDirective, selector: "[etAnimatedLifecycle]", exportAs: ["etAnimatedLifecycle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
8296
+ }
8297
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: ToggletipComponent, decorators: [{
8298
+ type: Component,
8299
+ args: [{ selector: 'et-toggletip', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [NgIf, NgTemplateOutlet, AnimatedLifecycleDirective], host: {
8300
+ class: 'et-toggletip',
8301
+ }, providers: [
8302
+ {
8303
+ provide: TOGGLETIP,
8304
+ useExisting: ToggletipComponent,
8305
+ },
6902
8306
  ], template: "<div class=\"et-toggletip-container\" etAnimatedLifecycle>\n <ng-container *ngIf=\"toggletipText\">\n {{ toggletipText }}\n </ng-container>\n\n <ng-container *ngIf=\"toggletipTemplate\">\n <ng-container *ngTemplateOutlet=\"toggletipTemplate; injector: injector\" />\n </ng-container>\n\n <div class=\"toggletip-arrow\" data-popper-arrow></div>\n</div>\n", styles: [":where(.et-toggletip){--background-color: hsl(0 0% 20%);--foreground-color: CanvasText;--border-radius: 4px;--padding-inline: 1.5ch;--padding-block: .75ch;--inline-max-size: 25ch;--arrow-size: 10px;--arrow-radius: 2px}.et-toggletip[data-popper-placement^=top] .toggletip-arrow{bottom:-4px}.et-toggletip[data-popper-placement^=right] .toggletip-arrow{left:-4px}.et-toggletip[data-popper-placement^=bottom] .toggletip-arrow{top:-4px}.et-toggletip[data-popper-placement^=left] .toggletip-arrow{right:-4px}.et-toggletip-container{z-index:1;inline-size:max-content;max-inline-size:var(--inline-max-size);padding:var(--padding-block) var(--padding-inline);border-radius:var(--border-radius);background:var(--background-color);color:var(--foreground-color)}.et-toggletip-container:before{content:\"; Has toggletip: \";clip:rect(1px,1px,1px,1px);clip-path:inset(50%);height:1px;width:1px;margin:-1px;overflow:hidden;padding:0;position:absolute}.toggletip-arrow{inline-size:var(--arrow-size);block-size:var(--arrow-size);position:absolute;z-index:-1}.toggletip-arrow:before{inline-size:var(--arrow-size);block-size:var(--arrow-size);border-radius:var(--arrow-radius);position:absolute;z-index:-1;transform:rotate(45deg);background:var(--background-color);top:0;left:0;content:\"\"}.et-toggletip.et-with-default-animation .et-toggletip-container.et-animation-enter-from,.et-toggletip.et-with-default-animation .et-toggletip-container.et-animation-leave-to{opacity:0}.et-toggletip.et-with-default-animation .et-toggletip-container.et-animation-enter-from .toggletip-arrow:before,.et-toggletip.et-with-default-animation .et-toggletip-container.et-animation-leave-to .toggletip-arrow:before{transform:rotate(45deg) scale(0)}.et-toggletip.et-with-default-animation .et-toggletip-container.et-animation-enter-active{transition:transform .2s var(--ease-out-5),opacity .2s var(--ease-out-5)}.et-toggletip.et-with-default-animation .et-toggletip-container.et-animation-enter-active .toggletip-arrow:before{transition:transform .2s var(--ease-out-5)}.et-toggletip.et-with-default-animation .et-toggletip-container.et-animation-leave-active{transition:transform .15s var(--ease-in-5),opacity .15s var(--ease-in-5)}.et-toggletip.et-with-default-animation .et-toggletip-container.et-animation-leave-active .toggletip-arrow:before{transition:transform .15s var(--ease-in-5)}.et-toggletip.et-with-default-animation[data-popper-placement^=top] .et-toggletip-container.et-animation-enter-from,.et-toggletip.et-with-default-animation[data-popper-placement^=top] .et-toggletip-container.et-animation-leave-to{transform:translateY(5px)}.et-toggletip.et-with-default-animation[data-popper-placement^=right] .et-toggletip-container.et-animation-enter-from,.et-toggletip.et-with-default-animation[data-popper-placement^=right] .et-toggletip-container.et-animation-leave-to{transform:translate(-5px)}.et-toggletip.et-with-default-animation[data-popper-placement^=bottom] .et-toggletip-container.et-animation-enter-from,.et-toggletip.et-with-default-animation[data-popper-placement^=bottom] .et-toggletip-container.et-animation-leave-to{transform:translateY(-5px)}.et-toggletip.et-with-default-animation[data-popper-placement^=left] .et-toggletip-container.et-animation-enter-from,.et-toggletip.et-with-default-animation[data-popper-placement^=left] .et-toggletip-container.et-animation-leave-to{transform:translate(5px)}\n"] }]
6903
8307
  }], propDecorators: { _animatedLifecycle: [{
6904
8308
  type: ViewChild,
@@ -7687,7 +9091,6 @@ class ScrollableComponent {
7687
9091
  this._renderer.setAttribute(element, 'can-scroll', state.canScroll.toString());
7688
9092
  }), takeUntil(this._destroy$))
7689
9093
  .subscribe();
7690
- this._setupScrollListening();
7691
9094
  }
7692
9095
  ngAfterContentInit() {
7693
9096
  if (!this.activeElements || !this.elements) {
@@ -7713,6 +9116,7 @@ class ScrollableComponent {
7713
9116
  });
7714
9117
  }), takeUntil(this._destroy$))
7715
9118
  .subscribe();
9119
+ this._setupScrollListening();
7716
9120
  }
7717
9121
  scrollOneContainerSize(direction) {
7718
9122
  const scrollElement = this.scrollable.nativeElement;
@@ -7809,7 +9213,7 @@ class ScrollableComponent {
7809
9213
  isSnapping = false;
7810
9214
  }))
7811
9215
  .subscribe();
7812
- merge(fromEvent(scrollElement, 'scroll'), this._isCursorDragging$, of(true))
9216
+ merge(fromEvent(scrollElement, 'scroll'), this._isCursorDragging$, this.elements?.changes.pipe(startWith(this.elements)) ?? of(null))
7813
9217
  .pipe(debounceTime(300), takeUntil(this._destroy$), tap(() => {
7814
9218
  const elements = this.elements
7815
9219
  ?.toArray()
@@ -10290,5 +11694,5 @@ const TABS_CONFIG = new InjectionToken('TABS_CONFIG');
10290
11694
  * Generated bundle index. Do not edit.
10291
11695
  */
10292
11696
 
10293
- export { ACCORDION_COMPONENT, ACCORDION_HINT_WRAPPER_DIRECTIVE, ACCORDION_LABEL_WRAPPER_DIRECTIVE, AccordionComponent, AccordionGroupComponent, AccordionHintDirective, AccordionHintWrapperDirective, AccordionImports, AccordionLabelDirective, AccordionLabelWrapperDirective, ActiveTabUnderlineBarManager, ActiveTabUnderlineDirective, AutosizeTextareaDirective, BOTTOM_SHEET_CONFIG, BOTTOM_SHEET_DATA, BOTTOM_SHEET_DEFAULT_CONFIG, BOTTOM_SHEET_DEFAULT_OPTIONS, BOTTOM_SHEET_MIN_SWIPE_TO_CLOSE_LENGTH, BOTTOM_SHEET_MIN_VELOCITY_TO_CLOSE, BOTTOM_SHEET_SCROLL_STRATEGY, BOTTOM_SHEET_SCROLL_STRATEGY_PROVIDER, BOTTOM_SHEET_SCROLL_STRATEGY_PROVIDER_FACTORY, BRACKET_CONFIG_TOKEN, BRACKET_DEFAULT_CONFIG, BRACKET_MATCH_ID_TOKEN, BRACKET_ROUND_ID_TOKEN, BRACKET_TOKEN, BottomSheetContainerBaseComponent, BottomSheetContainerComponent, BottomSheetDragHandleComponent, BottomSheetImports, BottomSheetRef, BottomSheetService, BottomSheetServiceBase, BottomSheetSwipeHandlerService, BottomSheetTitleDirective, Bracket, BracketComponent, BracketImports, BracketMatchComponent, BracketMatchDirective, BracketRoundDirective, BracketRoundHeaderComponent, ButtonComponent, ButtonDirective, ButtonImports, CHECKBOX_FIELD_TOKEN, CHECKBOX_GROUP_CONTROL_TOKEN, CHECKBOX_GROUP_TOKEN, CHECKBOX_TOKEN, COMBOBOX_DIR_TOKEN, COMBOBOX_TOKEN, CellDefDirective, CellDirective, CheckboxComponent, CheckboxDirective, CheckboxFieldComponent, CheckboxFieldDirective, CheckboxGroupComponent, CheckboxGroupControlDirective, CheckboxGroupDirective, CheckboxImports, ChevronIconComponent, ColumnDefDirective, ComboboxComponent, ComboboxDirective, ComboboxImports, DIALOG_CONFIG, DIALOG_DATA, DIALOG_DEFAULT_CONFIG, DIALOG_DEFAULT_OPTIONS, DIALOG_SCROLL_STRATEGY, DIALOG_SCROLL_STRATEGY_PROVIDER, DIALOG_SCROLL_STRATEGY_PROVIDER_FACTORY, DYNAMIC_FORM_FIELD_TOKEN, DYNAMIC_FORM_GROUP_TOKEN, DecoratedFormFieldBase, DecoratedInputBase, DefaultValidatorErrorsService, DialogCloseDirective, DialogContainerBaseComponent, DialogContainerComponent, DialogImports, DialogRef, DialogService, DialogServiceBase, DialogTitleDirective, DynamicFormFieldDirective, DynamicFormGroupDirective, DynamicOverlayService, EMAIL_INPUT_TOKEN, EmailInputComponent, EmailInputDirective, ErrorComponent, FooterCellDefDirective, FooterCellDirective, FooterRowComponent, FooterRowDefDirective, FormFieldStateService, FormGroupStateService, HeaderCellDefDirective, HeaderCellDirective, HeaderRowComponent, HeaderRowDefDirective, INPUT_PREFIX_TOKEN, INPUT_SUFFIX_TOKEN, INPUT_TOKEN, IconImports, IfInputEmptyDirective, IfInputFilledDirective, InlineTabBodyComponent, InlineTabBodyHostDirective, InlineTabChangeEvent, InlineTabComponent, InlineTabContentDirective, InlineTabHeaderComponent, InlineTabLabelDirective, InlineTabLabelWrapperDirective, InlineTabsComponent, InputBase, InputDirective, InputFieldComponent, InputImports, InputPrefixDirective, InputStateService, InputSuffixDirective, LABEL_TOKEN, LabelComponent, LabelImports, LabelSuffixDirective, MASONRY_ITEM_TOKEN, MAX_SAFE_INTEGER, MasonryComponent, MasonryImports, MasonryItemComponent, NATIVE_INPUT_REF_TOKEN, NATIVE_SELECT_INPUT_TOKEN, NATIVE_SELECT_OPTION_TOKEN, NUMBER_INPUT_TOKEN, NativeInputRefDirective, NativeSelectImports, NativeSelectInputComponent, NativeSelectInputDirective, NativeSelectOptionComponent, NativeSelectOptionDirective, NavTabLinkComponent, NavTabsComponent, NavTabsOutletComponent, NoDataRowDirective, NumberInputComponent, NumberInputDirective, PASSWORD_INPUT_TOKEN, PROGRESS_SPINNER_DEFAULT_OPTIONS, PROGRESS_SPINNER_DEFAULT_OPTIONS_FACTORY, PaginatedTabHeaderDirective, PaginationComponent, PaginationImports, PasswordInputComponent, PasswordInputDirective, PasswordInputToggleComponent, PictureComponent, PictureDataDirective, ProgressSpinnerComponent, QueryButtonComponent, QueryButtonDirective, RADIO_FIELD_TOKEN, RADIO_GROUP_TOKEN, RADIO_TOKEN, RadioComponent, RadioDirective, RadioFieldComponent, RadioFieldDirective, RadioGroupComponent, RadioGroupDirective, RadioImports, RecycleRowsDirective, RowComponent, RowDefDirective, SEARCH_INPUT_TOKEN, SEGMENTED_BUTTON_FIELD_TOKEN, SEGMENTED_BUTTON_GROUP_TOKEN, SEGMENTED_BUTTON_TOKEN, SELECT_BODY_TOKEN, SELECT_FIELD_TOKEN, SELECT_OPTION_TOKEN, SELECT_TOKEN, SLIDE_TOGGLE_TOKEN, SORT_DEFAULT_OPTIONS, SORT_HEADER_COLUMN_DEF, SORT_HEADER_INTL_PROVIDER, SORT_HEADER_INTL_PROVIDER_FACTORY, STATIC_FORM_FIELD_TOKEN, STATIC_FORM_GROUP_TOKEN, ScrollableComponent, ScrollableImports, SearchInputClearComponent, SearchInputComponent, SearchInputDirective, SegmentedButtonComponent, SegmentedButtonDirective, SegmentedButtonFieldComponent, SegmentedButtonFieldDirective, SegmentedButtonGroupComponent, SegmentedButtonGroupDirective, SegmentedButtonImports, SelectBodyComponent, SelectBodyDirective, SelectComponent, SelectDirective, SelectFieldComponent, SelectFieldDirective, SelectImports, SelectOptionComponent, SelectOptionDirective, SkeletonComponent, SkeletonImports, SkeletonItemComponent, SlideToggleComponent, SlideToggleDirective, SlideToggleFieldComponent, SlideToggleImports, SliderComponent, SliderFieldComponent, SliderImports, SortDirective, SortHeaderComponent, SortHeaderIntl, SortImports, StaticFormFieldDirective, StaticFormGroupDirective, SwipeHandlerService, TAB, TABS_CONFIG, TAB_CONTENT, TAB_GROUP, TAB_LABEL, TEXTAREA_INPUT_TOKEN, TEXT_INPUT_TOKEN, TOGGLETIP, TOGGLETIP_CONFIG, TOGGLETIP_DEFAULT_CONFIG, TOGGLETIP_DIRECTIVE, TOGGLETIP_TEMPLATE, TOGGLETIP_TEXT, TOOLTIP, TOOLTIP_CONFIG, TOOLTIP_DEFAULT_CONFIG, TOOLTIP_DIRECTIVE, TOOLTIP_TEMPLATE, TOOLTIP_TEXT, TabImports, TableBusyDirective, TableBusyOutletDirective, TableComponent, TableDataSource, TableImports, TextColumnComponent, TextInputComponent, TextInputDirective, TextareaInputComponent, TextareaInputDirective, ToggletipComponent, ToggletipDirective, ToggletipImports, TooltipComponent, TooltipDirective, TooltipImports, VALIDATOR_ERROR_SERVICE_TOKEN, WRITEABLE_INPUT_TOKEN, WRITEABLE_INPUT_VALUE_ACCESSOR, WriteableInputDirective, _MAT_INK_BAR_POSITIONER, _MAT_INK_BAR_POSITIONER_FACTORY, accordionAnimations, createBottomSheetConfig, createBracketConfig, createDialogConfig, createToggletipConfig, createTooltipConfig, getClosestBottomSheet, getClosestDialog, isOptionDisabled, isUpperBracketMatch, normalizeRoundType, orderRounds, orderRoundsByRoundNumber, paginate, provideBottomSheet, provideBottomSheetDefaultConfig, provideBracketConfig, provideDialog, provideDialogDefaultConfig, provideSort, provideToggletipConfig, provideTooltipConfig, provideValidatorErrorsService, tabAnimations };
11697
+ export { ACCORDION_COMPONENT, ACCORDION_HINT_WRAPPER_DIRECTIVE, ACCORDION_LABEL_WRAPPER_DIRECTIVE, AccordionComponent, AccordionGroupComponent, AccordionHintDirective, AccordionHintWrapperDirective, AccordionImports, AccordionLabelDirective, AccordionLabelWrapperDirective, ActiveTabUnderlineBarManager, ActiveTabUnderlineDirective, AutosizeTextareaDirective, BOTTOM_SHEET_CONFIG, BOTTOM_SHEET_DATA, BOTTOM_SHEET_DEFAULT_CONFIG, BOTTOM_SHEET_DEFAULT_OPTIONS, BOTTOM_SHEET_MIN_SWIPE_TO_CLOSE_LENGTH, BOTTOM_SHEET_MIN_VELOCITY_TO_CLOSE, BOTTOM_SHEET_SCROLL_STRATEGY, BOTTOM_SHEET_SCROLL_STRATEGY_PROVIDER, BOTTOM_SHEET_SCROLL_STRATEGY_PROVIDER_FACTORY, BRACKET_CONFIG_TOKEN, BRACKET_DEFAULT_CONFIG, BRACKET_MATCH_ID_TOKEN, BRACKET_ROUND_ID_TOKEN, BRACKET_TOKEN, BottomSheetContainerBaseComponent, BottomSheetContainerComponent, BottomSheetDragHandleComponent, BottomSheetImports, BottomSheetRef, BottomSheetService, BottomSheetServiceBase, BottomSheetSwipeHandlerService, BottomSheetTitleDirective, Bracket, BracketComponent, BracketImports, BracketMatchComponent, BracketMatchDirective, BracketRoundDirective, BracketRoundHeaderComponent, ButtonComponent, ButtonDirective, ButtonImports, CDK_MENU, CHECKBOX_FIELD_TOKEN, CHECKBOX_GROUP_CONTROL_TOKEN, CHECKBOX_GROUP_TOKEN, CHECKBOX_TOKEN, COMBOBOX_DIR_TOKEN, COMBOBOX_TOKEN, CdkContextMenuTrigger, CdkMenu, CdkMenuBar, CdkMenuBase, CdkMenuGroup, CdkMenuItem, CdkMenuItemCheckbox, CdkMenuItemRadio, CdkMenuItemSelectable, CdkMenuModule, CdkMenuTrigger, CdkMenuTriggerBase, CdkTargetMenuAim, CellDefDirective, CellDirective, CheckboxComponent, CheckboxDirective, CheckboxFieldComponent, CheckboxFieldDirective, CheckboxGroupComponent, CheckboxGroupControlDirective, CheckboxGroupDirective, CheckboxImports, ChevronIconComponent, ColumnDefDirective, ComboboxComponent, ComboboxDirective, ComboboxImports, ContextMenuTracker, DIALOG_CONFIG, DIALOG_DATA, DIALOG_DEFAULT_CONFIG, DIALOG_DEFAULT_OPTIONS, DIALOG_SCROLL_STRATEGY, DIALOG_SCROLL_STRATEGY_PROVIDER, DIALOG_SCROLL_STRATEGY_PROVIDER_FACTORY, DYNAMIC_FORM_FIELD_TOKEN, DYNAMIC_FORM_GROUP_TOKEN, DecoratedFormFieldBase, DecoratedInputBase, DefaultValidatorErrorsService, DialogCloseDirective, DialogContainerBaseComponent, DialogContainerComponent, DialogImports, DialogRef, DialogService, DialogServiceBase, DialogTitleDirective, DynamicFormFieldDirective, DynamicFormGroupDirective, DynamicOverlayService, EMAIL_INPUT_TOKEN, EmailInputComponent, EmailInputDirective, ErrorComponent, FooterCellDefDirective, FooterCellDirective, FooterRowComponent, FooterRowDefDirective, FormFieldStateService, FormGroupStateService, HeaderCellDefDirective, HeaderCellDirective, HeaderRowComponent, HeaderRowDefDirective, INPUT_PREFIX_TOKEN, INPUT_SUFFIX_TOKEN, INPUT_TOKEN, IconImports, IfInputEmptyDirective, IfInputFilledDirective, InlineTabBodyComponent, InlineTabBodyHostDirective, InlineTabChangeEvent, InlineTabComponent, InlineTabContentDirective, InlineTabHeaderComponent, InlineTabLabelDirective, InlineTabLabelWrapperDirective, InlineTabsComponent, InputBase, InputDirective, InputFieldComponent, InputImports, InputPrefixDirective, InputStateService, InputSuffixDirective, LABEL_TOKEN, LabelComponent, LabelImports, LabelSuffixDirective, MASONRY_ITEM_TOKEN, MAX_SAFE_INTEGER, MENU_AIM, MENU_STACK, MENU_TRIGGER, MasonryComponent, MasonryImports, MasonryItemComponent, MenuStack, NATIVE_INPUT_REF_TOKEN, NATIVE_SELECT_INPUT_TOKEN, NATIVE_SELECT_OPTION_TOKEN, NUMBER_INPUT_TOKEN, NativeInputRefDirective, NativeSelectImports, NativeSelectInputComponent, NativeSelectInputDirective, NativeSelectOptionComponent, NativeSelectOptionDirective, NavTabLinkComponent, NavTabsComponent, NavTabsOutletComponent, NoDataRowDirective, NumberInputComponent, NumberInputDirective, PARENT_OR_NEW_INLINE_MENU_STACK_PROVIDER, PARENT_OR_NEW_MENU_STACK_PROVIDER, PASSWORD_INPUT_TOKEN, PROGRESS_SPINNER_DEFAULT_OPTIONS, PROGRESS_SPINNER_DEFAULT_OPTIONS_FACTORY, PaginatedTabHeaderDirective, PaginationComponent, PaginationImports, PasswordInputComponent, PasswordInputDirective, PasswordInputToggleComponent, PictureComponent, PictureDataDirective, PointerFocusTracker, ProgressSpinnerComponent, QueryButtonComponent, QueryButtonDirective, RADIO_FIELD_TOKEN, RADIO_GROUP_TOKEN, RADIO_TOKEN, RadioComponent, RadioDirective, RadioFieldComponent, RadioFieldDirective, RadioGroupComponent, RadioGroupDirective, RadioImports, RecycleRowsDirective, RowComponent, RowDefDirective, SEARCH_INPUT_TOKEN, SEGMENTED_BUTTON_FIELD_TOKEN, SEGMENTED_BUTTON_GROUP_TOKEN, SEGMENTED_BUTTON_TOKEN, SELECT_BODY_TOKEN, SELECT_FIELD_TOKEN, SELECT_OPTION_TOKEN, SELECT_TOKEN, SLIDE_TOGGLE_TOKEN, SORT_DEFAULT_OPTIONS, SORT_HEADER_COLUMN_DEF, SORT_HEADER_INTL_PROVIDER, SORT_HEADER_INTL_PROVIDER_FACTORY, STATIC_FORM_FIELD_TOKEN, STATIC_FORM_GROUP_TOKEN, ScrollableComponent, ScrollableImports, SearchInputClearComponent, SearchInputComponent, SearchInputDirective, SegmentedButtonComponent, SegmentedButtonDirective, SegmentedButtonFieldComponent, SegmentedButtonFieldDirective, SegmentedButtonGroupComponent, SegmentedButtonGroupDirective, SegmentedButtonImports, SelectBodyComponent, SelectBodyDirective, SelectComponent, SelectDirective, SelectFieldComponent, SelectFieldDirective, SelectImports, SelectOptionComponent, SelectOptionDirective, SkeletonComponent, SkeletonImports, SkeletonItemComponent, SlideToggleComponent, SlideToggleDirective, SlideToggleFieldComponent, SlideToggleImports, SliderComponent, SliderFieldComponent, SliderImports, SortDirective, SortHeaderComponent, SortHeaderIntl, SortImports, StaticFormFieldDirective, StaticFormGroupDirective, SwipeHandlerService, TAB, TABS_CONFIG, TAB_CONTENT, TAB_GROUP, TAB_LABEL, TEXTAREA_INPUT_TOKEN, TEXT_INPUT_TOKEN, TOGGLETIP, TOGGLETIP_CONFIG, TOGGLETIP_DEFAULT_CONFIG, TOGGLETIP_DIRECTIVE, TOGGLETIP_TEMPLATE, TOGGLETIP_TEXT, TOOLTIP, TOOLTIP_CONFIG, TOOLTIP_DEFAULT_CONFIG, TOOLTIP_DIRECTIVE, TOOLTIP_TEMPLATE, TOOLTIP_TEXT, TabImports, TableBusyDirective, TableBusyOutletDirective, TableComponent, TableDataSource, TableImports, TargetMenuAim, TextColumnComponent, TextInputComponent, TextInputDirective, TextareaInputComponent, TextareaInputDirective, ToggletipComponent, ToggletipDirective, ToggletipImports, TooltipComponent, TooltipDirective, TooltipImports, VALIDATOR_ERROR_SERVICE_TOKEN, WRITEABLE_INPUT_TOKEN, WRITEABLE_INPUT_VALUE_ACCESSOR, WriteableInputDirective, _MAT_INK_BAR_POSITIONER, _MAT_INK_BAR_POSITIONER_FACTORY, accordionAnimations, createBottomSheetConfig, createBracketConfig, createDialogConfig, createToggletipConfig, createTooltipConfig, getClosestBottomSheet, getClosestDialog, isOptionDisabled, isUpperBracketMatch, normalizeRoundType, orderRounds, orderRoundsByRoundNumber, paginate, provideBottomSheet, provideBottomSheetDefaultConfig, provideBracketConfig, provideDialog, provideDialogDefaultConfig, provideSort, provideToggletipConfig, provideTooltipConfig, provideValidatorErrorsService, tabAnimations };
10294
11698
  //# sourceMappingURL=ethlete-cdk.mjs.map