import { ExtractPropTypes, ComponentPublicInstance, ComputedRef } from 'vue'; import { ISharedRenderlessFunctionParams, ISharedRenderlessParamUtils } from './shared.type.js'; import { IDropdownVm } from './dropdown.type.js'; /** * Copyright (c) 2022 - present TinyVue Authors. * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. * * Use of this source code is governed by an MIT-style license. * * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. * */ declare const $constants: { ICON_MAP: { leftWardArrow: string; }; }; declare const dropdownItemProps: { _constants: { type: ObjectConstructor; default: () => { ICON_MAP: { leftWardArrow: string; }; }; }; icon: (StringConstructor | ObjectConstructor)[]; disabled: BooleanConstructor; divided: BooleanConstructor; itemData: { type: (StringConstructor | ObjectConstructor)[]; default: string; }; title: StringConstructor; label: StringConstructor; level: StringConstructor; titleClass: StringConstructor; options: { type: ArrayConstructor; default: () => never[]; }; type: { type: StringConstructor; default: string; }; selected: { type: BooleanConstructor; default: boolean; }; selectedField: { type: StringConstructor; default: string; }; multiStage: { type: BooleanConstructor; default: boolean; }; currentIndex: { type: NumberConstructor; default: () => number; }; tooltipContent: { type: StringConstructor; default: string; }; appendToBody: { type: BooleanConstructor; default: boolean; }; textField: { type: StringConstructor; default: string; }; tip: { type: (StringConstructor | FunctionConstructor)[]; default: string; }; tipPosition: { type: StringConstructor; default: string; }; effect: { type: StringConstructor; default: string; }; tiny_mode: StringConstructor; tiny_mode_root: BooleanConstructor; tiny_template: (FunctionConstructor | ObjectConstructor)[]; tiny_renderless: FunctionConstructor; tiny_theme: StringConstructor; tiny_mcp_config: ObjectConstructor; tiny_chart_theme: ObjectConstructor; }; /** * Copyright (c) 2022 - present TinyVue Authors. * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. * * Use of this source code is governed by an MIT-style license. * * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. * */ declare const dropdownMenuProps: { multiStage: { type: BooleanConstructor; default: boolean; }; checkedStatus: { type: BooleanConstructor; default: boolean; }; visibleArrow: BooleanConstructor; arrowOffset: { type: NumberConstructor; default: number; }; placement: StringConstructor; popperClass: StringConstructor; popperAppendToBody: { type: BooleanConstructor; default: boolean; }; activeColor: StringConstructor; closeOnClickOutside: { type: BooleanConstructor; default: boolean; }; closeOnClickOverlay: { type: BooleanConstructor; default: boolean; }; direction: { type: StringConstructor; default: string; }; duration: { type: (StringConstructor | NumberConstructor)[]; default: number; }; overlay: { type: BooleanConstructor; default: boolean; }; zIndex: (StringConstructor | NumberConstructor)[]; maxHeight: { type: (StringConstructor | NumberConstructor)[]; default: string; }; options: { type: ArrayConstructor; default: () => never[]; }; textField: { type: StringConstructor; default: string; }; tiny_mode: StringConstructor; tiny_mode_root: BooleanConstructor; tiny_template: (FunctionConstructor | ObjectConstructor)[]; tiny_renderless: FunctionConstructor; tiny_theme: StringConstructor; tiny_mcp_config: ObjectConstructor; tiny_chart_theme: ObjectConstructor; }; /** * Copyright (c) 2022 - present TinyVue Authors. * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. * * Use of this source code is governed by an MIT-style license. * * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. * */ type IDropdownMenuProps = ExtractPropTypes; interface IDropdownMenuState { offset: number; scroller: null | HTMLElement; children: IDropdownItemVm[]; size: string; showPopper: boolean; label: string; showContent: boolean; selected: boolean; selectedIndex: number; } interface IDropdownMenuApi { state: IDropdownMenuState; toggleItem: (active: boolean, item: any) => void; clickOutside: () => void; updateOffset: () => void; mounted: () => void; handleMouseenter: ($event: MouseEvent) => void; handleMouseleave: ($event: MouseEvent) => void; handleMenuItemClick: (itemData: object, instance: ComponentPublicInstance, label: string, showContent: boolean, isDisabled: boolean) => void; doDestroy: () => void; } type IDropdownMenuRenderlessParams = ISharedRenderlessFunctionParams & { state: IDropdownMenuState; props: IDropdownMenuProps; api: IDropdownMenuApi; }; type IDropdownMenuRenderlessParamUtils = ISharedRenderlessParamUtils; interface IDropdownMenuPopperParams { api: IDropdownMenuApi; props: IDropdownMenuProps; hooks: Pick; instance: IDropdownMenuRenderlessParamUtils; state: IDropdownMenuState; dropdownVm: IDropdownVm; } type IDropdownMenuVm = ComponentPublicInstance & { state: IDropdownMenuState; } & IDropdownMenuProps; /** * Copyright (c) 2022 - present TinyVue Authors. * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd. * * Use of this source code is governed by an MIT-style license. * * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. * */ declare const getTitle: (props: IDropdownItemRenderlessParams['props']) => () => string; declare const bindScroll: ({ api, parent }: Pick) => (value: any) => void; declare const toggle: ({ parent, props, state }: Pick) => (show: boolean) => void; declare const onScroll: (parent: IDropdownItemRenderlessParams['parent']) => () => void; declare const clickWrapper: (parent: IDropdownItemRenderlessParams['parent']) => (event: MouseEvent) => void; declare const clickItem: ({ emit, props, state }: Pick) => (value: string) => void; declare const getItemStyle: ({ parent, state }: Pick) => () => IDropdownItemStyle; declare const getOptionStyle: (state: IDropdownItemRenderlessParams['state']) => (tag: IDropdownItemTag, tags: string | Array) => IDropdownItemOptionStyle; declare const closed: ({ emit, state }: Pick) => () => void; declare const open: (emit: IDropdownItemRenderlessParams['emit']) => () => void; declare const opened: (emit: IDropdownItemRenderlessParams['emit']) => () => void; declare const close: (emit: IDropdownItemRenderlessParams['emit']) => () => void; declare const tagClick: ({ emit, props }: Pick) => (key: number, tag: IDropdownItemTag, event: MouseEvent) => void; declare const confirm: ({ emit, props, state }: Pick) => () => void; declare const reset: ({ emit, props }: Pick) => () => void; declare const clickOutside: (parent: IDropdownItemRenderlessParams['parent']) => () => void; declare const handleClick: ({ state, props, dispatch, vm, emit }: Pick) => (event: MouseEvent) => void; declare const computedGetIcon: ({ constants, designConfig }: Pick) => (name?: string) => object | string; declare const computedTip: ({ props, vm }: Pick) => string; type IDropdownItemVm = ComponentPublicInstance & { type: string; toggle: (value: boolean, options?: object) => void; state: IDropdownItemState; } & IDropdownItemProps; type IDropdownItemProps = ExtractPropTypes; type IDropdownItemConstants = typeof $constants; interface IDropdownItemState { checkedStatus: boolean; sort: 'asc' | 'desc'; transition: boolean; getTitle: boolean; showWrapper: boolean; showPopup: boolean; duration: number | string; overlay: ComputedRef; offset: ComputedRef; direction: ComputedRef; displayTitle: ComputedRef; itemStyle: ComputedRef; activeColor: ComputedRef; closeOnClickOverlay: ComputedRef; dropdownMenuVm: IDropdownMenuVm; currentIndex: number; textField: string; popperClass: string; getIcon: ComputedRef; } interface IDropdownItemApi { state: IDropdownItemState; open: ReturnType; opened: ReturnType; close: ReturnType; getTitle: ReturnType; onScroll: ReturnType; reset: ReturnType; closed: ReturnType; clickWrapper: ReturnType; clickOutside: ReturnType; tagClick: ReturnType; getOptionStyle: ReturnType; toggle: ReturnType; clickItem: ReturnType; getItemStyle: ReturnType; bindScroll: ReturnType; confirm: ReturnType; handleClick: ReturnType; computedGetIcon: ReturnType; computedTip: ReturnType; } type IDropdownItemRenderlessParams = ISharedRenderlessFunctionParams & { state: IDropdownItemState; props: IDropdownItemProps; api: IDropdownItemApi; }; type IDropdownItemRenderlessParamUtils = ISharedRenderlessParamUtils; interface IDropdownItemStyle { zIndex: number; top: string; bottom: string; } interface IDropdownItemTag { value: string; text: string; } interface IDropdownItemOptionStyle { color: string; border?: string; } interface IDropdownItemMfDataStore { checkedStatus: boolean; multiStageMenu: boolean; multiStage: string; itemData: object; itemLabel: string; showContent: boolean; dropdownMenuVm: IDropdownMenuVm; currentIndex: string; level: number; } export { IDropdownMenuProps as I, IDropdownMenuState as a, IDropdownMenuApi as b, IDropdownMenuRenderlessParams as c, IDropdownMenuRenderlessParamUtils as d, IDropdownMenuPopperParams as e, IDropdownMenuVm as f, IDropdownItemVm as g, IDropdownItemProps as h, IDropdownItemConstants as i, IDropdownItemState as j, IDropdownItemApi as k, IDropdownItemRenderlessParams as l, IDropdownItemRenderlessParamUtils as m, IDropdownItemStyle as n, IDropdownItemTag as o, IDropdownItemOptionStyle as p, IDropdownItemMfDataStore as q };