primeng
Version:
PrimeNG is a premium UI library for Angular featuring a rich set of 90+ components, a theme designer, various theme alternatives such as Material, Bootstrap, Tailwind, premium templates and professional support. In addition, it integrates with PrimeBlock,
148 lines (144 loc) • 5.57 kB
TypeScript
import { ScrollPanelPassThrough, ScrollPanelOrientation } from 'primeng/types/scrollpanel';
export * from 'primeng/types/scrollpanel';
import * as _angular_core from '@angular/core';
import { ElementRef, TemplateRef } from '@angular/core';
import { BaseComponent } from 'primeng/basecomponent';
import * as i1 from 'primeng/bind';
import { Bind } from 'primeng/bind';
import { Nullable } from 'primeng/ts-helpers';
import { BaseStyle } from 'primeng/base';
import * as i2 from 'primeng/api';
/**
*
* ScrollPanel is a cross browser, lightweight and themable alternative to native browser scrollbar.
*
* [Live Demo](https://www.primeng.org/scrollpanel/)
*
* @module scrollpanelstyle
*
*/
declare enum ScrollPanelClasses {
/**
* Class name of the root element
*/
root = "p-scrollpanel",
/**
* Class name of the content container element
*/
contentContainer = "p-scrollpanel-content-container",
/**
* Class name of the content element
*/
content = "p-scrollpanel-content",
/**
* Class name of the bar x element
*/
barX = "p-scrollpanel-bar-x",
/**
* Class name of the bar y element
*/
barY = "p-scrollpanel-bar-y"
}
declare class ScrollPanelStyle extends BaseStyle {
name: string;
style: string;
classes: {
root: string;
contentContainer: string;
content: string;
barX: string;
barY: string;
};
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ScrollPanelStyle, never>;
static ɵprov: _angular_core.ɵɵInjectableDeclaration<ScrollPanelStyle>;
}
interface ScrollPanelStyle extends BaseStyle {
}
/**
* ScrollPanel is a cross browser, lightweight and themable alternative to native browser scrollbar.
* @group Components
* @deprecated Use ScrollArea component instead.
*/
declare class ScrollPanel extends BaseComponent<ScrollPanelPassThrough> {
componentName: string;
constructor();
$pcScrollPanel: ScrollPanel | undefined;
bindDirectiveInstance: Bind;
/**
* Step factor to scroll the content while pressing the arrow keys.
* @group Props
*/
step: _angular_core.InputSignalWithTransform<number, unknown>;
contentViewChild: _angular_core.Signal<ElementRef<any> | undefined>;
xBarViewChild: _angular_core.Signal<ElementRef<any> | undefined>;
yBarViewChild: _angular_core.Signal<ElementRef<any> | undefined>;
/**
* Custom content template.
* @group Templates
*/
contentTemplate: _angular_core.Signal<TemplateRef<void> | undefined>;
onAfterViewChecked(): void;
scrollYRatio: number | undefined;
scrollXRatio: number | undefined;
timeoutFrame: (fn: VoidFunction) => NodeJS.Timeout;
initialized: boolean;
lastPageY: number | undefined;
lastPageX: number | undefined;
isXBarClicked: boolean;
isYBarClicked: boolean;
lastScrollLeft: _angular_core.WritableSignal<number>;
lastScrollTop: _angular_core.WritableSignal<number>;
orientation: ScrollPanelOrientation;
timer: ReturnType<typeof setTimeout> | undefined;
contentId: string | undefined;
windowResizeListener: VoidFunction | null | undefined;
contentScrollListener: VoidFunction | null | undefined;
mouseEnterListener: VoidFunction | null | undefined;
xBarMouseDownListener: VoidFunction | null | undefined;
yBarMouseDownListener: VoidFunction | null | undefined;
documentMouseMoveListener: Nullable<(event: MouseEvent) => void>;
documentMouseUpListener: Nullable<(event: Event) => void>;
_componentStyle: ScrollPanelStyle;
onInit(): void;
onAfterViewInit(): void;
calculateContainerHeight(): void;
moveBar(): void;
onScroll(event: Event): void;
onKeyDown(event: KeyboardEvent): void;
onKeyUp(): void;
repeat(bar: 'scrollTop' | 'scrollLeft', step: number): void;
setTimer(bar: 'scrollTop' | 'scrollLeft', step: number): void;
clearTimer(): void;
bindDocumentMouseListeners(): void;
unbindDocumentMouseListeners(): void;
onYBarMouseDown(e: MouseEvent): void;
onXBarMouseDown(e: MouseEvent): void;
onDocumentMouseMove(e: MouseEvent): void;
onMouseMoveForXBar(e: MouseEvent): void;
onMouseMoveForYBar(e: MouseEvent): void;
/**
* Scrolls the top location to the given value.
* @param scrollTop
* @group Method
*/
scrollTop(scrollTop: number): void;
onFocus(event: FocusEvent): void;
onBlur(): void;
onDocumentMouseUp(): void;
requestAnimationFrame(f: VoidFunction): void;
unbindListeners(): void;
onDestroy(): void;
/**
* Refreshes the position and size of the scrollbar.
* @group Method
*/
refresh(): void;
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ScrollPanel, never>;
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ScrollPanel, "p-scroll-panel, p-scrollpanel", never, { "step": { "alias": "step"; "required": false; "isSignal": true; }; }, {}, ["contentTemplate"], ["*"], true, [{ directive: typeof i1.Bind; inputs: {}; outputs: {}; }]>;
}
declare class ScrollPanelModule {
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ScrollPanelModule, never>;
static ɵmod: _angular_core.ɵɵNgModuleDeclaration<ScrollPanelModule, never, [typeof ScrollPanel, typeof i2.SharedModule, typeof i1.BindModule], [typeof ScrollPanel, typeof i2.SharedModule, typeof i1.BindModule]>;
static ɵinj: _angular_core.ɵɵInjectorDeclaration<ScrollPanelModule>;
}
export { ScrollPanel, ScrollPanelClasses, ScrollPanelModule, ScrollPanelStyle };