import { DuetLanguage, DuetMargin, DuetTableBreakpoint, DuetTableStickyDistance, DuetTableVariant, DuetTheme } from "../../common-types"; import { ThemeableComponent } from "../../common/themeable-component"; export type DuetTableToggleEvent = { component: "duet-table"; sort_order?: number; direction: 1 | -1; index: number; key: string; originalEvent: KeyboardEvent | MouseEvent; }; /** * @slot dot-menu- If this slot is populated - the content will be displayed together with a ... type menu to the far right in the tsble header * @slot header - Header slot for the table * @slot footer - Footer slot for the table */ export declare class DuetTable implements ThemeableComponent { private mq; private observer; private headingSelector; /** * Tracks whether the breakpoint is matched. This is set to true by default so that JavaScript disabled in SSR mode we get accessible table data first. */ matchesBreakpoint: boolean; /** * While table itself does not use language, the copyHeadingsToCells() method needs to be triggered when language changes. */ language: DuetLanguage; watchLanguageStateHandler(newValue: DuetLanguage, oldValue: DuetLanguage): void; /** * Reference to host HTML element. */ element: HTMLElement; /** * Theme of the table. */ theme: DuetTheme; /** * Controls the margin of the component. */ margin: DuetMargin; /** * Style variation of the table. */ variation: DuetTableVariant; /** * Controls whether the table has a sticky header. * Sticky headers are not compatible with breakpoint="none-scrollable". */ sticky: boolean; /** * Adjust the distance from top of the viewport (in pixels) when the * table header becomes sticky. */ stickyDistance: DuetTableStickyDistance; /** * By default the table is responsive - it will be flattened at narrow viewport widths. * This prop controls the breakpoint at which the table should be rendered as a _regular_ table. * Set to "none" to disable the responsive functionality. * Set to "none-scrollable" to disable responsive functionality _and_ allow horizontal scrolling - * this is useful for comparison tables where it's important to maintain column and row layout. */ breakpoint: DuetTableBreakpoint; /** * Hide a thead section visually. The content is still available to screen readers. */ hideHeadVisually: boolean; handleMediaQueryChange: (mq: MediaQueryListEvent | MediaQueryList) => void; connectedCallback(): void; componentWillLoad(): void; componentDidLoad(): void; disconnectedCallback(): void; /** * Local methods. */ private copyHeadingsToCells; render(): any; }