import { ComponentPublicInstance, ExtractPropTypes } from 'vue'; import { ITinyVm, ISharedRenderlessParamUtils, ISharedRenderlessFunctionParams } from './shared.type.js'; declare const $constants: { TAB_ITEM: string; }; declare const tabsProps: { _constants: { type: ObjectConstructor; default: () => { TAB_ITEM: string; }; }; tabStyle: StringConstructor; activeName: StringConstructor; withClose: BooleanConstructor; withAdd: BooleanConstructor; size: StringConstructor; activeColor: { type: StringConstructor; default: string; }; modelValue: {}; editable: BooleanConstructor; position: { type: StringConstructor; default: string; }; beforeLeave: FunctionConstructor; stretch: BooleanConstructor; showMoreTabs: BooleanConstructor; swipeable: { type: BooleanConstructor; default: boolean; }; popperClass: StringConstructor; popperAppendToBody: { type: BooleanConstructor; default: boolean; }; dropConfig: { type: ObjectConstructor; default: () => null; }; separator: BooleanConstructor; showExpandTabs: BooleanConstructor; expandTabsTitle: StringConstructor; expandTabsMode: StringConstructor; tooltipConfig: (StringConstructor | ObjectConstructor)[]; optimized: { type: BooleanConstructor; default: boolean; }; beforeClose: FunctionConstructor; overflowTitle: BooleanConstructor; titleWidth: StringConstructor; moreShowAll: BooleanConstructor; panelMaxHeight: StringConstructor; panelWidth: StringConstructor; headerOnly: BooleanConstructor; 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 calcPaneInstances: ({ constants, parent, state, childrenHandler }: Pick) => (isForceUpdate?: boolean) => void; declare const calcMorePanes: ({ parent, props, state, refs }: Pick) => () => void; declare const calcExpandPanes: ({ parent, props, state }: Pick) => () => void; declare const handleTabClick: ({ api, emit, props, refs }: Pick) => (pane: ITabsPane, tabName: string, event: Event) => void; declare const handleTabRemove: ({ emit, props }: Pick) => (pane: ITabsPane, event: Event) => void; declare const handleTabAdd: (emit: ITabsRenderlessParams['emit']) => () => void; declare const setCurrentName: ({ api, props, refs, state }: Pick) => (value: string) => void; declare const changeCurrentName: ({ emit, state }: Pick) => (value: string) => void; declare const created: ({ api, parent, state }: Pick) => () => void; declare const changeDirection: ({ props, state }: Pick) => (currentName: string) => void; declare const handleTabDragStart: ({ emit }: Pick) => (event: ITabsCustomEvent) => void; declare const handleTabDragOver: ({ emit }: Pick) => (event: ITabsCustomEvent) => void; declare const handleTabDragEnd: ({ state, emit }: Pick) => (event: ITabsCustomEvent) => void; interface ITabsState { panes: ITabsPaneVm[] | []; currentName: string; currentIndex: number; showPanesCount: number; startX: number; startY: number; deltaX: number; deltaY: number; offsetX: number; offsetY: number; direction: string; expandPanesWidth: string | number; activeIndex: number; morePanes?: ITabsPaneVm[]; separator?: boolean; headerOnly?: boolean; } /** *tab根元素实例对象 */ type ITabsVm = ComponentPublicInstance & { state: ITabsState; } & ITabsProps; type ITabsPaneVm = ITinyVm<{ TAB_ITEM: string; }> | ITabsPane | ITabsVm; /** * pane对象类型 */ interface ITabsPane { name: string; disabled: boolean; state: ITabsState; } /** * 自定义拖拽事件 */ interface ITabsCustomEvent { originalEvent: DragEvent; oldDraggableIndex: number; newDraggableIndex: number; } interface ITabsApi { state: ITabsState; handleTabAdd: ReturnType; handleTabRemove: ReturnType; changeDirection: ReturnType; changeCurrentName: ReturnType; calcMorePanes: ReturnType; calcExpandPanes: ReturnType; calcPaneInstances: ReturnType; handleTabDragStart: ReturnType; handleTabDragOver: ReturnType; handleTabDragEnd: ReturnType; handleTabClick: ReturnType; setCurrentName: ReturnType; created: ReturnType; } type ITabsProps = ExtractPropTypes; type ITabsConstants = typeof $constants; type ITabsRenderlessParamUtils = ISharedRenderlessParamUtils; type ITabsRenderlessParams = ISharedRenderlessFunctionParams & { state: ITabsState; props: ITabsProps; api: ITabsApi; }; export { ITabsApi, ITabsConstants, ITabsCustomEvent, ITabsPane, ITabsPaneVm, ITabsProps, ITabsRenderlessParamUtils, ITabsRenderlessParams, ITabsState, ITabsVm };