{"version":3,"file":"ng-zorro-antd-dropdown.mjs","names":[],"sources":["../../components/dropdown/dropdown.directive.ts","../../components/dropdown/context-menu.service.module.ts","../../components/dropdown/dropdown-a.directive.ts","../../components/dropdown/dropdown-menu.component.ts","../../components/dropdown/dropdown.module.ts","../../components/dropdown/context-menu.service.ts"],"sourcesContent":["/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\n\nimport { ESCAPE, hasModifierKey } from '@angular/cdk/keycodes';\nimport {\n  createFlexibleConnectedPositionStrategy,\n  createOverlayRef,\n  createRepositionScrollStrategy,\n  OverlayRef\n} from '@angular/cdk/overlay';\nimport { Platform } from '@angular/cdk/platform';\nimport { TemplatePortal } from '@angular/cdk/portal';\nimport {\n  AfterViewInit,\n  booleanAttribute,\n  DestroyRef,\n  Directive,\n  ElementRef,\n  EventEmitter,\n  inject,\n  Injector,\n  Input,\n  OnChanges,\n  Output,\n  Renderer2,\n  SimpleChanges,\n  ViewContainerRef,\n  type AnimationCallbackEvent\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { BehaviorSubject, combineLatest, EMPTY, fromEvent, merge, Subject } from 'rxjs';\nimport { auditTime, distinctUntilChanged, filter, map, switchMap } from 'rxjs/operators';\n\nimport { NzConfigKey, NzConfigService, WithConfig } from 'ng-zorro-antd/core/config';\nimport {\n  getPlacementName,\n  POSITION_MAP,\n  POSITION_TYPE,\n  setConnectedPositionOffset,\n  TOOLTIP_OFFSET_MAP\n} from 'ng-zorro-antd/core/overlay';\nimport { IndexableObject } from 'ng-zorro-antd/core/types';\n\nimport { NzDropdownMenuComponent, NzPlacementType } from './dropdown-menu.component';\n\nconst NZ_CONFIG_MODULE_NAME: NzConfigKey = 'dropdown';\n\nconst listOfPositions: POSITION_TYPE[] = ['bottomLeft', 'bottomRight', 'topRight', 'topLeft'];\n\n@Directive({\n  selector: '[nz-dropdown]',\n  exportAs: 'nzDropdown',\n  host: {\n    class: 'ant-dropdown-trigger'\n  }\n})\nexport class NzDropdownDirective implements AfterViewInit, OnChanges {\n  public readonly nzConfigService = inject(NzConfigService);\n  private renderer = inject(Renderer2);\n  private viewContainerRef = inject(ViewContainerRef);\n  private platform = inject(Platform);\n  private destroyRef = inject(DestroyRef);\n  readonly _nzModuleName: NzConfigKey = NZ_CONFIG_MODULE_NAME;\n  public elementRef = inject(ElementRef);\n  private injector = inject(Injector);\n\n  private portal?: TemplatePortal;\n  private overlayRef: OverlayRef | null = null;\n\n  private inputVisible$ = new BehaviorSubject<boolean>(false);\n  private nzTrigger$ = new BehaviorSubject<'click' | 'hover'>('hover');\n  private overlayClose$ = new Subject<boolean>();\n  @Input() nzDropdownMenu: NzDropdownMenuComponent | null = null;\n  @Input() nzTrigger: 'click' | 'hover' = 'hover';\n  @Input() nzMatchWidthElement: ElementRef | null = null;\n  @Input({ transform: booleanAttribute }) @WithConfig() nzBackdrop = false;\n  @Input({ transform: booleanAttribute }) nzClickHide = true;\n  @Input({ transform: booleanAttribute }) nzDisabled = false;\n  @Input({ transform: booleanAttribute }) nzVisible = false;\n  @Input({ transform: booleanAttribute }) nzArrow = false;\n  @Input() nzOverlayClassName: string = '';\n  @Input() nzOverlayStyle: IndexableObject = {};\n  @Input() nzPlacement: NzPlacementType = 'bottomLeft';\n  @Output() readonly nzVisibleChange = new EventEmitter<boolean>();\n\n  constructor() {\n    this.destroyRef.onDestroy(() => {\n      this.overlayRef?.dispose();\n      this.overlayRef = null;\n    });\n  }\n\n  setDropdownMenuValue<T extends keyof NzDropdownMenuComponent>(key: T, value: NzDropdownMenuComponent[T]): void {\n    this.nzDropdownMenu?.setValue(key, value);\n  }\n\n  ngAfterViewInit(): void {\n    if (this.nzDropdownMenu) {\n      const nativeElement: HTMLElement = this.elementRef.nativeElement;\n      /** host mouse state **/\n      const hostMouseState$ = merge(\n        fromEvent(nativeElement, 'mouseenter').pipe(map(() => true)),\n        fromEvent(nativeElement, 'mouseleave').pipe(map(() => false))\n      );\n      /** menu mouse state **/\n      const menuMouseState$ = this.nzDropdownMenu.mouseState$;\n      /** merged mouse state **/\n      const mergedMouseState$ = merge(menuMouseState$, hostMouseState$);\n      /** host click state **/\n      const hostClickState$ = fromEvent(nativeElement, 'click').pipe(map(() => !this.nzVisible));\n      /** visible state switch by nzTrigger **/\n      const visibleStateByTrigger$ = this.nzTrigger$.pipe(\n        switchMap(trigger => {\n          if (trigger === 'hover') {\n            return mergedMouseState$;\n          } else if (trigger === 'click') {\n            return hostClickState$;\n          } else {\n            return EMPTY;\n          }\n        })\n      );\n      const descendantMenuItemClick$ = this.nzDropdownMenu.descendantMenuItemClick$.pipe(\n        filter(() => this.nzClickHide),\n        map(() => false)\n      );\n      const domTriggerVisible$ = merge(visibleStateByTrigger$, descendantMenuItemClick$, this.overlayClose$).pipe(\n        filter(() => !this.nzDisabled)\n      );\n      const visible$ = merge(this.inputVisible$, domTriggerVisible$);\n      combineLatest([visible$, this.nzDropdownMenu.isChildSubMenuOpen$])\n        .pipe(\n          map(([visible, sub]) => visible || sub),\n          auditTime(150),\n          distinctUntilChanged(),\n          filter(() => this.platform.isBrowser),\n          takeUntilDestroyed(this.destroyRef)\n        )\n        .subscribe(visible => {\n          const element = this.nzMatchWidthElement ? this.nzMatchWidthElement.nativeElement : nativeElement;\n          const triggerWidth = element.getBoundingClientRect().width;\n          if (this.nzVisible !== visible) {\n            this.nzVisibleChange.emit(visible);\n          }\n          this.nzVisible = visible;\n\n          if (visible) {\n            const positionStrategy = createFlexibleConnectedPositionStrategy(\n              this.injector,\n              this.elementRef.nativeElement\n            )\n              .withLockedPosition()\n              .withTransformOriginOn('.ant-dropdown');\n\n            // Listen for placement changes to update the menu classes (arrow position)\n            positionStrategy.positionChanges\n              .pipe(\n                filter(() => Boolean(this.overlayRef)),\n                map(change => getPlacementName(change) as NzPlacementType | undefined),\n                takeUntilDestroyed(this.destroyRef)\n              )\n              .subscribe(placement => {\n                if (placement) {\n                  this.nzDropdownMenu?.placement.set(this.nzPlacement);\n                }\n              });\n\n            /** set up overlayRef **/\n            if (!this.overlayRef) {\n              /** new overlay **/\n              this.overlayRef = createOverlayRef(this.injector, {\n                positionStrategy,\n                minWidth: triggerWidth,\n                disposeOnNavigation: true,\n                hasBackdrop: this.nzBackdrop && this.nzTrigger === 'click',\n                scrollStrategy: createRepositionScrollStrategy(this.injector)\n              });\n              merge(\n                this.overlayRef.backdropClick(),\n                this.overlayRef.detachments(),\n                this.overlayRef\n                  .outsidePointerEvents()\n                  .pipe(filter(e => !this.elementRef.nativeElement.contains(e.target))),\n                this.overlayRef.keydownEvents().pipe(filter(e => e.keyCode === ESCAPE && !hasModifierKey(e)))\n              )\n                .pipe(takeUntilDestroyed(this.destroyRef))\n                .subscribe(() => {\n                  this.overlayClose$.next(false);\n                });\n            } else {\n              /** update overlay config **/\n              const overlayConfig = this.overlayRef.getConfig();\n              overlayConfig.minWidth = triggerWidth;\n            }\n            /** open dropdown with animation **/\n            const positions = [this.nzPlacement, ...listOfPositions].map(position => {\n              return this.nzArrow\n                ? setConnectedPositionOffset(POSITION_MAP[position], TOOLTIP_OFFSET_MAP[position])\n                : POSITION_MAP[position];\n            });\n            positionStrategy.withPositions(positions);\n            /** reset portal if needed **/\n            if (!this.portal || this.portal.templateRef !== this.nzDropdownMenu!.templateRef) {\n              this.portal = new TemplatePortal(this.nzDropdownMenu!.templateRef, this.viewContainerRef);\n            }\n            // Initialize arrow and placement on open\n            this.setDropdownMenuValue('nzArrow', this.nzArrow);\n            this.nzDropdownMenu?.placement.set(this.nzPlacement);\n            this.overlayRef.attach(this.portal);\n          } else {\n            /** detach overlayRef if needed **/\n            this.overlayRef?.detach();\n          }\n        });\n\n      this.nzDropdownMenu!.animationStateChange$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(\n        (event: AnimationCallbackEvent) => {\n          this.overlayRef?.dispose();\n          this.overlayRef = null;\n          event.animationComplete();\n        }\n      );\n    }\n  }\n\n  ngOnChanges(changes: SimpleChanges): void {\n    const { nzVisible, nzDisabled, nzOverlayClassName, nzOverlayStyle, nzTrigger, nzArrow, nzPlacement } = changes;\n    if (nzTrigger) {\n      this.nzTrigger$.next(this.nzTrigger);\n    }\n    if (nzVisible) {\n      this.inputVisible$.next(this.nzVisible);\n    }\n    if (nzDisabled) {\n      const nativeElement = this.elementRef.nativeElement;\n      if (this.nzDisabled) {\n        this.renderer.setAttribute(nativeElement, 'disabled', '');\n        this.inputVisible$.next(false);\n      } else {\n        this.renderer.removeAttribute(nativeElement, 'disabled');\n      }\n    }\n    if (nzOverlayClassName) {\n      this.setDropdownMenuValue('nzOverlayClassName', this.nzOverlayClassName);\n    }\n    if (nzOverlayStyle) {\n      this.setDropdownMenuValue('nzOverlayStyle', this.nzOverlayStyle);\n    }\n    if (nzArrow) {\n      this.setDropdownMenuValue('nzArrow', this.nzArrow);\n    }\n    if (nzPlacement) {\n      this.nzDropdownMenu?.placement.set(this.nzPlacement);\n    }\n  }\n}\n","/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\n\nimport { NgModule } from '@angular/core';\n\n@NgModule()\nexport class NzContextMenuServiceModule {}\n","/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\n\nimport { Directive } from '@angular/core';\n\n@Directive({\n  selector: 'a[nz-dropdown]',\n  host: {\n    class: 'ant-dropdown-link'\n  }\n})\nexport class NzDropdownADirective {}\n","/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\n\nimport { Directionality } from '@angular/cdk/bidi';\nimport {\n  AfterContentInit,\n  ChangeDetectorRef,\n  Component,\n  ElementRef,\n  EventEmitter,\n  Renderer2,\n  TemplateRef,\n  ViewChild,\n  ViewContainerRef,\n  ViewEncapsulation,\n  inject,\n  signal,\n  type AnimationCallbackEvent\n} from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\n\nimport { NzNoAnimationDirective, slideAnimationEnter, slideAnimationLeave } from 'ng-zorro-antd/core/animation';\nimport { IndexableObject, NzSafeAny } from 'ng-zorro-antd/core/types';\nimport { MenuService, NzIsMenuInsideDropdownToken } from 'ng-zorro-antd/menu';\n\nexport type NzPlacementType = 'bottomLeft' | 'bottomCenter' | 'bottomRight' | 'topLeft' | 'topCenter' | 'topRight';\n\n@Component({\n  selector: `nz-dropdown-menu`,\n  exportAs: `nzDropdownMenu`,\n  providers: [\n    MenuService,\n    /** menu is inside dropdown-menu component **/\n    {\n      provide: NzIsMenuInsideDropdownToken,\n      useValue: true\n    }\n  ],\n  imports: [NzNoAnimationDirective],\n  template: `\n    <ng-template>\n      <div\n        class=\"ant-dropdown\"\n        [class.ant-dropdown-rtl]=\"dir() === 'rtl'\"\n        [class.ant-dropdown-show-arrow]=\"nzArrow\"\n        [class.ant-dropdown-placement-bottomLeft]=\"placement() === 'bottomLeft'\"\n        [class.ant-dropdown-placement-bottomRight]=\"placement() === 'bottomRight'\"\n        [class.ant-dropdown-placement-bottom]=\"placement() === 'bottomCenter'\"\n        [class.ant-dropdown-placement-topLeft]=\"placement() === 'topLeft'\"\n        [class.ant-dropdown-placement-topRight]=\"placement() === 'topRight'\"\n        [class.ant-dropdown-placement-top]=\"placement() === 'topCenter'\"\n        [class]=\"nzOverlayClassName\"\n        [style]=\"nzOverlayStyle\"\n        [animate.enter]=\"slideAnimationEnter()\"\n        [animate.leave]=\"slideAnimationLeave()\"\n        (animate.leave)=\"onAnimationEvent($event)\"\n        [nzNoAnimation]=\"!!noAnimation?.nzNoAnimation?.()\"\n        (mouseenter)=\"setMouseState(true)\"\n        (mouseleave)=\"setMouseState(false)\"\n      >\n        @if (nzArrow) {\n          <div class=\"ant-dropdown-arrow\"></div>\n        }\n        <ng-content />\n      </div>\n    </ng-template>\n  `,\n  encapsulation: ViewEncapsulation.None\n})\nexport class NzDropdownMenuComponent implements AfterContentInit {\n  public readonly viewContainerRef = inject(ViewContainerRef);\n  public readonly nzMenuService = inject(MenuService);\n  private readonly cdr = inject(ChangeDetectorRef);\n  private readonly elementRef = inject(ElementRef);\n  private readonly renderer = inject(Renderer2);\n  protected readonly dir = inject(Directionality).valueSignal;\n  protected readonly noAnimation = inject(NzNoAnimationDirective, { host: true, optional: true });\n\n  isChildSubMenuOpen$ = this.nzMenuService.isChildSubMenuOpen$;\n  descendantMenuItemClick$ = this.nzMenuService.descendantMenuItemClick$;\n  mouseState$ = new BehaviorSubject<boolean>(false);\n  animationStateChange$ = new EventEmitter<AnimationCallbackEvent>();\n  @ViewChild(TemplateRef, { static: true }) templateRef!: TemplateRef<NzSafeAny>;\n\n  nzOverlayClassName: string = '';\n  nzOverlayStyle: IndexableObject = {};\n  nzArrow: boolean = false;\n\n  readonly placement = signal<NzPlacementType>('bottomLeft');\n  protected readonly slideAnimationEnter = slideAnimationEnter(() =>\n    this.placement().startsWith('top') ? 'down' : 'up'\n  );\n  protected readonly slideAnimationLeave = slideAnimationLeave(() =>\n    this.placement().startsWith('top') ? 'down' : 'up'\n  );\n\n  onAnimationEvent(event: AnimationCallbackEvent): void {\n    const element = event.target as HTMLElement;\n    const onAnimationEnd = (): void => {\n      element.removeEventListener('animationend', onAnimationEnd);\n      this.animationStateChange$.emit(event);\n    };\n    element.addEventListener('animationend', onAnimationEnd);\n  }\n\n  setMouseState(visible: boolean): void {\n    this.mouseState$.next(visible);\n  }\n\n  setValue<T extends keyof NzDropdownMenuComponent>(key: T, value: this[T]): void {\n    this[key] = value;\n    this.cdr.markForCheck();\n  }\n\n  ngAfterContentInit(): void {\n    this.renderer.removeChild(this.renderer.parentNode(this.elementRef.nativeElement), this.elementRef.nativeElement);\n  }\n}\n","/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\n\nimport { NgModule } from '@angular/core';\n\nimport { NzMenuModule } from 'ng-zorro-antd/menu';\n\nimport { NzContextMenuServiceModule } from './context-menu.service.module';\nimport { NzDropdownADirective } from './dropdown-a.directive';\nimport { NzDropdownMenuComponent } from './dropdown-menu.component';\nimport { NzDropdownDirective } from './dropdown.directive';\n\n@NgModule({\n  imports: [NzDropdownDirective, NzDropdownADirective, NzDropdownMenuComponent, NzContextMenuServiceModule],\n  exports: [NzMenuModule, NzDropdownDirective, NzDropdownADirective, NzDropdownMenuComponent]\n})\nexport class NzDropdownModule {}\n","/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\n\nimport {\n  ConnectionPositionPair,\n  createCloseScrollStrategy,\n  createFlexibleConnectedPositionStrategy,\n  createOverlayRef,\n  OverlayRef\n} from '@angular/cdk/overlay';\nimport { TemplatePortal } from '@angular/cdk/portal';\nimport { EmbeddedViewRef, inject, Injectable, Injector, NgZone } from '@angular/core';\nimport { merge, Subscription } from 'rxjs';\nimport { filter, first } from 'rxjs/operators';\n\nimport { NzSafeAny } from 'ng-zorro-antd/core/types';\nimport { fromEventOutsideAngular } from 'ng-zorro-antd/core/util';\n\nimport { NzContextMenuServiceModule } from './context-menu.service.module';\nimport { NzDropdownMenuComponent } from './dropdown-menu.component';\n\nconst LIST_OF_POSITIONS = [\n  new ConnectionPositionPair({ originX: 'start', originY: 'top' }, { overlayX: 'start', overlayY: 'top' }),\n  new ConnectionPositionPair({ originX: 'start', originY: 'top' }, { overlayX: 'start', overlayY: 'bottom' }),\n  new ConnectionPositionPair({ originX: 'start', originY: 'top' }, { overlayX: 'end', overlayY: 'bottom' }),\n  new ConnectionPositionPair({ originX: 'start', originY: 'top' }, { overlayX: 'end', overlayY: 'top' })\n];\n\n@Injectable({\n  providedIn: NzContextMenuServiceModule\n})\nexport class NzContextMenuService {\n  private ngZone = inject(NgZone);\n  private injector = inject(Injector);\n  private overlayRef: OverlayRef | null = null;\n  private closeSubscription = Subscription.EMPTY;\n\n  create(\n    $event: MouseEvent | { x: number; y: number },\n    nzDropdownMenuComponent: NzDropdownMenuComponent\n  ): EmbeddedViewRef<NzSafeAny> {\n    this.close(true);\n    const { x, y } = $event;\n    if ($event instanceof MouseEvent) {\n      $event.preventDefault();\n    }\n\n    this.overlayRef = createOverlayRef(this.injector, {\n      positionStrategy: createFlexibleConnectedPositionStrategy(this.injector, { x, y })\n        .withPositions(LIST_OF_POSITIONS)\n        .withTransformOriginOn('.ant-dropdown'),\n      disposeOnNavigation: true,\n      scrollStrategy: createCloseScrollStrategy(this.injector)\n    });\n\n    this.closeSubscription = new Subscription();\n\n    this.closeSubscription.add(nzDropdownMenuComponent.descendantMenuItemClick$.subscribe(() => this.close()));\n\n    this.closeSubscription.add(\n      merge(\n        fromEventOutsideAngular<MouseEvent>(document, 'click').pipe(\n          filter(event => !!this.overlayRef && !this.overlayRef.overlayElement.contains(event.target as HTMLElement)),\n          /** handle firefox contextmenu event **/\n          filter(event => event.button !== 2)\n        ),\n        fromEventOutsideAngular<KeyboardEvent>(document, 'keydown').pipe(filter(event => event.key === 'Escape'))\n      )\n        .pipe(first())\n        .subscribe(() => this.ngZone.run(() => this.close()))\n    );\n\n    return this.overlayRef.attach(\n      new TemplatePortal(nzDropdownMenuComponent.templateRef, nzDropdownMenuComponent.viewContainerRef)\n    );\n  }\n\n  close(clear: boolean = false): void {\n    if (this.overlayRef) {\n      this.overlayRef.detach();\n      if (clear) {\n        this.overlayRef.dispose();\n      }\n      this.overlayRef = null;\n      this.closeSubscription.unsubscribe();\n    }\n  }\n}\n"],"mappings":";;;;;;;;;;;;;;;;AA+CA,MAAM,wBAAqC;AAE3C,MAAM,kBAAmC;CAAC;CAAc;CAAe;CAAY;AAAS;AAS/E,IAAA,6BAAmB;;;;CAAnB,OAAA,MAAA,oBAAmB;;;GAmBW,yBAAA,CAAA,WAAU,CAAE;GAAC,aAAA,MAAA,MAAA,wBAAA;IAAA,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