igniteui-webcomponents
Version:
Ignite UI for Web Components is a complete library of UI components, giving you the ability to build modern web applications using encapsulation and the concept of reusable components in a dependency-free approach.
40 lines (39 loc) • 1.36 kB
TypeScript
import type IgcTileManagerComponent from './tile-manager.js';
import type IgcTileComponent from './tile.js';
declare class TilesState {
private _nextEmptyPosition;
manager: IgcTileManagerComponent;
private get _tiles();
/**
* Returns the current tiles of the tile manager sorted by their position.
*/
get tiles(): IgcTileComponent[];
constructor(manager: IgcTileManagerComponent);
assignPositions(): void;
/** Updates the default (manual) slot of the tile manager with the current tiles. */
assignTiles(): void;
add(tile: IgcTileComponent): void;
/**
* Checks and adjusts tile spans based on the column count of the tile manager.
*/
adjustTileGridPosition(): void;
remove(tile: IgcTileComponent): void;
}
type TileDragStackEntry = {
tile: IgcTileComponent;
position: number;
column?: number | null;
row?: number | null;
};
declare class TileDragStack {
private _stack;
peek(): IgcTileComponent;
pop(): TileDragStackEntry | undefined;
push(tile: IgcTileComponent): void;
restore(): void;
reset(): void;
}
export declare function createTilesState(manager: IgcTileManagerComponent): TilesState;
export declare function createTileDragStack(): TileDragStack;
export declare function swapTiles(a: IgcTileComponent, b: IgcTileComponent): void;
export {};