166 lines
6.2 KiB
TypeScript
166 lines
6.2 KiB
TypeScript
|
import { ChangeDetectorRef, ElementRef, EventEmitter, QueryList, Renderer2 } from '@angular/core';
|
||
|
import { PrimeTemplate } from 'primeng/api';
|
||
|
import { Nullable, VoidListener } from 'primeng/ts-helpers';
|
||
|
import { SplitterResizeEndEvent, SplitterResizeStartEvent } from './splitter.interface';
|
||
|
import * as i0 from "@angular/core";
|
||
|
import * as i1 from "@angular/common";
|
||
|
import * as i2 from "primeng/api";
|
||
|
/**
|
||
|
* Splitter is utilized to separate and resize panels.
|
||
|
* @group Components
|
||
|
*/
|
||
|
export declare class Splitter {
|
||
|
private document;
|
||
|
private platformId;
|
||
|
private renderer;
|
||
|
cd: ChangeDetectorRef;
|
||
|
private el;
|
||
|
/**
|
||
|
* Style class of the component.
|
||
|
* @group Props
|
||
|
*/
|
||
|
styleClass: string | undefined;
|
||
|
/**
|
||
|
* Style class of the panel.
|
||
|
* @group Props
|
||
|
*/
|
||
|
panelStyleClass: string | undefined;
|
||
|
/**
|
||
|
* Inline style of the component.
|
||
|
* @group Props
|
||
|
*/
|
||
|
style: {
|
||
|
[klass: string]: any;
|
||
|
} | null | undefined;
|
||
|
/**
|
||
|
* Inline style of the panel.
|
||
|
* @group Props
|
||
|
*/
|
||
|
panelStyle: {
|
||
|
[klass: string]: any;
|
||
|
} | null | undefined;
|
||
|
/**
|
||
|
* Defines where a stateful splitter keeps its state, valid values are 'session' for sessionStorage and 'local' for localStorage.
|
||
|
* @group Props
|
||
|
*/
|
||
|
stateStorage: string | undefined;
|
||
|
/**
|
||
|
* Storage identifier of a stateful Splitter.
|
||
|
* @group Props
|
||
|
*/
|
||
|
stateKey: string | undefined | null;
|
||
|
/**
|
||
|
* Orientation of the panels. Valid values are 'horizontal' and 'vertical'.
|
||
|
* @group Props
|
||
|
*/
|
||
|
layout: string | undefined;
|
||
|
/**
|
||
|
* Size of the divider in pixels.
|
||
|
* @group Props
|
||
|
*/
|
||
|
gutterSize: number;
|
||
|
/**
|
||
|
* Step factor to increment/decrement the size of the panels while pressing the arrow keys.
|
||
|
* @group Props
|
||
|
*/
|
||
|
step: number;
|
||
|
/**
|
||
|
* Minimum size of the elements relative to 100%.
|
||
|
* @group Props
|
||
|
*/
|
||
|
minSizes: number[];
|
||
|
/**
|
||
|
* Size of the elements relative to 100%.
|
||
|
* @group Props
|
||
|
*/
|
||
|
get panelSizes(): number[];
|
||
|
set panelSizes(val: number[]);
|
||
|
/**
|
||
|
* Callback to invoke when resize ends.
|
||
|
* @param {SplitterResizeEndEvent} event - Custom panel resize end event
|
||
|
* @group Emits
|
||
|
*/
|
||
|
onResizeEnd: EventEmitter<SplitterResizeEndEvent>;
|
||
|
/**
|
||
|
* Callback to invoke when resize starts.
|
||
|
* @param {SplitterResizeStartEvent} event - Custom panel resize start event
|
||
|
* @group Emits
|
||
|
*/
|
||
|
onResizeStart: EventEmitter<SplitterResizeStartEvent>;
|
||
|
templates: QueryList<PrimeTemplate>;
|
||
|
containerViewChild: Nullable<ElementRef>;
|
||
|
nested: boolean;
|
||
|
panels: any[];
|
||
|
dragging: boolean;
|
||
|
mouseMoveListener: VoidListener;
|
||
|
mouseUpListener: VoidListener;
|
||
|
touchMoveListener: VoidListener;
|
||
|
touchEndListener: VoidListener;
|
||
|
size: Nullable<number>;
|
||
|
gutterElement: Nullable<ElementRef | HTMLElement>;
|
||
|
startPos: Nullable<number>;
|
||
|
prevPanelElement: Nullable<ElementRef | HTMLElement>;
|
||
|
nextPanelElement: Nullable<ElementRef | HTMLElement>;
|
||
|
nextPanelSize: Nullable<number>;
|
||
|
prevPanelSize: Nullable<number>;
|
||
|
_panelSizes: number[];
|
||
|
prevPanelIndex: Nullable<number>;
|
||
|
timer: any;
|
||
|
prevSize: any;
|
||
|
private window;
|
||
|
constructor(document: Document, platformId: any, renderer: Renderer2, cd: ChangeDetectorRef, el: ElementRef);
|
||
|
ngOnInit(): void;
|
||
|
ngAfterContentInit(): void;
|
||
|
ngAfterViewInit(): void;
|
||
|
resizeStart(event: TouchEvent | MouseEvent, index: number, isKeyDown?: boolean): void;
|
||
|
onResize(event: MouseEvent, step?: number, isKeyDown?: boolean): void;
|
||
|
resizeEnd(event: MouseEvent | TouchEvent): void;
|
||
|
onGutterMouseDown(event: MouseEvent, index: number): void;
|
||
|
onGutterTouchStart(event: TouchEvent, index: number): void;
|
||
|
onGutterTouchMove(event: any): void;
|
||
|
onGutterTouchEnd(event: TouchEvent): void;
|
||
|
repeat(event: any, index: any, step: any): void;
|
||
|
setTimer(event: any, index: any, step: any): void;
|
||
|
clearTimer(): void;
|
||
|
onGutterKeyUp(event: any): void;
|
||
|
onGutterKeyDown(event: any, index: any): void;
|
||
|
validateResize(newPrevPanelSize: number, newNextPanelSize: number): boolean;
|
||
|
bindMouseListeners(): void;
|
||
|
bindTouchListeners(): void;
|
||
|
unbindMouseListeners(): void;
|
||
|
unbindTouchListeners(): void;
|
||
|
clear(): void;
|
||
|
isNested(): boolean;
|
||
|
isStateful(): boolean;
|
||
|
getStorage(): Storage;
|
||
|
saveState(): void;
|
||
|
restoreState(): boolean;
|
||
|
containerClass(): {
|
||
|
'p-splitter p-component': boolean;
|
||
|
'p-splitter-horizontal': boolean;
|
||
|
'p-splitter-vertical': boolean;
|
||
|
};
|
||
|
panelContainerClass(): {
|
||
|
'p-splitter-panel': boolean;
|
||
|
'p-splitter-panel-nested': boolean;
|
||
|
};
|
||
|
gutterStyle(): {
|
||
|
width: string;
|
||
|
height?: undefined;
|
||
|
} | {
|
||
|
height: string;
|
||
|
width?: undefined;
|
||
|
};
|
||
|
horizontal(): boolean;
|
||
|
static ɵfac: i0.ɵɵFactoryDeclaration<Splitter, never>;
|
||
|
static ɵcmp: i0.ɵɵComponentDeclaration<Splitter, "p-splitter", never, { "styleClass": { "alias": "styleClass"; "required": false; }; "panelStyleClass": { "alias": "panelStyleClass"; "required": false; }; "style": { "alias": "style"; "required": false; }; "panelStyle": { "alias": "panelStyle"; "required": false; }; "stateStorage": { "alias": "stateStorage"; "required": false; }; "stateKey": { "alias": "stateKey"; "required": false; }; "layout": { "alias": "layout"; "required": false; }; "gutterSize": { "alias": "gutterSize"; "required": false; }; "step": { "alias": "step"; "required": false; }; "minSizes": { "alias": "minSizes"; "required": false; }; "panelSizes": { "alias": "panelSizes"; "required": false; }; }, { "onResizeEnd": "onResizeEnd"; "onResizeStart": "onResizeStart"; }, ["templates"], never, false, never>;
|
||
|
static ngAcceptInputType_gutterSize: unknown;
|
||
|
static ngAcceptInputType_step: unknown;
|
||
|
static ngAcceptInputType_minSizes: unknown;
|
||
|
}
|
||
|
export declare class SplitterModule {
|
||
|
static ɵfac: i0.ɵɵFactoryDeclaration<SplitterModule, never>;
|
||
|
static ɵmod: i0.ɵɵNgModuleDeclaration<SplitterModule, [typeof Splitter], [typeof i1.CommonModule], [typeof Splitter, typeof i2.SharedModule]>;
|
||
|
static ɵinj: i0.ɵɵInjectorDeclaration<SplitterModule>;
|
||
|
}
|