mirror of
https://github.com/home-assistant/frontend.git
synced 2025-11-10 19:40:25 +00:00
Use local version 0.7 of lit-virtualizer (#9321)
This commit is contained in:
39
src/resources/lit-virtualizer/lib/lit-virtualizer.d.ts
vendored
Normal file
39
src/resources/lit-virtualizer/lib/lit-virtualizer.d.ts
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
import { LitElement, TemplateResult } from "lit";
|
||||
import {
|
||||
LayoutSpecifier,
|
||||
Layout,
|
||||
LayoutConstructor,
|
||||
} from "./uni-virtualizer/lib/layouts/Layout.js";
|
||||
/**
|
||||
* A LitElement wrapper of the scroll directive.
|
||||
*
|
||||
* Import this module to declare the lit-virtualizer custom element.
|
||||
* Pass an items array, renderItem method, and scroll target as properties
|
||||
* to the <lit-virtualizer> element.
|
||||
*/
|
||||
export declare class LitVirtualizer extends LitElement {
|
||||
renderItem?: (item: any, index?: number) => TemplateResult;
|
||||
items: Array<unknown>;
|
||||
scrollTarget: Element | Window;
|
||||
keyFunction: ((item: unknown) => unknown) | undefined;
|
||||
private _layout;
|
||||
private _scrollToIndex;
|
||||
createRenderRoot(): this;
|
||||
/**
|
||||
* The method used for rendering each item.
|
||||
*/
|
||||
set layout(layout: Layout | LayoutConstructor | LayoutSpecifier | null);
|
||||
get layout(): Layout | LayoutConstructor | LayoutSpecifier | null;
|
||||
/**
|
||||
* Scroll to the specified index, placing that item at the given position
|
||||
* in the scroll view.
|
||||
*/
|
||||
scrollToIndex(index: number, position?: string): Promise<void>;
|
||||
render(): TemplateResult;
|
||||
}
|
||||
declare global {
|
||||
interface HTMLElementTagNameMap {
|
||||
"lit-virtualizer": LitVirtualizer;
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=lit-virtualizer.d.ts.map
|
||||
Reference in New Issue
Block a user