///
export interface TypeAsideItem {
key: string | number;
text: string | number;
disabled?: boolean;
}
export interface TypeUIAsideProps {
itemKeySelected: string | number;
asideItems: TypeAsideItem[];
onFetchPrev?: (item: TypeAsideItem) => TypeAsideItem[];
onFetchNext?: (item: TypeAsideItem) => TypeAsideItem[];
onChange?: (key: string | number, item?: TypeAsideItem) => void;
}
export interface TypeUIAsideState {
isHovering: boolean;
paddingLeft: number | null;
asideItems: null | TypeAsideItem[];
}
export declare const UI_ASIDE_SCROLL_MARGIN_DEFAULT = 100;
export declare function createUIAside(brk: (className: string) => string, cls: (className: string) => string, { scrollMargin, }?: {
scrollMargin?: number;
}): {
new (props: TypeUIAsideProps | Readonly): {
state: TypeUIAsideState;
originWidth: number;
asideRef: {
readonly elem: HTMLDivElement | null;
ref: (node: HTMLDivElement | null) => void;
};
previousFetchingPromise: null | Promise;
nextFetchingPromise: null | Promise;
disposeScrollHandler: null | (() => void);
actionQueue: {
pushAction(action: () => void, key?: string | undefined): void;
execute(): void;
};
registerAsideEvent: () => void;
componentDidMount(): void;
componentDidUpdate(prevProps: Readonly, prevState: Readonly): void;
componentWillUnmount(): void;
scrollToItem(itemKey: string | number): void;
handleMouseEnter: () => void;
handleMouseLeave: () => void;
handleSelectItem: (itemKey: number | string, item: TypeAsideItem) => void;
render(): import("react/jsx-runtime").JSX.Element;
context: any;
setState(state: TypeUIAsideState | ((prevState: Readonly, props: Readonly) => TypeUIAsideState | Pick | null) | Pick | null, callback?: (() => void) | undefined): void;
forceUpdate(callback?: (() => void) | undefined): void;
readonly props: Readonly & Readonly<{
children?: import("react").ReactNode;
}>;
refs: {
[key: string]: import("react").ReactInstance;
};
shouldComponentUpdate?(nextProps: Readonly, nextState: Readonly, nextContext: any): boolean;
componentDidCatch?(error: Error, errorInfo: import("react").ErrorInfo): void;
getSnapshotBeforeUpdate?(prevProps: Readonly, prevState: Readonly): any;
componentWillMount?(): void;
UNSAFE_componentWillMount?(): void;
componentWillReceiveProps?(nextProps: Readonly, nextContext: any): void;
UNSAFE_componentWillReceiveProps?(nextProps: Readonly, nextContext: any): void;
componentWillUpdate?(nextProps: Readonly, nextState: Readonly, nextContext: any): void;
UNSAFE_componentWillUpdate?(nextProps: Readonly, nextState: Readonly, nextContext: any): void;
};
new (props: TypeUIAsideProps, context: any): {
state: TypeUIAsideState;
originWidth: number;
asideRef: {
readonly elem: HTMLDivElement | null;
ref: (node: HTMLDivElement | null) => void;
};
previousFetchingPromise: null | Promise;
nextFetchingPromise: null | Promise;
disposeScrollHandler: null | (() => void);
actionQueue: {
pushAction(action: () => void, key?: string | undefined): void;
execute(): void;
};
registerAsideEvent: () => void;
componentDidMount(): void;
componentDidUpdate(prevProps: Readonly, prevState: Readonly): void;
componentWillUnmount(): void;
scrollToItem(itemKey: string | number): void;
handleMouseEnter: () => void;
handleMouseLeave: () => void;
handleSelectItem: (itemKey: number | string, item: TypeAsideItem) => void;
render(): import("react/jsx-runtime").JSX.Element;
context: any;
setState(state: TypeUIAsideState | ((prevState: Readonly, props: Readonly) => TypeUIAsideState | Pick | null) | Pick | null, callback?: (() => void) | undefined): void;
forceUpdate(callback?: (() => void) | undefined): void;
readonly props: Readonly & Readonly<{
children?: import("react").ReactNode;
}>;
refs: {
[key: string]: import("react").ReactInstance;
};
shouldComponentUpdate?(nextProps: Readonly, nextState: Readonly, nextContext: any): boolean;
componentDidCatch?(error: Error, errorInfo: import("react").ErrorInfo): void;
getSnapshotBeforeUpdate?(prevProps: Readonly, prevState: Readonly): any;
componentWillMount?(): void;
UNSAFE_componentWillMount?(): void;
componentWillReceiveProps?(nextProps: Readonly, nextContext: any): void;
UNSAFE_componentWillReceiveProps?(nextProps: Readonly, nextContext: any): void;
componentWillUpdate?(nextProps: Readonly, nextState: Readonly, nextContext: any): void;
UNSAFE_componentWillUpdate?(nextProps: Readonly, nextState: Readonly, nextContext: any): void;
};
getDerivedStateFromProps(nextProps: TypeUIAsideProps, currState: TypeUIAsideState): {
asideItems: TypeAsideItem[];
} | null;
contextType?: import("react").Context | undefined;
};
export declare const UiAside: {
new (props: TypeUIAsideProps | Readonly): {
state: TypeUIAsideState;
originWidth: number;
asideRef: {
readonly elem: HTMLDivElement | null;
ref: (node: HTMLDivElement | null) => void;
};
previousFetchingPromise: null | Promise;
nextFetchingPromise: null | Promise;
disposeScrollHandler: null | (() => void);
actionQueue: {
pushAction(action: () => void, key?: string | undefined): void;
execute(): void;
};
registerAsideEvent: () => void;
componentDidMount(): void;
componentDidUpdate(prevProps: Readonly, prevState: Readonly): void;
componentWillUnmount(): void;
scrollToItem(itemKey: string | number): void;
handleMouseEnter: () => void;
handleMouseLeave: () => void;
handleSelectItem: (itemKey: number | string, item: TypeAsideItem) => void;
render(): import("react/jsx-runtime").JSX.Element;
context: any;
setState(state: TypeUIAsideState | ((prevState: Readonly, props: Readonly) => TypeUIAsideState | Pick | null) | Pick | null, callback?: (() => void) | undefined): void;
forceUpdate(callback?: (() => void) | undefined): void;
readonly props: Readonly & Readonly<{
children?: import("react").ReactNode;
}>;
refs: {
[key: string]: import("react").ReactInstance;
};
shouldComponentUpdate?(nextProps: Readonly, nextState: Readonly, nextContext: any): boolean;
componentDidCatch?(error: Error, errorInfo: import("react").ErrorInfo): void;
getSnapshotBeforeUpdate?(prevProps: Readonly, prevState: Readonly): any;
componentWillMount?(): void;
UNSAFE_componentWillMount?(): void;
componentWillReceiveProps?(nextProps: Readonly, nextContext: any): void;
UNSAFE_componentWillReceiveProps?(nextProps: Readonly, nextContext: any): void;
componentWillUpdate?(nextProps: Readonly, nextState: Readonly, nextContext: any): void;
UNSAFE_componentWillUpdate?(nextProps: Readonly, nextState: Readonly, nextContext: any): void;
};
new (props: TypeUIAsideProps, context: any): {
state: TypeUIAsideState;
originWidth: number;
asideRef: {
readonly elem: HTMLDivElement | null;
ref: (node: HTMLDivElement | null) => void;
};
previousFetchingPromise: null | Promise;
nextFetchingPromise: null | Promise;
disposeScrollHandler: null | (() => void);
actionQueue: {
pushAction(action: () => void, key?: string | undefined): void;
execute(): void;
};
registerAsideEvent: () => void;
componentDidMount(): void;
componentDidUpdate(prevProps: Readonly, prevState: Readonly): void;
componentWillUnmount(): void;
scrollToItem(itemKey: string | number): void;
handleMouseEnter: () => void;
handleMouseLeave: () => void;
handleSelectItem: (itemKey: number | string, item: TypeAsideItem) => void;
render(): import("react/jsx-runtime").JSX.Element;
context: any;
setState(state: TypeUIAsideState | ((prevState: Readonly, props: Readonly) => TypeUIAsideState | Pick | null) | Pick | null, callback?: (() => void) | undefined): void;
forceUpdate(callback?: (() => void) | undefined): void;
readonly props: Readonly & Readonly<{
children?: import("react").ReactNode;
}>;
refs: {
[key: string]: import("react").ReactInstance;
};
shouldComponentUpdate?(nextProps: Readonly, nextState: Readonly, nextContext: any): boolean;
componentDidCatch?(error: Error, errorInfo: import("react").ErrorInfo): void;
getSnapshotBeforeUpdate?(prevProps: Readonly, prevState: Readonly): any;
componentWillMount?(): void;
UNSAFE_componentWillMount?(): void;
componentWillReceiveProps?(nextProps: Readonly, nextContext: any): void;
UNSAFE_componentWillReceiveProps?(nextProps: Readonly, nextContext: any): void;
componentWillUpdate?(nextProps: Readonly, nextState: Readonly, nextContext: any): void;
UNSAFE_componentWillUpdate?(nextProps: Readonly, nextState: Readonly, nextContext: any): void;
};
getDerivedStateFromProps(nextProps: TypeUIAsideProps, currState: TypeUIAsideState): {
asideItems: TypeAsideItem[];
} | null;
contextType?: import("react").Context | undefined;
};
export type UiAside = InstanceType;