import { ExtractPropTypes } from 'vue'; import { toggleFold } from './renderless'; import { ISharedRenderlessFunctionParams, ISharedRenderlessParamUtils } from '../../../shared.type'; export type { ISharedRenderlessParamHooks } from '../../../shared.type'; export declare const $constants: { PROCESS_DONE_CLS: string; PROCESS_CUR_CLS: string; PROCESS_WAIT_CLS: string; PROCESS_DISABLED_CLS: string; PROCESS_ERROR_CLS: string; STACK_NODES_MAX: number; LIMITED_STACK_NODES: number; }; export type ShapeType = 'circle' | 'dot'; export declare const timelineProps: { _constants: { type: ObjectConstructor; default: () => { PROCESS_DONE_CLS: string; PROCESS_CUR_CLS: string; PROCESS_WAIT_CLS: string; PROCESS_DISABLED_CLS: string; PROCESS_ERROR_CLS: string; STACK_NODES_MAX: number; LIMITED_STACK_NODES: number; }; }; vertical: { type: BooleanConstructor; default: boolean; }; horizontal: { type: BooleanConstructor; default: boolean; }; showNumber: { type: BooleanConstructor; default: boolean; }; nameField: { type: StringConstructor; default: string; }; timeField: { type: StringConstructor; default: string; }; tipsField: { type: StringConstructor; default: string; }; autoColorField: { type: StringConstructor; default: string; }; showIconField: { type: StringConstructor; default: string; }; start: { type: NumberConstructor; default: number; }; data: ArrayConstructor; space: { type: (NumberConstructor | StringConstructor)[]; default: string; }; active: { type: NumberConstructor; default: number; }; reverse: { type: BooleanConstructor; default: boolean; }; showStatus: { type: BooleanConstructor; default: boolean; }; subField: { type: BooleanConstructor; default: boolean; }; foldDisabled: { type: BooleanConstructor; default: boolean; }; nodeMax: { type: (NumberConstructor | StringConstructor)[]; default: number; }; limitedNodes: { type: (NumberConstructor | StringConstructor)[]; default: number; }; onlyNumber: { type: BooleanConstructor; default: boolean; }; lineWidth: { type: (NumberConstructor | StringConstructor)[]; default: string; }; shape: { type: PropType; default: string; }; }; export type ITimelineProps = ExtractPropTypes; export type ITimelineConstants = typeof $constants; export type ITimelineRenderlessParamUtils = ISharedRenderlessParamUtils; export type TimelineItemType = 'primary' | 'success' | 'warning' | 'error' | 'info'; export interface ITimelineItem { index: number; name: string; time: string; error: boolean; disabled: boolean; type: TimelineItemType; fold?: boolean; } export interface ITimelineState { nodes: ITimelineItem[]; timelineItems: ITimelineItem[]; current: number; isReverse: boolean; stackNodes: ITimelineItem[]; computedSpace: string; showData: boolean; showAll: boolean; computedWrapperClass: ITimelineCustomCls; computedLineWidth: string; } export interface ITimelineApi { state: ITimelineState; getDate: () => string; computedData: () => ITimelineItem[]; computedCurrent: () => number; computedIsReverse: () => boolean; computedSpace: () => string | number; getStatus: () => string; handleClick: () => void; getStatusCls: () => ITimelineStatusCls; computedStackNodes: () => ITimelineItem[]; changeStatus: () => boolean; computedWrapperClass: () => ITimelineCustomCls; toggleFold: ReturnType; } export type ITimelineRenderlessParams = ISharedRenderlessFunctionParams & { api: ITimelineApi; state: ITimelineState; props: ITimelineProps; }; export type ITimelineStatusCls = { [key in keyof ITimelineConstants]?: boolean; }; export type ITimelineCustomCls = (string | { [key: string]: boolean; })[];