import { nothing } from 'lit'; import { FileOrderByType, FileOrderType, FilesResultType, FileType } from '../types/files.types'; import { WeavyType } from '../contexts/weavy-context'; import { RefOrCallback } from 'lit/directives/ref.js'; import { ShadowPartsController } from '../controllers/shadow-parts-controller'; import { WeavySubTypeComponent } from '../classes/weavy-sub-type-component'; import { InfiniteData, InfiniteQueryObserverResult } from '@tanstack/query-core'; export type FileOrderHeaderType = { by: FileOrderByType | undefined; title: string; col: string; }[]; declare global { interface HTMLElementTagNameMap { "wy-files-table": WyFilesTable; } } /** * Table view for file lists. * * **Used sub components:** * * - [``](./wy-file-menu.ts) * - [``](./wy-file-draft-badge.ts) * - [``](./ui/wy-icon.ts) * - [``](./ui/wy-button.ts) * * @csspart wy-table - Table root element * @csspart wy-table-interactive - Modifier for hoverable rows * @csspart wy-tr - Table rows * @csspart wy-th - Table header cells * @csspart wy-col-icon - Cells that contain icons/actions * @csspart wy-col-icon-content - Content in icon/action cells * @csspart wy-col-name - Cells that contain name * @csspart wy-col-time - Cells that contain time * @csspart wy-col-kind - Cells that contain kind * @csspart wy-col-size - Cells that contain size * @csspart wy-sort-link - Sortable table header cell * @csspart wy-input - Input field for file rename. * @csspart wy-highlight - Modifier for highlighted row * @csspart wy-trashed - Modifier for trashed row. * @csspart wy-badge - Badge used for comment counts * @csspart wy-pager - Pager anchor for infinite scrolling detection. * @csspart wy-pager-overlay - Modifier for overlaying pager. * @csspart wy-pager-top - Modifier for pager placed in the top. * @csspart wy-pager-bottom - Modifier for pager placed in the bottom. * * @fires {WyActionEventType} wy-action - Emitted when an action is performed on an entity. * @fires {OrderEventType} order - Emitted when the user changes sort order. */ export declare class WyFilesTable extends WeavySubTypeComponent { static styles: import('lit').CSSResult[]; /** @internal */ protected exportParts: ShadowPartsController; /** * Infinite query result backing the table view. * * @internal */ infiniteQueryResult?: InfiniteQueryObserverResult>; /** * Active sort order for the table. */ order: FileOrderType; /** * File id that is selected. */ selectedId?: number; /** * Current file id in rename mode. * * @internal */ isRenamingId?: number; /** * File id that should be highlighted and scrolled into view. * * @internal */ highlightId?: number; /** * Reference to the pager element for loading previous items. */ previousPagerRef: RefOrCallback; /** * Reference to the pager element for loading next items. */ nextPagerRef: RefOrCallback; constructor(); /** * Emit an `order` event with the provided sort order. * * @param order - Order to apply. * @returns Whether the event was not canceled. */ dispatchOrder(order: FileOrderType): boolean; /** * Render the complete file table layout. * * @param files - Files to render. * @param order - Current table order. * @param isRenamingId - File id in rename mode. * @param highlightId - File id to highlight. * @param highlightRef - Reference for scrolling highlighted rows. */ renderFileTable(files: FileType[], order?: FileOrderType, isRenamingId?: number, highlightId?: number): import('../../node_modules/lit-html/node/lit-html.js').TemplateResult<1> | typeof nothing; /** * Render table header cells with sorting affordances. * * @param order - Current sort order. */ renderFileTableHeaders(order?: FileOrderType): import('../../node_modules/lit-html/node/lit-html.js').TemplateResult<1>; /** * Render a single file table row. * * @param weavy - Current Weavy context. * @param row - Row data containing the file. * @param isRenamingId - File id in rename mode. * @param highlightId - File id to highlight. */ renderFileTableRow(weavy: WeavyType | undefined, { file }: { file: FileType; }, isRenamingId?: number, highlightId?: number): import('../../node_modules/lit-html/node/lit-html.js').TemplateResult<1>; render(): import('../../node_modules/lit-html/node/lit-html.js').TemplateResult<1> | typeof nothing; } //# sourceMappingURL=wy-files-table.d.ts.map