@microsoft/windows-admin-center-sdk
Version:
Microsoft - Windows Admin Center Shell
117 lines (116 loc) • 4.17 kB
TypeScript
import { EventEmitter, Injector, OnInit } from '@angular/core';
import { CoreBaseComponent } from '../common/base.component';
import * as i0 from "@angular/core";
/**
* Resizer component
*/
export declare class ResizerComponent extends CoreBaseComponent implements OnInit {
/**
* The source name to use for logging
*/
protected get logSourceName(): string;
private static keyboardDelta;
private isResizing;
private resizerHostElement;
private resizerHostBodyElement;
private resizerIndicatorElement;
private offsetX;
private offsetY;
private originalX;
private originalY;
private _orientation;
private onStartingResizeEventHandler;
private onResizingEventHandler;
private onFinishingResizeEventHandler;
/**
* It's used to locate the resizing host which defines the area where the resizer can move around.
*/
resizerHostSelector: string;
/**
* It indicates whether to show the half transparent cover ont he resizer host.
* In some case (like Data Table column resizer), the cover is not needed since data table would handle the UI of resizing by itself.
*/
showResizerCover: boolean;
/**
* It indicates whether to let the screen reader to read this resizer control.
* In some case (like Data Table column resizer), we don't want the screen reader to read it as part of the column header.
*/
visibleToScreenReader: boolean;
/**
* It defines the orientation of the element which holds the resizer in the resizing layout.
*/
set orientation(newOrientation: string);
get orientation(): string;
/**
* Determines if the resizer is accessible to the screen readers
*/
focusable: boolean;
/**
* It's fired then the resizing is finished.
*/
resized: EventEmitter<{
x: number;
y: number;
}>;
/**
* It's fired then the resizing is happening.
*/
resizing: EventEmitter<{
x: number;
y: number;
}>;
/**
* Indicates that the resizer should be aligned to the top
*/
get alignTop(): boolean;
/**
* Indicates that the resizer should be aligned to the bottom
*/
get alignBottom(): boolean;
/**
* Indicates that the resizer should be aligned to the left
*/
get alignLeft(): boolean;
/**
* Indicates that the resizer should be aligned to the right
*/
get alignRight(): boolean;
/**
* Indicates that the resizer moves vertically
*/
get isVertical(): boolean;
/**
* Indicates that the resizer moves horizontally
*/
get isHorizontal(): boolean;
/**
* Describes the orientation for aria users.
*/
get ariaOrientation(): "vertical" | "horizontal";
/**
* Defines the cursor style the resizer should have
*/
get cursor(): "n-resize" | "s-resize" | "e-resize" | "w-resize";
/**
* Initializes a new instance of the @see ResizerComponent class.
* @param injector The angular injection service. required by @see SmeInjectableBase decorator in the @see BaseComponent class
*/
constructor(injector: Injector);
/**
* Angular lifecycle hook.
*/
ngOnInit(): void;
/**
* It handles the event when mouse down happens on the resizer.
*/
onResizeElementMouseDown(): void;
onResizeElementKeyDown($event: any): void;
private startResize;
private onStartingResizing;
private onResizing;
private onFinishingResizing;
private isOriented;
protected getInitialHostClasses(): string[];
static ɵfac: i0.ɵɵFactoryDeclaration<ResizerComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<ResizerComponent, "sme-resizer", never, { "resizerHostSelector": "resizerHostSelector"; "showResizerCover": "showResizerCover"; "visibleToScreenReader": "visibleToScreenReader"; "orientation": "orientation"; "focusable": "focusable"; }, { "resized": "resized"; "resizing": "resizing"; }, never, never, false, never>;
}