1
0
mirror of https://github.com/flarum/core.git synced 2025-10-26 21:21:28 +01:00
Files
php-flarum/js/dist-typings/forum/components/PostStreamScrubber.d.ts
flarum-bot 3d62a6af27 Bundled output for commit d268894e61
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2021-12-27 19:02:33 +00:00

60 lines
1.8 KiB
TypeScript

/**
* The `PostStreamScrubber` component displays a scrubber which can be used to
* navigate/scrub through a post stream.
*
* ### Attrs
*
* - `stream`
* - `className`
*/
export default class PostStreamScrubber extends Component<import("../../common/Component").ComponentAttrs, undefined> {
constructor();
stream: any;
handlers: {} | undefined;
scrollListener: ScrollListener | undefined;
dragging: boolean | undefined;
mouseStart: any;
indexStart: any;
/**
* Update the scrollbar's position to reflect the current values of the
* index/visible properties.
*
* @param {Partial<{fromScroll: boolean, forceHeightChange: boolean, animate: boolean}>} options
*/
updateScrubberValues(options?: Partial<{
fromScroll: boolean;
forceHeightChange: boolean;
animate: boolean;
}>): void;
adjustingHeight: boolean | undefined;
/**
* Go to the first post in the discussion.
*/
goToFirst(): void;
/**
* Go to the last post in the discussion.
*/
goToLast(): void;
onresize(): void;
onmousedown(e: any): void;
onmousemove(e: any): void;
onmouseup(): void;
onclick(e: any): void;
/**
* Get the percentage of the height of the scrubber that should be allocated
* to each post.
*
* @return {{ index: number, visible: number }}
* @property {Number} index The percent per post for posts on either side of
* the visible part of the scrubber.
* @property {Number} visible The percent per post for the visible part of the
* scrubber.
*/
percentPerPost(): {
index: number;
visible: number;
};
}
import Component from "../../common/Component";
import ScrollListener from "../../common/utils/ScrollListener";