import { EventEmitter } from '../../stencil-public-runtime'; import { MdsTableSelectionEventDetail } from './meta/event-detail'; import { MdsTableRowSelection, MdsTableSortingType } from './meta/type'; /** * @slot - Put `mds-table-header`, `mds-table-body`, `mds-table-footer` element/s. * @slot batch-action - Put `mds-button` element/s. * @part table-wrapper - Selects the element which wraps the table * @part table - Selects the table element * @part batch-actions - Selects the element which wraps the batch actions * @part batch-actions-wrapper - The bar of the batch actions, shown while the table is `selectable` and has `batch-action` content * @category data */ export declare class MdsTable { host: HTMLMdsTableElement; /** * Slotted elements are assigned in `componentWillLoad`, but the `interactive`/`selectable` * watchers can fire before it and, with streamed HTML, the children can still be unparsed * when it runs: every dereference below has to tolerate `undefined`/`null`. */ private footer?; private rows?; private body?; private header?; private scrollWrapper?; private resizeObserver?; private tableBodyObserver?; private hasBatchActions; private cellsWidth; selectedRows: MdsTableRowSelection[]; private t; /** * Specifies if the table rows are higlighted on mouseover event */ readonly interactive?: boolean; /** * Specifies if the table rows are selectable by a checkbox */ readonly selectable?: boolean; /** * Indicates whether row selection is currently active in the table. */ selection?: boolean; /** * Specifies who sorts the rows when a sortable header cell changes direction: `internal` moves * them in the DOM, `external` leaves them to the application, which listens to * `mdsTableHeaderCellSort` and renders the rows in the order asked (a table that shows one page * of a larger set) */ readonly sorting?: MdsTableSortingType; /** * Emits when the selection of a `selectable` table changes, with the index and the value of each * selected row. It announces changes only: not the rows that arrive already `selected` (in the * markup on load, or rendered later), which the table counts all the same, as a native control * fires no `change` for its initial value */ selectionEvent: EventEmitter; onTableInteractive(): void; onTableSelectable(newValue: boolean): void; /** * `internal` Updates the selection data event and emits it, it's used to avoid add event listener to the dom and lower performance, works only if `selectable` is true. */ updateSelection(): Promise; private selectionQueued; private selectionAnnounced; private countingOnItsOwn; private countSelection; /** * `internal` Reads again whether the rows have `slot="action"` content: shows or hides the * Actions column of the header and wires the overlay of the actions. Runs when rows come and * go, and mds-table-row calls it when the content of its `action` slot changes. */ updateActions(): Promise; /** * Selects all elements or none, works only if `selectable` is true. */ selectAll(select?: boolean): Promise; private updateInteractive; private updateCellsSize; private hasActions; private handleSelection; private watchActions; private handleActions; private querySlottedElements; private updateBatchActions; componentWillLoad(): void; componentDidLoad(): void; private updateSlottedElements; connectedCallback(): void; disconnectedCallback(): void; render(): any; }