import * as i0 from '@angular/core'; import { TemplateRef, OnInit, OnDestroy, Signal } from '@angular/core'; import * as i1 from '@angular/common'; import * as i2 from 'ngx-tethys/popover'; import { ThyPopoverConfig } from 'ngx-tethys/popover'; import { ComponentType, OverlayRef } from '@angular/cdk/overlay'; import { ThyOverlayDirectiveBase, ThyPlacement } from 'ngx-tethys/core'; import { SafeAny } from 'ngx-tethys/types'; import * as rxjs from 'rxjs'; type ThyDropdownMenuDividerType = 'default' | 'crossing' | ''; declare const THY_DROPDOWN_DEFAULT_WIDTH = "240px"; /** * @private */ declare class ThyDropdownAbstractMenu { addDropdownMenuClass: boolean; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * 下拉菜单组件 * @name thy-dropdown-menu * @order 20 */ declare class ThyDropdownMenuComponent { readonly templateRef: i0.Signal>; /** * 设置菜单宽度 */ readonly thyWidth: i0.InputSignalWithTransform; /** * 是否直接渲染 dropdown-menu 中的元素 */ readonly thyImmediateRender: i0.InputSignalWithTransform; constructor(); static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } /** * 下拉菜单分组 * @name thy-dropdown-menu-group * @order 50 */ declare class ThyDropdownMenuGroup { /** * 分组标题 */ readonly thyTitle: i0.InputSignal; constructor(); static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } /** * 下拉菜单分割线 * @name thy-dropdown-menu-divider */ declare class ThyDropdownMenuDivider { constructor(); static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } type ThyDropdownTrigger = 'click' | 'hover'; type ThyDropdownMenu = ThyDropdownMenuComponent | TemplateRef | ComponentType; /** * thyDropdown 触发下拉菜单指令 * @name thyDropdown * @order 10 */ declare class ThyDropdownDirective extends ThyOverlayDirectiveBase implements OnInit, OnDestroy { private viewContainerRef; private popover; readonly menu: Signal; private popoverRef?; popoverOpened: boolean; /** * Dropdown 下拉菜单,支持 thy-dropdown-menu 组件、TemplateRef 和自定义菜单组件 */ readonly thyDropdownMenu: i0.InputSignal; /** * Dropdown 下拉菜单组件,和 thyDropdownMenu 参与相同,快捷传下拉菜单组件参数 */ readonly thyDropdown: i0.InputSignal; /** * 下拉菜单触发方式 * @type 'hover' | 'focus' | 'click' | string * @default click */ readonly thyTrigger: i0.InputSignal; /** * 打开延迟毫秒 */ readonly thyShowDelay: i0.InputSignalWithTransform; /** * 关闭延迟毫秒 */ readonly thyHideDelay: i0.InputSignalWithTransform; /** * 弹出菜单后的当前触发元素的激活样式类 */ readonly thyActiveClass: i0.InputSignalWithTransform; /** * 弹出框的参数,底层使用 Popover 组件, 默认为`{ placement: "bottomLeft", insideClosable: true, minWidth: "240px", outsideClosable: true, manualClosure: false }` */ readonly thyPopoverOptions: i0.InputSignal, "height" | "minWidth" | "placement" | "insideClosable" | "manualClosure" | "outsideClosable"> | undefined>; /** * 弹出框的显示位置,会覆盖 thyPopoverOptions 中的 placement,`top` | `topLeft` | `topRight` | `bottom` | `bottomLeft` | `bottomRight` | `left` | `leftTop` | `leftBottom` | `right` | `rightTop` | `rightBottom` * @default bottomLeft */ readonly thyPlacement: i0.InputSignal; /** * 点击 dropdown-menu 内部是否关闭弹出框,会覆盖 thyPopoverOptions 中的 insideClosable */ readonly thyMenuInsideClosable: i0.InputSignalWithTransform; /** * 弹出框 overlay panel 的类名 * @type string | string[] */ readonly thyPanelClass: i0.InputSignalWithTransform; /** * 菜单 Active 事件,打开菜单返回 true,关闭返回 false */ readonly thyActiveChange: i0.OutputEmitterRef; constructor(); ngOnInit(): void; ngOnDestroy(): void; createOverlay(): OverlayRef; show(delay?: number | undefined): void; hide(delay?: number | undefined): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * 跟踪 Dropdown 菜单是否被打开处于激活状态,允许指定一个或多个CSS类,以便在菜单打开状态时添加到元素中 * @name thyDropdownActive * @order 60 */ declare class ThyDropdownActiveDirective implements OnInit { private trigger; readonly classes: Signal; private hostRenderer; /** * 设置 Active 样式类,可以是一个或多个CSS类 * @type string[] | string */ readonly thyDropdownActive: i0.InputSignal; /** * @private */ readonly triggers: Signal; constructor(); ngOnInit(): void; update(active: boolean): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } type ThyDropdownSubmenuDirection = 'left' | 'right' | 'auto'; /** * 下拉子菜单 * @name thy-dropdown-submenu,[thyDropdownSubmenu] * @order 40 */ declare class ThyDropdownSubmenu implements OnInit { private dropdownMenuItem; private elementRef; private readonly destroyRef; /** * 菜单方向 * @type left | right | auto */ readonly thyDirection: i0.InputSignalWithTransform; ngOnInit(): void; private updateClassByDirection; private updateVerticalDirection; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } type ThyDropdownMenuItemColor = 'default' | 'danger' | 'success' | ''; /** @deprecated use ThyDropdownMenuItemColor, will be removed in v23 */ type ThyDropdownMenuItemType = ThyDropdownMenuItemColor; /** * 菜单项 * @name thyDropdownMenuItem * @order 30 */ declare class ThyDropdownMenuItemDirective implements OnInit { private elementRef; readonly danger: i0.Signal; readonly success: i0.Signal; /** * 菜单项颜色 * @type 'default' | 'danger' | 'success' | '' * @default default */ readonly thyColor: i0.InputSignal; /** * 菜单项类型(已废弃,将在 v23 彻底删除),请使用 thyColor * @deprecated please use thyColor, will be removed in v23 * @type 'default' | 'danger' | 'success' | '' * @default default */ readonly thyType: i0.InputSignal; readonly color: i0.Signal<"default" | "success" | "danger">; /** * 菜单项是否处于禁用状态 */ readonly thyDisabled: i0.InputSignalWithTransform; onClick(event: Event): void; private hostRenderer; ngOnInit(): void; updateClass(classes: string[]): void; getElement(): HTMLElement; bindMouseenterEvent(): rxjs.Observable; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * 设置为菜单项图标 * @name thyDropdownMenuItemIcon */ declare class ThyDropdownMenuItemIconDirective { className: boolean; constructor(); static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * 设置为菜单项名称 * @name thyDropdownMenuItemName */ declare class ThyDropdownMenuItemNameDirective { className: boolean; constructor(); static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * 设置为菜单项名称后的补充信息 * @name thyDropdownMenuItemMeta */ declare class ThyDropdownMenuItemMetaDirective { className: boolean; constructor(); static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * 设置为菜单项的描述 * @name thyDropdownMenuItemDesc */ declare class ThyDropdownMenuItemDescDirective { className: boolean; constructor(); static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * 菜单项的后置扩展图标,用于显示是否选中或者子菜单示意 * @name thyDropdownMenuItemExtendIcon */ declare class ThyDropdownMenuItemExtendIconDirective { className: boolean; constructor(); static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * 菜单项是否激活指令 * @name thyDropdownMenuItemActive * @order 70 */ declare class ThyDropdownMenuItemActiveDirective { /** * 是否激活 * @type boolean | string */ readonly thyDropdownMenuItemActive: i0.InputSignalWithTransform; constructor(); static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class ThyDropdownModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } export { THY_DROPDOWN_DEFAULT_WIDTH, ThyDropdownAbstractMenu, ThyDropdownActiveDirective, ThyDropdownDirective, ThyDropdownMenuComponent, ThyDropdownMenuDivider, ThyDropdownMenuGroup, ThyDropdownMenuItemActiveDirective, ThyDropdownMenuItemDescDirective, ThyDropdownMenuItemDirective, ThyDropdownMenuItemExtendIconDirective, ThyDropdownMenuItemIconDirective, ThyDropdownMenuItemMetaDirective, ThyDropdownMenuItemNameDirective, ThyDropdownModule, ThyDropdownSubmenu }; export type { ThyDropdownMenuDividerType, ThyDropdownMenuItemColor, ThyDropdownMenuItemType, ThyDropdownSubmenuDirection, ThyDropdownTrigger };