import { FDiv, FRoot, FSearch } from "@nonfx/flow-core"; import { HTMLTemplateResult, nothing, PropertyValueMap } from "lit"; import { FTable, FTableSelectable, FTableSize, FTableVariant } from "../f-table/f-table"; import { FTcellActions, FTcellAlign } from "../f-tcell/f-tcell"; import { FTrowChevronPosition, FTrowState } from "../f-trow/f-trow"; export type FTableSchemaDataRow = { selected?: boolean; details?: () => HTMLTemplateResult; state?: FTrowState; open?: boolean; id: string; disableSelection?: boolean; expandIconPosition?: FTrowChevronPosition; data: Record; }; export type FTableSchemaData = { header: Record; rows: FTableSchemaDataRow[]; }; export type FTableSchemaCell = { value: T; actions?: FTcellActions; align?: FTcellAlign; template?: (highlightText?: string | null) => HTMLTemplateResult; toString?: () => string; }; export type FTableSchemaHeaderCell = { value: T; template?: () => HTMLTemplateResult; width?: string; align?: FTcellAlign; selected?: boolean; disableSort?: boolean; sticky?: boolean; }; export type FTableSchemaVariant = FTableVariant; export type FTableSchemaSize = FTableSize; export type FTableSchemaSelectable = FTableSelectable; export type FTableSchemaHeaderCellemplate = (value: T) => HTMLTemplateResult; export type FTableSchemaStickyBackground = "default" | "secondary" | "tertiary" | "subtle"; export declare class FTableSchema extends FRoot { /** * css loaded from scss file */ static styles: import("lit").CSSResult[]; /** * @attribute data to display in table */ data: FTableSchemaData; variant?: FTableSchemaVariant; /** * header key used to specify sort attribute */ sortBy?: string; /** * sort order for `sort-by` attribute */ sortOrder?: "asc" | "desc"; /** * max rows per page , after that it will paginate on scroll */ rowsPerPage?: number; /** * @attribute size to apply on each cell */ size?: FTableSchemaSize; /** * @attribute whether to display checkbox or radiobox */ selectable?: FTableSchemaSelectable; /** * @attribute highlight selected row, when selectable has value "single" or "multiple" */ highlightSelected: boolean; set ["highlight-selected"](val: boolean); /** * @attribute highlight on hover */ highlightHover: boolean; set ["highlight-hover"](val: boolean); /** * @attribute highlight on column hover */ highlightColumnHover: boolean; set ["highlight-column-hover"](val: boolean); /** * @attribute is sticky header */ stickyHeader: boolean; /** * @attribute is sticky cell background */ stickyCellBackground: FTableSchemaStickyBackground; /** * filter rows based on search term */ searchTerm: string | null; /** * search on selected header */ searchScope: string; /** * show search input box on top */ showSearchBar: boolean; set ["show-search-bar"](val: boolean); /** * @attribute header-cell-template */ headerCellTemplate?: FTableSchemaHeaderCellemplate; set ["header-cell-template"](val: FTableSchemaHeaderCellemplate | undefined); /** * to show scrollbar */ showScrollbar: boolean; set ["show-scrollbar"](val: boolean); offset: number; loadMoreButton?: FDiv; paginationLoader: FDiv; tableElement?: FTable; tableSearchElement: FSearch; fTableWrapper: HTMLDivElement; nextEmitted: boolean; searchTimeout?: number; get max(): number; get ariaSortOrder(): "ascending" | "descending"; get header(): import("lit").TemplateResult<1> | typeof nothing; get rowsHtml(): unknown; get filteredRows(): FTableSchemaDataRow[]; get searchedRows(): FTableSchemaDataRow[]; get sortedRows(): FTableSchemaDataRow[]; get paginatedRows(): FTableSchemaDataRow[]; search(event: CustomEvent): void; get noDataTemplate(): import("lit").TemplateResult<1> | typeof nothing; render(): import("lit").TemplateResult<1>; protected updated(changedProperties: PropertyValueMap | Map): void; handleHeaderInput(event: CustomEvent, headerCell: FTableSchemaHeaderCell): void; toggleAllRows(val: boolean): void; paginate(): void; setSortBy(columnKey: string): void; getSortIcon(columnKey: string): import("lit").TemplateResult<1>; handleRowSelection(row: FTableSchemaDataRow, event: CustomEvent): void; handleRowClick(row: FTableSchemaDataRow, _event: PointerEvent): void; toggleRowDetails(row: FTableSchemaDataRow, _event: CustomEvent): void; getCellTemplate(cell: FTableSchemaCell, highlightTerm: string | null): import("lit").TemplateResult<1>; handleColumnSelection(e: CustomEvent): void; getHeaderCellTemplate(cell: FTableSchemaHeaderCell): import("lit").TemplateResult<1>; } /** * Required for typescript */ declare global { export interface HTMLElementTagNameMap { "f-table-schema": FTableSchema; } }